qcinfo-ui
Version:
An Amazing Vue3 UI Components Library.
17 lines (16 loc) • 303 kB
JavaScript
(function(re,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("vue"),require("@vueuse/integrations/useQRCode")):typeof define=="function"&&define.amd?define(["exports","vue","@vueuse/integrations/useQRCode"],o):(re=typeof globalThis<"u"?globalThis:re||self,o(re.Qcinfoui={},re.Vue,re.useQRCode))})(this,function(re,o,Xl){"use strict";const sv="";function Zl(e=Date.now(),t="YYYY-MM-DD HH:mm:ss"){if(typeof e=="number"||typeof e=="string")var n=new Date(e);else var n=e;function r(a){return a<10?"0"+a:String(a)}var i=t;if(i.includes("SSS")){const a=n.getMilliseconds();i=i.replace("SSS","0".repeat(3-String(a).length)+a)}if(i.includes("YY")){const a=n.getFullYear();i=i.includes("YYYY")?i.replace("YYYY",String(a)):i.replace("YY",String(a).slice(2,4))}if(i.includes("M")){const a=n.getMonth()+1;i=i.includes("MM")?i.replace("MM",r(a)):i.replace("M",String(a))}if(i.includes("D")){const a=n.getDate();i=i.includes("DD")?i.replace("DD",r(a)):i.replace("D",String(a))}if(i.includes("H")){const a=n.getHours();i=i.includes("HH")?i.replace("HH",r(a)):i.replace("H",String(a))}if(i.includes("m")){var l=n.getMinutes();i=i.includes("mm")?i.replace("mm",r(l)):i.replace("m",String(l))}if(i.includes("s")){var s=n.getSeconds();i=i.includes("ss")?i.replace("ss",r(s)):i.replace("s",String(s))}return i}const Jt=typeof window<"u"?window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame:()=>{},Xr=typeof window<"u"?window.cancelAnimationFrame||window.mozCancelAnimationFrame:()=>{};function en(e,t=0,n=!1){const r=typeof window<"u"?window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame:()=>{};var i=null;function l(a){i||(i=a),a-i>=t?(e(),n&&(i=null,s.id=r(l))):s.id=r(l)}const s={id:r(l)};return s}function In(e){const t=typeof window<"u"?window.cancelAnimationFrame||window.mozCancelAnimationFrame:()=>{};e&&e.id&&t(e.id)}function Ql(e,t=300){var n=!0;return function(){return n&&(n=!1,en(()=>{e(),n=!0},t)),!1}}function Jl(e,t=300){let n=null;return function(){n&&In(n),n=en(e,t)}}function es(e,t){const n=String(e).split(".")[1],r=String(t).split(".")[1];let i=Math.max((n==null?void 0:n.length)||0,(r==null?void 0:r.length)||0),l=e.toFixed(i),s=t.toFixed(i);return(+l.replace(".","")+ +s.replace(".",""))/Math.pow(10,i)}function ts(e,t){var n="";if(t)n=t;else{const i=e.split("?")[0].split("/");n=i[i.length-1]}var r=new XMLHttpRequest;r.open("GET",e,!0),r.responseType="blob",r.onload=function(){if(r.status===200){const i=r.response,l=document.createElement("a"),s=document.querySelector("body");l.href=window.URL.createObjectURL(i),l.download=n,l.style.display="none",s==null||s.appendChild(l),l.click(),s==null||s.removeChild(l),window.URL.revokeObjectURL(l.href)}},r.send()}function ns(e,t=2,n=","){function r(a){const c=a.length;return c<=3?a:r(a.slice(0,c-3))+n+a.slice(c-3,c)}const i=String(e);if(isFinite(parseFloat(i))){if(parseFloat(i)===0)return parseFloat(i).toFixed(t);var l="",s=i.indexOf(".");if(s===-1)t===0?l=r(i):l=r(i)+"."+"0".repeat(t);else{const a=String((Math.round(parseFloat(i)*Math.pow(10,t))/Math.pow(10,t)).toFixed(t)),c=a.slice(s,s+t+1);l=r(a.slice(0,s))+c}return l}else return"--"}const at=function(e,t){var n;return e.currentStyle?e.currentStyle[t]:(n=document.defaultView)==null?void 0:n.getComputedStyle(e,null)[t]},Ie={left:0,top:0,currentX:0,currentY:0,flag:!1},Zr=function(e,t,n){const r=document.body.clientWidth,i=document.documentElement.clientHeight,l=t.offsetWidth,s=t.offsetHeight,a=t.offsetLeft,c=t.offsetTop,d=r-a-l,h=i-c-s;at(t,"left")!=="auto"&&(Ie.left=at(t,"left")),at(t,"top")!=="auto"&&(Ie.top=at(t,"top")),e.onmousedown=function(u){Ie.flag=!0,u||(u=window.event,e.onselectstart=function(){return!1});const m=u;Ie.currentX=m.clientX,Ie.currentY=m.clientY},document.onmouseup=function(){Ie.flag=!1,at(t,"left")!=="auto"&&(Ie.left=at(t,"left")),at(t,"top")!=="auto"&&(Ie.top=at(t,"top"))},document.onmousemove=function(u){const m=u||window.event;if(Ie.flag){const g=m.clientX,f=m.clientY,y=g-Ie.currentX,v=f-Ie.currentY;let p=parseInt(Ie.left)+y,x=parseInt(Ie.top)+v;return-p>a?p=-a:p>d&&(p=d),-x>c?x=-c:x>h&&(x=h),t.style.left=p+"px",t.style.top=x+"px",typeof n=="function"&&n((parseInt(Ie.left)||0)+y,(parseInt(Ie.top)||0)+v),u.preventDefault&&u.preventDefault(),!1}}};let An=[];const Qr=new WeakMap;function os(){An.forEach(e=>e(...Qr.get(e))),An=[]}function Jr(e,...t){Qr.set(e,t),!An.includes(e)&&An.push(e)===1&&requestAnimationFrame(os)}function tn(e,t){let{target:n}=e;for(;n;){if(n.dataset&&n.dataset[t]!==void 0)return!0;n=n.parentElement}return!1}function Ft(e){return e.composedPath()[0]||null}function lt(e){return typeof e=="string"?e.endsWith("px")?Number(e.slice(0,e.length-2)):Number(e):e}function Ln(e){if(e!=null)return typeof e=="number"?`${e}px`:e.endsWith("px")?e:`${e}px`}function Dn(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 t===void 0?r:r[t]}const ei={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"},It="^\\s*",At="\\s*$",mt="\\s*((\\.\\d+)|(\\d+(\\.\\d*)?))\\s*",bt="([0-9A-Fa-f])",vt="([0-9A-Fa-f]{2})",rs=new RegExp(`${It}rgb\\s*\\(${mt},${mt},${mt}\\)${At}`),is=new RegExp(`${It}rgba\\s*\\(${mt},${mt},${mt},${mt}\\)${At}`),as=new RegExp(`${It}#${bt}${bt}${bt}${At}`),ls=new RegExp(`${It}#${vt}${vt}${vt}${At}`),ss=new RegExp(`${It}#${bt}${bt}${bt}${bt}${At}`),cs=new RegExp(`${It}#${vt}${vt}${vt}${vt}${At}`);function Le(e){return parseInt(e,16)}function yt(e){try{let t;if(t=ls.exec(e))return[Le(t[1]),Le(t[2]),Le(t[3]),1];if(t=rs.exec(e))return[_e(t[1]),_e(t[5]),_e(t[9]),1];if(t=is.exec(e))return[_e(t[1]),_e(t[5]),_e(t[9]),nn(t[13])];if(t=as.exec(e))return[Le(t[1]+t[1]),Le(t[2]+t[2]),Le(t[3]+t[3]),1];if(t=cs.exec(e))return[Le(t[1]),Le(t[2]),Le(t[3]),nn(Le(t[4])/255)];if(t=ss.exec(e))return[Le(t[1]+t[1]),Le(t[2]+t[2]),Le(t[3]+t[3]),nn(Le(t[4]+t[4])/255)];if(e in ei)return yt(ei[e]);throw new Error(`[seemly/rgba]: Invalid color value ${e}.`)}catch(t){throw t}}function ds(e){return e>1?1:e<0?0:e}function $o(e,t,n,r){return`rgba(${_e(e)}, ${_e(t)}, ${_e(n)}, ${ds(r)})`}function To(e,t,n,r,i){return _e((e*t*(1-r)+n*r)/i)}function Po(e,t){Array.isArray(e)||(e=yt(e)),Array.isArray(t)||(t=yt(t));const n=e[3],r=t[3],i=nn(n+r-n*r);return $o(To(e[0],n,t[0],r,i),To(e[1],n,t[1],r,i),To(e[2],n,t[2],r,i),i)}function ie(e,t){const[n,r,i,l=1]=Array.isArray(e)?e:yt(e);return t.alpha?$o(n,r,i,t.alpha):$o(n,r,i,l)}function Nn(e,t){const[n,r,i,l=1]=Array.isArray(e)?e:yt(e),{lightness:s=1,alpha:a=1}=t;return us([n*s,r*s,i*s,l*a])}function nn(e){const t=Math.round(Number(e)*100)/100;return t>1?1:t<0?0:t}function _e(e){const t=Math.round(Number(e));return t>255?255:t<0?0:t}function us(e){const[t,n,r]=e;return 3 in e?`rgba(${_e(t)}, ${_e(n)}, ${_e(r)}, ${nn(e[3])})`:`rgba(${_e(t)}, ${_e(n)}, ${_e(r)}, 1)`}function ti(e=8){return Math.random().toString(16).slice(2,2+e)}function Hn(e,t=[],n){const r={};return t.forEach(i=>{r[i]=e[i]}),Object.assign(r,n)}function Mo(e,t=!0,n=[]){return e.forEach(r=>{if(r!==null){if(typeof r!="object"){(typeof r=="string"||typeof r=="number")&&n.push(o.createTextVNode(String(r)));return}if(Array.isArray(r)){Mo(r,t,n);return}if(r.type===o.Fragment){if(r.children===null)return;Array.isArray(r.children)&&Mo(r.children,t,n)}else r.type!==o.Comment&&n.push(r)}}),n}function ce(e,...t){if(Array.isArray(e))e.forEach(n=>ce(n,...t));else return e(...t)}function Ro(e){return Object.keys(e)}const He=(e,...t)=>typeof e=="function"?e(...t):typeof e=="string"?o.createTextVNode(e):typeof e=="number"?o.createTextVNode(String(e)):null,ni=new Set;function Ae(e,t){const n=`[naive/${e}]: ${t}`;ni.has(n)||(ni.add(n),console.error(n))}function zo(e,t){console.error(`[naive/${e}]: ${t}`)}function oi(e,t){throw new Error(`[naive/${e}]: ${t}`)}function fs(e){switch(typeof e){case"string":return e||void 0;case"number":return String(e);default:return}}function _o(e,t="default",n=void 0){const r=e[t];if(!r)return zo("getFirstSlotVNode",`slot[${t}] is empty`),null;const i=Mo(r(n));return i.length===1?i[0]:(zo("getFirstSlotVNode",`slot[${t}] should have exactly one child`),null)}function cv(e){return e}function jn(e){return e.some(t=>o.isVNode(t)?!(t.type===o.Comment||t.type===o.Fragment&&!jn(t.children)):!0)?e:null}function xt(e,t){return e&&jn(e())||t()}function Re(e,t){const n=e&&jn(e());return t(n||null)}function Eo(e){return!(e&&jn(e()))}function Bo(e){const t=e.filter(n=>n!==void 0);if(t.length!==0)return t.length===1?t[0]:n=>{e.forEach(r=>{r&&r(n)})}}const Oo=o.defineComponent({render(){var e,t;return(t=(e=this.$slots).default)===null||t===void 0?void 0:t.call(e)}}),hs=/^(\d|\.)+$/,ri=/(\d|\.)+/;function Fo(e,{c:t=1,offset:n=0,attachPx:r=!0}={}){if(typeof e=="number"){const i=(e+n)*t;return i===0?"0":`${i}px`}else if(typeof e=="string")if(hs.test(e)){const i=(Number(e)+n)*t;return r?i===0?"0":`${i}px`:`${i}`}else{const i=ri.exec(e);return i?e.replace(ri,String((Number(i[0])+n)*t)):e}return e}function Wn(e){return e.replace(/#|\(|\)|,|\s/g,"_")}function ps(e){let t=0;for(let n=0;n<e.length;++n)e[n]==="&"&&++t;return t}const ii=/\s*,(?![^(]*\))\s*/g,gs=/\s+/g;function ms(e,t){const n=[];return t.split(ii).forEach(r=>{let i=ps(r);if(i){if(i===1){e.forEach(s=>{n.push(r.replace("&",s))});return}}else{e.forEach(s=>{n.push((s&&s+" ")+r)});return}let l=[r];for(;i--;){const s=[];l.forEach(a=>{e.forEach(c=>{s.push(a.replace("&",c))})}),l=s}l.forEach(s=>n.push(s))}),n}function bs(e,t){const n=[];return t.split(ii).forEach(r=>{e.forEach(i=>{n.push((i&&i+" ")+r)})}),n}function vs(e){let t=[""];return e.forEach(n=>{n=n&&n.trim(),n&&(n.includes("&")?t=ms(t,n):t=bs(t,n))}),t.join(", ").replace(gs," ")}function ai(e){if(!e)return;const t=e.parentElement;t&&t.removeChild(e)}function Vn(e){return document.querySelector(`style[cssr-id="${e}"]`)}function ys(e){const t=document.createElement("style");return t.setAttribute("cssr-id",e),t}function Kn(e){return e?/^\s*@(s|m)/.test(e):!1}const xs=/[A-Z]/g;function li(e){return e.replace(xs,t=>"-"+t.toLowerCase())}function ws(e,t=" "){return typeof e=="object"&&e!==null?` {
`+Object.entries(e).map(n=>t+` ${li(n[0])}: ${n[1]};`).join(`
`)+`
`+t+"}":`: ${e};`}function Cs(e,t,n){return typeof e=="function"?e({context:t.context,props:n}):e}function si(e,t,n,r){if(!t)return"";const i=Cs(t,n,r);if(!i)return"";if(typeof i=="string")return`${e} {
${i}
}`;const l=Object.keys(i);if(l.length===0)return n.config.keepEmptyBlock?e+` {
}`:"";const s=e?[e+" {"]:[];return l.forEach(a=>{const c=i[a];if(a==="raw"){s.push(`
`+c+`
`);return}a=li(a),c!=null&&s.push(` ${a}${ws(c)}`)}),e&&s.push("}"),s.join(`
`)}function Io(e,t,n){e&&e.forEach(r=>{if(Array.isArray(r))Io(r,t,n);else if(typeof r=="function"){const i=r(t);Array.isArray(i)?Io(i,t,n):i&&n(i)}else r&&n(r)})}function ci(e,t,n,r,i,l){const s=e.$;let a="";if(!s||typeof s=="string")Kn(s)?a=s:t.push(s);else if(typeof s=="function"){const h=s({context:r.context,props:i});Kn(h)?a=h:t.push(h)}else if(s.before&&s.before(r.context),!s.$||typeof s.$=="string")Kn(s.$)?a=s.$:t.push(s.$);else if(s.$){const h=s.$({context:r.context,props:i});Kn(h)?a=h:t.push(h)}const c=vs(t),d=si(c,e.props,r,i);a?(n.push(`${a} {`),l&&d&&l.insertRule(`${a} {
${d}
}
`)):(l&&d&&l.insertRule(d),!l&&d.length&&n.push(d)),e.children&&Io(e.children,{context:r.context,props:i},h=>{if(typeof h=="string"){const u=si(c,{raw:h},r,i);l?l.insertRule(u):n.push(u)}else ci(h,t,n,r,i,l)}),t.pop(),a&&n.push("}"),s&&s.after&&s.after(r.context)}function di(e,t,n,r=!1){const i=[];return ci(e,[],i,t,n,r?e.instance.__styleSheet:void 0),r?"":i.join(`
`)}function Ao(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}typeof window<"u"&&(window.__cssrContext={});function Ss(e,t,n){const{els:r}=t;if(n===void 0)r.forEach(ai),t.els=[];else{const i=Vn(n);i&&r.includes(i)&&(ai(i),t.els=r.filter(l=>l!==i))}}function ui(e,t){e.push(t)}function ks(e,t,n,r,i,l,s,a,c){if(l&&!c){if(n===void 0){console.error("[css-render/mount]: `id` is required in `silent` mode.");return}const m=window.__cssrContext;m[n]||(m[n]=!0,di(t,e,r,l));return}let d;if(n===void 0&&(d=t.render(r),n=Ao(d)),c){c.adapter(n,d??t.render(r));return}const h=Vn(n);if(h!==null&&!s)return h;const u=h??ys(n);if(d===void 0&&(d=t.render(r)),u.textContent=d,h!==null)return h;if(a){const m=document.head.querySelector(`meta[name="${a}"]`);if(m)return document.head.insertBefore(u,m),ui(t.els,u),u}return i?document.head.insertBefore(u,document.head.querySelector("style, link")):document.head.appendChild(u),ui(t.els,u),u}function $s(e){return di(this,this.instance,e)}function Ts(e={}){const{id:t,ssr:n,props:r,head:i=!1,silent:l=!1,force:s=!1,anchorMetaName:a}=e;return ks(this.instance,this,t,r,i,l,s,a,n)}function Ps(e={}){const{id:t}=e;Ss(this.instance,this,t)}const Un=function(e,t,n,r){return{instance:e,$:t,props:n,children:r,els:[],render:$s,mount:Ts,unmount:Ps}},Ms=function(e,t,n,r){return Array.isArray(t)?Un(e,{$:null},null,t):Array.isArray(n)?Un(e,t,null,n):Array.isArray(r)?Un(e,t,n,r):Un(e,t,n,null)};function fi(e={}){let t=null;const n={c:(...r)=>Ms(n,...r),use:(r,...i)=>r.install(n,...i),find:Vn,context:{},config:e,get __styleSheet(){if(!t){const r=document.createElement("style");return document.head.appendChild(r),t=document.styleSheets[document.styleSheets.length-1],t}return t}};return n}function Rs(e,t){if(e===void 0)return!1;if(t){const{context:{ids:n}}=t;return n.has(e)}return Vn(e)!==null}function zs(e){let t=".",n="__",r="--",i;if(e){let f=e.blockPrefix;f&&(t=f),f=e.elementPrefix,f&&(n=f),f=e.modifierPrefix,f&&(r=f)}const l={install(f){i=f.c;const y=f.context;y.bem={},y.bem.b=null,y.bem.els=null}};function s(f){let y,v;return{before(p){y=p.bem.b,v=p.bem.els,p.bem.els=null},after(p){p.bem.b=y,p.bem.els=v},$({context:p,props:x}){return f=typeof f=="string"?f:f({context:p,props:x}),p.bem.b=f,`${(x==null?void 0:x.bPrefix)||t}${p.bem.b}`}}}function a(f){let y;return{before(v){y=v.bem.els},after(v){v.bem.els=y},$({context:v,props:p}){return f=typeof f=="string"?f:f({context:v,props:p}),v.bem.els=f.split(",").map(x=>x.trim()),v.bem.els.map(x=>`${(p==null?void 0:p.bPrefix)||t}${v.bem.b}${n}${x}`).join(", ")}}}function c(f){return{$({context:y,props:v}){f=typeof f=="string"?f:f({context:y,props:v});const p=f.split(",").map(w=>w.trim());function x(w){return p.map(C=>`&${(v==null?void 0:v.bPrefix)||t}${y.bem.b}${w!==void 0?`${n}${w}`:""}${r}${C}`).join(", ")}const z=y.bem.els;if(z!==null){if(process.env.NODE_ENV!=="production"&&z.length>=2)throw Error(`[css-render/plugin-bem]: m(${f}) is invalid, using modifier inside multiple elements is not allowed`);return x(z[0])}else return x()}}}function d(f){return{$({context:y,props:v}){f=typeof f=="string"?f:f({context:y,props:v});const p=y.bem.els;if(process.env.NODE_ENV!=="production"&&p!==null&&p.length>=2)throw Error(`[css-render/plugin-bem]: notM(${f}) is invalid, using modifier inside multiple elements is not allowed`);return`&:not(${(v==null?void 0:v.bPrefix)||t}${y.bem.b}${p!==null&&p.length>0?`${n}${p[0]}`:""}${r}${f})`}}}return Object.assign(l,{cB:(...f)=>i(s(f[0]),f[1],f[2]),cE:(...f)=>i(a(f[0]),f[1],f[2]),cM:(...f)=>i(c(f[0]),f[1],f[2]),cNotM:(...f)=>i(d(f[0]),f[1],f[2])}),l}function K(e,t){return e+(t==="default"?"":t.replace(/^[a-z]/,n=>n.toUpperCase()))}K("abc","def");const on=".n-",_s="__",Es="--",hi=fi(),pi=zs({blockPrefix:on,elementPrefix:_s,modifierPrefix:Es});hi.use(pi);const{c:E,find:uv}=hi,{cB:F,cE:B,cM:V,cNotM:De}=pi;function Lo(e){return E(({props:{bPrefix:t}})=>`${t||on}modal, ${t||on}drawer`,[e])}function gi(e){return E(({props:{bPrefix:t}})=>`${t||on}popover`,[e])}function mi(e){return E(({props:{bPrefix:t}})=>`&${t||on}modal`,e)}const Bs=(...e)=>E(">",[F(...e)]);let Do;function Os(){return Do===void 0&&(Do=navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom")),Do}const rn=typeof document<"u"&&typeof window<"u",bi=new WeakSet;function Fs(e){bi.add(e)}function Is(e){return!bi.has(e)}function As(e){const t=o.ref(!!e.value);if(t.value)return o.readonly(t);const n=o.watch(e,r=>{r&&(t.value=!0,n())});return o.readonly(t)}function Ee(e){const t=o.computed(e),n=o.ref(t.value);return o.watch(t,r=>{n.value=r}),typeof e=="function"?n:{__v_isRef:!0,get value(){return n.value},set value(r){e.set(r)}}}function vi(){return o.getCurrentInstance()!==null}const No=typeof window<"u";let Lt,an;(()=>{var e,t;Lt=No?(t=(e=document)===null||e===void 0?void 0:e.fonts)===null||t===void 0?void 0:t.ready:void 0,an=!1,Lt!==void 0?Lt.then(()=>{an=!0}):an=!0})();function Ls(e){if(an)return;let t=!1;o.onMounted(()=>{an||Lt==null||Lt.then(()=>{t||e()})}),o.onBeforeUnmount(()=>{t=!0})}function Gn(e){return e.composedPath()[0]}const Ds={mousemoveoutside:new WeakMap,clickoutside:new WeakMap};function Ns(e,t,n){if(e==="mousemoveoutside"){const r=i=>{t.contains(Gn(i))||n(i)};return{mousemove:r,touchstart:r}}else if(e==="clickoutside"){let r=!1;const i=s=>{r=!t.contains(Gn(s))},l=s=>{r&&(t.contains(Gn(s))||n(s))};return{mousedown:i,mouseup:l,touchstart:i,touchend:l}}return console.error(`[evtd/create-trap-handler]: name \`${e}\` is invalid. This could be a bug of evtd.`),{}}function yi(e,t,n){const r=Ds[e];let i=r.get(t);i===void 0&&r.set(t,i=new WeakMap);let l=i.get(n);return l===void 0&&i.set(n,l=Ns(e,t,n)),l}function Hs(e,t,n,r){if(e==="mousemoveoutside"||e==="clickoutside"){const i=yi(e,t,n);return Object.keys(i).forEach(l=>{ke(l,document,i[l],r)}),!0}return!1}function js(e,t,n,r){if(e==="mousemoveoutside"||e==="clickoutside"){const i=yi(e,t,n);return Object.keys(i).forEach(l=>{xe(l,document,i[l],r)}),!0}return!1}function Ws(){if(typeof window>"u")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 i(b,k,R){const $=b[k];return b[k]=function(){return R.apply(b,arguments),$.apply(b,arguments)},b}function l(b,k){b[k]=Event.prototype[k]}const s=new WeakMap,a=Object.getOwnPropertyDescriptor(Event.prototype,"currentTarget");function c(){var b;return(b=s.get(this))!==null&&b!==void 0?b:null}function d(b,k){a!==void 0&&Object.defineProperty(b,"currentTarget",{configurable:!0,enumerable:!0,get:k??a.get})}const h={bubble:{},capture:{}},u={};function m(){const b=function(k){const{type:R,eventPhase:$,bubbles:P}=k,M=Gn(k);if($===2)return;const D=$===1?"capture":"bubble";let O=M;const N=[];for(;O===null&&(O=window),N.push(O),O!==window;)O=O.parentNode||null;const W=h.capture[R],j=h.bubble[R];if(i(k,"stopPropagation",n),i(k,"stopImmediatePropagation",r),d(k,c),D==="capture"){if(W===void 0)return;for(let Y=N.length-1;Y>=0&&!e.has(k);--Y){const _=N[Y],L=W.get(_);if(L!==void 0){s.set(k,_);for(const q of L){if(t.has(k))break;q(k)}}if(Y===0&&!P&&j!==void 0){const q=j.get(_);if(q!==void 0)for(const ne of q){if(t.has(k))break;ne(k)}}}}else if(D==="bubble"){if(j===void 0)return;for(let Y=0;Y<N.length&&!e.has(k);++Y){const _=N[Y],L=j.get(_);if(L!==void 0){s.set(k,_);for(const q of L){if(t.has(k))break;q(k)}}}}l(k,"stopPropagation"),l(k,"stopImmediatePropagation"),d(k)};return b.displayName="evtdUnifiedHandler",b}function g(){const b=function(k){const{type:R,eventPhase:$}=k;if($!==2)return;const P=u[R];P!==void 0&&P.forEach(M=>M(k))};return b.displayName="evtdUnifiedWindowEventHandler",b}const f=m(),y=g();function v(b,k){const R=h[b];return R[k]===void 0&&(R[k]=new Map,window.addEventListener(k,f,b==="capture")),R[k]}function p(b){return u[b]===void 0&&(u[b]=new Set,window.addEventListener(b,y)),u[b]}function x(b,k){let R=b.get(k);return R===void 0&&b.set(k,R=new Set),R}function z(b,k,R,$){const P=h[k][R];if(P!==void 0){const M=P.get(b);if(M!==void 0&&M.has($))return!0}return!1}function w(b,k){const R=u[b];return!!(R!==void 0&&R.has(k))}function C(b,k,R,$){let P;if(typeof $=="object"&&$.once===!0?P=W=>{S(b,k,P,$),R(W)}:P=R,Hs(b,k,P,$))return;const D=$===!0||typeof $=="object"&&$.capture===!0?"capture":"bubble",O=v(D,b),N=x(O,k);if(N.has(P)||N.add(P),k===window){const W=p(b);W.has(P)||W.add(P)}}function S(b,k,R,$){if(js(b,k,R,$))return;const M=$===!0||typeof $=="object"&&$.capture===!0,D=M?"capture":"bubble",O=v(D,b),N=x(O,k);if(k===window&&!z(k,M?"bubble":"capture",b,R)&&w(b,R)){const j=u[b];j.delete(R),j.size===0&&(window.removeEventListener(b,y),u[b]=void 0)}N.has(R)&&N.delete(R),N.size===0&&O.delete(k),O.size===0&&(window.removeEventListener(b,f,D==="capture"),h[D][b]=void 0)}return{on:C,off:S}}const{on:ke,off:xe}=Ws(),ln=o.ref(null);function xi(e){if(e.clientX>0||e.clientY>0)ln.value={x:e.clientX,y:e.clientY};else{const{target:t}=e;if(t instanceof Element){const{left:n,top:r,width:i,height:l}=t.getBoundingClientRect();n>0||r>0?ln.value={x:n+i/2,y:r+l/2}:ln.value={x:0,y:0}}else ln.value=null}}let qn=0,wi=!0;function Vs(){if(!No)return o.readonly(o.ref(null));qn===0&&ke("click",document,xi,!0);const e=()=>{qn+=1};return wi&&(wi=vi())?(o.onBeforeMount(e),o.onBeforeUnmount(()=>{qn-=1,qn===0&&xe("click",document,xi,!0)})):e(),o.readonly(ln)}const Ks=o.ref(void 0);let Yn=0;function Ci(){Ks.value=Date.now()}let Si=!0;function Us(e){if(!No)return o.readonly(o.ref(!1));const t=o.ref(!1);let n=null;function r(){n!==null&&window.clearTimeout(n)}function i(){r(),t.value=!0,n=window.setTimeout(()=>{t.value=!1},e)}Yn===0&&ke("click",window,Ci,!0);const l=()=>{Yn+=1,ke("click",window,i,!0)};return Si&&(Si=vi())?(o.onBeforeMount(l),o.onBeforeUnmount(()=>{Yn-=1,Yn===0&&xe("click",window,Ci,!0),xe("click",window,i,!0),r()})):l(),o.readonly(t)}function sn(e,t){return o.watch(e,n=>{n!==void 0&&(t.value=n)}),o.computed(()=>e.value===void 0?t.value:e.value)}function cn(){const e=o.ref(!1);return o.onMounted(()=>{e.value=!0}),o.readonly(e)}function Gs(e,t){return o.computed(()=>{for(const n of t)if(e[n]!==void 0)return e[n];return e[t[t.length-1]]})}const qs=(typeof window>"u"?!1:/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1)&&!window.MSStream;function Ys(){return qs}const Ho="n-internal-select-menu",ki="n-internal-select-menu-body",jo="n-modal-body",$i="n-modal",Wo="n-drawer-body",Vo="n-popover-body",Ti="__disabled__";function Ze(e){const t=o.inject(jo,null),n=o.inject(Wo,null),r=o.inject(Vo,null),i=o.inject(ki,null),l=o.ref();if(typeof document<"u"){l.value=document.fullscreenElement;const s=()=>{l.value=document.fullscreenElement};o.onMounted(()=>{ke("fullscreenchange",document,s)}),o.onBeforeUnmount(()=>{xe("fullscreenchange",document,s)})}return Ee(()=>{var s;const{to:a}=e;return a!==void 0?a===!1?Ti:a===!0?l.value||"body":a:t!=null&&t.value?(s=t.value.$el)!==null&&s!==void 0?s:t.value:n!=null&&n.value?n.value:r!=null&&r.value?r.value:i!=null&&i.value?i.value:a??(l.value||"body")})}Ze.tdkey=Ti,Ze.propTo={type:[String,Object,Boolean],default:void 0};function Ko(e,t,n="default"){const r=t[n];if(r===void 0)throw new Error(`[vueuc/${e}]: slot[${n}] is empty.`);return r()}function Uo(e,t=!0,n=[]){return e.forEach(r=>{if(r!==null){if(typeof r!="object"){(typeof r=="string"||typeof r=="number")&&n.push(o.createTextVNode(String(r)));return}if(Array.isArray(r)){Uo(r,t,n);return}if(r.type===o.Fragment){if(r.children===null)return;Array.isArray(r.children)&&Uo(r.children,t,n)}else r.type!==o.Comment&&n.push(r)}}),n}function Pi(e,t,n="default"){const r=t[n];if(r===void 0)throw new Error(`[vueuc/${e}]: slot[${n}] is empty.`);const i=Uo(r());if(i.length===1)return i[0];throw new Error(`[vueuc/${e}]: slot[${n}] should have exactly one child.`)}let st=null;function Mi(){if(st===null&&(st=document.getElementById("v-binder-view-measurer"),st===null)){st=document.createElement("div"),st.id="v-binder-view-measurer";const{style:e}=st;e.position="fixed",e.left="0",e.right="0",e.top="0",e.bottom="0",e.pointerEvents="none",e.visibility="hidden",document.body.appendChild(st)}return st.getBoundingClientRect()}function Xs(e,t){const n=Mi();return{top:t,left:e,height:0,width:0,right:n.width-e,bottom:n.height-t}}function Go(e){const t=e.getBoundingClientRect(),n=Mi();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 Zs(e){return e.nodeType===9?null:e.parentNode}function Ri(e){if(e===null)return null;const t=Zs(e);if(t===null)return null;if(t.nodeType===9)return document;if(t.nodeType===1){const{overflow:n,overflowX:r,overflowY:i}=getComputedStyle(t);if(/(auto|scroll|overlay)/.test(n+i+r))return t}return Ri(t)}const zi=o.defineComponent({name:"Binder",props:{syncTargetWithParent:Boolean,syncTarget:{type:Boolean,default:!0}},setup(e){var t;o.provide("VBinder",(t=o.getCurrentInstance())===null||t===void 0?void 0:t.proxy);const n=o.inject("VBinder",null),r=o.ref(null),i=p=>{r.value=p,n&&e.syncTargetWithParent&&n.setTargetRef(p)};let l=[];const s=()=>{let p=r.value;for(;p=Ri(p),p!==null;)l.push(p);for(const x of l)ke("scroll",x,u,!0)},a=()=>{for(const p of l)xe("scroll",p,u,!0);l=[]},c=new Set,d=p=>{c.size===0&&s(),c.has(p)||c.add(p)},h=p=>{c.has(p)&&c.delete(p),c.size===0&&a()},u=()=>{Jr(m)},m=()=>{c.forEach(p=>p())},g=new Set,f=p=>{g.size===0&&ke("resize",window,v),g.has(p)||g.add(p)},y=p=>{g.has(p)&&g.delete(p),g.size===0&&xe("resize",window,v)},v=()=>{g.forEach(p=>p())};return o.onBeforeUnmount(()=>{xe("resize",window,v),a()}),{targetRef:r,setTargetRef:i,addScrollListener:d,removeScrollListener:h,addResizeListener:f,removeResizeListener:y}},render(){return Ko("binder",this.$slots)}}),_i=o.defineComponent({name:"Target",setup(){const{setTargetRef:e,syncTarget:t}=o.inject("VBinder");return{syncTarget:t,setTargetDirective:{mounted:e,updated:e}}},render(){const{syncTarget:e,setTargetDirective:t}=this;return e?o.withDirectives(Pi("follower",this.$slots),[[t]]):Pi("follower",this.$slots)}}),Dt="@@mmoContext",Qs={mounted(e,{value:t}){e[Dt]={handler:void 0},typeof t=="function"&&(e[Dt].handler=t,ke("mousemoveoutside",e,t))},updated(e,{value:t}){const n=e[Dt];typeof t=="function"?n.handler?n.handler!==t&&(xe("mousemoveoutside",e,n.handler),n.handler=t,ke("mousemoveoutside",e,t)):(e[Dt].handler=t,ke("mousemoveoutside",e,t)):n.handler&&(xe("mousemoveoutside",e,n.handler),n.handler=void 0)},unmounted(e){const{handler:t}=e[Dt];t&&xe("mousemoveoutside",e,t),e[Dt].handler=void 0}},Nt="@@coContext",dn={mounted(e,{value:t,modifiers:n}){e[Nt]={handler:void 0},typeof t=="function"&&(e[Nt].handler=t,ke("clickoutside",e,t,{capture:n.capture}))},updated(e,{value:t,modifiers:n}){const r=e[Nt];typeof t=="function"?r.handler?r.handler!==t&&(xe("clickoutside",e,r.handler,{capture:n.capture}),r.handler=t,ke("clickoutside",e,t,{capture:n.capture})):(e[Nt].handler=t,ke("clickoutside",e,t,{capture:n.capture})):r.handler&&(xe("clickoutside",e,r.handler,{capture:n.capture}),r.handler=void 0)},unmounted(e,{modifiers:t}){const{handler:n}=e[Nt];n&&xe("clickoutside",e,n,{capture:t.capture}),e[Nt].handler=void 0}};function Js(e,t){console.error(`[vdirs/${e}]: ${t}`)}class ec{constructor(){this.elementZIndex=new Map,this.nextZIndex=2e3}get elementCount(){return this.elementZIndex.size}ensureZIndex(t,n){const{elementZIndex:r}=this;if(n!==void 0){t.style.zIndex=`${n}`,r.delete(t);return}const{nextZIndex:i}=this;r.has(t)&&r.get(t)+1===this.nextZIndex||(t.style.zIndex=`${i}`,r.set(t,i),this.nextZIndex=i+1,this.squashState())}unregister(t,n){const{elementZIndex:r}=this;r.has(t)?r.delete(t):n===void 0&&Js("z-index-manager/unregister-element","Element not found when unregistering."),this.squashState()}squashState(){const{elementCount:t}=this;t||(this.nextZIndex=2e3),this.nextZIndex-t>2500&&this.rearrange()}rearrange(){const t=Array.from(this.elementZIndex.entries());t.sort((n,r)=>n[1]-r[1]),this.nextZIndex=2e3,t.forEach(n=>{const r=n[0],i=this.nextZIndex++;`${i}`!==r.style.zIndex&&(r.style.zIndex=`${i}`)})}}const qo=new ec,Ht="@@ziContext",Yo={mounted(e,t){const{value:n={}}=t,{zIndex:r,enabled:i}=n;e[Ht]={enabled:!!i,initialized:!1},i&&(qo.ensureZIndex(e,r),e[Ht].initialized=!0)},updated(e,t){const{value:n={}}=t,{zIndex:r,enabled:i}=n,l=e[Ht].enabled;i&&!l&&(qo.ensureZIndex(e,r),e[Ht].initialized=!0),e[Ht].enabled=!!i},unmounted(e,t){if(!e[Ht].initialized)return;const{value:n={}}=t,{zIndex:r}=n;qo.unregister(e,r)}},Ei=Symbol("@css-render/vue3-ssr");function tc(e,t){return`<style cssr-id="${e}">
${t}
</style>`}function nc(e,t){const n=o.inject(Ei,null);if(n===null){console.error("[css-render/vue3-ssr]: no ssr context found.");return}const{styles:r,ids:i}=n;i.has(e)||r!==null&&(i.add(e),r.push(tc(e,t)))}const oc=typeof document<"u";function wt(){if(oc)return;const e=o.inject(Ei,null);if(e!==null)return{adapter:nc,context:e}}function Bi(e,t){console.error(`[vueuc/${e}]: ${t}`)}const{c:ct}=fi(),Xo="vueuc-style";function Oi(e){return e&-e}class rc{constructor(t,n){this.l=t,this.min=n;const r=new Array(t+1);for(let i=0;i<t+1;++i)r[i]=0;this.ft=r}add(t,n){if(n===0)return;const{l:r,ft:i}=this;for(t+=1;t<=r;)i[t]+=n,t+=Oi(t)}get(t){return this.sum(t+1)-this.sum(t)}sum(t){if(t===void 0&&(t=this.l),t<=0)return 0;const{ft:n,min:r,l:i}=this;if(t>i)throw new Error("[FinweckTree.sum]: `i` is larger than length.");let l=t*r;for(;t>0;)l+=n[t],t-=Oi(t);return l}getBound(t){let n=0,r=this.l;for(;r>n;){const i=Math.floor((n+r)/2),l=this.sum(i);if(l>t){r=i;continue}else if(l<t){if(n===i)return this.sum(n+1)<=t?n+1:i;n=i}else return i}return n}}function Fi(e){return typeof e=="string"?document.querySelector(e):e()}const Ii=o.defineComponent({name:"LazyTeleport",props:{to:{type:[String,Object],default:void 0},disabled:Boolean,show:{type:Boolean,required:!0}},setup(e){return{showTeleport:As(o.toRef(e,"show")),mergedTo:o.computed(()=>{const{to:t}=e;return t??"body"})}},render(){return this.showTeleport?this.disabled?Ko("lazy-teleport",this.$slots):o.h(o.Teleport,{disabled:this.disabled,to:this.mergedTo},Ko("lazy-teleport",this.$slots)):null}}),Xn={top:"bottom",bottom:"top",left:"right",right:"left"},Ai={start:"end",center:"center",end:"start"},Zo={top:"height",bottom:"height",left:"width",right:"width"},ic={"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"},ac={"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"},lc={"bottom-start":"right","bottom-end":"left","top-start":"right","top-end":"left","right-start":"bottom","right-end":"top","left-start":"bottom","left-end":"top"},Li={top:!0,bottom:!1,left:!0,right:!1},Di={top:"end",bottom:"start",left:"end",right:"start"};function sc(e,t,n,r,i,l){if(!i||l)return{placement:e,top:0,left:0};const[s,a]=e.split("-");let c=a??"center",d={top:0,left:0};const h=(g,f,y)=>{let v=0,p=0;const x=n[g]-t[f]-t[g];return x>0&&r&&(y?p=Li[f]?x:-x:v=Li[f]?x:-x),{left:v,top:p}},u=s==="left"||s==="right";if(c!=="center"){const g=lc[e],f=Xn[g],y=Zo[g];if(n[y]>t[y]){if(t[g]+t[y]<n[y]){const v=(n[y]-t[y])/2;t[g]<v||t[f]<v?t[g]<t[f]?(c=Ai[a],d=h(y,f,u)):d=h(y,g,u):c="center"}}else n[y]<t[y]&&t[f]<0&&t[g]>t[f]&&(c=Ai[a])}else{const g=s==="bottom"||s==="top"?"left":"top",f=Xn[g],y=Zo[g],v=(n[y]-t[y])/2;(t[g]<v||t[f]<v)&&(t[g]>t[f]?(c=Di[g],d=h(y,g,u)):(c=Di[f],d=h(y,f,u)))}let m=s;return t[s]<n[Zo[s]]&&t[s]<t[Xn[s]]&&(m=Xn[s]),{placement:c!=="center"?`${m}-${c}`:m,left:d.left,top:d.top}}function cc(e,t){return t?ac[e]:ic[e]}function dc(e,t,n,r,i,l){if(l)switch(e){case"bottom-start":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":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":return{top:`${Math.round(n.top-t.top)}px`,left:`${Math.round(n.left-t.left)}px`,transform:""};case"top-end":return{top:`${Math.round(n.top-t.top)}px`,left:`${Math.round(n.left-t.left+n.width)}px`,transform:"translateX(-100%)"};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"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"left-start":return{top:`${Math.round(n.top-t.top)}px`,left:`${Math.round(n.left-t.left)}px`,transform:""};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"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%)"};case"bottom":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+i)}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+i)}px`,transform:"translateX(-100%)"};case"top-start":return{top:`${Math.round(n.top-t.top+r)}px`,left:`${Math.round(n.left-t.left+i)}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+i)}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+i)}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+i)}px`,transform:"translateY(-100%)"};case"left-start":return{top:`${Math.round(n.top-t.top+r)}px`,left:`${Math.round(n.left-t.left+i)}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+i)}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+i)}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+i)}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+i)}px`,transform:"translateY(-50%) translateX(-100%)"};case"bottom":default:return{top:`${Math.round(n.top-t.top+n.height+r)}px`,left:`${Math.round(n.left-t.left+n.width/2+i)}px`,transform:"translateX(-50%)"}}}const uc=ct([ct(".v-binder-follower-container",{position:"absolute",left:"0",right:"0",top:"0",height:"0",pointerEvents:"none",zIndex:"auto"}),ct(".v-binder-follower-content",{position:"absolute",zIndex:"auto"},[ct("> *",{pointerEvents:"all"})])]),Qo=o.defineComponent({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=o.inject("VBinder"),n=Ee(()=>e.enabled!==void 0?e.enabled:e.show),r=o.ref(null),i=o.ref(null),l=()=>{const{syncTrigger:m}=e;m.includes("scroll")&&t.addScrollListener(c),m.includes("resize")&&t.addResizeListener(c)},s=()=>{t.removeScrollListener(c),t.removeResizeListener(c)};o.onMounted(()=>{n.value&&(c(),l())});const a=wt();uc.mount({id:"vueuc/binder",head:!0,anchorMetaName:Xo,ssr:a}),o.onBeforeUnmount(()=>{s()}),Ls(()=>{n.value&&c()});const c=()=>{if(!n.value)return;const m=r.value;if(m===null)return;const g=t.targetRef,{x:f,y,overlap:v}=e,p=f!==void 0&&y!==void 0?Xs(f,y):Go(g);m.style.setProperty("--v-target-width",`${Math.round(p.width)}px`),m.style.setProperty("--v-target-height",`${Math.round(p.height)}px`);const{width:x,minWidth:z,placement:w,internalShift:C,flip:S}=e;m.setAttribute("v-placement",w),v?m.setAttribute("v-overlap",""):m.removeAttribute("v-overlap");const{style:b}=m;x==="target"?b.width=`${p.width}px`:x!==void 0?b.width=x:b.width="",z==="target"?b.minWidth=`${p.width}px`:z!==void 0?b.minWidth=z:b.minWidth="";const k=Go(m),R=Go(i.value),{left:$,top:P,placement:M}=sc(w,p,k,C,S,v),D=cc(M,v),{left:O,top:N,transform:W}=dc(M,R,p,P,$,v);m.setAttribute("v-placement",M),m.style.setProperty("--v-offset-left",`${Math.round($)}px`),m.style.setProperty("--v-offset-top",`${Math.round(P)}px`),m.style.transform=`translateX(${O}) translateY(${N}) ${W}`,m.style.setProperty("--v-transform-origin",D),m.style.transformOrigin=D};o.watch(n,m=>{m?(l(),d()):s()});const d=()=>{o.nextTick().then(c).catch(m=>console.error(m))};["placement","x","y","internalShift","flip","width","overlap","minWidth"].forEach(m=>{o.watch(o.toRef(e,m),c)}),["teleportDisabled"].forEach(m=>{o.watch(o.toRef(e,m),d)}),o.watch(o.toRef(e,"syncTrigger"),m=>{m.includes("resize")?t.addResizeListener(c):t.removeResizeListener(c),m.includes("scroll")?t.addScrollListener(c):t.removeScrollListener(c)});const h=cn(),u=Ee(()=>{const{to:m}=e;if(m!==void 0)return m;h.value});return{VBinder:t,mergedEnabled:n,offsetContainerRef:i,followerRef:r,mergedTo:u,syncPosition:c}},render(){return o.h(Ii,{show:this.show,to:this.mergedTo,disabled:this.teleportDisabled},{default:()=>{var e,t;const n=o.h("div",{class:["v-binder-follower-container",this.containerClass],ref:"offsetContainerRef"},[o.h("div",{class:"v-binder-follower-content",ref:"followerRef"},(t=(e=this.$slots).default)===null||t===void 0?void 0:t.call(e))]);return this.zindexable?o.withDirectives(n,[[Yo,{enabled:this.mergedEnabled,zIndex:this.zIndex}]]):n}})}});var Ct=[],fc=function(){return Ct.some(function(e){return e.activeTargets.length>0})},hc=function(){return Ct.some(function(e){return e.skippedTargets.length>0})},Ni="ResizeObserver loop completed with undelivered notifications.",pc=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:Ni}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=Ni),window.dispatchEvent(e)},un;(function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(un||(un={}));var St=function(e){return Object.freeze(e)},gc=function(){function e(t,n){this.inlineSize=t,this.blockSize=n,St(this)}return e}(),Hi=function(){function e(t,n,r,i){return this.x=t,this.y=n,this.width=r,this.height=i,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,St(this)}return e.prototype.toJSON=function(){var t=this,n=t.x,r=t.y,i=t.top,l=t.right,s=t.bottom,a=t.left,c=t.width,d=t.height;return{x:n,y:r,top:i,right:l,bottom:s,left:a,width:c,height:d}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),Jo=function(e){return e instanceof SVGElement&&"getBBox"in e},ji=function(e){if(Jo(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var i=e,l=i.offsetWidth,s=i.offsetHeight;return!(l||s||e.getClientRects().length)},Wi=function(e){var t;if(e instanceof Element)return!0;var n=(t=e==null?void 0:e.ownerDocument)===null||t===void 0?void 0:t.defaultView;return!!(n&&e instanceof n.Element)},mc=function(e){switch(e.tagName){case"INPUT":if(e.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},fn=typeof window<"u"?window:{},Zn=new WeakMap,Vi=/auto|scroll/,bc=/^tb|vertical/,vc=/msie|trident/i.test(fn.navigator&&fn.navigator.userAgent),Qe=function(e){return parseFloat(e||"0")},jt=function(e,t,n){return e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=!1),new gc((n?t:e)||0,(n?e:t)||0)},Ki=St({devicePixelContentBoxSize:jt(),borderBoxSize:jt(),contentBoxSize:jt(),contentRect:new Hi(0,0,0,0)}),Ui=function(e,t){if(t===void 0&&(t=!1),Zn.has(e)&&!t)return Zn.get(e);if(ji(e))return Zn.set(e,Ki),Ki;var n=getComputedStyle(e),r=Jo(e)&&e.ownerSVGElement&&e.getBBox(),i=!vc&&n.boxSizing==="border-box",l=bc.test(n.writingMode||""),s=!r&&Vi.test(n.overflowY||""),a=!r&&Vi.test(n.overflowX||""),c=r?0:Qe(n.paddingTop),d=r?0:Qe(n.paddingRight),h=r?0:Qe(n.paddingBottom),u=r?0:Qe(n.paddingLeft),m=r?0:Qe(n.borderTopWidth),g=r?0:Qe(n.borderRightWidth),f=r?0:Qe(n.borderBottomWidth),y=r?0:Qe(n.borderLeftWidth),v=u+d,p=c+h,x=y+g,z=m+f,w=a?e.offsetHeight-z-e.clientHeight:0,C=s?e.offsetWidth-x-e.clientWidth:0,S=i?v+x:0,b=i?p+z:0,k=r?r.width:Qe(n.width)-S-C,R=r?r.height:Qe(n.height)-b-w,$=k+v+C+x,P=R+p+w+z,M=St({devicePixelContentBoxSize:jt(Math.round(k*devicePixelRatio),Math.round(R*devicePixelRatio),l),borderBoxSize:jt($,P,l),contentBoxSize:jt(k,R,l),contentRect:new Hi(u,c,k,R)});return Zn.set(e,M),M},Gi=function(e,t,n){var r=Ui(e,n),i=r.borderBoxSize,l=r.contentBoxSize,s=r.devicePixelContentBoxSize;switch(t){case un.DEVICE_PIXEL_CONTENT_BOX:return s;case un.BORDER_BOX:return i;default:return l}},yc=function(){function e(t){var n=Ui(t);this.target=t,this.contentRect=n.contentRect,this.borderBoxSize=St([n.borderBoxSize]),this.contentBoxSize=St([n.contentBoxSize]),this.devicePixelContentBoxSize=St([n.devicePixelContentBoxSize])}return e}(),qi=function(e){if(ji(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},xc=function(){var e=1/0,t=[];Ct.forEach(function(s){if(s.activeTargets.length!==0){var a=[];s.activeTargets.forEach(function(d){var h=new yc(d.target),u=qi(d.target);a.push(h),d.lastReportedSize=Gi(d.target,d.observedBox),u<e&&(e=u)}),t.push(function(){s.callback.call(s.observer,a,s.observer)}),s.activeTargets.splice(0,s.activeTargets.length)}});for(var n=0,r=t;n<r.length;n++){var i=r[n];i()}return e},Yi=function(e){Ct.forEach(function(n){n.activeTargets.splice(0,n.activeTargets.length),n.skippedTargets.splice(0,n.skippedTargets.length),n.observationTargets.forEach(function(i){i.isActive()&&(qi(i.target)>e?n.activeTargets.push(i):n.skippedTargets.push(i))})})},wc=function(){var e=0;for(Yi(e);fc();)e=xc(),Yi(e);return hc()&&pc(),e>0},er,Xi=[],Cc=function(){return Xi.splice(0).forEach(function(e){return e()})},Sc=function(e){if(!er){var t=0,n=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return Cc()}).observe(n,r),er=function(){n.textContent="".concat(t?t--:t++)}}Xi.push(e),er()},kc=function(e){Sc(function(){requestAnimationFrame(e)})},Qn=0,$c=function(){return!!Qn},Tc=250,Pc={attributes:!0,characterData:!0,childList:!0,subtree:!0},Zi=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Qi=function(e){return e===void 0&&(e=0),Date.now()+e},tr=!1,Mc=function(){function e(){var t=this;this.stopped=!0,this.listener=function(){return t.schedule()}}return e.prototype.run=function(t){var n=this;if(t===void 0&&(t=Tc),!tr){tr=!0;var r=Qi(t);kc(function(){var i=!1;try{i=wc()}finally{if(tr=!1,t=r-Qi(),!$c())return;i?n.run(1e3):t>0?n.run(t):n.start()}})}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var t=this,n=function(){return t.observer&&t.observer.observe(document.body,Pc)};document.body?n():fn.addEventListener("DOMContentLoaded",n)},e.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Zi.forEach(function(n){return fn.addEventListener(n,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),Zi.forEach(function(n){return fn.removeEventListener(n,t.listener,!0)}),this.stopped=!0)},e}(),nr=new Mc,Ji=function(e){!Qn&&e>0&&nr.start(),Qn+=e,!Qn&&nr.stop()},Rc=function(e){return!Jo(e)&&!mc(e)&&getComputedStyle(e).display==="inline"},zc=function(){function e(t,n){this.target=t,this.observedBox=n||un.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var t=Gi(this.target,this.observedBox,!0);return Rc(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e}(),_c=function(){function e(t,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=n}return e}(),Jn=new WeakMap,ea=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},eo=function(){function e(){}return e.connect=function(t,n){var r=new _c(t,n);Jn.set(t,r)},e.observe=function(t,n,r){var i=Jn.get(t),l=i.observationTargets.length===0;ea(i.observationTargets,n)<0&&(l&&Ct.push(i),i.observationTargets.push(new zc(n,r&&r.box)),Ji(1),nr.schedule())},e.unobserve=function(t,n){var r=Jn.get(t),i=ea(r.observationTargets,n),l=r.observationTargets.length===1;i>=0&&(l&&Ct.splice(Ct.indexOf(r),1),r.observationTargets.splice(i,1),Ji(-1))},e.disconnect=function(t){var n=this,r=Jn.get(t);r.observationTargets.slice().forEach(function(i){return n.unobserve(t,i.target)}),r.activeTargets.splice(0,r.activeTargets.length)},e}(),Ec=function(){function e(t){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof t!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");eo.connect(this,t)}return e.prototype.observe=function(t,n){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Wi(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");eo.observe(this,t,n)},e.prototype.unobserve=function(t){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Wi(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");eo.unobserve(this,t)},e.prototype.disconnect=function(){eo.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}();class Bc{constructor(){this.handleResize=this.handleResize.bind(this),this.observer=new(typeof window<"u"&&window.ResizeObserver||Ec)(this.handleResize),this.elHandlersMap=new Map}handleResize(t){for(const n of t){const r=this.elHandlersMap.get(n.target);r!==void 0&&r(n)}}registerHandler(t,n){this.elHandlersMap.set(t,n),this.observer.observe(t)}unregisterHandler(t){this.elHandlersMap.has(t)&&(this.elHandlersMap.delete(t),this.observer.unobserve(t))}}const to=new Bc,no=o.defineComponent({name:"ResizeObserver",props:{onResize:Function},setup(e){let t=!1;const n=o.getCurrentInstance().proxy;function r(i){const{onResize:l}=e;l!==void 0&&l(i)}o.onMounted(()=>{const i=n.$el;if(i===void 0){Bi("resize-observer","$el does not exist.");return}if(i.nextElementSibling!==i.nextSibling&&i.nodeType===3&&i.nodeValue!==""){Bi("resize-observer","$el can not be observed (it may be a text node).");return}i.nextElementSibling!==null&&(to.registerHandler(i.nextElementSibling,r),t=!0)}),o.onBeforeUnmount(()=>{t&&to.unregisterHandler(n.$el.nextElementSibling)})},render(){return o.renderSlot(this.$slots,"default")}});let oo;function Oc(){return oo===void 0&&("matchMedia"in window?oo=window.matchMedia("(pointer:coarse)").matches:oo=!1),oo}let or;function ta(){return or===void 0&&(or="chrome"in window?window.devicePixelRatio:1),or}const Fc=ct(".v-vl",{maxHeight:"inherit",height:"100%",overflow:"auto",minWidth:"1px"},[ct("&:not(.v-vl--show-scrollbar)",{scrollbarWidth:"none"},[ct("&::-webkit-scrollbar, &::-webkit-scrollbar-track-piece, &::-webkit-scrollbar-thumb",{width:0,height:0,display:"none"})])]),na=o.defineComponent({name:"VirtualList",inheritAttrs:!1,props:{showScrollbar:{type:Boolean,default:!0},items:{type:Array,default:()=>[]},itemSize:{type:Number,required:!0},itemResizable:Boolean,itemsStyle:[String,Object],visibleItemsTag:{type:[String,Object],default:"div"},visibleItemsProps:Object,ignoreItemResize:Boolean,onScroll:Function,onWheel:Function,onResize:Function,defaultScrollKey:[Number,String],defaultScrollIndex:Number,keyField:{type:String,default:"key"},paddingTop:{type:[Number,String],default:0},paddingBottom:{type:[Number,String],default:0}},setup(e){const t=wt();Fc.mount({id:"vueuc/virtual-list",head:!0,anchorMetaName:Xo,ssr:t}),o.onMounted(()=>{const{defaultScrollIndex:P,defaultScrollKey:M}=e;P!=null?f({index:P}):M!=null&&f({key:M})});let n=!1,r=!1;o.onActivated(()=>{if(n=!1,!r)