@oiij/chrome-tabs 0.0.2 → 0.0.3

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.
@@ -1,4 +1,4 @@
1
- import { TabsItemProps } from './index';
1
+ import { TabsItemProps } from '.';
2
2
  declare const _default: import('vue').DefineComponent<TabsItemProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
3
3
  itemClick: (ev: MouseEvent) => any;
4
4
  itemContextmenu: (ev: MouseEvent) => any;
@@ -1,4 +1,4 @@
1
- import { TabsProps } from './index';
1
+ import { TabsProps } from '.';
2
2
  type __VLS_Props = TabsProps;
3
3
  type __VLS_PublicProps = {
4
4
  'value'?: string | number;
package/dist/index.cjs CHANGED
@@ -1,14 +1,14 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("vue");function pe(e){let t=".",n="__",o="--",i;if(e){let a=e.blockPrefix;a&&(t=a),a=e.elementPrefix,a&&(n=a),a=e.modifierPrefix,a&&(o=a)}const l={install(a){i=a.c;const b=a.context;b.bem={},b.bem.b=null,b.bem.els=null}};function u(a){let b,h;return{before(p){b=p.bem.b,h=p.bem.els,p.bem.els=null},after(p){p.bem.b=b,p.bem.els=h},$({context:p,props:k}){return a=typeof a=="string"?a:a({context:p,props:k}),p.bem.b=a,`${(k==null?void 0:k.bPrefix)||t}${p.bem.b}`}}}function s(a){let b;return{before(h){b=h.bem.els},after(h){h.bem.els=b},$({context:h,props:p}){return a=typeof a=="string"?a:a({context:h,props:p}),h.bem.els=a.split(",").map(k=>k.trim()),h.bem.els.map(k=>`${(p==null?void 0:p.bPrefix)||t}${h.bem.b}${n}${k}`).join(", ")}}}function d(a){return{$({context:b,props:h}){a=typeof a=="string"?a:a({context:b,props:h});const p=a.split(",").map(I=>I.trim());function k(I){return p.map(R=>`&${(h==null?void 0:h.bPrefix)||t}${b.bem.b}${I!==void 0?`${n}${I}`:""}${o}${R}`).join(", ")}const S=b.bem.els;if(S!==null){if(process.env.NODE_ENV!=="production"&&S.length>=2)throw Error(`[css-render/plugin-bem]: m(${a}) is invalid, using modifier inside multiple elements is not allowed`);return k(S[0])}else return k()}}}function f(a){return{$({context:b,props:h}){a=typeof a=="string"?a:a({context:b,props:h});const p=b.bem.els;if(process.env.NODE_ENV!=="production"&&p!==null&&p.length>=2)throw Error(`[css-render/plugin-bem]: notM(${a}) is invalid, using modifier inside multiple elements is not allowed`);return`&:not(${(h==null?void 0:h.bPrefix)||t}${b.bem.b}${p!==null&&p.length>0?`${n}${p[0]}`:""}${o}${a})`}}}return Object.assign(l,{cB:(...a)=>i(u(a[0]),a[1],a[2]),cE:(...a)=>i(s(a[0]),a[1],a[2]),cM:(...a)=>i(d(a[0]),a[1],a[2]),cNotM:(...a)=>i(f(a[0]),a[1],a[2])}),l}function ve(e){let t=0;for(let n=0;n<e.length;++n)e[n]==="&"&&++t;return t}const le=/\s*,(?![^(]*\))\s*/g,be=/\s+/g;function ge(e,t){const n=[];return t.split(le).forEach(o=>{let i=ve(o);if(i){if(i===1){e.forEach(u=>{n.push(o.replace("&",u))});return}}else{e.forEach(u=>{n.push((u&&u+" ")+o)});return}let l=[o];for(;i--;){const u=[];l.forEach(s=>{e.forEach(d=>{u.push(s.replace("&",d))})}),l=u}l.forEach(u=>n.push(u))}),n}function xe(e,t){const n=[];return t.split(le).forEach(o=>{e.forEach(i=>{n.push((i&&i+" ")+o)})}),n}function ye(e){let t=[""];return e.forEach(n=>{n=n&&n.trim(),n&&(n.includes("&")?t=ge(t,n):t=xe(t,n))}),t.join(", ").replace(be," ")}function Z(e){if(!e)return;const t=e.parentElement;t&&t.removeChild(e)}function q(e,t){return(t??document.head).querySelector(`style[cssr-id="${e}"]`)}function ke(e){const t=document.createElement("style");return t.setAttribute("cssr-id",e),t}function z(e){return e?/^\s*@(s|m)/.test(e):!1}const $e=/[A-Z]/g;function ue(e){return e.replace($e,t=>"-"+t.toLowerCase())}function Ce(e,t=" "){return typeof e=="object"&&e!==null?` {
2
- `+Object.entries(e).map(n=>t+` ${ue(n[0])}: ${n[1]};`).join(`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("vue");function pe(e){let t=".",n="__",o="--",i;if(e){let a=e.blockPrefix;a&&(t=a),a=e.elementPrefix,a&&(n=a),a=e.modifierPrefix,a&&(o=a)}const l={install(a){i=a.c;const v=a.context;v.bem={},v.bem.b=null,v.bem.els=null}};function s(a){let v,h;return{before(p){v=p.bem.b,h=p.bem.els,p.bem.els=null},after(p){p.bem.b=v,p.bem.els=h},$({context:p,props:k}){return a=typeof a=="string"?a:a({context:p,props:k}),p.bem.b=a,`${k?.bPrefix||t}${p.bem.b}`}}}function u(a){let v;return{before(h){v=h.bem.els},after(h){h.bem.els=v},$({context:h,props:p}){return a=typeof a=="string"?a:a({context:h,props:p}),h.bem.els=a.split(",").map(k=>k.trim()),h.bem.els.map(k=>`${p?.bPrefix||t}${h.bem.b}${n}${k}`).join(", ")}}}function f(a){return{$({context:v,props:h}){a=typeof a=="string"?a:a({context:v,props:h});const p=a.split(",").map(I=>I.trim());function k(I){return p.map(A=>`&${h?.bPrefix||t}${v.bem.b}${I!==void 0?`${n}${I}`:""}${o}${A}`).join(", ")}const S=v.bem.els;if(S!==null){if(process.env.NODE_ENV!=="production"&&S.length>=2)throw Error(`[css-render/plugin-bem]: m(${a}) is invalid, using modifier inside multiple elements is not allowed`);return k(S[0])}else return k()}}}function d(a){return{$({context:v,props:h}){a=typeof a=="string"?a:a({context:v,props:h});const p=v.bem.els;if(process.env.NODE_ENV!=="production"&&p!==null&&p.length>=2)throw Error(`[css-render/plugin-bem]: notM(${a}) is invalid, using modifier inside multiple elements is not allowed`);return`&:not(${h?.bPrefix||t}${v.bem.b}${p!==null&&p.length>0?`${n}${p[0]}`:""}${o}${a})`}}}return Object.assign(l,{cB:(...a)=>i(s(a[0]),a[1],a[2]),cE:(...a)=>i(u(a[0]),a[1],a[2]),cM:(...a)=>i(f(a[0]),a[1],a[2]),cNotM:(...a)=>i(d(a[0]),a[1],a[2])}),l}function ve(e){let t=0;for(let n=0;n<e.length;++n)e[n]==="&"&&++t;return t}const le=/\s*,(?![^(]*\))\s*/g,be=/\s+/g;function ge(e,t){const n=[];return t.split(le).forEach(o=>{let i=ve(o);if(i){if(i===1){e.forEach(s=>{n.push(o.replace("&",s))});return}}else{e.forEach(s=>{n.push((s&&s+" ")+o)});return}let l=[o];for(;i--;){const s=[];l.forEach(u=>{e.forEach(f=>{s.push(u.replace("&",f))})}),l=s}l.forEach(s=>n.push(s))}),n}function xe(e,t){const n=[];return t.split(le).forEach(o=>{e.forEach(i=>{n.push((i&&i+" ")+o)})}),n}function ye(e){let t=[""];return e.forEach(n=>{n=n&&n.trim(),n&&(n.includes("&")?t=ge(t,n):t=xe(t,n))}),t.join(", ").replace(be," ")}function Z(e){if(!e)return;const t=e.parentElement;t&&t.removeChild(e)}function q(e,t){return(t??document.head).querySelector(`style[cssr-id="${e}"]`)}function ke(e){const t=document.createElement("style");return t.setAttribute("cssr-id",e),t}function R(e){return e?/^\s*@(s|m)/.test(e):!1}const $e=/[A-Z]/g;function se(e){return e.replace($e,t=>"-"+t.toLowerCase())}function Ce(e,t=" "){return typeof e=="object"&&e!==null?` {
2
+ `+Object.entries(e).map(n=>t+` ${se(n[0])}: ${n[1]};`).join(`
3
3
  `)+`
4
4
  `+t+"}":`: ${e};`}function we(e,t,n){return typeof e=="function"?e({context:t.context,props:n}):e}function U(e,t,n,o){if(!t)return"";const i=we(t,n,o);if(!i)return"";if(typeof i=="string")return`${e} {
5
5
  ${i}
6
6
  }`;const l=Object.keys(i);if(l.length===0)return n.config.keepEmptyBlock?e+` {
7
- }`:"";const u=e?[e+" {"]:[];return l.forEach(s=>{const d=i[s];if(s==="raw"){u.push(`
8
- `+d+`
9
- `);return}s=ue(s),d!=null&&u.push(` ${s}${Ce(d)}`)}),e&&u.push("}"),u.join(`
10
- `)}function F(e,t,n){e&&e.forEach(o=>{if(Array.isArray(o))F(o,t,n);else if(typeof o=="function"){const i=o(t);Array.isArray(i)?F(i,t,n):i&&n(i)}else o&&n(o)})}function se(e,t,n,o,i){const l=e.$;let u="";if(!l||typeof l=="string")z(l)?u=l:t.push(l);else if(typeof l=="function"){const f=l({context:o.context,props:i});z(f)?u=f:t.push(f)}else if(l.before&&l.before(o.context),!l.$||typeof l.$=="string")z(l.$)?u=l.$:t.push(l.$);else if(l.$){const f=l.$({context:o.context,props:i});z(f)?u=f:t.push(f)}const s=ye(t),d=U(s,e.props,o,i);u?n.push(`${u} {`):d.length&&n.push(d),e.children&&F(e.children,{context:o.context,props:i},f=>{if(typeof f=="string"){const m=U(s,{raw:f},o,i);n.push(m)}else se(f,t,n,o,i)}),t.pop(),u&&n.push("}"),l&&l.after&&l.after(o.context)}function Ee(e,t,n){const o=[];return se(e,[],o,t,n),o.join(`
7
+ }`:"";const s=e?[e+" {"]:[];return l.forEach(u=>{const f=i[u];if(u==="raw"){s.push(`
8
+ `+f+`
9
+ `);return}u=se(u),f!=null&&s.push(` ${u}${Ce(f)}`)}),e&&s.push("}"),s.join(`
10
+ `)}function F(e,t,n){e&&e.forEach(o=>{if(Array.isArray(o))F(o,t,n);else if(typeof o=="function"){const i=o(t);Array.isArray(i)?F(i,t,n):i&&n(i)}else o&&n(o)})}function ue(e,t,n,o,i){const l=e.$;let s="";if(!l||typeof l=="string")R(l)?s=l:t.push(l);else if(typeof l=="function"){const d=l({context:o.context,props:i});R(d)?s=d:t.push(d)}else if(l.before&&l.before(o.context),!l.$||typeof l.$=="string")R(l.$)?s=l.$:t.push(l.$);else if(l.$){const d=l.$({context:o.context,props:i});R(d)?s=d:t.push(d)}const u=ye(t),f=U(u,e.props,o,i);s?n.push(`${s} {`):f.length&&n.push(f),e.children&&F(e.children,{context:o.context,props:i},d=>{if(typeof d=="string"){const m=U(u,{raw:d},o,i);n.push(m)}else ue(d,t,n,o,i)}),t.pop(),s&&n.push("}"),l&&l.after&&l.after(o.context)}function Ee(e,t,n){const o=[];return ue(e,[],o,t,n),o.join(`
11
11
 
12
- `)}function Ne(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 Be(e,t,n,o){const{els:i}=t;if(n===void 0)i.forEach(Z),t.els=[];else{const l=q(n,o);l&&i.includes(l)&&(Z(l),t.els=i.filter(u=>u!==l))}}function K(e,t){e.push(t)}function Ie(e,t,n,o,i,l,u,s,d){let f;if(n===void 0&&(f=t.render(o),n=Ne(f)),d){d.adapter(n,f??t.render(o));return}s===void 0&&(s=document.head);const m=q(n,s);if(m!==null&&!l)return m;const c=m??ke(n);if(f===void 0&&(f=t.render(o)),c.textContent=f,m!==null)return m;if(u){const v=s.querySelector(`meta[name="${u}"]`);if(v)return s.insertBefore(c,v),K(t.els,c),c}return i?s.insertBefore(c,s.querySelector("style, link")):s.appendChild(c),K(t.els,c),c}function Me(e){return Ee(this,this.instance,e)}function Se(e={}){const{id:t,ssr:n,props:o,head:i=!1,force:l=!1,anchorMetaName:u,parent:s}=e;return Ie(this.instance,this,t,o,i,l,u,s,n)}function Ve(e={}){const{id:t,parent:n}=e;Be(this.instance,this,t,n)}const L=function(e,t,n,o){return{instance:e,$:t,props:n,children:o,els:[],render:Me,mount:Se,unmount:Ve}},Ae=function(e,t,n,o){return Array.isArray(t)?L(e,{$:null},null,t):Array.isArray(n)?L(e,t,null,n):Array.isArray(o)?L(e,t,n,o):L(e,t,n,null)};function Re(e={}){const t={c:(...n)=>Ae(t,...n),use:(n,...o)=>n.install(t,...o),find:q,context:{},config:e};return t}function ze(e){const{namespace:t="n",blockPrefix:n=`.${t}-`,elementPrefix:o="__",modifierPrefix:i="--"}=e??{},l=Re(),u=pe({blockPrefix:n,elementPrefix:o,modifierPrefix:i});return l.use(u),{namespace:t,blockPrefix:n,elementPrefix:o,modifierPrefix:i,cssr:l,plugin:u}}const Le="@css-render/vue3-ssr";function Te(e,t){return`<style cssr-id="${e}">
12
+ `)}function Ne(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 Be(e,t,n,o){const{els:i}=t;if(n===void 0)i.forEach(Z),t.els=[];else{const l=q(n,o);l&&i.includes(l)&&(Z(l),t.els=i.filter(s=>s!==l))}}function K(e,t){e.push(t)}function Ie(e,t,n,o,i,l,s,u,f){let d;if(n===void 0&&(d=t.render(o),n=Ne(d)),f){f.adapter(n,d??t.render(o));return}u===void 0&&(u=document.head);const m=q(n,u);if(m!==null&&!l)return m;const c=m??ke(n);if(d===void 0&&(d=t.render(o)),c.textContent=d,m!==null)return m;if(s){const b=u.querySelector(`meta[name="${s}"]`);if(b)return u.insertBefore(c,b),K(t.els,c),c}return i?u.insertBefore(c,u.querySelector("style, link")):u.appendChild(c),K(t.els,c),c}function Me(e){return Ee(this,this.instance,e)}function Se(e={}){const{id:t,ssr:n,props:o,head:i=!1,force:l=!1,anchorMetaName:s,parent:u}=e;return Ie(this.instance,this,t,o,i,l,s,u,n)}function Ve(e={}){const{id:t,parent:n}=e;Be(this.instance,this,t,n)}const z=function(e,t,n,o){return{instance:e,$:t,props:n,children:o,els:[],render:Me,mount:Se,unmount:Ve}},_e=function(e,t,n,o){return Array.isArray(t)?z(e,{$:null},null,t):Array.isArray(n)?z(e,t,null,n):Array.isArray(o)?z(e,t,n,o):z(e,t,n,null)};function Ae(e={}){const t={c:(...n)=>_e(t,...n),use:(n,...o)=>n.install(t,...o),find:q,context:{},config:e};return t}function Re(e){const{namespace:t="n",blockPrefix:n=`.${t}-`,elementPrefix:o="__",modifierPrefix:i="--"}=e??{},l=Ae(),s=pe({blockPrefix:n,elementPrefix:o,modifierPrefix:i});return l.use(s),{namespace:t,blockPrefix:n,elementPrefix:o,modifierPrefix:i,cssr:l,plugin:s}}const ze="@css-render/vue3-ssr";function Le(e,t){return`<style cssr-id="${e}">
13
13
  ${t}
14
- </style>`}function je(e,t,n){const{styles:o,ids:i}=n;i.has(e)||o!==null&&(i.add(e),o.push(Te(e,t)))}const Pe=typeof document<"u";function Oe(){if(Pe)return;const e=r.inject(Le,null);if(e!==null)return{adapter:(t,n)=>je(t,n,e),context:e}}function De(e,t){const n=Oe();function o(){t.mount({id:e,head:!0,ssr:n})}n?o():r.onBeforeMount(()=>{o()})}const{cssr:We,plugin:_e,namespace:ae}=ze(),{c:x,cB:T,cE:g,cM:D,cNotM:Y}={...We,..._e},V=`${ae}-chrome-tabs`,C=`${ae}-chrome-tabs-item`,M="all .2s cubic-bezier(.4, 0, .2, 1)";function He(){return x([T("chrome-tabs",{display:"flex",width:"100%",height:"40px",padding:"0 10px",alignItems:"center",backgroundColor:"var(--background-color)",color:"var(--background-color-dark)"},[x(".group-move, .group-enter-active, .group-leave-active",{transition:M}),x(".group-enter-from, .group-leave-to",{opacity:0}),x(".group-leave-active",{}),g("prefix",{}),g("icon",{width:"28px",height:"28px",display:"flex",alignItems:"center",justifyContent:"center",padding:"5px",borderRadius:"10px",backgroundColor:"var(--active-background-color)",transition:M},[x("svg",{width:"100%",height:"100%",fill:"currentColor"}),x("&:hover",{backgroundColor:"var(--primary-color)"})]),g("content",{flex:"1",height:"100%",minWidth:0,overflow:"hidden",marginLeft:"-6px",padding:"0 10px"}),g("scroll",{position:"relative",display:"flex",alignItems:"center",height:"100%"},[g("icon",{marginLeft:"5px",borderRadius:"50%",backgroundColor:"transparent",flexShrink:0},[x("&:hover",{backgroundColor:"var(--primary-color)"})])]),g("suffix",{})]),T("chrome-tabs-item",{position:"relative",margin:"0 -5px",height:"100%",flexShrink:0,cursor:"default",userSelect:"none",padding:"6px 10px 0px 10px"},[D("disabled",{cursor:"not-allowed",pointerEvents:"none",opacity:.5,filter:"grayscale(0.5)"}),D("active",[g("background",{opacity:1})]),Y("active",[x("&:hover",{},[g("content",{backgroundColor:"var(--primary-color)"})])]),x("&::first-child",{marginLeft:"0 !important"}),x("&::last-child",{marginRight:"0 !important"}),g("content",{position:"relative",zIndex:1,height:"28px",display:"flex",alignItems:"center",gap:"5px",borderRadius:"10px",padding:"0 10px",transition:M}),g("slot",{}),g("icon",{},[x("svg",{width:"1.2em",height:"1.2em",fill:"currentColor"})]),g("close",{width:"16px",height:"16px",padding:"2px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"50%",transition:M},[x("&:hover",{backgroundColor:"rgba(0,0,0,0.1)"}),x("svg",{width:"100%",height:"100%",fill:"currentColor"})]),g("background",{position:"absolute",opacity:0,left:0,bottom:0,zIndex:0,height:"34px",width:"100%",display:"flex",alignItems:"flex-end",transition:M},[g("block",{height:"100%",flex:1,minWidth:0,borderRadius:"10px 10px 0 0",backgroundColor:"var(--active-background-color)"}),x("svg",{fill:"var(--active-background-color)"})]),g("line",{position:"absolute",bottom:"12px",right:"4px",height:"16px",width:"2px",borderRadius:"1px",transition:M,backgroundColor:"var(--primary-color)",opacity:0},[D("show",{opacity:1})])]),x(".dark",[T("chrome-tabs",{backgroundColor:"var(--background-color-dark)",color:"var(--background-color)"},[g("icon",{backgroundColor:"var(--active-background-color-dark)"},[x("&:hover",{backgroundColor:"var(--primary-color-dark)"})])]),T("chrome-tabs-item",{},[Y("active",[x("&:hover",{},[g("content",{backgroundColor:"var(--primary-color-dark)"})])]),g("background",{},[g("block",{backgroundColor:"var(--active-background-color-dark)"}),x("svg",{fill:"var(--active-background-color-dark)"})])])])])}const O=(e,t)=>{const n=e.__vccOpts||e;for(const[o,i]of t)n[o]=i;return n},Fe={name:"LineMdLoadingTwotoneLoop"},qe={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24"};function Ge(e,t,n,o,i,l){return r.openBlock(),r.createElementBlock("svg",qe,t[0]||(t[0]=[r.createStaticVNode('<g fill="none" stroke="#757575" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path stroke-dasharray="16" stroke-dashoffset="16" d="M12 3c4.97 0 9 4.03 9 9"><animate fill="freeze" attributeName="stroke-dashoffset" dur="0.3s" values="16;0"></animate><animateTransform attributeName="transform" dur="1.5s" repeatCount="indefinite" type="rotate" values="0 12 12;360 12 12"></animateTransform></path><path stroke-dasharray="64" stroke-dashoffset="64" stroke-opacity=".3" d="M12 3c4.97 0 9 4.03 9 9c0 4.97 -4.03 9 -9 9c-4.97 0 -9 -4.03 -9 -9c0 -4.97 4.03 -9 9 -9Z"><animate fill="freeze" attributeName="stroke-dashoffset" dur="1.2s" values="64;0"></animate></path></g>',1)]))}const Ze=O(Fe,[["render",Ge]]),Ue={name:"RiCloseLine"},Ke={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24"};function Ye(e,t,n,o,i,l){return r.openBlock(),r.createElementBlock("svg",Ke,t[0]||(t[0]=[r.createElementVNode("path",{fill:"#757575",d:"m12 10.587l4.95-4.95l1.414 1.414l-4.95 4.95l4.95 4.95l-1.415 1.414l-4.95-4.95l-4.949 4.95l-1.414-1.415l4.95-4.95l-4.95-4.95L7.05 5.638z"},null,-1)]))}const Je=O(Ue,[["render",Ye]]),ce=r.defineComponent({__name:"TabItem",props:{label:{type:[String,Function]},icon:{type:Function},closable:{type:Boolean},disabled:{type:Boolean},loading:{type:Boolean},loadingIcon:{type:Function},onClick:{type:Function},onContextMenu:{type:Function},onClose:{type:Function},activeIndex:{default:0},index:{}},emits:["itemClick","itemContextmenu","itemClose"],setup(e,{emit:t}){const n=t,o=r.computed(()=>e.activeIndex!==e.index&&e.activeIndex!==e.index-1),i=r.computed(()=>e.activeIndex===e.index),l=r.computed(()=>typeof e.label=="string"?r.h("span",{class:`${C}__label`},e.label):e.label),u=r.computed(()=>e.loadingIcon??r.h(Ze));function s(m){var c;m.stopPropagation(),n("itemClick",m),(c=e.onClick)==null||c.call(e,m)}function d(m){var c;n("itemContextmenu",m),(c=e.onContextMenu)==null||c.call(e,m)}function f(){var m;n("itemClose"),(m=e.onClose)==null||m.call(e)}return(m,c)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass([r.unref(C),{[`${r.unref(C)}--active`]:i.value,[`${r.unref(C)}--disabled`]:m.disabled}]),onClick:s,onContextmenu:d},[r.createElementVNode("div",{class:r.normalizeClass([`${r.unref(C)}__content`])},[r.createElementVNode("div",{class:r.normalizeClass([`${r.unref(C)}__icon`])},[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(m.loading?u.value:m.icon)))],2),r.createElementVNode("div",{class:r.normalizeClass([`${r.unref(C)}__slot`])},[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(l.value)))],2),m.closable?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass([`${r.unref(C)}__close`]),onClick:r.withModifiers(f,["stop"])},[r.createVNode(Je)],2)):r.createCommentVNode("",!0)],2),r.createElementVNode("div",{class:r.normalizeClass([`${r.unref(C)}__background`])},[c[0]||(c[0]=r.createElementVNode("svg",{width:"10",height:"10"},[r.createElementVNode("path",{d:"M 0 10 A 10 10 0 0 0 10 0 L 10 10 Z"})],-1)),r.createElementVNode("div",{class:r.normalizeClass([`${r.unref(C)}__block`])},null,2),c[1]||(c[1]=r.createElementVNode("svg",{width:"10",height:"10"},[r.createElementVNode("path",{d:"M 0 0 A 10 10 0 0 0 10 10 L 0 10 Z"})],-1))],2),r.createElementVNode("div",{class:r.normalizeClass([`${r.unref(C)}__line`,o.value?`${r.unref(C)}__line--show`:""])},null,2)],34))}});function fe(e){return r.getCurrentScope()?(r.onScopeDispose(e),!0):!1}const Qe=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Xe=Object.prototype.toString,et=e=>Xe.call(e)==="[object Object]",J=()=>{};function tt(e,t){function n(...o){return new Promise((i,l)=>{Promise.resolve(e(()=>t.apply(this,o),{fn:t,thisArg:this,args:o})).then(i).catch(l)})}return n}function nt(e,t={}){let n,o,i=J;const l=d=>{clearTimeout(d),i(),i=J};let u;return d=>{const f=r.toValue(e),m=r.toValue(t.maxWait);return n&&l(n),f<=0||m!==void 0&&m<=0?(o&&(l(o),o=null),Promise.resolve(d())):new Promise((c,v)=>{i=t.rejectOnCancel?v:c,u=d,m&&!o&&(o=setTimeout(()=>{n&&l(n),o=null,c(u())},m)),n=setTimeout(()=>{o&&l(o),o=null,c(d())},f)})}}function P(e){return Array.isArray(e)?e:[e]}function ot(e){return r.getCurrentInstance()}function rt(e,t=200,n={}){return tt(nt(t,n),e)}function it(e,t=!0,n){ot()?r.onMounted(e,n):t?e():r.nextTick(e)}function lt(e,t,n){return r.watch(e,t,{...n,immediate:!0})}const G=Qe?window:void 0;function B(e){var t;const n=r.toValue(e);return(t=n==null?void 0:n.$el)!=null?t:n}function ut(...e){const t=[],n=()=>{t.forEach(s=>s()),t.length=0},o=(s,d,f,m)=>(s.addEventListener(d,f,m),()=>s.removeEventListener(d,f,m)),i=r.computed(()=>{const s=P(r.toValue(e[0])).filter(d=>d!=null);return s.every(d=>typeof d!="string")?s:void 0}),l=lt(()=>{var s,d;return[(d=(s=i.value)==null?void 0:s.map(f=>B(f)))!=null?d:[G].filter(f=>f!=null),P(r.toValue(i.value?e[1]:e[0])),P(r.unref(i.value?e[2]:e[1])),r.toValue(i.value?e[3]:e[2])]},([s,d,f,m])=>{if(n(),!(s!=null&&s.length)||!(d!=null&&d.length)||!(f!=null&&f.length))return;const c=et(m)?{...m}:m;t.push(...s.flatMap(v=>d.flatMap($=>f.map(a=>o(v,$,a,c)))))},{flush:"post"}),u=()=>{l(),n()};return fe(n),u}function st(){const e=r.shallowRef(!1),t=r.getCurrentInstance();return t&&r.onMounted(()=>{e.value=!0},t),e}function at(e){const t=st();return r.computed(()=>(t.value,!!e()))}function ct(e,t,n={}){const{window:o=G,...i}=n;let l;const u=at(()=>o&&"ResizeObserver"in o),s=()=>{l&&(l.disconnect(),l=void 0)},d=r.computed(()=>{const c=r.toValue(e);return Array.isArray(c)?c.map(v=>B(v)):[B(c)]}),f=r.watch(d,c=>{if(s(),u.value&&o){l=new ResizeObserver(t);for(const v of c)v&&l.observe(v,i)}},{immediate:!0,flush:"post"}),m=()=>{s(),f()};return fe(m),{isSupported:u,stop:m}}function ft(e,t={width:0,height:0},n={}){const{window:o=G,box:i="content-box"}=n,l=r.computed(()=>{var c,v;return(v=(c=B(e))==null?void 0:c.namespaceURI)==null?void 0:v.includes("svg")}),u=r.shallowRef(t.width),s=r.shallowRef(t.height),{stop:d}=ct(e,([c])=>{const v=i==="border-box"?c.borderBoxSize:i==="content-box"?c.contentBoxSize:c.devicePixelContentBoxSize;if(o&&l.value){const $=B(e);if($){const a=$.getBoundingClientRect();u.value=a.width,s.value=a.height}}else if(v){const $=P(v);u.value=$.reduce((a,{inlineSize:b})=>a+b,0),s.value=$.reduce((a,{blockSize:b})=>a+b,0)}else u.value=c.contentRect.width,s.value=c.contentRect.height},n);it(()=>{const c=B(e);c&&(u.value="offsetWidth"in c?c.offsetWidth:t.width,s.value="offsetHeight"in c?c.offsetHeight:t.height)});const f=r.watch(()=>B(e),c=>{u.value=c?t.width:0,s.value=c?t.height:0});function m(){d(),f()}return{width:u,height:s,stop:m}}function dt(e){const{activeClassName:t=".active",enableWheel:n=!0,direction:o="vertical"}=e??{},i=r.ref(),{width:l,height:u}=ft(i);async function s(m){var v;await r.nextTick();const c=(v=i.value)==null?void 0:v.querySelector(t);c&&c.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest",...m})}function d(m){var v,$;if(!n)return;m.preventDefault();const{deltaY:c}=m;switch(o){case"vertical":(v=i.value)==null||v.scrollBy({top:c>0?u.value:-u.value,behavior:"smooth"});break;case"horizontal":($=i.value)==null||$.scrollBy({left:c>0?l.value:-l.value,behavior:"smooth"});break}}ut(i,"wheel",d);const f=rt(s,500);return r.watch([l,u],()=>{f()}),{scrollRef:i,scrollToView:s}}var mt={grad:.9,turn:360,rad:360/(2*Math.PI)},N=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},y=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},E=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e>t?e:t},de=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},Q=function(e){return{r:E(e.r,0,255),g:E(e.g,0,255),b:E(e.b,0,255),a:E(e.a)}},W=function(e){return{r:y(e.r),g:y(e.g),b:y(e.b),a:y(e.a,3)}},ht=/^#([0-9a-f]{3,8})$/i,j=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},me=function(e){var t=e.r,n=e.g,o=e.b,i=e.a,l=Math.max(t,n,o),u=l-Math.min(t,n,o),s=u?l===t?(n-o)/u:l===n?2+(o-t)/u:4+(t-n)/u:0;return{h:60*(s<0?s+6:s),s:l?u/l*100:0,v:l/255*100,a:i}},he=function(e){var t=e.h,n=e.s,o=e.v,i=e.a;t=t/360*6,n/=100,o/=100;var l=Math.floor(t),u=o*(1-n),s=o*(1-(t-l)*n),d=o*(1-(1-t+l)*n),f=l%6;return{r:255*[o,s,u,u,d,o][f],g:255*[d,o,o,s,u,u][f],b:255*[u,u,d,o,o,s][f],a:i}},X=function(e){return{h:de(e.h),s:E(e.s,0,100),l:E(e.l,0,100),a:E(e.a)}},ee=function(e){return{h:y(e.h),s:y(e.s),l:y(e.l),a:y(e.a,3)}},te=function(e){return he((n=(t=e).s,{h:t.h,s:(n*=((o=t.l)<50?o:100-o)/100)>0?2*n/(o+n)*100:0,v:o+n,a:t.a}));var t,n,o},A=function(e){return{h:(t=me(e)).h,s:(i=(200-(n=t.s))*(o=t.v)/100)>0&&i<200?n*o/100/(i<=100?i:200-i)*100:0,l:i/2,a:t.a};var t,n,o,i},pt=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,vt=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,bt=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,gt=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,ne={string:[[function(e){var t=ht.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?y(parseInt(e[3]+e[3],16)/255,2):1}:e.length===6||e.length===8?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:e.length===8?y(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=bt.exec(e)||gt.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:Q({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=pt.exec(e)||vt.exec(e);if(!t)return null;var n,o,i=X({h:(n=t[1],o=t[2],o===void 0&&(o="deg"),Number(n)*(mt[o]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return te(i)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,o=e.b,i=e.a,l=i===void 0?1:i;return N(t)&&N(n)&&N(o)?Q({r:Number(t),g:Number(n),b:Number(o),a:Number(l)}):null},"rgb"],[function(e){var t=e.h,n=e.s,o=e.l,i=e.a,l=i===void 0?1:i;if(!N(t)||!N(n)||!N(o))return null;var u=X({h:Number(t),s:Number(n),l:Number(o),a:Number(l)});return te(u)},"hsl"],[function(e){var t=e.h,n=e.s,o=e.v,i=e.a,l=i===void 0?1:i;if(!N(t)||!N(n)||!N(o))return null;var u=function(s){return{h:de(s.h),s:E(s.s,0,100),v:E(s.v,0,100),a:E(s.a)}}({h:Number(t),s:Number(n),v:Number(o),a:Number(l)});return he(u)},"hsv"]]},oe=function(e,t){for(var n=0;n<t.length;n++){var o=t[n][0](e);if(o)return[o,t[n][1]]}return[null,void 0]},xt=function(e){return typeof e=="string"?oe(e.trim(),ne.string):typeof e=="object"&&e!==null?oe(e,ne.object):[null,void 0]},_=function(e,t){var n=A(e);return{h:n.h,s:E(n.s+100*t,0,100),l:n.l,a:n.a}},H=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},re=function(e,t){var n=A(e);return{h:n.h,s:n.s,l:E(n.l+100*t,0,100),a:n.a}},ie=function(){function e(t){this.parsed=xt(t)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return this.parsed!==null},e.prototype.brightness=function(){return y(H(this.rgba),2)},e.prototype.isDark=function(){return H(this.rgba)<.5},e.prototype.isLight=function(){return H(this.rgba)>=.5},e.prototype.toHex=function(){return t=W(this.rgba),n=t.r,o=t.g,i=t.b,u=(l=t.a)<1?j(y(255*l)):"","#"+j(n)+j(o)+j(i)+u;var t,n,o,i,l,u},e.prototype.toRgb=function(){return W(this.rgba)},e.prototype.toRgbString=function(){return t=W(this.rgba),n=t.r,o=t.g,i=t.b,(l=t.a)<1?"rgba("+n+", "+o+", "+i+", "+l+")":"rgb("+n+", "+o+", "+i+")";var t,n,o,i,l},e.prototype.toHsl=function(){return ee(A(this.rgba))},e.prototype.toHslString=function(){return t=ee(A(this.rgba)),n=t.h,o=t.s,i=t.l,(l=t.a)<1?"hsla("+n+", "+o+"%, "+i+"%, "+l+")":"hsl("+n+", "+o+"%, "+i+"%)";var t,n,o,i,l},e.prototype.toHsv=function(){return t=me(this.rgba),{h:y(t.h),s:y(t.s),v:y(t.v),a:y(t.a,3)};var t},e.prototype.invert=function(){return w({r:255-(t=this.rgba).r,g:255-t.g,b:255-t.b,a:t.a});var t},e.prototype.saturate=function(t){return t===void 0&&(t=.1),w(_(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),w(_(this.rgba,-t))},e.prototype.grayscale=function(){return w(_(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),w(re(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),w(re(this.rgba,-t))},e.prototype.rotate=function(t){return t===void 0&&(t=15),this.hue(this.hue()+t)},e.prototype.alpha=function(t){return typeof t=="number"?w({r:(n=this.rgba).r,g:n.g,b:n.b,a:t}):y(this.rgba.a,3);var n},e.prototype.hue=function(t){var n=A(this.rgba);return typeof t=="number"?w({h:t,s:n.s,l:n.l,a:n.a}):y(n.h)},e.prototype.isEqual=function(t){return this.toHex()===w(t).toHex()},e}(),w=function(e){return e instanceof ie?e:new ie(e)};const yt={name:"RiAddLine"},kt={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24"};function $t(e,t,n,o,i,l){return r.openBlock(),r.createElementBlock("svg",kt,t[0]||(t[0]=[r.createElementVNode("path",{fill:"#757575",d:"M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"},null,-1)]))}const Ct=O(yt,[["render",$t]]),wt={name:"RiArrowDropDownLine"},Et={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24"};function Nt(e,t,n,o,i,l){return r.openBlock(),r.createElementBlock("svg",Et,t[0]||(t[0]=[r.createElementVNode("path",{fill:"#757575",d:"m12 15l-4.243-4.242l1.415-1.414L12 12.172l2.828-2.828l1.415 1.414z"},null,-1)]))}const Bt=O(wt,[["render",Nt]]),It=r.defineComponent({__name:"Tabs",props:r.mergeModels({colors:{},dropdown:{type:Boolean},addable:{type:Boolean},options:{}},{value:{},valueModifiers:{}}),emits:r.mergeModels(["click","contextmenu","close","add"],["update:value"]),setup(e,{emit:t}){const n=t;De("n-chrome-tabs",He());const{background:o="#E5E7EB",active:i="#fff",primary:l="rgba(251,191,36,1)"}=e.colors??{},u=r.useModel(e,"value"),s=r.computed(()=>{var h;return(h=e.options)==null?void 0:h.findIndex(p=>p.key===u.value)}),{scrollRef:d,scrollToView:f}=dt({activeClassName:`.${C}--active`,direction:"horizontal"});r.watch(u,()=>{f()},{immediate:!0});const m=r.computed(()=>w(o).darken(.9).toHex()),c=r.computed(()=>w(i).darken(.8).toHex()),v=r.computed(()=>w(l).darken(.3).toHex());function $(h){n("click",h)}function a(h){n("contextmenu",h)}function b(h){n("close",h)}return(h,p)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass([r.unref(V)]),style:r.normalizeStyle({"--background-color":`${r.unref(o)}`,"--background-color-dark":`${m.value}`,"--active-background-color":`${r.unref(i)}`,"--active-background-color-dark":`${c.value}`,"--primary-color":`${r.unref(l)}`,"--primary-color-dark":`${v.value}`})},[h.dropdown?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass([`${r.unref(V)}__icon`])},[r.createVNode(Bt)],2)):r.createCommentVNode("",!0),r.renderSlot(h.$slots,"prefix"),r.createElementVNode("div",{ref_key:"scrollRef",ref:d,class:r.normalizeClass([`${r.unref(V)}__content`])},[r.createVNode(r.TransitionGroup,{name:"group",tag:"div",class:r.normalizeClass([`${r.unref(V)}__scroll`])},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(h.options,({key:k,...S},I)=>(r.openBlock(),r.createBlock(ce,r.mergeProps({key:k},{ref_for:!0},S,{index:I,"active-index":s.value,onItemClick:R=>$(k),onItemContextmenu:R=>a(k),onItemClose:R=>b(k)}),null,16,["index","active-index","onItemClick","onItemContextmenu","onItemClose"]))),128))]),_:1},8,["class"])],2),r.renderSlot(h.$slots,"suffix"),h.addable?(r.openBlock(),r.createElementBlock("div",{key:1,class:r.normalizeClass([`${r.unref(V)}__icon`]),onClick:p[0]||(p[0]=k=>n("add"))},[r.createVNode(Ct)],2)):r.createCommentVNode("",!0)],6))}});exports.CTabItem=ce;exports.CTabs=It;
14
+ </style>`}function Te(e,t,n){const{styles:o,ids:i}=n;i.has(e)||o!==null&&(i.add(e),o.push(Le(e,t)))}const je=typeof document<"u";function Pe(){if(je)return;const e=r.inject(ze,null);if(e!==null)return{adapter:(t,n)=>Te(t,n,e),context:e}}function Oe(e,t){const n=Pe();function o(){t.mount({id:e,head:!0,ssr:n})}n?o():r.onBeforeMount(()=>{o()})}const{cssr:De,plugin:We,namespace:ae}=Re(),{c:x,cB:L,cE:g,cM:O,cNotM:Y}={...De,...We},V=`${ae}-chrome-tabs`,$=`${ae}-chrome-tabs-item`,M="all .2s cubic-bezier(.4, 0, .2, 1)";function He(){return x([L("chrome-tabs",{display:"flex",width:"100%",height:"40px",padding:"0 10px",alignItems:"center",backgroundColor:"var(--background-color)",color:"var(--background-color-dark)"},[x(".group-move, .group-enter-active, .group-leave-active",{transition:M}),x(".group-enter-from, .group-leave-to",{opacity:0}),x(".group-leave-active",{}),g("prefix",{}),g("icon",{width:"28px",height:"28px",display:"flex",alignItems:"center",justifyContent:"center",padding:"5px",borderRadius:"10px",backgroundColor:"var(--active-background-color)",transition:M},[x("svg",{width:"100%",height:"100%",fill:"currentColor"}),x("&:hover",{backgroundColor:"var(--primary-color)"})]),g("content",{flex:"1",height:"100%",minWidth:0,overflow:"hidden",marginLeft:"-6px",padding:"0 10px"}),g("scroll",{position:"relative",display:"flex",alignItems:"center",height:"100%"},[g("icon",{marginLeft:"5px",borderRadius:"50%",backgroundColor:"transparent",flexShrink:0},[x("&:hover",{backgroundColor:"var(--primary-color)"})])]),g("suffix",{})]),L("chrome-tabs-item",{position:"relative",margin:"0 -5px",height:"100%",flexShrink:0,cursor:"default",userSelect:"none",padding:"6px 10px 0px 10px"},[O("disabled",{cursor:"not-allowed",pointerEvents:"none",opacity:.5,filter:"grayscale(0.5)"}),O("active",[g("background",{opacity:1})]),Y("active",[x("&:hover",{},[g("content",{backgroundColor:"var(--primary-color)"})])]),x("&::first-child",{marginLeft:"0 !important"}),x("&::last-child",{marginRight:"0 !important"}),g("content",{position:"relative",zIndex:1,height:"28px",display:"flex",alignItems:"center",gap:"5px",borderRadius:"10px",padding:"0 10px",transition:M}),g("slot",{}),g("icon",{},[x("svg",{width:"1.2em",height:"1.2em",fill:"currentColor"})]),g("close",{width:"16px",height:"16px",padding:"2px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"50%",transition:M},[x("&:hover",{backgroundColor:"rgba(0,0,0,0.1)"}),x("svg",{width:"100%",height:"100%",fill:"currentColor"})]),g("background",{position:"absolute",opacity:0,left:0,bottom:0,zIndex:0,height:"34px",width:"100%",display:"flex",alignItems:"flex-end",transition:M},[g("block",{height:"100%",flex:1,minWidth:0,borderRadius:"10px 10px 0 0",backgroundColor:"var(--active-background-color)"}),x("svg",{fill:"var(--active-background-color)"})]),g("line",{position:"absolute",bottom:"12px",right:"4px",height:"16px",width:"2px",borderRadius:"1px",transition:M,backgroundColor:"var(--primary-color)",opacity:0},[O("show",{opacity:1})])]),x(".dark",[L("chrome-tabs",{backgroundColor:"var(--background-color-dark)",color:"var(--background-color)"},[g("icon",{backgroundColor:"var(--active-background-color-dark)"},[x("&:hover",{backgroundColor:"var(--primary-color-dark)"})])]),L("chrome-tabs-item",{},[Y("active",[x("&:hover",{},[g("content",{backgroundColor:"var(--primary-color-dark)"})])]),g("background",{},[g("block",{backgroundColor:"var(--active-background-color-dark)"}),x("svg",{fill:"var(--active-background-color-dark)"})])])])])}const P=(e,t)=>{const n=e.__vccOpts||e;for(const[o,i]of t)n[o]=i;return n},Fe={name:"LineMdLoadingTwotoneLoop"},qe={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24"};function Ge(e,t,n,o,i,l){return r.openBlock(),r.createElementBlock("svg",qe,t[0]||(t[0]=[r.createStaticVNode('<g fill="none" stroke="#757575" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path stroke-dasharray="16" stroke-dashoffset="16" d="M12 3c4.97 0 9 4.03 9 9"><animate fill="freeze" attributeName="stroke-dashoffset" dur="0.3s" values="16;0"></animate><animateTransform attributeName="transform" dur="1.5s" repeatCount="indefinite" type="rotate" values="0 12 12;360 12 12"></animateTransform></path><path stroke-dasharray="64" stroke-dashoffset="64" stroke-opacity=".3" d="M12 3c4.97 0 9 4.03 9 9c0 4.97 -4.03 9 -9 9c-4.97 0 -9 -4.03 -9 -9c0 -4.97 4.03 -9 9 -9Z"><animate fill="freeze" attributeName="stroke-dashoffset" dur="1.2s" values="64;0"></animate></path></g>',1)]))}const Ze=P(Fe,[["render",Ge]]),Ue={name:"RiCloseLine"},Ke={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24"};function Ye(e,t,n,o,i,l){return r.openBlock(),r.createElementBlock("svg",Ke,t[0]||(t[0]=[r.createElementVNode("path",{fill:"#757575",d:"m12 10.587l4.95-4.95l1.414 1.414l-4.95 4.95l4.95 4.95l-1.415 1.414l-4.95-4.95l-4.949 4.95l-1.414-1.415l4.95-4.95l-4.95-4.95L7.05 5.638z"},null,-1)]))}const Je=P(Ue,[["render",Ye]]),ce=r.defineComponent({__name:"TabItem",props:{label:{type:[String,Function]},icon:{type:Function},closable:{type:Boolean},disabled:{type:Boolean},loading:{type:Boolean},loadingIcon:{type:Function},onClick:{type:Function},onContextMenu:{type:Function},onClose:{type:Function},activeIndex:{default:0},index:{}},emits:["itemClick","itemContextmenu","itemClose"],setup(e,{emit:t}){const n=t,o=r.computed(()=>e.activeIndex!==e.index&&e.activeIndex!==e.index-1),i=r.computed(()=>e.activeIndex===e.index),l=r.computed(()=>typeof e.label=="string"?r.h("span",{class:`${$}__label`},e.label):e.label),s=r.computed(()=>e.loadingIcon??r.h(Ze));function u(m){m.stopPropagation(),n("itemClick",m),e.onClick?.(m)}function f(m){n("itemContextmenu",m),e.onContextMenu?.(m)}function d(){n("itemClose"),e.onClose?.()}return(m,c)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass([r.unref($),{[`${r.unref($)}--active`]:i.value,[`${r.unref($)}--disabled`]:m.disabled}]),onClick:u,onContextmenu:f},[r.createElementVNode("div",{class:r.normalizeClass([`${r.unref($)}__content`])},[r.createElementVNode("div",{class:r.normalizeClass([`${r.unref($)}__icon`])},[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(m.loading?s.value:m.icon)))],2),r.createElementVNode("div",{class:r.normalizeClass([`${r.unref($)}__slot`])},[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(l.value)))],2),m.closable?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass([`${r.unref($)}__close`]),onClick:r.withModifiers(d,["stop"])},[r.createVNode(Je)],2)):r.createCommentVNode("",!0)],2),r.createElementVNode("div",{class:r.normalizeClass([`${r.unref($)}__background`])},[c[0]||(c[0]=r.createElementVNode("svg",{width:"10",height:"10"},[r.createElementVNode("path",{d:"M 0 10 A 10 10 0 0 0 10 0 L 10 10 Z"})],-1)),r.createElementVNode("div",{class:r.normalizeClass([`${r.unref($)}__block`])},null,2),c[1]||(c[1]=r.createElementVNode("svg",{width:"10",height:"10"},[r.createElementVNode("path",{d:"M 0 0 A 10 10 0 0 0 10 10 L 0 10 Z"})],-1))],2),r.createElementVNode("div",{class:r.normalizeClass([`${r.unref($)}__line`,o.value?`${r.unref($)}__line--show`:""])},null,2)],34))}});function de(e){return r.getCurrentScope()?(r.onScopeDispose(e),!0):!1}const Qe=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Xe=Object.prototype.toString,et=e=>Xe.call(e)==="[object Object]",J=()=>{};function tt(e,t){function n(...o){return new Promise((i,l)=>{Promise.resolve(e(()=>t.apply(this,o),{fn:t,thisArg:this,args:o})).then(i).catch(l)})}return n}function nt(e,t={}){let n,o,i=J;const l=f=>{clearTimeout(f),i(),i=J};let s;return f=>{const d=r.toValue(e),m=r.toValue(t.maxWait);return n&&l(n),d<=0||m!==void 0&&m<=0?(o&&(l(o),o=void 0),Promise.resolve(f())):new Promise((c,b)=>{i=t.rejectOnCancel?b:c,s=f,m&&!o&&(o=setTimeout(()=>{n&&l(n),o=void 0,c(s())},m)),n=setTimeout(()=>{o&&l(o),o=void 0,c(f())},d)})}}function j(e){return Array.isArray(e)?e:[e]}function ot(e){return r.getCurrentInstance()}function rt(e,t=200,n={}){return tt(nt(t,n),e)}function it(e,t=!0,n){ot()?r.onMounted(e,n):t?e():r.nextTick(e)}function lt(e,t,n){return r.watch(e,t,{...n,immediate:!0})}const G=Qe?window:void 0;function B(e){var t;const n=r.toValue(e);return(t=n?.$el)!=null?t:n}function st(...e){const t=[],n=()=>{t.forEach(u=>u()),t.length=0},o=(u,f,d,m)=>(u.addEventListener(f,d,m),()=>u.removeEventListener(f,d,m)),i=r.computed(()=>{const u=j(r.toValue(e[0])).filter(f=>f!=null);return u.every(f=>typeof f!="string")?u:void 0}),l=lt(()=>{var u,f;return[(f=(u=i.value)==null?void 0:u.map(d=>B(d)))!=null?f:[G].filter(d=>d!=null),j(r.toValue(i.value?e[1]:e[0])),j(r.unref(i.value?e[2]:e[1])),r.toValue(i.value?e[3]:e[2])]},([u,f,d,m])=>{if(n(),!u?.length||!f?.length||!d?.length)return;const c=et(m)?{...m}:m;t.push(...u.flatMap(b=>f.flatMap(E=>d.map(a=>o(b,E,a,c)))))},{flush:"post"}),s=()=>{l(),n()};return de(n),s}function ut(){const e=r.shallowRef(!1),t=r.getCurrentInstance();return t&&r.onMounted(()=>{e.value=!0},t),e}function at(e){const t=ut();return r.computed(()=>(t.value,!!e()))}function ct(e,t,n={}){const{window:o=G,...i}=n;let l;const s=at(()=>o&&"ResizeObserver"in o),u=()=>{l&&(l.disconnect(),l=void 0)},f=r.computed(()=>{const c=r.toValue(e);return Array.isArray(c)?c.map(b=>B(b)):[B(c)]}),d=r.watch(f,c=>{if(u(),s.value&&o){l=new ResizeObserver(t);for(const b of c)b&&l.observe(b,i)}},{immediate:!0,flush:"post"}),m=()=>{u(),d()};return de(m),{isSupported:s,stop:m}}function dt(e,t={width:0,height:0},n={}){const{window:o=G,box:i="content-box"}=n,l=r.computed(()=>{var c,b;return(b=(c=B(e))==null?void 0:c.namespaceURI)==null?void 0:b.includes("svg")}),s=r.shallowRef(t.width),u=r.shallowRef(t.height),{stop:f}=ct(e,([c])=>{const b=i==="border-box"?c.borderBoxSize:i==="content-box"?c.contentBoxSize:c.devicePixelContentBoxSize;if(o&&l.value){const E=B(e);if(E){const a=E.getBoundingClientRect();s.value=a.width,u.value=a.height}}else if(b){const E=j(b);s.value=E.reduce((a,{inlineSize:v})=>a+v,0),u.value=E.reduce((a,{blockSize:v})=>a+v,0)}else s.value=c.contentRect.width,u.value=c.contentRect.height},n);it(()=>{const c=B(e);c&&(s.value="offsetWidth"in c?c.offsetWidth:t.width,u.value="offsetHeight"in c?c.offsetHeight:t.height)});const d=r.watch(()=>B(e),c=>{s.value=c?t.width:0,u.value=c?t.height:0});function m(){f(),d()}return{width:s,height:u,stop:m}}function ft(e){const{activeClassName:t=".active",enableWheel:n=!0,direction:o="vertical"}=e??{},i=r.ref(),{width:l,height:s}=dt(i);async function u(m){await r.nextTick();const c=i.value?.querySelector(t);c&&c.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest",...m})}function f(m){if(!n)return;m.preventDefault();const{deltaY:c}=m;switch(o){case"vertical":i.value?.scrollBy({top:c>0?s.value:-s.value,behavior:"smooth"});break;case"horizontal":i.value?.scrollBy({left:c>0?l.value:-l.value,behavior:"smooth"});break}}st(i,"wheel",f);const d=rt(u,500);return r.watch([l,s],()=>{d()}),{scrollRef:i,scrollToView:u}}var mt={grad:.9,turn:360,rad:360/(2*Math.PI)},N=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},y=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},w=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e>t?e:t},fe=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},Q=function(e){return{r:w(e.r,0,255),g:w(e.g,0,255),b:w(e.b,0,255),a:w(e.a)}},D=function(e){return{r:y(e.r),g:y(e.g),b:y(e.b),a:y(e.a,3)}},ht=/^#([0-9a-f]{3,8})$/i,T=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},me=function(e){var t=e.r,n=e.g,o=e.b,i=e.a,l=Math.max(t,n,o),s=l-Math.min(t,n,o),u=s?l===t?(n-o)/s:l===n?2+(o-t)/s:4+(t-n)/s:0;return{h:60*(u<0?u+6:u),s:l?s/l*100:0,v:l/255*100,a:i}},he=function(e){var t=e.h,n=e.s,o=e.v,i=e.a;t=t/360*6,n/=100,o/=100;var l=Math.floor(t),s=o*(1-n),u=o*(1-(t-l)*n),f=o*(1-(1-t+l)*n),d=l%6;return{r:255*[o,u,s,s,f,o][d],g:255*[f,o,o,u,s,s][d],b:255*[s,s,f,o,o,u][d],a:i}},X=function(e){return{h:fe(e.h),s:w(e.s,0,100),l:w(e.l,0,100),a:w(e.a)}},ee=function(e){return{h:y(e.h),s:y(e.s),l:y(e.l),a:y(e.a,3)}},te=function(e){return he((n=(t=e).s,{h:t.h,s:(n*=((o=t.l)<50?o:100-o)/100)>0?2*n/(o+n)*100:0,v:o+n,a:t.a}));var t,n,o},_=function(e){return{h:(t=me(e)).h,s:(i=(200-(n=t.s))*(o=t.v)/100)>0&&i<200?n*o/100/(i<=100?i:200-i)*100:0,l:i/2,a:t.a};var t,n,o,i},pt=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,vt=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,bt=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,gt=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,ne={string:[[function(e){var t=ht.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?y(parseInt(e[3]+e[3],16)/255,2):1}:e.length===6||e.length===8?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:e.length===8?y(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=bt.exec(e)||gt.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:Q({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=pt.exec(e)||vt.exec(e);if(!t)return null;var n,o,i=X({h:(n=t[1],o=t[2],o===void 0&&(o="deg"),Number(n)*(mt[o]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return te(i)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,o=e.b,i=e.a,l=i===void 0?1:i;return N(t)&&N(n)&&N(o)?Q({r:Number(t),g:Number(n),b:Number(o),a:Number(l)}):null},"rgb"],[function(e){var t=e.h,n=e.s,o=e.l,i=e.a,l=i===void 0?1:i;if(!N(t)||!N(n)||!N(o))return null;var s=X({h:Number(t),s:Number(n),l:Number(o),a:Number(l)});return te(s)},"hsl"],[function(e){var t=e.h,n=e.s,o=e.v,i=e.a,l=i===void 0?1:i;if(!N(t)||!N(n)||!N(o))return null;var s=function(u){return{h:fe(u.h),s:w(u.s,0,100),v:w(u.v,0,100),a:w(u.a)}}({h:Number(t),s:Number(n),v:Number(o),a:Number(l)});return he(s)},"hsv"]]},oe=function(e,t){for(var n=0;n<t.length;n++){var o=t[n][0](e);if(o)return[o,t[n][1]]}return[null,void 0]},xt=function(e){return typeof e=="string"?oe(e.trim(),ne.string):typeof e=="object"&&e!==null?oe(e,ne.object):[null,void 0]},W=function(e,t){var n=_(e);return{h:n.h,s:w(n.s+100*t,0,100),l:n.l,a:n.a}},H=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},re=function(e,t){var n=_(e);return{h:n.h,s:n.s,l:w(n.l+100*t,0,100),a:n.a}},ie=function(){function e(t){this.parsed=xt(t)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return this.parsed!==null},e.prototype.brightness=function(){return y(H(this.rgba),2)},e.prototype.isDark=function(){return H(this.rgba)<.5},e.prototype.isLight=function(){return H(this.rgba)>=.5},e.prototype.toHex=function(){return t=D(this.rgba),n=t.r,o=t.g,i=t.b,s=(l=t.a)<1?T(y(255*l)):"","#"+T(n)+T(o)+T(i)+s;var t,n,o,i,l,s},e.prototype.toRgb=function(){return D(this.rgba)},e.prototype.toRgbString=function(){return t=D(this.rgba),n=t.r,o=t.g,i=t.b,(l=t.a)<1?"rgba("+n+", "+o+", "+i+", "+l+")":"rgb("+n+", "+o+", "+i+")";var t,n,o,i,l},e.prototype.toHsl=function(){return ee(_(this.rgba))},e.prototype.toHslString=function(){return t=ee(_(this.rgba)),n=t.h,o=t.s,i=t.l,(l=t.a)<1?"hsla("+n+", "+o+"%, "+i+"%, "+l+")":"hsl("+n+", "+o+"%, "+i+"%)";var t,n,o,i,l},e.prototype.toHsv=function(){return t=me(this.rgba),{h:y(t.h),s:y(t.s),v:y(t.v),a:y(t.a,3)};var t},e.prototype.invert=function(){return C({r:255-(t=this.rgba).r,g:255-t.g,b:255-t.b,a:t.a});var t},e.prototype.saturate=function(t){return t===void 0&&(t=.1),C(W(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),C(W(this.rgba,-t))},e.prototype.grayscale=function(){return C(W(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),C(re(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),C(re(this.rgba,-t))},e.prototype.rotate=function(t){return t===void 0&&(t=15),this.hue(this.hue()+t)},e.prototype.alpha=function(t){return typeof t=="number"?C({r:(n=this.rgba).r,g:n.g,b:n.b,a:t}):y(this.rgba.a,3);var n},e.prototype.hue=function(t){var n=_(this.rgba);return typeof t=="number"?C({h:t,s:n.s,l:n.l,a:n.a}):y(n.h)},e.prototype.isEqual=function(t){return this.toHex()===C(t).toHex()},e}(),C=function(e){return e instanceof ie?e:new ie(e)};const yt={name:"RiAddLine"},kt={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24"};function $t(e,t,n,o,i,l){return r.openBlock(),r.createElementBlock("svg",kt,t[0]||(t[0]=[r.createElementVNode("path",{fill:"#757575",d:"M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"},null,-1)]))}const Ct=P(yt,[["render",$t]]),wt={name:"RiArrowDropDownLine"},Et={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24"};function Nt(e,t,n,o,i,l){return r.openBlock(),r.createElementBlock("svg",Et,t[0]||(t[0]=[r.createElementVNode("path",{fill:"#757575",d:"m12 15l-4.243-4.242l1.415-1.414L12 12.172l2.828-2.828l1.415 1.414z"},null,-1)]))}const Bt=P(wt,[["render",Nt]]),It=r.defineComponent({__name:"Tabs",props:r.mergeModels({colors:{},dropdown:{type:Boolean},addable:{type:Boolean},options:{}},{value:{},valueModifiers:{}}),emits:r.mergeModels(["click","contextmenu","close","add"],["update:value"]),setup(e,{emit:t}){const n=t;Oe("n-chrome-tabs",He());const{background:o="#E5E7EB",active:i="#fff",primary:l="rgba(251,191,36,1)"}=e.colors??{},s=r.useModel(e,"value"),u=r.computed(()=>e.options?.findIndex(h=>h.key===s.value)),{scrollRef:f,scrollToView:d}=ft({activeClassName:`.${$}--active`,direction:"horizontal"});r.watch(s,()=>{d()},{immediate:!0});const m=r.computed(()=>C(o).darken(.9).toHex()),c=r.computed(()=>C(i).darken(.8).toHex()),b=r.computed(()=>C(l).darken(.3).toHex());function E(h){n("click",h)}function a(h){n("contextmenu",h)}function v(h){n("close",h)}return(h,p)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass([r.unref(V)]),style:r.normalizeStyle({"--background-color":`${r.unref(o)}`,"--background-color-dark":`${m.value}`,"--active-background-color":`${r.unref(i)}`,"--active-background-color-dark":`${c.value}`,"--primary-color":`${r.unref(l)}`,"--primary-color-dark":`${b.value}`})},[h.dropdown?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass([`${r.unref(V)}__icon`])},[r.createVNode(Bt)],2)):r.createCommentVNode("",!0),r.renderSlot(h.$slots,"prefix"),r.createElementVNode("div",{ref_key:"scrollRef",ref:f,class:r.normalizeClass([`${r.unref(V)}__content`])},[r.createVNode(r.TransitionGroup,{name:"group",tag:"div",class:r.normalizeClass([`${r.unref(V)}__scroll`])},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(h.options,({key:k,...S},I)=>(r.openBlock(),r.createBlock(ce,r.mergeProps({key:k},{ref_for:!0},S,{index:I,"active-index":u.value,onItemClick:A=>E(k),onItemContextmenu:A=>a(k),onItemClose:A=>v(k)}),null,16,["index","active-index","onItemClick","onItemContextmenu","onItemClose"]))),128))]),_:1},8,["class"])],2),r.renderSlot(h.$slots,"suffix"),h.addable?(r.openBlock(),r.createElementBlock("div",{key:1,class:r.normalizeClass([`${r.unref(V)}__icon`]),onClick:p[0]||(p[0]=k=>n("add"))},[r.createVNode(Ct)],2)):r.createCommentVNode("",!0)],6))}});exports.CTabItem=ce;exports.CTabs=It;
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { inject as Le, onBeforeMount as je, createElementBlock as A, openBlock as I, createStaticVNode as Te, createElementVNode as k, defineComponent as $e, computed as N, h as re, normalizeClass as E, unref as p, createCommentVNode as Q, createBlock as X, resolveDynamicComponent as ie, withModifiers as Pe, createVNode as q, onMounted as ke, nextTick as we, watch as D, getCurrentScope as ze, onScopeDispose as Oe, getCurrentInstance as Ce, toValue as L, shallowRef as ee, ref as De, mergeModels as se, useModel as Ve, normalizeStyle as We, renderSlot as ue, TransitionGroup as _e, withCtx as He, Fragment as Fe, renderList as qe, mergeProps as Ge } from "vue";
1
+ import { inject as Be, onBeforeMount as Le, createElementBlock as _, openBlock as E, createStaticVNode as je, createElementVNode as k, defineComponent as $e, computed as M, h as re, normalizeClass as C, unref as b, createCommentVNode as Q, createBlock as X, resolveDynamicComponent as ie, withModifiers as Te, createVNode as q, onMounted as ke, nextTick as we, watch as O, getCurrentScope as Pe, onScopeDispose as ze, getCurrentInstance as Ce, toValue as B, shallowRef as ee, ref as Oe, mergeModels as se, useModel as De, normalizeStyle as Ve, renderSlot as ue, TransitionGroup as We, withCtx as He, Fragment as Fe, renderList as qe, mergeProps as Ge } from "vue";
2
2
  function Ze(e) {
3
3
  let t = ".", n = "__", o = "--", r;
4
4
  if (e) {
@@ -8,51 +8,51 @@ function Ze(e) {
8
8
  const i = {
9
9
  install(l) {
10
10
  r = l.c;
11
- const b = l.context;
12
- b.bem = {}, b.bem.b = null, b.bem.els = null;
11
+ const p = l.context;
12
+ p.bem = {}, p.bem.b = null, p.bem.els = null;
13
13
  }
14
14
  };
15
15
  function s(l) {
16
- let b, h;
16
+ let p, h;
17
17
  return {
18
18
  before(m) {
19
- b = m.bem.b, h = m.bem.els, m.bem.els = null;
19
+ p = m.bem.b, h = m.bem.els, m.bem.els = null;
20
20
  },
21
21
  after(m) {
22
- m.bem.b = b, m.bem.els = h;
22
+ m.bem.b = p, m.bem.els = h;
23
23
  },
24
24
  $({ context: m, props: $ }) {
25
- return l = typeof l == "string" ? l : l({ context: m, props: $ }), m.bem.b = l, `${($ == null ? void 0 : $.bPrefix) || t}${m.bem.b}`;
25
+ return l = typeof l == "string" ? l : l({ context: m, props: $ }), m.bem.b = l, `${$?.bPrefix || t}${m.bem.b}`;
26
26
  }
27
27
  };
28
28
  }
29
29
  function u(l) {
30
- let b;
30
+ let p;
31
31
  return {
32
32
  before(h) {
33
- b = h.bem.els;
33
+ p = h.bem.els;
34
34
  },
35
35
  after(h) {
36
- h.bem.els = b;
36
+ h.bem.els = p;
37
37
  },
38
38
  $({ context: h, props: m }) {
39
- return l = typeof l == "string" ? l : l({ context: h, props: m }), h.bem.els = l.split(",").map(($) => $.trim()), h.bem.els.map(($) => `${(m == null ? void 0 : m.bPrefix) || t}${h.bem.b}${n}${$}`).join(", ");
39
+ return l = typeof l == "string" ? l : l({ context: h, props: m }), h.bem.els = l.split(",").map(($) => $.trim()), h.bem.els.map(($) => `${m?.bPrefix || t}${h.bem.b}${n}${$}`).join(", ");
40
40
  }
41
41
  };
42
42
  }
43
43
  function f(l) {
44
44
  return {
45
- $({ context: b, props: h }) {
46
- l = typeof l == "string" ? l : l({ context: b, props: h });
47
- const m = l.split(",").map((j) => j.trim());
48
- function $(j) {
49
- return m.map((V) => `&${(h == null ? void 0 : h.bPrefix) || t}${b.bem.b}${j !== void 0 ? `${n}${j}` : ""}${o}${V}`).join(", ");
45
+ $({ context: p, props: h }) {
46
+ l = typeof l == "string" ? l : l({ context: p, props: h });
47
+ const m = l.split(",").map((L) => L.trim());
48
+ function $(L) {
49
+ return m.map((D) => `&${h?.bPrefix || t}${p.bem.b}${L !== void 0 ? `${n}${L}` : ""}${o}${D}`).join(", ");
50
50
  }
51
- const P = b.bem.els;
52
- if (P !== null) {
53
- if (process.env.NODE_ENV !== "production" && P.length >= 2)
51
+ const T = p.bem.els;
52
+ if (T !== null) {
53
+ if (process.env.NODE_ENV !== "production" && T.length >= 2)
54
54
  throw Error(`[css-render/plugin-bem]: m(${l}) is invalid, using modifier inside multiple elements is not allowed`);
55
- return $(P[0]);
55
+ return $(T[0]);
56
56
  } else
57
57
  return $();
58
58
  }
@@ -60,12 +60,12 @@ function Ze(e) {
60
60
  }
61
61
  function c(l) {
62
62
  return {
63
- $({ context: b, props: h }) {
64
- l = typeof l == "string" ? l : l({ context: b, props: h });
65
- const m = b.bem.els;
63
+ $({ context: p, props: h }) {
64
+ l = typeof l == "string" ? l : l({ context: p, props: h });
65
+ const m = p.bem.els;
66
66
  if (process.env.NODE_ENV !== "production" && m !== null && m.length >= 2)
67
67
  throw Error(`[css-render/plugin-bem]: notM(${l}) is invalid, using modifier inside multiple elements is not allowed`);
68
- return `&:not(${(h == null ? void 0 : h.bPrefix) || t}${b.bem.b}${m !== null && m.length > 0 ? `${n}${m[0]}` : ""}${o}${l})`;
68
+ return `&:not(${h?.bPrefix || t}${p.bem.b}${m !== null && m.length > 0 ? `${n}${m[0]}` : ""}${o}${l})`;
69
69
  }
70
70
  };
71
71
  }
@@ -145,7 +145,7 @@ function Xe(e) {
145
145
  const t = document.createElement("style");
146
146
  return t.setAttribute("cssr-id", e), t;
147
147
  }
148
- function W(e) {
148
+ function V(e) {
149
149
  return e ? /^\s*@(s|m)/.test(e) : !1;
150
150
  }
151
151
  const et = /[A-Z]/g;
@@ -207,21 +207,21 @@ function Me(e, t, n, o, r) {
207
207
  const i = e.$;
208
208
  let s = "";
209
209
  if (!i || typeof i == "string")
210
- W(i) ? s = i : t.push(i);
210
+ V(i) ? s = i : t.push(i);
211
211
  else if (typeof i == "function") {
212
212
  const c = i({
213
213
  context: o.context,
214
214
  props: r
215
215
  });
216
- W(c) ? s = c : t.push(c);
216
+ V(c) ? s = c : t.push(c);
217
217
  } else if (i.before && i.before(o.context), !i.$ || typeof i.$ == "string")
218
- W(i.$) ? s = i.$ : t.push(i.$);
218
+ V(i.$) ? s = i.$ : t.push(i.$);
219
219
  else if (i.$) {
220
220
  const c = i.$({
221
221
  context: o.context,
222
222
  props: r
223
223
  });
224
- W(c) ? s = c : t.push(c);
224
+ V(c) ? s = c : t.push(c);
225
225
  }
226
226
  const u = Qe(t), f = ae(u, e.props, o, r);
227
227
  s ? n.push(`${s} {`) : f.length && n.push(f), e.children && te(e.children, {
@@ -304,7 +304,7 @@ function at(e = {}) {
304
304
  const { id: t, parent: n } = e;
305
305
  it(this.instance, this, t, n);
306
306
  }
307
- const _ = function(e, t, n, o) {
307
+ const W = function(e, t, n, o) {
308
308
  return {
309
309
  instance: e,
310
310
  $: t,
@@ -316,7 +316,7 @@ const _ = function(e, t, n, o) {
316
316
  unmount: at
317
317
  };
318
318
  }, ct = function(e, t, n, o) {
319
- return Array.isArray(t) ? _(e, { $: null }, null, t) : Array.isArray(n) ? _(e, t, null, n) : Array.isArray(o) ? _(e, t, n, o) : _(e, t, n, null);
319
+ return Array.isArray(t) ? W(e, { $: null }, null, t) : Array.isArray(n) ? W(e, t, null, n) : Array.isArray(o) ? W(e, t, n, o) : W(e, t, n, null);
320
320
  };
321
321
  function ft(e = {}) {
322
322
  const t = {
@@ -349,23 +349,23 @@ function mt(e, t) {
349
349
  ${t}
350
350
  </style>`;
351
351
  }
352
- function vt(e, t, n) {
352
+ function pt(e, t, n) {
353
353
  const { styles: o, ids: r } = n;
354
354
  r.has(e) || o !== null && (r.add(e), o.push(mt(e, t)));
355
355
  }
356
- const bt = typeof document < "u";
357
- function pt() {
358
- if (bt)
356
+ const vt = typeof document < "u";
357
+ function bt() {
358
+ if (vt)
359
359
  return;
360
- const e = Le(ht, null);
360
+ const e = Be(ht, null);
361
361
  if (e !== null)
362
362
  return {
363
- adapter: (t, n) => vt(t, n, e),
363
+ adapter: (t, n) => pt(t, n, e),
364
364
  context: e
365
365
  };
366
366
  }
367
367
  function gt(e, t) {
368
- const n = pt();
368
+ const n = bt();
369
369
  function o() {
370
370
  t.mount({
371
371
  id: e,
@@ -373,11 +373,11 @@ function gt(e, t) {
373
373
  ssr: n
374
374
  });
375
375
  }
376
- n ? o() : je(() => {
376
+ n ? o() : Le(() => {
377
377
  o();
378
378
  });
379
379
  }
380
- const { cssr: xt, plugin: yt, namespace: Ne } = dt(), { c: x, cB: H, cE: g, cM: U, cNotM: fe } = { ...xt, ...yt }, z = `${Ne}-chrome-tabs`, C = `${Ne}-chrome-tabs-item`, T = "all .2s cubic-bezier(.4, 0, .2, 1)";
380
+ const { cssr: xt, plugin: yt, namespace: Ne } = dt(), { c: x, cB: H, cE: g, cM: U, cNotM: fe } = { ...xt, ...yt }, P = `${Ne}-chrome-tabs`, w = `${Ne}-chrome-tabs-item`, j = "all .2s cubic-bezier(.4, 0, .2, 1)";
381
381
  function $t() {
382
382
  return x([
383
383
  H("chrome-tabs", {
@@ -390,7 +390,7 @@ function $t() {
390
390
  color: "var(--background-color-dark)"
391
391
  }, [
392
392
  x(".group-move, .group-enter-active, .group-leave-active", {
393
- transition: T
393
+ transition: j
394
394
  }),
395
395
  x(".group-enter-from, .group-leave-to", {
396
396
  opacity: 0
@@ -406,7 +406,7 @@ function $t() {
406
406
  padding: "5px",
407
407
  borderRadius: "10px",
408
408
  backgroundColor: "var(--active-background-color)",
409
- transition: T
409
+ transition: j
410
410
  }, [
411
411
  x("svg", {
412
412
  width: "100%",
@@ -486,7 +486,7 @@ function $t() {
486
486
  gap: "5px",
487
487
  borderRadius: "10px",
488
488
  padding: "0 10px",
489
- transition: T
489
+ transition: j
490
490
  }),
491
491
  g("slot", {}),
492
492
  g("icon", {}, [
@@ -504,7 +504,7 @@ function $t() {
504
504
  alignItems: "center",
505
505
  justifyContent: "center",
506
506
  borderRadius: "50%",
507
- transition: T
507
+ transition: j
508
508
  }, [
509
509
  x("&:hover", {
510
510
  backgroundColor: "rgba(0,0,0,0.1)"
@@ -525,7 +525,7 @@ function $t() {
525
525
  width: "100%",
526
526
  display: "flex",
527
527
  alignItems: "flex-end",
528
- transition: T
528
+ transition: j
529
529
  }, [
530
530
  g("block", {
531
531
  height: "100%",
@@ -545,7 +545,7 @@ function $t() {
545
545
  height: "16px",
546
546
  width: "2px",
547
547
  borderRadius: "1px",
548
- transition: T,
548
+ transition: j,
549
549
  backgroundColor: "var(--primary-color)",
550
550
  opacity: 0
551
551
  }, [
@@ -601,8 +601,8 @@ const Z = (e, t) => {
601
601
  viewBox: "0 0 24 24"
602
602
  };
603
603
  function Ct(e, t, n, o, r, i) {
604
- return I(), A("svg", wt, t[0] || (t[0] = [
605
- Te('<g fill="none" stroke="#757575" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path stroke-dasharray="16" stroke-dashoffset="16" d="M12 3c4.97 0 9 4.03 9 9"><animate fill="freeze" attributeName="stroke-dashoffset" dur="0.3s" values="16;0"></animate><animateTransform attributeName="transform" dur="1.5s" repeatCount="indefinite" type="rotate" values="0 12 12;360 12 12"></animateTransform></path><path stroke-dasharray="64" stroke-dashoffset="64" stroke-opacity=".3" d="M12 3c4.97 0 9 4.03 9 9c0 4.97 -4.03 9 -9 9c-4.97 0 -9 -4.03 -9 -9c0 -4.97 4.03 -9 9 -9Z"><animate fill="freeze" attributeName="stroke-dashoffset" dur="1.2s" values="64;0"></animate></path></g>', 1)
604
+ return E(), _("svg", wt, t[0] || (t[0] = [
605
+ je('<g fill="none" stroke="#757575" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path stroke-dasharray="16" stroke-dashoffset="16" d="M12 3c4.97 0 9 4.03 9 9"><animate fill="freeze" attributeName="stroke-dashoffset" dur="0.3s" values="16;0"></animate><animateTransform attributeName="transform" dur="1.5s" repeatCount="indefinite" type="rotate" values="0 12 12;360 12 12"></animateTransform></path><path stroke-dasharray="64" stroke-dashoffset="64" stroke-opacity=".3" d="M12 3c4.97 0 9 4.03 9 9c0 4.97 -4.03 9 -9 9c-4.97 0 -9 -4.03 -9 -9c0 -4.97 4.03 -9 9 -9Z"><animate fill="freeze" attributeName="stroke-dashoffset" dur="1.2s" values="64;0"></animate></path></g>', 1)
606
606
  ]));
607
607
  }
608
608
  const Et = /* @__PURE__ */ Z(kt, [["render", Ct]]), It = {
@@ -614,14 +614,14 @@ const Et = /* @__PURE__ */ Z(kt, [["render", Ct]]), It = {
614
614
  viewBox: "0 0 24 24"
615
615
  };
616
616
  function Nt(e, t, n, o, r, i) {
617
- return I(), A("svg", Mt, t[0] || (t[0] = [
617
+ return E(), _("svg", Mt, t[0] || (t[0] = [
618
618
  k("path", {
619
619
  fill: "#757575",
620
620
  d: "m12 10.587l4.95-4.95l1.414 1.414l-4.95 4.95l4.95 4.95l-1.415 1.414l-4.95-4.95l-4.949 4.95l-1.414-1.415l4.95-4.95l-4.95-4.95L7.05 5.638z"
621
621
  }, null, -1)
622
622
  ]));
623
623
  }
624
- const St = /* @__PURE__ */ Z(It, [["render", Nt]]), At = /* @__PURE__ */ $e({
624
+ const St = /* @__PURE__ */ Z(It, [["render", Nt]]), _t = /* @__PURE__ */ $e({
625
625
  __name: "TabItem",
626
626
  props: {
627
627
  label: { type: [String, Function] },
@@ -638,53 +638,50 @@ const St = /* @__PURE__ */ Z(It, [["render", Nt]]), At = /* @__PURE__ */ $e({
638
638
  },
639
639
  emits: ["itemClick", "itemContextmenu", "itemClose"],
640
640
  setup(e, { emit: t }) {
641
- const n = t, o = N(() => e.activeIndex !== e.index && e.activeIndex !== e.index - 1), r = N(() => e.activeIndex === e.index), i = N(() => typeof e.label == "string" ? re("span", { class: `${C}__label` }, e.label) : e.label), s = N(() => e.loadingIcon ?? re(Et));
641
+ const n = t, o = M(() => e.activeIndex !== e.index && e.activeIndex !== e.index - 1), r = M(() => e.activeIndex === e.index), i = M(() => typeof e.label == "string" ? re("span", { class: `${w}__label` }, e.label) : e.label), s = M(() => e.loadingIcon ?? re(Et));
642
642
  function u(d) {
643
- var a;
644
- d.stopPropagation(), n("itemClick", d), (a = e.onClick) == null || a.call(e, d);
643
+ d.stopPropagation(), n("itemClick", d), e.onClick?.(d);
645
644
  }
646
645
  function f(d) {
647
- var a;
648
- n("itemContextmenu", d), (a = e.onContextMenu) == null || a.call(e, d);
646
+ n("itemContextmenu", d), e.onContextMenu?.(d);
649
647
  }
650
648
  function c() {
651
- var d;
652
- n("itemClose"), (d = e.onClose) == null || d.call(e);
649
+ n("itemClose"), e.onClose?.();
653
650
  }
654
- return (d, a) => (I(), A("div", {
655
- class: E([
656
- p(C),
651
+ return (d, a) => (E(), _("div", {
652
+ class: C([
653
+ b(w),
657
654
  {
658
- [`${p(C)}--active`]: r.value,
659
- [`${p(C)}--disabled`]: d.disabled
655
+ [`${b(w)}--active`]: r.value,
656
+ [`${b(w)}--disabled`]: d.disabled
660
657
  }
661
658
  ]),
662
659
  onClick: u,
663
660
  onContextmenu: f
664
661
  }, [
665
662
  k("div", {
666
- class: E([`${p(C)}__content`])
663
+ class: C([`${b(w)}__content`])
667
664
  }, [
668
665
  k("div", {
669
- class: E([`${p(C)}__icon`])
666
+ class: C([`${b(w)}__icon`])
670
667
  }, [
671
- (I(), X(ie(d.loading ? s.value : d.icon)))
668
+ (E(), X(ie(d.loading ? s.value : d.icon)))
672
669
  ], 2),
673
670
  k("div", {
674
- class: E([`${p(C)}__slot`])
671
+ class: C([`${b(w)}__slot`])
675
672
  }, [
676
- (I(), X(ie(i.value)))
673
+ (E(), X(ie(i.value)))
677
674
  ], 2),
678
- d.closable ? (I(), A("div", {
675
+ d.closable ? (E(), _("div", {
679
676
  key: 0,
680
- class: E([`${p(C)}__close`]),
681
- onClick: Pe(c, ["stop"])
677
+ class: C([`${b(w)}__close`]),
678
+ onClick: Te(c, ["stop"])
682
679
  }, [
683
680
  q(St)
684
681
  ], 2)) : Q("", !0)
685
682
  ], 2),
686
683
  k("div", {
687
- class: E([`${p(C)}__background`])
684
+ class: C([`${b(w)}__background`])
688
685
  }, [
689
686
  a[0] || (a[0] = k("svg", {
690
687
  width: "10",
@@ -693,7 +690,7 @@ const St = /* @__PURE__ */ Z(It, [["render", Nt]]), At = /* @__PURE__ */ $e({
693
690
  k("path", { d: "M 0 10 A 10 10 0 0 0 10 0 L 10 10 Z" })
694
691
  ], -1)),
695
692
  k("div", {
696
- class: E([`${p(C)}__block`])
693
+ class: C([`${b(w)}__block`])
697
694
  }, null, 2),
698
695
  a[1] || (a[1] = k("svg", {
699
696
  width: "10",
@@ -703,19 +700,19 @@ const St = /* @__PURE__ */ Z(It, [["render", Nt]]), At = /* @__PURE__ */ $e({
703
700
  ], -1))
704
701
  ], 2),
705
702
  k("div", {
706
- class: E([`${p(C)}__line`, o.value ? `${p(C)}__line--show` : ""])
703
+ class: C([`${b(w)}__line`, o.value ? `${b(w)}__line--show` : ""])
707
704
  }, null, 2)
708
705
  ], 34));
709
706
  }
710
707
  });
711
708
  function Se(e) {
712
- return ze() ? (Oe(e), !0) : !1;
709
+ return Pe() ? (ze(e), !0) : !1;
713
710
  }
714
- const Rt = typeof window < "u" && typeof document < "u";
711
+ const At = typeof window < "u" && typeof document < "u";
715
712
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
716
- const Bt = Object.prototype.toString, Lt = (e) => Bt.call(e) === "[object Object]", de = () => {
713
+ const Rt = Object.prototype.toString, Bt = (e) => Rt.call(e) === "[object Object]", de = () => {
717
714
  };
718
- function jt(e, t) {
715
+ function Lt(e, t) {
719
716
  function n(...o) {
720
717
  return new Promise((r, i) => {
721
718
  Promise.resolve(e(() => t.apply(this, o), { fn: t, thisArg: this, args: o })).then(r).catch(i);
@@ -723,19 +720,19 @@ function jt(e, t) {
723
720
  }
724
721
  return n;
725
722
  }
726
- function Tt(e, t = {}) {
723
+ function jt(e, t = {}) {
727
724
  let n, o, r = de;
728
725
  const i = (f) => {
729
726
  clearTimeout(f), r(), r = de;
730
727
  };
731
728
  let s;
732
729
  return (f) => {
733
- const c = L(e), d = L(t.maxWait);
734
- return n && i(n), c <= 0 || d !== void 0 && d <= 0 ? (o && (i(o), o = null), Promise.resolve(f())) : new Promise((a, v) => {
730
+ const c = B(e), d = B(t.maxWait);
731
+ return n && i(n), c <= 0 || d !== void 0 && d <= 0 ? (o && (i(o), o = void 0), Promise.resolve(f())) : new Promise((a, v) => {
735
732
  r = t.rejectOnCancel ? v : a, s = f, d && !o && (o = setTimeout(() => {
736
- n && i(n), o = null, a(s());
733
+ n && i(n), o = void 0, a(s());
737
734
  }, d)), n = setTimeout(() => {
738
- o && i(o), o = null, a(f());
735
+ o && i(o), o = void 0, a(f());
739
736
  }, c);
740
737
  });
741
738
  };
@@ -743,20 +740,20 @@ function Tt(e, t = {}) {
743
740
  function G(e) {
744
741
  return Array.isArray(e) ? e : [e];
745
742
  }
746
- function Pt(e) {
743
+ function Tt(e) {
747
744
  return Ce();
748
745
  }
749
- function zt(e, t = 200, n = {}) {
750
- return jt(
751
- Tt(t, n),
746
+ function Pt(e, t = 200, n = {}) {
747
+ return Lt(
748
+ jt(t, n),
752
749
  e
753
750
  );
754
751
  }
755
- function Ot(e, t = !0, n) {
756
- Pt() ? ke(e, n) : t ? e() : we(e);
752
+ function zt(e, t = !0, n) {
753
+ Tt() ? ke(e, n) : t ? e() : we(e);
757
754
  }
758
- function Dt(e, t, n) {
759
- return D(
755
+ function Ot(e, t, n) {
756
+ return O(
760
757
  e,
761
758
  t,
762
759
  {
@@ -765,37 +762,37 @@ function Dt(e, t, n) {
765
762
  }
766
763
  );
767
764
  }
768
- const oe = Rt ? window : void 0;
769
- function B(e) {
765
+ const oe = At ? window : void 0;
766
+ function R(e) {
770
767
  var t;
771
- const n = L(e);
772
- return (t = n == null ? void 0 : n.$el) != null ? t : n;
768
+ const n = B(e);
769
+ return (t = n?.$el) != null ? t : n;
773
770
  }
774
- function Vt(...e) {
771
+ function Dt(...e) {
775
772
  const t = [], n = () => {
776
773
  t.forEach((u) => u()), t.length = 0;
777
- }, o = (u, f, c, d) => (u.addEventListener(f, c, d), () => u.removeEventListener(f, c, d)), r = N(() => {
778
- const u = G(L(e[0])).filter((f) => f != null);
774
+ }, o = (u, f, c, d) => (u.addEventListener(f, c, d), () => u.removeEventListener(f, c, d)), r = M(() => {
775
+ const u = G(B(e[0])).filter((f) => f != null);
779
776
  return u.every((f) => typeof f != "string") ? u : void 0;
780
- }), i = Dt(
777
+ }), i = Ot(
781
778
  () => {
782
779
  var u, f;
783
780
  return [
784
- (f = (u = r.value) == null ? void 0 : u.map((c) => B(c))) != null ? f : [oe].filter((c) => c != null),
785
- G(L(r.value ? e[1] : e[0])),
786
- G(p(r.value ? e[2] : e[1])),
781
+ (f = (u = r.value) == null ? void 0 : u.map((c) => R(c))) != null ? f : [oe].filter((c) => c != null),
782
+ G(B(r.value ? e[1] : e[0])),
783
+ G(b(r.value ? e[2] : e[1])),
787
784
  // @ts-expect-error - TypeScript gets the correct types, but somehow still complains
788
- L(r.value ? e[3] : e[2])
785
+ B(r.value ? e[3] : e[2])
789
786
  ];
790
787
  },
791
788
  ([u, f, c, d]) => {
792
- if (n(), !(u != null && u.length) || !(f != null && f.length) || !(c != null && c.length))
789
+ if (n(), !u?.length || !f?.length || !c?.length)
793
790
  return;
794
- const a = Lt(d) ? { ...d } : d;
791
+ const a = Bt(d) ? { ...d } : d;
795
792
  t.push(
796
793
  ...u.flatMap(
797
794
  (v) => f.flatMap(
798
- (w) => c.map((l) => o(v, w, l, a))
795
+ (S) => c.map((l) => o(v, S, l, a))
799
796
  )
800
797
  )
801
798
  );
@@ -806,25 +803,25 @@ function Vt(...e) {
806
803
  };
807
804
  return Se(n), s;
808
805
  }
809
- function Wt() {
806
+ function Vt() {
810
807
  const e = ee(!1), t = Ce();
811
808
  return t && ke(() => {
812
809
  e.value = !0;
813
810
  }, t), e;
814
811
  }
815
- function _t(e) {
816
- const t = Wt();
817
- return N(() => (t.value, !!e()));
812
+ function Wt(e) {
813
+ const t = Vt();
814
+ return M(() => (t.value, !!e()));
818
815
  }
819
816
  function Ht(e, t, n = {}) {
820
817
  const { window: o = oe, ...r } = n;
821
818
  let i;
822
- const s = _t(() => o && "ResizeObserver" in o), u = () => {
819
+ const s = Wt(() => o && "ResizeObserver" in o), u = () => {
823
820
  i && (i.disconnect(), i = void 0);
824
- }, f = N(() => {
825
- const a = L(e);
826
- return Array.isArray(a) ? a.map((v) => B(v)) : [B(a)];
827
- }), c = D(
821
+ }, f = M(() => {
822
+ const a = B(e);
823
+ return Array.isArray(a) ? a.map((v) => R(v)) : [R(a)];
824
+ }), c = O(
828
825
  f,
829
826
  (a) => {
830
827
  if (u(), s.value && o) {
@@ -843,33 +840,33 @@ function Ht(e, t, n = {}) {
843
840
  };
844
841
  }
845
842
  function Ft(e, t = { width: 0, height: 0 }, n = {}) {
846
- const { window: o = oe, box: r = "content-box" } = n, i = N(() => {
843
+ const { window: o = oe, box: r = "content-box" } = n, i = M(() => {
847
844
  var a, v;
848
- return (v = (a = B(e)) == null ? void 0 : a.namespaceURI) == null ? void 0 : v.includes("svg");
845
+ return (v = (a = R(e)) == null ? void 0 : a.namespaceURI) == null ? void 0 : v.includes("svg");
849
846
  }), s = ee(t.width), u = ee(t.height), { stop: f } = Ht(
850
847
  e,
851
848
  ([a]) => {
852
849
  const v = r === "border-box" ? a.borderBoxSize : r === "content-box" ? a.contentBoxSize : a.devicePixelContentBoxSize;
853
850
  if (o && i.value) {
854
- const w = B(e);
855
- if (w) {
856
- const l = w.getBoundingClientRect();
851
+ const S = R(e);
852
+ if (S) {
853
+ const l = S.getBoundingClientRect();
857
854
  s.value = l.width, u.value = l.height;
858
855
  }
859
856
  } else if (v) {
860
- const w = G(v);
861
- s.value = w.reduce((l, { inlineSize: b }) => l + b, 0), u.value = w.reduce((l, { blockSize: b }) => l + b, 0);
857
+ const S = G(v);
858
+ s.value = S.reduce((l, { inlineSize: p }) => l + p, 0), u.value = S.reduce((l, { blockSize: p }) => l + p, 0);
862
859
  } else
863
860
  s.value = a.contentRect.width, u.value = a.contentRect.height;
864
861
  },
865
862
  n
866
863
  );
867
- Ot(() => {
868
- const a = B(e);
864
+ zt(() => {
865
+ const a = R(e);
869
866
  a && (s.value = "offsetWidth" in a ? a.offsetWidth : t.width, u.value = "offsetHeight" in a ? a.offsetHeight : t.height);
870
867
  });
871
- const c = D(
872
- () => B(e),
868
+ const c = O(
869
+ () => R(e),
873
870
  (a) => {
874
871
  s.value = a ? t.width : 0, u.value = a ? t.height : 0;
875
872
  }
@@ -884,11 +881,10 @@ function Ft(e, t = { width: 0, height: 0 }, n = {}) {
884
881
  };
885
882
  }
886
883
  function qt(e) {
887
- const { activeClassName: t = ".active", enableWheel: n = !0, direction: o = "vertical" } = e ?? {}, r = De(), { width: i, height: s } = Ft(r);
884
+ const { activeClassName: t = ".active", enableWheel: n = !0, direction: o = "vertical" } = e ?? {}, r = Oe(), { width: i, height: s } = Ft(r);
888
885
  async function u(d) {
889
- var v;
890
886
  await we();
891
- const a = (v = r.value) == null ? void 0 : v.querySelector(t);
887
+ const a = r.value?.querySelector(t);
892
888
  a && a.scrollIntoView({
893
889
  behavior: "smooth",
894
890
  block: "nearest",
@@ -897,68 +893,67 @@ function qt(e) {
897
893
  });
898
894
  }
899
895
  function f(d) {
900
- var v, w;
901
896
  if (!n) return;
902
897
  d.preventDefault();
903
898
  const { deltaY: a } = d;
904
899
  switch (o) {
905
900
  case "vertical":
906
- (v = r.value) == null || v.scrollBy({
901
+ r.value?.scrollBy({
907
902
  top: a > 0 ? s.value : -s.value,
908
903
  behavior: "smooth"
909
904
  });
910
905
  break;
911
906
  case "horizontal":
912
- (w = r.value) == null || w.scrollBy({
907
+ r.value?.scrollBy({
913
908
  left: a > 0 ? i.value : -i.value,
914
909
  behavior: "smooth"
915
910
  });
916
911
  break;
917
912
  }
918
913
  }
919
- Vt(r, "wheel", f);
920
- const c = zt(u, 500);
921
- return D([i, s], () => {
914
+ Dt(r, "wheel", f);
915
+ const c = Pt(u, 500);
916
+ return O([i, s], () => {
922
917
  c();
923
918
  }), {
924
919
  scrollRef: r,
925
920
  scrollToView: u
926
921
  };
927
922
  }
928
- var Gt = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, R = function(e) {
923
+ var Gt = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, A = function(e) {
929
924
  return typeof e == "string" ? e.length > 0 : typeof e == "number";
930
925
  }, y = function(e, t, n) {
931
926
  return t === void 0 && (t = 0), n === void 0 && (n = Math.pow(10, t)), Math.round(n * e) / n + 0;
932
- }, S = function(e, t, n) {
927
+ }, N = function(e, t, n) {
933
928
  return t === void 0 && (t = 0), n === void 0 && (n = 1), e > n ? n : e > t ? e : t;
934
- }, Ae = function(e) {
929
+ }, _e = function(e) {
935
930
  return (e = isFinite(e) ? e % 360 : 0) > 0 ? e : e + 360;
936
931
  }, he = function(e) {
937
- return { r: S(e.r, 0, 255), g: S(e.g, 0, 255), b: S(e.b, 0, 255), a: S(e.a) };
932
+ return { r: N(e.r, 0, 255), g: N(e.g, 0, 255), b: N(e.b, 0, 255), a: N(e.a) };
938
933
  }, K = function(e) {
939
934
  return { r: y(e.r), g: y(e.g), b: y(e.b), a: y(e.a, 3) };
940
935
  }, Zt = /^#([0-9a-f]{3,8})$/i, F = function(e) {
941
936
  var t = e.toString(16);
942
937
  return t.length < 2 ? "0" + t : t;
943
- }, Re = function(e) {
938
+ }, Ae = function(e) {
944
939
  var t = e.r, n = e.g, o = e.b, r = e.a, i = Math.max(t, n, o), s = i - Math.min(t, n, o), u = s ? i === t ? (n - o) / s : i === n ? 2 + (o - t) / s : 4 + (t - n) / s : 0;
945
940
  return { h: 60 * (u < 0 ? u + 6 : u), s: i ? s / i * 100 : 0, v: i / 255 * 100, a: r };
946
- }, Be = function(e) {
941
+ }, Re = function(e) {
947
942
  var t = e.h, n = e.s, o = e.v, r = e.a;
948
943
  t = t / 360 * 6, n /= 100, o /= 100;
949
944
  var i = Math.floor(t), s = o * (1 - n), u = o * (1 - (t - i) * n), f = o * (1 - (1 - t + i) * n), c = i % 6;
950
945
  return { r: 255 * [o, u, s, s, f, o][c], g: 255 * [f, o, o, u, s, s][c], b: 255 * [s, s, f, o, o, u][c], a: r };
951
946
  }, me = function(e) {
952
- return { h: Ae(e.h), s: S(e.s, 0, 100), l: S(e.l, 0, 100), a: S(e.a) };
953
- }, ve = function(e) {
947
+ return { h: _e(e.h), s: N(e.s, 0, 100), l: N(e.l, 0, 100), a: N(e.a) };
948
+ }, pe = function(e) {
954
949
  return { h: y(e.h), s: y(e.s), l: y(e.l), a: y(e.a, 3) };
955
- }, be = function(e) {
956
- return Be((n = (t = e).s, { h: t.h, s: (n *= ((o = t.l) < 50 ? o : 100 - o) / 100) > 0 ? 2 * n / (o + n) * 100 : 0, v: o + n, a: t.a }));
950
+ }, ve = function(e) {
951
+ return Re((n = (t = e).s, { h: t.h, s: (n *= ((o = t.l) < 50 ? o : 100 - o) / 100) > 0 ? 2 * n / (o + n) * 100 : 0, v: o + n, a: t.a }));
957
952
  var t, n, o;
958
- }, O = function(e) {
959
- return { h: (t = Re(e)).h, s: (r = (200 - (n = t.s)) * (o = t.v) / 100) > 0 && r < 200 ? n * o / 100 / (r <= 100 ? r : 200 - r) * 100 : 0, l: r / 2, a: t.a };
953
+ }, z = function(e) {
954
+ return { h: (t = Ae(e)).h, s: (r = (200 - (n = t.s)) * (o = t.v) / 100) > 0 && r < 200 ? n * o / 100 / (r <= 100 ? r : 200 - r) * 100 : 0, l: r / 2, a: t.a };
960
955
  var t, n, o, r;
961
- }, Ut = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, Kt = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, Yt = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, Jt = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, pe = { string: [[function(e) {
956
+ }, Ut = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, Kt = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, Yt = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, Jt = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, be = { string: [[function(e) {
962
957
  var t = Zt.exec(e);
963
958
  return t ? (e = t[1]).length <= 4 ? { r: parseInt(e[0] + e[0], 16), g: parseInt(e[1] + e[1], 16), b: parseInt(e[2] + e[2], 16), a: e.length === 4 ? y(parseInt(e[3] + e[3], 16) / 255, 2) : 1 } : e.length === 6 || e.length === 8 ? { r: parseInt(e.substr(0, 2), 16), g: parseInt(e.substr(2, 2), 16), b: parseInt(e.substr(4, 2), 16), a: e.length === 8 ? y(parseInt(e.substr(6, 2), 16) / 255, 2) : 1 } : null : null;
964
959
  }, "hex"], [function(e) {
@@ -968,22 +963,22 @@ var Gt = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, R = function(e) {
968
963
  var t = Ut.exec(e) || Kt.exec(e);
969
964
  if (!t) return null;
970
965
  var n, o, r = me({ h: (n = t[1], o = t[2], o === void 0 && (o = "deg"), Number(n) * (Gt[o] || 1)), s: Number(t[3]), l: Number(t[4]), a: t[5] === void 0 ? 1 : Number(t[5]) / (t[6] ? 100 : 1) });
971
- return be(r);
966
+ return ve(r);
972
967
  }, "hsl"]], object: [[function(e) {
973
968
  var t = e.r, n = e.g, o = e.b, r = e.a, i = r === void 0 ? 1 : r;
974
- return R(t) && R(n) && R(o) ? he({ r: Number(t), g: Number(n), b: Number(o), a: Number(i) }) : null;
969
+ return A(t) && A(n) && A(o) ? he({ r: Number(t), g: Number(n), b: Number(o), a: Number(i) }) : null;
975
970
  }, "rgb"], [function(e) {
976
971
  var t = e.h, n = e.s, o = e.l, r = e.a, i = r === void 0 ? 1 : r;
977
- if (!R(t) || !R(n) || !R(o)) return null;
972
+ if (!A(t) || !A(n) || !A(o)) return null;
978
973
  var s = me({ h: Number(t), s: Number(n), l: Number(o), a: Number(i) });
979
- return be(s);
974
+ return ve(s);
980
975
  }, "hsl"], [function(e) {
981
976
  var t = e.h, n = e.s, o = e.v, r = e.a, i = r === void 0 ? 1 : r;
982
- if (!R(t) || !R(n) || !R(o)) return null;
977
+ if (!A(t) || !A(n) || !A(o)) return null;
983
978
  var s = function(u) {
984
- return { h: Ae(u.h), s: S(u.s, 0, 100), v: S(u.v, 0, 100), a: S(u.a) };
979
+ return { h: _e(u.h), s: N(u.s, 0, 100), v: N(u.v, 0, 100), a: N(u.a) };
985
980
  }({ h: Number(t), s: Number(n), v: Number(o), a: Number(i) });
986
- return Be(s);
981
+ return Re(s);
987
982
  }, "hsv"]] }, ge = function(e, t) {
988
983
  for (var n = 0; n < t.length; n++) {
989
984
  var o = t[n][0](e);
@@ -991,15 +986,15 @@ var Gt = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, R = function(e) {
991
986
  }
992
987
  return [null, void 0];
993
988
  }, Qt = function(e) {
994
- return typeof e == "string" ? ge(e.trim(), pe.string) : typeof e == "object" && e !== null ? ge(e, pe.object) : [null, void 0];
989
+ return typeof e == "string" ? ge(e.trim(), be.string) : typeof e == "object" && e !== null ? ge(e, be.object) : [null, void 0];
995
990
  }, Y = function(e, t) {
996
- var n = O(e);
997
- return { h: n.h, s: S(n.s + 100 * t, 0, 100), l: n.l, a: n.a };
991
+ var n = z(e);
992
+ return { h: n.h, s: N(n.s + 100 * t, 0, 100), l: n.l, a: n.a };
998
993
  }, J = function(e) {
999
994
  return (299 * e.r + 587 * e.g + 114 * e.b) / 1e3 / 255;
1000
995
  }, xe = function(e, t) {
1001
- var n = O(e);
1002
- return { h: n.h, s: n.s, l: S(n.l + 100 * t, 0, 100), a: n.a };
996
+ var n = z(e);
997
+ return { h: n.h, s: n.s, l: N(n.l + 100 * t, 0, 100), a: n.a };
1003
998
  }, ye = function() {
1004
999
  function e(t) {
1005
1000
  this.parsed = Qt(t)[0], this.rgba = this.parsed || { r: 0, g: 0, b: 0, a: 1 };
@@ -1021,38 +1016,38 @@ var Gt = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, R = function(e) {
1021
1016
  return t = K(this.rgba), n = t.r, o = t.g, r = t.b, (i = t.a) < 1 ? "rgba(" + n + ", " + o + ", " + r + ", " + i + ")" : "rgb(" + n + ", " + o + ", " + r + ")";
1022
1017
  var t, n, o, r, i;
1023
1018
  }, e.prototype.toHsl = function() {
1024
- return ve(O(this.rgba));
1019
+ return pe(z(this.rgba));
1025
1020
  }, e.prototype.toHslString = function() {
1026
- return t = ve(O(this.rgba)), n = t.h, o = t.s, r = t.l, (i = t.a) < 1 ? "hsla(" + n + ", " + o + "%, " + r + "%, " + i + ")" : "hsl(" + n + ", " + o + "%, " + r + "%)";
1021
+ return t = pe(z(this.rgba)), n = t.h, o = t.s, r = t.l, (i = t.a) < 1 ? "hsla(" + n + ", " + o + "%, " + r + "%, " + i + ")" : "hsl(" + n + ", " + o + "%, " + r + "%)";
1027
1022
  var t, n, o, r, i;
1028
1023
  }, e.prototype.toHsv = function() {
1029
- return t = Re(this.rgba), { h: y(t.h), s: y(t.s), v: y(t.v), a: y(t.a, 3) };
1024
+ return t = Ae(this.rgba), { h: y(t.h), s: y(t.s), v: y(t.v), a: y(t.a, 3) };
1030
1025
  var t;
1031
1026
  }, e.prototype.invert = function() {
1032
- return M({ r: 255 - (t = this.rgba).r, g: 255 - t.g, b: 255 - t.b, a: t.a });
1027
+ return I({ r: 255 - (t = this.rgba).r, g: 255 - t.g, b: 255 - t.b, a: t.a });
1033
1028
  var t;
1034
1029
  }, e.prototype.saturate = function(t) {
1035
- return t === void 0 && (t = 0.1), M(Y(this.rgba, t));
1030
+ return t === void 0 && (t = 0.1), I(Y(this.rgba, t));
1036
1031
  }, e.prototype.desaturate = function(t) {
1037
- return t === void 0 && (t = 0.1), M(Y(this.rgba, -t));
1032
+ return t === void 0 && (t = 0.1), I(Y(this.rgba, -t));
1038
1033
  }, e.prototype.grayscale = function() {
1039
- return M(Y(this.rgba, -1));
1034
+ return I(Y(this.rgba, -1));
1040
1035
  }, e.prototype.lighten = function(t) {
1041
- return t === void 0 && (t = 0.1), M(xe(this.rgba, t));
1036
+ return t === void 0 && (t = 0.1), I(xe(this.rgba, t));
1042
1037
  }, e.prototype.darken = function(t) {
1043
- return t === void 0 && (t = 0.1), M(xe(this.rgba, -t));
1038
+ return t === void 0 && (t = 0.1), I(xe(this.rgba, -t));
1044
1039
  }, e.prototype.rotate = function(t) {
1045
1040
  return t === void 0 && (t = 15), this.hue(this.hue() + t);
1046
1041
  }, e.prototype.alpha = function(t) {
1047
- return typeof t == "number" ? M({ r: (n = this.rgba).r, g: n.g, b: n.b, a: t }) : y(this.rgba.a, 3);
1042
+ return typeof t == "number" ? I({ r: (n = this.rgba).r, g: n.g, b: n.b, a: t }) : y(this.rgba.a, 3);
1048
1043
  var n;
1049
1044
  }, e.prototype.hue = function(t) {
1050
- var n = O(this.rgba);
1051
- return typeof t == "number" ? M({ h: t, s: n.s, l: n.l, a: n.a }) : y(n.h);
1045
+ var n = z(this.rgba);
1046
+ return typeof t == "number" ? I({ h: t, s: n.s, l: n.l, a: n.a }) : y(n.h);
1052
1047
  }, e.prototype.isEqual = function(t) {
1053
- return this.toHex() === M(t).toHex();
1048
+ return this.toHex() === I(t).toHex();
1054
1049
  }, e;
1055
- }(), M = function(e) {
1050
+ }(), I = function(e) {
1056
1051
  return e instanceof ye ? e : new ye(e);
1057
1052
  };
1058
1053
  const Xt = {
@@ -1064,7 +1059,7 @@ const Xt = {
1064
1059
  viewBox: "0 0 24 24"
1065
1060
  };
1066
1061
  function tn(e, t, n, o, r, i) {
1067
- return I(), A("svg", en, t[0] || (t[0] = [
1062
+ return E(), _("svg", en, t[0] || (t[0] = [
1068
1063
  k("path", {
1069
1064
  fill: "#757575",
1070
1065
  d: "M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"
@@ -1080,7 +1075,7 @@ const nn = /* @__PURE__ */ Z(Xt, [["render", tn]]), on = {
1080
1075
  viewBox: "0 0 24 24"
1081
1076
  };
1082
1077
  function sn(e, t, n, o, r, i) {
1083
- return I(), A("svg", rn, t[0] || (t[0] = [
1078
+ return E(), _("svg", rn, t[0] || (t[0] = [
1084
1079
  k("path", {
1085
1080
  fill: "#757575",
1086
1081
  d: "m12 15l-4.243-4.242l1.415-1.414L12 12.172l2.828-2.828l1.415 1.414z"
@@ -1102,39 +1097,36 @@ const un = /* @__PURE__ */ Z(on, [["render", sn]]), an = /* @__PURE__ */ $e({
1102
1097
  setup(e, { emit: t }) {
1103
1098
  const n = t;
1104
1099
  gt("n-chrome-tabs", $t());
1105
- const { background: o = "#E5E7EB", active: r = "#fff", primary: i = "rgba(251,191,36,1)" } = e.colors ?? {}, s = Ve(e, "value"), u = N(() => {
1106
- var h;
1107
- return (h = e.options) == null ? void 0 : h.findIndex((m) => m.key === s.value);
1108
- }), { scrollRef: f, scrollToView: c } = qt({ activeClassName: `.${C}--active`, direction: "horizontal" });
1109
- D(s, () => {
1100
+ const { background: o = "#E5E7EB", active: r = "#fff", primary: i = "rgba(251,191,36,1)" } = e.colors ?? {}, s = De(e, "value"), u = M(() => e.options?.findIndex((h) => h.key === s.value)), { scrollRef: f, scrollToView: c } = qt({ activeClassName: `.${w}--active`, direction: "horizontal" });
1101
+ O(s, () => {
1110
1102
  c();
1111
1103
  }, {
1112
1104
  immediate: !0
1113
1105
  });
1114
- const d = N(() => M(o).darken(0.9).toHex()), a = N(() => M(r).darken(0.8).toHex()), v = N(() => M(i).darken(0.3).toHex());
1115
- function w(h) {
1106
+ const d = M(() => I(o).darken(0.9).toHex()), a = M(() => I(r).darken(0.8).toHex()), v = M(() => I(i).darken(0.3).toHex());
1107
+ function S(h) {
1116
1108
  n("click", h);
1117
1109
  }
1118
1110
  function l(h) {
1119
1111
  n("contextmenu", h);
1120
1112
  }
1121
- function b(h) {
1113
+ function p(h) {
1122
1114
  n("close", h);
1123
1115
  }
1124
- return (h, m) => (I(), A("div", {
1125
- class: E([p(z)]),
1126
- style: We({
1127
- "--background-color": `${p(o)}`,
1116
+ return (h, m) => (E(), _("div", {
1117
+ class: C([b(P)]),
1118
+ style: Ve({
1119
+ "--background-color": `${b(o)}`,
1128
1120
  "--background-color-dark": `${d.value}`,
1129
- "--active-background-color": `${p(r)}`,
1121
+ "--active-background-color": `${b(r)}`,
1130
1122
  "--active-background-color-dark": `${a.value}`,
1131
- "--primary-color": `${p(i)}`,
1123
+ "--primary-color": `${b(i)}`,
1132
1124
  "--primary-color-dark": `${v.value}`
1133
1125
  })
1134
1126
  }, [
1135
- h.dropdown ? (I(), A("div", {
1127
+ h.dropdown ? (E(), _("div", {
1136
1128
  key: 0,
1137
- class: E([`${p(z)}__icon`])
1129
+ class: C([`${b(P)}__icon`])
1138
1130
  }, [
1139
1131
  q(un)
1140
1132
  ], 2)) : Q("", !0),
@@ -1142,29 +1134,29 @@ const un = /* @__PURE__ */ Z(on, [["render", sn]]), an = /* @__PURE__ */ $e({
1142
1134
  k("div", {
1143
1135
  ref_key: "scrollRef",
1144
1136
  ref: f,
1145
- class: E([`${p(z)}__content`])
1137
+ class: C([`${b(P)}__content`])
1146
1138
  }, [
1147
- q(_e, {
1139
+ q(We, {
1148
1140
  name: "group",
1149
1141
  tag: "div",
1150
- class: E([`${p(z)}__scroll`])
1142
+ class: C([`${b(P)}__scroll`])
1151
1143
  }, {
1152
1144
  default: He(() => [
1153
- (I(!0), A(Fe, null, qe(h.options, ({ key: $, ...P }, j) => (I(), X(At, Ge({ key: $ }, { ref_for: !0 }, P, {
1154
- index: j,
1145
+ (E(!0), _(Fe, null, qe(h.options, ({ key: $, ...T }, L) => (E(), X(_t, Ge({ key: $ }, { ref_for: !0 }, T, {
1146
+ index: L,
1155
1147
  "active-index": u.value,
1156
- onItemClick: (V) => w($),
1157
- onItemContextmenu: (V) => l($),
1158
- onItemClose: (V) => b($)
1148
+ onItemClick: (D) => S($),
1149
+ onItemContextmenu: (D) => l($),
1150
+ onItemClose: (D) => p($)
1159
1151
  }), null, 16, ["index", "active-index", "onItemClick", "onItemContextmenu", "onItemClose"]))), 128))
1160
1152
  ]),
1161
1153
  _: 1
1162
1154
  }, 8, ["class"])
1163
1155
  ], 2),
1164
1156
  ue(h.$slots, "suffix"),
1165
- h.addable ? (I(), A("div", {
1157
+ h.addable ? (E(), _("div", {
1166
1158
  key: 1,
1167
- class: E([`${p(z)}__icon`]),
1159
+ class: C([`${b(P)}__icon`]),
1168
1160
  onClick: m[0] || (m[0] = ($) => n("add"))
1169
1161
  }, [
1170
1162
  q(nn)
@@ -1173,6 +1165,6 @@ const un = /* @__PURE__ */ Z(on, [["render", sn]]), an = /* @__PURE__ */ $e({
1173
1165
  }
1174
1166
  });
1175
1167
  export {
1176
- At as CTabItem,
1168
+ _t as CTabItem,
1177
1169
  an as CTabs
1178
1170
  };
@@ -1,4 +1,4 @@
1
- (function(B,r){typeof exports=="object"&&typeof module<"u"?r(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],r):(B=typeof globalThis<"u"?globalThis:B||self,r(B["@oiij/chrome-tabs"]={},B.Vue))})(this,function(B,r){"use strict";function be(e){let t=".",n="__",o="--",i;if(e){let c=e.blockPrefix;c&&(t=c),c=e.elementPrefix,c&&(n=c),c=e.modifierPrefix,c&&(o=c)}const l={install(c){i=c.c;const g=c.context;g.bem={},g.bem.b=null,g.bem.els=null}};function s(c){let g,h;return{before(p){g=p.bem.b,h=p.bem.els,p.bem.els=null},after(p){p.bem.b=g,p.bem.els=h},$({context:p,props:v}){return c=typeof c=="string"?c:c({context:p,props:v}),p.bem.b=c,`${(v==null?void 0:v.bPrefix)||t}${p.bem.b}`}}}function a(c){let g;return{before(h){g=h.bem.els},after(h){h.bem.els=g},$({context:h,props:p}){return c=typeof c=="string"?c:c({context:h,props:p}),h.bem.els=c.split(",").map(v=>v.trim()),h.bem.els.map(v=>`${(p==null?void 0:p.bPrefix)||t}${h.bem.b}${n}${v}`).join(", ")}}}function d(c){return{$({context:g,props:h}){c=typeof c=="string"?c:c({context:g,props:h});const p=c.split(",").map(S=>S.trim());function v(S){return p.map(D=>`&${(h==null?void 0:h.bPrefix)||t}${g.bem.b}${S!==void 0?`${n}${S}`:""}${o}${D}`).join(", ")}const R=g.bem.els;if(R!==null){if(process.env.NODE_ENV!=="production"&&R.length>=2)throw Error(`[css-render/plugin-bem]: m(${c}) is invalid, using modifier inside multiple elements is not allowed`);return v(R[0])}else return v()}}}function f(c){return{$({context:g,props:h}){c=typeof c=="string"?c:c({context:g,props:h});const p=g.bem.els;if(process.env.NODE_ENV!=="production"&&p!==null&&p.length>=2)throw Error(`[css-render/plugin-bem]: notM(${c}) is invalid, using modifier inside multiple elements is not allowed`);return`&:not(${(h==null?void 0:h.bPrefix)||t}${g.bem.b}${p!==null&&p.length>0?`${n}${p[0]}`:""}${o}${c})`}}}return Object.assign(l,{cB:(...c)=>i(s(c[0]),c[1],c[2]),cE:(...c)=>i(a(c[0]),c[1],c[2]),cM:(...c)=>i(d(c[0]),c[1],c[2]),cNotM:(...c)=>i(f(c[0]),c[1],c[2])}),l}function ge(e){let t=0;for(let n=0;n<e.length;++n)e[n]==="&"&&++t;return t}const U=/\s*,(?![^(]*\))\s*/g,xe=/\s+/g;function ye(e,t){const n=[];return t.split(U).forEach(o=>{let i=ge(o);if(i){if(i===1){e.forEach(s=>{n.push(o.replace("&",s))});return}}else{e.forEach(s=>{n.push((s&&s+" ")+o)});return}let l=[o];for(;i--;){const s=[];l.forEach(a=>{e.forEach(d=>{s.push(a.replace("&",d))})}),l=s}l.forEach(s=>n.push(s))}),n}function ke(e,t){const n=[];return t.split(U).forEach(o=>{e.forEach(i=>{n.push((i&&i+" ")+o)})}),n}function ve(e){let t=[""];return e.forEach(n=>{n=n&&n.trim(),n&&(n.includes("&")?t=ye(t,n):t=ke(t,n))}),t.join(", ").replace(xe," ")}function K(e){if(!e)return;const t=e.parentElement;t&&t.removeChild(e)}function W(e,t){return(t??document.head).querySelector(`style[cssr-id="${e}"]`)}function $e(e){const t=document.createElement("style");return t.setAttribute("cssr-id",e),t}function z(e){return e?/^\s*@(s|m)/.test(e):!1}const Ce=/[A-Z]/g;function Y(e){return e.replace(Ce,t=>"-"+t.toLowerCase())}function we(e,t=" "){return typeof e=="object"&&e!==null?` {
1
+ (function(B,r){typeof exports=="object"&&typeof module<"u"?r(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],r):(B=typeof globalThis<"u"?globalThis:B||self,r(B["@oiij/chrome-tabs"]={},B.Vue))})(this,function(B,r){"use strict";function be(e){let t=".",n="__",o="--",i;if(e){let c=e.blockPrefix;c&&(t=c),c=e.elementPrefix,c&&(n=c),c=e.modifierPrefix,c&&(o=c)}const l={install(c){i=c.c;const b=c.context;b.bem={},b.bem.b=null,b.bem.els=null}};function s(c){let b,h;return{before(p){b=p.bem.b,h=p.bem.els,p.bem.els=null},after(p){p.bem.b=b,p.bem.els=h},$({context:p,props:v}){return c=typeof c=="string"?c:c({context:p,props:v}),p.bem.b=c,`${v?.bPrefix||t}${p.bem.b}`}}}function a(c){let b;return{before(h){b=h.bem.els},after(h){h.bem.els=b},$({context:h,props:p}){return c=typeof c=="string"?c:c({context:h,props:p}),h.bem.els=c.split(",").map(v=>v.trim()),h.bem.els.map(v=>`${p?.bPrefix||t}${h.bem.b}${n}${v}`).join(", ")}}}function d(c){return{$({context:b,props:h}){c=typeof c=="string"?c:c({context:b,props:h});const p=c.split(",").map(S=>S.trim());function v(S){return p.map(O=>`&${h?.bPrefix||t}${b.bem.b}${S!==void 0?`${n}${S}`:""}${o}${O}`).join(", ")}const A=b.bem.els;if(A!==null){if(process.env.NODE_ENV!=="production"&&A.length>=2)throw Error(`[css-render/plugin-bem]: m(${c}) is invalid, using modifier inside multiple elements is not allowed`);return v(A[0])}else return v()}}}function f(c){return{$({context:b,props:h}){c=typeof c=="string"?c:c({context:b,props:h});const p=b.bem.els;if(process.env.NODE_ENV!=="production"&&p!==null&&p.length>=2)throw Error(`[css-render/plugin-bem]: notM(${c}) is invalid, using modifier inside multiple elements is not allowed`);return`&:not(${h?.bPrefix||t}${b.bem.b}${p!==null&&p.length>0?`${n}${p[0]}`:""}${o}${c})`}}}return Object.assign(l,{cB:(...c)=>i(s(c[0]),c[1],c[2]),cE:(...c)=>i(a(c[0]),c[1],c[2]),cM:(...c)=>i(d(c[0]),c[1],c[2]),cNotM:(...c)=>i(f(c[0]),c[1],c[2])}),l}function ge(e){let t=0;for(let n=0;n<e.length;++n)e[n]==="&"&&++t;return t}const U=/\s*,(?![^(]*\))\s*/g,xe=/\s+/g;function ye(e,t){const n=[];return t.split(U).forEach(o=>{let i=ge(o);if(i){if(i===1){e.forEach(s=>{n.push(o.replace("&",s))});return}}else{e.forEach(s=>{n.push((s&&s+" ")+o)});return}let l=[o];for(;i--;){const s=[];l.forEach(a=>{e.forEach(d=>{s.push(a.replace("&",d))})}),l=s}l.forEach(s=>n.push(s))}),n}function ke(e,t){const n=[];return t.split(U).forEach(o=>{e.forEach(i=>{n.push((i&&i+" ")+o)})}),n}function ve(e){let t=[""];return e.forEach(n=>{n=n&&n.trim(),n&&(n.includes("&")?t=ye(t,n):t=ke(t,n))}),t.join(", ").replace(xe," ")}function K(e){if(!e)return;const t=e.parentElement;t&&t.removeChild(e)}function D(e,t){return(t??document.head).querySelector(`style[cssr-id="${e}"]`)}function $e(e){const t=document.createElement("style");return t.setAttribute("cssr-id",e),t}function R(e){return e?/^\s*@(s|m)/.test(e):!1}const Ce=/[A-Z]/g;function Y(e){return e.replace(Ce,t=>"-"+t.toLowerCase())}function we(e,t=" "){return typeof e=="object"&&e!==null?` {
2
2
  `+Object.entries(e).map(n=>t+` ${Y(n[0])}: ${n[1]};`).join(`
3
3
  `)+`
4
4
  `+t+"}":`: ${e};`}function Ee(e,t,n){return typeof e=="function"?e({context:t.context,props:n}):e}function J(e,t,n,o){if(!t)return"";const i=Ee(t,n,o);if(!i)return"";if(typeof i=="string")return`${e} {
@@ -7,8 +7,8 @@ ${i}
7
7
  }`:"";const s=e?[e+" {"]:[];return l.forEach(a=>{const d=i[a];if(a==="raw"){s.push(`
8
8
  `+d+`
9
9
  `);return}a=Y(a),d!=null&&s.push(` ${a}${we(d)}`)}),e&&s.push("}"),s.join(`
10
- `)}function _(e,t,n){e&&e.forEach(o=>{if(Array.isArray(o))_(o,t,n);else if(typeof o=="function"){const i=o(t);Array.isArray(i)?_(i,t,n):i&&n(i)}else o&&n(o)})}function Q(e,t,n,o,i){const l=e.$;let s="";if(!l||typeof l=="string")z(l)?s=l:t.push(l);else if(typeof l=="function"){const f=l({context:o.context,props:i});z(f)?s=f:t.push(f)}else if(l.before&&l.before(o.context),!l.$||typeof l.$=="string")z(l.$)?s=l.$:t.push(l.$);else if(l.$){const f=l.$({context:o.context,props:i});z(f)?s=f:t.push(f)}const a=ve(t),d=J(a,e.props,o,i);s?n.push(`${s} {`):d.length&&n.push(d),e.children&&_(e.children,{context:o.context,props:i},f=>{if(typeof f=="string"){const m=J(a,{raw:f},o,i);n.push(m)}else Q(f,t,n,o,i)}),t.pop(),s&&n.push("}"),l&&l.after&&l.after(o.context)}function Ne(e,t,n){const o=[];return Q(e,[],o,t,n),o.join(`
10
+ `)}function W(e,t,n){e&&e.forEach(o=>{if(Array.isArray(o))W(o,t,n);else if(typeof o=="function"){const i=o(t);Array.isArray(i)?W(i,t,n):i&&n(i)}else o&&n(o)})}function Q(e,t,n,o,i){const l=e.$;let s="";if(!l||typeof l=="string")R(l)?s=l:t.push(l);else if(typeof l=="function"){const f=l({context:o.context,props:i});R(f)?s=f:t.push(f)}else if(l.before&&l.before(o.context),!l.$||typeof l.$=="string")R(l.$)?s=l.$:t.push(l.$);else if(l.$){const f=l.$({context:o.context,props:i});R(f)?s=f:t.push(f)}const a=ve(t),d=J(a,e.props,o,i);s?n.push(`${s} {`):d.length&&n.push(d),e.children&&W(e.children,{context:o.context,props:i},f=>{if(typeof f=="string"){const m=J(a,{raw:f},o,i);n.push(m)}else Q(f,t,n,o,i)}),t.pop(),s&&n.push("}"),l&&l.after&&l.after(o.context)}function Ne(e,t,n){const o=[];return Q(e,[],o,t,n),o.join(`
11
11
 
12
- `)}function Be(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 Ie(e,t,n,o){const{els:i}=t;if(n===void 0)i.forEach(K),t.els=[];else{const l=W(n,o);l&&i.includes(l)&&(K(l),t.els=i.filter(s=>s!==l))}}function X(e,t){e.push(t)}function Me(e,t,n,o,i,l,s,a,d){let f;if(n===void 0&&(f=t.render(o),n=Be(f)),d){d.adapter(n,f??t.render(o));return}a===void 0&&(a=document.head);const m=W(n,a);if(m!==null&&!l)return m;const u=m??$e(n);if(f===void 0&&(f=t.render(o)),u.textContent=f,m!==null)return m;if(s){const b=a.querySelector(`meta[name="${s}"]`);if(b)return a.insertBefore(u,b),X(t.els,u),u}return i?a.insertBefore(u,a.querySelector("style, link")):a.appendChild(u),X(t.els,u),u}function Se(e){return Ne(this,this.instance,e)}function Ve(e={}){const{id:t,ssr:n,props:o,head:i=!1,force:l=!1,anchorMetaName:s,parent:a}=e;return Me(this.instance,this,t,o,i,l,s,a,n)}function Ae(e={}){const{id:t,parent:n}=e;Ie(this.instance,this,t,n)}const L=function(e,t,n,o){return{instance:e,$:t,props:n,children:o,els:[],render:Se,mount:Ve,unmount:Ae}},Re=function(e,t,n,o){return Array.isArray(t)?L(e,{$:null},null,t):Array.isArray(n)?L(e,t,null,n):Array.isArray(o)?L(e,t,n,o):L(e,t,n,null)};function ze(e={}){const t={c:(...n)=>Re(t,...n),use:(n,...o)=>n.install(t,...o),find:W,context:{},config:e};return t}function Le(e){const{namespace:t="n",blockPrefix:n=`.${t}-`,elementPrefix:o="__",modifierPrefix:i="--"}=e??{},l=ze(),s=be({blockPrefix:n,elementPrefix:o,modifierPrefix:i});return l.use(s),{namespace:t,blockPrefix:n,elementPrefix:o,modifierPrefix:i,cssr:l,plugin:s}}const Te="@css-render/vue3-ssr";function je(e,t){return`<style cssr-id="${e}">
12
+ `)}function Be(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 Ie(e,t,n,o){const{els:i}=t;if(n===void 0)i.forEach(K),t.els=[];else{const l=D(n,o);l&&i.includes(l)&&(K(l),t.els=i.filter(s=>s!==l))}}function X(e,t){e.push(t)}function Me(e,t,n,o,i,l,s,a,d){let f;if(n===void 0&&(f=t.render(o),n=Be(f)),d){d.adapter(n,f??t.render(o));return}a===void 0&&(a=document.head);const m=D(n,a);if(m!==null&&!l)return m;const u=m??$e(n);if(f===void 0&&(f=t.render(o)),u.textContent=f,m!==null)return m;if(s){const g=a.querySelector(`meta[name="${s}"]`);if(g)return a.insertBefore(u,g),X(t.els,u),u}return i?a.insertBefore(u,a.querySelector("style, link")):a.appendChild(u),X(t.els,u),u}function Se(e){return Ne(this,this.instance,e)}function Ve(e={}){const{id:t,ssr:n,props:o,head:i=!1,force:l=!1,anchorMetaName:s,parent:a}=e;return Me(this.instance,this,t,o,i,l,s,a,n)}function _e(e={}){const{id:t,parent:n}=e;Ie(this.instance,this,t,n)}const z=function(e,t,n,o){return{instance:e,$:t,props:n,children:o,els:[],render:Se,mount:Ve,unmount:_e}},Ae=function(e,t,n,o){return Array.isArray(t)?z(e,{$:null},null,t):Array.isArray(n)?z(e,t,null,n):Array.isArray(o)?z(e,t,n,o):z(e,t,n,null)};function Re(e={}){const t={c:(...n)=>Ae(t,...n),use:(n,...o)=>n.install(t,...o),find:D,context:{},config:e};return t}function ze(e){const{namespace:t="n",blockPrefix:n=`.${t}-`,elementPrefix:o="__",modifierPrefix:i="--"}=e??{},l=Re(),s=be({blockPrefix:n,elementPrefix:o,modifierPrefix:i});return l.use(s),{namespace:t,blockPrefix:n,elementPrefix:o,modifierPrefix:i,cssr:l,plugin:s}}const Le="@css-render/vue3-ssr";function Te(e,t){return`<style cssr-id="${e}">
13
13
  ${t}
14
- </style>`}function Pe(e,t,n){const{styles:o,ids:i}=n;i.has(e)||o!==null&&(i.add(e),o.push(je(e,t)))}const Oe=typeof document<"u";function De(){if(Oe)return;const e=r.inject(Te,null);if(e!==null)return{adapter:(t,n)=>Pe(t,n,e),context:e}}function We(e,t){const n=De();function o(){t.mount({id:e,head:!0,ssr:n})}n?o():r.onBeforeMount(()=>{o()})}const{cssr:_e,plugin:He,namespace:ee}=Le(),{c:y,cB:T,cE:x,cM:H,cNotM:te}={..._e,...He},V=`${ee}-chrome-tabs`,$=`${ee}-chrome-tabs-item`,M="all .2s cubic-bezier(.4, 0, .2, 1)";function Fe(){return y([T("chrome-tabs",{display:"flex",width:"100%",height:"40px",padding:"0 10px",alignItems:"center",backgroundColor:"var(--background-color)",color:"var(--background-color-dark)"},[y(".group-move, .group-enter-active, .group-leave-active",{transition:M}),y(".group-enter-from, .group-leave-to",{opacity:0}),y(".group-leave-active",{}),x("prefix",{}),x("icon",{width:"28px",height:"28px",display:"flex",alignItems:"center",justifyContent:"center",padding:"5px",borderRadius:"10px",backgroundColor:"var(--active-background-color)",transition:M},[y("svg",{width:"100%",height:"100%",fill:"currentColor"}),y("&:hover",{backgroundColor:"var(--primary-color)"})]),x("content",{flex:"1",height:"100%",minWidth:0,overflow:"hidden",marginLeft:"-6px",padding:"0 10px"}),x("scroll",{position:"relative",display:"flex",alignItems:"center",height:"100%"},[x("icon",{marginLeft:"5px",borderRadius:"50%",backgroundColor:"transparent",flexShrink:0},[y("&:hover",{backgroundColor:"var(--primary-color)"})])]),x("suffix",{})]),T("chrome-tabs-item",{position:"relative",margin:"0 -5px",height:"100%",flexShrink:0,cursor:"default",userSelect:"none",padding:"6px 10px 0px 10px"},[H("disabled",{cursor:"not-allowed",pointerEvents:"none",opacity:.5,filter:"grayscale(0.5)"}),H("active",[x("background",{opacity:1})]),te("active",[y("&:hover",{},[x("content",{backgroundColor:"var(--primary-color)"})])]),y("&::first-child",{marginLeft:"0 !important"}),y("&::last-child",{marginRight:"0 !important"}),x("content",{position:"relative",zIndex:1,height:"28px",display:"flex",alignItems:"center",gap:"5px",borderRadius:"10px",padding:"0 10px",transition:M}),x("slot",{}),x("icon",{},[y("svg",{width:"1.2em",height:"1.2em",fill:"currentColor"})]),x("close",{width:"16px",height:"16px",padding:"2px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"50%",transition:M},[y("&:hover",{backgroundColor:"rgba(0,0,0,0.1)"}),y("svg",{width:"100%",height:"100%",fill:"currentColor"})]),x("background",{position:"absolute",opacity:0,left:0,bottom:0,zIndex:0,height:"34px",width:"100%",display:"flex",alignItems:"flex-end",transition:M},[x("block",{height:"100%",flex:1,minWidth:0,borderRadius:"10px 10px 0 0",backgroundColor:"var(--active-background-color)"}),y("svg",{fill:"var(--active-background-color)"})]),x("line",{position:"absolute",bottom:"12px",right:"4px",height:"16px",width:"2px",borderRadius:"1px",transition:M,backgroundColor:"var(--primary-color)",opacity:0},[H("show",{opacity:1})])]),y(".dark",[T("chrome-tabs",{backgroundColor:"var(--background-color-dark)",color:"var(--background-color)"},[x("icon",{backgroundColor:"var(--active-background-color-dark)"},[y("&:hover",{backgroundColor:"var(--primary-color-dark)"})])]),T("chrome-tabs-item",{},[te("active",[y("&:hover",{},[x("content",{backgroundColor:"var(--primary-color-dark)"})])]),x("background",{},[x("block",{backgroundColor:"var(--active-background-color-dark)"}),y("svg",{fill:"var(--active-background-color-dark)"})])])])])}const j=(e,t)=>{const n=e.__vccOpts||e;for(const[o,i]of t)n[o]=i;return n},qe={name:"LineMdLoadingTwotoneLoop"},Ge={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24"};function Ze(e,t,n,o,i,l){return r.openBlock(),r.createElementBlock("svg",Ge,t[0]||(t[0]=[r.createStaticVNode('<g fill="none" stroke="#757575" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path stroke-dasharray="16" stroke-dashoffset="16" d="M12 3c4.97 0 9 4.03 9 9"><animate fill="freeze" attributeName="stroke-dashoffset" dur="0.3s" values="16;0"></animate><animateTransform attributeName="transform" dur="1.5s" repeatCount="indefinite" type="rotate" values="0 12 12;360 12 12"></animateTransform></path><path stroke-dasharray="64" stroke-dashoffset="64" stroke-opacity=".3" d="M12 3c4.97 0 9 4.03 9 9c0 4.97 -4.03 9 -9 9c-4.97 0 -9 -4.03 -9 -9c0 -4.97 4.03 -9 9 -9Z"><animate fill="freeze" attributeName="stroke-dashoffset" dur="1.2s" values="64;0"></animate></path></g>',1)]))}const Ue=j(qe,[["render",Ze]]),Ke={name:"RiCloseLine"},Ye={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24"};function Je(e,t,n,o,i,l){return r.openBlock(),r.createElementBlock("svg",Ye,t[0]||(t[0]=[r.createElementVNode("path",{fill:"#757575",d:"m12 10.587l4.95-4.95l1.414 1.414l-4.95 4.95l4.95 4.95l-1.415 1.414l-4.95-4.95l-4.949 4.95l-1.414-1.415l4.95-4.95l-4.95-4.95L7.05 5.638z"},null,-1)]))}const Qe=j(Ke,[["render",Je]]),ne=r.defineComponent({__name:"TabItem",props:{label:{type:[String,Function]},icon:{type:Function},closable:{type:Boolean},disabled:{type:Boolean},loading:{type:Boolean},loadingIcon:{type:Function},onClick:{type:Function},onContextMenu:{type:Function},onClose:{type:Function},activeIndex:{default:0},index:{}},emits:["itemClick","itemContextmenu","itemClose"],setup(e,{emit:t}){const n=t,o=r.computed(()=>e.activeIndex!==e.index&&e.activeIndex!==e.index-1),i=r.computed(()=>e.activeIndex===e.index),l=r.computed(()=>typeof e.label=="string"?r.h("span",{class:`${$}__label`},e.label):e.label),s=r.computed(()=>e.loadingIcon??r.h(Ue));function a(m){var u;m.stopPropagation(),n("itemClick",m),(u=e.onClick)==null||u.call(e,m)}function d(m){var u;n("itemContextmenu",m),(u=e.onContextMenu)==null||u.call(e,m)}function f(){var m;n("itemClose"),(m=e.onClose)==null||m.call(e)}return(m,u)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass([r.unref($),{[`${r.unref($)}--active`]:i.value,[`${r.unref($)}--disabled`]:m.disabled}]),onClick:a,onContextmenu:d},[r.createElementVNode("div",{class:r.normalizeClass([`${r.unref($)}__content`])},[r.createElementVNode("div",{class:r.normalizeClass([`${r.unref($)}__icon`])},[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(m.loading?s.value:m.icon)))],2),r.createElementVNode("div",{class:r.normalizeClass([`${r.unref($)}__slot`])},[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(l.value)))],2),m.closable?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass([`${r.unref($)}__close`]),onClick:r.withModifiers(f,["stop"])},[r.createVNode(Qe)],2)):r.createCommentVNode("",!0)],2),r.createElementVNode("div",{class:r.normalizeClass([`${r.unref($)}__background`])},[u[0]||(u[0]=r.createElementVNode("svg",{width:"10",height:"10"},[r.createElementVNode("path",{d:"M 0 10 A 10 10 0 0 0 10 0 L 10 10 Z"})],-1)),r.createElementVNode("div",{class:r.normalizeClass([`${r.unref($)}__block`])},null,2),u[1]||(u[1]=r.createElementVNode("svg",{width:"10",height:"10"},[r.createElementVNode("path",{d:"M 0 0 A 10 10 0 0 0 10 10 L 0 10 Z"})],-1))],2),r.createElementVNode("div",{class:r.normalizeClass([`${r.unref($)}__line`,o.value?`${r.unref($)}__line--show`:""])},null,2)],34))}});function oe(e){return r.getCurrentScope()?(r.onScopeDispose(e),!0):!1}const Xe=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const et=Object.prototype.toString,tt=e=>et.call(e)==="[object Object]",re=()=>{};function nt(e,t){function n(...o){return new Promise((i,l)=>{Promise.resolve(e(()=>t.apply(this,o),{fn:t,thisArg:this,args:o})).then(i).catch(l)})}return n}function ot(e,t={}){let n,o,i=re;const l=d=>{clearTimeout(d),i(),i=re};let s;return d=>{const f=r.toValue(e),m=r.toValue(t.maxWait);return n&&l(n),f<=0||m!==void 0&&m<=0?(o&&(l(o),o=null),Promise.resolve(d())):new Promise((u,b)=>{i=t.rejectOnCancel?b:u,s=d,m&&!o&&(o=setTimeout(()=>{n&&l(n),o=null,u(s())},m)),n=setTimeout(()=>{o&&l(o),o=null,u(d())},f)})}}function P(e){return Array.isArray(e)?e:[e]}function rt(e){return r.getCurrentInstance()}function it(e,t=200,n={}){return nt(ot(t,n),e)}function lt(e,t=!0,n){rt()?r.onMounted(e,n):t?e():r.nextTick(e)}function st(e,t,n){return r.watch(e,t,{...n,immediate:!0})}const F=Xe?window:void 0;function I(e){var t;const n=r.toValue(e);return(t=n==null?void 0:n.$el)!=null?t:n}function at(...e){const t=[],n=()=>{t.forEach(a=>a()),t.length=0},o=(a,d,f,m)=>(a.addEventListener(d,f,m),()=>a.removeEventListener(d,f,m)),i=r.computed(()=>{const a=P(r.toValue(e[0])).filter(d=>d!=null);return a.every(d=>typeof d!="string")?a:void 0}),l=st(()=>{var a,d;return[(d=(a=i.value)==null?void 0:a.map(f=>I(f)))!=null?d:[F].filter(f=>f!=null),P(r.toValue(i.value?e[1]:e[0])),P(r.unref(i.value?e[2]:e[1])),r.toValue(i.value?e[3]:e[2])]},([a,d,f,m])=>{if(n(),!(a!=null&&a.length)||!(d!=null&&d.length)||!(f!=null&&f.length))return;const u=tt(m)?{...m}:m;t.push(...a.flatMap(b=>d.flatMap(C=>f.map(c=>o(b,C,c,u)))))},{flush:"post"}),s=()=>{l(),n()};return oe(n),s}function ct(){const e=r.shallowRef(!1),t=r.getCurrentInstance();return t&&r.onMounted(()=>{e.value=!0},t),e}function ut(e){const t=ct();return r.computed(()=>(t.value,!!e()))}function ft(e,t,n={}){const{window:o=F,...i}=n;let l;const s=ut(()=>o&&"ResizeObserver"in o),a=()=>{l&&(l.disconnect(),l=void 0)},d=r.computed(()=>{const u=r.toValue(e);return Array.isArray(u)?u.map(b=>I(b)):[I(u)]}),f=r.watch(d,u=>{if(a(),s.value&&o){l=new ResizeObserver(t);for(const b of u)b&&l.observe(b,i)}},{immediate:!0,flush:"post"}),m=()=>{a(),f()};return oe(m),{isSupported:s,stop:m}}function dt(e,t={width:0,height:0},n={}){const{window:o=F,box:i="content-box"}=n,l=r.computed(()=>{var u,b;return(b=(u=I(e))==null?void 0:u.namespaceURI)==null?void 0:b.includes("svg")}),s=r.shallowRef(t.width),a=r.shallowRef(t.height),{stop:d}=ft(e,([u])=>{const b=i==="border-box"?u.borderBoxSize:i==="content-box"?u.contentBoxSize:u.devicePixelContentBoxSize;if(o&&l.value){const C=I(e);if(C){const c=C.getBoundingClientRect();s.value=c.width,a.value=c.height}}else if(b){const C=P(b);s.value=C.reduce((c,{inlineSize:g})=>c+g,0),a.value=C.reduce((c,{blockSize:g})=>c+g,0)}else s.value=u.contentRect.width,a.value=u.contentRect.height},n);lt(()=>{const u=I(e);u&&(s.value="offsetWidth"in u?u.offsetWidth:t.width,a.value="offsetHeight"in u?u.offsetHeight:t.height)});const f=r.watch(()=>I(e),u=>{s.value=u?t.width:0,a.value=u?t.height:0});function m(){d(),f()}return{width:s,height:a,stop:m}}function mt(e){const{activeClassName:t=".active",enableWheel:n=!0,direction:o="vertical"}=e??{},i=r.ref(),{width:l,height:s}=dt(i);async function a(m){var b;await r.nextTick();const u=(b=i.value)==null?void 0:b.querySelector(t);u&&u.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest",...m})}function d(m){var b,C;if(!n)return;m.preventDefault();const{deltaY:u}=m;switch(o){case"vertical":(b=i.value)==null||b.scrollBy({top:u>0?s.value:-s.value,behavior:"smooth"});break;case"horizontal":(C=i.value)==null||C.scrollBy({left:u>0?l.value:-l.value,behavior:"smooth"});break}}at(i,"wheel",d);const f=it(a,500);return r.watch([l,s],()=>{f()}),{scrollRef:i,scrollToView:a}}var ht={grad:.9,turn:360,rad:360/(2*Math.PI)},N=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},k=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},w=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e>t?e:t},ie=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},le=function(e){return{r:w(e.r,0,255),g:w(e.g,0,255),b:w(e.b,0,255),a:w(e.a)}},q=function(e){return{r:k(e.r),g:k(e.g),b:k(e.b),a:k(e.a,3)}},pt=/^#([0-9a-f]{3,8})$/i,O=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},se=function(e){var t=e.r,n=e.g,o=e.b,i=e.a,l=Math.max(t,n,o),s=l-Math.min(t,n,o),a=s?l===t?(n-o)/s:l===n?2+(o-t)/s:4+(t-n)/s:0;return{h:60*(a<0?a+6:a),s:l?s/l*100:0,v:l/255*100,a:i}},ae=function(e){var t=e.h,n=e.s,o=e.v,i=e.a;t=t/360*6,n/=100,o/=100;var l=Math.floor(t),s=o*(1-n),a=o*(1-(t-l)*n),d=o*(1-(1-t+l)*n),f=l%6;return{r:255*[o,a,s,s,d,o][f],g:255*[d,o,o,a,s,s][f],b:255*[s,s,d,o,o,a][f],a:i}},ce=function(e){return{h:ie(e.h),s:w(e.s,0,100),l:w(e.l,0,100),a:w(e.a)}},ue=function(e){return{h:k(e.h),s:k(e.s),l:k(e.l),a:k(e.a,3)}},fe=function(e){return ae((n=(t=e).s,{h:t.h,s:(n*=((o=t.l)<50?o:100-o)/100)>0?2*n/(o+n)*100:0,v:o+n,a:t.a}));var t,n,o},A=function(e){return{h:(t=se(e)).h,s:(i=(200-(n=t.s))*(o=t.v)/100)>0&&i<200?n*o/100/(i<=100?i:200-i)*100:0,l:i/2,a:t.a};var t,n,o,i},bt=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,gt=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,xt=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,yt=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,de={string:[[function(e){var t=pt.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?k(parseInt(e[3]+e[3],16)/255,2):1}:e.length===6||e.length===8?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:e.length===8?k(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=xt.exec(e)||yt.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:le({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=bt.exec(e)||gt.exec(e);if(!t)return null;var n,o,i=ce({h:(n=t[1],o=t[2],o===void 0&&(o="deg"),Number(n)*(ht[o]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return fe(i)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,o=e.b,i=e.a,l=i===void 0?1:i;return N(t)&&N(n)&&N(o)?le({r:Number(t),g:Number(n),b:Number(o),a:Number(l)}):null},"rgb"],[function(e){var t=e.h,n=e.s,o=e.l,i=e.a,l=i===void 0?1:i;if(!N(t)||!N(n)||!N(o))return null;var s=ce({h:Number(t),s:Number(n),l:Number(o),a:Number(l)});return fe(s)},"hsl"],[function(e){var t=e.h,n=e.s,o=e.v,i=e.a,l=i===void 0?1:i;if(!N(t)||!N(n)||!N(o))return null;var s=function(a){return{h:ie(a.h),s:w(a.s,0,100),v:w(a.v,0,100),a:w(a.a)}}({h:Number(t),s:Number(n),v:Number(o),a:Number(l)});return ae(s)},"hsv"]]},me=function(e,t){for(var n=0;n<t.length;n++){var o=t[n][0](e);if(o)return[o,t[n][1]]}return[null,void 0]},kt=function(e){return typeof e=="string"?me(e.trim(),de.string):typeof e=="object"&&e!==null?me(e,de.object):[null,void 0]},G=function(e,t){var n=A(e);return{h:n.h,s:w(n.s+100*t,0,100),l:n.l,a:n.a}},Z=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},he=function(e,t){var n=A(e);return{h:n.h,s:n.s,l:w(n.l+100*t,0,100),a:n.a}},pe=function(){function e(t){this.parsed=kt(t)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return this.parsed!==null},e.prototype.brightness=function(){return k(Z(this.rgba),2)},e.prototype.isDark=function(){return Z(this.rgba)<.5},e.prototype.isLight=function(){return Z(this.rgba)>=.5},e.prototype.toHex=function(){return t=q(this.rgba),n=t.r,o=t.g,i=t.b,s=(l=t.a)<1?O(k(255*l)):"","#"+O(n)+O(o)+O(i)+s;var t,n,o,i,l,s},e.prototype.toRgb=function(){return q(this.rgba)},e.prototype.toRgbString=function(){return t=q(this.rgba),n=t.r,o=t.g,i=t.b,(l=t.a)<1?"rgba("+n+", "+o+", "+i+", "+l+")":"rgb("+n+", "+o+", "+i+")";var t,n,o,i,l},e.prototype.toHsl=function(){return ue(A(this.rgba))},e.prototype.toHslString=function(){return t=ue(A(this.rgba)),n=t.h,o=t.s,i=t.l,(l=t.a)<1?"hsla("+n+", "+o+"%, "+i+"%, "+l+")":"hsl("+n+", "+o+"%, "+i+"%)";var t,n,o,i,l},e.prototype.toHsv=function(){return t=se(this.rgba),{h:k(t.h),s:k(t.s),v:k(t.v),a:k(t.a,3)};var t},e.prototype.invert=function(){return E({r:255-(t=this.rgba).r,g:255-t.g,b:255-t.b,a:t.a});var t},e.prototype.saturate=function(t){return t===void 0&&(t=.1),E(G(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),E(G(this.rgba,-t))},e.prototype.grayscale=function(){return E(G(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),E(he(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),E(he(this.rgba,-t))},e.prototype.rotate=function(t){return t===void 0&&(t=15),this.hue(this.hue()+t)},e.prototype.alpha=function(t){return typeof t=="number"?E({r:(n=this.rgba).r,g:n.g,b:n.b,a:t}):k(this.rgba.a,3);var n},e.prototype.hue=function(t){var n=A(this.rgba);return typeof t=="number"?E({h:t,s:n.s,l:n.l,a:n.a}):k(n.h)},e.prototype.isEqual=function(t){return this.toHex()===E(t).toHex()},e}(),E=function(e){return e instanceof pe?e:new pe(e)};const vt={name:"RiAddLine"},$t={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24"};function Ct(e,t,n,o,i,l){return r.openBlock(),r.createElementBlock("svg",$t,t[0]||(t[0]=[r.createElementVNode("path",{fill:"#757575",d:"M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"},null,-1)]))}const wt=j(vt,[["render",Ct]]),Et={name:"RiArrowDropDownLine"},Nt={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24"};function Bt(e,t,n,o,i,l){return r.openBlock(),r.createElementBlock("svg",Nt,t[0]||(t[0]=[r.createElementVNode("path",{fill:"#757575",d:"m12 15l-4.243-4.242l1.415-1.414L12 12.172l2.828-2.828l1.415 1.414z"},null,-1)]))}const It=j(Et,[["render",Bt]]),Mt=r.defineComponent({__name:"Tabs",props:r.mergeModels({colors:{},dropdown:{type:Boolean},addable:{type:Boolean},options:{}},{value:{},valueModifiers:{}}),emits:r.mergeModels(["click","contextmenu","close","add"],["update:value"]),setup(e,{emit:t}){const n=t;We("n-chrome-tabs",Fe());const{background:o="#E5E7EB",active:i="#fff",primary:l="rgba(251,191,36,1)"}=e.colors??{},s=r.useModel(e,"value"),a=r.computed(()=>{var h;return(h=e.options)==null?void 0:h.findIndex(p=>p.key===s.value)}),{scrollRef:d,scrollToView:f}=mt({activeClassName:`.${$}--active`,direction:"horizontal"});r.watch(s,()=>{f()},{immediate:!0});const m=r.computed(()=>E(o).darken(.9).toHex()),u=r.computed(()=>E(i).darken(.8).toHex()),b=r.computed(()=>E(l).darken(.3).toHex());function C(h){n("click",h)}function c(h){n("contextmenu",h)}function g(h){n("close",h)}return(h,p)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass([r.unref(V)]),style:r.normalizeStyle({"--background-color":`${r.unref(o)}`,"--background-color-dark":`${m.value}`,"--active-background-color":`${r.unref(i)}`,"--active-background-color-dark":`${u.value}`,"--primary-color":`${r.unref(l)}`,"--primary-color-dark":`${b.value}`})},[h.dropdown?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass([`${r.unref(V)}__icon`])},[r.createVNode(It)],2)):r.createCommentVNode("",!0),r.renderSlot(h.$slots,"prefix"),r.createElementVNode("div",{ref_key:"scrollRef",ref:d,class:r.normalizeClass([`${r.unref(V)}__content`])},[r.createVNode(r.TransitionGroup,{name:"group",tag:"div",class:r.normalizeClass([`${r.unref(V)}__scroll`])},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(h.options,({key:v,...R},S)=>(r.openBlock(),r.createBlock(ne,r.mergeProps({key:v},{ref_for:!0},R,{index:S,"active-index":a.value,onItemClick:D=>C(v),onItemContextmenu:D=>c(v),onItemClose:D=>g(v)}),null,16,["index","active-index","onItemClick","onItemContextmenu","onItemClose"]))),128))]),_:1},8,["class"])],2),r.renderSlot(h.$slots,"suffix"),h.addable?(r.openBlock(),r.createElementBlock("div",{key:1,class:r.normalizeClass([`${r.unref(V)}__icon`]),onClick:p[0]||(p[0]=v=>n("add"))},[r.createVNode(wt)],2)):r.createCommentVNode("",!0)],6))}});B.CTabItem=ne,B.CTabs=Mt,Object.defineProperty(B,Symbol.toStringTag,{value:"Module"})});
14
+ </style>`}function je(e,t,n){const{styles:o,ids:i}=n;i.has(e)||o!==null&&(i.add(e),o.push(Te(e,t)))}const Pe=typeof document<"u";function Oe(){if(Pe)return;const e=r.inject(Le,null);if(e!==null)return{adapter:(t,n)=>je(t,n,e),context:e}}function De(e,t){const n=Oe();function o(){t.mount({id:e,head:!0,ssr:n})}n?o():r.onBeforeMount(()=>{o()})}const{cssr:We,plugin:He,namespace:ee}=ze(),{c:y,cB:L,cE:x,cM:H,cNotM:te}={...We,...He},V=`${ee}-chrome-tabs`,$=`${ee}-chrome-tabs-item`,M="all .2s cubic-bezier(.4, 0, .2, 1)";function Fe(){return y([L("chrome-tabs",{display:"flex",width:"100%",height:"40px",padding:"0 10px",alignItems:"center",backgroundColor:"var(--background-color)",color:"var(--background-color-dark)"},[y(".group-move, .group-enter-active, .group-leave-active",{transition:M}),y(".group-enter-from, .group-leave-to",{opacity:0}),y(".group-leave-active",{}),x("prefix",{}),x("icon",{width:"28px",height:"28px",display:"flex",alignItems:"center",justifyContent:"center",padding:"5px",borderRadius:"10px",backgroundColor:"var(--active-background-color)",transition:M},[y("svg",{width:"100%",height:"100%",fill:"currentColor"}),y("&:hover",{backgroundColor:"var(--primary-color)"})]),x("content",{flex:"1",height:"100%",minWidth:0,overflow:"hidden",marginLeft:"-6px",padding:"0 10px"}),x("scroll",{position:"relative",display:"flex",alignItems:"center",height:"100%"},[x("icon",{marginLeft:"5px",borderRadius:"50%",backgroundColor:"transparent",flexShrink:0},[y("&:hover",{backgroundColor:"var(--primary-color)"})])]),x("suffix",{})]),L("chrome-tabs-item",{position:"relative",margin:"0 -5px",height:"100%",flexShrink:0,cursor:"default",userSelect:"none",padding:"6px 10px 0px 10px"},[H("disabled",{cursor:"not-allowed",pointerEvents:"none",opacity:.5,filter:"grayscale(0.5)"}),H("active",[x("background",{opacity:1})]),te("active",[y("&:hover",{},[x("content",{backgroundColor:"var(--primary-color)"})])]),y("&::first-child",{marginLeft:"0 !important"}),y("&::last-child",{marginRight:"0 !important"}),x("content",{position:"relative",zIndex:1,height:"28px",display:"flex",alignItems:"center",gap:"5px",borderRadius:"10px",padding:"0 10px",transition:M}),x("slot",{}),x("icon",{},[y("svg",{width:"1.2em",height:"1.2em",fill:"currentColor"})]),x("close",{width:"16px",height:"16px",padding:"2px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"50%",transition:M},[y("&:hover",{backgroundColor:"rgba(0,0,0,0.1)"}),y("svg",{width:"100%",height:"100%",fill:"currentColor"})]),x("background",{position:"absolute",opacity:0,left:0,bottom:0,zIndex:0,height:"34px",width:"100%",display:"flex",alignItems:"flex-end",transition:M},[x("block",{height:"100%",flex:1,minWidth:0,borderRadius:"10px 10px 0 0",backgroundColor:"var(--active-background-color)"}),y("svg",{fill:"var(--active-background-color)"})]),x("line",{position:"absolute",bottom:"12px",right:"4px",height:"16px",width:"2px",borderRadius:"1px",transition:M,backgroundColor:"var(--primary-color)",opacity:0},[H("show",{opacity:1})])]),y(".dark",[L("chrome-tabs",{backgroundColor:"var(--background-color-dark)",color:"var(--background-color)"},[x("icon",{backgroundColor:"var(--active-background-color-dark)"},[y("&:hover",{backgroundColor:"var(--primary-color-dark)"})])]),L("chrome-tabs-item",{},[te("active",[y("&:hover",{},[x("content",{backgroundColor:"var(--primary-color-dark)"})])]),x("background",{},[x("block",{backgroundColor:"var(--active-background-color-dark)"}),y("svg",{fill:"var(--active-background-color-dark)"})])])])])}const T=(e,t)=>{const n=e.__vccOpts||e;for(const[o,i]of t)n[o]=i;return n},qe={name:"LineMdLoadingTwotoneLoop"},Ge={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24"};function Ze(e,t,n,o,i,l){return r.openBlock(),r.createElementBlock("svg",Ge,t[0]||(t[0]=[r.createStaticVNode('<g fill="none" stroke="#757575" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path stroke-dasharray="16" stroke-dashoffset="16" d="M12 3c4.97 0 9 4.03 9 9"><animate fill="freeze" attributeName="stroke-dashoffset" dur="0.3s" values="16;0"></animate><animateTransform attributeName="transform" dur="1.5s" repeatCount="indefinite" type="rotate" values="0 12 12;360 12 12"></animateTransform></path><path stroke-dasharray="64" stroke-dashoffset="64" stroke-opacity=".3" d="M12 3c4.97 0 9 4.03 9 9c0 4.97 -4.03 9 -9 9c-4.97 0 -9 -4.03 -9 -9c0 -4.97 4.03 -9 9 -9Z"><animate fill="freeze" attributeName="stroke-dashoffset" dur="1.2s" values="64;0"></animate></path></g>',1)]))}const Ue=T(qe,[["render",Ze]]),Ke={name:"RiCloseLine"},Ye={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24"};function Je(e,t,n,o,i,l){return r.openBlock(),r.createElementBlock("svg",Ye,t[0]||(t[0]=[r.createElementVNode("path",{fill:"#757575",d:"m12 10.587l4.95-4.95l1.414 1.414l-4.95 4.95l4.95 4.95l-1.415 1.414l-4.95-4.95l-4.949 4.95l-1.414-1.415l4.95-4.95l-4.95-4.95L7.05 5.638z"},null,-1)]))}const Qe=T(Ke,[["render",Je]]),ne=r.defineComponent({__name:"TabItem",props:{label:{type:[String,Function]},icon:{type:Function},closable:{type:Boolean},disabled:{type:Boolean},loading:{type:Boolean},loadingIcon:{type:Function},onClick:{type:Function},onContextMenu:{type:Function},onClose:{type:Function},activeIndex:{default:0},index:{}},emits:["itemClick","itemContextmenu","itemClose"],setup(e,{emit:t}){const n=t,o=r.computed(()=>e.activeIndex!==e.index&&e.activeIndex!==e.index-1),i=r.computed(()=>e.activeIndex===e.index),l=r.computed(()=>typeof e.label=="string"?r.h("span",{class:`${$}__label`},e.label):e.label),s=r.computed(()=>e.loadingIcon??r.h(Ue));function a(m){m.stopPropagation(),n("itemClick",m),e.onClick?.(m)}function d(m){n("itemContextmenu",m),e.onContextMenu?.(m)}function f(){n("itemClose"),e.onClose?.()}return(m,u)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass([r.unref($),{[`${r.unref($)}--active`]:i.value,[`${r.unref($)}--disabled`]:m.disabled}]),onClick:a,onContextmenu:d},[r.createElementVNode("div",{class:r.normalizeClass([`${r.unref($)}__content`])},[r.createElementVNode("div",{class:r.normalizeClass([`${r.unref($)}__icon`])},[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(m.loading?s.value:m.icon)))],2),r.createElementVNode("div",{class:r.normalizeClass([`${r.unref($)}__slot`])},[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(l.value)))],2),m.closable?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass([`${r.unref($)}__close`]),onClick:r.withModifiers(f,["stop"])},[r.createVNode(Qe)],2)):r.createCommentVNode("",!0)],2),r.createElementVNode("div",{class:r.normalizeClass([`${r.unref($)}__background`])},[u[0]||(u[0]=r.createElementVNode("svg",{width:"10",height:"10"},[r.createElementVNode("path",{d:"M 0 10 A 10 10 0 0 0 10 0 L 10 10 Z"})],-1)),r.createElementVNode("div",{class:r.normalizeClass([`${r.unref($)}__block`])},null,2),u[1]||(u[1]=r.createElementVNode("svg",{width:"10",height:"10"},[r.createElementVNode("path",{d:"M 0 0 A 10 10 0 0 0 10 10 L 0 10 Z"})],-1))],2),r.createElementVNode("div",{class:r.normalizeClass([`${r.unref($)}__line`,o.value?`${r.unref($)}__line--show`:""])},null,2)],34))}});function oe(e){return r.getCurrentScope()?(r.onScopeDispose(e),!0):!1}const Xe=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const et=Object.prototype.toString,tt=e=>et.call(e)==="[object Object]",re=()=>{};function nt(e,t){function n(...o){return new Promise((i,l)=>{Promise.resolve(e(()=>t.apply(this,o),{fn:t,thisArg:this,args:o})).then(i).catch(l)})}return n}function ot(e,t={}){let n,o,i=re;const l=d=>{clearTimeout(d),i(),i=re};let s;return d=>{const f=r.toValue(e),m=r.toValue(t.maxWait);return n&&l(n),f<=0||m!==void 0&&m<=0?(o&&(l(o),o=void 0),Promise.resolve(d())):new Promise((u,g)=>{i=t.rejectOnCancel?g:u,s=d,m&&!o&&(o=setTimeout(()=>{n&&l(n),o=void 0,u(s())},m)),n=setTimeout(()=>{o&&l(o),o=void 0,u(d())},f)})}}function j(e){return Array.isArray(e)?e:[e]}function rt(e){return r.getCurrentInstance()}function it(e,t=200,n={}){return nt(ot(t,n),e)}function lt(e,t=!0,n){rt()?r.onMounted(e,n):t?e():r.nextTick(e)}function st(e,t,n){return r.watch(e,t,{...n,immediate:!0})}const F=Xe?window:void 0;function I(e){var t;const n=r.toValue(e);return(t=n?.$el)!=null?t:n}function at(...e){const t=[],n=()=>{t.forEach(a=>a()),t.length=0},o=(a,d,f,m)=>(a.addEventListener(d,f,m),()=>a.removeEventListener(d,f,m)),i=r.computed(()=>{const a=j(r.toValue(e[0])).filter(d=>d!=null);return a.every(d=>typeof d!="string")?a:void 0}),l=st(()=>{var a,d;return[(d=(a=i.value)==null?void 0:a.map(f=>I(f)))!=null?d:[F].filter(f=>f!=null),j(r.toValue(i.value?e[1]:e[0])),j(r.unref(i.value?e[2]:e[1])),r.toValue(i.value?e[3]:e[2])]},([a,d,f,m])=>{if(n(),!a?.length||!d?.length||!f?.length)return;const u=tt(m)?{...m}:m;t.push(...a.flatMap(g=>d.flatMap(E=>f.map(c=>o(g,E,c,u)))))},{flush:"post"}),s=()=>{l(),n()};return oe(n),s}function ct(){const e=r.shallowRef(!1),t=r.getCurrentInstance();return t&&r.onMounted(()=>{e.value=!0},t),e}function ut(e){const t=ct();return r.computed(()=>(t.value,!!e()))}function ft(e,t,n={}){const{window:o=F,...i}=n;let l;const s=ut(()=>o&&"ResizeObserver"in o),a=()=>{l&&(l.disconnect(),l=void 0)},d=r.computed(()=>{const u=r.toValue(e);return Array.isArray(u)?u.map(g=>I(g)):[I(u)]}),f=r.watch(d,u=>{if(a(),s.value&&o){l=new ResizeObserver(t);for(const g of u)g&&l.observe(g,i)}},{immediate:!0,flush:"post"}),m=()=>{a(),f()};return oe(m),{isSupported:s,stop:m}}function dt(e,t={width:0,height:0},n={}){const{window:o=F,box:i="content-box"}=n,l=r.computed(()=>{var u,g;return(g=(u=I(e))==null?void 0:u.namespaceURI)==null?void 0:g.includes("svg")}),s=r.shallowRef(t.width),a=r.shallowRef(t.height),{stop:d}=ft(e,([u])=>{const g=i==="border-box"?u.borderBoxSize:i==="content-box"?u.contentBoxSize:u.devicePixelContentBoxSize;if(o&&l.value){const E=I(e);if(E){const c=E.getBoundingClientRect();s.value=c.width,a.value=c.height}}else if(g){const E=j(g);s.value=E.reduce((c,{inlineSize:b})=>c+b,0),a.value=E.reduce((c,{blockSize:b})=>c+b,0)}else s.value=u.contentRect.width,a.value=u.contentRect.height},n);lt(()=>{const u=I(e);u&&(s.value="offsetWidth"in u?u.offsetWidth:t.width,a.value="offsetHeight"in u?u.offsetHeight:t.height)});const f=r.watch(()=>I(e),u=>{s.value=u?t.width:0,a.value=u?t.height:0});function m(){d(),f()}return{width:s,height:a,stop:m}}function mt(e){const{activeClassName:t=".active",enableWheel:n=!0,direction:o="vertical"}=e??{},i=r.ref(),{width:l,height:s}=dt(i);async function a(m){await r.nextTick();const u=i.value?.querySelector(t);u&&u.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest",...m})}function d(m){if(!n)return;m.preventDefault();const{deltaY:u}=m;switch(o){case"vertical":i.value?.scrollBy({top:u>0?s.value:-s.value,behavior:"smooth"});break;case"horizontal":i.value?.scrollBy({left:u>0?l.value:-l.value,behavior:"smooth"});break}}at(i,"wheel",d);const f=it(a,500);return r.watch([l,s],()=>{f()}),{scrollRef:i,scrollToView:a}}var ht={grad:.9,turn:360,rad:360/(2*Math.PI)},N=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},k=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},C=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e>t?e:t},ie=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},le=function(e){return{r:C(e.r,0,255),g:C(e.g,0,255),b:C(e.b,0,255),a:C(e.a)}},q=function(e){return{r:k(e.r),g:k(e.g),b:k(e.b),a:k(e.a,3)}},pt=/^#([0-9a-f]{3,8})$/i,P=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},se=function(e){var t=e.r,n=e.g,o=e.b,i=e.a,l=Math.max(t,n,o),s=l-Math.min(t,n,o),a=s?l===t?(n-o)/s:l===n?2+(o-t)/s:4+(t-n)/s:0;return{h:60*(a<0?a+6:a),s:l?s/l*100:0,v:l/255*100,a:i}},ae=function(e){var t=e.h,n=e.s,o=e.v,i=e.a;t=t/360*6,n/=100,o/=100;var l=Math.floor(t),s=o*(1-n),a=o*(1-(t-l)*n),d=o*(1-(1-t+l)*n),f=l%6;return{r:255*[o,a,s,s,d,o][f],g:255*[d,o,o,a,s,s][f],b:255*[s,s,d,o,o,a][f],a:i}},ce=function(e){return{h:ie(e.h),s:C(e.s,0,100),l:C(e.l,0,100),a:C(e.a)}},ue=function(e){return{h:k(e.h),s:k(e.s),l:k(e.l),a:k(e.a,3)}},fe=function(e){return ae((n=(t=e).s,{h:t.h,s:(n*=((o=t.l)<50?o:100-o)/100)>0?2*n/(o+n)*100:0,v:o+n,a:t.a}));var t,n,o},_=function(e){return{h:(t=se(e)).h,s:(i=(200-(n=t.s))*(o=t.v)/100)>0&&i<200?n*o/100/(i<=100?i:200-i)*100:0,l:i/2,a:t.a};var t,n,o,i},bt=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,gt=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,xt=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,yt=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,de={string:[[function(e){var t=pt.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?k(parseInt(e[3]+e[3],16)/255,2):1}:e.length===6||e.length===8?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:e.length===8?k(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=xt.exec(e)||yt.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:le({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=bt.exec(e)||gt.exec(e);if(!t)return null;var n,o,i=ce({h:(n=t[1],o=t[2],o===void 0&&(o="deg"),Number(n)*(ht[o]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return fe(i)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,o=e.b,i=e.a,l=i===void 0?1:i;return N(t)&&N(n)&&N(o)?le({r:Number(t),g:Number(n),b:Number(o),a:Number(l)}):null},"rgb"],[function(e){var t=e.h,n=e.s,o=e.l,i=e.a,l=i===void 0?1:i;if(!N(t)||!N(n)||!N(o))return null;var s=ce({h:Number(t),s:Number(n),l:Number(o),a:Number(l)});return fe(s)},"hsl"],[function(e){var t=e.h,n=e.s,o=e.v,i=e.a,l=i===void 0?1:i;if(!N(t)||!N(n)||!N(o))return null;var s=function(a){return{h:ie(a.h),s:C(a.s,0,100),v:C(a.v,0,100),a:C(a.a)}}({h:Number(t),s:Number(n),v:Number(o),a:Number(l)});return ae(s)},"hsv"]]},me=function(e,t){for(var n=0;n<t.length;n++){var o=t[n][0](e);if(o)return[o,t[n][1]]}return[null,void 0]},kt=function(e){return typeof e=="string"?me(e.trim(),de.string):typeof e=="object"&&e!==null?me(e,de.object):[null,void 0]},G=function(e,t){var n=_(e);return{h:n.h,s:C(n.s+100*t,0,100),l:n.l,a:n.a}},Z=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},he=function(e,t){var n=_(e);return{h:n.h,s:n.s,l:C(n.l+100*t,0,100),a:n.a}},pe=function(){function e(t){this.parsed=kt(t)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return this.parsed!==null},e.prototype.brightness=function(){return k(Z(this.rgba),2)},e.prototype.isDark=function(){return Z(this.rgba)<.5},e.prototype.isLight=function(){return Z(this.rgba)>=.5},e.prototype.toHex=function(){return t=q(this.rgba),n=t.r,o=t.g,i=t.b,s=(l=t.a)<1?P(k(255*l)):"","#"+P(n)+P(o)+P(i)+s;var t,n,o,i,l,s},e.prototype.toRgb=function(){return q(this.rgba)},e.prototype.toRgbString=function(){return t=q(this.rgba),n=t.r,o=t.g,i=t.b,(l=t.a)<1?"rgba("+n+", "+o+", "+i+", "+l+")":"rgb("+n+", "+o+", "+i+")";var t,n,o,i,l},e.prototype.toHsl=function(){return ue(_(this.rgba))},e.prototype.toHslString=function(){return t=ue(_(this.rgba)),n=t.h,o=t.s,i=t.l,(l=t.a)<1?"hsla("+n+", "+o+"%, "+i+"%, "+l+")":"hsl("+n+", "+o+"%, "+i+"%)";var t,n,o,i,l},e.prototype.toHsv=function(){return t=se(this.rgba),{h:k(t.h),s:k(t.s),v:k(t.v),a:k(t.a,3)};var t},e.prototype.invert=function(){return w({r:255-(t=this.rgba).r,g:255-t.g,b:255-t.b,a:t.a});var t},e.prototype.saturate=function(t){return t===void 0&&(t=.1),w(G(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),w(G(this.rgba,-t))},e.prototype.grayscale=function(){return w(G(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),w(he(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),w(he(this.rgba,-t))},e.prototype.rotate=function(t){return t===void 0&&(t=15),this.hue(this.hue()+t)},e.prototype.alpha=function(t){return typeof t=="number"?w({r:(n=this.rgba).r,g:n.g,b:n.b,a:t}):k(this.rgba.a,3);var n},e.prototype.hue=function(t){var n=_(this.rgba);return typeof t=="number"?w({h:t,s:n.s,l:n.l,a:n.a}):k(n.h)},e.prototype.isEqual=function(t){return this.toHex()===w(t).toHex()},e}(),w=function(e){return e instanceof pe?e:new pe(e)};const vt={name:"RiAddLine"},$t={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24"};function Ct(e,t,n,o,i,l){return r.openBlock(),r.createElementBlock("svg",$t,t[0]||(t[0]=[r.createElementVNode("path",{fill:"#757575",d:"M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"},null,-1)]))}const wt=T(vt,[["render",Ct]]),Et={name:"RiArrowDropDownLine"},Nt={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24"};function Bt(e,t,n,o,i,l){return r.openBlock(),r.createElementBlock("svg",Nt,t[0]||(t[0]=[r.createElementVNode("path",{fill:"#757575",d:"m12 15l-4.243-4.242l1.415-1.414L12 12.172l2.828-2.828l1.415 1.414z"},null,-1)]))}const It=T(Et,[["render",Bt]]),Mt=r.defineComponent({__name:"Tabs",props:r.mergeModels({colors:{},dropdown:{type:Boolean},addable:{type:Boolean},options:{}},{value:{},valueModifiers:{}}),emits:r.mergeModels(["click","contextmenu","close","add"],["update:value"]),setup(e,{emit:t}){const n=t;De("n-chrome-tabs",Fe());const{background:o="#E5E7EB",active:i="#fff",primary:l="rgba(251,191,36,1)"}=e.colors??{},s=r.useModel(e,"value"),a=r.computed(()=>e.options?.findIndex(h=>h.key===s.value)),{scrollRef:d,scrollToView:f}=mt({activeClassName:`.${$}--active`,direction:"horizontal"});r.watch(s,()=>{f()},{immediate:!0});const m=r.computed(()=>w(o).darken(.9).toHex()),u=r.computed(()=>w(i).darken(.8).toHex()),g=r.computed(()=>w(l).darken(.3).toHex());function E(h){n("click",h)}function c(h){n("contextmenu",h)}function b(h){n("close",h)}return(h,p)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass([r.unref(V)]),style:r.normalizeStyle({"--background-color":`${r.unref(o)}`,"--background-color-dark":`${m.value}`,"--active-background-color":`${r.unref(i)}`,"--active-background-color-dark":`${u.value}`,"--primary-color":`${r.unref(l)}`,"--primary-color-dark":`${g.value}`})},[h.dropdown?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass([`${r.unref(V)}__icon`])},[r.createVNode(It)],2)):r.createCommentVNode("",!0),r.renderSlot(h.$slots,"prefix"),r.createElementVNode("div",{ref_key:"scrollRef",ref:d,class:r.normalizeClass([`${r.unref(V)}__content`])},[r.createVNode(r.TransitionGroup,{name:"group",tag:"div",class:r.normalizeClass([`${r.unref(V)}__scroll`])},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(h.options,({key:v,...A},S)=>(r.openBlock(),r.createBlock(ne,r.mergeProps({key:v},{ref_for:!0},A,{index:S,"active-index":a.value,onItemClick:O=>E(v),onItemContextmenu:O=>c(v),onItemClose:O=>b(v)}),null,16,["index","active-index","onItemClick","onItemContextmenu","onItemClose"]))),128))]),_:1},8,["class"])],2),r.renderSlot(h.$slots,"suffix"),h.addable?(r.openBlock(),r.createElementBlock("div",{key:1,class:r.normalizeClass([`${r.unref(V)}__icon`]),onClick:p[0]||(p[0]=v=>n("add"))},[r.createVNode(wt)],2)):r.createCommentVNode("",!0)],6))}});B.CTabItem=ne,B.CTabs=Mt,Object.defineProperty(B,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@oiij/chrome-tabs",
3
3
  "type": "module",
4
- "version": "0.0.2",
4
+ "version": "0.0.3",
5
5
  "description": "A Vue Component Likes Chrome Tabs Style.",
6
6
  "author": "oiij",
7
7
  "license": "MIT",
@@ -35,14 +35,17 @@
35
35
  "peerDependencies": {
36
36
  "colord": "^2.9.3",
37
37
  "vue": "^3.5.13",
38
- "@oiij/css-render": "0.0.1",
39
- "@oiij/use": "0.0.15"
38
+ "@oiij/css-render": "0.0.2",
39
+ "@oiij/use": "0.0.16"
40
40
  },
41
41
  "devDependencies": {
42
42
  "colord": "^2.9.3",
43
- "vue": "^3.5.16",
44
- "@oiij/css-render": "0.0.1",
45
- "@oiij/use": "0.0.15"
43
+ "vue": "^3.5.17",
44
+ "@oiij/css-render": "0.0.2",
45
+ "@oiij/use": "0.0.16"
46
+ },
47
+ "publishConfig": {
48
+ "access": "public"
46
49
  },
47
50
  "scripts": {
48
51
  "dev": "vite build --watch",