UNPKG

naive-ui

Version:

A Vue 3 Component Library. Fairly Complete, Theme Customizable, Uses TypeScript, Fast

1 lines 1.63 MB
import{createTextVNode as e,Fragment as t,Comment as n,isVNode as r,vShow as o,defineComponent as a,inject as i,getCurrentInstance as l,watch as s,onBeforeUnmount as d,onMounted as c,ref as u,readonly as h,computed as p,onBeforeMount as m,reactive as f,provide as g,withDirectives as v,toRef as b,h as y,Teleport as x,nextTick as w,renderSlot as C,onActivated as k,onDeactivated as S,mergeProps as P,shallowRef as z,watchEffect as T,Transition as M,TransitionGroup as R,cloneVNode as $,Text as F,onUnmounted as I,onBeforeUpdate as D,onUpdated as B,normalizeStyle as A,isReactive as N,markRaw as E,isProxy as H,toRaw as O,renderList as L,createApp as W,unref as _}from"vue";let j=[];const V=new WeakMap;function q(){j.forEach((e=>e(...V.get(e)))),j=[]}function U(e,...t){V.set(e,t),j.includes(e)||1===j.push(e)&&requestAnimationFrame(q)}function K(e){if(null===e)return null;const t=function(e){return 9===e.nodeType?null:e.parentNode}(e);if(null===t)return null;if(9===t.nodeType)return document.documentElement;if(1===t.nodeType){const{overflow:e,overflowX:n,overflowY:r}=getComputedStyle(t);if(/(auto|scroll|overlay)/.test(e+r+n))return t}return K(t)}function Y(e){return"string"==typeof e?document.querySelector(e):"function"==typeof e?e():e}function X(e,t){let{target:n}=e;for(;n;){if(n.dataset&&void 0!==n.dataset[t])return!0;n=n.parentElement}return!1}function G(e){return e.composedPath()[0]||null}function Z(e,t){var n;if(null==e)return;const r=function(e){if("number"==typeof e)return{"":e.toString()};const t={};return e.split(/ +/).forEach((e=>{if(""===e)return;const[n,r]=e.split(":");void 0===r?t[""]=n:t[n]=r})),t}(e);if(void 0===t)return r[""];if("string"==typeof t)return null!==(n=r[t])&&void 0!==n?n:r[""];if(Array.isArray(t)){for(let e=t.length-1;e>=0;--e){const n=t[e];if(n in r)return r[n]}return r[""]}{let e,n=-1;return Object.keys(r).forEach((o=>{const a=Number(o);!Number.isNaN(a)&&t>=a&&a>=n&&(n=a,e=r[o])})),e}}function Q(e){return"string"==typeof e?e.endsWith("px")?Number(e.slice(0,e.length-2)):Number(e):e}function J(e){if(null!=e)return"number"==typeof e?`${e}px`:e.endsWith("px")?e:`${e}px`}function ee(e,t){const n=e.trim().split(/\s+/g),r={top:n[0]};switch(n.length){case 1:r.right=n[0],r.bottom=n[0],r.left=n[0];break;case 2:r.right=n[1],r.left=n[1],r.bottom=n[0];break;case 3:r.right=n[1],r.bottom=n[2],r.left=n[1];break;case 4:r.right=n[1],r.bottom=n[2],r.left=n[3];break;default:throw new Error("[seemly/getMargin]:"+e+" is not a valid value.")}return void 0===t?r:r[t]}function te(e,t){const[n,r]=e.split(" ");return{row:n,col:r||n}}var ne={black:"#000",silver:"#C0C0C0",gray:"#808080",white:"#FFF",maroon:"#800000",red:"#F00",purple:"#800080",fuchsia:"#F0F",green:"#008000",lime:"#0F0",olive:"#808000",yellow:"#FF0",navy:"#000080",blue:"#00F",teal:"#008080",aqua:"#0FF",transparent:"#0000"};function re(e,t,n){n/=100;const r=(t/=100)*Math.min(n,1-n)+n;return[e,r?100*(2-2*n/r):0,100*r]}function oe(e,t,n){const r=(n/=100)-n*(t/=100)/2,o=Math.min(r,1-r);return[e,o?(n-r)/o*100:0,100*r]}function ae(e,t,n){t/=100,n/=100;let r=(r,o=(r+e/60)%6)=>n-n*t*Math.max(Math.min(o,4-o,1),0);return[255*r(5),255*r(3),255*r(1)]}function ie(e,t,n){e/=255,t/=255,n/=255;let r=Math.max(e,t,n),o=r-Math.min(e,t,n),a=o&&(r==e?(t-n)/o:r==t?2+(n-e)/o:4+(e-t)/o);return[60*(a<0?a+6:a),r&&o/r*100,100*r]}function le(e,t,n){e/=255,t/=255,n/=255;let r=Math.max(e,t,n),o=r-Math.min(e,t,n),a=1-Math.abs(r+r-o-1),i=o&&(r==e?(t-n)/o:r==t?2+(n-e)/o:4+(e-t)/o);return[60*(i<0?i+6:i),a?o/a*100:0,50*(r+r-o)]}function se(e,t,n){n/=100;let r=(t/=100)*Math.min(n,1-n),o=(t,o=(t+e/30)%12)=>n-r*Math.max(Math.min(o-3,9-o,1),-1);return[255*o(0),255*o(8),255*o(4)]}const de="^\\s*",ce="\\s*$",ue="\\s*((\\.\\d+)|(\\d+(\\.\\d*)?))%\\s*",he="\\s*((\\.\\d+)|(\\d+(\\.\\d*)?))\\s*",pe="([0-9A-Fa-f])",me="([0-9A-Fa-f]{2})",fe=new RegExp(`${de}hsl\\s*\\(${he},${ue},${ue}\\)${ce}`),ge=new RegExp(`${de}hsv\\s*\\(${he},${ue},${ue}\\)${ce}`),ve=new RegExp(`${de}hsla\\s*\\(${he},${ue},${ue},${he}\\)${ce}`),be=new RegExp(`${de}hsva\\s*\\(${he},${ue},${ue},${he}\\)${ce}`),ye=new RegExp(`${de}rgb\\s*\\(${he},${he},${he}\\)${ce}`),xe=new RegExp(`${de}rgba\\s*\\(${he},${he},${he},${he}\\)${ce}`),we=new RegExp(`${de}#${pe}${pe}${pe}${ce}`),Ce=new RegExp(`${de}#${me}${me}${me}${ce}`),ke=new RegExp(`${de}#${pe}${pe}${pe}${pe}${ce}`),Se=new RegExp(`${de}#${me}${me}${me}${me}${ce}`);function Pe(e){return parseInt(e,16)}function ze(e){try{let t;if(t=ve.exec(e))return[Ae(t[1]),Ee(t[5]),Ee(t[9]),Be(t[13])];if(t=fe.exec(e))return[Ae(t[1]),Ee(t[5]),Ee(t[9]),1];throw new Error(`[seemly/hsla]: Invalid color value ${e}.`)}catch(e){throw e}}function Te(e){try{let t;if(t=be.exec(e))return[Ae(t[1]),Ee(t[5]),Ee(t[9]),Be(t[13])];if(t=ge.exec(e))return[Ae(t[1]),Ee(t[5]),Ee(t[9]),1];throw new Error(`[seemly/hsva]: Invalid color value ${e}.`)}catch(e){throw e}}function Me(e){try{let t;if(t=Ce.exec(e))return[Pe(t[1]),Pe(t[2]),Pe(t[3]),1];if(t=ye.exec(e))return[Ne(t[1]),Ne(t[5]),Ne(t[9]),1];if(t=xe.exec(e))return[Ne(t[1]),Ne(t[5]),Ne(t[9]),Be(t[13])];if(t=we.exec(e))return[Pe(t[1]+t[1]),Pe(t[2]+t[2]),Pe(t[3]+t[3]),1];if(t=Se.exec(e))return[Pe(t[1]),Pe(t[2]),Pe(t[3]),Be(Pe(t[4])/255)];if(t=ke.exec(e))return[Pe(t[1]+t[1]),Pe(t[2]+t[2]),Pe(t[3]+t[3]),Be(Pe(t[4]+t[4])/255)];if(e in ne)return Me(ne[e]);throw new Error(`[seemly/rgba]: Invalid color value ${e}.`)}catch(e){throw e}}function Re(e,t,n,r){return`rgba(${Ne(e)}, ${Ne(t)}, ${Ne(n)}, ${o=r,o>1?1:o<0?0:o})`;var o}function $e(e,t,n,r,o){return Ne((e*t*(1-r)+n*r)/o)}function Fe(e,t){Array.isArray(e)||(e=Me(e)),Array.isArray(t)||(t=Me(t));const n=e[3],r=t[3],o=Be(n+r-n*r);return Re($e(e[0],n,t[0],r,o),$e(e[1],n,t[1],r,o),$e(e[2],n,t[2],r,o),o)}function Ie(e,t){const[n,r,o,a=1]=Array.isArray(e)?e:Me(e);return t.alpha?Re(n,r,o,t.alpha):Re(n,r,o,a)}function De(e,t){const[n,r,o,a=1]=Array.isArray(e)?e:Me(e),{lightness:i=1,alpha:l=1}=t;return Oe([n*i,r*i,o*i,a*l])}function Be(e){const t=Math.round(100*Number(e))/100;return t>1?1:t<0?0:t}function Ae(e){const t=Math.round(Number(e));return t>=360||t<0?0:t}function Ne(e){const t=Math.round(Number(e));return t>255?255:t<0?0:t}function Ee(e){const t=Math.round(Number(e));return t>100?100:t<0?0:t}function He(e){const[t,n,r]=Array.isArray(e)?e:Me(e);return function(e,t,n){return`rgb(${Ne(e)}, ${Ne(t)}, ${Ne(n)})`}(t,n,r)}function Oe(e){const[t,n,r]=e;return 3 in e?`rgba(${Ne(t)}, ${Ne(n)}, ${Ne(r)}, ${Be(e[3])})`:`rgba(${Ne(t)}, ${Ne(n)}, ${Ne(r)}, 1)`}function Le(e){return`hsv(${Ae(e[0])}, ${Ee(e[1])}%, ${Ee(e[2])}%)`}function We(e){const[t,n,r]=e;return 3 in e?`hsva(${Ae(t)}, ${Ee(n)}%, ${Ee(r)}%, ${Be(e[3])})`:`hsva(${Ae(t)}, ${Ee(n)}%, ${Ee(r)}%, 1)`}function _e(e){return`hsl(${Ae(e[0])}, ${Ee(e[1])}%, ${Ee(e[2])}%)`}function je(e){const[t,n,r]=e;return 3 in e?`hsla(${Ae(t)}, ${Ee(n)}%, ${Ee(r)}%, ${Be(e[3])})`:`hsla(${Ae(t)}, ${Ee(n)}%, ${Ee(r)}%, 1)`}function Ve(e){if("string"==typeof e){let t;if(t=Ce.exec(e))return`${t[0]}FF`;if(t=Se.exec(e))return t[0];if(t=we.exec(e))return`#${t[1]}${t[1]}${t[2]}${t[2]}${t[3]}${t[3]}FF`;if(t=ke.exec(e))return`#${t[1]}${t[1]}${t[2]}${t[2]}${t[3]}${t[3]}${t[4]}${t[4]}`;throw new Error(`[seemly/toHexString]: Invalid hex value ${e}.`)}return`#${e.slice(0,3).map((e=>Ne(e).toString(16).toUpperCase().padStart(2,"0"))).join("")}`+(3===e.length?"FF":Ne(255*e[3]).toString(16).padStart(2,"0").toUpperCase())}function qe(e){if("string"==typeof e){let t;if(t=Ce.exec(e))return t[0];if(t=Se.exec(e))return t[0].slice(0,7);if(t=we.exec(e)||ke.exec(e))return`#${t[1]}${t[1]}${t[2]}${t[2]}${t[3]}${t[3]}`;throw new Error(`[seemly/toHexString]: Invalid hex value ${e}.`)}return`#${e.slice(0,3).map((e=>Ne(e).toString(16).toUpperCase().padStart(2,"0"))).join("")}`}function Ue(e=8){return Math.random().toString(16).slice(2,2+e)}function Ke(e,t){const n=[];for(let r=0;r<e;++r)n.push(t);return n}function Ye(e,t="default",n=[]){const r=e.$slots[t];return void 0===r?n:r()}function Xe(e,t="default",n=[]){const{children:r}=e;if(null!==r&&"object"==typeof r&&!Array.isArray(r)){const e=r[t];if("function"==typeof e)return e()}return n}function Ge(e,t=[],n){const r={};return t.forEach((t=>{r[t]=e[t]})),Object.assign(r,n)}function Ze(e,t=[],n){const r={};return Object.getOwnPropertyNames(e).forEach((n=>{t.includes(n)||(r[n]=e[n])})),Object.assign(r,n)}function Qe(r,o=!0,a=[]){return r.forEach((r=>{if(null!==r)if("object"==typeof r)if(Array.isArray(r))Qe(r,o,a);else if(r.type===t){if(null===r.children)return;Array.isArray(r.children)&&Qe(r.children,o,a)}else{if(r.type===n&&o)return;a.push(r)}else"string"!=typeof r&&"number"!=typeof r||a.push(e(String(r)))})),a}function Je(e,...t){if(!Array.isArray(e))return e(...t);e.forEach((e=>Je(e,...t)))}function et(e){return Object.keys(e)}function tt(t,...n){return"function"==typeof t?t(...n):"string"==typeof t?e(t):"number"==typeof t?e(String(t)):null}const nt=new Set;function rt(e,t){console.error(`[naive/${e}]: ${t}`)}function ot(e,t,n){console.error(`[naive/${e}]: ${t}`,n)}function at(e,t){throw new Error(`[naive/${e}]: ${t}`)}function it(e){switch(e){case"tiny":return"mini";case"small":return"tiny";case"medium":return"small";case"large":return"medium";case"huge":return"large"}throw new Error(`${e} has no smaller size.`)}function lt(e){switch(typeof e){case"string":return e||void 0;case"number":return String(e);default:return}}function st(e,t="default",n=void 0){const r=e[t];if(!r)return rt("getFirstSlotVNode",`slot[${t}] is empty`),null;const o=Qe(r(n));return 1===o.length?o[0]:(rt("getFirstSlotVNode",`slot[${t}] should have exactly one child`),null)}function dt(e){return"string"==typeof e?`s-${e}`:`n-${e}`}function ct(e){return t=>{e.value=t?t.$el:null}}function ut(e){return e.some((e=>!r(e)||e.type!==n&&!(e.type===t&&!ut(e.children))))?e:null}function ht(e,t){return e&&ut(e())||t()}function pt(e,t,n){return e&&ut(e(t))||n(t)}function mt(e,t){return t(e&&ut(e())||null)}function ft(e){return!(e&&ut(e()))}function gt(e){const t=e.filter((e=>void 0!==e));if(0!==t.length)return 1===t.length?t[0]:t=>{e.forEach((e=>{e&&e(t)}))}}const vt=a({render(){return this.$slots.default?.()}}),bt=/^(\d|\.)+$/,yt=/(\d|\.)+/;function xt(e,{c:t=1,offset:n=0,attachPx:r=!0}={}){if("number"==typeof e){const r=(e+n)*t;return 0===r?"0":`${r}px`}if("string"==typeof e){if(bt.test(e)){const o=(Number(e)+n)*t;return r?0===o?"0":`${o}px`:`${o}`}{const r=yt.exec(e);return r?e.replace(yt,String((Number(r[0])+n)*t)):e}}return e}function wt(e){return e.replace(/#|\(|\)|,|\s|\./g,"_")}function Ct(e){const{left:t,right:n,top:r,bottom:o}=ee(e);return`${r} ${n} ${o} ${t}`}const kt=/\s*,(?![^(]*\))\s*/g,St=/\s+/g;function Pt(e){let t=[""];return e.forEach((e=>{(e=e&&e.trim())&&(t=e.includes("&")?function(e,t){const n=[];return t.split(kt).forEach((t=>{let r=function(e){let t=0;for(let n=0;n<e.length;++n)"&"===e[n]&&++t;return t}(t);if(!r)return void e.forEach((e=>{n.push((e&&e+" ")+t)}));if(1===r)return void e.forEach((e=>{n.push(t.replace("&",e))}));let o=[t];for(;r--;){const t=[];o.forEach((n=>{e.forEach((e=>{t.push(n.replace("&",e))}))})),o=t}o.forEach((e=>n.push(e)))})),n}(t,e):function(e,t){const n=[];return t.split(kt).forEach((t=>{e.forEach((e=>{n.push((e&&e+" ")+t)}))})),n}(t,e))})),t.join(", ").replace(St," ")}function zt(e){if(!e)return;const t=e.parentElement;t&&t.removeChild(e)}function Tt(e,t){return(null!=t?t:document.head).querySelector(`style[cssr-id="${e}"]`)}function Mt(e){return!!e&&/^\s*@(s|m)/.test(e)}const Rt=/[A-Z]/g;function $t(e){return e.replace(Rt,(e=>"-"+e.toLowerCase()))}function Ft(e,t,n,r){if(!t)return"";const o=function(e,t,n){return"function"==typeof e?e({context:t.context,props:n}):e}(t,n,r);if(!o)return"";if("string"==typeof o)return`${e} {\n${o}\n}`;const a=Object.keys(o);if(0===a.length)return n.config.keepEmptyBlock?e+" {\n}":"";const i=e?[e+" {"]:[];return a.forEach((e=>{const t=o[e];"raw"!==e?(e=$t(e),null!=t&&i.push(` ${e}${function(e,t=" "){return"object"==typeof e&&null!==e?" {\n"+Object.entries(e).map((e=>t+` ${$t(e[0])}: ${e[1]};`)).join("\n")+"\n"+t+"}":`: ${e};`}(t)}`)):i.push("\n"+t+"\n")})),e&&i.push("}"),i.join("\n")}function It(e,t,n){e&&e.forEach((e=>{if(Array.isArray(e))It(e,t,n);else if("function"==typeof e){const r=e(t);Array.isArray(r)?It(r,t,n):r&&n(r)}else e&&n(e)}))}function Dt(e,t,n,r,o){const a=e.$;let i="";if(a&&"string"!=typeof a)if("function"==typeof a){const e=a({context:r.context,props:o});Mt(e)?i=e:t.push(e)}else if(a.before&&a.before(r.context),a.$&&"string"!=typeof a.$){if(a.$){const e=a.$({context:r.context,props:o});Mt(e)?i=e:t.push(e)}}else Mt(a.$)?i=a.$:t.push(a.$);else Mt(a)?i=a:t.push(a);const l=Pt(t),s=Ft(l,e.props,r,o);i?n.push(`${i} {`):s.length&&n.push(s),e.children&&It(e.children,{context:r.context,props:o},(e=>{if("string"==typeof e){const t=Ft(l,{raw:e},r,o);n.push(t)}else Dt(e,t,n,r,o)})),t.pop(),i&&n.push("}"),a&&a.after&&a.after(r.context)}function Bt(e){for(var t,n=0,r=0,o=e.length;o>=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}function At(e,t){e.push(t)}function Nt(e,t,n,r,o,a,i,l,s){let d;if(void 0===n&&(d=t.render(r),n=Bt(d)),s)return void s.adapter(n,null!=d?d:t.render(r));void 0===l&&(l=document.head);const c=Tt(n,l);if(null!==c&&!a)return c;const u=null!=c?c:function(e){const t=document.createElement("style");return t.setAttribute("cssr-id",e),t}(n);if(void 0===d&&(d=t.render(r)),u.textContent=d,null!==c)return c;if(i){const e=l.querySelector(`meta[name="${i}"]`);if(e)return l.insertBefore(u,e),At(t.els,u),u}return o?l.insertBefore(u,l.querySelector("style, link")):l.appendChild(u),At(t.els,u),u}function Et(e){return function(e,t,n){const r=[];return Dt(e,[],r,t,n),r.join("\n\n")}(this,this.instance,e)}function Ht(e={}){const{id:t,ssr:n,props:r,head:o=!1,force:a=!1,anchorMetaName:i,parent:l}=e;return Nt(this.instance,this,t,r,o,a,i,l,n)}function Ot(e={}){const{id:t,parent:n}=e;!function(e,t,n,r){const{els:o}=t;if(void 0===n)o.forEach(zt),t.els=[];else{const e=Tt(n,r);e&&o.includes(e)&&(zt(e),t.els=o.filter((t=>t!==e)))}}(this.instance,this,t,n)}"undefined"!=typeof window&&(window.__cssrContext={});const Lt=function(e,t,n,r){return{instance:e,$:t,props:n,children:r,els:[],render:Et,mount:Ht,unmount:Ot}};function Wt(e={}){const t={c:(...e)=>function(e,t,n,r){return Array.isArray(t)?Lt(e,{$:null},null,t):Array.isArray(n)?Lt(e,t,null,n):Array.isArray(r)?Lt(e,t,n,r):Lt(e,t,n,null)}(t,...e),use:(e,...n)=>e.install(t,...n),find:Tt,context:{},config:e};return t}const _t=".n-",jt=Wt(),Vt=function(e){let t,n=".",r="__",o="--";if(e){let t=e.blockPrefix;t&&(n=t),t=e.elementPrefix,t&&(r=t),t=e.modifierPrefix,t&&(o=t)}const a={install(e){t=e.c;const n=e.context;n.bem={},n.bem.b=null,n.bem.els=null}};return Object.assign(a,{cB:(...e)=>t(function(e){let t,r;return{before(e){t=e.bem.b,r=e.bem.els,e.bem.els=null},after(e){e.bem.b=t,e.bem.els=r},$:({context:t,props:r})=>(e="string"==typeof e?e:e({context:t,props:r}),t.bem.b=e,`${(null==r?void 0:r.bPrefix)||n}${t.bem.b}`)}}(e[0]),e[1],e[2]),cE:(...e)=>t(function(e){let t;return{before(e){t=e.bem.els},after(e){e.bem.els=t},$:({context:t,props:o})=>(e="string"==typeof e?e:e({context:t,props:o}),t.bem.els=e.split(",").map((e=>e.trim())),t.bem.els.map((e=>`${(null==o?void 0:o.bPrefix)||n}${t.bem.b}${r}${e}`)).join(", "))}}(e[0]),e[1],e[2]),cM:(...e)=>{return t((a=e[0],{$({context:e,props:t}){const i=(a="string"==typeof a?a:a({context:e,props:t})).split(",").map((e=>e.trim()));function l(a){return i.map((i=>`&${(null==t?void 0:t.bPrefix)||n}${e.bem.b}${void 0!==a?`${r}${a}`:""}${o}${i}`)).join(", ")}const s=e.bem.els;return null!==s?l(s[0]):l()}}),e[1],e[2]);var a},cNotM:(...e)=>{return t((a=e[0],{$({context:e,props:t}){a="string"==typeof a?a:a({context:e,props:t});const i=e.bem.els;return`&:not(${(null==t?void 0:t.bPrefix)||n}${e.bem.b}${null!==i&&i.length>0?`${r}${i[0]}`:""}${o}${a})`}}),e[1],e[2]);var a}}),a}({blockPrefix:_t,elementPrefix:"__",modifierPrefix:"--"});jt.use(Vt);const{c:qt,find:Ut}=jt,{cB:Kt,cE:Yt,cM:Xt,cNotM:Gt}=Vt;function Zt(e){return qt((({props:{bPrefix:e}})=>`${e||_t}modal, ${e||_t}drawer`),[e])}function Qt(e){return qt((({props:{bPrefix:e}})=>`${e||_t}popover`),[e])}function Jt(e){return qt((({props:{bPrefix:e}})=>`&${e||_t}modal`),e)}const en=(...e)=>qt(">",[Kt(...e)]);function tn(e,t){return e+("default"===t?"":t.replace(/^[a-z]/,(e=>e.toUpperCase())))}let nn;const rn="undefined"!=typeof document&&"undefined"!=typeof window,on=new WeakSet;function an(e){on.add(e)}function ln(e){return!on.has(e)}function sn(e,t,n){const r=i(e,null);if(null===r)return;const o=l()?.proxy;function a(e,n){if(!r)return;const a=r[t];void 0!==n&&function(e,t){e[t]||(e[t]=[]);e[t].splice(e[t].findIndex((e=>e===o)),1)}(a,n),void 0!==e&&function(e,t){e[t]||(e[t]=[]);~e[t].findIndex((e=>e===o))||e[t].push(o)}(a,e)}s(n,a),a(n.value),d((()=>{a(void 0,n.value)}))}function dn(e){const t=u(!!e.value);if(t.value)return h(t);const n=s(e,(e=>{e&&(t.value=!0,n())}));return h(t)}function cn(e){const t=p(e),n=u(t.value);return s(t,(e=>{n.value=e})),"function"==typeof e?n:{__v_isRef:!0,get value(){return n.value},set value(t){e.set(t)}}}function un(){return null!==l()}const hn="undefined"!=typeof window;let pn,mn;var fn,gn;function vn(e){if(mn)return;let t=!1;c((()=>{mn||null==pn||pn.then((()=>{t||e()}))})),d((()=>{t=!0}))}function bn(e){return e.composedPath()[0]}pn=hn?null===(gn=null===(fn=document)||void 0===fn?void 0:fn.fonts)||void 0===gn?void 0:gn.ready:void 0,mn=!1,void 0!==pn?pn.then((()=>{mn=!0})):mn=!0;const yn={mousemoveoutside:new WeakMap,clickoutside:new WeakMap};function xn(e,t,n){const r=yn[e];let o=r.get(t);void 0===o&&r.set(t,o=new WeakMap);let a=o.get(n);return void 0===a&&o.set(n,a=function(e,t,n){if("mousemoveoutside"===e){const e=e=>{t.contains(bn(e))||n(e)};return{mousemove:e,touchstart:e}}if("clickoutside"===e){let e=!1;const r=n=>{e=!t.contains(bn(n))},o=r=>{e&&(t.contains(bn(r))||n(r))};return{mousedown:r,mouseup:o,touchstart:r,touchend:o}}return console.error(`[evtd/create-trap-handler]: name \`${e}\` is invalid. This could be a bug of evtd.`),{}}(e,t,n)),a}function wn(e,t,n,r){if("mousemoveoutside"===e||"clickoutside"===e){const o=xn(e,t,n);return Object.keys(o).forEach((e=>{kn(e,document,o[e],r)})),!0}return!1}function Cn(e,t,n,r){if("mousemoveoutside"===e||"clickoutside"===e){const o=xn(e,t,n);return Object.keys(o).forEach((e=>{Sn(e,document,o[e],r)})),!0}return!1}const{on:kn,off:Sn}=function(){if("undefined"==typeof window)return{on:()=>{},off:()=>{}};const e=new WeakMap,t=new WeakMap;function n(){e.set(this,!0)}function r(){e.set(this,!0),t.set(this,!0)}function o(e,t,n){const r=e[t];return e[t]=function(){return n.apply(e,arguments),r.apply(e,arguments)},e}function a(e,t){e[t]=Event.prototype[t]}const i=new WeakMap,l=Object.getOwnPropertyDescriptor(Event.prototype,"currentTarget");function s(){var e;return null!==(e=i.get(this))&&void 0!==e?e:null}function d(e,t){void 0!==l&&Object.defineProperty(e,"currentTarget",{configurable:!0,enumerable:!0,get:null!=t?t:l.get})}const c={bubble:{},capture:{}},u={},h=function(){const l=function(l){const{type:u,eventPhase:h,bubbles:p}=l,m=bn(l);if(2===h)return;const f=1===h?"capture":"bubble";let g=m;const v=[];for(;null===g&&(g=window),v.push(g),g!==window;)g=g.parentNode||null;const b=c.capture[u],y=c.bubble[u];if(o(l,"stopPropagation",n),o(l,"stopImmediatePropagation",r),d(l,s),"capture"===f){if(void 0===b)return;for(let n=v.length-1;n>=0&&!e.has(l);--n){const e=v[n],r=b.get(e);if(void 0!==r){i.set(l,e);for(const e of r){if(t.has(l))break;e(l)}}if(0===n&&!p&&void 0!==y){const n=y.get(e);if(void 0!==n)for(const e of n){if(t.has(l))break;e(l)}}}}else if("bubble"===f){if(void 0===y)return;for(let n=0;n<v.length&&!e.has(l);++n){const e=v[n],r=y.get(e);if(void 0!==r){i.set(l,e);for(const e of r){if(t.has(l))break;e(l)}}}}a(l,"stopPropagation"),a(l,"stopImmediatePropagation"),d(l)};return l.displayName="evtdUnifiedHandler",l}(),p=function(){const e=function(e){const{type:t,eventPhase:n}=e;if(2!==n)return;const r=u[t];void 0!==r&&r.forEach((t=>t(e)))};return e.displayName="evtdUnifiedWindowEventHandler",e}();function m(e,t){const n=c[e];return void 0===n[t]&&(n[t]=new Map,window.addEventListener(t,h,"capture"===e)),n[t]}function f(e,t){let n=e.get(t);return void 0===n&&e.set(t,n=new Set),n}function g(e,t,n,r){if(Cn(e,t,n,r))return;const o=!0===r||"object"==typeof r&&!0===r.capture,a=o?"capture":"bubble",i=m(a,e),l=f(i,t);if(t===window){if(!function(e,t,n,r){const o=c[t][n];if(void 0!==o){const t=o.get(e);if(void 0!==t&&t.has(r))return!0}return!1}(t,o?"bubble":"capture",e,n)&&function(e,t){const n=u[e];return!(void 0===n||!n.has(t))}(e,n)){const t=u[e];t.delete(n),0===t.size&&(window.removeEventListener(e,p),u[e]=void 0)}}l.has(n)&&l.delete(n),0===l.size&&i.delete(t),0===i.size&&(window.removeEventListener(e,h,"capture"===a),c[a][e]=void 0)}return{on:function(e,t,n,r){let o;if(o="object"==typeof r&&!0===r.once?a=>{g(e,t,o,r),n(a)}:n,wn(e,t,o,r))return;const a=f(m(!0===r||"object"==typeof r&&!0===r.capture?"capture":"bubble",e),t);if(a.has(o)||a.add(o),t===window){const t=function(e){return void 0===u[e]&&(u[e]=new Set,window.addEventListener(e,p)),u[e]}(e);t.has(o)||t.add(o)}},off:g}}(),Pn=u(null);function zn(e){if(e.clientX>0||e.clientY>0)Pn.value={x:e.clientX,y:e.clientY};else{const{target:t}=e;if(t instanceof Element){const{left:e,top:n,width:r,height:o}=t.getBoundingClientRect();Pn.value=e>0||n>0?{x:e+r/2,y:n+o/2}:{x:0,y:0}}else Pn.value=null}}let Tn=0,Mn=!0;function Rn(){if(!hn)return h(u(null));0===Tn&&kn("click",document,zn,!0);const e=()=>{Tn+=1};return Mn&&(Mn=un())?(m(e),d((()=>{Tn-=1,0===Tn&&Sn("click",document,zn,!0)}))):e(),h(Pn)}const $n=u(void 0);let Fn=0;function In(){$n.value=Date.now()}let Dn=!0;function Bn(e){if(!hn)return h(u(!1));const t=u(!1);let n=null;function r(){null!==n&&window.clearTimeout(n)}function o(){r(),t.value=!0,n=window.setTimeout((()=>{t.value=!1}),e)}0===Fn&&kn("click",window,In,!0);const a=()=>{Fn+=1,kn("click",window,o,!0)};return Dn&&(Dn=un())?(m(a),d((()=>{Fn-=1,0===Fn&&Sn("click",window,In,!0),Sn("click",window,o,!0),r()}))):a(),h(t)}let An=0;const Nn="undefined"!=typeof window&&void 0!==window.matchMedia,En=u(null);let Hn,On;function Ln(e){e.matches&&(En.value="dark")}function Wn(e){e.matches&&(En.value="light")}let _n=!0;function jn(){return Nn?(0===An&&(Hn=window.matchMedia("(prefers-color-scheme: dark)"),On=window.matchMedia("(prefers-color-scheme: light)"),Hn.matches?En.value="dark":On.matches?En.value="light":En.value=null,Hn.addEventListener?(Hn.addEventListener("change",Ln),On.addEventListener("change",Wn)):Hn.addListener&&(Hn.addListener(Ln),On.addListener(Wn))),_n&&(_n=un())&&(m((()=>{An+=1})),d((()=>{An-=1,0===An&&("removeEventListener"in Hn?(Hn.removeEventListener("change",Ln),On.removeEventListener("change",Wn)):"removeListener"in Hn&&(Hn.removeListener(Ln),On.removeListener(Wn)),Hn=void 0,On=void 0)}))),h(En)):h(En)}function Vn(e,t){return s(e,(e=>{void 0!==e&&(t.value=e)})),p((()=>void 0===e.value?t.value:e.value))}function qn(){const e=u(!1);return c((()=>{e.value=!0})),h(e)}function Un(e,t){return p((()=>{for(const n of t)if(void 0!==e[n])return e[n];return e[t[t.length-1]]}))}const Kn="undefined"!=typeof window&&(/iPad|iPhone|iPod/.test(navigator.platform)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1)&&!window.MSStream;function Yn(){return Kn}const Xn={xs:0,s:640,m:1024,l:1280,xl:1536,"2xl":1920};const Gn={};function Zn(e={},t){const n=f({ctrl:!1,command:!1,win:!1,shift:!1,tab:!1}),{keydown:r,keyup:o}=e,a=e=>{switch(e.key){case"Control":n.ctrl=!0;break;case"Meta":n.command=!0,n.win=!0;break;case"Shift":n.shift=!0;break;case"Tab":n.tab=!0}void 0!==r&&Object.keys(r).forEach((t=>{if(t!==e.key)return;const n=r[t];if("function"==typeof n)n(e);else{const{stop:t=!1,prevent:r=!1}=n;t&&e.stopPropagation(),r&&e.preventDefault(),n.handler(e)}}))},i=e=>{switch(e.key){case"Control":n.ctrl=!1;break;case"Meta":n.command=!1,n.win=!1;break;case"Shift":n.shift=!1;break;case"Tab":n.tab=!1}void 0!==o&&Object.keys(o).forEach((t=>{if(t!==e.key)return;const n=o[t];if("function"==typeof n)n(e);else{const{stop:t=!1,prevent:r=!1}=n;t&&e.stopPropagation(),r&&e.preventDefault(),n.handler(e)}}))},l=()=>{(void 0===t||t.value)&&(kn("keydown",document,a),kn("keyup",document,i)),void 0!==t&&s(t,(e=>{e?(kn("keydown",document,a),kn("keyup",document,i)):(Sn("keydown",document,a),Sn("keyup",document,i))}))};return un()?(m(l),d((()=>{(void 0===t||t.value)&&(Sn("keydown",document,a),Sn("keyup",document,i))}))):l(),h(n)}const Qn="n-internal-select-menu",Jn="n-internal-select-menu-body",er="n-modal-body",tr="n-modal",nr="n-drawer-body",rr="n-drawer",or="n-popover-body",ar="__disabled__";function ir(e){const t=i(er,null),n=i(nr,null),r=i(or,null),o=i(Jn,null),a=u();if("undefined"!=typeof document){a.value=document.fullscreenElement;const e=()=>{a.value=document.fullscreenElement};c((()=>{kn("fullscreenchange",document,e)})),d((()=>{Sn("fullscreenchange",document,e)}))}return cn((()=>{const{to:i}=e;return void 0!==i?!1===i?ar:!0===i?a.value||"body":i:t?.value?t.value.$el??t.value:n?.value?n.value:r?.value?r.value:o?.value?o.value:i??(a.value||"body")}))}ir.tdkey=ar,ir.propTo={type:[String,Object,Boolean],default:void 0};let lr=!1;function sr(){if(rn&&window.CSS&&!lr&&(lr=!0,"registerProperty"in window?.CSS))try{CSS.registerProperty({name:"--n-color-start",syntax:"<color>",inherits:!1,initialValue:"#0000"}),CSS.registerProperty({name:"--n-color-end",syntax:"<color>",inherits:!1,initialValue:"#0000"})}catch{}}function dr(e,t,n="default"){const r=t[n];if(void 0===r)throw new Error(`[vueuc/${e}]: slot[${n}] is empty.`);return r()}function cr(r,o=!0,a=[]){return r.forEach((r=>{if(null!==r)if("object"==typeof r)if(Array.isArray(r))cr(r,o,a);else if(r.type===t){if(null===r.children)return;Array.isArray(r.children)&&cr(r.children,o,a)}else r.type!==n&&a.push(r);else"string"!=typeof r&&"number"!=typeof r||a.push(e(String(r)))})),a}function ur(e,t,n="default"){const r=t[n];if(void 0===r)throw new Error(`[vueuc/${e}]: slot[${n}] is empty.`);const o=cr(r());if(1===o.length)return o[0];throw new Error(`[vueuc/${e}]: slot[${n}] should have exactly one child.`)}let hr=null;function pr(){if(null===hr&&(hr=document.getElementById("v-binder-view-measurer"),null===hr)){hr=document.createElement("div"),hr.id="v-binder-view-measurer";const{style:e}=hr;e.position="fixed",e.left="0",e.right="0",e.top="0",e.bottom="0",e.pointerEvents="none",e.visibility="hidden",document.body.appendChild(hr)}return hr.getBoundingClientRect()}function mr(e){const t=e.getBoundingClientRect(),n=pr();return{left:t.left-n.left,top:t.top-n.top,bottom:n.height+n.top-t.bottom,right:n.width+n.left-t.right,width:t.width,height:t.height}}function fr(e){if(null===e)return null;const t=function(e){return 9===e.nodeType?null:e.parentNode}(e);if(null===t)return null;if(9===t.nodeType)return document;if(1===t.nodeType){const{overflow:e,overflowX:n,overflowY:r}=getComputedStyle(t);if(/(auto|scroll|overlay)/.test(e+r+n))return t}return fr(t)}const gr=a({name:"Binder",props:{syncTargetWithParent:Boolean,syncTarget:{type:Boolean,default:!0}},setup(e){var t;g("VBinder",null===(t=l())||void 0===t?void 0:t.proxy);const n=i("VBinder",null),r=u(null);let o=[];const a=()=>{for(const e of o)Sn("scroll",e,c,!0);o=[]},s=new Set,c=()=>{U(h)},h=()=>{s.forEach((e=>e()))},p=new Set,m=()=>{p.forEach((e=>e()))};return d((()=>{Sn("resize",window,m),a()})),{targetRef:r,setTargetRef:t=>{r.value=t,n&&e.syncTargetWithParent&&n.setTargetRef(t)},addScrollListener:e=>{0===s.size&&(()=>{let e=r.value;for(;e=fr(e),null!==e;)o.push(e);for(const e of o)kn("scroll",e,c,!0)})(),s.has(e)||s.add(e)},removeScrollListener:e=>{s.has(e)&&s.delete(e),0===s.size&&a()},addResizeListener:e=>{0===p.size&&kn("resize",window,m),p.has(e)||p.add(e)},removeResizeListener:e=>{p.has(e)&&p.delete(e),0===p.size&&Sn("resize",window,m)}}},render(){return dr("binder",this.$slots)}});var vr=a({name:"Target",setup(){const{setTargetRef:e,syncTarget:t}=i("VBinder");return{syncTarget:t,setTargetDirective:{mounted:e,updated:e}}},render(){const{syncTarget:e,setTargetDirective:t}=this;return e?v(ur("follower",this.$slots),[[t]]):ur("follower",this.$slots)}});const br="@@mmoContext",yr={mounted(e,{value:t}){e[br]={handler:void 0},"function"==typeof t&&(e[br].handler=t,kn("mousemoveoutside",e,t))},updated(e,{value:t}){const n=e[br];"function"==typeof t?n.handler?n.handler!==t&&(Sn("mousemoveoutside",e,n.handler),n.handler=t,kn("mousemoveoutside",e,t)):(e[br].handler=t,kn("mousemoveoutside",e,t)):n.handler&&(Sn("mousemoveoutside",e,n.handler),n.handler=void 0)},unmounted(e){const{handler:t}=e[br];t&&Sn("mousemoveoutside",e,t),e[br].handler=void 0}},xr="@@coContext",wr={mounted(e,{value:t,modifiers:n}){e[xr]={handler:void 0},"function"==typeof t&&(e[xr].handler=t,kn("clickoutside",e,t,{capture:n.capture}))},updated(e,{value:t,modifiers:n}){const r=e[xr];"function"==typeof t?r.handler?r.handler!==t&&(Sn("clickoutside",e,r.handler,{capture:n.capture}),r.handler=t,kn("clickoutside",e,t,{capture:n.capture})):(e[xr].handler=t,kn("clickoutside",e,t,{capture:n.capture})):r.handler&&(Sn("clickoutside",e,r.handler,{capture:n.capture}),r.handler=void 0)},unmounted(e,{modifiers:t}){const{handler:n}=e[xr];n&&Sn("clickoutside",e,n,{capture:t.capture}),e[xr].handler=void 0}};var Cr=new class{constructor(){this.elementZIndex=new Map,this.nextZIndex=2e3}get elementCount(){return this.elementZIndex.size}ensureZIndex(e,t){const{elementZIndex:n}=this;if(void 0!==t)return e.style.zIndex=`${t}`,void n.delete(e);const{nextZIndex:r}=this;if(n.has(e)){if(n.get(e)+1===this.nextZIndex)return}e.style.zIndex=`${r}`,n.set(e,r),this.nextZIndex=r+1,this.squashState()}unregister(e,t){const{elementZIndex:n}=this;n.has(e)?n.delete(e):void 0===t&&function(e,t){console.error(`[vdirs/${e}]: ${t}`)}("z-index-manager/unregister-element","Element not found when unregistering."),this.squashState()}squashState(){const{elementCount:e}=this;e||(this.nextZIndex=2e3),this.nextZIndex-e>2500&&this.rearrange()}rearrange(){const e=Array.from(this.elementZIndex.entries());e.sort(((e,t)=>e[1]-t[1])),this.nextZIndex=2e3,e.forEach((e=>{const t=e[0],n=this.nextZIndex++;`${n}`!==t.style.zIndex&&(t.style.zIndex=`${n}`)}))}};const kr="@@ziContext",Sr={mounted(e,t){const{value:n={}}=t,{zIndex:r,enabled:o}=n;e[kr]={enabled:!!o,initialized:!1},o&&(Cr.ensureZIndex(e,r),e[kr].initialized=!0)},updated(e,t){const{value:n={}}=t,{zIndex:r,enabled:o}=n,a=e[kr].enabled;o&&!a&&(Cr.ensureZIndex(e,r),e[kr].initialized=!0),e[kr].enabled=!!o},unmounted(e,t){if(!e[kr].initialized)return;const{value:n={}}=t,{zIndex:r}=n;Cr.unregister(e,r)}};const Pr="undefined"!=typeof document;function zr(){if(Pr)return;const e=i("@css-render/vue3-ssr",null);return null!==e?{adapter:(t,n)=>function(e,t,n){const{styles:r,ids:o}=n;o.has(e)||null!==r&&(o.add(e),r.push(function(e,t){return`<style cssr-id="${e}">\n${t}\n</style>`}(e,t)))}(t,n,e),context:e}:void 0}function Tr(e,t){console.error(`[vueuc/${e}]: ${t}`)}const{c:Mr}=Wt(),Rr="vueuc-style";function $r(e){return e&-e}class Fr{constructor(e,t){this.l=e,this.min=t;const n=new Array(e+1);for(let t=0;t<e+1;++t)n[t]=0;this.ft=n}add(e,t){if(0===t)return;const{l:n,ft:r}=this;for(e+=1;e<=n;)r[e]+=t,e+=$r(e)}get(e){return this.sum(e+1)-this.sum(e)}sum(e){if(void 0===e&&(e=this.l),e<=0)return 0;const{ft:t,min:n,l:r}=this;if(e>r)throw new Error("[FinweckTree.sum]: `i` is larger than length.");let o=e*n;for(;e>0;)o+=t[e],e-=$r(e);return o}getBound(e){let t=0,n=this.l;for(;n>t;){const r=Math.floor((t+n)/2),o=this.sum(r);if(o>e)n=r;else{if(!(o<e))return r;if(t===r)return this.sum(t+1)<=e?t+1:r;t=r}}return t}}function Ir(e){return"string"==typeof e?document.querySelector(e):e()}var Dr=a({name:"LazyTeleport",props:{to:{type:[String,Object],default:void 0},disabled:Boolean,show:{type:Boolean,required:!0}},setup:e=>({showTeleport:dn(b(e,"show")),mergedTo:p((()=>{const{to:t}=e;return null!=t?t:"body"}))}),render(){return this.showTeleport?this.disabled?dr("lazy-teleport",this.$slots):y(x,{disabled:this.disabled,to:this.mergedTo},dr("lazy-teleport",this.$slots)):null}});const Br={top:"bottom",bottom:"top",left:"right",right:"left"},Ar={start:"end",center:"center",end:"start"},Nr={top:"height",bottom:"height",left:"width",right:"width"},Er={"bottom-start":"top left",bottom:"top center","bottom-end":"top right","top-start":"bottom left",top:"bottom center","top-end":"bottom right","right-start":"top left",right:"center left","right-end":"bottom left","left-start":"top right",left:"center right","left-end":"bottom right"},Hr={"bottom-start":"bottom left",bottom:"bottom center","bottom-end":"bottom right","top-start":"top left",top:"top center","top-end":"top right","right-start":"top right",right:"center right","right-end":"bottom right","left-start":"top left",left:"center left","left-end":"bottom left"},Or={"bottom-start":"right","bottom-end":"left","top-start":"right","top-end":"left","right-start":"bottom","right-end":"top","left-start":"bottom","left-end":"top"},Lr={top:!0,bottom:!1,left:!0,right:!1},Wr={top:"end",bottom:"start",left:"end",right:"start"};const _r=Mr([Mr(".v-binder-follower-container",{position:"absolute",left:"0",right:"0",top:"0",height:"0",pointerEvents:"none",zIndex:"auto"}),Mr(".v-binder-follower-content",{position:"absolute",zIndex:"auto"},[Mr("> *",{pointerEvents:"all"})])]);var jr,Vr=a({name:"Follower",inheritAttrs:!1,props:{show:Boolean,enabled:{type:Boolean,default:void 0},placement:{type:String,default:"bottom"},syncTrigger:{type:Array,default:["resize","scroll"]},to:[String,Object],flip:{type:Boolean,default:!0},internalShift:Boolean,x:Number,y:Number,width:String,minWidth:String,containerClass:String,teleportDisabled:Boolean,zindexable:{type:Boolean,default:!0},zIndex:Number,overlap:Boolean},setup(e){const t=i("VBinder"),n=cn((()=>void 0!==e.enabled?e.enabled:e.show)),r=u(null),o=u(null),a=()=>{const{syncTrigger:n}=e;n.includes("scroll")&&t.addScrollListener(p),n.includes("resize")&&t.addResizeListener(p)},l=()=>{t.removeScrollListener(p),t.removeResizeListener(p)};c((()=>{n.value&&(p(),a())}));const h=zr();_r.mount({id:"vueuc/binder",head:!0,anchorMetaName:Rr,ssr:h}),d((()=>{l()})),vn((()=>{n.value&&p()}));const p=()=>{if(!n.value)return;const a=r.value;if(null===a)return;const i=t.targetRef,{x:l,y:s,overlap:d}=e,c=void 0!==l&&void 0!==s?function(e,t){const n=pr();return{top:t,left:e,height:0,width:0,right:n.width-e,bottom:n.height-t}}(l,s):mr(i);a.style.setProperty("--v-target-width",`${Math.round(c.width)}px`),a.style.setProperty("--v-target-height",`${Math.round(c.height)}px`);const{width:u,minWidth:h,placement:p,internalShift:m,flip:f}=e;a.setAttribute("v-placement",p),d?a.setAttribute("v-overlap",""):a.removeAttribute("v-overlap");const{style:g}=a;g.width="target"===u?`${c.width}px`:void 0!==u?u:"",g.minWidth="target"===h?`${c.width}px`:void 0!==h?h:"";const v=mr(a),b=mr(o.value),{left:y,top:x,placement:w}=function(e,t,n,r,o,a){if(!o||a)return{placement:e,top:0,left:0};const[i,l]=e.split("-");let s=null!=l?l:"center",d={top:0,left:0};const c=(e,o,a)=>{let i=0,l=0;const s=n[e]-t[o]-t[e];return s>0&&r&&(a?l=Lr[o]?s:-s:i=Lr[o]?s:-s),{left:i,top:l}},u="left"===i||"right"===i;if("center"!==s){const r=Or[e],o=Br[r],a=Nr[r];if(n[a]>t[a]){if(t[r]+t[a]<n[a]){const e=(n[a]-t[a])/2;t[r]<e||t[o]<e?t[r]<t[o]?(s=Ar[l],d=c(a,o,u)):d=c(a,r,u):s="center"}}else n[a]<t[a]&&t[o]<0&&t[r]>t[o]&&(s=Ar[l])}else{const e="bottom"===i||"top"===i?"left":"top",r=Br[e],o=Nr[e],a=(n[o]-t[o])/2;(t[e]<a||t[r]<a)&&(t[e]>t[r]?(s=Wr[e],d=c(o,e,u)):(s=Wr[r],d=c(o,r,u)))}let h=i;return t[i]<n[Nr[i]]&&t[i]<t[Br[i]]&&(h=Br[i]),{placement:"center"!==s?`${h}-${s}`:h,left:d.left,top:d.top}}(p,c,v,m,f,d),C=function(e,t){return t?Hr[e]:Er[e]}(w,d),{left:k,top:S,transform:P}=function(e,t,n,r,o,a){if(a)switch(e){case"bottom-start":case"left-end":return{top:`${Math.round(n.top-t.top+n.height)}px`,left:`${Math.round(n.left-t.left)}px`,transform:"translateY(-100%)"};case"bottom-end":case"right-end":return{top:`${Math.round(n.top-t.top+n.height)}px`,left:`${Math.round(n.left-t.left+n.width)}px`,transform:"translateX(-100%) translateY(-100%)"};case"top-start":case"left-start":return{top:`${Math.round(n.top-t.top)}px`,left:`${Math.round(n.left-t.left)}px`,transform:""};case"top-end":case"right-start":return{top:`${Math.round(n.top-t.top)}px`,left:`${Math.round(n.left-t.left+n.width)}px`,transform:"translateX(-100%)"};case"top":return{top:`${Math.round(n.top-t.top)}px`,left:`${Math.round(n.left-t.left+n.width/2)}px`,transform:"translateX(-50%)"};case"right":return{top:`${Math.round(n.top-t.top+n.height/2)}px`,left:`${Math.round(n.left-t.left+n.width)}px`,transform:"translateX(-100%) translateY(-50%)"};case"left":return{top:`${Math.round(n.top-t.top+n.height/2)}px`,left:`${Math.round(n.left-t.left)}px`,transform:"translateY(-50%)"};default:return{top:`${Math.round(n.top-t.top+n.height)}px`,left:`${Math.round(n.left-t.left+n.width/2)}px`,transform:"translateX(-50%) translateY(-100%)"}}switch(e){case"bottom-start":return{top:`${Math.round(n.top-t.top+n.height+r)}px`,left:`${Math.round(n.left-t.left+o)}px`,transform:""};case"bottom-end":return{top:`${Math.round(n.top-t.top+n.height+r)}px`,left:`${Math.round(n.left-t.left+n.width+o)}px`,transform:"translateX(-100%)"};case"top-start":return{top:`${Math.round(n.top-t.top+r)}px`,left:`${Math.round(n.left-t.left+o)}px`,transform:"translateY(-100%)"};case"top-end":return{top:`${Math.round(n.top-t.top+r)}px`,left:`${Math.round(n.left-t.left+n.width+o)}px`,transform:"translateX(-100%) translateY(-100%)"};case"right-start":return{top:`${Math.round(n.top-t.top+r)}px`,left:`${Math.round(n.left-t.left+n.width+o)}px`,transform:""};case"right-end":return{top:`${Math.round(n.top-t.top+n.height+r)}px`,left:`${Math.round(n.left-t.left+n.width+o)}px`,transform:"translateY(-100%)"};case"left-start":return{top:`${Math.round(n.top-t.top+r)}px`,left:`${Math.round(n.left-t.left+o)}px`,transform:"translateX(-100%)"};case"left-end":return{top:`${Math.round(n.top-t.top+n.height+r)}px`,left:`${Math.round(n.left-t.left+o)}px`,transform:"translateX(-100%) translateY(-100%)"};case"top":return{top:`${Math.round(n.top-t.top+r)}px`,left:`${Math.round(n.left-t.left+n.width/2+o)}px`,transform:"translateY(-100%) translateX(-50%)"};case"right":return{top:`${Math.round(n.top-t.top+n.height/2+r)}px`,left:`${Math.round(n.left-t.left+n.width+o)}px`,transform:"translateY(-50%)"};case"left":return{top:`${Math.round(n.top-t.top+n.height/2+r)}px`,left:`${Math.round(n.left-t.left+o)}px`,transform:"translateY(-50%) translateX(-100%)"};default:return{top:`${Math.round(n.top-t.top+n.height+r)}px`,left:`${Math.round(n.left-t.left+n.width/2+o)}px`,transform:"translateX(-50%)"}}}(w,b,c,x,y,d);a.setAttribute("v-placement",w),a.style.setProperty("--v-offset-left",`${Math.round(y)}px`),a.style.setProperty("--v-offset-top",`${Math.round(x)}px`),a.style.transform=`translateX(${k}) translateY(${S}) ${P}`,a.style.setProperty("--v-transform-origin",C),a.style.transformOrigin=C};s(n,(e=>{e?(a(),m()):l()}));const m=()=>{w().then(p).catch((e=>console.error(e)))};["placement","x","y","internalShift","flip","width","overlap","minWidth"].forEach((t=>{s(b(e,t),p)})),["teleportDisabled"].forEach((t=>{s(b(e,t),m)})),s(b(e,"syncTrigger"),(e=>{e.includes("resize")?t.addResizeListener(p):t.removeResizeListener(p),e.includes("scroll")?t.addScrollListener(p):t.removeScrollListener(p)}));const f=qn(),g=cn((()=>{const{to:t}=e;if(void 0!==t)return t;f.value}));return{VBinder:t,mergedEnabled:n,offsetContainerRef:o,followerRef:r,mergedTo:g,syncPosition:p}},render(){return y(Dr,{show:this.show,to:this.mergedTo,disabled:this.teleportDisabled},{default:()=>{var e,t;const n=y("div",{class:["v-binder-follower-container",this.containerClass],ref:"offsetContainerRef"},[y("div",{class:"v-binder-follower-content",ref:"followerRef"},null===(t=(e=this.$slots).default)||void 0===t?void 0:t.call(e))]);return this.zindexable?v(n,[[Sr,{enabled:this.mergedEnabled,zIndex:this.zIndex}]]):n}})}}),qr=[],Ur="ResizeObserver loop completed with undelivered notifications.";!function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"}(jr||(jr={}));var Kr,Yr=function(e){return Object.freeze(e)},Xr=function(e,t){this.inlineSize=e,this.blockSize=t,Yr(this)},Gr=function(){function e(e,t,n,r){return this.x=e,this.y=t,this.width=n,this.height=r,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,Yr(this)}return e.prototype.toJSON=function(){var e=this;return{x:e.x,y:e.y,top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.width,height:e.height}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),Zr=function(e){return e instanceof SVGElement&&"getBBox"in e},Qr=function(e){if(Zr(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var o=e,a=o.offsetWidth,i=o.offsetHeight;return!(a||i||e.getClientRects().length)},Jr=function(e){var t;if(e instanceof Element)return!0;var n=null===(t=null==e?void 0:e.ownerDocument)||void 0===t?void 0:t.defaultView;return!!(n&&e instanceof n.Element)},eo="undefined"!=typeof window?window:{},to=new WeakMap,no=/auto|scroll/,ro=/^tb|vertical/,oo=/msie|trident/i.test(eo.navigator&&eo.navigator.userAgent),ao=function(e){return parseFloat(e||"0")},io=function(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=!1),new Xr((n?t:e)||0,(n?e:t)||0)},lo=Yr({devicePixelContentBoxSize:io(),borderBoxSize:io(),contentBoxSize:io(),contentRect:new Gr(0,0,0,0)}),so=function(e,t){if(void 0===t&&(t=!1),to.has(e)&&!t)return to.get(e);if(Qr(e))return to.set(e,lo),lo;var n=getComputedStyle(e),r=Zr(e)&&e.ownerSVGElement&&e.getBBox(),o=!oo&&"border-box"===n.boxSizing,a=ro.test(n.writingMode||""),i=!r&&no.test(n.overflowY||""),l=!r&&no.test(n.overflowX||""),s=r?0:ao(n.paddingTop),d=r?0:ao(n.paddingRight),c=r?0:ao(n.paddingBottom),u=r?0:ao(n.paddingLeft),h=r?0:ao(n.borderTopWidth),p=r?0:ao(n.borderRightWidth),m=r?0:ao(n.borderBottomWidth),f=u+d,g=s+c,v=(r?0:ao(n.borderLeftWidth))+p,b=h+m,y=l?e.offsetHeight-b-e.clientHeight:0,x=i?e.offsetWidth-v-e.clientWidth:0,w=o?f+v:0,C=o?g+b:0,k=r?r.width:ao(n.width)-w-x,S=r?r.height:ao(n.height)-C-y,P=k+f+x+v,z=S+g+y+b,T=Yr({devicePixelContentBoxSize:io(Math.round(k*devicePixelRatio),Math.round(S*devicePixelRatio),a),borderBoxSize:io(P,z,a),contentBoxSize:io(k,S,a),contentRect:new Gr(u,s,k,S)});return to.set(e,T),T},co=function(e,t,n){var r=so(e,n),o=r.borderBoxSize,a=r.contentBoxSize,i=r.devicePixelContentBoxSize;switch(t){case jr.DEVICE_PIXEL_CONTENT_BOX:return i;case jr.BORDER_BOX:return o;default:return a}},uo=function(e){var t=so(e);this.target=e,this.contentRect=t.contentRect,this.borderBoxSize=Yr([t.borderBoxSize]),this.contentBoxSize=Yr([t.contentBoxSize]),this.devicePixelContentBoxSize=Yr([t.devicePixelContentBoxSize])},ho=function(e){if(Qr(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},po=function(){var e=1/0,t=[];qr.forEach((function(n){if(0!==n.activeTargets.length){var r=[];n.activeTargets.forEach((function(t){var n=new uo(t.target),o=ho(t.target);r.push(n),t.lastReportedSize=co(t.target,t.observedBox),o<e&&(e=o)})),t.push((function(){n.callback.call(n.observer,r,n.observer)})),n.activeTargets.splice(0,n.activeTargets.length)}}));for(var n=0,r=t;n<r.length;n++){(0,r[n])()}return e},mo=function(e){qr.forEach((function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEach((function(n){n.isActive()&&(ho(n.target)>e?t.activeTargets.push(n):t.skippedTargets.push(n))}))}))},fo=function(){var e,t=0;for(mo(t);qr.some((function(e){return e.activeTargets.length>0}));)t=po(),mo(t);return qr.some((function(e){return e.skippedTargets.length>0}))&&("function"==typeof ErrorEvent?e=new ErrorEvent("error",{message:Ur}):((e=document.createEvent("Event")).initEvent("error",!1,!1),e.message=Ur),window.dispatchEvent(e)),t>0},go=[],vo=function(e){if(!Kr){var t=0,n=document.createTextNode("");new MutationObserver((function(){return go.splice(0).forEach((function(e){return e()}))})).observe(n,{characterData:!0}),Kr=function(){n.textContent="".concat(t?t--:t++)}}go.push(e),Kr()},bo=0,yo={attributes:!0,characterData:!0,childList:!0,subtree:!0},xo=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],wo=function(e){return void 0===e&&(e=0),Date.now()+e},Co=!1,ko=new(function(){function e(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return e.prototype.run=function(e){var t=this;if(void 0===e&&(e=250),!Co){Co=!0;var n,r=wo(e);n=function(){var n=!1;try{n=fo()}finally{if(Co=!1,e=r-wo(),!bo)return;n?t.run(1e3):e>0?t.run(e):t.start()}},vo((function(){requestAnimationFrame(n)}))}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var e=this,t=function(){return e.observer&&e.observer.observe(document.body,yo)};document.body?t():eo.addEventListener("DOMContentLoaded",t)},e.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),xo.forEach((function(t){return eo.addEventListener(t,e.listener,!0)})))},e.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),xo.forEach((function(t){return eo.removeEventListener(t,e.listener,!0)})),this.stopped=!0)},e}()),So=function(e){!bo&&e>0&&ko.start(),!(bo+=e)&&ko.stop()},Po=function(){function e(e,t){this.target=e,this.observedBox=t||jr.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var e,t=co(this.target,this.observedBox,!0);return e=this.target,Zr(e)||function(e){switch(e.tagName){case"INPUT":if("image"!==e.type)break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1}(e)||"inline"!==getComputedStyle(e).display||(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e}(),zo=function(e,t){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=t},To=new WeakMap,Mo=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},Ro=function(){function e(){}return e.connect=function(e,t){var n=new zo(e,t);To.set(e,n)},e.observe=function(e,t,n){var r=To.get(e),o=0===r.observationTargets.length;Mo(r.observationTargets,t)<0&&(o&&qr.push(r),r.observationTargets.push(new Po(t,n&&n.box)),So(1),ko.schedule())},e.unobserve=function(e,t){var n=To.get(e),r=Mo(n.observationTargets,t),o=1===n.observationTargets.length;r>=0&&(o&&qr.splice(qr.indexOf(n),1),n.observationTargets.splice(r,1),So(-1))},e.disconnect=function(e){var t=this,n=To.get(e);n.observationTargets.slice().forEach((function(n){return t.unobserve(e,n.target)})),n.activeTargets.splice(0,n.activeTargets.length)},e}(),$o=function(){function e(e){if(0===arguments.length)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if("function"!=typeof e)throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");Ro.connect(this,e)}return e.prototype.observe=function(e,t){if(0===arguments.length)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Jr(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Ro.observe(this,e,t)},e.prototype.unobserve=function(e){if(0===arguments.length)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Jr(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Ro.unobserve(this,e)},e.prototype.disconnect=function(){Ro.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}();var Fo=new class{constructor(){this.handleResize=this.handleResize.bind(this),this.observer=new("undefined"!=typeof window&&window.ResizeObserver||$o)(this.handleResize),this.elHandlersMap=new Map}handleResize(e){for(const t of e){const e=this.elHandlersMap.get(t.target);void 0!==e&&e(t)}}registerHandler(e,t){this.elHandlersMap.set(e,t),this.observer.observe(e)}unregisterHandler(e){this.elHandlersMap.has(e)&&(this.elHandlersMap.delete(e),this.observer.unobserve(e))}},Io=a({name:"ResizeObserver",props:{onResize:Function},setup(e){let t=!1;const n=l().proxy;function r(t){const{onResize:n}=e;void 0!==n&&n(t)}c((()=>{const e=n.$el;void 0!==e?e.nextElementSibling===e.nextSibling||3!==e.nodeType||""===e.nodeValue?null!==e.nextElementSibling&&(Fo.registerHandler(e.nextElementSibling,r),t=!0):Tr("resize-observer","$el can not be observed (it may be a text node)."):Tr("resize-observer","$el does not exist.")})),d((()=>{t&&Fo.unregisterHandler(n.$el.nextElementSibling)}))},render(){return C(this.$slots,"default")}});let Do,Bo;function Ao(){return"undefined"==typeof document?1:(void 0===Bo&&(Bo="chrome"in window?window.devicePixelRatio:1),Bo)}const No="VVirtualListXScroll";const Eo=a({name:"VirtualListRow",props:{index:{type:Number,required:!0},item:{type:Object,required:!0}},setup(){const{startIndexRef:e,endIndexRef:t,columnsRef:n,getLeft:r,renderColRef:o,renderItemWithColsRef:a}=i(No);return{startIndex:e,endInd