galaxy-charts 0.0.47 → 0.0.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/galaxy-charts.css +1 -1
- package/dist/galaxy-charts.js +4833 -5198
- package/dist/galaxy-charts.umd.cjs +288 -397
- package/package.json +1 -1
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
(function(We,
|
|
2
|
-
/*$vite$:1*/`,document.head.appendChild(Ii);function Oi(e,t="Request failed."){let n=t;return e&&e.response&&e.response.data&&e.response.data.err_msg?n=e.response.data.err_msg:e&&e.data&&e.data.err_msg?n=e.data.err_msg:e&&e.response?n=`${e.response.statusText} (${e.response.status})`:e instanceof Error?n=e.message:typeof e=="string"&&(n=e),n}function $n(e){throw Error(Oi(e))}const Ai=o.ref("/"),Fi=o.ref("include");function Di(){function e(){return Fi.value}function t(i){Fi.value=i}function n(){return Ai.value}function r(i){Ai.value=i}return{getCredentials:e,setCredentials:t,getRoot:n,setRoot:r}}async function ir(e,t){const n=Di(),r=`${n.getRoot()}${e.substring(1)}`;try{const i=await fetch(r,{credentials:n.getCredentials(),headers:{"Content-Type":"application/json"},...t});if(i.ok)return{data:await i.json(),response:i};$n(i)}catch(i){$n(i)}}function en(){async function e(r){return ir(r,{method:"GET"})}async function t(r,i){return ir(r,{body:JSON.stringify(i),method:"POST"})}async function n(r,i){return ir(r,{body:JSON.stringify(i),method:"PUT"})}return{GET:e,POST:t,PUT:n}}async function Vs(e,t){const n=new URLSearchParams({data_type:"raw_data",provider:"dataset-column",indeces:t.toString()}).toString();try{const{data:r}=await en().GET(`/api/datasets/${e}?${n}`),i=t.length,a=new Array(i).fill(null).map(()=>[]);for(const l of r.data)for(const s in l){const d=Number(s),c=l[s];c!==void 0&&c!=2147483647&&d<i&&a[d].push(c)}return a}catch(r){$n(r)}}function Hs(e,t){return`${e}api/datasets/${t}/display`}const Vi=["auto"],Wn=o.ref({});function Ls(){function e(r,i){return r.every(a=>i.every(l=>typeof a[l]=="string"&&a[l].trim()!==""))}function t(r,i){const a=[];for(const l of r)for(const s of i){const d=l[s];d&&![...a,...Vi].includes(d)&&a.push(d)}return a}async function n(r,i,a){if(e(i,a)){Wn.value[r]=Wn.value[r]||{};const l=Object.keys(Wn.value[r]),s=t(i,a).filter(c=>!l.includes(c));if(s.length>0){const c=await Vs(r,s);if(c)for(const[f,u]of s.entries())Wn.value[r][u]=c[f]}const d=[];return i.forEach(c=>{const f={};a.forEach(u=>{const p=c[u];p&&!Vi.includes(p)&&(f[u]=Wn.value[r][p])}),d.push(f)}),d}else return[]}return{fetchColumns:n}}function Ns(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[o.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M10.5 6h9.75M10.5 6a1.5 1.5 0 1 1-3 0m3 0a1.5 1.5 0 1 0-3 0M3.75 6H7.5m3 12h9.75m-9.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-3.75 0H7.5m9-6h3.75m-3.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-9.75 0h9.75"})])}function Ws(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[o.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99"})])}function Hi(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[o.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"})])}function js(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[o.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m18.75 4.5-7.5 7.5 7.5 7.5m-6-15L5.25 12l7.5 7.5"})])}function Us(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[o.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m5.25 4.5 7.5 7.5-7.5 7.5m6-15 7.5 7.5-7.5 7.5"})])}function Gs(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[o.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 16.5V9.75m0 0 3 3m-3-3-3 3M6.75 19.5a4.5 4.5 0 0 1-1.41-8.775 5.25 5.25 0 0 1 10.233-2.33 3 3 0 0 1 3.758 3.848A3.752 3.752 0 0 1 18 19.5H6.75Z"})])}function Li(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[o.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 9v3.75m9-.75a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 3.75h.008v.008H12v-.008Z"})])}function Ks(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[o.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 4.5v15m7.5-7.5h-15"})])}function qs(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[o.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6.429 9.75 2.25 12l4.179 2.25m0-4.5 5.571 3 5.571-3m-11.142 0L2.25 7.5 12 2.25l9.75 5.25-4.179 2.25m0 0L21.75 12l-4.179 2.25m0 0 4.179 2.25L12 21.75 2.25 16.5l4.179-2.25m11.142 0-5.571 3-5.571-3"})])}function Xs(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[o.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0"})])}let mo=[];const Ni=new WeakMap;function Ys(){mo.forEach(e=>e(...Ni.get(e))),mo=[]}function Wi(e,...t){Ni.set(e,t),!mo.includes(e)&&mo.push(e)===1&&requestAnimationFrame(Ys)}function jn(e,t){let{target:n}=e;for(;n;){if(n.dataset&&n.dataset[t]!==void 0)return!0;n=n.parentElement}return!1}function kn(e){return e.composedPath()[0]||null}function ot(e){return typeof e=="string"?e.endsWith("px")?Number(e.slice(0,e.length-2)):Number(e):e}function tn(e){if(e!=null)return typeof e=="number"?`${e}px`:e.endsWith("px")?e:`${e}px`}function dt(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 ji={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 Ui(e,t,n){t/=100,n/=100;const r=t*Math.min(n,1-n)+n;return[e,r?(2-2*n/r)*100:0,r*100]}function vo(e,t,n){t/=100,n/=100;const r=n-n*t/2,i=Math.min(r,1-r);return[e,i?(n-r)/i*100:0,r*100]}function Dt(e,t,n){t/=100,n/=100;let r=(i,a=(i+e/60)%6)=>n-n*t*Math.max(Math.min(a,4-a,1),0);return[r(5)*255,r(3)*255,r(1)*255]}function ar(e,t,n){e/=255,t/=255,n/=255;let r=Math.max(e,t,n),i=r-Math.min(e,t,n),a=i&&(r==e?(t-n)/i:r==t?2+(n-e)/i:4+(e-t)/i);return[60*(a<0?a+6:a),r&&i/r*100,r*100]}function lr(e,t,n){e/=255,t/=255,n/=255;let r=Math.max(e,t,n),i=r-Math.min(e,t,n),a=1-Math.abs(r+r-i-1),l=i&&(r==e?(t-n)/i:r==t?2+(n-e)/i:4+(e-t)/i);return[60*(l<0?l+6:l),a?i/a*100:0,(r+r-i)*50]}function sr(e,t,n){t/=100,n/=100;let r=t*Math.min(n,1-n),i=(a,l=(a+e/30)%12)=>n-r*Math.max(Math.min(l-3,9-l,1),-1);return[i(0)*255,i(8)*255,i(4)*255]}const wt="^\\s*",Ct="\\s*$",Vt="\\s*((\\.\\d+)|(\\d+(\\.\\d*)?))%\\s*",ct="\\s*((\\.\\d+)|(\\d+(\\.\\d*)?))\\s*",nn="([0-9A-Fa-f])",on="([0-9A-Fa-f]{2})",Zs=new RegExp(`${wt}hsl\\s*\\(${ct},${Vt},${Vt}\\)${Ct}`),Js=new RegExp(`${wt}hsv\\s*\\(${ct},${Vt},${Vt}\\)${Ct}`),Qs=new RegExp(`${wt}hsla\\s*\\(${ct},${Vt},${Vt},${ct}\\)${Ct}`),ed=new RegExp(`${wt}hsva\\s*\\(${ct},${Vt},${Vt},${ct}\\)${Ct}`),td=new RegExp(`${wt}rgb\\s*\\(${ct},${ct},${ct}\\)${Ct}`),nd=new RegExp(`${wt}rgba\\s*\\(${ct},${ct},${ct},${ct}\\)${Ct}`),dr=new RegExp(`${wt}#${nn}${nn}${nn}${Ct}`),cr=new RegExp(`${wt}#${on}${on}${on}${Ct}`),ur=new RegExp(`${wt}#${nn}${nn}${nn}${nn}${Ct}`),fr=new RegExp(`${wt}#${on}${on}${on}${on}${Ct}`);function at(e){return parseInt(e,16)}function zn(e){try{let t;if(t=Qs.exec(e))return[St(t[1]),Ge(t[5]),Ge(t[9]),Rt(t[13])];if(t=Zs.exec(e))return[St(t[1]),Ge(t[5]),Ge(t[9]),1];throw new Error(`[seemly/hsla]: Invalid color value ${e}.`)}catch(t){throw t}}function rn(e){try{let t;if(t=ed.exec(e))return[St(t[1]),Ge(t[5]),Ge(t[9]),Rt(t[13])];if(t=Js.exec(e))return[St(t[1]),Ge(t[5]),Ge(t[9]),1];throw new Error(`[seemly/hsva]: Invalid color value ${e}.`)}catch(t){throw t}}function Qe(e){try{let t;if(t=cr.exec(e))return[at(t[1]),at(t[2]),at(t[3]),1];if(t=td.exec(e))return[He(t[1]),He(t[5]),He(t[9]),1];if(t=nd.exec(e))return[He(t[1]),He(t[5]),He(t[9]),Rt(t[13])];if(t=dr.exec(e))return[at(t[1]+t[1]),at(t[2]+t[2]),at(t[3]+t[3]),1];if(t=fr.exec(e))return[at(t[1]),at(t[2]),at(t[3]),Rt(at(t[4])/255)];if(t=ur.exec(e))return[at(t[1]+t[1]),at(t[2]+t[2]),at(t[3]+t[3]),Rt(at(t[4]+t[4])/255)];if(e in ji)return Qe(ji[e]);throw new Error(`[seemly/rgba]: Invalid color value ${e}.`)}catch(t){throw t}}function od(e){return e>1?1:e<0?0:e}function rd(e,t,n){return`rgb(${He(e)}, ${He(t)}, ${He(n)})`}function hr(e,t,n,r){return`rgba(${He(e)}, ${He(t)}, ${He(n)}, ${od(r)})`}function pr(e,t,n,r,i){return He((e*t*(1-r)+n*r)/i)}function ft(e,t){Array.isArray(e)||(e=Qe(e)),Array.isArray(t)||(t=Qe(t));const n=e[3],r=t[3],i=Rt(n+r-n*r);return hr(pr(e[0],n,t[0],r,i),pr(e[1],n,t[1],r,i),pr(e[2],n,t[2],r,i),i)}function me(e,t){const[n,r,i,a=1]=Array.isArray(e)?e:Qe(e);return t.alpha?hr(n,r,i,t.alpha):hr(n,r,i,a)}function xo(e,t){const[n,r,i,a=1]=Array.isArray(e)?e:Qe(e),{lightness:l=1,alpha:s=1}=t;return $t([n*l,r*l,i*l,a*s])}function Rt(e){const t=Math.round(Number(e)*100)/100;return t>1?1:t<0?0:t}function St(e){const t=Math.round(Number(e));return t>=360||t<0?0:t}function He(e){const t=Math.round(Number(e));return t>255?255:t<0?0:t}function Ge(e){const t=Math.round(Number(e));return t>100?100:t<0?0:t}function br(e){const[t,n,r]=Array.isArray(e)?e:Qe(e);return rd(t,n,r)}function $t(e){const[t,n,r]=e;return 3 in e?`rgba(${He(t)}, ${He(n)}, ${He(r)}, ${Rt(e[3])})`:`rgba(${He(t)}, ${He(n)}, ${He(r)}, 1)`}function gr(e){return`hsv(${St(e[0])}, ${Ge(e[1])}%, ${Ge(e[2])}%)`}function an(e){const[t,n,r]=e;return 3 in e?`hsva(${St(t)}, ${Ge(n)}%, ${Ge(r)}%, ${Rt(e[3])})`:`hsva(${St(t)}, ${Ge(n)}%, ${Ge(r)}%, 1)`}function mr(e){return`hsl(${St(e[0])}, ${Ge(e[1])}%, ${Ge(e[2])}%)`}function Ht(e){const[t,n,r]=e;return 3 in e?`hsla(${St(t)}, ${Ge(n)}%, ${Ge(r)}%, ${Rt(e[3])})`:`hsla(${St(t)}, ${Ge(n)}%, ${Ge(r)}%, 1)`}function Lt(e){if(typeof e=="string"){let r;if(r=cr.exec(e))return`${r[0]}FF`;if(r=fr.exec(e))return r[0];if(r=dr.exec(e))return`#${r[1]}${r[1]}${r[2]}${r[2]}${r[3]}${r[3]}FF`;if(r=ur.exec(e))return`#${r[1]}${r[1]}${r[2]}${r[2]}${r[3]}${r[3]}${r[4]}${r[4]}`;throw new Error(`[seemly/toHexString]: Invalid hex value ${e}.`)}const t=`#${e.slice(0,3).map(r=>He(r).toString(16).toUpperCase().padStart(2,"0")).join("")}`,n=e.length===3?"FF":He(e[3]*255).toString(16).padStart(2,"0").toUpperCase();return t+n}function Un(e){if(typeof e=="string"){let t;if(t=cr.exec(e))return t[0];if(t=fr.exec(e))return t[0].slice(0,7);if(t=dr.exec(e)||ur.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(t=>He(t).toString(16).toUpperCase().padStart(2,"0")).join("")}`}function id(e=8){return Math.random().toString(16).slice(2,2+e)}function ad(e,t=[],n){const r={};return t.forEach(i=>{r[i]=e[i]}),Object.assign(r,n)}function ld(e,t=[],n){const r={};return Object.getOwnPropertyNames(e).forEach(a=>{t.includes(a)||(r[a]=e[a])}),Object.assign(r,n)}function Tn(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)){Tn(r,t,n);return}if(r.type===o.Fragment){if(r.children===null)return;Array.isArray(r.children)&&Tn(r.children,t,n)}else{if(r.type===o.Comment&&t)return;n.push(r)}}}),n}function ce(e,...t){if(Array.isArray(e))e.forEach(n=>ce(n,...t));else return e(...t)}function ln(e,...t){return typeof e=="function"?e(...t):typeof e=="string"?o.createTextVNode(e):typeof e=="number"?o.createTextVNode(String(e)):null}const Gi=new Set;function tt(e,t){const n=`[naive/${e}]: ${t}`;Gi.has(n)||(Gi.add(n),console.error(n))}function Gn(e,t){console.error(`[naive/${e}]: ${t}`)}function vr(e,t){throw new Error(`[naive/${e}]: ${t}`)}function Ki(e){switch(typeof e){case"string":return e||void 0;case"number":return String(e);default:return}}function qi(e,t="default",n=void 0){const r=e[t];if(!r)return Gn("getFirstSlotVNode",`slot[${t}] is empty`),null;const i=Tn(r(n));return i.length===1?i[0]:(Gn("getFirstSlotVNode",`slot[${t}] should have exactly one child`),null)}function cy(e){return e}function Kn(e){return e.some(t=>o.isVNode(t)?!(t.type===o.Comment||t.type===o.Fragment&&!Kn(t.children)):!0)?e:null}function mt(e,t){return e&&Kn(e())||t()}function sd(e,t,n){return e&&Kn(e(t))||n(t)}function Oe(e,t){const n=e&&Kn(e());return t(n||null)}function Pn(e){return!(e&&Kn(e()))}function xr(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 yr=o.defineComponent({render(){var e,t;return(t=(e=this.$slots).default)===null||t===void 0?void 0:t.call(e)}}),dd=/^(\d|\.)+$/,Xi=/(\d|\.)+/;function lt(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(dd.test(e)){const i=(Number(e)+n)*t;return r?i===0?"0":`${i}px`:`${i}`}else{const i=Xi.exec(e);return i?e.replace(Xi,String((Number(i[0])+n)*t)):e}return e}function yo(e){return e.replace(/#|\(|\)|,|\s|\./g,"_")}function cd(e){const{left:t,right:n,top:r,bottom:i}=dt(e);return`${r} ${n} ${i} ${t}`}function ud(e){let t=0;for(let n=0;n<e.length;++n)e[n]==="&"&&++t;return t}const Yi=/\s*,(?![^(]*\))\s*/g,fd=/\s+/g;function hd(e,t){const n=[];return t.split(Yi).forEach(r=>{let i=ud(r);if(i){if(i===1){e.forEach(l=>{n.push(r.replace("&",l))});return}}else{e.forEach(l=>{n.push((l&&l+" ")+r)});return}let a=[r];for(;i--;){const l=[];a.forEach(s=>{e.forEach(d=>{l.push(s.replace("&",d))})}),a=l}a.forEach(l=>n.push(l))}),n}function pd(e,t){const n=[];return t.split(Yi).forEach(r=>{e.forEach(i=>{n.push((i&&i+" ")+r)})}),n}function bd(e){let t=[""];return e.forEach(n=>{n=n&&n.trim(),n&&(n.includes("&")?t=hd(t,n):t=pd(t,n))}),t.join(", ").replace(fd," ")}function Zi(e){if(!e)return;const t=e.parentElement;t&&t.removeChild(e)}function wo(e,t){return(t??document.head).querySelector(`style[cssr-id="${e}"]`)}function gd(e){const t=document.createElement("style");return t.setAttribute("cssr-id",e),t}function Co(e){return e?/^\s*@(s|m)/.test(e):!1}const md=/[A-Z]/g;function Ji(e){return e.replace(md,t=>"-"+t.toLowerCase())}function vd(e,t=" "){return typeof e=="object"&&e!==null?` {
|
|
3
|
-
`+Object.entries(e).map(n=>t+` ${
|
|
1
|
+
(function(We,r){typeof exports=="object"&&typeof module<"u"?r(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],r):(We=typeof globalThis<"u"?globalThis:We||self,r(We.GalaxyCharts={},We.vue))})(this,function(We,r){"use strict";var Oi=document.createElement("style");Oi.textContent=`*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.absolute{position:absolute}.right-0{right:0}.z-10{z-index:10}.m-1{margin:.25rem}.m-2{margin:.5rem}.m-3{margin:.75rem}.m-4{margin:1rem}.mx-1{margin-left:.25rem;margin-right:.25rem}.my-1{margin-top:.25rem;margin-bottom:.25rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mr-1{margin-right:.25rem}.mt-0{margin-top:0}.mt-2{margin-top:.5rem}.block{display:block}.inline{display:inline}.flex{display:flex}.grid{display:grid}.\\!hidden{display:none!important}.hidden{display:none}.size-14{width:3.5rem;height:3.5rem}.size-3{width:.75rem;height:.75rem}.size-4{width:1rem;height:1rem}.h-screen{height:100vh}.w-full{width:100%}.min-w-14{min-width:3.5rem}.max-w-14{max-width:3.5rem}.flex-1{flex:1 1 0%}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize{resize:both}.grid-cols-\\[1fr_17rem\\]{grid-template-columns:1fr 17rem}.justify-center{justify-content:center}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.whitespace-pre{white-space:pre}.break-words{overflow-wrap:break-word}.rounded{border-radius:.25rem}.border{border-width:1px}.border-dotted{border-style:dotted}.border-green-600{--tw-border-opacity: 1;border-color:rgb(22 163 74 / var(--tw-border-opacity))}.bg-gray-600{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.bg-sky-100{--tw-bg-opacity: 1;background-color:rgb(224 242 254 / var(--tw-bg-opacity))}.bg-sky-50{--tw-bg-opacity: 1;background-color:rgb(240 249 255 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.object-contain{-o-object-fit:contain;object-fit:contain}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-4{padding:1rem}.px-4{padding-left:1rem;padding-right:1rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.pb-1{padding-bottom:.25rem}.pb-2{padding-bottom:.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-thin{font-weight:100}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity))}.text-sky-900{--tw-text-opacity: 1;color:rgb(12 74 110 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}
|
|
2
|
+
/*$vite$:1*/`,document.head.appendChild(Oi);function Ai(e,t="Request failed."){let n=t;return e&&e.response&&e.response.data&&e.response.data.err_msg?n=e.response.data.err_msg:e&&e.data&&e.data.err_msg?n=e.data.err_msg:e&&e.response?n=`${e.response.statusText} (${e.response.status})`:e instanceof Error?n=e.message:typeof e=="string"&&(n=e),n}function Sn(e){throw Error(Ai(e))}const Fi=r.ref("/"),Di=r.ref("include");function Vi(){function e(){return Di.value}function t(i){Di.value=i}function n(){return Fi.value}function o(i){Fi.value=i}return{getCredentials:e,setCredentials:t,getRoot:n,setRoot:o}}async function io(e,t){const n=Vi(),o=`${n.getRoot()}${e.substring(1)}`;try{const i=await fetch(o,{credentials:n.getCredentials(),headers:{"Content-Type":"application/json"},...t});if(i.ok)return{data:await i.json(),response:i};Sn(i)}catch(i){Sn(i)}}function Qt(){async function e(o){return io(o,{method:"GET"})}async function t(o,i){return io(o,{body:JSON.stringify(i),method:"POST"})}async function n(o,i){return io(o,{body:JSON.stringify(i),method:"PUT"})}return{GET:e,POST:t,PUT:n}}async function As(e,t){const n=new URLSearchParams({data_type:"raw_data",provider:"dataset-column",indeces:t.toString()}).toString();try{const{data:o}=await Qt().GET(`/api/datasets/${e}?${n}`),i=t.length,a=new Array(i).fill(null).map(()=>[]);for(const l of o.data)for(const s in l){const d=Number(s),c=l[s];c!==void 0&&c!=2147483647&&d<i&&a[d].push(c)}return a}catch(o){Sn(o)}}function Fs(e,t){return`${e}api/datasets/${t}/display`}const Li=["auto"],Nn=r.ref({});function Ds(){function e(o,i){return o.every(a=>i.every(l=>typeof a[l]=="string"&&a[l].trim()!==""))}function t(o,i){const a=[];for(const l of o)for(const s of i){const d=l[s];d&&![...a,...Li].includes(d)&&a.push(d)}return a}async function n(o,i,a){if(e(i,a)){Nn.value[o]=Nn.value[o]||{};const l=Object.keys(Nn.value[o]),s=t(i,a).filter(c=>!l.includes(c));if(s.length>0){const c=await As(o,s);if(c)for(const[f,u]of s.entries())Nn.value[o][u]=c[f]}const d=[];return i.forEach(c=>{const f={};a.forEach(u=>{const b=c[u];b&&!Li.includes(b)&&(f[u]=Nn.value[o][b])}),d.push(f)}),d}else return[]}return{fetchColumns:n}}function Vs(e,t){return r.openBlock(),r.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[r.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M10.5 6h9.75M10.5 6a1.5 1.5 0 1 1-3 0m3 0a1.5 1.5 0 1 0-3 0M3.75 6H7.5m3 12h9.75m-9.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-3.75 0H7.5m9-6h3.75m-3.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-9.75 0h9.75"})])}function Ls(e,t){return r.openBlock(),r.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[r.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99"})])}function Hi(e,t){return r.openBlock(),r.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[r.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"})])}function Hs(e,t){return r.openBlock(),r.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[r.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m18.75 4.5-7.5 7.5 7.5 7.5m-6-15L5.25 12l7.5 7.5"})])}function Ns(e,t){return r.openBlock(),r.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[r.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m5.25 4.5 7.5 7.5-7.5 7.5m6-15 7.5 7.5-7.5 7.5"})])}function Ws(e,t){return r.openBlock(),r.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[r.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 16.5V9.75m0 0 3 3m-3-3-3 3M6.75 19.5a4.5 4.5 0 0 1-1.41-8.775 5.25 5.25 0 0 1 10.233-2.33 3 3 0 0 1 3.758 3.848A3.752 3.752 0 0 1 18 19.5H6.75Z"})])}function Ni(e,t){return r.openBlock(),r.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[r.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 9v3.75m9-.75a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 3.75h.008v.008H12v-.008Z"})])}function js(e,t){return r.openBlock(),r.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[r.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 4.5v15m7.5-7.5h-15"})])}function Us(e,t){return r.openBlock(),r.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[r.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6.429 9.75 2.25 12l4.179 2.25m0-4.5 5.571 3 5.571-3m-11.142 0L2.25 7.5 12 2.25l9.75 5.25-4.179 2.25m0 0L21.75 12l-4.179 2.25m0 0 4.179 2.25L12 21.75 2.25 16.5l4.179-2.25m11.142 0-5.571 3-5.571-3"})])}function Gs(e,t){return r.openBlock(),r.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[r.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0"})])}let gr=[];const Wi=new WeakMap;function Ks(){gr.forEach(e=>e(...Wi.get(e))),gr=[]}function ji(e,...t){Wi.set(e,t),!gr.includes(e)&&gr.push(e)===1&&requestAnimationFrame(Ks)}function Wn(e,t){let{target:n}=e;for(;n;){if(n.dataset&&n.dataset[t]!==void 0)return!0;n=n.parentElement}return!1}function $n(e){return e.composedPath()[0]||null}function rt(e){return typeof e=="string"?e.endsWith("px")?Number(e.slice(0,e.length-2)):Number(e):e}function en(e){if(e!=null)return typeof e=="number"?`${e}px`:e.endsWith("px")?e:`${e}px`}function st(e,t){const n=e.trim().split(/\s+/g),o={top:n[0]};switch(n.length){case 1:o.right=n[0],o.bottom=n[0],o.left=n[0];break;case 2:o.right=n[1],o.left=n[1],o.bottom=n[0];break;case 3:o.right=n[1],o.bottom=n[2],o.left=n[1];break;case 4:o.right=n[1],o.bottom=n[2],o.left=n[3];break;default:throw new Error("[seemly/getMargin]:"+e+" is not a valid value.")}return t===void 0?o:o[t]}const Ui={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 Gi(e,t,n){t/=100,n/=100;const o=t*Math.min(n,1-n)+n;return[e,o?(2-2*n/o)*100:0,o*100]}function mr(e,t,n){t/=100,n/=100;const o=n-n*t/2,i=Math.min(o,1-o);return[e,i?(n-o)/i*100:0,o*100]}function Ft(e,t,n){t/=100,n/=100;let o=(i,a=(i+e/60)%6)=>n-n*t*Math.max(Math.min(a,4-a,1),0);return[o(5)*255,o(3)*255,o(1)*255]}function ao(e,t,n){e/=255,t/=255,n/=255;let o=Math.max(e,t,n),i=o-Math.min(e,t,n),a=i&&(o==e?(t-n)/i:o==t?2+(n-e)/i:4+(e-t)/i);return[60*(a<0?a+6:a),o&&i/o*100,o*100]}function lo(e,t,n){e/=255,t/=255,n/=255;let o=Math.max(e,t,n),i=o-Math.min(e,t,n),a=1-Math.abs(o+o-i-1),l=i&&(o==e?(t-n)/i:o==t?2+(n-e)/i:4+(e-t)/i);return[60*(l<0?l+6:l),a?i/a*100:0,(o+o-i)*50]}function so(e,t,n){t/=100,n/=100;let o=t*Math.min(n,1-n),i=(a,l=(a+e/30)%12)=>n-o*Math.max(Math.min(l-3,9-l,1),-1);return[i(0)*255,i(8)*255,i(4)*255]}const vt="^\\s*",xt="\\s*$",Dt="\\s*((\\.\\d+)|(\\d+(\\.\\d*)?))%\\s*",dt="\\s*((\\.\\d+)|(\\d+(\\.\\d*)?))\\s*",tn="([0-9A-Fa-f])",nn="([0-9A-Fa-f]{2})",Xs=new RegExp(`${vt}hsl\\s*\\(${dt},${Dt},${Dt}\\)${xt}`),qs=new RegExp(`${vt}hsv\\s*\\(${dt},${Dt},${Dt}\\)${xt}`),Ys=new RegExp(`${vt}hsla\\s*\\(${dt},${Dt},${Dt},${dt}\\)${xt}`),Zs=new RegExp(`${vt}hsva\\s*\\(${dt},${Dt},${Dt},${dt}\\)${xt}`),Js=new RegExp(`${vt}rgb\\s*\\(${dt},${dt},${dt}\\)${xt}`),Qs=new RegExp(`${vt}rgba\\s*\\(${dt},${dt},${dt},${dt}\\)${xt}`),co=new RegExp(`${vt}#${tn}${tn}${tn}${xt}`),uo=new RegExp(`${vt}#${nn}${nn}${nn}${xt}`),fo=new RegExp(`${vt}#${tn}${tn}${tn}${tn}${xt}`),ho=new RegExp(`${vt}#${nn}${nn}${nn}${nn}${xt}`);function at(e){return parseInt(e,16)}function kn(e){try{let t;if(t=Ys.exec(e))return[yt(t[1]),Ge(t[5]),Ge(t[9]),Rt(t[13])];if(t=Xs.exec(e))return[yt(t[1]),Ge(t[5]),Ge(t[9]),1];throw new Error(`[seemly/hsla]: Invalid color value ${e}.`)}catch(t){throw t}}function rn(e){try{let t;if(t=Zs.exec(e))return[yt(t[1]),Ge(t[5]),Ge(t[9]),Rt(t[13])];if(t=qs.exec(e))return[yt(t[1]),Ge(t[5]),Ge(t[9]),1];throw new Error(`[seemly/hsva]: Invalid color value ${e}.`)}catch(t){throw t}}function Ze(e){try{let t;if(t=uo.exec(e))return[at(t[1]),at(t[2]),at(t[3]),1];if(t=Js.exec(e))return[Le(t[1]),Le(t[5]),Le(t[9]),1];if(t=Qs.exec(e))return[Le(t[1]),Le(t[5]),Le(t[9]),Rt(t[13])];if(t=co.exec(e))return[at(t[1]+t[1]),at(t[2]+t[2]),at(t[3]+t[3]),1];if(t=ho.exec(e))return[at(t[1]),at(t[2]),at(t[3]),Rt(at(t[4])/255)];if(t=fo.exec(e))return[at(t[1]+t[1]),at(t[2]+t[2]),at(t[3]+t[3]),Rt(at(t[4]+t[4])/255)];if(e in Ui)return Ze(Ui[e]);throw new Error(`[seemly/rgba]: Invalid color value ${e}.`)}catch(t){throw t}}function ed(e){return e>1?1:e<0?0:e}function td(e,t,n){return`rgb(${Le(e)}, ${Le(t)}, ${Le(n)})`}function po(e,t,n,o){return`rgba(${Le(e)}, ${Le(t)}, ${Le(n)}, ${ed(o)})`}function bo(e,t,n,o,i){return Le((e*t*(1-o)+n*o)/i)}function ut(e,t){Array.isArray(e)||(e=Ze(e)),Array.isArray(t)||(t=Ze(t));const n=e[3],o=t[3],i=Rt(n+o-n*o);return po(bo(e[0],n,t[0],o,i),bo(e[1],n,t[1],o,i),bo(e[2],n,t[2],o,i),i)}function me(e,t){const[n,o,i,a=1]=Array.isArray(e)?e:Ze(e);return t.alpha?po(n,o,i,t.alpha):po(n,o,i,a)}function vr(e,t){const[n,o,i,a=1]=Array.isArray(e)?e:Ze(e),{lightness:l=1,alpha:s=1}=t;return wt([n*l,o*l,i*l,a*s])}function Rt(e){const t=Math.round(Number(e)*100)/100;return t>1?1:t<0?0:t}function yt(e){const t=Math.round(Number(e));return t>=360||t<0?0:t}function Le(e){const t=Math.round(Number(e));return t>255?255:t<0?0:t}function Ge(e){const t=Math.round(Number(e));return t>100?100:t<0?0:t}function go(e){const[t,n,o]=Array.isArray(e)?e:Ze(e);return td(t,n,o)}function wt(e){const[t,n,o]=e;return 3 in e?`rgba(${Le(t)}, ${Le(n)}, ${Le(o)}, ${Rt(e[3])})`:`rgba(${Le(t)}, ${Le(n)}, ${Le(o)}, 1)`}function mo(e){return`hsv(${yt(e[0])}, ${Ge(e[1])}%, ${Ge(e[2])}%)`}function on(e){const[t,n,o]=e;return 3 in e?`hsva(${yt(t)}, ${Ge(n)}%, ${Ge(o)}%, ${Rt(e[3])})`:`hsva(${yt(t)}, ${Ge(n)}%, ${Ge(o)}%, 1)`}function vo(e){return`hsl(${yt(e[0])}, ${Ge(e[1])}%, ${Ge(e[2])}%)`}function Vt(e){const[t,n,o]=e;return 3 in e?`hsla(${yt(t)}, ${Ge(n)}%, ${Ge(o)}%, ${Rt(e[3])})`:`hsla(${yt(t)}, ${Ge(n)}%, ${Ge(o)}%, 1)`}function Lt(e){if(typeof e=="string"){let o;if(o=uo.exec(e))return`${o[0]}FF`;if(o=ho.exec(e))return o[0];if(o=co.exec(e))return`#${o[1]}${o[1]}${o[2]}${o[2]}${o[3]}${o[3]}FF`;if(o=fo.exec(e))return`#${o[1]}${o[1]}${o[2]}${o[2]}${o[3]}${o[3]}${o[4]}${o[4]}`;throw new Error(`[seemly/toHexString]: Invalid hex value ${e}.`)}const t=`#${e.slice(0,3).map(o=>Le(o).toString(16).toUpperCase().padStart(2,"0")).join("")}`,n=e.length===3?"FF":Le(e[3]*255).toString(16).padStart(2,"0").toUpperCase();return t+n}function jn(e){if(typeof e=="string"){let t;if(t=uo.exec(e))return t[0];if(t=ho.exec(e))return t[0].slice(0,7);if(t=co.exec(e)||fo.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(t=>Le(t).toString(16).toUpperCase().padStart(2,"0")).join("")}`}function nd(e=8){return Math.random().toString(16).slice(2,2+e)}function rd(e,t=[],n){const o={};return t.forEach(i=>{o[i]=e[i]}),Object.assign(o,n)}function od(e,t=[],n){const o={};return Object.getOwnPropertyNames(e).forEach(a=>{t.includes(a)||(o[a]=e[a])}),Object.assign(o,n)}function Tn(e,t=!0,n=[]){return e.forEach(o=>{if(o!==null){if(typeof o!="object"){(typeof o=="string"||typeof o=="number")&&n.push(r.createTextVNode(String(o)));return}if(Array.isArray(o)){Tn(o,t,n);return}if(o.type===r.Fragment){if(o.children===null)return;Array.isArray(o.children)&&Tn(o.children,t,n)}else{if(o.type===r.Comment&&t)return;n.push(o)}}}),n}function he(e,...t){if(Array.isArray(e))e.forEach(n=>he(n,...t));else return e(...t)}function an(e,...t){return typeof e=="function"?e(...t):typeof e=="string"?r.createTextVNode(e):typeof e=="number"?r.createTextVNode(String(e)):null}const Ki=new Set;function Qe(e,t){const n=`[naive/${e}]: ${t}`;Ki.has(n)||(Ki.add(n),console.error(n))}function Un(e,t){console.error(`[naive/${e}]: ${t}`)}function xo(e,t){throw new Error(`[naive/${e}]: ${t}`)}function Xi(e){switch(typeof e){case"string":return e||void 0;case"number":return String(e);default:return}}function qi(e,t="default",n=void 0){const o=e[t];if(!o)return Un("getFirstSlotVNode",`slot[${t}] is empty`),null;const i=Tn(o(n));return i.length===1?i[0]:(Un("getFirstSlotVNode",`slot[${t}] should have exactly one child`),null)}function ny(e){return e}function Gn(e){return e.some(t=>r.isVNode(t)?!(t.type===r.Comment||t.type===r.Fragment&&!Gn(t.children)):!0)?e:null}function Ct(e,t){return e&&Gn(e())||t()}function id(e,t,n){return e&&Gn(e(t))||n(t)}function Ae(e,t){const n=e&&Gn(e());return t(n||null)}function zn(e){return!(e&&Gn(e()))}function yo(e){const t=e.filter(n=>n!==void 0);if(t.length!==0)return t.length===1?t[0]:n=>{e.forEach(o=>{o&&o(n)})}}const wo=r.defineComponent({render(){var e,t;return(t=(e=this.$slots).default)===null||t===void 0?void 0:t.call(e)}}),ad=/^(\d|\.)+$/,Yi=/(\d|\.)+/;function xr(e,{c:t=1,offset:n=0,attachPx:o=!0}={}){if(typeof e=="number"){const i=(e+n)*t;return i===0?"0":`${i}px`}else if(typeof e=="string")if(ad.test(e)){const i=(Number(e)+n)*t;return o?i===0?"0":`${i}px`:`${i}`}else{const i=Yi.exec(e);return i?e.replace(Yi,String((Number(i[0])+n)*t)):e}return e}function yr(e){return e.replace(/#|\(|\)|,|\s|\./g,"_")}function ld(e){const{left:t,right:n,top:o,bottom:i}=st(e);return`${o} ${n} ${i} ${t}`}function sd(e){let t=0;for(let n=0;n<e.length;++n)e[n]==="&"&&++t;return t}const Zi=/\s*,(?![^(]*\))\s*/g,dd=/\s+/g;function cd(e,t){const n=[];return t.split(Zi).forEach(o=>{let i=sd(o);if(i){if(i===1){e.forEach(l=>{n.push(o.replace("&",l))});return}}else{e.forEach(l=>{n.push((l&&l+" ")+o)});return}let a=[o];for(;i--;){const l=[];a.forEach(s=>{e.forEach(d=>{l.push(s.replace("&",d))})}),a=l}a.forEach(l=>n.push(l))}),n}function ud(e,t){const n=[];return t.split(Zi).forEach(o=>{e.forEach(i=>{n.push((i&&i+" ")+o)})}),n}function fd(e){let t=[""];return e.forEach(n=>{n=n&&n.trim(),n&&(n.includes("&")?t=cd(t,n):t=ud(t,n))}),t.join(", ").replace(dd," ")}function Ji(e){if(!e)return;const t=e.parentElement;t&&t.removeChild(e)}function wr(e,t){return(t??document.head).querySelector(`style[cssr-id="${e}"]`)}function hd(e){const t=document.createElement("style");return t.setAttribute("cssr-id",e),t}function Cr(e){return e?/^\s*@(s|m)/.test(e):!1}const pd=/[A-Z]/g;function Qi(e){return e.replace(pd,t=>"-"+t.toLowerCase())}function bd(e,t=" "){return typeof e=="object"&&e!==null?` {
|
|
3
|
+
`+Object.entries(e).map(n=>t+` ${Qi(n[0])}: ${n[1]};`).join(`
|
|
4
4
|
`)+`
|
|
5
|
-
`+t+"}":`: ${e};`}function
|
|
5
|
+
`+t+"}":`: ${e};`}function gd(e,t,n){return typeof e=="function"?e({context:t.context,props:n}):e}function ea(e,t,n,o){if(!t)return"";const i=gd(t,n,o);if(!i)return"";if(typeof i=="string")return`${e} {
|
|
6
6
|
${i}
|
|
7
7
|
}`;const a=Object.keys(i);if(a.length===0)return n.config.keepEmptyBlock?e+` {
|
|
8
8
|
}`:"";const l=e?[e+" {"]:[];return a.forEach(s=>{const d=i[s];if(s==="raw"){l.push(`
|
|
9
9
|
`+d+`
|
|
10
|
-
`);return}s=
|
|
11
|
-
`)}function
|
|
10
|
+
`);return}s=Qi(s),d!=null&&l.push(` ${s}${bd(d)}`)}),e&&l.push("}"),l.join(`
|
|
11
|
+
`)}function Co(e,t,n){e&&e.forEach(o=>{if(Array.isArray(o))Co(o,t,n);else if(typeof o=="function"){const i=o(t);Array.isArray(i)?Co(i,t,n):i&&n(i)}else o&&n(o)})}function ta(e,t,n,o,i){const a=e.$;let l="";if(!a||typeof a=="string")Cr(a)?l=a:t.push(a);else if(typeof a=="function"){const c=a({context:o.context,props:i});Cr(c)?l=c:t.push(c)}else if(a.before&&a.before(o.context),!a.$||typeof a.$=="string")Cr(a.$)?l=a.$:t.push(a.$);else if(a.$){const c=a.$({context:o.context,props:i});Cr(c)?l=c:t.push(c)}const s=fd(t),d=ea(s,e.props,o,i);l?n.push(`${l} {`):d.length&&n.push(d),e.children&&Co(e.children,{context:o.context,props:i},c=>{if(typeof c=="string"){const f=ea(s,{raw:c},o,i);n.push(f)}else ta(c,t,n,o,i)}),t.pop(),l&&n.push("}"),a&&a.after&&a.after(o.context)}function md(e,t,n){const o=[];return ta(e,[],o,t,n),o.join(`
|
|
12
12
|
|
|
13
|
-
`)}function Cr(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 wd(e,t,n,r){const{els:i}=t;if(n===void 0)i.forEach(Zi),t.els=[];else{const a=wo(n,r);a&&i.includes(a)&&(Zi(a),t.els=i.filter(l=>l!==a))}}function ta(e,t){e.push(t)}function Cd(e,t,n,r,i,a,l,s,d){let c;if(n===void 0&&(c=t.render(r),n=Cr(c)),d){d.adapter(n,c??t.render(r));return}s===void 0&&(s=document.head);const f=wo(n,s);if(f!==null&&!a)return f;const u=f??gd(n);if(c===void 0&&(c=t.render(r)),u.textContent=c,f!==null)return f;if(l){const p=s.querySelector(`meta[name="${l}"]`);if(p)return s.insertBefore(u,p),ta(t.els,u),u}return i?s.insertBefore(u,s.querySelector("style, link")):s.appendChild(u),ta(t.els,u),u}function Sd(e){return yd(this,this.instance,e)}function $d(e={}){const{id:t,ssr:n,props:r,head:i=!1,force:a=!1,anchorMetaName:l,parent:s}=e;return Cd(this.instance,this,t,r,i,a,l,s,n)}function kd(e={}){const{id:t,parent:n}=e;wd(this.instance,this,t,n)}const So=function(e,t,n,r){return{instance:e,$:t,props:n,children:r,els:[],render:Sd,mount:$d,unmount:kd}},zd=function(e,t,n,r){return Array.isArray(t)?So(e,{$:null},null,t):Array.isArray(n)?So(e,t,null,n):Array.isArray(r)?So(e,t,n,r):So(e,t,n,null)};function na(e={}){const t={c:(...n)=>zd(t,...n),use:(n,...r)=>n.install(t,...r),find:wo,context:{},config:e};return t}function Td(e,t){if(e===void 0)return!1;if(t){const{context:{ids:n}}=t;return n.has(e)}return wo(e)!==null}function Pd(e){let t=".",n="__",r="--",i;if(e){let h=e.blockPrefix;h&&(t=h),h=e.elementPrefix,h&&(n=h),h=e.modifierPrefix,h&&(r=h)}const a={install(h){i=h.c;const v=h.context;v.bem={},v.bem.b=null,v.bem.els=null}};function l(h){let v,w;return{before(g){v=g.bem.b,w=g.bem.els,g.bem.els=null},after(g){g.bem.b=v,g.bem.els=w},$({context:g,props:P}){return h=typeof h=="string"?h:h({context:g,props:P}),g.bem.b=h,`${(P==null?void 0:P.bPrefix)||t}${g.bem.b}`}}}function s(h){let v;return{before(w){v=w.bem.els},after(w){w.bem.els=v},$({context:w,props:g}){return h=typeof h=="string"?h:h({context:w,props:g}),w.bem.els=h.split(",").map(P=>P.trim()),w.bem.els.map(P=>`${(g==null?void 0:g.bPrefix)||t}${w.bem.b}${n}${P}`).join(", ")}}}function d(h){return{$({context:v,props:w}){h=typeof h=="string"?h:h({context:v,props:w});const g=h.split(",").map($=>$.trim());function P($){return g.map(k=>`&${(w==null?void 0:w.bPrefix)||t}${v.bem.b}${$!==void 0?`${n}${$}`:""}${r}${k}`).join(", ")}const H=v.bem.els;if(H!==null){if(process.env.NODE_ENV!=="production"&&H.length>=2)throw Error(`[css-render/plugin-bem]: m(${h}) is invalid, using modifier inside multiple elements is not allowed`);return P(H[0])}else return P()}}}function c(h){return{$({context:v,props:w}){h=typeof h=="string"?h:h({context:v,props:w});const g=v.bem.els;if(process.env.NODE_ENV!=="production"&&g!==null&&g.length>=2)throw Error(`[css-render/plugin-bem]: notM(${h}) is invalid, using modifier inside multiple elements is not allowed`);return`&:not(${(w==null?void 0:w.bPrefix)||t}${v.bem.b}${g!==null&&g.length>0?`${n}${g[0]}`:""}${r}${h})`}}}return Object.assign(a,{cB:(...h)=>i(l(h[0]),h[1],h[2]),cE:(...h)=>i(s(h[0]),h[1],h[2]),cM:(...h)=>i(d(h[0]),h[1],h[2]),cNotM:(...h)=>i(c(h[0]),h[1],h[2])}),a}const $o=".n-",Rd="__",Bd="--",oa=na(),ra=Pd({blockPrefix:$o,elementPrefix:Rd,modifierPrefix:Bd});oa.use(ra);const{c:I,find:fy}=oa,{cB:y,cE:T,cM:W,cNotM:je}=ra;function _d(e){return I(({props:{bPrefix:t}})=>`${t||$o}modal, ${t||$o}drawer`,[e])}function Ed(e){return I(({props:{bPrefix:t}})=>`${t||$o}popover`,[e])}const Md=(...e)=>I(">",[y(...e)]);function ee(e,t){return e+(t==="default"?"":t.replace(/^[a-z]/,n=>n.toUpperCase()))}let Sr;function Id(){return Sr===void 0&&(Sr=navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom")),Sr}const ko=typeof document<"u"&&typeof window<"u",Od=new WeakSet;function Ad(e){Od.add(e)}function Fd(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 Xe(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)}}}const Dd=typeof window<"u";let Rn,qn;(()=>{var e,t;Rn=Dd?(t=(e=document)===null||e===void 0?void 0:e.fonts)===null||t===void 0?void 0:t.ready:void 0,qn=!1,Rn!==void 0?Rn.then(()=>{qn=!0}):qn=!0})();function ia(e){if(qn)return;let t=!1;o.onMounted(()=>{qn||Rn==null||Rn.then(()=>{t||e()})}),o.onBeforeUnmount(()=>{t=!0})}function zo(e){return e.composedPath()[0]}const Vd={mousemoveoutside:new WeakMap,clickoutside:new WeakMap};function Hd(e,t,n){if(e==="mousemoveoutside"){const r=i=>{t.contains(zo(i))||n(i)};return{mousemove:r,touchstart:r}}else if(e==="clickoutside"){let r=!1;const i=l=>{r=!t.contains(zo(l))},a=l=>{r&&(t.contains(zo(l))||n(l))};return{mousedown:i,mouseup:a,touchstart:i,touchend:a}}return console.error(`[evtd/create-trap-handler]: name \`${e}\` is invalid. This could be a bug of evtd.`),{}}function aa(e,t,n){const r=Vd[e];let i=r.get(t);i===void 0&&r.set(t,i=new WeakMap);let a=i.get(n);return a===void 0&&i.set(n,a=Hd(e,t,n)),a}function Ld(e,t,n,r){if(e==="mousemoveoutside"||e==="clickoutside"){const i=aa(e,t,n);return Object.keys(i).forEach(a=>{Pe(a,document,i[a],r)}),!0}return!1}function Nd(e,t,n,r){if(e==="mousemoveoutside"||e==="clickoutside"){const i=aa(e,t,n);return Object.keys(i).forEach(a=>{$e(a,document,i[a],r)}),!0}return!1}function Wd(){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,S,E){const D=b[S];return b[S]=function(){return E.apply(b,arguments),D.apply(b,arguments)},b}function a(b,S){b[S]=Event.prototype[S]}const l=new WeakMap,s=Object.getOwnPropertyDescriptor(Event.prototype,"currentTarget");function d(){var b;return(b=l.get(this))!==null&&b!==void 0?b:null}function c(b,S){s!==void 0&&Object.defineProperty(b,"currentTarget",{configurable:!0,enumerable:!0,get:S??s.get})}const f={bubble:{},capture:{}},u={};function p(){const b=function(S){const{type:E,eventPhase:D,bubbles:O}=S,V=zo(S);if(D===2)return;const j=D===1?"capture":"bubble";let Q=V;const N=[];for(;Q===null&&(Q=window),N.push(Q),Q!==window;)Q=Q.parentNode||null;const Z=f.capture[E],X=f.bubble[E];if(i(S,"stopPropagation",n),i(S,"stopImmediatePropagation",r),c(S,d),j==="capture"){if(Z===void 0)return;for(let Y=N.length-1;Y>=0&&!e.has(S);--Y){const de=N[Y],ie=Z.get(de);if(ie!==void 0){l.set(S,de);for(const ue of ie){if(t.has(S))break;ue(S)}}if(Y===0&&!O&&X!==void 0){const ue=X.get(de);if(ue!==void 0)for(const U of ue){if(t.has(S))break;U(S)}}}}else if(j==="bubble"){if(X===void 0)return;for(let Y=0;Y<N.length&&!e.has(S);++Y){const de=N[Y],ie=X.get(de);if(ie!==void 0){l.set(S,de);for(const ue of ie){if(t.has(S))break;ue(S)}}}}a(S,"stopPropagation"),a(S,"stopImmediatePropagation"),c(S)};return b.displayName="evtdUnifiedHandler",b}function m(){const b=function(S){const{type:E,eventPhase:D}=S;if(D!==2)return;const O=u[E];O!==void 0&&O.forEach(V=>V(S))};return b.displayName="evtdUnifiedWindowEventHandler",b}const h=p(),v=m();function w(b,S){const E=f[b];return E[S]===void 0&&(E[S]=new Map,window.addEventListener(S,h,b==="capture")),E[S]}function g(b){return u[b]===void 0&&(u[b]=new Set,window.addEventListener(b,v)),u[b]}function P(b,S){let E=b.get(S);return E===void 0&&b.set(S,E=new Set),E}function H(b,S,E,D){const O=f[S][E];if(O!==void 0){const V=O.get(b);if(V!==void 0&&V.has(D))return!0}return!1}function $(b,S){const E=u[b];return!!(E!==void 0&&E.has(S))}function k(b,S,E,D){let O;if(typeof D=="object"&&D.once===!0?O=Z=>{M(b,S,O,D),E(Z)}:O=E,Ld(b,S,O,D))return;const j=D===!0||typeof D=="object"&&D.capture===!0?"capture":"bubble",Q=w(j,b),N=P(Q,S);if(N.has(O)||N.add(O),S===window){const Z=g(b);Z.has(O)||Z.add(O)}}function M(b,S,E,D){if(Nd(b,S,E,D))return;const V=D===!0||typeof D=="object"&&D.capture===!0,j=V?"capture":"bubble",Q=w(j,b),N=P(Q,S);if(S===window&&!H(S,V?"bubble":"capture",b,E)&&$(b,E)){const X=u[b];X.delete(E),X.size===0&&(window.removeEventListener(b,v),u[b]=void 0)}N.has(E)&&N.delete(E),N.size===0&&Q.delete(S),Q.size===0&&(window.removeEventListener(b,h,j==="capture"),f[j][b]=void 0)}return{on:k,off:M}}const{on:Pe,off:$e}=Wd();function vt(e,t){return o.watch(e,n=>{n!==void 0&&(t.value=n)}),o.computed(()=>e.value===void 0?t.value:e.value)}function Bn(){const e=o.ref(!1);return o.onMounted(()=>{e.value=!0}),o.readonly(e)}function To(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 jd=(typeof window>"u"?!1:/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1)&&!window.MSStream;function Ud(){return jd}const $r="n-internal-select-menu",la="n-internal-select-menu-body",sa="n-modal-body",da="n-drawer-body",ca="n-popover-body",ua="__disabled__";function rt(e){const t=o.inject(sa,null),n=o.inject(da,null),r=o.inject(ca,null),i=o.inject(la,null),a=o.ref();if(typeof document<"u"){a.value=document.fullscreenElement;const l=()=>{a.value=document.fullscreenElement};o.onMounted(()=>{Pe("fullscreenchange",document,l)}),o.onBeforeUnmount(()=>{$e("fullscreenchange",document,l)})}return Xe(()=>{var l;const{to:s}=e;return s!==void 0?s===!1?ua:s===!0?a.value||"body":s:t!=null&&t.value?(l=t.value.$el)!==null&&l!==void 0?l:t.value:n!=null&&n.value?n.value:r!=null&&r.value?r.value:i!=null&&i.value?i.value:s??(a.value||"body")})}rt.tdkey=ua,rt.propTo={type:[String,Object,Boolean],default:void 0};function kr(e,t,n="default"){const r=t[n];if(r===void 0)throw new Error(`[vueuc/${e}]: slot[${n}] is empty.`);return r()}function zr(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)){zr(r,t,n);return}if(r.type===o.Fragment){if(r.children===null)return;Array.isArray(r.children)&&zr(r.children,t,n)}else r.type!==o.Comment&&n.push(r)}}),n}function fa(e,t,n="default"){const r=t[n];if(r===void 0)throw new Error(`[vueuc/${e}]: slot[${n}] is empty.`);const i=zr(r());if(i.length===1)return i[0];throw new Error(`[vueuc/${e}]: slot[${n}] should have exactly one child.`)}let Nt=null;function ha(){if(Nt===null&&(Nt=document.getElementById("v-binder-view-measurer"),Nt===null)){Nt=document.createElement("div"),Nt.id="v-binder-view-measurer";const{style:e}=Nt;e.position="fixed",e.left="0",e.right="0",e.top="0",e.bottom="0",e.pointerEvents="none",e.visibility="hidden",document.body.appendChild(Nt)}return Nt.getBoundingClientRect()}function Gd(e,t){const n=ha();return{top:t,left:e,height:0,width:0,right:n.width-e,bottom:n.height-t}}function Tr(e){const t=e.getBoundingClientRect(),n=ha();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 Kd(e){return e.nodeType===9?null:e.parentNode}function pa(e){if(e===null)return null;const t=Kd(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 pa(t)}const Po=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=g=>{r.value=g,n&&e.syncTargetWithParent&&n.setTargetRef(g)};let a=[];const l=()=>{let g=r.value;for(;g=pa(g),g!==null;)a.push(g);for(const P of a)Pe("scroll",P,u,!0)},s=()=>{for(const g of a)$e("scroll",g,u,!0);a=[]},d=new Set,c=g=>{d.size===0&&l(),d.has(g)||d.add(g)},f=g=>{d.has(g)&&d.delete(g),d.size===0&&s()},u=()=>{Wi(p)},p=()=>{d.forEach(g=>g())},m=new Set,h=g=>{m.size===0&&Pe("resize",window,w),m.has(g)||m.add(g)},v=g=>{m.has(g)&&m.delete(g),m.size===0&&$e("resize",window,w)},w=()=>{m.forEach(g=>g())};return o.onBeforeUnmount(()=>{$e("resize",window,w),s()}),{targetRef:r,setTargetRef:i,addScrollListener:c,removeScrollListener:f,addResizeListener:h,removeResizeListener:v}},render(){return kr("binder",this.$slots)}}),Ro=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(fa("follower",this.$slots),[[t]]):fa("follower",this.$slots)}}),_n="@@mmoContext",ba={mounted(e,{value:t}){e[_n]={handler:void 0},typeof t=="function"&&(e[_n].handler=t,Pe("mousemoveoutside",e,t))},updated(e,{value:t}){const n=e[_n];typeof t=="function"?n.handler?n.handler!==t&&($e("mousemoveoutside",e,n.handler),n.handler=t,Pe("mousemoveoutside",e,t)):(e[_n].handler=t,Pe("mousemoveoutside",e,t)):n.handler&&($e("mousemoveoutside",e,n.handler),n.handler=void 0)},unmounted(e){const{handler:t}=e[_n];t&&$e("mousemoveoutside",e,t),e[_n].handler=void 0}},En="@@coContext",Xn={mounted(e,{value:t,modifiers:n}){e[En]={handler:void 0},typeof t=="function"&&(e[En].handler=t,Pe("clickoutside",e,t,{capture:n.capture}))},updated(e,{value:t,modifiers:n}){const r=e[En];typeof t=="function"?r.handler?r.handler!==t&&($e("clickoutside",e,r.handler,{capture:n.capture}),r.handler=t,Pe("clickoutside",e,t,{capture:n.capture})):(e[En].handler=t,Pe("clickoutside",e,t,{capture:n.capture})):r.handler&&($e("clickoutside",e,r.handler,{capture:n.capture}),r.handler=void 0)},unmounted(e,{modifiers:t}){const{handler:n}=e[En];n&&$e("clickoutside",e,n,{capture:t.capture}),e[En].handler=void 0}};function qd(e,t){console.error(`[vdirs/${e}]: ${t}`)}class Xd{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&&qd("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 Pr=new Xd,Mn="@@ziContext",ga={mounted(e,t){const{value:n={}}=t,{zIndex:r,enabled:i}=n;e[Mn]={enabled:!!i,initialized:!1},i&&(Pr.ensureZIndex(e,r),e[Mn].initialized=!0)},updated(e,t){const{value:n={}}=t,{zIndex:r,enabled:i}=n,a=e[Mn].enabled;i&&!a&&(Pr.ensureZIndex(e,r),e[Mn].initialized=!0),e[Mn].enabled=!!i},unmounted(e,t){if(!e[Mn].initialized)return;const{value:n={}}=t,{zIndex:r}=n;Pr.unregister(e,r)}},Yd="@css-render/vue3-ssr";function Zd(e,t){return`<style cssr-id="${e}">
|
|
13
|
+
`)}function So(e){for(var t=0,n,o=0,i=e.length;i>=4;++o,i-=4)n=e.charCodeAt(o)&255|(e.charCodeAt(++o)&255)<<8|(e.charCodeAt(++o)&255)<<16|(e.charCodeAt(++o)&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(o+2)&255)<<16;case 2:t^=(e.charCodeAt(o+1)&255)<<8;case 1:t^=e.charCodeAt(o)&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 vd(e,t,n,o){const{els:i}=t;if(n===void 0)i.forEach(Ji),t.els=[];else{const a=wr(n,o);a&&i.includes(a)&&(Ji(a),t.els=i.filter(l=>l!==a))}}function na(e,t){e.push(t)}function xd(e,t,n,o,i,a,l,s,d){let c;if(n===void 0&&(c=t.render(o),n=So(c)),d){d.adapter(n,c??t.render(o));return}s===void 0&&(s=document.head);const f=wr(n,s);if(f!==null&&!a)return f;const u=f??hd(n);if(c===void 0&&(c=t.render(o)),u.textContent=c,f!==null)return f;if(l){const b=s.querySelector(`meta[name="${l}"]`);if(b)return s.insertBefore(u,b),na(t.els,u),u}return i?s.insertBefore(u,s.querySelector("style, link")):s.appendChild(u),na(t.els,u),u}function yd(e){return md(this,this.instance,e)}function wd(e={}){const{id:t,ssr:n,props:o,head:i=!1,force:a=!1,anchorMetaName:l,parent:s}=e;return xd(this.instance,this,t,o,i,a,l,s,n)}function Cd(e={}){const{id:t,parent:n}=e;vd(this.instance,this,t,n)}const Sr=function(e,t,n,o){return{instance:e,$:t,props:n,children:o,els:[],render:yd,mount:wd,unmount:Cd}},Sd=function(e,t,n,o){return Array.isArray(t)?Sr(e,{$:null},null,t):Array.isArray(n)?Sr(e,t,null,n):Array.isArray(o)?Sr(e,t,n,o):Sr(e,t,n,null)};function ra(e={}){const t={c:(...n)=>Sd(t,...n),use:(n,...o)=>n.install(t,...o),find:wr,context:{},config:e};return t}function $d(e,t){if(e===void 0)return!1;if(t){const{context:{ids:n}}=t;return n.has(e)}return wr(e)!==null}function kd(e){let t=".",n="__",o="--",i;if(e){let h=e.blockPrefix;h&&(t=h),h=e.elementPrefix,h&&(n=h),h=e.modifierPrefix,h&&(o=h)}const a={install(h){i=h.c;const x=h.context;x.bem={},x.bem.b=null,x.bem.els=null}};function l(h){let x,w;return{before(g){x=g.bem.b,w=g.bem.els,g.bem.els=null},after(g){g.bem.b=x,g.bem.els=w},$({context:g,props:P}){return h=typeof h=="string"?h:h({context:g,props:P}),g.bem.b=h,`${(P==null?void 0:P.bPrefix)||t}${g.bem.b}`}}}function s(h){let x;return{before(w){x=w.bem.els},after(w){w.bem.els=x},$({context:w,props:g}){return h=typeof h=="string"?h:h({context:w,props:g}),w.bem.els=h.split(",").map(P=>P.trim()),w.bem.els.map(P=>`${(g==null?void 0:g.bPrefix)||t}${w.bem.b}${n}${P}`).join(", ")}}}function d(h){return{$({context:x,props:w}){h=typeof h=="string"?h:h({context:x,props:w});const g=h.split(",").map($=>$.trim());function P($){return g.map(k=>`&${(w==null?void 0:w.bPrefix)||t}${x.bem.b}${$!==void 0?`${n}${$}`:""}${o}${k}`).join(", ")}const L=x.bem.els;if(L!==null){if(process.env.NODE_ENV!=="production"&&L.length>=2)throw Error(`[css-render/plugin-bem]: m(${h}) is invalid, using modifier inside multiple elements is not allowed`);return P(L[0])}else return P()}}}function c(h){return{$({context:x,props:w}){h=typeof h=="string"?h:h({context:x,props:w});const g=x.bem.els;if(process.env.NODE_ENV!=="production"&&g!==null&&g.length>=2)throw Error(`[css-render/plugin-bem]: notM(${h}) is invalid, using modifier inside multiple elements is not allowed`);return`&:not(${(w==null?void 0:w.bPrefix)||t}${x.bem.b}${g!==null&&g.length>0?`${n}${g[0]}`:""}${o}${h})`}}}return Object.assign(a,{cB:(...h)=>i(l(h[0]),h[1],h[2]),cE:(...h)=>i(s(h[0]),h[1],h[2]),cM:(...h)=>i(d(h[0]),h[1],h[2]),cNotM:(...h)=>i(c(h[0]),h[1],h[2])}),a}const $r=".n-",Td="__",zd="--",oa=ra(),ia=kd({blockPrefix:$r,elementPrefix:Td,modifierPrefix:zd});oa.use(ia);const{c:V,find:oy}=oa,{cB:y,cE:R,cM:W,cNotM:je}=ia;function Pd(e){return V(({props:{bPrefix:t}})=>`${t||$r}modal, ${t||$r}drawer`,[e])}function Rd(e){return V(({props:{bPrefix:t}})=>`${t||$r}popover`,[e])}const _d=(...e)=>V(">",[y(...e)]);function ee(e,t){return e+(t==="default"?"":t.replace(/^[a-z]/,n=>n.toUpperCase()))}let $o;function Ed(){return $o===void 0&&($o=navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom")),$o}const kr=typeof document<"u"&&typeof window<"u",Bd=new WeakSet;function Md(e){Bd.add(e)}function Id(e){const t=r.ref(!!e.value);if(t.value)return r.readonly(t);const n=r.watch(e,o=>{o&&(t.value=!0,n())});return r.readonly(t)}function Xe(e){const t=r.computed(e),n=r.ref(t.value);return r.watch(t,o=>{n.value=o}),typeof e=="function"?n:{__v_isRef:!0,get value(){return n.value},set value(o){e.set(o)}}}const Od=typeof window<"u";let Pn,Kn;(()=>{var e,t;Pn=Od?(t=(e=document)===null||e===void 0?void 0:e.fonts)===null||t===void 0?void 0:t.ready:void 0,Kn=!1,Pn!==void 0?Pn.then(()=>{Kn=!0}):Kn=!0})();function aa(e){if(Kn)return;let t=!1;r.onMounted(()=>{Kn||Pn==null||Pn.then(()=>{t||e()})}),r.onBeforeUnmount(()=>{t=!0})}function Tr(e){return e.composedPath()[0]}const Ad={mousemoveoutside:new WeakMap,clickoutside:new WeakMap};function Fd(e,t,n){if(e==="mousemoveoutside"){const o=i=>{t.contains(Tr(i))||n(i)};return{mousemove:o,touchstart:o}}else if(e==="clickoutside"){let o=!1;const i=l=>{o=!t.contains(Tr(l))},a=l=>{o&&(t.contains(Tr(l))||n(l))};return{mousedown:i,mouseup:a,touchstart:i,touchend:a}}return console.error(`[evtd/create-trap-handler]: name \`${e}\` is invalid. This could be a bug of evtd.`),{}}function la(e,t,n){const o=Ad[e];let i=o.get(t);i===void 0&&o.set(t,i=new WeakMap);let a=i.get(n);return a===void 0&&i.set(n,a=Fd(e,t,n)),a}function Dd(e,t,n,o){if(e==="mousemoveoutside"||e==="clickoutside"){const i=la(e,t,n);return Object.keys(i).forEach(a=>{Pe(a,document,i[a],o)}),!0}return!1}function Vd(e,t,n,o){if(e==="mousemoveoutside"||e==="clickoutside"){const i=la(e,t,n);return Object.keys(i).forEach(a=>{$e(a,document,i[a],o)}),!0}return!1}function Ld(){if(typeof window>"u")return{on:()=>{},off:()=>{}};const e=new WeakMap,t=new WeakMap;function n(){e.set(this,!0)}function o(){e.set(this,!0),t.set(this,!0)}function i(p,S,B){const F=p[S];return p[S]=function(){return B.apply(p,arguments),F.apply(p,arguments)},p}function a(p,S){p[S]=Event.prototype[S]}const l=new WeakMap,s=Object.getOwnPropertyDescriptor(Event.prototype,"currentTarget");function d(){var p;return(p=l.get(this))!==null&&p!==void 0?p:null}function c(p,S){s!==void 0&&Object.defineProperty(p,"currentTarget",{configurable:!0,enumerable:!0,get:S??s.get})}const f={bubble:{},capture:{}},u={};function b(){const p=function(S){const{type:B,eventPhase:F,bubbles:I}=S,D=Tr(S);if(F===2)return;const j=F===1?"capture":"bubble";let Q=D;const N=[];for(;Q===null&&(Q=window),N.push(Q),Q!==window;)Q=Q.parentNode||null;const Z=f.capture[B],q=f.bubble[B];if(i(S,"stopPropagation",n),i(S,"stopImmediatePropagation",o),c(S,d),j==="capture"){if(Z===void 0)return;for(let Y=N.length-1;Y>=0&&!e.has(S);--Y){const de=N[Y],ie=Z.get(de);if(ie!==void 0){l.set(S,de);for(const ce of ie){if(t.has(S))break;ce(S)}}if(Y===0&&!I&&q!==void 0){const ce=q.get(de);if(ce!==void 0)for(const U of ce){if(t.has(S))break;U(S)}}}}else if(j==="bubble"){if(q===void 0)return;for(let Y=0;Y<N.length&&!e.has(S);++Y){const de=N[Y],ie=q.get(de);if(ie!==void 0){l.set(S,de);for(const ce of ie){if(t.has(S))break;ce(S)}}}}a(S,"stopPropagation"),a(S,"stopImmediatePropagation"),c(S)};return p.displayName="evtdUnifiedHandler",p}function m(){const p=function(S){const{type:B,eventPhase:F}=S;if(F!==2)return;const I=u[B];I!==void 0&&I.forEach(D=>D(S))};return p.displayName="evtdUnifiedWindowEventHandler",p}const h=b(),x=m();function w(p,S){const B=f[p];return B[S]===void 0&&(B[S]=new Map,window.addEventListener(S,h,p==="capture")),B[S]}function g(p){return u[p]===void 0&&(u[p]=new Set,window.addEventListener(p,x)),u[p]}function P(p,S){let B=p.get(S);return B===void 0&&p.set(S,B=new Set),B}function L(p,S,B,F){const I=f[S][B];if(I!==void 0){const D=I.get(p);if(D!==void 0&&D.has(F))return!0}return!1}function $(p,S){const B=u[p];return!!(B!==void 0&&B.has(S))}function k(p,S,B,F){let I;if(typeof F=="object"&&F.once===!0?I=Z=>{M(p,S,I,F),B(Z)}:I=B,Dd(p,S,I,F))return;const j=F===!0||typeof F=="object"&&F.capture===!0?"capture":"bubble",Q=w(j,p),N=P(Q,S);if(N.has(I)||N.add(I),S===window){const Z=g(p);Z.has(I)||Z.add(I)}}function M(p,S,B,F){if(Vd(p,S,B,F))return;const D=F===!0||typeof F=="object"&&F.capture===!0,j=D?"capture":"bubble",Q=w(j,p),N=P(Q,S);if(S===window&&!L(S,D?"bubble":"capture",p,B)&&$(p,B)){const q=u[p];q.delete(B),q.size===0&&(window.removeEventListener(p,x),u[p]=void 0)}N.has(B)&&N.delete(B),N.size===0&&Q.delete(S),Q.size===0&&(window.removeEventListener(p,h,j==="capture"),f[j][p]=void 0)}return{on:k,off:M}}const{on:Pe,off:$e}=Ld();function St(e,t){return r.watch(e,n=>{n!==void 0&&(t.value=n)}),r.computed(()=>e.value===void 0?t.value:e.value)}function Rn(){const e=r.ref(!1);return r.onMounted(()=>{e.value=!0}),r.readonly(e)}function zr(e,t){return r.computed(()=>{for(const n of t)if(e[n]!==void 0)return e[n];return e[t[t.length-1]]})}const Hd=(typeof window>"u"?!1:/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1)&&!window.MSStream;function Nd(){return Hd}const ko="n-internal-select-menu",sa="n-internal-select-menu-body",da="n-modal-body",ca="n-drawer-body",ua="n-popover-body",fa="__disabled__";function ot(e){const t=r.inject(da,null),n=r.inject(ca,null),o=r.inject(ua,null),i=r.inject(sa,null),a=r.ref();if(typeof document<"u"){a.value=document.fullscreenElement;const l=()=>{a.value=document.fullscreenElement};r.onMounted(()=>{Pe("fullscreenchange",document,l)}),r.onBeforeUnmount(()=>{$e("fullscreenchange",document,l)})}return Xe(()=>{var l;const{to:s}=e;return s!==void 0?s===!1?fa:s===!0?a.value||"body":s:t!=null&&t.value?(l=t.value.$el)!==null&&l!==void 0?l:t.value:n!=null&&n.value?n.value:o!=null&&o.value?o.value:i!=null&&i.value?i.value:s??(a.value||"body")})}ot.tdkey=fa,ot.propTo={type:[String,Object,Boolean],default:void 0};function To(e,t,n="default"){const o=t[n];if(o===void 0)throw new Error(`[vueuc/${e}]: slot[${n}] is empty.`);return o()}function zo(e,t=!0,n=[]){return e.forEach(o=>{if(o!==null){if(typeof o!="object"){(typeof o=="string"||typeof o=="number")&&n.push(r.createTextVNode(String(o)));return}if(Array.isArray(o)){zo(o,t,n);return}if(o.type===r.Fragment){if(o.children===null)return;Array.isArray(o.children)&&zo(o.children,t,n)}else o.type!==r.Comment&&n.push(o)}}),n}function ha(e,t,n="default"){const o=t[n];if(o===void 0)throw new Error(`[vueuc/${e}]: slot[${n}] is empty.`);const i=zo(o());if(i.length===1)return i[0];throw new Error(`[vueuc/${e}]: slot[${n}] should have exactly one child.`)}let Ht=null;function pa(){if(Ht===null&&(Ht=document.getElementById("v-binder-view-measurer"),Ht===null)){Ht=document.createElement("div"),Ht.id="v-binder-view-measurer";const{style:e}=Ht;e.position="fixed",e.left="0",e.right="0",e.top="0",e.bottom="0",e.pointerEvents="none",e.visibility="hidden",document.body.appendChild(Ht)}return Ht.getBoundingClientRect()}function Wd(e,t){const n=pa();return{top:t,left:e,height:0,width:0,right:n.width-e,bottom:n.height-t}}function Po(e){const t=e.getBoundingClientRect(),n=pa();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 jd(e){return e.nodeType===9?null:e.parentNode}function ba(e){if(e===null)return null;const t=jd(e);if(t===null)return null;if(t.nodeType===9)return document;if(t.nodeType===1){const{overflow:n,overflowX:o,overflowY:i}=getComputedStyle(t);if(/(auto|scroll|overlay)/.test(n+i+o))return t}return ba(t)}const Pr=r.defineComponent({name:"Binder",props:{syncTargetWithParent:Boolean,syncTarget:{type:Boolean,default:!0}},setup(e){var t;r.provide("VBinder",(t=r.getCurrentInstance())===null||t===void 0?void 0:t.proxy);const n=r.inject("VBinder",null),o=r.ref(null),i=g=>{o.value=g,n&&e.syncTargetWithParent&&n.setTargetRef(g)};let a=[];const l=()=>{let g=o.value;for(;g=ba(g),g!==null;)a.push(g);for(const P of a)Pe("scroll",P,u,!0)},s=()=>{for(const g of a)$e("scroll",g,u,!0);a=[]},d=new Set,c=g=>{d.size===0&&l(),d.has(g)||d.add(g)},f=g=>{d.has(g)&&d.delete(g),d.size===0&&s()},u=()=>{ji(b)},b=()=>{d.forEach(g=>g())},m=new Set,h=g=>{m.size===0&&Pe("resize",window,w),m.has(g)||m.add(g)},x=g=>{m.has(g)&&m.delete(g),m.size===0&&$e("resize",window,w)},w=()=>{m.forEach(g=>g())};return r.onBeforeUnmount(()=>{$e("resize",window,w),s()}),{targetRef:o,setTargetRef:i,addScrollListener:c,removeScrollListener:f,addResizeListener:h,removeResizeListener:x}},render(){return To("binder",this.$slots)}}),Rr=r.defineComponent({name:"Target",setup(){const{setTargetRef:e,syncTarget:t}=r.inject("VBinder");return{syncTarget:t,setTargetDirective:{mounted:e,updated:e}}},render(){const{syncTarget:e,setTargetDirective:t}=this;return e?r.withDirectives(ha("follower",this.$slots),[[t]]):ha("follower",this.$slots)}}),_n="@@mmoContext",Ud={mounted(e,{value:t}){e[_n]={handler:void 0},typeof t=="function"&&(e[_n].handler=t,Pe("mousemoveoutside",e,t))},updated(e,{value:t}){const n=e[_n];typeof t=="function"?n.handler?n.handler!==t&&($e("mousemoveoutside",e,n.handler),n.handler=t,Pe("mousemoveoutside",e,t)):(e[_n].handler=t,Pe("mousemoveoutside",e,t)):n.handler&&($e("mousemoveoutside",e,n.handler),n.handler=void 0)},unmounted(e){const{handler:t}=e[_n];t&&$e("mousemoveoutside",e,t),e[_n].handler=void 0}},En="@@coContext",Xn={mounted(e,{value:t,modifiers:n}){e[En]={handler:void 0},typeof t=="function"&&(e[En].handler=t,Pe("clickoutside",e,t,{capture:n.capture}))},updated(e,{value:t,modifiers:n}){const o=e[En];typeof t=="function"?o.handler?o.handler!==t&&($e("clickoutside",e,o.handler,{capture:n.capture}),o.handler=t,Pe("clickoutside",e,t,{capture:n.capture})):(e[En].handler=t,Pe("clickoutside",e,t,{capture:n.capture})):o.handler&&($e("clickoutside",e,o.handler,{capture:n.capture}),o.handler=void 0)},unmounted(e,{modifiers:t}){const{handler:n}=e[En];n&&$e("clickoutside",e,n,{capture:t.capture}),e[En].handler=void 0}};function Gd(e,t){console.error(`[vdirs/${e}]: ${t}`)}class Kd{constructor(){this.elementZIndex=new Map,this.nextZIndex=2e3}get elementCount(){return this.elementZIndex.size}ensureZIndex(t,n){const{elementZIndex:o}=this;if(n!==void 0){t.style.zIndex=`${n}`,o.delete(t);return}const{nextZIndex:i}=this;o.has(t)&&o.get(t)+1===this.nextZIndex||(t.style.zIndex=`${i}`,o.set(t,i),this.nextZIndex=i+1,this.squashState())}unregister(t,n){const{elementZIndex:o}=this;o.has(t)?o.delete(t):n===void 0&&Gd("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,o)=>n[1]-o[1]),this.nextZIndex=2e3,t.forEach(n=>{const o=n[0],i=this.nextZIndex++;`${i}`!==o.style.zIndex&&(o.style.zIndex=`${i}`)})}}const Ro=new Kd,Bn="@@ziContext",ga={mounted(e,t){const{value:n={}}=t,{zIndex:o,enabled:i}=n;e[Bn]={enabled:!!i,initialized:!1},i&&(Ro.ensureZIndex(e,o),e[Bn].initialized=!0)},updated(e,t){const{value:n={}}=t,{zIndex:o,enabled:i}=n,a=e[Bn].enabled;i&&!a&&(Ro.ensureZIndex(e,o),e[Bn].initialized=!0),e[Bn].enabled=!!i},unmounted(e,t){if(!e[Bn].initialized)return;const{value:n={}}=t,{zIndex:o}=n;Ro.unregister(e,o)}},Xd="@css-render/vue3-ssr";function qd(e,t){return`<style cssr-id="${e}">
|
|
14
14
|
${t}
|
|
15
|
-
</style>`}function Jd(e,t,n){const{styles:r,ids:i}=n;i.has(e)||r!==null&&(i.add(e),r.push(Zd(e,t)))}const Qd=typeof document<"u";function Wt(){if(Qd)return;const e=o.inject(Yd,null);if(e!==null)return{adapter:(t,n)=>Jd(t,n,e),context:e}}function ma(e,t){console.error(`[vueuc/${e}]: ${t}`)}const{c:kt}=na(),Bo="vueuc-style";function va(e){return e&-e}class ec{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+=va(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 a=t*r;for(;t>0;)a+=n[t],t-=va(t);return a}getBound(t){let n=0,r=this.l;for(;r>n;){const i=Math.floor((n+r)/2),a=this.sum(i);if(a>t){r=i;continue}else if(a<t){if(n===i)return this.sum(n+1)<=t?n+1:i;n=i}else return i}return n}}function xa(e){return typeof e=="string"?document.querySelector(e):e()}const tc=o.defineComponent({name:"LazyTeleport",props:{to:{type:[String,Object],default:void 0},disabled:Boolean,show:{type:Boolean,required:!0}},setup(e){return{showTeleport:Fd(o.toRef(e,"show")),mergedTo:o.computed(()=>{const{to:t}=e;return t??"body"})}},render(){return this.showTeleport?this.disabled?kr("lazy-teleport",this.$slots):o.h(o.Teleport,{disabled:this.disabled,to:this.mergedTo},kr("lazy-teleport",this.$slots)):null}}),_o={top:"bottom",bottom:"top",left:"right",right:"left"},ya={start:"end",center:"center",end:"start"},Rr={top:"height",bottom:"height",left:"width",right:"width"},nc={"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"},oc={"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"},rc={"bottom-start":"right","bottom-end":"left","top-start":"right","top-end":"left","right-start":"bottom","right-end":"top","left-start":"bottom","left-end":"top"},wa={top:!0,bottom:!1,left:!0,right:!1},Ca={top:"end",bottom:"start",left:"end",right:"start"};function ic(e,t,n,r,i,a){if(!i||a)return{placement:e,top:0,left:0};const[l,s]=e.split("-");let d=s??"center",c={top:0,left:0};const f=(m,h,v)=>{let w=0,g=0;const P=n[m]-t[h]-t[m];return P>0&&r&&(v?g=wa[h]?P:-P:w=wa[h]?P:-P),{left:w,top:g}},u=l==="left"||l==="right";if(d!=="center"){const m=rc[e],h=_o[m],v=Rr[m];if(n[v]>t[v]){if(t[m]+t[v]<n[v]){const w=(n[v]-t[v])/2;t[m]<w||t[h]<w?t[m]<t[h]?(d=ya[s],c=f(v,h,u)):c=f(v,m,u):d="center"}}else n[v]<t[v]&&t[h]<0&&t[m]>t[h]&&(d=ya[s])}else{const m=l==="bottom"||l==="top"?"left":"top",h=_o[m],v=Rr[m],w=(n[v]-t[v])/2;(t[m]<w||t[h]<w)&&(t[m]>t[h]?(d=Ca[m],c=f(v,m,u)):(d=Ca[h],c=f(v,h,u)))}let p=l;return t[l]<n[Rr[l]]&&t[l]<t[_o[l]]&&(p=_o[l]),{placement:d!=="center"?`${p}-${d}`:p,left:c.left,top:c.top}}function ac(e,t){return t?oc[e]:nc[e]}function lc(e,t,n,r,i,a){if(a)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 sc=kt([kt(".v-binder-follower-container",{position:"absolute",left:"0",right:"0",top:"0",height:"0",pointerEvents:"none",zIndex:"auto"}),kt(".v-binder-follower-content",{position:"absolute",zIndex:"auto"},[kt("> *",{pointerEvents:"all"})])]),Eo=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=Xe(()=>e.enabled!==void 0?e.enabled:e.show),r=o.ref(null),i=o.ref(null),a=()=>{const{syncTrigger:p}=e;p.includes("scroll")&&t.addScrollListener(d),p.includes("resize")&&t.addResizeListener(d)},l=()=>{t.removeScrollListener(d),t.removeResizeListener(d)};o.onMounted(()=>{n.value&&(d(),a())});const s=Wt();sc.mount({id:"vueuc/binder",head:!0,anchorMetaName:Bo,ssr:s}),o.onBeforeUnmount(()=>{l()}),ia(()=>{n.value&&d()});const d=()=>{if(!n.value)return;const p=r.value;if(p===null)return;const m=t.targetRef,{x:h,y:v,overlap:w}=e,g=h!==void 0&&v!==void 0?Gd(h,v):Tr(m);p.style.setProperty("--v-target-width",`${Math.round(g.width)}px`),p.style.setProperty("--v-target-height",`${Math.round(g.height)}px`);const{width:P,minWidth:H,placement:$,internalShift:k,flip:M}=e;p.setAttribute("v-placement",$),w?p.setAttribute("v-overlap",""):p.removeAttribute("v-overlap");const{style:b}=p;P==="target"?b.width=`${g.width}px`:P!==void 0?b.width=P:b.width="",H==="target"?b.minWidth=`${g.width}px`:H!==void 0?b.minWidth=H:b.minWidth="";const S=Tr(p),E=Tr(i.value),{left:D,top:O,placement:V}=ic($,g,S,k,M,w),j=ac(V,w),{left:Q,top:N,transform:Z}=lc(V,E,g,O,D,w);p.setAttribute("v-placement",V),p.style.setProperty("--v-offset-left",`${Math.round(D)}px`),p.style.setProperty("--v-offset-top",`${Math.round(O)}px`),p.style.transform=`translateX(${Q}) translateY(${N}) ${Z}`,p.style.setProperty("--v-transform-origin",j),p.style.transformOrigin=j};o.watch(n,p=>{p?(a(),c()):l()});const c=()=>{o.nextTick().then(d).catch(p=>console.error(p))};["placement","x","y","internalShift","flip","width","overlap","minWidth"].forEach(p=>{o.watch(o.toRef(e,p),d)}),["teleportDisabled"].forEach(p=>{o.watch(o.toRef(e,p),c)}),o.watch(o.toRef(e,"syncTrigger"),p=>{p.includes("resize")?t.addResizeListener(d):t.removeResizeListener(d),p.includes("scroll")?t.addScrollListener(d):t.removeScrollListener(d)});const f=Bn(),u=Xe(()=>{const{to:p}=e;if(p!==void 0)return p;f.value});return{VBinder:t,mergedEnabled:n,offsetContainerRef:i,followerRef:r,mergedTo:u,syncPosition:d}},render(){return o.h(tc,{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,[[ga,{enabled:this.mergedEnabled,zIndex:this.zIndex}]]):n}})}});var sn=[],dc=function(){return sn.some(function(e){return e.activeTargets.length>0})},cc=function(){return sn.some(function(e){return e.skippedTargets.length>0})},Sa="ResizeObserver loop completed with undelivered notifications.",uc=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:Sa}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=Sa),window.dispatchEvent(e)},Yn;(function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Yn||(Yn={}));var dn=function(e){return Object.freeze(e)},fc=function(){function e(t,n){this.inlineSize=t,this.blockSize=n,dn(this)}return e}(),$a=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,dn(this)}return e.prototype.toJSON=function(){var t=this,n=t.x,r=t.y,i=t.top,a=t.right,l=t.bottom,s=t.left,d=t.width,c=t.height;return{x:n,y:r,top:i,right:a,bottom:l,left:s,width:d,height:c}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),Br=function(e){return e instanceof SVGElement&&"getBBox"in e},ka=function(e){if(Br(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var i=e,a=i.offsetWidth,l=i.offsetHeight;return!(a||l||e.getClientRects().length)},za=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)},hc=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},Zn=typeof window<"u"?window:{},Mo=new WeakMap,Ta=/auto|scroll/,pc=/^tb|vertical/,bc=/msie|trident/i.test(Zn.navigator&&Zn.navigator.userAgent),zt=function(e){return parseFloat(e||"0")},In=function(e,t,n){return e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=!1),new fc((n?t:e)||0,(n?e:t)||0)},Pa=dn({devicePixelContentBoxSize:In(),borderBoxSize:In(),contentBoxSize:In(),contentRect:new $a(0,0,0,0)}),Ra=function(e,t){if(t===void 0&&(t=!1),Mo.has(e)&&!t)return Mo.get(e);if(ka(e))return Mo.set(e,Pa),Pa;var n=getComputedStyle(e),r=Br(e)&&e.ownerSVGElement&&e.getBBox(),i=!bc&&n.boxSizing==="border-box",a=pc.test(n.writingMode||""),l=!r&&Ta.test(n.overflowY||""),s=!r&&Ta.test(n.overflowX||""),d=r?0:zt(n.paddingTop),c=r?0:zt(n.paddingRight),f=r?0:zt(n.paddingBottom),u=r?0:zt(n.paddingLeft),p=r?0:zt(n.borderTopWidth),m=r?0:zt(n.borderRightWidth),h=r?0:zt(n.borderBottomWidth),v=r?0:zt(n.borderLeftWidth),w=u+c,g=d+f,P=v+m,H=p+h,$=s?e.offsetHeight-H-e.clientHeight:0,k=l?e.offsetWidth-P-e.clientWidth:0,M=i?w+P:0,b=i?g+H:0,S=r?r.width:zt(n.width)-M-k,E=r?r.height:zt(n.height)-b-$,D=S+w+k+P,O=E+g+$+H,V=dn({devicePixelContentBoxSize:In(Math.round(S*devicePixelRatio),Math.round(E*devicePixelRatio),a),borderBoxSize:In(D,O,a),contentBoxSize:In(S,E,a),contentRect:new $a(u,d,S,E)});return Mo.set(e,V),V},Ba=function(e,t,n){var r=Ra(e,n),i=r.borderBoxSize,a=r.contentBoxSize,l=r.devicePixelContentBoxSize;switch(t){case Yn.DEVICE_PIXEL_CONTENT_BOX:return l;case Yn.BORDER_BOX:return i;default:return a}},gc=function(){function e(t){var n=Ra(t);this.target=t,this.contentRect=n.contentRect,this.borderBoxSize=dn([n.borderBoxSize]),this.contentBoxSize=dn([n.contentBoxSize]),this.devicePixelContentBoxSize=dn([n.devicePixelContentBoxSize])}return e}(),_a=function(e){if(ka(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},mc=function(){var e=1/0,t=[];sn.forEach(function(l){if(l.activeTargets.length!==0){var s=[];l.activeTargets.forEach(function(c){var f=new gc(c.target),u=_a(c.target);s.push(f),c.lastReportedSize=Ba(c.target,c.observedBox),u<e&&(e=u)}),t.push(function(){l.callback.call(l.observer,s,l.observer)}),l.activeTargets.splice(0,l.activeTargets.length)}});for(var n=0,r=t;n<r.length;n++){var i=r[n];i()}return e},Ea=function(e){sn.forEach(function(n){n.activeTargets.splice(0,n.activeTargets.length),n.skippedTargets.splice(0,n.skippedTargets.length),n.observationTargets.forEach(function(i){i.isActive()&&(_a(i.target)>e?n.activeTargets.push(i):n.skippedTargets.push(i))})})},vc=function(){var e=0;for(Ea(e);dc();)e=mc(),Ea(e);return cc()&&uc(),e>0},_r,Ma=[],xc=function(){return Ma.splice(0).forEach(function(e){return e()})},yc=function(e){if(!_r){var t=0,n=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return xc()}).observe(n,r),_r=function(){n.textContent="".concat(t?t--:t++)}}Ma.push(e),_r()},wc=function(e){yc(function(){requestAnimationFrame(e)})},Io=0,Cc=function(){return!!Io},Sc=250,$c={attributes:!0,characterData:!0,childList:!0,subtree:!0},Ia=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Oa=function(e){return e===void 0&&(e=0),Date.now()+e},Er=!1,kc=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=Sc),!Er){Er=!0;var r=Oa(t);wc(function(){var i=!1;try{i=vc()}finally{if(Er=!1,t=r-Oa(),!Cc())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,$c)};document.body?n():Zn.addEventListener("DOMContentLoaded",n)},e.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Ia.forEach(function(n){return Zn.addEventListener(n,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),Ia.forEach(function(n){return Zn.removeEventListener(n,t.listener,!0)}),this.stopped=!0)},e}(),Mr=new kc,Aa=function(e){!Io&&e>0&&Mr.start(),Io+=e,!Io&&Mr.stop()},zc=function(e){return!Br(e)&&!hc(e)&&getComputedStyle(e).display==="inline"},Tc=function(){function e(t,n){this.target=t,this.observedBox=n||Yn.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var t=Ba(this.target,this.observedBox,!0);return zc(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e}(),Pc=function(){function e(t,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=n}return e}(),Oo=new WeakMap,Fa=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},Ao=function(){function e(){}return e.connect=function(t,n){var r=new Pc(t,n);Oo.set(t,r)},e.observe=function(t,n,r){var i=Oo.get(t),a=i.observationTargets.length===0;Fa(i.observationTargets,n)<0&&(a&&sn.push(i),i.observationTargets.push(new Tc(n,r&&r.box)),Aa(1),Mr.schedule())},e.unobserve=function(t,n){var r=Oo.get(t),i=Fa(r.observationTargets,n),a=r.observationTargets.length===1;i>=0&&(a&&sn.splice(sn.indexOf(r),1),r.observationTargets.splice(i,1),Aa(-1))},e.disconnect=function(t){var n=this,r=Oo.get(t);r.observationTargets.slice().forEach(function(i){return n.unobserve(t,i.target)}),r.activeTargets.splice(0,r.activeTargets.length)},e}(),Rc=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.");Ao.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(!za(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Ao.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(!za(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Ao.unobserve(this,t)},e.prototype.disconnect=function(){Ao.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||Rc)(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 Fo=new Bc,jt=o.defineComponent({name:"ResizeObserver",props:{onResize:Function},setup(e){let t=!1;const n=o.getCurrentInstance().proxy;function r(i){const{onResize:a}=e;a!==void 0&&a(i)}o.onMounted(()=>{const i=n.$el;if(i===void 0){ma("resize-observer","$el does not exist.");return}if(i.nextElementSibling!==i.nextSibling&&i.nodeType===3&&i.nodeValue!==""){ma("resize-observer","$el can not be observed (it may be a text node).");return}i.nextElementSibling!==null&&(Fo.registerHandler(i.nextElementSibling,r),t=!0)}),o.onBeforeUnmount(()=>{t&&Fo.unregisterHandler(n.$el.nextElementSibling)})},render(){return o.renderSlot(this.$slots,"default")}});let Do;function _c(){return typeof document>"u"?!1:(Do===void 0&&("matchMedia"in window?Do=window.matchMedia("(pointer:coarse)").matches:Do=!1),Do)}let Ir;function Da(){return typeof document>"u"?1:(Ir===void 0&&(Ir="chrome"in window?window.devicePixelRatio:1),Ir)}const Ec=kt(".v-vl",{maxHeight:"inherit",height:"100%",overflow:"auto",minWidth:"1px"},[kt("&:not(.v-vl--show-scrollbar)",{scrollbarWidth:"none"},[kt("&::-webkit-scrollbar, &::-webkit-scrollbar-track-piece, &::-webkit-scrollbar-thumb",{width:0,height:0,display:"none"})])]),Mc=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();Ec.mount({id:"vueuc/virtual-list",head:!0,anchorMetaName:Bo,ssr:t}),o.onMounted(()=>{const{defaultScrollIndex:O,defaultScrollKey:V}=e;O!=null?h({index:O}):V!=null&&h({key:V})});let n=!1,r=!1;o.onActivated(()=>{if(n=!1,!r){r=!0;return}h({top:u.value,left:f})}),o.onDeactivated(()=>{n=!0,r||(r=!0)});const i=o.computed(()=>{const O=new Map,{keyField:V}=e;return e.items.forEach((j,Q)=>{O.set(j[V],Q)}),O}),a=o.ref(null),l=o.ref(void 0),s=new Map,d=o.computed(()=>{const{items:O,itemSize:V,keyField:j}=e,Q=new ec(O.length,V);return O.forEach((N,Z)=>{const X=N[j],Y=s.get(X);Y!==void 0&&Q.add(Z,Y)}),Q}),c=o.ref(0);let f=0;const u=o.ref(0),p=Xe(()=>Math.max(d.value.getBound(u.value-ot(e.paddingTop))-1,0)),m=o.computed(()=>{const{value:O}=l;if(O===void 0)return[];const{items:V,itemSize:j}=e,Q=p.value,N=Math.min(Q+Math.ceil(O/j+1),V.length-1),Z=[];for(let X=Q;X<=N;++X)Z.push(V[X]);return Z}),h=(O,V)=>{if(typeof O=="number"){P(O,V,"auto");return}const{left:j,top:Q,index:N,key:Z,position:X,behavior:Y,debounce:de=!0}=O;if(j!==void 0||Q!==void 0)P(j,Q,Y);else if(N!==void 0)g(N,Y,de);else if(Z!==void 0){const ie=i.value.get(Z);ie!==void 0&&g(ie,Y,de)}else X==="bottom"?P(0,Number.MAX_SAFE_INTEGER,Y):X==="top"&&P(0,0,Y)};let v,w=null;function g(O,V,j){const{value:Q}=d,N=Q.sum(O)+ot(e.paddingTop);if(!j)a.value.scrollTo({left:0,top:N,behavior:V});else{v=O,w!==null&&window.clearTimeout(w),w=window.setTimeout(()=>{v=void 0,w=null},16);const{scrollTop:Z,offsetHeight:X}=a.value;if(N>Z){const Y=Q.get(O);N+Y<=Z+X||a.value.scrollTo({left:0,top:N+Y-X,behavior:V})}else a.value.scrollTo({left:0,top:N,behavior:V})}}function P(O,V,j){a.value.scrollTo({left:O,top:V,behavior:j})}function H(O,V){var j,Q,N;if(n||e.ignoreItemResize||D(V.target))return;const{value:Z}=d,X=i.value.get(O),Y=Z.get(X),de=(N=(Q=(j=V.borderBoxSize)===null||j===void 0?void 0:j[0])===null||Q===void 0?void 0:Q.blockSize)!==null&&N!==void 0?N:V.contentRect.height;if(de===Y)return;de-e.itemSize===0?s.delete(O):s.set(O,de-e.itemSize);const ue=de-Y;if(ue===0)return;Z.add(X,ue);const U=a.value;if(U!=null){if(v===void 0){const te=Z.sum(X);U.scrollTop>te&&U.scrollBy(0,ue)}else if(X<v)U.scrollBy(0,ue);else if(X===v){const te=Z.sum(X);de+te>U.scrollTop+U.offsetHeight&&U.scrollBy(0,ue)}E()}c.value++}const $=!_c();let k=!1;function M(O){var V;(V=e.onScroll)===null||V===void 0||V.call(e,O),(!$||!k)&&E()}function b(O){var V;if((V=e.onWheel)===null||V===void 0||V.call(e,O),$){const j=a.value;if(j!=null){if(O.deltaX===0&&(j.scrollTop===0&&O.deltaY<=0||j.scrollTop+j.offsetHeight>=j.scrollHeight&&O.deltaY>=0))return;O.preventDefault(),j.scrollTop+=O.deltaY/Da(),j.scrollLeft+=O.deltaX/Da(),E(),k=!0,Wi(()=>{k=!1})}}}function S(O){if(n||D(O.target)||O.contentRect.height===l.value)return;l.value=O.contentRect.height;const{onResize:V}=e;V!==void 0&&V(O)}function E(){const{value:O}=a;O!=null&&(u.value=O.scrollTop,f=O.scrollLeft)}function D(O){let V=O;for(;V!==null;){if(V.style.display==="none")return!0;V=V.parentElement}return!1}return{listHeight:l,listStyle:{overflow:"auto"},keyToIndex:i,itemsStyle:o.computed(()=>{const{itemResizable:O}=e,V=tn(d.value.sum());return c.value,[e.itemsStyle,{boxSizing:"content-box",height:O?"":V,minHeight:O?V:"",paddingTop:tn(e.paddingTop),paddingBottom:tn(e.paddingBottom)}]}),visibleItemsStyle:o.computed(()=>(c.value,{transform:`translateY(${tn(d.value.sum(p.value))})`})),viewportItems:m,listElRef:a,itemsElRef:o.ref(null),scrollTo:h,handleListResize:S,handleListScroll:M,handleListWheel:b,handleItemResize:H}},render(){const{itemResizable:e,keyField:t,keyToIndex:n,visibleItemsTag:r}=this;return o.h(jt,{onResize:this.handleListResize},{default:()=>{var i,a;return o.h("div",o.mergeProps(this.$attrs,{class:["v-vl",this.showScrollbar&&"v-vl--show-scrollbar"],onScroll:this.handleListScroll,onWheel:this.handleListWheel,ref:"listElRef"}),[this.items.length!==0?o.h("div",{ref:"itemsElRef",class:"v-vl-items",style:this.itemsStyle},[o.h(r,Object.assign({class:"v-vl-visible-items",style:this.visibleItemsStyle},this.visibleItemsProps),{default:()=>this.viewportItems.map(l=>{const s=l[t],d=n.get(s),c=this.$slots.default({item:l,index:d})[0];return e?o.h(jt,{key:s,onResize:f=>this.handleItemResize(s,f)},{default:()=>c}):(c.key=s,c)})})]):(a=(i=this.$slots).empty)===null||a===void 0?void 0:a.call(i)])}})}}),Ic=kt(".v-x-scroll",{overflow:"auto",scrollbarWidth:"none"},[kt("&::-webkit-scrollbar",{width:0,height:0})]),Oc=o.defineComponent({name:"XScroll",props:{disabled:Boolean,onScroll:Function},setup(){const e=o.ref(null);function t(i){!(i.currentTarget.offsetWidth<i.currentTarget.scrollWidth)||i.deltaY===0||(i.currentTarget.scrollLeft+=i.deltaY+i.deltaX,i.preventDefault())}const n=Wt();return Ic.mount({id:"vueuc/x-scroll",head:!0,anchorMetaName:Bo,ssr:n}),Object.assign({selfRef:e,handleWheel:t},{scrollTo(...i){var a;(a=e.value)===null||a===void 0||a.scrollTo(...i)}})},render(){return o.h("div",{ref:"selfRef",onScroll:this.onScroll,onWheel:this.disabled?void 0:this.handleWheel,class:"v-x-scroll"},this.$slots)}}),Bt="v-hidden",Ac=kt("[v-hidden]",{display:"none!important"}),Va=o.defineComponent({name:"Overflow",props:{getCounter:Function,getTail:Function,updateCounter:Function,onUpdateCount:Function,onUpdateOverflow:Function},setup(e,{slots:t}){const n=o.ref(null),r=o.ref(null);function i(l){const{value:s}=n,{getCounter:d,getTail:c}=e;let f;if(d!==void 0?f=d():f=r.value,!s||!f)return;f.hasAttribute(Bt)&&f.removeAttribute(Bt);const{children:u}=s;if(l.showAllItemsBeforeCalculate)for(const H of u)H.hasAttribute(Bt)&&H.removeAttribute(Bt);const p=s.offsetWidth,m=[],h=t.tail?c==null?void 0:c():null;let v=h?h.offsetWidth:0,w=!1;const g=s.children.length-(t.tail?1:0);for(let H=0;H<g-1;++H){if(H<0)continue;const $=u[H];if(w){$.hasAttribute(Bt)||$.setAttribute(Bt,"");continue}else $.hasAttribute(Bt)&&$.removeAttribute(Bt);const k=$.offsetWidth;if(v+=k,m[H]=k,v>p){const{updateCounter:M}=e;for(let b=H;b>=0;--b){const S=g-1-b;M!==void 0?M(S):f.textContent=`${S}`;const E=f.offsetWidth;if(v-=m[b],v+E<=p||b===0){w=!0,H=b-1,h&&(H===-1?(h.style.maxWidth=`${p-E}px`,h.style.boxSizing="border-box"):h.style.maxWidth="");const{onUpdateCount:D}=e;D&&D(S);break}}}}const{onUpdateOverflow:P}=e;w?P!==void 0&&P(!0):(P!==void 0&&P(!1),f.setAttribute(Bt,""))}const a=Wt();return Ac.mount({id:"vueuc/overflow",head:!0,anchorMetaName:Bo,ssr:a}),o.onMounted(()=>i({showAllItemsBeforeCalculate:!1})),{selfRef:n,counterRef:r,sync:i}},render(){const{$slots:e}=this;return o.nextTick(()=>this.sync({showAllItemsBeforeCalculate:!1})),o.h("div",{class:"v-overflow",ref:"selfRef"},[o.renderSlot(e,"default"),e.counter?e.counter():o.h("span",{style:{display:"inline-block"},ref:"counterRef"}),e.tail?e.tail():null])}});function Ha(e){return e instanceof HTMLElement}function La(e){for(let t=0;t<e.childNodes.length;t++){const n=e.childNodes[t];if(Ha(n)&&(Wa(n)||La(n)))return!0}return!1}function Na(e){for(let t=e.childNodes.length-1;t>=0;t--){const n=e.childNodes[t];if(Ha(n)&&(Wa(n)||Na(n)))return!0}return!1}function Wa(e){if(!Fc(e))return!1;try{e.focus({preventScroll:!0})}catch{}return document.activeElement===e}function Fc(e){if(e.tabIndex>0||e.tabIndex===0&&e.getAttribute("tabIndex")!==null)return!0;if(e.getAttribute("disabled"))return!1;switch(e.nodeName){case"A":return!!e.href&&e.rel!=="ignore";case"INPUT":return e.type!=="hidden"&&e.type!=="file";case"BUTTON":case"SELECT":case"TEXTAREA":return!0;default:return!1}}let Jn=[];const Dc=o.defineComponent({name:"FocusTrap",props:{disabled:Boolean,active:Boolean,autoFocus:{type:Boolean,default:!0},onEsc:Function,initialFocusTo:String,finalFocusTo:String,returnFocusOnDeactivated:{type:Boolean,default:!0}},setup(e){const t=id(),n=o.ref(null),r=o.ref(null);let i=!1,a=!1;const l=typeof document>"u"?null:document.activeElement;function s(){return Jn[Jn.length-1]===t}function d(w){var g;w.code==="Escape"&&s()&&((g=e.onEsc)===null||g===void 0||g.call(e,w))}o.onMounted(()=>{o.watch(()=>e.active,w=>{w?(u(),Pe("keydown",document,d)):($e("keydown",document,d),i&&p())},{immediate:!0})}),o.onBeforeUnmount(()=>{$e("keydown",document,d),i&&p()});function c(w){if(!a&&s()){const g=f();if(g===null||g.contains(kn(w)))return;m("first")}}function f(){const w=n.value;if(w===null)return null;let g=w;for(;g=g.nextSibling,!(g===null||g instanceof Element&&g.tagName==="DIV"););return g}function u(){var w;if(!e.disabled){if(Jn.push(t),e.autoFocus){const{initialFocusTo:g}=e;g===void 0?m("first"):(w=xa(g))===null||w===void 0||w.focus({preventScroll:!0})}i=!0,document.addEventListener("focus",c,!0)}}function p(){var w;if(e.disabled||(document.removeEventListener("focus",c,!0),Jn=Jn.filter(P=>P!==t),s()))return;const{finalFocusTo:g}=e;g!==void 0?(w=xa(g))===null||w===void 0||w.focus({preventScroll:!0}):e.returnFocusOnDeactivated&&l instanceof HTMLElement&&(a=!0,l.focus({preventScroll:!0}),a=!1)}function m(w){if(s()&&e.active){const g=n.value,P=r.value;if(g!==null&&P!==null){const H=f();if(H==null||H===P){a=!0,g.focus({preventScroll:!0}),a=!1;return}a=!0;const $=w==="first"?La(H):Na(H);a=!1,$||(a=!0,g.focus({preventScroll:!0}),a=!1)}}}function h(w){if(a)return;const g=f();g!==null&&(w.relatedTarget!==null&&g.contains(w.relatedTarget)?m("last"):m("first"))}function v(w){a||(w.relatedTarget!==null&&w.relatedTarget===n.value?m("last"):m("first"))}return{focusableStartRef:n,focusableEndRef:r,focusableStyle:"position: absolute; height: 0; width: 0;",handleStartFocus:h,handleEndFocus:v}},render(){const{default:e}=this.$slots;if(e===void 0)return null;if(this.disabled)return e();const{active:t,focusableStyle:n}=this;return o.h(o.Fragment,null,[o.h("div",{"aria-hidden":"true",tabindex:t?"0":"-1",ref:"focusableStartRef",style:n,onFocus:this.handleStartFocus}),e(),o.h("div",{"aria-hidden":"true",style:n,ref:"focusableEndRef",tabindex:t?"0":"-1",onFocus:this.handleEndFocus})])}});function ja(e,t){t&&(o.onMounted(()=>{const{value:n}=e;n&&Fo.registerHandler(n,t)}),o.onBeforeUnmount(()=>{const{value:n}=e;n&&Fo.unregisterHandler(n)}))}function Vc(e){const t={isDeactivated:!1};let n=!1;return o.onActivated(()=>{if(t.isDeactivated=!1,!n){n=!0;return}e()}),o.onDeactivated(()=>{t.isDeactivated=!0,n||(n=!0)}),t}const Ua="n-form-item";function cn(e,{defaultSize:t="medium",mergedSize:n,mergedDisabled:r}={}){const i=o.inject(Ua,null);o.provide(Ua,null);const a=o.computed(n?()=>n(i):()=>{const{size:d}=e;if(d)return d;if(i){const{mergedSize:c}=i;if(c.value!==void 0)return c.value}return t}),l=o.computed(r?()=>r(i):()=>{const{disabled:d}=e;return d!==void 0?d:i?i.disabled.value:!1}),s=o.computed(()=>{const{status:d}=e;return d||(i==null?void 0:i.mergedValidationStatus.value)});return o.onBeforeUnmount(()=>{i&&i.restoreValidation()}),{mergedSizeRef:a,mergedDisabledRef:l,mergedStatusRef:s,nTriggerFormBlur(){i&&i.handleContentBlur()},nTriggerFormChange(){i&&i.handleContentChange()},nTriggerFormFocus(){i&&i.handleContentFocus()},nTriggerFormInput(){i&&i.handleContentInput()}}}var Ga=typeof global=="object"&&global&&global.Object===Object&&global,Hc=typeof self=="object"&&self&&self.Object===Object&&self,xt=Ga||Hc||Function("return this")(),Ut=xt.Symbol,Ka=Object.prototype,Lc=Ka.hasOwnProperty,Nc=Ka.toString,Qn=Ut?Ut.toStringTag:void 0;function Wc(e){var t=Lc.call(e,Qn),n=e[Qn];try{e[Qn]=void 0;var r=!0}catch{}var i=Nc.call(e);return r&&(t?e[Qn]=n:delete e[Qn]),i}var jc=Object.prototype,Uc=jc.toString;function Gc(e){return Uc.call(e)}var Kc="[object Null]",qc="[object Undefined]",qa=Ut?Ut.toStringTag:void 0;function un(e){return e==null?e===void 0?qc:Kc:qa&&qa in Object(e)?Wc(e):Gc(e)}function Gt(e){return e!=null&&typeof e=="object"}var Xc="[object Symbol]";function Vo(e){return typeof e=="symbol"||Gt(e)&&un(e)==Xc}function Xa(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var ht=Array.isArray,Yc=1/0,Ya=Ut?Ut.prototype:void 0,Za=Ya?Ya.toString:void 0;function Ja(e){if(typeof e=="string")return e;if(ht(e))return Xa(e,Ja)+"";if(Vo(e))return Za?Za.call(e):"";var t=e+"";return t=="0"&&1/e==-Yc?"-0":t}var Zc=/\s/;function Jc(e){for(var t=e.length;t--&&Zc.test(e.charAt(t)););return t}var Qc=/^\s+/;function eu(e){return e&&e.slice(0,Jc(e)+1).replace(Qc,"")}function pt(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Qa=NaN,tu=/^[-+]0x[0-9a-f]+$/i,nu=/^0b[01]+$/i,ou=/^0o[0-7]+$/i,ru=parseInt;function el(e){if(typeof e=="number")return e;if(Vo(e))return Qa;if(pt(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=pt(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=eu(e);var n=nu.test(e);return n||ou.test(e)?ru(e.slice(2),n?2:8):tu.test(e)?Qa:+e}function Or(e){return e}var iu="[object AsyncFunction]",au="[object Function]",lu="[object GeneratorFunction]",su="[object Proxy]";function Ar(e){if(!pt(e))return!1;var t=un(e);return t==au||t==lu||t==iu||t==su}var Fr=xt["__core-js_shared__"],tl=function(){var e=/[^.]+$/.exec(Fr&&Fr.keys&&Fr.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function du(e){return!!tl&&tl in e}var cu=Function.prototype,uu=cu.toString;function fn(e){if(e!=null){try{return uu.call(e)}catch{}try{return e+""}catch{}}return""}var fu=/[\\^$.*+?()[\]{}|]/g,hu=/^\[object .+?Constructor\]$/,pu=Function.prototype,bu=Object.prototype,gu=pu.toString,mu=bu.hasOwnProperty,vu=RegExp("^"+gu.call(mu).replace(fu,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function xu(e){if(!pt(e)||du(e))return!1;var t=Ar(e)?vu:hu;return t.test(fn(e))}function yu(e,t){return e==null?void 0:e[t]}function hn(e,t){var n=yu(e,t);return xu(n)?n:void 0}var Dr=hn(xt,"WeakMap"),nl=Object.create,wu=function(){function e(){}return function(t){if(!pt(t))return{};if(nl)return nl(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function Cu(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function Su(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var $u=800,ku=16,zu=Date.now;function Tu(e){var t=0,n=0;return function(){var r=zu(),i=ku-(r-n);if(n=r,i>0){if(++t>=$u)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Pu(e){return function(){return e}}var Ho=function(){try{var e=hn(Object,"defineProperty");return e({},"",{}),e}catch{}}(),Ru=Ho?function(e,t){return Ho(e,"toString",{configurable:!0,enumerable:!1,value:Pu(t),writable:!0})}:Or,Bu=Tu(Ru),_u=9007199254740991,Eu=/^(?:0|[1-9]\d*)$/;function Vr(e,t){var n=typeof e;return t=t??_u,!!t&&(n=="number"||n!="symbol"&&Eu.test(e))&&e>-1&&e%1==0&&e<t}function Hr(e,t,n){t=="__proto__"&&Ho?Ho(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function eo(e,t){return e===t||e!==e&&t!==t}var Mu=Object.prototype,Iu=Mu.hasOwnProperty;function Ou(e,t,n){var r=e[t];(!(Iu.call(e,t)&&eo(r,n))||n===void 0&&!(t in e))&&Hr(e,t,n)}function Au(e,t,n,r){var i=!n;n||(n={});for(var a=-1,l=t.length;++a<l;){var s=t[a],d=void 0;d===void 0&&(d=e[s]),i?Hr(n,s,d):Ou(n,s,d)}return n}var ol=Math.max;function Fu(e,t,n){return t=ol(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,a=ol(r.length-t,0),l=Array(a);++i<a;)l[i]=r[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=r[i];return s[t]=n(l),Cu(e,this,s)}}function Du(e,t){return Bu(Fu(e,t,Or),e+"")}var Vu=9007199254740991;function Lr(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Vu}function On(e){return e!=null&&Lr(e.length)&&!Ar(e)}function Hu(e,t,n){if(!pt(n))return!1;var r=typeof t;return(r=="number"?On(n)&&Vr(t,n.length):r=="string"&&t in n)?eo(n[t],e):!1}function Lu(e){return Du(function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,l=i>2?n[2]:void 0;for(a=e.length>3&&typeof a=="function"?(i--,a):void 0,l&&Hu(n[0],n[1],l)&&(a=i<3?void 0:a,i=1),t=Object(t);++r<i;){var s=n[r];s&&e(t,s,r,a)}return t})}var Nu=Object.prototype;function Nr(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Nu;return e===n}function Wu(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var ju="[object Arguments]";function rl(e){return Gt(e)&&un(e)==ju}var il=Object.prototype,Uu=il.hasOwnProperty,Gu=il.propertyIsEnumerable,Lo=rl(function(){return arguments}())?rl:function(e){return Gt(e)&&Uu.call(e,"callee")&&!Gu.call(e,"callee")};function Ku(){return!1}var al=typeof We=="object"&&We&&!We.nodeType&&We,ll=al&&typeof module=="object"&&module&&!module.nodeType&&module,qu=ll&&ll.exports===al,sl=qu?xt.Buffer:void 0,Xu=sl?sl.isBuffer:void 0,No=Xu||Ku,Yu="[object Arguments]",Zu="[object Array]",Ju="[object Boolean]",Qu="[object Date]",ef="[object Error]",tf="[object Function]",nf="[object Map]",of="[object Number]",rf="[object Object]",af="[object RegExp]",lf="[object Set]",sf="[object String]",df="[object WeakMap]",cf="[object ArrayBuffer]",uf="[object DataView]",ff="[object Float32Array]",hf="[object Float64Array]",pf="[object Int8Array]",bf="[object Int16Array]",gf="[object Int32Array]",mf="[object Uint8Array]",vf="[object Uint8ClampedArray]",xf="[object Uint16Array]",yf="[object Uint32Array]",Fe={};Fe[ff]=Fe[hf]=Fe[pf]=Fe[bf]=Fe[gf]=Fe[mf]=Fe[vf]=Fe[xf]=Fe[yf]=!0,Fe[Yu]=Fe[Zu]=Fe[cf]=Fe[Ju]=Fe[uf]=Fe[Qu]=Fe[ef]=Fe[tf]=Fe[nf]=Fe[of]=Fe[rf]=Fe[af]=Fe[lf]=Fe[sf]=Fe[df]=!1;function wf(e){return Gt(e)&&Lr(e.length)&&!!Fe[un(e)]}function Cf(e){return function(t){return e(t)}}var dl=typeof We=="object"&&We&&!We.nodeType&&We,to=dl&&typeof module=="object"&&module&&!module.nodeType&&module,Sf=to&&to.exports===dl,Wr=Sf&&Ga.process,cl=function(){try{var e=to&&to.require&&to.require("util").types;return e||Wr&&Wr.binding&&Wr.binding("util")}catch{}}(),ul=cl&&cl.isTypedArray,jr=ul?Cf(ul):wf,$f=Object.prototype,kf=$f.hasOwnProperty;function fl(e,t){var n=ht(e),r=!n&&Lo(e),i=!n&&!r&&No(e),a=!n&&!r&&!i&&jr(e),l=n||r||i||a,s=l?Wu(e.length,String):[],d=s.length;for(var c in e)(t||kf.call(e,c))&&!(l&&(c=="length"||i&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Vr(c,d)))&&s.push(c);return s}function hl(e,t){return function(n){return e(t(n))}}var zf=hl(Object.keys,Object),Tf=Object.prototype,Pf=Tf.hasOwnProperty;function Rf(e){if(!Nr(e))return zf(e);var t=[];for(var n in Object(e))Pf.call(e,n)&&n!="constructor"&&t.push(n);return t}function Ur(e){return On(e)?fl(e):Rf(e)}function Bf(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var _f=Object.prototype,Ef=_f.hasOwnProperty;function Mf(e){if(!pt(e))return Bf(e);var t=Nr(e),n=[];for(var r in e)r=="constructor"&&(t||!Ef.call(e,r))||n.push(r);return n}function pl(e){return On(e)?fl(e,!0):Mf(e)}var If=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Of=/^\w*$/;function Gr(e,t){if(ht(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||Vo(e)?!0:Of.test(e)||!If.test(e)||t!=null&&e in Object(t)}var no=hn(Object,"create");function Af(){this.__data__=no?no(null):{},this.size=0}function Ff(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Df="__lodash_hash_undefined__",Vf=Object.prototype,Hf=Vf.hasOwnProperty;function Lf(e){var t=this.__data__;if(no){var n=t[e];return n===Df?void 0:n}return Hf.call(t,e)?t[e]:void 0}var Nf=Object.prototype,Wf=Nf.hasOwnProperty;function jf(e){var t=this.__data__;return no?t[e]!==void 0:Wf.call(t,e)}var Uf="__lodash_hash_undefined__";function Gf(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=no&&t===void 0?Uf:t,this}function pn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}pn.prototype.clear=Af,pn.prototype.delete=Ff,pn.prototype.get=Lf,pn.prototype.has=jf,pn.prototype.set=Gf;function Kf(){this.__data__=[],this.size=0}function Wo(e,t){for(var n=e.length;n--;)if(eo(e[n][0],t))return n;return-1}var qf=Array.prototype,Xf=qf.splice;function Yf(e){var t=this.__data__,n=Wo(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():Xf.call(t,n,1),--this.size,!0}function Zf(e){var t=this.__data__,n=Wo(t,e);return n<0?void 0:t[n][1]}function Jf(e){return Wo(this.__data__,e)>-1}function Qf(e,t){var n=this.__data__,r=Wo(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function _t(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}_t.prototype.clear=Kf,_t.prototype.delete=Yf,_t.prototype.get=Zf,_t.prototype.has=Jf,_t.prototype.set=Qf;var oo=hn(xt,"Map");function eh(){this.size=0,this.__data__={hash:new pn,map:new(oo||_t),string:new pn}}function th(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function jo(e,t){var n=e.__data__;return th(t)?n[typeof t=="string"?"string":"hash"]:n.map}function nh(e){var t=jo(this,e).delete(e);return this.size-=t?1:0,t}function oh(e){return jo(this,e).get(e)}function rh(e){return jo(this,e).has(e)}function ih(e,t){var n=jo(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function Et(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Et.prototype.clear=eh,Et.prototype.delete=nh,Et.prototype.get=oh,Et.prototype.has=rh,Et.prototype.set=ih;var ah="Expected a function";function Kr(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(ah);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var l=e.apply(this,r);return n.cache=a.set(i,l)||a,l};return n.cache=new(Kr.Cache||Et),n}Kr.Cache=Et;var lh=500;function sh(e){var t=Kr(e,function(r){return n.size===lh&&n.clear(),r}),n=t.cache;return t}var dh=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ch=/\\(\\)?/g,uh=sh(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(dh,function(n,r,i,a){t.push(i?a.replace(ch,"$1"):r||n)}),t});function bl(e){return e==null?"":Ja(e)}function gl(e,t){return ht(e)?e:Gr(e,t)?[e]:uh(bl(e))}var fh=1/0;function Uo(e){if(typeof e=="string"||Vo(e))return e;var t=e+"";return t=="0"&&1/e==-fh?"-0":t}function ml(e,t){t=gl(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[Uo(t[n++])];return n&&n==r?e:void 0}function hh(e,t,n){var r=e==null?void 0:ml(e,t);return r===void 0?n:r}function ph(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var vl=hl(Object.getPrototypeOf,Object),bh="[object Object]",gh=Function.prototype,mh=Object.prototype,xl=gh.toString,vh=mh.hasOwnProperty,xh=xl.call(Object);function yh(e){if(!Gt(e)||un(e)!=bh)return!1;var t=vl(e);if(t===null)return!0;var n=vh.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&xl.call(n)==xh}function wh(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(i);++r<i;)a[r]=e[r+t];return a}function Ch(e,t,n){var r=e.length;return n=n===void 0?r:n,!t&&n>=r?e:wh(e,t,n)}var Sh="\\ud800-\\udfff",$h="\\u0300-\\u036f",kh="\\ufe20-\\ufe2f",zh="\\u20d0-\\u20ff",Th=$h+kh+zh,Ph="\\ufe0e\\ufe0f",Rh="\\u200d",Bh=RegExp("["+Rh+Sh+Th+Ph+"]");function yl(e){return Bh.test(e)}function _h(e){return e.split("")}var wl="\\ud800-\\udfff",Eh="\\u0300-\\u036f",Mh="\\ufe20-\\ufe2f",Ih="\\u20d0-\\u20ff",Oh=Eh+Mh+Ih,Ah="\\ufe0e\\ufe0f",Fh="["+wl+"]",qr="["+Oh+"]",Xr="\\ud83c[\\udffb-\\udfff]",Dh="(?:"+qr+"|"+Xr+")",Cl="[^"+wl+"]",Sl="(?:\\ud83c[\\udde6-\\uddff]){2}",$l="[\\ud800-\\udbff][\\udc00-\\udfff]",Vh="\\u200d",kl=Dh+"?",zl="["+Ah+"]?",Hh="(?:"+Vh+"(?:"+[Cl,Sl,$l].join("|")+")"+zl+kl+")*",Lh=zl+kl+Hh,Nh="(?:"+[Cl+qr+"?",qr,Sl,$l,Fh].join("|")+")",Wh=RegExp(Xr+"(?="+Xr+")|"+Nh+Lh,"g");function jh(e){return e.match(Wh)||[]}function Uh(e){return yl(e)?jh(e):_h(e)}function Gh(e){return function(t){t=bl(t);var n=yl(t)?Uh(t):void 0,r=n?n[0]:t.charAt(0),i=n?Ch(n,1).join(""):t.slice(1);return r[e]()+i}}var Kh=Gh("toUpperCase");function qh(){this.__data__=new _t,this.size=0}function Xh(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function Yh(e){return this.__data__.get(e)}function Zh(e){return this.__data__.has(e)}var Jh=200;function Qh(e,t){var n=this.__data__;if(n instanceof _t){var r=n.__data__;if(!oo||r.length<Jh-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Et(r)}return n.set(e,t),this.size=n.size,this}function Tt(e){var t=this.__data__=new _t(e);this.size=t.size}Tt.prototype.clear=qh,Tt.prototype.delete=Xh,Tt.prototype.get=Yh,Tt.prototype.has=Zh,Tt.prototype.set=Qh;var Tl=typeof We=="object"&&We&&!We.nodeType&&We,Pl=Tl&&typeof module=="object"&&module&&!module.nodeType&&module,ep=Pl&&Pl.exports===Tl,Rl=ep?xt.Buffer:void 0;Rl&&Rl.allocUnsafe;function tp(e,t){return e.slice()}function np(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var l=e[n];t(l,n,e)&&(a[i++]=l)}return a}function op(){return[]}var rp=Object.prototype,ip=rp.propertyIsEnumerable,Bl=Object.getOwnPropertySymbols,ap=Bl?function(e){return e==null?[]:(e=Object(e),np(Bl(e),function(t){return ip.call(e,t)}))}:op;function lp(e,t,n){var r=t(e);return ht(e)?r:ph(r,n(e))}function _l(e){return lp(e,Ur,ap)}var Yr=hn(xt,"DataView"),Zr=hn(xt,"Promise"),Jr=hn(xt,"Set"),El="[object Map]",sp="[object Object]",Ml="[object Promise]",Il="[object Set]",Ol="[object WeakMap]",Al="[object DataView]",dp=fn(Yr),cp=fn(oo),up=fn(Zr),fp=fn(Jr),hp=fn(Dr),Kt=un;(Yr&&Kt(new Yr(new ArrayBuffer(1)))!=Al||oo&&Kt(new oo)!=El||Zr&&Kt(Zr.resolve())!=Ml||Jr&&Kt(new Jr)!=Il||Dr&&Kt(new Dr)!=Ol)&&(Kt=function(e){var t=un(e),n=t==sp?e.constructor:void 0,r=n?fn(n):"";if(r)switch(r){case dp:return Al;case cp:return El;case up:return Ml;case fp:return Il;case hp:return Ol}return t});var Go=xt.Uint8Array;function pp(e){var t=new e.constructor(e.byteLength);return new Go(t).set(new Go(e)),t}function bp(e,t){var n=pp(e.buffer);return new e.constructor(n,e.byteOffset,e.length)}function gp(e){return typeof e.constructor=="function"&&!Nr(e)?wu(vl(e)):{}}var mp="__lodash_hash_undefined__";function vp(e){return this.__data__.set(e,mp),this}function xp(e){return this.__data__.has(e)}function Ko(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Et;++t<n;)this.add(e[t])}Ko.prototype.add=Ko.prototype.push=vp,Ko.prototype.has=xp;function yp(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function wp(e,t){return e.has(t)}var Cp=1,Sp=2;function Fl(e,t,n,r,i,a){var l=n&Cp,s=e.length,d=t.length;if(s!=d&&!(l&&d>s))return!1;var c=a.get(e),f=a.get(t);if(c&&f)return c==t&&f==e;var u=-1,p=!0,m=n&Sp?new Ko:void 0;for(a.set(e,t),a.set(t,e);++u<s;){var h=e[u],v=t[u];if(r)var w=l?r(v,h,u,t,e,a):r(h,v,u,e,t,a);if(w!==void 0){if(w)continue;p=!1;break}if(m){if(!yp(t,function(g,P){if(!wp(m,P)&&(h===g||i(h,g,n,r,a)))return m.push(P)})){p=!1;break}}else if(!(h===v||i(h,v,n,r,a))){p=!1;break}}return a.delete(e),a.delete(t),p}function $p(e){var t=-1,n=Array(e.size);return e.forEach(function(r,i){n[++t]=[i,r]}),n}function kp(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var zp=1,Tp=2,Pp="[object Boolean]",Rp="[object Date]",Bp="[object Error]",_p="[object Map]",Ep="[object Number]",Mp="[object RegExp]",Ip="[object Set]",Op="[object String]",Ap="[object Symbol]",Fp="[object ArrayBuffer]",Dp="[object DataView]",Dl=Ut?Ut.prototype:void 0,Qr=Dl?Dl.valueOf:void 0;function Vp(e,t,n,r,i,a,l){switch(n){case Dp:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Fp:return!(e.byteLength!=t.byteLength||!a(new Go(e),new Go(t)));case Pp:case Rp:case Ep:return eo(+e,+t);case Bp:return e.name==t.name&&e.message==t.message;case Mp:case Op:return e==t+"";case _p:var s=$p;case Ip:var d=r&zp;if(s||(s=kp),e.size!=t.size&&!d)return!1;var c=l.get(e);if(c)return c==t;r|=Tp,l.set(e,t);var f=Fl(s(e),s(t),r,i,a,l);return l.delete(e),f;case Ap:if(Qr)return Qr.call(e)==Qr.call(t)}return!1}var Hp=1,Lp=Object.prototype,Np=Lp.hasOwnProperty;function Wp(e,t,n,r,i,a){var l=n&Hp,s=_l(e),d=s.length,c=_l(t),f=c.length;if(d!=f&&!l)return!1;for(var u=d;u--;){var p=s[u];if(!(l?p in t:Np.call(t,p)))return!1}var m=a.get(e),h=a.get(t);if(m&&h)return m==t&&h==e;var v=!0;a.set(e,t),a.set(t,e);for(var w=l;++u<d;){p=s[u];var g=e[p],P=t[p];if(r)var H=l?r(P,g,p,t,e,a):r(g,P,p,e,t,a);if(!(H===void 0?g===P||i(g,P,n,r,a):H)){v=!1;break}w||(w=p=="constructor")}if(v&&!w){var $=e.constructor,k=t.constructor;$!=k&&"constructor"in e&&"constructor"in t&&!(typeof $=="function"&&$ instanceof $&&typeof k=="function"&&k instanceof k)&&(v=!1)}return a.delete(e),a.delete(t),v}var jp=1,Vl="[object Arguments]",Hl="[object Array]",qo="[object Object]",Up=Object.prototype,Ll=Up.hasOwnProperty;function Gp(e,t,n,r,i,a){var l=ht(e),s=ht(t),d=l?Hl:Kt(e),c=s?Hl:Kt(t);d=d==Vl?qo:d,c=c==Vl?qo:c;var f=d==qo,u=c==qo,p=d==c;if(p&&No(e)){if(!No(t))return!1;l=!0,f=!1}if(p&&!f)return a||(a=new Tt),l||jr(e)?Fl(e,t,n,r,i,a):Vp(e,t,d,n,r,i,a);if(!(n&jp)){var m=f&&Ll.call(e,"__wrapped__"),h=u&&Ll.call(t,"__wrapped__");if(m||h){var v=m?e.value():e,w=h?t.value():t;return a||(a=new Tt),i(v,w,n,r,a)}}return p?(a||(a=new Tt),Wp(e,t,n,r,i,a)):!1}function ei(e,t,n,r,i){return e===t?!0:e==null||t==null||!Gt(e)&&!Gt(t)?e!==e&&t!==t:Gp(e,t,n,r,ei,i)}var Kp=1,qp=2;function Xp(e,t,n,r){var i=n.length,a=i;if(e==null)return!a;for(e=Object(e);i--;){var l=n[i];if(l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++i<a;){l=n[i];var s=l[0],d=e[s],c=l[1];if(l[2]){if(d===void 0&&!(s in e))return!1}else{var f=new Tt,u;if(!(u===void 0?ei(c,d,Kp|qp,r,f):u))return!1}}return!0}function Nl(e){return e===e&&!pt(e)}function Yp(e){for(var t=Ur(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,Nl(i)]}return t}function Wl(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function Zp(e){var t=Yp(e);return t.length==1&&t[0][2]?Wl(t[0][0],t[0][1]):function(n){return n===e||Xp(n,e,t)}}function Jp(e,t){return e!=null&&t in Object(e)}function Qp(e,t,n){t=gl(t,e);for(var r=-1,i=t.length,a=!1;++r<i;){var l=Uo(t[r]);if(!(a=e!=null&&n(e,l)))break;e=e[l]}return a||++r!=i?a:(i=e==null?0:e.length,!!i&&Lr(i)&&Vr(l,i)&&(ht(e)||Lo(e)))}function eb(e,t){return e!=null&&Qp(e,t,Jp)}var tb=1,nb=2;function ob(e,t){return Gr(e)&&Nl(t)?Wl(Uo(e),t):function(n){var r=hh(n,e);return r===void 0&&r===t?eb(n,e):ei(t,r,tb|nb)}}function rb(e){return function(t){return t==null?void 0:t[e]}}function ib(e){return function(t){return ml(t,e)}}function ab(e){return Gr(e)?rb(Uo(e)):ib(e)}function lb(e){return typeof e=="function"?e:e==null?Or:typeof e=="object"?ht(e)?ob(e[0],e[1]):Zp(e):ab(e)}function sb(e){return function(t,n,r){for(var i=-1,a=Object(t),l=r(t),s=l.length;s--;){var d=l[++i];if(n(a[d],d,a)===!1)break}return t}}var jl=sb();function db(e,t){return e&&jl(e,t,Ur)}function cb(e,t){return function(n,r){if(n==null)return n;if(!On(n))return e(n,r);for(var i=n.length,a=-1,l=Object(n);++a<i&&r(l[a],a,l)!==!1;);return n}}var ub=cb(db),ti=function(){return xt.Date.now()},fb="Expected a function",hb=Math.max,pb=Math.min;function bb(e,t,n){var r,i,a,l,s,d,c=0,f=!1,u=!1,p=!0;if(typeof e!="function")throw new TypeError(fb);t=el(t)||0,pt(n)&&(f=!!n.leading,u="maxWait"in n,a=u?hb(el(n.maxWait)||0,t):a,p="trailing"in n?!!n.trailing:p);function m(M){var b=r,S=i;return r=i=void 0,c=M,l=e.apply(S,b),l}function h(M){return c=M,s=setTimeout(g,t),f?m(M):l}function v(M){var b=M-d,S=M-c,E=t-b;return u?pb(E,a-S):E}function w(M){var b=M-d,S=M-c;return d===void 0||b>=t||b<0||u&&S>=a}function g(){var M=ti();if(w(M))return P(M);s=setTimeout(g,v(M))}function P(M){return s=void 0,p&&r?m(M):(r=i=void 0,l)}function H(){s!==void 0&&clearTimeout(s),c=0,r=d=i=s=void 0}function $(){return s===void 0?l:P(ti())}function k(){var M=ti(),b=w(M);if(r=arguments,i=this,d=M,b){if(s===void 0)return h(d);if(u)return clearTimeout(s),s=setTimeout(g,t),m(d)}return s===void 0&&(s=setTimeout(g,t)),l}return k.cancel=H,k.flush=$,k}function ni(e,t,n){(n!==void 0&&!eo(e[t],n)||n===void 0&&!(t in e))&&Hr(e,t,n)}function gb(e){return Gt(e)&&On(e)}function oi(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function mb(e){return Au(e,pl(e))}function vb(e,t,n,r,i,a,l){var s=oi(e,n),d=oi(t,n),c=l.get(d);if(c){ni(e,n,c);return}var f=a?a(s,d,n+"",e,t,l):void 0,u=f===void 0;if(u){var p=ht(d),m=!p&&No(d),h=!p&&!m&&jr(d);f=d,p||m||h?ht(s)?f=s:gb(s)?f=Su(s):m?(u=!1,f=tp(d)):h?(u=!1,f=bp(d)):f=[]:yh(d)||Lo(d)?(f=s,Lo(s)?f=mb(s):(!pt(s)||Ar(s))&&(f=gp(d))):u=!1}u&&(l.set(d,f),i(f,d,r,a,l),l.delete(d)),ni(e,n,f)}function Ul(e,t,n,r,i){e!==t&&jl(t,function(a,l){if(i||(i=new Tt),pt(a))vb(e,t,l,n,Ul,r,i);else{var s=r?r(oi(e,l),a,l+"",e,t,i):void 0;s===void 0&&(s=a),ni(e,l,s)}},pl)}function xb(e,t){var n=-1,r=On(e)?Array(e.length):[];return ub(e,function(i,a,l){r[++n]=t(i,a,l)}),r}function yb(e,t){var n=ht(e)?Xa:xb;return n(e,lb(t))}var Xo=Lu(function(e,t,n){Ul(e,t,n)}),wb="Expected a function";function ri(e,t,n){var r=!0,i=!0;if(typeof e!="function")throw new TypeError(wb);return pt(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),bb(e,t,{leading:r,maxWait:t,trailing:i})}const bn={fontFamily:'v-sans, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',fontFamilyMono:"v-mono, SFMono-Regular, Menlo, Consolas, Courier, monospace",fontWeight:"400",fontWeightStrong:"500",cubicBezierEaseInOut:"cubic-bezier(.4, 0, .2, 1)",cubicBezierEaseOut:"cubic-bezier(0, 0, .2, 1)",cubicBezierEaseIn:"cubic-bezier(.4, 0, 1, 1)",borderRadius:"3px",borderRadiusSmall:"2px",fontSize:"14px",fontSizeMini:"12px",fontSizeTiny:"12px",fontSizeSmall:"14px",fontSizeMedium:"14px",fontSizeLarge:"15px",fontSizeHuge:"16px",lineHeight:"1.6",heightMini:"16px",heightTiny:"22px",heightSmall:"28px",heightMedium:"34px",heightLarge:"40px",heightHuge:"46px"},{fontSize:Cb,fontFamily:Sb,lineHeight:$b}=bn,Gl=I("body",`
|
|
15
|
+
</style>`}function Yd(e,t,n){const{styles:o,ids:i}=n;i.has(e)||o!==null&&(i.add(e),o.push(qd(e,t)))}const Zd=typeof document<"u";function Nt(){if(Zd)return;const e=r.inject(Xd,null);if(e!==null)return{adapter:(t,n)=>Yd(t,n,e),context:e}}function ma(e,t){console.error(`[vueuc/${e}]: ${t}`)}const{c:$t}=ra(),_r="vueuc-style";function va(e){return e&-e}class Jd{constructor(t,n){this.l=t,this.min=n;const o=new Array(t+1);for(let i=0;i<t+1;++i)o[i]=0;this.ft=o}add(t,n){if(n===0)return;const{l:o,ft:i}=this;for(t+=1;t<=o;)i[t]+=n,t+=va(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:o,l:i}=this;if(t>i)throw new Error("[FinweckTree.sum]: `i` is larger than length.");let a=t*o;for(;t>0;)a+=n[t],t-=va(t);return a}getBound(t){let n=0,o=this.l;for(;o>n;){const i=Math.floor((n+o)/2),a=this.sum(i);if(a>t){o=i;continue}else if(a<t){if(n===i)return this.sum(n+1)<=t?n+1:i;n=i}else return i}return n}}function xa(e){return typeof e=="string"?document.querySelector(e):e()}const Qd=r.defineComponent({name:"LazyTeleport",props:{to:{type:[String,Object],default:void 0},disabled:Boolean,show:{type:Boolean,required:!0}},setup(e){return{showTeleport:Id(r.toRef(e,"show")),mergedTo:r.computed(()=>{const{to:t}=e;return t??"body"})}},render(){return this.showTeleport?this.disabled?To("lazy-teleport",this.$slots):r.h(r.Teleport,{disabled:this.disabled,to:this.mergedTo},To("lazy-teleport",this.$slots)):null}}),Er={top:"bottom",bottom:"top",left:"right",right:"left"},ya={start:"end",center:"center",end:"start"},_o={top:"height",bottom:"height",left:"width",right:"width"},ec={"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"},tc={"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"},nc={"bottom-start":"right","bottom-end":"left","top-start":"right","top-end":"left","right-start":"bottom","right-end":"top","left-start":"bottom","left-end":"top"},wa={top:!0,bottom:!1,left:!0,right:!1},Ca={top:"end",bottom:"start",left:"end",right:"start"};function rc(e,t,n,o,i,a){if(!i||a)return{placement:e,top:0,left:0};const[l,s]=e.split("-");let d=s??"center",c={top:0,left:0};const f=(m,h,x)=>{let w=0,g=0;const P=n[m]-t[h]-t[m];return P>0&&o&&(x?g=wa[h]?P:-P:w=wa[h]?P:-P),{left:w,top:g}},u=l==="left"||l==="right";if(d!=="center"){const m=nc[e],h=Er[m],x=_o[m];if(n[x]>t[x]){if(t[m]+t[x]<n[x]){const w=(n[x]-t[x])/2;t[m]<w||t[h]<w?t[m]<t[h]?(d=ya[s],c=f(x,h,u)):c=f(x,m,u):d="center"}}else n[x]<t[x]&&t[h]<0&&t[m]>t[h]&&(d=ya[s])}else{const m=l==="bottom"||l==="top"?"left":"top",h=Er[m],x=_o[m],w=(n[x]-t[x])/2;(t[m]<w||t[h]<w)&&(t[m]>t[h]?(d=Ca[m],c=f(x,m,u)):(d=Ca[h],c=f(x,h,u)))}let b=l;return t[l]<n[_o[l]]&&t[l]<t[Er[l]]&&(b=Er[l]),{placement:d!=="center"?`${b}-${d}`:b,left:c.left,top:c.top}}function oc(e,t){return t?tc[e]:ec[e]}function ic(e,t,n,o,i,a){if(a)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+o)}px`,left:`${Math.round(n.left-t.left+i)}px`,transform:""};case"bottom-end":return{top:`${Math.round(n.top-t.top+n.height+o)}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+o)}px`,left:`${Math.round(n.left-t.left+i)}px`,transform:"translateY(-100%)"};case"top-end":return{top:`${Math.round(n.top-t.top+o)}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+o)}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+o)}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+o)}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+o)}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+o)}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+o)}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+o)}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+o)}px`,left:`${Math.round(n.left-t.left+n.width/2+i)}px`,transform:"translateX(-50%)"}}}const ac=$t([$t(".v-binder-follower-container",{position:"absolute",left:"0",right:"0",top:"0",height:"0",pointerEvents:"none",zIndex:"auto"}),$t(".v-binder-follower-content",{position:"absolute",zIndex:"auto"},[$t("> *",{pointerEvents:"all"})])]),Br=r.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=r.inject("VBinder"),n=Xe(()=>e.enabled!==void 0?e.enabled:e.show),o=r.ref(null),i=r.ref(null),a=()=>{const{syncTrigger:b}=e;b.includes("scroll")&&t.addScrollListener(d),b.includes("resize")&&t.addResizeListener(d)},l=()=>{t.removeScrollListener(d),t.removeResizeListener(d)};r.onMounted(()=>{n.value&&(d(),a())});const s=Nt();ac.mount({id:"vueuc/binder",head:!0,anchorMetaName:_r,ssr:s}),r.onBeforeUnmount(()=>{l()}),aa(()=>{n.value&&d()});const d=()=>{if(!n.value)return;const b=o.value;if(b===null)return;const m=t.targetRef,{x:h,y:x,overlap:w}=e,g=h!==void 0&&x!==void 0?Wd(h,x):Po(m);b.style.setProperty("--v-target-width",`${Math.round(g.width)}px`),b.style.setProperty("--v-target-height",`${Math.round(g.height)}px`);const{width:P,minWidth:L,placement:$,internalShift:k,flip:M}=e;b.setAttribute("v-placement",$),w?b.setAttribute("v-overlap",""):b.removeAttribute("v-overlap");const{style:p}=b;P==="target"?p.width=`${g.width}px`:P!==void 0?p.width=P:p.width="",L==="target"?p.minWidth=`${g.width}px`:L!==void 0?p.minWidth=L:p.minWidth="";const S=Po(b),B=Po(i.value),{left:F,top:I,placement:D}=rc($,g,S,k,M,w),j=oc(D,w),{left:Q,top:N,transform:Z}=ic(D,B,g,I,F,w);b.setAttribute("v-placement",D),b.style.setProperty("--v-offset-left",`${Math.round(F)}px`),b.style.setProperty("--v-offset-top",`${Math.round(I)}px`),b.style.transform=`translateX(${Q}) translateY(${N}) ${Z}`,b.style.setProperty("--v-transform-origin",j),b.style.transformOrigin=j};r.watch(n,b=>{b?(a(),c()):l()});const c=()=>{r.nextTick().then(d).catch(b=>console.error(b))};["placement","x","y","internalShift","flip","width","overlap","minWidth"].forEach(b=>{r.watch(r.toRef(e,b),d)}),["teleportDisabled"].forEach(b=>{r.watch(r.toRef(e,b),c)}),r.watch(r.toRef(e,"syncTrigger"),b=>{b.includes("resize")?t.addResizeListener(d):t.removeResizeListener(d),b.includes("scroll")?t.addScrollListener(d):t.removeScrollListener(d)});const f=Rn(),u=Xe(()=>{const{to:b}=e;if(b!==void 0)return b;f.value});return{VBinder:t,mergedEnabled:n,offsetContainerRef:i,followerRef:o,mergedTo:u,syncPosition:d}},render(){return r.h(Qd,{show:this.show,to:this.mergedTo,disabled:this.teleportDisabled},{default:()=>{var e,t;const n=r.h("div",{class:["v-binder-follower-container",this.containerClass],ref:"offsetContainerRef"},[r.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?r.withDirectives(n,[[ga,{enabled:this.mergedEnabled,zIndex:this.zIndex}]]):n}})}});var ln=[],lc=function(){return ln.some(function(e){return e.activeTargets.length>0})},sc=function(){return ln.some(function(e){return e.skippedTargets.length>0})},Sa="ResizeObserver loop completed with undelivered notifications.",dc=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:Sa}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=Sa),window.dispatchEvent(e)},qn;(function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(qn||(qn={}));var sn=function(e){return Object.freeze(e)},cc=function(){function e(t,n){this.inlineSize=t,this.blockSize=n,sn(this)}return e}(),$a=function(){function e(t,n,o,i){return this.x=t,this.y=n,this.width=o,this.height=i,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,sn(this)}return e.prototype.toJSON=function(){var t=this,n=t.x,o=t.y,i=t.top,a=t.right,l=t.bottom,s=t.left,d=t.width,c=t.height;return{x:n,y:o,top:i,right:a,bottom:l,left:s,width:d,height:c}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),Eo=function(e){return e instanceof SVGElement&&"getBBox"in e},ka=function(e){if(Eo(e)){var t=e.getBBox(),n=t.width,o=t.height;return!n&&!o}var i=e,a=i.offsetWidth,l=i.offsetHeight;return!(a||l||e.getClientRects().length)},Ta=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)},uc=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},Yn=typeof window<"u"?window:{},Mr=new WeakMap,za=/auto|scroll/,fc=/^tb|vertical/,hc=/msie|trident/i.test(Yn.navigator&&Yn.navigator.userAgent),kt=function(e){return parseFloat(e||"0")},Mn=function(e,t,n){return e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=!1),new cc((n?t:e)||0,(n?e:t)||0)},Pa=sn({devicePixelContentBoxSize:Mn(),borderBoxSize:Mn(),contentBoxSize:Mn(),contentRect:new $a(0,0,0,0)}),Ra=function(e,t){if(t===void 0&&(t=!1),Mr.has(e)&&!t)return Mr.get(e);if(ka(e))return Mr.set(e,Pa),Pa;var n=getComputedStyle(e),o=Eo(e)&&e.ownerSVGElement&&e.getBBox(),i=!hc&&n.boxSizing==="border-box",a=fc.test(n.writingMode||""),l=!o&&za.test(n.overflowY||""),s=!o&&za.test(n.overflowX||""),d=o?0:kt(n.paddingTop),c=o?0:kt(n.paddingRight),f=o?0:kt(n.paddingBottom),u=o?0:kt(n.paddingLeft),b=o?0:kt(n.borderTopWidth),m=o?0:kt(n.borderRightWidth),h=o?0:kt(n.borderBottomWidth),x=o?0:kt(n.borderLeftWidth),w=u+c,g=d+f,P=x+m,L=b+h,$=s?e.offsetHeight-L-e.clientHeight:0,k=l?e.offsetWidth-P-e.clientWidth:0,M=i?w+P:0,p=i?g+L:0,S=o?o.width:kt(n.width)-M-k,B=o?o.height:kt(n.height)-p-$,F=S+w+k+P,I=B+g+$+L,D=sn({devicePixelContentBoxSize:Mn(Math.round(S*devicePixelRatio),Math.round(B*devicePixelRatio),a),borderBoxSize:Mn(F,I,a),contentBoxSize:Mn(S,B,a),contentRect:new $a(u,d,S,B)});return Mr.set(e,D),D},_a=function(e,t,n){var o=Ra(e,n),i=o.borderBoxSize,a=o.contentBoxSize,l=o.devicePixelContentBoxSize;switch(t){case qn.DEVICE_PIXEL_CONTENT_BOX:return l;case qn.BORDER_BOX:return i;default:return a}},pc=function(){function e(t){var n=Ra(t);this.target=t,this.contentRect=n.contentRect,this.borderBoxSize=sn([n.borderBoxSize]),this.contentBoxSize=sn([n.contentBoxSize]),this.devicePixelContentBoxSize=sn([n.devicePixelContentBoxSize])}return e}(),Ea=function(e){if(ka(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},bc=function(){var e=1/0,t=[];ln.forEach(function(l){if(l.activeTargets.length!==0){var s=[];l.activeTargets.forEach(function(c){var f=new pc(c.target),u=Ea(c.target);s.push(f),c.lastReportedSize=_a(c.target,c.observedBox),u<e&&(e=u)}),t.push(function(){l.callback.call(l.observer,s,l.observer)}),l.activeTargets.splice(0,l.activeTargets.length)}});for(var n=0,o=t;n<o.length;n++){var i=o[n];i()}return e},Ba=function(e){ln.forEach(function(n){n.activeTargets.splice(0,n.activeTargets.length),n.skippedTargets.splice(0,n.skippedTargets.length),n.observationTargets.forEach(function(i){i.isActive()&&(Ea(i.target)>e?n.activeTargets.push(i):n.skippedTargets.push(i))})})},gc=function(){var e=0;for(Ba(e);lc();)e=bc(),Ba(e);return sc()&&dc(),e>0},Bo,Ma=[],mc=function(){return Ma.splice(0).forEach(function(e){return e()})},vc=function(e){if(!Bo){var t=0,n=document.createTextNode(""),o={characterData:!0};new MutationObserver(function(){return mc()}).observe(n,o),Bo=function(){n.textContent="".concat(t?t--:t++)}}Ma.push(e),Bo()},xc=function(e){vc(function(){requestAnimationFrame(e)})},Ir=0,yc=function(){return!!Ir},wc=250,Cc={attributes:!0,characterData:!0,childList:!0,subtree:!0},Ia=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Oa=function(e){return e===void 0&&(e=0),Date.now()+e},Mo=!1,Sc=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=wc),!Mo){Mo=!0;var o=Oa(t);xc(function(){var i=!1;try{i=gc()}finally{if(Mo=!1,t=o-Oa(),!yc())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,Cc)};document.body?n():Yn.addEventListener("DOMContentLoaded",n)},e.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Ia.forEach(function(n){return Yn.addEventListener(n,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),Ia.forEach(function(n){return Yn.removeEventListener(n,t.listener,!0)}),this.stopped=!0)},e}(),Io=new Sc,Aa=function(e){!Ir&&e>0&&Io.start(),Ir+=e,!Ir&&Io.stop()},$c=function(e){return!Eo(e)&&!uc(e)&&getComputedStyle(e).display==="inline"},kc=function(){function e(t,n){this.target=t,this.observedBox=n||qn.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var t=_a(this.target,this.observedBox,!0);return $c(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e}(),Tc=function(){function e(t,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=n}return e}(),Or=new WeakMap,Fa=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},Ar=function(){function e(){}return e.connect=function(t,n){var o=new Tc(t,n);Or.set(t,o)},e.observe=function(t,n,o){var i=Or.get(t),a=i.observationTargets.length===0;Fa(i.observationTargets,n)<0&&(a&&ln.push(i),i.observationTargets.push(new kc(n,o&&o.box)),Aa(1),Io.schedule())},e.unobserve=function(t,n){var o=Or.get(t),i=Fa(o.observationTargets,n),a=o.observationTargets.length===1;i>=0&&(a&&ln.splice(ln.indexOf(o),1),o.observationTargets.splice(i,1),Aa(-1))},e.disconnect=function(t){var n=this,o=Or.get(t);o.observationTargets.slice().forEach(function(i){return n.unobserve(t,i.target)}),o.activeTargets.splice(0,o.activeTargets.length)},e}(),zc=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.");Ar.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(!Ta(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Ar.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(!Ta(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Ar.unobserve(this,t)},e.prototype.disconnect=function(){Ar.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}();class Pc{constructor(){this.handleResize=this.handleResize.bind(this),this.observer=new(typeof window<"u"&&window.ResizeObserver||zc)(this.handleResize),this.elHandlersMap=new Map}handleResize(t){for(const n of t){const o=this.elHandlersMap.get(n.target);o!==void 0&&o(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 Fr=new Pc,Wt=r.defineComponent({name:"ResizeObserver",props:{onResize:Function},setup(e){let t=!1;const n=r.getCurrentInstance().proxy;function o(i){const{onResize:a}=e;a!==void 0&&a(i)}r.onMounted(()=>{const i=n.$el;if(i===void 0){ma("resize-observer","$el does not exist.");return}if(i.nextElementSibling!==i.nextSibling&&i.nodeType===3&&i.nodeValue!==""){ma("resize-observer","$el can not be observed (it may be a text node).");return}i.nextElementSibling!==null&&(Fr.registerHandler(i.nextElementSibling,o),t=!0)}),r.onBeforeUnmount(()=>{t&&Fr.unregisterHandler(n.$el.nextElementSibling)})},render(){return r.renderSlot(this.$slots,"default")}});let Dr;function Rc(){return typeof document>"u"?!1:(Dr===void 0&&("matchMedia"in window?Dr=window.matchMedia("(pointer:coarse)").matches:Dr=!1),Dr)}let Oo;function Da(){return typeof document>"u"?1:(Oo===void 0&&(Oo="chrome"in window?window.devicePixelRatio:1),Oo)}const _c=$t(".v-vl",{maxHeight:"inherit",height:"100%",overflow:"auto",minWidth:"1px"},[$t("&:not(.v-vl--show-scrollbar)",{scrollbarWidth:"none"},[$t("&::-webkit-scrollbar, &::-webkit-scrollbar-track-piece, &::-webkit-scrollbar-thumb",{width:0,height:0,display:"none"})])]),Ec=r.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=Nt();_c.mount({id:"vueuc/virtual-list",head:!0,anchorMetaName:_r,ssr:t}),r.onMounted(()=>{const{defaultScrollIndex:I,defaultScrollKey:D}=e;I!=null?h({index:I}):D!=null&&h({key:D})});let n=!1,o=!1;r.onActivated(()=>{if(n=!1,!o){o=!0;return}h({top:u.value,left:f})}),r.onDeactivated(()=>{n=!0,o||(o=!0)});const i=r.computed(()=>{const I=new Map,{keyField:D}=e;return e.items.forEach((j,Q)=>{I.set(j[D],Q)}),I}),a=r.ref(null),l=r.ref(void 0),s=new Map,d=r.computed(()=>{const{items:I,itemSize:D,keyField:j}=e,Q=new Jd(I.length,D);return I.forEach((N,Z)=>{const q=N[j],Y=s.get(q);Y!==void 0&&Q.add(Z,Y)}),Q}),c=r.ref(0);let f=0;const u=r.ref(0),b=Xe(()=>Math.max(d.value.getBound(u.value-rt(e.paddingTop))-1,0)),m=r.computed(()=>{const{value:I}=l;if(I===void 0)return[];const{items:D,itemSize:j}=e,Q=b.value,N=Math.min(Q+Math.ceil(I/j+1),D.length-1),Z=[];for(let q=Q;q<=N;++q)Z.push(D[q]);return Z}),h=(I,D)=>{if(typeof I=="number"){P(I,D,"auto");return}const{left:j,top:Q,index:N,key:Z,position:q,behavior:Y,debounce:de=!0}=I;if(j!==void 0||Q!==void 0)P(j,Q,Y);else if(N!==void 0)g(N,Y,de);else if(Z!==void 0){const ie=i.value.get(Z);ie!==void 0&&g(ie,Y,de)}else q==="bottom"?P(0,Number.MAX_SAFE_INTEGER,Y):q==="top"&&P(0,0,Y)};let x,w=null;function g(I,D,j){const{value:Q}=d,N=Q.sum(I)+rt(e.paddingTop);if(!j)a.value.scrollTo({left:0,top:N,behavior:D});else{x=I,w!==null&&window.clearTimeout(w),w=window.setTimeout(()=>{x=void 0,w=null},16);const{scrollTop:Z,offsetHeight:q}=a.value;if(N>Z){const Y=Q.get(I);N+Y<=Z+q||a.value.scrollTo({left:0,top:N+Y-q,behavior:D})}else a.value.scrollTo({left:0,top:N,behavior:D})}}function P(I,D,j){a.value.scrollTo({left:I,top:D,behavior:j})}function L(I,D){var j,Q,N;if(n||e.ignoreItemResize||F(D.target))return;const{value:Z}=d,q=i.value.get(I),Y=Z.get(q),de=(N=(Q=(j=D.borderBoxSize)===null||j===void 0?void 0:j[0])===null||Q===void 0?void 0:Q.blockSize)!==null&&N!==void 0?N:D.contentRect.height;if(de===Y)return;de-e.itemSize===0?s.delete(I):s.set(I,de-e.itemSize);const ce=de-Y;if(ce===0)return;Z.add(q,ce);const U=a.value;if(U!=null){if(x===void 0){const te=Z.sum(q);U.scrollTop>te&&U.scrollBy(0,ce)}else if(q<x)U.scrollBy(0,ce);else if(q===x){const te=Z.sum(q);de+te>U.scrollTop+U.offsetHeight&&U.scrollBy(0,ce)}B()}c.value++}const $=!Rc();let k=!1;function M(I){var D;(D=e.onScroll)===null||D===void 0||D.call(e,I),(!$||!k)&&B()}function p(I){var D;if((D=e.onWheel)===null||D===void 0||D.call(e,I),$){const j=a.value;if(j!=null){if(I.deltaX===0&&(j.scrollTop===0&&I.deltaY<=0||j.scrollTop+j.offsetHeight>=j.scrollHeight&&I.deltaY>=0))return;I.preventDefault(),j.scrollTop+=I.deltaY/Da(),j.scrollLeft+=I.deltaX/Da(),B(),k=!0,ji(()=>{k=!1})}}}function S(I){if(n||F(I.target)||I.contentRect.height===l.value)return;l.value=I.contentRect.height;const{onResize:D}=e;D!==void 0&&D(I)}function B(){const{value:I}=a;I!=null&&(u.value=I.scrollTop,f=I.scrollLeft)}function F(I){let D=I;for(;D!==null;){if(D.style.display==="none")return!0;D=D.parentElement}return!1}return{listHeight:l,listStyle:{overflow:"auto"},keyToIndex:i,itemsStyle:r.computed(()=>{const{itemResizable:I}=e,D=en(d.value.sum());return c.value,[e.itemsStyle,{boxSizing:"content-box",height:I?"":D,minHeight:I?D:"",paddingTop:en(e.paddingTop),paddingBottom:en(e.paddingBottom)}]}),visibleItemsStyle:r.computed(()=>(c.value,{transform:`translateY(${en(d.value.sum(b.value))})`})),viewportItems:m,listElRef:a,itemsElRef:r.ref(null),scrollTo:h,handleListResize:S,handleListScroll:M,handleListWheel:p,handleItemResize:L}},render(){const{itemResizable:e,keyField:t,keyToIndex:n,visibleItemsTag:o}=this;return r.h(Wt,{onResize:this.handleListResize},{default:()=>{var i,a;return r.h("div",r.mergeProps(this.$attrs,{class:["v-vl",this.showScrollbar&&"v-vl--show-scrollbar"],onScroll:this.handleListScroll,onWheel:this.handleListWheel,ref:"listElRef"}),[this.items.length!==0?r.h("div",{ref:"itemsElRef",class:"v-vl-items",style:this.itemsStyle},[r.h(o,Object.assign({class:"v-vl-visible-items",style:this.visibleItemsStyle},this.visibleItemsProps),{default:()=>this.viewportItems.map(l=>{const s=l[t],d=n.get(s),c=this.$slots.default({item:l,index:d})[0];return e?r.h(Wt,{key:s,onResize:f=>this.handleItemResize(s,f)},{default:()=>c}):(c.key=s,c)})})]):(a=(i=this.$slots).empty)===null||a===void 0?void 0:a.call(i)])}})}}),Bc=$t(".v-x-scroll",{overflow:"auto",scrollbarWidth:"none"},[$t("&::-webkit-scrollbar",{width:0,height:0})]),Mc=r.defineComponent({name:"XScroll",props:{disabled:Boolean,onScroll:Function},setup(){const e=r.ref(null);function t(i){!(i.currentTarget.offsetWidth<i.currentTarget.scrollWidth)||i.deltaY===0||(i.currentTarget.scrollLeft+=i.deltaY+i.deltaX,i.preventDefault())}const n=Nt();return Bc.mount({id:"vueuc/x-scroll",head:!0,anchorMetaName:_r,ssr:n}),Object.assign({selfRef:e,handleWheel:t},{scrollTo(...i){var a;(a=e.value)===null||a===void 0||a.scrollTo(...i)}})},render(){return r.h("div",{ref:"selfRef",onScroll:this.onScroll,onWheel:this.disabled?void 0:this.handleWheel,class:"v-x-scroll"},this.$slots)}}),_t="v-hidden",Ic=$t("[v-hidden]",{display:"none!important"}),Va=r.defineComponent({name:"Overflow",props:{getCounter:Function,getTail:Function,updateCounter:Function,onUpdateCount:Function,onUpdateOverflow:Function},setup(e,{slots:t}){const n=r.ref(null),o=r.ref(null);function i(l){const{value:s}=n,{getCounter:d,getTail:c}=e;let f;if(d!==void 0?f=d():f=o.value,!s||!f)return;f.hasAttribute(_t)&&f.removeAttribute(_t);const{children:u}=s;if(l.showAllItemsBeforeCalculate)for(const L of u)L.hasAttribute(_t)&&L.removeAttribute(_t);const b=s.offsetWidth,m=[],h=t.tail?c==null?void 0:c():null;let x=h?h.offsetWidth:0,w=!1;const g=s.children.length-(t.tail?1:0);for(let L=0;L<g-1;++L){if(L<0)continue;const $=u[L];if(w){$.hasAttribute(_t)||$.setAttribute(_t,"");continue}else $.hasAttribute(_t)&&$.removeAttribute(_t);const k=$.offsetWidth;if(x+=k,m[L]=k,x>b){const{updateCounter:M}=e;for(let p=L;p>=0;--p){const S=g-1-p;M!==void 0?M(S):f.textContent=`${S}`;const B=f.offsetWidth;if(x-=m[p],x+B<=b||p===0){w=!0,L=p-1,h&&(L===-1?(h.style.maxWidth=`${b-B}px`,h.style.boxSizing="border-box"):h.style.maxWidth="");const{onUpdateCount:F}=e;F&&F(S);break}}}}const{onUpdateOverflow:P}=e;w?P!==void 0&&P(!0):(P!==void 0&&P(!1),f.setAttribute(_t,""))}const a=Nt();return Ic.mount({id:"vueuc/overflow",head:!0,anchorMetaName:_r,ssr:a}),r.onMounted(()=>i({showAllItemsBeforeCalculate:!1})),{selfRef:n,counterRef:o,sync:i}},render(){const{$slots:e}=this;return r.nextTick(()=>this.sync({showAllItemsBeforeCalculate:!1})),r.h("div",{class:"v-overflow",ref:"selfRef"},[r.renderSlot(e,"default"),e.counter?e.counter():r.h("span",{style:{display:"inline-block"},ref:"counterRef"}),e.tail?e.tail():null])}});function La(e){return e instanceof HTMLElement}function Ha(e){for(let t=0;t<e.childNodes.length;t++){const n=e.childNodes[t];if(La(n)&&(Wa(n)||Ha(n)))return!0}return!1}function Na(e){for(let t=e.childNodes.length-1;t>=0;t--){const n=e.childNodes[t];if(La(n)&&(Wa(n)||Na(n)))return!0}return!1}function Wa(e){if(!Oc(e))return!1;try{e.focus({preventScroll:!0})}catch{}return document.activeElement===e}function Oc(e){if(e.tabIndex>0||e.tabIndex===0&&e.getAttribute("tabIndex")!==null)return!0;if(e.getAttribute("disabled"))return!1;switch(e.nodeName){case"A":return!!e.href&&e.rel!=="ignore";case"INPUT":return e.type!=="hidden"&&e.type!=="file";case"BUTTON":case"SELECT":case"TEXTAREA":return!0;default:return!1}}let Zn=[];const Ac=r.defineComponent({name:"FocusTrap",props:{disabled:Boolean,active:Boolean,autoFocus:{type:Boolean,default:!0},onEsc:Function,initialFocusTo:String,finalFocusTo:String,returnFocusOnDeactivated:{type:Boolean,default:!0}},setup(e){const t=nd(),n=r.ref(null),o=r.ref(null);let i=!1,a=!1;const l=typeof document>"u"?null:document.activeElement;function s(){return Zn[Zn.length-1]===t}function d(w){var g;w.code==="Escape"&&s()&&((g=e.onEsc)===null||g===void 0||g.call(e,w))}r.onMounted(()=>{r.watch(()=>e.active,w=>{w?(u(),Pe("keydown",document,d)):($e("keydown",document,d),i&&b())},{immediate:!0})}),r.onBeforeUnmount(()=>{$e("keydown",document,d),i&&b()});function c(w){if(!a&&s()){const g=f();if(g===null||g.contains($n(w)))return;m("first")}}function f(){const w=n.value;if(w===null)return null;let g=w;for(;g=g.nextSibling,!(g===null||g instanceof Element&&g.tagName==="DIV"););return g}function u(){var w;if(!e.disabled){if(Zn.push(t),e.autoFocus){const{initialFocusTo:g}=e;g===void 0?m("first"):(w=xa(g))===null||w===void 0||w.focus({preventScroll:!0})}i=!0,document.addEventListener("focus",c,!0)}}function b(){var w;if(e.disabled||(document.removeEventListener("focus",c,!0),Zn=Zn.filter(P=>P!==t),s()))return;const{finalFocusTo:g}=e;g!==void 0?(w=xa(g))===null||w===void 0||w.focus({preventScroll:!0}):e.returnFocusOnDeactivated&&l instanceof HTMLElement&&(a=!0,l.focus({preventScroll:!0}),a=!1)}function m(w){if(s()&&e.active){const g=n.value,P=o.value;if(g!==null&&P!==null){const L=f();if(L==null||L===P){a=!0,g.focus({preventScroll:!0}),a=!1;return}a=!0;const $=w==="first"?Ha(L):Na(L);a=!1,$||(a=!0,g.focus({preventScroll:!0}),a=!1)}}}function h(w){if(a)return;const g=f();g!==null&&(w.relatedTarget!==null&&g.contains(w.relatedTarget)?m("last"):m("first"))}function x(w){a||(w.relatedTarget!==null&&w.relatedTarget===n.value?m("last"):m("first"))}return{focusableStartRef:n,focusableEndRef:o,focusableStyle:"position: absolute; height: 0; width: 0;",handleStartFocus:h,handleEndFocus:x}},render(){const{default:e}=this.$slots;if(e===void 0)return null;if(this.disabled)return e();const{active:t,focusableStyle:n}=this;return r.h(r.Fragment,null,[r.h("div",{"aria-hidden":"true",tabindex:t?"0":"-1",ref:"focusableStartRef",style:n,onFocus:this.handleStartFocus}),e(),r.h("div",{"aria-hidden":"true",style:n,ref:"focusableEndRef",tabindex:t?"0":"-1",onFocus:this.handleEndFocus})])}});function ja(e,t){t&&(r.onMounted(()=>{const{value:n}=e;n&&Fr.registerHandler(n,t)}),r.onBeforeUnmount(()=>{const{value:n}=e;n&&Fr.unregisterHandler(n)}))}function Fc(e){const t={isDeactivated:!1};let n=!1;return r.onActivated(()=>{if(t.isDeactivated=!1,!n){n=!0;return}e()}),r.onDeactivated(()=>{t.isDeactivated=!0,n||(n=!0)}),t}const Ua="n-form-item";function dn(e,{defaultSize:t="medium",mergedSize:n,mergedDisabled:o}={}){const i=r.inject(Ua,null);r.provide(Ua,null);const a=r.computed(n?()=>n(i):()=>{const{size:d}=e;if(d)return d;if(i){const{mergedSize:c}=i;if(c.value!==void 0)return c.value}return t}),l=r.computed(o?()=>o(i):()=>{const{disabled:d}=e;return d!==void 0?d:i?i.disabled.value:!1}),s=r.computed(()=>{const{status:d}=e;return d||(i==null?void 0:i.mergedValidationStatus.value)});return r.onBeforeUnmount(()=>{i&&i.restoreValidation()}),{mergedSizeRef:a,mergedDisabledRef:l,mergedStatusRef:s,nTriggerFormBlur(){i&&i.handleContentBlur()},nTriggerFormChange(){i&&i.handleContentChange()},nTriggerFormFocus(){i&&i.handleContentFocus()},nTriggerFormInput(){i&&i.handleContentInput()}}}var Ga=typeof global=="object"&&global&&global.Object===Object&&global,Dc=typeof self=="object"&&self&&self.Object===Object&&self,bt=Ga||Dc||Function("return this")(),jt=bt.Symbol,Ka=Object.prototype,Vc=Ka.hasOwnProperty,Lc=Ka.toString,Jn=jt?jt.toStringTag:void 0;function Hc(e){var t=Vc.call(e,Jn),n=e[Jn];try{e[Jn]=void 0;var o=!0}catch{}var i=Lc.call(e);return o&&(t?e[Jn]=n:delete e[Jn]),i}var Nc=Object.prototype,Wc=Nc.toString;function jc(e){return Wc.call(e)}var Uc="[object Null]",Gc="[object Undefined]",Xa=jt?jt.toStringTag:void 0;function cn(e){return e==null?e===void 0?Gc:Uc:Xa&&Xa in Object(e)?Hc(e):jc(e)}function Ut(e){return e!=null&&typeof e=="object"}var Kc="[object Symbol]";function Vr(e){return typeof e=="symbol"||Ut(e)&&cn(e)==Kc}function qa(e,t){for(var n=-1,o=e==null?0:e.length,i=Array(o);++n<o;)i[n]=t(e[n],n,e);return i}var ft=Array.isArray,Xc=1/0,Ya=jt?jt.prototype:void 0,Za=Ya?Ya.toString:void 0;function Ja(e){if(typeof e=="string")return e;if(ft(e))return qa(e,Ja)+"";if(Vr(e))return Za?Za.call(e):"";var t=e+"";return t=="0"&&1/e==-Xc?"-0":t}var qc=/\s/;function Yc(e){for(var t=e.length;t--&&qc.test(e.charAt(t)););return t}var Zc=/^\s+/;function Jc(e){return e&&e.slice(0,Yc(e)+1).replace(Zc,"")}function ht(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Qa=NaN,Qc=/^[-+]0x[0-9a-f]+$/i,eu=/^0b[01]+$/i,tu=/^0o[0-7]+$/i,nu=parseInt;function el(e){if(typeof e=="number")return e;if(Vr(e))return Qa;if(ht(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=ht(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Jc(e);var n=eu.test(e);return n||tu.test(e)?nu(e.slice(2),n?2:8):Qc.test(e)?Qa:+e}function Ao(e){return e}var ru="[object AsyncFunction]",ou="[object Function]",iu="[object GeneratorFunction]",au="[object Proxy]";function Fo(e){if(!ht(e))return!1;var t=cn(e);return t==ou||t==iu||t==ru||t==au}var Do=bt["__core-js_shared__"],tl=function(){var e=/[^.]+$/.exec(Do&&Do.keys&&Do.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function lu(e){return!!tl&&tl in e}var su=Function.prototype,du=su.toString;function un(e){if(e!=null){try{return du.call(e)}catch{}try{return e+""}catch{}}return""}var cu=/[\\^$.*+?()[\]{}|]/g,uu=/^\[object .+?Constructor\]$/,fu=Function.prototype,hu=Object.prototype,pu=fu.toString,bu=hu.hasOwnProperty,gu=RegExp("^"+pu.call(bu).replace(cu,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function mu(e){if(!ht(e)||lu(e))return!1;var t=Fo(e)?gu:uu;return t.test(un(e))}function vu(e,t){return e==null?void 0:e[t]}function fn(e,t){var n=vu(e,t);return mu(n)?n:void 0}var Vo=fn(bt,"WeakMap"),nl=Object.create,xu=function(){function e(){}return function(t){if(!ht(t))return{};if(nl)return nl(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function yu(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function wu(e,t){var n=-1,o=e.length;for(t||(t=Array(o));++n<o;)t[n]=e[n];return t}var Cu=800,Su=16,$u=Date.now;function ku(e){var t=0,n=0;return function(){var o=$u(),i=Su-(o-n);if(n=o,i>0){if(++t>=Cu)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Tu(e){return function(){return e}}var Lr=function(){try{var e=fn(Object,"defineProperty");return e({},"",{}),e}catch{}}(),zu=Lr?function(e,t){return Lr(e,"toString",{configurable:!0,enumerable:!1,value:Tu(t),writable:!0})}:Ao,Pu=ku(zu),Ru=9007199254740991,_u=/^(?:0|[1-9]\d*)$/;function Lo(e,t){var n=typeof e;return t=t??Ru,!!t&&(n=="number"||n!="symbol"&&_u.test(e))&&e>-1&&e%1==0&&e<t}function Ho(e,t,n){t=="__proto__"&&Lr?Lr(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Qn(e,t){return e===t||e!==e&&t!==t}var Eu=Object.prototype,Bu=Eu.hasOwnProperty;function Mu(e,t,n){var o=e[t];(!(Bu.call(e,t)&&Qn(o,n))||n===void 0&&!(t in e))&&Ho(e,t,n)}function Iu(e,t,n,o){var i=!n;n||(n={});for(var a=-1,l=t.length;++a<l;){var s=t[a],d=void 0;d===void 0&&(d=e[s]),i?Ho(n,s,d):Mu(n,s,d)}return n}var rl=Math.max;function Ou(e,t,n){return t=rl(t===void 0?e.length-1:t,0),function(){for(var o=arguments,i=-1,a=rl(o.length-t,0),l=Array(a);++i<a;)l[i]=o[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=o[i];return s[t]=n(l),yu(e,this,s)}}function Au(e,t){return Pu(Ou(e,t,Ao),e+"")}var Fu=9007199254740991;function No(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Fu}function In(e){return e!=null&&No(e.length)&&!Fo(e)}function Du(e,t,n){if(!ht(n))return!1;var o=typeof t;return(o=="number"?In(n)&&Lo(t,n.length):o=="string"&&t in n)?Qn(n[t],e):!1}function Vu(e){return Au(function(t,n){var o=-1,i=n.length,a=i>1?n[i-1]:void 0,l=i>2?n[2]:void 0;for(a=e.length>3&&typeof a=="function"?(i--,a):void 0,l&&Du(n[0],n[1],l)&&(a=i<3?void 0:a,i=1),t=Object(t);++o<i;){var s=n[o];s&&e(t,s,o,a)}return t})}var Lu=Object.prototype;function Wo(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Lu;return e===n}function Hu(e,t){for(var n=-1,o=Array(e);++n<e;)o[n]=t(n);return o}var Nu="[object Arguments]";function ol(e){return Ut(e)&&cn(e)==Nu}var il=Object.prototype,Wu=il.hasOwnProperty,ju=il.propertyIsEnumerable,Hr=ol(function(){return arguments}())?ol:function(e){return Ut(e)&&Wu.call(e,"callee")&&!ju.call(e,"callee")};function Uu(){return!1}var al=typeof We=="object"&&We&&!We.nodeType&&We,ll=al&&typeof module=="object"&&module&&!module.nodeType&&module,Gu=ll&&ll.exports===al,sl=Gu?bt.Buffer:void 0,Ku=sl?sl.isBuffer:void 0,Nr=Ku||Uu,Xu="[object Arguments]",qu="[object Array]",Yu="[object Boolean]",Zu="[object Date]",Ju="[object Error]",Qu="[object Function]",ef="[object Map]",tf="[object Number]",nf="[object Object]",rf="[object RegExp]",of="[object Set]",af="[object String]",lf="[object WeakMap]",sf="[object ArrayBuffer]",df="[object DataView]",cf="[object Float32Array]",uf="[object Float64Array]",ff="[object Int8Array]",hf="[object Int16Array]",pf="[object Int32Array]",bf="[object Uint8Array]",gf="[object Uint8ClampedArray]",mf="[object Uint16Array]",vf="[object Uint32Array]",Fe={};Fe[cf]=Fe[uf]=Fe[ff]=Fe[hf]=Fe[pf]=Fe[bf]=Fe[gf]=Fe[mf]=Fe[vf]=!0,Fe[Xu]=Fe[qu]=Fe[sf]=Fe[Yu]=Fe[df]=Fe[Zu]=Fe[Ju]=Fe[Qu]=Fe[ef]=Fe[tf]=Fe[nf]=Fe[rf]=Fe[of]=Fe[af]=Fe[lf]=!1;function xf(e){return Ut(e)&&No(e.length)&&!!Fe[cn(e)]}function yf(e){return function(t){return e(t)}}var dl=typeof We=="object"&&We&&!We.nodeType&&We,er=dl&&typeof module=="object"&&module&&!module.nodeType&&module,wf=er&&er.exports===dl,jo=wf&&Ga.process,cl=function(){try{var e=er&&er.require&&er.require("util").types;return e||jo&&jo.binding&&jo.binding("util")}catch{}}(),ul=cl&&cl.isTypedArray,Uo=ul?yf(ul):xf,Cf=Object.prototype,Sf=Cf.hasOwnProperty;function fl(e,t){var n=ft(e),o=!n&&Hr(e),i=!n&&!o&&Nr(e),a=!n&&!o&&!i&&Uo(e),l=n||o||i||a,s=l?Hu(e.length,String):[],d=s.length;for(var c in e)(t||Sf.call(e,c))&&!(l&&(c=="length"||i&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Lo(c,d)))&&s.push(c);return s}function hl(e,t){return function(n){return e(t(n))}}var $f=hl(Object.keys,Object),kf=Object.prototype,Tf=kf.hasOwnProperty;function zf(e){if(!Wo(e))return $f(e);var t=[];for(var n in Object(e))Tf.call(e,n)&&n!="constructor"&&t.push(n);return t}function Go(e){return In(e)?fl(e):zf(e)}function Pf(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var Rf=Object.prototype,_f=Rf.hasOwnProperty;function Ef(e){if(!ht(e))return Pf(e);var t=Wo(e),n=[];for(var o in e)o=="constructor"&&(t||!_f.call(e,o))||n.push(o);return n}function pl(e){return In(e)?fl(e,!0):Ef(e)}var Bf=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Mf=/^\w*$/;function Ko(e,t){if(ft(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||Vr(e)?!0:Mf.test(e)||!Bf.test(e)||t!=null&&e in Object(t)}var tr=fn(Object,"create");function If(){this.__data__=tr?tr(null):{},this.size=0}function Of(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Af="__lodash_hash_undefined__",Ff=Object.prototype,Df=Ff.hasOwnProperty;function Vf(e){var t=this.__data__;if(tr){var n=t[e];return n===Af?void 0:n}return Df.call(t,e)?t[e]:void 0}var Lf=Object.prototype,Hf=Lf.hasOwnProperty;function Nf(e){var t=this.__data__;return tr?t[e]!==void 0:Hf.call(t,e)}var Wf="__lodash_hash_undefined__";function jf(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=tr&&t===void 0?Wf:t,this}function hn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}hn.prototype.clear=If,hn.prototype.delete=Of,hn.prototype.get=Vf,hn.prototype.has=Nf,hn.prototype.set=jf;function Uf(){this.__data__=[],this.size=0}function Wr(e,t){for(var n=e.length;n--;)if(Qn(e[n][0],t))return n;return-1}var Gf=Array.prototype,Kf=Gf.splice;function Xf(e){var t=this.__data__,n=Wr(t,e);if(n<0)return!1;var o=t.length-1;return n==o?t.pop():Kf.call(t,n,1),--this.size,!0}function qf(e){var t=this.__data__,n=Wr(t,e);return n<0?void 0:t[n][1]}function Yf(e){return Wr(this.__data__,e)>-1}function Zf(e,t){var n=this.__data__,o=Wr(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}function Et(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}Et.prototype.clear=Uf,Et.prototype.delete=Xf,Et.prototype.get=qf,Et.prototype.has=Yf,Et.prototype.set=Zf;var nr=fn(bt,"Map");function Jf(){this.size=0,this.__data__={hash:new hn,map:new(nr||Et),string:new hn}}function Qf(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function jr(e,t){var n=e.__data__;return Qf(t)?n[typeof t=="string"?"string":"hash"]:n.map}function eh(e){var t=jr(this,e).delete(e);return this.size-=t?1:0,t}function th(e){return jr(this,e).get(e)}function nh(e){return jr(this,e).has(e)}function rh(e,t){var n=jr(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}function Bt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}Bt.prototype.clear=Jf,Bt.prototype.delete=eh,Bt.prototype.get=th,Bt.prototype.has=nh,Bt.prototype.set=rh;var oh="Expected a function";function Xo(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(oh);var n=function(){var o=arguments,i=t?t.apply(this,o):o[0],a=n.cache;if(a.has(i))return a.get(i);var l=e.apply(this,o);return n.cache=a.set(i,l)||a,l};return n.cache=new(Xo.Cache||Bt),n}Xo.Cache=Bt;var ih=500;function ah(e){var t=Xo(e,function(o){return n.size===ih&&n.clear(),o}),n=t.cache;return t}var lh=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,sh=/\\(\\)?/g,dh=ah(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(lh,function(n,o,i,a){t.push(i?a.replace(sh,"$1"):o||n)}),t});function bl(e){return e==null?"":Ja(e)}function gl(e,t){return ft(e)?e:Ko(e,t)?[e]:dh(bl(e))}var ch=1/0;function Ur(e){if(typeof e=="string"||Vr(e))return e;var t=e+"";return t=="0"&&1/e==-ch?"-0":t}function ml(e,t){t=gl(t,e);for(var n=0,o=t.length;e!=null&&n<o;)e=e[Ur(t[n++])];return n&&n==o?e:void 0}function uh(e,t,n){var o=e==null?void 0:ml(e,t);return o===void 0?n:o}function fh(e,t){for(var n=-1,o=t.length,i=e.length;++n<o;)e[i+n]=t[n];return e}var vl=hl(Object.getPrototypeOf,Object),hh="[object Object]",ph=Function.prototype,bh=Object.prototype,xl=ph.toString,gh=bh.hasOwnProperty,mh=xl.call(Object);function vh(e){if(!Ut(e)||cn(e)!=hh)return!1;var t=vl(e);if(t===null)return!0;var n=gh.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&xl.call(n)==mh}function xh(e,t,n){var o=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(i);++o<i;)a[o]=e[o+t];return a}function yh(e,t,n){var o=e.length;return n=n===void 0?o:n,!t&&n>=o?e:xh(e,t,n)}var wh="\\ud800-\\udfff",Ch="\\u0300-\\u036f",Sh="\\ufe20-\\ufe2f",$h="\\u20d0-\\u20ff",kh=Ch+Sh+$h,Th="\\ufe0e\\ufe0f",zh="\\u200d",Ph=RegExp("["+zh+wh+kh+Th+"]");function yl(e){return Ph.test(e)}function Rh(e){return e.split("")}var wl="\\ud800-\\udfff",_h="\\u0300-\\u036f",Eh="\\ufe20-\\ufe2f",Bh="\\u20d0-\\u20ff",Mh=_h+Eh+Bh,Ih="\\ufe0e\\ufe0f",Oh="["+wl+"]",qo="["+Mh+"]",Yo="\\ud83c[\\udffb-\\udfff]",Ah="(?:"+qo+"|"+Yo+")",Cl="[^"+wl+"]",Sl="(?:\\ud83c[\\udde6-\\uddff]){2}",$l="[\\ud800-\\udbff][\\udc00-\\udfff]",Fh="\\u200d",kl=Ah+"?",Tl="["+Ih+"]?",Dh="(?:"+Fh+"(?:"+[Cl,Sl,$l].join("|")+")"+Tl+kl+")*",Vh=Tl+kl+Dh,Lh="(?:"+[Cl+qo+"?",qo,Sl,$l,Oh].join("|")+")",Hh=RegExp(Yo+"(?="+Yo+")|"+Lh+Vh,"g");function Nh(e){return e.match(Hh)||[]}function Wh(e){return yl(e)?Nh(e):Rh(e)}function jh(e){return function(t){t=bl(t);var n=yl(t)?Wh(t):void 0,o=n?n[0]:t.charAt(0),i=n?yh(n,1).join(""):t.slice(1);return o[e]()+i}}var Uh=jh("toUpperCase");function Gh(){this.__data__=new Et,this.size=0}function Kh(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function Xh(e){return this.__data__.get(e)}function qh(e){return this.__data__.has(e)}var Yh=200;function Zh(e,t){var n=this.__data__;if(n instanceof Et){var o=n.__data__;if(!nr||o.length<Yh-1)return o.push([e,t]),this.size=++n.size,this;n=this.__data__=new Bt(o)}return n.set(e,t),this.size=n.size,this}function Tt(e){var t=this.__data__=new Et(e);this.size=t.size}Tt.prototype.clear=Gh,Tt.prototype.delete=Kh,Tt.prototype.get=Xh,Tt.prototype.has=qh,Tt.prototype.set=Zh;var zl=typeof We=="object"&&We&&!We.nodeType&&We,Pl=zl&&typeof module=="object"&&module&&!module.nodeType&&module,Jh=Pl&&Pl.exports===zl,Rl=Jh?bt.Buffer:void 0;Rl&&Rl.allocUnsafe;function Qh(e,t){return e.slice()}function ep(e,t){for(var n=-1,o=e==null?0:e.length,i=0,a=[];++n<o;){var l=e[n];t(l,n,e)&&(a[i++]=l)}return a}function tp(){return[]}var np=Object.prototype,rp=np.propertyIsEnumerable,_l=Object.getOwnPropertySymbols,op=_l?function(e){return e==null?[]:(e=Object(e),ep(_l(e),function(t){return rp.call(e,t)}))}:tp;function ip(e,t,n){var o=t(e);return ft(e)?o:fh(o,n(e))}function El(e){return ip(e,Go,op)}var Zo=fn(bt,"DataView"),Jo=fn(bt,"Promise"),Qo=fn(bt,"Set"),Bl="[object Map]",ap="[object Object]",Ml="[object Promise]",Il="[object Set]",Ol="[object WeakMap]",Al="[object DataView]",lp=un(Zo),sp=un(nr),dp=un(Jo),cp=un(Qo),up=un(Vo),Gt=cn;(Zo&&Gt(new Zo(new ArrayBuffer(1)))!=Al||nr&&Gt(new nr)!=Bl||Jo&&Gt(Jo.resolve())!=Ml||Qo&&Gt(new Qo)!=Il||Vo&&Gt(new Vo)!=Ol)&&(Gt=function(e){var t=cn(e),n=t==ap?e.constructor:void 0,o=n?un(n):"";if(o)switch(o){case lp:return Al;case sp:return Bl;case dp:return Ml;case cp:return Il;case up:return Ol}return t});var Gr=bt.Uint8Array;function fp(e){var t=new e.constructor(e.byteLength);return new Gr(t).set(new Gr(e)),t}function hp(e,t){var n=fp(e.buffer);return new e.constructor(n,e.byteOffset,e.length)}function pp(e){return typeof e.constructor=="function"&&!Wo(e)?xu(vl(e)):{}}var bp="__lodash_hash_undefined__";function gp(e){return this.__data__.set(e,bp),this}function mp(e){return this.__data__.has(e)}function Kr(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Bt;++t<n;)this.add(e[t])}Kr.prototype.add=Kr.prototype.push=gp,Kr.prototype.has=mp;function vp(e,t){for(var n=-1,o=e==null?0:e.length;++n<o;)if(t(e[n],n,e))return!0;return!1}function xp(e,t){return e.has(t)}var yp=1,wp=2;function Fl(e,t,n,o,i,a){var l=n&yp,s=e.length,d=t.length;if(s!=d&&!(l&&d>s))return!1;var c=a.get(e),f=a.get(t);if(c&&f)return c==t&&f==e;var u=-1,b=!0,m=n&wp?new Kr:void 0;for(a.set(e,t),a.set(t,e);++u<s;){var h=e[u],x=t[u];if(o)var w=l?o(x,h,u,t,e,a):o(h,x,u,e,t,a);if(w!==void 0){if(w)continue;b=!1;break}if(m){if(!vp(t,function(g,P){if(!xp(m,P)&&(h===g||i(h,g,n,o,a)))return m.push(P)})){b=!1;break}}else if(!(h===x||i(h,x,n,o,a))){b=!1;break}}return a.delete(e),a.delete(t),b}function Cp(e){var t=-1,n=Array(e.size);return e.forEach(function(o,i){n[++t]=[i,o]}),n}function Sp(e){var t=-1,n=Array(e.size);return e.forEach(function(o){n[++t]=o}),n}var $p=1,kp=2,Tp="[object Boolean]",zp="[object Date]",Pp="[object Error]",Rp="[object Map]",_p="[object Number]",Ep="[object RegExp]",Bp="[object Set]",Mp="[object String]",Ip="[object Symbol]",Op="[object ArrayBuffer]",Ap="[object DataView]",Dl=jt?jt.prototype:void 0,ei=Dl?Dl.valueOf:void 0;function Fp(e,t,n,o,i,a,l){switch(n){case Ap:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Op:return!(e.byteLength!=t.byteLength||!a(new Gr(e),new Gr(t)));case Tp:case zp:case _p:return Qn(+e,+t);case Pp:return e.name==t.name&&e.message==t.message;case Ep:case Mp:return e==t+"";case Rp:var s=Cp;case Bp:var d=o&$p;if(s||(s=Sp),e.size!=t.size&&!d)return!1;var c=l.get(e);if(c)return c==t;o|=kp,l.set(e,t);var f=Fl(s(e),s(t),o,i,a,l);return l.delete(e),f;case Ip:if(ei)return ei.call(e)==ei.call(t)}return!1}var Dp=1,Vp=Object.prototype,Lp=Vp.hasOwnProperty;function Hp(e,t,n,o,i,a){var l=n&Dp,s=El(e),d=s.length,c=El(t),f=c.length;if(d!=f&&!l)return!1;for(var u=d;u--;){var b=s[u];if(!(l?b in t:Lp.call(t,b)))return!1}var m=a.get(e),h=a.get(t);if(m&&h)return m==t&&h==e;var x=!0;a.set(e,t),a.set(t,e);for(var w=l;++u<d;){b=s[u];var g=e[b],P=t[b];if(o)var L=l?o(P,g,b,t,e,a):o(g,P,b,e,t,a);if(!(L===void 0?g===P||i(g,P,n,o,a):L)){x=!1;break}w||(w=b=="constructor")}if(x&&!w){var $=e.constructor,k=t.constructor;$!=k&&"constructor"in e&&"constructor"in t&&!(typeof $=="function"&&$ instanceof $&&typeof k=="function"&&k instanceof k)&&(x=!1)}return a.delete(e),a.delete(t),x}var Np=1,Vl="[object Arguments]",Ll="[object Array]",Xr="[object Object]",Wp=Object.prototype,Hl=Wp.hasOwnProperty;function jp(e,t,n,o,i,a){var l=ft(e),s=ft(t),d=l?Ll:Gt(e),c=s?Ll:Gt(t);d=d==Vl?Xr:d,c=c==Vl?Xr:c;var f=d==Xr,u=c==Xr,b=d==c;if(b&&Nr(e)){if(!Nr(t))return!1;l=!0,f=!1}if(b&&!f)return a||(a=new Tt),l||Uo(e)?Fl(e,t,n,o,i,a):Fp(e,t,d,n,o,i,a);if(!(n&Np)){var m=f&&Hl.call(e,"__wrapped__"),h=u&&Hl.call(t,"__wrapped__");if(m||h){var x=m?e.value():e,w=h?t.value():t;return a||(a=new Tt),i(x,w,n,o,a)}}return b?(a||(a=new Tt),Hp(e,t,n,o,i,a)):!1}function ti(e,t,n,o,i){return e===t?!0:e==null||t==null||!Ut(e)&&!Ut(t)?e!==e&&t!==t:jp(e,t,n,o,ti,i)}var Up=1,Gp=2;function Kp(e,t,n,o){var i=n.length,a=i;if(e==null)return!a;for(e=Object(e);i--;){var l=n[i];if(l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++i<a;){l=n[i];var s=l[0],d=e[s],c=l[1];if(l[2]){if(d===void 0&&!(s in e))return!1}else{var f=new Tt,u;if(!(u===void 0?ti(c,d,Up|Gp,o,f):u))return!1}}return!0}function Nl(e){return e===e&&!ht(e)}function Xp(e){for(var t=Go(e),n=t.length;n--;){var o=t[n],i=e[o];t[n]=[o,i,Nl(i)]}return t}function Wl(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function qp(e){var t=Xp(e);return t.length==1&&t[0][2]?Wl(t[0][0],t[0][1]):function(n){return n===e||Kp(n,e,t)}}function Yp(e,t){return e!=null&&t in Object(e)}function Zp(e,t,n){t=gl(t,e);for(var o=-1,i=t.length,a=!1;++o<i;){var l=Ur(t[o]);if(!(a=e!=null&&n(e,l)))break;e=e[l]}return a||++o!=i?a:(i=e==null?0:e.length,!!i&&No(i)&&Lo(l,i)&&(ft(e)||Hr(e)))}function Jp(e,t){return e!=null&&Zp(e,t,Yp)}var Qp=1,eb=2;function tb(e,t){return Ko(e)&&Nl(t)?Wl(Ur(e),t):function(n){var o=uh(n,e);return o===void 0&&o===t?Jp(n,e):ti(t,o,Qp|eb)}}function nb(e){return function(t){return t==null?void 0:t[e]}}function rb(e){return function(t){return ml(t,e)}}function ob(e){return Ko(e)?nb(Ur(e)):rb(e)}function ib(e){return typeof e=="function"?e:e==null?Ao:typeof e=="object"?ft(e)?tb(e[0],e[1]):qp(e):ob(e)}function ab(e){return function(t,n,o){for(var i=-1,a=Object(t),l=o(t),s=l.length;s--;){var d=l[++i];if(n(a[d],d,a)===!1)break}return t}}var jl=ab();function lb(e,t){return e&&jl(e,t,Go)}function sb(e,t){return function(n,o){if(n==null)return n;if(!In(n))return e(n,o);for(var i=n.length,a=-1,l=Object(n);++a<i&&o(l[a],a,l)!==!1;);return n}}var db=sb(lb),ni=function(){return bt.Date.now()},cb="Expected a function",ub=Math.max,fb=Math.min;function hb(e,t,n){var o,i,a,l,s,d,c=0,f=!1,u=!1,b=!0;if(typeof e!="function")throw new TypeError(cb);t=el(t)||0,ht(n)&&(f=!!n.leading,u="maxWait"in n,a=u?ub(el(n.maxWait)||0,t):a,b="trailing"in n?!!n.trailing:b);function m(M){var p=o,S=i;return o=i=void 0,c=M,l=e.apply(S,p),l}function h(M){return c=M,s=setTimeout(g,t),f?m(M):l}function x(M){var p=M-d,S=M-c,B=t-p;return u?fb(B,a-S):B}function w(M){var p=M-d,S=M-c;return d===void 0||p>=t||p<0||u&&S>=a}function g(){var M=ni();if(w(M))return P(M);s=setTimeout(g,x(M))}function P(M){return s=void 0,b&&o?m(M):(o=i=void 0,l)}function L(){s!==void 0&&clearTimeout(s),c=0,o=d=i=s=void 0}function $(){return s===void 0?l:P(ni())}function k(){var M=ni(),p=w(M);if(o=arguments,i=this,d=M,p){if(s===void 0)return h(d);if(u)return clearTimeout(s),s=setTimeout(g,t),m(d)}return s===void 0&&(s=setTimeout(g,t)),l}return k.cancel=L,k.flush=$,k}function ri(e,t,n){(n!==void 0&&!Qn(e[t],n)||n===void 0&&!(t in e))&&Ho(e,t,n)}function pb(e){return Ut(e)&&In(e)}function oi(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function bb(e){return Iu(e,pl(e))}function gb(e,t,n,o,i,a,l){var s=oi(e,n),d=oi(t,n),c=l.get(d);if(c){ri(e,n,c);return}var f=a?a(s,d,n+"",e,t,l):void 0,u=f===void 0;if(u){var b=ft(d),m=!b&&Nr(d),h=!b&&!m&&Uo(d);f=d,b||m||h?ft(s)?f=s:pb(s)?f=wu(s):m?(u=!1,f=Qh(d)):h?(u=!1,f=hp(d)):f=[]:vh(d)||Hr(d)?(f=s,Hr(s)?f=bb(s):(!ht(s)||Fo(s))&&(f=pp(d))):u=!1}u&&(l.set(d,f),i(f,d,o,a,l),l.delete(d)),ri(e,n,f)}function Ul(e,t,n,o,i){e!==t&&jl(t,function(a,l){if(i||(i=new Tt),ht(a))gb(e,t,l,n,Ul,o,i);else{var s=o?o(oi(e,l),a,l+"",e,t,i):void 0;s===void 0&&(s=a),ri(e,l,s)}},pl)}function mb(e,t){var n=-1,o=In(e)?Array(e.length):[];return db(e,function(i,a,l){o[++n]=t(i,a,l)}),o}function vb(e,t){var n=ft(e)?qa:mb;return n(e,ib(t))}var qr=Vu(function(e,t,n){Ul(e,t,n)}),xb="Expected a function";function ii(e,t,n){var o=!0,i=!0;if(typeof e!="function")throw new TypeError(xb);return ht(n)&&(o="leading"in n?!!n.leading:o,i="trailing"in n?!!n.trailing:i),hb(e,t,{leading:o,maxWait:t,trailing:i})}const pn={fontFamily:'v-sans, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',fontFamilyMono:"v-mono, SFMono-Regular, Menlo, Consolas, Courier, monospace",fontWeight:"400",fontWeightStrong:"500",cubicBezierEaseInOut:"cubic-bezier(.4, 0, .2, 1)",cubicBezierEaseOut:"cubic-bezier(0, 0, .2, 1)",cubicBezierEaseIn:"cubic-bezier(.4, 0, 1, 1)",borderRadius:"3px",borderRadiusSmall:"2px",fontSize:"14px",fontSizeMini:"12px",fontSizeTiny:"12px",fontSizeSmall:"14px",fontSizeMedium:"14px",fontSizeLarge:"15px",fontSizeHuge:"16px",lineHeight:"1.6",heightMini:"16px",heightTiny:"22px",heightSmall:"28px",heightMedium:"34px",heightLarge:"40px",heightHuge:"46px"},{fontSize:yb,fontFamily:wb,lineHeight:Cb}=pn,Gl=V("body",`
|
|
16
16
|
margin: 0;
|
|
17
|
-
font-size: ${
|
|
18
|
-
font-family: ${
|
|
19
|
-
line-height: ${
|
|
17
|
+
font-size: ${yb};
|
|
18
|
+
font-family: ${wb};
|
|
19
|
+
line-height: ${Cb};
|
|
20
20
|
-webkit-text-size-adjust: 100%;
|
|
21
21
|
-webkit-tap-highlight-color: transparent;
|
|
22
|
-
`,[
|
|
22
|
+
`,[V("input",`
|
|
23
23
|
font-family: inherit;
|
|
24
24
|
font-size: inherit;
|
|
25
|
-
`)]),gn="n-config-provider",ro="naive-ui-style";function py(e){return e}function ye(e,t,n,r,i,a){const l=Wt(),s=o.inject(gn,null);if(n){const c=()=>{const f=a==null?void 0:a.value;n.mount({id:f===void 0?t:f+t,head:!0,props:{bPrefix:f?`.${f}-`:void 0},anchorMetaName:ro,ssr:l}),s!=null&&s.preflightStyleDisabled||Gl.mount({id:"n-global",head:!0,anchorMetaName:ro,ssr:l})};l?c():o.onBeforeMount(c)}return o.computed(()=>{var c;const{theme:{common:f,self:u,peers:p={}}={},themeOverrides:m={},builtinThemeOverrides:h={}}=i,{common:v,peers:w}=m,{common:g=void 0,[e]:{common:P=void 0,self:H=void 0,peers:$={}}={}}=(s==null?void 0:s.mergedThemeRef.value)||{},{common:k=void 0,[e]:M={}}=(s==null?void 0:s.mergedThemeOverridesRef.value)||{},{common:b,peers:S={}}=M,E=Xo({},f||P||g||r.common,k,b,v),D=Xo((c=u||H||r.self)===null||c===void 0?void 0:c(E),h,M,m);return{common:E,self:D,peers:Xo({},r.peers,$,p),peerOverrides:Xo({},h.peers,S,w)}})}ye.props={theme:Object,themeOverrides:Object,builtinThemeOverrides:Object};const kb="n";function Ke(e={},t={defaultBordered:!0}){const n=o.inject(gn,null);return{inlineThemeDisabled:n==null?void 0:n.inlineThemeDisabled,mergedRtlRef:n==null?void 0:n.mergedRtlRef,mergedComponentPropsRef:n==null?void 0:n.mergedComponentPropsRef,mergedBreakpointsRef:n==null?void 0:n.mergedBreakpointsRef,mergedBorderedRef:o.computed(()=>{var r,i;const{bordered:a}=e;return a!==void 0?a:(i=(r=n==null?void 0:n.mergedBorderedRef.value)!==null&&r!==void 0?r:t.defaultBordered)!==null&&i!==void 0?i:!0}),mergedClsPrefixRef:n?n.mergedClsPrefixRef:o.shallowRef(kb),namespaceRef:o.computed(()=>n==null?void 0:n.mergedNamespaceRef.value)}}const zb={name:"en-US",global:{undo:"Undo",redo:"Redo",confirm:"Confirm",clear:"Clear"},Popconfirm:{positiveText:"Confirm",negativeText:"Cancel"},Cascader:{placeholder:"Please Select",loading:"Loading",loadingRequiredMessage:e=>`Please load all ${e}'s descendants before checking it.`},Time:{dateFormat:"yyyy-MM-dd",dateTimeFormat:"yyyy-MM-dd HH:mm:ss"},DatePicker:{yearFormat:"yyyy",monthFormat:"MMM",dayFormat:"eeeeee",yearTypeFormat:"yyyy",monthTypeFormat:"yyyy-MM",dateFormat:"yyyy-MM-dd",dateTimeFormat:"yyyy-MM-dd HH:mm:ss",quarterFormat:"yyyy-qqq",weekFormat:"RRRR-w",clear:"Clear",now:"Now",confirm:"Confirm",selectTime:"Select Time",selectDate:"Select Date",datePlaceholder:"Select Date",datetimePlaceholder:"Select Date and Time",monthPlaceholder:"Select Month",yearPlaceholder:"Select Year",quarterPlaceholder:"Select Quarter",weekPlaceholder:"Select Week",startDatePlaceholder:"Start Date",endDatePlaceholder:"End Date",startDatetimePlaceholder:"Start Date and Time",endDatetimePlaceholder:"End Date and Time",startMonthPlaceholder:"Start Month",endMonthPlaceholder:"End Month",monthBeforeYear:!0,firstDayOfWeek:6,today:"Today"},DataTable:{checkTableAll:"Select all in the table",uncheckTableAll:"Unselect all in the table",confirm:"Confirm",clear:"Clear"},LegacyTransfer:{sourceTitle:"Source",targetTitle:"Target"},Transfer:{selectAll:"Select all",unselectAll:"Unselect all",clearAll:"Clear",total:e=>`Total ${e} items`,selected:e=>`${e} items selected`},Empty:{description:"No Data"},Select:{placeholder:"Please Select"},TimePicker:{placeholder:"Select Time",positiveText:"OK",negativeText:"Cancel",now:"Now",clear:"Clear"},Pagination:{goto:"Goto",selectionSuffix:"page"},DynamicTags:{add:"Add"},Log:{loading:"Loading"},Input:{placeholder:"Please Input"},InputNumber:{placeholder:"Please Input"},DynamicInput:{create:"Create"},ThemeEditor:{title:"Theme Editor",clearAllVars:"Clear All Variables",clearSearch:"Clear Search",filterCompName:"Filter Component Name",filterVarName:"Filter Variable Name",import:"Import",export:"Export",restore:"Reset to Default"},Image:{tipPrevious:"Previous picture (←)",tipNext:"Next picture (→)",tipCounterclockwise:"Counterclockwise",tipClockwise:"Clockwise",tipZoomOut:"Zoom out",tipZoomIn:"Zoom in",tipDownload:"Download",tipClose:"Close (Esc)",tipOriginalSize:"Zoom to original size"}};function ii(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth,r=e.formats[n]||e.formats[e.defaultWidth];return r}}function io(e){return function(t,n){var r=n!=null&&n.context?String(n.context):"standalone",i;if(r==="formatting"&&e.formattingValues){var a=e.defaultFormattingWidth||e.defaultWidth,l=n!=null&&n.width?String(n.width):a;i=e.formattingValues[l]||e.formattingValues[a]}else{var s=e.defaultWidth,d=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[d]||e.values[s]}var c=e.argumentCallback?e.argumentCallback(t):t;return i[c]}}function ao(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;var l=a[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],d=Array.isArray(s)?Pb(s,function(u){return u.test(l)}):Tb(s,function(u){return u.test(l)}),c;c=e.valueCallback?e.valueCallback(d):d,c=n.valueCallback?n.valueCallback(c):c;var f=t.slice(l.length);return{value:c,rest:f}}}function Tb(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}function Pb(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n}function Rb(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.match(e.matchPattern);if(!r)return null;var i=r[0],a=t.match(e.parsePattern);if(!a)return null;var l=e.valueCallback?e.valueCallback(a[0]):a[0];l=n.valueCallback?n.valueCallback(l):l;var s=t.slice(i.length);return{value:l,rest:s}}}var Bb={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},_b=function(t,n,r){var i,a=Bb[t];return typeof a=="string"?i=a:n===1?i=a.one:i=a.other.replace("{{count}}",n.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+i:i+" ago":i},Eb={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Mb={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Ib={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Ob={date:ii({formats:Eb,defaultWidth:"full"}),time:ii({formats:Mb,defaultWidth:"full"}),dateTime:ii({formats:Ib,defaultWidth:"full"})},Ab={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Fb=function(t,n,r,i){return Ab[t]},Db={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Vb={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Hb={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Lb={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Nb={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Wb={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},jb=function(t,n){var r=Number(t),i=r%100;if(i>20||i<10)switch(i%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},Ub={ordinalNumber:jb,era:io({values:Db,defaultWidth:"wide"}),quarter:io({values:Vb,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:io({values:Hb,defaultWidth:"wide"}),day:io({values:Lb,defaultWidth:"wide"}),dayPeriod:io({values:Nb,defaultWidth:"wide",formattingValues:Wb,defaultFormattingWidth:"wide"})},Gb=/^(\d+)(th|st|nd|rd)?/i,Kb=/\d+/i,qb={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Xb={any:[/^b/i,/^(a|c)/i]},Yb={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Zb={any:[/1/i,/2/i,/3/i,/4/i]},Jb={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Qb={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},eg={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},tg={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},ng={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},og={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},rg={ordinalNumber:Rb({matchPattern:Gb,parsePattern:Kb,valueCallback:function(t){return parseInt(t,10)}}),era:ao({matchPatterns:qb,defaultMatchWidth:"wide",parsePatterns:Xb,defaultParseWidth:"any"}),quarter:ao({matchPatterns:Yb,defaultMatchWidth:"wide",parsePatterns:Zb,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:ao({matchPatterns:Jb,defaultMatchWidth:"wide",parsePatterns:Qb,defaultParseWidth:"any"}),day:ao({matchPatterns:eg,defaultMatchWidth:"wide",parsePatterns:tg,defaultParseWidth:"any"}),dayPeriod:ao({matchPatterns:ng,defaultMatchWidth:"any",parsePatterns:og,defaultParseWidth:"any"})},ig={code:"en-US",formatDistance:_b,formatLong:Ob,formatRelative:Fb,localize:Ub,match:rg,options:{weekStartsOn:0,firstWeekContainsDate:1}};const ag={name:"en-US",locale:ig};function lo(e){const{mergedLocaleRef:t,mergedDateLocaleRef:n}=o.inject(gn,null)||{},r=o.computed(()=>{var a,l;return(l=(a=t==null?void 0:t.value)===null||a===void 0?void 0:a[e])!==null&&l!==void 0?l:zb[e]});return{dateLocaleRef:o.computed(()=>{var a;return(a=n==null?void 0:n.value)!==null&&a!==void 0?a:ag}),localeRef:r}}function mn(e,t,n){if(!t){process.env.NODE_ENV!=="production"&&vr("use-style","No style is specified.");return}const r=Wt(),i=o.inject(gn,null),a=()=>{const l=n.value;t.mount({id:l===void 0?e:l+e,head:!0,anchorMetaName:ro,props:{bPrefix:l?`.${l}-`:void 0},ssr:r}),i!=null&&i.preflightStyleDisabled||Gl.mount({id:"n-global",head:!0,anchorMetaName:ro,ssr:r})};r?a():o.onBeforeMount(a)}function et(e,t,n,r){var i;n||vr("useThemeClass","cssVarsRef is not passed");const a=(i=o.inject(gn,null))===null||i===void 0?void 0:i.mergedThemeHashRef,l=o.ref(""),s=Wt();let d;const c=`__${e}`,f=()=>{let u=c;const p=t?t.value:void 0,m=a==null?void 0:a.value;m&&(u+=`-${m}`),p&&(u+=`-${p}`);const{themeOverrides:h,builtinThemeOverrides:v}=r;h&&(u+=`-${Cr(JSON.stringify(h))}`),v&&(u+=`-${Cr(JSON.stringify(v))}`),l.value=u,d=()=>{const w=n.value;let g="";for(const P in w)g+=`${P}: ${w[P]};`;I(`.${u}`,g).mount({id:u,ssr:s}),d=void 0}};return o.watchEffect(()=>{f()}),{themeClass:l,onRender:()=>{d==null||d()}}}function qt(e,t,n){if(!t)return;const r=Wt(),i=o.computed(()=>{const{value:l}=t;if(!l)return;const s=l[e];if(s)return s}),a=()=>{o.watchEffect(()=>{const{value:l}=n,s=`${l}${e}Rtl`;if(Td(s,r))return;const{value:d}=i;d&&d.style.mount({id:s,head:!0,anchorMetaName:ro,props:{bPrefix:l?`.${l}-`:void 0},ssr:r})})};return r?a():o.onBeforeMount(a),i}const Kl=o.defineComponent({name:"Add",render(){return o.h("svg",{width:"512",height:"512",viewBox:"0 0 512 512",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o.h("path",{d:"M256 112V400M400 256H112",stroke:"currentColor","stroke-width":"32","stroke-linecap":"round","stroke-linejoin":"round"}))}});function An(e,t){return o.defineComponent({name:Kh(e),setup(){var n;const r=(n=o.inject(gn,null))===null||n===void 0?void 0:n.mergedIconsRef;return()=>{var i;const a=(i=r==null?void 0:r.value)===null||i===void 0?void 0:i[e];return a?a():t}}})}const lg=o.defineComponent({name:"Checkmark",render(){return o.h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16"},o.h("g",{fill:"none"},o.h("path",{d:"M14.046 3.486a.75.75 0 0 1-.032 1.06l-7.93 7.474a.85.85 0 0 1-1.188-.022l-2.68-2.72a.75.75 0 1 1 1.068-1.053l2.234 2.267l7.468-7.038a.75.75 0 0 1 1.06.032z",fill:"currentColor"})))}}),ql=An("close",o.h("svg",{viewBox:"0 0 12 12",version:"1.1",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0},o.h("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},o.h("g",{fill:"currentColor","fill-rule":"nonzero"},o.h("path",{d:"M2.08859116,2.2156945 L2.14644661,2.14644661 C2.32001296,1.97288026 2.58943736,1.95359511 2.7843055,2.08859116 L2.85355339,2.14644661 L6,5.293 L9.14644661,2.14644661 C9.34170876,1.95118446 9.65829124,1.95118446 9.85355339,2.14644661 C10.0488155,2.34170876 10.0488155,2.65829124 9.85355339,2.85355339 L6.707,6 L9.85355339,9.14644661 C10.0271197,9.32001296 10.0464049,9.58943736 9.91140884,9.7843055 L9.85355339,9.85355339 C9.67998704,10.0271197 9.41056264,10.0464049 9.2156945,9.91140884 L9.14644661,9.85355339 L6,6.707 L2.85355339,9.85355339 C2.65829124,10.0488155 2.34170876,10.0488155 2.14644661,9.85355339 C1.95118446,9.65829124 1.95118446,9.34170876 2.14644661,9.14644661 L5.293,6 L2.14644661,2.85355339 C1.97288026,2.67998704 1.95359511,2.41056264 2.08859116,2.2156945 L2.14644661,2.14644661 L2.08859116,2.2156945 Z"}))))),sg=o.defineComponent({name:"Eye",render(){return o.h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},o.h("path",{d:"M255.66 112c-77.94 0-157.89 45.11-220.83 135.33a16 16 0 0 0-.27 17.77C82.92 340.8 161.8 400 255.66 400c92.84 0 173.34-59.38 221.79-135.25a16.14 16.14 0 0 0 0-17.47C428.89 172.28 347.8 112 255.66 112z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"}),o.h("circle",{cx:"256",cy:"256",r:"80",fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32"}))}}),dg=o.defineComponent({name:"EyeOff",render(){return o.h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},o.h("path",{d:"M432 448a15.92 15.92 0 0 1-11.31-4.69l-352-352a16 16 0 0 1 22.62-22.62l352 352A16 16 0 0 1 432 448z",fill:"currentColor"}),o.h("path",{d:"M255.66 384c-41.49 0-81.5-12.28-118.92-36.5c-34.07-22-64.74-53.51-88.7-91v-.08c19.94-28.57 41.78-52.73 65.24-72.21a2 2 0 0 0 .14-2.94L93.5 161.38a2 2 0 0 0-2.71-.12c-24.92 21-48.05 46.76-69.08 76.92a31.92 31.92 0 0 0-.64 35.54c26.41 41.33 60.4 76.14 98.28 100.65C162 402 207.9 416 255.66 416a239.13 239.13 0 0 0 75.8-12.58a2 2 0 0 0 .77-3.31l-21.58-21.58a4 4 0 0 0-3.83-1a204.8 204.8 0 0 1-51.16 6.47z",fill:"currentColor"}),o.h("path",{d:"M490.84 238.6c-26.46-40.92-60.79-75.68-99.27-100.53C349 110.55 302 96 255.66 96a227.34 227.34 0 0 0-74.89 12.83a2 2 0 0 0-.75 3.31l21.55 21.55a4 4 0 0 0 3.88 1a192.82 192.82 0 0 1 50.21-6.69c40.69 0 80.58 12.43 118.55 37c34.71 22.4 65.74 53.88 89.76 91a.13.13 0 0 1 0 .16a310.72 310.72 0 0 1-64.12 72.73a2 2 0 0 0-.15 2.95l19.9 19.89a2 2 0 0 0 2.7.13a343.49 343.49 0 0 0 68.64-78.48a32.2 32.2 0 0 0-.1-34.78z",fill:"currentColor"}),o.h("path",{d:"M256 160a95.88 95.88 0 0 0-21.37 2.4a2 2 0 0 0-1 3.38l112.59 112.56a2 2 0 0 0 3.38-1A96 96 0 0 0 256 160z",fill:"currentColor"}),o.h("path",{d:"M165.78 233.66a2 2 0 0 0-3.38 1a96 96 0 0 0 115 115a2 2 0 0 0 1-3.38z",fill:"currentColor"}))}}),cg=o.defineComponent({name:"Empty",render(){return o.h("svg",{viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o.h("path",{d:"M26 7.5C26 11.0899 23.0899 14 19.5 14C15.9101 14 13 11.0899 13 7.5C13 3.91015 15.9101 1 19.5 1C23.0899 1 26 3.91015 26 7.5ZM16.8536 4.14645C16.6583 3.95118 16.3417 3.95118 16.1464 4.14645C15.9512 4.34171 15.9512 4.65829 16.1464 4.85355L18.7929 7.5L16.1464 10.1464C15.9512 10.3417 15.9512 10.6583 16.1464 10.8536C16.3417 11.0488 16.6583 11.0488 16.8536 10.8536L19.5 8.20711L22.1464 10.8536C22.3417 11.0488 22.6583 11.0488 22.8536 10.8536C23.0488 10.6583 23.0488 10.3417 22.8536 10.1464L20.2071 7.5L22.8536 4.85355C23.0488 4.65829 23.0488 4.34171 22.8536 4.14645C22.6583 3.95118 22.3417 3.95118 22.1464 4.14645L19.5 6.79289L16.8536 4.14645Z",fill:"currentColor"}),o.h("path",{d:"M25 22.75V12.5991C24.5572 13.0765 24.053 13.4961 23.5 13.8454V16H17.5L17.3982 16.0068C17.0322 16.0565 16.75 16.3703 16.75 16.75C16.75 18.2688 15.5188 19.5 14 19.5C12.4812 19.5 11.25 18.2688 11.25 16.75L11.2432 16.6482C11.1935 16.2822 10.8797 16 10.5 16H4.5V7.25C4.5 6.2835 5.2835 5.5 6.25 5.5H12.2696C12.4146 4.97463 12.6153 4.47237 12.865 4H6.25C4.45507 4 3 5.45507 3 7.25V22.75C3 24.5449 4.45507 26 6.25 26H21.75C23.5449 26 25 24.5449 25 22.75ZM4.5 22.75V17.5H9.81597L9.85751 17.7041C10.2905 19.5919 11.9808 21 14 21L14.215 20.9947C16.2095 20.8953 17.842 19.4209 18.184 17.5H23.5V22.75C23.5 23.7165 22.7165 24.5 21.75 24.5H6.25C5.2835 24.5 4.5 23.7165 4.5 22.75Z",fill:"currentColor"}))}}),ug=An("error",o.h("svg",{viewBox:"0 0 48 48",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},o.h("g",{stroke:"none","stroke-width":"1","fill-rule":"evenodd"},o.h("g",{"fill-rule":"nonzero"},o.h("path",{d:"M24,4 C35.045695,4 44,12.954305 44,24 C44,35.045695 35.045695,44 24,44 C12.954305,44 4,35.045695 4,24 C4,12.954305 12.954305,4 24,4 Z M17.8838835,16.1161165 L17.7823881,16.0249942 C17.3266086,15.6583353 16.6733914,15.6583353 16.2176119,16.0249942 L16.1161165,16.1161165 L16.0249942,16.2176119 C15.6583353,16.6733914 15.6583353,17.3266086 16.0249942,17.7823881 L16.1161165,17.8838835 L22.233,24 L16.1161165,30.1161165 L16.0249942,30.2176119 C15.6583353,30.6733914 15.6583353,31.3266086 16.0249942,31.7823881 L16.1161165,31.8838835 L16.2176119,31.9750058 C16.6733914,32.3416647 17.3266086,32.3416647 17.7823881,31.9750058 L17.8838835,31.8838835 L24,25.767 L30.1161165,31.8838835 L30.2176119,31.9750058 C30.6733914,32.3416647 31.3266086,32.3416647 31.7823881,31.9750058 L31.8838835,31.8838835 L31.9750058,31.7823881 C32.3416647,31.3266086 32.3416647,30.6733914 31.9750058,30.2176119 L31.8838835,30.1161165 L25.767,24 L31.8838835,17.8838835 L31.9750058,17.7823881 C32.3416647,17.3266086 32.3416647,16.6733914 31.9750058,16.2176119 L31.8838835,16.1161165 L31.7823881,16.0249942 C31.3266086,15.6583353 30.6733914,15.6583353 30.2176119,16.0249942 L30.1161165,16.1161165 L24,22.233 L17.8838835,16.1161165 L17.7823881,16.0249942 L17.8838835,16.1161165 Z"}))))),fg=An("info",o.h("svg",{viewBox:"0 0 28 28",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},o.h("g",{stroke:"none","stroke-width":"1","fill-rule":"evenodd"},o.h("g",{"fill-rule":"nonzero"},o.h("path",{d:"M14,2 C20.6274,2 26,7.37258 26,14 C26,20.6274 20.6274,26 14,26 C7.37258,26 2,20.6274 2,14 C2,7.37258 7.37258,2 14,2 Z M14,11 C13.4477,11 13,11.4477 13,12 L13,12 L13,20 C13,20.5523 13.4477,21 14,21 C14.5523,21 15,20.5523 15,20 L15,20 L15,12 C15,11.4477 14.5523,11 14,11 Z M14,6.75 C13.3096,6.75 12.75,7.30964 12.75,8 C12.75,8.69036 13.3096,9.25 14,9.25 C14.6904,9.25 15.25,8.69036 15.25,8 C15.25,7.30964 14.6904,6.75 14,6.75 Z"}))))),hg=o.defineComponent({name:"Remove",render(){return o.h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},o.h("line",{x1:"400",y1:"256",x2:"112",y2:"256",style:`
|
|
25
|
+
`)]),bn="n-config-provider",rr="naive-ui-style";function ay(e){return e}function Ce(e,t,n,o,i,a){const l=Nt(),s=r.inject(bn,null);if(n){const c=()=>{const f=a==null?void 0:a.value;n.mount({id:f===void 0?t:f+t,head:!0,props:{bPrefix:f?`.${f}-`:void 0},anchorMetaName:rr,ssr:l}),s!=null&&s.preflightStyleDisabled||Gl.mount({id:"n-global",head:!0,anchorMetaName:rr,ssr:l})};l?c():r.onBeforeMount(c)}return r.computed(()=>{var c;const{theme:{common:f,self:u,peers:b={}}={},themeOverrides:m={},builtinThemeOverrides:h={}}=i,{common:x,peers:w}=m,{common:g=void 0,[e]:{common:P=void 0,self:L=void 0,peers:$={}}={}}=(s==null?void 0:s.mergedThemeRef.value)||{},{common:k=void 0,[e]:M={}}=(s==null?void 0:s.mergedThemeOverridesRef.value)||{},{common:p,peers:S={}}=M,B=qr({},f||P||g||o.common,k,p,x),F=qr((c=u||L||o.self)===null||c===void 0?void 0:c(B),h,M,m);return{common:B,self:F,peers:qr({},o.peers,$,b),peerOverrides:qr({},h.peers,S,w)}})}Ce.props={theme:Object,themeOverrides:Object,builtinThemeOverrides:Object};const Sb="n";function Je(e={},t={defaultBordered:!0}){const n=r.inject(bn,null);return{inlineThemeDisabled:n==null?void 0:n.inlineThemeDisabled,mergedRtlRef:n==null?void 0:n.mergedRtlRef,mergedComponentPropsRef:n==null?void 0:n.mergedComponentPropsRef,mergedBreakpointsRef:n==null?void 0:n.mergedBreakpointsRef,mergedBorderedRef:r.computed(()=>{var o,i;const{bordered:a}=e;return a!==void 0?a:(i=(o=n==null?void 0:n.mergedBorderedRef.value)!==null&&o!==void 0?o:t.defaultBordered)!==null&&i!==void 0?i:!0}),mergedClsPrefixRef:n?n.mergedClsPrefixRef:r.shallowRef(Sb),namespaceRef:r.computed(()=>n==null?void 0:n.mergedNamespaceRef.value)}}const $b={name:"en-US",global:{undo:"Undo",redo:"Redo",confirm:"Confirm",clear:"Clear"},Popconfirm:{positiveText:"Confirm",negativeText:"Cancel"},Cascader:{placeholder:"Please Select",loading:"Loading",loadingRequiredMessage:e=>`Please load all ${e}'s descendants before checking it.`},Time:{dateFormat:"yyyy-MM-dd",dateTimeFormat:"yyyy-MM-dd HH:mm:ss"},DatePicker:{yearFormat:"yyyy",monthFormat:"MMM",dayFormat:"eeeeee",yearTypeFormat:"yyyy",monthTypeFormat:"yyyy-MM",dateFormat:"yyyy-MM-dd",dateTimeFormat:"yyyy-MM-dd HH:mm:ss",quarterFormat:"yyyy-qqq",weekFormat:"RRRR-w",clear:"Clear",now:"Now",confirm:"Confirm",selectTime:"Select Time",selectDate:"Select Date",datePlaceholder:"Select Date",datetimePlaceholder:"Select Date and Time",monthPlaceholder:"Select Month",yearPlaceholder:"Select Year",quarterPlaceholder:"Select Quarter",weekPlaceholder:"Select Week",startDatePlaceholder:"Start Date",endDatePlaceholder:"End Date",startDatetimePlaceholder:"Start Date and Time",endDatetimePlaceholder:"End Date and Time",startMonthPlaceholder:"Start Month",endMonthPlaceholder:"End Month",monthBeforeYear:!0,firstDayOfWeek:6,today:"Today"},DataTable:{checkTableAll:"Select all in the table",uncheckTableAll:"Unselect all in the table",confirm:"Confirm",clear:"Clear"},LegacyTransfer:{sourceTitle:"Source",targetTitle:"Target"},Transfer:{selectAll:"Select all",unselectAll:"Unselect all",clearAll:"Clear",total:e=>`Total ${e} items`,selected:e=>`${e} items selected`},Empty:{description:"No Data"},Select:{placeholder:"Please Select"},TimePicker:{placeholder:"Select Time",positiveText:"OK",negativeText:"Cancel",now:"Now",clear:"Clear"},Pagination:{goto:"Goto",selectionSuffix:"page"},DynamicTags:{add:"Add"},Log:{loading:"Loading"},Input:{placeholder:"Please Input"},InputNumber:{placeholder:"Please Input"},DynamicInput:{create:"Create"},ThemeEditor:{title:"Theme Editor",clearAllVars:"Clear All Variables",clearSearch:"Clear Search",filterCompName:"Filter Component Name",filterVarName:"Filter Variable Name",import:"Import",export:"Export",restore:"Reset to Default"},Image:{tipPrevious:"Previous picture (←)",tipNext:"Next picture (→)",tipCounterclockwise:"Counterclockwise",tipClockwise:"Clockwise",tipZoomOut:"Zoom out",tipZoomIn:"Zoom in",tipDownload:"Download",tipClose:"Close (Esc)",tipOriginalSize:"Zoom to original size"}};function ai(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth,o=e.formats[n]||e.formats[e.defaultWidth];return o}}function or(e){return function(t,n){var o=n!=null&&n.context?String(n.context):"standalone",i;if(o==="formatting"&&e.formattingValues){var a=e.defaultFormattingWidth||e.defaultWidth,l=n!=null&&n.width?String(n.width):a;i=e.formattingValues[l]||e.formattingValues[a]}else{var s=e.defaultWidth,d=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[d]||e.values[s]}var c=e.argumentCallback?e.argumentCallback(t):t;return i[c]}}function ir(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=n.width,i=o&&e.matchPatterns[o]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;var l=a[0],s=o&&e.parsePatterns[o]||e.parsePatterns[e.defaultParseWidth],d=Array.isArray(s)?Tb(s,function(u){return u.test(l)}):kb(s,function(u){return u.test(l)}),c;c=e.valueCallback?e.valueCallback(d):d,c=n.valueCallback?n.valueCallback(c):c;var f=t.slice(l.length);return{value:c,rest:f}}}function kb(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}function Tb(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n}function zb(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=t.match(e.matchPattern);if(!o)return null;var i=o[0],a=t.match(e.parsePattern);if(!a)return null;var l=e.valueCallback?e.valueCallback(a[0]):a[0];l=n.valueCallback?n.valueCallback(l):l;var s=t.slice(i.length);return{value:l,rest:s}}}var Pb={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Rb=function(t,n,o){var i,a=Pb[t];return typeof a=="string"?i=a:n===1?i=a.one:i=a.other.replace("{{count}}",n.toString()),o!=null&&o.addSuffix?o.comparison&&o.comparison>0?"in "+i:i+" ago":i},_b={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Eb={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Bb={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Mb={date:ai({formats:_b,defaultWidth:"full"}),time:ai({formats:Eb,defaultWidth:"full"}),dateTime:ai({formats:Bb,defaultWidth:"full"})},Ib={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Ob=function(t,n,o,i){return Ib[t]},Ab={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Fb={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Db={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Vb={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Lb={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Hb={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Nb=function(t,n){var o=Number(t),i=o%100;if(i>20||i<10)switch(i%10){case 1:return o+"st";case 2:return o+"nd";case 3:return o+"rd"}return o+"th"},Wb={ordinalNumber:Nb,era:or({values:Ab,defaultWidth:"wide"}),quarter:or({values:Fb,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:or({values:Db,defaultWidth:"wide"}),day:or({values:Vb,defaultWidth:"wide"}),dayPeriod:or({values:Lb,defaultWidth:"wide",formattingValues:Hb,defaultFormattingWidth:"wide"})},jb=/^(\d+)(th|st|nd|rd)?/i,Ub=/\d+/i,Gb={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Kb={any:[/^b/i,/^(a|c)/i]},Xb={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},qb={any:[/1/i,/2/i,/3/i,/4/i]},Yb={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Zb={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Jb={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Qb={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},eg={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},tg={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},ng={ordinalNumber:zb({matchPattern:jb,parsePattern:Ub,valueCallback:function(t){return parseInt(t,10)}}),era:ir({matchPatterns:Gb,defaultMatchWidth:"wide",parsePatterns:Kb,defaultParseWidth:"any"}),quarter:ir({matchPatterns:Xb,defaultMatchWidth:"wide",parsePatterns:qb,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:ir({matchPatterns:Yb,defaultMatchWidth:"wide",parsePatterns:Zb,defaultParseWidth:"any"}),day:ir({matchPatterns:Jb,defaultMatchWidth:"wide",parsePatterns:Qb,defaultParseWidth:"any"}),dayPeriod:ir({matchPatterns:eg,defaultMatchWidth:"any",parsePatterns:tg,defaultParseWidth:"any"})},rg={code:"en-US",formatDistance:Rb,formatLong:Mb,formatRelative:Ob,localize:Wb,match:ng,options:{weekStartsOn:0,firstWeekContainsDate:1}};const og={name:"en-US",locale:rg};function ar(e){const{mergedLocaleRef:t,mergedDateLocaleRef:n}=r.inject(bn,null)||{},o=r.computed(()=>{var a,l;return(l=(a=t==null?void 0:t.value)===null||a===void 0?void 0:a[e])!==null&&l!==void 0?l:$b[e]});return{dateLocaleRef:r.computed(()=>{var a;return(a=n==null?void 0:n.value)!==null&&a!==void 0?a:og}),localeRef:o}}function gn(e,t,n){if(!t){process.env.NODE_ENV!=="production"&&xo("use-style","No style is specified.");return}const o=Nt(),i=r.inject(bn,null),a=()=>{const l=n.value;t.mount({id:l===void 0?e:l+e,head:!0,anchorMetaName:rr,props:{bPrefix:l?`.${l}-`:void 0},ssr:o}),i!=null&&i.preflightStyleDisabled||Gl.mount({id:"n-global",head:!0,anchorMetaName:rr,ssr:o})};o?a():r.onBeforeMount(a)}function tt(e,t,n,o){var i;n||xo("useThemeClass","cssVarsRef is not passed");const a=(i=r.inject(bn,null))===null||i===void 0?void 0:i.mergedThemeHashRef,l=r.ref(""),s=Nt();let d;const c=`__${e}`,f=()=>{let u=c;const b=t?t.value:void 0,m=a==null?void 0:a.value;m&&(u+=`-${m}`),b&&(u+=`-${b}`);const{themeOverrides:h,builtinThemeOverrides:x}=o;h&&(u+=`-${So(JSON.stringify(h))}`),x&&(u+=`-${So(JSON.stringify(x))}`),l.value=u,d=()=>{const w=n.value;let g="";for(const P in w)g+=`${P}: ${w[P]};`;V(`.${u}`,g).mount({id:u,ssr:s}),d=void 0}};return r.watchEffect(()=>{f()}),{themeClass:l,onRender:()=>{d==null||d()}}}function Kt(e,t,n){if(!t)return;const o=Nt(),i=r.computed(()=>{const{value:l}=t;if(!l)return;const s=l[e];if(s)return s}),a=()=>{r.watchEffect(()=>{const{value:l}=n,s=`${l}${e}Rtl`;if($d(s,o))return;const{value:d}=i;d&&d.style.mount({id:s,head:!0,anchorMetaName:rr,props:{bPrefix:l?`.${l}-`:void 0},ssr:o})})};return o?a():r.onBeforeMount(a),i}const Kl=r.defineComponent({name:"Add",render(){return r.h("svg",{width:"512",height:"512",viewBox:"0 0 512 512",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r.h("path",{d:"M256 112V400M400 256H112",stroke:"currentColor","stroke-width":"32","stroke-linecap":"round","stroke-linejoin":"round"}))}});function On(e,t){return r.defineComponent({name:Uh(e),setup(){var n;const o=(n=r.inject(bn,null))===null||n===void 0?void 0:n.mergedIconsRef;return()=>{var i;const a=(i=o==null?void 0:o.value)===null||i===void 0?void 0:i[e];return a?a():t}}})}const ig=r.defineComponent({name:"Checkmark",render(){return r.h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16"},r.h("g",{fill:"none"},r.h("path",{d:"M14.046 3.486a.75.75 0 0 1-.032 1.06l-7.93 7.474a.85.85 0 0 1-1.188-.022l-2.68-2.72a.75.75 0 1 1 1.068-1.053l2.234 2.267l7.468-7.038a.75.75 0 0 1 1.06.032z",fill:"currentColor"})))}}),ag=On("close",r.h("svg",{viewBox:"0 0 12 12",version:"1.1",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0},r.h("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},r.h("g",{fill:"currentColor","fill-rule":"nonzero"},r.h("path",{d:"M2.08859116,2.2156945 L2.14644661,2.14644661 C2.32001296,1.97288026 2.58943736,1.95359511 2.7843055,2.08859116 L2.85355339,2.14644661 L6,5.293 L9.14644661,2.14644661 C9.34170876,1.95118446 9.65829124,1.95118446 9.85355339,2.14644661 C10.0488155,2.34170876 10.0488155,2.65829124 9.85355339,2.85355339 L6.707,6 L9.85355339,9.14644661 C10.0271197,9.32001296 10.0464049,9.58943736 9.91140884,9.7843055 L9.85355339,9.85355339 C9.67998704,10.0271197 9.41056264,10.0464049 9.2156945,9.91140884 L9.14644661,9.85355339 L6,6.707 L2.85355339,9.85355339 C2.65829124,10.0488155 2.34170876,10.0488155 2.14644661,9.85355339 C1.95118446,9.65829124 1.95118446,9.34170876 2.14644661,9.14644661 L5.293,6 L2.14644661,2.85355339 C1.97288026,2.67998704 1.95359511,2.41056264 2.08859116,2.2156945 L2.14644661,2.14644661 L2.08859116,2.2156945 Z"}))))),lg=r.defineComponent({name:"Eye",render(){return r.h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},r.h("path",{d:"M255.66 112c-77.94 0-157.89 45.11-220.83 135.33a16 16 0 0 0-.27 17.77C82.92 340.8 161.8 400 255.66 400c92.84 0 173.34-59.38 221.79-135.25a16.14 16.14 0 0 0 0-17.47C428.89 172.28 347.8 112 255.66 112z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"}),r.h("circle",{cx:"256",cy:"256",r:"80",fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32"}))}}),sg=r.defineComponent({name:"EyeOff",render(){return r.h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},r.h("path",{d:"M432 448a15.92 15.92 0 0 1-11.31-4.69l-352-352a16 16 0 0 1 22.62-22.62l352 352A16 16 0 0 1 432 448z",fill:"currentColor"}),r.h("path",{d:"M255.66 384c-41.49 0-81.5-12.28-118.92-36.5c-34.07-22-64.74-53.51-88.7-91v-.08c19.94-28.57 41.78-52.73 65.24-72.21a2 2 0 0 0 .14-2.94L93.5 161.38a2 2 0 0 0-2.71-.12c-24.92 21-48.05 46.76-69.08 76.92a31.92 31.92 0 0 0-.64 35.54c26.41 41.33 60.4 76.14 98.28 100.65C162 402 207.9 416 255.66 416a239.13 239.13 0 0 0 75.8-12.58a2 2 0 0 0 .77-3.31l-21.58-21.58a4 4 0 0 0-3.83-1a204.8 204.8 0 0 1-51.16 6.47z",fill:"currentColor"}),r.h("path",{d:"M490.84 238.6c-26.46-40.92-60.79-75.68-99.27-100.53C349 110.55 302 96 255.66 96a227.34 227.34 0 0 0-74.89 12.83a2 2 0 0 0-.75 3.31l21.55 21.55a4 4 0 0 0 3.88 1a192.82 192.82 0 0 1 50.21-6.69c40.69 0 80.58 12.43 118.55 37c34.71 22.4 65.74 53.88 89.76 91a.13.13 0 0 1 0 .16a310.72 310.72 0 0 1-64.12 72.73a2 2 0 0 0-.15 2.95l19.9 19.89a2 2 0 0 0 2.7.13a343.49 343.49 0 0 0 68.64-78.48a32.2 32.2 0 0 0-.1-34.78z",fill:"currentColor"}),r.h("path",{d:"M256 160a95.88 95.88 0 0 0-21.37 2.4a2 2 0 0 0-1 3.38l112.59 112.56a2 2 0 0 0 3.38-1A96 96 0 0 0 256 160z",fill:"currentColor"}),r.h("path",{d:"M165.78 233.66a2 2 0 0 0-3.38 1a96 96 0 0 0 115 115a2 2 0 0 0 1-3.38z",fill:"currentColor"}))}}),dg=r.defineComponent({name:"Empty",render(){return r.h("svg",{viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r.h("path",{d:"M26 7.5C26 11.0899 23.0899 14 19.5 14C15.9101 14 13 11.0899 13 7.5C13 3.91015 15.9101 1 19.5 1C23.0899 1 26 3.91015 26 7.5ZM16.8536 4.14645C16.6583 3.95118 16.3417 3.95118 16.1464 4.14645C15.9512 4.34171 15.9512 4.65829 16.1464 4.85355L18.7929 7.5L16.1464 10.1464C15.9512 10.3417 15.9512 10.6583 16.1464 10.8536C16.3417 11.0488 16.6583 11.0488 16.8536 10.8536L19.5 8.20711L22.1464 10.8536C22.3417 11.0488 22.6583 11.0488 22.8536 10.8536C23.0488 10.6583 23.0488 10.3417 22.8536 10.1464L20.2071 7.5L22.8536 4.85355C23.0488 4.65829 23.0488 4.34171 22.8536 4.14645C22.6583 3.95118 22.3417 3.95118 22.1464 4.14645L19.5 6.79289L16.8536 4.14645Z",fill:"currentColor"}),r.h("path",{d:"M25 22.75V12.5991C24.5572 13.0765 24.053 13.4961 23.5 13.8454V16H17.5L17.3982 16.0068C17.0322 16.0565 16.75 16.3703 16.75 16.75C16.75 18.2688 15.5188 19.5 14 19.5C12.4812 19.5 11.25 18.2688 11.25 16.75L11.2432 16.6482C11.1935 16.2822 10.8797 16 10.5 16H4.5V7.25C4.5 6.2835 5.2835 5.5 6.25 5.5H12.2696C12.4146 4.97463 12.6153 4.47237 12.865 4H6.25C4.45507 4 3 5.45507 3 7.25V22.75C3 24.5449 4.45507 26 6.25 26H21.75C23.5449 26 25 24.5449 25 22.75ZM4.5 22.75V17.5H9.81597L9.85751 17.7041C10.2905 19.5919 11.9808 21 14 21L14.215 20.9947C16.2095 20.8953 17.842 19.4209 18.184 17.5H23.5V22.75C23.5 23.7165 22.7165 24.5 21.75 24.5H6.25C5.2835 24.5 4.5 23.7165 4.5 22.75Z",fill:"currentColor"}))}}),cg=On("error",r.h("svg",{viewBox:"0 0 48 48",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},r.h("g",{stroke:"none","stroke-width":"1","fill-rule":"evenodd"},r.h("g",{"fill-rule":"nonzero"},r.h("path",{d:"M24,4 C35.045695,4 44,12.954305 44,24 C44,35.045695 35.045695,44 24,44 C12.954305,44 4,35.045695 4,24 C4,12.954305 12.954305,4 24,4 Z M17.8838835,16.1161165 L17.7823881,16.0249942 C17.3266086,15.6583353 16.6733914,15.6583353 16.2176119,16.0249942 L16.1161165,16.1161165 L16.0249942,16.2176119 C15.6583353,16.6733914 15.6583353,17.3266086 16.0249942,17.7823881 L16.1161165,17.8838835 L22.233,24 L16.1161165,30.1161165 L16.0249942,30.2176119 C15.6583353,30.6733914 15.6583353,31.3266086 16.0249942,31.7823881 L16.1161165,31.8838835 L16.2176119,31.9750058 C16.6733914,32.3416647 17.3266086,32.3416647 17.7823881,31.9750058 L17.8838835,31.8838835 L24,25.767 L30.1161165,31.8838835 L30.2176119,31.9750058 C30.6733914,32.3416647 31.3266086,32.3416647 31.7823881,31.9750058 L31.8838835,31.8838835 L31.9750058,31.7823881 C32.3416647,31.3266086 32.3416647,30.6733914 31.9750058,30.2176119 L31.8838835,30.1161165 L25.767,24 L31.8838835,17.8838835 L31.9750058,17.7823881 C32.3416647,17.3266086 32.3416647,16.6733914 31.9750058,16.2176119 L31.8838835,16.1161165 L31.7823881,16.0249942 C31.3266086,15.6583353 30.6733914,15.6583353 30.2176119,16.0249942 L30.1161165,16.1161165 L24,22.233 L17.8838835,16.1161165 L17.7823881,16.0249942 L17.8838835,16.1161165 Z"}))))),ug=On("info",r.h("svg",{viewBox:"0 0 28 28",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},r.h("g",{stroke:"none","stroke-width":"1","fill-rule":"evenodd"},r.h("g",{"fill-rule":"nonzero"},r.h("path",{d:"M14,2 C20.6274,2 26,7.37258 26,14 C26,20.6274 20.6274,26 14,26 C7.37258,26 2,20.6274 2,14 C2,7.37258 7.37258,2 14,2 Z M14,11 C13.4477,11 13,11.4477 13,12 L13,12 L13,20 C13,20.5523 13.4477,21 14,21 C14.5523,21 15,20.5523 15,20 L15,20 L15,12 C15,11.4477 14.5523,11 14,11 Z M14,6.75 C13.3096,6.75 12.75,7.30964 12.75,8 C12.75,8.69036 13.3096,9.25 14,9.25 C14.6904,9.25 15.25,8.69036 15.25,8 C15.25,7.30964 14.6904,6.75 14,6.75 Z"}))))),fg=r.defineComponent({name:"Remove",render(){return r.h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},r.h("line",{x1:"400",y1:"256",x2:"112",y2:"256",style:`
|
|
26
26
|
fill: none;
|
|
27
27
|
stroke: currentColor;
|
|
28
28
|
stroke-linecap: round;
|
|
29
29
|
stroke-linejoin: round;
|
|
30
30
|
stroke-width: 32px;
|
|
31
|
-
`}))}}),
|
|
31
|
+
`}))}}),hg=On("success",r.h("svg",{viewBox:"0 0 48 48",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},r.h("g",{stroke:"none","stroke-width":"1","fill-rule":"evenodd"},r.h("g",{"fill-rule":"nonzero"},r.h("path",{d:"M24,4 C35.045695,4 44,12.954305 44,24 C44,35.045695 35.045695,44 24,44 C12.954305,44 4,35.045695 4,24 C4,12.954305 12.954305,4 24,4 Z M32.6338835,17.6161165 C32.1782718,17.1605048 31.4584514,17.1301307 30.9676119,17.5249942 L30.8661165,17.6161165 L20.75,27.732233 L17.1338835,24.1161165 C16.6457281,23.6279612 15.8542719,23.6279612 15.3661165,24.1161165 C14.9105048,24.5717282 14.8801307,25.2915486 15.2749942,25.7823881 L15.3661165,25.8838835 L19.8661165,30.3838835 C20.3217282,30.8394952 21.0415486,30.8698693 21.5323881,30.4750058 L21.6338835,30.3838835 L32.6338835,19.3838835 C33.1220388,18.8957281 33.1220388,18.1042719 32.6338835,17.6161165 Z"}))))),pg=On("warning",r.h("svg",{viewBox:"0 0 24 24",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},r.h("g",{stroke:"none","stroke-width":"1","fill-rule":"evenodd"},r.h("g",{"fill-rule":"nonzero"},r.h("path",{d:"M12,2 C17.523,2 22,6.478 22,12 C22,17.522 17.523,22 12,22 C6.477,22 2,17.522 2,12 C2,6.478 6.477,2 12,2 Z M12.0018002,15.0037242 C11.450254,15.0037242 11.0031376,15.4508407 11.0031376,16.0023869 C11.0031376,16.553933 11.450254,17.0010495 12.0018002,17.0010495 C12.5533463,17.0010495 13.0004628,16.553933 13.0004628,16.0023869 C13.0004628,15.4508407 12.5533463,15.0037242 12.0018002,15.0037242 Z M11.99964,7 C11.4868042,7.00018474 11.0642719,7.38637706 11.0066858,7.8837365 L11,8.00036004 L11.0018003,13.0012393 L11.00857,13.117858 C11.0665141,13.6151758 11.4893244,14.0010638 12.0021602,14.0008793 C12.514996,14.0006946 12.9375283,13.6145023 12.9951144,13.1171428 L13.0018002,13.0005193 L13,7.99964009 L12.9932303,7.8830214 C12.9352861,7.38570354 12.5124758,6.99981552 11.99964,7 Z"}))))),bg=r.defineComponent({name:"ChevronDown",render(){return r.h("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r.h("path",{d:"M3.14645 5.64645C3.34171 5.45118 3.65829 5.45118 3.85355 5.64645L8 9.79289L12.1464 5.64645C12.3417 5.45118 12.6583 5.45118 12.8536 5.64645C13.0488 5.84171 13.0488 6.15829 12.8536 6.35355L8.35355 10.8536C8.15829 11.0488 7.84171 11.0488 7.64645 10.8536L3.14645 6.35355C2.95118 6.15829 2.95118 5.84171 3.14645 5.64645Z",fill:"currentColor"}))}}),gg=On("clear",r.h("svg",{viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},r.h("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},r.h("g",{fill:"currentColor","fill-rule":"nonzero"},r.h("path",{d:"M8,2 C11.3137085,2 14,4.6862915 14,8 C14,11.3137085 11.3137085,14 8,14 C4.6862915,14 2,11.3137085 2,8 C2,4.6862915 4.6862915,2 8,2 Z M6.5343055,5.83859116 C6.33943736,5.70359511 6.07001296,5.72288026 5.89644661,5.89644661 L5.89644661,5.89644661 L5.83859116,5.9656945 C5.70359511,6.16056264 5.72288026,6.42998704 5.89644661,6.60355339 L5.89644661,6.60355339 L7.293,8 L5.89644661,9.39644661 L5.83859116,9.4656945 C5.70359511,9.66056264 5.72288026,9.92998704 5.89644661,10.1035534 L5.89644661,10.1035534 L5.9656945,10.1614088 C6.16056264,10.2964049 6.42998704,10.2771197 6.60355339,10.1035534 L6.60355339,10.1035534 L8,8.707 L9.39644661,10.1035534 L9.4656945,10.1614088 C9.66056264,10.2964049 9.92998704,10.2771197 10.1035534,10.1035534 L10.1035534,10.1035534 L10.1614088,10.0343055 C10.2964049,9.83943736 10.2771197,9.57001296 10.1035534,9.39644661 L10.1035534,9.39644661 L8.707,8 L10.1035534,6.60355339 L10.1614088,6.5343055 C10.2964049,6.33943736 10.2771197,6.07001296 10.1035534,5.89644661 L10.1035534,5.89644661 L10.0343055,5.83859116 C9.83943736,5.70359511 9.57001296,5.72288026 9.39644661,5.89644661 L9.39644661,5.89644661 L8,7.293 L6.60355339,5.89644661 Z"}))))),Yr=r.defineComponent({name:"BaseIconSwitchTransition",setup(e,{slots:t}){const n=Rn();return()=>r.h(r.Transition,{name:"icon-switch-transition",appear:n.value},t)}}),Xl=r.defineComponent({name:"FadeInExpandTransition",props:{appear:Boolean,group:Boolean,mode:String,onLeave:Function,onAfterLeave:Function,onAfterEnter:Function,width:Boolean,reverse:Boolean},setup(e,{slots:t}){function n(s){e.width?s.style.maxWidth=`${s.offsetWidth}px`:s.style.maxHeight=`${s.offsetHeight}px`,s.offsetWidth}function o(s){e.width?s.style.maxWidth="0":s.style.maxHeight="0",s.offsetWidth;const{onLeave:d}=e;d&&d()}function i(s){e.width?s.style.maxWidth="":s.style.maxHeight="";const{onAfterLeave:d}=e;d&&d()}function a(s){if(s.style.transition="none",e.width){const d=s.offsetWidth;s.style.maxWidth="0",s.offsetWidth,s.style.transition="",s.style.maxWidth=`${d}px`}else if(e.reverse)s.style.maxHeight=`${s.offsetHeight}px`,s.offsetHeight,s.style.transition="",s.style.maxHeight="0";else{const d=s.offsetHeight;s.style.maxHeight="0",s.offsetWidth,s.style.transition="",s.style.maxHeight=`${d}px`}s.offsetWidth}function l(s){var d;e.width?s.style.maxWidth="":e.reverse||(s.style.maxHeight=""),(d=e.onAfterEnter)===null||d===void 0||d.call(e)}return()=>{const{group:s,width:d,appear:c,mode:f}=e,u=s?r.TransitionGroup:r.Transition,b={name:d?"fade-in-width-expand-transition":"fade-in-height-expand-transition",appear:c,onEnter:a,onAfterEnter:l,onBeforeLeave:n,onLeave:o,onAfterLeave:i};return s||(b.mode=f),r.h(u,b,t)}}}),mg=y("base-icon",`
|
|
32
32
|
height: 1em;
|
|
33
33
|
width: 1em;
|
|
34
34
|
line-height: 1em;
|
|
@@ -37,10 +37,10 @@ ${t}
|
|
|
37
37
|
position: relative;
|
|
38
38
|
fill: currentColor;
|
|
39
39
|
transform: translateZ(0);
|
|
40
|
-
`,[
|
|
40
|
+
`,[V("svg",`
|
|
41
41
|
height: 1em;
|
|
42
42
|
width: 1em;
|
|
43
|
-
`)]),
|
|
43
|
+
`)]),gt=r.defineComponent({name:"BaseIcon",props:{role:String,ariaLabel:String,ariaDisabled:{type:Boolean,default:void 0},ariaHidden:{type:Boolean,default:void 0},clsPrefix:{type:String,required:!0},onClick:Function,onMousedown:Function,onMouseup:Function},setup(e){gn("-base-icon",mg,r.toRef(e,"clsPrefix"))},render(){return r.h("i",{class:`${this.clsPrefix}-base-icon`,onClick:this.onClick,onMousedown:this.onMousedown,onMouseup:this.onMouseup,role:this.role,"aria-label":this.ariaLabel,"aria-hidden":this.ariaHidden,"aria-disabled":this.ariaDisabled},this.$slots)}}),vg=y("base-close",`
|
|
44
44
|
display: flex;
|
|
45
45
|
align-items: center;
|
|
46
46
|
justify-content: center;
|
|
@@ -58,7 +58,7 @@ ${t}
|
|
|
58
58
|
`,[W("absolute",`
|
|
59
59
|
height: var(--n-close-icon-size);
|
|
60
60
|
width: var(--n-close-icon-size);
|
|
61
|
-
`),
|
|
61
|
+
`),V("&::before",`
|
|
62
62
|
content: "";
|
|
63
63
|
position: absolute;
|
|
64
64
|
width: var(--n-close-size);
|
|
@@ -68,23 +68,23 @@ ${t}
|
|
|
68
68
|
transform: translateY(-50%) translateX(-50%);
|
|
69
69
|
transition: inherit;
|
|
70
70
|
border-radius: inherit;
|
|
71
|
-
`),je("disabled",[
|
|
71
|
+
`),je("disabled",[V("&:hover",`
|
|
72
72
|
color: var(--n-close-icon-color-hover);
|
|
73
|
-
`),
|
|
73
|
+
`),V("&:hover::before",`
|
|
74
74
|
background-color: var(--n-close-color-hover);
|
|
75
|
-
`),
|
|
75
|
+
`),V("&:focus::before",`
|
|
76
76
|
background-color: var(--n-close-color-hover);
|
|
77
|
-
`),
|
|
77
|
+
`),V("&:active",`
|
|
78
78
|
color: var(--n-close-icon-color-pressed);
|
|
79
|
-
`),
|
|
79
|
+
`),V("&:active::before",`
|
|
80
80
|
background-color: var(--n-close-color-pressed);
|
|
81
81
|
`)]),W("disabled",`
|
|
82
82
|
cursor: not-allowed;
|
|
83
83
|
color: var(--n-close-icon-color-disabled);
|
|
84
84
|
background-color: transparent;
|
|
85
|
-
`),W("round",[
|
|
85
|
+
`),W("round",[V("&::before",`
|
|
86
86
|
border-radius: 50%;
|
|
87
|
-
`)])]),
|
|
87
|
+
`)])]),li=r.defineComponent({name:"BaseClose",props:{isButtonTag:{type:Boolean,default:!0},clsPrefix:{type:String,required:!0},disabled:{type:Boolean,default:void 0},focusable:{type:Boolean,default:!0},round:Boolean,onClick:Function,absolute:Boolean},setup(e){return gn("-base-close",vg,r.toRef(e,"clsPrefix")),()=>{const{clsPrefix:t,disabled:n,absolute:o,round:i,isButtonTag:a}=e,l=a?"button":"div";return r.h(l,{type:a?"button":void 0,tabindex:n||!e.focusable?-1:0,"aria-disabled":n,"aria-label":"close",role:a?void 0:"button",disabled:n,class:[`${t}-base-close`,o&&`${t}-base-close--absolute`,n&&`${t}-base-close--disabled`,i&&`${t}-base-close--round`],onMousedown:s=>{e.focusable||s.preventDefault()},onClick:e.onClick},r.h(gt,{clsPrefix:t},{default:()=>r.h(ag,null)}))}}}),xg=r.defineComponent({props:{onFocus:Function,onBlur:Function},setup(e){return()=>r.h("div",{style:"width: 0; height: 0",tabindex:0,onFocus:e.onFocus,onBlur:e.onBlur})}}),{cubicBezierEaseInOut:yg}=pn;function An({originalTransform:e="",left:t=0,top:n=0,transition:o=`all .3s ${yg} !important`}={}){return[V("&.icon-switch-transition-enter-from, &.icon-switch-transition-leave-to",{transform:`${e} scale(0.75)`,left:t,top:n,opacity:0}),V("&.icon-switch-transition-enter-to, &.icon-switch-transition-leave-from",{transform:`scale(1) ${e}`,left:t,top:n,opacity:1}),V("&.icon-switch-transition-enter-active, &.icon-switch-transition-leave-active",{transformOrigin:"center",position:"absolute",left:t,top:n,transition:o})]}const wg=V([V("@keyframes rotator",`
|
|
88
88
|
0% {
|
|
89
89
|
-webkit-transform: rotate(0deg);
|
|
90
90
|
transform: rotate(0deg);
|
|
@@ -97,26 +97,26 @@ ${t}
|
|
|
97
97
|
line-height: 0;
|
|
98
98
|
width: 1em;
|
|
99
99
|
height: 1em;
|
|
100
|
-
`,[
|
|
100
|
+
`,[R("transition-wrapper",`
|
|
101
101
|
position: absolute;
|
|
102
102
|
width: 100%;
|
|
103
103
|
height: 100%;
|
|
104
|
-
`,[
|
|
104
|
+
`,[An()]),R("placeholder",`
|
|
105
105
|
position: absolute;
|
|
106
106
|
left: 50%;
|
|
107
107
|
top: 50%;
|
|
108
108
|
transform: translateX(-50%) translateY(-50%);
|
|
109
|
-
`,[
|
|
109
|
+
`,[An({left:"50%",top:"50%",originalTransform:"translateX(-50%) translateY(-50%)"})]),R("container",`
|
|
110
110
|
animation: rotator 3s linear infinite both;
|
|
111
|
-
`,[
|
|
111
|
+
`,[R("icon",`
|
|
112
112
|
height: 1em;
|
|
113
113
|
width: 1em;
|
|
114
|
-
`)])])]),li="1.6s",Sg={strokeWidth:{type:Number,default:28},stroke:{type:String,default:void 0}},Zo=o.defineComponent({name:"BaseLoading",props:Object.assign({clsPrefix:{type:String,required:!0},show:{type:Boolean,default:!0},scale:{type:Number,default:1},radius:{type:Number,default:100}},Sg),setup(e){mn("-base-loading",Cg,o.toRef(e,"clsPrefix"))},render(){const{clsPrefix:e,radius:t,strokeWidth:n,stroke:r,scale:i}=this,a=t/i;return o.h("div",{class:`${e}-base-loading`,role:"img","aria-label":"loading"},o.h(Yo,null,{default:()=>this.show?o.h("div",{key:"icon",class:`${e}-base-loading__transition-wrapper`},o.h("div",{class:`${e}-base-loading__container`},o.h("svg",{class:`${e}-base-loading__icon`,viewBox:`0 0 ${2*a} ${2*a}`,xmlns:"http://www.w3.org/2000/svg",style:{color:r}},o.h("g",null,o.h("animateTransform",{attributeName:"transform",type:"rotate",values:`0 ${a} ${a};270 ${a} ${a}`,begin:"0s",dur:li,fill:"freeze",repeatCount:"indefinite"}),o.h("circle",{class:`${e}-base-loading__icon`,fill:"none",stroke:"currentColor","stroke-width":n,"stroke-linecap":"round",cx:a,cy:a,r:t-n/2,"stroke-dasharray":5.67*t,"stroke-dashoffset":18.48*t},o.h("animateTransform",{attributeName:"transform",type:"rotate",values:`0 ${a} ${a};135 ${a} ${a};450 ${a} ${a}`,begin:"0s",dur:li,fill:"freeze",repeatCount:"indefinite"}),o.h("animate",{attributeName:"stroke-dashoffset",values:`${5.67*t};${1.42*t};${5.67*t}`,begin:"0s",dur:li,fill:"freeze",repeatCount:"indefinite"})))))):o.h("div",{key:"placeholder",class:`${e}-base-loading__placeholder`},this.$slots)}))}});function Yl(e){return Array.isArray(e)?e:[e]}const si={STOP:"STOP"};function Zl(e,t){const n=t(e);e.children!==void 0&&n!==si.STOP&&e.children.forEach(r=>Zl(r,t))}function $g(e,t={}){const{preserveGroup:n=!1}=t,r=[],i=n?l=>{l.isLeaf||(r.push(l.key),a(l.children))}:l=>{l.isLeaf||(l.isGroup||r.push(l.key),a(l.children))};function a(l){l.forEach(i)}return a(e),r}function kg(e,t){const{isLeaf:n}=e;return n!==void 0?n:!t(e)}function zg(e){return e.children}function Tg(e){return e.key}function Pg(){return!1}function Rg(e,t){const{isLeaf:n}=e;return!(n===!1&&!Array.isArray(t(e)))}function Bg(e){return e.disabled===!0}function _g(e,t){return e.isLeaf===!1&&!Array.isArray(t(e))}function Eg(e,t){if(e.isLeaf===!0){const n=t(e);if(Array.isArray(n)&&n.length>0)return!0}return!1}function di(e){var t;return e==null?[]:Array.isArray(e)?e:(t=e.checkedKeys)!==null&&t!==void 0?t:[]}function ci(e){var t;return e==null||Array.isArray(e)?[]:(t=e.indeterminateKeys)!==null&&t!==void 0?t:[]}function Mg(e,t){const n=new Set(e);return t.forEach(r=>{n.has(r)||n.add(r)}),Array.from(n)}function Ig(e,t){const n=new Set(e);return t.forEach(r=>{n.has(r)&&n.delete(r)}),Array.from(n)}function Og(e){return(e==null?void 0:e.type)==="group"}function Ag(e){const t=new Map;return e.forEach((n,r)=>{t.set(n.key,r)}),n=>{var r;return(r=t.get(n))!==null&&r!==void 0?r:null}}class Fg extends Error{constructor(){super(),this.message="SubtreeNotLoadedError: checking a subtree whose required nodes are not fully loaded."}}function Dg(e,t,n,r){return Jo(t.concat(e),n,r,!1)}function Vg(e,t){const n=new Set;return e.forEach(r=>{const i=t.treeNodeMap.get(r);if(i!==void 0){let a=i.parent;for(;a!==null&&!(a.disabled||n.has(a.key));)n.add(a.key),a=a.parent}}),n}function Hg(e,t,n,r){const i=Jo(t,n,r,!1),a=Jo(e,n,r,!0),l=Vg(e,n),s=[];return i.forEach(d=>{(a.has(d)||l.has(d))&&s.push(d)}),s.forEach(d=>i.delete(d)),i}function ui(e,t){const{checkedKeys:n,keysToCheck:r,keysToUncheck:i,indeterminateKeys:a,cascade:l,leafOnly:s,checkStrategy:d,allowNotLoaded:c}=e;if(!l)return r!==void 0?{checkedKeys:Mg(n,r),indeterminateKeys:Array.from(a)}:i!==void 0?{checkedKeys:Ig(n,i),indeterminateKeys:Array.from(a)}:{checkedKeys:Array.from(n),indeterminateKeys:Array.from(a)};const{levelTreeNodeMap:f}=t;let u;i!==void 0?u=Hg(i,n,t,c):r!==void 0?u=Dg(r,n,t,c):u=Jo(n,t,c,!1);const p=d==="parent",m=d==="child"||s,h=u,v=new Set,w=Math.max.apply(null,Array.from(f.keys()));for(let g=w;g>=0;g-=1){const P=g===0,H=f.get(g);for(const $ of H){if($.isLeaf)continue;const{key:k,shallowLoaded:M}=$;if(m&&M&&$.children.forEach(D=>{!D.disabled&&!D.isLeaf&&D.shallowLoaded&&h.has(D.key)&&h.delete(D.key)}),$.disabled||!M)continue;let b=!0,S=!1,E=!0;for(const D of $.children){const O=D.key;if(!D.disabled){if(E&&(E=!1),h.has(O))S=!0;else if(v.has(O)){S=!0,b=!1;break}else if(b=!1,S)break}}b&&!E?(p&&$.children.forEach(D=>{!D.disabled&&h.has(D.key)&&h.delete(D.key)}),h.add(k)):S&&v.add(k),P&&m&&h.has(k)&&h.delete(k)}}return{checkedKeys:Array.from(h),indeterminateKeys:Array.from(v)}}function Jo(e,t,n,r){const{treeNodeMap:i,getChildren:a}=t,l=new Set,s=new Set(e);return e.forEach(d=>{const c=i.get(d);c!==void 0&&Zl(c,f=>{if(f.disabled)return si.STOP;const{key:u}=f;if(!l.has(u)&&(l.add(u),s.add(u),_g(f.rawNode,a))){if(r)return si.STOP;if(!n)throw new Fg}})}),s}function Lg(e,{includeGroup:t=!1,includeSelf:n=!0},r){var i;const a=r.treeNodeMap;let l=e==null?null:(i=a.get(e))!==null&&i!==void 0?i:null;const s={keyPath:[],treeNodePath:[],treeNode:l};if(l!=null&&l.ignored)return s.treeNode=null,s;for(;l;)!l.ignored&&(t||!l.isGroup)&&s.treeNodePath.push(l),l=l.parent;return s.treeNodePath.reverse(),n||s.treeNodePath.pop(),s.keyPath=s.treeNodePath.map(d=>d.key),s}function Ng(e){if(e.length===0)return null;const t=e[0];return t.isGroup||t.ignored||t.disabled?t.getNext():t}function Wg(e,t){const n=e.siblings,r=n.length,{index:i}=e;return t?n[(i+1)%r]:i===n.length-1?null:n[i+1]}function Jl(e,t,{loop:n=!1,includeDisabled:r=!1}={}){const i=t==="prev"?jg:Wg,a={reverse:t==="prev"};let l=!1,s=null;function d(c){if(c!==null){if(c===e){if(!l)l=!0;else if(!e.disabled&&!e.isGroup){s=e;return}}else if((!c.disabled||r)&&!c.ignored&&!c.isGroup){s=c;return}if(c.isGroup){const f=fi(c,a);f!==null?s=f:d(i(c,n))}else{const f=i(c,!1);if(f!==null)d(f);else{const u=Ug(c);u!=null&&u.isGroup?d(i(u,n)):n&&d(i(c,!0))}}}}return d(e),s}function jg(e,t){const n=e.siblings,r=n.length,{index:i}=e;return t?n[(i-1+r)%r]:i===0?null:n[i-1]}function Ug(e){return e.parent}function fi(e,t={}){const{reverse:n=!1}=t,{children:r}=e;if(r){const{length:i}=r,a=n?i-1:0,l=n?-1:i,s=n?-1:1;for(let d=a;d!==l;d+=s){const c=r[d];if(!c.disabled&&!c.ignored)if(c.isGroup){const f=fi(c,t);if(f!==null)return f}else return c}}return null}const Gg={getChild(){return this.ignored?null:fi(this)},getParent(){const{parent:e}=this;return e!=null&&e.isGroup?e.getParent():e},getNext(e={}){return Jl(this,"next",e)},getPrev(e={}){return Jl(this,"prev",e)}};function Kg(e,t){const n=t?new Set(t):void 0,r=[];function i(a){a.forEach(l=>{r.push(l),!(l.isLeaf||!l.children||l.ignored)&&(l.isGroup||n===void 0||n.has(l.key))&&i(l.children)})}return i(e),r}function qg(e,t){const n=e.key;for(;t;){if(t.key===n)return!0;t=t.parent}return!1}function Ql(e,t,n,r,i,a=null,l=0){const s=[];return e.forEach((d,c)=>{var f;process.env.NODE_ENV!=="production"&&Eg(d,i)&&console.error("[treemate]: node",d,"is invalid");const u=Object.create(r);if(u.rawNode=d,u.siblings=s,u.level=l,u.index=c,u.isFirstChild=c===0,u.isLastChild=c+1===e.length,u.parent=a,!u.ignored){const p=i(d);Array.isArray(p)&&(u.children=Ql(p,t,n,r,i,u,l+1))}s.push(u),t.set(u.key,u),n.has(l)||n.set(l,[]),(f=n.get(l))===null||f===void 0||f.push(u)}),s}function Xg(e,t={}){var n;const r=new Map,i=new Map,{getDisabled:a=Bg,getIgnored:l=Pg,getIsGroup:s=Og,getKey:d=Tg}=t,c=(n=t.getChildren)!==null&&n!==void 0?n:zg,f=t.ignoreEmptyChildren?$=>{const k=c($);return Array.isArray(k)?k.length?k:null:k}:c,u=Object.assign({get key(){return d(this.rawNode)},get disabled(){return a(this.rawNode)},get isGroup(){return s(this.rawNode)},get isLeaf(){return kg(this.rawNode,f)},get shallowLoaded(){return Rg(this.rawNode,f)},get ignored(){return l(this.rawNode)},contains($){return qg(this,$)}},Gg),p=Ql(e,r,i,u,f);function m($){if($==null)return null;const k=r.get($);return k&&!k.isGroup&&!k.ignored?k:null}function h($){if($==null)return null;const k=r.get($);return k&&!k.ignored?k:null}function v($,k){const M=h($);return M?M.getPrev(k):null}function w($,k){const M=h($);return M?M.getNext(k):null}function g($){const k=h($);return k?k.getParent():null}function P($){const k=h($);return k?k.getChild():null}const H={treeNodes:p,treeNodeMap:r,levelTreeNodeMap:i,maxLevel:Math.max(...i.keys()),getChildren:f,getFlattenedNodes($){return Kg(p,$)},getNode:m,getPrev:v,getNext:w,getParent:g,getChild:P,getFirstAvailableNode(){return Ng(p)},getPath($,k={}){return Lg($,k,H)},getCheckedKeys($,k={}){const{cascade:M=!0,leafOnly:b=!1,checkStrategy:S="all",allowNotLoaded:E=!1}=k;return ui({checkedKeys:di($),indeterminateKeys:ci($),cascade:M,leafOnly:b,checkStrategy:S,allowNotLoaded:E},H)},check($,k,M={}){const{cascade:b=!0,leafOnly:S=!1,checkStrategy:E="all",allowNotLoaded:D=!1}=M;return ui({checkedKeys:di(k),indeterminateKeys:ci(k),keysToCheck:$==null?[]:Yl($),cascade:b,leafOnly:S,checkStrategy:E,allowNotLoaded:D},H)},uncheck($,k,M={}){const{cascade:b=!0,leafOnly:S=!1,checkStrategy:E="all",allowNotLoaded:D=!1}=M;return ui({checkedKeys:di(k),indeterminateKeys:ci(k),keysToUncheck:$==null?[]:Yl($),cascade:b,leafOnly:S,checkStrategy:E,allowNotLoaded:D},H)},getNonLeafKeys($={}){return $g(p,$)}};return H}const pe={neutralBase:"#FFF",neutralInvertBase:"#000",neutralTextBase:"#000",neutralPopover:"#fff",neutralCard:"#fff",neutralModal:"#fff",neutralBody:"#fff",alpha1:"0.82",alpha2:"0.72",alpha3:"0.38",alpha4:"0.24",alpha5:"0.18",alphaClose:"0.6",alphaDisabled:"0.5",alphaDisabledInput:"0.02",alphaPending:"0.05",alphaTablePending:"0.02",alphaPressed:"0.07",alphaAvatar:"0.2",alphaRail:"0.14",alphaProgressRail:".08",alphaBorder:"0.12",alphaDivider:"0.06",alphaInput:"0",alphaAction:"0.02",alphaTab:"0.04",alphaScrollbar:"0.25",alphaScrollbarHover:"0.4",alphaCode:"0.05",alphaTag:"0.02",primaryHover:"#36ad6a",primaryDefault:"#18a058",primaryActive:"#0c7a43",primarySuppl:"#36ad6a",infoHover:"#4098fc",infoDefault:"#2080f0",infoActive:"#1060c9",infoSuppl:"#4098fc",errorHover:"#de576d",errorDefault:"#d03050",errorActive:"#ab1f3f",errorSuppl:"#de576d",warningHover:"#fcb040",warningDefault:"#f0a020",warningActive:"#c97c10",warningSuppl:"#fcb040",successHover:"#36ad6a",successDefault:"#18a058",successActive:"#0c7a43",successSuppl:"#36ad6a"},Yg=Qe(pe.neutralBase),es=Qe(pe.neutralInvertBase),Zg=`rgba(${es.slice(0,3).join(", ")}, `;function ts(e){return`${Zg+String(e)})`}function nt(e){const t=Array.from(es);return t[3]=Number(e),ft(Yg,t)}const Ye=Object.assign(Object.assign({name:"common"},bn),{baseColor:pe.neutralBase,primaryColor:pe.primaryDefault,primaryColorHover:pe.primaryHover,primaryColorPressed:pe.primaryActive,primaryColorSuppl:pe.primarySuppl,infoColor:pe.infoDefault,infoColorHover:pe.infoHover,infoColorPressed:pe.infoActive,infoColorSuppl:pe.infoSuppl,successColor:pe.successDefault,successColorHover:pe.successHover,successColorPressed:pe.successActive,successColorSuppl:pe.successSuppl,warningColor:pe.warningDefault,warningColorHover:pe.warningHover,warningColorPressed:pe.warningActive,warningColorSuppl:pe.warningSuppl,errorColor:pe.errorDefault,errorColorHover:pe.errorHover,errorColorPressed:pe.errorActive,errorColorSuppl:pe.errorSuppl,textColorBase:pe.neutralTextBase,textColor1:"rgb(31, 34, 37)",textColor2:"rgb(51, 54, 57)",textColor3:"rgb(118, 124, 130)",textColorDisabled:nt(pe.alpha4),placeholderColor:nt(pe.alpha4),placeholderColorDisabled:nt(pe.alpha5),iconColor:nt(pe.alpha4),iconColorHover:xo(nt(pe.alpha4),{lightness:.75}),iconColorPressed:xo(nt(pe.alpha4),{lightness:.9}),iconColorDisabled:nt(pe.alpha5),opacity1:pe.alpha1,opacity2:pe.alpha2,opacity3:pe.alpha3,opacity4:pe.alpha4,opacity5:pe.alpha5,dividerColor:"rgb(239, 239, 245)",borderColor:"rgb(224, 224, 230)",closeIconColor:nt(Number(pe.alphaClose)),closeIconColorHover:nt(Number(pe.alphaClose)),closeIconColorPressed:nt(Number(pe.alphaClose)),closeColorHover:"rgba(0, 0, 0, .09)",closeColorPressed:"rgba(0, 0, 0, .13)",clearColor:nt(pe.alpha4),clearColorHover:xo(nt(pe.alpha4),{lightness:.75}),clearColorPressed:xo(nt(pe.alpha4),{lightness:.9}),scrollbarColor:ts(pe.alphaScrollbar),scrollbarColorHover:ts(pe.alphaScrollbarHover),scrollbarWidth:"5px",scrollbarHeight:"5px",scrollbarBorderRadius:"5px",progressRailColor:nt(pe.alphaProgressRail),railColor:"rgb(219, 219, 223)",popoverColor:pe.neutralPopover,tableColor:pe.neutralCard,cardColor:pe.neutralCard,modalColor:pe.neutralModal,bodyColor:pe.neutralBody,tagColor:"#eee",avatarColor:nt(pe.alphaAvatar),invertedColor:"rgb(0, 20, 40)",inputColor:nt(pe.alphaInput),codeColor:"rgb(244, 244, 248)",tabColor:"rgb(247, 247, 250)",actionColor:"rgb(250, 250, 252)",tableHeaderColor:"rgb(250, 250, 252)",hoverColor:"rgb(243, 243, 245)",tableColorHover:"rgba(0, 0, 100, 0.03)",tableColorStriped:"rgba(0, 0, 100, 0.02)",pressedColor:"rgb(237, 237, 239)",opacityDisabled:pe.alphaDisabled,inputColorDisabled:"rgb(250, 250, 252)",buttonColor2:"rgba(46, 51, 56, .05)",buttonColor2Hover:"rgba(46, 51, 56, .09)",buttonColor2Pressed:"rgba(46, 51, 56, .13)",boxShadow1:"0 1px 2px -2px rgba(0, 0, 0, .08), 0 3px 6px 0 rgba(0, 0, 0, .06), 0 5px 12px 4px rgba(0, 0, 0, .04)",boxShadow2:"0 3px 6px -4px rgba(0, 0, 0, .12), 0 6px 16px 0 rgba(0, 0, 0, .08), 0 9px 28px 8px rgba(0, 0, 0, .05)",boxShadow3:"0 6px 16px -9px rgba(0, 0, 0, .08), 0 9px 28px 0 rgba(0, 0, 0, .05), 0 12px 48px 16px rgba(0, 0, 0, .03)"}),Jg={iconSizeSmall:"34px",iconSizeMedium:"40px",iconSizeLarge:"46px",iconSizeHuge:"52px"};function Qg(e){const{textColorDisabled:t,iconColor:n,textColor2:r,fontSizeSmall:i,fontSizeMedium:a,fontSizeLarge:l,fontSizeHuge:s}=e;return Object.assign(Object.assign({},Jg),{fontSizeSmall:i,fontSizeMedium:a,fontSizeLarge:l,fontSizeHuge:s,textColor:t,iconColor:n,extraTextColor:r})}const ns={name:"Empty",common:Ye,self:Qg},em=y("empty",`
|
|
114
|
+
`)])])]),si="1.6s",Cg={strokeWidth:{type:Number,default:28},stroke:{type:String,default:void 0}},Zr=r.defineComponent({name:"BaseLoading",props:Object.assign({clsPrefix:{type:String,required:!0},show:{type:Boolean,default:!0},scale:{type:Number,default:1},radius:{type:Number,default:100}},Cg),setup(e){gn("-base-loading",wg,r.toRef(e,"clsPrefix"))},render(){const{clsPrefix:e,radius:t,strokeWidth:n,stroke:o,scale:i}=this,a=t/i;return r.h("div",{class:`${e}-base-loading`,role:"img","aria-label":"loading"},r.h(Yr,null,{default:()=>this.show?r.h("div",{key:"icon",class:`${e}-base-loading__transition-wrapper`},r.h("div",{class:`${e}-base-loading__container`},r.h("svg",{class:`${e}-base-loading__icon`,viewBox:`0 0 ${2*a} ${2*a}`,xmlns:"http://www.w3.org/2000/svg",style:{color:o}},r.h("g",null,r.h("animateTransform",{attributeName:"transform",type:"rotate",values:`0 ${a} ${a};270 ${a} ${a}`,begin:"0s",dur:si,fill:"freeze",repeatCount:"indefinite"}),r.h("circle",{class:`${e}-base-loading__icon`,fill:"none",stroke:"currentColor","stroke-width":n,"stroke-linecap":"round",cx:a,cy:a,r:t-n/2,"stroke-dasharray":5.67*t,"stroke-dashoffset":18.48*t},r.h("animateTransform",{attributeName:"transform",type:"rotate",values:`0 ${a} ${a};135 ${a} ${a};450 ${a} ${a}`,begin:"0s",dur:si,fill:"freeze",repeatCount:"indefinite"}),r.h("animate",{attributeName:"stroke-dashoffset",values:`${5.67*t};${1.42*t};${5.67*t}`,begin:"0s",dur:si,fill:"freeze",repeatCount:"indefinite"})))))):r.h("div",{key:"placeholder",class:`${e}-base-loading__placeholder`},this.$slots)}))}});function ql(e){return Array.isArray(e)?e:[e]}const di={STOP:"STOP"};function Yl(e,t){const n=t(e);e.children!==void 0&&n!==di.STOP&&e.children.forEach(o=>Yl(o,t))}function Sg(e,t={}){const{preserveGroup:n=!1}=t,o=[],i=n?l=>{l.isLeaf||(o.push(l.key),a(l.children))}:l=>{l.isLeaf||(l.isGroup||o.push(l.key),a(l.children))};function a(l){l.forEach(i)}return a(e),o}function $g(e,t){const{isLeaf:n}=e;return n!==void 0?n:!t(e)}function kg(e){return e.children}function Tg(e){return e.key}function zg(){return!1}function Pg(e,t){const{isLeaf:n}=e;return!(n===!1&&!Array.isArray(t(e)))}function Rg(e){return e.disabled===!0}function _g(e,t){return e.isLeaf===!1&&!Array.isArray(t(e))}function Eg(e,t){if(e.isLeaf===!0){const n=t(e);if(Array.isArray(n)&&n.length>0)return!0}return!1}function ci(e){var t;return e==null?[]:Array.isArray(e)?e:(t=e.checkedKeys)!==null&&t!==void 0?t:[]}function ui(e){var t;return e==null||Array.isArray(e)?[]:(t=e.indeterminateKeys)!==null&&t!==void 0?t:[]}function Bg(e,t){const n=new Set(e);return t.forEach(o=>{n.has(o)||n.add(o)}),Array.from(n)}function Mg(e,t){const n=new Set(e);return t.forEach(o=>{n.has(o)&&n.delete(o)}),Array.from(n)}function Ig(e){return(e==null?void 0:e.type)==="group"}function Og(e){const t=new Map;return e.forEach((n,o)=>{t.set(n.key,o)}),n=>{var o;return(o=t.get(n))!==null&&o!==void 0?o:null}}class Ag extends Error{constructor(){super(),this.message="SubtreeNotLoadedError: checking a subtree whose required nodes are not fully loaded."}}function Fg(e,t,n,o){return Jr(t.concat(e),n,o,!1)}function Dg(e,t){const n=new Set;return e.forEach(o=>{const i=t.treeNodeMap.get(o);if(i!==void 0){let a=i.parent;for(;a!==null&&!(a.disabled||n.has(a.key));)n.add(a.key),a=a.parent}}),n}function Vg(e,t,n,o){const i=Jr(t,n,o,!1),a=Jr(e,n,o,!0),l=Dg(e,n),s=[];return i.forEach(d=>{(a.has(d)||l.has(d))&&s.push(d)}),s.forEach(d=>i.delete(d)),i}function fi(e,t){const{checkedKeys:n,keysToCheck:o,keysToUncheck:i,indeterminateKeys:a,cascade:l,leafOnly:s,checkStrategy:d,allowNotLoaded:c}=e;if(!l)return o!==void 0?{checkedKeys:Bg(n,o),indeterminateKeys:Array.from(a)}:i!==void 0?{checkedKeys:Mg(n,i),indeterminateKeys:Array.from(a)}:{checkedKeys:Array.from(n),indeterminateKeys:Array.from(a)};const{levelTreeNodeMap:f}=t;let u;i!==void 0?u=Vg(i,n,t,c):o!==void 0?u=Fg(o,n,t,c):u=Jr(n,t,c,!1);const b=d==="parent",m=d==="child"||s,h=u,x=new Set,w=Math.max.apply(null,Array.from(f.keys()));for(let g=w;g>=0;g-=1){const P=g===0,L=f.get(g);for(const $ of L){if($.isLeaf)continue;const{key:k,shallowLoaded:M}=$;if(m&&M&&$.children.forEach(F=>{!F.disabled&&!F.isLeaf&&F.shallowLoaded&&h.has(F.key)&&h.delete(F.key)}),$.disabled||!M)continue;let p=!0,S=!1,B=!0;for(const F of $.children){const I=F.key;if(!F.disabled){if(B&&(B=!1),h.has(I))S=!0;else if(x.has(I)){S=!0,p=!1;break}else if(p=!1,S)break}}p&&!B?(b&&$.children.forEach(F=>{!F.disabled&&h.has(F.key)&&h.delete(F.key)}),h.add(k)):S&&x.add(k),P&&m&&h.has(k)&&h.delete(k)}}return{checkedKeys:Array.from(h),indeterminateKeys:Array.from(x)}}function Jr(e,t,n,o){const{treeNodeMap:i,getChildren:a}=t,l=new Set,s=new Set(e);return e.forEach(d=>{const c=i.get(d);c!==void 0&&Yl(c,f=>{if(f.disabled)return di.STOP;const{key:u}=f;if(!l.has(u)&&(l.add(u),s.add(u),_g(f.rawNode,a))){if(o)return di.STOP;if(!n)throw new Ag}})}),s}function Lg(e,{includeGroup:t=!1,includeSelf:n=!0},o){var i;const a=o.treeNodeMap;let l=e==null?null:(i=a.get(e))!==null&&i!==void 0?i:null;const s={keyPath:[],treeNodePath:[],treeNode:l};if(l!=null&&l.ignored)return s.treeNode=null,s;for(;l;)!l.ignored&&(t||!l.isGroup)&&s.treeNodePath.push(l),l=l.parent;return s.treeNodePath.reverse(),n||s.treeNodePath.pop(),s.keyPath=s.treeNodePath.map(d=>d.key),s}function Hg(e){if(e.length===0)return null;const t=e[0];return t.isGroup||t.ignored||t.disabled?t.getNext():t}function Ng(e,t){const n=e.siblings,o=n.length,{index:i}=e;return t?n[(i+1)%o]:i===n.length-1?null:n[i+1]}function Zl(e,t,{loop:n=!1,includeDisabled:o=!1}={}){const i=t==="prev"?Wg:Ng,a={reverse:t==="prev"};let l=!1,s=null;function d(c){if(c!==null){if(c===e){if(!l)l=!0;else if(!e.disabled&&!e.isGroup){s=e;return}}else if((!c.disabled||o)&&!c.ignored&&!c.isGroup){s=c;return}if(c.isGroup){const f=hi(c,a);f!==null?s=f:d(i(c,n))}else{const f=i(c,!1);if(f!==null)d(f);else{const u=jg(c);u!=null&&u.isGroup?d(i(u,n)):n&&d(i(c,!0))}}}}return d(e),s}function Wg(e,t){const n=e.siblings,o=n.length,{index:i}=e;return t?n[(i-1+o)%o]:i===0?null:n[i-1]}function jg(e){return e.parent}function hi(e,t={}){const{reverse:n=!1}=t,{children:o}=e;if(o){const{length:i}=o,a=n?i-1:0,l=n?-1:i,s=n?-1:1;for(let d=a;d!==l;d+=s){const c=o[d];if(!c.disabled&&!c.ignored)if(c.isGroup){const f=hi(c,t);if(f!==null)return f}else return c}}return null}const Ug={getChild(){return this.ignored?null:hi(this)},getParent(){const{parent:e}=this;return e!=null&&e.isGroup?e.getParent():e},getNext(e={}){return Zl(this,"next",e)},getPrev(e={}){return Zl(this,"prev",e)}};function Gg(e,t){const n=t?new Set(t):void 0,o=[];function i(a){a.forEach(l=>{o.push(l),!(l.isLeaf||!l.children||l.ignored)&&(l.isGroup||n===void 0||n.has(l.key))&&i(l.children)})}return i(e),o}function Kg(e,t){const n=e.key;for(;t;){if(t.key===n)return!0;t=t.parent}return!1}function Jl(e,t,n,o,i,a=null,l=0){const s=[];return e.forEach((d,c)=>{var f;process.env.NODE_ENV!=="production"&&Eg(d,i)&&console.error("[treemate]: node",d,"is invalid");const u=Object.create(o);if(u.rawNode=d,u.siblings=s,u.level=l,u.index=c,u.isFirstChild=c===0,u.isLastChild=c+1===e.length,u.parent=a,!u.ignored){const b=i(d);Array.isArray(b)&&(u.children=Jl(b,t,n,o,i,u,l+1))}s.push(u),t.set(u.key,u),n.has(l)||n.set(l,[]),(f=n.get(l))===null||f===void 0||f.push(u)}),s}function Xg(e,t={}){var n;const o=new Map,i=new Map,{getDisabled:a=Rg,getIgnored:l=zg,getIsGroup:s=Ig,getKey:d=Tg}=t,c=(n=t.getChildren)!==null&&n!==void 0?n:kg,f=t.ignoreEmptyChildren?$=>{const k=c($);return Array.isArray(k)?k.length?k:null:k}:c,u=Object.assign({get key(){return d(this.rawNode)},get disabled(){return a(this.rawNode)},get isGroup(){return s(this.rawNode)},get isLeaf(){return $g(this.rawNode,f)},get shallowLoaded(){return Pg(this.rawNode,f)},get ignored(){return l(this.rawNode)},contains($){return Kg(this,$)}},Ug),b=Jl(e,o,i,u,f);function m($){if($==null)return null;const k=o.get($);return k&&!k.isGroup&&!k.ignored?k:null}function h($){if($==null)return null;const k=o.get($);return k&&!k.ignored?k:null}function x($,k){const M=h($);return M?M.getPrev(k):null}function w($,k){const M=h($);return M?M.getNext(k):null}function g($){const k=h($);return k?k.getParent():null}function P($){const k=h($);return k?k.getChild():null}const L={treeNodes:b,treeNodeMap:o,levelTreeNodeMap:i,maxLevel:Math.max(...i.keys()),getChildren:f,getFlattenedNodes($){return Gg(b,$)},getNode:m,getPrev:x,getNext:w,getParent:g,getChild:P,getFirstAvailableNode(){return Hg(b)},getPath($,k={}){return Lg($,k,L)},getCheckedKeys($,k={}){const{cascade:M=!0,leafOnly:p=!1,checkStrategy:S="all",allowNotLoaded:B=!1}=k;return fi({checkedKeys:ci($),indeterminateKeys:ui($),cascade:M,leafOnly:p,checkStrategy:S,allowNotLoaded:B},L)},check($,k,M={}){const{cascade:p=!0,leafOnly:S=!1,checkStrategy:B="all",allowNotLoaded:F=!1}=M;return fi({checkedKeys:ci(k),indeterminateKeys:ui(k),keysToCheck:$==null?[]:ql($),cascade:p,leafOnly:S,checkStrategy:B,allowNotLoaded:F},L)},uncheck($,k,M={}){const{cascade:p=!0,leafOnly:S=!1,checkStrategy:B="all",allowNotLoaded:F=!1}=M;return fi({checkedKeys:ci(k),indeterminateKeys:ui(k),keysToUncheck:$==null?[]:ql($),cascade:p,leafOnly:S,checkStrategy:B,allowNotLoaded:F},L)},getNonLeafKeys($={}){return Sg(b,$)}};return L}const pe={neutralBase:"#FFF",neutralInvertBase:"#000",neutralTextBase:"#000",neutralPopover:"#fff",neutralCard:"#fff",neutralModal:"#fff",neutralBody:"#fff",alpha1:"0.82",alpha2:"0.72",alpha3:"0.38",alpha4:"0.24",alpha5:"0.18",alphaClose:"0.6",alphaDisabled:"0.5",alphaDisabledInput:"0.02",alphaPending:"0.05",alphaTablePending:"0.02",alphaPressed:"0.07",alphaAvatar:"0.2",alphaRail:"0.14",alphaProgressRail:".08",alphaBorder:"0.12",alphaDivider:"0.06",alphaInput:"0",alphaAction:"0.02",alphaTab:"0.04",alphaScrollbar:"0.25",alphaScrollbarHover:"0.4",alphaCode:"0.05",alphaTag:"0.02",primaryHover:"#36ad6a",primaryDefault:"#18a058",primaryActive:"#0c7a43",primarySuppl:"#36ad6a",infoHover:"#4098fc",infoDefault:"#2080f0",infoActive:"#1060c9",infoSuppl:"#4098fc",errorHover:"#de576d",errorDefault:"#d03050",errorActive:"#ab1f3f",errorSuppl:"#de576d",warningHover:"#fcb040",warningDefault:"#f0a020",warningActive:"#c97c10",warningSuppl:"#fcb040",successHover:"#36ad6a",successDefault:"#18a058",successActive:"#0c7a43",successSuppl:"#36ad6a"},qg=Ze(pe.neutralBase),Ql=Ze(pe.neutralInvertBase),Yg=`rgba(${Ql.slice(0,3).join(", ")}, `;function es(e){return`${Yg+String(e)})`}function nt(e){const t=Array.from(Ql);return t[3]=Number(e),ut(qg,t)}const et=Object.assign(Object.assign({name:"common"},pn),{baseColor:pe.neutralBase,primaryColor:pe.primaryDefault,primaryColorHover:pe.primaryHover,primaryColorPressed:pe.primaryActive,primaryColorSuppl:pe.primarySuppl,infoColor:pe.infoDefault,infoColorHover:pe.infoHover,infoColorPressed:pe.infoActive,infoColorSuppl:pe.infoSuppl,successColor:pe.successDefault,successColorHover:pe.successHover,successColorPressed:pe.successActive,successColorSuppl:pe.successSuppl,warningColor:pe.warningDefault,warningColorHover:pe.warningHover,warningColorPressed:pe.warningActive,warningColorSuppl:pe.warningSuppl,errorColor:pe.errorDefault,errorColorHover:pe.errorHover,errorColorPressed:pe.errorActive,errorColorSuppl:pe.errorSuppl,textColorBase:pe.neutralTextBase,textColor1:"rgb(31, 34, 37)",textColor2:"rgb(51, 54, 57)",textColor3:"rgb(118, 124, 130)",textColorDisabled:nt(pe.alpha4),placeholderColor:nt(pe.alpha4),placeholderColorDisabled:nt(pe.alpha5),iconColor:nt(pe.alpha4),iconColorHover:vr(nt(pe.alpha4),{lightness:.75}),iconColorPressed:vr(nt(pe.alpha4),{lightness:.9}),iconColorDisabled:nt(pe.alpha5),opacity1:pe.alpha1,opacity2:pe.alpha2,opacity3:pe.alpha3,opacity4:pe.alpha4,opacity5:pe.alpha5,dividerColor:"rgb(239, 239, 245)",borderColor:"rgb(224, 224, 230)",closeIconColor:nt(Number(pe.alphaClose)),closeIconColorHover:nt(Number(pe.alphaClose)),closeIconColorPressed:nt(Number(pe.alphaClose)),closeColorHover:"rgba(0, 0, 0, .09)",closeColorPressed:"rgba(0, 0, 0, .13)",clearColor:nt(pe.alpha4),clearColorHover:vr(nt(pe.alpha4),{lightness:.75}),clearColorPressed:vr(nt(pe.alpha4),{lightness:.9}),scrollbarColor:es(pe.alphaScrollbar),scrollbarColorHover:es(pe.alphaScrollbarHover),scrollbarWidth:"5px",scrollbarHeight:"5px",scrollbarBorderRadius:"5px",progressRailColor:nt(pe.alphaProgressRail),railColor:"rgb(219, 219, 223)",popoverColor:pe.neutralPopover,tableColor:pe.neutralCard,cardColor:pe.neutralCard,modalColor:pe.neutralModal,bodyColor:pe.neutralBody,tagColor:"#eee",avatarColor:nt(pe.alphaAvatar),invertedColor:"rgb(0, 20, 40)",inputColor:nt(pe.alphaInput),codeColor:"rgb(244, 244, 248)",tabColor:"rgb(247, 247, 250)",actionColor:"rgb(250, 250, 252)",tableHeaderColor:"rgb(250, 250, 252)",hoverColor:"rgb(243, 243, 245)",tableColorHover:"rgba(0, 0, 100, 0.03)",tableColorStriped:"rgba(0, 0, 100, 0.02)",pressedColor:"rgb(237, 237, 239)",opacityDisabled:pe.alphaDisabled,inputColorDisabled:"rgb(250, 250, 252)",buttonColor2:"rgba(46, 51, 56, .05)",buttonColor2Hover:"rgba(46, 51, 56, .09)",buttonColor2Pressed:"rgba(46, 51, 56, .13)",boxShadow1:"0 1px 2px -2px rgba(0, 0, 0, .08), 0 3px 6px 0 rgba(0, 0, 0, .06), 0 5px 12px 4px rgba(0, 0, 0, .04)",boxShadow2:"0 3px 6px -4px rgba(0, 0, 0, .12), 0 6px 16px 0 rgba(0, 0, 0, .08), 0 9px 28px 8px rgba(0, 0, 0, .05)",boxShadow3:"0 6px 16px -9px rgba(0, 0, 0, .08), 0 9px 28px 0 rgba(0, 0, 0, .05), 0 12px 48px 16px rgba(0, 0, 0, .03)"}),Zg={iconSizeSmall:"34px",iconSizeMedium:"40px",iconSizeLarge:"46px",iconSizeHuge:"52px"};function Jg(e){const{textColorDisabled:t,iconColor:n,textColor2:o,fontSizeSmall:i,fontSizeMedium:a,fontSizeLarge:l,fontSizeHuge:s}=e;return Object.assign(Object.assign({},Zg),{fontSizeSmall:i,fontSizeMedium:a,fontSizeLarge:l,fontSizeHuge:s,textColor:t,iconColor:n,extraTextColor:o})}const ts={name:"Empty",common:et,self:Jg},Qg=y("empty",`
|
|
115
115
|
display: flex;
|
|
116
116
|
flex-direction: column;
|
|
117
117
|
align-items: center;
|
|
118
118
|
font-size: var(--n-font-size);
|
|
119
|
-
`,[
|
|
119
|
+
`,[R("icon",`
|
|
120
120
|
width: var(--n-icon-size);
|
|
121
121
|
height: var(--n-icon-size);
|
|
122
122
|
font-size: var(--n-icon-size);
|
|
@@ -124,37 +124,37 @@ ${t}
|
|
|
124
124
|
color: var(--n-icon-color);
|
|
125
125
|
transition:
|
|
126
126
|
color .3s var(--n-bezier);
|
|
127
|
-
`,[
|
|
127
|
+
`,[V("+",[R("description",`
|
|
128
128
|
margin-top: 8px;
|
|
129
|
-
`)])]),
|
|
129
|
+
`)])]),R("description",`
|
|
130
130
|
transition: color .3s var(--n-bezier);
|
|
131
131
|
color: var(--n-text-color);
|
|
132
|
-
`),
|
|
132
|
+
`),R("extra",`
|
|
133
133
|
text-align: center;
|
|
134
134
|
transition: color .3s var(--n-bezier);
|
|
135
135
|
margin-top: 12px;
|
|
136
136
|
color: var(--n-extra-text-color);
|
|
137
|
-
`)]),
|
|
137
|
+
`)]),em=Object.assign(Object.assign({},Ce.props),{description:String,showDescription:{type:Boolean,default:!0},showIcon:{type:Boolean,default:!0},size:{type:String,default:"medium"},renderIcon:Function}),tm=r.defineComponent({name:"Empty",props:em,setup(e){const{mergedClsPrefixRef:t,inlineThemeDisabled:n}=Je(e),o=Ce("Empty","-empty",Qg,ts,e,t),{localeRef:i}=ar("Empty"),a=r.inject(bn,null),l=r.computed(()=>{var f,u,b;return(f=e.description)!==null&&f!==void 0?f:(b=(u=a==null?void 0:a.mergedComponentPropsRef.value)===null||u===void 0?void 0:u.Empty)===null||b===void 0?void 0:b.description}),s=r.computed(()=>{var f,u;return((u=(f=a==null?void 0:a.mergedComponentPropsRef.value)===null||f===void 0?void 0:f.Empty)===null||u===void 0?void 0:u.renderIcon)||(()=>r.h(dg,null))}),d=r.computed(()=>{const{size:f}=e,{common:{cubicBezierEaseInOut:u},self:{[ee("iconSize",f)]:b,[ee("fontSize",f)]:m,textColor:h,iconColor:x,extraTextColor:w}}=o.value;return{"--n-icon-size":b,"--n-font-size":m,"--n-bezier":u,"--n-text-color":h,"--n-icon-color":x,"--n-extra-text-color":w}}),c=n?tt("empty",r.computed(()=>{let f="";const{size:u}=e;return f+=u[0],f}),d,e):void 0;return{mergedClsPrefix:t,mergedRenderIcon:s,localizedDescription:r.computed(()=>l.value||i.value.description),cssVars:n?void 0:d,themeClass:c==null?void 0:c.themeClass,onRender:c==null?void 0:c.onRender}},render(){const{$slots:e,mergedClsPrefix:t,onRender:n}=this;return n==null||n(),r.h("div",{class:[`${t}-empty`,this.themeClass],style:this.cssVars},this.showIcon?r.h("div",{class:`${t}-empty__icon`},e.icon?e.icon():r.h(gt,{clsPrefix:t},{default:this.mergedRenderIcon})):null,this.showDescription?r.h("div",{class:`${t}-empty__description`},e.default?e.default():this.localizedDescription):null,e.extra?r.h("div",{class:`${t}-empty__extra`},e.extra()):null)}}),nm={railInsetHorizontal:"auto 2px 4px 2px",railInsetVertical:"2px 4px 2px auto",railColor:"transparent"};function rm(e){const{scrollbarColor:t,scrollbarColorHover:n,scrollbarHeight:o,scrollbarWidth:i,scrollbarBorderRadius:a}=e;return Object.assign(Object.assign({},nm),{height:o,width:i,borderRadius:a,color:t,colorHover:n})}const ns={name:"Scrollbar",common:et,self:rm},{cubicBezierEaseInOut:rs}=pn;function om({name:e="fade-in",enterDuration:t="0.2s",leaveDuration:n="0.2s",enterCubicBezier:o=rs,leaveCubicBezier:i=rs}={}){return[V(`&.${e}-transition-enter-active`,{transition:`all ${t} ${o}!important`}),V(`&.${e}-transition-leave-active`,{transition:`all ${n} ${i}!important`}),V(`&.${e}-transition-enter-from, &.${e}-transition-leave-to`,{opacity:0}),V(`&.${e}-transition-leave-from, &.${e}-transition-enter-to`,{opacity:1})]}const im=y("scrollbar",`
|
|
138
138
|
overflow: hidden;
|
|
139
139
|
position: relative;
|
|
140
140
|
z-index: auto;
|
|
141
141
|
height: 100%;
|
|
142
142
|
width: 100%;
|
|
143
|
-
`,[
|
|
143
|
+
`,[V(">",[y("scrollbar-container",`
|
|
144
144
|
width: 100%;
|
|
145
145
|
overflow: scroll;
|
|
146
146
|
height: 100%;
|
|
147
147
|
min-height: inherit;
|
|
148
148
|
max-height: inherit;
|
|
149
149
|
scrollbar-width: none;
|
|
150
|
-
`,[
|
|
150
|
+
`,[V("&::-webkit-scrollbar, &::-webkit-scrollbar-track-piece, &::-webkit-scrollbar-thumb",`
|
|
151
151
|
width: 0;
|
|
152
152
|
height: 0;
|
|
153
153
|
display: none;
|
|
154
|
-
`),
|
|
154
|
+
`),V(">",[y("scrollbar-content",`
|
|
155
155
|
box-sizing: border-box;
|
|
156
156
|
min-width: 100%;
|
|
157
|
-
`)])])]),
|
|
157
|
+
`)])])]),V(">, +",[y("scrollbar-rail",`
|
|
158
158
|
position: absolute;
|
|
159
159
|
pointer-events: none;
|
|
160
160
|
user-select: none;
|
|
@@ -163,25 +163,25 @@ ${t}
|
|
|
163
163
|
`,[W("horizontal",`
|
|
164
164
|
inset: var(--n-scrollbar-rail-inset-horizontal);
|
|
165
165
|
height: var(--n-scrollbar-height);
|
|
166
|
-
`,[
|
|
166
|
+
`,[V(">",[R("scrollbar",`
|
|
167
167
|
height: var(--n-scrollbar-height);
|
|
168
168
|
border-radius: var(--n-scrollbar-border-radius);
|
|
169
169
|
right: 0;
|
|
170
170
|
`)])]),W("vertical",`
|
|
171
171
|
inset: var(--n-scrollbar-rail-inset-vertical);
|
|
172
172
|
width: var(--n-scrollbar-width);
|
|
173
|
-
`,[
|
|
173
|
+
`,[V(">",[R("scrollbar",`
|
|
174
174
|
width: var(--n-scrollbar-width);
|
|
175
175
|
border-radius: var(--n-scrollbar-border-radius);
|
|
176
176
|
bottom: 0;
|
|
177
|
-
`)])]),W("disabled",[
|
|
177
|
+
`)])]),W("disabled",[V(">",[R("scrollbar","pointer-events: none;")])]),V(">",[R("scrollbar",`
|
|
178
178
|
z-index: 1;
|
|
179
179
|
position: absolute;
|
|
180
180
|
cursor: pointer;
|
|
181
181
|
pointer-events: all;
|
|
182
182
|
background-color: var(--n-scrollbar-color);
|
|
183
183
|
transition: background-color .2s var(--n-scrollbar-bezier);
|
|
184
|
-
`,[im(),I("&:hover","background-color: var(--n-scrollbar-color-hover);")])])])])]),lm=Object.assign(Object.assign({},ye.props),{duration:{type:Number,default:0},scrollable:{type:Boolean,default:!0},xScrollable:Boolean,trigger:{type:String,default:"hover"},useUnifiedContainer:Boolean,triggerDisplayManually:Boolean,container:Function,content:Function,containerClass:String,containerStyle:[String,Object],contentClass:[String,Array],contentStyle:[String,Object],horizontalRailStyle:[String,Object],verticalRailStyle:[String,Object],onScroll:Function,onWheel:Function,onResize:Function,internalOnUpdateScrollLeft:Function,internalHoistYRail:Boolean}),hi=o.defineComponent({name:"Scrollbar",props:lm,inheritAttrs:!1,setup(e){const{mergedClsPrefixRef:t,inlineThemeDisabled:n,mergedRtlRef:r}=Ke(e),i=qt("Scrollbar",r,t),a=o.ref(null),l=o.ref(null),s=o.ref(null),d=o.ref(null),c=o.ref(null),f=o.ref(null),u=o.ref(null),p=o.ref(null),m=o.ref(null),h=o.ref(null),v=o.ref(null),w=o.ref(0),g=o.ref(0),P=o.ref(!1),H=o.ref(!1);let $=!1,k=!1,M,b,S=0,E=0,D=0,O=0;const V=Ud(),j=ye("Scrollbar","-scrollbar",am,os,e,t),Q=o.computed(()=>{const{value:x}=p,{value:L}=f,{value:J}=h;return x===null||L===null||J===null?0:Math.min(x,J*x/L+ot(j.value.self.width)*1.5)}),N=o.computed(()=>`${Q.value}px`),Z=o.computed(()=>{const{value:x}=m,{value:L}=u,{value:J}=v;return x===null||L===null||J===null?0:J*x/L+ot(j.value.self.height)*1.5}),X=o.computed(()=>`${Z.value}px`),Y=o.computed(()=>{const{value:x}=p,{value:L}=w,{value:J}=f,{value:ae}=h;if(x===null||J===null||ae===null)return 0;{const se=J-x;return se?L/se*(ae-Q.value):0}}),de=o.computed(()=>`${Y.value}px`),ie=o.computed(()=>{const{value:x}=m,{value:L}=g,{value:J}=u,{value:ae}=v;if(x===null||J===null||ae===null)return 0;{const se=J-x;return se?L/se*(ae-Z.value):0}}),ue=o.computed(()=>`${ie.value}px`),U=o.computed(()=>{const{value:x}=p,{value:L}=f;return x!==null&&L!==null&&L>x}),te=o.computed(()=>{const{value:x}=m,{value:L}=u;return x!==null&&L!==null&&L>x}),ve=o.computed(()=>{const{trigger:x}=e;return x==="none"||P.value}),we=o.computed(()=>{const{trigger:x}=e;return x==="none"||H.value}),re=o.computed(()=>{const{container:x}=e;return x?x():l.value}),Se=o.computed(()=>{const{content:x}=e;return x?x():s.value}),Ce=(x,L)=>{if(!e.scrollable)return;if(typeof x=="number"){Ie(x,L??0,0,!1,"auto");return}const{left:J,top:ae,index:se,elSize:fe,position:he,behavior:ge,el:Te,debounce:ut=!0}=x;(J!==void 0||ae!==void 0)&&Ie(J??0,ae??0,0,!1,ge),Te!==void 0?Ie(0,Te.offsetTop,Te.offsetHeight,ut,ge):se!==void 0&&fe!==void 0?Ie(0,se*fe,fe,ut,ge):he==="bottom"?Ie(0,Number.MAX_SAFE_INTEGER,0,!1,ge):he==="top"&&Ie(0,0,0,!1,ge)},le=Vc(()=>{e.container||Ce({top:w.value,left:g.value})}),Me=()=>{le.isDeactivated||B()},Re=x=>{if(le.isDeactivated)return;const{onResize:L}=e;L&&L(x),B()},Le=(x,L)=>{if(!e.scrollable)return;const{value:J}=re;J&&(typeof x=="object"?J.scrollBy(x):J.scrollBy(x,L||0))};function Ie(x,L,J,ae,se){const{value:fe}=re;if(fe){if(ae){const{scrollTop:he,offsetHeight:ge}=fe;if(L>he){L+J<=he+ge||fe.scrollTo({left:x,top:L+J-ge,behavior:se});return}}fe.scrollTo({left:x,top:L,behavior:se})}}function De(){ne(),_(),B()}function Ue(){ke()}function ke(){q(),A()}function q(){b!==void 0&&window.clearTimeout(b),b=window.setTimeout(()=>{H.value=!1},e.duration)}function A(){M!==void 0&&window.clearTimeout(M),M=window.setTimeout(()=>{P.value=!1},e.duration)}function ne(){M!==void 0&&window.clearTimeout(M),P.value=!0}function _(){b!==void 0&&window.clearTimeout(b),H.value=!0}function F(x){const{onScroll:L}=e;L&&L(x),K()}function K(){const{value:x}=re;x&&(w.value=x.scrollTop,g.value=x.scrollLeft*(i!=null&&i.value?-1:1))}function z(){const{value:x}=Se;x&&(f.value=x.offsetHeight,u.value=x.offsetWidth);const{value:L}=re;L&&(p.value=L.offsetHeight,m.value=L.offsetWidth);const{value:J}=c,{value:ae}=d;J&&(v.value=J.offsetWidth),ae&&(h.value=ae.offsetHeight)}function C(){const{value:x}=re;x&&(w.value=x.scrollTop,g.value=x.scrollLeft*(i!=null&&i.value?-1:1),p.value=x.offsetHeight,m.value=x.offsetWidth,f.value=x.scrollHeight,u.value=x.scrollWidth);const{value:L}=c,{value:J}=d;L&&(v.value=L.offsetWidth),J&&(h.value=J.offsetHeight)}function B(){e.scrollable&&(e.useUnifiedContainer?C():(z(),K()))}function oe(x){var L;return!(!((L=a.value)===null||L===void 0)&&L.contains(kn(x)))}function xe(x){x.preventDefault(),x.stopPropagation(),k=!0,Pe("mousemove",window,ze,!0),Pe("mouseup",window,Ne,!0),E=g.value,D=i!=null&&i.value?window.innerWidth-x.clientX:x.clientX}function ze(x){if(!k)return;M!==void 0&&window.clearTimeout(M),b!==void 0&&window.clearTimeout(b);const{value:L}=m,{value:J}=u,{value:ae}=Z;if(L===null||J===null)return;const fe=(i!=null&&i.value?window.innerWidth-x.clientX-D:x.clientX-D)*(J-L)/(L-ae),he=J-L;let ge=E+fe;ge=Math.min(he,ge),ge=Math.max(ge,0);const{value:Te}=re;if(Te){Te.scrollLeft=ge*(i!=null&&i.value?-1:1);const{internalOnUpdateScrollLeft:ut}=e;ut&&ut(ge)}}function Ne(x){x.preventDefault(),x.stopPropagation(),$e("mousemove",window,ze,!0),$e("mouseup",window,Ne,!0),k=!1,B(),oe(x)&&ke()}function Ae(x){x.preventDefault(),x.stopPropagation(),$=!0,Pe("mousemove",window,_e,!0),Pe("mouseup",window,qe,!0),S=w.value,O=x.clientY}function _e(x){if(!$)return;M!==void 0&&window.clearTimeout(M),b!==void 0&&window.clearTimeout(b);const{value:L}=p,{value:J}=f,{value:ae}=Q;if(L===null||J===null)return;const fe=(x.clientY-O)*(J-L)/(L-ae),he=J-L;let ge=S+fe;ge=Math.min(he,ge),ge=Math.max(ge,0);const{value:Te}=re;Te&&(Te.scrollTop=ge)}function qe(x){x.preventDefault(),x.stopPropagation(),$e("mousemove",window,_e,!0),$e("mouseup",window,qe,!0),$=!1,B(),oe(x)&&ke()}o.watchEffect(()=>{const{value:x}=te,{value:L}=U,{value:J}=t,{value:ae}=c,{value:se}=d;ae&&(x?ae.classList.remove(`${J}-scrollbar-rail--disabled`):ae.classList.add(`${J}-scrollbar-rail--disabled`)),se&&(L?se.classList.remove(`${J}-scrollbar-rail--disabled`):se.classList.add(`${J}-scrollbar-rail--disabled`))}),o.onMounted(()=>{e.container||B()}),o.onBeforeUnmount(()=>{M!==void 0&&window.clearTimeout(M),b!==void 0&&window.clearTimeout(b),$e("mousemove",window,_e,!0),$e("mouseup",window,qe,!0)});const st=o.computed(()=>{const{common:{cubicBezierEaseInOut:x},self:{color:L,colorHover:J,height:ae,width:se,borderRadius:fe,railInsetHorizontal:he,railInsetVertical:ge,railColor:Te}}=j.value;return{"--n-scrollbar-bezier":x,"--n-scrollbar-color":L,"--n-scrollbar-color-hover":J,"--n-scrollbar-border-radius":fe,"--n-scrollbar-width":se,"--n-scrollbar-height":ae,"--n-scrollbar-rail-inset-horizontal":he,"--n-scrollbar-rail-inset-vertical":i!=null&&i.value?cd(ge):ge,"--n-scrollbar-rail-color":Te}}),Je=n?et("scrollbar",void 0,st,e):void 0;return Object.assign(Object.assign({},{scrollTo:Ce,scrollBy:Le,sync:B,syncUnifiedContainer:C,handleMouseEnterWrapper:De,handleMouseLeaveWrapper:Ue}),{mergedClsPrefix:t,rtlEnabled:i,containerScrollTop:w,wrapperRef:a,containerRef:l,contentRef:s,yRailRef:d,xRailRef:c,needYBar:U,needXBar:te,yBarSizePx:N,xBarSizePx:X,yBarTopPx:de,xBarLeftPx:ue,isShowXBar:ve,isShowYBar:we,isIos:V,handleScroll:F,handleContentResize:Me,handleContainerResize:Re,handleYScrollMouseDown:Ae,handleXScrollMouseDown:xe,cssVars:n?void 0:st,themeClass:Je==null?void 0:Je.themeClass,onRender:Je==null?void 0:Je.onRender})},render(){var e;const{$slots:t,mergedClsPrefix:n,triggerDisplayManually:r,rtlEnabled:i,internalHoistYRail:a}=this;if(!this.scrollable)return(e=t.default)===null||e===void 0?void 0:e.call(t);const l=this.trigger==="none",s=(f,u)=>o.h("div",{ref:"yRailRef",class:[`${n}-scrollbar-rail`,`${n}-scrollbar-rail--vertical`,f],"data-scrollbar-rail":!0,style:[u||"",this.verticalRailStyle],"aria-hidden":!0},o.h(l?yr:o.Transition,l?null:{name:"fade-in-transition"},{default:()=>this.needYBar&&this.isShowYBar&&!this.isIos?o.h("div",{class:`${n}-scrollbar-rail__scrollbar`,style:{height:this.yBarSizePx,top:this.yBarTopPx},onMousedown:this.handleYScrollMouseDown}):null})),d=()=>{var f,u;return(f=this.onRender)===null||f===void 0||f.call(this),o.h("div",o.mergeProps(this.$attrs,{role:"none",ref:"wrapperRef",class:[`${n}-scrollbar`,this.themeClass,i&&`${n}-scrollbar--rtl`],style:this.cssVars,onMouseenter:r?void 0:this.handleMouseEnterWrapper,onMouseleave:r?void 0:this.handleMouseLeaveWrapper}),[this.container?(u=t.default)===null||u===void 0?void 0:u.call(t):o.h("div",{role:"none",ref:"containerRef",class:[`${n}-scrollbar-container`,this.containerClass],style:this.containerStyle,onScroll:this.handleScroll,onWheel:this.onWheel},o.h(jt,{onResize:this.handleContentResize},{default:()=>o.h("div",{ref:"contentRef",role:"none",style:[{width:this.xScrollable?"fit-content":null},this.contentStyle],class:[`${n}-scrollbar-content`,this.contentClass]},t)})),a?null:s(void 0,void 0),this.xScrollable&&o.h("div",{ref:"xRailRef",class:[`${n}-scrollbar-rail`,`${n}-scrollbar-rail--horizontal`],style:this.horizontalRailStyle,"data-scrollbar-rail":!0,"aria-hidden":!0},o.h(l?yr:o.Transition,l?null:{name:"fade-in-transition"},{default:()=>this.needXBar&&this.isShowXBar&&!this.isIos?o.h("div",{class:`${n}-scrollbar-rail__scrollbar`,style:{width:this.xBarSizePx,right:i?this.xBarLeftPx:void 0,left:i?void 0:this.xBarLeftPx},onMousedown:this.handleXScrollMouseDown}):null}))])},c=this.container?d():o.h(jt,{onResize:this.handleContainerResize},{default:d});return a?o.h(o.Fragment,null,c,s(this.themeClass,this.cssVars)):c}}),sm=hi,dm={height:"calc(var(--n-option-height) * 7.6)",paddingSmall:"4px 0",paddingMedium:"4px 0",paddingLarge:"4px 0",paddingHuge:"4px 0",optionPaddingSmall:"0 12px",optionPaddingMedium:"0 12px",optionPaddingLarge:"0 12px",optionPaddingHuge:"0 12px",loadingSize:"18px"};function cm(e){const{borderRadius:t,popoverColor:n,textColor3:r,dividerColor:i,textColor2:a,primaryColorPressed:l,textColorDisabled:s,primaryColor:d,opacityDisabled:c,hoverColor:f,fontSizeSmall:u,fontSizeMedium:p,fontSizeLarge:m,fontSizeHuge:h,heightSmall:v,heightMedium:w,heightLarge:g,heightHuge:P}=e;return Object.assign(Object.assign({},dm),{optionFontSizeSmall:u,optionFontSizeMedium:p,optionFontSizeLarge:m,optionFontSizeHuge:h,optionHeightSmall:v,optionHeightMedium:w,optionHeightLarge:g,optionHeightHuge:P,borderRadius:t,color:n,groupHeaderTextColor:r,actionDividerColor:i,optionTextColor:a,optionTextColorPressed:l,optionTextColorDisabled:s,optionTextColorActive:d,optionOpacityDisabled:c,optionCheckColor:d,optionColorPending:f,optionColorActive:"rgba(0, 0, 0, 0)",optionColorActivePending:f,actionTextColor:a,loadingColor:d})}const is={name:"InternalSelectMenu",common:Ye,peers:{Scrollbar:os,Empty:ns},self:cm};function um(e,t){return o.h(o.Transition,{name:"fade-in-scale-up-transition"},{default:()=>e?o.h(bt,{clsPrefix:t,class:`${t}-base-select-option__check`},{default:()=>o.h(lg)}):null})}const as=o.defineComponent({name:"NBaseSelectOption",props:{clsPrefix:{type:String,required:!0},tmNode:{type:Object,required:!0}},setup(e){const{valueRef:t,pendingTmNodeRef:n,multipleRef:r,valueSetRef:i,renderLabelRef:a,renderOptionRef:l,labelFieldRef:s,valueFieldRef:d,showCheckmarkRef:c,nodePropsRef:f,handleOptionClick:u,handleOptionMouseEnter:p}=o.inject($r),m=Xe(()=>{const{value:g}=n;return g?e.tmNode.key===g.key:!1});function h(g){const{tmNode:P}=e;P.disabled||u(g,P)}function v(g){const{tmNode:P}=e;P.disabled||p(g,P)}function w(g){const{tmNode:P}=e,{value:H}=m;P.disabled||H||p(g,P)}return{multiple:r,isGrouped:Xe(()=>{const{tmNode:g}=e,{parent:P}=g;return P&&P.rawNode.type==="group"}),showCheckmark:c,nodeProps:f,isPending:m,isSelected:Xe(()=>{const{value:g}=t,{value:P}=r;if(g===null)return!1;const H=e.tmNode.rawNode[d.value];if(P){const{value:$}=i;return $.has(H)}else return g===H}),labelField:s,renderLabel:a,renderOption:l,handleMouseMove:w,handleMouseEnter:v,handleClick:h}},render(){const{clsPrefix:e,tmNode:{rawNode:t},isSelected:n,isPending:r,isGrouped:i,showCheckmark:a,nodeProps:l,renderOption:s,renderLabel:d,handleClick:c,handleMouseEnter:f,handleMouseMove:u}=this,p=um(n,e),m=d?[d(t,n),a&&p]:[ln(t[this.labelField],t,n),a&&p],h=l==null?void 0:l(t),v=o.h("div",Object.assign({},h,{class:[`${e}-base-select-option`,t.class,h==null?void 0:h.class,{[`${e}-base-select-option--disabled`]:t.disabled,[`${e}-base-select-option--selected`]:n,[`${e}-base-select-option--grouped`]:i,[`${e}-base-select-option--pending`]:r,[`${e}-base-select-option--show-checkmark`]:a}],style:[(h==null?void 0:h.style)||"",t.style||""],onClick:xr([c,h==null?void 0:h.onClick]),onMouseenter:xr([f,h==null?void 0:h.onMouseenter]),onMousemove:xr([u,h==null?void 0:h.onMousemove])}),o.h("div",{class:`${e}-base-select-option__content`},m));return t.render?t.render({node:v,option:t,selected:n}):s?s({node:v,option:t,selected:n}):v}}),ls=o.defineComponent({name:"NBaseSelectGroupHeader",props:{clsPrefix:{type:String,required:!0},tmNode:{type:Object,required:!0}},setup(){const{renderLabelRef:e,renderOptionRef:t,labelFieldRef:n,nodePropsRef:r}=o.inject($r);return{labelField:n,nodeProps:r,renderLabel:e,renderOption:t}},render(){const{clsPrefix:e,renderLabel:t,renderOption:n,nodeProps:r,tmNode:{rawNode:i}}=this,a=r==null?void 0:r(i),l=t?t(i,!1):ln(i[this.labelField],i,!1),s=o.h("div",Object.assign({},a,{class:[`${e}-base-select-group-header`,a==null?void 0:a.class]}),l);return i.render?i.render({node:s,option:i}):n?n({node:s,option:i,selected:!1}):s}}),{cubicBezierEaseIn:ss,cubicBezierEaseOut:ds}=bn;function so({transformOrigin:e="inherit",duration:t=".2s",enterScale:n=".9",originalTransform:r="",originalTransition:i=""}={}){return[I("&.fade-in-scale-up-transition-leave-active",{transformOrigin:e,transition:`opacity ${t} ${ss}, transform ${t} ${ss} ${i&&`,${i}`}`}),I("&.fade-in-scale-up-transition-enter-active",{transformOrigin:e,transition:`opacity ${t} ${ds}, transform ${t} ${ds} ${i&&`,${i}`}`}),I("&.fade-in-scale-up-transition-enter-from, &.fade-in-scale-up-transition-leave-to",{opacity:0,transform:`${r} scale(${n})`}),I("&.fade-in-scale-up-transition-leave-from, &.fade-in-scale-up-transition-enter-to",{opacity:1,transform:`${r} scale(1)`})]}const fm=y("base-select-menu",`
|
|
184
|
+
`,[om(),V("&:hover","background-color: var(--n-scrollbar-color-hover);")])])])])]),am=Object.assign(Object.assign({},Ce.props),{duration:{type:Number,default:0},scrollable:{type:Boolean,default:!0},xScrollable:Boolean,trigger:{type:String,default:"hover"},useUnifiedContainer:Boolean,triggerDisplayManually:Boolean,container:Function,content:Function,containerClass:String,containerStyle:[String,Object],contentClass:[String,Array],contentStyle:[String,Object],horizontalRailStyle:[String,Object],verticalRailStyle:[String,Object],onScroll:Function,onWheel:Function,onResize:Function,internalOnUpdateScrollLeft:Function,internalHoistYRail:Boolean}),pi=r.defineComponent({name:"Scrollbar",props:am,inheritAttrs:!1,setup(e){const{mergedClsPrefixRef:t,inlineThemeDisabled:n,mergedRtlRef:o}=Je(e),i=Kt("Scrollbar",o,t),a=r.ref(null),l=r.ref(null),s=r.ref(null),d=r.ref(null),c=r.ref(null),f=r.ref(null),u=r.ref(null),b=r.ref(null),m=r.ref(null),h=r.ref(null),x=r.ref(null),w=r.ref(0),g=r.ref(0),P=r.ref(!1),L=r.ref(!1);let $=!1,k=!1,M,p,S=0,B=0,F=0,I=0;const D=Nd(),j=Ce("Scrollbar","-scrollbar",im,ns,e,t),Q=r.computed(()=>{const{value:v}=b,{value:H}=f,{value:J}=h;return v===null||H===null||J===null?0:Math.min(v,J*v/H+rt(j.value.self.width)*1.5)}),N=r.computed(()=>`${Q.value}px`),Z=r.computed(()=>{const{value:v}=m,{value:H}=u,{value:J}=x;return v===null||H===null||J===null?0:J*v/H+rt(j.value.self.height)*1.5}),q=r.computed(()=>`${Z.value}px`),Y=r.computed(()=>{const{value:v}=b,{value:H}=w,{value:J}=f,{value:ae}=h;if(v===null||J===null||ae===null)return 0;{const se=J-v;return se?H/se*(ae-Q.value):0}}),de=r.computed(()=>`${Y.value}px`),ie=r.computed(()=>{const{value:v}=m,{value:H}=g,{value:J}=u,{value:ae}=x;if(v===null||J===null||ae===null)return 0;{const se=J-v;return se?H/se*(ae-Z.value):0}}),ce=r.computed(()=>`${ie.value}px`),U=r.computed(()=>{const{value:v}=b,{value:H}=f;return v!==null&&H!==null&&H>v}),te=r.computed(()=>{const{value:v}=m,{value:H}=u;return v!==null&&H!==null&&H>v}),ve=r.computed(()=>{const{trigger:v}=e;return v==="none"||P.value}),ye=r.computed(()=>{const{trigger:v}=e;return v==="none"||L.value}),oe=r.computed(()=>{const{container:v}=e;return v?v():l.value}),Se=r.computed(()=>{const{content:v}=e;return v?v():s.value}),we=(v,H)=>{if(!e.scrollable)return;if(typeof v=="number"){Ie(v,H??0,0,!1,"auto");return}const{left:J,top:ae,index:se,elSize:ue,position:fe,behavior:ge,el:ze,debounce:ct=!0}=v;(J!==void 0||ae!==void 0)&&Ie(J??0,ae??0,0,!1,ge),ze!==void 0?Ie(0,ze.offsetTop,ze.offsetHeight,ct,ge):se!==void 0&&ue!==void 0?Ie(0,se*ue,ue,ct,ge):fe==="bottom"?Ie(0,Number.MAX_SAFE_INTEGER,0,!1,ge):fe==="top"&&Ie(0,0,0,!1,ge)},le=Fc(()=>{e.container||we({top:w.value,left:g.value})}),Me=()=>{le.isDeactivated||_()},Re=v=>{if(le.isDeactivated)return;const{onResize:H}=e;H&&H(v),_()},He=(v,H)=>{if(!e.scrollable)return;const{value:J}=oe;J&&(typeof v=="object"?J.scrollBy(v):J.scrollBy(v,H||0))};function Ie(v,H,J,ae,se){const{value:ue}=oe;if(ue){if(ae){const{scrollTop:fe,offsetHeight:ge}=ue;if(H>fe){H+J<=fe+ge||ue.scrollTo({left:v,top:H+J-ge,behavior:se});return}}ue.scrollTo({left:v,top:H,behavior:se})}}function De(){ne(),E(),_()}function Ue(){ke()}function ke(){X(),O()}function X(){p!==void 0&&window.clearTimeout(p),p=window.setTimeout(()=>{L.value=!1},e.duration)}function O(){M!==void 0&&window.clearTimeout(M),M=window.setTimeout(()=>{P.value=!1},e.duration)}function ne(){M!==void 0&&window.clearTimeout(M),P.value=!0}function E(){p!==void 0&&window.clearTimeout(p),L.value=!0}function A(v){const{onScroll:H}=e;H&&H(v),K()}function K(){const{value:v}=oe;v&&(w.value=v.scrollTop,g.value=v.scrollLeft*(i!=null&&i.value?-1:1))}function T(){const{value:v}=Se;v&&(f.value=v.offsetHeight,u.value=v.offsetWidth);const{value:H}=oe;H&&(b.value=H.offsetHeight,m.value=H.offsetWidth);const{value:J}=c,{value:ae}=d;J&&(x.value=J.offsetWidth),ae&&(h.value=ae.offsetHeight)}function C(){const{value:v}=oe;v&&(w.value=v.scrollTop,g.value=v.scrollLeft*(i!=null&&i.value?-1:1),b.value=v.offsetHeight,m.value=v.offsetWidth,f.value=v.scrollHeight,u.value=v.scrollWidth);const{value:H}=c,{value:J}=d;H&&(x.value=H.offsetWidth),J&&(h.value=J.offsetHeight)}function _(){e.scrollable&&(e.useUnifiedContainer?C():(T(),K()))}function re(v){var H;return!(!((H=a.value)===null||H===void 0)&&H.contains($n(v)))}function xe(v){v.preventDefault(),v.stopPropagation(),k=!0,Pe("mousemove",window,Te,!0),Pe("mouseup",window,Ne,!0),B=g.value,F=i!=null&&i.value?window.innerWidth-v.clientX:v.clientX}function Te(v){if(!k)return;M!==void 0&&window.clearTimeout(M),p!==void 0&&window.clearTimeout(p);const{value:H}=m,{value:J}=u,{value:ae}=Z;if(H===null||J===null)return;const ue=(i!=null&&i.value?window.innerWidth-v.clientX-F:v.clientX-F)*(J-H)/(H-ae),fe=J-H;let ge=B+ue;ge=Math.min(fe,ge),ge=Math.max(ge,0);const{value:ze}=oe;if(ze){ze.scrollLeft=ge*(i!=null&&i.value?-1:1);const{internalOnUpdateScrollLeft:ct}=e;ct&&ct(ge)}}function Ne(v){v.preventDefault(),v.stopPropagation(),$e("mousemove",window,Te,!0),$e("mouseup",window,Ne,!0),k=!1,_(),re(v)&&ke()}function Oe(v){v.preventDefault(),v.stopPropagation(),$=!0,Pe("mousemove",window,Ee,!0),Pe("mouseup",window,Ke,!0),S=w.value,I=v.clientY}function Ee(v){if(!$)return;M!==void 0&&window.clearTimeout(M),p!==void 0&&window.clearTimeout(p);const{value:H}=b,{value:J}=f,{value:ae}=Q;if(H===null||J===null)return;const ue=(v.clientY-I)*(J-H)/(H-ae),fe=J-H;let ge=S+ue;ge=Math.min(fe,ge),ge=Math.max(ge,0);const{value:ze}=oe;ze&&(ze.scrollTop=ge)}function Ke(v){v.preventDefault(),v.stopPropagation(),$e("mousemove",window,Ee,!0),$e("mouseup",window,Ke,!0),$=!1,_(),re(v)&&ke()}r.watchEffect(()=>{const{value:v}=te,{value:H}=U,{value:J}=t,{value:ae}=c,{value:se}=d;ae&&(v?ae.classList.remove(`${J}-scrollbar-rail--disabled`):ae.classList.add(`${J}-scrollbar-rail--disabled`)),se&&(H?se.classList.remove(`${J}-scrollbar-rail--disabled`):se.classList.add(`${J}-scrollbar-rail--disabled`))}),r.onMounted(()=>{e.container||_()}),r.onBeforeUnmount(()=>{M!==void 0&&window.clearTimeout(M),p!==void 0&&window.clearTimeout(p),$e("mousemove",window,Ee,!0),$e("mouseup",window,Ke,!0)});const lt=r.computed(()=>{const{common:{cubicBezierEaseInOut:v},self:{color:H,colorHover:J,height:ae,width:se,borderRadius:ue,railInsetHorizontal:fe,railInsetVertical:ge,railColor:ze}}=j.value;return{"--n-scrollbar-bezier":v,"--n-scrollbar-color":H,"--n-scrollbar-color-hover":J,"--n-scrollbar-border-radius":ue,"--n-scrollbar-width":se,"--n-scrollbar-height":ae,"--n-scrollbar-rail-inset-horizontal":fe,"--n-scrollbar-rail-inset-vertical":i!=null&&i.value?ld(ge):ge,"--n-scrollbar-rail-color":ze}}),Ye=n?tt("scrollbar",void 0,lt,e):void 0;return Object.assign(Object.assign({},{scrollTo:we,scrollBy:He,sync:_,syncUnifiedContainer:C,handleMouseEnterWrapper:De,handleMouseLeaveWrapper:Ue}),{mergedClsPrefix:t,rtlEnabled:i,containerScrollTop:w,wrapperRef:a,containerRef:l,contentRef:s,yRailRef:d,xRailRef:c,needYBar:U,needXBar:te,yBarSizePx:N,xBarSizePx:q,yBarTopPx:de,xBarLeftPx:ce,isShowXBar:ve,isShowYBar:ye,isIos:D,handleScroll:A,handleContentResize:Me,handleContainerResize:Re,handleYScrollMouseDown:Oe,handleXScrollMouseDown:xe,cssVars:n?void 0:lt,themeClass:Ye==null?void 0:Ye.themeClass,onRender:Ye==null?void 0:Ye.onRender})},render(){var e;const{$slots:t,mergedClsPrefix:n,triggerDisplayManually:o,rtlEnabled:i,internalHoistYRail:a}=this;if(!this.scrollable)return(e=t.default)===null||e===void 0?void 0:e.call(t);const l=this.trigger==="none",s=(f,u)=>r.h("div",{ref:"yRailRef",class:[`${n}-scrollbar-rail`,`${n}-scrollbar-rail--vertical`,f],"data-scrollbar-rail":!0,style:[u||"",this.verticalRailStyle],"aria-hidden":!0},r.h(l?wo:r.Transition,l?null:{name:"fade-in-transition"},{default:()=>this.needYBar&&this.isShowYBar&&!this.isIos?r.h("div",{class:`${n}-scrollbar-rail__scrollbar`,style:{height:this.yBarSizePx,top:this.yBarTopPx},onMousedown:this.handleYScrollMouseDown}):null})),d=()=>{var f,u;return(f=this.onRender)===null||f===void 0||f.call(this),r.h("div",r.mergeProps(this.$attrs,{role:"none",ref:"wrapperRef",class:[`${n}-scrollbar`,this.themeClass,i&&`${n}-scrollbar--rtl`],style:this.cssVars,onMouseenter:o?void 0:this.handleMouseEnterWrapper,onMouseleave:o?void 0:this.handleMouseLeaveWrapper}),[this.container?(u=t.default)===null||u===void 0?void 0:u.call(t):r.h("div",{role:"none",ref:"containerRef",class:[`${n}-scrollbar-container`,this.containerClass],style:this.containerStyle,onScroll:this.handleScroll,onWheel:this.onWheel},r.h(Wt,{onResize:this.handleContentResize},{default:()=>r.h("div",{ref:"contentRef",role:"none",style:[{width:this.xScrollable?"fit-content":null},this.contentStyle],class:[`${n}-scrollbar-content`,this.contentClass]},t)})),a?null:s(void 0,void 0),this.xScrollable&&r.h("div",{ref:"xRailRef",class:[`${n}-scrollbar-rail`,`${n}-scrollbar-rail--horizontal`],style:this.horizontalRailStyle,"data-scrollbar-rail":!0,"aria-hidden":!0},r.h(l?wo:r.Transition,l?null:{name:"fade-in-transition"},{default:()=>this.needXBar&&this.isShowXBar&&!this.isIos?r.h("div",{class:`${n}-scrollbar-rail__scrollbar`,style:{width:this.xBarSizePx,right:i?this.xBarLeftPx:void 0,left:i?void 0:this.xBarLeftPx},onMousedown:this.handleXScrollMouseDown}):null}))])},c=this.container?d():r.h(Wt,{onResize:this.handleContainerResize},{default:d});return a?r.h(r.Fragment,null,c,s(this.themeClass,this.cssVars)):c}}),lm=pi,sm={height:"calc(var(--n-option-height) * 7.6)",paddingSmall:"4px 0",paddingMedium:"4px 0",paddingLarge:"4px 0",paddingHuge:"4px 0",optionPaddingSmall:"0 12px",optionPaddingMedium:"0 12px",optionPaddingLarge:"0 12px",optionPaddingHuge:"0 12px",loadingSize:"18px"};function dm(e){const{borderRadius:t,popoverColor:n,textColor3:o,dividerColor:i,textColor2:a,primaryColorPressed:l,textColorDisabled:s,primaryColor:d,opacityDisabled:c,hoverColor:f,fontSizeSmall:u,fontSizeMedium:b,fontSizeLarge:m,fontSizeHuge:h,heightSmall:x,heightMedium:w,heightLarge:g,heightHuge:P}=e;return Object.assign(Object.assign({},sm),{optionFontSizeSmall:u,optionFontSizeMedium:b,optionFontSizeLarge:m,optionFontSizeHuge:h,optionHeightSmall:x,optionHeightMedium:w,optionHeightLarge:g,optionHeightHuge:P,borderRadius:t,color:n,groupHeaderTextColor:o,actionDividerColor:i,optionTextColor:a,optionTextColorPressed:l,optionTextColorDisabled:s,optionTextColorActive:d,optionOpacityDisabled:c,optionCheckColor:d,optionColorPending:f,optionColorActive:"rgba(0, 0, 0, 0)",optionColorActivePending:f,actionTextColor:a,loadingColor:d})}const os={name:"InternalSelectMenu",common:et,peers:{Scrollbar:ns,Empty:ts},self:dm};function cm(e,t){return r.h(r.Transition,{name:"fade-in-scale-up-transition"},{default:()=>e?r.h(gt,{clsPrefix:t,class:`${t}-base-select-option__check`},{default:()=>r.h(ig)}):null})}const is=r.defineComponent({name:"NBaseSelectOption",props:{clsPrefix:{type:String,required:!0},tmNode:{type:Object,required:!0}},setup(e){const{valueRef:t,pendingTmNodeRef:n,multipleRef:o,valueSetRef:i,renderLabelRef:a,renderOptionRef:l,labelFieldRef:s,valueFieldRef:d,showCheckmarkRef:c,nodePropsRef:f,handleOptionClick:u,handleOptionMouseEnter:b}=r.inject(ko),m=Xe(()=>{const{value:g}=n;return g?e.tmNode.key===g.key:!1});function h(g){const{tmNode:P}=e;P.disabled||u(g,P)}function x(g){const{tmNode:P}=e;P.disabled||b(g,P)}function w(g){const{tmNode:P}=e,{value:L}=m;P.disabled||L||b(g,P)}return{multiple:o,isGrouped:Xe(()=>{const{tmNode:g}=e,{parent:P}=g;return P&&P.rawNode.type==="group"}),showCheckmark:c,nodeProps:f,isPending:m,isSelected:Xe(()=>{const{value:g}=t,{value:P}=o;if(g===null)return!1;const L=e.tmNode.rawNode[d.value];if(P){const{value:$}=i;return $.has(L)}else return g===L}),labelField:s,renderLabel:a,renderOption:l,handleMouseMove:w,handleMouseEnter:x,handleClick:h}},render(){const{clsPrefix:e,tmNode:{rawNode:t},isSelected:n,isPending:o,isGrouped:i,showCheckmark:a,nodeProps:l,renderOption:s,renderLabel:d,handleClick:c,handleMouseEnter:f,handleMouseMove:u}=this,b=cm(n,e),m=d?[d(t,n),a&&b]:[an(t[this.labelField],t,n),a&&b],h=l==null?void 0:l(t),x=r.h("div",Object.assign({},h,{class:[`${e}-base-select-option`,t.class,h==null?void 0:h.class,{[`${e}-base-select-option--disabled`]:t.disabled,[`${e}-base-select-option--selected`]:n,[`${e}-base-select-option--grouped`]:i,[`${e}-base-select-option--pending`]:o,[`${e}-base-select-option--show-checkmark`]:a}],style:[(h==null?void 0:h.style)||"",t.style||""],onClick:yo([c,h==null?void 0:h.onClick]),onMouseenter:yo([f,h==null?void 0:h.onMouseenter]),onMousemove:yo([u,h==null?void 0:h.onMousemove])}),r.h("div",{class:`${e}-base-select-option__content`},m));return t.render?t.render({node:x,option:t,selected:n}):s?s({node:x,option:t,selected:n}):x}}),as=r.defineComponent({name:"NBaseSelectGroupHeader",props:{clsPrefix:{type:String,required:!0},tmNode:{type:Object,required:!0}},setup(){const{renderLabelRef:e,renderOptionRef:t,labelFieldRef:n,nodePropsRef:o}=r.inject(ko);return{labelField:n,nodeProps:o,renderLabel:e,renderOption:t}},render(){const{clsPrefix:e,renderLabel:t,renderOption:n,nodeProps:o,tmNode:{rawNode:i}}=this,a=o==null?void 0:o(i),l=t?t(i,!1):an(i[this.labelField],i,!1),s=r.h("div",Object.assign({},a,{class:[`${e}-base-select-group-header`,a==null?void 0:a.class]}),l);return i.render?i.render({node:s,option:i}):n?n({node:s,option:i,selected:!1}):s}}),{cubicBezierEaseIn:ls,cubicBezierEaseOut:ss}=pn;function lr({transformOrigin:e="inherit",duration:t=".2s",enterScale:n=".9",originalTransform:o="",originalTransition:i=""}={}){return[V("&.fade-in-scale-up-transition-leave-active",{transformOrigin:e,transition:`opacity ${t} ${ls}, transform ${t} ${ls} ${i&&`,${i}`}`}),V("&.fade-in-scale-up-transition-enter-active",{transformOrigin:e,transition:`opacity ${t} ${ss}, transform ${t} ${ss} ${i&&`,${i}`}`}),V("&.fade-in-scale-up-transition-enter-from, &.fade-in-scale-up-transition-leave-to",{opacity:0,transform:`${o} scale(${n})`}),V("&.fade-in-scale-up-transition-leave-from, &.fade-in-scale-up-transition-enter-to",{opacity:1,transform:`${o} scale(1)`})]}const um=y("base-select-menu",`
|
|
185
185
|
line-height: 1.5;
|
|
186
186
|
outline: none;
|
|
187
187
|
z-index: 0;
|
|
@@ -200,7 +200,7 @@ ${t}
|
|
|
200
200
|
font-size: var(--n-option-font-size);
|
|
201
201
|
display: flex;
|
|
202
202
|
align-items: center;
|
|
203
|
-
`,[
|
|
203
|
+
`,[R("content",`
|
|
204
204
|
z-index: 1;
|
|
205
205
|
white-space: nowrap;
|
|
206
206
|
text-overflow: ellipsis;
|
|
@@ -213,15 +213,15 @@ ${t}
|
|
|
213
213
|
`),y("base-select-menu-option-wrapper",`
|
|
214
214
|
position: relative;
|
|
215
215
|
width: 100%;
|
|
216
|
-
`),
|
|
216
|
+
`),R("loading, empty",`
|
|
217
217
|
display: flex;
|
|
218
218
|
padding: 12px 32px;
|
|
219
219
|
flex: 1;
|
|
220
220
|
justify-content: center;
|
|
221
|
-
`),
|
|
221
|
+
`),R("loading",`
|
|
222
222
|
color: var(--n-loading-color);
|
|
223
223
|
font-size: var(--n-loading-size);
|
|
224
|
-
`),
|
|
224
|
+
`),R("header",`
|
|
225
225
|
padding: 8px var(--n-option-padding-left);
|
|
226
226
|
font-size: var(--n-option-font-size);
|
|
227
227
|
transition:
|
|
@@ -229,7 +229,7 @@ ${t}
|
|
|
229
229
|
border-color .3s var(--n-bezier);
|
|
230
230
|
border-bottom: 1px solid var(--n-action-divider-color);
|
|
231
231
|
color: var(--n-action-text-color);
|
|
232
|
-
`),
|
|
232
|
+
`),R("action",`
|
|
233
233
|
padding: 8px var(--n-option-padding-left);
|
|
234
234
|
font-size: var(--n-option-font-size);
|
|
235
235
|
transition:
|
|
@@ -254,7 +254,7 @@ ${t}
|
|
|
254
254
|
opacity: 1;
|
|
255
255
|
`,[W("show-checkmark",`
|
|
256
256
|
padding-right: calc(var(--n-option-padding-right) + 20px);
|
|
257
|
-
`),
|
|
257
|
+
`),V("&::before",`
|
|
258
258
|
content: "";
|
|
259
259
|
position: absolute;
|
|
260
260
|
left: 4px;
|
|
@@ -263,17 +263,17 @@ ${t}
|
|
|
263
263
|
bottom: 0;
|
|
264
264
|
border-radius: var(--n-border-radius);
|
|
265
265
|
transition: background-color .3s var(--n-bezier);
|
|
266
|
-
`),
|
|
266
|
+
`),V("&:active",`
|
|
267
267
|
color: var(--n-option-text-color-pressed);
|
|
268
268
|
`),W("grouped",`
|
|
269
269
|
padding-left: calc(var(--n-option-padding-left) * 1.5);
|
|
270
|
-
`),W("pending",[
|
|
270
|
+
`),W("pending",[V("&::before",`
|
|
271
271
|
background-color: var(--n-option-color-pending);
|
|
272
272
|
`)]),W("selected",`
|
|
273
273
|
color: var(--n-option-text-color-active);
|
|
274
|
-
`,[
|
|
274
|
+
`,[V("&::before",`
|
|
275
275
|
background-color: var(--n-option-color-active);
|
|
276
|
-
`),W("pending",[
|
|
276
|
+
`),W("pending",[V("&::before",`
|
|
277
277
|
background-color: var(--n-option-color-active-pending);
|
|
278
278
|
`)])]),W("disabled",`
|
|
279
279
|
cursor: not-allowed;
|
|
@@ -281,21 +281,21 @@ ${t}
|
|
|
281
281
|
color: var(--n-option-text-color-disabled);
|
|
282
282
|
`),W("selected",`
|
|
283
283
|
opacity: var(--n-option-opacity-disabled);
|
|
284
|
-
`)]),
|
|
284
|
+
`)]),R("check",`
|
|
285
285
|
font-size: 16px;
|
|
286
286
|
position: absolute;
|
|
287
287
|
right: calc(var(--n-option-padding-right) - 4px);
|
|
288
288
|
top: calc(50% - 7px);
|
|
289
289
|
color: var(--n-option-check-color);
|
|
290
290
|
transition: color .3s var(--n-bezier);
|
|
291
|
-
`,[
|
|
291
|
+
`,[lr({enterScale:"0.5"})])])]),fm=r.defineComponent({name:"InternalSelectMenu",props:Object.assign(Object.assign({},Ce.props),{clsPrefix:{type:String,required:!0},scrollable:{type:Boolean,default:!0},treeMate:{type:Object,required:!0},multiple:Boolean,size:{type:String,default:"medium"},value:{type:[String,Number,Array],default:null},autoPending:Boolean,virtualScroll:{type:Boolean,default:!0},show:{type:Boolean,default:!0},labelField:{type:String,default:"label"},valueField:{type:String,default:"value"},loading:Boolean,focusable:Boolean,renderLabel:Function,renderOption:Function,nodeProps:Function,showCheckmark:{type:Boolean,default:!0},onMousedown:Function,onScroll:Function,onFocus:Function,onBlur:Function,onKeyup:Function,onKeydown:Function,onTabOut:Function,onMouseenter:Function,onMouseleave:Function,onResize:Function,resetMenuOnOptionsChange:{type:Boolean,default:!0},inlineThemeDisabled:Boolean,onToggle:Function}),setup(e){const{mergedClsPrefixRef:t,mergedRtlRef:n}=Je(e),o=Kt("InternalSelectMenu",n,t),i=Ce("InternalSelectMenu","-internal-select-menu",um,os,e,r.toRef(e,"clsPrefix")),a=r.ref(null),l=r.ref(null),s=r.ref(null),d=r.computed(()=>e.treeMate.getFlattenedNodes()),c=r.computed(()=>Og(d.value)),f=r.ref(null);function u(){const{treeMate:U}=e;let te=null;const{value:ve}=e;ve===null?te=U.getFirstAvailableNode():(e.multiple?te=U.getNode((ve||[])[(ve||[]).length-1]):te=U.getNode(ve),(!te||te.disabled)&&(te=U.getFirstAvailableNode())),Q(te||null)}function b(){const{value:U}=f;U&&!e.treeMate.getNode(U.key)&&(f.value=null)}let m;r.watch(()=>e.show,U=>{U?m=r.watch(()=>e.treeMate,()=>{e.resetMenuOnOptionsChange?(e.autoPending?u():b(),r.nextTick(N)):b()},{immediate:!0}):m==null||m()},{immediate:!0}),r.onBeforeUnmount(()=>{m==null||m()});const h=r.computed(()=>rt(i.value.self[ee("optionHeight",e.size)])),x=r.computed(()=>st(i.value.self[ee("padding",e.size)])),w=r.computed(()=>e.multiple&&Array.isArray(e.value)?new Set(e.value):new Set),g=r.computed(()=>{const U=d.value;return U&&U.length===0});function P(U){const{onToggle:te}=e;te&&te(U)}function L(U){const{onScroll:te}=e;te&&te(U)}function $(U){var te;(te=s.value)===null||te===void 0||te.sync(),L(U)}function k(){var U;(U=s.value)===null||U===void 0||U.sync()}function M(){const{value:U}=f;return U||null}function p(U,te){te.disabled||Q(te,!1)}function S(U,te){te.disabled||P(te)}function B(U){var te;Wn(U,"action")||(te=e.onKeyup)===null||te===void 0||te.call(e,U)}function F(U){var te;Wn(U,"action")||(te=e.onKeydown)===null||te===void 0||te.call(e,U)}function I(U){var te;(te=e.onMousedown)===null||te===void 0||te.call(e,U),!e.focusable&&U.preventDefault()}function D(){const{value:U}=f;U&&Q(U.getNext({loop:!0}),!0)}function j(){const{value:U}=f;U&&Q(U.getPrev({loop:!0}),!0)}function Q(U,te=!1){f.value=U,te&&N()}function N(){var U,te;const ve=f.value;if(!ve)return;const ye=c.value(ve.key);ye!==null&&(e.virtualScroll?(U=l.value)===null||U===void 0||U.scrollTo({index:ye}):(te=s.value)===null||te===void 0||te.scrollTo({index:ye,elSize:h.value}))}function Z(U){var te,ve;!((te=a.value)===null||te===void 0)&&te.contains(U.target)&&((ve=e.onFocus)===null||ve===void 0||ve.call(e,U))}function q(U){var te,ve;!((te=a.value)===null||te===void 0)&&te.contains(U.relatedTarget)||(ve=e.onBlur)===null||ve===void 0||ve.call(e,U)}r.provide(ko,{handleOptionMouseEnter:p,handleOptionClick:S,valueSetRef:w,pendingTmNodeRef:f,nodePropsRef:r.toRef(e,"nodeProps"),showCheckmarkRef:r.toRef(e,"showCheckmark"),multipleRef:r.toRef(e,"multiple"),valueRef:r.toRef(e,"value"),renderLabelRef:r.toRef(e,"renderLabel"),renderOptionRef:r.toRef(e,"renderOption"),labelFieldRef:r.toRef(e,"labelField"),valueFieldRef:r.toRef(e,"valueField")}),r.provide(sa,a),r.onMounted(()=>{const{value:U}=s;U&&U.sync()});const Y=r.computed(()=>{const{size:U}=e,{common:{cubicBezierEaseInOut:te},self:{height:ve,borderRadius:ye,color:oe,groupHeaderTextColor:Se,actionDividerColor:we,optionTextColorPressed:le,optionTextColor:Me,optionTextColorDisabled:Re,optionTextColorActive:He,optionOpacityDisabled:Ie,optionCheckColor:De,actionTextColor:Ue,optionColorPending:ke,optionColorActive:X,loadingColor:O,loadingSize:ne,optionColorActivePending:E,[ee("optionFontSize",U)]:A,[ee("optionHeight",U)]:K,[ee("optionPadding",U)]:T}}=i.value;return{"--n-height":ve,"--n-action-divider-color":we,"--n-action-text-color":Ue,"--n-bezier":te,"--n-border-radius":ye,"--n-color":oe,"--n-option-font-size":A,"--n-group-header-text-color":Se,"--n-option-check-color":De,"--n-option-color-pending":ke,"--n-option-color-active":X,"--n-option-color-active-pending":E,"--n-option-height":K,"--n-option-opacity-disabled":Ie,"--n-option-text-color":Me,"--n-option-text-color-active":He,"--n-option-text-color-disabled":Re,"--n-option-text-color-pressed":le,"--n-option-padding":T,"--n-option-padding-left":st(T,"left"),"--n-option-padding-right":st(T,"right"),"--n-loading-color":O,"--n-loading-size":ne}}),{inlineThemeDisabled:de}=e,ie=de?tt("internal-select-menu",r.computed(()=>e.size[0]),Y,e):void 0,ce={selfRef:a,next:D,prev:j,getPendingTmNode:M};return ja(a,e.onResize),Object.assign({mergedTheme:i,mergedClsPrefix:t,rtlEnabled:o,virtualListRef:l,scrollbarRef:s,itemSize:h,padding:x,flattenedNodes:d,empty:g,virtualListContainer(){const{value:U}=l;return U==null?void 0:U.listElRef},virtualListContent(){const{value:U}=l;return U==null?void 0:U.itemsElRef},doScroll:L,handleFocusin:Z,handleFocusout:q,handleKeyUp:B,handleKeyDown:F,handleMouseDown:I,handleVirtualListResize:k,handleVirtualListScroll:$,cssVars:de?void 0:Y,themeClass:ie==null?void 0:ie.themeClass,onRender:ie==null?void 0:ie.onRender},ce)},render(){const{$slots:e,virtualScroll:t,clsPrefix:n,mergedTheme:o,themeClass:i,onRender:a}=this;return a==null||a(),r.h("div",{ref:"selfRef",tabindex:this.focusable?0:-1,class:[`${n}-base-select-menu`,this.rtlEnabled&&`${n}-base-select-menu--rtl`,i,this.multiple&&`${n}-base-select-menu--multiple`],style:this.cssVars,onFocusin:this.handleFocusin,onFocusout:this.handleFocusout,onKeyup:this.handleKeyUp,onKeydown:this.handleKeyDown,onMousedown:this.handleMouseDown,onMouseenter:this.onMouseenter,onMouseleave:this.onMouseleave},Ae(e.header,l=>l&&r.h("div",{class:`${n}-base-select-menu__header`,"data-header":!0,key:"header"},l)),this.loading?r.h("div",{class:`${n}-base-select-menu__loading`},r.h(Zr,{clsPrefix:n,strokeWidth:20})):this.empty?r.h("div",{class:`${n}-base-select-menu__empty`,"data-empty":!0},Ct(e.empty,()=>[r.h(tm,{theme:o.peers.Empty,themeOverrides:o.peerOverrides.Empty})])):r.h(pi,{ref:"scrollbarRef",theme:o.peers.Scrollbar,themeOverrides:o.peerOverrides.Scrollbar,scrollable:this.scrollable,container:t?this.virtualListContainer:void 0,content:t?this.virtualListContent:void 0,onScroll:t?void 0:this.doScroll},{default:()=>t?r.h(Ec,{ref:"virtualListRef",class:`${n}-virtual-list`,items:this.flattenedNodes,itemSize:this.itemSize,showScrollbar:!1,paddingTop:this.padding.top,paddingBottom:this.padding.bottom,onResize:this.handleVirtualListResize,onScroll:this.handleVirtualListScroll,itemResizable:!0},{default:({item:l})=>l.isGroup?r.h(as,{key:l.key,clsPrefix:n,tmNode:l}):l.ignored?null:r.h(is,{clsPrefix:n,key:l.key,tmNode:l})}):r.h("div",{class:`${n}-base-select-menu-option-wrapper`,style:{paddingTop:this.padding.top,paddingBottom:this.padding.bottom}},this.flattenedNodes.map(l=>l.isGroup?r.h(as,{key:l.key,clsPrefix:n,tmNode:l}):r.h(is,{clsPrefix:n,key:l.key,tmNode:l})))}),Ae(e.action,l=>l&&[r.h("div",{class:`${n}-base-select-menu__action`,"data-action":!0,key:"action"},l),r.h(xg,{onFocus:this.onTabOut,key:"focus-detector"})]))}}),hm=y("base-wave",`
|
|
292
292
|
position: absolute;
|
|
293
293
|
left: 0;
|
|
294
294
|
right: 0;
|
|
295
295
|
top: 0;
|
|
296
296
|
bottom: 0;
|
|
297
297
|
border-radius: inherit;
|
|
298
|
-
`),
|
|
298
|
+
`),pm=r.defineComponent({name:"BaseWave",props:{clsPrefix:{type:String,required:!0}},setup(e){gn("-base-wave",hm,r.toRef(e,"clsPrefix"));const t=r.ref(null),n=r.ref(!1);let o=null;return r.onBeforeUnmount(()=>{o!==null&&window.clearTimeout(o)}),{active:n,selfRef:t,play(){o!==null&&(window.clearTimeout(o),n.value=!1,o=null),r.nextTick(()=>{var i;(i=t.value)===null||i===void 0||i.offsetHeight,n.value=!0,o=window.setTimeout(()=>{n.value=!1,o=null},1e3)})}}},render(){const{clsPrefix:e}=this;return r.h("div",{ref:"selfRef","aria-hidden":!0,class:[`${e}-base-wave`,this.active&&`${e}-base-wave--active`]})}}),bm={space:"6px",spaceArrow:"10px",arrowOffset:"10px",arrowOffsetVertical:"10px",arrowHeight:"6px",padding:"8px 14px"};function gm(e){const{boxShadow2:t,popoverColor:n,textColor2:o,borderRadius:i,fontSize:a,dividerColor:l}=e;return Object.assign(Object.assign({},bm),{fontSize:a,borderRadius:i,color:n,dividerColor:l,textColor:o,boxShadow:t})}const bi={name:"Popover",common:et,self:gm},gi={top:"bottom",bottom:"top",left:"right",right:"left"},qe="var(--n-arrow-height) * 1.414",mm=V([y("popover",`
|
|
299
299
|
transition:
|
|
300
300
|
box-shadow .3s var(--n-bezier),
|
|
301
301
|
background-color .3s var(--n-bezier),
|
|
@@ -305,21 +305,21 @@ ${t}
|
|
|
305
305
|
color: var(--n-text-color);
|
|
306
306
|
box-shadow: var(--n-box-shadow);
|
|
307
307
|
word-break: break-word;
|
|
308
|
-
`,[
|
|
308
|
+
`,[V(">",[y("scrollbar",`
|
|
309
309
|
height: inherit;
|
|
310
310
|
max-height: inherit;
|
|
311
311
|
`)]),je("raw",`
|
|
312
312
|
background-color: var(--n-color);
|
|
313
313
|
border-radius: var(--n-border-radius);
|
|
314
|
-
`,[je("scrollable",[je("show-header-or-footer","padding: var(--n-padding);")])]),
|
|
314
|
+
`,[je("scrollable",[je("show-header-or-footer","padding: var(--n-padding);")])]),R("header",`
|
|
315
315
|
padding: var(--n-padding);
|
|
316
316
|
border-bottom: 1px solid var(--n-divider-color);
|
|
317
317
|
transition: border-color .3s var(--n-bezier);
|
|
318
|
-
`),
|
|
318
|
+
`),R("footer",`
|
|
319
319
|
padding: var(--n-padding);
|
|
320
320
|
border-top: 1px solid var(--n-divider-color);
|
|
321
321
|
transition: border-color .3s var(--n-bezier);
|
|
322
|
-
`),W("scrollable, show-header-or-footer",[
|
|
322
|
+
`),W("scrollable, show-header-or-footer",[R("content",`
|
|
323
323
|
padding: var(--n-padding);
|
|
324
324
|
`)])]),y("popover-shared",`
|
|
325
325
|
transform-origin: inherit;
|
|
@@ -331,87 +331,87 @@ ${t}
|
|
|
331
331
|
transition: background-color .3s var(--n-bezier);
|
|
332
332
|
position: absolute;
|
|
333
333
|
display: block;
|
|
334
|
-
width: calc(${
|
|
335
|
-
height: calc(${
|
|
334
|
+
width: calc(${qe});
|
|
335
|
+
height: calc(${qe});
|
|
336
336
|
box-shadow: 0 0 8px 0 rgba(0, 0, 0, .12);
|
|
337
337
|
transform: rotate(45deg);
|
|
338
338
|
background-color: var(--n-color);
|
|
339
339
|
pointer-events: all;
|
|
340
|
-
`)]),
|
|
340
|
+
`)]),V("&.popover-transition-enter-from, &.popover-transition-leave-to",`
|
|
341
341
|
opacity: 0;
|
|
342
342
|
transform: scale(.85);
|
|
343
|
-
`),
|
|
343
|
+
`),V("&.popover-transition-enter-to, &.popover-transition-leave-from",`
|
|
344
344
|
transform: scale(1);
|
|
345
345
|
opacity: 1;
|
|
346
|
-
`),
|
|
346
|
+
`),V("&.popover-transition-enter-active",`
|
|
347
347
|
transition:
|
|
348
348
|
box-shadow .3s var(--n-bezier),
|
|
349
349
|
background-color .3s var(--n-bezier),
|
|
350
350
|
color .3s var(--n-bezier),
|
|
351
351
|
opacity .15s var(--n-bezier-ease-out),
|
|
352
352
|
transform .15s var(--n-bezier-ease-out);
|
|
353
|
-
`),
|
|
353
|
+
`),V("&.popover-transition-leave-active",`
|
|
354
354
|
transition:
|
|
355
355
|
box-shadow .3s var(--n-bezier),
|
|
356
356
|
background-color .3s var(--n-bezier),
|
|
357
357
|
color .3s var(--n-bezier),
|
|
358
358
|
opacity .15s var(--n-bezier-ease-in),
|
|
359
359
|
transform .15s var(--n-bezier-ease-in);
|
|
360
|
-
`)]),
|
|
361
|
-
top: calc(${
|
|
360
|
+
`)]),pt("top-start",`
|
|
361
|
+
top: calc(${qe} / -2);
|
|
362
362
|
left: calc(${Mt("top-start")} - var(--v-offset-left));
|
|
363
|
-
`),
|
|
364
|
-
top: calc(${
|
|
365
|
-
transform: translateX(calc(${
|
|
363
|
+
`),pt("top",`
|
|
364
|
+
top: calc(${qe} / -2);
|
|
365
|
+
transform: translateX(calc(${qe} / -2)) rotate(45deg);
|
|
366
366
|
left: 50%;
|
|
367
|
-
`),
|
|
368
|
-
top: calc(${
|
|
367
|
+
`),pt("top-end",`
|
|
368
|
+
top: calc(${qe} / -2);
|
|
369
369
|
right: calc(${Mt("top-end")} + var(--v-offset-left));
|
|
370
|
-
`),
|
|
371
|
-
bottom: calc(${
|
|
370
|
+
`),pt("bottom-start",`
|
|
371
|
+
bottom: calc(${qe} / -2);
|
|
372
372
|
left: calc(${Mt("bottom-start")} - var(--v-offset-left));
|
|
373
|
-
`),
|
|
374
|
-
bottom: calc(${
|
|
375
|
-
transform: translateX(calc(${
|
|
373
|
+
`),pt("bottom",`
|
|
374
|
+
bottom: calc(${qe} / -2);
|
|
375
|
+
transform: translateX(calc(${qe} / -2)) rotate(45deg);
|
|
376
376
|
left: 50%;
|
|
377
|
-
`),
|
|
378
|
-
bottom: calc(${
|
|
377
|
+
`),pt("bottom-end",`
|
|
378
|
+
bottom: calc(${qe} / -2);
|
|
379
379
|
right: calc(${Mt("bottom-end")} + var(--v-offset-left));
|
|
380
|
-
`),
|
|
381
|
-
left: calc(${
|
|
380
|
+
`),pt("left-start",`
|
|
381
|
+
left: calc(${qe} / -2);
|
|
382
382
|
top: calc(${Mt("left-start")} - var(--v-offset-top));
|
|
383
|
-
`),
|
|
384
|
-
left: calc(${
|
|
385
|
-
transform: translateY(calc(${
|
|
383
|
+
`),pt("left",`
|
|
384
|
+
left: calc(${qe} / -2);
|
|
385
|
+
transform: translateY(calc(${qe} / -2)) rotate(45deg);
|
|
386
386
|
top: 50%;
|
|
387
|
-
`),
|
|
388
|
-
left: calc(${
|
|
387
|
+
`),pt("left-end",`
|
|
388
|
+
left: calc(${qe} / -2);
|
|
389
389
|
bottom: calc(${Mt("left-end")} + var(--v-offset-top));
|
|
390
|
-
`),
|
|
391
|
-
right: calc(${
|
|
390
|
+
`),pt("right-start",`
|
|
391
|
+
right: calc(${qe} / -2);
|
|
392
392
|
top: calc(${Mt("right-start")} - var(--v-offset-top));
|
|
393
|
-
`),
|
|
394
|
-
right: calc(${
|
|
395
|
-
transform: translateY(calc(${
|
|
393
|
+
`),pt("right",`
|
|
394
|
+
right: calc(${qe} / -2);
|
|
395
|
+
transform: translateY(calc(${qe} / -2)) rotate(45deg);
|
|
396
396
|
top: 50%;
|
|
397
|
-
`),
|
|
398
|
-
right: calc(${
|
|
397
|
+
`),pt("right-end",`
|
|
398
|
+
right: calc(${qe} / -2);
|
|
399
399
|
bottom: calc(${Mt("right-end")} + var(--v-offset-top));
|
|
400
|
-
`),...
|
|
401
|
-
margin-${
|
|
400
|
+
`),...vb({top:["right-start","left-start"],right:["top-end","bottom-end"],bottom:["right-end","left-end"],left:["top-start","bottom-start"]},(e,t)=>{const n=["right","left"].includes(t),o=n?"width":"height";return e.map(i=>{const a=i.split("-")[1]==="end",s=`calc((${`var(--v-target-${o}, 0px)`} - ${qe}) / 2)`,d=Mt(i);return V(`[v-placement="${i}"] >`,[y("popover-shared",[W("center-arrow",[y("popover-arrow",`${t}: calc(max(${s}, ${d}) ${a?"+":"-"} var(--v-offset-${n?"left":"top"}));`)])])])})})]);function Mt(e){return["top","bottom"].includes(e.split("-")[0])?"var(--n-arrow-offset)":"var(--n-arrow-offset-vertical)"}function pt(e,t){const n=e.split("-")[0],o=["top","bottom"].includes(n)?"height: var(--n-space-arrow);":"width: var(--n-space-arrow);";return V(`[v-placement="${e}"] >`,[y("popover-shared",`
|
|
401
|
+
margin-${gi[n]}: var(--n-space);
|
|
402
402
|
`,[W("show-arrow",`
|
|
403
|
-
margin-${
|
|
403
|
+
margin-${gi[n]}: var(--n-space-arrow);
|
|
404
404
|
`),W("overlap",`
|
|
405
405
|
margin: 0;
|
|
406
|
-
`),
|
|
406
|
+
`),_d("popover-arrow-wrapper",`
|
|
407
407
|
right: 0;
|
|
408
408
|
left: 0;
|
|
409
409
|
top: 0;
|
|
410
410
|
bottom: 0;
|
|
411
411
|
${n}: 100%;
|
|
412
|
-
${
|
|
413
|
-
${
|
|
414
|
-
`,[y("popover-arrow",t)])])])}const cs=Object.assign(Object.assign({},ye.props),{to:rt.propTo,show:Boolean,trigger:String,showArrow:Boolean,delay:Number,duration:Number,raw:Boolean,arrowPointToCenter:Boolean,arrowClass:String,arrowStyle:[String,Object],arrowWrapperClass:String,arrowWrapperStyle:[String,Object],displayDirective:String,x:Number,y:Number,flip:Boolean,overlap:Boolean,placement:String,width:[Number,String],keepAliveOnHover:Boolean,scrollable:Boolean,contentClass:String,contentStyle:[Object,String],headerClass:String,headerStyle:[Object,String],footerClass:String,footerStyle:[Object,String],internalDeactivateImmediately:Boolean,animated:Boolean,onClickoutside:Function,internalTrapFocus:Boolean,internalOnAfterLeave:Function,minWidth:Number,maxWidth:Number});function xm({arrowClass:e,arrowStyle:t,arrowWrapperClass:n,arrowWrapperStyle:r,clsPrefix:i}){return o.h("div",{key:"__popover-arrow__",style:r,class:[`${i}-popover-arrow-wrapper`,n]},o.h("div",{class:[`${i}-popover-arrow`,e],style:t}))}const ym=o.defineComponent({name:"PopoverBody",inheritAttrs:!1,props:cs,setup(e,{slots:t,attrs:n}){const{namespaceRef:r,mergedClsPrefixRef:i,inlineThemeDisabled:a}=Ke(e),l=ye("Popover","-popover",vm,pi,e,i),s=o.ref(null),d=o.inject("NPopover"),c=o.ref(null),f=o.ref(e.show),u=o.ref(!1);o.watchEffect(()=>{const{show:b}=e;b&&!Id()&&!e.internalDeactivateImmediately&&(u.value=!0)});const p=o.computed(()=>{const{trigger:b,onClickoutside:S}=e,E=[],{positionManuallyRef:{value:D}}=d;return D||(b==="click"&&!S&&E.push([Xn,$,void 0,{capture:!0}]),b==="hover"&&E.push([ba,H])),S&&E.push([Xn,$,void 0,{capture:!0}]),(e.displayDirective==="show"||e.animated&&u.value)&&E.push([o.vShow,e.show]),E}),m=o.computed(()=>{const{common:{cubicBezierEaseInOut:b,cubicBezierEaseIn:S,cubicBezierEaseOut:E},self:{space:D,spaceArrow:O,padding:V,fontSize:j,textColor:Q,dividerColor:N,color:Z,boxShadow:X,borderRadius:Y,arrowHeight:de,arrowOffset:ie,arrowOffsetVertical:ue}}=l.value;return{"--n-box-shadow":X,"--n-bezier":b,"--n-bezier-ease-in":S,"--n-bezier-ease-out":E,"--n-font-size":j,"--n-text-color":Q,"--n-color":Z,"--n-divider-color":N,"--n-border-radius":Y,"--n-arrow-height":de,"--n-arrow-offset":ie,"--n-arrow-offset-vertical":ue,"--n-padding":V,"--n-space":D,"--n-space-arrow":O}}),h=o.computed(()=>{const b=e.width==="trigger"?void 0:lt(e.width),S=[];b&&S.push({width:b});const{maxWidth:E,minWidth:D}=e;return E&&S.push({maxWidth:lt(E)}),D&&S.push({maxWidth:lt(D)}),a||S.push(m.value),S}),v=a?et("popover",void 0,m,e):void 0;d.setBodyInstance({syncPosition:w}),o.onBeforeUnmount(()=>{d.setBodyInstance(null)}),o.watch(o.toRef(e,"show"),b=>{e.animated||(b?f.value=!0:f.value=!1)});function w(){var b;(b=s.value)===null||b===void 0||b.syncPosition()}function g(b){e.trigger==="hover"&&e.keepAliveOnHover&&e.show&&d.handleMouseEnter(b)}function P(b){e.trigger==="hover"&&e.keepAliveOnHover&&d.handleMouseLeave(b)}function H(b){e.trigger==="hover"&&!k().contains(kn(b))&&d.handleMouseMoveOutside(b)}function $(b){(e.trigger==="click"&&!k().contains(kn(b))||e.onClickoutside)&&d.handleClickOutside(b)}function k(){return d.getTriggerElement()}o.provide(ca,c),o.provide(da,null),o.provide(sa,null);function M(){if(v==null||v.onRender(),!(e.displayDirective==="show"||e.show||e.animated&&u.value))return null;let S;const E=d.internalRenderBodyRef.value,{value:D}=i;if(E)S=E([`${D}-popover-shared`,v==null?void 0:v.themeClass.value,e.overlap&&`${D}-popover-shared--overlap`,e.showArrow&&`${D}-popover-shared--show-arrow`,e.arrowPointToCenter&&`${D}-popover-shared--center-arrow`],c,h.value,g,P);else{const{value:O}=d.extraClassRef,{internalTrapFocus:V}=e,j=!Pn(t.header)||!Pn(t.footer),Q=()=>{var N,Z;const X=j?o.h(o.Fragment,null,Oe(t.header,ie=>ie?o.h("div",{class:[`${D}-popover__header`,e.headerClass],style:e.headerStyle},ie):null),Oe(t.default,ie=>ie?o.h("div",{class:[`${D}-popover__content`,e.contentClass],style:e.contentStyle},t):null),Oe(t.footer,ie=>ie?o.h("div",{class:[`${D}-popover__footer`,e.footerClass],style:e.footerStyle},ie):null)):e.scrollable?(N=t.default)===null||N===void 0?void 0:N.call(t):o.h("div",{class:[`${D}-popover__content`,e.contentClass],style:e.contentStyle},t),Y=e.scrollable?o.h(sm,{contentClass:j?void 0:`${D}-popover__content ${(Z=e.contentClass)!==null&&Z!==void 0?Z:""}`,contentStyle:j?void 0:e.contentStyle},{default:()=>X}):X,de=e.showArrow?xm({arrowClass:e.arrowClass,arrowStyle:e.arrowStyle,arrowWrapperClass:e.arrowWrapperClass,arrowWrapperStyle:e.arrowWrapperStyle,clsPrefix:D}):null;return[Y,de]};S=o.h("div",o.mergeProps({class:[`${D}-popover`,`${D}-popover-shared`,v==null?void 0:v.themeClass.value,O.map(N=>`${D}-${N}`),{[`${D}-popover--scrollable`]:e.scrollable,[`${D}-popover--show-header-or-footer`]:j,[`${D}-popover--raw`]:e.raw,[`${D}-popover-shared--overlap`]:e.overlap,[`${D}-popover-shared--show-arrow`]:e.showArrow,[`${D}-popover-shared--center-arrow`]:e.arrowPointToCenter}],ref:c,style:h.value,onKeydown:d.handleKeydown,onMouseenter:g,onMouseleave:P},n),V?o.h(Dc,{active:e.show,autoFocus:!0},{default:Q}):Q())}return o.withDirectives(S,p.value)}return{displayed:u,namespace:r,isMounted:d.isMountedRef,zIndex:d.zIndexRef,followerRef:s,adjustedTo:rt(e),followerEnabled:f,renderContentNode:M}},render(){return o.h(Eo,{ref:"followerRef",zIndex:this.zIndex,show:this.show,enabled:this.followerEnabled,to:this.adjustedTo,x:this.x,y:this.y,flip:this.flip,placement:this.placement,containerClass:this.namespace,overlap:this.overlap,width:this.width==="trigger"?"target":void 0,teleportDisabled:this.adjustedTo===rt.tdkey},{default:()=>this.animated?o.h(o.Transition,{name:"popover-transition",appear:this.isMounted,onEnter:()=>{this.followerEnabled=!0},onAfterLeave:()=>{var e;(e=this.internalOnAfterLeave)===null||e===void 0||e.call(this),this.followerEnabled=!1,this.displayed=!1}},{default:this.renderContentNode}):this.renderContentNode()})}}),wm=Object.keys(cs),Cm={focus:["onFocus","onBlur"],click:["onClick"],hover:["onMouseenter","onMouseleave"],manual:[],nested:["onFocus","onBlur","onMouseenter","onMouseleave","onClick"]};function Sm(e,t,n){Cm[t].forEach(r=>{e.props?e.props=Object.assign({},e.props):e.props={};const i=e.props[r],a=n[r];i?e.props[r]=(...l)=>{i(...l),a(...l)}:e.props[r]=a})}const us={show:{type:Boolean,default:void 0},defaultShow:Boolean,showArrow:{type:Boolean,default:!0},trigger:{type:String,default:"hover"},delay:{type:Number,default:100},duration:{type:Number,default:100},raw:Boolean,placement:{type:String,default:"top"},x:Number,y:Number,arrowPointToCenter:Boolean,disabled:Boolean,getDisabled:Function,displayDirective:{type:String,default:"if"},arrowClass:String,arrowStyle:[String,Object],arrowWrapperClass:String,arrowWrapperStyle:[String,Object],flip:{type:Boolean,default:!0},animated:{type:Boolean,default:!0},width:{type:[Number,String],default:void 0},overlap:Boolean,keepAliveOnHover:{type:Boolean,default:!0},zIndex:Number,to:rt.propTo,scrollable:Boolean,contentClass:String,contentStyle:[Object,String],headerClass:String,headerStyle:[Object,String],footerClass:String,footerStyle:[Object,String],onClickoutside:Function,"onUpdate:show":[Function,Array],onUpdateShow:[Function,Array],internalDeactivateImmediately:Boolean,internalSyncTargetWithParent:Boolean,internalInheritedEventHandlers:{type:Array,default:()=>[]},internalTrapFocus:Boolean,internalExtraClass:{type:Array,default:()=>[]},onShow:[Function,Array],onHide:[Function,Array],arrow:{type:Boolean,default:void 0},minWidth:Number,maxWidth:Number},$m=Object.assign(Object.assign(Object.assign({},ye.props),us),{internalOnAfterLeave:Function,internalRenderBody:Function}),fs=o.defineComponent({name:"Popover",inheritAttrs:!1,props:$m,__popover__:!0,setup(e){process.env.NODE_ENV!=="production"&&o.watchEffect(()=>{e.maxWidth!==void 0&&tt("popover","`max-width` is deprecated, please use `style` instead."),e.minWidth!==void 0&&tt("popover","`min-width` is deprecated, please use `style` instead."),e.arrow!==void 0&&tt("popover","`arrow` is deprecated, please use `showArrow` instead."),e.onHide!==void 0&&tt("popover","`on-hide` is deprecated, please use `on-update:show` instead."),e.onShow!==void 0&&tt("popover","`on-show` is deprecated, please use `on-update:show` instead.")});const t=Bn(),n=o.ref(null),r=o.computed(()=>e.show),i=o.ref(e.defaultShow),a=vt(r,i),l=Xe(()=>e.disabled?!1:a.value),s=()=>{if(e.disabled)return!0;const{getDisabled:N}=e;return!!(N!=null&&N())},d=()=>s()?!1:a.value,c=To(e,["arrow","showArrow"]),f=o.computed(()=>e.overlap?!1:c.value);let u=null;const p=o.ref(null),m=o.ref(null),h=Xe(()=>e.x!==void 0&&e.y!==void 0);function v(N){const{"onUpdate:show":Z,onUpdateShow:X,onShow:Y,onHide:de}=e;i.value=N,Z&&ce(Z,N),X&&ce(X,N),N&&Y&&ce(Y,!0),N&&de&&ce(de,!1)}function w(){u&&u.syncPosition()}function g(){const{value:N}=p;N&&(window.clearTimeout(N),p.value=null)}function P(){const{value:N}=m;N&&(window.clearTimeout(N),m.value=null)}function H(){const N=s();if(e.trigger==="focus"&&!N){if(d())return;v(!0)}}function $(){const N=s();if(e.trigger==="focus"&&!N){if(!d())return;v(!1)}}function k(){const N=s();if(e.trigger==="hover"&&!N){if(P(),p.value!==null||d())return;const Z=()=>{v(!0),p.value=null},{delay:X}=e;X===0?Z():p.value=window.setTimeout(Z,X)}}function M(){const N=s();if(e.trigger==="hover"&&!N){if(g(),m.value!==null||!d())return;const Z=()=>{v(!1),m.value=null},{duration:X}=e;X===0?Z():m.value=window.setTimeout(Z,X)}}function b(){M()}function S(N){var Z;d()&&(e.trigger==="click"&&(g(),P(),v(!1)),(Z=e.onClickoutside)===null||Z===void 0||Z.call(e,N))}function E(){if(e.trigger==="click"&&!s()){g(),P();const N=!d();v(N)}}function D(N){e.internalTrapFocus&&N.key==="Escape"&&(g(),P(),v(!1))}function O(N){i.value=N}function V(){var N;return(N=n.value)===null||N===void 0?void 0:N.targetRef}function j(N){u=N}return o.provide("NPopover",{getTriggerElement:V,handleKeydown:D,handleMouseEnter:k,handleMouseLeave:M,handleClickOutside:S,handleMouseMoveOutside:b,setBodyInstance:j,positionManuallyRef:h,isMountedRef:t,zIndexRef:o.toRef(e,"zIndex"),extraClassRef:o.toRef(e,"internalExtraClass"),internalRenderBodyRef:o.toRef(e,"internalRenderBody")}),o.watchEffect(()=>{a.value&&s()&&v(!1)}),{binderInstRef:n,positionManually:h,mergedShowConsideringDisabledProp:l,uncontrolledShow:i,mergedShowArrow:f,getMergedShow:d,setShow:O,handleClick:E,handleMouseEnter:k,handleMouseLeave:M,handleFocus:H,handleBlur:$,syncPosition:w}},render(){var e;const{positionManually:t,$slots:n}=this;let r,i=!1;if(!t&&(n.activator?r=qi(n,"activator"):r=qi(n,"trigger"),r)){r=o.cloneVNode(r),r=r.type===o.Text?o.h("span",[r]):r;const a={onClick:this.handleClick,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onFocus:this.handleFocus,onBlur:this.handleBlur};if(!((e=r.type)===null||e===void 0)&&e.__popover__)i=!0,r.props||(r.props={internalSyncTargetWithParent:!0,internalInheritedEventHandlers:[]}),r.props.internalSyncTargetWithParent=!0,r.props.internalInheritedEventHandlers?r.props.internalInheritedEventHandlers=[a,...r.props.internalInheritedEventHandlers]:r.props.internalInheritedEventHandlers=[a];else{const{internalInheritedEventHandlers:l}=this,s=[a,...l],d={onBlur:c=>{s.forEach(f=>{f.onBlur(c)})},onFocus:c=>{s.forEach(f=>{f.onFocus(c)})},onClick:c=>{s.forEach(f=>{f.onClick(c)})},onMouseenter:c=>{s.forEach(f=>{f.onMouseenter(c)})},onMouseleave:c=>{s.forEach(f=>{f.onMouseleave(c)})}};Sm(r,l?"nested":t?"manual":this.trigger,d)}}return o.h(Po,{ref:"binderInstRef",syncTarget:!i,syncTargetWithParent:this.internalSyncTargetWithParent},{default:()=>{this.mergedShowConsideringDisabledProp;const a=this.getMergedShow();return[this.internalTrapFocus&&a?o.withDirectives(o.h("div",{style:{position:"fixed",inset:0}}),[[ga,{enabled:a,zIndex:this.zIndex}]]):null,t?null:o.h(Ro,null,{default:()=>r}),o.h(ym,ad(this.$props,wm,Object.assign(Object.assign({},this.$attrs),{showArrow:this.mergedShowArrow,show:a})),{default:()=>{var l,s;return(s=(l=this.$slots).default)===null||s===void 0?void 0:s.call(l)},header:()=>{var l,s;return(s=(l=this.$slots).header)===null||s===void 0?void 0:s.call(l)},footer:()=>{var l,s;return(s=(l=this.$slots).footer)===null||s===void 0?void 0:s.call(l)}})]}})}}),km={closeIconSizeTiny:"12px",closeIconSizeSmall:"12px",closeIconSizeMedium:"14px",closeIconSizeLarge:"14px",closeSizeTiny:"16px",closeSizeSmall:"16px",closeSizeMedium:"18px",closeSizeLarge:"18px",padding:"0 7px",closeMargin:"0 0 0 4px"};function zm(e){const{textColor2:t,primaryColorHover:n,primaryColorPressed:r,primaryColor:i,infoColor:a,successColor:l,warningColor:s,errorColor:d,baseColor:c,borderColor:f,opacityDisabled:u,tagColor:p,closeIconColor:m,closeIconColorHover:h,closeIconColorPressed:v,borderRadiusSmall:w,fontSizeMini:g,fontSizeTiny:P,fontSizeSmall:H,fontSizeMedium:$,heightMini:k,heightTiny:M,heightSmall:b,heightMedium:S,closeColorHover:E,closeColorPressed:D,buttonColor2Hover:O,buttonColor2Pressed:V,fontWeightStrong:j}=e;return Object.assign(Object.assign({},km),{closeBorderRadius:w,heightTiny:k,heightSmall:M,heightMedium:b,heightLarge:S,borderRadius:w,opacityDisabled:u,fontSizeTiny:g,fontSizeSmall:P,fontSizeMedium:H,fontSizeLarge:$,fontWeightStrong:j,textColorCheckable:t,textColorHoverCheckable:t,textColorPressedCheckable:t,textColorChecked:c,colorCheckable:"#0000",colorHoverCheckable:O,colorPressedCheckable:V,colorChecked:i,colorCheckedHover:n,colorCheckedPressed:r,border:`1px solid ${f}`,textColor:t,color:p,colorBordered:"rgb(250, 250, 252)",closeIconColor:m,closeIconColorHover:h,closeIconColorPressed:v,closeColorHover:E,closeColorPressed:D,borderPrimary:`1px solid ${me(i,{alpha:.3})}`,textColorPrimary:i,colorPrimary:me(i,{alpha:.12}),colorBorderedPrimary:me(i,{alpha:.1}),closeIconColorPrimary:i,closeIconColorHoverPrimary:i,closeIconColorPressedPrimary:i,closeColorHoverPrimary:me(i,{alpha:.12}),closeColorPressedPrimary:me(i,{alpha:.18}),borderInfo:`1px solid ${me(a,{alpha:.3})}`,textColorInfo:a,colorInfo:me(a,{alpha:.12}),colorBorderedInfo:me(a,{alpha:.1}),closeIconColorInfo:a,closeIconColorHoverInfo:a,closeIconColorPressedInfo:a,closeColorHoverInfo:me(a,{alpha:.12}),closeColorPressedInfo:me(a,{alpha:.18}),borderSuccess:`1px solid ${me(l,{alpha:.3})}`,textColorSuccess:l,colorSuccess:me(l,{alpha:.12}),colorBorderedSuccess:me(l,{alpha:.1}),closeIconColorSuccess:l,closeIconColorHoverSuccess:l,closeIconColorPressedSuccess:l,closeColorHoverSuccess:me(l,{alpha:.12}),closeColorPressedSuccess:me(l,{alpha:.18}),borderWarning:`1px solid ${me(s,{alpha:.35})}`,textColorWarning:s,colorWarning:me(s,{alpha:.15}),colorBorderedWarning:me(s,{alpha:.12}),closeIconColorWarning:s,closeIconColorHoverWarning:s,closeIconColorPressedWarning:s,closeColorHoverWarning:me(s,{alpha:.12}),closeColorPressedWarning:me(s,{alpha:.18}),borderError:`1px solid ${me(d,{alpha:.23})}`,textColorError:d,colorError:me(d,{alpha:.1}),colorBorderedError:me(d,{alpha:.08}),closeIconColorError:d,closeIconColorHoverError:d,closeIconColorPressedError:d,closeColorHoverError:me(d,{alpha:.12}),closeColorPressedError:me(d,{alpha:.18})})}const Tm={name:"Tag",common:Ye,self:zm},Pm={color:Object,type:{type:String,default:"default"},round:Boolean,size:{type:String,default:"medium"},closable:Boolean,disabled:{type:Boolean,default:void 0}},Rm=y("tag",`
|
|
412
|
+
${gi[n]}: auto;
|
|
413
|
+
${o}
|
|
414
|
+
`,[y("popover-arrow",t)])])])}const ds=Object.assign(Object.assign({},Ce.props),{to:ot.propTo,show:Boolean,trigger:String,showArrow:Boolean,delay:Number,duration:Number,raw:Boolean,arrowPointToCenter:Boolean,arrowClass:String,arrowStyle:[String,Object],arrowWrapperClass:String,arrowWrapperStyle:[String,Object],displayDirective:String,x:Number,y:Number,flip:Boolean,overlap:Boolean,placement:String,width:[Number,String],keepAliveOnHover:Boolean,scrollable:Boolean,contentClass:String,contentStyle:[Object,String],headerClass:String,headerStyle:[Object,String],footerClass:String,footerStyle:[Object,String],internalDeactivateImmediately:Boolean,animated:Boolean,onClickoutside:Function,internalTrapFocus:Boolean,internalOnAfterLeave:Function,minWidth:Number,maxWidth:Number});function vm({arrowClass:e,arrowStyle:t,arrowWrapperClass:n,arrowWrapperStyle:o,clsPrefix:i}){return r.h("div",{key:"__popover-arrow__",style:o,class:[`${i}-popover-arrow-wrapper`,n]},r.h("div",{class:[`${i}-popover-arrow`,e],style:t}))}const xm=r.defineComponent({name:"PopoverBody",inheritAttrs:!1,props:ds,setup(e,{slots:t,attrs:n}){const{namespaceRef:o,mergedClsPrefixRef:i,inlineThemeDisabled:a}=Je(e),l=Ce("Popover","-popover",mm,bi,e,i),s=r.ref(null),d=r.inject("NPopover"),c=r.ref(null),f=r.ref(e.show),u=r.ref(!1);r.watchEffect(()=>{const{show:p}=e;p&&!Ed()&&!e.internalDeactivateImmediately&&(u.value=!0)});const b=r.computed(()=>{const{trigger:p,onClickoutside:S}=e,B=[],{positionManuallyRef:{value:F}}=d;return F||(p==="click"&&!S&&B.push([Xn,$,void 0,{capture:!0}]),p==="hover"&&B.push([Ud,L])),S&&B.push([Xn,$,void 0,{capture:!0}]),(e.displayDirective==="show"||e.animated&&u.value)&&B.push([r.vShow,e.show]),B}),m=r.computed(()=>{const{common:{cubicBezierEaseInOut:p,cubicBezierEaseIn:S,cubicBezierEaseOut:B},self:{space:F,spaceArrow:I,padding:D,fontSize:j,textColor:Q,dividerColor:N,color:Z,boxShadow:q,borderRadius:Y,arrowHeight:de,arrowOffset:ie,arrowOffsetVertical:ce}}=l.value;return{"--n-box-shadow":q,"--n-bezier":p,"--n-bezier-ease-in":S,"--n-bezier-ease-out":B,"--n-font-size":j,"--n-text-color":Q,"--n-color":Z,"--n-divider-color":N,"--n-border-radius":Y,"--n-arrow-height":de,"--n-arrow-offset":ie,"--n-arrow-offset-vertical":ce,"--n-padding":D,"--n-space":F,"--n-space-arrow":I}}),h=r.computed(()=>{const p=e.width==="trigger"?void 0:xr(e.width),S=[];p&&S.push({width:p});const{maxWidth:B,minWidth:F}=e;return B&&S.push({maxWidth:xr(B)}),F&&S.push({maxWidth:xr(F)}),a||S.push(m.value),S}),x=a?tt("popover",void 0,m,e):void 0;d.setBodyInstance({syncPosition:w}),r.onBeforeUnmount(()=>{d.setBodyInstance(null)}),r.watch(r.toRef(e,"show"),p=>{e.animated||(p?f.value=!0:f.value=!1)});function w(){var p;(p=s.value)===null||p===void 0||p.syncPosition()}function g(p){e.trigger==="hover"&&e.keepAliveOnHover&&e.show&&d.handleMouseEnter(p)}function P(p){e.trigger==="hover"&&e.keepAliveOnHover&&d.handleMouseLeave(p)}function L(p){e.trigger==="hover"&&!k().contains($n(p))&&d.handleMouseMoveOutside(p)}function $(p){(e.trigger==="click"&&!k().contains($n(p))||e.onClickoutside)&&d.handleClickOutside(p)}function k(){return d.getTriggerElement()}r.provide(ua,c),r.provide(ca,null),r.provide(da,null);function M(){if(x==null||x.onRender(),!(e.displayDirective==="show"||e.show||e.animated&&u.value))return null;let S;const B=d.internalRenderBodyRef.value,{value:F}=i;if(B)S=B([`${F}-popover-shared`,x==null?void 0:x.themeClass.value,e.overlap&&`${F}-popover-shared--overlap`,e.showArrow&&`${F}-popover-shared--show-arrow`,e.arrowPointToCenter&&`${F}-popover-shared--center-arrow`],c,h.value,g,P);else{const{value:I}=d.extraClassRef,{internalTrapFocus:D}=e,j=!zn(t.header)||!zn(t.footer),Q=()=>{var N,Z;const q=j?r.h(r.Fragment,null,Ae(t.header,ie=>ie?r.h("div",{class:[`${F}-popover__header`,e.headerClass],style:e.headerStyle},ie):null),Ae(t.default,ie=>ie?r.h("div",{class:[`${F}-popover__content`,e.contentClass],style:e.contentStyle},t):null),Ae(t.footer,ie=>ie?r.h("div",{class:[`${F}-popover__footer`,e.footerClass],style:e.footerStyle},ie):null)):e.scrollable?(N=t.default)===null||N===void 0?void 0:N.call(t):r.h("div",{class:[`${F}-popover__content`,e.contentClass],style:e.contentStyle},t),Y=e.scrollable?r.h(lm,{contentClass:j?void 0:`${F}-popover__content ${(Z=e.contentClass)!==null&&Z!==void 0?Z:""}`,contentStyle:j?void 0:e.contentStyle},{default:()=>q}):q,de=e.showArrow?vm({arrowClass:e.arrowClass,arrowStyle:e.arrowStyle,arrowWrapperClass:e.arrowWrapperClass,arrowWrapperStyle:e.arrowWrapperStyle,clsPrefix:F}):null;return[Y,de]};S=r.h("div",r.mergeProps({class:[`${F}-popover`,`${F}-popover-shared`,x==null?void 0:x.themeClass.value,I.map(N=>`${F}-${N}`),{[`${F}-popover--scrollable`]:e.scrollable,[`${F}-popover--show-header-or-footer`]:j,[`${F}-popover--raw`]:e.raw,[`${F}-popover-shared--overlap`]:e.overlap,[`${F}-popover-shared--show-arrow`]:e.showArrow,[`${F}-popover-shared--center-arrow`]:e.arrowPointToCenter}],ref:c,style:h.value,onKeydown:d.handleKeydown,onMouseenter:g,onMouseleave:P},n),D?r.h(Ac,{active:e.show,autoFocus:!0},{default:Q}):Q())}return r.withDirectives(S,b.value)}return{displayed:u,namespace:o,isMounted:d.isMountedRef,zIndex:d.zIndexRef,followerRef:s,adjustedTo:ot(e),followerEnabled:f,renderContentNode:M}},render(){return r.h(Br,{ref:"followerRef",zIndex:this.zIndex,show:this.show,enabled:this.followerEnabled,to:this.adjustedTo,x:this.x,y:this.y,flip:this.flip,placement:this.placement,containerClass:this.namespace,overlap:this.overlap,width:this.width==="trigger"?"target":void 0,teleportDisabled:this.adjustedTo===ot.tdkey},{default:()=>this.animated?r.h(r.Transition,{name:"popover-transition",appear:this.isMounted,onEnter:()=>{this.followerEnabled=!0},onAfterLeave:()=>{var e;(e=this.internalOnAfterLeave)===null||e===void 0||e.call(this),this.followerEnabled=!1,this.displayed=!1}},{default:this.renderContentNode}):this.renderContentNode()})}}),ym=Object.keys(ds),wm={focus:["onFocus","onBlur"],click:["onClick"],hover:["onMouseenter","onMouseleave"],manual:[],nested:["onFocus","onBlur","onMouseenter","onMouseleave","onClick"]};function Cm(e,t,n){wm[t].forEach(o=>{e.props?e.props=Object.assign({},e.props):e.props={};const i=e.props[o],a=n[o];i?e.props[o]=(...l)=>{i(...l),a(...l)}:e.props[o]=a})}const cs={show:{type:Boolean,default:void 0},defaultShow:Boolean,showArrow:{type:Boolean,default:!0},trigger:{type:String,default:"hover"},delay:{type:Number,default:100},duration:{type:Number,default:100},raw:Boolean,placement:{type:String,default:"top"},x:Number,y:Number,arrowPointToCenter:Boolean,disabled:Boolean,getDisabled:Function,displayDirective:{type:String,default:"if"},arrowClass:String,arrowStyle:[String,Object],arrowWrapperClass:String,arrowWrapperStyle:[String,Object],flip:{type:Boolean,default:!0},animated:{type:Boolean,default:!0},width:{type:[Number,String],default:void 0},overlap:Boolean,keepAliveOnHover:{type:Boolean,default:!0},zIndex:Number,to:ot.propTo,scrollable:Boolean,contentClass:String,contentStyle:[Object,String],headerClass:String,headerStyle:[Object,String],footerClass:String,footerStyle:[Object,String],onClickoutside:Function,"onUpdate:show":[Function,Array],onUpdateShow:[Function,Array],internalDeactivateImmediately:Boolean,internalSyncTargetWithParent:Boolean,internalInheritedEventHandlers:{type:Array,default:()=>[]},internalTrapFocus:Boolean,internalExtraClass:{type:Array,default:()=>[]},onShow:[Function,Array],onHide:[Function,Array],arrow:{type:Boolean,default:void 0},minWidth:Number,maxWidth:Number},Sm=Object.assign(Object.assign(Object.assign({},Ce.props),cs),{internalOnAfterLeave:Function,internalRenderBody:Function}),us=r.defineComponent({name:"Popover",inheritAttrs:!1,props:Sm,__popover__:!0,setup(e){process.env.NODE_ENV!=="production"&&r.watchEffect(()=>{e.maxWidth!==void 0&&Qe("popover","`max-width` is deprecated, please use `style` instead."),e.minWidth!==void 0&&Qe("popover","`min-width` is deprecated, please use `style` instead."),e.arrow!==void 0&&Qe("popover","`arrow` is deprecated, please use `showArrow` instead."),e.onHide!==void 0&&Qe("popover","`on-hide` is deprecated, please use `on-update:show` instead."),e.onShow!==void 0&&Qe("popover","`on-show` is deprecated, please use `on-update:show` instead.")});const t=Rn(),n=r.ref(null),o=r.computed(()=>e.show),i=r.ref(e.defaultShow),a=St(o,i),l=Xe(()=>e.disabled?!1:a.value),s=()=>{if(e.disabled)return!0;const{getDisabled:N}=e;return!!(N!=null&&N())},d=()=>s()?!1:a.value,c=zr(e,["arrow","showArrow"]),f=r.computed(()=>e.overlap?!1:c.value);let u=null;const b=r.ref(null),m=r.ref(null),h=Xe(()=>e.x!==void 0&&e.y!==void 0);function x(N){const{"onUpdate:show":Z,onUpdateShow:q,onShow:Y,onHide:de}=e;i.value=N,Z&&he(Z,N),q&&he(q,N),N&&Y&&he(Y,!0),N&&de&&he(de,!1)}function w(){u&&u.syncPosition()}function g(){const{value:N}=b;N&&(window.clearTimeout(N),b.value=null)}function P(){const{value:N}=m;N&&(window.clearTimeout(N),m.value=null)}function L(){const N=s();if(e.trigger==="focus"&&!N){if(d())return;x(!0)}}function $(){const N=s();if(e.trigger==="focus"&&!N){if(!d())return;x(!1)}}function k(){const N=s();if(e.trigger==="hover"&&!N){if(P(),b.value!==null||d())return;const Z=()=>{x(!0),b.value=null},{delay:q}=e;q===0?Z():b.value=window.setTimeout(Z,q)}}function M(){const N=s();if(e.trigger==="hover"&&!N){if(g(),m.value!==null||!d())return;const Z=()=>{x(!1),m.value=null},{duration:q}=e;q===0?Z():m.value=window.setTimeout(Z,q)}}function p(){M()}function S(N){var Z;d()&&(e.trigger==="click"&&(g(),P(),x(!1)),(Z=e.onClickoutside)===null||Z===void 0||Z.call(e,N))}function B(){if(e.trigger==="click"&&!s()){g(),P();const N=!d();x(N)}}function F(N){e.internalTrapFocus&&N.key==="Escape"&&(g(),P(),x(!1))}function I(N){i.value=N}function D(){var N;return(N=n.value)===null||N===void 0?void 0:N.targetRef}function j(N){u=N}return r.provide("NPopover",{getTriggerElement:D,handleKeydown:F,handleMouseEnter:k,handleMouseLeave:M,handleClickOutside:S,handleMouseMoveOutside:p,setBodyInstance:j,positionManuallyRef:h,isMountedRef:t,zIndexRef:r.toRef(e,"zIndex"),extraClassRef:r.toRef(e,"internalExtraClass"),internalRenderBodyRef:r.toRef(e,"internalRenderBody")}),r.watchEffect(()=>{a.value&&s()&&x(!1)}),{binderInstRef:n,positionManually:h,mergedShowConsideringDisabledProp:l,uncontrolledShow:i,mergedShowArrow:f,getMergedShow:d,setShow:I,handleClick:B,handleMouseEnter:k,handleMouseLeave:M,handleFocus:L,handleBlur:$,syncPosition:w}},render(){var e;const{positionManually:t,$slots:n}=this;let o,i=!1;if(!t&&(n.activator?o=qi(n,"activator"):o=qi(n,"trigger"),o)){o=r.cloneVNode(o),o=o.type===r.Text?r.h("span",[o]):o;const a={onClick:this.handleClick,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onFocus:this.handleFocus,onBlur:this.handleBlur};if(!((e=o.type)===null||e===void 0)&&e.__popover__)i=!0,o.props||(o.props={internalSyncTargetWithParent:!0,internalInheritedEventHandlers:[]}),o.props.internalSyncTargetWithParent=!0,o.props.internalInheritedEventHandlers?o.props.internalInheritedEventHandlers=[a,...o.props.internalInheritedEventHandlers]:o.props.internalInheritedEventHandlers=[a];else{const{internalInheritedEventHandlers:l}=this,s=[a,...l],d={onBlur:c=>{s.forEach(f=>{f.onBlur(c)})},onFocus:c=>{s.forEach(f=>{f.onFocus(c)})},onClick:c=>{s.forEach(f=>{f.onClick(c)})},onMouseenter:c=>{s.forEach(f=>{f.onMouseenter(c)})},onMouseleave:c=>{s.forEach(f=>{f.onMouseleave(c)})}};Cm(o,l?"nested":t?"manual":this.trigger,d)}}return r.h(Pr,{ref:"binderInstRef",syncTarget:!i,syncTargetWithParent:this.internalSyncTargetWithParent},{default:()=>{this.mergedShowConsideringDisabledProp;const a=this.getMergedShow();return[this.internalTrapFocus&&a?r.withDirectives(r.h("div",{style:{position:"fixed",inset:0}}),[[ga,{enabled:a,zIndex:this.zIndex}]]):null,t?null:r.h(Rr,null,{default:()=>o}),r.h(xm,rd(this.$props,ym,Object.assign(Object.assign({},this.$attrs),{showArrow:this.mergedShowArrow,show:a})),{default:()=>{var l,s;return(s=(l=this.$slots).default)===null||s===void 0?void 0:s.call(l)},header:()=>{var l,s;return(s=(l=this.$slots).header)===null||s===void 0?void 0:s.call(l)},footer:()=>{var l,s;return(s=(l=this.$slots).footer)===null||s===void 0?void 0:s.call(l)}})]}})}}),$m={closeIconSizeTiny:"12px",closeIconSizeSmall:"12px",closeIconSizeMedium:"14px",closeIconSizeLarge:"14px",closeSizeTiny:"16px",closeSizeSmall:"16px",closeSizeMedium:"18px",closeSizeLarge:"18px",padding:"0 7px",closeMargin:"0 0 0 4px"};function km(e){const{textColor2:t,primaryColorHover:n,primaryColorPressed:o,primaryColor:i,infoColor:a,successColor:l,warningColor:s,errorColor:d,baseColor:c,borderColor:f,opacityDisabled:u,tagColor:b,closeIconColor:m,closeIconColorHover:h,closeIconColorPressed:x,borderRadiusSmall:w,fontSizeMini:g,fontSizeTiny:P,fontSizeSmall:L,fontSizeMedium:$,heightMini:k,heightTiny:M,heightSmall:p,heightMedium:S,closeColorHover:B,closeColorPressed:F,buttonColor2Hover:I,buttonColor2Pressed:D,fontWeightStrong:j}=e;return Object.assign(Object.assign({},$m),{closeBorderRadius:w,heightTiny:k,heightSmall:M,heightMedium:p,heightLarge:S,borderRadius:w,opacityDisabled:u,fontSizeTiny:g,fontSizeSmall:P,fontSizeMedium:L,fontSizeLarge:$,fontWeightStrong:j,textColorCheckable:t,textColorHoverCheckable:t,textColorPressedCheckable:t,textColorChecked:c,colorCheckable:"#0000",colorHoverCheckable:I,colorPressedCheckable:D,colorChecked:i,colorCheckedHover:n,colorCheckedPressed:o,border:`1px solid ${f}`,textColor:t,color:b,colorBordered:"rgb(250, 250, 252)",closeIconColor:m,closeIconColorHover:h,closeIconColorPressed:x,closeColorHover:B,closeColorPressed:F,borderPrimary:`1px solid ${me(i,{alpha:.3})}`,textColorPrimary:i,colorPrimary:me(i,{alpha:.12}),colorBorderedPrimary:me(i,{alpha:.1}),closeIconColorPrimary:i,closeIconColorHoverPrimary:i,closeIconColorPressedPrimary:i,closeColorHoverPrimary:me(i,{alpha:.12}),closeColorPressedPrimary:me(i,{alpha:.18}),borderInfo:`1px solid ${me(a,{alpha:.3})}`,textColorInfo:a,colorInfo:me(a,{alpha:.12}),colorBorderedInfo:me(a,{alpha:.1}),closeIconColorInfo:a,closeIconColorHoverInfo:a,closeIconColorPressedInfo:a,closeColorHoverInfo:me(a,{alpha:.12}),closeColorPressedInfo:me(a,{alpha:.18}),borderSuccess:`1px solid ${me(l,{alpha:.3})}`,textColorSuccess:l,colorSuccess:me(l,{alpha:.12}),colorBorderedSuccess:me(l,{alpha:.1}),closeIconColorSuccess:l,closeIconColorHoverSuccess:l,closeIconColorPressedSuccess:l,closeColorHoverSuccess:me(l,{alpha:.12}),closeColorPressedSuccess:me(l,{alpha:.18}),borderWarning:`1px solid ${me(s,{alpha:.35})}`,textColorWarning:s,colorWarning:me(s,{alpha:.15}),colorBorderedWarning:me(s,{alpha:.12}),closeIconColorWarning:s,closeIconColorHoverWarning:s,closeIconColorPressedWarning:s,closeColorHoverWarning:me(s,{alpha:.12}),closeColorPressedWarning:me(s,{alpha:.18}),borderError:`1px solid ${me(d,{alpha:.23})}`,textColorError:d,colorError:me(d,{alpha:.1}),colorBorderedError:me(d,{alpha:.08}),closeIconColorError:d,closeIconColorHoverError:d,closeIconColorPressedError:d,closeColorHoverError:me(d,{alpha:.12}),closeColorPressedError:me(d,{alpha:.18})})}const Tm={name:"Tag",common:et,self:km},zm={color:Object,type:{type:String,default:"default"},round:Boolean,size:{type:String,default:"medium"},closable:Boolean,disabled:{type:Boolean,default:void 0}},Pm=y("tag",`
|
|
415
415
|
--n-close-margin: var(--n-close-margin-top) var(--n-close-margin-right) var(--n-close-margin-bottom) var(--n-close-margin-left);
|
|
416
416
|
white-space: nowrap;
|
|
417
417
|
position: relative;
|
|
@@ -435,7 +435,7 @@ ${t}
|
|
|
435
435
|
font-size: var(--n-font-size);
|
|
436
436
|
`,[W("strong",`
|
|
437
437
|
font-weight: var(--n-font-weight-strong);
|
|
438
|
-
`),
|
|
438
|
+
`),R("border",`
|
|
439
439
|
pointer-events: none;
|
|
440
440
|
position: absolute;
|
|
441
441
|
left: 0;
|
|
@@ -445,16 +445,16 @@ ${t}
|
|
|
445
445
|
border-radius: inherit;
|
|
446
446
|
border: var(--n-border);
|
|
447
447
|
transition: border-color .3s var(--n-bezier);
|
|
448
|
-
`),
|
|
448
|
+
`),R("icon",`
|
|
449
449
|
display: flex;
|
|
450
450
|
margin: 0 4px 0 0;
|
|
451
451
|
color: var(--n-text-color);
|
|
452
452
|
transition: color .3s var(--n-bezier);
|
|
453
453
|
font-size: var(--n-avatar-size-override);
|
|
454
|
-
`),
|
|
454
|
+
`),R("avatar",`
|
|
455
455
|
display: flex;
|
|
456
456
|
margin: 0 6px 0 0;
|
|
457
|
-
`),
|
|
457
|
+
`),R("close",`
|
|
458
458
|
margin: var(--n-close-margin);
|
|
459
459
|
transition:
|
|
460
460
|
background-color .3s var(--n-bezier),
|
|
@@ -462,9 +462,9 @@ ${t}
|
|
|
462
462
|
`),W("round",`
|
|
463
463
|
padding: 0 calc(var(--n-height) / 3);
|
|
464
464
|
border-radius: calc(var(--n-height) / 2);
|
|
465
|
-
`,[
|
|
465
|
+
`,[R("icon",`
|
|
466
466
|
margin: 0 4px 0 calc((var(--n-height) - 8px) / -2);
|
|
467
|
-
`),
|
|
467
|
+
`),R("avatar",`
|
|
468
468
|
margin: 0 6px 0 calc((var(--n-height) - 8px) / -2);
|
|
469
469
|
`),W("closable",`
|
|
470
470
|
padding: 0 calc(var(--n-height) / 4) 0 calc(var(--n-height) / 3);
|
|
@@ -478,15 +478,15 @@ ${t}
|
|
|
478
478
|
box-shadow: none;
|
|
479
479
|
color: var(--n-text-color-checkable);
|
|
480
480
|
background-color: var(--n-color-checkable);
|
|
481
|
-
`,[je("disabled",[
|
|
481
|
+
`,[je("disabled",[V("&:hover","background-color: var(--n-color-hover-checkable);",[je("checked","color: var(--n-text-color-hover-checkable);")]),V("&:active","background-color: var(--n-color-pressed-checkable);",[je("checked","color: var(--n-text-color-pressed-checkable);")])]),W("checked",`
|
|
482
482
|
color: var(--n-text-color-checked);
|
|
483
483
|
background-color: var(--n-color-checked);
|
|
484
|
-
`,[je("disabled",[
|
|
484
|
+
`,[je("disabled",[V("&:hover","background-color: var(--n-color-checked-hover);"),V("&:active","background-color: var(--n-color-checked-pressed);")])])])]),Rm=Object.assign(Object.assign(Object.assign({},Ce.props),zm),{bordered:{type:Boolean,default:void 0},checked:Boolean,checkable:Boolean,strong:Boolean,triggerClickOnClose:Boolean,onClose:[Array,Function],onMouseenter:Function,onMouseleave:Function,"onUpdate:checked":Function,onUpdateChecked:Function,internalCloseFocusable:{type:Boolean,default:!0},internalCloseIsButtonTag:{type:Boolean,default:!0},onCheckedChange:Function}),_m="n-tag",mi=r.defineComponent({name:"Tag",props:Rm,setup(e){process.env.NODE_ENV!=="production"&&r.watchEffect(()=>{e.onCheckedChange!==void 0&&Qe("tag","`on-checked-change` is deprecated, please use `on-update:checked` instead")});const t=r.ref(null),{mergedBorderedRef:n,mergedClsPrefixRef:o,inlineThemeDisabled:i,mergedRtlRef:a}=Je(e),l=Ce("Tag","-tag",Pm,Tm,e,o);r.provide(_m,{roundRef:r.toRef(e,"round")});function s(){if(!e.disabled&&e.checkable){const{checked:m,onCheckedChange:h,onUpdateChecked:x,"onUpdate:checked":w}=e;x&&x(!m),w&&w(!m),h&&h(!m)}}function d(m){if(e.triggerClickOnClose||m.stopPropagation(),!e.disabled){const{onClose:h}=e;h&&he(h,m)}}const c={setTextContent(m){const{value:h}=t;h&&(h.textContent=m)}},f=Kt("Tag",a,o),u=r.computed(()=>{const{type:m,size:h,color:{color:x,textColor:w}={}}=e,{common:{cubicBezierEaseInOut:g},self:{padding:P,closeMargin:L,borderRadius:$,opacityDisabled:k,textColorCheckable:M,textColorHoverCheckable:p,textColorPressedCheckable:S,textColorChecked:B,colorCheckable:F,colorHoverCheckable:I,colorPressedCheckable:D,colorChecked:j,colorCheckedHover:Q,colorCheckedPressed:N,closeBorderRadius:Z,fontWeightStrong:q,[ee("colorBordered",m)]:Y,[ee("closeSize",h)]:de,[ee("closeIconSize",h)]:ie,[ee("fontSize",h)]:ce,[ee("height",h)]:U,[ee("color",m)]:te,[ee("textColor",m)]:ve,[ee("border",m)]:ye,[ee("closeIconColor",m)]:oe,[ee("closeIconColorHover",m)]:Se,[ee("closeIconColorPressed",m)]:we,[ee("closeColorHover",m)]:le,[ee("closeColorPressed",m)]:Me}}=l.value,Re=st(L);return{"--n-font-weight-strong":q,"--n-avatar-size-override":`calc(${U} - 8px)`,"--n-bezier":g,"--n-border-radius":$,"--n-border":ye,"--n-close-icon-size":ie,"--n-close-color-pressed":Me,"--n-close-color-hover":le,"--n-close-border-radius":Z,"--n-close-icon-color":oe,"--n-close-icon-color-hover":Se,"--n-close-icon-color-pressed":we,"--n-close-icon-color-disabled":oe,"--n-close-margin-top":Re.top,"--n-close-margin-right":Re.right,"--n-close-margin-bottom":Re.bottom,"--n-close-margin-left":Re.left,"--n-close-size":de,"--n-color":x||(n.value?Y:te),"--n-color-checkable":F,"--n-color-checked":j,"--n-color-checked-hover":Q,"--n-color-checked-pressed":N,"--n-color-hover-checkable":I,"--n-color-pressed-checkable":D,"--n-font-size":ce,"--n-height":U,"--n-opacity-disabled":k,"--n-padding":P,"--n-text-color":w||ve,"--n-text-color-checkable":M,"--n-text-color-checked":B,"--n-text-color-hover-checkable":p,"--n-text-color-pressed-checkable":S}}),b=i?tt("tag",r.computed(()=>{let m="";const{type:h,size:x,color:{color:w,textColor:g}={}}=e;return m+=h[0],m+=x[0],w&&(m+=`a${yr(w)}`),g&&(m+=`b${yr(g)}`),n.value&&(m+="c"),m}),u,e):void 0;return Object.assign(Object.assign({},c),{rtlEnabled:f,mergedClsPrefix:o,contentRef:t,mergedBordered:n,handleClick:s,handleCloseClick:d,cssVars:i?void 0:u,themeClass:b==null?void 0:b.themeClass,onRender:b==null?void 0:b.onRender})},render(){var e,t;const{mergedClsPrefix:n,rtlEnabled:o,closable:i,color:{borderColor:a}={},round:l,onRender:s,$slots:d}=this;s==null||s();const c=Ae(d.avatar,u=>u&&r.h("div",{class:`${n}-tag__avatar`},u)),f=Ae(d.icon,u=>u&&r.h("div",{class:`${n}-tag__icon`},u));return r.h("div",{class:[`${n}-tag`,this.themeClass,{[`${n}-tag--rtl`]:o,[`${n}-tag--strong`]:this.strong,[`${n}-tag--disabled`]:this.disabled,[`${n}-tag--checkable`]:this.checkable,[`${n}-tag--checked`]:this.checkable&&this.checked,[`${n}-tag--round`]:l,[`${n}-tag--avatar`]:c,[`${n}-tag--icon`]:f,[`${n}-tag--closable`]:i}],style:this.cssVars,onClick:this.handleClick,onMouseenter:this.onMouseenter,onMouseleave:this.onMouseleave},f||c,r.h("span",{class:`${n}-tag__content`,ref:"contentRef"},(t=(e=this.$slots).default)===null||t===void 0?void 0:t.call(e)),!this.checkable&&i?r.h(li,{clsPrefix:n,class:`${n}-tag__close`,disabled:this.disabled,onClick:this.handleCloseClick,focusable:this.internalCloseFocusable,round:l,isButtonTag:this.internalCloseIsButtonTag,absolute:!0}):null,!this.checkable&&this.mergedBordered?r.h("div",{class:`${n}-tag__border`,style:{borderColor:a}}):null)}}),Em=y("base-clear",`
|
|
485
485
|
flex-shrink: 0;
|
|
486
486
|
height: 1em;
|
|
487
487
|
width: 1em;
|
|
488
488
|
position: relative;
|
|
489
|
-
`,[
|
|
489
|
+
`,[V(">",[R("clear",`
|
|
490
490
|
font-size: var(--n-clear-size);
|
|
491
491
|
height: 1em;
|
|
492
492
|
width: 1em;
|
|
@@ -494,18 +494,18 @@ ${t}
|
|
|
494
494
|
color: var(--n-clear-color);
|
|
495
495
|
transition: color .3s var(--n-bezier);
|
|
496
496
|
display: flex;
|
|
497
|
-
`,[
|
|
497
|
+
`,[V("&:hover",`
|
|
498
498
|
color: var(--n-clear-color-hover)!important;
|
|
499
|
-
`),
|
|
499
|
+
`),V("&:active",`
|
|
500
500
|
color: var(--n-clear-color-pressed)!important;
|
|
501
|
-
`)]),
|
|
501
|
+
`)]),R("placeholder",`
|
|
502
502
|
display: flex;
|
|
503
|
-
`),
|
|
503
|
+
`),R("clear, placeholder",`
|
|
504
504
|
position: absolute;
|
|
505
505
|
left: 50%;
|
|
506
506
|
top: 50%;
|
|
507
507
|
transform: translateX(-50%) translateY(-50%);
|
|
508
|
-
`,[
|
|
508
|
+
`,[An({originalTransform:"translateX(-50%) translateY(-50%)",left:"50%",top:"50%"})])])]),vi=r.defineComponent({name:"BaseClear",props:{clsPrefix:{type:String,required:!0},show:Boolean,onClear:Function},setup(e){return gn("-base-clear",Em,r.toRef(e,"clsPrefix")),{handleMouseDown(t){t.preventDefault()}}},render(){const{clsPrefix:e}=this;return r.h("div",{class:`${e}-base-clear`},r.h(Yr,null,{default:()=>{var t,n;return this.show?r.h("div",{key:"dismiss",class:`${e}-base-clear__clear`,onClick:this.onClear,onMousedown:this.handleMouseDown,"data-clear":!0},Ct(this.$slots.icon,()=>[r.h(gt,{clsPrefix:e},{default:()=>r.h(gg,null)})])):r.h("div",{key:"icon",class:`${e}-base-clear__placeholder`},(n=(t=this.$slots).placeholder)===null||n===void 0?void 0:n.call(t))}}))}}),fs=r.defineComponent({name:"InternalSelectionSuffix",props:{clsPrefix:{type:String,required:!0},showArrow:{type:Boolean,default:void 0},showClear:{type:Boolean,default:void 0},loading:{type:Boolean,default:!1},onClear:Function},setup(e,{slots:t}){return()=>{const{clsPrefix:n}=e;return r.h(Zr,{clsPrefix:n,class:`${n}-base-suffix`,strokeWidth:24,scale:.85,show:e.loading},{default:()=>e.showArrow?r.h(vi,{clsPrefix:n,show:e.showClear,onClear:e.onClear},{placeholder:()=>r.h(gt,{clsPrefix:n,class:`${n}-base-suffix__arrow`},{default:()=>Ct(t.default,()=>[r.h(bg,null)])})}):null})}}}),Bm={paddingSingle:"0 26px 0 12px",paddingMultiple:"3px 26px 0 12px",clearSize:"16px",arrowSize:"16px"};function Mm(e){const{borderRadius:t,textColor2:n,textColorDisabled:o,inputColor:i,inputColorDisabled:a,primaryColor:l,primaryColorHover:s,warningColor:d,warningColorHover:c,errorColor:f,errorColorHover:u,borderColor:b,iconColor:m,iconColorDisabled:h,clearColor:x,clearColorHover:w,clearColorPressed:g,placeholderColor:P,placeholderColorDisabled:L,fontSizeTiny:$,fontSizeSmall:k,fontSizeMedium:M,fontSizeLarge:p,heightTiny:S,heightSmall:B,heightMedium:F,heightLarge:I}=e;return Object.assign(Object.assign({},Bm),{fontSizeTiny:$,fontSizeSmall:k,fontSizeMedium:M,fontSizeLarge:p,heightTiny:S,heightSmall:B,heightMedium:F,heightLarge:I,borderRadius:t,textColor:n,textColorDisabled:o,placeholderColor:P,placeholderColorDisabled:L,color:i,colorDisabled:a,colorActive:i,border:`1px solid ${b}`,borderHover:`1px solid ${s}`,borderActive:`1px solid ${l}`,borderFocus:`1px solid ${s}`,boxShadowHover:"none",boxShadowActive:`0 0 0 2px ${me(l,{alpha:.2})}`,boxShadowFocus:`0 0 0 2px ${me(l,{alpha:.2})}`,caretColor:l,arrowColor:m,arrowColorDisabled:h,loadingColor:l,borderWarning:`1px solid ${d}`,borderHoverWarning:`1px solid ${c}`,borderActiveWarning:`1px solid ${d}`,borderFocusWarning:`1px solid ${c}`,boxShadowHoverWarning:"none",boxShadowActiveWarning:`0 0 0 2px ${me(d,{alpha:.2})}`,boxShadowFocusWarning:`0 0 0 2px ${me(d,{alpha:.2})}`,colorActiveWarning:i,caretColorWarning:d,borderError:`1px solid ${f}`,borderHoverError:`1px solid ${u}`,borderActiveError:`1px solid ${f}`,borderFocusError:`1px solid ${u}`,boxShadowHoverError:"none",boxShadowActiveError:`0 0 0 2px ${me(f,{alpha:.2})}`,boxShadowFocusError:`0 0 0 2px ${me(f,{alpha:.2})}`,colorActiveError:i,caretColorError:f,clearColor:x,clearColorHover:w,clearColorPressed:g})}const hs={name:"InternalSelection",common:et,peers:{Popover:bi},self:Mm},Im=V([y("base-selection",`
|
|
509
509
|
--n-padding-single: var(--n-padding-single-top) var(--n-padding-single-right) var(--n-padding-single-bottom) var(--n-padding-single-left);
|
|
510
510
|
--n-padding-multiple: var(--n-padding-multiple-top) var(--n-padding-multiple-right) var(--n-padding-multiple-bottom) var(--n-padding-multiple-left);
|
|
511
511
|
position: relative;
|
|
@@ -521,7 +521,7 @@ ${t}
|
|
|
521
521
|
font-size: var(--n-font-size);
|
|
522
522
|
`,[y("base-loading",`
|
|
523
523
|
color: var(--n-loading-color);
|
|
524
|
-
`),y("base-selection-tags","min-height: var(--n-height);"),
|
|
524
|
+
`),y("base-selection-tags","min-height: var(--n-height);"),R("border, state-border",`
|
|
525
525
|
position: absolute;
|
|
526
526
|
left: 0;
|
|
527
527
|
right: 0;
|
|
@@ -533,7 +533,7 @@ ${t}
|
|
|
533
533
|
transition:
|
|
534
534
|
box-shadow .3s var(--n-bezier),
|
|
535
535
|
border-color .3s var(--n-bezier);
|
|
536
|
-
`),
|
|
536
|
+
`),R("state-border",`
|
|
537
537
|
z-index: 1;
|
|
538
538
|
border-color: #0000;
|
|
539
539
|
`),y("base-suffix",`
|
|
@@ -542,7 +542,7 @@ ${t}
|
|
|
542
542
|
top: 50%;
|
|
543
543
|
transform: translateY(-50%);
|
|
544
544
|
right: 10px;
|
|
545
|
-
`,[
|
|
545
|
+
`,[R("arrow",`
|
|
546
546
|
font-size: var(--n-arrow-size);
|
|
547
547
|
color: var(--n-arrow-color);
|
|
548
548
|
transition: color .3s var(--n-bezier);
|
|
@@ -558,14 +558,14 @@ ${t}
|
|
|
558
558
|
left: 0;
|
|
559
559
|
padding: var(--n-padding-single);
|
|
560
560
|
transition: color .3s var(--n-bezier);
|
|
561
|
-
`,[
|
|
561
|
+
`,[R("wrapper",`
|
|
562
562
|
flex-basis: 0;
|
|
563
563
|
flex-grow: 1;
|
|
564
564
|
overflow: hidden;
|
|
565
565
|
text-overflow: ellipsis;
|
|
566
566
|
`)]),y("base-selection-placeholder",`
|
|
567
567
|
color: var(--n-placeholder-color);
|
|
568
|
-
`,[
|
|
568
|
+
`,[R("inner",`
|
|
569
569
|
max-width: 100%;
|
|
570
570
|
overflow: hidden;
|
|
571
571
|
`)]),y("base-selection-tags",`
|
|
@@ -616,22 +616,22 @@ ${t}
|
|
|
616
616
|
color: var(--n-text-color);
|
|
617
617
|
transition: color .3s var(--n-bezier);
|
|
618
618
|
caret-color: var(--n-caret-color);
|
|
619
|
-
`,[
|
|
619
|
+
`,[R("content",`
|
|
620
620
|
text-overflow: ellipsis;
|
|
621
621
|
overflow: hidden;
|
|
622
622
|
white-space: nowrap;
|
|
623
|
-
`)]),
|
|
623
|
+
`)]),R("render-label",`
|
|
624
624
|
color: var(--n-text-color);
|
|
625
|
-
`)]),je("disabled",[
|
|
625
|
+
`)]),je("disabled",[V("&:hover",[R("state-border",`
|
|
626
626
|
box-shadow: var(--n-box-shadow-hover);
|
|
627
627
|
border: var(--n-border-hover);
|
|
628
|
-
`)]),W("focus",[
|
|
628
|
+
`)]),W("focus",[R("state-border",`
|
|
629
629
|
box-shadow: var(--n-box-shadow-focus);
|
|
630
630
|
border: var(--n-border-focus);
|
|
631
|
-
`)]),W("active",[
|
|
631
|
+
`)]),W("active",[R("state-border",`
|
|
632
632
|
box-shadow: var(--n-box-shadow-active);
|
|
633
633
|
border: var(--n-border-active);
|
|
634
|
-
`),y("base-selection-label","background-color: var(--n-color-active);"),y("base-selection-tags","background-color: var(--n-color-active);")])]),W("disabled","cursor: not-allowed;",[
|
|
634
|
+
`),y("base-selection-label","background-color: var(--n-color-active);"),y("base-selection-tags","background-color: var(--n-color-active);")])]),W("disabled","cursor: not-allowed;",[R("arrow",`
|
|
635
635
|
color: var(--n-arrow-color-disabled);
|
|
636
636
|
`),y("base-selection-label",`
|
|
637
637
|
cursor: not-allowed;
|
|
@@ -639,7 +639,7 @@ ${t}
|
|
|
639
639
|
`,[y("base-selection-input",`
|
|
640
640
|
cursor: not-allowed;
|
|
641
641
|
color: var(--n-text-color-disabled);
|
|
642
|
-
`),
|
|
642
|
+
`),R("render-label",`
|
|
643
643
|
color: var(--n-text-color-disabled);
|
|
644
644
|
`)]),y("base-selection-tags",`
|
|
645
645
|
cursor: not-allowed;
|
|
@@ -656,7 +656,7 @@ ${t}
|
|
|
656
656
|
margin-bottom: 3px;
|
|
657
657
|
max-width: 100%;
|
|
658
658
|
vertical-align: bottom;
|
|
659
|
-
`,[
|
|
659
|
+
`,[R("input",`
|
|
660
660
|
font-size: inherit;
|
|
661
661
|
font-family: inherit;
|
|
662
662
|
min-width: 1px;
|
|
@@ -671,7 +671,7 @@ ${t}
|
|
|
671
671
|
cursor: pointer;
|
|
672
672
|
color: var(--n-text-color);
|
|
673
673
|
caret-color: var(--n-caret-color);
|
|
674
|
-
`),
|
|
674
|
+
`),R("mirror",`
|
|
675
675
|
position: absolute;
|
|
676
676
|
left: 0;
|
|
677
677
|
top: 0;
|
|
@@ -680,13 +680,13 @@ ${t}
|
|
|
680
680
|
user-select: none;
|
|
681
681
|
-webkit-user-select: none;
|
|
682
682
|
opacity: 0;
|
|
683
|
-
`)]),["warning","error"].map(e=>W(`${e}-status`,[
|
|
683
|
+
`)]),["warning","error"].map(e=>W(`${e}-status`,[R("state-border",`border: var(--n-border-${e});`),je("disabled",[V("&:hover",[R("state-border",`
|
|
684
684
|
box-shadow: var(--n-box-shadow-hover-${e});
|
|
685
685
|
border: var(--n-border-hover-${e});
|
|
686
|
-
`)]),W("active",[
|
|
686
|
+
`)]),W("active",[R("state-border",`
|
|
687
687
|
box-shadow: var(--n-box-shadow-active-${e});
|
|
688
688
|
border: var(--n-border-active-${e});
|
|
689
|
-
`),y("base-selection-label",`background-color: var(--n-color-active-${e});`),y("base-selection-tags",`background-color: var(--n-color-active-${e});`)]),W("focus",[
|
|
689
|
+
`),y("base-selection-label",`background-color: var(--n-color-active-${e});`),y("base-selection-tags",`background-color: var(--n-color-active-${e});`)]),W("focus",[R("state-border",`
|
|
690
690
|
box-shadow: var(--n-box-shadow-focus-${e});
|
|
691
691
|
border: var(--n-border-focus-${e});
|
|
692
692
|
`)])])]))]),y("base-selection-popover",`
|
|
@@ -698,54 +698,54 @@ ${t}
|
|
|
698
698
|
max-width: 100%;
|
|
699
699
|
display: inline-flex;
|
|
700
700
|
padding: 0 7px 3px 0;
|
|
701
|
-
`,[
|
|
701
|
+
`,[V("&:last-child","padding-right: 0;"),y("tag",`
|
|
702
702
|
font-size: 14px;
|
|
703
703
|
max-width: 100%;
|
|
704
|
-
`,[
|
|
704
|
+
`,[R("content",`
|
|
705
705
|
line-height: 1.25;
|
|
706
706
|
text-overflow: ellipsis;
|
|
707
707
|
overflow: hidden;
|
|
708
|
-
`)])])]),Am=o.defineComponent({name:"InternalSelection",props:Object.assign(Object.assign({},ye.props),{clsPrefix:{type:String,required:!0},bordered:{type:Boolean,default:void 0},active:Boolean,pattern:{type:String,default:""},placeholder:String,selectedOption:{type:Object,default:null},selectedOptions:{type:Array,default:null},labelField:{type:String,default:"label"},valueField:{type:String,default:"value"},multiple:Boolean,filterable:Boolean,clearable:Boolean,disabled:Boolean,size:{type:String,default:"medium"},loading:Boolean,autofocus:Boolean,showArrow:{type:Boolean,default:!0},inputProps:Object,focused:Boolean,renderTag:Function,onKeydown:Function,onClick:Function,onBlur:Function,onFocus:Function,onDeleteOption:Function,maxTagCount:[String,Number],ellipsisTagPopoverProps:Object,onClear:Function,onPatternInput:Function,onPatternFocus:Function,onPatternBlur:Function,renderLabel:Function,status:String,inlineThemeDisabled:Boolean,ignoreComposition:{type:Boolean,default:!0},onResize:Function}),setup(e){const{mergedClsPrefixRef:t,mergedRtlRef:n}=Ke(e),r=qt("InternalSelection",n,t),i=o.ref(null),a=o.ref(null),l=o.ref(null),s=o.ref(null),d=o.ref(null),c=o.ref(null),f=o.ref(null),u=o.ref(null),p=o.ref(null),m=o.ref(null),h=o.ref(!1),v=o.ref(!1),w=o.ref(!1),g=ye("InternalSelection","-internal-selection",Om,ps,e,o.toRef(e,"clsPrefix")),P=o.computed(()=>e.clearable&&!e.disabled&&(w.value||e.active)),H=o.computed(()=>e.selectedOption?e.renderTag?e.renderTag({option:e.selectedOption,handleClose:()=>{}}):e.renderLabel?e.renderLabel(e.selectedOption,!0):ln(e.selectedOption[e.labelField],e.selectedOption,!0):e.placeholder),$=o.computed(()=>{const C=e.selectedOption;if(C)return C[e.labelField]}),k=o.computed(()=>e.multiple?!!(Array.isArray(e.selectedOptions)&&e.selectedOptions.length):e.selectedOption!==null);function M(){var C;const{value:B}=i;if(B){const{value:oe}=a;oe&&(oe.style.width=`${B.offsetWidth}px`,e.maxTagCount!=="responsive"&&((C=p.value)===null||C===void 0||C.sync({showAllItemsBeforeCalculate:!1})))}}function b(){const{value:C}=m;C&&(C.style.display="none")}function S(){const{value:C}=m;C&&(C.style.display="inline-block")}o.watch(o.toRef(e,"active"),C=>{C||b()}),o.watch(o.toRef(e,"pattern"),()=>{e.multiple&&o.nextTick(M)});function E(C){const{onFocus:B}=e;B&&B(C)}function D(C){const{onBlur:B}=e;B&&B(C)}function O(C){const{onDeleteOption:B}=e;B&&B(C)}function V(C){const{onClear:B}=e;B&&B(C)}function j(C){const{onPatternInput:B}=e;B&&B(C)}function Q(C){var B;(!C.relatedTarget||!(!((B=l.value)===null||B===void 0)&&B.contains(C.relatedTarget)))&&E(C)}function N(C){var B;!((B=l.value)===null||B===void 0)&&B.contains(C.relatedTarget)||D(C)}function Z(C){V(C)}function X(){w.value=!0}function Y(){w.value=!1}function de(C){!e.active||!e.filterable||C.target!==a.value&&C.preventDefault()}function ie(C){O(C)}const ue=o.ref(!1);function U(C){if(C.key==="Backspace"&&!ue.value&&!e.pattern.length){const{selectedOptions:B}=e;B!=null&&B.length&&ie(B[B.length-1])}}let te=null;function ve(C){const{value:B}=i;if(B){const oe=C.target.value;B.textContent=oe,M()}e.ignoreComposition&&ue.value?te=C:j(C)}function we(){ue.value=!0}function re(){ue.value=!1,e.ignoreComposition&&j(te),te=null}function Se(C){var B;v.value=!0,(B=e.onPatternFocus)===null||B===void 0||B.call(e,C)}function Ce(C){var B;v.value=!1,(B=e.onPatternBlur)===null||B===void 0||B.call(e,C)}function le(){var C,B;if(e.filterable)v.value=!1,(C=c.value)===null||C===void 0||C.blur(),(B=a.value)===null||B===void 0||B.blur();else if(e.multiple){const{value:oe}=s;oe==null||oe.blur()}else{const{value:oe}=d;oe==null||oe.blur()}}function Me(){var C,B,oe;e.filterable?(v.value=!1,(C=c.value)===null||C===void 0||C.focus()):e.multiple?(B=s.value)===null||B===void 0||B.focus():(oe=d.value)===null||oe===void 0||oe.focus()}function Re(){const{value:C}=a;C&&(S(),C.focus())}function Le(){const{value:C}=a;C&&C.blur()}function Ie(C){const{value:B}=f;B&&B.setTextContent(`+${C}`)}function De(){const{value:C}=u;return C}function Ue(){return a.value}let ke=null;function q(){ke!==null&&window.clearTimeout(ke)}function A(){e.active||(q(),ke=window.setTimeout(()=>{k.value&&(h.value=!0)},100))}function ne(){q()}function _(C){C||(q(),h.value=!1)}o.watch(k,C=>{C||(h.value=!1)}),o.onMounted(()=>{o.watchEffect(()=>{const C=c.value;C&&(e.disabled?C.removeAttribute("tabindex"):C.tabIndex=v.value?-1:0)})}),ja(l,e.onResize);const{inlineThemeDisabled:F}=e,K=o.computed(()=>{const{size:C}=e,{common:{cubicBezierEaseInOut:B},self:{borderRadius:oe,color:xe,placeholderColor:ze,textColor:Ne,paddingSingle:Ae,paddingMultiple:_e,caretColor:qe,colorDisabled:st,textColorDisabled:Je,placeholderColorDisabled:it,colorActive:x,boxShadowFocus:L,boxShadowActive:J,boxShadowHover:ae,border:se,borderFocus:fe,borderHover:he,borderActive:ge,arrowColor:Te,arrowColorDisabled:ut,loadingColor:Yt,colorActiveWarning:wn,boxShadowFocusWarning:Zt,boxShadowActiveWarning:Jt,boxShadowHoverWarning:po,borderWarning:bo,borderFocusWarning:Hn,borderHoverWarning:Qt,borderActiveWarning:R,colorActiveError:G,boxShadowFocusError:be,boxShadowActiveError:Ee,boxShadowHoverError:Ve,borderError:Be,borderFocusError:Ot,borderHoverError:At,borderActiveError:Ft,clearColor:Cn,clearColorHover:Sn,clearColorPressed:go,clearSize:Bi,arrowSize:_i,[ee("height",C)]:Ei,[ee("fontSize",C)]:Mi}}=g.value,Ln=dt(Ae),Nn=dt(_e);return{"--n-bezier":B,"--n-border":se,"--n-border-active":ge,"--n-border-focus":fe,"--n-border-hover":he,"--n-border-radius":oe,"--n-box-shadow-active":J,"--n-box-shadow-focus":L,"--n-box-shadow-hover":ae,"--n-caret-color":qe,"--n-color":xe,"--n-color-active":x,"--n-color-disabled":st,"--n-font-size":Mi,"--n-height":Ei,"--n-padding-single-top":Ln.top,"--n-padding-multiple-top":Nn.top,"--n-padding-single-right":Ln.right,"--n-padding-multiple-right":Nn.right,"--n-padding-single-left":Ln.left,"--n-padding-multiple-left":Nn.left,"--n-padding-single-bottom":Ln.bottom,"--n-padding-multiple-bottom":Nn.bottom,"--n-placeholder-color":ze,"--n-placeholder-color-disabled":it,"--n-text-color":Ne,"--n-text-color-disabled":Je,"--n-arrow-color":Te,"--n-arrow-color-disabled":ut,"--n-loading-color":Yt,"--n-color-active-warning":wn,"--n-box-shadow-focus-warning":Zt,"--n-box-shadow-active-warning":Jt,"--n-box-shadow-hover-warning":po,"--n-border-warning":bo,"--n-border-focus-warning":Hn,"--n-border-hover-warning":Qt,"--n-border-active-warning":R,"--n-color-active-error":G,"--n-box-shadow-focus-error":be,"--n-box-shadow-active-error":Ee,"--n-box-shadow-hover-error":Ve,"--n-border-error":Be,"--n-border-focus-error":Ot,"--n-border-hover-error":At,"--n-border-active-error":Ft,"--n-clear-size":Bi,"--n-clear-color":Cn,"--n-clear-color-hover":Sn,"--n-clear-color-pressed":go,"--n-arrow-size":_i}}),z=F?et("internal-selection",o.computed(()=>e.size[0]),K,e):void 0;return{mergedTheme:g,mergedClearable:P,mergedClsPrefix:t,rtlEnabled:r,patternInputFocused:v,filterablePlaceholder:H,label:$,selected:k,showTagsPanel:h,isComposing:ue,counterRef:f,counterWrapperRef:u,patternInputMirrorRef:i,patternInputRef:a,selfRef:l,multipleElRef:s,singleElRef:d,patternInputWrapperRef:c,overflowRef:p,inputTagElRef:m,handleMouseDown:de,handleFocusin:Q,handleClear:Z,handleMouseEnter:X,handleMouseLeave:Y,handleDeleteOption:ie,handlePatternKeyDown:U,handlePatternInputInput:ve,handlePatternInputBlur:Ce,handlePatternInputFocus:Se,handleMouseEnterCounter:A,handleMouseLeaveCounter:ne,handleFocusout:N,handleCompositionEnd:re,handleCompositionStart:we,onPopoverUpdateShow:_,focus:Me,focusInput:Re,blur:le,blurInput:Le,updateCounter:Ie,getCounter:De,getTail:Ue,renderLabel:e.renderLabel,cssVars:F?void 0:K,themeClass:z==null?void 0:z.themeClass,onRender:z==null?void 0:z.onRender}},render(){const{status:e,multiple:t,size:n,disabled:r,filterable:i,maxTagCount:a,bordered:l,clsPrefix:s,ellipsisTagPopoverProps:d,onRender:c,renderTag:f,renderLabel:u}=this;c==null||c();const p=a==="responsive",m=typeof a=="number",h=p||m,v=o.h(yr,null,{default:()=>o.h(hs,{clsPrefix:s,loading:this.loading,showArrow:this.showArrow,showClear:this.mergedClearable&&this.selected,onClear:this.handleClear},{default:()=>{var g,P;return(P=(g=this.$slots).arrow)===null||P===void 0?void 0:P.call(g)}})});let w;if(t){const{labelField:g}=this,P=j=>o.h("div",{class:`${s}-base-selection-tag-wrapper`,key:j.value},f?f({option:j,handleClose:()=>{this.handleDeleteOption(j)}}):o.h(gi,{size:n,closable:!j.disabled,disabled:r,onClose:()=>{this.handleDeleteOption(j)},internalCloseIsButtonTag:!1,internalCloseFocusable:!1},{default:()=>u?u(j,!0):ln(j[g],j,!0)})),H=()=>(m?this.selectedOptions.slice(0,a):this.selectedOptions).map(P),$=i?o.h("div",{class:`${s}-base-selection-input-tag`,ref:"inputTagElRef",key:"__input-tag__"},o.h("input",Object.assign({},this.inputProps,{ref:"patternInputRef",tabindex:-1,disabled:r,value:this.pattern,autofocus:this.autofocus,class:`${s}-base-selection-input-tag__input`,onBlur:this.handlePatternInputBlur,onFocus:this.handlePatternInputFocus,onKeydown:this.handlePatternKeyDown,onInput:this.handlePatternInputInput,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd})),o.h("span",{ref:"patternInputMirrorRef",class:`${s}-base-selection-input-tag__mirror`},this.pattern)):null,k=p?()=>o.h("div",{class:`${s}-base-selection-tag-wrapper`,ref:"counterWrapperRef"},o.h(gi,{size:n,ref:"counterRef",onMouseenter:this.handleMouseEnterCounter,onMouseleave:this.handleMouseLeaveCounter,disabled:r})):void 0;let M;if(m){const j=this.selectedOptions.length-a;j>0&&(M=o.h("div",{class:`${s}-base-selection-tag-wrapper`,key:"__counter__"},o.h(gi,{size:n,ref:"counterRef",onMouseenter:this.handleMouseEnterCounter,disabled:r},{default:()=>`+${j}`})))}const b=p?i?o.h(Va,{ref:"overflowRef",updateCounter:this.updateCounter,getCounter:this.getCounter,getTail:this.getTail,style:{width:"100%",display:"flex",overflow:"hidden"}},{default:H,counter:k,tail:()=>$}):o.h(Va,{ref:"overflowRef",updateCounter:this.updateCounter,getCounter:this.getCounter,style:{width:"100%",display:"flex",overflow:"hidden"}},{default:H,counter:k}):m&&M?H().concat(M):H(),S=h?()=>o.h("div",{class:`${s}-base-selection-popover`},p?H():this.selectedOptions.map(P)):void 0,E=h?Object.assign({show:this.showTagsPanel,trigger:"hover",overlap:!0,placement:"top",width:"trigger",onUpdateShow:this.onPopoverUpdateShow,theme:this.mergedTheme.peers.Popover,themeOverrides:this.mergedTheme.peerOverrides.Popover},d):null,O=(this.selected?!1:this.active?!this.pattern&&!this.isComposing:!0)?o.h("div",{class:`${s}-base-selection-placeholder ${s}-base-selection-overlay`},o.h("div",{class:`${s}-base-selection-placeholder__inner`},this.placeholder)):null,V=i?o.h("div",{ref:"patternInputWrapperRef",class:`${s}-base-selection-tags`},b,p?null:$,v):o.h("div",{ref:"multipleElRef",class:`${s}-base-selection-tags`,tabindex:r?void 0:0},b,v);w=o.h(o.Fragment,null,h?o.h(fs,Object.assign({},E,{scrollable:!0,style:"max-height: calc(var(--v-target-height) * 6.6);"}),{trigger:()=>V,default:S}):V,O)}else if(i){const g=this.pattern||this.isComposing,P=this.active?!g:!this.selected,H=this.active?!1:this.selected;w=o.h("div",{ref:"patternInputWrapperRef",class:`${s}-base-selection-label`,title:this.patternInputFocused?void 0:Ki(this.label)},o.h("input",Object.assign({},this.inputProps,{ref:"patternInputRef",class:`${s}-base-selection-input`,value:this.active?this.pattern:"",placeholder:"",readonly:r,disabled:r,tabindex:-1,autofocus:this.autofocus,onFocus:this.handlePatternInputFocus,onBlur:this.handlePatternInputBlur,onInput:this.handlePatternInputInput,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd})),H?o.h("div",{class:`${s}-base-selection-label__render-label ${s}-base-selection-overlay`,key:"input"},o.h("div",{class:`${s}-base-selection-overlay__wrapper`},f?f({option:this.selectedOption,handleClose:()=>{}}):u?u(this.selectedOption,!0):ln(this.label,this.selectedOption,!0))):null,P?o.h("div",{class:`${s}-base-selection-placeholder ${s}-base-selection-overlay`,key:"placeholder"},o.h("div",{class:`${s}-base-selection-overlay__wrapper`},this.filterablePlaceholder)):null,v)}else w=o.h("div",{ref:"singleElRef",class:`${s}-base-selection-label`,tabindex:this.disabled?void 0:0},this.label!==void 0?o.h("div",{class:`${s}-base-selection-input`,title:Ki(this.label),key:"input"},o.h("div",{class:`${s}-base-selection-input__content`},f?f({option:this.selectedOption,handleClose:()=>{}}):u?u(this.selectedOption,!0):ln(this.label,this.selectedOption,!0))):o.h("div",{class:`${s}-base-selection-placeholder ${s}-base-selection-overlay`,key:"placeholder"},o.h("div",{class:`${s}-base-selection-placeholder__inner`},this.placeholder)),v);return o.h("div",{ref:"selfRef",class:[`${s}-base-selection`,this.rtlEnabled&&`${s}-base-selection--rtl`,this.themeClass,e&&`${s}-base-selection--${e}-status`,{[`${s}-base-selection--active`]:this.active,[`${s}-base-selection--selected`]:this.selected||this.active&&this.pattern,[`${s}-base-selection--disabled`]:this.disabled,[`${s}-base-selection--multiple`]:this.multiple,[`${s}-base-selection--focus`]:this.focused}],style:this.cssVars,onClick:this.onClick,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onKeydown:this.onKeydown,onFocusin:this.handleFocusin,onFocusout:this.handleFocusout,onMousedown:this.handleMouseDown},w,l?o.h("div",{class:`${s}-base-selection__border`}):null,l?o.h("div",{class:`${s}-base-selection__state-border`}):null)}}),{cubicBezierEaseInOut:Xt}=bn;function Fm({duration:e=".2s",delay:t=".1s"}={}){return[I("&.fade-in-width-expand-transition-leave-from, &.fade-in-width-expand-transition-enter-to",{opacity:1}),I("&.fade-in-width-expand-transition-leave-to, &.fade-in-width-expand-transition-enter-from",`
|
|
708
|
+
`)])])]),Om=r.defineComponent({name:"InternalSelection",props:Object.assign(Object.assign({},Ce.props),{clsPrefix:{type:String,required:!0},bordered:{type:Boolean,default:void 0},active:Boolean,pattern:{type:String,default:""},placeholder:String,selectedOption:{type:Object,default:null},selectedOptions:{type:Array,default:null},labelField:{type:String,default:"label"},valueField:{type:String,default:"value"},multiple:Boolean,filterable:Boolean,clearable:Boolean,disabled:Boolean,size:{type:String,default:"medium"},loading:Boolean,autofocus:Boolean,showArrow:{type:Boolean,default:!0},inputProps:Object,focused:Boolean,renderTag:Function,onKeydown:Function,onClick:Function,onBlur:Function,onFocus:Function,onDeleteOption:Function,maxTagCount:[String,Number],ellipsisTagPopoverProps:Object,onClear:Function,onPatternInput:Function,onPatternFocus:Function,onPatternBlur:Function,renderLabel:Function,status:String,inlineThemeDisabled:Boolean,ignoreComposition:{type:Boolean,default:!0},onResize:Function}),setup(e){const{mergedClsPrefixRef:t,mergedRtlRef:n}=Je(e),o=Kt("InternalSelection",n,t),i=r.ref(null),a=r.ref(null),l=r.ref(null),s=r.ref(null),d=r.ref(null),c=r.ref(null),f=r.ref(null),u=r.ref(null),b=r.ref(null),m=r.ref(null),h=r.ref(!1),x=r.ref(!1),w=r.ref(!1),g=Ce("InternalSelection","-internal-selection",Im,hs,e,r.toRef(e,"clsPrefix")),P=r.computed(()=>e.clearable&&!e.disabled&&(w.value||e.active)),L=r.computed(()=>e.selectedOption?e.renderTag?e.renderTag({option:e.selectedOption,handleClose:()=>{}}):e.renderLabel?e.renderLabel(e.selectedOption,!0):an(e.selectedOption[e.labelField],e.selectedOption,!0):e.placeholder),$=r.computed(()=>{const C=e.selectedOption;if(C)return C[e.labelField]}),k=r.computed(()=>e.multiple?!!(Array.isArray(e.selectedOptions)&&e.selectedOptions.length):e.selectedOption!==null);function M(){var C;const{value:_}=i;if(_){const{value:re}=a;re&&(re.style.width=`${_.offsetWidth}px`,e.maxTagCount!=="responsive"&&((C=b.value)===null||C===void 0||C.sync({showAllItemsBeforeCalculate:!1})))}}function p(){const{value:C}=m;C&&(C.style.display="none")}function S(){const{value:C}=m;C&&(C.style.display="inline-block")}r.watch(r.toRef(e,"active"),C=>{C||p()}),r.watch(r.toRef(e,"pattern"),()=>{e.multiple&&r.nextTick(M)});function B(C){const{onFocus:_}=e;_&&_(C)}function F(C){const{onBlur:_}=e;_&&_(C)}function I(C){const{onDeleteOption:_}=e;_&&_(C)}function D(C){const{onClear:_}=e;_&&_(C)}function j(C){const{onPatternInput:_}=e;_&&_(C)}function Q(C){var _;(!C.relatedTarget||!(!((_=l.value)===null||_===void 0)&&_.contains(C.relatedTarget)))&&B(C)}function N(C){var _;!((_=l.value)===null||_===void 0)&&_.contains(C.relatedTarget)||F(C)}function Z(C){D(C)}function q(){w.value=!0}function Y(){w.value=!1}function de(C){!e.active||!e.filterable||C.target!==a.value&&C.preventDefault()}function ie(C){I(C)}const ce=r.ref(!1);function U(C){if(C.key==="Backspace"&&!ce.value&&!e.pattern.length){const{selectedOptions:_}=e;_!=null&&_.length&&ie(_[_.length-1])}}let te=null;function ve(C){const{value:_}=i;if(_){const re=C.target.value;_.textContent=re,M()}e.ignoreComposition&&ce.value?te=C:j(C)}function ye(){ce.value=!0}function oe(){ce.value=!1,e.ignoreComposition&&j(te),te=null}function Se(C){var _;x.value=!0,(_=e.onPatternFocus)===null||_===void 0||_.call(e,C)}function we(C){var _;x.value=!1,(_=e.onPatternBlur)===null||_===void 0||_.call(e,C)}function le(){var C,_;if(e.filterable)x.value=!1,(C=c.value)===null||C===void 0||C.blur(),(_=a.value)===null||_===void 0||_.blur();else if(e.multiple){const{value:re}=s;re==null||re.blur()}else{const{value:re}=d;re==null||re.blur()}}function Me(){var C,_,re;e.filterable?(x.value=!1,(C=c.value)===null||C===void 0||C.focus()):e.multiple?(_=s.value)===null||_===void 0||_.focus():(re=d.value)===null||re===void 0||re.focus()}function Re(){const{value:C}=a;C&&(S(),C.focus())}function He(){const{value:C}=a;C&&C.blur()}function Ie(C){const{value:_}=f;_&&_.setTextContent(`+${C}`)}function De(){const{value:C}=u;return C}function Ue(){return a.value}let ke=null;function X(){ke!==null&&window.clearTimeout(ke)}function O(){e.active||(X(),ke=window.setTimeout(()=>{k.value&&(h.value=!0)},100))}function ne(){X()}function E(C){C||(X(),h.value=!1)}r.watch(k,C=>{C||(h.value=!1)}),r.onMounted(()=>{r.watchEffect(()=>{const C=c.value;C&&(e.disabled?C.removeAttribute("tabindex"):C.tabIndex=x.value?-1:0)})}),ja(l,e.onResize);const{inlineThemeDisabled:A}=e,K=r.computed(()=>{const{size:C}=e,{common:{cubicBezierEaseInOut:_},self:{borderRadius:re,color:xe,placeholderColor:Te,textColor:Ne,paddingSingle:Oe,paddingMultiple:Ee,caretColor:Ke,colorDisabled:lt,textColorDisabled:Ye,placeholderColorDisabled:it,colorActive:v,boxShadowFocus:H,boxShadowActive:J,boxShadowHover:ae,border:se,borderFocus:ue,borderHover:fe,borderActive:ge,arrowColor:ze,arrowColorDisabled:ct,loadingColor:qt,colorActiveWarning:yn,boxShadowFocusWarning:Yt,boxShadowActiveWarning:Zt,boxShadowHoverWarning:hr,borderWarning:pr,borderFocusWarning:Vn,borderHoverWarning:Jt,borderActiveWarning:z,colorActiveError:G,boxShadowFocusError:be,boxShadowActiveError:Be,boxShadowHoverError:Ve,borderError:_e,borderFocusError:It,borderHoverError:Ot,borderActiveError:At,clearColor:wn,clearColorHover:Cn,clearColorPressed:br,clearSize:Ei,arrowSize:Bi,[ee("height",C)]:Mi,[ee("fontSize",C)]:Ii}}=g.value,Ln=st(Oe),Hn=st(Ee);return{"--n-bezier":_,"--n-border":se,"--n-border-active":ge,"--n-border-focus":ue,"--n-border-hover":fe,"--n-border-radius":re,"--n-box-shadow-active":J,"--n-box-shadow-focus":H,"--n-box-shadow-hover":ae,"--n-caret-color":Ke,"--n-color":xe,"--n-color-active":v,"--n-color-disabled":lt,"--n-font-size":Ii,"--n-height":Mi,"--n-padding-single-top":Ln.top,"--n-padding-multiple-top":Hn.top,"--n-padding-single-right":Ln.right,"--n-padding-multiple-right":Hn.right,"--n-padding-single-left":Ln.left,"--n-padding-multiple-left":Hn.left,"--n-padding-single-bottom":Ln.bottom,"--n-padding-multiple-bottom":Hn.bottom,"--n-placeholder-color":Te,"--n-placeholder-color-disabled":it,"--n-text-color":Ne,"--n-text-color-disabled":Ye,"--n-arrow-color":ze,"--n-arrow-color-disabled":ct,"--n-loading-color":qt,"--n-color-active-warning":yn,"--n-box-shadow-focus-warning":Yt,"--n-box-shadow-active-warning":Zt,"--n-box-shadow-hover-warning":hr,"--n-border-warning":pr,"--n-border-focus-warning":Vn,"--n-border-hover-warning":Jt,"--n-border-active-warning":z,"--n-color-active-error":G,"--n-box-shadow-focus-error":be,"--n-box-shadow-active-error":Be,"--n-box-shadow-hover-error":Ve,"--n-border-error":_e,"--n-border-focus-error":It,"--n-border-hover-error":Ot,"--n-border-active-error":At,"--n-clear-size":Ei,"--n-clear-color":wn,"--n-clear-color-hover":Cn,"--n-clear-color-pressed":br,"--n-arrow-size":Bi}}),T=A?tt("internal-selection",r.computed(()=>e.size[0]),K,e):void 0;return{mergedTheme:g,mergedClearable:P,mergedClsPrefix:t,rtlEnabled:o,patternInputFocused:x,filterablePlaceholder:L,label:$,selected:k,showTagsPanel:h,isComposing:ce,counterRef:f,counterWrapperRef:u,patternInputMirrorRef:i,patternInputRef:a,selfRef:l,multipleElRef:s,singleElRef:d,patternInputWrapperRef:c,overflowRef:b,inputTagElRef:m,handleMouseDown:de,handleFocusin:Q,handleClear:Z,handleMouseEnter:q,handleMouseLeave:Y,handleDeleteOption:ie,handlePatternKeyDown:U,handlePatternInputInput:ve,handlePatternInputBlur:we,handlePatternInputFocus:Se,handleMouseEnterCounter:O,handleMouseLeaveCounter:ne,handleFocusout:N,handleCompositionEnd:oe,handleCompositionStart:ye,onPopoverUpdateShow:E,focus:Me,focusInput:Re,blur:le,blurInput:He,updateCounter:Ie,getCounter:De,getTail:Ue,renderLabel:e.renderLabel,cssVars:A?void 0:K,themeClass:T==null?void 0:T.themeClass,onRender:T==null?void 0:T.onRender}},render(){const{status:e,multiple:t,size:n,disabled:o,filterable:i,maxTagCount:a,bordered:l,clsPrefix:s,ellipsisTagPopoverProps:d,onRender:c,renderTag:f,renderLabel:u}=this;c==null||c();const b=a==="responsive",m=typeof a=="number",h=b||m,x=r.h(wo,null,{default:()=>r.h(fs,{clsPrefix:s,loading:this.loading,showArrow:this.showArrow,showClear:this.mergedClearable&&this.selected,onClear:this.handleClear},{default:()=>{var g,P;return(P=(g=this.$slots).arrow)===null||P===void 0?void 0:P.call(g)}})});let w;if(t){const{labelField:g}=this,P=j=>r.h("div",{class:`${s}-base-selection-tag-wrapper`,key:j.value},f?f({option:j,handleClose:()=>{this.handleDeleteOption(j)}}):r.h(mi,{size:n,closable:!j.disabled,disabled:o,onClose:()=>{this.handleDeleteOption(j)},internalCloseIsButtonTag:!1,internalCloseFocusable:!1},{default:()=>u?u(j,!0):an(j[g],j,!0)})),L=()=>(m?this.selectedOptions.slice(0,a):this.selectedOptions).map(P),$=i?r.h("div",{class:`${s}-base-selection-input-tag`,ref:"inputTagElRef",key:"__input-tag__"},r.h("input",Object.assign({},this.inputProps,{ref:"patternInputRef",tabindex:-1,disabled:o,value:this.pattern,autofocus:this.autofocus,class:`${s}-base-selection-input-tag__input`,onBlur:this.handlePatternInputBlur,onFocus:this.handlePatternInputFocus,onKeydown:this.handlePatternKeyDown,onInput:this.handlePatternInputInput,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd})),r.h("span",{ref:"patternInputMirrorRef",class:`${s}-base-selection-input-tag__mirror`},this.pattern)):null,k=b?()=>r.h("div",{class:`${s}-base-selection-tag-wrapper`,ref:"counterWrapperRef"},r.h(mi,{size:n,ref:"counterRef",onMouseenter:this.handleMouseEnterCounter,onMouseleave:this.handleMouseLeaveCounter,disabled:o})):void 0;let M;if(m){const j=this.selectedOptions.length-a;j>0&&(M=r.h("div",{class:`${s}-base-selection-tag-wrapper`,key:"__counter__"},r.h(mi,{size:n,ref:"counterRef",onMouseenter:this.handleMouseEnterCounter,disabled:o},{default:()=>`+${j}`})))}const p=b?i?r.h(Va,{ref:"overflowRef",updateCounter:this.updateCounter,getCounter:this.getCounter,getTail:this.getTail,style:{width:"100%",display:"flex",overflow:"hidden"}},{default:L,counter:k,tail:()=>$}):r.h(Va,{ref:"overflowRef",updateCounter:this.updateCounter,getCounter:this.getCounter,style:{width:"100%",display:"flex",overflow:"hidden"}},{default:L,counter:k}):m&&M?L().concat(M):L(),S=h?()=>r.h("div",{class:`${s}-base-selection-popover`},b?L():this.selectedOptions.map(P)):void 0,B=h?Object.assign({show:this.showTagsPanel,trigger:"hover",overlap:!0,placement:"top",width:"trigger",onUpdateShow:this.onPopoverUpdateShow,theme:this.mergedTheme.peers.Popover,themeOverrides:this.mergedTheme.peerOverrides.Popover},d):null,I=(this.selected?!1:this.active?!this.pattern&&!this.isComposing:!0)?r.h("div",{class:`${s}-base-selection-placeholder ${s}-base-selection-overlay`},r.h("div",{class:`${s}-base-selection-placeholder__inner`},this.placeholder)):null,D=i?r.h("div",{ref:"patternInputWrapperRef",class:`${s}-base-selection-tags`},p,b?null:$,x):r.h("div",{ref:"multipleElRef",class:`${s}-base-selection-tags`,tabindex:o?void 0:0},p,x);w=r.h(r.Fragment,null,h?r.h(us,Object.assign({},B,{scrollable:!0,style:"max-height: calc(var(--v-target-height) * 6.6);"}),{trigger:()=>D,default:S}):D,I)}else if(i){const g=this.pattern||this.isComposing,P=this.active?!g:!this.selected,L=this.active?!1:this.selected;w=r.h("div",{ref:"patternInputWrapperRef",class:`${s}-base-selection-label`,title:this.patternInputFocused?void 0:Xi(this.label)},r.h("input",Object.assign({},this.inputProps,{ref:"patternInputRef",class:`${s}-base-selection-input`,value:this.active?this.pattern:"",placeholder:"",readonly:o,disabled:o,tabindex:-1,autofocus:this.autofocus,onFocus:this.handlePatternInputFocus,onBlur:this.handlePatternInputBlur,onInput:this.handlePatternInputInput,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd})),L?r.h("div",{class:`${s}-base-selection-label__render-label ${s}-base-selection-overlay`,key:"input"},r.h("div",{class:`${s}-base-selection-overlay__wrapper`},f?f({option:this.selectedOption,handleClose:()=>{}}):u?u(this.selectedOption,!0):an(this.label,this.selectedOption,!0))):null,P?r.h("div",{class:`${s}-base-selection-placeholder ${s}-base-selection-overlay`,key:"placeholder"},r.h("div",{class:`${s}-base-selection-overlay__wrapper`},this.filterablePlaceholder)):null,x)}else w=r.h("div",{ref:"singleElRef",class:`${s}-base-selection-label`,tabindex:this.disabled?void 0:0},this.label!==void 0?r.h("div",{class:`${s}-base-selection-input`,title:Xi(this.label),key:"input"},r.h("div",{class:`${s}-base-selection-input__content`},f?f({option:this.selectedOption,handleClose:()=>{}}):u?u(this.selectedOption,!0):an(this.label,this.selectedOption,!0))):r.h("div",{class:`${s}-base-selection-placeholder ${s}-base-selection-overlay`,key:"placeholder"},r.h("div",{class:`${s}-base-selection-placeholder__inner`},this.placeholder)),x);return r.h("div",{ref:"selfRef",class:[`${s}-base-selection`,this.rtlEnabled&&`${s}-base-selection--rtl`,this.themeClass,e&&`${s}-base-selection--${e}-status`,{[`${s}-base-selection--active`]:this.active,[`${s}-base-selection--selected`]:this.selected||this.active&&this.pattern,[`${s}-base-selection--disabled`]:this.disabled,[`${s}-base-selection--multiple`]:this.multiple,[`${s}-base-selection--focus`]:this.focused}],style:this.cssVars,onClick:this.onClick,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onKeydown:this.onKeydown,onFocusin:this.handleFocusin,onFocusout:this.handleFocusout,onMousedown:this.handleMouseDown},w,l?r.h("div",{class:`${s}-base-selection__border`}):null,l?r.h("div",{class:`${s}-base-selection__state-border`}):null)}}),{cubicBezierEaseInOut:Xt}=pn;function Am({duration:e=".2s",delay:t=".1s"}={}){return[V("&.fade-in-width-expand-transition-leave-from, &.fade-in-width-expand-transition-enter-to",{opacity:1}),V("&.fade-in-width-expand-transition-leave-to, &.fade-in-width-expand-transition-enter-from",`
|
|
709
709
|
opacity: 0!important;
|
|
710
710
|
margin-left: 0!important;
|
|
711
711
|
margin-right: 0!important;
|
|
712
|
-
`),
|
|
712
|
+
`),V("&.fade-in-width-expand-transition-leave-active",`
|
|
713
713
|
overflow: hidden;
|
|
714
714
|
transition:
|
|
715
715
|
opacity ${e} ${Xt},
|
|
716
716
|
max-width ${e} ${Xt} ${t},
|
|
717
717
|
margin-left ${e} ${Xt} ${t},
|
|
718
718
|
margin-right ${e} ${Xt} ${t};
|
|
719
|
-
`),
|
|
719
|
+
`),V("&.fade-in-width-expand-transition-enter-active",`
|
|
720
720
|
overflow: hidden;
|
|
721
721
|
transition:
|
|
722
722
|
opacity ${e} ${Xt} ${t},
|
|
723
723
|
max-width ${e} ${Xt},
|
|
724
724
|
margin-left ${e} ${Xt},
|
|
725
725
|
margin-right ${e} ${Xt};
|
|
726
|
-
`)]}const
|
|
727
|
-
&.fade-in-height-expand-transition-${d}-to`,Object.assign(Object.assign({},a),{opacity:1})),
|
|
728
|
-
&.fade-in-height-expand-transition-${d}-from`,Object.assign(Object.assign({},l),{opacity:0,marginTop:"0 !important",marginBottom:"0 !important",paddingTop:i?"0 !important":void 0,paddingBottom:i?"0 !important":void 0})),
|
|
726
|
+
`)]}const Fm={iconMargin:"11px 8px 0 12px",iconMarginRtl:"11px 12px 0 8px",iconSize:"24px",closeIconSize:"16px",closeSize:"20px",closeMargin:"13px 14px 0 0",closeMarginRtl:"13px 0 0 14px",padding:"13px"};function Dm(e){const{lineHeight:t,borderRadius:n,fontWeightStrong:o,baseColor:i,dividerColor:a,actionColor:l,textColor1:s,textColor2:d,closeColorHover:c,closeColorPressed:f,closeIconColor:u,closeIconColorHover:b,closeIconColorPressed:m,infoColor:h,successColor:x,warningColor:w,errorColor:g,fontSize:P}=e;return Object.assign(Object.assign({},Fm),{fontSize:P,lineHeight:t,titleFontWeight:o,borderRadius:n,border:`1px solid ${a}`,color:l,titleTextColor:s,iconColor:d,contentTextColor:d,closeBorderRadius:n,closeColorHover:c,closeColorPressed:f,closeIconColor:u,closeIconColorHover:b,closeIconColorPressed:m,borderInfo:`1px solid ${ut(i,me(h,{alpha:.25}))}`,colorInfo:ut(i,me(h,{alpha:.08})),titleTextColorInfo:s,iconColorInfo:h,contentTextColorInfo:d,closeColorHoverInfo:c,closeColorPressedInfo:f,closeIconColorInfo:u,closeIconColorHoverInfo:b,closeIconColorPressedInfo:m,borderSuccess:`1px solid ${ut(i,me(x,{alpha:.25}))}`,colorSuccess:ut(i,me(x,{alpha:.08})),titleTextColorSuccess:s,iconColorSuccess:x,contentTextColorSuccess:d,closeColorHoverSuccess:c,closeColorPressedSuccess:f,closeIconColorSuccess:u,closeIconColorHoverSuccess:b,closeIconColorPressedSuccess:m,borderWarning:`1px solid ${ut(i,me(w,{alpha:.33}))}`,colorWarning:ut(i,me(w,{alpha:.08})),titleTextColorWarning:s,iconColorWarning:w,contentTextColorWarning:d,closeColorHoverWarning:c,closeColorPressedWarning:f,closeIconColorWarning:u,closeIconColorHoverWarning:b,closeIconColorPressedWarning:m,borderError:`1px solid ${ut(i,me(g,{alpha:.25}))}`,colorError:ut(i,me(g,{alpha:.08})),titleTextColorError:s,iconColorError:g,contentTextColorError:d,closeColorHoverError:c,closeColorPressedError:f,closeIconColorError:u,closeIconColorHoverError:b,closeIconColorPressedError:m})}const Vm={name:"Alert",common:et,self:Dm},{cubicBezierEaseInOut:zt,cubicBezierEaseOut:Lm,cubicBezierEaseIn:Hm}=pn;function Nm({overflow:e="hidden",duration:t=".3s",originalTransition:n="",leavingDelay:o="0s",foldPadding:i=!1,enterToProps:a=void 0,leaveToProps:l=void 0,reverse:s=!1}={}){const d=s?"leave":"enter",c=s?"enter":"leave";return[V(`&.fade-in-height-expand-transition-${c}-from,
|
|
727
|
+
&.fade-in-height-expand-transition-${d}-to`,Object.assign(Object.assign({},a),{opacity:1})),V(`&.fade-in-height-expand-transition-${c}-to,
|
|
728
|
+
&.fade-in-height-expand-transition-${d}-from`,Object.assign(Object.assign({},l),{opacity:0,marginTop:"0 !important",marginBottom:"0 !important",paddingTop:i?"0 !important":void 0,paddingBottom:i?"0 !important":void 0})),V(`&.fade-in-height-expand-transition-${c}-active`,`
|
|
729
729
|
overflow: ${e};
|
|
730
730
|
transition:
|
|
731
|
-
max-height ${t} ${
|
|
732
|
-
opacity ${t} ${Lm} ${
|
|
733
|
-
margin-top ${t} ${
|
|
734
|
-
margin-bottom ${t} ${
|
|
735
|
-
padding-top ${t} ${
|
|
736
|
-
padding-bottom ${t} ${
|
|
731
|
+
max-height ${t} ${zt} ${o},
|
|
732
|
+
opacity ${t} ${Lm} ${o},
|
|
733
|
+
margin-top ${t} ${zt} ${o},
|
|
734
|
+
margin-bottom ${t} ${zt} ${o},
|
|
735
|
+
padding-top ${t} ${zt} ${o},
|
|
736
|
+
padding-bottom ${t} ${zt} ${o}
|
|
737
737
|
${n?`,${n}`:""}
|
|
738
|
-
`),
|
|
738
|
+
`),V(`&.fade-in-height-expand-transition-${d}-active`,`
|
|
739
739
|
overflow: ${e};
|
|
740
740
|
transition:
|
|
741
|
-
max-height ${t} ${
|
|
742
|
-
opacity ${t} ${
|
|
743
|
-
margin-top ${t} ${
|
|
744
|
-
margin-bottom ${t} ${
|
|
745
|
-
padding-top ${t} ${
|
|
746
|
-
padding-bottom ${t} ${
|
|
741
|
+
max-height ${t} ${zt},
|
|
742
|
+
opacity ${t} ${Hm},
|
|
743
|
+
margin-top ${t} ${zt},
|
|
744
|
+
margin-bottom ${t} ${zt},
|
|
745
|
+
padding-top ${t} ${zt},
|
|
746
|
+
padding-bottom ${t} ${zt}
|
|
747
747
|
${n?`,${n}`:""}
|
|
748
|
-
`)]}const
|
|
748
|
+
`)]}const Wm=y("alert",`
|
|
749
749
|
line-height: var(--n-line-height);
|
|
750
750
|
border-radius: var(--n-border-radius);
|
|
751
751
|
position: relative;
|
|
@@ -753,7 +753,7 @@ ${t}
|
|
|
753
753
|
background-color: var(--n-color);
|
|
754
754
|
text-align: start;
|
|
755
755
|
word-break: break-word;
|
|
756
|
-
`,[
|
|
756
|
+
`,[R("border",`
|
|
757
757
|
border-radius: inherit;
|
|
758
758
|
position: absolute;
|
|
759
759
|
left: 0;
|
|
@@ -763,9 +763,9 @@ ${t}
|
|
|
763
763
|
transition: border-color .3s var(--n-bezier);
|
|
764
764
|
border: var(--n-border);
|
|
765
765
|
pointer-events: none;
|
|
766
|
-
`),W("closable",[y("alert-body",[
|
|
766
|
+
`),W("closable",[y("alert-body",[R("title",`
|
|
767
767
|
padding-right: 24px;
|
|
768
|
-
`)])]),
|
|
768
|
+
`)])]),R("icon",{color:"var(--n-icon-color)"}),y("alert-body",{padding:"var(--n-padding)"},[R("title",{color:"var(--n-title-text-color)"}),R("content",{color:"var(--n-content-text-color)"})]),Nm({originalTransition:"transform .3s var(--n-bezier)",enterToProps:{transform:"scale(1)"},leaveToProps:{transform:"scale(0.9)"}}),R("icon",`
|
|
769
769
|
position: absolute;
|
|
770
770
|
left: 0;
|
|
771
771
|
top: 0;
|
|
@@ -776,7 +776,7 @@ ${t}
|
|
|
776
776
|
height: var(--n-icon-size);
|
|
777
777
|
font-size: var(--n-icon-size);
|
|
778
778
|
margin: var(--n-icon-margin);
|
|
779
|
-
`),
|
|
779
|
+
`),R("close",`
|
|
780
780
|
transition:
|
|
781
781
|
color .3s var(--n-bezier),
|
|
782
782
|
background-color .3s var(--n-bezier);
|
|
@@ -787,12 +787,12 @@ ${t}
|
|
|
787
787
|
`),W("show-icon",[y("alert-body",{paddingLeft:"calc(var(--n-icon-margin-left) + var(--n-icon-size) + var(--n-icon-margin-right))"})]),W("right-adjust",[y("alert-body",{paddingRight:"calc(var(--n-close-size) + var(--n-padding) + 2px)"})]),y("alert-body",`
|
|
788
788
|
border-radius: var(--n-border-radius);
|
|
789
789
|
transition: border-color .3s var(--n-bezier);
|
|
790
|
-
`,[
|
|
790
|
+
`,[R("title",`
|
|
791
791
|
transition: color .3s var(--n-bezier);
|
|
792
792
|
font-size: 16px;
|
|
793
793
|
line-height: 19px;
|
|
794
794
|
font-weight: var(--n-title-font-weight);
|
|
795
|
-
`,[
|
|
795
|
+
`,[V("& +",[R("content",{marginTop:"9px"})])]),R("content",{transition:"color .3s var(--n-bezier)",fontSize:"var(--n-font-size)"})]),R("icon",{transition:"color .3s var(--n-bezier)"})]),jm=Object.assign(Object.assign({},Ce.props),{title:String,showIcon:{type:Boolean,default:!0},type:{type:String,default:"default"},bordered:{type:Boolean,default:!0},closable:Boolean,onClose:Function,onAfterLeave:Function,onAfterHide:Function}),xi=r.defineComponent({name:"Alert",inheritAttrs:!1,props:jm,setup(e){process.env.NODE_ENV!=="production"&&r.watchEffect(()=>{e.onAfterHide!==void 0&&Qe("alert","`on-after-hide` is deprecated, please use `on-after-leave` instead.")});const{mergedClsPrefixRef:t,mergedBorderedRef:n,inlineThemeDisabled:o,mergedRtlRef:i}=Je(e),a=Ce("Alert","-alert",Wm,Vm,e,t),l=Kt("Alert",i,t),s=r.computed(()=>{const{common:{cubicBezierEaseInOut:m},self:h}=a.value,{fontSize:x,borderRadius:w,titleFontWeight:g,lineHeight:P,iconSize:L,iconMargin:$,iconMarginRtl:k,closeIconSize:M,closeBorderRadius:p,closeSize:S,closeMargin:B,closeMarginRtl:F,padding:I}=h,{type:D}=e,{left:j,right:Q}=st($);return{"--n-bezier":m,"--n-color":h[ee("color",D)],"--n-close-icon-size":M,"--n-close-border-radius":p,"--n-close-color-hover":h[ee("closeColorHover",D)],"--n-close-color-pressed":h[ee("closeColorPressed",D)],"--n-close-icon-color":h[ee("closeIconColor",D)],"--n-close-icon-color-hover":h[ee("closeIconColorHover",D)],"--n-close-icon-color-pressed":h[ee("closeIconColorPressed",D)],"--n-icon-color":h[ee("iconColor",D)],"--n-border":h[ee("border",D)],"--n-title-text-color":h[ee("titleTextColor",D)],"--n-content-text-color":h[ee("contentTextColor",D)],"--n-line-height":P,"--n-border-radius":w,"--n-font-size":x,"--n-title-font-weight":g,"--n-icon-size":L,"--n-icon-margin":$,"--n-icon-margin-rtl":k,"--n-close-size":S,"--n-close-margin":B,"--n-close-margin-rtl":F,"--n-padding":I,"--n-icon-margin-left":j,"--n-icon-margin-right":Q}}),d=o?tt("alert",r.computed(()=>e.type[0]),s,e):void 0,c=r.ref(!0),f=()=>{const{onAfterLeave:m,onAfterHide:h}=e;m&&m(),h&&h()};return{rtlEnabled:l,mergedClsPrefix:t,mergedBordered:n,visible:c,handleCloseClick:()=>{var m;Promise.resolve((m=e.onClose)===null||m===void 0?void 0:m.call(e)).then(h=>{h!==!1&&(c.value=!1)})},handleAfterLeave:()=>{f()},mergedTheme:a,cssVars:o?void 0:s,themeClass:d==null?void 0:d.themeClass,onRender:d==null?void 0:d.onRender}},render(){var e;return(e=this.onRender)===null||e===void 0||e.call(this),r.h(Xl,{onAfterLeave:this.handleAfterLeave},{default:()=>{const{mergedClsPrefix:t,$slots:n}=this,o={class:[`${t}-alert`,this.themeClass,this.closable&&`${t}-alert--closable`,this.showIcon&&`${t}-alert--show-icon`,!this.title&&this.closable&&`${t}-alert--right-adjust`,this.rtlEnabled&&`${t}-alert--rtl`],style:this.cssVars,role:"alert"};return this.visible?r.h("div",Object.assign({},r.mergeProps(this.$attrs,o)),this.closable&&r.h(li,{clsPrefix:t,class:`${t}-alert__close`,onClick:this.handleCloseClick}),this.bordered&&r.h("div",{class:`${t}-alert__border`}),this.showIcon&&r.h("div",{class:`${t}-alert__icon`,"aria-hidden":"true"},Ct(n.icon,()=>[r.h(gt,{clsPrefix:t},{default:()=>{switch(this.type){case"success":return r.h(hg,null);case"info":return r.h(ug,null);case"warning":return r.h(pg,null);case"error":return r.h(cg,null);default:return null}}})])),r.h("div",{class:[`${t}-alert-body`,this.mergedBordered&&`${t}-alert-body--bordered`]},Ae(n.header,i=>{const a=i||this.title;return a?r.h("div",{class:`${t}-alert-body__title`},a):null}),n.default&&r.h("div",{class:`${t}-alert-body__content`},n))):null}})}});function Qr(e){return e.type==="group"}function ps(e){return e.type==="ignored"}function yi(e,t){try{return!!(1+t.toString().toLowerCase().indexOf(e.trim().toLowerCase()))}catch{return!1}}function Um(e,t){return{getIsGroup:Qr,getIgnored:ps,getKey(o){return Qr(o)?o.name||o.key||"key-required":o[e]},getChildren(o){return o[t]}}}function Gm(e,t,n,o){if(!t)return e;function i(a){if(!Array.isArray(a))return[];const l=[];for(const s of a)if(Qr(s)){const d=i(s[o]);d.length&&l.push(Object.assign({},s,{[o]:d}))}else{if(ps(s))continue;t(n,s)&&l.push(s)}return l}return i(e)}function Km(e,t,n){const o=new Map;return e.forEach(i=>{Qr(i)?i[n].forEach(a=>{o.set(a[t],a)}):o.set(i[t],i)}),o}const Xm=kr&&"chrome"in window;kr&&navigator.userAgent.includes("Firefox");const bs=kr&&navigator.userAgent.includes("Safari")&&!Xm,qm={paddingTiny:"0 8px",paddingSmall:"0 10px",paddingMedium:"0 12px",paddingLarge:"0 14px",clearSize:"16px"};function Ym(e){const{textColor2:t,textColor3:n,textColorDisabled:o,primaryColor:i,primaryColorHover:a,inputColor:l,inputColorDisabled:s,borderColor:d,warningColor:c,warningColorHover:f,errorColor:u,errorColorHover:b,borderRadius:m,lineHeight:h,fontSizeTiny:x,fontSizeSmall:w,fontSizeMedium:g,fontSizeLarge:P,heightTiny:L,heightSmall:$,heightMedium:k,heightLarge:M,actionColor:p,clearColor:S,clearColorHover:B,clearColorPressed:F,placeholderColor:I,placeholderColorDisabled:D,iconColor:j,iconColorDisabled:Q,iconColorHover:N,iconColorPressed:Z}=e;return Object.assign(Object.assign({},qm),{countTextColorDisabled:o,countTextColor:n,heightTiny:L,heightSmall:$,heightMedium:k,heightLarge:M,fontSizeTiny:x,fontSizeSmall:w,fontSizeMedium:g,fontSizeLarge:P,lineHeight:h,lineHeightTextarea:h,borderRadius:m,iconSize:"16px",groupLabelColor:p,groupLabelTextColor:t,textColor:t,textColorDisabled:o,textDecorationColor:t,caretColor:i,placeholderColor:I,placeholderColorDisabled:D,color:l,colorDisabled:s,colorFocus:l,groupLabelBorder:`1px solid ${d}`,border:`1px solid ${d}`,borderHover:`1px solid ${a}`,borderDisabled:`1px solid ${d}`,borderFocus:`1px solid ${a}`,boxShadowFocus:`0 0 0 2px ${me(i,{alpha:.2})}`,loadingColor:i,loadingColorWarning:c,borderWarning:`1px solid ${c}`,borderHoverWarning:`1px solid ${f}`,colorFocusWarning:l,borderFocusWarning:`1px solid ${f}`,boxShadowFocusWarning:`0 0 0 2px ${me(c,{alpha:.2})}`,caretColorWarning:c,loadingColorError:u,borderError:`1px solid ${u}`,borderHoverError:`1px solid ${b}`,colorFocusError:l,borderFocusError:`1px solid ${b}`,boxShadowFocusError:`0 0 0 2px ${me(u,{alpha:.2})}`,caretColorError:u,clearColor:S,clearColorHover:B,clearColorPressed:F,iconColor:j,iconColorDisabled:Q,iconColorHover:N,iconColorPressed:Z,suffixTextColor:t})}const wi={name:"Input",common:et,self:Ym},gs="n-input";function Zm(e){let t=0;for(const n of e)t++;return t}function eo(e){return e===""||e==null}function Jm(e){const t=r.ref(null);function n(){const{value:a}=e;if(!(a!=null&&a.focus)){i();return}const{selectionStart:l,selectionEnd:s,value:d}=a;if(l==null||s==null){i();return}t.value={start:l,end:s,beforeText:d.slice(0,l),afterText:d.slice(s)}}function o(){var a;const{value:l}=t,{value:s}=e;if(!l||!s)return;const{value:d}=s,{start:c,beforeText:f,afterText:u}=l;let b=d.length;if(d.endsWith(u))b=d.length-u.length;else if(d.startsWith(f))b=f.length;else{const m=f[c-1],h=d.indexOf(m,c-1);h!==-1&&(b=h+1)}(a=s.setSelectionRange)===null||a===void 0||a.call(s,b,b)}function i(){t.value=null}return r.watch(e,i),{recordCursor:n,restoreCursor:o}}const ms=r.defineComponent({name:"InputWordCount",setup(e,{slots:t}){const{mergedValueRef:n,maxlengthRef:o,mergedClsPrefixRef:i,countGraphemesRef:a}=r.inject(gs),l=r.computed(()=>{const{value:s}=n;return s===null||Array.isArray(s)?0:(a.value||Zm)(s)});return()=>{const{value:s}=o,{value:d}=n;return r.h("span",{class:`${i.value}-input-word-count`},id(t.default,{value:d===null||Array.isArray(d)?"":d},()=>[s===void 0?l.value:`${l.value} / ${s}`]))}}}),Qm=y("input",`
|
|
796
796
|
max-width: 100%;
|
|
797
797
|
cursor: text;
|
|
798
798
|
line-height: 1.5;
|
|
@@ -806,11 +806,11 @@ ${t}
|
|
|
806
806
|
transition: background-color .3s var(--n-bezier);
|
|
807
807
|
font-size: var(--n-font-size);
|
|
808
808
|
--n-padding-vertical: calc((var(--n-height) - 1.5 * var(--n-font-size)) / 2);
|
|
809
|
-
`,[
|
|
809
|
+
`,[R("input, textarea",`
|
|
810
810
|
overflow: hidden;
|
|
811
811
|
flex-grow: 1;
|
|
812
812
|
position: relative;
|
|
813
|
-
`),
|
|
813
|
+
`),R("input-el, textarea-el, input-mirror, textarea-mirror, separator, placeholder",`
|
|
814
814
|
box-sizing: border-box;
|
|
815
815
|
font-size: inherit;
|
|
816
816
|
line-height: 1.5;
|
|
@@ -824,7 +824,7 @@ ${t}
|
|
|
824
824
|
caret-color .3s var(--n-bezier),
|
|
825
825
|
color .3s var(--n-bezier),
|
|
826
826
|
text-decoration-color .3s var(--n-bezier);
|
|
827
|
-
`),
|
|
827
|
+
`),R("input-el, textarea-el",`
|
|
828
828
|
-webkit-appearance: none;
|
|
829
829
|
scrollbar-width: none;
|
|
830
830
|
width: 100%;
|
|
@@ -833,14 +833,14 @@ ${t}
|
|
|
833
833
|
color: var(--n-text-color);
|
|
834
834
|
caret-color: var(--n-caret-color);
|
|
835
835
|
background-color: transparent;
|
|
836
|
-
`,[
|
|
836
|
+
`,[V("&::-webkit-scrollbar, &::-webkit-scrollbar-track-piece, &::-webkit-scrollbar-thumb",`
|
|
837
837
|
width: 0;
|
|
838
838
|
height: 0;
|
|
839
839
|
display: none;
|
|
840
|
-
`),
|
|
840
|
+
`),V("&::placeholder",`
|
|
841
841
|
color: #0000;
|
|
842
842
|
-webkit-text-fill-color: transparent !important;
|
|
843
|
-
`),
|
|
843
|
+
`),V("&:-webkit-autofill ~",[R("placeholder","display: none;")])]),W("round",[je("textarea","border-radius: calc(var(--n-height) / 2);")]),R("placeholder",`
|
|
844
844
|
pointer-events: none;
|
|
845
845
|
position: absolute;
|
|
846
846
|
left: 0;
|
|
@@ -849,10 +849,10 @@ ${t}
|
|
|
849
849
|
bottom: 0;
|
|
850
850
|
overflow: hidden;
|
|
851
851
|
color: var(--n-placeholder-color);
|
|
852
|
-
`,[
|
|
852
|
+
`,[V("span",`
|
|
853
853
|
width: 100%;
|
|
854
854
|
display: inline-block;
|
|
855
|
-
`)]),W("textarea",[
|
|
855
|
+
`)]),W("textarea",[R("placeholder","overflow: visible;")]),je("autosize","width: 100%;"),W("autosize",[R("textarea-el, input-el",`
|
|
856
856
|
position: absolute;
|
|
857
857
|
top: 0;
|
|
858
858
|
left: 0;
|
|
@@ -864,7 +864,7 @@ ${t}
|
|
|
864
864
|
position: relative;
|
|
865
865
|
padding-left: var(--n-padding-left);
|
|
866
866
|
padding-right: var(--n-padding-right);
|
|
867
|
-
`),
|
|
867
|
+
`),R("input-mirror",`
|
|
868
868
|
padding: 0;
|
|
869
869
|
height: var(--n-height);
|
|
870
870
|
line-height: var(--n-height);
|
|
@@ -873,14 +873,14 @@ ${t}
|
|
|
873
873
|
position: static;
|
|
874
874
|
white-space: pre;
|
|
875
875
|
pointer-events: none;
|
|
876
|
-
`),
|
|
876
|
+
`),R("input-el",`
|
|
877
877
|
padding: 0;
|
|
878
878
|
height: var(--n-height);
|
|
879
879
|
line-height: var(--n-height);
|
|
880
|
-
`,[
|
|
880
|
+
`,[V("&[type=password]::-ms-reveal","display: none;"),V("+",[R("placeholder",`
|
|
881
881
|
display: flex;
|
|
882
882
|
align-items: center;
|
|
883
|
-
`)])]),je("textarea",[
|
|
883
|
+
`)])]),je("textarea",[R("placeholder","white-space: nowrap;")]),R("eye",`
|
|
884
884
|
display: flex;
|
|
885
885
|
align-items: center;
|
|
886
886
|
justify-content: center;
|
|
@@ -892,7 +892,7 @@ ${t}
|
|
|
892
892
|
`),W("resizable",[y("input-wrapper",`
|
|
893
893
|
resize: vertical;
|
|
894
894
|
min-height: var(--n-height);
|
|
895
|
-
`)]),
|
|
895
|
+
`)]),R("textarea-el, textarea-mirror, placeholder",`
|
|
896
896
|
height: 100%;
|
|
897
897
|
padding-left: 0;
|
|
898
898
|
padding-right: 0;
|
|
@@ -907,7 +907,7 @@ ${t}
|
|
|
907
907
|
resize: none;
|
|
908
908
|
white-space: pre-wrap;
|
|
909
909
|
scroll-padding-block-end: var(--n-padding-vertical);
|
|
910
|
-
`),
|
|
910
|
+
`),R("textarea-mirror",`
|
|
911
911
|
width: 100%;
|
|
912
912
|
pointer-events: none;
|
|
913
913
|
overflow: hidden;
|
|
@@ -915,7 +915,7 @@ ${t}
|
|
|
915
915
|
position: static;
|
|
916
916
|
white-space: pre-wrap;
|
|
917
917
|
overflow-wrap: break-word;
|
|
918
|
-
`)]),W("pair",[
|
|
918
|
+
`)]),W("pair",[R("input-el, placeholder","text-align: center;"),R("separator",`
|
|
919
919
|
display: flex;
|
|
920
920
|
align-items: center;
|
|
921
921
|
transition: color .3s var(--n-bezier);
|
|
@@ -928,31 +928,31 @@ ${t}
|
|
|
928
928
|
`)])]),W("disabled",`
|
|
929
929
|
cursor: not-allowed;
|
|
930
930
|
background-color: var(--n-color-disabled);
|
|
931
|
-
`,[
|
|
931
|
+
`,[R("border","border: var(--n-border-disabled);"),R("input-el, textarea-el",`
|
|
932
932
|
cursor: not-allowed;
|
|
933
933
|
color: var(--n-text-color-disabled);
|
|
934
934
|
text-decoration-color: var(--n-text-color-disabled);
|
|
935
|
-
`),
|
|
935
|
+
`),R("placeholder","color: var(--n-placeholder-color-disabled);"),R("separator","color: var(--n-text-color-disabled);",[y("icon",`
|
|
936
936
|
color: var(--n-icon-color-disabled);
|
|
937
937
|
`),y("base-icon",`
|
|
938
938
|
color: var(--n-icon-color-disabled);
|
|
939
939
|
`)]),y("input-word-count",`
|
|
940
940
|
color: var(--n-count-text-color-disabled);
|
|
941
|
-
`),
|
|
941
|
+
`),R("suffix, prefix","color: var(--n-text-color-disabled);",[y("icon",`
|
|
942
942
|
color: var(--n-icon-color-disabled);
|
|
943
943
|
`),y("internal-icon",`
|
|
944
944
|
color: var(--n-icon-color-disabled);
|
|
945
|
-
`)])]),je("disabled",[
|
|
945
|
+
`)])]),je("disabled",[R("eye",`
|
|
946
946
|
color: var(--n-icon-color);
|
|
947
947
|
cursor: pointer;
|
|
948
|
-
`,[
|
|
948
|
+
`,[V("&:hover",`
|
|
949
949
|
color: var(--n-icon-color-hover);
|
|
950
|
-
`),
|
|
950
|
+
`),V("&:active",`
|
|
951
951
|
color: var(--n-icon-color-pressed);
|
|
952
|
-
`)]),
|
|
952
|
+
`)]),V("&:hover",[R("state-border","border: var(--n-border-hover);")]),W("focus","background-color: var(--n-color-focus);",[R("state-border",`
|
|
953
953
|
border: var(--n-border-focus);
|
|
954
954
|
box-shadow: var(--n-box-shadow-focus);
|
|
955
|
-
`)])]),
|
|
955
|
+
`)])]),R("border, state-border",`
|
|
956
956
|
box-sizing: border-box;
|
|
957
957
|
position: absolute;
|
|
958
958
|
left: 0;
|
|
@@ -965,12 +965,12 @@ ${t}
|
|
|
965
965
|
transition:
|
|
966
966
|
box-shadow .3s var(--n-bezier),
|
|
967
967
|
border-color .3s var(--n-bezier);
|
|
968
|
-
`),
|
|
968
|
+
`),R("state-border",`
|
|
969
969
|
border-color: #0000;
|
|
970
970
|
z-index: 1;
|
|
971
|
-
`),
|
|
971
|
+
`),R("prefix","margin-right: 4px;"),R("suffix",`
|
|
972
972
|
margin-left: 4px;
|
|
973
|
-
`),
|
|
973
|
+
`),R("suffix, prefix",`
|
|
974
974
|
transition: color .3s var(--n-bezier);
|
|
975
975
|
flex-wrap: nowrap;
|
|
976
976
|
flex-shrink: 0;
|
|
@@ -986,11 +986,11 @@ ${t}
|
|
|
986
986
|
color: var(--n-loading-color);
|
|
987
987
|
`),y("base-clear",`
|
|
988
988
|
font-size: var(--n-icon-size);
|
|
989
|
-
`,[
|
|
989
|
+
`,[R("placeholder",[y("base-icon",`
|
|
990
990
|
transition: color .3s var(--n-bezier);
|
|
991
991
|
color: var(--n-icon-color);
|
|
992
992
|
font-size: var(--n-icon-size);
|
|
993
|
-
`)])]),
|
|
993
|
+
`)])]),V(">",[y("icon",`
|
|
994
994
|
transition: color .3s var(--n-bezier);
|
|
995
995
|
color: var(--n-icon-color);
|
|
996
996
|
font-size: var(--n-icon-size);
|
|
@@ -1006,53 +1006,53 @@ ${t}
|
|
|
1006
1006
|
font-variant: tabular-nums;
|
|
1007
1007
|
`),["warning","error"].map(e=>W(`${e}-status`,[je("disabled",[y("base-loading",`
|
|
1008
1008
|
color: var(--n-loading-color-${e})
|
|
1009
|
-
`),
|
|
1009
|
+
`),R("input-el, textarea-el",`
|
|
1010
1010
|
caret-color: var(--n-caret-color-${e});
|
|
1011
|
-
`),
|
|
1011
|
+
`),R("state-border",`
|
|
1012
1012
|
border: var(--n-border-${e});
|
|
1013
|
-
`),
|
|
1013
|
+
`),V("&:hover",[R("state-border",`
|
|
1014
1014
|
border: var(--n-border-hover-${e});
|
|
1015
|
-
`)]),
|
|
1015
|
+
`)]),V("&:focus",`
|
|
1016
1016
|
background-color: var(--n-color-focus-${e});
|
|
1017
|
-
`,[
|
|
1017
|
+
`,[R("state-border",`
|
|
1018
1018
|
box-shadow: var(--n-box-shadow-focus-${e});
|
|
1019
1019
|
border: var(--n-border-focus-${e});
|
|
1020
1020
|
`)]),W("focus",`
|
|
1021
1021
|
background-color: var(--n-color-focus-${e});
|
|
1022
|
-
`,[
|
|
1022
|
+
`,[R("state-border",`
|
|
1023
1023
|
box-shadow: var(--n-box-shadow-focus-${e});
|
|
1024
1024
|
border: var(--n-border-focus-${e});
|
|
1025
|
-
`)])])]))]),
|
|
1025
|
+
`)])])]))]),ev=y("input",[W("disabled",[R("input-el, textarea-el",`
|
|
1026
1026
|
-webkit-text-fill-color: var(--n-text-color-disabled);
|
|
1027
|
-
`)])]),
|
|
1028
|
-
`)}else{const{value:Ve}=c;Ve&&(R?Ve.textContent=R:Ve.innerHTML=" ")}}function ut(){ue()}const Yt=o.ref({top:"0"});function wn(R){var G;const{scrollTop:be}=R.target;Yt.value.top=`${-be}px`,(G=h.value)===null||G===void 0||G.syncUnifiedContainer()}let Zt=null;o.watchEffect(()=>{const{autosize:R,type:G}=e;R&&G==="textarea"?Zt=o.watch(P,be=>{!Array.isArray(be)&&be!==O&&Te(be)}):Zt==null||Zt()});let Jt=null;o.watchEffect(()=>{e.type==="textarea"?Jt=o.watch(P,R=>{var G;!Array.isArray(R)&&R!==O&&((G=h.value)===null||G===void 0||G.syncUnifiedContainer())}):Jt==null||Jt()}),o.provide(ms,{mergedValueRef:P,maxlengthRef:U,mergedClsPrefixRef:t,countGraphemesRef:o.toRef(e,"countGraphemes")});const po={wrapperElRef:l,inputElRef:f,textareaElRef:s,isCompositing:E,clear:ze,focus:J,blur:ae,select:se,deactivate:he,activate:fe,scrollTo:ge},bo=qt("Input",i,t),Hn=o.computed(()=>{const{value:R}=$,{common:{cubicBezierEaseInOut:G},self:{color:be,borderRadius:Ee,textColor:Ve,caretColor:Be,caretColorError:Ot,caretColorWarning:At,textDecorationColor:Ft,border:Cn,borderDisabled:Sn,borderHover:go,borderFocus:Bi,placeholderColor:_i,placeholderColorDisabled:Ei,lineHeightTextarea:Mi,colorDisabled:Ln,colorFocus:Nn,textColorDisabled:Ex,boxShadowFocus:Mx,iconSize:Ix,colorFocusWarning:Ox,boxShadowFocusWarning:Ax,borderWarning:Fx,borderFocusWarning:Dx,borderHoverWarning:Vx,colorFocusError:Hx,boxShadowFocusError:Lx,borderError:Nx,borderFocusError:Wx,borderHoverError:jx,clearSize:Ux,clearColor:Gx,clearColorHover:Kx,clearColorPressed:qx,iconColor:Xx,iconColorDisabled:Yx,suffixTextColor:Zx,countTextColor:Jx,countTextColorDisabled:Qx,iconColorHover:ey,iconColorPressed:ty,loadingColor:ny,loadingColorError:oy,loadingColorWarning:ry,[ee("padding",R)]:iy,[ee("fontSize",R)]:ay,[ee("height",R)]:ly}}=a.value,{left:sy,right:dy}=dt(iy);return{"--n-bezier":G,"--n-count-text-color":Jx,"--n-count-text-color-disabled":Qx,"--n-color":be,"--n-font-size":ay,"--n-border-radius":Ee,"--n-height":ly,"--n-padding-left":sy,"--n-padding-right":dy,"--n-text-color":Ve,"--n-caret-color":Be,"--n-text-decoration-color":Ft,"--n-border":Cn,"--n-border-disabled":Sn,"--n-border-hover":go,"--n-border-focus":Bi,"--n-placeholder-color":_i,"--n-placeholder-color-disabled":Ei,"--n-icon-size":Ix,"--n-line-height-textarea":Mi,"--n-color-disabled":Ln,"--n-color-focus":Nn,"--n-text-color-disabled":Ex,"--n-box-shadow-focus":Mx,"--n-loading-color":ny,"--n-caret-color-warning":At,"--n-color-focus-warning":Ox,"--n-box-shadow-focus-warning":Ax,"--n-border-warning":Fx,"--n-border-focus-warning":Dx,"--n-border-hover-warning":Vx,"--n-loading-color-warning":ry,"--n-caret-color-error":Ot,"--n-color-focus-error":Hx,"--n-box-shadow-focus-error":Lx,"--n-border-error":Nx,"--n-border-focus-error":Wx,"--n-border-hover-error":jx,"--n-loading-color-error":oy,"--n-clear-color":Gx,"--n-clear-size":Ux,"--n-clear-color-hover":Kx,"--n-clear-color-pressed":qx,"--n-icon-color":Xx,"--n-icon-color-hover":ey,"--n-icon-color-pressed":ty,"--n-icon-color-disabled":Yx,"--n-suffix-text-color":Zx}}),Qt=r?et("input",o.computed(()=>{const{value:R}=$;return R[0]}),Hn,e):void 0;return Object.assign(Object.assign({},po),{wrapperElRef:l,inputElRef:f,inputMirrorElRef:c,inputEl2Ref:u,textareaElRef:s,textareaMirrorElRef:d,textareaScrollbarInstRef:h,rtlEnabled:bo,uncontrolledValue:w,mergedValue:P,passwordVisible:Y,mergedPlaceholder:V,showPlaceholder1:j,showPlaceholder2:Q,mergedFocus:N,isComposing:E,activated:D,showClearButton:Z,mergedSize:$,mergedDisabled:k,textDecorationStyle:de,mergedClsPrefix:t,mergedBordered:n,mergedShowPasswordOn:X,placeholderStyle:Yt,mergedStatus:M,textAreaScrollContainerWidth:ie,handleTextAreaScroll:wn,handleCompositionStart:ke,handleCompositionEnd:q,handleInput:A,handleInputBlur:_,handleInputFocus:F,handleWrapperBlur:K,handleWrapperFocus:z,handleMouseEnter:Ae,handleMouseLeave:_e,handleMouseDown:Ne,handleChange:B,handleClick:oe,handleClear:xe,handlePasswordToggleClick:qe,handlePasswordToggleMousedown:st,handleWrapperKeydown:it,handleWrapperKeyup:Je,handleTextAreaMirrorResize:ut,getTextareaScrollContainer:()=>s.value,mergedTheme:a,cssVars:r?void 0:Hn,themeClass:Qt==null?void 0:Qt.themeClass,onRender:Qt==null?void 0:Qt.onRender})},render(){var e,t;const{mergedClsPrefix:n,mergedStatus:r,themeClass:i,type:a,countGraphemes:l,onRender:s}=this,d=this.$slots;return s==null||s(),o.h("div",{ref:"wrapperElRef",class:[`${n}-input`,i,r&&`${n}-input--${r}-status`,{[`${n}-input--rtl`]:this.rtlEnabled,[`${n}-input--disabled`]:this.mergedDisabled,[`${n}-input--textarea`]:a==="textarea",[`${n}-input--resizable`]:this.resizable&&!this.autosize,[`${n}-input--autosize`]:this.autosize,[`${n}-input--round`]:this.round&&a!=="textarea",[`${n}-input--pair`]:this.pair,[`${n}-input--focus`]:this.mergedFocus,[`${n}-input--stateful`]:this.stateful}],style:this.cssVars,tabindex:!this.mergedDisabled&&this.passivelyActivated&&!this.activated?0:void 0,onFocus:this.handleWrapperFocus,onBlur:this.handleWrapperBlur,onClick:this.handleClick,onMousedown:this.handleMouseDown,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd,onKeyup:this.handleWrapperKeyup,onKeydown:this.handleWrapperKeydown},o.h("div",{class:`${n}-input-wrapper`},Oe(d.prefix,c=>c&&o.h("div",{class:`${n}-input__prefix`},c)),a==="textarea"?o.h(hi,{ref:"textareaScrollbarInstRef",class:`${n}-input__textarea`,container:this.getTextareaScrollContainer,triggerDisplayManually:!0,useUnifiedContainer:!0,internalHoistYRail:!0},{default:()=>{var c,f;const{textAreaScrollContainerWidth:u}=this,p={width:this.autosize&&u&&`${u}px`};return o.h(o.Fragment,null,o.h("textarea",Object.assign({},this.inputProps,{ref:"textareaElRef",class:[`${n}-input__textarea-el`,(c=this.inputProps)===null||c===void 0?void 0:c.class],autofocus:this.autofocus,rows:Number(this.rows),placeholder:this.placeholder,value:this.mergedValue,disabled:this.mergedDisabled,maxlength:l?void 0:this.maxlength,minlength:l?void 0:this.minlength,readonly:this.readonly,tabindex:this.passivelyActivated&&!this.activated?-1:void 0,style:[this.textDecorationStyle[0],(f=this.inputProps)===null||f===void 0?void 0:f.style,p],onBlur:this.handleInputBlur,onFocus:m=>{this.handleInputFocus(m,2)},onInput:this.handleInput,onChange:this.handleChange,onScroll:this.handleTextAreaScroll})),this.showPlaceholder1?o.h("div",{class:`${n}-input__placeholder`,style:[this.placeholderStyle,p],key:"placeholder"},this.mergedPlaceholder[0]):null,this.autosize?o.h(jt,{onResize:this.handleTextAreaMirrorResize},{default:()=>o.h("div",{ref:"textareaMirrorElRef",class:`${n}-input__textarea-mirror`,key:"mirror"})}):null)}}):o.h("div",{class:`${n}-input__input`},o.h("input",Object.assign({type:a==="password"&&this.mergedShowPasswordOn&&this.passwordVisible?"text":a},this.inputProps,{ref:"inputElRef",class:[`${n}-input__input-el`,(e=this.inputProps)===null||e===void 0?void 0:e.class],style:[this.textDecorationStyle[0],(t=this.inputProps)===null||t===void 0?void 0:t.style],tabindex:this.passivelyActivated&&!this.activated?-1:void 0,placeholder:this.mergedPlaceholder[0],disabled:this.mergedDisabled,maxlength:l?void 0:this.maxlength,minlength:l?void 0:this.minlength,value:Array.isArray(this.mergedValue)?this.mergedValue[0]:this.mergedValue,readonly:this.readonly,autofocus:this.autofocus,size:this.attrSize,onBlur:this.handleInputBlur,onFocus:c=>{this.handleInputFocus(c,0)},onInput:c=>{this.handleInput(c,0)},onChange:c=>{this.handleChange(c,0)}})),this.showPlaceholder1?o.h("div",{class:`${n}-input__placeholder`},o.h("span",null,this.mergedPlaceholder[0])):null,this.autosize?o.h("div",{class:`${n}-input__input-mirror`,key:"mirror",ref:"inputMirrorElRef"}," "):null),!this.pair&&Oe(d.suffix,c=>c||this.clearable||this.showCount||this.mergedShowPasswordOn||this.loading!==void 0?o.h("div",{class:`${n}-input__suffix`},[Oe(d["clear-icon-placeholder"],f=>(this.clearable||f)&&o.h(mi,{clsPrefix:n,show:this.showClearButton,onClear:this.handleClear},{placeholder:()=>f,icon:()=>{var u,p;return(p=(u=this.$slots)["clear-icon"])===null||p===void 0?void 0:p.call(u)}})),this.internalLoadingBeforeSuffix?null:c,this.loading!==void 0?o.h(hs,{clsPrefix:n,loading:this.loading,showArrow:!1,showClear:!1,style:this.cssVars}):null,this.internalLoadingBeforeSuffix?c:null,this.showCount&&this.type!=="textarea"?o.h(vs,null,{default:f=>{var u;return(u=d.count)===null||u===void 0?void 0:u.call(d,f)}}):null,this.mergedShowPasswordOn&&this.type==="password"?o.h("div",{class:`${n}-input__eye`,onMousedown:this.handlePasswordToggleMousedown,onClick:this.handlePasswordToggleClick},this.passwordVisible?mt(d["password-visible-icon"],()=>[o.h(bt,{clsPrefix:n},{default:()=>o.h(sg,null)})]):mt(d["password-invisible-icon"],()=>[o.h(bt,{clsPrefix:n},{default:()=>o.h(dg,null)})])):null]):null)),this.pair?o.h("span",{class:`${n}-input__separator`},mt(d.separator,()=>[this.separator])):null,this.pair?o.h("div",{class:`${n}-input-wrapper`},o.h("div",{class:`${n}-input__input`},o.h("input",{ref:"inputEl2Ref",type:this.type,class:`${n}-input__input-el`,tabindex:this.passivelyActivated&&!this.activated?-1:void 0,placeholder:this.mergedPlaceholder[1],disabled:this.mergedDisabled,maxlength:l?void 0:this.maxlength,minlength:l?void 0:this.minlength,value:Array.isArray(this.mergedValue)?this.mergedValue[1]:void 0,readonly:this.readonly,style:this.textDecorationStyle[1],onBlur:this.handleInputBlur,onFocus:c=>{this.handleInputFocus(c,1)},onInput:c=>{this.handleInput(c,1)},onChange:c=>{this.handleChange(c,1)}}),this.showPlaceholder2?o.h("div",{class:`${n}-input__placeholder`},o.h("span",null,this.mergedPlaceholder[1])):null),Oe(d.suffix,c=>(this.clearable||c)&&o.h("div",{class:`${n}-input__suffix`},[this.clearable&&o.h(mi,{clsPrefix:n,show:this.showClearButton,onClear:this.handleClear},{icon:()=>{var f;return(f=d["clear-icon"])===null||f===void 0?void 0:f.call(d)},placeholder:()=>{var f;return(f=d["clear-icon-placeholder"])===null||f===void 0?void 0:f.call(d)}}),c]))):null,this.mergedBordered?o.h("div",{class:`${n}-input__border`}):null,this.mergedBordered?o.h("div",{class:`${n}-input__state-border`}):null,this.showCount&&a==="textarea"?o.h(vs,null,{default:c=>{var f;const{renderCount:u}=this;return u?u(c):(f=d.count)===null||f===void 0?void 0:f.call(d,c)}}):null)}}),ov=y("input-group",`
|
|
1027
|
+
`)])]),tv=Object.assign(Object.assign({},Ce.props),{bordered:{type:Boolean,default:void 0},type:{type:String,default:"text"},placeholder:[Array,String],defaultValue:{type:[String,Array],default:null},value:[String,Array],disabled:{type:Boolean,default:void 0},size:String,rows:{type:[Number,String],default:3},round:Boolean,minlength:[String,Number],maxlength:[String,Number],clearable:Boolean,autosize:{type:[Boolean,Object],default:!1},pair:Boolean,separator:String,readonly:{type:[String,Boolean],default:!1},passivelyActivated:Boolean,showPasswordOn:String,stateful:{type:Boolean,default:!0},autofocus:Boolean,inputProps:Object,resizable:{type:Boolean,default:!0},showCount:Boolean,loading:{type:Boolean,default:void 0},allowInput:Function,renderCount:Function,onMousedown:Function,onKeydown:Function,onKeyup:[Function,Array],onInput:[Function,Array],onFocus:[Function,Array],onBlur:[Function,Array],onClick:[Function,Array],onChange:[Function,Array],onClear:[Function,Array],countGraphemes:Function,status:String,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],textDecoration:[String,Array],attrSize:{type:Number,default:20},onInputBlur:[Function,Array],onInputFocus:[Function,Array],onDeactivate:[Function,Array],onActivate:[Function,Array],onWrapperFocus:[Function,Array],onWrapperBlur:[Function,Array],internalDeactivateOnEnter:Boolean,internalForceFocus:Boolean,internalLoadingBeforeSuffix:{type:Boolean,default:!0},showPasswordToggle:Boolean}),Fn=r.defineComponent({name:"Input",props:tv,setup(e){process.env.NODE_ENV!=="production"&&r.watchEffect(()=>{e.showPasswordToggle&&Qe("input",'`show-password-toggle` is deprecated, please use `showPasswordOn="click"` instead')});const{mergedClsPrefixRef:t,mergedBorderedRef:n,inlineThemeDisabled:o,mergedRtlRef:i}=Je(e),a=Ce("Input","-input",Qm,wi,e,t);bs&&gn("-input-safari",ev,t);const l=r.ref(null),s=r.ref(null),d=r.ref(null),c=r.ref(null),f=r.ref(null),u=r.ref(null),b=r.ref(null),m=Jm(b),h=r.ref(null),{localeRef:x}=ar("Input"),w=r.ref(e.defaultValue),g=r.toRef(e,"value"),P=St(g,w),L=dn(e),{mergedSizeRef:$,mergedDisabledRef:k,mergedStatusRef:M}=L,p=r.ref(!1),S=r.ref(!1),B=r.ref(!1),F=r.ref(!1);let I=null;const D=r.computed(()=>{const{placeholder:z,pair:G}=e;return G?Array.isArray(z)?z:z===void 0?["",""]:[z,z]:z===void 0?[x.value.placeholder]:[z]}),j=r.computed(()=>{const{value:z}=B,{value:G}=P,{value:be}=D;return!z&&(eo(G)||Array.isArray(G)&&eo(G[0]))&&be[0]}),Q=r.computed(()=>{const{value:z}=B,{value:G}=P,{value:be}=D;return!z&&be[1]&&(eo(G)||Array.isArray(G)&&eo(G[1]))}),N=Xe(()=>e.internalForceFocus||p.value),Z=Xe(()=>{if(k.value||e.readonly||!e.clearable||!N.value&&!S.value)return!1;const{value:z}=P,{value:G}=N;return e.pair?!!(Array.isArray(z)&&(z[0]||z[1]))&&(S.value||G):!!z&&(S.value||G)}),q=r.computed(()=>{const{showPasswordOn:z}=e;if(z)return z;if(e.showPasswordToggle)return"click"}),Y=r.ref(!1),de=r.computed(()=>{const{textDecoration:z}=e;return z?Array.isArray(z)?z.map(G=>({textDecoration:G})):[{textDecoration:z}]:["",""]}),ie=r.ref(void 0),ce=()=>{var z,G;if(e.type==="textarea"){const{autosize:be}=e;if(be&&(ie.value=(G=(z=h.value)===null||z===void 0?void 0:z.$el)===null||G===void 0?void 0:G.offsetWidth),!s.value||typeof be=="boolean")return;const{paddingTop:Be,paddingBottom:Ve,lineHeight:_e}=window.getComputedStyle(s.value),It=Number(Be.slice(0,-2)),Ot=Number(Ve.slice(0,-2)),At=Number(_e.slice(0,-2)),{value:wn}=d;if(!wn)return;if(be.minRows){const Cn=Math.max(be.minRows,1),br=`${It+Ot+At*Cn}px`;wn.style.minHeight=br}if(be.maxRows){const Cn=`${It+Ot+At*be.maxRows}px`;wn.style.maxHeight=Cn}}},U=r.computed(()=>{const{maxlength:z}=e;return z===void 0?void 0:Number(z)});r.onMounted(()=>{const{value:z}=P;Array.isArray(z)||ze(z)});const te=r.getCurrentInstance().proxy;function ve(z,G){const{onUpdateValue:be,"onUpdate:value":Be,onInput:Ve}=e,{nTriggerFormInput:_e}=L;be&&he(be,z,G),Be&&he(Be,z,G),Ve&&he(Ve,z,G),w.value=z,_e()}function ye(z,G){const{onChange:be}=e,{nTriggerFormChange:Be}=L;be&&he(be,z,G),w.value=z,Be()}function oe(z){const{onBlur:G}=e,{nTriggerFormBlur:be}=L;G&&he(G,z),be()}function Se(z){const{onFocus:G}=e,{nTriggerFormFocus:be}=L;G&&he(G,z),be()}function we(z){const{onClear:G}=e;G&&he(G,z)}function le(z){const{onInputBlur:G}=e;G&&he(G,z)}function Me(z){const{onInputFocus:G}=e;G&&he(G,z)}function Re(){const{onDeactivate:z}=e;z&&he(z)}function He(){const{onActivate:z}=e;z&&he(z)}function Ie(z){const{onClick:G}=e;G&&he(G,z)}function De(z){const{onWrapperFocus:G}=e;G&&he(G,z)}function Ue(z){const{onWrapperBlur:G}=e;G&&he(G,z)}function ke(){B.value=!0}function X(z){B.value=!1,z.target===u.value?O(z,1):O(z,0)}function O(z,G=0,be="input"){const Be=z.target.value;if(ze(Be),z instanceof InputEvent&&!z.isComposing&&(B.value=!1),e.type==="textarea"){const{value:_e}=h;_e&&_e.syncUnifiedContainer()}if(I=Be,B.value)return;m.recordCursor();const Ve=ne(Be);if(Ve)if(!e.pair)be==="input"?ve(Be,{source:G}):ye(Be,{source:G});else{let{value:_e}=P;Array.isArray(_e)?_e=[_e[0],_e[1]]:_e=["",""],_e[G]=Be,be==="input"?ve(_e,{source:G}):ye(_e,{source:G})}te.$forceUpdate(),Ve||r.nextTick(m.restoreCursor)}function ne(z){const{countGraphemes:G,maxlength:be,minlength:Be}=e;if(G){let _e;if(be!==void 0&&(_e===void 0&&(_e=G(z)),_e>Number(be))||Be!==void 0&&(_e===void 0&&(_e=G(z)),_e<Number(be)))return!1}const{allowInput:Ve}=e;return typeof Ve=="function"?Ve(z):!0}function E(z){le(z),z.relatedTarget===l.value&&Re(),z.relatedTarget!==null&&(z.relatedTarget===f.value||z.relatedTarget===u.value||z.relatedTarget===s.value)||(F.value=!1),C(z,"blur"),b.value=null}function A(z,G){Me(z),p.value=!0,F.value=!0,He(),C(z,"focus"),G===0?b.value=f.value:G===1?b.value=u.value:G===2&&(b.value=s.value)}function K(z){e.passivelyActivated&&(Ue(z),C(z,"blur"))}function T(z){e.passivelyActivated&&(p.value=!0,De(z),C(z,"focus"))}function C(z,G){z.relatedTarget!==null&&(z.relatedTarget===f.value||z.relatedTarget===u.value||z.relatedTarget===s.value||z.relatedTarget===l.value)||(G==="focus"?(Se(z),p.value=!0):G==="blur"&&(oe(z),p.value=!1))}function _(z,G){O(z,G,"change")}function re(z){Ie(z)}function xe(z){we(z),Te()}function Te(){e.pair?(ve(["",""],{source:"clear"}),ye(["",""],{source:"clear"})):(ve("",{source:"clear"}),ye("",{source:"clear"}))}function Ne(z){const{onMousedown:G}=e;G&&G(z);const{tagName:be}=z.target;if(be!=="INPUT"&&be!=="TEXTAREA"){if(e.resizable){const{value:Be}=l;if(Be){const{left:Ve,top:_e,width:It,height:Ot}=Be.getBoundingClientRect(),At=14;if(Ve+It-At<z.clientX&&z.clientX<Ve+It&&_e+Ot-At<z.clientY&&z.clientY<_e+Ot)return}}z.preventDefault(),p.value||J()}}function Oe(){var z;S.value=!0,e.type==="textarea"&&((z=h.value)===null||z===void 0||z.handleMouseEnterWrapper())}function Ee(){var z;S.value=!1,e.type==="textarea"&&((z=h.value)===null||z===void 0||z.handleMouseLeaveWrapper())}function Ke(){k.value||q.value==="click"&&(Y.value=!Y.value)}function lt(z){if(k.value)return;z.preventDefault();const G=Be=>{Be.preventDefault(),$e("mouseup",document,G)};if(Pe("mouseup",document,G),q.value!=="mousedown")return;Y.value=!0;const be=()=>{Y.value=!1,$e("mouseup",document,be)};Pe("mouseup",document,be)}function Ye(z){e.onKeyup&&he(e.onKeyup,z)}function it(z){switch(e.onKeydown&&he(e.onKeydown,z),z.key){case"Escape":H();break;case"Enter":v(z);break}}function v(z){var G,be;if(e.passivelyActivated){const{value:Be}=F;if(Be){e.internalDeactivateOnEnter&&H();return}z.preventDefault(),e.type==="textarea"?(G=s.value)===null||G===void 0||G.focus():(be=f.value)===null||be===void 0||be.focus()}}function H(){e.passivelyActivated&&(F.value=!1,r.nextTick(()=>{var z;(z=l.value)===null||z===void 0||z.focus()}))}function J(){var z,G,be;k.value||(e.passivelyActivated?(z=l.value)===null||z===void 0||z.focus():((G=s.value)===null||G===void 0||G.focus(),(be=f.value)===null||be===void 0||be.focus()))}function ae(){var z;!((z=l.value)===null||z===void 0)&&z.contains(document.activeElement)&&document.activeElement.blur()}function se(){var z,G;(z=s.value)===null||z===void 0||z.select(),(G=f.value)===null||G===void 0||G.select()}function ue(){k.value||(s.value?s.value.focus():f.value&&f.value.focus())}function fe(){const{value:z}=l;z!=null&&z.contains(document.activeElement)&&z!==document.activeElement&&H()}function ge(z){if(e.type==="textarea"){const{value:G}=s;G==null||G.scrollTo(z)}else{const{value:G}=f;G==null||G.scrollTo(z)}}function ze(z){const{type:G,pair:be,autosize:Be}=e;if(!be&&Be)if(G==="textarea"){const{value:Ve}=d;Ve&&(Ve.textContent=`${z??""}\r
|
|
1028
|
+
`)}else{const{value:Ve}=c;Ve&&(z?Ve.textContent=z:Ve.innerHTML=" ")}}function ct(){ce()}const qt=r.ref({top:"0"});function yn(z){var G;const{scrollTop:be}=z.target;qt.value.top=`${-be}px`,(G=h.value)===null||G===void 0||G.syncUnifiedContainer()}let Yt=null;r.watchEffect(()=>{const{autosize:z,type:G}=e;z&&G==="textarea"?Yt=r.watch(P,be=>{!Array.isArray(be)&&be!==I&&ze(be)}):Yt==null||Yt()});let Zt=null;r.watchEffect(()=>{e.type==="textarea"?Zt=r.watch(P,z=>{var G;!Array.isArray(z)&&z!==I&&((G=h.value)===null||G===void 0||G.syncUnifiedContainer())}):Zt==null||Zt()}),r.provide(gs,{mergedValueRef:P,maxlengthRef:U,mergedClsPrefixRef:t,countGraphemesRef:r.toRef(e,"countGraphemes")});const hr={wrapperElRef:l,inputElRef:f,textareaElRef:s,isCompositing:B,clear:Te,focus:J,blur:ae,select:se,deactivate:fe,activate:ue,scrollTo:ge},pr=Kt("Input",i,t),Vn=r.computed(()=>{const{value:z}=$,{common:{cubicBezierEaseInOut:G},self:{color:be,borderRadius:Be,textColor:Ve,caretColor:_e,caretColorError:It,caretColorWarning:Ot,textDecorationColor:At,border:wn,borderDisabled:Cn,borderHover:br,borderFocus:Ei,placeholderColor:Bi,placeholderColorDisabled:Mi,lineHeightTextarea:Ii,colorDisabled:Ln,colorFocus:Hn,textColorDisabled:$x,boxShadowFocus:kx,iconSize:Tx,colorFocusWarning:zx,boxShadowFocusWarning:Px,borderWarning:Rx,borderFocusWarning:_x,borderHoverWarning:Ex,colorFocusError:Bx,boxShadowFocusError:Mx,borderError:Ix,borderFocusError:Ox,borderHoverError:Ax,clearSize:Fx,clearColor:Dx,clearColorHover:Vx,clearColorPressed:Lx,iconColor:Hx,iconColorDisabled:Nx,suffixTextColor:Wx,countTextColor:jx,countTextColorDisabled:Ux,iconColorHover:Gx,iconColorPressed:Kx,loadingColor:Xx,loadingColorError:qx,loadingColorWarning:Yx,[ee("padding",z)]:Zx,[ee("fontSize",z)]:Jx,[ee("height",z)]:Qx}}=a.value,{left:ey,right:ty}=st(Zx);return{"--n-bezier":G,"--n-count-text-color":jx,"--n-count-text-color-disabled":Ux,"--n-color":be,"--n-font-size":Jx,"--n-border-radius":Be,"--n-height":Qx,"--n-padding-left":ey,"--n-padding-right":ty,"--n-text-color":Ve,"--n-caret-color":_e,"--n-text-decoration-color":At,"--n-border":wn,"--n-border-disabled":Cn,"--n-border-hover":br,"--n-border-focus":Ei,"--n-placeholder-color":Bi,"--n-placeholder-color-disabled":Mi,"--n-icon-size":Tx,"--n-line-height-textarea":Ii,"--n-color-disabled":Ln,"--n-color-focus":Hn,"--n-text-color-disabled":$x,"--n-box-shadow-focus":kx,"--n-loading-color":Xx,"--n-caret-color-warning":Ot,"--n-color-focus-warning":zx,"--n-box-shadow-focus-warning":Px,"--n-border-warning":Rx,"--n-border-focus-warning":_x,"--n-border-hover-warning":Ex,"--n-loading-color-warning":Yx,"--n-caret-color-error":It,"--n-color-focus-error":Bx,"--n-box-shadow-focus-error":Mx,"--n-border-error":Ix,"--n-border-focus-error":Ox,"--n-border-hover-error":Ax,"--n-loading-color-error":qx,"--n-clear-color":Dx,"--n-clear-size":Fx,"--n-clear-color-hover":Vx,"--n-clear-color-pressed":Lx,"--n-icon-color":Hx,"--n-icon-color-hover":Gx,"--n-icon-color-pressed":Kx,"--n-icon-color-disabled":Nx,"--n-suffix-text-color":Wx}}),Jt=o?tt("input",r.computed(()=>{const{value:z}=$;return z[0]}),Vn,e):void 0;return Object.assign(Object.assign({},hr),{wrapperElRef:l,inputElRef:f,inputMirrorElRef:c,inputEl2Ref:u,textareaElRef:s,textareaMirrorElRef:d,textareaScrollbarInstRef:h,rtlEnabled:pr,uncontrolledValue:w,mergedValue:P,passwordVisible:Y,mergedPlaceholder:D,showPlaceholder1:j,showPlaceholder2:Q,mergedFocus:N,isComposing:B,activated:F,showClearButton:Z,mergedSize:$,mergedDisabled:k,textDecorationStyle:de,mergedClsPrefix:t,mergedBordered:n,mergedShowPasswordOn:q,placeholderStyle:qt,mergedStatus:M,textAreaScrollContainerWidth:ie,handleTextAreaScroll:yn,handleCompositionStart:ke,handleCompositionEnd:X,handleInput:O,handleInputBlur:E,handleInputFocus:A,handleWrapperBlur:K,handleWrapperFocus:T,handleMouseEnter:Oe,handleMouseLeave:Ee,handleMouseDown:Ne,handleChange:_,handleClick:re,handleClear:xe,handlePasswordToggleClick:Ke,handlePasswordToggleMousedown:lt,handleWrapperKeydown:it,handleWrapperKeyup:Ye,handleTextAreaMirrorResize:ct,getTextareaScrollContainer:()=>s.value,mergedTheme:a,cssVars:o?void 0:Vn,themeClass:Jt==null?void 0:Jt.themeClass,onRender:Jt==null?void 0:Jt.onRender})},render(){var e,t;const{mergedClsPrefix:n,mergedStatus:o,themeClass:i,type:a,countGraphemes:l,onRender:s}=this,d=this.$slots;return s==null||s(),r.h("div",{ref:"wrapperElRef",class:[`${n}-input`,i,o&&`${n}-input--${o}-status`,{[`${n}-input--rtl`]:this.rtlEnabled,[`${n}-input--disabled`]:this.mergedDisabled,[`${n}-input--textarea`]:a==="textarea",[`${n}-input--resizable`]:this.resizable&&!this.autosize,[`${n}-input--autosize`]:this.autosize,[`${n}-input--round`]:this.round&&a!=="textarea",[`${n}-input--pair`]:this.pair,[`${n}-input--focus`]:this.mergedFocus,[`${n}-input--stateful`]:this.stateful}],style:this.cssVars,tabindex:!this.mergedDisabled&&this.passivelyActivated&&!this.activated?0:void 0,onFocus:this.handleWrapperFocus,onBlur:this.handleWrapperBlur,onClick:this.handleClick,onMousedown:this.handleMouseDown,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd,onKeyup:this.handleWrapperKeyup,onKeydown:this.handleWrapperKeydown},r.h("div",{class:`${n}-input-wrapper`},Ae(d.prefix,c=>c&&r.h("div",{class:`${n}-input__prefix`},c)),a==="textarea"?r.h(pi,{ref:"textareaScrollbarInstRef",class:`${n}-input__textarea`,container:this.getTextareaScrollContainer,triggerDisplayManually:!0,useUnifiedContainer:!0,internalHoistYRail:!0},{default:()=>{var c,f;const{textAreaScrollContainerWidth:u}=this,b={width:this.autosize&&u&&`${u}px`};return r.h(r.Fragment,null,r.h("textarea",Object.assign({},this.inputProps,{ref:"textareaElRef",class:[`${n}-input__textarea-el`,(c=this.inputProps)===null||c===void 0?void 0:c.class],autofocus:this.autofocus,rows:Number(this.rows),placeholder:this.placeholder,value:this.mergedValue,disabled:this.mergedDisabled,maxlength:l?void 0:this.maxlength,minlength:l?void 0:this.minlength,readonly:this.readonly,tabindex:this.passivelyActivated&&!this.activated?-1:void 0,style:[this.textDecorationStyle[0],(f=this.inputProps)===null||f===void 0?void 0:f.style,b],onBlur:this.handleInputBlur,onFocus:m=>{this.handleInputFocus(m,2)},onInput:this.handleInput,onChange:this.handleChange,onScroll:this.handleTextAreaScroll})),this.showPlaceholder1?r.h("div",{class:`${n}-input__placeholder`,style:[this.placeholderStyle,b],key:"placeholder"},this.mergedPlaceholder[0]):null,this.autosize?r.h(Wt,{onResize:this.handleTextAreaMirrorResize},{default:()=>r.h("div",{ref:"textareaMirrorElRef",class:`${n}-input__textarea-mirror`,key:"mirror"})}):null)}}):r.h("div",{class:`${n}-input__input`},r.h("input",Object.assign({type:a==="password"&&this.mergedShowPasswordOn&&this.passwordVisible?"text":a},this.inputProps,{ref:"inputElRef",class:[`${n}-input__input-el`,(e=this.inputProps)===null||e===void 0?void 0:e.class],style:[this.textDecorationStyle[0],(t=this.inputProps)===null||t===void 0?void 0:t.style],tabindex:this.passivelyActivated&&!this.activated?-1:void 0,placeholder:this.mergedPlaceholder[0],disabled:this.mergedDisabled,maxlength:l?void 0:this.maxlength,minlength:l?void 0:this.minlength,value:Array.isArray(this.mergedValue)?this.mergedValue[0]:this.mergedValue,readonly:this.readonly,autofocus:this.autofocus,size:this.attrSize,onBlur:this.handleInputBlur,onFocus:c=>{this.handleInputFocus(c,0)},onInput:c=>{this.handleInput(c,0)},onChange:c=>{this.handleChange(c,0)}})),this.showPlaceholder1?r.h("div",{class:`${n}-input__placeholder`},r.h("span",null,this.mergedPlaceholder[0])):null,this.autosize?r.h("div",{class:`${n}-input__input-mirror`,key:"mirror",ref:"inputMirrorElRef"}," "):null),!this.pair&&Ae(d.suffix,c=>c||this.clearable||this.showCount||this.mergedShowPasswordOn||this.loading!==void 0?r.h("div",{class:`${n}-input__suffix`},[Ae(d["clear-icon-placeholder"],f=>(this.clearable||f)&&r.h(vi,{clsPrefix:n,show:this.showClearButton,onClear:this.handleClear},{placeholder:()=>f,icon:()=>{var u,b;return(b=(u=this.$slots)["clear-icon"])===null||b===void 0?void 0:b.call(u)}})),this.internalLoadingBeforeSuffix?null:c,this.loading!==void 0?r.h(fs,{clsPrefix:n,loading:this.loading,showArrow:!1,showClear:!1,style:this.cssVars}):null,this.internalLoadingBeforeSuffix?c:null,this.showCount&&this.type!=="textarea"?r.h(ms,null,{default:f=>{var u;return(u=d.count)===null||u===void 0?void 0:u.call(d,f)}}):null,this.mergedShowPasswordOn&&this.type==="password"?r.h("div",{class:`${n}-input__eye`,onMousedown:this.handlePasswordToggleMousedown,onClick:this.handlePasswordToggleClick},this.passwordVisible?Ct(d["password-visible-icon"],()=>[r.h(gt,{clsPrefix:n},{default:()=>r.h(lg,null)})]):Ct(d["password-invisible-icon"],()=>[r.h(gt,{clsPrefix:n},{default:()=>r.h(sg,null)})])):null]):null)),this.pair?r.h("span",{class:`${n}-input__separator`},Ct(d.separator,()=>[this.separator])):null,this.pair?r.h("div",{class:`${n}-input-wrapper`},r.h("div",{class:`${n}-input__input`},r.h("input",{ref:"inputEl2Ref",type:this.type,class:`${n}-input__input-el`,tabindex:this.passivelyActivated&&!this.activated?-1:void 0,placeholder:this.mergedPlaceholder[1],disabled:this.mergedDisabled,maxlength:l?void 0:this.maxlength,minlength:l?void 0:this.minlength,value:Array.isArray(this.mergedValue)?this.mergedValue[1]:void 0,readonly:this.readonly,style:this.textDecorationStyle[1],onBlur:this.handleInputBlur,onFocus:c=>{this.handleInputFocus(c,1)},onInput:c=>{this.handleInput(c,1)},onChange:c=>{this.handleChange(c,1)}}),this.showPlaceholder2?r.h("div",{class:`${n}-input__placeholder`},r.h("span",null,this.mergedPlaceholder[1])):null),Ae(d.suffix,c=>(this.clearable||c)&&r.h("div",{class:`${n}-input__suffix`},[this.clearable&&r.h(vi,{clsPrefix:n,show:this.showClearButton,onClear:this.handleClear},{icon:()=>{var f;return(f=d["clear-icon"])===null||f===void 0?void 0:f.call(d)},placeholder:()=>{var f;return(f=d["clear-icon-placeholder"])===null||f===void 0?void 0:f.call(d)}}),c]))):null,this.mergedBordered?r.h("div",{class:`${n}-input__border`}):null,this.mergedBordered?r.h("div",{class:`${n}-input__state-border`}):null,this.showCount&&a==="textarea"?r.h(ms,null,{default:c=>{var f;const{renderCount:u}=this;return u?u(c):(f=d.count)===null||f===void 0?void 0:f.call(d,c)}}):null)}}),nv=y("input-group",`
|
|
1029
1029
|
display: inline-flex;
|
|
1030
1030
|
width: 100%;
|
|
1031
1031
|
flex-wrap: nowrap;
|
|
1032
1032
|
vertical-align: bottom;
|
|
1033
|
-
`,[
|
|
1033
|
+
`,[V(">",[y("input",[V("&:not(:last-child)",`
|
|
1034
1034
|
border-top-right-radius: 0!important;
|
|
1035
1035
|
border-bottom-right-radius: 0!important;
|
|
1036
|
-
`),
|
|
1036
|
+
`),V("&:not(:first-child)",`
|
|
1037
1037
|
border-top-left-radius: 0!important;
|
|
1038
1038
|
border-bottom-left-radius: 0!important;
|
|
1039
1039
|
margin-left: -1px!important;
|
|
1040
|
-
`)]),y("button",[
|
|
1040
|
+
`)]),y("button",[V("&:not(:last-child)",`
|
|
1041
1041
|
border-top-right-radius: 0!important;
|
|
1042
1042
|
border-bottom-right-radius: 0!important;
|
|
1043
|
-
`,[
|
|
1043
|
+
`,[R("state-border, border",`
|
|
1044
1044
|
border-top-right-radius: 0!important;
|
|
1045
1045
|
border-bottom-right-radius: 0!important;
|
|
1046
|
-
`)]),
|
|
1046
|
+
`)]),V("&:not(:first-child)",`
|
|
1047
1047
|
border-top-left-radius: 0!important;
|
|
1048
1048
|
border-bottom-left-radius: 0!important;
|
|
1049
|
-
`,[
|
|
1049
|
+
`,[R("state-border, border",`
|
|
1050
1050
|
border-top-left-radius: 0!important;
|
|
1051
1051
|
border-bottom-left-radius: 0!important;
|
|
1052
|
-
`)])]),
|
|
1052
|
+
`)])]),V("*",[V("&:not(:last-child)",`
|
|
1053
1053
|
border-top-right-radius: 0!important;
|
|
1054
1054
|
border-bottom-right-radius: 0!important;
|
|
1055
|
-
`,[
|
|
1055
|
+
`,[V(">",[y("input",`
|
|
1056
1056
|
border-top-right-radius: 0!important;
|
|
1057
1057
|
border-bottom-right-radius: 0!important;
|
|
1058
1058
|
`),y("base-selection",[y("base-selection-label",`
|
|
@@ -1061,14 +1061,14 @@ ${t}
|
|
|
1061
1061
|
`),y("base-selection-tags",`
|
|
1062
1062
|
border-top-right-radius: 0!important;
|
|
1063
1063
|
border-bottom-right-radius: 0!important;
|
|
1064
|
-
`),
|
|
1064
|
+
`),R("box-shadow, border, state-border",`
|
|
1065
1065
|
border-top-right-radius: 0!important;
|
|
1066
1066
|
border-bottom-right-radius: 0!important;
|
|
1067
|
-
`)])])]),
|
|
1067
|
+
`)])])]),V("&:not(:first-child)",`
|
|
1068
1068
|
margin-left: -1px!important;
|
|
1069
1069
|
border-top-left-radius: 0!important;
|
|
1070
1070
|
border-bottom-left-radius: 0!important;
|
|
1071
|
-
`,[
|
|
1071
|
+
`,[V(">",[y("input",`
|
|
1072
1072
|
border-top-left-radius: 0!important;
|
|
1073
1073
|
border-bottom-left-radius: 0!important;
|
|
1074
1074
|
`),y("base-selection",[y("base-selection-label",`
|
|
@@ -1077,10 +1077,10 @@ ${t}
|
|
|
1077
1077
|
`),y("base-selection-tags",`
|
|
1078
1078
|
border-top-left-radius: 0!important;
|
|
1079
1079
|
border-bottom-left-radius: 0!important;
|
|
1080
|
-
`),
|
|
1080
|
+
`),R("box-shadow, border, state-border",`
|
|
1081
1081
|
border-top-left-radius: 0!important;
|
|
1082
1082
|
border-bottom-left-radius: 0!important;
|
|
1083
|
-
`)])])])])])]),rv={},
|
|
1083
|
+
`)])])])])])]),rv={},ov=r.defineComponent({name:"InputGroup",props:rv,setup(e){const{mergedClsPrefixRef:t}=Je(e);return gn("-input-group",nv,t),{mergedClsPrefix:t}},render(){const{mergedClsPrefix:e}=this;return r.h("div",{class:`${e}-input-group`},this.$slots)}});function mn(e){return ut(e,[255,255,255,.16])}function to(e){return ut(e,[0,0,0,.12])}const iv="n-button-group",av={paddingTiny:"0 6px",paddingSmall:"0 10px",paddingMedium:"0 14px",paddingLarge:"0 18px",paddingRoundTiny:"0 10px",paddingRoundSmall:"0 14px",paddingRoundMedium:"0 18px",paddingRoundLarge:"0 22px",iconMarginTiny:"6px",iconMarginSmall:"6px",iconMarginMedium:"6px",iconMarginLarge:"6px",iconSizeTiny:"14px",iconSizeSmall:"18px",iconSizeMedium:"18px",iconSizeLarge:"20px",rippleDuration:".6s"};function lv(e){const{heightTiny:t,heightSmall:n,heightMedium:o,heightLarge:i,borderRadius:a,fontSizeTiny:l,fontSizeSmall:s,fontSizeMedium:d,fontSizeLarge:c,opacityDisabled:f,textColor2:u,textColor3:b,primaryColorHover:m,primaryColorPressed:h,borderColor:x,primaryColor:w,baseColor:g,infoColor:P,infoColorHover:L,infoColorPressed:$,successColor:k,successColorHover:M,successColorPressed:p,warningColor:S,warningColorHover:B,warningColorPressed:F,errorColor:I,errorColorHover:D,errorColorPressed:j,fontWeight:Q,buttonColor2:N,buttonColor2Hover:Z,buttonColor2Pressed:q,fontWeightStrong:Y}=e;return Object.assign(Object.assign({},av),{heightTiny:t,heightSmall:n,heightMedium:o,heightLarge:i,borderRadiusTiny:a,borderRadiusSmall:a,borderRadiusMedium:a,borderRadiusLarge:a,fontSizeTiny:l,fontSizeSmall:s,fontSizeMedium:d,fontSizeLarge:c,opacityDisabled:f,colorOpacitySecondary:"0.16",colorOpacitySecondaryHover:"0.22",colorOpacitySecondaryPressed:"0.28",colorSecondary:N,colorSecondaryHover:Z,colorSecondaryPressed:q,colorTertiary:N,colorTertiaryHover:Z,colorTertiaryPressed:q,colorQuaternary:"#0000",colorQuaternaryHover:Z,colorQuaternaryPressed:q,color:"#0000",colorHover:"#0000",colorPressed:"#0000",colorFocus:"#0000",colorDisabled:"#0000",textColor:u,textColorTertiary:b,textColorHover:m,textColorPressed:h,textColorFocus:m,textColorDisabled:u,textColorText:u,textColorTextHover:m,textColorTextPressed:h,textColorTextFocus:m,textColorTextDisabled:u,textColorGhost:u,textColorGhostHover:m,textColorGhostPressed:h,textColorGhostFocus:m,textColorGhostDisabled:u,border:`1px solid ${x}`,borderHover:`1px solid ${m}`,borderPressed:`1px solid ${h}`,borderFocus:`1px solid ${m}`,borderDisabled:`1px solid ${x}`,rippleColor:w,colorPrimary:w,colorHoverPrimary:m,colorPressedPrimary:h,colorFocusPrimary:m,colorDisabledPrimary:w,textColorPrimary:g,textColorHoverPrimary:g,textColorPressedPrimary:g,textColorFocusPrimary:g,textColorDisabledPrimary:g,textColorTextPrimary:w,textColorTextHoverPrimary:m,textColorTextPressedPrimary:h,textColorTextFocusPrimary:m,textColorTextDisabledPrimary:u,textColorGhostPrimary:w,textColorGhostHoverPrimary:m,textColorGhostPressedPrimary:h,textColorGhostFocusPrimary:m,textColorGhostDisabledPrimary:w,borderPrimary:`1px solid ${w}`,borderHoverPrimary:`1px solid ${m}`,borderPressedPrimary:`1px solid ${h}`,borderFocusPrimary:`1px solid ${m}`,borderDisabledPrimary:`1px solid ${w}`,rippleColorPrimary:w,colorInfo:P,colorHoverInfo:L,colorPressedInfo:$,colorFocusInfo:L,colorDisabledInfo:P,textColorInfo:g,textColorHoverInfo:g,textColorPressedInfo:g,textColorFocusInfo:g,textColorDisabledInfo:g,textColorTextInfo:P,textColorTextHoverInfo:L,textColorTextPressedInfo:$,textColorTextFocusInfo:L,textColorTextDisabledInfo:u,textColorGhostInfo:P,textColorGhostHoverInfo:L,textColorGhostPressedInfo:$,textColorGhostFocusInfo:L,textColorGhostDisabledInfo:P,borderInfo:`1px solid ${P}`,borderHoverInfo:`1px solid ${L}`,borderPressedInfo:`1px solid ${$}`,borderFocusInfo:`1px solid ${L}`,borderDisabledInfo:`1px solid ${P}`,rippleColorInfo:P,colorSuccess:k,colorHoverSuccess:M,colorPressedSuccess:p,colorFocusSuccess:M,colorDisabledSuccess:k,textColorSuccess:g,textColorHoverSuccess:g,textColorPressedSuccess:g,textColorFocusSuccess:g,textColorDisabledSuccess:g,textColorTextSuccess:k,textColorTextHoverSuccess:M,textColorTextPressedSuccess:p,textColorTextFocusSuccess:M,textColorTextDisabledSuccess:u,textColorGhostSuccess:k,textColorGhostHoverSuccess:M,textColorGhostPressedSuccess:p,textColorGhostFocusSuccess:M,textColorGhostDisabledSuccess:k,borderSuccess:`1px solid ${k}`,borderHoverSuccess:`1px solid ${M}`,borderPressedSuccess:`1px solid ${p}`,borderFocusSuccess:`1px solid ${M}`,borderDisabledSuccess:`1px solid ${k}`,rippleColorSuccess:k,colorWarning:S,colorHoverWarning:B,colorPressedWarning:F,colorFocusWarning:B,colorDisabledWarning:S,textColorWarning:g,textColorHoverWarning:g,textColorPressedWarning:g,textColorFocusWarning:g,textColorDisabledWarning:g,textColorTextWarning:S,textColorTextHoverWarning:B,textColorTextPressedWarning:F,textColorTextFocusWarning:B,textColorTextDisabledWarning:u,textColorGhostWarning:S,textColorGhostHoverWarning:B,textColorGhostPressedWarning:F,textColorGhostFocusWarning:B,textColorGhostDisabledWarning:S,borderWarning:`1px solid ${S}`,borderHoverWarning:`1px solid ${B}`,borderPressedWarning:`1px solid ${F}`,borderFocusWarning:`1px solid ${B}`,borderDisabledWarning:`1px solid ${S}`,rippleColorWarning:S,colorError:I,colorHoverError:D,colorPressedError:j,colorFocusError:D,colorDisabledError:I,textColorError:g,textColorHoverError:g,textColorPressedError:g,textColorFocusError:g,textColorDisabledError:g,textColorTextError:I,textColorTextHoverError:D,textColorTextPressedError:j,textColorTextFocusError:D,textColorTextDisabledError:u,textColorGhostError:I,textColorGhostHoverError:D,textColorGhostPressedError:j,textColorGhostFocusError:D,textColorGhostDisabledError:I,borderError:`1px solid ${I}`,borderHoverError:`1px solid ${D}`,borderPressedError:`1px solid ${j}`,borderFocusError:`1px solid ${D}`,borderDisabledError:`1px solid ${I}`,rippleColorError:I,waveOpacity:"0.6",fontWeight:Q,fontWeightStrong:Y})}const Ci={name:"Button",common:et,self:lv},sv=V([y("button",`
|
|
1084
1084
|
margin: 0;
|
|
1085
1085
|
font-weight: var(--n-font-weight);
|
|
1086
1086
|
line-height: 1;
|
|
@@ -1112,7 +1112,7 @@ ${t}
|
|
|
1112
1112
|
background-color .3s var(--n-bezier),
|
|
1113
1113
|
opacity .3s var(--n-bezier),
|
|
1114
1114
|
border-color .3s var(--n-bezier);
|
|
1115
|
-
`,[W("color",[
|
|
1115
|
+
`,[W("color",[R("border",{borderColor:"var(--n-border-color)"}),W("disabled",[R("border",{borderColor:"var(--n-border-color-disabled)"})]),je("disabled",[V("&:focus",[R("state-border",{borderColor:"var(--n-border-color-focus)"})]),V("&:hover",[R("state-border",{borderColor:"var(--n-border-color-hover)"})]),V("&:active",[R("state-border",{borderColor:"var(--n-border-color-pressed)"})]),W("pressed",[R("state-border",{borderColor:"var(--n-border-color-pressed)"})])])]),W("disabled",{backgroundColor:"var(--n-color-disabled)",color:"var(--n-text-color-disabled)"},[R("border",{border:"var(--n-border-disabled)"})]),je("disabled",[V("&:focus",{backgroundColor:"var(--n-color-focus)",color:"var(--n-text-color-focus)"},[R("state-border",{border:"var(--n-border-focus)"})]),V("&:hover",{backgroundColor:"var(--n-color-hover)",color:"var(--n-text-color-hover)"},[R("state-border",{border:"var(--n-border-hover)"})]),V("&:active",{backgroundColor:"var(--n-color-pressed)",color:"var(--n-text-color-pressed)"},[R("state-border",{border:"var(--n-border-pressed)"})]),W("pressed",{backgroundColor:"var(--n-color-pressed)",color:"var(--n-text-color-pressed)"},[R("state-border",{border:"var(--n-border-pressed)"})])]),W("loading","cursor: wait;"),y("base-wave",`
|
|
1116
1116
|
pointer-events: none;
|
|
1117
1117
|
top: 0;
|
|
1118
1118
|
right: 0;
|
|
@@ -1121,7 +1121,7 @@ ${t}
|
|
|
1121
1121
|
animation-iteration-count: 1;
|
|
1122
1122
|
animation-duration: var(--n-ripple-duration);
|
|
1123
1123
|
animation-timing-function: var(--n-bezier-ease-out), var(--n-bezier-ease-out);
|
|
1124
|
-
`,[W("active",{zIndex:1,animationName:"button-wave-spread, button-wave-opacity"})]),
|
|
1124
|
+
`,[W("active",{zIndex:1,animationName:"button-wave-spread, button-wave-opacity"})]),kr&&"MozBoxSizing"in document.createElement("div").style?V("&::moz-focus-inner",{border:0}):null,R("border, state-border",`
|
|
1125
1125
|
position: absolute;
|
|
1126
1126
|
left: 0;
|
|
1127
1127
|
top: 0;
|
|
@@ -1130,7 +1130,7 @@ ${t}
|
|
|
1130
1130
|
border-radius: inherit;
|
|
1131
1131
|
transition: border-color .3s var(--n-bezier);
|
|
1132
1132
|
pointer-events: none;
|
|
1133
|
-
`),
|
|
1133
|
+
`),R("border",{border:"var(--n-border)"}),R("state-border",{border:"var(--n-border)",borderColor:"#0000",zIndex:1}),R("icon",`
|
|
1134
1134
|
margin: var(--n-icon-margin);
|
|
1135
1135
|
margin-left: 0;
|
|
1136
1136
|
height: var(--n-icon-size);
|
|
@@ -1149,15 +1149,15 @@ ${t}
|
|
|
1149
1149
|
display: flex;
|
|
1150
1150
|
align-items: center;
|
|
1151
1151
|
justify-content: center;
|
|
1152
|
-
`,[
|
|
1152
|
+
`,[An({top:"50%",originalTransform:"translateY(-50%)"})]),Am()]),R("content",`
|
|
1153
1153
|
display: flex;
|
|
1154
1154
|
align-items: center;
|
|
1155
1155
|
flex-wrap: nowrap;
|
|
1156
1156
|
min-width: 0;
|
|
1157
|
-
`,[
|
|
1157
|
+
`,[V("~",[R("icon",{margin:"var(--n-icon-margin)",marginRight:0})])]),W("block",`
|
|
1158
1158
|
display: flex;
|
|
1159
1159
|
width: 100%;
|
|
1160
|
-
`),W("dashed",[T("border, state-border",{borderStyle:"dashed !important"})]),W("disabled",{cursor:"not-allowed",opacity:"var(--n-opacity-disabled)"})]),I("@keyframes button-wave-spread",{from:{boxShadow:"0 0 0.5px 0 var(--n-ripple-color)"},to:{boxShadow:"0 0 0.5px 4.5px var(--n-ripple-color)"}}),I("@keyframes button-wave-opacity",{from:{opacity:"var(--n-wave-opacity)"},to:{opacity:0}})]),cv=Object.assign(Object.assign({},ye.props),{color:String,textColor:String,text:Boolean,block:Boolean,loading:Boolean,disabled:Boolean,circle:Boolean,size:String,ghost:Boolean,round:Boolean,secondary:Boolean,tertiary:Boolean,quaternary:Boolean,strong:Boolean,focusable:{type:Boolean,default:!0},keyboard:{type:Boolean,default:!0},tag:{type:String,default:"button"},type:{type:String,default:"default"},dashed:Boolean,renderIcon:Function,iconPlacement:{type:String,default:"left"},attrType:{type:String,default:"button"},bordered:{type:Boolean,default:!0},onClick:[Function,Array],nativeFocusBehavior:{type:Boolean,default:!gs}}),It=o.defineComponent({name:"Button",props:cv,setup(e){process.env.NODE_ENV!=="production"&&o.watchEffect(()=>{const{dashed:$,ghost:k,text:M,secondary:b,tertiary:S,quaternary:E}=e;($||k||M)&&(b||S||E)&&tt("button","`dashed`, `ghost` and `text` props can't be used along with `secondary`, `tertiary` and `quaternary` props.")});const t=o.ref(null),n=o.ref(null),r=o.ref(!1),i=Xe(()=>!e.quaternary&&!e.tertiary&&!e.secondary&&!e.text&&(!e.color||e.ghost||e.dashed)&&e.bordered),a=o.inject(av,{}),{mergedSizeRef:l}=cn({},{defaultSize:"medium",mergedSize:$=>{const{size:k}=e;if(k)return k;const{size:M}=a;if(M)return M;const{mergedSize:b}=$||{};return b?b.value:"medium"}}),s=o.computed(()=>e.focusable&&!e.disabled),d=$=>{var k;s.value||$.preventDefault(),!e.nativeFocusBehavior&&($.preventDefault(),!e.disabled&&s.value&&((k=t.value)===null||k===void 0||k.focus({preventScroll:!0})))},c=$=>{var k;if(!e.disabled&&!e.loading){const{onClick:M}=e;M&&ce(M,$),e.text||(k=n.value)===null||k===void 0||k.play()}},f=$=>{switch($.key){case"Enter":if(!e.keyboard)return;r.value=!1}},u=$=>{switch($.key){case"Enter":if(!e.keyboard||e.loading){$.preventDefault();return}r.value=!0}},p=()=>{r.value=!1},{inlineThemeDisabled:m,mergedClsPrefixRef:h,mergedRtlRef:v}=Ke(e),w=ye("Button","-button",dv,wi,e,h),g=qt("Button",v,h),P=o.computed(()=>{const $=w.value,{common:{cubicBezierEaseInOut:k,cubicBezierEaseOut:M},self:b}=$,{rippleDuration:S,opacityDisabled:E,fontWeight:D,fontWeightStrong:O}=b,V=l.value,{dashed:j,type:Q,ghost:N,text:Z,color:X,round:Y,circle:de,textColor:ie,secondary:ue,tertiary:U,quaternary:te,strong:ve}=e,we={"font-weight":ve?O:D};let re={"--n-color":"initial","--n-color-hover":"initial","--n-color-pressed":"initial","--n-color-focus":"initial","--n-color-disabled":"initial","--n-ripple-color":"initial","--n-text-color":"initial","--n-text-color-hover":"initial","--n-text-color-pressed":"initial","--n-text-color-focus":"initial","--n-text-color-disabled":"initial"};const Se=Q==="tertiary",Ce=Q==="default",le=Se?"default":Q;if(Z){const _=ie||X;re={"--n-color":"#0000","--n-color-hover":"#0000","--n-color-pressed":"#0000","--n-color-focus":"#0000","--n-color-disabled":"#0000","--n-ripple-color":"#0000","--n-text-color":_||b[ee("textColorText",le)],"--n-text-color-hover":_?vn(_):b[ee("textColorTextHover",le)],"--n-text-color-pressed":_?tr(_):b[ee("textColorTextPressed",le)],"--n-text-color-focus":_?vn(_):b[ee("textColorTextHover",le)],"--n-text-color-disabled":_||b[ee("textColorTextDisabled",le)]}}else if(N||j){const _=ie||X;re={"--n-color":"#0000","--n-color-hover":"#0000","--n-color-pressed":"#0000","--n-color-focus":"#0000","--n-color-disabled":"#0000","--n-ripple-color":X||b[ee("rippleColor",le)],"--n-text-color":_||b[ee("textColorGhost",le)],"--n-text-color-hover":_?vn(_):b[ee("textColorGhostHover",le)],"--n-text-color-pressed":_?tr(_):b[ee("textColorGhostPressed",le)],"--n-text-color-focus":_?vn(_):b[ee("textColorGhostHover",le)],"--n-text-color-disabled":_||b[ee("textColorGhostDisabled",le)]}}else if(ue){const _=Ce?b.textColor:Se?b.textColorTertiary:b[ee("color",le)],F=X||_,K=Q!=="default"&&Q!=="tertiary";re={"--n-color":K?me(F,{alpha:Number(b.colorOpacitySecondary)}):b.colorSecondary,"--n-color-hover":K?me(F,{alpha:Number(b.colorOpacitySecondaryHover)}):b.colorSecondaryHover,"--n-color-pressed":K?me(F,{alpha:Number(b.colorOpacitySecondaryPressed)}):b.colorSecondaryPressed,"--n-color-focus":K?me(F,{alpha:Number(b.colorOpacitySecondaryHover)}):b.colorSecondaryHover,"--n-color-disabled":b.colorSecondary,"--n-ripple-color":"#0000","--n-text-color":F,"--n-text-color-hover":F,"--n-text-color-pressed":F,"--n-text-color-focus":F,"--n-text-color-disabled":F}}else if(U||te){const _=Ce?b.textColor:Se?b.textColorTertiary:b[ee("color",le)],F=X||_;U?(re["--n-color"]=b.colorTertiary,re["--n-color-hover"]=b.colorTertiaryHover,re["--n-color-pressed"]=b.colorTertiaryPressed,re["--n-color-focus"]=b.colorSecondaryHover,re["--n-color-disabled"]=b.colorTertiary):(re["--n-color"]=b.colorQuaternary,re["--n-color-hover"]=b.colorQuaternaryHover,re["--n-color-pressed"]=b.colorQuaternaryPressed,re["--n-color-focus"]=b.colorQuaternaryHover,re["--n-color-disabled"]=b.colorQuaternary),re["--n-ripple-color"]="#0000",re["--n-text-color"]=F,re["--n-text-color-hover"]=F,re["--n-text-color-pressed"]=F,re["--n-text-color-focus"]=F,re["--n-text-color-disabled"]=F}else re={"--n-color":X||b[ee("color",le)],"--n-color-hover":X?vn(X):b[ee("colorHover",le)],"--n-color-pressed":X?tr(X):b[ee("colorPressed",le)],"--n-color-focus":X?vn(X):b[ee("colorFocus",le)],"--n-color-disabled":X||b[ee("colorDisabled",le)],"--n-ripple-color":X||b[ee("rippleColor",le)],"--n-text-color":ie||(X?b.textColorPrimary:Se?b.textColorTertiary:b[ee("textColor",le)]),"--n-text-color-hover":ie||(X?b.textColorHoverPrimary:b[ee("textColorHover",le)]),"--n-text-color-pressed":ie||(X?b.textColorPressedPrimary:b[ee("textColorPressed",le)]),"--n-text-color-focus":ie||(X?b.textColorFocusPrimary:b[ee("textColorFocus",le)]),"--n-text-color-disabled":ie||(X?b.textColorDisabledPrimary:b[ee("textColorDisabled",le)])};let Me={"--n-border":"initial","--n-border-hover":"initial","--n-border-pressed":"initial","--n-border-focus":"initial","--n-border-disabled":"initial"};Z?Me={"--n-border":"none","--n-border-hover":"none","--n-border-pressed":"none","--n-border-focus":"none","--n-border-disabled":"none"}:Me={"--n-border":b[ee("border",le)],"--n-border-hover":b[ee("borderHover",le)],"--n-border-pressed":b[ee("borderPressed",le)],"--n-border-focus":b[ee("borderFocus",le)],"--n-border-disabled":b[ee("borderDisabled",le)]};const{[ee("height",V)]:Re,[ee("fontSize",V)]:Le,[ee("padding",V)]:Ie,[ee("paddingRound",V)]:De,[ee("iconSize",V)]:Ue,[ee("borderRadius",V)]:ke,[ee("iconMargin",V)]:q,waveOpacity:A}=b,ne={"--n-width":de&&!Z?Re:"initial","--n-height":Z?"initial":Re,"--n-font-size":Le,"--n-padding":de||Z?"initial":Y?De:Ie,"--n-icon-size":Ue,"--n-icon-margin":q,"--n-border-radius":Z?"initial":de||Y?Re:ke};return Object.assign(Object.assign(Object.assign(Object.assign({"--n-bezier":k,"--n-bezier-ease-out":M,"--n-ripple-duration":S,"--n-opacity-disabled":E,"--n-wave-opacity":A},we),re),Me),ne)}),H=m?et("button",o.computed(()=>{let $="";const{dashed:k,type:M,ghost:b,text:S,color:E,round:D,circle:O,textColor:V,secondary:j,tertiary:Q,quaternary:N,strong:Z}=e;k&&($+="a"),b&&($+="b"),S&&($+="c"),D&&($+="d"),O&&($+="e"),j&&($+="f"),Q&&($+="g"),N&&($+="h"),Z&&($+="i"),E&&($+=`j${yo(E)}`),V&&($+=`k${yo(V)}`);const{value:X}=l;return $+=`l${X[0]}`,$+=`m${M[0]}`,$}),P,e):void 0;return{selfElRef:t,waveElRef:n,mergedClsPrefix:h,mergedFocusable:s,mergedSize:l,showBorder:i,enterPressed:r,rtlEnabled:g,handleMousedown:d,handleKeydown:u,handleBlur:p,handleKeyup:f,handleClick:c,customColorCssVars:o.computed(()=>{const{color:$}=e;if(!$)return null;const k=vn($);return{"--n-border-color":$,"--n-border-color-hover":k,"--n-border-color-pressed":tr($),"--n-border-color-focus":k,"--n-border-color-disabled":$}}),cssVars:m?void 0:P,themeClass:H==null?void 0:H.themeClass,onRender:H==null?void 0:H.onRender}},render(){const{mergedClsPrefix:e,tag:t,onRender:n}=this;n==null||n();const r=Oe(this.$slots.default,i=>i&&o.h("span",{class:`${e}-button__content`},i));return o.h(t,{ref:"selfElRef",class:[this.themeClass,`${e}-button`,`${e}-button--${this.type}-type`,`${e}-button--${this.mergedSize}-type`,this.rtlEnabled&&`${e}-button--rtl`,this.disabled&&`${e}-button--disabled`,this.block&&`${e}-button--block`,this.enterPressed&&`${e}-button--pressed`,!this.text&&this.dashed&&`${e}-button--dashed`,this.color&&`${e}-button--color`,this.secondary&&`${e}-button--secondary`,this.loading&&`${e}-button--loading`,this.ghost&&`${e}-button--ghost`],tabindex:this.mergedFocusable?0:-1,type:this.attrType,style:this.cssVars,disabled:this.disabled,onClick:this.handleClick,onBlur:this.handleBlur,onMousedown:this.handleMousedown,onKeyup:this.handleKeyup,onKeydown:this.handleKeydown},this.iconPlacement==="right"&&r,o.h(Xl,{width:!0},{default:()=>Oe(this.$slots.icon,i=>(this.loading||this.renderIcon||i)&&o.h("span",{class:`${e}-button__icon`,style:{margin:Pn(this.$slots.default)?"0":""}},o.h(Yo,null,{default:()=>this.loading?o.h(Zo,{clsPrefix:e,key:"loading",class:`${e}-icon-slot`,strokeWidth:20}):o.h("div",{key:"icon",class:`${e}-icon-slot`,role:"none"},this.renderIcon?this.renderIcon():i)})))}),this.iconPlacement==="left"&&r,this.text?null:o.h(bm,{ref:"waveElRef",clsPrefix:e}),this.showBorder?o.h("div",{"aria-hidden":!0,class:`${e}-button__border`,style:this.customColorCssVars}):null,this.showBorder?o.h("div",{"aria-hidden":!0,class:`${e}-button__state-border`,style:this.customColorCssVars}):null)}}),xs=It;function uv(e){const{fontSize:t,boxShadow2:n,popoverColor:r,textColor2:i,borderRadius:a,borderColor:l,heightSmall:s,heightMedium:d,heightLarge:c,fontSizeSmall:f,fontSizeMedium:u,fontSizeLarge:p,dividerColor:m}=e;return{panelFontSize:t,boxShadow:n,color:r,textColor:i,borderRadius:a,border:`1px solid ${l}`,heightSmall:s,heightMedium:d,heightLarge:c,fontSizeSmall:f,fontSizeMedium:u,fontSizeLarge:p,dividerColor:m}}const fv={name:"ColorPicker",common:Ye,peers:{Input:yi,Button:wi},self:uv};function hv(e,t){switch(e[0]){case"hex":return t?"#000000FF":"#000000";case"rgb":return t?"rgba(0, 0, 0, 1)":"rgb(0, 0, 0)";case"hsl":return t?"hsla(0, 0%, 0%, 1)":"hsl(0, 0%, 0%)";case"hsv":return t?"hsva(0, 0%, 0%, 1)":"hsv(0, 0%, 0%)"}return process.env.NODE_ENV!=="production"&&Gn("color-picker","props.modes is invalid."),"#000000"}function co(e){return e===null?null:/^ *#/.test(e)?"hex":e.includes("rgb")?"rgb":e.includes("hsl")?"hsl":e.includes("hsv")?"hsv":null}function pv(e){return e=Math.round(e),e>=360?359:e<0?0:e}function bv(e){return e=Math.round(e*100)/100,e>1?1:e<0?0:e}const gv={rgb:{hex(e){return Lt(Qe(e))},hsl(e){const[t,n,r,i]=Qe(e);return Ht([...lr(t,n,r),i])},hsv(e){const[t,n,r,i]=Qe(e);return an([...ar(t,n,r),i])}},hex:{rgb(e){return $t(Qe(e))},hsl(e){const[t,n,r,i]=Qe(e);return Ht([...lr(t,n,r),i])},hsv(e){const[t,n,r,i]=Qe(e);return an([...ar(t,n,r),i])}},hsl:{hex(e){const[t,n,r,i]=zn(e);return Lt([...sr(t,n,r),i])},rgb(e){const[t,n,r,i]=zn(e);return $t([...sr(t,n,r),i])},hsv(e){const[t,n,r,i]=zn(e);return an([...Ui(t,n,r),i])}},hsv:{hex(e){const[t,n,r,i]=rn(e);return Lt([...Dt(t,n,r),i])},rgb(e){const[t,n,r,i]=rn(e);return $t([...Dt(t,n,r),i])},hsl(e){const[t,n,r,i]=rn(e);return Ht([...vo(t,n,r),i])}}};function ys(e,t,n){return n=n||co(e),n?n===t?e:gv[n][t](e):null}const Vn="12px",mv=12,xn="6px",vv=6,xv="linear-gradient(90deg,red,#ff0 16.66%,#0f0 33.33%,#0ff 50%,#00f 66.66%,#f0f 83.33%,red)",yv=o.defineComponent({name:"HueSlider",props:{clsPrefix:{type:String,required:!0},hue:{type:Number,required:!0},onUpdateHue:{type:Function,required:!0},onComplete:Function},setup(e){const t=o.ref(null);function n(a){t.value&&(Pe("mousemove",document,r),Pe("mouseup",document,i),r(a))}function r(a){const{value:l}=t;if(!l)return;const{width:s,left:d}=l.getBoundingClientRect(),c=pv((a.clientX-d-vv)/(s-mv)*360);e.onUpdateHue(c)}function i(){var a;$e("mousemove",document,r),$e("mouseup",document,i),(a=e.onComplete)===null||a===void 0||a.call(e)}return{railRef:t,handleMouseDown:n}},render(){const{clsPrefix:e}=this;return o.h("div",{class:`${e}-color-picker-slider`,style:{height:Vn,borderRadius:xn}},o.h("div",{ref:"railRef",style:{boxShadow:"inset 0 0 2px 0 rgba(0, 0, 0, .24)",boxSizing:"border-box",backgroundImage:xv,height:Vn,borderRadius:xn,position:"relative"},onMousedown:this.handleMouseDown},o.h("div",{style:{position:"absolute",left:xn,right:xn,top:0,bottom:0}},o.h("div",{class:`${e}-color-picker-handle`,style:{left:`calc((${this.hue}%) / 359 * 100 - ${xn})`,borderRadius:xn,width:Vn,height:Vn}},o.h("div",{class:`${e}-color-picker-handle__fill`,style:{backgroundColor:`hsl(${this.hue}, 100%, 50%)`,borderRadius:xn,width:Vn,height:Vn}})))))}}),uo="12px",wv=12,yn="6px",Cv=o.defineComponent({name:"AlphaSlider",props:{clsPrefix:{type:String,required:!0},rgba:{type:Array,default:null},alpha:{type:Number,default:0},onUpdateAlpha:{type:Function,required:!0},onComplete:Function},setup(e){const t=o.ref(null);function n(a){!t.value||!e.rgba||(Pe("mousemove",document,r),Pe("mouseup",document,i),r(a))}function r(a){const{value:l}=t;if(!l)return;const{width:s,left:d}=l.getBoundingClientRect(),c=(a.clientX-d)/(s-wv);e.onUpdateAlpha(bv(c))}function i(){var a;$e("mousemove",document,r),$e("mouseup",document,i),(a=e.onComplete)===null||a===void 0||a.call(e)}return{railRef:t,railBackgroundImage:o.computed(()=>{const{rgba:a}=e;return a?`linear-gradient(to right, rgba(${a[0]}, ${a[1]}, ${a[2]}, 0) 0%, rgba(${a[0]}, ${a[1]}, ${a[2]}, 1) 100%)`:""}),handleMouseDown:n}},render(){const{clsPrefix:e}=this;return o.h("div",{class:`${e}-color-picker-slider`,ref:"railRef",style:{height:uo,borderRadius:yn},onMousedown:this.handleMouseDown},o.h("div",{style:{borderRadius:yn,position:"absolute",left:0,right:0,top:0,bottom:0,overflow:"hidden"}},o.h("div",{class:`${e}-color-picker-checkboard`}),o.h("div",{class:`${e}-color-picker-slider__image`,style:{backgroundImage:this.railBackgroundImage}})),this.rgba&&o.h("div",{style:{position:"absolute",left:yn,right:yn,top:0,bottom:0}},o.h("div",{class:`${e}-color-picker-handle`,style:{left:`calc(${this.alpha*100}% - ${yn})`,borderRadius:yn,width:uo,height:uo}},o.h("div",{class:`${e}-color-picker-handle__fill`,style:{backgroundColor:$t(this.rgba),borderRadius:yn,width:uo,height:uo}}))))}}),nr="12px",or="6px",Sv=o.defineComponent({name:"Pallete",props:{clsPrefix:{type:String,required:!0},rgba:{type:Array,default:null},displayedHue:{type:Number,required:!0},displayedSv:{type:Array,required:!0},onUpdateSV:{type:Function,required:!0},onComplete:Function},setup(e){const t=o.ref(null);function n(a){t.value&&(Pe("mousemove",document,r),Pe("mouseup",document,i),r(a))}function r(a){const{value:l}=t;if(!l)return;const{width:s,height:d,left:c,bottom:f}=l.getBoundingClientRect(),u=(f-a.clientY)/d,p=(a.clientX-c)/s,m=100*(p>1?1:p<0?0:p),h=100*(u>1?1:u<0?0:u);e.onUpdateSV(m,h)}function i(){var a;$e("mousemove",document,r),$e("mouseup",document,i),(a=e.onComplete)===null||a===void 0||a.call(e)}return{palleteRef:t,handleColor:o.computed(()=>{const{rgba:a}=e;return a?`rgb(${a[0]}, ${a[1]}, ${a[2]})`:""}),handleMouseDown:n}},render(){const{clsPrefix:e}=this;return o.h("div",{class:`${e}-color-picker-pallete`,onMousedown:this.handleMouseDown,ref:"palleteRef"},o.h("div",{class:`${e}-color-picker-pallete__layer`,style:{backgroundImage:`linear-gradient(90deg, white, hsl(${this.displayedHue}, 100%, 50%))`}}),o.h("div",{class:`${e}-color-picker-pallete__layer ${e}-color-picker-pallete__layer--shadowed`,style:{backgroundImage:"linear-gradient(180deg, rgba(0, 0, 0, 0%), rgba(0, 0, 0, 100%))"}}),this.rgba&&o.h("div",{class:`${e}-color-picker-handle`,style:{width:nr,height:nr,borderRadius:or,left:`calc(${this.displayedSv[0]}% - ${or})`,bottom:`calc(${this.displayedSv[1]}% - ${or})`}},o.h("div",{class:`${e}-color-picker-handle__fill`,style:{backgroundColor:this.handleColor,borderRadius:or,width:nr,height:nr}})))}}),Ci="n-color-picker";function $v(e){return/^\d{1,3}\.?\d*$/.test(e.trim())?Math.max(0,Math.min(Number.parseInt(e),255)):!1}function kv(e){return/^\d{1,3}\.?\d*$/.test(e.trim())?Math.max(0,Math.min(Number.parseInt(e),360)):!1}function zv(e){return/^\d{1,3}\.?\d*$/.test(e.trim())?Math.max(0,Math.min(Number.parseInt(e),100)):!1}function Tv(e){const t=e.trim();return/^#[0-9a-fA-F]+$/.test(t)?[4,5,7,9].includes(t.length):!1}function Pv(e){return/^\d{1,3}\.?\d*%$/.test(e.trim())?Math.max(0,Math.min(Number.parseInt(e)/100,100)):!1}const Rv={paddingSmall:"0 4px"},ws=o.defineComponent({name:"ColorInputUnit",props:{label:{type:String,required:!0},value:{type:[Number,String],default:null},showAlpha:Boolean,onUpdateValue:{type:Function,required:!0}},setup(e){const t=o.ref(""),{themeRef:n}=o.inject(Ci,null);o.watchEffect(()=>{t.value=r()});function r(){const{value:l}=e;if(l===null)return"";const{label:s}=e;return s==="HEX"?l:s==="A"?`${Math.floor(l*100)}%`:String(Math.floor(l))}function i(l){t.value=l}function a(l){let s,d;switch(e.label){case"HEX":d=Tv(l),d&&e.onUpdateValue(l),t.value=r();break;case"H":s=kv(l),s===!1?t.value=r():e.onUpdateValue(s);break;case"S":case"L":case"V":s=zv(l),s===!1?t.value=r():e.onUpdateValue(s);break;case"A":s=Pv(l),s===!1?t.value=r():e.onUpdateValue(s);break;case"R":case"G":case"B":s=$v(l),s===!1?t.value=r():e.onUpdateValue(s);break}}return{mergedTheme:n,inputValue:t,handleInputChange:a,handleInputUpdateValue:i}},render(){const{mergedTheme:e}=this;return o.h(Dn,{size:"small",placeholder:this.label,theme:e.peers.Input,themeOverrides:e.peerOverrides.Input,builtinThemeOverrides:Rv,value:this.inputValue,onUpdateValue:this.handleInputUpdateValue,onChange:this.handleInputChange,style:this.label==="A"?"flex-grow: 1.25;":""})}}),Bv=o.defineComponent({name:"ColorInput",props:{clsPrefix:{type:String,required:!0},mode:{type:String,required:!0},modes:{type:Array,required:!0},showAlpha:{type:Boolean,required:!0},value:{type:String,default:null},valueArr:{type:Array,default:null},onUpdateValue:{type:Function,required:!0},onUpdateMode:{type:Function,required:!0}},setup(e){return{handleUnitUpdateValue(t,n){const{showAlpha:r}=e;if(e.mode==="hex"){e.onUpdateValue((r?Lt:Un)(n));return}let i;switch(e.valueArr===null?i=[0,0,0,0]:i=Array.from(e.valueArr),e.mode){case"hsv":i[t]=n,e.onUpdateValue((r?an:gr)(i));break;case"rgb":i[t]=n,e.onUpdateValue((r?$t:br)(i));break;case"hsl":i[t]=n,e.onUpdateValue((r?Ht:mr)(i));break}}}},render(){const{clsPrefix:e,modes:t}=this;return o.h("div",{class:`${e}-color-picker-input`},o.h("div",{class:`${e}-color-picker-input__mode`,onClick:this.onUpdateMode,style:{cursor:t.length===1?"":"pointer"}},this.mode.toUpperCase()+(this.showAlpha?"A":"")),o.h(iv,null,{default:()=>{const{mode:n,valueArr:r,showAlpha:i}=this;if(n==="hex"){let a=null;try{a=r===null?null:(i?Lt:Un)(r)}catch{}return o.h(ws,{label:"HEX",showAlpha:i,value:a,onUpdateValue:l=>{this.handleUnitUpdateValue(0,l)}})}return(n+(i?"a":"")).split("").map((a,l)=>o.h(ws,{label:a.toUpperCase(),value:r===null?null:r[l],onUpdateValue:s=>{this.handleUnitUpdateValue(l,s)}}))}}))}}),_v=o.defineComponent({name:"ColorPickerTrigger",props:{clsPrefix:{type:String,required:!0},value:{type:String,default:null},hsla:{type:Array,default:null},disabled:Boolean,onClick:Function},setup(e){const{colorPickerSlots:t,renderLabelRef:n}=o.inject(Ci,null);return()=>{const{hsla:r,value:i,clsPrefix:a,onClick:l,disabled:s}=e,d=t.label||n.value;return o.h("div",{class:[`${a}-color-picker-trigger`,s&&`${a}-color-picker-trigger--disabled`],onClick:s?void 0:l},o.h("div",{class:`${a}-color-picker-trigger__fill`},o.h("div",{class:`${a}-color-picker-checkboard`}),o.h("div",{style:{position:"absolute",left:0,right:0,top:0,bottom:0,backgroundColor:r?Ht(r):""}}),i&&r?o.h("div",{class:`${a}-color-picker-trigger__value`,style:{color:r[2]>50||r[3]<.5?"black":"white"}},d?d(i):i):null))}}});function Ev(e,t){if(t==="hsv"){const[n,r,i,a]=rn(e);return $t([...Dt(n,r,i),a])}return e}function Mv(e){const t=document.createElement("canvas").getContext("2d");return t?(t.fillStyle=e,t.fillStyle):"#000000"}const Iv=o.defineComponent({name:"ColorPickerSwatches",props:{clsPrefix:{type:String,required:!0},mode:{type:String,required:!0},swatches:{type:Array,required:!0},onUpdateColor:{type:Function,required:!0}},setup(e){const t=o.computed(()=>e.swatches.map(a=>{const l=co(a);return{value:a,mode:l,legalValue:Ev(a,l)}}));function n(a){const{mode:l}=e;let{value:s,mode:d}=a;return d||(d="hex",/^[a-zA-Z]+$/.test(s)?s=Mv(s):(Gn("color-picker",`color ${s} in swatches is invalid.`),s="#000000")),d===l?s:ys(s,l,d)}function r(a){e.onUpdateColor(n(a))}function i(a,l){a.key==="Enter"&&r(l)}return{parsedSwatchesRef:t,handleSwatchSelect:r,handleSwatchKeyDown:i}},render(){const{clsPrefix:e}=this;return o.h("div",{class:`${e}-color-picker-swatches`},this.parsedSwatchesRef.map(t=>o.h("div",{class:`${e}-color-picker-swatch`,tabindex:0,onClick:()=>{this.handleSwatchSelect(t)},onKeydown:n=>{this.handleSwatchKeyDown(n,t)}},o.h("div",{class:`${e}-color-picker-swatch__fill`,style:{background:t.legalValue}}))))}}),Ov=o.defineComponent({name:"ColorPreview",props:{clsPrefix:{type:String,required:!0},mode:{type:String,required:!0},color:{type:String,default:null,validator:e=>{const t=co(e);return!!(!e||t&&t!=="hsv")}},onUpdateColor:{type:Function,required:!0}},setup(e){function t(n){var r;const i=n.target.value;(r=e.onUpdateColor)===null||r===void 0||r.call(e,ys(i.toUpperCase(),e.mode,"hex")),n.stopPropagation()}return{handleChange:t}},render(){const{clsPrefix:e}=this;return o.h("div",{class:`${e}-color-picker-preview__preview`},o.h("span",{class:`${e}-color-picker-preview__fill`,style:{background:this.color||"#000000"}}),o.h("input",{class:`${e}-color-picker-preview__input`,type:"color",value:this.color,onChange:this.handleChange}))}}),Av=I([y("color-picker",`
|
|
1160
|
+
`),W("dashed",[R("border, state-border",{borderStyle:"dashed !important"})]),W("disabled",{cursor:"not-allowed",opacity:"var(--n-opacity-disabled)"})]),V("@keyframes button-wave-spread",{from:{boxShadow:"0 0 0.5px 0 var(--n-ripple-color)"},to:{boxShadow:"0 0 0.5px 4.5px var(--n-ripple-color)"}}),V("@keyframes button-wave-opacity",{from:{opacity:"var(--n-wave-opacity)"},to:{opacity:0}})]),dv=Object.assign(Object.assign({},Ce.props),{color:String,textColor:String,text:Boolean,block:Boolean,loading:Boolean,disabled:Boolean,circle:Boolean,size:String,ghost:Boolean,round:Boolean,secondary:Boolean,tertiary:Boolean,quaternary:Boolean,strong:Boolean,focusable:{type:Boolean,default:!0},keyboard:{type:Boolean,default:!0},tag:{type:String,default:"button"},type:{type:String,default:"default"},dashed:Boolean,renderIcon:Function,iconPlacement:{type:String,default:"left"},attrType:{type:String,default:"button"},bordered:{type:Boolean,default:!0},onClick:[Function,Array],nativeFocusBehavior:{type:Boolean,default:!bs}}),Pt=r.defineComponent({name:"Button",props:dv,setup(e){process.env.NODE_ENV!=="production"&&r.watchEffect(()=>{const{dashed:$,ghost:k,text:M,secondary:p,tertiary:S,quaternary:B}=e;($||k||M)&&(p||S||B)&&Qe("button","`dashed`, `ghost` and `text` props can't be used along with `secondary`, `tertiary` and `quaternary` props.")});const t=r.ref(null),n=r.ref(null),o=r.ref(!1),i=Xe(()=>!e.quaternary&&!e.tertiary&&!e.secondary&&!e.text&&(!e.color||e.ghost||e.dashed)&&e.bordered),a=r.inject(iv,{}),{mergedSizeRef:l}=dn({},{defaultSize:"medium",mergedSize:$=>{const{size:k}=e;if(k)return k;const{size:M}=a;if(M)return M;const{mergedSize:p}=$||{};return p?p.value:"medium"}}),s=r.computed(()=>e.focusable&&!e.disabled),d=$=>{var k;s.value||$.preventDefault(),!e.nativeFocusBehavior&&($.preventDefault(),!e.disabled&&s.value&&((k=t.value)===null||k===void 0||k.focus({preventScroll:!0})))},c=$=>{var k;if(!e.disabled&&!e.loading){const{onClick:M}=e;M&&he(M,$),e.text||(k=n.value)===null||k===void 0||k.play()}},f=$=>{switch($.key){case"Enter":if(!e.keyboard)return;o.value=!1}},u=$=>{switch($.key){case"Enter":if(!e.keyboard||e.loading){$.preventDefault();return}o.value=!0}},b=()=>{o.value=!1},{inlineThemeDisabled:m,mergedClsPrefixRef:h,mergedRtlRef:x}=Je(e),w=Ce("Button","-button",sv,Ci,e,h),g=Kt("Button",x,h),P=r.computed(()=>{const $=w.value,{common:{cubicBezierEaseInOut:k,cubicBezierEaseOut:M},self:p}=$,{rippleDuration:S,opacityDisabled:B,fontWeight:F,fontWeightStrong:I}=p,D=l.value,{dashed:j,type:Q,ghost:N,text:Z,color:q,round:Y,circle:de,textColor:ie,secondary:ce,tertiary:U,quaternary:te,strong:ve}=e,ye={"font-weight":ve?I:F};let oe={"--n-color":"initial","--n-color-hover":"initial","--n-color-pressed":"initial","--n-color-focus":"initial","--n-color-disabled":"initial","--n-ripple-color":"initial","--n-text-color":"initial","--n-text-color-hover":"initial","--n-text-color-pressed":"initial","--n-text-color-focus":"initial","--n-text-color-disabled":"initial"};const Se=Q==="tertiary",we=Q==="default",le=Se?"default":Q;if(Z){const E=ie||q;oe={"--n-color":"#0000","--n-color-hover":"#0000","--n-color-pressed":"#0000","--n-color-focus":"#0000","--n-color-disabled":"#0000","--n-ripple-color":"#0000","--n-text-color":E||p[ee("textColorText",le)],"--n-text-color-hover":E?mn(E):p[ee("textColorTextHover",le)],"--n-text-color-pressed":E?to(E):p[ee("textColorTextPressed",le)],"--n-text-color-focus":E?mn(E):p[ee("textColorTextHover",le)],"--n-text-color-disabled":E||p[ee("textColorTextDisabled",le)]}}else if(N||j){const E=ie||q;oe={"--n-color":"#0000","--n-color-hover":"#0000","--n-color-pressed":"#0000","--n-color-focus":"#0000","--n-color-disabled":"#0000","--n-ripple-color":q||p[ee("rippleColor",le)],"--n-text-color":E||p[ee("textColorGhost",le)],"--n-text-color-hover":E?mn(E):p[ee("textColorGhostHover",le)],"--n-text-color-pressed":E?to(E):p[ee("textColorGhostPressed",le)],"--n-text-color-focus":E?mn(E):p[ee("textColorGhostHover",le)],"--n-text-color-disabled":E||p[ee("textColorGhostDisabled",le)]}}else if(ce){const E=we?p.textColor:Se?p.textColorTertiary:p[ee("color",le)],A=q||E,K=Q!=="default"&&Q!=="tertiary";oe={"--n-color":K?me(A,{alpha:Number(p.colorOpacitySecondary)}):p.colorSecondary,"--n-color-hover":K?me(A,{alpha:Number(p.colorOpacitySecondaryHover)}):p.colorSecondaryHover,"--n-color-pressed":K?me(A,{alpha:Number(p.colorOpacitySecondaryPressed)}):p.colorSecondaryPressed,"--n-color-focus":K?me(A,{alpha:Number(p.colorOpacitySecondaryHover)}):p.colorSecondaryHover,"--n-color-disabled":p.colorSecondary,"--n-ripple-color":"#0000","--n-text-color":A,"--n-text-color-hover":A,"--n-text-color-pressed":A,"--n-text-color-focus":A,"--n-text-color-disabled":A}}else if(U||te){const E=we?p.textColor:Se?p.textColorTertiary:p[ee("color",le)],A=q||E;U?(oe["--n-color"]=p.colorTertiary,oe["--n-color-hover"]=p.colorTertiaryHover,oe["--n-color-pressed"]=p.colorTertiaryPressed,oe["--n-color-focus"]=p.colorSecondaryHover,oe["--n-color-disabled"]=p.colorTertiary):(oe["--n-color"]=p.colorQuaternary,oe["--n-color-hover"]=p.colorQuaternaryHover,oe["--n-color-pressed"]=p.colorQuaternaryPressed,oe["--n-color-focus"]=p.colorQuaternaryHover,oe["--n-color-disabled"]=p.colorQuaternary),oe["--n-ripple-color"]="#0000",oe["--n-text-color"]=A,oe["--n-text-color-hover"]=A,oe["--n-text-color-pressed"]=A,oe["--n-text-color-focus"]=A,oe["--n-text-color-disabled"]=A}else oe={"--n-color":q||p[ee("color",le)],"--n-color-hover":q?mn(q):p[ee("colorHover",le)],"--n-color-pressed":q?to(q):p[ee("colorPressed",le)],"--n-color-focus":q?mn(q):p[ee("colorFocus",le)],"--n-color-disabled":q||p[ee("colorDisabled",le)],"--n-ripple-color":q||p[ee("rippleColor",le)],"--n-text-color":ie||(q?p.textColorPrimary:Se?p.textColorTertiary:p[ee("textColor",le)]),"--n-text-color-hover":ie||(q?p.textColorHoverPrimary:p[ee("textColorHover",le)]),"--n-text-color-pressed":ie||(q?p.textColorPressedPrimary:p[ee("textColorPressed",le)]),"--n-text-color-focus":ie||(q?p.textColorFocusPrimary:p[ee("textColorFocus",le)]),"--n-text-color-disabled":ie||(q?p.textColorDisabledPrimary:p[ee("textColorDisabled",le)])};let Me={"--n-border":"initial","--n-border-hover":"initial","--n-border-pressed":"initial","--n-border-focus":"initial","--n-border-disabled":"initial"};Z?Me={"--n-border":"none","--n-border-hover":"none","--n-border-pressed":"none","--n-border-focus":"none","--n-border-disabled":"none"}:Me={"--n-border":p[ee("border",le)],"--n-border-hover":p[ee("borderHover",le)],"--n-border-pressed":p[ee("borderPressed",le)],"--n-border-focus":p[ee("borderFocus",le)],"--n-border-disabled":p[ee("borderDisabled",le)]};const{[ee("height",D)]:Re,[ee("fontSize",D)]:He,[ee("padding",D)]:Ie,[ee("paddingRound",D)]:De,[ee("iconSize",D)]:Ue,[ee("borderRadius",D)]:ke,[ee("iconMargin",D)]:X,waveOpacity:O}=p,ne={"--n-width":de&&!Z?Re:"initial","--n-height":Z?"initial":Re,"--n-font-size":He,"--n-padding":de||Z?"initial":Y?De:Ie,"--n-icon-size":Ue,"--n-icon-margin":X,"--n-border-radius":Z?"initial":de||Y?Re:ke};return Object.assign(Object.assign(Object.assign(Object.assign({"--n-bezier":k,"--n-bezier-ease-out":M,"--n-ripple-duration":S,"--n-opacity-disabled":B,"--n-wave-opacity":O},ye),oe),Me),ne)}),L=m?tt("button",r.computed(()=>{let $="";const{dashed:k,type:M,ghost:p,text:S,color:B,round:F,circle:I,textColor:D,secondary:j,tertiary:Q,quaternary:N,strong:Z}=e;k&&($+="a"),p&&($+="b"),S&&($+="c"),F&&($+="d"),I&&($+="e"),j&&($+="f"),Q&&($+="g"),N&&($+="h"),Z&&($+="i"),B&&($+=`j${yr(B)}`),D&&($+=`k${yr(D)}`);const{value:q}=l;return $+=`l${q[0]}`,$+=`m${M[0]}`,$}),P,e):void 0;return{selfElRef:t,waveElRef:n,mergedClsPrefix:h,mergedFocusable:s,mergedSize:l,showBorder:i,enterPressed:o,rtlEnabled:g,handleMousedown:d,handleKeydown:u,handleBlur:b,handleKeyup:f,handleClick:c,customColorCssVars:r.computed(()=>{const{color:$}=e;if(!$)return null;const k=mn($);return{"--n-border-color":$,"--n-border-color-hover":k,"--n-border-color-pressed":to($),"--n-border-color-focus":k,"--n-border-color-disabled":$}}),cssVars:m?void 0:P,themeClass:L==null?void 0:L.themeClass,onRender:L==null?void 0:L.onRender}},render(){const{mergedClsPrefix:e,tag:t,onRender:n}=this;n==null||n();const o=Ae(this.$slots.default,i=>i&&r.h("span",{class:`${e}-button__content`},i));return r.h(t,{ref:"selfElRef",class:[this.themeClass,`${e}-button`,`${e}-button--${this.type}-type`,`${e}-button--${this.mergedSize}-type`,this.rtlEnabled&&`${e}-button--rtl`,this.disabled&&`${e}-button--disabled`,this.block&&`${e}-button--block`,this.enterPressed&&`${e}-button--pressed`,!this.text&&this.dashed&&`${e}-button--dashed`,this.color&&`${e}-button--color`,this.secondary&&`${e}-button--secondary`,this.loading&&`${e}-button--loading`,this.ghost&&`${e}-button--ghost`],tabindex:this.mergedFocusable?0:-1,type:this.attrType,style:this.cssVars,disabled:this.disabled,onClick:this.handleClick,onBlur:this.handleBlur,onMousedown:this.handleMousedown,onKeyup:this.handleKeyup,onKeydown:this.handleKeydown},this.iconPlacement==="right"&&o,r.h(Xl,{width:!0},{default:()=>Ae(this.$slots.icon,i=>(this.loading||this.renderIcon||i)&&r.h("span",{class:`${e}-button__icon`,style:{margin:zn(this.$slots.default)?"0":""}},r.h(Yr,null,{default:()=>this.loading?r.h(Zr,{clsPrefix:e,key:"loading",class:`${e}-icon-slot`,strokeWidth:20}):r.h("div",{key:"icon",class:`${e}-icon-slot`,role:"none"},this.renderIcon?this.renderIcon():i)})))}),this.iconPlacement==="left"&&o,this.text?null:r.h(pm,{ref:"waveElRef",clsPrefix:e}),this.showBorder?r.h("div",{"aria-hidden":!0,class:`${e}-button__border`,style:this.customColorCssVars}):null,this.showBorder?r.h("div",{"aria-hidden":!0,class:`${e}-button__state-border`,style:this.customColorCssVars}):null)}}),vs=Pt;function cv(e){const{fontSize:t,boxShadow2:n,popoverColor:o,textColor2:i,borderRadius:a,borderColor:l,heightSmall:s,heightMedium:d,heightLarge:c,fontSizeSmall:f,fontSizeMedium:u,fontSizeLarge:b,dividerColor:m}=e;return{panelFontSize:t,boxShadow:n,color:o,textColor:i,borderRadius:a,border:`1px solid ${l}`,heightSmall:s,heightMedium:d,heightLarge:c,fontSizeSmall:f,fontSizeMedium:u,fontSizeLarge:b,dividerColor:m}}const uv={name:"ColorPicker",common:et,peers:{Input:wi,Button:Ci},self:cv};function fv(e,t){switch(e[0]){case"hex":return t?"#000000FF":"#000000";case"rgb":return t?"rgba(0, 0, 0, 1)":"rgb(0, 0, 0)";case"hsl":return t?"hsla(0, 0%, 0%, 1)":"hsl(0, 0%, 0%)";case"hsv":return t?"hsva(0, 0%, 0%, 1)":"hsv(0, 0%, 0%)"}return process.env.NODE_ENV!=="production"&&Un("color-picker","props.modes is invalid."),"#000000"}function sr(e){return e===null?null:/^ *#/.test(e)?"hex":e.includes("rgb")?"rgb":e.includes("hsl")?"hsl":e.includes("hsv")?"hsv":null}function hv(e){return e=Math.round(e),e>=360?359:e<0?0:e}function pv(e){return e=Math.round(e*100)/100,e>1?1:e<0?0:e}const bv={rgb:{hex(e){return Lt(Ze(e))},hsl(e){const[t,n,o,i]=Ze(e);return Vt([...lo(t,n,o),i])},hsv(e){const[t,n,o,i]=Ze(e);return on([...ao(t,n,o),i])}},hex:{rgb(e){return wt(Ze(e))},hsl(e){const[t,n,o,i]=Ze(e);return Vt([...lo(t,n,o),i])},hsv(e){const[t,n,o,i]=Ze(e);return on([...ao(t,n,o),i])}},hsl:{hex(e){const[t,n,o,i]=kn(e);return Lt([...so(t,n,o),i])},rgb(e){const[t,n,o,i]=kn(e);return wt([...so(t,n,o),i])},hsv(e){const[t,n,o,i]=kn(e);return on([...Gi(t,n,o),i])}},hsv:{hex(e){const[t,n,o,i]=rn(e);return Lt([...Ft(t,n,o),i])},rgb(e){const[t,n,o,i]=rn(e);return wt([...Ft(t,n,o),i])},hsl(e){const[t,n,o,i]=rn(e);return Vt([...mr(t,n,o),i])}}};function xs(e,t,n){return n=n||sr(e),n?n===t?e:bv[n][t](e):null}const Dn="12px",gv=12,vn="6px",mv=6,vv="linear-gradient(90deg,red,#ff0 16.66%,#0f0 33.33%,#0ff 50%,#00f 66.66%,#f0f 83.33%,red)",xv=r.defineComponent({name:"HueSlider",props:{clsPrefix:{type:String,required:!0},hue:{type:Number,required:!0},onUpdateHue:{type:Function,required:!0},onComplete:Function},setup(e){const t=r.ref(null);function n(a){t.value&&(Pe("mousemove",document,o),Pe("mouseup",document,i),o(a))}function o(a){const{value:l}=t;if(!l)return;const{width:s,left:d}=l.getBoundingClientRect(),c=hv((a.clientX-d-mv)/(s-gv)*360);e.onUpdateHue(c)}function i(){var a;$e("mousemove",document,o),$e("mouseup",document,i),(a=e.onComplete)===null||a===void 0||a.call(e)}return{railRef:t,handleMouseDown:n}},render(){const{clsPrefix:e}=this;return r.h("div",{class:`${e}-color-picker-slider`,style:{height:Dn,borderRadius:vn}},r.h("div",{ref:"railRef",style:{boxShadow:"inset 0 0 2px 0 rgba(0, 0, 0, .24)",boxSizing:"border-box",backgroundImage:vv,height:Dn,borderRadius:vn,position:"relative"},onMousedown:this.handleMouseDown},r.h("div",{style:{position:"absolute",left:vn,right:vn,top:0,bottom:0}},r.h("div",{class:`${e}-color-picker-handle`,style:{left:`calc((${this.hue}%) / 359 * 100 - ${vn})`,borderRadius:vn,width:Dn,height:Dn}},r.h("div",{class:`${e}-color-picker-handle__fill`,style:{backgroundColor:`hsl(${this.hue}, 100%, 50%)`,borderRadius:vn,width:Dn,height:Dn}})))))}}),dr="12px",yv=12,xn="6px",wv=r.defineComponent({name:"AlphaSlider",props:{clsPrefix:{type:String,required:!0},rgba:{type:Array,default:null},alpha:{type:Number,default:0},onUpdateAlpha:{type:Function,required:!0},onComplete:Function},setup(e){const t=r.ref(null);function n(a){!t.value||!e.rgba||(Pe("mousemove",document,o),Pe("mouseup",document,i),o(a))}function o(a){const{value:l}=t;if(!l)return;const{width:s,left:d}=l.getBoundingClientRect(),c=(a.clientX-d)/(s-yv);e.onUpdateAlpha(pv(c))}function i(){var a;$e("mousemove",document,o),$e("mouseup",document,i),(a=e.onComplete)===null||a===void 0||a.call(e)}return{railRef:t,railBackgroundImage:r.computed(()=>{const{rgba:a}=e;return a?`linear-gradient(to right, rgba(${a[0]}, ${a[1]}, ${a[2]}, 0) 0%, rgba(${a[0]}, ${a[1]}, ${a[2]}, 1) 100%)`:""}),handleMouseDown:n}},render(){const{clsPrefix:e}=this;return r.h("div",{class:`${e}-color-picker-slider`,ref:"railRef",style:{height:dr,borderRadius:xn},onMousedown:this.handleMouseDown},r.h("div",{style:{borderRadius:xn,position:"absolute",left:0,right:0,top:0,bottom:0,overflow:"hidden"}},r.h("div",{class:`${e}-color-picker-checkboard`}),r.h("div",{class:`${e}-color-picker-slider__image`,style:{backgroundImage:this.railBackgroundImage}})),this.rgba&&r.h("div",{style:{position:"absolute",left:xn,right:xn,top:0,bottom:0}},r.h("div",{class:`${e}-color-picker-handle`,style:{left:`calc(${this.alpha*100}% - ${xn})`,borderRadius:xn,width:dr,height:dr}},r.h("div",{class:`${e}-color-picker-handle__fill`,style:{backgroundColor:wt(this.rgba),borderRadius:xn,width:dr,height:dr}}))))}}),no="12px",ro="6px",Cv=r.defineComponent({name:"Pallete",props:{clsPrefix:{type:String,required:!0},rgba:{type:Array,default:null},displayedHue:{type:Number,required:!0},displayedSv:{type:Array,required:!0},onUpdateSV:{type:Function,required:!0},onComplete:Function},setup(e){const t=r.ref(null);function n(a){t.value&&(Pe("mousemove",document,o),Pe("mouseup",document,i),o(a))}function o(a){const{value:l}=t;if(!l)return;const{width:s,height:d,left:c,bottom:f}=l.getBoundingClientRect(),u=(f-a.clientY)/d,b=(a.clientX-c)/s,m=100*(b>1?1:b<0?0:b),h=100*(u>1?1:u<0?0:u);e.onUpdateSV(m,h)}function i(){var a;$e("mousemove",document,o),$e("mouseup",document,i),(a=e.onComplete)===null||a===void 0||a.call(e)}return{palleteRef:t,handleColor:r.computed(()=>{const{rgba:a}=e;return a?`rgb(${a[0]}, ${a[1]}, ${a[2]})`:""}),handleMouseDown:n}},render(){const{clsPrefix:e}=this;return r.h("div",{class:`${e}-color-picker-pallete`,onMousedown:this.handleMouseDown,ref:"palleteRef"},r.h("div",{class:`${e}-color-picker-pallete__layer`,style:{backgroundImage:`linear-gradient(90deg, white, hsl(${this.displayedHue}, 100%, 50%))`}}),r.h("div",{class:`${e}-color-picker-pallete__layer ${e}-color-picker-pallete__layer--shadowed`,style:{backgroundImage:"linear-gradient(180deg, rgba(0, 0, 0, 0%), rgba(0, 0, 0, 100%))"}}),this.rgba&&r.h("div",{class:`${e}-color-picker-handle`,style:{width:no,height:no,borderRadius:ro,left:`calc(${this.displayedSv[0]}% - ${ro})`,bottom:`calc(${this.displayedSv[1]}% - ${ro})`}},r.h("div",{class:`${e}-color-picker-handle__fill`,style:{backgroundColor:this.handleColor,borderRadius:ro,width:no,height:no}})))}}),Si="n-color-picker";function Sv(e){return/^\d{1,3}\.?\d*$/.test(e.trim())?Math.max(0,Math.min(Number.parseInt(e),255)):!1}function $v(e){return/^\d{1,3}\.?\d*$/.test(e.trim())?Math.max(0,Math.min(Number.parseInt(e),360)):!1}function kv(e){return/^\d{1,3}\.?\d*$/.test(e.trim())?Math.max(0,Math.min(Number.parseInt(e),100)):!1}function Tv(e){const t=e.trim();return/^#[0-9a-fA-F]+$/.test(t)?[4,5,7,9].includes(t.length):!1}function zv(e){return/^\d{1,3}\.?\d*%$/.test(e.trim())?Math.max(0,Math.min(Number.parseInt(e)/100,100)):!1}const Pv={paddingSmall:"0 4px"},ys=r.defineComponent({name:"ColorInputUnit",props:{label:{type:String,required:!0},value:{type:[Number,String],default:null},showAlpha:Boolean,onUpdateValue:{type:Function,required:!0}},setup(e){const t=r.ref(""),{themeRef:n}=r.inject(Si,null);r.watchEffect(()=>{t.value=o()});function o(){const{value:l}=e;if(l===null)return"";const{label:s}=e;return s==="HEX"?l:s==="A"?`${Math.floor(l*100)}%`:String(Math.floor(l))}function i(l){t.value=l}function a(l){let s,d;switch(e.label){case"HEX":d=Tv(l),d&&e.onUpdateValue(l),t.value=o();break;case"H":s=$v(l),s===!1?t.value=o():e.onUpdateValue(s);break;case"S":case"L":case"V":s=kv(l),s===!1?t.value=o():e.onUpdateValue(s);break;case"A":s=zv(l),s===!1?t.value=o():e.onUpdateValue(s);break;case"R":case"G":case"B":s=Sv(l),s===!1?t.value=o():e.onUpdateValue(s);break}}return{mergedTheme:n,inputValue:t,handleInputChange:a,handleInputUpdateValue:i}},render(){const{mergedTheme:e}=this;return r.h(Fn,{size:"small",placeholder:this.label,theme:e.peers.Input,themeOverrides:e.peerOverrides.Input,builtinThemeOverrides:Pv,value:this.inputValue,onUpdateValue:this.handleInputUpdateValue,onChange:this.handleInputChange,style:this.label==="A"?"flex-grow: 1.25;":""})}}),Rv=r.defineComponent({name:"ColorInput",props:{clsPrefix:{type:String,required:!0},mode:{type:String,required:!0},modes:{type:Array,required:!0},showAlpha:{type:Boolean,required:!0},value:{type:String,default:null},valueArr:{type:Array,default:null},onUpdateValue:{type:Function,required:!0},onUpdateMode:{type:Function,required:!0}},setup(e){return{handleUnitUpdateValue(t,n){const{showAlpha:o}=e;if(e.mode==="hex"){e.onUpdateValue((o?Lt:jn)(n));return}let i;switch(e.valueArr===null?i=[0,0,0,0]:i=Array.from(e.valueArr),e.mode){case"hsv":i[t]=n,e.onUpdateValue((o?on:mo)(i));break;case"rgb":i[t]=n,e.onUpdateValue((o?wt:go)(i));break;case"hsl":i[t]=n,e.onUpdateValue((o?Vt:vo)(i));break}}}},render(){const{clsPrefix:e,modes:t}=this;return r.h("div",{class:`${e}-color-picker-input`},r.h("div",{class:`${e}-color-picker-input__mode`,onClick:this.onUpdateMode,style:{cursor:t.length===1?"":"pointer"}},this.mode.toUpperCase()+(this.showAlpha?"A":"")),r.h(ov,null,{default:()=>{const{mode:n,valueArr:o,showAlpha:i}=this;if(n==="hex"){let a=null;try{a=o===null?null:(i?Lt:jn)(o)}catch{}return r.h(ys,{label:"HEX",showAlpha:i,value:a,onUpdateValue:l=>{this.handleUnitUpdateValue(0,l)}})}return(n+(i?"a":"")).split("").map((a,l)=>r.h(ys,{label:a.toUpperCase(),value:o===null?null:o[l],onUpdateValue:s=>{this.handleUnitUpdateValue(l,s)}}))}}))}}),_v=r.defineComponent({name:"ColorPickerTrigger",props:{clsPrefix:{type:String,required:!0},value:{type:String,default:null},hsla:{type:Array,default:null},disabled:Boolean,onClick:Function},setup(e){const{colorPickerSlots:t,renderLabelRef:n}=r.inject(Si,null);return()=>{const{hsla:o,value:i,clsPrefix:a,onClick:l,disabled:s}=e,d=t.label||n.value;return r.h("div",{class:[`${a}-color-picker-trigger`,s&&`${a}-color-picker-trigger--disabled`],onClick:s?void 0:l},r.h("div",{class:`${a}-color-picker-trigger__fill`},r.h("div",{class:`${a}-color-picker-checkboard`}),r.h("div",{style:{position:"absolute",left:0,right:0,top:0,bottom:0,backgroundColor:o?Vt(o):""}}),i&&o?r.h("div",{class:`${a}-color-picker-trigger__value`,style:{color:o[2]>50||o[3]<.5?"black":"white"}},d?d(i):i):null))}}});function Ev(e,t){if(t==="hsv"){const[n,o,i,a]=rn(e);return wt([...Ft(n,o,i),a])}return e}function Bv(e){const t=document.createElement("canvas").getContext("2d");return t?(t.fillStyle=e,t.fillStyle):"#000000"}const Mv=r.defineComponent({name:"ColorPickerSwatches",props:{clsPrefix:{type:String,required:!0},mode:{type:String,required:!0},swatches:{type:Array,required:!0},onUpdateColor:{type:Function,required:!0}},setup(e){const t=r.computed(()=>e.swatches.map(a=>{const l=sr(a);return{value:a,mode:l,legalValue:Ev(a,l)}}));function n(a){const{mode:l}=e;let{value:s,mode:d}=a;return d||(d="hex",/^[a-zA-Z]+$/.test(s)?s=Bv(s):(Un("color-picker",`color ${s} in swatches is invalid.`),s="#000000")),d===l?s:xs(s,l,d)}function o(a){e.onUpdateColor(n(a))}function i(a,l){a.key==="Enter"&&o(l)}return{parsedSwatchesRef:t,handleSwatchSelect:o,handleSwatchKeyDown:i}},render(){const{clsPrefix:e}=this;return r.h("div",{class:`${e}-color-picker-swatches`},this.parsedSwatchesRef.map(t=>r.h("div",{class:`${e}-color-picker-swatch`,tabindex:0,onClick:()=>{this.handleSwatchSelect(t)},onKeydown:n=>{this.handleSwatchKeyDown(n,t)}},r.h("div",{class:`${e}-color-picker-swatch__fill`,style:{background:t.legalValue}}))))}}),Iv=r.defineComponent({name:"ColorPreview",props:{clsPrefix:{type:String,required:!0},mode:{type:String,required:!0},color:{type:String,default:null,validator:e=>{const t=sr(e);return!!(!e||t&&t!=="hsv")}},onUpdateColor:{type:Function,required:!0}},setup(e){function t(n){var o;const i=n.target.value;(o=e.onUpdateColor)===null||o===void 0||o.call(e,xs(i.toUpperCase(),e.mode,"hex")),n.stopPropagation()}return{handleChange:t}},render(){const{clsPrefix:e}=this;return r.h("div",{class:`${e}-color-picker-preview__preview`},r.h("span",{class:`${e}-color-picker-preview__fill`,style:{background:this.color||"#000000"}}),r.h("input",{class:`${e}-color-picker-preview__input`,type:"color",value:this.color,onChange:this.handleChange}))}}),Ov=V([y("color-picker",`
|
|
1161
1161
|
display: inline-block;
|
|
1162
1162
|
box-sizing: border-box;
|
|
1163
1163
|
height: var(--n-height);
|
|
@@ -1176,7 +1176,7 @@ ${t}
|
|
|
1176
1176
|
background-color .3s var(--n-bezier);
|
|
1177
1177
|
border-radius: var(--n-border-radius);
|
|
1178
1178
|
box-shadow: var(--n-box-shadow);
|
|
1179
|
-
`,[
|
|
1179
|
+
`,[lr(),y("input",`
|
|
1180
1180
|
text-align: center;
|
|
1181
1181
|
`)]),y("color-picker-checkboard",`
|
|
1182
1182
|
background: white;
|
|
@@ -1185,7 +1185,7 @@ ${t}
|
|
|
1185
1185
|
right: 0;
|
|
1186
1186
|
top: 0;
|
|
1187
1187
|
bottom: 0;
|
|
1188
|
-
`,[
|
|
1188
|
+
`,[V("&::after",`
|
|
1189
1189
|
background-image: linear-gradient(45deg, #DDD 25%, #0000 25%), linear-gradient(-45deg, #DDD 25%, #0000 25%), linear-gradient(45deg, #0000 75%, #DDD 75%), linear-gradient(-45deg, #0000 75%, #DDD 75%);
|
|
1190
1190
|
background-size: 12px 12px;
|
|
1191
1191
|
background-position: 0 0, 0 6px, 6px -6px, -6px 0px;
|
|
@@ -1200,13 +1200,13 @@ ${t}
|
|
|
1200
1200
|
margin-bottom: 8px;
|
|
1201
1201
|
position: relative;
|
|
1202
1202
|
box-sizing: border-box;
|
|
1203
|
-
`,[
|
|
1203
|
+
`,[R("image",`
|
|
1204
1204
|
position: absolute;
|
|
1205
1205
|
left: 0;
|
|
1206
1206
|
right: 0;
|
|
1207
1207
|
top: 0;
|
|
1208
1208
|
bottom: 0;
|
|
1209
|
-
`),
|
|
1209
|
+
`),V("&::after",`
|
|
1210
1210
|
content: "";
|
|
1211
1211
|
position: absolute;
|
|
1212
1212
|
border-radius: inherit;
|
|
@@ -1222,7 +1222,7 @@ ${t}
|
|
|
1222
1222
|
position: absolute;
|
|
1223
1223
|
background-color: white;
|
|
1224
1224
|
overflow: hidden;
|
|
1225
|
-
`,[
|
|
1225
|
+
`,[R("fill",`
|
|
1226
1226
|
box-sizing: border-box;
|
|
1227
1227
|
border: 2px solid white;
|
|
1228
1228
|
`)]),y("color-picker-pallete",`
|
|
@@ -1230,7 +1230,7 @@ ${t}
|
|
|
1230
1230
|
position: relative;
|
|
1231
1231
|
margin-bottom: 8px;
|
|
1232
1232
|
cursor: crosshair;
|
|
1233
|
-
`,[
|
|
1233
|
+
`,[R("layer",`
|
|
1234
1234
|
position: absolute;
|
|
1235
1235
|
left: 0;
|
|
1236
1236
|
right: 0;
|
|
@@ -1240,9 +1240,9 @@ ${t}
|
|
|
1240
1240
|
box-shadow: inset 0 0 2px 0 rgba(0, 0, 0, .24);
|
|
1241
1241
|
`)])]),y("color-picker-preview",`
|
|
1242
1242
|
display: flex;
|
|
1243
|
-
`,[
|
|
1243
|
+
`,[R("sliders",`
|
|
1244
1244
|
flex: 1 0 auto;
|
|
1245
|
-
`),
|
|
1245
|
+
`),R("preview",`
|
|
1246
1246
|
position: relative;
|
|
1247
1247
|
height: 30px;
|
|
1248
1248
|
width: 30px;
|
|
@@ -1250,11 +1250,11 @@ ${t}
|
|
|
1250
1250
|
border-radius: 50%;
|
|
1251
1251
|
box-shadow: rgba(0, 0, 0, .15) 0px 0px 0px 1px inset;
|
|
1252
1252
|
overflow: hidden;
|
|
1253
|
-
`),
|
|
1253
|
+
`),R("fill",`
|
|
1254
1254
|
display: block;
|
|
1255
1255
|
width: 30px;
|
|
1256
1256
|
height: 30px;
|
|
1257
|
-
`),
|
|
1257
|
+
`),R("input",`
|
|
1258
1258
|
position: absolute;
|
|
1259
1259
|
top: 0;
|
|
1260
1260
|
left: 0;
|
|
@@ -1268,7 +1268,7 @@ ${t}
|
|
|
1268
1268
|
`,[y("input",`
|
|
1269
1269
|
flex-grow: 1;
|
|
1270
1270
|
flex-basis: 0;
|
|
1271
|
-
`),
|
|
1271
|
+
`),R("mode",`
|
|
1272
1272
|
width: 72px;
|
|
1273
1273
|
text-align: center;
|
|
1274
1274
|
`)]),y("color-picker-control",`
|
|
@@ -1286,10 +1286,10 @@ ${t}
|
|
|
1286
1286
|
border-radius: var(--n-border-radius);
|
|
1287
1287
|
transition: border-color .3s var(--n-bezier);
|
|
1288
1288
|
cursor: pointer;
|
|
1289
|
-
`,[
|
|
1289
|
+
`,[R("value",`
|
|
1290
1290
|
white-space: nowrap;
|
|
1291
1291
|
position: relative;
|
|
1292
|
-
`),
|
|
1292
|
+
`),R("fill",`
|
|
1293
1293
|
border-radius: var(--n-border-radius);
|
|
1294
1294
|
position: absolute;
|
|
1295
1295
|
display: flex;
|
|
@@ -1301,7 +1301,7 @@ ${t}
|
|
|
1301
1301
|
bottom: 4px;
|
|
1302
1302
|
`),W("disabled","cursor: not-allowed"),y("color-picker-checkboard",`
|
|
1303
1303
|
border-radius: var(--n-border-radius);
|
|
1304
|
-
`,[
|
|
1304
|
+
`,[V("&::after",`
|
|
1305
1305
|
--n-block-size: calc((var(--n-height) - 8px) / 3);
|
|
1306
1306
|
background-size: calc(var(--n-block-size) * 2) calc(var(--n-block-size) * 2);
|
|
1307
1307
|
background-position: 0 0, 0 var(--n-block-size), var(--n-block-size) calc(-1 * var(--n-block-size)), calc(-1 * var(--n-block-size)) 0px;
|
|
@@ -1319,16 +1319,16 @@ ${t}
|
|
|
1319
1319
|
background-size: 8px 8px;
|
|
1320
1320
|
background-position: 0px 0, 0px 4px, 4px -4px, -4px 0px;
|
|
1321
1321
|
background-repeat: repeat;
|
|
1322
|
-
`,[
|
|
1322
|
+
`,[R("fill",`
|
|
1323
1323
|
position: relative;
|
|
1324
1324
|
width: 100%;
|
|
1325
1325
|
height: 100%;
|
|
1326
1326
|
border-radius: 3px;
|
|
1327
1327
|
box-shadow: rgba(0, 0, 0, .15) 0px 0px 0px 1px inset;
|
|
1328
1328
|
cursor: pointer;
|
|
1329
|
-
`),
|
|
1329
|
+
`),V("&:focus",`
|
|
1330
1330
|
outline: none;
|
|
1331
|
-
`,[
|
|
1331
|
+
`,[R("fill",[V("&::after",`
|
|
1332
1332
|
position: absolute;
|
|
1333
1333
|
top: 0;
|
|
1334
1334
|
right: 0;
|
|
@@ -1337,7 +1337,7 @@ ${t}
|
|
|
1337
1337
|
background: inherit;
|
|
1338
1338
|
filter: blur(2px);
|
|
1339
1339
|
content: "";
|
|
1340
|
-
`)])])])])]),
|
|
1340
|
+
`)])])])])]),Av=Object.assign(Object.assign({},Ce.props),{value:String,show:{type:Boolean,default:void 0},defaultShow:Boolean,defaultValue:String,modes:{type:Array,default:()=>["rgb","hex","hsl"]},placement:{type:String,default:"bottom-start"},to:ot.propTo,showAlpha:{type:Boolean,default:!0},showPreview:Boolean,swatches:Array,disabled:{type:Boolean,default:void 0},actions:{type:Array,default:null},internalActions:Array,size:String,renderLabel:Function,onComplete:Function,onConfirm:Function,onClear:Function,"onUpdate:show":[Function,Array],onUpdateShow:[Function,Array],"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array]}),Fv=r.defineComponent({name:"ColorPicker",props:Av,setup(e,{slots:t}){const n=r.ref(null);let o=null;const i=dn(e),{mergedSizeRef:a,mergedDisabledRef:l}=i,{localeRef:s}=ar("global"),{mergedClsPrefixRef:d,namespaceRef:c,inlineThemeDisabled:f}=Je(e),u=Ce("ColorPicker","-color-picker",Ov,uv,e,d);r.provide(Si,{themeRef:u,renderLabelRef:r.toRef(e,"renderLabel"),colorPickerSlots:t});const b=r.ref(e.defaultShow),m=St(r.toRef(e,"show"),b);function h(O){const{onUpdateShow:ne,"onUpdate:show":E}=e;ne&&he(ne,O),E&&he(E,O),b.value=O}const{defaultValue:x}=e,w=r.ref(x===void 0?fv(e.modes,e.showAlpha):x),g=St(r.toRef(e,"value"),w),P=r.ref([g.value]),L=r.ref(0),$=r.computed(()=>sr(g.value)),{modes:k}=e,M=r.ref(sr(g.value)||k[0]||"rgb");function p(){const{modes:O}=e,{value:ne}=M,E=O.findIndex(A=>A===ne);~E?M.value=O[(E+1)%O.length]:M.value="rgb"}let S,B,F,I,D,j,Q,N;const Z=r.computed(()=>{const{value:O}=g;if(!O)return null;switch($.value){case"hsv":return rn(O);case"hsl":return[S,B,F,N]=kn(O),[...Gi(S,B,F),N];case"rgb":case"hex":return[D,j,Q,N]=Ze(O),[...ao(D,j,Q),N]}}),q=r.computed(()=>{const{value:O}=g;if(!O)return null;switch($.value){case"rgb":case"hex":return Ze(O);case"hsv":return[S,B,I,N]=rn(O),[...Ft(S,B,I),N];case"hsl":return[S,B,F,N]=kn(O),[...so(S,B,F),N]}}),Y=r.computed(()=>{const{value:O}=g;if(!O)return null;switch($.value){case"hsl":return kn(O);case"hsv":return[S,B,I,N]=rn(O),[...mr(S,B,I),N];case"rgb":case"hex":return[D,j,Q,N]=Ze(O),[...lo(D,j,Q),N]}}),de=r.computed(()=>{switch(M.value){case"rgb":case"hex":return q.value;case"hsv":return Z.value;case"hsl":return Y.value}}),ie=r.ref(0),ce=r.ref(1),U=r.ref([0,0]);function te(O,ne){const{value:E}=Z,A=ie.value,K=E?E[3]:1;U.value=[O,ne];const{showAlpha:T}=e;switch(M.value){case"hsv":oe((T?on:mo)([A,O,ne,K]),"cursor");break;case"hsl":oe((T?Vt:vo)([...mr(A,O,ne),K]),"cursor");break;case"rgb":oe((T?wt:go)([...Ft(A,O,ne),K]),"cursor");break;case"hex":oe((T?Lt:jn)([...Ft(A,O,ne),K]),"cursor");break}}function ve(O){ie.value=O;const{value:ne}=Z;if(!ne)return;const[,E,A,K]=ne,{showAlpha:T}=e;switch(M.value){case"hsv":oe((T?on:mo)([O,E,A,K]),"cursor");break;case"rgb":oe((T?wt:go)([...Ft(O,E,A),K]),"cursor");break;case"hex":oe((T?Lt:jn)([...Ft(O,E,A),K]),"cursor");break;case"hsl":oe((T?Vt:vo)([...mr(O,E,A),K]),"cursor");break}}function ye(O){switch(M.value){case"hsv":[S,B,I]=Z.value,oe(on([S,B,I,O]),"cursor");break;case"rgb":[D,j,Q]=q.value,oe(wt([D,j,Q,O]),"cursor");break;case"hex":[D,j,Q]=q.value,oe(Lt([D,j,Q,O]),"cursor");break;case"hsl":[S,B,F]=Y.value,oe(Vt([S,B,F,O]),"cursor");break}ce.value=O}function oe(O,ne){ne==="cursor"?o=O:o=null;const{nTriggerFormChange:E,nTriggerFormInput:A}=i,{onUpdateValue:K,"onUpdate:value":T}=e;K&&he(K,O),T&&he(T,O),E(),A(),w.value=O}function Se(O){oe(O,"input"),r.nextTick(we)}function we(O=!0){const{value:ne}=g;if(ne){const{nTriggerFormChange:E,nTriggerFormInput:A}=i,{onComplete:K}=e;K&&K(ne);const{value:T}=P,{value:C}=L;O&&(T.splice(C+1,T.length,ne),L.value=C+1),E(),A()}}function le(){const{value:O}=L;O-1<0||(oe(P.value[O-1],"input"),we(!1),L.value=O-1)}function Me(){const{value:O}=L;O<0||O+1>=P.value.length||(oe(P.value[O+1],"input"),we(!1),L.value=O+1)}function Re(){oe(null,"input");const{onClear:O}=e;O&&O(),h(!1)}function He(){const{value:O}=g,{onConfirm:ne}=e;ne&&ne(O),h(!1)}const Ie=r.computed(()=>L.value>=1),De=r.computed(()=>{const{value:O}=P;return O.length>1&&L.value<O.length-1});r.watch(m,O=>{O||(P.value=[g.value],L.value=0)}),r.watchEffect(()=>{if(!(o&&o===g.value)){const{value:O}=Z;O&&(ie.value=O[0],ce.value=O[3],U.value=[O[1],O[2]])}o=null});const Ue=r.computed(()=>{const{value:O}=a,{common:{cubicBezierEaseInOut:ne},self:{textColor:E,color:A,panelFontSize:K,boxShadow:T,border:C,borderRadius:_,dividerColor:re,[ee("height",O)]:xe,[ee("fontSize",O)]:Te}}=u.value;return{"--n-bezier":ne,"--n-text-color":E,"--n-color":A,"--n-panel-font-size":K,"--n-font-size":Te,"--n-box-shadow":T,"--n-border":C,"--n-border-radius":_,"--n-height":xe,"--n-divider-color":re}}),ke=f?tt("color-picker",r.computed(()=>a.value[0]),Ue,e):void 0;function X(){var O;const{value:ne}=q,{value:E}=ie,{internalActions:A,modes:K,actions:T}=e,{value:C}=u,{value:_}=d;return r.h("div",{class:[`${_}-color-picker-panel`,ke==null?void 0:ke.themeClass.value],onDragstart:re=>{re.preventDefault()},style:f?void 0:Ue.value},r.h("div",{class:`${_}-color-picker-control`},r.h(Cv,{clsPrefix:_,rgba:ne,displayedHue:E,displayedSv:U.value,onUpdateSV:te,onComplete:we}),r.h("div",{class:`${_}-color-picker-preview`},r.h("div",{class:`${_}-color-picker-preview__sliders`},r.h(xv,{clsPrefix:_,hue:E,onUpdateHue:ve,onComplete:we}),e.showAlpha?r.h(wv,{clsPrefix:_,rgba:ne,alpha:ce.value,onUpdateAlpha:ye,onComplete:we}):null),e.showPreview?r.h(Iv,{clsPrefix:_,mode:M.value,color:q.value&&jn(q.value),onUpdateColor:re=>{oe(re,"input")}}):null),r.h(Rv,{clsPrefix:_,showAlpha:e.showAlpha,mode:M.value,modes:K,onUpdateMode:p,value:g.value,valueArr:de.value,onUpdateValue:Se}),((O=e.swatches)===null||O===void 0?void 0:O.length)&&r.h(Mv,{clsPrefix:_,mode:M.value,swatches:e.swatches,onUpdateColor:re=>{oe(re,"input")}})),T!=null&&T.length?r.h("div",{class:`${_}-color-picker-action`},T.includes("confirm")&&r.h(Pt,{size:"small",onClick:He,theme:C.peers.Button,themeOverrides:C.peerOverrides.Button},{default:()=>s.value.confirm}),T.includes("clear")&&r.h(Pt,{size:"small",onClick:Re,disabled:!g.value,theme:C.peers.Button,themeOverrides:C.peerOverrides.Button},{default:()=>s.value.clear})):null,t.action?r.h("div",{class:`${_}-color-picker-action`},{default:t.action}):A?r.h("div",{class:`${_}-color-picker-action`},A.includes("undo")&&r.h(Pt,{size:"small",onClick:le,disabled:!Ie.value,theme:C.peers.Button,themeOverrides:C.peerOverrides.Button},{default:()=>s.value.undo}),A.includes("redo")&&r.h(Pt,{size:"small",onClick:Me,disabled:!De.value,theme:C.peers.Button,themeOverrides:C.peerOverrides.Button},{default:()=>s.value.redo})):null)}return{mergedClsPrefix:d,namespace:c,selfRef:n,hsla:Y,rgba:q,mergedShow:m,mergedDisabled:l,isMounted:Rn(),adjustedTo:ot(e),mergedValue:g,handleTriggerClick(){h(!0)},handleClickOutside(O){var ne;!((ne=n.value)===null||ne===void 0)&&ne.contains($n(O))||h(!1)},renderPanel:X,cssVars:f?void 0:Ue,themeClass:ke==null?void 0:ke.themeClass,onRender:ke==null?void 0:ke.onRender}},render(){const{$slots:e,mergedClsPrefix:t,onRender:n}=this;return n==null||n(),r.h("div",{class:[this.themeClass,`${t}-color-picker`],ref:"selfRef",style:this.cssVars},r.h(Pr,null,{default:()=>[r.h(Rr,null,{default:()=>r.h(_v,{clsPrefix:t,value:this.mergedValue,hsla:this.hsla,disabled:this.mergedDisabled,onClick:this.handleTriggerClick},{label:e.label})}),r.h(Br,{placement:this.placement,show:this.mergedShow,containerClass:this.namespace,teleportDisabled:this.adjustedTo===ot.tdkey,to:this.adjustedTo},{default:()=>r.h(r.Transition,{name:"fade-in-scale-up-transition",appear:this.isMounted},{default:()=>this.mergedShow?r.withDirectives(this.renderPanel(),[[Xn,this.handleClickOutside,void 0,{capture:!0}]]):null})})]}))}});function Dv(e){const{boxShadow2:t}=e;return{menuBoxShadow:t}}const Vv={name:"Select",common:et,peers:{InternalSelection:hs,InternalSelectMenu:os},self:Dv},Lv=V([y("select",`
|
|
1341
1341
|
z-index: auto;
|
|
1342
1342
|
outline: none;
|
|
1343
1343
|
width: 100%;
|
|
@@ -1345,7 +1345,7 @@ ${t}
|
|
|
1345
1345
|
`),y("select-menu",`
|
|
1346
1346
|
margin: 4px 0;
|
|
1347
1347
|
box-shadow: var(--n-menu-box-shadow);
|
|
1348
|
-
`,[so({originalTransition:"background-color .3s var(--n-bezier), box-shadow .3s var(--n-bezier)"})])]),Nv=Object.assign(Object.assign({},ye.props),{to:rt.propTo,bordered:{type:Boolean,default:void 0},clearable:Boolean,clearFilterAfterSelect:{type:Boolean,default:!0},options:{type:Array,default:()=>[]},defaultValue:{type:[String,Number,Array],default:null},keyboard:{type:Boolean,default:!0},value:[String,Number,Array],placeholder:String,menuProps:Object,multiple:Boolean,size:String,filterable:Boolean,disabled:{type:Boolean,default:void 0},remote:Boolean,loading:Boolean,filter:Function,placement:{type:String,default:"bottom-start"},widthMode:{type:String,default:"trigger"},tag:Boolean,onCreate:Function,fallbackOption:{type:[Function,Boolean],default:void 0},show:{type:Boolean,default:void 0},showArrow:{type:Boolean,default:!0},maxTagCount:[Number,String],ellipsisTagPopoverProps:Object,consistentMenuWidth:{type:Boolean,default:!0},virtualScroll:{type:Boolean,default:!0},labelField:{type:String,default:"label"},valueField:{type:String,default:"value"},childrenField:{type:String,default:"children"},renderLabel:Function,renderOption:Function,renderTag:Function,"onUpdate:value":[Function,Array],inputProps:Object,nodeProps:Function,ignoreComposition:{type:Boolean,default:!0},showOnFocus:Boolean,onUpdateValue:[Function,Array],onBlur:[Function,Array],onClear:[Function,Array],onFocus:[Function,Array],onScroll:[Function,Array],onSearch:[Function,Array],onUpdateShow:[Function,Array],"onUpdate:show":[Function,Array],displayDirective:{type:String,default:"show"},resetMenuOnOptionsChange:{type:Boolean,default:!0},status:String,showCheckmark:{type:Boolean,default:!0},onChange:[Function,Array],items:Array}),rr=o.defineComponent({name:"Select",props:Nv,setup(e){process.env.NODE_ENV!=="production"&&o.watchEffect(()=>{e.items!==void 0&&tt("select","`items` is deprecated, please use `options` instead."),e.onChange!==void 0&&tt("select","`on-change` is deprecated, please use `on-update:value` instead.")});const{mergedClsPrefixRef:t,mergedBorderedRef:n,namespaceRef:r,inlineThemeDisabled:i}=Ke(e),a=ye("Select","-select",Lv,Hv,e,t),l=o.ref(e.defaultValue),s=o.toRef(e,"value"),d=vt(s,l),c=o.ref(!1),f=o.ref(""),u=To(e,["items","options"]),p=o.ref([]),m=o.ref([]),h=o.computed(()=>m.value.concat(p.value).concat(u.value)),v=o.computed(()=>{const{filter:x}=e;if(x)return x;const{labelField:L,valueField:J}=e;return(ae,se)=>{if(!se)return!1;const fe=se[L];if(typeof fe=="string")return xi(ae,fe);const he=se[J];return typeof he=="string"?xi(ae,he):typeof he=="number"?xi(ae,String(he)):!1}}),w=o.computed(()=>{if(e.remote)return u.value;{const{value:x}=h,{value:L}=f;return!L.length||!e.filterable?x:Km(x,v.value,L,e.childrenField)}}),g=o.computed(()=>{const{valueField:x,childrenField:L}=e,J=Gm(x,L);return Xg(w.value,J)}),P=o.computed(()=>qm(h.value,e.valueField,e.childrenField)),H=o.ref(!1),$=vt(o.toRef(e,"show"),H),k=o.ref(null),M=o.ref(null),b=o.ref(null),{localeRef:S}=lo("Select"),E=o.computed(()=>{var x;return(x=e.placeholder)!==null&&x!==void 0?x:S.value.placeholder}),D=[],O=o.ref(new Map),V=o.computed(()=>{const{fallbackOption:x}=e;if(x===void 0){const{labelField:L,valueField:J}=e;return ae=>({[L]:String(ae),[J]:ae})}return x===!1?!1:L=>Object.assign(x(L),{value:L})});function j(x){const L=e.remote,{value:J}=O,{value:ae}=P,{value:se}=V,fe=[];return x.forEach(he=>{if(ae.has(he))fe.push(ae.get(he));else if(L&&J.has(he))fe.push(J.get(he));else if(se){const ge=se(he);ge&&fe.push(ge)}}),fe}const Q=o.computed(()=>{if(e.multiple){const{value:x}=d;return Array.isArray(x)?j(x):[]}return null}),N=o.computed(()=>{const{value:x}=d;return!e.multiple&&!Array.isArray(x)?x===null?null:j([x])[0]||null:null}),Z=cn(e),{mergedSizeRef:X,mergedDisabledRef:Y,mergedStatusRef:de}=Z;function ie(x,L){const{onChange:J,"onUpdate:value":ae,onUpdateValue:se}=e,{nTriggerFormChange:fe,nTriggerFormInput:he}=Z;J&&ce(J,x,L),se&&ce(se,x,L),ae&&ce(ae,x,L),l.value=x,fe(),he()}function ue(x){const{onBlur:L}=e,{nTriggerFormBlur:J}=Z;L&&ce(L,x),J()}function U(){const{onClear:x}=e;x&&ce(x)}function te(x){const{onFocus:L,showOnFocus:J}=e,{nTriggerFormFocus:ae}=Z;L&&ce(L,x),ae(),J&&Ce()}function ve(x){const{onSearch:L}=e;L&&ce(L,x)}function we(x){const{onScroll:L}=e;L&&ce(L,x)}function re(){var x;const{remote:L,multiple:J}=e;if(L){const{value:ae}=O;if(J){const{valueField:se}=e;(x=Q.value)===null||x===void 0||x.forEach(fe=>{ae.set(fe[se],fe)})}else{const se=N.value;se&&ae.set(se[e.valueField],se)}}}function Se(x){const{onUpdateShow:L,"onUpdate:show":J}=e;L&&ce(L,x),J&&ce(J,x),H.value=x}function Ce(){Y.value||(Se(!0),H.value=!0,e.filterable&&_e())}function le(){Se(!1)}function Me(){f.value="",m.value=D}const Re=o.ref(!1);function Le(){e.filterable&&(Re.value=!0)}function Ie(){e.filterable&&(Re.value=!1,$.value||Me())}function De(){Y.value||($.value?e.filterable?_e():le():Ce())}function Ue(x){var L,J;!((J=(L=b.value)===null||L===void 0?void 0:L.selfRef)===null||J===void 0)&&J.contains(x.relatedTarget)||(c.value=!1,ue(x),le())}function ke(x){te(x),c.value=!0}function q(){c.value=!0}function A(x){var L;!((L=k.value)===null||L===void 0)&&L.$el.contains(x.relatedTarget)||(c.value=!1,ue(x),le())}function ne(){var x;(x=k.value)===null||x===void 0||x.focus(),le()}function _(x){var L;$.value&&(!((L=k.value)===null||L===void 0)&&L.$el.contains(kn(x))||le())}function F(x){if(!Array.isArray(x))return[];if(V.value)return Array.from(x);{const{remote:L}=e,{value:J}=P;if(L){const{value:ae}=O;return x.filter(se=>J.has(se)||ae.has(se))}else return x.filter(ae=>J.has(ae))}}function K(x){z(x.rawNode)}function z(x){if(Y.value)return;const{tag:L,remote:J,clearFilterAfterSelect:ae,valueField:se}=e;if(L&&!J){const{value:fe}=m,he=fe[0]||null;if(he){const ge=p.value;ge.length?ge.push(he):p.value=[he],m.value=D}}if(J&&O.value.set(x[se],x),e.multiple){const fe=F(d.value),he=fe.findIndex(ge=>ge===x[se]);if(~he){if(fe.splice(he,1),L&&!J){const ge=C(x[se]);~ge&&(p.value.splice(ge,1),ae&&(f.value=""))}}else fe.push(x[se]),ae&&(f.value="");ie(fe,j(fe))}else{if(L&&!J){const fe=C(x[se]);~fe?p.value=[p.value[fe]]:p.value=D}Ae(),le(),ie(x[se],x)}}function C(x){return p.value.findIndex(J=>J[e.valueField]===x)}function B(x){$.value||Ce();const{value:L}=x.target;f.value=L;const{tag:J,remote:ae}=e;if(ve(L),J&&!ae){if(!L){m.value=D;return}const{onCreate:se}=e,fe=se?se(L):{[e.labelField]:L,[e.valueField]:L},{valueField:he,labelField:ge}=e;u.value.some(Te=>Te[he]===fe[he]||Te[ge]===fe[ge])||p.value.some(Te=>Te[he]===fe[he]||Te[ge]===fe[ge])?m.value=D:m.value=[fe]}}function oe(x){x.stopPropagation();const{multiple:L}=e;!L&&e.filterable&&le(),U(),L?ie([],[]):ie(null,null)}function xe(x){!jn(x,"action")&&!jn(x,"empty")&&!jn(x,"header")&&x.preventDefault()}function ze(x){we(x)}function Ne(x){var L,J,ae,se,fe;if(!e.keyboard){x.preventDefault();return}switch(x.key){case" ":if(e.filterable)break;x.preventDefault();case"Enter":if(!(!((L=k.value)===null||L===void 0)&&L.isComposing)){if($.value){const he=(J=b.value)===null||J===void 0?void 0:J.getPendingTmNode();he?K(he):e.filterable||(le(),Ae())}else if(Ce(),e.tag&&Re.value){const he=m.value[0];if(he){const ge=he[e.valueField],{value:Te}=d;e.multiple&&Array.isArray(Te)&&Te.includes(ge)||z(he)}}}x.preventDefault();break;case"ArrowUp":if(x.preventDefault(),e.loading)return;$.value&&((ae=b.value)===null||ae===void 0||ae.prev());break;case"ArrowDown":if(x.preventDefault(),e.loading)return;$.value?(se=b.value)===null||se===void 0||se.next():Ce();break;case"Escape":$.value&&(Ad(x),le()),(fe=k.value)===null||fe===void 0||fe.focus();break}}function Ae(){var x;(x=k.value)===null||x===void 0||x.focus()}function _e(){var x;(x=k.value)===null||x===void 0||x.focusInput()}function qe(){var x;$.value&&((x=M.value)===null||x===void 0||x.syncPosition())}re(),o.watch(o.toRef(e,"options"),re);const st={focus:()=>{var x;(x=k.value)===null||x===void 0||x.focus()},focusInput:()=>{var x;(x=k.value)===null||x===void 0||x.focusInput()},blur:()=>{var x;(x=k.value)===null||x===void 0||x.blur()},blurInput:()=>{var x;(x=k.value)===null||x===void 0||x.blurInput()}},Je=o.computed(()=>{const{self:{menuBoxShadow:x}}=a.value;return{"--n-menu-box-shadow":x}}),it=i?et("select",void 0,Je,e):void 0;return Object.assign(Object.assign({},st),{mergedStatus:de,mergedClsPrefix:t,mergedBordered:n,namespace:r,treeMate:g,isMounted:Bn(),triggerRef:k,menuRef:b,pattern:f,uncontrolledShow:H,mergedShow:$,adjustedTo:rt(e),uncontrolledValue:l,mergedValue:d,followerRef:M,localizedPlaceholder:E,selectedOption:N,selectedOptions:Q,mergedSize:X,mergedDisabled:Y,focused:c,activeWithoutMenuOpen:Re,inlineThemeDisabled:i,onTriggerInputFocus:Le,onTriggerInputBlur:Ie,handleTriggerOrMenuResize:qe,handleMenuFocus:q,handleMenuBlur:A,handleMenuTabOut:ne,handleTriggerClick:De,handleToggle:K,handleDeleteOption:z,handlePatternInput:B,handleClear:oe,handleTriggerBlur:Ue,handleTriggerFocus:ke,handleKeydown:Ne,handleMenuAfterLeave:Me,handleMenuClickOutside:_,handleMenuScroll:ze,handleMenuKeydown:Ne,handleMenuMousedown:xe,mergedTheme:a,cssVars:i?void 0:Je,themeClass:it==null?void 0:it.themeClass,onRender:it==null?void 0:it.onRender})},render(){return o.h("div",{class:`${this.mergedClsPrefix}-select`},o.h(Po,null,{default:()=>[o.h(Ro,null,{default:()=>o.h(Am,{ref:"triggerRef",inlineThemeDisabled:this.inlineThemeDisabled,status:this.mergedStatus,inputProps:this.inputProps,clsPrefix:this.mergedClsPrefix,showArrow:this.showArrow,maxTagCount:this.maxTagCount,ellipsisTagPopoverProps:this.ellipsisTagPopoverProps,bordered:this.mergedBordered,active:this.activeWithoutMenuOpen||this.mergedShow,pattern:this.pattern,placeholder:this.localizedPlaceholder,selectedOption:this.selectedOption,selectedOptions:this.selectedOptions,multiple:this.multiple,renderTag:this.renderTag,renderLabel:this.renderLabel,filterable:this.filterable,clearable:this.clearable,disabled:this.mergedDisabled,size:this.mergedSize,theme:this.mergedTheme.peers.InternalSelection,labelField:this.labelField,valueField:this.valueField,themeOverrides:this.mergedTheme.peerOverrides.InternalSelection,loading:this.loading,focused:this.focused,onClick:this.handleTriggerClick,onDeleteOption:this.handleDeleteOption,onPatternInput:this.handlePatternInput,onClear:this.handleClear,onBlur:this.handleTriggerBlur,onFocus:this.handleTriggerFocus,onKeydown:this.handleKeydown,onPatternBlur:this.onTriggerInputBlur,onPatternFocus:this.onTriggerInputFocus,onResize:this.handleTriggerOrMenuResize,ignoreComposition:this.ignoreComposition},{arrow:()=>{var e,t;return[(t=(e=this.$slots).arrow)===null||t===void 0?void 0:t.call(e)]}})}),o.h(Eo,{ref:"followerRef",show:this.mergedShow,to:this.adjustedTo,teleportDisabled:this.adjustedTo===rt.tdkey,containerClass:this.namespace,width:this.consistentMenuWidth?"target":void 0,minWidth:"target",placement:this.placement},{default:()=>o.h(o.Transition,{name:"fade-in-scale-up-transition",appear:this.isMounted,onAfterLeave:this.handleMenuAfterLeave},{default:()=>{var e,t,n;return this.mergedShow||this.displayDirective==="show"?((e=this.onRender)===null||e===void 0||e.call(this),o.withDirectives(o.h(hm,Object.assign({},this.menuProps,{ref:"menuRef",onResize:this.handleTriggerOrMenuResize,inlineThemeDisabled:this.inlineThemeDisabled,virtualScroll:this.consistentMenuWidth&&this.virtualScroll,class:[`${this.mergedClsPrefix}-select-menu`,this.themeClass,(t=this.menuProps)===null||t===void 0?void 0:t.class],clsPrefix:this.mergedClsPrefix,focusable:!0,labelField:this.labelField,valueField:this.valueField,autoPending:!0,nodeProps:this.nodeProps,theme:this.mergedTheme.peers.InternalSelectMenu,themeOverrides:this.mergedTheme.peerOverrides.InternalSelectMenu,treeMate:this.treeMate,multiple:this.multiple,size:"medium",renderOption:this.renderOption,renderLabel:this.renderLabel,value:this.mergedValue,style:[(n=this.menuProps)===null||n===void 0?void 0:n.style,this.cssVars],onToggle:this.handleToggle,onScroll:this.handleMenuScroll,onFocus:this.handleMenuFocus,onBlur:this.handleMenuBlur,onKeydown:this.handleMenuKeydown,onTabOut:this.handleMenuTabOut,onMousedown:this.handleMenuMousedown,show:this.mergedShow,showCheckmark:this.showCheckmark,resetMenuOnOptionsChange:this.resetMenuOnOptionsChange}),{empty:()=>{var r,i;return[(i=(r=this.$slots).empty)===null||i===void 0?void 0:i.call(r)]},header:()=>{var r,i;return[(i=(r=this.$slots).header)===null||i===void 0?void 0:i.call(r)]},action:()=>{var r,i;return[(i=(r=this.$slots).action)===null||i===void 0?void 0:i.call(r)]}}),this.displayDirective==="show"?[[o.vShow,this.mergedShow],[Xn,this.handleMenuClickOutside,void 0,{capture:!0}]]:[[Xn,this.handleMenuClickOutside,void 0,{capture:!0}]])):null}})})]}))}}),Wv={padding:"8px 14px"};function jv(e){const{borderRadius:t,boxShadow2:n,baseColor:r}=e;return Object.assign(Object.assign({},Wv),{borderRadius:t,boxShadow:n,color:ft(r,"rgba(0, 0, 0, .85)"),textColor:r})}const Uv={name:"Tooltip",common:Ye,peers:{Popover:pi},self:jv},Gv=Object.assign(Object.assign({},us),ye.props),Cs=o.defineComponent({name:"Tooltip",props:Gv,__popover__:!0,setup(e){const{mergedClsPrefixRef:t}=Ke(e),n=ye("Tooltip","-tooltip",void 0,Uv,e,t),r=o.ref(null);return Object.assign(Object.assign({},{syncPosition(){r.value.syncPosition()},setShow(a){r.value.setShow(a)}}),{popoverRef:r,mergedTheme:n,popoverThemeOverrides:o.computed(()=>n.value.self)})},render(){const{mergedTheme:e,internalExtraClass:t}=this;return o.h(fs,Object.assign(Object.assign({},this.$props),{theme:e.peers.Popover,themeOverrides:e.peerOverrides.Popover,builtinThemeOverrides:this.popoverThemeOverrides,internalExtraClass:t.concat("tooltip"),ref:"popoverRef"}),this.$slots)}});function Kv(e){const{textColorBase:t,opacity1:n,opacity2:r,opacity3:i,opacity4:a,opacity5:l}=e;return{color:t,opacity1Depth:n,opacity2Depth:r,opacity3Depth:i,opacity4Depth:a,opacity5Depth:l}}const qv={name:"Icon",common:Ye,self:Kv},Xv=y("icon",`
|
|
1348
|
+
`,[lr({originalTransition:"background-color .3s var(--n-bezier), box-shadow .3s var(--n-bezier)"})])]),Hv=Object.assign(Object.assign({},Ce.props),{to:ot.propTo,bordered:{type:Boolean,default:void 0},clearable:Boolean,clearFilterAfterSelect:{type:Boolean,default:!0},options:{type:Array,default:()=>[]},defaultValue:{type:[String,Number,Array],default:null},keyboard:{type:Boolean,default:!0},value:[String,Number,Array],placeholder:String,menuProps:Object,multiple:Boolean,size:String,filterable:Boolean,disabled:{type:Boolean,default:void 0},remote:Boolean,loading:Boolean,filter:Function,placement:{type:String,default:"bottom-start"},widthMode:{type:String,default:"trigger"},tag:Boolean,onCreate:Function,fallbackOption:{type:[Function,Boolean],default:void 0},show:{type:Boolean,default:void 0},showArrow:{type:Boolean,default:!0},maxTagCount:[Number,String],ellipsisTagPopoverProps:Object,consistentMenuWidth:{type:Boolean,default:!0},virtualScroll:{type:Boolean,default:!0},labelField:{type:String,default:"label"},valueField:{type:String,default:"value"},childrenField:{type:String,default:"children"},renderLabel:Function,renderOption:Function,renderTag:Function,"onUpdate:value":[Function,Array],inputProps:Object,nodeProps:Function,ignoreComposition:{type:Boolean,default:!0},showOnFocus:Boolean,onUpdateValue:[Function,Array],onBlur:[Function,Array],onClear:[Function,Array],onFocus:[Function,Array],onScroll:[Function,Array],onSearch:[Function,Array],onUpdateShow:[Function,Array],"onUpdate:show":[Function,Array],displayDirective:{type:String,default:"show"},resetMenuOnOptionsChange:{type:Boolean,default:!0},status:String,showCheckmark:{type:Boolean,default:!0},onChange:[Function,Array],items:Array}),oo=r.defineComponent({name:"Select",props:Hv,setup(e){process.env.NODE_ENV!=="production"&&r.watchEffect(()=>{e.items!==void 0&&Qe("select","`items` is deprecated, please use `options` instead."),e.onChange!==void 0&&Qe("select","`on-change` is deprecated, please use `on-update:value` instead.")});const{mergedClsPrefixRef:t,mergedBorderedRef:n,namespaceRef:o,inlineThemeDisabled:i}=Je(e),a=Ce("Select","-select",Lv,Vv,e,t),l=r.ref(e.defaultValue),s=r.toRef(e,"value"),d=St(s,l),c=r.ref(!1),f=r.ref(""),u=zr(e,["items","options"]),b=r.ref([]),m=r.ref([]),h=r.computed(()=>m.value.concat(b.value).concat(u.value)),x=r.computed(()=>{const{filter:v}=e;if(v)return v;const{labelField:H,valueField:J}=e;return(ae,se)=>{if(!se)return!1;const ue=se[H];if(typeof ue=="string")return yi(ae,ue);const fe=se[J];return typeof fe=="string"?yi(ae,fe):typeof fe=="number"?yi(ae,String(fe)):!1}}),w=r.computed(()=>{if(e.remote)return u.value;{const{value:v}=h,{value:H}=f;return!H.length||!e.filterable?v:Gm(v,x.value,H,e.childrenField)}}),g=r.computed(()=>{const{valueField:v,childrenField:H}=e,J=Um(v,H);return Xg(w.value,J)}),P=r.computed(()=>Km(h.value,e.valueField,e.childrenField)),L=r.ref(!1),$=St(r.toRef(e,"show"),L),k=r.ref(null),M=r.ref(null),p=r.ref(null),{localeRef:S}=ar("Select"),B=r.computed(()=>{var v;return(v=e.placeholder)!==null&&v!==void 0?v:S.value.placeholder}),F=[],I=r.ref(new Map),D=r.computed(()=>{const{fallbackOption:v}=e;if(v===void 0){const{labelField:H,valueField:J}=e;return ae=>({[H]:String(ae),[J]:ae})}return v===!1?!1:H=>Object.assign(v(H),{value:H})});function j(v){const H=e.remote,{value:J}=I,{value:ae}=P,{value:se}=D,ue=[];return v.forEach(fe=>{if(ae.has(fe))ue.push(ae.get(fe));else if(H&&J.has(fe))ue.push(J.get(fe));else if(se){const ge=se(fe);ge&&ue.push(ge)}}),ue}const Q=r.computed(()=>{if(e.multiple){const{value:v}=d;return Array.isArray(v)?j(v):[]}return null}),N=r.computed(()=>{const{value:v}=d;return!e.multiple&&!Array.isArray(v)?v===null?null:j([v])[0]||null:null}),Z=dn(e),{mergedSizeRef:q,mergedDisabledRef:Y,mergedStatusRef:de}=Z;function ie(v,H){const{onChange:J,"onUpdate:value":ae,onUpdateValue:se}=e,{nTriggerFormChange:ue,nTriggerFormInput:fe}=Z;J&&he(J,v,H),se&&he(se,v,H),ae&&he(ae,v,H),l.value=v,ue(),fe()}function ce(v){const{onBlur:H}=e,{nTriggerFormBlur:J}=Z;H&&he(H,v),J()}function U(){const{onClear:v}=e;v&&he(v)}function te(v){const{onFocus:H,showOnFocus:J}=e,{nTriggerFormFocus:ae}=Z;H&&he(H,v),ae(),J&&we()}function ve(v){const{onSearch:H}=e;H&&he(H,v)}function ye(v){const{onScroll:H}=e;H&&he(H,v)}function oe(){var v;const{remote:H,multiple:J}=e;if(H){const{value:ae}=I;if(J){const{valueField:se}=e;(v=Q.value)===null||v===void 0||v.forEach(ue=>{ae.set(ue[se],ue)})}else{const se=N.value;se&&ae.set(se[e.valueField],se)}}}function Se(v){const{onUpdateShow:H,"onUpdate:show":J}=e;H&&he(H,v),J&&he(J,v),L.value=v}function we(){Y.value||(Se(!0),L.value=!0,e.filterable&&Ee())}function le(){Se(!1)}function Me(){f.value="",m.value=F}const Re=r.ref(!1);function He(){e.filterable&&(Re.value=!0)}function Ie(){e.filterable&&(Re.value=!1,$.value||Me())}function De(){Y.value||($.value?e.filterable?Ee():le():we())}function Ue(v){var H,J;!((J=(H=p.value)===null||H===void 0?void 0:H.selfRef)===null||J===void 0)&&J.contains(v.relatedTarget)||(c.value=!1,ce(v),le())}function ke(v){te(v),c.value=!0}function X(){c.value=!0}function O(v){var H;!((H=k.value)===null||H===void 0)&&H.$el.contains(v.relatedTarget)||(c.value=!1,ce(v),le())}function ne(){var v;(v=k.value)===null||v===void 0||v.focus(),le()}function E(v){var H;$.value&&(!((H=k.value)===null||H===void 0)&&H.$el.contains($n(v))||le())}function A(v){if(!Array.isArray(v))return[];if(D.value)return Array.from(v);{const{remote:H}=e,{value:J}=P;if(H){const{value:ae}=I;return v.filter(se=>J.has(se)||ae.has(se))}else return v.filter(ae=>J.has(ae))}}function K(v){T(v.rawNode)}function T(v){if(Y.value)return;const{tag:H,remote:J,clearFilterAfterSelect:ae,valueField:se}=e;if(H&&!J){const{value:ue}=m,fe=ue[0]||null;if(fe){const ge=b.value;ge.length?ge.push(fe):b.value=[fe],m.value=F}}if(J&&I.value.set(v[se],v),e.multiple){const ue=A(d.value),fe=ue.findIndex(ge=>ge===v[se]);if(~fe){if(ue.splice(fe,1),H&&!J){const ge=C(v[se]);~ge&&(b.value.splice(ge,1),ae&&(f.value=""))}}else ue.push(v[se]),ae&&(f.value="");ie(ue,j(ue))}else{if(H&&!J){const ue=C(v[se]);~ue?b.value=[b.value[ue]]:b.value=F}Oe(),le(),ie(v[se],v)}}function C(v){return b.value.findIndex(J=>J[e.valueField]===v)}function _(v){$.value||we();const{value:H}=v.target;f.value=H;const{tag:J,remote:ae}=e;if(ve(H),J&&!ae){if(!H){m.value=F;return}const{onCreate:se}=e,ue=se?se(H):{[e.labelField]:H,[e.valueField]:H},{valueField:fe,labelField:ge}=e;u.value.some(ze=>ze[fe]===ue[fe]||ze[ge]===ue[ge])||b.value.some(ze=>ze[fe]===ue[fe]||ze[ge]===ue[ge])?m.value=F:m.value=[ue]}}function re(v){v.stopPropagation();const{multiple:H}=e;!H&&e.filterable&&le(),U(),H?ie([],[]):ie(null,null)}function xe(v){!Wn(v,"action")&&!Wn(v,"empty")&&!Wn(v,"header")&&v.preventDefault()}function Te(v){ye(v)}function Ne(v){var H,J,ae,se,ue;if(!e.keyboard){v.preventDefault();return}switch(v.key){case" ":if(e.filterable)break;v.preventDefault();case"Enter":if(!(!((H=k.value)===null||H===void 0)&&H.isComposing)){if($.value){const fe=(J=p.value)===null||J===void 0?void 0:J.getPendingTmNode();fe?K(fe):e.filterable||(le(),Oe())}else if(we(),e.tag&&Re.value){const fe=m.value[0];if(fe){const ge=fe[e.valueField],{value:ze}=d;e.multiple&&Array.isArray(ze)&&ze.includes(ge)||T(fe)}}}v.preventDefault();break;case"ArrowUp":if(v.preventDefault(),e.loading)return;$.value&&((ae=p.value)===null||ae===void 0||ae.prev());break;case"ArrowDown":if(v.preventDefault(),e.loading)return;$.value?(se=p.value)===null||se===void 0||se.next():we();break;case"Escape":$.value&&(Md(v),le()),(ue=k.value)===null||ue===void 0||ue.focus();break}}function Oe(){var v;(v=k.value)===null||v===void 0||v.focus()}function Ee(){var v;(v=k.value)===null||v===void 0||v.focusInput()}function Ke(){var v;$.value&&((v=M.value)===null||v===void 0||v.syncPosition())}oe(),r.watch(r.toRef(e,"options"),oe);const lt={focus:()=>{var v;(v=k.value)===null||v===void 0||v.focus()},focusInput:()=>{var v;(v=k.value)===null||v===void 0||v.focusInput()},blur:()=>{var v;(v=k.value)===null||v===void 0||v.blur()},blurInput:()=>{var v;(v=k.value)===null||v===void 0||v.blurInput()}},Ye=r.computed(()=>{const{self:{menuBoxShadow:v}}=a.value;return{"--n-menu-box-shadow":v}}),it=i?tt("select",void 0,Ye,e):void 0;return Object.assign(Object.assign({},lt),{mergedStatus:de,mergedClsPrefix:t,mergedBordered:n,namespace:o,treeMate:g,isMounted:Rn(),triggerRef:k,menuRef:p,pattern:f,uncontrolledShow:L,mergedShow:$,adjustedTo:ot(e),uncontrolledValue:l,mergedValue:d,followerRef:M,localizedPlaceholder:B,selectedOption:N,selectedOptions:Q,mergedSize:q,mergedDisabled:Y,focused:c,activeWithoutMenuOpen:Re,inlineThemeDisabled:i,onTriggerInputFocus:He,onTriggerInputBlur:Ie,handleTriggerOrMenuResize:Ke,handleMenuFocus:X,handleMenuBlur:O,handleMenuTabOut:ne,handleTriggerClick:De,handleToggle:K,handleDeleteOption:T,handlePatternInput:_,handleClear:re,handleTriggerBlur:Ue,handleTriggerFocus:ke,handleKeydown:Ne,handleMenuAfterLeave:Me,handleMenuClickOutside:E,handleMenuScroll:Te,handleMenuKeydown:Ne,handleMenuMousedown:xe,mergedTheme:a,cssVars:i?void 0:Ye,themeClass:it==null?void 0:it.themeClass,onRender:it==null?void 0:it.onRender})},render(){return r.h("div",{class:`${this.mergedClsPrefix}-select`},r.h(Pr,null,{default:()=>[r.h(Rr,null,{default:()=>r.h(Om,{ref:"triggerRef",inlineThemeDisabled:this.inlineThemeDisabled,status:this.mergedStatus,inputProps:this.inputProps,clsPrefix:this.mergedClsPrefix,showArrow:this.showArrow,maxTagCount:this.maxTagCount,ellipsisTagPopoverProps:this.ellipsisTagPopoverProps,bordered:this.mergedBordered,active:this.activeWithoutMenuOpen||this.mergedShow,pattern:this.pattern,placeholder:this.localizedPlaceholder,selectedOption:this.selectedOption,selectedOptions:this.selectedOptions,multiple:this.multiple,renderTag:this.renderTag,renderLabel:this.renderLabel,filterable:this.filterable,clearable:this.clearable,disabled:this.mergedDisabled,size:this.mergedSize,theme:this.mergedTheme.peers.InternalSelection,labelField:this.labelField,valueField:this.valueField,themeOverrides:this.mergedTheme.peerOverrides.InternalSelection,loading:this.loading,focused:this.focused,onClick:this.handleTriggerClick,onDeleteOption:this.handleDeleteOption,onPatternInput:this.handlePatternInput,onClear:this.handleClear,onBlur:this.handleTriggerBlur,onFocus:this.handleTriggerFocus,onKeydown:this.handleKeydown,onPatternBlur:this.onTriggerInputBlur,onPatternFocus:this.onTriggerInputFocus,onResize:this.handleTriggerOrMenuResize,ignoreComposition:this.ignoreComposition},{arrow:()=>{var e,t;return[(t=(e=this.$slots).arrow)===null||t===void 0?void 0:t.call(e)]}})}),r.h(Br,{ref:"followerRef",show:this.mergedShow,to:this.adjustedTo,teleportDisabled:this.adjustedTo===ot.tdkey,containerClass:this.namespace,width:this.consistentMenuWidth?"target":void 0,minWidth:"target",placement:this.placement},{default:()=>r.h(r.Transition,{name:"fade-in-scale-up-transition",appear:this.isMounted,onAfterLeave:this.handleMenuAfterLeave},{default:()=>{var e,t,n;return this.mergedShow||this.displayDirective==="show"?((e=this.onRender)===null||e===void 0||e.call(this),r.withDirectives(r.h(fm,Object.assign({},this.menuProps,{ref:"menuRef",onResize:this.handleTriggerOrMenuResize,inlineThemeDisabled:this.inlineThemeDisabled,virtualScroll:this.consistentMenuWidth&&this.virtualScroll,class:[`${this.mergedClsPrefix}-select-menu`,this.themeClass,(t=this.menuProps)===null||t===void 0?void 0:t.class],clsPrefix:this.mergedClsPrefix,focusable:!0,labelField:this.labelField,valueField:this.valueField,autoPending:!0,nodeProps:this.nodeProps,theme:this.mergedTheme.peers.InternalSelectMenu,themeOverrides:this.mergedTheme.peerOverrides.InternalSelectMenu,treeMate:this.treeMate,multiple:this.multiple,size:"medium",renderOption:this.renderOption,renderLabel:this.renderLabel,value:this.mergedValue,style:[(n=this.menuProps)===null||n===void 0?void 0:n.style,this.cssVars],onToggle:this.handleToggle,onScroll:this.handleMenuScroll,onFocus:this.handleMenuFocus,onBlur:this.handleMenuBlur,onKeydown:this.handleMenuKeydown,onTabOut:this.handleMenuTabOut,onMousedown:this.handleMenuMousedown,show:this.mergedShow,showCheckmark:this.showCheckmark,resetMenuOnOptionsChange:this.resetMenuOnOptionsChange}),{empty:()=>{var o,i;return[(i=(o=this.$slots).empty)===null||i===void 0?void 0:i.call(o)]},header:()=>{var o,i;return[(i=(o=this.$slots).header)===null||i===void 0?void 0:i.call(o)]},action:()=>{var o,i;return[(i=(o=this.$slots).action)===null||i===void 0?void 0:i.call(o)]}}),this.displayDirective==="show"?[[r.vShow,this.mergedShow],[Xn,this.handleMenuClickOutside,void 0,{capture:!0}]]:[[Xn,this.handleMenuClickOutside,void 0,{capture:!0}]])):null}})})]}))}}),Nv={padding:"8px 14px"};function Wv(e){const{borderRadius:t,boxShadow2:n,baseColor:o}=e;return Object.assign(Object.assign({},Nv),{borderRadius:t,boxShadow:n,color:ut(o,"rgba(0, 0, 0, .85)"),textColor:o})}const jv={name:"Tooltip",common:et,peers:{Popover:bi},self:Wv},Uv=Object.assign(Object.assign({},cs),Ce.props),cr=r.defineComponent({name:"Tooltip",props:Uv,__popover__:!0,setup(e){const{mergedClsPrefixRef:t}=Je(e),n=Ce("Tooltip","-tooltip",void 0,jv,e,t),o=r.ref(null);return Object.assign(Object.assign({},{syncPosition(){o.value.syncPosition()},setShow(a){o.value.setShow(a)}}),{popoverRef:o,mergedTheme:n,popoverThemeOverrides:r.computed(()=>n.value.self)})},render(){const{mergedTheme:e,internalExtraClass:t}=this;return r.h(us,Object.assign(Object.assign({},this.$props),{theme:e.peers.Popover,themeOverrides:e.peerOverrides.Popover,builtinThemeOverrides:this.popoverThemeOverrides,internalExtraClass:t.concat("tooltip"),ref:"popoverRef"}),this.$slots)}});function Gv(e){const{textColorBase:t,opacity1:n,opacity2:o,opacity3:i,opacity4:a,opacity5:l}=e;return{color:t,opacity1Depth:n,opacity2Depth:o,opacity3Depth:i,opacity4Depth:a,opacity5Depth:l}}const Kv={name:"Icon",common:et,self:Gv},Xv=y("icon",`
|
|
1349
1349
|
height: 1em;
|
|
1350
1350
|
width: 1em;
|
|
1351
1351
|
line-height: 1em;
|
|
@@ -1354,122 +1354,13 @@ ${t}
|
|
|
1354
1354
|
position: relative;
|
|
1355
1355
|
fill: currentColor;
|
|
1356
1356
|
transform: translateZ(0);
|
|
1357
|
-
`,[W("color-transition",{transition:"color .3s var(--n-bezier)"}),W("depth",{color:"var(--n-color)"},[
|
|
1358
|
-
position: relative;
|
|
1359
|
-
`),W("square-shape",`
|
|
1360
|
-
background-color: var(--n-color);
|
|
1361
|
-
cursor: pointer;
|
|
1362
|
-
display: flex;
|
|
1363
|
-
width: fit-content;
|
|
1364
|
-
align-items: center;
|
|
1365
|
-
justify-content: center;
|
|
1366
|
-
border-radius: var(--n-border-radius-square);
|
|
1367
|
-
flex-direction: column;
|
|
1368
|
-
box-shadow: var(--n-box-shadow);
|
|
1369
|
-
transition:
|
|
1370
|
-
color .3s var(--n-bezier),
|
|
1371
|
-
box-shadow .3s var(--n-bezier),
|
|
1372
|
-
background-color .3s var(--n-bezier);
|
|
1373
|
-
`,[y("float-button",`
|
|
1374
|
-
background-color: unset;
|
|
1375
|
-
border-radius: 0;
|
|
1376
|
-
box-shadow: none;
|
|
1377
|
-
box-sizing: content-box;
|
|
1378
|
-
`,[I("&:not(:last-child)",`
|
|
1379
|
-
border-bottom: 1px solid var(--n-button-border-color);
|
|
1380
|
-
`),I("&:first-child",`
|
|
1381
|
-
border-top-left-radius: 4px;
|
|
1382
|
-
border-top-right-radius: 4px;
|
|
1383
|
-
`),I("&:last-child",`
|
|
1384
|
-
border-bottom-left-radius: 4px;
|
|
1385
|
-
border-bottom-right-radius: 4px;
|
|
1386
|
-
`),T("fill","inset: 4px; border-radius: var(--n-border-radius-square);")])]),W("circle-shape",[I(">:not(:last-child)",`
|
|
1387
|
-
margin-bottom: 16px;
|
|
1388
|
-
`)])]),u0=Object.assign(Object.assign({},ye.props),{left:[Number,String],right:[Number,String],top:[Number,String],bottom:[Number,String],shape:{type:String,default:"circle"},position:{type:String,default:"fixed"}}),Ss="n-float-button-group";o.defineComponent({name:"FloatButtonGroup",props:u0,setup(e){const{mergedClsPrefixRef:t,inlineThemeDisabled:n}=Ke(e),r=ye("FloatButtonGroup","-float-button-group",c0,d0,e,t),i=o.computed(()=>{const{self:{color:l,boxShadow:s,buttonBorderColor:d,borderRadiusSquare:c},common:{cubicBezierEaseInOut:f}}=r.value;return{"--n-bezier":f,"--n-box-shadow":s,"--n-color":l,"--n-button-border-color":d,"--n-border-radius-square":c,position:e.position,left:lt(e.left)||"",right:lt(e.right)||"",top:lt(e.top)||"",bottom:lt(e.bottom)||""}});o.provide(Ss,{shapeRef:o.toRef(e,"shape")});const a=n?et("float-button",void 0,i,e):void 0;return{cssVars:n?void 0:i,mergedClsPrefix:t,themeClass:a==null?void 0:a.themeClass,onRender:a==null?void 0:a.onRender}},render(){const{mergedClsPrefix:e,cssVars:t,shape:n}=this;return o.h("div",{class:[`${e}-float-button-group`,`${e}-float-button-group--${n}-shape`],style:t,role:"group"},this.$slots)}});function f0(e){const{popoverColor:t,textColor2:n,buttonColor2Hover:r,buttonColor2Pressed:i,primaryColor:a,primaryColorHover:l,primaryColorPressed:s,borderRadius:d}=e;return{color:t,colorHover:r,colorPressed:i,colorPrimary:a,colorPrimaryHover:l,colorPrimaryPressed:s,textColor:n,boxShadow:"0 2px 8px 0px rgba(0, 0, 0, .16)",boxShadowHover:"0 2px 12px 0px rgba(0, 0, 0, .24)",boxShadowPressed:"0 2px 12px 0px rgba(0, 0, 0, .24)",textColorPrimary:"#fff",borderRadiusSquare:d}}const h0={name:"FloatButton",common:Ye,self:f0},p0=y("float-button",`
|
|
1389
|
-
user-select: none;
|
|
1390
|
-
cursor: pointer;
|
|
1391
|
-
color: var(--n-text-color);
|
|
1392
|
-
background-color: var(--n-color);
|
|
1393
|
-
font-size: 18px;
|
|
1394
|
-
transition:
|
|
1395
|
-
color .3s var(--n-bezier),
|
|
1396
|
-
border-color .3s var(--n-bezier),
|
|
1397
|
-
box-shadow .3s var(--n-bezier),
|
|
1398
|
-
background-color .3s var(--n-bezier);
|
|
1399
|
-
box-shadow: var(--n-box-shadow);
|
|
1400
|
-
display: flex;
|
|
1401
|
-
align-items: stretch;
|
|
1402
|
-
box-sizing: border-box;
|
|
1403
|
-
`,[W("circle-shape",`
|
|
1404
|
-
border-radius: 4096px;
|
|
1405
|
-
`),W("square-shape",`
|
|
1406
|
-
border-radius: var(--n-border-radius-square);
|
|
1407
|
-
`),T("fill",`
|
|
1408
|
-
position: absolute;
|
|
1409
|
-
inset: 0;
|
|
1410
|
-
transition: background-color .3s var(--n-bezier);
|
|
1411
|
-
border-radius: inherit;
|
|
1412
|
-
`),T("body",`
|
|
1413
|
-
position: relative;
|
|
1414
|
-
flex-grow: 1;
|
|
1415
|
-
display: flex;
|
|
1416
|
-
align-items: center;
|
|
1417
|
-
justify-content: center;
|
|
1418
|
-
transition: transform .3s var(--n-bezier), opacity .3s var(--n-bezier);
|
|
1419
|
-
border-radius: inherit;
|
|
1420
|
-
flex-direction: column;
|
|
1421
|
-
box-sizing: border-box;
|
|
1422
|
-
padding: 2px 4px;
|
|
1423
|
-
gap: 2px;
|
|
1424
|
-
transform: scale(1);
|
|
1425
|
-
`,[T("description",`
|
|
1426
|
-
font-size: 12px;
|
|
1427
|
-
text-align: center;
|
|
1428
|
-
line-height: 14px;
|
|
1429
|
-
`)]),I("&:hover","box-shadow: var(--n-box-shadow-hover);",[I(">",[T("fill",`
|
|
1430
|
-
background-color: var(--n-color-hover);
|
|
1431
|
-
`)])]),I("&:active","box-shadow: var(--n-box-shadow-pressed);",[I(">",[T("fill",`
|
|
1432
|
-
background-color: var(--n-color-pressed);
|
|
1433
|
-
`)])]),W("show-menu",[I(">",[T("menu",`
|
|
1434
|
-
pointer-events: all;
|
|
1435
|
-
bottom: 100%;
|
|
1436
|
-
opacity: 1;
|
|
1437
|
-
`),T("close",`
|
|
1438
|
-
transform: scale(1);
|
|
1439
|
-
opacity: 1;
|
|
1440
|
-
`),T("body",`
|
|
1441
|
-
transform: scale(0.75);
|
|
1442
|
-
opacity: 0;
|
|
1443
|
-
`)])]),T("close",`
|
|
1444
|
-
opacity: 0;
|
|
1445
|
-
transform: scale(0.75);
|
|
1446
|
-
position: absolute;
|
|
1447
|
-
inset: 0;
|
|
1448
|
-
display: flex;
|
|
1449
|
-
align-items: center;
|
|
1450
|
-
justify-content: center;
|
|
1451
|
-
transition: transform .3s var(--n-bezier), opacity .3s var(--n-bezier);
|
|
1452
|
-
`),T("menu",`
|
|
1453
|
-
position: absolute;
|
|
1454
|
-
bottom: calc(100% - 8px);
|
|
1455
|
-
display: flex;
|
|
1456
|
-
flex-direction: column;
|
|
1457
|
-
opacity: 0;
|
|
1458
|
-
pointer-events: none;
|
|
1459
|
-
transition:
|
|
1460
|
-
opacity .3s var(--n-bezier),
|
|
1461
|
-
bottom .3s var(--n-bezier);
|
|
1462
|
-
`,[I("> *",`
|
|
1463
|
-
margin-bottom: 16px;
|
|
1464
|
-
`),y("float-button",`
|
|
1465
|
-
position: relative !important;
|
|
1466
|
-
`)])]),b0=Object.assign(Object.assign({},ye.props),{width:{type:[Number,String],default:40},height:{type:[Number,String],default:40},left:[Number,String],right:[Number,String],top:[Number,String],bottom:[Number,String],shape:{type:String,default:"circle"},position:{type:String,default:"fixed"},type:{type:String,default:"default"},menuTrigger:String,showMenu:{type:Boolean,default:void 0},onUpdateShowMenu:{type:[Function,Array],default:void 0},"onUpdate:showMenu":{type:[Function,Array],default:void 0}}),g0=o.defineComponent({name:"FloatButton",props:b0,setup(e){const{mergedClsPrefixRef:t,inlineThemeDisabled:n}=Ke(e),r=ye("FloatButton","-float-button",p0,h0,e,t),i=o.inject(Ss,null),a=o.ref(!1),l=o.toRef(e,"showMenu"),s=vt(l,a);function d(w){const{onUpdateShowMenu:g,"onUpdate:showMenu":P}=e;a.value=w,g&&ce(g,w),P&&ce(P,w)}const c=o.computed(()=>{const{self:{color:w,textColor:g,boxShadow:P,boxShadowHover:H,boxShadowPressed:$,colorHover:k,colorPrimary:M,colorPrimaryHover:b,textColorPrimary:S,borderRadiusSquare:E,colorPressed:D,colorPrimaryPressed:O},common:{cubicBezierEaseInOut:V}}=r.value,{type:j}=e;return{"--n-bezier":V,"--n-box-shadow":P,"--n-box-shadow-hover":H,"--n-box-shadow-pressed":$,"--n-color":j==="primary"?M:w,"--n-text-color":j==="primary"?S:g,"--n-color-hover":j==="primary"?b:k,"--n-color-pressed":j==="primary"?O:D,"--n-border-radius-square":E}}),f=o.computed(()=>{const{width:w,height:g}=e;return Object.assign({position:i?void 0:e.position,width:lt(w),minHeight:lt(g)},i?null:{left:lt(e.left),right:lt(e.right),top:lt(e.top),bottom:lt(e.bottom)})}),u=o.computed(()=>i?i.shapeRef.value:e.shape),p=()=>{e.menuTrigger==="hover"&&d(!0)},m=()=>{e.menuTrigger==="hover"&&s.value&&d(!1)},h=()=>{e.menuTrigger==="click"&&d(!s.value)},v=n?et("float-button",o.computed(()=>e.type[0]),c,e):void 0;return{inlineStyle:f,cssVars:n?void 0:c,mergedClsPrefix:t,mergedShape:u,mergedShowMenu:s,themeClass:v==null?void 0:v.themeClass,onRender:v==null?void 0:v.onRender,Mouseenter:p,handleMouseleave:m,handleClick:h}},render(){var e;const{mergedClsPrefix:t,cssVars:n,mergedShape:r,type:i,menuTrigger:a,mergedShowMenu:l,themeClass:s,$slots:d,inlineStyle:c,onRender:f}=this,u=[[ba,this.handleMouseleave]];return f==null||f(),o.withDirectives(o.h("div",{class:[`${t}-float-button`,`${t}-float-button--${r}-shape`,`${t}-float-button--${i}-type`,l&&`${t}-float-button--show-menu`,s],style:[n,c],onMouseenter:this.Mouseenter,onMouseleave:this.handleMouseleave,onClick:this.handleClick,role:"button"},o.h("div",{class:`${t}-float-button__fill`,"aria-hidden":!0}),o.h("div",{class:`${t}-float-button__body`},(e=d.default)===null||e===void 0?void 0:e.call(d),Oe(d.description,p=>p?o.h("div",{class:`${t}-float-button__description`},p):null)),a?o.h("div",{class:`${t}-float-button__close`},o.h(bt,{clsPrefix:t},{default:()=>o.h(ql,null)})):null,a?o.h("div",{onClick:p=>{p.stopPropagation()},"data-float-button-menu":!0,class:`${t}-float-button__menu`},mt(d.menu,()=>[])):null),u)}});function m0(e){return e==null||typeof e=="string"&&e.trim()===""?null:Number(e)}function v0(e){return e.includes(".")&&(/^(-)?\d+.*(\.|0)$/.test(e)||/^\.\d+$/.test(e))}function Si(e){return e==null?!0:!Number.isNaN(e)}function $s(e,t){return typeof e!="number"?"":t===void 0?String(e):e.toFixed(t)}function $i(e){if(e===null)return null;if(typeof e=="number")return e;{const t=Number(e);return Number.isNaN(t)?null:t}}const x0=I([y("input-number-suffix",`
|
|
1357
|
+
`,[W("color-transition",{transition:"color .3s var(--n-bezier)"}),W("depth",{color:"var(--n-color)"},[V("svg",{opacity:"var(--n-opacity)",transition:"opacity .3s var(--n-bezier)"})]),V("svg",{height:"1em",width:"1em"})]),qv=Object.assign(Object.assign({},Ce.props),{depth:[String,Number],size:[Number,String],color:String,component:Object}),mt=r.defineComponent({_n_icon__:!0,name:"Icon",inheritAttrs:!1,props:qv,setup(e){const{mergedClsPrefixRef:t,inlineThemeDisabled:n}=Je(e),o=Ce("Icon","-icon",Xv,Kv,e,t),i=r.computed(()=>{const{depth:l}=e,{common:{cubicBezierEaseInOut:s},self:d}=o.value;if(l!==void 0){const{color:c,[`opacity${l}Depth`]:f}=d;return{"--n-bezier":s,"--n-color":c,"--n-opacity":f}}return{"--n-bezier":s,"--n-color":"","--n-opacity":""}}),a=n?tt("icon",r.computed(()=>`${e.depth||"d"}`),i,e):void 0;return{mergedClsPrefix:t,mergedStyle:r.computed(()=>{const{size:l,color:s}=e;return{fontSize:xr(l),color:s}}),cssVars:n?void 0:i,themeClass:a==null?void 0:a.themeClass,onRender:a==null?void 0:a.onRender}},render(){var e;const{$parent:t,depth:n,mergedClsPrefix:o,component:i,onRender:a,themeClass:l}=this;return!((e=t==null?void 0:t.$options)===null||e===void 0)&&e._n_icon__&&Un("icon","don't wrap `n-icon` inside `n-icon`"),a==null||a(),r.h("i",r.mergeProps(this.$attrs,{role:"img",class:[`${o}-icon`,l,{[`${o}-icon--depth`]:n,[`${o}-icon--color-transition`]:n!==void 0}],style:[this.cssVars,this.mergedStyle]}),i?r.h(i):this.$slots)}});function Yv(e){const{textColorDisabled:t}=e;return{iconColorDisabled:t}}const Zv={name:"InputNumber",common:et,peers:{Button:Ci,Input:wi},self:Yv},Jv={railHeight:"4px",railWidthVertical:"4px",handleSize:"18px",dotHeight:"8px",dotWidth:"8px",dotBorderRadius:"4px"};function Qv(e){const t="rgba(0, 0, 0, .85)",n="0 2px 8px 0 rgba(0, 0, 0, 0.12)",{railColor:o,primaryColor:i,baseColor:a,cardColor:l,modalColor:s,popoverColor:d,borderRadius:c,fontSize:f,opacityDisabled:u}=e;return Object.assign(Object.assign({},Jv),{fontSize:f,markFontSize:f,railColor:o,railColorHover:o,fillColor:i,fillColorHover:i,opacityDisabled:u,handleColor:"#FFF",dotColor:l,dotColorModal:s,dotColorPopover:d,handleBoxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.3), inset 0 0 1px 0 rgba(0, 0, 0, 0.05)",handleBoxShadowHover:"0 1px 4px 0 rgba(0, 0, 0, 0.3), inset 0 0 1px 0 rgba(0, 0, 0, 0.05)",handleBoxShadowActive:"0 1px 4px 0 rgba(0, 0, 0, 0.3), inset 0 0 1px 0 rgba(0, 0, 0, 0.05)",handleBoxShadowFocus:"0 1px 4px 0 rgba(0, 0, 0, 0.3), inset 0 0 1px 0 rgba(0, 0, 0, 0.05)",indicatorColor:t,indicatorBoxShadow:n,indicatorTextColor:a,indicatorBorderRadius:c,dotBorder:`2px solid ${o}`,dotBorderActive:`2px solid ${i}`,dotBoxShadow:""})}const e0={name:"Slider",common:et,self:Qv},t0={buttonHeightSmall:"14px",buttonHeightMedium:"18px",buttonHeightLarge:"22px",buttonWidthSmall:"14px",buttonWidthMedium:"18px",buttonWidthLarge:"22px",buttonWidthPressedSmall:"20px",buttonWidthPressedMedium:"24px",buttonWidthPressedLarge:"28px",railHeightSmall:"18px",railHeightMedium:"22px",railHeightLarge:"26px",railWidthSmall:"32px",railWidthMedium:"40px",railWidthLarge:"48px"};function n0(e){const{primaryColor:t,opacityDisabled:n,borderRadius:o,textColor3:i}=e;return Object.assign(Object.assign({},t0),{iconColor:i,textColor:"white",loadingColor:t,opacityDisabled:n,railColor:"rgba(0, 0, 0, .14)",railColorActive:t,buttonBoxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.3), inset 0 0 1px 0 rgba(0, 0, 0, 0.05)",buttonColor:"#FFF",railBorderRadiusSmall:o,railBorderRadiusMedium:o,railBorderRadiusLarge:o,buttonBorderRadiusSmall:o,buttonBorderRadiusMedium:o,buttonBorderRadiusLarge:o,boxShadowFocus:`0 0 0 2px ${me(t,{alpha:.2})}`})}const r0={name:"Switch",common:et,self:n0},o0={tabFontSizeSmall:"14px",tabFontSizeMedium:"14px",tabFontSizeLarge:"16px",tabGapSmallLine:"36px",tabGapMediumLine:"36px",tabGapLargeLine:"36px",tabGapSmallLineVertical:"8px",tabGapMediumLineVertical:"8px",tabGapLargeLineVertical:"8px",tabPaddingSmallLine:"6px 0",tabPaddingMediumLine:"10px 0",tabPaddingLargeLine:"14px 0",tabPaddingVerticalSmallLine:"6px 12px",tabPaddingVerticalMediumLine:"8px 16px",tabPaddingVerticalLargeLine:"10px 20px",tabGapSmallBar:"36px",tabGapMediumBar:"36px",tabGapLargeBar:"36px",tabGapSmallBarVertical:"8px",tabGapMediumBarVertical:"8px",tabGapLargeBarVertical:"8px",tabPaddingSmallBar:"4px 0",tabPaddingMediumBar:"6px 0",tabPaddingLargeBar:"10px 0",tabPaddingVerticalSmallBar:"6px 12px",tabPaddingVerticalMediumBar:"8px 16px",tabPaddingVerticalLargeBar:"10px 20px",tabGapSmallCard:"4px",tabGapMediumCard:"4px",tabGapLargeCard:"4px",tabGapSmallCardVertical:"4px",tabGapMediumCardVertical:"4px",tabGapLargeCardVertical:"4px",tabPaddingSmallCard:"8px 16px",tabPaddingMediumCard:"10px 20px",tabPaddingLargeCard:"12px 24px",tabPaddingSmallSegment:"4px 0",tabPaddingMediumSegment:"6px 0",tabPaddingLargeSegment:"8px 0",tabPaddingVerticalLargeSegment:"0 8px",tabPaddingVerticalSmallCard:"8px 12px",tabPaddingVerticalMediumCard:"10px 16px",tabPaddingVerticalLargeCard:"12px 20px",tabPaddingVerticalSmallSegment:"0 4px",tabPaddingVerticalMediumSegment:"0 6px",tabGapSmallSegment:"0",tabGapMediumSegment:"0",tabGapLargeSegment:"0",tabGapSmallSegmentVertical:"0",tabGapMediumSegmentVertical:"0",tabGapLargeSegmentVertical:"0",panePaddingSmall:"8px 0 0 0",panePaddingMedium:"12px 0 0 0",panePaddingLarge:"16px 0 0 0",closeSize:"18px",closeIconSize:"14px"};function i0(e){const{textColor2:t,primaryColor:n,textColorDisabled:o,closeIconColor:i,closeIconColorHover:a,closeIconColorPressed:l,closeColorHover:s,closeColorPressed:d,tabColor:c,baseColor:f,dividerColor:u,fontWeight:b,textColor1:m,borderRadius:h,fontSize:x,fontWeightStrong:w}=e;return Object.assign(Object.assign({},o0),{colorSegment:c,tabFontSizeCard:x,tabTextColorLine:m,tabTextColorActiveLine:n,tabTextColorHoverLine:n,tabTextColorDisabledLine:o,tabTextColorSegment:m,tabTextColorActiveSegment:t,tabTextColorHoverSegment:t,tabTextColorDisabledSegment:o,tabTextColorBar:m,tabTextColorActiveBar:n,tabTextColorHoverBar:n,tabTextColorDisabledBar:o,tabTextColorCard:m,tabTextColorHoverCard:m,tabTextColorActiveCard:n,tabTextColorDisabledCard:o,barColor:n,closeIconColor:i,closeIconColorHover:a,closeIconColorPressed:l,closeColorHover:s,closeColorPressed:d,closeBorderRadius:h,tabColor:c,tabColorSegment:f,tabBorderColor:u,tabFontWeightActive:b,tabFontWeight:b,tabBorderRadius:h,paneTextColor:t,fontWeightStrong:w})}const a0={name:"Tabs",common:et,self:i0};function l0(e){return e==null||typeof e=="string"&&e.trim()===""?null:Number(e)}function s0(e){return e.includes(".")&&(/^(-)?\d+.*(\.|0)$/.test(e)||/^\.\d+$/.test(e))}function $i(e){return e==null?!0:!Number.isNaN(e)}function ws(e,t){return typeof e!="number"?"":t===void 0?String(e):e.toFixed(t)}function ki(e){if(e===null)return null;if(typeof e=="number")return e;{const t=Number(e);return Number.isNaN(t)?null:t}}const d0=V([y("input-number-suffix",`
|
|
1467
1358
|
display: inline-block;
|
|
1468
1359
|
margin-right: 10px;
|
|
1469
1360
|
`),y("input-number-prefix",`
|
|
1470
1361
|
display: inline-block;
|
|
1471
1362
|
margin-left: 10px;
|
|
1472
|
-
`)]),
|
|
1363
|
+
`)]),Cs=800,Ss=100,c0=Object.assign(Object.assign({},Ce.props),{autofocus:Boolean,loading:{type:Boolean,default:void 0},placeholder:String,defaultValue:{type:Number,default:null},value:Number,step:{type:[Number,String],default:1},min:[Number,String],max:[Number,String],size:String,disabled:{type:Boolean,default:void 0},validator:Function,bordered:{type:Boolean,default:void 0},showButton:{type:Boolean,default:!0},buttonPlacement:{type:String,default:"right"},inputProps:Object,readonly:Boolean,clearable:Boolean,keyboard:{type:Object,default:{}},updateValueOnInput:{type:Boolean,default:!0},round:{type:Boolean,default:void 0},parse:Function,format:Function,precision:Number,status:String,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onFocus:[Function,Array],onBlur:[Function,Array],onClear:[Function,Array],onChange:[Function,Array]}),u0=r.defineComponent({name:"InputNumber",props:c0,setup(e){process.env.NODE_ENV!=="production"&&r.watchEffect(()=>{e.onChange!==void 0&&Qe("input-number","`on-change` is deprecated, please use `on-update:value` instead")});const{mergedBorderedRef:t,mergedClsPrefixRef:n,mergedRtlRef:o}=Je(e),i=Ce("InputNumber","-input-number",d0,Zv,e,n),{localeRef:a}=ar("InputNumber"),l=dn(e),{mergedSizeRef:s,mergedDisabledRef:d,mergedStatusRef:c}=l,f=r.ref(null),u=r.ref(null),b=r.ref(null),m=r.ref(e.defaultValue),h=r.toRef(e,"value"),x=St(h,m),w=r.ref(""),g=X=>{const O=String(X).split(".")[1];return O?O.length:0},P=X=>{const O=[e.min,e.max,e.step,X].map(ne=>ne===void 0?0:g(ne));return Math.max(...O)},L=Xe(()=>{const{placeholder:X}=e;return X!==void 0?X:a.value.placeholder}),$=Xe(()=>{const X=ki(e.step);return X!==null?X===0?1:Math.abs(X):1}),k=Xe(()=>{const X=ki(e.min);return X!==null?X:null}),M=Xe(()=>{const X=ki(e.max);return X!==null?X:null}),p=()=>{const{value:X}=x;if($i(X)){const{format:O,precision:ne}=e;O?w.value=O(X):X===null||ne===void 0||g(X)>ne?w.value=ws(X,void 0):w.value=ws(X,ne)}else w.value=String(X)};p();const S=X=>{const{value:O}=x;if(X===O){p();return}const{"onUpdate:value":ne,onUpdateValue:E,onChange:A}=e,{nTriggerFormInput:K,nTriggerFormChange:T}=l;A&&he(A,X),E&&he(E,X),ne&&he(ne,X),m.value=X,K(),T()},B=({offset:X,doUpdateIfValid:O,fixPrecision:ne,isInputing:E})=>{const{value:A}=w;if(E&&s0(A))return!1;const K=(e.parse||l0)(A);if(K===null)return O&&S(null),null;if($i(K)){const T=g(K),{precision:C}=e;if(C!==void 0&&C<T&&!ne)return!1;let _=Number.parseFloat((K+X).toFixed(C??P(K)));if($i(_)){const{value:re}=M,{value:xe}=k;if(re!==null&&_>re){if(!O||E)return!1;_=re}if(xe!==null&&_<xe){if(!O||E)return!1;_=xe}return e.validator&&!e.validator(_)?!1:(O&&S(_),_)}}return!1},F=Xe(()=>B({offset:0,doUpdateIfValid:!1,isInputing:!1,fixPrecision:!1})===!1),I=Xe(()=>{const{value:X}=x;if(e.validator&&X===null)return!1;const{value:O}=$;return B({offset:-O,doUpdateIfValid:!1,isInputing:!1,fixPrecision:!1})!==!1}),D=Xe(()=>{const{value:X}=x;if(e.validator&&X===null)return!1;const{value:O}=$;return B({offset:+O,doUpdateIfValid:!1,isInputing:!1,fixPrecision:!1})!==!1});function j(X){const{onFocus:O}=e,{nTriggerFormFocus:ne}=l;O&&he(O,X),ne()}function Q(X){var O,ne;if(X.target===((O=f.value)===null||O===void 0?void 0:O.wrapperElRef))return;const E=B({offset:0,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0});if(E!==!1){const T=(ne=f.value)===null||ne===void 0?void 0:ne.inputElRef;T&&(T.value=String(E||"")),x.value===E&&p()}else p();const{onBlur:A}=e,{nTriggerFormBlur:K}=l;A&&he(A,X),K(),r.nextTick(()=>{p()})}function N(X){const{onClear:O}=e;O&&he(O,X)}function Z(){const{value:X}=D;if(!X){we();return}const{value:O}=x;if(O===null)e.validator||S(ie());else{const{value:ne}=$;B({offset:ne,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})}}function q(){const{value:X}=I;if(!X){oe();return}const{value:O}=x;if(O===null)e.validator||S(ie());else{const{value:ne}=$;B({offset:-ne,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})}}const Y=j,de=Q;function ie(){if(e.validator)return null;const{value:X}=k,{value:O}=M;return X!==null?Math.max(0,X):O!==null?Math.min(0,O):0}function ce(X){N(X),S(null)}function U(X){var O,ne,E;!((O=b.value)===null||O===void 0)&&O.$el.contains(X.target)&&X.preventDefault(),!((ne=u.value)===null||ne===void 0)&&ne.$el.contains(X.target)&&X.preventDefault(),(E=f.value)===null||E===void 0||E.activate()}let te=null,ve=null,ye=null;function oe(){ye&&(window.clearTimeout(ye),ye=null),te&&(window.clearInterval(te),te=null)}let Se=null;function we(){Se&&(window.clearTimeout(Se),Se=null),ve&&(window.clearInterval(ve),ve=null)}function le(){oe(),ye=window.setTimeout(()=>{te=window.setInterval(()=>{q()},Ss)},Cs),Pe("mouseup",document,oe,{once:!0})}function Me(){we(),Se=window.setTimeout(()=>{ve=window.setInterval(()=>{Z()},Ss)},Cs),Pe("mouseup",document,we,{once:!0})}const Re=()=>{ve||Z()},He=()=>{te||q()};function Ie(X){var O,ne;if(X.key==="Enter"){if(X.target===((O=f.value)===null||O===void 0?void 0:O.wrapperElRef))return;B({offset:0,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})!==!1&&((ne=f.value)===null||ne===void 0||ne.deactivate())}else if(X.key==="ArrowUp"){if(!D.value||e.keyboard.ArrowUp===!1)return;X.preventDefault(),B({offset:0,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})!==!1&&Z()}else if(X.key==="ArrowDown"){if(!I.value||e.keyboard.ArrowDown===!1)return;X.preventDefault(),B({offset:0,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})!==!1&&q()}}function De(X){w.value=X,e.updateValueOnInput&&!e.format&&!e.parse&&e.precision===void 0&&B({offset:0,doUpdateIfValid:!0,isInputing:!0,fixPrecision:!1})}r.watch(x,()=>{p()});const Ue={focus:()=>{var X;return(X=f.value)===null||X===void 0?void 0:X.focus()},blur:()=>{var X;return(X=f.value)===null||X===void 0?void 0:X.blur()},select:()=>{var X;return(X=f.value)===null||X===void 0?void 0:X.select()}},ke=Kt("InputNumber",o,n);return Object.assign(Object.assign({},Ue),{rtlEnabled:ke,inputInstRef:f,minusButtonInstRef:u,addButtonInstRef:b,mergedClsPrefix:n,mergedBordered:t,uncontrolledValue:m,mergedValue:x,mergedPlaceholder:L,displayedValueInvalid:F,mergedSize:s,mergedDisabled:d,displayedValue:w,addable:D,minusable:I,mergedStatus:c,handleFocus:Y,handleBlur:de,handleClear:ce,handleMouseDown:U,handleAddClick:Re,handleMinusClick:He,handleAddMousedown:Me,handleMinusMousedown:le,handleKeyDown:Ie,handleUpdateDisplayedValue:De,mergedTheme:i,inputThemeOverrides:{paddingSmall:"0 8px 0 10px",paddingMedium:"0 8px 0 12px",paddingLarge:"0 8px 0 14px"},buttonThemeOverrides:r.computed(()=>{const{self:{iconColorDisabled:X}}=i.value,[O,ne,E,A]=Ze(X);return{textColorTextDisabled:`rgb(${O}, ${ne}, ${E})`,opacityDisabled:`${A}`}})})},render(){const{mergedClsPrefix:e,$slots:t}=this,n=()=>r.h(vs,{text:!0,disabled:!this.minusable||this.mergedDisabled||this.readonly,focusable:!1,theme:this.mergedTheme.peers.Button,themeOverrides:this.mergedTheme.peerOverrides.Button,builtinThemeOverrides:this.buttonThemeOverrides,onClick:this.handleMinusClick,onMousedown:this.handleMinusMousedown,ref:"minusButtonInstRef"},{icon:()=>Ct(t["minus-icon"],()=>[r.h(gt,{clsPrefix:e},{default:()=>r.h(fg,null)})])}),o=()=>r.h(vs,{text:!0,disabled:!this.addable||this.mergedDisabled||this.readonly,focusable:!1,theme:this.mergedTheme.peers.Button,themeOverrides:this.mergedTheme.peerOverrides.Button,builtinThemeOverrides:this.buttonThemeOverrides,onClick:this.handleAddClick,onMousedown:this.handleAddMousedown,ref:"addButtonInstRef"},{icon:()=>Ct(t["add-icon"],()=>[r.h(gt,{clsPrefix:e},{default:()=>r.h(Kl,null)})])});return r.h("div",{class:[`${e}-input-number`,this.rtlEnabled&&`${e}-input-number--rtl`]},r.h(Fn,{ref:"inputInstRef",autofocus:this.autofocus,status:this.mergedStatus,bordered:this.mergedBordered,loading:this.loading,value:this.displayedValue,onUpdateValue:this.handleUpdateDisplayedValue,theme:this.mergedTheme.peers.Input,themeOverrides:this.mergedTheme.peerOverrides.Input,builtinThemeOverrides:this.inputThemeOverrides,size:this.mergedSize,placeholder:this.mergedPlaceholder,disabled:this.mergedDisabled,readonly:this.readonly,round:this.round,textDecoration:this.displayedValueInvalid?"line-through":void 0,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeydown:this.handleKeyDown,onMousedown:this.handleMouseDown,onClear:this.handleClear,clearable:this.clearable,inputProps:this.inputProps,internalLoadingBeforeSuffix:!0},{prefix:()=>{var i;return this.showButton&&this.buttonPlacement==="both"?[n(),Ae(t.prefix,a=>a?r.h("span",{class:`${e}-input-number-prefix`},a):null)]:(i=t.prefix)===null||i===void 0?void 0:i.call(t)},suffix:()=>{var i;return this.showButton?[Ae(t.suffix,a=>a?r.h("span",{class:`${e}-input-number-suffix`},a):null),this.buttonPlacement==="right"?n():null,o()]:(i=t.suffix)===null||i===void 0?void 0:i.call(t)}}))}});function $s(e){return window.TouchEvent&&e instanceof window.TouchEvent}function ks(){const e=new Map,t=n=>o=>{e.set(n,o)};return r.onBeforeUpdate(()=>{e.clear()}),[e,t]}const f0=V([y("slider",`
|
|
1473
1364
|
display: block;
|
|
1474
1365
|
padding: calc((var(--n-handle-size) - var(--n-rail-height)) / 2) 0;
|
|
1475
1366
|
position: relative;
|
|
@@ -1503,7 +1394,7 @@ ${t}
|
|
|
1503
1394
|
transform: translate(-50%, 50%);
|
|
1504
1395
|
`)]),y("slider-rail",`
|
|
1505
1396
|
height: 100%;
|
|
1506
|
-
`,[
|
|
1397
|
+
`,[R("fill",`
|
|
1507
1398
|
top: unset;
|
|
1508
1399
|
right: 0;
|
|
1509
1400
|
bottom: unset;
|
|
@@ -1535,7 +1426,7 @@ ${t}
|
|
|
1535
1426
|
`)]),W("with-mark",`
|
|
1536
1427
|
width: 100%;
|
|
1537
1428
|
margin: 8px 0 32px 0;
|
|
1538
|
-
`),
|
|
1429
|
+
`),V("&:hover",[y("slider-rail",{backgroundColor:"var(--n-rail-color-hover)"},[R("fill",{backgroundColor:"var(--n-fill-color-hover)"})]),y("slider-handle",{boxShadow:"var(--n-handle-box-shadow-hover)"})]),W("active",[y("slider-rail",{backgroundColor:"var(--n-rail-color-hover)"},[R("fill",{backgroundColor:"var(--n-fill-color-hover)"})]),y("slider-handle",{boxShadow:"var(--n-handle-box-shadow-hover)"})]),y("slider-marks",`
|
|
1539
1430
|
position: absolute;
|
|
1540
1431
|
top: 18px;
|
|
1541
1432
|
left: calc(var(--n-handle-size) / 2);
|
|
@@ -1551,7 +1442,7 @@ ${t}
|
|
|
1551
1442
|
background-color: var(--n-rail-color);
|
|
1552
1443
|
transition: background-color .3s var(--n-bezier);
|
|
1553
1444
|
border-radius: calc(var(--n-rail-height) / 2);
|
|
1554
|
-
`,[
|
|
1445
|
+
`,[R("fill",`
|
|
1555
1446
|
position: absolute;
|
|
1556
1447
|
top: 0;
|
|
1557
1448
|
bottom: 0;
|
|
@@ -1579,11 +1470,11 @@ ${t}
|
|
|
1579
1470
|
transition: box-shadow .2s var(--n-bezier), background-color .3s var(--n-bezier);
|
|
1580
1471
|
background-color: var(--n-handle-color);
|
|
1581
1472
|
box-shadow: var(--n-handle-box-shadow);
|
|
1582
|
-
`,[
|
|
1473
|
+
`,[V("&:hover",`
|
|
1583
1474
|
box-shadow: var(--n-handle-box-shadow-hover);
|
|
1584
|
-
`)]),
|
|
1475
|
+
`)]),V("&:focus",[y("slider-handle",`
|
|
1585
1476
|
box-shadow: var(--n-handle-box-shadow-focus);
|
|
1586
|
-
`,[
|
|
1477
|
+
`,[V("&:hover",`
|
|
1587
1478
|
box-shadow: var(--n-handle-box-shadow-active);
|
|
1588
1479
|
`)])])])]),y("slider-dots",`
|
|
1589
1480
|
position: absolute;
|
|
@@ -1611,7 +1502,7 @@ ${t}
|
|
|
1611
1502
|
color: var(--n-indicator-text-color);
|
|
1612
1503
|
background-color: var(--n-indicator-color);
|
|
1613
1504
|
box-shadow: var(--n-indicator-box-shadow);
|
|
1614
|
-
`,[
|
|
1505
|
+
`,[lr()]),y("slider-handle-indicator",`
|
|
1615
1506
|
font-size: var(--n-font-size);
|
|
1616
1507
|
padding: 6px 10px;
|
|
1617
1508
|
border-radius: var(--n-indicator-border-radius);
|
|
@@ -1626,7 +1517,7 @@ ${t}
|
|
|
1626
1517
|
margin-top: 12px;
|
|
1627
1518
|
`),W("left",`
|
|
1628
1519
|
margin-right: 12px;
|
|
1629
|
-
`),so()]),_d(y("slider",[y("slider-dot","background-color: var(--n-dot-color-modal);")])),Ed(y("slider",[y("slider-dot","background-color: var(--n-dot-color-popover);")]))]),S0=0,$0=Object.assign(Object.assign({},ye.props),{to:rt.propTo,defaultValue:{type:[Number,Array],default:0},marks:Object,disabled:{type:Boolean,default:void 0},formatTooltip:Function,keyboard:{type:Boolean,default:!0},min:{type:Number,default:0},max:{type:Number,default:100},step:{type:[Number,String],default:1},range:Boolean,value:[Number,Array],placement:String,showTooltip:{type:Boolean,default:void 0},tooltip:{type:Boolean,default:!0},vertical:Boolean,reverse:Boolean,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onDragstart:[Function],onDragend:[Function]}),k0=o.defineComponent({name:"Slider",props:$0,setup(e){const{mergedClsPrefixRef:t,namespaceRef:n,inlineThemeDisabled:r}=Ke(e),i=ye("Slider","-slider",C0,t0,e,t),a=o.ref(null),[l,s]=Ps(),[d,c]=Ps(),f=o.ref(new Set),u=cn(e),{mergedDisabledRef:p}=u,m=o.computed(()=>{const{step:z}=e;if(Number(z)<=0||z==="mark")return 0;const C=z.toString();let B=0;return C.includes(".")&&(B=C.length-C.indexOf(".")-1),B}),h=o.ref(e.defaultValue),v=o.toRef(e,"value"),w=vt(v,h),g=o.computed(()=>{const{value:z}=w;return(e.range?z:[z]).map(U)}),P=o.computed(()=>g.value.length>2),H=o.computed(()=>e.placement===void 0?e.vertical?"right":"top":e.placement),$=o.computed(()=>{const{marks:z}=e;return z?Object.keys(z).map(Number.parseFloat):null}),k=o.ref(-1),M=o.ref(-1),b=o.ref(-1),S=o.ref(!1),E=o.ref(!1),D=o.computed(()=>{const{vertical:z,reverse:C}=e;return z?C?"top":"bottom":C?"right":"left"}),O=o.computed(()=>{if(P.value)return;const z=g.value,C=te(e.range?Math.min(...z):e.min),B=te(e.range?Math.max(...z):z[0]),{value:oe}=D;return e.vertical?{[oe]:`${C}%`,height:`${B-C}%`}:{[oe]:`${C}%`,width:`${B-C}%`}}),V=o.computed(()=>{const z=[],{marks:C}=e;if(C){const B=g.value.slice();B.sort((Ae,_e)=>Ae-_e);const{value:oe}=D,{value:xe}=P,{range:ze}=e,Ne=xe?()=>!1:Ae=>ze?Ae>=B[0]&&Ae<=B[B.length-1]:Ae<=B[0];for(const Ae of Object.keys(C)){const _e=Number(Ae);z.push({active:Ne(_e),label:C[Ae],style:{[oe]:`${te(_e)}%`}})}}return z});function j(z,C){const B=te(z),{value:oe}=D;return{[oe]:`${B}%`,zIndex:C===k.value?1:0}}function Q(z){return e.showTooltip||b.value===z||k.value===z&&S.value}function N(z){return S.value?!(k.value===z&&M.value===z):!0}function Z(z){var C;~z&&(k.value=z,(C=l.get(z))===null||C===void 0||C.focus())}function X(){d.forEach((z,C)=>{Q(C)&&z.syncPosition()})}function Y(z){const{"onUpdate:value":C,onUpdateValue:B}=e,{nTriggerFormInput:oe,nTriggerFormChange:xe}=u;B&&ce(B,z),C&&ce(C,z),h.value=z,oe(),xe()}function de(z){const{range:C}=e;if(C){if(Array.isArray(z)){const{value:B}=g;z.join()!==B.join()&&Y(z)}}else Array.isArray(z)||g.value[0]!==z&&Y(z)}function ie(z,C){if(e.range){const B=g.value.slice();B.splice(C,1,z),de(B)}else de(z)}function ue(z,C,B){const oe=B!==void 0;B||(B=z-C>0?1:-1);const xe=$.value||[],{step:ze}=e;if(ze==="mark"){const _e=re(z,xe.concat(C),oe?B:void 0);return _e?_e.value:C}if(ze<=0)return C;const{value:Ne}=m;let Ae;if(oe){const _e=Number((C/ze).toFixed(Ne)),qe=Math.floor(_e),st=_e>qe?qe:qe-1,Je=_e<qe?qe:qe+1;Ae=re(C,[Number((st*ze).toFixed(Ne)),Number((Je*ze).toFixed(Ne)),...xe],B)}else{const _e=we(z);Ae=re(z,[...xe,_e])}return Ae?U(Ae.value):C}function U(z){return Math.min(e.max,Math.max(e.min,z))}function te(z){const{max:C,min:B}=e;return(z-B)/(C-B)*100}function ve(z){const{max:C,min:B}=e;return B+(C-B)*z}function we(z){const{step:C,min:B}=e;if(Number(C)<=0||C==="mark")return z;const oe=Math.round((z-B)/C)*C+B;return Number(oe.toFixed(m.value))}function re(z,C=$.value,B){if(!(C!=null&&C.length))return null;let oe=null,xe=-1;for(;++xe<C.length;){const ze=C[xe]-z,Ne=Math.abs(ze);(B===void 0||ze*B>0)&&(oe===null||Ne<oe.distance)&&(oe={index:xe,distance:Ne,value:C[xe]})}return oe}function Se(z){const C=a.value;if(!C)return;const B=Ts(z)?z.touches[0]:z,oe=C.getBoundingClientRect();let xe;return e.vertical?xe=(oe.bottom-B.clientY)/oe.height:xe=(B.clientX-oe.left)/oe.width,e.reverse&&(xe=1-xe),ve(xe)}function Ce(z){if(p.value||!e.keyboard)return;const{vertical:C,reverse:B}=e;switch(z.key){case"ArrowUp":z.preventDefault(),le(C&&B?-1:1);break;case"ArrowRight":z.preventDefault(),le(!C&&B?-1:1);break;case"ArrowDown":z.preventDefault(),le(C&&B?1:-1);break;case"ArrowLeft":z.preventDefault(),le(!C&&B?1:-1);break}}function le(z){const C=k.value;if(C===-1)return;const{step:B}=e,oe=g.value[C],xe=Number(B)<=0||B==="mark"?oe:oe+B*z;ie(ue(xe,oe,z>0?1:-1),C)}function Me(z){var C,B;if(p.value||!Ts(z)&&z.button!==S0)return;const oe=Se(z);if(oe===void 0)return;const xe=g.value.slice(),ze=e.range?(B=(C=re(oe,xe))===null||C===void 0?void 0:C.index)!==null&&B!==void 0?B:-1:0;ze!==-1&&(z.preventDefault(),Z(ze),Re(),ie(ue(oe,g.value[ze]),ze))}function Re(){S.value||(S.value=!0,e.onDragstart&&ce(e.onDragstart),Pe("touchend",document,De),Pe("mouseup",document,De),Pe("touchmove",document,Ie),Pe("mousemove",document,Ie))}function Le(){S.value&&(S.value=!1,e.onDragend&&ce(e.onDragend),$e("touchend",document,De),$e("mouseup",document,De),$e("touchmove",document,Ie),$e("mousemove",document,Ie))}function Ie(z){const{value:C}=k;if(!S.value||C===-1){Le();return}const B=Se(z);B!==void 0&&ie(ue(B,g.value[C]),C)}function De(){Le()}function Ue(z){k.value=z,p.value||(b.value=z)}function ke(z){k.value===z&&(k.value=-1,Le()),b.value===z&&(b.value=-1)}function q(z){b.value=z}function A(z){b.value===z&&(b.value=-1)}o.watch(k,(z,C)=>void o.nextTick(()=>M.value=C)),o.watch(w,()=>{if(e.marks){if(E.value)return;E.value=!0,o.nextTick(()=>{E.value=!1})}o.nextTick(X)}),o.onBeforeUnmount(()=>{Le()});const ne=o.computed(()=>{const{self:{markFontSize:z,railColor:C,railColorHover:B,fillColor:oe,fillColorHover:xe,handleColor:ze,opacityDisabled:Ne,dotColor:Ae,dotColorModal:_e,handleBoxShadow:qe,handleBoxShadowHover:st,handleBoxShadowActive:Je,handleBoxShadowFocus:it,dotBorder:x,dotBoxShadow:L,railHeight:J,railWidthVertical:ae,handleSize:se,dotHeight:fe,dotWidth:he,dotBorderRadius:ge,fontSize:Te,dotBorderActive:ut,dotColorPopover:Yt},common:{cubicBezierEaseInOut:wn}}=i.value;return{"--n-bezier":wn,"--n-dot-border":x,"--n-dot-border-active":ut,"--n-dot-border-radius":ge,"--n-dot-box-shadow":L,"--n-dot-color":Ae,"--n-dot-color-modal":_e,"--n-dot-color-popover":Yt,"--n-dot-height":fe,"--n-dot-width":he,"--n-fill-color":oe,"--n-fill-color-hover":xe,"--n-font-size":Te,"--n-handle-box-shadow":qe,"--n-handle-box-shadow-active":Je,"--n-handle-box-shadow-focus":it,"--n-handle-box-shadow-hover":st,"--n-handle-color":ze,"--n-handle-size":se,"--n-opacity-disabled":Ne,"--n-rail-color":C,"--n-rail-color-hover":B,"--n-rail-height":J,"--n-rail-width-vertical":ae,"--n-mark-font-size":z}}),_=r?et("slider",void 0,ne,e):void 0,F=o.computed(()=>{const{self:{fontSize:z,indicatorColor:C,indicatorBoxShadow:B,indicatorTextColor:oe,indicatorBorderRadius:xe}}=i.value;return{"--n-font-size":z,"--n-indicator-border-radius":xe,"--n-indicator-box-shadow":B,"--n-indicator-color":C,"--n-indicator-text-color":oe}}),K=r?et("slider-indicator",void 0,F,e):void 0;return{mergedClsPrefix:t,namespace:n,uncontrolledValue:h,mergedValue:w,mergedDisabled:p,mergedPlacement:H,isMounted:Bn(),adjustedTo:rt(e),dotTransitionDisabled:E,markInfos:V,isShowTooltip:Q,shouldKeepTooltipTransition:N,handleRailRef:a,setHandleRefs:s,setFollowerRefs:c,fillStyle:O,getHandleStyle:j,activeIndex:k,arrifiedValues:g,followerEnabledIndexSet:f,handleRailMouseDown:Me,handleHandleFocus:Ue,handleHandleBlur:ke,handleHandleMouseEnter:q,handleHandleMouseLeave:A,handleRailKeyDown:Ce,indicatorCssVars:r?void 0:F,indicatorThemeClass:K==null?void 0:K.themeClass,indicatorOnRender:K==null?void 0:K.onRender,cssVars:r?void 0:ne,themeClass:_==null?void 0:_.themeClass,onRender:_==null?void 0:_.onRender}},render(){var e;const{mergedClsPrefix:t,themeClass:n,formatTooltip:r}=this;return(e=this.onRender)===null||e===void 0||e.call(this),o.h("div",{class:[`${t}-slider`,n,{[`${t}-slider--disabled`]:this.mergedDisabled,[`${t}-slider--active`]:this.activeIndex!==-1,[`${t}-slider--with-mark`]:this.marks,[`${t}-slider--vertical`]:this.vertical,[`${t}-slider--reverse`]:this.reverse}],style:this.cssVars,onKeydown:this.handleRailKeyDown,onMousedown:this.handleRailMouseDown,onTouchstart:this.handleRailMouseDown},o.h("div",{class:`${t}-slider-rail`},o.h("div",{class:`${t}-slider-rail__fill`,style:this.fillStyle}),this.marks?o.h("div",{class:[`${t}-slider-dots`,this.dotTransitionDisabled&&`${t}-slider-dots--transition-disabled`]},this.markInfos.map(i=>o.h("div",{key:i.label,class:[`${t}-slider-dot`,{[`${t}-slider-dot--active`]:i.active}],style:i.style}))):null,o.h("div",{ref:"handleRailRef",class:`${t}-slider-handles`},this.arrifiedValues.map((i,a)=>{const l=this.isShowTooltip(a);return o.h(Po,null,{default:()=>[o.h(Ro,null,{default:()=>o.h("div",{ref:this.setHandleRefs(a),class:`${t}-slider-handle-wrapper`,tabindex:this.mergedDisabled?-1:0,role:"slider","aria-valuenow":i,"aria-valuemin":this.min,"aria-valuemax":this.max,"aria-orientation":this.vertical?"vertical":"horizontal","aria-disabled":this.disabled,style:this.getHandleStyle(i,a),onFocus:()=>{this.handleHandleFocus(a)},onBlur:()=>{this.handleHandleBlur(a)},onMouseenter:()=>{this.handleHandleMouseEnter(a)},onMouseleave:()=>{this.handleHandleMouseLeave(a)}},mt(this.$slots.thumb,()=>[o.h("div",{class:`${t}-slider-handle`})]))}),this.tooltip&&o.h(Eo,{ref:this.setFollowerRefs(a),show:l,to:this.adjustedTo,enabled:this.showTooltip&&!this.range||this.followerEnabledIndexSet.has(a),teleportDisabled:this.adjustedTo===rt.tdkey,placement:this.mergedPlacement,containerClass:this.namespace},{default:()=>o.h(o.Transition,{name:"fade-in-scale-up-transition",appear:this.isMounted,css:this.shouldKeepTooltipTransition(a),onEnter:()=>{this.followerEnabledIndexSet.add(a)},onAfterLeave:()=>{this.followerEnabledIndexSet.delete(a)}},{default:()=>{var s;return l?((s=this.indicatorOnRender)===null||s===void 0||s.call(this),o.h("div",{class:[`${t}-slider-handle-indicator`,this.indicatorThemeClass,`${t}-slider-handle-indicator--${this.mergedPlacement}`],style:this.indicatorCssVars},typeof r=="function"?r(i):i)):null}})})]})})),this.marks?o.h("div",{class:`${t}-slider-marks`},this.markInfos.map(i=>o.h("div",{key:i.label,class:`${t}-slider-mark`,style:i.style},i.label))):null))}}),z0=y("switch",`
|
|
1520
|
+
`),lr()]),Pd(y("slider",[y("slider-dot","background-color: var(--n-dot-color-modal);")])),Rd(y("slider",[y("slider-dot","background-color: var(--n-dot-color-popover);")]))]),h0=0,p0=Object.assign(Object.assign({},Ce.props),{to:ot.propTo,defaultValue:{type:[Number,Array],default:0},marks:Object,disabled:{type:Boolean,default:void 0},formatTooltip:Function,keyboard:{type:Boolean,default:!0},min:{type:Number,default:0},max:{type:Number,default:100},step:{type:[Number,String],default:1},range:Boolean,value:[Number,Array],placement:String,showTooltip:{type:Boolean,default:void 0},tooltip:{type:Boolean,default:!0},vertical:Boolean,reverse:Boolean,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onDragstart:[Function],onDragend:[Function]}),b0=r.defineComponent({name:"Slider",props:p0,setup(e){const{mergedClsPrefixRef:t,namespaceRef:n,inlineThemeDisabled:o}=Je(e),i=Ce("Slider","-slider",f0,e0,e,t),a=r.ref(null),[l,s]=ks(),[d,c]=ks(),f=r.ref(new Set),u=dn(e),{mergedDisabledRef:b}=u,m=r.computed(()=>{const{step:T}=e;if(Number(T)<=0||T==="mark")return 0;const C=T.toString();let _=0;return C.includes(".")&&(_=C.length-C.indexOf(".")-1),_}),h=r.ref(e.defaultValue),x=r.toRef(e,"value"),w=St(x,h),g=r.computed(()=>{const{value:T}=w;return(e.range?T:[T]).map(U)}),P=r.computed(()=>g.value.length>2),L=r.computed(()=>e.placement===void 0?e.vertical?"right":"top":e.placement),$=r.computed(()=>{const{marks:T}=e;return T?Object.keys(T).map(Number.parseFloat):null}),k=r.ref(-1),M=r.ref(-1),p=r.ref(-1),S=r.ref(!1),B=r.ref(!1),F=r.computed(()=>{const{vertical:T,reverse:C}=e;return T?C?"top":"bottom":C?"right":"left"}),I=r.computed(()=>{if(P.value)return;const T=g.value,C=te(e.range?Math.min(...T):e.min),_=te(e.range?Math.max(...T):T[0]),{value:re}=F;return e.vertical?{[re]:`${C}%`,height:`${_-C}%`}:{[re]:`${C}%`,width:`${_-C}%`}}),D=r.computed(()=>{const T=[],{marks:C}=e;if(C){const _=g.value.slice();_.sort((Oe,Ee)=>Oe-Ee);const{value:re}=F,{value:xe}=P,{range:Te}=e,Ne=xe?()=>!1:Oe=>Te?Oe>=_[0]&&Oe<=_[_.length-1]:Oe<=_[0];for(const Oe of Object.keys(C)){const Ee=Number(Oe);T.push({active:Ne(Ee),label:C[Oe],style:{[re]:`${te(Ee)}%`}})}}return T});function j(T,C){const _=te(T),{value:re}=F;return{[re]:`${_}%`,zIndex:C===k.value?1:0}}function Q(T){return e.showTooltip||p.value===T||k.value===T&&S.value}function N(T){return S.value?!(k.value===T&&M.value===T):!0}function Z(T){var C;~T&&(k.value=T,(C=l.get(T))===null||C===void 0||C.focus())}function q(){d.forEach((T,C)=>{Q(C)&&T.syncPosition()})}function Y(T){const{"onUpdate:value":C,onUpdateValue:_}=e,{nTriggerFormInput:re,nTriggerFormChange:xe}=u;_&&he(_,T),C&&he(C,T),h.value=T,re(),xe()}function de(T){const{range:C}=e;if(C){if(Array.isArray(T)){const{value:_}=g;T.join()!==_.join()&&Y(T)}}else Array.isArray(T)||g.value[0]!==T&&Y(T)}function ie(T,C){if(e.range){const _=g.value.slice();_.splice(C,1,T),de(_)}else de(T)}function ce(T,C,_){const re=_!==void 0;_||(_=T-C>0?1:-1);const xe=$.value||[],{step:Te}=e;if(Te==="mark"){const Ee=oe(T,xe.concat(C),re?_:void 0);return Ee?Ee.value:C}if(Te<=0)return C;const{value:Ne}=m;let Oe;if(re){const Ee=Number((C/Te).toFixed(Ne)),Ke=Math.floor(Ee),lt=Ee>Ke?Ke:Ke-1,Ye=Ee<Ke?Ke:Ke+1;Oe=oe(C,[Number((lt*Te).toFixed(Ne)),Number((Ye*Te).toFixed(Ne)),...xe],_)}else{const Ee=ye(T);Oe=oe(T,[...xe,Ee])}return Oe?U(Oe.value):C}function U(T){return Math.min(e.max,Math.max(e.min,T))}function te(T){const{max:C,min:_}=e;return(T-_)/(C-_)*100}function ve(T){const{max:C,min:_}=e;return _+(C-_)*T}function ye(T){const{step:C,min:_}=e;if(Number(C)<=0||C==="mark")return T;const re=Math.round((T-_)/C)*C+_;return Number(re.toFixed(m.value))}function oe(T,C=$.value,_){if(!(C!=null&&C.length))return null;let re=null,xe=-1;for(;++xe<C.length;){const Te=C[xe]-T,Ne=Math.abs(Te);(_===void 0||Te*_>0)&&(re===null||Ne<re.distance)&&(re={index:xe,distance:Ne,value:C[xe]})}return re}function Se(T){const C=a.value;if(!C)return;const _=$s(T)?T.touches[0]:T,re=C.getBoundingClientRect();let xe;return e.vertical?xe=(re.bottom-_.clientY)/re.height:xe=(_.clientX-re.left)/re.width,e.reverse&&(xe=1-xe),ve(xe)}function we(T){if(b.value||!e.keyboard)return;const{vertical:C,reverse:_}=e;switch(T.key){case"ArrowUp":T.preventDefault(),le(C&&_?-1:1);break;case"ArrowRight":T.preventDefault(),le(!C&&_?-1:1);break;case"ArrowDown":T.preventDefault(),le(C&&_?1:-1);break;case"ArrowLeft":T.preventDefault(),le(!C&&_?1:-1);break}}function le(T){const C=k.value;if(C===-1)return;const{step:_}=e,re=g.value[C],xe=Number(_)<=0||_==="mark"?re:re+_*T;ie(ce(xe,re,T>0?1:-1),C)}function Me(T){var C,_;if(b.value||!$s(T)&&T.button!==h0)return;const re=Se(T);if(re===void 0)return;const xe=g.value.slice(),Te=e.range?(_=(C=oe(re,xe))===null||C===void 0?void 0:C.index)!==null&&_!==void 0?_:-1:0;Te!==-1&&(T.preventDefault(),Z(Te),Re(),ie(ce(re,g.value[Te]),Te))}function Re(){S.value||(S.value=!0,e.onDragstart&&he(e.onDragstart),Pe("touchend",document,De),Pe("mouseup",document,De),Pe("touchmove",document,Ie),Pe("mousemove",document,Ie))}function He(){S.value&&(S.value=!1,e.onDragend&&he(e.onDragend),$e("touchend",document,De),$e("mouseup",document,De),$e("touchmove",document,Ie),$e("mousemove",document,Ie))}function Ie(T){const{value:C}=k;if(!S.value||C===-1){He();return}const _=Se(T);_!==void 0&&ie(ce(_,g.value[C]),C)}function De(){He()}function Ue(T){k.value=T,b.value||(p.value=T)}function ke(T){k.value===T&&(k.value=-1,He()),p.value===T&&(p.value=-1)}function X(T){p.value=T}function O(T){p.value===T&&(p.value=-1)}r.watch(k,(T,C)=>void r.nextTick(()=>M.value=C)),r.watch(w,()=>{if(e.marks){if(B.value)return;B.value=!0,r.nextTick(()=>{B.value=!1})}r.nextTick(q)}),r.onBeforeUnmount(()=>{He()});const ne=r.computed(()=>{const{self:{markFontSize:T,railColor:C,railColorHover:_,fillColor:re,fillColorHover:xe,handleColor:Te,opacityDisabled:Ne,dotColor:Oe,dotColorModal:Ee,handleBoxShadow:Ke,handleBoxShadowHover:lt,handleBoxShadowActive:Ye,handleBoxShadowFocus:it,dotBorder:v,dotBoxShadow:H,railHeight:J,railWidthVertical:ae,handleSize:se,dotHeight:ue,dotWidth:fe,dotBorderRadius:ge,fontSize:ze,dotBorderActive:ct,dotColorPopover:qt},common:{cubicBezierEaseInOut:yn}}=i.value;return{"--n-bezier":yn,"--n-dot-border":v,"--n-dot-border-active":ct,"--n-dot-border-radius":ge,"--n-dot-box-shadow":H,"--n-dot-color":Oe,"--n-dot-color-modal":Ee,"--n-dot-color-popover":qt,"--n-dot-height":ue,"--n-dot-width":fe,"--n-fill-color":re,"--n-fill-color-hover":xe,"--n-font-size":ze,"--n-handle-box-shadow":Ke,"--n-handle-box-shadow-active":Ye,"--n-handle-box-shadow-focus":it,"--n-handle-box-shadow-hover":lt,"--n-handle-color":Te,"--n-handle-size":se,"--n-opacity-disabled":Ne,"--n-rail-color":C,"--n-rail-color-hover":_,"--n-rail-height":J,"--n-rail-width-vertical":ae,"--n-mark-font-size":T}}),E=o?tt("slider",void 0,ne,e):void 0,A=r.computed(()=>{const{self:{fontSize:T,indicatorColor:C,indicatorBoxShadow:_,indicatorTextColor:re,indicatorBorderRadius:xe}}=i.value;return{"--n-font-size":T,"--n-indicator-border-radius":xe,"--n-indicator-box-shadow":_,"--n-indicator-color":C,"--n-indicator-text-color":re}}),K=o?tt("slider-indicator",void 0,A,e):void 0;return{mergedClsPrefix:t,namespace:n,uncontrolledValue:h,mergedValue:w,mergedDisabled:b,mergedPlacement:L,isMounted:Rn(),adjustedTo:ot(e),dotTransitionDisabled:B,markInfos:D,isShowTooltip:Q,shouldKeepTooltipTransition:N,handleRailRef:a,setHandleRefs:s,setFollowerRefs:c,fillStyle:I,getHandleStyle:j,activeIndex:k,arrifiedValues:g,followerEnabledIndexSet:f,handleRailMouseDown:Me,handleHandleFocus:Ue,handleHandleBlur:ke,handleHandleMouseEnter:X,handleHandleMouseLeave:O,handleRailKeyDown:we,indicatorCssVars:o?void 0:A,indicatorThemeClass:K==null?void 0:K.themeClass,indicatorOnRender:K==null?void 0:K.onRender,cssVars:o?void 0:ne,themeClass:E==null?void 0:E.themeClass,onRender:E==null?void 0:E.onRender}},render(){var e;const{mergedClsPrefix:t,themeClass:n,formatTooltip:o}=this;return(e=this.onRender)===null||e===void 0||e.call(this),r.h("div",{class:[`${t}-slider`,n,{[`${t}-slider--disabled`]:this.mergedDisabled,[`${t}-slider--active`]:this.activeIndex!==-1,[`${t}-slider--with-mark`]:this.marks,[`${t}-slider--vertical`]:this.vertical,[`${t}-slider--reverse`]:this.reverse}],style:this.cssVars,onKeydown:this.handleRailKeyDown,onMousedown:this.handleRailMouseDown,onTouchstart:this.handleRailMouseDown},r.h("div",{class:`${t}-slider-rail`},r.h("div",{class:`${t}-slider-rail__fill`,style:this.fillStyle}),this.marks?r.h("div",{class:[`${t}-slider-dots`,this.dotTransitionDisabled&&`${t}-slider-dots--transition-disabled`]},this.markInfos.map(i=>r.h("div",{key:i.label,class:[`${t}-slider-dot`,{[`${t}-slider-dot--active`]:i.active}],style:i.style}))):null,r.h("div",{ref:"handleRailRef",class:`${t}-slider-handles`},this.arrifiedValues.map((i,a)=>{const l=this.isShowTooltip(a);return r.h(Pr,null,{default:()=>[r.h(Rr,null,{default:()=>r.h("div",{ref:this.setHandleRefs(a),class:`${t}-slider-handle-wrapper`,tabindex:this.mergedDisabled?-1:0,role:"slider","aria-valuenow":i,"aria-valuemin":this.min,"aria-valuemax":this.max,"aria-orientation":this.vertical?"vertical":"horizontal","aria-disabled":this.disabled,style:this.getHandleStyle(i,a),onFocus:()=>{this.handleHandleFocus(a)},onBlur:()=>{this.handleHandleBlur(a)},onMouseenter:()=>{this.handleHandleMouseEnter(a)},onMouseleave:()=>{this.handleHandleMouseLeave(a)}},Ct(this.$slots.thumb,()=>[r.h("div",{class:`${t}-slider-handle`})]))}),this.tooltip&&r.h(Br,{ref:this.setFollowerRefs(a),show:l,to:this.adjustedTo,enabled:this.showTooltip&&!this.range||this.followerEnabledIndexSet.has(a),teleportDisabled:this.adjustedTo===ot.tdkey,placement:this.mergedPlacement,containerClass:this.namespace},{default:()=>r.h(r.Transition,{name:"fade-in-scale-up-transition",appear:this.isMounted,css:this.shouldKeepTooltipTransition(a),onEnter:()=>{this.followerEnabledIndexSet.add(a)},onAfterLeave:()=>{this.followerEnabledIndexSet.delete(a)}},{default:()=>{var s;return l?((s=this.indicatorOnRender)===null||s===void 0||s.call(this),r.h("div",{class:[`${t}-slider-handle-indicator`,this.indicatorThemeClass,`${t}-slider-handle-indicator--${this.mergedPlacement}`],style:this.indicatorCssVars},typeof o=="function"?o(i):i)):null}})})]})})),this.marks?r.h("div",{class:`${t}-slider-marks`},this.markInfos.map(i=>r.h("div",{key:i.label,class:`${t}-slider-mark`,style:i.style},i.label))):null))}}),g0=y("switch",`
|
|
1630
1521
|
height: var(--n-height);
|
|
1631
1522
|
min-width: var(--n-width);
|
|
1632
1523
|
vertical-align: middle;
|
|
@@ -1636,17 +1527,17 @@ ${t}
|
|
|
1636
1527
|
outline: none;
|
|
1637
1528
|
justify-content: center;
|
|
1638
1529
|
align-items: center;
|
|
1639
|
-
`,[
|
|
1530
|
+
`,[R("children-placeholder",`
|
|
1640
1531
|
height: var(--n-rail-height);
|
|
1641
1532
|
display: flex;
|
|
1642
1533
|
flex-direction: column;
|
|
1643
1534
|
overflow: hidden;
|
|
1644
1535
|
pointer-events: none;
|
|
1645
1536
|
visibility: hidden;
|
|
1646
|
-
`),
|
|
1537
|
+
`),R("rail-placeholder",`
|
|
1647
1538
|
display: flex;
|
|
1648
1539
|
flex-wrap: none;
|
|
1649
|
-
`),
|
|
1540
|
+
`),R("button-placeholder",`
|
|
1650
1541
|
width: calc(1.75 * var(--n-rail-height));
|
|
1651
1542
|
height: var(--n-rail-height);
|
|
1652
1543
|
`),y("base-loading",`
|
|
@@ -1657,7 +1548,7 @@ ${t}
|
|
|
1657
1548
|
font-size: calc(var(--n-button-width) - 4px);
|
|
1658
1549
|
color: var(--n-loading-color);
|
|
1659
1550
|
transition: color .3s var(--n-bezier);
|
|
1660
|
-
`,[
|
|
1551
|
+
`,[An({left:"50%",top:"50%",originalTransform:"translateX(-50%) translateY(-50%)"})]),R("checked, unchecked",`
|
|
1661
1552
|
transition: color .3s var(--n-bezier);
|
|
1662
1553
|
color: var(--n-text-color);
|
|
1663
1554
|
box-sizing: border-box;
|
|
@@ -1668,16 +1559,16 @@ ${t}
|
|
|
1668
1559
|
display: flex;
|
|
1669
1560
|
align-items: center;
|
|
1670
1561
|
line-height: 1;
|
|
1671
|
-
`),
|
|
1562
|
+
`),R("checked",`
|
|
1672
1563
|
right: 0;
|
|
1673
1564
|
padding-right: calc(1.25 * var(--n-rail-height) - var(--n-offset));
|
|
1674
|
-
`),
|
|
1565
|
+
`),R("unchecked",`
|
|
1675
1566
|
left: 0;
|
|
1676
1567
|
justify-content: flex-end;
|
|
1677
1568
|
padding-left: calc(1.25 * var(--n-rail-height) - var(--n-offset));
|
|
1678
|
-
`),
|
|
1569
|
+
`),V("&:focus",[R("rail",`
|
|
1679
1570
|
box-shadow: var(--n-box-shadow-focus);
|
|
1680
|
-
`)]),W("round",[
|
|
1571
|
+
`)]),W("round",[R("rail","border-radius: calc(var(--n-rail-height) / 2);",[R("button","border-radius: calc(var(--n-button-height) / 2);")])]),je("disabled",[je("icon",[W("rubber-band",[W("pressed",[R("rail",[R("button","max-width: var(--n-button-width-pressed);")])]),R("rail",[V("&:active",[R("button","max-width: var(--n-button-width-pressed);")])]),W("active",[W("pressed",[R("rail",[R("button","left: calc(100% - var(--n-offset) - var(--n-button-width-pressed));")])]),R("rail",[V("&:active",[R("button","left: calc(100% - var(--n-offset) - var(--n-button-width-pressed));")])])])])])]),W("active",[R("rail",[R("button","left: calc(100% - var(--n-button-width) - var(--n-offset))")])]),R("rail",`
|
|
1681
1572
|
overflow: hidden;
|
|
1682
1573
|
height: var(--n-rail-height);
|
|
1683
1574
|
min-width: var(--n-rail-width);
|
|
@@ -1689,7 +1580,7 @@ ${t}
|
|
|
1689
1580
|
background .3s var(--n-bezier),
|
|
1690
1581
|
box-shadow .3s var(--n-bezier);
|
|
1691
1582
|
background-color: var(--n-rail-color);
|
|
1692
|
-
`,[
|
|
1583
|
+
`,[R("button-icon",`
|
|
1693
1584
|
color: var(--n-icon-color);
|
|
1694
1585
|
transition: color .3s var(--n-bezier);
|
|
1695
1586
|
font-size: calc(var(--n-button-height) - 4px);
|
|
@@ -1702,7 +1593,7 @@ ${t}
|
|
|
1702
1593
|
justify-content: center;
|
|
1703
1594
|
align-items: center;
|
|
1704
1595
|
line-height: 1;
|
|
1705
|
-
`,[
|
|
1596
|
+
`,[An()]),R("button",`
|
|
1706
1597
|
align-items: center;
|
|
1707
1598
|
top: var(--n-offset);
|
|
1708
1599
|
left: var(--n-offset);
|
|
@@ -1722,12 +1613,12 @@ ${t}
|
|
|
1722
1613
|
opacity .3s var(--n-bezier),
|
|
1723
1614
|
max-width .3s var(--n-bezier),
|
|
1724
1615
|
box-shadow .3s var(--n-bezier);
|
|
1725
|
-
`)]),W("active",[
|
|
1616
|
+
`)]),W("active",[R("rail","background-color: var(--n-rail-color-active);")]),W("loading",[R("rail",`
|
|
1726
1617
|
cursor: wait;
|
|
1727
|
-
`)]),W("disabled",[
|
|
1618
|
+
`)]),W("disabled",[R("rail",`
|
|
1728
1619
|
cursor: not-allowed;
|
|
1729
1620
|
opacity: .5;
|
|
1730
|
-
`)])]),
|
|
1621
|
+
`)])]),m0=Object.assign(Object.assign({},Ce.props),{size:{type:String,default:"medium"},value:{type:[String,Number,Boolean],default:void 0},loading:Boolean,defaultValue:{type:[String,Number,Boolean],default:!1},disabled:{type:Boolean,default:void 0},round:{type:Boolean,default:!0},"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],checkedValue:{type:[String,Number,Boolean],default:!0},uncheckedValue:{type:[String,Number,Boolean],default:!1},railStyle:Function,rubberBand:{type:Boolean,default:!0},onChange:[Function,Array]});let ur;const Ts=r.defineComponent({name:"Switch",props:m0,setup(e){process.env.NODE_ENV!=="production"&&r.watchEffect(()=>{e.onChange&&Qe("switch","`on-change` is deprecated, please use `on-update:value` instead.")}),ur===void 0&&(typeof CSS<"u"?typeof CSS.supports<"u"?ur=CSS.supports("width","max(1px)"):ur=!1:ur=!0);const{mergedClsPrefixRef:t,inlineThemeDisabled:n}=Je(e),o=Ce("Switch","-switch",g0,r0,e,t),i=dn(e),{mergedSizeRef:a,mergedDisabledRef:l}=i,s=r.ref(e.defaultValue),d=r.toRef(e,"value"),c=St(d,s),f=r.computed(()=>c.value===e.checkedValue),u=r.ref(!1),b=r.ref(!1),m=r.computed(()=>{const{railStyle:S}=e;if(S)return S({focused:b.value,checked:f.value})});function h(S){const{"onUpdate:value":B,onChange:F,onUpdateValue:I}=e,{nTriggerFormInput:D,nTriggerFormChange:j}=i;B&&he(B,S),I&&he(I,S),F&&he(F,S),s.value=S,D(),j()}function x(){const{nTriggerFormFocus:S}=i;S()}function w(){const{nTriggerFormBlur:S}=i;S()}function g(){e.loading||l.value||(c.value!==e.checkedValue?h(e.checkedValue):h(e.uncheckedValue))}function P(){b.value=!0,x()}function L(){b.value=!1,w(),u.value=!1}function $(S){e.loading||l.value||S.key===" "&&(c.value!==e.checkedValue?h(e.checkedValue):h(e.uncheckedValue),u.value=!1)}function k(S){e.loading||l.value||S.key===" "&&(S.preventDefault(),u.value=!0)}const M=r.computed(()=>{const{value:S}=a,{self:{opacityDisabled:B,railColor:F,railColorActive:I,buttonBoxShadow:D,buttonColor:j,boxShadowFocus:Q,loadingColor:N,textColor:Z,iconColor:q,[ee("buttonHeight",S)]:Y,[ee("buttonWidth",S)]:de,[ee("buttonWidthPressed",S)]:ie,[ee("railHeight",S)]:ce,[ee("railWidth",S)]:U,[ee("railBorderRadius",S)]:te,[ee("buttonBorderRadius",S)]:ve},common:{cubicBezierEaseInOut:ye}}=o.value;let oe,Se,we;return ur?(oe=`calc((${ce} - ${Y}) / 2)`,Se=`max(${ce}, ${Y})`,we=`max(${U}, calc(${U} + ${Y} - ${ce}))`):(oe=en((rt(ce)-rt(Y))/2),Se=en(Math.max(rt(ce),rt(Y))),we=rt(ce)>rt(Y)?U:en(rt(U)+rt(Y)-rt(ce))),{"--n-bezier":ye,"--n-button-border-radius":ve,"--n-button-box-shadow":D,"--n-button-color":j,"--n-button-width":de,"--n-button-width-pressed":ie,"--n-button-height":Y,"--n-height":Se,"--n-offset":oe,"--n-opacity-disabled":B,"--n-rail-border-radius":te,"--n-rail-color":F,"--n-rail-color-active":I,"--n-rail-height":ce,"--n-rail-width":U,"--n-width":we,"--n-box-shadow-focus":Q,"--n-loading-color":N,"--n-text-color":Z,"--n-icon-color":q}}),p=n?tt("switch",r.computed(()=>a.value[0]),M,e):void 0;return{handleClick:g,handleBlur:L,handleFocus:P,handleKeyup:$,handleKeydown:k,mergedRailStyle:m,pressed:u,mergedClsPrefix:t,mergedValue:c,checked:f,mergedDisabled:l,cssVars:n?void 0:M,themeClass:p==null?void 0:p.themeClass,onRender:p==null?void 0:p.onRender}},render(){const{mergedClsPrefix:e,mergedDisabled:t,checked:n,mergedRailStyle:o,onRender:i,$slots:a}=this;i==null||i();const{checked:l,unchecked:s,icon:d,"checked-icon":c,"unchecked-icon":f}=a,u=!(zn(d)&&zn(c)&&zn(f));return r.h("div",{role:"switch","aria-checked":n,class:[`${e}-switch`,this.themeClass,u&&`${e}-switch--icon`,n&&`${e}-switch--active`,t&&`${e}-switch--disabled`,this.round&&`${e}-switch--round`,this.loading&&`${e}-switch--loading`,this.pressed&&`${e}-switch--pressed`,this.rubberBand&&`${e}-switch--rubber-band`],tabindex:this.mergedDisabled?void 0:0,style:this.cssVars,onClick:this.handleClick,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeyup:this.handleKeyup,onKeydown:this.handleKeydown},r.h("div",{class:`${e}-switch__rail`,"aria-hidden":"true",style:o},Ae(l,b=>Ae(s,m=>b||m?r.h("div",{"aria-hidden":!0,class:`${e}-switch__children-placeholder`},r.h("div",{class:`${e}-switch__rail-placeholder`},r.h("div",{class:`${e}-switch__button-placeholder`}),b),r.h("div",{class:`${e}-switch__rail-placeholder`},r.h("div",{class:`${e}-switch__button-placeholder`}),m)):null)),r.h("div",{class:`${e}-switch__button`},Ae(d,b=>Ae(c,m=>Ae(f,h=>r.h(Yr,null,{default:()=>this.loading?r.h(Zr,{key:"loading",clsPrefix:e,strokeWidth:20}):this.checked&&(m||b)?r.h("div",{class:`${e}-switch__button-icon`,key:m?"checked-icon":"icon"},m||b):!this.checked&&(h||b)?r.h("div",{class:`${e}-switch__button-icon`,key:h?"unchecked-icon":"icon"},h||b):null})))),Ae(l,b=>b&&r.h("div",{key:"checked",class:`${e}-switch__checked`},b)),Ae(s,b=>b&&r.h("div",{key:"unchecked",class:`${e}-switch__unchecked`},b)))))}}),Ti="n-tabs",zs={tab:[String,Number,Object,Function],name:{type:[String,Number],required:!0},disabled:Boolean,displayDirective:{type:String,default:"if"},closable:{type:Boolean,default:void 0},tabProps:Object,label:[String,Number,Object,Function]},Ps=r.defineComponent({__TAB_PANE__:!0,name:"TabPane",alias:["TabPanel"],props:zs,setup(e){process.env.NODE_ENV!=="production"&&r.watchEffect(()=>{e.label!==void 0&&Qe("tab-pane","`label` is deprecated, please use `tab` instead.")});const t=r.inject(Ti,null);return t||xo("tab-pane","`n-tab-pane` must be placed inside `n-tabs`."),{style:t.paneStyleRef,class:t.paneClassRef,mergedClsPrefix:t.mergedClsPrefixRef}},render(){return r.h("div",{class:[`${this.mergedClsPrefix}-tab-pane`,this.class],style:this.style},this.$slots)}}),v0=Object.assign({internalLeftPadded:Boolean,internalAddable:Boolean,internalCreatedByPane:Boolean},od(zs,["displayDirective"])),zi=r.defineComponent({__TAB__:!0,inheritAttrs:!1,name:"Tab",props:v0,setup(e){const{mergedClsPrefixRef:t,valueRef:n,typeRef:o,closableRef:i,tabStyleRef:a,addTabStyleRef:l,tabClassRef:s,addTabClassRef:d,tabChangeIdRef:c,onBeforeLeaveRef:f,triggerRef:u,handleAdd:b,activateTab:m,handleClose:h}=r.inject(Ti);return{trigger:u,mergedClosable:r.computed(()=>{if(e.internalAddable)return!1;const{closable:x}=e;return x===void 0?i.value:x}),style:a,addStyle:l,tabClass:s,addTabClass:d,clsPrefix:t,value:n,type:o,handleClose(x){x.stopPropagation(),!e.disabled&&h(e.name)},activateTab(){if(e.disabled)return;if(e.internalAddable){b();return}const{name:x}=e,w=++c.id;if(x!==n.value){const{value:g}=f;g?Promise.resolve(g(e.name,n.value)).then(P=>{P&&c.id===w&&m(x)}):m(x)}}}},render(){const{internalAddable:e,clsPrefix:t,name:n,disabled:o,label:i,tab:a,value:l,mergedClosable:s,trigger:d,$slots:{default:c}}=this,f=i??a;return r.h("div",{class:`${t}-tabs-tab-wrapper`},this.internalLeftPadded?r.h("div",{class:`${t}-tabs-tab-pad`}):null,r.h("div",Object.assign({key:n,"data-name":n,"data-disabled":o?!0:void 0},r.mergeProps({class:[`${t}-tabs-tab`,l===n&&`${t}-tabs-tab--active`,o&&`${t}-tabs-tab--disabled`,s&&`${t}-tabs-tab--closable`,e&&`${t}-tabs-tab--addable`,e?this.addTabClass:this.tabClass],onClick:d==="click"?this.activateTab:void 0,onMouseenter:d==="hover"?this.activateTab:void 0,style:e?this.addStyle:this.style},this.internalCreatedByPane?this.tabProps||{}:this.$attrs)),r.h("span",{class:`${t}-tabs-tab__label`},e?r.h(r.Fragment,null,r.h("div",{class:`${t}-tabs-tab__height-placeholder`}," "),r.h(gt,{clsPrefix:t},{default:()=>r.h(Kl,null)})):c?c():typeof f=="object"?f:an(f??n)),s&&this.type==="card"?r.h(li,{clsPrefix:t,class:`${t}-tabs-tab__close`,onClick:this.handleClose,disabled:o}):null))}}),x0=y("tabs",`
|
|
1731
1622
|
box-sizing: border-box;
|
|
1732
1623
|
width: 100%;
|
|
1733
1624
|
display: flex;
|
|
@@ -1735,7 +1626,7 @@ ${t}
|
|
|
1735
1626
|
transition:
|
|
1736
1627
|
background-color .3s var(--n-bezier),
|
|
1737
1628
|
border-color .3s var(--n-bezier);
|
|
1738
|
-
`,[W("segment-type",[y("tabs-rail",[
|
|
1629
|
+
`,[W("segment-type",[y("tabs-rail",[V("&.transition-disabled",[y("tabs-capsule",`
|
|
1739
1630
|
transition: none;
|
|
1740
1631
|
`)])])]),W("top",[y("tab-pane",`
|
|
1741
1632
|
padding: var(--n-pane-padding-top) var(--n-pane-padding-right) var(--n-pane-padding-bottom) var(--n-pane-padding-left);
|
|
@@ -1797,7 +1688,7 @@ ${t}
|
|
|
1797
1688
|
`,[W("active",`
|
|
1798
1689
|
font-weight: var(--n-font-weight-strong);
|
|
1799
1690
|
color: var(--n-tab-text-color-active);
|
|
1800
|
-
`),
|
|
1691
|
+
`),V("&:hover",`
|
|
1801
1692
|
color: var(--n-tab-text-color-hover);
|
|
1802
1693
|
`)])])]),W("flex",[y("tabs-nav",`
|
|
1803
1694
|
width: 100%;
|
|
@@ -1811,38 +1702,38 @@ ${t}
|
|
|
1811
1702
|
line-height: 1.5;
|
|
1812
1703
|
display: flex;
|
|
1813
1704
|
transition: border-color .3s var(--n-bezier);
|
|
1814
|
-
`,[
|
|
1705
|
+
`,[R("prefix, suffix",`
|
|
1815
1706
|
display: flex;
|
|
1816
1707
|
align-items: center;
|
|
1817
|
-
`),
|
|
1708
|
+
`),R("prefix","padding-right: 16px;"),R("suffix","padding-left: 16px;")]),W("top, bottom",[y("tabs-nav-scroll-wrapper",[V("&::before",`
|
|
1818
1709
|
top: 0;
|
|
1819
1710
|
bottom: 0;
|
|
1820
1711
|
left: 0;
|
|
1821
1712
|
width: 20px;
|
|
1822
|
-
`),
|
|
1713
|
+
`),V("&::after",`
|
|
1823
1714
|
top: 0;
|
|
1824
1715
|
bottom: 0;
|
|
1825
1716
|
right: 0;
|
|
1826
1717
|
width: 20px;
|
|
1827
|
-
`),W("shadow-start",[
|
|
1718
|
+
`),W("shadow-start",[V("&::before",`
|
|
1828
1719
|
box-shadow: inset 10px 0 8px -8px rgba(0, 0, 0, .12);
|
|
1829
|
-
`)]),W("shadow-end",[
|
|
1720
|
+
`)]),W("shadow-end",[V("&::after",`
|
|
1830
1721
|
box-shadow: inset -10px 0 8px -8px rgba(0, 0, 0, .12);
|
|
1831
1722
|
`)])])]),W("left, right",[y("tabs-nav-scroll-content",`
|
|
1832
1723
|
flex-direction: column;
|
|
1833
|
-
`),y("tabs-nav-scroll-wrapper",[
|
|
1724
|
+
`),y("tabs-nav-scroll-wrapper",[V("&::before",`
|
|
1834
1725
|
top: 0;
|
|
1835
1726
|
left: 0;
|
|
1836
1727
|
right: 0;
|
|
1837
1728
|
height: 20px;
|
|
1838
|
-
`),
|
|
1729
|
+
`),V("&::after",`
|
|
1839
1730
|
bottom: 0;
|
|
1840
1731
|
left: 0;
|
|
1841
1732
|
right: 0;
|
|
1842
1733
|
height: 20px;
|
|
1843
|
-
`),W("shadow-start",[
|
|
1734
|
+
`),W("shadow-start",[V("&::before",`
|
|
1844
1735
|
box-shadow: inset 0 10px 8px -8px rgba(0, 0, 0, .12);
|
|
1845
|
-
`)]),W("shadow-end",[
|
|
1736
|
+
`)]),W("shadow-end",[V("&::after",`
|
|
1846
1737
|
box-shadow: inset 0 -10px 8px -8px rgba(0, 0, 0, .12);
|
|
1847
1738
|
`)])])]),y("tabs-nav-scroll-wrapper",`
|
|
1848
1739
|
flex: 1;
|
|
@@ -1853,10 +1744,10 @@ ${t}
|
|
|
1853
1744
|
width: 100%;
|
|
1854
1745
|
overflow-y: auto;
|
|
1855
1746
|
scrollbar-width: none;
|
|
1856
|
-
`,[
|
|
1747
|
+
`,[V("&::-webkit-scrollbar",`
|
|
1857
1748
|
width: 0;
|
|
1858
1749
|
height: 0;
|
|
1859
|
-
`)]),
|
|
1750
|
+
`)]),V("&::before, &::after",`
|
|
1860
1751
|
transition: box-shadow .3s var(--n-bezier);
|
|
1861
1752
|
pointer-events: none;
|
|
1862
1753
|
content: "";
|
|
@@ -1893,12 +1784,12 @@ ${t}
|
|
|
1893
1784
|
color .3s var(--n-bezier),
|
|
1894
1785
|
background-color .3s var(--n-bezier),
|
|
1895
1786
|
border-color .3s var(--n-bezier);
|
|
1896
|
-
`,[W("disabled",{cursor:"not-allowed"}),
|
|
1787
|
+
`,[W("disabled",{cursor:"not-allowed"}),R("close",`
|
|
1897
1788
|
margin-left: 6px;
|
|
1898
1789
|
transition:
|
|
1899
1790
|
background-color .3s var(--n-bezier),
|
|
1900
1791
|
color .3s var(--n-bezier);
|
|
1901
|
-
`),
|
|
1792
|
+
`),R("label",`
|
|
1902
1793
|
display: flex;
|
|
1903
1794
|
align-items: center;
|
|
1904
1795
|
z-index: 1;
|
|
@@ -1913,7 +1804,7 @@ ${t}
|
|
|
1913
1804
|
max-width .2s var(--n-bezier),
|
|
1914
1805
|
opacity .3s var(--n-bezier),
|
|
1915
1806
|
background-color .3s var(--n-bezier);
|
|
1916
|
-
`,[
|
|
1807
|
+
`,[V("&.transition-disabled",`
|
|
1917
1808
|
transition: none;
|
|
1918
1809
|
`),W("disabled",`
|
|
1919
1810
|
background-color: var(--n-tab-text-color-disabled)
|
|
@@ -1931,21 +1822,21 @@ ${t}
|
|
|
1931
1822
|
left: 0;
|
|
1932
1823
|
right: 0;
|
|
1933
1824
|
top: 0;
|
|
1934
|
-
`,[
|
|
1825
|
+
`,[V("&.next-transition-leave-active, &.prev-transition-leave-active, &.next-transition-enter-active, &.prev-transition-enter-active",`
|
|
1935
1826
|
transition:
|
|
1936
1827
|
color .3s var(--n-bezier),
|
|
1937
1828
|
background-color .3s var(--n-bezier),
|
|
1938
1829
|
transform .2s var(--n-bezier),
|
|
1939
1830
|
opacity .2s var(--n-bezier);
|
|
1940
|
-
`),
|
|
1831
|
+
`),V("&.next-transition-leave-active, &.prev-transition-leave-active",`
|
|
1941
1832
|
position: absolute;
|
|
1942
|
-
`),
|
|
1833
|
+
`),V("&.next-transition-enter-from, &.prev-transition-leave-to",`
|
|
1943
1834
|
transform: translateX(32px);
|
|
1944
1835
|
opacity: 0;
|
|
1945
|
-
`),
|
|
1836
|
+
`),V("&.next-transition-leave-to, &.prev-transition-enter-from",`
|
|
1946
1837
|
transform: translateX(-32px);
|
|
1947
1838
|
opacity: 0;
|
|
1948
|
-
`),
|
|
1839
|
+
`),V("&.next-transition-leave-from, &.next-transition-enter-to, &.prev-transition-leave-from, &.prev-transition-enter-to",`
|
|
1949
1840
|
transform: translateX(0);
|
|
1950
1841
|
opacity: 1;
|
|
1951
1842
|
`)]),y("tabs-tab-pad",`
|
|
@@ -1957,40 +1848,40 @@ ${t}
|
|
|
1957
1848
|
font-weight: var(--n-tab-font-weight);
|
|
1958
1849
|
box-sizing: border-box;
|
|
1959
1850
|
vertical-align: bottom;
|
|
1960
|
-
`,[
|
|
1851
|
+
`,[V("&:hover",{color:"var(--n-tab-text-color-hover)"}),W("active",`
|
|
1961
1852
|
color: var(--n-tab-text-color-active);
|
|
1962
1853
|
font-weight: var(--n-tab-font-weight-active);
|
|
1963
|
-
`),W("disabled",{color:"var(--n-tab-text-color-disabled)"})])]),y("tabs-nav",[W("line-type",[W("top",[
|
|
1854
|
+
`),W("disabled",{color:"var(--n-tab-text-color-disabled)"})])]),y("tabs-nav",[W("line-type",[W("top",[R("prefix, suffix",`
|
|
1964
1855
|
border-bottom: 1px solid var(--n-tab-border-color);
|
|
1965
1856
|
`),y("tabs-nav-scroll-content",`
|
|
1966
1857
|
border-bottom: 1px solid var(--n-tab-border-color);
|
|
1967
1858
|
`),y("tabs-bar",`
|
|
1968
1859
|
bottom: -1px;
|
|
1969
|
-
`)]),W("left",[
|
|
1860
|
+
`)]),W("left",[R("prefix, suffix",`
|
|
1970
1861
|
border-right: 1px solid var(--n-tab-border-color);
|
|
1971
1862
|
`),y("tabs-nav-scroll-content",`
|
|
1972
1863
|
border-right: 1px solid var(--n-tab-border-color);
|
|
1973
1864
|
`),y("tabs-bar",`
|
|
1974
1865
|
right: -1px;
|
|
1975
|
-
`)]),W("right",[
|
|
1866
|
+
`)]),W("right",[R("prefix, suffix",`
|
|
1976
1867
|
border-left: 1px solid var(--n-tab-border-color);
|
|
1977
1868
|
`),y("tabs-nav-scroll-content",`
|
|
1978
1869
|
border-left: 1px solid var(--n-tab-border-color);
|
|
1979
1870
|
`),y("tabs-bar",`
|
|
1980
1871
|
left: -1px;
|
|
1981
|
-
`)]),W("bottom",[
|
|
1872
|
+
`)]),W("bottom",[R("prefix, suffix",`
|
|
1982
1873
|
border-top: 1px solid var(--n-tab-border-color);
|
|
1983
1874
|
`),y("tabs-nav-scroll-content",`
|
|
1984
1875
|
border-top: 1px solid var(--n-tab-border-color);
|
|
1985
1876
|
`),y("tabs-bar",`
|
|
1986
1877
|
top: -1px;
|
|
1987
|
-
`)]),
|
|
1878
|
+
`)]),R("prefix, suffix",`
|
|
1988
1879
|
transition: border-color .3s var(--n-bezier);
|
|
1989
1880
|
`),y("tabs-nav-scroll-content",`
|
|
1990
1881
|
transition: border-color .3s var(--n-bezier);
|
|
1991
1882
|
`),y("tabs-bar",`
|
|
1992
1883
|
border-radius: 0;
|
|
1993
|
-
`)]),W("card-type",[
|
|
1884
|
+
`)]),W("card-type",[R("prefix, suffix",`
|
|
1994
1885
|
transition: border-color .3s var(--n-bezier);
|
|
1995
1886
|
border-bottom: 1px solid var(--n-tab-border-color);
|
|
1996
1887
|
`),y("tabs-pad",`
|
|
@@ -2013,10 +1904,10 @@ ${t}
|
|
|
2013
1904
|
padding-left: 8px;
|
|
2014
1905
|
padding-right: 8px;
|
|
2015
1906
|
font-size: 16px;
|
|
2016
|
-
`,[
|
|
1907
|
+
`,[R("height-placeholder",`
|
|
2017
1908
|
width: 0;
|
|
2018
1909
|
font-size: var(--n-tab-font-size);
|
|
2019
|
-
`),je("disabled",[
|
|
1910
|
+
`),je("disabled",[V("&:hover",`
|
|
2020
1911
|
color: var(--n-tab-text-color-hover);
|
|
2021
1912
|
`)])]),W("closable","padding-right: 8px;"),W("active",`
|
|
2022
1913
|
background-color: #0000;
|
|
@@ -2065,4 +1956,4 @@ ${t}
|
|
|
2065
1956
|
border-top: 1px solid var(--n-tab-border-color);
|
|
2066
1957
|
`),y("tabs-pad",`
|
|
2067
1958
|
border-top: 1px solid var(--n-tab-border-color);
|
|
2068
|
-
`)])])])]),B0=Object.assign(Object.assign({},ye.props),{value:[String,Number],defaultValue:[String,Number],trigger:{type:String,default:"click"},type:{type:String,default:"bar"},closable:Boolean,justifyContent:String,size:{type:String,default:"medium"},placement:{type:String,default:"top"},tabStyle:[String,Object],tabClass:String,addTabStyle:[String,Object],addTabClass:String,barWidth:Number,paneClass:String,paneStyle:[String,Object],paneWrapperClass:String,paneWrapperStyle:[String,Object],addable:[Boolean,Object],tabsPadding:{type:Number,default:0},animated:Boolean,onBeforeLeave:Function,onAdd:Function,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onClose:[Function,Array],labelSize:String,activeName:[String,Number],onActiveNameChange:[Function,Array]}),_0=o.defineComponent({name:"Tabs",props:B0,setup(e,{slots:t}){var n,r,i,a;process.env.NODE_ENV!=="production"&&o.watchEffect(()=>{e.labelSize!==void 0&&tt("tabs","`label-size` is deprecated, please use `size` instead."),e.activeName!==void 0&&tt("tabs","`active-name` is deprecated, please use `value` instead."),e.onActiveNameChange!==void 0&&tt("tabs","`on-active-name-change` is deprecated, please use `on-update:value` instead.")});const{mergedClsPrefixRef:l,inlineThemeDisabled:s}=Ke(e),d=ye("Tabs","-tabs",R0,l0,e,l),c=o.ref(null),f=o.ref(null),u=o.ref(null),p=o.ref(null),m=o.ref(null),h=o.ref(null),v=o.ref(!0),w=o.ref(!0),g=To(e,["labelSize","size"]),P=To(e,["activeName","value"]),H=o.ref((r=(n=P.value)!==null&&n!==void 0?n:e.defaultValue)!==null&&r!==void 0?r:t.default?(a=(i=Tn(t.default())[0])===null||i===void 0?void 0:i.props)===null||a===void 0?void 0:a.name:null),$=vt(P,H),k={id:0},M=o.computed(()=>{if(!(!e.justifyContent||e.type==="card"))return{display:"flex",justifyContent:e.justifyContent}});o.watch($,()=>{k.id=0,O(),V()});function b(){var _;const{value:F}=$;return F===null?null:(_=c.value)===null||_===void 0?void 0:_.querySelector(`[data-name="${F}"]`)}function S(_){if(e.type==="card")return;const{value:F}=f;if(!F)return;const K=F.style.opacity==="0";if(_){const z=`${l.value}-tabs-bar--disabled`,{barWidth:C,placement:B}=e;if(_.dataset.disabled==="true"?F.classList.add(z):F.classList.remove(z),["top","bottom"].includes(B)){if(D(["top","maxHeight","height"]),typeof C=="number"&&_.offsetWidth>=C){const oe=Math.floor((_.offsetWidth-C)/2)+_.offsetLeft;F.style.left=`${oe}px`,F.style.maxWidth=`${C}px`}else F.style.left=`${_.offsetLeft}px`,F.style.maxWidth=`${_.offsetWidth}px`;F.style.width="8192px",K&&(F.style.transition="none"),F.offsetWidth,K&&(F.style.transition="",F.style.opacity="1")}else{if(D(["left","maxWidth","width"]),typeof C=="number"&&_.offsetHeight>=C){const oe=Math.floor((_.offsetHeight-C)/2)+_.offsetTop;F.style.top=`${oe}px`,F.style.maxHeight=`${C}px`}else F.style.top=`${_.offsetTop}px`,F.style.maxHeight=`${_.offsetHeight}px`;F.style.height="8192px",K&&(F.style.transition="none"),F.offsetHeight,K&&(F.style.transition="",F.style.opacity="1")}}}function E(){if(e.type==="card")return;const{value:_}=f;_&&(_.style.opacity="0")}function D(_){const{value:F}=f;if(F)for(const K of _)F.style[K]=""}function O(){if(e.type==="card")return;const _=b();_?S(_):E()}function V(){var _;const F=(_=m.value)===null||_===void 0?void 0:_.$el;if(!F)return;const K=b();if(!K)return;const{scrollLeft:z,offsetWidth:C}=F,{offsetLeft:B,offsetWidth:oe}=K;z>B?F.scrollTo({top:0,left:B,behavior:"smooth"}):B+oe>z+C&&F.scrollTo({top:0,left:B+oe-C,behavior:"smooth"})}const j=o.ref(null);let Q=0,N=null;function Z(_){const F=j.value;if(F){Q=_.getBoundingClientRect().height;const K=`${Q}px`,z=()=>{F.style.height=K,F.style.maxHeight=K};N?(z(),N(),N=null):N=z}}function X(_){const F=j.value;if(F){const K=_.getBoundingClientRect().height,z=()=>{document.body.offsetHeight,F.style.maxHeight=`${K}px`,F.style.height=`${Math.max(Q,K)}px`};N?(N(),N=null,z()):N=z}}function Y(){const _=j.value;if(_){_.style.maxHeight="",_.style.height="";const{paneWrapperStyle:F}=e;if(typeof F=="string")_.style.cssText=F;else if(F){const{maxHeight:K,height:z}=F;K!==void 0&&(_.style.maxHeight=K),z!==void 0&&(_.style.height=z)}}}const de={value:[]},ie=o.ref("next");function ue(_){const F=$.value;let K="next";for(const z of de.value){if(z===F)break;if(z===_){K="prev";break}}ie.value=K,U(_)}function U(_){const{onActiveNameChange:F,onUpdateValue:K,"onUpdate:value":z}=e;F&&ce(F,_),K&&ce(K,_),z&&ce(z,_),H.value=_}function te(_){const{onClose:F}=e;F&&ce(F,_)}function ve(){const{value:_}=f;if(!_)return;const F="transition-disabled";_.classList.add(F),O(),_.classList.remove(F)}const we=o.ref(null);function re({transitionDisabled:_}){const F=c.value;if(!F)return;_&&F.classList.add("transition-disabled");const K=b();K&&we.value&&(we.value.style.width=`${K.offsetWidth}px`,we.value.style.height=`${K.offsetHeight}px`,we.value.style.transform=`translateX(${K.offsetLeft-ot(getComputedStyle(F).paddingLeft)}px)`,_&&we.value.offsetWidth),_&&F.classList.remove("transition-disabled")}o.watch([$],()=>{e.type==="segment"&&o.nextTick(()=>{re({transitionDisabled:!1})})}),o.onMounted(()=>{e.type==="segment"&&re({transitionDisabled:!0})});let Se=0;function Ce(_){var F;if(_.contentRect.width===0&&_.contentRect.height===0||Se===_.contentRect.width)return;Se=_.contentRect.width;const{type:K}=e;if((K==="line"||K==="bar")&&ve(),K!=="segment"){const{placement:z}=e;De((z==="top"||z==="bottom"?(F=m.value)===null||F===void 0?void 0:F.$el:h.value)||null)}}const le=ri(Ce,64);o.watch([()=>e.justifyContent,()=>e.size],()=>{o.nextTick(()=>{const{type:_}=e;(_==="line"||_==="bar")&&ve()})});const Me=o.ref(!1);function Re(_){var F;const{target:K,contentRect:{width:z}}=_,C=K.parentElement.offsetWidth;if(!Me.value)C<z&&(Me.value=!0);else{const{value:B}=p;if(!B)return;C-z>B.$el.offsetWidth&&(Me.value=!1)}De(((F=m.value)===null||F===void 0?void 0:F.$el)||null)}const Le=ri(Re,64);function Ie(){const{onAdd:_}=e;_&&_(),o.nextTick(()=>{const F=b(),{value:K}=m;!F||!K||K.scrollTo({left:F.offsetLeft,top:0,behavior:"smooth"})})}function De(_){if(!_)return;const{placement:F}=e;if(F==="top"||F==="bottom"){const{scrollLeft:K,scrollWidth:z,offsetWidth:C}=_;v.value=K<=0,w.value=K+C>=z}else{const{scrollTop:K,scrollHeight:z,offsetHeight:C}=_;v.value=K<=0,w.value=K+C>=z}}const Ue=ri(_=>{De(_.target)},64);o.provide(ki,{triggerRef:o.toRef(e,"trigger"),tabStyleRef:o.toRef(e,"tabStyle"),tabClassRef:o.toRef(e,"tabClass"),addTabStyleRef:o.toRef(e,"addTabStyle"),addTabClassRef:o.toRef(e,"addTabClass"),paneClassRef:o.toRef(e,"paneClass"),paneStyleRef:o.toRef(e,"paneStyle"),mergedClsPrefixRef:l,typeRef:o.toRef(e,"type"),closableRef:o.toRef(e,"closable"),valueRef:$,tabChangeIdRef:k,onBeforeLeaveRef:o.toRef(e,"onBeforeLeave"),activateTab:ue,handleClose:te,handleAdd:Ie}),ia(()=>{O(),V()}),o.watchEffect(()=>{const{value:_}=u;if(!_)return;const{value:F}=l,K=`${F}-tabs-nav-scroll-wrapper--shadow-start`,z=`${F}-tabs-nav-scroll-wrapper--shadow-end`;v.value?_.classList.remove(K):_.classList.add(K),w.value?_.classList.remove(z):_.classList.add(z)});const ke={syncBarPosition:()=>{O()}},q=()=>{re({transitionDisabled:!0})},A=o.computed(()=>{const{value:_}=g,{type:F}=e,K={card:"Card",bar:"Bar",line:"Line",segment:"Segment"}[F],z=`${_}${K}`,{self:{barColor:C,closeIconColor:B,closeIconColorHover:oe,closeIconColorPressed:xe,tabColor:ze,tabBorderColor:Ne,paneTextColor:Ae,tabFontWeight:_e,tabBorderRadius:qe,tabFontWeightActive:st,colorSegment:Je,fontWeightStrong:it,tabColorSegment:x,closeSize:L,closeIconSize:J,closeColorHover:ae,closeColorPressed:se,closeBorderRadius:fe,[ee("panePadding",_)]:he,[ee("tabPadding",z)]:ge,[ee("tabPaddingVertical",z)]:Te,[ee("tabGap",z)]:ut,[ee("tabGap",`${z}Vertical`)]:Yt,[ee("tabTextColor",F)]:wn,[ee("tabTextColorActive",F)]:Zt,[ee("tabTextColorHover",F)]:Jt,[ee("tabTextColorDisabled",F)]:po,[ee("tabFontSize",_)]:bo},common:{cubicBezierEaseInOut:Hn}}=d.value;return{"--n-bezier":Hn,"--n-color-segment":Je,"--n-bar-color":C,"--n-tab-font-size":bo,"--n-tab-text-color":wn,"--n-tab-text-color-active":Zt,"--n-tab-text-color-disabled":po,"--n-tab-text-color-hover":Jt,"--n-pane-text-color":Ae,"--n-tab-border-color":Ne,"--n-tab-border-radius":qe,"--n-close-size":L,"--n-close-icon-size":J,"--n-close-color-hover":ae,"--n-close-color-pressed":se,"--n-close-border-radius":fe,"--n-close-icon-color":B,"--n-close-icon-color-hover":oe,"--n-close-icon-color-pressed":xe,"--n-tab-color":ze,"--n-tab-font-weight":_e,"--n-tab-font-weight-active":st,"--n-tab-padding":ge,"--n-tab-padding-vertical":Te,"--n-tab-gap":ut,"--n-tab-gap-vertical":Yt,"--n-pane-padding-left":dt(he,"left"),"--n-pane-padding-right":dt(he,"right"),"--n-pane-padding-top":dt(he,"top"),"--n-pane-padding-bottom":dt(he,"bottom"),"--n-font-weight-strong":it,"--n-tab-color-segment":x}}),ne=s?et("tabs",o.computed(()=>`${g.value[0]}${e.type[0]}`),A,e):void 0;return Object.assign({mergedClsPrefix:l,mergedValue:$,renderedNames:new Set,segmentCapsuleElRef:we,tabsPaneWrapperRef:j,tabsElRef:c,barElRef:f,addTabInstRef:p,xScrollInstRef:m,scrollWrapperElRef:u,addTabFixed:Me,tabWrapperStyle:M,handleNavResize:le,mergedSize:g,handleScroll:Ue,handleTabsResize:Le,cssVars:s?void 0:A,themeClass:ne==null?void 0:ne.themeClass,animationDirection:ie,renderNameListRef:de,yScrollElRef:h,handleSegmentResize:q,onAnimationBeforeLeave:Z,onAnimationEnter:X,onAnimationAfterEnter:Y,onRender:ne==null?void 0:ne.onRender},ke)},render(){const{mergedClsPrefix:e,type:t,placement:n,addTabFixed:r,addable:i,mergedSize:a,renderNameListRef:l,onRender:s,paneWrapperClass:d,paneWrapperStyle:c,$slots:{default:f,prefix:u,suffix:p}}=this;s==null||s();const m=f?Tn(f()).filter(k=>k.type.__TAB_PANE__===!0):[],h=f?Tn(f()).filter(k=>k.type.__TAB__===!0):[],v=!h.length,w=t==="card",g=t==="segment",P=!w&&!g&&this.justifyContent;l.value=[];const H=()=>{const k=o.h("div",{style:this.tabWrapperStyle,class:[`${e}-tabs-wrapper`]},P?null:o.h("div",{class:`${e}-tabs-scroll-padding`,style:{width:`${this.tabsPadding}px`}}),v?m.map((M,b)=>(l.value.push(M.props.name),Ti(o.h(zi,Object.assign({},M.props,{internalCreatedByPane:!0,internalLeftPadded:b!==0&&(!P||P==="center"||P==="start"||P==="end")}),M.children?{default:M.children.tab}:void 0)))):h.map((M,b)=>(l.value.push(M.props.name),Ti(b!==0&&!P?Is(M):M))),!r&&i&&w?Ms(i,(v?m.length:h.length)!==0):null,P?null:o.h("div",{class:`${e}-tabs-scroll-padding`,style:{width:`${this.tabsPadding}px`}}));return o.h("div",{ref:"tabsElRef",class:`${e}-tabs-nav-scroll-content`},w&&i?o.h(jt,{onResize:this.handleTabsResize},{default:()=>k}):k,w?o.h("div",{class:`${e}-tabs-pad`}):null,w?null:o.h("div",{ref:"barElRef",class:`${e}-tabs-bar`}))},$=g?"top":n;return o.h("div",{class:[`${e}-tabs`,this.themeClass,`${e}-tabs--${t}-type`,`${e}-tabs--${a}-size`,P&&`${e}-tabs--flex`,`${e}-tabs--${$}`],style:this.cssVars},o.h("div",{class:[`${e}-tabs-nav--${t}-type`,`${e}-tabs-nav--${$}`,`${e}-tabs-nav`]},Oe(u,k=>k&&o.h("div",{class:`${e}-tabs-nav__prefix`},k)),g?o.h(jt,{onResize:this.handleSegmentResize},{default:()=>o.h("div",{class:`${e}-tabs-rail`,ref:"tabsElRef"},o.h("div",{class:`${e}-tabs-capsule`,ref:"segmentCapsuleElRef"},o.h("div",{class:`${e}-tabs-wrapper`},o.h("div",{class:`${e}-tabs-tab`}))),v?m.map((k,M)=>(l.value.push(k.props.name),o.h(zi,Object.assign({},k.props,{internalCreatedByPane:!0,internalLeftPadded:M!==0}),k.children?{default:k.children.tab}:void 0))):h.map((k,M)=>(l.value.push(k.props.name),M===0?k:Is(k))))}):o.h(jt,{onResize:this.handleNavResize},{default:()=>o.h("div",{class:`${e}-tabs-nav-scroll-wrapper`,ref:"scrollWrapperElRef"},["top","bottom"].includes($)?o.h(Oc,{ref:"xScrollInstRef",onScroll:this.handleScroll},{default:H}):o.h("div",{class:`${e}-tabs-nav-y-scroll`,onScroll:this.handleScroll,ref:"yScrollElRef"},H()))}),r&&i&&w?Ms(i,!0):null,Oe(p,k=>k&&o.h("div",{class:`${e}-tabs-nav__suffix`},k))),v&&(this.animated&&($==="top"||$==="bottom")?o.h("div",{ref:"tabsPaneWrapperRef",style:c,class:[`${e}-tabs-pane-wrapper`,d]},Es(m,this.mergedValue,this.renderedNames,this.onAnimationBeforeLeave,this.onAnimationEnter,this.onAnimationAfterEnter,this.animationDirection)):Es(m,this.mergedValue,this.renderedNames)))}});function Es(e,t,n,r,i,a,l){const s=[];return e.forEach(d=>{const{name:c,displayDirective:f,"display-directive":u}=d.props,p=h=>f===h||u===h,m=t===c;if(d.key!==void 0&&(d.key=c),m||p("show")||p("show:lazy")&&n.has(c)){n.has(c)||n.add(c);const h=!p("if");s.push(h?o.withDirectives(d,[[o.vShow,m]]):d)}}),l?o.h(o.TransitionGroup,{name:`${l}-transition`,onBeforeLeave:r,onEnter:i,onAfterEnter:a},{default:()=>s}):s}function Ms(e,t){return o.h(zi,{ref:"addTabInstRef",key:"__addable",name:"__addable",internalCreatedByPane:!0,internalAddable:!0,internalLeftPadded:t,disabled:typeof e=="object"&&e.disabled})}function Is(e){const t=o.cloneVNode(e);return t.props?t.props.internalLeftPadded=!0:t.props={internalLeftPadded:!0},t}function Ti(e){return Array.isArray(e.dynamicProps)?e.dynamicProps.includes("internalLeftPadded")||e.dynamicProps.push("internalLeftPadded"):e.dynamicProps=["internalLeftPadded"],e}async function Os(e,t,n){try{const{data:r}=await en().POST("/api/visualizations",{type:e,title:t,config:n});return r.id}catch(r){$n(r)}}async function E0(e,t,n,r){try{if(t)await As(t,n,r);else return await Os(e,n,r)}catch(i){$n(i)}}async function As(e,t,n){try{await en().PUT(`/api/visualizations/${e}`,{title:t,config:n})}catch(r){$n(r)}}function Fs(e){const t={};return e&&e.forEach(n=>{n.name?t[n.name]=n.value??null:console.debug("Warning: Detected input element with no name.")}),t}const M0={key:2,class:"border border-dotted border-green-600 rounded mt-2 p-2"},I0=o.defineComponent({__name:"InputConditional",props:o.mergeModels({datasetId:{},input:{}},{value:{},valueModifiers:{}}),emits:o.mergeModels(["update:value"],["update:value"]),setup(e,{emit:t}){const n=e,r=t;if(!n.input.test_param)throw`The conditional '${n.input.name}' is missing a test parameter.`;if(!n.input.cases||n.input.cases.length===0)throw`The conditional '${n.input.name}' is missing a cases.`;const i=o.ref(n.input.test_param),a=i.value.name;a||console.error(`Test parameter has no name: ${n.input.name}.`);const l=o.useModel(e,"value");(!l.value||!(a in l.value))&&console.error(`Test parameter of conditional not available: ${n.input.name}.`,l.value);const s=o.ref(p()),d=o.computed(()=>{const h={};if(n.input.cases&&n.input.cases.length>0)for(const v of n.input.cases)h[v.value]=Fs(v.inputs),h[v.value][a]=v.value;return h}),c=o.computed(()=>{const h={};if(n.input.cases&&n.input.cases.length>0)for(const v of n.input.cases)h[v.value]=v.inputs;return h}),f=o.computed(()=>c.value[s.value]),u=o.computed({get(){return s.value==="true"},set(h){s.value=String(h)}});function p(){return l.value&&l.value[a]}function m(h){let v={...d.value[s.value]};if(h){const w={};f.value.forEach(g=>{w[g.name]=h[g.name]}),v={...v,...h}}r("update:value",v)}return o.watch(()=>l.value,()=>{s.value=p()}),o.watch(()=>s.value,()=>{m()}),(h,v)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[i.value.type==="boolean"?(o.openBlock(),o.createBlock(o.unref(Rs),{key:0,value:u.value,"onUpdate:value":v[0]||(v[0]=w=>u.value=w)},null,8,["value"])):(o.openBlock(),o.createBlock(o.unref(rr),{key:1,value:s.value,"onUpdate:value":v[1]||(v[1]=w=>s.value=w),options:i.value.data},null,8,["value","options"])),f.value?(o.openBlock(),o.createElementBlock("div",M0,[o.createVNode(Pi,{"dataset-id":h.datasetId,inputs:f.value,values:l.value,"onUpdate:values":m},null,8,["dataset-id","inputs","values"])])):o.createCommentVNode("",!0)],64))}}),O0={key:0,class:"mb-1"},A0={key:1,class:"text-red-600 mb-1"},F0=o.createElementVNode("span",null,"Please select a dataset.",-1),D0=100,V0=o.defineComponent({__name:"InputData",props:o.mergeModels({extension:{},optional:{type:Boolean}},{value:{},valueModifiers:{}}),emits:["update:value"],setup(e){const t=e,n=o.ref([]),r=o.useModel(e,"value"),i=o.ref(!1),a=o.ref(null);async function l(d){i.value=!0;try{const c=t.extension?`q=extension-eq&qv=${t.extension}`:"",f=d?`q=name-contains&qv=${d}`:"",{data:u}=await en().GET(`/api/datasets?limit=${D0}&${c}&${f}`);if(u&&u.length>0){const p=u.map(m=>({label:m.name,value:{id:m.id,name:m.name}}));p.push({label:"...filter for more",value:null,disabled:!0}),t.optional&&p.unshift({label:"-- Clear Selection --",value:null}),n.value=p}}catch(c){console.log(c)}finally{i.value=!1}}function s(){r.value=a.value,a.value=null}return l(),(d,c)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[r.value?(o.openBlock(),o.createElementBlock("div",O0,[o.createVNode(o.unref(yt),{class:"size-3 mr-1"},{default:o.withCtx(()=>[o.createVNode(o.unref(Hi))]),_:1}),o.createElementVNode("span",null,"Selected: "+o.toDisplayString(r.value.name),1)])):d.optional?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",A0,[o.createVNode(o.unref(yt),{class:"size-3 mr-1"},{default:o.withCtx(()=>[o.createVNode(o.unref(Li))]),_:1}),F0])),o.createVNode(o.unref(rr),{value:a.value,"onUpdate:value":[c[0]||(c[0]=f=>a.value=f),s],filterable:"",placeholder:"Select a Dataset",loading:i.value,options:n.value,onSearch:l},null,8,["value","loading","options"])],64))}});function H0(e,t,n,r){const i=[];t&&i.push({label:"Column: Default",value:"auto"});const a=e.metadata_column_types;for(const l in a)(r&&["int","float"].includes(a[l])||n&&a[l]==="str"||!r&&!n)&&i.push({label:"Column: "+(parseInt(l)+1),value:l});return i}const L0=o.defineComponent({__name:"InputDataColumn",props:o.mergeModels({datasetId:{},isAuto:{type:Boolean},isText:{type:Boolean},isNumber:{type:Boolean}},{value:{},valueModifiers:{}}),emits:["update:value"],setup(e){const t=e,n=o.ref([]),r=o.useModel(e,"value");async function i(){if(t.datasetId)try{const{data:l}=await en().GET(`/api/datasets/${t.datasetId}`),s=H0(l,t.isAuto,t.isText,t.isNumber);n.value=s,a()}catch(l){console.log(l)}else console.log("Data column selector disabled, since `datasetId` is unavailable.")}function a(){n.value.length>0&&r.value===null&&(r.value=n.value[0].value)}return i(),o.watch(()=>r.value,()=>a()),(l,s)=>l.datasetId?(o.openBlock(),o.createBlock(o.unref(rr),{key:0,value:r.value,"onUpdate:value":s[0]||(s[0]=d=>r.value=d),options:n.value},null,8,["value","options"])):(o.openBlock(),o.createBlock(o.unref(Dn),{key:1,value:r.value,"onUpdate:value":s[1]||(s[1]=d=>r.value=d)},null,8,["value"]))}});function ho(e){return String(e).toLowerCase()==="true"}const N0={class:"overflow-auto select-none"},W0={class:"font-bold pb-1"},j0={key:0,class:"text-xs pb-1"},U0={key:5},Ds=.01,Pi=o.defineComponent({__name:"InputForm",props:{datasetId:{},inputs:{},values:{}},emits:["update:values"],setup(e,{emit:t}){const n=e,r=t,i=o.ref(a());function a(){const s={...n.values};return n.inputs.forEach(d=>{s[d.name]===void 0&&(s[d.name]=null)}),s}function l(){r("update:values",i.value)}return o.watch(()=>n.values,()=>{i.value=a()}),(s,d)=>(o.openBlock(),o.createElementBlock("div",N0,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(s.inputs,(c,f)=>(o.openBlock(),o.createElementBlock("div",{key:f,class:"pb-2"},[o.createElementVNode("div",W0,o.toDisplayString(c.label||c.name),1),c.help?(o.openBlock(),o.createElementBlock("div",j0,o.toDisplayString(c.help),1)):o.createCommentVNode("",!0),o.createElementVNode("div",null,[c.type==="boolean"?(o.openBlock(),o.createBlock(o.unref(Rs),{key:0,value:i.value[c.name],"onUpdate:value":[u=>i.value[c.name]=u,d[0]||(d[0]=u=>l())]},null,8,["value","onUpdate:value"])):c.type==="color"?(o.openBlock(),o.createBlock(o.unref(Dv),{key:1,value:i.value[c.name],"onUpdate:value":[u=>i.value[c.name]=u,d[1]||(d[1]=u=>l())],modes:["hex"],"show-alpha":!1},null,8,["value","onUpdate:value"])):c.type==="conditional"?(o.openBlock(),o.createBlock(I0,{key:2,value:i.value[c.name],"onUpdate:value":[u=>i.value[c.name]=u,d[2]||(d[2]=u=>l())],"dataset-id":s.datasetId,input:c},null,8,["value","onUpdate:value","dataset-id","input"])):c.type==="data"?(o.openBlock(),o.createBlock(V0,{key:3,value:i.value[c.name],"onUpdate:value":[u=>i.value[c.name]=u,d[3]||(d[3]=u=>l())],extension:c.extension,optional:o.unref(ho)(c.optional)},null,8,["value","onUpdate:value","extension","optional"])):c.type==="data_column"?(o.openBlock(),o.createBlock(L0,{key:4,value:i.value[c.name],"onUpdate:value":[u=>i.value[c.name]=u,d[4]||(d[4]=u=>l())],"dataset-id":s.datasetId,"is-auto":o.unref(ho)(c.is_auto),"is-text":o.unref(ho)(c.is_text),"is-number":o.unref(ho)(c.is_number)},null,8,["value","onUpdate:value","dataset-id","is-auto","is-text","is-number"])):c.type==="float"?(o.openBlock(),o.createElementBlock("div",U0,[c.min!==void 0&&c.max!==void 0?(o.openBlock(),o.createBlock(o.unref(k0),{key:0,class:"mb-2",value:i.value[c.name],"onUpdate:value":[u=>i.value[c.name]=u,d[5]||(d[5]=u=>l())],min:Number(c.min),max:Number(c.max),step:Ds},null,8,["value","onUpdate:value","min","max"])):o.createCommentVNode("",!0),o.createVNode(o.unref(w0),{value:i.value[c.name],"onUpdate:value":[u=>i.value[c.name]=u,d[6]||(d[6]=u=>l())],size:"small",min:Number(c.min),max:Number(c.max),step:Ds},null,8,["value","onUpdate:value","min","max"])])):c.type==="select"?(o.openBlock(),o.createBlock(o.unref(rr),{key:6,value:i.value[c.name],"onUpdate:value":[u=>i.value[c.name]=u,d[7]||(d[7]=u=>l())],options:c.data},null,8,["value","onUpdate:value","options"])):c.type==="textarea"?(o.openBlock(),o.createBlock(o.unref(Dn),{key:7,value:i.value[c.name],"onUpdate:value":[u=>i.value[c.name]=u,d[8]||(d[8]=u=>l())],rows:Number(c.rows),type:"textarea"},null,8,["value","onUpdate:value","rows"])):(o.openBlock(),o.createBlock(o.unref(Dn),{key:8,value:i.value[c.name],"onUpdate:value":[u=>i.value[c.name]=u,d[9]||(d[9]=u=>l())]},null,8,["value","onUpdate:value"]))])]))),128))]))}}),G0=o.createElementVNode("span",{class:"mx-1"},"Add New Track",-1),K0={class:"border border-dotted border-green-600 rounded p-2"},q0={class:"flex text-green-600 my-1"},X0={class:"mx-1"},Y0=o.defineComponent({__name:"InputRepeats",props:{datasetId:{},inputs:{},valuesArray:{}},emits:["update:values-array"],setup(e,{emit:t}){const n=e,r=t,i=o.computed(()=>Fs(n.inputs));function a(){const d=[...n.valuesArray];d.unshift(i.value),r("update:values-array",d)}function l(d){const c=[...n.valuesArray];c.splice(d,1),r("update:values-array",c)}function s(d,c){const f=[...n.valuesArray];f[d]={...c},r("update:values-array",f)}return(d,c)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createVNode(o.unref(It),{size:"tiny",type:"primary",class:"mb-2",onClick:a},{default:o.withCtx(()=>[o.createVNode(o.unref(yt),null,{default:o.withCtx(()=>[o.createVNode(o.unref(Ks))]),_:1}),G0]),_:1}),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(d.valuesArray,(f,u)=>(o.openBlock(),o.createElementBlock("div",{key:u,class:"my-2"},[o.createElementVNode("div",K0,[o.createVNode(Pi,{"dataset-id":d.datasetId,inputs:d.inputs,values:f,"onUpdate:values":p=>s(u,p)},null,8,["dataset-id","inputs","values","onUpdate:values"]),o.createElementVNode("div",q0,[o.createVNode(o.unref(It),{class:"text-green-600 w-full",size:"tiny",round:"",disabled:d.valuesArray.length<=1,onClick:p=>l(u)},{default:o.withCtx(()=>[o.createVNode(o.unref(yt),null,{default:o.withCtx(()=>[o.createVNode(o.unref(Xs))]),_:1}),o.createElementVNode("span",X0,"Remove Track "+o.toDisplayString(d.valuesArray.length-u),1)]),_:2},1032,["disabled","onClick"])])])]))),128))],64))}}),Z0=2e3,J0=o.defineComponent({__name:"AlertNotify",props:{message:{},messageType:{default:"info"}},emits:["timeout"],setup(e,{emit:t}){const n=e,r=t;let i=null;return o.watch(()=>n.message,()=>{i&&clearTimeout(i),i=setTimeout(()=>r("timeout"),Z0)}),(a,l)=>a.message?(o.openBlock(),o.createBlock(o.unref(vi),{key:0,type:a.messageType,class:"m-4"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(a.message),1)]),_:1},8,["type"])):o.createCommentVNode("",!0)}}),Q0={class:"text-xs"},ex=o.createElementVNode("span",{class:"text-xs"},"Galaxy is not accessible!",-1),tx=o.defineComponent({__name:"ApiStatus",setup(e){const t=o.ref("...");async function n(){try{const{data:r}=await en().GET("/api/version");t.value=r.version_major}catch{console.log("Unable to connect to Galaxy. Verify Galaxy is running and refer to docs."),t.value=""}}return n(),(r,i)=>t.value?(o.openBlock(),o.createBlock(o.unref(Cs),{key:0,class:"mx-1",trigger:"hover"},{trigger:o.withCtx(()=>[o.createVNode(o.unref(yt),{class:"mx-1"},{default:o.withCtx(()=>[o.createVNode(o.unref(Hi),{class:"text-green-600"})]),_:1})]),default:o.withCtx(()=>[o.createElementVNode("span",Q0,"Connected to Galaxy Version "+o.toDisplayString(t.value)+".",1)]),_:1})):(o.openBlock(),o.createBlock(o.unref(Cs),{key:1,class:"mx-1",trigger:"hover"},{trigger:o.withCtx(()=>[o.createVNode(o.unref(yt),{class:"mx-1"},{default:o.withCtx(()=>[o.createVNode(o.unref(Li),{class:"text-red-600"})]),_:1})]),default:o.withCtx(()=>[ex]),_:1}))}}),nx={class:"overflow-auto select-none bg-white z-10"},ox={class:"flex p-2"},rx={class:"flex-1 font-thin text-lg p-1 p-2"},ix=o.createElementVNode("span",null,"Charts",-1),ax={key:0},lx={class:"m-4 mt-0 p-2 bg-sky-50 text-sky-900 rounded"},sx={class:"md:flex"},dx={class:"flex justify-center center-items"},cx={class:"m-2"},ux=["src"],fx={key:1,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 100 100",class:"size-14"},hx=[o.createElementVNode("circle",{cx:"50",cy:"50",r:"45",stroke:"#E30A17","stroke-width":"5"},null,-1),o.createElementVNode("path",{d:"M 50,5 A 45,45 0 0,1 95,50 L 50,50 Z",fill:"#E30A17"},null,-1)],px={class:"overflow-hidden break-words p-1"},bx={class:"font-bold"},gx=["innerHTML"],mx={class:"px-4 pb-2"},vx=o.createElementVNode("div",{class:"font-bold"},"Title",-1),xx=o.createElementVNode("div",{class:"text-xs py-1"},"Specify a visualization title.",-1),yx=o.createElementVNode("span",{class:"mx-1"},"Tracks",-1),wx=o.createElementVNode("span",{class:"mx-1"},"Settings",-1),Cx=o.defineComponent({__name:"SidePanel",props:{datasetId:{},description:{},logoUrl:{},html:{},name:{},settingInputs:{},settingValues:{},trackInputs:{},trackValues:{},visualizationId:{},visualizationTitle:{}},emits:["update:tracks","update:settings","update:visualization-id","update:visualization-title","toggle"],setup(e,{emit:t}){const n=e,r=t,i=o.ref(""),a=o.ref("info"),l=o.computed(()=>n.settingInputs.length===0||n.trackInputs.length===0);async function s(){try{if(n.visualizationId)await As(n.visualizationId,n.visualizationTitle,{dataset_id:n.datasetId,settings:n.settingValues,tracks:n.trackValues}),i.value="Successfully saved.",a.value="success";else{const u=await Os(n.name,n.visualizationTitle,{dataset_id:n.datasetId,settings:n.settingValues,tracks:n.trackValues});u?(i.value="Successfully created.",a.value="success",r("update:visualization-id",u)):(i.value="Something went wrong.",a.value="error")}}catch(u){i.value=Oi(u),a.value="error"}}function d(u){r("update:settings",u)}function c(u){r("update:tracks",u)}function f(u){r("update:visualization-title",u)}return(u,p)=>(o.openBlock(),o.createElementBlock("div",nx,[o.createElementVNode("div",ox,[o.createElementVNode("div",rx,[ix,o.createVNode(tx)]),u.datasetId?(o.openBlock(),o.createElementBlock("div",ax,[o.createVNode(o.unref(It),{strong:"",secondary:"",circle:"",class:"bg-sky-100 m-1",onClick:s},{icon:o.withCtx(()=>[o.createVNode(o.unref(yt),null,{default:o.withCtx(()=>[o.createVNode(o.unref(Gs))]),_:1})]),_:1}),o.createVNode(o.unref(It),{strong:"",secondary:"",circle:"",class:"bg-sky-100 m-1",onClick:p[0]||(p[0]=m=>r("toggle"))},{icon:o.withCtx(()=>[o.createVNode(o.unref(yt),null,{default:o.withCtx(()=>[o.createVNode(o.unref(Us))]),_:1})]),_:1})])):o.createCommentVNode("",!0)]),o.createVNode(J0,{message:i.value,"message-type":a.value,onTimeout:p[1]||(p[1]=m=>i.value=""),class:"m-4"},null,8,["message","message-type"]),o.createElementVNode("div",lx,[o.createElementVNode("div",sx,[o.createElementVNode("div",dx,[o.createElementVNode("div",cx,[n.logoUrl?(o.openBlock(),o.createElementBlock("img",{key:0,src:n.logoUrl,class:"min-w-14 max-w-14 object-contain"},null,8,ux)):(o.openBlock(),o.createElementBlock("svg",fx,hx))])]),o.createElementVNode("div",px,[o.createElementVNode("span",bx,o.toDisplayString(u.html),1),o.createElementVNode("div",{class:"text-xs",innerHTML:u.description},null,8,gx)])])]),o.createElementVNode("div",mx,[vx,xx,o.createVNode(o.unref(Dn),{value:u.visualizationTitle,onInput:f},null,8,["value"])]),o.createVNode(o.unref(_0),{type:"line",animated:"",class:"px-4","tab-class":l.value?"!hidden":""},{default:o.withCtx(()=>[u.trackInputs.length>0?(o.openBlock(),o.createBlock(o.unref(_s),{key:0,name:"tracks"},{tab:o.withCtx(()=>[o.createVNode(o.unref(yt),null,{default:o.withCtx(()=>[o.createVNode(o.unref(qs))]),_:1}),yx]),default:o.withCtx(()=>[o.createVNode(Y0,{"dataset-id":u.datasetId,inputs:u.trackInputs,"values-array":u.trackValues,"onUpdate:valuesArray":c},null,8,["dataset-id","inputs","values-array"])]),_:1})):o.createCommentVNode("",!0),u.settingInputs.length>0?(o.openBlock(),o.createBlock(o.unref(_s),{key:1,name:"settings"},{tab:o.withCtx(()=>[o.createVNode(o.unref(yt),null,{default:o.withCtx(()=>[o.createVNode(o.unref(Ns))]),_:1}),wx]),default:o.withCtx(()=>[o.createVNode(Pi,{"dataset-id":u.datasetId,inputs:u.settingInputs,values:u.settingValues,"onUpdate:values":d},null,8,["dataset-id","inputs","values"])]),_:1})):o.createCommentVNode("",!0)]),_:1},8,["tab-class"])]))}});async function Sx(e,t={}){const n=Ri(e.settings,t.settings),r=e.specs,i=zx(e.tracks,t.tracks);return{plugin:e,settings:n,specs:r,tracks:i}}function $x(e,t){let n=t??e.value;return e.type==="float"?n=Number(n):e.type==="boolean"&&(n=ho(n)),n}function kx(e,t={}){var i,a,l;const n=t,r=(i=e.test_param)==null?void 0:i.name;if(!r)console.error(`Test parameter has no name: ${e.name}.`);else{const s=n[r]??((a=e.test_param)==null?void 0:a.value);for(const d of e.cases||[])d.value===s&&(n[r]=s,(l=d.inputs)!=null&&l.length&&Ri(d.inputs,n))}return n}function Ri(e,t){const n=t||{};return e==null||e.forEach(r=>{r.type==="conditional"?n[r.name]=kx(r,n[r.name]):n[r.name]=$x(r,n[r.name])}),n}function zx(e,t){const n=t||[];return e&&(n.length===0&&n.push({}),n.forEach((r,i)=>{n[i]=Ri(e,r)})),n}function Tx(e,t="app"){if(e===void 0){const s=document.getElementById(t);if(!s)throw new Error(`Container element '${t}' not found.`);e=JSON.parse((s==null?void 0:s.getAttribute("data-incoming"))||"{}")}const n=(e==null?void 0:e.root)??"/",r=(e==null?void 0:e.visualization_config)??{},i=(e==null?void 0:e.visualization_id)??null,a=(e==null?void 0:e.visualization_plugin)??{},l=(e==null?void 0:e.visualization_title)??"Unnamed Visualization";return{root:n,visualizationConfig:r,visualizationId:i,visualizationPlugin:a,visualizationTitle:l}}const Px={key:2,class:"m-2"},Rx=o.createElementVNode("span",{class:"text-xs"},"Please wait...",-1),Bx={key:1},_x=o.defineComponent({__name:"GalaxyCharts",props:{container:{},credentials:{},incoming:{}},setup(e){const t=e,{root:n,visualizationConfig:r,visualizationId:i,visualizationPlugin:a,visualizationTitle:l}=Tx(t.incoming,t.container),s=o.ref(!1),d=o.ref(""),c=o.ref(""),f=o.ref(""),u=o.ref(!0),p=o.ref(""),m=o.ref(""),h=o.ref([]),v=o.ref({}),w=o.ref({}),g=o.ref([]),P=o.ref([]),H=o.ref(i),$=o.ref(l),k=Di();k.setCredentials(t.credentials||"include"),k.setRoot(n||"/"),Sx(a,r).then(({plugin:Y,settings:de,specs:ie,tracks:ue})=>{d.value=Y.description||"",f.value=Y.html||"",u.value=!1,p.value=Y.logo||"",m.value=Y.name||"",h.value=Y.settings||[],v.value=de,w.value=ie||{},g.value=Y.tracks||[],P.value=ue});const M=o.computed(()=>r.dataset_id||""),b=o.computed(()=>r.dataset_url?(console.debug(`GalaxyCharts: Evaluating dataset url: ${r.dataset_url}.`),r.dataset_url):M.value?(console.debug(`GalaxyCharts: Built dataset url from dataset id: ${M.value}.`),Hs(n,M.value)):null),S=o.computed(()=>p.value&&`${n}${p.value}`),E=o.computed(()=>h.value.length===0&&g.value.length===0);async function D(){s.value=!s.value,await o.nextTick(),window?window.dispatchEvent(new Event("resize")):console.warn("window unavailable.")}function O(){try{window.postMessage({container:t.container,content:JSON.parse(JSON.stringify(V())),from:"galaxy-visualization"},"*")}catch(Y){c.value=`Failed to postMessage: ${Y}`}}function V(){return{dataset_id:M.value,settings:v.value,tracks:P.value}}function j(Y){v.value={...Y},O()}function Q(Y){P.value=[...Y],O()}function N(Y){H.value=Y}function Z(Y){$.value=Y}async function X(Y){j({...v.value,...Y});try{const de=await E0(m.value,i,l,V());de&&N(de)}catch(de){c.value=`Failed to save: ${de}.`}}return(Y,de)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[c.value?(o.openBlock(),o.createBlock(o.unref(vi),{key:0,type:"error",class:"m-2"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(c.value),1)]),_:1})):o.createCommentVNode("",!0),b.value?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.unref(vi),{key:1,type:"info",class:"m-2"},{default:o.withCtx(()=>[o.createTextVNode(" Only displaying available visualization inputs. Rendering requires `dataset_id` or `dataset_url`. ")]),_:1})),u.value?(o.openBlock(),o.createElementBlock("div",Px,[o.createElementVNode("span",null,[o.createVNode(o.unref(Ws),{class:"animate-spin size-4 inline mx-1"})]),Rx])):(o.openBlock(),o.createElementBlock("div",{key:3,class:o.normalizeClass(["grid h-screen",{"grid-cols-[70%_30%]":!s.value&&b.value&&!E.value}])},[b.value?o.renderSlot(Y.$slots,"default",{key:0,datasetId:M.value,datasetUrl:b.value,root:o.unref(n),settings:v.value,specs:w.value,tracks:P.value,save:X}):o.createCommentVNode("",!0),s.value&&b.value&&!E.value?(o.openBlock(),o.createElementBlock("div",Bx,[o.createVNode(o.unref(g0),{strong:"",secondary:"",circle:"",class:"bg-sky-100 m-2",top:0,right:0,onClick:D},{default:o.withCtx(()=>[o.createVNode(o.unref(yt),null,{default:o.withCtx(()=>[o.createVNode(o.unref(js))]),_:1})]),_:1})])):E.value?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(Cx,{key:2,"dataset-id":M.value,description:d.value,html:f.value,"logo-url":S.value,name:m.value,"setting-inputs":h.value,"setting-values":v.value,"track-inputs":g.value,"track-values":P.value,"visualization-id":H.value,"visualization-title":$.value,"onUpdate:settings":j,"onUpdate:tracks":Q,"onUpdate:visualizationId":N,"onUpdate:visualizationTitle":Z,onToggle:D},null,8,["dataset-id","description","html","logo-url","name","setting-inputs","setting-values","track-inputs","track-values","visualization-id","visualization-title"]))],2))],64))}});We.GalaxyApi=en,We.GalaxyCharts=_x,We.useColumnsStore=Ls,Object.defineProperty(We,Symbol.toStringTag,{value:"Module"})});
|
|
1959
|
+
`)])])])]),y0=Object.assign(Object.assign({},Ce.props),{value:[String,Number],defaultValue:[String,Number],trigger:{type:String,default:"click"},type:{type:String,default:"bar"},closable:Boolean,justifyContent:String,size:{type:String,default:"medium"},placement:{type:String,default:"top"},tabStyle:[String,Object],tabClass:String,addTabStyle:[String,Object],addTabClass:String,barWidth:Number,paneClass:String,paneStyle:[String,Object],paneWrapperClass:String,paneWrapperStyle:[String,Object],addable:[Boolean,Object],tabsPadding:{type:Number,default:0},animated:Boolean,onBeforeLeave:Function,onAdd:Function,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onClose:[Function,Array],labelSize:String,activeName:[String,Number],onActiveNameChange:[Function,Array]}),w0=r.defineComponent({name:"Tabs",props:y0,setup(e,{slots:t}){var n,o,i,a;process.env.NODE_ENV!=="production"&&r.watchEffect(()=>{e.labelSize!==void 0&&Qe("tabs","`label-size` is deprecated, please use `size` instead."),e.activeName!==void 0&&Qe("tabs","`active-name` is deprecated, please use `value` instead."),e.onActiveNameChange!==void 0&&Qe("tabs","`on-active-name-change` is deprecated, please use `on-update:value` instead.")});const{mergedClsPrefixRef:l,inlineThemeDisabled:s}=Je(e),d=Ce("Tabs","-tabs",x0,a0,e,l),c=r.ref(null),f=r.ref(null),u=r.ref(null),b=r.ref(null),m=r.ref(null),h=r.ref(null),x=r.ref(!0),w=r.ref(!0),g=zr(e,["labelSize","size"]),P=zr(e,["activeName","value"]),L=r.ref((o=(n=P.value)!==null&&n!==void 0?n:e.defaultValue)!==null&&o!==void 0?o:t.default?(a=(i=Tn(t.default())[0])===null||i===void 0?void 0:i.props)===null||a===void 0?void 0:a.name:null),$=St(P,L),k={id:0},M=r.computed(()=>{if(!(!e.justifyContent||e.type==="card"))return{display:"flex",justifyContent:e.justifyContent}});r.watch($,()=>{k.id=0,I(),D()});function p(){var E;const{value:A}=$;return A===null?null:(E=c.value)===null||E===void 0?void 0:E.querySelector(`[data-name="${A}"]`)}function S(E){if(e.type==="card")return;const{value:A}=f;if(!A)return;const K=A.style.opacity==="0";if(E){const T=`${l.value}-tabs-bar--disabled`,{barWidth:C,placement:_}=e;if(E.dataset.disabled==="true"?A.classList.add(T):A.classList.remove(T),["top","bottom"].includes(_)){if(F(["top","maxHeight","height"]),typeof C=="number"&&E.offsetWidth>=C){const re=Math.floor((E.offsetWidth-C)/2)+E.offsetLeft;A.style.left=`${re}px`,A.style.maxWidth=`${C}px`}else A.style.left=`${E.offsetLeft}px`,A.style.maxWidth=`${E.offsetWidth}px`;A.style.width="8192px",K&&(A.style.transition="none"),A.offsetWidth,K&&(A.style.transition="",A.style.opacity="1")}else{if(F(["left","maxWidth","width"]),typeof C=="number"&&E.offsetHeight>=C){const re=Math.floor((E.offsetHeight-C)/2)+E.offsetTop;A.style.top=`${re}px`,A.style.maxHeight=`${C}px`}else A.style.top=`${E.offsetTop}px`,A.style.maxHeight=`${E.offsetHeight}px`;A.style.height="8192px",K&&(A.style.transition="none"),A.offsetHeight,K&&(A.style.transition="",A.style.opacity="1")}}}function B(){if(e.type==="card")return;const{value:E}=f;E&&(E.style.opacity="0")}function F(E){const{value:A}=f;if(A)for(const K of E)A.style[K]=""}function I(){if(e.type==="card")return;const E=p();E?S(E):B()}function D(){var E;const A=(E=m.value)===null||E===void 0?void 0:E.$el;if(!A)return;const K=p();if(!K)return;const{scrollLeft:T,offsetWidth:C}=A,{offsetLeft:_,offsetWidth:re}=K;T>_?A.scrollTo({top:0,left:_,behavior:"smooth"}):_+re>T+C&&A.scrollTo({top:0,left:_+re-C,behavior:"smooth"})}const j=r.ref(null);let Q=0,N=null;function Z(E){const A=j.value;if(A){Q=E.getBoundingClientRect().height;const K=`${Q}px`,T=()=>{A.style.height=K,A.style.maxHeight=K};N?(T(),N(),N=null):N=T}}function q(E){const A=j.value;if(A){const K=E.getBoundingClientRect().height,T=()=>{document.body.offsetHeight,A.style.maxHeight=`${K}px`,A.style.height=`${Math.max(Q,K)}px`};N?(N(),N=null,T()):N=T}}function Y(){const E=j.value;if(E){E.style.maxHeight="",E.style.height="";const{paneWrapperStyle:A}=e;if(typeof A=="string")E.style.cssText=A;else if(A){const{maxHeight:K,height:T}=A;K!==void 0&&(E.style.maxHeight=K),T!==void 0&&(E.style.height=T)}}}const de={value:[]},ie=r.ref("next");function ce(E){const A=$.value;let K="next";for(const T of de.value){if(T===A)break;if(T===E){K="prev";break}}ie.value=K,U(E)}function U(E){const{onActiveNameChange:A,onUpdateValue:K,"onUpdate:value":T}=e;A&&he(A,E),K&&he(K,E),T&&he(T,E),L.value=E}function te(E){const{onClose:A}=e;A&&he(A,E)}function ve(){const{value:E}=f;if(!E)return;const A="transition-disabled";E.classList.add(A),I(),E.classList.remove(A)}const ye=r.ref(null);function oe({transitionDisabled:E}){const A=c.value;if(!A)return;E&&A.classList.add("transition-disabled");const K=p();K&&ye.value&&(ye.value.style.width=`${K.offsetWidth}px`,ye.value.style.height=`${K.offsetHeight}px`,ye.value.style.transform=`translateX(${K.offsetLeft-rt(getComputedStyle(A).paddingLeft)}px)`,E&&ye.value.offsetWidth),E&&A.classList.remove("transition-disabled")}r.watch([$],()=>{e.type==="segment"&&r.nextTick(()=>{oe({transitionDisabled:!1})})}),r.onMounted(()=>{e.type==="segment"&&oe({transitionDisabled:!0})});let Se=0;function we(E){var A;if(E.contentRect.width===0&&E.contentRect.height===0||Se===E.contentRect.width)return;Se=E.contentRect.width;const{type:K}=e;if((K==="line"||K==="bar")&&ve(),K!=="segment"){const{placement:T}=e;De((T==="top"||T==="bottom"?(A=m.value)===null||A===void 0?void 0:A.$el:h.value)||null)}}const le=ii(we,64);r.watch([()=>e.justifyContent,()=>e.size],()=>{r.nextTick(()=>{const{type:E}=e;(E==="line"||E==="bar")&&ve()})});const Me=r.ref(!1);function Re(E){var A;const{target:K,contentRect:{width:T}}=E,C=K.parentElement.offsetWidth;if(!Me.value)C<T&&(Me.value=!0);else{const{value:_}=b;if(!_)return;C-T>_.$el.offsetWidth&&(Me.value=!1)}De(((A=m.value)===null||A===void 0?void 0:A.$el)||null)}const He=ii(Re,64);function Ie(){const{onAdd:E}=e;E&&E(),r.nextTick(()=>{const A=p(),{value:K}=m;!A||!K||K.scrollTo({left:A.offsetLeft,top:0,behavior:"smooth"})})}function De(E){if(!E)return;const{placement:A}=e;if(A==="top"||A==="bottom"){const{scrollLeft:K,scrollWidth:T,offsetWidth:C}=E;x.value=K<=0,w.value=K+C>=T}else{const{scrollTop:K,scrollHeight:T,offsetHeight:C}=E;x.value=K<=0,w.value=K+C>=T}}const Ue=ii(E=>{De(E.target)},64);r.provide(Ti,{triggerRef:r.toRef(e,"trigger"),tabStyleRef:r.toRef(e,"tabStyle"),tabClassRef:r.toRef(e,"tabClass"),addTabStyleRef:r.toRef(e,"addTabStyle"),addTabClassRef:r.toRef(e,"addTabClass"),paneClassRef:r.toRef(e,"paneClass"),paneStyleRef:r.toRef(e,"paneStyle"),mergedClsPrefixRef:l,typeRef:r.toRef(e,"type"),closableRef:r.toRef(e,"closable"),valueRef:$,tabChangeIdRef:k,onBeforeLeaveRef:r.toRef(e,"onBeforeLeave"),activateTab:ce,handleClose:te,handleAdd:Ie}),aa(()=>{I(),D()}),r.watchEffect(()=>{const{value:E}=u;if(!E)return;const{value:A}=l,K=`${A}-tabs-nav-scroll-wrapper--shadow-start`,T=`${A}-tabs-nav-scroll-wrapper--shadow-end`;x.value?E.classList.remove(K):E.classList.add(K),w.value?E.classList.remove(T):E.classList.add(T)});const ke={syncBarPosition:()=>{I()}},X=()=>{oe({transitionDisabled:!0})},O=r.computed(()=>{const{value:E}=g,{type:A}=e,K={card:"Card",bar:"Bar",line:"Line",segment:"Segment"}[A],T=`${E}${K}`,{self:{barColor:C,closeIconColor:_,closeIconColorHover:re,closeIconColorPressed:xe,tabColor:Te,tabBorderColor:Ne,paneTextColor:Oe,tabFontWeight:Ee,tabBorderRadius:Ke,tabFontWeightActive:lt,colorSegment:Ye,fontWeightStrong:it,tabColorSegment:v,closeSize:H,closeIconSize:J,closeColorHover:ae,closeColorPressed:se,closeBorderRadius:ue,[ee("panePadding",E)]:fe,[ee("tabPadding",T)]:ge,[ee("tabPaddingVertical",T)]:ze,[ee("tabGap",T)]:ct,[ee("tabGap",`${T}Vertical`)]:qt,[ee("tabTextColor",A)]:yn,[ee("tabTextColorActive",A)]:Yt,[ee("tabTextColorHover",A)]:Zt,[ee("tabTextColorDisabled",A)]:hr,[ee("tabFontSize",E)]:pr},common:{cubicBezierEaseInOut:Vn}}=d.value;return{"--n-bezier":Vn,"--n-color-segment":Ye,"--n-bar-color":C,"--n-tab-font-size":pr,"--n-tab-text-color":yn,"--n-tab-text-color-active":Yt,"--n-tab-text-color-disabled":hr,"--n-tab-text-color-hover":Zt,"--n-pane-text-color":Oe,"--n-tab-border-color":Ne,"--n-tab-border-radius":Ke,"--n-close-size":H,"--n-close-icon-size":J,"--n-close-color-hover":ae,"--n-close-color-pressed":se,"--n-close-border-radius":ue,"--n-close-icon-color":_,"--n-close-icon-color-hover":re,"--n-close-icon-color-pressed":xe,"--n-tab-color":Te,"--n-tab-font-weight":Ee,"--n-tab-font-weight-active":lt,"--n-tab-padding":ge,"--n-tab-padding-vertical":ze,"--n-tab-gap":ct,"--n-tab-gap-vertical":qt,"--n-pane-padding-left":st(fe,"left"),"--n-pane-padding-right":st(fe,"right"),"--n-pane-padding-top":st(fe,"top"),"--n-pane-padding-bottom":st(fe,"bottom"),"--n-font-weight-strong":it,"--n-tab-color-segment":v}}),ne=s?tt("tabs",r.computed(()=>`${g.value[0]}${e.type[0]}`),O,e):void 0;return Object.assign({mergedClsPrefix:l,mergedValue:$,renderedNames:new Set,segmentCapsuleElRef:ye,tabsPaneWrapperRef:j,tabsElRef:c,barElRef:f,addTabInstRef:b,xScrollInstRef:m,scrollWrapperElRef:u,addTabFixed:Me,tabWrapperStyle:M,handleNavResize:le,mergedSize:g,handleScroll:Ue,handleTabsResize:He,cssVars:s?void 0:O,themeClass:ne==null?void 0:ne.themeClass,animationDirection:ie,renderNameListRef:de,yScrollElRef:h,handleSegmentResize:X,onAnimationBeforeLeave:Z,onAnimationEnter:q,onAnimationAfterEnter:Y,onRender:ne==null?void 0:ne.onRender},ke)},render(){const{mergedClsPrefix:e,type:t,placement:n,addTabFixed:o,addable:i,mergedSize:a,renderNameListRef:l,onRender:s,paneWrapperClass:d,paneWrapperStyle:c,$slots:{default:f,prefix:u,suffix:b}}=this;s==null||s();const m=f?Tn(f()).filter(k=>k.type.__TAB_PANE__===!0):[],h=f?Tn(f()).filter(k=>k.type.__TAB__===!0):[],x=!h.length,w=t==="card",g=t==="segment",P=!w&&!g&&this.justifyContent;l.value=[];const L=()=>{const k=r.h("div",{style:this.tabWrapperStyle,class:[`${e}-tabs-wrapper`]},P?null:r.h("div",{class:`${e}-tabs-scroll-padding`,style:{width:`${this.tabsPadding}px`}}),x?m.map((M,p)=>(l.value.push(M.props.name),Pi(r.h(zi,Object.assign({},M.props,{internalCreatedByPane:!0,internalLeftPadded:p!==0&&(!P||P==="center"||P==="start"||P==="end")}),M.children?{default:M.children.tab}:void 0)))):h.map((M,p)=>(l.value.push(M.props.name),Pi(p!==0&&!P?Es(M):M))),!o&&i&&w?_s(i,(x?m.length:h.length)!==0):null,P?null:r.h("div",{class:`${e}-tabs-scroll-padding`,style:{width:`${this.tabsPadding}px`}}));return r.h("div",{ref:"tabsElRef",class:`${e}-tabs-nav-scroll-content`},w&&i?r.h(Wt,{onResize:this.handleTabsResize},{default:()=>k}):k,w?r.h("div",{class:`${e}-tabs-pad`}):null,w?null:r.h("div",{ref:"barElRef",class:`${e}-tabs-bar`}))},$=g?"top":n;return r.h("div",{class:[`${e}-tabs`,this.themeClass,`${e}-tabs--${t}-type`,`${e}-tabs--${a}-size`,P&&`${e}-tabs--flex`,`${e}-tabs--${$}`],style:this.cssVars},r.h("div",{class:[`${e}-tabs-nav--${t}-type`,`${e}-tabs-nav--${$}`,`${e}-tabs-nav`]},Ae(u,k=>k&&r.h("div",{class:`${e}-tabs-nav__prefix`},k)),g?r.h(Wt,{onResize:this.handleSegmentResize},{default:()=>r.h("div",{class:`${e}-tabs-rail`,ref:"tabsElRef"},r.h("div",{class:`${e}-tabs-capsule`,ref:"segmentCapsuleElRef"},r.h("div",{class:`${e}-tabs-wrapper`},r.h("div",{class:`${e}-tabs-tab`}))),x?m.map((k,M)=>(l.value.push(k.props.name),r.h(zi,Object.assign({},k.props,{internalCreatedByPane:!0,internalLeftPadded:M!==0}),k.children?{default:k.children.tab}:void 0))):h.map((k,M)=>(l.value.push(k.props.name),M===0?k:Es(k))))}):r.h(Wt,{onResize:this.handleNavResize},{default:()=>r.h("div",{class:`${e}-tabs-nav-scroll-wrapper`,ref:"scrollWrapperElRef"},["top","bottom"].includes($)?r.h(Mc,{ref:"xScrollInstRef",onScroll:this.handleScroll},{default:L}):r.h("div",{class:`${e}-tabs-nav-y-scroll`,onScroll:this.handleScroll,ref:"yScrollElRef"},L()))}),o&&i&&w?_s(i,!0):null,Ae(b,k=>k&&r.h("div",{class:`${e}-tabs-nav__suffix`},k))),x&&(this.animated&&($==="top"||$==="bottom")?r.h("div",{ref:"tabsPaneWrapperRef",style:c,class:[`${e}-tabs-pane-wrapper`,d]},Rs(m,this.mergedValue,this.renderedNames,this.onAnimationBeforeLeave,this.onAnimationEnter,this.onAnimationAfterEnter,this.animationDirection)):Rs(m,this.mergedValue,this.renderedNames)))}});function Rs(e,t,n,o,i,a,l){const s=[];return e.forEach(d=>{const{name:c,displayDirective:f,"display-directive":u}=d.props,b=h=>f===h||u===h,m=t===c;if(d.key!==void 0&&(d.key=c),m||b("show")||b("show:lazy")&&n.has(c)){n.has(c)||n.add(c);const h=!b("if");s.push(h?r.withDirectives(d,[[r.vShow,m]]):d)}}),l?r.h(r.TransitionGroup,{name:`${l}-transition`,onBeforeLeave:o,onEnter:i,onAfterEnter:a},{default:()=>s}):s}function _s(e,t){return r.h(zi,{ref:"addTabInstRef",key:"__addable",name:"__addable",internalCreatedByPane:!0,internalAddable:!0,internalLeftPadded:t,disabled:typeof e=="object"&&e.disabled})}function Es(e){const t=r.cloneVNode(e);return t.props?t.props.internalLeftPadded=!0:t.props={internalLeftPadded:!0},t}function Pi(e){return Array.isArray(e.dynamicProps)?e.dynamicProps.includes("internalLeftPadded")||e.dynamicProps.push("internalLeftPadded"):e.dynamicProps=["internalLeftPadded"],e}async function Bs(e,t,n){try{const{data:o}=await Qt().POST("/api/visualizations",{type:e,title:t,config:n});return o.id}catch(o){Sn(o)}}async function C0(e,t,n,o){try{if(t)await Ms(t,n,o);else return await Bs(e,n,o)}catch(i){Sn(i)}}async function Ms(e,t,n){try{await Qt().PUT(`/api/visualizations/${e}`,{title:t,config:n})}catch(o){Sn(o)}}function Is(e){const t={};return e&&e.forEach(n=>{n.name?t[n.name]=n.value??null:console.debug("Warning: Detected input element with no name.")}),t}const S0={key:2,class:"border border-dotted border-green-600 rounded mt-2 p-2"},$0=r.defineComponent({__name:"InputConditional",props:r.mergeModels({datasetId:{},input:{}},{value:{},valueModifiers:{}}),emits:r.mergeModels(["update:value"],["update:value"]),setup(e,{emit:t}){const n=e,o=t;if(!n.input.test_param)throw`The conditional '${n.input.name}' is missing a test parameter.`;if(!n.input.cases||n.input.cases.length===0)throw`The conditional '${n.input.name}' is missing a cases.`;const i=r.ref(n.input.test_param),a=i.value.name;a||console.error(`Test parameter has no name: ${n.input.name}.`);const l=r.useModel(e,"value");(!l.value||!(a in l.value))&&console.error(`Test parameter of conditional not available: ${n.input.name}.`,l.value);const s=r.ref(b()),d=r.computed(()=>{const h={};if(n.input.cases&&n.input.cases.length>0)for(const x of n.input.cases)h[x.value]=Is(x.inputs),h[x.value][a]=x.value;return h}),c=r.computed(()=>{const h={};if(n.input.cases&&n.input.cases.length>0)for(const x of n.input.cases)h[x.value]=x.inputs;return h}),f=r.computed(()=>c.value[s.value]),u=r.computed({get(){return s.value==="true"},set(h){s.value=String(h)}});function b(){return l.value&&l.value[a]}function m(h){let x={...d.value[s.value]};if(h){const w={};f.value.forEach(g=>{w[g.name]=h[g.name]}),x={...x,...h}}o("update:value",x)}return r.watch(()=>l.value,()=>{s.value=b()}),r.watch(()=>s.value,()=>{m()}),(h,x)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[i.value.type==="boolean"?(r.openBlock(),r.createBlock(r.unref(Ts),{key:0,value:u.value,"onUpdate:value":x[0]||(x[0]=w=>u.value=w)},null,8,["value"])):(r.openBlock(),r.createBlock(r.unref(oo),{key:1,value:s.value,"onUpdate:value":x[1]||(x[1]=w=>s.value=w),options:i.value.data},null,8,["value","options"])),f.value?(r.openBlock(),r.createElementBlock("div",S0,[r.createVNode(Ri,{"dataset-id":h.datasetId,inputs:f.value,values:l.value,"onUpdate:values":m},null,8,["dataset-id","inputs","values"])])):r.createCommentVNode("",!0)],64))}}),k0={key:0,class:"mb-1"},T0={key:1,class:"text-red-600 mb-1"},z0=r.createElementVNode("span",null,"Please select a dataset.",-1),P0=100,R0=r.defineComponent({__name:"InputData",props:r.mergeModels({extension:{},optional:{type:Boolean}},{value:{},valueModifiers:{}}),emits:["update:value"],setup(e){const t=e,n=r.ref([]),o=r.useModel(e,"value"),i=r.ref(!1),a=r.ref(null);async function l(d){i.value=!0;try{const c=t.extension?`q=extension-eq&qv=${t.extension}`:"",f=d?`q=name-contains&qv=${d}`:"",{data:u}=await Qt().GET(`/api/datasets?limit=${P0}&${c}&${f}`);if(u&&u.length>0){const b=u.map(m=>({label:m.name,value:{id:m.id,name:m.name}}));b.push({label:"...filter for more",value:null,disabled:!0}),t.optional&&b.unshift({label:"-- Clear Selection --",value:null}),n.value=b}}catch(c){console.log(c)}finally{i.value=!1}}function s(){o.value=a.value,a.value=null}return l(),(d,c)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[o.value?(r.openBlock(),r.createElementBlock("div",k0,[r.createVNode(r.unref(mt),{class:"size-3 mr-1"},{default:r.withCtx(()=>[r.createVNode(r.unref(Hi))]),_:1}),r.createElementVNode("span",null,"Selected: "+r.toDisplayString(o.value.name),1)])):d.optional?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",T0,[r.createVNode(r.unref(mt),{class:"size-3 mr-1"},{default:r.withCtx(()=>[r.createVNode(r.unref(Ni))]),_:1}),z0])),r.createVNode(r.unref(oo),{value:a.value,"onUpdate:value":[c[0]||(c[0]=f=>a.value=f),s],filterable:"",placeholder:"Select a Dataset",loading:i.value,options:n.value,onSearch:l},null,8,["value","loading","options"])],64))}});function _0(e,t,n,o){const i=[];t&&i.push({label:"Column: Default",value:"auto"});const a=e.metadata_column_types;for(const l in a)(o&&["int","float"].includes(a[l])||n&&a[l]==="str"||!o&&!n)&&i.push({label:"Column: "+(parseInt(l)+1),value:l});return i}const E0=r.defineComponent({__name:"InputDataColumn",props:r.mergeModels({datasetId:{},isAuto:{type:Boolean},isText:{type:Boolean},isNumber:{type:Boolean}},{value:{},valueModifiers:{}}),emits:["update:value"],setup(e){const t=e,n=r.ref([]),o=r.useModel(e,"value");async function i(){if(t.datasetId)try{const{data:l}=await Qt().GET(`/api/datasets/${t.datasetId}`),s=_0(l,t.isAuto,t.isText,t.isNumber);n.value=s,a()}catch(l){console.log(l)}else console.log("Data column selector disabled, since `datasetId` is unavailable.")}function a(){n.value.length>0&&o.value===null&&(o.value=n.value[0].value)}return i(),r.watch(()=>o.value,()=>a()),(l,s)=>l.datasetId?(r.openBlock(),r.createBlock(r.unref(oo),{key:0,value:o.value,"onUpdate:value":s[0]||(s[0]=d=>o.value=d),options:n.value},null,8,["value","options"])):(r.openBlock(),r.createBlock(r.unref(Fn),{key:1,value:o.value,"onUpdate:value":s[1]||(s[1]=d=>o.value=d)},null,8,["value"]))}});function fr(e){return String(e).toLowerCase()==="true"}const B0={class:"overflow-auto select-none"},M0={class:"font-bold pb-1"},I0={key:0,class:"text-xs pb-1"},O0={key:5},Os=.01,Ri=r.defineComponent({__name:"InputForm",props:{datasetId:{},inputs:{},values:{}},emits:["update:values"],setup(e,{emit:t}){const n=e,o=t,i=r.ref(a());function a(){const s={...n.values};return n.inputs.forEach(d=>{s[d.name]===void 0&&(s[d.name]=null)}),s}function l(){o("update:values",i.value)}return r.watch(()=>n.values,()=>{i.value=a()}),(s,d)=>(r.openBlock(),r.createElementBlock("div",B0,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(s.inputs,(c,f)=>(r.openBlock(),r.createElementBlock("div",{key:f,class:"pb-2"},[r.createElementVNode("div",M0,r.toDisplayString(c.label||c.name),1),c.help?(r.openBlock(),r.createElementBlock("div",I0,r.toDisplayString(c.help),1)):r.createCommentVNode("",!0),r.createElementVNode("div",null,[c.type==="boolean"?(r.openBlock(),r.createBlock(r.unref(Ts),{key:0,value:i.value[c.name],"onUpdate:value":[u=>i.value[c.name]=u,d[0]||(d[0]=u=>l())]},null,8,["value","onUpdate:value"])):c.type==="color"?(r.openBlock(),r.createBlock(r.unref(Fv),{key:1,value:i.value[c.name],"onUpdate:value":[u=>i.value[c.name]=u,d[1]||(d[1]=u=>l())],modes:["hex"],"show-alpha":!1},null,8,["value","onUpdate:value"])):c.type==="conditional"?(r.openBlock(),r.createBlock($0,{key:2,value:i.value[c.name],"onUpdate:value":[u=>i.value[c.name]=u,d[2]||(d[2]=u=>l())],"dataset-id":s.datasetId,input:c},null,8,["value","onUpdate:value","dataset-id","input"])):c.type==="data"?(r.openBlock(),r.createBlock(R0,{key:3,value:i.value[c.name],"onUpdate:value":[u=>i.value[c.name]=u,d[3]||(d[3]=u=>l())],extension:c.extension,optional:r.unref(fr)(c.optional)},null,8,["value","onUpdate:value","extension","optional"])):c.type==="data_column"?(r.openBlock(),r.createBlock(E0,{key:4,value:i.value[c.name],"onUpdate:value":[u=>i.value[c.name]=u,d[4]||(d[4]=u=>l())],"dataset-id":s.datasetId,"is-auto":r.unref(fr)(c.is_auto),"is-text":r.unref(fr)(c.is_text),"is-number":r.unref(fr)(c.is_number)},null,8,["value","onUpdate:value","dataset-id","is-auto","is-text","is-number"])):c.type==="float"?(r.openBlock(),r.createElementBlock("div",O0,[c.min!==void 0&&c.max!==void 0?(r.openBlock(),r.createBlock(r.unref(b0),{key:0,class:"mb-2",value:i.value[c.name],"onUpdate:value":[u=>i.value[c.name]=u,d[5]||(d[5]=u=>l())],min:Number(c.min),max:Number(c.max),step:Os},null,8,["value","onUpdate:value","min","max"])):r.createCommentVNode("",!0),r.createVNode(r.unref(u0),{value:i.value[c.name],"onUpdate:value":[u=>i.value[c.name]=u,d[6]||(d[6]=u=>l())],size:"small",min:Number(c.min),max:Number(c.max),step:Os},null,8,["value","onUpdate:value","min","max"])])):c.type==="select"?(r.openBlock(),r.createBlock(r.unref(oo),{key:6,value:i.value[c.name],"onUpdate:value":[u=>i.value[c.name]=u,d[7]||(d[7]=u=>l())],options:c.data},null,8,["value","onUpdate:value","options"])):c.type==="textarea"?(r.openBlock(),r.createBlock(r.unref(Fn),{key:7,value:i.value[c.name],"onUpdate:value":[u=>i.value[c.name]=u,d[8]||(d[8]=u=>l())],rows:Number(c.rows),type:"textarea"},null,8,["value","onUpdate:value","rows"])):(r.openBlock(),r.createBlock(r.unref(Fn),{key:8,value:i.value[c.name],"onUpdate:value":[u=>i.value[c.name]=u,d[9]||(d[9]=u=>l())]},null,8,["value","onUpdate:value"]))])]))),128))]))}}),A0=r.createElementVNode("span",{class:"mx-1"},"Add New Track",-1),F0={class:"border border-dotted border-green-600 rounded p-2"},D0={class:"flex text-green-600 my-1"},V0={class:"mx-1"},L0=r.defineComponent({__name:"InputRepeats",props:{datasetId:{},inputs:{},valuesArray:{}},emits:["update:values-array"],setup(e,{emit:t}){const n=e,o=t,i=r.computed(()=>Is(n.inputs));function a(){const d=[...n.valuesArray];d.unshift(i.value),o("update:values-array",d)}function l(d){const c=[...n.valuesArray];c.splice(d,1),o("update:values-array",c)}function s(d,c){const f=[...n.valuesArray];f[d]={...c},o("update:values-array",f)}return(d,c)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[r.createVNode(r.unref(Pt),{size:"tiny",type:"primary",class:"mb-2",onClick:a},{default:r.withCtx(()=>[r.createVNode(r.unref(mt),null,{default:r.withCtx(()=>[r.createVNode(r.unref(js))]),_:1}),A0]),_:1}),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(d.valuesArray,(f,u)=>(r.openBlock(),r.createElementBlock("div",{key:u,class:"my-2"},[r.createElementVNode("div",F0,[r.createVNode(Ri,{"dataset-id":d.datasetId,inputs:d.inputs,values:f,"onUpdate:values":b=>s(u,b)},null,8,["dataset-id","inputs","values","onUpdate:values"]),r.createElementVNode("div",D0,[r.createVNode(r.unref(Pt),{class:"text-green-600 w-full",size:"tiny",round:"",disabled:d.valuesArray.length<=1,onClick:b=>l(u)},{default:r.withCtx(()=>[r.createVNode(r.unref(mt),null,{default:r.withCtx(()=>[r.createVNode(r.unref(Gs))]),_:1}),r.createElementVNode("span",V0,"Remove Track "+r.toDisplayString(d.valuesArray.length-u),1)]),_:2},1032,["disabled","onClick"])])])]))),128))],64))}}),H0=2e3,N0=r.defineComponent({__name:"AlertNotify",props:{message:{},messageType:{default:"info"}},emits:["timeout"],setup(e,{emit:t}){const n=e,o=t;let i=null;return r.watch(()=>n.message,()=>{i&&clearTimeout(i),i=setTimeout(()=>o("timeout"),H0)}),(a,l)=>a.message?(r.openBlock(),r.createBlock(r.unref(xi),{key:0,type:a.messageType,class:"m-4"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(a.message),1)]),_:1},8,["type"])):r.createCommentVNode("",!0)}}),W0={class:"text-xs"},j0=r.createElementVNode("span",{class:"text-xs"},"Galaxy is not accessible!",-1),U0=r.defineComponent({__name:"ApiStatus",setup(e){const t=r.ref("...");async function n(){try{const{data:o}=await Qt().GET("/api/version");t.value=o.version_major}catch{console.log("Unable to connect to Galaxy. Verify Galaxy is running and refer to docs."),t.value=""}}return n(),(o,i)=>t.value?(r.openBlock(),r.createBlock(r.unref(cr),{key:0,class:"mx-1",trigger:"hover"},{trigger:r.withCtx(()=>[r.createVNode(r.unref(mt),{class:"mx-1"},{default:r.withCtx(()=>[r.createVNode(r.unref(Hi),{class:"text-green-600"})]),_:1})]),default:r.withCtx(()=>[r.createElementVNode("span",W0,"Connected to Galaxy Version "+r.toDisplayString(t.value)+".",1)]),_:1})):(r.openBlock(),r.createBlock(r.unref(cr),{key:1,class:"mx-1",trigger:"hover"},{trigger:r.withCtx(()=>[r.createVNode(r.unref(mt),{class:"mx-1"},{default:r.withCtx(()=>[r.createVNode(r.unref(Ni),{class:"text-red-600"})]),_:1})]),default:r.withCtx(()=>[j0]),_:1}))}}),G0={class:"overflow-auto select-none bg-white z-10"},K0={class:"flex p-2"},X0={class:"flex-1 font-thin text-lg p-1 p-2"},q0=r.createElementVNode("span",null,"Charts",-1),Y0={key:0},Z0=r.createElementVNode("span",{class:"text-xs"},"Save",-1),J0=r.createElementVNode("span",{class:"text-xs"},"Collapse",-1),Q0={class:"m-4 mt-0 p-2 bg-sky-50 text-sky-900 rounded"},ex={class:"flex"},tx={class:"flex justify-center center-items"},nx={class:"m-2"},rx=["src"],ox={key:1,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 100 100",class:"size-14"},ix=[r.createElementVNode("circle",{cx:"50",cy:"50",r:"45",stroke:"#E30A17","stroke-width":"5"},null,-1),r.createElementVNode("path",{d:"M 50,5 A 45,45 0 0,1 95,50 L 50,50 Z",fill:"#E30A17"},null,-1)],ax={class:"overflow-hidden break-words p-1"},lx={class:"font-bold"},sx=["innerHTML"],dx={class:"px-4 pb-2"},cx=r.createElementVNode("div",{class:"font-bold"},"Title",-1),ux=r.createElementVNode("div",{class:"text-xs py-1"},"Specify a visualization title.",-1),fx=r.createElementVNode("span",{class:"mx-1"},"Tracks",-1),hx=r.createElementVNode("span",{class:"mx-1"},"Settings",-1),px=r.defineComponent({__name:"SidePanel",props:{datasetId:{},description:{},logoUrl:{},html:{},name:{},settingInputs:{},settingValues:{},trackInputs:{},trackValues:{},visualizationId:{},visualizationTitle:{}},emits:["update:tracks","update:settings","update:visualization-id","update:visualization-title","toggle"],setup(e,{emit:t}){const n=e,o=t,i=r.ref(""),a=r.ref("info"),l=r.computed(()=>n.settingInputs.length===0||n.trackInputs.length===0);async function s(){try{if(n.visualizationId)await Ms(n.visualizationId,n.visualizationTitle,{dataset_id:n.datasetId,settings:n.settingValues,tracks:n.trackValues}),i.value="Successfully saved.",a.value="success";else{const u=await Bs(n.name,n.visualizationTitle,{dataset_id:n.datasetId,settings:n.settingValues,tracks:n.trackValues});u?(i.value="Successfully created.",a.value="success",o("update:visualization-id",u)):(i.value="Something went wrong.",a.value="error")}}catch(u){i.value=Ai(u),a.value="error"}}function d(u){o("update:settings",u)}function c(u){o("update:tracks",u)}function f(u){o("update:visualization-title",u)}return(u,b)=>(r.openBlock(),r.createElementBlock("div",G0,[r.createElementVNode("div",K0,[r.createElementVNode("div",X0,[q0,r.createVNode(U0)]),u.datasetId?(r.openBlock(),r.createElementBlock("div",Y0,[r.createVNode(r.unref(cr),{trigger:"hover"},{trigger:r.withCtx(()=>[r.createVNode(r.unref(Pt),{strong:"",secondary:"",circle:"",class:"bg-sky-100 m-1",onClick:s},{icon:r.withCtx(()=>[r.createVNode(r.unref(mt),null,{default:r.withCtx(()=>[r.createVNode(r.unref(Ws))]),_:1})]),_:1})]),default:r.withCtx(()=>[Z0]),_:1}),r.createVNode(r.unref(cr),{trigger:"hover"},{trigger:r.withCtx(()=>[r.createVNode(r.unref(Pt),{strong:"",secondary:"",circle:"",class:"bg-sky-100 m-1",onClick:b[0]||(b[0]=m=>o("toggle"))},{icon:r.withCtx(()=>[r.createVNode(r.unref(mt),null,{default:r.withCtx(()=>[r.createVNode(r.unref(Ns))]),_:1})]),_:1})]),default:r.withCtx(()=>[J0]),_:1})])):r.createCommentVNode("",!0)]),r.createVNode(N0,{message:i.value,"message-type":a.value,onTimeout:b[1]||(b[1]=m=>i.value=""),class:"m-4"},null,8,["message","message-type"]),r.createElementVNode("div",Q0,[r.createElementVNode("div",ex,[r.createElementVNode("div",tx,[r.createElementVNode("div",nx,[n.logoUrl?(r.openBlock(),r.createElementBlock("img",{key:0,src:n.logoUrl,class:"min-w-14 max-w-14 object-contain"},null,8,rx)):(r.openBlock(),r.createElementBlock("svg",ox,ix))])]),r.createElementVNode("div",ax,[r.createElementVNode("span",lx,r.toDisplayString(u.html),1),r.createElementVNode("div",{class:"text-xs",innerHTML:u.description},null,8,sx)])])]),r.createElementVNode("div",dx,[cx,ux,r.createVNode(r.unref(Fn),{value:u.visualizationTitle,onInput:f},null,8,["value"])]),r.createVNode(r.unref(w0),{type:"line",animated:"",class:"px-4","tab-class":l.value?"!hidden":""},{default:r.withCtx(()=>[u.trackInputs.length>0?(r.openBlock(),r.createBlock(r.unref(Ps),{key:0,name:"tracks"},{tab:r.withCtx(()=>[r.createVNode(r.unref(mt),null,{default:r.withCtx(()=>[r.createVNode(r.unref(Us))]),_:1}),fx]),default:r.withCtx(()=>[r.createVNode(L0,{"dataset-id":u.datasetId,inputs:u.trackInputs,"values-array":u.trackValues,"onUpdate:valuesArray":c},null,8,["dataset-id","inputs","values-array"])]),_:1})):r.createCommentVNode("",!0),u.settingInputs.length>0?(r.openBlock(),r.createBlock(r.unref(Ps),{key:1,name:"settings"},{tab:r.withCtx(()=>[r.createVNode(r.unref(mt),null,{default:r.withCtx(()=>[r.createVNode(r.unref(Vs))]),_:1}),hx]),default:r.withCtx(()=>[r.createVNode(Ri,{"dataset-id":u.datasetId,inputs:u.settingInputs,values:u.settingValues,"onUpdate:values":d},null,8,["dataset-id","inputs","values"])]),_:1})):r.createCommentVNode("",!0)]),_:1},8,["tab-class"])]))}});async function bx(e,t={}){const n=_i(e.settings,t.settings),o=e.specs,i=vx(e.tracks,t.tracks);return{plugin:e,settings:n,specs:o,tracks:i}}function gx(e,t){let n=t??e.value;return e.type==="float"?n=Number(n):e.type==="boolean"&&(n=fr(n)),n}function mx(e,t={}){var i,a,l;const n=t,o=(i=e.test_param)==null?void 0:i.name;if(!o)console.error(`Test parameter has no name: ${e.name}.`);else{const s=n[o]??((a=e.test_param)==null?void 0:a.value);for(const d of e.cases||[])d.value===s&&(n[o]=s,(l=d.inputs)!=null&&l.length&&_i(d.inputs,n))}return n}function _i(e,t){const n=t||{};return e==null||e.forEach(o=>{o.type==="conditional"?n[o.name]=mx(o,n[o.name]):n[o.name]=gx(o,n[o.name])}),n}function vx(e,t){const n=t||[];return e&&(n.length===0&&n.push({}),n.forEach((o,i)=>{n[i]=_i(e,o)})),n}function xx(e,t="app"){if(e===void 0){const s=document.getElementById(t);if(!s)throw new Error(`Container element '${t}' not found.`);e=JSON.parse((s==null?void 0:s.getAttribute("data-incoming"))||"{}")}const n=(e==null?void 0:e.root)??"/",o=(e==null?void 0:e.visualization_config)??{},i=(e==null?void 0:e.visualization_id)??null,a=(e==null?void 0:e.visualization_plugin)??{},l=(e==null?void 0:e.visualization_title)??"Unnamed Visualization";return{root:n,visualizationConfig:o,visualizationId:i,visualizationPlugin:a,visualizationTitle:l}}const yx={key:2,class:"m-2"},wx=r.createElementVNode("span",{class:"text-xs"},"Please wait...",-1),Cx=r.createElementVNode("span",{class:"text-xs"},"Expand",-1),Sx=r.defineComponent({__name:"GalaxyCharts",props:{container:{},credentials:{},incoming:{}},setup(e){const t=e,{root:n,visualizationConfig:o,visualizationId:i,visualizationPlugin:a,visualizationTitle:l}=xx(t.incoming,t.container),s=r.ref(!1),d=r.ref(""),c=r.ref(""),f=r.ref(""),u=r.ref(!0),b=r.ref(""),m=r.ref(""),h=r.ref([]),x=r.ref({}),w=r.ref({}),g=r.ref([]),P=r.ref([]),L=r.ref(i),$=r.ref(l),k=Vi();k.setCredentials(t.credentials||"include"),k.setRoot(n||"/"),bx(a,o).then(({plugin:Y,settings:de,specs:ie,tracks:ce})=>{d.value=Y.description||"",f.value=Y.html||"",u.value=!1,b.value=Y.logo||"",m.value=Y.name||"",h.value=Y.settings||[],x.value=de,w.value=ie||{},g.value=Y.tracks||[],P.value=ce});const M=r.computed(()=>o.dataset_id||""),p=r.computed(()=>o.dataset_url?(console.debug(`GalaxyCharts: Evaluating dataset url: ${o.dataset_url}.`),o.dataset_url):M.value?(console.debug(`GalaxyCharts: Built dataset url from dataset id: ${M.value}.`),Fs(n,M.value)):null),S=r.computed(()=>b.value&&`${n}${b.value}`),B=r.computed(()=>h.value.length===0&&g.value.length===0);async function F(){s.value=!s.value,await r.nextTick(),window?window.dispatchEvent(new Event("resize")):console.warn("window unavailable.")}function I(){try{window.postMessage({container:t.container,from:"galaxy-visualization",visualization_config:JSON.parse(JSON.stringify(D())),visualization_id:L.value,visualization_title:$.value},"*")}catch(Y){c.value=`Failed to postMessage: ${Y}`}}function D(){return{dataset_id:M.value,settings:x.value,tracks:P.value}}function j(Y){x.value={...Y},I()}function Q(Y){P.value=[...Y],I()}function N(Y){L.value=Y,I()}function Z(Y){$.value=Y,I()}async function q(Y){j({...x.value,...Y});try{const de=await C0(m.value,L.value,$.value,D());de&&N(de)}catch(de){c.value=`Failed to save: ${de}`}}return(Y,de)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[c.value?(r.openBlock(),r.createBlock(r.unref(xi),{key:0,type:"error",class:"m-2"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(c.value),1)]),_:1})):r.createCommentVNode("",!0),p.value?r.createCommentVNode("",!0):(r.openBlock(),r.createBlock(r.unref(xi),{key:1,type:"info",class:"m-2"},{default:r.withCtx(()=>[r.createTextVNode(" Only displaying available visualization inputs. Rendering requires `dataset_id` or `dataset_url`. ")]),_:1})),u.value?(r.openBlock(),r.createElementBlock("div",yx,[r.createElementVNode("span",null,[r.createVNode(r.unref(Ls),{class:"animate-spin size-4 inline mx-1"})]),wx])):(r.openBlock(),r.createElementBlock("div",{key:3,class:r.normalizeClass(["grid h-screen",{"grid-cols-[1fr_17rem]":!s.value&&p.value&&!B.value}])},[p.value?r.renderSlot(Y.$slots,"default",{key:0,datasetId:M.value,datasetUrl:p.value,root:r.unref(n),settings:x.value,specs:w.value,tracks:P.value,save:q}):r.createCommentVNode("",!0),s.value&&p.value&&!B.value?(r.openBlock(),r.createBlock(r.unref(cr),{key:1,trigger:"hover"},{trigger:r.withCtx(()=>[r.createVNode(r.unref(Pt),{strong:"",secondary:"",circle:"",class:"bg-sky-100 m-3 absolute right-0",onClick:F},{icon:r.withCtx(()=>[r.createVNode(r.unref(mt),null,{default:r.withCtx(()=>[r.createVNode(r.unref(Hs))]),_:1})]),_:1})]),default:r.withCtx(()=>[Cx]),_:1})):B.value?r.createCommentVNode("",!0):(r.openBlock(),r.createBlock(px,{key:2,"dataset-id":M.value,description:d.value,html:f.value,"logo-url":S.value,name:m.value,"setting-inputs":h.value,"setting-values":x.value,"track-inputs":g.value,"track-values":P.value,"visualization-id":L.value,"visualization-title":$.value,"onUpdate:settings":j,"onUpdate:tracks":Q,"onUpdate:visualizationId":N,"onUpdate:visualizationTitle":Z,onToggle:F},null,8,["dataset-id","description","html","logo-url","name","setting-inputs","setting-values","track-inputs","track-values","visualization-id","visualization-title"]))],2))],64))}});We.GalaxyApi=Qt,We.GalaxyCharts=Sx,We.useColumnsStore=Ds,Object.defineProperty(We,Symbol.toStringTag,{value:"Module"})});
|