@oiij/chrome-tabs 0.0.7 → 0.0.9

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.
@@ -22,6 +22,7 @@ declare const __VLS_component: import('vue').DefineComponent<{
22
22
  addable?: boolean;
23
23
  options?: import('.').TabsOption[];
24
24
  loadingValue?: TabItemKey;
25
+ iconSize?: number;
25
26
  contentClass?: string;
26
27
  contentStyle?: import('vue').CSSProperties | string;
27
28
  }, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
@@ -41,6 +42,7 @@ declare const __VLS_component: import('vue').DefineComponent<{
41
42
  addable?: boolean;
42
43
  options?: import('.').TabsOption[];
43
44
  loadingValue?: TabItemKey;
45
+ iconSize?: number;
44
46
  contentClass?: string;
45
47
  contentStyle?: import('vue').CSSProperties | string;
46
48
  }> & Readonly<{
package/dist/index.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("vue");function he(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 h=a.context;h.bem={},h.bem.b=null,h.bem.els=null}};function u(a){let h,v;return{before(p){h=p.bem.b,v=p.bem.els,p.bem.els=null},after(p){p.bem.b=h,p.bem.els=v},$({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 s(a){let h;return{before(v){h=v.bem.els},after(v){v.bem.els=h},$({context:v,props:p}){return a=typeof a=="string"?a:a({context:v,props:p}),v.bem.els=a.split(",").map(k=>k.trim()),v.bem.els.map(k=>`${p?.bPrefix||t}${v.bem.b}${n}${k}`).join(", ")}}}function m(a){return{$({context:h,props:v}){a=typeof a=="string"?a:a({context:h,props:v});const p=a.split(",").map(B=>B.trim());function k(B){return p.map(me=>`&${v?.bPrefix||t}${h.bem.b}${B!==void 0?`${n}${B}`:""}${o}${me}`).join(", ")}const I=h.bem.els;if(I!==null){if(process.env.NODE_ENV!=="production"&&I.length>=2)throw Error(`[css-render/plugin-bem]: m(${a}) is invalid, using modifier inside multiple elements is not allowed`);return k(I[0])}else return k()}}}function f(a){return{$({context:h,props:v}){a=typeof a=="string"?a:a({context:h,props:v});const p=h.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(${v?.bPrefix||t}${h.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(m(a[0]),a[1],a[2])),cNotM:((...a)=>i(f(a[0]),a[1],a[2]))}),l}function pe(e){let t=0;for(let n=0;n<e.length;++n)e[n]==="&"&&++t;return t}const ie=/\s*,(?![^(]*\))\s*/g,ve=/\s+/g;function be(e,t){const n=[];return t.split(ie).forEach(o=>{let i=pe(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(m=>{u.push(s.replace("&",m))})}),l=u}l.forEach(u=>n.push(u))}),n}function ge(e,t){const n=[];return t.split(ie).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=be(t,n):t=ge(t,n))}),t.join(", ").replace(ve," ")}function G(e){if(!e)return;const t=e.parentElement;t&&t.removeChild(e)}function K(e,t){return(t??document.head).querySelector(`style[cssr-id="${e}"]`)}function xe(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 ke=/[A-Z]/g;function le(e){return e.replace(ke,t=>"-"+t.toLowerCase())}function $e(e,t=" "){return typeof e=="object"&&e!==null?` {
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("vue");function he(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 h=a.context;h.bem={},h.bem.b=null,h.bem.els=null}};function u(a){let h,v;return{before(p){h=p.bem.b,v=p.bem.els,p.bem.els=null},after(p){p.bem.b=h,p.bem.els=v},$({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 s(a){let h;return{before(v){h=v.bem.els},after(v){v.bem.els=h},$({context:v,props:p}){return a=typeof a=="string"?a:a({context:v,props:p}),v.bem.els=a.split(",").map(k=>k.trim()),v.bem.els.map(k=>`${p?.bPrefix||t}${v.bem.b}${n}${k}`).join(", ")}}}function m(a){return{$({context:h,props:v}){a=typeof a=="string"?a:a({context:h,props:v});const p=a.split(",").map(B=>B.trim());function k(B){return p.map(me=>`&${v?.bPrefix||t}${h.bem.b}${B!==void 0?`${n}${B}`:""}${o}${me}`).join(", ")}const I=h.bem.els;if(I!==null){if(process.env.NODE_ENV!=="production"&&I.length>=2)throw Error(`[css-render/plugin-bem]: m(${a}) is invalid, using modifier inside multiple elements is not allowed`);return k(I[0])}else return k()}}}function f(a){return{$({context:h,props:v}){a=typeof a=="string"?a:a({context:h,props:v});const p=h.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(${v?.bPrefix||t}${h.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(m(a[0]),a[1],a[2])),cNotM:((...a)=>i(f(a[0]),a[1],a[2]))}),l}function pe(e){let t=0;for(let n=0;n<e.length;++n)e[n]==="&"&&++t;return t}const ie=/\s*,(?![^(]*\))\s*/g,ve=/\s+/g;function be(e,t){const n=[];return t.split(ie).forEach(o=>{let i=pe(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(m=>{u.push(s.replace("&",m))})}),l=u}l.forEach(u=>n.push(u))}),n}function ge(e,t){const n=[];return t.split(ie).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=be(t,n):t=ge(t,n))}),t.join(", ").replace(ve," ")}function G(e){if(!e)return;const t=e.parentElement;t&&t.removeChild(e)}function K(e,t){return(t??document.head).querySelector(`style[cssr-id="${e}"]`)}function xe(e){const t=document.createElement("style");return t.setAttribute("cssr-id",e),t}function A(e){return e?/^\s*@(s|m)/.test(e):!1}const ke=/[A-Z]/g;function le(e){return e.replace(ke,t=>"-"+t.toLowerCase())}function $e(e,t=" "){return typeof e=="object"&&e!==null?` {
2
2
  `+Object.entries(e).map(n=>t+` ${le(n[0])}: ${n[1]};`).join(`
3
3
  `)+`
4
4
  `+t+"}":`: ${e};`}function Ce(e,t,n){return typeof e=="function"?e({context:t.context,props:n}):e}function Z(e,t,n,o){if(!t)return"";const i=Ce(t,n,o);if(!i)return"";if(typeof i=="string")return`${e} {
@@ -7,8 +7,8 @@ ${i}
7
7
  }`:"";const u=e?[e+" {"]:[];return l.forEach(s=>{const m=i[s];if(s==="raw"){u.push(`
8
8
  `+m+`
9
9
  `);return}s=le(s),m!=null&&u.push(` ${s}${$e(m)}`)}),e&&u.push("}"),u.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 ue(e,t,n,o,i){const l=e.$;let u="";if(!l||typeof l=="string")R(l)?u=l:t.push(l);else if(typeof l=="function"){const f=l({context:o.context,props:i});R(f)?u=f:t.push(f)}else if(l.before&&l.before(o.context),!l.$||typeof l.$=="string")R(l.$)?u=l.$:t.push(l.$);else if(l.$){const f=l.$({context:o.context,props:i});R(f)?u=f:t.push(f)}const s=ye(t),m=Z(s,e.props,o,i);u?n.push(`${u} {`):m.length&&n.push(m),e.children&&W(e.children,{context:o.context,props:i},f=>{if(typeof f=="string"){const c=Z(s,{raw:f},o,i);n.push(c)}else ue(f,t,n,o,i)}),t.pop(),u&&n.push("}"),l&&l.after&&l.after(o.context)}function we(e,t,n){const o=[];return ue(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 ue(e,t,n,o,i){const l=e.$;let u="";if(!l||typeof l=="string")A(l)?u=l:t.push(l);else if(typeof l=="function"){const f=l({context:o.context,props:i});A(f)?u=f:t.push(f)}else if(l.before&&l.before(o.context),!l.$||typeof l.$=="string")A(l.$)?u=l.$:t.push(l.$);else if(l.$){const f=l.$({context:o.context,props:i});A(f)?u=f:t.push(f)}const s=ye(t),m=Z(s,e.props,o,i);u?n.push(`${u} {`):m.length&&n.push(m),e.children&&W(e.children,{context:o.context,props:i},f=>{if(typeof f=="string"){const c=Z(s,{raw:f},o,i);n.push(c)}else ue(f,t,n,o,i)}),t.pop(),u&&n.push("}"),l&&l.after&&l.after(o.context)}function we(e,t,n){const o=[];return ue(e,[],o,t,n),o.join(`
11
11
 
12
- `)}function Ee(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 Ne(e,t,n,o){const{els:i}=t;if(n===void 0)i.forEach(G),t.els=[];else{const l=K(n,o);l&&i.includes(l)&&(G(l),t.els=i.filter(u=>u!==l))}}function U(e,t){e.push(t)}function Ie(e,t,n,o,i,l,u,s,m){let f;if(n===void 0&&(f=t.render(o),n=Ee(f)),m){m.adapter(n,f??t.render(o));return}s===void 0&&(s=document.head);const c=K(n,s);if(c!==null&&!l)return c;const d=c??xe(n);if(f===void 0&&(f=t.render(o)),d.textContent=f,c!==null)return c;if(u){const b=s.querySelector(`meta[name="${u}"]`);if(b)return s.insertBefore(d,b),U(t.els,d),d}return i?s.insertBefore(d,s.querySelector("style, link")):s.appendChild(d),U(t.els,d),d}function Be(e){return we(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;Ne(this.instance,this,t,n)}const z=function(e,t,n,o){return{instance:e,$:t,props:n,children:o,els:[],render:Be,mount:Se,unmount:Ve}},Me=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)=>Me(t,...n)),use:(n,...o)=>n.install(t,...o),find:K,context:{},config:e};return t}function Re(e){const{namespace:t="n",blockPrefix:n=`.${t}-`,elementPrefix:o="__",modifierPrefix:i="--"}=e??{},l=Ae(),u=he({blockPrefix:n,elementPrefix:o,modifierPrefix:i});return l.use(u),{namespace:t,blockPrefix:n,elementPrefix:o,modifierPrefix:i,cssr:l,plugin:u}}const ze="@css-render/vue3-ssr";function Le(e,t){return`<style cssr-id="${e}">
12
+ `)}function Ee(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 Ne(e,t,n,o){const{els:i}=t;if(n===void 0)i.forEach(G),t.els=[];else{const l=K(n,o);l&&i.includes(l)&&(G(l),t.els=i.filter(u=>u!==l))}}function U(e,t){e.push(t)}function Ie(e,t,n,o,i,l,u,s,m){let f;if(n===void 0&&(f=t.render(o),n=Ee(f)),m){m.adapter(n,f??t.render(o));return}s===void 0&&(s=document.head);const c=K(n,s);if(c!==null&&!l)return c;const d=c??xe(n);if(f===void 0&&(f=t.render(o)),d.textContent=f,c!==null)return c;if(u){const b=s.querySelector(`meta[name="${u}"]`);if(b)return s.insertBefore(d,b),U(t.els,d),d}return i?s.insertBefore(d,s.querySelector("style, link")):s.appendChild(d),U(t.els,d),d}function Be(e){return we(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 ze(e={}){const{id:t,parent:n}=e;Ne(this.instance,this,t,n)}const R=function(e,t,n,o){return{instance:e,$:t,props:n,children:o,els:[],render:Be,mount:Se,unmount:ze}},Ve=function(e,t,n,o){return Array.isArray(t)?R(e,{$:null},null,t):Array.isArray(n)?R(e,t,null,n):Array.isArray(o)?R(e,t,n,o):R(e,t,n,null)};function Me(e={}){const t={c:((...n)=>Ve(t,...n)),use:(n,...o)=>n.install(t,...o),find:K,context:{},config:e};return t}function Ae(e){const{namespace:t="n",blockPrefix:n=`.${t}-`,elementPrefix:o="__",modifierPrefix:i="--"}=e??{},l=Me(),u=he({blockPrefix:n,elementPrefix:o,modifierPrefix:i});return l.use(u),{namespace:t,blockPrefix:n,elementPrefix:o,modifierPrefix:i,cssr:l,plugin:u}}const Re="@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(Le(e,t)))}const Te=typeof document<"u";function Pe(){if(Te)return;const e=r.inject(ze,null);if(e!==null)return{adapter:(t,n)=>je(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()})}function se(e){return r.getCurrentScope()?(r.onScopeDispose(e),!0):!1}const De=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Fe=Object.prototype.toString,He=e=>Fe.call(e)==="[object Object]",Y=()=>{};function We(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 Ke(e,t={}){let n,o,i=Y;const l=m=>{clearTimeout(m),i(),i=Y};let u;return m=>{const f=r.toValue(e),c=r.toValue(t.maxWait);return n&&l(n),f<=0||c!==void 0&&c<=0?(o&&(l(o),o=void 0),Promise.resolve(m())):new Promise((d,b)=>{i=t.rejectOnCancel?b:d,u=m,c&&!o&&(o=setTimeout(()=>{n&&l(n),o=void 0,d(u())},c)),n=setTimeout(()=>{o&&l(o),o=void 0,d(m())},f)})}}function T(e){return Array.isArray(e)?e:[e]}function qe(e){return r.getCurrentInstance()}function Ge(e,t=200,n={}){return We(Ke(t,n),e)}function Ze(e,t=!0,n){qe()?r.onMounted(e,n):t?e():r.nextTick(e)}function Ue(e,t,n){return r.watch(e,t,{...n,immediate:!0})}const q=De?window:void 0;function S(e){var t;const n=r.toValue(e);return(t=n?.$el)!=null?t:n}function Ye(...e){const t=[],n=()=>{t.forEach(s=>s()),t.length=0},o=(s,m,f,c)=>(s.addEventListener(m,f,c),()=>s.removeEventListener(m,f,c)),i=r.computed(()=>{const s=T(r.toValue(e[0])).filter(m=>m!=null);return s.every(m=>typeof m!="string")?s:void 0}),l=Ue(()=>{var s,m;return[(m=(s=i.value)==null?void 0:s.map(f=>S(f)))!=null?m:[q].filter(f=>f!=null),T(r.toValue(i.value?e[1]:e[0])),T(r.unref(i.value?e[2]:e[1])),r.toValue(i.value?e[3]:e[2])]},([s,m,f,c])=>{if(n(),!s?.length||!m?.length||!f?.length)return;const d=He(c)?{...c}:c;t.push(...s.flatMap(b=>m.flatMap(E=>f.map(a=>o(b,E,a,d)))))},{flush:"post"}),u=()=>{l(),n()};return se(n),u}function Je(){const e=r.shallowRef(!1),t=r.getCurrentInstance();return t&&r.onMounted(()=>{e.value=!0},t),e}function Qe(e){const t=Je();return r.computed(()=>(t.value,!!e()))}function Xe(e,t,n={}){const{window:o=q,...i}=n;let l;const u=Qe(()=>o&&"ResizeObserver"in o),s=()=>{l&&(l.disconnect(),l=void 0)},m=r.computed(()=>{const d=r.toValue(e);return Array.isArray(d)?d.map(b=>S(b)):[S(d)]}),f=r.watch(m,d=>{if(s(),u.value&&o){l=new ResizeObserver(t);for(const b of d)b&&l.observe(b,i)}},{immediate:!0,flush:"post"}),c=()=>{s(),f()};return se(c),{isSupported:u,stop:c}}function _e(e,t={width:0,height:0},n={}){const{window:o=q,box:i="content-box"}=n,l=r.computed(()=>{var d,b;return(b=(d=S(e))==null?void 0:d.namespaceURI)==null?void 0:b.includes("svg")}),u=r.shallowRef(t.width),s=r.shallowRef(t.height),{stop:m}=Xe(e,([d])=>{const b=i==="border-box"?d.borderBoxSize:i==="content-box"?d.contentBoxSize:d.devicePixelContentBoxSize;if(o&&l.value){const E=S(e);if(E){const a=E.getBoundingClientRect();u.value=a.width,s.value=a.height}}else if(b){const E=T(b);u.value=E.reduce((a,{inlineSize:h})=>a+h,0),s.value=E.reduce((a,{blockSize:h})=>a+h,0)}else u.value=d.contentRect.width,s.value=d.contentRect.height},n);Ze(()=>{const d=S(e);d&&(u.value="offsetWidth"in d?d.offsetWidth:t.width,s.value="offsetHeight"in d?d.offsetHeight:t.height)});const f=r.watch(()=>S(e),d=>{u.value=d?t.width:0,s.value=d?t.height:0});function c(){m(),f()}return{width:u,height:s,stop:c}}function et(e){const{activeClassName:t=".active",enableWheel:n=!0,direction:o="vertical"}=e??{},i=r.ref(),{width:l,height:u}=_e(i);async function s(c){await r.nextTick();const d=i.value?.querySelector(t);d&&d.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest",...c})}function m(c){if(!n)return;c.preventDefault();const{deltaY:d}=c;switch(o){case"vertical":i.value?.scrollBy({top:d>0?u.value:-u.value,behavior:"smooth"});break;case"horizontal":i.value?.scrollBy({left:d>0?l.value:-l.value,behavior:"smooth"});break}}Ye(i,"wheel",m);const f=Ge(s,500);return r.watch([l,u],()=>{f()}),{scrollRef:i,scrollToView:s}}var tt={grad:.9,turn:360,rad:360/(2*Math.PI)},N=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},x=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},ae=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},J=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)}},O=function(e){return{r:x(e.r),g:x(e.g),b:x(e.b),a:x(e.a,3)}},nt=/^#([0-9a-f]{3,8})$/i,L=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},ce=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}},de=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),m=o*(1-(1-t+l)*n),f=l%6;return{r:255*[o,s,u,u,m,o][f],g:255*[m,o,o,s,u,u][f],b:255*[u,u,m,o,o,s][f],a:i}},Q=function(e){return{h:ae(e.h),s:w(e.s,0,100),l:w(e.l,0,100),a:w(e.a)}},X=function(e){return{h:x(e.h),s:x(e.s),l:x(e.l),a:x(e.a,3)}},_=function(e){return de((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=ce(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},ot=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,rt=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,it=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,lt=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,ee={string:[[function(e){var t=nt.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?x(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?x(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=it.exec(e)||lt.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:J({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=ot.exec(e)||rt.exec(e);if(!t)return null;var n,o,i=Q({h:(n=t[1],o=t[2],o===void 0&&(o="deg"),Number(n)*(tt[o]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return _(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)?J({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=Q({h:Number(t),s:Number(n),l:Number(o),a:Number(l)});return _(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:ae(s.h),s:w(s.s,0,100),v:w(s.v,0,100),a:w(s.a)}})({h:Number(t),s:Number(n),v:Number(o),a:Number(l)});return de(u)},"hsv"]]},te=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]},ut=function(e){return typeof e=="string"?te(e.trim(),ee.string):typeof e=="object"&&e!==null?te(e,ee.object):[null,void 0]},D=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}},F=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},ne=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}},oe=(function(){function e(t){this.parsed=ut(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 x(F(this.rgba),2)},e.prototype.isDark=function(){return F(this.rgba)<.5},e.prototype.isLight=function(){return F(this.rgba)>=.5},e.prototype.toHex=function(){return t=O(this.rgba),n=t.r,o=t.g,i=t.b,u=(l=t.a)<1?L(x(255*l)):"","#"+L(n)+L(o)+L(i)+u;var t,n,o,i,l,u},e.prototype.toRgb=function(){return O(this.rgba)},e.prototype.toRgbString=function(){return t=O(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 X(A(this.rgba))},e.prototype.toHslString=function(){return t=X(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=ce(this.rgba),{h:x(t.h),s:x(t.s),v:x(t.v),a:x(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(D(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),C(D(this.rgba,-t))},e.prototype.grayscale=function(){return C(D(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),C(ne(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),C(ne(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}):x(this.rgba.a,3);var n},e.prototype.hue=function(t){var n=A(this.rgba);return typeof t=="number"?C({h:t,s:n.s,l:n.l,a:n.a}):x(n.h)},e.prototype.isEqual=function(t){return this.toHex()===C(t).toHex()},e})(),C=function(e){return e instanceof oe?e:new oe(e)};const{cssr:st,plugin:at,namespace:fe}=Re(),{c:g,cB:j,cE:y,cM:H,cNotM:re}={...st,...at},M=`${fe}-chrome-tabs`,$=`${fe}-chrome-tabs-item`,V="all .2s cubic-bezier(.4, 0, .2, 1)";function ct(){return g([j("chrome-tabs",{display:"flex",width:"100%",height:"40px",padding:"0 10px",alignItems:"center",backgroundColor:"var(--background-color)",color:"var(--background-color-dark)"},[g("div",{boxSizing:"border-box"}),g(".group-move, .group-enter-active, .group-leave-active",{transition:V}),g(".group-enter-from, .group-leave-to",{opacity:0}),g(".group-leave-active",{}),y("prefix",{}),y("icon",{width:"28px",height:"28px",display:"flex",alignItems:"center",justifyContent:"center",padding:"5px",borderRadius:"10px",backgroundColor:"var(--active-background-color)",transition:V},[g("svg",{width:"100%",height:"100%",fill:"currentColor"}),g("&:hover",{backgroundColor:"var(--primary-color)"})]),y("content",{flex:"1",height:"100%",minWidth:0,overflow:"hidden",marginLeft:"-6px",padding:"0 10px"}),y("scroll",{position:"relative",display:"flex",alignItems:"center",height:"100%"},[y("icon",{marginLeft:"5px",borderRadius:"50%",backgroundColor:"transparent",flexShrink:0},[g("&:hover",{backgroundColor:"var(--primary-color)"})])]),y("suffix",{})]),j("chrome-tabs-item",{position:"relative",margin:"0 -5px",height:"100%",flexShrink:0,cursor:"default",userSelect:"none",padding:"6px 15px 0px 15px"},[H("disabled",{cursor:"not-allowed",pointerEvents:"none",opacity:.5,filter:"grayscale(0.5)"}),H("active",[y("background",{opacity:1})]),re("active",[g("&:hover",{},[y("content",{backgroundColor:"var(--primary-color)"})])]),g("&::first-child",{marginLeft:"0 !important"}),g("&::last-child",{marginRight:"0 !important"}),y("content",{position:"relative",zIndex:1,height:"28px",display:"flex",alignItems:"center",gap:"5px",borderRadius:"10px",padding:"0 10px",transition:V}),y("slot",{}),y("icon",{lineHeight:1},[g("svg",{width:"1.2em",height:"1.2em",fill:"currentColor"})]),y("close",{width:"16px",height:"16px",padding:"2px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"50%",transition:V},[g("&:hover",{backgroundColor:"rgba(0,0,0,0.1)"}),g("svg",{width:"100%",height:"100%",fill:"currentColor"})]),y("background",{position:"absolute",opacity:0,left:0,bottom:0,zIndex:0,height:"34px",width:"100%",display:"flex",alignItems:"flex-end",transition:V},[y("block",{height:"100%",flex:1,minWidth:0,borderRadius:"10px 10px 0 0",backgroundColor:"var(--active-background-color)"}),g("svg",{fill:"var(--active-background-color)"})]),y("line",{position:"absolute",bottom:"12px",right:"4px",height:"16px",width:"2px",borderRadius:"1px",transition:V,backgroundColor:"var(--primary-color)",opacity:0},[H("show",{opacity:1})])]),g(".dark",[j("chrome-tabs",{backgroundColor:"var(--background-color-dark)",color:"var(--background-color)"},[y("icon",{backgroundColor:"var(--active-background-color-dark)"},[g("&:hover",{backgroundColor:"var(--primary-color-dark)"})])]),j("chrome-tabs-item",{},[re("active",[g("&:hover",{},[y("content",{backgroundColor:"var(--primary-color-dark)"})])]),y("background",{},[y("block",{backgroundColor:"var(--active-background-color-dark)"}),g("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},dt={name:"RiAddLine"},ft={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24"};function mt(e,t,n,o,i,l){return r.openBlock(),r.createElementBlock("svg",ft,t[0]||(t[0]=[r.createElementVNode("path",{fill:"#757575",d:"M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"},null,-1)]))}const ht=P(dt,[["render",mt]]),pt={name:"RiArrowDropDownLine"},vt={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",vt,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 gt=P(pt,[["render",bt]]),yt={name:"LineMdLoadingTwotoneLoop"},xt={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24"};function kt(e,t,n,o,i,l){return r.openBlock(),r.createElementBlock("svg",xt,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 $t=P(yt,[["render",kt]]),Ct={name:"RiCloseLine"},wt={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24"};function Et(e,t,n,o,i,l){return r.openBlock(),r.createElementBlock("svg",wt,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 Nt=P(Ct,[["render",Et]]),It=r.defineComponent({__name:"TabItem",props:{label:{type:[String,Function]},icon:{type:Function},closable:{type:[Boolean,Function]},disabled:{type:[Boolean,Function]},loading:{type:[Boolean,Function]},loadingIcon:{type:Function},onClick:{type:Function},onContextMenu:{type:Function},onClose:{type:Function},class:{},style:{},activeIndex:{default:0},itemIndex:{},itemKey:{}},emits:["itemClick","itemContextmenu","itemClose"],setup(e,{emit:t}){const n=t,o=r.computed(()=>e.activeIndex!==e.itemIndex&&e.activeIndex-1!==e.itemIndex),i=r.computed(()=>e.activeIndex===e.itemIndex),l=r.computed(()=>typeof e.label=="string"?r.h("span",{class:`${$}__label`},e.label):e.label(e.itemKey,e.itemIndex)),u=r.computed(()=>e.loadingIcon?.(e.itemKey,e.itemIndex)??r.h($t));function s(c){c.stopPropagation(),n("itemClick",c),e.onClick?.(e.itemKey,e.itemIndex,c)}function m(c){n("itemContextmenu",c),e.onContextMenu?.(e.itemKey,e.itemIndex,c)}function f(c){n("itemClose"),e.onClose?.(e.itemKey,e.itemIndex,c)}return(c,d)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass([r.unref($),{[`${r.unref($)}--active`]:i.value,[`${r.unref($)}--disabled`]:typeof c.disabled=="function"?c.disabled(c.itemKey,c.itemIndex):c.disabled}]),onClick:s,onContextmenu:m},[r.createElementVNode("div",{class:r.normalizeClass([`${r.unref($)}__content`])},[r.createElementVNode("div",{class:r.normalizeClass([`${r.unref($)}__icon`])},[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(typeof c.loading=="function"?c.loading(c.itemKey,c.itemIndex):c.loading?u.value:c.icon?.(c.itemKey,c.itemIndex)??void 0)))],2),r.createElementVNode("div",{class:r.normalizeClass([`${r.unref($)}__slot`])},[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(l.value)))],2),(typeof c.closable=="function"?c.closable(c.itemKey,c.itemIndex):c.closable)?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass([`${r.unref($)}__close`]),onClick:r.withModifiers(f,["stop"])},[r.createVNode(Nt)],2)):r.createCommentVNode("",!0)],2),r.createElementVNode("div",{class:r.normalizeClass([`${r.unref($)}__background`])},[d[0]||(d[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),d[1]||(d[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))}}),Bt=r.defineComponent({__name:"Tabs",props:{value:{},colors:{},dropdown:{type:Boolean},addable:{type:Boolean},options:{},loadingValue:{},contentClass:{},contentStyle:{}},emits:["update:value","click","contextmenu","close","add"],setup(e,{emit:t}){const n=t;Oe("n-chrome-tabs",ct());const{background:o="#F1F1F1",active:i="#fff",primary:l="rgba(0,0,0,.1)"}=e.colors??{},u=r.computed(()=>e.value?e.options?.findIndex(h=>h.key===e.value):0),{scrollRef:s,scrollToView:m}=et({activeClassName:`.${$}--active`,direction:"horizontal"});r.watch(()=>e.value,()=>{m()},{immediate:!0});const f=r.computed(()=>C(o).darken(.9).toHex()),c=r.computed(()=>C(i).darken(.8).toHex()),d=r.computed(()=>C(l).darken(.3).toHex());function b(h,v){n("update:value",h),n("click",h,v)}function E(h,v){n("contextmenu",h,v)}function a(h,v){n("close",h,v)}return(h,v)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass([r.unref(M)]),style:r.normalizeStyle({"--background-color":`${r.unref(o)}`,"--background-color-dark":`${f.value}`,"--active-background-color":`${r.unref(i)}`,"--active-background-color-dark":`${c.value}`,"--primary-color":`${r.unref(l)}`,"--primary-color-dark":`${d.value}`})},[h.dropdown?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass([`${r.unref(M)}__icon`])},[r.createVNode(gt)],2)):r.createCommentVNode("",!0),r.renderSlot(h.$slots,"prefix"),r.createElementVNode("div",{ref_key:"scrollRef",ref:s,class:r.normalizeClass([`${r.unref(M)}__content`,h.contentClass]),style:r.normalizeStyle(h.contentStyle)},[r.createVNode(r.TransitionGroup,{name:"group",tag:"div",class:r.normalizeClass([`${r.unref(M)}__scroll`])},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(h.options,({key:p,...k},I)=>(r.openBlock(),r.createBlock(It,r.mergeProps({key:p,loading:h.loadingValue===p},{ref_for:!0},k,{"item-key":p,"item-index":I,"active-index":u.value,onItemClick:B=>b(p,I),onItemContextmenu:B=>E(p,I),onItemClose:B=>a(p,I)}),null,16,["loading","item-key","item-index","active-index","onItemClick","onItemContextmenu","onItemClose"]))),128))]),_:1},8,["class"])],6),r.renderSlot(h.$slots,"suffix"),h.addable?(r.openBlock(),r.createElementBlock("div",{key:1,class:r.normalizeClass([`${r.unref(M)}__icon`]),onClick:v[0]||(v[0]=p=>n("add"))},[r.createVNode(ht)],2)):r.createCommentVNode("",!0)],6))}});exports.CTabs=Bt;
14
+ </style>`}function je(e,t,n){const{styles:o,ids:i}=n;i.has(e)||o!==null&&(i.add(e),o.push(Le(e,t)))}const Te=typeof document<"u";function Pe(){if(Te)return;const e=r.inject(Re,null);if(e!==null)return{adapter:(t,n)=>je(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()})}function se(e){return r.getCurrentScope()?(r.onScopeDispose(e),!0):!1}const De=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Fe=Object.prototype.toString,He=e=>Fe.call(e)==="[object Object]",Y=()=>{};function We(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 Ke(e,t={}){let n,o,i=Y;const l=m=>{clearTimeout(m),i(),i=Y};let u;return m=>{const f=r.toValue(e),c=r.toValue(t.maxWait);return n&&l(n),f<=0||c!==void 0&&c<=0?(o&&(l(o),o=void 0),Promise.resolve(m())):new Promise((d,b)=>{i=t.rejectOnCancel?b:d,u=m,c&&!o&&(o=setTimeout(()=>{n&&l(n),o=void 0,d(u())},c)),n=setTimeout(()=>{o&&l(o),o=void 0,d(m())},f)})}}function T(e){return Array.isArray(e)?e:[e]}function qe(e){return r.getCurrentInstance()}function Ge(e,t=200,n={}){return We(Ke(t,n),e)}function Ze(e,t=!0,n){qe()?r.onMounted(e,n):t?e():r.nextTick(e)}function Ue(e,t,n){return r.watch(e,t,{...n,immediate:!0})}const q=De?window:void 0;function S(e){var t;const n=r.toValue(e);return(t=n?.$el)!=null?t:n}function Ye(...e){const t=[],n=()=>{t.forEach(s=>s()),t.length=0},o=(s,m,f,c)=>(s.addEventListener(m,f,c),()=>s.removeEventListener(m,f,c)),i=r.computed(()=>{const s=T(r.toValue(e[0])).filter(m=>m!=null);return s.every(m=>typeof m!="string")?s:void 0}),l=Ue(()=>{var s,m;return[(m=(s=i.value)==null?void 0:s.map(f=>S(f)))!=null?m:[q].filter(f=>f!=null),T(r.toValue(i.value?e[1]:e[0])),T(r.unref(i.value?e[2]:e[1])),r.toValue(i.value?e[3]:e[2])]},([s,m,f,c])=>{if(n(),!s?.length||!m?.length||!f?.length)return;const d=He(c)?{...c}:c;t.push(...s.flatMap(b=>m.flatMap(E=>f.map(a=>o(b,E,a,d)))))},{flush:"post"}),u=()=>{l(),n()};return se(n),u}function Je(){const e=r.shallowRef(!1),t=r.getCurrentInstance();return t&&r.onMounted(()=>{e.value=!0},t),e}function Qe(e){const t=Je();return r.computed(()=>(t.value,!!e()))}function Xe(e,t,n={}){const{window:o=q,...i}=n;let l;const u=Qe(()=>o&&"ResizeObserver"in o),s=()=>{l&&(l.disconnect(),l=void 0)},m=r.computed(()=>{const d=r.toValue(e);return Array.isArray(d)?d.map(b=>S(b)):[S(d)]}),f=r.watch(m,d=>{if(s(),u.value&&o){l=new ResizeObserver(t);for(const b of d)b&&l.observe(b,i)}},{immediate:!0,flush:"post"}),c=()=>{s(),f()};return se(c),{isSupported:u,stop:c}}function _e(e,t={width:0,height:0},n={}){const{window:o=q,box:i="content-box"}=n,l=r.computed(()=>{var d,b;return(b=(d=S(e))==null?void 0:d.namespaceURI)==null?void 0:b.includes("svg")}),u=r.shallowRef(t.width),s=r.shallowRef(t.height),{stop:m}=Xe(e,([d])=>{const b=i==="border-box"?d.borderBoxSize:i==="content-box"?d.contentBoxSize:d.devicePixelContentBoxSize;if(o&&l.value){const E=S(e);if(E){const a=E.getBoundingClientRect();u.value=a.width,s.value=a.height}}else if(b){const E=T(b);u.value=E.reduce((a,{inlineSize:h})=>a+h,0),s.value=E.reduce((a,{blockSize:h})=>a+h,0)}else u.value=d.contentRect.width,s.value=d.contentRect.height},n);Ze(()=>{const d=S(e);d&&(u.value="offsetWidth"in d?d.offsetWidth:t.width,s.value="offsetHeight"in d?d.offsetHeight:t.height)});const f=r.watch(()=>S(e),d=>{u.value=d?t.width:0,s.value=d?t.height:0});function c(){m(),f()}return{width:u,height:s,stop:c}}function et(e){const{activeClassName:t=".active",enableWheel:n=!0,direction:o="vertical"}=e??{},i=r.ref(),{width:l,height:u}=_e(i);async function s(c){await r.nextTick();const d=i.value?.querySelector(t);d&&d.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest",...c})}function m(c){if(!n)return;c.preventDefault();const{deltaY:d}=c;switch(o){case"vertical":i.value?.scrollBy({top:d>0?u.value:-u.value,behavior:"smooth"});break;case"horizontal":i.value?.scrollBy({left:d>0?l.value:-l.value,behavior:"smooth"});break}}Ye(i,"wheel",m);const f=Ge(s,500);return r.watch([l,u],()=>{f()}),{scrollRef:i,scrollToView:s}}var tt={grad:.9,turn:360,rad:360/(2*Math.PI)},N=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},x=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},ae=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},J=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)}},O=function(e){return{r:x(e.r),g:x(e.g),b:x(e.b),a:x(e.a,3)}},nt=/^#([0-9a-f]{3,8})$/i,L=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},ce=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}},de=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),m=o*(1-(1-t+l)*n),f=l%6;return{r:255*[o,s,u,u,m,o][f],g:255*[m,o,o,s,u,u][f],b:255*[u,u,m,o,o,s][f],a:i}},Q=function(e){return{h:ae(e.h),s:w(e.s,0,100),l:w(e.l,0,100),a:w(e.a)}},X=function(e){return{h:x(e.h),s:x(e.s),l:x(e.l),a:x(e.a,3)}},_=function(e){return de((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},M=function(e){return{h:(t=ce(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},ot=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,rt=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,it=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,lt=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,ee={string:[[function(e){var t=nt.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?x(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?x(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=it.exec(e)||lt.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:J({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=ot.exec(e)||rt.exec(e);if(!t)return null;var n,o,i=Q({h:(n=t[1],o=t[2],o===void 0&&(o="deg"),Number(n)*(tt[o]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return _(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)?J({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=Q({h:Number(t),s:Number(n),l:Number(o),a:Number(l)});return _(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:ae(s.h),s:w(s.s,0,100),v:w(s.v,0,100),a:w(s.a)}})({h:Number(t),s:Number(n),v:Number(o),a:Number(l)});return de(u)},"hsv"]]},te=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]},ut=function(e){return typeof e=="string"?te(e.trim(),ee.string):typeof e=="object"&&e!==null?te(e,ee.object):[null,void 0]},D=function(e,t){var n=M(e);return{h:n.h,s:w(n.s+100*t,0,100),l:n.l,a:n.a}},F=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},ne=function(e,t){var n=M(e);return{h:n.h,s:n.s,l:w(n.l+100*t,0,100),a:n.a}},oe=(function(){function e(t){this.parsed=ut(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 x(F(this.rgba),2)},e.prototype.isDark=function(){return F(this.rgba)<.5},e.prototype.isLight=function(){return F(this.rgba)>=.5},e.prototype.toHex=function(){return t=O(this.rgba),n=t.r,o=t.g,i=t.b,u=(l=t.a)<1?L(x(255*l)):"","#"+L(n)+L(o)+L(i)+u;var t,n,o,i,l,u},e.prototype.toRgb=function(){return O(this.rgba)},e.prototype.toRgbString=function(){return t=O(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 X(M(this.rgba))},e.prototype.toHslString=function(){return t=X(M(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=ce(this.rgba),{h:x(t.h),s:x(t.s),v:x(t.v),a:x(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(D(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),C(D(this.rgba,-t))},e.prototype.grayscale=function(){return C(D(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),C(ne(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),C(ne(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}):x(this.rgba.a,3);var n},e.prototype.hue=function(t){var n=M(this.rgba);return typeof t=="number"?C({h:t,s:n.s,l:n.l,a:n.a}):x(n.h)},e.prototype.isEqual=function(t){return this.toHex()===C(t).toHex()},e})(),C=function(e){return e instanceof oe?e:new oe(e)};const{cssr:st,plugin:at,namespace:fe}=Ae(),{c:g,cB:j,cE:y,cM:H,cNotM:re}={...st,...at},V=`${fe}-chrome-tabs`,$=`${fe}-chrome-tabs-item`,z="all .2s cubic-bezier(.4, 0, .2, 1)";function ct(){return g([j("chrome-tabs",{display:"flex",width:"100%",height:"40px",padding:"0 10px",alignItems:"center",backgroundColor:"var(--background-color)",color:"var(--background-color-dark)"},[g("div",{boxSizing:"border-box"}),g(".group-move, .group-enter-active, .group-leave-active",{transition:z}),g(".group-enter-from, .group-leave-to",{opacity:0}),g(".group-leave-active",{}),y("prefix",{}),y("icon",{width:"28px",height:"28px",display:"flex",alignItems:"center",justifyContent:"center",padding:"5px",borderRadius:"10px",backgroundColor:"var(--active-background-color)",transition:z},[g("svg",{width:"100%",height:"100%",fill:"currentColor"}),g("&:hover",{backgroundColor:"var(--primary-color)"})]),y("content",{flex:"1",height:"100%",minWidth:0,overflow:"hidden",marginLeft:"-6px",padding:"0 10px"}),y("scroll",{position:"relative",display:"flex",alignItems:"center",height:"100%"},[y("icon",{marginLeft:"5px",borderRadius:"50%",backgroundColor:"transparent",flexShrink:0},[g("&:hover",{backgroundColor:"var(--primary-color)"})])]),y("suffix",{})]),j("chrome-tabs-item",{position:"relative",margin:"0 -5px",height:"100%",flexShrink:0,cursor:"default",userSelect:"none",padding:"6px 15px 0px 15px"},[H("disabled",{cursor:"not-allowed",pointerEvents:"none",opacity:.5,filter:"grayscale(0.5)"}),H("active",[y("background",{opacity:1})]),re("active",[g("&:hover",{},[y("content",{backgroundColor:"var(--primary-color)"})])]),g("&::first-child",{marginLeft:"0 !important"}),g("&::last-child",{marginRight:"0 !important"}),y("content",{position:"relative",zIndex:1,height:"28px",display:"flex",alignItems:"center",gap:"5px",borderRadius:"10px",padding:"0 10px",transition:z}),y("slot",{}),y("icon",{lineHeight:1},[g("svg",{width:"1.2em",height:"1.2em",fill:"currentColor"})]),y("close",{width:"16px",height:"16px",padding:"2px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"50%",transition:z},[g("&:hover",{backgroundColor:"rgba(0,0,0,0.1)"}),g("svg",{width:"100%",height:"100%",fill:"currentColor"})]),y("background",{position:"absolute",opacity:0,left:0,bottom:0,zIndex:0,height:"34px",width:"100%",display:"flex",alignItems:"flex-end",transition:z},[y("block",{height:"100%",flex:1,minWidth:0,borderRadius:"10px 10px 0 0",backgroundColor:"var(--active-background-color)"}),g("svg",{fill:"var(--active-background-color)"})]),y("line",{position:"absolute",bottom:"12px",right:"4px",height:"16px",width:"2px",borderRadius:"1px",transition:z,backgroundColor:"var(--primary-color)",opacity:0},[H("show",{opacity:1})])]),g(".dark",[j("chrome-tabs",{backgroundColor:"var(--background-color-dark)",color:"var(--background-color)"},[y("icon",{backgroundColor:"var(--active-background-color-dark)"},[g("&:hover",{backgroundColor:"var(--primary-color-dark)"})])]),j("chrome-tabs-item",{},[re("active",[g("&:hover",{},[y("content",{backgroundColor:"var(--primary-color-dark)"})])]),y("background",{},[y("block",{backgroundColor:"var(--active-background-color-dark)"}),g("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},dt={name:"RiAddLine"},ft={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24"};function mt(e,t,n,o,i,l){return r.openBlock(),r.createElementBlock("svg",ft,[...t[0]||(t[0]=[r.createElementVNode("path",{fill:"#757575",d:"M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"},null,-1)])])}const ht=P(dt,[["render",mt]]),pt={name:"RiArrowDropDownLine"},vt={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",vt,[...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 gt=P(pt,[["render",bt]]),yt={name:"LineMdLoadingTwotoneLoop"},xt={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24"};function kt(e,t,n,o,i,l){return r.openBlock(),r.createElementBlock("svg",xt,[...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 $t=P(yt,[["render",kt]]),Ct={name:"RiCloseLine"},wt={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24"};function Et(e,t,n,o,i,l){return r.openBlock(),r.createElementBlock("svg",wt,[...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 Nt=P(Ct,[["render",Et]]),It=r.defineComponent({__name:"TabItem",props:{label:{type:[String,Function]},icon:{type:Function},closable:{type:[Boolean,Function]},disabled:{type:[Boolean,Function]},loading:{type:[Boolean,Function]},loadingIcon:{type:Function},onClick:{type:Function},onContextMenu:{type:Function},onClose:{type:Function},class:{},style:{},activeIndex:{default:0},itemIndex:{},itemKey:{},iconSize:{default:20}},emits:["itemClick","itemContextmenu","itemClose"],setup(e,{emit:t}){const n=t,o=r.computed(()=>e.activeIndex!==e.itemIndex&&e.activeIndex-1!==e.itemIndex),i=r.computed(()=>e.activeIndex===e.itemIndex),l=r.computed(()=>typeof e.label=="string"?r.h("span",{class:`${$}__label`},e.label):e.label(e.itemKey,e.itemIndex)),u=r.computed(()=>e.loadingIcon?.(e.itemKey,e.itemIndex)??r.h($t));function s(c){c.stopPropagation(),n("itemClick",c),e.onClick?.(e.itemKey,e.itemIndex,c)}function m(c){n("itemContextmenu",c),e.onContextMenu?.(e.itemKey,e.itemIndex,c)}function f(c){n("itemClose"),e.onClose?.(e.itemKey,e.itemIndex,c)}return(c,d)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass([r.unref($),{[`${r.unref($)}--active`]:i.value,[`${r.unref($)}--disabled`]:typeof c.disabled=="function"?c.disabled(c.itemKey,c.itemIndex):c.disabled}]),onClick:s,onContextmenu:m},[r.createElementVNode("div",{class:r.normalizeClass([`${r.unref($)}__content`])},[r.createElementVNode("div",{class:r.normalizeClass([`${r.unref($)}__icon`]),style:r.normalizeStyle({fontSize:`${c.iconSize}px`})},[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(typeof c.loading=="function"?c.loading(c.itemKey,c.itemIndex):c.loading?u.value:c.icon?.(c.itemKey,c.itemIndex)??void 0)))],6),r.createElementVNode("div",{class:r.normalizeClass([`${r.unref($)}__slot`])},[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(l.value)))],2),(typeof c.closable=="function"?c.closable(c.itemKey,c.itemIndex):c.closable)?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass([`${r.unref($)}__close`]),onClick:r.withModifiers(f,["stop"])},[r.createVNode(Nt)],2)):r.createCommentVNode("",!0)],2),r.createElementVNode("div",{class:r.normalizeClass([`${r.unref($)}__background`])},[d[0]||(d[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),d[1]||(d[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))}}),Bt=r.defineComponent({__name:"Tabs",props:{value:{},colors:{},dropdown:{type:Boolean},addable:{type:Boolean},options:{},loadingValue:{},iconSize:{},contentClass:{},contentStyle:{}},emits:["update:value","click","contextmenu","close","add"],setup(e,{emit:t}){const n=t;Oe("n-chrome-tabs",ct());const{background:o="#F1F1F1",active:i="#fff",primary:l="rgba(0,0,0,.1)"}=e.colors??{},u=r.computed(()=>e.value?e.options?.findIndex(h=>h.key===e.value):0),{scrollRef:s,scrollToView:m}=et({activeClassName:`.${$}--active`,direction:"horizontal"});r.watch(()=>e.value,()=>{m()},{immediate:!0});const f=r.computed(()=>C(o).darken(.9).toHex()),c=r.computed(()=>C(i).darken(.8).toHex()),d=r.computed(()=>C(l).darken(.3).toHex());function b(h,v){n("update:value",h),n("click",h,v)}function E(h,v){n("contextmenu",h,v)}function a(h,v){n("close",h,v)}return(h,v)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass([r.unref(V)]),style:r.normalizeStyle({"--background-color":`${r.unref(o)}`,"--background-color-dark":`${f.value}`,"--active-background-color":`${r.unref(i)}`,"--active-background-color-dark":`${c.value}`,"--primary-color":`${r.unref(l)}`,"--primary-color-dark":`${d.value}`})},[h.dropdown?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass([`${r.unref(V)}__icon`])},[r.createVNode(gt)],2)):r.createCommentVNode("",!0),r.renderSlot(h.$slots,"prefix"),r.createElementVNode("div",{ref_key:"scrollRef",ref:s,class:r.normalizeClass([`${r.unref(V)}__content`,h.contentClass]),style:r.normalizeStyle(h.contentStyle)},[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:p,...k},I)=>(r.openBlock(),r.createBlock(It,r.mergeProps({key:p,loading:h.loadingValue===p},{ref_for:!0},k,{"item-key":p,"item-index":I,"active-index":u.value,"icon-size":h.iconSize,onItemClick:B=>b(p,I),onItemContextmenu:B=>E(p,I),onItemClose:B=>a(p,I)}),null,16,["loading","item-key","item-index","active-index","icon-size","onItemClick","onItemContextmenu","onItemClose"]))),128))]),_:1},8,["class"])],6),r.renderSlot(h.$slots,"suffix"),h.addable?(r.openBlock(),r.createElementBlock("div",{key:1,class:r.normalizeClass([`${r.unref(V)}__icon`]),onClick:v[0]||(v[0]=p=>n("add"))},[r.createVNode(ht)],2)):r.createCommentVNode("",!0)],6))}});exports.CTabs=Bt;
package/dist/index.d.ts CHANGED
@@ -20,6 +20,7 @@ export type TabsItemProps = Omit<TabsOption, 'key'> & {
20
20
  activeIndex?: number;
21
21
  itemIndex: number;
22
22
  itemKey: TabItemKey;
23
+ iconSize?: number;
23
24
  };
24
25
  export type TabsProps = {
25
26
  value?: TabItemKey;
@@ -32,6 +33,7 @@ export type TabsProps = {
32
33
  addable?: boolean;
33
34
  options?: TabsOption[];
34
35
  loadingValue?: TabItemKey;
36
+ iconSize?: number;
35
37
  contentClass?: string;
36
38
  contentStyle?: CSSProperties | string;
37
39
  };
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { inject as Le, onBeforeMount as je, onMounted as ye, nextTick as $e, watch as O, getCurrentScope as Te, onScopeDispose as Pe, getCurrentInstance as ke, toValue as T, computed as S, shallowRef as Q, unref as p, ref as ze, createElementBlock as A, openBlock as I, createElementVNode as $, createStaticVNode as Fe, defineComponent as we, h as oe, normalizeClass as C, createCommentVNode as X, createBlock as _, resolveDynamicComponent as re, withModifiers as Oe, createVNode as K, normalizeStyle as ie, renderSlot as se, TransitionGroup as Ve, withCtx as De, Fragment as He, renderList as We, mergeProps as Ke } from "vue";
1
+ import { inject as Le, onBeforeMount as ze, onMounted as xe, nextTick as $e, watch as O, getCurrentScope as je, onScopeDispose as Te, getCurrentInstance as ke, toValue as j, computed as S, shallowRef as Q, unref as p, ref as Pe, createElementBlock as A, openBlock as I, createElementVNode as $, createStaticVNode as Fe, defineComponent as we, h as re, normalizeClass as C, createCommentVNode as X, normalizeStyle as _, createBlock as ee, resolveDynamicComponent as ie, withModifiers as Oe, createVNode as K, renderSlot as se, TransitionGroup as Ve, withCtx as De, Fragment as He, renderList as We, mergeProps as Ke } from "vue";
2
2
  function qe(e) {
3
3
  let t = ".", n = "__", o = "--", r;
4
4
  if (e) {
@@ -138,7 +138,7 @@ function ue(e) {
138
138
  const t = e.parentElement;
139
139
  t && t.removeChild(e);
140
140
  }
141
- function te(e, t) {
141
+ function ne(e, t) {
142
142
  return (t ?? document.head).querySelector(`style[cssr-id="${e}"]`);
143
143
  }
144
144
  function Qe(e) {
@@ -193,13 +193,13 @@ ${r}
193
193
  }), e && s.push("}"), s.join(`
194
194
  `);
195
195
  }
196
- function ee(e, t, n) {
196
+ function te(e, t, n) {
197
197
  e && e.forEach((o) => {
198
198
  if (Array.isArray(o))
199
- ee(o, t, n);
199
+ te(o, t, n);
200
200
  else if (typeof o == "function") {
201
201
  const r = o(t);
202
- Array.isArray(r) ? ee(r, t, n) : r && n(r);
202
+ Array.isArray(r) ? te(r, t, n) : r && n(r);
203
203
  } else o && n(o);
204
204
  });
205
205
  }
@@ -224,7 +224,7 @@ function Ee(e, t, n, o, r) {
224
224
  V(d) ? s = d : t.push(d);
225
225
  }
226
226
  const u = Je(t), f = le(u, e.props, o, r);
227
- s ? n.push(`${s} {`) : f.length && n.push(f), e.children && ee(e.children, {
227
+ s ? n.push(`${s} {`) : f.length && n.push(f), e.children && te(e.children, {
228
228
  context: o.context,
229
229
  props: r
230
230
  }, (d) => {
@@ -266,7 +266,7 @@ function ot(e, t, n, o) {
266
266
  if (n === void 0)
267
267
  r.forEach(ue), t.els = [];
268
268
  else {
269
- const i = te(n, o);
269
+ const i = ne(n, o);
270
270
  i && r.includes(i) && (ue(i), t.els = r.filter((s) => s !== i));
271
271
  }
272
272
  }
@@ -280,7 +280,7 @@ function rt(e, t, n, o, r, i, s, u, f) {
280
280
  return;
281
281
  }
282
282
  u === void 0 && (u = document.head);
283
- const a = te(n, u);
283
+ const a = ne(n, u);
284
284
  if (a !== null && !i)
285
285
  return a;
286
286
  const c = a ?? Qe(n);
@@ -322,7 +322,7 @@ function at(e = {}) {
322
322
  const t = {
323
323
  c: ((...n) => lt(t, ...n)),
324
324
  use: (n, ...o) => n.install(t, ...o),
325
- find: te,
325
+ find: ne,
326
326
  context: {},
327
327
  config: e
328
328
  };
@@ -373,18 +373,18 @@ function bt(e, t) {
373
373
  ssr: n
374
374
  });
375
375
  }
376
- n ? o() : je(() => {
376
+ n ? o() : ze(() => {
377
377
  o();
378
378
  });
379
379
  }
380
380
  function Se(e) {
381
- return Te() ? (Pe(e), !0) : !1;
381
+ return je() ? (Te(e), !0) : !1;
382
382
  }
383
383
  const pt = typeof window < "u" && typeof document < "u";
384
384
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
385
- const gt = Object.prototype.toString, xt = (e) => gt.call(e) === "[object Object]", ce = () => {
385
+ const gt = Object.prototype.toString, yt = (e) => gt.call(e) === "[object Object]", ce = () => {
386
386
  };
387
- function yt(e, t) {
387
+ function xt(e, t) {
388
388
  function n(...o) {
389
389
  return new Promise((r, i) => {
390
390
  Promise.resolve(e(() => t.apply(this, o), { fn: t, thisArg: this, args: o })).then(r).catch(i);
@@ -399,7 +399,7 @@ function $t(e, t = {}) {
399
399
  };
400
400
  let s;
401
401
  return (f) => {
402
- const d = T(e), a = T(t.maxWait);
402
+ const d = j(e), a = j(t.maxWait);
403
403
  return n && i(n), d <= 0 || a !== void 0 && a <= 0 ? (o && (i(o), o = void 0), Promise.resolve(f())) : new Promise((c, b) => {
404
404
  r = t.rejectOnCancel ? b : c, s = f, a && !o && (o = setTimeout(() => {
405
405
  n && i(n), o = void 0, c(s());
@@ -417,13 +417,13 @@ function kt(e) {
417
417
  }
418
418
  // @__NO_SIDE_EFFECTS__
419
419
  function wt(e, t = 200, n = {}) {
420
- return yt(
420
+ return xt(
421
421
  $t(t, n),
422
422
  e
423
423
  );
424
424
  }
425
425
  function Ct(e, t = !0, n) {
426
- kt() ? ye(e, n) : t ? e() : $e(e);
426
+ kt() ? xe(e, n) : t ? e() : $e(e);
427
427
  }
428
428
  function It(e, t, n) {
429
429
  return O(
@@ -435,33 +435,33 @@ function It(e, t, n) {
435
435
  }
436
436
  );
437
437
  }
438
- const ne = pt ? window : void 0;
439
- function j(e) {
438
+ const oe = pt ? window : void 0;
439
+ function z(e) {
440
440
  var t;
441
- const n = T(e);
441
+ const n = j(e);
442
442
  return (t = n?.$el) != null ? t : n;
443
443
  }
444
444
  function Et(...e) {
445
445
  const t = [], n = () => {
446
446
  t.forEach((u) => u()), t.length = 0;
447
447
  }, o = (u, f, d, a) => (u.addEventListener(f, d, a), () => u.removeEventListener(f, d, a)), r = S(() => {
448
- const u = q(T(e[0])).filter((f) => f != null);
448
+ const u = q(j(e[0])).filter((f) => f != null);
449
449
  return u.every((f) => typeof f != "string") ? u : void 0;
450
450
  }), i = It(
451
451
  () => {
452
452
  var u, f;
453
453
  return [
454
- (f = (u = r.value) == null ? void 0 : u.map((d) => j(d))) != null ? f : [ne].filter((d) => d != null),
455
- q(T(r.value ? e[1] : e[0])),
454
+ (f = (u = r.value) == null ? void 0 : u.map((d) => z(d))) != null ? f : [oe].filter((d) => d != null),
455
+ q(j(r.value ? e[1] : e[0])),
456
456
  q(p(r.value ? e[2] : e[1])),
457
457
  // @ts-expect-error - TypeScript gets the correct types, but somehow still complains
458
- T(r.value ? e[3] : e[2])
458
+ j(r.value ? e[3] : e[2])
459
459
  ];
460
460
  },
461
461
  ([u, f, d, a]) => {
462
462
  if (n(), !u?.length || !f?.length || !d?.length)
463
463
  return;
464
- const c = xt(a) ? { ...a } : a;
464
+ const c = yt(a) ? { ...a } : a;
465
465
  t.push(
466
466
  ...u.flatMap(
467
467
  (b) => f.flatMap(
@@ -479,7 +479,7 @@ function Et(...e) {
479
479
  // @__NO_SIDE_EFFECTS__
480
480
  function St() {
481
481
  const e = Q(!1), t = ke();
482
- return t && ye(() => {
482
+ return t && xe(() => {
483
483
  e.value = !0;
484
484
  }, t), e;
485
485
  }
@@ -489,13 +489,13 @@ function Nt(e) {
489
489
  return S(() => (t.value, !!e()));
490
490
  }
491
491
  function Mt(e, t, n = {}) {
492
- const { window: o = ne, ...r } = n;
492
+ const { window: o = oe, ...r } = n;
493
493
  let i;
494
494
  const s = /* @__PURE__ */ Nt(() => o && "ResizeObserver" in o), u = () => {
495
495
  i && (i.disconnect(), i = void 0);
496
496
  }, f = S(() => {
497
- const c = T(e);
498
- return Array.isArray(c) ? c.map((b) => j(b)) : [j(c)];
497
+ const c = j(e);
498
+ return Array.isArray(c) ? c.map((b) => z(b)) : [z(c)];
499
499
  }), d = O(
500
500
  f,
501
501
  (c) => {
@@ -515,15 +515,15 @@ function Mt(e, t, n = {}) {
515
515
  };
516
516
  }
517
517
  function At(e, t = { width: 0, height: 0 }, n = {}) {
518
- const { window: o = ne, box: r = "content-box" } = n, i = S(() => {
518
+ const { window: o = oe, box: r = "content-box" } = n, i = S(() => {
519
519
  var c, b;
520
- return (b = (c = j(e)) == null ? void 0 : c.namespaceURI) == null ? void 0 : b.includes("svg");
520
+ return (b = (c = z(e)) == null ? void 0 : c.namespaceURI) == null ? void 0 : b.includes("svg");
521
521
  }), s = Q(t.width), u = Q(t.height), { stop: f } = Mt(
522
522
  e,
523
523
  ([c]) => {
524
524
  const b = r === "border-box" ? c.borderBoxSize : r === "content-box" ? c.contentBoxSize : c.devicePixelContentBoxSize;
525
525
  if (o && i.value) {
526
- const M = j(e);
526
+ const M = z(e);
527
527
  if (M) {
528
528
  const l = M.getBoundingClientRect();
529
529
  s.value = l.width, u.value = l.height;
@@ -537,11 +537,11 @@ function At(e, t = { width: 0, height: 0 }, n = {}) {
537
537
  n
538
538
  );
539
539
  Ct(() => {
540
- const c = j(e);
540
+ const c = z(e);
541
541
  c && (s.value = "offsetWidth" in c ? c.offsetWidth : t.width, u.value = "offsetHeight" in c ? c.offsetHeight : t.height);
542
542
  });
543
543
  const d = O(
544
- () => j(e),
544
+ () => z(e),
545
545
  (c) => {
546
546
  s.value = c ? t.width : 0, u.value = c ? t.height : 0;
547
547
  }
@@ -556,7 +556,7 @@ function At(e, t = { width: 0, height: 0 }, n = {}) {
556
556
  };
557
557
  }
558
558
  function Rt(e) {
559
- const { activeClassName: t = ".active", enableWheel: n = !0, direction: o = "vertical" } = e ?? {}, r = ze(), { width: i, height: s } = At(r);
559
+ const { activeClassName: t = ".active", enableWheel: n = !0, direction: o = "vertical" } = e ?? {}, r = Pe(), { width: i, height: s } = At(r);
560
560
  async function u(a) {
561
561
  await $e();
562
562
  const c = r.value?.querySelector(t);
@@ -597,7 +597,7 @@ function Rt(e) {
597
597
  }
598
598
  var Bt = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, R = function(e) {
599
599
  return typeof e == "string" ? e.length > 0 : typeof e == "number";
600
- }, y = function(e, t, n) {
600
+ }, x = function(e, t, n) {
601
601
  return t === void 0 && (t = 0), n === void 0 && (n = Math.pow(10, t)), Math.round(n * e) / n + 0;
602
602
  }, N = function(e, t, n) {
603
603
  return t === void 0 && (t = 0), n === void 0 && (n = 1), e > n ? n : e > t ? e : t;
@@ -606,7 +606,7 @@ var Bt = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, R = function(e) {
606
606
  }, de = function(e) {
607
607
  return { r: N(e.r, 0, 255), g: N(e.g, 0, 255), b: N(e.b, 0, 255), a: N(e.a) };
608
608
  }, Z = function(e) {
609
- return { r: y(e.r), g: y(e.g), b: y(e.b), a: y(e.a, 3) };
609
+ return { r: x(e.r), g: x(e.g), b: x(e.b), a: x(e.a, 3) };
610
610
  }, Lt = /^#([0-9a-f]{3,8})$/i, H = function(e) {
611
611
  var t = e.toString(16);
612
612
  return t.length < 2 ? "0" + t : t;
@@ -621,21 +621,21 @@ var Bt = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, R = function(e) {
621
621
  }, fe = function(e) {
622
622
  return { h: Ne(e.h), s: N(e.s, 0, 100), l: N(e.l, 0, 100), a: N(e.a) };
623
623
  }, he = function(e) {
624
- return { h: y(e.h), s: y(e.s), l: y(e.l), a: y(e.a, 3) };
624
+ return { h: x(e.h), s: x(e.s), l: x(e.l), a: x(e.a, 3) };
625
625
  }, me = function(e) {
626
626
  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 }));
627
627
  var t, n, o;
628
628
  }, F = function(e) {
629
629
  return { h: (t = Me(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 };
630
630
  var t, n, o, r;
631
- }, jt = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, Tt = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, Pt = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, zt = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, ve = { string: [[function(e) {
631
+ }, zt = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, jt = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, Tt = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, Pt = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, ve = { string: [[function(e) {
632
632
  var t = Lt.exec(e);
633
- 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;
633
+ 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 ? x(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 ? x(parseInt(e.substr(6, 2), 16) / 255, 2) : 1 } : null : null;
634
634
  }, "hex"], [function(e) {
635
- var t = Pt.exec(e) || zt.exec(e);
635
+ var t = Tt.exec(e) || Pt.exec(e);
636
636
  return t ? t[2] !== t[4] || t[4] !== t[6] ? null : de({ 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;
637
637
  }, "rgb"], [function(e) {
638
- var t = jt.exec(e) || Tt.exec(e);
638
+ var t = zt.exec(e) || jt.exec(e);
639
639
  if (!t) return null;
640
640
  var n, o, r = fe({ h: (n = t[1], o = t[2], o === void 0 && (o = "deg"), Number(n) * (Bt[o] || 1)), s: Number(t[3]), l: Number(t[4]), a: t[5] === void 0 ? 1 : Number(t[5]) / (t[6] ? 100 : 1) });
641
641
  return me(r);
@@ -677,13 +677,13 @@ var Bt = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, R = function(e) {
677
677
  return e.prototype.isValid = function() {
678
678
  return this.parsed !== null;
679
679
  }, e.prototype.brightness = function() {
680
- return y(Y(this.rgba), 2);
680
+ return x(Y(this.rgba), 2);
681
681
  }, e.prototype.isDark = function() {
682
682
  return Y(this.rgba) < 0.5;
683
683
  }, e.prototype.isLight = function() {
684
684
  return Y(this.rgba) >= 0.5;
685
685
  }, e.prototype.toHex = function() {
686
- return t = Z(this.rgba), n = t.r, o = t.g, r = t.b, s = (i = t.a) < 1 ? H(y(255 * i)) : "", "#" + H(n) + H(o) + H(r) + s;
686
+ return t = Z(this.rgba), n = t.r, o = t.g, r = t.b, s = (i = t.a) < 1 ? H(x(255 * i)) : "", "#" + H(n) + H(o) + H(r) + s;
687
687
  var t, n, o, r, i, s;
688
688
  }, e.prototype.toRgb = function() {
689
689
  return Z(this.rgba);
@@ -696,7 +696,7 @@ var Bt = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, R = function(e) {
696
696
  return t = he(F(this.rgba)), n = t.h, o = t.s, r = t.l, (i = t.a) < 1 ? "hsla(" + n + ", " + o + "%, " + r + "%, " + i + ")" : "hsl(" + n + ", " + o + "%, " + r + "%)";
697
697
  var t, n, o, r, i;
698
698
  }, e.prototype.toHsv = function() {
699
- return t = Me(this.rgba), { h: y(t.h), s: y(t.s), v: y(t.v), a: y(t.a, 3) };
699
+ return t = Me(this.rgba), { h: x(t.h), s: x(t.s), v: x(t.v), a: x(t.a, 3) };
700
700
  var t;
701
701
  }, e.prototype.invert = function() {
702
702
  return E({ r: 255 - (t = this.rgba).r, g: 255 - t.g, b: 255 - t.b, a: t.a });
@@ -714,18 +714,18 @@ var Bt = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, R = function(e) {
714
714
  }, e.prototype.rotate = function(t) {
715
715
  return t === void 0 && (t = 15), this.hue(this.hue() + t);
716
716
  }, e.prototype.alpha = function(t) {
717
- return typeof t == "number" ? E({ r: (n = this.rgba).r, g: n.g, b: n.b, a: t }) : y(this.rgba.a, 3);
717
+ return typeof t == "number" ? E({ r: (n = this.rgba).r, g: n.g, b: n.b, a: t }) : x(this.rgba.a, 3);
718
718
  var n;
719
719
  }, e.prototype.hue = function(t) {
720
720
  var n = F(this.rgba);
721
- return typeof t == "number" ? E({ h: t, s: n.s, l: n.l, a: n.a }) : y(n.h);
721
+ return typeof t == "number" ? E({ h: t, s: n.s, l: n.l, a: n.a }) : x(n.h);
722
722
  }, e.prototype.isEqual = function(t) {
723
723
  return this.toHex() === E(t).toHex();
724
724
  }, e;
725
725
  })(), E = function(e) {
726
726
  return e instanceof ge ? e : new ge(e);
727
727
  };
728
- const { cssr: Ot, plugin: Vt, namespace: Re } = ct(), { c: g, cB: W, cE: x, cM: J, cNotM: xe } = { ...Ot, ...Vt }, z = `${Re}-chrome-tabs`, w = `${Re}-chrome-tabs-item`, P = "all .2s cubic-bezier(.4, 0, .2, 1)";
728
+ const { cssr: Ot, plugin: Vt, namespace: Re } = ct(), { c: g, cB: W, cE: y, cM: J, cNotM: ye } = { ...Ot, ...Vt }, P = `${Re}-chrome-tabs`, w = `${Re}-chrome-tabs-item`, T = "all .2s cubic-bezier(.4, 0, .2, 1)";
729
729
  function Dt() {
730
730
  return g([
731
731
  W("chrome-tabs", {
@@ -741,14 +741,14 @@ function Dt() {
741
741
  boxSizing: "border-box"
742
742
  }),
743
743
  g(".group-move, .group-enter-active, .group-leave-active", {
744
- transition: P
744
+ transition: T
745
745
  }),
746
746
  g(".group-enter-from, .group-leave-to", {
747
747
  opacity: 0
748
748
  }),
749
749
  g(".group-leave-active", {}),
750
- x("prefix", {}),
751
- x("icon", {
750
+ y("prefix", {}),
751
+ y("icon", {
752
752
  width: "28px",
753
753
  height: "28px",
754
754
  display: "flex",
@@ -757,7 +757,7 @@ function Dt() {
757
757
  padding: "5px",
758
758
  borderRadius: "10px",
759
759
  backgroundColor: "var(--active-background-color)",
760
- transition: P
760
+ transition: T
761
761
  }, [
762
762
  g("svg", {
763
763
  width: "100%",
@@ -768,7 +768,7 @@ function Dt() {
768
768
  backgroundColor: "var(--primary-color)"
769
769
  })
770
770
  ]),
771
- x("content", {
771
+ y("content", {
772
772
  flex: "1",
773
773
  height: "100%",
774
774
  minWidth: 0,
@@ -776,13 +776,13 @@ function Dt() {
776
776
  marginLeft: "-6px",
777
777
  padding: "0 10px"
778
778
  }),
779
- x("scroll", {
779
+ y("scroll", {
780
780
  position: "relative",
781
781
  display: "flex",
782
782
  alignItems: "center",
783
783
  height: "100%"
784
784
  }, [
785
- x("icon", {
785
+ y("icon", {
786
786
  marginLeft: "5px",
787
787
  borderRadius: "50%",
788
788
  backgroundColor: "transparent",
@@ -793,7 +793,7 @@ function Dt() {
793
793
  })
794
794
  ])
795
795
  ]),
796
- x("suffix", {})
796
+ y("suffix", {})
797
797
  ]),
798
798
  W("chrome-tabs-item", {
799
799
  position: "relative",
@@ -811,13 +811,13 @@ function Dt() {
811
811
  filter: "grayscale(0.5)"
812
812
  }),
813
813
  J("active", [
814
- x("background", {
814
+ y("background", {
815
815
  opacity: 1
816
816
  })
817
817
  ]),
818
- xe("active", [
818
+ ye("active", [
819
819
  g("&:hover", {}, [
820
- x("content", {
820
+ y("content", {
821
821
  backgroundColor: "var(--primary-color)"
822
822
  })
823
823
  ])
@@ -828,7 +828,7 @@ function Dt() {
828
828
  g("&::last-child", {
829
829
  marginRight: "0 !important"
830
830
  }),
831
- x("content", {
831
+ y("content", {
832
832
  position: "relative",
833
833
  zIndex: 1,
834
834
  height: "28px",
@@ -837,10 +837,10 @@ function Dt() {
837
837
  gap: "5px",
838
838
  borderRadius: "10px",
839
839
  padding: "0 10px",
840
- transition: P
840
+ transition: T
841
841
  }),
842
- x("slot", {}),
843
- x("icon", {
842
+ y("slot", {}),
843
+ y("icon", {
844
844
  lineHeight: 1
845
845
  }, [
846
846
  g("svg", {
@@ -849,7 +849,7 @@ function Dt() {
849
849
  fill: "currentColor"
850
850
  })
851
851
  ]),
852
- x("close", {
852
+ y("close", {
853
853
  width: "16px",
854
854
  height: "16px",
855
855
  padding: "2px",
@@ -857,7 +857,7 @@ function Dt() {
857
857
  alignItems: "center",
858
858
  justifyContent: "center",
859
859
  borderRadius: "50%",
860
- transition: P
860
+ transition: T
861
861
  }, [
862
862
  g("&:hover", {
863
863
  backgroundColor: "rgba(0,0,0,0.1)"
@@ -868,7 +868,7 @@ function Dt() {
868
868
  fill: "currentColor"
869
869
  })
870
870
  ]),
871
- x("background", {
871
+ y("background", {
872
872
  position: "absolute",
873
873
  opacity: 0,
874
874
  left: 0,
@@ -878,9 +878,9 @@ function Dt() {
878
878
  width: "100%",
879
879
  display: "flex",
880
880
  alignItems: "flex-end",
881
- transition: P
881
+ transition: T
882
882
  }, [
883
- x("block", {
883
+ y("block", {
884
884
  height: "100%",
885
885
  flex: 1,
886
886
  minWidth: 0,
@@ -891,14 +891,14 @@ function Dt() {
891
891
  fill: "var(--active-background-color)"
892
892
  })
893
893
  ]),
894
- x("line", {
894
+ y("line", {
895
895
  position: "absolute",
896
896
  bottom: "12px",
897
897
  right: "4px",
898
898
  height: "16px",
899
899
  width: "2px",
900
900
  borderRadius: "1px",
901
- transition: P,
901
+ transition: T,
902
902
  backgroundColor: "var(--primary-color)",
903
903
  opacity: 0
904
904
  }, [
@@ -912,7 +912,7 @@ function Dt() {
912
912
  backgroundColor: "var(--background-color-dark)",
913
913
  color: "var(--background-color)"
914
914
  }, [
915
- x("icon", {
915
+ y("icon", {
916
916
  backgroundColor: "var(--active-background-color-dark)"
917
917
  }, [
918
918
  g("&:hover", {
@@ -921,15 +921,15 @@ function Dt() {
921
921
  ])
922
922
  ]),
923
923
  W("chrome-tabs-item", {}, [
924
- xe("active", [
924
+ ye("active", [
925
925
  g("&:hover", {}, [
926
- x("content", {
926
+ y("content", {
927
927
  backgroundColor: "var(--primary-color-dark)"
928
928
  })
929
929
  ])
930
930
  ]),
931
- x("background", {}, [
932
- x("block", {
931
+ y("background", {}, [
932
+ y("block", {
933
933
  backgroundColor: "var(--active-background-color-dark)"
934
934
  }),
935
935
  g("svg", {
@@ -954,12 +954,12 @@ const G = (e, t) => {
954
954
  viewBox: "0 0 24 24"
955
955
  };
956
956
  function Kt(e, t, n, o, r, i) {
957
- return I(), A("svg", Wt, t[0] || (t[0] = [
957
+ return I(), A("svg", Wt, [...t[0] || (t[0] = [
958
958
  $("path", {
959
959
  fill: "#757575",
960
960
  d: "M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"
961
961
  }, null, -1)
962
- ]));
962
+ ])]);
963
963
  }
964
964
  const qt = /* @__PURE__ */ G(Ht, [["render", Kt]]), Gt = {
965
965
  name: "RiArrowDropDownLine"
@@ -970,12 +970,12 @@ const qt = /* @__PURE__ */ G(Ht, [["render", Kt]]), Gt = {
970
970
  viewBox: "0 0 24 24"
971
971
  };
972
972
  function Ut(e, t, n, o, r, i) {
973
- return I(), A("svg", Zt, t[0] || (t[0] = [
973
+ return I(), A("svg", Zt, [...t[0] || (t[0] = [
974
974
  $("path", {
975
975
  fill: "#757575",
976
976
  d: "m12 15l-4.243-4.242l1.415-1.414L12 12.172l2.828-2.828l1.415 1.414z"
977
977
  }, null, -1)
978
- ]));
978
+ ])]);
979
979
  }
980
980
  const Yt = /* @__PURE__ */ G(Gt, [["render", Ut]]), Jt = {
981
981
  name: "LineMdLoadingTwotoneLoop"
@@ -986,9 +986,9 @@ const Yt = /* @__PURE__ */ G(Gt, [["render", Ut]]), Jt = {
986
986
  viewBox: "0 0 24 24"
987
987
  };
988
988
  function Xt(e, t, n, o, r, i) {
989
- return I(), A("svg", Qt, t[0] || (t[0] = [
989
+ return I(), A("svg", Qt, [...t[0] || (t[0] = [
990
990
  Fe('<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)
991
- ]));
991
+ ])]);
992
992
  }
993
993
  const _t = /* @__PURE__ */ G(Jt, [["render", Xt]]), en = {
994
994
  name: "RiCloseLine"
@@ -999,12 +999,12 @@ const _t = /* @__PURE__ */ G(Jt, [["render", Xt]]), en = {
999
999
  viewBox: "0 0 24 24"
1000
1000
  };
1001
1001
  function nn(e, t, n, o, r, i) {
1002
- return I(), A("svg", tn, t[0] || (t[0] = [
1002
+ return I(), A("svg", tn, [...t[0] || (t[0] = [
1003
1003
  $("path", {
1004
1004
  fill: "#757575",
1005
1005
  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"
1006
1006
  }, null, -1)
1007
- ]));
1007
+ ])]);
1008
1008
  }
1009
1009
  const on = /* @__PURE__ */ G(en, [["render", nn]]), rn = /* @__PURE__ */ we({
1010
1010
  __name: "TabItem",
@@ -1022,11 +1022,12 @@ const on = /* @__PURE__ */ G(en, [["render", nn]]), rn = /* @__PURE__ */ we({
1022
1022
  style: {},
1023
1023
  activeIndex: { default: 0 },
1024
1024
  itemIndex: {},
1025
- itemKey: {}
1025
+ itemKey: {},
1026
+ iconSize: { default: 20 }
1026
1027
  },
1027
1028
  emits: ["itemClick", "itemContextmenu", "itemClose"],
1028
1029
  setup(e, { emit: t }) {
1029
- const n = t, o = S(() => e.activeIndex !== e.itemIndex && e.activeIndex - 1 !== e.itemIndex), r = S(() => e.activeIndex === e.itemIndex), i = S(() => typeof e.label == "string" ? oe("span", { class: `${w}__label` }, e.label) : e.label(e.itemKey, e.itemIndex)), s = S(() => e.loadingIcon?.(e.itemKey, e.itemIndex) ?? oe(_t));
1030
+ const n = t, o = S(() => e.activeIndex !== e.itemIndex && e.activeIndex - 1 !== e.itemIndex), r = S(() => e.activeIndex === e.itemIndex), i = S(() => typeof e.label == "string" ? re("span", { class: `${w}__label` }, e.label) : e.label(e.itemKey, e.itemIndex)), s = S(() => e.loadingIcon?.(e.itemKey, e.itemIndex) ?? re(_t));
1030
1031
  function u(a) {
1031
1032
  a.stopPropagation(), n("itemClick", a), e.onClick?.(e.itemKey, e.itemIndex, a);
1032
1033
  }
@@ -1051,14 +1052,15 @@ const on = /* @__PURE__ */ G(en, [["render", nn]]), rn = /* @__PURE__ */ we({
1051
1052
  class: C([`${p(w)}__content`])
1052
1053
  }, [
1053
1054
  $("div", {
1054
- class: C([`${p(w)}__icon`])
1055
+ class: C([`${p(w)}__icon`]),
1056
+ style: _({ fontSize: `${a.iconSize}px` })
1055
1057
  }, [
1056
- (I(), _(re(typeof a.loading == "function" ? a.loading(a.itemKey, a.itemIndex) : a.loading ? s.value : a.icon?.(a.itemKey, a.itemIndex) ?? void 0)))
1057
- ], 2),
1058
+ (I(), ee(ie(typeof a.loading == "function" ? a.loading(a.itemKey, a.itemIndex) : a.loading ? s.value : a.icon?.(a.itemKey, a.itemIndex) ?? void 0)))
1059
+ ], 6),
1058
1060
  $("div", {
1059
1061
  class: C([`${p(w)}__slot`])
1060
1062
  }, [
1061
- (I(), _(re(i.value)))
1063
+ (I(), ee(ie(i.value)))
1062
1064
  ], 2),
1063
1065
  (typeof a.closable == "function" ? a.closable(a.itemKey, a.itemIndex) : a.closable) ? (I(), A("div", {
1064
1066
  key: 0,
@@ -1101,6 +1103,7 @@ const on = /* @__PURE__ */ G(en, [["render", nn]]), rn = /* @__PURE__ */ we({
1101
1103
  addable: { type: Boolean },
1102
1104
  options: {},
1103
1105
  loadingValue: {},
1106
+ iconSize: {},
1104
1107
  contentClass: {},
1105
1108
  contentStyle: {}
1106
1109
  },
@@ -1125,8 +1128,8 @@ const on = /* @__PURE__ */ G(en, [["render", nn]]), rn = /* @__PURE__ */ we({
1125
1128
  n("close", h, v);
1126
1129
  }
1127
1130
  return (h, v) => (I(), A("div", {
1128
- class: C([p(z)]),
1129
- style: ie({
1131
+ class: C([p(P)]),
1132
+ style: _({
1130
1133
  "--background-color": `${p(o)}`,
1131
1134
  "--background-color-dark": `${d.value}`,
1132
1135
  "--active-background-color": `${p(r)}`,
@@ -1137,7 +1140,7 @@ const on = /* @__PURE__ */ G(en, [["render", nn]]), rn = /* @__PURE__ */ we({
1137
1140
  }, [
1138
1141
  h.dropdown ? (I(), A("div", {
1139
1142
  key: 0,
1140
- class: C([`${p(z)}__icon`])
1143
+ class: C([`${p(P)}__icon`])
1141
1144
  }, [
1142
1145
  K(Yt)
1143
1146
  ], 2)) : X("", !0),
@@ -1145,26 +1148,27 @@ const on = /* @__PURE__ */ G(en, [["render", nn]]), rn = /* @__PURE__ */ we({
1145
1148
  $("div", {
1146
1149
  ref_key: "scrollRef",
1147
1150
  ref: u,
1148
- class: C([`${p(z)}__content`, h.contentClass]),
1149
- style: ie(h.contentStyle)
1151
+ class: C([`${p(P)}__content`, h.contentClass]),
1152
+ style: _(h.contentStyle)
1150
1153
  }, [
1151
1154
  K(Ve, {
1152
1155
  name: "group",
1153
1156
  tag: "div",
1154
- class: C([`${p(z)}__scroll`])
1157
+ class: C([`${p(P)}__scroll`])
1155
1158
  }, {
1156
1159
  default: De(() => [
1157
- (I(!0), A(He, null, We(h.options, ({ key: m, ...k }, B) => (I(), _(rn, Ke({
1160
+ (I(!0), A(He, null, We(h.options, ({ key: m, ...k }, B) => (I(), ee(rn, Ke({
1158
1161
  key: m,
1159
1162
  loading: h.loadingValue === m
1160
1163
  }, { ref_for: !0 }, k, {
1161
1164
  "item-key": m,
1162
1165
  "item-index": B,
1163
1166
  "active-index": s.value,
1167
+ "icon-size": h.iconSize,
1164
1168
  onItemClick: (L) => b(m, B),
1165
1169
  onItemContextmenu: (L) => M(m, B),
1166
1170
  onItemClose: (L) => l(m, B)
1167
- }), null, 16, ["loading", "item-key", "item-index", "active-index", "onItemClick", "onItemContextmenu", "onItemClose"]))), 128))
1171
+ }), null, 16, ["loading", "item-key", "item-index", "active-index", "icon-size", "onItemClick", "onItemContextmenu", "onItemClose"]))), 128))
1168
1172
  ]),
1169
1173
  _: 1
1170
1174
  }, 8, ["class"])
@@ -1172,7 +1176,7 @@ const on = /* @__PURE__ */ G(en, [["render", nn]]), rn = /* @__PURE__ */ we({
1172
1176
  se(h.$slots, "suffix"),
1173
1177
  h.addable ? (I(), A("div", {
1174
1178
  key: 1,
1175
- class: C([`${p(z)}__icon`]),
1179
+ class: C([`${p(P)}__icon`]),
1176
1180
  onClick: v[0] || (v[0] = (m) => n("add"))
1177
1181
  }, [
1178
1182
  K(qt)
@@ -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 he(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 h=c.context;h.bem={},h.bem.b=null,h.bem.els=null}};function s(c){let h,b;return{before(p){h=p.bem.b,b=p.bem.els,p.bem.els=null},after(p){p.bem.b=h,p.bem.els=b},$({context:p,props:$}){return c=typeof c=="string"?c:c({context:p,props:$}),p.bem.b=c,`${$?.bPrefix||t}${p.bem.b}`}}}function a(c){let h;return{before(b){h=b.bem.els},after(b){b.bem.els=h},$({context:b,props:p}){return c=typeof c=="string"?c:c({context:b,props:p}),b.bem.els=c.split(",").map($=>$.trim()),b.bem.els.map($=>`${p?.bPrefix||t}${b.bem.b}${n}${$}`).join(", ")}}}function m(c){return{$({context:h,props:b}){c=typeof c=="string"?c:c({context:h,props:b});const p=c.split(",").map(V=>V.trim());function $(V){return p.map(St=>`&${b?.bPrefix||t}${h.bem.b}${V!==void 0?`${n}${V}`:""}${o}${St}`).join(", ")}const I=h.bem.els;if(I!==null){if(process.env.NODE_ENV!=="production"&&I.length>=2)throw Error(`[css-render/plugin-bem]: m(${c}) is invalid, using modifier inside multiple elements is not allowed`);return $(I[0])}else return $()}}}function f(c){return{$({context:h,props:b}){c=typeof c=="string"?c:c({context:h,props:b});const p=h.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(${b?.bPrefix||t}${h.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(m(c[0]),c[1],c[2])),cNotM:((...c)=>i(f(c[0]),c[1],c[2]))}),l}function pe(e){let t=0;for(let n=0;n<e.length;++n)e[n]==="&"&&++t;return t}const Z=/\s*,(?![^(]*\))\s*/g,be=/\s+/g;function ge(e,t){const n=[];return t.split(Z).forEach(o=>{let i=pe(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(m=>{s.push(a.replace("&",m))})}),l=s}l.forEach(s=>n.push(s))}),n}function ye(e,t){const n=[];return t.split(Z).forEach(o=>{e.forEach(i=>{n.push((i&&i+" ")+o)})}),n}function xe(e){let t=[""];return e.forEach(n=>{n=n&&n.trim(),n&&(n.includes("&")?t=ge(t,n):t=ye(t,n))}),t.join(", ").replace(be," ")}function U(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 ve(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 ke=/[A-Z]/g;function Y(e){return e.replace(ke,t=>"-"+t.toLowerCase())}function $e(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 he(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 h=c.context;h.bem={},h.bem.b=null,h.bem.els=null}};function s(c){let h,b;return{before(p){h=p.bem.b,b=p.bem.els,p.bem.els=null},after(p){p.bem.b=h,p.bem.els=b},$({context:p,props:$}){return c=typeof c=="string"?c:c({context:p,props:$}),p.bem.b=c,`${$?.bPrefix||t}${p.bem.b}`}}}function a(c){let h;return{before(b){h=b.bem.els},after(b){b.bem.els=h},$({context:b,props:p}){return c=typeof c=="string"?c:c({context:b,props:p}),b.bem.els=c.split(",").map($=>$.trim()),b.bem.els.map($=>`${p?.bPrefix||t}${b.bem.b}${n}${$}`).join(", ")}}}function m(c){return{$({context:h,props:b}){c=typeof c=="string"?c:c({context:h,props:b});const p=c.split(",").map(V=>V.trim());function $(V){return p.map(St=>`&${b?.bPrefix||t}${h.bem.b}${V!==void 0?`${n}${V}`:""}${o}${St}`).join(", ")}const I=h.bem.els;if(I!==null){if(process.env.NODE_ENV!=="production"&&I.length>=2)throw Error(`[css-render/plugin-bem]: m(${c}) is invalid, using modifier inside multiple elements is not allowed`);return $(I[0])}else return $()}}}function f(c){return{$({context:h,props:b}){c=typeof c=="string"?c:c({context:h,props:b});const p=h.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(${b?.bPrefix||t}${h.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(m(c[0]),c[1],c[2])),cNotM:((...c)=>i(f(c[0]),c[1],c[2]))}),l}function pe(e){let t=0;for(let n=0;n<e.length;++n)e[n]==="&"&&++t;return t}const Z=/\s*,(?![^(]*\))\s*/g,be=/\s+/g;function ge(e,t){const n=[];return t.split(Z).forEach(o=>{let i=pe(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(m=>{s.push(a.replace("&",m))})}),l=s}l.forEach(s=>n.push(s))}),n}function ye(e,t){const n=[];return t.split(Z).forEach(o=>{e.forEach(i=>{n.push((i&&i+" ")+o)})}),n}function xe(e){let t=[""];return e.forEach(n=>{n=n&&n.trim(),n&&(n.includes("&")?t=ge(t,n):t=ye(t,n))}),t.join(", ").replace(be," ")}function U(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 ve(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 ke=/[A-Z]/g;function Y(e){return e.replace(ke,t=>"-"+t.toLowerCase())}function $e(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 Ce(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=Ce(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 m=i[a];if(a==="raw"){s.push(`
8
8
  `+m+`
9
9
  `);return}a=Y(a),m!=null&&s.push(` ${a}${$e(m)}`)}),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 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=xe(t),m=J(a,e.props,o,i);s?n.push(`${s} {`):m.length&&n.push(m),e.children&&F(e.children,{context:o.context,props:i},f=>{if(typeof f=="string"){const u=J(a,{raw:f},o,i);n.push(u)}else Q(f,t,n,o,i)}),t.pop(),s&&n.push("}"),l&&l.after&&l.after(o.context)}function we(e,t,n){const o=[];return Q(e,[],o,t,n),o.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 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=xe(t),m=J(a,e.props,o,i);s?n.push(`${s} {`):m.length&&n.push(m),e.children&&F(e.children,{context:o.context,props:i},f=>{if(typeof f=="string"){const u=J(a,{raw:f},o,i);n.push(u)}else Q(f,t,n,o,i)}),t.pop(),s&&n.push("}"),l&&l.after&&l.after(o.context)}function we(e,t,n){const o=[];return Q(e,[],o,t,n),o.join(`
11
11
 
12
- `)}function Ee(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 Ne(e,t,n,o){const{els:i}=t;if(n===void 0)i.forEach(U),t.els=[];else{const l=D(n,o);l&&i.includes(l)&&(U(l),t.els=i.filter(s=>s!==l))}}function X(e,t){e.push(t)}function Ie(e,t,n,o,i,l,s,a,m){let f;if(n===void 0&&(f=t.render(o),n=Ee(f)),m){m.adapter(n,f??t.render(o));return}a===void 0&&(a=document.head);const u=D(n,a);if(u!==null&&!l)return u;const d=u??ve(n);if(f===void 0&&(f=t.render(o)),d.textContent=f,u!==null)return u;if(s){const g=a.querySelector(`meta[name="${s}"]`);if(g)return a.insertBefore(d,g),X(t.els,d),d}return i?a.insertBefore(d,a.querySelector("style, link")):a.appendChild(d),X(t.els,d),d}function Be(e){return we(this,this.instance,e)}function Se(e={}){const{id:t,ssr:n,props:o,head:i=!1,force:l=!1,anchorMetaName:s,parent:a}=e;return Ie(this.instance,this,t,o,i,l,s,a,n)}function Ve(e={}){const{id:t,parent:n}=e;Ne(this.instance,this,t,n)}const L=function(e,t,n,o){return{instance:e,$:t,props:n,children:o,els:[],render:Be,mount:Se,unmount:Ve}},Me=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 Ae(e={}){const t={c:((...n)=>Me(t,...n)),use:(n,...o)=>n.install(t,...o),find:D,context:{},config:e};return t}function Re(e){const{namespace:t="n",blockPrefix:n=`.${t}-`,elementPrefix:o="__",modifierPrefix:i="--"}=e??{},l=Ae(),s=he({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}">
12
+ `)}function Ee(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 Ne(e,t,n,o){const{els:i}=t;if(n===void 0)i.forEach(U),t.els=[];else{const l=D(n,o);l&&i.includes(l)&&(U(l),t.els=i.filter(s=>s!==l))}}function X(e,t){e.push(t)}function Ie(e,t,n,o,i,l,s,a,m){let f;if(n===void 0&&(f=t.render(o),n=Ee(f)),m){m.adapter(n,f??t.render(o));return}a===void 0&&(a=document.head);const u=D(n,a);if(u!==null&&!l)return u;const d=u??ve(n);if(f===void 0&&(f=t.render(o)),d.textContent=f,u!==null)return u;if(s){const g=a.querySelector(`meta[name="${s}"]`);if(g)return a.insertBefore(d,g),X(t.els,d),d}return i?a.insertBefore(d,a.querySelector("style, link")):a.appendChild(d),X(t.els,d),d}function Be(e){return we(this,this.instance,e)}function Se(e={}){const{id:t,ssr:n,props:o,head:i=!1,force:l=!1,anchorMetaName:s,parent:a}=e;return Ie(this.instance,this,t,o,i,l,s,a,n)}function Ve(e={}){const{id:t,parent:n}=e;Ne(this.instance,this,t,n)}const L=function(e,t,n,o){return{instance:e,$:t,props:n,children:o,els:[],render:Be,mount:Se,unmount:Ve}},ze=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 Me(e={}){const t={c:((...n)=>ze(t,...n)),use:(n,...o)=>n.install(t,...o),find:D,context:{},config:e};return t}function Ae(e){const{namespace:t="n",blockPrefix:n=`.${t}-`,elementPrefix:o="__",modifierPrefix:i="--"}=e??{},l=Me(),s=he({blockPrefix:n,elementPrefix:o,modifierPrefix:i});return l.use(s),{namespace:t,blockPrefix:n,elementPrefix:o,modifierPrefix:i,cssr:l,plugin:s}}const Re="@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(Le(e,t)))}const Te=typeof document<"u";function Pe(){if(Te)return;const e=r.inject(ze,null);if(e!==null)return{adapter:(t,n)=>je(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()})}function _(e){return r.getCurrentScope()?(r.onScopeDispose(e),!0):!1}const De=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Fe=Object.prototype.toString,He=e=>Fe.call(e)==="[object Object]",ee=()=>{};function We(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 Ke(e,t={}){let n,o,i=ee;const l=m=>{clearTimeout(m),i(),i=ee};let s;return m=>{const f=r.toValue(e),u=r.toValue(t.maxWait);return n&&l(n),f<=0||u!==void 0&&u<=0?(o&&(l(o),o=void 0),Promise.resolve(m())):new Promise((d,g)=>{i=t.rejectOnCancel?g:d,s=m,u&&!o&&(o=setTimeout(()=>{n&&l(n),o=void 0,d(s())},u)),n=setTimeout(()=>{o&&l(o),o=void 0,d(m())},f)})}}function j(e){return Array.isArray(e)?e:[e]}function qe(e){return r.getCurrentInstance()}function Ge(e,t=200,n={}){return We(Ke(t,n),e)}function Ze(e,t=!0,n){qe()?r.onMounted(e,n):t?e():r.nextTick(e)}function Ue(e,t,n){return r.watch(e,t,{...n,immediate:!0})}const H=De?window:void 0;function S(e){var t;const n=r.toValue(e);return(t=n?.$el)!=null?t:n}function Ye(...e){const t=[],n=()=>{t.forEach(a=>a()),t.length=0},o=(a,m,f,u)=>(a.addEventListener(m,f,u),()=>a.removeEventListener(m,f,u)),i=r.computed(()=>{const a=j(r.toValue(e[0])).filter(m=>m!=null);return a.every(m=>typeof m!="string")?a:void 0}),l=Ue(()=>{var a,m;return[(m=(a=i.value)==null?void 0:a.map(f=>S(f)))!=null?m:[H].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,m,f,u])=>{if(n(),!a?.length||!m?.length||!f?.length)return;const d=He(u)?{...u}:u;t.push(...a.flatMap(g=>m.flatMap(E=>f.map(c=>o(g,E,c,d)))))},{flush:"post"}),s=()=>{l(),n()};return _(n),s}function Je(){const e=r.shallowRef(!1),t=r.getCurrentInstance();return t&&r.onMounted(()=>{e.value=!0},t),e}function Qe(e){const t=Je();return r.computed(()=>(t.value,!!e()))}function Xe(e,t,n={}){const{window:o=H,...i}=n;let l;const s=Qe(()=>o&&"ResizeObserver"in o),a=()=>{l&&(l.disconnect(),l=void 0)},m=r.computed(()=>{const d=r.toValue(e);return Array.isArray(d)?d.map(g=>S(g)):[S(d)]}),f=r.watch(m,d=>{if(a(),s.value&&o){l=new ResizeObserver(t);for(const g of d)g&&l.observe(g,i)}},{immediate:!0,flush:"post"}),u=()=>{a(),f()};return _(u),{isSupported:s,stop:u}}function _e(e,t={width:0,height:0},n={}){const{window:o=H,box:i="content-box"}=n,l=r.computed(()=>{var d,g;return(g=(d=S(e))==null?void 0:d.namespaceURI)==null?void 0:g.includes("svg")}),s=r.shallowRef(t.width),a=r.shallowRef(t.height),{stop:m}=Xe(e,([d])=>{const g=i==="border-box"?d.borderBoxSize:i==="content-box"?d.contentBoxSize:d.devicePixelContentBoxSize;if(o&&l.value){const E=S(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:h})=>c+h,0),a.value=E.reduce((c,{blockSize:h})=>c+h,0)}else s.value=d.contentRect.width,a.value=d.contentRect.height},n);Ze(()=>{const d=S(e);d&&(s.value="offsetWidth"in d?d.offsetWidth:t.width,a.value="offsetHeight"in d?d.offsetHeight:t.height)});const f=r.watch(()=>S(e),d=>{s.value=d?t.width:0,a.value=d?t.height:0});function u(){m(),f()}return{width:s,height:a,stop:u}}function et(e){const{activeClassName:t=".active",enableWheel:n=!0,direction:o="vertical"}=e??{},i=r.ref(),{width:l,height:s}=_e(i);async function a(u){await r.nextTick();const d=i.value?.querySelector(t);d&&d.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest",...u})}function m(u){if(!n)return;u.preventDefault();const{deltaY:d}=u;switch(o){case"vertical":i.value?.scrollBy({top:d>0?s.value:-s.value,behavior:"smooth"});break;case"horizontal":i.value?.scrollBy({left:d>0?l.value:-l.value,behavior:"smooth"});break}}Ye(i,"wheel",m);const f=Ge(a,500);return r.watch([l,s],()=>{f()}),{scrollRef:i,scrollToView:a}}var tt={grad:.9,turn:360,rad:360/(2*Math.PI)},N=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},v=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},te=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},ne=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)}},W=function(e){return{r:v(e.r),g:v(e.g),b:v(e.b),a:v(e.a,3)}},nt=/^#([0-9a-f]{3,8})$/i,T=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},oe=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}},re=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),m=o*(1-(1-t+l)*n),f=l%6;return{r:255*[o,a,s,s,m,o][f],g:255*[m,o,o,a,s,s][f],b:255*[s,s,m,o,o,a][f],a:i}},ie=function(e){return{h:te(e.h),s:C(e.s,0,100),l:C(e.l,0,100),a:C(e.a)}},le=function(e){return{h:v(e.h),s:v(e.s),l:v(e.l),a:v(e.a,3)}},se=function(e){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}));var t,n,o},A=function(e){return{h:(t=oe(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},ot=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,rt=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,it=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,lt=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,ae={string:[[function(e){var t=nt.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?v(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?v(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=it.exec(e)||lt.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:ne({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=ot.exec(e)||rt.exec(e);if(!t)return null;var n,o,i=ie({h:(n=t[1],o=t[2],o===void 0&&(o="deg"),Number(n)*(tt[o]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return se(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)?ne({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=ie({h:Number(t),s:Number(n),l:Number(o),a:Number(l)});return se(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:te(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 re(s)},"hsv"]]},ce=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]},st=function(e){return typeof e=="string"?ce(e.trim(),ae.string):typeof e=="object"&&e!==null?ce(e,ae.object):[null,void 0]},K=function(e,t){var n=A(e);return{h:n.h,s:C(n.s+100*t,0,100),l:n.l,a:n.a}},q=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},ue=function(e,t){var n=A(e);return{h:n.h,s:n.s,l:C(n.l+100*t,0,100),a:n.a}},de=(function(){function e(t){this.parsed=st(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 v(q(this.rgba),2)},e.prototype.isDark=function(){return q(this.rgba)<.5},e.prototype.isLight=function(){return q(this.rgba)>=.5},e.prototype.toHex=function(){return t=W(this.rgba),n=t.r,o=t.g,i=t.b,s=(l=t.a)<1?T(v(255*l)):"","#"+T(n)+T(o)+T(i)+s;var t,n,o,i,l,s},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 le(A(this.rgba))},e.prototype.toHslString=function(){return t=le(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=oe(this.rgba),{h:v(t.h),s:v(t.s),v:v(t.v),a:v(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(K(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),w(K(this.rgba,-t))},e.prototype.grayscale=function(){return w(K(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),w(ue(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),w(ue(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}):v(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}):v(n.h)},e.prototype.isEqual=function(t){return this.toHex()===w(t).toHex()},e})(),w=function(e){return e instanceof de?e:new de(e)};const{cssr:at,plugin:ct,namespace:fe}=Re(),{c:y,cB:P,cE:x,cM:G,cNotM:me}={...at,...ct},R=`${fe}-chrome-tabs`,k=`${fe}-chrome-tabs-item`,M="all .2s cubic-bezier(.4, 0, .2, 1)";function ut(){return y([P("chrome-tabs",{display:"flex",width:"100%",height:"40px",padding:"0 10px",alignItems:"center",backgroundColor:"var(--background-color)",color:"var(--background-color-dark)"},[y("div",{boxSizing:"border-box"}),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",{})]),P("chrome-tabs-item",{position:"relative",margin:"0 -5px",height:"100%",flexShrink:0,cursor:"default",userSelect:"none",padding:"6px 15px 0px 15px"},[G("disabled",{cursor:"not-allowed",pointerEvents:"none",opacity:.5,filter:"grayscale(0.5)"}),G("active",[x("background",{opacity:1})]),me("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",{lineHeight:1},[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},[G("show",{opacity:1})])]),y(".dark",[P("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)"})])]),P("chrome-tabs-item",{},[me("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 O=(e,t)=>{const n=e.__vccOpts||e;for(const[o,i]of t)n[o]=i;return n},dt={name:"RiAddLine"},ft={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24"};function mt(e,t,n,o,i,l){return r.openBlock(),r.createElementBlock("svg",ft,t[0]||(t[0]=[r.createElementVNode("path",{fill:"#757575",d:"M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"},null,-1)]))}const ht=O(dt,[["render",mt]]),pt={name:"RiArrowDropDownLine"},bt={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24"};function gt(e,t,n,o,i,l){return r.openBlock(),r.createElementBlock("svg",bt,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 yt=O(pt,[["render",gt]]),xt={name:"LineMdLoadingTwotoneLoop"},vt={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24"};function kt(e,t,n,o,i,l){return r.openBlock(),r.createElementBlock("svg",vt,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 $t=O(xt,[["render",kt]]),Ct={name:"RiCloseLine"},wt={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24"};function Et(e,t,n,o,i,l){return r.openBlock(),r.createElementBlock("svg",wt,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 Nt=O(Ct,[["render",Et]]),It=r.defineComponent({__name:"TabItem",props:{label:{type:[String,Function]},icon:{type:Function},closable:{type:[Boolean,Function]},disabled:{type:[Boolean,Function]},loading:{type:[Boolean,Function]},loadingIcon:{type:Function},onClick:{type:Function},onContextMenu:{type:Function},onClose:{type:Function},class:{},style:{},activeIndex:{default:0},itemIndex:{},itemKey:{}},emits:["itemClick","itemContextmenu","itemClose"],setup(e,{emit:t}){const n=t,o=r.computed(()=>e.activeIndex!==e.itemIndex&&e.activeIndex-1!==e.itemIndex),i=r.computed(()=>e.activeIndex===e.itemIndex),l=r.computed(()=>typeof e.label=="string"?r.h("span",{class:`${k}__label`},e.label):e.label(e.itemKey,e.itemIndex)),s=r.computed(()=>e.loadingIcon?.(e.itemKey,e.itemIndex)??r.h($t));function a(u){u.stopPropagation(),n("itemClick",u),e.onClick?.(e.itemKey,e.itemIndex,u)}function m(u){n("itemContextmenu",u),e.onContextMenu?.(e.itemKey,e.itemIndex,u)}function f(u){n("itemClose"),e.onClose?.(e.itemKey,e.itemIndex,u)}return(u,d)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass([r.unref(k),{[`${r.unref(k)}--active`]:i.value,[`${r.unref(k)}--disabled`]:typeof u.disabled=="function"?u.disabled(u.itemKey,u.itemIndex):u.disabled}]),onClick:a,onContextmenu:m},[r.createElementVNode("div",{class:r.normalizeClass([`${r.unref(k)}__content`])},[r.createElementVNode("div",{class:r.normalizeClass([`${r.unref(k)}__icon`])},[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(typeof u.loading=="function"?u.loading(u.itemKey,u.itemIndex):u.loading?s.value:u.icon?.(u.itemKey,u.itemIndex)??void 0)))],2),r.createElementVNode("div",{class:r.normalizeClass([`${r.unref(k)}__slot`])},[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(l.value)))],2),(typeof u.closable=="function"?u.closable(u.itemKey,u.itemIndex):u.closable)?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass([`${r.unref(k)}__close`]),onClick:r.withModifiers(f,["stop"])},[r.createVNode(Nt)],2)):r.createCommentVNode("",!0)],2),r.createElementVNode("div",{class:r.normalizeClass([`${r.unref(k)}__background`])},[d[0]||(d[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(k)}__block`])},null,2),d[1]||(d[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(k)}__line`,o.value?`${r.unref(k)}__line--show`:""])},null,2)],34))}}),Bt=r.defineComponent({__name:"Tabs",props:{value:{},colors:{},dropdown:{type:Boolean},addable:{type:Boolean},options:{},loadingValue:{},contentClass:{},contentStyle:{}},emits:["update:value","click","contextmenu","close","add"],setup(e,{emit:t}){const n=t;Oe("n-chrome-tabs",ut());const{background:o="#F1F1F1",active:i="#fff",primary:l="rgba(0,0,0,.1)"}=e.colors??{},s=r.computed(()=>e.value?e.options?.findIndex(h=>h.key===e.value):0),{scrollRef:a,scrollToView:m}=et({activeClassName:`.${k}--active`,direction:"horizontal"});r.watch(()=>e.value,()=>{m()},{immediate:!0});const f=r.computed(()=>w(o).darken(.9).toHex()),u=r.computed(()=>w(i).darken(.8).toHex()),d=r.computed(()=>w(l).darken(.3).toHex());function g(h,b){n("update:value",h),n("click",h,b)}function E(h,b){n("contextmenu",h,b)}function c(h,b){n("close",h,b)}return(h,b)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass([r.unref(R)]),style:r.normalizeStyle({"--background-color":`${r.unref(o)}`,"--background-color-dark":`${f.value}`,"--active-background-color":`${r.unref(i)}`,"--active-background-color-dark":`${u.value}`,"--primary-color":`${r.unref(l)}`,"--primary-color-dark":`${d.value}`})},[h.dropdown?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass([`${r.unref(R)}__icon`])},[r.createVNode(yt)],2)):r.createCommentVNode("",!0),r.renderSlot(h.$slots,"prefix"),r.createElementVNode("div",{ref_key:"scrollRef",ref:a,class:r.normalizeClass([`${r.unref(R)}__content`,h.contentClass]),style:r.normalizeStyle(h.contentStyle)},[r.createVNode(r.TransitionGroup,{name:"group",tag:"div",class:r.normalizeClass([`${r.unref(R)}__scroll`])},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(h.options,({key:p,...$},I)=>(r.openBlock(),r.createBlock(It,r.mergeProps({key:p,loading:h.loadingValue===p},{ref_for:!0},$,{"item-key":p,"item-index":I,"active-index":s.value,onItemClick:V=>g(p,I),onItemContextmenu:V=>E(p,I),onItemClose:V=>c(p,I)}),null,16,["loading","item-key","item-index","active-index","onItemClick","onItemContextmenu","onItemClose"]))),128))]),_:1},8,["class"])],6),r.renderSlot(h.$slots,"suffix"),h.addable?(r.openBlock(),r.createElementBlock("div",{key:1,class:r.normalizeClass([`${r.unref(R)}__icon`]),onClick:b[0]||(b[0]=p=>n("add"))},[r.createVNode(ht)],2)):r.createCommentVNode("",!0)],6))}});B.CTabs=Bt,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(Le(e,t)))}const Te=typeof document<"u";function Pe(){if(Te)return;const e=r.inject(Re,null);if(e!==null)return{adapter:(t,n)=>je(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()})}function _(e){return r.getCurrentScope()?(r.onScopeDispose(e),!0):!1}const De=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Fe=Object.prototype.toString,He=e=>Fe.call(e)==="[object Object]",ee=()=>{};function We(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 Ke(e,t={}){let n,o,i=ee;const l=m=>{clearTimeout(m),i(),i=ee};let s;return m=>{const f=r.toValue(e),u=r.toValue(t.maxWait);return n&&l(n),f<=0||u!==void 0&&u<=0?(o&&(l(o),o=void 0),Promise.resolve(m())):new Promise((d,g)=>{i=t.rejectOnCancel?g:d,s=m,u&&!o&&(o=setTimeout(()=>{n&&l(n),o=void 0,d(s())},u)),n=setTimeout(()=>{o&&l(o),o=void 0,d(m())},f)})}}function j(e){return Array.isArray(e)?e:[e]}function qe(e){return r.getCurrentInstance()}function Ge(e,t=200,n={}){return We(Ke(t,n),e)}function Ze(e,t=!0,n){qe()?r.onMounted(e,n):t?e():r.nextTick(e)}function Ue(e,t,n){return r.watch(e,t,{...n,immediate:!0})}const H=De?window:void 0;function S(e){var t;const n=r.toValue(e);return(t=n?.$el)!=null?t:n}function Ye(...e){const t=[],n=()=>{t.forEach(a=>a()),t.length=0},o=(a,m,f,u)=>(a.addEventListener(m,f,u),()=>a.removeEventListener(m,f,u)),i=r.computed(()=>{const a=j(r.toValue(e[0])).filter(m=>m!=null);return a.every(m=>typeof m!="string")?a:void 0}),l=Ue(()=>{var a,m;return[(m=(a=i.value)==null?void 0:a.map(f=>S(f)))!=null?m:[H].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,m,f,u])=>{if(n(),!a?.length||!m?.length||!f?.length)return;const d=He(u)?{...u}:u;t.push(...a.flatMap(g=>m.flatMap(E=>f.map(c=>o(g,E,c,d)))))},{flush:"post"}),s=()=>{l(),n()};return _(n),s}function Je(){const e=r.shallowRef(!1),t=r.getCurrentInstance();return t&&r.onMounted(()=>{e.value=!0},t),e}function Qe(e){const t=Je();return r.computed(()=>(t.value,!!e()))}function Xe(e,t,n={}){const{window:o=H,...i}=n;let l;const s=Qe(()=>o&&"ResizeObserver"in o),a=()=>{l&&(l.disconnect(),l=void 0)},m=r.computed(()=>{const d=r.toValue(e);return Array.isArray(d)?d.map(g=>S(g)):[S(d)]}),f=r.watch(m,d=>{if(a(),s.value&&o){l=new ResizeObserver(t);for(const g of d)g&&l.observe(g,i)}},{immediate:!0,flush:"post"}),u=()=>{a(),f()};return _(u),{isSupported:s,stop:u}}function _e(e,t={width:0,height:0},n={}){const{window:o=H,box:i="content-box"}=n,l=r.computed(()=>{var d,g;return(g=(d=S(e))==null?void 0:d.namespaceURI)==null?void 0:g.includes("svg")}),s=r.shallowRef(t.width),a=r.shallowRef(t.height),{stop:m}=Xe(e,([d])=>{const g=i==="border-box"?d.borderBoxSize:i==="content-box"?d.contentBoxSize:d.devicePixelContentBoxSize;if(o&&l.value){const E=S(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:h})=>c+h,0),a.value=E.reduce((c,{blockSize:h})=>c+h,0)}else s.value=d.contentRect.width,a.value=d.contentRect.height},n);Ze(()=>{const d=S(e);d&&(s.value="offsetWidth"in d?d.offsetWidth:t.width,a.value="offsetHeight"in d?d.offsetHeight:t.height)});const f=r.watch(()=>S(e),d=>{s.value=d?t.width:0,a.value=d?t.height:0});function u(){m(),f()}return{width:s,height:a,stop:u}}function et(e){const{activeClassName:t=".active",enableWheel:n=!0,direction:o="vertical"}=e??{},i=r.ref(),{width:l,height:s}=_e(i);async function a(u){await r.nextTick();const d=i.value?.querySelector(t);d&&d.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest",...u})}function m(u){if(!n)return;u.preventDefault();const{deltaY:d}=u;switch(o){case"vertical":i.value?.scrollBy({top:d>0?s.value:-s.value,behavior:"smooth"});break;case"horizontal":i.value?.scrollBy({left:d>0?l.value:-l.value,behavior:"smooth"});break}}Ye(i,"wheel",m);const f=Ge(a,500);return r.watch([l,s],()=>{f()}),{scrollRef:i,scrollToView:a}}var tt={grad:.9,turn:360,rad:360/(2*Math.PI)},N=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},v=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},te=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},ne=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)}},W=function(e){return{r:v(e.r),g:v(e.g),b:v(e.b),a:v(e.a,3)}},nt=/^#([0-9a-f]{3,8})$/i,T=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},oe=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}},re=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),m=o*(1-(1-t+l)*n),f=l%6;return{r:255*[o,a,s,s,m,o][f],g:255*[m,o,o,a,s,s][f],b:255*[s,s,m,o,o,a][f],a:i}},ie=function(e){return{h:te(e.h),s:C(e.s,0,100),l:C(e.l,0,100),a:C(e.a)}},le=function(e){return{h:v(e.h),s:v(e.s),l:v(e.l),a:v(e.a,3)}},se=function(e){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}));var t,n,o},M=function(e){return{h:(t=oe(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},ot=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,rt=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,it=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,lt=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,ae={string:[[function(e){var t=nt.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?v(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?v(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=it.exec(e)||lt.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:ne({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=ot.exec(e)||rt.exec(e);if(!t)return null;var n,o,i=ie({h:(n=t[1],o=t[2],o===void 0&&(o="deg"),Number(n)*(tt[o]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return se(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)?ne({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=ie({h:Number(t),s:Number(n),l:Number(o),a:Number(l)});return se(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:te(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 re(s)},"hsv"]]},ce=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]},st=function(e){return typeof e=="string"?ce(e.trim(),ae.string):typeof e=="object"&&e!==null?ce(e,ae.object):[null,void 0]},K=function(e,t){var n=M(e);return{h:n.h,s:C(n.s+100*t,0,100),l:n.l,a:n.a}},q=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},ue=function(e,t){var n=M(e);return{h:n.h,s:n.s,l:C(n.l+100*t,0,100),a:n.a}},de=(function(){function e(t){this.parsed=st(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 v(q(this.rgba),2)},e.prototype.isDark=function(){return q(this.rgba)<.5},e.prototype.isLight=function(){return q(this.rgba)>=.5},e.prototype.toHex=function(){return t=W(this.rgba),n=t.r,o=t.g,i=t.b,s=(l=t.a)<1?T(v(255*l)):"","#"+T(n)+T(o)+T(i)+s;var t,n,o,i,l,s},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 le(M(this.rgba))},e.prototype.toHslString=function(){return t=le(M(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=oe(this.rgba),{h:v(t.h),s:v(t.s),v:v(t.v),a:v(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(K(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),w(K(this.rgba,-t))},e.prototype.grayscale=function(){return w(K(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),w(ue(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),w(ue(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}):v(this.rgba.a,3);var n},e.prototype.hue=function(t){var n=M(this.rgba);return typeof t=="number"?w({h:t,s:n.s,l:n.l,a:n.a}):v(n.h)},e.prototype.isEqual=function(t){return this.toHex()===w(t).toHex()},e})(),w=function(e){return e instanceof de?e:new de(e)};const{cssr:at,plugin:ct,namespace:fe}=Ae(),{c:y,cB:P,cE:x,cM:G,cNotM:me}={...at,...ct},A=`${fe}-chrome-tabs`,k=`${fe}-chrome-tabs-item`,z="all .2s cubic-bezier(.4, 0, .2, 1)";function ut(){return y([P("chrome-tabs",{display:"flex",width:"100%",height:"40px",padding:"0 10px",alignItems:"center",backgroundColor:"var(--background-color)",color:"var(--background-color-dark)"},[y("div",{boxSizing:"border-box"}),y(".group-move, .group-enter-active, .group-leave-active",{transition:z}),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:z},[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",{})]),P("chrome-tabs-item",{position:"relative",margin:"0 -5px",height:"100%",flexShrink:0,cursor:"default",userSelect:"none",padding:"6px 15px 0px 15px"},[G("disabled",{cursor:"not-allowed",pointerEvents:"none",opacity:.5,filter:"grayscale(0.5)"}),G("active",[x("background",{opacity:1})]),me("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:z}),x("slot",{}),x("icon",{lineHeight:1},[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:z},[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:z},[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:z,backgroundColor:"var(--primary-color)",opacity:0},[G("show",{opacity:1})])]),y(".dark",[P("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)"})])]),P("chrome-tabs-item",{},[me("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 O=(e,t)=>{const n=e.__vccOpts||e;for(const[o,i]of t)n[o]=i;return n},dt={name:"RiAddLine"},ft={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24"};function mt(e,t,n,o,i,l){return r.openBlock(),r.createElementBlock("svg",ft,[...t[0]||(t[0]=[r.createElementVNode("path",{fill:"#757575",d:"M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"},null,-1)])])}const ht=O(dt,[["render",mt]]),pt={name:"RiArrowDropDownLine"},bt={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24"};function gt(e,t,n,o,i,l){return r.openBlock(),r.createElementBlock("svg",bt,[...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 yt=O(pt,[["render",gt]]),xt={name:"LineMdLoadingTwotoneLoop"},vt={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24"};function kt(e,t,n,o,i,l){return r.openBlock(),r.createElementBlock("svg",vt,[...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 $t=O(xt,[["render",kt]]),Ct={name:"RiCloseLine"},wt={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24"};function Et(e,t,n,o,i,l){return r.openBlock(),r.createElementBlock("svg",wt,[...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 Nt=O(Ct,[["render",Et]]),It=r.defineComponent({__name:"TabItem",props:{label:{type:[String,Function]},icon:{type:Function},closable:{type:[Boolean,Function]},disabled:{type:[Boolean,Function]},loading:{type:[Boolean,Function]},loadingIcon:{type:Function},onClick:{type:Function},onContextMenu:{type:Function},onClose:{type:Function},class:{},style:{},activeIndex:{default:0},itemIndex:{},itemKey:{},iconSize:{default:20}},emits:["itemClick","itemContextmenu","itemClose"],setup(e,{emit:t}){const n=t,o=r.computed(()=>e.activeIndex!==e.itemIndex&&e.activeIndex-1!==e.itemIndex),i=r.computed(()=>e.activeIndex===e.itemIndex),l=r.computed(()=>typeof e.label=="string"?r.h("span",{class:`${k}__label`},e.label):e.label(e.itemKey,e.itemIndex)),s=r.computed(()=>e.loadingIcon?.(e.itemKey,e.itemIndex)??r.h($t));function a(u){u.stopPropagation(),n("itemClick",u),e.onClick?.(e.itemKey,e.itemIndex,u)}function m(u){n("itemContextmenu",u),e.onContextMenu?.(e.itemKey,e.itemIndex,u)}function f(u){n("itemClose"),e.onClose?.(e.itemKey,e.itemIndex,u)}return(u,d)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass([r.unref(k),{[`${r.unref(k)}--active`]:i.value,[`${r.unref(k)}--disabled`]:typeof u.disabled=="function"?u.disabled(u.itemKey,u.itemIndex):u.disabled}]),onClick:a,onContextmenu:m},[r.createElementVNode("div",{class:r.normalizeClass([`${r.unref(k)}__content`])},[r.createElementVNode("div",{class:r.normalizeClass([`${r.unref(k)}__icon`]),style:r.normalizeStyle({fontSize:`${u.iconSize}px`})},[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(typeof u.loading=="function"?u.loading(u.itemKey,u.itemIndex):u.loading?s.value:u.icon?.(u.itemKey,u.itemIndex)??void 0)))],6),r.createElementVNode("div",{class:r.normalizeClass([`${r.unref(k)}__slot`])},[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(l.value)))],2),(typeof u.closable=="function"?u.closable(u.itemKey,u.itemIndex):u.closable)?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass([`${r.unref(k)}__close`]),onClick:r.withModifiers(f,["stop"])},[r.createVNode(Nt)],2)):r.createCommentVNode("",!0)],2),r.createElementVNode("div",{class:r.normalizeClass([`${r.unref(k)}__background`])},[d[0]||(d[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(k)}__block`])},null,2),d[1]||(d[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(k)}__line`,o.value?`${r.unref(k)}__line--show`:""])},null,2)],34))}}),Bt=r.defineComponent({__name:"Tabs",props:{value:{},colors:{},dropdown:{type:Boolean},addable:{type:Boolean},options:{},loadingValue:{},iconSize:{},contentClass:{},contentStyle:{}},emits:["update:value","click","contextmenu","close","add"],setup(e,{emit:t}){const n=t;Oe("n-chrome-tabs",ut());const{background:o="#F1F1F1",active:i="#fff",primary:l="rgba(0,0,0,.1)"}=e.colors??{},s=r.computed(()=>e.value?e.options?.findIndex(h=>h.key===e.value):0),{scrollRef:a,scrollToView:m}=et({activeClassName:`.${k}--active`,direction:"horizontal"});r.watch(()=>e.value,()=>{m()},{immediate:!0});const f=r.computed(()=>w(o).darken(.9).toHex()),u=r.computed(()=>w(i).darken(.8).toHex()),d=r.computed(()=>w(l).darken(.3).toHex());function g(h,b){n("update:value",h),n("click",h,b)}function E(h,b){n("contextmenu",h,b)}function c(h,b){n("close",h,b)}return(h,b)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass([r.unref(A)]),style:r.normalizeStyle({"--background-color":`${r.unref(o)}`,"--background-color-dark":`${f.value}`,"--active-background-color":`${r.unref(i)}`,"--active-background-color-dark":`${u.value}`,"--primary-color":`${r.unref(l)}`,"--primary-color-dark":`${d.value}`})},[h.dropdown?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass([`${r.unref(A)}__icon`])},[r.createVNode(yt)],2)):r.createCommentVNode("",!0),r.renderSlot(h.$slots,"prefix"),r.createElementVNode("div",{ref_key:"scrollRef",ref:a,class:r.normalizeClass([`${r.unref(A)}__content`,h.contentClass]),style:r.normalizeStyle(h.contentStyle)},[r.createVNode(r.TransitionGroup,{name:"group",tag:"div",class:r.normalizeClass([`${r.unref(A)}__scroll`])},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(h.options,({key:p,...$},I)=>(r.openBlock(),r.createBlock(It,r.mergeProps({key:p,loading:h.loadingValue===p},{ref_for:!0},$,{"item-key":p,"item-index":I,"active-index":s.value,"icon-size":h.iconSize,onItemClick:V=>g(p,I),onItemContextmenu:V=>E(p,I),onItemClose:V=>c(p,I)}),null,16,["loading","item-key","item-index","active-index","icon-size","onItemClick","onItemContextmenu","onItemClose"]))),128))]),_:1},8,["class"])],6),r.renderSlot(h.$slots,"suffix"),h.addable?(r.openBlock(),r.createElementBlock("div",{key:1,class:r.normalizeClass([`${r.unref(A)}__icon`]),onClick:b[0]||(b[0]=p=>n("add"))},[r.createVNode(ht)],2)):r.createCommentVNode("",!0)],6))}});B.CTabs=Bt,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.7",
4
+ "version": "0.0.9",
5
5
  "description": "A Vue Component Likes Chrome Tabs Style.",
6
6
  "author": "oiij",
7
7
  "license": "MIT",
@@ -34,15 +34,15 @@
34
34
  ],
35
35
  "peerDependencies": {
36
36
  "colord": "^2.9.3",
37
- "vue": "^3.5.18",
38
- "@oiij/css-render": "0.0.3",
39
- "@oiij/use": "0.0.22"
37
+ "vue": "^3.5.21",
38
+ "@oiij/css-render": "0.0.4",
39
+ "@oiij/use": "0.0.23"
40
40
  },
41
41
  "devDependencies": {
42
42
  "colord": "^2.9.3",
43
- "vue": "^3.5.18",
44
- "@oiij/use": "0.0.22",
45
- "@oiij/css-render": "0.0.3"
43
+ "vue": "^3.5.21",
44
+ "@oiij/css-render": "0.0.4",
45
+ "@oiij/use": "0.0.23"
46
46
  },
47
47
  "publishConfig": {
48
48
  "access": "public"