// ==UserScript== // @name Better Miyoushe // @namespace http://xrafece.com // @version 1.0.5 // @author Xrafece // @description Make Miyoushe Great Again 美化米游社页面,让米游社再次伟大!!! // @icon https://img-static.mihoyo.com/favicon.ico // @match https://act.mihoyo.com/ys/* // @match https://www.miyoushe.com/* // @match https://baike.mihoyo.com/ys/* // @require https://cdn.jsdelivr.net/npm/vue@3.5.13/dist/vue.global.prod.js // @grant GM_addStyle // @grant GM_registerMenuCommand // @downloadURL none // ==/UserScript== (e=>{if(typeof GM_addStyle=="function"){GM_addStyle(e);return}const l=document.createElement("style");l.textContent=e,document.head.append(l)})(' @charset "UTF-8";/*! tailwindcss v4.0.14 | MIT License | https://tailwindcss.com */@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-blue-200:oklch(.882 .059 254.128);--color-gray-200:oklch(.928 .006 264.531);--color-gray-500:oklch(.551 .027 264.364);--color-black:#000;--spacing:.25rem;--text-base:1rem;--text-base--line-height: 1.5 ;--font-weight-bold:700;--ease-in-out:cubic-bezier(.4,0,.2,1);--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-font-feature-settings:var(--font-sans--font-feature-settings);--default-font-variation-settings:var(--font-sans--font-variation-settings);--default-mono-font-family:var(--font-mono);--default-mono-font-feature-settings:var(--font-mono--font-feature-settings);--default-mono-font-variation-settings:var(--font-mono--font-variation-settings)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}body{line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1;color:color-mix(in oklab,currentColor 50%,transparent)}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.fixed{position:fixed}.inset-0{inset:calc(var(--spacing)*0)}.z-99{z-index:99}.z-100{z-index:100}.m-20{margin:calc(var(--spacing)*20)}.flex{display:flex}.h-8{height:calc(var(--spacing)*8)}.h-10{height:calc(var(--spacing)*10)}.h-15{height:calc(var(--spacing)*15)}.h-full{height:100%}.h-screen{height:100vh}.w-8{width:calc(var(--spacing)*8)}.w-10{width:calc(var(--spacing)*10)}.w-15{width:calc(var(--spacing)*15)}.w-full{width:100%}.w-screen{width:100vw}.cursor-pointer{cursor:pointer}.items-center{align-items:center}.justify-center{justify-content:center}.rounded-full{border-radius:3.40282e38px}.border{border-style:var(--tw-border-style);border-width:1px}.border-gray-200\\/20{border-color:color-mix(in oklab,var(--color-gray-200)20%,transparent)}.bg-black\\/70{background-color:color-mix(in oklab,var(--color-black)70%,transparent)}.bg-blue-200{background-color:var(--color-blue-200)}.bg-gray-500{background-color:var(--color-gray-500)}.text-center{text-align:center}.font-sans{font-family:var(--font-sans)}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.text-black{color:var(--color-black)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.delay-100{transition-delay:.1s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}@media (hover:hover){.hover\\:scale-100:hover{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x)var(--tw-scale-y)}.hover\\:border:hover{border-style:var(--tw-border-style);border-width:1px}.hover\\:border-\\[\\#d3bc92\\]:hover{border-color:#d3bc92}.hover\\:bg-\\[\\#423730\\]:hover{background-color:#423730}}}#make-miyoushe-great-again .el-table .cell{padding:0}#make-miyoushe-great-again .star-5{background-color:#e8d8bb}#make-miyoushe-great-again .star-4{background-color:#cbb4de}#make-miyoushe-great-again .star-3{background-color:#b6c0df}.weapon-filter img,.character-filter img{display:inline}.header{background-color:#3d2985}.mhy-qrcode-top-card,.mhy-ad-container{display:none}.mhy-home__post-wrp{display:none!important}.mhy-side-section{display:none}.mhy-side-section.game-tool{display:block}.mhy-article-page-author{top:92px!important}.mhy-home .mhy-layout__main{width:1000px}.mhy-home .mhy-layout__sub{position:absolute;left:820px}@media screen and (width>=1200px){.mhy-home .mhy-layout__sub{position:absolute;left:calc(220px + 50%)}}.mhy-home .fixed_side.mhy-layout__sub_fixed-side>div:first-child{height:0!important;display:none!important}.mhy-home .is-fixed{position:static!important}:is(.mhy-forum,.mhy-home) .mhy-article-list__body{flex-wrap:wrap;display:flex}:is(.mhy-forum,.mhy-home) .mhy-article-card{width:50%;overflow:hidden}:is(.mhy-forum,.mhy-home) .mhy-article-card .mhy-article-card__content{white-space:normal;float:botton}:is(.mhy-forum,.mhy-home) .mhy-article-card .mhy-article-card__img{width:440px;height:204px}:is(.mhy-forum,.mhy-home) .mhy-article-card .mhy-article-card__video{width:440px;height:248px;position:relative}:is(.mhy-forum,.mhy-home) .mhy-article-card .mhy-article-card__preview>div:nth-child(2),:is(.mhy-forum,.mhy-home) .mhy-article-card .mhy-article-card__preview>div:nth-child(3){display:none}.mhy-forum .mhy-layout__main{width:880px}.mhy-forum .mhy-layout__sub,.mhy-forum .mhy-layout__sub .fixed_side{width:90px}.mhy-forum .mhy-side-section.game-tool{width:90px;height:570px;margin-top:0;display:block}.mhy-forum .game-tool .game-tool-info .tools_max_height{height:518px}.mhy-forum .game-tool .game-tool-info_max{flex-direction:column;place-content:center flex-start;align-items:center}.mhy-forum .game-tool .game-tool-info_max .game-tool-info_max_info{margin-left:0}.mhy-forum .is-fixed{top:140px!important}.mhy-forum.mhy-guide-forum .mhy-layout__main{padding-top:70px}.mhy-forum.mhy-guide-forum .mhy-guide-search__form{width:1000px;left:-910px}.mhy-forum.mhy-guide-forum input{background-color:#fff}.mhy-layout.mhy-main-page.mhy-article-page.mhy-video-page .mhy-side-section{display:block!important}.bbs-qr{display:none!important}@media only screen and (width>=900px){.mhy-map .leaflet-control-zoomslider{transform:translate(-.1rem)}}.home__bbs-recommend.home__bbs-recommend--has-more{display:none}.header__logo>img{display:inline!important}@media only screen and (width>=900px){.home__aside .announcement-mask,.home__aside .home__map-btn--pc,.home__aside .home-channel{display:none!important}.home__aside .home__bbs .home__back-top{position:fixed;bottom:91px;right:37px;display:block!important}.home__banner{width:100%!important;height:300px!important}.home__map{width:100%!important}.kingkong-16-item--pc{margin-right:4px;width:186px!important}.position-list{margin-right:0}.collection-bg{width:50%!important;margin:auto!important;padding-right:40px!important}.footer--home{width:1200px!important}}.mhy-bbs-app-header{display:none}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}:root{--el-color-white:#ffffff;--el-color-black:#000000;--el-color-primary-rgb:64,158,255;--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;color-scheme:light;--el-color-primary:#409eff;--el-color-primary-light-3:rgb(121.3,187.1,255);--el-color-primary-light-5:rgb(159.5,206.5,255);--el-color-primary-light-7:rgb(197.7,225.9,255);--el-color-primary-light-8:rgb(216.8,235.6,255);--el-color-primary-light-9:rgb(235.9,245.3,255);--el-color-primary-dark-2:rgb(51.2,126.4,204);--el-color-success:#67c23a;--el-color-success-light-3:rgb(148.6,212.3,117.1);--el-color-success-light-5:rgb(179,224.5,156.5);--el-color-success-light-7:rgb(209.4,236.7,195.9);--el-color-success-light-8:rgb(224.6,242.8,215.6);--el-color-success-light-9:rgb(239.8,248.9,235.3);--el-color-success-dark-2:rgb(82.4,155.2,46.4);--el-color-warning:#e6a23c;--el-color-warning-light-3:rgb(237.5,189.9,118.5);--el-color-warning-light-5:rgb(242.5,208.5,157.5);--el-color-warning-light-7:rgb(247.5,227.1,196.5);--el-color-warning-light-8:rgb(250,236.4,216);--el-color-warning-light-9:rgb(252.5,245.7,235.5);--el-color-warning-dark-2:rgb(184,129.6,48);--el-color-danger:#f56c6c;--el-color-danger-light-3:rgb(248,152.1,152.1);--el-color-danger-light-5:rgb(250,181.5,181.5);--el-color-danger-light-7:rgb(252,210.9,210.9);--el-color-danger-light-8:rgb(253,225.6,225.6);--el-color-danger-light-9:rgb(254,240.3,240.3);--el-color-danger-dark-2:rgb(196,86.4,86.4);--el-color-error:#f56c6c;--el-color-error-light-3:rgb(248,152.1,152.1);--el-color-error-light-5:rgb(250,181.5,181.5);--el-color-error-light-7:rgb(252,210.9,210.9);--el-color-error-light-8:rgb(253,225.6,225.6);--el-color-error-light-9:rgb(254,240.3,240.3);--el-color-error-dark-2:rgb(196,86.4,86.4);--el-color-info:#909399;--el-color-info-light-3:rgb(177.3,179.4,183.6);--el-color-info-light-5:rgb(199.5,201,204);--el-color-info-light-7:rgb(221.7,222.6,224.4);--el-color-info-light-8:rgb(232.8,233.4,234.6);--el-color-info-light-9:rgb(243.9,244.2,244.8);--el-color-info-dark-2:rgb(115.2,117.6,122.4);--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);transform-origin:center top;transition:var(--el-transition-md-fade)}.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);transform-origin:center bottom;transition:var(--el-transition-md-fade)}.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);transform-origin:top left;transition:var(--el-transition-md-fade)}.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-enter-active,.el-collapse-transition-leave-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(1turn)}}.el-icon{--color:inherit;align-items:center;display:inline-flex;height:1em;justify-content:center;line-height:1em;position:relative;width:1em;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-table{--el-table-border-color:var(--el-border-color-lighter);--el-table-border:1px solid var(--el-table-border-color);--el-table-text-color:var(--el-text-color-regular);--el-table-header-text-color:var(--el-text-color-secondary);--el-table-row-hover-bg-color:var(--el-fill-color-light);--el-table-current-row-bg-color:var(--el-color-primary-light-9);--el-table-header-bg-color:var(--el-bg-color);--el-table-fixed-box-shadow:var(--el-box-shadow-light);--el-table-bg-color:var(--el-fill-color-blank);--el-table-tr-bg-color:var(--el-bg-color);--el-table-expanded-cell-bg-color:var(--el-fill-color-blank);--el-table-fixed-left-column:inset 10px 0 10px -10px rgba(0,0,0,.15);--el-table-fixed-right-column:inset -10px 0 10px -10px rgba(0,0,0,.15);--el-table-index:var(--el-index-normal);background-color:var(--el-table-bg-color);box-sizing:border-box;color:var(--el-table-text-color);font-size:var(--el-font-size-base);height:-moz-fit-content;height:fit-content;max-width:100%;overflow:hidden;position:relative;width:100%}.el-table__inner-wrapper{display:flex;flex-direction:column;height:100%;position:relative}.el-table__inner-wrapper:before{bottom:0;height:1px;left:0}.el-table tbody:focus-visible{outline:none}.el-table.has-footer.el-table--fluid-height tr:last-child td.el-table__cell,.el-table.has-footer.el-table--scrollable-y tr:last-child td.el-table__cell{border-bottom-color:transparent}.el-table__empty-block{align-items:center;display:flex;justify-content:center;left:0;min-height:60px;position:sticky;text-align:center;width:100%}.el-table__empty-text{color:var(--el-text-color-secondary);line-height:60px;width:50%}.el-table__expand-column .cell{padding:0;text-align:center;-webkit-user-select:none;-moz-user-select:none;user-select:none}.el-table__expand-icon{color:var(--el-text-color-regular);cursor:pointer;font-size:12px;height:20px;position:relative;transition:transform var(--el-transition-duration-fast) ease-in-out}.el-table__expand-icon--expanded{transform:rotate(90deg)}.el-table__expand-icon>.el-icon{font-size:12px}.el-table__expanded-cell{background-color:var(--el-table-expanded-cell-bg-color)}.el-table__expanded-cell[class*=cell]{padding:20px 50px}.el-table__expanded-cell:hover{background-color:transparent!important}.el-table__placeholder{display:inline-block;width:20px}.el-table__append-wrapper{overflow:hidden}.el-table--fit{border-bottom:0;border-right:0}.el-table--fit .el-table__cell.gutter{border-right-width:1px}.el-table--fit .el-table__inner-wrapper:before{width:100%}.el-table thead{color:var(--el-table-header-text-color)}.el-table thead th{font-weight:600}.el-table thead.is-group th.el-table__cell{background:var(--el-fill-color-light)}.el-table .el-table__cell{box-sizing:border-box;min-width:0;padding:8px 0;position:relative;text-align:left;text-overflow:ellipsis;vertical-align:middle;z-index:var(--el-table-index)}.el-table .el-table__cell.is-center{text-align:center}.el-table .el-table__cell.is-right{text-align:right}.el-table .el-table__cell.gutter{border-bottom-width:0;border-right-width:0;padding:0;width:15px}.el-table .el-table__cell.is-hidden>*{visibility:hidden}.el-table .cell{box-sizing:border-box;line-height:23px;overflow:hidden;overflow-wrap:break-word;padding:0 12px;text-overflow:ellipsis;white-space:normal}.el-table .cell.el-tooltip{min-width:50px;white-space:nowrap}.el-table--large{font-size:var(--el-font-size-base)}.el-table--large .el-table__cell{padding:12px 0}.el-table--large .cell{padding:0 16px}.el-table--default{font-size:var(--el-font-size-base)}.el-table--default .el-table__cell{padding:8px 0}.el-table--default .cell{padding:0 12px}.el-table--small{font-size:var(--el-font-size-extra-small)}.el-table--small .el-table__cell{padding:4px 0}.el-table--small .cell{padding:0 8px}.el-table tr{background-color:var(--el-table-tr-bg-color)}.el-table tr input[type=checkbox]{margin:0}.el-table td.el-table__cell,.el-table th.el-table__cell.is-leaf{border-bottom:var(--el-table-border)}.el-table th.el-table__cell.is-sortable{cursor:pointer}.el-table th.el-table__cell{background-color:var(--el-table-header-bg-color)}.el-table th.el-table__cell>.cell.highlight{color:var(--el-color-primary)}.el-table th.el-table__cell.required>div:before{background:#ff4d51;border-radius:50%;content:"";display:inline-block;height:8px;margin-right:5px;vertical-align:middle;width:8px}.el-table td.el-table__cell div{box-sizing:border-box}.el-table td.el-table__cell.gutter{width:0}.el-table--border .el-table__inner-wrapper:after,.el-table--border:after,.el-table--border:before,.el-table__inner-wrapper:before{background-color:var(--el-table-border-color);content:"";position:absolute;z-index:calc(var(--el-table-index) + 2)}.el-table--border .el-table__inner-wrapper:after{height:1px;left:0;top:0;width:100%;z-index:calc(var(--el-table-index) + 2)}.el-table--border:before{height:100%;left:0;top:-1px;width:1px}.el-table--border:after{height:100%;right:0;top:-1px;width:1px}.el-table--border .el-table__inner-wrapper{border-bottom:none;border-right:none}.el-table--border .el-table__footer-wrapper{flex-shrink:0;position:relative}.el-table--border .el-table__cell{border-right:var(--el-table-border)}.el-table--border th.el-table__cell.gutter:last-of-type{border-bottom:var(--el-table-border);border-bottom-width:1px}.el-table--border th.el-table__cell{border-bottom:var(--el-table-border)}.el-table--hidden{visibility:hidden}.el-table__body-wrapper,.el-table__footer-wrapper,.el-table__header-wrapper{width:100%}.el-table__body-wrapper tr td.el-table-fixed-column--left,.el-table__body-wrapper tr td.el-table-fixed-column--right,.el-table__body-wrapper tr th.el-table-fixed-column--left,.el-table__body-wrapper tr th.el-table-fixed-column--right,.el-table__footer-wrapper tr td.el-table-fixed-column--left,.el-table__footer-wrapper tr td.el-table-fixed-column--right,.el-table__footer-wrapper tr th.el-table-fixed-column--left,.el-table__footer-wrapper tr th.el-table-fixed-column--right,.el-table__header-wrapper tr td.el-table-fixed-column--left,.el-table__header-wrapper tr td.el-table-fixed-column--right,.el-table__header-wrapper tr th.el-table-fixed-column--left,.el-table__header-wrapper tr th.el-table-fixed-column--right{background:inherit;position:sticky!important;z-index:calc(var(--el-table-index) + 1)}.el-table__body-wrapper tr td.el-table-fixed-column--left.is-first-column:before,.el-table__body-wrapper tr td.el-table-fixed-column--left.is-last-column:before,.el-table__body-wrapper tr td.el-table-fixed-column--right.is-first-column:before,.el-table__body-wrapper tr td.el-table-fixed-column--right.is-last-column:before,.el-table__body-wrapper tr th.el-table-fixed-column--left.is-first-column:before,.el-table__body-wrapper tr th.el-table-fixed-column--left.is-last-column:before,.el-table__body-wrapper tr th.el-table-fixed-column--right.is-first-column:before,.el-table__body-wrapper tr th.el-table-fixed-column--right.is-last-column:before,.el-table__footer-wrapper tr td.el-table-fixed-column--left.is-first-column:before,.el-table__footer-wrapper tr td.el-table-fixed-column--left.is-last-column:before,.el-table__footer-wrapper tr td.el-table-fixed-column--right.is-first-column:before,.el-table__footer-wrapper tr td.el-table-fixed-column--right.is-last-column:before,.el-table__footer-wrapper tr th.el-table-fixed-column--left.is-first-column:before,.el-table__footer-wrapper tr th.el-table-fixed-column--left.is-last-column:before,.el-table__footer-wrapper tr th.el-table-fixed-column--right.is-first-column:before,.el-table__footer-wrapper tr th.el-table-fixed-column--right.is-last-column:before,.el-table__header-wrapper tr td.el-table-fixed-column--left.is-first-column:before,.el-table__header-wrapper tr td.el-table-fixed-column--left.is-last-column:before,.el-table__header-wrapper tr td.el-table-fixed-column--right.is-first-column:before,.el-table__header-wrapper tr td.el-table-fixed-column--right.is-last-column:before,.el-table__header-wrapper tr th.el-table-fixed-column--left.is-first-column:before,.el-table__header-wrapper tr th.el-table-fixed-column--left.is-last-column:before,.el-table__header-wrapper tr th.el-table-fixed-column--right.is-first-column:before,.el-table__header-wrapper tr th.el-table-fixed-column--right.is-last-column:before{bottom:-1px;box-shadow:none;content:"";overflow-x:hidden;overflow-y:hidden;pointer-events:none;position:absolute;top:0;touch-action:none;width:10px}.el-table__body-wrapper tr td.el-table-fixed-column--left.is-first-column:before,.el-table__body-wrapper tr td.el-table-fixed-column--right.is-first-column:before,.el-table__body-wrapper tr th.el-table-fixed-column--left.is-first-column:before,.el-table__body-wrapper tr th.el-table-fixed-column--right.is-first-column:before,.el-table__footer-wrapper tr td.el-table-fixed-column--left.is-first-column:before,.el-table__footer-wrapper tr td.el-table-fixed-column--right.is-first-column:before,.el-table__footer-wrapper tr th.el-table-fixed-column--left.is-first-column:before,.el-table__footer-wrapper tr th.el-table-fixed-column--right.is-first-column:before,.el-table__header-wrapper tr td.el-table-fixed-column--left.is-first-column:before,.el-table__header-wrapper tr td.el-table-fixed-column--right.is-first-column:before,.el-table__header-wrapper tr th.el-table-fixed-column--left.is-first-column:before,.el-table__header-wrapper tr th.el-table-fixed-column--right.is-first-column:before{left:-10px}.el-table__body-wrapper tr td.el-table-fixed-column--left.is-last-column:before,.el-table__body-wrapper tr td.el-table-fixed-column--right.is-last-column:before,.el-table__body-wrapper tr th.el-table-fixed-column--left.is-last-column:before,.el-table__body-wrapper tr th.el-table-fixed-column--right.is-last-column:before,.el-table__footer-wrapper tr td.el-table-fixed-column--left.is-last-column:before,.el-table__footer-wrapper tr td.el-table-fixed-column--right.is-last-column:before,.el-table__footer-wrapper tr th.el-table-fixed-column--left.is-last-column:before,.el-table__footer-wrapper tr th.el-table-fixed-column--right.is-last-column:before,.el-table__header-wrapper tr td.el-table-fixed-column--left.is-last-column:before,.el-table__header-wrapper tr td.el-table-fixed-column--right.is-last-column:before,.el-table__header-wrapper tr th.el-table-fixed-column--left.is-last-column:before,.el-table__header-wrapper tr th.el-table-fixed-column--right.is-last-column:before{box-shadow:none;right:-10px}.el-table__body-wrapper tr td.el-table__fixed-right-patch,.el-table__body-wrapper tr th.el-table__fixed-right-patch,.el-table__footer-wrapper tr td.el-table__fixed-right-patch,.el-table__footer-wrapper tr th.el-table__fixed-right-patch,.el-table__header-wrapper tr td.el-table__fixed-right-patch,.el-table__header-wrapper tr th.el-table__fixed-right-patch{background:#fff;position:sticky!important;right:0;z-index:calc(var(--el-table-index) + 1)}.el-table__header-wrapper{flex-shrink:0}.el-table__header-wrapper tr th.el-table-fixed-column--left,.el-table__header-wrapper tr th.el-table-fixed-column--right{background-color:var(--el-table-header-bg-color)}.el-table__body,.el-table__footer,.el-table__header{border-collapse:separate;table-layout:fixed}.el-table__header-wrapper{overflow:hidden}.el-table__header-wrapper tbody td.el-table__cell{background-color:var(--el-table-row-hover-bg-color);color:var(--el-table-text-color)}.el-table__footer-wrapper{flex-shrink:0;overflow:hidden}.el-table__footer-wrapper tfoot td.el-table__cell{background-color:var(--el-table-row-hover-bg-color);color:var(--el-table-text-color)}.el-table__body-wrapper .el-table-column--selection>.cell,.el-table__header-wrapper .el-table-column--selection>.cell{align-items:center;display:inline-flex;height:23px}.el-table__body-wrapper .el-table-column--selection .el-checkbox,.el-table__header-wrapper .el-table-column--selection .el-checkbox{height:unset}.el-table.is-scrolling-left .el-table-fixed-column--right.is-first-column:before{box-shadow:var(--el-table-fixed-right-column)}.el-table.is-scrolling-left.el-table--border .el-table-fixed-column--left.is-last-column.el-table__cell{border-right:var(--el-table-border)}.el-table.is-scrolling-left th.el-table-fixed-column--left{background-color:var(--el-table-header-bg-color)}.el-table.is-scrolling-right .el-table-fixed-column--left.is-last-column:before{box-shadow:var(--el-table-fixed-left-column)}.el-table.is-scrolling-right .el-table-fixed-column--left.is-last-column.el-table__cell{border-right:none}.el-table.is-scrolling-right th.el-table-fixed-column--right{background-color:var(--el-table-header-bg-color)}.el-table.is-scrolling-middle .el-table-fixed-column--left.is-last-column.el-table__cell{border-right:none}.el-table.is-scrolling-middle .el-table-fixed-column--right.is-first-column:before{box-shadow:var(--el-table-fixed-right-column)}.el-table.is-scrolling-middle .el-table-fixed-column--left.is-last-column:before{box-shadow:var(--el-table-fixed-left-column)}.el-table.is-scrolling-none .el-table-fixed-column--left.is-first-column:before,.el-table.is-scrolling-none .el-table-fixed-column--left.is-last-column:before,.el-table.is-scrolling-none .el-table-fixed-column--right.is-first-column:before,.el-table.is-scrolling-none .el-table-fixed-column--right.is-last-column:before{box-shadow:none}.el-table.is-scrolling-none th.el-table-fixed-column--left,.el-table.is-scrolling-none th.el-table-fixed-column--right{background-color:var(--el-table-header-bg-color)}.el-table__body-wrapper{flex:1;overflow:hidden;position:relative}.el-table__body-wrapper .el-scrollbar__bar{z-index:calc(var(--el-table-index) + 2)}.el-table .caret-wrapper{align-items:center;cursor:pointer;display:inline-flex;flex-direction:column;height:14px;overflow:initial;position:relative;vertical-align:middle;width:24px}.el-table .sort-caret{border:5px solid transparent;height:0;left:7px;position:absolute;width:0}.el-table .sort-caret.ascending{border-bottom-color:var(--el-text-color-placeholder);top:-5px}.el-table .sort-caret.descending{border-top-color:var(--el-text-color-placeholder);bottom:-3px}.el-table .ascending .sort-caret.ascending{border-bottom-color:var(--el-color-primary)}.el-table .descending .sort-caret.descending{border-top-color:var(--el-color-primary)}.el-table .hidden-columns{position:absolute;visibility:hidden;z-index:-1}.el-table--striped .el-table__body tr.el-table__row--striped td.el-table__cell{background:var(--el-fill-color-lighter)}.el-table--striped .el-table__body tr.el-table__row--striped.current-row td.el-table__cell{background-color:var(--el-table-current-row-bg-color)}.el-table__body tr.hover-row.current-row>td.el-table__cell,.el-table__body tr.hover-row.el-table__row--striped.current-row>td.el-table__cell,.el-table__body tr.hover-row.el-table__row--striped>td.el-table__cell,.el-table__body tr.hover-row>td.el-table__cell,.el-table__body tr>td.hover-cell{background-color:var(--el-table-row-hover-bg-color)}.el-table__body tr.current-row>td.el-table__cell{background-color:var(--el-table-current-row-bg-color)}.el-table.el-table--scrollable-y .el-table__body-header{position:sticky;top:0;z-index:calc(var(--el-table-index) + 2)}.el-table.el-table--scrollable-y .el-table__body-footer{bottom:0;position:sticky;z-index:calc(var(--el-table-index) + 2)}.el-table__column-resize-proxy{border-left:var(--el-table-border);bottom:0;left:200px;position:absolute;top:0;width:0;z-index:calc(var(--el-table-index) + 9)}.el-table__column-filter-trigger{cursor:pointer;display:inline-block}.el-table__column-filter-trigger i{color:var(--el-color-info);font-size:14px;vertical-align:middle}.el-table__border-left-patch{height:100%;top:0;width:1px}.el-table__border-bottom-patch,.el-table__border-left-patch{background-color:var(--el-table-border-color);left:0;position:absolute;z-index:calc(var(--el-table-index) + 2)}.el-table__border-bottom-patch{height:1px}.el-table__border-right-patch{background-color:var(--el-table-border-color);height:100%;position:absolute;top:0;width:1px;z-index:calc(var(--el-table-index) + 2)}.el-table--enable-row-transition .el-table__body td.el-table__cell{transition:background-color .25s ease}.el-table--enable-row-hover .el-table__body tr:hover>td.el-table__cell{background-color:var(--el-table-row-hover-bg-color)}.el-table [class*=el-table__row--level] .el-table__expand-icon{display:inline-block;height:12px;line-height:12px;margin-right:8px;text-align:center;width:12px}.el-table .el-table.el-table--border .el-table__cell{border-right:var(--el-table-border)}.el-table:not(.el-table--border) .el-table__cell{border-right:none}.el-table:not(.el-table--border)>.el-table__inner-wrapper:after{content:none}.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);align-items:center;color:var(--el-checkbox-text-color);cursor:pointer;display:inline-flex;font-size:var(--el-font-size-base);font-weight:var(--el-checkbox-font-weight);height:var(--el-checkbox-height,32px);margin-right:30px;position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:nowrap}.el-checkbox.is-disabled{cursor:not-allowed}.el-checkbox.is-bordered{border:var(--el-border);border-radius:var(--el-border-radius-base);box-sizing:border-box;padding:0 15px 0 9px}.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{border-radius:var(--el-border-radius-base);padding:0 19px 0 11px}.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{border-radius:calc(var(--el-border-radius-base) - 1px);padding:0 11px 0 7px}.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{border-radius:var(--el-checkbox-border-radius);outline:2px solid var(--el-checkbox-input-border-color-hover);outline-offset:1px}.el-checkbox__input{cursor:pointer;display:inline-flex;outline:none;position:relative;white-space:nowrap}.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{border-color:var(--el-checkbox-disabled-icon-color);cursor:not-allowed}.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{border-color:var(--el-checkbox-checked-icon-color);transform:rotate(45deg) scaleY(1)}.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{background-color:var(--el-checkbox-checked-icon-color);content:"";display:block;height:2px;left:0;position:absolute;right:0;top:5px;transform:scale(.5)}.el-checkbox__input.is-indeterminate .el-checkbox__inner:after{display:none}.el-checkbox__inner{background-color:var(--el-checkbox-bg-color);border:var(--el-checkbox-input-border);border-radius:var(--el-checkbox-border-radius);box-sizing:border-box;display:inline-block;height:var(--el-checkbox-input-height);position:relative;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);width:var(--el-checkbox-input-width);z-index:var(--el-index-normal)}.el-checkbox__inner:hover{border-color:var(--el-checkbox-input-border-color-hover)}.el-checkbox__inner:after{border:1px solid transparent;border-left:0;border-top:0;box-sizing:content-box;content:"";height:7px;left:4px;position:absolute;top:1px;transform:rotate(45deg) scaleY(0);transform-origin:center;transition:transform .15s ease-in .05s;width:3px}.el-checkbox__original{height:0;margin:0;opacity:0;outline:none;position:absolute;width:0;z-index:-1}.el-checkbox__label{display:inline-block;font-size:var(--el-checkbox-font-size);line-height:1;padding-left:8px}.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{height:14px;width: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{height:12px;width: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{height:6px;width:2px}.el-checkbox:last-of-type{margin-right:0}.el-popper{--el-popper-border-radius:var(--el-popover-border-radius,4px);border-radius:var(--el-popper-border-radius);font-size:12px;line-height:20px;min-width:10px;overflow-wrap:break-word;padding:5px 11px;position:absolute;visibility:visible;z-index:2000}.el-popper.is-dark{color:var(--el-bg-color)}.el-popper.is-dark,.el-popper.is-dark>.el-popper__arrow:before{background:var(--el-text-color-primary);border:1px solid var(--el-text-color-primary)}.el-popper.is-dark>.el-popper__arrow:before{right:0}.el-popper.is-light,.el-popper.is-light>.el-popper__arrow:before{background:var(--el-bg-color-overlay);border:1px solid var(--el-border-color-light)}.el-popper.is-light>.el-popper__arrow:before{right:0}.el-popper.is-pure{padding:0}.el-popper__arrow,.el-popper__arrow:before{height:10px;position:absolute;width:10px;z-index:-1}.el-popper__arrow:before{background:var(--el-text-color-primary);box-sizing:border-box;content:" ";transform:rotate(45deg)}.el-popper[data-popper-placement^=top]>.el-popper__arrow{bottom:-5px}.el-popper[data-popper-placement^=top]>.el-popper__arrow:before{border-bottom-right-radius:2px}.el-popper[data-popper-placement^=bottom]>.el-popper__arrow{top:-5px}.el-popper[data-popper-placement^=bottom]>.el-popper__arrow:before{border-top-left-radius:2px}.el-popper[data-popper-placement^=left]>.el-popper__arrow{right:-5px}.el-popper[data-popper-placement^=left]>.el-popper__arrow:before{border-top-right-radius:2px}.el-popper[data-popper-placement^=right]>.el-popper__arrow{left:-5px}.el-popper[data-popper-placement^=right]>.el-popper__arrow:before{border-bottom-left-radius:2px}.el-popper[data-popper-placement^=top]>.el-popper__arrow:before{border-left-color:transparent!important;border-top-color:transparent!important}.el-popper[data-popper-placement^=bottom]>.el-popper__arrow:before{border-bottom-color:transparent!important;border-right-color:transparent!important}.el-popper[data-popper-placement^=left]>.el-popper__arrow:before{border-bottom-color:transparent!important;border-left-color:transparent!important}.el-popper[data-popper-placement^=right]>.el-popper__arrow:before{border-right-color:transparent!important;border-top-color:transparent!important}.el-scrollbar{--el-scrollbar-opacity:.3;--el-scrollbar-bg-color:var(--el-text-color-secondary);--el-scrollbar-hover-opacity:.5;--el-scrollbar-hover-bg-color:var(--el-text-color-secondary);height:100%;overflow:hidden;position:relative}.el-scrollbar__wrap{height:100%;overflow:auto}.el-scrollbar__wrap--hidden-default{scrollbar-width:none}.el-scrollbar__wrap--hidden-default::-webkit-scrollbar{display:none}.el-scrollbar__thumb{background-color:var(--el-scrollbar-bg-color,var(--el-text-color-secondary));border-radius:inherit;cursor:pointer;display:block;height:0;opacity:var(--el-scrollbar-opacity,.3);position:relative;transition:var(--el-transition-duration) background-color;width:0}.el-scrollbar__thumb:hover{background-color:var(--el-scrollbar-hover-bg-color,var(--el-text-color-secondary));opacity:var(--el-scrollbar-hover-opacity,.5)}.el-scrollbar__bar{border-radius:4px;bottom:2px;position:absolute;right:2px;z-index:1}.el-scrollbar__bar.is-vertical{top:2px;width:6px}.el-scrollbar__bar.is-vertical>div{width:100%}.el-scrollbar__bar.is-horizontal{height:6px;left:2px}.el-scrollbar__bar.is-horizontal>div{height:100%}.el-scrollbar-fade-enter-active{transition:opacity .34s ease-out}.el-scrollbar-fade-leave-active{transition:opacity .12s ease-out}.el-scrollbar-fade-enter-from,.el-scrollbar-fade-leave-active{opacity:0}.el-table-column--selection .cell{padding-left:14px;padding-right:14px}.el-table-filter{background-color:#fff;border:1px solid var(--el-border-color-lighter);border-radius:2px;box-shadow:var(--el-box-shadow-light);box-sizing:border-box}.el-table-filter__list{list-style:none;margin:0;min-width:100px;padding:5px 0}.el-table-filter__list-item{cursor:pointer;font-size:var(--el-font-size-base);line-height:36px;padding:0 10px}.el-table-filter__list-item:hover{background-color:var(--el-color-primary-light-9);color:var(--el-color-primary)}.el-table-filter__list-item.is-active{background-color:var(--el-color-primary);color:#fff}.el-table-filter__content{min-width:100px}.el-table-filter__bottom{border-top:1px solid var(--el-border-color-lighter);padding:8px}.el-table-filter__bottom button{background:transparent;border:none;color:var(--el-text-color-regular);cursor:pointer;font-size:var(--el-font-size-small);padding:0 3px}.el-table-filter__bottom button:hover{color:var(--el-color-primary)}.el-table-filter__bottom button:focus{outline:none}.el-table-filter__bottom button.is-disabled{color:var(--el-disabled-text-color);cursor:not-allowed}.el-table-filter__wrap{max-height:280px}.el-table-filter__checkbox-group{padding:10px}.el-table-filter__checkbox-group label.el-checkbox{align-items:center;display:flex;height:unset;margin-bottom:12px;margin-left:5px;margin-right:5px}.el-table-filter__checkbox-group .el-checkbox:last-child{margin-bottom:0}.el-tag{--el-tag-font-size:12px;--el-tag-border-radius:4px;--el-tag-border-radius-rounded:9999px;align-items:center;background-color:var(--el-tag-bg-color);border-color:var(--el-tag-border-color);border-radius:var(--el-tag-border-radius);border-style:solid;border-width:1px;box-sizing:border-box;color:var(--el-tag-text-color);display:inline-flex;font-size:var(--el-tag-font-size);height:24px;justify-content:center;line-height:1;padding:0 9px;vertical-align:middle;white-space:nowrap;--el-icon-size:14px}.el-tag,.el-tag.el-tag--primary{--el-tag-bg-color:var(--el-color-primary-light-9);--el-tag-border-color:var(--el-color-primary-light-8);--el-tag-hover-color:var(--el-color-primary)}.el-tag.el-tag--success{--el-tag-bg-color:var(--el-color-success-light-9);--el-tag-border-color:var(--el-color-success-light-8);--el-tag-hover-color:var(--el-color-success)}.el-tag.el-tag--warning{--el-tag-bg-color:var(--el-color-warning-light-9);--el-tag-border-color:var(--el-color-warning-light-8);--el-tag-hover-color:var(--el-color-warning)}.el-tag.el-tag--danger{--el-tag-bg-color:var(--el-color-danger-light-9);--el-tag-border-color:var(--el-color-danger-light-8);--el-tag-hover-color:var(--el-color-danger)}.el-tag.el-tag--error{--el-tag-bg-color:var(--el-color-error-light-9);--el-tag-border-color:var(--el-color-error-light-8);--el-tag-hover-color:var(--el-color-error)}.el-tag.el-tag--info{--el-tag-bg-color:var(--el-color-info-light-9);--el-tag-border-color:var(--el-color-info-light-8);--el-tag-hover-color:var(--el-color-info)}.el-tag.is-hit{border-color:var(--el-color-primary)}.el-tag.is-round{border-radius:var(--el-tag-border-radius-rounded)}.el-tag .el-tag__close{color:var(--el-tag-text-color);flex-shrink:0}.el-tag .el-tag__close:hover{background-color:var(--el-tag-hover-color);color:var(--el-color-white)}.el-tag.el-tag--primary{--el-tag-text-color:var(--el-color-primary)}.el-tag.el-tag--success{--el-tag-text-color:var(--el-color-success)}.el-tag.el-tag--warning{--el-tag-text-color:var(--el-color-warning)}.el-tag.el-tag--danger{--el-tag-text-color:var(--el-color-danger)}.el-tag.el-tag--error{--el-tag-text-color:var(--el-color-error)}.el-tag.el-tag--info{--el-tag-text-color:var(--el-color-info)}.el-tag .el-icon{border-radius:50%;cursor:pointer;font-size:calc(var(--el-icon-size) - 2px);height:var(--el-icon-size);width:var(--el-icon-size)}.el-tag .el-tag__close{margin-left:6px}.el-tag--dark{--el-tag-text-color:var(--el-color-white)}.el-tag--dark,.el-tag--dark.el-tag--primary{--el-tag-bg-color:var(--el-color-primary);--el-tag-border-color:var(--el-color-primary);--el-tag-hover-color:var(--el-color-primary-light-3)}.el-tag--dark.el-tag--success{--el-tag-bg-color:var(--el-color-success);--el-tag-border-color:var(--el-color-success);--el-tag-hover-color:var(--el-color-success-light-3)}.el-tag--dark.el-tag--warning{--el-tag-bg-color:var(--el-color-warning);--el-tag-border-color:var(--el-color-warning);--el-tag-hover-color:var(--el-color-warning-light-3)}.el-tag--dark.el-tag--danger{--el-tag-bg-color:var(--el-color-danger);--el-tag-border-color:var(--el-color-danger);--el-tag-hover-color:var(--el-color-danger-light-3)}.el-tag--dark.el-tag--error{--el-tag-bg-color:var(--el-color-error);--el-tag-border-color:var(--el-color-error);--el-tag-hover-color:var(--el-color-error-light-3)}.el-tag--dark.el-tag--info{--el-tag-bg-color:var(--el-color-info);--el-tag-border-color:var(--el-color-info);--el-tag-hover-color:var(--el-color-info-light-3)}.el-tag--dark.el-tag--danger,.el-tag--dark.el-tag--error,.el-tag--dark.el-tag--info,.el-tag--dark.el-tag--primary,.el-tag--dark.el-tag--success,.el-tag--dark.el-tag--warning{--el-tag-text-color:var(--el-color-white)}.el-tag--plain,.el-tag--plain.el-tag--primary{--el-tag-bg-color:var(--el-fill-color-blank);--el-tag-border-color:var(--el-color-primary-light-5);--el-tag-hover-color:var(--el-color-primary)}.el-tag--plain.el-tag--success{--el-tag-bg-color:var(--el-fill-color-blank);--el-tag-border-color:var(--el-color-success-light-5);--el-tag-hover-color:var(--el-color-success)}.el-tag--plain.el-tag--warning{--el-tag-bg-color:var(--el-fill-color-blank);--el-tag-border-color:var(--el-color-warning-light-5);--el-tag-hover-color:var(--el-color-warning)}.el-tag--plain.el-tag--danger{--el-tag-bg-color:var(--el-fill-color-blank);--el-tag-border-color:var(--el-color-danger-light-5);--el-tag-hover-color:var(--el-color-danger)}.el-tag--plain.el-tag--error{--el-tag-bg-color:var(--el-fill-color-blank);--el-tag-border-color:var(--el-color-error-light-5);--el-tag-hover-color:var(--el-color-error)}.el-tag--plain.el-tag--info{--el-tag-bg-color:var(--el-fill-color-blank);--el-tag-border-color:var(--el-color-info-light-5);--el-tag-hover-color:var(--el-color-info)}.el-tag.is-closable{padding-right:5px}.el-tag--large{height:32px;padding:0 11px;--el-icon-size:16px}.el-tag--large .el-tag__close{margin-left:8px}.el-tag--large.is-closable{padding-right:7px}.el-tag--small{height:20px;padding:0 7px;--el-icon-size:12px}.el-tag--small .el-tag__close{margin-left:4px}.el-tag--small.is-closable{padding-right:3px}.el-tag--small .el-icon-close{transform:scale(.8)}.el-tag.el-tag--primary.is-hit{border-color:var(--el-color-primary)}.el-tag.el-tag--success.is-hit{border-color:var(--el-color-success)}.el-tag.el-tag--warning.is-hit{border-color:var(--el-color-warning)}.el-tag.el-tag--danger.is-hit{border-color:var(--el-color-danger)}.el-tag.el-tag--error.is-hit{border-color:var(--el-color-error)}.el-tag.el-tag--info.is-hit{border-color:var(--el-color-info)}.character-btn[data-v-bb1a3cd3]{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAMAAADVRocKAAAA8FBMVEX////////TvI/////////////UvpJHcEz////////byKX////////////////l1bb////UvZDZxJz////////Ywpf////////TvI/p4szfz6v////////////////g0bjYw5nUv5T////////WwJb////////w6NLWwpfXwZXVvpPWwJXTvI7////Tu4/ZxJnVwZXWv5P////XwJPUwJbTvZD////////VvZLl1bvfz6/WvpPXwpr////Zxp3TvpHVv5DZxqDczKnWw5nVvpDUv5PVwJTXxJzbyKHVvpT////Yw5fVvpDTvpDUvZLTvI7JR2iPAAAAT3RSTlMUD+ICJSLEACcWTxkcBR0xFeFsGx6JFyDwI0AmESMKMnunJBKKHxgiiZi1pvAI8XqYpw6mitMaIbYxQLVtDF7T0l5Be8SnmWxPtQ1709O29JWInQAABkFJREFUaN7FWmlX6kgQbZKQRzYCWdiUTRYF8Yk66vjUt6+z5f//m+nqLAbsqgSYc6Y+eDgG6qZuLV1d3exNKVEHE8OfVbUaF61a943JQC33S1ZCeWVerUlkNq84hwOok3qNkHohBg0wyLSftG27ZTQYl4Zh3QX3J+kT/3lfAHWSMNMPLKF5Syy7Hz+vVvYCONZi7bZMeSKG3y+CwAAG4u2PAkJ7gtHWSAg5gOOXVC/EFxBzpzzAtbaDehBbQ42QAKiGiPLy6gVR8BtDLQPgAPuaxXYUSxjhFANcaDu/fiyNGSBcFAFcA/t1tpfYQNM1DXAM9LTYnmKA9ccUgNBvMPYfIrBtfk4O0M8R+tss5QEuQH+DHSQNQLiQA0B8agY7UIAlzZEBqKh+80xXoij6cNkti1BVJQCQvzL9Q50rjzoLs6wNrSOu6DVABdYn2ffh5aPfT3fMh+ttAHDATPbtd6D/Kv78MFovdX39voiqWc4NKYDF/ycNIBMAXP6heyZsETIe0qHE3eBvAgBB8voGFtyC+rdRXmgI/rq1wQYAJ6iNfLkDAJ+VaFvOCkiq5gEqRAZMo2j1JZIIhdA4SksGSw1AK2i3GZHS7Ml+FfBXVjMAMAB/m16H0o8EcGYCSwzwUf2mTqg/R9MvSLwAAM+EAUOd5OeM9MIgAfDxEPrylnYAgcBNqMcADlKEuPwWFQrKUYOrVQUAd3F1b/2RgtaNvnAzB6hjLu5FZSQkal4dAHCGlFIACs0Rwxkyo3LSIziqcAALy+LxSzI93jx+RePpkoijOQdoY3X0hSE6VhdETa2+YSpnCq3TpeSGdAIb8Fal2AWIDU0SgPF93IBNarV76dPRZqzIQxT+6CgAZ/+Y8WYikD4VPz7PavVSVrXfN0kAGxKAF6I7HCBk3vIDjrAwiwB8VseCSFB0012HT0+XYfj4tSNhacV0CmAOVbSP5bEn+P0xeqX1Nl/qTArAgBzWMABXvOJ0PX3FS+6zzk3AARqw0GBpkCTaKFK8TfL1X+nbe8sO/xOt8A4GlOMA4tVDPVpdAkQGM+rkVgLzJ2sSFZsG6IKmFcSJYvZG02Ttb3pZkft7GT6ZJi9Z4/0A4jhafxe8vGcs5t5Lg0n3ihdOUI46mQss+MrPeNl/65mbat04P5rnID3cyX0CwO0sHrLO6wbCqummBoQJ0iO1F4Ew5fVijvdc7Juiny9jSlzQnxrwMa3ml3QPHECpsPGv5JZ9/V3n6hRYA4M+nqZPXALgDkqFQbSlG23Fgp12z7rgZugXh1mmERIA/RO862JePsGWa/72XdjtfOqxoVLCAHYP5RpdcKR9i6lErhkO2VVRz/Ky4Ki1gjjdXGEWV4DaC0sQJNJAZW/6WL2WdS4r0wXdl6MyBvAgalNti9QEXYC6SUvjFW1n51TjFafaNsKYuaNe6uMFCZA0XqQT2Ov1Zjl82RKuqB1ziyt2kuaXGHF9l/TTL8StqWknz2PRXU8ojhj7Fqvq6PlYzcQrYAgAaI7ihafzZ7yExuUnxxtOUsyQ2ELRHHFPX01P4x156udpida3HY8TAIAn81GJQdQ0t764zcLOlC80f+S2sSUmmbkduWKydI3WcRdn21hwc6EJw9DL78jHQ1cnATTh4gRA1YpNGHNV+Y5I8WLObtEsruZmFceFJvD6b37enuh86mBbtFZqQG6cMyswIPyR6VeW5+HTp94D+FrBQmhjnAOBVLNIA8J4dVPOR73c+MNt6thAqrI5UvPpmen46h9w6OjhVY6MkcnmfHsoqFEkDf9Sos5UOrg5RSYtjmysaeOLM6IeHWtWpIPZI6xDGn90y49NoQgZ2GgZOToY7TCWbWGjZeGG/Q8nNvQ7xHj/wPG7cYKP92NHnxxkQ+sk72DkiKV1GD/UEcuhCPPCQ6KYJardJuP/aJsf6UEdHATO9nC1EYD1F///UWN6WNpu7fz6JQ9LwRHCiPKeMOrAvlbZ4cDaEhco/B3U13xnpyN3YURNKyYqUV8d7HxpIIaoVX0Cw7DjL2nHe92rSCBqVVsWU4ZVT59P1H0vbjzb2cWN++DOMkR6GMbcttvZxY1gcNDVE6cSUFdPgknRHZoSl2ecitWWKe9blRI3dEoApNd/7KAfX//pt+3y13/+BbH1NxWKv3iLAAAAAElFTkSuQmCC) no-repeat center/contain} '); (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-Cp_pHh4L.js"(exports, module) { /*! * pinia v3.0.1 * (c) 2025 Eduardo San Martin Morote * @license MIT */ let activePinia; const setActivePinia = (pinia) => activePinia = pinia; const piniaSymbol = ( /* istanbul ignore next */ Symbol() ); function isPlainObject$1(o2) { return o2 && typeof o2 === "object" && Object.prototype.toString.call(o2) === "[object Object]" && typeof o2.toJSON !== "function"; } var MutationType; (function(MutationType2) { MutationType2["direct"] = "direct"; MutationType2["patchObject"] = "patch object"; MutationType2["patchFunction"] = "patch function"; })(MutationType || (MutationType = {})); function createPinia() { const scope = vue.effectScope(true); const state = scope.run(() => vue.ref({})); let _p = []; let toBeInstalled = []; const pinia = vue.markRaw({ install(app) { setActivePinia(pinia); pinia._a = app; app.provide(piniaSymbol, pinia); app.config.globalProperties.$pinia = pinia; toBeInstalled.forEach((plugin) => _p.push(plugin)); toBeInstalled = []; }, use(plugin) { if (!this._a) { toBeInstalled.push(plugin); } else { _p.push(plugin); } return this; }, _p, // it's actually undefined here // @ts-expect-error _a: null, _e: scope, _s: /* @__PURE__ */ new Map(), state }); return pinia; } const noop$2 = () => { }; function addSubscription(subscriptions, callback, detached, onCleanup = noop$2) { subscriptions.push(callback); const removeSubscription = () => { const idx = subscriptions.indexOf(callback); if (idx > -1) { subscriptions.splice(idx, 1); onCleanup(); } }; if (!detached && vue.getCurrentScope()) { vue.onScopeDispose(removeSubscription); } return removeSubscription; } function triggerSubscriptions(subscriptions, ...args) { subscriptions.slice().forEach((callback) => { callback(...args); }); } const fallbackRunWithContext = (fn2) => fn2(); const ACTION_MARKER = Symbol(); const ACTION_NAME = Symbol(); function mergeReactiveObjects(target, patchToApply) { if (target instanceof Map && patchToApply instanceof Map) { patchToApply.forEach((value, key) => target.set(key, value)); } else if (target instanceof Set && patchToApply instanceof Set) { patchToApply.forEach(target.add, target); } for (const key in patchToApply) { if (!patchToApply.hasOwnProperty(key)) continue; const subPatch = patchToApply[key]; const targetValue = target[key]; if (isPlainObject$1(targetValue) && isPlainObject$1(subPatch) && target.hasOwnProperty(key) && !vue.isRef(subPatch) && !vue.isReactive(subPatch)) { target[key] = mergeReactiveObjects(targetValue, subPatch); } else { target[key] = subPatch; } } return target; } const skipHydrateSymbol = ( /* istanbul ignore next */ Symbol() ); function shouldHydrate(obj) { return !isPlainObject$1(obj) || !obj.hasOwnProperty(skipHydrateSymbol); } const { assign } = Object; function isComputed(o2) { return !!(vue.isRef(o2) && o2.effect); } function createOptionsStore(id, options, pinia, hot) { const { state, actions, getters } = options; const initialState = pinia.state.value[id]; let store; function setup() { if (!initialState && true) { pinia.state.value[id] = state ? state() : {}; } const localState = vue.toRefs(pinia.state.value[id]); return assign(localState, actions, Object.keys(getters || {}).reduce((computedGetters, name) => { computedGetters[name] = vue.markRaw(vue.computed(() => { setActivePinia(pinia); const store2 = pinia._s.get(id); return getters[name].call(store2, store2); })); return computedGetters; }, {})); } store = createSetupStore(id, setup, options, pinia, hot, true); return store; } function createSetupStore($id, setup, options = {}, pinia, hot, isOptionsStore) { let scope; const optionsForPlugin = assign({ actions: {} }, options); const $subscribeOptions = { deep: true }; let isListening; let isSyncListening; let subscriptions = []; let actionSubscriptions = []; let debuggerEvents; const initialState = pinia.state.value[$id]; if (!isOptionsStore && !initialState && true) { pinia.state.value[$id] = {}; } vue.ref({}); let activeListener; function $patch(partialStateOrMutator) { let subscriptionMutation; isListening = isSyncListening = false; if (typeof partialStateOrMutator === "function") { partialStateOrMutator(pinia.state.value[$id]); subscriptionMutation = { type: MutationType.patchFunction, storeId: $id, events: debuggerEvents }; } else { mergeReactiveObjects(pinia.state.value[$id], partialStateOrMutator); subscriptionMutation = { type: MutationType.patchObject, payload: partialStateOrMutator, storeId: $id, events: debuggerEvents }; } const myListenerId = activeListener = Symbol(); vue.nextTick().then(() => { if (activeListener === myListenerId) { isListening = true; } }); isSyncListening = true; triggerSubscriptions(subscriptions, subscriptionMutation, pinia.state.value[$id]); } const $reset = isOptionsStore ? function $reset2() { const { state } = options; const newState = state ? state() : {}; this.$patch(($state) => { assign($state, newState); }); } : ( /* istanbul ignore next */ noop$2 ); function $dispose() { scope.stop(); subscriptions = []; actionSubscriptions = []; pinia._s.delete($id); } const action = (fn2, name = "") => { if (ACTION_MARKER in fn2) { fn2[ACTION_NAME] = name; return fn2; } const wrappedAction = function() { setActivePinia(pinia); const args = Array.from(arguments); const afterCallbackList = []; const onErrorCallbackList = []; function after(callback) { afterCallbackList.push(callback); } function onError(callback) { onErrorCallbackList.push(callback); } triggerSubscriptions(actionSubscriptions, { args, name: wrappedAction[ACTION_NAME], store, after, onError }); let ret; try { ret = fn2.apply(this && this.$id === $id ? this : store, args); } catch (error) { triggerSubscriptions(onErrorCallbackList, error); throw error; } if (ret instanceof Promise) { return ret.then((value) => { triggerSubscriptions(afterCallbackList, value); return value; }).catch((error) => { triggerSubscriptions(onErrorCallbackList, error); return Promise.reject(error); }); } triggerSubscriptions(afterCallbackList, ret); return ret; }; wrappedAction[ACTION_MARKER] = true; wrappedAction[ACTION_NAME] = name; return wrappedAction; }; const partialStore = { _p: pinia, // _s: scope, $id, $onAction: addSubscription.bind(null, actionSubscriptions), $patch, $reset, $subscribe(callback, options2 = {}) { const removeSubscription = addSubscription(subscriptions, callback, options2.detached, () => stopWatcher()); const stopWatcher = scope.run(() => vue.watch(() => pinia.state.value[$id], (state) => { if (options2.flush === "sync" ? isSyncListening : isListening) { callback({ storeId: $id, type: MutationType.direct, events: debuggerEvents }, state); } }, assign({}, $subscribeOptions, options2))); return removeSubscription; }, $dispose }; const store = vue.reactive(partialStore); pinia._s.set($id, store); const runWithContext = pinia._a && pinia._a.runWithContext || fallbackRunWithContext; const setupStore = runWithContext(() => pinia._e.run(() => (scope = vue.effectScope()).run(() => setup({ action })))); for (const key in setupStore) { const prop = setupStore[key]; if (vue.isRef(prop) && !isComputed(prop) || vue.isReactive(prop)) { if (!isOptionsStore) { if (initialState && shouldHydrate(prop)) { if (vue.isRef(prop)) { prop.value = initialState[key]; } else { mergeReactiveObjects(prop, initialState[key]); } } pinia.state.value[$id][key] = prop; } } else if (typeof prop === "function") { const actionValue = action(prop, key); setupStore[key] = actionValue; optionsForPlugin.actions[key] = prop; } else ; } assign(store, setupStore); assign(vue.toRaw(store), setupStore); Object.defineProperty(store, "$state", { get: () => pinia.state.value[$id], set: (state) => { $patch(($state) => { assign($state, state); }); } }); pinia._p.forEach((extender) => { { assign(store, scope.run(() => extender({ store, app: pinia._a, pinia, options: optionsForPlugin }))); } }); if (initialState && isOptionsStore && options.hydrate) { options.hydrate(store.$state, initialState); } isListening = true; isSyncListening = true; return store; } /*! #__NO_SIDE_EFFECTS__ */ // @__NO_SIDE_EFFECTS__ function defineStore(id, setup, setupOptions) { let options; const isSetupStore = typeof setup === "function"; options = isSetupStore ? setupOptions : setup; function useStore2(pinia, hot) { const hasContext = vue.hasInjectionContext(); pinia = // in test mode, ignore the argument provided as we can always retrieve a // pinia instance with getActivePinia() pinia || (hasContext ? vue.inject(piniaSymbol, null) : null); if (pinia) setActivePinia(pinia); pinia = activePinia; if (!pinia._s.has(id)) { if (isSetupStore) { createSetupStore(id, setup, options, pinia); } else { createOptionsStore(id, options, pinia); } } const store = pinia._s.get(id); return store; } useStore2.$id = id; return useStore2; } 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 m2 = (modifier) => modifier ? _bem(namespace.value, block, "", "", modifier) : ""; const be2 = (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: m2, be: be2, em, bm, bem, is, cssVar, cssVarName, cssVarBlock, cssVarBlockName }; }; /** * @vue/shared v3.5.13 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/ const NOOP = () => { }; const hasOwnProperty$c = Object.prototype.hasOwnProperty; const hasOwn = (val, key) => hasOwnProperty$c.call(val, key); const isArray$1 = Array.isArray; const isFunction$1 = (val) => typeof val === "function"; const isString$1 = (val) => typeof val === "string"; const isObject$2 = (val) => val !== null && typeof val === "object"; 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$b = 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$b.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$1 = "[object Symbol]"; function isSymbol(value) { return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag$1; } 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 symbolProto$1 = Symbol$1 ? Symbol$1.prototype : void 0, symbolToString = symbolProto$1 ? symbolProto$1.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 ? "-0" : result; } var reWhitespace = /\s/; function trimmedEndIndex(string) { var index = string.length; while (index-- && reWhitespace.test(string.charAt(index))) { } return index; } var reTrimStart = /^\s+/; function baseTrim(string) { return string ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, "") : string; } function isObject$1(value) { var type = typeof value; return value != null && (type == "object" || type == "function"); } var NAN = 0 / 0; var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; var reIsBinary = /^0b[01]+$/i; var reIsOctal = /^0o[0-7]+$/i; var freeParseInt = parseInt; function toNumber(value) { if (typeof value == "number") { return value; } if (isSymbol(value)) { return NAN; } if (isObject$1(value)) { var other = typeof value.valueOf == "function" ? value.valueOf() : value; value = isObject$1(other) ? other + "" : other; } if (typeof value != "string") { return value === 0 ? value : +value; } value = baseTrim(value); var isBinary = reIsBinary.test(value); return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value; } function identity$1(value) { return value; } var asyncTag = "[object AsyncFunction]", funcTag$1 = "[object Function]", genTag = "[object GeneratorFunction]", proxyTag = "[object Proxy]"; function isFunction(value) { if (!isObject$1(value)) { return false; } var tag = baseGetTag(value); return tag == funcTag$1 || tag == genTag || 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$2 = Function.prototype; var funcToString$2 = funcProto$2.toString; function toSource(func) { if (func != null) { try { return funcToString$2.call(func); } catch (e) { } try { return func + ""; } catch (e) { } } return ""; } var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; var reIsHostCtor = /^\[object .+?Constructor\]$/; var funcProto$1 = Function.prototype, objectProto$c = Object.prototype; var funcToString$1 = funcProto$1.toString; var hasOwnProperty$a = objectProto$c.hasOwnProperty; var reIsNative = RegExp( "^" + funcToString$1.call(hasOwnProperty$a).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" ); function baseIsNative(value) { if (!isObject$1(value) || isMasked(value)) { return false; } var pattern = isFunction(value) ? reIsNative : reIsHostCtor; return pattern.test(toSource(value)); } function getValue(object, key) { return object == null ? void 0 : object[key]; } function getNative(object, key) { var value = getValue(object, key); return baseIsNative(value) ? value : void 0; } var WeakMap$1 = getNative(root, "WeakMap"); var objectCreate = Object.create; var baseCreate = /* @__PURE__ */ function() { function object() { } return function(proto) { if (!isObject$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$1 : function(func, string) { return defineProperty(func, "toString", { "configurable": true, "enumerable": false, "value": constant(string), "writable": true }); }; var setToString = shortOut(baseSetToString); 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$9 = objectProto$b.hasOwnProperty; function assignValue(object, key, value) { var objValue = object[key]; if (!(hasOwnProperty$9.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$1 = Math.max; function overRest(func, start, transform) { start = nativeMax$1(start === void 0 ? func.length - 1 : start, 0); return function() { var args = arguments, index = -1, length = nativeMax$1(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); }; } function baseRest(func, start) { return setToString(overRest(func, start, identity$1), func + ""); } var MAX_SAFE_INTEGER = 9007199254740991; function isLength(value) { return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; } function isArrayLike(value) { return value != null && isLength(value.length) && !isFunction(value); } function isIterateeCall(value, index, object) { if (!isObject$1(object)) { return false; } var type = typeof index; if (type == "number" ? isArrayLike(object) && isIndex(index, object.length) : type == "string" && index in object) { return eq(object[index], value); } return false; } function createAssigner(assigner) { return baseRest(function(object, sources) { var index = -1, length = sources.length, customizer = length > 1 ? sources[length - 1] : void 0, guard = length > 2 ? sources[2] : void 0; customizer = assigner.length > 3 && typeof customizer == "function" ? (length--, customizer) : void 0; if (guard && isIterateeCall(sources[0], sources[1], guard)) { customizer = length < 3 ? void 0 : customizer; length = 1; } object = Object(object); while (++index < length) { var source = sources[index]; if (source) { assigner(object, source, index, customizer); } } return object; }); } 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$2 = "[object Arguments]"; function baseIsArguments(value) { return isObjectLike(value) && baseGetTag(value) == argsTag$2; } var objectProto$9 = Object.prototype; var hasOwnProperty$8 = objectProto$9.hasOwnProperty; var propertyIsEnumerable$1 = objectProto$9.propertyIsEnumerable; var isArguments = baseIsArguments(/* @__PURE__ */ function() { return arguments; }()) ? baseIsArguments : function(value) { return isObjectLike(value) && hasOwnProperty$8.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$1 = "[object Arguments]", arrayTag$1 = "[object Array]", boolTag$1 = "[object Boolean]", dateTag$1 = "[object Date]", errorTag$1 = "[object Error]", funcTag = "[object Function]", mapTag$2 = "[object Map]", numberTag$1 = "[object Number]", objectTag$3 = "[object Object]", regexpTag$1 = "[object RegExp]", setTag$2 = "[object Set]", stringTag$1 = "[object String]", weakMapTag$1 = "[object WeakMap]"; var arrayBufferTag$1 = "[object ArrayBuffer]", dataViewTag$2 = "[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 typedArrayTags = {}; typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true; typedArrayTags[argsTag$1] = typedArrayTags[arrayTag$1] = typedArrayTags[arrayBufferTag$1] = typedArrayTags[boolTag$1] = typedArrayTags[dataViewTag$2] = typedArrayTags[dateTag$1] = typedArrayTags[errorTag$1] = typedArrayTags[funcTag] = typedArrayTags[mapTag$2] = typedArrayTags[numberTag$1] = typedArrayTags[objectTag$3] = typedArrayTags[regexpTag$1] = typedArrayTags[setTag$2] = typedArrayTags[stringTag$1] = typedArrayTags[weakMapTag$1] = 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 types = freeModule$1 && freeModule$1.require && freeModule$1.require("util").types; if (types) { return types; } 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$7 = 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$7.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$6 = objectProto$7.hasOwnProperty; function baseKeys(object) { if (!isPrototype(object)) { return nativeKeys(object); } var result = []; for (var key in Object(object)) { if (hasOwnProperty$6.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$5 = 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$5.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$4 = 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$4.call(data, key) ? data[key] : void 0; } var objectProto$4 = Object.prototype; var hasOwnProperty$3 = objectProto$4.hasOwnProperty; function hashHas(key) { var data = this.__data__; return nativeCreate ? data[key] !== void 0 : hasOwnProperty$3.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(map2, key) { var data = map2.__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$1 = "Expected a function"; function memoize(func, resolver) { if (typeof func != "function" || resolver != null && typeof resolver != "function") { throw new TypeError(FUNC_ERROR_TEXT$1); } var memoized = function() { var args = arguments, 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(string) { var result = []; if (string.charCodeAt(0) === 46) { result.push(""); } string.replace(rePropName, function(match, number, quote, subString) { result.push(quote ? subString.replace(reEscapeChar, "$1") : number || match); }); return result; }); function toString$1(value) { return value == null ? "" : baseToString(value); } function castPath(value, object) { if (isArray(value)) { return value; } return isKey(value, object) ? [value] : stringToPath(toString$1(value)); } 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); var objectTag$2 = "[object Object]"; var funcProto = Function.prototype, objectProto$3 = Object.prototype; var funcToString = funcProto.toString; var hasOwnProperty$2 = objectProto$3.hasOwnProperty; var objectCtorString = funcToString.call(Object); function isPlainObject(value) { if (!isObjectLike(value) || baseGetTag(value) != objectTag$2) { return false; } var proto = getPrototype(value); if (proto === null) { return true; } var Ctor = hasOwnProperty$2.call(proto, "constructor") && proto.constructor; return typeof Ctor == "function" && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString; } 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; 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; Buffer2 ? Buffer2.allocUnsafe : void 0; function cloneBuffer(buffer, isDeep) { { return buffer.slice(); } } 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$2 = Object.prototype; var propertyIsEnumerable = objectProto$2.propertyIsEnumerable; var nativeGetSymbols = Object.getOwnPropertySymbols; var getSymbols = !nativeGetSymbols ? stubArray : function(object) { if (object == null) { return []; } object = Object(object); return arrayFilter(nativeGetSymbols(object), function(symbol) { return propertyIsEnumerable.call(object, symbol); }); }; 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$1 = "[object Map]", objectTag$1 = "[object Object]", promiseTag = "[object Promise]", setTag$1 = "[object Set]", weakMapTag = "[object WeakMap]"; var dataViewTag$1 = "[object DataView]"; var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map$1), promiseCtorString = toSource(Promise$1), setCtorString = toSource(Set$1), weakMapCtorString = toSource(WeakMap$1); var getTag = baseGetTag; if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag$1 || Map$1 && getTag(new Map$1()) != mapTag$1 || Promise$1 && getTag(Promise$1.resolve()) != promiseTag || Set$1 && getTag(new Set$1()) != setTag$1 || WeakMap$1 && getTag(new WeakMap$1()) != weakMapTag) { getTag = function(value) { var result = baseGetTag(value), Ctor = result == objectTag$1 ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : ""; if (ctorString) { switch (ctorString) { case dataViewCtorString: return dataViewTag$1; case mapCtorString: return mapTag$1; case promiseCtorString: return promiseTag; case setCtorString: return setTag$1; case weakMapCtorString: return weakMapTag; } } return result; }; } var Uint8Array2 = root.Uint8Array; function cloneArrayBuffer(arrayBuffer) { var result = new arrayBuffer.constructor(arrayBuffer.byteLength); new Uint8Array2(result).set(new Uint8Array2(arrayBuffer)); return result; } function cloneTypedArray(typedArray, isDeep) { var buffer = cloneArrayBuffer(typedArray.buffer); return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); } function initCloneObject(object) { return typeof object.constructor == "function" && !isPrototype(object) ? baseCreate(getPrototype(object)) : {}; } 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$5 = 1, COMPARE_UNORDERED_FLAG$3 = 2; function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { var isPartial = bitmask & COMPARE_PARTIAL_FLAG$5, 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$3 ? 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(map2) { var index = -1, result = Array(map2.size); map2.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$4 = 1, COMPARE_UNORDERED_FLAG$2 = 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 Uint8Array2(object), new Uint8Array2(other))) { return false; } return true; case boolTag: case dateTag: case numberTag: return eq(+object, +other); case errorTag: return object.name == other.name && object.message == other.message; case regexpTag: case stringTag: return object == other + ""; case mapTag: var convert = mapToArray; case setTag: var isPartial = bitmask & COMPARE_PARTIAL_FLAG$4; 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$2; 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$3 = 1; var objectProto$1 = Object.prototype; var hasOwnProperty$1 = objectProto$1.hasOwnProperty; function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { var isPartial = bitmask & COMPARE_PARTIAL_FLAG$3, objProps = getAllKeys(object), objLength = objProps.length, othProps = getAllKeys(other), othLength = othProps.length; if (objLength != othLength && !isPartial) { return false; } var index = objLength; while (index--) { var key = objProps[index]; if (!(isPartial ? key in other : hasOwnProperty$1.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$2 = 1; var argsTag = "[object Arguments]", arrayTag = "[object Array]", objectTag = "[object Object]"; var objectProto = Object.prototype; var hasOwnProperty = 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$2)) { var objIsWrapped = objIsObj && hasOwnProperty.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty.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); } var COMPARE_PARTIAL_FLAG$1 = 1, COMPARE_UNORDERED_FLAG$1 = 2; function baseIsMatch(object, source, matchData, customizer) { var index = matchData.length, length = index; if (object == null) { return !length; } object = Object(object); while (index--) { var data = matchData[index]; if (data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) { return false; } } while (++index < length) { data = matchData[index]; var key = data[0], objValue = object[key], srcValue = data[1]; if (data[2]) { if (objValue === void 0 && !(key in object)) { return false; } } else { var stack = new Stack(); var result; if (!(result === void 0 ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG$1 | COMPARE_UNORDERED_FLAG$1, customizer, stack) : result)) { return false; } } } return true; } function isStrictComparable(value) { return value === value && !isObject$1(value); } function getMatchData(object) { var result = keys(object), length = result.length; while (length--) { var key = result[length], value = object[key]; result[length] = [key, value, isStrictComparable(value)]; } return result; } function matchesStrictComparable(key, srcValue) { return function(object) { if (object == null) { return false; } return object[key] === srcValue && (srcValue !== void 0 || key in Object(object)); }; } function baseMatches(source) { var matchData = getMatchData(source); if (matchData.length == 1 && matchData[0][2]) { return matchesStrictComparable(matchData[0][0], matchData[0][1]); } return function(object) { return object === source || baseIsMatch(object, source, matchData); }; } function baseHasIn(object, 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); } var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2; function baseMatchesProperty(path, srcValue) { if (isKey(path) && isStrictComparable(srcValue)) { return matchesStrictComparable(toKey(path), srcValue); } return function(object) { var objValue = get(object, path); return objValue === void 0 && objValue === srcValue ? hasIn(object, path) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG); }; } function baseProperty(key) { return function(object) { return object == null ? void 0 : object[key]; }; } function basePropertyDeep(path) { return function(object) { return baseGet(object, path); }; } function property(path) { return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path); } function baseIteratee(value) { if (typeof value == "function") { return value; } if (value == null) { return identity$1; } if (typeof value == "object") { return isArray(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value); } return property(value); } function createBaseFor(fromRight) { return function(object, iteratee, keysFunc) { var index = -1, iterable = Object(object), props = keysFunc(object), length = props.length; while (length--) { var key = props[++index]; if (iteratee(iterable[key], key, iterable) === false) { break; } } return object; }; } var baseFor = createBaseFor(); function baseForOwn(object, iteratee) { return object && baseFor(object, iteratee, keys); } function createBaseEach(eachFunc, fromRight) { return function(collection, iteratee) { if (collection == null) { return collection; } if (!isArrayLike(collection)) { return eachFunc(collection, iteratee); } var length = collection.length, index = -1, iterable = Object(collection); while (++index < length) { if (iteratee(iterable[index], index, iterable) === false) { break; } } return collection; }; } var baseEach = createBaseEach(baseForOwn); var now = function() { return root.Date.now(); }; var FUNC_ERROR_TEXT = "Expected a function"; var nativeMax = Math.max, nativeMin = Math.min; function debounce(func, wait, options) { var lastArgs, lastThis, maxWait, result, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true; if (typeof func != "function") { throw new TypeError(FUNC_ERROR_TEXT); } wait = toNumber(wait) || 0; if (isObject$1(options)) { leading = !!options.leading; maxing = "maxWait" in options; maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait; trailing = "trailing" in options ? !!options.trailing : trailing; } function invokeFunc(time) { var args = lastArgs, thisArg = lastThis; lastArgs = lastThis = void 0; lastInvokeTime = time; result = func.apply(thisArg, args); return result; } function leadingEdge(time) { lastInvokeTime = time; timerId = setTimeout(timerExpired, wait); return leading ? invokeFunc(time) : result; } function remainingWait(time) { var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime, timeWaiting = wait - timeSinceLastCall; return maxing ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting; } function shouldInvoke(time) { var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime; return lastCallTime === void 0 || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait; } function timerExpired() { var time = now(); if (shouldInvoke(time)) { return trailingEdge(time); } timerId = setTimeout(timerExpired, remainingWait(time)); } function trailingEdge(time) { timerId = void 0; if (trailing && lastArgs) { return invokeFunc(time); } lastArgs = lastThis = void 0; return result; } function cancel() { if (timerId !== void 0) { clearTimeout(timerId); } lastInvokeTime = 0; lastArgs = lastCallTime = lastThis = timerId = void 0; } function flush() { return timerId === void 0 ? result : trailingEdge(now()); } function debounced() { var time = now(), isInvoking = shouldInvoke(time); lastArgs = arguments; lastThis = this; lastCallTime = time; if (isInvoking) { if (timerId === void 0) { return leadingEdge(lastCallTime); } if (maxing) { clearTimeout(timerId); timerId = setTimeout(timerExpired, wait); return invokeFunc(lastCallTime); } } if (timerId === void 0) { timerId = setTimeout(timerExpired, wait); } return result; } debounced.cancel = cancel; debounced.flush = flush; return debounced; } function assignMergeValue(object, key, value) { if (value !== void 0 && !eq(object[key], value) || value === void 0 && !(key in object)) { baseAssignValue(object, key, value); } } function isArrayLikeObject(value) { return isObjectLike(value) && isArrayLike(value); } function safeGet(object, key) { if (key === "constructor" && typeof object[key] === "function") { return; } if (key == "__proto__") { return; } return object[key]; } function toPlainObject(value) { return copyObject(value, keysIn(value)); } function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { var objValue = safeGet(object, key), srcValue = safeGet(source, key), stacked = stack.get(srcValue); if (stacked) { assignMergeValue(object, key, stacked); return; } var newValue = customizer ? customizer(objValue, srcValue, key + "", object, source, stack) : void 0; var isCommon = newValue === void 0; if (isCommon) { var isArr = isArray(srcValue), isBuff = !isArr && isBuffer(srcValue), isTyped = !isArr && !isBuff && isTypedArray(srcValue); newValue = srcValue; if (isArr || isBuff || isTyped) { if (isArray(objValue)) { newValue = objValue; } else if (isArrayLikeObject(objValue)) { newValue = copyArray(objValue); } else if (isBuff) { isCommon = false; newValue = cloneBuffer(srcValue); } else if (isTyped) { isCommon = false; newValue = cloneTypedArray(srcValue); } else { newValue = []; } } else if (isPlainObject(srcValue) || isArguments(srcValue)) { newValue = objValue; if (isArguments(objValue)) { newValue = toPlainObject(objValue); } else if (!isObject$1(objValue) || isFunction(objValue)) { newValue = initCloneObject(srcValue); } } else { isCommon = false; } } if (isCommon) { stack.set(srcValue, newValue); mergeFunc(newValue, srcValue, srcIndex, customizer, stack); stack["delete"](srcValue); } assignMergeValue(object, key, newValue); } function baseMerge(object, source, srcIndex, customizer, stack) { if (object === source) { return; } baseFor(source, function(srcValue, key) { stack || (stack = new Stack()); if (isObject$1(srcValue)) { baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); } else { var newValue = customizer ? customizer(safeGet(object, key), srcValue, key + "", object, source, stack) : void 0; if (newValue === void 0) { newValue = srcValue; } assignMergeValue(object, key, newValue); } }, keysIn); } function baseMap(collection, iteratee) { var index = -1, result = isArrayLike(collection) ? Array(collection.length) : []; baseEach(collection, function(value, key, collection2) { result[++index] = iteratee(value, key, collection2); }); return result; } function map(collection, iteratee) { var func = isArray(collection) ? arrayMap : baseMap; return func(collection, baseIteratee(iteratee)); } function flatMap(collection, iteratee) { return baseFlatten(map(collection, iteratee)); } 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 isNull(value) { return value === null; } function isUndefined$1(value) { return value === void 0; } var merge = createAssigner(function(object, source, srcIndex) { baseMerge(object, source, srcIndex); }); 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 = (val) => val === void 0; const isBoolean = (val) => typeof val === "boolean"; const isNumber = (val) => typeof val === "number"; const isElement = (e) => { if (typeof Element === "undefined") return false; return e instanceof Element; }; const isPropAbsent = (prop) => isNil(prop); const isStringNumber = (val) => { if (!isString$1(val)) { return false; } return !Number.isNaN(Number(val)); }; var __defProp$9 = Object.defineProperty; var __defProps$6 = Object.defineProperties; var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors; var __getOwnPropSymbols$b = Object.getOwnPropertySymbols; var __hasOwnProp$b = Object.prototype.hasOwnProperty; var __propIsEnum$b = Object.prototype.propertyIsEnumerable; var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; var __spreadValues$9 = (a2, b2) => { for (var prop in b2 || (b2 = {})) if (__hasOwnProp$b.call(b2, prop)) __defNormalProp$9(a2, prop, b2[prop]); if (__getOwnPropSymbols$b) for (var prop of __getOwnPropSymbols$b(b2)) { if (__propIsEnum$b.call(b2, prop)) __defNormalProp$9(a2, prop, b2[prop]); } return a2; }; var __spreadProps$6 = (a2, b2) => __defProps$6(a2, __getOwnPropDescs$6(b2)); function computedEager(fn2, options) { var _a2; const result = vue.shallowRef(); vue.watchEffect(() => { result.value = fn2(); }, __spreadProps$6(__spreadValues$9({}, options), { flush: (_a2 = void 0) != null ? _a2 : "sync" })); return vue.readonly(result); } var _a; const isClient$1 = typeof window !== "undefined"; const isString = (val) => typeof val === "string"; const noop$1 = () => { }; const isIOS = isClient$1 && ((_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 identity(arg) { return arg; } function tryOnScopeDispose$1(fn2) { if (vue.getCurrentScope()) { vue.onScopeDispose(fn2); return true; } return false; } function tryOnMounted$1(fn2, sync = true) { if (vue.getCurrentInstance()) vue.onMounted(fn2); else if (sync) fn2(); else vue.nextTick(fn2); } function unrefElement$1(elRef) { var _a2; const plain = resolveUnref(elRef); return (_a2 = plain == null ? void 0 : plain.$el) != null ? _a2 : plain; } const defaultWindow$1 = isClient$1 ? window : void 0; function useEventListener$1(...args) { let target; let events; let listeners; let options; if (isString(args[0]) || Array.isArray(args[0])) { [events, listeners, options] = args; target = defaultWindow$1; } else { [target, events, listeners, options] = args; } if (!target) return noop$1; if (!Array.isArray(events)) events = [events]; if (!Array.isArray(listeners)) listeners = [listeners]; const cleanups = []; const cleanup = () => { cleanups.forEach((fn2) => fn2()); 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$1(target), resolveUnref(options)], ([el, options2]) => { cleanup(); if (!el) return; cleanups.push(...events.flatMap((event) => { return listeners.map((listener) => register(el, event, listener, options2)); })); }, { immediate: true, flush: "post" }); const stop = () => { stopWatch(); cleanup(); }; tryOnScopeDispose$1(stop); return stop; } let _iOSWorkaround = false; function onClickOutside(target, handler, options = {}) { const { window: window2 = defaultWindow$1, ignore = [], capture = true, detectIframe = false } = options; if (!window2) return; if (isIOS && !_iOSWorkaround) { _iOSWorkaround = true; Array.from(window2.document.body.children).forEach((el) => el.addEventListener("click", noop$1)); } let shouldListen = true; const shouldIgnore = (event) => { return ignore.some((target2) => { if (typeof target2 === "string") { return Array.from(window2.document.querySelectorAll(target2)).some((el) => el === event.target || event.composedPath().includes(el)); } else { const el = unrefElement$1(target2); return el && (event.target === el || event.composedPath().includes(el)); } }); }; const listener = (event) => { const el = unrefElement$1(target); if (!el || el === event.target || event.composedPath().includes(el)) return; if (event.detail === 0) shouldListen = !shouldIgnore(event); if (!shouldListen) { shouldListen = true; return; } handler(event); }; const cleanup = [ useEventListener$1(window2, "click", listener, { passive: true, capture }), useEventListener$1(window2, "pointerdown", (e) => { const el = unrefElement$1(target); if (el) shouldListen = !e.composedPath().includes(el) && !shouldIgnore(e); }, { passive: true }), detectIframe && useEventListener$1(window2, "blur", (event) => { var _a2; const el = unrefElement$1(target); if (((_a2 = window2.document.activeElement) == null ? void 0 : _a2.tagName) === "IFRAME" && !(el == null ? void 0 : el.contains(window2.document.activeElement))) handler(event); }) ].filter(Boolean); const stop = () => cleanup.forEach((fn2) => fn2()); return stop; } function useSupported$1(callback, sync = false) { const isSupported = vue.ref(); const update = () => isSupported.value = Boolean(callback()); update(); tryOnMounted$1(update, sync); return isSupported; } const _global$1 = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {}; const globalKey$1 = "__vueuse_ssr_handlers__"; _global$1[globalKey$1] = _global$1[globalKey$1] || {}; 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$1(target, callback, options = {}) { const _a2 = options, { window: window2 = defaultWindow$1 } = _a2, observerOptions = __objRest$2(_a2, ["window"]); let observer; const isSupported = useSupported$1(() => window2 && "ResizeObserver" in window2); const cleanup = () => { if (observer) { observer.disconnect(); observer = void 0; } }; const stopWatch = vue.watch(() => unrefElement$1(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$1(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 = (a2, b2) => { for (var prop in b2 || (b2 = {})) if (__hasOwnProp.call(b2, prop)) __defNormalProp(a2, prop, b2[prop]); if (__getOwnPropSymbols) for (var prop of __getOwnPropSymbols(b2)) { if (__propIsEnum.call(b2, prop)) __defNormalProp(a2, prop, b2[prop]); } return a2; }; 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 }, _TransitionPresets); class ElementPlusError extends Error { constructor(m2) { super(m2); this.name = "ElementPlusError"; } } function throwError(scope, m2) { throw new ElementPlusError(`[${scope}] ${m2}`); } function debugWarn(scope, message) { } 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(zIndexFromInjection) ? zIndexFromInjection : defaultInitialZIndex; }); const currentZIndex = vue.computed(() => initialZIndex.value + zIndex.value); const nextZIndex = () => { increasingInjection.current++; zIndex.value = increasingInjection.current; return currentZIndex.value; }; if (!isClient$1 && !vue.inject(ZINDEX_INJECTION_KEY)) ; return { initialZIndex, currentZIndex, nextZIndex }; }; 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.", alphaLabel: "pick alpha value" }, 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" }, mention: { loading: "Loading" }, 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, (_2, 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)); }; 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 componentSizes = ["", "default", "small", "large"]; 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) || ""; }); }; const getProp = (obj, path, defaultValue) => { return { get value() { return get(obj, path, defaultValue); }, set value(val) { set(obj, path, val); } }; }; const UPDATE_MODEL_EVENT = "update:modelValue"; var _export_sfc$1 = (sfc, props) => { const target = sfc.__vccOpts || sfc; for (const [key, val] of props) { target[key] = val; } return target; }; const rAF = (fn2) => isClient$1 ? window.requestAnimationFrame(fn2) : setTimeout(fn2, 16); const classNameToArray = (cls = "") => cls.split(" ").filter((item) => !!item.trim()); const hasClass = (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 = (el, cls) => { if (!el || !cls.trim()) return; el.classList.add(...classNameToArray(cls)); }; const removeClass = (el, cls) => { if (!el || !cls.trim()) return; el.classList.remove(...classNameToArray(cls)); }; function addUnit(value, defaultUnit = "px") { if (!value) return ""; if (isNumber(value) || isStringNumber(value)) { return `${value}${defaultUnit}`; } else if (isString$1(value)) { return value; } } const withInstall = (main2, extra) => { main2.install = (app) => { for (const comp of [main2, ...Object.values(extra != null ? extra : {})]) { app.component(comp.name, comp); } }; if (extra) { for (const [key, comp] of Object.entries(extra)) { main2[key] = comp; } } return main2; }; const withNoopInstall = (component) => { component.install = NOOP; return component; }; const iconProps = buildProps({ size: { type: definePropType([Number, String]) }, color: { type: String } }); const __default__$c = vue.defineComponent({ name: "ElIcon", inheritAttrs: false }); const _sfc_main$l = /* @__PURE__ */ vue.defineComponent({ ...__default__$c, 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(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$l, [["__file", "icon.vue"]]); const ElIcon = withInstall(Icon); /*! Element Plus Icons Vue v2.3.1 */ var arrow_down_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ vue.defineComponent({ name: "ArrowDown", __name: "arrow-down", 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: "M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z" }) ])); } }); var arrow_down_default = arrow_down_vue_vue_type_script_setup_true_lang_default; var arrow_right_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ vue.defineComponent({ name: "ArrowRight", __name: "arrow-right", 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: "M340.864 149.312a30.592 30.592 0 0 0 0 42.752L652.736 512 340.864 831.872a30.592 30.592 0 0 0 0 42.752 29.12 29.12 0 0 0 41.728 0L714.24 534.336a32 32 0 0 0 0-44.672L382.592 149.376a29.12 29.12 0 0 0-41.728 0z" }) ])); } }); var arrow_right_default = arrow_right_vue_vue_type_script_setup_true_lang_default; var arrow_up_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ vue.defineComponent({ name: "ArrowUp", __name: "arrow-up", 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: "m488.832 344.32-339.84 356.672a32 32 0 0 0 0 44.16l.384.384a29.44 29.44 0 0 0 42.688 0l320-335.872 319.872 335.872a29.44 29.44 0 0 0 42.688 0l.384-.384a32 32 0 0 0 0-44.16L535.168 344.32a32 32 0 0 0-46.336 0" }) ])); } }); var arrow_up_default = arrow_up_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; const ariaProps = buildProps({ ariaLabel: String, ariaOrientation: { type: String, values: ["horizontal", "vertical", "undefined"] }, ariaControls: String }); const useAriaProps = (arias) => { return pick(ariaProps, arias); }; const formContextKey = Symbol("formContextKey"); const formItemContextKey = Symbol("formItemContextKey"); 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 = computedEager(() => vue.unref(deterministicId) || `${namespace.value}-id-${idInjection.prefix}-${idInjection.current++}`); return idRef; }; 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 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 useFormSize = (fallback, ignore = {}) => { const emptyRef = vue.ref(void 0); const size = ignore.prop ? emptyRef : useProp("size"); const globalConfig = 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) || globalConfig.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 GAP = 4; const BAR_MAP = { vertical: { offset: "offsetHeight", scroll: "scrollTop", scrollSize: "scrollHeight", size: "height", key: "vertical", axis: "Y", client: "clientY", direction: "top" }, horizontal: { offset: "offsetWidth", scroll: "scrollLeft", scrollSize: "scrollWidth", size: "width", key: "horizontal", axis: "X", client: "clientX", direction: "left" } }; const renderThumbStyle = ({ move, size, bar }) => ({ [bar.size]: size, transform: `translate${bar.axis}(${move}%)` }); const scrollbarContextKey = Symbol("scrollbarContextKey"); const thumbProps = buildProps({ vertical: Boolean, size: String, move: Number, ratio: { type: Number, required: true }, always: Boolean }); const COMPONENT_NAME$1 = "Thumb"; const _sfc_main$k = /* @__PURE__ */ vue.defineComponent({ __name: "thumb", props: thumbProps, setup(__props) { const props = __props; const scrollbar = vue.inject(scrollbarContextKey); const ns = useNamespace("scrollbar"); if (!scrollbar) throwError(COMPONENT_NAME$1, "can not inject scrollbar context"); const instance = vue.ref(); const thumb = vue.ref(); const thumbState = vue.ref({}); const visible = vue.ref(false); let cursorDown = false; let cursorLeave = false; let originalOnSelectStart = isClient$1 ? document.onselectstart : null; const bar = vue.computed(() => BAR_MAP[props.vertical ? "vertical" : "horizontal"]); const thumbStyle = vue.computed(() => renderThumbStyle({ size: props.size, move: props.move, bar: bar.value })); const offsetRatio = vue.computed(() => instance.value[bar.value.offset] ** 2 / scrollbar.wrapElement[bar.value.scrollSize] / props.ratio / thumb.value[bar.value.offset]); const clickThumbHandler = (e) => { var _a2; e.stopPropagation(); if (e.ctrlKey || [1, 2].includes(e.button)) return; (_a2 = window.getSelection()) == null ? void 0 : _a2.removeAllRanges(); startDrag(e); const el = e.currentTarget; if (!el) return; thumbState.value[bar.value.axis] = el[bar.value.offset] - (e[bar.value.client] - el.getBoundingClientRect()[bar.value.direction]); }; const clickTrackHandler = (e) => { if (!thumb.value || !instance.value || !scrollbar.wrapElement) return; const offset = Math.abs(e.target.getBoundingClientRect()[bar.value.direction] - e[bar.value.client]); const thumbHalf = thumb.value[bar.value.offset] / 2; const thumbPositionPercentage = (offset - thumbHalf) * 100 * offsetRatio.value / instance.value[bar.value.offset]; scrollbar.wrapElement[bar.value.scroll] = thumbPositionPercentage * scrollbar.wrapElement[bar.value.scrollSize] / 100; }; const startDrag = (e) => { e.stopImmediatePropagation(); cursorDown = true; document.addEventListener("mousemove", mouseMoveDocumentHandler); document.addEventListener("mouseup", mouseUpDocumentHandler); originalOnSelectStart = document.onselectstart; document.onselectstart = () => false; }; const mouseMoveDocumentHandler = (e) => { if (!instance.value || !thumb.value) return; if (cursorDown === false) return; const prevPage = thumbState.value[bar.value.axis]; if (!prevPage) return; const offset = (instance.value.getBoundingClientRect()[bar.value.direction] - e[bar.value.client]) * -1; const thumbClickPosition = thumb.value[bar.value.offset] - prevPage; const thumbPositionPercentage = (offset - thumbClickPosition) * 100 * offsetRatio.value / instance.value[bar.value.offset]; scrollbar.wrapElement[bar.value.scroll] = thumbPositionPercentage * scrollbar.wrapElement[bar.value.scrollSize] / 100; }; const mouseUpDocumentHandler = () => { cursorDown = false; thumbState.value[bar.value.axis] = 0; document.removeEventListener("mousemove", mouseMoveDocumentHandler); document.removeEventListener("mouseup", mouseUpDocumentHandler); restoreOnselectstart(); if (cursorLeave) visible.value = false; }; const mouseMoveScrollbarHandler = () => { cursorLeave = false; visible.value = !!props.size; }; const mouseLeaveScrollbarHandler = () => { cursorLeave = true; visible.value = cursorDown; }; vue.onBeforeUnmount(() => { restoreOnselectstart(); document.removeEventListener("mouseup", mouseUpDocumentHandler); }); const restoreOnselectstart = () => { if (document.onselectstart !== originalOnSelectStart) document.onselectstart = originalOnSelectStart; }; useEventListener$1(vue.toRef(scrollbar, "scrollbarElement"), "mousemove", mouseMoveScrollbarHandler); useEventListener$1(vue.toRef(scrollbar, "scrollbarElement"), "mouseleave", mouseLeaveScrollbarHandler); return (_ctx, _cache) => { return vue.openBlock(), vue.createBlock(vue.Transition, { name: vue.unref(ns).b("fade"), persisted: "" }, { default: vue.withCtx(() => [ vue.withDirectives(vue.createElementVNode("div", { ref_key: "instance", ref: instance, class: vue.normalizeClass([vue.unref(ns).e("bar"), vue.unref(ns).is(vue.unref(bar).key)]), onMousedown: clickTrackHandler }, [ vue.createElementVNode("div", { ref_key: "thumb", ref: thumb, class: vue.normalizeClass(vue.unref(ns).e("thumb")), style: vue.normalizeStyle(vue.unref(thumbStyle)), onMousedown: clickThumbHandler }, null, 38) ], 34), [ [vue.vShow, _ctx.always || visible.value] ]) ]), _: 1 }, 8, ["name"]); }; } }); var Thumb = /* @__PURE__ */ _export_sfc$1(_sfc_main$k, [["__file", "thumb.vue"]]); const barProps = buildProps({ always: { type: Boolean, default: true }, minSize: { type: Number, required: true } }); const _sfc_main$j = /* @__PURE__ */ vue.defineComponent({ __name: "bar", props: barProps, setup(__props, { expose }) { const props = __props; const scrollbar = vue.inject(scrollbarContextKey); const moveX = vue.ref(0); const moveY = vue.ref(0); const sizeWidth = vue.ref(""); const sizeHeight = vue.ref(""); const ratioY = vue.ref(1); const ratioX = vue.ref(1); const handleScroll = (wrap) => { if (wrap) { const offsetHeight = wrap.offsetHeight - GAP; const offsetWidth = wrap.offsetWidth - GAP; moveY.value = wrap.scrollTop * 100 / offsetHeight * ratioY.value; moveX.value = wrap.scrollLeft * 100 / offsetWidth * ratioX.value; } }; const update = () => { const wrap = scrollbar == null ? void 0 : scrollbar.wrapElement; if (!wrap) return; const offsetHeight = wrap.offsetHeight - GAP; const offsetWidth = wrap.offsetWidth - GAP; const originalHeight = offsetHeight ** 2 / wrap.scrollHeight; const originalWidth = offsetWidth ** 2 / wrap.scrollWidth; const height = Math.max(originalHeight, props.minSize); const width = Math.max(originalWidth, props.minSize); ratioY.value = originalHeight / (offsetHeight - originalHeight) / (height / (offsetHeight - height)); ratioX.value = originalWidth / (offsetWidth - originalWidth) / (width / (offsetWidth - width)); sizeHeight.value = height + GAP < offsetHeight ? `${height}px` : ""; sizeWidth.value = width + GAP < offsetWidth ? `${width}px` : ""; }; expose({ handleScroll, update }); return (_ctx, _cache) => { return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [ vue.createVNode(Thumb, { move: moveX.value, ratio: ratioX.value, size: sizeWidth.value, always: _ctx.always }, null, 8, ["move", "ratio", "size", "always"]), vue.createVNode(Thumb, { move: moveY.value, ratio: ratioY.value, size: sizeHeight.value, vertical: "", always: _ctx.always }, null, 8, ["move", "ratio", "size", "always"]) ], 64); }; } }); var Bar = /* @__PURE__ */ _export_sfc$1(_sfc_main$j, [["__file", "bar.vue"]]); const scrollbarProps = buildProps({ height: { type: [String, Number], default: "" }, maxHeight: { type: [String, Number], default: "" }, native: { type: Boolean, default: false }, wrapStyle: { type: definePropType([String, Object, Array]), default: "" }, wrapClass: { type: [String, Array], default: "" }, viewClass: { type: [String, Array], default: "" }, viewStyle: { type: [String, Array, Object], default: "" }, noresize: Boolean, tag: { type: String, default: "div" }, always: Boolean, minSize: { type: Number, default: 20 }, tabindex: { type: [String, Number], default: void 0 }, id: String, role: String, ...useAriaProps(["ariaLabel", "ariaOrientation"]) }); const scrollbarEmits = { scroll: ({ scrollTop, scrollLeft }) => [scrollTop, scrollLeft].every(isNumber) }; const COMPONENT_NAME = "ElScrollbar"; const __default__$b = vue.defineComponent({ name: COMPONENT_NAME }); const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({ ...__default__$b, props: scrollbarProps, emits: scrollbarEmits, setup(__props, { expose, emit }) { const props = __props; const ns = useNamespace("scrollbar"); let stopResizeObserver = void 0; let stopResizeListener = void 0; let wrapScrollTop = 0; let wrapScrollLeft = 0; const scrollbarRef = vue.ref(); const wrapRef = vue.ref(); const resizeRef = vue.ref(); const barRef = vue.ref(); const wrapStyle = vue.computed(() => { const style = {}; if (props.height) style.height = addUnit(props.height); if (props.maxHeight) style.maxHeight = addUnit(props.maxHeight); return [props.wrapStyle, style]; }); const wrapKls = vue.computed(() => { return [ props.wrapClass, ns.e("wrap"), { [ns.em("wrap", "hidden-default")]: !props.native } ]; }); const resizeKls = vue.computed(() => { return [ns.e("view"), props.viewClass]; }); const handleScroll = () => { var _a2; if (wrapRef.value) { (_a2 = barRef.value) == null ? void 0 : _a2.handleScroll(wrapRef.value); wrapScrollTop = wrapRef.value.scrollTop; wrapScrollLeft = wrapRef.value.scrollLeft; emit("scroll", { scrollTop: wrapRef.value.scrollTop, scrollLeft: wrapRef.value.scrollLeft }); } }; function scrollTo(arg1, arg2) { if (isObject$2(arg1)) { wrapRef.value.scrollTo(arg1); } else if (isNumber(arg1) && isNumber(arg2)) { wrapRef.value.scrollTo(arg1, arg2); } } const setScrollTop = (value) => { if (!isNumber(value)) { return; } wrapRef.value.scrollTop = value; }; const setScrollLeft = (value) => { if (!isNumber(value)) { return; } wrapRef.value.scrollLeft = value; }; const update = () => { var _a2; (_a2 = barRef.value) == null ? void 0 : _a2.update(); }; vue.watch(() => props.noresize, (noresize) => { if (noresize) { stopResizeObserver == null ? void 0 : stopResizeObserver(); stopResizeListener == null ? void 0 : stopResizeListener(); } else { ({ stop: stopResizeObserver } = useResizeObserver$1(resizeRef, update)); stopResizeListener = useEventListener$1("resize", update); } }, { immediate: true }); vue.watch(() => [props.maxHeight, props.height], () => { if (!props.native) vue.nextTick(() => { var _a2; update(); if (wrapRef.value) { (_a2 = barRef.value) == null ? void 0 : _a2.handleScroll(wrapRef.value); } }); }); vue.provide(scrollbarContextKey, vue.reactive({ scrollbarElement: scrollbarRef, wrapElement: wrapRef })); vue.onActivated(() => { if (wrapRef.value) { wrapRef.value.scrollTop = wrapScrollTop; wrapRef.value.scrollLeft = wrapScrollLeft; } }); vue.onMounted(() => { if (!props.native) vue.nextTick(() => { update(); }); }); vue.onUpdated(() => update()); expose({ wrapRef, update, scrollTo, setScrollTop, setScrollLeft, handleScroll }); return (_ctx, _cache) => { return vue.openBlock(), vue.createElementBlock("div", { ref_key: "scrollbarRef", ref: scrollbarRef, class: vue.normalizeClass(vue.unref(ns).b()) }, [ vue.createElementVNode("div", { ref_key: "wrapRef", ref: wrapRef, class: vue.normalizeClass(vue.unref(wrapKls)), style: vue.normalizeStyle(vue.unref(wrapStyle)), tabindex: _ctx.tabindex, onScroll: handleScroll }, [ (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.tag), { id: _ctx.id, ref_key: "resizeRef", ref: resizeRef, class: vue.normalizeClass(vue.unref(resizeKls)), style: vue.normalizeStyle(_ctx.viewStyle), role: _ctx.role, "aria-label": _ctx.ariaLabel, "aria-orientation": _ctx.ariaOrientation }, { default: vue.withCtx(() => [ vue.renderSlot(_ctx.$slots, "default") ]), _: 3 }, 8, ["id", "class", "style", "role", "aria-label", "aria-orientation"])) ], 46, ["tabindex"]), !_ctx.native ? (vue.openBlock(), vue.createBlock(Bar, { key: 0, ref_key: "barRef", ref: barRef, always: _ctx.always, "min-size": _ctx.minSize }, null, 8, ["always", "min-size"])) : vue.createCommentVNode("v-if", true) ], 2); }; } }); var Scrollbar = /* @__PURE__ */ _export_sfc$1(_sfc_main$i, [["__file", "scrollbar.vue"]]); const ElScrollbar = withInstall(Scrollbar); const POPPER_INJECTION_KEY = Symbol("popper"); const POPPER_CONTENT_INJECTION_KEY = Symbol("popperContent"); const roleTypes = [ "dialog", "grid", "group", "listbox", "menu", "navigation", "tooltip", "tree" ]; const popperProps = buildProps({ role: { type: String, values: roleTypes, default: "tooltip" } }); const __default__$a = vue.defineComponent({ name: "ElPopper", inheritAttrs: false }); const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({ ...__default__$a, props: popperProps, setup(__props, { expose }) { const props = __props; const triggerRef = vue.ref(); const popperInstanceRef = vue.ref(); const contentRef = vue.ref(); const referenceRef = vue.ref(); const role = vue.computed(() => props.role); const popperProvides = { triggerRef, popperInstanceRef, contentRef, referenceRef, role }; expose(popperProvides); vue.provide(POPPER_INJECTION_KEY, popperProvides); return (_ctx, _cache) => { return vue.renderSlot(_ctx.$slots, "default"); }; } }); var Popper = /* @__PURE__ */ _export_sfc$1(_sfc_main$h, [["__file", "popper.vue"]]); const popperArrowProps = buildProps({ arrowOffset: { type: Number, default: 5 } }); const __default__$9 = vue.defineComponent({ name: "ElPopperArrow", inheritAttrs: false }); const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({ ...__default__$9, props: popperArrowProps, setup(__props, { expose }) { const props = __props; const ns = useNamespace("popper"); const { arrowOffset, arrowRef, arrowStyle } = vue.inject(POPPER_CONTENT_INJECTION_KEY, void 0); vue.watch(() => props.arrowOffset, (val) => { arrowOffset.value = val; }); vue.onBeforeUnmount(() => { arrowRef.value = void 0; }); expose({ arrowRef }); return (_ctx, _cache) => { return vue.openBlock(), vue.createElementBlock("span", { ref_key: "arrowRef", ref: arrowRef, class: vue.normalizeClass(vue.unref(ns).e("arrow")), style: vue.normalizeStyle(vue.unref(arrowStyle)), "data-popper-arrow": "" }, null, 6); }; } }); var ElPopperArrow = /* @__PURE__ */ _export_sfc$1(_sfc_main$g, [["__file", "arrow.vue"]]); const popperTriggerProps = buildProps({ virtualRef: { type: definePropType(Object) }, virtualTriggering: Boolean, onMouseenter: { type: definePropType(Function) }, onMouseleave: { type: definePropType(Function) }, onClick: { type: definePropType(Function) }, onKeydown: { type: definePropType(Function) }, onFocus: { type: definePropType(Function) }, onBlur: { type: definePropType(Function) }, onContextmenu: { type: definePropType(Function) }, id: String, open: Boolean }); const FORWARD_REF_INJECTION_KEY = Symbol("elForwardRef"); const useForwardRef = (forwardRef) => { const setForwardRef = (el) => { forwardRef.value = el; }; vue.provide(FORWARD_REF_INJECTION_KEY, { setForwardRef }); }; const useForwardRefDirective = (setForwardRef) => { return { mounted(el) { setForwardRef(el); }, updated(el) { setForwardRef(el); }, unmounted() { setForwardRef(null); } }; }; const isFocusable = (element) => { if (element.tabIndex > 0 || element.tabIndex === 0 && element.getAttribute("tabIndex") !== null) { return true; } if (element.tabIndex < 0 || element.hasAttribute("disabled") || element.getAttribute("aria-disabled") === "true") { return false; } switch (element.nodeName) { case "A": { return !!element.href && element.rel !== "ignore"; } case "INPUT": { return !(element.type === "hidden" || element.type === "file"); } case "BUTTON": case "SELECT": case "TEXTAREA": { return true; } default: { return false; } } }; const NAME = "ElOnlyChild"; const OnlyChild = vue.defineComponent({ name: NAME, setup(_2, { slots, attrs }) { var _a2; const forwardRefInjection = vue.inject(FORWARD_REF_INJECTION_KEY); const forwardRefDirective = useForwardRefDirective((_a2 = forwardRefInjection == null ? void 0 : forwardRefInjection.setForwardRef) != null ? _a2 : NOOP); return () => { var _a22; const defaultSlot = (_a22 = slots.default) == null ? void 0 : _a22.call(slots, attrs); if (!defaultSlot) return null; if (defaultSlot.length > 1) { return null; } const firstLegitNode = findFirstLegitChild(defaultSlot); if (!firstLegitNode) { return null; } return vue.withDirectives(vue.cloneVNode(firstLegitNode, attrs), [[forwardRefDirective]]); }; } }); function findFirstLegitChild(node) { if (!node) return null; const children = node; for (const child of children) { if (isObject$2(child)) { switch (child.type) { case vue.Comment: continue; case vue.Text: case "svg": return wrapTextContent(child); case vue.Fragment: return findFirstLegitChild(child.children); default: return child; } } return wrapTextContent(child); } return null; } function wrapTextContent(s2) { const ns = useNamespace("only-child"); return vue.createVNode("span", { "class": ns.e("content") }, [s2]); } const __default__$8 = vue.defineComponent({ name: "ElPopperTrigger", inheritAttrs: false }); const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({ ...__default__$8, props: popperTriggerProps, setup(__props, { expose }) { const props = __props; const { role, triggerRef } = vue.inject(POPPER_INJECTION_KEY, void 0); useForwardRef(triggerRef); const ariaControls = vue.computed(() => { return ariaHaspopup.value ? props.id : void 0; }); const ariaDescribedby = vue.computed(() => { if (role && role.value === "tooltip") { return props.open && props.id ? props.id : void 0; } return void 0; }); const ariaHaspopup = vue.computed(() => { if (role && role.value !== "tooltip") { return role.value; } return void 0; }); const ariaExpanded = vue.computed(() => { return ariaHaspopup.value ? `${props.open}` : void 0; }); let virtualTriggerAriaStopWatch = void 0; const TRIGGER_ELE_EVENTS = [ "onMouseenter", "onMouseleave", "onClick", "onKeydown", "onFocus", "onBlur", "onContextmenu" ]; vue.onMounted(() => { vue.watch(() => props.virtualRef, (virtualEl) => { if (virtualEl) { triggerRef.value = unrefElement$1(virtualEl); } }, { immediate: true }); vue.watch(triggerRef, (el, prevEl) => { virtualTriggerAriaStopWatch == null ? void 0 : virtualTriggerAriaStopWatch(); virtualTriggerAriaStopWatch = void 0; if (isElement(el)) { TRIGGER_ELE_EVENTS.forEach((eventName) => { var _a2; const handler = props[eventName]; if (handler) { el.addEventListener(eventName.slice(2).toLowerCase(), handler); (_a2 = prevEl == null ? void 0 : prevEl.removeEventListener) == null ? void 0 : _a2.call(prevEl, eventName.slice(2).toLowerCase(), handler); } }); if (isFocusable(el)) { virtualTriggerAriaStopWatch = vue.watch([ariaControls, ariaDescribedby, ariaHaspopup, ariaExpanded], (watches) => { [ "aria-controls", "aria-describedby", "aria-haspopup", "aria-expanded" ].forEach((key, idx) => { isNil(watches[idx]) ? el.removeAttribute(key) : el.setAttribute(key, watches[idx]); }); }, { immediate: true }); } } if (isElement(prevEl) && isFocusable(prevEl)) { [ "aria-controls", "aria-describedby", "aria-haspopup", "aria-expanded" ].forEach((key) => prevEl.removeAttribute(key)); } }, { immediate: true }); }); vue.onBeforeUnmount(() => { virtualTriggerAriaStopWatch == null ? void 0 : virtualTriggerAriaStopWatch(); virtualTriggerAriaStopWatch = void 0; if (triggerRef.value && isElement(triggerRef.value)) { const el = triggerRef.value; TRIGGER_ELE_EVENTS.forEach((eventName) => { const handler = props[eventName]; if (handler) { el.removeEventListener(eventName.slice(2).toLowerCase(), handler); } }); triggerRef.value = void 0; } }); expose({ triggerRef }); return (_ctx, _cache) => { return !_ctx.virtualTriggering ? (vue.openBlock(), vue.createBlock(vue.unref(OnlyChild), vue.mergeProps({ key: 0 }, _ctx.$attrs, { "aria-controls": vue.unref(ariaControls), "aria-describedby": vue.unref(ariaDescribedby), "aria-expanded": vue.unref(ariaExpanded), "aria-haspopup": vue.unref(ariaHaspopup) }), { default: vue.withCtx(() => [ vue.renderSlot(_ctx.$slots, "default") ]), _: 3 }, 16, ["aria-controls", "aria-describedby", "aria-expanded", "aria-haspopup"])) : vue.createCommentVNode("v-if", true); }; } }); var ElPopperTrigger = /* @__PURE__ */ _export_sfc$1(_sfc_main$f, [["__file", "trigger.vue"]]); 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; let cleanup = false; if (isElement(element) && !isFocusable(element) && !element.getAttribute("tabindex")) { element.setAttribute("tabindex", "-1"); cleanup = true; } element.focus({ preventScroll: true }); lastAutomatedFocusTimestamp.value = window.performance.now(); if (element !== prevFocusedElement && isSelectable(element) && shouldSelect) { element.select(); } if (isElement(element) && cleanup) { element.removeAttribute("tabindex"); } } }; 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 EVENT_CODE = { tab: "Tab", enter: "Enter", space: "Space", esc: "Escape", numpadEnter: "NumpadEnter" }; let registeredEscapeHandlers = []; const cachedHandler = (event) => { if (event.code === EVENT_CODE.esc) { registeredEscapeHandlers.forEach((registeredHandler) => registeredHandler(event)); } }; const useEscapeKeydown = (handler) => { vue.onMounted(() => { if (registeredEscapeHandlers.length === 0) { document.addEventListener("keydown", cachedHandler); } if (isClient$1) registeredEscapeHandlers.push(handler); }); vue.onBeforeUnmount(() => { registeredEscapeHandlers = registeredEscapeHandlers.filter((registeredHandler) => registeredHandler !== handler); if (registeredEscapeHandlers.length === 0) { if (isClient$1) document.removeEventListener("keydown", cachedHandler); } }); }; 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 { code, altKey, ctrlKey, metaKey, currentTarget, shiftKey } = e; const { loop } = props; const isTabbing = code === 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(); } if (forwardRef.value) { forwardRef.value.removeEventListener("keydown", onKeydown); forwardRef.value.removeEventListener("focusin", onFocusIn); forwardRef.value.removeEventListener("focusout", onFocusOut); forwardRef.value = void 0; } }); return { onKeydown }; } }); function _sfc_render$2(_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$2], ["__file", "focus-trap.vue"]]); var E$1 = "top", R = "bottom", W = "right", P$1 = "left", me = "auto", G = [E$1, R, W, P$1], U$1 = "start", J = "end", Xe = "clippingParents", je = "viewport", K = "popper", Ye = "reference", De = G.reduce(function(t, e) { return t.concat([e + "-" + U$1, e + "-" + J]); }, []), Ee = [].concat(G, [me]).reduce(function(t, e) { return t.concat([e, e + "-" + U$1, e + "-" + J]); }, []), Ge = "beforeRead", Je = "read", Ke = "afterRead", Qe = "beforeMain", Ze = "main", et = "afterMain", tt = "beforeWrite", nt = "write", rt = "afterWrite", ot = [Ge, Je, Ke, Qe, Ze, et, tt, nt, rt]; function C(t) { return t ? (t.nodeName || "").toLowerCase() : null; } function H(t) { if (t == null) return window; if (t.toString() !== "[object Window]") { var e = t.ownerDocument; return e && e.defaultView || window; } return t; } function Q(t) { var e = H(t).Element; return t instanceof e || t instanceof Element; } function B(t) { var e = H(t).HTMLElement; return t instanceof e || t instanceof HTMLElement; } function Pe(t) { if (typeof ShadowRoot == "undefined") return false; var e = H(t).ShadowRoot; return t instanceof e || t instanceof ShadowRoot; } function Mt(t) { var e = t.state; Object.keys(e.elements).forEach(function(n) { var r = e.styles[n] || {}, o2 = e.attributes[n] || {}, i = e.elements[n]; !B(i) || !C(i) || (Object.assign(i.style, r), Object.keys(o2).forEach(function(a2) { var s2 = o2[a2]; s2 === false ? i.removeAttribute(a2) : i.setAttribute(a2, s2 === true ? "" : s2); })); }); } function Rt(t) { var e = t.state, n = { popper: { position: e.options.strategy, left: "0", top: "0", margin: "0" }, arrow: { position: "absolute" }, reference: {} }; return Object.assign(e.elements.popper.style, n.popper), e.styles = n, e.elements.arrow && Object.assign(e.elements.arrow.style, n.arrow), function() { Object.keys(e.elements).forEach(function(r) { var o2 = e.elements[r], i = e.attributes[r] || {}, a2 = Object.keys(e.styles.hasOwnProperty(r) ? e.styles[r] : n[r]), s2 = a2.reduce(function(f2, c2) { return f2[c2] = "", f2; }, {}); !B(o2) || !C(o2) || (Object.assign(o2.style, s2), Object.keys(i).forEach(function(f2) { o2.removeAttribute(f2); })); }); }; } var Ae = { name: "applyStyles", enabled: true, phase: "write", fn: Mt, effect: Rt, requires: ["computeStyles"] }; function q(t) { return t.split("-")[0]; } var X$1 = Math.max, ve = Math.min, Z = Math.round; function ee(t, e) { e === void 0 && (e = false); var n = t.getBoundingClientRect(), r = 1, o2 = 1; if (B(t) && e) { var i = t.offsetHeight, a2 = t.offsetWidth; a2 > 0 && (r = Z(n.width) / a2 || 1), i > 0 && (o2 = Z(n.height) / i || 1); } return { width: n.width / r, height: n.height / o2, top: n.top / o2, right: n.right / r, bottom: n.bottom / o2, left: n.left / r, x: n.left / r, y: n.top / o2 }; } function ke(t) { var e = ee(t), n = t.offsetWidth, r = t.offsetHeight; return Math.abs(e.width - n) <= 1 && (n = e.width), Math.abs(e.height - r) <= 1 && (r = e.height), { x: t.offsetLeft, y: t.offsetTop, width: n, height: r }; } function it(t, e) { var n = e.getRootNode && e.getRootNode(); if (t.contains(e)) return true; if (n && Pe(n)) { var r = e; do { if (r && t.isSameNode(r)) return true; r = r.parentNode || r.host; } while (r); } return false; } function N$1(t) { return H(t).getComputedStyle(t); } function Wt(t) { return ["table", "td", "th"].indexOf(C(t)) >= 0; } function I$1(t) { return ((Q(t) ? t.ownerDocument : t.document) || window.document).documentElement; } function ge(t) { return C(t) === "html" ? t : t.assignedSlot || t.parentNode || (Pe(t) ? t.host : null) || I$1(t); } function at(t) { return !B(t) || N$1(t).position === "fixed" ? null : t.offsetParent; } function Bt(t) { var e = navigator.userAgent.toLowerCase().indexOf("firefox") !== -1, n = navigator.userAgent.indexOf("Trident") !== -1; if (n && B(t)) { var r = N$1(t); if (r.position === "fixed") return null; } var o2 = ge(t); for (Pe(o2) && (o2 = o2.host); B(o2) && ["html", "body"].indexOf(C(o2)) < 0; ) { var i = N$1(o2); if (i.transform !== "none" || i.perspective !== "none" || i.contain === "paint" || ["transform", "perspective"].indexOf(i.willChange) !== -1 || e && i.willChange === "filter" || e && i.filter && i.filter !== "none") return o2; o2 = o2.parentNode; } return null; } function se(t) { for (var e = H(t), n = at(t); n && Wt(n) && N$1(n).position === "static"; ) n = at(n); return n && (C(n) === "html" || C(n) === "body" && N$1(n).position === "static") ? e : n || Bt(t) || e; } function Le(t) { return ["top", "bottom"].indexOf(t) >= 0 ? "x" : "y"; } function fe(t, e, n) { return X$1(t, ve(e, n)); } function St(t, e, n) { var r = fe(t, e, n); return r > n ? n : r; } function st() { return { top: 0, right: 0, bottom: 0, left: 0 }; } function ft(t) { return Object.assign({}, st(), t); } function ct(t, e) { return e.reduce(function(n, r) { return n[r] = t, n; }, {}); } var Tt = function(t, e) { return t = typeof t == "function" ? t(Object.assign({}, e.rects, { placement: e.placement })) : t, ft(typeof t != "number" ? t : ct(t, G)); }; function Ht(t) { var e, n = t.state, r = t.name, o2 = t.options, i = n.elements.arrow, a2 = n.modifiersData.popperOffsets, s2 = q(n.placement), f2 = Le(s2), c2 = [P$1, W].indexOf(s2) >= 0, u2 = c2 ? "height" : "width"; if (!(!i || !a2)) { var m2 = Tt(o2.padding, n), v2 = ke(i), l2 = f2 === "y" ? E$1 : P$1, h2 = f2 === "y" ? R : W, p2 = n.rects.reference[u2] + n.rects.reference[f2] - a2[f2] - n.rects.popper[u2], g = a2[f2] - n.rects.reference[f2], x2 = se(i), y = x2 ? f2 === "y" ? x2.clientHeight || 0 : x2.clientWidth || 0 : 0, $ = p2 / 2 - g / 2, d2 = m2[l2], b2 = y - v2[u2] - m2[h2], w2 = y / 2 - v2[u2] / 2 + $, O2 = fe(d2, w2, b2), j = f2; n.modifiersData[r] = (e = {}, e[j] = O2, e.centerOffset = O2 - w2, e); } } function Ct(t) { var e = t.state, n = t.options, r = n.element, o2 = r === void 0 ? "[data-popper-arrow]" : r; o2 != null && (typeof o2 == "string" && (o2 = e.elements.popper.querySelector(o2), !o2) || !it(e.elements.popper, o2) || (e.elements.arrow = o2)); } var pt = { name: "arrow", enabled: true, phase: "main", fn: Ht, effect: Ct, requires: ["popperOffsets"], requiresIfExists: ["preventOverflow"] }; function te(t) { return t.split("-")[1]; } var qt = { top: "auto", right: "auto", bottom: "auto", left: "auto" }; function Vt(t) { var e = t.x, n = t.y, r = window, o2 = r.devicePixelRatio || 1; return { x: Z(e * o2) / o2 || 0, y: Z(n * o2) / o2 || 0 }; } function ut(t) { var e, n = t.popper, r = t.popperRect, o2 = t.placement, i = t.variation, a2 = t.offsets, s2 = t.position, f2 = t.gpuAcceleration, c2 = t.adaptive, u2 = t.roundOffsets, m2 = t.isFixed, v2 = a2.x, l2 = v2 === void 0 ? 0 : v2, h2 = a2.y, p2 = h2 === void 0 ? 0 : h2, g = typeof u2 == "function" ? u2({ x: l2, y: p2 }) : { x: l2, y: p2 }; l2 = g.x, p2 = g.y; var x2 = a2.hasOwnProperty("x"), y = a2.hasOwnProperty("y"), $ = P$1, d2 = E$1, b2 = window; if (c2) { var w2 = se(n), O2 = "clientHeight", j = "clientWidth"; if (w2 === H(n) && (w2 = I$1(n), N$1(w2).position !== "static" && s2 === "absolute" && (O2 = "scrollHeight", j = "scrollWidth")), w2 = w2, o2 === E$1 || (o2 === P$1 || o2 === W) && i === J) { d2 = R; var A2 = m2 && w2 === b2 && b2.visualViewport ? b2.visualViewport.height : w2[O2]; p2 -= A2 - r.height, p2 *= f2 ? 1 : -1; } if (o2 === P$1 || (o2 === E$1 || o2 === R) && i === J) { $ = W; var k = m2 && w2 === b2 && b2.visualViewport ? b2.visualViewport.width : w2[j]; l2 -= k - r.width, l2 *= f2 ? 1 : -1; } } var D2 = Object.assign({ position: s2 }, c2 && qt), S2 = u2 === true ? Vt({ x: l2, y: p2 }) : { x: l2, y: p2 }; if (l2 = S2.x, p2 = S2.y, f2) { var L; return Object.assign({}, D2, (L = {}, L[d2] = y ? "0" : "", L[$] = x2 ? "0" : "", L.transform = (b2.devicePixelRatio || 1) <= 1 ? "translate(" + l2 + "px, " + p2 + "px)" : "translate3d(" + l2 + "px, " + p2 + "px, 0)", L)); } return Object.assign({}, D2, (e = {}, e[d2] = y ? p2 + "px" : "", e[$] = x2 ? l2 + "px" : "", e.transform = "", e)); } function Nt(t) { var e = t.state, n = t.options, r = n.gpuAcceleration, o2 = r === void 0 ? true : r, i = n.adaptive, a2 = i === void 0 ? true : i, s2 = n.roundOffsets, f2 = s2 === void 0 ? true : s2, c2 = { placement: q(e.placement), variation: te(e.placement), popper: e.elements.popper, popperRect: e.rects.popper, gpuAcceleration: o2, isFixed: e.options.strategy === "fixed" }; e.modifiersData.popperOffsets != null && (e.styles.popper = Object.assign({}, e.styles.popper, ut(Object.assign({}, c2, { offsets: e.modifiersData.popperOffsets, position: e.options.strategy, adaptive: a2, roundOffsets: f2 })))), e.modifiersData.arrow != null && (e.styles.arrow = Object.assign({}, e.styles.arrow, ut(Object.assign({}, c2, { offsets: e.modifiersData.arrow, position: "absolute", adaptive: false, roundOffsets: f2 })))), e.attributes.popper = Object.assign({}, e.attributes.popper, { "data-popper-placement": e.placement }); } var Me = { name: "computeStyles", enabled: true, phase: "beforeWrite", fn: Nt, data: {} }, ye = { passive: true }; function It(t) { var e = t.state, n = t.instance, r = t.options, o2 = r.scroll, i = o2 === void 0 ? true : o2, a2 = r.resize, s2 = a2 === void 0 ? true : a2, f2 = H(e.elements.popper), c2 = [].concat(e.scrollParents.reference, e.scrollParents.popper); return i && c2.forEach(function(u2) { u2.addEventListener("scroll", n.update, ye); }), s2 && f2.addEventListener("resize", n.update, ye), function() { i && c2.forEach(function(u2) { u2.removeEventListener("scroll", n.update, ye); }), s2 && f2.removeEventListener("resize", n.update, ye); }; } var Re = { name: "eventListeners", enabled: true, phase: "write", fn: function() { }, effect: It, data: {} }, _t = { left: "right", right: "left", bottom: "top", top: "bottom" }; function be(t) { return t.replace(/left|right|bottom|top/g, function(e) { return _t[e]; }); } var zt = { start: "end", end: "start" }; function lt(t) { return t.replace(/start|end/g, function(e) { return zt[e]; }); } function We(t) { var e = H(t), n = e.pageXOffset, r = e.pageYOffset; return { scrollLeft: n, scrollTop: r }; } function Be(t) { return ee(I$1(t)).left + We(t).scrollLeft; } function Ft(t) { var e = H(t), n = I$1(t), r = e.visualViewport, o2 = n.clientWidth, i = n.clientHeight, a2 = 0, s2 = 0; return r && (o2 = r.width, i = r.height, /^((?!chrome|android).)*safari/i.test(navigator.userAgent) || (a2 = r.offsetLeft, s2 = r.offsetTop)), { width: o2, height: i, x: a2 + Be(t), y: s2 }; } function Ut(t) { var e, n = I$1(t), r = We(t), o2 = (e = t.ownerDocument) == null ? void 0 : e.body, i = X$1(n.scrollWidth, n.clientWidth, o2 ? o2.scrollWidth : 0, o2 ? o2.clientWidth : 0), a2 = X$1(n.scrollHeight, n.clientHeight, o2 ? o2.scrollHeight : 0, o2 ? o2.clientHeight : 0), s2 = -r.scrollLeft + Be(t), f2 = -r.scrollTop; return N$1(o2 || n).direction === "rtl" && (s2 += X$1(n.clientWidth, o2 ? o2.clientWidth : 0) - i), { width: i, height: a2, x: s2, y: f2 }; } function Se(t) { var e = N$1(t), n = e.overflow, r = e.overflowX, o2 = e.overflowY; return /auto|scroll|overlay|hidden/.test(n + o2 + r); } function dt(t) { return ["html", "body", "#document"].indexOf(C(t)) >= 0 ? t.ownerDocument.body : B(t) && Se(t) ? t : dt(ge(t)); } function ce(t, e) { var n; e === void 0 && (e = []); var r = dt(t), o2 = r === ((n = t.ownerDocument) == null ? void 0 : n.body), i = H(r), a2 = o2 ? [i].concat(i.visualViewport || [], Se(r) ? r : []) : r, s2 = e.concat(a2); return o2 ? s2 : s2.concat(ce(ge(a2))); } function Te(t) { return Object.assign({}, t, { left: t.x, top: t.y, right: t.x + t.width, bottom: t.y + t.height }); } function Xt(t) { var e = ee(t); return e.top = e.top + t.clientTop, e.left = e.left + t.clientLeft, e.bottom = e.top + t.clientHeight, e.right = e.left + t.clientWidth, e.width = t.clientWidth, e.height = t.clientHeight, e.x = e.left, e.y = e.top, e; } function ht(t, e) { return e === je ? Te(Ft(t)) : Q(e) ? Xt(e) : Te(Ut(I$1(t))); } function Yt(t) { var e = ce(ge(t)), n = ["absolute", "fixed"].indexOf(N$1(t).position) >= 0, r = n && B(t) ? se(t) : t; return Q(r) ? e.filter(function(o2) { return Q(o2) && it(o2, r) && C(o2) !== "body"; }) : []; } function Gt(t, e, n) { var r = e === "clippingParents" ? Yt(t) : [].concat(e), o2 = [].concat(r, [n]), i = o2[0], a2 = o2.reduce(function(s2, f2) { var c2 = ht(t, f2); return s2.top = X$1(c2.top, s2.top), s2.right = ve(c2.right, s2.right), s2.bottom = ve(c2.bottom, s2.bottom), s2.left = X$1(c2.left, s2.left), s2; }, ht(t, i)); return a2.width = a2.right - a2.left, a2.height = a2.bottom - a2.top, a2.x = a2.left, a2.y = a2.top, a2; } function mt(t) { var e = t.reference, n = t.element, r = t.placement, o2 = r ? q(r) : null, i = r ? te(r) : null, a2 = e.x + e.width / 2 - n.width / 2, s2 = e.y + e.height / 2 - n.height / 2, f2; switch (o2) { case E$1: f2 = { x: a2, y: e.y - n.height }; break; case R: f2 = { x: a2, y: e.y + e.height }; break; case W: f2 = { x: e.x + e.width, y: s2 }; break; case P$1: f2 = { x: e.x - n.width, y: s2 }; break; default: f2 = { x: e.x, y: e.y }; } var c2 = o2 ? Le(o2) : null; if (c2 != null) { var u2 = c2 === "y" ? "height" : "width"; switch (i) { case U$1: f2[c2] = f2[c2] - (e[u2] / 2 - n[u2] / 2); break; case J: f2[c2] = f2[c2] + (e[u2] / 2 - n[u2] / 2); break; } } return f2; } function ne(t, e) { e === void 0 && (e = {}); var n = e, r = n.placement, o2 = r === void 0 ? t.placement : r, i = n.boundary, a2 = i === void 0 ? Xe : i, s2 = n.rootBoundary, f2 = s2 === void 0 ? je : s2, c2 = n.elementContext, u2 = c2 === void 0 ? K : c2, m2 = n.altBoundary, v2 = m2 === void 0 ? false : m2, l2 = n.padding, h2 = l2 === void 0 ? 0 : l2, p2 = ft(typeof h2 != "number" ? h2 : ct(h2, G)), g = u2 === K ? Ye : K, x2 = t.rects.popper, y = t.elements[v2 ? g : u2], $ = Gt(Q(y) ? y : y.contextElement || I$1(t.elements.popper), a2, f2), d2 = ee(t.elements.reference), b2 = mt({ reference: d2, element: x2, placement: o2 }), w2 = Te(Object.assign({}, x2, b2)), O2 = u2 === K ? w2 : d2, j = { top: $.top - O2.top + p2.top, bottom: O2.bottom - $.bottom + p2.bottom, left: $.left - O2.left + p2.left, right: O2.right - $.right + p2.right }, A2 = t.modifiersData.offset; if (u2 === K && A2) { var k = A2[o2]; Object.keys(j).forEach(function(D2) { var S2 = [W, R].indexOf(D2) >= 0 ? 1 : -1, L = [E$1, R].indexOf(D2) >= 0 ? "y" : "x"; j[D2] += k[L] * S2; }); } return j; } function Jt(t, e) { e === void 0 && (e = {}); var n = e, r = n.placement, o2 = n.boundary, i = n.rootBoundary, a2 = n.padding, s2 = n.flipVariations, f2 = n.allowedAutoPlacements, c2 = f2 === void 0 ? Ee : f2, u2 = te(r), m2 = u2 ? s2 ? De : De.filter(function(h2) { return te(h2) === u2; }) : G, v2 = m2.filter(function(h2) { return c2.indexOf(h2) >= 0; }); v2.length === 0 && (v2 = m2); var l2 = v2.reduce(function(h2, p2) { return h2[p2] = ne(t, { placement: p2, boundary: o2, rootBoundary: i, padding: a2 })[q(p2)], h2; }, {}); return Object.keys(l2).sort(function(h2, p2) { return l2[h2] - l2[p2]; }); } function Kt(t) { if (q(t) === me) return []; var e = be(t); return [lt(t), e, lt(e)]; } function Qt(t) { var e = t.state, n = t.options, r = t.name; if (!e.modifiersData[r]._skip) { for (var o2 = n.mainAxis, i = o2 === void 0 ? true : o2, a2 = n.altAxis, s2 = a2 === void 0 ? true : a2, f2 = n.fallbackPlacements, c2 = n.padding, u2 = n.boundary, m2 = n.rootBoundary, v2 = n.altBoundary, l2 = n.flipVariations, h2 = l2 === void 0 ? true : l2, p2 = n.allowedAutoPlacements, g = e.options.placement, x2 = q(g), y = x2 === g, $ = f2 || (y || !h2 ? [be(g)] : Kt(g)), d2 = [g].concat($).reduce(function(z, V) { return z.concat(q(V) === me ? Jt(e, { placement: V, boundary: u2, rootBoundary: m2, padding: c2, flipVariations: h2, allowedAutoPlacements: p2 }) : V); }, []), b2 = e.rects.reference, w2 = e.rects.popper, O2 = /* @__PURE__ */ new Map(), j = true, A2 = d2[0], k = 0; k < d2.length; k++) { var D2 = d2[k], S2 = q(D2), L = te(D2) === U$1, re = [E$1, R].indexOf(S2) >= 0, oe = re ? "width" : "height", M2 = ne(e, { placement: D2, boundary: u2, rootBoundary: m2, altBoundary: v2, padding: c2 }), T2 = re ? L ? W : P$1 : L ? R : E$1; b2[oe] > w2[oe] && (T2 = be(T2)); var pe = be(T2), _2 = []; if (i && _2.push(M2[S2] <= 0), s2 && _2.push(M2[T2] <= 0, M2[pe] <= 0), _2.every(function(z) { return z; })) { A2 = D2, j = false; break; } O2.set(D2, _2); } if (j) for (var ue = h2 ? 3 : 1, xe = function(z) { var V = d2.find(function(de) { var ae = O2.get(de); if (ae) return ae.slice(0, z).every(function(Y2) { return Y2; }); }); if (V) return A2 = V, "break"; }, ie = ue; ie > 0; ie--) { var le = xe(ie); if (le === "break") break; } e.placement !== A2 && (e.modifiersData[r]._skip = true, e.placement = A2, e.reset = true); } } var vt = { name: "flip", enabled: true, phase: "main", fn: Qt, requiresIfExists: ["offset"], data: { _skip: false } }; function gt(t, e, n) { return n === void 0 && (n = { x: 0, y: 0 }), { top: t.top - e.height - n.y, right: t.right - e.width + n.x, bottom: t.bottom - e.height + n.y, left: t.left - e.width - n.x }; } function yt(t) { return [E$1, W, R, P$1].some(function(e) { return t[e] >= 0; }); } function Zt(t) { var e = t.state, n = t.name, r = e.rects.reference, o2 = e.rects.popper, i = e.modifiersData.preventOverflow, a2 = ne(e, { elementContext: "reference" }), s2 = ne(e, { altBoundary: true }), f2 = gt(a2, r), c2 = gt(s2, o2, i), u2 = yt(f2), m2 = yt(c2); e.modifiersData[n] = { referenceClippingOffsets: f2, popperEscapeOffsets: c2, isReferenceHidden: u2, hasPopperEscaped: m2 }, e.attributes.popper = Object.assign({}, e.attributes.popper, { "data-popper-reference-hidden": u2, "data-popper-escaped": m2 }); } var bt = { name: "hide", enabled: true, phase: "main", requiresIfExists: ["preventOverflow"], fn: Zt }; function en(t, e, n) { var r = q(t), o2 = [P$1, E$1].indexOf(r) >= 0 ? -1 : 1, i = typeof n == "function" ? n(Object.assign({}, e, { placement: t })) : n, a2 = i[0], s2 = i[1]; return a2 = a2 || 0, s2 = (s2 || 0) * o2, [P$1, W].indexOf(r) >= 0 ? { x: s2, y: a2 } : { x: a2, y: s2 }; } function tn(t) { var e = t.state, n = t.options, r = t.name, o2 = n.offset, i = o2 === void 0 ? [0, 0] : o2, a2 = Ee.reduce(function(u2, m2) { return u2[m2] = en(m2, e.rects, i), u2; }, {}), s2 = a2[e.placement], f2 = s2.x, c2 = s2.y; e.modifiersData.popperOffsets != null && (e.modifiersData.popperOffsets.x += f2, e.modifiersData.popperOffsets.y += c2), e.modifiersData[r] = a2; } var wt = { name: "offset", enabled: true, phase: "main", requires: ["popperOffsets"], fn: tn }; function nn(t) { var e = t.state, n = t.name; e.modifiersData[n] = mt({ reference: e.rects.reference, element: e.rects.popper, placement: e.placement }); } var He = { name: "popperOffsets", enabled: true, phase: "read", fn: nn, data: {} }; function rn(t) { return t === "x" ? "y" : "x"; } function on(t) { var e = t.state, n = t.options, r = t.name, o2 = n.mainAxis, i = o2 === void 0 ? true : o2, a2 = n.altAxis, s2 = a2 === void 0 ? false : a2, f2 = n.boundary, c2 = n.rootBoundary, u2 = n.altBoundary, m2 = n.padding, v2 = n.tether, l2 = v2 === void 0 ? true : v2, h2 = n.tetherOffset, p2 = h2 === void 0 ? 0 : h2, g = ne(e, { boundary: f2, rootBoundary: c2, padding: m2, altBoundary: u2 }), x2 = q(e.placement), y = te(e.placement), $ = !y, d2 = Le(x2), b2 = rn(d2), w2 = e.modifiersData.popperOffsets, O2 = e.rects.reference, j = e.rects.popper, A2 = typeof p2 == "function" ? p2(Object.assign({}, e.rects, { placement: e.placement })) : p2, k = typeof A2 == "number" ? { mainAxis: A2, altAxis: A2 } : Object.assign({ mainAxis: 0, altAxis: 0 }, A2), D2 = e.modifiersData.offset ? e.modifiersData.offset[e.placement] : null, S2 = { x: 0, y: 0 }; if (w2) { if (i) { var L, re = d2 === "y" ? E$1 : P$1, oe = d2 === "y" ? R : W, M2 = d2 === "y" ? "height" : "width", T2 = w2[d2], pe = T2 + g[re], _2 = T2 - g[oe], ue = l2 ? -j[M2] / 2 : 0, xe = y === U$1 ? O2[M2] : j[M2], ie = y === U$1 ? -j[M2] : -O2[M2], le = e.elements.arrow, z = l2 && le ? ke(le) : { width: 0, height: 0 }, V = e.modifiersData["arrow#persistent"] ? e.modifiersData["arrow#persistent"].padding : st(), de = V[re], ae = V[oe], Y2 = fe(0, O2[M2], z[M2]), jt = $ ? O2[M2] / 2 - ue - Y2 - de - k.mainAxis : xe - Y2 - de - k.mainAxis, Dt = $ ? -O2[M2] / 2 + ue + Y2 + ae + k.mainAxis : ie + Y2 + ae + k.mainAxis, Oe = e.elements.arrow && se(e.elements.arrow), Et = Oe ? d2 === "y" ? Oe.clientTop || 0 : Oe.clientLeft || 0 : 0, Ce = (L = D2 == null ? void 0 : D2[d2]) != null ? L : 0, Pt = T2 + jt - Ce - Et, At = T2 + Dt - Ce, qe = fe(l2 ? ve(pe, Pt) : pe, T2, l2 ? X$1(_2, At) : _2); w2[d2] = qe, S2[d2] = qe - T2; } if (s2) { var Ve, kt = d2 === "x" ? E$1 : P$1, Lt = d2 === "x" ? R : W, F2 = w2[b2], he = b2 === "y" ? "height" : "width", Ne = F2 + g[kt], Ie = F2 - g[Lt], $e = [E$1, P$1].indexOf(x2) !== -1, _e = (Ve = D2 == null ? void 0 : D2[b2]) != null ? Ve : 0, ze = $e ? Ne : F2 - O2[he] - j[he] - _e + k.altAxis, Fe = $e ? F2 + O2[he] + j[he] - _e - k.altAxis : Ie, Ue = l2 && $e ? St(ze, F2, Fe) : fe(l2 ? ze : Ne, F2, l2 ? Fe : Ie); w2[b2] = Ue, S2[b2] = Ue - F2; } e.modifiersData[r] = S2; } } var xt = { name: "preventOverflow", enabled: true, phase: "main", fn: on, requiresIfExists: ["offset"] }; function an(t) { return { scrollLeft: t.scrollLeft, scrollTop: t.scrollTop }; } function sn(t) { return t === H(t) || !B(t) ? We(t) : an(t); } function fn(t) { var e = t.getBoundingClientRect(), n = Z(e.width) / t.offsetWidth || 1, r = Z(e.height) / t.offsetHeight || 1; return n !== 1 || r !== 1; } function cn(t, e, n) { n === void 0 && (n = false); var r = B(e), o2 = B(e) && fn(e), i = I$1(e), a2 = ee(t, o2), s2 = { scrollLeft: 0, scrollTop: 0 }, f2 = { x: 0, y: 0 }; return (r || !r && !n) && ((C(e) !== "body" || Se(i)) && (s2 = sn(e)), B(e) ? (f2 = ee(e, true), f2.x += e.clientLeft, f2.y += e.clientTop) : i && (f2.x = Be(i))), { x: a2.left + s2.scrollLeft - f2.x, y: a2.top + s2.scrollTop - f2.y, width: a2.width, height: a2.height }; } function pn(t) { var e = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set(), r = []; t.forEach(function(i) { e.set(i.name, i); }); function o2(i) { n.add(i.name); var a2 = [].concat(i.requires || [], i.requiresIfExists || []); a2.forEach(function(s2) { if (!n.has(s2)) { var f2 = e.get(s2); f2 && o2(f2); } }), r.push(i); } return t.forEach(function(i) { n.has(i.name) || o2(i); }), r; } function un(t) { var e = pn(t); return ot.reduce(function(n, r) { return n.concat(e.filter(function(o2) { return o2.phase === r; })); }, []); } function ln(t) { var e; return function() { return e || (e = new Promise(function(n) { Promise.resolve().then(function() { e = void 0, n(t()); }); })), e; }; } function dn(t) { var e = t.reduce(function(n, r) { var o2 = n[r.name]; return n[r.name] = o2 ? Object.assign({}, o2, r, { options: Object.assign({}, o2.options, r.options), data: Object.assign({}, o2.data, r.data) }) : r, n; }, {}); return Object.keys(e).map(function(n) { return e[n]; }); } var Ot = { placement: "bottom", modifiers: [], strategy: "absolute" }; function $t() { for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++) e[n] = arguments[n]; return !e.some(function(r) { return !(r && typeof r.getBoundingClientRect == "function"); }); } function we(t) { t === void 0 && (t = {}); var e = t, n = e.defaultModifiers, r = n === void 0 ? [] : n, o2 = e.defaultOptions, i = o2 === void 0 ? Ot : o2; return function(a2, s2, f2) { f2 === void 0 && (f2 = i); var c2 = { placement: "bottom", orderedModifiers: [], options: Object.assign({}, Ot, i), modifiersData: {}, elements: { reference: a2, popper: s2 }, attributes: {}, styles: {} }, u2 = [], m2 = false, v2 = { state: c2, setOptions: function(p2) { var g = typeof p2 == "function" ? p2(c2.options) : p2; h2(), c2.options = Object.assign({}, i, c2.options, g), c2.scrollParents = { reference: Q(a2) ? ce(a2) : a2.contextElement ? ce(a2.contextElement) : [], popper: ce(s2) }; var x2 = un(dn([].concat(r, c2.options.modifiers))); return c2.orderedModifiers = x2.filter(function(y) { return y.enabled; }), l2(), v2.update(); }, forceUpdate: function() { if (!m2) { var p2 = c2.elements, g = p2.reference, x2 = p2.popper; if ($t(g, x2)) { c2.rects = { reference: cn(g, se(x2), c2.options.strategy === "fixed"), popper: ke(x2) }, c2.reset = false, c2.placement = c2.options.placement, c2.orderedModifiers.forEach(function(j) { return c2.modifiersData[j.name] = Object.assign({}, j.data); }); for (var y = 0; y < c2.orderedModifiers.length; y++) { if (c2.reset === true) { c2.reset = false, y = -1; continue; } var $ = c2.orderedModifiers[y], d2 = $.fn, b2 = $.options, w2 = b2 === void 0 ? {} : b2, O2 = $.name; typeof d2 == "function" && (c2 = d2({ state: c2, options: w2, name: O2, instance: v2 }) || c2); } } } }, update: ln(function() { return new Promise(function(p2) { v2.forceUpdate(), p2(c2); }); }), destroy: function() { h2(), m2 = true; } }; if (!$t(a2, s2)) return v2; v2.setOptions(f2).then(function(p2) { !m2 && f2.onFirstUpdate && f2.onFirstUpdate(p2); }); function l2() { c2.orderedModifiers.forEach(function(p2) { var g = p2.name, x2 = p2.options, y = x2 === void 0 ? {} : x2, $ = p2.effect; if (typeof $ == "function") { var d2 = $({ state: c2, name: g, instance: v2, options: y }), b2 = function() { }; u2.push(d2 || b2); } }); } function h2() { u2.forEach(function(p2) { return p2(); }), u2 = []; } return v2; }; } we(); var mn = [Re, He, Me, Ae]; we({ defaultModifiers: mn }); var gn = [Re, He, Me, Ae, wt, vt, xt, pt, bt], yn = we({ defaultModifiers: gn }); const POSITIONING_STRATEGIES = ["fixed", "absolute"]; const popperCoreConfigProps = buildProps({ boundariesPadding: { type: Number, default: 0 }, fallbackPlacements: { type: definePropType(Array), default: void 0 }, gpuAcceleration: { type: Boolean, default: true }, offset: { type: Number, default: 12 }, placement: { type: String, values: Ee, default: "bottom" }, popperOptions: { type: definePropType(Object), default: () => ({}) }, strategy: { type: String, values: POSITIONING_STRATEGIES, default: "absolute" } }); const popperContentProps = buildProps({ ...popperCoreConfigProps, id: String, style: { type: definePropType([String, Array, Object]) }, className: { type: definePropType([String, Array, Object]) }, effect: { type: definePropType(String), default: "dark" }, visible: Boolean, enterable: { type: Boolean, default: true }, pure: Boolean, focusOnShow: { type: Boolean, default: false }, trapping: { type: Boolean, default: false }, popperClass: { type: definePropType([String, Array, Object]) }, popperStyle: { type: definePropType([String, Array, Object]) }, referenceEl: { type: definePropType(Object) }, triggerTargetEl: { type: definePropType(Object) }, stopPopperMouseEvent: { type: Boolean, default: true }, virtualTriggering: Boolean, zIndex: Number, ...useAriaProps(["ariaLabel"]) }); const popperContentEmits = { mouseenter: (evt) => evt instanceof MouseEvent, mouseleave: (evt) => evt instanceof MouseEvent, focus: () => true, blur: () => true, close: () => true }; const usePopperContentFocusTrap = (props, emit) => { const trapped = vue.ref(false); const focusStartRef = vue.ref(); const onFocusAfterTrapped = () => { emit("focus"); }; const onFocusAfterReleased = (event) => { var _a2; if (((_a2 = event.detail) == null ? void 0 : _a2.focusReason) !== "pointer") { focusStartRef.value = "first"; emit("blur"); } }; const onFocusInTrap = (event) => { if (props.visible && !trapped.value) { if (event.target) { focusStartRef.value = event.target; } trapped.value = true; } }; const onFocusoutPrevented = (event) => { if (!props.trapping) { if (event.detail.focusReason === "pointer") { event.preventDefault(); } trapped.value = false; } }; const onReleaseRequested = () => { trapped.value = false; emit("close"); }; return { focusStartRef, trapped, onFocusAfterReleased, onFocusAfterTrapped, onFocusInTrap, onFocusoutPrevented, onReleaseRequested }; }; const buildPopperOptions = (props, modifiers = []) => { const { placement, strategy, popperOptions } = props; const options = { placement, strategy, ...popperOptions, modifiers: [...genModifiers(props), ...modifiers] }; deriveExtraModifiers(options, popperOptions == null ? void 0 : popperOptions.modifiers); return options; }; const unwrapMeasurableEl = ($el) => { if (!isClient$1) return; return unrefElement$1($el); }; function genModifiers(options) { const { offset, gpuAcceleration, fallbackPlacements } = options; return [ { name: "offset", options: { offset: [0, offset != null ? offset : 12] } }, { name: "preventOverflow", options: { padding: { top: 2, bottom: 2, left: 5, right: 5 } } }, { name: "flip", options: { padding: 5, fallbackPlacements } }, { name: "computeStyles", options: { gpuAcceleration } } ]; } function deriveExtraModifiers(options, modifiers) { if (modifiers) { options.modifiers = [...options.modifiers, ...modifiers != null ? modifiers : []]; } } const usePopper = (referenceElementRef, popperElementRef, opts = {}) => { const stateUpdater = { name: "updateState", enabled: true, phase: "write", fn: ({ state }) => { const derivedState = deriveState(state); Object.assign(states.value, derivedState); }, requires: ["computeStyles"] }; const options = vue.computed(() => { const { onFirstUpdate, placement, strategy, modifiers } = vue.unref(opts); return { onFirstUpdate, placement: placement || "bottom", strategy: strategy || "absolute", modifiers: [ ...modifiers || [], stateUpdater, { name: "applyStyles", enabled: false } ] }; }); const instanceRef = vue.shallowRef(); const states = vue.ref({ styles: { popper: { position: vue.unref(options).strategy, left: "0", top: "0" }, arrow: { position: "absolute" } }, attributes: {} }); const destroy = () => { if (!instanceRef.value) return; instanceRef.value.destroy(); instanceRef.value = void 0; }; vue.watch(options, (newOptions) => { const instance = vue.unref(instanceRef); if (instance) { instance.setOptions(newOptions); } }, { deep: true }); vue.watch([referenceElementRef, popperElementRef], ([referenceElement, popperElement]) => { destroy(); if (!referenceElement || !popperElement) return; instanceRef.value = yn(referenceElement, popperElement, vue.unref(options)); }); vue.onBeforeUnmount(() => { destroy(); }); return { state: vue.computed(() => { var _a2; return { ...((_a2 = vue.unref(instanceRef)) == null ? void 0 : _a2.state) || {} }; }), styles: vue.computed(() => vue.unref(states).styles), attributes: vue.computed(() => vue.unref(states).attributes), update: () => { var _a2; return (_a2 = vue.unref(instanceRef)) == null ? void 0 : _a2.update(); }, forceUpdate: () => { var _a2; return (_a2 = vue.unref(instanceRef)) == null ? void 0 : _a2.forceUpdate(); }, instanceRef: vue.computed(() => vue.unref(instanceRef)) }; }; function deriveState(state) { const elements = Object.keys(state.elements); const styles = fromPairs(elements.map((element) => [element, state.styles[element] || {}])); const attributes = fromPairs(elements.map((element) => [element, state.attributes[element]])); return { styles, attributes }; } const DEFAULT_ARROW_OFFSET = 0; const usePopperContent = (props) => { const { popperInstanceRef, contentRef, triggerRef, role } = vue.inject(POPPER_INJECTION_KEY, void 0); const arrowRef = vue.ref(); const arrowOffset = vue.ref(); const eventListenerModifier = vue.computed(() => { return { name: "eventListeners", enabled: !!props.visible }; }); const arrowModifier = vue.computed(() => { var _a2; const arrowEl = vue.unref(arrowRef); const offset = (_a2 = vue.unref(arrowOffset)) != null ? _a2 : DEFAULT_ARROW_OFFSET; return { name: "arrow", enabled: !isUndefined$1(arrowEl), options: { element: arrowEl, padding: offset } }; }); const options = vue.computed(() => { return { onFirstUpdate: () => { update(); }, ...buildPopperOptions(props, [ vue.unref(arrowModifier), vue.unref(eventListenerModifier) ]) }; }); const computedReference = vue.computed(() => unwrapMeasurableEl(props.referenceEl) || vue.unref(triggerRef)); const { attributes, state, styles, update, forceUpdate, instanceRef } = usePopper(computedReference, contentRef, options); vue.watch(instanceRef, (instance) => popperInstanceRef.value = instance); vue.onMounted(() => { vue.watch(() => { var _a2; return (_a2 = vue.unref(computedReference)) == null ? void 0 : _a2.getBoundingClientRect(); }, () => { update(); }); }); return { attributes, arrowRef, contentRef, instanceRef, state, styles, role, forceUpdate, update }; }; const usePopperContentDOM = (props, { attributes, styles, role }) => { const { nextZIndex } = useZIndex(); const ns = useNamespace("popper"); const contentAttrs = vue.computed(() => vue.unref(attributes).popper); const contentZIndex = vue.ref(isNumber(props.zIndex) ? props.zIndex : nextZIndex()); const contentClass = vue.computed(() => [ ns.b(), ns.is("pure", props.pure), ns.is(props.effect), props.popperClass ]); const contentStyle = vue.computed(() => { return [ { zIndex: vue.unref(contentZIndex) }, vue.unref(styles).popper, props.popperStyle || {} ]; }); const ariaModal = vue.computed(() => role.value === "dialog" ? "false" : void 0); const arrowStyle = vue.computed(() => vue.unref(styles).arrow || {}); const updateZIndex = () => { contentZIndex.value = isNumber(props.zIndex) ? props.zIndex : nextZIndex(); }; return { ariaModal, arrowStyle, contentAttrs, contentClass, contentStyle, contentZIndex, updateZIndex }; }; const __default__$7 = vue.defineComponent({ name: "ElPopperContent" }); const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({ ...__default__$7, props: popperContentProps, emits: popperContentEmits, setup(__props, { expose, emit }) { const props = __props; const { focusStartRef, trapped, onFocusAfterReleased, onFocusAfterTrapped, onFocusInTrap, onFocusoutPrevented, onReleaseRequested } = usePopperContentFocusTrap(props, emit); const { attributes, arrowRef, contentRef, styles, instanceRef, role, update } = usePopperContent(props); const { ariaModal, arrowStyle, contentAttrs, contentClass, contentStyle, updateZIndex } = usePopperContentDOM(props, { styles, attributes, role }); const formItemContext = vue.inject(formItemContextKey, void 0); const arrowOffset = vue.ref(); vue.provide(POPPER_CONTENT_INJECTION_KEY, { arrowStyle, arrowRef, arrowOffset }); if (formItemContext) { vue.provide(formItemContextKey, { ...formItemContext, addInputId: NOOP, removeInputId: NOOP }); } let triggerTargetAriaStopWatch = void 0; const updatePopper = (shouldUpdateZIndex = true) => { update(); shouldUpdateZIndex && updateZIndex(); }; const togglePopperAlive = () => { updatePopper(false); if (props.visible && props.focusOnShow) { trapped.value = true; } else if (props.visible === false) { trapped.value = false; } }; vue.onMounted(() => { vue.watch(() => props.triggerTargetEl, (triggerTargetEl, prevTriggerTargetEl) => { triggerTargetAriaStopWatch == null ? void 0 : triggerTargetAriaStopWatch(); triggerTargetAriaStopWatch = void 0; const el = vue.unref(triggerTargetEl || contentRef.value); const prevEl = vue.unref(prevTriggerTargetEl || contentRef.value); if (isElement(el)) { triggerTargetAriaStopWatch = vue.watch([role, () => props.ariaLabel, ariaModal, () => props.id], (watches) => { ["role", "aria-label", "aria-modal", "id"].forEach((key, idx) => { isNil(watches[idx]) ? el.removeAttribute(key) : el.setAttribute(key, watches[idx]); }); }, { immediate: true }); } if (prevEl !== el && isElement(prevEl)) { ["role", "aria-label", "aria-modal", "id"].forEach((key) => { prevEl.removeAttribute(key); }); } }, { immediate: true }); vue.watch(() => props.visible, togglePopperAlive, { immediate: true }); }); vue.onBeforeUnmount(() => { triggerTargetAriaStopWatch == null ? void 0 : triggerTargetAriaStopWatch(); triggerTargetAriaStopWatch = void 0; }); expose({ popperContentRef: contentRef, popperInstanceRef: instanceRef, updatePopper, contentStyle }); return (_ctx, _cache) => { return vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({ ref_key: "contentRef", ref: contentRef }, vue.unref(contentAttrs), { style: vue.unref(contentStyle), class: vue.unref(contentClass), tabindex: "-1", onMouseenter: (e) => _ctx.$emit("mouseenter", e), onMouseleave: (e) => _ctx.$emit("mouseleave", e) }), [ vue.createVNode(vue.unref(ElFocusTrap), { trapped: vue.unref(trapped), "trap-on-focus-in": true, "focus-trap-el": vue.unref(contentRef), "focus-start-el": vue.unref(focusStartRef), onFocusAfterTrapped: vue.unref(onFocusAfterTrapped), onFocusAfterReleased: vue.unref(onFocusAfterReleased), onFocusin: vue.unref(onFocusInTrap), onFocusoutPrevented: vue.unref(onFocusoutPrevented), onReleaseRequested: vue.unref(onReleaseRequested) }, { default: vue.withCtx(() => [ vue.renderSlot(_ctx.$slots, "default") ]), _: 3 }, 8, ["trapped", "focus-trap-el", "focus-start-el", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusin", "onFocusoutPrevented", "onReleaseRequested"]) ], 16, ["onMouseenter", "onMouseleave"]); }; } }); var ElPopperContent = /* @__PURE__ */ _export_sfc$1(_sfc_main$d, [["__file", "content.vue"]]); const ElPopper = withInstall(Popper); const TOOLTIP_INJECTION_KEY = Symbol("elTooltip"); function useTimeout() { let timeoutHandle; const registerTimeout = (fn2, delay) => { cancelTimeout(); timeoutHandle = window.setTimeout(fn2, delay); }; const cancelTimeout = () => window.clearTimeout(timeoutHandle); tryOnScopeDispose$1(() => cancelTimeout()); return { registerTimeout, cancelTimeout }; } const useDelayedToggleProps = buildProps({ showAfter: { type: Number, default: 0 }, hideAfter: { type: Number, default: 200 }, autoClose: { type: Number, default: 0 } }); const useDelayedToggle = ({ showAfter, hideAfter, autoClose, open, close }) => { const { registerTimeout } = useTimeout(); const { registerTimeout: registerTimeoutForAutoClose, cancelTimeout: cancelTimeoutForAutoClose } = useTimeout(); const onOpen = (event) => { registerTimeout(() => { open(event); const _autoClose = vue.unref(autoClose); if (isNumber(_autoClose) && _autoClose > 0) { registerTimeoutForAutoClose(() => { close(event); }, _autoClose); } }, vue.unref(showAfter)); }; const onClose = (event) => { cancelTimeoutForAutoClose(); registerTimeout(() => { close(event); }, vue.unref(hideAfter)); }; return { onOpen, onClose }; }; const useTooltipContentProps = buildProps({ ...useDelayedToggleProps, ...popperContentProps, appendTo: { type: definePropType([String, Object]) }, content: { type: String, default: "" }, rawContent: Boolean, persistent: Boolean, visible: { type: definePropType(Boolean), default: null }, transition: String, teleported: { type: Boolean, default: true }, disabled: Boolean, ...useAriaProps(["ariaLabel"]) }); const useTooltipTriggerProps = buildProps({ ...popperTriggerProps, disabled: Boolean, trigger: { type: definePropType([String, Array]), default: "hover" }, triggerKeys: { type: definePropType(Array), default: () => [EVENT_CODE.enter, EVENT_CODE.numpadEnter, EVENT_CODE.space] } }); const _prop = buildProp({ type: definePropType(Boolean), default: null }); const _event = buildProp({ type: definePropType(Function) }); const createModelToggleComposable = (name) => { const updateEventKey = `update:${name}`; const updateEventKeyRaw = `onUpdate:${name}`; const useModelToggleEmits2 = [updateEventKey]; const useModelToggleProps2 = { [name]: _prop, [updateEventKeyRaw]: _event }; const useModelToggle2 = ({ indicator, toggleReason, shouldHideWhenRouteChanges, shouldProceed, onShow, onHide }) => { const instance = vue.getCurrentInstance(); const { emit } = instance; const props = instance.props; const hasUpdateHandler = vue.computed(() => isFunction$1(props[updateEventKeyRaw])); const isModelBindingAbsent = vue.computed(() => props[name] === null); const doShow = (event) => { if (indicator.value === true) { return; } indicator.value = true; if (toggleReason) { toggleReason.value = event; } if (isFunction$1(onShow)) { onShow(event); } }; const doHide = (event) => { if (indicator.value === false) { return; } indicator.value = false; if (toggleReason) { toggleReason.value = event; } if (isFunction$1(onHide)) { onHide(event); } }; const show = (event) => { if (props.disabled === true || isFunction$1(shouldProceed) && !shouldProceed()) return; const shouldEmit = hasUpdateHandler.value && isClient$1; if (shouldEmit) { emit(updateEventKey, true); } if (isModelBindingAbsent.value || !shouldEmit) { doShow(event); } }; const hide = (event) => { if (props.disabled === true || !isClient$1) return; const shouldEmit = hasUpdateHandler.value && isClient$1; if (shouldEmit) { emit(updateEventKey, false); } if (isModelBindingAbsent.value || !shouldEmit) { doHide(event); } }; const onChange = (val) => { if (!isBoolean(val)) return; if (props.disabled && val) { if (hasUpdateHandler.value) { emit(updateEventKey, false); } } else if (indicator.value !== val) { if (val) { doShow(); } else { doHide(); } } }; const toggle = () => { if (indicator.value) { hide(); } else { show(); } }; vue.watch(() => props[name], onChange); if (shouldHideWhenRouteChanges && instance.appContext.config.globalProperties.$route !== void 0) { vue.watch(() => ({ ...instance.proxy.$route }), () => { if (shouldHideWhenRouteChanges.value && indicator.value) { hide(); } }); } vue.onMounted(() => { onChange(props[name]); }); return { hide, show, toggle, hasUpdateHandler }; }; return { useModelToggle: useModelToggle2, useModelToggleProps: useModelToggleProps2, useModelToggleEmits: useModelToggleEmits2 }; }; const { useModelToggleProps: useTooltipModelToggleProps, useModelToggleEmits: useTooltipModelToggleEmits, useModelToggle: useTooltipModelToggle } = createModelToggleComposable("visible"); const useTooltipProps = buildProps({ ...popperProps, ...useTooltipModelToggleProps, ...useTooltipContentProps, ...useTooltipTriggerProps, ...popperArrowProps, showArrow: { type: Boolean, default: true } }); const tooltipEmits = [ ...useTooltipModelToggleEmits, "before-show", "before-hide", "show", "hide", "open", "close" ]; const isTriggerType = (trigger, type) => { if (isArray$1(trigger)) { return trigger.includes(type); } return trigger === type; }; const whenTrigger = (trigger, type, handler) => { return (e) => { isTriggerType(vue.unref(trigger), type) && handler(e); }; }; const composeEventHandlers = (theirsHandler, oursHandler, { checkForDefaultPrevented = true } = {}) => { const handleEvent = (event) => { const shouldPrevent = theirsHandler == null ? void 0 : theirsHandler(event); if (checkForDefaultPrevented === false || !shouldPrevent) { return oursHandler == null ? void 0 : oursHandler(event); } }; return handleEvent; }; const __default__$6 = vue.defineComponent({ name: "ElTooltipTrigger" }); const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({ ...__default__$6, props: useTooltipTriggerProps, setup(__props, { expose }) { const props = __props; const ns = useNamespace("tooltip"); const { controlled, id, open, onOpen, onClose, onToggle } = vue.inject(TOOLTIP_INJECTION_KEY, void 0); const triggerRef = vue.ref(null); const stopWhenControlledOrDisabled = () => { if (vue.unref(controlled) || props.disabled) { return true; } }; const trigger = vue.toRef(props, "trigger"); const onMouseenter = composeEventHandlers(stopWhenControlledOrDisabled, whenTrigger(trigger, "hover", onOpen)); const onMouseleave = composeEventHandlers(stopWhenControlledOrDisabled, whenTrigger(trigger, "hover", onClose)); const onClick = composeEventHandlers(stopWhenControlledOrDisabled, whenTrigger(trigger, "click", (e) => { if (e.button === 0) { onToggle(e); } })); const onFocus = composeEventHandlers(stopWhenControlledOrDisabled, whenTrigger(trigger, "focus", onOpen)); const onBlur = composeEventHandlers(stopWhenControlledOrDisabled, whenTrigger(trigger, "focus", onClose)); const onContextMenu = composeEventHandlers(stopWhenControlledOrDisabled, whenTrigger(trigger, "contextmenu", (e) => { e.preventDefault(); onToggle(e); })); const onKeydown = composeEventHandlers(stopWhenControlledOrDisabled, (e) => { const { code } = e; if (props.triggerKeys.includes(code)) { e.preventDefault(); onToggle(e); } }); expose({ triggerRef }); return (_ctx, _cache) => { return vue.openBlock(), vue.createBlock(vue.unref(ElPopperTrigger), { id: vue.unref(id), "virtual-ref": _ctx.virtualRef, open: vue.unref(open), "virtual-triggering": _ctx.virtualTriggering, class: vue.normalizeClass(vue.unref(ns).e("trigger")), onBlur: vue.unref(onBlur), onClick: vue.unref(onClick), onContextmenu: vue.unref(onContextMenu), onFocus: vue.unref(onFocus), onMouseenter: vue.unref(onMouseenter), onMouseleave: vue.unref(onMouseleave), onKeydown: vue.unref(onKeydown) }, { default: vue.withCtx(() => [ vue.renderSlot(_ctx.$slots, "default") ]), _: 3 }, 8, ["id", "virtual-ref", "open", "virtual-triggering", "class", "onBlur", "onClick", "onContextmenu", "onFocus", "onMouseenter", "onMouseleave", "onKeydown"]); }; } }); var ElTooltipTrigger = /* @__PURE__ */ _export_sfc$1(_sfc_main$c, [["__file", "trigger.vue"]]); const teleportProps = buildProps({ to: { type: definePropType([String, Object]), required: true }, disabled: Boolean }); const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({ __name: "teleport", props: teleportProps, setup(__props) { return (_ctx, _cache) => { return _ctx.disabled ? vue.renderSlot(_ctx.$slots, "default", { key: 0 }) : (vue.openBlock(), vue.createBlock(vue.Teleport, { key: 1, to: _ctx.to }, [ vue.renderSlot(_ctx.$slots, "default") ], 8, ["to"])); }; } }); var Teleport = /* @__PURE__ */ _export_sfc$1(_sfc_main$b, [["__file", "teleport.vue"]]); const ElTeleport = withInstall(Teleport); const usePopperContainerId = () => { const namespace = useGetDerivedNamespace(); const idInjection = useIdInjection(); const id = vue.computed(() => { return `${namespace.value}-popper-container-${idInjection.prefix}`; }); const selector = vue.computed(() => `#${id.value}`); return { id, selector }; }; const createContainer = (id) => { const container = document.createElement("div"); container.id = id; document.body.appendChild(container); return container; }; const usePopperContainer = () => { const { id, selector } = usePopperContainerId(); vue.onBeforeMount(() => { if (!isClient$1) return; if (!document.body.querySelector(selector.value)) { createContainer(id.value); } }); return { id, selector }; }; const __default__$5 = vue.defineComponent({ name: "ElTooltipContent", inheritAttrs: false }); const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({ ...__default__$5, props: useTooltipContentProps, setup(__props, { expose }) { const props = __props; const { selector } = usePopperContainerId(); const ns = useNamespace("tooltip"); const contentRef = vue.ref(); let stopHandle; const { controlled, id, open, trigger, onClose, onOpen, onShow, onHide, onBeforeShow, onBeforeHide } = vue.inject(TOOLTIP_INJECTION_KEY, void 0); const transitionClass = vue.computed(() => { return props.transition || `${ns.namespace.value}-fade-in-linear`; }); const persistentRef = vue.computed(() => { return props.persistent; }); vue.onBeforeUnmount(() => { stopHandle == null ? void 0 : stopHandle(); }); const shouldRender = vue.computed(() => { return vue.unref(persistentRef) ? true : vue.unref(open); }); const shouldShow = vue.computed(() => { return props.disabled ? false : vue.unref(open); }); const appendTo = vue.computed(() => { return props.appendTo || selector.value; }); const contentStyle = vue.computed(() => { var _a2; return (_a2 = props.style) != null ? _a2 : {}; }); const ariaHidden = vue.ref(true); const onTransitionLeave = () => { onHide(); isFocusInsideContent() && tryFocus(document.body); ariaHidden.value = true; }; const stopWhenControlled = () => { if (vue.unref(controlled)) return true; }; const onContentEnter = composeEventHandlers(stopWhenControlled, () => { if (props.enterable && vue.unref(trigger) === "hover") { onOpen(); } }); const onContentLeave = composeEventHandlers(stopWhenControlled, () => { if (vue.unref(trigger) === "hover") { onClose(); } }); const onBeforeEnter = () => { var _a2, _b; (_b = (_a2 = contentRef.value) == null ? void 0 : _a2.updatePopper) == null ? void 0 : _b.call(_a2); onBeforeShow == null ? void 0 : onBeforeShow(); }; const onBeforeLeave = () => { onBeforeHide == null ? void 0 : onBeforeHide(); }; const onAfterShow = () => { onShow(); stopHandle = onClickOutside(vue.computed(() => { var _a2; return (_a2 = contentRef.value) == null ? void 0 : _a2.popperContentRef; }), () => { if (vue.unref(controlled)) return; const $trigger = vue.unref(trigger); if ($trigger !== "hover") { onClose(); } }); }; const onBlur = () => { if (!props.virtualTriggering) { onClose(); } }; const isFocusInsideContent = (event) => { var _a2; const popperContent = (_a2 = contentRef.value) == null ? void 0 : _a2.popperContentRef; const activeElement = (event == null ? void 0 : event.relatedTarget) || document.activeElement; return popperContent == null ? void 0 : popperContent.contains(activeElement); }; vue.watch(() => vue.unref(open), (val) => { if (!val) { stopHandle == null ? void 0 : stopHandle(); } else { ariaHidden.value = false; } }, { flush: "post" }); vue.watch(() => props.content, () => { var _a2, _b; (_b = (_a2 = contentRef.value) == null ? void 0 : _a2.updatePopper) == null ? void 0 : _b.call(_a2); }); expose({ contentRef, isFocusInsideContent }); return (_ctx, _cache) => { return vue.openBlock(), vue.createBlock(vue.unref(ElTeleport), { disabled: !_ctx.teleported, to: vue.unref(appendTo) }, { default: vue.withCtx(() => [ vue.createVNode(vue.Transition, { name: vue.unref(transitionClass), onAfterLeave: onTransitionLeave, onBeforeEnter, onAfterEnter: onAfterShow, onBeforeLeave }, { default: vue.withCtx(() => [ vue.unref(shouldRender) ? vue.withDirectives((vue.openBlock(), vue.createBlock(vue.unref(ElPopperContent), vue.mergeProps({ key: 0, id: vue.unref(id), ref_key: "contentRef", ref: contentRef }, _ctx.$attrs, { "aria-label": _ctx.ariaLabel, "aria-hidden": ariaHidden.value, "boundaries-padding": _ctx.boundariesPadding, "fallback-placements": _ctx.fallbackPlacements, "gpu-acceleration": _ctx.gpuAcceleration, offset: _ctx.offset, placement: _ctx.placement, "popper-options": _ctx.popperOptions, strategy: _ctx.strategy, effect: _ctx.effect, enterable: _ctx.enterable, pure: _ctx.pure, "popper-class": _ctx.popperClass, "popper-style": [_ctx.popperStyle, vue.unref(contentStyle)], "reference-el": _ctx.referenceEl, "trigger-target-el": _ctx.triggerTargetEl, visible: vue.unref(shouldShow), "z-index": _ctx.zIndex, onMouseenter: vue.unref(onContentEnter), onMouseleave: vue.unref(onContentLeave), onBlur, onClose: vue.unref(onClose) }), { default: vue.withCtx(() => [ vue.renderSlot(_ctx.$slots, "default") ]), _: 3 }, 16, ["id", "aria-label", "aria-hidden", "boundaries-padding", "fallback-placements", "gpu-acceleration", "offset", "placement", "popper-options", "strategy", "effect", "enterable", "pure", "popper-class", "popper-style", "reference-el", "trigger-target-el", "visible", "z-index", "onMouseenter", "onMouseleave", "onClose"])), [ [vue.vShow, vue.unref(shouldShow)] ]) : vue.createCommentVNode("v-if", true) ]), _: 3 }, 8, ["name"]) ]), _: 3 }, 8, ["disabled", "to"]); }; } }); var ElTooltipContent = /* @__PURE__ */ _export_sfc$1(_sfc_main$a, [["__file", "content.vue"]]); const __default__$4 = vue.defineComponent({ name: "ElTooltip" }); const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({ ...__default__$4, props: useTooltipProps, emits: tooltipEmits, setup(__props, { expose, emit }) { const props = __props; usePopperContainer(); const id = useId(); const popperRef = vue.ref(); const contentRef = vue.ref(); const updatePopper = () => { var _a2; const popperComponent = vue.unref(popperRef); if (popperComponent) { (_a2 = popperComponent.popperInstanceRef) == null ? void 0 : _a2.update(); } }; const open = vue.ref(false); const toggleReason = vue.ref(); const { show, hide, hasUpdateHandler } = useTooltipModelToggle({ indicator: open, toggleReason }); const { onOpen, onClose } = useDelayedToggle({ showAfter: vue.toRef(props, "showAfter"), hideAfter: vue.toRef(props, "hideAfter"), autoClose: vue.toRef(props, "autoClose"), open: show, close: hide }); const controlled = vue.computed(() => isBoolean(props.visible) && !hasUpdateHandler.value); vue.provide(TOOLTIP_INJECTION_KEY, { controlled, id, open: vue.readonly(open), trigger: vue.toRef(props, "trigger"), onOpen: (event) => { onOpen(event); }, onClose: (event) => { onClose(event); }, onToggle: (event) => { if (vue.unref(open)) { onClose(event); } else { onOpen(event); } }, onShow: () => { emit("show", toggleReason.value); }, onHide: () => { emit("hide", toggleReason.value); }, onBeforeShow: () => { emit("before-show", toggleReason.value); }, onBeforeHide: () => { emit("before-hide", toggleReason.value); }, updatePopper }); vue.watch(() => props.disabled, (disabled) => { if (disabled && open.value) { open.value = false; } }); const isFocusInsideContent = (event) => { var _a2; return (_a2 = contentRef.value) == null ? void 0 : _a2.isFocusInsideContent(event); }; vue.onDeactivated(() => open.value && hide()); expose({ popperRef, contentRef, isFocusInsideContent, updatePopper, onOpen, onClose, hide }); return (_ctx, _cache) => { return vue.openBlock(), vue.createBlock(vue.unref(ElPopper), { ref_key: "popperRef", ref: popperRef, role: _ctx.role }, { default: vue.withCtx(() => [ vue.createVNode(ElTooltipTrigger, { disabled: _ctx.disabled, trigger: _ctx.trigger, "trigger-keys": _ctx.triggerKeys, "virtual-ref": _ctx.virtualRef, "virtual-triggering": _ctx.virtualTriggering }, { default: vue.withCtx(() => [ _ctx.$slots.default ? vue.renderSlot(_ctx.$slots, "default", { key: 0 }) : vue.createCommentVNode("v-if", true) ]), _: 3 }, 8, ["disabled", "trigger", "trigger-keys", "virtual-ref", "virtual-triggering"]), vue.createVNode(ElTooltipContent, { ref_key: "contentRef", ref: contentRef, "aria-label": _ctx.ariaLabel, "boundaries-padding": _ctx.boundariesPadding, content: _ctx.content, disabled: _ctx.disabled, effect: _ctx.effect, enterable: _ctx.enterable, "fallback-placements": _ctx.fallbackPlacements, "hide-after": _ctx.hideAfter, "gpu-acceleration": _ctx.gpuAcceleration, offset: _ctx.offset, persistent: _ctx.persistent, "popper-class": _ctx.popperClass, "popper-style": _ctx.popperStyle, placement: _ctx.placement, "popper-options": _ctx.popperOptions, pure: _ctx.pure, "raw-content": _ctx.rawContent, "reference-el": _ctx.referenceEl, "trigger-target-el": _ctx.triggerTargetEl, "show-after": _ctx.showAfter, strategy: _ctx.strategy, teleported: _ctx.teleported, transition: _ctx.transition, "virtual-triggering": _ctx.virtualTriggering, "z-index": _ctx.zIndex, "append-to": _ctx.appendTo }, { default: vue.withCtx(() => [ vue.renderSlot(_ctx.$slots, "content", {}, () => [ _ctx.rawContent ? (vue.openBlock(), vue.createElementBlock("span", { key: 0, innerHTML: _ctx.content }, null, 8, ["innerHTML"])) : (vue.openBlock(), vue.createElementBlock("span", { key: 1 }, vue.toDisplayString(_ctx.content), 1)) ]), _ctx.showArrow ? (vue.openBlock(), vue.createBlock(vue.unref(ElPopperArrow), { key: 0, "arrow-offset": _ctx.arrowOffset }, null, 8, ["arrow-offset"])) : vue.createCommentVNode("v-if", true) ]), _: 3 }, 8, ["aria-label", "boundaries-padding", "content", "disabled", "effect", "enterable", "fallback-placements", "hide-after", "gpu-acceleration", "offset", "persistent", "popper-class", "popper-style", "placement", "popper-options", "pure", "raw-content", "reference-el", "trigger-target-el", "show-after", "strategy", "teleported", "transition", "virtual-triggering", "z-index", "append-to"]) ]), _: 3 }, 8, ["role"]); }; } }); var Tooltip = /* @__PURE__ */ _export_sfc$1(_sfc_main$9, [["__file", "tooltip.vue"]]); const ElTooltip = withInstall(Tooltip); const useDeprecated = ({ from, replacement, scope, version, ref: ref2, type = "API" }, condition) => { vue.watch(() => vue.unref(condition), (val) => { }, { immediate: true }); }; 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 }, border: Boolean, size: useSizeProp, tabindex: [String, Number], validateEvent: { type: Boolean, default: true }, ...useAriaProps(["ariaControls"]) }; const checkboxEmits = { [UPDATE_MODEL_EVENT]: (val) => isString$1(val) || isNumber(val) || isBoolean(val), change: (val) => isString$1(val) || isNumber(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(max) && model.value.length >= max && !isChecked.value || !isUndefined(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(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((o2) => isEqual(o2, 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: "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 __default__$3 = vue.defineComponent({ name: "ElCheckbox" }); const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({ ...__default__$3, 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.ariaControls : null, onClick: vue.unref(onClickRoot) }, { default: vue.withCtx(() => { var _a2, _b, _c, _d; 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": ($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": (_b = (_a2 = _ctx.trueValue) != null ? _a2 : _ctx.trueLabel) != null ? _b : true, "false-value": (_d = (_c = _ctx.falseValue) != null ? _c : _ctx.falseLabel) != null ? _d : false, onChange: vue.unref(handleChange), onFocus: ($event) => isFocused.value = true, onBlur: ($event) => isFocused.value = false, onClick: vue.withModifiers(() => { }, ["stop"]) }, null, 42, ["id", "onUpdate:modelValue", "indeterminate", "name", "tabindex", "disabled", "true-value", "false-value", "onChange", "onFocus", "onBlur", "onClick"])), [ [vue.vModelCheckbox, vue.unref(model)] ]) : vue.withDirectives((vue.openBlock(), vue.createElementBlock("input", { key: 1, id: vue.unref(inputId), "onUpdate:modelValue": ($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: vue.unref(handleChange), onFocus: ($event) => isFocused.value = true, onBlur: ($event) => isFocused.value = false, onClick: vue.withModifiers(() => { }, ["stop"]) }, null, 42, ["id", "onUpdate:modelValue", "indeterminate", "disabled", "value", "name", "tabindex", "onChange", "onFocus", "onBlur", "onClick"])), [ [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$8, [["__file", "checkbox.vue"]]); const __default__$2 = vue.defineComponent({ name: "ElCheckboxButton" }); const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({ ...__default__$2, 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, _c, _d; 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": ($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": (_b = (_a2 = _ctx.trueValue) != null ? _a2 : _ctx.trueLabel) != null ? _b : true, "false-value": (_d = (_c = _ctx.falseValue) != null ? _c : _ctx.falseLabel) != null ? _d : false, onChange: vue.unref(handleChange), onFocus: ($event) => isFocused.value = true, onBlur: ($event) => isFocused.value = false, onClick: vue.withModifiers(() => { }, ["stop"]) }, null, 42, ["onUpdate:modelValue", "name", "tabindex", "disabled", "true-value", "false-value", "onChange", "onFocus", "onBlur", "onClick"])), [ [vue.vModelCheckbox, vue.unref(model)] ]) : vue.withDirectives((vue.openBlock(), vue.createElementBlock("input", { key: 1, "onUpdate:modelValue": ($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: vue.unref(handleChange), onFocus: ($event) => isFocused.value = true, onBlur: ($event) => isFocused.value = false, onClick: vue.withModifiers(() => { }, ["stop"]) }, null, 42, ["onUpdate:modelValue", "name", "tabindex", "disabled", "value", "onChange", "onFocus", "onBlur", "onClick"])), [ [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$7, [["__file", "checkbox-button.vue"]]); const checkboxGroupProps = buildProps({ modelValue: { type: definePropType(Array), default: () => [] }, disabled: Boolean, min: Number, max: Number, size: useSizeProp, 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__$1 = vue.defineComponent({ name: "ElCheckboxGroup" }); const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({ ...__default__$1, 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 }); 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.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$6, [["__file", "checkbox-group.vue"]]); const ElCheckbox = withInstall(Checkbox, { CheckboxButton, CheckboxGroup }); withNoopInstall(CheckboxButton); withNoopInstall(CheckboxGroup); const nodeList = /* @__PURE__ */ new Map(); if (isClient$1) { let startClick; document.addEventListener("mousedown", (e) => startClick = e); document.addEventListener("mouseup", (e) => { if (startClick) { for (const handlers2 of nodeList.values()) { for (const { documentHandler } of handlers2) { documentHandler(e, startClick); } } startClick = void 0; } }); } function createDocumentHandler(el, binding) { let excludes = []; if (isArray$1(binding.arg)) { excludes = binding.arg; } else if (isElement(binding.arg)) { excludes.push(binding.arg); } return function(mouseup, mousedown) { const popperRef = binding.instance.popperRef; const mouseUpTarget = mouseup.target; const mouseDownTarget = mousedown == null ? void 0 : mousedown.target; const isBound = !binding || !binding.instance; const isTargetExists = !mouseUpTarget || !mouseDownTarget; const isContainedByEl = el.contains(mouseUpTarget) || el.contains(mouseDownTarget); const isSelf = el === mouseUpTarget; const isTargetExcluded = excludes.length && excludes.some((item) => item == null ? void 0 : item.contains(mouseUpTarget)) || excludes.length && excludes.includes(mouseDownTarget); const isContainedByPopper = popperRef && (popperRef.contains(mouseUpTarget) || popperRef.contains(mouseDownTarget)); if (isBound || isTargetExists || isContainedByEl || isSelf || isTargetExcluded || isContainedByPopper) { return; } binding.value(mouseup, mousedown); }; } const ClickOutside = { beforeMount(el, binding) { if (!nodeList.has(el)) { nodeList.set(el, []); } nodeList.get(el).push({ documentHandler: createDocumentHandler(el, binding), bindingFn: binding.value }); }, updated(el, binding) { if (!nodeList.has(el)) { nodeList.set(el, []); } const handlers2 = nodeList.get(el); const oldHandlerIndex = handlers2.findIndex((item) => item.bindingFn === binding.oldValue); const newHandler = { documentHandler: createDocumentHandler(el, binding), bindingFn: binding.value }; if (oldHandlerIndex >= 0) { handlers2.splice(oldHandlerIndex, 1, newHandler); } else { handlers2.push(newHandler); } }, unmounted(el) { nodeList.delete(el); } }; const getCell = function(event) { var _a2; return (_a2 = event.target) == null ? void 0 : _a2.closest("td"); }; const orderBy = function(array, sortKey, reverse, sortMethod, sortBy) { if (!sortKey && !sortMethod && (!sortBy || isArray$1(sortBy) && !sortBy.length)) { return array; } if (isString$1(reverse)) { reverse = reverse === "descending" ? -1 : 1; } else { reverse = reverse && reverse < 0 ? -1 : 1; } const getKey = sortMethod ? null : function(value, index) { if (sortBy) { if (!isArray$1(sortBy)) { sortBy = [sortBy]; } return sortBy.map((by) => { if (isString$1(by)) { return get(value, by); } else { return by(value, index, array); } }); } if (sortKey !== "$key") { if (isObject$2(value) && "$value" in value) value = value.$value; } return [isObject$2(value) ? get(value, sortKey) : value]; }; const compare = function(a2, b2) { if (sortMethod) { return sortMethod(a2.value, b2.value); } for (let i = 0, len = a2.key.length; i < len; i++) { if (a2.key[i] < b2.key[i]) { return -1; } if (a2.key[i] > b2.key[i]) { return 1; } } return 0; }; return array.map((value, index) => { return { value, index, key: getKey ? getKey(value, index) : null }; }).sort((a2, b2) => { let order = compare(a2, b2); if (!order) { order = a2.index - b2.index; } return order * +reverse; }).map((item) => item.value); }; const getColumnById = function(table, columnId) { let column = null; table.columns.forEach((item) => { if (item.id === columnId) { column = item; } }); return column; }; const getColumnByKey = function(table, columnKey) { let column = null; for (let i = 0; i < table.columns.length; i++) { const item = table.columns[i]; if (item.columnKey === columnKey) { column = item; break; } } if (!column) throwError("ElTable", `No column matching with column-key: ${columnKey}`); return column; }; const getColumnByCell = function(table, cell, namespace) { const matches = (cell.className || "").match(new RegExp(`${namespace}-table_[^\\s]+`, "gm")); if (matches) { return getColumnById(table, matches[0]); } return null; }; const getRowIdentity = (row, rowKey) => { if (!row) throw new Error("Row is required when get row identity"); if (isString$1(rowKey)) { if (!rowKey.includes(".")) { return `${row[rowKey]}`; } const key = rowKey.split("."); let current = row; for (const element of key) { current = current[element]; } return `${current}`; } else if (isFunction$1(rowKey)) { return rowKey.call(null, row); } }; const getKeysMap = function(array, rowKey) { const arrayMap2 = {}; (array || []).forEach((row, index) => { arrayMap2[getRowIdentity(row, rowKey)] = { row, index }; }); return arrayMap2; }; function mergeOptions(defaults, config) { const options = {}; let key; for (key in defaults) { options[key] = defaults[key]; } for (key in config) { if (hasOwn(config, key)) { const value = config[key]; if (!isUndefined(value)) { options[key] = value; } } } return options; } function parseWidth(width) { if (width === "") return width; if (!isUndefined(width)) { width = Number.parseInt(width, 10); if (Number.isNaN(width)) { width = ""; } } return width; } function parseMinWidth(minWidth) { if (minWidth === "") return minWidth; if (!isUndefined(minWidth)) { minWidth = parseWidth(minWidth); if (Number.isNaN(minWidth)) { minWidth = 80; } } return minWidth; } function parseHeight(height) { if (isNumber(height)) { return height; } if (isString$1(height)) { if (/^\d+(?:px)?$/.test(height)) { return Number.parseInt(height, 10); } else { return height; } } return null; } function compose(...funcs) { if (funcs.length === 0) { return (arg) => arg; } if (funcs.length === 1) { return funcs[0]; } return funcs.reduce((a2, b2) => (...args) => a2(b2(...args))); } function toggleRowStatus(statusArr, row, newVal, tableTreeProps, selectable, rowIndex) { let _rowIndex = rowIndex != null ? rowIndex : 0; let changed = false; const index = statusArr.indexOf(row); const included = index !== -1; const isRowSelectable = selectable == null ? void 0 : selectable.call(null, row, _rowIndex); const toggleStatus = (type) => { if (type === "add") { statusArr.push(row); } else { statusArr.splice(index, 1); } changed = true; }; const getChildrenCount = (row2) => { let count = 0; const children = (tableTreeProps == null ? void 0 : tableTreeProps.children) && row2[tableTreeProps.children]; if (children && isArray$1(children)) { count += children.length; children.forEach((item) => { count += getChildrenCount(item); }); } return count; }; if (!selectable || isRowSelectable) { if (isBoolean(newVal)) { if (newVal && !included) { toggleStatus("add"); } else if (!newVal && included) { toggleStatus("remove"); } } else { included ? toggleStatus("remove") : toggleStatus("add"); } } if (!(tableTreeProps == null ? void 0 : tableTreeProps.checkStrictly) && (tableTreeProps == null ? void 0 : tableTreeProps.children) && isArray$1(row[tableTreeProps.children])) { row[tableTreeProps.children].forEach((item) => { const childChanged = toggleRowStatus(statusArr, item, newVal != null ? newVal : !included, tableTreeProps, selectable, _rowIndex + 1); _rowIndex += getChildrenCount(item) + 1; if (childChanged) { changed = childChanged; } }); } return changed; } function walkTreeNode(root2, cb, childrenKey = "children", lazyKey = "hasChildren") { const isNil2 = (array) => !(isArray$1(array) && array.length); function _walker(parent, children, level) { cb(parent, children, level); children.forEach((item) => { if (item[lazyKey]) { cb(item, null, level + 1); return; } const children2 = item[childrenKey]; if (!isNil2(children2)) { _walker(item, children2, level + 1); } }); } root2.forEach((item) => { if (item[lazyKey]) { cb(item, null, 0); return; } const children = item[childrenKey]; if (!isNil2(children)) { _walker(item, children, 0); } }); } const getTableOverflowTooltipProps = (props, innerText, row, column) => { const popperOptions = { strategy: "fixed", ...props.popperOptions }; const tooltipFormatterContent = isFunction$1(column.tooltipFormatter) ? column.tooltipFormatter({ row, column, cellValue: getProp(row, column.property).value }) : void 0; if (vue.isVNode(tooltipFormatterContent)) { return { slotContent: tooltipFormatterContent, content: null, ...props, popperOptions }; } return { slotContent: null, content: tooltipFormatterContent != null ? tooltipFormatterContent : innerText, ...props, popperOptions }; }; let removePopper = null; function createTablePopper(props, popperContent, row, column, trigger, table) { const tableOverflowTooltipProps = getTableOverflowTooltipProps(props, popperContent, row, column); const mergedProps = { ...tableOverflowTooltipProps, slotContent: void 0 }; if ((removePopper == null ? void 0 : removePopper.trigger) === trigger) { const comp = removePopper.vm.component; merge(comp.props, mergedProps); if (tableOverflowTooltipProps.slotContent) { comp.slots.content = () => [tableOverflowTooltipProps.slotContent]; } return; } removePopper == null ? void 0 : removePopper(); const parentNode = table == null ? void 0 : table.refs.tableWrapper; const ns = parentNode == null ? void 0 : parentNode.dataset.prefix; const vm = vue.createVNode(ElTooltip, { virtualTriggering: true, virtualRef: trigger, appendTo: parentNode, placement: "top", transition: "none", offset: 0, hideAfter: 0, ...mergedProps }, tableOverflowTooltipProps.slotContent ? { content: () => tableOverflowTooltipProps.slotContent } : void 0); vm.appContext = { ...table.appContext, ...table }; const container = document.createElement("div"); vue.render(vm, container); vm.component.exposed.onOpen(); const scrollContainer = parentNode == null ? void 0 : parentNode.querySelector(`.${ns}-scrollbar__wrap`); removePopper = () => { vue.render(null, container); scrollContainer == null ? void 0 : scrollContainer.removeEventListener("scroll", removePopper); removePopper = null; }; removePopper.trigger = trigger; removePopper.vm = vm; scrollContainer == null ? void 0 : scrollContainer.addEventListener("scroll", removePopper); } function getCurrentColumns(column) { if (column.children) { return flatMap(column.children, getCurrentColumns); } else { return [column]; } } function getColSpan(colSpan, column) { return colSpan + column.colSpan; } const isFixedColumn = (index, fixed, store, realColumns) => { let start = 0; let after = index; const columns = store.states.columns.value; if (realColumns) { const curColumns = getCurrentColumns(realColumns[index]); const preColumns = columns.slice(0, columns.indexOf(curColumns[0])); start = preColumns.reduce(getColSpan, 0); after = start + curColumns.reduce(getColSpan, 0) - 1; } else { start = index; } let fixedLayout; switch (fixed) { case "left": if (after < store.states.fixedLeafColumnsLength.value) { fixedLayout = "left"; } break; case "right": if (start >= columns.length - store.states.rightFixedLeafColumnsLength.value) { fixedLayout = "right"; } break; default: if (after < store.states.fixedLeafColumnsLength.value) { fixedLayout = "left"; } else if (start >= columns.length - store.states.rightFixedLeafColumnsLength.value) { fixedLayout = "right"; } } return fixedLayout ? { direction: fixedLayout, start, after } : {}; }; const getFixedColumnsClass = (namespace, index, fixed, store, realColumns, offset = 0) => { const classes = []; const { direction, start, after } = isFixedColumn(index, fixed, store, realColumns); if (direction) { const isLeft = direction === "left"; classes.push(`${namespace}-fixed-column--${direction}`); if (isLeft && after + offset === store.states.fixedLeafColumnsLength.value - 1) { classes.push("is-last-column"); } else if (!isLeft && start - offset === store.states.columns.value.length - store.states.rightFixedLeafColumnsLength.value) { classes.push("is-first-column"); } } return classes; }; function getOffset(offset, column) { return offset + (isNull(column.realWidth) || Number.isNaN(column.realWidth) ? Number(column.width) : column.realWidth); } const getFixedColumnOffset = (index, fixed, store, realColumns) => { const { direction, start = 0, after = 0 } = isFixedColumn(index, fixed, store, realColumns); if (!direction) { return; } const styles = {}; const isLeft = direction === "left"; const columns = store.states.columns.value; if (isLeft) { styles.left = columns.slice(0, start).reduce(getOffset, 0); } else { styles.right = columns.slice(after + 1).reverse().reduce(getOffset, 0); } return styles; }; const ensurePosition = (style, key) => { if (!style) return; if (!Number.isNaN(style[key])) { style[key] = `${style[key]}px`; } }; function useExpand(watcherData) { const instance = vue.getCurrentInstance(); const defaultExpandAll = vue.ref(false); const expandRows = vue.ref([]); const updateExpandRows = () => { const data = watcherData.data.value || []; const rowKey = watcherData.rowKey.value; if (defaultExpandAll.value) { expandRows.value = data.slice(); } else if (rowKey) { const expandRowsMap = getKeysMap(expandRows.value, rowKey); expandRows.value = data.reduce((prev, row) => { const rowId = getRowIdentity(row, rowKey); const rowInfo = expandRowsMap[rowId]; if (rowInfo) { prev.push(row); } return prev; }, []); } else { expandRows.value = []; } }; const toggleRowExpansion = (row, expanded) => { const changed = toggleRowStatus(expandRows.value, row, expanded); if (changed) { instance.emit("expand-change", row, expandRows.value.slice()); } }; const setExpandRowKeys = (rowKeys) => { instance.store.assertRowKey(); const data = watcherData.data.value || []; const rowKey = watcherData.rowKey.value; const keysMap = getKeysMap(data, rowKey); expandRows.value = rowKeys.reduce((prev, cur) => { const info = keysMap[cur]; if (info) { prev.push(info.row); } return prev; }, []); }; const isRowExpanded = (row) => { const rowKey = watcherData.rowKey.value; if (rowKey) { const expandMap = getKeysMap(expandRows.value, rowKey); return !!expandMap[getRowIdentity(row, rowKey)]; } return expandRows.value.includes(row); }; return { updateExpandRows, toggleRowExpansion, setExpandRowKeys, isRowExpanded, states: { expandRows, defaultExpandAll } }; } function useCurrent(watcherData) { const instance = vue.getCurrentInstance(); const _currentRowKey = vue.ref(null); const currentRow = vue.ref(null); const setCurrentRowKey = (key) => { instance.store.assertRowKey(); _currentRowKey.value = key; setCurrentRowByKey(key); }; const restoreCurrentRowKey = () => { _currentRowKey.value = null; }; const setCurrentRowByKey = (key) => { const { data, rowKey } = watcherData; let _currentRow = null; if (rowKey.value) { _currentRow = (vue.unref(data) || []).find((item) => getRowIdentity(item, rowKey.value) === key); } currentRow.value = _currentRow; instance.emit("current-change", currentRow.value, null); }; const updateCurrentRow = (_currentRow) => { const oldCurrentRow = currentRow.value; if (_currentRow && _currentRow !== oldCurrentRow) { currentRow.value = _currentRow; instance.emit("current-change", currentRow.value, oldCurrentRow); return; } if (!_currentRow && oldCurrentRow) { currentRow.value = null; instance.emit("current-change", null, oldCurrentRow); } }; const updateCurrentRowData = () => { const rowKey = watcherData.rowKey.value; const data = watcherData.data.value || []; const oldCurrentRow = currentRow.value; if (!data.includes(oldCurrentRow) && oldCurrentRow) { if (rowKey) { const currentRowKey = getRowIdentity(oldCurrentRow, rowKey); setCurrentRowByKey(currentRowKey); } else { currentRow.value = null; } if (isNull(currentRow.value)) { instance.emit("current-change", null, oldCurrentRow); } } else if (_currentRowKey.value) { setCurrentRowByKey(_currentRowKey.value); restoreCurrentRowKey(); } }; return { setCurrentRowKey, restoreCurrentRowKey, setCurrentRowByKey, updateCurrentRow, updateCurrentRowData, states: { _currentRowKey, currentRow } }; } function useTree(watcherData) { const expandRowKeys = vue.ref([]); const treeData = vue.ref({}); const indent = vue.ref(16); const lazy = vue.ref(false); const lazyTreeNodeMap = vue.ref({}); const lazyColumnIdentifier = vue.ref("hasChildren"); const childrenColumnName = vue.ref("children"); const checkStrictly = vue.ref(false); const instance = vue.getCurrentInstance(); const normalizedData = vue.computed(() => { if (!watcherData.rowKey.value) return {}; const data = watcherData.data.value || []; return normalize(data); }); const normalizedLazyNode = vue.computed(() => { const rowKey = watcherData.rowKey.value; const keys2 = Object.keys(lazyTreeNodeMap.value); const res = {}; if (!keys2.length) return res; keys2.forEach((key) => { if (lazyTreeNodeMap.value[key].length) { const item = { children: [] }; lazyTreeNodeMap.value[key].forEach((row) => { const currentRowKey = getRowIdentity(row, rowKey); item.children.push(currentRowKey); if (row[lazyColumnIdentifier.value] && !res[currentRowKey]) { res[currentRowKey] = { children: [] }; } }); res[key] = item; } }); return res; }); const normalize = (data) => { const rowKey = watcherData.rowKey.value; const res = {}; walkTreeNode(data, (parent, children, level) => { const parentId = getRowIdentity(parent, rowKey); if (isArray$1(children)) { res[parentId] = { children: children.map((row) => getRowIdentity(row, rowKey)), level }; } else if (lazy.value) { res[parentId] = { children: [], lazy: true, level }; } }, childrenColumnName.value, lazyColumnIdentifier.value); return res; }; const updateTreeData = (ifChangeExpandRowKeys = false, ifExpandAll = ((_a2) => (_a2 = instance.store) == null ? void 0 : _a2.states.defaultExpandAll.value)()) => { var _a2; const nested = normalizedData.value; const normalizedLazyNode_ = normalizedLazyNode.value; const keys2 = Object.keys(nested); const newTreeData = {}; if (keys2.length) { const oldTreeData = vue.unref(treeData); const rootLazyRowKeys = []; const getExpanded = (oldValue, key) => { if (ifChangeExpandRowKeys) { if (expandRowKeys.value) { return ifExpandAll || expandRowKeys.value.includes(key); } else { return !!(ifExpandAll || (oldValue == null ? void 0 : oldValue.expanded)); } } else { const included = ifExpandAll || expandRowKeys.value && expandRowKeys.value.includes(key); return !!((oldValue == null ? void 0 : oldValue.expanded) || included); } }; keys2.forEach((key) => { const oldValue = oldTreeData[key]; const newValue = { ...nested[key] }; newValue.expanded = getExpanded(oldValue, key); if (newValue.lazy) { const { loaded = false, loading = false } = oldValue || {}; newValue.loaded = !!loaded; newValue.loading = !!loading; rootLazyRowKeys.push(key); } newTreeData[key] = newValue; }); const lazyKeys = Object.keys(normalizedLazyNode_); if (lazy.value && lazyKeys.length && rootLazyRowKeys.length) { lazyKeys.forEach((key) => { const oldValue = oldTreeData[key]; const lazyNodeChildren = normalizedLazyNode_[key].children; if (rootLazyRowKeys.includes(key)) { if (newTreeData[key].children.length !== 0) { throw new Error("[ElTable]children must be an empty array."); } newTreeData[key].children = lazyNodeChildren; } else { const { loaded = false, loading = false } = oldValue || {}; newTreeData[key] = { lazy: true, loaded: !!loaded, loading: !!loading, expanded: getExpanded(oldValue, key), children: lazyNodeChildren, level: "" }; } }); } } treeData.value = newTreeData; (_a2 = instance.store) == null ? void 0 : _a2.updateTableScrollY(); }; vue.watch(() => expandRowKeys.value, () => { updateTreeData(true); }); vue.watch(() => normalizedData.value, () => { updateTreeData(); }); vue.watch(() => normalizedLazyNode.value, () => { updateTreeData(); }); const updateTreeExpandKeys = (value) => { expandRowKeys.value = value; updateTreeData(); }; const isUseLazy = (data) => { return lazy.value && data && "loaded" in data && !data.loaded; }; const toggleTreeExpansion = (row, expanded) => { instance.store.assertRowKey(); const rowKey = watcherData.rowKey.value; const id = getRowIdentity(row, rowKey); const data = id && treeData.value[id]; if (id && data && "expanded" in data) { const oldExpanded = data.expanded; expanded = isUndefined(expanded) ? !data.expanded : expanded; treeData.value[id].expanded = expanded; if (oldExpanded !== expanded) { instance.emit("expand-change", row, expanded); } isUseLazy(data) && loadData(row, id, data); instance.store.updateTableScrollY(); } }; const loadOrToggle = (row) => { instance.store.assertRowKey(); const rowKey = watcherData.rowKey.value; const id = getRowIdentity(row, rowKey); const data = treeData.value[id]; if (isUseLazy(data)) { loadData(row, id, data); } else { toggleTreeExpansion(row, void 0); } }; const loadData = (row, key, treeNode) => { const { load } = instance.props; if (load && !treeData.value[key].loaded) { treeData.value[key].loading = true; load(row, treeNode, (data) => { if (!isArray$1(data)) { throw new TypeError("[ElTable] data must be an array"); } treeData.value[key].loading = false; treeData.value[key].loaded = true; treeData.value[key].expanded = true; if (data.length) { lazyTreeNodeMap.value[key] = data; } instance.emit("expand-change", row, true); }); } }; const updateKeyChildren = (key, data) => { const { lazy: lazy2, rowKey } = instance.props; if (!lazy2) return; if (!rowKey) throw new Error("[Table] rowKey is required in updateKeyChild"); if (lazyTreeNodeMap.value[key]) { lazyTreeNodeMap.value[key] = data; } }; return { loadData, loadOrToggle, toggleTreeExpansion, updateTreeExpandKeys, updateTreeData, updateKeyChildren, normalize, states: { expandRowKeys, treeData, indent, lazy, lazyTreeNodeMap, lazyColumnIdentifier, childrenColumnName, checkStrictly } }; } const sortData = (data, states) => { const sortingColumn = states.sortingColumn; if (!sortingColumn || isString$1(sortingColumn.sortable)) { return data; } return orderBy(data, states.sortProp, states.sortOrder, sortingColumn.sortMethod, sortingColumn.sortBy); }; const doFlattenColumns = (columns) => { const result = []; columns.forEach((column) => { if (column.children && column.children.length > 0) { result.push.apply(result, doFlattenColumns(column.children)); } else { result.push(column); } }); return result; }; function useWatcher$1() { var _a2; const instance = vue.getCurrentInstance(); const { size: tableSize } = vue.toRefs((_a2 = instance.proxy) == null ? void 0 : _a2.$props); const rowKey = vue.ref(null); const data = vue.ref([]); const _data = vue.ref([]); const isComplex = vue.ref(false); const _columns = vue.ref([]); const originColumns = vue.ref([]); const columns = vue.ref([]); const fixedColumns = vue.ref([]); const rightFixedColumns = vue.ref([]); const leafColumns = vue.ref([]); const fixedLeafColumns = vue.ref([]); const rightFixedLeafColumns = vue.ref([]); const updateOrderFns = []; const leafColumnsLength = vue.ref(0); const fixedLeafColumnsLength = vue.ref(0); const rightFixedLeafColumnsLength = vue.ref(0); const isAllSelected = vue.ref(false); const selection = vue.ref([]); const reserveSelection = vue.ref(false); const selectOnIndeterminate = vue.ref(false); const selectable = vue.ref(null); const filters = vue.ref({}); const filteredData = vue.ref(null); const sortingColumn = vue.ref(null); const sortProp = vue.ref(null); const sortOrder = vue.ref(null); const hoverRow = vue.ref(null); const selectedMap = vue.computed(() => { return rowKey.value ? getKeysMap(selection.value, rowKey.value) : void 0; }); vue.watch(data, () => { var _a22; if (instance.state) { scheduleLayout(false); const needUpdateFixed = instance.props.tableLayout === "auto"; if (needUpdateFixed) { (_a22 = instance.refs.tableHeaderRef) == null ? void 0 : _a22.updateFixedColumnStyle(); } } }, { deep: true }); const assertRowKey = () => { if (!rowKey.value) throw new Error("[ElTable] prop row-key is required"); }; const updateChildFixed = (column) => { var _a22; (_a22 = column.children) == null ? void 0 : _a22.forEach((childColumn) => { childColumn.fixed = column.fixed; updateChildFixed(childColumn); }); }; const updateColumns = () => { var _a22, _b; _columns.value.forEach((column) => { updateChildFixed(column); }); fixedColumns.value = _columns.value.filter((column) => column.type !== "selection" && [true, "left"].includes(column.fixed)); let selectColFixLeft; if (((_b = (_a22 = _columns.value) == null ? void 0 : _a22[0]) == null ? void 0 : _b.type) === "selection") { const selectColumn = _columns.value[0]; selectColFixLeft = [true, "left"].includes(selectColumn.fixed) || fixedColumns.value.length && selectColumn.fixed !== "right"; if (selectColFixLeft) { fixedColumns.value.unshift(selectColumn); } } rightFixedColumns.value = _columns.value.filter((column) => column.fixed === "right"); const notFixedColumns = _columns.value.filter((column) => (selectColFixLeft ? column.type !== "selection" : true) && !column.fixed); originColumns.value = [].concat(fixedColumns.value).concat(notFixedColumns).concat(rightFixedColumns.value); const leafColumns2 = doFlattenColumns(notFixedColumns); const fixedLeafColumns2 = doFlattenColumns(fixedColumns.value); const rightFixedLeafColumns2 = doFlattenColumns(rightFixedColumns.value); leafColumnsLength.value = leafColumns2.length; fixedLeafColumnsLength.value = fixedLeafColumns2.length; rightFixedLeafColumnsLength.value = rightFixedLeafColumns2.length; columns.value = [].concat(fixedLeafColumns2).concat(leafColumns2).concat(rightFixedLeafColumns2); isComplex.value = fixedColumns.value.length > 0 || rightFixedColumns.value.length > 0; }; const scheduleLayout = (needUpdateColumns, immediate = false) => { if (needUpdateColumns) { updateColumns(); } if (immediate) { instance.state.doLayout(); } else { instance.state.debouncedUpdateLayout(); } }; const isSelected = (row) => { if (selectedMap.value) { return !!selectedMap.value[getRowIdentity(row, rowKey.value)]; } else { return selection.value.includes(row); } }; const clearSelection = () => { isAllSelected.value = false; const oldSelection = selection.value; selection.value = []; if (oldSelection.length) { instance.emit("selection-change", []); } }; const cleanSelection = () => { let deleted; if (rowKey.value) { deleted = []; const dataMap = getKeysMap(data.value, rowKey.value); for (const key in selectedMap.value) { if (hasOwn(selectedMap.value, key) && !dataMap[key]) { deleted.push(selectedMap.value[key].row); } } } else { deleted = selection.value.filter((item) => !data.value.includes(item)); } if (deleted.length) { const newSelection = selection.value.filter((item) => !deleted.includes(item)); selection.value = newSelection; instance.emit("selection-change", newSelection.slice()); } }; const getSelectionRows = () => { return (selection.value || []).slice(); }; const toggleRowSelection = (row, selected, emitChange = true, ignoreSelectable = false) => { var _a22, _b, _c, _d; const treeProps = { children: (_b = (_a22 = instance == null ? void 0 : instance.store) == null ? void 0 : _a22.states) == null ? void 0 : _b.childrenColumnName.value, checkStrictly: (_d = (_c = instance == null ? void 0 : instance.store) == null ? void 0 : _c.states) == null ? void 0 : _d.checkStrictly.value }; const changed = toggleRowStatus(selection.value, row, selected, treeProps, ignoreSelectable ? void 0 : selectable.value, data.value.indexOf(row)); if (changed) { const newSelection = (selection.value || []).slice(); if (emitChange) { instance.emit("select", newSelection, row); } instance.emit("selection-change", newSelection); } }; const _toggleAllSelection = () => { var _a22, _b; const value = selectOnIndeterminate.value ? !isAllSelected.value : !(isAllSelected.value || selection.value.length); isAllSelected.value = value; let selectionChanged = false; let childrenCount = 0; const rowKey2 = (_b = (_a22 = instance == null ? void 0 : instance.store) == null ? void 0 : _a22.states) == null ? void 0 : _b.rowKey.value; const { childrenColumnName } = instance.store.states; const treeProps = { children: childrenColumnName.value, checkStrictly: false }; data.value.forEach((row, index) => { const rowIndex = index + childrenCount; if (toggleRowStatus(selection.value, row, value, treeProps, selectable.value, rowIndex)) { selectionChanged = true; } childrenCount += getChildrenCount(getRowIdentity(row, rowKey2)); }); if (selectionChanged) { instance.emit("selection-change", selection.value ? selection.value.slice() : []); } instance.emit("select-all", (selection.value || []).slice()); }; const updateSelectionByRowKey = () => { data.value.forEach((row) => { const rowId = getRowIdentity(row, rowKey.value); const rowInfo = selectedMap.value[rowId]; if (rowInfo) { selection.value[rowInfo.index] = row; } }); }; const updateAllSelected = () => { var _a22; if (((_a22 = data.value) == null ? void 0 : _a22.length) === 0) { isAllSelected.value = false; return; } const { childrenColumnName } = instance.store.states; let rowIndex = 0; let selectedCount = 0; const checkSelectedStatus = (data2) => { var _a3; for (const row of data2) { const isRowSelectable = selectable.value && selectable.value.call(null, row, rowIndex); if (!isSelected(row)) { if (!selectable.value || isRowSelectable) { return false; } } else { selectedCount++; } rowIndex++; if (((_a3 = row[childrenColumnName.value]) == null ? void 0 : _a3.length) && !checkSelectedStatus(row[childrenColumnName.value])) { return false; } } return true; }; const isAllSelected_ = checkSelectedStatus(data.value || []); isAllSelected.value = selectedCount === 0 ? false : isAllSelected_; }; const getChildrenCount = (rowKey2) => { var _a22; if (!instance || !instance.store) return 0; const { treeData } = instance.store.states; let count = 0; const children = (_a22 = treeData.value[rowKey2]) == null ? void 0 : _a22.children; if (children) { count += children.length; children.forEach((childKey) => { count += getChildrenCount(childKey); }); } return count; }; const updateFilters = (columns2, values) => { if (!isArray$1(columns2)) { columns2 = [columns2]; } const filters_ = {}; columns2.forEach((col) => { filters.value[col.id] = values; filters_[col.columnKey || col.id] = values; }); return filters_; }; const updateSort = (column, prop, order) => { if (sortingColumn.value && sortingColumn.value !== column) { sortingColumn.value.order = null; } sortingColumn.value = column; sortProp.value = prop; sortOrder.value = order; }; const execFilter = () => { let sourceData = vue.unref(_data); Object.keys(filters.value).forEach((columnId) => { const values = filters.value[columnId]; if (!values || values.length === 0) return; const column = getColumnById({ columns: columns.value }, columnId); if (column && column.filterMethod) { sourceData = sourceData.filter((row) => { return values.some((value) => column.filterMethod.call(null, value, row, column)); }); } }); filteredData.value = sourceData; }; const execSort = () => { data.value = sortData(filteredData.value, { sortingColumn: sortingColumn.value, sortProp: sortProp.value, sortOrder: sortOrder.value }); }; const execQuery = (ignore = void 0) => { if (!(ignore && ignore.filter)) { execFilter(); } execSort(); }; const clearFilter = (columnKeys) => { const { tableHeaderRef } = instance.refs; if (!tableHeaderRef) return; const panels = Object.assign({}, tableHeaderRef.filterPanels); const keys2 = Object.keys(panels); if (!keys2.length) return; if (isString$1(columnKeys)) { columnKeys = [columnKeys]; } if (isArray$1(columnKeys)) { const columns_ = columnKeys.map((key) => getColumnByKey({ columns: columns.value }, key)); keys2.forEach((key) => { const column = columns_.find((col) => col.id === key); if (column) { column.filteredValue = []; } }); instance.store.commit("filterChange", { column: columns_, values: [], silent: true, multi: true }); } else { keys2.forEach((key) => { const column = columns.value.find((col) => col.id === key); if (column) { column.filteredValue = []; } }); filters.value = {}; instance.store.commit("filterChange", { column: {}, values: [], silent: true }); } }; const clearSort = () => { if (!sortingColumn.value) return; updateSort(null, null, null); instance.store.commit("changeSortCondition", { silent: true }); }; const { setExpandRowKeys, toggleRowExpansion, updateExpandRows, states: expandStates, isRowExpanded } = useExpand({ data, rowKey }); const { updateTreeExpandKeys, toggleTreeExpansion, updateTreeData, updateKeyChildren, loadOrToggle, states: treeStates } = useTree({ data, rowKey }); const { updateCurrentRowData, updateCurrentRow, setCurrentRowKey, states: currentData } = useCurrent({ data, rowKey }); const setExpandRowKeysAdapter = (val) => { setExpandRowKeys(val); updateTreeExpandKeys(val); }; const toggleRowExpansionAdapter = (row, expanded) => { const hasExpandColumn = columns.value.some(({ type }) => type === "expand"); if (hasExpandColumn) { toggleRowExpansion(row, expanded); } else { toggleTreeExpansion(row, expanded); } }; return { assertRowKey, updateColumns, scheduleLayout, isSelected, clearSelection, cleanSelection, getSelectionRows, toggleRowSelection, _toggleAllSelection, toggleAllSelection: null, updateSelectionByRowKey, updateAllSelected, updateFilters, updateCurrentRow, updateSort, execFilter, execSort, execQuery, clearFilter, clearSort, toggleRowExpansion, setExpandRowKeysAdapter, setCurrentRowKey, toggleRowExpansionAdapter, isRowExpanded, updateExpandRows, updateCurrentRowData, loadOrToggle, updateTreeData, updateKeyChildren, states: { tableSize, rowKey, data, _data, isComplex, _columns, originColumns, columns, fixedColumns, rightFixedColumns, leafColumns, fixedLeafColumns, rightFixedLeafColumns, updateOrderFns, leafColumnsLength, fixedLeafColumnsLength, rightFixedLeafColumnsLength, isAllSelected, selection, reserveSelection, selectOnIndeterminate, selectable, filters, filteredData, sortingColumn, sortProp, sortOrder, hoverRow, ...expandStates, ...treeStates, ...currentData } }; } function replaceColumn(array, column) { return array.map((item) => { var _a2; if (item.id === column.id) { return column; } else if ((_a2 = item.children) == null ? void 0 : _a2.length) { item.children = replaceColumn(item.children, column); } return item; }); } function sortColumn(array) { array.forEach((item) => { var _a2, _b; item.no = (_a2 = item.getColumnIndex) == null ? void 0 : _a2.call(item); if ((_b = item.children) == null ? void 0 : _b.length) { sortColumn(item.children); } }); array.sort((cur, pre) => cur.no - pre.no); } function useStore() { const instance = vue.getCurrentInstance(); const watcher = useWatcher$1(); const ns = useNamespace("table"); const mutations = { setData(states, data) { const dataInstanceChanged = vue.unref(states._data) !== data; states.data.value = data; states._data.value = data; instance.store.execQuery(); instance.store.updateCurrentRowData(); instance.store.updateExpandRows(); instance.store.updateTreeData(instance.store.states.defaultExpandAll.value); if (vue.unref(states.reserveSelection)) { instance.store.assertRowKey(); instance.store.updateSelectionByRowKey(); } else { if (dataInstanceChanged) { instance.store.clearSelection(); } else { instance.store.cleanSelection(); } } instance.store.updateAllSelected(); if (instance.$ready) { instance.store.scheduleLayout(); } }, insertColumn(states, column, parent, updateColumnOrder) { const array = vue.unref(states._columns); let newColumns = []; if (!parent) { array.push(column); newColumns = array; } else { if (parent && !parent.children) { parent.children = []; } parent.children.push(column); newColumns = replaceColumn(array, parent); } sortColumn(newColumns); states._columns.value = newColumns; states.updateOrderFns.push(updateColumnOrder); if (column.type === "selection") { states.selectable.value = column.selectable; states.reserveSelection.value = column.reserveSelection; } if (instance.$ready) { instance.store.updateColumns(); instance.store.scheduleLayout(); } }, updateColumnOrder(states, column) { var _a2; const newColumnIndex = (_a2 = column.getColumnIndex) == null ? void 0 : _a2.call(column); if (newColumnIndex === column.no) return; sortColumn(states._columns.value); if (instance.$ready) { instance.store.updateColumns(); } }, removeColumn(states, column, parent, updateColumnOrder) { const array = vue.unref(states._columns) || []; if (parent) { parent.children.splice(parent.children.findIndex((item) => item.id === column.id), 1); vue.nextTick(() => { var _a2; if (((_a2 = parent.children) == null ? void 0 : _a2.length) === 0) { delete parent.children; } }); states._columns.value = replaceColumn(array, parent); } else { const index = array.indexOf(column); if (index > -1) { array.splice(index, 1); states._columns.value = array; } } const updateFnIndex = states.updateOrderFns.indexOf(updateColumnOrder); updateFnIndex > -1 && states.updateOrderFns.splice(updateFnIndex, 1); if (instance.$ready) { instance.store.updateColumns(); instance.store.scheduleLayout(); } }, sort(states, options) { const { prop, order, init } = options; if (prop) { const column = vue.unref(states.columns).find((column2) => column2.property === prop); if (column) { column.order = order; instance.store.updateSort(column, prop, order); instance.store.commit("changeSortCondition", { init }); } } }, changeSortCondition(states, options) { const { sortingColumn, sortProp, sortOrder } = states; const columnValue = vue.unref(sortingColumn), propValue = vue.unref(sortProp), orderValue = vue.unref(sortOrder); if (isNull(orderValue)) { states.sortingColumn.value = null; states.sortProp.value = null; } const ignore = { filter: true }; instance.store.execQuery(ignore); if (!options || !(options.silent || options.init)) { instance.emit("sort-change", { column: columnValue, prop: propValue, order: orderValue }); } instance.store.updateTableScrollY(); }, filterChange(_states, options) { const { column, values, silent } = options; const newFilters = instance.store.updateFilters(column, values); instance.store.execQuery(); if (!silent) { instance.emit("filter-change", newFilters); } instance.store.updateTableScrollY(); }, toggleAllSelection() { instance.store.toggleAllSelection(); }, rowSelectedChanged(_states, row) { instance.store.toggleRowSelection(row); instance.store.updateAllSelected(); }, setHoverRow(states, row) { states.hoverRow.value = row; }, setCurrentRow(_states, row) { instance.store.updateCurrentRow(row); } }; const commit = function(name, ...args) { const mutations2 = instance.store.mutations; if (mutations2[name]) { mutations2[name].apply(instance, [instance.store.states].concat(args)); } else { throw new Error(`Action not found: ${name}`); } }; const updateTableScrollY = function() { vue.nextTick(() => instance.layout.updateScrollY.apply(instance.layout)); }; return { ns, ...watcher, mutations, commit, updateTableScrollY }; } const InitialStateMap = { rowKey: "rowKey", defaultExpandAll: "defaultExpandAll", selectOnIndeterminate: "selectOnIndeterminate", indent: "indent", lazy: "lazy", data: "data", ["treeProps.hasChildren"]: { key: "lazyColumnIdentifier", default: "hasChildren" }, ["treeProps.children"]: { key: "childrenColumnName", default: "children" }, ["treeProps.checkStrictly"]: { key: "checkStrictly", default: false } }; function createStore(table, props) { if (!table) { throw new Error("Table is required."); } const store = useStore(); store.toggleAllSelection = debounce(store._toggleAllSelection, 10); Object.keys(InitialStateMap).forEach((key) => { handleValue(getArrKeysValue(props, key), key, store); }); proxyTableProps(store, props); return store; } function proxyTableProps(store, props) { Object.keys(InitialStateMap).forEach((key) => { vue.watch(() => getArrKeysValue(props, key), (value) => { handleValue(value, key, store); }); }); } function handleValue(value, propsKey, store) { let newVal = value; let storeKey = InitialStateMap[propsKey]; if (isObject$2(InitialStateMap[propsKey])) { storeKey = storeKey.key; newVal = newVal || InitialStateMap[propsKey].default; } store.states[storeKey].value = newVal; } function getArrKeysValue(props, keys2) { if (keys2.includes(".")) { const keyList = keys2.split("."); let value = props; keyList.forEach((key) => { value = value[key]; }); return value; } else { return props[keys2]; } } class TableLayout { constructor(options) { this.observers = []; this.table = null; this.store = null; this.columns = []; this.fit = true; this.showHeader = true; this.height = vue.ref(null); this.scrollX = vue.ref(false); this.scrollY = vue.ref(false); this.bodyWidth = vue.ref(null); this.fixedWidth = vue.ref(null); this.rightFixedWidth = vue.ref(null); this.gutterWidth = 0; for (const name in options) { if (hasOwn(options, name)) { if (vue.isRef(this[name])) { this[name].value = options[name]; } else { this[name] = options[name]; } } } if (!this.table) { throw new Error("Table is required for Table Layout"); } if (!this.store) { throw new Error("Store is required for Table Layout"); } } updateScrollY() { const height = this.height.value; if (isNull(height)) return false; const scrollBarRef = this.table.refs.scrollBarRef; if (this.table.vnode.el && (scrollBarRef == null ? void 0 : scrollBarRef.wrapRef)) { let scrollY = true; const prevScrollY = this.scrollY.value; scrollY = scrollBarRef.wrapRef.scrollHeight > scrollBarRef.wrapRef.clientHeight; this.scrollY.value = scrollY; return prevScrollY !== scrollY; } return false; } setHeight(value, prop = "height") { if (!isClient$1) return; const el = this.table.vnode.el; value = parseHeight(value); this.height.value = Number(value); if (!el && (value || value === 0)) return vue.nextTick(() => this.setHeight(value, prop)); if (isNumber(value)) { el.style[prop] = `${value}px`; this.updateElsHeight(); } else if (isString$1(value)) { el.style[prop] = value; this.updateElsHeight(); } } setMaxHeight(value) { this.setHeight(value, "max-height"); } getFlattenColumns() { const flattenColumns = []; const columns = this.table.store.states.columns.value; columns.forEach((column) => { if (column.isColumnGroup) { flattenColumns.push.apply(flattenColumns, column.columns); } else { flattenColumns.push(column); } }); return flattenColumns; } updateElsHeight() { this.updateScrollY(); this.notifyObservers("scrollable"); } headerDisplayNone(elm) { if (!elm) return true; let headerChild = elm; while (headerChild.tagName !== "DIV") { if (getComputedStyle(headerChild).display === "none") { return true; } headerChild = headerChild.parentElement; } return false; } updateColumnsWidth() { if (!isClient$1) return; const fit = this.fit; const bodyWidth = this.table.vnode.el.clientWidth; let bodyMinWidth = 0; const flattenColumns = this.getFlattenColumns(); const flexColumns = flattenColumns.filter((column) => !isNumber(column.width)); flattenColumns.forEach((column) => { if (isNumber(column.width) && column.realWidth) column.realWidth = null; }); if (flexColumns.length > 0 && fit) { flattenColumns.forEach((column) => { bodyMinWidth += Number(column.width || column.minWidth || 80); }); if (bodyMinWidth <= bodyWidth) { this.scrollX.value = false; const totalFlexWidth = bodyWidth - bodyMinWidth; if (flexColumns.length === 1) { flexColumns[0].realWidth = Number(flexColumns[0].minWidth || 80) + totalFlexWidth; } else { const allColumnsWidth = flexColumns.reduce((prev, column) => prev + Number(column.minWidth || 80), 0); const flexWidthPerPixel = totalFlexWidth / allColumnsWidth; let noneFirstWidth = 0; flexColumns.forEach((column, index) => { if (index === 0) return; const flexWidth = Math.floor(Number(column.minWidth || 80) * flexWidthPerPixel); noneFirstWidth += flexWidth; column.realWidth = Number(column.minWidth || 80) + flexWidth; }); flexColumns[0].realWidth = Number(flexColumns[0].minWidth || 80) + totalFlexWidth - noneFirstWidth; } } else { this.scrollX.value = true; flexColumns.forEach((column) => { column.realWidth = Number(column.minWidth); }); } this.bodyWidth.value = Math.max(bodyMinWidth, bodyWidth); this.table.state.resizeState.value.width = this.bodyWidth.value; } else { flattenColumns.forEach((column) => { if (!column.width && !column.minWidth) { column.realWidth = 80; } else { column.realWidth = Number(column.width || column.minWidth); } bodyMinWidth += column.realWidth; }); this.scrollX.value = bodyMinWidth > bodyWidth; this.bodyWidth.value = bodyMinWidth; } const fixedColumns = this.store.states.fixedColumns.value; if (fixedColumns.length > 0) { let fixedWidth = 0; fixedColumns.forEach((column) => { fixedWidth += Number(column.realWidth || column.width); }); this.fixedWidth.value = fixedWidth; } const rightFixedColumns = this.store.states.rightFixedColumns.value; if (rightFixedColumns.length > 0) { let rightFixedWidth = 0; rightFixedColumns.forEach((column) => { rightFixedWidth += Number(column.realWidth || column.width); }); this.rightFixedWidth.value = rightFixedWidth; } this.notifyObservers("columns"); } addObserver(observer) { this.observers.push(observer); } removeObserver(observer) { const index = this.observers.indexOf(observer); if (index !== -1) { this.observers.splice(index, 1); } } notifyObservers(event) { const observers = this.observers; observers.forEach((observer) => { var _a2, _b; switch (event) { case "columns": (_a2 = observer.state) == null ? void 0 : _a2.onColumnsChange(this); break; case "scrollable": (_b = observer.state) == null ? void 0 : _b.onScrollableChange(this); break; default: throw new Error(`Table Layout don't have event ${event}.`); } }); } } const { CheckboxGroup: ElCheckboxGroup } = ElCheckbox; const _sfc_main$5 = vue.defineComponent({ name: "ElTableFilterPanel", components: { ElCheckbox, ElCheckboxGroup, ElScrollbar, ElTooltip, ElIcon, ArrowDown: arrow_down_default, ArrowUp: arrow_up_default }, directives: { ClickOutside }, props: { placement: { type: String, default: "bottom-start" }, store: { type: Object }, column: { type: Object }, upDataColumn: { type: Function }, appendTo: { type: String } }, setup(props) { const instance = vue.getCurrentInstance(); const { t } = useLocale(); const ns = useNamespace("table-filter"); const parent = instance == null ? void 0 : instance.parent; if (!parent.filterPanels.value[props.column.id]) { parent.filterPanels.value[props.column.id] = instance; } const tooltipVisible = vue.ref(false); const tooltip = vue.ref(null); const filters = vue.computed(() => { return props.column && props.column.filters; }); const filterClassName = vue.computed(() => { if (props.column.filterClassName) { return `${ns.b()} ${props.column.filterClassName}`; } return ns.b(); }); const filterValue = vue.computed({ get: () => { var _a2; return (((_a2 = props.column) == null ? void 0 : _a2.filteredValue) || [])[0]; }, set: (value) => { if (filteredValue.value) { if (!isPropAbsent(value)) { filteredValue.value.splice(0, 1, value); } else { filteredValue.value.splice(0, 1); } } } }); const filteredValue = vue.computed({ get() { if (props.column) { return props.column.filteredValue || []; } return []; }, set(value) { if (props.column) { props.upDataColumn("filteredValue", value); } } }); const multiple = vue.computed(() => { if (props.column) { return props.column.filterMultiple; } return true; }); const isActive = (filter) => { return filter.value === filterValue.value; }; const hidden = () => { tooltipVisible.value = false; }; const showFilterPanel = (e) => { e.stopPropagation(); tooltipVisible.value = !tooltipVisible.value; }; const hideFilterPanel = () => { tooltipVisible.value = false; }; const handleConfirm = () => { confirmFilter(filteredValue.value); hidden(); }; const handleReset = () => { filteredValue.value = []; confirmFilter(filteredValue.value); hidden(); }; const handleSelect = (_filterValue) => { filterValue.value = _filterValue; if (!isPropAbsent(_filterValue)) { confirmFilter(filteredValue.value); } else { confirmFilter([]); } hidden(); }; const confirmFilter = (filteredValue2) => { props.store.commit("filterChange", { column: props.column, values: filteredValue2 }); props.store.updateAllSelected(); }; vue.watch(tooltipVisible, (value) => { if (props.column) { props.upDataColumn("filterOpened", value); } }, { immediate: true }); const popperPaneRef = vue.computed(() => { var _a2, _b; return (_b = (_a2 = tooltip.value) == null ? void 0 : _a2.popperRef) == null ? void 0 : _b.contentRef; }); return { tooltipVisible, multiple, filterClassName, filteredValue, filterValue, filters, handleConfirm, handleReset, handleSelect, isPropAbsent, isActive, t, ns, showFilterPanel, hideFilterPanel, popperPaneRef, tooltip }; } }); function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) { const _component_el_checkbox = vue.resolveComponent("el-checkbox"); const _component_el_checkbox_group = vue.resolveComponent("el-checkbox-group"); const _component_el_scrollbar = vue.resolveComponent("el-scrollbar"); const _component_arrow_up = vue.resolveComponent("arrow-up"); const _component_arrow_down = vue.resolveComponent("arrow-down"); const _component_el_icon = vue.resolveComponent("el-icon"); const _component_el_tooltip = vue.resolveComponent("el-tooltip"); const _directive_click_outside = vue.resolveDirective("click-outside"); return vue.openBlock(), vue.createBlock(_component_el_tooltip, { ref: "tooltip", visible: _ctx.tooltipVisible, offset: 0, placement: _ctx.placement, "show-arrow": false, "stop-popper-mouse-event": false, teleported: "", effect: "light", pure: "", "popper-class": _ctx.filterClassName, persistent: "", "append-to": _ctx.appendTo }, { content: vue.withCtx(() => [ _ctx.multiple ? (vue.openBlock(), vue.createElementBlock("div", { key: 0 }, [ vue.createElementVNode("div", { class: vue.normalizeClass(_ctx.ns.e("content")) }, [ vue.createVNode(_component_el_scrollbar, { "wrap-class": _ctx.ns.e("wrap") }, { default: vue.withCtx(() => [ vue.createVNode(_component_el_checkbox_group, { modelValue: _ctx.filteredValue, "onUpdate:modelValue": ($event) => _ctx.filteredValue = $event, class: vue.normalizeClass(_ctx.ns.e("checkbox-group")) }, { default: vue.withCtx(() => [ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.filters, (filter) => { return vue.openBlock(), vue.createBlock(_component_el_checkbox, { key: filter.value, value: filter.value }, { default: vue.withCtx(() => [ vue.createTextVNode(vue.toDisplayString(filter.text), 1) ]), _: 2 }, 1032, ["value"]); }), 128)) ]), _: 1 }, 8, ["modelValue", "onUpdate:modelValue", "class"]) ]), _: 1 }, 8, ["wrap-class"]) ], 2), vue.createElementVNode("div", { class: vue.normalizeClass(_ctx.ns.e("bottom")) }, [ vue.createElementVNode("button", { class: vue.normalizeClass({ [_ctx.ns.is("disabled")]: _ctx.filteredValue.length === 0 }), disabled: _ctx.filteredValue.length === 0, type: "button", onClick: _ctx.handleConfirm }, vue.toDisplayString(_ctx.t("el.table.confirmFilter")), 11, ["disabled", "onClick"]), vue.createElementVNode("button", { type: "button", onClick: _ctx.handleReset }, vue.toDisplayString(_ctx.t("el.table.resetFilter")), 9, ["onClick"]) ], 2) ])) : (vue.openBlock(), vue.createElementBlock("ul", { key: 1, class: vue.normalizeClass(_ctx.ns.e("list")) }, [ vue.createElementVNode("li", { class: vue.normalizeClass([ _ctx.ns.e("list-item"), { [_ctx.ns.is("active")]: _ctx.isPropAbsent(_ctx.filterValue) } ]), onClick: ($event) => _ctx.handleSelect(null) }, vue.toDisplayString(_ctx.t("el.table.clearFilter")), 11, ["onClick"]), (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.filters, (filter) => { return vue.openBlock(), vue.createElementBlock("li", { key: filter.value, class: vue.normalizeClass([_ctx.ns.e("list-item"), _ctx.ns.is("active", _ctx.isActive(filter))]), label: filter.value, onClick: ($event) => _ctx.handleSelect(filter.value) }, vue.toDisplayString(filter.text), 11, ["label", "onClick"]); }), 128)) ], 2)) ]), default: vue.withCtx(() => [ vue.withDirectives((vue.openBlock(), vue.createElementBlock("span", { class: vue.normalizeClass([ `${_ctx.ns.namespace.value}-table__column-filter-trigger`, `${_ctx.ns.namespace.value}-none-outline` ]), onClick: _ctx.showFilterPanel }, [ vue.createVNode(_component_el_icon, null, { default: vue.withCtx(() => [ vue.renderSlot(_ctx.$slots, "filter-icon", {}, () => [ _ctx.column.filterOpened ? (vue.openBlock(), vue.createBlock(_component_arrow_up, { key: 0 })) : (vue.openBlock(), vue.createBlock(_component_arrow_down, { key: 1 })) ]) ]), _: 3 }) ], 10, ["onClick"])), [ [_directive_click_outside, _ctx.hideFilterPanel, _ctx.popperPaneRef] ]) ]), _: 3 }, 8, ["visible", "placement", "popper-class", "append-to"]); } var FilterPanel = /* @__PURE__ */ _export_sfc$1(_sfc_main$5, [["render", _sfc_render$1], ["__file", "filter-panel.vue"]]); function useLayoutObserver(root2) { const instance = vue.getCurrentInstance(); vue.onBeforeMount(() => { tableLayout.value.addObserver(instance); }); vue.onMounted(() => { onColumnsChange(tableLayout.value); onScrollableChange(tableLayout.value); }); vue.onUpdated(() => { onColumnsChange(tableLayout.value); onScrollableChange(tableLayout.value); }); vue.onUnmounted(() => { tableLayout.value.removeObserver(instance); }); const tableLayout = vue.computed(() => { const layout = root2.layout; if (!layout) { throw new Error("Can not find table layout."); } return layout; }); const onColumnsChange = (layout) => { var _a2; const cols = ((_a2 = root2.vnode.el) == null ? void 0 : _a2.querySelectorAll("colgroup > col")) || []; if (!cols.length) return; const flattenColumns = layout.getFlattenColumns(); const columnsMap = {}; flattenColumns.forEach((column) => { columnsMap[column.id] = column; }); for (let i = 0, j = cols.length; i < j; i++) { const col = cols[i]; const name = col.getAttribute("name"); const column = columnsMap[name]; if (column) { col.setAttribute("width", column.realWidth || column.width); } } }; const onScrollableChange = (layout) => { var _a2, _b; const cols = ((_a2 = root2.vnode.el) == null ? void 0 : _a2.querySelectorAll("colgroup > col[name=gutter]")) || []; for (let i = 0, j = cols.length; i < j; i++) { const col = cols[i]; col.setAttribute("width", layout.scrollY.value ? layout.gutterWidth : "0"); } const ths = ((_b = root2.vnode.el) == null ? void 0 : _b.querySelectorAll("th.gutter")) || []; for (let i = 0, j = ths.length; i < j; i++) { const th = ths[i]; th.style.width = layout.scrollY.value ? `${layout.gutterWidth}px` : "0"; th.style.display = layout.scrollY.value ? "" : "none"; } }; return { tableLayout: tableLayout.value, onColumnsChange, onScrollableChange }; } const TABLE_INJECTION_KEY = Symbol("ElTable"); function useEvent(props, emit) { const instance = vue.getCurrentInstance(); const parent = vue.inject(TABLE_INJECTION_KEY); const handleFilterClick = (event) => { event.stopPropagation(); return; }; const handleHeaderClick = (event, column) => { if (!column.filters && column.sortable) { handleSortClick(event, column, false); } else if (column.filterable && !column.sortable) { handleFilterClick(event); } parent == null ? void 0 : parent.emit("header-click", column, event); }; const handleHeaderContextMenu = (event, column) => { parent == null ? void 0 : parent.emit("header-contextmenu", column, event); }; const draggingColumn = vue.ref(null); const dragging = vue.ref(false); const dragState = vue.ref({}); const handleMouseDown = (event, column) => { if (!isClient$1) return; if (column.children && column.children.length > 0) return; if (draggingColumn.value && props.border) { dragging.value = true; const table = parent; emit("set-drag-visible", true); const tableEl = table == null ? void 0 : table.vnode.el; const tableLeft = tableEl.getBoundingClientRect().left; const columnEl = instance.vnode.el.querySelector(`th.${column.id}`); const columnRect = columnEl.getBoundingClientRect(); const minLeft = columnRect.left - tableLeft + 30; addClass(columnEl, "noclick"); dragState.value = { startMouseLeft: event.clientX, startLeft: columnRect.right - tableLeft, startColumnLeft: columnRect.left - tableLeft, tableLeft }; const resizeProxy = table == null ? void 0 : table.refs.resizeProxy; resizeProxy.style.left = `${dragState.value.startLeft}px`; document.onselectstart = function() { return false; }; document.ondragstart = function() { return false; }; const handleMouseMove2 = (event2) => { const deltaLeft = event2.clientX - dragState.value.startMouseLeft; const proxyLeft = dragState.value.startLeft + deltaLeft; resizeProxy.style.left = `${Math.max(minLeft, proxyLeft)}px`; }; const handleMouseUp = () => { if (dragging.value) { const { startColumnLeft, startLeft } = dragState.value; const finalLeft = Number.parseInt(resizeProxy.style.left, 10); const columnWidth = finalLeft - startColumnLeft; column.width = column.realWidth = columnWidth; table == null ? void 0 : table.emit("header-dragend", column.width, startLeft - startColumnLeft, column, event); requestAnimationFrame(() => { props.store.scheduleLayout(false, true); }); document.body.style.cursor = ""; dragging.value = false; draggingColumn.value = null; dragState.value = {}; emit("set-drag-visible", false); } document.removeEventListener("mousemove", handleMouseMove2); document.removeEventListener("mouseup", handleMouseUp); document.onselectstart = null; document.ondragstart = null; setTimeout(() => { removeClass(columnEl, "noclick"); }, 0); }; document.addEventListener("mousemove", handleMouseMove2); document.addEventListener("mouseup", handleMouseUp); } }; const handleMouseMove = (event, column) => { var _a2; if (column.children && column.children.length > 0) return; const el = event.target; if (!isElement(el)) { return; } const target = el == null ? void 0 : el.closest("th"); if (!column || !column.resizable || !target) return; if (!dragging.value && props.border) { const rect = target.getBoundingClientRect(); const bodyStyle = document.body.style; const isLastTh = ((_a2 = target.parentNode) == null ? void 0 : _a2.lastElementChild) === target; const allowDarg = props.allowDragLastColumn || !isLastTh; if (rect.width > 12 && rect.right - event.clientX < 8 && allowDarg) { bodyStyle.cursor = "col-resize"; if (hasClass(target, "is-sortable")) { target.style.cursor = "col-resize"; } draggingColumn.value = column; } else if (!dragging.value) { bodyStyle.cursor = ""; if (hasClass(target, "is-sortable")) { target.style.cursor = "pointer"; } draggingColumn.value = null; } } }; const handleMouseOut = () => { if (!isClient$1) return; document.body.style.cursor = ""; }; const toggleOrder = ({ order, sortOrders }) => { if (order === "") return sortOrders[0]; const index = sortOrders.indexOf(order || null); return sortOrders[index > sortOrders.length - 2 ? 0 : index + 1]; }; const handleSortClick = (event, column, givenOrder) => { var _a2; event.stopPropagation(); const order = column.order === givenOrder ? null : givenOrder || toggleOrder(column); const target = (_a2 = event.target) == null ? void 0 : _a2.closest("th"); if (target) { if (hasClass(target, "noclick")) { removeClass(target, "noclick"); return; } } if (!column.sortable) return; const clickTarget = event.currentTarget; if (["ascending", "descending"].some((str) => hasClass(clickTarget, str) && !column.sortOrders.includes(str))) { return; } const states = props.store.states; let sortProp = states.sortProp.value; let sortOrder; const sortingColumn = states.sortingColumn.value; if (sortingColumn !== column || sortingColumn === column && isNull(sortingColumn.order)) { if (sortingColumn) { sortingColumn.order = null; } states.sortingColumn.value = column; sortProp = column.property; } if (!order) { sortOrder = column.order = null; } else { sortOrder = column.order = order; } states.sortProp.value = sortProp; states.sortOrder.value = sortOrder; parent == null ? void 0 : parent.store.commit("changeSortCondition"); }; return { handleHeaderClick, handleHeaderContextMenu, handleMouseDown, handleMouseMove, handleMouseOut, handleSortClick, handleFilterClick }; } function useStyle$2(props) { const parent = vue.inject(TABLE_INJECTION_KEY); const ns = useNamespace("table"); const getHeaderRowStyle = (rowIndex) => { const headerRowStyle = parent == null ? void 0 : parent.props.headerRowStyle; if (isFunction$1(headerRowStyle)) { return headerRowStyle.call(null, { rowIndex }); } return headerRowStyle; }; const getHeaderRowClass = (rowIndex) => { const classes = []; const headerRowClassName = parent == null ? void 0 : parent.props.headerRowClassName; if (isString$1(headerRowClassName)) { classes.push(headerRowClassName); } else if (isFunction$1(headerRowClassName)) { classes.push(headerRowClassName.call(null, { rowIndex })); } return classes.join(" "); }; const getHeaderCellStyle = (rowIndex, columnIndex, row, column) => { var _a2; let headerCellStyles = (_a2 = parent == null ? void 0 : parent.props.headerCellStyle) != null ? _a2 : {}; if (isFunction$1(headerCellStyles)) { headerCellStyles = headerCellStyles.call(null, { rowIndex, columnIndex, row, column }); } const fixedStyle = getFixedColumnOffset(columnIndex, column.fixed, props.store, row); ensurePosition(fixedStyle, "left"); ensurePosition(fixedStyle, "right"); return Object.assign({}, headerCellStyles, fixedStyle); }; const getHeaderCellClass = (rowIndex, columnIndex, row, column) => { const fixedClasses = getFixedColumnsClass(ns.b(), columnIndex, column.fixed, props.store, row); const classes = [ column.id, column.order, column.headerAlign, column.className, column.labelClassName, ...fixedClasses ]; if (!column.children) { classes.push("is-leaf"); } if (column.sortable) { classes.push("is-sortable"); } const headerCellClassName = parent == null ? void 0 : parent.props.headerCellClassName; if (isString$1(headerCellClassName)) { classes.push(headerCellClassName); } else if (isFunction$1(headerCellClassName)) { classes.push(headerCellClassName.call(null, { rowIndex, columnIndex, row, column })); } classes.push(ns.e("cell")); return classes.filter((className) => Boolean(className)).join(" "); }; return { getHeaderRowStyle, getHeaderRowClass, getHeaderCellStyle, getHeaderCellClass }; } const getAllColumns = (columns) => { const result = []; columns.forEach((column) => { if (column.children) { result.push(column); result.push.apply(result, getAllColumns(column.children)); } else { result.push(column); } }); return result; }; const convertToRows = (originColumns) => { let maxLevel = 1; const traverse = (column, parent) => { if (parent) { column.level = parent.level + 1; if (maxLevel < column.level) { maxLevel = column.level; } } if (column.children) { let colSpan = 0; column.children.forEach((subColumn) => { traverse(subColumn, column); colSpan += subColumn.colSpan; }); column.colSpan = colSpan; } else { column.colSpan = 1; } }; originColumns.forEach((column) => { column.level = 1; traverse(column, void 0); }); const rows = []; for (let i = 0; i < maxLevel; i++) { rows.push([]); } const allColumns = getAllColumns(originColumns); allColumns.forEach((column) => { if (!column.children) { column.rowSpan = maxLevel - column.level + 1; } else { column.rowSpan = 1; column.children.forEach((col) => col.isSubColumn = true); } rows[column.level - 1].push(column); }); return rows; }; function useUtils$1(props) { const parent = vue.inject(TABLE_INJECTION_KEY); const columnRows = vue.computed(() => { return convertToRows(props.store.states.originColumns.value); }); const isGroup = vue.computed(() => { const result = columnRows.value.length > 1; if (result && parent) { parent.state.isGroup.value = true; } return result; }); const toggleAllSelection = (event) => { event.stopPropagation(); parent == null ? void 0 : parent.store.commit("toggleAllSelection"); }; return { isGroup, toggleAllSelection, columnRows }; } var TableHeader = vue.defineComponent({ name: "ElTableHeader", components: { ElCheckbox }, props: { fixed: { type: String, default: "" }, store: { required: true, type: Object }, border: Boolean, defaultSort: { type: Object, default: () => { return { prop: "", order: "" }; } }, appendFilterPanelTo: { type: String }, allowDragLastColumn: { type: Boolean } }, setup(props, { emit }) { const instance = vue.getCurrentInstance(); const parent = vue.inject(TABLE_INJECTION_KEY); const ns = useNamespace("table"); const filterPanels = vue.ref({}); const { onColumnsChange, onScrollableChange } = useLayoutObserver(parent); const isTableLayoutAuto = (parent == null ? void 0 : parent.props.tableLayout) === "auto"; const saveIndexSelection = vue.reactive(/* @__PURE__ */ new Map()); const theadRef = vue.ref(); const updateFixedColumnStyle = () => { setTimeout(() => { if (saveIndexSelection.size > 0) { saveIndexSelection.forEach((column, key) => { const el = theadRef.value.querySelector(`.${key.replace(/\s/g, ".")}`); if (el) { const width = el.getBoundingClientRect().width; column.width = width; } }); saveIndexSelection.clear(); } }); }; vue.watch(saveIndexSelection, updateFixedColumnStyle); vue.onMounted(async () => { await vue.nextTick(); await vue.nextTick(); const { prop, order } = props.defaultSort; parent == null ? void 0 : parent.store.commit("sort", { prop, order, init: true }); updateFixedColumnStyle(); }); const { handleHeaderClick, handleHeaderContextMenu, handleMouseDown, handleMouseMove, handleMouseOut, handleSortClick, handleFilterClick } = useEvent(props, emit); const { getHeaderRowStyle, getHeaderRowClass, getHeaderCellStyle, getHeaderCellClass } = useStyle$2(props); const { isGroup, toggleAllSelection, columnRows } = useUtils$1(props); instance.state = { onColumnsChange, onScrollableChange }; instance.filterPanels = filterPanels; return { ns, filterPanels, onColumnsChange, onScrollableChange, columnRows, getHeaderRowClass, getHeaderRowStyle, getHeaderCellClass, getHeaderCellStyle, handleHeaderClick, handleHeaderContextMenu, handleMouseDown, handleMouseMove, handleMouseOut, handleSortClick, handleFilterClick, isGroup, toggleAllSelection, saveIndexSelection, isTableLayoutAuto, theadRef, updateFixedColumnStyle }; }, render() { const { ns, isGroup, columnRows, getHeaderCellStyle, getHeaderCellClass, getHeaderRowClass, getHeaderRowStyle, handleHeaderClick, handleHeaderContextMenu, handleMouseDown, handleMouseMove, handleSortClick, handleMouseOut, store, $parent, saveIndexSelection, isTableLayoutAuto } = this; let rowSpan = 1; return vue.h("thead", { ref: "theadRef", class: { [ns.is("group")]: isGroup } }, columnRows.map((subColumns, rowIndex) => vue.h("tr", { class: getHeaderRowClass(rowIndex), key: rowIndex, style: getHeaderRowStyle(rowIndex) }, subColumns.map((column, cellIndex) => { if (column.rowSpan > rowSpan) { rowSpan = column.rowSpan; } const _class = getHeaderCellClass(rowIndex, cellIndex, subColumns, column); if (isTableLayoutAuto && column.fixed) { saveIndexSelection.set(_class, column); } return vue.h("th", { class: _class, colspan: column.colSpan, key: `${column.id}-thead`, rowspan: column.rowSpan, style: getHeaderCellStyle(rowIndex, cellIndex, subColumns, column), onClick: ($event) => { if ($event.currentTarget.classList.contains("noclick")) { return; } handleHeaderClick($event, column); }, onContextmenu: ($event) => handleHeaderContextMenu($event, column), onMousedown: ($event) => handleMouseDown($event, column), onMousemove: ($event) => handleMouseMove($event, column), onMouseout: handleMouseOut }, [ vue.h("div", { class: [ "cell", column.filteredValue && column.filteredValue.length > 0 ? "highlight" : "" ] }, [ column.renderHeader ? column.renderHeader({ column, $index: cellIndex, store, _self: $parent }) : column.label, column.sortable && vue.h("span", { onClick: ($event) => handleSortClick($event, column), class: "caret-wrapper" }, [ vue.h("i", { onClick: ($event) => handleSortClick($event, column, "ascending"), class: "sort-caret ascending" }), vue.h("i", { onClick: ($event) => handleSortClick($event, column, "descending"), class: "sort-caret descending" }) ]), column.filterable && vue.h(FilterPanel, { store, placement: column.filterPlacement || "bottom-start", appendTo: $parent.appendFilterPanelTo, column, upDataColumn: (key, value) => { column[key] = value; } }, { "filter-icon": () => column.renderFilterIcon ? column.renderFilterIcon({ filterOpened: column.filterOpened }) : null }) ]) ]); })))); } }); function isGreaterThan(a2, b2, epsilon = 0.03) { return a2 - b2 > epsilon; } function useEvents(props) { const parent = vue.inject(TABLE_INJECTION_KEY); const tooltipContent = vue.ref(""); const tooltipTrigger = vue.ref(vue.h("div")); const handleEvent = (event, row, name) => { var _a2; const table = parent; const cell = getCell(event); let column; const namespace = (_a2 = table == null ? void 0 : table.vnode.el) == null ? void 0 : _a2.dataset.prefix; if (cell) { column = getColumnByCell({ columns: props.store.states.columns.value }, cell, namespace); if (column) { table == null ? void 0 : table.emit(`cell-${name}`, row, column, cell, event); } } table == null ? void 0 : table.emit(`row-${name}`, row, column, event); }; const handleDoubleClick = (event, row) => { handleEvent(event, row, "dblclick"); }; const handleClick = (event, row) => { props.store.commit("setCurrentRow", row); handleEvent(event, row, "click"); }; const handleContextMenu = (event, row) => { handleEvent(event, row, "contextmenu"); }; const handleMouseEnter = debounce((index) => { props.store.commit("setHoverRow", index); }, 30); const handleMouseLeave = debounce(() => { props.store.commit("setHoverRow", null); }, 30); const getPadding = (el) => { const style = window.getComputedStyle(el, null); const paddingLeft = Number.parseInt(style.paddingLeft, 10) || 0; const paddingRight = Number.parseInt(style.paddingRight, 10) || 0; const paddingTop = Number.parseInt(style.paddingTop, 10) || 0; const paddingBottom = Number.parseInt(style.paddingBottom, 10) || 0; return { left: paddingLeft, right: paddingRight, top: paddingTop, bottom: paddingBottom }; }; const toggleRowClassByCell = (rowSpan, event, toggle) => { let node = event.target.parentNode; while (rowSpan > 1) { node = node == null ? void 0 : node.nextSibling; if (!node || node.nodeName !== "TR") break; toggle(node, "hover-row hover-fixed-row"); rowSpan--; } }; const handleCellMouseEnter = (event, row, tooltipOptions) => { var _a2, _b, _c; const table = parent; const cell = getCell(event); const namespace = (_a2 = table == null ? void 0 : table.vnode.el) == null ? void 0 : _a2.dataset.prefix; let column; if (cell) { column = getColumnByCell({ columns: props.store.states.columns.value }, cell, namespace); if (cell.rowSpan > 1) { toggleRowClassByCell(cell.rowSpan, event, addClass); } const hoverState = table.hoverState = { cell, column, row }; table == null ? void 0 : table.emit("cell-mouse-enter", hoverState.row, hoverState.column, hoverState.cell, event); } if (!tooltipOptions) { return; } const cellChild = event.target.querySelector(".cell"); if (!(hasClass(cellChild, `${namespace}-tooltip`) && cellChild.childNodes.length)) { return; } const range = document.createRange(); range.setStart(cellChild, 0); range.setEnd(cellChild, cellChild.childNodes.length); const { width: rangeWidth, height: rangeHeight } = range.getBoundingClientRect(); const { width: cellChildWidth, height: cellChildHeight } = cellChild.getBoundingClientRect(); const { top, left, right, bottom } = getPadding(cellChild); const horizontalPadding = left + right; const verticalPadding = top + bottom; if (isGreaterThan(rangeWidth + horizontalPadding, cellChildWidth) || isGreaterThan(rangeHeight + verticalPadding, cellChildHeight) || isGreaterThan(cellChild.scrollWidth, cellChildWidth)) { createTablePopper(tooltipOptions, cell.innerText || cell.textContent, row, column, cell, table); } else if (((_b = removePopper) == null ? void 0 : _b.trigger) === cell) { (_c = removePopper) == null ? void 0 : _c(); } }; const handleCellMouseLeave = (event) => { const cell = getCell(event); if (!cell) return; if (cell.rowSpan > 1) { toggleRowClassByCell(cell.rowSpan, event, removeClass); } const oldHoverState = parent == null ? void 0 : parent.hoverState; parent == null ? void 0 : parent.emit("cell-mouse-leave", oldHoverState == null ? void 0 : oldHoverState.row, oldHoverState == null ? void 0 : oldHoverState.column, oldHoverState == null ? void 0 : oldHoverState.cell, event); }; return { handleDoubleClick, handleClick, handleContextMenu, handleMouseEnter, handleMouseLeave, handleCellMouseEnter, handleCellMouseLeave, tooltipContent, tooltipTrigger }; } function useStyles(props) { const parent = vue.inject(TABLE_INJECTION_KEY); const ns = useNamespace("table"); const getRowStyle = (row, rowIndex) => { const rowStyle = parent == null ? void 0 : parent.props.rowStyle; if (isFunction$1(rowStyle)) { return rowStyle.call(null, { row, rowIndex }); } return rowStyle || null; }; const getRowClass = (row, rowIndex) => { const classes = [ns.e("row")]; if ((parent == null ? void 0 : parent.props.highlightCurrentRow) && row === props.store.states.currentRow.value) { classes.push("current-row"); } if (props.stripe && rowIndex % 2 === 1) { classes.push(ns.em("row", "striped")); } const rowClassName = parent == null ? void 0 : parent.props.rowClassName; if (isString$1(rowClassName)) { classes.push(rowClassName); } else if (isFunction$1(rowClassName)) { classes.push(rowClassName.call(null, { row, rowIndex })); } return classes; }; const getCellStyle = (rowIndex, columnIndex, row, column) => { const cellStyle = parent == null ? void 0 : parent.props.cellStyle; let cellStyles = cellStyle != null ? cellStyle : {}; if (isFunction$1(cellStyle)) { cellStyles = cellStyle.call(null, { rowIndex, columnIndex, row, column }); } const fixedStyle = getFixedColumnOffset(columnIndex, props == null ? void 0 : props.fixed, props.store); ensurePosition(fixedStyle, "left"); ensurePosition(fixedStyle, "right"); return Object.assign({}, cellStyles, fixedStyle); }; const getCellClass = (rowIndex, columnIndex, row, column, offset) => { const fixedClasses = getFixedColumnsClass(ns.b(), columnIndex, props == null ? void 0 : props.fixed, props.store, void 0, offset); const classes = [column.id, column.align, column.className, ...fixedClasses]; const cellClassName = parent == null ? void 0 : parent.props.cellClassName; if (isString$1(cellClassName)) { classes.push(cellClassName); } else if (isFunction$1(cellClassName)) { classes.push(cellClassName.call(null, { rowIndex, columnIndex, row, column })); } classes.push(ns.e("cell")); return classes.filter((className) => Boolean(className)).join(" "); }; const getSpan = (row, column, rowIndex, columnIndex) => { let rowspan = 1; let colspan = 1; const fn2 = parent == null ? void 0 : parent.props.spanMethod; if (isFunction$1(fn2)) { const result = fn2({ row, column, rowIndex, columnIndex }); if (isArray$1(result)) { rowspan = result[0]; colspan = result[1]; } else if (isObject$2(result)) { rowspan = result.rowspan; colspan = result.colspan; } } return { rowspan, colspan }; }; const getColspanRealWidth = (columns, colspan, index) => { if (colspan < 1) { return columns[index].realWidth; } const widthArr = columns.map(({ realWidth, width }) => realWidth || width).slice(index, index + colspan); return Number(widthArr.reduce((acc, width) => Number(acc) + Number(width), -1)); }; return { getRowStyle, getRowClass, getCellStyle, getCellClass, getSpan, getColspanRealWidth }; } const __default__ = vue.defineComponent({ name: "TableTdWrapper" }); const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({ ...__default__, props: { colspan: { type: Number, default: 1 }, rowspan: { type: Number, default: 1 } }, setup(__props) { return (_ctx, _cache) => { return vue.openBlock(), vue.createElementBlock("td", { colspan: __props.colspan, rowspan: __props.rowspan }, [ vue.renderSlot(_ctx.$slots, "default") ], 8, ["colspan", "rowspan"]); }; } }); var TdWrapper = /* @__PURE__ */ _export_sfc$1(_sfc_main$4, [["__file", "td-wrapper.vue"]]); function useRender$1(props) { const parent = vue.inject(TABLE_INJECTION_KEY); const ns = useNamespace("table"); const { handleDoubleClick, handleClick, handleContextMenu, handleMouseEnter, handleMouseLeave, handleCellMouseEnter, handleCellMouseLeave, tooltipContent, tooltipTrigger } = useEvents(props); const { getRowStyle, getRowClass, getCellStyle, getCellClass, getSpan, getColspanRealWidth } = useStyles(props); const firstDefaultColumnIndex = vue.computed(() => { return props.store.states.columns.value.findIndex(({ type }) => type === "default"); }); const getKeyOfRow = (row, index) => { const rowKey = parent.props.rowKey; if (rowKey) { return getRowIdentity(row, rowKey); } return index; }; const rowRender = (row, $index, treeRowData, expanded = false) => { const { tooltipEffect, tooltipOptions, store } = props; const { indent, columns } = store.states; const rowClasses = getRowClass(row, $index); let display = true; if (treeRowData) { rowClasses.push(ns.em("row", `level-${treeRowData.level}`)); display = treeRowData.display; } const displayStyle = display ? null : { display: "none" }; return vue.h("tr", { style: [displayStyle, getRowStyle(row, $index)], class: rowClasses, key: getKeyOfRow(row, $index), onDblclick: ($event) => handleDoubleClick($event, row), onClick: ($event) => handleClick($event, row), onContextmenu: ($event) => handleContextMenu($event, row), onMouseenter: () => handleMouseEnter($index), onMouseleave: handleMouseLeave }, columns.value.map((column, cellIndex) => { const { rowspan, colspan } = getSpan(row, column, $index, cellIndex); if (!rowspan || !colspan) { return null; } const columnData = Object.assign({}, column); columnData.realWidth = getColspanRealWidth(columns.value, colspan, cellIndex); const data = { store: props.store, _self: props.context || parent, column: columnData, row, $index, cellIndex, expanded }; if (cellIndex === firstDefaultColumnIndex.value && treeRowData) { data.treeNode = { indent: treeRowData.level * indent.value, level: treeRowData.level }; if (isBoolean(treeRowData.expanded)) { data.treeNode.expanded = treeRowData.expanded; if ("loading" in treeRowData) { data.treeNode.loading = treeRowData.loading; } if ("noLazyChildren" in treeRowData) { data.treeNode.noLazyChildren = treeRowData.noLazyChildren; } } } const baseKey = `${getKeyOfRow(row, $index)},${cellIndex}`; const patchKey = columnData.columnKey || columnData.rawColumnKey || ""; const mergedTooltipOptions = column.showOverflowTooltip && merge({ effect: tooltipEffect }, tooltipOptions, column.showOverflowTooltip); return vue.h(TdWrapper, { style: getCellStyle($index, cellIndex, row, column), class: getCellClass($index, cellIndex, row, column, colspan - 1), key: `${patchKey}${baseKey}`, rowspan, colspan, onMouseenter: ($event) => handleCellMouseEnter($event, row, mergedTooltipOptions), onMouseleave: handleCellMouseLeave }, { default: () => cellChildren(cellIndex, column, data) }); })); }; const cellChildren = (cellIndex, column, data) => { return column.renderCell(data); }; const wrappedRowRender = (row, $index) => { const store = props.store; const { isRowExpanded, assertRowKey } = store; const { treeData, lazyTreeNodeMap, childrenColumnName, rowKey } = store.states; const columns = store.states.columns.value; const hasExpandColumn = columns.some(({ type }) => type === "expand"); if (hasExpandColumn) { const expanded = isRowExpanded(row); const tr = rowRender(row, $index, void 0, expanded); const renderExpanded = parent.renderExpanded; if (expanded) { if (!renderExpanded) { console.error("[Element Error]renderExpanded is required."); return tr; } return [ [ tr, vue.h("tr", { key: `expanded-row__${tr.key}` }, [ vue.h("td", { colspan: columns.length, class: `${ns.e("cell")} ${ns.e("expanded-cell")}` }, [renderExpanded({ row, $index, store, expanded })]) ]) ] ]; } else { return [[tr]]; } } else if (Object.keys(treeData.value).length) { assertRowKey(); const key = getRowIdentity(row, rowKey.value); let cur = treeData.value[key]; let treeRowData = null; if (cur) { treeRowData = { expanded: cur.expanded, level: cur.level, display: true }; if (isBoolean(cur.lazy)) { if (isBoolean(cur.loaded) && cur.loaded) { treeRowData.noLazyChildren = !(cur.children && cur.children.length); } treeRowData.loading = cur.loading; } } const tmp = [rowRender(row, $index, treeRowData)]; if (cur) { let i = 0; const traverse = (children, parent2) => { if (!(children && children.length && parent2)) return; children.forEach((node) => { const innerTreeRowData = { display: parent2.display && parent2.expanded, level: parent2.level + 1, expanded: false, noLazyChildren: false, loading: false }; const childKey = getRowIdentity(node, rowKey.value); if (isPropAbsent(childKey)) { throw new Error("For nested data item, row-key is required."); } cur = { ...treeData.value[childKey] }; if (cur) { innerTreeRowData.expanded = cur.expanded; cur.level = cur.level || innerTreeRowData.level; cur.display = !!(cur.expanded && innerTreeRowData.display); if (isBoolean(cur.lazy)) { if (isBoolean(cur.loaded) && cur.loaded) { innerTreeRowData.noLazyChildren = !(cur.children && cur.children.length); } innerTreeRowData.loading = cur.loading; } } i++; tmp.push(rowRender(node, $index + i, innerTreeRowData)); if (cur) { const nodes2 = lazyTreeNodeMap.value[childKey] || node[childrenColumnName.value]; traverse(nodes2, cur); } }); }; cur.display = true; const nodes = lazyTreeNodeMap.value[key] || row[childrenColumnName.value]; traverse(nodes, cur); } return tmp; } else { return rowRender(row, $index, void 0); } }; return { wrappedRowRender, tooltipContent, tooltipTrigger }; } const defaultProps$2 = { store: { required: true, type: Object }, stripe: Boolean, tooltipEffect: String, tooltipOptions: { type: Object }, context: { default: () => ({}), type: Object }, rowClassName: [String, Function], rowStyle: [Object, Function], fixed: { type: String, default: "" }, highlight: Boolean }; var TableBody = vue.defineComponent({ name: "ElTableBody", props: defaultProps$2, setup(props) { const instance = vue.getCurrentInstance(); const parent = vue.inject(TABLE_INJECTION_KEY); const ns = useNamespace("table"); const { wrappedRowRender, tooltipContent, tooltipTrigger } = useRender$1(props); const { onColumnsChange, onScrollableChange } = useLayoutObserver(parent); const hoveredCellList = []; vue.watch(props.store.states.hoverRow, (newVal, oldVal) => { var _a2; const el = instance == null ? void 0 : instance.vnode.el; const rows = Array.from((el == null ? void 0 : el.children) || []).filter((e) => e == null ? void 0 : e.classList.contains(`${ns.e("row")}`)); let rowNum = newVal; const childNodes = (_a2 = rows[rowNum]) == null ? void 0 : _a2.childNodes; if (childNodes == null ? void 0 : childNodes.length) { let control = 0; const indexes = Array.from(childNodes).reduce((acc, item, index) => { var _a22, _b; if (((_a22 = childNodes[index]) == null ? void 0 : _a22.colSpan) > 1) { control = (_b = childNodes[index]) == null ? void 0 : _b.colSpan; } if (item.nodeName !== "TD" && control === 0) { acc.push(index); } control > 0 && control--; return acc; }, []); indexes.forEach((rowIndex) => { var _a22; rowNum = newVal; while (rowNum > 0) { const preChildNodes = (_a22 = rows[rowNum - 1]) == null ? void 0 : _a22.childNodes; if (preChildNodes[rowIndex] && preChildNodes[rowIndex].nodeName === "TD" && preChildNodes[rowIndex].rowSpan > 1) { addClass(preChildNodes[rowIndex], "hover-cell"); hoveredCellList.push(preChildNodes[rowIndex]); break; } rowNum--; } }); } else { hoveredCellList.forEach((item) => removeClass(item, "hover-cell")); hoveredCellList.length = 0; } if (!props.store.states.isComplex.value || !isClient$1) return; rAF(() => { const oldRow = rows[oldVal]; const newRow = rows[newVal]; if (oldRow && !oldRow.classList.contains("hover-fixed-row")) { removeClass(oldRow, "hover-row"); } if (newRow) { addClass(newRow, "hover-row"); } }); }); vue.onUnmounted(() => { var _a2; (_a2 = removePopper) == null ? void 0 : _a2(); }); return { ns, onColumnsChange, onScrollableChange, wrappedRowRender, tooltipContent, tooltipTrigger }; }, render() { const { wrappedRowRender, store } = this; const data = store.states.data.value || []; return vue.h("tbody", { tabIndex: -1 }, [ data.reduce((acc, row) => { return acc.concat(wrappedRowRender(row, acc.length)); }, []) ]); } }); function useMapState() { const table = vue.inject(TABLE_INJECTION_KEY); const store = table == null ? void 0 : table.store; const leftFixedLeafCount = vue.computed(() => { return store.states.fixedLeafColumnsLength.value; }); const rightFixedLeafCount = vue.computed(() => { return store.states.rightFixedColumns.value.length; }); const columnsCount = vue.computed(() => { return store.states.columns.value.length; }); const leftFixedCount = vue.computed(() => { return store.states.fixedColumns.value.length; }); const rightFixedCount = vue.computed(() => { return store.states.rightFixedColumns.value.length; }); return { leftFixedLeafCount, rightFixedLeafCount, columnsCount, leftFixedCount, rightFixedCount, columns: store.states.columns }; } function useStyle$1(props) { const { columns } = useMapState(); const ns = useNamespace("table"); const getCellClasses = (columns2, cellIndex) => { const column = columns2[cellIndex]; const classes = [ ns.e("cell"), column.id, column.align, column.labelClassName, ...getFixedColumnsClass(ns.b(), cellIndex, column.fixed, props.store) ]; if (column.className) { classes.push(column.className); } if (!column.children) { classes.push(ns.is("leaf")); } return classes; }; const getCellStyles = (column, cellIndex) => { const fixedStyle = getFixedColumnOffset(cellIndex, column.fixed, props.store); ensurePosition(fixedStyle, "left"); ensurePosition(fixedStyle, "right"); return fixedStyle; }; return { getCellClasses, getCellStyles, columns }; } var TableFooter = vue.defineComponent({ name: "ElTableFooter", props: { fixed: { type: String, default: "" }, store: { required: true, type: Object }, summaryMethod: Function, sumText: String, border: Boolean, defaultSort: { type: Object, default: () => { return { prop: "", order: "" }; } } }, setup(props) { const parent = vue.inject(TABLE_INJECTION_KEY); const ns = useNamespace("table"); const { getCellClasses, getCellStyles, columns } = useStyle$1(props); const { onScrollableChange, onColumnsChange } = useLayoutObserver(parent); return { ns, onScrollableChange, onColumnsChange, getCellClasses, getCellStyles, columns }; }, render() { const { columns, getCellStyles, getCellClasses, summaryMethod, sumText } = this; const data = this.store.states.data.value; let sums = []; if (summaryMethod) { sums = summaryMethod({ columns, data }); } else { columns.forEach((column, index) => { if (index === 0) { sums[index] = sumText; return; } const values = data.map((item) => Number(item[column.property])); const precisions = []; let notNumber = true; values.forEach((value) => { if (!Number.isNaN(+value)) { notNumber = false; const decimal = `${value}`.split(".")[1]; precisions.push(decimal ? decimal.length : 0); } }); const precision = Math.max.apply(null, precisions); if (!notNumber) { sums[index] = values.reduce((prev, curr) => { const value = Number(curr); if (!Number.isNaN(+value)) { return Number.parseFloat((prev + curr).toFixed(Math.min(precision, 20))); } else { return prev; } }, 0); } else { sums[index] = ""; } }); } return vue.h(vue.h("tfoot", [ vue.h("tr", {}, [ ...columns.map((column, cellIndex) => vue.h("td", { key: cellIndex, colspan: column.colSpan, rowspan: column.rowSpan, class: getCellClasses(columns, cellIndex), style: getCellStyles(column, cellIndex) }, [ vue.h("div", { class: ["cell", column.labelClassName] }, [sums[cellIndex]]) ])) ]) ])); } }); function useUtils(store) { const setCurrentRow = (row) => { store.commit("setCurrentRow", row); }; const getSelectionRows = () => { return store.getSelectionRows(); }; const toggleRowSelection = (row, selected, ignoreSelectable = true) => { store.toggleRowSelection(row, selected, false, ignoreSelectable); store.updateAllSelected(); }; const clearSelection = () => { store.clearSelection(); }; const clearFilter = (columnKeys) => { store.clearFilter(columnKeys); }; const toggleAllSelection = () => { store.commit("toggleAllSelection"); }; const toggleRowExpansion = (row, expanded) => { store.toggleRowExpansionAdapter(row, expanded); }; const clearSort = () => { store.clearSort(); }; const sort = (prop, order) => { store.commit("sort", { prop, order }); }; const updateKeyChildren = (key, data) => { store.updateKeyChildren(key, data); }; return { setCurrentRow, getSelectionRows, toggleRowSelection, clearSelection, clearFilter, toggleAllSelection, toggleRowExpansion, clearSort, sort, updateKeyChildren }; } function useStyle(props, layout, store, table) { const isHidden2 = vue.ref(false); const renderExpanded = vue.ref(null); const resizeProxyVisible = vue.ref(false); const setDragVisible = (visible) => { resizeProxyVisible.value = visible; }; const resizeState = vue.ref({ width: null, height: null, headerHeight: null }); const isGroup = vue.ref(false); const scrollbarViewStyle = { display: "inline-block", verticalAlign: "middle" }; const tableWidth = vue.ref(); const tableScrollHeight = vue.ref(0); const bodyScrollHeight = vue.ref(0); const headerScrollHeight = vue.ref(0); const footerScrollHeight = vue.ref(0); const appendScrollHeight = vue.ref(0); vue.watchEffect(() => { layout.setHeight(props.height); }); vue.watchEffect(() => { layout.setMaxHeight(props.maxHeight); }); vue.watch(() => [props.currentRowKey, store.states.rowKey], ([currentRowKey, rowKey]) => { if (!vue.unref(rowKey) || !vue.unref(currentRowKey)) return; store.setCurrentRowKey(`${currentRowKey}`); }, { immediate: true }); vue.watch(() => props.data, (data) => { table.store.commit("setData", data); }, { immediate: true, deep: true }); vue.watchEffect(() => { if (props.expandRowKeys) { store.setExpandRowKeysAdapter(props.expandRowKeys); } }); const handleMouseLeave = () => { table.store.commit("setHoverRow", null); if (table.hoverState) table.hoverState = null; }; const handleHeaderFooterMousewheel = (event, data) => { const { pixelX, pixelY } = data; if (Math.abs(pixelX) >= Math.abs(pixelY)) { table.refs.bodyWrapper.scrollLeft += data.pixelX / 5; } }; const shouldUpdateHeight = vue.computed(() => { return props.height || props.maxHeight || store.states.fixedColumns.value.length > 0 || store.states.rightFixedColumns.value.length > 0; }); const tableBodyStyles = vue.computed(() => { return { width: layout.bodyWidth.value ? `${layout.bodyWidth.value}px` : "" }; }); const doLayout = () => { if (shouldUpdateHeight.value) { layout.updateElsHeight(); } layout.updateColumnsWidth(); if (typeof window === "undefined") return; requestAnimationFrame(syncPosition); }; vue.onMounted(async () => { await vue.nextTick(); store.updateColumns(); bindEvents(); requestAnimationFrame(doLayout); const el = table.vnode.el; const tableHeader = table.refs.headerWrapper; if (props.flexible && el && el.parentElement) { el.parentElement.style.minWidth = "0"; } resizeState.value = { width: tableWidth.value = el.offsetWidth, height: el.offsetHeight, headerHeight: props.showHeader && tableHeader ? tableHeader.offsetHeight : null }; store.states.columns.value.forEach((column) => { if (column.filteredValue && column.filteredValue.length) { table.store.commit("filterChange", { column, values: column.filteredValue, silent: true }); } }); table.$ready = true; }); const setScrollClassByEl = (el, className) => { if (!el) return; const classList = Array.from(el.classList).filter((item) => !item.startsWith("is-scrolling-")); classList.push(layout.scrollX.value ? className : "is-scrolling-none"); el.className = classList.join(" "); }; const setScrollClass = (className) => { const { tableWrapper } = table.refs; setScrollClassByEl(tableWrapper, className); }; const hasScrollClass = (className) => { const { tableWrapper } = table.refs; return !!(tableWrapper && tableWrapper.classList.contains(className)); }; const syncPosition = function() { if (!table.refs.scrollBarRef) return; if (!layout.scrollX.value) { const scrollingNoneClass = "is-scrolling-none"; if (!hasScrollClass(scrollingNoneClass)) { setScrollClass(scrollingNoneClass); } return; } const scrollContainer = table.refs.scrollBarRef.wrapRef; if (!scrollContainer) return; const { scrollLeft, offsetWidth, scrollWidth } = scrollContainer; const { headerWrapper, footerWrapper } = table.refs; if (headerWrapper) headerWrapper.scrollLeft = scrollLeft; if (footerWrapper) footerWrapper.scrollLeft = scrollLeft; const maxScrollLeftPosition = scrollWidth - offsetWidth - 1; if (scrollLeft >= maxScrollLeftPosition) { setScrollClass("is-scrolling-right"); } else if (scrollLeft === 0) { setScrollClass("is-scrolling-left"); } else { setScrollClass("is-scrolling-middle"); } }; const bindEvents = () => { if (!table.refs.scrollBarRef) return; if (table.refs.scrollBarRef.wrapRef) { useEventListener$1(table.refs.scrollBarRef.wrapRef, "scroll", syncPosition, { passive: true }); } if (props.fit) { useResizeObserver$1(table.vnode.el, resizeListener); } else { useEventListener$1(window, "resize", resizeListener); } useResizeObserver$1(table.refs.bodyWrapper, () => { var _a2, _b; resizeListener(); (_b = (_a2 = table.refs) == null ? void 0 : _a2.scrollBarRef) == null ? void 0 : _b.update(); }); }; const resizeListener = () => { var _a2, _b, _c, _d; const el = table.vnode.el; if (!table.$ready || !el) return; let shouldUpdateLayout = false; const { width: oldWidth, height: oldHeight, headerHeight: oldHeaderHeight } = resizeState.value; const width = tableWidth.value = el.offsetWidth; if (oldWidth !== width) { shouldUpdateLayout = true; } const height = el.offsetHeight; if ((props.height || shouldUpdateHeight.value) && oldHeight !== height) { shouldUpdateLayout = true; } const tableHeader = props.tableLayout === "fixed" ? table.refs.headerWrapper : (_a2 = table.refs.tableHeaderRef) == null ? void 0 : _a2.$el; if (props.showHeader && (tableHeader == null ? void 0 : tableHeader.offsetHeight) !== oldHeaderHeight) { shouldUpdateLayout = true; } tableScrollHeight.value = ((_b = table.refs.tableWrapper) == null ? void 0 : _b.scrollHeight) || 0; headerScrollHeight.value = (tableHeader == null ? void 0 : tableHeader.scrollHeight) || 0; footerScrollHeight.value = ((_c = table.refs.footerWrapper) == null ? void 0 : _c.offsetHeight) || 0; appendScrollHeight.value = ((_d = table.refs.appendWrapper) == null ? void 0 : _d.offsetHeight) || 0; bodyScrollHeight.value = tableScrollHeight.value - headerScrollHeight.value - footerScrollHeight.value - appendScrollHeight.value; if (shouldUpdateLayout) { resizeState.value = { width, height, headerHeight: props.showHeader && (tableHeader == null ? void 0 : tableHeader.offsetHeight) || 0 }; doLayout(); } }; const tableSize = useFormSize(); const bodyWidth = vue.computed(() => { const { bodyWidth: bodyWidth_, scrollY, gutterWidth } = layout; return bodyWidth_.value ? `${bodyWidth_.value - (scrollY.value ? gutterWidth : 0)}px` : ""; }); const tableLayout = vue.computed(() => { if (props.maxHeight) return "fixed"; return props.tableLayout; }); const emptyBlockStyle = vue.computed(() => { if (props.data && props.data.length) return null; let height = "100%"; if (props.height && bodyScrollHeight.value) { height = `${bodyScrollHeight.value}px`; } const width = tableWidth.value; return { width: width ? `${width}px` : "", height }; }); const scrollbarStyle = vue.computed(() => { if (props.height) { return { height: "100%" }; } if (props.maxHeight) { if (!Number.isNaN(Number(props.maxHeight))) { return { maxHeight: `${props.maxHeight - headerScrollHeight.value - footerScrollHeight.value}px` }; } else { return { maxHeight: `calc(${props.maxHeight} - ${headerScrollHeight.value + footerScrollHeight.value}px)` }; } } return {}; }); const handleFixedMousewheel = (event, data) => { const bodyWrapper = table.refs.bodyWrapper; if (Math.abs(data.spinY) > 0) { const currentScrollTop = bodyWrapper.scrollTop; if (data.pixelY < 0 && currentScrollTop !== 0) { event.preventDefault(); } if (data.pixelY > 0 && bodyWrapper.scrollHeight - bodyWrapper.clientHeight > currentScrollTop) { event.preventDefault(); } bodyWrapper.scrollTop += Math.ceil(data.pixelY / 5); } else { bodyWrapper.scrollLeft += Math.ceil(data.pixelX / 5); } }; return { isHidden: isHidden2, renderExpanded, setDragVisible, isGroup, handleMouseLeave, handleHeaderFooterMousewheel, tableSize, emptyBlockStyle, handleFixedMousewheel, resizeProxyVisible, bodyWidth, resizeState, doLayout, tableBodyStyles, tableLayout, scrollbarViewStyle, scrollbarStyle }; } function useKeyRender(table) { const observer = vue.ref(); const initWatchDom = () => { const el = table.vnode.el; const columnsWrapper = el.querySelector(".hidden-columns"); const config = { childList: true, subtree: true }; const updateOrderFns = table.store.states.updateOrderFns; observer.value = new MutationObserver(() => { updateOrderFns.forEach((fn2) => fn2()); }); observer.value.observe(columnsWrapper, config); }; vue.onMounted(() => { initWatchDom(); }); vue.onUnmounted(() => { var _a2; (_a2 = observer.value) == null ? void 0 : _a2.disconnect(); }); } var defaultProps$1 = { data: { type: Array, default: () => [] }, size: useSizeProp, width: [String, Number], height: [String, Number], maxHeight: [String, Number], fit: { type: Boolean, default: true }, stripe: Boolean, border: Boolean, rowKey: [String, Function], showHeader: { type: Boolean, default: true }, showSummary: Boolean, sumText: String, summaryMethod: Function, rowClassName: [String, Function], rowStyle: [Object, Function], cellClassName: [String, Function], cellStyle: [Object, Function], headerRowClassName: [String, Function], headerRowStyle: [Object, Function], headerCellClassName: [String, Function], headerCellStyle: [Object, Function], highlightCurrentRow: Boolean, currentRowKey: [String, Number], emptyText: String, expandRowKeys: Array, defaultExpandAll: Boolean, defaultSort: Object, tooltipEffect: String, tooltipOptions: Object, spanMethod: Function, selectOnIndeterminate: { type: Boolean, default: true }, indent: { type: Number, default: 16 }, treeProps: { type: Object, default: () => { return { hasChildren: "hasChildren", children: "children", checkStrictly: false }; } }, lazy: Boolean, load: Function, style: { type: Object, default: () => ({}) }, className: { type: String, default: "" }, tableLayout: { type: String, default: "fixed" }, scrollbarAlwaysOn: Boolean, flexible: Boolean, showOverflowTooltip: [Boolean, Object], tooltipFormatter: Function, appendFilterPanelTo: String, scrollbarTabindex: { type: [Number, String], default: void 0 }, allowDragLastColumn: { type: Boolean, default: true } }; function hColgroup(props) { const isAuto = props.tableLayout === "auto"; let columns = props.columns || []; if (isAuto) { if (columns.every(({ width }) => isUndefined(width))) { columns = []; } } const getPropsData = (column) => { const propsData = { key: `${props.tableLayout}_${column.id}`, style: {}, name: void 0 }; if (isAuto) { propsData.style = { width: `${column.width}px` }; } else { propsData.name = column.id; } return propsData; }; return vue.h("colgroup", {}, columns.map((column) => vue.h("col", getPropsData(column)))); } hColgroup.props = ["columns", "tableLayout"]; const useScrollbar = () => { const scrollBarRef = vue.ref(); const scrollTo = (options, yCoord) => { const scrollbar = scrollBarRef.value; if (scrollbar) { scrollbar.scrollTo(options, yCoord); } }; const setScrollPosition = (position, offset) => { const scrollbar = scrollBarRef.value; if (scrollbar && isNumber(offset) && ["Top", "Left"].includes(position)) { scrollbar[`setScroll${position}`](offset); } }; const setScrollTop = (top) => setScrollPosition("Top", top); const setScrollLeft = (left) => setScrollPosition("Left", left); return { scrollBarRef, scrollTo, setScrollTop, setScrollLeft }; }; var v = false, o, f, s, u, d, N, l, p, m, w, D, x, E, M, F; function a() { if (!v) { v = true; var e = navigator.userAgent, n = /(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(e), i = /(Mac OS X)|(Windows)|(Linux)/.exec(e); if (x = /\b(iPhone|iP[ao]d)/.exec(e), E = /\b(iP[ao]d)/.exec(e), w = /Android/i.exec(e), M = /FBAN\/\w+;/i.exec(e), F = /Mobile/i.exec(e), D = !!/Win64/.exec(e), n) { o = n[1] ? parseFloat(n[1]) : n[5] ? parseFloat(n[5]) : NaN, o && document && document.documentMode && (o = document.documentMode); var r = /(?:Trident\/(\d+.\d+))/.exec(e); N = r ? parseFloat(r[1]) + 4 : o, f = n[2] ? parseFloat(n[2]) : NaN, s = n[3] ? parseFloat(n[3]) : NaN, u = n[4] ? parseFloat(n[4]) : NaN, u ? (n = /(?:Chrome\/(\d+\.\d+))/.exec(e), d = n && n[1] ? parseFloat(n[1]) : NaN) : d = NaN; } else o = f = s = d = u = NaN; if (i) { if (i[1]) { var t = /(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e); l = t ? parseFloat(t[1].replace("_", ".")) : true; } else l = false; p = !!i[2], m = !!i[3]; } else l = p = m = false; } } var _ = { ie: function() { return a() || o; }, ieCompatibilityMode: function() { return a() || N > o; }, ie64: function() { return _.ie() && D; }, firefox: function() { return a() || f; }, opera: function() { return a() || s; }, webkit: function() { return a() || u; }, safari: function() { return _.webkit(); }, chrome: function() { return a() || d; }, windows: function() { return a() || p; }, osx: function() { return a() || l; }, linux: function() { return a() || m; }, iphone: function() { return a() || x; }, mobile: function() { return a() || x || E || w || F; }, nativeApp: function() { return a() || M; }, android: function() { return a() || w; }, ipad: function() { return a() || E; } }, A = _; var c = !!(typeof window < "u" && window.document && window.document.createElement), U = { canUseDOM: c }, h = U; var X; h.canUseDOM && (X = document.implementation && document.implementation.hasFeature && document.implementation.hasFeature("", "") !== true); function S(e, n) { if (!h.canUseDOM || n && !("addEventListener" in document)) return false; var i = "on" + e, r = i in document; if (!r) { var t = document.createElement("div"); t.setAttribute(i, "return;"), r = typeof t[i] == "function"; } return !r && X && e === "wheel" && (r = document.implementation.hasFeature("Events.wheel", "3.0")), r; } var b = S; var O = 10, I = 40, P = 800; function T(e) { var n = 0, i = 0, r = 0, t = 0; return "detail" in e && (i = e.detail), "wheelDelta" in e && (i = -e.wheelDelta / 120), "wheelDeltaY" in e && (i = -e.wheelDeltaY / 120), "wheelDeltaX" in e && (n = -e.wheelDeltaX / 120), "axis" in e && e.axis === e.HORIZONTAL_AXIS && (n = i, i = 0), r = n * O, t = i * O, "deltaY" in e && (t = e.deltaY), "deltaX" in e && (r = e.deltaX), (r || t) && e.deltaMode && (e.deltaMode == 1 ? (r *= I, t *= I) : (r *= P, t *= P)), r && !n && (n = r < 1 ? -1 : 1), t && !i && (i = t < 1 ? -1 : 1), { spinX: n, spinY: i, pixelX: r, pixelY: t }; } T.getEventType = function() { return A.firefox() ? "DOMMouseScroll" : b("wheel") ? "wheel" : "mousewheel"; }; var Y = T; /** * Checks if an event is supported in the current execution environment. * * NOTE: This will not work correctly for non-generic events such as `change`, * `reset`, `load`, `error`, and `select`. * * Borrows from Modernizr. * * @param {string} eventNameSuffix Event name, e.g. "click". * @param {?boolean} capture Check if the capture phase is supported. * @return {boolean} True if the event is supported. * @internal * @license Modernizr 3.0.0pre (Custom Build) | MIT */ const mousewheel = function(element, callback) { if (element && element.addEventListener) { const fn2 = function(event) { const normalized = Y(event); callback && Reflect.apply(callback, this, [event, normalized]); }; element.addEventListener("wheel", fn2, { passive: true }); } }; const Mousewheel = { beforeMount(el, binding) { mousewheel(el, binding.value); } }; let tableIdSeed = 1; const _sfc_main$3 = vue.defineComponent({ name: "ElTable", directives: { Mousewheel }, components: { TableHeader, TableBody, TableFooter, ElScrollbar, hColgroup }, props: defaultProps$1, emits: [ "select", "select-all", "selection-change", "cell-mouse-enter", "cell-mouse-leave", "cell-contextmenu", "cell-click", "cell-dblclick", "row-click", "row-contextmenu", "row-dblclick", "header-click", "header-contextmenu", "sort-change", "filter-change", "current-change", "header-dragend", "expand-change", "scroll" ], setup(props) { const { t } = useLocale(); const ns = useNamespace("table"); const table = vue.getCurrentInstance(); vue.provide(TABLE_INJECTION_KEY, table); const store = createStore(table, props); table.store = store; const layout = new TableLayout({ store: table.store, table, fit: props.fit, showHeader: props.showHeader }); table.layout = layout; const isEmpty = vue.computed(() => (store.states.data.value || []).length === 0); const { setCurrentRow, getSelectionRows, toggleRowSelection, clearSelection, clearFilter, toggleAllSelection, toggleRowExpansion, clearSort, sort, updateKeyChildren } = useUtils(store); const { isHidden: isHidden2, renderExpanded, setDragVisible, isGroup, handleMouseLeave, handleHeaderFooterMousewheel, tableSize, emptyBlockStyle, handleFixedMousewheel, resizeProxyVisible, bodyWidth, resizeState, doLayout, tableBodyStyles, tableLayout, scrollbarViewStyle, scrollbarStyle } = useStyle(props, layout, store, table); const { scrollBarRef, scrollTo, setScrollLeft, setScrollTop } = useScrollbar(); const debouncedUpdateLayout = debounce(doLayout, 50); const tableId = `${ns.namespace.value}-table_${tableIdSeed++}`; table.tableId = tableId; table.state = { isGroup, resizeState, doLayout, debouncedUpdateLayout }; const computedSumText = vue.computed(() => { var _a2; return (_a2 = props.sumText) != null ? _a2 : t("el.table.sumText"); }); const computedEmptyText = vue.computed(() => { var _a2; return (_a2 = props.emptyText) != null ? _a2 : t("el.table.emptyText"); }); const columns = vue.computed(() => { return convertToRows(store.states.originColumns.value)[0]; }); useKeyRender(table); vue.onBeforeUnmount(() => { debouncedUpdateLayout.cancel(); }); return { ns, layout, store, columns, handleHeaderFooterMousewheel, handleMouseLeave, tableId, tableSize, isHidden: isHidden2, isEmpty, renderExpanded, resizeProxyVisible, resizeState, isGroup, bodyWidth, tableBodyStyles, emptyBlockStyle, debouncedUpdateLayout, handleFixedMousewheel, setCurrentRow, getSelectionRows, toggleRowSelection, clearSelection, clearFilter, toggleAllSelection, toggleRowExpansion, clearSort, doLayout, sort, updateKeyChildren, t, setDragVisible, context: table, computedSumText, computedEmptyText, tableLayout, scrollbarViewStyle, scrollbarStyle, scrollBarRef, scrollTo, setScrollLeft, setScrollTop, allowDragLastColumn: props.allowDragLastColumn }; } }); function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { const _component_hColgroup = vue.resolveComponent("hColgroup"); const _component_table_header = vue.resolveComponent("table-header"); const _component_table_body = vue.resolveComponent("table-body"); const _component_table_footer = vue.resolveComponent("table-footer"); const _component_el_scrollbar = vue.resolveComponent("el-scrollbar"); const _directive_mousewheel = vue.resolveDirective("mousewheel"); return vue.openBlock(), vue.createElementBlock("div", { ref: "tableWrapper", class: vue.normalizeClass([ { [_ctx.ns.m("fit")]: _ctx.fit, [_ctx.ns.m("striped")]: _ctx.stripe, [_ctx.ns.m("border")]: _ctx.border || _ctx.isGroup, [_ctx.ns.m("hidden")]: _ctx.isHidden, [_ctx.ns.m("group")]: _ctx.isGroup, [_ctx.ns.m("fluid-height")]: _ctx.maxHeight, [_ctx.ns.m("scrollable-x")]: _ctx.layout.scrollX.value, [_ctx.ns.m("scrollable-y")]: _ctx.layout.scrollY.value, [_ctx.ns.m("enable-row-hover")]: !_ctx.store.states.isComplex.value, [_ctx.ns.m("enable-row-transition")]: (_ctx.store.states.data.value || []).length !== 0 && (_ctx.store.states.data.value || []).length < 100, "has-footer": _ctx.showSummary }, _ctx.ns.m(_ctx.tableSize), _ctx.className, _ctx.ns.b(), _ctx.ns.m(`layout-${_ctx.tableLayout}`) ]), style: vue.normalizeStyle(_ctx.style), "data-prefix": _ctx.ns.namespace.value, onMouseleave: _ctx.handleMouseLeave }, [ vue.createElementVNode("div", { class: vue.normalizeClass(_ctx.ns.e("inner-wrapper")) }, [ vue.createElementVNode("div", { ref: "hiddenColumns", class: "hidden-columns" }, [ vue.renderSlot(_ctx.$slots, "default") ], 512), _ctx.showHeader && _ctx.tableLayout === "fixed" ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", { key: 0, ref: "headerWrapper", class: vue.normalizeClass(_ctx.ns.e("header-wrapper")) }, [ vue.createElementVNode("table", { ref: "tableHeader", class: vue.normalizeClass(_ctx.ns.e("header")), style: vue.normalizeStyle(_ctx.tableBodyStyles), border: "0", cellpadding: "0", cellspacing: "0" }, [ vue.createVNode(_component_hColgroup, { columns: _ctx.store.states.columns.value, "table-layout": _ctx.tableLayout }, null, 8, ["columns", "table-layout"]), vue.createVNode(_component_table_header, { ref: "tableHeaderRef", border: _ctx.border, "default-sort": _ctx.defaultSort, store: _ctx.store, "append-filter-panel-to": _ctx.appendFilterPanelTo, "allow-drag-last-column": _ctx.allowDragLastColumn, onSetDragVisible: _ctx.setDragVisible }, null, 8, ["border", "default-sort", "store", "append-filter-panel-to", "allow-drag-last-column", "onSetDragVisible"]) ], 6) ], 2)), [ [_directive_mousewheel, _ctx.handleHeaderFooterMousewheel] ]) : vue.createCommentVNode("v-if", true), vue.createElementVNode("div", { ref: "bodyWrapper", class: vue.normalizeClass(_ctx.ns.e("body-wrapper")) }, [ vue.createVNode(_component_el_scrollbar, { ref: "scrollBarRef", "view-style": _ctx.scrollbarViewStyle, "wrap-style": _ctx.scrollbarStyle, always: _ctx.scrollbarAlwaysOn, tabindex: _ctx.scrollbarTabindex, onScroll: ($event) => _ctx.$emit("scroll", $event) }, { default: vue.withCtx(() => [ vue.createElementVNode("table", { ref: "tableBody", class: vue.normalizeClass(_ctx.ns.e("body")), cellspacing: "0", cellpadding: "0", border: "0", style: vue.normalizeStyle({ width: _ctx.bodyWidth, tableLayout: _ctx.tableLayout }) }, [ vue.createVNode(_component_hColgroup, { columns: _ctx.store.states.columns.value, "table-layout": _ctx.tableLayout }, null, 8, ["columns", "table-layout"]), _ctx.showHeader && _ctx.tableLayout === "auto" ? (vue.openBlock(), vue.createBlock(_component_table_header, { key: 0, ref: "tableHeaderRef", class: vue.normalizeClass(_ctx.ns.e("body-header")), border: _ctx.border, "default-sort": _ctx.defaultSort, store: _ctx.store, "append-filter-panel-to": _ctx.appendFilterPanelTo, onSetDragVisible: _ctx.setDragVisible }, null, 8, ["class", "border", "default-sort", "store", "append-filter-panel-to", "onSetDragVisible"])) : vue.createCommentVNode("v-if", true), vue.createVNode(_component_table_body, { context: _ctx.context, highlight: _ctx.highlightCurrentRow, "row-class-name": _ctx.rowClassName, "tooltip-effect": _ctx.tooltipEffect, "tooltip-options": _ctx.tooltipOptions, "row-style": _ctx.rowStyle, store: _ctx.store, stripe: _ctx.stripe }, null, 8, ["context", "highlight", "row-class-name", "tooltip-effect", "tooltip-options", "row-style", "store", "stripe"]), _ctx.showSummary && _ctx.tableLayout === "auto" ? (vue.openBlock(), vue.createBlock(_component_table_footer, { key: 1, class: vue.normalizeClass(_ctx.ns.e("body-footer")), border: _ctx.border, "default-sort": _ctx.defaultSort, store: _ctx.store, "sum-text": _ctx.computedSumText, "summary-method": _ctx.summaryMethod }, null, 8, ["class", "border", "default-sort", "store", "sum-text", "summary-method"])) : vue.createCommentVNode("v-if", true) ], 6), _ctx.isEmpty ? (vue.openBlock(), vue.createElementBlock("div", { key: 0, ref: "emptyBlock", style: vue.normalizeStyle(_ctx.emptyBlockStyle), class: vue.normalizeClass(_ctx.ns.e("empty-block")) }, [ vue.createElementVNode("span", { class: vue.normalizeClass(_ctx.ns.e("empty-text")) }, [ vue.renderSlot(_ctx.$slots, "empty", {}, () => [ vue.createTextVNode(vue.toDisplayString(_ctx.computedEmptyText), 1) ]) ], 2) ], 6)) : vue.createCommentVNode("v-if", true), _ctx.$slots.append ? (vue.openBlock(), vue.createElementBlock("div", { key: 1, ref: "appendWrapper", class: vue.normalizeClass(_ctx.ns.e("append-wrapper")) }, [ vue.renderSlot(_ctx.$slots, "append") ], 2)) : vue.createCommentVNode("v-if", true) ]), _: 3 }, 8, ["view-style", "wrap-style", "always", "tabindex", "onScroll"]) ], 2), _ctx.showSummary && _ctx.tableLayout === "fixed" ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", { key: 1, ref: "footerWrapper", class: vue.normalizeClass(_ctx.ns.e("footer-wrapper")) }, [ vue.createElementVNode("table", { class: vue.normalizeClass(_ctx.ns.e("footer")), cellspacing: "0", cellpadding: "0", border: "0", style: vue.normalizeStyle(_ctx.tableBodyStyles) }, [ vue.createVNode(_component_hColgroup, { columns: _ctx.store.states.columns.value, "table-layout": _ctx.tableLayout }, null, 8, ["columns", "table-layout"]), vue.createVNode(_component_table_footer, { border: _ctx.border, "default-sort": _ctx.defaultSort, store: _ctx.store, "sum-text": _ctx.computedSumText, "summary-method": _ctx.summaryMethod }, null, 8, ["border", "default-sort", "store", "sum-text", "summary-method"]) ], 6) ], 2)), [ [vue.vShow, !_ctx.isEmpty], [_directive_mousewheel, _ctx.handleHeaderFooterMousewheel] ]) : vue.createCommentVNode("v-if", true), _ctx.border || _ctx.isGroup ? (vue.openBlock(), vue.createElementBlock("div", { key: 2, class: vue.normalizeClass(_ctx.ns.e("border-left-patch")) }, null, 2)) : vue.createCommentVNode("v-if", true) ], 2), vue.withDirectives(vue.createElementVNode("div", { ref: "resizeProxy", class: vue.normalizeClass(_ctx.ns.e("column-resize-proxy")) }, null, 2), [ [vue.vShow, _ctx.resizeProxyVisible] ]) ], 46, ["data-prefix", "onMouseleave"]); } var Table = /* @__PURE__ */ _export_sfc$1(_sfc_main$3, [["render", _sfc_render], ["__file", "table.vue"]]); const defaultClassNames = { selection: "table-column--selection", expand: "table__expand-column" }; const cellStarts = { default: { order: "" }, selection: { width: 48, minWidth: 48, realWidth: 48, order: "" }, expand: { width: 48, minWidth: 48, realWidth: 48, order: "" }, index: { width: 48, minWidth: 48, realWidth: 48, order: "" } }; const getDefaultClassName = (type) => { return defaultClassNames[type] || ""; }; const cellForced = { selection: { renderHeader({ store, column }) { function isDisabled() { return store.states.data.value && store.states.data.value.length === 0; } return vue.h(ElCheckbox, { disabled: isDisabled(), size: store.states.tableSize.value, indeterminate: store.states.selection.value.length > 0 && !store.states.isAllSelected.value, "onUpdate:modelValue": store.toggleAllSelection, modelValue: store.states.isAllSelected.value, ariaLabel: column.label }); }, renderCell({ row, column, store, $index }) { return vue.h(ElCheckbox, { disabled: column.selectable ? !column.selectable.call(null, row, $index) : false, size: store.states.tableSize.value, onChange: () => { store.commit("rowSelectedChanged", row); }, onClick: (event) => event.stopPropagation(), modelValue: store.isSelected(row), ariaLabel: column.label }); }, sortable: false, resizable: false }, index: { renderHeader({ column }) { return column.label || "#"; }, renderCell({ column, $index }) { let i = $index + 1; const index = column.index; if (isNumber(index)) { i = $index + index; } else if (isFunction$1(index)) { i = index($index); } return vue.h("div", {}, [i]); }, sortable: false }, expand: { renderHeader({ column }) { return column.label || ""; }, renderCell({ row, store, expanded }) { const { ns } = store; const classes = [ns.e("expand-icon")]; if (expanded) { classes.push(ns.em("expand-icon", "expanded")); } const callback = function(e) { e.stopPropagation(); store.toggleRowExpansion(row); }; return vue.h("div", { class: classes, onClick: callback }, { default: () => { return [ vue.h(ElIcon, null, { default: () => { return [vue.h(arrow_right_default)]; } }) ]; } }); }, sortable: false, resizable: false } }; function defaultRenderCell({ row, column, $index }) { var _a2; const property2 = column.property; const value = property2 && getProp(row, property2).value; if (column && column.formatter) { return column.formatter(row, column, value, $index); } return ((_a2 = value == null ? void 0 : value.toString) == null ? void 0 : _a2.call(value)) || ""; } function treeCellPrefix({ row, treeNode, store }, createPlaceholder = false) { const { ns } = store; if (!treeNode) { if (createPlaceholder) { return [ vue.h("span", { class: ns.e("placeholder") }) ]; } return null; } const ele = []; const callback = function(e) { e.stopPropagation(); if (treeNode.loading) { return; } store.loadOrToggle(row); }; if (treeNode.indent) { ele.push(vue.h("span", { class: ns.e("indent"), style: { "padding-left": `${treeNode.indent}px` } })); } if (isBoolean(treeNode.expanded) && !treeNode.noLazyChildren) { const expandClasses = [ ns.e("expand-icon"), treeNode.expanded ? ns.em("expand-icon", "expanded") : "" ]; let icon = arrow_right_default; if (treeNode.loading) { icon = loading_default; } ele.push(vue.h("div", { class: expandClasses, onClick: callback }, { default: () => { return [ vue.h(ElIcon, { class: { [ns.is("loading")]: treeNode.loading } }, { default: () => [vue.h(icon)] }) ]; } })); } else { ele.push(vue.h("span", { class: ns.e("placeholder") })); } return ele; } function getAllAliases(props, aliases) { return props.reduce((prev, cur) => { prev[cur] = cur; return prev; }, aliases); } function useWatcher(owner, props_) { const instance = vue.getCurrentInstance(); const registerComplexWatchers = () => { const props = ["fixed"]; const aliases = { realWidth: "width", realMinWidth: "minWidth" }; const allAliases = getAllAliases(props, aliases); Object.keys(allAliases).forEach((key) => { const columnKey = aliases[key]; if (hasOwn(props_, columnKey)) { vue.watch(() => props_[columnKey], (newVal) => { let value = newVal; if (columnKey === "width" && key === "realWidth") { value = parseWidth(newVal); } if (columnKey === "minWidth" && key === "realMinWidth") { value = parseMinWidth(newVal); } instance.columnConfig.value[columnKey] = value; instance.columnConfig.value[key] = value; const updateColumns = columnKey === "fixed"; owner.value.store.scheduleLayout(updateColumns); }); } }); }; const registerNormalWatchers = () => { const props = [ "label", "filters", "filterMultiple", "filteredValue", "sortable", "index", "formatter", "className", "labelClassName", "filterClassName", "showOverflowTooltip", "tooltipFormatter" ]; const aliases = { property: "prop", align: "realAlign", headerAlign: "realHeaderAlign" }; const allAliases = getAllAliases(props, aliases); Object.keys(allAliases).forEach((key) => { const columnKey = aliases[key]; if (hasOwn(props_, columnKey)) { vue.watch(() => props_[columnKey], (newVal) => { instance.columnConfig.value[key] = newVal; }); } }); }; return { registerComplexWatchers, registerNormalWatchers }; } function useRender(props, slots, owner) { const instance = vue.getCurrentInstance(); const columnId = vue.ref(""); const isSubColumn = vue.ref(false); const realAlign = vue.ref(); const realHeaderAlign = vue.ref(); const ns = useNamespace("table"); vue.watchEffect(() => { realAlign.value = props.align ? `is-${props.align}` : null; realAlign.value; }); vue.watchEffect(() => { realHeaderAlign.value = props.headerAlign ? `is-${props.headerAlign}` : realAlign.value; realHeaderAlign.value; }); const columnOrTableParent = vue.computed(() => { let parent = instance.vnode.vParent || instance.parent; while (parent && !parent.tableId && !parent.columnId) { parent = parent.vnode.vParent || parent.parent; } return parent; }); const hasTreeColumn = vue.computed(() => { const { store } = instance.parent; if (!store) return false; const { treeData } = store.states; const treeDataValue = treeData.value; return treeDataValue && Object.keys(treeDataValue).length > 0; }); const realWidth = vue.ref(parseWidth(props.width)); const realMinWidth = vue.ref(parseMinWidth(props.minWidth)); const setColumnWidth = (column) => { if (realWidth.value) column.width = realWidth.value; if (realMinWidth.value) { column.minWidth = realMinWidth.value; } if (!realWidth.value && realMinWidth.value) { column.width = void 0; } if (!column.minWidth) { column.minWidth = 80; } column.realWidth = Number(isUndefined(column.width) ? column.minWidth : column.width); return column; }; const setColumnForcedProps = (column) => { const type = column.type; const source = cellForced[type] || {}; Object.keys(source).forEach((prop) => { const value = source[prop]; if (prop !== "className" && !isUndefined(value)) { column[prop] = value; } }); const className = getDefaultClassName(type); if (className) { const forceClass = `${vue.unref(ns.namespace)}-${className}`; column.className = column.className ? `${column.className} ${forceClass}` : forceClass; } return column; }; const checkSubColumn = (children) => { if (isArray$1(children)) { children.forEach((child) => check(child)); } else { check(children); } function check(item) { var _a2; if (((_a2 = item == null ? void 0 : item.type) == null ? void 0 : _a2.name) === "ElTableColumn") { item.vParent = instance; } } }; const setColumnRenders = (column) => { if (props.renderHeader) ; else if (column.type !== "selection") { column.renderHeader = (scope) => { instance.columnConfig.value["label"]; return vue.renderSlot(slots, "header", scope, () => [column.label]); }; } if (slots["filter-icon"]) { column.renderFilterIcon = (scope) => { return vue.renderSlot(slots, "filter-icon", scope); }; } let originRenderCell = column.renderCell; if (column.type === "expand") { column.renderCell = (data) => vue.h("div", { class: "cell" }, [originRenderCell(data)]); owner.value.renderExpanded = (data) => { return slots.default ? slots.default(data) : slots.default; }; } else { originRenderCell = originRenderCell || defaultRenderCell; column.renderCell = (data) => { let children = null; if (slots.default) { const vnodes = slots.default(data); children = vnodes.some((v2) => v2.type !== vue.Comment) ? vnodes : originRenderCell(data); } else { children = originRenderCell(data); } const { columns } = owner.value.store.states; const firstUserColumnIndex = columns.value.findIndex((item) => item.type === "default"); const shouldCreatePlaceholder = hasTreeColumn.value && data.cellIndex === firstUserColumnIndex; const prefix = treeCellPrefix(data, shouldCreatePlaceholder); const props2 = { class: "cell", style: {} }; if (column.showOverflowTooltip) { props2.class = `${props2.class} ${vue.unref(ns.namespace)}-tooltip`; props2.style = { width: `${(data.column.realWidth || Number(data.column.width)) - 1}px` }; } checkSubColumn(children); return vue.h("div", props2, [prefix, children]); }; } return column; }; const getPropsData = (...propsKey) => { return propsKey.reduce((prev, cur) => { if (isArray$1(cur)) { cur.forEach((key) => { prev[key] = props[key]; }); } return prev; }, {}); }; const getColumnElIndex = (children, child) => { return Array.prototype.indexOf.call(children, child); }; const updateColumnOrder = () => { owner.value.store.commit("updateColumnOrder", instance.columnConfig.value); }; return { columnId, realAlign, isSubColumn, realHeaderAlign, columnOrTableParent, setColumnWidth, setColumnForcedProps, setColumnRenders, getPropsData, getColumnElIndex, updateColumnOrder }; } var defaultProps = { type: { type: String, default: "default" }, label: String, className: String, labelClassName: String, property: String, prop: String, width: { type: [String, Number], default: "" }, minWidth: { type: [String, Number], default: "" }, renderHeader: Function, sortable: { type: [Boolean, String], default: false }, sortMethod: Function, sortBy: [String, Function, Array], resizable: { type: Boolean, default: true }, columnKey: String, align: String, headerAlign: String, showOverflowTooltip: { type: [Boolean, Object], default: void 0 }, tooltipFormatter: Function, fixed: [Boolean, String], formatter: Function, selectable: Function, reserveSelection: Boolean, filterMethod: Function, filteredValue: Array, filters: Array, filterPlacement: String, filterMultiple: { type: Boolean, default: true }, filterClassName: String, index: [Number, Function], sortOrders: { type: Array, default: () => { return ["ascending", "descending", null]; }, validator: (val) => { return val.every((order) => ["ascending", "descending", null].includes(order)); } } }; let columnIdSeed = 1; var ElTableColumn$1 = vue.defineComponent({ name: "ElTableColumn", components: { ElCheckbox }, props: defaultProps, setup(props, { slots }) { const instance = vue.getCurrentInstance(); const columnConfig = vue.ref({}); const owner = vue.computed(() => { let parent2 = instance.parent; while (parent2 && !parent2.tableId) { parent2 = parent2.parent; } return parent2; }); const { registerNormalWatchers, registerComplexWatchers } = useWatcher(owner, props); const { columnId, isSubColumn, realHeaderAlign, columnOrTableParent, setColumnWidth, setColumnForcedProps, setColumnRenders, getPropsData, getColumnElIndex, realAlign, updateColumnOrder } = useRender(props, slots, owner); const parent = columnOrTableParent.value; columnId.value = `${parent.tableId || parent.columnId}_column_${columnIdSeed++}`; vue.onBeforeMount(() => { isSubColumn.value = owner.value !== parent; const type = props.type || "default"; const sortable = props.sortable === "" ? true : props.sortable; const showOverflowTooltip = isUndefined(props.showOverflowTooltip) ? parent.props.showOverflowTooltip : props.showOverflowTooltip; const tooltipFormatter = isUndefined(props.tooltipFormatter) ? parent.props.tooltipFormatter : props.tooltipFormatter; const defaults = { ...cellStarts[type], id: columnId.value, type, property: props.prop || props.property, align: realAlign, headerAlign: realHeaderAlign, showOverflowTooltip, tooltipFormatter, filterable: props.filters || props.filterMethod, filteredValue: [], filterPlacement: "", filterClassName: "", isColumnGroup: false, isSubColumn: false, filterOpened: false, sortable, index: props.index, rawColumnKey: instance.vnode.key }; const basicProps = [ "columnKey", "label", "className", "labelClassName", "type", "renderHeader", "formatter", "fixed", "resizable" ]; const sortProps = ["sortMethod", "sortBy", "sortOrders"]; const selectProps = ["selectable", "reserveSelection"]; const filterProps = [ "filterMethod", "filters", "filterMultiple", "filterOpened", "filteredValue", "filterPlacement", "filterClassName" ]; let column = getPropsData(basicProps, sortProps, selectProps, filterProps); column = mergeOptions(defaults, column); const chains = compose(setColumnRenders, setColumnWidth, setColumnForcedProps); column = chains(column); columnConfig.value = column; registerNormalWatchers(); registerComplexWatchers(); }); vue.onMounted(() => { var _a2; const parent2 = columnOrTableParent.value; const children = isSubColumn.value ? parent2.vnode.el.children : (_a2 = parent2.refs.hiddenColumns) == null ? void 0 : _a2.children; const getColumnIndex = () => getColumnElIndex(children || [], instance.vnode.el); columnConfig.value.getColumnIndex = getColumnIndex; const columnIndex = getColumnIndex(); columnIndex > -1 && owner.value.store.commit("insertColumn", columnConfig.value, isSubColumn.value ? parent2.columnConfig.value : null, updateColumnOrder); }); vue.onBeforeUnmount(() => { const getColumnIndex = columnConfig.value.getColumnIndex; const columnIndex = getColumnIndex ? getColumnIndex() : -1; columnIndex > -1 && owner.value.store.commit("removeColumn", columnConfig.value, isSubColumn.value ? parent.columnConfig.value : null, updateColumnOrder); }); instance.columnId = columnId.value; instance.columnConfig = columnConfig; return; }, render() { var _a2, _b, _c; try { const renderDefault = (_b = (_a2 = this.$slots).default) == null ? void 0 : _b.call(_a2, { row: {}, column: {}, $index: -1 }); const children = []; if (isArray$1(renderDefault)) { for (const childNode of renderDefault) { if (((_c = childNode.type) == null ? void 0 : _c.name) === "ElTableColumn" || childNode.shapeFlag & 2) { children.push(childNode); } else if (childNode.type === vue.Fragment && isArray$1(childNode.children)) { childNode.children.forEach((vnode2) => { if ((vnode2 == null ? void 0 : vnode2.patchFlag) !== 1024 && !isString$1(vnode2 == null ? void 0 : vnode2.children)) { children.push(vnode2); } }); } } } const vnode = vue.h("div", children); return vnode; } catch (e) { return vue.h("div", []); } } }); const ElTable = withInstall(Table, { TableColumn: ElTableColumn$1 }); const ElTableColumn = withNoopInstall(ElTableColumn$1); function tryOnScopeDispose(fn2) { if (vue.getCurrentScope()) { vue.onScopeDispose(fn2); return true; } return false; } const localProvidedStateMap = /* @__PURE__ */ new WeakMap(); const injectLocal = (...args) => { var _a2; const key = args[0]; const instance = (_a2 = vue.getCurrentInstance()) == null ? void 0 : _a2.proxy; if (instance == null && !vue.hasInjectionContext()) throw new Error("injectLocal must be called in setup"); if (instance && localProvidedStateMap.has(instance) && key in localProvidedStateMap.get(instance)) return localProvidedStateMap.get(instance)[key]; return vue.inject(...args); }; const isClient = typeof window !== "undefined" && typeof document !== "undefined"; typeof WorkerGlobalScope !== "undefined" && globalThis instanceof WorkerGlobalScope; const notNullish = (val) => val != null; const toString = Object.prototype.toString; const isObject = (val) => toString.call(val) === "[object Object]"; const noop = () => { }; function toRef(...args) { if (args.length !== 1) return vue.toRef(...args); const r = args[0]; return typeof r === "function" ? vue.readonly(vue.customRef(() => ({ get: r, set: noop }))) : vue.ref(r); } function createFilterWrapper(filter, fn2) { function wrapper(...args) { return new Promise((resolve, reject) => { Promise.resolve(filter(() => fn2.apply(this, args), { fn: fn2, thisArg: this, args })).then(resolve).catch(reject); }); } return wrapper; } const bypassFilter = (invoke) => { return invoke(); }; function pausableFilter(extendFilter = bypassFilter, options = {}) { const { initialState = "active" } = options; const isActive = toRef(initialState === "active"); function pause() { isActive.value = false; } function resume() { isActive.value = true; } const eventFilter = (...args) => { if (isActive.value) extendFilter(...args); }; return { isActive: vue.readonly(isActive), pause, resume, eventFilter }; } function pxValue(px) { return px.endsWith("rem") ? Number.parseFloat(px) * 16 : Number.parseFloat(px); } function toArray(value) { return Array.isArray(value) ? value : [value]; } function getLifeCycleTarget(target) { return vue.getCurrentInstance(); } function watchWithFilter(source, cb, options = {}) { const { eventFilter = bypassFilter, ...watchOptions } = options; return vue.watch( source, createFilterWrapper( eventFilter, cb ), watchOptions ); } function watchPausable(source, cb, options = {}) { const { eventFilter: filter, initialState = "active", ...watchOptions } = options; const { eventFilter, pause, resume, isActive } = pausableFilter(filter, { initialState }); const stop = watchWithFilter( source, cb, { ...watchOptions, eventFilter } ); return { stop, pause, resume, isActive }; } function toRefs(objectRef, options = {}) { if (!vue.isRef(objectRef)) return vue.toRefs(objectRef); const result = Array.isArray(objectRef.value) ? Array.from({ length: objectRef.value.length }) : {}; for (const key in objectRef.value) { result[key] = vue.customRef(() => ({ get() { return objectRef.value[key]; }, set(v2) { var _a2; const replaceRef = (_a2 = vue.toValue(options.replaceRef)) != null ? _a2 : true; if (replaceRef) { if (Array.isArray(objectRef.value)) { const copy = [...objectRef.value]; copy[key] = v2; objectRef.value = copy; } else { const newObject = { ...objectRef.value, [key]: v2 }; Object.setPrototypeOf(newObject, Object.getPrototypeOf(objectRef.value)); objectRef.value = newObject; } } else { objectRef.value[key] = v2; } } })); } return result; } function tryOnMounted(fn2, sync = true, target) { const instance = getLifeCycleTarget(); if (instance) vue.onMounted(fn2, target); else if (sync) fn2(); else vue.nextTick(fn2); } function watchImmediate(source, cb, options) { return vue.watch( source, cb, { ...options, immediate: true } ); } const defaultWindow = isClient ? window : void 0; function unrefElement(elRef) { var _a2; const plain = vue.toValue(elRef); return (_a2 = plain == null ? void 0 : plain.$el) != null ? _a2 : plain; } function useEventListener(...args) { const cleanups = []; const cleanup = () => { cleanups.forEach((fn2) => fn2()); cleanups.length = 0; }; const register = (el, event, listener, options) => { el.addEventListener(event, listener, options); return () => el.removeEventListener(event, listener, options); }; const firstParamTargets = vue.computed(() => { const test = toArray(vue.toValue(args[0])).filter((e) => e != null); return test.every((e) => typeof e !== "string") ? test : void 0; }); const stopWatch = watchImmediate( () => { var _a2, _b; return [ (_b = (_a2 = firstParamTargets.value) == null ? void 0 : _a2.map((e) => unrefElement(e))) != null ? _b : [defaultWindow].filter((e) => e != null), toArray(vue.toValue(firstParamTargets.value ? args[1] : args[0])), toArray(vue.unref(firstParamTargets.value ? args[2] : args[1])), // @ts-expect-error - TypeScript gets the correct types, but somehow still complains vue.toValue(firstParamTargets.value ? args[3] : args[2]) ]; }, ([raw_targets, raw_events, raw_listeners, raw_options]) => { cleanup(); if (!(raw_targets == null ? void 0 : raw_targets.length) || !(raw_events == null ? void 0 : raw_events.length) || !(raw_listeners == null ? void 0 : raw_listeners.length)) return; const optionsClone = isObject(raw_options) ? { ...raw_options } : raw_options; cleanups.push( ...raw_targets.flatMap( (el) => raw_events.flatMap( (event) => raw_listeners.map((listener) => register(el, event, listener, optionsClone)) ) ) ); }, { flush: "post" } ); const stop = () => { stopWatch(); cleanup(); }; tryOnScopeDispose(cleanup); return stop; } function useMounted() { const isMounted = vue.shallowRef(false); const instance = vue.getCurrentInstance(); if (instance) { vue.onMounted(() => { isMounted.value = true; }, instance); } return isMounted; } function useSupported(callback) { const isMounted = useMounted(); return vue.computed(() => { isMounted.value; return Boolean(callback()); }); } function useMutationObserver(target, callback, options = {}) { const { window: window2 = defaultWindow, ...mutationOptions } = options; let observer; const isSupported = useSupported(() => window2 && "MutationObserver" in window2); const cleanup = () => { if (observer) { observer.disconnect(); observer = void 0; } }; const targets = vue.computed(() => { const value = vue.toValue(target); const items = toArray(value).map(unrefElement).filter(notNullish); return new Set(items); }); const stopWatch = vue.watch( () => targets.value, (targets2) => { cleanup(); if (isSupported.value && targets2.size) { observer = new MutationObserver(callback); targets2.forEach((el) => observer.observe(el, mutationOptions)); } }, { immediate: true, flush: "post" } ); const takeRecords = () => { return observer == null ? void 0 : observer.takeRecords(); }; const stop = () => { stopWatch(); cleanup(); }; tryOnScopeDispose(stop); return { isSupported, stop, takeRecords }; } const ssrWidthSymbol = Symbol("vueuse-ssr-width"); function useSSRWidth() { const ssrWidth = vue.hasInjectionContext() ? injectLocal(ssrWidthSymbol, null) : null; return typeof ssrWidth === "number" ? ssrWidth : void 0; } function useMediaQuery(query, options = {}) { const { window: window2 = defaultWindow, ssrWidth = useSSRWidth() } = options; const isSupported = useSupported(() => window2 && "matchMedia" in window2 && typeof window2.matchMedia === "function"); const ssrSupport = vue.shallowRef(typeof ssrWidth === "number"); const mediaQuery = vue.shallowRef(); const matches = vue.shallowRef(false); const handler = (event) => { matches.value = event.matches; }; vue.watchEffect(() => { if (ssrSupport.value) { ssrSupport.value = !isSupported.value; const queryStrings = vue.toValue(query).split(","); matches.value = queryStrings.some((queryString) => { const not = queryString.includes("not all"); const minWidth = queryString.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/); const maxWidth = queryString.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/); let res = Boolean(minWidth || maxWidth); if (minWidth && res) { res = ssrWidth >= pxValue(minWidth[1]); } if (maxWidth && res) { res = ssrWidth <= pxValue(maxWidth[1]); } return not ? !res : res; }); return; } if (!isSupported.value) return; mediaQuery.value = window2.matchMedia(vue.toValue(query)); matches.value = mediaQuery.value.matches; }); useEventListener(mediaQuery, "change", handler, { passive: true }); return vue.computed(() => matches.value); } const _global = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {}; const globalKey = "__vueuse_ssr_handlers__"; const handlers = /* @__PURE__ */ getHandlers(); function getHandlers() { if (!(globalKey in _global)) _global[globalKey] = _global[globalKey] || {}; return _global[globalKey]; } function getSSRHandler(key, fallback) { return handlers[key] || fallback; } function guessSerializerType(rawInit) { return rawInit == null ? "any" : rawInit instanceof Set ? "set" : rawInit instanceof Map ? "map" : rawInit instanceof Date ? "date" : typeof rawInit === "boolean" ? "boolean" : typeof rawInit === "string" ? "string" : typeof rawInit === "object" ? "object" : !Number.isNaN(rawInit) ? "number" : "any"; } const StorageSerializers = { boolean: { read: (v2) => v2 === "true", write: (v2) => String(v2) }, object: { read: (v2) => JSON.parse(v2), write: (v2) => JSON.stringify(v2) }, number: { read: (v2) => Number.parseFloat(v2), write: (v2) => String(v2) }, any: { read: (v2) => v2, write: (v2) => String(v2) }, string: { read: (v2) => v2, write: (v2) => String(v2) }, map: { read: (v2) => new Map(JSON.parse(v2)), write: (v2) => JSON.stringify(Array.from(v2.entries())) }, set: { read: (v2) => new Set(JSON.parse(v2)), write: (v2) => JSON.stringify(Array.from(v2)) }, date: { read: (v2) => new Date(v2), write: (v2) => v2.toISOString() } }; const customStorageEventName = "vueuse-storage"; function useStorage(key, defaults2, storage, options = {}) { var _a2; const { flush = "pre", deep = true, listenToStorageChanges = true, writeDefaults = true, mergeDefaults = false, shallow, window: window2 = defaultWindow, eventFilter, onError = (e) => { console.error(e); }, initOnMounted } = options; const data = (shallow ? vue.shallowRef : vue.ref)(typeof defaults2 === "function" ? defaults2() : defaults2); const keyComputed = vue.computed(() => vue.toValue(key)); if (!storage) { try { storage = getSSRHandler("getDefaultStorage", () => { var _a22; return (_a22 = defaultWindow) == null ? void 0 : _a22.localStorage; })(); } catch (e) { onError(e); } } if (!storage) return data; const rawInit = vue.toValue(defaults2); const type = guessSerializerType(rawInit); const serializer = (_a2 = options.serializer) != null ? _a2 : StorageSerializers[type]; const { pause: pauseWatch, resume: resumeWatch } = watchPausable( data, () => write(data.value), { flush, deep, eventFilter } ); vue.watch(keyComputed, () => update(), { flush }); if (window2 && listenToStorageChanges) { tryOnMounted(() => { if (storage instanceof Storage) useEventListener(window2, "storage", update, { passive: true }); else useEventListener(window2, customStorageEventName, updateFromCustomEvent); if (initOnMounted) update(); }); } if (!initOnMounted) update(); function dispatchWriteEvent(oldValue, newValue) { if (window2) { const payload = { key: keyComputed.value, oldValue, newValue, storageArea: storage }; window2.dispatchEvent(storage instanceof Storage ? new StorageEvent("storage", payload) : new CustomEvent(customStorageEventName, { detail: payload })); } } function write(v2) { try { const oldValue = storage.getItem(keyComputed.value); if (v2 == null) { dispatchWriteEvent(oldValue, null); storage.removeItem(keyComputed.value); } else { const serialized = serializer.write(v2); if (oldValue !== serialized) { storage.setItem(keyComputed.value, serialized); dispatchWriteEvent(oldValue, serialized); } } } catch (e) { onError(e); } } function read(event) { const rawValue = event ? event.newValue : storage.getItem(keyComputed.value); if (rawValue == null) { if (writeDefaults && rawInit != null) storage.setItem(keyComputed.value, serializer.write(rawInit)); return rawInit; } else if (!event && mergeDefaults) { const value = serializer.read(rawValue); if (typeof mergeDefaults === "function") return mergeDefaults(value, rawInit); else if (type === "object" && !Array.isArray(value)) return { ...rawInit, ...value }; return value; } else if (typeof rawValue !== "string") { return rawValue; } else { return serializer.read(rawValue); } } function update(event) { if (event && event.storageArea !== storage) return; if (event && event.key == null) { data.value = rawInit; return; } if (event && event.key !== keyComputed.value) return; pauseWatch(); try { if ((event == null ? void 0 : event.newValue) !== serializer.write(data.value)) data.value = read(event); } catch (e) { onError(e); } finally { if (event) vue.nextTick(resumeWatch); else resumeWatch(); } } function updateFromCustomEvent(event) { update(event.detail); } return data; } function useDraggable(target, options = {}) { var _a2; const { pointerTypes, preventDefault: preventDefault2, stopPropagation, exact, onMove, onEnd, onStart, initialValue, axis = "both", draggingElement = defaultWindow, containerElement, handle: draggingHandle = target, buttons = [0] } = options; const position = vue.ref( (_a2 = vue.toValue(initialValue)) != null ? _a2 : { x: 0, y: 0 } ); const pressedDelta = vue.ref(); const filterEvent = (e) => { if (pointerTypes) return pointerTypes.includes(e.pointerType); return true; }; const handleEvent = (e) => { if (vue.toValue(preventDefault2)) e.preventDefault(); if (vue.toValue(stopPropagation)) e.stopPropagation(); }; const start = (e) => { var _a22; if (!vue.toValue(buttons).includes(e.button)) return; if (vue.toValue(options.disabled) || !filterEvent(e)) return; if (vue.toValue(exact) && e.target !== vue.toValue(target)) return; const container = vue.toValue(containerElement); const containerRect = (_a22 = container == null ? void 0 : container.getBoundingClientRect) == null ? void 0 : _a22.call(container); const targetRect = vue.toValue(target).getBoundingClientRect(); const pos = { x: e.clientX - (container ? targetRect.left - containerRect.left + container.scrollLeft : targetRect.left), y: e.clientY - (container ? targetRect.top - containerRect.top + container.scrollTop : targetRect.top) }; if ((onStart == null ? void 0 : onStart(pos, e)) === false) return; pressedDelta.value = pos; handleEvent(e); }; const move = (e) => { if (vue.toValue(options.disabled) || !filterEvent(e)) return; if (!pressedDelta.value) return; const container = vue.toValue(containerElement); const targetRect = vue.toValue(target).getBoundingClientRect(); let { x: x2, y } = position.value; if (axis === "x" || axis === "both") { x2 = e.clientX - pressedDelta.value.x; if (container) x2 = Math.min(Math.max(0, x2), container.scrollWidth - targetRect.width); } if (axis === "y" || axis === "both") { y = e.clientY - pressedDelta.value.y; if (container) y = Math.min(Math.max(0, y), container.scrollHeight - targetRect.height); } position.value = { x: x2, y }; onMove == null ? void 0 : onMove(position.value, e); handleEvent(e); }; const end = (e) => { if (vue.toValue(options.disabled) || !filterEvent(e)) return; if (!pressedDelta.value) return; pressedDelta.value = void 0; onEnd == null ? void 0 : onEnd(position.value, e); handleEvent(e); }; if (isClient) { const config = () => { var _a22; return { capture: (_a22 = options.capture) != null ? _a22 : true, passive: !vue.toValue(preventDefault2) }; }; useEventListener(draggingHandle, "pointerdown", start, config); useEventListener(draggingElement, "pointermove", move, config); useEventListener(draggingElement, "pointerup", end, config); } return { ...toRefs(position), position, isDragging: vue.computed(() => !!pressedDelta.value), style: vue.computed( () => `left:${position.value.x}px;top:${position.value.y}px;` ) }; } function useResizeObserver(target, callback, options = {}) { const { window: window2 = defaultWindow, ...observerOptions } = options; let observer; const isSupported = useSupported(() => window2 && "ResizeObserver" in window2); const cleanup = () => { if (observer) { observer.disconnect(); observer = void 0; } }; const targets = vue.computed(() => { const _targets = vue.toValue(target); return Array.isArray(_targets) ? _targets.map((el) => unrefElement(el)) : [unrefElement(_targets)]; }); const stopWatch = vue.watch( targets, (els) => { cleanup(); if (isSupported.value && window2) { observer = new ResizeObserver(callback); for (const _el of els) { if (_el) observer.observe(_el, observerOptions); } } }, { immediate: true, flush: "post" } ); const stop = () => { cleanup(); stopWatch(); }; tryOnScopeDispose(stop); return { isSupported, stop }; } function useElementBounding(target, options = {}) { const { reset = true, windowResize = true, windowScroll = true, immediate = true, updateTiming = "sync" } = options; const height = vue.shallowRef(0); const bottom = vue.shallowRef(0); const left = vue.shallowRef(0); const right = vue.shallowRef(0); const top = vue.shallowRef(0); const width = vue.shallowRef(0); const x2 = vue.shallowRef(0); const y = vue.shallowRef(0); function recalculate() { const el = unrefElement(target); if (!el) { if (reset) { height.value = 0; bottom.value = 0; left.value = 0; right.value = 0; top.value = 0; width.value = 0; x2.value = 0; y.value = 0; } return; } const rect = el.getBoundingClientRect(); height.value = rect.height; bottom.value = rect.bottom; left.value = rect.left; right.value = rect.right; top.value = rect.top; width.value = rect.width; x2.value = rect.x; y.value = rect.y; } function update() { if (updateTiming === "sync") recalculate(); else if (updateTiming === "next-frame") requestAnimationFrame(() => recalculate()); } useResizeObserver(target, update); vue.watch(() => unrefElement(target), (ele) => !ele && update()); useMutationObserver(target, update, { attributeFilter: ["style", "class"] }); if (windowScroll) useEventListener("scroll", update, { capture: true, passive: true }); if (windowResize) useEventListener("resize", update, { passive: true }); tryOnMounted(() => { if (immediate) update(); }); return { height, bottom, left, right, top, width, x: x2, y, update }; } function useWindowSize(options = {}) { const { window: window2 = defaultWindow, initialWidth = Number.POSITIVE_INFINITY, initialHeight = Number.POSITIVE_INFINITY, listenOrientation = true, includeScrollbar = true, type = "inner" } = options; const width = vue.shallowRef(initialWidth); const height = vue.shallowRef(initialHeight); const update = () => { if (window2) { if (type === "outer") { width.value = window2.outerWidth; height.value = window2.outerHeight; } else if (type === "visual" && window2.visualViewport) { const { width: visualViewportWidth, height: visualViewportHeight, scale } = window2.visualViewport; width.value = Math.round(visualViewportWidth * scale); height.value = Math.round(visualViewportHeight * scale); } else if (includeScrollbar) { width.value = window2.innerWidth; height.value = window2.innerHeight; } else { width.value = window2.document.documentElement.clientWidth; height.value = window2.document.documentElement.clientHeight; } } }; update(); tryOnMounted(update); const listenerOptions = { passive: true }; useEventListener("resize", update, listenerOptions); if (window2 && type === "visual" && window2.visualViewport) { useEventListener(window2.visualViewport, "resize", update, listenerOptions); } if (listenOrientation) { const matches = useMediaQuery("(orientation: portrait)"); vue.watch(matches, () => update()); } return { width, height }; } const STORE_CHARACTER_LIST = "monkey-script-character-list"; const characterPanelStore = /* @__PURE__ */ defineStore("charPanel", () => { const isShow = vue.ref(false); const show = () => { isShow.value = true; }; const hide = () => { isShow.value = false; }; return { isShow, show, hide }; }); const characterDomStore = /* @__PURE__ */ defineStore("charDom", () => { const isShow = vue.ref(false); const show = () => { isShow.value = true; }; const hide = () => { isShow.value = false; }; const toggle = () => { isShow.value = !isShow.value; }; return { isShow, show, hide, toggle }; }); const characterListStore = /* @__PURE__ */ defineStore("charDataList", () => { const charList = useStorage(STORE_CHARACTER_LIST, [], localStorage); const getCharacterList = () => { if (charList.value.length === 0) { return []; } return charList.value; }; const setCharacterList = (data) => { charList.value = data; }; return { charList, getCharacterList, setCharacterList }; }); const _hoisted_1 = { key: 0, class: "fixed inset-0 z-99 flex h-screen w-screen bg-black/70" }; const _hoisted_2 = { class: "flex h-full w-full items-center justify-center text-center" }; const _hoisted_3 = { class: "w-full text-center" }; const _hoisted_4 = { class: "flex h-15 w-15 items-center" }; const _hoisted_5 = ["src"]; const _hoisted_6 = { class: "flex h-full w-full items-center justify-center text-center" }; const _hoisted_7 = { class: "w-full text-center" }; const _hoisted_8 = { class: "flex h-full w-full items-center justify-center text-center" }; const _hoisted_9 = { class: "w-full text-center" }; const _hoisted_10 = { class: "flex h-full w-full items-center justify-center text-center" }; const _hoisted_11 = { class: "w-full text-center" }; const _hoisted_12 = { class: "m-20 flex h-full w-full items-center justify-center text-center" }; const _hoisted_13 = { class: "flex h-8 w-8 items-center justify-center" }; const _hoisted_14 = ["src"]; const _hoisted_15 = { class: "flex h-full w-full bg-blue-200" }; const _hoisted_16 = { class: "flex h-15 w-15 items-center bg-gray-500" }; const _hoisted_17 = ["src"]; const _hoisted_18 = { class: "flex h-15 w-15 items-center" }; const _hoisted_19 = ["src"]; const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({ __name: "CharacterListView", setup(__props) { const charDom = characterDomStore(); const charData = characterListStore(); let charList = charData.getCharacterList(); const fmtCharELe = (row) => { switch (row.element_attr_id) { case 1: return "https://act.mihoyo.com/act/gt-ui/assets/icons/6a4f0b7ab73fe4d3.png"; case 2: return "https://act.mihoyo.com/act/gt-ui/assets/icons/48d1aac6ecc56b33.png"; case 3: return "https://act.mihoyo.com/act/gt-ui/assets/icons/829a6b86fb23d8bb.png"; case 4: return "https://act.mihoyo.com/act/gt-ui/assets/icons/247f14512efc8325.png"; case 5: return "https://act.mihoyo.com/act/gt-ui/assets/icons/e18d224ec1047cae.png"; case 6: return "https://act.mihoyo.com/act/gt-ui/assets/icons/b162f5384487d283.png"; case 7: return "https://act.mihoyo.com/act/gt-ui/assets/icons/bf2f65ee0d7f6243.png"; default: return ""; } }; return (_ctx, _cache) => { const _component_el_table_column = ElTableColumn; const _component_el_table = ElTable; return vue.unref(charDom).isShow ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [ vue.createVNode(_component_el_table, { data: vue.unref(charList), border: "", style: { "width": "1000px", "margin": "auto", "border-radius": "5px" }, height: "800", "cell-style": { padding: "0", margin: "0", fontSize: "16px" }, stripe: "" }, { default: vue.withCtx(() => [ vue.createVNode(_component_el_table_column, { type: "index", label: "#", width: "50", fixed: "" }, { header: vue.withCtx(() => _cache[0] || (_cache[0] = [ vue.createElementVNode("div", { class: "flex h-full w-full items-center justify-center text-center" }, [ vue.createElementVNode("div", { class: "w-full text-center" }, "#") ], -1) ])), default: vue.withCtx((scope) => [ vue.createElementVNode("div", _hoisted_2, [ vue.createElementVNode("div", _hoisted_3, vue.toDisplayString(scope.$index + 1), 1) ]) ]), _: 1 }), vue.createVNode(_component_el_table_column, { prop: "name", label: "角色", width: "180", fixed: "" }, { header: vue.withCtx(() => _cache[1] || (_cache[1] = [ vue.createElementVNode("div", { class: "flex h-full w-full items-center justify-center text-center" }, [ vue.createElementVNode("div", { class: "w-full text-center" }, "角色") ], -1) ])), default: vue.withCtx((scope) => [ vue.createElementVNode("div", { class: vue.normalizeClass(["flex h-full w-full items-center text-base text-black font-sans", "star-" + scope.row.avatar_level]) }, [ vue.createElementVNode("div", _hoisted_4, [ vue.createElementVNode("img", { class: "h-full w-full", src: scope.row.icon }, null, 8, _hoisted_5) ]), vue.createElementVNode("span", null, vue.toDisplayString(scope.row.name), 1) ], 2) ]), _: 1 }), vue.createVNode(_component_el_table_column, { prop: "level_current", label: "等级", width: "60" }, { header: vue.withCtx(() => _cache[2] || (_cache[2] = [ vue.createElementVNode("div", { class: "flex h-full w-full items-center justify-center text-center" }, [ vue.createElementVNode("div", { class: "w-full text-center" }, "等级") ], -1) ])), default: vue.withCtx((scope) => [ vue.createElementVNode("div", _hoisted_6, [ vue.createElementVNode("div", _hoisted_7, vue.toDisplayString(scope.row.level_current), 1) ]) ]), _: 1 }), vue.createVNode(_component_el_table_column, { prop: "constellation_num", label: "命座", width: "60" }, { header: vue.withCtx(() => _cache[3] || (_cache[3] = [ vue.createElementVNode("div", { class: "flex h-full w-full items-center justify-center text-center" }, [ vue.createElementVNode("div", { class: "w-full text-center" }, "命座") ], -1) ])), default: vue.withCtx((scope) => [ vue.createElementVNode("div", _hoisted_8, [ vue.createElementVNode("div", _hoisted_9, vue.toDisplayString(scope.row.constellation_num), 1) ]) ]), _: 1 }), vue.createVNode(_component_el_table_column, { prop: "fetter_level", label: "好感", width: "60" }, { header: vue.withCtx(() => _cache[4] || (_cache[4] = [ vue.createElementVNode("div", { class: "flex h-full w-full items-center justify-center text-center" }, [ vue.createElementVNode("div", { class: "w-full text-center" }, "好感") ], -1) ])), default: vue.withCtx((scope) => [ vue.createElementVNode("div", _hoisted_10, [ vue.createElementVNode("div", _hoisted_11, vue.toDisplayString(scope.row.fetter_level), 1) ]) ]), _: 1 }), vue.createVNode(_component_el_table_column, { prop: "element_attr_id", label: "属性", width: "50" }, { header: vue.withCtx(() => _cache[5] || (_cache[5] = [ vue.createElementVNode("div", { class: "flex h-full w-full items-center justify-center text-center" }, [ vue.createElementVNode("div", { class: "w-full text-center" }, "属性") ], -1) ])), default: vue.withCtx((scope) => [ vue.createElementVNode("div", _hoisted_12, [ vue.createElementVNode("div", _hoisted_13, [ vue.createElementVNode("img", { src: fmtCharELe(scope.row) }, null, 8, _hoisted_14) ]) ]) ]), _: 1 }), vue.createVNode(_component_el_table_column, { prop: "skill_list", label: "技能", width: "240" }, { header: vue.withCtx(() => _cache[6] || (_cache[6] = [ vue.createElementVNode("div", { class: "flex h-full w-full items-center justify-center text-center" }, [ vue.createElementVNode("div", { class: "w-full text-center" }, "技能") ], -1) ])), default: vue.withCtx((scope) => [ vue.createElementVNode("div", _hoisted_15, [ (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, vue.renderList(4, (id) => { return vue.createElementVNode("div", { key: id }, [ vue.createElementVNode("div", _hoisted_16, [ vue.createElementVNode("img", { src: scope.row.skill_list[id].icon }, null, 8, _hoisted_17) ]) ]); }), 64)) ]) ]), _: 1 }), vue.createVNode(_component_el_table_column, { prop: "weapon", label: "武器", width: "200" }, { header: vue.withCtx(() => _cache[7] || (_cache[7] = [ vue.createElementVNode("div", { class: "flex h-full w-full items-center justify-center text-center" }, [ vue.createElementVNode("div", { class: "w-full text-center" }, "武器") ], -1) ])), default: vue.withCtx((scope) => [ vue.createElementVNode("div", { class: vue.normalizeClass(["flex h-full w-full text-base text-black font-bold font-sans", "star-" + scope.row.weapon.weapon_level]) }, [ vue.createElementVNode("div", _hoisted_18, [ vue.createElementVNode("img", { src: scope.row.weapon.icon }, null, 8, _hoisted_19) ]), vue.createElementVNode("span", null, vue.toDisplayString(scope.row.weapon.name), 1) ], 2) ]), _: 1 }) ]), _: 1 }, 8, ["data"]) ])) : vue.createCommentVNode("", true); }; } }); const storgeSideBtnPos = "monkey-script-side-btn-pos"; const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({ __name: "SideButtonView", setup(__props) { const sideButton = characterPanelStore(); const charaDom = characterDomStore(); const target = vue.ref(null); const { width, height } = useElementBounding(target, { windowScroll: false }); const btnPos = useStorage(storgeSideBtnPos, { right: 30, bottom: 30 }, localStorage); const isDragging = vue.ref(false); const windowSize = useWindowSize({ includeScrollbar: false }); const maxPos = vue.computed(() => { return { x: windowSize.width.value - width.value, y: windowSize.height.value - height.value }; }); let rAF2 = 0; useDraggable(target, { initialValue: { x: windowSize.width.value - btnPos.value.right, y: windowSize.height.value - btnPos.value.bottom }, preventDefault: true, handle: vue.computed(() => target.value), onMove: (pos) => { isDragging.value = true; btnPos.value.right = maxPos.value.x - pos.x; btnPos.value.bottom = maxPos.value.y - pos.y; cancelAnimationFrame(rAF2); rAF2 = requestAnimationFrame(() => { if (btnPos.value.right < 0) { btnPos.value.right = 0; } if (btnPos.value.bottom < 0) { btnPos.value.bottom = 0; } if (btnPos.value.bottom > maxPos.value.y) { btnPos.value.bottom = maxPos.value.y; } if (btnPos.value.right > maxPos.value.x) { btnPos.value.right = maxPos.value.x; } }); }, onEnd: () => { setTimeout(() => { isDragging.value = false; }, 500); } }); return (_ctx, _cache) => { return vue.unref(sideButton).isShow ? (vue.openBlock(), vue.createElementBlock("div", { key: 0, style: vue.normalizeStyle({ right: vue.unref(btnPos).right + "px", bottom: vue.unref(btnPos).bottom + "px" }), class: "group fixed z-100" }, [ vue.createElementVNode("div", { ref_key: "target", ref: target, class: "h-10 w-10 cursor-pointer rounded-full border border-gray-200/20 transition delay-100 duration-300 ease-in-out hover:scale-100 hover:border hover:border-[#d3bc92] hover:bg-[#423730]", onClick: _cache[0] || (_cache[0] = ($event) => vue.unref(charaDom).toggle()) }, _cache[1] || (_cache[1] = [ vue.createElementVNode("div", { class: "character-btn h-full w-full" }, null, -1) ]), 512) ], 4)) : vue.createCommentVNode("", true); }; } }); const _export_sfc = (sfc, props) => { const target = sfc.__vccOpts || sfc; for (const [key, val] of props) { target[key] = val; } return target; }; const SideButtonView = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-bb1a3cd3"]]); const _sfc_main = /* @__PURE__ */ vue.defineComponent({ __name: "App", setup(__props) { return (_ctx, _cache) => { return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [ vue.createVNode(SideButtonView), vue.createVNode(_sfc_main$2) ], 64); }; } }); var _GM_registerMenuCommand = /* @__PURE__ */ (() => typeof GM_registerMenuCommand != "undefined" ? GM_registerMenuCommand : void 0)(); const host = location.host; const pathname = location.pathname; const currentPageType = () => { if (host === "www.miyoushe.com") { return "miyoushe"; } if (host === "act.mihoyo.com" && pathname.includes("calculator")) { return "ysCalculator"; } return "mihoyo"; }; const isYsCalculator = () => currentPageType() === "ysCalculator"; const matchUrl = "https://api-takumi.mihoyo.com/event/e20200928calculate/v1/sync/avatar/list"; const menu = () => { const showListPanle = characterPanelStore(); _GM_registerMenuCommand("打开角色列表", () => { console.log("open"); showListPanle.isShow ? showListPanle.hide() : showListPanle.show(); }); }; const overrideXHR = () => { const originalXHROpen = XMLHttpRequest.prototype.open; XMLHttpRequest.prototype.open = function(method, url, async, user, pass) { this.addEventListener( "readystatechange", function() { if (this.readyState === 4 && this.status === 200 && url.includes(matchUrl)) { try { let requestRowData = JSON.parse(this.responseText); let charList = requestRowData.data.list; useStorage(STORE_CHARACTER_LIST, charList, localStorage); } catch (e) { console.error("Error parsing JSON:", e); } } }, false ); originalXHROpen.call(this, method, url, async, user, pass); }; }; const main = () => { if (isYsCalculator()) { overrideXHR(); } const app = vue.createApp(_sfc_main); const pinia = createPinia(); app.use(pinia); app.mount( (() => { const app2 = document.createElement("div"); app2.id = "make-miyoushe-great-again"; document.body.append(app2); return app2; })() ); }; main(); menu(); } }); require_main_001(); })(Vue);