@nubisco/openbridge 1.5.2 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/__tests__/notifications.test.d.ts +2 -0
- package/dist/__tests__/notifications.test.d.ts.map +1 -0
- package/dist/__tests__/notifications.test.js +237 -0
- package/dist/__tests__/notifications.test.js.map +1 -0
- package/dist/__tests__/updater.test.js +15 -1
- package/dist/__tests__/updater.test.js.map +1 -1
- package/dist/daemon.d.ts +2 -0
- package/dist/daemon.d.ts.map +1 -1
- package/dist/daemon.js +49 -1
- package/dist/daemon.js.map +1 -1
- package/dist/notification-routes.d.ts +21 -0
- package/dist/notification-routes.d.ts.map +1 -0
- package/dist/notification-routes.js +37 -0
- package/dist/notification-routes.js.map +1 -0
- package/dist/notifications.d.ts +157 -0
- package/dist/notifications.d.ts.map +1 -0
- package/dist/notifications.js +364 -0
- package/dist/notifications.js.map +1 -0
- package/dist/server.d.ts +4 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +27 -1
- package/dist/server.js.map +1 -1
- package/dist/updater.d.ts +3 -1
- package/dist/updater.d.ts.map +1 -1
- package/dist/updater.js +17 -0
- package/dist/updater.js.map +1 -1
- package/package.json +5 -5
- package/ui-dist/assets/index-CobsrVaQ.css +32 -0
- package/ui-dist/assets/index-HkwdcyTW.js +109 -0
- package/ui-dist/index.html +2 -2
- package/ui-dist/assets/index-9bWNU3bq.css +0 -32
- package/ui-dist/assets/index-DIyesg4J.js +0 -109
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))n(r);new MutationObserver(r=>{for(const s of r)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&n(a)}).observe(document,{childList:!0,subtree:!0});function i(r){const s={};return r.integrity&&(s.integrity=r.integrity),r.referrerPolicy&&(s.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?s.credentials="include":r.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function n(r){if(r.ep)return;r.ep=!0;const s=i(r);fetch(r.href,s)}})();/**
|
|
2
|
-
* @vue/shared v3.5.44
|
|
3
|
-
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
|
-
* @license MIT
|
|
5
|
-
**/function bh(e){const t=Object.create(null);for(const i of e.split(","))t[i]=1;return i=>i in t}const lt={},os=[],Nn=()=>{},J_=()=>!1,Bc=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Fc=e=>e.startsWith("onUpdate:"),Ft=Object.assign,yh=(e,t)=>{const i=e.indexOf(t);i>-1&&e.splice(i,1)},s5=Object.prototype.hasOwnProperty,ct=(e,t)=>s5.call(e,t),Ze=Array.isArray,Hr=e=>Uo(e)==="[object Map]",ur=e=>Uo(e)==="[object Set]",U2=e=>Uo(e)==="[object Date]",je=e=>typeof e=="function",St=e=>typeof e=="string",ji=e=>typeof e=="symbol",ut=e=>e!==null&&typeof e=="object",Q_=e=>(ut(e)||je(e))&&je(e.then)&&je(e.catch),em=Object.prototype.toString,Uo=e=>em.call(e),a5=e=>Uo(e).slice(8,-1),tm=e=>Uo(e)==="[object Object]",zc=e=>St(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,io=bh(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Uc=e=>{const t=Object.create(null);return i=>t[i]||(t[i]=e(i))},l5=/-\w/g,wi=Uc(e=>e.replace(l5,t=>t.slice(1).toUpperCase())),o5=/\B([A-Z])/g,hr=Uc(e=>e.replace(o5,"-$1").toLowerCase()),Wc=Uc(e=>e.charAt(0).toUpperCase()+e.slice(1)),$1=Uc(e=>e?`on${Wc(e)}`:""),hi=(e,t)=>!Object.is(e,t),Z0=(e,...t)=>{for(let i=0;i<e.length;i++)e[i](...t)},im=(e,t,i,n=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:n,value:i})},jc=e=>{const t=parseFloat(e);return isNaN(t)?e:t},c5=e=>{const t=St(e)?Number(e):NaN;return isNaN(t)?e:t};let W2;const Kc=()=>W2||(W2=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function mi(e){if(Ze(e)){const t={};for(let i=0;i<e.length;i++){const n=e[i],r=St(n)?f5(n):mi(n);if(r)for(const s in r)t[s]=r[s]}return t}else if(St(e)||ut(e))return e}const u5=/;(?![^(]*\))/g,d5=/:([^]+)/,h5=/"(?:[^"\\]|\\[^])*"|'(?:[^'\\]|\\[^])*'|\\[^]|\/\*[^]*?\*\//g;function f5(e){const t={};return e.replace(h5,i=>i.startsWith("/*")?"":i).split(u5).forEach(i=>{if(i){const n=i.split(d5);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function Le(e){let t="";if(St(e))t=e;else if(Ze(e))for(let i=0;i<e.length;i++){const n=Le(e[i]);n&&(t+=n+" ")}else if(ut(e))for(const i in e)e[i]&&(t+=i+" ");return t.trim()}function p5(e){if(!e)return null;let{class:t,style:i}=e;return t&&!St(t)&&(e.class=Le(t)),i&&(e.style=mi(i)),e}const _5="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,playsinline,readonly",m5=bh(_5);function nm(e){return!!e||e===""}function v5(e,t,i){if(e.length!==t.length)return!1;let n=!0;for(let r=0;n&&r<e.length;r++)n=_n(e[r],t[r],i);return n}function j2(e,t,i){if(e.size!==t.size)return!1;const n=Array.from(t),r=new Uint8Array(n.length);for(const s of e){let a=-1;for(let l=0;l<n.length;l++)if(!r[l]&&_n(s,n[l],i)){a=l;break}if(a<0)return!1;r[a]=1}return!0}function g5(e,t,i){let n=Hr(e),r=Hr(t);if(n||r||(n=ur(e),r=ur(t),n||r))return n&&r?j2(e,t,i):!1;const s=Object.keys(e).length,a=Object.keys(t).length;if(s!==a)return!1;for(const l in e){const o=e.hasOwnProperty(l),c=t.hasOwnProperty(l);if(o&&!c||!o&&c||!_n(e[l],t[l],i))return!1}return String(e)===String(t)}function K2(e,t,i,n){i||(i=[new Map,new Map]);const[r,s]=i;if(r.has(e)||s.has(t))return r.get(e)===t&&s.get(t)===e;r.set(e,t),s.set(t,e);const a=n(e,t,i);return r.delete(e),s.delete(t),a}function _n(e,t,i){if(e===t)return!0;let n=U2(e),r=U2(t);return n||r?n&&r?e.getTime()===t.getTime():!1:(n=ji(e),r=ji(t),n||r?e===t:(n=Ze(e),r=Ze(t),n||r?n&&r?K2(e,t,i,v5):!1:(n=ut(e),r=ut(t),n||r?!n||!r?!1:K2(e,t,i,g5):String(e)===String(t))))}function wh(e,t){return e.findIndex(i=>_n(i,t))}const rm=e=>!!(e&&e.__v_isRef===!0),Z=e=>St(e)?e:e==null?"":Ze(e)||ut(e)&&(e.toString===em||!je(e.toString))?rm(e)?Z(e.value):JSON.stringify(e,sm,2):String(e),sm=(e,t)=>rm(t)?sm(e,t.value):Hr(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((i,[n,r],s)=>(i[L1(n,s)+" =>"]=r,i),{})}:ur(t)?{[`Set(${t.size})`]:[...t.values()].map(i=>L1(i))}:ji(t)?L1(t):ut(t)&&!Ze(t)&&!tm(t)?String(t):t,L1=(e,t="")=>{var i;return ji(e)?`Symbol(${(i=e.description)!=null?i:t})`:e};/**
|
|
6
|
-
* @vue/reactivity v3.5.44
|
|
7
|
-
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
8
|
-
* @license MIT
|
|
9
|
-
**/let Qt;class am{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&Qt&&(Qt.active?(this.parent=Qt,this.index=(Qt.scopes||(Qt.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,i;if(this.scopes){const n=this.scopes.slice();for(t=0,i=n.length;t<i;t++)n[t].pause()}for(t=0,i=this.effects.length;t<i;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,i;if(this.scopes){const r=this.scopes.slice();for(t=0,i=r.length;t<i;t++)r[t].resume()}const n=this.effects.slice();for(t=0,i=n.length;t<i;t++)n[t].resume()}}run(t){if(this._active){const i=Qt;try{return Qt=this,t()}finally{Qt=i}}}on(){++this._on===1&&(this.prevScope=Qt,Qt=this)}off(){if(this._on>0&&--this._on===0){if(Qt===this)Qt=this.prevScope;else{let t=Qt;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let i,n;for(i=0,n=this.effects.length;i<n;i++)this.effects[i].stop();for(this.effects.length=0,i=0,n=this.cleanups.length;i<n;i++)this.cleanups[i]();if(this.cleanups.length=0,this.scopes){const r=this.scopes.slice();for(i=0,n=r.length;i<n;i++)r[i].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const r=this.parent.scopes.pop();r&&r!==this&&(this.parent.scopes[this.index]=r,r.index=this.index)}this.parent=void 0}}}function Sh(e){return new am(e)}function lm(){return Qt}function tc(e,t=!1){Qt&&Qt.cleanups.push(e)}let wt;const E1=new WeakSet;class om{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Qt&&(Qt.active?Qt.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,E1.has(this)&&(E1.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||um(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,q2(this),dm(this);const t=wt,i=pn;wt=this,pn=!0;try{return this.fn()}finally{hm(this),wt=t,pn=i,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)Ah(t);this.deps=this.depsTail=void 0,q2(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?E1.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Au(this)&&this.run()}get dirty(){return Au(this)}}let cm=0,no,ro;function um(e,t=!1){if(e.flags|=8,t){e.next=ro,ro=e;return}e.next=no,no=e}function Ch(){cm++}function kh(){if(--cm>0)return;if(ro){let t=ro;for(ro=void 0;t;){const i=t.next;t.next=void 0,t.flags&=-9,t=i}}let e;for(;no;){let t=no;for(no=void 0;t;){const i=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(n){e||(e=n)}t=i}}if(e)throw e}function dm(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function hm(e){let t,i=e.depsTail,n=i;for(;n;){const r=n.prevDep;n.version===-1?(n===i&&(i=r),Ah(n),b5(n)):t=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=r}e.deps=t,e.depsTail=i}function Au(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(fm(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function fm(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===vo)||(e.globalVersion=vo,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Au(e))))return;e.flags|=2;const t=e.dep,i=wt,n=pn;wt=e,pn=!0;try{dm(e);const r=e.fn(e._value);(t.version===0||hi(r,e._value))&&(e.flags|=128,e._value=r,t.version++)}catch(r){throw t.version++,r}finally{wt=i,pn=n,hm(e),e.flags&=-3}}function Ah(e,t=!1){const{dep:i,prevSub:n,nextSub:r}=e;if(n&&(n.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=n,e.nextSub=void 0),i.subs===e&&(i.subs=n,!n&&i.computed)){i.computed.flags&=-5;for(let s=i.computed.deps;s;s=s.nextDep)Ah(s,!0)}!t&&!--i.sc&&i.map&&i.map.delete(i.key)}function b5(e){const{prevDep:t,nextDep:i}=e;t&&(t.nextDep=i,e.prevDep=void 0),i&&(i.prevDep=t,e.nextDep=void 0)}let pn=!0;const pm=[];function Zn(){pm.push(pn),pn=!1}function Bn(){const e=pm.pop();pn=e===void 0?!0:e}function q2(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const i=wt;wt=void 0;try{t()}finally{wt=i}}}let vo=0;class y5{constructor(t,i){this.sub=t,this.dep=i,this.version=i.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class qc{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!wt||!pn||wt===this.computed)return;let i=this.activeLink;if(i===void 0||i.sub!==wt)i=this.activeLink=new y5(wt,this),wt.deps?(i.prevDep=wt.depsTail,wt.depsTail.nextDep=i,wt.depsTail=i):wt.deps=wt.depsTail=i,_m(i);else if(i.version===-1&&(i.version=this.version,i.nextDep)){const n=i.nextDep;n.prevDep=i.prevDep,i.prevDep&&(i.prevDep.nextDep=n),i.prevDep=wt.depsTail,i.nextDep=void 0,wt.depsTail.nextDep=i,wt.depsTail=i,wt.deps===i&&(wt.deps=n)}return i}trigger(t){this.version++,vo++,this.notify(t)}notify(t){Ch();try{for(let i=this.subs;i;i=i.prevSub)i.sub.notify()&&i.sub.dep.notify()}finally{kh()}}}function _m(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let n=t.deps;n;n=n.nextDep)_m(n)}const i=e.dep.subs;i!==e&&(e.prevSub=i,i&&(i.nextSub=e)),e.dep.subs=e}}const ic=new WeakMap,fs=Symbol(""),Mu=Symbol(""),go=Symbol("");function bi(e,t,i){if(pn&&wt){let n=ic.get(e);n||ic.set(e,n=new Map);let r=n.get(i);r||(n.set(i,r=new qc),r.map=n,r.key=i),r.track()}}function tr(e,t,i,n,r,s){const a=ic.get(e);if(!a){vo++;return}const l=o=>{o&&o.trigger()};if(Ch(),t==="clear")a.forEach(l);else{const o=Ze(e),c=o&&zc(i);if(o&&i==="length"){const u=Number(n);a.forEach((d,h)=>{(h==="length"||h===go||!ji(h)&&h>=u)&&l(d)})}else switch((i!==void 0||a.has(void 0))&&l(a.get(i)),c&&l(a.get(go)),t){case"add":o?c&&l(a.get("length")):(l(a.get(fs)),Hr(e)&&l(a.get(Mu)));break;case"delete":o||(l(a.get(fs)),Hr(e)&&l(a.get(Mu)));break;case"set":Hr(e)&&l(a.get(fs));break}}kh()}function w5(e,t){const i=ic.get(e);return i&&i.get(t)}function Ls(e){const t=st(e);return t===e||(bi(t,"iterate",go),Ui(e))?t:Fn(e)?Pn(e)?t.map(i=>Ir(on(i))):t.map(Ir):t.map(on)}function Gc(e){return bi(e=st(e),"iterate",go),e}function $n(e,t){return Fn(e)?Ir(Pn(e)?on(t):t):on(t)}const S5={__proto__:null,[Symbol.iterator](){return x1(this,Symbol.iterator,e=>$n(this,e))},concat(...e){return Ls(this).concat(...e.map(t=>Ze(t)?Ls(t):t))},entries(){return x1(this,"entries",e=>(e[1]=$n(this,e[1]),e))},every(e,t){return Kn(this,"every",e,t,void 0,arguments)},filter(e,t){return Kn(this,"filter",e,t,i=>i.map(n=>$n(this,n)),arguments)},find(e,t){return Kn(this,"find",e,t,i=>$n(this,i),arguments)},findIndex(e,t){return Kn(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Kn(this,"findLast",e,t,i=>$n(this,i),arguments)},findLastIndex(e,t){return Kn(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Kn(this,"forEach",e,t,void 0,arguments)},includes(...e){return H1(this,"includes",e)},indexOf(...e){return H1(this,"indexOf",e)},join(e){return Ls(this).join(e)},lastIndexOf(...e){return H1(this,"lastIndexOf",e)},map(e,t){return Kn(this,"map",e,t,void 0,arguments)},pop(){return Tl(this,"pop")},push(...e){return Tl(this,"push",e)},reduce(e,...t){return Y2(this,"reduce",e,t)},reduceRight(e,...t){return Y2(this,"reduceRight",e,t)},shift(){return Tl(this,"shift")},some(e,t){return Kn(this,"some",e,t,void 0,arguments)},splice(...e){return Tl(this,"splice",e)},toReversed(){return Ls(this).toReversed()},toSorted(e){return Ls(this).toSorted(e)},toSpliced(...e){return Ls(this).toSpliced(...e)},unshift(...e){return Tl(this,"unshift",e)},values(){return x1(this,"values",e=>$n(this,e))}};function x1(e,t,i){const n=Gc(e),r=n[t],s=r.call(n);if(n!==e&&!Ui(e)){if(s[Symbol.toStringTag]==="Array Iterator"){const a=Object.create(Object.getPrototypeOf(s));return a.next=()=>G2(s.next(),i),r!==mm[t]&&Object.defineProperties(a,{return:{get(){const l=s.return;return typeof l=="function"?l.bind(s):l}},throw:{get(){const l=s.throw;return typeof l=="function"?l.bind(s):l}}}),a}s._next=s.next,s.next=()=>G2(s._next(),i)}return s}function G2(e,t){return e.done||(e.value=t(e.value)),e}const mm=Array.prototype;function Kn(e,t,i,n,r,s){const a=Gc(e),l=a!==e&&!Ui(e),o=a[t];if(o!==mm[t]){const d=o.apply(e,s);return l?on(d):d}let c=i;a!==e&&(l?c=function(d,h){return i.call(this,$n(e,d),h,e)}:i.length>2&&(c=function(d,h){return i.call(this,d,h,e)}));const u=o.call(a,c,n);return l&&r?r(u):u}function Y2(e,t,i,n){const r=Gc(e),s=r!==e&&!Ui(e);let a=i,l=!1;r!==e&&(s?(l=n.length===0,a=function(c,u,d){return l&&(l=!1,c=$n(e,c)),i.call(this,c,$n(e,u),d,e)}):i.length>3&&(a=function(c,u,d){return i.call(this,c,u,d,e)}));const o=r[t](a,...n);return l?$n(e,o):o}function H1(e,t,i){const n=st(e);bi(n,"iterate",go);const r=n[t](...i);return(r===-1||r===!1)&&Yc(i[0])?(i[0]=st(i[0]),n[t](...i)):r}function Tl(e,t,i=[]){Zn(),Ch();const n=st(e)[t].apply(e,i);return kh(),Bn(),n}const C5=bh("__proto__,__v_isRef,__isVue"),vm=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(ji));function k5(e){ji(e)||(e=String(e));const t=st(this);return bi(t,"has",e),t.hasOwnProperty(e)}class gm{constructor(t=!1,i=!1){this._isReadonly=t,this._isShallow=i}get(t,i,n){if(i==="__v_skip")return t.__v_skip;const r=this._isReadonly,s=this._isShallow;if(i==="__v_isReactive")return!r;if(i==="__v_isReadonly")return r;if(i==="__v_isShallow")return s;if(i==="__v_raw")return n===(r?s?P5:Sm:s?wm:ym).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(n)?t:void 0;const a=Ze(t);if(!r){let o;if(a&&(o=S5[i]))return o;if(i==="hasOwnProperty")return k5}const l=Reflect.get(t,i,At(t)?t:n);if((ji(i)?vm.has(i):C5(i))||(r||bi(t,"get",i),s))return l;if(At(l)){const o=a&&zc(i)?l:l.value;return r&&ut(o)?Or(o):o}return ut(l)?r?Or(l):vs(l):l}}class bm extends gm{constructor(t=!1){super(!1,t)}set(t,i,n,r){let s=t[i];const a=Ze(t)&&zc(i);if(!this._isShallow){const c=Fn(s);if(!Ui(n)&&!Fn(n)&&(s=st(s),n=st(n)),!a&&At(s)&&!At(n))return c||(s.value=n),!0}const l=a?Number(i)<t.length:ct(t,i),o=Reflect.set(t,i,n,At(t)?t:r);return t===st(r)&&o&&(l?hi(n,s)&&tr(t,"set",i,n):tr(t,"add",i,n)),o}deleteProperty(t,i){const n=ct(t,i);t[i];const r=Reflect.deleteProperty(t,i);return r&&n&&tr(t,"delete",i,void 0),r}has(t,i){const n=Reflect.has(t,i);return(!ji(i)||!vm.has(i))&&bi(t,"has",i),n}ownKeys(t){return bi(t,"iterate",Ze(t)?"length":fs),Reflect.ownKeys(t)}}class A5 extends gm{constructor(t=!1){super(!0,t)}set(t,i){return!0}deleteProperty(t,i){return!0}}const M5=new bm,$5=new A5,L5=new bm(!0);const $u=e=>e,d0=e=>Reflect.getPrototypeOf(e);function E5(e,t,i){return function(...n){const r=this.__v_raw,s=st(r),a=Hr(s),l=e==="entries"||e===Symbol.iterator&&a,o=e==="keys"&&a,c=r[e](...n),u=i?$u:t?Ir:on;return!t&&bi(s,"iterate",o?Mu:fs),Ft(Object.create(c),{next(){const{value:d,done:h}=c.next();return h?{value:d,done:h}:{value:l?[u(d[0]),u(d[1])]:u(d),done:h}}})}}function h0(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function x5(e,t){const i={get(r){const s=this.__v_raw,a=st(s),l=st(r);e||(hi(r,l)&&bi(a,"get",r),bi(a,"get",l));const{has:o}=d0(a),c=t?$u:e?Ir:on;if(o.call(a,r))return c(s.get(r));if(o.call(a,l))return c(s.get(l));s!==a&&s.get(r)},get size(){const r=this.__v_raw;return!e&&bi(st(r),"iterate",fs),r.size},has(r){const s=this.__v_raw,a=st(s),l=st(r);return e||(hi(r,l)&&bi(a,"has",r),bi(a,"has",l)),r===l?s.has(r):s.has(r)||s.has(l)},forEach(r,s){const a=this,l=a.__v_raw,o=st(l),c=t?$u:e?Ir:on;return!e&&bi(o,"iterate",fs),l.forEach((u,d)=>r.call(s,c(u),c(d),a))}};return Ft(i,e?{add:h0("add"),set:h0("set"),delete:h0("delete"),clear:h0("clear")}:{add(r){const s=st(this),a=d0(s),l=st(r),o=!t&&!Ui(r)&&!Fn(r)?l:r;return a.has.call(s,o)||hi(r,o)&&a.has.call(s,r)||hi(l,o)&&a.has.call(s,l)||(s.add(o),tr(s,"add",o,o)),this},set(r,s){!t&&!Ui(s)&&!Fn(s)&&(s=st(s));const a=st(this),{has:l,get:o}=d0(a);let c=l.call(a,r);c||(r=st(r),c=l.call(a,r));const u=o.call(a,r);return a.set(r,s),c?hi(s,u)&&tr(a,"set",r,s):tr(a,"add",r,s),this},delete(r){const s=st(this),{has:a,get:l}=d0(s);let o=a.call(s,r);o||(r=st(r),o=a.call(s,r)),l&&l.call(s,r);const c=s.delete(r);return o&&tr(s,"delete",r,void 0),c},clear(){const r=st(this),s=r.size!==0,a=r.clear();return s&&tr(r,"clear",void 0,void 0),a}}),["keys","values","entries",Symbol.iterator].forEach(r=>{i[r]=E5(r,e,t)}),i}function Mh(e,t){const i=x5(e,t);return(n,r,s)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_isShallow"?t:r==="__v_raw"?n:Reflect.get(ct(i,r)&&r in n?i:n,r,s)}const H5={get:Mh(!1,!1)},T5={get:Mh(!1,!0)},N5={get:Mh(!0,!1)};const ym=new WeakMap,wm=new WeakMap,Sm=new WeakMap,P5=new WeakMap;function O5(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function vs(e){return Fn(e)?e:$h(e,!1,M5,H5,ym)}function Cm(e){return $h(e,!1,L5,T5,wm)}function Or(e){return $h(e,!0,$5,N5,Sm)}function $h(e,t,i,n,r){if(!ut(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const s=r.get(e);if(s)return s;const a=O5(a5(e));if(a===0)return e;const l=new Proxy(e,a===2?n:i);return r.set(e,l),l}function Pn(e){return Fn(e)?Pn(e.__v_raw):!!(e&&e.__v_isReactive)}function Fn(e){return!!(e&&e.__v_isReadonly)}function Ui(e){return!!(e&&e.__v_isShallow)}function Yc(e){return e?!!e.__v_raw:!1}function st(e){const t=e&&e.__v_raw;return t?st(t):e}function Lh(e){return!ct(e,"__v_skip")&&Object.isExtensible(e)&&im(e,"__v_skip",!0),e}const on=e=>ut(e)?vs(e):e,Ir=e=>ut(e)?Or(e):e;function At(e){return e?e.__v_isRef===!0:!1}function K(e){return km(e,!1)}function zn(e){return km(e,!0)}function km(e,t){return At(e)?e:new I5(e,t)}class I5{constructor(t,i){this.dep=new qc,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=i?t:st(t),this._value=i?t:on(t),this.__v_isShallow=i}get value(){return this.dep.track(),this._value}set value(t){const i=this._rawValue,n=this.__v_isShallow||Ui(t)||Fn(t);t=n?t:st(t),hi(t,i)&&(this._rawValue=t,this._value=n?t:on(t),this.dep.trigger())}}function de(e){return At(e)?e.value:e}function R5(e){return je(e)?e():de(e)}const V5={get:(e,t,i)=>t==="__v_raw"?e:de(Reflect.get(e,t,i)),set:(e,t,i,n)=>{const r=e[t];return At(r)&&!At(i)?(r.value=i,!0):Reflect.set(e,t,i,n)}};function Am(e){return Pn(e)?e:new Proxy(e,V5)}class D5{constructor(t){this.__v_isRef=!0,this._value=void 0;const i=this.dep=new qc,{get:n,set:r}=t(i.track.bind(i),i.trigger.bind(i));this._get=n,this._set=r}get value(){return this._value=this._get()}set value(t){this._set(t)}}function Z5(e){return new D5(e)}function B5(e){const t=Ze(e)?new Array(e.length):{};for(const i in e)t[i]=$m(e,i);return t}class F5{constructor(t,i,n){this._object=t,this._defaultValue=n,this.__v_isRef=!0,this._value=void 0,this._key=ji(i)?i:String(i),this._raw=st(t);let r=!0,s=t;if(!Ze(t)||ji(this._key)||!zc(this._key))do r=!Yc(s)||Ui(s);while(r&&(s=s.__v_raw));this._shallow=r}get value(){let t=this._object[this._key];return this._shallow&&(t=de(t)),this._value=t===void 0?this._defaultValue:t}set value(t){if(this._shallow&&At(this._raw[this._key])){const i=this._object[this._key];if(At(i)){i.value=t;return}}this._object[this._key]=t}get dep(){return w5(this._raw,this._key)}}class z5{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function Mm(e,t,i){return At(e)?e:je(e)?new z5(e):ut(e)&&arguments.length>1?$m(e,t,i):K(e)}function $m(e,t,i){return new F5(e,t,i)}class U5{constructor(t,i,n){this.fn=t,this.setter=i,this._value=void 0,this.dep=new qc(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=vo-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!i,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&wt!==this)return um(this,!0),!0}get value(){const t=this.dep.track();return fm(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function W5(e,t,i=!1){let n,r;return je(e)?n=e:(n=e.get,r=e.set),new U5(n,r,i)}const f0={},nc=new WeakMap;let is;function j5(e,t=!1,i=is){if(i){let n=nc.get(i);n||nc.set(i,n=[]),n.push(e)}}function K5(e,t,i=lt){const{immediate:n,deep:r,once:s,scheduler:a,augmentJob:l,call:o}=i,c=g=>r?g:Ui(g)||r===!1||r===0?ir(g,1):ir(g);let u,d,h,f,v=!1,p=!1;if(At(e)?(d=()=>e.value,v=Ui(e)):Pn(e)?(d=()=>c(e),v=!0):Ze(e)?(p=!0,v=e.some(g=>Pn(g)||Ui(g)),d=()=>e.map(g=>{if(At(g))return g.value;if(Pn(g))return c(g);if(je(g))return o?o(g,2):g()})):je(e)?t?d=o?()=>o(e,2):e:d=()=>{if(h){Zn();try{h()}finally{Bn()}}const g=is;is=u;try{return o?o(e,3,[f]):e(f)}finally{is=g}}:d=Nn,t&&r){const g=d,$=r===!0?1/0:r;d=()=>ir(g(),$)}const w=lm(),_=()=>{u.stop(),w&&w.active&&yh(w.effects,u)};if(s&&t){const g=t;t=(...$)=>{try{return g(...$)}finally{_()}}}let y=p?new Array(e.length).fill(f0):f0;const C=g=>{if(!(!(u.flags&1)||!u.dirty&&!g))if(t){const $=u.run();if(g||r||v||(p?$.some((E,L)=>hi(E,y[L])):hi($,y))){const E=is;Zn();try{h&&h(),is=u;const L=[$,y===f0?void 0:p&&y[0]===f0?[]:y,f];y=$,o?o(t,3,L):t(...L)}finally{is=E,Bn()}}}else u.run()};return l&&l(C),u=new om(d),u.scheduler=a?()=>a(C,!1):C,f=g=>j5(g,!1,u),h=u.onStop=()=>{const g=nc.get(u);if(g){if(o)o(g,4);else for(const $ of g)$();nc.delete(u)}},t?n?C(!0):y=u.run():a?a(C.bind(null,!0),!0):u.run(),_.pause=u.pause.bind(u),_.resume=u.resume.bind(u),_.stop=_,_}function ir(e,t=1/0,i){if(t<=0||!ut(e)||e.__v_skip||(i=i||new Map,(i.get(e)||0)>=t))return e;if(i.set(e,t),t--,At(e))ir(e.value,t,i);else if(Ze(e))for(let n=0;n<e.length;n++)ir(e[n],t,i);else if(ur(e)||Hr(e))e.forEach(n=>{ir(n,t,i)});else if(tm(e)){for(const n in e)ir(e[n],t,i);for(const n of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,n)&&ir(e[n],t,i)}return e}/**
|
|
10
|
-
* @vue/runtime-core v3.5.44
|
|
11
|
-
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
12
|
-
* @license MIT
|
|
13
|
-
**/function Wo(e,t,i,n){try{return n?e(...n):e()}catch(r){jo(r,t,i)}}function cn(e,t,i,n){if(je(e)){const r=Wo(e,t,i,n);return r&&Q_(r)&&r.catch(s=>{jo(s,t,i)}),r}if(Ze(e)){const r=[];for(let s=0;s<e.length;s++)r.push(cn(e[s],t,i,n));return r}}function jo(e,t,i,n=!0){const r=t?t.vnode:null,{errorHandler:s,throwUnhandledErrorInProduction:a}=t&&t.appContext.config||lt;if(t){let l=t.parent;const o=t.proxy,c=`https://vuejs.org/error-reference/#runtime-${i}`;for(;l;){const u=l.ec;if(u){for(let d=0;d<u.length;d++)if(u[d](e,o,c)===!1)return}l=l.parent}if(s){Zn(),Wo(s,null,10,[e,o,c]),Bn();return}}q5(e,i,r,n,a)}function q5(e,t,i,n=!0,r=!1){if(r)throw e;console.error(e)}const Ei=[];let hn=-1;const Ln=[];let Ar=null,Is=0;const Lm=Promise.resolve();let rc=null;function Gt(e){const t=rc||Lm;return e?t.then(this?e.bind(this):e):t}function G5(e){let t=hn+1,i=Ei.length;for(;t<i;){const n=t+i>>>1,r=Ei[n],s=bo(r);s<e||s===e&&r.flags&2?t=n+1:i=n}return t}function Eh(e){if(!(e.flags&1)){const t=bo(e),i=Ei[Ei.length-1];!i||!(e.flags&2)&&t>=bo(i)?Ei.push(e):Ei.splice(G5(t),0,e),e.flags|=1,Em()}}function Em(){rc||(rc=Lm.then(Tm))}function Y5(e){if(!Ze(e))Ar&&e.id===-1?Ar.splice(Is+1,0,e):e.flags&1||(Ln.push(e),e.flags|=1);else for(let t=0;t<e.length;t++)Ln.push(e[t]);Em()}function xm(e,t,i,n=hn+1){for(;n<Ei.length;n++){const r=Ei[n];if(r&&r.flags&2){if(e&&r.id!==e.uid||t!==void 0&&!(r.id>=t))continue;Ei.splice(n,1),n=e?n-1:hn,r.flags&4&&(r.flags&=-2),r(),r.flags&4||(r.flags&=-2)}}}function Hm(e,t,i=0){if(Ln.length){let n=Ln,r=0;if(t){n=[];for(let a=0;a<Ln.length;a++){const l=Ln[a];(l.i!==void 0?!l.i||l.i.uid<i:t.has(l))?Ln[r++]=l:n.push(l)}}const s=[...new Set(n)].sort((a,l)=>bo(a)-bo(l));if(Ln.length=r,Ar){for(let a=0;a<s.length;a++)Ar.push(s[a]);return}for(Ar=s,Is=0;Is<Ar.length;Is++){const a=Ar[Is];a.flags&4&&(a.flags&=-2),a.flags&8||a(),a.flags&=-2}Ar=null,Is=0}}let T1=!1;function X5(e,t){if(T1){e();return}const i=t===void 0?void 0:new Set(Ln);e(),T1=!0;try{xm(void 0,t),Hm(void 0,i,t)}finally{T1=!1}}const bo=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Tm(e){try{for(hn=0;hn<Ei.length;hn++){const t=Ei[hn];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),Wo(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;hn<Ei.length;hn++){const t=Ei[hn];t&&(t.flags&=-2)}hn=-1,Ei.length=0,Hm(),rc=null,(Ei.length||Ln.length)&&Tm()}}let _i=null,Nm=null;function sc(e){const t=_i;return _i=e,Nm=e&&e.type.__scopeId||null,t}function G(e,t=_i,i){if(!t||e._n)return e;const n=(...r)=>{n._d&&uc(-1);const s=sc(t),a=cr.length;let l;try{l=e(...r)}finally{for(let o=cr.length;o>a;o--)Vh();sc(s),n._d&&uc(1)}return l};return n._n=!0,n._c=!0,n._d=!0,n}function sn(e,t){if(_i===null)return e;const i=e1(_i),n=e.dirs||(e.dirs=[]);for(let r=0;r<t.length;r++){let[s,a,l,o=lt]=t[r];s&&(je(s)&&(s={mounted:s,updated:s}),s.deep&&ir(a),n.push({dir:s,instance:i,value:a,oldValue:void 0,arg:l,modifiers:o}))}return e}function Gr(e,t,i,n){const r=e.dirs,s=t&&t.dirs;for(let a=0;a<r.length;a++){const l=r[a];s&&(l.oldValue=s[a].value);let o=l.dir[n];o&&(Zn(),cn(o,i,8,[e.el,l,e,t]),Bn())}}function tn(e,t){if(fi){let i=fi.provides;const n=fi.parent&&fi.parent.provides;n===i&&(i=fi.provides=Object.create(n)),i[e]=t}}function Mt(e,t,i=!1){const n=Si();if(n||ps){let r=ps?ps._context.provides:n?n.parent==null||n.ce?n.vnode.appContext&&n.vnode.appContext.provides:n.parent.provides:void 0;if(r&&e in r)return r[e];if(arguments.length>1)return i&&je(t)?t.call(n&&n.proxy):t}}function J5(){return!!(Si()||ps)}const Q5=Symbol.for("v-scx"),e3=()=>Mt(Q5);function t3(e,t){return xh(e,null,{flush:"sync"})}function Ve(e,t,i){return xh(e,t,i)}function xh(e,t,i=lt){const{immediate:n,deep:r,flush:s,once:a}=i,l=Ft({},i),o=t&&n||!t&&s!=="post";let c;if(qs){if(s==="sync"){const f=e3();c=f.__watcherHandles||(f.__watcherHandles=[])}else if(!o){const f=()=>{};return f.stop=Nn,f.resume=Nn,f.pause=Nn,f}}const u=fi;l.call=(f,v,p)=>cn(f,u,v,p);let d=!1;s==="post"?l.scheduler=f=>{f.i=u,Mi(f,u&&u.suspense)}:s!=="sync"&&(d=!0,l.scheduler=(f,v)=>{v?f():Eh(f)}),l.augmentJob=f=>{t&&(f.flags|=4),d&&(f.flags|=2,u&&(f.id=u.uid,f.i=u))};const h=K5(e,t,l);return qs&&(c?c.push(h):o&&h()),h}function i3(e,t,i){const n=this.proxy,r=St(e)?e.includes(".")?Pm(n,e):()=>n[e]:e.bind(n,n);let s;je(t)?s=t:(s=t.handler,i=t);const a=Go(this),l=xh(r,s.bind(n),i);return a(),l}function Pm(e,t){const i=t.split(".");return()=>{let n=e;for(let r=0;r<i.length&&n;r++)n=n[i[r]];return n}}const Sr=new WeakMap,Om=Symbol("_vte"),Xc=e=>e.__isTeleport,as=e=>e&&(e.disabled||e.disabled===""),n3=e=>e&&(e.defer||e.defer===""),X2=e=>typeof SVGElement<"u"&&e instanceof SVGElement,J2=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Lu=(e,t)=>{const i=e&&e.to;return St(i)?t?t(i):null:i},r3={name:"Teleport",__isTeleport:!0,process(e,t,i,n,r,s,a,l,o,c){const{mc:u,pc:d,pbc:h,o:{insert:f,querySelector:v,createText:p,createComment:w,parentNode:_}}=c,y=as(t.props);let{dynamicChildren:C}=t;const g=(L,B,T)=>{L.shapeFlag&16&&u(L.children,B,T,r,s,a,l,o)},$=(L=t)=>{const B=as(L.props),T=L.target=Lu(L.props,v),X=Eu(T,L,p,f);T&&(a!=="svg"&&X2(T)?a="svg":a!=="mathml"&&J2(T)&&(a="mathml"),r&&r.isCE&&(r.ce._teleportTargets||(r.ce._teleportTargets=new Set)).add(T),B||(g(L,T,X),Kl(L,!1)))},E=L=>{const B=()=>{if(Sr.get(L)===B){if(Sr.delete(L),as(L.props)){const T=_(L.el)||i;g(L,T,L.anchor),Kl(L,!0)}$(L)}};Sr.set(L,B),Mi(B,s)};if(e==null){const L=t.el=p(""),B=t.anchor=p("");if(f(L,i,n),f(B,i,n),n3(t.props)||s&&s.pendingBranch){E(t);return}y&&(g(t,i,B),Kl(t,!0)),$()}else{t.el=e.el;const L=t.anchor=e.anchor,B=Sr.get(e);if(B){B.flags|=8,Sr.delete(e),E(t);return}t.targetStart=e.targetStart;const T=t.target=e.target,X=t.targetAnchor=e.targetAnchor,W=as(e.props),A=W?i:T,x=W?L:X;if(a==="svg"||X2(T)?a="svg":(a==="mathml"||J2(T))&&(a="mathml"),C?(h(e.dynamicChildren,C,A,r,s,a,l),Rh(e,t,!0)):o||d(e,t,A,x,r,s,a,l,!1),y)W?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):p0(t,i,L,c,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const F=Lu(t.props,v);F&&(t.target=F,p0(t,F,null,c,0))}else W&&p0(t,T,X,c,1);Kl(t,y)}},remove(e,t,i,{um:n,o:{remove:r}},s){const{shapeFlag:a,children:l,anchor:o,targetStart:c,targetAnchor:u,target:d,props:h}=e,f=as(h),v=s||!f,p=Sr.get(e);if(p&&(p.flags|=8,Sr.delete(e)),d&&(r(c),r(u)),s&&r(o),!p&&(f||d)&&a&16)for(let w=0;w<l.length;w++){const _=l[w];n(_,t,i,v,!!_.dynamicChildren)}},move:p0,hydrate:s3};function p0(e,t,i,{o:{insert:n},m:r},s=2){s===0&&(e.targetStart&&n(e.targetStart,t,i),n(e.targetAnchor,t,i),i=e.targetAnchor);const{el:a,anchor:l,shapeFlag:o,children:c,props:u}=e,d=s===2;if(d&&n(a,t,i),!Sr.has(e)&&(!d||as(u))&&o&16)for(let h=0;h<c.length;h++)r(c[h],t,i,2);d&&n(l,t,i)}function s3(e,t,i,n,r,s,{o:{nextSibling:a,parentNode:l,querySelector:o,insert:c,createText:u}},d){function h(w,_){let y=_;for(;y;){if(y&&y.nodeType===8){if(y.data==="teleport start anchor")t.targetStart=y;else if(y.data==="teleport anchor"){t.targetAnchor=y,w._lpa=t.targetAnchor&&a(t.targetAnchor);break}}y=a(y)}}function f(w,_){_.anchor=d(a(w),_,l(w),i,n,r,s)}const v=t.target=Lu(t.props,o),p=as(t.props);if(v){const w=v._lpa||v.firstChild;t.shapeFlag&16&&(p?(f(e,t),h(v,w),t.targetAnchor||Eu(v,t,u,c,l(e)===v?e:null)):(t.anchor=a(e),h(v,w),t.targetAnchor||Eu(v,t,u,c),d(w&&a(w),t,v,i,n,r,s))),Kl(t,p)}else p&&t.shapeFlag&16&&(f(e,t),t.targetStart=e,t.targetAnchor=a(e));return t.anchor&&a(t.anchor)}const an=r3;function Kl(e,t){const i=e.ctx;if(i&&i.ut){let n,r;for(t?(n=e.el,r=e.anchor):(n=e.targetStart,r=e.targetAnchor);n&&n!==r;)n.nodeType===1&&n.setAttribute("data-v-owner",i.uid),n=n.nextSibling;i.ut()}}function Eu(e,t,i,n,r=null){const s=t.targetStart=i(""),a=t.targetAnchor=i("");return s[Om]=a,e&&(n(s,e,r),n(a,e,r)),a}const Ji=Symbol("_leaveCb"),Nl=Symbol("_enterCb");function a3(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return nt(()=>{e.isMounted=!0}),ri(()=>{e.isUnmounting=!0}),e}const Gi=[Function,Array],Im={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Gi,onEnter:Gi,onAfterEnter:Gi,onEnterCancelled:Gi,onBeforeLeave:Gi,onLeave:Gi,onAfterLeave:Gi,onLeaveCancelled:Gi,onBeforeAppear:Gi,onAppear:Gi,onAfterAppear:Gi,onAppearCancelled:Gi},l3={name:"BaseTransition",props:Im,setup(e,{slots:t}){const i=Si(),n=a3();return()=>{const r=t.default&&Dm(t.default(),!0),s=r&&r.length?Rm(r):i.subTree?V():void 0;if(!s)return;const a=st(e),{mode:l}=a;if(n.isLeaving)return N1(s);const o=ac(s);if(!o)return N1(s);let c=xu(o,a,n,i,d=>c=d);o.type!==ti&&js(o,c);let u=i.subTree&&ac(i.subTree);if(u&&u.type!==ti&&!ls(u,o)&&yo(i.subTree)){let d=xu(u,a,n,i);if(js(u,d),l==="out-in"&&o.type!==ti)return n.isLeaving=!0,d.afterLeave=()=>{n.isLeaving=!1,i.job.flags&8||i.update(),delete d.afterLeave,u=void 0},N1(s);l==="in-out"&&o.type!==ti?d.delayLeave=(h,f,v)=>{const p=Vm(n,u);p[String(u.key)]=u,h[Ji]=()=>{f(),h[Ji]=void 0,delete c.delayedLeave,u=void 0},c.delayedLeave=()=>{v(),delete c.delayedLeave,u=void 0}}:u=void 0}else u&&(u=void 0);return s}}};function Rm(e){let t=e[0];if(e.length>1){for(const i of e)if(i.type!==ti){t=i;break}}return t}const o3=l3;function Vm(e,t){const{leavingVNodes:i}=e;let n=i.get(t.type);return n||(n=Object.create(null),i.set(t.type,n)),n}function xu(e,t,i,n,r){const{appear:s,mode:a,persisted:l=!1,onBeforeEnter:o,onEnter:c,onAfterEnter:u,onEnterCancelled:d,onBeforeLeave:h,onLeave:f,onAfterLeave:v,onLeaveCancelled:p,onBeforeAppear:w,onAppear:_,onAfterAppear:y,onAppearCancelled:C}=t,g=String(e.key),$=Vm(i,e),E=(T,X)=>{T&&cn(T,n,9,X)},L=(T,X)=>{const W=X[1];E(T,X),Ze(T)?T.every(A=>A.length<=1)&&W():T.length<=1&&W()},B={mode:a,persisted:l,beforeEnter(T){let X=o;if(!i.isMounted)if(s)X=w||o;else return;T[Ji]&&T[Ji](!0);const W=$[g];if(W&&ls(e,W)){let A=W.el[Ji];if(!A){const x=yo(W);A=x&&x.el[Ji]}A&&A()}E(X,[T])},enter(T){if($[g]===e)return;let X=c,W=u,A=d;if(!i.isMounted)if(s)X=_||c,W=y||u,A=C||d;else return;let x=!1;T[Nl]=ie=>{x||(x=!0,ie?E(A,[T]):E(W,[T]),B.delayedLeave&&B.delayedLeave(),T[Nl]=void 0)};const F=T[Nl].bind(null,!1);X?L(X,[T,F]):F()},leave(T,X){const W=String(e.key);if(T[Nl]&&T[Nl](!0),i.isUnmounting)return X();E(h,[T]);let A=!1;T[Ji]=F=>{A||(A=!0,X(),F?E(p,[T]):E(v,[T]),T[Ji]=void 0,$[W]===e&&delete $[W])};const x=T[Ji].bind(null,!1);$[W]=e,f?L(f,[T,x]):x()},clone(T){const X=xu(T,t,i,n,r);return r&&r(X),X}};return B}function N1(e){if(Ko(e))return e=Rr(e),e.children=null,e}function ac(e){if(!Ko(e))return Xc(e.type)&&e.children?Rm(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:i}=e;if(i){if(t&16)return i[0];if(t&32&&je(i.default))return i.default()}}function js(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;const i=e.component.subTree;js(Xc(i.type)&&ac(i)||i,t)}else if(e.shapeFlag&128)e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback);else if(e.transition=t,e.type===Ce&&Ze(e.children)){const i=Xm(e.children,!1);i&&js(i,t)}}function Dm(e,t=!1,i){let n=[],r=0;for(let s=0;s<e.length;s++){let a=e[s];const l=i==null?a.key:String(i)+String(a.key!=null?a.key:s);a.type===Ce?(a.patchFlag&128&&r++,n=n.concat(Dm(a.children,t,l))):(t||a.type!==ti)&&n.push(l!=null?Rr(a,{key:l}):a)}if(r>1)for(let s=0;s<n.length;s++)n[s].patchFlag=-2;return n}function yo(e){if(e.component)return yo(e.component.subTree);if(e.type===Ce){const t=Ze(e.children)&&Xm(e.children,!1);return t?yo(t):void 0}if(e.type!==ti)return e}function Ne(e,t){return je(e)?Ft({name:e.name},t,{setup:e}):e}function Oi(){const e=Si();return e?(e.appContext.config.idPrefix||"v")+"-"+e.ids[0]+e.ids[1]++:""}function Hh(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Q2(e,t){let i;return!!((i=Object.getOwnPropertyDescriptor(e,t))&&!i.configurable)}const lc=new WeakMap;function so(e,t,i,n,r=!1){if(Ze(e)){e.forEach((p,w)=>so(p,t&&(Ze(t)?t[w]:t),i,n,r));return}if(Ws(n)&&!r){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&so(e,t,i,n.component.subTree);return}const s=n.shapeFlag&4?e1(n.component):n.el,a=r?null:s,{i:l,r:o}=e,c=t&&t.r,u=l.refs===lt?l.refs={}:l.refs,d=l.setupState,h=st(d),f=d===lt?J_:p=>Q2(u,p)?!1:ct(h,p),v=(p,w)=>!(w&&Q2(u,w));if(c!=null&&c!==o){if(ef(t),St(c))u[c]=null,f(c)&&(d[c]=null);else if(At(c)){const p=t;v(c,p.k)&&(c.value=null),p.k&&(u[p.k]=null)}}if(je(o))Wo(o,l,12,[a,u]);else{const p=St(o),w=At(o);if(p||w){const _=()=>{if(e.f){const y=p?f(o)?d[o]:u[o]:v()||!e.k?o.value:u[e.k];if(r)Ze(y)&&yh(y,s);else if(Ze(y))y.includes(s)||y.push(s);else if(p)u[o]=[s],f(o)&&(d[o]=u[o]);else{const C=[s];v(o,e.k)&&(o.value=C),e.k&&(u[e.k]=C)}}else p?(u[o]=a,f(o)&&(d[o]=a)):w&&(v(o,e.k)&&(o.value=a),e.k&&(u[e.k]=a))};if(a){const y=()=>{_(),lc.delete(e)};y.id=-1,lc.set(e,y),Mi(y,i)}else ef(e),_()}}}function ef(e){const t=lc.get(e);t&&(t.flags|=8,lc.delete(e))}const tf=e=>e.nodeType===8;Kc().requestIdleCallback;Kc().cancelIdleCallback;function c3(e,t){if(tf(e)&&e.data==="["){let i=1,n=e.nextSibling;for(;n;){if(n.nodeType===1){if(t(n)===!1)break}else if(tf(n))if(n.data==="]"){if(--i===0)break}else n.data==="["&&i++;n=n.nextSibling}}else t(e)}const Ws=e=>!!e.type.__asyncLoader;function u3(e){je(e)&&(e={loader:e});const{loader:t,loadingComponent:i,errorComponent:n,delay:r=200,hydrate:s,timeout:a,suspensible:l=!0,onError:o}=e;let c=null,u,d=0;const h=()=>(d++,c=null,f()),f=()=>{let v;return c||(v=c=t().catch(p=>{if(p=p instanceof Error?p:new Error(String(p)),o)return new Promise((w,_)=>{o(p,()=>w(h()),()=>_(p),d+1)});throw p}).then(p=>v!==c&&c?c:(p&&(p.__esModule||p[Symbol.toStringTag]==="Module")&&(p=p.default),u=p,p)))};return Ne({name:"AsyncComponentWrapper",__asyncLoader:f,__asyncHydrate(v,p,w){const _=v.isConnected;let y=!1;(p.bu||(p.bu=[])).push(()=>y=!0);const C=()=>{y||!v.parentNode||_&&!v.isConnected||w()},g=s?()=>{const $=s(C,E=>c3(v,E));$&&(p.bum||(p.bum=[])).push($)}:C;u?g():f().then(()=>!p.isUnmounted&&g())},get __asyncResolved(){return u},setup(){const v=fi;if(Hh(v),u)return()=>_0(u,v);const p=$=>{c=null,jo($,v,13,!n)};if(l&&v.suspense||qs)return f().then($=>()=>_0($,v)).catch($=>(p($),()=>n?j(n,{error:$}):null));const w=K(!1),_=K(),y=K(!!r);let C,g;return Ii(()=>{C!=null&&clearTimeout(C),g!=null&&clearTimeout(g)}),r&&(g=setTimeout(()=>{v.isUnmounted||(y.value=!1)},r)),a!=null&&(C=setTimeout(()=>{if(!v.isUnmounted&&!w.value&&!_.value){const $=new Error(`Async component timed out after ${a}ms.`);p($),_.value=$}},a)),f().then(()=>{v.isUnmounted||(w.value=!0,v.parent&&Ko(v.parent.vnode)&&v.parent.update())}).catch($=>{if(v.isUnmounted){c=null;return}p($),_.value=$}),()=>{if(w.value&&u)return _0(u,v);if(_.value&&n)return j(n,{error:_.value});if(i&&!y.value)return _0(i,v)}}})}function _0(e,t){const{ref:i,props:n,children:r,ce:s}=t.vnode,a=j(e,n,r);return a.ref=i,a.ce=s,delete t.vnode.ce,a}const Ko=e=>e.type.__isKeepAlive;function d3(e,t){Zm(e,"a",t)}function h3(e,t){Zm(e,"da",t)}function Zm(e,t,i=fi){const n=e.__wdc||(e.__wdc=()=>{let r=i;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(Jc(t,n,i),i){let r=i.parent;for(;r&&r.parent;)Ko(r.parent.vnode)&&f3(n,t,i,r),r=r.parent}}function f3(e,t,i,n){const r=Jc(t,e,n,!0);Ii(()=>{yh(n[t],r)},i)}function Jc(e,t,i=fi,n=!1){if(i){const r=i[e]||(i[e]=[]),s=t.__weh||(t.__weh=(...a)=>{Zn();const l=Go(i),o=cn(t,i,e,a);return l(),Bn(),o});return n?r.unshift(s):r.push(s),s}}const fr=e=>(t,i=fi)=>{(!qs||e==="sp")&&Jc(e,(...n)=>t(...n),i)},p3=fr("bm"),nt=fr("m"),_3=fr("bu"),m3=fr("u"),ri=fr("bum"),Ii=fr("um"),v3=fr("sp"),g3=fr("rtg"),b3=fr("rtc");function y3(e,t=fi){Jc("ec",e,t)}const Th="components",w3="directives";function wo(e,t){return Ph(Th,e,!0,t)||e}const Bm=Symbol.for("v-ndc");function qo(e){return St(e)?Ph(Th,e,!1)||e:e||Bm}function Nh(e){return Ph(w3,e)}function Ph(e,t,i=!0,n=!1){const r=_i||fi;if(r){const s=r.type;if(e===Th){const l=iy(s,!1);if(l&&(l===t||l===wi(t)||l===Wc(wi(t))))return s}const a=nf(r[e]||s[e],t)||nf(r.appContext[e],t);return!a&&n?s:a}}function nf(e,t){return e&&(e[t]||e[wi(t)]||e[Wc(wi(t))])}function Fe(e,t,i,n){let r;const s=i&&i[n],a=Ze(e);if(a||St(e)){const l=a&&Pn(e);let o=!1,c=!1;l&&(o=!Ui(e),c=Fn(e),e=Gc(e)),r=new Array(e.length);for(let u=0,d=e.length;u<d;u++)r[u]=t(o?c?Ir(on(e[u])):on(e[u]):e[u],u,void 0,s&&s[u])}else if(typeof e=="number")if(!Number.isInteger(e)||e<0)r=[];else{r=new Array(e);for(let l=0;l<e;l++)r[l]=t(l+1,l,void 0,s&&s[l])}else if(ut(e))if(e[Symbol.iterator])r=Array.from(e,(l,o)=>t(l,o,void 0,s&&s[o]));else{const l=Object.keys(e);r=new Array(l.length);for(let o=0,c=l.length;o<c;o++){const u=l[o];r[o]=t(e[u],u,o,s&&s[o])}}else r=[];return i&&(i[n]=r),r}function Fm(e,t){for(let i=0;i<t.length;i++){const n=t[i];if(Ze(n))for(let r=0;r<n.length;r++)e[n[r].name]=n[r].fn;else n&&(e[n.name]=n.key?(...r)=>{const s=n.fn(...r);return s&&(s.key=n.key),s}:n.fn)}return e}function xe(e,t,i,n,r,s){if(i==null&&(i={}),_i.ce||_i.parent&&Ws(_i.parent)&&_i.parent.ce){const c=s!=null&&i.key==null?Ft({},i,{key:s}):i,u=Object.keys(c).length>0;return t!=="default"&&(c.name=t),m(),he(Ce,null,[j("slot",c,n&&n())],u?-2:64)}let a=e[t];a&&a._c&&(a._d=!1);const l=cr.length;m();let o;try{const c=a&&zm(a(i)),u=i.key||s||c&&c.key;o=he(Ce,{key:(u&&!ji(u)?u:`_${t}`)+(!c&&n?"_fb":"")},c||(n?n():[]),c&&e._===1?64:-2)}catch(c){for(let u=cr.length;u>l;u--)Vh();throw c}finally{a&&a._c&&(a._d=!0)}return!r&&o.scopeId&&(o.slotScopeIds=[o.scopeId+"-s"]),o}function zm(e){return e.some(t=>Ks(t)?!(t.type===ti||t.type===Ce&&!zm(t.children)):!0)?e:null}const Hu=e=>e?h4(e)?e1(e):Hu(e.parent):null,ao=Ft(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Hu(e.parent),$root:e=>Hu(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>jm(e),$forceUpdate:e=>e.f||(e.f=()=>{Eh(e.update)}),$nextTick:e=>e.n||(e.n=Gt.bind(e.proxy)),$watch:e=>i3.bind(e)}),P1=(e,t)=>e!==lt&&!e.__isScriptSetup&&ct(e,t),S3={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:i,setupState:n,data:r,props:s,accessCache:a,type:l,appContext:o}=e;if(t[0]!=="$"){const h=a[t];if(h!==void 0)switch(h){case 1:return n[t];case 2:return r[t];case 4:return i[t];case 3:return s[t]}else{if(P1(n,t))return a[t]=1,n[t];if(r!==lt&&ct(r,t))return a[t]=2,r[t];if(ct(s,t))return a[t]=3,s[t];if(i!==lt&&ct(i,t))return a[t]=4,i[t];Tu&&(a[t]=0)}}const c=ao[t];let u,d;if(c)return t==="$attrs"&&bi(e.attrs,"get",""),c(e);if((u=l.__cssModules)&&(u=u[t]))return u;if(i!==lt&&ct(i,t))return a[t]=4,i[t];if(d=o.config.globalProperties,ct(d,t))return d[t]},set({_:e},t,i){const{data:n,setupState:r,ctx:s}=e;return P1(r,t)?(r[t]=i,!0):n!==lt&&ct(n,t)?(n[t]=i,!0):ct(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(s[t]=i,!0)},has({_:{data:e,setupState:t,accessCache:i,ctx:n,appContext:r,props:s,type:a}},l){let o;return!!(i[l]||e!==lt&&l[0]!=="$"&&ct(e,l)||P1(t,l)||ct(s,l)||ct(n,l)||ct(ao,l)||ct(r.config.globalProperties,l)||(o=a.__cssModules)&&o[l])},defineProperty(e,t,i){return i.get!=null?e._.accessCache[t]=0:ct(i,"value")&&this.set(e,t,i.value,null),Reflect.defineProperty(e,t,i)}};function Wn(){return C3().slots}function C3(e){const t=Si();return t.setupContext||(t.setupContext=p4(t))}function oc(e){return Ze(e)?e.reduce((t,i)=>(t[i]=null,t),{}):e}function Um(e,t){return!e||!t?e||t:Ze(e)&&Ze(t)?e.concat(t):Ft({},oc(e),oc(t))}let Tu=!0;function k3(e){const t=jm(e),i=e.proxy,n=e.ctx;Tu=!1,t.beforeCreate&&rf(t.beforeCreate,e,"bc");const{data:r,computed:s,methods:a,watch:l,provide:o,inject:c,created:u,beforeMount:d,mounted:h,beforeUpdate:f,updated:v,activated:p,deactivated:w,beforeDestroy:_,beforeUnmount:y,destroyed:C,unmounted:g,render:$,renderTracked:E,renderTriggered:L,errorCaptured:B,serverPrefetch:T,expose:X,inheritAttrs:W,components:A,directives:x,filters:F}=t;if(c&&A3(c,n,null),a)for(const ue in a){const J=a[ue];je(J)&&(n[ue]=J.bind(i))}if(r){const ue=r.call(i,i);ut(ue)&&(e.data=vs(ue))}if(Tu=!0,s)for(const ue in s){const J=s[ue],ae=je(J)?J.bind(i,i):je(J.get)?J.get.bind(i,i):Nn,ne=!je(J)&&je(J.set)?J.set.bind(i):Nn,Q=q({get:ae,set:ne});Object.defineProperty(n,ue,{enumerable:!0,configurable:!0,get:()=>Q.value,set:oe=>Q.value=oe})}if(l)for(const ue in l)Wm(l[ue],n,i,ue);if(o){const ue=je(o)?o.call(i):o;Reflect.ownKeys(ue).forEach(J=>{tn(J,ue[J])})}u&&rf(u,e,"c");function re(ue,J){Ze(J)?J.forEach(ae=>ue(ae.bind(i))):J&&ue(J.bind(i))}if(re(p3,d),re(nt,h),re(_3,f),re(m3,v),re(d3,p),re(h3,w),re(y3,B),re(b3,E),re(g3,L),re(ri,y),re(Ii,g),re(v3,T),Ze(X))if(X.length){const ue=e.exposed||(e.exposed={});X.forEach(J=>{Object.defineProperty(ue,J,{get:()=>i[J],set:ae=>i[J]=ae,enumerable:!0})})}else e.exposed||(e.exposed={});$&&e.render===Nn&&(e.render=$),W!=null&&(e.inheritAttrs=W),A&&(e.components=A),x&&(e.directives=x),T&&Hh(e)}function A3(e,t,i=Nn){Ze(e)&&(e=Nu(e));for(const n in e){const r=e[n];let s;ut(r)?"default"in r?s=Mt(r.from||n,r.default,!0):s=Mt(r.from||n):s=Mt(r),At(s)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>s.value,set:a=>s.value=a}):t[n]=s}}function rf(e,t,i){cn(Ze(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,i)}function Wm(e,t,i,n){let r=n.includes(".")?Pm(i,n):()=>i[n];if(St(e)){const s=t[e];je(s)&&Ve(r,s)}else if(je(e))Ve(r,e.bind(i));else if(ut(e))if(Ze(e))e.forEach(s=>Wm(s,t,i,n));else{const s=je(e.handler)?e.handler.bind(i):t[e.handler];je(s)&&Ve(r,s,e)}}function jm(e){const t=e.type,{mixins:i,extends:n}=t,{mixins:r,optionsCache:s,config:{optionMergeStrategies:a}}=e.appContext,l=s.get(t);let o;return l?o=l:!r.length&&!i&&!n?o=t:(o={},r.length&&r.forEach(c=>cc(o,c,a,!0)),cc(o,t,a)),ut(t)&&s.set(t,o),o}function cc(e,t,i,n=!1){const{mixins:r,extends:s}=t;s&&cc(e,s,i,!0),r&&r.forEach(a=>cc(e,a,i,!0));for(const a in t)if(!(n&&a==="expose")){const l=M3[a]||i&&i[a];e[a]=l?l(e[a],t[a]):t[a]}return e}const M3={data:sf,props:af,emits:af,methods:ql,computed:ql,beforeCreate:ki,created:ki,beforeMount:ki,mounted:ki,beforeUpdate:ki,updated:ki,beforeDestroy:ki,beforeUnmount:ki,destroyed:ki,unmounted:ki,activated:ki,deactivated:ki,errorCaptured:ki,serverPrefetch:ki,components:ql,directives:ql,watch:L3,provide:sf,inject:$3};function sf(e,t){return t?e?function(){return Ft(je(e)?e.call(this,this):e,je(t)?t.call(this,this):t)}:t:e}function $3(e,t){return ql(Nu(e),Nu(t))}function Nu(e){if(Ze(e)){const t={};for(let i=0;i<e.length;i++)t[e[i]]=e[i];return t}return e}function ki(e,t){return e?[...new Set([].concat(e,t))]:t}function ql(e,t){return e?Ft(Object.create(null),e,t):t}function af(e,t){return e?Ze(e)&&Ze(t)?[...new Set([...e,...t])]:Ft(Object.create(null),oc(e),oc(t??{})):t}function L3(e,t){if(!e)return t;if(!t)return e;const i=Ft(Object.create(null),e);for(const n in t)i[n]=ki(e[n],t[n]);return i}function Km(){return{app:null,config:{isNativeTag:J_,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let E3=0;function x3(e,t){return function(n,r=null){je(n)||(n=Ft({},n)),r!=null&&!ut(r)&&(r=null);const s=Km(),a=new WeakSet,l=[];let o=!1;const c=s.app={_uid:E3++,_component:n,_props:r,_container:null,_context:s,_instance:null,version:ry,get config(){return s.config},set config(u){},use(u,...d){return a.has(u)||(u&&je(u.install)?(a.add(u),u.install(c,...d)):je(u)&&(a.add(u),u(c,...d))),c},mixin(u){return s.mixins.includes(u)||s.mixins.push(u),c},component(u,d){return d?(s.components[u]=d,c):s.components[u]},directive(u,d){return d?(s.directives[u]=d,c):s.directives[u]},mount(u,d,h){if(!o){const f=c._ceVNode||j(n,r);return f.appContext=s,h===!0?h="svg":h===!1&&(h=void 0),e(f,u,h),o=!0,c._container=u,u.__vue_app__=c,e1(f.component)}},onUnmount(u){l.push(u)},unmount(){o&&(cn(l,c._instance,16),e(null,c._container),delete c._container.__vue_app__)},provide(u,d){return s.provides[u]=d,c},runWithContext(u){const d=ps;ps=c;try{return u()}finally{ps=d}}};return c}}let ps=null;function qm(e,t,i=lt){const n=Si(),r=wi(t),s=hr(t),a=Gm(e,r),l=Z5((o,c)=>{let u,d=lt,h;return t3(()=>{const f=e[r];hi(u,f)&&(u=f,c())}),{get(){return o(),i.get?i.get(u):u},set(f){const v=i.set?i.set(f):f;if(!hi(v,u)&&!(d!==lt&&hi(f,d)))return;const p=n.vnode.props,w=!!(p&&(t in p||r in p||s in p)&&(`onUpdate:${t}`in p||`onUpdate:${r}`in p||`onUpdate:${s}`in p));w||(u=f,c()),n.emit(`update:${t}`,v),hi(f,d)&&(hi(f,v)&&!hi(v,h)||w&&d!==lt&&!hi(v,u))&&c(),d=f,h=v}}});return l[Symbol.iterator]=()=>{let o=0;return{next(){return o<2?{value:o++?a||lt:l,done:!1}:{done:!0}}}},l}const Gm=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${wi(t)}Modifiers`]||e[`${hr(t)}Modifiers`];function H3(e,t,...i){if(e.isUnmounted)return;const n=e.vnode.props||lt;let r=i;const s=t.startsWith("update:"),a=s&&Gm(n,t.slice(7));a&&(a.trim&&(r=i.map(u=>St(u)?u.trim():u)),a.number&&(r=r.map(jc)));let l,o=n[l=$1(t)]||n[l=$1(wi(t))];!o&&s&&(o=n[l=$1(hr(t))]),o&&cn(o,e,6,r);const c=n[l+"Once"];if(c){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,cn(c,e,6,r)}}const T3=new WeakMap;function Ym(e,t,i=!1){const n=i?T3:t.emitsCache,r=n.get(e);if(r!==void 0)return r;const s=e.emits;let a={},l=!1;if(!je(e)){const o=c=>{const u=Ym(c,t,!0);u&&(l=!0,Ft(a,u))};!i&&t.mixins.length&&t.mixins.forEach(o),e.extends&&o(e.extends),e.mixins&&e.mixins.forEach(o)}return!s&&!l?(ut(e)&&n.set(e,null),null):(Ze(s)?s.forEach(o=>a[o]=null):Ft(a,s),ut(e)&&n.set(e,a),a)}function Qc(e,t){return!e||!Bc(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),ct(e,t[0].toLowerCase()+t.slice(1))||ct(e,hr(t))||ct(e,t))}function lf(e){const{type:t,vnode:i,proxy:n,withProxy:r,propsOptions:[s],slots:a,attrs:l,emit:o,render:c,renderCache:u,props:d,data:h,setupState:f,ctx:v,inheritAttrs:p}=e,w=sc(e);let _,y;try{if(i.shapeFlag&4){const g=r||n,$=g;_=En(c.call($,g,u,d,f,h,v)),y=l}else{const g=t;_=En(g.length>1?g(d,{attrs:l,slots:a,emit:o}):g(d,null)),y=t.props?l:N3(l)}}catch(g){cr.length=0,jo(g,e,1),_=j(ti)}let C=_;if(y&&p!==!1){const g=Object.keys(y),{shapeFlag:$}=C;g.length&&$&7&&(s&&g.some(Fc)&&(y=P3(y,s)),C=Rr(C,y,!1,!0))}if(i.dirs&&(C=Rr(C,null,!1,!0),C.dirs=C.dirs?C.dirs.concat(i.dirs):i.dirs),i.transition){const g=Xc(C.type)&&ac(C)||C;js(g,i.transition)}return _=C,sc(w),_}function Xm(e,t=!0){let i;for(let n=0;n<e.length;n++){const r=e[n];if(Ks(r)){if(r.type!==ti||r.children==="v-if"){if(i)return;i=r}}else return}return i}const N3=e=>{let t;for(const i in e)(i==="class"||i==="style"||Bc(i))&&((t||(t={}))[i]=e[i]);return t},P3=(e,t)=>{const i={};for(const n in e)(!Fc(n)||!(n.slice(9)in t))&&(i[n]=e[n]);return i};function O3(e,t,i){const{props:n,children:r,component:s}=e,{props:a,children:l,patchFlag:o}=t,c=s.emitsOptions;if(t.dirs||t.transition)return!0;if(i&&o>=0){if(o&1024)return!0;if(o&16)return n?of(n,a,c):!!a;if(o&8){const u=t.dynamicProps;for(let d=0;d<u.length;d++){const h=u[d];if(Jm(a,n,h)&&!Qc(c,h))return!0}}}else return(r||l)&&(!l||!l.$stable)?!0:n===a?!1:n?a?of(n,a,c):!0:!!a;return!1}function of(e,t,i){const n=Object.keys(t);if(n.length!==Object.keys(e).length)return!0;for(let r=0;r<n.length;r++){const s=n[r];if(!ct(e,s)||Jm(t,e,s)&&!Qc(i,s))return!0}return!1}function Jm(e,t,i){const n=e[i],r=t[i];return i==="style"&&ut(n)&&ut(r)?!_n(n,r):n!==r}function I3({vnode:e,parent:t,suspense:i},n){for(;t;){const r=t.subTree;if(r.suspense&&r.suspense.activeBranch===e&&(r.suspense.vnode.el=r.el=n,e=r),r===e)(e=t.vnode).el=n,t=t.parent;else break}i&&i.activeBranch===e&&(i.vnode.el=n)}const Qm={},e4=()=>Object.create(Qm),t4=e=>Object.getPrototypeOf(e)===Qm;function R3(e,t,i,n=!1){const r={},s=e4();e.propsDefaults=Object.create(null),i4(e,t,r,s);for(const a in e.propsOptions[0])a in r||(r[a]=void 0);i?e.props=n?r:Cm(r):e.type.props?e.props=r:e.props=s,e.attrs=s}function V3(e,t,i,n){const{props:r,attrs:s,vnode:{patchFlag:a}}=e,l=st(r),[o]=e.propsOptions;let c=!1;if((n||a>0)&&!(a&16)){if(a&8){const u=e.vnode.dynamicProps;for(let d=0;d<u.length;d++){let h=u[d];if(Qc(e.emitsOptions,h))continue;const f=t[h];if(o)if(ct(s,h))f!==s[h]&&(s[h]=f,c=!0);else{const v=wi(h);r[v]=Pu(o,l,v,f,e,!1)}else f!==s[h]&&(s[h]=f,c=!0)}}}else{i4(e,t,r,s)&&(c=!0);let u;for(const d in l)(!t||!ct(t,d)&&((u=hr(d))===d||!ct(t,u)))&&(o?i&&(i[d]!==void 0||i[u]!==void 0)&&(r[d]=Pu(o,l,d,void 0,e,!0)):delete r[d]);if(s!==l)for(const d in s)(!t||!ct(t,d))&&(delete s[d],c=!0)}c&&tr(e.attrs,"set","")}function i4(e,t,i,n){const[r,s]=e.propsOptions;let a=!1,l;if(t)for(let o in t){if(io(o))continue;const c=t[o];let u;r&&ct(r,u=wi(o))?!s||!s.includes(u)?i[u]=c:(l||(l={}))[u]=c:Qc(e.emitsOptions,o)||(!(o in n)||c!==n[o])&&(n[o]=c,a=!0)}if(s){const o=st(i),c=l||lt;for(let u=0;u<s.length;u++){const d=s[u];i[d]=Pu(r,o,d,c[d],e,!ct(c,d))}}return a}function Pu(e,t,i,n,r,s){const a=e[i];if(a!=null){const l=ct(a,"default");if(l&&n===void 0){const o=a.default;if(a.type!==Function&&!a.skipFactory&&je(o)){const{propsDefaults:c}=r;if(i in c)n=c[i];else{const u=Go(r);n=c[i]=o.call(null,t),u()}}else n=o;r.ce&&r.ce._setProp(i,n)}a[0]&&(s&&!l?n=!1:a[1]&&(n===""||n===hr(i))&&(n=!0))}return n}const D3=new WeakMap;function n4(e,t,i=!1){const n=i?D3:t.propsCache,r=n.get(e);if(r)return r;const s=e.props,a={},l=[];let o=!1;if(!je(e)){const u=d=>{o=!0;const[h,f]=n4(d,t,!0);Ft(a,h),f&&l.push(...f)};!i&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!s&&!o)return ut(e)&&n.set(e,os),os;if(Ze(s))for(let u=0;u<s.length;u++){const d=wi(s[u]);cf(d)&&(a[d]=lt)}else if(s)for(const u in s){const d=wi(u);if(cf(d)){const h=s[u],f=a[d]=Ze(h)||je(h)?{type:h}:Ft({},h),v=f.type;let p=!1,w=!0;if(Ze(v))for(let _=0;_<v.length;++_){const y=v[_],C=je(y)&&y.name;if(C==="Boolean"){p=!0;break}else C==="String"&&(w=!1)}else p=je(v)&&v.name==="Boolean";f[0]=p,f[1]=w,(p||ct(f,"default"))&&l.push(d)}}const c=[a,l];return ut(e)&&n.set(e,c),c}function cf(e){return e[0]!=="$"&&!io(e)}const Oh=e=>e==="_"||e==="_ctx"||e==="$stable",Ih=e=>Ze(e)?e.map(En):[En(e)],Z3=(e,t,i)=>{if(t._n)return t;const n=G((...r)=>Ih(t(...r)),i);return n._c=!1,n},r4=(e,t,i)=>{const n=e._ctx;for(const r in e){if(Oh(r))continue;const s=e[r];if(je(s))t[r]=Z3(r,s,n);else if(s!=null){const a=Ih(s);t[r]=()=>a}}},s4=(e,t)=>{const i=Ih(t);e.slots.default=()=>i},a4=(e,t,i)=>{for(const n in t)(i||!Oh(n))&&(e[n]=t[n])},B3=(e,t,i)=>{const n=e.slots=e4();if(e.vnode.shapeFlag&32){const r=t._;r?(a4(n,t,i),i&&im(n,"_",r,!0)):r4(t,n)}else t&&s4(e,t)},F3=(e,t,i)=>{const{vnode:n,slots:r}=e;let s=!0,a=lt;if(n.shapeFlag&32){const l=t._;l?i&&l===1?s=!1:a4(r,t,i):(s=!t.$stable,r4(t,r)),a=t}else t&&(s4(e,t),a={default:1});if(s)for(const l in r)!Oh(l)&&a[l]==null&&delete r[l]},Mi=K3;function z3(e){return U3(e)}function U3(e,t){const i=Kc();i.__VUE__=!0;const{insert:n,remove:r,patchProp:s,createElement:a,createText:l,createComment:o,setText:c,setElementText:u,parentNode:d,nextSibling:h,setScopeId:f=Nn,insertStaticContent:v}=e,p=(H,N,O,te=null,ee=null,me=null,we=void 0,S=null,k=!!N.dynamicChildren)=>{if(H===N)return;H&&!ls(H,N)&&(te=U(H),oe(H,ee,me,!0),H=null),N.patchFlag===-2&&(k=!1,N.dynamicChildren=null),N.dynamicChildren&&H&&H.dynamicChildren&&H.dynamicChildren.hasOnce&&(N.dynamicChildren===os&&(N.dynamicChildren=[]),N.dynamicChildren.hasOnce=!0);const{type:D,ref:P,shapeFlag:R}=N;switch(D){case Br:w(H,N,O,te);break;case ti:_(H,N,O,te);break;case I1:H==null&&y(N,O,te,we);break;case Ce:A(H,N,O,te,ee,me,we,S,k);break;default:R&1?$(H,N,O,te,ee,me,we,S,k):R&6?x(H,N,O,te,ee,me,we,S,k):(R&64||R&128)&&D.process(H,N,O,te,ee,me,we,S,k,ge)}P!=null&&ee?so(P,H&&H.ref,me,N||H,!N):P==null&&H&&H.ref!=null&&so(H.ref,null,me,H,!0)},w=(H,N,O,te)=>{if(H==null)n(N.el=l(N.children),O,te);else{const ee=N.el=H.el;N.children!==H.children&&c(ee,N.children)}},_=(H,N,O,te)=>{H==null?n(N.el=o(N.children||""),O,te):N.el=H.el},y=(H,N,O,te)=>{[H.el,H.anchor]=v(H.children,N,O,te,H.el,H.anchor)},C=({el:H,anchor:N},O,te)=>{let ee;for(;H&&H!==N;)ee=h(H),n(H,O,te),H=ee;n(N,O,te)},g=({el:H,anchor:N})=>{let O;for(;H&&H!==N;)O=h(H),r(H),H=O;r(N)},$=(H,N,O,te,ee,me,we,S,k)=>{if(N.type==="svg"?we="svg":N.type==="math"&&(we="mathml"),H==null)E(N,O,te,ee,me,we,S,k);else{const D=H.el&&H.el._isVueCE?H.el:null;try{D&&D._beginPatch(),T(H,N,ee,me,we,S,k)}finally{D&&D._endPatch()}}},E=(H,N,O,te,ee,me,we,S)=>{let k,D;const{props:P,shapeFlag:R,transition:I,dirs:z}=H;if(k=H.el=a(H.type,me,P&&P.is,P),R&8?u(k,H.children):R&16&&B(H.children,k,null,te,ee,O1(H,me),we,S),z&&Gr(H,null,te,"created"),L(k,H,H.scopeId,we,te),P){for(const Se in P)Se!=="value"&&!io(Se)&&s(k,Se,null,P[Se],me,te);"value"in P&&s(k,"value",null,P.value,me),(D=P.onVnodeBeforeMount)&&bn(D,te,H)}z&&Gr(H,null,te,"beforeMount");const Y=W3(ee,I);Y&&I.beforeEnter(k),n(k,N,O),((D=P&&P.onVnodeMounted)||Y||z)&&Mi(()=>{try{D&&bn(D,te,H),Y&&I.enter(k),z&&Gr(H,null,te,"mounted")}finally{}},ee)},L=(H,N,O,te,ee)=>{if(O&&f(H,O),te)for(let me=0;me<te.length;me++)f(H,te[me]);if(ee){let me=ee.subTree;if(N===me||o4(me.type)&&(me.ssContent===N||me.ssFallback===N)){const we=ee.vnode;L(H,we,we.scopeId,we.slotScopeIds,ee.parent)}}},B=(H,N,O,te,ee,me,we,S,k=0)=>{for(let D=k;D<H.length;D++){const P=H[D]=S?er(H[D]):En(H[D]);p(null,P,N,O,te,ee,me,we,S)}},T=(H,N,O,te,ee,me,we)=>{const S=N.el=H.el;let{patchFlag:k,dynamicChildren:D,dirs:P}=N;k|=H.patchFlag&16;const R=H.props||lt,I=N.props||lt;let z;if(O&&Yr(O,!1),(z=I.onVnodeBeforeUpdate)&&bn(z,O,N,H),P&&Gr(N,H,O,"beforeUpdate"),O&&Yr(O,!0),D&&(!H.dynamicChildren||H.dynamicChildren.length!==D.length)&&(k=0,we=!1,D=null),(R.innerHTML&&I.innerHTML==null||R.textContent&&I.textContent==null)&&u(S,""),D?X(H.dynamicChildren,D,S,O,te,O1(N,ee),me):we||J(H,N,S,null,O,te,O1(N,ee),me,!1),k>0){if(k&16)W(S,R,I,O,ee);else if(k&2&&R.class!==I.class&&s(S,"class",null,I.class,ee),k&4&&s(S,"style",R.style,I.style,ee),k&8){const Y=N.dynamicProps;for(let Se=0;Se<Y.length;Se++){const Me=Y[Se],De=R[Me],Xe=I[Me];(Xe!==De||Me==="value")&&s(S,Me,De,Xe,ee,O)}}k&1&&H.children!==N.children&&u(S,N.children)}else!we&&D==null&&W(S,R,I,O,ee);((z=I.onVnodeUpdated)||P)&&Mi(()=>{z&&bn(z,O,N,H),P&&Gr(N,H,O,"updated")},te)},X=(H,N,O,te,ee,me,we)=>{for(let S=0;S<N.length;S++){const k=H[S],D=N[S],P=k.el||Ou(k),R=P&&(k.type===Ce||!ls(k,D)||k.shapeFlag&198)?d(P):O;p(k,D,R,null,te,ee,me,we,!0)}},W=(H,N,O,te,ee)=>{if(N!==O){if(N!==lt)for(const me in N)!io(me)&&!(me in O)&&s(H,me,N[me],null,ee,te);for(const me in O){if(io(me))continue;const we=O[me],S=N[me];we!==S&&me!=="value"&&s(H,me,S,we,ee,te)}"value"in O&&s(H,"value",N.value,O.value,ee)}},A=(H,N,O,te,ee,me,we,S,k)=>{const D=N.el=H?H.el:l(""),P=N.anchor=H?H.anchor:l("");let{patchFlag:R,dynamicChildren:I,slotScopeIds:z}=N;z&&(S=S?S.concat(z):z),H==null?(n(D,O,te),n(P,O,te),B(N.children||[],O,P,ee,me,we,S,k)):R>0&&R&64&&I&&H.dynamicChildren&&H.dynamicChildren.length===I.length?(X(H.dynamicChildren,I,O,ee,me,we,S),(N.key!=null||ee&&N===ee.subTree)&&Rh(H,N,!0)):J(H,N,O,P,ee,me,we,S,k)},x=(H,N,O,te,ee,me,we,S,k)=>{N.slotScopeIds=S,H==null?N.shapeFlag&512?ee.ctx.activate(N,O,te,we,k):F(N,O,te,ee,me,we,k):ie(H,N,k)},F=(H,N,O,te,ee,me,we)=>{const S=H.component=J3(H,te,ee);if(Ko(H)&&(S.ctx.renderer=ge),Q3(S,!1,we),S.asyncDep){if(ee&&ee.registerDep(S,re,we,me),!H.el){const k=S.subTree=j(ti);_(null,k,N,O),H.placeholder=k.el}}else re(S,H,N,O,ee,me,we)},ie=(H,N,O)=>{const te=N.component=H.component;if(O3(H,N,O))if(te.asyncDep&&!te.asyncResolved){N.el=H.el,N.placeholder=H.placeholder,ue(te,N,O);return}else te.next=N,te.update();else N.el=H.el,N.placeholder=H.placeholder,te.vnode=N},re=(H,N,O,te,ee,me,we)=>{const S=()=>{if(H.isMounted){let{next:R,bu:I,u:z,parent:Y,vnode:Se}=H;{const rt=l4(H);if(rt){R&&(R.el=Se.el,ue(H,R,we)),rt.asyncDep.then(()=>{Mi(()=>{H.isUnmounted||D()},ee)});return}}let Me=R,De;Yr(H,!1),R?(R.el=Se.el,ue(H,R,we)):R=Se,I&&Z0(I),(De=R.props&&R.props.onVnodeBeforeUpdate)&&bn(De,Y,R,Se),Yr(H,!0);const Xe=lf(H),Te=H.subTree;H.subTree=Xe,p(Te,Xe,d(Te.el),U(Te),H,ee,me),R.el=Xe.el,Me===null&&I3(H,Xe.el),z&&Mi(z,ee),(De=R.props&&R.props.onVnodeUpdated)&&Mi(()=>bn(De,Y,R,Se),ee)}else{let R;const{el:I,props:z}=N,{bm:Y,m:Se,parent:Me,root:De,type:Xe}=H,Te=Ws(N);Yr(H,!1),Y&&Z0(Y),!Te&&(R=z&&z.onVnodeBeforeMount)&&bn(R,Me,N),Yr(H,!0);{De.ce&&De.ce._hasShadowRoot()&&De.ce._injectChildStyle(Xe,H.parent?H.parent.type:void 0);const rt=H.subTree=lf(H);p(null,rt,O,te,H,ee,me),N.el=rt.el}if(Se&&Mi(Se,ee),!Te&&(R=z&&z.onVnodeMounted)){const rt=N;Mi(()=>bn(R,Me,rt),ee)}(N.shapeFlag&256||Me&&Ws(Me.vnode)&&Me.vnode.shapeFlag&256)&&H.a&&Mi(H.a,ee),H.isMounted=!0,N=O=te=null}};H.scope.on();const k=H.effect=new om(S);H.scope.off();const D=H.update=k.run.bind(k),P=H.job=k.runIfDirty.bind(k);P.i=H,P.id=H.uid,k.scheduler=()=>Eh(P),Yr(H,!0),D()},ue=(H,N,O)=>{N.component=H;const te=H.vnode.props;H.vnode=N,H.next=null,V3(H,N.props,te,O),F3(H,N.children,O),Zn(),xm(H),Bn()},J=(H,N,O,te,ee,me,we,S,k=!1)=>{const D=H&&H.children,P=H?H.shapeFlag:0,R=N.children,{patchFlag:I,shapeFlag:z}=N;if(I>0){if(I&128){ne(D,R,O,te,ee,me,we,S,k);return}else if(I&256){ae(D,R,O,te,ee,me,we,S,k);return}}z&8?(P&16&&ye(D,ee,me),R!==D&&u(O,R)):P&16?z&16?ne(D,R,O,te,ee,me,we,S,k):ye(D,ee,me,!0):(P&8&&u(O,""),z&16&&B(R,O,te,ee,me,we,S,k))},ae=(H,N,O,te,ee,me,we,S,k)=>{H=H||os,N=N||os;const D=H.length,P=N.length,R=Math.min(D,P);let I;for(I=0;I<R;I++){const z=N[I]=k?er(N[I]):En(N[I]);p(H[I],z,O,null,ee,me,we,S,k)}D>P?ye(H,ee,me,!0,!1,R):B(N,O,te,ee,me,we,S,k,R)},ne=(H,N,O,te,ee,me,we,S,k)=>{let D=0;const P=N.length;let R=H.length-1,I=P-1;for(;D<=R&&D<=I;){const z=H[D],Y=N[D]=k?er(N[D]):En(N[D]);if(ls(z,Y))p(z,Y,O,null,ee,me,we,S,k);else break;D++}for(;D<=R&&D<=I;){const z=H[R],Y=N[I]=k?er(N[I]):En(N[I]);if(ls(z,Y))p(z,Y,O,null,ee,me,we,S,k);else break;R--,I--}if(D>R){if(D<=I){const z=I+1,Y=z<P?N[z].el:te;for(;D<=I;)p(null,N[D]=k?er(N[D]):En(N[D]),O,Y,ee,me,we,S,k),D++}}else if(D>I)for(;D<=R;)oe(H[D],ee,me,!0),D++;else{const z=D,Y=D,Se=new Map;for(D=Y;D<=I;D++){const Ut=N[D]=k?er(N[D]):En(N[D]);Ut.key!=null&&Se.set(Ut.key,D)}let Me,De=0;const Xe=I-Y+1;let Te=!1,rt=0;const It=new Array(Xe);for(D=0;D<Xe;D++)It[D]=0;for(D=z;D<=R;D++){const Ut=H[D];if(De>=Xe){oe(Ut,ee,me,!0);continue}let Rt;if(Ut.key!=null)Rt=Se.get(Ut.key);else for(Me=Y;Me<=I;Me++)if(It[Me-Y]===0&&ls(Ut,N[Me])){Rt=Me;break}Rt===void 0?oe(Ut,ee,me,!0):(It[Rt-Y]=D+1,Rt>=rt?rt=Rt:Te=!0,p(Ut,N[Rt],O,null,ee,me,we,S,k),De++)}const un=Te?j3(It):os;for(Me=un.length-1,D=Xe-1;D>=0;D--){const Ut=Y+D,Rt=N[Ut],vn=N[Ut+1],gn=Ut+1<P?vn.el||Ou(vn):te;It[D]===0?p(null,Rt,O,gn,ee,me,we,S,k):Te&&(Me<0||D!==un[Me]?Q(Rt,O,gn,2):Me--)}}},Q=(H,N,O,te,ee=null)=>{const{el:me,type:we,transition:S,children:k,shapeFlag:D}=H;if(D&6){Q(H.component.subTree,N,O,te);return}if(D&128){H.suspense.move(N,O,te);return}if(D&64){we.move(H,N,O,ge);return}if(we===Ce){n(me,N,O);for(let R=0;R<k.length;R++)Q(k[R],N,O,te);n(H.anchor,N,O);return}if(we===I1){C(H,N,O);return}if(te!==2&&D&1&&S)if(te===0)S.persisted&&!me[Ji]?n(me,N,O):(S.beforeEnter(me),n(me,N,O),Mi(()=>S.enter(me),ee));else{const{leave:R,delayLeave:I,afterLeave:z}=S,Y=()=>{H.ctx.isUnmounted?r(me):n(me,N,O)},Se=()=>{const Me=me._isLeaving||!!me[Ji];me._isLeaving&&me[Ji](!0),S.persisted&&!Me?Y():R(me,()=>{Y(),z&&z()})};I?I(me,Y,Se):Se()}else n(me,N,O)},oe=(H,N,O,te=!1,ee=!1)=>{const{type:me,props:we,ref:S,children:k,dynamicChildren:D,shapeFlag:P,patchFlag:R,dirs:I,cacheIndex:z,memo:Y}=H;if((R===-2||D&&D.hasOnce)&&(ee=!1),S!=null&&(Zn(),so(S,null,O,H,!0),Bn()),z!=null&&(!H.ctx||H.ctx===N)&&(N.renderCache[z]=void 0),P&256){N.ctx.deactivate(H);return}const Se=P&1&&I,Me=!Ws(H);let De;if(Me&&(De=we&&we.onVnodeBeforeUnmount)&&bn(De,N,H),P&6)pe(H.component,O,te);else{if(P&128){H.suspense.unmount(O,te);return}Se&&Gr(H,null,N,"beforeUnmount"),P&64?H.type.remove(H,N,O,ge,te):D&&!D.hasOnce&&(me!==Ce||R>0&&R&64)?ye(D,N,O,!1,!0):(me===Ce&&R&384||!ee&&P&16)&&ye(k,N,O),te&&ve(H)}const Xe=Y!=null&&z==null;(Me&&(De=we&&we.onVnodeUnmounted)||Se||Xe)&&Mi(()=>{De&&bn(De,N,H),Se&&Gr(H,null,N,"unmounted"),Xe&&(H.el=null)},O)},ve=H=>{const{type:N,el:O,anchor:te,transition:ee}=H,me=N===Ce;if(me&&!ee){fe(O,te);return}if(N===I1){g(H),ee&&!ee.persisted&&ee.afterLeave&&ee.afterLeave();return}const we=me?yo(H):H,S=()=>{me?d(O)&&fe(O,te):r(O),ee&&!ee.persisted&&ee.afterLeave&&ee.afterLeave()};if(we&&we.shapeFlag&1&&ee&&!ee.persisted){const{leave:k,delayLeave:D}=ee,P=we.el,R=()=>k(P,S);D?D(P,S,R):R()}else S()},fe=(H,N)=>{let O;for(;H!==N;)O=h(H),r(H),H=O;r(N)},pe=(H,N,O)=>{const{bum:te,scope:ee,job:me,subTree:we,um:S,m:k,a:D}=H;uf(k),uf(D),te&&Z0(te),ee.stop(),me?(me.flags|=8,oe(we,H,N,O)):H.vnode.el&&we&&(we.transition=H.vnode.transition,oe(we,H,N,O)),S&&Mi(S,N),Mi(()=>{H.isUnmounted=!0},N)},ye=(H,N,O,te=!1,ee=!1,me=0)=>{for(let we=me;we<H.length;we++)oe(H[we],N,O,te,ee)},U=H=>{if(H.shapeFlag&6)return U(H.component.subTree);if(H.shapeFlag&128)return H.suspense.next();const N=h(H.anchor||H.el),O=N&&N[Om];return O?h(O):N},_e=(H,N,O)=>{const te=H&&N._vnode?void 0:H&&H.component?H.component.uid:X3();X5(()=>{H==null?N._vnode&&oe(N._vnode,null,null,!0):p(N._vnode||null,H,N,null,null,null,O),N._vnode=H},te)},ge={p,um:oe,m:Q,r:ve,mt:F,mc:B,pc:J,pbc:X,n:U,o:e};return{render:_e,hydrate:void 0,createApp:x3(_e)}}function O1({type:e,props:t},i){return i==="svg"&&e==="foreignObject"||i==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:i}function Yr({effect:e,job:t},i){i?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function W3(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Rh(e,t,i=!1){const n=e.children,r=t.children;if(Ze(n)&&Ze(r))for(let s=0;s<n.length;s++){const a=n[s];let l=r[s];l.shapeFlag&1&&!l.dynamicChildren&&((l.patchFlag<=0||l.patchFlag===32)&&(l=r[s]=er(r[s]),l.el=a.el),!i&&l.patchFlag!==-2&&Rh(a,l)),l.type===Br&&(l.patchFlag===-1&&(l=r[s]=er(l)),l.el=a.el),l.type===ti&&!l.el&&(l.el=a.el)}}function j3(e){const t=e.slice(),i=[0];let n,r,s,a,l;const o=e.length;for(n=0;n<o;n++){const c=e[n];if(c!==0){if(r=i[i.length-1],e[r]<c){t[n]=r,i.push(n);continue}for(s=0,a=i.length-1;s<a;)l=s+a>>1,e[i[l]]<c?s=l+1:a=l;c<e[i[s]]&&(s>0&&(t[n]=i[s-1]),i[s]=n)}}for(s=i.length,a=i[s-1];s-- >0;)i[s]=a,a=t[a];return i}function l4(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:l4(t)}function uf(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function Ou(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?Ou(t.subTree):null}const o4=e=>e.__isSuspense;function K3(e,t){t&&t.pendingBranch?Ze(e)?t.effects.push(...e):t.effects.push(e):Y5(e)}const Ce=Symbol.for("v-fgt"),Br=Symbol.for("v-txt"),ti=Symbol.for("v-cmt"),I1=Symbol.for("v-stc"),cr=[];let Bi=null;function m(e=!1){cr.push(Bi=e?null:[])}function Vh(){cr.pop(),Bi=cr[cr.length-1]||null}let So=1;function uc(e,t=!1){So+=e,e<0&&Bi&&t&&(Bi.hasOnce=!0)}function c4(e){return e.dynamicChildren=So>0?Bi||os:null,Vh(),So>0&&Bi&&Bi.push(e),e}function M(e,t,i,n,r,s){return c4(b(e,t,i,n,r,s,!0))}function he(e,t,i,n,r){return c4(j(e,t,i,n,r,!0))}function Ks(e){return e?e.__v_isVNode===!0:!1}function ls(e,t){return e.type===t.type&&e.key===t.key}const u4=({key:e})=>e??null,B0=({ref:e,ref_key:t,ref_for:i})=>(typeof e=="number"&&(e=""+e),e!=null?St(e)||At(e)||je(e)?{i:_i,r:e,k:t,f:!!i}:e:null);function b(e,t=null,i=null,n=0,r=null,s=e===Ce?0:1,a=!1,l=!1){const o={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&u4(t),ref:t&&B0(t),scopeId:Nm,slotScopeIds:null,children:i,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:n,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:_i};return l?(dc(o,i),s&128&&e.normalize(o)):i&&(o.shapeFlag|=St(i)?8:16),So>0&&!a&&Bi&&(o.patchFlag>0||s&6)&&o.patchFlag!==32&&Bi.push(o),o}const j=q3;function q3(e,t=null,i=null,n=0,r=null,s=!1){if((!e||e===Bm)&&(e=ti),Ks(e)){const l=Rr(e,t,!0);return i&&dc(l,i),So>0&&!s&&Bi&&(l.shapeFlag&6?Bi[Bi.indexOf(e)]=l:Bi.push(l)),l.patchFlag=-2,l}if(ny(e)&&(e=e.__vccOpts),t){t=G3(t);let{class:l,style:o}=t;l&&!St(l)&&(t.class=Le(l)),ut(o)&&(Yc(o)&&!Ze(o)&&(o=Ft({},o)),t.style=mi(o))}const a=St(e)?1:o4(e)?128:Xc(e)?64:ut(e)?4:je(e)?2:0;return b(e,t,i,n,r,a,s,!0)}function G3(e){return e?Yc(e)||t4(e)?Ft({},e):e:null}function Rr(e,t,i=!1,n=!1){const{props:r,ref:s,patchFlag:a,children:l,transition:o}=e,c=t?Zt(r||{},t):r,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&u4(c),ref:t&&t.ref?i&&s?Ze(s)?s.concat(B0(t)):[s,B0(t)]:B0(t):s,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Ce?a===-1?16:a|16:a,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:o,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Rr(e.ssContent),ssFallback:e.ssFallback&&Rr(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce,cacheIndex:e.cacheIndex};return o&&n&&js(u,o.clone(u)),u}function le(e=" ",t=0){return j(Br,null,e,t)}function V(e="",t=!1){return t?(m(),he(ti,null,e)):j(ti,null,e)}function En(e){return e==null||typeof e=="boolean"?j(ti):Ze(e)?j(Ce,null,e.slice()):Ks(e)?er(e):j(Br,null,String(e))}function er(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Rr(e)}function dc(e,t){let i=0;const{shapeFlag:n}=e;if(t==null)t=null;else if(Ze(t))i=16;else if(typeof t=="object")if(n&65){const r=t.default;r&&(r._c&&(r._d=!1),dc(e,r()),r._c&&(r._d=!0));return}else{i=32;const r=t._;!r&&!t4(t)?t._ctx=_i:r===3&&_i&&(_i.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(je(t)){if(n&65){dc(e,{default:t});return}t={default:t,_ctx:_i},i=32}else t=String(t),n&64?(i=16,t=[le(t)]):i=8;e.children=t,e.shapeFlag|=i}function Zt(...e){const t={};for(let i=0;i<e.length;i++){const n=e[i];for(const r in n)if(r==="class")t.class!==n.class&&(t.class=Le([t.class,n.class]));else if(r==="style")t.style=mi([t.style,n.style]);else if(Bc(r)){const s=t[r],a=n[r];a&&s!==a&&!(Ze(s)&&s.includes(a))?t[r]=s?[].concat(s,a):a:a==null&&s==null&&!Fc(r)&&(t[r]=a)}else r!==""&&(t[r]=n[r])}return t}function bn(e,t,i,n=null){cn(e,t,7,[i,n])}const Y3=Km();let d4=0;function X3(){return d4}function J3(e,t,i){const n=e.type,r=(t?t.appContext:e.appContext)||Y3,s={uid:d4++,vnode:e,type:n,parent:t,appContext:r,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new am(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(r.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:n4(n,r),emitsOptions:Ym(n,r),emit:null,emitted:null,propsDefaults:lt,inheritAttrs:n.inheritAttrs,ctx:lt,data:lt,props:lt,attrs:lt,slots:lt,refs:lt,setupState:lt,setupContext:null,suspense:i,suspenseId:i?i.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return s.ctx={_:s},s.root=t?t.root:s,s.emit=H3.bind(null,s),e.ce&&e.ce(s),s}let fi=null;const Si=()=>fi||_i;let hc,Co;{const e=Kc(),t=(i,n)=>{let r;return(r=e[i])||(r=e[i]=[]),r.push(n),s=>{r.length>1?r.forEach(a=>a(s)):r[0](s)}};hc=t("__VUE_INSTANCE_SETTERS__",i=>fi=i),Co=t("__VUE_SSR_SETTERS__",i=>qs=i)}const Go=e=>{const t=fi;return hc(e),e.scope.on(),()=>{e.scope.off(),hc(t)}},df=()=>{fi&&fi.scope.off(),hc(null)};function h4(e){return e.vnode.shapeFlag&4}let qs=!1;function Q3(e,t=!1,i=!1){t&&Co(t);const{props:n,children:r}=e.vnode,s=h4(e);R3(e,n,s,t),B3(e,r,i||t);const a=s?ey(e,t):void 0;return t&&Co(!1),a}function ey(e,t){const i=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,S3);const{setup:n}=i;if(n){Zn();const r=e.setupContext=n.length>1?p4(e):null,s=Go(e),a=Wo(n,e,0,[e.props,r]),l=Q_(a);if(Bn(),s(),(l||e.sp)&&!Ws(e)&&Hh(e),l){if(a.then(df,df),t)return a.then(o=>{Co(!0);try{hf(e,o,t)}finally{Co(!1)}}).catch(o=>{jo(o,e,0)});e.asyncDep=a}else hf(e,a)}else f4(e)}function hf(e,t,i){je(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:ut(t)&&(e.setupState=Am(t)),f4(e)}function f4(e,t,i){const n=e.type;e.render||(e.render=n.render||Nn);{const r=Go(e);Zn();try{k3(e)}finally{Bn(),r()}}}const ty={get(e,t){return bi(e,"get",""),e[t]}};function p4(e){const t=i=>{e.exposed=i||{}};return{attrs:new Proxy(e.attrs,ty),slots:e.slots,emit:e.emit,expose:t}}function e1(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Am(Lh(e.exposed)),{get(t,i){if(i in t)return t[i];if(i in ao)return ao[i](e)},has(t,i){return i in t||i in ao}})):e.proxy}function iy(e,t=!0){return je(e)?e.displayName||e.name:e.name||t&&e.__name}function ny(e){return je(e)&&"__vccOpts"in e}const q=(e,t)=>W5(e,t,qs);function Ee(e,t,i){try{uc(-1);const n=arguments.length;return n===2?ut(t)&&!Ze(t)?Ks(t)?j(e,null,[t]):j(e,t):j(e,null,t):(n>3?i=Array.prototype.slice.call(arguments,2):n===3&&Ks(i)&&(i=[i]),j(e,t,i))}finally{uc(1)}}const ry="3.5.44";/**
|
|
14
|
-
* @vue/runtime-dom v3.5.44
|
|
15
|
-
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
16
|
-
* @license MIT
|
|
17
|
-
**/let Iu;const ff=typeof window<"u"&&window.trustedTypes;if(ff)try{Iu=ff.createPolicy("vue",{createHTML:e=>e})}catch{}const _4=Iu?e=>Iu.createHTML(e):e=>e,sy="http://www.w3.org/2000/svg",ay="http://www.w3.org/1998/Math/MathML",Qn=typeof document<"u"?document:null,pf=Qn&&Qn.createElement("template"),ly={insert:(e,t,i)=>{t.insertBefore(e,i||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,i,n)=>{const r=t==="svg"?Qn.createElementNS(sy,e):t==="mathml"?Qn.createElementNS(ay,e):i?Qn.createElement(e,{is:i}):Qn.createElement(e);return e==="select"&&n&&n.multiple!=null&&r.setAttribute("multiple",n.multiple),r},createText:e=>Qn.createTextNode(e),createComment:e=>Qn.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Qn.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,i,n,r,s){const a=i?i.previousSibling:t.lastChild;if(r&&(r===s||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),i),!(r===s||!(r=r.nextSibling)););else{pf.innerHTML=_4(n==="svg"?`<svg>${e}</svg>`:n==="mathml"?`<math>${e}</math>`:e);const l=pf.content;if(n==="svg"||n==="mathml"){const o=l.firstChild;for(;o.firstChild;)l.appendChild(o.firstChild);l.removeChild(o)}t.insertBefore(l,i)}return[a?a.nextSibling:t.firstChild,i?i.previousSibling:t.lastChild]}},vr="transition",Pl="animation",ko=Symbol("_vtc"),m4={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},oy=Ft({},Im,m4),cy=e=>(e.displayName="Transition",e.props=oy,e),Dh=cy((e,{slots:t})=>Ee(o3,uy(e),t)),Xr=(e,t=[])=>{Ze(e)?e.forEach(i=>i(...t)):e&&e(...t)},_f=e=>e?Ze(e)?e.some(t=>t.length>1):e.length>1:!1;function uy(e){const t={};for(const A in e)A in m4||(t[A]=e[A]);if(e.css===!1)return t;const{name:i="v",type:n,duration:r,enterFromClass:s=`${i}-enter-from`,enterActiveClass:a=`${i}-enter-active`,enterToClass:l=`${i}-enter-to`,appearFromClass:o=s,appearActiveClass:c=a,appearToClass:u=l,leaveFromClass:d=`${i}-leave-from`,leaveActiveClass:h=`${i}-leave-active`,leaveToClass:f=`${i}-leave-to`}=e,v=dy(r),p=v&&v[0],w=v&&v[1],{onBeforeEnter:_,onEnter:y,onEnterCancelled:C,onLeave:g,onLeaveCancelled:$,onBeforeAppear:E=_,onAppear:L=y,onAppearCancelled:B=C}=t,T=(A,x,F,ie)=>{A._enterCancelled=ie,Jr(A,x?u:l),Jr(A,x?c:a),F&&F()},X=(A,x)=>{A._isLeaving=!1,Jr(A,d),Jr(A,f),Jr(A,h),x&&x()},W=A=>(x,F)=>{const ie=A?L:y,re=()=>T(x,A,F);Xr(ie,[x,re]),mf(()=>{Jr(x,A?o:s),qn(x,A?u:l),_f(ie)||vf(x,n,p,re)})};return Ft(t,{onBeforeEnter(A){Xr(_,[A]),qn(A,s),qn(A,a)},onBeforeAppear(A){Xr(E,[A]),qn(A,o),qn(A,c)},onEnter:W(!1),onAppear:W(!0),onLeave(A,x){A._isLeaving=!0;const F=()=>X(A,x);qn(A,d),A._enterCancelled?(qn(A,h),yf(A)):(yf(A),qn(A,h)),mf(()=>{A._isLeaving&&(Jr(A,d),qn(A,f),_f(g)||vf(A,n,w,F))}),Xr(g,[A,F])},onEnterCancelled(A){T(A,!1,void 0,!0),Xr(C,[A])},onAppearCancelled(A){T(A,!0,void 0,!0),Xr(B,[A])},onLeaveCancelled(A){X(A),Xr($,[A])}})}function dy(e){if(e==null)return null;if(ut(e))return[R1(e.enter),R1(e.leave)];{const t=R1(e);return[t,t]}}function R1(e){return c5(e)}function qn(e,t){t.split(/\s+/).forEach(i=>i&&e.classList.add(i)),(e[ko]||(e[ko]=new Set)).add(t)}function Jr(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.remove(n));const i=e[ko];i&&(i.delete(t),i.size||(e[ko]=void 0))}function mf(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let hy=0;function vf(e,t,i,n){const r=e._endId=++hy,s=()=>{r===e._endId&&n()};if(i!=null)return setTimeout(s,i);const{type:a,timeout:l,propCount:o}=fy(e,t);if(!a)return n();const c=a+"end";let u=0;const d=()=>{e.removeEventListener(c,h),s()},h=f=>{f.target===e&&++u>=o&&d()};setTimeout(()=>{u<o&&d()},l+1),e.addEventListener(c,h)}function fy(e,t){const i=window.getComputedStyle(e),n=v=>(i[v]||"").split(", "),r=n(`${vr}Delay`),s=n(`${vr}Duration`),a=gf(r,s),l=n(`${Pl}Delay`),o=n(`${Pl}Duration`),c=gf(l,o);let u=null,d=0,h=0;t===vr?a>0&&(u=vr,d=a,h=s.length):t===Pl?c>0&&(u=Pl,d=c,h=o.length):(d=Math.max(a,c),u=d>0?a>c?vr:Pl:null,h=u?u===vr?s.length:o.length:0);const f=u===vr&&/\b(?:transform|all)(?:,|$)/.test(n(`${vr}Property`).toString());return{type:u,timeout:d,propCount:h,hasTransform:f}}function gf(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((i,n)=>bf(i)+bf(e[n])))}function bf(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function yf(e){return(e?e.ownerDocument:document).body.offsetHeight}function py(e,t,i){const n=e[ko];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):i?e.setAttribute("class",t):e.className=t}const fc=Symbol("_vod"),v4=Symbol("_vsh"),Zh={name:"show",beforeMount(e,{value:t},{transition:i}){e[fc]=e.style.display==="none"?"":e.style.display,i&&t?i.beforeEnter(e):Ol(e,t)},mounted(e,{value:t},{transition:i}){i&&t&&i.enter(e)},updated(e,{value:t,oldValue:i},{transition:n}){!t!=!i&&(n?t?(n.beforeEnter(e),Ol(e,!0),n.enter(e)):n.leave(e,()=>{Ol(e,!1)}):Ol(e,t))},beforeUnmount(e,{value:t}){Ol(e,t)}};function Ol(e,t){e.style.display=t?e[fc]:"none",e[v4]=!t}const _y=Symbol(""),my=/(?:^|;)\s*display\s*:/;function vy(e,t,i){const n=e.style,r=St(i);let s=!1;if(i&&!r){if(t)if(St(t))for(const a of t.split(";")){const l=a.slice(0,a.indexOf(":")).trim();i[l]==null&&Gl(n,l,"")}else for(const a in t)i[a]==null&&Gl(n,a,"");for(const a in i){a==="display"&&(s=!0);const l=i[a];l!=null?by(e,a,!St(t)&&t?t[a]:void 0,l)||Gl(n,a,l):Gl(n,a,"")}}else if(r){if(t!==i){const a=n[_y];a&&(i+=";"+a),n.cssText=i,s=my.test(i)}}else t&&e.removeAttribute("style");fc in e&&((!r||t!==i)&&(e[fc]=s?n.display:""),e[v4]&&(n.display="none"))}const m0=/\s*!important$/;function Gl(e,t,i){if(Ze(i))i.forEach(n=>Gl(e,t,n));else if(i==null&&(i=""),t.startsWith("--"))m0.test(i)?e.setProperty(t,i.replace(m0,""),"important"):e.setProperty(t,i);else{const n=gy(e,t);m0.test(i)?e.setProperty(hr(n),i.replace(m0,""),"important"):e[n]=i}}const wf=["Webkit","Moz","ms"],V1={};function gy(e,t){const i=V1[t];if(i)return i;let n=wi(t);if(n!=="filter"&&n in e)return V1[t]=n;n=Wc(n);for(let r=0;r<wf.length;r++){const s=wf[r]+n;if(s in e)return V1[t]=s}return t}function by(e,t,i,n){return e.tagName==="TEXTAREA"&&(t==="width"||t==="height")&&St(n)&&i===n}const Sf="http://www.w3.org/1999/xlink";function Cf(e,t,i,n,r,s=m5(t)){n&&t.startsWith("xlink:")?i==null?e.removeAttributeNS(Sf,t.slice(6,t.length)):e.setAttributeNS(Sf,t,i):i==null||s&&!nm(i)?e.removeAttribute(t):e.setAttribute(t,s?"":ji(i)?String(i):i)}function kf(e,t,i,n,r){if(t==="innerHTML"||t==="textContent"){i!=null&&(e[t]=t==="innerHTML"?_4(i):i);return}const s=e.tagName;if(t==="value"&&s!=="PROGRESS"&&!s.includes("-")){const l=s==="OPTION"?e.getAttribute("value")||"":e.value,o=i==null?e.type==="checkbox"?"on":"":String(i);(l!==o||!("_value"in e))&&(e.value=o),i==null&&e.removeAttribute(t),e._value=i;return}let a=!1;if(i===""||i==null){const l=typeof e[t];l==="boolean"?i=nm(i):i==null&&l==="string"?(i="",a=!0):l==="number"&&(i=0,a=!0)}try{e[t]=i}catch{}a&&e.removeAttribute(r||t)}function nr(e,t,i,n){e.addEventListener(t,i,n)}function yy(e,t,i,n){e.removeEventListener(t,i,n)}const Af=Symbol("_vei");function wy(e,t,i,n,r=null){const s=e[Af]||(e[Af]={}),a=s[t];if(n&&a)a.value=n;else{const[l,o]=ky(t);if(n){const c=s[t]=$y(n,r);nr(e,l,c,o)}else a&&(yy(e,l,a,o),s[t]=void 0)}}const Sy=/(Once|Passive|Capture)$/,Cy=/^on:?(?:Once|Passive|Capture)$/;function ky(e){let t,i;for(;(i=e.match(Sy))&&!Cy.test(e);)t||(t={}),e=e.slice(0,e.length-i[1].length),t[i[1].toLowerCase()]=!0;return[e[2]===":"?e.slice(3):hr(e.slice(2)),t]}let D1=0;const Ay=Promise.resolve(),My=()=>D1||(Ay.then(()=>D1=0),D1=Date.now());function $y(e,t){const i=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=i.attached)return;const r=i.value;if(Ze(r)){const s=n.stopImmediatePropagation;n.stopImmediatePropagation=()=>{s.call(n),n._stopped=!0};const a=r.slice(),l=[n];for(let o=0;o<a.length&&!n._stopped;o++){const c=a[o];c&&cn(c,t,5,l)}}else cn(r,t,5,[n])};return i.value=e,i.attached=My(),i}const Mf=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Ly=(e,t,i,n,r,s)=>{const a=r==="svg";t==="class"?py(e,n,a):t==="style"?vy(e,i,n):Bc(t)?Fc(t)||wy(e,t,i,n,s):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Ey(e,t,n,a))?(kf(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Cf(e,t,n,a,s,t!=="value")):e._isVueCE&&(xy(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!St(n)))?kf(e,wi(t),n,s,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),Cf(e,t,n,a))};function Ey(e,t,i,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&Mf(t)&&je(i));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return Mf(t)&&St(i)?!1:t in e}function xy(e,t){const i=e._def.props;if(!i)return!1;const n=wi(t);return Array.isArray(i)?i.some(r=>wi(r)===n):Object.keys(i).some(r=>wi(r)===n)}const Vr=e=>{const t=e.props["onUpdate:modelValue"]||!1;return Ze(t)?i=>Z0(t,i):t};function Hy(e){e.target.composing=!0}function $f(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Fi=Symbol("_assign"),v0=Symbol("_initialValue");function Z1(e,t,i){return t&&(e=e.trim()),i&&(e=jc(e)),e}const Ao={created(e,{modifiers:{lazy:t,trim:i,number:n}},r){e.parentNode&&(e.type==="text"?e[v0]=e.defaultValue.replace(/[\r\n]/g,""):e.type==="textarea"&&(e[v0]=e.defaultValue.replace(/\r\n?/g,`
|
|
18
|
-
`))),e[Fi]=Vr(r);const s=n||r.props&&r.props.type==="number";nr(e,t?"change":"input",a=>{a.target.composing||e[Fi](Z1(e.value,i,s))}),(i||s)&&nr(e,"change",()=>{e.value=Z1(e.value,i,s)}),t||(nr(e,"compositionstart",Hy),nr(e,"compositionend",$f),nr(e,"change",$f))},mounted(e,{value:t,modifiers:{trim:i,number:n}}){const r=t??"",s=e[v0];delete e[v0],s!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==s?e[Fi](Z1(e.value,i,n)):e.value=r},beforeUpdate(e,{value:t,oldValue:i,modifiers:{lazy:n,trim:r,number:s}},a){if(e[Fi]=Vr(a),e.composing)return;const l=(s||e.type==="number")&&!/^0\d/.test(e.value)?jc(e.value):e.value,o=t??"";if(l===o)return;const c=e.getRootNode();(c instanceof Document||c instanceof ShadowRoot)&&c.activeElement===e&&e.type!=="range"&&(n&&t===i||r&&e.value.trim()===o)||(e.value=o)}},g4={deep:!0,created(e,t,i){e[Fi]=Vr(i),nr(e,"change",()=>{const n=e._modelValue,r=Gs(e),s=e.checked,a=e[Fi];if(Ze(n)){const l=wh(n,r),o=l!==-1;if(s&&!o)a(n.concat(r));else if(!s&&o){const c=[...n];c.splice(l,1),a(c)}}else if(ur(n)){const l=new Set(n);s?l.add(r):l.delete(r),a(l)}else a(b4(e,s))})},mounted:Lf,beforeUpdate(e,t,i){e[Fi]=Vr(i),Lf(e,t,i)}};function Lf(e,{value:t,oldValue:i},n){e._modelValue=t;let r;if(Ze(t))r=wh(t,n.props.value)>-1;else if(ur(t))r=t.has(n.props.value);else{if(t===i)return;r=_n(t,b4(e,!0))}e.checked!==r&&(e.checked=r)}const Ty={created(e,{value:t},i){e.checked=_n(t,i.props.value),e[Fi]=Vr(i),nr(e,"change",()=>{e[Fi](Gs(e))})},beforeUpdate(e,{value:t,oldValue:i},n){e[Fi]=Vr(n),t!==i&&(e.checked=_n(t,n.props.value))}},Ny={deep:!0,created(e,{value:t,modifiers:{number:i}},n){e._modelValue=t,nr(e,"change",()=>{const r=Array.prototype.filter.call(e.options,o=>o.selected).map(o=>i?jc(Gs(o)):Gs(o)),s=e.multiple,a=s?ur(e._modelValue)?new Set(r):r:r[0],l=e._pendingValue=[s,s?Ze(a)?r.slice():r:a];try{e[Fi](a)}finally{Gt(()=>{e._pendingValue===l&&(e._pendingValue=void 0)})}}),e[Fi]=Vr(n)},mounted(e,{value:t}){Ef(e,t)},beforeUpdate(e,{value:t},i){e._modelValue=t,e[Fi]=Vr(i)},updated(e,{value:t}){const i=e._pendingValue;e._pendingValue=void 0,(!i||i[0]!==e.multiple||!Py(t,i[1],i[0]))&&Ef(e,t)}};function Py(e,t,i){if(!i||Ze(e))return _n(e,t);if(ur(e)){if(e.size!==t.length)return!1;for(const n of t)if(!e.has(n))return!1;return!0}return!1}function Ef(e,t){const i=e.multiple,n=Ze(t);if(!(i&&!n&&!ur(t))){for(let r=0,s=e.options.length;r<s;r++){const a=e.options[r],l=Gs(a);if(i)if(n){const o=typeof l;o==="string"||o==="number"?a.selected=t.some(c=>String(c)===String(l)):a.selected=wh(t,l)>-1}else a.selected=t.has(l);else if(_n(Gs(a),t)){e.selectedIndex!==r&&(e.selectedIndex=r);return}}!i&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Gs(e){return"_value"in e?e._value:e.value}function b4(e,t){const i=t?"_trueValue":"_falseValue";return i in e?e[i]:t}const xf={created(e,t,i){g0(e,t,i,null,"created")},mounted(e,t,i){g0(e,t,i,null,"mounted")},beforeUpdate(e,t,i,n){g0(e,t,i,n,"beforeUpdate")},updated(e,t,i,n){g0(e,t,i,n,"updated")}};function Oy(e,t){switch(e){case"SELECT":return Ny;case"TEXTAREA":return Ao;default:switch(t){case"checkbox":return g4;case"radio":return Ty;default:return Ao}}}function g0(e,t,i,n,r){const a=Oy(e.tagName,i.props&&i.props.type)[r];a&&a(e,t,i,n)}const Iy=["ctrl","shift","alt","meta"],Ry={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Iy.some(i=>e[`${i}Key`]&&!t.includes(i))},qe=(e,t)=>{if(!e)return e;const i=e._withMods||(e._withMods={}),n=t.join(".");return i[n]||(i[n]=(r,...s)=>{for(let a=0;a<t.length;a++){const l=Ry[t[a]];if(l&&l(r,t))return}return e(r,...s)})},Vy={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},xi=(e,t)=>{const i=e._withKeys||(e._withKeys={}),n=t.join(".");return i[n]||(i[n]=r=>{if(!("key"in r))return;const s=hr(r.key);if(t.some(a=>a===s||Vy[a]===s))return e(r)})},Dy=Ft({patchProp:Ly},ly);let Hf;function Zy(){return Hf||(Hf=z3(Dy))}const y4=(...e)=>{const t=Zy().createApp(...e),{mount:i}=t;return t.mount=n=>{const r=Fy(n);if(!r)return;const s=t._component;!je(s)&&!s.render&&!s.template&&(s.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const a=i(r,!1,By(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),a},t};function By(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Fy(e){return St(e)?document.querySelector(e):e}/*!
|
|
19
|
-
* pinia v2.3.1
|
|
20
|
-
* (c) 2025 Eduardo San Martin Morote
|
|
21
|
-
* @license MIT
|
|
22
|
-
*/let w4;const t1=e=>w4=e,S4=Symbol();function Ru(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var lo;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(lo||(lo={}));function zy(){const e=Sh(!0),t=e.run(()=>K({}));let i=[],n=[];const r=Lh({install(s){t1(r),r._a=s,s.provide(S4,r),s.config.globalProperties.$pinia=r,n.forEach(a=>i.push(a)),n=[]},use(s){return this._a?i.push(s):n.push(s),this},_p:i,_a:null,_e:e,_s:new Map,state:t});return r}const C4=()=>{};function Tf(e,t,i,n=C4){e.push(t);const r=()=>{const s=e.indexOf(t);s>-1&&(e.splice(s,1),n())};return!i&&lm()&&tc(r),r}function Es(e,...t){e.slice().forEach(i=>{i(...t)})}const Uy=e=>e(),Nf=Symbol(),B1=Symbol();function Vu(e,t){e instanceof Map&&t instanceof Map?t.forEach((i,n)=>e.set(n,i)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const i in t){if(!t.hasOwnProperty(i))continue;const n=t[i],r=e[i];Ru(r)&&Ru(n)&&e.hasOwnProperty(i)&&!At(n)&&!Pn(n)?e[i]=Vu(r,n):e[i]=n}return e}const Wy=Symbol();function jy(e){return!Ru(e)||!e.hasOwnProperty(Wy)}const{assign:Cr}=Object;function Ky(e){return!!(At(e)&&e.effect)}function qy(e,t,i,n){const{state:r,actions:s,getters:a}=t,l=i.state.value[e];let o;function c(){l||(i.state.value[e]=r?r():{});const u=B5(i.state.value[e]);return Cr(u,s,Object.keys(a||{}).reduce((d,h)=>(d[h]=Lh(q(()=>{t1(i);const f=i._s.get(e);return a[h].call(f,f)})),d),{}))}return o=k4(e,c,t,i,n,!0),o}function k4(e,t,i={},n,r,s){let a;const l=Cr({actions:{}},i),o={deep:!0};let c,u,d=[],h=[],f;const v=n.state.value[e];!s&&!v&&(n.state.value[e]={});let p;function w(B){let T;c=u=!1,typeof B=="function"?(B(n.state.value[e]),T={type:lo.patchFunction,storeId:e,events:f}):(Vu(n.state.value[e],B),T={type:lo.patchObject,payload:B,storeId:e,events:f});const X=p=Symbol();Gt().then(()=>{p===X&&(c=!0)}),u=!0,Es(d,T,n.state.value[e])}const _=s?function(){const{state:T}=i,X=T?T():{};this.$patch(W=>{Cr(W,X)})}:C4;function y(){a.stop(),d=[],h=[],n._s.delete(e)}const C=(B,T="")=>{if(Nf in B)return B[B1]=T,B;const X=function(){t1(n);const W=Array.from(arguments),A=[],x=[];function F(ue){A.push(ue)}function ie(ue){x.push(ue)}Es(h,{args:W,name:X[B1],store:$,after:F,onError:ie});let re;try{re=B.apply(this&&this.$id===e?this:$,W)}catch(ue){throw Es(x,ue),ue}return re instanceof Promise?re.then(ue=>(Es(A,ue),ue)).catch(ue=>(Es(x,ue),Promise.reject(ue))):(Es(A,re),re)};return X[Nf]=!0,X[B1]=T,X},g={_p:n,$id:e,$onAction:Tf.bind(null,h),$patch:w,$reset:_,$subscribe(B,T={}){const X=Tf(d,B,T.detached,()=>W()),W=a.run(()=>Ve(()=>n.state.value[e],A=>{(T.flush==="sync"?u:c)&&B({storeId:e,type:lo.direct,events:f},A)},Cr({},o,T)));return X},$dispose:y},$=vs(g);n._s.set(e,$);const L=(n._a&&n._a.runWithContext||Uy)(()=>n._e.run(()=>(a=Sh()).run(()=>t({action:C}))));for(const B in L){const T=L[B];if(At(T)&&!Ky(T)||Pn(T))s||(v&&jy(T)&&(At(T)?T.value=v[B]:Vu(T,v[B])),n.state.value[e][B]=T);else if(typeof T=="function"){const X=C(T,B);L[B]=X,l.actions[B]=T}}return Cr($,L),Cr(st($),L),Object.defineProperty($,"$state",{get:()=>n.state.value[e],set:B=>{w(T=>{Cr(T,B)})}}),n._p.forEach(B=>{Cr($,a.run(()=>B({store:$,app:n._a,pinia:n,options:l})))}),v&&s&&i.hydrate&&i.hydrate($.$state,v),c=!0,u=!0,$}/*! #__NO_SIDE_EFFECTS__ */function i1(e,t,i){let n,r;const s=typeof t=="function";typeof e=="string"?(n=e,r=s?i:t):(r=e,n=e.id);function a(l,o){const c=J5();return l=l||(c?Mt(S4,null):null),l&&t1(l),l=w4,l._s.has(n)||(s?k4(n,t,r,l):qy(n,r,l)),l._s.get(n)}return a.$id=n,a}/*!
|
|
23
|
-
* shared v11.3.0
|
|
24
|
-
* (c) 2026 kazuya kawaguchi
|
|
25
|
-
* Released under the MIT License.
|
|
26
|
-
*/function Gy(e,t){typeof console<"u"&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}const pc=typeof window<"u",Fr=(e,t=!1)=>t?Symbol.for(e):Symbol(e),Yy=(e,t,i)=>Xy({l:e,k:t,s:i}),Xy=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),qt=e=>typeof e=="number"&&isFinite(e),A4=e=>Bh(e)==="[object Date]",Ys=e=>Bh(e)==="[object RegExp]",n1=e=>it(e)&&Object.keys(e).length===0,ii=Object.assign,Jy=Object.create,vt=(e=null)=>Jy(e);let Pf;const cs=()=>Pf||(Pf=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:vt());function Of(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/").replace(/=/g,"=")}function If(e){return e.replace(/&(?![a-zA-Z0-9#]{2,6};)/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}function Qy(e){return e=e.replace(/(\w+)\s*=\s*"([^"]*)"/g,(n,r,s)=>`${r}="${If(s)}"`),e=e.replace(/(\w+)\s*=\s*'([^']*)'/g,(n,r,s)=>`${r}='${If(s)}'`),/\s*on\w+\s*=\s*["']?[^"'>]+["']?/gi.test(e)&&(e=e.replace(/(\s+)(on)(\w+\s*=)/gi,"$1on$3")),[/(\s+(?:href|src|action|formaction)\s*=\s*["']?)\s*javascript:/gi,/(style\s*=\s*["'][^"']*url\s*\(\s*)javascript:/gi].forEach(n=>{e=e.replace(n,"$1javascript:")}),e}const e7=Object.prototype.hasOwnProperty;function nn(e,t){return e7.call(e,t)}const Nt=Array.isArray,kt=e=>typeof e=="function",Oe=e=>typeof e=="string",ot=e=>typeof e=="boolean",pt=e=>e!==null&&typeof e=="object",t7=e=>pt(e)&&kt(e.then)&&kt(e.catch),M4=Object.prototype.toString,Bh=e=>M4.call(e),it=e=>Bh(e)==="[object Object]",i7=e=>e==null?"":Nt(e)||it(e)&&e.toString===M4?JSON.stringify(e,null,2):String(e);function Fh(e,t=""){return e.reduce((i,n,r)=>r===0?i+n:i+t+n,"")}const b0=e=>!pt(e)||Nt(e);function F0(e,t){if(b0(e)||b0(t))throw new Error("Invalid value");const i=[{src:e,des:t}];for(;i.length;){const{src:n,des:r}=i.pop();Object.keys(n).forEach(s=>{s!=="__proto__"&&(pt(n[s])&&!pt(r[s])&&(r[s]=Array.isArray(n[s])?[]:vt()),b0(r[s])||b0(n[s])?r[s]=n[s]:i.push({src:n[s],des:r[s]}))})}}/*!
|
|
27
|
-
* message-compiler v11.3.0
|
|
28
|
-
* (c) 2026 kazuya kawaguchi
|
|
29
|
-
* Released under the MIT License.
|
|
30
|
-
*/function n7(e,t,i){return{line:e,column:t,offset:i}}function Du(e,t,i){return{start:e,end:t}}const ht={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14},r7=17;function r1(e,t,i={}){const{domain:n,messages:r,args:s}=i,a=e,l=new SyntaxError(String(a));return l.code=e,t&&(l.location=t),l.domain=n,l}function s7(e){throw e}const yn=" ",a7="\r",gi=`
|
|
31
|
-
`,l7="\u2028",o7="\u2029";function c7(e){const t=e;let i=0,n=1,r=1,s=0;const a=L=>t[L]===a7&&t[L+1]===gi,l=L=>t[L]===gi,o=L=>t[L]===o7,c=L=>t[L]===l7,u=L=>a(L)||l(L)||o(L)||c(L),d=()=>i,h=()=>n,f=()=>r,v=()=>s,p=L=>a(L)||o(L)||c(L)?gi:t[L],w=()=>p(i),_=()=>p(i+s);function y(){return s=0,u(i)&&(n++,r=0),a(i)&&i++,i++,r++,t[i]}function C(){return a(i+s)&&s++,s++,t[i+s]}function g(){i=0,n=1,r=1,s=0}function $(L=0){s=L}function E(){const L=i+s;for(;L!==i;)y();s=0}return{index:d,line:h,column:f,peekOffset:v,charAt:p,currentChar:w,currentPeek:_,next:y,peek:C,reset:g,resetPeek:$,skipToPeek:E}}const Gn=void 0,u7=".",Rf="'",d7="tokenizer";function h7(e,t={}){const i=t.location!==!1,n=c7(e),r=()=>n.index(),s=()=>n7(n.line(),n.column(),n.index()),a=s(),l=r(),o={currentType:13,offset:l,startLoc:a,endLoc:a,lastType:13,lastOffset:l,lastStartLoc:a,lastEndLoc:a,braceNest:0,inLinked:!1,text:""},c=()=>o,{onError:u}=t;function d(S,k,D,...P){const R=c();if(k.column+=D,k.offset+=D,u){const I=i?Du(R.startLoc,k):null,z=r1(S,I,{domain:d7,args:P});u(z)}}function h(S,k,D){S.endLoc=s(),S.currentType=k;const P={type:k};return i&&(P.loc=Du(S.startLoc,S.endLoc)),D!=null&&(P.value=D),P}const f=S=>h(S,13);function v(S,k){return S.currentChar()===k?(S.next(),k):(d(ht.EXPECTED_TOKEN,s(),0,k),"")}function p(S){let k="";for(;S.currentPeek()===yn||S.currentPeek()===gi;)k+=S.currentPeek(),S.peek();return k}function w(S){const k=p(S);return S.skipToPeek(),k}function _(S){if(S===Gn)return!1;const k=S.charCodeAt(0);return k>=97&&k<=122||k>=65&&k<=90||k===95}function y(S){if(S===Gn)return!1;const k=S.charCodeAt(0);return k>=48&&k<=57}function C(S,k){const{currentType:D}=k;if(D!==2)return!1;p(S);const P=_(S.currentPeek());return S.resetPeek(),P}function g(S,k){const{currentType:D}=k;if(D!==2)return!1;p(S);const P=S.currentPeek()==="-"?S.peek():S.currentPeek(),R=y(P);return S.resetPeek(),R}function $(S,k){const{currentType:D}=k;if(D!==2)return!1;p(S);const P=S.currentPeek()===Rf;return S.resetPeek(),P}function E(S,k){const{currentType:D}=k;if(D!==7)return!1;p(S);const P=S.currentPeek()===".";return S.resetPeek(),P}function L(S,k){const{currentType:D}=k;if(D!==8)return!1;p(S);const P=_(S.currentPeek());return S.resetPeek(),P}function B(S,k){const{currentType:D}=k;if(!(D===7||D===11))return!1;p(S);const P=S.currentPeek()===":";return S.resetPeek(),P}function T(S,k){const{currentType:D}=k;if(D!==9)return!1;const P=()=>{const I=S.currentPeek();return I==="{"?_(S.peek()):I==="@"||I==="|"||I===":"||I==="."||I===yn||!I?!1:I===gi?(S.peek(),P()):W(S,!1)},R=P();return S.resetPeek(),R}function X(S){p(S);const k=S.currentPeek()==="|";return S.resetPeek(),k}function W(S,k=!0){const D=(R=!1,I="")=>{const z=S.currentPeek();return z==="{"||z==="@"||!z?R:z==="|"?!(I===yn||I===gi):z===yn?(S.peek(),D(!0,yn)):z===gi?(S.peek(),D(!0,gi)):!0},P=D();return k&&S.resetPeek(),P}function A(S,k){const D=S.currentChar();return D===Gn?Gn:k(D)?(S.next(),D):null}function x(S){const k=S.charCodeAt(0);return k>=97&&k<=122||k>=65&&k<=90||k>=48&&k<=57||k===95||k===36}function F(S){return A(S,x)}function ie(S){const k=S.charCodeAt(0);return k>=97&&k<=122||k>=65&&k<=90||k>=48&&k<=57||k===95||k===36||k===45}function re(S){return A(S,ie)}function ue(S){const k=S.charCodeAt(0);return k>=48&&k<=57}function J(S){return A(S,ue)}function ae(S){const k=S.charCodeAt(0);return k>=48&&k<=57||k>=65&&k<=70||k>=97&&k<=102}function ne(S){return A(S,ae)}function Q(S){let k="",D="";for(;k=J(S);)D+=k;return D}function oe(S){let k="";for(;;){const D=S.currentChar();if(D==="\\"){const P=S.peek();P==="{"||P==="}"||P==="@"||P==="|"||P==="\\"?(k+=D+P,S.next(),S.next()):(S.resetPeek(),k+=D,S.next())}else{if(D==="{"||D==="}"||D==="@"||D==="|"||!D)break;if(D===yn||D===gi)if(W(S))k+=D,S.next();else{if(X(S))break;k+=D,S.next()}else k+=D,S.next()}}return k}function ve(S){w(S);let k="",D="";for(;k=re(S);)D+=k;const P=S.currentChar();if(P&&P!=="}"&&P!==Gn&&P!==yn&&P!==gi&&P!==" "){const R=se(S);return d(ht.INVALID_TOKEN_IN_PLACEHOLDER,s(),0,D+R),D+R}return S.currentChar()===Gn&&d(ht.UNTERMINATED_CLOSING_BRACE,s(),0),D}function fe(S){w(S);let k="";return S.currentChar()==="-"?(S.next(),k+=`-${Q(S)}`):k+=Q(S),S.currentChar()===Gn&&d(ht.UNTERMINATED_CLOSING_BRACE,s(),0),k}function pe(S){return S!==Rf&&S!==gi}function ye(S){w(S),v(S,"'");let k="",D="";for(;k=A(S,pe);)k==="\\"?D+=U(S):D+=k;const P=S.currentChar();return P===gi||P===Gn?(d(ht.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,s(),0),P===gi&&(S.next(),v(S,"'")),D):(v(S,"'"),D)}function U(S){const k=S.currentChar();switch(k){case"\\":case"'":return S.next(),`\\${k}`;case"u":return _e(S,k,4);case"U":return _e(S,k,6);default:return d(ht.UNKNOWN_ESCAPE_SEQUENCE,s(),0,k),""}}function _e(S,k,D){v(S,k);let P="";for(let R=0;R<D;R++){const I=ne(S);if(!I){d(ht.INVALID_UNICODE_ESCAPE_SEQUENCE,s(),0,`\\${k}${P}${S.currentChar()}`);break}P+=I}return`\\${k}${P}`}function ge(S){return S!=="{"&&S!=="}"&&S!==yn&&S!==gi}function se(S){w(S);let k="",D="";for(;k=A(S,ge);)D+=k;return D}function H(S){let k="",D="";for(;k=F(S);)D+=k;return D}function N(S){const k=D=>{const P=S.currentChar();return P==="{"||P==="@"||P==="|"||P==="("||P===")"||!P||P===yn?D:(D+=P,S.next(),k(D))};return k("")}function O(S){w(S);const k=v(S,"|");return w(S),k}function te(S,k){let D=null;switch(S.currentChar()){case"{":return k.braceNest>=1&&d(ht.NOT_ALLOW_NEST_PLACEHOLDER,s(),0),S.next(),D=h(k,2,"{"),w(S),k.braceNest++,D;case"}":return k.braceNest>0&&k.currentType===2&&d(ht.EMPTY_PLACEHOLDER,s(),0),S.next(),D=h(k,3,"}"),k.braceNest--,k.braceNest>0&&w(S),k.inLinked&&k.braceNest===0&&(k.inLinked=!1),D;case"@":return k.braceNest>0&&d(ht.UNTERMINATED_CLOSING_BRACE,s(),0),D=ee(S,k)||f(k),k.braceNest=0,D;default:{let R=!0,I=!0,z=!0;if(X(S))return k.braceNest>0&&d(ht.UNTERMINATED_CLOSING_BRACE,s(),0),D=h(k,1,O(S)),k.braceNest=0,k.inLinked=!1,D;if(k.braceNest>0&&(k.currentType===4||k.currentType===5||k.currentType===6))return d(ht.UNTERMINATED_CLOSING_BRACE,s(),0),k.braceNest=0,me(S,k);if(R=C(S,k))return D=h(k,4,ve(S)),w(S),D;if(I=g(S,k))return D=h(k,5,fe(S)),w(S),D;if(z=$(S,k))return D=h(k,6,ye(S)),w(S),D;if(!R&&!I&&!z)return D=h(k,12,se(S)),d(ht.INVALID_TOKEN_IN_PLACEHOLDER,s(),0,D.value),w(S),D;break}}return D}function ee(S,k){const{currentType:D}=k;let P=null;const R=S.currentChar();switch((D===7||D===8||D===11||D===9)&&(R===gi||R===yn)&&d(ht.INVALID_LINKED_FORMAT,s(),0),R){case"@":return S.next(),P=h(k,7,"@"),k.inLinked=!0,P;case".":return w(S),S.next(),h(k,8,".");case":":return w(S),S.next(),h(k,9,":");default:return X(S)?(P=h(k,1,O(S)),k.braceNest=0,k.inLinked=!1,P):E(S,k)||B(S,k)?(w(S),ee(S,k)):L(S,k)?(w(S),h(k,11,H(S))):T(S,k)?(w(S),R==="{"?te(S,k)||P:h(k,10,N(S))):(D===7&&d(ht.INVALID_LINKED_FORMAT,s(),0),k.braceNest=0,k.inLinked=!1,me(S,k))}}function me(S,k){let D={type:13};if(k.braceNest>0)return te(S,k)||f(k);if(k.inLinked)return ee(S,k)||f(k);switch(S.currentChar()){case"{":return te(S,k)||f(k);case"}":return d(ht.UNBALANCED_CLOSING_BRACE,s(),0),S.next(),h(k,3,"}");case"@":return ee(S,k)||f(k);default:{if(X(S))return D=h(k,1,O(S)),k.braceNest=0,k.inLinked=!1,D;if(W(S))return h(k,0,oe(S));break}}return D}function we(){const{currentType:S,offset:k,startLoc:D,endLoc:P}=o;return o.lastType=S,o.lastOffset=k,o.lastStartLoc=D,o.lastEndLoc=P,o.offset=r(),o.startLoc=s(),n.currentChar()===Gn?h(o,13):me(n,o)}return{nextToken:we,currentOffset:r,currentPosition:s,context:c}}const f7="parser",p7=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g,_7=/\\([\\@{}|])/g;function m7(e,t){return t}function v7(e,t,i){switch(e){case"\\\\":return"\\";case"\\'":return"'";default:{const n=parseInt(t||i,16);return n<=55295||n>=57344?String.fromCodePoint(n):"�"}}}function g7(e={}){const t=e.location!==!1,{onError:i}=e;function n(_,y,C,g,...$){const E=_.currentPosition();if(E.offset+=g,E.column+=g,i){const L=t?Du(C,E):null,B=r1(y,L,{domain:f7,args:$});i(B)}}function r(_,y,C){const g={type:_};return t&&(g.start=y,g.end=y,g.loc={start:C,end:C}),g}function s(_,y,C,g){t&&(_.end=y,_.loc&&(_.loc.end=C))}function a(_,y){const C=_.context(),g=r(3,C.offset,C.startLoc);return g.value=y.replace(_7,m7),s(g,_.currentOffset(),_.currentPosition()),g}function l(_,y){const C=_.context(),{lastOffset:g,lastStartLoc:$}=C,E=r(5,g,$);return E.index=parseInt(y,10),_.nextToken(),s(E,_.currentOffset(),_.currentPosition()),E}function o(_,y){const C=_.context(),{lastOffset:g,lastStartLoc:$}=C,E=r(4,g,$);return E.key=y,_.nextToken(),s(E,_.currentOffset(),_.currentPosition()),E}function c(_,y){const C=_.context(),{lastOffset:g,lastStartLoc:$}=C,E=r(9,g,$);return E.value=y.replace(p7,v7),_.nextToken(),s(E,_.currentOffset(),_.currentPosition()),E}function u(_){const y=_.nextToken(),C=_.context(),{lastOffset:g,lastStartLoc:$}=C,E=r(8,g,$);return y.type!==11?(n(_,ht.UNEXPECTED_EMPTY_LINKED_MODIFIER,C.lastStartLoc,0),E.value="",s(E,g,$),{nextConsumeToken:y,node:E}):(y.value==null&&n(_,ht.UNEXPECTED_LEXICAL_ANALYSIS,C.lastStartLoc,0,wn(y)),E.value=y.value||"",s(E,_.currentOffset(),_.currentPosition()),{node:E})}function d(_,y){const C=_.context(),g=r(7,C.offset,C.startLoc);return g.value=y,s(g,_.currentOffset(),_.currentPosition()),g}function h(_){const y=_.context(),C=r(6,y.offset,y.startLoc);let g=_.nextToken();if(g.type===8){const $=u(_);C.modifier=$.node,g=$.nextConsumeToken||_.nextToken()}switch(g.type!==9&&n(_,ht.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,wn(g)),g=_.nextToken(),g.type===2&&(g=_.nextToken()),g.type){case 10:g.value==null&&n(_,ht.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,wn(g)),C.key=d(_,g.value||"");break;case 4:g.value==null&&n(_,ht.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,wn(g)),C.key=o(_,g.value||"");break;case 5:g.value==null&&n(_,ht.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,wn(g)),C.key=l(_,g.value||"");break;case 6:g.value==null&&n(_,ht.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,wn(g)),C.key=c(_,g.value||"");break;default:{n(_,ht.UNEXPECTED_EMPTY_LINKED_KEY,y.lastStartLoc,0);const $=_.context(),E=r(7,$.offset,$.startLoc);return E.value="",s(E,$.offset,$.startLoc),C.key=E,s(C,$.offset,$.startLoc),{nextConsumeToken:g,node:C}}}return s(C,_.currentOffset(),_.currentPosition()),{node:C}}function f(_){const y=_.context(),C=y.currentType===1?_.currentOffset():y.offset,g=y.currentType===1?y.endLoc:y.startLoc,$=r(2,C,g);$.items=[];let E=null;do{const T=E||_.nextToken();switch(E=null,T.type){case 0:T.value==null&&n(_,ht.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,wn(T)),$.items.push(a(_,T.value||""));break;case 5:T.value==null&&n(_,ht.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,wn(T)),$.items.push(l(_,T.value||""));break;case 4:T.value==null&&n(_,ht.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,wn(T)),$.items.push(o(_,T.value||""));break;case 6:T.value==null&&n(_,ht.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,wn(T)),$.items.push(c(_,T.value||""));break;case 7:{const X=h(_);$.items.push(X.node),E=X.nextConsumeToken||null;break}}}while(y.currentType!==13&&y.currentType!==1);const L=y.currentType===1?y.lastOffset:_.currentOffset(),B=y.currentType===1?y.lastEndLoc:_.currentPosition();return s($,L,B),$}function v(_,y,C,g){const $=_.context();let E=g.items.length===0;const L=r(1,y,C);L.cases=[],L.cases.push(g);do{const B=f(_);E||(E=B.items.length===0),L.cases.push(B)}while($.currentType!==13);return E&&n(_,ht.MUST_HAVE_MESSAGES_IN_PLURAL,C,0),s(L,_.currentOffset(),_.currentPosition()),L}function p(_){const y=_.context(),{offset:C,startLoc:g}=y,$=f(_);return y.currentType===13?$:v(_,C,g,$)}function w(_){const y=h7(_,ii({},e)),C=y.context(),g=r(0,C.offset,C.startLoc);return t&&g.loc&&(g.loc.source=_),g.body=p(y),e.onCacheKey&&(g.cacheKey=e.onCacheKey(_)),C.currentType!==13&&n(y,ht.UNEXPECTED_LEXICAL_ANALYSIS,C.lastStartLoc,0,_[C.offset]||""),s(g,y.currentOffset(),y.currentPosition()),g}return{parse:w}}function wn(e){if(e.type===13)return"EOF";const t=(e.value||"").replace(/\r?\n/gu,"\\n");return t.length>10?t.slice(0,9)+"…":t}function b7(e,t={}){const i={ast:e,helpers:new Set};return{context:()=>i,helper:s=>(i.helpers.add(s),s)}}function Vf(e,t){for(let i=0;i<e.length;i++)zh(e[i],t)}function zh(e,t){switch(e.type){case 1:Vf(e.cases,t),t.helper("plural");break;case 2:Vf(e.items,t);break;case 6:{zh(e.key,t),t.helper("linked"),t.helper("type");break}case 5:t.helper("interpolate"),t.helper("list");break;case 4:t.helper("interpolate"),t.helper("named");break}}function y7(e,t={}){const i=b7(e);i.helper("normalize"),e.body&&zh(e.body,i);const n=i.context();e.helpers=Array.from(n.helpers)}function w7(e){const t=e.body;return t.type===2?Df(t):t.cases.forEach(i=>Df(i)),e}function Df(e){if(e.items.length===1){const t=e.items[0];(t.type===3||t.type===9)&&(e.static=t.value,delete t.value)}else{const t=[];for(let i=0;i<e.items.length;i++){const n=e.items[i];if(!(n.type===3||n.type===9)||n.value==null)break;t.push(n.value)}if(t.length===e.items.length){e.static=Fh(t);for(let i=0;i<e.items.length;i++){const n=e.items[i];(n.type===3||n.type===9)&&delete n.value}}}}function Rs(e){switch(e.t=e.type,e.type){case 0:{const t=e;Rs(t.body),t.b=t.body,delete t.body;break}case 1:{const t=e,i=t.cases;for(let n=0;n<i.length;n++)Rs(i[n]);t.c=i,delete t.cases;break}case 2:{const t=e,i=t.items;for(let n=0;n<i.length;n++)Rs(i[n]);t.i=i,delete t.items,t.static&&(t.s=t.static,delete t.static);break}case 3:case 9:case 8:case 7:{const t=e;t.value&&(t.v=t.value,delete t.value);break}case 6:{const t=e;Rs(t.key),t.k=t.key,delete t.key,t.modifier&&(Rs(t.modifier),t.m=t.modifier,delete t.modifier);break}case 5:{const t=e;t.i=t.index,delete t.index;break}case 4:{const t=e;t.k=t.key,delete t.key;break}}delete e.type}function S7(e,t){const{filename:i,breakLineCode:n,needIndent:r}=t,s=t.location!==!1,a={filename:i,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:n,needIndent:r,indentLevel:0};s&&e.loc&&(a.source=e.loc.source);const l=()=>a;function o(p,w){a.code+=p}function c(p,w=!0){const _=w?n:"";o(r?_+" ".repeat(p):_)}function u(p=!0){const w=++a.indentLevel;p&&c(w)}function d(p=!0){const w=--a.indentLevel;p&&c(w)}function h(){c(a.indentLevel)}return{context:l,push:o,indent:u,deindent:d,newline:h,helper:p=>`_${p}`,needIndent:()=>a.needIndent}}function C7(e,t){const{helper:i}=e;e.push(`${i("linked")}(`),Xs(e,t.key),t.modifier?(e.push(", "),Xs(e,t.modifier),e.push(", _type")):e.push(", undefined, _type"),e.push(")")}function k7(e,t){const{helper:i,needIndent:n}=e;e.push(`${i("normalize")}([`),e.indent(n());const r=t.items.length;for(let s=0;s<r&&(Xs(e,t.items[s]),s!==r-1);s++)e.push(", ");e.deindent(n()),e.push("])")}function A7(e,t){const{helper:i,needIndent:n}=e;if(t.cases.length>1){e.push(`${i("plural")}([`),e.indent(n());const r=t.cases.length;for(let s=0;s<r&&(Xs(e,t.cases[s]),s!==r-1);s++)e.push(", ");e.deindent(n()),e.push("])")}}function M7(e,t){t.body?Xs(e,t.body):e.push("null")}function Xs(e,t){const{helper:i}=e;switch(t.type){case 0:M7(e,t);break;case 1:A7(e,t);break;case 2:k7(e,t);break;case 6:C7(e,t);break;case 8:e.push(JSON.stringify(t.value),t);break;case 7:e.push(JSON.stringify(t.value),t);break;case 5:e.push(`${i("interpolate")}(${i("list")}(${t.index}))`,t);break;case 4:e.push(`${i("interpolate")}(${i("named")}(${JSON.stringify(t.key)}))`,t);break;case 9:e.push(JSON.stringify(t.value),t);break;case 3:e.push(JSON.stringify(t.value),t);break}}const $7=(e,t={})=>{const i=Oe(t.mode)?t.mode:"normal",n=Oe(t.filename)?t.filename:"message.intl";t.sourceMap;const r=t.breakLineCode!=null?t.breakLineCode:i==="arrow"?";":`
|
|
32
|
-
`,s=t.needIndent?t.needIndent:i!=="arrow",a=e.helpers||[],l=S7(e,{filename:n,breakLineCode:r,needIndent:s});l.push(i==="normal"?"function __msg__ (ctx) {":"(ctx) => {"),l.indent(s),a.length>0&&(l.push(`const { ${Fh(a.map(u=>`${u}: _${u}`),", ")} } = ctx`),l.newline()),l.push("return "),Xs(l,e),l.deindent(s),l.push("}"),delete e.helpers;const{code:o,map:c}=l.context();return{ast:e,code:o,map:c?c.toJSON():void 0}};function L7(e,t={}){const i=ii({},t),n=!!i.jit,r=!!i.minify,s=i.optimize==null?!0:i.optimize,l=g7(i).parse(e);return n?(s&&w7(l),r&&Rs(l),{ast:l,code:""}):(y7(l,i),$7(l,i))}/*!
|
|
33
|
-
* core-base v11.3.0
|
|
34
|
-
* (c) 2026 kazuya kawaguchi
|
|
35
|
-
* Released under the MIT License.
|
|
36
|
-
*/function E7(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(cs().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(cs().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}function On(e){return pt(e)&&Uh(e)===0&&(nn(e,"b")||nn(e,"body"))}const $4=["b","body"];function x7(e){return zr(e,$4)}const L4=["c","cases"];function H7(e){return zr(e,L4,[])}const E4=["s","static"];function T7(e){return zr(e,E4)}const x4=["i","items"];function N7(e){return zr(e,x4,[])}const H4=["t","type"];function Uh(e){return zr(e,H4)}const T4=["v","value"];function y0(e,t){const i=zr(e,T4);if(i!=null)return i;throw Mo(t)}const N4=["m","modifier"];function P7(e){return zr(e,N4)}const P4=["k","key"];function O7(e){const t=zr(e,P4);if(t)return t;throw Mo(6)}function zr(e,t,i){for(let n=0;n<t.length;n++){const r=t[n];if(nn(e,r)&&e[r]!=null)return e[r]}return i}const O4=[...$4,...L4,...E4,...x4,...P4,...N4,...T4,...H4];function Mo(e){return new Error(`unhandled node type: ${e}`)}function F1(e){return i=>I7(i,e)}function I7(e,t){const i=x7(t);if(i==null)throw Mo(0);if(Uh(i)===1){const s=H7(i);return e.plural(s.reduce((a,l)=>[...a,Zf(e,l)],[]))}else return Zf(e,i)}function Zf(e,t){const i=T7(t);if(i!=null)return e.type==="text"?i:e.normalize([i]);{const n=N7(t).reduce((r,s)=>[...r,Zu(e,s)],[]);return e.normalize(n)}}function Zu(e,t){const i=Uh(t);switch(i){case 3:return y0(t,i);case 9:return y0(t,i);case 4:{const n=t;if(nn(n,"k")&&n.k)return e.interpolate(e.named(n.k));if(nn(n,"key")&&n.key)return e.interpolate(e.named(n.key));throw Mo(i)}case 5:{const n=t;if(nn(n,"i")&&qt(n.i))return e.interpolate(e.list(n.i));if(nn(n,"index")&&qt(n.index))return e.interpolate(e.list(n.index));throw Mo(i)}case 6:{const n=t,r=P7(n),s=O7(n);return e.linked(Zu(e,s),r?Zu(e,r):void 0,e.type)}case 7:return y0(t,i);case 8:return y0(t,i);default:throw new Error(`unhandled node on format message part: ${i}`)}}const R7=e=>e;let w0=vt();function V7(e,t={}){let i=!1;const n=t.onError||s7;return t.onError=r=>{i=!0,n(r)},{...L7(e,t),detectError:i}}function D7(e,t){if(!__INTLIFY_DROP_MESSAGE_COMPILER__&&Oe(e)){ot(t.warnHtmlMessage)&&t.warnHtmlMessage;const n=(t.onCacheKey||R7)(e),r=w0[n];if(r)return r;const{ast:s,detectError:a}=V7(e,{...t,location:!1,jit:!0}),l=F1(s);return a?l:w0[n]=l}else{const i=e.cacheKey;if(i){const n=w0[i];return n||(w0[i]=F1(e))}else return F1(e)}}let $o=null;function Z7(e){$o=e}function B7(e,t,i){$o&&$o.emit("i18n:init",{timestamp:Date.now(),i18n:e,version:t,meta:i})}const F7=z7("function:translate");function z7(e){return t=>$o&&$o.emit(e,t)}const rr={INVALID_ARGUMENT:r7,INVALID_DATE_ARGUMENT:18,INVALID_ISO_DATE_ARGUMENT:19,NOT_SUPPORT_LOCALE_PROMISE_VALUE:21,NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:22,NOT_SUPPORT_LOCALE_TYPE:23},U7=24;function sr(e){return r1(e,null,void 0)}function Wh(e,t){return t.locale!=null?Bf(t.locale):Bf(e.locale)}let z1;function Bf(e){if(Oe(e))return e;if(kt(e)){if(e.resolvedOnce&&z1!=null)return z1;if(e.constructor.name==="Function"){const t=e();if(t7(t))throw sr(rr.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return z1=t}else throw sr(rr.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw sr(rr.NOT_SUPPORT_LOCALE_TYPE)}function W7(e,t,i){return[...new Set([i,...Nt(t)?t:pt(t)?Object.keys(t):Oe(t)?[t]:[i]])]}function Bu(e,t,i){const n=Oe(i)?i:Lo,r=e;r.__localeChainCache||(r.__localeChainCache=new Map);let s=r.__localeChainCache.get(n);if(!s){s=[];let a=[i];for(;Nt(a);)a=Ff(s,a,t);const l=Nt(t)||!it(t)?t:t.default?t.default:null;a=Oe(l)?[l]:l,Nt(a)&&Ff(s,a,!1),r.__localeChainCache.set(n,s)}return s}function Ff(e,t,i){let n=!0;for(let r=0;r<t.length&&ot(n);r++){const s=t[r];Oe(s)&&(n=j7(e,t[r],i))}return n}function j7(e,t,i){let n;const r=t.split("-");do{const s=r.join("-");n=K7(e,s,i),r.splice(-1,1)}while(r.length&&n===!0);return n}function K7(e,t,i){let n=!1;if(!e.includes(t)&&(n=!0,t)){n=t[t.length-1]!=="!";const r=t.replace(/!/g,"");e.push(r),(Nt(i)||it(i))&&i[r]&&(n=i[r])}return n}const Ur=[];Ur[0]={w:[0],i:[3,0],"[":[4],o:[7]};Ur[1]={w:[1],".":[2],"[":[4],o:[7]};Ur[2]={w:[2],i:[3,0],0:[3,0]};Ur[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]};Ur[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]};Ur[5]={"'":[4,0],o:8,l:[5,0]};Ur[6]={'"':[4,0],o:8,l:[6,0]};const q7=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function G7(e){return q7.test(e)}function Y7(e){const t=e.charCodeAt(0),i=e.charCodeAt(e.length-1);return t===i&&(t===34||t===39)?e.slice(1,-1):e}function X7(e){if(e==null)return"o";switch(e.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return e;case 95:case 36:case 45:return"i";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"w"}return"i"}function J7(e){const t=e.trim();return e.charAt(0)==="0"&&isNaN(parseInt(e))?!1:G7(t)?Y7(t):"*"+t}function Q7(e){const t=[];let i=-1,n=0,r=0,s,a,l,o,c,u,d;const h=[];h[0]=()=>{a===void 0?a=l:a+=l},h[1]=()=>{a!==void 0&&(t.push(a),a=void 0)},h[2]=()=>{h[0](),r++},h[3]=()=>{if(r>0)r--,n=4,h[0]();else{if(r=0,a===void 0||(a=J7(a),a===!1))return!1;h[1]()}};function f(){const v=e[i+1];if(n===5&&v==="'"||n===6&&v==='"')return i++,l="\\"+v,h[0](),!0}for(;n!==null;)if(i++,s=e[i],!(s==="\\"&&f())){if(o=X7(s),d=Ur[n],c=d[o]||d.l||8,c===8||(n=c[0],c[1]!==void 0&&(u=h[c[1]],u&&(l=s,u()===!1))))return;if(n===7)return t}}const zf=new Map;function ew(e,t){return pt(e)?e[t]:null}function tw(e,t){if(!pt(e))return null;let i=zf.get(t);if(i||(i=Q7(t),i&&zf.set(t,i)),!i)return null;const n=i.length;let r=e,s=0;for(;s<n;){const a=i[s];if(O4.includes(a)&&On(r)||!pt(r)||!nn(r,a))return null;const l=r[a];if(l===void 0||kt(r))return null;r=l,s++}return r}const iw="11.3.0",s1=-1,Lo="en-US",_c="",Uf=e=>`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;function nw(){return{upper:(e,t)=>t==="text"&&Oe(e)?e.toUpperCase():t==="vnode"&&pt(e)&&"__v_isVNode"in e?e.children.toUpperCase():e,lower:(e,t)=>t==="text"&&Oe(e)?e.toLowerCase():t==="vnode"&&pt(e)&&"__v_isVNode"in e?e.children.toLowerCase():e,capitalize:(e,t)=>t==="text"&&Oe(e)?Uf(e):t==="vnode"&&pt(e)&&"__v_isVNode"in e?Uf(e.children):e}}let I4;function rw(e){I4=e}let R4;function sw(e){R4=e}let V4;function aw(e){V4=e}let D4=null;const lw=e=>{D4=e},ow=()=>D4;let Z4=null;const Wf=e=>{Z4=e},cw=()=>Z4;let jf=0;function uw(e={}){const t=kt(e.onWarn)?e.onWarn:Gy,i=Oe(e.version)?e.version:iw,n=Oe(e.locale)||kt(e.locale)?e.locale:Lo,r=kt(n)?Lo:n,s=Nt(e.fallbackLocale)||it(e.fallbackLocale)||Oe(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:r,a=it(e.messages)?e.messages:U1(r),l=it(e.datetimeFormats)?e.datetimeFormats:U1(r),o=it(e.numberFormats)?e.numberFormats:U1(r),c=ii(vt(),e.modifiers,nw()),u=e.pluralRules||vt(),d=kt(e.missing)?e.missing:null,h=ot(e.missingWarn)||Ys(e.missingWarn)?e.missingWarn:!0,f=ot(e.fallbackWarn)||Ys(e.fallbackWarn)?e.fallbackWarn:!0,v=!!e.fallbackFormat,p=!!e.unresolving,w=kt(e.postTranslation)?e.postTranslation:null,_=it(e.processor)?e.processor:null,y=ot(e.warnHtmlMessage)?e.warnHtmlMessage:!0,C=!!e.escapeParameter,g=kt(e.messageCompiler)?e.messageCompiler:I4,$=kt(e.messageResolver)?e.messageResolver:R4||ew,E=kt(e.localeFallbacker)?e.localeFallbacker:V4||W7,L=pt(e.fallbackContext)?e.fallbackContext:void 0,B=e,T=pt(B.__datetimeFormatters)?B.__datetimeFormatters:new Map,X=pt(B.__numberFormatters)?B.__numberFormatters:new Map,W=pt(B.__meta)?B.__meta:{};jf++;const A={version:i,cid:jf,locale:n,fallbackLocale:s,messages:a,modifiers:c,pluralRules:u,missing:d,missingWarn:h,fallbackWarn:f,fallbackFormat:v,unresolving:p,postTranslation:w,processor:_,warnHtmlMessage:y,escapeParameter:C,messageCompiler:g,messageResolver:$,localeFallbacker:E,fallbackContext:L,onWarn:t,__meta:W};return A.datetimeFormats=l,A.numberFormats=o,A.__datetimeFormatters=T,A.__numberFormatters=X,__INTLIFY_PROD_DEVTOOLS__&&B7(A,i,W),A}const U1=e=>({[e]:vt()});function jh(e,t,i,n,r){const{missing:s,onWarn:a}=e;if(s!==null){const l=s(e,i,t,r);return Oe(l)?l:t}else return t}function Il(e,t,i){const n=e;n.__localeChainCache=new Map,e.localeFallbacker(e,i,t)}function dw(e,t){return e===t?!1:e.split("-")[0]===t.split("-")[0]}function hw(e,t){const i=t.indexOf(e);if(i===-1)return!1;for(let n=i+1;n<t.length;n++)if(dw(e,t[n]))return!0;return!1}function Kf(e,...t){const{datetimeFormats:i,unresolving:n,fallbackLocale:r,onWarn:s,localeFallbacker:a}=e,{__datetimeFormatters:l}=e;if(!Oe(t[0])&&!A4(t[0])&&!qt(t[0]))return _c;const[o,c,u,d]=Fu(...t),h=ot(u.missingWarn)?u.missingWarn:e.missingWarn;ot(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn;const f=!!u.part,v=Wh(e,u),p=a(e,r,v);if(!Oe(o)||o==="")return new Intl.DateTimeFormat(v.replace(/!/g,""),d).format(c);let w={},_,y=null;const C="datetime format";for(let E=0;E<p.length&&(_=p[E],w=i[_]||{},y=w[o],!it(y));E++)jh(e,o,_,h,C);if(!it(y)||!Oe(_))return n?s1:o;let g=`${_}__${o}`;n1(d)||(g=`${g}__${JSON.stringify(d)}`);let $=l.get(g);return $||($=new Intl.DateTimeFormat(_,ii({},y,d)),l.set(g,$)),f?$.formatToParts(c):$.format(c)}const B4=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function Fu(...e){const[t,i,n,r]=e,s=vt();let a=vt(),l;if(Oe(t)){const o=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!o)throw sr(rr.INVALID_ISO_DATE_ARGUMENT);const c=o[3]?o[3].trim().startsWith("T")?`${o[1].trim()}${o[3].trim()}`:`${o[1].trim()}T${o[3].trim()}`:o[1].trim();l=new Date(c);try{l.toISOString()}catch{throw sr(rr.INVALID_ISO_DATE_ARGUMENT)}}else if(A4(t)){if(isNaN(t.getTime()))throw sr(rr.INVALID_DATE_ARGUMENT);l=t}else if(qt(t))l=t;else throw sr(rr.INVALID_ARGUMENT);return Oe(i)?s.key=i:it(i)&&Object.keys(i).forEach(o=>{B4.includes(o)?a[o]=i[o]:s[o]=i[o]}),Oe(n)?s.locale=n:it(n)&&(a=n),it(r)&&(a=r),[s.key||"",l,s,a]}function qf(e,t,i){const n=e;for(const r in i){const s=`${t}__${r}`;n.__datetimeFormatters.has(s)&&n.__datetimeFormatters.delete(s)}}function Gf(e,...t){const{numberFormats:i,unresolving:n,fallbackLocale:r,onWarn:s,localeFallbacker:a}=e,{__numberFormatters:l}=e;if(!qt(t[0]))return _c;const[o,c,u,d]=zu(...t),h=ot(u.missingWarn)?u.missingWarn:e.missingWarn;ot(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn;const f=!!u.part,v=Wh(e,u),p=a(e,r,v);if(!Oe(o)||o==="")return new Intl.NumberFormat(v.replace(/!/g,""),d).format(c);let w={},_,y=null;const C="number format";for(let E=0;E<p.length&&(_=p[E],w=i[_]||{},y=w[o],!it(y));E++)jh(e,o,_,h,C);if(!it(y)||!Oe(_))return n?s1:o;let g=`${_}__${o}`;n1(d)||(g=`${g}__${JSON.stringify(d)}`);let $=l.get(g);return $||($=new Intl.NumberFormat(_,ii({},y,d)),l.set(g,$)),f?$.formatToParts(c):$.format(c)}const F4=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function zu(...e){const[t,i,n,r]=e,s=vt();let a=vt();if(!qt(t))throw sr(rr.INVALID_ARGUMENT);const l=t;return Oe(i)?s.key=i:it(i)&&Object.keys(i).forEach(o=>{F4.includes(o)?a[o]=i[o]:s[o]=i[o]}),Oe(n)?s.locale=n:it(n)&&(a=n),it(r)&&(a=r),[s.key||"",l,s,a]}function Yf(e,t,i){const n=e;for(const r in i){const s=`${t}__${r}`;n.__numberFormatters.has(s)&&n.__numberFormatters.delete(s)}}const fw=e=>e,pw=e=>"",_w="text",mw=e=>e.length===0?"":Fh(e),vw=i7;function W1(e,t){return e=Math.abs(e),t===2?e===1?0:1:Math.min(e,2)}function gw(e){var i,n;const t=qt(e.pluralIndex)?e.pluralIndex:-1;return qt((i=e.named)==null?void 0:i.count)?e.named.count:qt((n=e.named)==null?void 0:n.n)?e.named.n:t}function bw(e={}){var _,y,C,g;const t=e.locale,i=gw(e),n=Oe(t)&&kt((_=e.pluralRules)==null?void 0:_[t])?e.pluralRules[t]:W1,r=n===W1?void 0:W1,s=$=>$[n(i,$.length,r)],a=e.list||[],l=$=>a[$],o=e.named||vt();qt(e.pluralIndex)&&(o.count||(o.count=e.pluralIndex),o.n||(o.n=e.pluralIndex));const c=$=>o[$];function u($,E){const L=kt(e.messages)?e.messages($,!!E):pt(e.messages)?e.messages[$]:!1;return L||(e.parent?e.parent.message($):pw)}const d=$=>e.modifiers?e.modifiers[$]:fw,h=kt((y=e.processor)==null?void 0:y.normalize)?e.processor.normalize:mw,f=kt((C=e.processor)==null?void 0:C.interpolate)?e.processor.interpolate:vw,v=Oe((g=e.processor)==null?void 0:g.type)?e.processor.type:_w,w={list:l,named:c,plural:s,linked:($,...E)=>{const[L,B]=E;let T="text",X="";E.length===1?pt(L)?(X=L.modifier||X,T=L.type||T):Oe(L)&&(X=L||X):E.length===2&&(Oe(L)&&(X=L||X),Oe(B)&&(T=B||T));const W=u($,!0)(w),A=W===""||W===void 0?$:W,x=T==="vnode"&&Nt(A)&&X?A[0]:A;return X?d(X)(x,T):x},message:u,type:v,interpolate:f,normalize:h,values:ii(vt(),a,o)};return w}const Xf=()=>"",en=e=>kt(e);function Jf(e,...t){const{fallbackFormat:i,postTranslation:n,unresolving:r,messageCompiler:s,fallbackLocale:a,messages:l}=e,[o,c]=Uu(...t),u=ot(c.missingWarn)?c.missingWarn:e.missingWarn,d=ot(c.fallbackWarn)?c.fallbackWarn:e.fallbackWarn,h=ot(c.escapeParameter)?c.escapeParameter:e.escapeParameter,f=!!c.resolvedMessage,v=Oe(c.default)||ot(c.default)?ot(c.default)?s?o:()=>o:c.default:i?s?o:()=>o:null,p=i||v!=null&&(Oe(v)||kt(v)),w=Wh(e,c);h&&yw(c);let[_,y,C]=f?[o,w,l[w]||vt()]:z4(e,o,w,a,d,u),g=_,$=o;if(!f&&!(Oe(g)||On(g)||en(g))&&p&&(g=v,$=g),!f&&(!(Oe(g)||On(g)||en(g))||!Oe(y)))return r?s1:o;let E=!1;const L=()=>{E=!0},B=en(g)?g:U4(e,o,y,g,$,L);if(E)return g;const T=Cw(e,y,C,c),X=bw(T),W=ww(e,B,X);let A=n?n(W,o):W;if(h&&Oe(A)&&(A=Qy(A)),__INTLIFY_PROD_DEVTOOLS__){const x={timestamp:Date.now(),key:Oe(o)?o:en(g)?g.key:"",locale:y||(en(g)?g.locale:""),format:Oe(g)?g:en(g)?g.source:"",message:A};x.meta=ii({},e.__meta,ow()||{}),F7(x)}return A}function yw(e){Nt(e.list)?e.list=e.list.map(t=>Oe(t)?Of(t):t):pt(e.named)&&Object.keys(e.named).forEach(t=>{Oe(e.named[t])&&(e.named[t]=Of(e.named[t]))})}function z4(e,t,i,n,r,s){const{messages:a,onWarn:l,messageResolver:o,localeFallbacker:c}=e,u=c(e,n,i);let d=vt(),h,f=null;const v="translate";for(let p=0;p<u.length&&(h=u[p],d=a[h]||vt(),(f=o(d,t))===null&&(f=d[t]),!(Oe(f)||On(f)||en(f)));p++)if(!hw(h,u)){const w=jh(e,t,h,s,v);w!==t&&(f=w)}return[f,h,d]}function U4(e,t,i,n,r,s){const{messageCompiler:a,warnHtmlMessage:l}=e;if(en(n)){const c=n;return c.locale=c.locale||i,c.key=c.key||t,c}if(a==null){const c=()=>n;return c.locale=i,c.key=t,c}const o=a(n,Sw(e,i,r,n,l,s));return o.locale=i,o.key=t,o.source=n,o}function ww(e,t,i){return t(i)}function Uu(...e){const[t,i,n]=e,r=vt();if(!Oe(t)&&!qt(t)&&!en(t)&&!On(t))throw sr(rr.INVALID_ARGUMENT);const s=qt(t)?String(t):(en(t),t);return qt(i)?r.plural=i:Oe(i)?r.default=i:it(i)&&!n1(i)?r.named=i:Nt(i)&&(r.list=i),qt(n)?r.plural=n:Oe(n)?r.default=n:it(n)&&ii(r,n),[s,r]}function Sw(e,t,i,n,r,s){return{locale:t,key:i,warnHtmlMessage:r,onError:a=>{throw s&&s(a),a},onCacheKey:a=>Yy(t,i,a)}}function Cw(e,t,i,n){const{modifiers:r,pluralRules:s,messageResolver:a,fallbackLocale:l,fallbackWarn:o,missingWarn:c,fallbackContext:u}=e,h={locale:t,modifiers:r,pluralRules:s,messages:(f,v)=>{let p=a(i,f);if(p==null&&(u||v)){const[,,w]=z4(u||e,f,t,l,o,c);p=a(w,f)}if(Oe(p)||On(p)){let w=!1;const y=U4(e,f,t,p,f,()=>{w=!0});return w?Xf:y}else return en(p)?p:Xf}};return e.processor&&(h.processor=e.processor),n.list&&(h.list=n.list),n.named&&(h.named=n.named),qt(n.plural)&&(h.pluralIndex=n.plural),h}E7();/*!
|
|
37
|
-
* vue-i18n v11.3.0
|
|
38
|
-
* (c) 2026 kazuya kawaguchi
|
|
39
|
-
* Released under the MIT License.
|
|
40
|
-
*/const kw="11.3.0";function Aw(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(cs().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(cs().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(cs().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(cs().__INTLIFY_PROD_DEVTOOLS__=!1)}const Ri={UNEXPECTED_RETURN_TYPE:U7,INVALID_ARGUMENT:25,MUST_BE_CALL_SETUP_TOP:26,NOT_INSTALLED:27,REQUIRED_VALUE:28,INVALID_VALUE:29,NOT_INSTALLED_WITH_PROVIDE:31,UNEXPECTED_ERROR:32};function Ki(e,...t){return r1(e,null,void 0)}const Wu=Fr("__translateVNode"),ju=Fr("__datetimeParts"),Ku=Fr("__numberParts"),W4=Fr("__setPluralRules"),j4=Fr("__injectWithOption"),qu=Fr("__dispose");function Eo(e){if(!pt(e)||On(e))return e;for(const t in e)if(nn(e,t))if(!t.includes("."))pt(e[t])&&Eo(e[t]);else{const i=t.split("."),n=i.length-1;let r=e,s=!1;for(let a=0;a<n;a++){if(i[a]==="__proto__")throw new Error(`unsafe key: ${i[a]}`);if(i[a]in r||(r[i[a]]=vt()),!pt(r[i[a]])){s=!0;break}r=r[i[a]]}if(s||(On(r)?O4.includes(i[n])||delete e[t]:(r[i[n]]=e[t],delete e[t])),!On(r)){const a=r[i[n]];pt(a)&&Eo(a)}}return e}function Kh(e,t){const{messages:i,__i18n:n,messageResolver:r,flatJson:s}=t,a=it(i)?i:Nt(n)?vt():{[e]:vt()};if(Nt(n)&&n.forEach(l=>{if("locale"in l&&"resource"in l){const{locale:o,resource:c}=l;o?(a[o]=a[o]||vt(),F0(c,a[o])):F0(c,a)}else Oe(l)&&F0(JSON.parse(l),a)}),r==null&&s)for(const l in a)nn(a,l)&&Eo(a[l]);return a}function K4(e){return e.type}function q4(e,t,i){let n=pt(t.messages)?t.messages:vt();"__i18nGlobal"in i&&(n=Kh(e.locale.value,{messages:n,__i18n:i.__i18nGlobal}));const r=Object.keys(n);r.length&&r.forEach(s=>{e.mergeLocaleMessage(s,n[s])});{if(pt(t.datetimeFormats)){const s=Object.keys(t.datetimeFormats);s.length&&s.forEach(a=>{e.mergeDateTimeFormat(a,t.datetimeFormats[a])})}if(pt(t.numberFormats)){const s=Object.keys(t.numberFormats);s.length&&s.forEach(a=>{e.mergeNumberFormat(a,t.numberFormats[a])})}}}function Qf(e){return j(Br,null,e,0)}function xo(){return Si()}const e6="__INTLIFY_META__",t6=()=>[],Mw=()=>!1;let i6=0;function n6(e){return(t,i,n,r)=>e(i,n,xo()||void 0,r)}const $w=()=>{const e=xo();let t=null;return e&&(t=K4(e)[e6])?{[e6]:t}:null};function qh(e={}){const{__root:t,__injectWithOption:i}=e,n=t===void 0,r=e.flatJson,s=pc?K:zn;let a=ot(e.inheritLocale)?e.inheritLocale:!0;const l=s(t&&a?t.locale.value:Oe(e.locale)?e.locale:Lo),o=s(t&&a?t.fallbackLocale.value:Oe(e.fallbackLocale)||Nt(e.fallbackLocale)||it(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:l.value),c=s(Kh(l.value,e)),u=s(it(e.datetimeFormats)?e.datetimeFormats:{[l.value]:{}}),d=s(it(e.numberFormats)?e.numberFormats:{[l.value]:{}});let h=t?t.missingWarn:ot(e.missingWarn)||Ys(e.missingWarn)?e.missingWarn:!0,f=t?t.fallbackWarn:ot(e.fallbackWarn)||Ys(e.fallbackWarn)?e.fallbackWarn:!0,v=t?t.fallbackRoot:ot(e.fallbackRoot)?e.fallbackRoot:!0,p=!!e.fallbackFormat,w=kt(e.missing)?e.missing:null,_=kt(e.missing)?n6(e.missing):null,y=kt(e.postTranslation)?e.postTranslation:null,C=t?t.warnHtmlMessage:ot(e.warnHtmlMessage)?e.warnHtmlMessage:!0,g=!!e.escapeParameter;const $=t?t.modifiers:it(e.modifiers)?e.modifiers:{};let E=e.pluralRules||t&&t.pluralRules,L;L=(()=>{n&&Wf(null);const z={version:kw,locale:l.value,fallbackLocale:o.value,messages:c.value,modifiers:$,pluralRules:E,missing:_===null?void 0:_,missingWarn:h,fallbackWarn:f,fallbackFormat:p,unresolving:!0,postTranslation:y===null?void 0:y,warnHtmlMessage:C,escapeParameter:g,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:"vue"}};z.datetimeFormats=u.value,z.numberFormats=d.value,z.__datetimeFormatters=it(L)?L.__datetimeFormatters:void 0,z.__numberFormatters=it(L)?L.__numberFormatters:void 0;const Y=uw(z);return n&&Wf(Y),Y})(),Il(L,l.value,o.value);function T(){return[l.value,o.value,c.value,u.value,d.value]}const X=q({get:()=>l.value,set:z=>{L.locale=z,l.value=z}}),W=q({get:()=>o.value,set:z=>{L.fallbackLocale=z,o.value=z,Il(L,l.value,z)}}),A=q(()=>c.value),x=q(()=>u.value),F=q(()=>d.value);function ie(){return kt(y)?y:null}function re(z){y=z,L.postTranslation=z}function ue(){return w}function J(z){z!==null&&(_=n6(z)),w=z,L.missing=_}const ae=(z,Y,Se,Me,De,Xe)=>{T();let Te;try{__INTLIFY_PROD_DEVTOOLS__,n||(L.fallbackContext=t?cw():void 0),Te=z(L)}finally{__INTLIFY_PROD_DEVTOOLS__,n||(L.fallbackContext=void 0)}if(Se!=="translate exists"&&qt(Te)&&Te===s1||Se==="translate exists"&&!Te){const[rt,It]=Y();return t&&v?Me(t):De(rt)}else{if(Xe(Te))return Te;throw Ki(Ri.UNEXPECTED_RETURN_TYPE)}};function ne(...z){return ae(Y=>Reflect.apply(Jf,null,[Y,...z]),()=>Uu(...z),"translate",Y=>Reflect.apply(Y.t,Y,[...z]),Y=>Y,Y=>Oe(Y))}function Q(...z){const[Y,Se,Me]=z;if(Me&&!pt(Me))throw Ki(Ri.INVALID_ARGUMENT);return ne(Y,Se,ii({resolvedMessage:!0},Me||{}))}function oe(...z){return ae(Y=>Reflect.apply(Kf,null,[Y,...z]),()=>Fu(...z),"datetime format",Y=>Reflect.apply(Y.d,Y,[...z]),()=>_c,Y=>Oe(Y)||Nt(Y))}function ve(...z){return ae(Y=>Reflect.apply(Gf,null,[Y,...z]),()=>zu(...z),"number format",Y=>Reflect.apply(Y.n,Y,[...z]),()=>_c,Y=>Oe(Y)||Nt(Y))}function fe(z){return z.map(Y=>Oe(Y)||qt(Y)||ot(Y)?Qf(String(Y)):Y)}const ye={normalize:fe,interpolate:z=>z,type:"vnode"};function U(...z){return ae(Y=>{let Se;const Me=Y;try{Me.processor=ye,Se=Reflect.apply(Jf,null,[Me,...z])}finally{Me.processor=null}return Se},()=>Uu(...z),"translate",Y=>Y[Wu](...z),Y=>[Qf(Y)],Y=>Nt(Y))}function _e(...z){return ae(Y=>Reflect.apply(Gf,null,[Y,...z]),()=>zu(...z),"number format",Y=>Y[Ku](...z),t6,Y=>Oe(Y)||Nt(Y))}function ge(...z){return ae(Y=>Reflect.apply(Kf,null,[Y,...z]),()=>Fu(...z),"datetime format",Y=>Y[ju](...z),t6,Y=>Oe(Y)||Nt(Y))}function se(z){E=z,L.pluralRules=E}function H(z,Y){return ae(()=>{if(!z)return!1;const Se=Oe(Y)?Y:l.value,Me=Oe(Y)?[Se]:Bu(L,o.value,Se);for(let De=0;De<Me.length;De++){const Xe=te(Me[De]);let Te=L.messageResolver(Xe,z);if(Te===null&&(Te=Xe[z]),On(Te)||en(Te)||Oe(Te))return!0}return!1},()=>[z],"translate exists",Se=>Reflect.apply(Se.te,Se,[z,Y]),Mw,Se=>ot(Se))}function N(z){let Y=null;const Se=Bu(L,o.value,l.value);for(let Me=0;Me<Se.length;Me++){const De=c.value[Se[Me]]||{},Xe=L.messageResolver(De,z);if(Xe!=null){Y=Xe;break}}return Y}function O(z){const Y=N(z);return Y??(t?t.tm(z)||{}:{})}function te(z){return c.value[z]||{}}function ee(z,Y){if(r){const Se={[z]:Y};for(const Me in Se)nn(Se,Me)&&Eo(Se[Me]);Y=Se[z]}c.value[z]=Y,L.messages=c.value}function me(z,Y){c.value[z]=c.value[z]||{};const Se={[z]:Y};if(r)for(const Me in Se)nn(Se,Me)&&Eo(Se[Me]);Y=Se[z],F0(Y,c.value[z]),L.messages=c.value}function we(z){return u.value[z]||{}}function S(z,Y){u.value[z]=Y,L.datetimeFormats=u.value,qf(L,z,Y)}function k(z,Y){u.value[z]=ii(u.value[z]||{},Y),L.datetimeFormats=u.value,qf(L,z,Y)}function D(z){return d.value[z]||{}}function P(z,Y){d.value[z]=Y,L.numberFormats=d.value,Yf(L,z,Y)}function R(z,Y){d.value[z]=ii(d.value[z]||{},Y),L.numberFormats=d.value,Yf(L,z,Y)}i6++,t&&pc&&(Ve(t.locale,z=>{a&&(l.value=z,L.locale=z,Il(L,l.value,o.value))}),Ve(t.fallbackLocale,z=>{a&&(o.value=z,L.fallbackLocale=z,Il(L,l.value,o.value))}));const I={id:i6,locale:X,fallbackLocale:W,get inheritLocale(){return a},set inheritLocale(z){a=z,z&&t&&(l.value=t.locale.value,o.value=t.fallbackLocale.value,Il(L,l.value,o.value))},get availableLocales(){return Object.keys(c.value).sort()},messages:A,get modifiers(){return $},get pluralRules(){return E||{}},get isGlobal(){return n},get missingWarn(){return h},set missingWarn(z){h=z,L.missingWarn=h},get fallbackWarn(){return f},set fallbackWarn(z){f=z,L.fallbackWarn=f},get fallbackRoot(){return v},set fallbackRoot(z){v=z},get fallbackFormat(){return p},set fallbackFormat(z){p=z,L.fallbackFormat=p},get warnHtmlMessage(){return C},set warnHtmlMessage(z){C=z,L.warnHtmlMessage=z},get escapeParameter(){return g},set escapeParameter(z){g=z,L.escapeParameter=z},t:ne,getLocaleMessage:te,setLocaleMessage:ee,mergeLocaleMessage:me,getPostTranslationHandler:ie,setPostTranslationHandler:re,getMissingHandler:ue,setMissingHandler:J,[W4]:se};return I.datetimeFormats=x,I.numberFormats=F,I.rt=Q,I.te=H,I.tm=O,I.d=oe,I.n=ve,I.getDateTimeFormat=we,I.setDateTimeFormat=S,I.mergeDateTimeFormat=k,I.getNumberFormat=D,I.setNumberFormat=P,I.mergeNumberFormat=R,I[j4]=i,I[Wu]=U,I[ju]=ge,I[Ku]=_e,I}function Lw(e){const t=Oe(e.locale)?e.locale:Lo,i=Oe(e.fallbackLocale)||Nt(e.fallbackLocale)||it(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:t,n=kt(e.missing)?e.missing:void 0,r=ot(e.silentTranslationWarn)||Ys(e.silentTranslationWarn)?!e.silentTranslationWarn:!0,s=ot(e.silentFallbackWarn)||Ys(e.silentFallbackWarn)?!e.silentFallbackWarn:!0,a=ot(e.fallbackRoot)?e.fallbackRoot:!0,l=!!e.formatFallbackMessages,o=it(e.modifiers)?e.modifiers:{},c=e.pluralizationRules,u=kt(e.postTranslation)?e.postTranslation:void 0,d=Oe(e.warnHtmlInMessage)?e.warnHtmlInMessage!=="off":!0,h=!!e.escapeParameterHtml,f=ot(e.sync)?e.sync:!0;let v=e.messages;if(it(e.sharedMessages)){const $=e.sharedMessages;v=Object.keys($).reduce((L,B)=>{const T=L[B]||(L[B]={});return ii(T,$[B]),L},v||{})}const{__i18n:p,__root:w,__injectWithOption:_}=e,y=e.datetimeFormats,C=e.numberFormats,g=e.flatJson;return{locale:t,fallbackLocale:i,messages:v,flatJson:g,datetimeFormats:y,numberFormats:C,missing:n,missingWarn:r,fallbackWarn:s,fallbackRoot:a,fallbackFormat:l,modifiers:o,pluralRules:c,postTranslation:u,warnHtmlMessage:d,escapeParameter:h,messageResolver:e.messageResolver,inheritLocale:f,__i18n:p,__root:w,__injectWithOption:_}}function Gu(e={}){const t=qh(Lw(e)),{__extender:i}=e,n={id:t.id,get locale(){return t.locale.value},set locale(r){t.locale.value=r},get fallbackLocale(){return t.fallbackLocale.value},set fallbackLocale(r){t.fallbackLocale.value=r},get messages(){return t.messages.value},get datetimeFormats(){return t.datetimeFormats.value},get numberFormats(){return t.numberFormats.value},get availableLocales(){return t.availableLocales},get missing(){return t.getMissingHandler()},set missing(r){t.setMissingHandler(r)},get silentTranslationWarn(){return ot(t.missingWarn)?!t.missingWarn:t.missingWarn},set silentTranslationWarn(r){t.missingWarn=ot(r)?!r:r},get silentFallbackWarn(){return ot(t.fallbackWarn)?!t.fallbackWarn:t.fallbackWarn},set silentFallbackWarn(r){t.fallbackWarn=ot(r)?!r:r},get modifiers(){return t.modifiers},get formatFallbackMessages(){return t.fallbackFormat},set formatFallbackMessages(r){t.fallbackFormat=r},get postTranslation(){return t.getPostTranslationHandler()},set postTranslation(r){t.setPostTranslationHandler(r)},get sync(){return t.inheritLocale},set sync(r){t.inheritLocale=r},get warnHtmlInMessage(){return t.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(r){t.warnHtmlMessage=r!=="off"},get escapeParameterHtml(){return t.escapeParameter},set escapeParameterHtml(r){t.escapeParameter=r},get pluralizationRules(){return t.pluralRules||{}},__composer:t,t(...r){return Reflect.apply(t.t,t,[...r])},rt(...r){return Reflect.apply(t.rt,t,[...r])},te(r,s){return t.te(r,s)},tm(r){return t.tm(r)},getLocaleMessage(r){return t.getLocaleMessage(r)},setLocaleMessage(r,s){t.setLocaleMessage(r,s)},mergeLocaleMessage(r,s){t.mergeLocaleMessage(r,s)},d(...r){return Reflect.apply(t.d,t,[...r])},getDateTimeFormat(r){return t.getDateTimeFormat(r)},setDateTimeFormat(r,s){t.setDateTimeFormat(r,s)},mergeDateTimeFormat(r,s){t.mergeDateTimeFormat(r,s)},n(...r){return Reflect.apply(t.n,t,[...r])},getNumberFormat(r){return t.getNumberFormat(r)},setNumberFormat(r,s){t.setNumberFormat(r,s)},mergeNumberFormat(r,s){t.mergeNumberFormat(r,s)}};return n.__extender=i,n}function Ew(e,t,i){return{beforeCreate(){const n=xo();if(!n)throw Ki(Ri.UNEXPECTED_ERROR);const r=this.$options;if(r.i18n){const s=r.i18n;if(r.__i18n&&(s.__i18n=r.__i18n),s.__root=t,this===this.$root)this.$i18n=r6(e,s);else{s.__injectWithOption=!0,s.__extender=i.__vueI18nExtend,this.$i18n=Gu(s);const a=this.$i18n;a.__extender&&(a.__disposer=a.__extender(this.$i18n))}}else if(r.__i18n)if(this===this.$root)this.$i18n=r6(e,r);else{this.$i18n=Gu({__i18n:r.__i18n,__injectWithOption:!0,__extender:i.__vueI18nExtend,__root:t});const s=this.$i18n;s.__extender&&(s.__disposer=s.__extender(this.$i18n))}else this.$i18n=e;r.__i18nGlobal&&q4(t,r,r),this.$t=(...s)=>this.$i18n.t(...s),this.$rt=(...s)=>this.$i18n.rt(...s),this.$te=(s,a)=>this.$i18n.te(s,a),this.$d=(...s)=>this.$i18n.d(...s),this.$n=(...s)=>this.$i18n.n(...s),this.$tm=s=>this.$i18n.tm(s),i.__setInstance(n,this.$i18n)},mounted(){},unmounted(){const n=xo();if(!n)throw Ki(Ri.UNEXPECTED_ERROR);const r=this.$i18n;delete this.$t,delete this.$rt,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,r.__disposer&&(r.__disposer(),delete r.__disposer,delete r.__extender),i.__deleteInstance(n),delete this.$i18n}}}function r6(e,t){e.locale=t.locale||e.locale,e.fallbackLocale=t.fallbackLocale||e.fallbackLocale,e.missing=t.missing||e.missing,e.silentTranslationWarn=t.silentTranslationWarn||e.silentFallbackWarn,e.silentFallbackWarn=t.silentFallbackWarn||e.silentFallbackWarn,e.formatFallbackMessages=t.formatFallbackMessages||e.formatFallbackMessages,e.postTranslation=t.postTranslation||e.postTranslation,e.warnHtmlInMessage=t.warnHtmlInMessage||e.warnHtmlInMessage,e.escapeParameterHtml=t.escapeParameterHtml||e.escapeParameterHtml,e.sync=t.sync||e.sync,e.__composer[W4](t.pluralizationRules||e.pluralizationRules);const i=Kh(e.locale,{messages:t.messages,__i18n:t.__i18n});return Object.keys(i).forEach(n=>e.mergeLocaleMessage(n,i[n])),t.datetimeFormats&&Object.keys(t.datetimeFormats).forEach(n=>e.mergeDateTimeFormat(n,t.datetimeFormats[n])),t.numberFormats&&Object.keys(t.numberFormats).forEach(n=>e.mergeNumberFormat(n,t.numberFormats[n])),e}const Gh={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e==="parent"||e==="global",default:"parent"},i18n:{type:Object}};function xw({slots:e},t){return t.length===1&&t[0]==="default"?(e.default?e.default():[]).reduce((n,r)=>[...n,...r.type===Ce?r.children:[r]],[]):t.reduce((i,n)=>{const r=e[n];return r&&(i[n]=r()),i},vt())}function G4(){return Ce}const Hw=Ne({name:"i18n-t",props:ii({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>qt(e)||!isNaN(e)}},Gh),setup(e,t){const{slots:i,attrs:n}=t,r=e.i18n||Yh({useScope:e.scope,__useComponent:!0});return()=>{const s=Object.keys(i).filter(d=>d[0]!=="_"),a=vt();e.locale&&(a.locale=e.locale),e.plural!==void 0&&(a.plural=Oe(e.plural)?+e.plural:e.plural);const l=xw(t,s),o=r[Wu](e.keypath,l,a),c=ii(vt(),n),u=Oe(e.tag)||pt(e.tag)?e.tag:G4();return Ee(u,c,o)}}}),s6=Hw;function Tw(e){return Nt(e)&&!Oe(e[0])}function Y4(e,t,i,n){const{slots:r,attrs:s}=t;return()=>{const a={part:!0};let l=vt();e.locale&&(a.locale=e.locale),Oe(e.format)?a.key=e.format:pt(e.format)&&(Oe(e.format.key)&&(a.key=e.format.key),l=Object.keys(e.format).reduce((h,f)=>i.includes(f)?ii(vt(),h,{[f]:e.format[f]}):h,vt()));const o=n(e.value,a,l);let c=[a.key];Nt(o)?c=o.map((h,f)=>{const v=r[h.type],p=v?v({[h.type]:h.value,index:f,parts:o}):[h.value];return Tw(p)&&(p[0].key=`${h.type}-${f}`),p}):Oe(o)&&(c=[o]);const u=ii(vt(),s),d=Oe(e.tag)||pt(e.tag)?e.tag:G4();return Ee(d,u,c)}}const Nw=Ne({name:"i18n-n",props:ii({value:{type:Number,required:!0},format:{type:[String,Object]}},Gh),setup(e,t){const i=e.i18n||Yh({useScope:e.scope,__useComponent:!0});return Y4(e,t,F4,(...n)=>i[Ku](...n))}}),a6=Nw;function Pw(e,t){const i=e;if(e.mode==="composition")return i.__getInstance(t)||e.global;{const n=i.__getInstance(t);return n!=null?n.__composer:e.global.__composer}}function Ow(e){const t=a=>{const{instance:l,value:o}=a;if(!l||!l.$)throw Ki(Ri.UNEXPECTED_ERROR);const c=Pw(e,l.$),u=l6(o);return[Reflect.apply(c.t,c,[...o6(u)]),c]};return{created:(a,l)=>{const[o,c]=t(l);pc&&(a.__i18nWatcher=Ve(c.locale,()=>{l.instance&&l.instance.$forceUpdate()})),a.__composer=c,a.textContent=o},unmounted:a=>{pc&&a.__i18nWatcher&&(a.__i18nWatcher(),a.__i18nWatcher=void 0,delete a.__i18nWatcher),a.__composer&&(a.__composer=void 0,delete a.__composer)},beforeUpdate:(a,{value:l})=>{if(a.__composer){const o=a.__composer,c=l6(l);a.textContent=Reflect.apply(o.t,o,[...o6(c)])}},getSSRProps:a=>{const[l]=t(a);return{textContent:l}}}}function l6(e){if(Oe(e))return{path:e};if(it(e)){if(!("path"in e))throw Ki(Ri.REQUIRED_VALUE,"path");return e}else throw Ki(Ri.INVALID_VALUE)}function o6(e){const{path:t,locale:i,args:n,choice:r,plural:s}=e,a={},l=n||{};return Oe(i)&&(a.locale=i),qt(r)&&(a.plural=r),qt(s)&&(a.plural=s),[t,l,a]}function Iw(e,t,...i){const n=it(i[0])?i[0]:{};(ot(n.globalInstall)?n.globalInstall:!0)&&([s6.name,"I18nT"].forEach(s=>e.component(s,s6)),[a6.name,"I18nN"].forEach(s=>e.component(s,a6)),[u6.name,"I18nD"].forEach(s=>e.component(s,u6))),e.directive("t",Ow(t))}const Rw=Fr("global-vue-i18n");function Vw(e={}){const t=__VUE_I18N_LEGACY_API__&&ot(e.legacy)?e.legacy:__VUE_I18N_LEGACY_API__,i=ot(e.globalInjection)?e.globalInjection:!0,n=new Map,[r,s]=Dw(e,t),a=Fr("");function l(d){return n.get(d)||null}function o(d,h){n.set(d,h)}function c(d){n.delete(d)}const u={get mode(){return __VUE_I18N_LEGACY_API__&&t?"legacy":"composition"},async install(d,...h){if(d.__VUE_I18N_SYMBOL__=a,d.provide(d.__VUE_I18N_SYMBOL__,u),it(h[0])){const p=h[0];u.__composerExtend=p.__composerExtend,u.__vueI18nExtend=p.__vueI18nExtend}let f=null;!t&&i&&(f=Kw(d,u.global)),__VUE_I18N_FULL_INSTALL__&&Iw(d,u,...h),__VUE_I18N_LEGACY_API__&&t&&d.mixin(Ew(s,s.__composer,u));const v=d.unmount;d.unmount=()=>{f&&f(),u.dispose(),v()}},get global(){return s},dispose(){r.stop()},__instances:n,__getInstance:l,__setInstance:o,__deleteInstance:c};return u}function Yh(e={}){const t=xo();if(t==null)throw Ki(Ri.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw Ki(Ri.NOT_INSTALLED);const i=Zw(t),n=Fw(i),r=K4(t),s=Bw(e,r);if(s==="global")return q4(n,e,r),n;if(s==="parent"){let o=zw(i,t,e.__useComponent);return o==null&&(o=n),o}const a=i;let l=a.__getInstance(t);if(l==null){const o=ii({},e);"__i18n"in r&&(o.__i18n=r.__i18n),n&&(o.__root=n),l=qh(o),a.__composerExtend&&(l[qu]=a.__composerExtend(l)),Ww(a,t,l),a.__setInstance(t,l)}return l}function Dw(e,t){const i=Sh(),n=__VUE_I18N_LEGACY_API__&&t?i.run(()=>Gu(e)):i.run(()=>qh(e));if(n==null)throw Ki(Ri.UNEXPECTED_ERROR);return[i,n]}function Zw(e){const t=Mt(e.isCE?Rw:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw Ki(e.isCE?Ri.NOT_INSTALLED_WITH_PROVIDE:Ri.UNEXPECTED_ERROR);return t}function Bw(e,t){return n1(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}function Fw(e){return e.mode==="composition"?e.global:e.global.__composer}function zw(e,t,i=!1){let n=null;const r=t.root;let s=Uw(t,i);for(;s!=null;){const a=e;if(e.mode==="composition")n=a.__getInstance(s);else if(__VUE_I18N_LEGACY_API__){const l=a.__getInstance(s);l!=null&&(n=l.__composer,i&&n&&!n[j4]&&(n=null))}if(n!=null||r===s)break;s=s.parent}return n}function Uw(e,t=!1){return e==null?null:t&&e.vnode.ctx||e.parent}function Ww(e,t,i){nt(()=>{},t),Ii(()=>{const n=i;e.__deleteInstance(t);const r=n[qu];r&&(r(),delete n[qu])},t)}const jw=["locale","fallbackLocale","availableLocales"],c6=["t","rt","d","n","tm","te"];function Kw(e,t){const i=Object.create(null);return jw.forEach(r=>{const s=Object.getOwnPropertyDescriptor(t,r);if(!s)throw Ki(Ri.UNEXPECTED_ERROR);const a=At(s.value)?{get(){return s.value.value},set(l){s.value.value=l}}:{get(){return s.get&&s.get()}};Object.defineProperty(i,r,a)}),e.config.globalProperties.$i18n=i,c6.forEach(r=>{const s=Object.getOwnPropertyDescriptor(t,r);if(!s||!s.value)throw Ki(Ri.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${r}`,s)}),()=>{delete e.config.globalProperties.$i18n,c6.forEach(r=>{delete e.config.globalProperties[`$${r}`]})}}const qw=Ne({name:"i18n-d",props:ii({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},Gh),setup(e,t){const i=e.i18n||Yh({useScope:e.scope,__useComponent:!0});return Y4(e,t,B4,(...n)=>i[ju](...n))}}),u6=qw;Aw();rw(D7);sw(tw);aw(Bu);if(__INTLIFY_PROD_DEVTOOLS__){const e=cs();e.__INTLIFY__=!0,Z7(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}var X4="(prefers-reduced-motion: reduce)";function J4(){let e=K(!1);if(typeof window<"u"&&typeof window.matchMedia=="function"){let t=window.matchMedia(X4);e.value=t.matches;let i=n=>{e.value=n.matches};typeof t.addEventListener=="function"?(t.addEventListener("change",i),tc(()=>t.removeEventListener("change",i))):typeof t.addListener=="function"&&(t.addListener(i),tc(()=>t.removeListener(i)))}return Or(e)}function Xh(){return typeof window>"u"||typeof window.matchMedia!="function"?!1:window.matchMedia(X4).matches}var Yu="data-nb-tour-step",Gw=Symbol("nb-command-palette");function Yw(){let e=vs(new Map),t=K(!1),i=K(void 0),n=K(void 0);function r(u){e.set(u.id,u)}function s(u){for(let d of u)e.set(d.id,d)}function a(u){e.delete(u)}function l(u){n.value=u,t.value=!0}function o(){t.value=!1,n.value=void 0}function c(u){i.value=u}return vs({commands:e,isOpen:t,activeContext:i,searchFilter:n,register:r,registerMany:s,unregister:a,open:l,close:o,setContext:c})}var tt=(e,t)=>{let i=e.__vccOpts||e;for(let[n,r]of t)i[n]=r;return i},d6=Object.defineProperty,a1=(e,t)=>{let i={};for(var n in e)d6(i,n,{get:e[n],enumerable:!0});return d6(i,Symbol.toStringTag,{value:"Module"}),i},Xw=a1({default:()=>Jw});function Jw(e){e.directive("nb-context-menu",{mounted(t,i){let n=r=>{r.preventDefault(),typeof i.value=="function"&&i.value({x:r.clientX,y:r.clientY})};t.__nbContextMenuHandler__=n,t.addEventListener("contextmenu",n)},updated(t,i){t.__nbContextMenuHandler__&&t.removeEventListener("contextmenu",t.__nbContextMenuHandler__);let n=r=>{r.preventDefault(),typeof i.value=="function"&&i.value({x:r.clientX,y:r.clientY})};t.__nbContextMenuHandler__=n,t.addEventListener("contextmenu",n)},unmounted(t){t.__nbContextMenuHandler__&&(t.removeEventListener("contextmenu",t.__nbContextMenuHandler__),delete t.__nbContextMenuHandler__)}})}var Qw=a1({devWarn:()=>Dr,renderTooltipContent:()=>z0}),h6=new Set(["span","div","p","b","strong","em","i","u","s","small","code","kbd","br","ul","ol","li"]),e9=new Set(["br"]),f6=new Set(["class","style","dir","lang"]),t9=e=>e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"),i9=new Set("color.background-color.font-family.font-size.font-style.font-variant.font-weight.letter-spacing.line-height.text-align.text-decoration.text-transform.white-space.word-break.overflow-wrap.opacity.display.flex-direction.align-items.justify-content.gap.margin.margin-top.margin-right.margin-bottom.margin-left.padding.padding-top.padding-right.padding-bottom.padding-left.max-width.min-width.border-radius".split(".")),n9=/url\(|image-set\(|expression\(|javascript:|@import|\\/i,r9=/^[A-Za-z_-][A-Za-z0-9_-]*$/,s9=e=>e.split(";").map(t=>{let i=t.indexOf(":");if(i<0)return"";let n=t.slice(0,i).trim().toLowerCase(),r=t.slice(i+1).trim();return!n||!r?"":i9.has(n)?n9.test(r)?(Dr(`style-value:${n}`,`The value of "${n}" was dropped: tooltip content may not load a resource or call a CSS function that does.`),""):`${n}: ${r}`:(Dr(`style:${n}`,`"${n}" is not an allowed tooltip content style property and was dropped.`),"")}).filter(Boolean).join("; "),a9=e=>e.split(/\s+/).filter(t=>t?r9.test(t)?!0:(Dr(`class:${t}`,`"${t}" is not a valid class token for tooltip content and was dropped.`),!1):!1).join(" "),l9=(e,t)=>e==="style"?s9(t):e==="class"?a9(t):t,o9=new Set(["b","strong","em","i","u","s","small","code","kbd","br","p"]),c9={"<":"<",">":">",'"':""","'":"'"},p6=e=>e.replace(/&(?!(?:[a-zA-Z][a-zA-Z0-9]{1,10}|#\d{1,7}|#[xX][0-9a-fA-F]{1,6});)/g,"&").replace(/[<>"']/g,t=>c9[t]),Q4=e=>e.split(/(<[^<>]*>)/g).map(t=>{var i;if(t.startsWith("<")&&t.endsWith(">")){let n=/^<\s*(\/?)\s*([a-zA-Z][a-zA-Z0-9]*)\s*\/?\s*>$/.exec(t),r=(i=n==null?void 0:n[2])==null?void 0:i.toLowerCase();return r&&o9.has(r)?`<${n[1]}${r}>`:(r&&Dr(`string-tag:${r}`,`<${r}> is not allowed in a tooltip string and was shown as text. Use the structured content form for anything richer.`),p6(t))}return p6(t).replace(/\n/g,"<br>")}).join(""),_6=new Set,Dr=(e,t)=>{typeof process<"u"||_6.has(e)||(_6.add(e),console.warn(`[nb-tooltip] ${t}`))},Xu=e=>{if(Array.isArray(e))return e.map(u=>Xu(u)).join("");if(!e||typeof e!="object"||!e.component)return"";let{component:t,props:i={},children:n,content:r}=e,s=n===void 0?r:n,a=Array.isArray(s)?Xu(s):s===void 0?"":Q4(String(s)),l=String(t).toLowerCase();if(!h6.has(l))return Dr(`tag:${l}`,`<${l}> is not allowed in tooltip content and was dropped. Allowed tags: ${[...h6].join(", ")}.`),a;let o=Object.entries(i).filter(([u])=>f6.has(u)?!0:(Dr(`prop:${u}`,`"${u}" is not an allowed tooltip content prop and was dropped. Allowed props: ${[...f6].join(", ")}.`),!1)).map(([u,d])=>[u,l9(u,String(d))]).filter(([,u])=>u!=="").map(([u,d])=>`${u}="${t9(d)}"`).join(" "),c=`<${l}${o?` ${o}`:""}>`;return e9.has(l)?c:`${c}${a}</${l}>`},z0=e=>e?typeof e=="string"?Q4(e):Array.isArray(e)?Xu(e):"":"",u9=a1({default:()=>V9,dismissAllTooltips:()=>U9}),Jh=e=>e.status??e.flavor??"default",Qh=e=>e.chipClass??e.classExtra,In=new Set,d9=0,h9=()=>`nb-tooltip-${++d9}`,f9=900,ev=4e3,p9=500,tv=0,Ju=(e,t)=>{if(!e)return!1;let i=Date.now()-e;return i>=0&&i<t},m6=!1,_9=()=>{if(m6||typeof document>"u")return;m6=!0;let e=t=>{if(In.size===0)return;let i=t==null?void 0:t.target;i instanceof Element&&i.closest(".nb-tooltip")||z9("dismiss")};document.addEventListener("pointerdown",()=>{tv=Date.now()},!0),document.addEventListener("dragstart",()=>e(),!0),document.addEventListener("keydown",t=>{t.key==="Escape"&&e()},!0),document.addEventListener("pointerdown",e,!0),window.addEventListener("blur",e),document.addEventListener("mouseleave",e)},v6=200,g6=1e3,m9=2,v9=e=>{let t=e.tooltipElement;if(!t)return!1;if(t.__hovered__)return!0;try{return t.isConnected&&t.matches(":hover")}catch{return!1}},g9=e=>{if(!e.isConnected)return!1;if(v9(e)||e.__trigger__==="focus"&&e.contains(document.activeElement)||e.__trigger__==="touch"&&Ju(e.__lastTouchAt__,ev))return!0;try{return e.matches(":hover")}catch{return!0}},Qu=e=>{clearTimeout(e.__watchdogTimer__),e.__watchdogTimer__=void 0,e.__watchdogMisses__=0},b9=e=>{Qu(e);let t=()=>{var i;if(!((i=e.__chips__)!=null&&i.size)){Qu(e);return}if(g9(e))e.__watchdogMisses__=0;else{if(e.__watchdogMisses__=(e.__watchdogMisses__??0)+1,!e.isConnected){Zs(e,!0,"program");return}if(e.__watchdogMisses__>=m9){i2(e,"dismiss");return}}e.__watchdogTimer__=setTimeout(t,g6)};e.__watchdogTimer__=setTimeout(t,g6)},Rn=new Set,Tr=null,iv=e=>`${Math.round(e.top)}:${Math.round(e.left)}:${Math.round(e.width)}:${Math.round(e.height)}`,y9=e=>{if(typeof getComputedStyle!="function")return!1;let t;try{t=getComputedStyle(e)}catch{return!1}let i=`${t.overflow} ${t.overflowX} ${t.overflowY}`;return/hidden|scroll|auto|clip|overlay/.test(i)},w9=e=>{let t=[],i=e.parentElement;for(;i&&i!==document.body&&i!==document.documentElement;)y9(i)&&t.push(i),i=i.parentElement;return t},ed=e=>!(e.width===0&&e.height===0&&e.top===0&&e.left===0),S9=(e,t)=>{if(!e.isConnected)return!1;if(!ed(t))return!0;if(t.width===0||t.height===0||!(t.bottom>0&&t.right>0&&t.top<window.innerHeight&&t.left<window.innerWidth))return!1;for(let i of e.__clippers__??[]){if(!i.isConnected)continue;let n=i.getBoundingClientRect();if(ed(n)&&(t.bottom<=n.top||t.top>=n.bottom||t.right<=n.left||t.left>=n.right))return!1}return!0},nv=e=>{var n;let t=e.tooltipElement;if(!t||!((n=e.__chips__)!=null&&n.size)){Rn.delete(e);return}let i=e.getBoundingClientRect();if(!S9(e,i)){e.__offscreenReported__||(e.__offscreenReported__=!0,i2(e,"dismiss"));return}e.__offscreenReported__=!1,e.__lastRect__=iv(i),e.__side__!=="cursor"&&Yo(e,t,e.__requestedSide__??e.__side__)},mc=()=>{sv();for(let e of Array.from(Rn))nv(e)},C9=100,k9=320,b6=0,rv=0,sv=()=>{rv=Date.now()+k9},td=()=>{if(Rn.size===0){Tr=null;return}let e=Date.now();if(e>=rv&&e-b6<C9){Tr=requestAnimationFrame(td);return}b6=e;for(let t of Array.from(Rn)){if(!t.tooltipElement){Rn.delete(t);continue}iv(t.getBoundingClientRect())!==t.__lastRect__&&(sv(),nv(t))}Tr=requestAnimationFrame(td)},vc=!1,A9=e=>{Rn.add(e),e.__lastRect__=void 0,e.__clippers__=w9(e),!(typeof window>"u")&&(vc||(vc=!0,document.addEventListener("scroll",mc,{capture:!0,passive:!0}),window.addEventListener("resize",mc,{passive:!0})),Tr===null&&typeof requestAnimationFrame=="function"&&(Tr=requestAnimationFrame(td)))},e2=e=>{Rn.delete(e),e.__lastRect__=void 0,e.__clippers__=void 0,!(Rn.size>0||typeof window>"u")&&(vc&&(vc=!1,document.removeEventListener("scroll",mc,{capture:!0}),window.removeEventListener("resize",mc)),Tr!==null&&typeof cancelAnimationFrame=="function"&&(cancelAnimationFrame(Tr),Tr=null))},M9=(e,t,i)=>{var n;if((n=e.__chips__)==null||n.delete(t),clearTimeout(t.__removeTimer__),t.__removeTimer__=void 0,i||Xh()){t.remove();return}t.style.animation=`tooltipDisappear ${v6}ms ease-in-out forwards`,t.__removeTimer__=setTimeout(()=>{t.__removeTimer__=void 0,t.remove()},v6)},av=(e,t)=>{if(e2(e),e.__trigger__=void 0,e.__side__=void 0,e.__chips__)for(let i of Array.from(e.__chips__))M9(e,i,t);e.tooltipElement=void 0,e.__lastContent__=void 0,Qu(e)},lv="a[href], button, input, select, textarea, summary, [tabindex]",id="data-nb-tooltip-anchor",y6=(e,t)=>{let i=t.target;if(!(i instanceof Element)||i===e)return!0;let n=i.closest(`[${id}]`);return n===null||n===e},$9='button, a[href], [role="button"], [role="tab"], [role="menuitem"], input, select, textarea, label',L9=e=>{let t=e.closest($9);return!t||t.disabled===!0?!1:t.getAttribute("aria-disabled")!=="true"},oo=e=>{if(!e)return"";if(typeof e=="string")return e.replace(/<[^>]*>/g," ").replace(/ /g," ").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/'/g,"'").replace(/\s+/g," ").trim();if(Array.isArray(e))return e.map(t=>oo(t)).filter(Boolean).join(" ");if(typeof e=="object"){let t=e;return oo(t.children??t.content)}return""},ov=e=>[oo(e.header),oo(e.body),oo(e.tip)].filter(Boolean).join(". "),E9=e=>{if(e.hasAttribute("aria-labelledby")||e.hasAttribute("aria-label")&&!e.__ownsAriaLabel__||e.hasAttribute("title")||(e.textContent??"").trim().length>0)return!0;let t=e.querySelector("img[alt]");return!!t&&(t.getAttribute("alt")??"").trim().length>0},cv=(e,t)=>{let i=t.aria??"auto";return i==="auto"?E9(e)?"description":"label":i},x9=(e,t)=>{if(!t||cv(e,t)!=="label"){e.__ownsAriaLabel__&&(e.__ownsAriaLabel__=(e.removeAttribute("aria-label"),!1)),e.__ownsRole__&&(e.__ownsRole__=(e.removeAttribute("role"),!1));return}let i=ov(t);i&&(e.setAttribute("aria-label",i),e.__ownsAriaLabel__=!0,!e.__ownsRole__&&!e.hasAttribute("role")&&!e.matches(lv)&&(e.setAttribute("role","img"),e.__ownsRole__=!0))},j1=(e,t)=>{let i=!!(t!=null&&t.focusable);if(i&&!e.__ownsTabIndex__){if(e.matches(lv)||e.hasAttribute("tabindex"))return;e.setAttribute("tabindex","0"),e.__ownsTabIndex__=!0;return}!i&&e.__ownsTabIndex__&&(e.removeAttribute("tabindex"),e.__ownsTabIndex__=!1)},H9=(e,t)=>{e.__prevDescribedBy__=e.getAttribute("aria-describedby");let i=[e.__prevDescribedBy__,t].filter(Boolean).join(" ");e.setAttribute("aria-describedby",i)},T9=e=>{e.__prevDescribedBy__!==void 0&&(e.__prevDescribedBy__?e.setAttribute("aria-describedby",e.__prevDescribedBy__):e.removeAttribute("aria-describedby"),e.__prevDescribedBy__=void 0)},N9="nb-tooltip-description",uv=e=>!!e&&!!(e.body||e.header||e.tip),P9=(e,t)=>{if(typeof document>"u")return;let i=t&&uv(t)&&cv(e,t)==="description"?ov(t):"";if(!i){dv(e);return}let n=e.__descNode__;n||(n=document.createElement("span"),n.className=N9,n.id=h9(),n.setAttribute("role","tooltip"),document.body.appendChild(n),e.__descNode__=n,H9(e,n.id)),e.__descText__!==i&&(n.textContent=i,e.__descText__=i)},dv=e=>{e.__descNode__&&(T9(e),e.__descNode__.remove(),e.__descNode__=void 0,e.__descText__=void 0)},O9=(e,t)=>{if(uv(t)){e.__prevTitle__===void 0&&e.hasAttribute("title")&&(e.__prevTitle__=e.getAttribute("title")??"",e.removeAttribute("title"));return}hv(e)},hv=e=>{e.__prevTitle__!==void 0&&(e.hasAttribute("title")||e.setAttribute("title",e.__prevTitle__),e.__prevTitle__=void 0)},K1=(e,t)=>{O9(e,t),x9(e,t),P9(e,t)},I9=e=>{var t,i;return e.disabled===!0?!0:!!((t=e.closest)!=null&&t.call(e,"fieldset[disabled]"))&&!((i=e.closest)!=null&&i.call(e,"fieldset[disabled] > legend:first-of-type"))},R9=(e,t,i)=>t>=e.left&&t<=e.right&&i>=e.top&&i<=e.bottom,fv=e=>{let t=e.__proxyHost__;t&&(e.__proxyMove__&&t.removeEventListener("mousemove",e.__proxyMove__),e.__proxyLeave__&&t.removeEventListener("mouseleave",e.__proxyLeave__),e.__proxyHost__=void 0,e.__proxyMove__=void 0,e.__proxyLeave__=void 0,e.__proxyInside__=!1)},w6=e=>{let t=e.__tooltipBinding__&&I9(e)?e.parentElement:null;e.__proxyHost__!==t&&(fv(e),t&&(e.__proxyMove__=i=>{var s,a,l;let n=i;if(n.buttons)return;let r=e.getBoundingClientRect();if(ed(r)?R9(r,n.clientX,n.clientY):i.target===e||e.contains(i.target)){e.__mouseX__=n.clientX,e.__mouseY__=n.clientY,e.__proxyInside__?(s=e.__tooltipBinding__)!=null&&s.followCursor&&Yo(e,e.tooltipElement,e.__requestedSide__):(e.__proxyInside__=!0,(a=e.__showTooltip__)==null||a.call(e,"pointer"));return}e.__proxyInside__&&(e.__proxyInside__=!1,(l=e.__hideTooltip__)==null||l.call(e,void 0,"pointer"))},e.__proxyLeave__=()=>{var i;e.__proxyInside__&&(e.__proxyInside__=!1,(i=e.__hideTooltip__)==null||i.call(e,void 0,"pointer"))},t.addEventListener("mousemove",e.__proxyMove__),t.addEventListener("mouseleave",e.__proxyLeave__),e.__proxyHost__=t))},S6=e=>{e.onOpenChange||Dr("controlled-no-handler","a tooltip was given `open` but no `onOpenChange`, so nothing the user does (hover, blur, Escape) can change it. Either handle `onOpenChange` or drop `open` and let the directive own visibility.")},C6=(e,t)=>{var n,r;if(!t)return;let i=t.open===void 0?e.__openState__===void 0&&t.defaultOpen?!0:void 0:t.open;i!==void 0&&i!==(e.__openState__===!0||!!e.__showTimer__)&&(i?(n=e.__showTooltip__)==null||n.call(e,"program"):(r=e.__hideTooltip__)==null||r.call(e,0,"program"))},V9=e=>{_9();let t=e.config.globalProperties.$router;t&&t.beforeEach(()=>{In.forEach(i=>{var n;return(n=i==null?void 0:i.__hideTooltip__)==null?void 0:n.call(i,0,"program")}),In.clear()}),e.directive("nb-tooltip",{mounted(i,n){i.__showTooltip__=(r="pointer")=>{var a;let s=i.__tooltipBinding__;if(s){if(s.open!==void 0&&r!=="program"){S6(s),(a=s.onOpenChange)==null||a.call(s,!0,r);return}clearTimeout(i.__hideTimer__),i.__hideTimer__=void 0,D9(i,s,r)}},i.__hideTooltip__=(r=(a=>(a=i.__tooltipBinding__)==null?void 0:a.hideDelay)()??150,s="dismiss")=>{var o;let l=i.__tooltipBinding__;if((l==null?void 0:l.open)!==void 0&&s!=="program"){S6(l),(o=l.onOpenChange)==null||o.call(l,!1,s);return}if(clearTimeout(i.__hideTimer__),r<=0){i.__hideTimer__=void 0,Zs(i,!0,s);return}i.__hideTimer__=setTimeout(()=>{i.__hideTimer__=void 0,Zs(i,r<=0,s)},r)},i.__mouseMove__=r=>{var s,a;i.__mouseX__=r.clientX,i.__mouseY__=r.clientY,(s=i.__tooltipBinding__)!=null&&s.followCursor&&Yo(i,i.tooltipElement,(a=i.__tooltipBinding__)==null?void 0:a.position)},i.__tooltipBinding__=n.value,i.__showHandler__=r=>{var a;if(Ju(i.__lastTouchAt__,f9))return;let s=r;s.buttons||(typeof s.clientX=="number"&&(s.clientX||s.clientY)&&(i.__mouseX__=s.clientX,i.__mouseY__=s.clientY),(a=i.__showTooltip__)==null||a.call(i,"pointer"))},i.__hideHandler__=()=>{var r;return(r=i.__hideTooltip__)==null?void 0:r.call(i,void 0,"pointer")},i.__focusHandler__=r=>{var s;Ju(tv,p9)||y6(i,r)&&((s=i.__showTooltip__)==null||s.call(i,"focus"))},i.__blurHandler__=()=>{var r;return(r=i.__hideTooltip__)==null?void 0:r.call(i,void 0,"focus")},i.__touchHandler__=r=>{var s,a,l;((s=i.__tooltipBinding__)==null?void 0:s.touch)!==!1&&y6(i,r)&&(i.__lastTouchAt__=Date.now(),!L9(i)&&((a=i.__showTooltip__)==null||a.call(i,"touch"),(l=i.__hideTooltip__)==null||l.call(i,ev,"touch")))},j1(i,n.value),K1(i,n.value),i.setAttribute(id,""),i.addEventListener("mouseenter",i.__showHandler__),i.addEventListener("mouseleave",i.__hideHandler__),i.addEventListener("mousemove",i.__mouseMove__),i.addEventListener("focusin",i.__focusHandler__),i.addEventListener("focusout",i.__blurHandler__),i.addEventListener("touchstart",i.__touchHandler__,{passive:!0}),w6(i),C6(i,n.value)},updated(i,n){let r=i.__tooltipBinding__;if(i.__tooltipBinding__=n.value,!n.value){K1(i,void 0),j1(i,void 0),Zs(i,!0);return}if(r!==n.value&&(K1(i,n.value),j1(i,n.value)),w6(i),C6(i,n.value),!i.tooltipElement||r===n.value)return;let s=_v(n.value);s!==i.__lastContent__&&(i.__lastContent__=s,Z9(i,n.value))},unmounted(i){clearTimeout(i.__showTimer__),i.__showTimer__=void 0,clearTimeout(i.__hideTimer__),i.__hideTimer__=void 0,Zs(i,!0),In.delete(i),i.__showHandler__&&i.removeEventListener("mouseenter",i.__showHandler__),i.__hideHandler__&&i.removeEventListener("mouseleave",i.__hideHandler__),i.__focusHandler__&&i.removeEventListener("focusin",i.__focusHandler__),i.__blurHandler__&&i.removeEventListener("focusout",i.__blurHandler__),i.__touchHandler__&&i.removeEventListener("touchstart",i.__touchHandler__),dv(i),hv(i),i.__ownsAriaLabel__&&(i.__ownsAriaLabel__=(i.removeAttribute("aria-label"),!1)),i.__ownsTabIndex__&&(i.__ownsTabIndex__=(i.removeAttribute("tabindex"),!1)),i.__ownsRole__&&(i.__ownsRole__=(i.removeAttribute("role"),!1)),i.removeAttribute(id),fv(i),i.__mouseMove__&&i.removeEventListener("mousemove",i.__mouseMove__),e2(i)}})},t2=({header:e="",body:t="",tip:i=""})=>`<div class="nb-tooltip-content"><div class="nb-tooltip-header">${z0(e)}</div><div class="nb-tooltip-body">${z0(t)}</div><div class="nb-tooltip-tip">${z0(i)}</div></div>`,pv=(e,t,i)=>["nb-tooltip",`nb-tooltip-${e}`,t?`nb-tooltip-flavor-${t}`:"",i||""].filter(Boolean).join(" "),_v=e=>`${e.position??""}|${Jh(e)}|${Qh(e)??""}|${t2(e)}`,D9=(e,t,i="pointer")=>{let{header:n,body:r,tip:s,delay:a=400,animationTime:l=300,position:o,overflowOnly:c}=t,u=Jh(t),d=Qh(t);if(clearTimeout(e.__showTimer__),e.__showTimer__=void 0,av(e,!0),c){let v=e.getBoundingClientRect();if(!(Math.round(v.width)<Math.round(e.scrollWidth)))return}if(!(r||n||s))return;let h=i==="pointer"?a:0,f=Xh();e.__showTimer__=setTimeout(()=>{var _;if(e.__showTimer__=void 0,!e.isConnected)return;let v=i==="pointer"?o??"cursor":o&&o!=="cursor"?o:"top";for(let y of Array.from(Rn))y!==e&&i2(y,"superseded");let p=document.createElement("span");p.className=pv(v,u,d),p.innerHTML=t2({header:n,body:r,tip:s}),p.addEventListener("mouseenter",()=>{p.__hovered__=!0,clearTimeout(e.__hideTimer__),e.__hideTimer__=void 0,e.__watchdogMisses__=0}),p.addEventListener("mouseleave",()=>{var y;p.__hovered__=!1,(y=e.__hideTooltip__)==null||y.call(e)}),f?p.style.opacity="1":(p.style.transition=`opacity ${l}ms ease-in-out`,p.style.animation=`tooltipAppear ${l}ms ease-in-out forwards`),p.setAttribute("aria-hidden","true"),e.__trigger__=i,e.tooltipElement=p,(e.__chips__??(e.__chips__=new Set)).add(p),e.__lastContent__=_v(t),In.add(e),document.body.appendChild(p),e.__requestedSide__=v,e.__side__=v,Yo(e,p,v),A9(e),b9(e);let w=e.__openState__===!0;e.__openState__=!0,w||((_=t.onOpenChange)==null||_.call(t,!0,i))},h)},i2=(e,t,i=!0)=>{if(e.__hideTooltip__){e.__hideTooltip__(i?0:void 0,t);return}Zs(e,i,t)},Zs=(e,t=!1,i="dismiss")=>{var r,s;clearTimeout(e.__showTimer__),e.__showTimer__=void 0;let n=e.__openState__===!0;av(e,t),In.delete(e),e.__requestedSide__=void 0,n&&(e.__openState__=!1,(s=(r=e.__tooltipBinding__)==null?void 0:r.onOpenChange)==null||s.call(r,!1,i))},Z9=(e,t)=>{let{header:i,body:n,tip:r,position:s}=t,a=Jh(t),l=Qh(t),o=e.__requestedSide__??e.__side__??s,c=e.tooltipElement;c&&(c.innerHTML=t2({header:i,body:n,tip:r}),c.className=pv(e.__side__??o??"cursor",a,l),Yo(e,c,o))};function B9(e,t,i,n,r,s,a){switch(e){case"top":return{top:t.top-(n+r*2),left:t.left+t.width/2-(i/2+r/2)};case"bottom":return{top:t.bottom+r,left:t.left+t.width/2-(i/2+r/2)};case"left":return{top:t.top+t.height/2-n/2,left:t.left-(i+r*2)};case"right":return{top:t.top+t.height/2-n/2,left:t.right+r};default:return{top:a+k6,left:s+k6}}}var k6=14;function A6(e,t,i,n,r){return t>=r&&e>=r&&t+i<=window.innerWidth-r&&e+n<=window.innerHeight-r}var F9={top:["bottom","right","left"],bottom:["top","right","left"],left:["right","top","bottom"],right:["left","top","bottom"],cursor:[]},Yo=(e,t,i)=>{if(!t)return;let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),s=r.width||0,a=r.height||0,l=e.__mouseX__??0,o=e.__mouseY__??0,c=i??"cursor",u=p=>B9(p,n,s,a,4,l,o),d=u(c),h=c;if(s>0&&a>0&&!A6(d.top,d.left,s,a,16))for(let p of F9[c]){let w=u(p);if(A6(w.top,w.left,s,a,16)){d=w,h=p;break}}let{top:f,left:v}=d;if(s>0&&a>0){let p=window.innerWidth-s-16,w=window.innerHeight-a-16;v>p&&(v=p),v<16&&(v=16),f>w&&(f=w),f<16&&(f=16)}if(h!=="cursor"){for(let p of["top","bottom","left","right"])t.classList.remove(`nb-tooltip-${p}`);t.classList.add(`nb-tooltip-${h}`)}if(e.__side__=h,s>0&&a>0&&h!=="cursor"){let p=n.left+n.width/2,w=n.top+n.height/2;if(h==="top"||h==="bottom"){let _=Math.max(8,Math.min(s-8,p-v))/s*100;t.style.setProperty("--nb-tooltip-arrow-offset",`${_}%`)}else{let _=Math.max(8,Math.min(a-8,w-f))/a*100;t.style.setProperty("--nb-tooltip-arrow-offset",`${_}%`)}}t.style.top=`${f}px`,t.style.left=`${v}px`};function z9(e){var i;for(let n of Array.from(In))(i=n.__hideTooltip__)==null||i.call(n,0,e);let t=new Set;for(let n of Array.from(In))for(let r of n.__chips__??[])t.add(r);document.querySelectorAll("span.nb-tooltip").forEach(n=>{t.has(n)||n.remove()})}function U9(){var e;for(let t of Array.from(In))(e=t.__hideTooltip__)==null||e.call(t,0,"program");In.clear();for(let t of Array.from(Rn))e2(t);document.querySelectorAll("span.nb-tooltip").forEach(t=>t.remove())}var W9=a1({default:()=>j9});function M6(e,t){let i=t.value;if(i==null||i===""){e.removeAttribute(Yu);return}e.setAttribute(Yu,String(i))}var j9=e=>{e.directive("nb-tour-step",{mounted:M6,updated:M6,unmounted(t){t.removeAttribute(Yu)}})},K9=Object.assign({"./ContextMenu.directive.ts":Xw,"./ToolTip.content.ts":Qw,"./ToolTip.directive.ts":u9,"./TourStep.directive.ts":W9}),q9={install(e){Object.values(K9).forEach(t=>{typeof t.default=="function"&&t.default(e)})}},G9={install(e){let t=Yw();e.provide(Gw,t)}},Y9={install(e,t={}){if(t.components)for(let[i,n]of Object.entries(t.components))e.component(i,n);e.use(q9),e.use(G9)}},mv=new Map;function X9(e){if(typeof e=="object"&&e&&!("render"in e)&&!("setup"in e)&&!("template"in e)){let t=e;if("thin"in t||"light"in t||"regular"in t||"bold"in t||"fill"in t||"duotone"in t)return t}return{regular:e}}function J9(e){for(let[t,i]of Object.entries(e))mv.set(t,X9(i))}function Q9(e,t="regular"){let i=mv.get(e);if(i){if(i[t])return i[t];if(i.regular)return i.regular;for(let n of["bold","fill","duotone","light","thin"])if(i[n])return i[n]}}var eS=e=>Symbol.for(`@nubisco/ui:${e}-catalog`);function tS(e){return globalThis[eS(e)]}var $6=new Map;function iS(e,t,i="regular"){let n=tS(e);if(!n){let o="Icon",c=`${e}s`;throw Error(`[@nubisco/ui] <Nb${o}> was given the runtime-resolved name "${t}", but the ${e} catalogue is not loaded. The name may also have been forwarded from another component's \`${e}\` prop. Three ways out, cheapest first: pass a literal name so the bundler plugin links just that ${e}; register the set the value can actually take with register${o}s() and pay for only those; or, if the value is genuinely open-ended (a picker, a CMS field), import '@nubisco/ui/${c}/all' in the file that needs the whole set.`)}let r=n[t];if(!r)return;let s=`${e}:${t}:${i}`,a=$6.get(s);if(a)return a;let l=u3(async()=>{let o=await r();return o[i]??o.regular??o.default});return $6.set(s,l),l}function nS(e,t="regular"){let i=e;return i&&typeof i=="object"&&("regular"in i||t in i)?i[t]??i.regular??i.default:e}function rS(e){var i;if(!e)return;let t=e;if(typeof t.glyphName=="string")return t.glyphName;if(typeof((i=t.regular)==null?void 0:i.glyphName)=="string")return t.regular.glyphName}var vv=function(e){return e.ExtraExtraSmall="xxs",e.ExtraSmall="xs",e.Small="sm",e.Medium="md",e.Large="lg",e.ExtraLarge="xl",e.ExtraExtraLarge="xxl",e}({}),sS=function(e){return e.Small="sm",e.Medium="md",e.Large="lg",e}({});function L6(e){return e.replace(new RegExp("(?<=[A-Z0-9])([A-Z])(?=[a-z])","g")," $1").replace(/_/g," ").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/\s+/g,"-").toLowerCase()}function l1(e){var i,n;if(e.id)return e.id;let t=L6(((n=(i=Si())==null?void 0:i.type)==null?void 0:n.__name)??"component");return typeof e.name=="string"&&e.name?`${t}-${L6(e.name)}`:`${t}-${Oi()}`}var gv=function(e){return e.Hover="hover",e.Always="always",e}(gv||{}),bv=function(e){return e.Thin="thin",e.Light="light",e.Regular="regular",e.Bold="bold",e.Fill="fill",e.Duotone="duotone",e}(bv||{}),nd=function(e){return e[e.XXL=92]="XXL",e[e.XL=60]="XL",e[e.LG=20]="LG",e[e.MD=16]="MD",e[e.SM=14]="SM",e[e.XS=12]="XS",e[e.XXS=8]="XXS",e}(nd||{}),aS=["title"],Ue=tt(Ne({__name:"Icon",props:{name:{default:void 0},icon:{default:void 0},size:{default:vv.Medium},animation:{default:null},animationMode:{default:gv.Always},color:{default:void 0},weight:{default:bv.Regular},title:{default:void 0},clickable:{type:Boolean,default:!1},hoverable:{type:Boolean,default:!1}},emits:["click"],setup(e,{emit:t}){let i=e,n=t,r=q(()=>i.icon??i.name),s=q(()=>typeof r.value=="string"?r.value:rS(r.value)),a=q(()=>typeof r.value=="string"?void 0:r.value),l=l1({name:s.value}),o=q(()=>{let h=typeof i.size=="number"?i.size:nd[String(i.size).toUpperCase()]||nd.MD;return{id:l,...i.size&&{width:`${h}px`,height:`${h}px`},...i.clickable&&{role:"button"}}}),c=q(()=>{let h=a.value;if(h)return nS(h,i.weight);let f=typeof r.value=="string"?r.value:void 0;return f?Q9(f,i.weight)||iS("icon",f,i.weight):void 0}),u=q(()=>({"nb-icon":!0,...s.value&&{[s.value]:!0},[`nb-icon-${i.size}`]:["xxs","xs","sm","md","lg","xl","xxl"].includes(String(i.size)),[`nb-icon-animation-${i.animationMode}-${i.animation}`]:i.animation,hoverable:i.hoverable||i.animation&&i.animationMode==="hover","box-clickable":i.clickable})),d=q(()=>({...i.color&&{color:i.color},...typeof i.size=="number"&&{maxWidth:`${i.size}px`,maxHeight:`${i.size}px`,height:`${i.size}px`,width:`${i.size}px`},...typeof i.size=="string"&&!["xxs","xs","sm","md","lg","xl","xxl"].includes(i.size)&&{maxWidth:i.size,maxHeight:i.size,height:i.size,width:i.size}}));return(h,f)=>(m(),M("i",Zt({class:u.value,style:d.value},o.value,{title:e.title,onClick:f[0]||(f[0]=v=>e.clickable?n("click",v):void 0)}),[c.value?(m(),he(qo(c.value),{key:0,"aria-hidden":"true"})):V("",!0)],16,aS))}}),[["__scopeId","data-v-034072e6"]]),yv="data-nb-layer",rd=Symbol("nb-layer");function gc(e){if(!Number.isFinite(e))return 0;let t=Math.round(e);return t<0?0:t>3?3:t}function sd(e){return`nb-layer-${e}`}function lS(e){let t=null,i=r=>{let s=/^nb-layer-([0-3])$/.exec(r.trim());if(!s)return;let a=Number(s[1]);(t===null||a>t)&&(t=a)},n=r=>{if(typeof r=="string"){for(let s of r.split(/\s+/))i(s);return}if(Array.isArray(r)){for(let s of r)n(s);return}if(r&&typeof r=="object")for(let[s,a]of Object.entries(r))a&&i(s)};return n(e),t}function oS(e){let t=(e==null?void 0:e.parentElement)??null;for(;t;){if(t.hasAttribute("data-nb-layer-context")){t=t.parentElement;continue}let i=t.getAttribute(yv);if(i!==null){let r=Number(i);if(Number.isFinite(r))return{level:gc(r+1),source:"surface"}}let n=t.classList;if(n){for(let r=3;r>=0;r--)if(n.contains(sd(r)))return{level:r,source:"class"}}t=t.parentElement}return null}function cS(e){if(!e)return null;if(e instanceof Element)return e;let t=e.$el;return t instanceof Element?t:null}function Js(e={}){let t=Si(),i=Mt(rd,null),n=e.el??K(null),r=K(null),s=e.probe??!e.overlay,a=q(()=>{var c;let o=R5(e.level);return o===void 0?lS((c=t==null?void 0:t.attrs)==null?void 0:c.class):gc(o)}),l=q(()=>{let o=a.value;if(o!==null)return o;if(e.overlay)return 3;let c=r.value;return c&&c.source==="class"?c.level:i?i.value:c?c.level:1});return s&&nt(()=>{r.value=oS(cS(n.value)??((t==null?void 0:t.vnode.el)instanceof Element?t.vnode.el:null))}),e.provideContext!==!1&&tn(rd,q(()=>gc(l.value+1))),{level:l,layerClass:q(()=>sd(l.value)),layerProps:q(()=>({class:sd(l.value),[yv]:String(l.value)})),surfaceRef:n}}var uS="(max-width: 671.98px), (pointer: coarse) and (hover: none) and (max-height: 500px)",dS="(max-width: 671.98px) and (pointer: coarse), (pointer: coarse) and (hover: none) and (max-height: 500px)",xs=null;function E6(e,t){let i=window.matchMedia(e);t.value=i.matches;let n=r=>{t.value=r.matches};typeof i.addEventListener=="function"?i.addEventListener("change",n):typeof i.addListener=="function"&&i.addListener(n)}function Xo(){return xs||(xs={phone:K(!1),phoneTouch:K(!1)},typeof window<"u"&&typeof window.matchMedia=="function"&&(E6(uS,xs.phone),E6(dS,xs.phoneTouch))),{phone:Or(xs.phone),phoneTouch:Or(xs.phoneTouch)}}const ua=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},hS=ua("info","0 0 256 256",'<path d="M140,176a4,4,0,0,1-4,4,12,12,0,0,1-12-12V128a4,4,0,0,0-4-4,4,4,0,0,1,0-8,12,12,0,0,1,12,12v40a4,4,0,0,0,4,4A4,4,0,0,1,140,176ZM124,92a8,8,0,1,0-8-8A8,8,0,0,0,124,92Zm104,36A100,100,0,1,1,128,28,100.11,100.11,0,0,1,228,128Zm-8,0a92,92,0,1,0-92,92A92.1,92.1,0,0,0,220,128Z"/>'),fS=ua("info","0 0 256 256",'<path d="M142,176a6,6,0,0,1-6,6,14,14,0,0,1-14-14V128a2,2,0,0,0-2-2,6,6,0,0,1,0-12,14,14,0,0,1,14,14v40a2,2,0,0,0,2,2A6,6,0,0,1,142,176ZM124,94a10,10,0,1,0-10-10A10,10,0,0,0,124,94Zm106,34A102,102,0,1,1,128,26,102.12,102.12,0,0,1,230,128Zm-12,0a90,90,0,1,0-90,90A90.1,90.1,0,0,0,218,128Z"/>'),bc=ua("info","0 0 256 256",'<path d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z"/>'),pS=ua("info","0 0 256 256",'<path d="M108,84a16,16,0,1,1,16,16A16,16,0,0,1,108,84Zm128,44A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128Zm-72,36.68V132a20,20,0,0,0-20-20,12,12,0,0,0-4,23.32V168a20,20,0,0,0,20,20,12,12,0,0,0,4-23.32Z"/>'),_S=ua("info","0 0 256 256",'<path d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm-4,48a12,12,0,1,1-12,12A12,12,0,0,1,124,72Zm12,112a16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40a8,8,0,0,1,0,16Z"/>'),mS=ua("info","0 0 256 256",'<path d="M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z" opacity="0.2"/><path d="M144,176a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176Zm88-48A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128ZM124,96a12,12,0,1,0-12-12A12,12,0,0,0,124,96Z"/>'),vS="info",wv=Object.freeze(Object.defineProperty({__proto__:null,bold:pS,default:bc,duotone:mS,fill:_S,glyphName:vS,light:fS,regular:bc,thin:hS},Symbol.toStringTag,{value:"Module"})),gS=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},x6=gS("caret-down","0 0 256 256",'<path d="M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z"/>');function Sv(){let e=Si();return q(()=>{let t=e==null?void 0:e.appContext.components;return(t==null?void 0:t.RouterLink)??(t==null?void 0:t["router-link"])??null})}var Cv=function(e){return e.Button="button",e.Submit="submit",e.Reset="reset",e}(Cv||{}),bS={key:0,class:"nb-button__decorations"},yS={key:0,class:"nb-button__spinner","aria-hidden":"true"},H6=new Set;function wS(e){if(typeof e=="string")return e;if(e&&(typeof e=="object"||typeof e=="function")){let t=e;if(typeof t.glyphName=="string")return t.glyphName}return""}var Pt=tt(Ne({__name:"Button",props:{variant:{default:void 0},outlined:{type:Boolean,default:!1},size:{default:vv.Medium},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},icon:{default:void 0},type:{default:Cv.Button},href:{default:void 0},target:{default:void 0},rel:{default:void 0},to:{default:void 0}},emits:["click"],setup(e){let t=e,i=Wn(),n=q(()=>!i.default&&!!(t.icon||t.loading)),r=Sv(),s=q(()=>t.to!=null&&!!r.value),a=q(()=>{if(typeof t.to=="string")return t.to;if(t.href)return t.href}),l=q(()=>s.value?r.value:a.value?"a":"button"),o=q(()=>l.value==="a"?{href:a.value,target:t.target,rel:t.rel}:{}),c={xxs:10,xs:12,sm:12,md:14,lg:16,xl:16,xxl:20},u={xxs:12,xs:14,sm:16,md:18,lg:20,xl:20,xxl:26},d=q(()=>(n.value?u:c)[t.size??"md"]??(n.value?18:14)),h=Si();return nt(()=>{typeof process<"u"||n.value&&Gt(()=>{var p;let f=(p=h==null?void 0:h.proxy)==null?void 0:p.$el;if(!f||typeof f.getAttribute!="function"||["aria-label","aria-labelledby","title"].some(w=>(f.getAttribute(w)??"").trim().length>0)||(f.textContent??"").trim().length>0)return;let v=wS(t.icon);H6.has(v)||(H6.add(v),console.warn(`[NbButton] An icon-only button${v?` (icon "${v}")`:""} has no accessible name, so a screen reader announces it as "button". Add aria-label, or name it with v-nb-tooltip.`,f))})}),(f,v)=>(m(),he(qo(l.value),Zt({class:["nb-button",e.variant?`nb-button--${e.variant}`:null,`nb-button--${e.size}`,{"nb-button--outlined":e.outlined},{"nb-button--loading":e.loading},{"nb-button--icon-only":n.value}],to:s.value?e.to:void 0},o.value,{disabled:l.value==="button"?e.disabled||e.loading:void 0,"aria-disabled":l.value!=="button"&&(e.disabled||e.loading)?!0:void 0,type:l.value==="button"?e.type:void 0,onClick:v[0]||(v[0]=p=>e.disabled||e.loading?void 0:f.$emit("click",p))}),{default:G(()=>[xe(f.$slots,"default",{},void 0,!0),e.loading||e.icon?(m(),M("div",bS,[e.loading?(m(),M("span",yS)):e.icon?(m(),he(Ue,{key:1,name:e.icon,size:d.value,class:"nb-button__icon"},null,8,["name","size"])):V("",!0)])):V("",!0)]),_:3},16,["class","to","disabled","aria-disabled","type"]))}}),[["__scopeId","data-v-a76fa2e8"]]);const da=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},SS=da("check","0 0 256 256",'<path d="M226.83,74.83l-128,128a4,4,0,0,1-5.66,0l-56-56a4,4,0,0,1,5.66-5.66L96,194.34,221.17,69.17a4,4,0,1,1,5.66,5.66Z"/>'),CS=da("check","0 0 256 256",'<path d="M228.24,76.24l-128,128a6,6,0,0,1-8.48,0l-56-56a6,6,0,0,1,8.48-8.48L96,191.51,219.76,67.76a6,6,0,0,1,8.48,8.48Z"/>'),Ho=da("check","0 0 256 256",'<path d="M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z"/>'),kS=da("check","0 0 256 256",'<path d="M232.49,80.49l-128,128a12,12,0,0,1-17,0l-56-56a12,12,0,1,1,17-17L96,183,215.51,63.51a12,12,0,0,1,17,17Z"/>'),AS=da("check","0 0 256 256",'<path d="M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z"/>'),MS=da("check","0 0 256 256",'<path d="M232,56V200a16,16,0,0,1-16,16H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216A16,16,0,0,1,232,56Z" opacity="0.2"/><path d="M205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z"/>'),$S="check",dr=Object.freeze(Object.defineProperty({__proto__:null,bold:kS,default:Ho,duotone:MS,fill:AS,glyphName:$S,light:CS,regular:Ho,thin:SS},Symbol.toStringTag,{value:"Module"}));var LS=["role","aria-disabled","aria-checked","onKeydown"],ES={key:1,class:"nb-menu-item__check-placeholder"},xS={class:"nb-menu-item__label"},HS={key:3,class:"nb-menu-item__shortcut"},TS=Ne({__name:"MenuItem",props:{icon:{default:void 0},label:{},shortcut:{default:void 0},disabled:{type:Boolean,default:!1},danger:{type:Boolean,default:!1},selectable:{type:Boolean,default:!1},selected:{type:Boolean,default:!1},radioGroup:{default:void 0}},emits:["select","highlight"],setup(e,{expose:t,emit:i}){let n=e,r=i,s=K(null),a=Mt("nb-menu",null),l=q(()=>n.radioGroup?"menuitemradio":n.selectable?"menuitemcheckbox":"menuitem"),o=q(()=>["nb-menu-item",{"nb-menu-item--disabled":n.disabled,"nb-menu-item--danger":n.danger,"nb-menu-item--selected":n.selected}]);function c(){n.disabled||(r("select"),a==null||a.close())}return nt(()=>{s.value&&a&&a.registerItem(s.value)}),ri(()=>{s.value&&a&&a.unregisterItem(s.value)}),t({el:s}),(u,d)=>(m(),M("li",{ref_key:"itemRef",ref:s,class:Le(o.value),role:l.value,"aria-disabled":e.disabled||void 0,"aria-checked":e.selectable||e.radioGroup?e.selected:void 0,tabindex:-1,onClick:c,onKeydown:[xi(qe(c,["prevent"]),["enter"]),xi(qe(c,["prevent"]),["space"])],onMouseenter:d[0]||(d[0]=h=>u.$emit("highlight"))},[e.selectable&&e.selected?(m(),he(Ue,{key:0,name:de(Ho),size:16,class:"nb-menu-item__check"},null,8,["name"])):e.selectable?(m(),M("span",ES)):V("",!0),e.icon?(m(),he(Ue,{key:2,name:e.icon,size:16,class:"nb-menu-item__icon"},null,8,["name"])):V("",!0),b("span",xS,Z(e.label),1),e.shortcut?(m(),M("kbd",HS,Z(e.shortcut),1)):V("",!0),xe(u.$slots,"trailing")],42,LS))}});function n2(e){return e.some(t=>t.type===ti?!1:t.type===Br?typeof t.children=="string"&&t.children.trim().length>0:t.type===Ce?Array.isArray(t.children)?n2(t.children):!1:!0)}function kv(e,t){var n;let i=(n=e[t])==null?void 0:n.call(e);return i?n2(i):!1}const ha=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},NS=ha("copy","0 0 256 256",'<path d="M216,36H88a4,4,0,0,0-4,4V84H40a4,4,0,0,0-4,4V216a4,4,0,0,0,4,4H168a4,4,0,0,0,4-4V172h44a4,4,0,0,0,4-4V40A4,4,0,0,0,216,36ZM164,212H44V92H164Zm48-48H172V88a4,4,0,0,0-4-4H92V44H212Z"/>'),PS=ha("copy","0 0 256 256",'<path d="M216,34H88a6,6,0,0,0-6,6V82H40a6,6,0,0,0-6,6V216a6,6,0,0,0,6,6H168a6,6,0,0,0,6-6V174h42a6,6,0,0,0,6-6V40A6,6,0,0,0,216,34ZM162,210H46V94H162Zm48-48H174V88a6,6,0,0,0-6-6H94V46H210Z"/>'),T6=ha("copy","0 0 256 256",'<path d="M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32ZM160,208H48V96H160Zm48-48H176V88a8,8,0,0,0-8-8H96V48H208Z"/>'),OS=ha("copy","0 0 256 256",'<path d="M216,28H88A12,12,0,0,0,76,40V76H40A12,12,0,0,0,28,88V216a12,12,0,0,0,12,12H168a12,12,0,0,0,12-12V180h36a12,12,0,0,0,12-12V40A12,12,0,0,0,216,28ZM156,204H52V100H156Zm48-48H180V88a12,12,0,0,0-12-12H100V52H204Z"/>'),IS=ha("copy","0 0 256 256",'<path d="M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32Zm-8,128H176V88a8,8,0,0,0-8-8H96V48H208Z"/>'),RS=ha("copy","0 0 256 256",'<path d="M216,40V168H168V88H88V40Z" opacity="0.2"/><path d="M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32ZM160,208H48V96H160Zm48-48H176V88a8,8,0,0,0-8-8H96V48H208Z"/>'),VS="copy",DS=Object.freeze(Object.defineProperty({__proto__:null,bold:OS,default:T6,duotone:RS,fill:IS,glyphName:VS,light:PS,regular:T6,thin:NS},Symbol.toStringTag,{value:"Module"}));var ZS={class:"nb-copy-button"},BS={class:"nb-copy-button__status",role:"status"},FS=Ne({__name:"CopyButton",props:{text:{},label:{default:"Copy"},copiedLabel:{default:"Copied"},size:{default:"xs"},duration:{default:1500}},emits:["copied","error"],setup(e,{emit:t}){let i=e,n=t,r=K(!1),s;async function a(o){var d,h;if((d=navigator.clipboard)!=null&&d.writeText)try{await navigator.clipboard.writeText(o);return}catch{}let c=document.createElement("textarea");c.value=o,c.setAttribute("readonly",""),c.style.position="fixed",c.style.opacity="0",document.body.appendChild(c),c.select();let u=((h=document.execCommand)==null?void 0:h.call(document,"copy"))??!1;if(c.remove(),!u)throw Error("The browser did not allow copying.")}async function l(){try{await a(i.text)}catch(o){n("error",o);return}r.value=!0,n("copied",i.text),clearTimeout(s),s=setTimeout(()=>r.value=!1,i.duration)}return ri(()=>clearTimeout(s)),(o,c)=>{let u=Nh("nb-tooltip");return m(),M("span",ZS,[sn(j(Pt,{"aria-label":r.value?e.copiedLabel:e.label,class:Le(["nb-copy-button__button",{"nb-copy-button__button--copied":r.value}]),variant:"ghost",size:e.size,icon:r.value?dr:DS,onClick:qe(l,["stop","prevent"]),onPointerdown:c[0]||(c[0]=qe(()=>{},["stop"])),onMousedown:c[1]||(c[1]=qe(()=>{},["stop"])),onDblclick:c[2]||(c[2]=qe(()=>{},["stop"]))},null,8,["aria-label","class","size","icon"]),[[u,{body:r.value?e.copiedLabel:e.label,aria:"none"}]]),b("span",BS,Z(r.value?e.copiedLabel:""),1)])}}});const fa=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},zS=fa("arrow-up","0 0 256 256",'<path d="M202.83,114.83a4,4,0,0,1-5.66,0L132,49.66V216a4,4,0,0,1-8,0V49.66L58.83,114.83a4,4,0,0,1-5.66-5.66l72-72a4,4,0,0,1,5.66,0l72,72A4,4,0,0,1,202.83,114.83Z"/>'),US=fa("arrow-up","0 0 256 256",'<path d="M204.24,116.24a6,6,0,0,1-8.48,0L134,54.49V216a6,6,0,0,1-12,0V54.49L60.24,116.24a6,6,0,0,1-8.48-8.48l72-72a6,6,0,0,1,8.48,0l72,72A6,6,0,0,1,204.24,116.24Z"/>'),N6=fa("arrow-up","0 0 256 256",'<path d="M205.66,117.66a8,8,0,0,1-11.32,0L136,59.31V216a8,8,0,0,1-16,0V59.31L61.66,117.66a8,8,0,0,1-11.32-11.32l72-72a8,8,0,0,1,11.32,0l72,72A8,8,0,0,1,205.66,117.66Z"/>'),WS=fa("arrow-up","0 0 256 256",'<path d="M208.49,120.49a12,12,0,0,1-17,0L140,69V216a12,12,0,0,1-24,0V69L64.49,120.49a12,12,0,0,1-17-17l72-72a12,12,0,0,1,17,0l72,72A12,12,0,0,1,208.49,120.49Z"/>'),jS=fa("arrow-up","0 0 256 256",'<path d="M207.39,115.06A8,8,0,0,1,200,120H136v96a8,8,0,0,1-16,0V120H56a8,8,0,0,1-5.66-13.66l72-72a8,8,0,0,1,11.32,0l72,72A8,8,0,0,1,207.39,115.06Z"/>'),KS=fa("arrow-up","0 0 256 256",'<path d="M200,112H56l72-72Z" opacity="0.2"/><path d="M205.66,106.34l-72-72a8,8,0,0,0-11.32,0l-72,72A8,8,0,0,0,56,120h64v96a8,8,0,0,0,16,0V120h64a8,8,0,0,0,5.66-13.66ZM75.31,104,128,51.31,180.69,104Z"/>'),qS="arrow-up",GS=Object.freeze(Object.defineProperty({__proto__:null,bold:WS,default:N6,duotone:KS,fill:jS,glyphName:qS,light:US,regular:N6,thin:zS},Symbol.toStringTag,{value:"Module"}));var yi=Ne({__name:"Grid",props:{id:{type:String,default:null},is:{type:String,default:"div"},dir:{type:[String,Object,Function],default:"row",validator:e=>typeof e=="function"?!0:typeof e=="string"?["row","col","row-reverse","col-reverse"].includes(e):Object.values(e).every(t=>["row","col","row-reverse","col-reverse"].includes(t))},align:{type:[String,Object,Function],default:null,validator:e=>e==null||typeof e=="function"?!0:typeof e=="string"?["start","end","center","baseline","stretch"].includes(e):Object.values(e).every(t=>["start","end","center","baseline","stretch"].includes(t))},justify:{type:[String,Object,Function],default:null,validator:e=>e==null||typeof e=="function"?!0:typeof e=="string"?["around","between","center","end","evenly","start"].includes(e):Object.values(e).every(t=>["around","between","center","end","evenly","start"].includes(t))},gap:{type:[String,Object,Function],default:null,validator:e=>{if(e==null||typeof e=="function")return!0;let t=["xxs","xs","sm","md","lg","xl","xxl"];return typeof e=="string"?t.includes(e):Object.values(e).every(i=>t.includes(i))}},grid:{type:[Number,String,Object,Function],default:null,validator:e=>{if(e==null||typeof e=="function")return!0;let t=i=>{let n=typeof i=="string"?parseInt(i,10):i;return n>=1&&n<=16&&!isNaN(n)};return typeof e=="number"||typeof e=="string"?t(e):Object.values(e).every(t)}},shift:{type:[Number,String,Object,Function],default:null,validator:e=>{if(e==null||typeof e=="function")return!0;let t=i=>{let n=typeof i=="string"?parseInt(i,10):i;return n>=0&&n<=15&&!isNaN(n)};return typeof e=="number"||typeof e=="string"?t(e):Object.values(e).every(t)}},wrap:{type:[String,Object,Function],default:null,validator:e=>e==null||typeof e=="function"?!0:typeof e=="string"?["nowrap","wrap","reverse"].includes(e):Object.values(e).every(t=>["nowrap","wrap","reverse"].includes(t))},first:{type:[Boolean,Array],default:null,validator:e=>{if(e==null||typeof e=="boolean")return!0;let t=["sm","md","lg","xl","xxl"];return e.every(i=>t.includes(i))}},last:{type:[Boolean,Array],default:null,validator:e=>{if(e==null||typeof e=="boolean")return!0;let t=["sm","md","lg","xl","xxl"];return e.every(i=>t.includes(i))}},visible:{type:[Boolean,Object,Function],default:null},reverse:{type:[Boolean,Array],default:!1,validator:e=>{if(e==null||typeof e=="boolean")return!0;let t=["sm","md","lg","xl","xxl"];return e.every(i=>t.includes(i))}},grow:{type:Boolean,default:null},flex:{type:Boolean,default:null},shrink:{type:Boolean,default:null},distributed:{type:Boolean,default:!1},mode:{type:String,default:"wide",validator:e=>["wide","narrow","condensed"].includes(e)},tabIndex:{type:String,default:null}},setup(e,{expose:t}){let i=["a","button","input","textarea","select","details","iframe","object","embed","area","audio","video"],n=K();t({getRef:()=>n.value});let r=e,s=C=>C.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function a(C,g){let{collection:$,breakpoint:E}=g,L=E?`${E}-`:"";$[`${L}${C}`]=!0}function l(C,g){let{collection:$,breakpoint:E,classMap:L}=g,B=E?`${E}-`:"",T=(L==null?void 0:L[C])??C;$[`${B}align-${T}`]=!0}function o(C,g){let{collection:$,breakpoint:E,classMap:L}=g,B=E?`${E}-`:"",T=(L==null?void 0:L[C])??C;$[`${B}justify-${T}`]=!0}function c(C,g){let{collection:$,breakpoint:E}=g,L=E?`${E}-`:"";$[`${L}gap-${C}`]=!0}function u(C,g){let{collection:$,breakpoint:E}=g,L=E?`${E}-`:"";$[`${L}grid-${C}`]=!0}function d(C,g){let{collection:$,breakpoint:E}=g,L=E?`${E}-`:"";$[`${L}shift-${C}`]=!0}function h(C,g){let{collection:$,breakpoint:E}=g,L=E?`${E}-`:"";$[`${L}${C}`]=!0}function f(C,g){if(!C)return;let{collection:$,breakpoint:E}=g,L=E?`${E}-`:"";$[`${L}reverse`]=!0}function v(C,g,$){if(!C)return;let{collection:E,breakpoint:L}=g,B=L?`${L}-`:"";E[`${B}${$}`]=!0}function p(C,g){let{collection:$,breakpoint:E}=g,L=E?`${E}-`:"";$[`${L}${C?"visible":"hidden"}`]=!0}function w(C,g,$){let E={};if(C==null)return E;if(typeof C=="function"){let L=C();return L!=null&&g(L,{collection:E,classMap:$}),E}return typeof C=="string"||typeof C=="number"||typeof C=="boolean"?(g(C,{collection:E,classMap:$}),E):Array.isArray(C)?(C.forEach(L=>{g(!0,{collection:E,breakpoint:s(L),classMap:$})}),E):(typeof C=="object"&&Object.entries(C).forEach(([L,B])=>{B!=null&&g(B,{collection:E,breakpoint:s(L),classMap:$})}),E)}let _=C=>{let g={top:"start",bottom:"end",center:"center",stretch:"stretch",baseline:"base"},$={left:"start",right:"end",center:"center",between:"between",around:"around",evenly:"evenly"};return{"nb-grid":!0,...w(C.dir,a),...w(C.align,l,g),...w(C.justify,o,$),...w(C.gap,c),...w(C.grid,u),...w(C.shift,d),...w(C.wrap,h),...w(C.reverse,f),...w(C.first,(E,L)=>v(E,L,"first")),...w(C.last,(E,L)=>v(E,L,"last")),...w(C.visible,p),...C.flex?{flex:!0}:{},...C.distributed?{distributed:!0}:{},...C.mode?{[C.mode]:!0}:{},...C.grow?{grow:!0}:{},...C.shrink!==null&&C.shrink!==void 0?{[`shrink-${C.shrink?"1":"0"}`]:!0}:{}}},y=q(()=>_(r));return(C,g)=>(m(),he(qo(C.is),{id:C.id,ref_key:"root",ref:n,class:Le(y.value),tabindex:C.tabIndex??!i.includes(C.is)?"-1":"0"},{default:G(()=>[xe(C.$slots,"default")]),_:3},8,["id","class","tabindex"]))}}),YS=["for","title"],XS={class:"nb-field__control"},JS={key:2,class:"nb-field__hint"},r2=tt(Ne({__name:"Field",props:{label:{default:void 0},hint:{default:void 0},orientation:{default:"row"},align:{default:"center"},control:{default:"fill"},labelFor:{default:void 0}},setup(e){let t=e,i=Oi(),n=q(()=>t.labelFor??i);return(r,s)=>(m(),M("div",{class:Le(["nb-field",`nb-field--${e.orientation}`,`nb-field--align-${e.align}`,`nb-field--control-${e.control}`])},[r.$slots.label?xe(r.$slots,"label",{key:0},void 0,!0):e.label?(m(),M("label",{key:1,class:"nb-field__label",for:n.value,title:e.label},Z(e.label),9,YS)):V("",!0),b("div",XS,[xe(r.$slots,"default",{id:n.value},void 0,!0)]),e.hint||r.$slots.hint?(m(),M("div",JS,[xe(r.$slots,"hint",{},()=>[le(Z(e.hint),1)],!0)])):V("",!0)],2))}}),[["__scopeId","data-v-155eb839"]]),Ss=tt(Ne({__name:"Panel",props:{layer:{default:void 0}},setup(e){let t=e,{layerProps:i}=Js({level:()=>t.layer});return(n,r)=>(m(),M("div",Zt({class:"nb-panel"},de(i)),[xe(n.$slots,"default",{},void 0,!0)],16))}}),[["__scopeId","data-v-a0d6ea95"]]),Av=function(e){return e.Small="sm",e.Medium="md",e}(Av||{}),QS=["for"],eC={key:0,class:"nb-label__asterisk","aria-hidden":"true"},pa=tt(Ne({__name:"Label",props:{htmlFor:{default:void 0},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},size:{default:Av.Medium}},setup(e){return(t,i)=>(m(),M("label",{for:e.htmlFor,class:Le(["nb-label",`nb-label--${e.size}`,{"nb-label--required":e.required,"nb-label--disabled":e.disabled}])},[xe(t.$slots,"default",{},void 0,!0),e.required?(m(),M("span",eC,"*")):V("",!0),xe(t.$slots,"suffix",{},void 0,!0)],10,QS))}}),[["__scopeId","data-v-836b13c6"]]);const _a=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},tC=_a("warning-circle","0 0 256 256",'<path d="M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220Zm-4-84V80a4,4,0,0,1,8,0v56a4,4,0,0,1-8,0Zm12,36a8,8,0,1,1-8-8A8,8,0,0,1,136,172Z"/>'),iC=_a("warning-circle","0 0 256 256",'<path d="M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm0,192a90,90,0,1,1,90-90A90.1,90.1,0,0,1,128,218Zm-6-82V80a6,6,0,0,1,12,0v56a6,6,0,0,1-12,0Zm16,36a10,10,0,1,1-10-10A10,10,0,0,1,138,172Z"/>'),P6=_a("warning-circle","0 0 256 256",'<path d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm-8-80V80a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,172Z"/>'),nC=_a("warning-circle","0 0 256 256",'<path d="M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,192a84,84,0,1,1,84-84A84.09,84.09,0,0,1,128,212Zm-12-80V80a12,12,0,0,1,24,0v52a12,12,0,0,1-24,0Zm28,40a16,16,0,1,1-16-16A16,16,0,0,1,144,172Z"/>'),rC=_a("warning-circle","0 0 256 256",'<path d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm-8,56a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm8,104a12,12,0,1,1,12-12A12,12,0,0,1,128,184Z"/>'),sC=_a("warning-circle","0 0 256 256",'<path d="M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z" opacity="0.2"/><path d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm-8-80V80a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,172Z"/>'),aC="warning-circle",s2=Object.freeze(Object.defineProperty({__proto__:null,bold:nC,default:P6,duotone:sC,fill:rC,glyphName:aC,light:iC,regular:P6,thin:tC},Symbol.toStringTag,{value:"Module"})),ma=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},lC=ma("warning","0 0 256 256",'<path d="M233.34,190.09,145.88,38.22h0a20.75,20.75,0,0,0-35.76,0L22.66,190.09a19.52,19.52,0,0,0,0,19.71A20.36,20.36,0,0,0,40.54,220H215.46a20.36,20.36,0,0,0,17.86-10.2A19.52,19.52,0,0,0,233.34,190.09ZM226.4,205.8a12.47,12.47,0,0,1-10.94,6.2H40.54a12.47,12.47,0,0,1-10.94-6.2,11.45,11.45,0,0,1,0-11.72L117.05,42.21a12.76,12.76,0,0,1,21.9,0L226.4,194.08A11.45,11.45,0,0,1,226.4,205.8ZM124,144V104a4,4,0,0,1,8,0v40a4,4,0,0,1-8,0Zm12,36a8,8,0,1,1-8-8A8,8,0,0,1,136,180Z"/>'),oC=ma("warning","0 0 256 256",'<path d="M235.07,189.09,147.61,37.22h0a22.75,22.75,0,0,0-39.22,0L20.93,189.09a21.53,21.53,0,0,0,0,21.72A22.35,22.35,0,0,0,40.55,222h174.9a22.35,22.35,0,0,0,19.6-11.19A21.53,21.53,0,0,0,235.07,189.09ZM224.66,204.8a10.46,10.46,0,0,1-9.21,5.2H40.55a10.46,10.46,0,0,1-9.21-5.2,9.51,9.51,0,0,1,0-9.72L118.79,43.21a10.75,10.75,0,0,1,18.42,0l87.46,151.87A9.51,9.51,0,0,1,224.66,204.8ZM122,144V104a6,6,0,0,1,12,0v40a6,6,0,0,1-12,0Zm16,36a10,10,0,1,1-10-10A10,10,0,0,1,138,180Z"/>'),xn=ma("warning","0 0 256 256",'<path d="M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM222.93,203.8a8.5,8.5,0,0,1-7.48,4.2H40.55a8.5,8.5,0,0,1-7.48-4.2,7.59,7.59,0,0,1,0-7.72L120.52,44.21a8.75,8.75,0,0,1,15,0l87.45,151.87A7.59,7.59,0,0,1,222.93,203.8ZM120,144V104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,180Z"/>'),cC=ma("warning","0 0 256 256",'<path d="M240.26,186.1,152.81,34.23h0a28.74,28.74,0,0,0-49.62,0L15.74,186.1a27.45,27.45,0,0,0,0,27.71A28.31,28.31,0,0,0,40.55,228h174.9a28.31,28.31,0,0,0,24.79-14.19A27.45,27.45,0,0,0,240.26,186.1Zm-20.8,15.7a4.46,4.46,0,0,1-4,2.2H40.55a4.46,4.46,0,0,1-4-2.2,3.56,3.56,0,0,1,0-3.73L124,46.2a4.77,4.77,0,0,1,8,0l87.44,151.87A3.56,3.56,0,0,1,219.46,201.8ZM116,136V104a12,12,0,0,1,24,0v32a12,12,0,0,1-24,0Zm28,40a16,16,0,1,1-16-16A16,16,0,0,1,144,176Z"/>'),uC=ma("warning","0 0 256 256",'<path d="M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM120,104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm8,88a12,12,0,1,1,12-12A12,12,0,0,1,128,192Z"/>'),dC=ma("warning","0 0 256 256",'<path d="M215.46,216H40.54C27.92,216,20,202.79,26.13,192.09L113.59,40.22c6.3-11,22.52-11,28.82,0l87.46,151.87C236,202.79,228.08,216,215.46,216Z" opacity="0.2"/><path d="M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM222.93,203.8a8.5,8.5,0,0,1-7.48,4.2H40.55a8.5,8.5,0,0,1-7.48-4.2,7.59,7.59,0,0,1,0-7.72L120.52,44.21a8.75,8.75,0,0,1,15,0l87.45,151.87A7.59,7.59,0,0,1,222.93,203.8ZM120,144V104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,180Z"/>'),hC="warning",Mv=Object.freeze(Object.defineProperty({__proto__:null,bold:cC,default:xn,duotone:dC,fill:uC,glyphName:hC,light:oC,regular:xn,thin:lC},Symbol.toStringTag,{value:"Module"})),va=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},fC=va("check-circle","0 0 256 256",'<path d="M170.83,101.17a4,4,0,0,1,0,5.66l-56,56a4,4,0,0,1-5.66,0l-24-24a4,4,0,0,1,5.66-5.66L112,154.34l53.17-53.17A4,4,0,0,1,170.83,101.17ZM228,128A100,100,0,1,1,128,28,100.11,100.11,0,0,1,228,128Zm-8,0a92,92,0,1,0-92,92A92.1,92.1,0,0,0,220,128Z"/>'),pC=va("check-circle","0 0 256 256",'<path d="M172.24,99.76a6,6,0,0,1,0,8.48l-56,56a6,6,0,0,1-8.48,0l-24-24a6,6,0,0,1,8.48-8.48L112,151.51l51.76-51.75A6,6,0,0,1,172.24,99.76ZM230,128A102,102,0,1,1,128,26,102.12,102.12,0,0,1,230,128Zm-12,0a90,90,0,1,0-90,90A90.1,90.1,0,0,0,218,128Z"/>'),O6=va("check-circle","0 0 256 256",'<path d="M173.66,98.34a8,8,0,0,1,0,11.32l-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35A8,8,0,0,1,173.66,98.34ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z"/>'),_C=va("check-circle","0 0 256 256",'<path d="M176.49,95.51a12,12,0,0,1,0,17l-56,56a12,12,0,0,1-17,0l-24-24a12,12,0,1,1,17-17L112,143l47.51-47.52A12,12,0,0,1,176.49,95.51ZM236,128A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128Z"/>'),mC=va("check-circle","0 0 256 256",'<path d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm45.66,85.66-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35a8,8,0,0,1,11.32,11.32Z"/>'),vC=va("check-circle","0 0 256 256",'<path d="M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z" opacity="0.2"/><path d="M173.66,98.34a8,8,0,0,1,0,11.32l-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35A8,8,0,0,1,173.66,98.34ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z"/>'),gC="check-circle",a2=Object.freeze(Object.defineProperty({__proto__:null,bold:_C,default:O6,duotone:vC,fill:mC,glyphName:gC,light:pC,regular:O6,thin:fC},Symbol.toStringTag,{value:"Module"}));var yc=function(e){return e.Error="error",e.Warning="warning",e.Success="success",e.Helper="helper",e}(yc||{}),bC=["aria-live"],yC={key:0,class:"nb-message__text"},wC={key:1,class:"nb-message__tooltip","aria-hidden":"true"},at=tt(Ne({__name:"Message",props:{variant:{default:yc.Helper},iconOnly:{type:Boolean,default:!1}},setup(e){let t=e,i={error:s2,warning:Mv,success:a2,helper:wv};return(n,r)=>(m(),M("div",{class:Le(["nb-message",`nb-message--${t.variant}`,{"nb-message--icon-only":t.iconOnly}]),role:"status","aria-live":t.variant==="error"?"assertive":"polite"},[j(Ue,{name:i[t.variant],size:14,class:"nb-message__icon"},null,8,["name"]),t.iconOnly?V("",!0):(m(),M("span",yC,[xe(n.$slots,"default",{},void 0,!0)])),t.iconOnly?(m(),M("span",wC,[xe(n.$slots,"default",{},void 0,!0)])):V("",!0)],10,bC))}}),[["__scopeId","data-v-3b1f8105"]]);function SC(e){let t=Mt("nb-menu",null);t&&(Ve(e,(i,n)=>{n&&t.unregisterSurface(n),i&&t.registerSurface(i)}),ri(()=>{e.value&&t.unregisterSurface(e.value)}))}const CC=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},I6=CC("caret-up","0 0 256 256",'<path d="M213.66,165.66a8,8,0,0,1-11.32,0L128,91.31,53.66,165.66a8,8,0,0,1-11.32-11.32l80-80a8,8,0,0,1,11.32,0l80,80A8,8,0,0,1,213.66,165.66Z"/>'),ga=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},kC=ga("x","0 0 256 256",'<path d="M202.83,197.17a4,4,0,0,1-5.66,5.66L128,133.66,58.83,202.83a4,4,0,0,1-5.66-5.66L122.34,128,53.17,58.83a4,4,0,0,1,5.66-5.66L128,122.34l69.17-69.17a4,4,0,1,1,5.66,5.66L133.66,128Z"/>'),AC=ga("x","0 0 256 256",'<path d="M204.24,195.76a6,6,0,1,1-8.48,8.48L128,136.49,60.24,204.24a6,6,0,0,1-8.48-8.48L119.51,128,51.76,60.24a6,6,0,0,1,8.48-8.48L128,119.51l67.76-67.75a6,6,0,0,1,8.48,8.48L136.49,128Z"/>'),gs=ga("x","0 0 256 256",'<path d="M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"/>'),MC=ga("x","0 0 256 256",'<path d="M208.49,191.51a12,12,0,0,1-17,17L128,145,64.49,208.49a12,12,0,0,1-17-17L111,128,47.51,64.49a12,12,0,0,1,17-17L128,111l63.51-63.52a12,12,0,0,1,17,17L145,128Z"/>'),$C=ga("x","0 0 256 256",'<path d="M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM181.66,170.34a8,8,0,0,1-11.32,11.32L128,139.31,85.66,181.66a8,8,0,0,1-11.32-11.32L116.69,128,74.34,85.66A8,8,0,0,1,85.66,74.34L128,116.69l42.34-42.35a8,8,0,0,1,11.32,11.32L139.31,128Z"/>'),LC=ga("x","0 0 256 256",'<path d="M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z" opacity="0.2"/><path d="M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"/>'),EC="x",wc=Object.freeze(Object.defineProperty({__proto__:null,bold:MC,default:gs,duotone:LC,fill:$C,glyphName:EC,light:AC,regular:gs,thin:kC},Symbol.toStringTag,{value:"Module"}));var xC=["id","aria-expanded","aria-disabled","aria-required","disabled"],HC={key:2,class:"nb-select__clear-space","aria-hidden":"true"},TC=["aria-label"],NC=["id","aria-expanded","aria-disabled","aria-required","disabled"],PC={key:1,class:"nb-select__inner-label"},OC={key:0,class:"nb-select__asterisk","aria-hidden":"true"},IC={key:0,class:"nb-select__clear-space","aria-hidden":"true"},RC=["aria-label"],VC=["id","aria-multiselectable"],DC={key:0,class:"nb-select__search"},ZC=["placeholder","aria-label","aria-controls","aria-activedescendant"],BC=["aria-labelledby"],FC=["id"],zC=["id","data-index","aria-selected","aria-disabled","onMouseenter","onClick"],UC={key:0,class:"nb-select__option-check","aria-hidden":"true"},WC={key:0,viewBox:"0 0 10 8",fill:"none",width:"10",height:"8"},jC={class:"nb-select__option-label"},KC={key:1,class:"nb-select__empty"},qC={key:2,class:"nb-select__empty"},GC=["placeholder","onKeydown"],ba=Ne({__name:"Select",props:{modelValue:{default:null},options:{default:()=>[]},multiple:{type:Boolean,default:!1},creatable:{type:Boolean,default:!1},createPlaceholder:{default:""},clearable:{type:Boolean,default:!1},clearLabel:{default:"Clear selection"},searchable:{type:Boolean,default:!1},searchPlaceholder:{default:"Search…"},noResultsLabel:{default:"No results"},anchor:{type:[Function,null],default:null},selectedMark:{default:"fill"},placeholder:{default:"Select…"},name:{default:""},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1},id:{default:void 0},label:{default:""},error:{default:""},warning:{default:""},helper:{default:""},variant:{default:"default"},size:{default:"md"}},emits:["update:modelValue","change","create"],setup(e,{expose:t,emit:i}){let n=e,r=i,s=(se,{slots:H})=>{var N,O;return se.wrap?Ee("div",{class:"nb-select__control"},(N=H.default)==null?void 0:N.call(H)):(O=H.default)==null?void 0:O.call(H)};s.props=["wrap"];let a=K(""),l=K(""),o=K(null);function c(){let se=a.value.trim();se&&(r("create",se),a.value="")}let u=K(!1),d=K(!1),h=K(-1),f=K(null),v=K(null),p=Wn(),w=()=>(typeof n.anchor=="function"?n.anchor():n.anchor)??v.value??f.value;function _(){var se,H;(H=v.value??((se=f.value)==null?void 0:se.querySelector("button, [tabindex]")))==null||H.focus()}let y=K(null);SC(y);let C=K({position:"fixed",top:"0px",left:"0px",width:"0px",zIndex:"9999"}),g=`nb-select-${Oi()}`,$=q(()=>n.id??g),E=q(()=>`${$.value}-listbox`),L=se=>`${$.value}-option-${se}`,B=q(()=>n.modelValue==null?[]:Array.isArray(n.modelValue)?n.modelValue:[n.modelValue]),T=q(()=>{var se;if(!(n.multiple||B.value.length!==1))return(se=(n.options??[]).find(H=>H.value===B.value[0]))==null?void 0:se.icon}),X=q(()=>{var H,N;if(B.value.length===0)return"";let se=n.options??[];return n.multiple?B.value.length===1?((H=se.find(O=>O.value===B.value[0]))==null?void 0:H.label)??String(B.value[0]):B.value.length===2?B.value.map(O=>{var te;return((te=se.find(ee=>ee.value===O))==null?void 0:te.label)??String(O)}).join(", "):`${B.value.length} selected`:((N=se.find(O=>O.value===B.value[0]))==null?void 0:N.label)??String(B.value[0])});function W(se){return B.value.includes(se)}let A=se=>se.normalize("NFD").replace(new RegExp("\\p{M}","gu"),"").toLowerCase(),x=q(()=>{let se=n.options??[],H=n.searchable?A(l.value.trim()):"",N=new Set;return se.forEach((O,te)=>{(!H||A(O.label).includes(H))&&N.add(te)}),N}),F=q(()=>{let se=[];return(n.options??[]).forEach((H,N)=>{if(!x.value.has(N))return;let O=se[se.length-1];(!O||O.name!==H.group)&&se.push({key:`${se.length}:${H.group??""}`,name:H.group,labelId:`${$.value}-group-${se.length}`,entries:[]}),se[se.length-1].entries.push({option:H,index:N})}),se});function ie(se,H){let N=n.options??[];for(let O=se+H;O>=0&&O<N.length;O+=H)if(!N[O].disabled&&x.value.has(O))return O;return se}function re(se){if(se.disabled)return;let H;if(n.multiple){let N=[...B.value],O=N.indexOf(se.value);O>=0?N.splice(O,1):N.push(se.value),H=N}else H=se.value,ae();r("update:modelValue",H),r("change",H)}function ue(){var S;let se=w();if(!se)return;let H=se.getBoundingClientRect(),N=((S=y.value)==null?void 0:S.offsetHeight)??0,O=window.innerHeight-H.bottom,te=H.top,ee=N>0&&O<N&&te>O,me=p.trigger?Math.max(H.width,240):H.width,we=p.trigger?Math.max(8,Math.min(H.left,window.innerWidth-me-8)):H.left;C.value={position:"fixed",top:ee?`${H.top-N}px`:`${H.bottom}px`,left:`${we}px`,width:`${me}px`,zIndex:"9999"}}function J(){if(n.disabled)return;u.value=!0,ue();let se=n.options??[];h.value=B.value.length>0?Math.max(0,se.findIndex(H=>H.value===B.value[0])):-1,Gt(()=>{var H;ue(),fe(),(H=o.value)==null||H.focus({preventScroll:!0})})}function ae(){var H;let se=!!((H=y.value)!=null&&H.contains(document.activeElement));u.value=!1,h.value=-1,l.value="",se&&_()}function ne(){u.value?ae():J()}function Q(se){var te,ee;let H=se.target,N=((te=f.value)==null?void 0:te.contains(H))??!1,O=((ee=y.value)==null?void 0:ee.contains(H))??!1;!N&&!O&&ae()}function oe(){u.value&&ue()}Ve(u,se=>{se?(document.addEventListener("mousedown",Q),window.addEventListener("scroll",oe,!0),window.addEventListener("resize",oe)):(document.removeEventListener("mousedown",Q),window.removeEventListener("scroll",oe,!0),window.removeEventListener("resize",oe))}),ri(()=>{document.removeEventListener("mousedown",Q),window.removeEventListener("scroll",oe,!0),window.removeEventListener("resize",oe)});function ve(se){let H=n.options??[];if(!u.value){(se.key==="Enter"||se.key===" "||se.key==="ArrowDown")&&(se.preventDefault(),J());return}se.key==="Escape"?(ae(),se.preventDefault()):se.key==="Tab"?ae():se.key==="ArrowDown"?(se.preventDefault(),h.value=ie(h.value,1),fe()):se.key==="ArrowUp"?(se.preventDefault(),h.value>0&&(h.value=ie(h.value,-1)),fe()):(se.key==="Enter"||se.key===" ")&&h.value>=0&&(se.preventDefault(),re(H[h.value]))}function fe(){Gt(()=>{var se;!y.value||h.value<0||((se=y.value.querySelector(`[data-index="${h.value}"]`))==null||se.scrollIntoView({block:"nearest"}))})}Ve(l,()=>{if(!u.value)return;let se=ie(-1,1);h.value=se===-1?-1:se,fe()});function pe(se){if(se.key===" "){se.stopPropagation();return}if(se.key==="Home"||se.key==="End"){se.stopPropagation();return}ve(se)}let ye=q(()=>({isOpen:u.value,toggle:ne,open:J,close:ae,attrs:{"aria-expanded":u.value,"aria-haspopup":"listbox","aria-controls":u.value?E.value:void 0,onClick:ne}})),U=q(()=>n.clearable&&!n.disabled&&B.value.length>0);function _e(){let se=n.multiple?[]:null;ae(),r("update:modelValue",se),r("change",se),_()}let ge=q(()=>["nb-select",`nb-select--${n.variant}`,`nb-select--${n.size}`,{"nb-select--open":u.value,"nb-select--focused":d.value&&!u.value,"nb-select--error":!!n.error,"nb-select--warning":!n.error&&!!n.warning,"nb-select--multiple":n.multiple,"nb-select--bare":!!p.trigger}]);return t({open:J,close:ae}),(se,H)=>(m(),M(Ce,null,[b("div",{ref_key:"rootRef",ref:f,class:Le(ge.value),onKeydown:ve},[se.$slots.trigger?xe(se.$slots,"trigger",p5(Zt({key:0},ye.value))):e.variant==="default"?(m(),M(Ce,{key:1},[se.$slots.label?xe(se.$slots,"label",{key:0}):e.label?(m(),he(pa,{key:1,for:$.value,required:e.required,disabled:e.disabled},{default:G(()=>[le(Z(e.label),1)]),_:1},8,["for","required","disabled"])):V("",!0),j(s,{wrap:e.clearable},{default:G(()=>[b("button",{id:$.value,ref_key:"triggerRef",ref:v,type:"button",class:"nb-select__trigger",role:"combobox","aria-expanded":u.value,"aria-haspopup":"listbox","aria-disabled":e.disabled||void 0,"aria-required":e.required||void 0,disabled:e.disabled||void 0,onClick:ne,onFocus:H[0]||(H[0]=N=>d.value=!0),onBlur:H[1]||(H[1]=N=>d.value=!1)},[b("span",{class:Le(["nb-select__value",{"nb-select__value--placeholder":!X.value,"nb-select__value--with-icon":!!T.value}])},[T.value?(m(),he(Ue,{key:0,class:"nb-select__value-icon",name:T.value,size:16},null,8,["name"])):V("",!0),X.value?xe(se.$slots,"value",{key:1,values:B.value},()=>[le(Z(X.value),1)]):(m(),M(Ce,{key:2},[le(Z(e.placeholder),1)],64))],2),e.error?(m(),he(at,{key:0,variant:"error","icon-only":!0,class:"nb-select__status-icon"},{default:G(()=>[le(Z(e.error),1)]),_:1})):e.warning?(m(),he(at,{key:1,variant:"warning","icon-only":!0,class:"nb-select__status-icon"},{default:G(()=>[le(Z(e.warning),1)]),_:1})):V("",!0),U.value?(m(),M("span",HC)):V("",!0),j(yi,{align:"center",justify:"center",class:"nb-select__caret"},{default:G(()=>[j(Ue,{name:u.value?de(I6):de(x6),size:16},null,8,["name"])]),_:1})],40,xC),U.value?(m(),M("button",{key:0,type:"button",class:"nb-select__clear","aria-label":e.clearLabel,onClick:_e,onKeydown:[H[2]||(H[2]=xi(qe(()=>{},["stop"]),["enter"])),H[3]||(H[3]=xi(qe(()=>{},["stop"]),["space"]))]},[j(Ue,{name:de(gs),size:16},null,8,["name"])],40,TC)):V("",!0)]),_:3},8,["wrap"]),e.error?(m(),he(at,{key:2,variant:"error",class:"nb-select__message"},{default:G(()=>[le(Z(e.error),1)]),_:1})):e.warning?(m(),he(at,{key:3,variant:"warning",class:"nb-select__message"},{default:G(()=>[le(Z(e.warning),1)]),_:1})):e.helper?(m(),he(at,{key:4,variant:"helper",class:"nb-select__message"},{default:G(()=>[le(Z(e.helper),1)]),_:1})):V("",!0)],64)):e.variant==="fluid"?(m(),M(Ce,{key:2},[j(s,{wrap:e.clearable},{default:G(()=>[b("button",{id:$.value,ref_key:"triggerRef",ref:v,type:"button",class:"nb-select__trigger",role:"combobox","aria-expanded":u.value,"aria-haspopup":"listbox","aria-disabled":e.disabled||void 0,"aria-required":e.required||void 0,disabled:e.disabled||void 0,onClick:ne,onFocus:H[4]||(H[4]=N=>d.value=!0),onBlur:H[5]||(H[5]=N=>d.value=!1)},[e.label||se.$slots.label?(m(),he(yi,{key:0,dir:"row",align:"center",gap:"xs",class:"nb-select__inner-header"},{default:G(()=>[se.$slots.label?xe(se.$slots,"label",{key:0}):(m(),M("label",PC,[le(Z(e.label)+" ",1),e.required?(m(),M("span",OC,"*")):V("",!0)])),e.helper&&!e.error&&!e.warning?(m(),he(at,{key:2,variant:"helper","icon-only":!0,class:"nb-select__inner-message"},{default:G(()=>[le(Z(e.helper),1)]),_:1})):V("",!0)]),_:3})):V("",!0),j(yi,{dir:"row",align:"end",flex:"",class:"nb-select__value-row"},{default:G(()=>[b("span",{class:Le(["nb-select__value",{"nb-select__value--placeholder":!X.value,"nb-select__value--with-icon":!!T.value}])},[T.value?(m(),he(Ue,{key:0,class:"nb-select__value-icon",name:T.value,size:16},null,8,["name"])):V("",!0),X.value?xe(se.$slots,"value",{key:1,values:B.value},()=>[le(Z(X.value),1)]):(m(),M(Ce,{key:2},[le(Z(e.placeholder),1)],64))],2),U.value?(m(),M("span",IC)):V("",!0),j(yi,{align:"center",justify:"center",class:"nb-select__caret"},{default:G(()=>[j(Ue,{name:u.value?de(I6):de(x6),size:16},null,8,["name"])]),_:1})]),_:3})],40,NC),U.value?(m(),M("button",{key:0,type:"button",class:"nb-select__clear","aria-label":e.clearLabel,onClick:_e,onKeydown:[H[6]||(H[6]=xi(qe(()=>{},["stop"]),["enter"])),H[7]||(H[7]=xi(qe(()=>{},["stop"]),["space"]))]},[j(Ue,{name:de(gs),size:16},null,8,["name"])],40,RC)):V("",!0)]),_:3},8,["wrap"]),e.error?(m(),he(at,{key:0,variant:"error",class:"nb-select__fluid-message"},{default:G(()=>[le(Z(e.error),1)]),_:1})):e.warning?(m(),he(at,{key:1,variant:"warning",class:"nb-select__fluid-message"},{default:G(()=>[le(Z(e.warning),1)]),_:1})):V("",!0)],64)):V("",!0)],34),(m(),he(an,{to:"body"},[u.value?(m(),M("div",{key:0,id:E.value,ref_key:"dropdownRef",ref:y,class:Le(["nb-select__dropdown",{"nb-select__dropdown--check":e.selectedMark==="check","nb-select__dropdown--anchored":!!se.$slots.trigger}]),style:mi(C.value),role:"listbox","aria-multiselectable":e.multiple||void 0},[e.searchable?(m(),M("div",DC,[sn(b("input",{ref_key:"searchRef",ref:o,"onUpdate:modelValue":H[8]||(H[8]=N=>l.value=N),type:"search",class:"nb-select__search-input",autocomplete:"off",spellcheck:"false",placeholder:e.searchPlaceholder,"aria-label":e.searchPlaceholder,"aria-controls":E.value,"aria-activedescendant":h.value>=0?L(h.value):void 0,onKeydown:pe},null,40,ZC),[[Ao,l.value]])])):V("",!0),(m(!0),M(Ce,null,Fe(F.value,N=>(m(),M("div",{key:N.key,class:"nb-select__group",role:"group","aria-labelledby":N.name?N.labelId:void 0},[N.name?(m(),M("div",{key:0,id:N.labelId,class:"nb-select__group-label"},Z(N.name),9,FC)):V("",!0),(m(!0),M(Ce,null,Fe(N.entries,O=>(m(),M("div",{id:L(O.index),key:O.option.value,"data-index":O.index,class:Le(["nb-select__option",{"nb-select__option--selected":W(O.option.value),"nb-select__option--highlighted":h.value===O.index,"nb-select__option--disabled":O.option.disabled}]),role:"option","aria-selected":W(O.option.value),"aria-disabled":O.option.disabled||void 0,onMouseenter:te=>h.value=O.index,onClick:te=>re(O.option)},[e.multiple||e.selectedMark==="check"?(m(),M("span",UC,[W(O.option.value)?(m(),M("svg",WC,[...H[12]||(H[12]=[b("path",{d:"M1 4l3 3 5-6",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])):V("",!0)])):V("",!0),O.option.icon?(m(),he(Ue,{key:1,class:"nb-select__option-icon",name:O.option.icon,size:16},null,8,["name"])):V("",!0),b("span",jC,[xe(se.$slots,"option",{option:O.option},()=>[le(Z(O.option.label),1)])])],42,zC))),128))],8,BC))),128)),!e.options||e.options.length===0?(m(),M("div",KC," No options ")):e.searchable&&x.value.size===0?(m(),M("div",qC,Z(e.noResultsLabel),1)):V("",!0),e.creatable?(m(),M("div",{key:3,class:"nb-select__create",onMousedown:H[11]||(H[11]=qe(()=>{},["prevent"]))},[sn(b("input",{"onUpdate:modelValue":H[9]||(H[9]=N=>a.value=N),type:"text",class:"nb-select__create-input",placeholder:e.createPlaceholder||"Add new…",onKeydown:[xi(qe(c,["prevent"]),["enter"]),H[10]||(H[10]=qe(()=>{},["stop"]))]},null,40,GC),[[Ao,a.value]])],32)):V("",!0)],14,VC)):V("",!0)]))],64))}}),YC=Symbol("NB_TEXT_INPUT_CONTEXT"),XC={key:0,class:"nb-text-input__overlay-wrap"},JC=["innerHTML"],QC=["id","value","placeholder","disabled","readonly","name","maxlength"],ek=["id","value","placeholder","disabled","readonly","name","maxlength"],tk=["id","placeholder","disabled","readonly","name","maxlength","rows"],ik=["id","type","placeholder","disabled","readonly","required","name","min","max","step","maxlength"],nk={key:2,class:"nb-text-input__actions"},rk={key:0,class:"nb-text-input__inner-header"},sk=["for"],ak={key:0,class:"nb-text-input__asterisk","aria-hidden":"true"},lk=["id","type","placeholder","disabled","readonly","required","name","min","max","step","maxlength"],Wr=tt(Ne({inheritAttrs:!1,__name:"TextInput",props:Um({type:{default:"text"},min:{default:void 0},max:{default:void 0},step:{default:void 0},maxlength:{default:void 0},multiline:{type:Boolean,default:!1},rows:{default:3},highlight:{type:Function,default:void 0},readonly:{type:Boolean,default:!1},placeholder:{default:""},name:{default:""},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1},id:{default:void 0},label:{default:""},error:{default:""},warning:{default:""},helper:{default:""},variant:{default:"default"},size:{default:"md"}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(e,{expose:t}){let i=e,n=qm(e,"modelValue"),r=K(null),s=K(null);t({focus:()=>{var w;return(w=r.value)==null?void 0:w.focus()},blur:()=>{var w;return(w=r.value)==null?void 0:w.blur()},nativeEl:r}),tn(YC,{field:r});let a=K(!1),l=`nb-input-${Oi()}`,o=q(()=>i.id??l),c=q(()=>!!i.highlight),u=q(()=>{if(!i.highlight)return"";let w=String(n.value??"");return i.highlight(w)+`
|
|
41
|
-
`});function d(){s.value&&r.value&&(s.value.scrollTop=r.value.scrollTop)}Ve(u,()=>Gt(d));let h=q(()=>i.error?"error":i.warning?"warning":"helper"),f=q(()=>i.error||i.warning||i.helper||""),v=q(()=>!!f.value),p=q(()=>({"nb-text-input__field-wrapper--focused":a.value,"nb-text-input__field-wrapper--error":!!i.error,"nb-text-input__field-wrapper--warning":!i.error&&!!i.warning,"nb-text-input__field-wrapper--disabled":i.disabled,"nb-text-input__field-wrapper--readonly":i.readonly,"nb-text-input__field-wrapper--overlay":c.value,"nb-text-input__field-wrapper--multiline":i.multiline}));return(w,_)=>(m(),he(yi,{dir:"col",class:Le(["nb-text-input",`nb-text-input--${e.variant}`,`nb-text-input--${e.size}`,{"nb-text-input--multiline":e.multiline}])},{default:G(()=>[e.variant==="default"?(m(),M(Ce,{key:0},[w.$slots.label?xe(w.$slots,"label",{key:0},void 0,!0):e.label?(m(),he(pa,{key:1,for:o.value,required:e.required,disabled:e.disabled},{default:G(()=>[le(Z(e.label),1)]),_:1},8,["for","required","disabled"])):V("",!0),b("div",{class:Le(["nb-text-input__field-wrapper",p.value])},[xe(w.$slots,"leading",{},void 0,!0),c.value?(m(),M("div",XC,[b("div",{ref_key:"mirrorRef",ref:s,class:"nb-text-input__mirror","aria-hidden":"true",innerHTML:u.value},null,8,JC),e.multiline?(m(),M("textarea",Zt({key:0,id:o.value,ref_key:"nativeRef",ref:r},w.$attrs,{class:"nb-text-input__field--transparent",value:n.value,placeholder:e.placeholder,disabled:e.disabled,readonly:e.readonly,name:e.name,maxlength:e.maxlength,spellcheck:"false",autocomplete:"off",autocorrect:"off",onInput:_[0]||(_[0]=y=>n.value=y.target.value),onFocus:_[1]||(_[1]=y=>a.value=!0),onBlur:_[2]||(_[2]=y=>a.value=!1),onScroll:d}),null,16,QC)):(m(),M("input",Zt({key:1,id:o.value,ref_key:"nativeRef",ref:r},w.$attrs,{type:"text",class:"nb-text-input__field--transparent",value:n.value,placeholder:e.placeholder,disabled:e.disabled,readonly:e.readonly,name:e.name,maxlength:e.maxlength,spellcheck:"false",onInput:_[3]||(_[3]=y=>n.value=y.target.value),onFocus:_[4]||(_[4]=y=>a.value=!0),onBlur:_[5]||(_[5]=y=>a.value=!1)}),null,16,ek))])):(m(),M(Ce,{key:1},[e.multiline?sn((m(),M("textarea",Zt({key:0,id:o.value,ref_key:"nativeRef",ref:r},w.$attrs,{"onUpdate:modelValue":_[6]||(_[6]=y=>n.value=y),class:"nb-text-input__field",placeholder:e.placeholder,disabled:e.disabled,readonly:e.readonly,name:e.name,maxlength:e.maxlength,rows:e.rows,onFocus:_[7]||(_[7]=y=>a.value=!0),onBlur:_[8]||(_[8]=y=>a.value=!1)}),null,16,tk)),[[Ao,n.value]]):sn((m(),M("input",Zt({key:1,id:o.value,ref_key:"nativeRef",ref:r},w.$attrs,{"onUpdate:modelValue":_[9]||(_[9]=y=>n.value=y),class:"nb-text-input__field",type:e.type,placeholder:e.placeholder,disabled:e.disabled,readonly:e.readonly,required:e.required,name:e.name,min:e.min,max:e.max,step:e.step,maxlength:e.maxlength,onFocus:_[10]||(_[10]=y=>a.value=!0),onBlur:_[11]||(_[11]=y=>a.value=!1)}),null,16,ik)),[[xf,n.value]])],64)),xe(w.$slots,"trailing",{},void 0,!0),w.$slots.actions?(m(),M("div",nk,[xe(w.$slots,"actions",{},void 0,!0)])):V("",!0)],2),v.value?(m(),he(at,{key:2,variant:h.value,class:"nb-text-input__message"},{default:G(()=>[le(Z(f.value),1)]),_:1},8,["variant"])):V("",!0),xe(w.$slots,"dropdown",{},void 0,!0)],64)):e.variant==="fluid"?(m(),M(Ce,{key:1},[b("div",{class:Le(["nb-text-input__field-wrapper",p.value])},[e.label||w.$slots.label?(m(),M("div",rk,[w.$slots.label?xe(w.$slots,"label",{key:0},void 0,!0):(m(),M("label",{key:1,for:o.value,class:Le(["nb-text-input__inner-label",{"nb-text-input__inner-label--required":e.required}])},[le(Z(e.label)+" ",1),e.required?(m(),M("span",ak,"*")):V("",!0)],10,sk)),v.value?(m(),he(at,{key:2,variant:h.value,"icon-only":"",class:"nb-text-input__inner-message"},{default:G(()=>[le(Z(f.value),1)]),_:1},8,["variant"])):V("",!0)])):V("",!0),sn(b("input",Zt({id:o.value,ref_key:"nativeRef",ref:r},w.$attrs,{"onUpdate:modelValue":_[12]||(_[12]=y=>n.value=y),class:"nb-text-input__field",type:e.type,placeholder:e.placeholder,disabled:e.disabled,readonly:e.readonly,required:e.required,name:e.name,min:e.min,max:e.max,step:e.step,maxlength:e.maxlength,onFocus:_[13]||(_[13]=y=>a.value=!0),onBlur:_[14]||(_[14]=y=>a.value=!1)}),null,16,lk),[[xf,n.value]])],2),xe(w.$slots,"dropdown",{},void 0,!0)],64)):V("",!0)]),_:3},8,["class"]))}}),[["__scopeId","data-v-09e30e0d"]]),ad=function(e){return e.Small="sm",e.Medium="md",e.Large="lg",e}(ad||{}),ld=function(e){return e.Primary="primary",e.Secondary="secondary",e}(ld||{}),ok=["for"],ck=["id","name","disabled"],o1=tt(Ne({__name:"Switch",props:Um({id:{type:String,default:()=>null},label:{type:String,default:""},size:{type:String,default:ad.Medium,validator:e=>Object.values(ad).includes(e)},verbose:Boolean,hideLabel:Boolean,name:{type:String,required:!0},disabled:Boolean,variant:{type:String,default:ld.Primary,validator:e=>Object.values(ld).includes(e)}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(e){let t=qm(e,"modelValue"),i=e,n=l1(i),r=q(()=>({"aria-disabled":i.disabled})),s=q(()=>({"nb-switch":!0,disabled:i.disabled})),a=q(()=>({"nb-switch-wrapper":!0,verbose:i.verbose,[i.size]:!0,[`nb-${i.variant}`]:!0}));return(l,o)=>(m(),he(yi,{id:de(n),class:Le(s.value),align:"center",gap:"sm"},{default:G(()=>[e.label?(m(),he(pa,{key:0,for:`${de(n)}-input`,disabled:e.disabled,class:Le({"nb-switch__label--hidden":e.hideLabel})},{default:G(()=>[le(Z(e.label),1)]),_:1},8,["for","disabled","class"])):V("",!0),b("label",Zt({for:`${de(n)}-input`,class:a.value},r.value,{onClick:o[1]||(o[1]=qe(()=>{},["stop"]))}),[sn(b("input",{id:`${de(n)}-input`,"onUpdate:modelValue":o[0]||(o[0]=c=>t.value=c),name:e.name,type:"checkbox",disabled:e.disabled},null,8,ck),[[g4,t.value]]),o[2]||(o[2]=b("div",{class:"slider round"},null,-1))],16,ok)]),_:1},8,["id","class"]))}}),[["__scopeId","data-v-f6465c1e"]]);const ya=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},uk=ya("tray","0 0 256 256",'<path d="M208,36H48A12,12,0,0,0,36,48V208a12,12,0,0,0,12,12H208a12,12,0,0,0,12-12V48A12,12,0,0,0,208,36ZM48,44H208a4,4,0,0,1,4,4V156H179.31a12,12,0,0,0-8.48,3.51l-19.32,19.32a4,4,0,0,1-2.82,1.17H107.31a4,4,0,0,1-2.82-1.17L85.17,159.51A12,12,0,0,0,76.69,156H44V48A4,4,0,0,1,48,44ZM208,212H48a4,4,0,0,1-4-4V164H76.69a4,4,0,0,1,2.82,1.17l19.32,19.32a12,12,0,0,0,8.48,3.51h41.38a12,12,0,0,0,8.48-3.51l19.32-19.32a4,4,0,0,1,2.82-1.17H212v44A4,4,0,0,1,208,212Z"/>'),dk=ya("tray","0 0 256 256",'<path d="M208,34H48A14,14,0,0,0,34,48V208a14,14,0,0,0,14,14H208a14,14,0,0,0,14-14V48A14,14,0,0,0,208,34ZM48,46H208a2,2,0,0,1,2,2V154H179.31a13.94,13.94,0,0,0-9.9,4.1L150.1,177.41a2,2,0,0,1-1.41.59H107.31a2,2,0,0,1-1.41-.58L86.59,158.1a13.94,13.94,0,0,0-9.9-4.1H46V48A2,2,0,0,1,48,46ZM208,210H48a2,2,0,0,1-2-2V166H76.69a2,2,0,0,1,1.41.58L97.41,185.9a13.94,13.94,0,0,0,9.9,4.1h41.38a13.94,13.94,0,0,0,9.9-4.1l19.31-19.31a2,2,0,0,1,1.41-.59H210v42A2,2,0,0,1,208,210Z"/>'),R6=ya("tray","0 0 256 256",'<path d="M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32Zm0,16V152h-28.7A15.86,15.86,0,0,0,168,156.69L148.69,176H107.31L88,156.69A15.86,15.86,0,0,0,76.69,152H48V48Zm0,160H48V168H76.69L96,187.31A15.86,15.86,0,0,0,107.31,192h41.38A15.86,15.86,0,0,0,160,187.31L179.31,168H208v40Z"/>'),hk=ya("tray","0 0 256 256",'<path d="M208,28H48A20,20,0,0,0,28,48V208a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V48A20,20,0,0,0,208,28Zm-4,24v92H179.31a19.86,19.86,0,0,0-14.14,5.86L147,168H109L90.83,149.86A19.86,19.86,0,0,0,76.69,144H52V52ZM52,204V168H75l18.14,18.14A19.86,19.86,0,0,0,107.31,192h41.38a19.86,19.86,0,0,0,14.14-5.86L181,168h23v36Z"/>'),fk=ya("tray","0 0 256 256",'<path d="M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32Zm0,176H48V168H76.69L96,187.32A15.89,15.89,0,0,0,107.31,192h41.38A15.86,15.86,0,0,0,160,187.31L179.31,168H208v40Z"/>'),pk=ya("tray","0 0 256 256",'<path d="M216,48V160H179.31a8,8,0,0,0-5.66,2.34l-19.31,19.32a8,8,0,0,1-5.66,2.34H107.31a8,8,0,0,1-5.66-2.34L82.34,162.34A8,8,0,0,0,76.68,160H40V48a8,8,0,0,1,8-8H208A8,8,0,0,1,216,48Z" opacity="0.2"/><path d="M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32Zm0,16V152h-28.7A15.86,15.86,0,0,0,168,156.69L148.69,176H107.31L88,156.68A15.89,15.89,0,0,0,76.69,152H48V48Zm0,160H48V168H76.69L96,187.32A15.89,15.89,0,0,0,107.31,192h41.38A15.86,15.86,0,0,0,160,187.31L179.31,168H208v40Z"/>'),_k="tray",mk=Object.freeze(Object.defineProperty({__proto__:null,bold:hk,default:R6,duotone:pk,fill:fk,glyphName:_k,light:dk,regular:R6,thin:uk},Symbol.toStringTag,{value:"Module"})),wa=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},vk=wa("magnifying-glass","0 0 256 256",'<path d="M226.83,221.17l-52.7-52.7a84.1,84.1,0,1,0-5.66,5.66l52.7,52.7a4,4,0,0,0,5.66-5.66ZM36,112a76,76,0,1,1,76,76A76.08,76.08,0,0,1,36,112Z"/>'),gk=wa("magnifying-glass","0 0 256 256",'<path d="M228.24,219.76l-51.38-51.38a86.15,86.15,0,1,0-8.48,8.48l51.38,51.38a6,6,0,0,0,8.48-8.48ZM38,112a74,74,0,1,1,74,74A74.09,74.09,0,0,1,38,112Z"/>'),V6=wa("magnifying-glass","0 0 256 256",'<path d="M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z"/>'),bk=wa("magnifying-glass","0 0 256 256",'<path d="M232.49,215.51,185,168a92.12,92.12,0,1,0-17,17l47.53,47.54a12,12,0,0,0,17-17ZM44,112a68,68,0,1,1,68,68A68.07,68.07,0,0,1,44,112Z"/>'),yk=wa("magnifying-glass","0 0 256 256",'<path d="M168,112a56,56,0,1,1-56-56A56,56,0,0,1,168,112Zm61.66,117.66a8,8,0,0,1-11.32,0l-50.06-50.07a88,88,0,1,1,11.32-11.31l50.06,50.06A8,8,0,0,1,229.66,229.66ZM112,184a72,72,0,1,0-72-72A72.08,72.08,0,0,0,112,184Z"/>'),wk=wa("magnifying-glass","0 0 256 256",'<path d="M192,112a80,80,0,1,1-80-80A80,80,0,0,1,192,112Z" opacity="0.2"/><path d="M229.66,218.34,179.6,168.28a88.21,88.21,0,1,0-11.32,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z"/>'),Sk="magnifying-glass",od=Object.freeze(Object.defineProperty({__proto__:null,bold:bk,default:V6,duotone:wk,fill:yk,glyphName:Sk,light:gk,regular:V6,thin:vk},Symbol.toStringTag,{value:"Module"})),Sa=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},Ck=Sa("lock-simple","0 0 256 256",'<path d="M208,84H172V56a44,44,0,0,0-88,0V84H48A12,12,0,0,0,36,96V208a12,12,0,0,0,12,12H208a12,12,0,0,0,12-12V96A12,12,0,0,0,208,84ZM92,56a36,36,0,0,1,72,0V84H92ZM212,208a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V96a4,4,0,0,1,4-4H208a4,4,0,0,1,4,4Z"/>'),kk=Sa("lock-simple","0 0 256 256",'<path d="M208,82H174V56a46,46,0,0,0-92,0V82H48A14,14,0,0,0,34,96V208a14,14,0,0,0,14,14H208a14,14,0,0,0,14-14V96A14,14,0,0,0,208,82ZM94,56a34,34,0,0,1,68,0V82H94ZM210,208a2,2,0,0,1-2,2H48a2,2,0,0,1-2-2V96a2,2,0,0,1,2-2H208a2,2,0,0,1,2,2Z"/>'),D6=Sa("lock-simple","0 0 256 256",'<path d="M208,80H176V56a48,48,0,0,0-96,0V80H48A16,16,0,0,0,32,96V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V96A16,16,0,0,0,208,80ZM96,56a32,32,0,0,1,64,0V80H96ZM208,208H48V96H208V208Z"/>'),Ak=Sa("lock-simple","0 0 256 256",'<path d="M208,76H180V56A52,52,0,0,0,76,56V76H48A20,20,0,0,0,28,96V208a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V96A20,20,0,0,0,208,76ZM100,56a28,28,0,0,1,56,0V76H100ZM204,204H52V100H204Z"/>'),Mk=Sa("lock-simple","0 0 256 256",'<path d="M208,80H176V56a48,48,0,0,0-96,0V80H48A16,16,0,0,0,32,96V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V96A16,16,0,0,0,208,80ZM96,56a32,32,0,0,1,64,0V80H96Z"/>'),$k=Sa("lock-simple","0 0 256 256",'<path d="M216,96V208a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V96a8,8,0,0,1,8-8H208A8,8,0,0,1,216,96Z" opacity="0.2"/><path d="M208,80H176V56a48,48,0,0,0-96,0V80H48A16,16,0,0,0,32,96V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V96A16,16,0,0,0,208,80ZM96,56a32,32,0,0,1,64,0V80H96ZM208,208H48V96H208V208Z"/>'),Lk="lock-simple",Ek=Object.freeze(Object.defineProperty({__proto__:null,bold:Ak,default:D6,duotone:$k,fill:Mk,glyphName:Lk,light:kk,regular:D6,thin:Ck},Symbol.toStringTag,{value:"Module"}));var xk={key:0,class:"nb-empty-state__icon"},Hk={key:1,class:"nb-empty-state__title"},Tk={key:2,class:"nb-empty-state__description"},Nk={key:3,class:"nb-empty-state__actions"},Pk=tt(Ne({__name:"EmptyState",props:{title:{default:""},description:{default:""},icon:{default:void 0},kind:{default:"empty"},size:{default:"md"},bordered:{type:Boolean,default:!1}},setup(e){let t=e,i={empty:mk,"no-results":od,error:s2,forbidden:Ek},n=q(()=>t.icon===null?null:t.icon??i[t.kind]??i.empty);return(r,s)=>(m(),M("div",{class:Le(["nb-empty-state",[`nb-empty-state--${e.size}`,`nb-empty-state--${e.kind}`,{"nb-empty-state--bordered":e.bordered}]])},[n.value||r.$slots.icon?(m(),M("div",xk,[xe(r.$slots,"icon",{},()=>[j(Ue,{name:n.value,size:e.size==="sm"?24:32},null,8,["name","size"])],!0)])):V("",!0),e.title||r.$slots.title?(m(),M("div",Hk,[xe(r.$slots,"title",{},()=>[le(Z(e.title),1)],!0)])):V("",!0),e.description||r.$slots.default?(m(),M("div",Tk,[xe(r.$slots,"default",{},()=>[le(Z(e.description),1)],!0)])):V("",!0),r.$slots.actions?(m(),M("div",Nk,[xe(r.$slots,"actions",{},void 0,!0)])):V("",!0)],2))}}),[["__scopeId","data-v-0508480f"]]);const Ca=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},Ok=Ca("caret-right","0 0 256 256",'<path d="M178.83,130.83l-80,80a4,4,0,0,1-5.66-5.66L170.34,128,93.17,50.83a4,4,0,0,1,5.66-5.66l80,80A4,4,0,0,1,178.83,130.83Z"/>'),Ik=Ca("caret-right","0 0 256 256",'<path d="M180.24,132.24l-80,80a6,6,0,0,1-8.48-8.48L167.51,128,91.76,52.24a6,6,0,0,1,8.48-8.48l80,80A6,6,0,0,1,180.24,132.24Z"/>'),Sc=Ca("caret-right","0 0 256 256",'<path d="M181.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L164.69,128,90.34,53.66a8,8,0,0,1,11.32-11.32l80,80A8,8,0,0,1,181.66,133.66Z"/>'),Rk=Ca("caret-right","0 0 256 256",'<path d="M184.49,136.49l-80,80a12,12,0,0,1-17-17L159,128,87.51,56.49a12,12,0,1,1,17-17l80,80A12,12,0,0,1,184.49,136.49Z"/>'),Vk=Ca("caret-right","0 0 256 256",'<path d="M181.66,133.66l-80,80A8,8,0,0,1,88,208V48a8,8,0,0,1,13.66-5.66l80,80A8,8,0,0,1,181.66,133.66Z"/>'),Dk=Ca("caret-right","0 0 256 256",'<path d="M176,128,96,208V48Z" opacity="0.2"/><path d="M181.66,122.34l-80-80A8,8,0,0,0,88,48V208a8,8,0,0,0,13.66,5.66l80-80A8,8,0,0,0,181.66,122.34ZM104,188.69V67.31L164.69,128Z"/>'),Zk="caret-right",l2=Object.freeze(Object.defineProperty({__proto__:null,bold:Rk,default:Sc,duotone:Dk,fill:Vk,glyphName:Zk,light:Ik,regular:Sc,thin:Ok},Symbol.toStringTag,{value:"Module"})),ka=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},Bk=ka("caret-up-down","0 0 256 256",'<path d="M178.83,173.17a4,4,0,0,1,0,5.66l-48,48a4,4,0,0,1-5.66,0l-48-48a4,4,0,0,1,5.66-5.66L128,218.34l45.17-45.17A4,4,0,0,1,178.83,173.17Zm-96-90.34L128,37.66l45.17,45.17a4,4,0,1,0,5.66-5.66l-48-48a4,4,0,0,0-5.66,0l-48,48a4,4,0,0,0,5.66,5.66Z"/>'),Fk=ka("caret-up-down","0 0 256 256",'<path d="M180.24,171.76a6,6,0,0,1,0,8.48l-48,48a6,6,0,0,1-8.48,0l-48-48a6,6,0,0,1,8.48-8.48L128,215.51l43.76-43.75A6,6,0,0,1,180.24,171.76Zm-96-87.52L128,40.49l43.76,43.75a6,6,0,0,0,8.48-8.48l-48-48a6,6,0,0,0-8.48,0l-48,48a6,6,0,0,0,8.48,8.48Z"/>'),Z6=ka("caret-up-down","0 0 256 256",'<path d="M181.66,170.34a8,8,0,0,1,0,11.32l-48,48a8,8,0,0,1-11.32,0l-48-48a8,8,0,0,1,11.32-11.32L128,212.69l42.34-42.35A8,8,0,0,1,181.66,170.34Zm-96-84.68L128,43.31l42.34,42.35a8,8,0,0,0,11.32-11.32l-48-48a8,8,0,0,0-11.32,0l-48,48A8,8,0,0,0,85.66,85.66Z"/>'),zk=ka("caret-up-down","0 0 256 256",'<path d="M184.49,167.51a12,12,0,0,1,0,17l-48,48a12,12,0,0,1-17,0l-48-48a12,12,0,0,1,17-17L128,207l39.51-39.52A12,12,0,0,1,184.49,167.51Zm-96-79L128,49l39.51,39.52a12,12,0,0,0,17-17l-48-48a12,12,0,0,0-17,0l-48,48a12,12,0,0,0,17,17Z"/>'),Uk=ka("caret-up-down","0 0 256 256",'<path d="M72.61,83.06a8,8,0,0,1,1.73-8.72l48-48a8,8,0,0,1,11.32,0l48,48A8,8,0,0,1,176,88H80A8,8,0,0,1,72.61,83.06ZM176,168H80a8,8,0,0,0-5.66,13.66l48,48a8,8,0,0,0,11.32,0l48-48A8,8,0,0,0,176,168Z"/>'),Wk=ka("caret-up-down","0 0 256 256",'<path d="M80,176h96l-48,48ZM128,32,80,80h96Z" opacity="0.2"/><path d="M176,168H80a8,8,0,0,0-5.66,13.66l48,48a8,8,0,0,0,11.32,0l48-48A8,8,0,0,0,176,168Zm-48,44.69L99.31,184h57.38ZM80,88h96a8,8,0,0,0,5.66-13.66l-48-48a8,8,0,0,0-11.32,0l-48,48A8,8,0,0,0,80,88Zm48-44.69L156.69,72H99.31Z"/>'),jk="caret-up-down",Kk=Object.freeze(Object.defineProperty({__proto__:null,bold:zk,default:Z6,duotone:Wk,fill:Uk,glyphName:jk,light:Fk,regular:Z6,thin:Bk},Symbol.toStringTag,{value:"Module"}));var qk={key:0,class:"nb-breadcrumbs__brand"},Gk={key:0,class:"nb-breadcrumbs__title"},Yk={key:1,class:"nb-breadcrumbs__subtitle"},Xk={key:2,class:"nb-breadcrumbs__crumbs"},Jk={key:0,class:"nb-breadcrumbs__current","aria-current":"page"},Qk={key:2,class:"nb-breadcrumbs__parent"},eA=["aria-label"],$v=tt(Ne({__name:"Breadcrumbs",props:{title:{default:void 0},subtitle:{default:void 0},collapse:{default:"none"},items:{default:void 0}},emits:["select","switch"],setup(e,{emit:t}){let i=e,n=t,r=Si(),s=q(()=>{var E;return!!((E=r==null?void 0:r.vnode.props)!=null&&E.onSelect)}),a=q(()=>{let E=i.items??[],L=E.findIndex(B=>B.current);return L===-1?E.length-1:L});function l(E){return E===a.value}function o(E){return E.to!=null||!!E.href||!!E.onClick||s.value}function c(E,L,B){var T;(T=E.onClick)==null||T.call(E,B),n("select",E,L,B)}let u=[],d=(E,L)=>E.value??L;function h(E){return(E.options??[]).map((L,B)=>({label:L.label,value:d(L,B),icon:L.icon}))}function f(E){if(E.value!=null)return E.value;let L=E.options??[],B=L.findIndex(T=>T.label===E.label);return B===-1?null:d(L[B],B)}function v(E,L,B){let T=E.options??[],X=T.findIndex((A,x)=>d(A,x)===B);if(X===-1||B===f(E))return;let W=T[X];n("switch",E,W,L),p(W)}function p(E){let L=r==null?void 0:r.appContext.config.globalProperties.$router;E.to==null?E.href&&window.location.assign(E.href):L?L.push(E.to):typeof E.to=="string"&&window.location.assign(E.to)}let w=Wn();function _(E){return E.some(L=>L.type===ti?!1:L.type===Br?String(L.children??"").trim()!=="":L.type===Ce?_(L.children??[]):!0)}let y=q(()=>{var E;return _(((E=w.default)==null?void 0:E.call(w))??[])}),C=q(()=>{var E;return!!((E=i.items)!=null&&E.length)||y.value}),{phone:g}=Xo(),$=q(()=>i.collapse==="phone"&&g.value&&C.value);return(E,L)=>{var B;return m(),M("nav",{class:Le(["nb-breadcrumbs",{"nb-breadcrumbs--collapsed":$.value}]),"aria-label":"breadcrumb"},[e.title||e.subtitle?(m(),M("span",qk,[e.title?(m(),M("span",Gk,Z(e.title),1)):V("",!0),e.subtitle?(m(),M("span",Yk,Z(e.subtitle),1)):V("",!0)])):V("",!0),(e.title||e.subtitle)&&C.value?(m(),he(Ue,{key:1,name:de(Sc),size:"sm",class:"nb-breadcrumbs__sep"},null,8,["name"])):V("",!0),C.value?(m(),M("span",Xk,[(B=e.items)!=null&&B.length?(m(!0),M(Ce,{key:0},Fe(e.items,(T,X)=>{var W;return m(),M("span",{key:X,ref_for:!0,ref:A=>u[X]=A,class:"nb-breadcrumbs__item"},[l(X)?(m(),M("span",Jk,Z(T.label),1)):o(T)?(m(),he(Pt,{key:1,class:"nb-breadcrumbs__link",variant:"link",to:T.to,href:T.href,target:T.target,onClick:A=>c(T,X,A)},{default:G(()=>[le(Z(T.label),1)]),_:2},1032,["to","href","target","onClick"])):(m(),M("span",Qk,Z(T.label),1)),(W=T.options)!=null&&W.length?(m(),he(ba,{key:3,class:"nb-breadcrumbs__switcher",searchable:"","selected-mark":"check",anchor:()=>u[X],"model-value":f(T),options:h(T),"search-placeholder":T.searchPlaceholder??"Find","no-results-label":T.noResultsLabel??"No results",onChange:A=>v(T,X,A)},{trigger:G(({attrs:A})=>[b("button",Zt({type:"button",class:"nb-breadcrumbs__switch"},{ref_for:!0},A,{"aria-label":T.switchLabel??`Switch ${T.label}`}),[j(Ue,{name:Kk,size:14,"aria-hidden":"true"})],16,eA)]),_:2},1032,["anchor","model-value","options","search-placeholder","no-results-label","onChange"])):V("",!0)])}),128)):xe(E.$slots,"default",{key:1},void 0,!0)])):V("",!0)],2)}}}),[["__scopeId","data-v-08deaee6"]]);function tA(e){var i,n,r,s;let t=(i=e.name)==null?void 0:i.trim();if(t){let a=t.split(/\s+/);return((((n=a[0])==null?void 0:n[0])??"")+(a.length>1?((r=a[a.length-1])==null?void 0:r[0])??"":"")).toUpperCase()}return(((s=e.email)==null?void 0:s.trim().split("@")[0])??"").slice(0,2).toUpperCase()}var Lv=function(e){return e.Grey="grey",e.Blue="blue",e.Orange="orange",e.Green="green",e.Red="red",e.Purple="purple",e.Primary="primary",e}(Lv||{}),Ev=function(e){return e.Small="sm",e.Medium="md",e}(Ev||{}),iA={key:0,class:"nb-badge__dot"},Cs=tt(Ne({__name:"Badge",props:{variant:{default:Lv.Grey},size:{default:Ev.Medium},dot:{type:Boolean,default:!1},icon:{default:void 0},placeholder:{type:Boolean,default:!1},interactive:{type:Boolean,default:!1}},setup(e){return(t,i)=>(m(),he(qo(e.interactive?"button":"span"),{type:e.interactive?"button":void 0,class:Le(["nb-badge",`nb-badge--${e.variant}`,`nb-badge--${e.size}`,{"nb-badge--placeholder":e.placeholder,"nb-badge--interactive":e.interactive}])},{default:G(()=>[e.dot?(m(),M("span",iA)):V("",!0),e.icon?(m(),he(Ue,{key:1,name:e.icon,size:e.size==="sm"?11:12,class:"nb-badge__icon"},null,8,["name","size"])):V("",!0),xe(t.$slots,"default",{},void 0,!0)]),_:3},8,["type","class"]))}}),[["__scopeId","data-v-aa5af746"]]);const Aa=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},nA=Aa("x-circle","0 0 256 256",'<path d="M162.83,98.83,133.66,128l29.17,29.17a4,4,0,0,1-5.66,5.66L128,133.66,98.83,162.83a4,4,0,0,1-5.66-5.66L122.34,128,93.17,98.83a4,4,0,0,1,5.66-5.66L128,122.34l29.17-29.17a4,4,0,1,1,5.66,5.66ZM228,128A100,100,0,1,1,128,28,100.11,100.11,0,0,1,228,128Zm-8,0a92,92,0,1,0-92,92A92.1,92.1,0,0,0,220,128Z"/>'),rA=Aa("x-circle","0 0 256 256",'<path d="M164.24,100.24,136.48,128l27.76,27.76a6,6,0,1,1-8.48,8.48L128,136.48l-27.76,27.76a6,6,0,0,1-8.48-8.48L119.52,128,91.76,100.24a6,6,0,0,1,8.48-8.48L128,119.52l27.76-27.76a6,6,0,0,1,8.48,8.48ZM230,128A102,102,0,1,1,128,26,102.12,102.12,0,0,1,230,128Zm-12,0a90,90,0,1,0-90,90A90.1,90.1,0,0,0,218,128Z"/>'),B6=Aa("x-circle","0 0 256 256",'<path d="M165.66,101.66,139.31,128l26.35,26.34a8,8,0,0,1-11.32,11.32L128,139.31l-26.34,26.35a8,8,0,0,1-11.32-11.32L116.69,128,90.34,101.66a8,8,0,0,1,11.32-11.32L128,116.69l26.34-26.35a8,8,0,0,1,11.32,11.32ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z"/>'),sA=Aa("x-circle","0 0 256 256",'<path d="M168.49,104.49,145,128l23.52,23.51a12,12,0,0,1-17,17L128,145l-23.51,23.52a12,12,0,0,1-17-17L111,128,87.51,104.49a12,12,0,0,1,17-17L128,111l23.51-23.52a12,12,0,0,1,17,17ZM236,128A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128Z"/>'),aA=Aa("x-circle","0 0 256 256",'<path d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm37.66,130.34a8,8,0,0,1-11.32,11.32L128,139.31l-26.34,26.35a8,8,0,0,1-11.32-11.32L116.69,128,90.34,101.66a8,8,0,0,1,11.32-11.32L128,116.69l26.34-26.35a8,8,0,0,1,11.32,11.32L139.31,128Z"/>'),lA=Aa("x-circle","0 0 256 256",'<path d="M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z" opacity="0.2"/><path d="M165.66,101.66,139.31,128l26.35,26.34a8,8,0,0,1-11.32,11.32L128,139.31l-26.34,26.35a8,8,0,0,1-11.32-11.32L116.69,128,90.34,101.66a8,8,0,0,1,11.32-11.32L128,116.69l26.34-26.35a8,8,0,0,1,11.32,11.32ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z"/>'),oA="x-circle",cA=Object.freeze(Object.defineProperty({__proto__:null,bold:sA,default:B6,duotone:lA,fill:aA,glyphName:oA,light:rA,regular:B6,thin:nA},Symbol.toStringTag,{value:"Module"})),Ma=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},uA=Ma("note","0 0 256 256",'<path d="M92,96a4,4,0,0,1,4-4h64a4,4,0,0,1,0,8H96A4,4,0,0,1,92,96Zm4,36h64a4,4,0,0,0,0-8H96a4,4,0,0,0,0,8Zm32,24H96a4,4,0,0,0,0,8h32a4,4,0,0,0,0-8ZM220,48V156.69a11.9,11.9,0,0,1-3.52,8.48l-51.31,51.32a11.93,11.93,0,0,1-8.48,3.51H48a12,12,0,0,1-12-12V48A12,12,0,0,1,48,36H208A12,12,0,0,1,220,48ZM48,212H156V160a4,4,0,0,1,4-4h52V48a4,4,0,0,0-4-4H48a4,4,0,0,0-4,4V208A4,4,0,0,0,48,212Zm158.35-48H164v42.35Z"/>'),dA=Ma("note","0 0 256 256",'<path d="M90,96a6,6,0,0,1,6-6h64a6,6,0,0,1,0,12H96A6,6,0,0,1,90,96Zm6,38h64a6,6,0,0,0,0-12H96a6,6,0,0,0,0,12Zm32,20H96a6,6,0,0,0,0,12h32a6,6,0,0,0,0-12ZM222,48V156.69a13.94,13.94,0,0,1-4.1,9.9L166.59,217.9a13.94,13.94,0,0,1-9.9,4.1H48a14,14,0,0,1-14-14V48A14,14,0,0,1,48,34H208A14,14,0,0,1,222,48ZM48,210H154V160a6,6,0,0,1,6-6h50V48a2,2,0,0,0-2-2H48a2,2,0,0,0-2,2V208A2,2,0,0,0,48,210Zm153.52-44H166v35.52Z"/>'),F6=Ma("note","0 0 256 256",'<path d="M88,96a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H96A8,8,0,0,1,88,96Zm8,40h64a8,8,0,0,0,0-16H96a8,8,0,0,0,0,16Zm32,16H96a8,8,0,0,0,0,16h32a8,8,0,0,0,0-16ZM224,48V156.69A15.86,15.86,0,0,1,219.31,168L168,219.31A15.86,15.86,0,0,1,156.69,224H48a16,16,0,0,1-16-16V48A16,16,0,0,1,48,32H208A16,16,0,0,1,224,48ZM48,208H152V160a8,8,0,0,1,8-8h48V48H48Zm120-40v28.7L196.69,168Z"/>'),hA=Ma("note","0 0 256 256",'<path d="M84,108A12,12,0,0,1,96,96h64a12,12,0,0,1,0,24H96A12,12,0,0,1,84,108Zm32,28H96a12,12,0,0,0,0,24h20a12,12,0,0,0,0-24ZM228,48V156.69a19.86,19.86,0,0,1-5.86,14.14l-51.31,51.31A19.86,19.86,0,0,1,156.69,228H48a20,20,0,0,1-20-20V48A20,20,0,0,1,48,28H208A20,20,0,0,1,228,48ZM52,204h92V156a12,12,0,0,1,12-12h48V52H52Zm139-36H168v23Z"/>'),fA=Ma("note","0 0 256 256",'<path d="M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H156.69A15.92,15.92,0,0,0,168,219.31L219.31,168A15.92,15.92,0,0,0,224,156.69V48A16,16,0,0,0,208,32ZM96,88h64a8,8,0,0,1,0,16H96a8,8,0,0,1,0-16Zm32,80H96a8,8,0,0,1,0-16h32a8,8,0,0,1,0,16ZM96,136a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Zm64,68.69V160h44.7Z"/>'),pA=Ma("note","0 0 256 256",'<path d="M216,160l-56,56V160Z" opacity="0.2"/><path d="M88,96a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H96A8,8,0,0,1,88,96Zm8,40h64a8,8,0,0,0,0-16H96a8,8,0,0,0,0,16Zm32,16H96a8,8,0,0,0,0,16h32a8,8,0,0,0,0-16ZM224,48V156.69A15.86,15.86,0,0,1,219.31,168L168,219.31A15.86,15.86,0,0,1,156.69,224H48a16,16,0,0,1-16-16V48A16,16,0,0,1,48,32H208A16,16,0,0,1,224,48ZM48,208H152V160a8,8,0,0,1,8-8h48V48H48Zm120-40v28.7L196.69,168Z"/>'),_A="note",mA=Object.freeze(Object.defineProperty({__proto__:null,bold:hA,default:F6,duotone:pA,fill:fA,glyphName:_A,light:dA,regular:F6,thin:uA},Symbol.toStringTag,{value:"Module"}));var cd=function(e){return e.Info="info",e.Success="success",e.Warning="warning",e.Error="error",e.Neutral="neutral",e}(cd||{}),ud=function(e){return e.Inline="inline",e.Callout="callout",e}(ud||{}),vA=["role","aria-live"],gA={class:"nb-banner__body"},bA={key:0,class:"nb-banner__title"},yA={key:1,class:"nb-banner__text"},wA={key:1,class:"nb-banner__actions"},SA=["aria-label"],ks=tt(Ne({__name:"Banner",props:{status:{default:cd.Info},variant:{default:ud.Inline},title:{},dismissible:{type:Boolean,default:!1},icon:{},hideIcon:{type:Boolean,default:!1},flush:{type:Boolean,default:!1},closeLabel:{default:"Dismiss"}},emits:["dismiss"],setup(e,{emit:t}){let i=e,n=t,r=Wn(),s=q(()=>!!r.default),a=q(()=>!!r.action),l=q(()=>i.dismissible&&i.variant!==ud.Callout),o=q(()=>i.status===cd.Error),c=K(!1);function u(){c.value=!0,n("dismiss")}let d={info:wv,success:a2,warning:Mv,error:cA,neutral:mA};return(h,f)=>c.value?V("",!0):(m(),M("div",{key:0,class:Le(["nb-banner",`nb-banner--${i.status}`,`nb-banner--${i.variant}`,{"nb-banner--flush":i.flush}]),role:o.value?"alert":"status","aria-live":o.value?"assertive":"polite"},[i.hideIcon?V("",!0):(m(),he(Ue,{key:0,name:i.icon??d[i.status],size:18,weight:"fill",class:"nb-banner__icon","aria-hidden":"true"},null,8,["name"])),b("p",gA,[i.title?(m(),M("strong",bA,Z(i.title),1)):V("",!0),s.value?(m(),M("span",yA,[xe(h.$slots,"default",{},void 0,!0)])):V("",!0)]),a.value?(m(),M("div",wA,[xe(h.$slots,"action",{},void 0,!0)])):V("",!0),l.value?(m(),M("button",{key:2,type:"button",class:"nb-banner__close","aria-label":i.closeLabel,onClick:u},[j(Ue,{name:de(gs),size:14},null,8,["name"])],8,SA)):V("",!0)],10,vA))}}),[["__scopeId","data-v-bf09999e"]]),CA={key:0,class:"nb-chart__header"},kA={key:0,class:"nb-chart__title"},AA={key:1,class:"nb-chart__subtitle"},o2=tt(Ne({__name:"ChartFrame",props:{title:{default:void 0},subtitle:{default:void 0},height:{default:280},showLegend:{type:Boolean,default:!0}},setup(e,{expose:t}){let i=e,n=K(null),r=q(()=>{let s=i.height;return typeof s=="number"||/^\d+(\.\d+)?$/.test(s)?`${s}px`:s});return t({viewport:n}),(s,a)=>(m(),M("figure",{class:"nb-chart",style:mi({height:r.value})},[e.title||e.subtitle?(m(),M("figcaption",CA,[e.title?(m(),M("h4",kA,Z(e.title),1)):V("",!0),e.subtitle?(m(),M("p",AA,Z(e.subtitle),1)):V("",!0)])):V("",!0),b("div",{ref_key:"viewport",ref:n,class:"nb-chart__viewport"},[xe(s.$slots,"default",{},void 0,!0)],512),e.showLegend?xe(s.$slots,"legend",{key:1},void 0,!0):V("",!0)],4))}}),[["__scopeId","data-v-0b28100e"]]),MA={key:0,class:"nb-chart__tooltip-title"},$A={class:"nb-chart__tooltip-rows"},LA={class:"nb-chart__tooltip-label"},EA={class:"nb-chart__tooltip-value"},c2=tt(Ne({__name:"ChartTooltip",props:{visible:{type:Boolean},x:{},y:{},title:{},rows:{}},setup(e){return(t,i)=>(m(),he(Dh,{name:"nb-chart-tooltip"},{default:G(()=>[e.visible?(m(),M("div",{key:0,class:"nb-chart__tooltip",style:mi({transform:`translate(${e.x}px, ${e.y}px)`}),role:"tooltip"},[e.title?(m(),M("div",MA,Z(e.title),1)):V("",!0),b("ul",$A,[(m(!0),M(Ce,null,Fe(e.rows,(n,r)=>(m(),M("li",{key:`${n.label}-${r}`,class:"nb-chart__tooltip-row"},[b("span",{class:"nb-chart__tooltip-swatch",style:mi({background:n.color})},null,4),b("span",LA,Z(n.label),1),b("span",EA,Z(n.value),1)]))),128))])],4)):V("",!0)]),_:1}))}}),[["__scopeId","data-v-03e0b7bb"]]),Cc=["var(--nb-c-chart-1)","var(--nb-c-chart-2)","var(--nb-c-chart-3)","var(--nb-c-chart-4)","var(--nb-c-chart-5)","var(--nb-c-chart-6)","var(--nb-c-chart-7)","var(--nb-c-chart-8)"],u2=(e,t=Cc)=>{let i=t.length>0?t:Cc;return i[((Number.isFinite(e)?Math.trunc(e):0)%i.length+i.length)%i.length]},xA={class:"nb-chart__legend"},HA={class:"nb-chart__legend-label"},xv=tt(Ne({__name:"ChartLegend",props:{items:{}},setup(e){return(t,i)=>(m(),M("ul",xA,[(m(!0),M(Ce,null,Fe(e.items,n=>(m(),M("li",{key:n.label,class:"nb-chart__legend-item"},[b("span",{class:"nb-chart__legend-swatch",style:mi({background:n.color})},null,4),b("span",HA,Z(n.label),1)]))),128))]))}}),[["__scopeId","data-v-401d7d8b"]]),kc=(e,t)=>{let[i,n]=e,[r,s]=t,a=n-i||1,l=o=>r+(o-i)/a*(s-r);return l.domain=e,l.range=t,l.ticks=(o=5)=>NA(i,n,o),l},TA=(e,t,i=.2)=>{let[n,r]=t,s=(r-n)/Math.max(e.length,1),a=s*(1-i),l=(s-a)/2,o=new Map(e.map((u,d)=>[u,d])),c=u=>{let d=o.get(u);return d===void 0?n:n+d*s+l};return c.bandwidth=a,c.domain=e,c.range=t,c},NA=(e,t,i=5)=>{if(e===t)return[e];let n=t-e,r=n/Math.max(i,1),s=10**Math.floor(Math.log10(r)),a=[1,2,5,10].map(u=>u*s),l=a.find(u=>n/u<=i*1.5)??a[a.length-1],o=Math.ceil(e/l)*l,c=[];for(let u=o;u<=t+l/2;u+=l)c.push(Number(u.toFixed(10)));return c},d2=(e,t,i=.05)=>{if(e===t){let r=Math.abs(e)||1;return[e-r,t+r]}let n=(t-e)*i;return[e-n,t+n]},h2=(e,t={width:480,height:280})=>{let i=K({...t}),n=null;return nt(()=>{!e.value||typeof ResizeObserver>"u"||(n=new ResizeObserver(r=>{let s=r[0];if(!s)return;let{width:a,height:l}=s.contentRect;i.value={width:Math.max(0,Math.round(a)),height:Math.max(0,Math.round(l))}}),n.observe(e.value))}),ri(()=>{n==null||n.disconnect(),n=null}),i},PA=["width","height","role","aria-label"],OA={key:0},IA=["x1","x2","y1","y2"],RA={class:"nb-chart__axis"},VA=["x","y","text-anchor","dominant-baseline"],DA={class:"nb-chart__axis"},ZA=["x","y","text-anchor","dominant-baseline"],BA=["x1","x2","y1","y2"],FA=["fill","tabindex","role","aria-label","onKeydown"],zA={class:"nb-chart__hover-layer"},UA=["onMouseenter","onMousemove","onClick"],WA=tt(Ne({__name:"BarChart",props:{series:{default:()=>[]},orientation:{default:"vertical"},stacked:{type:Boolean,default:!1},valueFormatter:{},title:{default:void 0},subtitle:{default:void 0},height:{default:280},showLegend:{type:Boolean,default:!0},showTooltip:{type:Boolean,default:!0},showGrid:{type:Boolean,default:!0},colors:{default:()=>Cc}},emits:["select"],setup(e,{emit:t}){let i=e,n=t,r=K(null),s=h2(r,{width:480,height:240}),a=q(()=>i.orientation==="horizontal"),l=q(()=>i.series.map((ne,Q)=>({name:ne.name,data:ne.data,color:ne.color??u2(Q,i.colors)}))),o=q(()=>{var ne;return(((ne=i.series[0])==null?void 0:ne.data)??[]).map(Q=>Q.x)}),c=(ne,Q)=>{var oe,ve;return((ve=(oe=l.value[Q])==null?void 0:oe.data[ne])==null?void 0:ve.y)??0},u=(ne,Q)=>{let oe=c(ne,Q);if(!i.stacked)return[0,oe];let ve=0;for(let fe=0;fe<Q;fe+=1){let pe=c(ne,fe);pe>=0==oe>=0&&(ve+=pe)}return[ve,ve+oe]},d=q(()=>{let ne=[];return o.value.forEach((Q,oe)=>{l.value.forEach((ve,fe)=>{ne.push(u(oe,fe)[1])})}),ne.length?d2(Math.min(0,...ne),Math.max(0,...ne),.05):[0,1]}),h=q(()=>{if(!a.value)return{top:12,right:16,bottom:28,left:44};let ne=o.value.reduce((oe,ve)=>Math.max(oe,String(ve).length),0),Q=Math.max(44,Math.round(s.value.width*.4));return{top:12,right:16,bottom:28,left:Math.min(Math.max(44,Math.ceil(ne*6.2)+12),Q)}}),f=q(()=>({x0:h.value.left,x1:Math.max(h.value.left,s.value.width-h.value.right),y0:h.value.top,y1:Math.max(h.value.top,s.value.height-h.value.bottom)})),v=q(()=>TA(o.value.map(ne=>String(ne)),a.value?[f.value.y0,f.value.y1]:[f.value.x0,f.value.x1],.2)),p=q(()=>kc(d.value,a.value?[f.value.x0,f.value.x1]:[f.value.y1,f.value.y0])),w=q(()=>p.value.ticks(5)),_=ne=>v.value(String(o.value[ne])),y=ne=>_(ne)+v.value.bandwidth/2,C=q(()=>{let ne=l.value.length||1;return i.stacked?v.value.bandwidth:v.value.bandwidth/ne}),g=(ne,Q)=>{let[oe,ve]=u(ne,Q),fe=p.value(oe),pe=p.value(ve),ye=Math.max(0,C.value-2),U=_(ne)+(i.stacked?0:Q*C.value),_e=Math.max(0,Math.abs(pe-fe));return a.value?{x:Math.min(fe,pe),y:U,width:_e,height:ye}:{x:U,y:Math.min(fe,pe),width:ye,height:_e}},$=ne=>{let Q=_(ne),oe=v.value.bandwidth;return a.value?{x:f.value.x0,y:Q,width:Math.max(0,f.value.x1-f.value.x0),height:oe}:{x:Q,y:f.value.y0,width:oe,height:Math.max(0,f.value.y1-f.value.y0)}},E=ne=>Math.abs(ne)>=1e3?`${(ne/1e3).toFixed(1)}k`:String(ne),L=ne=>i.valueFormatter?i.valueFormatter(ne):E(ne),B=Si(),T=()=>{var ne;return!!((ne=B==null?void 0:B.vnode.props)!=null&&ne.onSelect)},X=(ne,Q)=>{let oe=l.value[Q],ve=L(c(ne,Q));return l.value.length>1?`${o.value[ne]}, ${oe==null?void 0:oe.name}: ${ve}`:`${o.value[ne]}: ${ve}`},W=(ne,Q)=>{let oe=l.value[Q],ve=oe==null?void 0:oe.data[ne];return{kind:"series",x:(ve==null?void 0:ve.x)??o.value[ne],y:(ve==null?void 0:ve.y)??0,seriesName:(oe==null?void 0:oe.name)??"",seriesIndex:Q,index:ne,point:ve??{x:o.value[ne],y:0}}},A=ne=>{let Q=ne.currentTarget.ownerSVGElement;if(!Q)return null;let oe=Q.getBoundingClientRect();return{x:ne.clientX-oe.left,y:ne.clientY-oe.top}},x=(ne,Q)=>{let oe=l.value.length;if(oe<=1)return 0;let ve=A(ne);if(!ve)return 0;if(i.stacked){let ye=a.value?ve.x:ve.y;for(let U=0;U<oe;U+=1){let[_e,ge]=u(Q,U),se=p.value(_e),H=p.value(ge);if(ye>=Math.min(se,H)&&ye<=Math.max(se,H))return U}return oe-1}let fe=(a.value?ve.y:ve.x)-_(Q),pe=Math.floor(fe/(C.value||1));return Math.min(Math.max(pe,0),oe-1)},F=(ne,Q)=>{T()&&n("select",W(Q,x(ne,Q)))},ie=(ne,Q,oe)=>{T()&&(ne.key!=="Enter"&&ne.key!==" "||(ne.preventDefault(),n("select",W(Q,oe))))},re=K(null),ue=K({x:0,y:0}),J=(ne,Q)=>{let oe=A(ne);oe&&(ue.value={x:oe.x+12,y:oe.y+12},re.value=Q)},ae=q(()=>re.value===null?[]:l.value.map(ne=>{let Q=ne.data[re.value];return{label:ne.name,value:(Q==null?void 0:Q.label)??L((Q==null?void 0:Q.y)??0),color:ne.color}}));return(ne,Q)=>(m(),he(o2,{title:e.title,subtitle:e.subtitle,height:e.height,"show-legend":e.showLegend&&l.value.length>0},{legend:G(()=>[j(xv,{items:l.value.map(oe=>({label:oe.name,color:oe.color}))},null,8,["items"])]),default:G(()=>[b("div",{ref_key:"root",ref:r,class:"nb-bar-chart"},[(m(),M("svg",{width:de(s).width,height:de(s).height,class:Le(["nb-chart__svg",{"nb-chart__svg--selectable":T()}]),role:T()?"group":"img","aria-label":e.title||"Bar chart",onMouseleave:Q[0]||(Q[0]=oe=>re.value=null)},[e.showGrid&&de(s).width>0?(m(),M("g",OA,[(m(!0),M(Ce,null,Fe(w.value,oe=>(m(),M("line",{key:`grid-${oe}`,class:"nb-chart__gridline",x1:a.value?p.value(oe):f.value.x0,x2:a.value?p.value(oe):f.value.x1,y1:a.value?f.value.y0:p.value(oe),y2:a.value?f.value.y1:p.value(oe)},null,8,IA))),128))])):V("",!0),b("g",RA,[(m(!0),M(Ce,null,Fe(w.value,oe=>(m(),M("text",{key:`vt-${oe}`,x:a.value?p.value(oe):f.value.x0-6,y:a.value?f.value.y1+14:p.value(oe),"text-anchor":a.value?"middle":"end","dominant-baseline":a.value?"auto":"middle"},Z(L(oe)),9,VA))),128))]),b("g",DA,[(m(!0),M(Ce,null,Fe(o.value,(oe,ve)=>(m(),M("text",{key:`ct-${ve}`,x:a.value?f.value.x0-6:y(ve),y:a.value?y(ve):f.value.y1+14,"text-anchor":a.value?"end":"middle","dominant-baseline":a.value?"middle":"auto"},Z(oe),9,ZA))),128))]),b("line",{class:"nb-chart__axis-line",x1:a.value?p.value(0):f.value.x0,x2:a.value?p.value(0):f.value.x1,y1:a.value?f.value.y0:p.value(0),y2:a.value?f.value.y1:p.value(0)},null,8,BA),(m(!0),M(Ce,null,Fe(o.value,(oe,ve)=>(m(),M("g",{key:`g-${ve}`},[(m(!0),M(Ce,null,Fe(l.value,(fe,pe)=>(m(),M("rect",Zt({key:`${ve}-${pe}`,class:["nb-chart__bar",{"is-dim":re.value!==null&&re.value!==ve}]},{ref_for:!0},g(ve,pe),{fill:fe.color,tabindex:T()?0:void 0,role:T()?"button":void 0,"aria-label":T()?X(ve,pe):void 0,onKeydown:ye=>ie(ye,ve,pe)}),null,16,FA))),128))]))),128)),b("g",zA,[(m(!0),M(Ce,null,Fe(o.value,(oe,ve)=>(m(),M("rect",Zt({key:`hover-${ve}`},{ref_for:!0},$(ve),{fill:"transparent",onMouseenter:fe=>re.value=ve,onMousemove:fe=>J(fe,ve),onClick:fe=>F(fe,ve)}),null,16,UA))),128))])],42,PA)),j(c2,{visible:e.showTooltip&&re.value!==null,x:ue.value.x,y:ue.value.y,title:re.value===null?"":String(o.value[re.value]),rows:ae.value},null,8,["visible","x","y","title","rows"])],512)]),_:1},8,["title","subtitle","height","show-legend"]))}}),[["__scopeId","data-v-7b3d7ee4"]]),co=0,Hn=null;function uo(){if(!Hn)return;let e=document.documentElement.style;e.setProperty("--nb-vvh",`${Hn.height}px`),e.setProperty("--nb-vvt",`${Hn.offsetTop}px`)}function jA(){co+=1,!(co>1)&&(Hn=typeof window<"u"?window.visualViewport:null,Hn&&(Hn.addEventListener("resize",uo),Hn.addEventListener("scroll",uo),uo()))}function KA(){if(co===0||(--co,co>0))return;Hn&&(Hn=(Hn.removeEventListener("resize",uo),Hn.removeEventListener("scroll",uo),null));let e=document.documentElement.style;e.removeProperty("--nb-vvh"),e.removeProperty("--nb-vvt")}function qA(e){let{phone:t}=Xo(),i=!1;function n(r){r!==i&&(i=r,r?jA():KA())}Ve(()=>e()&&t.value,n,{immediate:!0}),tc(()=>n(!1))}const $a=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},GA=$a("caret-left","0 0 256 256",'<path d="M162.83,205.17a4,4,0,0,1-5.66,5.66l-80-80a4,4,0,0,1,0-5.66l80-80a4,4,0,1,1,5.66,5.66L85.66,128Z"/>'),YA=$a("caret-left","0 0 256 256",'<path d="M164.24,203.76a6,6,0,1,1-8.48,8.48l-80-80a6,6,0,0,1,0-8.48l80-80a6,6,0,0,1,8.48,8.48L88.49,128Z"/>'),z6=$a("caret-left","0 0 256 256",'<path d="M165.66,202.34a8,8,0,0,1-11.32,11.32l-80-80a8,8,0,0,1,0-11.32l80-80a8,8,0,0,1,11.32,11.32L91.31,128Z"/>'),XA=$a("caret-left","0 0 256 256",'<path d="M168.49,199.51a12,12,0,0,1-17,17l-80-80a12,12,0,0,1,0-17l80-80a12,12,0,0,1,17,17L97,128Z"/>'),JA=$a("caret-left","0 0 256 256",'<path d="M168,48V208a8,8,0,0,1-13.66,5.66l-80-80a8,8,0,0,1,0-11.32l80-80A8,8,0,0,1,168,48Z"/>'),QA=$a("caret-left","0 0 256 256",'<path d="M160,48V208L80,128Z" opacity="0.2"/><path d="M163.06,40.61a8,8,0,0,0-8.72,1.73l-80,80a8,8,0,0,0,0,11.32l80,80A8,8,0,0,0,168,208V48A8,8,0,0,0,163.06,40.61ZM152,188.69,91.31,128,152,67.31Z"/>'),eM="caret-left",Hv=Object.freeze(Object.defineProperty({__proto__:null,bold:XA,default:z6,duotone:QA,fill:JA,glyphName:eM,light:YA,regular:z6,thin:GA},Symbol.toStringTag,{value:"Module"}));var tM=["width","height","role","aria-hidden","aria-labelledby","focusable"],iM=["id"],nM=["id"],rM=["id"],sM=["id"],aM=["id"],lM=["id"],oM=["id"],cM=["id"],uM=["id"],dM=["id"],hM={transform:"matrix(0.924856, 0, 0, 0.924856, -44.998852, -33.191986)"},fM={id:"group-1"},pM=["fill"],_M=["fill"],mM=["fill"],vM={id:"object-1"},gM=["fill"],bM=["fill"],yM=["fill"],wM=["fill"],SM={id:"object-2"},CM=["fill"],kM=["fill"],AM=["fill"],MM=["fill"],$M=["fill"],LM=Ne({__name:"NubiscoMark",props:{size:{default:20},title:{default:void 0}},setup(e){let t=e,i=`nb-nubisco-mark-${Oi()}`,n=`${i}-title`,r=q(()=>typeof t.size=="number"?`${t.size}px`:t.size);return(s,a)=>(m(),M("svg",{width:r.value,height:r.value,viewBox:"0 0 320 320",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:t.title?"img":void 0,"aria-hidden":t.title?void 0:"true","aria-labelledby":t.title?n:void 0,focusable:t.title?void 0:"false"},[t.title?(m(),M("title",{key:0,id:n},Z(t.title),1)):V("",!0),b("defs",null,[b("linearGradient",{id:`${i}-g1`,gradientUnits:"userSpaceOnUse",x1:"119.61",y1:"36.855",x2:"119.61",y2:"381.922",spreadMethod:"pad",gradientTransform:"matrix(-0.887141, -0.461497, 0.40987, -0.999167, 140.11236, 473.94595)"},[...a[0]||(a[0]=[b("stop",{offset:"0","stop-color":"rgb(254,216,103)"},null,-1),b("stop",{offset:"0.51","stop-color":"rgb(250,71,78)"},null,-1),b("stop",{offset:"1","stop-color":"rgb(173,55,159)"},null,-1)])],8,iM),b("linearGradient",{id:`${i}-g3`,gradientUnits:"userSpaceOnUse",x1:"143.989",y1:"36.855",x2:"143.989",y2:"179.9",gradientTransform:"matrix(0.887207, 0.461371, -0.426978, 0.821069, 78.224142, -58.961861)"},[...a[1]||(a[1]=[b("stop",{offset:"0","stop-color":"rgb(0,0,0)","stop-opacity":"0.17"},null,-1),b("stop",{offset:"1","stop-color":"rgb(0,0,0)","stop-opacity":"0.03"},null,-1)])],8,nM),b("linearGradient",{id:`${i}-g2`,gradientUnits:"userSpaceOnUse",x1:"91.703",y1:"328.267",x2:"91.703",y2:"381.922",gradientTransform:"matrix(-0.601925, -0.798552, 1.256661, -1.089764, -307.90801, 812.885223)"},[...a[2]||(a[2]=[b("stop",{offset:"0","stop-color":"rgb(0,0,0)","stop-opacity":"0.38"},null,-1),b("stop",{offset:"1","stop-color":"rgb(0,0,0)","stop-opacity":"0.2"},null,-1)])],8,rM),b("linearGradient",{id:`${i}-g8`,gradientUnits:"userSpaceOnUse",x1:"348.688",y1:"35.889",x2:"348.688",y2:"116.548",gradientTransform:"matrix(-0.503716, -0.863869, 1.170135, -0.682295, 434.155647, 419.539108)"},[...a[3]||(a[3]=[b("stop",{offset:"0","stop-color":"rgb(254,171,107)","stop-opacity":"0.56"},null,-1),b("stop",{offset:"0.745","stop-color":"rgb(255,253,207)"},null,-1),b("stop",{offset:"1","stop-color":"rgb(255,253,207)"},null,-1)])],8,sM),b("linearGradient",{id:`${i}-g10`,gradientUnits:"userSpaceOnUse",x1:"338.142",y1:"47.006",x2:"338.142",y2:"121.215",gradientTransform:"matrix(0.75452, 0.656277, -1.016572, 1.16875, 168.120543, -239.018367)"},[...a[4]||(a[4]=[b("stop",{offset:"0","stop-color":"rgb(255,255,255)","stop-opacity":"0.35"},null,-1),b("stop",{offset:"0.611","stop-color":"rgb(255,255,255)","stop-opacity":"0.2"},null,-1),b("stop",{offset:"0.656","stop-color":"rgb(255,255,255)","stop-opacity":"0.09"},null,-1),b("stop",{offset:"1","stop-color":"rgb(255,255,255)","stop-opacity":"0.05"},null,-1)])],8,aM),b("linearGradient",{id:`${i}-g7`,gradientUnits:"userSpaceOnUse",x1:"286.279",y1:"128.145",x2:"286.279",y2:"381.893",gradientTransform:"matrix(0.980122, -0.198399, 0.201333, 0.99503, -34.83682, 58.72465)"},[...a[5]||(a[5]=[b("stop",{offset:"0","stop-color":"rgb(94,33,120)","stop-opacity":"0"},null,-1),b("stop",{offset:"0.23","stop-color":"rgb(94,33,116)","stop-opacity":"0"},null,-1),b("stop",{offset:"1","stop-color":"rgb(94,32,119)","stop-opacity":"0.77"},null,-1)])],8,lM),b("linearGradient",{id:`${i}-g0`,gradientUnits:"userSpaceOnUse",x1:"220.396",y1:"36.815",x2:"220.396",y2:"381.893",gradientTransform:"matrix(0.909593, -0.415502, 0.458149, 0.999272, -61.507814, 91.882297)"},[...a[6]||(a[6]=[b("stop",{offset:"0","stop-color":"rgb(105,187,99)"},null,-1),b("stop",{offset:"0.5","stop-color":"rgb(16,169,164)"},null,-1),b("stop",{offset:"1","stop-color":"rgb(11,130,207)"},null,-1)])],8,oM),b("linearGradient",{id:`${i}-g4`,gradientUnits:"userSpaceOnUse",x1:"197.5",y1:"36.815",x2:"197.5",y2:"132.342",gradientTransform:"matrix(0.419296, -0.90785, 1.050658, 0.485253, 18.526692, 214.196105)"},[...a[7]||(a[7]=[b("stop",{offset:"0","stop-color":"rgb(255,255,255)","stop-opacity":"0.45"},null,-1),b("stop",{offset:"1","stop-color":"rgb(7,226,201)","stop-opacity":"0.85"},null,-1)])],8,cM),b("linearGradient",{id:`${i}-g5`,gradientUnits:"userSpaceOnUse",x1:"197.5",y1:"59.48",x2:"197.5",y2:"132.342",gradientTransform:"matrix(0.450388, -0.892832, 1.886975, 0.951884, -71.46741, 184.345316)"},[...a[8]||(a[8]=[b("stop",{offset:"0","stop-color":"rgb(255,255,255)","stop-opacity":"0.6"},null,-1),b("stop",{offset:"0.461","stop-color":"rgb(255,255,255)","stop-opacity":"0.71"},null,-1),b("stop",{offset:"1","stop-color":"rgb(255,255,255)","stop-opacity":"0.82"},null,-1)])],8,uM),b("linearGradient",{id:`${i}-g6`,gradientUnits:"userSpaceOnUse",x1:"258.091",y1:"319.547",x2:"258.091",y2:"338.393",gradientTransform:"matrix(0.172631, -0.984987, 3.998703, 0.700821, -1101.160809, 355.271073)"},[...a[9]||(a[9]=[b("stop",{offset:"0","stop-color":"rgb(5,219,226)","stop-opacity":"0.96"},null,-1),b("stop",{offset:"0.493","stop-color":"rgb(5,219,226)","stop-opacity":"0.74"},null,-1),b("stop",{offset:"1","stop-color":"rgb(5,219,226)","stop-opacity":"0.34"},null,-1)])],8,dM)]),b("g",hM,[b("g",fM,[b("path",{fill:`url(#${i}-g1)`,d:"M 48.655 381.922 C 119.827 257.14 51.704 41.212 190.566 36.855 C 173.148 402.723 82.723 380.123 48.655 381.922 Z"},null,8,pM),b("path",{fill:`url(#${i}-g3)`,d:"M 177.776 179.9 C 120.488 51.712 97.413 142.969 97.413 142.969 C 107.668 83.266 128.325 38.808 190.566 36.855 C 187.88 93.268 183.459 140.445 177.776 179.9 Z"},null,8,_M),b("path",{fill:`url(#${i}-g2)`,d:"M 48.655 381.922 C 58.078 365.401 65.06 347.282 70.403 328.267 C 88.094 346.662 134.752 331.941 134.752 331.941 C 103.379 387.36 67.445 380.93 48.655 381.922 Z"},null,8,mM),a[10]||(a[10]=b("path",{fill:"rgb(255,254,155)",d:"M 134.752 331.941 C 121.122 337.936 81.551 344.779 70.403 328.267 C 88.094 346.662 134.752 331.941 134.752 331.941 Z"},null,-1))]),b("g",vM,[b("path",{fill:`url(#${i}-g1)`,d:"M 313.875 381.893 C 288.098 381.893 268.627 375.477 253.751 364.466 C 216.182 182.535 312.866 21.948 394.655 36.85 C 335.339 159.09 350.166 381.893 313.875 381.893 Z"},null,8,gM),b("path",{fill:`url(#${i}-g8)`,d:"M 367.694 116.548 C 367.694 116.548 352.527 74.893 302.72 88.001 C 329.996 51.072 363.412 31.158 394.655 36.85 C 383.206 60.444 374.519 87.785 367.694 116.548 Z"},null,8,bM),a[11]||(a[11]=b("path",{fill:"rgb(255,255,255)","fill-opacity":"0.46",d:"M 367.694 116.548 C 367.694 116.548 352.527 74.893 302.72 88.001 C 352.21 71.129 367.694 116.548 367.694 116.548 Z"},null,-1)),b("path",{fill:`url(#${i}-g10)`,d:"M 384.493 47.025 C 335.553 54.802 291.791 121.215 291.791 121.215 C 291.791 121.215 326.809 45.627 384.493 47.025 Z"},null,8,yM),b("path",{fill:`url(#${i}-g7)`,d:"M 313.875 381.893 C 288.098 381.893 268.627 375.477 253.751 364.466 C 235.099 274.144 249.538 189.083 278.815 128.145 C 290.999 161.58 298.453 349.688 327.158 367.997 C 323.596 376.899 319.308 381.893 313.875 381.893 Z"},null,8,wM)]),b("g",SM,[b("path",{fill:`url(#${i}-g0)`,d:"M 313.875 381.893 C 139.653 381.893 253.533 88.786 126.916 65.199 C 141.046 48.182 160.854 37.738 190.253 36.815 C 311.395 48.025 251.672 276.857 313.875 381.893 Z"},null,8,CM),b("path",{fill:`url(#${i}-g4)`,d:"M 268.085 132.342 C 268.085 132.342 206.404 63.594 126.916 65.199 C 141.046 48.182 160.854 37.738 190.253 36.815 C 238.545 41.284 258.095 80.336 268.085 132.342 Z"},null,8,kM),b("path",{fill:`url(#${i}-g5)`,d:"M 268.085 132.342 C 268.085 132.342 206.404 63.594 126.916 65.199 C 183.216 63.321 231.803 93.322 268.085 132.342 Z"},null,8,AM),b("path",{fill:`url(#${i}-g2)`,d:"M 313.875 381.893 C 262.355 381.893 236.028 356.261 221.227 319.547 C 258.674 349.427 294.501 333.052 294.954 334.741 C 299.608 352.085 305.684 368.063 313.875 381.893 Z"},null,8,MM),b("path",{fill:`url(#${i}-g6)`,d:"M 294.954 334.741 C 271.602 341.74 244.333 340.344 221.227 319.547 C 258.674 349.427 294.501 333.052 294.954 334.741 Z"},null,8,$M),a[12]||(a[12]=b("path",{fill:"rgb(255,255,255)","fill-opacity":"0.11",d:"M 164.386 48.742 C 244.371 44.544 268.345 190.719 268.345 190.719 C 249.39 92.792 222.974 38.013 164.386 48.742 Z"},null,-1))])])],8,tM))}}),Tv=function(e){return e.Horizontal="horizontal",e.Vertical="vertical",e}(Tv||{}),EM={class:"nb-radio__control"},xM=["name","value","checked","disabled","readonly","onChange"],HM={class:"nb-radio__circle"},TM={key:0,class:"nb-radio__dot"},NM={class:"nb-radio__text"},Nv=tt(Ne({__name:"Radio",props:{modelValue:{},options:{},name:{},direction:{default:Tv.Vertical},readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},required:{type:Boolean},id:{default:"radio"},label:{},error:{default:void 0},warning:{default:void 0},helper:{default:void 0}},emits:["update:modelValue"],setup(e){let t=e,i=q(()=>["nb-radio",{"nb-radio--error":!!t.error,"nb-radio--warning":!t.error&&!!t.warning,"nb-radio--disabled":t.disabled,"nb-radio--readonly":t.readonly}]);function n(r){return["nb-radio__option",{"nb-radio__option--disabled":t.disabled||r.disabled,"nb-radio__option--readonly":t.readonly}]}return(r,s)=>(m(),M("div",{class:Le(i.value)},[e.label?(m(),he(pa,{key:0},{default:G(()=>[le(Z(e.label),1)]),_:1})):V("",!0),b("div",{class:Le(["nb-radio__group",`nb-radio__group--${e.direction}`])},[(m(!0),M(Ce,null,Fe(e.options,a=>(m(),M("label",{key:a.value,class:Le(n(a))},[b("span",EM,[b("input",{type:"radio",name:e.name,value:a.value,checked:e.modelValue===a.value,disabled:e.disabled||a.disabled,readonly:e.readonly,class:"nb-radio__input",onChange:l=>!e.readonly&&r.$emit("update:modelValue",a.value)},null,40,xM),b("span",HM,[e.modelValue===a.value?(m(),M("span",TM)):V("",!0)])]),b("span",NM,Z(a.label),1)],2))),128))],2),e.error?(m(),he(at,{key:1,variant:"error",class:"nb-radio__message"},{default:G(()=>[le(Z(e.error),1)]),_:1})):e.warning?(m(),he(at,{key:2,variant:"warning",class:"nb-radio__message"},{default:G(()=>[le(Z(e.warning),1)]),_:1})):e.helper?(m(),he(at,{key:3,variant:"helper",class:"nb-radio__message"},{default:G(()=>[le(Z(e.helper),1)]),_:1})):V("",!0)],2))}}),[["__scopeId","data-v-06b74748"]]),Pv={storageKey:"nubisco.theme",defaultTheme:"system",darkClass:"dark"},Ov="(prefers-color-scheme: dark)",Qs={...Pv},Iv=!1,Hs=null,Lr=K(Pv.defaultTheme),Ac=K("light");function PM(e){return e==="light"||e==="dark"||e==="system"}function OM(){try{if(typeof localStorage>"u")return null;let e=localStorage.getItem(Qs.storageKey);return PM(e)?e:null}catch{return null}}function IM(e){try{if(typeof localStorage>"u")return;localStorage.setItem(Qs.storageKey,e)}catch{}}function RM(){return typeof window>"u"||typeof window.matchMedia!="function"?!1:window.matchMedia(Ov).matches}function dd(){let e=Lr.value==="dark"||Lr.value==="system"&&RM();Ac.value=e?"dark":"light",!(typeof document>"u")&&(document.documentElement.classList.toggle(Qs.darkClass,e),document.documentElement.style.colorScheme=Ac.value)}function VM(){if(Hs==null||Hs(),Hs=null,typeof window>"u"||typeof window.matchMedia!="function")return;let e=window.matchMedia(Ov),t=()=>dd();typeof e.addEventListener=="function"?(e.addEventListener("change",t),Hs=()=>e.removeEventListener("change",t)):typeof e.addListener=="function"&&(e.addListener(t),Hs=()=>e.removeListener(t))}var S0=null;function Rv(){Lr.value=OM()??Qs.defaultTheme,dd(),VM(),S0==null||S0(),S0=Ve(Lr,e=>{IM(e),dd()}),Iv=!0}function DM(e={}){Qs={...Qs,...e},Rv()}function c1(){return Iv||Rv(),{theme:Or(Lr),resolved:Or(Ac),followsSystem:q(()=>Lr.value==="system"),setTheme:e=>{Lr.value=e},toggle:()=>{Lr.value=Ac.value==="dark"?"light":"dark"}}}function ZM(e,t){typeof console<"u"&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}var U6=typeof window<"u",As=(e,t=!1)=>t?Symbol.for(e):Symbol(e),BM=(e,t,i)=>FM({l:e,k:t,s:i}),FM=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),ci=e=>typeof e=="number"&&isFinite(e),Vv=e=>f2(e)==="[object Date]",Mc=e=>f2(e)==="[object RegExp]",u1=e=>mt(e)&&Object.keys(e).length===0,Hi=Object.assign,zM=Object.create,Bt=(e=null)=>zM(e),UM,us=()=>UM||(UM=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:Bt());function W6(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/").replace(/=/g,"=")}function j6(e){return e.replace(/&(?![a-zA-Z0-9#]{2,6};)/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}function WM(e){return e=e.replace(/(\w+)\s*=\s*"([^"]*)"/g,(t,i,n)=>`${i}="${j6(n)}"`),e=e.replace(/(\w+)\s*=\s*'([^']*)'/g,(t,i,n)=>`${i}='${j6(n)}'`),/\s*on\w+\s*=\s*["']?[^"'>]+["']?/gi.test(e)&&(e=e.replace(/(\s+)(on)(\w+\s*=)/gi,"$1on$3")),[/(\s+(?:href|src|action|formaction)\s*=\s*["']?)\s*javascript:/gi,/(style\s*=\s*["'][^"']*url\s*\(\s*)javascript:/gi].forEach(t=>{e=e.replace(t,"$1javascript:")}),e}var jM=Object.prototype.hasOwnProperty;function rn(e,t){return jM.call(e,t)}var ei=Array.isArray,Tt=e=>typeof e=="function",ze=e=>typeof e=="string",Dt=e=>typeof e=="boolean",bt=e=>typeof e=="object"&&!!e,KM=e=>bt(e)&&Tt(e.then)&&Tt(e.catch),Dv=Object.prototype.toString,f2=e=>Dv.call(e),mt=e=>f2(e)==="[object Object]",qM=e=>e==null?"":ei(e)||mt(e)&&e.toString===Dv?JSON.stringify(e,null,2):String(e);function p2(e,t=""){return e.reduce((i,n,r)=>r===0?i+n:i+t+n,"")}var C0=e=>!bt(e)||ei(e);function U0(e,t){if(C0(e)||C0(t))throw Error("Invalid value");let i=[{src:e,des:t}];for(;i.length;){let{src:n,des:r}=i.pop();Object.keys(n).forEach(s=>{s!=="__proto__"&&(bt(n[s])&&!bt(r[s])&&(r[s]=Array.isArray(n[s])?[]:Bt()),C0(r[s])||C0(n[s])?r[s]=n[s]:i.push({src:n[s],des:r[s]}))})}}function GM(e,t,i){return{line:e,column:t,offset:i}}function hd(e,t,i){return{start:e,end:t}}var ft={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14};function d1(e,t,i={}){let{domain:n,messages:r,args:s}=i,a=e,l=SyntaxError(String(a));return l.code=e,t&&(l.location=t),l.domain=n,l}function YM(e){throw e}var Sn=" ",XM="\r",$i=`
|
|
42
|
-
`,JM="\u2028",QM="\u2029";function e$(e){let t=e,i=0,n=1,r=1,s=0,a=L=>t[L]===XM&&t[L+1]===$i,l=L=>t[L]===$i,o=L=>t[L]===QM,c=L=>t[L]===JM,u=L=>a(L)||l(L)||o(L)||c(L),d=()=>i,h=()=>n,f=()=>r,v=()=>s,p=L=>a(L)||o(L)||c(L)?$i:t[L],w=()=>p(i),_=()=>p(i+s);function y(){return s=0,u(i)&&(n++,r=0),a(i)&&i++,i++,r++,t[i]}function C(){return a(i+s)&&s++,s++,t[i+s]}function g(){i=0,n=1,r=1,s=0}function $(L=0){s=L}function E(){let L=i+s;for(;L!==i;)y();s=0}return{index:d,line:h,column:f,peekOffset:v,charAt:p,currentChar:w,currentPeek:_,next:y,peek:C,reset:g,resetPeek:$,skipToPeek:E}}var Yn=void 0,K6="'",t$="tokenizer";function i$(e,t={}){let i=t.location!==!1,n=e$(e),r=()=>n.index(),s=()=>GM(n.line(),n.column(),n.index()),a=s(),l=r(),o={currentType:13,offset:l,startLoc:a,endLoc:a,lastType:13,lastOffset:l,lastStartLoc:a,lastEndLoc:a,braceNest:0,inLinked:!1,text:""},c=()=>o,{onError:u}=t;function d(S,k,D,...P){let R=c();k.column+=D,k.offset+=D,u&&u(d1(S,i?hd(R.startLoc,k):null,{domain:t$,args:P}))}function h(S,k,D){S.endLoc=s(),S.currentType=k;let P={type:k};return i&&(P.loc=hd(S.startLoc,S.endLoc)),D!=null&&(P.value=D),P}let f=S=>h(S,13);function v(S,k){return S.currentChar()===k?(S.next(),k):(d(ft.EXPECTED_TOKEN,s(),0,k),"")}function p(S){let k="";for(;S.currentPeek()===Sn||S.currentPeek()===$i;)k+=S.currentPeek(),S.peek();return k}function w(S){let k=p(S);return S.skipToPeek(),k}function _(S){if(S===Yn)return!1;let k=S.charCodeAt(0);return k>=97&&k<=122||k>=65&&k<=90||k===95}function y(S){if(S===Yn)return!1;let k=S.charCodeAt(0);return k>=48&&k<=57}function C(S,k){let{currentType:D}=k;if(D!==2)return!1;p(S);let P=_(S.currentPeek());return S.resetPeek(),P}function g(S,k){let{currentType:D}=k;if(D!==2)return!1;p(S);let P=y(S.currentPeek()==="-"?S.peek():S.currentPeek());return S.resetPeek(),P}function $(S,k){let{currentType:D}=k;if(D!==2)return!1;p(S);let P=S.currentPeek()===K6;return S.resetPeek(),P}function E(S,k){let{currentType:D}=k;if(D!==7)return!1;p(S);let P=S.currentPeek()===".";return S.resetPeek(),P}function L(S,k){let{currentType:D}=k;if(D!==8)return!1;p(S);let P=_(S.currentPeek());return S.resetPeek(),P}function B(S,k){let{currentType:D}=k;if(!(D===7||D===11))return!1;p(S);let P=S.currentPeek()===":";return S.resetPeek(),P}function T(S,k){let{currentType:D}=k;if(D!==9)return!1;let P=()=>{let I=S.currentPeek();return I==="{"?_(S.peek()):I==="@"||I==="|"||I===":"||I==="."||I===Sn||!I?!1:I===$i?(S.peek(),P()):W(S,!1)},R=P();return S.resetPeek(),R}function X(S){p(S);let k=S.currentPeek()==="|";return S.resetPeek(),k}function W(S,k=!0){let D=(R=!1,I="")=>{let z=S.currentPeek();return z==="{"||z==="@"||!z?R:z==="|"?!(I===Sn||I===$i):z===Sn?(S.peek(),D(!0,Sn)):z===$i?(S.peek(),D(!0,$i)):!0},P=D();return k&&S.resetPeek(),P}function A(S,k){let D=S.currentChar();return D===Yn?Yn:k(D)?(S.next(),D):null}function x(S){let k=S.charCodeAt(0);return k>=97&&k<=122||k>=65&&k<=90||k>=48&&k<=57||k===95||k===36}function F(S){return A(S,x)}function ie(S){let k=S.charCodeAt(0);return k>=97&&k<=122||k>=65&&k<=90||k>=48&&k<=57||k===95||k===36||k===45}function re(S){return A(S,ie)}function ue(S){let k=S.charCodeAt(0);return k>=48&&k<=57}function J(S){return A(S,ue)}function ae(S){let k=S.charCodeAt(0);return k>=48&&k<=57||k>=65&&k<=70||k>=97&&k<=102}function ne(S){return A(S,ae)}function Q(S){let k="",D="";for(;k=J(S);)D+=k;return D}function oe(S){let k="";for(;;){let D=S.currentChar();if(D==="\\"){let P=S.peek();P==="{"||P==="}"||P==="@"||P==="|"||P==="\\"?(k+=D+P,S.next(),S.next()):(S.resetPeek(),k+=D,S.next())}else{if(D==="{"||D==="}"||D==="@"||D==="|"||!D)break;if(D===Sn||D===$i)if(W(S))k+=D,S.next();else{if(X(S))break;k+=D,S.next()}else k+=D,S.next()}}return k}function ve(S){w(S);let k="",D="";for(;k=re(S);)D+=k;let P=S.currentChar();if(P&&P!=="}"&&P!==Yn&&P!==Sn&&P!==$i&&P!==" "){let R=se(S);return d(ft.INVALID_TOKEN_IN_PLACEHOLDER,s(),0,D+R),D+R}return S.currentChar()===Yn&&d(ft.UNTERMINATED_CLOSING_BRACE,s(),0),D}function fe(S){w(S);let k="";return S.currentChar()==="-"?(S.next(),k+=`-${Q(S)}`):k+=Q(S),S.currentChar()===Yn&&d(ft.UNTERMINATED_CLOSING_BRACE,s(),0),k}function pe(S){return S!==K6&&S!==$i}function ye(S){w(S),v(S,"'");let k="",D="";for(;k=A(S,pe);)k==="\\"?D+=U(S):D+=k;let P=S.currentChar();return P===$i||P===Yn?(d(ft.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,s(),0),P===$i&&(S.next(),v(S,"'")),D):(v(S,"'"),D)}function U(S){let k=S.currentChar();switch(k){case"\\":case"'":return S.next(),`\\${k}`;case"u":return _e(S,k,4);case"U":return _e(S,k,6);default:return d(ft.UNKNOWN_ESCAPE_SEQUENCE,s(),0,k),""}}function _e(S,k,D){v(S,k);let P="";for(let R=0;R<D;R++){let I=ne(S);if(!I){d(ft.INVALID_UNICODE_ESCAPE_SEQUENCE,s(),0,`\\${k}${P}${S.currentChar()}`);break}P+=I}return`\\${k}${P}`}function ge(S){return S!=="{"&&S!=="}"&&S!==Sn&&S!==$i}function se(S){w(S);let k="",D="";for(;k=A(S,ge);)D+=k;return D}function H(S){let k="",D="";for(;k=F(S);)D+=k;return D}function N(S){let k=D=>{let P=S.currentChar();return P==="{"||P==="@"||P==="|"||P==="("||P===")"||!P||P===Sn?D:(D+=P,S.next(),k(D))};return k("")}function O(S){w(S);let k=v(S,"|");return w(S),k}function te(S,k){let D=null;switch(S.currentChar()){case"{":return k.braceNest>=1&&d(ft.NOT_ALLOW_NEST_PLACEHOLDER,s(),0),S.next(),D=h(k,2,"{"),w(S),k.braceNest++,D;case"}":return k.braceNest>0&&k.currentType===2&&d(ft.EMPTY_PLACEHOLDER,s(),0),S.next(),D=h(k,3,"}"),k.braceNest--,k.braceNest>0&&w(S),k.inLinked&&k.braceNest===0&&(k.inLinked=!1),D;case"@":return k.braceNest>0&&d(ft.UNTERMINATED_CLOSING_BRACE,s(),0),D=ee(S,k)||f(k),k.braceNest=0,D;default:{let P=!0,R=!0,I=!0;if(X(S))return k.braceNest>0&&d(ft.UNTERMINATED_CLOSING_BRACE,s(),0),D=h(k,1,O(S)),k.braceNest=0,k.inLinked=!1,D;if(k.braceNest>0&&(k.currentType===4||k.currentType===5||k.currentType===6))return d(ft.UNTERMINATED_CLOSING_BRACE,s(),0),k.braceNest=0,me(S,k);if(P=C(S,k))return D=h(k,4,ve(S)),w(S),D;if(R=g(S,k))return D=h(k,5,fe(S)),w(S),D;if(I=$(S,k))return D=h(k,6,ye(S)),w(S),D;if(!P&&!R&&!I)return D=h(k,12,se(S)),d(ft.INVALID_TOKEN_IN_PLACEHOLDER,s(),0,D.value),w(S),D;break}}return D}function ee(S,k){let{currentType:D}=k,P=null,R=S.currentChar();switch((D===7||D===8||D===11||D===9)&&(R===$i||R===Sn)&&d(ft.INVALID_LINKED_FORMAT,s(),0),R){case"@":return S.next(),P=h(k,7,"@"),k.inLinked=!0,P;case".":return w(S),S.next(),h(k,8,".");case":":return w(S),S.next(),h(k,9,":");default:return X(S)?(P=h(k,1,O(S)),k.braceNest=0,k.inLinked=!1,P):E(S,k)||B(S,k)?(w(S),ee(S,k)):L(S,k)?(w(S),h(k,11,H(S))):T(S,k)?(w(S),R==="{"?te(S,k)||P:h(k,10,N(S))):(D===7&&d(ft.INVALID_LINKED_FORMAT,s(),0),k.braceNest=0,k.inLinked=!1,me(S,k))}}function me(S,k){let D={type:13};if(k.braceNest>0)return te(S,k)||f(k);if(k.inLinked)return ee(S,k)||f(k);switch(S.currentChar()){case"{":return te(S,k)||f(k);case"}":return d(ft.UNBALANCED_CLOSING_BRACE,s(),0),S.next(),h(k,3,"}");case"@":return ee(S,k)||f(k);default:if(X(S))return D=h(k,1,O(S)),k.braceNest=0,k.inLinked=!1,D;if(W(S))return h(k,0,oe(S));break}return D}function we(){let{currentType:S,offset:k,startLoc:D,endLoc:P}=o;return o.lastType=S,o.lastOffset=k,o.lastStartLoc=D,o.lastEndLoc=P,o.offset=r(),o.startLoc=s(),n.currentChar()===Yn?h(o,13):me(n,o)}return{nextToken:we,currentOffset:r,currentPosition:s,context:c}}var n$="parser",r$=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g,s$=/\\([\\@{}|])/g;function a$(e,t){return t}function l$(e,t,i){switch(e){case"\\\\":return"\\";case"\\'":return"'";default:{let n=parseInt(t||i,16);return n<=55295||n>=57344?String.fromCodePoint(n):"�"}}}function o$(e={}){let t=e.location!==!1,{onError:i}=e;function n(_,y,C,g,...$){let E=_.currentPosition();E.offset+=g,E.column+=g,i&&i(d1(y,t?hd(C,E):null,{domain:n$,args:$}))}function r(_,y,C){let g={type:_};return t&&(g.start=y,g.end=y,g.loc={start:C,end:C}),g}function s(_,y,C,g){t&&(_.end=y,_.loc&&(_.loc.end=C))}function a(_,y){let C=_.context(),g=r(3,C.offset,C.startLoc);return g.value=y.replace(s$,a$),s(g,_.currentOffset(),_.currentPosition()),g}function l(_,y){let{lastOffset:C,lastStartLoc:g}=_.context(),$=r(5,C,g);return $.index=parseInt(y,10),_.nextToken(),s($,_.currentOffset(),_.currentPosition()),$}function o(_,y){let{lastOffset:C,lastStartLoc:g}=_.context(),$=r(4,C,g);return $.key=y,_.nextToken(),s($,_.currentOffset(),_.currentPosition()),$}function c(_,y){let{lastOffset:C,lastStartLoc:g}=_.context(),$=r(9,C,g);return $.value=y.replace(r$,l$),_.nextToken(),s($,_.currentOffset(),_.currentPosition()),$}function u(_){let y=_.nextToken(),C=_.context(),{lastOffset:g,lastStartLoc:$}=C,E=r(8,g,$);return y.type===11?(y.value??n(_,ft.UNEXPECTED_LEXICAL_ANALYSIS,C.lastStartLoc,0,Cn(y)),E.value=y.value||"",s(E,_.currentOffset(),_.currentPosition()),{node:E}):(n(_,ft.UNEXPECTED_EMPTY_LINKED_MODIFIER,C.lastStartLoc,0),E.value="",s(E,g,$),{nextConsumeToken:y,node:E})}function d(_,y){let C=_.context(),g=r(7,C.offset,C.startLoc);return g.value=y,s(g,_.currentOffset(),_.currentPosition()),g}function h(_){let y=_.context(),C=r(6,y.offset,y.startLoc),g=_.nextToken();if(g.type===8){let $=u(_);C.modifier=$.node,g=$.nextConsumeToken||_.nextToken()}switch(g.type!==9&&n(_,ft.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,Cn(g)),g=_.nextToken(),g.type===2&&(g=_.nextToken()),g.type){case 10:g.value??n(_,ft.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,Cn(g)),C.key=d(_,g.value||"");break;case 4:g.value??n(_,ft.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,Cn(g)),C.key=o(_,g.value||"");break;case 5:g.value??n(_,ft.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,Cn(g)),C.key=l(_,g.value||"");break;case 6:g.value??n(_,ft.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,Cn(g)),C.key=c(_,g.value||"");break;default:{n(_,ft.UNEXPECTED_EMPTY_LINKED_KEY,y.lastStartLoc,0);let $=_.context(),E=r(7,$.offset,$.startLoc);return E.value="",s(E,$.offset,$.startLoc),C.key=E,s(C,$.offset,$.startLoc),{nextConsumeToken:g,node:C}}}return s(C,_.currentOffset(),_.currentPosition()),{node:C}}function f(_){let y=_.context(),C=r(2,y.currentType===1?_.currentOffset():y.offset,y.currentType===1?y.endLoc:y.startLoc);C.items=[];let g=null;do{let $=g||_.nextToken();switch(g=null,$.type){case 0:$.value??n(_,ft.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,Cn($)),C.items.push(a(_,$.value||""));break;case 5:$.value??n(_,ft.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,Cn($)),C.items.push(l(_,$.value||""));break;case 4:$.value??n(_,ft.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,Cn($)),C.items.push(o(_,$.value||""));break;case 6:$.value??n(_,ft.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,Cn($)),C.items.push(c(_,$.value||""));break;case 7:{let E=h(_);C.items.push(E.node),g=E.nextConsumeToken||null;break}}}while(y.currentType!==13&&y.currentType!==1);return s(C,y.currentType===1?y.lastOffset:_.currentOffset(),y.currentType===1?y.lastEndLoc:_.currentPosition()),C}function v(_,y,C,g){let $=_.context(),E=g.items.length===0,L=r(1,y,C);L.cases=[],L.cases.push(g);do{let B=f(_);E||(E=B.items.length===0),L.cases.push(B)}while($.currentType!==13);return E&&n(_,ft.MUST_HAVE_MESSAGES_IN_PLURAL,C,0),s(L,_.currentOffset(),_.currentPosition()),L}function p(_){let y=_.context(),{offset:C,startLoc:g}=y,$=f(_);return y.currentType===13?$:v(_,C,g,$)}function w(_){let y=i$(_,Hi({},e)),C=y.context(),g=r(0,C.offset,C.startLoc);return t&&g.loc&&(g.loc.source=_),g.body=p(y),e.onCacheKey&&(g.cacheKey=e.onCacheKey(_)),C.currentType!==13&&n(y,ft.UNEXPECTED_LEXICAL_ANALYSIS,C.lastStartLoc,0,_[C.offset]||""),s(g,y.currentOffset(),y.currentPosition()),g}return{parse:w}}function Cn(e){if(e.type===13)return"EOF";let t=(e.value||"").replace(/\r?\n/gu,"\\n");return t.length>10?t.slice(0,9)+"…":t}function c$(e,t={}){let i={ast:e,helpers:new Set};return{context:()=>i,helper:n=>(i.helpers.add(n),n)}}function q6(e,t){for(let i=0;i<e.length;i++)_2(e[i],t)}function _2(e,t){switch(e.type){case 1:q6(e.cases,t),t.helper("plural");break;case 2:q6(e.items,t);break;case 6:_2(e.key,t),t.helper("linked"),t.helper("type");break;case 5:t.helper("interpolate"),t.helper("list");break;case 4:t.helper("interpolate"),t.helper("named");break}}function u$(e,t={}){let i=c$(e);i.helper("normalize"),e.body&&_2(e.body,i);let n=i.context();e.helpers=Array.from(n.helpers)}function d$(e){let t=e.body;return t.type===2?G6(t):t.cases.forEach(i=>G6(i)),e}function G6(e){if(e.items.length===1){let t=e.items[0];(t.type===3||t.type===9)&&(e.static=t.value,delete t.value)}else{let t=[];for(let i=0;i<e.items.length;i++){let n=e.items[i];if(!(n.type===3||n.type===9)||n.value==null)break;t.push(n.value)}if(t.length===e.items.length){e.static=p2(t);for(let i=0;i<e.items.length;i++){let n=e.items[i];(n.type===3||n.type===9)&&delete n.value}}}}function Vs(e){switch(e.t=e.type,e.type){case 0:{let t=e;Vs(t.body),t.b=t.body,delete t.body;break}case 1:{let t=e,i=t.cases;for(let n=0;n<i.length;n++)Vs(i[n]);t.c=i,delete t.cases;break}case 2:{let t=e,i=t.items;for(let n=0;n<i.length;n++)Vs(i[n]);t.i=i,delete t.items,t.static&&(t.s=t.static,delete t.static);break}case 3:case 9:case 8:case 7:{let t=e;t.value&&(t.v=t.value,delete t.value);break}case 6:{let t=e;Vs(t.key),t.k=t.key,delete t.key,t.modifier&&(Vs(t.modifier),t.m=t.modifier,delete t.modifier);break}case 5:{let t=e;t.i=t.index,delete t.index;break}case 4:{let t=e;t.k=t.key,delete t.key;break}}delete e.type}function h$(e,t){let{filename:i,breakLineCode:n,needIndent:r}=t,s=t.location!==!1,a={filename:i,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:n,needIndent:r,indentLevel:0};s&&e.loc&&(a.source=e.loc.source);let l=()=>a;function o(f,v){a.code+=f}function c(f,v=!0){let p=v?n:"";o(r?p+" ".repeat(f):p)}function u(f=!0){let v=++a.indentLevel;f&&c(v)}function d(f=!0){let v=--a.indentLevel;f&&c(v)}function h(){c(a.indentLevel)}return{context:l,push:o,indent:u,deindent:d,newline:h,helper:f=>`_${f}`,needIndent:()=>a.needIndent}}function f$(e,t){let{helper:i}=e;e.push(`${i("linked")}(`),ea(e,t.key),t.modifier?(e.push(", "),ea(e,t.modifier),e.push(", _type")):e.push(", undefined, _type"),e.push(")")}function p$(e,t){let{helper:i,needIndent:n}=e;e.push(`${i("normalize")}([`),e.indent(n());let r=t.items.length;for(let s=0;s<r&&(ea(e,t.items[s]),s!==r-1);s++)e.push(", ");e.deindent(n()),e.push("])")}function _$(e,t){let{helper:i,needIndent:n}=e;if(t.cases.length>1){e.push(`${i("plural")}([`),e.indent(n());let r=t.cases.length;for(let s=0;s<r&&(ea(e,t.cases[s]),s!==r-1);s++)e.push(", ");e.deindent(n()),e.push("])")}}function m$(e,t){t.body?ea(e,t.body):e.push("null")}function ea(e,t){let{helper:i}=e;switch(t.type){case 0:m$(e,t);break;case 1:_$(e,t);break;case 2:p$(e,t);break;case 6:f$(e,t);break;case 8:e.push(JSON.stringify(t.value),t);break;case 7:e.push(JSON.stringify(t.value),t);break;case 5:e.push(`${i("interpolate")}(${i("list")}(${t.index}))`,t);break;case 4:e.push(`${i("interpolate")}(${i("named")}(${JSON.stringify(t.key)}))`,t);break;case 9:e.push(JSON.stringify(t.value),t);break;case 3:e.push(JSON.stringify(t.value),t);break}}var v$=(e,t={})=>{let i=ze(t.mode)?t.mode:"normal",n=ze(t.filename)?t.filename:"message.intl";t.sourceMap;let r=t.breakLineCode==null?i==="arrow"?";":`
|
|
43
|
-
`:t.breakLineCode,s=t.needIndent?t.needIndent:i!=="arrow",a=e.helpers||[],l=h$(e,{filename:n,breakLineCode:r,needIndent:s});l.push(i==="normal"?"function __msg__ (ctx) {":"(ctx) => {"),l.indent(s),a.length>0&&(l.push(`const { ${p2(a.map(u=>`${u}: _${u}`),", ")} } = ctx`),l.newline()),l.push("return "),ea(l,e),l.deindent(s),l.push("}"),delete e.helpers;let{code:o,map:c}=l.context();return{ast:e,code:o,map:c?c.toJSON():void 0}};function g$(e,t={}){let i=Hi({},t),n=!!i.jit,r=!!i.minify,s=i.optimize==null?!0:i.optimize,a=o$(i).parse(e);return n?(s&&d$(a),r&&Vs(a),{ast:a,code:""}):(u$(a,i),v$(a,i))}function b$(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(us().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(us().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}function Vn(e){return bt(e)&&m2(e)===0&&(rn(e,"b")||rn(e,"body"))}var Zv=["b","body"];function y$(e){return jr(e,Zv)}var Bv=["c","cases"];function w$(e){return jr(e,Bv,[])}var Fv=["s","static"];function S$(e){return jr(e,Fv)}var zv=["i","items"];function C$(e){return jr(e,zv,[])}var Uv=["t","type"];function m2(e){return jr(e,Uv)}var Wv=["v","value"];function k0(e,t){let i=jr(e,Wv);if(i!=null)return i;throw To(t)}var jv=["m","modifier"];function k$(e){return jr(e,jv)}var Kv=["k","key"];function A$(e){let t=jr(e,Kv);if(t)return t;throw To(6)}function jr(e,t,i){for(let n=0;n<t.length;n++){let r=t[n];if(rn(e,r)&&e[r]!=null)return e[r]}return i}var qv=[...Zv,...Bv,...Fv,...zv,...Kv,...jv,...Wv,...Uv];function To(e){return Error(`unhandled node type: ${e}`)}function q1(e){return t=>M$(t,e)}function M$(e,t){let i=y$(t);if(i==null)throw To(0);if(m2(i)===1){let n=w$(i);return e.plural(n.reduce((r,s)=>[...r,Y6(e,s)],[]))}else return Y6(e,i)}function Y6(e,t){let i=S$(t);if(i!=null)return e.type==="text"?i:e.normalize([i]);{let n=C$(t).reduce((r,s)=>[...r,fd(e,s)],[]);return e.normalize(n)}}function fd(e,t){let i=m2(t);switch(i){case 3:return k0(t,i);case 9:return k0(t,i);case 4:{let n=t;if(rn(n,"k")&&n.k)return e.interpolate(e.named(n.k));if(rn(n,"key")&&n.key)return e.interpolate(e.named(n.key));throw To(i)}case 5:{let n=t;if(rn(n,"i")&&ci(n.i))return e.interpolate(e.list(n.i));if(rn(n,"index")&&ci(n.index))return e.interpolate(e.list(n.index));throw To(i)}case 6:{let n=t,r=k$(n),s=A$(n);return e.linked(fd(e,s),r?fd(e,r):void 0,e.type)}case 7:return k0(t,i);case 8:return k0(t,i);default:throw Error(`unhandled node on format message part: ${i}`)}}var $$=e=>e,A0=Bt();function L$(e,t={}){let i=!1,n=t.onError||YM;return t.onError=r=>{i=!0,n(r)},{...g$(e,t),detectError:i}}function E$(e,t){if(!__INTLIFY_DROP_MESSAGE_COMPILER__&&ze(e)){Dt(t.warnHtmlMessage)&&t.warnHtmlMessage;let i=(t.onCacheKey||$$)(e),n=A0[i];if(n)return n;let{ast:r,detectError:s}=L$(e,{...t,location:!1,jit:!0}),a=q1(r);return s?a:A0[i]=a}else{let i=e.cacheKey;return i?A0[i]||(A0[i]=q1(e)):q1(e)}}var No=null;function x$(e){No=e}function H$(e,t,i){No&&No.emit("i18n:init",{timestamp:Date.now(),i18n:e,version:t,meta:i})}var T$=N$("function:translate");function N$(e){return t=>No&&No.emit(e,t)}var ar={INVALID_ARGUMENT:17,INVALID_DATE_ARGUMENT:18,INVALID_ISO_DATE_ARGUMENT:19,NOT_SUPPORT_LOCALE_PROMISE_VALUE:21,NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:22,NOT_SUPPORT_LOCALE_TYPE:23};function lr(e){return d1(e,null,void 0)}function v2(e,t){return t.locale==null?X6(e.locale):X6(t.locale)}var G1;function X6(e){if(ze(e))return e;if(Tt(e)){if(e.resolvedOnce&&G1!=null)return G1;if(e.constructor.name==="Function"){let t=e();if(KM(t))throw lr(ar.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return G1=t}else throw lr(ar.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw lr(ar.NOT_SUPPORT_LOCALE_TYPE)}function P$(e,t,i){return[...new Set([i,...ei(t)?t:bt(t)?Object.keys(t):ze(t)?[t]:[i]])]}function pd(e,t,i){let n=ze(i)?i:$c,r=e;r.__localeChainCache||(r.__localeChainCache=new Map);let s=r.__localeChainCache.get(n);if(!s){s=[];let a=[i];for(;ei(a);)a=J6(s,a,t);let l=ei(t)||!mt(t)?t:t.default?t.default:null;a=ze(l)?[l]:l,ei(a)&&J6(s,a,!1),r.__localeChainCache.set(n,s)}return s}function J6(e,t,i){let n=!0;for(let r=0;r<t.length&&Dt(n);r++){let s=t[r];ze(s)&&(n=O$(e,t[r],i))}return n}function O$(e,t,i){let n,r=t.split("-");do n=I$(e,r.join("-"),i),r.splice(-1,1);while(r.length&&n===!0);return n}function I$(e,t,i){let n=!1;if(!e.includes(t)&&(n=!0,t)){n=t[t.length-1]!=="!";let r=t.replace(/!/g,"");e.push(r),(ei(i)||mt(i))&&i[r]&&(n=i[r])}return n}var kr=[];kr[0]={w:[0],i:[3,0],"[":[4],o:[7]},kr[1]={w:[1],".":[2],"[":[4],o:[7]},kr[2]={w:[2],i:[3,0],0:[3,0]},kr[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},kr[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},kr[5]={"'":[4,0],o:8,l:[5,0]},kr[6]={'"':[4,0],o:8,l:[6,0]};var R$=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function V$(e){return R$.test(e)}function D$(e){let t=e.charCodeAt(0);return t===e.charCodeAt(e.length-1)&&(t===34||t===39)?e.slice(1,-1):e}function Z$(e){if(e==null)return"o";switch(e.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return e;case 95:case 36:case 45:return"i";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"w"}return"i"}function B$(e){let t=e.trim();return e.charAt(0)==="0"&&isNaN(parseInt(e))?!1:V$(t)?D$(t):"*"+t}function F$(e){let t=[],i=-1,n=0,r=0,s,a,l,o,c,u,d,h=[];h[0]=()=>{a===void 0?a=l:a+=l},h[1]=()=>{a!==void 0&&(t.push(a),a=void 0)},h[2]=()=>{h[0](),r++},h[3]=()=>{if(r>0)r--,n=4,h[0]();else{if(r=0,a===void 0||(a=B$(a),a===!1))return!1;h[1]()}};function f(){let v=e[i+1];if(n===5&&v==="'"||n===6&&v==='"')return i++,l="\\"+v,h[0](),!0}for(;n!==null;)if(i++,s=e[i],!(s==="\\"&&f())){if(o=Z$(s),d=kr[n],c=d[o]||d.l||8,c===8||(n=c[0],c[1]!==void 0&&(u=h[c[1]],u&&(l=s,u()===!1))))return;if(n===7)return t}}var Q6=new Map;function z$(e,t){return bt(e)?e[t]:null}function U$(e,t){if(!bt(e))return null;let i=Q6.get(t);if(i||(i=F$(t),i&&Q6.set(t,i)),!i)return null;let n=i.length,r=e,s=0;for(;s<n;){let a=i[s];if(qv.includes(a)&&Vn(r)||!bt(r)||!rn(r,a))return null;let l=r[a];if(l===void 0||Tt(r))return null;r=l,s++}return r}var W$="11.3.0",$c="en-US",e8=e=>`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;function j$(){return{upper:(e,t)=>t==="text"&&ze(e)?e.toUpperCase():t==="vnode"&&bt(e)&&"__v_isVNode"in e?e.children.toUpperCase():e,lower:(e,t)=>t==="text"&&ze(e)?e.toLowerCase():t==="vnode"&&bt(e)&&"__v_isVNode"in e?e.children.toLowerCase():e,capitalize:(e,t)=>t==="text"&&ze(e)?e8(e):t==="vnode"&&bt(e)&&"__v_isVNode"in e?e8(e.children):e}}var Gv;function K$(e){Gv=e}var Yv;function q$(e){Yv=e}var Xv;function G$(e){Xv=e}var Jv=null,t8=e=>{Jv=e},Y$=()=>Jv,i8=0;function X$(e={}){let t=Tt(e.onWarn)?e.onWarn:ZM,i=ze(e.version)?e.version:W$,n=ze(e.locale)||Tt(e.locale)?e.locale:$c,r=Tt(n)?$c:n,s=ei(e.fallbackLocale)||mt(e.fallbackLocale)||ze(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:r,a=mt(e.messages)?e.messages:Y1(r),l=mt(e.datetimeFormats)?e.datetimeFormats:Y1(r),o=mt(e.numberFormats)?e.numberFormats:Y1(r),c=Hi(Bt(),e.modifiers,j$()),u=e.pluralRules||Bt(),d=Tt(e.missing)?e.missing:null,h=Dt(e.missingWarn)||Mc(e.missingWarn)?e.missingWarn:!0,f=Dt(e.fallbackWarn)||Mc(e.fallbackWarn)?e.fallbackWarn:!0,v=!!e.fallbackFormat,p=!!e.unresolving,w=Tt(e.postTranslation)?e.postTranslation:null,_=mt(e.processor)?e.processor:null,y=Dt(e.warnHtmlMessage)?e.warnHtmlMessage:!0,C=!!e.escapeParameter,g=Tt(e.messageCompiler)?e.messageCompiler:Gv,$=Tt(e.messageResolver)?e.messageResolver:Yv||z$,E=Tt(e.localeFallbacker)?e.localeFallbacker:Xv||P$,L=bt(e.fallbackContext)?e.fallbackContext:void 0,B=e,T=bt(B.__datetimeFormatters)?B.__datetimeFormatters:new Map,X=bt(B.__numberFormatters)?B.__numberFormatters:new Map,W=bt(B.__meta)?B.__meta:{};i8++;let A={version:i,cid:i8,locale:n,fallbackLocale:s,messages:a,modifiers:c,pluralRules:u,missing:d,missingWarn:h,fallbackWarn:f,fallbackFormat:v,unresolving:p,postTranslation:w,processor:_,warnHtmlMessage:y,escapeParameter:C,messageCompiler:g,messageResolver:$,localeFallbacker:E,fallbackContext:L,onWarn:t,__meta:W};return A.datetimeFormats=l,A.numberFormats=o,A.__datetimeFormatters=T,A.__numberFormatters=X,__INTLIFY_PROD_DEVTOOLS__&&H$(A,i,W),A}var Y1=e=>({[e]:Bt()});function g2(e,t,i,n,r){let{missing:s,onWarn:a}=e;if(s!==null){let l=s(e,i,t,r);return ze(l)?l:t}else return t}function Rl(e,t,i){let n=e;n.__localeChainCache=new Map,e.localeFallbacker(e,i,t)}function J$(e,t){return e===t?!1:e.split("-")[0]===t.split("-")[0]}function Q$(e,t){let i=t.indexOf(e);if(i===-1)return!1;for(let n=i+1;n<t.length;n++)if(J$(e,t[n]))return!0;return!1}function n8(e,...t){let{datetimeFormats:i,unresolving:n,fallbackLocale:r,onWarn:s,localeFallbacker:a}=e,{__datetimeFormatters:l}=e;if(!ze(t[0])&&!Vv(t[0])&&!ci(t[0]))return"";let[o,c,u,d]=_d(...t),h=Dt(u.missingWarn)?u.missingWarn:e.missingWarn;Dt(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn;let f=!!u.part,v=v2(e,u),p=a(e,r,v);if(!ze(o)||o==="")return new Intl.DateTimeFormat(v.replace(/!/g,""),d).format(c);let w={},_,y=null,C="datetime format";for(let E=0;E<p.length&&(_=p[E],w=i[_]||{},y=w[o],!mt(y));E++)g2(e,o,_,h,C);if(!mt(y)||!ze(_))return n?-1:o;let g=`${_}__${o}`;u1(d)||(g=`${g}__${JSON.stringify(d)}`);let $=l.get(g);return $||($=new Intl.DateTimeFormat(_,Hi({},y,d)),l.set(g,$)),f?$.formatToParts(c):$.format(c)}var eL=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function _d(...e){let[t,i,n,r]=e,s=Bt(),a=Bt(),l;if(ze(t)){let o=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!o)throw lr(ar.INVALID_ISO_DATE_ARGUMENT);let c=o[3]?o[3].trim().startsWith("T")?`${o[1].trim()}${o[3].trim()}`:`${o[1].trim()}T${o[3].trim()}`:o[1].trim();l=new Date(c);try{l.toISOString()}catch{throw lr(ar.INVALID_ISO_DATE_ARGUMENT)}}else if(Vv(t)){if(isNaN(t.getTime()))throw lr(ar.INVALID_DATE_ARGUMENT);l=t}else if(ci(t))l=t;else throw lr(ar.INVALID_ARGUMENT);return ze(i)?s.key=i:mt(i)&&Object.keys(i).forEach(o=>{eL.includes(o)?a[o]=i[o]:s[o]=i[o]}),ze(n)?s.locale=n:mt(n)&&(a=n),mt(r)&&(a=r),[s.key||"",l,s,a]}function r8(e,t,i){let n=e;for(let r in i){let s=`${t}__${r}`;n.__datetimeFormatters.has(s)&&n.__datetimeFormatters.delete(s)}}function s8(e,...t){let{numberFormats:i,unresolving:n,fallbackLocale:r,onWarn:s,localeFallbacker:a}=e,{__numberFormatters:l}=e;if(!ci(t[0]))return"";let[o,c,u,d]=md(...t),h=Dt(u.missingWarn)?u.missingWarn:e.missingWarn;Dt(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn;let f=!!u.part,v=v2(e,u),p=a(e,r,v);if(!ze(o)||o==="")return new Intl.NumberFormat(v.replace(/!/g,""),d).format(c);let w={},_,y=null,C="number format";for(let E=0;E<p.length&&(_=p[E],w=i[_]||{},y=w[o],!mt(y));E++)g2(e,o,_,h,C);if(!mt(y)||!ze(_))return n?-1:o;let g=`${_}__${o}`;u1(d)||(g=`${g}__${JSON.stringify(d)}`);let $=l.get(g);return $||($=new Intl.NumberFormat(_,Hi({},y,d)),l.set(g,$)),f?$.formatToParts(c):$.format(c)}var tL=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function md(...e){let[t,i,n,r]=e,s=Bt(),a=Bt();if(!ci(t))throw lr(ar.INVALID_ARGUMENT);let l=t;return ze(i)?s.key=i:mt(i)&&Object.keys(i).forEach(o=>{tL.includes(o)?a[o]=i[o]:s[o]=i[o]}),ze(n)?s.locale=n:mt(n)&&(a=n),mt(r)&&(a=r),[s.key||"",l,s,a]}function a8(e,t,i){let n=e;for(let r in i){let s=`${t}__${r}`;n.__numberFormatters.has(s)&&n.__numberFormatters.delete(s)}}var iL=e=>e,nL=e=>"",rL="text",sL=e=>e.length===0?"":p2(e),aL=qM;function X1(e,t){return e=Math.abs(e),t===2?e===1?0:1:Math.min(e,2)}function lL(e){var i,n;let t=ci(e.pluralIndex)?e.pluralIndex:-1;return ci((i=e.named)==null?void 0:i.count)?e.named.count:ci((n=e.named)==null?void 0:n.n)?e.named.n:t}function oL(e={}){var p,w,_,y;let t=e.locale,i=lL(e),n=ze(t)&&Tt((p=e.pluralRules)==null?void 0:p[t])?e.pluralRules[t]:X1,r=n===X1?void 0:X1,s=C=>C[n(i,C.length,r)],a=e.list||[],l=C=>a[C],o=e.named||Bt();ci(e.pluralIndex)&&(o.count||(o.count=e.pluralIndex),o.n||(o.n=e.pluralIndex));let c=C=>o[C];function u(C,g){return(Tt(e.messages)?e.messages(C,!!g):bt(e.messages)?e.messages[C]:!1)||(e.parent?e.parent.message(C):nL)}let d=C=>e.modifiers?e.modifiers[C]:iL,h=Tt((w=e.processor)==null?void 0:w.normalize)?e.processor.normalize:sL,f=Tt((_=e.processor)==null?void 0:_.interpolate)?e.processor.interpolate:aL,v={list:l,named:c,plural:s,linked:(C,...g)=>{let[$,E]=g,L="text",B="";g.length===1?bt($)?(B=$.modifier||B,L=$.type||L):ze($)&&(B=$||B):g.length===2&&(ze($)&&(B=$||B),ze(E)&&(L=E||L));let T=u(C,!0)(v),X=T===""||T===void 0?C:T,W=L==="vnode"&&ei(X)&&B?X[0]:X;return B?d(B)(W,L):W},message:u,type:ze((y=e.processor)==null?void 0:y.type)?e.processor.type:rL,interpolate:f,normalize:h,values:Hi(Bt(),a,o)};return v}var l8=()=>"",fn=e=>Tt(e);function o8(e,...t){let{fallbackFormat:i,postTranslation:n,unresolving:r,messageCompiler:s,fallbackLocale:a,messages:l}=e,[o,c]=vd(...t),u=Dt(c.missingWarn)?c.missingWarn:e.missingWarn,d=Dt(c.fallbackWarn)?c.fallbackWarn:e.fallbackWarn,h=Dt(c.escapeParameter)?c.escapeParameter:e.escapeParameter,f=!!c.resolvedMessage,v=ze(c.default)||Dt(c.default)?Dt(c.default)?s?o:()=>o:c.default:i?s?o:()=>o:null,p=i||v!=null&&(ze(v)||Tt(v)),w=v2(e,c);h&&cL(c);let[_,y,C]=f?[o,w,l[w]||Bt()]:Qv(e,o,w,a,d,u),g=_,$=o;if(!f&&!(ze(g)||Vn(g)||fn(g))&&p&&(g=v,$=g),!f&&(!(ze(g)||Vn(g)||fn(g))||!ze(y)))return r?-1:o;let E=!1,L=fn(g)?g:eg(e,o,y,g,$,()=>{E=!0});if(E)return g;let B=uL(e,L,oL(hL(e,y,C,c))),T=n?n(B,o):B;if(h&&ze(T)&&(T=WM(T)),__INTLIFY_PROD_DEVTOOLS__){let X={timestamp:Date.now(),key:ze(o)?o:fn(g)?g.key:"",locale:y||(fn(g)?g.locale:""),format:ze(g)?g:fn(g)?g.source:"",message:T};X.meta=Hi({},e.__meta,{}),T$(X)}return T}function cL(e){ei(e.list)?e.list=e.list.map(t=>ze(t)?W6(t):t):bt(e.named)&&Object.keys(e.named).forEach(t=>{ze(e.named[t])&&(e.named[t]=W6(e.named[t]))})}function Qv(e,t,i,n,r,s){let{messages:a,onWarn:l,messageResolver:o,localeFallbacker:c}=e,u=c(e,n,i),d=Bt(),h,f=null,v="translate";for(let p=0;p<u.length&&(h=u[p],d=a[h]||Bt(),(f=o(d,t))===null&&(f=d[t]),!(ze(f)||Vn(f)||fn(f)));p++)if(!Q$(h,u)){let w=g2(e,t,h,s,v);w!==t&&(f=w)}return[f,h,d]}function eg(e,t,i,n,r,s){let{messageCompiler:a,warnHtmlMessage:l}=e;if(fn(n)){let c=n;return c.locale=c.locale||i,c.key=c.key||t,c}if(a==null){let c=()=>n;return c.locale=i,c.key=t,c}let o=a(n,dL(e,i,r,n,l,s));return o.locale=i,o.key=t,o.source=n,o}function uL(e,t,i){return t(i)}function vd(...e){let[t,i,n]=e,r=Bt();if(!ze(t)&&!ci(t)&&!fn(t)&&!Vn(t))throw lr(ar.INVALID_ARGUMENT);let s=ci(t)?String(t):t;return ci(i)?r.plural=i:ze(i)?r.default=i:mt(i)&&!u1(i)?r.named=i:ei(i)&&(r.list=i),ci(n)?r.plural=n:ze(n)?r.default=n:mt(n)&&Hi(r,n),[s,r]}function dL(e,t,i,n,r,s){return{locale:t,key:i,warnHtmlMessage:r,onError:a=>{throw s&&s(a),a},onCacheKey:a=>BM(t,i,a)}}function hL(e,t,i,n){let{modifiers:r,pluralRules:s,messageResolver:a,fallbackLocale:l,fallbackWarn:o,missingWarn:c,fallbackContext:u}=e,d={locale:t,modifiers:r,pluralRules:s,messages:(h,f)=>{let v=a(i,h);if(v==null&&(u||f)){let[,,p]=Qv(u||e,h,t,l,o,c);v=a(p,h)}if(ze(v)||Vn(v)){let p=!1,w=eg(e,h,t,v,h,()=>{p=!0});return p?l8:w}else return fn(v)?v:l8}};return e.processor&&(d.processor=e.processor),n.list&&(d.list=n.list),n.named&&(d.named=n.named),ci(n.plural)&&(d.pluralIndex=n.plural),d}b$();var fL="11.3.0";function pL(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(us().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(us().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(us().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(us().__INTLIFY_PROD_DEVTOOLS__=!1)}var ta={UNEXPECTED_RETURN_TYPE:24,INVALID_ARGUMENT:25,MUST_BE_CALL_SETUP_TOP:26,NOT_INSTALLED:27,NOT_INSTALLED_WITH_PROVIDE:31,UNEXPECTED_ERROR:32};function Po(e,...t){return d1(e,null,void 0)}var c8=As("__translateVNode"),u8=As("__datetimeParts"),d8=As("__numberParts"),_L=As("__setPluralRules"),tg=As("__injectWithOption"),gd=As("__dispose");function Oo(e){if(!bt(e)||Vn(e))return e;for(let t in e)if(rn(e,t))if(!t.includes("."))bt(e[t])&&Oo(e[t]);else{let i=t.split("."),n=i.length-1,r=e,s=!1;for(let a=0;a<n;a++){if(i[a]==="__proto__")throw Error(`unsafe key: ${i[a]}`);if(i[a]in r||(r[i[a]]=Bt()),!bt(r[i[a]])){s=!0;break}r=r[i[a]]}if(s||(Vn(r)?qv.includes(i[n])||delete e[t]:(r[i[n]]=e[t],delete e[t])),!Vn(r)){let a=r[i[n]];bt(a)&&Oo(a)}}return e}function ig(e,t){let{messages:i,__i18n:n,messageResolver:r,flatJson:s}=t,a=mt(i)?i:ei(n)?Bt():{[e]:Bt()};if(ei(n)&&n.forEach(l=>{if("locale"in l&&"resource"in l){let{locale:o,resource:c}=l;o?(a[o]=a[o]||Bt(),U0(c,a[o])):U0(c,a)}else ze(l)&&U0(JSON.parse(l),a)}),r==null&&s)for(let l in a)rn(a,l)&&Oo(a[l]);return a}function mL(e){return e.type}function vL(e,t,i){let n=bt(t.messages)?t.messages:Bt();"__i18nGlobal"in i&&(n=ig(e.locale.value,{messages:n,__i18n:i.__i18nGlobal}));let r=Object.keys(n);if(r.length&&r.forEach(s=>{e.mergeLocaleMessage(s,n[s])}),bt(t.datetimeFormats)){let s=Object.keys(t.datetimeFormats);s.length&&s.forEach(a=>{e.mergeDateTimeFormat(a,t.datetimeFormats[a])})}if(bt(t.numberFormats)){let s=Object.keys(t.numberFormats);s.length&&s.forEach(a=>{e.mergeNumberFormat(a,t.numberFormats[a])})}}function h8(e){return j(Br,null,e,0)}function ng(){return Si()}var f8=()=>[],gL=()=>!1,p8=0;function _8(e){return(t,i,n,r)=>e(i,n,ng()||void 0,r)}function bL(e={}){let{__root:t,__injectWithOption:i}=e,n=t===void 0,r=e.flatJson,s=U6?K:zn,a=Dt(e.inheritLocale)?e.inheritLocale:!0,l=s(t&&a?t.locale.value:ze(e.locale)?e.locale:$c),o=s(t&&a?t.fallbackLocale.value:ze(e.fallbackLocale)||ei(e.fallbackLocale)||mt(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:l.value),c=s(ig(l.value,e)),u=s(mt(e.datetimeFormats)?e.datetimeFormats:{[l.value]:{}}),d=s(mt(e.numberFormats)?e.numberFormats:{[l.value]:{}}),h=t?t.missingWarn:Dt(e.missingWarn)||Mc(e.missingWarn)?e.missingWarn:!0,f=t?t.fallbackWarn:Dt(e.fallbackWarn)||Mc(e.fallbackWarn)?e.fallbackWarn:!0,v=t?t.fallbackRoot:Dt(e.fallbackRoot)?e.fallbackRoot:!0,p=!!e.fallbackFormat,w=Tt(e.missing)?e.missing:null,_=Tt(e.missing)?_8(e.missing):null,y=Tt(e.postTranslation)?e.postTranslation:null,C=t?t.warnHtmlMessage:Dt(e.warnHtmlMessage)?e.warnHtmlMessage:!0,g=!!e.escapeParameter,$=t?t.modifiers:mt(e.modifiers)?e.modifiers:{},E=e.pluralRules||t&&t.pluralRules,L;L=(()=>{n&&t8(null);let R={version:fL,locale:l.value,fallbackLocale:o.value,messages:c.value,modifiers:$,pluralRules:E,missing:_===null?void 0:_,missingWarn:h,fallbackWarn:f,fallbackFormat:p,unresolving:!0,postTranslation:y===null?void 0:y,warnHtmlMessage:C,escapeParameter:g,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:"vue"}};R.datetimeFormats=u.value,R.numberFormats=d.value,R.__datetimeFormatters=mt(L)?L.__datetimeFormatters:void 0,R.__numberFormatters=mt(L)?L.__numberFormatters:void 0;let I=X$(R);return n&&t8(I),I})(),Rl(L,l.value,o.value);function B(){return[l.value,o.value,c.value,u.value,d.value]}let T=q({get:()=>l.value,set:R=>{L.locale=R,l.value=R}}),X=q({get:()=>o.value,set:R=>{L.fallbackLocale=R,o.value=R,Rl(L,l.value,R)}}),W=q(()=>c.value),A=q(()=>u.value),x=q(()=>d.value);function F(){return Tt(y)?y:null}function ie(R){y=R,L.postTranslation=R}function re(){return w}function ue(R){R!==null&&(_=_8(R)),w=R,L.missing=_}let J=(R,I,z,Y,Se,Me)=>{B();let De;try{__INTLIFY_PROD_DEVTOOLS__,n||(L.fallbackContext=t?Y$():void 0),De=R(L)}finally{__INTLIFY_PROD_DEVTOOLS__,n||(L.fallbackContext=void 0)}if(z!=="translate exists"&&ci(De)&&De===-1||z==="translate exists"&&!De){let[Xe,Te]=I();return t&&v?Y(t):Se(Xe)}else{if(Me(De))return De;throw Po(ta.UNEXPECTED_RETURN_TYPE)}};function ae(...R){return J(I=>Reflect.apply(o8,null,[I,...R]),()=>vd(...R),"translate",I=>Reflect.apply(I.t,I,[...R]),I=>I,I=>ze(I))}function ne(...R){let[I,z,Y]=R;if(Y&&!bt(Y))throw Po(ta.INVALID_ARGUMENT);return ae(I,z,Hi({resolvedMessage:!0},Y||{}))}function Q(...R){return J(I=>Reflect.apply(n8,null,[I,...R]),()=>_d(...R),"datetime format",I=>Reflect.apply(I.d,I,[...R]),()=>"",I=>ze(I)||ei(I))}function oe(...R){return J(I=>Reflect.apply(s8,null,[I,...R]),()=>md(...R),"number format",I=>Reflect.apply(I.n,I,[...R]),()=>"",I=>ze(I)||ei(I))}function ve(R){return R.map(I=>ze(I)||ci(I)||Dt(I)?h8(String(I)):I)}let fe={normalize:ve,interpolate:R=>R,type:"vnode"};function pe(...R){return J(I=>{let z,Y=I;try{Y.processor=fe,z=Reflect.apply(o8,null,[Y,...R])}finally{Y.processor=null}return z},()=>vd(...R),"translate",I=>I[c8](...R),I=>[h8(I)],I=>ei(I))}function ye(...R){return J(I=>Reflect.apply(s8,null,[I,...R]),()=>md(...R),"number format",I=>I[d8](...R),f8,I=>ze(I)||ei(I))}function U(...R){return J(I=>Reflect.apply(n8,null,[I,...R]),()=>_d(...R),"datetime format",I=>I[u8](...R),f8,I=>ze(I)||ei(I))}function _e(R){E=R,L.pluralRules=E}function ge(R,I){return J(()=>{if(!R)return!1;let z=ze(I)?I:l.value,Y=ze(I)?[z]:pd(L,o.value,z);for(let Se=0;Se<Y.length;Se++){let Me=N(Y[Se]),De=L.messageResolver(Me,R);if(De===null&&(De=Me[R]),Vn(De)||fn(De)||ze(De))return!0}return!1},()=>[R],"translate exists",z=>Reflect.apply(z.te,z,[R,I]),gL,z=>Dt(z))}function se(R){let I=null,z=pd(L,o.value,l.value);for(let Y=0;Y<z.length;Y++){let Se=c.value[z[Y]]||{},Me=L.messageResolver(Se,R);if(Me!=null){I=Me;break}}return I}function H(R){return se(R)??(t&&t.tm(R)||{})}function N(R){return c.value[R]||{}}function O(R,I){if(r){let z={[R]:I};for(let Y in z)rn(z,Y)&&Oo(z[Y]);I=z[R]}c.value[R]=I,L.messages=c.value}function te(R,I){c.value[R]=c.value[R]||{};let z={[R]:I};if(r)for(let Y in z)rn(z,Y)&&Oo(z[Y]);I=z[R],U0(I,c.value[R]),L.messages=c.value}function ee(R){return u.value[R]||{}}function me(R,I){u.value[R]=I,L.datetimeFormats=u.value,r8(L,R,I)}function we(R,I){u.value[R]=Hi(u.value[R]||{},I),L.datetimeFormats=u.value,r8(L,R,I)}function S(R){return d.value[R]||{}}function k(R,I){d.value[R]=I,L.numberFormats=d.value,a8(L,R,I)}function D(R,I){d.value[R]=Hi(d.value[R]||{},I),L.numberFormats=d.value,a8(L,R,I)}p8++,t&&U6&&(Ve(t.locale,R=>{a&&(l.value=R,L.locale=R,Rl(L,l.value,o.value))}),Ve(t.fallbackLocale,R=>{a&&(o.value=R,L.fallbackLocale=R,Rl(L,l.value,o.value))}));let P={id:p8,locale:T,fallbackLocale:X,get inheritLocale(){return a},set inheritLocale(R){a=R,R&&t&&(l.value=t.locale.value,o.value=t.fallbackLocale.value,Rl(L,l.value,o.value))},get availableLocales(){return Object.keys(c.value).sort()},messages:W,get modifiers(){return $},get pluralRules(){return E||{}},get isGlobal(){return n},get missingWarn(){return h},set missingWarn(R){h=R,L.missingWarn=h},get fallbackWarn(){return f},set fallbackWarn(R){f=R,L.fallbackWarn=f},get fallbackRoot(){return v},set fallbackRoot(R){v=R},get fallbackFormat(){return p},set fallbackFormat(R){p=R,L.fallbackFormat=p},get warnHtmlMessage(){return C},set warnHtmlMessage(R){C=R,L.warnHtmlMessage=R},get escapeParameter(){return g},set escapeParameter(R){g=R,L.escapeParameter=R},t:ae,getLocaleMessage:N,setLocaleMessage:O,mergeLocaleMessage:te,getPostTranslationHandler:F,setPostTranslationHandler:ie,getMissingHandler:re,setMissingHandler:ue,[_L]:_e};return P.datetimeFormats=A,P.numberFormats=x,P.rt=ne,P.te=ge,P.tm=H,P.d=Q,P.n=oe,P.getDateTimeFormat=ee,P.setDateTimeFormat=me,P.mergeDateTimeFormat=we,P.getNumberFormat=S,P.setNumberFormat=k,P.mergeNumberFormat=D,P[tg]=i,P[c8]=pe,P[u8]=U,P[d8]=ye,P}var bd={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e==="parent"||e==="global",default:"parent"},i18n:{type:Object}};Hi({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>ci(e)||!isNaN(e)}},bd),Hi({value:{type:Number,required:!0},format:{type:[String,Object]}},bd);var yL=As("global-vue-i18n");function rg(e={}){let t=ng();if(t==null)throw Po(ta.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw Po(ta.NOT_INSTALLED);let i=wL(t),n=CL(i),r=mL(t),s=SL(e,r);if(s==="global")return vL(n,e,r),n;if(s==="parent"){let o=kL(i,t,e.__useComponent);return o??(o=n),o}let a=i,l=a.__getInstance(t);if(l==null){let o=Hi({},e);"__i18n"in r&&(o.__i18n=r.__i18n),n&&(o.__root=n),l=bL(o),a.__composerExtend&&(l[gd]=a.__composerExtend(l)),ML(a,t,l),a.__setInstance(t,l)}return l}function wL(e){let t=Mt(e.isCE?yL:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw Po(e.isCE?ta.NOT_INSTALLED_WITH_PROVIDE:ta.UNEXPECTED_ERROR);return t}function SL(e,t){return u1(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}function CL(e){return e.mode==="composition"?e.global:e.global.__composer}function kL(e,t,i=!1){let n=null,r=t.root,s=AL(t,i);for(;s!=null;){let a=e;if(e.mode==="composition")n=a.__getInstance(s);else if(__VUE_I18N_LEGACY_API__){let l=a.__getInstance(s);l!=null&&(n=l.__composer,i&&n&&!n[tg]&&(n=null))}if(n!=null||r===s)break;s=s.parent}return n}function AL(e,t=!1){return e==null?null:t&&e.vnode.ctx||e.parent}function ML(e,t,i){nt(()=>{},t),Ii(()=>{let n=i;e.__deleteInstance(t);let r=n[gd];r&&(r(),delete n[gd])},t)}if(Hi({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},bd),pL(),K$(E$),q$(U$),G$(pd),__INTLIFY_PROD_DEVTOOLS__){let e=us();e.__INTLIFY__=!0,x$(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}const $L=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},LL=$L("shield-star","0 0 256 256",'<path d="M80.57,117A8,8,0,0,1,91,112.57l29,11.61V96a8,8,0,0,1,16,0v28.18l29-11.61A8,8,0,1,1,171,127.43l-30.31,12.12L158.4,163.2a8,8,0,1,1-12.8,9.6L128,149.33,110.4,172.8a8,8,0,1,1-12.8-9.6l17.74-23.65L85,127.43A8,8,0,0,1,80.57,117ZM224,56v56c0,52.72-25.52,84.67-46.93,102.19-23.06,18.86-46,25.27-47,25.53a8,8,0,0,1-4.2,0c-1-.26-23.91-6.67-47-25.53C57.52,196.67,32,164.72,32,112V56A16,16,0,0,1,48,40H208A16,16,0,0,1,224,56Zm-16,0L48,56l0,56c0,37.3,13.82,67.51,41.07,89.81A128.25,128.25,0,0,0,128,223.62a129.3,129.3,0,0,0,39.41-22.2C194.34,179.16,208,149.07,208,112Z"/>'),EL=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},xL=EL("users","0 0 256 256",'<path d="M117.25,157.92a60,60,0,1,0-66.5,0A95.83,95.83,0,0,0,3.53,195.63a8,8,0,1,0,13.4,8.74,80,80,0,0,1,134.14,0,8,8,0,0,0,13.4-8.74A95.83,95.83,0,0,0,117.25,157.92ZM40,108a44,44,0,1,1,44,44A44.05,44.05,0,0,1,40,108Zm210.14,98.7a8,8,0,0,1-11.07-2.33A79.83,79.83,0,0,0,172,168a8,8,0,0,1,0-16,44,44,0,1,0-16.34-84.87,8,8,0,1,1-5.94-14.85,60,60,0,0,1,55.53,105.64,95.83,95.83,0,0,1,47.22,37.71A8,8,0,0,1,250.14,206.7Z"/>'),La=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},HL=La("plus","0 0 256 256",'<path d="M220,128a4,4,0,0,1-4,4H132v84a4,4,0,0,1-8,0V132H40a4,4,0,0,1,0-8h84V40a4,4,0,0,1,8,0v84h84A4,4,0,0,1,220,128Z"/>'),TL=La("plus","0 0 256 256",'<path d="M222,128a6,6,0,0,1-6,6H134v82a6,6,0,0,1-12,0V134H40a6,6,0,0,1,0-12h82V40a6,6,0,0,1,12,0v82h82A6,6,0,0,1,222,128Z"/>'),Io=La("plus","0 0 256 256",'<path d="M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z"/>'),NL=La("plus","0 0 256 256",'<path d="M228,128a12,12,0,0,1-12,12H140v76a12,12,0,0,1-24,0V140H40a12,12,0,0,1,0-24h76V40a12,12,0,0,1,24,0v76h76A12,12,0,0,1,228,128Z"/>'),PL=La("plus","0 0 256 256",'<path d="M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM184,136H136v48a8,8,0,0,1-16,0V136H72a8,8,0,0,1,0-16h48V72a8,8,0,0,1,16,0v48h48a8,8,0,0,1,0,16Z"/>'),OL=La("plus","0 0 256 256",'<path d="M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z" opacity="0.2"/><path d="M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z"/>'),IL="plus",sg=Object.freeze(Object.defineProperty({__proto__:null,bold:NL,default:Io,duotone:OL,fill:PL,glyphName:IL,light:TL,regular:Io,thin:HL},Symbol.toStringTag,{value:"Module"})),RL=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},VL=RL("user","0 0 256 256",'<path d="M230.92,212c-15.23-26.33-38.7-45.21-66.09-54.16a72,72,0,1,0-73.66,0C63.78,166.78,40.31,185.66,25.08,212a8,8,0,1,0,13.85,8c18.84-32.56,52.14-52,89.07-52s70.23,19.44,89.07,52a8,8,0,1,0,13.85-8ZM72,96a56,56,0,1,1,56,56A56.06,56.06,0,0,1,72,96Z"/>'),Ea=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},DL=Ea("sign-out","0 0 256 256",'<path d="M116,216a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V40a4,4,0,0,1,4-4h64a4,4,0,0,1,0,8H52V212h60A4,4,0,0,1,116,216Zm110.83-90.83-40-40a4,4,0,0,0-5.66,5.66L214.34,124H112a4,4,0,0,0,0,8H214.34l-33.17,33.17a4,4,0,0,0,5.66,5.66l40-40A4,4,0,0,0,226.83,125.17Z"/>'),ZL=Ea("sign-out","0 0 256 256",'<path d="M118,216a6,6,0,0,1-6,6H48a6,6,0,0,1-6-6V40a6,6,0,0,1,6-6h64a6,6,0,0,1,0,12H54V210h58A6,6,0,0,1,118,216Zm110.24-92.24-40-40a6,6,0,0,0-8.48,8.48L209.51,122H112a6,6,0,0,0,0,12h97.51l-29.75,29.76a6,6,0,1,0,8.48,8.48l40-40A6,6,0,0,0,228.24,123.76Z"/>'),yd=Ea("sign-out","0 0 256 256",'<path d="M120,216a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V40a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H56V208h56A8,8,0,0,1,120,216Zm109.66-93.66-40-40a8,8,0,0,0-11.32,11.32L204.69,120H112a8,8,0,0,0,0,16h92.69l-26.35,26.34a8,8,0,0,0,11.32,11.32l40-40A8,8,0,0,0,229.66,122.34Z"/>'),BL=Ea("sign-out","0 0 256 256",'<path d="M124,216a12,12,0,0,1-12,12H48a12,12,0,0,1-12-12V40A12,12,0,0,1,48,28h64a12,12,0,0,1,0,24H60V204h52A12,12,0,0,1,124,216Zm108.49-96.49-40-40a12,12,0,0,0-17,17L195,116H112a12,12,0,0,0,0,24h83l-19.52,19.51a12,12,0,0,0,17,17l40-40A12,12,0,0,0,232.49,119.51Z"/>'),FL=Ea("sign-out","0 0 256 256",'<path d="M120,216a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V40a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H56V208h56A8,8,0,0,1,120,216Zm109.66-93.66-40-40A8,8,0,0,0,176,88v32H112a8,8,0,0,0,0,16h64v32a8,8,0,0,0,13.66,5.66l40-40A8,8,0,0,0,229.66,122.34Z"/>'),zL=Ea("sign-out","0 0 256 256",'<path d="M224,56V200a16,16,0,0,1-16,16H48V40H208A16,16,0,0,1,224,56Z" opacity="0.2"/><path d="M120,216a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V40a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H56V208h56A8,8,0,0,1,120,216Zm109.66-93.66-40-40a8,8,0,0,0-11.32,11.32L204.69,120H112a8,8,0,0,0,0,16h92.69l-26.35,26.34a8,8,0,0,0,11.32,11.32l40-40A8,8,0,0,0,229.66,122.34Z"/>'),UL="sign-out",WL=Object.freeze(Object.defineProperty({__proto__:null,bold:BL,default:yd,duotone:zL,fill:FL,glyphName:UL,light:ZL,regular:yd,thin:DL},Symbol.toStringTag,{value:"Module"}));var jL=["title","aria-expanded","disabled"],KL={class:"nb-user-menu__avatar","aria-hidden":"true"},qL=["src"],GL={class:"nb-user-menu__identity-text"},YL={class:"nb-user-menu__identity-name"},XL={key:0,class:"nb-user-menu__identity-email"},JL={key:1,class:"nb-user-menu__sr-only"},QL=["title","aria-label","aria-expanded","disabled"],eE=["src"],tE={class:"nb-user-menu__label"},iE={class:"nb-user-menu__email"},nE={key:0,class:"nb-user-menu__role"},rE=["disabled","onClick"],sE={class:"nb-user-menu__account-main"},aE={class:"nb-user-menu__account-email"},lE={key:0,class:"nb-user-menu__account-name"},oE={class:"nb-user-menu__brand"},cE={key:1,class:"nb-user-menu__brand-name"},uE={key:2},dE=260,J1=8,hE=Ne({__name:"UserMenu",props:{user:{},accounts:{default:void 0},accountsUnknown:{type:Boolean,default:!1},showAccountActions:{type:Boolean,default:!0},showProfile:{type:Boolean,default:!0},brand:{default:"footer"},placement:{default:"right-end"},trigger:{default:"avatar"},showTheme:{type:Boolean,default:!1},roleBadge:{default:void 0},disabled:{type:Boolean,default:!1}},emits:["switch","remove","switch-account","add-account","profile","sign-out","open","close"],setup(e,{expose:t,emit:i}){let n={en:{ACCOUNT_MENU:"Account menu",SIGNED_IN_AS:"Signed in as",SWITCH_ACCOUNT:"Switch account",USE_ANOTHER_ACCOUNT:"Use another account",REMOVE_ACCOUNT:"Sign this account out of this browser",PROFILE:"Profile",SIGN_OUT:"Sign out",APPEARANCE:"Appearance",THEME_LIGHT:"Light",THEME_DARK:"Dark",THEME_SYSTEM:"Match my system",poweredBy:"Accord by Nubisco"},pt:{ACCOUNT_MENU:"Menu de conta",SIGNED_IN_AS:"Sessão iniciada como",SWITCH_ACCOUNT:"Mudar de conta",USE_ANOTHER_ACCOUNT:"Usar outra conta",REMOVE_ACCOUNT:"Terminar a sessão desta conta neste browser",PROFILE:"Perfil",SIGN_OUT:"Terminar sessão",APPEARANCE:"Aspeto",THEME_LIGHT:"Claro",THEME_DARK:"Escuro",THEME_SYSTEM:"Seguir o sistema",poweredBy:"Accord da Nubisco"}},{t:r,te:s,locale:a}=rg({useScope:"global"});function l(oe){var fe;if(s(oe))return r(oe);let ve=oe.slice(9);return((fe=n[String(a.value).toLowerCase().split("-")[0]])==null?void 0:fe[ve])??n.en[ve]??oe}let o=c1(),c=q(()=>[{label:l("userMenu.THEME_LIGHT"),value:"light"},{label:l("userMenu.THEME_DARK"),value:"dark"},{label:l("userMenu.THEME_SYSTEM"),value:"system"}]),u=`nb-user-menu-appearance-${Oi()}`,d=e,h=Mt("nb-shell-sidebar-variant",null),f=q(()=>d.trigger==="identity"&&((h==null?void 0:h.value)??"verbose")==="verbose"),v=q(()=>{var oe;return((oe=d.user.name)==null?void 0:oe.trim())||d.user.email}),p=q(()=>{var ve;let oe=(ve=d.user.name)==null?void 0:ve.trim();return oe?oe.toLowerCase()===d.user.email.trim().toLowerCase()?"":d.user.email:""}),w=K(!1);Ve(()=>d.user.picture,()=>{w.value=!1});let _=q(()=>!!d.user.picture&&!w.value),y=/(Accord|Nubisco)/,C=q(()=>{let oe=l("userMenu.poweredBy");if(!y.test(oe))return[{text:oe,name:!0,mark:!0}];let ve=!1;return oe.split(y).filter(fe=>fe!=="").map(fe=>{let pe=fe==="Accord"||fe==="Nubisco",ye=fe==="Nubisco"&&!ve;return ye&&(ve=!0),{text:fe,name:pe,mark:ye}})}),g=i,$=K(null),E=K(null),L=K(!1),B=K({});function T(oe){return tA(oe)}let{phone:X}=Xo();function W(){var ve,fe;let oe=(ve=$.value)==null?void 0:ve.getBoundingClientRect();if(oe){if(X.value){let pe=((fe=E.value)==null?void 0:fe.offsetWidth)||dE,ye=Math.max(J1,window.innerWidth-pe-J1);B.value={left:`${Math.round(Math.min(Math.max(oe.left,J1),ye))}px`,bottom:`${Math.round(window.innerHeight-oe.top+8)}px`};return}d.placement==="top-start"?B.value={left:`${Math.round(oe.left)}px`,bottom:`${Math.round(window.innerHeight-oe.top+8)}px`}:B.value={left:`${Math.round(oe.right+12)}px`,bottom:`${Math.round(window.innerHeight-oe.bottom)}px`}}}function A(){d.disabled||(L.value?x():(W(),L.value=!0,g("open"),X.value&&Gt(W)))}function x(){L.value&&(L.value=!1,g("close"))}function F(oe){oe.current||(x(),g("switch",oe))}function ie(oe){g("remove",oe)}function re(){x(),g("switch-account")}function ue(){x(),g("add-account")}function J(){x(),g("profile")}function ae(){x(),g("sign-out")}function ne(oe){var fe,pe;if(!L.value)return;let ve=oe.target;(fe=$.value)!=null&&fe.contains(ve)||(pe=E.value)!=null&&pe.contains(ve)||x()}function Q(oe){oe.key==="Escape"&&x()}return nt(()=>{document.addEventListener("click",ne),document.addEventListener("keydown",Q)}),ri(()=>{document.removeEventListener("click",ne),document.removeEventListener("keydown",Q)}),t({open:L,toggle:A,close:x}),(oe,ve)=>(m(),M("div",{ref_key:"rootRef",ref:$,class:Le(["nb-user-menu",{"nb-user-menu--identity":f.value,"nb-user-menu--elevated":!!d.roleBadge}])},[xe(oe.$slots,"trigger",{open:L.value,toggle:A},()=>[f.value?(m(),M("button",{key:0,type:"button",class:"nb-user-menu__identity",title:d.user.email,"aria-haspopup":"menu","aria-expanded":L.value,disabled:e.disabled,onClick:A},[b("span",KL,[_.value?(m(),M("img",{key:0,class:"nb-user-menu__picture",src:d.user.picture??void 0,alt:"",onError:ve[0]||(ve[0]=fe=>w.value=!0)},null,40,qL)):(m(),M(Ce,{key:1},[le(Z(T(d.user)),1)],64))]),b("span",GL,[b("span",YL,Z(v.value),1),p.value?(m(),M("span",XL,Z(p.value),1)):V("",!0),d.roleBadge?(m(),M("span",JL," ("+Z(d.roleBadge)+")",1)):V("",!0)])],8,jL)):(m(),M("button",{key:1,type:"button",class:"nb-user-menu__avatar",title:d.user.email,"aria-label":d.roleBadge?`${l("userMenu.ACCOUNT_MENU")} (${d.roleBadge})`:l("userMenu.ACCOUNT_MENU"),"aria-haspopup":"menu","aria-expanded":L.value,disabled:e.disabled,onClick:A},[_.value?(m(),M("img",{key:0,class:"nb-user-menu__picture",src:d.user.picture??void 0,alt:"",onError:ve[1]||(ve[1]=fe=>w.value=!0)},null,40,eE)):(m(),M(Ce,{key:1},[le(Z(T(d.user)),1)],64))],8,QL))]),(m(),he(an,{to:"body"},[j(Dh,{name:"nb-user-menu-pop"},{default:G(()=>[L.value?(m(),M("div",{key:0,ref_key:"panelRef",ref:E,class:"nb-user-menu__panel",style:mi(B.value),role:"menu"},[b("p",tE,Z(l("userMenu.SIGNED_IN_AS")),1),b("p",iE,Z(d.user.email),1),d.roleBadge?(m(),M("p",nE,[j(Ue,{name:de(LL),size:13},null,8,["name"]),le(" "+Z(d.roleBadge),1)])):V("",!0),e.showAccountActions?(m(),M(Ce,{key:1},[ve[3]||(ve[3]=b("div",{class:"nb-user-menu__divider",role:"separator"},null,-1)),d.accounts&&d.accounts.length?(m(!0),M(Ce,{key:0},Fe(d.accounts,fe=>(m(),M("button",{key:fe.id,type:"button",role:"menuitem",class:Le(["nb-user-menu__account",{"nb-user-menu__account--current":fe.current}]),disabled:fe.current,onClick:pe=>F(fe)},[b("span",sE,[b("span",aE,Z(fe.email),1),fe.name?(m(),M("span",lE,Z(fe.name),1)):V("",!0)]),fe.current?(m(),he(Ue,{key:0,name:de(Ho),size:14,class:"nb-user-menu__check"},null,8,["name"])):fe.removable===!1?V("",!0):(m(),he(Ue,{key:1,name:de(gs),size:13,class:"nb-user-menu__remove",title:l("userMenu.REMOVE_ACCOUNT"),onClick:qe(pe=>ie(fe),["stop"])},null,8,["name","title","onClick"]))],10,rE))),128)):d.accountsUnknown?(m(),M("button",{key:1,type:"button",role:"menuitem",class:"nb-user-menu__action",onClick:re},[j(Ue,{name:de(xL),size:15},null,8,["name"]),le(" "+Z(l("userMenu.SWITCH_ACCOUNT")),1)])):V("",!0),b("button",{type:"button",role:"menuitem",class:"nb-user-menu__action",onClick:ue},[j(Ue,{name:de(Io),size:15},null,8,["name"]),le(" "+Z(l("userMenu.USE_ANOTHER_ACCOUNT")),1)])],64)):V("",!0),d.showTheme?(m(),M(Ce,{key:2},[ve[4]||(ve[4]=b("div",{class:"nb-user-menu__divider",role:"separator"},null,-1)),b("div",{class:"nb-user-menu__appearance",role:"group","aria-labelledby":u},[b("p",{id:u,class:"nb-user-menu__appearance-title"},Z(l("userMenu.APPEARANCE")),1),j(Nv,{name:u,options:c.value,"model-value":de(o).theme.value,"onUpdate:modelValue":ve[2]||(ve[2]=fe=>de(o).setTheme(fe))},null,8,["options","model-value"])])],64)):V("",!0),oe.$slots.default?(m(),M(Ce,{key:3},[ve[5]||(ve[5]=b("div",{class:"nb-user-menu__divider",role:"separator"},null,-1)),xe(oe.$slots,"default",{close:x})],64)):V("",!0),ve[7]||(ve[7]=b("div",{class:"nb-user-menu__divider",role:"separator"},null,-1)),e.showProfile?(m(),M("button",{key:4,type:"button",role:"menuitem",class:"nb-user-menu__action",onClick:J},[j(Ue,{name:de(VL),size:15},null,8,["name"]),le(" "+Z(l("userMenu.PROFILE")),1)])):V("",!0),b("button",{type:"button",role:"menuitem",class:"nb-user-menu__action nb-user-menu__action--danger",onClick:ae},[j(Ue,{name:de(yd),size:15},null,8,["name"]),le(" "+Z(l("userMenu.SIGN_OUT")),1)]),d.brand==="none"?V("",!0):(m(),M(Ce,{key:5},[ve[6]||(ve[6]=b("div",{class:"nb-user-menu__divider",role:"separator"},null,-1)),xe(oe.$slots,"brand",{},()=>[b("p",oE,[(m(!0),M(Ce,null,Fe(C.value,(fe,pe)=>(m(),M(Ce,{key:pe},[fe.mark?(m(),he(LM,{key:0,size:13,class:"nb-user-menu__mark"})):V("",!0),fe.name?(m(),M("span",cE,Z(fe.text),1)):(m(),M("span",uE,Z(fe.text),1))],64))),128))])])],64))],4)):V("",!0)]),_:3})]))],2))}}),fE=Symbol("NB_CHECKBOX_GROUP_CONTEXT"),pE={class:"nb-checkbox__control"},_E=["checked","disabled","indeterminate"],mE={class:"nb-checkbox__box"},vE={key:0,class:"nb-checkbox__check",viewBox:"0 0 10 8",fill:"none"},gE={key:1,class:"nb-checkbox__dash"},bE={key:0,class:"nb-checkbox__label"},wd=tt(Ne({__name:"Checkbox",props:{modelValue:{type:Boolean,default:!1},indeterminate:{type:Boolean,default:!1},name:{},disabled:{type:Boolean,default:!1},required:{type:Boolean},id:{default:"checkbox"},label:{}},emits:["update:modelValue"],setup(e,{emit:t}){let i=e,n=t,r=Mt(fE,null),s=q(()=>i.disabled||!!(r!=null&&r.disabled.value));function a(l){s.value||n("update:modelValue",l.target.checked)}return(l,o)=>(m(),M("label",{class:Le(["nb-checkbox",{"nb-checkbox--disabled":s.value}])},[b("span",pE,[b("input",{type:"checkbox",checked:e.modelValue,disabled:s.value,indeterminate:e.indeterminate,class:"nb-checkbox__input",onChange:a},null,40,_E),b("span",mE,[e.modelValue&&!e.indeterminate?(m(),M("svg",vE,[...o[0]||(o[0]=[b("path",{d:"M1 4l3 3 5-6",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])):V("",!0),e.indeterminate?(m(),M("span",gE)):V("",!0)])]),e.label?(m(),M("span",bE,Z(e.label),1)):xe(l.$slots,"default",{key:1},void 0,!0)],2))}}),[["__scopeId","data-v-e6cd7a41"]]);const xa=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},yE=xa("arrows-down-up","0 0 256 256",'<path d="M114.83,173.17a4,4,0,0,1,0,5.66l-32,32a4,4,0,0,1-5.66,0l-32-32a4,4,0,0,1,5.66-5.66L76,198.34V48a4,4,0,0,1,8,0V198.34l25.17-25.17A4,4,0,0,1,114.83,173.17Zm96-96-32-32a4,4,0,0,0-5.66,0l-32,32a4,4,0,0,0,5.66,5.66L172,57.66V208a4,4,0,0,0,8,0V57.66l25.17,25.17a4,4,0,1,0,5.66-5.66Z"/>'),wE=xa("arrows-down-up","0 0 256 256",'<path d="M116.24,171.76a6,6,0,0,1,0,8.48l-32,32a6,6,0,0,1-8.48,0l-32-32a6,6,0,0,1,8.48-8.48L74,193.51V48a6,6,0,0,1,12,0V193.51l21.76-21.75A6,6,0,0,1,116.24,171.76Zm96-96-32-32a6,6,0,0,0-8.48,0l-32,32a6,6,0,0,0,8.48,8.48L170,62.49V208a6,6,0,0,0,12,0V62.49l21.76,21.75a6,6,0,0,0,8.48-8.48Z"/>'),m8=xa("arrows-down-up","0 0 256 256",'<path d="M117.66,170.34a8,8,0,0,1,0,11.32l-32,32a8,8,0,0,1-11.32,0l-32-32a8,8,0,0,1,11.32-11.32L72,188.69V48a8,8,0,0,1,16,0V188.69l18.34-18.35A8,8,0,0,1,117.66,170.34Zm96-96-32-32a8,8,0,0,0-11.32,0l-32,32a8,8,0,0,0,11.32,11.32L168,67.31V208a8,8,0,0,0,16,0V67.31l18.34,18.35a8,8,0,0,0,11.32-11.32Z"/>'),SE=xa("arrows-down-up","0 0 256 256",'<path d="M120.49,167.51a12,12,0,0,1,0,17l-32,32a12,12,0,0,1-17,0l-32-32a12,12,0,1,1,17-17L68,179V48a12,12,0,0,1,24,0V179l11.51-11.52A12,12,0,0,1,120.49,167.51Zm96-96-32-32a12,12,0,0,0-17,0l-32,32a12,12,0,0,0,17,17L164,77V208a12,12,0,0,0,24,0V77l11.51,11.52a12,12,0,0,0,17-17Z"/>'),CE=xa("arrows-down-up","0 0 256 256",'<path d="M119.39,172.94a8,8,0,0,1-1.73,8.72l-32,32a8,8,0,0,1-11.32,0l-32-32A8,8,0,0,1,48,168H72V48a8,8,0,0,1,16,0V168h24A8,8,0,0,1,119.39,172.94Zm94.27-98.6-32-32a8,8,0,0,0-11.32,0l-32,32A8,8,0,0,0,144,88h24V208a8,8,0,0,0,16,0V88h24a8,8,0,0,0,5.66-13.66Z"/>'),kE=xa("arrows-down-up","0 0 256 256",'<path d="M176,48V208H80V48Z" opacity="0.2"/><path d="M117.66,170.34a8,8,0,0,1,0,11.32l-32,32a8,8,0,0,1-11.32,0l-32-32a8,8,0,0,1,11.32-11.32L72,188.69V48a8,8,0,0,1,16,0V188.69l18.34-18.35A8,8,0,0,1,117.66,170.34Zm96-96-32-32a8,8,0,0,0-11.32,0l-32,32a8,8,0,0,0,11.32,11.32L168,67.31V208a8,8,0,0,0,16,0V67.31l18.34,18.35a8,8,0,0,0,11.32-11.32Z"/>'),AE="arrows-down-up",ME=Object.freeze(Object.defineProperty({__proto__:null,bold:SE,default:m8,duotone:kE,fill:CE,glyphName:AE,light:wE,regular:m8,thin:yE},Symbol.toStringTag,{value:"Module"})),Ha=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},$E=Ha("arrow-down","0 0 256 256",'<path d="M202.83,146.83l-72,72a4,4,0,0,1-5.66,0l-72-72a4,4,0,0,1,5.66-5.66L124,206.34V40a4,4,0,0,1,8,0V206.34l65.17-65.17a4,4,0,0,1,5.66,5.66Z"/>'),LE=Ha("arrow-down","0 0 256 256",'<path d="M204.24,148.24l-72,72a6,6,0,0,1-8.48,0l-72-72a6,6,0,0,1,8.48-8.48L122,201.51V40a6,6,0,0,1,12,0V201.51l61.76-61.75a6,6,0,0,1,8.48,8.48Z"/>'),v8=Ha("arrow-down","0 0 256 256",'<path d="M205.66,149.66l-72,72a8,8,0,0,1-11.32,0l-72-72a8,8,0,0,1,11.32-11.32L120,196.69V40a8,8,0,0,1,16,0V196.69l58.34-58.35a8,8,0,0,1,11.32,11.32Z"/>'),EE=Ha("arrow-down","0 0 256 256",'<path d="M208.49,152.49l-72,72a12,12,0,0,1-17,0l-72-72a12,12,0,0,1,17-17L116,187V40a12,12,0,0,1,24,0V187l51.51-51.52a12,12,0,0,1,17,17Z"/>'),xE=Ha("arrow-down","0 0 256 256",'<path d="M205.66,149.66l-72,72a8,8,0,0,1-11.32,0l-72-72A8,8,0,0,1,56,136h64V40a8,8,0,0,1,16,0v96h64a8,8,0,0,1,5.66,13.66Z"/>'),HE=Ha("arrow-down","0 0 256 256",'<path d="M200,144l-72,72L56,144Z" opacity="0.2"/><path d="M207.39,140.94A8,8,0,0,0,200,136H136V40a8,8,0,0,0-16,0v96H56a8,8,0,0,0-5.66,13.66l72,72a8,8,0,0,0,11.32,0l72-72A8,8,0,0,0,207.39,140.94ZM128,204.69,75.31,152H180.69Z"/>'),TE="arrow-down",NE=Object.freeze(Object.defineProperty({__proto__:null,bold:EE,default:v8,duotone:HE,fill:xE,glyphName:TE,light:LE,regular:v8,thin:$E},Symbol.toStringTag,{value:"Module"}));var PE={key:0,class:"nb-data-table__toolbar"},OE={key:0,class:"nb-data-table__toolbar-heading"},IE={key:0,class:"nb-data-table__title"},RE={key:1,class:"nb-data-table__description"},VE={key:1,class:"nb-data-table__toolbar-row"},DE=["inert","aria-hidden"],ZE={key:0,class:"nb-data-table__toolbar-search"},BE={key:1,class:"nb-data-table__batch",role:"region","aria-label":"Table batch actions"},FE={class:"nb-data-table__batch-count"},zE={class:"nb-data-table__batch-actions"},UE={class:"nb-data-table__scroll"},WE=["role","aria-label","aria-busy"],jE={key:0,class:"nb-data-table__col-expand"},KE={key:1,class:"nb-data-table__col-select"},qE={key:2,class:"nb-data-table__col-actions"},GE=["role"],YE=["role"],XE={key:0,scope:"col",class:"nb-data-table__th nb-data-table__expand-cell"},JE={key:1,scope:"col",class:"nb-data-table__th nb-data-table__select-cell"},QE=["aria-sort"],ex=["onClick"],tx={class:"nb-data-table__th-label"},ix={key:1,class:"nb-data-table__th-label"},nx={key:2,scope:"col",class:"nb-data-table__th nb-data-table__actions-cell"},rx=["role"],sx={key:0,class:"nb-data-table__td"},ax={key:1,class:"nb-data-table__td"},lx={key:2,class:"nb-data-table__td"},ox={key:1,class:"nb-data-table__state-row"},cx=["colspan"],ux={key:2,class:"nb-data-table__state-row"},dx=["colspan"],hx=["role","aria-selected","tabindex","onClick","onKeydown","onKeyup"],fx=["role"],px=["aria-expanded","aria-controls","aria-label","onClick"],_x=["checked","aria-label","onChange"],mx=["role","data-label"],vx=["role"],gx=["colspan","role"],bx=["id","aria-label"],yx={key:1,class:"nb-data-table__footer"},b2=tt(Ne({__name:"DataTable",props:{columns:{},rows:{},rowKey:{},size:{default:"lg"},sortState:{default:null},selectable:{default:"none"},selected:{default:()=>[]},loading:{type:Boolean,default:!1},skeletonRows:{default:5},error:{default:void 0},emptyMessage:{default:void 0},stickyHeader:{type:Boolean,default:!0},zebra:{type:Boolean,default:!1},fill:{type:Boolean,default:!1},title:{default:void 0},description:{default:void 0},ariaLabel:{default:void 0},stackOnPhone:{type:Boolean,default:!1},expanded:{default:()=>[]}},emits:["sort","update:selected","row-click","update:expanded"],setup(e,{emit:t}){let i=e,{layerProps:n}=Js(),r=t,s=Wn(),a=`nb-data-table-select-${Oi()}`,l=q(()=>i.size==="xl"?"lg":i.size),o=q(()=>i.columns.filter(I=>!I.hidden)),c=q(()=>i.selectable!=="none"),u=q(()=>!!s["row-actions"]),d=q(()=>!!s["row-detail"]),h=q(()=>o.value.length+(d.value?1:0)+(c.value?1:0)+(u.value?1:0)),{phone:f}=Xo(),v=q(()=>i.stackOnPhone&&f.value),p=q(()=>{var I;return(I=o.value.find(z=>z.primary)??o.value.find(z=>!z.phoneHidden&&!z.phoneMeta))==null?void 0:I.key});function w(I){return I.phoneHidden?"nb-data-table__td--phone-hidden":I.key===p.value?"nb-data-table__td--primary":I.phoneMeta?"nb-data-table__td--meta":"nb-data-table__td--field"}let _=q(()=>!i.loading&&!i.error&&i.rows.length>0&&(i.selectable==="multiple"||o.value.some(I=>I.sortable&&!I.phoneHidden)));function y(I){if(I.width!=null)return{width:typeof I.width=="number"?`${I.width}px`:I.width}}function C(I,z){return z[I.key]}function g(I){return I==null?"":String(I)}let $=I=>{var z,Y;return((Y=(z=I.column).render)==null?void 0:Y.call(z,I.row,C(I.column,I.row),I.rowIndex))??null};$.props=["column","row","rowIndex"];function E(I){let z=i.rowKey;return typeof z=="function"?z(I):I[z]}let L=q(()=>new Set(i.selected)),B=q(()=>i.selected),T=q(()=>i.selected.length);function X(I){return L.value.has(E(I))}let W=q(()=>i.rows.map(I=>E(I))),A=q(()=>W.value.length>0&&W.value.every(I=>L.value.has(I))),x=q(()=>!A.value&&W.value.some(I=>L.value.has(I))),F=K(null),ie=!1;function re(I){ie=I.shiftKey}Ve(W,()=>{F.value=null});function ue(I,z){let Y=E(I),Se=new Set(i.selected),Me=!Se.has(Y),De=F.value,Xe=Te=>{Me?Se.add(Te):Se.delete(Te)};if(ie&&De!==null&&De!==z){let Te=Math.min(De,z),rt=Math.max(De,z);for(let It=Te;It<=rt;It++){let un=i.rows[It];un&&Xe(E(un))}}else Xe(Y),F.value=z;ie=!1,r("update:selected",[...Se])}function J(I){r("update:selected",[E(I)])}function ae(){let I=new Set(i.selected);A.value?W.value.forEach(z=>I.delete(z)):W.value.forEach(z=>I.add(z)),r("update:selected",[...I])}function ne(){r("update:selected",[])}let Q=q(()=>i.selectable!=="none"&&!!s["batch-actions"]),oe=q(()=>Q.value&&T.value>0),ve=`nb-data-table-detail-${Oi()}`,fe=q(()=>new Set(i.expanded));function pe(I){return d.value&&fe.value.has(E(I))}function ye(I){let z=E(I),Y=i.expanded.filter(Se=>Se!==z);Y.length===i.expanded.length&&Y.push(z),r("update:expanded",Y)}function U(I){return`${ve}-${I}`}function _e(I,z){let Y=o.value.find(Se=>Se.key===p.value);return`Details for ${(Y?g(C(Y,I)).trim():"")||`row ${z+1}`}`}let ge=q(()=>!!i.title||!!i.description||!!s.toolbar),se=q(()=>!!s.search||!!s["toolbar-actions"]||Q.value),H=q(()=>ge.value||se.value);function N(I){return!!i.sortState&&i.sortState.key===I.key&&i.sortState.direction!=="none"}function O(I){return N(I)?i.sortState.direction==="asc"?"ascending":"descending":"none"}function te(I){return N(I)?i.sortState.direction==="asc"?GS:NE:ME}function ee(I){return I==="asc"?"desc":I==="desc"?"none":"asc"}function me(I){let z=i.sortState&&i.sortState.key===I.key?i.sortState.direction:"none";r("sort",{key:I.key,direction:ee(z)})}let we=Si(),S=q(()=>{var I;return!!((I=we==null?void 0:we.vnode.props)!=null&&I.onRowClick)});function k(I,z){r("row-click",I,z)}function D(I){return S.value&&I.target===I.currentTarget&&!I.altKey&&!I.ctrlKey&&!I.metaKey}function P(I,z,Y){D(I)&&(I.key==="Enter"?(I.preventDefault(),I.repeat||k(z,Y)):I.key===" "&&I.preventDefault())}function R(I,z,Y){!D(I)||I.key!==" "||(I.preventDefault(),k(z,Y))}return(I,z)=>(m(),M("div",Zt({class:["nb-data-table",`nb-data-table--${e.size}`,{"nb-data-table--zebra":e.zebra},{"nb-data-table--sticky":e.stickyHeader},{"nb-data-table--fill":e.fill},{"nb-data-table--stacked":v.value},{"nb-data-table--stacked-headless":v.value&&!_.value},{"nb-data-table--expandable":d.value}]},de(n)),[H.value?(m(),M("div",PE,[ge.value?(m(),M("div",OE,[xe(I.$slots,"toolbar",{selectedCount:T.value},()=>[e.title?(m(),M("h2",IE,Z(e.title),1)):V("",!0),e.description?(m(),M("p",RE,Z(e.description),1)):V("",!0)],!0)])):V("",!0),se.value?(m(),M("div",VE,[I.$slots.search||I.$slots["toolbar-actions"]?(m(),M("div",{key:0,class:Le(["nb-data-table__toolbar-tools",{"nb-data-table__toolbar-tools--search":!!I.$slots.search}]),inert:oe.value||void 0,"aria-hidden":oe.value||void 0},[I.$slots.search?(m(),M("div",ZE,[xe(I.$slots,"search",{},void 0,!0)])):V("",!0),xe(I.$slots,"toolbar-actions",{},void 0,!0)],10,DE)):V("",!0),oe.value?(m(),M("div",BE,[b("span",FE,Z(T.value)+" selected ",1),b("div",zE,[xe(I.$slots,"batch-actions",{selectedKeys:B.value,clear:ne},void 0,!0)]),j(Pt,{class:"nb-data-table__batch-cancel",variant:"ghost",size:l.value,onClick:ne},{default:G(()=>[...z[3]||(z[3]=[le(" Cancel ",-1)])]),_:1},8,["size"])])):V("",!0)])):V("",!0)])):V("",!0),b("div",UE,[b("table",{class:"nb-data-table__table",role:v.value?"table":void 0,"aria-label":e.ariaLabel||e.title||void 0,"aria-busy":e.loading||void 0},[b("colgroup",null,[d.value?(m(),M("col",jE)):V("",!0),c.value?(m(),M("col",KE)):V("",!0),(m(!0),M(Ce,null,Fe(o.value,Y=>(m(),M("col",{key:`col-${Y.key}`,style:mi(y(Y))},null,4))),128)),u.value?(m(),M("col",qE)):V("",!0)]),b("thead",{class:"nb-data-table__head",role:v.value?"rowgroup":void 0},[b("tr",{role:v.value?"row":void 0},[d.value?(m(),M("th",XE,[...z[4]||(z[4]=[b("span",{class:"nb-sr-only"},"Row details",-1)])])):V("",!0),c.value?(m(),M("th",JE,[e.selectable==="multiple"?(m(),he(wd,{key:0,"model-value":A.value,indeterminate:x.value,"aria-label":"Select all rows","onUpdate:modelValue":ae},null,8,["model-value","indeterminate"])):V("",!0)])):V("",!0),(m(!0),M(Ce,null,Fe(o.value,Y=>(m(),M("th",{key:`th-${Y.key}`,scope:"col",class:Le(["nb-data-table__th",`nb-data-table__th--${Y.align||"left"}`,{"nb-data-table__th--sortable":Y.sortable},{"nb-data-table__th--sorted":N(Y)},v.value&&Y.phoneHidden&&"nb-data-table__th--phone-hidden"]),"aria-sort":Y.sortable?O(Y):void 0},[Y.sortable?(m(),M("button",{key:0,type:"button",class:"nb-data-table__sort",onClick:Se=>me(Y)},[b("span",tx,[xe(I.$slots,`header-${Y.key}`,{column:Y},()=>[le(Z(Y.header),1)],!0)]),j(Ue,{name:te(Y),class:"nb-data-table__sort-icon","aria-hidden":"true"},null,8,["name"])],8,ex)):(m(),M("span",ix,[xe(I.$slots,`header-${Y.key}`,{column:Y},()=>[le(Z(Y.header),1)],!0)]))],10,QE))),128)),u.value?(m(),M("th",nx,[...z[5]||(z[5]=[b("span",{class:"nb-sr-only"},"Row actions",-1)])])):V("",!0)],8,YE)],8,GE),b("tbody",{class:"nb-data-table__body",role:v.value?"rowgroup":void 0},[e.loading?(m(!0),M(Ce,{key:0},Fe(e.skeletonRows,Y=>(m(),M("tr",{key:`skeleton-${Y}`,class:"nb-data-table__row nb-data-table__row--skeleton"},[d.value?(m(),M("td",sx)):V("",!0),c.value?(m(),M("td",ax,[...z[6]||(z[6]=[b("span",{class:"nb-data-table__skeleton nb-data-table__skeleton--box"},null,-1)])])):V("",!0),(m(!0),M(Ce,null,Fe(o.value,Se=>(m(),M("td",{key:`sk-${Y}-${Se.key}`,class:"nb-data-table__td"},[...z[7]||(z[7]=[b("span",{class:"nb-data-table__skeleton"},null,-1)])]))),128)),u.value?(m(),M("td",lx,[...z[8]||(z[8]=[b("span",{class:"nb-data-table__skeleton nb-data-table__skeleton--box"},null,-1)])])):V("",!0)]))),128)):e.error?(m(),M("tr",ox,[b("td",{colspan:h.value,class:"nb-data-table__state nb-data-table__state--error"},[xe(I.$slots,"error",{error:e.error},()=>[j(yi,{is:"span",align:"center",justify:"center",gap:"xs",class:"nb-data-table__state-inner"},{default:G(()=>[j(Ue,{name:"warning-circle-fill","aria-hidden":"true"}),b("span",null,Z(e.error),1)]),_:1})],!0)],8,cx)])):e.rows.length?(m(!0),M(Ce,{key:3},Fe(e.rows,(Y,Se)=>(m(),M(Ce,{key:E(Y)},[b("tr",{class:Le(["nb-data-table__row",{"nb-data-table__row--selected":X(Y)},{"nb-data-table__row--clickable":S.value},d.value&&{"nb-data-table__row--expanded":pe(Y),"nb-data-table__row--even":Se%2==1}]),role:v.value?"row":void 0,"aria-selected":e.selectable==="none"?void 0:X(Y),tabindex:S.value?0:void 0,onClick:Me=>k(Y,Se),onKeydown:Me=>P(Me,Y,Se),onKeyup:Me=>R(Me,Y,Se)},[d.value?(m(),M("td",{key:0,class:"nb-data-table__td nb-data-table__expand-cell",role:v.value?"cell":void 0,onClick:z[0]||(z[0]=qe(()=>{},["stop"]))},[b("button",{type:"button",class:"nb-data-table__expand","aria-expanded":pe(Y),"aria-controls":pe(Y)?U(Se):void 0,"aria-label":_e(Y,Se),onClick:Me=>ye(Y)},[j(Ue,{name:l2,class:"nb-data-table__expand-icon","aria-hidden":"true"})],8,px)],8,fx)):V("",!0),c.value?(m(),M("td",{key:1,class:"nb-data-table__td nb-data-table__select-cell",onClick:z[1]||(z[1]=qe(()=>{},["stop"])),onMousedown:re,onKeydown:re},[e.selectable==="multiple"?(m(),he(wd,{key:0,"model-value":X(Y),"aria-label":`Select row ${Se+1}`,"onUpdate:modelValue":Me=>ue(Y,Se)},null,8,["model-value","aria-label","onUpdate:modelValue"])):(m(),M("input",{key:1,type:"radio",class:"nb-data-table__radio",name:a,checked:X(Y),"aria-label":`Select row ${Se+1}`,onChange:Me=>J(Y)},null,40,_x))],32)):V("",!0),(m(!0),M(Ce,null,Fe(o.value,Me=>(m(),M("td",{key:`td-${E(Y)}-${Me.key}`,class:Le(["nb-data-table__td",`nb-data-table__td--${Me.align||"left"}`,Me.cellClass,v.value&&w(Me)]),role:v.value?"cell":void 0,"data-label":e.stackOnPhone?Me.header:void 0},[xe(I.$slots,`cell-${Me.key}`,{row:Y,value:C(Me,Y),column:Me,rowIndex:Se},()=>[Me.render?(m(),he($,{key:0,column:Me,row:Y,"row-index":Se},null,8,["column","row","row-index"])):(m(),M(Ce,{key:1},[le(Z(g(C(Me,Y))),1)],64))],!0)],10,mx))),128)),u.value?(m(),M("td",{key:2,class:"nb-data-table__td nb-data-table__actions-cell",onClick:z[2]||(z[2]=qe(()=>{},["stop"]))},[xe(I.$slots,"row-actions",{row:Y,rowIndex:Se},void 0,!0)])):V("",!0)],42,hx),pe(Y)?(m(),M("tr",{key:0,class:"nb-data-table__detail-row",role:v.value?"row":void 0},[b("td",{colspan:h.value,class:"nb-data-table__detail-cell",role:v.value?"cell":void 0},[b("div",{id:U(Se),class:"nb-data-table__detail",role:"region","aria-label":_e(Y,Se)},[xe(I.$slots,"row-detail",{row:Y,rowIndex:Se},void 0,!0)],8,bx)],8,gx)],8,vx)):V("",!0)],64))),128)):(m(),M("tr",ux,[b("td",{colspan:h.value,class:"nb-data-table__state nb-data-table__state--empty"},[xe(I.$slots,"empty",{},()=>[b("span",null,Z(e.emptyMessage||"No data to display"),1)],!0)],8,dx)]))],8,rx)],8,WE)]),I.$slots.footer?(m(),M("div",yx,[xe(I.$slots,"footer",{},void 0,!0)])):V("",!0)],16))}}),[["__scopeId","data-v-e1388797"]]),wx=["width","height","aria-label"],Sx={key:0},Cx=["x1","x2","y1","y2"],kx={class:"nb-chart__axis"},Ax=["x","y"],Mx={class:"nb-chart__axis"},$x=["x","y"],Lx=["x1","x2","y1","y2"],Ex=["y","transform"],xx=["x","y"],Hx=["d","fill"],Tx=["d","stroke"],Nx=["cx","cy","r","fill","onMousedown","onContextmenu"],Px={key:5},Ox=["x1","x2","y1","y2"],Ix=["x1","x2","y1","y2"],Rx="var(--nb-c-surface)",Vx=tt(Ne({__name:"InterpolationChart",props:{modelValue:{default:()=>[]},inputLabel:{default:void 0},outputLabel:{default:void 0},inputMin:{default:0},inputMax:{default:100},outputMin:{default:0},outputMax:{default:100},editable:{type:Boolean,default:!0},minPoints:{default:2},inputStep:{default:0},outputStep:{default:0},title:{default:void 0},subtitle:{default:void 0},height:{default:280},showLegend:{type:Boolean,default:!1},showTooltip:{type:Boolean,default:!0},showGrid:{type:Boolean,default:!0},colors:{default:()=>[]}},emits:["update:modelValue"],setup(e,{emit:t}){let i=e,n=t,r=q(()=>u2(0,i.colors)),s={top:16,right:16,bottom:32,left:48},a=K(null),l=h2(a,{width:480,height:240}),o=q(()=>Math.max(0,l.value.width-s.left-s.right)),c=q(()=>Math.max(0,l.value.height-s.top-s.bottom)),u=q(()=>[...i.modelValue].sort((pe,ye)=>pe.input-ye.input)),d=q(()=>[i.inputMin,i.inputMax]),h=q(()=>{let pe=u.value.map(ye=>ye.output);return d2(Math.min(i.outputMin,...pe),Math.max(i.outputMax,...pe),.05)}),f=q(()=>kc(d.value,[s.left,l.value.width-s.right])),v=q(()=>kc(h.value,[l.value.height-s.bottom,s.top])),p=q(()=>f.value.ticks(6)),w=q(()=>v.value.ticks(5)),_=pe=>{let[ye,U]=d.value,[_e,ge]=f.value.range;return ye+(pe-_e)/(ge-_e)*(U-ye)},y=pe=>{let[ye,U]=h.value,[_e,ge]=v.value.range;return ye+(pe-_e)/(ge-_e)*(U-ye)},C=(pe,ye)=>!ye||ye<=0?pe:Math.round(pe/ye)*ye,g=(pe,ye,U)=>Math.max(ye,Math.min(U,pe)),$=(pe,ye=1)=>Math.round(pe*10**ye)/10**ye,E=q(()=>{let pe=u.value;return pe.length<2?"":pe.map((ye,U)=>`${U===0?"M":"L"}${f.value(ye.input)},${v.value(ye.output)}`).join(" ")}),L=q(()=>{let pe=u.value;if(pe.length<2)return"";let ye=l.value.height-s.bottom;return`${pe.map((U,_e)=>`${_e===0?"M":"L"}${f.value(U.input)},${v.value(U.output)}`).join(" ")} L${f.value(pe[pe.length-1].input)},${ye} L${f.value(pe[0].input)},${ye} Z`}),B=K(null),T=K(null);function X(pe){n("update:modelValue",[...pe].sort((ye,U)=>ye.input-U.input))}function W(pe,ye){i.editable&&(B.value=pe,window.addEventListener("mousemove",x),window.addEventListener("mouseup",F))}function A(pe){var _e;let ye=(_e=a.value)==null?void 0:_e.querySelector("svg");if(!ye)return null;let U=ye.getBoundingClientRect();return{px:pe.clientX-U.left,py:pe.clientY-U.top}}function x(pe){if(B.value===null)return;let ye=A(pe);if(!ye)return;let U=_(ye.px),_e=y(ye.py),ge=[...u.value],se=B.value,H=i.inputStep>0?i.inputStep:.1;ge[se]={input:$(C(g(U,se>0?ge[se-1].input+H:i.inputMin,se<ge.length-1?ge[se+1].input-H:i.inputMax),i.inputStep)),output:$(C(g(_e,i.outputMin,i.outputMax),i.outputStep))},X(ge)}function F(){B.value=null,window.removeEventListener("mousemove",x),window.removeEventListener("mouseup",F)}function ie(pe){if(B.value!==null)return;let ye=A(pe);if(!ye)return;let U=-1,_e=1/0;for(let ge=0;ge<u.value.length;ge++){let se=u.value[ge],H=f.value(se.input)-ye.px,N=v.value(se.output)-ye.py,O=Math.sqrt(H*H+N*N);O<_e&&(_e=O,U=ge)}T.value=_e<20?U:null,ne.value={x:ye.px+12,y:ye.py-12}}function re(){B.value===null&&(T.value=null)}function ue(){B.value!==null&&(B.value=null,window.removeEventListener("mousemove",x),window.removeEventListener("mouseup",F))}function J(pe){if(!i.editable)return;let ye=A(pe);if(!ye)return;let U=_(ye.px),_e=y(ye.py);if(U<i.inputMin||U>i.inputMax||_e<i.outputMin||_e>i.outputMax)return;let ge=$(C(g(U,i.inputMin,i.inputMax),i.inputStep)),se=$(C(g(_e,i.outputMin,i.outputMax),i.outputStep));X([...u.value,{input:ge,output:se}])}function ae(pe){i.editable&&(u.value.length<=i.minPoints||X(u.value.filter((ye,U)=>U!==pe)))}ri(()=>{window.removeEventListener("mousemove",x),window.removeEventListener("mouseup",F)});let ne=K({x:0,y:0}),Q=q(()=>T.value!==null||B.value!==null),oe=q(()=>{let pe=B.value??T.value;return pe===null?"":`Point ${pe+1}`}),ve=q(()=>{let pe=B.value??T.value;if(pe===null||pe>=u.value.length)return[];let ye=u.value[pe];return[{label:i.inputLabel||"Input",value:fe(ye.input),color:r.value},{label:i.outputLabel||"Output",value:fe(ye.output),color:r.value}]}),fe=pe=>Number.isInteger(pe)?String(pe):pe.toFixed(1);return(pe,ye)=>(m(),he(o2,{title:e.title,subtitle:e.subtitle,height:e.height,"show-legend":!1},{default:G(()=>[b("div",{ref_key:"root",ref:a,class:"nb-interpolation-chart"},[(m(),M("svg",{width:de(l).width,height:de(l).height,class:"nb-chart__svg",role:"img","aria-label":e.title||"Interpolation chart",onMousemove:ie,onMouseleave:re,onMouseup:ue,onDblclick:J,onContextmenu:ye[0]||(ye[0]=qe(()=>{},["prevent"]))},[e.showGrid&&de(l).width>0?(m(),M("g",Sx,[(m(!0),M(Ce,null,Fe(w.value,U=>(m(),M("line",{key:`grid-${U}`,class:"nb-chart__gridline",x1:s.left,x2:de(l).width-s.right,y1:v.value(U),y2:v.value(U)},null,8,Cx))),128))])):V("",!0),b("g",kx,[(m(!0),M(Ce,null,Fe(w.value,U=>(m(),M("text",{key:`yt-${U}`,x:s.left-6,y:v.value(U),"text-anchor":"end","dominant-baseline":"middle"},Z(fe(U)),9,Ax))),128))]),b("g",Mx,[(m(!0),M(Ce,null,Fe(p.value,U=>(m(),M("text",{key:`xt-${U}`,x:f.value(U),y:de(l).height-s.bottom+14,"text-anchor":"middle"},Z(fe(U)),9,$x))),128))]),b("line",{class:"nb-chart__axis-line",x1:s.left,x2:de(l).width-s.right,y1:de(l).height-s.bottom,y2:de(l).height-s.bottom},null,8,Lx),e.outputLabel?(m(),M("text",{key:1,class:"nb-chart__axis-label",x:12,y:s.top+c.value/2,"text-anchor":"middle",transform:`rotate(-90, 12, ${s.top+c.value/2})`},Z(e.outputLabel),9,Ex)):V("",!0),e.inputLabel?(m(),M("text",{key:2,class:"nb-chart__axis-label",x:s.left+o.value/2,y:de(l).height-2,"text-anchor":"middle"},Z(e.inputLabel),9,xx)):V("",!0),u.value.length>=2?(m(),M("path",{key:3,class:"nb-interpolation-chart__area",d:L.value,fill:r.value,opacity:"0.12"},null,8,Hx)):V("",!0),u.value.length>=2?(m(),M("path",{key:4,class:"nb-interpolation-chart__line",d:E.value,stroke:r.value,fill:"none","stroke-width":"2","stroke-linejoin":"round","stroke-linecap":"round"},null,8,Tx)):V("",!0),(m(!0),M(Ce,null,Fe(u.value,(U,_e)=>(m(),M("circle",{key:`pt-${_e}`,class:Le(["nb-interpolation-chart__point",{"nb-interpolation-chart__point--editable":e.editable,"nb-interpolation-chart__point--dragging":B.value===_e,"nb-interpolation-chart__point--hover":T.value===_e&&B.value===null}]),cx:f.value(U.input),cy:v.value(U.output),r:B.value===_e?7:T.value===_e?6:5,fill:r.value,stroke:Rx,"stroke-width":"2",onMousedown:qe(ge=>W(_e,ge),["prevent"]),onContextmenu:qe(ge=>ae(_e),["prevent"])},null,42,Nx))),128)),B.value===null?V("",!0):(m(),M("g",Px,[b("line",{class:"nb-interpolation-chart__crosshair",x1:f.value(u.value[B.value].input),x2:f.value(u.value[B.value].input),y1:s.top,y2:de(l).height-s.bottom},null,8,Ox),b("line",{class:"nb-interpolation-chart__crosshair",x1:s.left,x2:de(l).width-s.right,y1:v.value(u.value[B.value].output),y2:v.value(u.value[B.value].output)},null,8,Ix)]))],40,wx)),j(c2,{visible:e.showTooltip&&Q.value,x:ne.value.x,y:ne.value.y,title:oe.value,rows:ve.value},null,8,["visible","x","y","title","rows"])],512)]),_:1},8,["title","subtitle","height"]))}}),[["__scopeId","data-v-676875de"]]),ag=6,Dx=8,Zx=(e,t=ag)=>{let i=[];if(e<=0)return i;let n=Math.max(1,Math.ceil(e/t));for(let r=0;r<e;r+=n)i.push(r);return i[i.length-1]!==e-1&&i.push(e-1),i},Lc=(e,t,i)=>{for(let n=1;n<e.length;n++){let r=e[n-1],s=e[n],a=r.x+t(r.index)/2;if(s.x-t(s.index)/2-a<i)return!1}return!0},Bx=(e,t,i)=>{if(i===void 0||t>=i)return e;let n=t/2;return Math.min(Math.max(e,n),i-n)},g8=(e,t,i,n,r)=>{let s=o=>o.x===i(o.index)?n:r,a=e,l=a[a.length-1];return a.length>2&&!Lc(a.slice(-2),t,s(l))&&(a=[...a.slice(0,-2),l]),a.length>2&&!Lc(a.slice(0,2),t,s(a[0]))&&(a=[a[0],...a.slice(2)]),a},Fx=({count:e,positionOf:t,widthOf:i,width:n,gap:r=Dx})=>{let s=Zx(e);if(!i)return s.map(u=>({index:u,x:t(u)}));let a=u=>({index:u,x:Bx(t(u),i(u),n)}),l=g8(s.map(a),i,t,-1/0,r);if(Lc(l,i,0))return l;let o=e-1,c=Math.max(1,Math.ceil(e/ag))+1;for(let u=c;u<=o;u++){let d=[];for(let f=0;f<o;f+=u)d.push(f);let h=g8([...d,o].map(a),i,t,r,r);if(Lc(h,i,r))return h}return[a(0)]},zx=["width","height","aria-label"],Ux={key:0},Wx=["x1","x2","y1","y2"],jx={class:"nb-chart__axis"},Kx=["x","y"],qx=["x","y"],Gx=["x1","x2","y1","y2"],Yx=["d","fill"],Xx=["d","stroke"],Jx=["cx","cy","r","fill"],Qx=["x1","x2","y1","y2"],eH=tt(Ne({__name:"LineChart",props:{series:{default:()=>[]},area:{type:Boolean,default:!1},points:{type:Boolean,default:!1},curve:{default:"smooth"},valueFormatter:{},title:{default:void 0},subtitle:{default:void 0},height:{default:280},showLegend:{type:Boolean,default:!0},showTooltip:{type:Boolean,default:!0},showGrid:{type:Boolean,default:!0},colors:{default:()=>Cc}},setup(e){let t=e,i={top:12,right:16,bottom:28,left:44},n=K(null),r=h2(n,{width:480,height:240}),s=q(()=>t.series.map((A,x)=>({name:A.name,data:A.data,color:A.color??u2(x,t.colors)}))),a=q(()=>{var A;return(((A=t.series[0])==null?void 0:A.data)??[]).map(x=>x.x)}),l=q(()=>{let A=t.series.flatMap(x=>x.data.map(F=>F.y));return A.length?d2(Math.min(0,...A),Math.max(...A),.1):[0,1]}),o=q(()=>kc(l.value,[Math.max(i.top,r.value.height-i.bottom),i.top])),c=q(()=>o.value.ticks(5)),u=K(7),d=A=>Math.max(o.value(A),u.value),h=q(()=>Math.max(0,r.value.width-i.left-i.right)),f=A=>{let x=a.value.length;return x<=1?i.left+h.value/2:i.left+A/(x-1)*h.value},v=K(null),p=K(null),w=()=>{let A=v.value;if(!A||typeof document>"u")return;let x=document.createElementNS("http://www.w3.org/2000/svg","text");if(typeof x.getComputedTextLength!="function")return;x.setAttribute("visibility","hidden"),x.setAttribute("aria-hidden","true"),A.appendChild(x);let F=new Map;for(let ie of a.value){let re=Z(ie);F.has(re)||(x.textContent=re,F.set(re,x.getComputedTextLength()))}if(typeof x.getBBox=="function"){x.setAttribute("dominant-baseline","middle"),x.setAttribute("y","0"),x.textContent="0";let ie=-x.getBBox().y;ie>0&&(u.value=ie)}A.removeChild(x),p.value=F};Ve(a,w,{flush:"post"});let _=typeof document>"u"?void 0:document.fonts;nt(()=>{var A;w(),(A=_==null?void 0:_.addEventListener)==null||A.call(_,"loadingdone",w)}),ri(()=>{var A;(A=_==null?void 0:_.removeEventListener)==null||A.call(_,"loadingdone",w)});let y=q(()=>{let A=a.value,x=p.value;return Fx({count:A.length,positionOf:f,widthOf:x?F=>x.get(Z(A[F]))??0:void 0,width:r.value.width}).map(F=>({...F,value:A[F.index]}))}),C=A=>A.length?$(A.map((x,F)=>[f(F),o.value(x.y)]),t.curve):"",g=A=>{if(!A.length)return"";let x=A.map((ie,re)=>[f(re),o.value(ie.y)]),F=r.value.height-i.bottom;return`${$(x,t.curve)} L${x[x.length-1][0]},${F} L${x[0][0]},${F} Z`},$=(A,x)=>{if(!A.length)return"";if(A.length===1)return`M${A[0][0]},${A[0][1]}`;if(x==="linear")return A.map((re,ue)=>`${ue===0?"M":"L"}${re[0]},${re[1]}`).join(" ");if(x==="step"){let re=`M${A[0][0]},${A[0][1]}`;for(let ue=1;ue<A.length;ue++){let[J,ae]=A[ue-1],[ne,Q]=A[ue],oe=(J+ne)/2;re+=` L${oe},${ae} L${oe},${Q} L${ne},${Q}`}return re}let F=.2,ie=`M${A[0][0]},${A[0][1]}`;for(let re=0;re<A.length-1;re++){let ue=A[re-1]??A[re],J=A[re],ae=A[re+1],ne=A[re+2]??ae,Q=J[0]+(ae[0]-ue[0])*F,oe=J[1]+(ae[1]-ue[1])*F,ve=ae[0]-(ne[0]-J[0])*F,fe=ae[1]-(ne[1]-J[1])*F;ie+=` C${Q},${oe} ${ve},${fe} ${ae[0]},${ae[1]}`}return ie},E=A=>Math.abs(A)>=1e3?`${(A/1e3).toFixed(1)}k`:Number.isInteger(A)?String(A):A.toFixed(1),L=A=>t.valueFormatter?t.valueFormatter(A):E(A),B=K(null),T=K({x:0,y:0}),X=A=>{let x=A.currentTarget.getBoundingClientRect(),F=A.clientX-x.left,ie=a.value.length;if(!ie)return;let re=(F-i.left)/Math.max(1,h.value);B.value=Math.round(Math.min(1,Math.max(0,re))*(ie-1)),T.value={x:A.clientX-x.left+12,y:A.clientY-x.top+12}},W=q(()=>B.value===null?[]:s.value.map(A=>{let x=A.data[B.value];return{label:A.name,value:(x==null?void 0:x.label)??L((x==null?void 0:x.y)??0),color:A.color}}));return(A,x)=>(m(),he(o2,{title:e.title,subtitle:e.subtitle,height:e.height,"show-legend":e.showLegend&&s.value.length>0},{legend:G(()=>[j(xv,{items:s.value.map(F=>({label:F.name,color:F.color}))},null,8,["items"])]),default:G(()=>[b("div",{ref_key:"root",ref:n,class:"nb-line-chart"},[(m(),M("svg",{width:de(r).width,height:de(r).height,class:"nb-chart__svg",role:"img","aria-label":e.title||"Line chart",onMouseleave:x[0]||(x[0]=F=>B.value=null),onMousemove:X},[e.showGrid&&de(r).width>0?(m(),M("g",Ux,[(m(!0),M(Ce,null,Fe(c.value,F=>(m(),M("line",{key:`grid-${F}`,class:"nb-chart__gridline",x1:i.left,x2:de(r).width-i.right,y1:o.value(F),y2:o.value(F)},null,8,Wx))),128))])):V("",!0),b("g",jx,[(m(!0),M(Ce,null,Fe(c.value,F=>(m(),M("text",{key:`yt-${F}`,x:i.left-6,y:d(F),"text-anchor":"end","dominant-baseline":"middle"},Z(L(F)),9,Kx))),128))]),b("g",{ref_key:"xAxis",ref:v,class:"nb-chart__axis"},[(m(!0),M(Ce,null,Fe(y.value,(F,ie)=>(m(),M("text",{key:`xt-${ie}`,x:F.x,y:de(r).height-i.bottom+14,"text-anchor":"middle"},Z(F.value),9,qx))),128))],512),b("line",{class:"nb-chart__axis-line",x1:i.left,x2:de(r).width-i.right,y1:de(r).height-i.bottom,y2:de(r).height-i.bottom},null,8,Gx),(m(!0),M(Ce,null,Fe(s.value,(F,ie)=>(m(),M("g",{key:`s-${ie}`},[e.area?(m(),M("path",{key:0,class:"nb-chart__area",d:g(F.data),fill:F.color,opacity:"0.18"},null,8,Yx)):V("",!0),b("path",{class:"nb-chart__line",d:C(F.data),stroke:F.color,fill:"none","stroke-width":"2","stroke-linejoin":"round","stroke-linecap":"round"},null,8,Xx),e.points?(m(!0),M(Ce,{key:1},Fe(F.data,(re,ue)=>(m(),M("circle",{key:`p-${ie}-${ue}`,cx:f(ue),cy:o.value(re.y),r:B.value===ue?4:3,fill:F.color,class:"nb-chart__point"},null,8,Jx))),128)):V("",!0)]))),128)),B.value===null?V("",!0):(m(),M("line",{key:1,class:"nb-chart__hover-line",x1:f(B.value),x2:f(B.value),y1:i.top,y2:de(r).height-i.bottom},null,8,Qx))],40,zx)),j(c2,{visible:e.showTooltip&&B.value!==null,x:T.value.x,y:T.value.y,title:B.value===null?"":String(a.value[B.value]),rows:W.value},null,8,["visible","x","y","title","rows"])],512)]),_:1},8,["title","subtitle","height","show-legend"]))}}),[["__scopeId","data-v-9a4509a0"]]),ho=0,lg="";function og(){typeof document>"u"||(ho===0&&(lg=document.body.style.overflow,document.body.style.overflow="hidden"),ho+=1)}function cg(){typeof document>"u"||ho!==0&&(--ho,ho===0&&(document.body.style.overflow=lg))}var tH=['a[href]:not([tabindex="-1"])','area[href]:not([tabindex="-1"])','button:not([disabled]):not([tabindex="-1"])','input:not([disabled]):not([type="hidden"]):not([tabindex="-1"])','select:not([disabled]):not([tabindex="-1"])','textarea:not([disabled]):not([tabindex="-1"])','summary:not([tabindex="-1"])','audio[controls]:not([tabindex="-1"])','video[controls]:not([tabindex="-1"])','iframe:not([tabindex="-1"])','[contenteditable]:not([contenteditable="false"]):not([tabindex="-1"])','[tabindex]:not([tabindex="-1"])'].map(e=>`${e}:not([hidden]):not([aria-hidden="true"])`).join(",");function iH(e){return e?Array.from(e.querySelectorAll(tH)).filter(t=>t.getAttribute("aria-disabled")!=="true"):[]}function nH(){return typeof document>"u"?[]:Array.from(document.querySelectorAll('[aria-modal="true"]'))}function b8(e){if(!e)return!1;let t=nH();return t.length===0||t[t.length-1]===e}function rH(e){let{container:t,active:i,initialFocus:n,floatingSelector:r}=e;function s(w){let _=r==null?void 0:r();return!_||!w?!1:!!w.closest(_)}function a(w){let _=t();return!!_&&!!w&&_.contains(w)}function l(){return iH(t())}function o(){var w;(w=t())==null||w.focus()}function c(){let w=l()[0];w?w.focus():o()}let u=null;function d(){let w=u;u=null,w!=null&&w.isConnected&&w.focus()}function h(){u=document.activeElement instanceof HTMLElement?document.activeElement:null}function f(w){if(w.key!=="Tab"||!i())return;let _=t();if(!_||!b8(_)||s(document.activeElement))return;let y=l(),C=document.activeElement;if(y.length===0){w.preventDefault(),a(C)||o();return}let g=y[0],$=y[y.length-1];w.shiftKey&&(C===g||!a(C))?(w.preventDefault(),$.focus()):!w.shiftKey&&C===$?(w.preventDefault(),g.focus()):a(C)||(w.preventDefault(),g.focus())}function v(w){if(!i())return;let _=w.relatedTarget;if(_ instanceof Element){if(a(_)||s(_))return}else if(_!==null)return;requestAnimationFrame(()=>{if(!i())return;let y=document.activeElement;a(y)||s(y)||y&&y!==document.body&&!y.isConnected||b8(t())&&c()})}typeof document<"u"&&(document.addEventListener("keydown",f,!0),document.addEventListener("focusout",v,!0));async function p(){if(await Gt(),!i())return;let w=(n==null?void 0:n())??null;w?w.focus():c()}return Ve(i,(w,_)=>{w!==_&&(w?(h(),p()):d())}),nt(()=>{i()&&(h(),p())}),Ii(()=>{typeof document<"u"&&(document.removeEventListener("keydown",f,!0),document.removeEventListener("focusout",v,!0)),d()}),{focusInside:c,restoreFocus:d}}var sH=["[data-nb-confirm-floating]",".nb-select__dropdown",".nb-menu",".nb-date-picker__calendar",".nb-user-menu__panel",".nb-sidebar-menu-item__flyout"],aH=new Set;function ug(e=[]){return[...sH,...aH,...e].map(t=>t.trim()).filter(Boolean).join(",")}function lH(e,t){if(!e)return;let i=`${t?0:200}ms`;e.style.transitionDuration=i;let n=e.parentElement;n instanceof HTMLElement&&(n.style.transitionDuration=i)}var oH=["role","aria-labelledby","aria-describedby","aria-busy"],cH={key:0,class:"nb-modal--header"},uH=["disabled","aria-disabled"],dH=["tabindex","role","aria-labelledby"],dg=tt(Ne({__name:"Modal",props:{open:{type:Boolean,default:!1},title:{default:void 0},size:{default:sS.Medium},closeOnOverlay:{type:Boolean,default:!0},role:{default:"dialog"},labelledBy:{default:void 0},describedBy:{default:void 0},busy:{type:Boolean,default:!1},closeDisabled:{type:Boolean,default:!1},closeAppearance:{default:"corner"},closeOnEscape:{type:Boolean,default:!0},trapFocus:{type:Boolean,default:!0},initialFocus:{type:[String,Function],default:void 0},floatingSelectors:{default:void 0}},emits:["close"],setup(e,{expose:t,emit:i}){let n=e,r=i,s=Wn(),a=q(()=>!!s.header||!!n.title),l=`nb-modal-title-${Oi()}`,o=K(null),c=K(null),{layerProps:u}=Js({overlay:!0});function d(){n.closeOnOverlay&&r("close")}function h(){var T;let B=n.initialFocus;return B?typeof B=="function"?B():((T=o.value)==null?void 0:T.querySelector(B))??null:null}rH({container:()=>o.value,active:()=>n.open&&n.trapFocus,initialFocus:h,floatingSelector:()=>ug(n.floatingSelectors)}),qA(()=>n.open);let f=!1;function v(){f||(f=!0,og())}function p(){f&&(f=!1,cg())}let w=K(!1);function _(){let B=c.value;if(!B)return;let T=B.scrollHeight-B.clientHeight;!w.value&&T>4?w.value=!0:w.value&&T<=0&&(w.value=!1)}let y=null,C=null;function g(){let B=c.value;B&&($(),typeof ResizeObserver<"u"&&(y=new ResizeObserver(()=>_()),y.observe(B)),typeof MutationObserver<"u"&&(C=new MutationObserver(()=>_()),C.observe(B,{childList:!0,subtree:!0,characterData:!0})),_())}function $(){y==null||y.disconnect(),y=null,C==null||C.disconnect(),C=null}Ve(()=>n.open,async B=>{B?v():p(),await Gt(),B?g():($(),w.value=!1)},{immediate:!0}),Ii(()=>{p(),$()});function E(){let B=o.value;if(!B)return!1;let T=Array.from(document.querySelectorAll('[aria-modal="true"]'));return T.length===0||T[T.length-1]===B}function L(B){B.key==="Escape"&&(B.defaultPrevented||!n.open||!n.closeOnEscape||n.closeDisabled||E()&&r("close"))}return nt(()=>{document.addEventListener("keydown",L),n.open&&g()}),Ii(()=>{document.removeEventListener("keydown",L)}),t({dialogEl:()=>o.value,bodyEl:()=>c.value}),(B,T)=>(m(),he(an,{to:"body"},[j(Dh,{name:"nb-modal"},{default:G(()=>[e.open?(m(),M("div",{key:0,class:"nb-modal--overlay",onClick:qe(d,["self"])},[b("div",Zt({ref_key:"contentRef",ref:o,class:["nb-modal--content",`nb-modal--content--${e.size}`]},de(u),{role:e.role,"aria-modal":"true","aria-labelledby":e.labelledBy??(a.value?l:void 0),"aria-describedby":e.describedBy,"aria-busy":e.busy?"true":void 0,tabindex:"-1",onClick:T[2]||(T[2]=qe(()=>{},["stop"]))}),[a.value?(m(),M("header",cH,[b("span",{id:l,class:"nb-modal--title"},[xe(B.$slots,"header",{},()=>[le(Z(e.title),1)],!0)]),e.closeAppearance==="button"?(m(),he(Pt,{key:0,class:"nb-modal--close-button",size:"sm",variant:"ghost",icon:wc,"aria-label":"Close",disabled:e.closeDisabled,onClick:T[0]||(T[0]=X=>r("close"))},null,8,["disabled"])):(m(),M("button",{key:1,class:"nb-modal--close","aria-label":"Close",disabled:e.closeDisabled,"aria-disabled":e.closeDisabled?"true":void 0,onClick:T[1]||(T[1]=X=>r("close"))},[j(Ue,{name:de(gs)},null,8,["name"])],8,uH))])):V("",!0),b("main",{ref_key:"bodyRef",ref:c,class:"nb-modal--body",tabindex:w.value?0:void 0,role:w.value?"region":void 0,"aria-labelledby":w.value?e.labelledBy??(a.value?l:void 0):void 0},[xe(B.$slots,"default",{},void 0,!0)],8,dH),B.$slots.footer?(m(),he(yi,{key:1,is:"footer",justify:"end",class:"nb-modal--footer",distributed:""},{default:G(()=>[xe(B.$slots,"footer",{},void 0,!0)]),_:3})):V("",!0)],16,oH)])):V("",!0)]),_:3})]))}}),[["__scopeId","data-v-0d8e2855"]]),hH={key:0,class:"nb-confirm__message"},fH={key:0,class:"nb-confirm__subject-kind"},pH={class:"nb-confirm__subject-name"},_H={key:1,class:"nb-confirm__gate"},mH={class:"nb-confirm__live"},vH={key:0,class:"nb-confirm__status",role:"status"},gH={key:1,class:"nb-confirm__status nb-confirm__status--success",role:"status"},bH=tt(Ne({__name:"Confirm",props:{open:{type:Boolean,default:!1},title:{},message:{default:void 0},subject:{default:void 0},subjectLabel:{default:void 0},confirmLabel:{default:"Confirm"},cancelLabel:{default:"Cancel"},tone:{default:"danger"},typeToConfirm:{default:void 0},typeToConfirmLabel:{default:void 0},typeToConfirmHelper:{default:void 0},busy:{type:Boolean,default:!1},busyLabel:{default:"Working..."},succeeded:{type:Boolean,default:!1},successLabel:{default:void 0},error:{default:void 0},size:{default:"sm"},floatingSelectors:{default:()=>[]},contentClass:{default:void 0}},emits:["confirm","cancel"],setup(e,{expose:t,emit:i}){let n=e,r=i,s=Oi(),a=`nb-confirm-title-${s}`,l=`nb-confirm-body-${s}`,o=Wn(),c=K(null),u=K(null),d=K(null),h=K(""),f=J4(),v=q(()=>n.busy||n.succeeded);function p(){return!!n.message||!!n.subject||!!o.default}let w=q(()=>n.tone==="danger"?"danger":"primary"),_=q(()=>n.typeToConfirmLabel??`Type ${n.typeToConfirm} to confirm`),y=q(()=>!n.typeToConfirm||h.value.trim()===n.typeToConfirm),C=q(()=>y.value&&!v.value);function g(){C.value&&r("confirm")}function $(){var _e;let U=(_e=d.value)==null?void 0:_e.$el;return U instanceof HTMLElement?U:null}function E(){var U;return((U=c.value)==null?void 0:U.closest('[role="dialog"],[role="alertdialog"]'))??null}function L(){return typeof document>"u"?[]:Array.from(document.querySelectorAll('[aria-modal="true"]'))}function B(){let U=E();if(!U)return!1;let _e=L();return _e.length===0||_e[_e.length-1]===U}let T=['a[href]:not([tabindex="-1"])','area[href]:not([tabindex="-1"])','button:not([disabled]):not([tabindex="-1"])','input:not([disabled]):not([type="hidden"]):not([tabindex="-1"])','select:not([disabled]):not([tabindex="-1"])','textarea:not([disabled]):not([tabindex="-1"])','summary:not([tabindex="-1"])','audio[controls]:not([tabindex="-1"])','video[controls]:not([tabindex="-1"])','iframe:not([tabindex="-1"])','[contenteditable]:not([contenteditable="false"]):not([tabindex="-1"])','[tabindex]:not([tabindex="-1"])'].map(U=>`${U}:not([hidden]):not([aria-hidden="true"])`).join(",");function X(){return ug(n.floatingSelectors)}function W(U){return U instanceof Element?!!U.closest(X()):!1}function A(U){let _e=E();return!!_e&&!!U&&_e.contains(U)}function x(){let U=E();return U?Array.from(U.querySelectorAll(T)).filter(_e=>_e.getAttribute("aria-disabled")!=="true"):[]}function F(){let U=E();return U?(U.focus(),!0):!1}function ie(){let U=x()[0];U?U.focus():F()}let re=null;function ue(){let U=re;re=null,U!=null&&U.isConnected&&U.focus()}function J(){lH(E(),f.value)}Ve(f,()=>{n.open&&J()}),Ve(()=>[n.busy,n.error],async(U,_e)=>{if(!n.open)return;let[ge,se]=U,H=(_e==null?void 0:_e[0])??!1;if(await Gt(),ge){x().length===0&&F();return}if(H&&se){let O=u.value;O?O.focus():ie();return}let N=document.activeElement;!A(N)&&!W(N)&&ie()}),Ve(()=>n.open,async U=>{var _e;U?(re=document.activeElement instanceof HTMLElement?document.activeElement:null,h.value="",await Gt(),J(),$()?(_e=$())==null||_e.focus():F()):ue()},{immediate:!0});function ae(){v.value||r("cancel")}let ne=!1,Q=!1;function oe(U){let _e=U.target;ne=A(_e)||W(_e)}function ve(U){Q=A(U.target)}function fe(){let U=ne&&!Q;ne=!1,!U&&ae()}function pe(U){if(!n.open||W(document.activeElement))return;if(U.key==="Escape"){if(!B())return;U.preventDefault(),U.stopPropagation(),U.stopImmediatePropagation(),ae();return}if(U.key!=="Tab"||!B())return;let _e=x();if(_e.length===0){U.preventDefault(),A(document.activeElement)||F();return}let ge=_e[0],se=_e[_e.length-1],H=document.activeElement;U.shiftKey&&(H===ge||!A(H))?(U.preventDefault(),se.focus()):!U.shiftKey&&H===se?(U.preventDefault(),ge.focus()):A(H)||(U.preventDefault(),ge.focus())}function ye(U){if(!n.open)return;let _e=U.relatedTarget;if(_e instanceof Element){if(A(_e)||W(_e))return}else if(_e!==null)return;requestAnimationFrame(()=>{if(!n.open)return;let ge=document.activeElement;A(ge)||W(ge)||ge&&ge!==document.body&&!ge.isConnected||B()&&ie()})}return typeof document<"u"&&(document.addEventListener("keydown",pe,!0),document.addEventListener("focusout",ye,!0),document.addEventListener("mousedown",oe,!0),document.addEventListener("touchstart",oe,!0),document.addEventListener("click",ve,!0)),nt(()=>{var U;n.open&&(J(),$()?(U=$())==null||U.focus():F())}),Ii(()=>{typeof document<"u"&&(document.removeEventListener("keydown",pe,!0),document.removeEventListener("focusout",ye,!0),document.removeEventListener("mousedown",oe,!0),document.removeEventListener("touchstart",oe,!0),document.removeEventListener("click",ve,!0)),ue()}),t({focusCancel:()=>{var U;return(U=$())==null?void 0:U.focus()},restoreFocus:ue,isTopmost:B}),(U,_e)=>(m(),he(dg,{open:e.open,size:e.size,role:e.tone==="danger"?"alertdialog":"dialog","labelled-by":a,"described-by":p()?l:void 0,busy:e.busy,"close-on-overlay":!v.value,"close-disabled":v.value,"close-on-escape":!1,"trap-focus":!1,onClose:fe},{header:G(()=>[b("span",{id:a,class:Le(["nb-confirm__heading",`nb-confirm__heading--${e.tone}`])},[e.tone==="danger"?(m(),he(Ue,{key:0,name:de(xn),size:16,"aria-hidden":"true"},null,8,["name"])):V("",!0),b("span",null,Z(e.title),1)],2)]),footer:G(()=>[j(Pt,{ref_key:"cancelRef",ref:d,class:"nb-confirm__action nb-confirm__action--cancel",variant:"ghost",size:"lg",disabled:v.value,"data-nb-confirm":"cancel",onClick:ae},{default:G(()=>[le(Z(e.cancelLabel),1)]),_:1},8,["disabled"]),j(Pt,{class:"nb-confirm__action nb-confirm__action--confirm",variant:w.value,size:"lg",disabled:!C.value,loading:e.busy,"data-nb-confirm":"confirm",onClick:g},{default:G(()=>[le(Z(e.confirmLabel),1)]),_:1},8,["variant","disabled","loading"])]),default:G(()=>[b("div",{ref_key:"rootRef",ref:c,class:Le(["nb-confirm",e.contentClass])},[p()?(m(),M("div",{key:0,id:l,class:"nb-confirm__body"},[xe(U.$slots,"default",{},()=>[e.message?(m(),M("p",hH,Z(e.message),1)):V("",!0)],!0),e.subject?(m(),M("p",{key:0,class:Le(["nb-confirm__subject",`nb-confirm__subject--${e.tone}`])},[e.subjectLabel?(m(),M("span",fH,Z(e.subjectLabel),1)):V("",!0),b("span",pH,Z(e.subject),1)],2)):V("",!0)])):V("",!0),e.typeToConfirm?(m(),M("div",_H,[j(Wr,{modelValue:h.value,"onUpdate:modelValue":_e[0]||(_e[0]=ge=>h.value=ge),class:"nb-confirm__gate-field",label:_.value,helper:e.typeToConfirmHelper,disabled:v.value,autocomplete:"off",spellcheck:"false","data-nb-confirm":"gate",onKeydown:_e[1]||(_e[1]=xi(qe(()=>{},["prevent"]),["enter"]))},null,8,["modelValue","label","helper","disabled"])])):V("",!0),b("div",mH,[e.busy?(m(),M("p",vH,Z(e.busyLabel),1)):V("",!0),e.succeeded&&e.successLabel?(m(),M("p",gH,[j(Ue,{name:de(Ho),size:14,"aria-hidden":"true"},null,8,["name"]),b("span",null,Z(e.successLabel),1)])):V("",!0),e.error?(m(),M("div",{key:2,ref_key:"errorRef",ref:u,class:"nb-confirm__error",tabindex:"-1"},[j(at,{variant:"error"},{default:G(()=>[le(Z(e.error),1)]),_:1})],512)):V("",!0)])],2)]),_:3},8,["open","size","role","described-by","busy","close-on-overlay","close-disabled"]))}}),[["__scopeId","data-v-683eafb1"]]),yH=Symbol("nb-shell-slots"),wH=0;function SH(){let e=K([]),t=new Map,i=new Map;function n(s){let a=t.get(s);return a||(a=zn(null),t.set(s,a)),a}function r(s){let a=i.get(s);return a||(a=q(()=>{let l=e.value.filter(o=>o.name===s&&!o.deactivated);if(l.length===0)return[];if(l.some(o=>o.claim==="last")){let o=l[0];for(let c of l)c.seq>o.seq&&(o=c);return[o.id]}return[...l].sort((o,c)=>o.order-c.order||o.seq-c.seq).map(o=>o.id)}),i.set(s,a)),a}return{registry:{register(s){e.value=[...e.value,s]},unregister(s){let a=e.value.filter(l=>l.id!==s);a.length!==e.value.length&&(e.value=a)},elementFor:n,activeIds:r,setActive(s,a){let l=e.value.find(o=>o.id===s);!l||l.deactivated===!a||(l.deactivated=!a,a&&(l.seq=wH++))}},count:s=>e.value.filter(a=>a.name===s&&!a.deactivated).length,sharedCount:s=>e.value.filter(a=>a.name===s&&!a.deactivated&&a.claim==="all").length,setElement:(s,a)=>{n(s).value=a}}}var CH=Symbol("nb-shell-layout"),kH=Ne({__name:"SurfaceLayerScope",props:{level:{}},setup(e){let t=e;return tn(rd,q(()=>gc(t.level))),(i,n)=>xe(i.$slots,"default")}}),AH=["href"],MH={class:"nb-shell__middle"},$H=["id","aria-label","tabindex","inert","aria-hidden"],LH={class:"nb-shell__sidebar-logo"},EH={class:"nb-shell__sidebar-header-action"},xH={key:1,class:"nb-shell__sidebar-logo"},HH={class:"nb-shell__sidebar-nav"},TH={class:"nb-shell__sidebar-bottom"},NH={class:"nb-shell__right"},PH={key:2,class:"nb-shell__menubar"},OH={key:3,class:"nb-shell__topbar"},IH=["aria-label","aria-expanded","aria-controls"],RH={class:"nb-shell__content-row"},VH=["inert","aria-hidden"],DH=["aria-expanded"],ZH={class:"nb-shell__contextbar-toggle-glyph","aria-hidden":"true"},BH={class:"nb-shell__main-row"},FH=["aria-label"],zH=["id"],UH=["aria-label","inert","aria-hidden"],WH=["aria-label"],jH=["aria-label","aria-valuenow","aria-valuemax"],KH="(pointer: coarse) and (hover: none) and (max-height: 500px)",qH='a[href], [role="menuitem"]',Vl=288,GH=16,YH=64,XH=tt(Ne({__name:"Shell",props:{inspectorVisible:{type:Boolean,default:!1},inspectorExpanded:{type:Boolean,default:!1},inspectorSize:{default:"md"},resizable:{type:Boolean,default:!1},inspectorWidth:{},mainPadding:{type:Boolean,default:!0},sidebarVariant:{default:"compact"},sidebarHeaderActionPosition:{default:"end"},sidebarHeaderActionCompact:{default:"stack"},topbar:{default:"auto"},skipToContent:{type:Boolean,default:!0},skipToContentLabel:{default:"Skip to content"},mainId:{},sidebarLabel:{default:"Primary"},inspectorLabel:{default:"Inspector"},contextbarLabel:{default:"Browse"},collapseAt:{default:"md"},sidebarOpen:{type:Boolean},navToggleLabel:{default:"Navigation"},inspectorCloseLabel:{default:"Close inspector"}},emits:["update:inspectorWidth","update:sidebarOpen","update:inspectorVisible"],setup(e,{expose:t,emit:i}){var c0;let n=Wn();function r(ke){return kv(n,ke)}let{registry:s,count:a,sharedCount:l,setElement:o}=SH();tn(yH,s);let c=new Map;function u(ke){let Be=c.get(ke);return Be||(Be=Ye=>o(ke,Ye??null),c.set(ke,Be)),Be}function d(ke){return r(ke)||a(ke)>0}function h(ke){return l(ke)>0?"nb-shell__region--ordered":null}let f=q(()=>{for(let ke of["sidebar-logo","sidebar-nav","sidebar-bottom"])if(r(ke))return!0;return!1}),v=e,p=K(!1),w=i,_={md:672,lg:1056},y=K(typeof window<"u"?window.innerWidth:1/0);function C(ke){let Be=_[v.collapseAt];return Be!=null&&ke<Be}let g=0;function $(){let ke=window.innerWidth;C(ke)!==C(y.value)&&(y.value=ke)}function E(){g||(g=window.requestAnimationFrame(()=>{g=0,y.value=window.innerWidth}))}function L(){typeof window>"u"||(window.removeEventListener("resize",E),g&&(g=(window.cancelAnimationFrame(g),0)))}function B(){typeof window>"u"||(y.value=window.innerWidth,window.addEventListener("resize",E,{passive:!0}))}let T=typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia(KH):null,X=K((T==null?void 0:T.matches)===!0);function W(ke){X.value=ke.matches}let A=q(()=>C(y.value)||v.collapseAt!=="none"&&X.value),x=((c0=Si())==null?void 0:c0.vnode.props)??{};function F(ke,Be){return ke in x||Be in x}function ie(ke,Be){if(ke in x)return x[ke];if(Be in x)return x[Be]}function re(ke,Be){return F(ke,Be)&&ie(ke,Be)!==void 0}let ue=re("sidebarOpen","sidebar-open"),J=K(!1);F("sidebarOpen","sidebar-open")&&!ue&&Ve(()=>v.sidebarOpen,ke=>{J.value=ke===!0});let ae=q(()=>ue?v.sidebarOpen===!0:J.value),ne=Oi(),Q=q(()=>`nb-shell-sidebar-${ne}`),oe=K(null),ve=K(null),fe=q(()=>f.value&&A.value),pe=q(()=>f.value&&A.value&&!ae.value);function ye(ke){ue||(J.value=ke),w("update:sidebarOpen",ke)}function U(ke){if(!ke.defaultPrevented){if(f.value&&A.value&&ae.value){ye(!1);return}me.value&&we(!1)}}function _e(ke,Be){var et,u0;let Ye=ke.target,Ci=(et=Ye==null?void 0:Ye.closest)==null?void 0:et.call(Ye,qH);if(!Ci||!(Be!=null&&Be.contains(Ci)))return!1;let $e=Ci.getAttribute("aria-haspopup");return!($e!=null&&$e!=="false"||Ci.hasAttribute("aria-expanded")||Ci.getAttribute("aria-disabled")==="true"||(u0=Ye==null?void 0:Ye.closest)!=null&&u0.call(Ye,"[data-nb-keep-open]"))}function ge(ke){!A.value||!ae.value||_e(ke,ve.value)&&ye(!1)}function se(ke){!A.value||!p.value||_e(ke,ke.currentTarget)&&(p.value=!1)}function H(ke){p.value=ke}Ve(ae,async ke=>{var Be,Ye,Ci,$e,et;A.value&&(await Gt(),ke?(Ci=(Ye=((Be=ve.value)==null?void 0:Be.querySelector('a[href], button:not([disabled]), [tabindex]:not([tabindex="-1"])'))??ve.value)==null?void 0:Ye.focus)==null||Ci.call(Ye):(et=($e=oe.value)==null?void 0:$e.focus)==null||et.call($e))}),Ve(A,ke=>{!ke&&ae.value&&ye(!1)});let N=re("inspectorVisible","inspector-visible"),O=K(v.inspectorVisible===!0);F("inspectorVisible","inspector-visible")&&!N&&Ve(()=>v.inspectorVisible,ke=>{O.value=ke===!0});let te=K(!1),ee=q(()=>(N?v.inspectorVisible===!0:O.value)?!(A.value&&te.value):!1),me=q(()=>A.value&&ee.value);function we(ke){N?te.value=!ke:(O.value=ke,te.value=!1),w("update:inspectorVisible",ke)}Ve(()=>v.inspectorVisible,ke=>{ke&&(te.value=!1)}),Ve(A,ke=>{ke||(te.value=!1)});let S=K(null),k=K(null);Ve(me,async ke=>{var Be,Ye,Ci;if(ke)k.value=document.activeElement??null,await Gt(),(Ye=(Be=S.value)==null?void 0:Be.focus)==null||Ye.call(Be);else{let $e=k.value;k.value=null,$e!=null&&$e.isConnected&&(await Gt(),(Ci=$e.focus)==null||Ci.call($e))}}),Ve(me,ke=>{ke&&f.value&&ae.value&&ye(!1)});function D(){we(!1)}tn(CH,{collapsed:A,inspectorOverlay:me});let P=q(()=>me.value),R=K(null),I=Oi(),z=q(()=>v.mainId||`nb-shell-main-${I}`);function Y(){var ke;(ke=R.value)==null||ke.focus()}let Se=q(()=>fe.value||v.topbar==="always"?!0:v.topbar==="never"?!1:r("topbar-left")||r("topbar-right")||a("topbar-left")>0||a("topbar-right")>0),{layerProps:Me}=Js(),{layerProps:De}=Js({level:0,probe:!1,provideContext:!1}),Xe=q(()=>A.value&&r("sidebar-header-action")?"verbose":v.sidebarVariant);tn("nb-shell-sidebar-variant",Xe);let Te=q(()=>r("sidebar-header-action")&&!A.value);tn("nb-shell-sidebar-header-action-position",Mm(v,"sidebarHeaderActionPosition"));let rt=K(null),It=K(!1);nt(()=>o("inspector",rt.value)),Ve(rt,ke=>o("inspector",ke));let un={lg:.5,xl:.75},Ut={xs:288,sm:360,md:560},Rt=q(()=>Number.isFinite(y.value)?y.value:1280),vn=q(()=>Math.max(Vl,Rt.value*.5));function gn(ke){return Math.round(Math.max(Vl,Math.min(ke,vn.value)))}let xl=re("inspectorWidth","inspector-width"),l0=K(null),o0=q(()=>xl?v.inspectorWidth??null:l0.value);function Hl(ke){xl||(l0.value=ke),w("update:inspectorWidth",ke)}let A1=q(()=>{let ke=o0.value;if(!(!v.resizable||!ee.value||ke==null))return{"--nb-shell-inspector-width":`${gn(ke)}px`}}),be=q(()=>{let ke=o0.value;if(ke!=null)return gn(ke);if(v.inspectorExpanded)return Math.round(Rt.value*.5);let Be=un[v.inspectorSize],Ye=Be==null?Ut[v.inspectorSize]??Vl:Rt.value*Be;return Math.round(v.inspectorSize==="xl"?Ye:Math.min(Ye,vn.value))}),ce=q(()=>Math.round(Math.max(vn.value,be.value))),Ie=q(()=>be.value);function Ge(){return be.value}function Ke(ke){let Be=rt.value;if(!Be)return;let Ye=Be.getBoundingClientRect().right;Hl(gn(Ye-ke.clientX))}function Wt(){It.value=!1,window.removeEventListener("pointermove",Ke),window.removeEventListener("pointerup",Wt),window.removeEventListener("pointercancel",Wt)}function yt(ke){v.resizable&&(ke.preventDefault(),It.value=!0,window.addEventListener("pointermove",Ke),window.addEventListener("pointerup",Wt),window.addEventListener("pointercancel",Wt))}function mr(){Hl(null)}function M1(ke){if(!v.resizable)return;let Be=ke.shiftKey?YH:GH,Ye;switch(ke.key){case"ArrowLeft":Ye=Ge()+Be;break;case"ArrowRight":Ye=Ge()-Be;break;case"Home":Ye=Vl;break;case"End":Ye=vn.value;break;case"Enter":case" ":Ye=null;break;default:return}ke.preventDefault(),Hl(Ye==null?null:gn(Ye))}return nt(()=>{var ke;typeof window>"u"||(y.value=window.innerWidth,window.addEventListener("resize",$,{passive:!0}),v.resizable&&B(),T&&(X.value=T.matches,typeof T.addEventListener=="function"?T.addEventListener("change",W):(ke=T.addListener)==null||ke.call(T,W)))}),Ve(()=>v.collapseAt,()=>{typeof window<"u"&&(y.value=window.innerWidth)}),Ve(()=>v.resizable,ke=>ke?B():L()),ri(()=>{var ke;Wt(),L(),typeof window<"u"&&window.removeEventListener("resize",$),T&&(typeof T.removeEventListener=="function"?T.removeEventListener("change",W):(ke=T.removeListener)==null||ke.call(T,W))}),t({mainEl:R,sidebarEl:ve,inspectorEl:rt,focusMain:()=>{var ke;return(ke=R.value)==null?void 0:ke.focus()},setSidebarOpen:ye,setInspectorVisible:we,collapsed:A,inspectorOverlay:me,setContextbarOpen:H}),(ke,Be)=>(m(),M("div",Zt({class:"nb-shell"},de(Me),{class:[{"nb-shell--no-sidebar":!f.value},f.value?`nb-shell--sidebar-${Xe.value}`:null,{"nb-shell--collapsed":A.value,"nb-shell--drawer-open":A.value&&ae.value}],onKeydown:xi(U,["esc"])}),[e.skipToContent?(m(),M("a",{key:0,class:"nb-shell__skip-link",href:`#${z.value}`,onClick:Y},Z(e.skipToContentLabel),9,AH)):V("",!0),d("outer-menu")?(m(),M("div",{key:1,ref:u("outer-menu"),class:Le(["nb-shell__outer-menu",h("outer-menu")])},[xe(ke.$slots,"outer-menu",{},void 0,!0)],2)):V("",!0),b("div",MH,[f.value?(m(),M("nav",{key:0,id:Q.value,ref_key:"sidebarRef",ref:ve,class:"nb-shell__sidebar","aria-label":e.sidebarLabel,tabindex:A.value?-1:void 0,inert:pe.value||void 0,"aria-hidden":pe.value||void 0,onClickCapture:ge},[Te.value?(m(),M("div",{key:0,class:Le(["nb-shell__sidebar-header",[`nb-shell__sidebar-header--${e.sidebarHeaderActionPosition}`,`nb-shell__sidebar-header--compact-${e.sidebarHeaderActionCompact}`]])},[b("div",LH,[xe(ke.$slots,"sidebar-logo",{},void 0,!0)]),b("div",EH,[xe(ke.$slots,"sidebar-header-action",{},void 0,!0)])],2)):(m(),M("div",xH,[xe(ke.$slots,"sidebar-logo",{},void 0,!0)])),b("div",HH,[xe(ke.$slots,"sidebar-nav",{},void 0,!0)]),Be[4]||(Be[4]=b("div",{class:"nb-shell__sidebar-spacer"},null,-1)),b("div",TH,[xe(ke.$slots,"sidebar-bottom",{},void 0,!0)])],40,$H)):V("",!0),f.value&&A.value&&ae.value?(m(),M("div",{key:1,class:"nb-shell__scrim",onClick:Be[0]||(Be[0]=Ye=>ye(!1))})):V("",!0),b("div",NH,[d("inner-menu")?(m(),M("div",{key:0,ref:u("inner-menu"),class:Le(["nb-shell__inner-menu",h("inner-menu")])},[xe(ke.$slots,"inner-menu",{},void 0,!0)],2)):V("",!0),d("notification")?(m(),M("div",{key:1,ref:u("notification"),class:Le(["nb-shell__notification",h("notification")])},[xe(ke.$slots,"notification",{},void 0,!0)],2)):V("",!0),r("menubar")?(m(),M("div",PH,[xe(ke.$slots,"menubar",{},void 0,!0)])):V("",!0),Se.value?(m(),M("div",OH,[fe.value?(m(),M("button",{key:0,ref_key:"navToggleRef",ref:oe,type:"button",class:"nb-shell__nav-toggle","aria-label":e.navToggleLabel,"aria-expanded":ae.value,"aria-controls":Q.value,onClick:Be[1]||(Be[1]=Ye=>ye(!ae.value))},[...Be[5]||(Be[5]=[b("span",{class:"nb-shell__nav-toggle-glyph","aria-hidden":"true"},[b("span"),b("span"),b("span")],-1)])],8,IH)):V("",!0),b("div",{ref:u("topbar-left"),class:"nb-shell__topbar-left"},[xe(ke.$slots,"topbar-left",{},void 0,!0)],512),b("div",{ref:u("topbar-right"),class:"nb-shell__topbar-right"},[xe(ke.$slots,"topbar-right",{},void 0,!0)],512)])):V("",!0),b("div",RH,[b("div",{class:"nb-shell__body",inert:P.value||void 0,"aria-hidden":P.value||void 0},[d("fixedbar")?(m(),M("div",{key:0,ref:u("fixedbar"),class:"nb-shell__fixedbar"},[xe(ke.$slots,"fixedbar",{},void 0,!0)],512)):V("",!0),A.value&&d("contextbar")?(m(),M("button",{key:1,type:"button",class:"nb-shell__contextbar-toggle","aria-expanded":p.value,onClick:Be[2]||(Be[2]=Ye=>p.value=!p.value)},[b("span",null,Z(e.contextbarLabel),1),b("span",ZH,Z(p.value?"▾":"▸"),1)],8,DH)):V("",!0),b("div",BH,[d("contextbar")?sn((m(),M("aside",{key:0,ref:u("contextbar"),class:Le(["nb-shell__contextbar",h("contextbar")]),"aria-label":e.contextbarLabel,onClickCapture:se},[xe(ke.$slots,"contextbar",{},void 0,!0)],42,FH)),[[Zh,!A.value||p.value]]):V("",!0),b("main",Zt({id:z.value,ref_key:"mainRef",ref:R,tabindex:"-1",class:["nb-shell__main",{"nb-shell__main--no-padding":!e.mainPadding}]},de(De)),[j(kH,{level:1},{default:G(()=>[xe(ke.$slots,"default",{},void 0,!0)]),_:3})],16,zH)]),d("bottom")?(m(),M("div",{key:2,ref:u("bottom"),class:"nb-shell__bottom"},[xe(ke.$slots,"bottom",{},void 0,!0)],512)):V("",!0)],8,VH),b("aside",{ref_key:"inspectorRef",ref:rt,class:Le(["nb-shell__inspector",{"nb-shell__inspector--visible":ee.value,"nb-shell__inspector--expanded":ee.value&&e.inspectorExpanded,[`nb-shell__inspector--${e.inspectorSize}`]:ee.value,"nb-shell__inspector--resizing":It.value,"nb-shell__inspector--overlay":me.value}]),"aria-label":e.inspectorLabel,inert:!ee.value||void 0,"aria-hidden":!ee.value||void 0,style:mi(A1.value)},[me.value?(m(),M("button",{key:0,ref_key:"inspectorDismissRef",ref:S,type:"button",class:"nb-shell__inspector-dismiss","aria-label":e.inspectorCloseLabel,onClick:Be[3]||(Be[3]=Ye=>we(!1))},[...Be[6]||(Be[6]=[b("span",{class:"nb-shell__inspector-dismiss-glyph","aria-hidden":"true"},"×",-1)])],8,WH)):V("",!0),e.resizable&&ee.value&&!A.value?(m(),M("div",{key:1,class:"nb-shell__inspector-resize",role:"separator",tabindex:"0","aria-orientation":"vertical","aria-label":`Resize ${e.inspectorLabel}`,"aria-valuenow":Ie.value,"aria-valuemin":Vl,"aria-valuemax":ce.value,title:"Drag or use the arrow keys to resize, Enter or double-click to reset",onPointerdown:yt,onDblclick:mr,onKeydown:M1},null,40,jH)):V("",!0),xe(ke.$slots,"inspector",{overlay:me.value,close:D},void 0,!0)],14,UH)])])])],16))}}),[["__scopeId","data-v-a375a384"]]),JH={key:0,class:"nb-sidebar-brand__icon"},QH={key:1,class:"nb-sidebar-brand__text"},eT={class:"nb-sidebar-brand__title"},tT={key:0,class:"nb-sidebar-brand__subtitle"},iT=tt(Ne({__name:"SidebarBrand",props:{title:{},subtitle:{default:void 0},icon:{default:void 0}},setup(e){let t=Mt("nb-shell-sidebar-variant",K("verbose")),i=q(()=>t.value);return(n,r)=>(m(),M("div",{class:Le(["nb-sidebar-brand",[`nb-sidebar-brand--${i.value}`]])},[e.icon||n.$slots.icon?(m(),M("div",JH,[xe(n.$slots,"icon",{},()=>[e.icon?(m(),he(Ue,{key:0,name:e.icon,size:24},null,8,["name"])):V("",!0)],!0)])):V("",!0),i.value==="verbose"?(m(),M("div",QH,[b("span",eT,Z(e.title),1),e.subtitle?(m(),M("span",tT,Z(e.subtitle),1)):V("",!0)])):V("",!0)],2))}}),[["__scopeId","data-v-228349ba"]]),nT=Ne({__name:"SidebarVariantScope",props:{variant:{}},setup(e){return tn("nb-shell-sidebar-variant",Mm(e,"variant")),(t,i)=>xe(t.$slots,"default")}}),rT={class:"nb-sidebar-menu-item__label"},sT=["title"],aT={key:0,class:"nb-sidebar-menu-item__children",role:"group"},lT={class:"nb-sidebar-menu-item__flyout-header"},oT={class:"nb-sidebar-menu-item__flyout-label"},cT=["aria-label"],uT=tt(Ne({__name:"SidebarMenuItem",props:{label:{},icon:{default:void 0},to:{default:void 0},href:{default:void 0},active:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},defaultExpanded:{type:Boolean,default:!1},badge:{default:void 0},badgeVariant:{default:"neutral"}},emits:["click"],setup(e,{emit:t}){let i=e,n=t,r=Mt("nb-shell-sidebar-variant",K("verbose")),s=q(()=>r.value),a=Wn(),l=q(()=>{let fe=i.badge;if(fe===void 0)return;let pe=typeof fe=="number"?fe:Number(String(fe).trim());if(!(!Number.isFinite(pe)||String(fe).trim()===""))return pe>99?"99+":String(pe)}),o=q(()=>i.badge===void 0?i.label:`${i.label} (${i.badge})`),c=q(()=>{var pe;let fe=(pe=a.default)==null?void 0:pe.call(a);return fe?n2(fe):!1}),u=K(i.defaultExpanded||i.active),d=Sv(),h=q(()=>{if(typeof i.to=="string")return i.to;if(i.href)return i.href}),f=q(()=>c.value),v=q(()=>i.to!=null&&!f.value&&!!d.value),p=q(()=>f.value?"button":v.value?d.value:h.value?"a":"button"),w=q(()=>p.value==="a"?{href:h.value}:{});function _(fe){if(i.disabled){fe.preventDefault();return}if(f.value&&s.value==="verbose"){u.value=!u.value;return}f.value&&s.value==="compact"&&J(fe),n("click",fe)}let y=K(null),C=K(null),g=K(!1),$=K(!1),E=K({}),L=null;function B(){if(s.value!=="compact")return;L&&(L=(clearTimeout(L),null));let fe=F();if(!fe)return;let pe=fe.getBoundingClientRect();E.value={top:`${pe.top}px`,left:`${pe.right+8}px`},g.value=!0}function T(){$.value||(L&&clearTimeout(L),L=setTimeout(()=>{g.value=!1,L=null},120))}function X(){B()}function W(){T()}function A(){L&&(L=(clearTimeout(L),null))}function x(){T()}function F(){let fe=y.value;return fe?fe instanceof HTMLElement?fe:fe.$el??null:null}function ie(fe=!1){var pe;L&&(L=(clearTimeout(L),null)),g.value=!1,$.value=!1,fe&&((pe=F())==null||pe.focus())}function re(){let fe=C.value;return fe?Array.from(fe.querySelectorAll('[role="menuitem"]')).filter(pe=>!pe.hasAttribute("disabled")&&pe.getAttribute("aria-disabled")!=="true"&&!pe.closest('[style*="display: none"]')):[]}async function ue(fe){var pe;B(),$.value=!0,fe&&(await Gt(),(pe=re()[0])==null||pe.focus())}function J(fe){if(g.value&&$.value){ie();return}ue(fe.detail===0)}function ae(fe){!f.value||s.value!=="compact"||(fe.key==="ArrowRight"||fe.key==="ArrowDown"?(fe.preventDefault(),ue(!0)):fe.key==="Escape"&&g.value&&(fe.preventDefault(),ie(!0)))}function ne(fe){var U,_e,ge,se;let pe=re(),ye=pe.indexOf(document.activeElement);switch(fe.key){case"Escape":case"ArrowLeft":fe.preventDefault(),fe.stopPropagation(),ie(!0);return;case"ArrowDown":fe.preventDefault(),(U=pe[(ye+1)%pe.length])==null||U.focus();return;case"ArrowUp":fe.preventDefault(),(_e=pe[(ye-1+pe.length)%pe.length])==null||_e.focus();return;case"Home":fe.preventDefault(),(ge=pe[0])==null||ge.focus();return;case"End":fe.preventDefault(),(se=pe[pe.length-1])==null||se.focus();return;case"Tab":ie(!0);return}}function Q(fe){var ye,U;let pe=fe.relatedTarget;pe&&((ye=C.value)!=null&&ye.contains(pe)||(U=F())!=null&&U.contains(pe)||ie())}function oe(fe){var ye;let pe=(ye=fe.target)==null?void 0:ye.closest('[role="menuitem"]');pe&&!pe.hasAttribute("aria-expanded")&&ie()}function ve(fe){var ye,U;let pe=fe.target;pe&&((ye=C.value)!=null&&ye.contains(pe)||(U=F())!=null&&U.contains(pe)||ie())}return Ve(g,fe=>{typeof document>"u"||(fe?document.addEventListener("pointerdown",ve,!0):document.removeEventListener("pointerdown",ve,!0))}),Ve(s,()=>ie()),ri(()=>{L&&clearTimeout(L),typeof document<"u"&&document.removeEventListener("pointerdown",ve,!0)}),(fe,pe)=>(m(),M("li",{class:Le(["nb-sidebar-menu-item",[`nb-sidebar-menu-item--${s.value}`]]),role:"none",onMouseenter:X,onMouseleave:W},[(m(),he(qo(p.value),Zt({ref_key:"rowRef",ref:y,class:["nb-sidebar-menu-item__row",{"nb-sidebar-menu-item__row--active":e.active,"nb-sidebar-menu-item__row--disabled":e.disabled,"nb-sidebar-menu-item__row--expandable":c.value&&s.value==="verbose","nb-sidebar-menu-item__row--compact":s.value==="compact"}],type:p.value==="button"?"button":void 0,to:v.value?e.to:void 0},w.value,{disabled:p.value==="button"&&!c.value&&e.disabled||void 0,"aria-disabled":e.disabled||void 0,"aria-expanded":c.value?s.value==="verbose"?u.value:g.value:void 0,"aria-haspopup":c.value&&s.value==="compact"?"menu":void 0,"aria-label":s.value==="compact"?o.value:void 0,role:"menuitem",onClick:_,onKeydown:ae}),{default:G(()=>[e.icon?(m(),he(Ue,{key:0,class:"nb-sidebar-menu-item__icon",name:e.icon,size:s.value==="compact"?18:16},null,8,["name","size"])):V("",!0),s.value==="verbose"?(m(),M(Ce,{key:1},[b("span",rT,Z(e.label),1),e.badge===void 0?V("",!0):(m(),M("span",{key:0,class:Le(["nb-sidebar-menu-item__badge",[`nb-sidebar-menu-item__badge--${e.badgeVariant}`]])},Z(e.badge),3)),c.value?(m(),he(Ue,{key:1,class:Le(["nb-sidebar-menu-item__caret",{"nb-sidebar-menu-item__caret--expanded":u.value}]),name:de(Sc),size:12},null,8,["class","name"])):V("",!0)],64)):l.value===void 0?e.badge===void 0?V("",!0):(m(),M("span",{key:3,class:Le(["nb-sidebar-menu-item__badge-dot",[`nb-sidebar-menu-item__badge-dot--${e.badgeVariant}`]]),title:String(e.badge)},null,10,sT)):(m(),M("span",{key:2,class:Le(["nb-sidebar-menu-item__badge-count",[`nb-sidebar-menu-item__badge-count--${e.badgeVariant}`]]),"aria-hidden":"true"},Z(l.value),3))]),_:1},16,["class","type","to","disabled","aria-disabled","aria-expanded","aria-haspopup","aria-label"])),c.value&&s.value==="verbose"?sn((m(),M("ul",aT,[xe(fe.$slots,"default",{},void 0,!0)],512)),[[Zh,u.value]]):V("",!0),s.value==="compact"&&g.value?(m(),he(an,{key:1,to:"body"},[b("div",{ref_key:"flyoutRef",ref:C,class:"nb-sidebar-menu-item__flyout",style:mi(E.value),onMouseenter:A,onMouseleave:x,onKeydown:ne,onFocusout:Q,onClick:oe},[b("div",lT,[b("span",oT,Z(e.label),1),e.badge===void 0?V("",!0):(m(),M("span",{key:0,class:Le(["nb-sidebar-menu-item__badge",[`nb-sidebar-menu-item__badge--${e.badgeVariant}`]])},Z(e.badge),3))]),c.value?(m(),he(nT,{key:0,variant:"verbose"},{default:G(()=>[b("ul",{class:"nb-sidebar-menu-item__flyout-children",role:"menu","aria-label":e.label},[xe(fe.$slots,"default",{},void 0,!0)],8,cT)]),_:3})):V("",!0)],36)])):V("",!0)],34))}}),[["__scopeId","data-v-0f7c477a"]]);const Ta=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},dT=Ta("sidebar-simple","0 0 256 256",'<path d="M216,44H40A12,12,0,0,0,28,56V200a12,12,0,0,0,12,12H216a12,12,0,0,0,12-12V56A12,12,0,0,0,216,44ZM36,200V56a4,4,0,0,1,4-4H84V204H40A4,4,0,0,1,36,200Zm184,0a4,4,0,0,1-4,4H92V52H216a4,4,0,0,1,4,4Z"/>'),hT=Ta("sidebar-simple","0 0 256 256",'<path d="M216,42H40A14,14,0,0,0,26,56V200a14,14,0,0,0,14,14H216a14,14,0,0,0,14-14V56A14,14,0,0,0,216,42ZM38,200V56a2,2,0,0,1,2-2H82V202H40A2,2,0,0,1,38,200Zm180,0a2,2,0,0,1-2,2H94V54H216a2,2,0,0,1,2,2Z"/>'),y8=Ta("sidebar-simple","0 0 256 256",'<path d="M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM40,56H80V200H40ZM216,200H96V56H216V200Z"/>'),fT=Ta("sidebar-simple","0 0 256 256",'<path d="M216,36H40A20,20,0,0,0,20,56V200a20,20,0,0,0,20,20H216a20,20,0,0,0,20-20V56A20,20,0,0,0,216,36ZM44,60H76V196H44ZM212,196H100V60H212Z"/>'),pT=Ta("sidebar-simple","0 0 256 256",'<path d="M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40Zm0,160H88V56H216V200Z"/>'),_T=Ta("sidebar-simple","0 0 256 256",'<path d="M88,48V208H40a8,8,0,0,1-8-8V56a8,8,0,0,1,8-8Z" opacity="0.2"/><path d="M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM40,56H80V200H40ZM216,200H96V56H216V200Z"/>'),mT="sidebar-simple",vT=Object.freeze(Object.defineProperty({__proto__:null,bold:fT,default:y8,duotone:_T,fill:pT,glyphName:mT,light:hT,regular:y8,thin:dT},Symbol.toStringTag,{value:"Module"}));var gT=["aria-label","aria-expanded"],bT=tt(Ne({__name:"SidebarHeaderToggle",props:{collapseLabel:{default:void 0},expandLabel:{default:void 0},icon:{default:void 0}},emits:["toggle"],setup(e,{emit:t}){let i=e,n=t,r=Mt("nb-shell-sidebar-variant",K("verbose")),s=Mt("nb-shell-sidebar-header-action-position",K("end")),a=q(()=>r.value==="compact"),l=q(()=>s.value==="edge"),o=q(()=>i.icon?i.icon:l.value?a.value?l2:Hv:vT),c={en:{COLLAPSE:"Collapse sidebar",EXPAND:"Expand sidebar"},pt:{COLLAPSE:"Recolher barra lateral",EXPAND:"Expandir barra lateral"}};function u(){try{return rg({useScope:"global"})}catch{return null}}let d=u();function h(v){var w;let p=`sidebarCollapseToggle.${v}`;return d!=null&&d.te(p)?d.t(p):((w=c[String((d==null?void 0:d.locale.value)??"en").toLowerCase().split("-")[0]])==null?void 0:w[v])??c.en[v]}let f=q(()=>a.value?i.expandLabel??h("EXPAND"):i.collapseLabel??h("COLLAPSE"));return(v,p)=>{let w=Nh("nb-tooltip");return sn((m(),M("button",{type:"button",class:Le(["nb-sidebar-header-toggle",{"nb-sidebar-header-toggle--edge":l.value}]),"aria-label":f.value,"aria-expanded":!a.value,onClick:p[0]||(p[0]=_=>n("toggle"))},[j(Ue,{name:o.value,size:l.value?14:18},null,8,["name","size"])],10,gT)),[[w,{body:f.value,aria:"none",position:"right"}]])}}}),[["__scopeId","data-v-6ef71e7b"]]),yT=tt(Ne({__name:"SidebarMenu",props:{density:{default:"comfortable"}},setup(e){return(t,i)=>(m(),M("ul",{class:Le(["nb-sidebar-menu",[`nb-sidebar-menu--${e.density}`]]),role:"menu"},[xe(t.$slots,"default",{},void 0,!0)],2))}}),[["__scopeId","data-v-0ea86bc7"]]),wT=["aria-label"],ST={key:0,class:"nb-sidebar-status__label"},CT=tt(Ne({__name:"SidebarStatus",props:{label:{},status:{default:"neutral"}},setup(e){let t=Mt("nb-shell-sidebar-variant",K("verbose")),i=q(()=>t.value==="compact");return(n,r)=>{let s=Nh("nb-tooltip");return sn((m(),M("div",{class:Le(["nb-sidebar-status",[`nb-sidebar-status--${e.status}`,{"nb-sidebar-status--compact":i.value}]]),role:"status","aria-label":e.label},[r[0]||(r[0]=b("span",{class:"nb-sidebar-status__dot","aria-hidden":"true"},null,-1)),i.value?V("",!0):(m(),M("span",ST,Z(e.label),1))],10,wT)),[[s,{body:i.value?e.label:null,aria:"none",position:"right"}]])}}}),[["__scopeId","data-v-2996103f"]]),hg=function(e){return e.Small="sm",e.Medium="md",e}(hg||{}),ns=function(e){return e.Active="active",e.Finished="finished",e.Error="error",e}(ns||{}),kT={key:0,class:"nb-progress-bar__header"},AT=["aria-label","aria-valuemax","aria-valuenow"],fg=tt(Ne({__name:"ProgressBar",props:{value:{default:void 0},max:{default:100},helper:{default:void 0},size:{default:hg.Medium},status:{default:ns.Active},hideLabel:{type:Boolean,default:!1},id:{default:"progress-bar"},label:{}},setup(e){let t=e,i=q(()=>t.value==null&&t.status===ns.Active),n=q(()=>t.status===ns.Active?t.value==null||t.max<=0?0:Math.min(Math.max(t.value/t.max,0),1):1),r=q(()=>i.value?void 0:n.value*t.max),s=q(()=>["nb-progress-bar",`nb-progress-bar--${t.size}`,`nb-progress-bar--${t.status}`,{"nb-progress-bar--indeterminate":i.value}]),a=q(()=>({transform:`scaleX(${n.value})`})),l=q(()=>t.status===ns.Finished?a2:t.status===ns.Error?s2:null),o=q(()=>t.status===ns.Error?yc.Error:yc.Helper);return(c,u)=>(m(),M("div",{class:Le(s.value)},[e.label&&!e.hideLabel?(m(),M("div",kT,[j(pa,null,{default:G(()=>[le(Z(e.label),1)]),_:1}),l.value?(m(),he(Ue,{key:0,name:l.value,size:14,class:"nb-progress-bar__status-icon"},null,8,["name"])):V("",!0)])):V("",!0),b("div",{class:"nb-progress-bar__track",role:"progressbar","aria-label":e.label,"aria-valuemin":"0","aria-valuemax":e.max,"aria-valuenow":r.value},[b("div",{class:"nb-progress-bar__bar",style:mi(a.value)},null,4)],8,AT),e.helper?(m(),he(at,{key:1,variant:o.value,class:"nb-progress-bar__message"},{default:G(()=>[le(Z(e.helper),1)]),_:1},8,["variant"])):V("",!0)],2))}}),[["__scopeId","data-v-ce4aae30"]]),zi=K([]),fo=new Map,Bs=null,Sd=null;function MT(e){return zi.value.length>0&&zi.value[0].key===e}function $T(){return zi.value.length>0?zi.value[zi.value.length-1].element:null}var pg="data-nb-overlay-exempt",w8=`[${pg}], .nb-toaster, .nb-toaster__announcer, .nb-loading-announcer`,LT=8;function y2(e,t,i=0){if(!e.matches(w8)){if(i<LT&&e.querySelector(w8)){for(let n of Array.from(e.children))n instanceof HTMLElement&&y2(n,t,i+1);return}ET(e,t)}}function ET(e,t){let i=fo.get(e);i===void 0&&e.hasAttribute("inert")||(i===void 0&&e.setAttribute("inert",""),fo.set(e,(i??0)+1),t.push(e))}function _g(e){for(let t of e){let i=fo.get(t);if(i!==void 0){if(i>1){fo.set(t,i-1);continue}fo.delete(t),t.removeAttribute("inert")}}e.length=0}var mg='a[href], button, input, select, textarea, summary, [tabindex], [contenteditable=""], [contenteditable="true"]';function S8(e){return!(e instanceof HTMLElement)||e.hasAttribute("disabled")||e.getAttribute("aria-hidden")==="true"?!1:e.matches(mg)}function xT(e){let t=Bs,i=Sd;if(Bs=null,Sd=null,typeof document>"u")return;let n=document.activeElement;if(!(n===null||n===document.body||n===e||e!==null&&e.contains(n))||!t)return;if(t.isConnected){t.focus({preventScroll:!0});return}let r=i;for(;r&&!r.isConnected;)r=r.parentElement;for(;r&&r!==document.body;){if(S8(r)){r.focus({preventScroll:!0});return}let s=r.querySelector(mg);if(s&&S8(s)){s.focus({preventScroll:!0});return}r=r.parentElement}}function HT(e,t){if(typeof document>"u"||zi.value.some(n=>n.key===e))return;if(zi.value.length===0){let n=document.activeElement;Bs=n instanceof HTMLElement?n:null,Sd=(Bs==null?void 0:Bs.parentElement)??null,og()}let i={key:e,element:t,inerted:[]};for(let n of Array.from(document.body.children))n instanceof HTMLElement&&(n===t||n.contains(t)||y2(n,i.inerted));zi.value=[...zi.value,i],t.focus({preventScroll:!0})}function TT(e){var i;let t=zi.value.find(n=>n.key===e);if(t){if(_g(t.inerted),zi.value=zi.value.filter(n=>n.key!==e),zi.value.length>0){(i=$T())==null||i.focus({preventScroll:!0});return}cg(),xT(t.element)}}function NT(e,t){PT(e);let i=[],n=e.getAttribute("aria-busy");e.setAttribute("aria-busy","true");for(let s of Array.from(e.children))s instanceof HTMLElement&&(s===t||s.contains(t)||y2(s,i));let r=!1;return()=>{r||(r=!0,_g(i),n===null?e.removeAttribute("aria-busy"):e.setAttribute("aria-busy",n))}}function PT(e){if(typeof process<"u"||typeof window>"u"||!e.isConnected)return;let t=window.getComputedStyle(e).position;t&&t!=="static"||console.warn(`[NbSpinner] overlay="container" covers the nearest positioned ancestor, and this spinner's parent element is position: static, so the scrim will be drawn over some ancestor further up while only the parent is blocked. Set position: relative on the element you mean to cover.`)}var Vi=null,M0,OT=!1;function IT(){return typeof document>"u"?null:(Vi!=null&&Vi.isConnected||(Vi=document.createElement("div"),Vi.setAttribute("role","status"),Vi.setAttribute("aria-live","polite"),Vi.setAttribute("aria-atomic","true"),Vi.className="nb-loading-announcer",Vi.setAttribute(pg,""),Vi.style.cssText="position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;white-space:nowrap;border:0;clip-path:inset(50%)",document.body.appendChild(Vi)),Vi)}function RT(e){if(!e||OT)return;let t=IT();t&&(t.textContent="",M0&&clearTimeout(M0),M0=setTimeout(()=>{M0=void 0,t.textContent=e},60))}var vg=function(e){return e.ExtraSmall="xs",e.Small="sm",e.Medium="md",e.Large="lg",e}(vg||{}),W0=function(e){return e.None="none",e.Container="container",e.Page="page",e}(W0||{}),gg=function(e){return e.Primary="primary",e.Inherit="inherit",e}(gg||{}),VT=["id","tabindex","role","aria-live","aria-hidden"],DT={key:0,class:"nb-spinner__label","aria-hidden":"true"},ZT={key:1,class:"nb-spinner__announcement"},BT=tt(Ne({inheritAttrs:!1,__name:"Spinner",props:{size:{default:vg.Medium},label:{default:"Loading"},showLabel:{type:Boolean,default:!1},overlay:{default:W0.None},tone:{default:gg.Primary},delay:{default:0},completeLabel:{default:void 0},decorative:{type:Boolean,default:!1},id:{default:void 0}},setup(e){let t=e,i=l1(t),n=Symbol("nb-spinner-page-overlay"),r=K(null),s=J4(),a=q(()=>t.overlay===W0.Page),l=q(()=>t.overlay===W0.Container),o=q(()=>t.decorative&&!a.value),c=q(()=>!o.value),u=K(t.delay<=0),d;function h(){d&&(d=(clearTimeout(d),void 0))}Ve(()=>t.delay,$=>{if(!u.value){if(h(),$<=0){u.value=!0;return}d=setTimeout(()=>{d=void 0,u.value=!0},$)}},{immediate:!0});let f=K(""),v;function p(){v&&(v=(clearTimeout(v),void 0))}Ve([u,c,()=>t.label],([$,E,L])=>{if(p(),!$||!E){f.value="";return}if(f.value!==""){f.value=L;return}v=setTimeout(()=>{v=void 0,f.value=L},0)},{immediate:!0});let w=null,_=null;function y(){if(w===null)return;let $=w;w=null,$==="page"&&TT(n),_==null||_(),_=null}function C(){let $=u.value?a.value?"page":l.value?"container":null:null;if($===w||(y(),$===null))return;let E=r.value;if(!E)return;if(w=$,$==="page"){HT(n,E);return}let L=E.parentElement;L&&(_=NT(L,E))}Ve([u,()=>t.overlay],C,{flush:"post"}),nt(C),ri(()=>{u.value&&c.value&&RT(t.completeLabel),h(),p(),y()});let g=q(()=>["nb-spinner",`nb-spinner--${t.size}`,`nb-spinner--tone-${t.tone}`,`nb-spinner--overlay-${t.overlay}`,{"nb-spinner--with-label":t.showLabel&&!o.value,"nb-spinner--reduced-motion":s.value,"nb-spinner--overlay-stacked":a.value&&u.value&&!MT(n)}]);return($,E)=>(m(),he(an,{to:"body",disabled:!a.value},[u.value?(m(),M("div",Zt({key:0},$.$attrs,{id:de(i),ref_key:"rootEl",ref:r,class:g.value,tabindex:a.value?-1:void 0,role:c.value?"status":void 0,"aria-live":c.value?"polite":void 0,"aria-hidden":o.value?"true":void 0}),[E[1]||(E[1]=b("svg",{class:"nb-spinner__ring",viewBox:"0 0 32 32","aria-hidden":"true",focusable:"false"},[b("circle",{class:"nb-spinner__track",cx:"16",cy:"16",r:"14"}),b("circle",{class:"nb-spinner__arc",cx:"16",cy:"16",r:"14"})],-1)),e.showLabel&&!o.value?(m(),M("span",DT,Z(e.label),1)):V("",!0),c.value?(m(),M("span",ZT,Z(f.value),1)):V("",!0),$.$slots.default?(m(),M("div",{key:2,class:"nb-spinner__actions","aria-live":"off",onClick:E[0]||(E[0]=qe(()=>{},["stop"]))},[xe($.$slots,"default",{},void 0,!0)])):V("",!0)],16,VT)):V("",!0)],8,["disabled"]))}}),[["__scopeId","data-v-55d1147d"]]);const FT=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},C8=FT("minus","0 0 256 256",'<path d="M224,128a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128Z"/>'),Na=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},zT=Na("bell","0 0 256 256",'<path d="M218.35,178C212.58,168,204,140.13,204,104a76,76,0,1,0-152,0c0,36.13-8.59,64-14.36,73.95A12,12,0,0,0,48,196H92.23a36,36,0,0,0,71.54,0H208A12,12,0,0,0,218.35,178ZM128,220a28,28,0,0,1-27.71-24h55.42A28,28,0,0,1,128,220Zm83.45-34a3.91,3.91,0,0,1-3.44,2H48a3.91,3.91,0,0,1-3.44-2,4,4,0,0,1,0-4C52,169.17,60,139.32,60,104a68,68,0,1,1,136,0c0,35.31,8,65.17,15.44,78A4,4,0,0,1,211.45,186Z"/>'),UT=Na("bell","0 0 256 256",'<path d="M220.07,176.94C214.41,167.2,206,139.73,206,104a78,78,0,1,0-156,0c0,35.74-8.42,63.2-14.08,72.94A14,14,0,0,0,48,198H90.48a38,38,0,0,0,75,0H208a14,14,0,0,0,12.06-21.06ZM128,218a26,26,0,0,1-25.29-20h50.58A26,26,0,0,1,128,218Zm81.71-33a1.9,1.9,0,0,1-1.7,1H48a1.9,1.9,0,0,1-1.7-1,2,2,0,0,1,0-2C53.87,170,62,139.69,62,104a66,66,0,1,1,132,0c0,35.68,8.14,65.95,15.71,79A2,2,0,0,1,209.71,185Z"/>'),k8=Na("bell","0 0 256 256",'<path d="M221.8,175.94C216.25,166.38,208,139.33,208,104a80,80,0,1,0-160,0c0,35.34-8.26,62.38-13.81,71.94A16,16,0,0,0,48,200H88.81a40,40,0,0,0,78.38,0H208a16,16,0,0,0,13.8-24.06ZM128,216a24,24,0,0,1-22.62-16h45.24A24,24,0,0,1,128,216ZM48,184c7.7-13.24,16-43.92,16-80a64,64,0,1,1,128,0c0,36.05,8.28,66.73,16,80Z"/>'),WT=Na("bell","0 0 256 256",'<path d="M225.29,165.93C216.61,151,212,129.57,212,104a84,84,0,0,0-168,0c0,25.58-4.59,47-13.27,61.93A20.08,20.08,0,0,0,30.66,186,19.77,19.77,0,0,0,48,196H84.18a44,44,0,0,0,87.64,0H208a19.77,19.77,0,0,0,17.31-10A20.08,20.08,0,0,0,225.29,165.93ZM128,212a20,20,0,0,1-19.6-16h39.2A20,20,0,0,1,128,212ZM54.66,172C63.51,154,68,131.14,68,104a60,60,0,0,1,120,0c0,27.13,4.48,50,13.33,68Z"/>'),jT=Na("bell","0 0 256 256",'<path d="M221.8,175.94C216.25,166.38,208,139.33,208,104a80,80,0,1,0-160,0c0,35.34-8.26,62.38-13.81,71.94A16,16,0,0,0,48,200H88.81a40,40,0,0,0,78.38,0H208a16,16,0,0,0,13.8-24.06ZM128,216a24,24,0,0,1-22.62-16h45.24A24,24,0,0,1,128,216Z"/>'),KT=Na("bell","0 0 256 256",'<path d="M208,192H48a8,8,0,0,1-6.88-12C47.71,168.6,56,139.81,56,104a72,72,0,0,1,144,0c0,35.82,8.3,64.6,14.9,76A8,8,0,0,1,208,192Z" opacity="0.2"/><path d="M221.8,175.94C216.25,166.38,208,139.33,208,104a80,80,0,1,0-160,0c0,35.34-8.26,62.38-13.81,71.94A16,16,0,0,0,48,200H88.81a40,40,0,0,0,78.38,0H208a16,16,0,0,0,13.8-24.06ZM128,216a24,24,0,0,1-22.62-16h45.24A24,24,0,0,1,128,216ZM48,184c7.7-13.24,16-43.92,16-80a64,64,0,1,1,128,0c0,36.05,8.28,66.73,16,80Z"/>'),qT="bell",GT=Object.freeze(Object.defineProperty({__proto__:null,bold:WT,default:k8,duotone:KT,fill:jT,glyphName:qT,light:UT,regular:k8,thin:zT},Symbol.toStringTag,{value:"Module"}));var YT=["id","placeholder","min","max","step","disabled","required"],XT={class:"nb-number-input__steppers"},JT=["disabled"],QT=["disabled"],eN={key:0,class:"nb-number-input__inner-header"},tN=["for"],iN={key:0,class:"nb-number-input__asterisk","aria-hidden":"true"},nN={class:"nb-number-input__fluid-row"},rN=["id","placeholder","min","max","step","disabled","required"],sN={class:"nb-number-input__steppers"},aN=["disabled"],lN=["disabled"],w2=tt(Ne({__name:"NumberInput",props:{modelValue:{default:null},min:{default:void 0},max:{default:void 0},step:{default:1},placeholder:{default:""},name:{},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1},id:{default:void 0},label:{default:""},error:{default:""},warning:{default:""},helper:{default:""},variant:{default:"default"},size:{default:"md"}},emits:["update:modelValue","change"],setup(e,{expose:t,emit:i}){let n=e,r=i,s=K(null),a=K(!1),l=`nb-number-input-${Oi()}`,o=q(()=>n.id??l),c=q(()=>n.min!==void 0&&n.modelValue!==null&&n.modelValue!==void 0&&n.modelValue<=n.min),u=q(()=>n.max!==void 0&&n.modelValue!==null&&n.modelValue!==void 0&&n.modelValue>=n.max);function d(C){let g=C;return n.min!==void 0&&(g=Math.max(n.min,g)),n.max!==void 0&&(g=Math.min(n.max,g)),g}function h(C){s.value&&(s.value.value=C==null?"":String(C))}nt(()=>h(n.modelValue)),Ve(()=>n.modelValue,C=>{a.value||h(C)});function f(){let C=d((n.modelValue??0)+n.step);r("update:modelValue",C),r("change",C),h(C)}function v(){let C=d((n.modelValue??0)-n.step);r("update:modelValue",C),r("change",C),h(C)}function p(){if(!s.value)return;let C=s.value.value;if(C==="")r("update:modelValue",null);else{let g=parseFloat(C);isNaN(g)||r("update:modelValue",g)}}function w(){if(a.value=!1,!s.value)return;let C=s.value.value;if(C===""){r("update:modelValue",null),r("change",null);return}let g=parseFloat(C);if(!isNaN(g)){let $=d(g);r("update:modelValue",$),r("change",$),h($)}}let _=q(()=>["nb-number-input",`nb-number-input--${n.variant}`,`nb-number-input--${n.size}`,{"nb-number-input--error":!!n.error,"nb-number-input--warning":!n.error&&!!n.warning,"nb-number-input--disabled":n.disabled}]),y=q(()=>({"nb-number-input__field-wrapper--focused":a.value,"nb-number-input__field-wrapper--error":!!n.error,"nb-number-input__field-wrapper--warning":!n.error&&!!n.warning,"nb-number-input__field-wrapper--disabled":n.disabled}));return t({focus:()=>{var C;return(C=s.value)==null?void 0:C.focus()}}),(C,g)=>(m(),M("div",{class:Le(_.value)},[e.variant==="default"?(m(),M(Ce,{key:0},[e.label?(m(),he(pa,{key:0,for:o.value,required:e.required,disabled:e.disabled},{default:G(()=>[le(Z(e.label),1)]),_:1},8,["for","required","disabled"])):V("",!0),b("div",{class:Le(["nb-number-input__field-wrapper",y.value])},[b("input",{id:o.value,ref_key:"inputRef",ref:s,type:"number",class:"nb-number-input__field",placeholder:e.placeholder,min:e.min,max:e.max,step:e.step,disabled:e.disabled,required:e.required,onInput:p,onBlur:w,onKeydown:g[0]||(g[0]=xi(qe(()=>{var $;return($=s.value)==null?void 0:$.blur()},["prevent"]),["enter"])),onFocus:g[1]||(g[1]=$=>a.value=!0)},null,40,YT),e.error?(m(),he(at,{key:0,variant:"error","icon-only":!0,class:"nb-number-input__status"},{default:G(()=>[le(Z(e.error),1)]),_:1})):e.warning?(m(),he(at,{key:1,variant:"warning","icon-only":!0,class:"nb-number-input__status"},{default:G(()=>[le(Z(e.warning),1)]),_:1})):V("",!0),b("div",XT,[b("button",{type:"button",class:Le(["nb-number-input__stepper",{"nb-number-input__stepper--at-limit":c.value}]),disabled:e.disabled,"aria-label":"Decrease",onMousedown:g[2]||(g[2]=qe(()=>{},["prevent"])),onClick:v},[j(Ue,{name:de(C8),size:16},null,8,["name"])],42,JT),b("button",{type:"button",class:Le(["nb-number-input__stepper",{"nb-number-input__stepper--at-limit":u.value}]),disabled:e.disabled,"aria-label":"Increase",onMousedown:g[3]||(g[3]=qe(()=>{},["prevent"])),onClick:f},[j(Ue,{name:de(Io),size:16},null,8,["name"])],42,QT)])],2),e.error?(m(),he(at,{key:1,variant:"error",class:"nb-number-input__message"},{default:G(()=>[le(Z(e.error),1)]),_:1})):e.warning?(m(),he(at,{key:2,variant:"warning",class:"nb-number-input__message"},{default:G(()=>[le(Z(e.warning),1)]),_:1})):e.helper?(m(),he(at,{key:3,variant:"helper",class:"nb-number-input__message"},{default:G(()=>[le(Z(e.helper),1)]),_:1})):V("",!0)],64)):e.variant==="fluid"?(m(),M(Ce,{key:1},[b("div",{class:Le(["nb-number-input__field-wrapper",y.value])},[e.label?(m(),M("div",eN,[b("label",{for:o.value,class:"nb-number-input__inner-label"},[le(Z(e.label)+" ",1),e.required?(m(),M("span",iN,"*")):V("",!0)],8,tN),e.helper&&!e.error&&!e.warning?(m(),he(at,{key:0,variant:"helper","icon-only":!0,class:"nb-number-input__inner-message"},{default:G(()=>[le(Z(e.helper),1)]),_:1})):V("",!0)])):V("",!0),b("div",nN,[b("input",{id:o.value,ref_key:"inputRef",ref:s,type:"number",class:"nb-number-input__field",placeholder:e.placeholder,min:e.min,max:e.max,step:e.step,disabled:e.disabled,required:e.required,onInput:p,onBlur:w,onKeydown:g[4]||(g[4]=xi(qe(()=>{var $;return($=s.value)==null?void 0:$.blur()},["prevent"]),["enter"])),onFocus:g[5]||(g[5]=$=>a.value=!0)},null,40,rN),e.error?(m(),he(at,{key:0,variant:"error","icon-only":!0,class:"nb-number-input__status"},{default:G(()=>[le(Z(e.error),1)]),_:1})):e.warning?(m(),he(at,{key:1,variant:"warning","icon-only":!0,class:"nb-number-input__status"},{default:G(()=>[le(Z(e.warning),1)]),_:1})):V("",!0),b("div",sN,[b("button",{type:"button",class:Le(["nb-number-input__stepper",{"nb-number-input__stepper--at-limit":c.value}]),disabled:e.disabled,"aria-label":"Decrease",onMousedown:g[6]||(g[6]=qe(()=>{},["prevent"])),onClick:v},[j(Ue,{name:de(C8),size:16},null,8,["name"])],42,aN),b("button",{type:"button",class:Le(["nb-number-input__stepper",{"nb-number-input__stepper--at-limit":u.value}]),disabled:e.disabled,"aria-label":"Increase",onMousedown:g[7]||(g[7]=qe(()=>{},["prevent"])),onClick:f},[j(Ue,{name:de(Io),size:16},null,8,["name"])],42,lN)])])],2),e.error?(m(),he(at,{key:0,variant:"error",class:"nb-number-input__fluid-message"},{default:G(()=>[le(Z(e.error),1)]),_:1})):e.warning?(m(),he(at,{key:1,variant:"warning",class:"nb-number-input__fluid-message"},{default:G(()=>[le(Z(e.warning),1)]),_:1})):V("",!0)],64)):V("",!0)],2))}}),[["__scopeId","data-v-7d6b2226"]]),oN=["stop-color"],cN=["stop-color"],uN=["d","fill"],dN=["d","stroke","stroke-width"],A8=100,Ts=30,hN=tt(Ne({__name:"Sparkline",props:{data:{},color:{default:"var(--nb-c-primary)"},height:{default:40},width:{default:"100%"},strokeWidth:{default:1.5},fill:{type:Boolean,default:!0},smooth:{type:Boolean,default:!0}},setup(e){let t=e,i=`0 0 ${A8} ${Ts}`,n=`nb-sparkline-grad-${Oi()}`,r=q(()=>({width:typeof t.width=="number"?`${t.width}px`:t.width,height:typeof t.height=="number"?`${t.height}px`:t.height})),s=q(()=>{let a=t.data;if(!a||a.length<2)return{line:"",area:""};let l=Math.max(...a),o=Math.min(...a),c=l-o||1,u=A8/(a.length-1),d=Ts*.08,h=Ts-d*2,f=a.map((_,y)=>({x:y*u,y:Ts-d-(_-o)/c*h})),v=`M ${f[0].x.toFixed(2)} ${f[0].y.toFixed(2)}`;if(t.smooth)for(let _=1;_<f.length;_++){let y=f[_-1],C=f[_],g=y.x+u*.45,$=y.y,E=C.x-u*.45,L=C.y;v+=` C ${g.toFixed(2)} ${$.toFixed(2)}, ${E.toFixed(2)} ${L.toFixed(2)}, ${C.x.toFixed(2)} ${C.y.toFixed(2)}`}else for(let _=1;_<f.length;_++)v+=` L ${f[_].x.toFixed(2)} ${f[_].y.toFixed(2)}`;let p=f[f.length-1],w=`${v} L ${p.x.toFixed(2)} ${Ts} L ${f[0].x.toFixed(2)} ${Ts} Z`;return{line:v,area:w}});return(a,l)=>(m(),M("svg",{class:"nb-sparkline",style:mi(r.value),viewBox:i,preserveAspectRatio:"none",role:"img","aria-label":"Sparkline",xmlns:"http://www.w3.org/2000/svg"},[b("defs",null,[b("linearGradient",{id:n,x1:"0",y1:"0",x2:"0",y2:"1"},[b("stop",{offset:"0%","stop-color":e.color,"stop-opacity":"0.3"},null,8,oN),b("stop",{offset:"100%","stop-color":e.color,"stop-opacity":"0"},null,8,cN)])]),e.fill&&s.value.area?(m(),M("path",{key:0,d:s.value.area,fill:`url(#${n})`,stroke:"none"},null,8,uN)):V("",!0),s.value.line?(m(),M("path",{key:1,d:s.value.line,stroke:e.color,"stroke-width":e.strokeWidth,"vector-effect":"non-scaling-stroke",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},null,8,dN)):V("",!0)],4))}}),[["__scopeId","data-v-e796f74d"]]),bg=function(e){return e.Line="line",e.Contained="contained",e}(bg||{}),Cd=function(e){return e.Small="sm",e.Medium="md",e.Large="lg",e}(Cd||{}),fN=["aria-label"],pN=["id","data-tab-id","aria-selected","aria-controls","tabindex","disabled","onClick"],_N={class:"nb-tabs__label"},mN=["id","aria-labelledby"],$0=24,vN=tt(Ne({__name:"Tabs",props:{items:{},ariaLabel:{default:void 0},modelValue:{default:void 0},variant:{default:bg.Line},size:{default:Cd.Medium},disabled:{type:Boolean,default:!1},fullWidth:{type:Boolean,default:!1},id:{default:void 0}},emits:["update:modelValue","change"],setup(e,{emit:t}){var ue;let i=e,n=t,r=Wn(),s=l1(i),a=K(null),l=q(()=>i.items.filter(J=>!h(J))),o=K(i.modelValue??((ue=l.value[0])==null?void 0:ue.id));Ve(()=>i.modelValue,J=>{J!=null&&(o.value=J)});let c=q(()=>{var ne;let J=i.modelValue??o.value,ae=i.items.find(Q=>Q.id===J);return ae&&!h(ae)?ae.id:(ne=l.value[0])==null?void 0:ne.id}),u=q(()=>i.size===Cd.Large?18:16),d=q(()=>["nb-tabs",`nb-tabs--${i.variant}`,`nb-tabs--${i.size}`,{"nb-tabs--full-width":i.fullWidth,"nb-tabs--disabled":i.disabled,"nb-tabs--overflow":E.value}]);function h(J){return i.disabled||!!J.disabled}function f(J){return`${s}-tab-${J}`}function v(J){return`${s}-panel-${J}`}function p(J){return kv(r,J)}function w(J){h(J)||J.id===c.value||(o.value=J.id,n("update:modelValue",J.id),n("change",J.id,J))}function _(J){var ae,ne;(ne=(ae=a.value)==null?void 0:ae.querySelectorAll("[data-tab-id]"))==null||ne.forEach(Q=>{Q.dataset.tabId===J&&Q.focus()})}function y(J){let ae=l.value;if(!ae.length)return;let ne=ae[(ae.findIndex(Q=>Q.id===c.value)+J+ae.length)%ae.length];w(ne),_(ne.id)}function C(J){J&&(w(J),_(J.id))}let{phone:g}=Xo(),$=K(null),E=K(!1),L=q(()=>g.value||E.value);function B(){let J=$.value,ae=a.value;!J||!ae||(E.value=ae.scrollWidth>J.clientWidth+1)}let T=K(!1),X=K(!1);function W(){let J=a.value;if(!L.value||!J)return;let ae=J.scrollWidth-J.clientWidth;T.value=J.scrollLeft>1,X.value=J.scrollLeft<ae-1}function A(){let J=a.value;if(!L.value||!J)return;let ae=[...J.querySelectorAll("[data-tab-id]")].find(ne=>ne.dataset.tabId===c.value);if(ae){let ne=J.getBoundingClientRect(),Q=ae.getBoundingClientRect(),oe=Q.left-ne.left+J.scrollLeft,ve=oe+Q.width,fe=ae===J.firstElementChild,pe=ae===J.lastElementChild;oe<J.scrollLeft+(fe?0:$0)?J.scrollLeft=Math.max(0,fe?0:oe-$0):ve>J.scrollLeft+J.clientWidth-(pe?0:$0)&&(J.scrollLeft=ve-J.clientWidth+(pe?0:$0))}W()}Ve([c,L],()=>Gt(A));function x(){B(),A()}let F=null;function ie(){!F||!$.value||!a.value||(F.disconnect(),F.observe($.value),a.value.querySelectorAll("[data-tab-id]").forEach(J=>F==null?void 0:F.observe(J)))}Ve(()=>i.items,()=>Gt(()=>{ie(),x()}),{deep:!0}),nt(()=>{B(),A(),window.addEventListener("resize",x,{passive:!0}),typeof ResizeObserver<"u"&&(F=new ResizeObserver(x),ie())}),ri(()=>{window.removeEventListener("resize",x),F==null||F.disconnect(),F=null});function re(J){switch(J.key){case"ArrowRight":y(1);break;case"ArrowLeft":y(-1);break;case"Home":C(l.value[0]);break;case"End":C(l.value[l.value.length-1]);break;default:return}J.preventDefault()}return(J,ae)=>(m(),M("div",{ref_key:"rootRef",ref:$,class:Le(d.value)},[b("div",{ref_key:"listRef",ref:a,class:Le(["nb-tabs__list",{"nb-tabs__list--fade-start":L.value&&T.value,"nb-tabs__list--fade-end":L.value&&X.value}]),role:"tablist","aria-label":e.ariaLabel||void 0,onKeydown:re,onScrollPassive:W},[(m(!0),M(Ce,null,Fe(e.items,ne=>(m(),M("button",{id:f(ne.id),key:ne.id,"data-tab-id":ne.id,type:"button",role:"tab",class:Le(["nb-tabs__tab",{"nb-tabs__tab--active":ne.id===c.value}]),"aria-selected":ne.id===c.value,"aria-controls":p(ne.id)?v(ne.id):void 0,tabindex:ne.id===c.value?0:-1,disabled:h(ne),onClick:Q=>w(ne)},[ne.icon?(m(),he(Ue,{key:0,name:ne.icon,size:u.value,class:"nb-tabs__icon"},null,8,["name","size"])):V("",!0),b("span",_N,Z(ne.label),1),ne.badge==null?V("",!0):(m(),he(Cs,{key:1,size:"sm",class:"nb-tabs__badge"},{default:G(()=>[le(Z(ne.badge),1)]),_:2},1024))],10,pN))),128))],42,fN),(m(!0),M(Ce,null,Fe(e.items,ne=>(m(),M(Ce,{key:`panel-${ne.id}`},[ne.id===c.value&&p(ne.id)?(m(),M("div",{key:0,id:v(ne.id),class:"nb-tabs__panel",role:"tabpanel","aria-labelledby":f(ne.id),tabindex:"0"},[xe(J.$slots,ne.id,{item:ne},void 0,!0)],8,mN)):V("",!0)],64))),128))],2))}}),[["__scopeId","data-v-4367403c"]]),gN={class:"nb-shell-panel__header"},bN={class:"nb-shell-panel__header-left"},yN=["title"],wN={class:"nb-shell-panel__header-center"},SN={class:"nb-shell-panel__toolbar"},CN=["aria-label"],kN=["aria-pressed"],AN=["aria-pressed"],MN=["aria-pressed"],$N={key:0,class:"nb-shell-panel__content"},S2=tt(Ne({__name:"ShellPanel",props:{size:{default:"default"},title:{default:""},fluid:{type:Boolean,default:!1},fill:{type:Boolean,default:!1}},emits:["update:size"],setup(e,{expose:t,emit:i}){let n=e,{layerProps:r}=Js(),s=i,a=K(n.size);Ve(()=>n.size,c=>a.value=c);let l=q({get:()=>a.value,set:c=>{a.value=c,s("update:size",c)}});function o(c){l.value=c}return t({setSize:o}),(c,u)=>(m(),M("div",Zt({class:"nb-shell-panel"},de(r),{class:[l.value,{"nb-shell-panel--fluid":e.fluid,"nb-shell-panel--fill":e.fill}]}),[b("div",gN,[b("div",bN,[e.title?(m(),M("span",{key:0,class:"nb-shell-panel__title",title:e.title},Z(e.title),9,yN)):V("",!0),xe(c.$slots,"title",{},void 0,!0)]),b("div",wN,[b("div",SN,[xe(c.$slots,"toolbar",{},void 0,!0)])]),b("div",{class:"nb-shell-panel__header-right",role:"group","aria-label":e.title?`${e.title} panel size`:"Panel size"},[xe(c.$slots,"controls",{},()=>[b("button",{type:"button",class:Le(["nb-shell-panel__size-btn",{active:l.value==="collapsed"}]),"aria-pressed":l.value==="collapsed",title:"Minimize","aria-label":"Minimize",onClick:u[0]||(u[0]=d=>o("collapsed"))},[...u[3]||(u[3]=[b("svg",{width:"12",height:"12",viewBox:"0 0 12 12","aria-hidden":"true"},[b("line",{x1:"2",y1:"10",x2:"10",y2:"10",stroke:"currentColor","stroke-width":"1.5"})],-1)])],10,kN),b("button",{type:"button",class:Le(["nb-shell-panel__size-btn",{active:l.value==="default"}]),"aria-pressed":l.value==="default",title:"Default","aria-label":"Default",onClick:u[1]||(u[1]=d=>o("default"))},[...u[4]||(u[4]=[b("svg",{width:"12",height:"12",viewBox:"0 0 12 12","aria-hidden":"true"},[b("rect",{x:"1",y:"5",width:"10",height:"6",rx:"1",fill:"none",stroke:"currentColor","stroke-width":"1.2"})],-1)])],10,AN),b("button",{type:"button",class:Le(["nb-shell-panel__size-btn",{active:l.value==="full"}]),"aria-pressed":l.value==="full",title:"Maximize","aria-label":"Maximize",onClick:u[2]||(u[2]=d=>o("full"))},[...u[5]||(u[5]=[b("svg",{width:"12",height:"12",viewBox:"0 0 12 12","aria-hidden":"true"},[b("rect",{x:"1",y:"1",width:"10",height:"10",rx:"1",fill:"none",stroke:"currentColor","stroke-width":"1.2"}),b("line",{x1:"1",y1:"3.5",x2:"11",y2:"3.5",stroke:"currentColor","stroke-width":"1.2"})],-1)])],10,MN)],!0)],8,CN)]),l.value==="collapsed"?V("",!0):(m(),M("div",$N,[xe(c.$slots,"default",{},void 0,!0)]))],16))}}),[["__scopeId","data-v-368a5bf7"]]);const LN="modulepreload",EN=function(e){return"/"+e},M8={},$8=function(t,i,n){let r=Promise.resolve();if(i&&i.length>0){document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),l=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));r=Promise.allSettled(i.map(o=>{if(o=EN(o),o in M8)return;M8[o]=!0;const c=o.endsWith(".css"),u=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${o}"]${u}`))return;const d=document.createElement("link");if(d.rel=c?"stylesheet":LN,c||(d.as="script"),d.crossOrigin="",d.href=o,l&&d.setAttribute("nonce",l),document.head.appendChild(d),c)return new Promise((h,f)=>{d.addEventListener("load",h),d.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${o}`)))})}))}function s(a){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=a,window.dispatchEvent(l),!l.defaultPrevented)throw a}return r.then(a=>{for(const l of a||[])l.status==="rejected"&&s(l.reason);return t().catch(s)})};var xN=Ne({__name:"Form",props:{title:{default:void 0}},setup(e){return(t,i)=>(m(),he(yi,{is:"form",dir:"col",gap:"md",class:"nb-form"},{default:G(()=>[e.title?(m(),he(yi,{key:0,is:"h4",class:"nb-form--header"},{default:G(()=>[le(Z(e.title),1)]),_:1})):V("",!0),t.$slots.message?(m(),he(yi,{key:1,is:"p",class:"nb-form--message"},{default:G(()=>[xe(t.$slots,"message")]),_:3})):V("",!0),t.$slots.default?(m(),he(yi,{key:2,is:"div",dir:"col",gap:"sm",class:"nb-form--body"},{default:G(()=>[xe(t.$slots,"default")]),_:3})):V("",!0),t.$slots.footer?(m(),he(yi,{key:3,is:"footer",class:"nb-form--footer",justify:"end"},{default:G(()=>[xe(t.$slots,"footer")]),_:3})):V("",!0)]),_:3}))}});const Pa=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},HN=Pa("trash","0 0 256 256",'<path d="M216,52H172V40a20,20,0,0,0-20-20H104A20,20,0,0,0,84,40V52H40a4,4,0,0,0,0,8H52V208a12,12,0,0,0,12,12H192a12,12,0,0,0,12-12V60h12a4,4,0,0,0,0-8ZM92,40a12,12,0,0,1,12-12h48a12,12,0,0,1,12,12V52H92ZM196,208a4,4,0,0,1-4,4H64a4,4,0,0,1-4-4V60H196ZM108,104v64a4,4,0,0,1-8,0V104a4,4,0,0,1,8,0Zm48,0v64a4,4,0,0,1-8,0V104a4,4,0,0,1,8,0Z"/>'),TN=Pa("trash","0 0 256 256",'<path d="M216,50H174V40a22,22,0,0,0-22-22H104A22,22,0,0,0,82,40V50H40a6,6,0,0,0,0,12H50V208a14,14,0,0,0,14,14H192a14,14,0,0,0,14-14V62h10a6,6,0,0,0,0-12ZM94,40a10,10,0,0,1,10-10h48a10,10,0,0,1,10,10V50H94ZM194,208a2,2,0,0,1-2,2H64a2,2,0,0,1-2-2V62H194ZM110,104v64a6,6,0,0,1-12,0V104a6,6,0,0,1,12,0Zm48,0v64a6,6,0,0,1-12,0V104a6,6,0,0,1,12,0Z"/>'),L8=Pa("trash","0 0 256 256",'<path d="M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM96,40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8v8H96Zm96,168H64V64H192ZM112,104v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Z"/>'),NN=Pa("trash","0 0 256 256",'<path d="M216,48H180V36A28,28,0,0,0,152,8H104A28,28,0,0,0,76,36V48H40a12,12,0,0,0,0,24h4V208a20,20,0,0,0,20,20H192a20,20,0,0,0,20-20V72h4a12,12,0,0,0,0-24ZM100,36a4,4,0,0,1,4-4h48a4,4,0,0,1,4,4V48H100Zm88,168H68V72H188ZM116,104v64a12,12,0,0,1-24,0V104a12,12,0,0,1,24,0Zm48,0v64a12,12,0,0,1-24,0V104a12,12,0,0,1,24,0Z"/>'),PN=Pa("trash","0 0 256 256",'<path d="M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM112,168a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm0-120H96V40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8Z"/>'),ON=Pa("trash","0 0 256 256",'<path d="M200,56V208a8,8,0,0,1-8,8H64a8,8,0,0,1-8-8V56Z" opacity="0.2"/><path d="M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM96,40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8v8H96Zm96,168H64V64H192ZM112,104v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Z"/>'),IN="trash",C2=Object.freeze(Object.defineProperty({__proto__:null,bold:NN,default:L8,duotone:ON,fill:PN,glyphName:IN,light:TN,regular:L8,thin:HN},Symbol.toStringTag,{value:"Module"}));var RN=900,yg=class extends Error{constructor(){super("confirm timed out"),this.name="ConfirmTimeout"}},VN="This is taking longer than expected. It may still be running. Check before trying again.",Zr=zn(null),h1=K(!1),Fs=K(!1),Ec=K(!1),xc=K(void 0),wg=[],Ns=null,L0=null,j0=null,K0=null;function DN(){return Xh()?0:200}function ZN(){K0&&clearTimeout(K0),K0=null}function BN(e){if(e instanceof Error&&e.message)return e.message;let t=String(e);return t==="[object Object]"?"Something went wrong.":t}function FN(){j0=null;let e=wg.shift()??null;Zr.value=e,h1.value=!!e}function E8(e,t){return!e.done&&e.attempt===t&&Zr.value===e}function q0(e,t=Zr.value){!t||t.done||t===Zr.value&&(t.done=!0,ZN(),h1.value=!1,Fs.value=!1,Ec.value=!1,xc.value=void 0,t.resolve(e),j0&&clearTimeout(j0),j0=setTimeout(FN,DN()))}function zN(e,t){return new Promise((i,n)=>{let r=setTimeout(()=>n(new yg),t);e.then(s=>{clearTimeout(r),i(s)},s=>{clearTimeout(r),n(s)})})}async function UN(){let e=Zr.value;if(!e||e.done||Fs.value||Ec.value)return;let{onConfirm:t,formatError:i,timeout:n,timeoutMessage:r,successLabel:s}=e.options;if(!t){q0(!0,e);return}let a=++e.attempt;Fs.value=!0,xc.value=void 0;try{let l=Promise.resolve(t());if(await(n&&n>0?zN(l,n):l),!E8(e,a))return;Fs.value=!1,s?(Ec.value=!0,K0=setTimeout(()=>q0(!0,e),RN)):q0(!0,e)}catch(l){if(!E8(e,a))return;Fs.value=!1,xc.value=l instanceof yg?r??VN:(i??BN)(l)}}function WN(e){let t={...e??{title:""}};return delete t.onConfirm,delete t.formatError,delete t.body,t}var jN=Ne({name:"NbConfirmHost",setup(){return()=>{var i;let e=((i=Zr.value)==null?void 0:i.options)??null,t=e==null?void 0:e.body;return Ee(bH,{...WN(e),open:h1.value,busy:Fs.value,succeeded:Ec.value,error:xc.value??"",onConfirm:UN,onCancel:()=>q0(!1)},t?{default:()=>t()}:void 0)}}});function KN(){if(!Ns){if(typeof document>"u")throw Error("[NbConfirm] confirm() needs a DOM. It cannot run during server-side rendering or in a non-browser environment. Call it from an event handler, not from setup().");L0=document.createElement("div"),L0.setAttribute("data-nb-confirm-host",""),document.body.appendChild(L0),Ns=y4(jN),Ns.component("NbIcon",Ue),Ns.component("NbGrid",yi),Ns.config.warnHandler=(e,t,i)=>{if(e.includes("Failed to resolve component")){console.error(`[NbConfirm] ${e} The dialog runs in its own Vue app, so a sibling resolved by name has to be registered in useConfirm.composable.ts. Import it in NbConfirm instead where you can.`);return}console.warn(`[NbConfirm] ${e}${i}`)},Ns.mount(L0)}}function qN(e){return KN(),new Promise(t=>{let i={options:e,resolve:t,attempt:0,done:!1};if(Zr.value){wg.push(i);return}Zr.value=i,h1.value=!0})}function Sg(){return qN}var Cg={storageKey:"nubisco.named-theme",defaultTheme:null,attribute:"data-nb-theme",themes:null,persist:!0},Wi={...Cg},kd=K(Cg.defaultTheme);function kg(e){return typeof e=="string"&&/^[a-z0-9-]{1,64}$/.test(e)}function Ag(e){return!Wi.themes||Wi.themes.includes(e)}function GN(){if(!Wi.persist)return null;try{if(typeof localStorage>"u")return null;let e=localStorage.getItem(Wi.storageKey);return e===null||e===""?null:kg(e)&&Ag(e)?e:null}catch{return null}}function YN(e){if(Wi.persist)try{if(typeof localStorage>"u")return;e===null?localStorage.removeItem(Wi.storageKey):localStorage.setItem(Wi.storageKey,e)}catch{}}function x8(){if(typeof document>"u")return;let e=kd.value;e===null?document.documentElement.removeAttribute(Wi.attribute):document.documentElement.setAttribute(Wi.attribute,e)}var E0=null;function XN(){let e=GN(),t=Wi.defaultTheme;kd.value=e??(t!==null&&kg(t)&&Ag(t)?t:null),x8(),E0==null||E0(),E0=Ve(kd,i=>{YN(i),x8()})}function JN(e={}){Wi={...Wi,...e,themes:e.themes??Wi.themes},XN()}var QN=["compact","verbose"];function Mg(e){return typeof e=="string"&&QN.includes(e)}function eP(e){var t;try{let i=(t=globalThis.localStorage)==null?void 0:t.getItem(e);return Mg(i)?i:null}catch{return null}}function tP(e,t){var i;try{(i=globalThis.localStorage)==null||i.setItem(e,t)}catch{}}function iP(e){let t=K(eP(e.storageKey)??e.defaultVariant??"verbose");return Ve(t,i=>tP(e.storageKey,i)),{variant:t,isCompact:q(()=>t.value==="compact"),toggle:()=>{t.value=t.value==="compact"?"verbose":"compact"},setVariant:i=>{Mg(i)&&(t.value=i)}}}const nP=4,$g=i1("notifications",()=>{const e=K([]),t=q(()=>e.value.slice(0,nP));function i(s){e.value.push(s)}function n(s){const a=e.value.findIndex(l=>l.id===s);a!==-1&&e.value.splice(a,1)}function r(){e.value=[]}return{queue:e,visible:t,add:i,remove:n,clear:r}}),rP={class:"toast-layer","aria-live":"polite","aria-atomic":"true"},sP={class:"toast-body"},aP={key:0,class:"toast-title"},lP={class:"toast-message"},oP=Ne({__name:"NotificationToasts",setup(e){const t=$g(),i=new Map;Ve(()=>t.visible.map(r=>({id:r.id,duration:r.duration??3200})),r=>{for(const s of r){if(i.has(s.id))continue;const a=setTimeout(()=>{t.remove(s.id),i.delete(s.id)},s.duration);i.set(s.id,a)}},{immediate:!0,deep:!0});function n(r){const s=i.get(r);s&&(clearTimeout(s),i.delete(r)),t.remove(r)}return(r,s)=>{const a=Pt;return m(),M("div",rP,[(m(!0),M(Ce,null,Fe(de(t).visible,l=>(m(),M("div",{key:l.id,class:Le(["toast",`toast--${l.variant}`])},[b("div",sP,[l.title?(m(),M("div",aP,Z(l.title),1)):V("",!0),b("div",lP,Z(l.message),1)]),j(a,{variant:"ghost",size:"xs",icon:wc,title:"Dismiss",onClick:o=>n(l.id)},null,8,["onClick"])],2))),128))])}}}),zt=(e,t)=>{const i=e.__vccOpts||e;for(const[n,r]of t)i[n]=r;return i},cP=zt(oP,[["__scopeId","data-v-5b1d791e"]]),uP=Ne({__name:"App",setup(e){return(t,i)=>{const n=wo("RouterView");return m(),M(Ce,null,[j(n),j(cP)],64)}}});/*!
|
|
44
|
-
* vue-router v4.6.4
|
|
45
|
-
* (c) 2025 Eduardo San Martin Morote
|
|
46
|
-
* @license MIT
|
|
47
|
-
*/const Ds=typeof document<"u";function Lg(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function dP(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&Lg(e.default)}const dt=Object.assign;function Q1(e,t){const i={};for(const n in t){const r=t[n];i[n]=mn(r)?r.map(e):e(r)}return i}const po=()=>{},mn=Array.isArray;function H8(e,t){const i={};for(const n in e)i[n]=n in t?t[n]:e[n];return i}const Eg=/#/g,hP=/&/g,fP=/\//g,pP=/=/g,_P=/\?/g,xg=/\+/g,mP=/%5B/g,vP=/%5D/g,Hg=/%5E/g,gP=/%60/g,Tg=/%7B/g,bP=/%7C/g,Ng=/%7D/g,yP=/%20/g;function k2(e){return e==null?"":encodeURI(""+e).replace(bP,"|").replace(mP,"[").replace(vP,"]")}function wP(e){return k2(e).replace(Tg,"{").replace(Ng,"}").replace(Hg,"^")}function Ad(e){return k2(e).replace(xg,"%2B").replace(yP,"+").replace(Eg,"%23").replace(hP,"%26").replace(gP,"`").replace(Tg,"{").replace(Ng,"}").replace(Hg,"^")}function SP(e){return Ad(e).replace(pP,"%3D")}function CP(e){return k2(e).replace(Eg,"%23").replace(_P,"%3F")}function kP(e){return CP(e).replace(fP,"%2F")}function Ro(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}const AP=/\/$/,MP=e=>e.replace(AP,"");function eu(e,t,i="/"){let n,r={},s="",a="";const l=t.indexOf("#");let o=t.indexOf("?");return o=l>=0&&o>l?-1:o,o>=0&&(n=t.slice(0,o),s=t.slice(o,l>0?l:t.length),r=e(s.slice(1))),l>=0&&(n=n||t.slice(0,l),a=t.slice(l,t.length)),n=xP(n??t,i),{fullPath:n+s+a,path:n,query:r,hash:Ro(a)}}function $P(e,t){const i=t.query?e(t.query):"";return t.path+(i&&"?")+i+(t.hash||"")}function T8(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function LP(e,t,i){const n=t.matched.length-1,r=i.matched.length-1;return n>-1&&n===r&&ia(t.matched[n],i.matched[r])&&Pg(t.params,i.params)&&e(t.query)===e(i.query)&&t.hash===i.hash}function ia(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Pg(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var i in e)if(!EP(e[i],t[i]))return!1;return!0}function EP(e,t){return mn(e)?N8(e,t):mn(t)?N8(t,e):(e==null?void 0:e.valueOf())===(t==null?void 0:t.valueOf())}function N8(e,t){return mn(t)?e.length===t.length&&e.every((i,n)=>i===t[n]):e.length===1&&e[0]===t}function xP(e,t){if(e.startsWith("/"))return e;if(!e)return t;const i=t.split("/"),n=e.split("/"),r=n[n.length-1];(r===".."||r===".")&&n.push("");let s=i.length-1,a,l;for(a=0;a<n.length;a++)if(l=n[a],l!==".")if(l==="..")s>1&&s--;else break;return i.slice(0,s).join("/")+"/"+n.slice(a).join("/")}const gr={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};let Md=function(e){return e.pop="pop",e.push="push",e}({}),tu=function(e){return e.back="back",e.forward="forward",e.unknown="",e}({});function HP(e){if(!e)if(Ds){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),MP(e)}const TP=/^[^#]+#/;function NP(e,t){return e.replace(TP,"#")+t}function PP(e,t){const i=document.documentElement.getBoundingClientRect(),n=e.getBoundingClientRect();return{behavior:t.behavior,left:n.left-i.left-(t.left||0),top:n.top-i.top-(t.top||0)}}const f1=()=>({left:window.scrollX,top:window.scrollY});function OP(e){let t;if("el"in e){const i=e.el,n=typeof i=="string"&&i.startsWith("#"),r=typeof i=="string"?n?document.getElementById(i.slice(1)):document.querySelector(i):i;if(!r)return;t=PP(r,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function P8(e,t){return(history.state?history.state.position-t:-1)+e}const $d=new Map;function IP(e,t){$d.set(e,t)}function RP(e){const t=$d.get(e);return $d.delete(e),t}function VP(e){return typeof e=="string"||e&&typeof e=="object"}function Og(e){return typeof e=="string"||typeof e=="symbol"}let xt=function(e){return e[e.MATCHER_NOT_FOUND=1]="MATCHER_NOT_FOUND",e[e.NAVIGATION_GUARD_REDIRECT=2]="NAVIGATION_GUARD_REDIRECT",e[e.NAVIGATION_ABORTED=4]="NAVIGATION_ABORTED",e[e.NAVIGATION_CANCELLED=8]="NAVIGATION_CANCELLED",e[e.NAVIGATION_DUPLICATED=16]="NAVIGATION_DUPLICATED",e}({});const Ig=Symbol("");xt.MATCHER_NOT_FOUND+"",xt.NAVIGATION_GUARD_REDIRECT+"",xt.NAVIGATION_ABORTED+"",xt.NAVIGATION_CANCELLED+"",xt.NAVIGATION_DUPLICATED+"";function na(e,t){return dt(new Error,{type:e,[Ig]:!0},t)}function Xn(e,t){return e instanceof Error&&Ig in e&&(t==null||!!(e.type&t))}const DP=["params","query","hash"];function ZP(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;const t={};for(const i of DP)i in e&&(t[i]=e[i]);return JSON.stringify(t,null,2)}function BP(e){const t={};if(e===""||e==="?")return t;const i=(e[0]==="?"?e.slice(1):e).split("&");for(let n=0;n<i.length;++n){const r=i[n].replace(xg," "),s=r.indexOf("="),a=Ro(s<0?r:r.slice(0,s)),l=s<0?null:Ro(r.slice(s+1));if(a in t){let o=t[a];mn(o)||(o=t[a]=[o]),o.push(l)}else t[a]=l}return t}function O8(e){let t="";for(let i in e){const n=e[i];if(i=SP(i),n==null){n!==void 0&&(t+=(t.length?"&":"")+i);continue}(mn(n)?n.map(r=>r&&Ad(r)):[n&&Ad(n)]).forEach(r=>{r!==void 0&&(t+=(t.length?"&":"")+i,r!=null&&(t+="="+r))})}return t}function FP(e){const t={};for(const i in e){const n=e[i];n!==void 0&&(t[i]=mn(n)?n.map(r=>r==null?null:""+r):n==null?n:""+n)}return t}const zP=Symbol(""),I8=Symbol(""),p1=Symbol(""),A2=Symbol(""),Ld=Symbol("");function Dl(){let e=[];function t(n){return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)}}function i(){e=[]}return{add:t,list:()=>e.slice(),reset:i}}function Mr(e,t,i,n,r,s=a=>a()){const a=n&&(n.enterCallbacks[r]=n.enterCallbacks[r]||[]);return()=>new Promise((l,o)=>{const c=h=>{h===!1?o(na(xt.NAVIGATION_ABORTED,{from:i,to:t})):h instanceof Error?o(h):VP(h)?o(na(xt.NAVIGATION_GUARD_REDIRECT,{from:t,to:h})):(a&&n.enterCallbacks[r]===a&&typeof h=="function"&&a.push(h),l())},u=s(()=>e.call(n&&n.instances[r],t,i,c));let d=Promise.resolve(u);e.length<3&&(d=d.then(c)),d.catch(h=>o(h))})}function iu(e,t,i,n,r=s=>s()){const s=[];for(const a of e)for(const l in a.components){let o=a.components[l];if(!(t!=="beforeRouteEnter"&&!a.instances[l]))if(Lg(o)){const c=(o.__vccOpts||o)[t];c&&s.push(Mr(c,i,n,a,l,r))}else{let c=o();s.push(()=>c.then(u=>{if(!u)throw new Error(`Couldn't resolve component "${l}" at "${a.path}"`);const d=dP(u)?u.default:u;a.mods[l]=u,a.components[l]=d;const h=(d.__vccOpts||d)[t];return h&&Mr(h,i,n,a,l,r)()}))}}return s}function UP(e,t){const i=[],n=[],r=[],s=Math.max(t.matched.length,e.matched.length);for(let a=0;a<s;a++){const l=t.matched[a];l&&(e.matched.find(c=>ia(c,l))?n.push(l):i.push(l));const o=e.matched[a];o&&(t.matched.find(c=>ia(c,o))||r.push(o))}return[i,n,r]}/*!
|
|
48
|
-
* vue-router v4.6.4
|
|
49
|
-
* (c) 2025 Eduardo San Martin Morote
|
|
50
|
-
* @license MIT
|
|
51
|
-
*/let WP=()=>location.protocol+"//"+location.host;function Rg(e,t){const{pathname:i,search:n,hash:r}=t,s=e.indexOf("#");if(s>-1){let a=r.includes(e.slice(s))?e.slice(s).length:1,l=r.slice(a);return l[0]!=="/"&&(l="/"+l),T8(l,"")}return T8(i,e)+n+r}function jP(e,t,i,n){let r=[],s=[],a=null;const l=({state:h})=>{const f=Rg(e,location),v=i.value,p=t.value;let w=0;if(h){if(i.value=f,t.value=h,a&&a===v){a=null;return}w=p?h.position-p.position:0}else n(f);r.forEach(_=>{_(i.value,v,{delta:w,type:Md.pop,direction:w?w>0?tu.forward:tu.back:tu.unknown})})};function o(){a=i.value}function c(h){r.push(h);const f=()=>{const v=r.indexOf(h);v>-1&&r.splice(v,1)};return s.push(f),f}function u(){if(document.visibilityState==="hidden"){const{history:h}=window;if(!h.state)return;h.replaceState(dt({},h.state,{scroll:f1()}),"")}}function d(){for(const h of s)h();s=[],window.removeEventListener("popstate",l),window.removeEventListener("pagehide",u),document.removeEventListener("visibilitychange",u)}return window.addEventListener("popstate",l),window.addEventListener("pagehide",u),document.addEventListener("visibilitychange",u),{pauseListeners:o,listen:c,destroy:d}}function R8(e,t,i,n=!1,r=!1){return{back:e,current:t,forward:i,replaced:n,position:window.history.length,scroll:r?f1():null}}function KP(e){const{history:t,location:i}=window,n={value:Rg(e,i)},r={value:t.state};r.value||s(n.value,{back:null,current:n.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function s(o,c,u){const d=e.indexOf("#"),h=d>-1?(i.host&&document.querySelector("base")?e:e.slice(d))+o:WP()+e+o;try{t[u?"replaceState":"pushState"](c,"",h),r.value=c}catch(f){console.error(f),i[u?"replace":"assign"](h)}}function a(o,c){s(o,dt({},t.state,R8(r.value.back,o,r.value.forward,!0),c,{position:r.value.position}),!0),n.value=o}function l(o,c){const u=dt({},r.value,t.state,{forward:o,scroll:f1()});s(u.current,u,!0),s(o,dt({},R8(n.value,o,null),{position:u.position+1},c),!1),n.value=o}return{location:n,state:r,push:l,replace:a}}function qP(e){e=HP(e);const t=KP(e),i=jP(e,t.state,t.location,t.replace);function n(s,a=!0){a||i.pauseListeners(),history.go(s)}const r=dt({location:"",base:e,go:n,createHref:NP.bind(null,e)},t,i);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>t.state.value}),r}let ds=function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e}({});var Jt=function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.ParamRegExp=2]="ParamRegExp",e[e.ParamRegExpEnd=3]="ParamRegExpEnd",e[e.EscapeNext=4]="EscapeNext",e}(Jt||{});const GP={type:ds.Static,value:""},YP=/[a-zA-Z0-9_]/;function XP(e){if(!e)return[[]];if(e==="/")return[[GP]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(f){throw new Error(`ERR (${i})/"${c}": ${f}`)}let i=Jt.Static,n=i;const r=[];let s;function a(){s&&r.push(s),s=[]}let l=0,o,c="",u="";function d(){c&&(i===Jt.Static?s.push({type:ds.Static,value:c}):i===Jt.Param||i===Jt.ParamRegExp||i===Jt.ParamRegExpEnd?(s.length>1&&(o==="*"||o==="+")&&t(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),s.push({type:ds.Param,value:c,regexp:u,repeatable:o==="*"||o==="+",optional:o==="*"||o==="?"})):t("Invalid state to consume buffer"),c="")}function h(){c+=o}for(;l<e.length;){if(o=e[l++],o==="\\"&&i!==Jt.ParamRegExp){n=i,i=Jt.EscapeNext;continue}switch(i){case Jt.Static:o==="/"?(c&&d(),a()):o===":"?(d(),i=Jt.Param):h();break;case Jt.EscapeNext:h(),i=n;break;case Jt.Param:o==="("?i=Jt.ParamRegExp:YP.test(o)?h():(d(),i=Jt.Static,o!=="*"&&o!=="?"&&o!=="+"&&l--);break;case Jt.ParamRegExp:o===")"?u[u.length-1]=="\\"?u=u.slice(0,-1)+o:i=Jt.ParamRegExpEnd:u+=o;break;case Jt.ParamRegExpEnd:d(),i=Jt.Static,o!=="*"&&o!=="?"&&o!=="+"&&l--,u="";break;default:t("Unknown state");break}}return i===Jt.ParamRegExp&&t(`Unfinished custom RegExp for param "${c}"`),d(),a(),r}const V8="[^/]+?",JP={sensitive:!1,strict:!1,start:!0,end:!0};var Li=function(e){return e[e._multiplier=10]="_multiplier",e[e.Root=90]="Root",e[e.Segment=40]="Segment",e[e.SubSegment=30]="SubSegment",e[e.Static=40]="Static",e[e.Dynamic=20]="Dynamic",e[e.BonusCustomRegExp=10]="BonusCustomRegExp",e[e.BonusWildcard=-50]="BonusWildcard",e[e.BonusRepeatable=-20]="BonusRepeatable",e[e.BonusOptional=-8]="BonusOptional",e[e.BonusStrict=.7000000000000001]="BonusStrict",e[e.BonusCaseSensitive=.25]="BonusCaseSensitive",e}(Li||{});const QP=/[.+*?^${}()[\]/\\]/g;function eO(e,t){const i=dt({},JP,t),n=[];let r=i.start?"^":"";const s=[];for(const c of e){const u=c.length?[]:[Li.Root];i.strict&&!c.length&&(r+="/");for(let d=0;d<c.length;d++){const h=c[d];let f=Li.Segment+(i.sensitive?Li.BonusCaseSensitive:0);if(h.type===ds.Static)d||(r+="/"),r+=h.value.replace(QP,"\\$&"),f+=Li.Static;else if(h.type===ds.Param){const{value:v,repeatable:p,optional:w,regexp:_}=h;s.push({name:v,repeatable:p,optional:w});const y=_||V8;if(y!==V8){f+=Li.BonusCustomRegExp;try{`${y}`}catch(g){throw new Error(`Invalid custom RegExp for param "${v}" (${y}): `+g.message)}}let C=p?`((?:${y})(?:/(?:${y}))*)`:`(${y})`;d||(C=w&&c.length<2?`(?:/${C})`:"/"+C),w&&(C+="?"),r+=C,f+=Li.Dynamic,w&&(f+=Li.BonusOptional),p&&(f+=Li.BonusRepeatable),y===".*"&&(f+=Li.BonusWildcard)}u.push(f)}n.push(u)}if(i.strict&&i.end){const c=n.length-1;n[c][n[c].length-1]+=Li.BonusStrict}i.strict||(r+="/?"),i.end?r+="$":i.strict&&!r.endsWith("/")&&(r+="(?:/|$)");const a=new RegExp(r,i.sensitive?"":"i");function l(c){const u=c.match(a),d={};if(!u)return null;for(let h=1;h<u.length;h++){const f=u[h]||"",v=s[h-1];d[v.name]=f&&v.repeatable?f.split("/"):f}return d}function o(c){let u="",d=!1;for(const h of e){(!d||!u.endsWith("/"))&&(u+="/"),d=!1;for(const f of h)if(f.type===ds.Static)u+=f.value;else if(f.type===ds.Param){const{value:v,repeatable:p,optional:w}=f,_=v in c?c[v]:"";if(mn(_)&&!p)throw new Error(`Provided param "${v}" is an array but it is not repeatable (* or + modifiers)`);const y=mn(_)?_.join("/"):_;if(!y)if(w)h.length<2&&(u.endsWith("/")?u=u.slice(0,-1):d=!0);else throw new Error(`Missing required param "${v}"`);u+=y}}return u||"/"}return{re:a,score:n,keys:s,parse:l,stringify:o}}function tO(e,t){let i=0;for(;i<e.length&&i<t.length;){const n=t[i]-e[i];if(n)return n;i++}return e.length<t.length?e.length===1&&e[0]===Li.Static+Li.Segment?-1:1:e.length>t.length?t.length===1&&t[0]===Li.Static+Li.Segment?1:-1:0}function Vg(e,t){let i=0;const n=e.score,r=t.score;for(;i<n.length&&i<r.length;){const s=tO(n[i],r[i]);if(s)return s;i++}if(Math.abs(r.length-n.length)===1){if(D8(n))return 1;if(D8(r))return-1}return r.length-n.length}function D8(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const iO={strict:!1,end:!0,sensitive:!1};function nO(e,t,i){const n=eO(XP(e.path),i),r=dt(n,{record:e,parent:t,children:[],alias:[]});return t&&!r.record.aliasOf==!t.record.aliasOf&&t.children.push(r),r}function rO(e,t){const i=[],n=new Map;t=H8(iO,t);function r(d){return n.get(d)}function s(d,h,f){const v=!f,p=B8(d);p.aliasOf=f&&f.record;const w=H8(t,d),_=[p];if("alias"in d){const g=typeof d.alias=="string"?[d.alias]:d.alias;for(const $ of g)_.push(B8(dt({},p,{components:f?f.record.components:p.components,path:$,aliasOf:f?f.record:p})))}let y,C;for(const g of _){const{path:$}=g;if(h&&$[0]!=="/"){const E=h.record.path,L=E[E.length-1]==="/"?"":"/";g.path=h.record.path+($&&L+$)}if(y=nO(g,h,w),f?f.alias.push(y):(C=C||y,C!==y&&C.alias.push(y),v&&d.name&&!F8(y)&&a(d.name)),Dg(y)&&o(y),p.children){const E=p.children;for(let L=0;L<E.length;L++)s(E[L],y,f&&f.children[L])}f=f||y}return C?()=>{a(C)}:po}function a(d){if(Og(d)){const h=n.get(d);h&&(n.delete(d),i.splice(i.indexOf(h),1),h.children.forEach(a),h.alias.forEach(a))}else{const h=i.indexOf(d);h>-1&&(i.splice(h,1),d.record.name&&n.delete(d.record.name),d.children.forEach(a),d.alias.forEach(a))}}function l(){return i}function o(d){const h=lO(d,i);i.splice(h,0,d),d.record.name&&!F8(d)&&n.set(d.record.name,d)}function c(d,h){let f,v={},p,w;if("name"in d&&d.name){if(f=n.get(d.name),!f)throw na(xt.MATCHER_NOT_FOUND,{location:d});w=f.record.name,v=dt(Z8(h.params,f.keys.filter(C=>!C.optional).concat(f.parent?f.parent.keys.filter(C=>C.optional):[]).map(C=>C.name)),d.params&&Z8(d.params,f.keys.map(C=>C.name))),p=f.stringify(v)}else if(d.path!=null)p=d.path,f=i.find(C=>C.re.test(p)),f&&(v=f.parse(p),w=f.record.name);else{if(f=h.name?n.get(h.name):i.find(C=>C.re.test(h.path)),!f)throw na(xt.MATCHER_NOT_FOUND,{location:d,currentLocation:h});w=f.record.name,v=dt({},h.params,d.params),p=f.stringify(v)}const _=[];let y=f;for(;y;)_.unshift(y.record),y=y.parent;return{name:w,path:p,params:v,matched:_,meta:aO(_)}}e.forEach(d=>s(d));function u(){i.length=0,n.clear()}return{addRoute:s,resolve:c,removeRoute:a,clearRoutes:u,getRoutes:l,getRecordMatcher:r}}function Z8(e,t){const i={};for(const n of t)n in e&&(i[n]=e[n]);return i}function B8(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:sO(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function sO(e){const t={},i=e.props||!1;if("component"in e)t.default=i;else for(const n in e.components)t[n]=typeof i=="object"?i[n]:i;return t}function F8(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function aO(e){return e.reduce((t,i)=>dt(t,i.meta),{})}function lO(e,t){let i=0,n=t.length;for(;i!==n;){const s=i+n>>1;Vg(e,t[s])<0?n=s:i=s+1}const r=oO(e);return r&&(n=t.lastIndexOf(r,n-1)),n}function oO(e){let t=e;for(;t=t.parent;)if(Dg(t)&&Vg(e,t)===0)return t}function Dg({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function z8(e){const t=Mt(p1),i=Mt(A2),n=q(()=>{const o=de(e.to);return t.resolve(o)}),r=q(()=>{const{matched:o}=n.value,{length:c}=o,u=o[c-1],d=i.matched;if(!u||!d.length)return-1;const h=d.findIndex(ia.bind(null,u));if(h>-1)return h;const f=U8(o[c-2]);return c>1&&U8(u)===f&&d[d.length-1].path!==f?d.findIndex(ia.bind(null,o[c-2])):h}),s=q(()=>r.value>-1&&fO(i.params,n.value.params)),a=q(()=>r.value>-1&&r.value===i.matched.length-1&&Pg(i.params,n.value.params));function l(o={}){if(hO(o)){const c=t[de(e.replace)?"replace":"push"](de(e.to)).catch(po);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>c),c}return Promise.resolve()}return{route:n,href:q(()=>n.value.href),isActive:s,isExactActive:a,navigate:l}}function cO(e){return e.length===1?e[0]:e}const uO=Ne({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:z8,setup(e,{slots:t}){const i=vs(z8(e)),{options:n}=Mt(p1),r=q(()=>({[W8(e.activeClass,n.linkActiveClass,"router-link-active")]:i.isActive,[W8(e.exactActiveClass,n.linkExactActiveClass,"router-link-exact-active")]:i.isExactActive}));return()=>{const s=t.default&&cO(t.default(i));return e.custom?s:Ee("a",{"aria-current":i.isExactActive?e.ariaCurrentValue:null,href:i.href,onClick:i.navigate,class:r.value},s)}}}),dO=uO;function hO(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function fO(e,t){for(const i in t){const n=t[i],r=e[i];if(typeof n=="string"){if(n!==r)return!1}else if(!mn(r)||r.length!==n.length||n.some((s,a)=>s.valueOf()!==r[a].valueOf()))return!1}return!0}function U8(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const W8=(e,t,i)=>e??t??i,pO=Ne({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:i}){const n=Mt(Ld),r=q(()=>e.route||n.value),s=Mt(I8,0),a=q(()=>{let c=de(s);const{matched:u}=r.value;let d;for(;(d=u[c])&&!d.components;)c++;return c}),l=q(()=>r.value.matched[a.value]);tn(I8,q(()=>a.value+1)),tn(zP,l),tn(Ld,r);const o=K();return Ve(()=>[o.value,l.value,e.name],([c,u,d],[h,f,v])=>{u&&(u.instances[d]=c,f&&f!==u&&c&&c===h&&(u.leaveGuards.size||(u.leaveGuards=f.leaveGuards),u.updateGuards.size||(u.updateGuards=f.updateGuards))),c&&u&&(!f||!ia(u,f)||!h)&&(u.enterCallbacks[d]||[]).forEach(p=>p(c))},{flush:"post"}),()=>{const c=r.value,u=e.name,d=l.value,h=d&&d.components[u];if(!h)return j8(i.default,{Component:h,route:c});const f=d.props[u],v=f?f===!0?c.params:typeof f=="function"?f(c):f:null,w=Ee(h,dt({},v,t,{onVnodeUnmounted:_=>{_.component.isUnmounted&&(d.instances[u]=null)},ref:o}));return j8(i.default,{Component:w,route:c})||w}}});function j8(e,t){if(!e)return null;const i=e(t);return i.length===1?i[0]:i}const _O=pO;function mO(e){const t=rO(e.routes,e),i=e.parseQuery||BP,n=e.stringifyQuery||O8,r=e.history,s=Dl(),a=Dl(),l=Dl(),o=zn(gr);let c=gr;Ds&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=Q1.bind(null,U=>""+U),d=Q1.bind(null,kP),h=Q1.bind(null,Ro);function f(U,_e){let ge,se;return Og(U)?(ge=t.getRecordMatcher(U),se=_e):se=U,t.addRoute(se,ge)}function v(U){const _e=t.getRecordMatcher(U);_e&&t.removeRoute(_e)}function p(){return t.getRoutes().map(U=>U.record)}function w(U){return!!t.getRecordMatcher(U)}function _(U,_e){if(_e=dt({},_e||o.value),typeof U=="string"){const te=eu(i,U,_e.path),ee=t.resolve({path:te.path},_e),me=r.createHref(te.fullPath);return dt(te,ee,{params:h(ee.params),hash:Ro(te.hash),redirectedFrom:void 0,href:me})}let ge;if(U.path!=null)ge=dt({},U,{path:eu(i,U.path,_e.path).path});else{const te=dt({},U.params);for(const ee in te)te[ee]==null&&delete te[ee];ge=dt({},U,{params:d(te)}),_e.params=d(_e.params)}const se=t.resolve(ge,_e),H=U.hash||"";se.params=u(h(se.params));const N=$P(n,dt({},U,{hash:wP(H),path:se.path})),O=r.createHref(N);return dt({fullPath:N,hash:H,query:n===O8?FP(U.query):U.query||{}},se,{redirectedFrom:void 0,href:O})}function y(U){return typeof U=="string"?eu(i,U,o.value.path):dt({},U)}function C(U,_e){if(c!==U)return na(xt.NAVIGATION_CANCELLED,{from:_e,to:U})}function g(U){return L(U)}function $(U){return g(dt(y(U),{replace:!0}))}function E(U,_e){const ge=U.matched[U.matched.length-1];if(ge&&ge.redirect){const{redirect:se}=ge;let H=typeof se=="function"?se(U,_e):se;return typeof H=="string"&&(H=H.includes("?")||H.includes("#")?H=y(H):{path:H},H.params={}),dt({query:U.query,hash:U.hash,params:H.path!=null?{}:U.params},H)}}function L(U,_e){const ge=c=_(U),se=o.value,H=U.state,N=U.force,O=U.replace===!0,te=E(ge,se);if(te)return L(dt(y(te),{state:typeof te=="object"?dt({},H,te.state):H,force:N,replace:O}),_e||ge);const ee=ge;ee.redirectedFrom=_e;let me;return!N&&LP(n,se,ge)&&(me=na(xt.NAVIGATION_DUPLICATED,{to:ee,from:se}),Q(se,se,!0,!1)),(me?Promise.resolve(me):X(ee,se)).catch(we=>Xn(we)?Xn(we,xt.NAVIGATION_GUARD_REDIRECT)?we:ne(we):J(we,ee,se)).then(we=>{if(we){if(Xn(we,xt.NAVIGATION_GUARD_REDIRECT))return L(dt({replace:O},y(we.to),{state:typeof we.to=="object"?dt({},H,we.to.state):H,force:N}),_e||ee)}else we=A(ee,se,!0,O,H);return W(ee,se,we),we})}function B(U,_e){const ge=C(U,_e);return ge?Promise.reject(ge):Promise.resolve()}function T(U){const _e=fe.values().next().value;return _e&&typeof _e.runWithContext=="function"?_e.runWithContext(U):U()}function X(U,_e){let ge;const[se,H,N]=UP(U,_e);ge=iu(se.reverse(),"beforeRouteLeave",U,_e);for(const te of se)te.leaveGuards.forEach(ee=>{ge.push(Mr(ee,U,_e))});const O=B.bind(null,U,_e);return ge.push(O),ye(ge).then(()=>{ge=[];for(const te of s.list())ge.push(Mr(te,U,_e));return ge.push(O),ye(ge)}).then(()=>{ge=iu(H,"beforeRouteUpdate",U,_e);for(const te of H)te.updateGuards.forEach(ee=>{ge.push(Mr(ee,U,_e))});return ge.push(O),ye(ge)}).then(()=>{ge=[];for(const te of N)if(te.beforeEnter)if(mn(te.beforeEnter))for(const ee of te.beforeEnter)ge.push(Mr(ee,U,_e));else ge.push(Mr(te.beforeEnter,U,_e));return ge.push(O),ye(ge)}).then(()=>(U.matched.forEach(te=>te.enterCallbacks={}),ge=iu(N,"beforeRouteEnter",U,_e,T),ge.push(O),ye(ge))).then(()=>{ge=[];for(const te of a.list())ge.push(Mr(te,U,_e));return ge.push(O),ye(ge)}).catch(te=>Xn(te,xt.NAVIGATION_CANCELLED)?te:Promise.reject(te))}function W(U,_e,ge){l.list().forEach(se=>T(()=>se(U,_e,ge)))}function A(U,_e,ge,se,H){const N=C(U,_e);if(N)return N;const O=_e===gr,te=Ds?history.state:{};ge&&(se||O?r.replace(U.fullPath,dt({scroll:O&&te&&te.scroll},H)):r.push(U.fullPath,H)),o.value=U,Q(U,_e,ge,O),ne()}let x;function F(){x||(x=r.listen((U,_e,ge)=>{if(!pe.listening)return;const se=_(U),H=E(se,pe.currentRoute.value);if(H){L(dt(H,{replace:!0,force:!0}),se).catch(po);return}c=se;const N=o.value;Ds&&IP(P8(N.fullPath,ge.delta),f1()),X(se,N).catch(O=>Xn(O,xt.NAVIGATION_ABORTED|xt.NAVIGATION_CANCELLED)?O:Xn(O,xt.NAVIGATION_GUARD_REDIRECT)?(L(dt(y(O.to),{force:!0}),se).then(te=>{Xn(te,xt.NAVIGATION_ABORTED|xt.NAVIGATION_DUPLICATED)&&!ge.delta&&ge.type===Md.pop&&r.go(-1,!1)}).catch(po),Promise.reject()):(ge.delta&&r.go(-ge.delta,!1),J(O,se,N))).then(O=>{O=O||A(se,N,!1),O&&(ge.delta&&!Xn(O,xt.NAVIGATION_CANCELLED)?r.go(-ge.delta,!1):ge.type===Md.pop&&Xn(O,xt.NAVIGATION_ABORTED|xt.NAVIGATION_DUPLICATED)&&r.go(-1,!1)),W(se,N,O)}).catch(po)}))}let ie=Dl(),re=Dl(),ue;function J(U,_e,ge){ne(U);const se=re.list();return se.length?se.forEach(H=>H(U,_e,ge)):console.error(U),Promise.reject(U)}function ae(){return ue&&o.value!==gr?Promise.resolve():new Promise((U,_e)=>{ie.add([U,_e])})}function ne(U){return ue||(ue=!U,F(),ie.list().forEach(([_e,ge])=>U?ge(U):_e()),ie.reset()),U}function Q(U,_e,ge,se){const{scrollBehavior:H}=e;if(!Ds||!H)return Promise.resolve();const N=!ge&&RP(P8(U.fullPath,0))||(se||!ge)&&history.state&&history.state.scroll||null;return Gt().then(()=>H(U,_e,N)).then(O=>O&&OP(O)).catch(O=>J(O,U,_e))}const oe=U=>r.go(U);let ve;const fe=new Set,pe={currentRoute:o,listening:!0,addRoute:f,removeRoute:v,clearRoutes:t.clearRoutes,hasRoute:w,getRoutes:p,resolve:_,options:e,push:g,replace:$,go:oe,back:()=>oe(-1),forward:()=>oe(1),beforeEach:s.add,beforeResolve:a.add,afterEach:l.add,onError:re.add,isReady:ae,install(U){U.component("RouterLink",dO),U.component("RouterView",_O),U.config.globalProperties.$router=pe,Object.defineProperty(U.config.globalProperties,"$route",{enumerable:!0,get:()=>de(o)}),Ds&&!ve&&o.value===gr&&(ve=!0,g(r.location).catch(se=>{}));const _e={};for(const se in gr)Object.defineProperty(_e,se,{get:()=>o.value[se],enumerable:!0});U.provide(p1,pe),U.provide(A2,Cm(_e)),U.provide(Ld,o);const ge=U.unmount;fe.add(U),U.unmount=function(){fe.delete(U),fe.size<1&&(c=gr,x&&x(),x=null,o.value=gr,ve=!1,ue=!1),ge()}}};function ye(U){return U.reduce((_e,ge)=>_e.then(()=>T(ge)),Promise.resolve())}return pe}function _1(){return Mt(p1)}function Jo(e){return Mt(A2)}const Zg="/logo.svg",Oa=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},vO=Oa("book","0 0 256 256",'<path d="M208,28H72A28,28,0,0,0,44,56V224a4,4,0,0,0,4,4H192a4,4,0,0,0,0-8H52v-4a20,20,0,0,1,20-20H208a4,4,0,0,0,4-4V32A4,4,0,0,0,208,28Zm-4,160H72a27.94,27.94,0,0,0-20,8.42V56A20,20,0,0,1,72,36H204Z"/>'),gO=Oa("book","0 0 256 256",'<path d="M208,26H72A30,30,0,0,0,42,56V224a6,6,0,0,0,6,6H192a6,6,0,0,0,0-12H54v-2a18,18,0,0,1,18-18H208a6,6,0,0,0,6-6V32A6,6,0,0,0,208,26Zm-6,160H72a29.87,29.87,0,0,0-18,6V56A18,18,0,0,1,72,38H202Z"/>'),K8=Oa("book","0 0 256 256",'<path d="M208,24H72A32,32,0,0,0,40,56V224a8,8,0,0,0,8,8H192a8,8,0,0,0,0-16H56a16,16,0,0,1,16-16H208a8,8,0,0,0,8-8V32A8,8,0,0,0,208,24Zm-8,160H72a31.82,31.82,0,0,0-16,4.29V56A16,16,0,0,1,72,40H200Z"/>'),bO=Oa("book","0 0 256 256",'<path d="M208,20H72A36,36,0,0,0,36,56V224a12,12,0,0,0,12,12H192a12,12,0,0,0,0-24H60v-4a12,12,0,0,1,12-12H208a12,12,0,0,0,12-12V32A12,12,0,0,0,208,20ZM196,172H72a35.59,35.59,0,0,0-12,2.06V56A12,12,0,0,1,72,44H196Z"/>'),yO=Oa("book","0 0 256 256",'<path d="M216,32V192a8,8,0,0,1-8,8H72a16,16,0,0,0-16,16H192a8,8,0,0,1,0,16H48a8,8,0,0,1-8-8V56A32,32,0,0,1,72,24H208A8,8,0,0,1,216,32Z"/>'),wO=Oa("book","0 0 256 256",'<path d="M208,32V192H72a24,24,0,0,0-24,24V56A24,24,0,0,1,72,32Z" opacity="0.2"/><path d="M208,24H72A32,32,0,0,0,40,56V224a8,8,0,0,0,8,8H192a8,8,0,0,0,0-16H56a16,16,0,0,1,16-16H208a8,8,0,0,0,8-8V32A8,8,0,0,0,208,24Zm-8,160H72a31.82,31.82,0,0,0-16,4.29V56A16,16,0,0,1,72,40H200Z"/>'),SO="book",CO=Object.freeze(Object.defineProperty({__proto__:null,bold:bO,default:K8,duotone:wO,fill:yO,glyphName:SO,light:gO,regular:K8,thin:vO},Symbol.toStringTag,{value:"Module"})),Ia=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},kO=Ia("heart","0 0 256 256",'<path d="M178,44c-21.44,0-39.92,10.19-50,27.07C117.92,54.19,99.44,44,78,44a58.07,58.07,0,0,0-58,58c0,28.59,18,58.47,53.4,88.79a333.81,333.81,0,0,0,52.7,36.73,4,4,0,0,0,3.8,0,333.81,333.81,0,0,0,52.7-36.73C218,160.47,236,130.59,236,102A58.07,58.07,0,0,0,178,44ZM128,219.42c-14-8-100-59.35-100-117.42A50.06,50.06,0,0,1,78,52c21.11,0,38.85,11.31,46.3,29.51a4,4,0,0,0,7.4,0C139.15,63.31,156.89,52,178,52a50.06,50.06,0,0,1,50,50C228,160,142,211.46,128,219.42Z"/>'),AO=Ia("heart","0 0 256 256",'<path d="M178,42c-21,0-39.26,9.47-50,25.34C117.26,51.47,99,42,78,42a60.07,60.07,0,0,0-60,60c0,29.2,18.2,59.59,54.1,90.31a334.68,334.68,0,0,0,53.06,37,6,6,0,0,0,5.68,0,334.68,334.68,0,0,0,53.06-37C219.8,161.59,238,131.2,238,102A60.07,60.07,0,0,0,178,42ZM128,217.11C111.59,207.64,30,157.72,30,102A48.05,48.05,0,0,1,78,54c20.28,0,37.31,10.83,44.45,28.27a6,6,0,0,0,11.1,0C140.69,64.83,157.72,54,178,54a48.05,48.05,0,0,1,48,48C226,157.72,144.41,207.64,128,217.11Z"/>'),q8=Ia("heart","0 0 256 256",'<path d="M178,40c-20.65,0-38.73,8.88-50,23.89C116.73,48.88,98.65,40,78,40a62.07,62.07,0,0,0-62,62c0,70,103.79,126.66,108.21,129a8,8,0,0,0,7.58,0C136.21,228.66,240,172,240,102A62.07,62.07,0,0,0,178,40ZM128,214.8C109.74,204.16,32,155.69,32,102A46.06,46.06,0,0,1,78,56c19.45,0,35.78,10.36,42.6,27a8,8,0,0,0,14.8,0c6.82-16.67,23.15-27,42.6-27a46.06,46.06,0,0,1,46,46C224,155.61,146.24,204.15,128,214.8Z"/>'),MO=Ia("heart","0 0 256 256",'<path d="M178,36c-20.09,0-37.92,7.93-50,21.56C115.92,43.93,98.09,36,78,36a66.08,66.08,0,0,0-66,66c0,72.34,105.81,130.14,110.31,132.57a12,12,0,0,0,11.38,0C138.19,232.14,244,174.34,244,102A66.08,66.08,0,0,0,178,36Zm-5.49,142.36A328.69,328.69,0,0,1,128,210.16a328.69,328.69,0,0,1-44.51-31.8C61.82,159.77,36,131.42,36,102A42,42,0,0,1,78,60c17.8,0,32.7,9.4,38.89,24.54a12,12,0,0,0,22.22,0C145.3,69.4,160.2,60,178,60a42,42,0,0,1,42,42C220,131.42,194.18,159.77,172.51,178.36Z"/>'),M2=Ia("heart","0 0 256 256",'<path d="M240,102c0,70-103.79,126.66-108.21,129a8,8,0,0,1-7.58,0C119.79,228.66,16,172,16,102A62.07,62.07,0,0,1,78,40c20.65,0,38.73,8.88,50,23.89C139.27,48.88,157.35,40,178,40A62.07,62.07,0,0,1,240,102Z"/>'),$O=Ia("heart","0 0 256 256",'<path d="M232,102c0,66-104,122-104,122S24,168,24,102A54,54,0,0,1,78,48c22.59,0,41.94,12.31,50,32,8.06-19.69,27.41-32,50-32A54,54,0,0,1,232,102Z" opacity="0.2"/><path d="M178,40c-20.65,0-38.73,8.88-50,23.89C116.73,48.88,98.65,40,78,40a62.07,62.07,0,0,0-62,62c0,70,103.79,126.66,108.21,129a8,8,0,0,0,7.58,0C136.21,228.66,240,172,240,102A62.07,62.07,0,0,0,178,40ZM128,214.8C109.74,204.16,32,155.69,32,102A46.06,46.06,0,0,1,78,56c19.45,0,35.78,10.36,42.6,27a8,8,0,0,0,14.8,0c6.82-16.67,23.15-27,42.6-27a46.06,46.06,0,0,1,46,46C224,155.61,146.24,204.15,128,214.8Z"/>'),LO="heart",EO=Object.freeze(Object.defineProperty({__proto__:null,bold:MO,default:q8,duotone:$O,fill:M2,glyphName:LO,light:AO,regular:q8,thin:kO},Symbol.toStringTag,{value:"Module"})),Ra=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},xO=Ra("gear","0 0 256 256",'<path d="M128,84a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,84Zm0,80a36,36,0,1,1,36-36A36,36,0,0,1,128,164Zm83.93-32.49q.13-3.51,0-7l15.83-19.79a4,4,0,0,0,.75-3.53A103.64,103.64,0,0,0,218,75.9a4,4,0,0,0-3-2l-25.19-2.8c-1.58-1.71-3.24-3.37-4.95-4.95L182.07,41a4,4,0,0,0-2-3A104,104,0,0,0,154.82,27.5a4,4,0,0,0-3.53.74L131.51,44.07q-3.51-.14-7,0L104.7,28.24a4,4,0,0,0-3.53-.75A103.64,103.64,0,0,0,75.9,38a4,4,0,0,0-2,3l-2.8,25.19c-1.71,1.58-3.37,3.24-4.95,4.95L41,73.93a4,4,0,0,0-3,2A104,104,0,0,0,27.5,101.18a4,4,0,0,0,.74,3.53l15.83,19.78q-.14,3.51,0,7L28.24,151.3a4,4,0,0,0-.75,3.53A103.64,103.64,0,0,0,38,180.1a4,4,0,0,0,3,2l25.19,2.8c1.58,1.71,3.24,3.37,4.95,4.95l2.8,25.2a4,4,0,0,0,2,3,104,104,0,0,0,25.28,10.46,4,4,0,0,0,3.53-.74l19.78-15.83q3.51.13,7,0l19.79,15.83a4,4,0,0,0,2.5.88,4,4,0,0,0,1-.13A103.64,103.64,0,0,0,180.1,218a4,4,0,0,0,2-3l2.8-25.19c1.71-1.58,3.37-3.24,4.95-4.95l25.2-2.8a4,4,0,0,0,3-2,104,104,0,0,0,10.46-25.28,4,4,0,0,0-.74-3.53Zm.17,42.83-24.67,2.74a4,4,0,0,0-2.55,1.32,76.2,76.2,0,0,1-6.48,6.48,4,4,0,0,0-1.32,2.55l-2.74,24.66a95.45,95.45,0,0,1-19.64,8.15l-19.38-15.51a4,4,0,0,0-2.5-.87h-.24a73.67,73.67,0,0,1-9.16,0,4,4,0,0,0-2.74.87l-19.37,15.5a95.33,95.33,0,0,1-19.65-8.13l-2.74-24.67a4,4,0,0,0-1.32-2.55,76.2,76.2,0,0,1-6.48-6.48,4,4,0,0,0-2.55-1.32l-24.66-2.74a95.45,95.45,0,0,1-8.15-19.64l15.51-19.38a4,4,0,0,0,.87-2.74,77.76,77.76,0,0,1,0-9.16,4,4,0,0,0-.87-2.74l-15.5-19.37A95.33,95.33,0,0,1,43.9,81.66l24.67-2.74a4,4,0,0,0,2.55-1.32,76.2,76.2,0,0,1,6.48-6.48,4,4,0,0,0,1.32-2.55l2.74-24.66a95.45,95.45,0,0,1,19.64-8.15l19.38,15.51a4,4,0,0,0,2.74.87,73.67,73.67,0,0,1,9.16,0,4,4,0,0,0,2.74-.87l19.37-15.5a95.33,95.33,0,0,1,19.65,8.13l2.74,24.67a4,4,0,0,0,1.32,2.55,76.2,76.2,0,0,1,6.48,6.48,4,4,0,0,0,2.55,1.32l24.66,2.74a95.45,95.45,0,0,1,8.15,19.64l-15.51,19.38a4,4,0,0,0-.87,2.74,77.76,77.76,0,0,1,0,9.16,4,4,0,0,0,.87,2.74l15.5,19.37A95.33,95.33,0,0,1,212.1,174.34Z"/>'),HO=Ra("gear","0 0 256 256",'<path d="M128,82a46,46,0,1,0,46,46A46.06,46.06,0,0,0,128,82Zm0,80a34,34,0,1,1,34-34A34,34,0,0,1,128,162ZM214,130.84c.06-1.89.06-3.79,0-5.68L229.33,106a6,6,0,0,0,1.11-5.29A105.34,105.34,0,0,0,219.76,74.9a6,6,0,0,0-4.53-3l-24.45-2.71q-1.93-2.07-4-4l-2.72-24.46a6,6,0,0,0-3-4.53,105.65,105.65,0,0,0-25.77-10.66A6,6,0,0,0,150,26.68l-19.2,15.37c-1.89-.06-3.79-.06-5.68,0L106,26.67a6,6,0,0,0-5.29-1.11A105.34,105.34,0,0,0,74.9,36.24a6,6,0,0,0-3,4.53L69.23,65.22q-2.07,1.94-4,4L40.76,72a6,6,0,0,0-4.53,3,105.65,105.65,0,0,0-10.66,25.77A6,6,0,0,0,26.68,106l15.37,19.2c-.06,1.89-.06,3.79,0,5.68L26.67,150.05a6,6,0,0,0-1.11,5.29A105.34,105.34,0,0,0,36.24,181.1a6,6,0,0,0,4.53,3l24.45,2.71q1.94,2.07,4,4L72,215.24a6,6,0,0,0,3,4.53,105.65,105.65,0,0,0,25.77,10.66,6,6,0,0,0,5.29-1.11L125.16,214c1.89.06,3.79.06,5.68,0l19.21,15.38a6,6,0,0,0,3.75,1.31,6.2,6.2,0,0,0,1.54-.2,105.34,105.34,0,0,0,25.76-10.68,6,6,0,0,0,3-4.53l2.71-24.45q2.07-1.93,4-4l24.46-2.72a6,6,0,0,0,4.53-3,105.49,105.49,0,0,0,10.66-25.77,6,6,0,0,0-1.11-5.29Zm-3.1,41.63-23.64,2.63a6,6,0,0,0-3.82,2,75.14,75.14,0,0,1-6.31,6.31,6,6,0,0,0-2,3.82l-2.63,23.63A94.28,94.28,0,0,1,155.14,218l-18.57-14.86a6,6,0,0,0-3.75-1.31h-.36a78.07,78.07,0,0,1-8.92,0,6,6,0,0,0-4.11,1.3L100.87,218a94.13,94.13,0,0,1-17.34-7.17L80.9,187.21a6,6,0,0,0-2-3.82,75.14,75.14,0,0,1-6.31-6.31,6,6,0,0,0-3.82-2l-23.63-2.63A94.28,94.28,0,0,1,38,155.14l14.86-18.57a6,6,0,0,0,1.3-4.11,78.07,78.07,0,0,1,0-8.92,6,6,0,0,0-1.3-4.11L38,100.87a94.13,94.13,0,0,1,7.17-17.34L68.79,80.9a6,6,0,0,0,3.82-2,75.14,75.14,0,0,1,6.31-6.31,6,6,0,0,0,2-3.82l2.63-23.63A94.28,94.28,0,0,1,100.86,38l18.57,14.86a6,6,0,0,0,4.11,1.3,78.07,78.07,0,0,1,8.92,0,6,6,0,0,0,4.11-1.3L155.13,38a94.13,94.13,0,0,1,17.34,7.17l2.63,23.64a6,6,0,0,0,2,3.82,75.14,75.14,0,0,1,6.31,6.31,6,6,0,0,0,3.82,2l23.63,2.63A94.28,94.28,0,0,1,218,100.86l-14.86,18.57a6,6,0,0,0-1.3,4.11,78.07,78.07,0,0,1,0,8.92,6,6,0,0,0,1.3,4.11L218,155.13A94.13,94.13,0,0,1,210.85,172.47Z"/>'),G8=Ra("gear","0 0 256 256",'<path d="M128,80a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Zm88-29.84q.06-2.16,0-4.32l14.92-18.64a8,8,0,0,0,1.48-7.06,107.21,107.21,0,0,0-10.88-26.25,8,8,0,0,0-6-3.93l-23.72-2.64q-1.48-1.56-3-3L186,40.54a8,8,0,0,0-3.94-6,107.71,107.71,0,0,0-26.25-10.87,8,8,0,0,0-7.06,1.49L130.16,40Q128,40,125.84,40L107.2,25.11a8,8,0,0,0-7.06-1.48A107.6,107.6,0,0,0,73.89,34.51a8,8,0,0,0-3.93,6L67.32,64.27q-1.56,1.49-3,3L40.54,70a8,8,0,0,0-6,3.94,107.71,107.71,0,0,0-10.87,26.25,8,8,0,0,0,1.49,7.06L40,125.84Q40,128,40,130.16L25.11,148.8a8,8,0,0,0-1.48,7.06,107.21,107.21,0,0,0,10.88,26.25,8,8,0,0,0,6,3.93l23.72,2.64q1.49,1.56,3,3L70,215.46a8,8,0,0,0,3.94,6,107.71,107.71,0,0,0,26.25,10.87,8,8,0,0,0,7.06-1.49L125.84,216q2.16.06,4.32,0l18.64,14.92a8,8,0,0,0,7.06,1.48,107.21,107.21,0,0,0,26.25-10.88,8,8,0,0,0,3.93-6l2.64-23.72q1.56-1.48,3-3L215.46,186a8,8,0,0,0,6-3.94,107.71,107.71,0,0,0,10.87-26.25,8,8,0,0,0-1.49-7.06Zm-16.1-6.5a73.93,73.93,0,0,1,0,8.68,8,8,0,0,0,1.74,5.48l14.19,17.73a91.57,91.57,0,0,1-6.23,15L187,173.11a8,8,0,0,0-5.1,2.64,74.11,74.11,0,0,1-6.14,6.14,8,8,0,0,0-2.64,5.1l-2.51,22.58a91.32,91.32,0,0,1-15,6.23l-17.74-14.19a8,8,0,0,0-5-1.75h-.48a73.93,73.93,0,0,1-8.68,0,8,8,0,0,0-5.48,1.74L100.45,215.8a91.57,91.57,0,0,1-15-6.23L82.89,187a8,8,0,0,0-2.64-5.1,74.11,74.11,0,0,1-6.14-6.14,8,8,0,0,0-5.1-2.64L46.43,170.6a91.32,91.32,0,0,1-6.23-15l14.19-17.74a8,8,0,0,0,1.74-5.48,73.93,73.93,0,0,1,0-8.68,8,8,0,0,0-1.74-5.48L40.2,100.45a91.57,91.57,0,0,1,6.23-15L69,82.89a8,8,0,0,0,5.1-2.64,74.11,74.11,0,0,1,6.14-6.14A8,8,0,0,0,82.89,69L85.4,46.43a91.32,91.32,0,0,1,15-6.23l17.74,14.19a8,8,0,0,0,5.48,1.74,73.93,73.93,0,0,1,8.68,0,8,8,0,0,0,5.48-1.74L155.55,40.2a91.57,91.57,0,0,1,15,6.23L173.11,69a8,8,0,0,0,2.64,5.1,74.11,74.11,0,0,1,6.14,6.14,8,8,0,0,0,5.1,2.64l22.58,2.51a91.32,91.32,0,0,1,6.23,15l-14.19,17.74A8,8,0,0,0,199.87,123.66Z"/>'),TO=Ra("gear","0 0 256 256",'<path d="M128,76a52,52,0,1,0,52,52A52.06,52.06,0,0,0,128,76Zm0,80a28,28,0,1,1,28-28A28,28,0,0,1,128,156Zm92-27.21v-1.58l14-17.51a12,12,0,0,0,2.23-10.59A111.75,111.75,0,0,0,225,71.89,12,12,0,0,0,215.89,66L193.61,63.5l-1.11-1.11L190,40.1A12,12,0,0,0,184.11,31a111.67,111.67,0,0,0-27.23-11.27A12,12,0,0,0,146.3,22L128.79,36h-1.58L109.7,22a12,12,0,0,0-10.59-2.23A111.75,111.75,0,0,0,71.89,31.05,12,12,0,0,0,66,40.11L63.5,62.39,62.39,63.5,40.1,66A12,12,0,0,0,31,71.89,111.67,111.67,0,0,0,19.77,99.12,12,12,0,0,0,22,109.7l14,17.51v1.58L22,146.3a12,12,0,0,0-2.23,10.59,111.75,111.75,0,0,0,11.29,27.22A12,12,0,0,0,40.11,190l22.28,2.48,1.11,1.11L66,215.9A12,12,0,0,0,71.89,225a111.67,111.67,0,0,0,27.23,11.27A12,12,0,0,0,109.7,234l17.51-14h1.58l17.51,14a12,12,0,0,0,10.59,2.23A111.75,111.75,0,0,0,184.11,225a12,12,0,0,0,5.91-9.06l2.48-22.28,1.11-1.11L215.9,190a12,12,0,0,0,9.06-5.91,111.67,111.67,0,0,0,11.27-27.23A12,12,0,0,0,234,146.3Zm-24.12-4.89a70.1,70.1,0,0,1,0,8.2,12,12,0,0,0,2.61,8.22l12.84,16.05A86.47,86.47,0,0,1,207,166.86l-20.43,2.27a12,12,0,0,0-7.65,4,69,69,0,0,1-5.8,5.8,12,12,0,0,0-4,7.65L166.86,207a86.47,86.47,0,0,1-10.49,4.35l-16.05-12.85a12,12,0,0,0-7.5-2.62c-.24,0-.48,0-.72,0a70.1,70.1,0,0,1-8.2,0,12.06,12.06,0,0,0-8.22,2.6L99.63,211.33A86.47,86.47,0,0,1,89.14,207l-2.27-20.43a12,12,0,0,0-4-7.65,69,69,0,0,1-5.8-5.8,12,12,0,0,0-7.65-4L49,166.86a86.47,86.47,0,0,1-4.35-10.49l12.84-16.05a12,12,0,0,0,2.61-8.22,70.1,70.1,0,0,1,0-8.2,12,12,0,0,0-2.61-8.22L44.67,99.63A86.47,86.47,0,0,1,49,89.14l20.43-2.27a12,12,0,0,0,7.65-4,69,69,0,0,1,5.8-5.8,12,12,0,0,0,4-7.65L89.14,49a86.47,86.47,0,0,1,10.49-4.35l16.05,12.85a12.06,12.06,0,0,0,8.22,2.6,70.1,70.1,0,0,1,8.2,0,12,12,0,0,0,8.22-2.6l16.05-12.85A86.47,86.47,0,0,1,166.86,49l2.27,20.43a12,12,0,0,0,4,7.65,69,69,0,0,1,5.8,5.8,12,12,0,0,0,7.65,4L207,89.14a86.47,86.47,0,0,1,4.35,10.49l-12.84,16.05A12,12,0,0,0,195.88,123.9Z"/>'),NO=Ra("gear","0 0 256 256",'<path d="M216,130.16q.06-2.16,0-4.32l14.92-18.64a8,8,0,0,0,1.48-7.06,107.6,107.6,0,0,0-10.88-26.25,8,8,0,0,0-6-3.93l-23.72-2.64q-1.48-1.56-3-3L186,40.54a8,8,0,0,0-3.94-6,107.29,107.29,0,0,0-26.25-10.86,8,8,0,0,0-7.06,1.48L130.16,40Q128,40,125.84,40L107.2,25.11a8,8,0,0,0-7.06-1.48A107.6,107.6,0,0,0,73.89,34.51a8,8,0,0,0-3.93,6L67.32,64.27q-1.56,1.49-3,3L40.54,70a8,8,0,0,0-6,3.94,107.71,107.71,0,0,0-10.87,26.25,8,8,0,0,0,1.49,7.06L40,125.84Q40,128,40,130.16L25.11,148.8a8,8,0,0,0-1.48,7.06,107.6,107.6,0,0,0,10.88,26.25,8,8,0,0,0,6,3.93l23.72,2.64q1.49,1.56,3,3L70,215.46a8,8,0,0,0,3.94,6,107.71,107.71,0,0,0,26.25,10.87,8,8,0,0,0,7.06-1.49L125.84,216q2.16.06,4.32,0l18.64,14.92a8,8,0,0,0,7.06,1.48,107.21,107.21,0,0,0,26.25-10.88,8,8,0,0,0,3.93-6l2.64-23.72q1.56-1.48,3-3L215.46,186a8,8,0,0,0,6-3.94,107.71,107.71,0,0,0,10.87-26.25,8,8,0,0,0-1.49-7.06ZM128,168a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z"/>'),PO=Ra("gear","0 0 256 256",'<path d="M207.86,123.18l16.78-21a99.14,99.14,0,0,0-10.07-24.29l-26.7-3a81,81,0,0,0-6.81-6.81l-3-26.71a99.43,99.43,0,0,0-24.3-10l-21,16.77a81.59,81.59,0,0,0-9.64,0l-21-16.78A99.14,99.14,0,0,0,77.91,41.43l-3,26.7a81,81,0,0,0-6.81,6.81l-26.71,3a99.43,99.43,0,0,0-10,24.3l16.77,21a81.59,81.59,0,0,0,0,9.64l-16.78,21a99.14,99.14,0,0,0,10.07,24.29l26.7,3a81,81,0,0,0,6.81,6.81l3,26.71a99.43,99.43,0,0,0,24.3,10l21-16.77a81.59,81.59,0,0,0,9.64,0l21,16.78a99.14,99.14,0,0,0,24.29-10.07l3-26.7a81,81,0,0,0,6.81-6.81l26.71-3a99.43,99.43,0,0,0,10-24.3l-16.77-21A81.59,81.59,0,0,0,207.86,123.18ZM128,168a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z" opacity="0.2"/><path d="M128,80a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Zm88-29.84q.06-2.16,0-4.32l14.92-18.64a8,8,0,0,0,1.48-7.06,107.6,107.6,0,0,0-10.88-26.25,8,8,0,0,0-6-3.93l-23.72-2.64q-1.48-1.56-3-3L186,40.54a8,8,0,0,0-3.94-6,107.29,107.29,0,0,0-26.25-10.86,8,8,0,0,0-7.06,1.48L130.16,40Q128,40,125.84,40L107.2,25.11a8,8,0,0,0-7.06-1.48A107.6,107.6,0,0,0,73.89,34.51a8,8,0,0,0-3.93,6L67.32,64.27q-1.56,1.49-3,3L40.54,70a8,8,0,0,0-6,3.94,107.71,107.71,0,0,0-10.87,26.25,8,8,0,0,0,1.49,7.06L40,125.84Q40,128,40,130.16L25.11,148.8a8,8,0,0,0-1.48,7.06,107.6,107.6,0,0,0,10.88,26.25,8,8,0,0,0,6,3.93l23.72,2.64q1.49,1.56,3,3L70,215.46a8,8,0,0,0,3.94,6,107.71,107.71,0,0,0,26.25,10.87,8,8,0,0,0,7.06-1.49L125.84,216q2.16.06,4.32,0l18.64,14.92a8,8,0,0,0,7.06,1.48,107.21,107.21,0,0,0,26.25-10.88,8,8,0,0,0,3.93-6l2.64-23.72q1.56-1.48,3-3L215.46,186a8,8,0,0,0,6-3.94,107.71,107.71,0,0,0,10.87-26.25,8,8,0,0,0-1.49-7.06Zm-16.1-6.5a73.93,73.93,0,0,1,0,8.68,8,8,0,0,0,1.74,5.48l14.19,17.73a91.57,91.57,0,0,1-6.23,15L187,173.11a8,8,0,0,0-5.1,2.64,74.11,74.11,0,0,1-6.14,6.14,8,8,0,0,0-2.64,5.1l-2.51,22.58a91.32,91.32,0,0,1-15,6.23l-17.74-14.19a8,8,0,0,0-5-1.75h-.48a73.93,73.93,0,0,1-8.68,0,8.06,8.06,0,0,0-5.48,1.74L100.45,215.8a91.57,91.57,0,0,1-15-6.23L82.89,187a8,8,0,0,0-2.64-5.1,74.11,74.11,0,0,1-6.14-6.14,8,8,0,0,0-5.1-2.64L46.43,170.6a91.32,91.32,0,0,1-6.23-15l14.19-17.74a8,8,0,0,0,1.74-5.48,73.93,73.93,0,0,1,0-8.68,8,8,0,0,0-1.74-5.48L40.2,100.45a91.57,91.57,0,0,1,6.23-15L69,82.89a8,8,0,0,0,5.1-2.64,74.11,74.11,0,0,1,6.14-6.14A8,8,0,0,0,82.89,69L85.4,46.43a91.32,91.32,0,0,1,15-6.23l17.74,14.19a8,8,0,0,0,5.48,1.74,73.93,73.93,0,0,1,8.68,0,8.06,8.06,0,0,0,5.48-1.74L155.55,40.2a91.57,91.57,0,0,1,15,6.23L173.11,69a8,8,0,0,0,2.64,5.1,74.11,74.11,0,0,1,6.14,6.14,8,8,0,0,0,5.1,2.64l22.58,2.51a91.32,91.32,0,0,1,6.23,15l-14.19,17.74A8,8,0,0,0,199.87,123.66Z"/>'),OO="gear",Bg=Object.freeze(Object.defineProperty({__proto__:null,bold:TO,default:G8,duotone:PO,fill:NO,glyphName:OO,light:HO,regular:G8,thin:xO},Symbol.toStringTag,{value:"Module"})),Va=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},IO=Va("arrow-circle-up","0 0 256 256",'<path d="M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220Zm34.83-102.83a4,4,0,0,1-5.66,5.66L132,97.66V168a4,4,0,0,1-8,0V97.66L98.83,122.83a4,4,0,0,1-5.66-5.66l32-32a4,4,0,0,1,5.66,0Z"/>'),RO=Va("arrow-circle-up","0 0 256 256",'<path d="M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm0,192a90,90,0,1,1,90-90A90.1,90.1,0,0,1,128,218Zm36.24-102.24a6,6,0,1,1-8.48,8.48L134,102.49V168a6,6,0,0,1-12,0V102.49l-21.76,21.75a6,6,0,0,1-8.48-8.48l32-32a6,6,0,0,1,8.48,0Z"/>'),Ed=Va("arrow-circle-up","0 0 256 256",'<path d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm37.66-101.66a8,8,0,0,1-11.32,11.32L136,107.31V168a8,8,0,0,1-16,0V107.31l-18.34,18.35a8,8,0,0,1-11.32-11.32l32-32a8,8,0,0,1,11.32,0Z"/>'),VO=Va("arrow-circle-up","0 0 256 256",'<path d="M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,192a84,84,0,1,1,84-84A84.09,84.09,0,0,1,128,212Zm40.49-100.49a12,12,0,0,1-17,17L140,117v51a12,12,0,0,1-24,0V117l-11.51,11.52a12,12,0,0,1-17-17l32-32a12,12,0,0,1,17,0Z"/>'),DO=Va("arrow-circle-up","0 0 256 256",'<path d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm37.66,101.66a8,8,0,0,1-11.32,0L136,107.31V168a8,8,0,0,1-16,0V107.31l-18.34,18.35a8,8,0,0,1-11.32-11.32l32-32a8,8,0,0,1,11.32,0l32,32A8,8,0,0,1,165.66,125.66Z"/>'),ZO=Va("arrow-circle-up","0 0 256 256",'<path d="M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z" opacity="0.2"/><path d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm37.66-101.66a8,8,0,0,1-11.32,11.32L136,107.31V168a8,8,0,0,1-16,0V107.31l-18.34,18.35a8,8,0,0,1-11.32-11.32l32-32a8,8,0,0,1,11.32,0Z"/>'),BO="arrow-circle-up",$2=Object.freeze(Object.defineProperty({__proto__:null,bold:VO,default:Ed,duotone:ZO,fill:DO,glyphName:BO,light:RO,regular:Ed,thin:IO},Symbol.toStringTag,{value:"Module"})),Fg="/api";async function gt(e){const t=await fetch(`${Fg}${e}`);if(!t.ok)throw new Error(`${t.status} ${t.statusText}`);return t.json()}async function Y8(e,t){try{const i=await e.json(),n=i==null?void 0:i.message;if(typeof n=="string"&&n.trim()!=="")return n}catch{}return`${t}: ${e.status}`}async function nu(e,t,i){const n=await fetch(`${Fg}${t}`,{method:e,headers:i===void 0?void 0:{"Content-Type":"application/json"},body:i===void 0?void 0:JSON.stringify(i)});if(!n.ok){let r=`${e} ${t} failed: ${n.status}`;try{const s=await n.json();r=s.error??s.message??r}catch{}throw new Error(r)}return n.json()}const Re={access:{get:()=>gt("/access"),createToken:(e,t)=>nu("POST","/access/tokens",{name:e,access:t}),revokeToken:e=>nu("DELETE",`/access/tokens/${encodeURIComponent(e)}`),revokeConnection:e=>nu("DELETE",`/access/connections/${encodeURIComponent(e)}`)},health:()=>gt("/health"),system:()=>gt("/system"),qr:()=>gt("/qr"),deviceEvents:(e,t=100)=>gt(`/devices/${encodeURIComponent(e)}/events?limit=${t}`),deviceObservations:(e,t=50)=>gt(`/devices/${encodeURIComponent(e)}/observations?limit=${t}`),reportObservation:(e,t)=>fetch(`/api/devices/${encodeURIComponent(e)}/observations`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}).then(async i=>{if(!i.ok)throw new Error((await i.json()).error??`HTTP ${i.status}`);return i.json()}),plugins:()=>gt("/plugins"),pluginsRefresh:()=>fetch("/api/plugins/refresh",{method:"POST"}).then(e=>e.json()),plugin:e=>gt(`/plugins/${e}`),setPluginDisabled:(e,t)=>fetch(`/api/plugins/${e}/disabled`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({disabled:t})}).then(i=>{if(!i.ok)throw new Error(`Set disabled failed: ${i.status}`);return i.json()}),bridge:()=>gt("/bridge"),saveBridge:e=>fetch("/api/bridge",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}).then(t=>{if(!t.ok)throw new Error(`Save failed: ${t.status}`);return t.json()}),accessories:()=>gt("/accessories"),devices:()=>gt("/devices"),controlDevice:(e,t,i)=>fetch(`/api/devices/${encodeURIComponent(e)}/control`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({control:t,value:i})}).then(n=>{if(!n.ok)throw new Error(`Control failed: ${n.status}`);return n.json()}),renameDevice:(e,t)=>fetch(`/api/devices/${encodeURIComponent(e)}/rename`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:t})}).then(i=>{if(!i.ok)throw new Error(`Rename failed: ${i.status}`);return i.json()}),deviceHistory:(e,t,i)=>{const n=new URLSearchParams({period:t});return i&&n.set("date",i),gt(`/devices/${encodeURIComponent(e)}/history?${n}`)},deviceMetrics:(e,t={})=>{const i=new URLSearchParams;t.metric&&i.set("metric",t.metric),t.from!==void 0&&i.set("from",String(t.from)),t.to!==void 0&&i.set("to",String(t.to)),t.maxPoints!==void 0&&i.set("maxPoints",String(t.maxPoints));const n=i.toString();return gt(`/devices/${encodeURIComponent(e)}/metrics${n?`?${n}`:""}`)},homekitHidden:()=>gt("/homekit/hidden"),setHomekitVisibility:(e,t)=>fetch(`/api/homekit/visibility/${encodeURIComponent(e)}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({visible:t})}).then(i=>{if(!i.ok)throw new Error(`Visibility change failed: ${i.status}`);return i.json()}),deviceAccessory:e=>gt(`/devices/${encodeURIComponent(e)}/accessory`),homekitServiceTypes:()=>gt("/homekit/service-types"),setHomekitServiceType:(e,t,i)=>fetch(`/api/homekit/service-type/${encodeURIComponent(e)}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({serviceUuid:t,type:i})}).then(async n=>{var r;if(!n.ok)throw new Error(((r=await n.json().catch(()=>null))==null?void 0:r.message)??`Type change failed: ${n.status}`);return n.json()}),setCharacteristic:(e,t,i,n)=>fetch(`/api/accessories/${e}/characteristics`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({serviceUuid:t,charUuid:i,value:n})}).then(r=>{if(!r.ok)throw new Error(`Set failed: ${r.status}`);return r.json()}),logs:(e,t=200)=>{const i=new URLSearchParams({limit:String(t)});return e&&i.set("plugin",e),gt(`/logs?${i}`)},pluginTelemetry:e=>gt(`/plugins/${encodeURIComponent(e)}/telemetry`),config:{get:()=>gt("/config"),save:e=>fetch("/api/config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:e})}).then(t=>{if(!t.ok)throw new Error(`Save failed: ${t.status}`);return t.json()}),getPlatform:e=>gt(`/config/platform/${encodeURIComponent(e)}`),savePlatform:e=>fetch("/api/config/platform",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({platform:e})}).then(t=>{if(!t.ok)throw new Error(`Save failed: ${t.status}`);return t.json()}),getHbPlugin:(e,t)=>gt(`/config/hb-plugin/${encodeURIComponent(e)}${t?`?packageName=${encodeURIComponent(t)}`:""}`),saveHbPlugin:(e,t,i)=>fetch("/api/config/hb-plugin",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e,packageName:i,config:t})}).then(n=>{if(!n.ok)throw new Error(`Save failed: ${n.status}`);return n.json()}),getPlugin:e=>gt(`/config/plugin/${encodeURIComponent(e)}`),savePlugin:(e,t)=>fetch("/api/config/plugin",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e,config:t})}).then(i=>{if(!i.ok)throw new Error(`Save failed: ${i.status}`);return i.json()})},pluginInfo:e=>gt(`/marketplace/plugin-info/${encodeURIComponent(e)}`),daemon:{restart:()=>fetch("/api/daemon/restart",{method:"POST"}).then(e=>{if(!e.ok)throw new Error(`Restart failed: ${e.status}`);return e.json()})},updates:{check:()=>gt("/updates/check"),apply:()=>fetch("/api/updates/apply",{method:"POST"}).then(async e=>{if(!e.ok)throw new Error(await Y8(e,"Update failed"));return e.json()}),rollback:()=>fetch("/api/updates/rollback",{method:"POST"}).then(async e=>{if(!e.ok)throw new Error(await Y8(e,"Rollback failed"));return e.json()})},marketplace:{search:(e="",t=0,i=20)=>{const n=new URLSearchParams({q:e,from:String(t),size:String(i)});return gt(`/marketplace/search?${n}`)},enriched:e=>fetch(`/api/marketplace/enriched/${encodeURIComponent(e)}`).then(t=>t.ok?t.json():Promise.reject(new Error(`Enrichment failed: ${t.status}`))),installed:()=>gt("/marketplace/installed"),local:()=>gt("/marketplace/local"),install:e=>fetch("/api/marketplace/install",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({package:e})}).then(t=>{if(!t.ok)throw new Error(`Install failed: ${t.status}`);return t.json()}),update:e=>fetch(`/api/marketplace/update/${encodeURIComponent(e)}`,{method:"POST"}).then(t=>{if(!t.ok)throw new Error(`Update failed: ${t.status}`);return t.json()}),uninstall:e=>fetch(`/api/marketplace/uninstall/${encodeURIComponent(e)}`,{method:"DELETE"}).then(t=>{if(!t.ok)throw new Error(`Uninstall failed: ${t.status}`);return t.json()})}},Kr=i1("daemon",()=>{const e=K(null),t=K([]),i=K([]),n=K([]),r=K(!1),s=K(null),a=K(!1),l=q(()=>t.value.filter(w=>w.status==="running").length),o=q(()=>t.value.filter(w=>w.status==="error").length);async function c(){try{e.value=await Re.health(),a.value=!0,s.value=null}catch{a.value=!1,e.value=null}}async function u(){r.value=!0;try{const w=await Re.plugins();t.value=w.plugins}catch(w){s.value=String(w)}finally{r.value=!1}}async function d(){try{const w=await Re.accessories();i.value=w.accessories}catch{}}async function h(w){try{const _=await Re.logs(w);n.value=_.entries}catch(_){s.value=String(_)}}let f=null;function v(){if(f)return;const w=location.protocol==="https:"?"wss:":"ws:";f=new WebSocket(`${w}//${location.host}/ws/logs`),f.onmessage=_=>{if(!document.hidden)try{const y=JSON.parse(_.data);n.value.push(y),n.value.length>500&&n.value.shift()}catch{}},f.onclose=()=>{f=null,setTimeout(v,3e3)}}function p(){f==null||f.close(),f=null}return{health:e,plugins:t,accessories:i,logs:n,loading:r,error:s,connected:a,runningCount:l,errorCount:o,fetchHealth:c,fetchPlugins:u,fetchAccessories:d,fetchLogs:h,connectLiveLogs:v,disconnectLiveLogs:p}}),X8=Object.freeze(Object.defineProperty({__proto__:null,useDaemonStore:Kr},Symbol.toStringTag,{value:"Module"})),Qo=i1("inspector",()=>{const e=K(!1),t=K("plugin"),i=K(null),n=K(null);function r(c){i.value=c,n.value=null,t.value="plugin",e.value=!0}function s(){i.value=null,n.value=null,t.value="marketplace",e.value=!0}function a(c){n.value=c,i.value=null,t.value="device",e.value=!0}function l(c){n.value&&t.value==="device"&&(c.kind==="native"&&n.value.kind==="native"?c.dev.id===n.value.dev.id&&(n.value=c):c.kind==="hap"&&n.value.kind==="hap"&&c.acc.uuid===n.value.acc.uuid&&(n.value=c))}function o(){e.value=!1,i.value=null,n.value=null}return{visible:e,mode:t,selectedPlugin:i,selectedDevice:n,openPlugin:r,openMarketplace:s,openDevice:a,updateDevice:l,close:o}}),Ms=i1("layout",()=>{const e=K(""),t=K(null),i=K(!1);function n(r,s,a){e.value=r,t.value=s??null,i.value=(a==null?void 0:a.fullBleed)??!1}return{title:e,count:t,fullBleed:i,setPage:n}});function x0(e){return(e==null?void 0:e.authOrigin)??(e==null?void 0:e.issuer)??null}const FO="openbridge_platform_state",J8="openbridge_platform_expected_sub",ru="openbridge_last_account",Qr=K(null),es=K(null),Zl=K(!1);function e0(){async function e(){if(es.value)return es.value;const p=await fetch("/auth/platform/config");if(!p.ok){const _={enabled:!1,issuer:null,appId:null};return es.value=_,_}const w=await p.json();return es.value=w,w}function t(){try{const p=localStorage.getItem(ru);if(!p)return null;const w=JSON.parse(p);return w.sub&&w.email?w:null}catch{return null}}function i(p){try{localStorage.setItem(ru,JSON.stringify(p))}catch{}}function n(){try{localStorage.removeItem(ru)}catch{}}async function r(){if(!(await e()).enabled)return Qr.value=null,Zl.value=!0,!0;try{const w=await fetch("/auth/me",{credentials:"include"});if(!w.ok)return Qr.value=null,Zl.value=!0,!1;const _=await w.json();return Qr.value=_.user,i({sub:_.user.id,email:_.user.email}),Zl.value=!0,!0}catch{return Qr.value=null,Zl.value=!0,!1}}async function s(p={}){const w=await e(),_=x0(w);if(!w.enabled||!_)return;const y=w.appId??"openbridge",C=Array.from(crypto.getRandomValues(new Uint8Array(16))).map(E=>E.toString(16).padStart(2,"0")).join("");sessionStorage.setItem(FO,C),p.expectedSub?sessionStorage.setItem(J8,p.expectedSub):sessionStorage.removeItem(J8);const g=`${window.location.origin}/auth/callback`,$=new URL(`${_}/api/auth/sso`);$.searchParams.set("app_id",y),$.searchParams.set("redirect_uri",g),$.searchParams.set("state",C),p.prompt&&$.searchParams.set("prompt",p.prompt),p.loginHint&&$.searchParams.set("login_hint",p.loginHint),window.location.href=$.toString()}async function a(){const p=t();return p?(await s({loginHint:p.email,expectedSub:p.sub}),!0):!1}async function l(p){await s({loginHint:p})}async function o(){await s({prompt:"login"})}async function c(){await s({prompt:"select_account"})}async function u(){const p=await e(),w=x0(p);if(!p.enabled||!w)return[];try{const _=await fetch(`${w}/api/auth/identities`,{credentials:"include"});return _.ok?(await _.json()).identities??[]:[]}catch{return[]}}async function d(p){const w=await e(),_=x0(w);if(!w.enabled||!_)return!1;try{return(await fetch(`${_}/api/auth/identities/remove`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({user_id:p})})).ok}catch{return!1}}async function h(){await fetch("/auth/logout",{method:"POST",credentials:"include"}).catch(()=>null),Qr.value=null,n(),window.location.href="/login?logged_out=1"}async function f(){await fetch("/auth/logout",{method:"POST",credentials:"include"}).catch(()=>null),Qr.value=null,n();const p=es.value,w=x0(p);if(p!=null&&p.enabled&&w&&p.appId){const _=`${window.location.origin}/login?logged_out=1`,y=new URL("/api/auth/sso/end-session",w);y.searchParams.set("app_id",p.appId),y.searchParams.set("post_logout_redirect_uri",_),window.location.href=y.toString();return}window.location.href="/login?logged_out=1"}const v=q(()=>{var w;const p=(w=es.value)==null?void 0:w.issuer;if(!p)return!1;try{const _=new URL(p).hostname;return _==="nubisco.io"||_.endsWith(".nubisco.io")}catch{return!1}});return{user:Qr,config:es,ready:Zl,isNubiscoPlatform:v,loadConfig:e,checkAuth:r,startPlatformLogin:s,resumeLastAccount:a,switchAccount:l,addAccount:o,chooseAccount:c,listIdentities:u,removeIdentity:d,getLastAccount:t,clearLastAccount:n,logout:h,logoutEverywhere:f}}const Da=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},zO=Da("puzzle-piece","0 0 256 256",'<path d="M218.14,161.93a4,4,0,0,0-3.86-.24,24,24,0,0,1-34.23-23.25,24,24,0,0,1,34.23-20.13A4,4,0,0,0,220,114.7V72a12,12,0,0,0-12-12H167a32,32,0,1,0-62.91-10.33A32.57,32.57,0,0,0,105,60H64A12,12,0,0,0,52,72v37a32,32,0,1,0-10.33,62.91A32.28,32.28,0,0,0,52,171v37a12,12,0,0,0,12,12H208a12,12,0,0,0,12-12V165.31A4,4,0,0,0,218.14,161.93ZM212,208a4,4,0,0,1-4,4H64a4,4,0,0,1-4-4V165.31a4,4,0,0,0-1.86-3.38,4,4,0,0,0-3.85-.24,24,24,0,0,1-34.24-20.13,24,24,0,0,1,34.24-23.25A4,4,0,0,0,60,114.7V72a4,4,0,0,1,4-4h46.69a4,4,0,0,0,3.62-5.71,24,24,0,0,1,20.13-34.24,24,24,0,0,1,23.25,34.24A4,4,0,0,0,161.31,68H208a4,4,0,0,1,4,4v37a32.57,32.57,0,0,0-10.33-.94A32,32,0,1,0,212,171Z"/>'),UO=Da("puzzle-piece","0 0 256 256",'<path d="M219.21,160.24a6,6,0,0,0-5.78-.35,22,22,0,1,1-11.05-41.83,22.15,22.15,0,0,1,11.05,2.06A6,6,0,0,0,222,114.7V72a14,14,0,0,0-14-14H169.48a35,35,0,0,0,.52-6,34.1,34.1,0,0,0-10.73-24.78,33.64,33.64,0,0,0-25.45-9.15A34,34,0,0,0,102.54,58H64A14,14,0,0,0,50,72v34.53a34,34,0,0,0-30.79,10.2,34,34,0,0,0,22.31,57.18,34.34,34.34,0,0,0,8.48-.44V208a14,14,0,0,0,14,14H208a14,14,0,0,0,14-14V165.31A6,6,0,0,0,219.21,160.24ZM210,208a2,2,0,0,1-2,2H64a2,2,0,0,1-2-2V165.31a6,6,0,0,0-6-6,5.92,5.92,0,0,0-2.57.58,22,22,0,0,1-31.38-18.46,22,22,0,0,1,31.38-21.31A6,6,0,0,0,62,114.7V72a2,2,0,0,1,2-2h46.69a6,6,0,0,0,5.42-8.57,22.25,22.25,0,0,1-2-11,22,22,0,1,1,41.83,11A6,6,0,0,0,161.3,70H208a2,2,0,0,1,2,2v34.54a34,34,0,0,0-39.93,31.28,33.71,33.71,0,0,0,9.14,25.45A34.15,34.15,0,0,0,210,173.48Z"/>'),bs=Da("puzzle-piece","0 0 256 256",'<path d="M220.27,158.54a8,8,0,0,0-7.7-.46,20,20,0,1,1,0-36.16A8,8,0,0,0,224,114.69V72a16,16,0,0,0-16-16H171.78a35.36,35.36,0,0,0,.22-4,36.11,36.11,0,0,0-11.36-26.24,36,36,0,0,0-60.55,23.62,36.56,36.56,0,0,0,.14,6.62H64A16,16,0,0,0,48,72v32.22a35.36,35.36,0,0,0-4-.22,36.12,36.12,0,0,0-26.24,11.36,35.7,35.7,0,0,0-9.69,27,36.08,36.08,0,0,0,33.31,33.6,35.68,35.68,0,0,0,6.62-.14V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V165.31A8,8,0,0,0,220.27,158.54ZM208,208H64V165.31a8,8,0,0,0-11.43-7.23,20,20,0,1,1,0-36.16A8,8,0,0,0,64,114.69V72h46.69a8,8,0,0,0,7.23-11.43,20,20,0,1,1,36.16,0A8,8,0,0,0,161.31,72H208v32.23a35.68,35.68,0,0,0-6.62-.14A36,36,0,0,0,204,176a35.36,35.36,0,0,0,4-.22Z"/>'),WO=Da("puzzle-piece","0 0 256 256",'<path d="M222.41,155.16a12,12,0,0,0-11.56-.69A16,16,0,0,1,188,139,16.2,16.2,0,0,1,202.8,124a15.83,15.83,0,0,1,8,1.5A12,12,0,0,0,228,114.7V72a20,20,0,0,0-20-20H176a40.15,40.15,0,0,0-12.62-29.16,39.67,39.67,0,0,0-29.94-10.76,40.08,40.08,0,0,0-37.34,37C96,50.07,96,51,96,52H64A20,20,0,0,0,44,72v28a40.15,40.15,0,0,0-29.16,12.62A40,40,0,0,0,41.1,179.9a28.3,28.3,0,0,0,2.9.1v28a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V165.31A12,12,0,0,0,222.41,155.16ZM204,204H68V165.31a12,12,0,0,0-17.15-10.84A15.9,15.9,0,0,1,42.8,156,16.2,16.2,0,0,1,28,141.06a16,16,0,0,1,22.82-15.52A12,12,0,0,0,68,114.7V76h42.7a12,12,0,0,0,10.83-17.15A15.9,15.9,0,0,1,120,50.8,16.19,16.19,0,0,1,134.94,36a16,16,0,0,1,15.53,22.81A12,12,0,0,0,161.31,76H204v24c-1,0-1.93,0-2.9.11A40,40,0,0,0,204,180h0Z"/>'),jO=Da("puzzle-piece","0 0 256 256",'<path d="M165.78,224H208a16,16,0,0,0,16-16V170.35A8,8,0,0,0,212.94,163a23.37,23.37,0,0,1-8.94,1.77c-13.23,0-24-11.1-24-24.73s10.77-24.73,24-24.73a23.37,23.37,0,0,1,8.94,1.77A8,8,0,0,0,224,109.65V72a16,16,0,0,0-16-16H171.78a35.36,35.36,0,0,0,.22-4,36,36,0,0,0-72,0,35.36,35.36,0,0,0,.22,4H64A16,16,0,0,0,48,72v32.22a35.36,35.36,0,0,0-4-.22,36,36,0,0,0,0,72,35.36,35.36,0,0,0,4-.22V208a16,16,0,0,0,16,16h42.22"/>'),KO=Da("puzzle-piece","0 0 256 256",'<path d="M204,168a28,28,0,0,0,12-2.69V208a8,8,0,0,1-8,8H64a8,8,0,0,1-8-8V165.31a28,28,0,1,1,0-50.62V72a8,8,0,0,1,8-8h46.69a28,28,0,1,1,50.61,0H208a8,8,0,0,1,8,8v42.69A28,28,0,1,0,204,168Z" opacity="0.2"/><path d="M220.27,158.54a8,8,0,0,0-7.7-.46,20,20,0,1,1,0-36.16A8,8,0,0,0,224,114.69V72a16,16,0,0,0-16-16H171.78a35.36,35.36,0,0,0,.22-4,36.15,36.15,0,0,0-11.36-26.25,36,36,0,0,0-60.55,23.63,36.56,36.56,0,0,0,.14,6.62H64A16,16,0,0,0,48,72v32.22a35.36,35.36,0,0,0-4-.22,36.12,36.12,0,0,0-26.24,11.36,35.7,35.7,0,0,0-9.69,27,36.08,36.08,0,0,0,33.31,33.6,36.56,36.56,0,0,0,6.62-.14V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V165.31A8,8,0,0,0,220.27,158.54ZM208,208H64V165.31a8,8,0,0,0-11.43-7.23,20,20,0,1,1,0-36.16A8,8,0,0,0,64,114.69V72h46.69a8,8,0,0,0,7.23-11.43,20,20,0,1,1,36.16,0A8,8,0,0,0,161.31,72H208v32.23a35.68,35.68,0,0,0-6.62-.14A36,36,0,0,0,204,176a35.36,35.36,0,0,0,4-.22Z"/>'),qO="puzzle-piece",GO=Object.freeze(Object.defineProperty({__proto__:null,bold:WO,default:bs,duotone:KO,fill:jO,glyphName:qO,light:UO,regular:bs,thin:zO},Symbol.toStringTag,{value:"Module"})),Za=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},YO=Za("spinner","0 0 256 256",'<path d="M132,32V64a4,4,0,0,1-8,0V32a4,4,0,0,1,8,0Zm41.25,54.75a4,4,0,0,0,2.83-1.18L198.71,63a4,4,0,0,0-5.66-5.66L170.43,79.92a4,4,0,0,0,2.82,6.83ZM224,124H192a4,4,0,0,0,0,8h32a4,4,0,0,0,0-8Zm-47.92,46.43a4,4,0,1,0-5.65,5.65l22.62,22.63a4,4,0,0,0,5.66-5.66ZM128,188a4,4,0,0,0-4,4v32a4,4,0,0,0,8,0V192A4,4,0,0,0,128,188ZM79.92,170.43,57.29,193.05A4,4,0,0,0,63,198.71l22.62-22.63a4,4,0,1,0-5.65-5.65ZM68,128a4,4,0,0,0-4-4H32a4,4,0,0,0,0,8H64A4,4,0,0,0,68,128ZM63,57.29A4,4,0,0,0,57.29,63L79.92,85.57a4,4,0,1,0,5.65-5.65Z"/>'),XO=Za("spinner","0 0 256 256",'<path d="M134,32V64a6,6,0,0,1-12,0V32a6,6,0,0,1,12,0Zm39.25,56.75A6,6,0,0,0,177.5,87l22.62-22.63a6,6,0,0,0-8.48-8.48L169,78.5a6,6,0,0,0,4.24,10.25ZM224,122H192a6,6,0,0,0,0,12h32a6,6,0,0,0,0-12Zm-46.5,47A6,6,0,0,0,169,177.5l22.63,22.62a6,6,0,0,0,8.48-8.48ZM128,186a6,6,0,0,0-6,6v32a6,6,0,0,0,12,0V192A6,6,0,0,0,128,186ZM78.5,169,55.88,191.64a6,6,0,1,0,8.48,8.48L87,177.5A6,6,0,1,0,78.5,169ZM70,128a6,6,0,0,0-6-6H32a6,6,0,0,0,0,12H64A6,6,0,0,0,70,128ZM64.36,55.88a6,6,0,0,0-8.48,8.48L78.5,87A6,6,0,1,0,87,78.5Z"/>'),ra=Za("spinner","0 0 256 256",'<path d="M136,32V64a8,8,0,0,1-16,0V32a8,8,0,0,1,16,0Zm37.25,58.75a8,8,0,0,0,5.66-2.35l22.63-22.62a8,8,0,0,0-11.32-11.32L167.6,77.09a8,8,0,0,0,5.65,13.66ZM224,120H192a8,8,0,0,0,0,16h32a8,8,0,0,0,0-16Zm-45.09,47.6a8,8,0,0,0-11.31,11.31l22.62,22.63a8,8,0,0,0,11.32-11.32ZM128,184a8,8,0,0,0-8,8v32a8,8,0,0,0,16,0V192A8,8,0,0,0,128,184ZM77.09,167.6,54.46,190.22a8,8,0,0,0,11.32,11.32L88.4,178.91A8,8,0,0,0,77.09,167.6ZM72,128a8,8,0,0,0-8-8H32a8,8,0,0,0,0,16H64A8,8,0,0,0,72,128ZM65.78,54.46A8,8,0,0,0,54.46,65.78L77.09,88.4A8,8,0,0,0,88.4,77.09Z"/>'),JO=Za("spinner","0 0 256 256",'<path d="M140,32V64a12,12,0,0,1-24,0V32a12,12,0,0,1,24,0Zm33.25,62.75a12,12,0,0,0,8.49-3.52L204.37,68.6a12,12,0,0,0-17-17L164.77,74.26a12,12,0,0,0,8.48,20.49ZM224,116H192a12,12,0,0,0,0,24h32a12,12,0,0,0,0-24Zm-42.26,48.77a12,12,0,1,0-17,17l22.63,22.63a12,12,0,0,0,17-17ZM128,180a12,12,0,0,0-12,12v32a12,12,0,0,0,24,0V192A12,12,0,0,0,128,180ZM74.26,164.77,51.63,187.4a12,12,0,0,0,17,17l22.63-22.63a12,12,0,1,0-17-17ZM76,128a12,12,0,0,0-12-12H32a12,12,0,0,0,0,24H64A12,12,0,0,0,76,128ZM68.6,51.63a12,12,0,1,0-17,17L74.26,91.23a12,12,0,0,0,17-17Z"/>'),QO=Za("spinner","0 0 256 256",'<path d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm33.94,58.75,17-17a8,8,0,0,1,11.32,11.32l-17,17a8,8,0,0,1-11.31-11.31ZM48,136a8,8,0,0,1,0-16H72a8,8,0,0,1,0,16Zm46.06,37.25-17,17a8,8,0,0,1-11.32-11.32l17-17a8,8,0,0,1,11.31,11.31Zm0-79.19a8,8,0,0,1-11.31,0l-17-17A8,8,0,0,1,77.09,65.77l17,17A8,8,0,0,1,94.06,94.06ZM136,208a8,8,0,0,1-16,0V184a8,8,0,0,1,16,0Zm0-136a8,8,0,0,1-16,0V48a8,8,0,0,1,16,0Zm54.23,118.23a8,8,0,0,1-11.32,0l-17-17a8,8,0,0,1,11.31-11.31l17,17A8,8,0,0,1,190.23,190.23ZM208,136H184a8,8,0,0,1,0-16h24a8,8,0,0,1,0,16Z"/>'),eI=Za("spinner","0 0 256 256",'<path d="M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z" opacity="0.2"/><path d="M136,32V64a8,8,0,0,1-16,0V32a8,8,0,0,1,16,0Zm37.25,58.75a8,8,0,0,0,5.66-2.35l22.63-22.62a8,8,0,0,0-11.32-11.32L167.6,77.09a8,8,0,0,0,5.65,13.66ZM224,120H192a8,8,0,0,0,0,16h32a8,8,0,0,0,0-16Zm-45.09,47.6a8,8,0,0,0-11.31,11.31l22.62,22.63a8,8,0,0,0,11.32-11.32ZM128,184a8,8,0,0,0-8,8v32a8,8,0,0,0,16,0V192A8,8,0,0,0,128,184ZM77.09,167.6,54.46,190.22a8,8,0,0,0,11.32,11.32L88.4,178.91A8,8,0,0,0,77.09,167.6ZM72,128a8,8,0,0,0-8-8H32a8,8,0,0,0,0,16H64A8,8,0,0,0,72,128ZM65.78,54.46A8,8,0,0,0,54.46,65.78L77.09,88.4A8,8,0,0,0,88.4,77.09Z"/>'),tI="spinner",Vo=Object.freeze(Object.defineProperty({__proto__:null,bold:JO,default:ra,duotone:eI,fill:QO,glyphName:tI,light:XO,regular:ra,thin:YO},Symbol.toStringTag,{value:"Module"})),Ba=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},iI=Ba("floppy-disk","0 0 256 256",'<path d="M216.49,74.83,181.17,39.51A11.93,11.93,0,0,0,172.69,36H48A12,12,0,0,0,36,48V208a12,12,0,0,0,12,12H208a12,12,0,0,0,12-12V83.31A11.93,11.93,0,0,0,216.49,74.83ZM172,212H84V152a4,4,0,0,1,4-4h80a4,4,0,0,1,4,4Zm40-4a4,4,0,0,1-4,4H180V152a12,12,0,0,0-12-12H88a12,12,0,0,0-12,12v60H48a4,4,0,0,1-4-4V48a4,4,0,0,1,4-4H172.69a4,4,0,0,1,2.82,1.17l35.32,35.32A4,4,0,0,1,212,83.31ZM156,72a4,4,0,0,1-4,4H96a4,4,0,0,1,0-8h56A4,4,0,0,1,156,72Z"/>'),nI=Ba("floppy-disk","0 0 256 256",'<path d="M217.9,73.42,182.58,38.1a13.9,13.9,0,0,0-9.89-4.1H48A14,14,0,0,0,34,48V208a14,14,0,0,0,14,14H208a14,14,0,0,0,14-14V83.31A13.9,13.9,0,0,0,217.9,73.42ZM170,210H86V152a2,2,0,0,1,2-2h80a2,2,0,0,1,2,2Zm40-2a2,2,0,0,1-2,2H182V152a14,14,0,0,0-14-14H88a14,14,0,0,0-14,14v58H48a2,2,0,0,1-2-2V48a2,2,0,0,1,2-2H172.69a2,2,0,0,1,1.41.58L209.42,81.9a2,2,0,0,1,.58,1.41ZM158,72a6,6,0,0,1-6,6H96a6,6,0,0,1,0-12h56A6,6,0,0,1,158,72Z"/>'),Q8=Ba("floppy-disk","0 0 256 256",'<path d="M219.31,72,184,36.69A15.86,15.86,0,0,0,172.69,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V83.31A15.86,15.86,0,0,0,219.31,72ZM168,208H88V152h80Zm40,0H184V152a16,16,0,0,0-16-16H88a16,16,0,0,0-16,16v56H48V48H172.69L208,83.31ZM160,72a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h56A8,8,0,0,1,160,72Z"/>'),rI=Ba("floppy-disk","0 0 256 256",'<path d="M222.14,69.17,186.83,33.86A19.86,19.86,0,0,0,172.69,28H48A20,20,0,0,0,28,48V208a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V83.31A19.86,19.86,0,0,0,222.14,69.17ZM164,204H92V160h72Zm40,0H188V156a20,20,0,0,0-20-20H88a20,20,0,0,0-20,20v48H52V52H171l33,33ZM164,84a12,12,0,0,1-12,12H96a12,12,0,0,1,0-24h56A12,12,0,0,1,164,84Z"/>'),sI=Ba("floppy-disk","0 0 256 256",'<path d="M219.31,72,184,36.69A15.86,15.86,0,0,0,172.69,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V83.31A15.86,15.86,0,0,0,219.31,72ZM208,208H184V152a16,16,0,0,0-16-16H88a16,16,0,0,0-16,16v56H48V48H172.69L208,83.31ZM160,72a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h56A8,8,0,0,1,160,72Z"/>'),aI=Ba("floppy-disk","0 0 256 256",'<path d="M216,83.31V208a8,8,0,0,1-8,8H176V152a8,8,0,0,0-8-8H88a8,8,0,0,0-8,8v64H48a8,8,0,0,1-8-8V48a8,8,0,0,1,8-8H172.69a8,8,0,0,1,5.65,2.34l35.32,35.32A8,8,0,0,1,216,83.31Z" opacity="0.2"/><path d="M219.31,72,184,36.69A15.86,15.86,0,0,0,172.69,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V83.31A15.86,15.86,0,0,0,219.31,72ZM168,208H88V152h80Zm40,0H184V152a16,16,0,0,0-16-16H88a16,16,0,0,0-16,16v56H48V48H172.69L208,83.31ZM160,72a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h56A8,8,0,0,1,160,72Z"/>'),lI="floppy-disk",Hc=Object.freeze(Object.defineProperty({__proto__:null,bold:rI,default:Q8,duotone:aI,fill:sI,glyphName:lI,light:nI,regular:Q8,thin:iI},Symbol.toStringTag,{value:"Module"})),Fa=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},oI=Fa("arrows-clockwise","0 0 256 256",'<path d="M220,48V96a4,4,0,0,1-4,4H168a4,4,0,0,1,0-8h38.34L184.89,70.54A84,84,0,0,0,66.8,69.85a4,4,0,1,1-5.6-5.72,92,92,0,0,1,129.34.76L212,86.34V48a4,4,0,0,1,8,0ZM189.2,186.15a83.44,83.44,0,0,1-58.68,23.91h-.47a83.52,83.52,0,0,1-58.94-24.6L49.66,164H88a4,4,0,0,0,0-8H40a4,4,0,0,0-4,4v48a4,4,0,0,0,8,0V169.66l21.46,21.45A91.43,91.43,0,0,0,130,218.06h.51a91.45,91.45,0,0,0,64.28-26.19,4,4,0,1,0-5.6-5.72Z"/>'),cI=Fa("arrows-clockwise","0 0 256 256",'<path d="M222,48V96a6,6,0,0,1-6,6H168a6,6,0,0,1,0-12h33.52L183.47,72a81.51,81.51,0,0,0-57.53-24h-.46A81.5,81.5,0,0,0,68.19,71.28a6,6,0,1,1-8.38-8.58,93.38,93.38,0,0,1,65.67-26.76H126a93.45,93.45,0,0,1,66,27.53l18,18V48a6,6,0,0,1,12,0ZM187.81,184.72a81.5,81.5,0,0,1-57.29,23.34h-.46a81.51,81.51,0,0,1-57.53-24L54.48,166H88a6,6,0,0,0,0-12H40a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V174.48l18,18.05a93.45,93.45,0,0,0,66,27.53h.52a93.38,93.38,0,0,0,65.67-26.76,6,6,0,1,0-8.38-8.58Z"/>'),ep=Fa("arrows-clockwise","0 0 256 256",'<path d="M224,48V96a8,8,0,0,1-8,8H168a8,8,0,0,1,0-16h28.69L182.06,73.37a79.56,79.56,0,0,0-56.13-23.43h-.45A79.52,79.52,0,0,0,69.59,72.71,8,8,0,0,1,58.41,61.27a96,96,0,0,1,135,.79L208,76.69V48a8,8,0,0,1,16,0ZM186.41,183.29a80,80,0,0,1-112.47-.66L59.31,168H88a8,8,0,0,0,0-16H40a8,8,0,0,0-8,8v48a8,8,0,0,0,16,0V179.31l14.63,14.63A95.43,95.43,0,0,0,130,222.06h.53a95.36,95.36,0,0,0,67.07-27.33,8,8,0,0,0-11.18-11.44Z"/>'),uI=Fa("arrows-clockwise","0 0 256 256",'<path d="M228,48V96a12,12,0,0,1-12,12H168a12,12,0,0,1,0-24h19l-7.8-7.8a75.55,75.55,0,0,0-53.32-22.26h-.43A75.49,75.49,0,0,0,72.39,75.57,12,12,0,1,1,55.61,58.41a99.38,99.38,0,0,1,69.87-28.47H126A99.42,99.42,0,0,1,196.2,59.23L204,67V48a12,12,0,0,1,24,0ZM183.61,180.43a75.49,75.49,0,0,1-53.09,21.63h-.43A75.55,75.55,0,0,1,76.77,179.8L69,172H88a12,12,0,0,0,0-24H40a12,12,0,0,0-12,12v48a12,12,0,0,0,24,0V189l7.8,7.8A99.42,99.42,0,0,0,130,226.06h.56a99.38,99.38,0,0,0,69.87-28.47,12,12,0,0,0-16.78-17.16Z"/>'),dI=Fa("arrows-clockwise","0 0 256 256",'<path d="M224,48V96a8,8,0,0,1-8,8H168a8,8,0,0,1-5.66-13.66L180.65,72a79.48,79.48,0,0,0-54.72-22.09h-.45A79.52,79.52,0,0,0,69.59,72.71,8,8,0,0,1,58.41,61.27,96,96,0,0,1,192,60.7l18.36-18.36A8,8,0,0,1,224,48ZM186.41,183.29A80,80,0,0,1,75.35,184l18.31-18.31A8,8,0,0,0,88,152H40a8,8,0,0,0-8,8v48a8,8,0,0,0,13.66,5.66L64,195.3a95.42,95.42,0,0,0,66,26.76h.53a95.36,95.36,0,0,0,67.07-27.33,8,8,0,0,0-11.18-11.44Z"/>'),hI=Fa("arrows-clockwise","0 0 256 256",'<path d="M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z" opacity="0.2"/><path d="M224,48V96a8,8,0,0,1-8,8H168a8,8,0,0,1,0-16h28.69L182.06,73.37a79.56,79.56,0,0,0-56.13-23.43h-.45A79.52,79.52,0,0,0,69.59,72.71,8,8,0,0,1,58.41,61.27a96,96,0,0,1,135,.79L208,76.69V48a8,8,0,0,1,16,0ZM186.41,183.29a80,80,0,0,1-112.47-.66L59.31,168H88a8,8,0,0,0,0-16H40a8,8,0,0,0-8,8v48a8,8,0,0,0,16,0V179.31l14.63,14.63A95.43,95.43,0,0,0,130,222.06h.53a95.36,95.36,0,0,0,67.07-27.33,8,8,0,0,0-11.18-11.44Z"/>'),fI="arrows-clockwise",_s=Object.freeze(Object.defineProperty({__proto__:null,bold:uI,default:ep,duotone:hI,fill:dI,glyphName:fI,light:cI,regular:ep,thin:oI},Symbol.toStringTag,{value:"Module"})),za=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},pI=za("download","0 0 256 256",'<path d="M236,136v64a12,12,0,0,1-12,12H32a12,12,0,0,1-12-12V136a12,12,0,0,1,12-12H72a4,4,0,0,1,0,8H32a4,4,0,0,0-4,4v64a4,4,0,0,0,4,4H224a4,4,0,0,0,4-4V136a4,4,0,0,0-4-4H184a4,4,0,0,1,0-8h40A12,12,0,0,1,236,136Zm-110.83-5.17a4,4,0,0,0,5.66,0l48-48a4,4,0,1,0-5.66-5.66L132,118.34V24a4,4,0,0,0-8,0v94.34L82.83,77.17a4,4,0,0,0-5.66,5.66ZM196,168a8,8,0,1,0-8,8A8,8,0,0,0,196,168Z"/>'),_I=za("download","0 0 256 256",'<path d="M238,136v64a14,14,0,0,1-14,14H32a14,14,0,0,1-14-14V136a14,14,0,0,1,14-14H72a6,6,0,0,1,0,12H32a2,2,0,0,0-2,2v64a2,2,0,0,0,2,2H224a2,2,0,0,0,2-2V136a2,2,0,0,0-2-2H184a6,6,0,0,1,0-12h40A14,14,0,0,1,238,136Zm-114.24-3.76a6,6,0,0,0,8.48,0l48-48a6,6,0,0,0-8.48-8.48L134,113.51V24a6,6,0,0,0-12,0v89.51L84.24,75.76a6,6,0,0,0-8.48,8.48ZM198,168a10,10,0,1,0-10,10A10,10,0,0,0,198,168Z"/>'),tp=za("download","0 0 256 256",'<path d="M240,136v64a16,16,0,0,1-16,16H32a16,16,0,0,1-16-16V136a16,16,0,0,1,16-16H72a8,8,0,0,1,0,16H32v64H224V136H184a8,8,0,0,1,0-16h40A16,16,0,0,1,240,136Zm-117.66-2.34a8,8,0,0,0,11.32,0l48-48a8,8,0,0,0-11.32-11.32L136,108.69V24a8,8,0,0,0-16,0v84.69L85.66,74.34A8,8,0,0,0,74.34,85.66ZM200,168a12,12,0,1,0-12,12A12,12,0,0,0,200,168Z"/>'),mI=za("download","0 0 256 256",'<path d="M71.51,88.49a12,12,0,0,1,17-17L116,99V24a12,12,0,0,1,24,0V99l27.51-27.52a12,12,0,0,1,17,17l-48,48a12,12,0,0,1-17,0ZM224,116H188a12,12,0,0,0,0,24h32v56H36V140H68a12,12,0,0,0,0-24H32a20,20,0,0,0-20,20v64a20,20,0,0,0,20,20H224a20,20,0,0,0,20-20V136A20,20,0,0,0,224,116Zm-20,52a16,16,0,1,0-16,16A16,16,0,0,0,204,168Z"/>'),vI=za("download","0 0 256 256",'<path d="M74.34,85.66A8,8,0,0,1,85.66,74.34L120,108.69V24a8,8,0,0,1,16,0v84.69l34.34-34.35a8,8,0,0,1,11.32,11.32l-48,48a8,8,0,0,1-11.32,0ZM240,136v64a16,16,0,0,1-16,16H32a16,16,0,0,1-16-16V136a16,16,0,0,1,16-16H84.4a4,4,0,0,1,2.83,1.17L111,145A24,24,0,0,0,145,145l23.8-23.8A4,4,0,0,1,171.6,120H224A16,16,0,0,1,240,136Zm-40,32a12,12,0,1,0-12,12A12,12,0,0,0,200,168Z"/>'),gI=za("download","0 0 256 256",'<path d="M232,136v64a8,8,0,0,1-8,8H32a8,8,0,0,1-8-8V136a8,8,0,0,1,8-8H224A8,8,0,0,1,232,136Z" opacity="0.2"/><path d="M240,136v64a16,16,0,0,1-16,16H32a16,16,0,0,1-16-16V136a16,16,0,0,1,16-16H72a8,8,0,0,1,0,16H32v64H224V136H184a8,8,0,0,1,0-16h40A16,16,0,0,1,240,136Zm-117.66-2.34a8,8,0,0,0,11.32,0l48-48a8,8,0,0,0-11.32-11.32L136,108.69V24a8,8,0,0,0-16,0v84.69L85.66,74.34A8,8,0,0,0,74.34,85.66ZM200,168a12,12,0,1,0-12,12A12,12,0,0,0,200,168Z"/>'),bI="download",yI=Object.freeze(Object.defineProperty({__proto__:null,bold:mI,default:tp,duotone:gI,fill:vI,glyphName:bI,light:_I,regular:tp,thin:pI},Symbol.toStringTag,{value:"Module"})),Ua=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},wI=Ua("upload","0 0 256 256",'<path d="M236,136v64a12,12,0,0,1-12,12H32a12,12,0,0,1-12-12V136a12,12,0,0,1,12-12H80a4,4,0,0,1,0,8H32a4,4,0,0,0-4,4v64a4,4,0,0,0,4,4H224a4,4,0,0,0,4-4V136a4,4,0,0,0-4-4H176a4,4,0,0,1,0-8h48A12,12,0,0,1,236,136ZM82.83,74.83,124,33.66V128a4,4,0,0,0,8,0V33.66l41.17,41.17a4,4,0,1,0,5.66-5.66l-48-48a4,4,0,0,0-5.66,0l-48,48a4,4,0,0,0,5.66,5.66ZM196,168a8,8,0,1,0-8,8A8,8,0,0,0,196,168Z"/>'),SI=Ua("upload","0 0 256 256",'<path d="M238,136v64a14,14,0,0,1-14,14H32a14,14,0,0,1-14-14V136a14,14,0,0,1,14-14H80a6,6,0,0,1,0,12H32a2,2,0,0,0-2,2v64a2,2,0,0,0,2,2H224a2,2,0,0,0,2-2V136a2,2,0,0,0-2-2H176a6,6,0,0,1,0-12h48A14,14,0,0,1,238,136ZM84.24,76.24,122,38.49V128a6,6,0,0,0,12,0V38.49l37.76,37.75a6,6,0,0,0,8.48-8.48l-48-48a6,6,0,0,0-8.48,0l-48,48a6,6,0,0,0,8.48,8.48ZM198,168a10,10,0,1,0-10,10A10,10,0,0,0,198,168Z"/>'),ip=Ua("upload","0 0 256 256",'<path d="M240,136v64a16,16,0,0,1-16,16H32a16,16,0,0,1-16-16V136a16,16,0,0,1,16-16H80a8,8,0,0,1,0,16H32v64H224V136H176a8,8,0,0,1,0-16h48A16,16,0,0,1,240,136ZM85.66,77.66,120,43.31V128a8,8,0,0,0,16,0V43.31l34.34,34.35a8,8,0,0,0,11.32-11.32l-48-48a8,8,0,0,0-11.32,0l-48,48A8,8,0,0,0,85.66,77.66ZM200,168a12,12,0,1,0-12,12A12,12,0,0,0,200,168Z"/>'),CI=Ua("upload","0 0 256 256",'<path d="M188,184a16,16,0,1,1,16-16A16,16,0,0,1,188,184Zm36-68H180a12,12,0,0,0,0,24h40v56H36V140H76a12,12,0,0,0,0-24H32a20,20,0,0,0-20,20v64a20,20,0,0,0,20,20H224a20,20,0,0,0,20-20V136A20,20,0,0,0,224,116ZM88.49,80.49,116,53v75a12,12,0,0,0,24,0V53l27.51,27.52a12,12,0,1,0,17-17l-48-48a12,12,0,0,0-17,0l-48,48a12,12,0,1,0,17,17Z"/>'),kI=Ua("upload","0 0 256 256",'<path d="M74.34,77.66a8,8,0,0,1,0-11.32l48-48a8,8,0,0,1,11.32,0l48,48a8,8,0,0,1-11.32,11.32L136,43.31V128a8,8,0,0,1-16,0V43.31L85.66,77.66A8,8,0,0,1,74.34,77.66ZM240,136v64a16,16,0,0,1-16,16H32a16,16,0,0,1-16-16V136a16,16,0,0,1,16-16h68a4,4,0,0,1,4,4v3.46c0,13.45,11,24.79,24.46,24.54A24,24,0,0,0,152,128v-4a4,4,0,0,1,4-4h68A16,16,0,0,1,240,136Zm-40,32a12,12,0,1,0-12,12A12,12,0,0,0,200,168Z"/>'),AI=Ua("upload","0 0 256 256",'<path d="M232,136v64a8,8,0,0,1-8,8H32a8,8,0,0,1-8-8V136a8,8,0,0,1,8-8H224A8,8,0,0,1,232,136Z" opacity="0.2"/><path d="M240,136v64a16,16,0,0,1-16,16H32a16,16,0,0,1-16-16V136a16,16,0,0,1,16-16H80a8,8,0,0,1,0,16H32v64H224V136H176a8,8,0,0,1,0-16h48A16,16,0,0,1,240,136ZM85.66,77.66,120,43.31V128a8,8,0,0,0,16,0V43.31l34.34,34.35a8,8,0,0,0,11.32-11.32l-48-48a8,8,0,0,0-11.32,0l-48,48A8,8,0,0,0,85.66,77.66ZM200,168a12,12,0,1,0-12,12A12,12,0,0,0,200,168Z"/>'),MI="upload",$I=Object.freeze(Object.defineProperty({__proto__:null,bold:CI,default:ip,duotone:AI,fill:kI,glyphName:MI,light:SI,regular:ip,thin:wI},Symbol.toStringTag,{value:"Module"}));var Wa={},LI=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},zg={},qi={};let L2;const EI=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];qi.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return t*4+17};qi.getSymbolTotalCodewords=function(t){return EI[t]};qi.getBCHDigit=function(e){let t=0;for(;e!==0;)t++,e>>>=1;return t};qi.setToSJISFunction=function(t){if(typeof t!="function")throw new Error('"toSJISFunc" is not a valid function.');L2=t};qi.isKanjiModeEnabled=function(){return typeof L2<"u"};qi.toSJIS=function(t){return L2(t)};var m1={};(function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(i){if(typeof i!="string")throw new Error("Param is not a string");switch(i.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+i)}}e.isValid=function(n){return n&&typeof n.bit<"u"&&n.bit>=0&&n.bit<4},e.from=function(n,r){if(e.isValid(n))return n;try{return t(n)}catch{return r}}})(m1);function Ug(){this.buffer=[],this.length=0}Ug.prototype={get:function(e){const t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)===1},put:function(e,t){for(let i=0;i<t;i++)this.putBit((e>>>t-i-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(e){const t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}};var xI=Ug;function t0(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}t0.prototype.set=function(e,t,i,n){const r=e*this.size+t;this.data[r]=i,n&&(this.reservedBit[r]=!0)};t0.prototype.get=function(e,t){return this.data[e*this.size+t]};t0.prototype.xor=function(e,t,i){this.data[e*this.size+t]^=i};t0.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]};var HI=t0,Wg={};(function(e){const t=qi.getSymbolSize;e.getRowColCoords=function(n){if(n===1)return[];const r=Math.floor(n/7)+2,s=t(n),a=s===145?26:Math.ceil((s-13)/(2*r-2))*2,l=[s-7];for(let o=1;o<r-1;o++)l[o]=l[o-1]-a;return l.push(6),l.reverse()},e.getPositions=function(n){const r=[],s=e.getRowColCoords(n),a=s.length;for(let l=0;l<a;l++)for(let o=0;o<a;o++)l===0&&o===0||l===0&&o===a-1||l===a-1&&o===0||r.push([s[l],s[o]]);return r}})(Wg);var jg={};const TI=qi.getSymbolSize,np=7;jg.getPositions=function(t){const i=TI(t);return[[0,0],[i-np,0],[0,i-np]]};var Kg={};(function(e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const t={N1:3,N2:3,N3:40,N4:10};e.isValid=function(r){return r!=null&&r!==""&&!isNaN(r)&&r>=0&&r<=7},e.from=function(r){return e.isValid(r)?parseInt(r,10):void 0},e.getPenaltyN1=function(r){const s=r.size;let a=0,l=0,o=0,c=null,u=null;for(let d=0;d<s;d++){l=o=0,c=u=null;for(let h=0;h<s;h++){let f=r.get(d,h);f===c?l++:(l>=5&&(a+=t.N1+(l-5)),c=f,l=1),f=r.get(h,d),f===u?o++:(o>=5&&(a+=t.N1+(o-5)),u=f,o=1)}l>=5&&(a+=t.N1+(l-5)),o>=5&&(a+=t.N1+(o-5))}return a},e.getPenaltyN2=function(r){const s=r.size;let a=0;for(let l=0;l<s-1;l++)for(let o=0;o<s-1;o++){const c=r.get(l,o)+r.get(l,o+1)+r.get(l+1,o)+r.get(l+1,o+1);(c===4||c===0)&&a++}return a*t.N2},e.getPenaltyN3=function(r){const s=r.size;let a=0,l=0,o=0;for(let c=0;c<s;c++){l=o=0;for(let u=0;u<s;u++)l=l<<1&2047|r.get(c,u),u>=10&&(l===1488||l===93)&&a++,o=o<<1&2047|r.get(u,c),u>=10&&(o===1488||o===93)&&a++}return a*t.N3},e.getPenaltyN4=function(r){let s=0;const a=r.data.length;for(let o=0;o<a;o++)s+=r.data[o];return Math.abs(Math.ceil(s*100/a/5)-10)*t.N4};function i(n,r,s){switch(n){case e.Patterns.PATTERN000:return(r+s)%2===0;case e.Patterns.PATTERN001:return r%2===0;case e.Patterns.PATTERN010:return s%3===0;case e.Patterns.PATTERN011:return(r+s)%3===0;case e.Patterns.PATTERN100:return(Math.floor(r/2)+Math.floor(s/3))%2===0;case e.Patterns.PATTERN101:return r*s%2+r*s%3===0;case e.Patterns.PATTERN110:return(r*s%2+r*s%3)%2===0;case e.Patterns.PATTERN111:return(r*s%3+(r+s)%2)%2===0;default:throw new Error("bad maskPattern:"+n)}}e.applyMask=function(r,s){const a=s.size;for(let l=0;l<a;l++)for(let o=0;o<a;o++)s.isReserved(o,l)||s.xor(o,l,i(r,o,l))},e.getBestMask=function(r,s){const a=Object.keys(e.Patterns).length;let l=0,o=1/0;for(let c=0;c<a;c++){s(c),e.applyMask(c,r);const u=e.getPenaltyN1(r)+e.getPenaltyN2(r)+e.getPenaltyN3(r)+e.getPenaltyN4(r);e.applyMask(c,r),u<o&&(o=u,l=c)}return l}})(Kg);var v1={};const Er=m1,H0=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],T0=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];v1.getBlocksCount=function(t,i){switch(i){case Er.L:return H0[(t-1)*4+0];case Er.M:return H0[(t-1)*4+1];case Er.Q:return H0[(t-1)*4+2];case Er.H:return H0[(t-1)*4+3];default:return}};v1.getTotalCodewordsCount=function(t,i){switch(i){case Er.L:return T0[(t-1)*4+0];case Er.M:return T0[(t-1)*4+1];case Er.Q:return T0[(t-1)*4+2];case Er.H:return T0[(t-1)*4+3];default:return}};var qg={},g1={};const _o=new Uint8Array(512),Tc=new Uint8Array(256);(function(){let t=1;for(let i=0;i<255;i++)_o[i]=t,Tc[t]=i,t<<=1,t&256&&(t^=285);for(let i=255;i<512;i++)_o[i]=_o[i-255]})();g1.log=function(t){if(t<1)throw new Error("log("+t+")");return Tc[t]};g1.exp=function(t){return _o[t]};g1.mul=function(t,i){return t===0||i===0?0:_o[Tc[t]+Tc[i]]};(function(e){const t=g1;e.mul=function(n,r){const s=new Uint8Array(n.length+r.length-1);for(let a=0;a<n.length;a++)for(let l=0;l<r.length;l++)s[a+l]^=t.mul(n[a],r[l]);return s},e.mod=function(n,r){let s=new Uint8Array(n);for(;s.length-r.length>=0;){const a=s[0];for(let o=0;o<r.length;o++)s[o]^=t.mul(r[o],a);let l=0;for(;l<s.length&&s[l]===0;)l++;s=s.slice(l)}return s},e.generateECPolynomial=function(n){let r=new Uint8Array([1]);for(let s=0;s<n;s++)r=e.mul(r,new Uint8Array([1,t.exp(s)]));return r}})(qg);const Gg=qg;function E2(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}E2.prototype.initialize=function(t){this.degree=t,this.genPoly=Gg.generateECPolynomial(this.degree)};E2.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");const i=new Uint8Array(t.length+this.degree);i.set(t);const n=Gg.mod(i,this.genPoly),r=this.degree-n.length;if(r>0){const s=new Uint8Array(this.degree);return s.set(n,r),s}return n};var NI=E2,Yg={},qr={},x2={};x2.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40};var jn={};const Xg="[0-9]+",PI="[A-Z $%*+\\-./:]+";let Do="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";Do=Do.replace(/u/g,"\\u");const OI="(?:(?![A-Z0-9 $%*+\\-./:]|"+Do+`)(?:.|[\r
|
|
52
|
-
]))+`;jn.KANJI=new RegExp(Do,"g");jn.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");jn.BYTE=new RegExp(OI,"g");jn.NUMERIC=new RegExp(Xg,"g");jn.ALPHANUMERIC=new RegExp(PI,"g");const II=new RegExp("^"+Do+"$"),RI=new RegExp("^"+Xg+"$"),VI=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");jn.testKanji=function(t){return II.test(t)};jn.testNumeric=function(t){return RI.test(t)};jn.testAlphanumeric=function(t){return VI.test(t)};(function(e){const t=x2,i=jn;e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(s,a){if(!s.ccBits)throw new Error("Invalid mode: "+s);if(!t.isValid(a))throw new Error("Invalid version: "+a);return a>=1&&a<10?s.ccBits[0]:a<27?s.ccBits[1]:s.ccBits[2]},e.getBestModeForData=function(s){return i.testNumeric(s)?e.NUMERIC:i.testAlphanumeric(s)?e.ALPHANUMERIC:i.testKanji(s)?e.KANJI:e.BYTE},e.toString=function(s){if(s&&s.id)return s.id;throw new Error("Invalid mode")},e.isValid=function(s){return s&&s.bit&&s.ccBits};function n(r){if(typeof r!="string")throw new Error("Param is not a string");switch(r.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+r)}}e.from=function(s,a){if(e.isValid(s))return s;try{return n(s)}catch{return a}}})(qr);(function(e){const t=qi,i=v1,n=m1,r=qr,s=x2,a=7973,l=t.getBCHDigit(a);function o(h,f,v){for(let p=1;p<=40;p++)if(f<=e.getCapacity(p,v,h))return p}function c(h,f){return r.getCharCountIndicator(h,f)+4}function u(h,f){let v=0;return h.forEach(function(p){const w=c(p.mode,f);v+=w+p.getBitsLength()}),v}function d(h,f){for(let v=1;v<=40;v++)if(u(h,v)<=e.getCapacity(v,f,r.MIXED))return v}e.from=function(f,v){return s.isValid(f)?parseInt(f,10):v},e.getCapacity=function(f,v,p){if(!s.isValid(f))throw new Error("Invalid QR Code version");typeof p>"u"&&(p=r.BYTE);const w=t.getSymbolTotalCodewords(f),_=i.getTotalCodewordsCount(f,v),y=(w-_)*8;if(p===r.MIXED)return y;const C=y-c(p,f);switch(p){case r.NUMERIC:return Math.floor(C/10*3);case r.ALPHANUMERIC:return Math.floor(C/11*2);case r.KANJI:return Math.floor(C/13);case r.BYTE:default:return Math.floor(C/8)}},e.getBestVersionForData=function(f,v){let p;const w=n.from(v,n.M);if(Array.isArray(f)){if(f.length>1)return d(f,w);if(f.length===0)return 1;p=f[0]}else p=f;return o(p.mode,p.getLength(),w)},e.getEncodedBits=function(f){if(!s.isValid(f)||f<7)throw new Error("Invalid QR Code version");let v=f<<12;for(;t.getBCHDigit(v)-l>=0;)v^=a<<t.getBCHDigit(v)-l;return f<<12|v}})(Yg);var Jg={};const xd=qi,Qg=1335,DI=21522,rp=xd.getBCHDigit(Qg);Jg.getEncodedBits=function(t,i){const n=t.bit<<3|i;let r=n<<10;for(;xd.getBCHDigit(r)-rp>=0;)r^=Qg<<xd.getBCHDigit(r)-rp;return(n<<10|r)^DI};var eb={};const ZI=qr;function sa(e){this.mode=ZI.NUMERIC,this.data=e.toString()}sa.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)};sa.prototype.getLength=function(){return this.data.length};sa.prototype.getBitsLength=function(){return sa.getBitsLength(this.data.length)};sa.prototype.write=function(t){let i,n,r;for(i=0;i+3<=this.data.length;i+=3)n=this.data.substr(i,3),r=parseInt(n,10),t.put(r,10);const s=this.data.length-i;s>0&&(n=this.data.substr(i),r=parseInt(n,10),t.put(r,s*3+1))};var BI=sa;const FI=qr,su=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function aa(e){this.mode=FI.ALPHANUMERIC,this.data=e}aa.getBitsLength=function(t){return 11*Math.floor(t/2)+6*(t%2)};aa.prototype.getLength=function(){return this.data.length};aa.prototype.getBitsLength=function(){return aa.getBitsLength(this.data.length)};aa.prototype.write=function(t){let i;for(i=0;i+2<=this.data.length;i+=2){let n=su.indexOf(this.data[i])*45;n+=su.indexOf(this.data[i+1]),t.put(n,11)}this.data.length%2&&t.put(su.indexOf(this.data[i]),6)};var zI=aa;const UI=qr;function la(e){this.mode=UI.BYTE,typeof e=="string"?this.data=new TextEncoder().encode(e):this.data=new Uint8Array(e)}la.getBitsLength=function(t){return t*8};la.prototype.getLength=function(){return this.data.length};la.prototype.getBitsLength=function(){return la.getBitsLength(this.data.length)};la.prototype.write=function(e){for(let t=0,i=this.data.length;t<i;t++)e.put(this.data[t],8)};var WI=la;const jI=qr,KI=qi;function oa(e){this.mode=jI.KANJI,this.data=e}oa.getBitsLength=function(t){return t*13};oa.prototype.getLength=function(){return this.data.length};oa.prototype.getBitsLength=function(){return oa.getBitsLength(this.data.length)};oa.prototype.write=function(e){let t;for(t=0;t<this.data.length;t++){let i=KI.toSJIS(this.data[t]);if(i>=33088&&i<=40956)i-=33088;else if(i>=57408&&i<=60351)i-=49472;else throw new Error("Invalid SJIS character: "+this.data[t]+`
|
|
53
|
-
Make sure your charset is UTF-8`);i=(i>>>8&255)*192+(i&255),e.put(i,13)}};var qI=oa,tb={exports:{}};(function(e){var t={single_source_shortest_paths:function(i,n,r){var s={},a={};a[n]=0;var l=t.PriorityQueue.make();l.push(n,0);for(var o,c,u,d,h,f,v,p,w;!l.empty();){o=l.pop(),c=o.value,d=o.cost,h=i[c]||{};for(u in h)h.hasOwnProperty(u)&&(f=h[u],v=d+f,p=a[u],w=typeof a[u]>"u",(w||p>v)&&(a[u]=v,l.push(u,v),s[u]=c))}if(typeof r<"u"&&typeof a[r]>"u"){var _=["Could not find a path from ",n," to ",r,"."].join("");throw new Error(_)}return s},extract_shortest_path_from_predecessor_list:function(i,n){for(var r=[],s=n;s;)r.push(s),i[s],s=i[s];return r.reverse(),r},find_path:function(i,n,r){var s=t.single_source_shortest_paths(i,n,r);return t.extract_shortest_path_from_predecessor_list(s,r)},PriorityQueue:{make:function(i){var n=t.PriorityQueue,r={},s;i=i||{};for(s in n)n.hasOwnProperty(s)&&(r[s]=n[s]);return r.queue=[],r.sorter=i.sorter||n.default_sorter,r},default_sorter:function(i,n){return i.cost-n.cost},push:function(i,n){var r={value:i,cost:n};this.queue.push(r),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};e.exports=t})(tb);var GI=tb.exports;(function(e){const t=qr,i=BI,n=zI,r=WI,s=qI,a=jn,l=qi,o=GI;function c(_){return unescape(encodeURIComponent(_)).length}function u(_,y,C){const g=[];let $;for(;($=_.exec(C))!==null;)g.push({data:$[0],index:$.index,mode:y,length:$[0].length});return g}function d(_){const y=u(a.NUMERIC,t.NUMERIC,_),C=u(a.ALPHANUMERIC,t.ALPHANUMERIC,_);let g,$;return l.isKanjiModeEnabled()?(g=u(a.BYTE,t.BYTE,_),$=u(a.KANJI,t.KANJI,_)):(g=u(a.BYTE_KANJI,t.BYTE,_),$=[]),y.concat(C,g,$).sort(function(L,B){return L.index-B.index}).map(function(L){return{data:L.data,mode:L.mode,length:L.length}})}function h(_,y){switch(y){case t.NUMERIC:return i.getBitsLength(_);case t.ALPHANUMERIC:return n.getBitsLength(_);case t.KANJI:return s.getBitsLength(_);case t.BYTE:return r.getBitsLength(_)}}function f(_){return _.reduce(function(y,C){const g=y.length-1>=0?y[y.length-1]:null;return g&&g.mode===C.mode?(y[y.length-1].data+=C.data,y):(y.push(C),y)},[])}function v(_){const y=[];for(let C=0;C<_.length;C++){const g=_[C];switch(g.mode){case t.NUMERIC:y.push([g,{data:g.data,mode:t.ALPHANUMERIC,length:g.length},{data:g.data,mode:t.BYTE,length:g.length}]);break;case t.ALPHANUMERIC:y.push([g,{data:g.data,mode:t.BYTE,length:g.length}]);break;case t.KANJI:y.push([g,{data:g.data,mode:t.BYTE,length:c(g.data)}]);break;case t.BYTE:y.push([{data:g.data,mode:t.BYTE,length:c(g.data)}])}}return y}function p(_,y){const C={},g={start:{}};let $=["start"];for(let E=0;E<_.length;E++){const L=_[E],B=[];for(let T=0;T<L.length;T++){const X=L[T],W=""+E+T;B.push(W),C[W]={node:X,lastCount:0},g[W]={};for(let A=0;A<$.length;A++){const x=$[A];C[x]&&C[x].node.mode===X.mode?(g[x][W]=h(C[x].lastCount+X.length,X.mode)-h(C[x].lastCount,X.mode),C[x].lastCount+=X.length):(C[x]&&(C[x].lastCount=X.length),g[x][W]=h(X.length,X.mode)+4+t.getCharCountIndicator(X.mode,y))}}$=B}for(let E=0;E<$.length;E++)g[$[E]].end=0;return{map:g,table:C}}function w(_,y){let C;const g=t.getBestModeForData(_);if(C=t.from(y,g),C!==t.BYTE&&C.bit<g.bit)throw new Error('"'+_+'" cannot be encoded with mode '+t.toString(C)+`.
|
|
54
|
-
Suggested mode is: `+t.toString(g));switch(C===t.KANJI&&!l.isKanjiModeEnabled()&&(C=t.BYTE),C){case t.NUMERIC:return new i(_);case t.ALPHANUMERIC:return new n(_);case t.KANJI:return new s(_);case t.BYTE:return new r(_)}}e.fromArray=function(y){return y.reduce(function(C,g){return typeof g=="string"?C.push(w(g,null)):g.data&&C.push(w(g.data,g.mode)),C},[])},e.fromString=function(y,C){const g=d(y,l.isKanjiModeEnabled()),$=v(g),E=p($,C),L=o.find_path(E.map,"start","end"),B=[];for(let T=1;T<L.length-1;T++)B.push(E.table[L[T]].node);return e.fromArray(f(B))},e.rawSplit=function(y){return e.fromArray(d(y,l.isKanjiModeEnabled()))}})(eb);const b1=qi,au=m1,YI=xI,XI=HI,JI=Wg,QI=jg,Hd=Kg,Td=v1,eR=NI,Nc=Yg,tR=Jg,iR=qr,lu=eb;function nR(e,t){const i=e.size,n=QI.getPositions(t);for(let r=0;r<n.length;r++){const s=n[r][0],a=n[r][1];for(let l=-1;l<=7;l++)if(!(s+l<=-1||i<=s+l))for(let o=-1;o<=7;o++)a+o<=-1||i<=a+o||(l>=0&&l<=6&&(o===0||o===6)||o>=0&&o<=6&&(l===0||l===6)||l>=2&&l<=4&&o>=2&&o<=4?e.set(s+l,a+o,!0,!0):e.set(s+l,a+o,!1,!0))}}function rR(e){const t=e.size;for(let i=8;i<t-8;i++){const n=i%2===0;e.set(i,6,n,!0),e.set(6,i,n,!0)}}function sR(e,t){const i=JI.getPositions(t);for(let n=0;n<i.length;n++){const r=i[n][0],s=i[n][1];for(let a=-2;a<=2;a++)for(let l=-2;l<=2;l++)a===-2||a===2||l===-2||l===2||a===0&&l===0?e.set(r+a,s+l,!0,!0):e.set(r+a,s+l,!1,!0)}}function aR(e,t){const i=e.size,n=Nc.getEncodedBits(t);let r,s,a;for(let l=0;l<18;l++)r=Math.floor(l/3),s=l%3+i-8-3,a=(n>>l&1)===1,e.set(r,s,a,!0),e.set(s,r,a,!0)}function ou(e,t,i){const n=e.size,r=tR.getEncodedBits(t,i);let s,a;for(s=0;s<15;s++)a=(r>>s&1)===1,s<6?e.set(s,8,a,!0):s<8?e.set(s+1,8,a,!0):e.set(n-15+s,8,a,!0),s<8?e.set(8,n-s-1,a,!0):s<9?e.set(8,15-s-1+1,a,!0):e.set(8,15-s-1,a,!0);e.set(n-8,8,1,!0)}function lR(e,t){const i=e.size;let n=-1,r=i-1,s=7,a=0;for(let l=i-1;l>0;l-=2)for(l===6&&l--;;){for(let o=0;o<2;o++)if(!e.isReserved(r,l-o)){let c=!1;a<t.length&&(c=(t[a]>>>s&1)===1),e.set(r,l-o,c),s--,s===-1&&(a++,s=7)}if(r+=n,r<0||i<=r){r-=n,n=-n;break}}}function oR(e,t,i){const n=new YI;i.forEach(function(o){n.put(o.mode.bit,4),n.put(o.getLength(),iR.getCharCountIndicator(o.mode,e)),o.write(n)});const r=b1.getSymbolTotalCodewords(e),s=Td.getTotalCodewordsCount(e,t),a=(r-s)*8;for(n.getLengthInBits()+4<=a&&n.put(0,4);n.getLengthInBits()%8!==0;)n.putBit(0);const l=(a-n.getLengthInBits())/8;for(let o=0;o<l;o++)n.put(o%2?17:236,8);return cR(n,e,t)}function cR(e,t,i){const n=b1.getSymbolTotalCodewords(t),r=Td.getTotalCodewordsCount(t,i),s=n-r,a=Td.getBlocksCount(t,i),l=n%a,o=a-l,c=Math.floor(n/a),u=Math.floor(s/a),d=u+1,h=c-u,f=new eR(h);let v=0;const p=new Array(a),w=new Array(a);let _=0;const y=new Uint8Array(e.buffer);for(let L=0;L<a;L++){const B=L<o?u:d;p[L]=y.slice(v,v+B),w[L]=f.encode(p[L]),v+=B,_=Math.max(_,B)}const C=new Uint8Array(n);let g=0,$,E;for($=0;$<_;$++)for(E=0;E<a;E++)$<p[E].length&&(C[g++]=p[E][$]);for($=0;$<h;$++)for(E=0;E<a;E++)C[g++]=w[E][$];return C}function uR(e,t,i,n){let r;if(Array.isArray(e))r=lu.fromArray(e);else if(typeof e=="string"){let c=t;if(!c){const u=lu.rawSplit(e);c=Nc.getBestVersionForData(u,i)}r=lu.fromString(e,c||40)}else throw new Error("Invalid data");const s=Nc.getBestVersionForData(r,i);if(!s)throw new Error("The amount of data is too big to be stored in a QR Code");if(!t)t=s;else if(t<s)throw new Error(`
|
|
55
|
-
The chosen QR Code version cannot contain this amount of data.
|
|
56
|
-
Minimum version required to store current data is: `+s+`.
|
|
57
|
-
`);const a=oR(t,i,r),l=b1.getSymbolSize(t),o=new XI(l);return nR(o,t),rR(o),sR(o,t),ou(o,i,0),t>=7&&aR(o,t),lR(o,a),isNaN(n)&&(n=Hd.getBestMask(o,ou.bind(null,o,i))),Hd.applyMask(n,o),ou(o,i,n),{modules:o,version:t,errorCorrectionLevel:i,maskPattern:n,segments:r}}zg.create=function(t,i){if(typeof t>"u"||t==="")throw new Error("No input text");let n=au.M,r,s;return typeof i<"u"&&(n=au.from(i.errorCorrectionLevel,au.M),r=Nc.from(i.version),s=Hd.from(i.maskPattern),i.toSJISFunc&&b1.setToSJISFunction(i.toSJISFunc)),uR(t,r,n,s)};var ib={},H2={};(function(e){function t(i){if(typeof i=="number"&&(i=i.toString()),typeof i!="string")throw new Error("Color should be defined as hex string");let n=i.slice().replace("#","").split("");if(n.length<3||n.length===5||n.length>8)throw new Error("Invalid hex color: "+i);(n.length===3||n.length===4)&&(n=Array.prototype.concat.apply([],n.map(function(s){return[s,s]}))),n.length===6&&n.push("F","F");const r=parseInt(n.join(""),16);return{r:r>>24&255,g:r>>16&255,b:r>>8&255,a:r&255,hex:"#"+n.slice(0,6).join("")}}e.getOptions=function(n){n||(n={}),n.color||(n.color={});const r=typeof n.margin>"u"||n.margin===null||n.margin<0?4:n.margin,s=n.width&&n.width>=21?n.width:void 0,a=n.scale||4;return{width:s,scale:s?4:a,margin:r,color:{dark:t(n.color.dark||"#000000ff"),light:t(n.color.light||"#ffffffff")},type:n.type,rendererOpts:n.rendererOpts||{}}},e.getScale=function(n,r){return r.width&&r.width>=n+r.margin*2?r.width/(n+r.margin*2):r.scale},e.getImageWidth=function(n,r){const s=e.getScale(n,r);return Math.floor((n+r.margin*2)*s)},e.qrToImageData=function(n,r,s){const a=r.modules.size,l=r.modules.data,o=e.getScale(a,s),c=Math.floor((a+s.margin*2)*o),u=s.margin*o,d=[s.color.light,s.color.dark];for(let h=0;h<c;h++)for(let f=0;f<c;f++){let v=(h*c+f)*4,p=s.color.light;if(h>=u&&f>=u&&h<c-u&&f<c-u){const w=Math.floor((h-u)/o),_=Math.floor((f-u)/o);p=d[l[w*a+_]?1:0]}n[v++]=p.r,n[v++]=p.g,n[v++]=p.b,n[v]=p.a}}})(H2);(function(e){const t=H2;function i(r,s,a){r.clearRect(0,0,s.width,s.height),s.style||(s.style={}),s.height=a,s.width=a,s.style.height=a+"px",s.style.width=a+"px"}function n(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}e.render=function(s,a,l){let o=l,c=a;typeof o>"u"&&(!a||!a.getContext)&&(o=a,a=void 0),a||(c=n()),o=t.getOptions(o);const u=t.getImageWidth(s.modules.size,o),d=c.getContext("2d"),h=d.createImageData(u,u);return t.qrToImageData(h.data,s,o),i(d,c,u),d.putImageData(h,0,0),c},e.renderToDataURL=function(s,a,l){let o=l;typeof o>"u"&&(!a||!a.getContext)&&(o=a,a=void 0),o||(o={});const c=e.render(s,a,o),u=o.type||"image/png",d=o.rendererOpts||{};return c.toDataURL(u,d.quality)}})(ib);var nb={};const dR=H2;function sp(e,t){const i=e.a/255,n=t+'="'+e.hex+'"';return i<1?n+" "+t+'-opacity="'+i.toFixed(2).slice(1)+'"':n}function cu(e,t,i){let n=e+t;return typeof i<"u"&&(n+=" "+i),n}function hR(e,t,i){let n="",r=0,s=!1,a=0;for(let l=0;l<e.length;l++){const o=Math.floor(l%t),c=Math.floor(l/t);!o&&!s&&(s=!0),e[l]?(a++,l>0&&o>0&&e[l-1]||(n+=s?cu("M",o+i,.5+c+i):cu("m",r,0),r=0,s=!1),o+1<t&&e[l+1]||(n+=cu("h",a),a=0)):r++}return n}nb.render=function(t,i,n){const r=dR.getOptions(i),s=t.modules.size,a=t.modules.data,l=s+r.margin*2,o=r.color.light.a?"<path "+sp(r.color.light,"fill")+' d="M0 0h'+l+"v"+l+'H0z"/>':"",c="<path "+sp(r.color.dark,"stroke")+' d="'+hR(a,s,r.margin)+'"/>',u='viewBox="0 0 '+l+" "+l+'"',h='<svg xmlns="http://www.w3.org/2000/svg" '+(r.width?'width="'+r.width+'" height="'+r.width+'" ':"")+u+' shape-rendering="crispEdges">'+o+c+`</svg>
|
|
58
|
-
`;return typeof n=="function"&&n(null,h),h};const fR=LI,Nd=zg,rb=ib,pR=nb;function T2(e,t,i,n,r){const s=[].slice.call(arguments,1),a=s.length,l=typeof s[a-1]=="function";if(!l&&!fR())throw new Error("Callback required as last argument");if(l){if(a<2)throw new Error("Too few arguments provided");a===2?(r=i,i=t,t=n=void 0):a===3&&(t.getContext&&typeof r>"u"?(r=n,n=void 0):(r=n,n=i,i=t,t=void 0))}else{if(a<1)throw new Error("Too few arguments provided");return a===1?(i=t,t=n=void 0):a===2&&!t.getContext&&(n=i,i=t,t=void 0),new Promise(function(o,c){try{const u=Nd.create(i,n);o(e(u,t,n))}catch(u){c(u)}})}try{const o=Nd.create(i,n);r(null,e(o,t,n))}catch(o){r(o)}}Wa.create=Nd.create;Wa.toCanvas=T2.bind(null,rb.render);Wa.toDataURL=T2.bind(null,rb.renderToDataURL);Wa.toString=T2.bind(null,function(e,t,i){return pR.render(e,i)});function ap(e,t){(t==null||t>e.length)&&(t=e.length);for(var i=0,n=Array(t);i<t;i++)n[i]=e[i];return n}function _R(e){if(Array.isArray(e))return e}function mR(e,t,i){return(t=CR(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function vR(e,t){var i=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(i!=null){var n,r,s,a,l=[],o=!0,c=!1;try{if(s=(i=i.call(e)).next,t!==0)for(;!(o=(n=s.call(i)).done)&&(l.push(n.value),l.length!==t);o=!0);}catch(u){c=!0,r=u}finally{try{if(!o&&i.return!=null&&(a=i.return(),Object(a)!==a))return}finally{if(c)throw r}}return l}}function gR(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
59
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function lp(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),i.push.apply(i,n)}return i}function op(e){for(var t=1;t<arguments.length;t++){var i=arguments[t]!=null?arguments[t]:{};t%2?lp(Object(i),!0).forEach(function(n){mR(e,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):lp(Object(i)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))})}return e}function bR(e,t){if(e==null)return{};var i,n,r=yR(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n<s.length;n++)i=s[n],t.indexOf(i)===-1&&{}.propertyIsEnumerable.call(e,i)&&(r[i]=e[i])}return r}function yR(e,t){if(e==null)return{};var i={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;i[n]=e[n]}return i}function wR(e,t){return _R(e)||vR(e,t)||kR(e,t)||gR()}function SR(e,t){if(typeof e!="object"||!e)return e;var i=e[Symbol.toPrimitive];if(i!==void 0){var n=i.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function CR(e){var t=SR(e,"string");return typeof t=="symbol"?t:t+""}function kR(e,t){if(e){if(typeof e=="string")return ap(e,t);var i={}.toString.call(e).slice(8,-1);return i==="Object"&&e.constructor&&(i=e.constructor.name),i==="Map"||i==="Set"?Array.from(e):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?ap(e,t):void 0}}function AR(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function cp(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),i.push.apply(i,n)}return i}function up(e){for(var t=1;t<arguments.length;t++){var i=arguments[t]!=null?arguments[t]:{};t%2?cp(Object(i),!0).forEach(function(n){AR(e,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):cp(Object(i)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))})}return e}function MR(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return function(n){return t.reduceRight(function(r,s){return s(r)},n)}}function Yl(e){return function t(){for(var i=this,n=arguments.length,r=new Array(n),s=0;s<n;s++)r[s]=arguments[s];return r.length>=e.length?e.apply(this,r):function(){for(var a=arguments.length,l=new Array(a),o=0;o<a;o++)l[o]=arguments[o];return t.apply(i,[].concat(r,l))}}}function Pc(e){return{}.toString.call(e).includes("Object")}function $R(e){return!Object.keys(e).length}function Zo(e){return typeof e=="function"}function LR(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function ER(e,t){return Pc(t)||Nr("changeType"),Object.keys(t).some(function(i){return!LR(e,i)})&&Nr("changeField"),t}function xR(e){Zo(e)||Nr("selectorType")}function HR(e){Zo(e)||Pc(e)||Nr("handlerType"),Pc(e)&&Object.values(e).some(function(t){return!Zo(t)})&&Nr("handlersType")}function TR(e){e||Nr("initialIsRequired"),Pc(e)||Nr("initialType"),$R(e)&&Nr("initialContent")}function NR(e,t){throw new Error(e[t]||e.default)}var PR={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},Nr=Yl(NR)(PR),N0={changes:ER,selector:xR,handler:HR,initial:TR};function OR(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};N0.initial(e),N0.handler(t);var i={current:e},n=Yl(VR)(i,t),r=Yl(RR)(i),s=Yl(N0.changes)(e),a=Yl(IR)(i);function l(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(u){return u};return N0.selector(c),c(i.current)}function o(c){MR(n,r,s,a)(c)}return[l,o]}function IR(e,t){return Zo(t)?t(e.current):t}function RR(e,t){return e.current=up(up({},e.current),t),t}function VR(e,t,i){return Zo(t)?t(e.current):Object.keys(i).forEach(function(n){var r;return(r=t[n])===null||r===void 0?void 0:r.call(t,e.current[n])}),i}var DR={create:OR},ZR={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.55.1/min/vs"}};function BR(e){return function t(){for(var i=this,n=arguments.length,r=new Array(n),s=0;s<n;s++)r[s]=arguments[s];return r.length>=e.length?e.apply(this,r):function(){for(var a=arguments.length,l=new Array(a),o=0;o<a;o++)l[o]=arguments[o];return t.apply(i,[].concat(r,l))}}}function FR(e){return{}.toString.call(e).includes("Object")}function zR(e){return e||dp("configIsRequired"),FR(e)||dp("configType"),e.urls?(UR(),{paths:{vs:e.urls.monacoBase}}):e}function UR(){console.warn(sb.deprecation)}function WR(e,t){throw new Error(e[t]||e.default)}var sb={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
|
|
60
|
-
You are using deprecated way of configuration.
|
|
61
|
-
|
|
62
|
-
Instead of using
|
|
63
|
-
monaco.config({ urls: { monacoBase: '...' } })
|
|
64
|
-
use
|
|
65
|
-
monaco.config({ paths: { vs: '...' } })
|
|
66
|
-
|
|
67
|
-
For more please check the link https://github.com/suren-atoyan/monaco-loader#config
|
|
68
|
-
`},dp=BR(WR)(sb),jR={config:zR},KR=function(){for(var t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];return function(r){return i.reduceRight(function(s,a){return a(s)},r)}};function ab(e,t){return Object.keys(t).forEach(function(i){t[i]instanceof Object&&e[i]&&Object.assign(t[i],ab(e[i],t[i]))}),op(op({},e),t)}var qR={type:"cancelation",msg:"operation is manually canceled"};function uu(e){var t=!1,i=new Promise(function(n,r){e.then(function(s){return t?r(qR):n(s)}),e.catch(r)});return i.cancel=function(){return t=!0},i}var GR=["monaco"],YR=DR.create({config:ZR,isInitialized:!1,resolve:null,reject:null,monaco:null}),lb=wR(YR,2),i0=lb[0],y1=lb[1];function XR(e){var t=jR.config(e),i=t.monaco,n=bR(t,GR);y1(function(r){return{config:ab(r.config,n),monaco:i}})}function JR(){var e=i0(function(t){var i=t.monaco,n=t.isInitialized,r=t.resolve;return{monaco:i,isInitialized:n,resolve:r}});if(!e.isInitialized){if(y1({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),uu(du);if(window.monaco&&window.monaco.editor)return ob(window.monaco),e.resolve(window.monaco),uu(du);KR(QR,tV)(iV)}return uu(du)}function QR(e){return document.body.appendChild(e)}function eV(e){var t=document.createElement("script");return e&&(t.src=e),t}function tV(e){var t=i0(function(n){var r=n.config,s=n.reject;return{config:r,reject:s}}),i=eV("".concat(t.config.paths.vs,"/loader.js"));return i.onload=function(){return e()},i.onerror=t.reject,i}function iV(){var e=i0(function(i){var n=i.config,r=i.resolve,s=i.reject;return{config:n,resolve:r,reject:s}}),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],function(i){var n=i.m||i;ob(n),e.resolve(n)},function(i){e.reject(i)})}function ob(e){i0().monaco||y1({monaco:e})}function nV(){return i0(function(e){var t=e.monaco;return t})}var du=new Promise(function(e,t){return y1({resolve:e,reject:t})}),cb={config:XR,init:JR,__getMonacoInstance:nV};const rV={key:0,class:"monaco-skeleton"},sV=Ne({__name:"MonacoJsonEditor",props:{modelValue:{},height:{}},emits:["update:modelValue"],setup(e,{emit:t}){const i=e,n=t,{resolved:r}=c1(),s=K(null),a=zn(null),l=K(!1);let o=!1;return nt(async()=>{const c=await cb.init();s.value&&(Ve(r,u=>c.editor.setTheme(u==="dark"?"vs-dark":"vs")),a.value=c.editor.create(s.value,{value:i.modelValue,language:"json",theme:r.value==="dark"?"vs-dark":"vs",fontSize:12,fontFamily:'"MesloLGS NF", monospace',minimap:{enabled:!1},scrollBeyondLastLine:!1,lineNumbers:"off",wordWrap:"on",automaticLayout:!0,tabSize:2,folding:!1,renderLineHighlight:"none",overviewRulerLanes:0,scrollbar:{verticalScrollbarSize:6}}),a.value.onDidChangeModelContent(()=>{o||n("update:modelValue",a.value.getValue())}),l.value=!0)}),ri(()=>{var c;(c=a.value)==null||c.dispose()}),Ve(()=>i.modelValue,c=>{if(!a.value)return;a.value.getValue()!==c&&(o=!0,a.value.setValue(c),o=!1)}),(c,u)=>(m(),M("div",{style:mi({height:`${e.height??220}px`,width:"100%",position:"relative"})},[b("div",{ref_key:"containerEl",ref:s,style:{height:"100%",width:"100%"}},null,512),l.value?V("",!0):(m(),M("div",rV))],4))}}),hp=zt(sV,[["__scopeId","data-v-0c34d464"]]),aV={class:"pcf-root"},lV={key:1,class:"pcf-no-schema"},oV=Ne({__name:"PluginConfigForm",props:{hbSchema:{},modelValue:{}},emits:["update:modelValue"],setup(e,{emit:t}){const i=e,n=t;function r(d,h){const f=JSON.parse(JSON.stringify(i.modelValue));let v=f;for(let p=0;p<d.length-1;p++)(v[d[p]]===void 0||typeof v[d[p]]!="object")&&(v[d[p]]={}),v=v[d[p]];v[d[d.length-1]]=h,n("update:modelValue",f)}function s(d){let h=i.modelValue;for(const f of d){if(h==null||typeof h!="object")return;h=h[f]}return h}function a(d){return Array.isArray(d.type)?d.type[0]:d.type??"string"}function l(d,h){const f=s(d)??[],v=h.default??(a(h)==="string"?"":a(h)==="number"?0:"");r(d,[...f,v])}function o(d,h){const f=[...s(d)??[]];f.splice(h,1),r(d,f)}function c(d,h,f){const v=[...s(d)??[]];v[h]=f,r(d,v)}const u=q(()=>i.hbSchema.schema??{type:"object",properties:{}});return(d,h)=>{const f=wo("PluginConfigField");return m(),M("div",aV,[u.value.properties?(m(!0),M(Ce,{key:0},Fe(u.value.properties,(v,p)=>{var w;return m(),he(f,{key:p,"field-key":String(p),field:v,path:[String(p)],required:((w=u.value.required)==null?void 0:w.includes(String(p)))??!1,value:s([String(p)]),onChange:_=>r([String(p)],_),onAddArray:h[0]||(h[0]=(_,y)=>l(_,y)),onRemoveArray:h[1]||(h[1]=(_,y)=>o(_,y)),onUpdateArray:h[2]||(h[2]=(_,y,C)=>c(_,y,C))},null,8,["field-key","field","path","required","value","onChange"])}),128)):(m(),M("div",lV,"No configurable fields found in schema."))])}}}),cV=zt(oV,[["__scopeId","data-v-d9cf6b0f"]]),uV={key:0,class:"inspector nb-inspector"},dV={class:"inspector-header"},hV={class:"inspector-title"},fV={class:"inspector-name"},pV={class:"inspector-version"},_V={class:"inspector-body"},mV={class:"field-value"},vV={class:"field-value"},gV={class:"hap-bridge-info"},bV={class:"hap-qr"},yV=["src"],wV={class:"hap-details"},SV={class:"field-value mono"},CV={class:"field-value"},kV={class:"field-value"},AV={key:0,class:"setup-loading"},MV={key:0,class:"platform-tabs"},$V=["onClick"],LV={key:1,class:"visual-editor-wrap"},EV={key:0,class:"json-error"},xV={key:1,class:"json-error"},HV={key:3,class:"save-error"},TV={class:"setup-actions"},NV={key:0,class:"json-error"},PV={key:0,class:"save-error"},OV={class:"setup-actions"},IV={class:"import-export-row"},RV={class:"plugin-device-name"},VV={class:"plugin-device-type"},DV={class:"field-value"},ZV={class:"field-value"},BV={class:"field-value"},FV={class:"field-value"},zV={class:"error-text"},UV={class:"plog-time"},WV={class:"plog-msg"},fp="openbridge.pluginInspector.sections",jV=Ne({__name:"PluginInspector",setup(e){const t=Kr(),i=K(!1),n=K("");async function r(){if(!i.value){i.value=!0;try{await Re.daemon.restart();let P=0;const R=setInterval(async()=>{P++;try{await Re.health(),clearInterval(R),location.reload()}catch{}P>60&&(clearInterval(R),i.value=!1)},1e3)}catch{i.value=!1}}}const s=Qo(),a=[{id:"visual",label:"Visual",icon:"sliders"},{id:"json",label:"JSON",icon:"brackets-curly"}],l={status:"default",hap:"default",update:"default",manage:"collapsed",config:"default",transfer:"collapsed",devices:"default",manifest:"collapsed",error:"default",logs:"default"},o=K({...l});try{const P=JSON.parse(localStorage.getItem(fp)??"{}");o.value={...l,...P}}catch{}Ve(o,P=>localStorage.setItem(fp,JSON.stringify(P)),{deep:!0}),Ve(()=>{var P,R;return(R=(P=s.selectedPlugin)==null?void 0:P.hapBridge)==null?void 0:R.setupURI},async P=>{if(P)try{n.value=await Wa.toDataURL(P,{width:160,margin:1})}catch{n.value=""}else n.value=""},{immediate:!0});const c=q(()=>{const P=s.selectedPlugin;return P!=null&&P.devices?Object.values(P.devices):[]}),u={switch:"plugs",light:"lamp",thermostat:"thermometer",dehumidifier:"drop",energy_meter:"lightning",gate:"garage",sensor:"pulse"};function d(P){return u[P]??"cube"}const h={idle:"Idle",loading:"Loading",running:"Running",stopped:"Stopped",error:"Error"},f=K(!1);async function v(){if(!(!s.selectedPlugin||f.value)){f.value=!0;try{await Re.marketplace.update(s.selectedPlugin.manifest.name),await t.fetchPlugins(),await r()}catch(P){console.error("Failed to update plugin:",P)}finally{f.value=!1}}}const p=K(!1),w=K(!1);async function _(){if(!(!s.selectedPlugin||w.value)){w.value=!0;try{await Re.marketplace.uninstall(s.selectedPlugin.manifest.name),await t.fetchPlugins(),s.close(),await Re.daemon.restart()}catch(P){console.error("Failed to remove plugin:",P)}finally{w.value=!1,p.value=!1}}}const y=K(!1);async function C(){if(!s.selectedPlugin||y.value)return;const P=!s.selectedPlugin.disabled;y.value=!0;try{const R=await Re.setPluginDisabled(s.selectedPlugin.id,P);s.selectedPlugin.disabled=R.disabled}catch(R){console.error("Failed to toggle plugin disabled state:",R)}finally{y.value=!1}}const g=K(null),$=K(!1),E=K(""),L=K(""),B=K(!1),T=K(null),X=K(!1),W=K(null),A=K({}),x=K("visual"),F=q(()=>{var P;return((P=W.value)==null?void 0:P.schema)!=null}),ie=q(()=>{var P;return((P=s.selectedPlugin)==null?void 0:P.source)==="homebridge"}),re=q(()=>s.selectedPlugin!=null&&s.selectedPlugin.source!=="homebridge"),ue=K(""),J=K(!1),ae=K(null),ne=K(!1),Q=q(()=>{try{return JSON.parse(ue.value),!0}catch{return!1}});Ve(()=>s.selectedPlugin,async P=>{if(ue.value="",ae.value=null,ne.value=!1,!(!P||P.source==="homebridge"))try{const R=await Re.config.getPlugin(P.manifest.name);ue.value=JSON.stringify(R.config??{},null,2)}catch{ue.value="{}"}});const oe=K(null);function ve(){var P;(P=oe.value)==null||P.click()}function fe(){if(!s.selectedPlugin)return;const P=s.selectedPlugin.manifest.name,R=ie.value?L.value:ue.value;if(!R)return;const I=new Blob([R],{type:"application/json"}),z=URL.createObjectURL(I),Y=document.createElement("a");Y.href=z,Y.download=`${P.replace(/[^a-z0-9-]/gi,"-")}-config.json`,Y.click(),URL.revokeObjectURL(z)}async function pe(P){var I;const R=(I=P.target.files)==null?void 0:I[0];if(!(!R||!s.selectedPlugin))try{const z=await R.text(),Y=JSON.parse(z);let Se;if(Y.platform&&typeof Y.platform=="string"){const{plugin:Me,...De}=Y;Se=De}else Se=Y;await Re.config.savePlugin(s.selectedPlugin.manifest.name,Se),ie.value?L.value=JSON.stringify(Se,null,2):ue.value=JSON.stringify(Se,null,2),oe.value&&(oe.value.value="")}catch(z){console.error("Import failed:",z)}}async function ye(){if(J.value||!s.selectedPlugin)return;let P;try{P=JSON.parse(ue.value)}catch{ae.value="Invalid JSON: fix the syntax first";return}J.value=!0,ae.value=null,ne.value=!1;try{await Re.config.savePlugin(s.selectedPlugin.manifest.name,P),ne.value=!0,setTimeout(()=>{ne.value=!1},3e3)}catch(R){ae.value=String(R)}finally{J.value=!1}}const U=q(()=>{const P=s.selectedPlugin;return!P||P.source!=="homebridge"?"":P.platformName??P.id??P.manifest.name});Ve(()=>s.selectedPlugin,async P=>{if(g.value=null,E.value="",L.value="",W.value=null,A.value={},T.value=null,X.value=!1,!(!P||P.source!=="homebridge")){$.value=!0;try{const R=await Re.config.getHbPlugin(U.value,P.packageName);if(R.config){E.value=U.value,L.value=JSON.stringify(R.config,null,2),A.value=R.config,await _e(P.manifest.name);return}const I=await Re.pluginInfo(P.packageName??P.manifest.name);g.value=I,I.platforms.length>0&&await ge(I.platforms[0],I.mainFile),await _e(P.manifest.name)}catch{try{const R=await Re.config.getHbPlugin(U.value,P.packageName);R.config&&(E.value=U.value,L.value=JSON.stringify(R.config,null,2),A.value=R.config)}catch{}}finally{$.value=!1}}});async function _e(P){try{const R=await fetch(`/api/marketplace/plugin-schema/${encodeURIComponent(P)}`);if(R.ok){const I=await R.json();W.value=I.schema}}catch{}}async function ge(P,R){var I,z;E.value=P;try{const Y=await Re.config.getPlatform(P),Se=Y.config?Y.config:{platform:P,plugin:R??((I=g.value)==null?void 0:I.mainFile)??""};L.value=JSON.stringify(Se,null,2),A.value=Se}catch{const Y={platform:P,plugin:R??((z=g.value)==null?void 0:z.mainFile)??""};L.value=JSON.stringify(Y,null,2),A.value=Y}}function se(P){A.value=P,L.value=JSON.stringify(P,null,2)}function H(P){L.value=P;try{A.value=JSON.parse(P)}catch{}}function N(){try{return JSON.parse(L.value)}catch{return null}}const O=q(()=>N()!==null),te=q(()=>{const P=N();return P!==null&&typeof P.platform!="string"}),ee=K([]),me=K(null);let we=null;function S(){if(we&&(we.close(),we=null),!s.selectedPlugin)return;const P=location.protocol==="https:"?"wss:":"ws:";we=new WebSocket(`${P}//${location.host}/ws/logs`),we.onmessage=R=>{var I,z;try{const Y=JSON.parse(R.data);(Y.plugin===((I=s.selectedPlugin)==null?void 0:I.id)||Y.plugin===((z=s.selectedPlugin)==null?void 0:z.manifest.name))&&(ee.value=[...ee.value.slice(-199),Y],setTimeout(()=>{me.value&&(me.value.scrollTop=me.value.scrollHeight)},10))}catch{}},we.onclose=()=>{s.selectedPlugin&&setTimeout(S,3e3)}}Ve(()=>s.selectedPlugin,async P=>{if(ee.value=[],we==null||we.close(),we=null,!!P){try{const R=await Re.logs(P.manifest.name,100);ee.value=R.entries,setTimeout(()=>{me.value&&(me.value.scrollTop=me.value.scrollHeight)},20)}catch{}S()}}),nt(()=>{s.selectedPlugin&&S()}),ri(()=>{we==null||we.close()});const k={debug:"var(--nb-c-text-muted)",info:"var(--nb-c-info)",warn:"var(--nb-c-warning)",error:"var(--nb-c-danger)"};async function D(){if(B.value||!s.selectedPlugin)return;const P=N();if(!P){T.value="Invalid JSON: fix the syntax first";return}B.value=!0,T.value=null,X.value=!1;try{const R=s.selectedPlugin;R.source==="homebridge"?await Re.config.saveHbPlugin(U.value,P,R.packageName):await Re.config.savePlugin(R.manifest.name,P),X.value=!0,setTimeout(()=>{X.value=!1},3e3)}catch(R){T.value=String(R)}finally{B.value=!1}}return(P,R)=>{const I=Ue,z=r2,Y=o1,Se=S2,Me=Pt,De=ks,Xe=vN;return de(s).selectedPlugin?(m(),M("div",uV,[b("div",dV,[b("div",{class:Le(["inspector-avatar",de(s).selectedPlugin.status])},[j(I,{name:de(bs),size:24},null,8,["name"])],2),b("div",hV,[b("h2",fV,Z(de(s).selectedPlugin.manifest.name),1),b("span",pV,"v"+Z(de(s).selectedPlugin.manifest.version),1)])]),b("div",_V,[j(Se,{size:o.value.status,"onUpdate:size":R[0]||(R[0]=Te=>o.value.status=Te),title:"Status",fluid:""},{default:G(()=>[j(z,{label:"Status",control:"fit"},{default:G(()=>[b("span",{class:Le(["status-badge",de(s).selectedPlugin.status])},Z(h[de(s).selectedPlugin.status]),3)]),_:1}),de(s).selectedPlugin.startedAt?(m(),he(z,{key:0,label:"Started",control:"fit"},{default:G(()=>[b("span",mV,Z(new Date(de(s).selectedPlugin.startedAt).toLocaleString()),1)]),_:1})):V("",!0),de(s).selectedPlugin.stoppedAt?(m(),he(z,{key:1,label:"Stopped",control:"fit"},{default:G(()=>[b("span",vV,Z(new Date(de(s).selectedPlugin.stoppedAt).toLocaleString()),1)]),_:1})):V("",!0),j(z,{label:"Disabled",control:"fit"},{default:G(()=>[j(Y,{name:`plugin-disabled-${de(s).selectedPlugin.id}`,"model-value":de(s).selectedPlugin.disabled??!1,disabled:y.value,"onUpdate:modelValue":C},null,8,["name","model-value","disabled"])]),_:1})]),_:1},8,["size"]),de(s).selectedPlugin.hapBridge?(m(),he(Se,{key:0,size:o.value.hap,"onUpdate:size":R[1]||(R[1]=Te=>o.value.hap=Te),title:"HomeKit pairing",fluid:""},{default:G(()=>[b("div",gV,[b("div",bV,[n.value?(m(),M("img",{key:0,src:n.value,alt:"HomeKit QR Code",class:"hap-qr-img"},null,8,yV)):V("",!0)]),b("div",wV,[j(z,{label:"PIN",control:"fit"},{default:G(()=>[b("span",SV,Z(de(s).selectedPlugin.hapBridge.pincode),1)]),_:1}),j(z,{label:"Port",control:"fit"},{default:G(()=>[b("span",CV,Z(de(s).selectedPlugin.hapBridge.port),1)]),_:1}),j(z,{label:"Bridge",control:"fit"},{default:G(()=>[b("span",kV,Z(de(s).selectedPlugin.hapBridge.name),1)]),_:1})])]),R[15]||(R[15]=b("p",{class:"hap-hint"},"Scan with the Home app or enter the PIN manually to pair this plugin's devices.",-1))]),_:1},8,["size"])):V("",!0),de(s).selectedPlugin.availableUpdate?(m(),he(Se,{key:1,size:o.value.update,"onUpdate:size":R[2]||(R[2]=Te=>o.value.update=Te),title:"Update",fluid:""},{default:G(()=>[j(De,{status:"info",icon:$2,title:`Version ${de(s).selectedPlugin.availableUpdate} is available`},{action:G(()=>[j(Me,{variant:"primary",size:"sm",loading:f.value,disabled:f.value,onClick:v},{default:G(()=>[le(Z(f.value?"Updating...":"Update"),1)]),_:1},8,["loading","disabled"])]),default:G(()=>[le(" Currently on "+Z(de(s).selectedPlugin.manifest.version)+". ",1)]),_:1},8,["title"])]),_:1},8,["size"])):V("",!0),j(Se,{size:o.value.manage,"onUpdate:size":R[5]||(R[5]=Te=>o.value.manage=Te),title:"Manage",fluid:""},{default:G(()=>[p.value?(m(),he(De,{key:1,status:"error",title:"This uninstalls the plugin and removes its configuration"},{action:G(()=>[j(Me,{variant:"ghost",size:"sm",onClick:R[4]||(R[4]=Te=>p.value=!1)},{default:G(()=>[...R[17]||(R[17]=[le("Cancel",-1)])]),_:1}),j(Me,{variant:"primary",size:"sm",loading:w.value,style:{background:"var(--nb-c-danger)","border-color":"var(--nb-c-danger)"},onClick:_},{default:G(()=>[...R[18]||(R[18]=[le(" Remove ",-1)])]),_:1},8,["loading"])]),default:G(()=>[R[19]||(R[19]=le(" OpenBridge needs a restart afterwards. ",-1))]),_:1})):(m(),he(Me,{key:0,variant:"ghost",size:"sm",icon:C2,style:{color:"var(--nb-c-danger)"},onClick:R[3]||(R[3]=Te=>p.value=!0)},{default:G(()=>[...R[16]||(R[16]=[le(" Remove plugin ",-1)])]),_:1}))]),_:1},8,["size"]),ie.value?(m(),he(Se,{key:2,size:o.value.config,"onUpdate:size":R[7]||(R[7]=Te=>o.value.config=Te),title:"Platform config",fluid:""},{default:G(()=>[$.value?(m(),M("div",AV,[j(I,{name:de(ra),size:14},null,8,["name"]),R[20]||(R[20]=le(" Loading config… ",-1))])):(m(),M(Ce,{key:1},[g.value&&g.value.platforms.length>1?(m(),M("div",MV,[(m(!0),M(Ce,null,Fe(g.value.platforms,Te=>(m(),M("button",{key:Te,class:Le(["platform-tab",{active:E.value===Te}]),onClick:rt=>ge(Te)},Z(Te),11,$V))),128))])):g.value&&g.value.platforms.length===0?(m(),he(De,{key:1,status:"warning",variant:"callout",title:"No platform detected"},{default:G(()=>[...R[21]||(R[21]=[le(" Add a ",-1),b("code",null,"platforms[]",-1),le(" entry manually in Config. ",-1)])]),_:1})):V("",!0),!g.value||g.value.platforms.length>0?(m(),M(Ce,{key:2},[F.value?(m(),he(Xe,{key:0,"model-value":x.value,items:a,variant:"contained",size:"sm","onUpdate:modelValue":R[6]||(R[6]=Te=>x.value=Te)},null,8,["model-value"])):V("",!0),x.value==="visual"&&F.value?(m(),M("div",LV,[j(cV,{"hb-schema":W.value,"model-value":A.value,"onUpdate:modelValue":se},null,8,["hb-schema","model-value"])])):V("",!0),x.value==="json"||!F.value?(m(),M("div",{key:2,class:Le(["config-editor-wrap",{invalid:L.value&&!O.value}])},[j(hp,{"model-value":L.value,height:220,"onUpdate:modelValue":H},null,8,["model-value"]),L.value&&!O.value?(m(),M("div",EV,"Invalid JSON")):te.value?(m(),M("div",xV,'Missing "platform" field')):V("",!0)],2)):V("",!0),T.value?(m(),M("div",HV,[j(I,{name:de(xn),size:13},null,8,["name"]),le(" "+Z(T.value),1)])):V("",!0),b("div",TV,[j(Me,{variant:"primary",size:"sm",loading:B.value,disabled:B.value||!O.value||te.value,icon:X.value?dr:Hc,onClick:D},{default:G(()=>[le(Z(X.value?"Saved!":"Save config"),1)]),_:1},8,["loading","disabled","icon"]),X.value?(m(),he(Me,{key:0,variant:"secondary",size:"sm",outlined:"",loading:i.value,icon:i.value?Vo:_s,onClick:r},{default:G(()=>[le(Z(i.value?"Restarting…":"Restart OpenBridge"),1)]),_:1},8,["loading","icon"])):V("",!0)])],64)):V("",!0)],64))]),_:1},8,["size"])):V("",!0),re.value?(m(),he(Se,{key:3,size:o.value.config,"onUpdate:size":R[9]||(R[9]=Te=>o.value.config=Te),title:"Plugin config",fluid:""},{default:G(()=>[b("div",{class:Le(["config-editor-wrap",{invalid:ue.value&&!Q.value}])},[j(hp,{"model-value":ue.value,height:220,"onUpdate:modelValue":R[8]||(R[8]=Te=>ue.value=Te)},null,8,["model-value"]),ue.value&&!Q.value?(m(),M("div",NV,"Invalid JSON")):V("",!0)],2),ae.value?(m(),M("div",PV,[j(I,{name:de(xn),size:13},null,8,["name"]),le(" "+Z(ae.value),1)])):V("",!0),b("div",OV,[j(Me,{variant:"primary",size:"sm",loading:J.value,disabled:J.value||!Q.value,icon:ne.value?dr:Hc,onClick:ye},{default:G(()=>[le(Z(ne.value?"Saved!":"Save config"),1)]),_:1},8,["loading","disabled","icon"]),ne.value?(m(),he(Me,{key:0,variant:"secondary",size:"sm",outlined:"",loading:i.value,icon:i.value?Vo:_s,onClick:r},{default:G(()=>[le(Z(i.value?"Restarting…":"Restart OpenBridge"),1)]),_:1},8,["loading","icon"])):V("",!0)])]),_:1},8,["size"])):V("",!0),j(Se,{size:o.value.transfer,"onUpdate:size":R[10]||(R[10]=Te=>o.value.transfer=Te),title:"Import & export",fluid:""},{default:G(()=>[b("div",IV,[j(Me,{variant:"ghost",size:"sm",icon:yI,onClick:fe},{default:G(()=>[...R[22]||(R[22]=[le("Export config",-1)])]),_:1}),j(Me,{variant:"ghost",size:"sm",icon:$I,onClick:ve},{default:G(()=>[...R[23]||(R[23]=[le("Import config",-1)])]),_:1}),b("input",{ref_key:"importInput",ref:oe,type:"file",accept:".json",style:{display:"none"},onChange:pe},null,544)])]),_:1},8,["size"]),c.value.length>0?(m(),he(Se,{key:4,size:o.value.devices,"onUpdate:size":R[11]||(R[11]=Te=>o.value.devices=Te),title:`Devices (${c.value.length})`,fluid:""},{default:G(()=>[(m(!0),M(Ce,null,Fe(c.value,Te=>(m(),M("div",{key:Te.id,class:"plugin-device-row"},[j(I,{name:d(Te.widgetType),size:14},null,8,["name"]),b("span",RV,Z(Te.name),1),b("span",VV,Z(Te.widgetType),1)]))),128))]),_:1},8,["size","title"])):V("",!0),j(Se,{size:o.value.manifest,"onUpdate:size":R[12]||(R[12]=Te=>o.value.manifest=Te),title:"Manifest",fluid:""},{default:G(()=>[j(z,{label:"Name",control:"fit"},{default:G(()=>[b("span",DV,Z(de(s).selectedPlugin.manifest.name),1)]),_:1}),j(z,{label:"Version",control:"fit"},{default:G(()=>[b("span",ZV,Z(de(s).selectedPlugin.manifest.version),1)]),_:1}),de(s).selectedPlugin.manifest.description?(m(),he(z,{key:0,label:"Description",control:"fit"},{default:G(()=>[b("span",BV,Z(de(s).selectedPlugin.manifest.description),1)]),_:1})):V("",!0),de(s).selectedPlugin.manifest.author?(m(),he(z,{key:1,label:"Author",control:"fit"},{default:G(()=>[b("span",FV,Z(de(s).selectedPlugin.manifest.author),1)]),_:1})):V("",!0)]),_:1},8,["size"]),de(s).selectedPlugin.error?(m(),he(Se,{key:5,size:o.value.error,"onUpdate:size":R[13]||(R[13]=Te=>o.value.error=Te),title:"Error",fluid:""},{default:G(()=>[j(De,{status:"error"},{default:G(()=>[b("code",zV,Z(de(s).selectedPlugin.error),1)]),_:1})]),_:1},8,["size"])):V("",!0),ee.value.length>0?(m(),he(Se,{key:6,size:o.value.logs,"onUpdate:size":R[14]||(R[14]=Te=>o.value.logs=Te),title:"Recent logs",fluid:""},{default:G(()=>[b("div",{ref_key:"logsEl",ref:me,class:"plugin-log-terminal"},[(m(!0),M(Ce,null,Fe(ee.value,(Te,rt)=>(m(),M("div",{key:rt,class:"plugin-log-line"},[b("span",UV,Z(new Date(Te.timestamp).toLocaleTimeString()),1),b("span",{class:"plog-level",style:mi({color:k[Te.level]})},Z(Te.level.toUpperCase()),5),b("span",WV,Z(Te.message),1)]))),128))],512)]),_:1},8,["size"])):V("",!0)])])):V("",!0)}}}),KV=zt(jV,[["__scopeId","data-v-b8eb965d"]]),qV=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},pp=qV("arrow-square-out","0 0 256 256",'<path d="M224,104a8,8,0,0,1-16,0V59.32l-66.33,66.34a8,8,0,0,1-11.32-11.32L196.68,48H152a8,8,0,0,1,0-16h64a8,8,0,0,1,8,8Zm-40,24a8,8,0,0,0-8,8v72H48V80h72a8,8,0,0,0,0-16H48A16,16,0,0,0,32,80V208a16,16,0,0,0,16,16H176a16,16,0,0,0,16-16V136A8,8,0,0,0,184,128Z"/>'),GV=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},zs=GV("diamond","0 0 256 256",'<path d="M235.33,116.72,139.28,20.66a16,16,0,0,0-22.56,0l-96,96.06a16,16,0,0,0,0,22.56l96.05,96.06h0a16,16,0,0,0,22.56,0l96.05-96.06a16,16,0,0,0,0-22.56ZM128,224h0L32,128,128,32,224,128Z"/>'),YV=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},XV=YV("folder","0 0 256 256",'<path d="M216,72H131.31L104,44.69A15.86,15.86,0,0,0,92.69,40H40A16,16,0,0,0,24,56V200.62A15.4,15.4,0,0,0,39.38,216H216.89A15.13,15.13,0,0,0,232,200.89V88A16,16,0,0,0,216,72ZM40,56H92.69l16,16H40ZM216,200H40V88H216Z"/>'),JV=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},QV=JV("cloud-arrow-down","0 0 256 256",'<path d="M248,128a87.34,87.34,0,0,1-17.6,52.81,8,8,0,1,1-12.8-9.62A71.34,71.34,0,0,0,232,128a72,72,0,0,0-144,0,8,8,0,0,1-16,0,88,88,0,0,1,3.29-23.88C74.2,104,73.1,104,72,104a48,48,0,0,0,0,96H96a8,8,0,0,1,0,16H72A64,64,0,1,1,81.29,88.68,88,88,0,0,1,248,128Zm-69.66,42.34L160,188.69V128a8,8,0,0,0-16,0v60.69l-18.34-18.35a8,8,0,0,0-11.32,11.32l32,32a8,8,0,0,0,11.32,0l32-32a8,8,0,0,0-11.32-11.32Z"/>'),eD=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},tD=eD("star","0 0 256 256",'<path d="M234.29,114.85l-45,38.83L203,211.75a16.4,16.4,0,0,1-24.5,17.82L128,198.49,77.47,229.57A16.4,16.4,0,0,1,53,211.75l13.76-58.07-45-38.83A16.46,16.46,0,0,1,31.08,86l59-4.76,22.76-55.08a16.36,16.36,0,0,1,30.27,0l22.75,55.08,59,4.76a16.46,16.46,0,0,1,9.37,28.86Z"/>'),iD=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},ub=iD("book-open","0 0 256 256",'<path d="M232,48H160a40,40,0,0,0-32,16A40,40,0,0,0,96,48H24a8,8,0,0,0-8,8V200a8,8,0,0,0,8,8H96a24,24,0,0,1,24,24,8,8,0,0,0,16,0,24,24,0,0,1,24-24h72a8,8,0,0,0,8-8V56A8,8,0,0,0,232,48ZM96,192H32V64H96a24,24,0,0,1,24,24V200A39.81,39.81,0,0,0,96,192Zm128,0H160a39.81,39.81,0,0,0-24,8V88a24,24,0,0,1,24-24h64Z"/>');let nD=0;function rD(){return`notif-${Date.now()}-${++nD}`}function N2(){const e=$g();function t(i,n,r){e.add({id:rD(),variant:i,message:n,title:r==null?void 0:r.title,duration:(r==null?void 0:r.duration)??(i==="error"?6e3:3200)})}return{success:(i,n)=>t("success",i,n),error:(i,n)=>t("error",i,n),warning:(i,n)=>t("warning",i,n),info:(i,n)=>t("info",i,n),dismiss:i=>e.remove(i),clear:()=>e.clear()}}const sD={class:"mp-panel"},aD={class:"mp-header"},lD={class:"mp-search-wrap"},oD={key:0,class:"mp-count"},cD={key:3,class:"mp-local-section"},uD={class:"mp-local-heading"},dD={class:"mp-avatar mp-avatar--ob"},hD={class:"mp-info"},fD={class:"mp-name-row"},pD={class:"mp-name"},_D={class:"badge badge--native"},mD={class:"badge badge--local"},vD={class:"mp-ver"},gD={key:0,class:"mp-desc"},bD={class:"mp-meta"},yD={key:0},wD={class:"mp-action"},SD={class:"mp-list"},CD={key:0,class:"mp-loading"},kD=["src","alt"],AD={class:"mp-info"},MD={class:"mp-name-row"},$D={class:"mp-name"},LD={class:"mp-ver"},ED={key:0,class:"mp-desc"},xD={class:"mp-meta"},HD={key:0},TD={key:1,class:"mp-sep"},ND={class:"mp-enriched"},PD={key:0,class:"mp-stat"},OD={key:1,class:"mp-stat"},ID=["href"],RD=["href"],VD=["href"],DD={class:"mp-action"},ZD={key:1,class:"mp-load-more-wrap"},BD="https://marketplace.openbridge.nubisco.io",FD=20,zD="https://marketplace.openbridge.nubisco.io/api",UD=Ne({__name:"MarketplacePanel",setup(e){const t=Kr(),i=N2(),n=K(null),r=K(""),s=K([]),a=K(0),l=K(!1),o=K(null),c=K(null),u=K(new Map),d=K(null),h=K(0),f=K([]);function v(W){return{name:W.name,version:W.version,description:W.description??"",author:W.author?{name:W.author}:void 0,date:W.last_published_at,weeklyDownloads:W.weekly_downloads,githubStars:W.github_stars??void 0,githubSponsorsUrl:W.github_sponsors_url??void 0,documentationUrl:W.homepage??void 0,links:{npm:W.npm_url,homepage:W.homepage??void 0,repository:W.repository_url??void 0}}}function p(W){return W?W>=1e6?`${(W/1e6).toFixed(1)}M`:W>=1e3?`${(W/1e3).toFixed(1)}K`:W.toString():"0"}async function w(W=!0){W&&(h.value=0,s.value=[]),l.value=!0,o.value=null;try{const A=h.value+1,x=new URLSearchParams({q:r.value,page:String(A),limit:String(FD)}),F=await fetch(`${zD}/plugins?${x}`);if(!F.ok)throw new Error(`Marketplace API error: ${F.status}`);const ie=await F.json(),re=ie.plugins.map(v);s.value=W?re:[...s.value,...re],a.value=ie.total}catch(A){o.value=String(A)}finally{l.value=!1}}async function _(W){if(!c.value){c.value=W.name,o.value=null;try{const A=await Re.marketplace.install(W.name);u.value.set(W.name,A.mainFile),d.value={name:W.name,mainFile:A.mainFile},await Re.pluginsRefresh(),await t.fetchPlugins(),i.success(`Installed ${W.name}`)}catch(A){o.value=`Failed to install ${W.name}: ${A}`,i.error(`Failed to install ${W.name}`)}finally{c.value=null}}}async function y(W){if(!n.value){n.value=W,o.value=null;try{await Re.marketplace.uninstall(W),u.value.delete(W),await t.fetchPlugins(),i.success(`Removed ${W}`)}catch(A){o.value=`Failed to uninstall ${W}: ${A}`,i.error(`Failed to remove ${W}`)}finally{n.value=null}}}async function C(W){if(!(c.value||!W.platform)){c.value=W.name,o.value=null;try{await Re.config.savePlugin(W.name,{platform:W.platform}),u.value.set(W.name,`${W.path}/dist/index.js`),d.value={name:W.name,mainFile:`${W.path}/dist/index.js`},await t.fetchPlugins(),i.success(`Activated ${W.name}`)}catch(A){o.value=`Failed to activate ${W.name}: ${A}`,i.error(`Failed to activate ${W.name}`)}finally{c.value=null}}}function g(W){var F,ie;const x=(((F=W.links)==null?void 0:F.repository)??((ie=W.links)==null?void 0:ie.homepage)??"").match(/github\.com\/([^/]+)/);return x?`https://github.com/${x[1]}.png?size=48`:null}function $(W){return W.name.includes("openbridge-")||Array.isArray(W.badges)&&W.badges.includes("openbridge-plugin")}function E(W){return W.author?typeof W.author=="string"?W.author:W.author.name??"":""}function L(W){const A=Math.floor((Date.now()-new Date(W).getTime())/864e5);return A===0?"today":A<30?`${A}d ago`:A<365?`${Math.floor(A/30)}mo ago`:`${Math.floor(A/365)}y ago`}function B(){h.value++,w(!1)}let T=null;function X(){T&&clearTimeout(T),T=setTimeout(()=>w(),350)}return nt(async()=>{try{const W=await Re.marketplace.installed();for(const A of W.packages)u.value.set(A.name,A.mainFile)}catch{}try{const W=await Re.marketplace.local();f.value=W.plugins}catch{}w()}),(W,A)=>{const x=Ue,F=Wr,ie=ks,re=at,ue=Pt,J=Ss;return m(),M("div",sD,[b("div",aD,[A[4]||(A[4]=b("span",{class:"mp-title"},"Browse Plugins",-1)),b("a",{class:"mp-external",href:BD,target:"_blank",rel:"noopener noreferrer",title:"Open the full marketplace in a new tab"},[j(x,{name:de(pp),size:12},null,8,["name"]),A[3]||(A[3]=le(" Marketplace ",-1))])]),b("div",lD,[j(F,{modelValue:r.value,"onUpdate:modelValue":[A[0]||(A[0]=ae=>r.value=ae),X],placeholder:"Search plugins",size:"sm"},null,8,["modelValue"])]),a.value>0?(m(),M("div",oD,Z(a.value.toLocaleString())+" plugins found",1)):V("",!0),d.value?(m(),he(ie,{key:1,status:"success",dismissible:"",class:"mp-installed-banner",title:`${d.value.name} installed`,onDismiss:A[1]||(A[1]=ae=>d.value=null)},{default:G(()=>[...A[5]||(A[5]=[le(" Click it in your plugins list to configure it. ",-1)])]),_:1},8,["title"])):V("",!0),o.value?(m(),he(re,{key:2,variant:"error"},{default:G(()=>[le(Z(o.value),1)]),_:1})):V("",!0),f.value.length>0?(m(),M("div",cD,[b("div",uD,[j(x,{name:de(zs),size:11},null,8,["name"]),A[6]||(A[6]=le(" Local plugins ",-1))]),(m(!0),M(Ce,null,Fe(f.value,ae=>(m(),he(J,{key:ae.name,class:"mp-row mp-row--ob mp-row--local"},{default:G(()=>[b("div",dD,[j(x,{name:de(zs),size:16},null,8,["name"])]),b("div",hD,[b("div",fD,[b("span",pD,Z(ae.name),1),b("span",_D,[j(x,{name:de(zs),size:9},null,8,["name"]),A[7]||(A[7]=le(" Native ",-1))]),b("span",mD,[j(x,{name:de(XV),size:9},null,8,["name"]),A[8]||(A[8]=le(" Local ",-1))]),b("span",vD,"v"+Z(ae.version),1)]),ae.description?(m(),M("p",gD,Z(ae.description),1)):V("",!0),b("div",bD,[ae.author?(m(),M("span",yD,Z(ae.author),1)):V("",!0)])]),b("div",wD,[u.value.has(ae.name)?(m(),he(ue,{key:0,variant:"ghost",size:"sm",disabled:"",icon:dr},{default:G(()=>[...A[9]||(A[9]=[le("Active",-1)])]),_:1})):(m(),he(ue,{key:1,variant:"primary",size:"sm",loading:c.value===ae.name,disabled:!!c.value||!ae.platform,title:ae.platform?"":"No platform declared in package.json openbridge.platform",onClick:ne=>C(ae)},{default:G(()=>[...A[10]||(A[10]=[le(" Activate ",-1)])]),_:1},8,["loading","disabled","title","onClick"]))])]),_:2},1024))),128))])):V("",!0),b("div",SD,[l.value&&s.value.length===0?(m(),M("div",CD,[j(x,{name:de(ra),size:22},null,8,["name"]),A[11]||(A[11]=b("span",null,"Searching npm…",-1))])):V("",!0),(m(!0),M(Ce,null,Fe(s.value,ae=>(m(),he(J,{key:ae.name,class:Le(["mp-row",{"mp-row--ob":$(ae)}])},{default:G(()=>[b("div",{class:Le(["mp-avatar",{"mp-avatar--ob":$(ae)}])},[g(ae)?(m(),M("img",{key:0,src:g(ae),alt:ae.name,class:"mp-avatar-img",onError:A[2]||(A[2]=ne=>ne.target.style.display="none")},null,40,kD)):V("",!0),$(ae)?(m(),he(x,{key:1,name:de(zs),size:16},null,8,["name"])):(m(),he(x,{key:2,name:de(bs),size:16},null,8,["name"]))],2),b("div",AD,[b("div",MD,[b("span",$D,Z(ae.name),1),b("span",LD,"v"+Z(ae.version),1)]),ae.description?(m(),M("p",ED,Z(ae.description),1)):V("",!0),b("div",xD,[E(ae)?(m(),M("span",HD,Z(E(ae)),1)):V("",!0),E(ae)?(m(),M("span",TD,"·")):V("",!0),b("span",null,Z(L(ae.date)),1)]),b("div",ND,[ae.weeklyDownloads?(m(),M("span",PD,[j(x,{name:de(QV),size:11},null,8,["name"]),le(" "+Z(p(ae.weeklyDownloads)),1)])):V("",!0),ae.githubStars?(m(),M("span",OD,[j(x,{name:de(tD),weight:"fill",size:11},null,8,["name"]),le(" "+Z(p(ae.githubStars)),1)])):V("",!0),ae.githubSponsorsUrl?(m(),M("a",{key:2,href:ae.githubSponsorsUrl,target:"_blank",rel:"noopener",class:"mp-stat mp-stat--link"},[j(x,{name:de(M2),weight:"fill",size:11},null,8,["name"]),A[12]||(A[12]=le(" Sponsor ",-1))],8,ID)):V("",!0),ae.documentationUrl?(m(),M("a",{key:3,href:ae.documentationUrl,target:"_blank",rel:"noopener",class:"mp-stat mp-stat--link"},[j(x,{name:de(ub),size:11},null,8,["name"]),A[13]||(A[13]=le(" Docs ",-1))],8,RD)):V("",!0),b("a",{href:`https://marketplace.openbridge.nubisco.io/plugins/${ae.name}`,target:"_blank",rel:"noopener",class:"mp-stat mp-stat--link mp-stat--marketplace"},[j(x,{name:de(pp),size:11},null,8,["name"]),A[14]||(A[14]=le(" Marketplace ",-1))],8,VD)])]),b("div",DD,[u.value.has(ae.name)?(m(),he(ue,{key:0,variant:"danger",size:"sm",outlined:"",loading:n.value===ae.name,disabled:!!n.value,onClick:ne=>y(ae.name)},{default:G(()=>[...A[15]||(A[15]=[le(" Remove ",-1)])]),_:1},8,["loading","disabled","onClick"])):(m(),he(ue,{key:1,variant:"primary",size:"sm",loading:c.value===ae.name,disabled:!!c.value,onClick:ne=>_(ae)},{default:G(()=>[...A[16]||(A[16]=[le(" Install ",-1)])]),_:1},8,["loading","disabled","onClick"]))])]),_:2},1032,["class"]))),128)),s.value.length>0&&s.value.length<a.value?(m(),M("div",ZD,[j(ue,{variant:"ghost",size:"sm",loading:l.value,disabled:l.value,onClick:B},{default:G(()=>[le(Z(l.value?"Loading…":`Load more (${a.value-s.value.length} remaining)`),1)]),_:1},8,["loading","disabled"])])):V("",!0)])])}}}),WD=zt(UD,[["__scopeId","data-v-789c3f61"]]),jD={key:0,class:"inspector-content nb-inspector"},KD={class:"detail-header"},qD={class:"detail-icon native-icon"},GD={style:{flex:"1","min-width":"0"}},YD={key:1,class:"rename-row"},XD={class:"detail-type"},JD={class:"info-grid"},QD={class:"info-val"},eZ={class:"info-val"},tZ={class:"info-val"},iZ={class:"info-val"},nZ={class:"info-val mono"},rZ={key:0,class:"widget-energy"},sZ={class:"energy-primary"},aZ={class:"energy-value"},lZ={class:"energy-secondary"},oZ={key:0,class:"energy-item"},cZ={class:"energy-item-val"},uZ={key:1,class:"energy-item"},dZ={class:"energy-item-val"},hZ={key:1,class:"widget-thermo"},fZ={class:"thermo-row"},pZ={class:"thermo-value"},_Z={class:"thermo-row"},mZ={class:"thermo-value accent"},vZ={class:"thermo-row"},gZ={key:2,class:"widget-thermo"},bZ={class:"thermo-row"},yZ={class:"thermo-value"},wZ={class:"thermo-row"},SZ={class:"thermo-value accent"},CZ={class:"thermo-row"},kZ={key:3,class:"widget-generic"},AZ={key:0,class:"no-telemetry"},MZ={class:"char-name"},$Z={class:"char-value"},LZ={class:"event-list"},EZ=["title"],xZ={class:"event-body"},HZ={class:"event-message"},TZ={key:0,class:"event-source"},NZ={class:"history-tabs"},PZ=["onClick"],OZ={key:0,class:"history-nav"},IZ={class:"history-nav-center"},RZ={class:"history-total"},VZ={class:"history-date"},DZ={key:2,class:"no-history"},ZZ={key:3,class:"no-history"},BZ={key:4,class:"no-history"},FZ={class:"obs-help"},zZ={class:"obs-form"},UZ={class:"obs-verdicts"},WZ={key:1,class:"obs-list"},jZ={class:"obs-list-head"},KZ={class:"obs-when"},qZ={class:"obs-temp"},GZ={key:0,class:"obs-note"},YZ={class:"calibration-actions"},XZ={class:"char-list"},JZ={class:"char-name"},QZ={class:"char-value"},eB={key:0,class:"homekit-notice"},tB={class:"homekit-row"},iB={key:1,class:"homekit-notice"},nB={class:"detail-header"},rB={class:"detail-icon"},sB={style:{flex:"1","min-width":"0"}},aB={key:1,class:"rename-row"},lB={class:"detail-type"},oB={class:"info-grid"},cB={key:0,class:"info-key"},uB={key:1,class:"info-val"},dB={key:0,class:"homekit-row"},hB={key:1,class:"homekit-notice"},fB={class:"char-list"},pB={class:"char-name"},_B={class:"homekit-row"},mB={key:0,class:"homekit-notice"},vB={class:"detail-uuid"},gB=Ne({__name:"DeviceInspector",setup(e){const t=K(new Set),i=K(!1),n=K("");function r(be){return!t.value.has(be)}async function s(){try{const{hidden:be}=await Re.homekitHidden();t.value=new Set(be)}catch{}}async function a(be,ce){i.value=!0,n.value="";try{const Ie=await Re.setHomekitVisibility(be,ce),Ge=new Set(t.value);ce?Ge.delete(be):Ge.add(be),t.value=Ge,Ie.applied||(n.value="Saved. This takes effect after the next OpenBridge restart.")}catch(Ie){n.value=`Could not change visibility: ${Ie.message}`}finally{i.value=!1}}const l=K({}),o=K([]),c=K(""),u=q(()=>[{value:"",label:"Default (as published)"},...o.value.map(be=>({value:be.key,label:be.label}))]);function d(be){return o.value.some(ce=>ce.serviceUuid===be)}function h(be,ce){var Ie;return((Ie=l.value[be])==null?void 0:Ie[ce])??""}const f=K(null);function v(be){return be.homekitType||be.widgetType}async function p(be){f.value=null;try{const{accessory:ce}=await Re.deviceAccessory(be);f.value=ce}catch{}}async function w(){try{const{overrides:be,available:ce}=await Re.homekitServiceTypes();l.value=be,o.value=ce}catch{}}async function _(be,ce,Ie){i.value=!0,c.value="";try{await Re.setHomekitServiceType(be,ce,Ie||null);const Ge={...l.value},Ke={...Ge[be]??{}};Ie?Ke[ce]=Ie:delete Ke[ce],Object.keys(Ke).length>0?Ge[be]=Ke:delete Ge[be],l.value=Ge,c.value="Saved. This takes effect after the next OpenBridge restart."}catch(Ge){c.value=`Could not change type: ${Ge.message}`}finally{i.value=!1}}nt(()=>{s(),w()});const y=Qo(),C=Sg(),g=K(""),$=K(""),E=K("success"),L=q(()=>{const be=y.selectedDevice;return!be||be.kind!=="native"?null:be.dev.health??null}),B=q(()=>{var ce;const be=(ce=L.value)==null?void 0:ce.lastSeen;return be?`Not responding since ${new Date(be).toLocaleString()}`:"Not responding"}),T=[{id:"cold",label:"Too cold"},{id:"ok",label:"About right"},{id:"warm",label:"Too warm"}],X=K(null),W=K("ok"),A=K(""),x=K(!1),F=K(""),ie=K([]),re=K(0);async function ue(){const be=y.selectedDevice;if(!be||be.kind!=="native"||!be.dev.observations){ie.value=[],re.value=0;return}try{const ce=await Re.deviceObservations(be.dev.id,20);ie.value=ce.observations,re.value=ce.total}catch{}}async function J(){const be=y.selectedDevice;if(!(!be||be.kind!=="native"||X.value===null)){x.value=!0,F.value="";try{await Re.reportObservation(be.dev.id,{roomTemperature:X.value,comfort:W.value,...A.value.trim()?{note:A.value.trim()}:{}}),A.value="",await ue()}catch(ce){F.value=ce instanceof Error?ce.message:String(ce)}finally{x.value=!1}}}Ve(()=>y.selectedDevice,()=>{F.value="",A.value="",ue()},{immediate:!0});const ae=q(()=>{const be=y.selectedDevice;return!be||be.kind!=="native"?[]:be.dev.actions??[]});async function ne(be){const ce=y.selectedDevice;if(!(!ce||ce.kind!=="native")&&!(be.confirm&&!await C({title:be.label,subjectLabel:"Device",subject:ce.dev.name,message:be.confirm,confirmLabel:be.label}))){g.value=be.id,$.value="";try{await Re.controlDevice(ce.dev.id,be.id,!0),E.value="success",$.value=`${be.label} sent.`}catch(Ie){E.value="error",$.value=`${be.label} failed: ${Ie.message}`}finally{g.value=""}}}const Q=q(()=>y.selectedDevice),oe=q(()=>Q.value?Q.value.kind==="native"?Q.value.dev.id:Q.value.acc.uuid:null),ve={1:{label:"Other",icon:"cube"},2:{label:"Bridge",icon:"intersect"},3:{label:"Fan",icon:"fan"},4:{label:"Garage Door",icon:"garage"},5:{label:"Light",icon:"lightbulb"},6:{label:"Lock",icon:"lock"},7:{label:"Outlet",icon:"plugs"},8:{label:"Switch",icon:"toggle-right"},9:{label:"Thermostat",icon:"thermometer"},10:{label:"Sensor",icon:"pulse"},11:{label:"Security",icon:"shield"},12:{label:"Door",icon:"door"},13:{label:"Window",icon:"app-window"},14:{label:"Window Covering",icon:"rows"},15:{label:"Programm. Switch",icon:"sliders"},16:{label:"Range Extender",icon:"broadcast"},17:{label:"Camera",icon:"camera"},18:{label:"Video Doorbell",icon:"bell"},19:{label:"Air Purifier",icon:"wind"},20:{label:"Heater/Cooler",icon:"thermometer-hot"},21:{label:"Air Conditioner",icon:"snowflake"},22:{label:"Humidifier",icon:"drop"},23:{label:"Dehumidifier",icon:"drop"},26:{label:"Speaker",icon:"speaker-high"},28:{label:"Sprinkler",icon:"drop"},29:{label:"Faucet",icon:"drop"},30:{label:"Shower",icon:"drop"},32:{label:"TV",icon:"television"},34:{label:"Router",icon:"broadcast"},36:{label:"Target Control",icon:"game-controller"},38:{label:"Smart Speaker",icon:"speaker-hifi"}};function fe(be){return ve[be]??{label:`Category ${be}`,icon:"cube"}}const pe=new Set(["AccessoryInformation","0000003E-0000-1000-8000-0026BB765291","ProtocolInformation","000000A2-0000-1000-8000-0026BB765291"]);function ye(be){return be.services.filter(ce=>!pe.has(ce.name)&&!pe.has(ce.uuid))}function U(be){return be.services.find(ce=>pe.has(ce.name)||pe.has(ce.uuid))}function _e(be){const ce=U(be);if(!ce)return null;const Ie=Ge=>{var Ke;return(Ke=ce.characteristics.find(Wt=>Wt.name===Ge||Wt.name.includes(Ge)))==null?void 0:Ke.value};return{manufacturer:Ie("Manufacturer")??Ie("Manuf"),model:Ie("Model"),serial:Ie("SerialNumber")??Ie("Serial"),firmware:Ie("FirmwareRevision")??Ie("Firmware")}}function ge(be){return be.value===null||be.value===void 0?"—":be.format==="bool"?be.value?"On":"Off":typeof be.value=="number"?String(Math.round(be.value*100)/100):String(be.value)}function se(be){return be.perms.includes("pw")}const H=K(!1),N=K("");function O(be){N.value=be,H.value=!0}async function te(be){var ce,Ie;if(N.value.trim())try{const Ge=N.value.trim();await Re.renameDevice(be,Ge),H.value=!1,((ce=Q.value)==null?void 0:ce.kind)==="native"?Q.value.dev.name=Ge:((Ie=Q.value)==null?void 0:Ie.kind)==="hap"&&(Q.value.acc.displayName=Ge);const{useDaemonStore:Ke}=await $8(async()=>{const{useDaemonStore:yt}=await Promise.resolve().then(()=>X8);return{useDaemonStore:yt}},void 0);await Ke().fetchAccessories()}catch(Ge){console.error("Rename failed:",Ge)}}async function ee(be,ce,Ie,Ge){try{await Re.setCharacteristic(be,ce,Ie,Ge);const{useDaemonStore:Ke}=await $8(async()=>{const{useDaemonStore:yt}=await Promise.resolve().then(()=>X8);return{useDaemonStore:yt}},void 0);await Ke().fetchAccessories()}catch(Ke){console.error("Failed to set characteristic:",Ke)}}const me=K([]);function we(be){const ce=new Date(be);return Number.isNaN(ce.getTime())?be:new Date().toDateString()===ce.toDateString()?ce.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit",second:"2-digit"}):ce.toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}async function S(){const be=Q.value;if((be==null?void 0:be.kind)!=="native"){me.value=[];return}try{const ce=await Re.deviceEvents(be.dev.id,100);me.value=ce.events}catch{me.value=[]}}const k={switch:"plugs",light:"lightbulb",thermostat:"thermometer",dehumidifier:"drop",energy_meter:"lightning",gate:"garage",sensor:"pulse",camera:"camera"},D={camera:"Camera",switch:"Switch",light:"Light",thermostat:"Thermostat",dehumidifier:"Dehumidifier",energy_meter:"Energy Meter",gate:"Gate",sensor:"Sensor"};function P(be){return k[be]??"cube"}function R(be){return D[be]??be}function I(be,ce=1){if(be==null)return"—";const Ie=Number(be);return isFinite(Ie)?Ie.toFixed(ce):String(be)}function z(be){return Object.entries(be.telemetry).filter(([ce])=>!ce.startsWith("_"))}const Y=K("day"),Se=K(new Date().toISOString().slice(0,10)),Me=K(null),De=K(!1);async function Xe(be){if(!De.value){De.value=!0;try{Me.value=await Re.deviceHistory(be,Y.value,Se.value)}catch{}finally{De.value=!1}}}function Te(be){var Ie;const ce=new Date(Se.value+(Se.value.length<=7?"-01":""));Y.value==="day"?(ce.setDate(ce.getDate()+be),Se.value=ce.toISOString().slice(0,10)):Y.value==="month"?(ce.setMonth(ce.getMonth()+be),Se.value=ce.toISOString().slice(0,7)):(ce.setFullYear(ce.getFullYear()+be),Se.value=String(ce.getFullYear())),((Ie=Q.value)==null?void 0:Ie.kind)==="native"&&Xe(Q.value.dev.id)}Ve(Y,()=>{var ce;const be=new Date;Y.value==="day"?Se.value=be.toISOString().slice(0,10):Y.value==="month"?Se.value=be.toISOString().slice(0,7):Se.value=String(be.getFullYear()),((ce=Q.value)==null?void 0:ce.kind)==="native"&&Q.value.dev.widgetType==="energy_meter"&&Xe(Q.value.dev.id)}),Ve(oe,(be,ce)=>{if(be===ce&&Me.value)return;const Ie=Q.value;(Ie==null?void 0:Ie.kind)==="native"?p(Ie.dev.id):f.value=null,S(),(Ie==null?void 0:Ie.kind)==="native"&&Ie.dev.widgetType==="energy_meter"&&(Se.value=new Date().toISOString().slice(0,10),Y.value="day",Xe(Ie.dev.id))},{immediate:!0});const rt=K([]),It=K([]),un=K(!1),Ut=K(!1),Rt=K(!1),vn=q(()=>JSON.stringify(rt.value)!==JSON.stringify(It.value)),gn=q(()=>!Q.value||Q.value.kind!=="native"?null:Q.value.dev);async function xl(be){const{plugins:ce}=await Re.plugins(),Ie=ce.find(Ke=>Ke.id===be.pluginId);if(!Ie)return null;if(Ie.source!=="homebridge"){const{config:Ke}=await Re.config.getPlugin(be.pluginId);return Ke?{pluginConfig:Ke,isNative:!0,pluginName:be.pluginId,platformName:void 0}:null}else{const Ke=Ie.platformName??be.pluginId,{config:Wt}=await Re.config.getPlatform(Ke);return Wt?{pluginConfig:Wt,isNative:!1,pluginName:be.pluginId,platformName:Ke}:null}}async function l0(){const be=gn.value;if(be!=null&&be.interpolation){un.value=!0,Rt.value=!1;try{const ce=await xl(be);if(!ce)return;const Ge=(ce.pluginConfig.devices??[]).find(mr=>mr.id===be.id);if(!Ge)return;const Ke=be.interpolation,yt=(Ge[Ke.configField]??[]).map(mr=>({input:mr[Ke.configShape.inputKey]??0,output:mr[Ke.configShape.outputKey]??0}));rt.value=yt,It.value=JSON.parse(JSON.stringify(yt))}catch(ce){console.error("Failed to load interpolation config:",ce)}finally{un.value=!1}}}async function o0(){const be=gn.value;if(be!=null&&be.interpolation){Ut.value=!0,Rt.value=!1;try{const ce=await xl(be);if(!ce)return;const Ie=be.interpolation,Ge=ce.pluginConfig.devices??[],Ke=Ge.findIndex(yt=>yt.id===be.id);if(Ke<0)return;const Wt=rt.value.map(yt=>({[Ie.configShape.inputKey]:yt.input,[Ie.configShape.outputKey]:yt.output}));Ge[Ke]={...Ge[Ke],[Ie.configField]:Wt},ce.pluginConfig.devices=Ge,ce.isNative?await Re.config.savePlugin(ce.pluginName,ce.pluginConfig):await Re.config.savePlatform(ce.pluginConfig),It.value=JSON.parse(JSON.stringify(rt.value)),Rt.value=!0}catch(ce){console.error("Failed to save interpolation config:",ce)}finally{Ut.value=!1}}}function Hl(){rt.value=JSON.parse(JSON.stringify(It.value)),Rt.value=!1}Ve(oe,(be,ce)=>{var Ie;be===ce&&It.value.length>0||(Rt.value=!1,((Ie=Q.value)==null?void 0:Ie.kind)==="native"&&Q.value.dev.interpolation?l0():(rt.value=[],It.value=[]))},{immediate:!0});const A1=q(()=>{var ce;return(ce=Me.value)!=null&&ce.buckets?[{name:"kWh",data:Me.value.buckets.map(Ie=>{let Ge=Ie.label;return Y.value==="day"?Ge=parseInt(Ie.label)%6===0?Ie.label:"":Y.value==="month"&&(Ge=parseInt(Ie.label)%5===1?Ie.label:""),{x:Ge,y:Math.max(0,Math.round((Ie.kwh??0)*100)/100)}})}]:[]});return(be,ce)=>{const Ie=Ue,Ge=Wr,Ke=Pt,Wt=ks,yt=S2,mr=WA,M1=w2,c0=at,ke=Cs,Be=Vx,Ye=ba,Ci=o1;return Q.value?(m(),M("div",jD,[Q.value.kind==="native"?(m(),M(Ce,{key:0},[b("div",KD,[b("div",qD,[j(Ie,{name:P(v(Q.value.dev)),size:26},null,8,["name"])]),b("div",GD,[H.value?(m(),M("div",YD,[j(Ge,{modelValue:N.value,"onUpdate:modelValue":ce[1]||(ce[1]=$e=>N.value=$e),size:"sm",onKeyup:[ce[2]||(ce[2]=xi($e=>te(Q.value.dev.id),["enter"])),ce[3]||(ce[3]=xi($e=>H.value=!1,["escape"]))]},null,8,["modelValue"]),j(Ke,{variant:"primary",size:"sm",icon:dr,"aria-label":"Save name",onClick:ce[4]||(ce[4]=$e=>te(Q.value.dev.id))}),j(Ke,{variant:"ghost",size:"sm",icon:wc,"aria-label":"Cancel rename",onClick:ce[5]||(ce[5]=$e=>H.value=!1)})])):(m(),M("h2",{key:0,class:"detail-name",title:"Click to rename",onClick:ce[0]||(ce[0]=$e=>O(Q.value.dev.name))},Z(Q.value.dev.name),1)),b("div",XD,Z(R(v(Q.value.dev))),1)])]),j(yt,{title:"Device info",fluid:""},Fm({default:G(()=>[L.value&&L.value.status==="stale"?(m(),he(Wt,{key:0,status:"warning",title:B.value,style:{"margin-bottom":"0.5rem"}},{default:G(()=>[le(Z(L.value.reason),1)]),_:1},8,["title"])):V("",!0),$.value?(m(),he(Wt,{key:1,status:E.value,title:$.value,style:{"margin-bottom":"0.5rem"}},null,8,["status","title"])):V("",!0),b("div",JD,[ce[21]||(ce[21]=b("span",{class:"info-key"},"Plugin",-1)),b("span",QD,Z(Q.value.dev.pluginId),1),Q.value.dev.manufacturer?(m(),M(Ce,{key:0},[ce[19]||(ce[19]=b("span",{class:"info-key"},"Manufacturer",-1)),b("span",eZ,Z(Q.value.dev.manufacturer),1)],64)):V("",!0),Q.value.dev.model?(m(),M(Ce,{key:1},[ce[20]||(ce[20]=b("span",{class:"info-key"},"Model",-1)),b("span",tZ,Z(Q.value.dev.model),1)],64)):V("",!0),ce[22]||(ce[22]=b("span",{class:"info-key"},"Status",-1)),b("span",iZ,Z(Q.value.dev.pluginStatus),1),ce[23]||(ce[23]=b("span",{class:"info-key"},"ID",-1)),b("span",nZ,Z(Q.value.dev.id),1)])]),_:2},[ae.value.length>0?{name:"toolbar",fn:G(()=>[(m(!0),M(Ce,null,Fe(ae.value,$e=>(m(),he(Ke,{key:$e.id,size:"xs",variant:$e.danger?"danger":"ghost",disabled:g.value!=="",loading:g.value===$e.id,onClick:et=>ne($e)},{default:G(()=>[le(Z($e.label),1)]),_:2},1032,["variant","disabled","loading","onClick"]))),128))]),key:"0"}:void 0]),1024),j(yt,{title:"State",fluid:""},{default:G(()=>[Q.value.dev.widgetType==="energy_meter"?(m(),M("div",rZ,[b("div",sZ,[b("span",aZ,Z(I(Q.value.dev.telemetry.power,1)),1),ce[24]||(ce[24]=b("span",{class:"energy-unit"},"W",-1))]),b("div",lZ,[Q.value.dev.telemetry.voltage!==void 0?(m(),M("span",oZ,[ce[25]||(ce[25]=b("span",{class:"energy-label"},"Voltage",-1)),b("span",cZ,Z(I(Q.value.dev.telemetry.voltage,1))+" V",1)])):V("",!0),Q.value.dev.telemetry.current!==void 0?(m(),M("span",uZ,[ce[26]||(ce[26]=b("span",{class:"energy-label"},"Current",-1)),b("span",dZ,Z(I(Q.value.dev.telemetry.current,3))+" A",1)])):V("",!0)])])):Q.value.dev.widgetType==="thermostat"?(m(),M("div",hZ,[b("div",fZ,[ce[27]||(ce[27]=b("span",{class:"thermo-label"},"Current",-1)),b("span",pZ,Z(I(Q.value.dev.telemetry.currentTemperature,1))+"°C",1)]),b("div",_Z,[ce[28]||(ce[28]=b("span",{class:"thermo-label"},"Target",-1)),b("span",mZ,Z(I(Q.value.dev.telemetry.targetTemperature,1))+"°C ",1)]),b("div",vZ,[ce[29]||(ce[29]=b("span",{class:"thermo-label"},"Active",-1)),b("span",{class:Le(["thermo-value",Q.value.dev.telemetry.active?"on":"off"])},Z(Q.value.dev.telemetry.active?"On":"Off"),3)])])):Q.value.dev.widgetType==="dehumidifier"?(m(),M("div",gZ,[b("div",bZ,[ce[30]||(ce[30]=b("span",{class:"thermo-label"},"Humidity",-1)),b("span",yZ,Z(I(Q.value.dev.telemetry.currentHumidity,0))+"%",1)]),b("div",wZ,[ce[31]||(ce[31]=b("span",{class:"thermo-label"},"Target",-1)),b("span",SZ,Z(I(Q.value.dev.telemetry.targetHumidity,0))+"%",1)]),b("div",CZ,[ce[32]||(ce[32]=b("span",{class:"thermo-label"},"Active",-1)),b("span",{class:Le(["thermo-value",Q.value.dev.telemetry.active?"on":"off"])},Z(Q.value.dev.telemetry.active?"On":"Off"),3)])])):(m(),M("div",kZ,[Object.keys(Q.value.dev.telemetry).filter($e=>!$e.startsWith("_")).length===0?(m(),M("span",AZ,"No telemetry yet")):V("",!0),(m(!0),M(Ce,null,Fe(z(Q.value.dev),([$e,et])=>(m(),M("div",{key:$e,class:"char-row"},[b("span",MZ,Z($e),1),b("span",$Z,Z(String(et)),1)]))),128))]))]),_:1}),me.value.length>0?(m(),he(yt,{key:0,title:"Recent activity",fluid:""},{default:G(()=>[b("ul",LZ,[(m(!0),M(Ce,null,Fe(me.value,($e,et)=>(m(),M("li",{key:`${$e.at}-${et}`,class:"event"},[b("span",{class:"event-time",title:$e.at},Z(we($e.at)),9,EZ),b("span",xZ,[b("span",HZ,Z($e.message),1),$e.source?(m(),M("span",TZ,Z($e.source),1)):V("",!0)])]))),128))])]),_:1})):V("",!0),Q.value.dev.widgetType==="energy_meter"?(m(),he(yt,{key:1,title:"Energy history",class:"energy-history",fluid:""},{default:G(()=>[b("div",NZ,[(m(),M(Ce,null,Fe(["day","month","year"],$e=>b("button",{key:$e,class:Le(["history-tab",{active:Y.value===$e}]),onClick:et=>Y.value=$e},Z($e),11,PZ)),64))]),Me.value?(m(),M("div",OZ,[j(Ke,{variant:"ghost",size:"xs",icon:Hv,title:"Previous",onClick:ce[6]||(ce[6]=$e=>Te(-1))}),b("div",IZ,[b("span",RZ,[le(Z(Me.value.totalKwh.toFixed(2))+" ",1),ce[33]||(ce[33]=b("span",{class:"history-unit"},"kWh",-1))]),b("span",VZ,Z(Me.value.date),1)]),j(Ke,{variant:"ghost",size:"xs",icon:l2,title:"Next",onClick:ce[7]||(ce[7]=$e=>Te(1))})])):V("",!0),Me.value&&Me.value.totalKwh>0?(m(),he(mr,{key:1,series:A1.value,height:120,"show-legend":!1,"show-tooltip":!0},null,8,["series"])):V("",!0),Me.value&&Me.value.totalKwh===0?(m(),M("div",DZ," No consumption recorded for this period. Data accumulates every 5 minutes. ")):V("",!0),!Me.value&&!De.value?(m(),M("div",ZZ,"No data available for this period.")):V("",!0),De.value?(m(),M("div",BZ,"Loading history…")):V("",!0)]),_:1})):V("",!0),Q.value.dev.observations?(m(),he(yt,{key:2,title:"Report",fluid:""},{default:G(()=>[b("p",FZ,Z(Q.value.dev.observations.help??"Tell the plugin what this device cannot measure itself."),1),b("div",zZ,[j(M1,{modelValue:X.value,"onUpdate:modelValue":ce[8]||(ce[8]=$e=>X.value=$e),size:"sm",min:Q.value.dev.observations.min,max:Q.value.dev.observations.max,step:.5,label:`${Q.value.dev.observations.label} (${Q.value.dev.observations.unit})`},null,8,["modelValue","min","max","label"]),b("div",UZ,[(m(),M(Ce,null,Fe(T,$e=>j(Ke,{key:$e.id,size:"sm",variant:W.value===$e.id?"primary":"ghost",onClick:et=>W.value=$e.id},{default:G(()=>[le(Z($e.label),1)]),_:2},1032,["variant","onClick"])),64))]),j(Ge,{modelValue:A.value,"onUpdate:modelValue":ce[9]||(ce[9]=$e=>A.value=$e),size:"sm",placeholder:"Anything worth noting (sunny, window open)"},null,8,["modelValue"]),j(Ke,{size:"sm",variant:"primary",disabled:X.value===null||x.value,onClick:J},{default:G(()=>[...ce[34]||(ce[34]=[le(" Save report ",-1)])]),_:1},8,["disabled"])]),F.value?(m(),he(c0,{key:0,variant:"error"},{default:G(()=>[le(Z(F.value),1)]),_:1})):V("",!0),ie.value.length>0?(m(),M("div",WZ,[b("div",jZ,Z(re.value)+" report"+Z(re.value===1?"":"s")+" so far",1),(m(!0),M(Ce,null,Fe(ie.value,($e,et)=>(m(),M("div",{key:et,class:"obs-row"},[b("span",KZ,Z(new Date($e.at).toLocaleString()),1),b("span",qZ,Z($e.roomTemperature)+"°",1),j(ke,{variant:$e.comfort==="ok"?"green":$e.comfort==="cold"?"blue":"orange",size:"sm"},{default:G(()=>[le(Z($e.comfort),1)]),_:2},1032,["variant"]),$e.note?(m(),M("span",GZ,Z($e.note),1)):V("",!0)]))),128))])):V("",!0)]),_:1})):V("",!0),Q.value.dev.interpolation&&rt.value.length>0?(m(),he(yt,{key:3,title:"Calibration",fluid:""},{default:G(()=>[j(Be,{modelValue:rt.value,"onUpdate:modelValue":ce[10]||(ce[10]=$e=>rt.value=$e),height:220,"input-label":Q.value.dev.interpolation.inputLabel,"output-label":Q.value.dev.interpolation.outputLabel,"input-min":Q.value.dev.interpolation.inputMin,"input-max":Q.value.dev.interpolation.inputMax,"output-min":Q.value.dev.interpolation.outputMin,"output-max":Q.value.dev.interpolation.outputMax,"input-step":.5,"output-step":1,"show-grid":!0,"show-tooltip":!0},null,8,["modelValue","input-label","output-label","input-min","input-max","output-min","output-max"]),ce[37]||(ce[37]=b("div",{class:"calibration-hint"},"Drag points to adjust. Double-click to add. Right-click to remove.",-1)),b("div",YZ,[j(Ke,{variant:"primary",size:"sm",disabled:!vn.value||Ut.value,onClick:o0},{default:G(()=>[le(Z(Ut.value?"Saving...":"Save"),1)]),_:1},8,["disabled"]),j(Ke,{variant:"ghost",size:"sm",disabled:!vn.value,onClick:Hl},{default:G(()=>[...ce[35]||(ce[35]=[le(" Reset ",-1)])]),_:1},8,["disabled"])]),Rt.value?(m(),he(Wt,{key:0,status:"success",title:"Configuration saved"},{default:G(()=>[...ce[36]||(ce[36]=[le(" Restart the plugin to apply the new mapping. ",-1)])]),_:1})):V("",!0)]),_:1})):Q.value.dev.interpolation&&un.value?(m(),he(yt,{key:4,title:"Calibration",fluid:""},{default:G(()=>[...ce[38]||(ce[38]=[b("div",{class:"no-history"},"Loading calibration data...",-1)])]),_:1})):V("",!0),z(Q.value.dev).length>0?(m(),he(yt,{key:5,title:"All telemetry",fluid:""},{default:G(()=>[b("div",XZ,[(m(!0),M(Ce,null,Fe(z(Q.value.dev),([$e,et])=>(m(),M("div",{key:$e,class:"char-row"},[b("span",JZ,Z($e),1),b("span",QZ,Z(String(et)),1)]))),128))])]),_:1})):V("",!0),f.value?(m(),he(yt,{key:6,title:"HomeKit",fluid:""},{default:G(()=>[(m(!0),M(Ce,null,Fe(ye(f.value),$e=>sn((m(),M("div",{key:$e.uuid,class:"homekit-row"},[ce[39]||(ce[39]=b("div",{class:"homekit-copy"},[b("span",{class:"homekit-title"},"Show in HomeKit as"),b("span",{class:"homekit-hint"}," A plugin cannot know what a generic relay drives. Set it here and OpenBridge re-applies it on every restart, so the Home app stops reverting to a switch. ")],-1)),j(Ye,{"model-value":h(f.value.uuid,$e.uuid),options:u.value,disabled:i.value,size:"sm","onUpdate:modelValue":et=>_(f.value.uuid,$e.uuid,String(et))},null,8,["model-value","options","disabled","onUpdate:modelValue"])])),[[Zh,d($e.uuid)]])),128)),c.value?(m(),M("div",eB,Z(c.value),1)):V("",!0),b("div",tB,[ce[40]||(ce[40]=b("div",{class:"homekit-copy"},[b("span",{class:"homekit-title"},"Expose to HomeKit"),b("span",{class:"homekit-hint"}," Hide devices the Home app cannot represent usefully. OpenBridge keeps its telemetry and history either way. ")],-1)),j(Ci,{name:`homekit-visible-${f.value.uuid}`,"model-value":r(f.value.uuid),disabled:i.value,"onUpdate:modelValue":ce[11]||(ce[11]=$e=>a(f.value.uuid,!!$e))},null,8,["name","model-value","disabled"])]),n.value?(m(),M("div",iB,Z(n.value),1)):V("",!0)]),_:1})):V("",!0)],64)):Q.value.kind==="hap"?(m(),M(Ce,{key:1},[b("div",nB,[b("div",rB,[j(Ie,{name:fe(Q.value.acc.category).icon,size:26},null,8,["name"])]),b("div",sB,[H.value?(m(),M("div",aB,[j(Ge,{modelValue:N.value,"onUpdate:modelValue":ce[13]||(ce[13]=$e=>N.value=$e),size:"sm",onKeyup:[ce[14]||(ce[14]=xi($e=>te(Q.value.acc.uuid),["enter"])),ce[15]||(ce[15]=xi($e=>H.value=!1,["escape"]))]},null,8,["modelValue"]),j(Ke,{variant:"primary",size:"sm",icon:dr,"aria-label":"Save name",onClick:ce[16]||(ce[16]=$e=>te(Q.value.acc.uuid))}),j(Ke,{variant:"ghost",size:"sm",icon:wc,"aria-label":"Cancel rename",onClick:ce[17]||(ce[17]=$e=>H.value=!1)})])):(m(),M("h2",{key:0,class:"detail-name",title:"Click to rename",onClick:ce[12]||(ce[12]=$e=>O(Q.value.acc.displayName))},Z(Q.value.acc.displayName),1)),b("div",lB,Z(fe(Q.value.acc.category).label),1)])]),_e(Q.value.acc)?(m(),he(yt,{key:0,title:"Device info",fluid:""},{default:G(()=>[b("div",oB,[(m(!0),M(Ce,null,Fe(Object.entries(_e(Q.value.acc)),([$e,et])=>(m(),M(Ce,{key:$e},[et?(m(),M("span",cB,Z($e),1)):V("",!0),et?(m(),M("span",uB,Z(et),1)):V("",!0)],64))),128))])]),_:1})):V("",!0),(m(!0),M(Ce,null,Fe(ye(Q.value.acc),$e=>(m(),he(yt,{key:$e.uuid,title:$e.displayName||$e.name,fluid:""},{default:G(()=>[d($e.uuid)?(m(),M("div",dB,[ce[41]||(ce[41]=b("div",{class:"homekit-copy"},[b("span",{class:"homekit-title"},"Show in HomeKit as"),b("span",{class:"homekit-hint"}," A plugin cannot know what a generic relay drives. Set it here and OpenBridge re-applies it on every restart, so the Home app stops reverting to a switch. ")],-1)),j(Ye,{"model-value":h(Q.value.acc.uuid,$e.uuid),options:u.value,disabled:i.value,size:"sm","onUpdate:modelValue":et=>_(Q.value.acc.uuid,$e.uuid,String(et))},null,8,["model-value","options","disabled","onUpdate:modelValue"])])):V("",!0),c.value?(m(),M("div",hB,Z(c.value),1)):V("",!0),b("div",fB,[(m(!0),M(Ce,null,Fe($e.characteristics,et=>(m(),M("div",{key:et.uuid,class:"char-row"},[b("span",pB,Z(et.name),1),se(et)&&et.format==="bool"?(m(),he(Ci,{key:0,name:`hap-char-${$e.uuid}-${et.uuid}`,"model-value":!!et.value,"onUpdate:modelValue":u0=>ee(Q.value.acc.uuid,$e.uuid,et.uuid,u0?1:0)},null,8,["name","model-value","onUpdate:modelValue"])):(m(),M("span",{key:1,class:Le(["char-value",{on:et.format==="bool"&&et.value}])},Z(ge(et)),3))]))),128))])]),_:2},1032,["title"]))),128)),j(yt,{title:"HomeKit",fluid:""},{default:G(()=>[b("div",_B,[ce[42]||(ce[42]=b("div",{class:"homekit-copy"},[b("span",{class:"homekit-title"},"Expose to HomeKit"),b("span",{class:"homekit-hint"}," Hide devices the Home app cannot represent usefully. OpenBridge keeps its telemetry and history either way. ")],-1)),j(Ci,{name:`homekit-visible-${Q.value.acc.uuid}`,"model-value":r(Q.value.acc.uuid),disabled:i.value,"onUpdate:modelValue":ce[18]||(ce[18]=$e=>a(Q.value.acc.uuid,!!$e))},null,8,["name","model-value","disabled"])]),n.value?(m(),M("div",mB,Z(n.value),1)):V("",!0)]),_:1}),b("div",vB,"UUID: "+Z(Q.value.acc.uuid),1)],64)):V("",!0)])):V("",!0)}}}),bB=zt(gB,[["__scopeId","data-v-93cac877"]]),yB={class:"logs-filter"},wB={key:0,class:"log-empty"},SB={class:"log-time"},CB={class:"log-plugin"},kB={class:"log-msg"},_p="openbridge.logs.panelSize",AB=Ne({__name:"LiveLogsPanel",setup(e){const t=Kr(),i=["collapsed","default","full"],n=K("collapsed");nt(()=>{const c=localStorage.getItem(_p);c&&i.includes(c)&&(n.value=c)}),Ve(n,c=>localStorage.setItem(_p,c));const r=K([]),s=K(null),a=q(()=>[{value:"system",label:"system"},...t.plugins.map(c=>({value:c.manifest.name,label:c.manifest.name}))]),l=q(()=>r.value.length===0?t.logs:t.logs.filter(c=>r.value.includes(c.plugin)));function o(){t.logs.length=0}return Ve(()=>l.value.length,async()=>{const c=s.value;!c||!(c.scrollHeight-c.scrollTop-c.clientHeight<40)||(await Gt(),c.scrollTop=c.scrollHeight)}),(c,u)=>{const d=ba,h=Pt,f=S2;return m(),he(f,{size:n.value,"onUpdate:size":u[1]||(u[1]=v=>n.value=v),title:"Live Logs"},{toolbar:G(()=>[b("div",yB,[j(d,{modelValue:r.value,"onUpdate:modelValue":u[0]||(u[0]=v=>r.value=v),multiple:"",options:a.value,placeholder:"All plugins",size:"xs"},null,8,["modelValue","options"])]),j(h,{size:"xs",variant:"ghost",icon:C2,title:"Clear",onClick:o})]),default:G(()=>[b("div",{ref_key:"logsEl",ref:s,class:"log-list"},[l.value.length===0?(m(),M("div",wB,"No log entries yet.")):V("",!0),(m(!0),M(Ce,null,Fe(l.value,(v,p)=>(m(),M("div",{key:p,class:"log-line"},[b("span",SB,Z(new Date(v.timestamp).toLocaleTimeString()),1),b("span",{class:Le(["log-level",`log-level--${v.level}`])},Z(v.level.toUpperCase()),3),b("span",CB,Z(v.plugin),1),b("span",kB,Z(v.message),1)]))),128))],512)]),_:1},8,["size"])}}}),MB=zt(AB,[["__scopeId","data-v-2d8d29ff"]]),mp="https://docs.nubisco.io/openbridge/",vp="https://github.com/sponsors/joseporto",$B=Ne({__name:"AppLayout",setup(e){const t=Jo(),i=Kr(),n=Qo(),r=Ms(),s=e0(),a=iP({storageKey:"openbridge.sidebar"}),l=q(()=>i.connected?"Daemon connected":"Daemon offline");function o($){window.open($,"_blank","noopener")}async function c(){await s.logout()}function u(){var E;const $=(E=s.config.value)==null?void 0:E.issuer;$&&window.open(`${$}/profile`,"_blank","noopener")}const d=K([]),h=K(!0),f=q(()=>d.value.map($=>{var E;return{id:$.sub,email:$.email,name:$.name,current:$.sub===((E=s.user.value)==null?void 0:E.id)}}));async function v(){const $=await s.listIdentities();d.value=$,h.value=$.length===0}function p($){s.switchAccount($.email)}async function w($){await s.removeIdentity($.id),await v()}const _=K(null),y=K(!1);async function C(){try{const $=await fetch("/api/updates/check");if(!$.ok)return;const E=await $.json();E.updateAvailable&&E.latest&&(_.value=E.latest)}catch{}}const g=[{name:"dashboard",icon:"house",label:"Dashboard",href:"/dashboard"},{name:"plugins",icon:"puzzle-piece",label:"Plugins",href:"/plugins"},{name:"devices",icon:"devices",label:"Devices",href:"/devices"},{name:"config",icon:"brackets-curly",label:"Config",href:"/config"},{name:"terminal",icon:"terminal",label:"Terminal",href:"/terminal"}];return Ve(()=>t.name,()=>n.close()),nt(async()=>{await i.fetchHealth(),await i.fetchPlugins(),i.fetchLogs(),i.connectLiveLogs();const $=setInterval(()=>i.fetchHealth(),1e4);Ii(()=>clearInterval($)),C()}),Ii(()=>i.disconnectLiveLogs()),($,E)=>{const L=iT,B=wo("RouterLink"),T=bT,X=uT,W=yT,A=TS,x=hE,F=CT,ie=$v,re=Cs,ue=Pt,J=ks,ae=wo("RouterView"),ne=XH;return m(),he(ne,{"inspector-visible":de(n).visible,"main-padding":!de(r).fullBleed,"sidebar-variant":de(a).variant.value,"sidebar-header-action-position":"start","sidebar-header-action-compact":"swap"},Fm({"sidebar-logo":G(()=>[j(B,{to:"/dashboard",class:"sidebar-brand-link","aria-label":"OpenBridge, dashboard"},{default:G(()=>[j(L,{title:"OpenBridge"},{icon:G(()=>[...E[5]||(E[5]=[b("img",{src:Zg,width:"28",height:"28",alt:""},null,-1)])]),_:1})]),_:1})]),"sidebar-header-action":G(()=>[j(T,{onToggle:de(a).toggle},null,8,["onToggle"])]),"sidebar-nav":G(()=>[j(W,null,{default:G(()=>[(m(),M(Ce,null,Fe(g,Q=>j(X,{key:Q.name,icon:Q.icon,label:Q.label,to:Q.href,active:de(t).name===Q.name},null,8,["icon","label","to","active"])),64))]),_:1})]),"sidebar-bottom":G(()=>{var Q;return[j(W,null,{default:G(()=>[j(X,{icon:CO,label:"Documentation",href:mp,onClick:E[0]||(E[0]=qe(oe=>o(mp),["prevent"]))}),j(X,{icon:EO,label:"Sponsor",href:vp,onClick:E[1]||(E[1]=qe(oe=>o(vp),["prevent"]))}),j(X,{icon:Bg,label:"Settings",to:"/settings",active:de(t).name==="settings"},null,8,["active"])]),_:1}),(Q=de(s).config.value)!=null&&Q.enabled&&de(s).user.value?(m(),he(x,{key:0,user:{email:de(s).user.value.email,name:de(s).user.value.name,picture:de(s).user.value.picture},trigger:"identity","show-theme":"",accounts:f.value,"accounts-unknown":h.value,"show-account-actions":de(s).isNubiscoPlatform.value,"show-profile":de(s).isNubiscoPlatform.value,brand:de(s).isNubiscoPlatform.value?"footer":void 0,onOpen:v,onSwitch:p,onSwitchAccount:E[2]||(E[2]=oe=>de(s).chooseAccount()),onAddAccount:E[3]||(E[3]=oe=>de(s).addAccount()),onRemove:w,onProfile:u,onSignOut:c},{default:G(({close:oe})=>[j(A,{icon:WL,label:"Sign out of all apps",danger:"",onSelect:ve=>(oe(),de(s).logoutEverywhere())},null,8,["onSelect"])]),_:1},8,["user","accounts","accounts-unknown","show-account-actions","show-profile","brand"])):V("",!0),j(F,{label:l.value,status:de(i).connected?"success":"danger"},null,8,["label","status"])]}),"topbar-left":G(()=>[j(ie,{subtitle:de(r).title},null,8,["subtitle"]),de(r).count!==null?(m(),he(re,{key:0},{default:G(()=>[le(Z(de(r).count),1)]),_:1})):V("",!0),E[6]||(E[6]=b("div",{id:"ob-topbar-left",class:"topbar-slot"},null,-1))]),"topbar-right":G(()=>[E[7]||(E[7]=b("div",{id:"ob-topbar-right",class:"topbar-slot"},null,-1))]),inspector:G(()=>[de(n).mode==="plugin"?(m(),he(KV,{key:0})):de(n).mode==="marketplace"?(m(),he(WD,{key:1})):de(n).mode==="device"?(m(),he(bB,{key:2})):V("",!0)]),bottom:G(()=>[j(MB)]),default:G(()=>[j(ae)]),_:2},[_.value&&!y.value?{name:"notification",fn:G(()=>[j(J,{status:"info",icon:$2,flush:"",dismissible:"",title:`OpenBridge v${_.value} is available`,onDismiss:E[4]||(E[4]=Q=>y.value=!0)},{action:G(()=>[j(ue,{variant:"ghost",size:"sm",href:"https://github.com/nubisco/openbridge/releases",target:"_blank",rel:"noopener"},{default:G(()=>[...E[8]||(E[8]=[le(" See what's new ",-1)])]),_:1})]),_:1},8,["title"])]),key:"0"}:void 0]),1032,["inspector-visible","main-padding","sidebar-variant"])}}}),LB=zt($B,[["__scopeId","data-v-082839de"]]),EB=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},xB=EB("qr-code","0 0 256 256",'<path d="M104,40H56A16,16,0,0,0,40,56v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V56A16,16,0,0,0,104,40Zm0,64H56V56h48v48Zm0,32H56a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V152A16,16,0,0,0,104,136Zm0,64H56V152h48v48ZM200,40H152a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,64H152V56h48v48Zm-64,72V144a8,8,0,0,1,16,0v32a8,8,0,0,1-16,0Zm80-16a8,8,0,0,1-8,8H184v40a8,8,0,0,1-8,8H144a8,8,0,0,1,0-16h24V144a8,8,0,0,1,16,0v8h24A8,8,0,0,1,216,160Zm0,32v16a8,8,0,0,1-16,0V192a8,8,0,0,1,16,0Z"/>'),HB=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},TB=HB("cpu","0 0 256 256",'<path d="M152,96H104a8,8,0,0,0-8,8v48a8,8,0,0,0,8,8h48a8,8,0,0,0,8-8V104A8,8,0,0,0,152,96Zm-8,48H112V112h32Zm88,0H216V112h16a8,8,0,0,0,0-16H216V56a16,16,0,0,0-16-16H160V24a8,8,0,0,0-16,0V40H112V24a8,8,0,0,0-16,0V40H56A16,16,0,0,0,40,56V96H24a8,8,0,0,0,0,16H40v32H24a8,8,0,0,0,0,16H40v40a16,16,0,0,0,16,16H96v16a8,8,0,0,0,16,0V216h32v16a8,8,0,0,0,16,0V216h40a16,16,0,0,0,16-16V160h16a8,8,0,0,0,0-16Zm-32,56H56V56H200v95.87s0,.09,0,.13,0,.09,0,.13V200Z"/>'),NB=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},PB=NB("database","0 0 256 256",'<path d="M128,24C74.17,24,32,48.6,32,80v96c0,31.4,42.17,56,96,56s96-24.6,96-56V80C224,48.6,181.83,24,128,24Zm80,104c0,9.62-7.88,19.43-21.61,26.92C170.93,163.35,150.19,168,128,168s-42.93-4.65-58.39-13.08C55.88,147.43,48,137.62,48,128V111.36c17.06,15,46.23,24.64,80,24.64s62.94-9.68,80-24.64ZM69.61,53.08C85.07,44.65,105.81,40,128,40s42.93,4.65,58.39,13.08C200.12,60.57,208,70.38,208,80s-7.88,19.43-21.61,26.92C170.93,115.35,150.19,120,128,120s-42.93-4.65-58.39-13.08C55.88,99.43,48,89.62,48,80S55.88,60.57,69.61,53.08ZM186.39,202.92C170.93,211.35,150.19,216,128,216s-42.93-4.65-58.39-13.08C55.88,195.43,48,185.62,48,176V159.36c17.06,15,46.23,24.64,80,24.64s62.94-9.68,80-24.64V176C208,185.62,200.12,195.43,186.39,202.92Z"/>'),OB=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},IB=OB("clock","0 0 256 256",'<path d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm64-88a8,8,0,0,1-8,8H128a8,8,0,0,1-8-8V72a8,8,0,0,1,16,0v48h48A8,8,0,0,1,192,128Z"/>'),ja=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},RB=ja("pulse","0 0 256 256",'<path d="M236,128a4,4,0,0,1-4,4H202.47l-38.89,77.79A4,4,0,0,1,160,212h-.2a4,4,0,0,1-3.54-2.58l-60.59-159-36,79.28A4,4,0,0,1,56,132H24a4,4,0,0,1,0-8H53.42L92.36,38.35a4,4,0,0,1,7.38.23L160.5,198.06l35.92-71.85A4,4,0,0,1,200,124h32A4,4,0,0,1,236,128Z"/>'),VB=ja("pulse","0 0 256 256",'<path d="M238,128a6,6,0,0,1-6,6H203.71l-38.34,76.68A6,6,0,0,1,160,214h-.3a6,6,0,0,1-5.31-3.85L95.51,55.57,61.46,130.48A6,6,0,0,1,56,134H24a6,6,0,0,1,0-12H52.14l38.4-84.48a6,6,0,0,1,11.07.34L160.74,193.1l33.89-67.78A6,6,0,0,1,200,122h32A6,6,0,0,1,238,128Z"/>'),Pd=ja("pulse","0 0 256 256",'<path d="M240,128a8,8,0,0,1-8,8H204.94l-37.78,75.58A8,8,0,0,1,160,216h-.4a8,8,0,0,1-7.08-5.14L95.35,60.76,63.28,131.31A8,8,0,0,1,56,136H24a8,8,0,0,1,0-16H50.85L88.72,36.69a8,8,0,0,1,14.76.46l57.51,151,31.85-63.71A8,8,0,0,1,200,120h32A8,8,0,0,1,240,128Z"/>'),DB=ja("pulse","0 0 256 256",'<path d="M244,128a12,12,0,0,1-12,12H207.42l-36.69,73.37A12,12,0,0,1,160,220h-.6a12,12,0,0,1-10.61-7.72L95,71.15,66.92,133A12,12,0,0,1,56,140H24a12,12,0,0,1,0-24H48.27L85.08,35a12,12,0,0,1,22.13.7l54.28,142.46,27.78-55.56A12,12,0,0,1,200,116h32A12,12,0,0,1,244,128Z"/>'),ZB=ja("pulse","0 0 256 256",'<path d="M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40Zm-8,96H188.64L159,188a8,8,0,0,1-6.95,4h-.46a8,8,0,0,1-6.89-4.84L103,89.92,79,132a8,8,0,0,1-7,4H48a8,8,0,0,1,0-16H67.36L97.05,68a8,8,0,0,1,14.3.82L153,166.08l24-42.05a8,8,0,0,1,6.95-4h24a8,8,0,0,1,0,16Z"/>'),BB=ja("pulse","0 0 256 256",'<path d="M96,40l33.52,88H56Zm104,88H129.52L160,208Z" opacity="0.2"/><path d="M240,128a8,8,0,0,1-8,8H204.94l-37.78,75.58A8,8,0,0,1,160,216h-.4a8,8,0,0,1-7.08-5.14L95.35,60.76,63.28,131.31A8,8,0,0,1,56,136H24a8,8,0,0,1,0-16H50.85L88.72,36.69a8,8,0,0,1,14.76.46l57.51,151,31.85-63.71A8,8,0,0,1,200,120h32A8,8,0,0,1,240,128Z"/>'),FB="pulse",zB=Object.freeze(Object.defineProperty({__proto__:null,bold:DB,default:Pd,duotone:BB,fill:ZB,glyphName:FB,light:VB,regular:Pd,thin:RB},Symbol.toStringTag,{value:"Module"})),UB={class:"dashboard"},WB={class:"top-row"},jB={class:"hk-body"},KB={key:0,class:"qr-wrap"},qB=["src"],GB={key:1,class:"qr-placeholder"},YB={class:"hk-details"},XB={key:0,class:"pin-display"},JB={key:1,class:"pin-label"},QB={class:"hk-status"},eF={key:2,class:"hk-error"},tF={key:0,class:"sys-grid"},iF={class:"sys-val"},nF={class:"sys-val"},rF={class:"sys-val"},sF={class:"sys-val"},aF={class:"sys-val"},lF={class:"sys-val"},oF={class:"sys-val"},cF={class:"sys-val mono"},uF={class:"sys-val mono"},dF={class:"sys-val mono"},hF={key:1,class:"loading-inline"},fF={class:"card-title"},pF={class:"plugins-counts"},_F={key:0,class:"pill red"},mF={key:0,class:"empty-inline"},vF={key:1,class:"plugins-list"},gF={class:"plugin-name"},bF={class:"plugin-ver"},yF={class:"metrics-row"},wF={class:"metric-header"},SF={class:"metric-icon purple"},CF={class:"metric-values"},kF={class:"metric-big"},AF={key:0,class:"metric-sub"},MF={class:"metric-chart"},$F={class:"metric-header"},LF={class:"metric-icon blue"},EF={class:"metric-values"},xF={class:"metric-big"},HF={class:"metric-sub"},TF={class:"metric-chart"},NF={class:"metric-header"},PF={class:"metric-icon green"},OF={class:"uptime-rows"},IF={class:"uptime-row"},RF={class:"uptime-val"},VF={class:"uptime-row"},DF={class:"uptime-val"},ZF={style:{"margin-top":"0.75rem"}},BF={class:"metric-header"},FF={class:"metric-icon amber"},zF={class:"net-values"},UF={class:"net-val"},WF={class:"net-val"},jF={class:"metric-chart net-charts"},KF=Ne({__name:"DashboardView",setup(e){const t=Kr(),i=Ms();function n(A){return A==="running"?"green":A==="error"?"red":A==="loading"?"blue":"grey"}const r=K(!1),s=K(!1);async function a(){if(!r.value){r.value=!0,s.value=!1;try{await Re.daemon.restart(),s.value=!0;let A=0;const x=setInterval(async()=>{A++;try{await Re.health(),clearInterval(x),location.reload()}catch{}A>60&&(clearInterval(x),r.value=!1)},1e3)}catch{r.value=!1}}}const l=K(null),o=K(""),c=K(""),u=K(""),d=q(()=>t.connected?u.value?"red":"green":"gray"),h=q(()=>t.connected?u.value?"HomeKit offline":"Bridge running":"Daemon offline"),f=K([]),v=K([]),p=K([]),w=K([]),_=zn(null);let y=null;function C(){y&&(y.onclose=null,y.close(),y=null);const A=location.protocol==="https:"?"wss:":"ws:";y=new WebSocket(`${A}//${location.host}/ws/metrics`),y.onmessage=x=>{if(!document.hidden)try{const F=JSON.parse(x.data);if(F.type==="history"){const ie=F.data;f.value=ie.map(re=>re.cpu),v.value=ie.map(re=>E(re)),p.value=ie.map(re=>re.netRxSec),w.value=ie.map(re=>re.netTxSec),ie.length&&(_.value=ie[ie.length-1])}else if(F.type==="snapshot"){const ie=F.data;_.value=ie,$(f,ie.cpu),$(v,E(ie)),$(p,ie.netRxSec),$(w,ie.netTxSec)}}catch{}},y.onclose=()=>{y=null,setTimeout(C,3e3)}}function g(){document.hidden||C()}function $(A,x){A.value=[...A.value.slice(-59),x]}function E(A){return A.memTotal?Math.round((A.memTotal-A.memFree)/A.memTotal*100):0}function L(A){return A<1024?`${A} B`:A<1024**2?`${(A/1024).toFixed(1)} KB`:A<1024**3?`${(A/1024**2).toFixed(1)} MB`:`${(A/1024**3).toFixed(1)} GB`}function B(A){const x=Math.floor(A/86400),F=Math.floor(A%86400/3600),ie=Math.floor(A%3600/60);return x>0?`${x}d ${F}h`:F>0?`${F}h ${ie}m`:`${ie}m`}const T=q(()=>_.value?L(_.value.memTotal-_.value.memFree):"—"),X=q(()=>_.value?L(_.value.memTotal):"—"),W=q(()=>_.value?E(_.value):0);return nt(async()=>{i.setPage("Dashboard"),t.fetchPlugins();try{l.value=await Re.system()}catch{}try{const A=await Re.qr();u.value=A.error??"",A.setupURI&&(c.value=A.pincode??"",o.value=await Wa.toDataURL(A.setupURI,{width:148,margin:1,color:{dark:"#000000",light:"#ffffff"}}))}catch{}C(),document.addEventListener("visibilitychange",g)}),Ii(()=>{y==null||y.close(),y=null,document.removeEventListener("visibilitychange",g)}),(A,x)=>{const F=Ue,ie=Ss,re=Cs,ue=hN,J=fg,ae=Pt;return m(),M("div",UB,[b("div",WB,[j(ie,{class:"hk-card"},{default:G(()=>[x[0]||(x[0]=b("div",{class:"card-title"},"HomeKit Pairing",-1)),b("div",jB,[o.value?(m(),M("div",KB,[b("img",{src:o.value,alt:"HomeKit QR Code",class:"qr-img"},null,8,qB)])):(m(),M("div",GB,[j(F,{name:de(xB),size:48},null,8,["name"]),b("span",null,Z(u.value?"HomeKit bridge unavailable":"No HAP bridge configured"),1)])),b("div",YB,[c.value?(m(),M("div",XB,Z(c.value),1)):V("",!0),c.value?(m(),M("div",JB,"Scan to add to HomeKit")):V("",!0),b("div",QB,[b("span",{class:Le(["dot",d.value])},null,2),le(" "+Z(h.value),1)]),u.value?(m(),M("div",eF,Z(u.value),1)):V("",!0)])])]),_:1}),j(ie,{class:"sys-card"},{default:G(()=>{var ne;return[x[12]||(x[12]=b("div",{class:"card-title"},"System Information",-1)),l.value?(m(),M("div",tF,[x[1]||(x[1]=b("span",{class:"sys-key"},"OS",-1)),b("span",iF,Z(l.value.os),1),x[2]||(x[2]=b("span",{class:"sys-key"},"Arch",-1)),b("span",nF,Z(l.value.arch),1),x[3]||(x[3]=b("span",{class:"sys-key"},"Hostname",-1)),b("span",rF,Z(l.value.hostname),1),x[4]||(x[4]=b("span",{class:"sys-key"},"IP Address",-1)),b("span",sF,Z(l.value.ip),1),x[5]||(x[5]=b("span",{class:"sys-key"},"User",-1)),b("span",aF,Z(l.value.user),1),x[6]||(x[6]=b("span",{class:"sys-key"},"Node.js",-1)),b("span",lF,Z(l.value.nodeVersion),1),x[7]||(x[7]=b("span",{class:"sys-key"},"OpenBridge",-1)),b("span",oF,"v"+Z(((ne=de(t).health)==null?void 0:ne.version)??"—"),1),x[8]||(x[8]=b("span",{class:"sys-key"},"Config",-1)),b("span",cF,Z(l.value.configPath),1),x[9]||(x[9]=b("span",{class:"sys-key"},"OB plugins",-1)),b("span",uF,Z(l.value.obPluginsDir),1),x[10]||(x[10]=b("span",{class:"sys-key"},"HB plugins",-1)),b("span",dF,Z(l.value.hbPluginsDir),1)])):(m(),M("div",hF,[j(F,{name:de(ra),size:16},null,8,["name"]),x[11]||(x[11]=le(" Loading... ",-1))]))]}),_:1}),j(ie,{class:"plugins-card"},{default:G(()=>[b("div",fF,[x[13]||(x[13]=le(" Plugins ",-1)),b("span",pF,[j(re,{variant:"green"},{default:G(()=>[le(Z(de(t).runningCount)+" running",1)]),_:1}),de(t).errorCount?(m(),M("span",_F,Z(de(t).errorCount)+" error",1)):V("",!0)])]),de(t).plugins.length===0?(m(),M("div",mF,"No plugins loaded yet.")):(m(),M("div",vF,[(m(!0),M(Ce,null,Fe(de(t).plugins,ne=>(m(),M("div",{key:ne.id,class:"plugin-row"},[b("div",{class:Le(["plugin-dot",ne.status])},null,2),b("span",gF,Z(ne.manifest.name),1),b("span",bF,"v"+Z(ne.manifest.version),1),ne.source==="homebridge"?(m(),he(re,{key:0,variant:"orange",size:"sm"},{default:G(()=>[...x[14]||(x[14]=[le("HB",-1)])]),_:1})):V("",!0),j(re,{variant:n(ne.status),size:"sm"},{default:G(()=>[le(Z(ne.status),1)]),_:2},1032,["variant"])]))),128))]))]),_:1})]),b("div",yF,[j(ie,{class:"metric-card"},{default:G(()=>{var ne,Q;return[b("div",wF,[b("div",SF,[j(F,{name:de(TB),size:13},null,8,["name"])]),x[15]||(x[15]=b("span",{class:"metric-title"},"CPU",-1))]),b("div",CF,[b("div",kF,[le(Z(((ne=_.value)==null?void 0:ne.cpu)??"—")+" ",1),x[16]||(x[16]=b("span",{class:"metric-unit"},"%",-1))]),(Q=_.value)!=null&&Q.cpuTemp&&_.value.cpuTemp>0?(m(),M("div",AF,Z(_.value.cpuTemp)+"°C",1)):V("",!0)]),b("div",MF,[j(ue,{data:f.value,color:"var(--nb-c-primary)",height:40},null,8,["data"])])]}),_:1}),j(ie,{class:"metric-card"},{default:G(()=>[b("div",$F,[b("div",LF,[j(F,{name:de(PB),size:13},null,8,["name"])]),x[17]||(x[17]=b("span",{class:"metric-title"},"Memory",-1))]),b("div",EF,[b("div",xF,[le(Z(W.value)+" ",1),x[18]||(x[18]=b("span",{class:"metric-unit"},"%",-1))]),b("div",HF,Z(T.value)+" / "+Z(X.value),1)]),j(J,{value:W.value,max:100,size:"sm"},null,8,["value"]),b("div",TF,[j(ue,{data:v.value,color:"var(--nb-c-info)",height:32},null,8,["data"])])]),_:1}),j(ie,{class:"metric-card"},{default:G(()=>[b("div",NF,[b("div",PF,[j(F,{name:de(IB),size:13},null,8,["name"])]),x[19]||(x[19]=b("span",{class:"metric-title"},"Uptime",-1))]),b("div",OF,[b("div",IF,[b("span",RF,Z(l.value?B(l.value.uptimeSystem):"—"),1),x[20]||(x[20]=b("span",{class:"uptime-label"},"System",-1))]),x[22]||(x[22]=b("div",{class:"uptime-divider"},null,-1)),b("div",VF,[b("span",DF,Z(l.value?B(l.value.uptimeProcess):"—"),1),x[21]||(x[21]=b("span",{class:"uptime-label"},"Process",-1))])]),b("div",ZF,[j(ae,{variant:"secondary",size:"sm",outlined:"",style:{width:"100%","justify-content":"center"},loading:r.value,icon:s.value?dr:r.value?Vo:_s,onClick:a},{default:G(()=>[le(Z(s.value?"Restarted":r.value?"Restarting…":"Restart OpenBridge"),1)]),_:1},8,["loading","icon"])])]),_:1}),j(ie,{class:"metric-card net-card"},{default:G(()=>[b("div",BF,[b("div",FF,[j(F,{name:de(Pd),size:13},null,8,["name"])]),x[23]||(x[23]=b("span",{class:"metric-title"},"Network",-1))]),b("div",zF,[b("div",null,[b("div",UF,Z(_.value?L(_.value.netRxSec)+"/s":"—"),1),x[24]||(x[24]=b("div",{class:"net-label"},"↓ Received",-1))]),b("div",null,[b("div",WF,Z(_.value?L(_.value.netTxSec)+"/s":"—"),1),x[25]||(x[25]=b("div",{class:"net-label"},"↑ Sent",-1))])]),b("div",jF,[j(ue,{data:p.value,color:"var(--nb-c-success)",height:28},null,8,["data"]),j(ue,{data:w.value,color:"var(--nb-c-warning)",height:28},null,8,["data"])])]),_:1})])])}}}),qF=zt(KF,[["__scopeId","data-v-d9b075b5"]]),Ka=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},GF=Ka("arrow-clockwise","0 0 256 256",'<path d="M236,56v48a4,4,0,0,1-4,4H184a4,4,0,0,1,0-8h37.7L187.53,68.69l-.13-.12a84,84,0,1,0-1.75,120.51,4,4,0,0,1,5.5,5.82A91.43,91.43,0,0,1,128,220h-1.26A92,92,0,1,1,193,62.84l35,32.05V56a4,4,0,1,1,8,0Z"/>'),YF=Ka("arrow-clockwise","0 0 256 256",'<path d="M238,56v48a6,6,0,0,1-6,6H184a6,6,0,0,1,0-12h32.55l-30.38-27.8c-.06-.06-.12-.13-.19-.19a82,82,0,1,0-1.7,117.65,6,6,0,0,1,8.24,8.73A93.46,93.46,0,0,1,128,222h-1.28A94,94,0,1,1,194.37,61.4L226,90.35V56a6,6,0,1,1,12,0Z"/>'),gp=Ka("arrow-clockwise","0 0 256 256",'<path d="M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1,0-16H211.4L184.81,71.64l-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,0,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60L224,85.8V56a8,8,0,1,1,16,0Z"/>'),XF=Ka("arrow-clockwise","0 0 256 256",'<path d="M244,56v48a12,12,0,0,1-12,12H184a12,12,0,1,1,0-24H201.1l-19-17.38c-.13-.12-.26-.24-.38-.37A76,76,0,1,0,127,204h1a75.53,75.53,0,0,0,52.15-20.72,12,12,0,0,1,16.49,17.45A99.45,99.45,0,0,1,128,228h-1.37A100,100,0,1,1,198.51,57.06L220,76.72V56a12,12,0,0,1,24,0Z"/>'),JF=Ka("arrow-clockwise","0 0 256 256",'<path d="M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1-5.66-13.66l17-17-10.55-9.65-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,1,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60l10.93,10L226.34,50.3A8,8,0,0,1,240,56Z"/>'),QF=Ka("arrow-clockwise","0 0 256 256",'<path d="M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z" opacity="0.2"/><path d="M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1,0-16H211.4L184.81,71.64l-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,0,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60L224,85.8V56a8,8,0,1,1,16,0Z"/>'),ez="arrow-clockwise",tz=Object.freeze(Object.defineProperty({__proto__:null,bold:XF,default:gp,duotone:QF,fill:JF,glyphName:ez,light:YF,regular:gp,thin:GF},Symbol.toStringTag,{value:"Module"})),db=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),qa=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},iz=qa("list","0 0 256 256",'<path d="M220,128a4,4,0,0,1-4,4H40a4,4,0,0,1,0-8H216A4,4,0,0,1,220,128ZM40,68H216a4,4,0,0,0,0-8H40a4,4,0,0,0,0,8ZM216,188H40a4,4,0,0,0,0,8H216a4,4,0,0,0,0-8Z"/>'),nz=qa("list","0 0 256 256",'<path d="M222,128a6,6,0,0,1-6,6H40a6,6,0,0,1,0-12H216A6,6,0,0,1,222,128ZM40,70H216a6,6,0,0,0,0-12H40a6,6,0,0,0,0,12ZM216,186H40a6,6,0,0,0,0,12H216a6,6,0,0,0,0-12Z"/>'),bp=qa("list","0 0 256 256",'<path d="M224,128a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128ZM40,72H216a8,8,0,0,0,0-16H40a8,8,0,0,0,0,16ZM216,184H40a8,8,0,0,0,0,16H216a8,8,0,0,0,0-16Z"/>'),rz=qa("list","0 0 256 256",'<path d="M228,128a12,12,0,0,1-12,12H40a12,12,0,0,1,0-24H216A12,12,0,0,1,228,128ZM40,76H216a12,12,0,0,0,0-24H40a12,12,0,0,0,0,24ZM216,180H40a12,12,0,0,0,0,24H216a12,12,0,0,0,0-24Z"/>'),sz=qa("list","0 0 256 256",'<path d="M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM192,184H64a8,8,0,0,1,0-16H192a8,8,0,0,1,0,16Zm0-48H64a8,8,0,0,1,0-16H192a8,8,0,0,1,0,16Zm0-48H64a8,8,0,0,1,0-16H192a8,8,0,0,1,0,16Z"/>'),az=qa("list","0 0 256 256",'<path d="M216,64V192H40V64Z" opacity="0.2"/><path d="M224,128a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128ZM40,72H216a8,8,0,0,0,0-16H40a8,8,0,0,0,0,16ZM216,184H40a8,8,0,0,0,0,16H216a8,8,0,0,0,0-16Z"/>'),lz="list",hb=Object.freeze(Object.defineProperty({__proto__:null,bold:rz,default:bp,duotone:az,fill:sz,glyphName:lz,light:nz,regular:bp,thin:iz},Symbol.toStringTag,{value:"Module"})),Ga=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},oz=Ga("squares-four","0 0 256 256",'<path d="M104,44H56A12,12,0,0,0,44,56v48a12,12,0,0,0,12,12h48a12,12,0,0,0,12-12V56A12,12,0,0,0,104,44Zm4,60a4,4,0,0,1-4,4H56a4,4,0,0,1-4-4V56a4,4,0,0,1,4-4h48a4,4,0,0,1,4,4Zm92-60H152a12,12,0,0,0-12,12v48a12,12,0,0,0,12,12h48a12,12,0,0,0,12-12V56A12,12,0,0,0,200,44Zm4,60a4,4,0,0,1-4,4H152a4,4,0,0,1-4-4V56a4,4,0,0,1,4-4h48a4,4,0,0,1,4,4ZM104,140H56a12,12,0,0,0-12,12v48a12,12,0,0,0,12,12h48a12,12,0,0,0,12-12V152A12,12,0,0,0,104,140Zm4,60a4,4,0,0,1-4,4H56a4,4,0,0,1-4-4V152a4,4,0,0,1,4-4h48a4,4,0,0,1,4,4Zm92-60H152a12,12,0,0,0-12,12v48a12,12,0,0,0,12,12h48a12,12,0,0,0,12-12V152A12,12,0,0,0,200,140Zm4,60a4,4,0,0,1-4,4H152a4,4,0,0,1-4-4V152a4,4,0,0,1,4-4h48a4,4,0,0,1,4,4Z"/>'),cz=Ga("squares-four","0 0 256 256",'<path d="M104,42H56A14,14,0,0,0,42,56v48a14,14,0,0,0,14,14h48a14,14,0,0,0,14-14V56A14,14,0,0,0,104,42Zm2,62a2,2,0,0,1-2,2H56a2,2,0,0,1-2-2V56a2,2,0,0,1,2-2h48a2,2,0,0,1,2,2Zm94-62H152a14,14,0,0,0-14,14v48a14,14,0,0,0,14,14h48a14,14,0,0,0,14-14V56A14,14,0,0,0,200,42Zm2,62a2,2,0,0,1-2,2H152a2,2,0,0,1-2-2V56a2,2,0,0,1,2-2h48a2,2,0,0,1,2,2Zm-98,34H56a14,14,0,0,0-14,14v48a14,14,0,0,0,14,14h48a14,14,0,0,0,14-14V152A14,14,0,0,0,104,138Zm2,62a2,2,0,0,1-2,2H56a2,2,0,0,1-2-2V152a2,2,0,0,1,2-2h48a2,2,0,0,1,2,2Zm94-62H152a14,14,0,0,0-14,14v48a14,14,0,0,0,14,14h48a14,14,0,0,0,14-14V152A14,14,0,0,0,200,138Zm2,62a2,2,0,0,1-2,2H152a2,2,0,0,1-2-2V152a2,2,0,0,1,2-2h48a2,2,0,0,1,2,2Z"/>'),yp=Ga("squares-four","0 0 256 256",'<path d="M104,40H56A16,16,0,0,0,40,56v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V56A16,16,0,0,0,104,40Zm0,64H56V56h48v48Zm96-64H152a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,64H152V56h48v48Zm-96,32H56a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V152A16,16,0,0,0,104,136Zm0,64H56V152h48v48Zm96-64H152a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V152A16,16,0,0,0,200,136Zm0,64H152V152h48v48Z"/>'),uz=Ga("squares-four","0 0 256 256",'<path d="M100,36H56A20,20,0,0,0,36,56v44a20,20,0,0,0,20,20h44a20,20,0,0,0,20-20V56A20,20,0,0,0,100,36ZM96,96H60V60H96ZM200,36H156a20,20,0,0,0-20,20v44a20,20,0,0,0,20,20h44a20,20,0,0,0,20-20V56A20,20,0,0,0,200,36Zm-4,60H160V60h36Zm-96,40H56a20,20,0,0,0-20,20v44a20,20,0,0,0,20,20h44a20,20,0,0,0,20-20V156A20,20,0,0,0,100,136Zm-4,60H60V160H96Zm104-60H156a20,20,0,0,0-20,20v44a20,20,0,0,0,20,20h44a20,20,0,0,0,20-20V156A20,20,0,0,0,200,136Zm-4,60H160V160h36Z"/>'),dz=Ga("squares-four","0 0 256 256",'<path d="M120,56v48a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40h48A16,16,0,0,1,120,56Zm80-16H152a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm-96,96H56a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V152A16,16,0,0,0,104,136Zm96,0H152a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V152A16,16,0,0,0,200,136Z"/>'),hz=Ga("squares-four","0 0 256 256",'<path d="M112,56v48a8,8,0,0,1-8,8H56a8,8,0,0,1-8-8V56a8,8,0,0,1,8-8h48A8,8,0,0,1,112,56Zm88-8H152a8,8,0,0,0-8,8v48a8,8,0,0,0,8,8h48a8,8,0,0,0,8-8V56A8,8,0,0,0,200,48Zm-96,96H56a8,8,0,0,0-8,8v48a8,8,0,0,0,8,8h48a8,8,0,0,0,8-8V152A8,8,0,0,0,104,144Zm96,0H152a8,8,0,0,0-8,8v48a8,8,0,0,0,8,8h48a8,8,0,0,0,8-8V152A8,8,0,0,0,200,144Z" opacity="0.2"/><path d="M200,136H152a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V152A16,16,0,0,0,200,136Zm0,64H152V152h48v48ZM104,40H56A16,16,0,0,0,40,56v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V56A16,16,0,0,0,104,40Zm0,64H56V56h48v48Zm96-64H152a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,64H152V56h48v48Zm-96,32H56a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V152A16,16,0,0,0,104,136Zm0,64H56V152h48v48Z"/>'),fz="squares-four",fb=Object.freeze(Object.defineProperty({__proto__:null,bold:uz,default:yp,duotone:hz,fill:dz,glyphName:fz,light:cz,regular:yp,thin:oz},Symbol.toStringTag,{value:"Module"})),pz={key:0,class:"plugin-cards"},_z={class:"plugin-avatar"},mz=["src","alt"],vz={class:"plugin-meta"},gz={class:"plugin-name"},bz={key:0,class:"plugin-platform"},yz={class:"plugin-version"},wz={key:0,class:"plugin-desc"},Sz={key:1,class:"plugin-author"},Cz={key:2,class:"plugin-links"},kz=["href"],Az=["href"],Mz={key:3,class:"plugin-error"},$z={class:"cell-name"},Lz={class:"plugin-avatar plugin-avatar--sm"},Ez=["src","alt"],xz={class:"plugin-name"},Hz={key:0,class:"plugin-platform"},Tz=Ne({__name:"PluginList",props:{rows:{},view:{},selectedId:{}},emits:["select"],setup(e,{emit:t}){const i=e,n=t;function r(o){return o==="running"?"green":o==="error"?"red":o==="loading"?"blue":"grey"}const s=K({key:"name",direction:"asc"}),a=[{key:"name",header:"Plugin",sortable:!0},{key:"version",header:"Version",sortable:!0,width:140},{key:"source",header:"Source",sortable:!0,width:120},{key:"status",header:"Status",sortable:!0,width:120},{key:"author",header:"Author",sortable:!0}],l=q(()=>{const o=i.rows.map(d=>({id:d.plugin.id,name:d.plugin.manifest.name,version:`v${d.plugin.manifest.version}`,availableUpdate:d.plugin.availableUpdate,source:d.plugin.source==="homebridge"?"Homebridge":"Native",status:d.plugin.status,author:d.plugin.manifest.author??"—",platform:d.plugin.source==="homebridge"?d.plugin.platformName:void 0,avatarUrl:d.avatarUrl,isOpenBridge:d.isOpenBridge,plugin:d.plugin})),c=s.value;if(!c||c.direction==="none")return o;const u=c.direction==="asc"?1:-1;return[...o].sort((d,h)=>u*String(d[c.key]??"").localeCompare(String(h[c.key]??"")))});return(o,c)=>{const u=Ue,d=Cs,h=yi,f=Ss,v=b2;return e.view==="cards"?(m(),M("div",pz,[(m(!0),M(Ce,null,Fe(e.rows,p=>(m(),he(f,{key:p.plugin.id,class:Le(["plugin-card",{"plugin-card--selected":p.plugin.id===e.selectedId}]),onClick:w=>n("select",p.plugin)},{default:G(()=>[b("span",{class:Le(["plugin-card__accent",`plugin-card__accent--${p.plugin.status}`])},null,2),j(h,{dir:"row",align:"start",gap:"sm",class:"plugin-card__header"},{default:G(()=>[b("div",_z,[p.avatarUrl?(m(),M("img",{key:0,src:p.avatarUrl,alt:p.plugin.manifest.name,onError:c[0]||(c[0]=w=>w.target.style.display="none")},null,40,mz)):(m(),he(u,{key:1,name:p.isOpenBridge?de(zs):de(bs),size:20},null,8,["name"]))]),b("div",vz,[b("div",gz,Z(p.plugin.manifest.name),1),p.plugin.source==="homebridge"&&p.plugin.platformName?(m(),M("div",bz," Platform: "+Z(p.plugin.platformName),1)):V("",!0),b("div",yz,[le(" v"+Z(p.plugin.manifest.version)+" ",1),p.plugin.availableUpdate?(m(),he(d,{key:0,variant:"blue",size:"sm"},{default:G(()=>[le(" v"+Z(p.plugin.availableUpdate)+" available ",1)]),_:2},1024)):V("",!0)])]),j(d,{variant:r(p.plugin.status)},{default:G(()=>[le(Z(p.plugin.status),1)]),_:2},1032,["variant"])]),_:2},1024),p.plugin.manifest.description?(m(),M("p",wz,Z(p.plugin.manifest.description),1)):V("",!0),p.plugin.manifest.author?(m(),M("p",Sz,"by "+Z(p.plugin.manifest.author),1)):V("",!0),p.sponsorUrl||p.docsUrl?(m(),M("div",Cz,[p.sponsorUrl?(m(),M("a",{key:0,href:p.sponsorUrl,target:"_blank",rel:"noopener",onClick:c[1]||(c[1]=qe(()=>{},["stop"]))},[j(u,{name:de(M2),weight:"fill",size:11},null,8,["name"]),c[6]||(c[6]=le(" Sponsor ",-1))],8,kz)):V("",!0),p.docsUrl?(m(),M("a",{key:1,href:p.docsUrl,target:"_blank",rel:"noopener",onClick:c[2]||(c[2]=qe(()=>{},["stop"]))},[j(u,{name:de(ub),size:11},null,8,["name"]),c[7]||(c[7]=le(" Docs ",-1))],8,Az)):V("",!0)])):V("",!0),p.plugin.error?(m(),M("div",Mz,Z(p.plugin.error),1)):V("",!0)]),_:2},1032,["class","onClick"]))),128))])):(m(),he(v,{key:1,columns:a,rows:l.value,"row-key":"id",size:"sm",zebra:"","sort-state":s.value,onSort:c[4]||(c[4]=p=>s.value=p),onRowClick:c[5]||(c[5]=p=>n("select",p.plugin))},{"cell-name":G(({row:p})=>[b("div",$z,[b("div",Lz,[p.avatarUrl?(m(),M("img",{key:0,src:p.avatarUrl,alt:p.name,onError:c[3]||(c[3]=w=>w.target.style.display="none")},null,40,Ez)):(m(),he(u,{key:1,name:p.isOpenBridge?de(zs):de(bs),size:14},null,8,["name"]))]),b("div",null,[b("div",xz,Z(p.name),1),p.platform?(m(),M("div",Hz,"Platform: "+Z(p.platform),1)):V("",!0)])])]),"cell-version":G(({row:p})=>[le(Z(p.version)+" ",1),p.availableUpdate?(m(),he(d,{key:0,variant:"blue",size:"sm"},{default:G(()=>[le("v"+Z(p.availableUpdate),1)]),_:2},1024)):V("",!0)]),"cell-status":G(({row:p})=>[j(d,{variant:r(p.status)},{default:G(()=>[le(Z(p.status),1)]),_:2},1032,["variant"])]),_:1},8,["rows","sort-state"]))}}}),Nz=zt(Tz,[["__scopeId","data-v-8fdf7ec9"]]),Pz={class:"plugins-view"},Oz={key:0,class:"empty-state"},Iz={key:0},wp="openbridge.plugins.view",Rz=Ne({__name:"PluginsView",setup(e){const t=Kr(),i=Qo(),n=Ms(),r=N2(),s=K(""),a=K(new Map),l=K(new Set),o=K(!1),c=K(localStorage.getItem(wp)==="table"?"table":"cards");function u(){c.value=c.value==="cards"?"table":"cards",localStorage.setItem(wp,c.value)}const d=q(()=>{var T;return i.visible&&i.mode==="plugin"?((T=i.selectedPlugin)==null?void 0:T.id)??null:null}),h=q(()=>p().map(T=>{const X=y(T);return{plugin:T,avatarUrl:E(T),isOpenBridge:_(T),sponsorUrl:X==null?void 0:X.githubSponsorsUrl,docsUrl:X==null?void 0:X.documentationUrl}}));function f(T){if(T.source==="homebridge"){const W=(T.manifest.description??"").match(/Homebridge platform:\s*([^\s]+)/);if(W!=null&&W[1])return W[1]}return T.manifest.name}function v(T){var x;const W=(x=(T.manifest.description??"").match(/Homebridge platform:\s*([^\s]+)/))==null?void 0:x[1],A=[f(T),W,T.manifest.name,T.id];return Array.from(new Set(A.filter(F=>!!F&&F.trim().length>0)))}function p(){const T=s.value.toLowerCase();return t.plugins.filter(X=>X.manifest.name.toLowerCase().includes(T)||(X.manifest.description??"").toLowerCase().includes(T))}function w(T){var X;((X=i.selectedPlugin)==null?void 0:X.id)===T.id&&i.visible&&i.mode==="plugin"?i.close():i.openPlugin(T)}function _(T){return T.manifest.name.includes("openbridge-")||T.source==="native"}function y(T){const X=v(T);for(const W of X){const A=a.value.get(W);if(A)return A}if(T.enrichedMetadata)return T.enrichedMetadata}async function C(T,X=!1){var A;const W=v(T);for(const x of W)if(!(!X&&a.value.has(x))&&!(!X&&l.value.has(x))){l.value.add(x);try{const F=await Re.marketplace.enriched(x),ie=new Map(a.value);if(ie.set(x,F),ie.set(f(T),F),a.value=ie,T.enrichedMetadata=F,F.documentationUrl||F.githubSponsorsUrl||(A=F.links)!=null&&A.repository)return}catch{}finally{const F=new Set(l.value);F.delete(x),l.value=F}}}const g=K(new Map);function $(T){const W=T.trim().replace(/^github:/,"https://github.com/").replace(/^git\+/,"").replace(/^git@github\.com:/,"https://github.com/").match(/github\.com[/:]([^/]+)/);return W?`https://github.com/${W[1]}.png?size=48`:null}function E(T){var x,F;const X=y(T),W=((x=X==null?void 0:X.links)==null?void 0:x.repository)??((F=X==null?void 0:X.links)==null?void 0:F.homepage)??"";if(W){const ie=$(W);if(ie)return ie}const A=v(T);for(const ie of A){const re=g.value.get(ie);if(re)return re}return null}async function L(T,X=!1){var W;if(!(!X&&g.value.has(T)))try{const A=await fetch(`https://registry.npmjs.org/${encodeURIComponent(T)}/latest`,{signal:AbortSignal.timeout(5e3)});if(!A.ok){g.value.set(T,"");return}const x=await A.json(),F=((W=x==null?void 0:x.repository)==null?void 0:W.url)??(x==null?void 0:x.homepage)??"";g.value.set(T,$(F)??"")}catch{g.value.set(T,"")}}async function B(T=!1){if(!o.value){o.value=!0;try{T&&(a.value=new Map,g.value=new Map);const X=t.plugins;for(const W of X){const A=v(W);for(const x of A)await L(x,T);await C(W,T)}T&&r.success("Plugin metadata refreshed")}catch{r.error("Failed to refresh plugin metadata")}finally{o.value=!1}}}return nt(async()=>{await t.fetchPlugins()}),Ve(()=>t.plugins.length,T=>{n.setPage("Plugins",T)},{immediate:!0}),(T,X)=>{const W=Wr,A=Pt,x=Ue;return m(),M("div",Pz,[(m(),he(an,{defer:"",to:"#ob-topbar-right"},[j(W,{modelValue:s.value,"onUpdate:modelValue":X[0]||(X[0]=F=>s.value=F),placeholder:"Search plugins...",size:"sm",style:{width:"200px"}},null,8,["modelValue"]),j(A,{variant:"ghost",size:"sm",icon:tz,title:"Refresh metadata",loading:o.value,disabled:o.value,onClick:X[1]||(X[1]=F=>B(!0))},null,8,["loading","disabled"]),j(A,{variant:"ghost",size:"sm",icon:c.value===db?hb:fb,title:c.value==="cards"?"Show as table":"Show as cards",onClick:u},null,8,["icon","title"]),j(A,{variant:"primary",size:"sm",icon:od,onClick:X[2]||(X[2]=F=>de(i).openMarketplace())},{default:G(()=>[...X[5]||(X[5]=[le(" Browse plugins ",-1)])]),_:1})])),h.value.length===0?(m(),M("div",Oz,[j(x,{name:de(bs),size:40},null,8,["name"]),s.value?(m(),M("p",Iz,'No plugins matching "'+Z(s.value)+'"',1)):(m(),M(Ce,{key:1},[X[7]||(X[7]=b("p",null,"No plugins loaded yet.",-1)),j(A,{variant:"primary",size:"sm",icon:od,onClick:X[3]||(X[3]=F=>de(i).openMarketplace())},{default:G(()=>[...X[6]||(X[6]=[le(" Browse & install plugins ",-1)])]),_:1})],64))])):(m(),M("div",{key:1,class:"plugins-body",onClick:X[4]||(X[4]=qe(F=>de(i).close(),["self"]))},[j(Nz,{rows:h.value,view:c.value,"selected-id":d.value,onSelect:w},null,8,["rows","view","selected-id"])]))])}}}),Vz=zt(Rz,[["__scopeId","data-v-95e3ebc4"]]),Ya=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},Dz=Ya("devices","0 0 256 256",'<path d="M224,76H204V64a20,20,0,0,0-20-20H40A20,20,0,0,0,20,64v96a20,20,0,0,0,20,20H156v12a20,20,0,0,0,20,20h48a20,20,0,0,0,20-20V96A20,20,0,0,0,224,76ZM40,172a12,12,0,0,1-12-12V64A12,12,0,0,1,40,52H184a12,12,0,0,1,12,12V76H176a20,20,0,0,0-20,20v76Zm196,20a12,12,0,0,1-12,12H176a12,12,0,0,1-12-12V96a12,12,0,0,1,12-12h48a12,12,0,0,1,12,12ZM132,208a4,4,0,0,1-4,4H88a4,4,0,0,1,0-8h40A4,4,0,0,1,132,208Zm80-96a4,4,0,0,1-4,4H192a4,4,0,0,1,0-8h16A4,4,0,0,1,212,112Z"/>'),Zz=Ya("devices","0 0 256 256",'<path d="M224,74H206V64a22,22,0,0,0-22-22H40A22,22,0,0,0,18,64v96a22,22,0,0,0,22,22H154v10a22,22,0,0,0,22,22h48a22,22,0,0,0,22-22V96A22,22,0,0,0,224,74ZM40,170a10,10,0,0,1-10-10V64A10,10,0,0,1,40,54H184a10,10,0,0,1,10,10V74H176a22,22,0,0,0-22,22v74Zm194,22a10,10,0,0,1-10,10H176a10,10,0,0,1-10-10V96a10,10,0,0,1,10-10h48a10,10,0,0,1,10,10ZM134,208a6,6,0,0,1-6,6H88a6,6,0,0,1,0-12h40A6,6,0,0,1,134,208Zm80-96a6,6,0,0,1-6,6H192a6,6,0,0,1,0-12h16A6,6,0,0,1,214,112Z"/>'),Od=Ya("devices","0 0 256 256",'<path d="M224,72H208V64a24,24,0,0,0-24-24H40A24,24,0,0,0,16,64v96a24,24,0,0,0,24,24H152v8a24,24,0,0,0,24,24h48a24,24,0,0,0,24-24V96A24,24,0,0,0,224,72ZM40,168a8,8,0,0,1-8-8V64a8,8,0,0,1,8-8H184a8,8,0,0,1,8,8v8H176a24,24,0,0,0-24,24v72Zm192,24a8,8,0,0,1-8,8H176a8,8,0,0,1-8-8V96a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8Zm-96,16a8,8,0,0,1-8,8H88a8,8,0,0,1,0-16h40A8,8,0,0,1,136,208Zm80-96a8,8,0,0,1-8,8H192a8,8,0,0,1,0-16h16A8,8,0,0,1,216,112Z"/>'),Bz=Ya("devices","0 0 256 256",'<path d="M224,72H212V64a28,28,0,0,0-28-28H40A28,28,0,0,0,12,64v88a28,28,0,0,0,28,28h96v12a28,28,0,0,0,28,28h60a28,28,0,0,0,28-28V100A28,28,0,0,0,224,72ZM40,156a4,4,0,0,1-4-4V64a4,4,0,0,1,4-4H184a4,4,0,0,1,4,4v8H164a28,28,0,0,0-28,28v56Zm188,36a4,4,0,0,1-4,4H164a4,4,0,0,1-4-4V100a4,4,0,0,1,4-4h60a4,4,0,0,1,4,4ZM124,208a12,12,0,0,1-12,12H88a12,12,0,0,1,0-24h24A12,12,0,0,1,124,208Zm88-84a12,12,0,0,1-12,12H188a12,12,0,0,1,0-24h12A12,12,0,0,1,212,124Z"/>'),Fz=Ya("devices","0 0 256 256",'<path d="M224,72H208V64a24,24,0,0,0-24-24H40A24,24,0,0,0,16,64v96a24,24,0,0,0,24,24H152v8a24,24,0,0,0,24,24h48a24,24,0,0,0,24-24V96A24,24,0,0,0,224,72Zm8,120a8,8,0,0,1-8,8H176a8,8,0,0,1-8-8V96a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8Zm-96,16a8,8,0,0,1-8,8H88a8,8,0,0,1,0-16h40A8,8,0,0,1,136,208Zm80-96a8,8,0,0,1-8,8H192a8,8,0,0,1,0-16h16A8,8,0,0,1,216,112Z"/>'),zz=Ya("devices","0 0 256 256",'<path d="M200,64V80H176a16,16,0,0,0-16,16v80H40a16,16,0,0,1-16-16V64A16,16,0,0,1,40,48H184A16,16,0,0,1,200,64Z" opacity="0.2"/><path d="M224,72H208V64a24,24,0,0,0-24-24H40A24,24,0,0,0,16,64v96a24,24,0,0,0,24,24H152v8a24,24,0,0,0,24,24h48a24,24,0,0,0,24-24V96A24,24,0,0,0,224,72ZM40,168a8,8,0,0,1-8-8V64a8,8,0,0,1,8-8H184a8,8,0,0,1,8,8v8H176a24,24,0,0,0-24,24v72Zm192,24a8,8,0,0,1-8,8H176a8,8,0,0,1-8-8V96a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8Zm-96,16a8,8,0,0,1-8,8H88a8,8,0,0,1,0-16h40A8,8,0,0,1,136,208Zm80-96a8,8,0,0,1-8,8H192a8,8,0,0,1,0-16h16A8,8,0,0,1,216,112Z"/>'),Uz="devices",Wz=Object.freeze(Object.defineProperty({__proto__:null,bold:Bz,default:Od,duotone:zz,fill:Fz,glyphName:Uz,light:Zz,regular:Od,thin:Dz},Symbol.toStringTag,{value:"Module"})),jz={class:"devices-view"},Kz={class:"toolbar-count"},qz={key:1,class:"empty-state"},Gz={class:"device-icon native-icon"},Yz={class:"device-info"},Xz={class:"device-name"},Jz={class:"device-type"},Qz={class:"device-summary"},eU={key:0,class:"summary-primary"},tU={class:"summary-primary"},iU={key:0,class:"summary-secondary"},nU={key:2,class:"summary-primary"},rU=["title"],sU={class:"device-info"},aU={class:"device-name"},lU={class:"device-type"},oU={key:0,class:"device-summary"},cU={class:"summary-primary"},uU=["title"],dU=["title"],hU={key:1},fU={class:"confirm-dialog"},pU={class:"confirm-icon"},_U={class:"confirm-message"},mU={class:"confirm-actions"},Sp="openbridge.devices.view",vU=Ne({__name:"DevicesView",setup(e){const t=Kr(),i=Qo(),n=_1();function r(N){var O;return((O=N.health)==null?void 0:O.status)==="stale"}function s(N){return N<90?`${Math.round(N)} seconds`:N<5400?`${Math.round(N/60)} minutes`:N<172800?`${Math.round(N/3600)} hours`:`${Math.round(N/86400)} days`}function a(N){const O=N.health;if(!O||O.status!=="stale")return"";const te=["Not responding"];return O.silentForSeconds!==null?te.push(`Silent for ${s(O.silentForSeconds)}.`):O.lastSeen&&te.push(`Last seen ${new Date(O.lastSeen).toLocaleString()}.`),O.reason&&te.push(O.reason),te.push("OpenBridge is running: the device itself is not answering. Check it is powered and reachable at its configured address.","Click to open it for its address, readings and recent events."),te.join(`
|
|
69
|
-
`)}const l=["Not responding","HomeKit reports this accessory as unreachable. Check it is powered and on the network.","Click to open it for its services and characteristics."].join(`
|
|
70
|
-
`);function o(N){var te;const O=(te=N.health)==null?void 0:te.status;return O==="ok"?"online":O==="stale"?"stale":"offline"}function c(N){var te;const O=(te=N.health)==null?void 0:te.status;return O==="ok"?"Responding":O==="stale"?"Not responding":"No data yet"}function u(N){n.push({name:"device-detail",params:{id:N.id}})}const d=Ms(),h=K(!1),f=K([]),v=K(localStorage.getItem(Sp)==="table"?"table":"cards");function p(){v.value=v.value==="cards"?"table":"cards",localStorage.setItem(Sp,v.value)}const w=K({key:"name",direction:"asc"}),_=[{key:"name",header:"Device",sortable:!0},{key:"type",header:"Type",sortable:!0,width:160},{key:"source",header:"Source",sortable:!0,width:120},{key:"state",header:"State",sortable:!0,width:120},{key:"detail",header:"Reading",sortable:!0,width:160}],y=q(()=>{const N=[...f.value.map(ee=>({key:"native:"+ee.id,name:ee.name,type:x(g(ee)),source:"Native",state:ee.telemetry.active===void 0?"":ee.telemetry.active?"On":"Off",stateOn:!!ee.telemetry.active,detail:C(ee),icon:A(g(ee)),unhealthy:r(ee),healthTooltip:a(ee),select:()=>L(ee)})),...t.accessories.map(ee=>{const me=ue(ee);return{key:"hap:"+ee.uuid,name:ee.displayName,type:T(ee.category).label,source:"HomeKit",state:ee.reachable?me?me.value?"On":"Off":"":"Not responding",stateOn:ee.reachable&&!!(me!=null&&me.value),detail:J(ee)??"",icon:T(ee.category).icon,unhealthy:!ee.reachable,healthTooltip:ee.reachable?"":l,select:()=>E(ee)}})],O=w.value;if(!O||O.direction==="none")return N;const te=O.direction==="asc"?1:-1;return[...N].sort((ee,me)=>te*String(ee[O.key]??"").localeCompare(String(me[O.key]??"")))});function C(N){const O=N.telemetry;return N.widgetType==="energy_meter"&&O.power!==void 0?`${ne(O.power,1)} W`:N.widgetType==="thermostat"&&O.currentTemperature!==void 0?`${ne(O.currentTemperature,1)}°C`:N.widgetType==="dehumidifier"&&O.currentHumidity!==void 0?`${ne(O.currentHumidity,0)}%`:O.power!==void 0?`${ne(O.power,1)} W`:""}function g(N){return N.homekitType||N.widgetType}const $=q(()=>i.mode!=="device"||!i.selectedDevice?null:i.selectedDevice.kind==="native"?i.selectedDevice.dev.id:i.selectedDevice.acc.uuid);function E(N){$.value===N.uuid?i.close():i.openDevice({kind:"hap",acc:N})}function L(N){$.value===N.id?i.close():i.openDevice({kind:"native",dev:N})}const B={1:{label:"Other",icon:"cube"},2:{label:"Bridge",icon:"intersect"},3:{label:"Fan",icon:"fan"},4:{label:"Garage Door",icon:"garage"},5:{label:"Light",icon:"lightbulb"},6:{label:"Lock",icon:"lock"},7:{label:"Outlet",icon:"plugs"},8:{label:"Switch",icon:"toggle-right"},9:{label:"Thermostat",icon:"thermometer"},10:{label:"Sensor",icon:"pulse"},11:{label:"Security",icon:"shield"},12:{label:"Door",icon:"door"},13:{label:"Window",icon:"app-window"},14:{label:"Window Covering",icon:"rows"},15:{label:"Programm. Switch",icon:"sliders"},16:{label:"Range Extender",icon:"broadcast"},17:{label:"Camera",icon:"camera"},18:{label:"Video Doorbell",icon:"bell"},19:{label:"Air Purifier",icon:"wind"},20:{label:"Heater/Cooler",icon:"thermometer-hot"},21:{label:"Air Conditioner",icon:"snowflake"},22:{label:"Humidifier",icon:"drop"},23:{label:"Dehumidifier",icon:"drop"},26:{label:"Speaker",icon:"speaker-high"},28:{label:"Sprinkler",icon:"drop"},29:{label:"Faucet",icon:"drop"},30:{label:"Shower",icon:"drop"},32:{label:"TV",icon:"television"},34:{label:"Router",icon:"broadcast"},36:{label:"Target Control",icon:"game-controller"},38:{label:"Smart Speaker",icon:"speaker-hifi"}};function T(N){return B[N]??{label:`Category ${N}`,icon:"cube"}}const X={switch:"plugs",light:"lightbulb",thermostat:"thermometer",dehumidifier:"drop",energy_meter:"lightning",gate:"garage",sensor:"pulse",camera:"camera"},W={camera:"Camera",switch:"Switch",light:"Light",thermostat:"Thermostat",dehumidifier:"Dehumidifier",energy_meter:"Energy Meter",gate:"Gate",sensor:"Sensor"};function A(N){return X[N]??"cube"}function x(N){return W[N]??N}const F=new Set(["AccessoryInformation","0000003E-0000-1000-8000-0026BB765291","ProtocolInformation","000000A2-0000-1000-8000-0026BB765291"]),ie=new Set(["On","Active","LockTargetState","TargetDoorState"]);function re(N){return N.services.find(O=>!F.has(O.name)&&!F.has(O.uuid))}function ue(N){const O=re(N);return O?O.characteristics.find(te=>ie.has(te.name)&&te.perms.includes("pw"))??null:null}function J(N){if(!N.reachable)return"Not responding";const O=re(N);if(!O)return null;for(const ee of O.characteristics){if(ee.name==="CurrentTemperature"&&ee.value!=null)return`${Number(ee.value).toFixed(1)}°C`;if(ee.name==="CurrentRelativeHumidity"&&ee.value!=null)return`${Math.round(Number(ee.value))}%`;if(ee.name==="CurrentPosition"&&ee.value!=null)return`${Math.round(Number(ee.value))}%`;if(ee.name==="Brightness"&&ee.value!=null)return`${Math.round(Number(ee.value))}%`}const te=O.characteristics.find(ee=>ee.name==="On");return te?te.value?"On":"Off":null}async function ae(N,O){const te=re(N),ee=ue(N);if(!(!te||!ee))try{await Re.setCharacteristic(N.uuid,te.uuid,ee.uuid,O?1:0),await t.fetchAccessories()}catch(me){console.error("HAP control failed",me)}}function ne(N,O=1){if(N==null)return"—";const te=Number(N);return isFinite(te)?te.toFixed(O):String(N)}const Q=q(()=>t.accessories.length+f.value.length);async function oe(){var N;try{const O=await Re.devices();if(f.value=O.devices,i.mode==="device"&&((N=i.selectedDevice)==null?void 0:N.kind)==="native"){const te=i.selectedDevice.dev.id,ee=O.devices.find(me=>me.id===te);ee&&i.updateDevice({kind:"native",dev:ee})}}catch{}}async function ve(){h.value=!0,await Promise.all([t.fetchAccessories(),oe()]),h.value=!1}let fe=null;const pe=K({visible:!1,deviceId:"",control:"",value:null,message:""});function ye(N,O,te){return N.widgetType==="energy_meter"&&O==="active"?te?`Turn on ${N.name}? This will energise the connected circuit.`:`Turn off ${N.name}? This will cut power to the connected circuit.`:!1}async function U(N,O,te){try{await Re.controlDevice(N,O,te),await oe()}catch(ee){console.error("Control failed",ee)}}function _e(N,O,te){const ee=ye(N,O,te);ee?pe.value={visible:!0,deviceId:N.id,control:O,value:te,message:ee}:U(N.id,O,te)}function ge(){const{deviceId:N,control:O,value:te}=pe.value;pe.value.visible=!1,U(N,O,te)}function se(){pe.value.visible=!1}async function H(){var N;if(await Promise.all([t.fetchAccessories(),oe()]),i.mode==="device"&&((N=i.selectedDevice)==null?void 0:N.kind)==="hap"){const O=i.selectedDevice.acc.uuid,te=t.accessories.find(ee=>ee.uuid===O);te&&i.updateDevice({kind:"hap",acc:te})}}return nt(async()=>{d.setPage("Devices"),await H(),fe=setInterval(H,3e3)}),Ii(()=>{fe&&clearInterval(fe)}),(N,O)=>{const te=Cs,ee=Pt,me=Ue,we=o1,S=w2,k=Ss,D=b2;return m(),M("div",jz,[Q.value>0?(m(),he(an,{key:0,defer:"",to:"#ob-topbar-left"},[b("span",Kz,Z(Q.value)+" device"+Z(Q.value!==1?"s":""),1),f.value.length>0?(m(),he(te,{key:0},{default:G(()=>[le(Z(f.value.length)+" native",1)]),_:1})):V("",!0)])):V("",!0),(m(),he(an,{defer:"",to:"#ob-topbar-right"},[j(ee,{variant:"ghost",size:"sm",icon:v.value===db?hb:fb,title:v.value==="cards"?"Show as table":"Show as cards",onClick:p},null,8,["icon","title"]),j(ee,{variant:"ghost",size:"sm",icon:_s,title:"Refresh",loading:h.value,onClick:ve},null,8,["loading"])])),Q.value===0?(m(),M("div",qz,[j(me,{name:de(Od),size:40},null,8,["name"]),O[8]||(O[8]=b("p",null,"No devices registered yet.",-1)),O[9]||(O[9]=b("p",{class:"empty-hint"},[le(" Devices appear here once a platform plugin registers accessories. "),b("br"),le(" This page auto-refreshes every 3 seconds: discovery can take up to 60s. ")],-1))])):(m(),M("div",{key:2,class:"devices-layout",onClick:O[7]||(O[7]=qe(P=>de(i).close(),["self"]))},[v.value==="cards"?(m(),M("div",{key:0,class:"device-grid",onClick:O[4]||(O[4]=qe(P=>de(i).close(),["self"]))},[(m(!0),M(Ce,null,Fe(f.value,P=>(m(),he(k,{key:"native:"+P.id,class:Le(["device-card native-card",{selected:$.value===P.id,unhealthy:r(P)}]),title:r(P)?a(P):void 0,onClick:R=>L(P),onDblclick:R=>u(P)},{default:G(()=>{var R;return[O[10]||(O[10]=b("span",{class:"device-card__accent"},null,-1)),b("div",Gz,[j(me,{name:A(g(P)),size:22},null,8,["name"])]),b("div",Yz,[b("div",Xz,[r(P)?(m(),he(me,{key:0,name:de(xn),size:14,class:"name-health-icon"},null,8,["name"])):V("",!0),b("span",null,Z(P.name),1)]),b("div",Jz,Z(x(g(P))),1),b("div",Qz,[P.widgetType==="energy_meter"&&P.telemetry.power!==void 0?(m(),M("span",eU,Z(ne(P.telemetry.power,1))+" W",1)):P.widgetType==="thermostat"&&P.telemetry.currentTemperature!==void 0?(m(),M(Ce,{key:1},[b("span",tU,Z(ne(P.telemetry.currentTemperature,1))+"°C",1),P.telemetry.targetTemperature!==void 0?(m(),M("span",iU," target "+Z(ne(P.telemetry.targetTemperature,1))+"°C ",1)):V("",!0)],64)):P.widgetType==="dehumidifier"&&P.telemetry.currentHumidity!==void 0?(m(),M("span",nU,Z(ne(P.telemetry.currentHumidity,0))+"%",1)):P.telemetry.active!==void 0?(m(),M("span",{key:3,class:Le(["summary-status",P.telemetry.active?"on":"off"])},Z(P.telemetry.active?"On":"Off"),3)):V("",!0)]),P.telemetry.active!==void 0?(m(),M("div",{key:0,class:"card-controls",onClick:O[0]||(O[0]=qe(()=>{},["stop"]))},[j(we,{name:`device-active-${P.id}`,"model-value":!!P.telemetry.active,"onUpdate:modelValue":I=>_e(P,"active",I)},null,8,["name","model-value","onUpdate:modelValue"])])):V("",!0),P.widgetType==="thermostat"&&P.telemetry.targetTemperature!==void 0?(m(),M("div",{key:1,class:"card-controls",onClick:O[1]||(O[1]=qe(()=>{},["stop"]))},[j(S,{"model-value":Number(P.telemetry.targetTemperature),size:"xs",min:5,max:35,step:1,"onUpdate:modelValue":I=>I!==null&&U(P.id,"targetTemperature",I)},null,8,["model-value","onUpdate:modelValue"])])):V("",!0),P.widgetType==="dehumidifier"&&P.telemetry.targetHumidity!==void 0?(m(),M("div",{key:2,class:"card-controls",onClick:O[2]||(O[2]=qe(()=>{},["stop"]))},[j(S,{"model-value":Number(P.telemetry.targetHumidity),size:"xs",min:30,max:80,step:5,"onUpdate:modelValue":I=>I!==null&&U(P.id,"targetHumidity",I)},null,8,["model-value","onUpdate:modelValue"])])):V("",!0)]),b("div",{class:Le(["device-reachability",o(P)]),title:((R=P.health)==null?void 0:R.reason)??c(P)},null,10,rU)]}),_:2},1032,["class","title","onClick","onDblclick"]))),128)),(m(!0),M(Ce,null,Fe(de(t).accessories,P=>(m(),he(k,{key:P.uuid,class:Le(["device-card hap-card",{selected:$.value===P.uuid,unreachable:!P.reachable,unhealthy:!P.reachable}]),title:P.reachable?void 0:de(l),onClick:R=>E(P)},{default:G(()=>{var R;return[b("div",{class:Le(["device-icon hap-icon",{unreachable:!P.reachable}])},[j(me,{name:T(P.category).icon,size:22},null,8,["name"])],2),b("div",sU,[b("div",aU,[P.reachable?V("",!0):(m(),he(me,{key:0,name:de(xn),size:14,class:"name-health-icon"},null,8,["name"])),b("span",null,Z(P.displayName),1)]),b("div",lU,Z(T(P.category).label),1),J(P)?(m(),M("div",oU,[b("span",cU,Z(J(P)),1)])):V("",!0),ue(P)?(m(),M("div",{key:1,class:"card-controls",onClick:O[3]||(O[3]=qe(()=>{},["stop"]))},[j(we,{name:`hap-on-${P.uuid}`,"model-value":!!((R=ue(P))!=null&&R.value),"onUpdate:modelValue":I=>ae(P,!!I)},null,8,["name","model-value","onUpdate:modelValue"])])):V("",!0)]),b("div",{class:Le(["device-reachability",P.reachable?"online":"stale"]),title:P.reachable?"Responding":de(l)},null,10,uU)]}),_:2},1032,["class","title","onClick"]))),128))])):(m(),he(D,{key:1,columns:_,rows:y.value,"row-key":"key",size:"sm",zebra:"","sort-state":w.value,onSort:O[5]||(O[5]=P=>w.value=P),onRowClick:O[6]||(O[6]=P=>P.select())},{"cell-name":G(({row:P})=>[b("div",{class:"cell-name",title:P.healthTooltip||void 0},[j(me,{name:P.icon,size:16},null,8,["name"]),b("span",null,Z(P.name),1),P.unhealthy?(m(),he(me,{key:0,name:de(xn),size:14,class:"cell-health-icon"},null,8,["name"])):V("",!0)],8,dU)]),"cell-state":G(({row:P})=>[P.state?(m(),he(te,{key:0,variant:P.unhealthy?"orange":P.stateOn?"green":"grey"},{default:G(()=>[le(Z(P.state),1)]),_:2},1032,["variant"])):(m(),M("span",hU,"—"))]),_:1},8,["rows","sort-state"]))])),(m(),he(an,{to:"body"},[pe.value.visible?(m(),M("div",{key:0,class:"confirm-overlay",onClick:qe(se,["self"])},[b("div",fU,[b("div",pU,[j(me,{name:de(xn),size:24},null,8,["name"])]),b("p",_U,Z(pe.value.message),1),b("div",mU,[j(ee,{variant:"ghost",size:"sm",onClick:se},{default:G(()=>[...O[11]||(O[11]=[le("Cancel",-1)])]),_:1}),j(ee,{variant:"primary",size:"sm",onClick:ge},{default:G(()=>[...O[12]||(O[12]=[le("Confirm",-1)])]),_:1})])])])):V("",!0)]))])}}}),gU=zt(vU,[["__scopeId","data-v-5ae916c1"]]),bU={class:"device-detail"},yU={class:"detail-header"},wU={key:0,class:"detail-model"},SU={key:0,class:"detail-message"},CU={class:"summary-row"},kU=["onClick"],AU={class:"tile-label"},MU={class:"tile-value"},$U={class:"tile-unit"},LU={key:0,class:"detail-message"},EU={class:"chart-toolbar"},xU={class:"range-tabs"},HU=["onClick"],TU={key:0,class:"resolution-note"},NU={class:"chart-panel"},PU={key:1,class:"chart-empty"},OU={key:2,class:"chart-empty"},IU={key:2,class:"detail-message"},RU=Ne({__name:"DeviceDetailView",setup(e){const t=Jo(),i=q(()=>String(t.params.id??"")),n=K(null),r=K([]),s=K(""),a=K(!1),l=K(""),o=K(0),c=K([]),u=[{key:"1h",label:"1 hour",seconds:3600},{key:"24h",label:"24 hours",seconds:86400},{key:"7d",label:"7 days",seconds:7*86400},{key:"30d",label:"30 days",seconds:30*86400},{key:"1y",label:"1 year",seconds:365*86400}],d=K("24h"),h=q(()=>{var B;return[{label:"Devices",to:{name:"devices"}},{label:((B=n.value)==null?void 0:B.name)??i.value}]}),f=q(()=>r.value.find(B=>B.key===s.value)??null),v=q(()=>{const B=f.value;if(!B||c.value.length===0)return[];const T={name:B.label,data:c.value.map(W=>({x:new Date(W.t*1e3),y:W.value??0}))};return c.value.some(W=>W.min!==void 0&&W.min!==null&&W.min!==W.value)?[T,{name:"Min",data:c.value.map(W=>({x:new Date(W.t*1e3),y:W.min??W.value??0}))},{name:"Max",data:c.value.map(W=>({x:new Date(W.t*1e3),y:W.max??W.value??0}))}]:[T]}),p=q(()=>{if(!o.value)return"";const B=o.value;return B<60?`${B}s resolution`:B<3600?`${Math.round(B/60)} min resolution`:`${Math.round(B/3600)} h resolution`});function w(B){var W,A;const T=(A=(W=n.value)==null?void 0:W.telemetry)==null?void 0:A[B.key],X=Number(T);return Number.isFinite(X)?X:null}function _(B,T){return B===null?"—":B.toFixed(T.precision??2)}function y(B){s.value!==B&&(s.value=B,$())}function C(B){d.value!==B&&(d.value=B,$())}async function g(){try{const{devices:B}=await Re.devices(),T=B.find(X=>X.id===i.value);if(!T){l.value=`Device "${i.value}" was not found. It may have been removed, or its plugin stopped.`;return}n.value=T,r.value=T.metrics??[],!s.value&&r.value.length>0&&(s.value=r.value[0].key)}catch(B){l.value=`Could not load device: ${B.message}`}}async function $(){var W,A;if(!s.value)return;const B=u.find(x=>x.key===d.value),T=Math.floor(Date.now()/1e3),X=T-B.seconds;a.value=!0;try{const x=await Re.deviceMetrics(i.value,{metric:s.value,from:X,to:T});c.value=((W=x.series)==null?void 0:W.points)??[],o.value=((A=x.series)==null?void 0:A.resolution)??0}catch(x){l.value=`Could not load history: ${x.message}`}finally{a.value=!1}}let E=null,L=null;return nt(async()=>{await g(),await $(),E=setInterval(()=>void g(),5e3),L=setInterval(()=>void $(),3e4)}),ri(()=>{E&&clearInterval(E),L&&clearInterval(L)}),Ve(i,async()=>{n.value=null,r.value=[],s.value="",c.value=[],l.value="",await g(),await $()}),(B,T)=>{var x;const X=$v,W=at,A=eH;return m(),M("div",bU,[b("div",yU,[j(X,{items:h.value},null,8,["items"]),(x=n.value)!=null&&x.model?(m(),M("span",wU,Z(n.value.model),1)):V("",!0)]),l.value?(m(),M("div",SU,[j(W,{variant:"error"},{default:G(()=>[le(Z(l.value),1)]),_:1})])):n.value?(m(),M(Ce,{key:1},[b("div",CU,[(m(!0),M(Ce,null,Fe(r.value,F=>(m(),M("div",{key:F.key,class:Le(["summary-tile",{active:F.key===s.value}]),onClick:ie=>y(F.key)},[b("span",AU,Z(F.label),1),b("span",MU,[le(Z(_(w(F),F))+" ",1),b("span",$U,Z(F.unit),1)])],10,kU))),128))]),r.value.length===0?(m(),M("div",LU,[j(W,{variant:"helper"},{default:G(()=>[...T[0]||(T[0]=[le(" This device does not declare any metrics, so there is nothing to chart. Plugins opt in by describing their series in the device descriptor. ",-1)])]),_:1})])):(m(),M(Ce,{key:1},[b("div",EU,[b("div",xU,[(m(),M(Ce,null,Fe(u,F=>b("button",{key:F.key,class:Le(["range-tab",{active:F.key===d.value}]),onClick:ie=>C(F.key)},Z(F.label),11,HU)),64))]),p.value?(m(),M("span",TU,Z(p.value),1)):V("",!0)]),b("div",NU,[v.value.length>0&&v.value[0].data.length>0?(m(),he(A,{key:0,series:v.value,height:320,"show-legend":v.value.length>1,"show-grid":!0,"show-tooltip":!0,points:!1,curve:"smooth"},null,8,["series","show-legend"])):a.value?(m(),M("div",PU,"Loading…")):(m(),M("div",OU," No data recorded yet for this range. History starts accumulating once the device reports. "))])],64))],64)):(m(),M("div",IU,"Loading…"))])}}}),VU=zt(RU,[["__scopeId","data-v-6e2a0af1"]]),Xa=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},DU=Xa("magic-wand","0 0 256 256",'<path d="M244,152a4,4,0,0,1-4,4H220v20a4,4,0,0,1-8,0V156H192a4,4,0,0,1,0-8h20V128a4,4,0,0,1,8,0v20h20A4,4,0,0,1,244,152ZM56,68H76V88a4,4,0,0,0,8,0V68h20a4,4,0,0,0,0-8H84V40a4,4,0,0,0-8,0V60H56a4,4,0,0,0,0,8ZM184,196H172V184a4,4,0,0,0-8,0v12H152a4,4,0,0,0,0,8h12v12a4,4,0,0,0,8,0V204h12a4,4,0,0,0,0-8ZM216.48,77.17,77.17,216.49a12,12,0,0,1-17,0L39.51,195.8a12,12,0,0,1,0-17L178.83,39.51a12,12,0,0,1,17,0L216.48,60.2A12,12,0,0,1,216.48,77.17ZM170.34,112,144,85.66,45.17,184.49a4,4,0,0,0,0,5.65l20.68,20.69a4,4,0,0,0,5.66,0Zm40.49-46.14L190.14,45.17a4,4,0,0,0-5.66,0L149.65,80,176,106.34l34.83-34.83A4,4,0,0,0,210.83,65.86Z"/>'),ZU=Xa("magic-wand","0 0 256 256",'<path d="M246,152a6,6,0,0,1-6,6H222v18a6,6,0,0,1-12,0V158H192a6,6,0,0,1,0-12h18V128a6,6,0,0,1,12,0v18h18A6,6,0,0,1,246,152ZM56,70H74V88a6,6,0,0,0,12,0V70h18a6,6,0,0,0,0-12H86V40a6,6,0,0,0-12,0V58H56a6,6,0,0,0,0,12ZM184,194H174V184a6,6,0,0,0-12,0v10H152a6,6,0,0,0,0,12h10v10a6,6,0,0,0,12,0V206h10a6,6,0,0,0,0-12ZM217.9,78.59,78.58,217.9a14,14,0,0,1-19.8,0L38.09,197.21a14,14,0,0,1,0-19.8L177.41,38.1a14,14,0,0,1,19.8,0L217.9,58.79A14,14,0,0,1,217.9,78.59ZM167.51,112,144,88.49,46.58,185.9a2,2,0,0,0,0,2.83l20.69,20.68a2,2,0,0,0,2.82,0h0Zm41.9-44.73L188.73,46.59a2,2,0,0,0-2.83,0L152.48,80,176,103.52,209.41,70.1A2,2,0,0,0,209.41,67.27Z"/>'),Cp=Xa("magic-wand","0 0 256 256",'<path d="M48,64a8,8,0,0,1,8-8H72V40a8,8,0,0,1,16,0V56h16a8,8,0,0,1,0,16H88V88a8,8,0,0,1-16,0V72H56A8,8,0,0,1,48,64ZM184,192h-8v-8a8,8,0,0,0-16,0v8h-8a8,8,0,0,0,0,16h8v8a8,8,0,0,0,16,0v-8h8a8,8,0,0,0,0-16Zm56-48H224V128a8,8,0,0,0-16,0v16H192a8,8,0,0,0,0,16h16v16a8,8,0,0,0,16,0V160h16a8,8,0,0,0,0-16ZM219.31,80,80,219.31a16,16,0,0,1-22.62,0L36.68,198.63a16,16,0,0,1,0-22.63L176,36.69a16,16,0,0,1,22.63,0l20.68,20.68A16,16,0,0,1,219.31,80Zm-54.63,32L144,91.31l-96,96L68.68,208ZM208,68.69,187.31,48l-32,32L176,100.69Z"/>'),BU=Xa("magic-wand","0 0 256 256",'<path d="M252,152a12,12,0,0,1-12,12H228v12a12,12,0,0,1-24,0V164H192a12,12,0,0,1,0-24h12V128a12,12,0,0,1,24,0v12h12A12,12,0,0,1,252,152ZM56,76H68V88a12,12,0,0,0,24,0V76h12a12,12,0,1,0,0-24H92V40a12,12,0,0,0-24,0V52H56a12,12,0,0,0,0,24ZM184,188h-4v-4a12,12,0,0,0-24,0v4h-4a12,12,0,0,0,0,24h4v4a12,12,0,0,0,24,0v-4h4a12,12,0,0,0,0-24ZM222.14,82.83,82.82,222.14a20,20,0,0,1-28.28,0L33.85,201.46a20,20,0,0,1,0-28.29L173.17,33.86a20,20,0,0,1,28.28,0l20.69,20.68A20,20,0,0,1,222.14,82.83ZM159,112,144,97,53.65,187.31l15,15Zm43.31-43.31-15-15L161,80l15,15Z"/>'),FU=Xa("magic-wand","0 0 256 256",'<path d="M248,152a8,8,0,0,1-8,8H224v16a8,8,0,0,1-16,0V160H192a8,8,0,0,1,0-16h16V128a8,8,0,0,1,16,0v16h16A8,8,0,0,1,248,152ZM56,72H72V88a8,8,0,0,0,16,0V72h16a8,8,0,0,0,0-16H88V40a8,8,0,0,0-16,0V56H56a8,8,0,0,0,0,16ZM184,192h-8v-8a8,8,0,0,0-16,0v8h-8a8,8,0,0,0,0,16h8v8a8,8,0,0,0,16,0v-8h8a8,8,0,0,0,0-16ZM219.31,80,80,219.31a16,16,0,0,1-22.62,0L36.68,198.63a16,16,0,0,1,0-22.63L176,36.69a16,16,0,0,1,22.63,0l20.68,20.68A16,16,0,0,1,219.31,80ZM208,68.69,187.31,48l-32,32L176,100.69Z"/>'),zU=Xa("magic-wand","0 0 256 256",'<path d="M176,112,74.34,213.66a8,8,0,0,1-11.31,0L42.34,193a8,8,0,0,1,0-11.31L144,80Z" opacity="0.2"/><path d="M248,152a8,8,0,0,1-8,8H224v16a8,8,0,0,1-16,0V160H192a8,8,0,0,1,0-16h16V128a8,8,0,0,1,16,0v16h16A8,8,0,0,1,248,152ZM56,72H72V88a8,8,0,0,0,16,0V72h16a8,8,0,0,0,0-16H88V40a8,8,0,0,0-16,0V56H56a8,8,0,0,0,0,16ZM184,192h-8v-8a8,8,0,0,0-16,0v8h-8a8,8,0,0,0,0,16h8v8a8,8,0,0,0,16,0v-8h8a8,8,0,0,0,0-16ZM219.31,80,80,219.31a16,16,0,0,1-22.62,0L36.68,198.63a16,16,0,0,1,0-22.63L176,36.69a16,16,0,0,1,22.63,0l20.68,20.68A16,16,0,0,1,219.31,80Zm-54.63,32L144,91.31l-96,96L68.68,208ZM208,68.69,187.31,48l-32,32L176,100.69Z"/>'),UU="magic-wand",WU=Object.freeze(Object.defineProperty({__proto__:null,bold:BU,default:Cp,duotone:zU,fill:FU,glyphName:UU,light:ZU,regular:Cp,thin:DU},Symbol.toStringTag,{value:"Module"})),jU={class:"config-view"},KU={key:0,class:"error-banner"},qU={key:1,class:"loading-state"},GU=Ne({__name:"ConfigView",setup(e){const t=Ms(),{resolved:i}=c1(),n=K(null),r=zn(null),s=K(!1),a=K(!1),l=K(null),o=K(!0);nt(async()=>{t.setPage("Config",void 0,{fullBleed:!0});let d="{}";try{d=(await Re.config.get()).content}catch(f){l.value=`Failed to load config: ${f}`}finally{o.value=!1}const h=await cb.init();h.languages.json.jsonDefaults.setDiagnosticsOptions({validate:!0,schemas:[{uri:"openbridge://config-schema",fileMatch:["*"],schema:{type:"object",properties:{bridge:{type:"object",description:"Bridge configuration",properties:{name:{type:"string",description:"Bridge display name"},port:{type:"number",description:"HTTP API port (default 8582)"},hapPort:{type:"number",description:"HomeKit HAP port (default 51829)"},pincode:{type:"string",description:"HomeKit pairing PIN (format: XXX-XX-XXX)"},username:{type:"string",description:"HAP username (MAC address format)"},logLevel:{type:"string",enum:["debug","info","warn","error"]}}},platforms:{type:"array",description:"Homebridge-compatible platform plugins",items:{type:"object",required:["platform"],properties:{platform:{type:"string",description:"Platform identifier"},plugin:{type:"string",description:"Absolute path to the plugin JS file"},enabled:{type:"boolean",default:!0}},additionalProperties:!0}},plugins:{type:"array",description:"Native OpenBridge plugins",items:{type:"object",required:["name"],properties:{name:{type:"string"},path:{type:"string"},enabled:{type:"boolean",default:!0},config:{type:"object"}}}}}}}]}),n.value&&(Ve(i,f=>h.editor.setTheme(f==="dark"?"vs-dark":"vs")),r.value=h.editor.create(n.value,{value:d,language:"json",theme:i.value==="dark"?"vs-dark":"vs",fontSize:13,fontFamily:'"MesloLGS NF", monospace',minimap:{enabled:!0},scrollBeyondLastLine:!1,formatOnPaste:!0,formatOnType:!0,tabSize:2,automaticLayout:!0,wordWrap:"off",bracketPairColorization:{enabled:!0},guides:{bracketPairs:!0},lineNumbers:"on",renderLineHighlight:"all",smoothScrolling:!0}))}),ri(()=>{var d;(d=r.value)==null||d.dispose()});async function c(){var d;if(!s.value){s.value=!0,l.value=null,a.value=!1;try{const h=((d=r.value)==null?void 0:d.getValue())??"";await Re.config.save(h),a.value=!0,setTimeout(()=>{a.value=!1},2500)}catch(h){l.value=String(h)}finally{s.value=!1}}}function u(){var d,h;(h=(d=r.value)==null?void 0:d.getAction("editor.action.formatDocument"))==null||h.run()}return(d,h)=>{const f=Pt,v=Ue;return m(),M("div",jU,[(m(),he(an,{defer:"",to:"#ob-topbar-left"},[h[0]||(h[0]=b("span",{class:"config-path"},"~/.openbridge/config.json",-1))])),(m(),he(an,{defer:"",to:"#ob-topbar-right"},[j(f,{variant:"ghost",size:"sm",icon:WU,title:"Format JSON",onClick:u},{default:G(()=>[...h[1]||(h[1]=[le("Format",-1)])]),_:1}),j(f,{variant:"primary",size:"sm",icon:a.value?dr:Hc,loading:s.value,disabled:s.value,title:"Changes take effect after restarting the daemon",onClick:c},{default:G(()=>[le(Z(a.value?"Saved!":s.value?"Saving…":"Save"),1)]),_:1},8,["icon","loading","disabled"])])),l.value?(m(),M("div",KU,[j(v,{name:de(xn),size:14},null,8,["name"]),le(" "+Z(l.value),1)])):V("",!0),o.value?(m(),M("div",qU,[j(v,{name:de(ra),size:28},null,8,["name"]),h[2]||(h[2]=b("span",null,"Loading config...",-1))])):(m(),M("div",{key:2,ref_key:"editorContainer",ref:n,class:"editor-container"},null,512))])}}}),YU=zt(GU,[["__scopeId","data-v-483debe2"]]),XU=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},JU=XU("bridge","0 0 256 256",'<path d="M232,160H200V101.34a71.89,71.89,0,0,0,29,21.42,8,8,0,0,0,6-14.83A55.78,55.78,0,0,1,200,56a8,8,0,0,0-16,0A56,56,0,0,1,72,56a8,8,0,0,0-16,0,55.78,55.78,0,0,1-35,51.93,8,8,0,0,0,6,14.83,71.89,71.89,0,0,0,29-21.42V160H24a8,8,0,0,0,0,16H56v24a8,8,0,0,0,16,0V176H184v24a8,8,0,0,0,16,0V176h32a8,8,0,0,0,0-16Zm-88-33.8V160H112V126.2a72,72,0,0,0,32,0Zm-72-25a72.47,72.47,0,0,0,24,19.27V160H72ZM160,160V120.48a72.47,72.47,0,0,0,24-19.27V160Z"/>'),QU=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},eW=QU("palette","0 0 256 256",'<path d="M200.77,53.89A103.27,103.27,0,0,0,128,24h-1.07A104,104,0,0,0,24,128c0,43,26.58,79.06,69.36,94.17A32,32,0,0,0,136,192a16,16,0,0,1,16-16h46.21a31.81,31.81,0,0,0,31.2-24.88,104.43,104.43,0,0,0,2.59-24A103.28,103.28,0,0,0,200.77,53.89Zm13,93.71A15.89,15.89,0,0,1,198.21,160H152a32,32,0,0,0-32,32,16,16,0,0,1-21.31,15.07C62.49,194.3,40,164,40,128a88,88,0,0,1,87.09-88h.9a88.35,88.35,0,0,1,88,87.25A88.86,88.86,0,0,1,213.81,147.6ZM140,76a12,12,0,1,1-12-12A12,12,0,0,1,140,76ZM96,100A12,12,0,1,1,84,88,12,12,0,0,1,96,100Zm0,56a12,12,0,1,1-12-12A12,12,0,0,1,96,156Zm88-56a12,12,0,1,1-12-12A12,12,0,0,1,184,100Z"/>'),tW=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},iW=tW("robot","0 0 256 256",'<path d="M200,48H136V16a8,8,0,0,0-16,0V48H56A32,32,0,0,0,24,80V192a32,32,0,0,0,32,32H200a32,32,0,0,0,32-32V80A32,32,0,0,0,200,48Zm16,144a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V80A16,16,0,0,1,56,64H200a16,16,0,0,1,16,16Zm-52-56H92a28,28,0,0,0,0,56h72a28,28,0,0,0,0-56Zm-24,16v24H116V152ZM80,164a12,12,0,0,1,12-12h8v24H92A12,12,0,0,1,80,164Zm84,12h-8V152h8a12,12,0,0,1,0,24ZM72,108a12,12,0,1,1,12,12A12,12,0,0,1,72,108Zm88,0a12,12,0,1,1,12,12A12,12,0,0,1,160,108Z"/>'),nW=Ne({__name:"NewTokenModal",props:{open:{type:Boolean}},emits:["close","created"],setup(e,{emit:t}){const i=e,n=t,r=K(""),s=K("read"),a=K(!1),l=K(""),o=K(),c=K(null);Ve(()=>i.open,h=>{h&&(r.value="",s.value="read",l.value="",o.value=void 0,requestAnimationFrame(()=>{var f;return(f=c.value)==null?void 0:f.focus()}))});function u(){o.value=r.value.trim()?void 0:"Give the token a name you will recognise later"}async function d(){if(u(),!o.value){a.value=!0,l.value="";try{const{token:h}=await Re.access.createToken(r.value.trim(),s.value);n("created",h)}catch(h){l.value=h.message}finally{a.value=!1}}}return(h,f)=>{const v=ks,p=Wr,w=ba,_=xN,y=Pt,C=dg;return m(),he(C,{"close-appearance":"button",open:e.open,title:"New token",size:"sm","close-on-overlay":!r.value,onClose:f[3]||(f[3]=g=>n("close"))},{footer:G(()=>[j(y,{type:"button",variant:"secondary",onClick:f[2]||(f[2]=g=>n("close"))},{default:G(()=>[...f[4]||(f[4]=[le("Cancel",-1)])]),_:1}),j(y,{type:"submit",form:"new-token-form",variant:"primary",loading:a.value},{default:G(()=>[...f[5]||(f[5]=[le("Create token",-1)])]),_:1},8,["loading"])]),default:G(()=>[j(_,{id:"new-token-form",onSubmit:qe(d,["prevent"])},{default:G(()=>[l.value?(m(),he(v,{key:0,status:"error",variant:"inline",title:l.value},null,8,["title"])):V("",!0),j(p,{id:"new-token-name",ref_key:"nameInput",ref:c,modelValue:r.value,"onUpdate:modelValue":f[0]||(f[0]=g=>r.value=g),label:"Name",placeholder:"Claude on my laptop",error:o.value,onBlur:u},null,8,["modelValue","error"]),j(w,{id:"new-token-access",modelValue:s.value,"onUpdate:modelValue":f[1]||(f[1]=g=>s.value=g),label:"Access",options:[{label:"Read only: devices, history, events and logs",value:"read"},{label:"Read and control: can also operate devices",value:"control"}]},null,8,["modelValue"])]),_:1})]),_:1},8,["open","close-on-overlay"])}}}),rW={class:"agents__header"},sW={class:"agents__icon"},aW={class:"agents__reveal"},lW={class:"agents__reveal"},oW={class:"agents__reveal"},cW={class:"agents__section-head"},uW=Ne({__name:"AgentAccessPanel",setup(e){const t=Sg(),i=N2(),n=K(null),r=K(`${location.origin}/mcp`),s=K([]),a=K([]),l=K(!1),o=K(""),c=K(!1),u=K(""),d=E=>`claude mcp add --transport http openbridge ${r.value} --header "Authorization: Bearer ${E}"`,h=E=>E==="control"?"Read and control":"Read only",f=E=>E?new Date(E).toLocaleString():"Never",v=[{key:"name",header:"Name",primary:!0},{key:"access",header:"Access"},{key:"created",header:"Created",phoneMeta:!0},{key:"lastUsed",header:"Last used"},{key:"actions",header:"",align:"right"}],p=q(()=>s.value.map(E=>({id:E.id,name:E.owner?`${E.name} (${E.owner})`:E.name,access:h(E.access),created:f(E.createdAt),lastUsed:f(E.lastUsedAt)}))),w=[{key:"name",header:"Application",primary:!0},{key:"access",header:"Access"},{key:"connected",header:"Connected",phoneMeta:!0},{key:"lastUsed",header:"Last used"},{key:"actions",header:"",align:"right"}],_=q(()=>a.value.map(E=>({clientId:E.clientId,name:E.owners.length?`${E.name} (${E.owners.join(", ")})`:E.name,access:h(E.access),connected:f(E.connectedAt),lastUsed:f(E.lastUsedAt)})));async function y(){l.value=!0;try{const E=await Re.access.get();n.value=E.enabled,E.enabled&&(r.value=E.endpoint,s.value=E.tokens,a.value=E.connections),o.value=""}catch(E){o.value=E.message}finally{l.value=!1}}nt(y);function C(E){c.value=!1,u.value=E,y()}async function g(E,L){if(await t({title:"Revoke token",subjectLabel:"Token",subject:L,message:"Anything using this token loses access immediately.",confirmLabel:"Revoke"}))try{await Re.access.revokeToken(E),i.success("Token revoked"),await y()}catch(T){i.error(T.message,{title:"Could not revoke"})}}async function $(E,L){if(await t({title:"Disconnect application",subjectLabel:"Application",subject:L,message:"Every sign-in this application holds stops working, including its refresh tokens.",confirmLabel:"Disconnect"}))try{await Re.access.revokeConnection(E),i.success(`${L} disconnected`),await y()}catch(T){i.error(T.message,{title:"Could not disconnect"})}}return(E,L)=>{const B=Ue,T=at,X=Wr,W=FS,A=r2,x=ks,F=Pt,ie=Pk,re=b2,ue=Ss;return m(),he(ue,{class:"agents"},{default:G(()=>[b("div",rW,[b("div",sW,[j(B,{name:de(iW),size:18},null,8,["name"])]),L[3]||(L[3]=b("div",null,[b("h2",{class:"agents__title"},"AI agents"),b("p",{class:"agents__subtitle"}," Let Claude and other MCP clients read your devices and their history, and with control access, operate them. ")],-1))]),n.value===!1?(m(),he(T,{key:0,variant:"helper"},{default:G(()=>[...L[4]||(L[4]=[le(" The MCP endpoint is off on this bridge. Start OpenBridge with ",-1),b("code",null,"OPENBRIDGE_MCP=on",-1),le(" in its environment to turn it on, then create a token here. ",-1),b("a",{href:"https://docs.nubisco.io/openbridge/guide/mcp",target:"_blank",rel:"noopener"},"How to turn it on",-1)])]),_:1})):V("",!0),n.value?(m(),M(Ce,{key:1},[u.value?(m(),he(x,{key:0,status:"info",variant:"inline",title:"Copy this token now. It is not shown again.",dismissible:"",onClose:L[0]||(L[0]=J=>u.value="")},{default:G(()=>[j(A,{label:"Token",orientation:"stack"},{default:G(({id:J})=>[b("div",aW,[j(X,{id:J,"model-value":u.value,readonly:"",size:"sm",class:"agents__mono"},null,8,["id","model-value"]),j(W,{text:u.value,label:"Copy","copied-label":"Copied"},null,8,["text"])])]),_:1}),j(A,{label:"Connect Claude Code",orientation:"stack"},{default:G(({id:J})=>[b("div",lW,[j(X,{id:J,"model-value":d(u.value),readonly:"",size:"sm",class:"agents__mono"},null,8,["id","model-value"]),j(W,{text:d(u.value),label:"Copy","copied-label":"Copied"},null,8,["text"])])]),_:1})]),_:1})):V("",!0),j(A,{label:"MCP endpoint",orientation:"stack"},{default:G(({id:J})=>[b("div",oW,[j(X,{id:J,"model-value":r.value,readonly:"",size:"sm",class:"agents__mono"},null,8,["id","model-value"]),j(W,{text:r.value,label:"Copy","copied-label":"Copied"},null,8,["text"])])]),_:1}),j(T,{variant:"helper"},{default:G(()=>[...L[5]||(L[5]=[le(" Every request needs a token, even when sign-in is off. Create one below and paste it into your client, or add the endpoint as a connector and approve it in your browser. ",-1),b("a",{href:"https://docs.nubisco.io/openbridge/guide/mcp",target:"_blank",rel:"noopener"},"How to connect",-1)])]),_:1}),b("div",cW,[L[7]||(L[7]=b("h3",{class:"agents__section-title"},"Tokens",-1)),j(F,{size:"sm",variant:"primary",icon:sg,onClick:L[1]||(L[1]=J=>c.value=!0)},{default:G(()=>[...L[6]||(L[6]=[le("New token",-1)])]),_:1})]),j(re,{"stack-on-phone":"",columns:v,rows:p.value,"row-key":"id",size:"sm","aria-label":"Tokens",loading:l.value},{"cell-actions":G(({row:J})=>[j(F,{size:"sm",variant:"ghost",onClick:ae=>g(String(J.id),String(J.name))},{default:G(()=>[...L[8]||(L[8]=[le("Revoke",-1)])]),_:1},8,["onClick"])]),empty:G(()=>[j(ie,{size:"sm",title:"No tokens yet",description:"Create one to connect Claude Code or another MCP client."})]),_:1},8,["rows","loading"]),L[10]||(L[10]=b("h3",{class:"agents__section-title"},"Connected applications",-1)),j(re,{"stack-on-phone":"",columns:w,rows:_.value,"row-key":"clientId",size:"sm","aria-label":"Connected applications",loading:l.value},{"cell-actions":G(({row:J})=>[j(F,{size:"sm",variant:"ghost",onClick:ae=>$(String(J.clientId),String(J.name))},{default:G(()=>[...L[9]||(L[9]=[le(" Disconnect ",-1)])]),_:1},8,["onClick"])]),empty:G(()=>[j(ie,{size:"sm",title:"Nothing connected",description:"Applications you approve through a connector sign-in appear here."})]),_:1},8,["rows","loading"])],64)):V("",!0),o.value?(m(),he(T,{key:2,variant:"error"},{default:G(()=>[le(Z(o.value),1)]),_:1})):V("",!0),j(nW,{open:c.value,onClose:L[2]||(L[2]=J=>c.value=!1),onCreated:C},null,8,["open"])]),_:1})}}}),dW=zt(uW,[["__scopeId","data-v-522743ea"]]),hW={class:"settings-view"},fW={class:"card-header"},pW={class:"card-icon"},_W={class:"pin-row"},mW={class:"card-actions"},vW={key:0,class:"action-hint"},gW={class:"card-header"},bW={class:"card-icon"},yW={class:"update-row"},wW={class:"update-versions"},SW={class:"update-actions"},CW={class:"update-command"},kW={key:3,class:"update-error-row"},AW={class:"card-header"},MW={class:"card-icon"},$W={class:"info-title"},LW=Ne({__name:"SettingsView",setup(e){const t=Ms(),i=e0(),n=q(()=>{var x;return!!((x=i.config.value)!=null&&x.enabled&&i.user.value)}),r=c1(),s=[{label:"Light",value:"light"},{label:"Dark",value:"dark"},{label:"Match my system",value:"system"}],a=[{value:"debug",label:"Debug"},{value:"info",label:"Info"},{value:"warn",label:"Warn"},{value:"error",label:"Error"}],l=K(!1),o=K(!1),c=K(null),u=K(!1),d=K(null),h=K(!1),f=K(!1),v=K(!1),p=K(null),w=K(""),_=K(0),y=K("");let C=null;async function g(){h.value=!0,p.value=null;try{d.value=await Re.updates.check()}catch(x){p.value=String(x)}finally{h.value=!1}}function $(){const x=location.protocol==="https:"?"wss":"ws";C=new WebSocket(`${x}://${location.host}/ws/updates`),C.onmessage=F=>{try{const ie=JSON.parse(F.data);w.value=ie.stage??"",_.value=Math.round((ie.progress??0)*100),y.value=ie.message??"",ie.stage==="restarting"&&E(),ie.stage==="error"&&(p.value=ie.message,f.value=!1)}catch{}},C.onclose=()=>{f.value&&E()}}function E(){let x=0;const F=setInterval(async()=>{x++;try{await Re.health(),clearInterval(F),f.value=!1,w.value="",y.value="",d.value=null,await g()}catch{}x>60&&(clearInterval(F),f.value=!1,p.value="Timed out waiting for restart")},2e3)}async function L(){if(!f.value){f.value=!0,v.value=!1,p.value=null,w.value="downloading",y.value="Starting update...",_.value=0,$();try{await Re.updates.apply(),v.value=!0}catch(x){p.value=x instanceof Error?x.message:String(x),f.value=!1}}}async function B(){if(!f.value){f.value=!0,p.value=null,y.value="Rolling back...";try{await Re.updates.rollback(),E()}catch(x){p.value=x instanceof Error?x.message:String(x),f.value=!1}}}const T=K({name:"OpenBridge",port:8582,hapPort:51829,pincode:"031-45-154",username:"",logLevel:"info"});nt(async()=>{t.setPage("Settings");try{const x=await Re.bridge();x&&typeof x=="object"&&(T.value={name:x.name??"OpenBridge",port:x.port??8582,hapPort:x.hapPort??51829,pincode:x.pincode??"031-45-154",username:x.username??"",logLevel:x.logLevel??"info"})}catch{}g()}),Ii(()=>{C&&(C.close(),C=null)});async function X(){if(!l.value){l.value=!0,c.value=null,o.value=!1;try{const x={name:T.value.name,port:Number(T.value.port),hapPort:Number(T.value.hapPort),pincode:T.value.pincode,logLevel:T.value.logLevel};T.value.username&&(x.username=T.value.username),await Re.saveBridge(x),o.value=!0,setTimeout(()=>{o.value=!1},3e3)}catch(x){c.value=String(x)}finally{l.value=!1}}}async function W(){if(!u.value){u.value=!0;try{await Re.daemon.restart();let x=0;const F=setInterval(async()=>{x++;try{await Re.health(),clearInterval(F),location.reload()}catch{}x>60&&(clearInterval(F),u.value=!1)},1e3)}catch{u.value=!1}}}function A(){const x=()=>Math.floor(Math.random()*9)+1,F=()=>`${x()}${Math.floor(Math.random()*10)}${Math.floor(Math.random()*10)}`,ie=()=>`${Math.floor(Math.random()*10)}${Math.floor(Math.random()*10)}`;T.value.pincode=`${F()}-${ie()}-${F()}`}return(x,F)=>{const ie=Ue,re=Wr,ue=r2,J=w2,ae=Pt,ne=ba,Q=yi,oe=at,ve=Ss,fe=Cs,pe=fg,ye=Nv;return m(),M("div",hW,[j(ve,{class:"settings-card"},{default:G(()=>[b("div",fW,[b("div",pW,[j(ie,{name:de(JU),size:18},null,8,["name"])]),F[7]||(F[7]=b("div",null,[b("h2",{class:"card-title"},"Bridge"),b("p",{class:"card-subtitle"},"HomeKit bridge identity and network settings")],-1))]),j(Q,{dir:"col",gap:"sm",class:"field-grid"},{default:G(()=>[j(ue,{label:"Bridge name",hint:"Displayed in the Home app"},{default:G(()=>[j(re,{modelValue:T.value.name,"onUpdate:modelValue":F[0]||(F[0]=U=>T.value.name=U),size:"sm",placeholder:"OpenBridge"},null,8,["modelValue"])]),_:1}),j(ue,{label:"HTTP port",hint:"OpenBridge web UI & API",control:"fit"},{default:G(()=>[j(J,{modelValue:T.value.port,"onUpdate:modelValue":F[1]||(F[1]=U=>T.value.port=U),size:"sm",min:1024,max:65535},null,8,["modelValue"])]),_:1}),j(ue,{label:"HAP port",hint:"HomeKit accessory protocol port",control:"fit"},{default:G(()=>[j(J,{modelValue:T.value.hapPort,"onUpdate:modelValue":F[2]||(F[2]=U=>T.value.hapPort=U),size:"sm",min:1024,max:65535},null,8,["modelValue"])]),_:1}),j(ue,{label:"PIN code",hint:"Format: XXX-XX-XXX, used to pair with HomeKit"},{default:G(()=>[b("div",_W,[j(re,{modelValue:T.value.pincode,"onUpdate:modelValue":F[3]||(F[3]=U=>T.value.pincode=U),size:"sm",placeholder:"031-45-154"},null,8,["modelValue"]),j(ae,{variant:"ghost",size:"sm",icon:_s,title:"Generate random PIN",onClick:A})])]),_:1}),j(ue,{label:"Bridge MAC",hint:"Leave empty to auto-generate. Change this only if pairing with HomeKit fails."},{default:G(()=>[j(re,{modelValue:T.value.username,"onUpdate:modelValue":F[4]||(F[4]=U=>T.value.username=U),size:"sm",class:"mono",placeholder:"AA:BB:CC:DD:EE:FF"},null,8,["modelValue"])]),_:1}),j(ue,{label:"Log level",control:"fit"},{default:G(()=>[j(ne,{modelValue:T.value.logLevel,"onUpdate:modelValue":F[5]||(F[5]=U=>T.value.logLevel=U),size:"sm",options:a},null,8,["modelValue"])]),_:1})]),_:1}),c.value?(m(),he(oe,{key:0,variant:"error"},{default:G(()=>[le(Z(c.value),1)]),_:1})):V("",!0),b("div",mW,[j(ae,{variant:"primary",size:"sm",loading:l.value,icon:o.value?dr:Hc,onClick:X},{default:G(()=>[le(Z(o.value?"Saved!":"Save"),1)]),_:1},8,["loading","icon"]),j(ae,{variant:"secondary",size:"sm",outlined:"",loading:u.value,icon:u.value?Vo:_s,onClick:W},{default:G(()=>[le(Z(u.value?"Restarting…":"Save & Restart OpenBridge"),1)]),_:1},8,["loading","icon"]),o.value&&!u.value?(m(),M("span",vW,[j(ie,{name:de(bc),size:12},null,8,["name"]),F[8]||(F[8]=le(" Restart the daemon for changes to take effect ",-1))])):V("",!0)])]),_:1}),j(ve,{class:"settings-card"},{default:G(()=>{var U,_e;return[b("div",gW,[b("div",bW,[j(ie,{name:de(Ed),size:18},null,8,["name"])]),F[9]||(F[9]=b("div",null,[b("h2",{class:"card-title"},"Updates"),b("p",{class:"card-subtitle"},"OpenBridge daemon and UI")],-1))]),b("div",yW,[b("div",wW,[j(fe,{variant:"grey"},{default:G(()=>{var ge;return[le("Current: v"+Z(((ge=d.value)==null?void 0:ge.current)??"…"),1)]}),_:1}),d.value&&!h.value?(m(),M(Ce,{key:0},[d.value.updateAvailable?(m(),he(fe,{key:0,variant:"blue"},{default:G(()=>[le("Available: v"+Z(d.value.latest),1)]),_:1})):d.value.latest===null?(m(),he(fe,{key:1,variant:"orange"},{default:G(()=>[...F[10]||(F[10]=[le("Unable to check",-1)])]),_:1})):(m(),he(fe,{key:2,variant:"green"},{default:G(()=>[...F[11]||(F[11]=[le("Up to date",-1)])]),_:1}))],64)):V("",!0),h.value?(m(),he(fe,{key:1,variant:"grey"},{default:G(()=>[...F[12]||(F[12]=[le("Checking…",-1)])]),_:1})):V("",!0)]),b("div",SW,[j(ae,{variant:"secondary",size:"sm",outlined:"",loading:h.value,icon:_s,onClick:g},{default:G(()=>[...F[13]||(F[13]=[le(" Check ",-1)])]),_:1},8,["loading"]),(U=d.value)!=null&&U.updateAvailable&&d.value.updateMethod==="self"?(m(),he(ae,{key:0,variant:"primary",size:"sm",loading:f.value,icon:f.value?Vo:$2,onClick:L},{default:G(()=>[le(Z(f.value?"Updating…":"Install update"),1)]),_:1},8,["loading","icon"])):V("",!0)])]),f.value&&w.value?(m(),he(pe,{key:0,label:y.value,value:w.value==="downloading"&&_.value>0?_.value:void 0,max:100,status:"active",size:"sm"},null,8,["label","value"])):V("",!0),f.value&&!w.value?(m(),he(oe,{key:1,variant:"helper"},{default:G(()=>[...F[14]||(F[14]=[le(" Starting update... This page will reconnect automatically. ",-1)])]),_:1})):V("",!0),((_e=d.value)==null?void 0:_e.updateMethod)==="manual"&&d.value.updateAvailable?(m(),he(oe,{key:2,variant:"helper"},{default:G(()=>[d.value.pinnedTo?(m(),M(Ce,{key:0},[le(" This deployment is pinned to "+Z(d.value.pinnedTo)+". To move version: ",1)],64)):d.value.updateBlockedBy?(m(),M(Ce,{key:1},[le(" Self-update is not available here ("+Z(d.value.updateBlockedBy)+"). To update: ",1)],64)):(m(),M(Ce,{key:2},[le("Self-update is not available for this install. To update:")],64)),b("code",CW,Z(d.value.updateCommand),1)]),_:1})):V("",!0),p.value?(m(),M("div",kW,[j(oe,{variant:"error"},{default:G(()=>[le(Z(p.value),1)]),_:1}),v.value?(m(),he(ae,{key:0,variant:"ghost",size:"sm",onClick:B},{default:G(()=>[...F[15]||(F[15]=[le("Rollback",-1)])]),_:1})):V("",!0)])):V("",!0)]}),_:1}),j(dW),n.value?V("",!0):(m(),he(ve,{key:0,class:"settings-card"},{default:G(()=>[b("div",AW,[b("div",MW,[j(ie,{name:de(eW),size:18},null,8,["name"])]),F[16]||(F[16]=b("div",null,[b("h2",{class:"card-title"},"Appearance"),b("p",{class:"card-subtitle"},"Theme for this browser")],-1))]),j(Q,{dir:"col",gap:"sm",class:"field-grid"},{default:G(()=>[j(ue,{label:"Theme"},{default:G(()=>[j(ye,{name:"settings-theme",options:s,"model-value":de(r).theme.value,"onUpdate:modelValue":F[6]||(F[6]=U=>de(r).setTheme(U))},null,8,["model-value"])]),_:1})]),_:1})]),_:1})),j(ve,{class:"settings-card info-card"},{default:G(()=>[b("h3",$W,[j(ie,{name:de(bc),size:14},null,8,["name"]),F[17]||(F[17]=le(" How to pair with HomeKit ",-1))]),F[18]||(F[18]=b("ol",{class:"info-list"},[b("li",null,[le(" Open the "),b("strong",null,"Home"),le(" app on your iPhone or iPad ")]),b("li",null,[le(" Tap "),b("strong",null,"+"),le(" → "),b("strong",null,"Add Accessory")]),b("li",null,[le(" Scan the QR code from the Dashboard, or tap "),b("strong",null,"More options"),le(" and enter the PIN code manually ")]),b("li",null,"If you change the PIN or username, unpair first from the Home app, then re-pair")],-1))]),_:1})])}}}),EW=zt(LW,[["__scopeId","data-v-4e6145f5"]]);/**
|
|
71
|
-
* Copyright (c) 2014-2024 The xterm.js authors. All rights reserved.
|
|
72
|
-
* @license MIT
|
|
73
|
-
*
|
|
74
|
-
* Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
|
|
75
|
-
* @license MIT
|
|
76
|
-
*
|
|
77
|
-
* Originally forked from (with the author's permission):
|
|
78
|
-
* Fabrice Bellard's javascript vt100 for jslinux:
|
|
79
|
-
* http://bellard.org/jslinux/
|
|
80
|
-
* Copyright (c) 2011 Fabrice Bellard
|
|
81
|
-
*/var pb=Object.defineProperty,xW=Object.getOwnPropertyDescriptor,HW=(e,t)=>{for(var i in t)pb(e,i,{get:t[i],enumerable:!0})},Ot=(e,t,i,n)=>{for(var r=n>1?void 0:n?xW(t,i):t,s=e.length-1,a;s>=0;s--)(a=e[s])&&(r=(n?a(t,i,r):a(r))||r);return n&&r&&pb(t,i,r),r},Pe=(e,t)=>(i,n)=>t(i,n,e),kp="Terminal input",Id={get:()=>kp,set:e=>kp=e},Ap="Too much output to announce, navigate to rows manually to read",Rd={get:()=>Ap,set:e=>Ap=e};function TW(e){return e.replace(/\r?\n/g,"\r")}function NW(e,t){return t?"\x1B[200~"+e+"\x1B[201~":e}function PW(e,t){e.clipboardData&&e.clipboardData.setData("text/plain",t.selectionText),e.preventDefault()}function OW(e,t,i,n){if(e.stopPropagation(),e.clipboardData){let r=e.clipboardData.getData("text/plain");_b(r,t,i,n)}}function _b(e,t,i,n){e=TW(e),e=NW(e,i.decPrivateModes.bracketedPasteMode&&n.rawOptions.ignoreBracketedPasteMode!==!0),i.triggerDataEvent(e,!0),t.value=""}function mb(e,t,i){let n=i.getBoundingClientRect(),r=e.clientX-n.left-10,s=e.clientY-n.top-10;t.style.width="20px",t.style.height="20px",t.style.left=`${r}px`,t.style.top=`${s}px`,t.style.zIndex="1000",t.focus()}function Mp(e,t,i,n,r){mb(e,t,i),r&&n.rightClickSelect(e),t.value=n.selectionText,t.select()}function $r(e){return e>65535?(e-=65536,String.fromCharCode((e>>10)+55296)+String.fromCharCode(e%1024+56320)):String.fromCharCode(e)}function w1(e,t=0,i=e.length){let n="";for(let r=t;r<i;++r){let s=e[r];s>65535?(s-=65536,n+=String.fromCharCode((s>>10)+55296)+String.fromCharCode(s%1024+56320)):n+=String.fromCharCode(s)}return n}var IW=class{constructor(){this._interim=0}clear(){this._interim=0}decode(e,t){let i=e.length;if(!i)return 0;let n=0,r=0;if(this._interim){let s=e.charCodeAt(r++);56320<=s&&s<=57343?t[n++]=(this._interim-55296)*1024+s-56320+65536:(t[n++]=this._interim,t[n++]=s),this._interim=0}for(let s=r;s<i;++s){let a=e.charCodeAt(s);if(55296<=a&&a<=56319){if(++s>=i)return this._interim=a,n;let l=e.charCodeAt(s);56320<=l&&l<=57343?t[n++]=(a-55296)*1024+l-56320+65536:(t[n++]=a,t[n++]=l);continue}a!==65279&&(t[n++]=a)}return n}},RW=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(e,t){let i=e.length;if(!i)return 0;let n=0,r,s,a,l,o=0,c=0;if(this.interim[0]){let h=!1,f=this.interim[0];f&=(f&224)===192?31:(f&240)===224?15:7;let v=0,p;for(;(p=this.interim[++v]&63)&&v<4;)f<<=6,f|=p;let w=(this.interim[0]&224)===192?2:(this.interim[0]&240)===224?3:4,_=w-v;for(;c<_;){if(c>=i)return 0;if(p=e[c++],(p&192)!==128){c--,h=!0;break}else this.interim[v++]=p,f<<=6,f|=p&63}h||(w===2?f<128?c--:t[n++]=f:w===3?f<2048||f>=55296&&f<=57343||f===65279||(t[n++]=f):f<65536||f>1114111||(t[n++]=f)),this.interim.fill(0)}let u=i-4,d=c;for(;d<i;){for(;d<u&&!((r=e[d])&128)&&!((s=e[d+1])&128)&&!((a=e[d+2])&128)&&!((l=e[d+3])&128);)t[n++]=r,t[n++]=s,t[n++]=a,t[n++]=l,d+=4;if(r=e[d++],r<128)t[n++]=r;else if((r&224)===192){if(d>=i)return this.interim[0]=r,n;if(s=e[d++],(s&192)!==128){d--;continue}if(o=(r&31)<<6|s&63,o<128){d--;continue}t[n++]=o}else if((r&240)===224){if(d>=i)return this.interim[0]=r,n;if(s=e[d++],(s&192)!==128){d--;continue}if(d>=i)return this.interim[0]=r,this.interim[1]=s,n;if(a=e[d++],(a&192)!==128){d--;continue}if(o=(r&15)<<12|(s&63)<<6|a&63,o<2048||o>=55296&&o<=57343||o===65279)continue;t[n++]=o}else if((r&248)===240){if(d>=i)return this.interim[0]=r,n;if(s=e[d++],(s&192)!==128){d--;continue}if(d>=i)return this.interim[0]=r,this.interim[1]=s,n;if(a=e[d++],(a&192)!==128){d--;continue}if(d>=i)return this.interim[0]=r,this.interim[1]=s,this.interim[2]=a,n;if(l=e[d++],(l&192)!==128){d--;continue}if(o=(r&7)<<18|(s&63)<<12|(a&63)<<6|l&63,o<65536||o>1114111)continue;t[n++]=o}}return n}},vb="",xr=" ",n0=class gb{constructor(){this.fg=0,this.bg=0,this.extended=new Oc}static toColorRGB(t){return[t>>>16&255,t>>>8&255,t&255]}static fromColorRGB(t){return(t[0]&255)<<16|(t[1]&255)<<8|t[2]&255}clone(){let t=new gb;return t.fg=this.fg,t.bg=this.bg,t.extended=this.extended.clone(),t}isInverse(){return this.fg&67108864}isBold(){return this.fg&134217728}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:this.fg&268435456}isBlink(){return this.fg&536870912}isInvisible(){return this.fg&1073741824}isItalic(){return this.bg&67108864}isDim(){return this.bg&134217728}isStrikethrough(){return this.fg&2147483648}isProtected(){return this.bg&536870912}isOverline(){return this.bg&1073741824}getFgColorMode(){return this.fg&50331648}getBgColorMode(){return this.bg&50331648}isFgRGB(){return(this.fg&50331648)===50331648}isBgRGB(){return(this.bg&50331648)===50331648}isFgPalette(){return(this.fg&50331648)===16777216||(this.fg&50331648)===33554432}isBgPalette(){return(this.bg&50331648)===16777216||(this.bg&50331648)===33554432}isFgDefault(){return(this.fg&50331648)===0}isBgDefault(){return(this.bg&50331648)===0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(this.fg&50331648){case 16777216:case 33554432:return this.fg&255;case 50331648:return this.fg&16777215;default:return-1}}getBgColor(){switch(this.bg&50331648){case 16777216:case 33554432:return this.bg&255;case 50331648:return this.bg&16777215;default:return-1}}hasExtendedAttrs(){return this.bg&268435456}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(this.bg&268435456&&~this.extended.underlineColor)switch(this.extended.underlineColor&50331648){case 16777216:case 33554432:return this.extended.underlineColor&255;case 50331648:return this.extended.underlineColor&16777215;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return this.bg&268435456&&~this.extended.underlineColor?this.extended.underlineColor&50331648:this.getFgColorMode()}isUnderlineColorRGB(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===50331648:this.isFgRGB()}isUnderlineColorPalette(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===16777216||(this.extended.underlineColor&50331648)===33554432:this.isFgPalette()}isUnderlineColorDefault(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===0:this.isFgDefault()}getUnderlineStyle(){return this.fg&268435456?this.bg&268435456?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}},Oc=class bb{constructor(t=0,i=0){this._ext=0,this._urlId=0,this._ext=t,this._urlId=i}get ext(){return this._urlId?this._ext&-469762049|this.underlineStyle<<26:this._ext}set ext(t){this._ext=t}get underlineStyle(){return this._urlId?5:(this._ext&469762048)>>26}set underlineStyle(t){this._ext&=-469762049,this._ext|=t<<26&469762048}get underlineColor(){return this._ext&67108863}set underlineColor(t){this._ext&=-67108864,this._ext|=t&67108863}get urlId(){return this._urlId}set urlId(t){this._urlId=t}get underlineVariantOffset(){let t=(this._ext&3758096384)>>29;return t<0?t^4294967288:t}set underlineVariantOffset(t){this._ext&=536870911,this._ext|=t<<29&3758096384}clone(){return new bb(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}},ln=class yb extends n0{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new Oc,this.combinedData=""}static fromCharData(t){let i=new yb;return i.setFromCharData(t),i}isCombined(){return this.content&2097152}getWidth(){return this.content>>22}getChars(){return this.content&2097152?this.combinedData:this.content&2097151?$r(this.content&2097151):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):this.content&2097151}setFromCharData(t){this.fg=t[0],this.bg=0;let i=!1;if(t[1].length>2)i=!0;else if(t[1].length===2){let n=t[1].charCodeAt(0);if(55296<=n&&n<=56319){let r=t[1].charCodeAt(1);56320<=r&&r<=57343?this.content=(n-55296)*1024+r-56320+65536|t[2]<<22:i=!0}else i=!0}else this.content=t[1].charCodeAt(0)|t[2]<<22;i&&(this.combinedData=t[1],this.content=2097152|t[2]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}},$p="di$target",Vd="di$dependencies",hu=new Map;function VW(e){return e[Vd]||[]}function ui(e){if(hu.has(e))return hu.get(e);let t=function(i,n,r){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");DW(t,i,r)};return t._id=e,hu.set(e,t),t}function DW(e,t,i){t[$p]===t?t[Vd].push({id:e,index:i}):(t[Vd]=[{id:e,index:i}],t[$p]=t)}var Ti=ui("BufferService"),wb=ui("CoreMouseService"),$s=ui("CoreService"),ZW=ui("CharsetService"),P2=ui("InstantiationService"),Sb=ui("LogService"),Ni=ui("OptionsService"),Cb=ui("OscLinkService"),BW=ui("UnicodeService"),r0=ui("DecorationService"),Dd=class{constructor(e,t,i){this._bufferService=e,this._optionsService=t,this._oscLinkService=i}provideLinks(e,t){var u;let i=this._bufferService.buffer.lines.get(e-1);if(!i){t(void 0);return}let n=[],r=this._optionsService.rawOptions.linkHandler,s=new ln,a=i.getTrimmedLength(),l=-1,o=-1,c=!1;for(let d=0;d<a;d++)if(!(o===-1&&!i.hasContent(d))){if(i.loadCell(d,s),s.hasExtendedAttrs()&&s.extended.urlId)if(o===-1){o=d,l=s.extended.urlId;continue}else c=s.extended.urlId!==l;else o!==-1&&(c=!0);if(c||o!==-1&&d===a-1){let h=(u=this._oscLinkService.getLinkData(l))==null?void 0:u.uri;if(h){let f={start:{x:o+1,y:e},end:{x:d+(!c&&d===a-1?1:0),y:e}},v=!1;if(!(r!=null&&r.allowNonHttpProtocols))try{let p=new URL(h);["http:","https:"].includes(p.protocol)||(v=!0)}catch{v=!0}v||n.push({text:h,range:f,activate:(p,w)=>r?r.activate(p,w,f):FW(p,w),hover:(p,w)=>{var _;return(_=r==null?void 0:r.hover)==null?void 0:_.call(r,p,w,f)},leave:(p,w)=>{var _;return(_=r==null?void 0:r.leave)==null?void 0:_.call(r,p,w,f)}})}c=!1,s.hasExtendedAttrs()&&s.extended.urlId?(o=d,l=s.extended.urlId):(o=-1,l=-1)}}t(n)}};Dd=Ot([Pe(0,Ti),Pe(1,Ni),Pe(2,Cb)],Dd);function FW(e,t){if(confirm(`Do you want to navigate to ${t}?
|
|
82
|
-
|
|
83
|
-
WARNING: This link could potentially be dangerous`)){let i=window.open();if(i){try{i.opener=null}catch{}i.location.href=t}else console.warn("Opening link blocked as opener could not be cleared")}}var S1=ui("CharSizeService"),pr=ui("CoreBrowserService"),O2=ui("MouseService"),_r=ui("RenderService"),zW=ui("SelectionService"),kb=ui("CharacterJoinerService"),Ja=ui("ThemeService"),Ab=ui("LinkProviderService"),UW=class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?Lp.isErrorNoTelemetry(e)?new Lp(e.message+`
|
|
84
|
-
|
|
85
|
-
`+e.stack):new Error(e.message+`
|
|
86
|
-
|
|
87
|
-
`+e.stack):e},0)}}addListener(e){return this.listeners.push(e),()=>{this._removeListener(e)}}emit(e){this.listeners.forEach(t=>{t(e)})}_removeListener(e){this.listeners.splice(this.listeners.indexOf(e),1)}setUnexpectedErrorHandler(e){this.unexpectedErrorHandler=e}getUnexpectedErrorHandler(){return this.unexpectedErrorHandler}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}},WW=new UW;function G0(e){jW(e)||WW.onUnexpectedError(e)}var Zd="Canceled";function jW(e){return e instanceof KW?!0:e instanceof Error&&e.name===Zd&&e.message===Zd}var KW=class extends Error{constructor(){super(Zd),this.name=this.message}};function qW(e){return new Error(`Illegal argument: ${e}`)}var Lp=class Bd extends Error{constructor(t){super(t),this.name="CodeExpectedError"}static fromError(t){if(t instanceof Bd)return t;let i=new Bd;return i.message=t.message,i.stack=t.stack,i}static isErrorNoTelemetry(t){return t.name==="CodeExpectedError"}},Fd=class Mb extends Error{constructor(t){super(t||"An unexpected bug occurred."),Object.setPrototypeOf(this,Mb.prototype)}};function Di(e,t=0){return e[e.length-(1+t)]}var GW;(e=>{function t(s){return s<0}e.isLessThan=t;function i(s){return s<=0}e.isLessThanOrEqual=i;function n(s){return s>0}e.isGreaterThan=n;function r(s){return s===0}e.isNeitherLessOrGreaterThan=r,e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0})(GW||(GW={}));function YW(e,t){let i=this,n=!1,r;return function(){return n||(n=!0,t||(r=e.apply(i,arguments))),r}}var $b;(e=>{function t(g){return g&&typeof g=="object"&&typeof g[Symbol.iterator]=="function"}e.is=t;let i=Object.freeze([]);function n(){return i}e.empty=n;function*r(g){yield g}e.single=r;function s(g){return t(g)?g:r(g)}e.wrap=s;function a(g){return g||i}e.from=a;function*l(g){for(let $=g.length-1;$>=0;$--)yield g[$]}e.reverse=l;function o(g){return!g||g[Symbol.iterator]().next().done===!0}e.isEmpty=o;function c(g){return g[Symbol.iterator]().next().value}e.first=c;function u(g,$){let E=0;for(let L of g)if($(L,E++))return!0;return!1}e.some=u;function d(g,$){for(let E of g)if($(E))return E}e.find=d;function*h(g,$){for(let E of g)$(E)&&(yield E)}e.filter=h;function*f(g,$){let E=0;for(let L of g)yield $(L,E++)}e.map=f;function*v(g,$){let E=0;for(let L of g)yield*$(L,E++)}e.flatMap=v;function*p(...g){for(let $ of g)yield*$}e.concat=p;function w(g,$,E){let L=E;for(let B of g)L=$(L,B);return L}e.reduce=w;function*_(g,$,E=g.length){for($<0&&($+=g.length),E<0?E+=g.length:E>g.length&&(E=g.length);$<E;$++)yield g[$]}e.slice=_;function y(g,$=Number.POSITIVE_INFINITY){let E=[];if($===0)return[E,g];let L=g[Symbol.iterator]();for(let B=0;B<$;B++){let T=L.next();if(T.done)return[E,e.empty()];E.push(T.value)}return[E,{[Symbol.iterator](){return L}}]}e.consume=y;async function C(g){let $=[];for await(let E of g)$.push(E);return Promise.resolve($)}e.asyncToArray=C})($b||($b={}));function ys(e){if($b.is(e)){let t=[];for(let i of e)if(i)try{i.dispose()}catch(n){t.push(n)}if(t.length===1)throw t[0];if(t.length>1)throw new AggregateError(t,"Encountered errors while disposing of store");return Array.isArray(e)?[]:e}else if(e)return e.dispose(),e}function XW(...e){return $t(()=>ys(e))}function $t(e){return{dispose:YW(()=>{e()})}}var Lb=class Eb{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{ys(this._toDispose)}finally{this._toDispose.clear()}}add(t){if(!t)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?Eb.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(t),t}delete(t){if(t){if(t===this)throw new Error("Cannot dispose a disposable on itself!");this._toDispose.delete(t),t.dispose()}}deleteAndLeak(t){t&&this._toDispose.has(t)&&(this._toDispose.delete(t),void 0)}};Lb.DISABLE_DISPOSED_WARNING=!1;var Pr=Lb,Qe=class{constructor(){this._store=new Pr,this._store}dispose(){this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}};Qe.None=Object.freeze({dispose(){}});var ca=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(e){var t;this._isDisposed||e===this._value||((t=this._value)==null||t.dispose(),this._value=e)}clear(){this.value=void 0}dispose(){var e;this._isDisposed=!0,(e=this._value)==null||e.dispose(),this._value=void 0}clearAndLeak(){let e=this._value;return this._value=void 0,e}},or=typeof window=="object"?window:globalThis,zd=class Ud{constructor(t){this.element=t,this.next=Ud.Undefined,this.prev=Ud.Undefined}};zd.Undefined=new zd(void 0);var Lt=zd,Ep=class{constructor(){this._first=Lt.Undefined,this._last=Lt.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===Lt.Undefined}clear(){let e=this._first;for(;e!==Lt.Undefined;){let t=e.next;e.prev=Lt.Undefined,e.next=Lt.Undefined,e=t}this._first=Lt.Undefined,this._last=Lt.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){let i=new Lt(e);if(this._first===Lt.Undefined)this._first=i,this._last=i;else if(t){let r=this._last;this._last=i,i.prev=r,r.next=i}else{let r=this._first;this._first=i,i.next=r,r.prev=i}this._size+=1;let n=!1;return()=>{n||(n=!0,this._remove(i))}}shift(){if(this._first!==Lt.Undefined){let e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==Lt.Undefined){let e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==Lt.Undefined&&e.next!==Lt.Undefined){let t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===Lt.Undefined&&e.next===Lt.Undefined?(this._first=Lt.Undefined,this._last=Lt.Undefined):e.next===Lt.Undefined?(this._last=this._last.prev,this._last.next=Lt.Undefined):e.prev===Lt.Undefined&&(this._first=this._first.next,this._first.prev=Lt.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==Lt.Undefined;)yield e.element,e=e.next}},JW=globalThis.performance&&typeof globalThis.performance.now=="function",QW=class xb{static create(t){return new xb(t)}constructor(t){this._now=JW&&t===!1?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}},pi;(e=>{e.None=()=>Qe.None;function t(A,x){return d(A,()=>{},0,void 0,!0,void 0,x)}e.defer=t;function i(A){return(x,F=null,ie)=>{let re=!1,ue;return ue=A(J=>{if(!re)return ue?ue.dispose():re=!0,x.call(F,J)},null,ie),re&&ue.dispose(),ue}}e.once=i;function n(A,x,F){return c((ie,re=null,ue)=>A(J=>ie.call(re,x(J)),null,ue),F)}e.map=n;function r(A,x,F){return c((ie,re=null,ue)=>A(J=>{x(J),ie.call(re,J)},null,ue),F)}e.forEach=r;function s(A,x,F){return c((ie,re=null,ue)=>A(J=>x(J)&&ie.call(re,J),null,ue),F)}e.filter=s;function a(A){return A}e.signal=a;function l(...A){return(x,F=null,ie)=>{let re=XW(...A.map(ue=>ue(J=>x.call(F,J))));return u(re,ie)}}e.any=l;function o(A,x,F,ie){let re=F;return n(A,ue=>(re=x(re,ue),re),ie)}e.reduce=o;function c(A,x){let F,ie={onWillAddFirstListener(){F=A(re.fire,re)},onDidRemoveLastListener(){F==null||F.dispose()}},re=new He(ie);return x==null||x.add(re),re.event}function u(A,x){return x instanceof Array?x.push(A):x&&x.add(A),A}function d(A,x,F=100,ie=!1,re=!1,ue,J){let ae,ne,Q,oe=0,ve,fe={leakWarningThreshold:ue,onWillAddFirstListener(){ae=A(ye=>{oe++,ne=x(ne,ye),ie&&!Q&&(pe.fire(ne),ne=void 0),ve=()=>{let U=ne;ne=void 0,Q=void 0,(!ie||oe>1)&&pe.fire(U),oe=0},typeof F=="number"?(clearTimeout(Q),Q=setTimeout(ve,F)):Q===void 0&&(Q=0,queueMicrotask(ve))})},onWillRemoveListener(){re&&oe>0&&(ve==null||ve())},onDidRemoveLastListener(){ve=void 0,ae.dispose()}},pe=new He(fe);return J==null||J.add(pe),pe.event}e.debounce=d;function h(A,x=0,F){return e.debounce(A,(ie,re)=>ie?(ie.push(re),ie):[re],x,void 0,!0,void 0,F)}e.accumulate=h;function f(A,x=(ie,re)=>ie===re,F){let ie=!0,re;return s(A,ue=>{let J=ie||!x(ue,re);return ie=!1,re=ue,J},F)}e.latch=f;function v(A,x,F){return[e.filter(A,x,F),e.filter(A,ie=>!x(ie),F)]}e.split=v;function p(A,x=!1,F=[],ie){let re=F.slice(),ue=A(ne=>{re?re.push(ne):ae.fire(ne)});ie&&ie.add(ue);let J=()=>{re==null||re.forEach(ne=>ae.fire(ne)),re=null},ae=new He({onWillAddFirstListener(){ue||(ue=A(ne=>ae.fire(ne)),ie&&ie.add(ue))},onDidAddFirstListener(){re&&(x?setTimeout(J):J())},onDidRemoveLastListener(){ue&&ue.dispose(),ue=null}});return ie&&ie.add(ae),ae.event}e.buffer=p;function w(A,x){return(F,ie,re)=>{let ue=x(new y);return A(function(J){let ae=ue.evaluate(J);ae!==_&&F.call(ie,ae)},void 0,re)}}e.chain=w;let _=Symbol("HaltChainable");class y{constructor(){this.steps=[]}map(x){return this.steps.push(x),this}forEach(x){return this.steps.push(F=>(x(F),F)),this}filter(x){return this.steps.push(F=>x(F)?F:_),this}reduce(x,F){let ie=F;return this.steps.push(re=>(ie=x(ie,re),ie)),this}latch(x=(F,ie)=>F===ie){let F=!0,ie;return this.steps.push(re=>{let ue=F||!x(re,ie);return F=!1,ie=re,ue?re:_}),this}evaluate(x){for(let F of this.steps)if(x=F(x),x===_)break;return x}}function C(A,x,F=ie=>ie){let ie=(...ae)=>J.fire(F(...ae)),re=()=>A.on(x,ie),ue=()=>A.removeListener(x,ie),J=new He({onWillAddFirstListener:re,onDidRemoveLastListener:ue});return J.event}e.fromNodeEventEmitter=C;function g(A,x,F=ie=>ie){let ie=(...ae)=>J.fire(F(...ae)),re=()=>A.addEventListener(x,ie),ue=()=>A.removeEventListener(x,ie),J=new He({onWillAddFirstListener:re,onDidRemoveLastListener:ue});return J.event}e.fromDOMEventEmitter=g;function $(A){return new Promise(x=>i(A)(x))}e.toPromise=$;function E(A){let x=new He;return A.then(F=>{x.fire(F)},()=>{x.fire(void 0)}).finally(()=>{x.dispose()}),x.event}e.fromPromise=E;function L(A,x){return A(F=>x.fire(F))}e.forward=L;function B(A,x,F){return x(F),A(ie=>x(ie))}e.runAndSubscribe=B;class T{constructor(x,F){this._observable=x,this._counter=0,this._hasChanged=!1;let ie={onWillAddFirstListener:()=>{x.addObserver(this)},onDidRemoveLastListener:()=>{x.removeObserver(this)}};this.emitter=new He(ie),F&&F.add(this.emitter)}beginUpdate(x){this._counter++}handlePossibleChange(x){}handleChange(x,F){this._hasChanged=!0}endUpdate(x){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function X(A,x){return new T(A,x).emitter.event}e.fromObservable=X;function W(A){return(x,F,ie)=>{let re=0,ue=!1,J={beginUpdate(){re++},endUpdate(){re--,re===0&&(A.reportChanges(),ue&&(ue=!1,x.call(F)))},handlePossibleChange(){},handleChange(){ue=!0}};A.addObserver(J),A.reportChanges();let ae={dispose(){A.removeObserver(J)}};return ie instanceof Pr?ie.add(ae):Array.isArray(ie)&&ie.push(ae),ae}}e.fromObservableLight=W})(pi||(pi={}));var Wd=class jd{constructor(t){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${t}_${jd._idPool++}`,jd.all.add(this)}start(t){this._stopWatch=new QW,this.listenerCount=t}stop(){if(this._stopWatch){let t=this._stopWatch.elapsed();this.durations.push(t),this.elapsedOverall+=t,this.invocationCount+=1,this._stopWatch=void 0}}};Wd.all=new Set,Wd._idPool=0;var ej=Wd,tj=-1,Hb=class Tb{constructor(t,i,n=(Tb._idPool++).toString(16).padStart(3,"0")){this._errorHandler=t,this.threshold=i,this.name=n,this._warnCountdown=0}dispose(){var t;(t=this._stacks)==null||t.clear()}check(t,i){let n=this.threshold;if(n<=0||i<n)return;this._stacks||(this._stacks=new Map);let r=this._stacks.get(t.value)||0;if(this._stacks.set(t.value,r+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=n*.5;let[s,a]=this.getMostFrequentStack(),l=`[${this.name}] potential listener LEAK detected, having ${i} listeners already. MOST frequent listener (${a}):`;console.warn(l),console.warn(s);let o=new rj(l,s);this._errorHandler(o)}return()=>{let s=this._stacks.get(t.value)||0;this._stacks.set(t.value,s-1)}}getMostFrequentStack(){if(!this._stacks)return;let t,i=0;for(let[n,r]of this._stacks)(!t||i<r)&&(t=[n,r],i=r);return t}};Hb._idPool=1;var ij=Hb,nj=class Nb{constructor(t){this.value=t}static create(){let t=new Error;return new Nb(t.stack??"")}print(){console.warn(this.value.split(`
|
|
88
|
-
`).slice(2).join(`
|
|
89
|
-
`))}},rj=class extends Error{constructor(e,t){super(e),this.name="ListenerLeakError",this.stack=t}},sj=class extends Error{constructor(e,t){super(e),this.name="ListenerRefusalError",this.stack=t}},aj=0,fu=class{constructor(e){this.value=e,this.id=aj++}},lj=2,oj,He=class{constructor(e){var t,i,n,r;this._size=0,this._options=e,this._leakageMon=(t=this._options)!=null&&t.leakWarningThreshold?new ij((e==null?void 0:e.onListenerError)??G0,((i=this._options)==null?void 0:i.leakWarningThreshold)??tj):void 0,this._perfMon=(n=this._options)!=null&&n._profName?new ej(this._options._profName):void 0,this._deliveryQueue=(r=this._options)==null?void 0:r.deliveryQueue}dispose(){var e,t,i,n;this._disposed||(this._disposed=!0,((e=this._deliveryQueue)==null?void 0:e.current)===this&&this._deliveryQueue.reset(),this._listeners&&(this._listeners=void 0,this._size=0),(i=(t=this._options)==null?void 0:t.onDidRemoveLastListener)==null||i.call(t),(n=this._leakageMon)==null||n.dispose())}get event(){return this._event??(this._event=(e,t,i)=>{var a,l,o,c,u;if(this._leakageMon&&this._size>this._leakageMon.threshold**2){let d=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(d);let h=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],f=new sj(`${d}. HINT: Stack shows most frequent listener (${h[1]}-times)`,h[0]);return(((a=this._options)==null?void 0:a.onListenerError)||G0)(f),Qe.None}if(this._disposed)return Qe.None;t&&(e=e.bind(t));let n=new fu(e),r;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(n.stack=nj.create(),r=this._leakageMon.check(n.stack,this._size+1)),this._listeners?this._listeners instanceof fu?(this._deliveryQueue??(this._deliveryQueue=new cj),this._listeners=[this._listeners,n]):this._listeners.push(n):((o=(l=this._options)==null?void 0:l.onWillAddFirstListener)==null||o.call(l,this),this._listeners=n,(u=(c=this._options)==null?void 0:c.onDidAddFirstListener)==null||u.call(c,this)),this._size++;let s=$t(()=>{r==null||r(),this._removeListener(n)});return i instanceof Pr?i.add(s):Array.isArray(i)&&i.push(s),s}),this._event}_removeListener(e){var r,s,a,l;if((s=(r=this._options)==null?void 0:r.onWillRemoveListener)==null||s.call(r,this),!this._listeners)return;if(this._size===1){this._listeners=void 0,(l=(a=this._options)==null?void 0:a.onDidRemoveLastListener)==null||l.call(a,this),this._size=0;return}let t=this._listeners,i=t.indexOf(e);if(i===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,t[i]=void 0;let n=this._deliveryQueue.current===this;if(this._size*lj<=t.length){let o=0;for(let c=0;c<t.length;c++)t[c]?t[o++]=t[c]:n&&(this._deliveryQueue.end--,o<this._deliveryQueue.i&&this._deliveryQueue.i--);t.length=o}}_deliver(e,t){var n;if(!e)return;let i=((n=this._options)==null?void 0:n.onListenerError)||G0;if(!i){e.value(t);return}try{e.value(t)}catch(r){i(r)}}_deliverQueue(e){let t=e.current._listeners;for(;e.i<e.end;)this._deliver(t[e.i++],e.value);e.reset()}fire(e){var t,i,n,r;if((t=this._deliveryQueue)!=null&&t.current&&(this._deliverQueue(this._deliveryQueue),(i=this._perfMon)==null||i.stop()),(n=this._perfMon)==null||n.start(this._size),this._listeners)if(this._listeners instanceof fu)this._deliver(this._listeners,e);else{let s=this._deliveryQueue;s.enqueue(this,e,this._listeners.length),this._deliverQueue(s)}(r=this._perfMon)==null||r.stop()}hasListeners(){return this._size>0}},cj=class{constructor(){this.i=-1,this.end=0}enqueue(e,t,i){this.i=0,this.end=i,this.current=e,this.value=t}reset(){this.i=this.end,this.current=void 0,this.value=void 0}},Kd=class{constructor(){this.mapWindowIdToZoomLevel=new Map,this._onDidChangeZoomLevel=new He,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event,this.mapWindowIdToZoomFactor=new Map,this._onDidChangeFullscreen=new He,this.onDidChangeFullscreen=this._onDidChangeFullscreen.event,this.mapWindowIdToFullScreen=new Map}getZoomLevel(t){return this.mapWindowIdToZoomLevel.get(this.getWindowId(t))??0}setZoomLevel(t,i){if(this.getZoomLevel(i)===t)return;let n=this.getWindowId(i);this.mapWindowIdToZoomLevel.set(n,t),this._onDidChangeZoomLevel.fire(n)}getZoomFactor(t){return this.mapWindowIdToZoomFactor.get(this.getWindowId(t))??1}setZoomFactor(t,i){this.mapWindowIdToZoomFactor.set(this.getWindowId(i),t)}setFullscreen(t,i){if(this.isFullscreen(i)===t)return;let n=this.getWindowId(i);this.mapWindowIdToFullScreen.set(n,t),this._onDidChangeFullscreen.fire(n)}isFullscreen(t){return!!this.mapWindowIdToFullScreen.get(this.getWindowId(t))}getWindowId(t){return t.vscodeWindowId}};Kd.INSTANCE=new Kd;var I2=Kd;function uj(e,t,i){typeof t=="string"&&(t=e.matchMedia(t)),t.addEventListener("change",i)}I2.INSTANCE.onDidChangeZoomLevel;function dj(e){return I2.INSTANCE.getZoomFactor(e)}I2.INSTANCE.onDidChangeFullscreen;var Qa=typeof navigator=="object"?navigator.userAgent:"",qd=Qa.indexOf("Firefox")>=0,hj=Qa.indexOf("AppleWebKit")>=0,R2=Qa.indexOf("Chrome")>=0,fj=!R2&&Qa.indexOf("Safari")>=0;Qa.indexOf("Electron/")>=0;Qa.indexOf("Android")>=0;var pu=!1;if(typeof or.matchMedia=="function"){let e=or.matchMedia("(display-mode: standalone) or (display-mode: window-controls-overlay)"),t=or.matchMedia("(display-mode: fullscreen)");pu=e.matches,uj(or,e,({matches:i})=>{pu&&t.matches||(pu=i)})}var Us="en",Gd=!1,Yd=!1,Y0=!1,Pb=!1,P0,X0=Us,xp=Us,pj,dn,ms=globalThis,di,G_;typeof ms.vscode<"u"&&typeof ms.vscode.process<"u"?di=ms.vscode.process:typeof process<"u"&&typeof((G_=process==null?void 0:process.versions)==null?void 0:G_.node)=="string"&&(di=process);var Y_,_j=typeof((Y_=di==null?void 0:di.versions)==null?void 0:Y_.electron)=="string",mj=_j&&(di==null?void 0:di.type)==="renderer",X_;if(typeof di=="object"){Gd=di.platform==="win32",Yd=di.platform==="darwin",Y0=di.platform==="linux",Y0&&di.env.SNAP&&di.env.SNAP_REVISION,di.env.CI||di.env.BUILD_ARTIFACTSTAGINGDIRECTORY,P0=Us,X0=Us;let e=di.env.VSCODE_NLS_CONFIG;if(e)try{let t=JSON.parse(e);P0=t.userLocale,xp=t.osLocale,X0=t.resolvedLanguage||Us,pj=(X_=t.languagePack)==null?void 0:X_.translationsConfigFile}catch{}Pb=!0}else typeof navigator=="object"&&!mj?(dn=navigator.userAgent,Gd=dn.indexOf("Windows")>=0,Yd=dn.indexOf("Macintosh")>=0,(dn.indexOf("Macintosh")>=0||dn.indexOf("iPad")>=0||dn.indexOf("iPhone")>=0)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>0,Y0=dn.indexOf("Linux")>=0,(dn==null?void 0:dn.indexOf("Mobi"))>=0,X0=globalThis._VSCODE_NLS_LANGUAGE||Us,P0=navigator.language.toLowerCase(),xp=P0):console.error("Unable to resolve platform.");var Ob=Gd,Dn=Yd,vj=Y0,Hp=Pb,Un=dn,br=X0,gj;(e=>{function t(){return br}e.value=t;function i(){return br.length===2?br==="en":br.length>=3?br[0]==="e"&&br[1]==="n"&&br[2]==="-":!1}e.isDefaultVariant=i;function n(){return br==="en"}e.isDefault=n})(gj||(gj={}));var bj=typeof ms.postMessage=="function"&&!ms.importScripts;(()=>{if(bj){let e=[];ms.addEventListener("message",i=>{if(i.data&&i.data.vscodeScheduleAsyncWork)for(let n=0,r=e.length;n<r;n++){let s=e[n];if(s.id===i.data.vscodeScheduleAsyncWork){e.splice(n,1),s.callback();return}}});let t=0;return i=>{let n=++t;e.push({id:n,callback:i}),ms.postMessage({vscodeScheduleAsyncWork:n},"*")}}return e=>setTimeout(e)})();var yj=!!(Un&&Un.indexOf("Chrome")>=0);Un&&Un.indexOf("Firefox")>=0;!yj&&Un&&Un.indexOf("Safari")>=0;Un&&Un.indexOf("Edg/")>=0;Un&&Un.indexOf("Android")>=0;var Ps=typeof navigator=="object"?navigator:{};Hp||document.queryCommandSupported&&document.queryCommandSupported("copy")||Ps&&Ps.clipboard&&Ps.clipboard.writeText,Hp||Ps&&Ps.clipboard&&Ps.clipboard.readText;var V2=class{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}},_u=new V2,Tp=new V2,Np=new V2,wj=new Array(230),Ib;(e=>{function t(l){return _u.keyCodeToStr(l)}e.toString=t;function i(l){return _u.strToKeyCode(l)}e.fromString=i;function n(l){return Tp.keyCodeToStr(l)}e.toUserSettingsUS=n;function r(l){return Np.keyCodeToStr(l)}e.toUserSettingsGeneral=r;function s(l){return Tp.strToKeyCode(l)||Np.strToKeyCode(l)}e.fromUserSettings=s;function a(l){if(l>=98&&l<=113)return null;switch(l){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return _u.keyCodeToStr(l)}e.toElectronAccelerator=a})(Ib||(Ib={}));var Sj=class Rb{constructor(t,i,n,r,s){this.ctrlKey=t,this.shiftKey=i,this.altKey=n,this.metaKey=r,this.keyCode=s}equals(t){return t instanceof Rb&&this.ctrlKey===t.ctrlKey&&this.shiftKey===t.shiftKey&&this.altKey===t.altKey&&this.metaKey===t.metaKey&&this.keyCode===t.keyCode}getHashCode(){let t=this.ctrlKey?"1":"0",i=this.shiftKey?"1":"0",n=this.altKey?"1":"0",r=this.metaKey?"1":"0";return`K${t}${i}${n}${r}${this.keyCode}`}isModifierKey(){return this.keyCode===0||this.keyCode===5||this.keyCode===57||this.keyCode===6||this.keyCode===4}toKeybinding(){return new Cj([this])}isDuplicateModifierCase(){return this.ctrlKey&&this.keyCode===5||this.shiftKey&&this.keyCode===4||this.altKey&&this.keyCode===6||this.metaKey&&this.keyCode===57}},Cj=class{constructor(e){if(e.length===0)throw qW("chords");this.chords=e}getHashCode(){let e="";for(let t=0,i=this.chords.length;t<i;t++)t!==0&&(e+=";"),e+=this.chords[t].getHashCode();return e}equals(e){if(e===null||this.chords.length!==e.chords.length)return!1;for(let t=0;t<this.chords.length;t++)if(!this.chords[t].equals(e.chords[t]))return!1;return!0}};function kj(e){if(e.charCode){let i=String.fromCharCode(e.charCode).toUpperCase();return Ib.fromString(i)}let t=e.keyCode;if(t===3)return 7;if(qd)switch(t){case 59:return 85;case 60:if(vj)return 97;break;case 61:return 86;case 107:return 109;case 109:return 111;case 173:return 88;case 224:if(Dn)return 57;break}else if(hj&&(Dn&&t===93||!Dn&&t===92))return 57;return wj[t]||0}var Aj=Dn?256:2048,Mj=512,$j=1024,Lj=Dn?2048:256,Pp=class{constructor(e){var i;this._standardKeyboardEventBrand=!0;let t=e;this.browserEvent=t,this.target=t.target,this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,this.altGraphKey=(i=t.getModifierState)==null?void 0:i.call(t,"AltGraph"),this.keyCode=kj(t),this.code=t.code,this.ctrlKey=this.ctrlKey||this.keyCode===5,this.altKey=this.altKey||this.keyCode===6,this.shiftKey=this.shiftKey||this.keyCode===4,this.metaKey=this.metaKey||this.keyCode===57,this._asKeybinding=this._computeKeybinding(),this._asKeyCodeChord=this._computeKeyCodeChord()}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()}toKeyCodeChord(){return this._asKeyCodeChord}equals(e){return this._asKeybinding===e}_computeKeybinding(){let e=0;this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(e=this.keyCode);let t=0;return this.ctrlKey&&(t|=Aj),this.altKey&&(t|=Mj),this.shiftKey&&(t|=$j),this.metaKey&&(t|=Lj),t|=e,t}_computeKeyCodeChord(){let e=0;return this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(e=this.keyCode),new Sj(this.ctrlKey,this.shiftKey,this.altKey,this.metaKey,e)}},Op=new WeakMap;function Ej(e){if(!e.parent||e.parent===e)return null;try{let t=e.location,i=e.parent.location;if(t.origin!=="null"&&i.origin!=="null"&&t.origin!==i.origin)return null}catch{return null}return e.parent}var xj=class{static getSameOriginWindowChain(e){let t=Op.get(e);if(!t){t=[],Op.set(e,t);let i=e,n;do n=Ej(i),n?t.push({window:new WeakRef(i),iframeElement:i.frameElement||null}):t.push({window:new WeakRef(i),iframeElement:null}),i=n;while(i)}return t.slice(0)}static getPositionOfChildWindowRelativeToAncestorWindow(e,t){if(!t||e===t)return{top:0,left:0};let i=0,n=0,r=this.getSameOriginWindowChain(e);for(let s of r){let a=s.window.deref();if(i+=(a==null?void 0:a.scrollY)??0,n+=(a==null?void 0:a.scrollX)??0,a===t||!s.iframeElement)break;let l=s.iframeElement.getBoundingClientRect();i+=l.top,n+=l.left}return{top:i,left:n}}},O0=class{constructor(e,t){this.timestamp=Date.now(),this.browserEvent=t,this.leftButton=t.button===0,this.middleButton=t.button===1,this.rightButton=t.button===2,this.buttons=t.buttons,this.target=t.target,this.detail=t.detail||1,t.type==="dblclick"&&(this.detail=2),this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,typeof t.pageX=="number"?(this.posx=t.pageX,this.posy=t.pageY):(this.posx=t.clientX+this.target.ownerDocument.body.scrollLeft+this.target.ownerDocument.documentElement.scrollLeft,this.posy=t.clientY+this.target.ownerDocument.body.scrollTop+this.target.ownerDocument.documentElement.scrollTop);let i=xj.getPositionOfChildWindowRelativeToAncestorWindow(e,t.view);this.posx-=i.left,this.posy-=i.top}preventDefault(){this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent.stopPropagation()}},Ip=class{constructor(e,t=0,i=0){var r;this.browserEvent=e||null,this.target=e?e.target||e.targetNode||e.srcElement:null,this.deltaY=i,this.deltaX=t;let n=!1;if(R2){let s=navigator.userAgent.match(/Chrome\/(\d+)/);n=(s?parseInt(s[1]):123)<=122}if(e){let s=e,a=e,l=((r=e.view)==null?void 0:r.devicePixelRatio)||1;if(typeof s.wheelDeltaY<"u")n?this.deltaY=s.wheelDeltaY/(120*l):this.deltaY=s.wheelDeltaY/120;else if(typeof a.VERTICAL_AXIS<"u"&&a.axis===a.VERTICAL_AXIS)this.deltaY=-a.detail/3;else if(e.type==="wheel"){let o=e;o.deltaMode===o.DOM_DELTA_LINE?qd&&!Dn?this.deltaY=-e.deltaY/3:this.deltaY=-e.deltaY:this.deltaY=-e.deltaY/40}if(typeof s.wheelDeltaX<"u")fj&&Ob?this.deltaX=-(s.wheelDeltaX/120):n?this.deltaX=s.wheelDeltaX/(120*l):this.deltaX=s.wheelDeltaX/120;else if(typeof a.HORIZONTAL_AXIS<"u"&&a.axis===a.HORIZONTAL_AXIS)this.deltaX=-e.detail/3;else if(e.type==="wheel"){let o=e;o.deltaMode===o.DOM_DELTA_LINE?qd&&!Dn?this.deltaX=-e.deltaX/3:this.deltaX=-e.deltaX:this.deltaX=-e.deltaX/40}this.deltaY===0&&this.deltaX===0&&e.wheelDelta&&(n?this.deltaY=e.wheelDelta/(120*l):this.deltaY=e.wheelDelta/120)}}preventDefault(){var e;(e=this.browserEvent)==null||e.preventDefault()}stopPropagation(){var e;(e=this.browserEvent)==null||e.stopPropagation()}},Vb=Object.freeze(function(e,t){let i=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(i)}}}),Hj;(e=>{function t(i){return i===e.None||i===e.Cancelled||i instanceof Tj?!0:!i||typeof i!="object"?!1:typeof i.isCancellationRequested=="boolean"&&typeof i.onCancellationRequested=="function"}e.isCancellationToken=t,e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:pi.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:Vb})})(Hj||(Hj={}));var Tj=class{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?Vb:(this._emitter||(this._emitter=new He),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}},D2=class{constructor(e,t){this._isDisposed=!1,this._token=-1,typeof e=="function"&&typeof t=="number"&&this.setIfNotSet(e,t)}dispose(){this.cancel(),this._isDisposed=!0}cancel(){this._token!==-1&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(e,t){if(this._isDisposed)throw new Fd("Calling 'cancelAndSet' on a disposed TimeoutTimer");this.cancel(),this._token=setTimeout(()=>{this._token=-1,e()},t)}setIfNotSet(e,t){if(this._isDisposed)throw new Fd("Calling 'setIfNotSet' on a disposed TimeoutTimer");this._token===-1&&(this._token=setTimeout(()=>{this._token=-1,e()},t))}},Nj=class{constructor(){this.disposable=void 0,this.isDisposed=!1}cancel(){var e;(e=this.disposable)==null||e.dispose(),this.disposable=void 0}cancelAndSet(e,t,i=globalThis){if(this.isDisposed)throw new Fd("Calling 'cancelAndSet' on a disposed IntervalTimer");this.cancel();let n=i.setInterval(()=>{e()},t);this.disposable=$t(()=>{i.clearInterval(n),this.disposable=void 0})}dispose(){this.cancel(),this.isDisposed=!0}},Pj;(e=>{async function t(n){let r,s=await Promise.all(n.map(a=>a.then(l=>l,l=>{r||(r=l)})));if(typeof r<"u")throw r;return s}e.settled=t;function i(n){return new Promise(async(r,s)=>{try{await n(r,s)}catch(a){s(a)}})}e.withAsyncBody=i})(Pj||(Pj={}));var Rp=class Xi{static fromArray(t){return new Xi(i=>{i.emitMany(t)})}static fromPromise(t){return new Xi(async i=>{i.emitMany(await t)})}static fromPromises(t){return new Xi(async i=>{await Promise.all(t.map(async n=>i.emitOne(await n)))})}static merge(t){return new Xi(async i=>{await Promise.all(t.map(async n=>{for await(let r of n)i.emitOne(r)}))})}constructor(t,i){this._state=0,this._results=[],this._error=null,this._onReturn=i,this._onStateChanged=new He,queueMicrotask(async()=>{let n={emitOne:r=>this.emitOne(r),emitMany:r=>this.emitMany(r),reject:r=>this.reject(r)};try{await Promise.resolve(t(n)),this.resolve()}catch(r){this.reject(r)}finally{n.emitOne=void 0,n.emitMany=void 0,n.reject=void 0}})}[Symbol.asyncIterator](){let t=0;return{next:async()=>{do{if(this._state===2)throw this._error;if(t<this._results.length)return{done:!1,value:this._results[t++]};if(this._state===1)return{done:!0,value:void 0};await pi.toPromise(this._onStateChanged.event)}while(!0)},return:async()=>{var i;return(i=this._onReturn)==null||i.call(this),{done:!0,value:void 0}}}}static map(t,i){return new Xi(async n=>{for await(let r of t)n.emitOne(i(r))})}map(t){return Xi.map(this,t)}static filter(t,i){return new Xi(async n=>{for await(let r of t)i(r)&&n.emitOne(r)})}filter(t){return Xi.filter(this,t)}static coalesce(t){return Xi.filter(t,i=>!!i)}coalesce(){return Xi.coalesce(this)}static async toPromise(t){let i=[];for await(let n of t)i.push(n);return i}toPromise(){return Xi.toPromise(this)}emitOne(t){this._state===0&&(this._results.push(t),this._onStateChanged.fire())}emitMany(t){this._state===0&&(this._results=this._results.concat(t),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(t){this._state===0&&(this._state=2,this._error=t,this._onStateChanged.fire())}};Rp.EMPTY=Rp.fromArray([]);var{getWindow:Tn,getWindowId:Oj,onDidRegisterWindow:Ij}=function(){let e=new Map,t={window:or,disposables:new Pr};e.set(or.vscodeWindowId,t);let i=new He,n=new He,r=new He;function s(a,l){return(typeof a=="number"?e.get(a):void 0)??(l?t:void 0)}return{onDidRegisterWindow:i.event,onWillUnregisterWindow:r.event,onDidUnregisterWindow:n.event,registerWindow(a){if(e.has(a.vscodeWindowId))return Qe.None;let l=new Pr,o={window:a,disposables:l.add(new Pr)};return e.set(a.vscodeWindowId,o),l.add($t(()=>{e.delete(a.vscodeWindowId),n.fire(a)})),l.add(We(a,si.BEFORE_UNLOAD,()=>{r.fire(a)})),i.fire(o),l},getWindows(){return e.values()},getWindowsCount(){return e.size},getWindowId(a){return a.vscodeWindowId},hasWindow(a){return e.has(a)},getWindowById:s,getWindow(a){var c;let l=a;if((c=l==null?void 0:l.ownerDocument)!=null&&c.defaultView)return l.ownerDocument.defaultView.window;let o=a;return o!=null&&o.view?o.view.window:or},getDocument(a){return Tn(a).document}}}(),Rj=class{constructor(e,t,i,n){this._node=e,this._type=t,this._handler=i,this._options=n||!1,this._node.addEventListener(this._type,this._handler,this._options)}dispose(){this._handler&&(this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,this._handler=null)}};function We(e,t,i,n){return new Rj(e,t,i,n)}var Vp=function(e,t,i,n){return We(e,t,i,n)},Z2,Vj=class extends Nj{constructor(e){super(),this.defaultTarget=e&&Tn(e)}cancelAndSet(e,t,i){return super.cancelAndSet(e,t,i??this.defaultTarget)}},Dp=class{constructor(e,t=0){this._runner=e,this.priority=t,this._canceled=!1}dispose(){this._canceled=!0}execute(){if(!this._canceled)try{this._runner()}catch(e){G0(e)}}static sort(e,t){return t.priority-e.priority}};(function(){let e=new Map,t=new Map,i=new Map,n=new Map,r=s=>{i.set(s,!1);let a=e.get(s)??[];for(t.set(s,a),e.set(s,[]),n.set(s,!0);a.length>0;)a.sort(Dp.sort),a.shift().execute();n.set(s,!1)};Z2=(s,a,l=0)=>{let o=Oj(s),c=new Dp(a,l),u=e.get(o);return u||(u=[],e.set(o,u)),u.push(c),i.get(o)||(i.set(o,!0),s.requestAnimationFrame(()=>r(o))),c}})();function Dj(e){let t=e.getBoundingClientRect(),i=Tn(e);return{left:t.left+i.scrollX,top:t.top+i.scrollY,width:t.width,height:t.height}}var si={CLICK:"click",MOUSE_DOWN:"mousedown",MOUSE_OVER:"mouseover",MOUSE_LEAVE:"mouseleave",MOUSE_WHEEL:"wheel",POINTER_UP:"pointerup",POINTER_DOWN:"pointerdown",POINTER_MOVE:"pointermove",KEY_DOWN:"keydown",KEY_UP:"keyup",BEFORE_UNLOAD:"beforeunload",CHANGE:"change",FOCUS:"focus",BLUR:"blur",INPUT:"input"},Zj=class{constructor(e){this.domNode=e,this._maxWidth="",this._width="",this._height="",this._top="",this._left="",this._bottom="",this._right="",this._paddingTop="",this._paddingLeft="",this._paddingBottom="",this._paddingRight="",this._fontFamily="",this._fontWeight="",this._fontSize="",this._fontStyle="",this._fontFeatureSettings="",this._fontVariationSettings="",this._textDecoration="",this._lineHeight="",this._letterSpacing="",this._className="",this._display="",this._position="",this._visibility="",this._color="",this._backgroundColor="",this._layerHint=!1,this._contain="none",this._boxShadow=""}setMaxWidth(e){let t=Pi(e);this._maxWidth!==t&&(this._maxWidth=t,this.domNode.style.maxWidth=this._maxWidth)}setWidth(e){let t=Pi(e);this._width!==t&&(this._width=t,this.domNode.style.width=this._width)}setHeight(e){let t=Pi(e);this._height!==t&&(this._height=t,this.domNode.style.height=this._height)}setTop(e){let t=Pi(e);this._top!==t&&(this._top=t,this.domNode.style.top=this._top)}setLeft(e){let t=Pi(e);this._left!==t&&(this._left=t,this.domNode.style.left=this._left)}setBottom(e){let t=Pi(e);this._bottom!==t&&(this._bottom=t,this.domNode.style.bottom=this._bottom)}setRight(e){let t=Pi(e);this._right!==t&&(this._right=t,this.domNode.style.right=this._right)}setPaddingTop(e){let t=Pi(e);this._paddingTop!==t&&(this._paddingTop=t,this.domNode.style.paddingTop=this._paddingTop)}setPaddingLeft(e){let t=Pi(e);this._paddingLeft!==t&&(this._paddingLeft=t,this.domNode.style.paddingLeft=this._paddingLeft)}setPaddingBottom(e){let t=Pi(e);this._paddingBottom!==t&&(this._paddingBottom=t,this.domNode.style.paddingBottom=this._paddingBottom)}setPaddingRight(e){let t=Pi(e);this._paddingRight!==t&&(this._paddingRight=t,this.domNode.style.paddingRight=this._paddingRight)}setFontFamily(e){this._fontFamily!==e&&(this._fontFamily=e,this.domNode.style.fontFamily=this._fontFamily)}setFontWeight(e){this._fontWeight!==e&&(this._fontWeight=e,this.domNode.style.fontWeight=this._fontWeight)}setFontSize(e){let t=Pi(e);this._fontSize!==t&&(this._fontSize=t,this.domNode.style.fontSize=this._fontSize)}setFontStyle(e){this._fontStyle!==e&&(this._fontStyle=e,this.domNode.style.fontStyle=this._fontStyle)}setFontFeatureSettings(e){this._fontFeatureSettings!==e&&(this._fontFeatureSettings=e,this.domNode.style.fontFeatureSettings=this._fontFeatureSettings)}setFontVariationSettings(e){this._fontVariationSettings!==e&&(this._fontVariationSettings=e,this.domNode.style.fontVariationSettings=this._fontVariationSettings)}setTextDecoration(e){this._textDecoration!==e&&(this._textDecoration=e,this.domNode.style.textDecoration=this._textDecoration)}setLineHeight(e){let t=Pi(e);this._lineHeight!==t&&(this._lineHeight=t,this.domNode.style.lineHeight=this._lineHeight)}setLetterSpacing(e){let t=Pi(e);this._letterSpacing!==t&&(this._letterSpacing=t,this.domNode.style.letterSpacing=this._letterSpacing)}setClassName(e){this._className!==e&&(this._className=e,this.domNode.className=this._className)}toggleClassName(e,t){this.domNode.classList.toggle(e,t),this._className=this.domNode.className}setDisplay(e){this._display!==e&&(this._display=e,this.domNode.style.display=this._display)}setPosition(e){this._position!==e&&(this._position=e,this.domNode.style.position=this._position)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this.domNode.style.visibility=this._visibility)}setColor(e){this._color!==e&&(this._color=e,this.domNode.style.color=this._color)}setBackgroundColor(e){this._backgroundColor!==e&&(this._backgroundColor=e,this.domNode.style.backgroundColor=this._backgroundColor)}setLayerHinting(e){this._layerHint!==e&&(this._layerHint=e,this.domNode.style.transform=this._layerHint?"translate3d(0px, 0px, 0px)":"")}setBoxShadow(e){this._boxShadow!==e&&(this._boxShadow=e,this.domNode.style.boxShadow=e)}setContain(e){this._contain!==e&&(this._contain=e,this.domNode.style.contain=this._contain)}setAttribute(e,t){this.domNode.setAttribute(e,t)}removeAttribute(e){this.domNode.removeAttribute(e)}appendChild(e){this.domNode.appendChild(e.domNode)}removeChild(e){this.domNode.removeChild(e.domNode)}};function Pi(e){return typeof e=="number"?`${e}px`:e}function mo(e){return new Zj(e)}var Db=class{constructor(){this._hooks=new Pr,this._pointerMoveCallback=null,this._onStopCallback=null}dispose(){this.stopMonitoring(!1),this._hooks.dispose()}stopMonitoring(e,t){if(!this.isMonitoring())return;this._hooks.clear(),this._pointerMoveCallback=null;let i=this._onStopCallback;this._onStopCallback=null,e&&i&&i(t)}isMonitoring(){return!!this._pointerMoveCallback}startMonitoring(e,t,i,n,r){this.isMonitoring()&&this.stopMonitoring(!1),this._pointerMoveCallback=n,this._onStopCallback=r;let s=e;try{e.setPointerCapture(t),this._hooks.add($t(()=>{try{e.releasePointerCapture(t)}catch{}}))}catch{s=Tn(e)}this._hooks.add(We(s,si.POINTER_MOVE,a=>{if(a.buttons!==i){this.stopMonitoring(!0);return}a.preventDefault(),this._pointerMoveCallback(a)})),this._hooks.add(We(s,si.POINTER_UP,a=>this.stopMonitoring(!0)))}};function Bj(e,t,i){let n=null,r=null;if(typeof i.value=="function"?(n="value",r=i.value,r.length!==0&&console.warn("Memoize should only be used in functions with zero parameters")):typeof i.get=="function"&&(n="get",r=i.get),!r)throw new Error("not supported");let s=`$memoize$${t}`;i[n]=function(...a){return this.hasOwnProperty(s)||Object.defineProperty(this,s,{configurable:!1,enumerable:!1,writable:!1,value:r.apply(this,a)}),this[s]}}var Mn;(e=>(e.Tap="-xterm-gesturetap",e.Change="-xterm-gesturechange",e.Start="-xterm-gesturestart",e.End="-xterm-gesturesend",e.Contextmenu="-xterm-gesturecontextmenu"))(Mn||(Mn={}));var Xl=class vi extends Qe{constructor(){super(),this.dispatched=!1,this.targets=new Ep,this.ignoreTargets=new Ep,this.activeTouches={},this.handle=null,this._lastSetTapCountTime=0,this._register(pi.runAndSubscribe(Ij,({window:t,disposables:i})=>{i.add(We(t.document,"touchstart",n=>this.onTouchStart(n),{passive:!1})),i.add(We(t.document,"touchend",n=>this.onTouchEnd(t,n))),i.add(We(t.document,"touchmove",n=>this.onTouchMove(n),{passive:!1}))},{window:or,disposables:this._store}))}static addTarget(t){if(!vi.isTouchDevice())return Qe.None;vi.INSTANCE||(vi.INSTANCE=new vi);let i=vi.INSTANCE.targets.push(t);return $t(i)}static ignoreTarget(t){if(!vi.isTouchDevice())return Qe.None;vi.INSTANCE||(vi.INSTANCE=new vi);let i=vi.INSTANCE.ignoreTargets.push(t);return $t(i)}static isTouchDevice(){return"ontouchstart"in or||navigator.maxTouchPoints>0}dispose(){this.handle&&(this.handle.dispose(),this.handle=null),super.dispose()}onTouchStart(t){let i=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(let n=0,r=t.targetTouches.length;n<r;n++){let s=t.targetTouches.item(n);this.activeTouches[s.identifier]={id:s.identifier,initialTarget:s.target,initialTimeStamp:i,initialPageX:s.pageX,initialPageY:s.pageY,rollingTimestamps:[i],rollingPageX:[s.pageX],rollingPageY:[s.pageY]};let a=this.newGestureEvent(Mn.Start,s.target);a.pageX=s.pageX,a.pageY=s.pageY,this.dispatchEvent(a)}this.dispatched&&(t.preventDefault(),t.stopPropagation(),this.dispatched=!1)}onTouchEnd(t,i){let n=Date.now(),r=Object.keys(this.activeTouches).length;for(let s=0,a=i.changedTouches.length;s<a;s++){let l=i.changedTouches.item(s);if(!this.activeTouches.hasOwnProperty(String(l.identifier))){console.warn("move of an UNKNOWN touch",l);continue}let o=this.activeTouches[l.identifier],c=Date.now()-o.initialTimeStamp;if(c<vi.HOLD_DELAY&&Math.abs(o.initialPageX-Di(o.rollingPageX))<30&&Math.abs(o.initialPageY-Di(o.rollingPageY))<30){let u=this.newGestureEvent(Mn.Tap,o.initialTarget);u.pageX=Di(o.rollingPageX),u.pageY=Di(o.rollingPageY),this.dispatchEvent(u)}else if(c>=vi.HOLD_DELAY&&Math.abs(o.initialPageX-Di(o.rollingPageX))<30&&Math.abs(o.initialPageY-Di(o.rollingPageY))<30){let u=this.newGestureEvent(Mn.Contextmenu,o.initialTarget);u.pageX=Di(o.rollingPageX),u.pageY=Di(o.rollingPageY),this.dispatchEvent(u)}else if(r===1){let u=Di(o.rollingPageX),d=Di(o.rollingPageY),h=Di(o.rollingTimestamps)-o.rollingTimestamps[0],f=u-o.rollingPageX[0],v=d-o.rollingPageY[0],p=[...this.targets].filter(w=>o.initialTarget instanceof Node&&w.contains(o.initialTarget));this.inertia(t,p,n,Math.abs(f)/h,f>0?1:-1,u,Math.abs(v)/h,v>0?1:-1,d)}this.dispatchEvent(this.newGestureEvent(Mn.End,o.initialTarget)),delete this.activeTouches[l.identifier]}this.dispatched&&(i.preventDefault(),i.stopPropagation(),this.dispatched=!1)}newGestureEvent(t,i){let n=document.createEvent("CustomEvent");return n.initEvent(t,!1,!0),n.initialTarget=i,n.tapCount=0,n}dispatchEvent(t){if(t.type===Mn.Tap){let i=new Date().getTime(),n=0;i-this._lastSetTapCountTime>vi.CLEAR_TAP_COUNT_TIME?n=1:n=2,this._lastSetTapCountTime=i,t.tapCount=n}else(t.type===Mn.Change||t.type===Mn.Contextmenu)&&(this._lastSetTapCountTime=0);if(t.initialTarget instanceof Node){for(let n of this.ignoreTargets)if(n.contains(t.initialTarget))return;let i=[];for(let n of this.targets)if(n.contains(t.initialTarget)){let r=0,s=t.initialTarget;for(;s&&s!==n;)r++,s=s.parentElement;i.push([r,n])}i.sort((n,r)=>n[0]-r[0]);for(let[n,r]of i)r.dispatchEvent(t),this.dispatched=!0}}inertia(t,i,n,r,s,a,l,o,c){this.handle=Z2(t,()=>{let u=Date.now(),d=u-n,h=0,f=0,v=!0;r+=vi.SCROLL_FRICTION*d,l+=vi.SCROLL_FRICTION*d,r>0&&(v=!1,h=s*r*d),l>0&&(v=!1,f=o*l*d);let p=this.newGestureEvent(Mn.Change);p.translationX=h,p.translationY=f,i.forEach(w=>w.dispatchEvent(p)),v||this.inertia(t,i,u,r,s,a+h,l,o,c+f)})}onTouchMove(t){let i=Date.now();for(let n=0,r=t.changedTouches.length;n<r;n++){let s=t.changedTouches.item(n);if(!this.activeTouches.hasOwnProperty(String(s.identifier))){console.warn("end of an UNKNOWN touch",s);continue}let a=this.activeTouches[s.identifier],l=this.newGestureEvent(Mn.Change,a.initialTarget);l.translationX=s.pageX-Di(a.rollingPageX),l.translationY=s.pageY-Di(a.rollingPageY),l.pageX=s.pageX,l.pageY=s.pageY,this.dispatchEvent(l),a.rollingPageX.length>3&&(a.rollingPageX.shift(),a.rollingPageY.shift(),a.rollingTimestamps.shift()),a.rollingPageX.push(s.pageX),a.rollingPageY.push(s.pageY),a.rollingTimestamps.push(i)}this.dispatched&&(t.preventDefault(),t.stopPropagation(),this.dispatched=!1)}};Xl.SCROLL_FRICTION=-.005,Xl.HOLD_DELAY=700,Xl.CLEAR_TAP_COUNT_TIME=400,Ot([Bj],Xl,"isTouchDevice",1);var Fj=Xl,B2=class extends Qe{onclick(e,t){this._register(We(e,si.CLICK,i=>t(new O0(Tn(e),i))))}onmousedown(e,t){this._register(We(e,si.MOUSE_DOWN,i=>t(new O0(Tn(e),i))))}onmouseover(e,t){this._register(We(e,si.MOUSE_OVER,i=>t(new O0(Tn(e),i))))}onmouseleave(e,t){this._register(We(e,si.MOUSE_LEAVE,i=>t(new O0(Tn(e),i))))}onkeydown(e,t){this._register(We(e,si.KEY_DOWN,i=>t(new Pp(i))))}onkeyup(e,t){this._register(We(e,si.KEY_UP,i=>t(new Pp(i))))}oninput(e,t){this._register(We(e,si.INPUT,t))}onblur(e,t){this._register(We(e,si.BLUR,t))}onfocus(e,t){this._register(We(e,si.FOCUS,t))}onchange(e,t){this._register(We(e,si.CHANGE,t))}ignoreGesture(e){return Fj.ignoreTarget(e)}},Zp=11,zj=class extends B2{constructor(e){super(),this._onActivate=e.onActivate,this.bgDomNode=document.createElement("div"),this.bgDomNode.className="arrow-background",this.bgDomNode.style.position="absolute",this.bgDomNode.style.width=e.bgWidth+"px",this.bgDomNode.style.height=e.bgHeight+"px",typeof e.top<"u"&&(this.bgDomNode.style.top="0px"),typeof e.left<"u"&&(this.bgDomNode.style.left="0px"),typeof e.bottom<"u"&&(this.bgDomNode.style.bottom="0px"),typeof e.right<"u"&&(this.bgDomNode.style.right="0px"),this.domNode=document.createElement("div"),this.domNode.className=e.className,this.domNode.style.position="absolute",this.domNode.style.width=Zp+"px",this.domNode.style.height=Zp+"px",typeof e.top<"u"&&(this.domNode.style.top=e.top+"px"),typeof e.left<"u"&&(this.domNode.style.left=e.left+"px"),typeof e.bottom<"u"&&(this.domNode.style.bottom=e.bottom+"px"),typeof e.right<"u"&&(this.domNode.style.right=e.right+"px"),this._pointerMoveMonitor=this._register(new Db),this._register(Vp(this.bgDomNode,si.POINTER_DOWN,t=>this._arrowPointerDown(t))),this._register(Vp(this.domNode,si.POINTER_DOWN,t=>this._arrowPointerDown(t))),this._pointerdownRepeatTimer=this._register(new Vj),this._pointerdownScheduleRepeatTimer=this._register(new D2)}_arrowPointerDown(e){if(!e.target||!(e.target instanceof Element))return;let t=()=>{this._pointerdownRepeatTimer.cancelAndSet(()=>this._onActivate(),1e3/24,Tn(e))};this._onActivate(),this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancelAndSet(t,200),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,i=>{},()=>{this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancel()}),e.preventDefault()}},Uj=class Xd{constructor(t,i,n,r,s,a,l){this._forceIntegerValues=t,this._scrollStateBrand=void 0,this._forceIntegerValues&&(i=i|0,n=n|0,r=r|0,s=s|0,a=a|0,l=l|0),this.rawScrollLeft=r,this.rawScrollTop=l,i<0&&(i=0),r+i>n&&(r=n-i),r<0&&(r=0),s<0&&(s=0),l+s>a&&(l=a-s),l<0&&(l=0),this.width=i,this.scrollWidth=n,this.scrollLeft=r,this.height=s,this.scrollHeight=a,this.scrollTop=l}equals(t){return this.rawScrollLeft===t.rawScrollLeft&&this.rawScrollTop===t.rawScrollTop&&this.width===t.width&&this.scrollWidth===t.scrollWidth&&this.scrollLeft===t.scrollLeft&&this.height===t.height&&this.scrollHeight===t.scrollHeight&&this.scrollTop===t.scrollTop}withScrollDimensions(t,i){return new Xd(this._forceIntegerValues,typeof t.width<"u"?t.width:this.width,typeof t.scrollWidth<"u"?t.scrollWidth:this.scrollWidth,i?this.rawScrollLeft:this.scrollLeft,typeof t.height<"u"?t.height:this.height,typeof t.scrollHeight<"u"?t.scrollHeight:this.scrollHeight,i?this.rawScrollTop:this.scrollTop)}withScrollPosition(t){return new Xd(this._forceIntegerValues,this.width,this.scrollWidth,typeof t.scrollLeft<"u"?t.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,typeof t.scrollTop<"u"?t.scrollTop:this.rawScrollTop)}createScrollEvent(t,i){let n=this.width!==t.width,r=this.scrollWidth!==t.scrollWidth,s=this.scrollLeft!==t.scrollLeft,a=this.height!==t.height,l=this.scrollHeight!==t.scrollHeight,o=this.scrollTop!==t.scrollTop;return{inSmoothScrolling:i,oldWidth:t.width,oldScrollWidth:t.scrollWidth,oldScrollLeft:t.scrollLeft,width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,oldHeight:t.height,oldScrollHeight:t.scrollHeight,oldScrollTop:t.scrollTop,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:n,scrollWidthChanged:r,scrollLeftChanged:s,heightChanged:a,scrollHeightChanged:l,scrollTopChanged:o}}},Wj=class extends Qe{constructor(e){super(),this._scrollableBrand=void 0,this._onScroll=this._register(new He),this.onScroll=this._onScroll.event,this._smoothScrollDuration=e.smoothScrollDuration,this._scheduleAtNextAnimationFrame=e.scheduleAtNextAnimationFrame,this._state=new Uj(e.forceIntegerValues,0,0,0,0,0,0),this._smoothScrolling=null}dispose(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),super.dispose()}setSmoothScrollDuration(e){this._smoothScrollDuration=e}validateScrollPosition(e){return this._state.withScrollPosition(e)}getScrollDimensions(){return this._state}setScrollDimensions(e,t){var n;let i=this._state.withScrollDimensions(e,t);this._setState(i,!!this._smoothScrolling),(n=this._smoothScrolling)==null||n.acceptScrollDimensions(this._state)}getFutureScrollPosition(){return this._smoothScrolling?this._smoothScrolling.to:this._state}getCurrentScrollPosition(){return this._state}setScrollPositionNow(e){let t=this._state.withScrollPosition(e);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(t,!1)}setScrollPositionSmooth(e,t){if(this._smoothScrollDuration===0)return this.setScrollPositionNow(e);if(this._smoothScrolling){e={scrollLeft:typeof e.scrollLeft>"u"?this._smoothScrolling.to.scrollLeft:e.scrollLeft,scrollTop:typeof e.scrollTop>"u"?this._smoothScrolling.to.scrollTop:e.scrollTop};let i=this._state.withScrollPosition(e);if(this._smoothScrolling.to.scrollLeft===i.scrollLeft&&this._smoothScrolling.to.scrollTop===i.scrollTop)return;let n;t?n=new Fp(this._smoothScrolling.from,i,this._smoothScrolling.startTime,this._smoothScrolling.duration):n=this._smoothScrolling.combine(this._state,i,this._smoothScrollDuration),this._smoothScrolling.dispose(),this._smoothScrolling=n}else{let i=this._state.withScrollPosition(e);this._smoothScrolling=Fp.start(this._state,i,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}hasPendingScrollAnimation(){return!!this._smoothScrolling}_performSmoothScrolling(){if(!this._smoothScrolling)return;let e=this._smoothScrolling.tick(),t=this._state.withScrollPosition(e);if(this._setState(t,!0),!!this._smoothScrolling){if(e.isDone){this._smoothScrolling.dispose(),this._smoothScrolling=null;return}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}}_setState(e,t){let i=this._state;i.equals(e)||(this._state=e,this._onScroll.fire(this._state.createScrollEvent(i,t)))}},Bp=class{constructor(e,t,i){this.scrollLeft=e,this.scrollTop=t,this.isDone=i}};function mu(e,t){let i=t-e;return function(n){return e+i*qj(n)}}function jj(e,t,i){return function(n){return n<i?e(n/i):t((n-i)/(1-i))}}var Fp=class Jd{constructor(t,i,n,r){this.from=t,this.to=i,this.duration=r,this.startTime=n,this.animationFrameDisposable=null,this._initAnimations()}_initAnimations(){this.scrollLeft=this._initAnimation(this.from.scrollLeft,this.to.scrollLeft,this.to.width),this.scrollTop=this._initAnimation(this.from.scrollTop,this.to.scrollTop,this.to.height)}_initAnimation(t,i,n){if(Math.abs(t-i)>2.5*n){let r,s;return t<i?(r=t+.75*n,s=i-.75*n):(r=t-.75*n,s=i+.75*n),jj(mu(t,r),mu(s,i),.33)}return mu(t,i)}dispose(){this.animationFrameDisposable!==null&&(this.animationFrameDisposable.dispose(),this.animationFrameDisposable=null)}acceptScrollDimensions(t){this.to=t.withScrollPosition(this.to),this._initAnimations()}tick(){return this._tick(Date.now())}_tick(t){let i=(t-this.startTime)/this.duration;if(i<1){let n=this.scrollLeft(i),r=this.scrollTop(i);return new Bp(n,r,!1)}return new Bp(this.to.scrollLeft,this.to.scrollTop,!0)}combine(t,i,n){return Jd.start(t,i,n)}static start(t,i,n){n=n+10;let r=Date.now()-10;return new Jd(t,i,r,n)}};function Kj(e){return Math.pow(e,3)}function qj(e){return 1-Kj(1-e)}var Gj=class extends Qe{constructor(e,t,i){super(),this._visibility=e,this._visibleClassName=t,this._invisibleClassName=i,this._domNode=null,this._isVisible=!1,this._isNeeded=!1,this._rawShouldBeVisible=!1,this._shouldBeVisible=!1,this._revealTimer=this._register(new D2)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this._updateShouldBeVisible())}setShouldBeVisible(e){this._rawShouldBeVisible=e,this._updateShouldBeVisible()}_applyVisibilitySetting(){return this._visibility===2?!1:this._visibility===3?!0:this._rawShouldBeVisible}_updateShouldBeVisible(){let e=this._applyVisibilitySetting();this._shouldBeVisible!==e&&(this._shouldBeVisible=e,this.ensureVisibility())}setIsNeeded(e){this._isNeeded!==e&&(this._isNeeded=e,this.ensureVisibility())}setDomNode(e){this._domNode=e,this._domNode.setClassName(this._invisibleClassName),this.setShouldBeVisible(!1)}ensureVisibility(){if(!this._isNeeded){this._hide(!1);return}this._shouldBeVisible?this._reveal():this._hide(!0)}_reveal(){this._isVisible||(this._isVisible=!0,this._revealTimer.setIfNotSet(()=>{var e;(e=this._domNode)==null||e.setClassName(this._visibleClassName)},0))}_hide(e){var t;this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,(t=this._domNode)==null||t.setClassName(this._invisibleClassName+(e?" fade":"")))}},Yj=140,Zb=class extends B2{constructor(e){super(),this._lazyRender=e.lazyRender,this._host=e.host,this._scrollable=e.scrollable,this._scrollByPage=e.scrollByPage,this._scrollbarState=e.scrollbarState,this._visibilityController=this._register(new Gj(e.visibility,"visible scrollbar "+e.extraScrollbarClassName,"invisible scrollbar "+e.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._pointerMoveMonitor=this._register(new Db),this._shouldRender=!0,this.domNode=mo(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this._visibilityController.setDomNode(this.domNode),this.domNode.setPosition("absolute"),this._register(We(this.domNode.domNode,si.POINTER_DOWN,t=>this._domNodePointerDown(t)))}_createArrow(e){let t=this._register(new zj(e));this.domNode.domNode.appendChild(t.bgDomNode),this.domNode.domNode.appendChild(t.domNode)}_createSlider(e,t,i,n){this.slider=mo(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(e),this.slider.setLeft(t),typeof i=="number"&&this.slider.setWidth(i),typeof n=="number"&&this.slider.setHeight(n),this.slider.setLayerHinting(!0),this.slider.setContain("strict"),this.domNode.domNode.appendChild(this.slider.domNode),this._register(We(this.slider.domNode,si.POINTER_DOWN,r=>{r.button===0&&(r.preventDefault(),this._sliderPointerDown(r))})),this.onclick(this.slider.domNode,r=>{r.leftButton&&r.stopPropagation()})}_onElementSize(e){return this._scrollbarState.setVisibleSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollSize(e){return this._scrollbarState.setScrollSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollPosition(e){return this._scrollbarState.setScrollPosition(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}beginReveal(){this._visibilityController.setShouldBeVisible(!0)}beginHide(){this._visibilityController.setShouldBeVisible(!1)}render(){this._shouldRender&&(this._shouldRender=!1,this._renderDomNode(this._scrollbarState.getRectangleLargeSize(),this._scrollbarState.getRectangleSmallSize()),this._updateSlider(this._scrollbarState.getSliderSize(),this._scrollbarState.getArrowSize()+this._scrollbarState.getSliderPosition()))}_domNodePointerDown(e){e.target===this.domNode.domNode&&this._onPointerDown(e)}delegatePointerDown(e){let t=this.domNode.domNode.getClientRects()[0].top,i=t+this._scrollbarState.getSliderPosition(),n=t+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),r=this._sliderPointerPosition(e);i<=r&&r<=n?e.button===0&&(e.preventDefault(),this._sliderPointerDown(e)):this._onPointerDown(e)}_onPointerDown(e){let t,i;if(e.target===this.domNode.domNode&&typeof e.offsetX=="number"&&typeof e.offsetY=="number")t=e.offsetX,i=e.offsetY;else{let r=Dj(this.domNode.domNode);t=e.pageX-r.left,i=e.pageY-r.top}let n=this._pointerDownRelativePosition(t,i);this._setDesiredScrollPositionNow(this._scrollByPage?this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(n):this._scrollbarState.getDesiredScrollPositionFromOffset(n)),e.button===0&&(e.preventDefault(),this._sliderPointerDown(e))}_sliderPointerDown(e){if(!e.target||!(e.target instanceof Element))return;let t=this._sliderPointerPosition(e),i=this._sliderOrthogonalPointerPosition(e),n=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,r=>{let s=this._sliderOrthogonalPointerPosition(r),a=Math.abs(s-i);if(Ob&&a>Yj){this._setDesiredScrollPositionNow(n.getScrollPosition());return}let l=this._sliderPointerPosition(r)-t;this._setDesiredScrollPositionNow(n.getDesiredScrollPositionFromDelta(l))},()=>{this.slider.toggleClassName("active",!1),this._host.onDragEnd()}),this._host.onDragStart()}_setDesiredScrollPositionNow(e){let t={};this.writeScrollPosition(t,e),this._scrollable.setScrollPositionNow(t)}updateScrollbarSize(e){this._updateScrollbarSize(e),this._scrollbarState.setScrollbarSize(e),this._shouldRender=!0,this._lazyRender||this.render()}isNeeded(){return this._scrollbarState.isNeeded()}},Bb=class Qd{constructor(t,i,n,r,s,a){this._scrollbarSize=Math.round(i),this._oppositeScrollbarSize=Math.round(n),this._arrowSize=Math.round(t),this._visibleSize=r,this._scrollSize=s,this._scrollPosition=a,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}clone(){return new Qd(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize,this._visibleSize,this._scrollSize,this._scrollPosition)}setVisibleSize(t){let i=Math.round(t);return this._visibleSize!==i?(this._visibleSize=i,this._refreshComputedValues(),!0):!1}setScrollSize(t){let i=Math.round(t);return this._scrollSize!==i?(this._scrollSize=i,this._refreshComputedValues(),!0):!1}setScrollPosition(t){let i=Math.round(t);return this._scrollPosition!==i?(this._scrollPosition=i,this._refreshComputedValues(),!0):!1}setScrollbarSize(t){this._scrollbarSize=Math.round(t)}setOppositeScrollbarSize(t){this._oppositeScrollbarSize=Math.round(t)}static _computeValues(t,i,n,r,s){let a=Math.max(0,n-t),l=Math.max(0,a-2*i),o=r>0&&r>n;if(!o)return{computedAvailableSize:Math.round(a),computedIsNeeded:o,computedSliderSize:Math.round(l),computedSliderRatio:0,computedSliderPosition:0};let c=Math.round(Math.max(20,Math.floor(n*l/r))),u=(l-c)/(r-n),d=s*u;return{computedAvailableSize:Math.round(a),computedIsNeeded:o,computedSliderSize:Math.round(c),computedSliderRatio:u,computedSliderPosition:Math.round(d)}}_refreshComputedValues(){let t=Qd._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=t.computedAvailableSize,this._computedIsNeeded=t.computedIsNeeded,this._computedSliderSize=t.computedSliderSize,this._computedSliderRatio=t.computedSliderRatio,this._computedSliderPosition=t.computedSliderPosition}getArrowSize(){return this._arrowSize}getScrollPosition(){return this._scrollPosition}getRectangleLargeSize(){return this._computedAvailableSize}getRectangleSmallSize(){return this._scrollbarSize}isNeeded(){return this._computedIsNeeded}getSliderSize(){return this._computedSliderSize}getSliderPosition(){return this._computedSliderPosition}getDesiredScrollPositionFromOffset(t){if(!this._computedIsNeeded)return 0;let i=t-this._arrowSize-this._computedSliderSize/2;return Math.round(i/this._computedSliderRatio)}getDesiredScrollPositionFromOffsetPaged(t){if(!this._computedIsNeeded)return 0;let i=t-this._arrowSize,n=this._scrollPosition;return i<this._computedSliderPosition?n-=this._visibleSize:n+=this._visibleSize,n}getDesiredScrollPositionFromDelta(t){if(!this._computedIsNeeded)return 0;let i=this._computedSliderPosition+t;return Math.round(i/this._computedSliderRatio)}},Xj=class extends Zb{constructor(e,t,i){let n=e.getScrollDimensions(),r=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:i,scrollbarState:new Bb(t.horizontalHasArrows?t.arrowSize:0,t.horizontal===2?0:t.horizontalScrollbarSize,t.vertical===2?0:t.verticalScrollbarSize,n.width,n.scrollWidth,r.scrollLeft),visibility:t.horizontal,extraScrollbarClassName:"horizontal",scrollable:e,scrollByPage:t.scrollByPage}),t.horizontalHasArrows)throw new Error("horizontalHasArrows is not supported in xterm.js");this._createSlider(Math.floor((t.horizontalScrollbarSize-t.horizontalSliderSize)/2),0,void 0,t.horizontalSliderSize)}_updateSlider(e,t){this.slider.setWidth(e),this.slider.setLeft(t)}_renderDomNode(e,t){this.domNode.setWidth(e),this.domNode.setHeight(t),this.domNode.setLeft(0),this.domNode.setBottom(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(e.width)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return e}_sliderPointerPosition(e){return e.pageX}_sliderOrthogonalPointerPosition(e){return e.pageY}_updateScrollbarSize(e){this.slider.setHeight(e)}writeScrollPosition(e,t){e.scrollLeft=t}updateOptions(e){this.updateScrollbarSize(e.horizontal===2?0:e.horizontalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(e.vertical===2?0:e.verticalScrollbarSize),this._visibilityController.setVisibility(e.horizontal),this._scrollByPage=e.scrollByPage}},Jj=class extends Zb{constructor(e,t,i){let n=e.getScrollDimensions(),r=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:i,scrollbarState:new Bb(t.verticalHasArrows?t.arrowSize:0,t.vertical===2?0:t.verticalScrollbarSize,0,n.height,n.scrollHeight,r.scrollTop),visibility:t.vertical,extraScrollbarClassName:"vertical",scrollable:e,scrollByPage:t.scrollByPage}),t.verticalHasArrows)throw new Error("horizontalHasArrows is not supported in xterm.js");this._createSlider(0,Math.floor((t.verticalScrollbarSize-t.verticalSliderSize)/2),t.verticalSliderSize,void 0)}_updateSlider(e,t){this.slider.setHeight(e),this.slider.setTop(t)}_renderDomNode(e,t){this.domNode.setWidth(t),this.domNode.setHeight(e),this.domNode.setRight(0),this.domNode.setTop(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollHeight)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollTop)||this._shouldRender,this._shouldRender=this._onElementSize(e.height)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return t}_sliderPointerPosition(e){return e.pageY}_sliderOrthogonalPointerPosition(e){return e.pageX}_updateScrollbarSize(e){this.slider.setWidth(e)}writeScrollPosition(e,t){e.scrollTop=t}updateOptions(e){this.updateScrollbarSize(e.vertical===2?0:e.verticalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(0),this._visibilityController.setVisibility(e.vertical),this._scrollByPage=e.scrollByPage}},Qj=500,zp=50,eK=class{constructor(e,t,i){this.timestamp=e,this.deltaX=t,this.deltaY=i,this.score=0}},eh=class{constructor(){this._capacity=5,this._memory=[],this._front=-1,this._rear=-1}isPhysicalMouseWheel(){if(this._front===-1&&this._rear===-1)return!1;let t=1,i=0,n=1,r=this._rear;do{let s=r===this._front?t:Math.pow(2,-n);if(t-=s,i+=this._memory[r].score*s,r===this._front)break;r=(this._capacity+r-1)%this._capacity,n++}while(!0);return i<=.5}acceptStandardWheelEvent(t){if(R2){let i=Tn(t.browserEvent),n=dj(i);this.accept(Date.now(),t.deltaX*n,t.deltaY*n)}else this.accept(Date.now(),t.deltaX,t.deltaY)}accept(t,i,n){let r=null,s=new eK(t,i,n);this._front===-1&&this._rear===-1?(this._memory[0]=s,this._front=0,this._rear=0):(r=this._memory[this._rear],this._rear=(this._rear+1)%this._capacity,this._rear===this._front&&(this._front=(this._front+1)%this._capacity),this._memory[this._rear]=s),s.score=this._computeScore(s,r)}_computeScore(t,i){if(Math.abs(t.deltaX)>0&&Math.abs(t.deltaY)>0)return 1;let n=.5;if((!this._isAlmostInt(t.deltaX)||!this._isAlmostInt(t.deltaY))&&(n+=.25),i){let r=Math.abs(t.deltaX),s=Math.abs(t.deltaY),a=Math.abs(i.deltaX),l=Math.abs(i.deltaY),o=Math.max(Math.min(r,a),1),c=Math.max(Math.min(s,l),1),u=Math.max(r,a),d=Math.max(s,l);u%o===0&&d%c===0&&(n-=.5)}return Math.min(Math.max(n,0),1)}_isAlmostInt(t){return Math.abs(Math.round(t)-t)<.01}};eh.INSTANCE=new eh;var tK=eh,iK=class extends B2{constructor(e,t,i){super(),this._onScroll=this._register(new He),this.onScroll=this._onScroll.event,this._onWillScroll=this._register(new He),this.onWillScroll=this._onWillScroll.event,this._options=rK(t),this._scrollable=i,this._register(this._scrollable.onScroll(r=>{this._onWillScroll.fire(r),this._onDidScroll(r),this._onScroll.fire(r)}));let n={onMouseWheel:r=>this._onMouseWheel(r),onDragStart:()=>this._onDragStart(),onDragEnd:()=>this._onDragEnd()};this._verticalScrollbar=this._register(new Jj(this._scrollable,this._options,n)),this._horizontalScrollbar=this._register(new Xj(this._scrollable,this._options,n)),this._domNode=document.createElement("div"),this._domNode.className="xterm-scrollable-element "+this._options.className,this._domNode.setAttribute("role","presentation"),this._domNode.style.position="relative",this._domNode.appendChild(e),this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode),this._domNode.appendChild(this._verticalScrollbar.domNode.domNode),this._options.useShadows?(this._leftShadowDomNode=mo(document.createElement("div")),this._leftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=mo(document.createElement("div")),this._topShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=mo(document.createElement("div")),this._topLeftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topLeftShadowDomNode.domNode)):(this._leftShadowDomNode=null,this._topShadowDomNode=null,this._topLeftShadowDomNode=null),this._listenOnDomNode=this._options.listenOnDomNode||this._domNode,this._mouseWheelToDispose=[],this._setListeningToMouseWheel(this._options.handleMouseWheel),this.onmouseover(this._listenOnDomNode,r=>this._onMouseOver(r)),this.onmouseleave(this._listenOnDomNode,r=>this._onMouseLeave(r)),this._hideTimeout=this._register(new D2),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}get options(){return this._options}dispose(){this._mouseWheelToDispose=ys(this._mouseWheelToDispose),super.dispose()}getDomNode(){return this._domNode}getOverviewRulerLayoutInfo(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}delegateVerticalScrollbarPointerDown(e){this._verticalScrollbar.delegatePointerDown(e)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(e){this._scrollable.setScrollDimensions(e,!1)}updateClassName(e){this._options.className=e,Dn&&(this._options.className+=" mac"),this._domNode.className="xterm-scrollable-element "+this._options.className}updateOptions(e){typeof e.handleMouseWheel<"u"&&(this._options.handleMouseWheel=e.handleMouseWheel,this._setListeningToMouseWheel(this._options.handleMouseWheel)),typeof e.mouseWheelScrollSensitivity<"u"&&(this._options.mouseWheelScrollSensitivity=e.mouseWheelScrollSensitivity),typeof e.fastScrollSensitivity<"u"&&(this._options.fastScrollSensitivity=e.fastScrollSensitivity),typeof e.scrollPredominantAxis<"u"&&(this._options.scrollPredominantAxis=e.scrollPredominantAxis),typeof e.horizontal<"u"&&(this._options.horizontal=e.horizontal),typeof e.vertical<"u"&&(this._options.vertical=e.vertical),typeof e.horizontalScrollbarSize<"u"&&(this._options.horizontalScrollbarSize=e.horizontalScrollbarSize),typeof e.verticalScrollbarSize<"u"&&(this._options.verticalScrollbarSize=e.verticalScrollbarSize),typeof e.scrollByPage<"u"&&(this._options.scrollByPage=e.scrollByPage),this._horizontalScrollbar.updateOptions(this._options),this._verticalScrollbar.updateOptions(this._options),this._options.lazyRender||this._render()}setRevealOnScroll(e){this._revealOnScroll=e}delegateScrollFromMouseWheelEvent(e){this._onMouseWheel(new Ip(e))}_setListeningToMouseWheel(e){if(this._mouseWheelToDispose.length>0!==e&&(this._mouseWheelToDispose=ys(this._mouseWheelToDispose),e)){let t=i=>{this._onMouseWheel(new Ip(i))};this._mouseWheelToDispose.push(We(this._listenOnDomNode,si.MOUSE_WHEEL,t,{passive:!1}))}}_onMouseWheel(e){var r;if((r=e.browserEvent)!=null&&r.defaultPrevented)return;let t=tK.INSTANCE;t.acceptStandardWheelEvent(e);let i=!1;if(e.deltaY||e.deltaX){let s=e.deltaY*this._options.mouseWheelScrollSensitivity,a=e.deltaX*this._options.mouseWheelScrollSensitivity;this._options.scrollPredominantAxis&&(this._options.scrollYToX&&a+s===0?a=s=0:Math.abs(s)>=Math.abs(a)?a=0:s=0),this._options.flipAxes&&([s,a]=[a,s]);let l=!Dn&&e.browserEvent&&e.browserEvent.shiftKey;(this._options.scrollYToX||l)&&!a&&(a=s,s=0),e.browserEvent&&e.browserEvent.altKey&&(a=a*this._options.fastScrollSensitivity,s=s*this._options.fastScrollSensitivity);let o=this._scrollable.getFutureScrollPosition(),c={};if(s){let u=zp*s,d=o.scrollTop-(u<0?Math.floor(u):Math.ceil(u));this._verticalScrollbar.writeScrollPosition(c,d)}if(a){let u=zp*a,d=o.scrollLeft-(u<0?Math.floor(u):Math.ceil(u));this._horizontalScrollbar.writeScrollPosition(c,d)}c=this._scrollable.validateScrollPosition(c),(o.scrollLeft!==c.scrollLeft||o.scrollTop!==c.scrollTop)&&(this._options.mouseWheelSmoothScroll&&t.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(c):this._scrollable.setScrollPositionNow(c),i=!0)}let n=i;!n&&this._options.alwaysConsumeMouseWheel&&(n=!0),!n&&this._options.consumeMouseWheelIfScrollbarIsNeeded&&(this._verticalScrollbar.isNeeded()||this._horizontalScrollbar.isNeeded())&&(n=!0),n&&(e.preventDefault(),e.stopPropagation())}_onDidScroll(e){this._shouldRender=this._horizontalScrollbar.onDidScroll(e)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(e)||this._shouldRender,this._options.useShadows&&(this._shouldRender=!0),this._revealOnScroll&&this._reveal(),this._options.lazyRender||this._render()}renderNow(){if(!this._options.lazyRender)throw new Error("Please use `lazyRender` together with `renderNow`!");this._render()}_render(){if(this._shouldRender&&(this._shouldRender=!1,this._horizontalScrollbar.render(),this._verticalScrollbar.render(),this._options.useShadows)){let e=this._scrollable.getCurrentScrollPosition(),t=e.scrollTop>0,i=e.scrollLeft>0,n=i?" left":"",r=t?" top":"",s=i||t?" top-left-corner":"";this._leftShadowDomNode.setClassName(`shadow${n}`),this._topShadowDomNode.setClassName(`shadow${r}`),this._topLeftShadowDomNode.setClassName(`shadow${s}${r}${n}`)}}_onDragStart(){this._isDragging=!0,this._reveal()}_onDragEnd(){this._isDragging=!1,this._hide()}_onMouseLeave(e){this._mouseIsOver=!1,this._hide()}_onMouseOver(e){this._mouseIsOver=!0,this._reveal()}_reveal(){this._verticalScrollbar.beginReveal(),this._horizontalScrollbar.beginReveal(),this._scheduleHide()}_hide(){!this._mouseIsOver&&!this._isDragging&&(this._verticalScrollbar.beginHide(),this._horizontalScrollbar.beginHide())}_scheduleHide(){!this._mouseIsOver&&!this._isDragging&&this._hideTimeout.cancelAndSet(()=>this._hide(),Qj)}},nK=class extends iK{constructor(e,t,i){super(e,t,i)}setScrollPosition(e){e.reuseAnimation?this._scrollable.setScrollPositionSmooth(e,e.reuseAnimation):this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}};function rK(e){let t={lazyRender:typeof e.lazyRender<"u"?e.lazyRender:!1,className:typeof e.className<"u"?e.className:"",useShadows:typeof e.useShadows<"u"?e.useShadows:!0,handleMouseWheel:typeof e.handleMouseWheel<"u"?e.handleMouseWheel:!0,flipAxes:typeof e.flipAxes<"u"?e.flipAxes:!1,consumeMouseWheelIfScrollbarIsNeeded:typeof e.consumeMouseWheelIfScrollbarIsNeeded<"u"?e.consumeMouseWheelIfScrollbarIsNeeded:!1,alwaysConsumeMouseWheel:typeof e.alwaysConsumeMouseWheel<"u"?e.alwaysConsumeMouseWheel:!1,scrollYToX:typeof e.scrollYToX<"u"?e.scrollYToX:!1,mouseWheelScrollSensitivity:typeof e.mouseWheelScrollSensitivity<"u"?e.mouseWheelScrollSensitivity:1,fastScrollSensitivity:typeof e.fastScrollSensitivity<"u"?e.fastScrollSensitivity:5,scrollPredominantAxis:typeof e.scrollPredominantAxis<"u"?e.scrollPredominantAxis:!0,mouseWheelSmoothScroll:typeof e.mouseWheelSmoothScroll<"u"?e.mouseWheelSmoothScroll:!0,arrowSize:typeof e.arrowSize<"u"?e.arrowSize:11,listenOnDomNode:typeof e.listenOnDomNode<"u"?e.listenOnDomNode:null,horizontal:typeof e.horizontal<"u"?e.horizontal:1,horizontalScrollbarSize:typeof e.horizontalScrollbarSize<"u"?e.horizontalScrollbarSize:10,horizontalSliderSize:typeof e.horizontalSliderSize<"u"?e.horizontalSliderSize:0,horizontalHasArrows:typeof e.horizontalHasArrows<"u"?e.horizontalHasArrows:!1,vertical:typeof e.vertical<"u"?e.vertical:1,verticalScrollbarSize:typeof e.verticalScrollbarSize<"u"?e.verticalScrollbarSize:10,verticalHasArrows:typeof e.verticalHasArrows<"u"?e.verticalHasArrows:!1,verticalSliderSize:typeof e.verticalSliderSize<"u"?e.verticalSliderSize:0,scrollByPage:typeof e.scrollByPage<"u"?e.scrollByPage:!1};return t.horizontalSliderSize=typeof e.horizontalSliderSize<"u"?e.horizontalSliderSize:t.horizontalScrollbarSize,t.verticalSliderSize=typeof e.verticalSliderSize<"u"?e.verticalSliderSize:t.verticalScrollbarSize,Dn&&(t.className+=" mac"),t}var th=class extends Qe{constructor(e,t,i,n,r,s,a,l){super(),this._bufferService=i,this._optionsService=a,this._renderService=l,this._onRequestScrollLines=this._register(new He),this.onRequestScrollLines=this._onRequestScrollLines.event,this._isSyncing=!1,this._isHandlingScroll=!1,this._suppressOnScrollHandler=!1;let o=this._register(new Wj({forceIntegerValues:!1,smoothScrollDuration:this._optionsService.rawOptions.smoothScrollDuration,scheduleAtNextAnimationFrame:c=>Z2(n.window,c)}));this._register(this._optionsService.onSpecificOptionChange("smoothScrollDuration",()=>{o.setSmoothScrollDuration(this._optionsService.rawOptions.smoothScrollDuration)})),this._scrollableElement=this._register(new nK(t,{vertical:1,horizontal:2,useShadows:!1,mouseWheelSmoothScroll:!0,...this._getChangeOptions()},o)),this._register(this._optionsService.onMultipleOptionChange(["scrollSensitivity","fastScrollSensitivity","overviewRuler"],()=>this._scrollableElement.updateOptions(this._getChangeOptions()))),this._register(r.onProtocolChange(c=>{this._scrollableElement.updateOptions({handleMouseWheel:!(c&16)})})),this._scrollableElement.setScrollDimensions({height:0,scrollHeight:0}),this._register(pi.runAndSubscribe(s.onChangeColors,()=>{this._scrollableElement.getDomNode().style.backgroundColor=s.colors.background.css})),e.appendChild(this._scrollableElement.getDomNode()),this._register($t(()=>this._scrollableElement.getDomNode().remove())),this._styleElement=n.mainDocument.createElement("style"),t.appendChild(this._styleElement),this._register($t(()=>this._styleElement.remove())),this._register(pi.runAndSubscribe(s.onChangeColors,()=>{this._styleElement.textContent=[".xterm .xterm-scrollable-element > .scrollbar > .slider {",` background: ${s.colors.scrollbarSliderBackground.css};`,"}",".xterm .xterm-scrollable-element > .scrollbar > .slider:hover {",` background: ${s.colors.scrollbarSliderHoverBackground.css};`,"}",".xterm .xterm-scrollable-element > .scrollbar > .slider.active {",` background: ${s.colors.scrollbarSliderActiveBackground.css};`,"}"].join(`
|
|
90
|
-
`)})),this._register(this._bufferService.onResize(()=>this.queueSync())),this._register(this._bufferService.buffers.onBufferActivate(()=>{this._latestYDisp=void 0,this.queueSync()})),this._register(this._bufferService.onScroll(()=>this._sync())),this._register(this._scrollableElement.onScroll(c=>this._handleScroll(c)))}scrollLines(e){let t=this._scrollableElement.getScrollPosition();this._scrollableElement.setScrollPosition({reuseAnimation:!0,scrollTop:t.scrollTop+e*this._renderService.dimensions.css.cell.height})}scrollToLine(e,t){t&&(this._latestYDisp=e),this._scrollableElement.setScrollPosition({reuseAnimation:!t,scrollTop:e*this._renderService.dimensions.css.cell.height})}_getChangeOptions(){var e;return{mouseWheelScrollSensitivity:this._optionsService.rawOptions.scrollSensitivity,fastScrollSensitivity:this._optionsService.rawOptions.fastScrollSensitivity,verticalScrollbarSize:((e=this._optionsService.rawOptions.overviewRuler)==null?void 0:e.width)||14}}queueSync(e){e!==void 0&&(this._latestYDisp=e),this._queuedAnimationFrame===void 0&&(this._queuedAnimationFrame=this._renderService.addRefreshCallback(()=>{this._queuedAnimationFrame=void 0,this._sync(this._latestYDisp)}))}_sync(e=this._bufferService.buffer.ydisp){!this._renderService||this._isSyncing||(this._isSyncing=!0,this._suppressOnScrollHandler=!0,this._scrollableElement.setScrollDimensions({height:this._renderService.dimensions.css.canvas.height,scrollHeight:this._renderService.dimensions.css.cell.height*this._bufferService.buffer.lines.length}),this._suppressOnScrollHandler=!1,e!==this._latestYDisp&&this._scrollableElement.setScrollPosition({scrollTop:e*this._renderService.dimensions.css.cell.height}),this._isSyncing=!1)}_handleScroll(e){if(!this._renderService||this._isHandlingScroll||this._suppressOnScrollHandler)return;this._isHandlingScroll=!0;let t=Math.round(e.scrollTop/this._renderService.dimensions.css.cell.height),i=t-this._bufferService.buffer.ydisp;i!==0&&(this._latestYDisp=t,this._onRequestScrollLines.fire(i)),this._isHandlingScroll=!1}};th=Ot([Pe(2,Ti),Pe(3,pr),Pe(4,wb),Pe(5,Ja),Pe(6,Ni),Pe(7,_r)],th);var ih=class extends Qe{constructor(e,t,i,n,r){super(),this._screenElement=e,this._bufferService=t,this._coreBrowserService=i,this._decorationService=n,this._renderService=r,this._decorationElements=new Map,this._altBufferIsActive=!1,this._dimensionsChanged=!1,this._container=document.createElement("div"),this._container.classList.add("xterm-decoration-container"),this._screenElement.appendChild(this._container),this._register(this._renderService.onRenderedViewportChange(()=>this._doRefreshDecorations())),this._register(this._renderService.onDimensionsChange(()=>{this._dimensionsChanged=!0,this._queueRefresh()})),this._register(this._coreBrowserService.onDprChange(()=>this._queueRefresh())),this._register(this._bufferService.buffers.onBufferActivate(()=>{this._altBufferIsActive=this._bufferService.buffer===this._bufferService.buffers.alt})),this._register(this._decorationService.onDecorationRegistered(()=>this._queueRefresh())),this._register(this._decorationService.onDecorationRemoved(s=>this._removeDecoration(s))),this._register($t(()=>{this._container.remove(),this._decorationElements.clear()}))}_queueRefresh(){this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback(()=>{this._doRefreshDecorations(),this._animationFrame=void 0}))}_doRefreshDecorations(){for(let e of this._decorationService.decorations)this._renderDecoration(e);this._dimensionsChanged=!1}_renderDecoration(e){this._refreshStyle(e),this._dimensionsChanged&&this._refreshXPosition(e)}_createElement(e){var n;let t=this._coreBrowserService.mainDocument.createElement("div");t.classList.add("xterm-decoration"),t.classList.toggle("xterm-decoration-top-layer",((n=e==null?void 0:e.options)==null?void 0:n.layer)==="top"),t.style.width=`${Math.round((e.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,t.style.height=`${(e.options.height||1)*this._renderService.dimensions.css.cell.height}px`,t.style.top=`${(e.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height}px`,t.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;let i=e.options.x??0;return i&&i>this._bufferService.cols&&(t.style.display="none"),this._refreshXPosition(e,t),t}_refreshStyle(e){let t=e.marker.line-this._bufferService.buffers.active.ydisp;if(t<0||t>=this._bufferService.rows)e.element&&(e.element.style.display="none",e.onRenderEmitter.fire(e.element));else{let i=this._decorationElements.get(e);i||(i=this._createElement(e),e.element=i,this._decorationElements.set(e,i),this._container.appendChild(i),e.onDispose(()=>{this._decorationElements.delete(e),i.remove()})),i.style.display=this._altBufferIsActive?"none":"block",this._altBufferIsActive||(i.style.width=`${Math.round((e.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,i.style.height=`${(e.options.height||1)*this._renderService.dimensions.css.cell.height}px`,i.style.top=`${t*this._renderService.dimensions.css.cell.height}px`,i.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`),e.onRenderEmitter.fire(i)}}_refreshXPosition(e,t=e.element){if(!t)return;let i=e.options.x??0;(e.options.anchor||"left")==="right"?t.style.right=i?`${i*this._renderService.dimensions.css.cell.width}px`:"":t.style.left=i?`${i*this._renderService.dimensions.css.cell.width}px`:""}_removeDecoration(e){var t;(t=this._decorationElements.get(e))==null||t.remove(),this._decorationElements.delete(e),e.dispose()}};ih=Ot([Pe(1,Ti),Pe(2,pr),Pe(3,r0),Pe(4,_r)],ih);var sK=class{constructor(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}get zones(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones}clear(){this._zones.length=0,this._zonePoolIndex=0}addDecoration(e){if(e.options.overviewRulerOptions){for(let t of this._zones)if(t.color===e.options.overviewRulerOptions.color&&t.position===e.options.overviewRulerOptions.position){if(this._lineIntersectsZone(t,e.marker.line))return;if(this._lineAdjacentToZone(t,e.marker.line,e.options.overviewRulerOptions.position)){this._addLineToZone(t,e.marker.line);return}}if(this._zonePoolIndex<this._zonePool.length){this._zonePool[this._zonePoolIndex].color=e.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=e.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=e.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=e.marker.line,this._zones.push(this._zonePool[this._zonePoolIndex++]);return}this._zones.push({color:e.options.overviewRulerOptions.color,position:e.options.overviewRulerOptions.position,startBufferLine:e.marker.line,endBufferLine:e.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(e){this._linePadding=e}_lineIntersectsZone(e,t){return t>=e.startBufferLine&&t<=e.endBufferLine}_lineAdjacentToZone(e,t,i){return t>=e.startBufferLine-this._linePadding[i||"full"]&&t<=e.endBufferLine+this._linePadding[i||"full"]}_addLineToZone(e,t){e.startBufferLine=Math.min(e.startBufferLine,t),e.endBufferLine=Math.max(e.endBufferLine,t)}},kn={full:0,left:0,center:0,right:0},yr={full:0,left:0,center:0,right:0},Bl={full:0,left:0,center:0,right:0},Ic=class extends Qe{constructor(e,t,i,n,r,s,a,l){var c;super(),this._viewportElement=e,this._screenElement=t,this._bufferService=i,this._decorationService=n,this._renderService=r,this._optionsService=s,this._themeService=a,this._coreBrowserService=l,this._colorZoneStore=new sK,this._shouldUpdateDimensions=!0,this._shouldUpdateAnchor=!0,this._lastKnownBufferLength=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add("xterm-decoration-overview-ruler"),this._refreshCanvasDimensions(),(c=this._viewportElement.parentElement)==null||c.insertBefore(this._canvas,this._viewportElement),this._register($t(()=>{var u;return(u=this._canvas)==null?void 0:u.remove()}));let o=this._canvas.getContext("2d");if(o)this._ctx=o;else throw new Error("Ctx cannot be null");this._register(this._decorationService.onDecorationRegistered(()=>this._queueRefresh(void 0,!0))),this._register(this._decorationService.onDecorationRemoved(()=>this._queueRefresh(void 0,!0))),this._register(this._renderService.onRenderedViewportChange(()=>this._queueRefresh())),this._register(this._bufferService.buffers.onBufferActivate(()=>{this._canvas.style.display=this._bufferService.buffer===this._bufferService.buffers.alt?"none":"block"})),this._register(this._bufferService.onScroll(()=>{this._lastKnownBufferLength!==this._bufferService.buffers.normal.lines.length&&(this._refreshDrawHeightConstants(),this._refreshColorZonePadding())})),this._register(this._renderService.onRender(()=>{(!this._containerHeight||this._containerHeight!==this._screenElement.clientHeight)&&(this._queueRefresh(!0),this._containerHeight=this._screenElement.clientHeight)})),this._register(this._coreBrowserService.onDprChange(()=>this._queueRefresh(!0))),this._register(this._optionsService.onSpecificOptionChange("overviewRuler",()=>this._queueRefresh(!0))),this._register(this._themeService.onChangeColors(()=>this._queueRefresh())),this._queueRefresh(!0)}get _width(){var e;return((e=this._optionsService.options.overviewRuler)==null?void 0:e.width)||0}_refreshDrawConstants(){let e=Math.floor((this._canvas.width-1)/3),t=Math.ceil((this._canvas.width-1)/3);yr.full=this._canvas.width,yr.left=e,yr.center=t,yr.right=e,this._refreshDrawHeightConstants(),Bl.full=1,Bl.left=1,Bl.center=1+yr.left,Bl.right=1+yr.left+yr.center}_refreshDrawHeightConstants(){kn.full=Math.round(2*this._coreBrowserService.dpr);let e=this._canvas.height/this._bufferService.buffer.lines.length,t=Math.round(Math.max(Math.min(e,12),6)*this._coreBrowserService.dpr);kn.left=t,kn.center=t,kn.right=t}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*kn.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*kn.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*kn.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*kn.right)}),this._lastKnownBufferLength=this._bufferService.buffers.normal.lines.length}_refreshCanvasDimensions(){this._canvas.style.width=`${this._width}px`,this._canvas.width=Math.round(this._width*this._coreBrowserService.dpr),this._canvas.style.height=`${this._screenElement.clientHeight}px`,this._canvas.height=Math.round(this._screenElement.clientHeight*this._coreBrowserService.dpr),this._refreshDrawConstants(),this._refreshColorZonePadding()}_refreshDecorations(){this._shouldUpdateDimensions&&this._refreshCanvasDimensions(),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._colorZoneStore.clear();for(let t of this._decorationService.decorations)this._colorZoneStore.addDecoration(t);this._ctx.lineWidth=1,this._renderRulerOutline();let e=this._colorZoneStore.zones;for(let t of e)t.position!=="full"&&this._renderColorZone(t);for(let t of e)t.position==="full"&&this._renderColorZone(t);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderRulerOutline(){this._ctx.fillStyle=this._themeService.colors.overviewRulerBorder.css,this._ctx.fillRect(0,0,1,this._canvas.height),this._optionsService.rawOptions.overviewRuler.showTopBorder&&this._ctx.fillRect(1,0,this._canvas.width-1,1),this._optionsService.rawOptions.overviewRuler.showBottomBorder&&this._ctx.fillRect(1,this._canvas.height-1,this._canvas.width-1,this._canvas.height)}_renderColorZone(e){this._ctx.fillStyle=e.color,this._ctx.fillRect(Bl[e.position||"full"],Math.round((this._canvas.height-1)*(e.startBufferLine/this._bufferService.buffers.active.lines.length)-kn[e.position||"full"]/2),yr[e.position||"full"],Math.round((this._canvas.height-1)*((e.endBufferLine-e.startBufferLine)/this._bufferService.buffers.active.lines.length)+kn[e.position||"full"]))}_queueRefresh(e,t){this._shouldUpdateDimensions=e||this._shouldUpdateDimensions,this._shouldUpdateAnchor=t||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._refreshDecorations(),this._animationFrame=void 0}))}};Ic=Ot([Pe(2,Ti),Pe(3,r0),Pe(4,_r),Pe(5,Ni),Pe(6,Ja),Pe(7,pr)],Ic);var Ae;(e=>(e.NUL="\0",e.SOH="",e.STX="",e.ETX="",e.EOT="",e.ENQ="",e.ACK="",e.BEL="\x07",e.BS="\b",e.HT=" ",e.LF=`
|
|
91
|
-
`,e.VT="\v",e.FF="\f",e.CR="\r",e.SO="",e.SI="",e.DLE="",e.DC1="",e.DC2="",e.DC3="",e.DC4="",e.NAK="",e.SYN="",e.ETB="",e.CAN="",e.EM="",e.SUB="",e.ESC="\x1B",e.FS="",e.GS="",e.RS="",e.US="",e.SP=" ",e.DEL=""))(Ae||(Ae={}));var J0;(e=>(e.PAD="",e.HOP="",e.BPH="",e.NBH="",e.IND="",e.NEL="
",e.SSA="",e.ESA="",e.HTS="",e.HTJ="",e.VTS="",e.PLD="",e.PLU="",e.RI="",e.SS2="",e.SS3="",e.DCS="",e.PU1="",e.PU2="",e.STS="",e.CCH="",e.MW="",e.SPA="",e.EPA="",e.SOS="",e.SGCI="",e.SCI="",e.CSI="",e.ST="",e.OSC="",e.PM="",e.APC=""))(J0||(J0={}));var Fb;(e=>e.ST=`${Ae.ESC}\\`)(Fb||(Fb={}));var nh=class{constructor(e,t,i,n,r,s){this._textarea=e,this._compositionView=t,this._bufferService=i,this._optionsService=n,this._coreService=r,this._renderService=s,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}get isComposing(){return this._isComposing}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")}compositionupdate(e){this._compositionView.textContent=e.data,this.updateCompositionElements(),setTimeout(()=>{this._compositionPosition.end=this._textarea.value.length},0)}compositionend(){this._finalizeComposition(!0)}keydown(e){if(this._isComposing||this._isSendingComposition){if(e.keyCode===20||e.keyCode===229||e.keyCode===16||e.keyCode===17||e.keyCode===18)return!1;this._finalizeComposition(!1)}return e.keyCode===229?(this._handleAnyTextareaChanges(),!1):!0}_finalizeComposition(e){if(this._compositionView.classList.remove("active"),this._isComposing=!1,e){let t={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(()=>{if(this._isSendingComposition){this._isSendingComposition=!1;let i;t.start+=this._dataAlreadySent.length,this._isComposing?i=this._textarea.value.substring(t.start,this._compositionPosition.start):i=this._textarea.value.substring(t.start),i.length>0&&this._coreService.triggerDataEvent(i,!0)}},0)}else{this._isSendingComposition=!1;let t=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(t,!0)}}_handleAnyTextareaChanges(){let e=this._textarea.value;setTimeout(()=>{if(!this._isComposing){let t=this._textarea.value,i=t.replace(e,"");this._dataAlreadySent=i,t.length>e.length?this._coreService.triggerDataEvent(i,!0):t.length<e.length?this._coreService.triggerDataEvent(`${Ae.DEL}`,!0):t.length===e.length&&t!==e&&this._coreService.triggerDataEvent(t,!0)}},0)}updateCompositionElements(e){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){let t=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),i=this._renderService.dimensions.css.cell.height,n=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,r=t*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=r+"px",this._compositionView.style.top=n+"px",this._compositionView.style.height=i+"px",this._compositionView.style.lineHeight=i+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";let s=this._compositionView.getBoundingClientRect();this._textarea.style.left=r+"px",this._textarea.style.top=n+"px",this._textarea.style.width=Math.max(s.width,1)+"px",this._textarea.style.height=Math.max(s.height,1)+"px",this._textarea.style.lineHeight=s.height+"px"}e||setTimeout(()=>this.updateCompositionElements(!0),0)}}};nh=Ot([Pe(2,Ti),Pe(3,Ni),Pe(4,$s),Pe(5,_r)],nh);var ai=0,li=0,oi=0,Ht=0,Up={css:"#00000000",rgba:0},Kt;(e=>{function t(r,s,a,l){return l!==void 0?`#${ts(r)}${ts(s)}${ts(a)}${ts(l)}`:`#${ts(r)}${ts(s)}${ts(a)}`}e.toCss=t;function i(r,s,a,l=255){return(r<<24|s<<16|a<<8|l)>>>0}e.toRgba=i;function n(r,s,a,l){return{css:e.toCss(r,s,a,l),rgba:e.toRgba(r,s,a,l)}}e.toColor=n})(Kt||(Kt={}));var Ct;(e=>{function t(o,c){if(Ht=(c.rgba&255)/255,Ht===1)return{css:c.css,rgba:c.rgba};let u=c.rgba>>24&255,d=c.rgba>>16&255,h=c.rgba>>8&255,f=o.rgba>>24&255,v=o.rgba>>16&255,p=o.rgba>>8&255;ai=f+Math.round((u-f)*Ht),li=v+Math.round((d-v)*Ht),oi=p+Math.round((h-p)*Ht);let w=Kt.toCss(ai,li,oi),_=Kt.toRgba(ai,li,oi);return{css:w,rgba:_}}e.blend=t;function i(o){return(o.rgba&255)===255}e.isOpaque=i;function n(o,c,u){let d=Q0.ensureContrastRatio(o.rgba,c.rgba,u);if(d)return Kt.toColor(d>>24&255,d>>16&255,d>>8&255)}e.ensureContrastRatio=n;function r(o){let c=(o.rgba|255)>>>0;return[ai,li,oi]=Q0.toChannels(c),{css:Kt.toCss(ai,li,oi),rgba:c}}e.opaque=r;function s(o,c){return Ht=Math.round(c*255),[ai,li,oi]=Q0.toChannels(o.rgba),{css:Kt.toCss(ai,li,oi,Ht),rgba:Kt.toRgba(ai,li,oi,Ht)}}e.opacity=s;function a(o,c){return Ht=o.rgba&255,s(o,Ht*c/255)}e.multiplyOpacity=a;function l(o){return[o.rgba>>24&255,o.rgba>>16&255,o.rgba>>8&255]}e.toColorRGB=l})(Ct||(Ct={}));var Et;(e=>{let t,i;try{let r=document.createElement("canvas");r.width=1,r.height=1;let s=r.getContext("2d",{willReadFrequently:!0});s&&(t=s,t.globalCompositeOperation="copy",i=t.createLinearGradient(0,0,1,1))}catch{}function n(r){if(r.match(/#[\da-f]{3,8}/i))switch(r.length){case 4:return ai=parseInt(r.slice(1,2).repeat(2),16),li=parseInt(r.slice(2,3).repeat(2),16),oi=parseInt(r.slice(3,4).repeat(2),16),Kt.toColor(ai,li,oi);case 5:return ai=parseInt(r.slice(1,2).repeat(2),16),li=parseInt(r.slice(2,3).repeat(2),16),oi=parseInt(r.slice(3,4).repeat(2),16),Ht=parseInt(r.slice(4,5).repeat(2),16),Kt.toColor(ai,li,oi,Ht);case 7:return{css:r,rgba:(parseInt(r.slice(1),16)<<8|255)>>>0};case 9:return{css:r,rgba:parseInt(r.slice(1),16)>>>0}}let s=r.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(s)return ai=parseInt(s[1]),li=parseInt(s[2]),oi=parseInt(s[3]),Ht=Math.round((s[5]===void 0?1:parseFloat(s[5]))*255),Kt.toColor(ai,li,oi,Ht);if(!t||!i)throw new Error("css.toColor: Unsupported css format");if(t.fillStyle=i,t.fillStyle=r,typeof t.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(t.fillRect(0,0,1,1),[ai,li,oi,Ht]=t.getImageData(0,0,1,1).data,Ht!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:Kt.toRgba(ai,li,oi,Ht),css:r}}e.toColor=n})(Et||(Et={}));var Ai;(e=>{function t(n){return i(n>>16&255,n>>8&255,n&255)}e.relativeLuminance=t;function i(n,r,s){let a=n/255,l=r/255,o=s/255,c=a<=.03928?a/12.92:Math.pow((a+.055)/1.055,2.4),u=l<=.03928?l/12.92:Math.pow((l+.055)/1.055,2.4),d=o<=.03928?o/12.92:Math.pow((o+.055)/1.055,2.4);return c*.2126+u*.7152+d*.0722}e.relativeLuminance2=i})(Ai||(Ai={}));var Q0;(e=>{function t(a,l){if(Ht=(l&255)/255,Ht===1)return l;let o=l>>24&255,c=l>>16&255,u=l>>8&255,d=a>>24&255,h=a>>16&255,f=a>>8&255;return ai=d+Math.round((o-d)*Ht),li=h+Math.round((c-h)*Ht),oi=f+Math.round((u-f)*Ht),Kt.toRgba(ai,li,oi)}e.blend=t;function i(a,l,o){let c=Ai.relativeLuminance(a>>8),u=Ai.relativeLuminance(l>>8);if(Jn(c,u)<o){if(u<c){let f=n(a,l,o),v=Jn(c,Ai.relativeLuminance(f>>8));if(v<o){let p=r(a,l,o),w=Jn(c,Ai.relativeLuminance(p>>8));return v>w?f:p}return f}let d=r(a,l,o),h=Jn(c,Ai.relativeLuminance(d>>8));if(h<o){let f=n(a,l,o),v=Jn(c,Ai.relativeLuminance(f>>8));return h>v?d:f}return d}}e.ensureContrastRatio=i;function n(a,l,o){let c=a>>24&255,u=a>>16&255,d=a>>8&255,h=l>>24&255,f=l>>16&255,v=l>>8&255,p=Jn(Ai.relativeLuminance2(h,f,v),Ai.relativeLuminance2(c,u,d));for(;p<o&&(h>0||f>0||v>0);)h-=Math.max(0,Math.ceil(h*.1)),f-=Math.max(0,Math.ceil(f*.1)),v-=Math.max(0,Math.ceil(v*.1)),p=Jn(Ai.relativeLuminance2(h,f,v),Ai.relativeLuminance2(c,u,d));return(h<<24|f<<16|v<<8|255)>>>0}e.reduceLuminance=n;function r(a,l,o){let c=a>>24&255,u=a>>16&255,d=a>>8&255,h=l>>24&255,f=l>>16&255,v=l>>8&255,p=Jn(Ai.relativeLuminance2(h,f,v),Ai.relativeLuminance2(c,u,d));for(;p<o&&(h<255||f<255||v<255);)h=Math.min(255,h+Math.ceil((255-h)*.1)),f=Math.min(255,f+Math.ceil((255-f)*.1)),v=Math.min(255,v+Math.ceil((255-v)*.1)),p=Jn(Ai.relativeLuminance2(h,f,v),Ai.relativeLuminance2(c,u,d));return(h<<24|f<<16|v<<8|255)>>>0}e.increaseLuminance=r;function s(a){return[a>>24&255,a>>16&255,a>>8&255,a&255]}e.toChannels=s})(Q0||(Q0={}));function ts(e){let t=e.toString(16);return t.length<2?"0"+t:t}function Jn(e,t){return e<t?(t+.05)/(e+.05):(e+.05)/(t+.05)}var aK=class extends n0{constructor(e,t,i){super(),this.content=0,this.combinedData="",this.fg=e.fg,this.bg=e.bg,this.combinedData=t,this._width=i}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(e){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}},Rc=class{constructor(e){this._bufferService=e,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new ln}register(e){let t={id:this._nextCharacterJoinerId++,handler:e};return this._characterJoiners.push(t),t.id}deregister(e){for(let t=0;t<this._characterJoiners.length;t++)if(this._characterJoiners[t].id===e)return this._characterJoiners.splice(t,1),!0;return!1}getJoinedCharacters(e){if(this._characterJoiners.length===0)return[];let t=this._bufferService.buffer.lines.get(e);if(!t||t.length===0)return[];let i=[],n=t.translateToString(!0),r=0,s=0,a=0,l=t.getFg(0),o=t.getBg(0);for(let c=0;c<t.getTrimmedLength();c++)if(t.loadCell(c,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==l||this._workCell.bg!==o){if(c-r>1){let u=this._getJoinedRanges(n,a,s,t,r);for(let d=0;d<u.length;d++)i.push(u[d])}r=c,a=s,l=this._workCell.fg,o=this._workCell.bg}s+=this._workCell.getChars().length||xr.length}if(this._bufferService.cols-r>1){let c=this._getJoinedRanges(n,a,s,t,r);for(let u=0;u<c.length;u++)i.push(c[u])}return i}_getJoinedRanges(e,t,i,n,r){let s=e.substring(t,i),a=[];try{a=this._characterJoiners[0].handler(s)}catch(l){console.error(l)}for(let l=1;l<this._characterJoiners.length;l++)try{let o=this._characterJoiners[l].handler(s);for(let c=0;c<o.length;c++)Rc._mergeRanges(a,o[c])}catch(o){console.error(o)}return this._stringRangesToCellRanges(a,n,r),a}_stringRangesToCellRanges(e,t,i){let n=0,r=!1,s=0,a=e[n];if(a){for(let l=i;l<this._bufferService.cols;l++){let o=t.getWidth(l),c=t.getString(l).length||xr.length;if(o!==0){if(!r&&a[0]<=s&&(a[0]=l,r=!0),a[1]<=s){if(a[1]=l,a=e[++n],!a)break;a[0]<=s?(a[0]=l,r=!0):r=!1}s+=c}}a&&(a[1]=this._bufferService.cols)}}static _mergeRanges(e,t){let i=!1;for(let n=0;n<e.length;n++){let r=e[n];if(i){if(t[1]<=r[0])return e[n-1][1]=t[1],e;if(t[1]<=r[1])return e[n-1][1]=Math.max(t[1],r[1]),e.splice(n,1),e;e.splice(n,1),n--}else{if(t[1]<=r[0])return e.splice(n,0,t),e;if(t[1]<=r[1])return r[0]=Math.min(t[0],r[0]),e;t[0]<r[1]&&(r[0]=Math.min(t[0],r[0]),i=!0);continue}}return i?e[e.length-1][1]=t[1]:e.push(t),e}};Rc=Ot([Pe(0,Ti)],Rc);function lK(e){return 57508<=e&&e<=57558}function oK(e){return 9472<=e&&e<=9631}function cK(e){return lK(e)||oK(e)}function uK(){return{css:{canvas:I0(),cell:I0()},device:{canvas:I0(),cell:I0(),char:{width:0,height:0,left:0,top:0}}}}function I0(){return{width:0,height:0}}var rh=class{constructor(e,t,i,n,r,s,a){this._document=e,this._characterJoinerService=t,this._optionsService=i,this._coreBrowserService=n,this._coreService=r,this._decorationService=s,this._themeService=a,this._workCell=new ln,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(e,t,i){this._selectionStart=e,this._selectionEnd=t,this._columnSelectMode=i}createRow(e,t,i,n,r,s,a,l,o,c,u){let d=[],h=this._characterJoinerService.getJoinedCharacters(t),f=this._themeService.colors,v=e.getNoBgTrimmedLength();i&&v<s+1&&(v=s+1);let p,w=0,_="",y=0,C=0,g=0,$=0,E=!1,L=0,B=!1,T=0,X=0,W=[],A=c!==-1&&u!==-1;for(let x=0;x<v;x++){e.loadCell(x,this._workCell);let F=this._workCell.getWidth();if(F===0)continue;let ie=!1,re=x>=X,ue=x,J=this._workCell;if(h.length>0&&x===h[0][0]&&re){let O=h.shift(),te=this._isCellInSelection(O[0],t);for(y=O[0]+1;y<O[1];y++)re&&(re=te===this._isCellInSelection(y,t));re&&(re=!i||s<O[0]||s>=O[1]),re?(ie=!0,J=new aK(this._workCell,e.translateToString(!0,O[0],O[1]),O[1]-O[0]),ue=O[1]-1,F=J.getWidth()):X=O[1]}let ae=this._isCellInSelection(x,t),ne=i&&x===s,Q=A&&x>=c&&x<=u,oe=!1;this._decorationService.forEachDecorationAtCell(x,t,void 0,O=>{oe=!0});let ve=J.getChars()||xr;if(ve===" "&&(J.isUnderline()||J.isOverline())&&(ve=" "),T=F*l-o.get(ve,J.isBold(),J.isItalic()),!p)p=this._document.createElement("span");else if(w&&(ae&&B||!ae&&!B&&J.bg===C)&&(ae&&B&&f.selectionForeground||J.fg===g)&&J.extended.ext===$&&Q===E&&T===L&&!ne&&!ie&&!oe&&re){J.isInvisible()?_+=xr:_+=ve,w++;continue}else w&&(p.textContent=_),p=this._document.createElement("span"),w=0,_="";if(C=J.bg,g=J.fg,$=J.extended.ext,E=Q,L=T,B=ae,ie&&s>=x&&s<=ue&&(s=x),!this._coreService.isCursorHidden&&ne&&this._coreService.isCursorInitialized){if(W.push("xterm-cursor"),this._coreBrowserService.isFocused)a&&W.push("xterm-cursor-blink"),W.push(n==="bar"?"xterm-cursor-bar":n==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(r)switch(r){case"outline":W.push("xterm-cursor-outline");break;case"block":W.push("xterm-cursor-block");break;case"bar":W.push("xterm-cursor-bar");break;case"underline":W.push("xterm-cursor-underline");break}}if(J.isBold()&&W.push("xterm-bold"),J.isItalic()&&W.push("xterm-italic"),J.isDim()&&W.push("xterm-dim"),J.isInvisible()?_=xr:_=J.getChars()||xr,J.isUnderline()&&(W.push(`xterm-underline-${J.extended.underlineStyle}`),_===" "&&(_=" "),!J.isUnderlineColorDefault()))if(J.isUnderlineColorRGB())p.style.textDecorationColor=`rgb(${n0.toColorRGB(J.getUnderlineColor()).join(",")})`;else{let O=J.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&J.isBold()&&O<8&&(O+=8),p.style.textDecorationColor=f.ansi[O].css}J.isOverline()&&(W.push("xterm-overline"),_===" "&&(_=" ")),J.isStrikethrough()&&W.push("xterm-strikethrough"),Q&&(p.style.textDecoration="underline");let fe=J.getFgColor(),pe=J.getFgColorMode(),ye=J.getBgColor(),U=J.getBgColorMode(),_e=!!J.isInverse();if(_e){let O=fe;fe=ye,ye=O;let te=pe;pe=U,U=te}let ge,se,H=!1;this._decorationService.forEachDecorationAtCell(x,t,void 0,O=>{O.options.layer!=="top"&&H||(O.backgroundColorRGB&&(U=50331648,ye=O.backgroundColorRGB.rgba>>8&16777215,ge=O.backgroundColorRGB),O.foregroundColorRGB&&(pe=50331648,fe=O.foregroundColorRGB.rgba>>8&16777215,se=O.foregroundColorRGB),H=O.options.layer==="top")}),!H&&ae&&(ge=this._coreBrowserService.isFocused?f.selectionBackgroundOpaque:f.selectionInactiveBackgroundOpaque,ye=ge.rgba>>8&16777215,U=50331648,H=!0,f.selectionForeground&&(pe=50331648,fe=f.selectionForeground.rgba>>8&16777215,se=f.selectionForeground)),H&&W.push("xterm-decoration-top");let N;switch(U){case 16777216:case 33554432:N=f.ansi[ye],W.push(`xterm-bg-${ye}`);break;case 50331648:N=Kt.toColor(ye>>16,ye>>8&255,ye&255),this._addStyle(p,`background-color:#${Wp((ye>>>0).toString(16),"0",6)}`);break;case 0:default:_e?(N=f.foreground,W.push("xterm-bg-257")):N=f.background}switch(ge||J.isDim()&&(ge=Ct.multiplyOpacity(N,.5)),pe){case 16777216:case 33554432:J.isBold()&&fe<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(fe+=8),this._applyMinimumContrast(p,N,f.ansi[fe],J,ge,void 0)||W.push(`xterm-fg-${fe}`);break;case 50331648:let O=Kt.toColor(fe>>16&255,fe>>8&255,fe&255);this._applyMinimumContrast(p,N,O,J,ge,se)||this._addStyle(p,`color:#${Wp(fe.toString(16),"0",6)}`);break;case 0:default:this._applyMinimumContrast(p,N,f.foreground,J,ge,se)||_e&&W.push("xterm-fg-257")}W.length&&(p.className=W.join(" "),W.length=0),!ne&&!ie&&!oe&&re?w++:p.textContent=_,T!==this.defaultSpacing&&(p.style.letterSpacing=`${T}px`),d.push(p),x=ue}return p&&w&&(p.textContent=_),d}_applyMinimumContrast(e,t,i,n,r,s){if(this._optionsService.rawOptions.minimumContrastRatio===1||cK(n.getCode()))return!1;let a=this._getContrastCache(n),l;if(!r&&!s&&(l=a.getColor(t.rgba,i.rgba)),l===void 0){let o=this._optionsService.rawOptions.minimumContrastRatio/(n.isDim()?2:1);l=Ct.ensureContrastRatio(r||t,s||i,o),a.setColor((r||t).rgba,(s||i).rgba,l??null)}return l?(this._addStyle(e,`color:${l.css}`),!0):!1}_getContrastCache(e){return e.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(e,t){e.setAttribute("style",`${e.getAttribute("style")||""}${t};`)}_isCellInSelection(e,t){let i=this._selectionStart,n=this._selectionEnd;return!i||!n?!1:this._columnSelectMode?i[0]<=n[0]?e>=i[0]&&t>=i[1]&&e<n[0]&&t<=n[1]:e<i[0]&&t>=i[1]&&e>=n[0]&&t<=n[1]:t>i[1]&&t<n[1]||i[1]===n[1]&&t===i[1]&&e>=i[0]&&e<n[0]||i[1]<n[1]&&t===n[1]&&e<n[0]||i[1]<n[1]&&t===i[1]&&e>=i[0]}};rh=Ot([Pe(1,kb),Pe(2,Ni),Pe(3,pr),Pe(4,$s),Pe(5,r0),Pe(6,Ja)],rh);function Wp(e,t,i){for(;e.length<i;)e=t+e;return e}var dK=class{constructor(e,t){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=e.createElement("div"),this._container.classList.add("xterm-width-cache-measure-container"),this._container.setAttribute("aria-hidden","true"),this._container.style.whiteSpace="pre",this._container.style.fontKerning="none";let i=e.createElement("span");i.classList.add("xterm-char-measure-element");let n=e.createElement("span");n.classList.add("xterm-char-measure-element"),n.style.fontWeight="bold";let r=e.createElement("span");r.classList.add("xterm-char-measure-element"),r.style.fontStyle="italic";let s=e.createElement("span");s.classList.add("xterm-char-measure-element"),s.style.fontWeight="bold",s.style.fontStyle="italic",this._measureElements=[i,n,r,s],this._container.appendChild(i),this._container.appendChild(n),this._container.appendChild(r),this._container.appendChild(s),t.appendChild(this._container),this.clear()}dispose(){this._container.remove(),this._measureElements.length=0,this._holey=void 0}clear(){this._flat.fill(-9999),this._holey=new Map}setFont(e,t,i,n){e===this._font&&t===this._fontSize&&i===this._weight&&n===this._weightBold||(this._font=e,this._fontSize=t,this._weight=i,this._weightBold=n,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${i}`,this._measureElements[1].style.fontWeight=`${n}`,this._measureElements[2].style.fontWeight=`${i}`,this._measureElements[3].style.fontWeight=`${n}`,this.clear())}get(e,t,i){let n=0;if(!t&&!i&&e.length===1&&(n=e.charCodeAt(0))<256){if(this._flat[n]!==-9999)return this._flat[n];let a=this._measure(e,0);return a>0&&(this._flat[n]=a),a}let r=e;t&&(r+="B"),i&&(r+="I");let s=this._holey.get(r);if(s===void 0){let a=0;t&&(a|=1),i&&(a|=2),s=this._measure(e,a),s>0&&this._holey.set(r,s)}return s}_measure(e,t){let i=this._measureElements[t];return i.textContent=e.repeat(32),i.offsetWidth/32}},hK=class{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(e,t,i,n=!1){if(this.selectionStart=t,this.selectionEnd=i,!t||!i||t[0]===i[0]&&t[1]===i[1]){this.clear();return}let r=e.buffers.active.ydisp,s=t[1]-r,a=i[1]-r,l=Math.max(s,0),o=Math.min(a,e.rows-1);if(l>=e.rows||o<0){this.clear();return}this.hasSelection=!0,this.columnSelectMode=n,this.viewportStartRow=s,this.viewportEndRow=a,this.viewportCappedStartRow=l,this.viewportCappedEndRow=o,this.startCol=t[0],this.endCol=i[0]}isCellSelected(e,t,i){return this.hasSelection?(i-=e.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?t>=this.startCol&&i>=this.viewportCappedStartRow&&t<this.endCol&&i<=this.viewportCappedEndRow:t<this.startCol&&i>=this.viewportCappedStartRow&&t>=this.endCol&&i<=this.viewportCappedEndRow:i>this.viewportStartRow&&i<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&i===this.viewportStartRow&&t>=this.startCol&&t<this.endCol||this.viewportStartRow<this.viewportEndRow&&i===this.viewportEndRow&&t<this.endCol||this.viewportStartRow<this.viewportEndRow&&i===this.viewportStartRow&&t>=this.startCol):!1}};function fK(){return new hK}var vu="xterm-dom-renderer-owner-",Yi="xterm-rows",R0="xterm-fg-",jp="xterm-bg-",Fl="xterm-focus",V0="xterm-selection",pK=1,sh=class extends Qe{constructor(e,t,i,n,r,s,a,l,o,c,u,d,h,f){super(),this._terminal=e,this._document=t,this._element=i,this._screenElement=n,this._viewportElement=r,this._helperContainer=s,this._linkifier2=a,this._charSizeService=o,this._optionsService=c,this._bufferService=u,this._coreService=d,this._coreBrowserService=h,this._themeService=f,this._terminalClass=pK++,this._rowElements=[],this._selectionRenderModel=fK(),this.onRequestRedraw=this._register(new He).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(Yi),this._rowContainer.style.lineHeight="normal",this._rowContainer.setAttribute("aria-hidden","true"),this._refreshRowElements(this._bufferService.cols,this._bufferService.rows),this._selectionContainer=this._document.createElement("div"),this._selectionContainer.classList.add(V0),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=uK(),this._updateDimensions(),this._register(this._optionsService.onOptionChange(()=>this._handleOptionsChanged())),this._register(this._themeService.onChangeColors(v=>this._injectCss(v))),this._injectCss(this._themeService.colors),this._rowFactory=l.createInstance(rh,document),this._element.classList.add(vu+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this._register(this._linkifier2.onShowLinkUnderline(v=>this._handleLinkHover(v))),this._register(this._linkifier2.onHideLinkUnderline(v=>this._handleLinkLeave(v))),this._register($t(()=>{this._element.classList.remove(vu+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()})),this._widthCache=new dK(this._document,this._helperContainer),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}_updateDimensions(){let e=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*e,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*e),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.left=0,this.dimensions.device.char.top=0,this.dimensions.device.canvas.width=this.dimensions.device.cell.width*this._bufferService.cols,this.dimensions.device.canvas.height=this.dimensions.device.cell.height*this._bufferService.rows,this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/e),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/e),this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols,this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows;for(let i of this._rowElements)i.style.width=`${this.dimensions.css.canvas.width}px`,i.style.height=`${this.dimensions.css.cell.height}px`,i.style.lineHeight=`${this.dimensions.css.cell.height}px`,i.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));let t=`${this._terminalSelector} .${Yi} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=t,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}_injectCss(e){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let t=`${this._terminalSelector} .${Yi} { pointer-events: none; color: ${e.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;t+=`${this._terminalSelector} .${Yi} .xterm-dim { color: ${Ct.multiplyOpacity(e.foreground,.5).css};}`,t+=`${this._terminalSelector} span:not(.xterm-bold) { font-weight: ${this._optionsService.rawOptions.fontWeight};}${this._terminalSelector} span.xterm-bold { font-weight: ${this._optionsService.rawOptions.fontWeightBold};}${this._terminalSelector} span.xterm-italic { font-style: italic;}`;let i=`blink_underline_${this._terminalClass}`,n=`blink_bar_${this._terminalClass}`,r=`blink_block_${this._terminalClass}`;t+=`@keyframes ${i} { 50% { border-bottom-style: hidden; }}`,t+=`@keyframes ${n} { 50% { box-shadow: none; }}`,t+=`@keyframes ${r} { 0% { background-color: ${e.cursor.css}; color: ${e.cursorAccent.css}; } 50% { background-color: inherit; color: ${e.cursor.css}; }}`,t+=`${this._terminalSelector} .${Yi}.${Fl} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${i} 1s step-end infinite;}${this._terminalSelector} .${Yi}.${Fl} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${n} 1s step-end infinite;}${this._terminalSelector} .${Yi}.${Fl} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${r} 1s step-end infinite;}${this._terminalSelector} .${Yi} .xterm-cursor.xterm-cursor-block { background-color: ${e.cursor.css}; color: ${e.cursorAccent.css};}${this._terminalSelector} .${Yi} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${e.cursor.css} !important; color: ${e.cursorAccent.css} !important;}${this._terminalSelector} .${Yi} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${e.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${Yi} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${e.cursor.css} inset;}${this._terminalSelector} .${Yi} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${e.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,t+=`${this._terminalSelector} .${V0} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${V0} div { position: absolute; background-color: ${e.selectionBackgroundOpaque.css};}${this._terminalSelector} .${V0} div { position: absolute; background-color: ${e.selectionInactiveBackgroundOpaque.css};}`;for(let[s,a]of e.ansi.entries())t+=`${this._terminalSelector} .${R0}${s} { color: ${a.css}; }${this._terminalSelector} .${R0}${s}.xterm-dim { color: ${Ct.multiplyOpacity(a,.5).css}; }${this._terminalSelector} .${jp}${s} { background-color: ${a.css}; }`;t+=`${this._terminalSelector} .${R0}257 { color: ${Ct.opaque(e.background).css}; }${this._terminalSelector} .${R0}257.xterm-dim { color: ${Ct.multiplyOpacity(Ct.opaque(e.background),.5).css}; }${this._terminalSelector} .${jp}257 { background-color: ${e.foreground.css}; }`,this._themeStyleElement.textContent=t}_setDefaultSpacing(){let e=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${e}px`,this._rowFactory.defaultSpacing=e}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(e,t){for(let i=this._rowElements.length;i<=t;i++){let n=this._document.createElement("div");this._rowContainer.appendChild(n),this._rowElements.push(n)}for(;this._rowElements.length>t;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(e,t){this._refreshRowElements(e,t),this._updateDimensions(),this.handleSelectionChanged(this._selectionRenderModel.selectionStart,this._selectionRenderModel.selectionEnd,this._selectionRenderModel.columnSelectMode)}handleCharSizeChanged(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}handleBlur(){this._rowContainer.classList.remove(Fl),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(Fl),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(e,t,i){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(e,t,i),this.renderRows(0,this._bufferService.rows-1),!e||!t||(this._selectionRenderModel.update(this._terminal,e,t,i),!this._selectionRenderModel.hasSelection))return;let n=this._selectionRenderModel.viewportStartRow,r=this._selectionRenderModel.viewportEndRow,s=this._selectionRenderModel.viewportCappedStartRow,a=this._selectionRenderModel.viewportCappedEndRow,l=this._document.createDocumentFragment();if(i){let o=e[0]>t[0];l.appendChild(this._createSelectionElement(s,o?t[0]:e[0],o?e[0]:t[0],a-s+1))}else{let o=n===s?e[0]:0,c=s===r?t[0]:this._bufferService.cols;l.appendChild(this._createSelectionElement(s,o,c));let u=a-s-1;if(l.appendChild(this._createSelectionElement(s+1,0,this._bufferService.cols,u)),s!==a){let d=r===a?t[0]:this._bufferService.cols;l.appendChild(this._createSelectionElement(a,0,d))}}this._selectionContainer.appendChild(l)}_createSelectionElement(e,t,i,n=1){let r=this._document.createElement("div"),s=t*this.dimensions.css.cell.width,a=this.dimensions.css.cell.width*(i-t);return s+a>this.dimensions.css.canvas.width&&(a=this.dimensions.css.canvas.width-s),r.style.height=`${n*this.dimensions.css.cell.height}px`,r.style.top=`${e*this.dimensions.css.cell.height}px`,r.style.left=`${s}px`,r.style.width=`${a}px`,r}handleCursorMove(){}_handleOptionsChanged(){this._updateDimensions(),this._injectCss(this._themeService.colors),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}clear(){for(let e of this._rowElements)e.replaceChildren()}renderRows(e,t){let i=this._bufferService.buffer,n=i.ybase+i.y,r=Math.min(i.x,this._bufferService.cols-1),s=this._coreService.decPrivateModes.cursorBlink??this._optionsService.rawOptions.cursorBlink,a=this._coreService.decPrivateModes.cursorStyle??this._optionsService.rawOptions.cursorStyle,l=this._optionsService.rawOptions.cursorInactiveStyle;for(let o=e;o<=t;o++){let c=o+i.ydisp,u=this._rowElements[o],d=i.lines.get(c);if(!u||!d)break;u.replaceChildren(...this._rowFactory.createRow(d,c,c===n,a,l,r,s,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${vu}${this._terminalClass}`}_handleLinkHover(e){this._setCellUnderline(e.x1,e.x2,e.y1,e.y2,e.cols,!0)}_handleLinkLeave(e){this._setCellUnderline(e.x1,e.x2,e.y1,e.y2,e.cols,!1)}_setCellUnderline(e,t,i,n,r,s){i<0&&(e=0),n<0&&(t=0);let a=this._bufferService.rows-1;i=Math.max(Math.min(i,a),0),n=Math.max(Math.min(n,a),0),r=Math.min(r,this._bufferService.cols);let l=this._bufferService.buffer,o=l.ybase+l.y,c=Math.min(l.x,r-1),u=this._optionsService.rawOptions.cursorBlink,d=this._optionsService.rawOptions.cursorStyle,h=this._optionsService.rawOptions.cursorInactiveStyle;for(let f=i;f<=n;++f){let v=f+l.ydisp,p=this._rowElements[f],w=l.lines.get(v);if(!p||!w)break;p.replaceChildren(...this._rowFactory.createRow(w,v,v===o,d,h,c,u,this.dimensions.css.cell.width,this._widthCache,s?f===i?e:0:-1,s?(f===n?t:r)-1:-1))}}};sh=Ot([Pe(7,P2),Pe(8,S1),Pe(9,Ni),Pe(10,Ti),Pe(11,$s),Pe(12,pr),Pe(13,Ja)],sh);var ah=class extends Qe{constructor(e,t,i){super(),this._optionsService=i,this.width=0,this.height=0,this._onCharSizeChange=this._register(new He),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this._register(new mK(this._optionsService))}catch{this._measureStrategy=this._register(new _K(e,t,this._optionsService))}this._register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],()=>this.measure()))}get hasValidSize(){return this.width>0&&this.height>0}measure(){let e=this._measureStrategy.measure();(e.width!==this.width||e.height!==this.height)&&(this.width=e.width,this.height=e.height,this._onCharSizeChange.fire())}};ah=Ot([Pe(2,Ni)],ah);var zb=class extends Qe{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(e,t){e!==void 0&&e>0&&t!==void 0&&t>0&&(this._result.width=e,this._result.height=t)}},_K=class extends zb{constructor(e,t,i){super(),this._document=e,this._parentElement=t,this._optionsService=i,this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W".repeat(32),this._measureElement.setAttribute("aria-hidden","true"),this._measureElement.style.whiteSpace="pre",this._measureElement.style.fontKerning="none",this._parentElement.appendChild(this._measureElement)}measure(){return this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`,this._validateAndSet(Number(this._measureElement.offsetWidth)/32,Number(this._measureElement.offsetHeight)),this._result}},mK=class extends zb{constructor(e){super(),this._optionsService=e,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");let t=this._ctx.measureText("W");if(!("width"in t&&"fontBoundingBoxAscent"in t&&"fontBoundingBoxDescent"in t))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;let e=this._ctx.measureText("W");return this._validateAndSet(e.width,e.fontBoundingBoxAscent+e.fontBoundingBoxDescent),this._result}},vK=class extends Qe{constructor(e,t,i){super(),this._textarea=e,this._window=t,this.mainDocument=i,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=this._register(new gK(this._window)),this._onDprChange=this._register(new He),this.onDprChange=this._onDprChange.event,this._onWindowChange=this._register(new He),this.onWindowChange=this._onWindowChange.event,this._register(this.onWindowChange(n=>this._screenDprMonitor.setWindow(n))),this._register(pi.forward(this._screenDprMonitor.onDprChange,this._onDprChange)),this._register(We(this._textarea,"focus",()=>this._isFocused=!0)),this._register(We(this._textarea,"blur",()=>this._isFocused=!1))}get window(){return this._window}set window(e){this._window!==e&&(this._window=e,this._onWindowChange.fire(this._window))}get dpr(){return this.window.devicePixelRatio}get isFocused(){return this._cachedIsFocused===void 0&&(this._cachedIsFocused=this._isFocused&&this._textarea.ownerDocument.hasFocus(),queueMicrotask(()=>this._cachedIsFocused=void 0)),this._cachedIsFocused}},gK=class extends Qe{constructor(e){super(),this._parentWindow=e,this._windowResizeListener=this._register(new ca),this._onDprChange=this._register(new He),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this._register($t(()=>this.clearListener()))}setWindow(e){this._parentWindow=e,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=We(this._parentWindow,"resize",()=>this._setDprAndFireIfDiffers())}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){var e;this._outerListener&&((e=this._resolutionMediaMatchList)==null||e.removeListener(this._outerListener),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._resolutionMediaMatchList=this._parentWindow.matchMedia(`screen and (resolution: ${this._parentWindow.devicePixelRatio}dppx)`),this._resolutionMediaMatchList.addListener(this._outerListener))}clearListener(){!this._resolutionMediaMatchList||!this._outerListener||(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._outerListener=void 0)}},bK=class extends Qe{constructor(){super(),this.linkProviders=[],this._register($t(()=>this.linkProviders.length=0))}registerLinkProvider(e){return this.linkProviders.push(e),{dispose:()=>{let t=this.linkProviders.indexOf(e);t!==-1&&this.linkProviders.splice(t,1)}}}};function F2(e,t,i){let n=i.getBoundingClientRect(),r=e.getComputedStyle(i),s=parseInt(r.getPropertyValue("padding-left")),a=parseInt(r.getPropertyValue("padding-top"));return[t.clientX-n.left-s,t.clientY-n.top-a]}function yK(e,t,i,n,r,s,a,l,o){if(!s)return;let c=F2(e,t,i);if(c)return c[0]=Math.ceil((c[0]+(o?a/2:0))/a),c[1]=Math.ceil(c[1]/l),c[0]=Math.min(Math.max(c[0],1),n+(o?1:0)),c[1]=Math.min(Math.max(c[1],1),r),c}var lh=class{constructor(e,t){this._renderService=e,this._charSizeService=t}getCoords(e,t,i,n,r){return yK(window,e,t,i,n,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,r)}getMouseReportCoords(e,t){let i=F2(window,e,t);if(this._charSizeService.hasValidSize)return i[0]=Math.min(Math.max(i[0],0),this._renderService.dimensions.css.canvas.width-1),i[1]=Math.min(Math.max(i[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(i[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(i[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(i[0]),y:Math.floor(i[1])}}};lh=Ot([Pe(0,_r),Pe(1,S1)],lh);var wK=class{constructor(e,t){this._renderCallback=e,this._coreBrowserService=t,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(e){return this._refreshCallbacks.push(e),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh())),this._animationFrame}refresh(e,t,i){this._rowCount=i,e=e!==void 0?e:0,t=t!==void 0?t:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,e):e,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,t):t,!this._animationFrame&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh()))}_innerRefresh(){if(this._animationFrame=void 0,this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0){this._runRefreshCallbacks();return}let e=Math.max(this._rowStart,0),t=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(e,t),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(let e of this._refreshCallbacks)e(0);this._refreshCallbacks=[]}},Ub={};HW(Ub,{getSafariVersion:()=>CK,isChromeOS:()=>qb,isFirefox:()=>Wb,isIpad:()=>kK,isIphone:()=>AK,isLegacyEdge:()=>SK,isLinux:()=>z2,isMac:()=>Vc,isNode:()=>C1,isSafari:()=>jb,isWindows:()=>Kb});var C1=typeof process<"u"&&"title"in process,s0=C1?"node":navigator.userAgent,a0=C1?"node":navigator.platform,Wb=s0.includes("Firefox"),SK=s0.includes("Edge"),jb=/^((?!chrome|android).)*safari/i.test(s0);function CK(){if(!jb)return 0;let e=s0.match(/Version\/(\d+)/);return e===null||e.length<2?0:parseInt(e[1])}var Vc=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(a0),kK=a0==="iPad",AK=a0==="iPhone",Kb=["Windows","Win16","Win32","WinCE"].includes(a0),z2=a0.indexOf("Linux")>=0,qb=/\bCrOS\b/.test(s0),Gb=class{constructor(){this._tasks=[],this._i=0}enqueue(e){this._tasks.push(e),this._start()}flush(){for(;this._i<this._tasks.length;)this._tasks[this._i]()||this._i++;this.clear()}clear(){this._idleCallback&&(this._cancelCallback(this._idleCallback),this._idleCallback=void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||(this._idleCallback=this._requestCallback(this._process.bind(this)))}_process(e){this._idleCallback=void 0;let t=0,i=0,n=e.timeRemaining(),r=0;for(;this._i<this._tasks.length;){if(t=performance.now(),this._tasks[this._i]()||this._i++,t=Math.max(1,performance.now()-t),i=Math.max(t,i),r=e.timeRemaining(),i*1.5>r){n-t<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(n-t))}ms`),this._start();return}n=r}this.clear()}},MK=class extends Gb{_requestCallback(e){return setTimeout(()=>e(this._createDeadline(16)))}_cancelCallback(e){clearTimeout(e)}_createDeadline(e){let t=performance.now()+e;return{timeRemaining:()=>Math.max(0,t-performance.now())}}},$K=class extends Gb{_requestCallback(e){return requestIdleCallback(e)}_cancelCallback(e){cancelIdleCallback(e)}},Dc=!C1&&"requestIdleCallback"in window?$K:MK,LK=class{constructor(){this._queue=new Dc}set(e){this._queue.clear(),this._queue.enqueue(e)}flush(){this._queue.flush()}},oh=class extends Qe{constructor(e,t,i,n,r,s,a,l,o){super(),this._rowCount=e,this._optionsService=i,this._charSizeService=n,this._coreService=r,this._coreBrowserService=l,this._renderer=this._register(new ca),this._pausedResizeTask=new LK,this._observerDisposable=this._register(new ca),this._isPaused=!1,this._needsFullRefresh=!1,this._isNextRenderRedrawOnly=!0,this._needsSelectionRefresh=!1,this._canvasWidth=0,this._canvasHeight=0,this._selectionState={start:void 0,end:void 0,columnSelectMode:!1},this._onDimensionsChange=this._register(new He),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this._register(new He),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this._register(new He),this.onRender=this._onRender.event,this._onRefreshRequest=this._register(new He),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new wK((c,u)=>this._renderRows(c,u),this._coreBrowserService),this._register(this._renderDebouncer),this._syncOutputHandler=new EK(this._coreBrowserService,this._coreService,()=>this._fullRefresh()),this._register($t(()=>this._syncOutputHandler.dispose())),this._register(this._coreBrowserService.onDprChange(()=>this.handleDevicePixelRatioChange())),this._register(a.onResize(()=>this._fullRefresh())),this._register(a.buffers.onBufferActivate(()=>{var c;return(c=this._renderer.value)==null?void 0:c.clear()})),this._register(this._optionsService.onOptionChange(()=>this._handleOptionsChanged())),this._register(this._charSizeService.onCharSizeChange(()=>this.handleCharSizeChanged())),this._register(s.onDecorationRegistered(()=>this._fullRefresh())),this._register(s.onDecorationRemoved(()=>this._fullRefresh())),this._register(this._optionsService.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],()=>{this.clear(),this.handleResize(a.cols,a.rows),this._fullRefresh()})),this._register(this._optionsService.onMultipleOptionChange(["cursorBlink","cursorStyle"],()=>this.refreshRows(a.buffer.y,a.buffer.y,!0))),this._register(o.onChangeColors(()=>this._fullRefresh())),this._registerIntersectionObserver(this._coreBrowserService.window,t),this._register(this._coreBrowserService.onWindowChange(c=>this._registerIntersectionObserver(c,t)))}get dimensions(){return this._renderer.value.dimensions}_registerIntersectionObserver(e,t){if("IntersectionObserver"in e){let i=new e.IntersectionObserver(n=>this._handleIntersectionChange(n[n.length-1]),{threshold:0});i.observe(t),this._observerDisposable.value=$t(()=>i.disconnect())}}_handleIntersectionChange(e){this._isPaused=e.isIntersecting===void 0?e.intersectionRatio===0:!e.isIntersecting,!this._isPaused&&!this._charSizeService.hasValidSize&&this._charSizeService.measure(),!this._isPaused&&this._needsFullRefresh&&(this._pausedResizeTask.flush(),this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)}refreshRows(e,t,i=!1){if(this._isPaused){this._needsFullRefresh=!0;return}if(this._coreService.decPrivateModes.synchronizedOutput){this._syncOutputHandler.bufferRows(e,t);return}let n=this._syncOutputHandler.flush();n&&(e=Math.min(e,n.start),t=Math.max(t,n.end)),i||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(e,t,this._rowCount)}_renderRows(e,t){if(this._renderer.value){if(this._coreService.decPrivateModes.synchronizedOutput){this._syncOutputHandler.bufferRows(e,t);return}e=Math.min(e,this._rowCount-1),t=Math.min(t,this._rowCount-1),this._renderer.value.renderRows(e,t),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:e,end:t}),this._onRender.fire({start:e,end:t}),this._isNextRenderRedrawOnly=!0}}resize(e,t){this._rowCount=t,this._fireOnCanvasResize()}_handleOptionsChanged(){this._renderer.value&&(this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize())}_fireOnCanvasResize(){this._renderer.value&&(this._renderer.value.dimensions.css.canvas.width===this._canvasWidth&&this._renderer.value.dimensions.css.canvas.height===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.value.dimensions))}hasRenderer(){return!!this._renderer.value}setRenderer(e){this._renderer.value=e,this._renderer.value&&(this._renderer.value.onRequestRedraw(t=>this.refreshRows(t.start,t.end,!0)),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(e){return this._renderDebouncer.addRefreshCallback(e)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var e,t;this._renderer.value&&((t=(e=this._renderer.value).clearTextureAtlas)==null||t.call(e),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(e,t){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set(()=>{var i;return(i=this._renderer.value)==null?void 0:i.handleResize(e,t)}):this._renderer.value.handleResize(e,t),this._fullRefresh())}handleCharSizeChanged(){var e;(e=this._renderer.value)==null||e.handleCharSizeChanged()}handleBlur(){var e;(e=this._renderer.value)==null||e.handleBlur()}handleFocus(){var e;(e=this._renderer.value)==null||e.handleFocus()}handleSelectionChanged(e,t,i){var n;this._selectionState.start=e,this._selectionState.end=t,this._selectionState.columnSelectMode=i,(n=this._renderer.value)==null||n.handleSelectionChanged(e,t,i)}handleCursorMove(){var e;(e=this._renderer.value)==null||e.handleCursorMove()}clear(){var e;(e=this._renderer.value)==null||e.clear()}};oh=Ot([Pe(2,Ni),Pe(3,S1),Pe(4,$s),Pe(5,r0),Pe(6,Ti),Pe(7,pr),Pe(8,Ja)],oh);var EK=class{constructor(e,t,i){this._coreBrowserService=e,this._coreService=t,this._onTimeout=i,this._start=0,this._end=0,this._isBuffering=!1}bufferRows(e,t){this._isBuffering?(this._start=Math.min(this._start,e),this._end=Math.max(this._end,t)):(this._start=e,this._end=t,this._isBuffering=!0),this._timeout===void 0&&(this._timeout=this._coreBrowserService.window.setTimeout(()=>{this._timeout=void 0,this._coreService.decPrivateModes.synchronizedOutput=!1,this._onTimeout()},1e3))}flush(){if(this._timeout!==void 0&&(this._coreBrowserService.window.clearTimeout(this._timeout),this._timeout=void 0),!this._isBuffering)return;let e={start:this._start,end:this._end};return this._isBuffering=!1,e}dispose(){this._timeout!==void 0&&(this._coreBrowserService.window.clearTimeout(this._timeout),this._timeout=void 0)}};function xK(e,t,i,n){let r=i.buffer.x,s=i.buffer.y;if(!i.buffer.hasScrollback)return NK(r,s,e,t,i,n)+k1(s,t,i,n)+PK(r,s,e,t,i,n);let a;if(s===t)return a=r>e?"D":"C",Fo(Math.abs(r-e),Bo(a,n));a=s>t?"D":"C";let l=Math.abs(s-t),o=TK(s>t?e:r,i)+(l-1)*i.cols+1+HK(s>t?r:e);return Fo(o,Bo(a,n))}function HK(e,t){return e-1}function TK(e,t){return t.cols-e}function NK(e,t,i,n,r,s){return k1(t,n,r,s).length===0?"":Fo(Xb(e,t,e,t-ws(t,r),!1,r).length,Bo("D",s))}function k1(e,t,i,n){let r=e-ws(e,i),s=t-ws(t,i),a=Math.abs(r-s)-OK(e,t,i);return Fo(a,Bo(Yb(e,t),n))}function PK(e,t,i,n,r,s){let a;k1(t,n,r,s).length>0?a=n-ws(n,r):a=t;let l=n,o=IK(e,t,i,n,r,s);return Fo(Xb(e,a,i,l,o==="C",r).length,Bo(o,s))}function OK(e,t,i){var a;let n=0,r=e-ws(e,i),s=t-ws(t,i);for(let l=0;l<Math.abs(r-s);l++){let o=Yb(e,t)==="A"?-1:1;(a=i.buffer.lines.get(r+o*l))!=null&&a.isWrapped&&n++}return n}function ws(e,t){let i=0,n=t.buffer.lines.get(e),r=n==null?void 0:n.isWrapped;for(;r&&e>=0&&e<t.rows;)i++,n=t.buffer.lines.get(--e),r=n==null?void 0:n.isWrapped;return i}function IK(e,t,i,n,r,s){let a;return k1(i,n,r,s).length>0?a=n-ws(n,r):a=t,e<i&&a<=n||e>=i&&a<n?"C":"D"}function Yb(e,t){return e>t?"A":"B"}function Xb(e,t,i,n,r,s){let a=e,l=t,o="";for(;(a!==i||l!==n)&&l>=0&&l<s.buffer.lines.length;)a+=r?1:-1,r&&a>s.cols-1?(o+=s.buffer.translateBufferLineToString(l,!1,e,a),a=0,e=0,l++):!r&&a<0&&(o+=s.buffer.translateBufferLineToString(l,!1,0,e+1),a=s.cols-1,e=a,l--);return o+s.buffer.translateBufferLineToString(l,!1,e,a)}function Bo(e,t){let i=t?"O":"[";return Ae.ESC+i+e}function Fo(e,t){e=Math.floor(e);let i="";for(let n=0;n<e;n++)i+=t;return i}var RK=class{constructor(e){this._bufferService=e,this.isSelectAllActive=!1,this.selectionStartLength=0}clearSelection(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0}get finalSelectionStart(){return this.isSelectAllActive?[0,0]:!this.selectionEnd||!this.selectionStart?this.selectionStart:this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart}get finalSelectionEnd(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){let e=this.selectionStart[0]+this.selectionStartLength;return e>this._bufferService.cols?e%this._bufferService.cols===0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)-1]:[e%this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)]:[e,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){let e=this.selectionStart[0]+this.selectionStartLength;return e>this._bufferService.cols?[e%this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)]:[Math.max(e,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){let e=this.selectionStart,t=this.selectionEnd;return!e||!t?!1:e[1]>t[1]||e[1]===t[1]&&e[0]>t[0]}handleTrim(e){return this.selectionStart&&(this.selectionStart[1]-=e),this.selectionEnd&&(this.selectionEnd[1]-=e),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}};function Kp(e,t){if(e.start.y>e.end.y)throw new Error(`Buffer range end (${e.end.x}, ${e.end.y}) cannot be before start (${e.start.x}, ${e.start.y})`);return t*(e.end.y-e.start.y)+(e.end.x-e.start.x+1)}var gu=50,VK=15,DK=50,ZK=500,BK=" ",FK=new RegExp(BK,"g"),ch=class extends Qe{constructor(e,t,i,n,r,s,a,l,o){super(),this._element=e,this._screenElement=t,this._linkifier=i,this._bufferService=n,this._coreService=r,this._mouseService=s,this._optionsService=a,this._renderService=l,this._coreBrowserService=o,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new ln,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this._register(new He),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this._register(new He),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this._register(new He),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this._register(new He),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=c=>this._handleMouseMove(c),this._mouseUpListener=c=>this._handleMouseUp(c),this._coreService.onUserInput(()=>{this.hasSelection&&this.clearSelection()}),this._trimListener=this._bufferService.buffer.lines.onTrim(c=>this._handleTrim(c)),this._register(this._bufferService.buffers.onBufferActivate(c=>this._handleBufferActivate(c))),this.enable(),this._model=new RK(this._bufferService),this._activeSelectionMode=0,this._register($t(()=>{this._removeMouseDownListeners()})),this._register(this._bufferService.onResize(c=>{c.rowsChanged&&this.clearSelection()}))}reset(){this.clearSelection()}disable(){this.clearSelection(),this._enabled=!1}enable(){this._enabled=!0}get selectionStart(){return this._model.finalSelectionStart}get selectionEnd(){return this._model.finalSelectionEnd}get hasSelection(){let e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd;return!e||!t?!1:e[0]!==t[0]||e[1]!==t[1]}get selectionText(){let e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd;if(!e||!t)return"";let i=this._bufferService.buffer,n=[];if(this._activeSelectionMode===3){if(e[0]===t[0])return"";let r=e[0]<t[0]?e[0]:t[0],s=e[0]<t[0]?t[0]:e[0];for(let a=e[1];a<=t[1];a++){let l=i.translateBufferLineToString(a,!0,r,s);n.push(l)}}else{let r=e[1]===t[1]?t[0]:void 0;n.push(i.translateBufferLineToString(e[1],!0,e[0],r));for(let s=e[1]+1;s<=t[1]-1;s++){let a=i.lines.get(s),l=i.translateBufferLineToString(s,!0);a!=null&&a.isWrapped?n[n.length-1]+=l:n.push(l)}if(e[1]!==t[1]){let s=i.lines.get(t[1]),a=i.translateBufferLineToString(t[1],!0,0,t[0]);s&&s.isWrapped?n[n.length-1]+=a:n.push(a)}}return n.map(r=>r.replace(FK," ")).join(Kb?`\r
|
|
92
|
-
`:`
|
|
93
|
-
`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(e){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._refresh())),z2&&e&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})}_isClickInSelection(e){let t=this._getMouseBufferCoords(e),i=this._model.finalSelectionStart,n=this._model.finalSelectionEnd;return!i||!n||!t?!1:this._areCoordsInSelection(t,i,n)}isCellInSelection(e,t){let i=this._model.finalSelectionStart,n=this._model.finalSelectionEnd;return!i||!n?!1:this._areCoordsInSelection([e,t],i,n)}_areCoordsInSelection(e,t,i){return e[1]>t[1]&&e[1]<i[1]||t[1]===i[1]&&e[1]===t[1]&&e[0]>=t[0]&&e[0]<i[0]||t[1]<i[1]&&e[1]===i[1]&&e[0]<i[0]||t[1]<i[1]&&e[1]===t[1]&&e[0]>=t[0]}_selectWordAtCursor(e,t){var r,s;let i=(s=(r=this._linkifier.currentLink)==null?void 0:r.link)==null?void 0:s.range;if(i)return this._model.selectionStart=[i.start.x-1,i.start.y-1],this._model.selectionStartLength=Kp(i,this._bufferService.cols),this._model.selectionEnd=void 0,!0;let n=this._getMouseBufferCoords(e);return n?(this._selectWordAt(n,t),this._model.selectionEnd=void 0,!0):!1}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(e,t){this._model.clearSelection(),e=Math.max(e,0),t=Math.min(t,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,e],this._model.selectionEnd=[this._bufferService.cols,t],this.refresh(),this._onSelectionChange.fire()}_handleTrim(e){this._model.handleTrim(e)&&this.refresh()}_getMouseBufferCoords(e){let t=this._mouseService.getCoords(e,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(t)return t[0]--,t[1]--,t[1]+=this._bufferService.buffer.ydisp,t}_getMouseEventScrollAmount(e){let t=F2(this._coreBrowserService.window,e,this._screenElement)[1],i=this._renderService.dimensions.css.canvas.height;return t>=0&&t<=i?0:(t>i&&(t-=i),t=Math.min(Math.max(t,-gu),gu),t/=gu,t/Math.abs(t)+Math.round(t*(VK-1)))}shouldForceSelection(e){return Vc?e.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:e.shiftKey}handleMouseDown(e){if(this._mouseDownTimeStamp=e.timeStamp,!(e.button===2&&this.hasSelection)&&e.button===0){if(!this._enabled){if(!this.shouldForceSelection(e))return;e.stopPropagation()}e.preventDefault(),this._dragScrollAmount=0,this._enabled&&e.shiftKey?this._handleIncrementalClick(e):e.detail===1?this._handleSingleClick(e):e.detail===2?this._handleDoubleClick(e):e.detail===3&&this._handleTripleClick(e),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval(()=>this._dragScroll(),DK)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(e){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(e))}_handleSingleClick(e){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(e)?3:0,this._model.selectionStart=this._getMouseBufferCoords(e),!this._model.selectionStart)return;this._model.selectionEnd=void 0;let t=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);t&&t.length!==this._model.selectionStart[0]&&t.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(e){this._selectWordAtCursor(e,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(e){let t=this._getMouseBufferCoords(e);t&&(this._activeSelectionMode=2,this._selectLineAt(t[1]))}shouldColumnSelect(e){return e.altKey&&!(Vc&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(e){if(e.stopImmediatePropagation(),!this._model.selectionStart)return;let t=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(e),!this._model.selectionEnd){this.refresh(!0);return}this._activeSelectionMode===2?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._bufferService.cols:this._activeSelectionMode===1&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(e),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));let i=this._bufferService.buffer;if(this._model.selectionEnd[1]<i.lines.length){let n=i.lines.get(this._model.selectionEnd[1]);n&&n.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}(!t||t[0]!==this._model.selectionEnd[0]||t[1]!==this._model.selectionEnd[1])&&this.refresh(!0)}_dragScroll(){if(!(!this._model.selectionEnd||!this._model.selectionStart)&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});let e=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(e.ydisp+this._bufferService.rows,e.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=e.ydisp),this.refresh()}}_handleMouseUp(e){let t=e.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&t<ZK&&e.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){let i=this._mouseService.getCoords(e,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(i&&i[0]!==void 0&&i[1]!==void 0){let n=xK(i[0]-1,i[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(n,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){let e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd,i=!!e&&!!t&&(e[0]!==t[0]||e[1]!==t[1]);if(!i){this._oldHasSelection&&this._fireOnSelectionChange(e,t,i);return}!e||!t||(!this._oldSelectionStart||!this._oldSelectionEnd||e[0]!==this._oldSelectionStart[0]||e[1]!==this._oldSelectionStart[1]||t[0]!==this._oldSelectionEnd[0]||t[1]!==this._oldSelectionEnd[1])&&this._fireOnSelectionChange(e,t,i)}_fireOnSelectionChange(e,t,i){this._oldSelectionStart=e,this._oldSelectionEnd=t,this._oldHasSelection=i,this._onSelectionChange.fire()}_handleBufferActivate(e){this.clearSelection(),this._trimListener.dispose(),this._trimListener=e.activeBuffer.lines.onTrim(t=>this._handleTrim(t))}_convertViewportColToCharacterIndex(e,t){let i=t;for(let n=0;t>=n;n++){let r=e.loadCell(n,this._workCell).getChars().length;this._workCell.getWidth()===0?i--:r>1&&t!==n&&(i+=r-1)}return i}setSelection(e,t,i){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[e,t],this._model.selectionStartLength=i,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(e){this._isClickInSelection(e)||(this._selectWordAtCursor(e,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(e,t,i=!0,n=!0){if(e[0]>=this._bufferService.cols)return;let r=this._bufferService.buffer,s=r.lines.get(e[1]);if(!s)return;let a=r.translateBufferLineToString(e[1],!1),l=this._convertViewportColToCharacterIndex(s,e[0]),o=l,c=e[0]-l,u=0,d=0,h=0,f=0;if(a.charAt(l)===" "){for(;l>0&&a.charAt(l-1)===" ";)l--;for(;o<a.length&&a.charAt(o+1)===" ";)o++}else{let w=e[0],_=e[0];s.getWidth(w)===0&&(u++,w--),s.getWidth(_)===2&&(d++,_++);let y=s.getString(_).length;for(y>1&&(f+=y-1,o+=y-1);w>0&&l>0&&!this._isCharWordSeparator(s.loadCell(w-1,this._workCell));){s.loadCell(w-1,this._workCell);let C=this._workCell.getChars().length;this._workCell.getWidth()===0?(u++,w--):C>1&&(h+=C-1,l-=C-1),l--,w--}for(;_<s.length&&o+1<a.length&&!this._isCharWordSeparator(s.loadCell(_+1,this._workCell));){s.loadCell(_+1,this._workCell);let C=this._workCell.getChars().length;this._workCell.getWidth()===2?(d++,_++):C>1&&(f+=C-1,o+=C-1),o++,_++}}o++;let v=l+c-u+h,p=Math.min(this._bufferService.cols,o-l+u+d-h-f);if(!(!t&&a.slice(l,o).trim()==="")){if(i&&v===0&&s.getCodePoint(0)!==32){let w=r.lines.get(e[1]-1);if(w&&s.isWrapped&&w.getCodePoint(this._bufferService.cols-1)!==32){let _=this._getWordAt([this._bufferService.cols-1,e[1]-1],!1,!0,!1);if(_){let y=this._bufferService.cols-_.start;v-=y,p+=y}}}if(n&&v+p===this._bufferService.cols&&s.getCodePoint(this._bufferService.cols-1)!==32){let w=r.lines.get(e[1]+1);if(w!=null&&w.isWrapped&&w.getCodePoint(0)!==32){let _=this._getWordAt([0,e[1]+1],!1,!1,!0);_&&(p+=_.length)}}return{start:v,length:p}}}_selectWordAt(e,t){let i=this._getWordAt(e,t);if(i){for(;i.start<0;)i.start+=this._bufferService.cols,e[1]--;this._model.selectionStart=[i.start,e[1]],this._model.selectionStartLength=i.length}}_selectToWordAt(e){let t=this._getWordAt(e,!0);if(t){let i=e[1];for(;t.start<0;)t.start+=this._bufferService.cols,i--;if(!this._model.areSelectionValuesReversed())for(;t.start+t.length>this._bufferService.cols;)t.length-=this._bufferService.cols,i++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?t.start:t.start+t.length,i]}}_isCharWordSeparator(e){return e.getWidth()===0?!1:this._optionsService.rawOptions.wordSeparator.indexOf(e.getChars())>=0}_selectLineAt(e){let t=this._bufferService.buffer.getWrappedRangeForLine(e),i={start:{x:0,y:t.first},end:{x:this._bufferService.cols-1,y:t.last}};this._model.selectionStart=[0,t.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=Kp(i,this._bufferService.cols)}};ch=Ot([Pe(3,Ti),Pe(4,$s),Pe(5,O2),Pe(6,Ni),Pe(7,_r),Pe(8,pr)],ch);var qp=class{constructor(){this._data={}}set(e,t,i){this._data[e]||(this._data[e]={}),this._data[e][t]=i}get(e,t){return this._data[e]?this._data[e][t]:void 0}clear(){this._data={}}},Gp=class{constructor(){this._color=new qp,this._css=new qp}setCss(e,t,i){this._css.set(e,t,i)}getCss(e,t){return this._css.get(e,t)}setColor(e,t,i){this._color.set(e,t,i)}getColor(e,t){return this._color.get(e,t)}clear(){this._color.clear(),this._css.clear()}},Yt=Object.freeze((()=>{let e=[Et.toColor("#2e3436"),Et.toColor("#cc0000"),Et.toColor("#4e9a06"),Et.toColor("#c4a000"),Et.toColor("#3465a4"),Et.toColor("#75507b"),Et.toColor("#06989a"),Et.toColor("#d3d7cf"),Et.toColor("#555753"),Et.toColor("#ef2929"),Et.toColor("#8ae234"),Et.toColor("#fce94f"),Et.toColor("#729fcf"),Et.toColor("#ad7fa8"),Et.toColor("#34e2e2"),Et.toColor("#eeeeec")],t=[0,95,135,175,215,255];for(let i=0;i<216;i++){let n=t[i/36%6|0],r=t[i/6%6|0],s=t[i%6];e.push({css:Kt.toCss(n,r,s),rgba:Kt.toRgba(n,r,s)})}for(let i=0;i<24;i++){let n=8+i*10;e.push({css:Kt.toCss(n,n,n),rgba:Kt.toRgba(n,n,n)})}return e})()),rs=Et.toColor("#ffffff"),Jl=Et.toColor("#000000"),Yp=Et.toColor("#ffffff"),Xp=Jl,zl={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117},zK=rs,uh=class extends Qe{constructor(e){super(),this._optionsService=e,this._contrastCache=new Gp,this._halfContrastCache=new Gp,this._onChangeColors=this._register(new He),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:rs,background:Jl,cursor:Yp,cursorAccent:Xp,selectionForeground:void 0,selectionBackgroundTransparent:zl,selectionBackgroundOpaque:Ct.blend(Jl,zl),selectionInactiveBackgroundTransparent:zl,selectionInactiveBackgroundOpaque:Ct.blend(Jl,zl),scrollbarSliderBackground:Ct.opacity(rs,.2),scrollbarSliderHoverBackground:Ct.opacity(rs,.4),scrollbarSliderActiveBackground:Ct.opacity(rs,.5),overviewRulerBorder:rs,ansi:Yt.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this._register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",()=>this._contrastCache.clear())),this._register(this._optionsService.onSpecificOptionChange("theme",()=>this._setTheme(this._optionsService.rawOptions.theme)))}get colors(){return this._colors}_setTheme(e={}){let t=this._colors;if(t.foreground=_t(e.foreground,rs),t.background=_t(e.background,Jl),t.cursor=Ct.blend(t.background,_t(e.cursor,Yp)),t.cursorAccent=Ct.blend(t.background,_t(e.cursorAccent,Xp)),t.selectionBackgroundTransparent=_t(e.selectionBackground,zl),t.selectionBackgroundOpaque=Ct.blend(t.background,t.selectionBackgroundTransparent),t.selectionInactiveBackgroundTransparent=_t(e.selectionInactiveBackground,t.selectionBackgroundTransparent),t.selectionInactiveBackgroundOpaque=Ct.blend(t.background,t.selectionInactiveBackgroundTransparent),t.selectionForeground=e.selectionForeground?_t(e.selectionForeground,Up):void 0,t.selectionForeground===Up&&(t.selectionForeground=void 0),Ct.isOpaque(t.selectionBackgroundTransparent)&&(t.selectionBackgroundTransparent=Ct.opacity(t.selectionBackgroundTransparent,.3)),Ct.isOpaque(t.selectionInactiveBackgroundTransparent)&&(t.selectionInactiveBackgroundTransparent=Ct.opacity(t.selectionInactiveBackgroundTransparent,.3)),t.scrollbarSliderBackground=_t(e.scrollbarSliderBackground,Ct.opacity(t.foreground,.2)),t.scrollbarSliderHoverBackground=_t(e.scrollbarSliderHoverBackground,Ct.opacity(t.foreground,.4)),t.scrollbarSliderActiveBackground=_t(e.scrollbarSliderActiveBackground,Ct.opacity(t.foreground,.5)),t.overviewRulerBorder=_t(e.overviewRulerBorder,zK),t.ansi=Yt.slice(),t.ansi[0]=_t(e.black,Yt[0]),t.ansi[1]=_t(e.red,Yt[1]),t.ansi[2]=_t(e.green,Yt[2]),t.ansi[3]=_t(e.yellow,Yt[3]),t.ansi[4]=_t(e.blue,Yt[4]),t.ansi[5]=_t(e.magenta,Yt[5]),t.ansi[6]=_t(e.cyan,Yt[6]),t.ansi[7]=_t(e.white,Yt[7]),t.ansi[8]=_t(e.brightBlack,Yt[8]),t.ansi[9]=_t(e.brightRed,Yt[9]),t.ansi[10]=_t(e.brightGreen,Yt[10]),t.ansi[11]=_t(e.brightYellow,Yt[11]),t.ansi[12]=_t(e.brightBlue,Yt[12]),t.ansi[13]=_t(e.brightMagenta,Yt[13]),t.ansi[14]=_t(e.brightCyan,Yt[14]),t.ansi[15]=_t(e.brightWhite,Yt[15]),e.extendedAnsi){let i=Math.min(t.ansi.length-16,e.extendedAnsi.length);for(let n=0;n<i;n++)t.ansi[n+16]=_t(e.extendedAnsi[n],Yt[n+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(e){this._restoreColor(e),this._onChangeColors.fire(this.colors)}_restoreColor(e){if(e===void 0){for(let t=0;t<this._restoreColors.ansi.length;++t)this._colors.ansi[t]=this._restoreColors.ansi[t];return}switch(e){case 256:this._colors.foreground=this._restoreColors.foreground;break;case 257:this._colors.background=this._restoreColors.background;break;case 258:this._colors.cursor=this._restoreColors.cursor;break;default:this._colors.ansi[e]=this._restoreColors.ansi[e]}}modifyColors(e){e(this._colors),this._onChangeColors.fire(this.colors)}_updateRestoreColors(){this._restoreColors={foreground:this._colors.foreground,background:this._colors.background,cursor:this._colors.cursor,ansi:this._colors.ansi.slice()}}};uh=Ot([Pe(0,Ni)],uh);function _t(e,t){if(e!==void 0)try{return Et.toColor(e)}catch{}return t}var UK=class{constructor(...e){this._entries=new Map;for(let[t,i]of e)this.set(t,i)}set(e,t){let i=this._entries.get(e);return this._entries.set(e,t),i}forEach(e){for(let[t,i]of this._entries.entries())e(t,i)}has(e){return this._entries.has(e)}get(e){return this._entries.get(e)}},WK=class{constructor(){this._services=new UK,this._services.set(P2,this)}setService(e,t){this._services.set(e,t)}getService(e){return this._services.get(e)}createInstance(e,...t){let i=VW(e).sort((s,a)=>s.index-a.index),n=[];for(let s of i){let a=this._services.get(s.id);if(!a)throw new Error(`[createInstance] ${e.name} depends on UNKNOWN service ${s.id._id}.`);n.push(a)}let r=i.length>0?i[0].index:t.length;if(t.length!==r)throw new Error(`[createInstance] First service dependency of ${e.name} at position ${r+1} conflicts with ${t.length} static arguments`);return new e(...t,...n)}},jK={trace:0,debug:1,info:2,warn:3,error:4,off:5},KK="xterm.js: ",dh=class extends Qe{constructor(e){super(),this._optionsService=e,this._logLevel=5,this._updateLogLevel(),this._register(this._optionsService.onSpecificOptionChange("logLevel",()=>this._updateLogLevel()))}get logLevel(){return this._logLevel}_updateLogLevel(){this._logLevel=jK[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(e){for(let t=0;t<e.length;t++)typeof e[t]=="function"&&(e[t]=e[t]())}_log(e,t,i){this._evalLazyOptionalParams(i),e.call(console,(this._optionsService.options.logger?"":KK)+t,...i)}trace(e,...t){var i;this._logLevel<=0&&this._log(((i=this._optionsService.options.logger)==null?void 0:i.trace.bind(this._optionsService.options.logger))??console.log,e,t)}debug(e,...t){var i;this._logLevel<=1&&this._log(((i=this._optionsService.options.logger)==null?void 0:i.debug.bind(this._optionsService.options.logger))??console.log,e,t)}info(e,...t){var i;this._logLevel<=2&&this._log(((i=this._optionsService.options.logger)==null?void 0:i.info.bind(this._optionsService.options.logger))??console.info,e,t)}warn(e,...t){var i;this._logLevel<=3&&this._log(((i=this._optionsService.options.logger)==null?void 0:i.warn.bind(this._optionsService.options.logger))??console.warn,e,t)}error(e,...t){var i;this._logLevel<=4&&this._log(((i=this._optionsService.options.logger)==null?void 0:i.error.bind(this._optionsService.options.logger))??console.error,e,t)}};dh=Ot([Pe(0,Ni)],dh);var Jp=class extends Qe{constructor(e){super(),this._maxLength=e,this.onDeleteEmitter=this._register(new He),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this._register(new He),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this._register(new He),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(e){if(this._maxLength===e)return;let t=new Array(e);for(let i=0;i<Math.min(e,this.length);i++)t[i]=this._array[this._getCyclicIndex(i)];this._array=t,this._maxLength=e,this._startIndex=0}get length(){return this._length}set length(e){if(e>this._length)for(let t=this._length;t<e;t++)this._array[t]=void 0;this._length=e}get(e){return this._array[this._getCyclicIndex(e)]}set(e,t){this._array[this._getCyclicIndex(e)]=t}push(e){this._array[this._getCyclicIndex(this._length)]=e,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++}recycle(){if(this._length!==this._maxLength)throw new Error("Can only recycle when the buffer is full");return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1),this._array[this._getCyclicIndex(this._length-1)]}get isFull(){return this._length===this._maxLength}pop(){return this._array[this._getCyclicIndex(this._length---1)]}splice(e,t,...i){if(t){for(let n=e;n<this._length-t;n++)this._array[this._getCyclicIndex(n)]=this._array[this._getCyclicIndex(n+t)];this._length-=t,this.onDeleteEmitter.fire({index:e,amount:t})}for(let n=this._length-1;n>=e;n--)this._array[this._getCyclicIndex(n+i.length)]=this._array[this._getCyclicIndex(n)];for(let n=0;n<i.length;n++)this._array[this._getCyclicIndex(e+n)]=i[n];if(i.length&&this.onInsertEmitter.fire({index:e,amount:i.length}),this._length+i.length>this._maxLength){let n=this._length+i.length-this._maxLength;this._startIndex+=n,this._length=this._maxLength,this.onTrimEmitter.fire(n)}else this._length+=i.length}trimStart(e){e>this._length&&(e=this._length),this._startIndex+=e,this._length-=e,this.onTrimEmitter.fire(e)}shiftElements(e,t,i){if(!(t<=0)){if(e<0||e>=this._length)throw new Error("start argument out of range");if(e+i<0)throw new Error("Cannot shift elements in list beyond index 0");if(i>0){for(let r=t-1;r>=0;r--)this.set(e+r+i,this.get(e+r));let n=e+t+i-this._length;if(n>0)for(this._length+=n;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let n=0;n<t;n++)this.set(e+n+i,this.get(e+n))}}_getCyclicIndex(e){return(this._startIndex+e)%this._maxLength}},Je=3,jt=Object.freeze(new n0),D0=0,bu=2,Ql=class Jb{constructor(t,i,n=!1){this.isWrapped=n,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(t*Je);let r=i||ln.fromCharData([0,vb,1,0]);for(let s=0;s<t;++s)this.setCell(s,r);this.length=t}get(t){let i=this._data[t*Je+0],n=i&2097151;return[this._data[t*Je+1],i&2097152?this._combined[t]:n?$r(n):"",i>>22,i&2097152?this._combined[t].charCodeAt(this._combined[t].length-1):n]}set(t,i){this._data[t*Je+1]=i[0],i[1].length>1?(this._combined[t]=i[1],this._data[t*Je+0]=t|2097152|i[2]<<22):this._data[t*Je+0]=i[1].charCodeAt(0)|i[2]<<22}getWidth(t){return this._data[t*Je+0]>>22}hasWidth(t){return this._data[t*Je+0]&12582912}getFg(t){return this._data[t*Je+1]}getBg(t){return this._data[t*Je+2]}hasContent(t){return this._data[t*Je+0]&4194303}getCodePoint(t){let i=this._data[t*Je+0];return i&2097152?this._combined[t].charCodeAt(this._combined[t].length-1):i&2097151}isCombined(t){return this._data[t*Je+0]&2097152}getString(t){let i=this._data[t*Je+0];return i&2097152?this._combined[t]:i&2097151?$r(i&2097151):""}isProtected(t){return this._data[t*Je+2]&536870912}loadCell(t,i){return D0=t*Je,i.content=this._data[D0+0],i.fg=this._data[D0+1],i.bg=this._data[D0+2],i.content&2097152&&(i.combinedData=this._combined[t]),i.bg&268435456&&(i.extended=this._extendedAttrs[t]),i}setCell(t,i){i.content&2097152&&(this._combined[t]=i.combinedData),i.bg&268435456&&(this._extendedAttrs[t]=i.extended),this._data[t*Je+0]=i.content,this._data[t*Je+1]=i.fg,this._data[t*Je+2]=i.bg}setCellFromCodepoint(t,i,n,r){r.bg&268435456&&(this._extendedAttrs[t]=r.extended),this._data[t*Je+0]=i|n<<22,this._data[t*Je+1]=r.fg,this._data[t*Je+2]=r.bg}addCodepointToCell(t,i,n){let r=this._data[t*Je+0];r&2097152?this._combined[t]+=$r(i):r&2097151?(this._combined[t]=$r(r&2097151)+$r(i),r&=-2097152,r|=2097152):r=i|1<<22,n&&(r&=-12582913,r|=n<<22),this._data[t*Je+0]=r}insertCells(t,i,n){if(t%=this.length,t&&this.getWidth(t-1)===2&&this.setCellFromCodepoint(t-1,0,1,n),i<this.length-t){let r=new ln;for(let s=this.length-t-i-1;s>=0;--s)this.setCell(t+i+s,this.loadCell(t+s,r));for(let s=0;s<i;++s)this.setCell(t+s,n)}else for(let r=t;r<this.length;++r)this.setCell(r,n);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,n)}deleteCells(t,i,n){if(t%=this.length,i<this.length-t){let r=new ln;for(let s=0;s<this.length-t-i;++s)this.setCell(t+s,this.loadCell(t+i+s,r));for(let s=this.length-i;s<this.length;++s)this.setCell(s,n)}else for(let r=t;r<this.length;++r)this.setCell(r,n);t&&this.getWidth(t-1)===2&&this.setCellFromCodepoint(t-1,0,1,n),this.getWidth(t)===0&&!this.hasContent(t)&&this.setCellFromCodepoint(t,0,1,n)}replaceCells(t,i,n,r=!1){if(r){for(t&&this.getWidth(t-1)===2&&!this.isProtected(t-1)&&this.setCellFromCodepoint(t-1,0,1,n),i<this.length&&this.getWidth(i-1)===2&&!this.isProtected(i)&&this.setCellFromCodepoint(i,0,1,n);t<i&&t<this.length;)this.isProtected(t)||this.setCell(t,n),t++;return}for(t&&this.getWidth(t-1)===2&&this.setCellFromCodepoint(t-1,0,1,n),i<this.length&&this.getWidth(i-1)===2&&this.setCellFromCodepoint(i,0,1,n);t<i&&t<this.length;)this.setCell(t++,n)}resize(t,i){if(t===this.length)return this._data.length*4*bu<this._data.buffer.byteLength;let n=t*Je;if(t>this.length){if(this._data.buffer.byteLength>=n*4)this._data=new Uint32Array(this._data.buffer,0,n);else{let r=new Uint32Array(n);r.set(this._data),this._data=r}for(let r=this.length;r<t;++r)this.setCell(r,i)}else{this._data=this._data.subarray(0,n);let r=Object.keys(this._combined);for(let a=0;a<r.length;a++){let l=parseInt(r[a],10);l>=t&&delete this._combined[l]}let s=Object.keys(this._extendedAttrs);for(let a=0;a<s.length;a++){let l=parseInt(s[a],10);l>=t&&delete this._extendedAttrs[l]}}return this.length=t,n*4*bu<this._data.buffer.byteLength}cleanupMemory(){if(this._data.length*4*bu<this._data.buffer.byteLength){let t=new Uint32Array(this._data.length);return t.set(this._data),this._data=t,1}return 0}fill(t,i=!1){if(i){for(let n=0;n<this.length;++n)this.isProtected(n)||this.setCell(n,t);return}this._combined={},this._extendedAttrs={};for(let n=0;n<this.length;++n)this.setCell(n,t)}copyFrom(t){this.length!==t.length?this._data=new Uint32Array(t._data):this._data.set(t._data),this.length=t.length,this._combined={};for(let i in t._combined)this._combined[i]=t._combined[i];this._extendedAttrs={};for(let i in t._extendedAttrs)this._extendedAttrs[i]=t._extendedAttrs[i];this.isWrapped=t.isWrapped}clone(){let t=new Jb(0);t._data=new Uint32Array(this._data),t.length=this.length;for(let i in this._combined)t._combined[i]=this._combined[i];for(let i in this._extendedAttrs)t._extendedAttrs[i]=this._extendedAttrs[i];return t.isWrapped=this.isWrapped,t}getTrimmedLength(){for(let t=this.length-1;t>=0;--t)if(this._data[t*Je+0]&4194303)return t+(this._data[t*Je+0]>>22);return 0}getNoBgTrimmedLength(){for(let t=this.length-1;t>=0;--t)if(this._data[t*Je+0]&4194303||this._data[t*Je+2]&50331648)return t+(this._data[t*Je+0]>>22);return 0}copyCellsFrom(t,i,n,r,s){let a=t._data;if(s)for(let o=r-1;o>=0;o--){for(let c=0;c<Je;c++)this._data[(n+o)*Je+c]=a[(i+o)*Je+c];a[(i+o)*Je+2]&268435456&&(this._extendedAttrs[n+o]=t._extendedAttrs[i+o])}else for(let o=0;o<r;o++){for(let c=0;c<Je;c++)this._data[(n+o)*Je+c]=a[(i+o)*Je+c];a[(i+o)*Je+2]&268435456&&(this._extendedAttrs[n+o]=t._extendedAttrs[i+o])}let l=Object.keys(t._combined);for(let o=0;o<l.length;o++){let c=parseInt(l[o],10);c>=i&&(this._combined[c-i+n]=t._combined[c])}}translateToString(t,i,n,r){i=i??0,n=n??this.length,t&&(n=Math.min(n,this.getTrimmedLength())),r&&(r.length=0);let s="";for(;i<n;){let a=this._data[i*Je+0],l=a&2097151,o=a&2097152?this._combined[i]:l?$r(l):xr;if(s+=o,r)for(let c=0;c<o.length;++c)r.push(i);i+=a>>22||1}return r&&r.push(i),s}};function qK(e,t,i,n,r,s){let a=[];for(let l=0;l<e.length-1;l++){let o=l,c=e.get(++o);if(!c.isWrapped)continue;let u=[e.get(l)];for(;o<e.length&&c.isWrapped;)u.push(c),c=e.get(++o);if(!s&&n>=l&&n<o){l+=u.length-1;continue}let d=0,h=zo(u,d,t),f=1,v=0;for(;f<u.length;){let w=zo(u,f,t),_=w-v,y=i-h,C=Math.min(_,y);u[d].copyCellsFrom(u[f],v,h,C,!1),h+=C,h===i&&(d++,h=0),v+=C,v===w&&(f++,v=0),h===0&&d!==0&&u[d-1].getWidth(i-1)===2&&(u[d].copyCellsFrom(u[d-1],i-1,h++,1,!1),u[d-1].setCell(i-1,r))}u[d].replaceCells(h,i,r);let p=0;for(let w=u.length-1;w>0&&(w>d||u[w].getTrimmedLength()===0);w--)p++;p>0&&(a.push(l+u.length-p),a.push(p)),l+=u.length-1}return a}function GK(e,t){let i=[],n=0,r=t[n],s=0;for(let a=0;a<e.length;a++)if(r===a){let l=t[++n];e.onDeleteEmitter.fire({index:a-s,amount:l}),a+=l-1,s+=l,r=t[++n]}else i.push(a);return{layout:i,countRemoved:s}}function YK(e,t){let i=[];for(let n=0;n<t.length;n++)i.push(e.get(t[n]));for(let n=0;n<i.length;n++)e.set(n,i[n]);e.length=t.length}function XK(e,t,i){let n=[],r=e.map((o,c)=>zo(e,c,t)).reduce((o,c)=>o+c),s=0,a=0,l=0;for(;l<r;){if(r-l<i){n.push(r-l);break}s+=i;let o=zo(e,a,t);s>o&&(s-=o,a++);let c=e[a].getWidth(s-1)===2;c&&s--;let u=c?i-1:i;n.push(u),l+=u}return n}function zo(e,t,i){if(t===e.length-1)return e[t].getTrimmedLength();let n=!e[t].hasContent(i-1)&&e[t].getWidth(i-1)===1,r=e[t+1].getWidth(0)===2;return n&&r?i-1:i}var Qb=class e5{constructor(t){this.line=t,this.isDisposed=!1,this._disposables=[],this._id=e5._nextId++,this._onDispose=this.register(new He),this.onDispose=this._onDispose.event}get id(){return this._id}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),ys(this._disposables),this._disposables.length=0)}register(t){return this._disposables.push(t),t}};Qb._nextId=1;var JK=Qb,ni={},ss=ni.B;ni[0]={"`":"◆",a:"▒",b:"␉",c:"␌",d:"␍",e:"␊",f:"°",g:"±",h:"",i:"␋",j:"┘",k:"┐",l:"┌",m:"└",n:"┼",o:"⎺",p:"⎻",q:"─",r:"⎼",s:"⎽",t:"├",u:"┤",v:"┴",w:"┬",x:"│",y:"≤",z:"≥","{":"π","|":"≠","}":"£","~":"·"};ni.A={"#":"£"};ni.B=void 0;ni[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"};ni.C=ni[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"};ni.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"};ni.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"};ni.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"};ni.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"};ni.E=ni[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"};ni.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"};ni.H=ni[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"};ni["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"};var Qp=4294967295,e_=class{constructor(e,t,i){this._hasScrollback=e,this._optionsService=t,this._bufferService=i,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=jt.clone(),this.savedCharset=ss,this.markers=[],this._nullCell=ln.fromCharData([0,vb,1,0]),this._whitespaceCell=ln.fromCharData([0,xr,1,32]),this._isClearing=!1,this._memoryCleanupQueue=new Dc,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new Jp(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(e){return e?(this._nullCell.fg=e.fg,this._nullCell.bg=e.bg,this._nullCell.extended=e.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new Oc),this._nullCell}getWhitespaceCell(e){return e?(this._whitespaceCell.fg=e.fg,this._whitespaceCell.bg=e.bg,this._whitespaceCell.extended=e.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new Oc),this._whitespaceCell}getBlankLine(e,t){return new Ql(this._bufferService.cols,this.getNullCell(e),t)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){let e=this.ybase+this.y-this.ydisp;return e>=0&&e<this._rows}_getCorrectBufferLength(e){if(!this._hasScrollback)return e;let t=e+this._optionsService.rawOptions.scrollback;return t>Qp?Qp:t}fillViewportRows(e){if(this.lines.length===0){e===void 0&&(e=jt);let t=this._rows;for(;t--;)this.lines.push(this.getBlankLine(e))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new Jp(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(e,t){let i=this.getNullCell(jt),n=0,r=this._getCorrectBufferLength(t);if(r>this.lines.maxLength&&(this.lines.maxLength=r),this.lines.length>0){if(this._cols<e)for(let a=0;a<this.lines.length;a++)n+=+this.lines.get(a).resize(e,i);let s=0;if(this._rows<t)for(let a=this._rows;a<t;a++)this.lines.length<t+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new Ql(e,i)):this.ybase>0&&this.lines.length<=this.ybase+this.y+s+1?(this.ybase--,s++,this.ydisp>0&&this.ydisp--):this.lines.push(new Ql(e,i)));else for(let a=this._rows;a>t;a--)this.lines.length>t+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(r<this.lines.maxLength){let a=this.lines.length-r;a>0&&(this.lines.trimStart(a),this.ybase=Math.max(this.ybase-a,0),this.ydisp=Math.max(this.ydisp-a,0),this.savedY=Math.max(this.savedY-a,0)),this.lines.maxLength=r}this.x=Math.min(this.x,e-1),this.y=Math.min(this.y,t-1),s&&(this.y+=s),this.savedX=Math.min(this.savedX,e-1),this.scrollTop=0}if(this.scrollBottom=t-1,this._isReflowEnabled&&(this._reflow(e,t),this._cols>e))for(let s=0;s<this.lines.length;s++)n+=+this.lines.get(s).resize(e,i);this._cols=e,this._rows=t,this._memoryCleanupQueue.clear(),n>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue(()=>this._batchedMemoryCleanup()))}_batchedMemoryCleanup(){let e=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,e=!1);let t=0;for(;this._memoryCleanupPosition<this.lines.length;)if(t+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),t>100)return!0;return e}get _isReflowEnabled(){let e=this._optionsService.rawOptions.windowsPty;return e&&e.buildNumber?this._hasScrollback&&e.backend==="conpty"&&e.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(e,t){this._cols!==e&&(e>this._cols?this._reflowLarger(e,t):this._reflowSmaller(e,t))}_reflowLarger(e,t){let i=this._optionsService.rawOptions.reflowCursorLine,n=qK(this.lines,this._cols,e,this.ybase+this.y,this.getNullCell(jt),i);if(n.length>0){let r=GK(this.lines,n);YK(this.lines,r.layout),this._reflowLargerAdjustViewport(e,t,r.countRemoved)}}_reflowLargerAdjustViewport(e,t,i){let n=this.getNullCell(jt),r=i;for(;r-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<t&&this.lines.push(new Ql(e,n))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-i,0)}_reflowSmaller(e,t){let i=this._optionsService.rawOptions.reflowCursorLine,n=this.getNullCell(jt),r=[],s=0;for(let a=this.lines.length-1;a>=0;a--){let l=this.lines.get(a);if(!l||!l.isWrapped&&l.getTrimmedLength()<=e)continue;let o=[l];for(;l.isWrapped&&a>0;)l=this.lines.get(--a),o.unshift(l);if(!i){let C=this.ybase+this.y;if(C>=a&&C<a+o.length)continue}let c=o[o.length-1].getTrimmedLength(),u=XK(o,this._cols,e),d=u.length-o.length,h;this.ybase===0&&this.y!==this.lines.length-1?h=Math.max(0,this.y-this.lines.maxLength+d):h=Math.max(0,this.lines.length-this.lines.maxLength+d);let f=[];for(let C=0;C<d;C++){let g=this.getBlankLine(jt,!0);f.push(g)}f.length>0&&(r.push({start:a+o.length+s,newLines:f}),s+=f.length),o.push(...f);let v=u.length-1,p=u[v];p===0&&(v--,p=u[v]);let w=o.length-d-1,_=c;for(;w>=0;){let C=Math.min(_,p);if(o[v]===void 0)break;if(o[v].copyCellsFrom(o[w],_-C,p-C,C,!0),p-=C,p===0&&(v--,p=u[v]),_-=C,_===0){w--;let g=Math.max(w,0);_=zo(o,g,this._cols)}}for(let C=0;C<o.length;C++)u[C]<e&&o[C].setCell(u[C],n);let y=d-h;for(;y-- >0;)this.ybase===0?this.y<t-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+s)-t&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+d,this.ybase+t-1)}if(r.length>0){let a=[],l=[];for(let p=0;p<this.lines.length;p++)l.push(this.lines.get(p));let o=this.lines.length,c=o-1,u=0,d=r[u];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+s);let h=0;for(let p=Math.min(this.lines.maxLength-1,o+s-1);p>=0;p--)if(d&&d.start>c+h){for(let w=d.newLines.length-1;w>=0;w--)this.lines.set(p--,d.newLines[w]);p++,a.push({index:c+1,amount:d.newLines.length}),h+=d.newLines.length,d=r[++u]}else this.lines.set(p,l[c--]);let f=0;for(let p=a.length-1;p>=0;p--)a[p].index+=f,this.lines.onInsertEmitter.fire(a[p]),f+=a[p].amount;let v=Math.max(0,o+s-this.lines.maxLength);v>0&&this.lines.onTrimEmitter.fire(v)}}translateBufferLineToString(e,t,i=0,n){let r=this.lines.get(e);return r?r.translateToString(t,i,n):""}getWrappedRangeForLine(e){let t=e,i=e;for(;t>0&&this.lines.get(t).isWrapped;)t--;for(;i+1<this.lines.length&&this.lines.get(i+1).isWrapped;)i++;return{first:t,last:i}}setupTabStops(e){for(e!=null?this.tabs[e]||(e=this.prevStop(e)):(this.tabs={},e=0);e<this._cols;e+=this._optionsService.rawOptions.tabStopWidth)this.tabs[e]=!0}prevStop(e){for(e==null&&(e=this.x);!this.tabs[--e]&&e>0;);return e>=this._cols?this._cols-1:e<0?0:e}nextStop(e){for(e==null&&(e=this.x);!this.tabs[++e]&&e<this._cols;);return e>=this._cols?this._cols-1:e<0?0:e}clearMarkers(e){this._isClearing=!0;for(let t=0;t<this.markers.length;t++)this.markers[t].line===e&&(this.markers[t].dispose(),this.markers.splice(t--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let e=0;e<this.markers.length;e++)this.markers[e].dispose();this.markers.length=0,this._isClearing=!1}addMarker(e){let t=new JK(e);return this.markers.push(t),t.register(this.lines.onTrim(i=>{t.line-=i,t.line<0&&t.dispose()})),t.register(this.lines.onInsert(i=>{t.line>=i.index&&(t.line+=i.amount)})),t.register(this.lines.onDelete(i=>{t.line>=i.index&&t.line<i.index+i.amount&&t.dispose(),t.line>i.index&&(t.line-=i.amount)})),t.register(t.onDispose(()=>this._removeMarker(t))),t}_removeMarker(e){this._isClearing||this.markers.splice(this.markers.indexOf(e),1)}},QK=class extends Qe{constructor(e,t){super(),this._optionsService=e,this._bufferService=t,this._onBufferActivate=this._register(new He),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this._register(this._optionsService.onSpecificOptionChange("scrollback",()=>this.resize(this._bufferService.cols,this._bufferService.rows))),this._register(this._optionsService.onSpecificOptionChange("tabStopWidth",()=>this.setupTabStops()))}reset(){this._normal=new e_(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new e_(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()}get alt(){return this._alt}get active(){return this._activeBuffer}get normal(){return this._normal}activateNormalBuffer(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clearAllMarkers(),this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))}activateAltBuffer(e){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(e),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))}resize(e,t){this._normal.resize(e,t),this._alt.resize(e,t),this.setupTabStops(e)}setupTabStops(e){this._normal.setupTabStops(e),this._alt.setupTabStops(e)}},t5=2,i5=1,hh=class extends Qe{constructor(e){super(),this.isUserScrolling=!1,this._onResize=this._register(new He),this.onResize=this._onResize.event,this._onScroll=this._register(new He),this.onScroll=this._onScroll.event,this.cols=Math.max(e.rawOptions.cols||0,t5),this.rows=Math.max(e.rawOptions.rows||0,i5),this.buffers=this._register(new QK(e,this)),this._register(this.buffers.onBufferActivate(t=>{this._onScroll.fire(t.activeBuffer.ydisp)}))}get buffer(){return this.buffers.active}resize(e,t){let i=this.cols!==e,n=this.rows!==t;this.cols=e,this.rows=t,this.buffers.resize(e,t),this._onResize.fire({cols:e,rows:t,colsChanged:i,rowsChanged:n})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(e,t=!1){let i=this.buffer,n;n=this._cachedBlankLine,(!n||n.length!==this.cols||n.getFg(0)!==e.fg||n.getBg(0)!==e.bg)&&(n=i.getBlankLine(e,t),this._cachedBlankLine=n),n.isWrapped=t;let r=i.ybase+i.scrollTop,s=i.ybase+i.scrollBottom;if(i.scrollTop===0){let a=i.lines.isFull;s===i.lines.length-1?a?i.lines.recycle().copyFrom(n):i.lines.push(n.clone()):i.lines.splice(s+1,0,n.clone()),a?this.isUserScrolling&&(i.ydisp=Math.max(i.ydisp-1,0)):(i.ybase++,this.isUserScrolling||i.ydisp++)}else{let a=s-r+1;i.lines.shiftElements(r+1,a-1,-1),i.lines.set(s,n.clone())}this.isUserScrolling||(i.ydisp=i.ybase),this._onScroll.fire(i.ydisp)}scrollLines(e,t){let i=this.buffer;if(e<0){if(i.ydisp===0)return;this.isUserScrolling=!0}else e+i.ydisp>=i.ybase&&(this.isUserScrolling=!1);let n=i.ydisp;i.ydisp=Math.max(Math.min(i.ydisp+e,i.ybase),0),n!==i.ydisp&&(t||this._onScroll.fire(i.ydisp))}};hh=Ot([Pe(0,Ni)],hh);var Os={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnEraseInDisplay:!1,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},reflowCursorLine:!1,rescaleOverlappingGlyphs:!1,rightClickSelectsWord:Vc,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRuler:{}},eq=["normal","bold","100","200","300","400","500","600","700","800","900"],tq=class extends Qe{constructor(e){super(),this._onOptionChange=this._register(new He),this.onOptionChange=this._onOptionChange.event;let t={...Os};for(let i in e)if(i in t)try{let n=e[i];t[i]=this._sanitizeAndValidateOption(i,n)}catch(n){console.error(n)}this.rawOptions=t,this.options={...t},this._setupOptions(),this._register($t(()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null}))}onSpecificOptionChange(e,t){return this.onOptionChange(i=>{i===e&&t(this.rawOptions[e])})}onMultipleOptionChange(e,t){return this.onOptionChange(i=>{e.indexOf(i)!==-1&&t()})}_setupOptions(){let e=i=>{if(!(i in Os))throw new Error(`No option with key "${i}"`);return this.rawOptions[i]},t=(i,n)=>{if(!(i in Os))throw new Error(`No option with key "${i}"`);n=this._sanitizeAndValidateOption(i,n),this.rawOptions[i]!==n&&(this.rawOptions[i]=n,this._onOptionChange.fire(i))};for(let i in this.rawOptions){let n={get:e.bind(this,i),set:t.bind(this,i)};Object.defineProperty(this.options,i,n)}}_sanitizeAndValidateOption(e,t){switch(e){case"cursorStyle":if(t||(t=Os[e]),!iq(t))throw new Error(`"${t}" is not a valid value for ${e}`);break;case"wordSeparator":t||(t=Os[e]);break;case"fontWeight":case"fontWeightBold":if(typeof t=="number"&&1<=t&&t<=1e3)break;t=eq.includes(t)?t:Os[e];break;case"cursorWidth":t=Math.floor(t);case"lineHeight":case"tabStopWidth":if(t<1)throw new Error(`${e} cannot be less than 1, value: ${t}`);break;case"minimumContrastRatio":t=Math.max(1,Math.min(21,Math.round(t*10)/10));break;case"scrollback":if(t=Math.min(t,4294967295),t<0)throw new Error(`${e} cannot be less than 0, value: ${t}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(t<=0)throw new Error(`${e} cannot be less than or equal to 0, value: ${t}`);break;case"rows":case"cols":if(!t&&t!==0)throw new Error(`${e} must be numeric, value: ${t}`);break;case"windowsPty":t=t??{};break}return t}};function iq(e){return e==="block"||e==="underline"||e==="bar"}function eo(e,t=5){if(typeof e!="object")return e;let i=Array.isArray(e)?[]:{};for(let n in e)i[n]=t<=1?e[n]:e[n]&&eo(e[n],t-1);return i}var t_=Object.freeze({insertMode:!1}),i_=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,cursorBlink:void 0,cursorStyle:void 0,origin:!1,reverseWraparound:!1,sendFocus:!1,synchronizedOutput:!1,wraparound:!0}),fh=class extends Qe{constructor(e,t,i){super(),this._bufferService=e,this._logService=t,this._optionsService=i,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this._register(new He),this.onData=this._onData.event,this._onUserInput=this._register(new He),this.onUserInput=this._onUserInput.event,this._onBinary=this._register(new He),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this._register(new He),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=eo(t_),this.decPrivateModes=eo(i_)}reset(){this.modes=eo(t_),this.decPrivateModes=eo(i_)}triggerDataEvent(e,t=!1){if(this._optionsService.rawOptions.disableStdin)return;let i=this._bufferService.buffer;t&&this._optionsService.rawOptions.scrollOnUserInput&&i.ybase!==i.ydisp&&this._onRequestScrollToBottom.fire(),t&&this._onUserInput.fire(),this._logService.debug(`sending data "${e}"`),this._logService.trace("sending data (codes)",()=>e.split("").map(n=>n.charCodeAt(0))),this._onData.fire(e)}triggerBinaryEvent(e){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${e}"`),this._logService.trace("sending binary (codes)",()=>e.split("").map(t=>t.charCodeAt(0))),this._onBinary.fire(e))}};fh=Ot([Pe(0,Ti),Pe(1,Sb),Pe(2,Ni)],fh);var n_={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:e=>e.button===4||e.action!==1?!1:(e.ctrl=!1,e.alt=!1,e.shift=!1,!0)},VT200:{events:19,restrict:e=>e.action!==32},DRAG:{events:23,restrict:e=>!(e.action===32&&e.button===3)},ANY:{events:31,restrict:e=>!0}};function yu(e,t){let i=(e.ctrl?16:0)|(e.shift?4:0)|(e.alt?8:0);return e.button===4?(i|=64,i|=e.action):(i|=e.button&3,e.button&4&&(i|=64),e.button&8&&(i|=128),e.action===32?i|=32:e.action===0&&!t&&(i|=3)),i}var wu=String.fromCharCode,r_={DEFAULT:e=>{let t=[yu(e,!1)+32,e.col+32,e.row+32];return t[0]>255||t[1]>255||t[2]>255?"":`\x1B[M${wu(t[0])}${wu(t[1])}${wu(t[2])}`},SGR:e=>{let t=e.action===0&&e.button!==4?"m":"M";return`\x1B[<${yu(e,!0)};${e.col};${e.row}${t}`},SGR_PIXELS:e=>{let t=e.action===0&&e.button!==4?"m":"M";return`\x1B[<${yu(e,!0)};${e.x};${e.y}${t}`}},ph=class extends Qe{constructor(e,t,i){super(),this._bufferService=e,this._coreService=t,this._optionsService=i,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._wheelPartialScroll=0,this._onProtocolChange=this._register(new He),this.onProtocolChange=this._onProtocolChange.event;for(let n of Object.keys(n_))this.addProtocol(n,n_[n]);for(let n of Object.keys(r_))this.addEncoding(n,r_[n]);this.reset()}addProtocol(e,t){this._protocols[e]=t}addEncoding(e,t){this._encodings[e]=t}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(e){if(!this._protocols[e])throw new Error(`unknown protocol "${e}"`);this._activeProtocol=e,this._onProtocolChange.fire(this._protocols[e].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(e){if(!this._encodings[e])throw new Error(`unknown encoding "${e}"`);this._activeEncoding=e}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null,this._wheelPartialScroll=0}consumeWheelEvent(e,t,i){if(e.deltaY===0||e.shiftKey||t===void 0||i===void 0)return 0;let n=t/i,r=this._applyScrollModifier(e.deltaY,e);return e.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(r/=n+0,Math.abs(e.deltaY)<50&&(r*=.3),this._wheelPartialScroll+=r,r=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):e.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(r*=this._bufferService.rows),r}_applyScrollModifier(e,t){return t.altKey||t.ctrlKey||t.shiftKey?e*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:e*this._optionsService.rawOptions.scrollSensitivity}triggerMouseEvent(e){if(e.col<0||e.col>=this._bufferService.cols||e.row<0||e.row>=this._bufferService.rows||e.button===4&&e.action===32||e.button===3&&e.action!==32||e.button!==4&&(e.action===2||e.action===3)||(e.col++,e.row++,e.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,e,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(e))return!1;let t=this._encodings[this._activeEncoding](e);return t&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(t):this._coreService.triggerDataEvent(t,!0)),this._lastEvent=e,!0}explainEvents(e){return{down:!!(e&1),up:!!(e&2),drag:!!(e&4),move:!!(e&8),wheel:!!(e&16)}}_equalEvents(e,t,i){if(i){if(e.x!==t.x||e.y!==t.y)return!1}else if(e.col!==t.col||e.row!==t.row)return!1;return!(e.button!==t.button||e.action!==t.action||e.ctrl!==t.ctrl||e.alt!==t.alt||e.shift!==t.shift)}};ph=Ot([Pe(0,Ti),Pe(1,$s),Pe(2,Ni)],ph);var Su=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],nq=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]],Xt;function rq(e,t){let i=0,n=t.length-1,r;if(e<t[0][0]||e>t[n][1])return!1;for(;n>=i;)if(r=i+n>>1,e>t[r][1])i=r+1;else if(e<t[r][0])n=r-1;else return!0;return!1}var sq=class{constructor(){if(this.version="6",!Xt){Xt=new Uint8Array(65536),Xt.fill(1),Xt[0]=0,Xt.fill(0,1,32),Xt.fill(0,127,160),Xt.fill(2,4352,4448),Xt[9001]=2,Xt[9002]=2,Xt.fill(2,11904,42192),Xt[12351]=1,Xt.fill(2,44032,55204),Xt.fill(2,63744,64256),Xt.fill(2,65040,65050),Xt.fill(2,65072,65136),Xt.fill(2,65280,65377),Xt.fill(2,65504,65511);for(let e=0;e<Su.length;++e)Xt.fill(0,Su[e][0],Su[e][1]+1)}}wcwidth(e){return e<32?0:e<127?1:e<65536?Xt[e]:rq(e,nq)?0:e>=131072&&e<=196605||e>=196608&&e<=262141?2:1}charProperties(e,t){let i=this.wcwidth(e),n=i===0&&t!==0;if(n){let r=hs.extractWidth(t);r===0?n=!1:r>i&&(i=r)}return hs.createPropertyValue(0,i,n)}},hs=class ec{constructor(){this._providers=Object.create(null),this._active="",this._onChange=new He,this.onChange=this._onChange.event;let t=new sq;this.register(t),this._active=t.version,this._activeProvider=t}static extractShouldJoin(t){return(t&1)!==0}static extractWidth(t){return t>>1&3}static extractCharKind(t){return t>>3}static createPropertyValue(t,i,n=!1){return(t&16777215)<<3|(i&3)<<1|(n?1:0)}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(t){if(!this._providers[t])throw new Error(`unknown Unicode version "${t}"`);this._active=t,this._activeProvider=this._providers[t],this._onChange.fire(t)}register(t){this._providers[t.version]=t}wcwidth(t){return this._activeProvider.wcwidth(t)}getStringCellWidth(t){let i=0,n=0,r=t.length;for(let s=0;s<r;++s){let a=t.charCodeAt(s);if(55296<=a&&a<=56319){if(++s>=r)return i+this.wcwidth(a);let c=t.charCodeAt(s);56320<=c&&c<=57343?a=(a-55296)*1024+c-56320+65536:i+=this.wcwidth(c)}let l=this.charProperties(a,n),o=ec.extractWidth(l);ec.extractShouldJoin(l)&&(o-=ec.extractWidth(n)),i+=o,n=l}return i}charProperties(t,i){return this._activeProvider.charProperties(t,i)}},aq=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(e){this.glevel=e,this.charset=this._charsets[e]}setgCharset(e,t){this._charsets[e]=t,this.glevel===e&&(this.charset=t)}};function s_(e){var n;let t=(n=e.buffer.lines.get(e.buffer.ybase+e.buffer.y-1))==null?void 0:n.get(e.cols-1),i=e.buffer.lines.get(e.buffer.ybase+e.buffer.y);i&&t&&(i.isWrapped=t[3]!==0&&t[3]!==32)}var Ul=2147483647,lq=256,n5=class _h{constructor(t=32,i=32){if(this.maxLength=t,this.maxSubParamsLength=i,i>lq)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(t),this.length=0,this._subParams=new Int32Array(i),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(t),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}static fromArray(t){let i=new _h;if(!t.length)return i;for(let n=Array.isArray(t[0])?1:0;n<t.length;++n){let r=t[n];if(Array.isArray(r))for(let s=0;s<r.length;++s)i.addSubParam(r[s]);else i.addParam(r)}return i}clone(){let t=new _h(this.maxLength,this.maxSubParamsLength);return t.params.set(this.params),t.length=this.length,t._subParams.set(this._subParams),t._subParamsLength=this._subParamsLength,t._subParamsIdx.set(this._subParamsIdx),t._rejectDigits=this._rejectDigits,t._rejectSubDigits=this._rejectSubDigits,t._digitIsSub=this._digitIsSub,t}toArray(){let t=[];for(let i=0;i<this.length;++i){t.push(this.params[i]);let n=this._subParamsIdx[i]>>8,r=this._subParamsIdx[i]&255;r-n>0&&t.push(Array.prototype.slice.call(this._subParams,n,r))}return t}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(t){if(this._digitIsSub=!1,this.length>=this.maxLength){this._rejectDigits=!0;return}if(t<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=t>Ul?Ul:t}addSubParam(t){if(this._digitIsSub=!0,!!this.length){if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength){this._rejectSubDigits=!0;return}if(t<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=t>Ul?Ul:t,this._subParamsIdx[this.length-1]++}}hasSubParams(t){return(this._subParamsIdx[t]&255)-(this._subParamsIdx[t]>>8)>0}getSubParams(t){let i=this._subParamsIdx[t]>>8,n=this._subParamsIdx[t]&255;return n-i>0?this._subParams.subarray(i,n):null}getSubParamsAll(){let t={};for(let i=0;i<this.length;++i){let n=this._subParamsIdx[i]>>8,r=this._subParamsIdx[i]&255;r-n>0&&(t[i]=this._subParams.slice(n,r))}return t}addDigit(t){let i;if(this._rejectDigits||!(i=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;let n=this._digitIsSub?this._subParams:this.params,r=n[i-1];n[i-1]=~r?Math.min(r*10+t,Ul):t}},Wl=[],oq=class{constructor(){this._state=0,this._active=Wl,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(e,t){this._handlers[e]===void 0&&(this._handlers[e]=[]);let i=this._handlers[e];return i.push(t),{dispose:()=>{let n=i.indexOf(t);n!==-1&&i.splice(n,1)}}}clearHandler(e){this._handlers[e]&&delete this._handlers[e]}setHandlerFallback(e){this._handlerFb=e}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=Wl}reset(){if(this._state===2)for(let e=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;e>=0;--e)this._active[e].end(!1);this._stack.paused=!1,this._active=Wl,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||Wl,!this._active.length)this._handlerFb(this._id,"START");else for(let e=this._active.length-1;e>=0;e--)this._active[e].start()}_put(e,t,i){if(!this._active.length)this._handlerFb(this._id,"PUT",w1(e,t,i));else for(let n=this._active.length-1;n>=0;n--)this._active[n].put(e,t,i)}start(){this.reset(),this._state=1}put(e,t,i){if(this._state!==3){if(this._state===1)for(;t<i;){let n=e[t++];if(n===59){this._state=2,this._start();break}if(n<48||57<n){this._state=3;return}this._id===-1&&(this._id=0),this._id=this._id*10+n-48}this._state===2&&i-t>0&&this._put(e,t,i)}}end(e,t=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),!this._active.length)this._handlerFb(this._id,"END",e);else{let i=!1,n=this._active.length-1,r=!1;if(this._stack.paused&&(n=this._stack.loopPosition-1,i=t,r=this._stack.fallThrough,this._stack.paused=!1),!r&&i===!1){for(;n>=0&&(i=this._active[n].end(e),i!==!0);n--)if(i instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=n,this._stack.fallThrough=!1,i;n--}for(;n>=0;n--)if(i=this._active[n].end(!1),i instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=n,this._stack.fallThrough=!0,i}this._active=Wl,this._id=-1,this._state=0}}},Zi=class{constructor(e){this._handler=e,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(e,t,i){this._hitLimit||(this._data+=w1(e,t,i),this._data.length>1e7&&(this._data="",this._hitLimit=!0))}end(e){let t=!1;if(this._hitLimit)t=!1;else if(e&&(t=this._handler(this._data),t instanceof Promise))return t.then(i=>(this._data="",this._hitLimit=!1,i));return this._data="",this._hitLimit=!1,t}},jl=[],cq=class{constructor(){this._handlers=Object.create(null),this._active=jl,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=jl}registerHandler(e,t){this._handlers[e]===void 0&&(this._handlers[e]=[]);let i=this._handlers[e];return i.push(t),{dispose:()=>{let n=i.indexOf(t);n!==-1&&i.splice(n,1)}}}clearHandler(e){this._handlers[e]&&delete this._handlers[e]}setHandlerFallback(e){this._handlerFb=e}reset(){if(this._active.length)for(let e=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;e>=0;--e)this._active[e].unhook(!1);this._stack.paused=!1,this._active=jl,this._ident=0}hook(e,t){if(this.reset(),this._ident=e,this._active=this._handlers[e]||jl,!this._active.length)this._handlerFb(this._ident,"HOOK",t);else for(let i=this._active.length-1;i>=0;i--)this._active[i].hook(t)}put(e,t,i){if(!this._active.length)this._handlerFb(this._ident,"PUT",w1(e,t,i));else for(let n=this._active.length-1;n>=0;n--)this._active[n].put(e,t,i)}unhook(e,t=!0){if(!this._active.length)this._handlerFb(this._ident,"UNHOOK",e);else{let i=!1,n=this._active.length-1,r=!1;if(this._stack.paused&&(n=this._stack.loopPosition-1,i=t,r=this._stack.fallThrough,this._stack.paused=!1),!r&&i===!1){for(;n>=0&&(i=this._active[n].unhook(e),i!==!0);n--)if(i instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=n,this._stack.fallThrough=!1,i;n--}for(;n>=0;n--)if(i=this._active[n].unhook(!1),i instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=n,this._stack.fallThrough=!0,i}this._active=jl,this._ident=0}},to=new n5;to.addParam(0);var a_=class{constructor(e){this._handler=e,this._data="",this._params=to,this._hitLimit=!1}hook(e){this._params=e.length>1||e.params[0]?e.clone():to,this._data="",this._hitLimit=!1}put(e,t,i){this._hitLimit||(this._data+=w1(e,t,i),this._data.length>1e7&&(this._data="",this._hitLimit=!0))}unhook(e){let t=!1;if(this._hitLimit)t=!1;else if(e&&(t=this._handler(this._data,this._params),t instanceof Promise))return t.then(i=>(this._params=to,this._data="",this._hitLimit=!1,i));return this._params=to,this._data="",this._hitLimit=!1,t}},uq=class{constructor(e){this.table=new Uint8Array(e)}setDefault(e,t){this.table.fill(e<<4|t)}add(e,t,i,n){this.table[t<<8|e]=i<<4|n}addMany(e,t,i,n){for(let r=0;r<e.length;r++)this.table[t<<8|e[r]]=i<<4|n}},Qi=160,dq=function(){let e=new uq(4095),t=Array.apply(null,Array(256)).map((l,o)=>o),i=(l,o)=>t.slice(l,o),n=i(32,127),r=i(0,24);r.push(25),r.push.apply(r,i(28,32));let s=i(0,14),a;e.setDefault(1,0),e.addMany(n,0,2,0);for(a in s)e.addMany([24,26,153,154],a,3,0),e.addMany(i(128,144),a,3,0),e.addMany(i(144,152),a,3,0),e.add(156,a,0,0),e.add(27,a,11,1),e.add(157,a,4,8),e.addMany([152,158,159],a,0,7),e.add(155,a,11,3),e.add(144,a,11,9);return e.addMany(r,0,3,0),e.addMany(r,1,3,1),e.add(127,1,0,1),e.addMany(r,8,0,8),e.addMany(r,3,3,3),e.add(127,3,0,3),e.addMany(r,4,3,4),e.add(127,4,0,4),e.addMany(r,6,3,6),e.addMany(r,5,3,5),e.add(127,5,0,5),e.addMany(r,2,3,2),e.add(127,2,0,2),e.add(93,1,4,8),e.addMany(n,8,5,8),e.add(127,8,5,8),e.addMany([156,27,24,26,7],8,6,0),e.addMany(i(28,32),8,0,8),e.addMany([88,94,95],1,0,7),e.addMany(n,7,0,7),e.addMany(r,7,0,7),e.add(156,7,0,0),e.add(127,7,0,7),e.add(91,1,11,3),e.addMany(i(64,127),3,7,0),e.addMany(i(48,60),3,8,4),e.addMany([60,61,62,63],3,9,4),e.addMany(i(48,60),4,8,4),e.addMany(i(64,127),4,7,0),e.addMany([60,61,62,63],4,0,6),e.addMany(i(32,64),6,0,6),e.add(127,6,0,6),e.addMany(i(64,127),6,0,0),e.addMany(i(32,48),3,9,5),e.addMany(i(32,48),5,9,5),e.addMany(i(48,64),5,0,6),e.addMany(i(64,127),5,7,0),e.addMany(i(32,48),4,9,5),e.addMany(i(32,48),1,9,2),e.addMany(i(32,48),2,9,2),e.addMany(i(48,127),2,10,0),e.addMany(i(48,80),1,10,0),e.addMany(i(81,88),1,10,0),e.addMany([89,90,92],1,10,0),e.addMany(i(96,127),1,10,0),e.add(80,1,11,9),e.addMany(r,9,0,9),e.add(127,9,0,9),e.addMany(i(28,32),9,0,9),e.addMany(i(32,48),9,9,12),e.addMany(i(48,60),9,8,10),e.addMany([60,61,62,63],9,9,10),e.addMany(r,11,0,11),e.addMany(i(32,128),11,0,11),e.addMany(i(28,32),11,0,11),e.addMany(r,10,0,10),e.add(127,10,0,10),e.addMany(i(28,32),10,0,10),e.addMany(i(48,60),10,8,10),e.addMany([60,61,62,63],10,0,11),e.addMany(i(32,48),10,9,12),e.addMany(r,12,0,12),e.add(127,12,0,12),e.addMany(i(28,32),12,0,12),e.addMany(i(32,48),12,9,12),e.addMany(i(48,64),12,0,11),e.addMany(i(64,127),12,12,13),e.addMany(i(64,127),10,12,13),e.addMany(i(64,127),9,12,13),e.addMany(r,13,13,13),e.addMany(n,13,13,13),e.add(127,13,0,13),e.addMany([27,156,24,26],13,14,0),e.add(Qi,0,2,0),e.add(Qi,8,5,8),e.add(Qi,6,0,6),e.add(Qi,11,0,11),e.add(Qi,13,13,13),e}(),hq=class extends Qe{constructor(e=dq){super(),this._transitions=e,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new n5,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(t,i,n)=>{},this._executeHandlerFb=t=>{},this._csiHandlerFb=(t,i)=>{},this._escHandlerFb=t=>{},this._errorHandlerFb=t=>t,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this._register($t(()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)})),this._oscParser=this._register(new oq),this._dcsParser=this._register(new cq),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},()=>!0)}_identifier(e,t=[64,126]){let i=0;if(e.prefix){if(e.prefix.length>1)throw new Error("only one byte as prefix supported");if(i=e.prefix.charCodeAt(0),i&&60>i||i>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(e.intermediates){if(e.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let r=0;r<e.intermediates.length;++r){let s=e.intermediates.charCodeAt(r);if(32>s||s>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");i<<=8,i|=s}}if(e.final.length!==1)throw new Error("final must be a single byte");let n=e.final.charCodeAt(0);if(t[0]>n||n>t[1])throw new Error(`final must be in range ${t[0]} .. ${t[1]}`);return i<<=8,i|=n,i}identToString(e){let t=[];for(;e;)t.push(String.fromCharCode(e&255)),e>>=8;return t.reverse().join("")}setPrintHandler(e){this._printHandler=e}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(e,t){let i=this._identifier(e,[48,126]);this._escHandlers[i]===void 0&&(this._escHandlers[i]=[]);let n=this._escHandlers[i];return n.push(t),{dispose:()=>{let r=n.indexOf(t);r!==-1&&n.splice(r,1)}}}clearEscHandler(e){this._escHandlers[this._identifier(e,[48,126])]&&delete this._escHandlers[this._identifier(e,[48,126])]}setEscHandlerFallback(e){this._escHandlerFb=e}setExecuteHandler(e,t){this._executeHandlers[e.charCodeAt(0)]=t}clearExecuteHandler(e){this._executeHandlers[e.charCodeAt(0)]&&delete this._executeHandlers[e.charCodeAt(0)]}setExecuteHandlerFallback(e){this._executeHandlerFb=e}registerCsiHandler(e,t){let i=this._identifier(e);this._csiHandlers[i]===void 0&&(this._csiHandlers[i]=[]);let n=this._csiHandlers[i];return n.push(t),{dispose:()=>{let r=n.indexOf(t);r!==-1&&n.splice(r,1)}}}clearCsiHandler(e){this._csiHandlers[this._identifier(e)]&&delete this._csiHandlers[this._identifier(e)]}setCsiHandlerFallback(e){this._csiHandlerFb=e}registerDcsHandler(e,t){return this._dcsParser.registerHandler(this._identifier(e),t)}clearDcsHandler(e){this._dcsParser.clearHandler(this._identifier(e))}setDcsHandlerFallback(e){this._dcsParser.setHandlerFallback(e)}registerOscHandler(e,t){return this._oscParser.registerHandler(e,t)}clearOscHandler(e){this._oscParser.clearHandler(e)}setOscHandlerFallback(e){this._oscParser.setHandlerFallback(e)}setErrorHandler(e){this._errorHandler=e}clearErrorHandler(){this._errorHandler=this._errorHandlerFb}reset(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])}_preserveStack(e,t,i,n,r){this._parseStack.state=e,this._parseStack.handlers=t,this._parseStack.handlerPos=i,this._parseStack.transition=n,this._parseStack.chunkPos=r}parse(e,t,i){let n=0,r=0,s=0,a;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,s=this._parseStack.chunkPos+1;else{if(i===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");let l=this._parseStack.handlers,o=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(i===!1&&o>-1){for(;o>=0&&(a=l[o](this._params),a!==!0);o--)if(a instanceof Promise)return this._parseStack.handlerPos=o,a}this._parseStack.handlers=[];break;case 4:if(i===!1&&o>-1){for(;o>=0&&(a=l[o](),a!==!0);o--)if(a instanceof Promise)return this._parseStack.handlerPos=o,a}this._parseStack.handlers=[];break;case 6:if(n=e[this._parseStack.chunkPos],a=this._dcsParser.unhook(n!==24&&n!==26,i),a)return a;n===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(n=e[this._parseStack.chunkPos],a=this._oscParser.end(n!==24&&n!==26,i),a)return a;n===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break}this._parseStack.state=0,s=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=this._parseStack.transition&15}for(let l=s;l<t;++l){switch(n=e[l],r=this._transitions.table[this.currentState<<8|(n<160?n:Qi)],r>>4){case 2:for(let h=l+1;;++h){if(h>=t||(n=e[h])<32||n>126&&n<Qi){this._printHandler(e,l,h),l=h-1;break}if(++h>=t||(n=e[h])<32||n>126&&n<Qi){this._printHandler(e,l,h),l=h-1;break}if(++h>=t||(n=e[h])<32||n>126&&n<Qi){this._printHandler(e,l,h),l=h-1;break}if(++h>=t||(n=e[h])<32||n>126&&n<Qi){this._printHandler(e,l,h),l=h-1;break}}break;case 3:this._executeHandlers[n]?this._executeHandlers[n]():this._executeHandlerFb(n),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:l,code:n,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:let o=this._csiHandlers[this._collect<<8|n],c=o?o.length-1:-1;for(;c>=0&&(a=o[c](this._params),a!==!0);c--)if(a instanceof Promise)return this._preserveStack(3,o,c,r,l),a;c<0&&this._csiHandlerFb(this._collect<<8|n,this._params),this.precedingJoinState=0;break;case 8:do switch(n){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(n-48)}while(++l<t&&(n=e[l])>47&&n<60);l--;break;case 9:this._collect<<=8,this._collect|=n;break;case 10:let u=this._escHandlers[this._collect<<8|n],d=u?u.length-1:-1;for(;d>=0&&(a=u[d](),a!==!0);d--)if(a instanceof Promise)return this._preserveStack(4,u,d,r,l),a;d<0&&this._escHandlerFb(this._collect<<8|n),this.precedingJoinState=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|n,this._params);break;case 13:for(let h=l+1;;++h)if(h>=t||(n=e[h])===24||n===26||n===27||n>127&&n<Qi){this._dcsParser.put(e,l,h),l=h-1;break}break;case 14:if(a=this._dcsParser.unhook(n!==24&&n!==26),a)return this._preserveStack(6,[],0,r,l),a;n===27&&(r|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0;break;case 4:this._oscParser.start();break;case 5:for(let h=l+1;;h++)if(h>=t||(n=e[h])<32||n>127&&n<Qi){this._oscParser.put(e,l,h),l=h-1;break}break;case 6:if(a=this._oscParser.end(n!==24&&n!==26),a)return this._preserveStack(5,[],0,r,l),a;n===27&&(r|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0;break}this.currentState=r&15}}},fq=/^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/,pq=/^[\da-f]+$/;function l_(e){if(!e)return;let t=e.toLowerCase();if(t.indexOf("rgb:")===0){t=t.slice(4);let i=fq.exec(t);if(i){let n=i[1]?15:i[4]?255:i[7]?4095:65535;return[Math.round(parseInt(i[1]||i[4]||i[7]||i[10],16)/n*255),Math.round(parseInt(i[2]||i[5]||i[8]||i[11],16)/n*255),Math.round(parseInt(i[3]||i[6]||i[9]||i[12],16)/n*255)]}}else if(t.indexOf("#")===0&&(t=t.slice(1),pq.exec(t)&&[3,6,9,12].includes(t.length))){let i=t.length/3,n=[0,0,0];for(let r=0;r<3;++r){let s=parseInt(t.slice(i*r,i*r+i),16);n[r]=i===1?s<<4:i===2?s:i===3?s>>4:s>>8}return n}}function Cu(e,t){let i=e.toString(16),n=i.length<2?"0"+i:i;switch(t){case 4:return i[0];case 8:return n;case 12:return(n+n).slice(0,3);default:return n+n}}function _q(e,t=16){let[i,n,r]=e;return`rgb:${Cu(i,t)}/${Cu(n,t)}/${Cu(r,t)}`}var mq={"(":0,")":1,"*":2,"+":3,"-":1,".":2},wr=131072,o_=10;function c_(e,t){if(e>24)return t.setWinLines||!1;switch(e){case 1:return!!t.restoreWin;case 2:return!!t.minimizeWin;case 3:return!!t.setWinPosition;case 4:return!!t.setWinSizePixels;case 5:return!!t.raiseWin;case 6:return!!t.lowerWin;case 7:return!!t.refreshWin;case 8:return!!t.setWinSizeChars;case 9:return!!t.maximizeWin;case 10:return!!t.fullscreenWin;case 11:return!!t.getWinState;case 13:return!!t.getWinPosition;case 14:return!!t.getWinSizePixels;case 15:return!!t.getScreenSizePixels;case 16:return!!t.getCellSizePixels;case 18:return!!t.getWinSizeChars;case 19:return!!t.getScreenSizeChars;case 20:return!!t.getIconTitle;case 21:return!!t.getWinTitle;case 22:return!!t.pushTitle;case 23:return!!t.popTitle;case 24:return!!t.setWinLines}return!1}var u_=5e3,d_=0,vq=class extends Qe{constructor(e,t,i,n,r,s,a,l,o=new hq){super(),this._bufferService=e,this._charsetService=t,this._coreService=i,this._logService=n,this._optionsService=r,this._oscLinkService=s,this._coreMouseService=a,this._unicodeService=l,this._parser=o,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new IW,this._utf8Decoder=new RW,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=jt.clone(),this._eraseAttrDataInternal=jt.clone(),this._onRequestBell=this._register(new He),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this._register(new He),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this._register(new He),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this._register(new He),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this._register(new He),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this._register(new He),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this._register(new He),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this._register(new He),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this._register(new He),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this._register(new He),this.onLineFeed=this._onLineFeed.event,this._onScroll=this._register(new He),this.onScroll=this._onScroll.event,this._onTitleChange=this._register(new He),this.onTitleChange=this._onTitleChange.event,this._onColor=this._register(new He),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this._register(this._parser),this._dirtyRowTracker=new mh(this._bufferService),this._activeBuffer=this._bufferService.buffer,this._register(this._bufferService.buffers.onBufferActivate(c=>this._activeBuffer=c.activeBuffer)),this._parser.setCsiHandlerFallback((c,u)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(c),params:u.toArray()})}),this._parser.setEscHandlerFallback(c=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(c)})}),this._parser.setExecuteHandlerFallback(c=>{this._logService.debug("Unknown EXECUTE code: ",{code:c})}),this._parser.setOscHandlerFallback((c,u,d)=>{this._logService.debug("Unknown OSC code: ",{identifier:c,action:u,data:d})}),this._parser.setDcsHandlerFallback((c,u,d)=>{u==="HOOK"&&(d=d.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(c),action:u,payload:d})}),this._parser.setPrintHandler((c,u,d)=>this.print(c,u,d)),this._parser.registerCsiHandler({final:"@"},c=>this.insertChars(c)),this._parser.registerCsiHandler({intermediates:" ",final:"@"},c=>this.scrollLeft(c)),this._parser.registerCsiHandler({final:"A"},c=>this.cursorUp(c)),this._parser.registerCsiHandler({intermediates:" ",final:"A"},c=>this.scrollRight(c)),this._parser.registerCsiHandler({final:"B"},c=>this.cursorDown(c)),this._parser.registerCsiHandler({final:"C"},c=>this.cursorForward(c)),this._parser.registerCsiHandler({final:"D"},c=>this.cursorBackward(c)),this._parser.registerCsiHandler({final:"E"},c=>this.cursorNextLine(c)),this._parser.registerCsiHandler({final:"F"},c=>this.cursorPrecedingLine(c)),this._parser.registerCsiHandler({final:"G"},c=>this.cursorCharAbsolute(c)),this._parser.registerCsiHandler({final:"H"},c=>this.cursorPosition(c)),this._parser.registerCsiHandler({final:"I"},c=>this.cursorForwardTab(c)),this._parser.registerCsiHandler({final:"J"},c=>this.eraseInDisplay(c,!1)),this._parser.registerCsiHandler({prefix:"?",final:"J"},c=>this.eraseInDisplay(c,!0)),this._parser.registerCsiHandler({final:"K"},c=>this.eraseInLine(c,!1)),this._parser.registerCsiHandler({prefix:"?",final:"K"},c=>this.eraseInLine(c,!0)),this._parser.registerCsiHandler({final:"L"},c=>this.insertLines(c)),this._parser.registerCsiHandler({final:"M"},c=>this.deleteLines(c)),this._parser.registerCsiHandler({final:"P"},c=>this.deleteChars(c)),this._parser.registerCsiHandler({final:"S"},c=>this.scrollUp(c)),this._parser.registerCsiHandler({final:"T"},c=>this.scrollDown(c)),this._parser.registerCsiHandler({final:"X"},c=>this.eraseChars(c)),this._parser.registerCsiHandler({final:"Z"},c=>this.cursorBackwardTab(c)),this._parser.registerCsiHandler({final:"`"},c=>this.charPosAbsolute(c)),this._parser.registerCsiHandler({final:"a"},c=>this.hPositionRelative(c)),this._parser.registerCsiHandler({final:"b"},c=>this.repeatPrecedingCharacter(c)),this._parser.registerCsiHandler({final:"c"},c=>this.sendDeviceAttributesPrimary(c)),this._parser.registerCsiHandler({prefix:">",final:"c"},c=>this.sendDeviceAttributesSecondary(c)),this._parser.registerCsiHandler({final:"d"},c=>this.linePosAbsolute(c)),this._parser.registerCsiHandler({final:"e"},c=>this.vPositionRelative(c)),this._parser.registerCsiHandler({final:"f"},c=>this.hVPosition(c)),this._parser.registerCsiHandler({final:"g"},c=>this.tabClear(c)),this._parser.registerCsiHandler({final:"h"},c=>this.setMode(c)),this._parser.registerCsiHandler({prefix:"?",final:"h"},c=>this.setModePrivate(c)),this._parser.registerCsiHandler({final:"l"},c=>this.resetMode(c)),this._parser.registerCsiHandler({prefix:"?",final:"l"},c=>this.resetModePrivate(c)),this._parser.registerCsiHandler({final:"m"},c=>this.charAttributes(c)),this._parser.registerCsiHandler({final:"n"},c=>this.deviceStatus(c)),this._parser.registerCsiHandler({prefix:"?",final:"n"},c=>this.deviceStatusPrivate(c)),this._parser.registerCsiHandler({intermediates:"!",final:"p"},c=>this.softReset(c)),this._parser.registerCsiHandler({intermediates:" ",final:"q"},c=>this.setCursorStyle(c)),this._parser.registerCsiHandler({final:"r"},c=>this.setScrollRegion(c)),this._parser.registerCsiHandler({final:"s"},c=>this.saveCursor(c)),this._parser.registerCsiHandler({final:"t"},c=>this.windowOptions(c)),this._parser.registerCsiHandler({final:"u"},c=>this.restoreCursor(c)),this._parser.registerCsiHandler({intermediates:"'",final:"}"},c=>this.insertColumns(c)),this._parser.registerCsiHandler({intermediates:"'",final:"~"},c=>this.deleteColumns(c)),this._parser.registerCsiHandler({intermediates:'"',final:"q"},c=>this.selectProtected(c)),this._parser.registerCsiHandler({intermediates:"$",final:"p"},c=>this.requestMode(c,!0)),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},c=>this.requestMode(c,!1)),this._parser.setExecuteHandler(Ae.BEL,()=>this.bell()),this._parser.setExecuteHandler(Ae.LF,()=>this.lineFeed()),this._parser.setExecuteHandler(Ae.VT,()=>this.lineFeed()),this._parser.setExecuteHandler(Ae.FF,()=>this.lineFeed()),this._parser.setExecuteHandler(Ae.CR,()=>this.carriageReturn()),this._parser.setExecuteHandler(Ae.BS,()=>this.backspace()),this._parser.setExecuteHandler(Ae.HT,()=>this.tab()),this._parser.setExecuteHandler(Ae.SO,()=>this.shiftOut()),this._parser.setExecuteHandler(Ae.SI,()=>this.shiftIn()),this._parser.setExecuteHandler(J0.IND,()=>this.index()),this._parser.setExecuteHandler(J0.NEL,()=>this.nextLine()),this._parser.setExecuteHandler(J0.HTS,()=>this.tabSet()),this._parser.registerOscHandler(0,new Zi(c=>(this.setTitle(c),this.setIconName(c),!0))),this._parser.registerOscHandler(1,new Zi(c=>this.setIconName(c))),this._parser.registerOscHandler(2,new Zi(c=>this.setTitle(c))),this._parser.registerOscHandler(4,new Zi(c=>this.setOrReportIndexedColor(c))),this._parser.registerOscHandler(8,new Zi(c=>this.setHyperlink(c))),this._parser.registerOscHandler(10,new Zi(c=>this.setOrReportFgColor(c))),this._parser.registerOscHandler(11,new Zi(c=>this.setOrReportBgColor(c))),this._parser.registerOscHandler(12,new Zi(c=>this.setOrReportCursorColor(c))),this._parser.registerOscHandler(104,new Zi(c=>this.restoreIndexedColor(c))),this._parser.registerOscHandler(110,new Zi(c=>this.restoreFgColor(c))),this._parser.registerOscHandler(111,new Zi(c=>this.restoreBgColor(c))),this._parser.registerOscHandler(112,new Zi(c=>this.restoreCursorColor(c))),this._parser.registerEscHandler({final:"7"},()=>this.saveCursor()),this._parser.registerEscHandler({final:"8"},()=>this.restoreCursor()),this._parser.registerEscHandler({final:"D"},()=>this.index()),this._parser.registerEscHandler({final:"E"},()=>this.nextLine()),this._parser.registerEscHandler({final:"H"},()=>this.tabSet()),this._parser.registerEscHandler({final:"M"},()=>this.reverseIndex()),this._parser.registerEscHandler({final:"="},()=>this.keypadApplicationMode()),this._parser.registerEscHandler({final:">"},()=>this.keypadNumericMode()),this._parser.registerEscHandler({final:"c"},()=>this.fullReset()),this._parser.registerEscHandler({final:"n"},()=>this.setgLevel(2)),this._parser.registerEscHandler({final:"o"},()=>this.setgLevel(3)),this._parser.registerEscHandler({final:"|"},()=>this.setgLevel(3)),this._parser.registerEscHandler({final:"}"},()=>this.setgLevel(2)),this._parser.registerEscHandler({final:"~"},()=>this.setgLevel(1)),this._parser.registerEscHandler({intermediates:"%",final:"@"},()=>this.selectDefaultCharset()),this._parser.registerEscHandler({intermediates:"%",final:"G"},()=>this.selectDefaultCharset());for(let c in ni)this._parser.registerEscHandler({intermediates:"(",final:c},()=>this.selectCharset("("+c)),this._parser.registerEscHandler({intermediates:")",final:c},()=>this.selectCharset(")"+c)),this._parser.registerEscHandler({intermediates:"*",final:c},()=>this.selectCharset("*"+c)),this._parser.registerEscHandler({intermediates:"+",final:c},()=>this.selectCharset("+"+c)),this._parser.registerEscHandler({intermediates:"-",final:c},()=>this.selectCharset("-"+c)),this._parser.registerEscHandler({intermediates:".",final:c},()=>this.selectCharset("."+c)),this._parser.registerEscHandler({intermediates:"/",final:c},()=>this.selectCharset("/"+c));this._parser.registerEscHandler({intermediates:"#",final:"8"},()=>this.screenAlignmentPattern()),this._parser.setErrorHandler(c=>(this._logService.error("Parsing error: ",c),c)),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new a_((c,u)=>this.requestStatusString(c,u)))}getAttrData(){return this._curAttrData}_preserveStack(e,t,i,n){this._parseStack.paused=!0,this._parseStack.cursorStartX=e,this._parseStack.cursorStartY=t,this._parseStack.decodedLength=i,this._parseStack.position=n}_logSlowResolvingAsync(e){this._logService.logLevel<=3&&Promise.race([e,new Promise((t,i)=>setTimeout(()=>i("#SLOW_TIMEOUT"),u_))]).catch(t=>{if(t!=="#SLOW_TIMEOUT")throw t;console.warn(`async parser handler taking longer than ${u_} ms`)})}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(e,t){let i,n=this._activeBuffer.x,r=this._activeBuffer.y,s=0,a=this._parseStack.paused;if(a){if(i=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,t))return this._logSlowResolvingAsync(i),i;n=this._parseStack.cursorStartX,r=this._parseStack.cursorStartY,this._parseStack.paused=!1,e.length>wr&&(s=this._parseStack.position+wr)}if(this._logService.logLevel<=1&&this._logService.debug(`parsing data ${typeof e=="string"?` "${e}"`:` "${Array.prototype.map.call(e,c=>String.fromCharCode(c)).join("")}"`}`),this._logService.logLevel===0&&this._logService.trace("parsing data (codes)",typeof e=="string"?e.split("").map(c=>c.charCodeAt(0)):e),this._parseBuffer.length<e.length&&this._parseBuffer.length<wr&&(this._parseBuffer=new Uint32Array(Math.min(e.length,wr))),a||this._dirtyRowTracker.clearRange(),e.length>wr)for(let c=s;c<e.length;c+=wr){let u=c+wr<e.length?c+wr:e.length,d=typeof e=="string"?this._stringDecoder.decode(e.substring(c,u),this._parseBuffer):this._utf8Decoder.decode(e.subarray(c,u),this._parseBuffer);if(i=this._parser.parse(this._parseBuffer,d))return this._preserveStack(n,r,d,c),this._logSlowResolvingAsync(i),i}else if(!a){let c=typeof e=="string"?this._stringDecoder.decode(e,this._parseBuffer):this._utf8Decoder.decode(e,this._parseBuffer);if(i=this._parser.parse(this._parseBuffer,c))return this._preserveStack(n,r,c,0),this._logSlowResolvingAsync(i),i}(this._activeBuffer.x!==n||this._activeBuffer.y!==r)&&this._onCursorMove.fire();let l=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),o=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);o<this._bufferService.rows&&this._onRequestRefreshRows.fire({start:Math.min(o,this._bufferService.rows-1),end:Math.min(l,this._bufferService.rows-1)})}print(e,t,i){let n,r,s=this._charsetService.charset,a=this._optionsService.rawOptions.screenReaderMode,l=this._bufferService.cols,o=this._coreService.decPrivateModes.wraparound,c=this._coreService.modes.insertMode,u=this._curAttrData,d=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&i-t>0&&d.getWidth(this._activeBuffer.x-1)===2&&d.setCellFromCodepoint(this._activeBuffer.x-1,0,1,u);let h=this._parser.precedingJoinState;for(let f=t;f<i;++f){if(n=e[f],n<127&&s){let _=s[String.fromCharCode(n)];_&&(n=_.charCodeAt(0))}let v=this._unicodeService.charProperties(n,h);r=hs.extractWidth(v);let p=hs.extractShouldJoin(v),w=p?hs.extractWidth(h):0;if(h=v,a&&this._onA11yChar.fire($r(n)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+r-w>l){if(o){let _=d,y=this._activeBuffer.x-w;for(this._activeBuffer.x=w,this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData(),!0)):(this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),d=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),w>0&&d instanceof Ql&&d.copyCellsFrom(_,y,0,w,!1);y<l;)_.setCellFromCodepoint(y++,0,1,u)}else if(this._activeBuffer.x=l-1,r===2)continue}if(p&&this._activeBuffer.x){let _=d.getWidth(this._activeBuffer.x-1)?1:2;d.addCodepointToCell(this._activeBuffer.x-_,n,r);for(let y=r-w;--y>=0;)d.setCellFromCodepoint(this._activeBuffer.x++,0,0,u);continue}if(c&&(d.insertCells(this._activeBuffer.x,r-w,this._activeBuffer.getNullCell(u)),d.getWidth(l-1)===2&&d.setCellFromCodepoint(l-1,0,1,u)),d.setCellFromCodepoint(this._activeBuffer.x++,n,r,u),r>0)for(;--r;)d.setCellFromCodepoint(this._activeBuffer.x++,0,0,u)}this._parser.precedingJoinState=h,this._activeBuffer.x<l&&i-t>0&&d.getWidth(this._activeBuffer.x)===0&&!d.hasContent(this._activeBuffer.x)&&d.setCellFromCodepoint(this._activeBuffer.x,0,1,u),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(e,t){return e.final==="t"&&!e.prefix&&!e.intermediates?this._parser.registerCsiHandler(e,i=>c_(i.params[0],this._optionsService.rawOptions.windowOptions)?t(i):!0):this._parser.registerCsiHandler(e,t)}registerDcsHandler(e,t){return this._parser.registerDcsHandler(e,new a_(t))}registerEscHandler(e,t){return this._parser.registerEscHandler(e,t)}registerOscHandler(e,t){return this._parser.registerOscHandler(e,new Zi(t))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows?this._activeBuffer.y=this._bufferService.rows-1:this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){var e;if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),this._activeBuffer.x>0&&this._activeBuffer.x--,!0;if(this._restrictCursor(this._bufferService.cols),this._activeBuffer.x>0)this._activeBuffer.x--;else if(this._activeBuffer.x===0&&this._activeBuffer.y>this._activeBuffer.scrollTop&&this._activeBuffer.y<=this._activeBuffer.scrollBottom&&((e=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&e.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;let t=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);t.hasWidth(this._activeBuffer.x)&&!t.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let e=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-e),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(e=this._bufferService.cols-1){this._activeBuffer.x=Math.min(e,Math.max(0,this._activeBuffer.x)),this._activeBuffer.y=this._coreService.decPrivateModes.origin?Math.min(this._activeBuffer.scrollBottom,Math.max(this._activeBuffer.scrollTop,this._activeBuffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._activeBuffer.y)),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_setCursor(e,t){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=e,this._activeBuffer.y=this._activeBuffer.scrollTop+t):(this._activeBuffer.x=e,this._activeBuffer.y=t),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(e,t){this._restrictCursor(),this._setCursor(this._activeBuffer.x+e,this._activeBuffer.y+t)}cursorUp(e){let t=this._activeBuffer.y-this._activeBuffer.scrollTop;return t>=0?this._moveCursor(0,-Math.min(t,e.params[0]||1)):this._moveCursor(0,-(e.params[0]||1)),!0}cursorDown(e){let t=this._activeBuffer.scrollBottom-this._activeBuffer.y;return t>=0?this._moveCursor(0,Math.min(t,e.params[0]||1)):this._moveCursor(0,e.params[0]||1),!0}cursorForward(e){return this._moveCursor(e.params[0]||1,0),!0}cursorBackward(e){return this._moveCursor(-(e.params[0]||1),0),!0}cursorNextLine(e){return this.cursorDown(e),this._activeBuffer.x=0,!0}cursorPrecedingLine(e){return this.cursorUp(e),this._activeBuffer.x=0,!0}cursorCharAbsolute(e){return this._setCursor((e.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(e){return this._setCursor(e.length>=2?(e.params[1]||1)-1:0,(e.params[0]||1)-1),!0}charPosAbsolute(e){return this._setCursor((e.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(e){return this._moveCursor(e.params[0]||1,0),!0}linePosAbsolute(e){return this._setCursor(this._activeBuffer.x,(e.params[0]||1)-1),!0}vPositionRelative(e){return this._moveCursor(0,e.params[0]||1),!0}hVPosition(e){return this.cursorPosition(e),!0}tabClear(e){let t=e.params[0];return t===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:t===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(e){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let t=e.params[0]||1;for(;t--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(e){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let t=e.params[0]||1;for(;t--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(e){let t=e.params[0];return t===1&&(this._curAttrData.bg|=536870912),(t===2||t===0)&&(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(e,t,i,n=!1,r=!1){let s=this._activeBuffer.lines.get(this._activeBuffer.ybase+e);s.replaceCells(t,i,this._activeBuffer.getNullCell(this._eraseAttrData()),r),n&&(s.isWrapped=!1)}_resetBufferLine(e,t=!1){let i=this._activeBuffer.lines.get(this._activeBuffer.ybase+e);i&&(i.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),t),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+e),i.isWrapped=!1)}eraseInDisplay(e,t=!1){var n;this._restrictCursor(this._bufferService.cols);let i;switch(e.params[0]){case 0:for(i=this._activeBuffer.y,this._dirtyRowTracker.markDirty(i),this._eraseInBufferLine(i++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,t);i<this._bufferService.rows;i++)this._resetBufferLine(i,t);this._dirtyRowTracker.markDirty(i);break;case 1:for(i=this._activeBuffer.y,this._dirtyRowTracker.markDirty(i),this._eraseInBufferLine(i,0,this._activeBuffer.x+1,!0,t),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(i+1).isWrapped=!1);i--;)this._resetBufferLine(i,t);this._dirtyRowTracker.markDirty(0);break;case 2:if(this._optionsService.rawOptions.scrollOnEraseInDisplay){for(i=this._bufferService.rows,this._dirtyRowTracker.markRangeDirty(0,i-1);i--&&!((n=this._activeBuffer.lines.get(this._activeBuffer.ybase+i))!=null&&n.getTrimmedLength()););for(;i>=0;i--)this._bufferService.scroll(this._eraseAttrData())}else{for(i=this._bufferService.rows,this._dirtyRowTracker.markDirty(i-1);i--;)this._resetBufferLine(i,t);this._dirtyRowTracker.markDirty(0)}break;case 3:let r=this._activeBuffer.lines.length-this._bufferService.rows;r>0&&(this._activeBuffer.lines.trimStart(r),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-r,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-r,0),this._onScroll.fire(0));break}return!0}eraseInLine(e,t=!1){switch(this._restrictCursor(this._bufferService.cols),e.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,t);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,t);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,t);break}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(e){this._restrictCursor();let t=e.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let i=this._activeBuffer.ybase+this._activeBuffer.y,n=this._bufferService.rows-1-this._activeBuffer.scrollBottom,r=this._bufferService.rows-1+this._activeBuffer.ybase-n+1;for(;t--;)this._activeBuffer.lines.splice(r-1,1),this._activeBuffer.lines.splice(i,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(e){this._restrictCursor();let t=e.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let i=this._activeBuffer.ybase+this._activeBuffer.y,n;for(n=this._bufferService.rows-1-this._activeBuffer.scrollBottom,n=this._bufferService.rows-1+this._activeBuffer.ybase-n;t--;)this._activeBuffer.lines.splice(i,1),this._activeBuffer.lines.splice(n,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(e){this._restrictCursor();let t=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return t&&(t.insertCells(this._activeBuffer.x,e.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(e){this._restrictCursor();let t=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return t&&(t.deleteCells(this._activeBuffer.x,e.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(e){let t=e.params[0]||1;for(;t--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollDown(e){let t=e.params[0]||1;for(;t--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,0,this._activeBuffer.getBlankLine(jt));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let t=e.params[0]||1;for(let i=this._activeBuffer.scrollTop;i<=this._activeBuffer.scrollBottom;++i){let n=this._activeBuffer.lines.get(this._activeBuffer.ybase+i);n.deleteCells(0,t,this._activeBuffer.getNullCell(this._eraseAttrData())),n.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let t=e.params[0]||1;for(let i=this._activeBuffer.scrollTop;i<=this._activeBuffer.scrollBottom;++i){let n=this._activeBuffer.lines.get(this._activeBuffer.ybase+i);n.insertCells(0,t,this._activeBuffer.getNullCell(this._eraseAttrData())),n.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let t=e.params[0]||1;for(let i=this._activeBuffer.scrollTop;i<=this._activeBuffer.scrollBottom;++i){let n=this._activeBuffer.lines.get(this._activeBuffer.ybase+i);n.insertCells(this._activeBuffer.x,t,this._activeBuffer.getNullCell(this._eraseAttrData())),n.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let t=e.params[0]||1;for(let i=this._activeBuffer.scrollTop;i<=this._activeBuffer.scrollBottom;++i){let n=this._activeBuffer.lines.get(this._activeBuffer.ybase+i);n.deleteCells(this._activeBuffer.x,t,this._activeBuffer.getNullCell(this._eraseAttrData())),n.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(e){this._restrictCursor();let t=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return t&&(t.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(e.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(e){let t=this._parser.precedingJoinState;if(!t)return!0;let i=e.params[0]||1,n=hs.extractWidth(t),r=this._activeBuffer.x-n,s=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(r),a=new Uint32Array(s.length*i),l=0;for(let c=0;c<s.length;){let u=s.codePointAt(c)||0;a[l++]=u,c+=u>65535?2:1}let o=l;for(let c=1;c<i;++c)a.copyWithin(o,0,l),o+=l;return this.print(a,0,o),!0}sendDeviceAttributesPrimary(e){return e.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(Ae.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(Ae.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(e){return e.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(Ae.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(Ae.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(e.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(Ae.ESC+"[>83;40003;0c")),!0}_is(e){return(this._optionsService.rawOptions.termName+"").indexOf(e)===0}setMode(e){for(let t=0;t<e.length;t++)switch(e.params[t]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0;break}return!0}setModePrivate(e){for(let t=0;t<e.length;t++)switch(e.params[t]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,ss),this._charsetService.setgCharset(1,ss),this._charsetService.setgCharset(2,ss),this._charsetService.setgCharset(3,ss);break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:this._optionsService.options.cursorBlink=!0;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0,this._onRequestSendFocus.fire();break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="SGR_PIXELS";break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(void 0),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0;break;case 2026:this._coreService.decPrivateModes.synchronizedOutput=!0;break}return!0}resetMode(e){for(let t=0;t<e.length;t++)switch(e.params[t]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1;break}return!0}resetModePrivate(e){for(let t=0;t<e.length;t++)switch(e.params[t]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:this._optionsService.options.cursorBlink=!1;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="DEFAULT";break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),e.params[t]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(void 0),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1;break;case 2026:this._coreService.decPrivateModes.synchronizedOutput=!1,this._onRequestRefreshRows.fire(void 0);break}return!0}requestMode(e,t){(p=>(p[p.NOT_RECOGNIZED=0]="NOT_RECOGNIZED",p[p.SET=1]="SET",p[p.RESET=2]="RESET",p[p.PERMANENTLY_SET=3]="PERMANENTLY_SET",p[p.PERMANENTLY_RESET=4]="PERMANENTLY_RESET"))(void 0||(i={}));let n=this._coreService.decPrivateModes,{activeProtocol:r,activeEncoding:s}=this._coreMouseService,a=this._coreService,{buffers:l,cols:o}=this._bufferService,{active:c,alt:u}=l,d=this._optionsService.rawOptions,h=(p,w)=>(a.triggerDataEvent(`${Ae.ESC}[${t?"":"?"}${p};${w}$y`),!0),f=p=>p?1:2,v=e.params[0];return t?v===2?h(v,4):v===4?h(v,f(a.modes.insertMode)):v===12?h(v,3):v===20?h(v,f(d.convertEol)):h(v,0):v===1?h(v,f(n.applicationCursorKeys)):v===3?h(v,d.windowOptions.setWinLines?o===80?2:o===132?1:0:0):v===6?h(v,f(n.origin)):v===7?h(v,f(n.wraparound)):v===8?h(v,3):v===9?h(v,f(r==="X10")):v===12?h(v,f(d.cursorBlink)):v===25?h(v,f(!a.isCursorHidden)):v===45?h(v,f(n.reverseWraparound)):v===66?h(v,f(n.applicationKeypad)):v===67?h(v,4):v===1e3?h(v,f(r==="VT200")):v===1002?h(v,f(r==="DRAG")):v===1003?h(v,f(r==="ANY")):v===1004?h(v,f(n.sendFocus)):v===1005?h(v,4):v===1006?h(v,f(s==="SGR")):v===1015?h(v,4):v===1016?h(v,f(s==="SGR_PIXELS")):v===1048?h(v,1):v===47||v===1047||v===1049?h(v,f(c===u)):v===2004?h(v,f(n.bracketedPasteMode)):v===2026?h(v,f(n.synchronizedOutput)):h(v,0)}_updateAttrColor(e,t,i,n,r){return t===2?(e|=50331648,e&=-16777216,e|=n0.fromColorRGB([i,n,r])):t===5&&(e&=-50331904,e|=33554432|i&255),e}_extractColor(e,t,i){let n=[0,0,-1,0,0,0],r=0,s=0;do{if(n[s+r]=e.params[t+s],e.hasSubParams(t+s)){let a=e.getSubParams(t+s),l=0;do n[1]===5&&(r=1),n[s+l+1+r]=a[l];while(++l<a.length&&l+s+1+r<n.length);break}if(n[1]===5&&s+r>=2||n[1]===2&&s+r>=5)break;n[1]&&(r=1)}while(++s+t<e.length&&s+r<n.length);for(let a=2;a<n.length;++a)n[a]===-1&&(n[a]=0);switch(n[0]){case 38:i.fg=this._updateAttrColor(i.fg,n[1],n[3],n[4],n[5]);break;case 48:i.bg=this._updateAttrColor(i.bg,n[1],n[3],n[4],n[5]);break;case 58:i.extended=i.extended.clone(),i.extended.underlineColor=this._updateAttrColor(i.extended.underlineColor,n[1],n[3],n[4],n[5])}return s}_processUnderline(e,t){t.extended=t.extended.clone(),(!~e||e>5)&&(e=1),t.extended.underlineStyle=e,t.fg|=268435456,e===0&&(t.fg&=-268435457),t.updateExtended()}_processSGR0(e){e.fg=jt.fg,e.bg=jt.bg,e.extended=e.extended.clone(),e.extended.underlineStyle=0,e.extended.underlineColor&=-67108864,e.updateExtended()}charAttributes(e){if(e.length===1&&e.params[0]===0)return this._processSGR0(this._curAttrData),!0;let t=e.length,i,n=this._curAttrData;for(let r=0;r<t;r++)i=e.params[r],i>=30&&i<=37?(n.fg&=-50331904,n.fg|=16777216|i-30):i>=40&&i<=47?(n.bg&=-50331904,n.bg|=16777216|i-40):i>=90&&i<=97?(n.fg&=-50331904,n.fg|=16777216|i-90|8):i>=100&&i<=107?(n.bg&=-50331904,n.bg|=16777216|i-100|8):i===0?this._processSGR0(n):i===1?n.fg|=134217728:i===3?n.bg|=67108864:i===4?(n.fg|=268435456,this._processUnderline(e.hasSubParams(r)?e.getSubParams(r)[0]:1,n)):i===5?n.fg|=536870912:i===7?n.fg|=67108864:i===8?n.fg|=1073741824:i===9?n.fg|=2147483648:i===2?n.bg|=134217728:i===21?this._processUnderline(2,n):i===22?(n.fg&=-134217729,n.bg&=-134217729):i===23?n.bg&=-67108865:i===24?(n.fg&=-268435457,this._processUnderline(0,n)):i===25?n.fg&=-536870913:i===27?n.fg&=-67108865:i===28?n.fg&=-1073741825:i===29?n.fg&=2147483647:i===39?(n.fg&=-67108864,n.fg|=jt.fg&16777215):i===49?(n.bg&=-67108864,n.bg|=jt.bg&16777215):i===38||i===48||i===58?r+=this._extractColor(e,r,n):i===53?n.bg|=1073741824:i===55?n.bg&=-1073741825:i===59?(n.extended=n.extended.clone(),n.extended.underlineColor=-1,n.updateExtended()):i===100?(n.fg&=-67108864,n.fg|=jt.fg&16777215,n.bg&=-67108864,n.bg|=jt.bg&16777215):this._logService.debug("Unknown SGR attribute: %d.",i);return!0}deviceStatus(e){switch(e.params[0]){case 5:this._coreService.triggerDataEvent(`${Ae.ESC}[0n`);break;case 6:let t=this._activeBuffer.y+1,i=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${Ae.ESC}[${t};${i}R`);break}return!0}deviceStatusPrivate(e){switch(e.params[0]){case 6:let t=this._activeBuffer.y+1,i=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${Ae.ESC}[?${t};${i}R`);break}return!0}softReset(e){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=jt.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0}setCursorStyle(e){let t=e.length===0?1:e.params[0];if(t===0)this._coreService.decPrivateModes.cursorStyle=void 0,this._coreService.decPrivateModes.cursorBlink=void 0;else{switch(t){case 1:case 2:this._coreService.decPrivateModes.cursorStyle="block";break;case 3:case 4:this._coreService.decPrivateModes.cursorStyle="underline";break;case 5:case 6:this._coreService.decPrivateModes.cursorStyle="bar";break}let i=t%2===1;this._coreService.decPrivateModes.cursorBlink=i}return!0}setScrollRegion(e){let t=e.params[0]||1,i;return(e.length<2||(i=e.params[1])>this._bufferService.rows||i===0)&&(i=this._bufferService.rows),i>t&&(this._activeBuffer.scrollTop=t-1,this._activeBuffer.scrollBottom=i-1,this._setCursor(0,0)),!0}windowOptions(e){if(!c_(e.params[0],this._optionsService.rawOptions.windowOptions))return!0;let t=e.length>1?e.params[1]:0;switch(e.params[0]){case 14:t!==2&&this._onRequestWindowsOptionsReport.fire(0);break;case 16:this._onRequestWindowsOptionsReport.fire(1);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${Ae.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:(t===0||t===2)&&(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>o_&&this._windowTitleStack.shift()),(t===0||t===1)&&(this._iconNameStack.push(this._iconName),this._iconNameStack.length>o_&&this._iconNameStack.shift());break;case 23:(t===0||t===2)&&this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),(t===0||t===1)&&this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop());break}return!0}saveCursor(e){return this._activeBuffer.savedX=this._activeBuffer.x,this._activeBuffer.savedY=this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,!0}restoreCursor(e){return this._activeBuffer.x=this._activeBuffer.savedX||0,this._activeBuffer.y=Math.max(this._activeBuffer.savedY-this._activeBuffer.ybase,0),this._curAttrData.fg=this._activeBuffer.savedCurAttrData.fg,this._curAttrData.bg=this._activeBuffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._activeBuffer.savedCharset&&(this._charsetService.charset=this._activeBuffer.savedCharset),this._restrictCursor(),!0}setTitle(e){return this._windowTitle=e,this._onTitleChange.fire(e),!0}setIconName(e){return this._iconName=e,!0}setOrReportIndexedColor(e){let t=[],i=e.split(";");for(;i.length>1;){let n=i.shift(),r=i.shift();if(/^\d+$/.exec(n)){let s=parseInt(n);if(h_(s))if(r==="?")t.push({type:0,index:s});else{let a=l_(r);a&&t.push({type:1,index:s,color:a})}}}return t.length&&this._onColor.fire(t),!0}setHyperlink(e){let t=e.indexOf(";");if(t===-1)return!0;let i=e.slice(0,t).trim(),n=e.slice(t+1);return n?this._createHyperlink(i,n):i.trim()?!1:this._finishHyperlink()}_createHyperlink(e,t){this._getCurrentLinkId()&&this._finishHyperlink();let i=e.split(":"),n,r=i.findIndex(s=>s.startsWith("id="));return r!==-1&&(n=i[r].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:n,uri:t}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(e,t){let i=e.split(";");for(let n=0;n<i.length&&!(t>=this._specialColors.length);++n,++t)if(i[n]==="?")this._onColor.fire([{type:0,index:this._specialColors[t]}]);else{let r=l_(i[n]);r&&this._onColor.fire([{type:1,index:this._specialColors[t],color:r}])}return!0}setOrReportFgColor(e){return this._setOrReportSpecialColor(e,0)}setOrReportBgColor(e){return this._setOrReportSpecialColor(e,1)}setOrReportCursorColor(e){return this._setOrReportSpecialColor(e,2)}restoreIndexedColor(e){if(!e)return this._onColor.fire([{type:2}]),!0;let t=[],i=e.split(";");for(let n=0;n<i.length;++n)if(/^\d+$/.exec(i[n])){let r=parseInt(i[n]);h_(r)&&t.push({type:2,index:r})}return t.length&&this._onColor.fire(t),!0}restoreFgColor(e){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(e){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(e){return this._onColor.fire([{type:2,index:258}]),!0}nextLine(){return this._activeBuffer.x=0,this.index(),!0}keypadApplicationMode(){return this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire(),!0}keypadNumericMode(){return this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire(),!0}selectDefaultCharset(){return this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,ss),!0}selectCharset(e){return e.length!==2?(this.selectDefaultCharset(),!0):(e[0]==="/"||this._charsetService.setgCharset(mq[e[0]],ni[e[1]]||ss),!0)}index(){return this._restrictCursor(),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){let e=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,e,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0}fullReset(){return this._parser.reset(),this._onRequestReset.fire(),!0}reset(){this._curAttrData=jt.clone(),this._eraseAttrDataInternal=jt.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=this._curAttrData.bg&67108863,this._eraseAttrDataInternal}setgLevel(e){return this._charsetService.setgLevel(e),!0}screenAlignmentPattern(){let e=new ln;e.content=1<<22|69,e.fg=this._curAttrData.fg,e.bg=this._curAttrData.bg,this._setCursor(0,0);for(let t=0;t<this._bufferService.rows;++t){let i=this._activeBuffer.ybase+this._activeBuffer.y+t,n=this._activeBuffer.lines.get(i);n&&(n.fill(e),n.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(e,t){let i=a=>(this._coreService.triggerDataEvent(`${Ae.ESC}${a}${Ae.ESC}\\`),!0),n=this._bufferService.buffer,r=this._optionsService.rawOptions;return i(e==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:e==='"p'?'P1$r61;1"p':e==="r"?`P1$r${n.scrollTop+1};${n.scrollBottom+1}r`:e==="m"?"P1$r0m":e===" q"?`P1$r${{block:2,underline:4,bar:6}[r.cursorStyle]-(r.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(e,t){this._dirtyRowTracker.markRangeDirty(e,t)}},mh=class{constructor(e){this._bufferService=e,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(e){e<this.start?this.start=e:e>this.end&&(this.end=e)}markRangeDirty(e,t){e>t&&(d_=e,e=t,t=d_),e<this.start&&(this.start=e),t>this.end&&(this.end=t)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};mh=Ot([Pe(0,Ti)],mh);function h_(e){return 0<=e&&e<256}var gq=5e7,f_=12,bq=50,yq=class extends Qe{constructor(e){super(),this._action=e,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this._register(new He),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(e,t){if(t!==void 0&&this._syncCalls>t){this._syncCalls=0;return}if(this._pendingData+=e.length,this._writeBuffer.push(e),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;this._isSyncWriting=!0;let i;for(;i=this._writeBuffer.shift();){this._action(i);let n=this._callbacks.shift();n&&n()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(e,t){if(this._pendingData>gq)throw new Error("write data discarded, use flow control to avoid losing data");if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput){this._didUserInput=!1,this._pendingData+=e.length,this._writeBuffer.push(e),this._callbacks.push(t),this._innerWrite();return}setTimeout(()=>this._innerWrite())}this._pendingData+=e.length,this._writeBuffer.push(e),this._callbacks.push(t)}_innerWrite(e=0,t=!0){let i=e||performance.now();for(;this._writeBuffer.length>this._bufferOffset;){let n=this._writeBuffer[this._bufferOffset],r=this._action(n,t);if(r){let a=l=>performance.now()-i>=f_?setTimeout(()=>this._innerWrite(0,l)):this._innerWrite(i,l);r.catch(l=>(queueMicrotask(()=>{throw l}),Promise.resolve(!1))).then(a);return}let s=this._callbacks[this._bufferOffset];if(s&&s(),this._bufferOffset++,this._pendingData-=n.length,performance.now()-i>=f_)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>bq&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout(()=>this._innerWrite())):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()}},vh=class{constructor(e){this._bufferService=e,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(e){let t=this._bufferService.buffer;if(e.id===void 0){let l=t.addMarker(t.ybase+t.y),o={data:e,id:this._nextId++,lines:[l]};return l.onDispose(()=>this._removeMarkerFromLink(o,l)),this._dataByLinkId.set(o.id,o),o.id}let i=e,n=this._getEntryIdKey(i),r=this._entriesWithId.get(n);if(r)return this.addLineToLink(r.id,t.ybase+t.y),r.id;let s=t.addMarker(t.ybase+t.y),a={id:this._nextId++,key:this._getEntryIdKey(i),data:i,lines:[s]};return s.onDispose(()=>this._removeMarkerFromLink(a,s)),this._entriesWithId.set(a.key,a),this._dataByLinkId.set(a.id,a),a.id}addLineToLink(e,t){let i=this._dataByLinkId.get(e);if(i&&i.lines.every(n=>n.line!==t)){let n=this._bufferService.buffer.addMarker(t);i.lines.push(n),n.onDispose(()=>this._removeMarkerFromLink(i,n))}}getLinkData(e){var t;return(t=this._dataByLinkId.get(e))==null?void 0:t.data}_getEntryIdKey(e){return`${e.id};;${e.uri}`}_removeMarkerFromLink(e,t){let i=e.lines.indexOf(t);i!==-1&&(e.lines.splice(i,1),e.lines.length===0&&(e.data.id!==void 0&&this._entriesWithId.delete(e.key),this._dataByLinkId.delete(e.id)))}};vh=Ot([Pe(0,Ti)],vh);var p_=!1,wq=class extends Qe{constructor(e){super(),this._windowsWrappingHeuristics=this._register(new ca),this._onBinary=this._register(new He),this.onBinary=this._onBinary.event,this._onData=this._register(new He),this.onData=this._onData.event,this._onLineFeed=this._register(new He),this.onLineFeed=this._onLineFeed.event,this._onResize=this._register(new He),this.onResize=this._onResize.event,this._onWriteParsed=this._register(new He),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this._register(new He),this._instantiationService=new WK,this.optionsService=this._register(new tq(e)),this._instantiationService.setService(Ni,this.optionsService),this._bufferService=this._register(this._instantiationService.createInstance(hh)),this._instantiationService.setService(Ti,this._bufferService),this._logService=this._register(this._instantiationService.createInstance(dh)),this._instantiationService.setService(Sb,this._logService),this.coreService=this._register(this._instantiationService.createInstance(fh)),this._instantiationService.setService($s,this.coreService),this.coreMouseService=this._register(this._instantiationService.createInstance(ph)),this._instantiationService.setService(wb,this.coreMouseService),this.unicodeService=this._register(this._instantiationService.createInstance(hs)),this._instantiationService.setService(BW,this.unicodeService),this._charsetService=this._instantiationService.createInstance(aq),this._instantiationService.setService(ZW,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(vh),this._instantiationService.setService(Cb,this._oscLinkService),this._inputHandler=this._register(new vq(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this._register(pi.forward(this._inputHandler.onLineFeed,this._onLineFeed)),this._register(this._inputHandler),this._register(pi.forward(this._bufferService.onResize,this._onResize)),this._register(pi.forward(this.coreService.onData,this._onData)),this._register(pi.forward(this.coreService.onBinary,this._onBinary)),this._register(this.coreService.onRequestScrollToBottom(()=>this.scrollToBottom(!0))),this._register(this.coreService.onUserInput(()=>this._writeBuffer.handleUserInput())),this._register(this.optionsService.onMultipleOptionChange(["windowsMode","windowsPty"],()=>this._handleWindowsPtyOptionChange())),this._register(this._bufferService.onScroll(()=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)})),this._writeBuffer=this._register(new yq((t,i)=>this._inputHandler.parse(t,i))),this._register(pi.forward(this._writeBuffer.onWriteParsed,this._onWriteParsed))}get onScroll(){return this._onScrollApi||(this._onScrollApi=this._register(new He),this._onScroll.event(e=>{var t;(t=this._onScrollApi)==null||t.fire(e.position)})),this._onScrollApi.event}get cols(){return this._bufferService.cols}get rows(){return this._bufferService.rows}get buffers(){return this._bufferService.buffers}get options(){return this.optionsService.options}set options(e){for(let t in e)this.optionsService.options[t]=e[t]}write(e,t){this._writeBuffer.write(e,t)}writeSync(e,t){this._logService.logLevel<=3&&!p_&&(this._logService.warn("writeSync is unreliable and will be removed soon."),p_=!0),this._writeBuffer.writeSync(e,t)}input(e,t=!0){this.coreService.triggerDataEvent(e,t)}resize(e,t){isNaN(e)||isNaN(t)||(e=Math.max(e,t5),t=Math.max(t,i5),this._bufferService.resize(e,t))}scroll(e,t=!1){this._bufferService.scroll(e,t)}scrollLines(e,t){this._bufferService.scrollLines(e,t)}scrollPages(e){this.scrollLines(e*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(e){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(e){let t=e-this._bufferService.buffer.ydisp;t!==0&&this.scrollLines(t)}registerEscHandler(e,t){return this._inputHandler.registerEscHandler(e,t)}registerDcsHandler(e,t){return this._inputHandler.registerDcsHandler(e,t)}registerCsiHandler(e,t){return this._inputHandler.registerCsiHandler(e,t)}registerOscHandler(e,t){return this._inputHandler.registerOscHandler(e,t)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let e=!1,t=this.optionsService.rawOptions.windowsPty;t&&t.buildNumber!==void 0&&t.buildNumber!==void 0?e=t.backend==="conpty"&&t.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(e=!0),e?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){let e=[];e.push(this.onLineFeed(s_.bind(null,this._bufferService))),e.push(this.registerCsiHandler({final:"H"},()=>(s_(this._bufferService),!1))),this._windowsWrappingHeuristics.value=$t(()=>{for(let t of e)t.dispose()})}}},Sq={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};function Cq(e,t,i,n){var a;let r={type:0,cancel:!1,key:void 0},s=(e.shiftKey?1:0)|(e.altKey?2:0)|(e.ctrlKey?4:0)|(e.metaKey?8:0);switch(e.keyCode){case 0:e.key==="UIKeyInputUpArrow"?t?r.key=Ae.ESC+"OA":r.key=Ae.ESC+"[A":e.key==="UIKeyInputLeftArrow"?t?r.key=Ae.ESC+"OD":r.key=Ae.ESC+"[D":e.key==="UIKeyInputRightArrow"?t?r.key=Ae.ESC+"OC":r.key=Ae.ESC+"[C":e.key==="UIKeyInputDownArrow"&&(t?r.key=Ae.ESC+"OB":r.key=Ae.ESC+"[B");break;case 8:r.key=e.ctrlKey?"\b":Ae.DEL,e.altKey&&(r.key=Ae.ESC+r.key);break;case 9:if(e.shiftKey){r.key=Ae.ESC+"[Z";break}r.key=Ae.HT,r.cancel=!0;break;case 13:r.key=e.altKey?Ae.ESC+Ae.CR:Ae.CR,r.cancel=!0;break;case 27:r.key=Ae.ESC,e.altKey&&(r.key=Ae.ESC+Ae.ESC),r.cancel=!0;break;case 37:if(e.metaKey)break;s?r.key=Ae.ESC+"[1;"+(s+1)+"D":t?r.key=Ae.ESC+"OD":r.key=Ae.ESC+"[D";break;case 39:if(e.metaKey)break;s?r.key=Ae.ESC+"[1;"+(s+1)+"C":t?r.key=Ae.ESC+"OC":r.key=Ae.ESC+"[C";break;case 38:if(e.metaKey)break;s?r.key=Ae.ESC+"[1;"+(s+1)+"A":t?r.key=Ae.ESC+"OA":r.key=Ae.ESC+"[A";break;case 40:if(e.metaKey)break;s?r.key=Ae.ESC+"[1;"+(s+1)+"B":t?r.key=Ae.ESC+"OB":r.key=Ae.ESC+"[B";break;case 45:!e.shiftKey&&!e.ctrlKey&&(r.key=Ae.ESC+"[2~");break;case 46:s?r.key=Ae.ESC+"[3;"+(s+1)+"~":r.key=Ae.ESC+"[3~";break;case 36:s?r.key=Ae.ESC+"[1;"+(s+1)+"H":t?r.key=Ae.ESC+"OH":r.key=Ae.ESC+"[H";break;case 35:s?r.key=Ae.ESC+"[1;"+(s+1)+"F":t?r.key=Ae.ESC+"OF":r.key=Ae.ESC+"[F";break;case 33:e.shiftKey?r.type=2:e.ctrlKey?r.key=Ae.ESC+"[5;"+(s+1)+"~":r.key=Ae.ESC+"[5~";break;case 34:e.shiftKey?r.type=3:e.ctrlKey?r.key=Ae.ESC+"[6;"+(s+1)+"~":r.key=Ae.ESC+"[6~";break;case 112:s?r.key=Ae.ESC+"[1;"+(s+1)+"P":r.key=Ae.ESC+"OP";break;case 113:s?r.key=Ae.ESC+"[1;"+(s+1)+"Q":r.key=Ae.ESC+"OQ";break;case 114:s?r.key=Ae.ESC+"[1;"+(s+1)+"R":r.key=Ae.ESC+"OR";break;case 115:s?r.key=Ae.ESC+"[1;"+(s+1)+"S":r.key=Ae.ESC+"OS";break;case 116:s?r.key=Ae.ESC+"[15;"+(s+1)+"~":r.key=Ae.ESC+"[15~";break;case 117:s?r.key=Ae.ESC+"[17;"+(s+1)+"~":r.key=Ae.ESC+"[17~";break;case 118:s?r.key=Ae.ESC+"[18;"+(s+1)+"~":r.key=Ae.ESC+"[18~";break;case 119:s?r.key=Ae.ESC+"[19;"+(s+1)+"~":r.key=Ae.ESC+"[19~";break;case 120:s?r.key=Ae.ESC+"[20;"+(s+1)+"~":r.key=Ae.ESC+"[20~";break;case 121:s?r.key=Ae.ESC+"[21;"+(s+1)+"~":r.key=Ae.ESC+"[21~";break;case 122:s?r.key=Ae.ESC+"[23;"+(s+1)+"~":r.key=Ae.ESC+"[23~";break;case 123:s?r.key=Ae.ESC+"[24;"+(s+1)+"~":r.key=Ae.ESC+"[24~";break;default:if(e.ctrlKey&&!e.shiftKey&&!e.altKey&&!e.metaKey)e.keyCode>=65&&e.keyCode<=90?r.key=String.fromCharCode(e.keyCode-64):e.keyCode===32?r.key=Ae.NUL:e.keyCode>=51&&e.keyCode<=55?r.key=String.fromCharCode(e.keyCode-51+27):e.keyCode===56?r.key=Ae.DEL:e.keyCode===219?r.key=Ae.ESC:e.keyCode===220?r.key=Ae.FS:e.keyCode===221&&(r.key=Ae.GS);else if((!i||n)&&e.altKey&&!e.metaKey){let l=(a=Sq[e.keyCode])==null?void 0:a[e.shiftKey?1:0];if(l)r.key=Ae.ESC+l;else if(e.keyCode>=65&&e.keyCode<=90){let o=e.ctrlKey?e.keyCode-64:e.keyCode+32,c=String.fromCharCode(o);e.shiftKey&&(c=c.toUpperCase()),r.key=Ae.ESC+c}else if(e.keyCode===32)r.key=Ae.ESC+(e.ctrlKey?Ae.NUL:" ");else if(e.key==="Dead"&&e.code.startsWith("Key")){let o=e.code.slice(3,4);e.shiftKey||(o=o.toLowerCase()),r.key=Ae.ESC+o,r.cancel=!0}}else i&&!e.altKey&&!e.ctrlKey&&!e.shiftKey&&e.metaKey?e.keyCode===65&&(r.type=1):e.key&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&e.keyCode>=48&&e.key.length===1?r.key=e.key:e.key&&e.ctrlKey&&(e.key==="_"&&(r.key=Ae.US),e.key==="@"&&(r.key=Ae.NUL));break}return r}var Vt=0,kq=class{constructor(e){this._getKey=e,this._array=[],this._insertedValues=[],this._flushInsertedTask=new Dc,this._isFlushingInserted=!1,this._deletedIndices=[],this._flushDeletedTask=new Dc,this._isFlushingDeleted=!1}clear(){this._array.length=0,this._insertedValues.length=0,this._flushInsertedTask.clear(),this._isFlushingInserted=!1,this._deletedIndices.length=0,this._flushDeletedTask.clear(),this._isFlushingDeleted=!1}insert(e){this._flushCleanupDeleted(),this._insertedValues.length===0&&this._flushInsertedTask.enqueue(()=>this._flushInserted()),this._insertedValues.push(e)}_flushInserted(){let e=this._insertedValues.sort((r,s)=>this._getKey(r)-this._getKey(s)),t=0,i=0,n=new Array(this._array.length+this._insertedValues.length);for(let r=0;r<n.length;r++)i>=this._array.length||this._getKey(e[t])<=this._getKey(this._array[i])?(n[r]=e[t],t++):n[r]=this._array[i++];this._array=n,this._insertedValues.length=0}_flushCleanupInserted(){!this._isFlushingInserted&&this._insertedValues.length>0&&this._flushInsertedTask.flush()}delete(e){if(this._flushCleanupInserted(),this._array.length===0)return!1;let t=this._getKey(e);if(t===void 0||(Vt=this._search(t),Vt===-1)||this._getKey(this._array[Vt])!==t)return!1;do if(this._array[Vt]===e)return this._deletedIndices.length===0&&this._flushDeletedTask.enqueue(()=>this._flushDeleted()),this._deletedIndices.push(Vt),!0;while(++Vt<this._array.length&&this._getKey(this._array[Vt])===t);return!1}_flushDeleted(){this._isFlushingDeleted=!0;let e=this._deletedIndices.sort((r,s)=>r-s),t=0,i=new Array(this._array.length-e.length),n=0;for(let r=0;r<this._array.length;r++)e[t]===r?t++:i[n++]=this._array[r];this._array=i,this._deletedIndices.length=0,this._isFlushingDeleted=!1}_flushCleanupDeleted(){!this._isFlushingDeleted&&this._deletedIndices.length>0&&this._flushDeletedTask.flush()}*getKeyIterator(e){if(this._flushCleanupInserted(),this._flushCleanupDeleted(),this._array.length!==0&&(Vt=this._search(e),!(Vt<0||Vt>=this._array.length)&&this._getKey(this._array[Vt])===e))do yield this._array[Vt];while(++Vt<this._array.length&&this._getKey(this._array[Vt])===e)}forEachByKey(e,t){if(this._flushCleanupInserted(),this._flushCleanupDeleted(),this._array.length!==0&&(Vt=this._search(e),!(Vt<0||Vt>=this._array.length)&&this._getKey(this._array[Vt])===e))do t(this._array[Vt]);while(++Vt<this._array.length&&this._getKey(this._array[Vt])===e)}values(){return this._flushCleanupInserted(),this._flushCleanupDeleted(),[...this._array].values()}_search(e){let t=0,i=this._array.length-1;for(;i>=t;){let n=t+i>>1,r=this._getKey(this._array[n]);if(r>e)i=n-1;else if(r<e)t=n+1;else{for(;n>0&&this._getKey(this._array[n-1])===e;)n--;return n}}return t}},ku=0,__=0,Aq=class extends Qe{constructor(){super(),this._decorations=new kq(e=>e==null?void 0:e.marker.line),this._onDecorationRegistered=this._register(new He),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this._register(new He),this.onDecorationRemoved=this._onDecorationRemoved.event,this._register($t(()=>this.reset()))}get decorations(){return this._decorations.values()}registerDecoration(e){if(e.marker.isDisposed)return;let t=new Mq(e);if(t){let i=t.marker.onDispose(()=>t.dispose()),n=t.onDispose(()=>{n.dispose(),t&&(this._decorations.delete(t)&&this._onDecorationRemoved.fire(t),i.dispose())});this._decorations.insert(t),this._onDecorationRegistered.fire(t)}return t}reset(){for(let e of this._decorations.values())e.dispose();this._decorations.clear()}*getDecorationsAtCell(e,t,i){let n=0,r=0;for(let s of this._decorations.getKeyIterator(t))n=s.options.x??0,r=n+(s.options.width??1),e>=n&&e<r&&(!i||(s.options.layer??"bottom")===i)&&(yield s)}forEachDecorationAtCell(e,t,i,n){this._decorations.forEachByKey(t,r=>{ku=r.options.x??0,__=ku+(r.options.width??1),e>=ku&&e<__&&(!i||(r.options.layer??"bottom")===i)&&n(r)})}},Mq=class extends Pr{constructor(e){super(),this.options=e,this.onRenderEmitter=this.add(new He),this.onRender=this.onRenderEmitter.event,this._onDispose=this.add(new He),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=e.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=Et.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=Et.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}dispose(){this._onDispose.fire(),super.dispose()}},$q=1e3,Lq=class{constructor(e,t=$q){this._renderCallback=e,this._debounceThresholdMS=t,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(e,t,i){this._rowCount=i,e=e!==void 0?e:0,t=t!==void 0?t:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,e):e,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,t):t;let n=performance.now();if(n-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=n,this._innerRefresh();else if(!this._additionalRefreshRequested){let r=n-this._lastRefreshMs,s=this._debounceThresholdMS-r;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout(()=>{this._lastRefreshMs=performance.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0},s)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;let e=Math.max(this._rowStart,0),t=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(e,t)}},m_=20,Zc=class extends Qe{constructor(e,t,i,n){super(),this._terminal=e,this._coreBrowserService=i,this._renderService=n,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="";let r=this._coreBrowserService.mainDocument;this._accessibilityContainer=r.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=r.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let s=0;s<this._terminal.rows;s++)this._rowElements[s]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[s]);if(this._topBoundaryFocusListener=s=>this._handleBoundaryFocus(s,0),this._bottomBoundaryFocusListener=s=>this._handleBoundaryFocus(s,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=r.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this._register(new Lq(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this._register(this._terminal.onResize(s=>this._handleResize(s.rows))),this._register(this._terminal.onRender(s=>this._refreshRows(s.start,s.end))),this._register(this._terminal.onScroll(()=>this._refreshRows())),this._register(this._terminal.onA11yChar(s=>this._handleChar(s))),this._register(this._terminal.onLineFeed(()=>this._handleChar(`
|
|
94
|
-
`))),this._register(this._terminal.onA11yTab(s=>this._handleTab(s))),this._register(this._terminal.onKey(s=>this._handleKey(s.key))),this._register(this._terminal.onBlur(()=>this._clearLiveRegion())),this._register(this._renderService.onDimensionsChange(()=>this._refreshRowsDimensions())),this._register(We(r,"selectionchange",()=>this._handleSelectionChange())),this._register(this._coreBrowserService.onDprChange(()=>this._refreshRowsDimensions())),this._refreshRowsDimensions(),this._refreshRows(),this._register($t(()=>{this._accessibilityContainer.remove(),this._rowElements.length=0}))}_handleTab(e){for(let t=0;t<e;t++)this._handleChar(" ")}_handleChar(e){this._liveRegionLineCount<m_+1&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==e&&(this._charsToAnnounce+=e):this._charsToAnnounce+=e,e===`
|
|
95
|
-
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===m_+1&&(this._liveRegion.textContent+=Rd.get())))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(e){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(e)||this._charsToConsume.push(e)}_refreshRows(e,t){this._liveRegionDebouncer.refresh(e,t,this._terminal.rows)}_renderRows(e,t){let i=this._terminal.buffer,n=i.lines.length.toString();for(let r=e;r<=t;r++){let s=i.lines.get(i.ydisp+r),a=[],l=(s==null?void 0:s.translateToString(!0,void 0,void 0,a))||"",o=(i.ydisp+r+1).toString(),c=this._rowElements[r];c&&(l.length===0?(c.textContent=" ",this._rowColumns.set(c,[0,1])):(c.textContent=l,this._rowColumns.set(c,a)),c.setAttribute("aria-posinset",o),c.setAttribute("aria-setsize",n),this._alignRowWidth(c))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(e,t){let i=e.target,n=this._rowElements[t===0?1:this._rowElements.length-2],r=i.getAttribute("aria-posinset"),s=t===0?"1":`${this._terminal.buffer.lines.length}`;if(r===s||e.relatedTarget!==n)return;let a,l;if(t===0?(a=i,l=this._rowElements.pop(),this._rowContainer.removeChild(l)):(a=this._rowElements.shift(),l=i,this._rowContainer.removeChild(a)),a.removeEventListener("focus",this._topBoundaryFocusListener),l.removeEventListener("focus",this._bottomBoundaryFocusListener),t===0){let o=this._createAccessibilityTreeNode();this._rowElements.unshift(o),this._rowContainer.insertAdjacentElement("afterbegin",o)}else{let o=this._createAccessibilityTreeNode();this._rowElements.push(o),this._rowContainer.appendChild(o)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(t===0?-1:1),this._rowElements[t===0?1:this._rowElements.length-2].focus(),e.preventDefault(),e.stopImmediatePropagation()}_handleSelectionChange(){var l;if(this._rowElements.length===0)return;let e=this._coreBrowserService.mainDocument.getSelection();if(!e)return;if(e.isCollapsed){this._rowContainer.contains(e.anchorNode)&&this._terminal.clearSelection();return}if(!e.anchorNode||!e.focusNode){console.error("anchorNode and/or focusNode are null");return}let t={node:e.anchorNode,offset:e.anchorOffset},i={node:e.focusNode,offset:e.focusOffset};if((t.node.compareDocumentPosition(i.node)&Node.DOCUMENT_POSITION_PRECEDING||t.node===i.node&&t.offset>i.offset)&&([t,i]=[i,t]),t.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(t={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(t.node))return;let n=this._rowElements.slice(-1)[0];if(i.node.compareDocumentPosition(n)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(i={node:n,offset:((l=n.textContent)==null?void 0:l.length)??0}),!this._rowContainer.contains(i.node))return;let r=({node:o,offset:c})=>{let u=o instanceof Text?o.parentNode:o,d=parseInt(u==null?void 0:u.getAttribute("aria-posinset"),10)-1;if(isNaN(d))return console.warn("row is invalid. Race condition?"),null;let h=this._rowColumns.get(u);if(!h)return console.warn("columns is null. Race condition?"),null;let f=c<h.length?h[c]:h.slice(-1)[0]+1;return f>=this._terminal.cols&&(++d,f=0),{row:d,column:f}},s=r(t),a=r(i);if(!(!s||!a)){if(s.row>a.row||s.row===a.row&&s.column>=a.column)throw new Error("invalid range");this._terminal.select(s.column,s.row,(a.row-s.row)*this._terminal.cols-s.column+a.column)}}_handleResize(e){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let t=this._rowContainer.children.length;t<this._terminal.rows;t++)this._rowElements[t]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[t]);for(;this._rowElements.length>e;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){let e=this._coreBrowserService.mainDocument.createElement("div");return e.setAttribute("role","listitem"),e.tabIndex=-1,this._refreshRowDimensions(e),e}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){Object.assign(this._accessibilityContainer.style,{width:`${this._renderService.dimensions.css.canvas.width}px`,fontSize:`${this._terminal.options.fontSize}px`}),this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let e=0;e<this._terminal.rows;e++)this._refreshRowDimensions(this._rowElements[e]),this._alignRowWidth(this._rowElements[e])}}_refreshRowDimensions(e){e.style.height=`${this._renderService.dimensions.css.cell.height}px`}_alignRowWidth(e){var r,s;e.style.transform="";let t=e.getBoundingClientRect().width,i=(s=(r=this._rowColumns.get(e))==null?void 0:r.slice(-1))==null?void 0:s[0];if(!i)return;let n=i*this._renderService.dimensions.css.cell.width;e.style.transform=`scaleX(${n/t})`}};Zc=Ot([Pe(1,P2),Pe(2,pr),Pe(3,_r)],Zc);var gh=class extends Qe{constructor(e,t,i,n,r){super(),this._element=e,this._mouseService=t,this._renderService=i,this._bufferService=n,this._linkProviderService=r,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this._register(new He),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this._register(new He),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this._register($t(()=>{var s;ys(this._linkCacheDisposables),this._linkCacheDisposables.length=0,this._lastMouseEvent=void 0,(s=this._activeProviderReplies)==null||s.clear()})),this._register(this._bufferService.onResize(()=>{this._clearCurrentLink(),this._wasResized=!0})),this._register(We(this._element,"mouseleave",()=>{this._isMouseOut=!0,this._clearCurrentLink()})),this._register(We(this._element,"mousemove",this._handleMouseMove.bind(this))),this._register(We(this._element,"mousedown",this._handleMouseDown.bind(this))),this._register(We(this._element,"mouseup",this._handleMouseUp.bind(this)))}get currentLink(){return this._currentLink}_handleMouseMove(e){this._lastMouseEvent=e;let t=this._positionFromMouseEvent(e,this._element,this._mouseService);if(!t)return;this._isMouseOut=!1;let i=e.composedPath();for(let n=0;n<i.length;n++){let r=i[n];if(r.classList.contains("xterm"))break;if(r.classList.contains("xterm-hover"))return}(!this._lastBufferCell||t.x!==this._lastBufferCell.x||t.y!==this._lastBufferCell.y)&&(this._handleHover(t),this._lastBufferCell=t)}_handleHover(e){if(this._activeLine!==e.y||this._wasResized){this._clearCurrentLink(),this._askForLink(e,!1),this._wasResized=!1;return}this._currentLink&&this._linkAtPosition(this._currentLink.link,e)||(this._clearCurrentLink(),this._askForLink(e,!0))}_askForLink(e,t){var n,r;(!this._activeProviderReplies||!t)&&((n=this._activeProviderReplies)==null||n.forEach(s=>{s==null||s.forEach(a=>{a.link.dispose&&a.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=e.y);let i=!1;for(let[s,a]of this._linkProviderService.linkProviders.entries())t?(r=this._activeProviderReplies)!=null&&r.get(s)&&(i=this._checkLinkProviderResult(s,e,i)):a.provideLinks(e.y,l=>{var c,u;if(this._isMouseOut)return;let o=l==null?void 0:l.map(d=>({link:d}));(c=this._activeProviderReplies)==null||c.set(s,o),i=this._checkLinkProviderResult(s,e,i),((u=this._activeProviderReplies)==null?void 0:u.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(e.y,this._activeProviderReplies)})}_removeIntersectingLinks(e,t){let i=new Set;for(let n=0;n<t.size;n++){let r=t.get(n);if(r)for(let s=0;s<r.length;s++){let a=r[s],l=a.link.range.start.y<e?0:a.link.range.start.x,o=a.link.range.end.y>e?this._bufferService.cols:a.link.range.end.x;for(let c=l;c<=o;c++){if(i.has(c)){r.splice(s--,1);break}i.add(c)}}}}_checkLinkProviderResult(e,t,i){var s;if(!this._activeProviderReplies)return i;let n=this._activeProviderReplies.get(e),r=!1;for(let a=0;a<e;a++)(!this._activeProviderReplies.has(a)||this._activeProviderReplies.get(a))&&(r=!0);if(!r&&n){let a=n.find(l=>this._linkAtPosition(l.link,t));a&&(i=!0,this._handleNewLink(a))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!i)for(let a=0;a<this._activeProviderReplies.size;a++){let l=(s=this._activeProviderReplies.get(a))==null?void 0:s.find(o=>this._linkAtPosition(o.link,t));if(l){i=!0,this._handleNewLink(l);break}}return i}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(e){if(!this._currentLink)return;let t=this._positionFromMouseEvent(e,this._element,this._mouseService);t&&this._mouseDownLink&&Eq(this._mouseDownLink.link,this._currentLink.link)&&this._linkAtPosition(this._currentLink.link,t)&&this._currentLink.link.activate(e,this._currentLink.link.text)}_clearCurrentLink(e,t){!this._currentLink||!this._lastMouseEvent||(!e||!t||this._currentLink.link.range.start.y>=e&&this._currentLink.link.range.end.y<=t)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,ys(this._linkCacheDisposables),this._linkCacheDisposables.length=0)}_handleNewLink(e){if(!this._lastMouseEvent)return;let t=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);t&&this._linkAtPosition(e.link,t)&&(this._currentLink=e,this._currentLink.state={decorations:{underline:e.link.decorations===void 0?!0:e.link.decorations.underline,pointerCursor:e.link.decorations===void 0?!0:e.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,e.link,this._lastMouseEvent),e.link.decorations={},Object.defineProperties(e.link.decorations,{pointerCursor:{get:()=>{var i,n;return(n=(i=this._currentLink)==null?void 0:i.state)==null?void 0:n.decorations.pointerCursor},set:i=>{var n;(n=this._currentLink)!=null&&n.state&&this._currentLink.state.decorations.pointerCursor!==i&&(this._currentLink.state.decorations.pointerCursor=i,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",i))}},underline:{get:()=>{var i,n;return(n=(i=this._currentLink)==null?void 0:i.state)==null?void 0:n.decorations.underline},set:i=>{var n,r,s;(n=this._currentLink)!=null&&n.state&&((s=(r=this._currentLink)==null?void 0:r.state)==null?void 0:s.decorations.underline)!==i&&(this._currentLink.state.decorations.underline=i,this._currentLink.state.isHovered&&this._fireUnderlineEvent(e.link,i))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(i=>{if(!this._currentLink)return;let n=i.start===0?0:i.start+1+this._bufferService.buffer.ydisp,r=this._bufferService.buffer.ydisp+1+i.end;if(this._currentLink.link.range.start.y>=n&&this._currentLink.link.range.end.y<=r&&(this._clearCurrentLink(n,r),this._lastMouseEvent)){let s=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);s&&this._askForLink(s,!1)}})))}_linkHover(e,t,i){var n;(n=this._currentLink)!=null&&n.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(t,!0),this._currentLink.state.decorations.pointerCursor&&e.classList.add("xterm-cursor-pointer")),t.hover&&t.hover(i,t.text)}_fireUnderlineEvent(e,t){let i=e.range,n=this._bufferService.buffer.ydisp,r=this._createLinkUnderlineEvent(i.start.x-1,i.start.y-n-1,i.end.x,i.end.y-n-1,void 0);(t?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(r)}_linkLeave(e,t,i){var n;(n=this._currentLink)!=null&&n.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(t,!1),this._currentLink.state.decorations.pointerCursor&&e.classList.remove("xterm-cursor-pointer")),t.leave&&t.leave(i,t.text)}_linkAtPosition(e,t){let i=e.range.start.y*this._bufferService.cols+e.range.start.x,n=e.range.end.y*this._bufferService.cols+e.range.end.x,r=t.y*this._bufferService.cols+t.x;return i<=r&&r<=n}_positionFromMouseEvent(e,t,i){let n=i.getCoords(e,t,this._bufferService.cols,this._bufferService.rows);if(n)return{x:n[0],y:n[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(e,t,i,n,r){return{x1:e,y1:t,x2:i,y2:n,cols:this._bufferService.cols,fg:r}}};gh=Ot([Pe(1,O2),Pe(2,_r),Pe(3,Ti),Pe(4,Ab)],gh);function Eq(e,t){return e.text===t.text&&e.range.start.x===t.range.start.x&&e.range.start.y===t.range.start.y&&e.range.end.x===t.range.end.x&&e.range.end.y===t.range.end.y}var xq=class extends wq{constructor(e={}){super(e),this._linkifier=this._register(new ca),this.browser=Ub,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this._register(new ca),this._onCursorMove=this._register(new He),this.onCursorMove=this._onCursorMove.event,this._onKey=this._register(new He),this.onKey=this._onKey.event,this._onRender=this._register(new He),this.onRender=this._onRender.event,this._onSelectionChange=this._register(new He),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this._register(new He),this.onTitleChange=this._onTitleChange.event,this._onBell=this._register(new He),this.onBell=this._onBell.event,this._onFocus=this._register(new He),this._onBlur=this._register(new He),this._onA11yCharEmitter=this._register(new He),this._onA11yTabEmitter=this._register(new He),this._onWillOpen=this._register(new He),this._setup(),this._decorationService=this._instantiationService.createInstance(Aq),this._instantiationService.setService(r0,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(bK),this._instantiationService.setService(Ab,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(Dd)),this._register(this._inputHandler.onRequestBell(()=>this._onBell.fire())),this._register(this._inputHandler.onRequestRefreshRows(t=>this.refresh((t==null?void 0:t.start)??0,(t==null?void 0:t.end)??this.rows-1))),this._register(this._inputHandler.onRequestSendFocus(()=>this._reportFocus())),this._register(this._inputHandler.onRequestReset(()=>this.reset())),this._register(this._inputHandler.onRequestWindowsOptionsReport(t=>this._reportWindowsOptions(t))),this._register(this._inputHandler.onColor(t=>this._handleColorEvent(t))),this._register(pi.forward(this._inputHandler.onCursorMove,this._onCursorMove)),this._register(pi.forward(this._inputHandler.onTitleChange,this._onTitleChange)),this._register(pi.forward(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this._register(pi.forward(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this._register(this._bufferService.onResize(t=>this._afterResize(t.cols,t.rows))),this._register($t(()=>{var t,i;this._customKeyEventHandler=void 0,(i=(t=this.element)==null?void 0:t.parentNode)==null||i.removeChild(this.element)}))}get linkifier(){return this._linkifier.value}get onFocus(){return this._onFocus.event}get onBlur(){return this._onBlur.event}get onA11yChar(){return this._onA11yCharEmitter.event}get onA11yTab(){return this._onA11yTabEmitter.event}get onWillOpen(){return this._onWillOpen.event}_handleColorEvent(e){if(this._themeService)for(let t of e){let i,n="";switch(t.index){case 256:i="foreground",n="10";break;case 257:i="background",n="11";break;case 258:i="cursor",n="12";break;default:i="ansi",n="4;"+t.index}switch(t.type){case 0:let r=Ct.toColorRGB(i==="ansi"?this._themeService.colors.ansi[t.index]:this._themeService.colors[i]);this.coreService.triggerDataEvent(`${Ae.ESC}]${n};${_q(r)}${Fb.ST}`);break;case 1:if(i==="ansi")this._themeService.modifyColors(s=>s.ansi[t.index]=Kt.toColor(...t.color));else{let s=i;this._themeService.modifyColors(a=>a[s]=Kt.toColor(...t.color))}break;case 2:this._themeService.restoreColor(t.index);break}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(e){e?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(Zc,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(e){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(Ae.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var e;return(e=this.textarea)==null?void 0:e.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(Ae.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;let e=this.buffer.ybase+this.buffer.y,t=this.buffer.lines.get(e);if(!t)return;let i=Math.min(this.buffer.x,this.cols-1),n=this._renderService.dimensions.css.cell.height,r=t.getWidth(i),s=this._renderService.dimensions.css.cell.width*r,a=this.buffer.y*this._renderService.dimensions.css.cell.height,l=i*this._renderService.dimensions.css.cell.width;this.textarea.style.left=l+"px",this.textarea.style.top=a+"px",this.textarea.style.width=s+"px",this.textarea.style.height=n+"px",this.textarea.style.lineHeight=n+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this._register(We(this.element,"copy",t=>{this.hasSelection()&&PW(t,this._selectionService)}));let e=t=>OW(t,this.textarea,this.coreService,this.optionsService);this._register(We(this.textarea,"paste",e)),this._register(We(this.element,"paste",e)),Wb?this._register(We(this.element,"mousedown",t=>{t.button===2&&Mp(t,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})):this._register(We(this.element,"contextmenu",t=>{Mp(t,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})),z2&&this._register(We(this.element,"auxclick",t=>{t.button===1&&mb(t,this.textarea,this.screenElement)}))}_bindKeys(){this._register(We(this.textarea,"keyup",e=>this._keyUp(e),!0)),this._register(We(this.textarea,"keydown",e=>this._keyDown(e),!0)),this._register(We(this.textarea,"keypress",e=>this._keyPress(e),!0)),this._register(We(this.textarea,"compositionstart",()=>this._compositionHelper.compositionstart())),this._register(We(this.textarea,"compositionupdate",e=>this._compositionHelper.compositionupdate(e))),this._register(We(this.textarea,"compositionend",()=>this._compositionHelper.compositionend())),this._register(We(this.textarea,"input",e=>this._inputEvent(e),!0)),this._register(this.onRender(()=>this._compositionHelper.updateCompositionElements()))}open(e){var r;if(!e)throw new Error("Terminal requires a parent element.");if(e.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((r=this.element)==null?void 0:r.ownerDocument.defaultView)&&this._coreBrowserService){this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView);return}this._document=e.ownerDocument,this.options.documentOverride&&this.options.documentOverride instanceof Document&&(this._document=this.optionsService.rawOptions.documentOverride),this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),e.appendChild(this.element);let t=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),t.appendChild(this._viewportElement),this.screenElement=this._document.createElement("div"),this.screenElement.classList.add("xterm-screen"),this._register(We(this.screenElement,"mousemove",s=>this.updateCursorStyle(s))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),t.appendChild(this.screenElement);let i=this.textarea=this._document.createElement("textarea");this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",Id.get()),qb||this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this._register(this.optionsService.onSpecificOptionChange("disableStdin",()=>i.readOnly=this.optionsService.rawOptions.disableStdin)),this.textarea.readOnly=this.optionsService.rawOptions.disableStdin,this._coreBrowserService=this._register(this._instantiationService.createInstance(vK,this.textarea,e.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(pr,this._coreBrowserService),this._register(We(this.textarea,"focus",s=>this._handleTextAreaFocus(s))),this._register(We(this.textarea,"blur",()=>this._handleTextAreaBlur())),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(ah,this._document,this._helperContainer),this._instantiationService.setService(S1,this._charSizeService),this._themeService=this._instantiationService.createInstance(uh),this._instantiationService.setService(Ja,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(Rc),this._instantiationService.setService(kb,this._characterJoinerService),this._renderService=this._register(this._instantiationService.createInstance(oh,this.rows,this.screenElement)),this._instantiationService.setService(_r,this._renderService),this._register(this._renderService.onRenderedViewportChange(s=>this._onRender.fire(s))),this.onResize(s=>this._renderService.resize(s.cols,s.rows)),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(nh,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(lh),this._instantiationService.setService(O2,this._mouseService);let n=this._linkifier.value=this._register(this._instantiationService.createInstance(gh,this.screenElement));this.element.appendChild(t);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this._register(this.onCursorMove(()=>{this._renderService.handleCursorMove(),this._syncTextArea()})),this._register(this.onResize(()=>this._renderService.handleResize(this.cols,this.rows))),this._register(this.onBlur(()=>this._renderService.handleBlur())),this._register(this.onFocus(()=>this._renderService.handleFocus())),this._viewport=this._register(this._instantiationService.createInstance(th,this.element,this.screenElement)),this._register(this._viewport.onRequestScrollLines(s=>{super.scrollLines(s,!1),this.refresh(0,this.rows-1)})),this._selectionService=this._register(this._instantiationService.createInstance(ch,this.element,this.screenElement,n)),this._instantiationService.setService(zW,this._selectionService),this._register(this._selectionService.onRequestScrollLines(s=>this.scrollLines(s.amount,s.suppressScrollEvent))),this._register(this._selectionService.onSelectionChange(()=>this._onSelectionChange.fire())),this._register(this._selectionService.onRequestRedraw(s=>this._renderService.handleSelectionChanged(s.start,s.end,s.columnSelectMode))),this._register(this._selectionService.onLinuxMouseSelection(s=>{this.textarea.value=s,this.textarea.focus(),this.textarea.select()})),this._register(pi.any(this._onScroll.event,this._inputHandler.onScroll)(()=>{var s;this._selectionService.refresh(),(s=this._viewport)==null||s.queueSync()})),this._register(this._instantiationService.createInstance(ih,this.screenElement)),this._register(We(this.element,"mousedown",s=>this._selectionService.handleMouseDown(s))),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager.value=this._instantiationService.createInstance(Zc,this)),this._register(this.optionsService.onSpecificOptionChange("screenReaderMode",s=>this._handleScreenReaderModeOptionChange(s))),this.options.overviewRuler.width&&(this._overviewRulerRenderer=this._register(this._instantiationService.createInstance(Ic,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRuler",s=>{!this._overviewRulerRenderer&&s&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this._register(this._instantiationService.createInstance(Ic,this._viewportElement,this.screenElement)))}),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(sh,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){let e=this,t=this.element;function i(s){var c,u,d,h,f;let a=e._mouseService.getMouseReportCoords(s,e.screenElement);if(!a)return!1;let l,o;switch(s.overrideType||s.type){case"mousemove":o=32,s.buttons===void 0?(l=3,s.button!==void 0&&(l=s.button<3?s.button:3)):l=s.buttons&1?0:s.buttons&4?1:s.buttons&2?2:3;break;case"mouseup":o=0,l=s.button<3?s.button:3;break;case"mousedown":o=1,l=s.button<3?s.button:3;break;case"wheel":if(e._customWheelEventHandler&&e._customWheelEventHandler(s)===!1)return!1;let v=s.deltaY;if(v===0||e.coreMouseService.consumeWheelEvent(s,(h=(d=(u=(c=e._renderService)==null?void 0:c.dimensions)==null?void 0:u.device)==null?void 0:d.cell)==null?void 0:h.height,(f=e._coreBrowserService)==null?void 0:f.dpr)===0)return!1;o=v<0?0:1,l=4;break;default:return!1}return o===void 0||l===void 0||l>4?!1:e.coreMouseService.triggerMouseEvent({col:a.col,row:a.row,x:a.x,y:a.y,button:l,action:o,ctrl:s.ctrlKey,alt:s.altKey,shift:s.shiftKey})}let n={mouseup:null,wheel:null,mousedrag:null,mousemove:null},r={mouseup:s=>(i(s),s.buttons||(this._document.removeEventListener("mouseup",n.mouseup),n.mousedrag&&this._document.removeEventListener("mousemove",n.mousedrag)),this.cancel(s)),wheel:s=>(i(s),this.cancel(s,!0)),mousedrag:s=>{s.buttons&&i(s)},mousemove:s=>{s.buttons||i(s)}};this._register(this.coreMouseService.onProtocolChange(s=>{s?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(s)),this.element.classList.add("enable-mouse-events"),this._selectionService.disable()):(this._logService.debug("Unbinding from mouse events."),this.element.classList.remove("enable-mouse-events"),this._selectionService.enable()),s&8?n.mousemove||(t.addEventListener("mousemove",r.mousemove),n.mousemove=r.mousemove):(t.removeEventListener("mousemove",n.mousemove),n.mousemove=null),s&16?n.wheel||(t.addEventListener("wheel",r.wheel,{passive:!1}),n.wheel=r.wheel):(t.removeEventListener("wheel",n.wheel),n.wheel=null),s&2?n.mouseup||(n.mouseup=r.mouseup):(this._document.removeEventListener("mouseup",n.mouseup),n.mouseup=null),s&4?n.mousedrag||(n.mousedrag=r.mousedrag):(this._document.removeEventListener("mousemove",n.mousedrag),n.mousedrag=null)})),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this._register(We(t,"mousedown",s=>{if(s.preventDefault(),this.focus(),!(!this.coreMouseService.areMouseEventsActive||this._selectionService.shouldForceSelection(s)))return i(s),n.mouseup&&this._document.addEventListener("mouseup",n.mouseup),n.mousedrag&&this._document.addEventListener("mousemove",n.mousedrag),this.cancel(s)})),this._register(We(t,"wheel",s=>{var a,l,o,c,u;if(!n.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(s)===!1)return!1;if(!this.buffer.hasScrollback){if(s.deltaY===0)return!1;if(e.coreMouseService.consumeWheelEvent(s,(c=(o=(l=(a=e._renderService)==null?void 0:a.dimensions)==null?void 0:l.device)==null?void 0:o.cell)==null?void 0:c.height,(u=e._coreBrowserService)==null?void 0:u.dpr)===0)return this.cancel(s,!0);let d=Ae.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(s.deltaY<0?"A":"B");return this.coreService.triggerDataEvent(d,!0),this.cancel(s,!0)}}},{passive:!1}))}refresh(e,t){var i;(i=this._renderService)==null||i.refreshRows(e,t)}updateCursorStyle(e){var t;(t=this._selectionService)!=null&&t.shouldColumnSelect(e)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")}_showCursor(){this.coreService.isCursorInitialized||(this.coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))}scrollLines(e,t){this._viewport?this._viewport.scrollLines(e):super.scrollLines(e,t),this.refresh(0,this.rows-1)}scrollPages(e){this.scrollLines(e*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(e){e&&this._viewport?this._viewport.scrollToLine(this.buffer.ybase,!0):this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(e){let t=e-this._bufferService.buffer.ydisp;t!==0&&this.scrollLines(t)}paste(e){_b(e,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(e){this._customKeyEventHandler=e}attachCustomWheelEventHandler(e){this._customWheelEventHandler=e}registerLinkProvider(e){return this._linkProviderService.registerLinkProvider(e)}registerCharacterJoiner(e){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");let t=this._characterJoinerService.register(e);return this.refresh(0,this.rows-1),t}deregisterCharacterJoiner(e){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(e)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(e){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+e)}registerDecoration(e){return this._decorationService.registerDecoration(e)}hasSelection(){return this._selectionService?this._selectionService.hasSelection:!1}select(e,t,i){this._selectionService.setSelection(e,t,i)}getSelection(){return this._selectionService?this._selectionService.selectionText:""}getSelectionPosition(){if(!(!this._selectionService||!this._selectionService.hasSelection))return{start:{x:this._selectionService.selectionStart[0],y:this._selectionService.selectionStart[1]},end:{x:this._selectionService.selectionEnd[0],y:this._selectionService.selectionEnd[1]}}}clearSelection(){var e;(e=this._selectionService)==null||e.clearSelection()}selectAll(){var e;(e=this._selectionService)==null||e.selectAll()}selectLines(e,t){var i;(i=this._selectionService)==null||i.selectLines(e,t)}_keyDown(e){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(e)===!1)return!1;let t=this.browser.isMac&&this.options.macOptionIsMeta&&e.altKey;if(!t&&!this._compositionHelper.keydown(e))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(!0),!1;!t&&(e.key==="Dead"||e.key==="AltGraph")&&(this._unprocessedDeadKey=!0);let i=Cq(e,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(e),i.type===3||i.type===2){let n=this.rows-1;return this.scrollLines(i.type===2?-n:n),this.cancel(e,!0)}if(i.type===1&&this.selectAll(),this._isThirdLevelShift(this.browser,e)||(i.cancel&&this.cancel(e,!0),!i.key)||e.key&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&e.key.length===1&&e.key.charCodeAt(0)>=65&&e.key.charCodeAt(0)<=90)return!0;if(this._unprocessedDeadKey)return this._unprocessedDeadKey=!1,!0;if((i.key===Ae.ETX||i.key===Ae.CR)&&(this.textarea.value=""),this._onKey.fire({key:i.key,domEvent:e}),this._showCursor(),this.coreService.triggerDataEvent(i.key,!0),!this.optionsService.rawOptions.screenReaderMode||e.altKey||e.ctrlKey)return this.cancel(e,!0);this._keyDownHandled=!0}_isThirdLevelShift(e,t){let i=e.isMac&&!this.options.macOptionIsMeta&&t.altKey&&!t.ctrlKey&&!t.metaKey||e.isWindows&&t.altKey&&t.ctrlKey&&!t.metaKey||e.isWindows&&t.getModifierState("AltGraph");return t.type==="keypress"?i:i&&(!t.keyCode||t.keyCode>47)}_keyUp(e){this._keyDownSeen=!1,!(this._customKeyEventHandler&&this._customKeyEventHandler(e)===!1)&&(Hq(e)||this.focus(),this.updateCursorStyle(e),this._keyPressHandled=!1)}_keyPress(e){let t;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(e)===!1)return!1;if(this.cancel(e),e.charCode)t=e.charCode;else if(e.which===null||e.which===void 0)t=e.keyCode;else if(e.which!==0&&e.charCode!==0)t=e.which;else return!1;return!t||(e.altKey||e.ctrlKey||e.metaKey)&&!this._isThirdLevelShift(this.browser,e)?!1:(t=String.fromCharCode(t),this._onKey.fire({key:t,domEvent:e}),this._showCursor(),this.coreService.triggerDataEvent(t,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,!0)}_inputEvent(e){if(e.data&&e.inputType==="insertText"&&(!e.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;let t=e.data;return this.coreService.triggerDataEvent(t,!0),this.cancel(e),!0}return!1}resize(e,t){if(e===this.cols&&t===this.rows){this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure();return}super.resize(e,t)}_afterResize(e,t){var i;(i=this._charSizeService)==null||i.measure()}clear(){if(!(this.buffer.ybase===0&&this.buffer.y===0)){this.buffer.clearAllMarkers(),this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(let e=1;e<this.rows;e++)this.buffer.lines.push(this.buffer.getBlankLine(jt));this._onScroll.fire({position:this.buffer.ydisp}),this.refresh(0,this.rows-1)}}reset(){var t;this.options.rows=this.rows,this.options.cols=this.cols;let e=this._customKeyEventHandler;this._setup(),super.reset(),(t=this._selectionService)==null||t.reset(),this._decorationService.reset(),this._customKeyEventHandler=e,this.refresh(0,this.rows-1)}clearTextureAtlas(){var e;(e=this._renderService)==null||e.clearTextureAtlas()}_reportFocus(){var e;(e=this.element)!=null&&e.classList.contains("focus")?this.coreService.triggerDataEvent(Ae.ESC+"[I"):this.coreService.triggerDataEvent(Ae.ESC+"[O")}_reportWindowsOptions(e){if(this._renderService)switch(e){case 0:let t=this._renderService.dimensions.css.canvas.width.toFixed(0),i=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${Ae.ESC}[4;${i};${t}t`);break;case 1:let n=this._renderService.dimensions.css.cell.width.toFixed(0),r=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${Ae.ESC}[6;${r};${n}t`);break}}cancel(e,t){if(!(!this.options.cancelEvents&&!t))return e.preventDefault(),e.stopPropagation(),!1}};function Hq(e){return e.keyCode===16||e.keyCode===17||e.keyCode===18}var Tq=class{constructor(){this._addons=[]}dispose(){for(let e=this._addons.length-1;e>=0;e--)this._addons[e].instance.dispose()}loadAddon(e,t){let i={instance:t,dispose:t.dispose,isDisposed:!1};this._addons.push(i),t.dispose=()=>this._wrappedAddonDispose(i),t.activate(e)}_wrappedAddonDispose(e){if(e.isDisposed)return;let t=-1;for(let i=0;i<this._addons.length;i++)if(this._addons[i]===e){t=i;break}if(t===-1)throw new Error("Could not dispose an addon that has not been loaded");e.isDisposed=!0,e.dispose.apply(e.instance),this._addons.splice(t,1)}},Nq=class{constructor(e){this._line=e}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(e,t){if(!(e<0||e>=this._line.length))return t?(this._line.loadCell(e,t),t):this._line.loadCell(e,new ln)}translateToString(e,t,i){return this._line.translateToString(e,t,i)}},v_=class{constructor(e,t){this._buffer=e,this.type=t}init(e){return this._buffer=e,this}get cursorY(){return this._buffer.y}get cursorX(){return this._buffer.x}get viewportY(){return this._buffer.ydisp}get baseY(){return this._buffer.ybase}get length(){return this._buffer.lines.length}getLine(e){let t=this._buffer.lines.get(e);if(t)return new Nq(t)}getNullCell(){return new ln}},Pq=class extends Qe{constructor(e){super(),this._core=e,this._onBufferChange=this._register(new He),this.onBufferChange=this._onBufferChange.event,this._normal=new v_(this._core.buffers.normal,"normal"),this._alternate=new v_(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate(()=>this._onBufferChange.fire(this.active))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}},Oq=class{constructor(e){this._core=e}registerCsiHandler(e,t){return this._core.registerCsiHandler(e,i=>t(i.toArray()))}addCsiHandler(e,t){return this.registerCsiHandler(e,t)}registerDcsHandler(e,t){return this._core.registerDcsHandler(e,(i,n)=>t(i,n.toArray()))}addDcsHandler(e,t){return this.registerDcsHandler(e,t)}registerEscHandler(e,t){return this._core.registerEscHandler(e,t)}addEscHandler(e,t){return this.registerEscHandler(e,t)}registerOscHandler(e,t){return this._core.registerOscHandler(e,t)}addOscHandler(e,t){return this.registerOscHandler(e,t)}},Iq=class{constructor(e){this._core=e}register(e){this._core.unicodeService.register(e)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(e){this._core.unicodeService.activeVersion=e}},Rq=["cols","rows"],An=0,Vq=class extends Qe{constructor(e){super(),this._core=this._register(new xq(e)),this._addonManager=this._register(new Tq),this._publicOptions={...this._core.options};let t=n=>this._core.options[n],i=(n,r)=>{this._checkReadonlyOptions(n),this._core.options[n]=r};for(let n in this._core.options){let r={get:t.bind(this,n),set:i.bind(this,n)};Object.defineProperty(this._publicOptions,n,r)}}_checkReadonlyOptions(e){if(Rq.includes(e))throw new Error(`Option "${e}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||(this._parser=new Oq(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new Iq(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||(this._buffer=this._register(new Pq(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){let e=this._core.coreService.decPrivateModes,t="none";switch(this._core.coreMouseService.activeProtocol){case"X10":t="x10";break;case"VT200":t="vt200";break;case"DRAG":t="drag";break;case"ANY":t="any";break}return{applicationCursorKeysMode:e.applicationCursorKeys,applicationKeypadMode:e.applicationKeypad,bracketedPasteMode:e.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:t,originMode:e.origin,reverseWraparoundMode:e.reverseWraparound,sendFocusMode:e.sendFocus,synchronizedOutputMode:e.synchronizedOutput,wraparoundMode:e.wraparound}}get options(){return this._publicOptions}set options(e){for(let t in e)this._publicOptions[t]=e[t]}blur(){this._core.blur()}focus(){this._core.focus()}input(e,t=!0){this._core.input(e,t)}resize(e,t){this._verifyIntegers(e,t),this._core.resize(e,t)}open(e){this._core.open(e)}attachCustomKeyEventHandler(e){this._core.attachCustomKeyEventHandler(e)}attachCustomWheelEventHandler(e){this._core.attachCustomWheelEventHandler(e)}registerLinkProvider(e){return this._core.registerLinkProvider(e)}registerCharacterJoiner(e){return this._checkProposedApi(),this._core.registerCharacterJoiner(e)}deregisterCharacterJoiner(e){this._checkProposedApi(),this._core.deregisterCharacterJoiner(e)}registerMarker(e=0){return this._verifyIntegers(e),this._core.registerMarker(e)}registerDecoration(e){return this._checkProposedApi(),this._verifyPositiveIntegers(e.x??0,e.width??0,e.height??0),this._core.registerDecoration(e)}hasSelection(){return this._core.hasSelection()}select(e,t,i){this._verifyIntegers(e,t,i),this._core.select(e,t,i)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(e,t){this._verifyIntegers(e,t),this._core.selectLines(e,t)}dispose(){super.dispose()}scrollLines(e){this._verifyIntegers(e),this._core.scrollLines(e)}scrollPages(e){this._verifyIntegers(e),this._core.scrollPages(e)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(e){this._verifyIntegers(e),this._core.scrollToLine(e)}clear(){this._core.clear()}write(e,t){this._core.write(e,t)}writeln(e,t){this._core.write(e),this._core.write(`\r
|
|
96
|
-
`,t)}paste(e){this._core.paste(e)}refresh(e,t){this._verifyIntegers(e,t),this._core.refresh(e,t)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(e){this._addonManager.loadAddon(this,e)}static get strings(){return{get promptLabel(){return Id.get()},set promptLabel(e){Id.set(e)},get tooMuchOutput(){return Rd.get()},set tooMuchOutput(e){Rd.set(e)}}}_verifyIntegers(...e){for(An of e)if(An===1/0||isNaN(An)||An%1!==0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...e){for(An of e)if(An&&(An===1/0||isNaN(An)||An%1!==0||An<0))throw new Error("This API only accepts positive integers")}};/**
|
|
97
|
-
* Copyright (c) 2014-2024 The xterm.js authors. All rights reserved.
|
|
98
|
-
* @license MIT
|
|
99
|
-
*
|
|
100
|
-
* Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
|
|
101
|
-
* @license MIT
|
|
102
|
-
*
|
|
103
|
-
* Originally forked from (with the author's permission):
|
|
104
|
-
* Fabrice Bellard's javascript vt100 for jslinux:
|
|
105
|
-
* http://bellard.org/jslinux/
|
|
106
|
-
* Copyright (c) 2011 Fabrice Bellard
|
|
107
|
-
*/var Dq=2,Zq=1,Bq=class{activate(e){this._terminal=e}dispose(){}fit(){let e=this.proposeDimensions();if(!e||!this._terminal||isNaN(e.cols)||isNaN(e.rows))return;let t=this._terminal._core;(this._terminal.rows!==e.rows||this._terminal.cols!==e.cols)&&(t._renderService.clear(),this._terminal.resize(e.cols,e.rows))}proposeDimensions(){var d;if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let e=this._terminal._core._renderService.dimensions;if(e.css.cell.width===0||e.css.cell.height===0)return;let t=this._terminal.options.scrollback===0?0:((d=this._terminal.options.overviewRuler)==null?void 0:d.width)||14,i=window.getComputedStyle(this._terminal.element.parentElement),n=parseInt(i.getPropertyValue("height")),r=Math.max(0,parseInt(i.getPropertyValue("width"))),s=window.getComputedStyle(this._terminal.element),a={top:parseInt(s.getPropertyValue("padding-top")),bottom:parseInt(s.getPropertyValue("padding-bottom")),right:parseInt(s.getPropertyValue("padding-right")),left:parseInt(s.getPropertyValue("padding-left"))},l=a.top+a.bottom,o=a.right+a.left,c=n-l,u=r-o-t;return{cols:Math.max(Dq,Math.floor(u/e.css.cell.width)),rows:Math.max(Zq,Math.floor(c/e.css.cell.height))}}};const Fq={class:"terminal-view"},zq={class:"conn-status"},Uq={class:"conn-label"},Wq=Ne({__name:"TerminalView",setup(e){const t=Ms(),i=K(null),n=zn(null),r=zn(null);let s=null,a=null;const l=K(!1);function o(){const u=location.protocol==="https:"?"wss:":"ws:";s=new WebSocket(`${u}//${location.host}/ws/shell`),s.onopen=()=>{l.value=!0,c()},s.onmessage=d=>{var h;(h=n.value)==null||h.write(d.data)},s.onclose=()=>{var d;l.value=!1,(d=n.value)==null||d.write(`\r
|
|
108
|
-
\x1B[90m- disconnected -\x1B[0m\r
|
|
109
|
-
`)},s.onerror=()=>s==null?void 0:s.close()}function c(){!s||s.readyState!==s.OPEN||!n.value||s.send(JSON.stringify({type:"resize",cols:n.value.cols,rows:n.value.rows}))}return nt(async()=>{t.setPage("Terminal",void 0,{fullBleed:!0}),await document.fonts.ready;const u=new Vq({theme:{background:"#0d1117",foreground:"#e6edf3",cursor:"#58a6ff",selectionBackground:"rgba(88,166,255,0.3)",black:"#0d1117",brightBlack:"#6e7681",red:"#ff7b72",brightRed:"#ffa198",green:"#3fb950",brightGreen:"#56d364",yellow:"#d29922",brightYellow:"#e3b341",blue:"#58a6ff",brightBlue:"#79c0ff",magenta:"#bc8cff",brightMagenta:"#d2a8ff",cyan:"#39c5cf",brightCyan:"#56d4dd",white:"#b1bac4",brightWhite:"#f0f6fc"},fontFamily:'"MesloLGS NF", monospace',fontSize:13,lineHeight:1.45,cursorStyle:"block",cursorBlink:!0,scrollback:5e3,convertEol:!0,disableStdin:!1,allowTransparency:!1}),d=new Bq;u.loadAddon(d),n.value=u,r.value=d,i.value&&(u.open(i.value),d.fit()),u.onData(h=>{(s==null?void 0:s.readyState)===WebSocket.OPEN&&s.send(JSON.stringify({type:"input",data:h}))}),a=new ResizeObserver(()=>{d.fit(),c()}),i.value&&a.observe(i.value),o()}),ri(()=>{var u;s==null||s.close(),s=null,a==null||a.disconnect(),(u=n.value)==null||u.dispose()}),(u,d)=>(m(),M("div",Fq,[(m(),he(an,{defer:"",to:"#ob-topbar-right"},[b("div",zq,[b("div",{class:Le(["conn-dot",l.value?"live":"dead"])},null,2),b("span",Uq,Z(l.value?"Connected":"Disconnected"),1)])])),b("div",{ref_key:"containerEl",ref:i,class:"terminal-container"},null,512)]))}}),jq=zt(Wq,[["__scopeId","data-v-be882a56"]]),Kq={class:"login-page"},qq={class:"login-card"},Gq={key:0},Yq={key:1},g_="openbridge_auto_resume_attempted",Xq=Ne({__name:"LoginView",setup(e){const t=Jo(),i=_1(),{user:n,loadConfig:r,checkAuth:s,startPlatformLogin:a,resumeLastAccount:l,chooseAccount:o}=e0(),c=K(!1),u=K(null),d=q(()=>t.query.logged_out==="1");async function h(){c.value=!0,u.value=null;try{const v=typeof t.query.login_hint=="string"?t.query.login_hint:void 0;await a(v?{loginHint:v}:{})}catch(v){c.value=!1,u.value=v instanceof Error?v.message:"Unable to start sign-in."}}async function f(){c.value=!0,u.value=null;try{await o()}catch(v){c.value=!1,u.value=v instanceof Error?v.message:"Unable to start sign-in."}}return nt(async()=>{if(!(await r()).enabled){i.replace("/");return}if(t.query.error==="account_changed"){u.value="Your platform account changed. Please sign in again.";return}const p=typeof t.query.login_hint=="string"?t.query.login_hint:"";if(await s()){if(p&&n.value&&n.value.email.toLowerCase()!==p.toLowerCase()){c.value=!0,await a({loginHint:p});return}i.replace("/");return}if(p){c.value=!0,await a({loginHint:p});return}if(!d.value&&!sessionStorage.getItem(g_)){if(sessionStorage.setItem(g_,"1"),c.value=!0,await l())return;c.value=!1}}),(v,p)=>{const w=at,_=Pt;return m(),M("div",Kq,[b("div",qq,[p[2]||(p[2]=b("h1",{class:"login-title"},"OpenBridge",-1)),p[3]||(p[3]=b("p",{class:"login-subtitle"},"Sign in via Nubisco Platform to manage this OpenBridge instance.",-1)),u.value?(m(),he(w,{key:0,variant:"error",class:"login-error"},{default:G(()=>[le(Z(u.value),1)]),_:1})):d.value?(m(),he(w,{key:1,variant:"success",class:"login-error"},{default:G(()=>[...p[0]||(p[0]=[le("You have been signed out.",-1)])]),_:1})):V("",!0),j(_,{variant:"primary",size:"lg",disabled:c.value,class:"login-btn",onClick:h},{default:G(()=>[c.value?(m(),M("span",Gq,"Redirecting…")):(m(),M("span",Yq,"Sign in via Nubisco Platform"))]),_:1},8,["disabled"]),j(_,{variant:"ghost",size:"sm",disabled:c.value,onClick:f},{default:G(()=>[...p[1]||(p[1]=[le("Use a different account",-1)])]),_:1},8,["disabled"])])])}}}),Jq=zt(Xq,[["__scopeId","data-v-de234ae2"]]),Qq={class:"callback-page"},eG={key:1,class:"callback-loading"},tG=Ne({__name:"AuthCallbackView",setup(e){const t=Jo(),i=_1(),{checkAuth:n,clearLastAccount:r}=e0(),s=K(null);return nt(async()=>{const a=typeof t.query.token=="string"?t.query.token:"",l=typeof t.query.state=="string"?t.query.state:"",o=typeof t.query.error=="string"?t.query.error:"",c=sessionStorage.getItem("openbridge_platform_state");sessionStorage.removeItem("openbridge_platform_state");const u=sessionStorage.getItem("openbridge_platform_expected_sub");if(sessionStorage.removeItem("openbridge_platform_expected_sub"),o){s.value=o==="not_a_member"?"Your account does not have access to this OpenBridge instance.":o==="domain_not_allowed"?"Your account is not eligible for this OpenBridge instance.":`Sign-in failed: ${o}`;return}if(!c||!l||c!==l){s.value="The sign-in request is no longer valid. Please try again.";return}if(!a){s.value="Platform did not return an OpenBridge access token.";return}const d=await fetch("/auth/platform/callback",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({token:a,...u?{expected_sub:u}:{}})});if(!d.ok){const f=await d.json().catch(()=>null);if((f==null?void 0:f.error)==="subject_mismatch"){r(),i.replace({path:"/login",query:{error:"account_changed"}});return}s.value=(f==null?void 0:f.error)==="invalid_token"?"Your platform sign-in is no longer valid. Please try again.":(f==null?void 0:f.error)==="wrong_app"?"The sign-in was issued for a different application. Please try again.":"Sign-in failed. Please try again.";return}await n(),sessionStorage.removeItem("openbridge_auto_resume_attempted");const h=sessionStorage.getItem("openbridge_return_to");sessionStorage.removeItem("openbridge_return_to"),i.replace(h!=null&&h.startsWith("/oauth/consent?")?h:"/")}),(a,l)=>{const o=at;return m(),M("div",Qq,[s.value?(m(),he(o,{key:0,variant:"error"},{default:G(()=>[le(Z(s.value),1)]),_:1})):(m(),M("p",eG,"Signing you in…"))])}}}),iG=zt(tG,[["__scopeId","data-v-54deb71b"]]),nG={class:"consent"},rG={key:0,class:"consent__note"},sG={class:"consent__note"},aG={class:"consent__title"},lG={class:"consent__note"},oG={class:"consent__row"},cG=Ne({__name:"OAuthConsentView",setup(e){const t=Jo(),i=_1(),n=["client_id","redirect_uri","response_type","scope","state","code_challenge","code_challenge_method"],r=K("loading"),s=K(""),a=K(""),l=K(""),o=K(""),c=K(!1);function u(){const v=new URLSearchParams;for(const p of n){const w=t.query[p];typeof w=="string"&&w&&v.set(p,w)}return v}async function d(){try{const p=await(await fetch(`/oauth/context?${u().toString()}`)).json();if(!p.ok){o.value=p.reason??"",r.value="invalid";return}s.value=p.clientName||"This application",l.value=p.redirectHost??"",a.value=p.email??"",r.value=p.signedIn?"consent":"signed-out"}catch{r.value="invalid"}}d();function h(){try{sessionStorage.setItem("openbridge_return_to",`/oauth/consent?${u().toString()}`)}catch{}i.push("/login")}function f(v){const p=document.createElement("form");p.method="post",p.action="/oauth/authorize";const w=(_,y)=>{const C=document.createElement("input");C.type="hidden",C.name=_,C.value=y,p.appendChild(C)};for(const[_,y]of u())w(_,y);w("decision",v),w("access",c.value?"control":"read"),document.body.appendChild(p),p.submit()}return(v,p)=>{const w=BT,_=ks,y=Pt,C=wd,g=at,$=Ss;return m(),M("div",nG,[j($,{class:"consent__panel"},{default:G(()=>[p[13]||(p[13]=b("img",{class:"consent__mark",src:Zg,alt:"OpenBridge",width:"44",height:"44"},null,-1)),r.value==="loading"?(m(),M("p",rG,[j(w,{size:"sm"}),p[3]||(p[3]=le(" Checking the request… ",-1))])):r.value==="invalid"?(m(),M(Ce,{key:1},[p[4]||(p[4]=b("h1",{class:"consent__title"},"This request cannot continue",-1)),j(_,{status:"error",variant:"inline",title:o.value||"The connection request is not valid."},null,8,["title"]),p[5]||(p[5]=b("p",{class:"consent__note"},"Nothing was shared. Start the connection again from your application.",-1))],64)):r.value==="signed-out"?(m(),M(Ce,{key:2},[p[7]||(p[7]=b("h1",{class:"consent__title"},"Sign in to continue",-1)),b("p",sG,"Sign in to this bridge to decide whether "+Z(s.value)+" may connect.",1),j(y,{variant:"primary",onClick:h},{default:G(()=>[...p[6]||(p[6]=[le("Sign in",-1)])]),_:1})],64)):(m(),M(Ce,{key:3},[b("h1",aG,"Connect "+Z(s.value)+" to OpenBridge?",1),b("p",lG,[le(Z(s.value)+" will be able to read your devices, their current readings and recorded history, their events and the bridge logs ",1),a.value?(m(),M(Ce,{key:0},[le(", as "+Z(a.value),1)],64)):V("",!0),p[8]||(p[8]=le(" . It will return to ",-1)),b("strong",null,Z(l.value),1),p[9]||(p[9]=le(" . ",-1))]),j(C,{modelValue:c.value,"onUpdate:modelValue":p[0]||(p[0]=E=>c.value=E),label:"Also allow it to operate devices"},null,8,["modelValue"]),c.value?(m(),he(g,{key:0,variant:"warning"},{default:G(()=>[...p[10]||(p[10]=[le(" It will be able to switch, open and adjust anything the plugins on this bridge control, including gates and locks. You can disconnect it from Settings at any time. ",-1)])]),_:1})):V("",!0),b("div",oG,[j(y,{variant:"ghost",onClick:p[1]||(p[1]=E=>f("deny"))},{default:G(()=>[...p[11]||(p[11]=[le("Cancel",-1)])]),_:1}),j(y,{variant:"primary",onClick:p[2]||(p[2]=E=>f("approve"))},{default:G(()=>[...p[12]||(p[12]=[le("Connect",-1)])]),_:1})])],64))]),_:1})])}}}),uG=zt(cG,[["__scopeId","data-v-583adaa9"]]),r5=mO({history:qP(),routes:[{path:"/login",name:"login",component:Jq},{path:"/auth/callback",name:"auth-callback",component:iG},{path:"/oauth/consent",name:"oauth-consent",component:uG},{path:"/",component:LB,redirect:"/dashboard",children:[{path:"dashboard",name:"dashboard",component:qF},{path:"plugins",name:"plugins",component:Vz},{path:"devices",name:"devices",component:gU},{path:"devices/:id",name:"device-detail",component:VU},{path:"config",name:"config",component:YU},{path:"settings",name:"settings",component:EW},{path:"terminal",name:"terminal",component:jq}]}]});let b_=!1;r5.beforeEach(async e=>{var a;if(e.name==="login"||e.name==="auth-callback"||e.name==="oauth-consent")return!0;const{config:t,user:i,loadConfig:n,checkAuth:r}=e0();if(t.value||await n(),!((a=t.value)!=null&&a.enabled))return!0;const s=typeof e.query.login_hint=="string"?e.query.login_hint:"";if(b_){if(!i.value)return s?{path:"/login",query:{login_hint:s}}:"/login"}else{const l=await r();if(b_=!0,!l)return s?{path:"/login",query:{login_hint:s}}:"/login"}if(s){if(i.value&&i.value.email.toLowerCase()!==s.toLowerCase())return{path:"/login",query:{login_hint:s}};const l={...e.query};return delete l.login_hint,{path:e.path,query:l}}return!0});const el=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},dG=el("app-window","0 0 256 256",'<path d="M216,44H40A12,12,0,0,0,28,56V200a12,12,0,0,0,12,12H216a12,12,0,0,0,12-12V56A12,12,0,0,0,216,44Zm4,156a4,4,0,0,1-4,4H40a4,4,0,0,1-4-4V56a4,4,0,0,1,4-4H216a4,4,0,0,1,4,4ZM76,84a8,8,0,1,1-8-8A8,8,0,0,1,76,84Zm40,0a8,8,0,1,1-8-8A8,8,0,0,1,116,84Z"/>'),hG=el("app-window","0 0 256 256",'<path d="M216,42H40A14,14,0,0,0,26,56V200a14,14,0,0,0,14,14H216a14,14,0,0,0,14-14V56A14,14,0,0,0,216,42Zm2,158a2,2,0,0,1-2,2H40a2,2,0,0,1-2-2V56a2,2,0,0,1,2-2H216a2,2,0,0,1,2,2ZM78,84A10,10,0,1,1,68,74,10,10,0,0,1,78,84Zm40,0a10,10,0,1,1-10-10A10,10,0,0,1,118,84Z"/>'),y_=el("app-window","0 0 256 256",'<path d="M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40Zm0,160H40V56H216V200ZM80,84A12,12,0,1,1,68,72,12,12,0,0,1,80,84Zm40,0a12,12,0,1,1-12-12A12,12,0,0,1,120,84Z"/>'),fG=el("app-window","0 0 256 256",'<path d="M216,36H40A20,20,0,0,0,20,56V200a20,20,0,0,0,20,20H216a20,20,0,0,0,20-20V56A20,20,0,0,0,216,36Zm-4,160H44V60H212ZM60,92a16,16,0,1,1,16,16A16,16,0,0,1,60,92Zm48,0a16,16,0,1,1,16,16A16,16,0,0,1,108,92Z"/>'),pG=el("app-window","0 0 256 256",'<path d="M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM68,96A12,12,0,1,1,80,84,12,12,0,0,1,68,96Zm40,0a12,12,0,1,1,12-12A12,12,0,0,1,108,96Z"/>'),_G=el("app-window","0 0 256 256",'<path d="M224,56V200a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V56a8,8,0,0,1,8-8H216A8,8,0,0,1,224,56Z" opacity="0.2"/><path d="M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40Zm0,160H40V56H216V200ZM80,84A12,12,0,1,1,68,72,12,12,0,0,1,80,84Zm40,0a12,12,0,1,1-12-12A12,12,0,0,1,120,84Z"/>'),mG="app-window",vG=Object.freeze(Object.defineProperty({__proto__:null,bold:fG,default:y_,duotone:_G,fill:pG,glyphName:mG,light:hG,regular:y_,thin:dG},Symbol.toStringTag,{value:"Module"})),tl=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},gG=tl("brackets-curly","0 0 256 256",'<path d="M35.89,128C52,136.23,52,155.64,52,172c0,24.8,1.35,40,28,40a4,4,0,0,1,0,8c-36,0-36-26.61-36-48,0-24.8-1.35-40-28-40a4,4,0,0,1,0-8c26.65,0,28-15.2,28-40,0-21.39,0-48,36-48a4,4,0,0,1,0,8C53.35,44,52,59.2,52,84,52,100.36,52,119.77,35.89,128ZM240,124c-26.65,0-28-15.2-28-40,0-21.39,0-48-36-48a4,4,0,0,0,0,8c26.65,0,28,15.2,28,40,0,16.36,0,35.77,16.11,44C204,136.23,204,155.64,204,172c0,24.8-1.35,40-28,40a4,4,0,0,0,0,8c36,0,36-26.61,36-48,0-24.8,1.35-40,28-40a4,4,0,0,0,0-8Z"/>'),bG=tl("brackets-curly","0 0 256 256",'<path d="M39.91,128a27.68,27.68,0,0,1,9.49,11.13C54,148.62,54,160.51,54,172c0,24.27,1.21,38,26,38a6,6,0,0,1,0,12c-16.88,0-27.81-5.6-33.4-17.13C42,195.38,42,183.49,42,172c0-24.27-1.21-38-26-38a6,6,0,0,1,0-12c24.79,0,26-13.73,26-38,0-11.49,0-23.38,4.6-32.87C52.19,39.6,63.12,34,80,34a6,6,0,0,1,0,12C55.21,46,54,59.73,54,84c0,11.49,0,23.38-4.6,32.87A27.68,27.68,0,0,1,39.91,128ZM240,122c-24.79,0-26-13.73-26-38,0-11.49,0-23.38-4.6-32.87C203.81,39.6,192.88,34,176,34a6,6,0,0,0,0,12c24.79,0,26,13.73,26,38,0,11.49,0,23.38,4.6,32.87A27.68,27.68,0,0,0,216.09,128a27.68,27.68,0,0,0-9.49,11.13C202,148.62,202,160.51,202,172c0,24.27-1.21,38-26,38a6,6,0,0,0,0,12c16.88,0,27.81-5.6,33.4-17.13,4.6-9.49,4.6-21.38,4.6-32.87,0-24.27,1.21-38,26-38a6,6,0,0,0,0-12Z"/>'),w_=tl("brackets-curly","0 0 256 256",'<path d="M43.18,128a29.78,29.78,0,0,1,8,10.26c4.8,9.9,4.8,22,4.8,33.74,0,24.31,1,36,24,36a8,8,0,0,1,0,16c-17.48,0-29.32-6.14-35.2-18.26-4.8-9.9-4.8-22-4.8-33.74,0-24.31-1-36-24-36a8,8,0,0,1,0-16c23,0,24-11.69,24-36,0-11.72,0-23.84,4.8-33.74C50.68,38.14,62.52,32,80,32a8,8,0,0,1,0,16C57,48,56,59.69,56,84c0,11.72,0,23.84-4.8,33.74A29.78,29.78,0,0,1,43.18,128ZM240,120c-23,0-24-11.69-24-36,0-11.72,0-23.84-4.8-33.74C205.32,38.14,193.48,32,176,32a8,8,0,0,0,0,16c23,0,24,11.69,24,36,0,11.72,0,23.84,4.8,33.74a29.78,29.78,0,0,0,8,10.26,29.78,29.78,0,0,0-8,10.26c-4.8,9.9-4.8,22-4.8,33.74,0,24.31-1,36-24,36a8,8,0,0,0,0,16c17.48,0,29.32-6.14,35.2-18.26,4.8-9.9,4.8-22,4.8-33.74,0-24.31,1-36,24-36a8,8,0,0,0,0-16Z"/>'),yG=tl("brackets-curly","0 0 256 256",'<path d="M54.8,119.49A35.06,35.06,0,0,1,49.05,128a35.06,35.06,0,0,1,5.75,8.51C60,147.24,60,159.83,60,172c0,25.94,1.84,32,20,32a12,12,0,0,1,0,24c-19.14,0-32.2-6.9-38.8-20.51C36,196.76,36,184.17,36,172c0-25.94-1.84-32-20-32a12,12,0,0,1,0-24c18.16,0,20-6.06,20-32,0-12.17,0-24.76,5.2-35.49C47.8,34.9,60.86,28,80,28a12,12,0,0,1,0,24c-18.16,0-20,6.06-20,32C60,96.17,60,108.76,54.8,119.49ZM240,116c-18.16,0-20-6.06-20-32,0-12.17,0-24.76-5.2-35.49C208.2,34.9,195.14,28,176,28a12,12,0,0,0,0,24c18.16,0,20,6.06,20,32,0,12.17,0,24.76,5.2,35.49A35.06,35.06,0,0,0,207,128a35.06,35.06,0,0,0-5.75,8.51C196,147.24,196,159.83,196,172c0,25.94-1.84,32-20,32a12,12,0,0,0,0,24c19.14,0,32.2-6.9,38.8-20.51C220,196.76,220,184.17,220,172c0-25.94,1.84-32,20-32a12,12,0,0,0,0-24Z"/>'),wG=tl("brackets-curly","0 0 256 256",'<path d="M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM88,155.84c.29,14.26.41,20.16,16,20.16a8,8,0,0,1,0,16c-31.27,0-31.72-22.43-32-35.84C71.71,141.9,71.59,136,56,136a8,8,0,0,1,0-16c15.59,0,15.71-5.9,16-20.16C72.28,86.43,72.73,64,104,64a8,8,0,0,1,0,16c-15.59,0-15.71,5.9-16,20.16-.17,8.31-.41,20.09-8,27.84C87.59,135.75,87.83,147.53,88,155.84ZM200,136c-15.59,0-15.71,5.9-16,20.16-.28,13.41-.73,35.84-32,35.84a8,8,0,0,1,0-16c15.59,0,15.71-5.9,16-20.16.17-8.31.41-20.09,8-27.84-7.6-7.75-7.84-19.53-8-27.84C167.71,85.9,167.59,80,152,80a8,8,0,0,1,0-16c31.27,0,31.72,22.43,32,35.84.29,14.26.41,20.16,16,20.16a8,8,0,0,1,0,16Z"/>'),SG=tl("brackets-curly","0 0 256 256",'<path d="M240,128c-64,0,0,88-64,88H80c-64,0,0-88-64-88,64,0,0-88,64-88h96C240,40,176,128,240,128Z" opacity="0.2"/><path d="M43.18,128a29.78,29.78,0,0,1,8,10.26c4.8,9.9,4.8,22,4.8,33.74,0,24.31,1,36,24,36a8,8,0,0,1,0,16c-17.48,0-29.32-6.14-35.2-18.26-4.8-9.9-4.8-22-4.8-33.74,0-24.31-1-36-24-36a8,8,0,0,1,0-16c23,0,24-11.69,24-36,0-11.72,0-23.84,4.8-33.74C50.68,38.14,62.52,32,80,32a8,8,0,0,1,0,16C57,48,56,59.69,56,84c0,11.72,0,23.84-4.8,33.74A29.78,29.78,0,0,1,43.18,128ZM240,120c-23,0-24-11.69-24-36,0-11.72,0-23.84-4.8-33.74C205.32,38.14,193.48,32,176,32a8,8,0,0,0,0,16c23,0,24,11.69,24,36,0,11.72,0,23.84,4.8,33.74a29.78,29.78,0,0,0,8,10.26,29.78,29.78,0,0,0-8,10.26c-4.8,9.9-4.8,22-4.8,33.74,0,24.31-1,36-24,36a8,8,0,0,0,0,16c17.48,0,29.32-6.14,35.2-18.26,4.8-9.9,4.8-22,4.8-33.74,0-24.31,1-36,24-36a8,8,0,0,0,0-16Z"/>'),CG="brackets-curly",kG=Object.freeze(Object.defineProperty({__proto__:null,bold:yG,default:w_,duotone:SG,fill:wG,glyphName:CG,light:bG,regular:w_,thin:gG},Symbol.toStringTag,{value:"Module"})),il=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},AG=il("broadcast","0 0 256 256",'<path d="M128,92a36,36,0,1,0,36,36A36,36,0,0,0,128,92Zm0,64a28,28,0,1,1,28-28A28,28,0,0,1,128,156Zm76-28a75.74,75.74,0,0,1-19.35,50.67,4,4,0,0,1-6-5.34,67.92,67.92,0,0,0,0-90.66,4,4,0,0,1,6-5.34A75.74,75.74,0,0,1,204,128ZM65.34,101.53a67.92,67.92,0,0,0,12,71.8,4,4,0,0,1-6,5.34,75.93,75.93,0,0,1,0-101.34,4,4,0,1,1,6,5.34A68,68,0,0,0,65.34,101.53ZM244,128a115.68,115.68,0,0,1-33.14,81.18,4,4,0,0,1-5.72-5.6,107.89,107.89,0,0,0,0-151.16,4,4,0,0,1,5.72-5.6A115.68,115.68,0,0,1,244,128ZM50.86,203.58a4,4,0,0,1-5.72,5.6,115.91,115.91,0,0,1,0-162.36,4,4,0,1,1,5.72,5.6,107.89,107.89,0,0,0,0,151.16Z"/>'),MG=il("broadcast","0 0 256 256",'<path d="M128,90a38,38,0,1,0,38,38A38,38,0,0,0,128,90Zm0,64a26,26,0,1,1,26-26A26,26,0,0,1,128,154Zm78-26a77.74,77.74,0,0,1-19.86,52,6,6,0,0,1-8.94-8,65.93,65.93,0,0,0,0-88,6,6,0,1,1,8.94-8A77.74,77.74,0,0,1,206,128ZM67.18,102.31A65.93,65.93,0,0,0,78.8,172a6,6,0,0,1-.47,8.47,6,6,0,0,1-8.47-.47,77.93,77.93,0,0,1,0-104,6,6,0,1,1,8.94,8A66.21,66.21,0,0,0,67.18,102.31ZM246,128a117.71,117.71,0,0,1-33.71,82.58,6,6,0,0,1-8.58-8.4,105.88,105.88,0,0,0,0-148.36,6,6,0,0,1,8.58-8.4A117.71,117.71,0,0,1,246,128ZM52.29,202.18a6,6,0,0,1-8.58,8.4,117.92,117.92,0,0,1,0-165.16,6,6,0,1,1,8.58,8.4,105.88,105.88,0,0,0,0,148.36Z"/>'),S_=il("broadcast","0 0 256 256",'<path d="M128,88a40,40,0,1,0,40,40A40,40,0,0,0,128,88Zm0,64a24,24,0,1,1,24-24A24,24,0,0,1,128,152Zm73.71,7.14a80,80,0,0,1-14.08,22.2,8,8,0,0,1-11.92-10.67,63.95,63.95,0,0,0,0-85.33,8,8,0,1,1,11.92-10.67,80.08,80.08,0,0,1,14.08,84.47ZM69,103.09a64,64,0,0,0,11.26,67.58,8,8,0,0,1-11.92,10.67,79.93,79.93,0,0,1,0-106.67A8,8,0,1,1,80.29,85.34,63.77,63.77,0,0,0,69,103.09ZM248,128a119.58,119.58,0,0,1-34.29,84,8,8,0,1,1-11.42-11.2,103.9,103.9,0,0,0,0-145.56A8,8,0,1,1,213.71,44,119.58,119.58,0,0,1,248,128ZM53.71,200.78A8,8,0,1,1,42.29,212a119.87,119.87,0,0,1,0-168,8,8,0,1,1,11.42,11.2,103.9,103.9,0,0,0,0,145.56Z"/>'),$G=il("broadcast","0 0 256 256",'<path d="M128,84a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,84Zm0,64a20,20,0,1,1,20-20A20,20,0,0,1,128,148Zm77.39,12.7A83.94,83.94,0,0,1,190.61,184a12,12,0,0,1-17.89-16,59.92,59.92,0,0,0,0-80,12,12,0,0,1,17.89-16,84.07,84.07,0,0,1,14.78,88.7ZM83.28,168a12,12,0,0,1-17.89,16,83.94,83.94,0,0,1,0-112A12,12,0,0,1,83.28,88a59.92,59.92,0,0,0,0,80ZM252,128a123.63,123.63,0,0,1-35.43,86.78A12,12,0,1,1,199.43,198a99.88,99.88,0,0,0,0-140,12,12,0,0,1,17.14-16.8A123.63,123.63,0,0,1,252,128ZM56.57,198a12,12,0,0,1-17.14,16.8,123.89,123.89,0,0,1,0-173.56A12,12,0,0,1,56.57,58a99.88,99.88,0,0,0,0,140Z"/>'),LG=il("broadcast","0 0 256 256",'<path d="M168,128a40,40,0,1,1-40-40A40,40,0,0,1,168,128Zm40,0a79.74,79.74,0,0,0-20.37-53.33,8,8,0,1,0-11.92,10.67,64,64,0,0,1,0,85.33,8,8,0,0,0,11.92,10.67A79.79,79.79,0,0,0,208,128ZM80.29,85.34A8,8,0,1,0,68.37,74.67a79.94,79.94,0,0,0,0,106.67,8,8,0,0,0,11.92-10.67,63.95,63.95,0,0,1,0-85.33Zm158.28-4A119.48,119.48,0,0,0,213.71,44a8,8,0,1,0-11.42,11.2,103.9,103.9,0,0,1,0,145.56A8,8,0,1,0,213.71,212,120.12,120.12,0,0,0,238.57,81.29ZM32.17,168.48A103.9,103.9,0,0,1,53.71,55.22,8,8,0,1,0,42.29,44a119.87,119.87,0,0,0,0,168,8,8,0,1,0,11.42-11.2A103.61,103.61,0,0,1,32.17,168.48Z"/>'),EG=il("broadcast","0 0 256 256",'<path d="M160,128a32,32,0,1,1-32-32A32,32,0,0,1,160,128Z" opacity="0.2"/><path d="M128,88a40,40,0,1,0,40,40A40,40,0,0,0,128,88Zm0,64a24,24,0,1,1,24-24A24,24,0,0,1,128,152Zm73.71,7.14a80,80,0,0,1-14.08,22.2,8,8,0,0,1-11.92-10.67,63.95,63.95,0,0,0,0-85.33,8,8,0,1,1,11.92-10.67,80.08,80.08,0,0,1,14.08,84.47ZM69,103.09a64,64,0,0,0,11.26,67.58,8,8,0,0,1-11.92,10.67,79.93,79.93,0,0,1,0-106.67A8,8,0,1,1,80.29,85.34,63.77,63.77,0,0,0,69,103.09ZM248,128a119.58,119.58,0,0,1-34.29,84,8,8,0,1,1-11.42-11.2,103.9,103.9,0,0,0,0-145.56A8,8,0,1,1,213.71,44,119.58,119.58,0,0,1,248,128ZM53.71,200.78A8,8,0,1,1,42.29,212a119.87,119.87,0,0,1,0-168,8,8,0,1,1,11.42,11.2,103.9,103.9,0,0,0,0,145.56Z"/>'),xG="broadcast",HG=Object.freeze(Object.defineProperty({__proto__:null,bold:$G,default:S_,duotone:EG,fill:LG,glyphName:xG,light:MG,regular:S_,thin:AG},Symbol.toStringTag,{value:"Module"})),nl=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},TG=nl("camera","0 0 256 256",'<path d="M208,60H178.13L163.32,37.78A4,4,0,0,0,160,36H96a4,4,0,0,0-3.32,1.78L77.85,60H48A20,20,0,0,0,28,80V192a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V80A20,20,0,0,0,208,60Zm12,132a12,12,0,0,1-12,12H48a12,12,0,0,1-12-12V80A12,12,0,0,1,48,68H80a4,4,0,0,0,3.33-1.78L98.13,44h59.72l14.82,22.22A4,4,0,0,0,176,68h32a12,12,0,0,1,12,12ZM128,92a40,40,0,1,0,40,40A40,40,0,0,0,128,92Zm0,72a32,32,0,1,1,32-32A32,32,0,0,1,128,164Z"/>'),NG=nl("camera","0 0 256 256",'<path d="M208,58H179.21L165,36.67A6,6,0,0,0,160,34H96a6,6,0,0,0-5,2.67L76.78,58H48A22,22,0,0,0,26,80V192a22,22,0,0,0,22,22H208a22,22,0,0,0,22-22V80A22,22,0,0,0,208,58Zm10,134a10,10,0,0,1-10,10H48a10,10,0,0,1-10-10V80A10,10,0,0,1,48,70H80a6,6,0,0,0,5-2.67L99.21,46h57.57L171,67.33A6,6,0,0,0,176,70h32a10,10,0,0,1,10,10ZM128,90a42,42,0,1,0,42,42A42,42,0,0,0,128,90Zm0,72a30,30,0,1,1,30-30A30,30,0,0,1,128,162Z"/>'),C_=nl("camera","0 0 256 256",'<path d="M208,56H180.28L166.65,35.56A8,8,0,0,0,160,32H96a8,8,0,0,0-6.65,3.56L75.71,56H48A24,24,0,0,0,24,80V192a24,24,0,0,0,24,24H208a24,24,0,0,0,24-24V80A24,24,0,0,0,208,56Zm8,136a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V80a8,8,0,0,1,8-8H80a8,8,0,0,0,6.66-3.56L100.28,48h55.43l13.63,20.44A8,8,0,0,0,176,72h32a8,8,0,0,1,8,8ZM128,88a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,88Zm0,72a28,28,0,1,1,28-28A28,28,0,0,1,128,160Z"/>'),PG=nl("camera","0 0 256 256",'<path d="M208,52H182.42L170,33.34A12,12,0,0,0,160,28H96a12,12,0,0,0-10,5.34L73.57,52H48A28,28,0,0,0,20,80V192a28,28,0,0,0,28,28H208a28,28,0,0,0,28-28V80A28,28,0,0,0,208,52Zm4,140a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V80a4,4,0,0,1,4-4H80a12,12,0,0,0,10-5.34L102.42,52h51.15L166,70.66A12,12,0,0,0,176,76h32a4,4,0,0,1,4,4ZM128,84a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,84Zm0,72a24,24,0,1,1,24-24A24,24,0,0,1,128,156Z"/>'),OG=nl("camera","0 0 256 256",'<path d="M208,56H180.28L166.65,35.56A8,8,0,0,0,160,32H96a8,8,0,0,0-6.65,3.56L75.71,56H48A24,24,0,0,0,24,80V192a24,24,0,0,0,24,24H208a24,24,0,0,0,24-24V80A24,24,0,0,0,208,56Zm-44,76a36,36,0,1,1-36-36A36,36,0,0,1,164,132Z"/>'),IG=nl("camera","0 0 256 256",'<path d="M208,64H176L160,40H96L80,64H48A16,16,0,0,0,32,80V192a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V80A16,16,0,0,0,208,64ZM128,168a36,36,0,1,1,36-36A36,36,0,0,1,128,168Z" opacity="0.2"/><path d="M208,56H180.28L166.65,35.56A8,8,0,0,0,160,32H96a8,8,0,0,0-6.65,3.56L75.71,56H48A24,24,0,0,0,24,80V192a24,24,0,0,0,24,24H208a24,24,0,0,0,24-24V80A24,24,0,0,0,208,56Zm8,136a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V80a8,8,0,0,1,8-8H80a8,8,0,0,0,6.66-3.56L100.28,48h55.43l13.63,20.44A8,8,0,0,0,176,72h32a8,8,0,0,1,8,8ZM128,88a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,88Zm0,72a28,28,0,1,1,28-28A28,28,0,0,1,128,160Z"/>'),RG="camera",VG=Object.freeze(Object.defineProperty({__proto__:null,bold:PG,default:C_,duotone:IG,fill:OG,glyphName:RG,light:NG,regular:C_,thin:TG},Symbol.toStringTag,{value:"Module"})),rl=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},DG=rl("cube","0 0 256 256",'<path d="M221.76,69.66l-88-48.18a12,12,0,0,0-11.52,0l-88,48.18A12,12,0,0,0,28,80.18v95.64a12,12,0,0,0,6.24,10.52l88,48.18a11.95,11.95,0,0,0,11.52,0l88-48.18A12,12,0,0,0,228,175.82V80.18A12,12,0,0,0,221.76,69.66ZM126.08,28.5a3.94,3.94,0,0,1,3.84,0L216.67,76,128,124.52,39.33,76Zm-88,150.83A4,4,0,0,1,36,175.82V83.29l88,48.16v94.91Zm179.84,0-85.92,47V131.45l88-48.16v92.53A4,4,0,0,1,217.92,179.32Z"/>'),ZG=rl("cube","0 0 256 256",'<path d="M222.72,67.9l-88-48.17a13.9,13.9,0,0,0-13.44,0l-88,48.18A14,14,0,0,0,26,80.18v95.64a14,14,0,0,0,7.28,12.27l88,48.18a13.92,13.92,0,0,0,13.44,0l88-48.18A14,14,0,0,0,230,175.82V80.18A14,14,0,0,0,222.72,67.9ZM127,30.25a2,2,0,0,1,1.92,0L212.51,76,128,122.24,43.49,76ZM39,177.57a2,2,0,0,1-1-1.75V86.66l84,46V223Zm177.92,0L134,223V132.64l84-46v89.16A2,2,0,0,1,217,177.57Z"/>'),k_=rl("cube","0 0 256 256",'<path d="M223.68,66.15,135.68,18h0a15.88,15.88,0,0,0-15.36,0l-88,48.17a16,16,0,0,0-8.32,14v95.64a16,16,0,0,0,8.32,14l88,48.17a15.88,15.88,0,0,0,15.36,0l88-48.17a16,16,0,0,0,8.32-14V80.18A16,16,0,0,0,223.68,66.15ZM128,32h0l80.34,44L128,120,47.66,76ZM40,90l80,43.78v85.79L40,175.82Zm96,129.57V133.82L216,90v85.78Z"/>'),BG=rl("cube","0 0 256 256",'<path d="M225.6,62.64l-88-48.17a19.91,19.91,0,0,0-19.2,0l-88,48.17A20,20,0,0,0,20,80.19v95.62a20,20,0,0,0,10.4,17.55l88,48.17a19.89,19.89,0,0,0,19.2,0l88-48.17A20,20,0,0,0,236,175.81V80.19A20,20,0,0,0,225.6,62.64ZM128,36.57,200,76,128,115.4,56,76ZM44,96.79l72,39.4v76.67L44,173.44Zm96,116.07V136.19l72-39.4v76.65Z"/>'),FG=rl("cube","0 0 256 256",'<path d="M223.68,66.15,135.68,18a15.88,15.88,0,0,0-15.36,0l-88,48.17a16,16,0,0,0-8.32,14v95.64a16,16,0,0,0,8.32,14l88,48.17a15.88,15.88,0,0,0,15.36,0l88-48.17a16,16,0,0,0,8.32-14V80.18A16,16,0,0,0,223.68,66.15ZM128,120,47.65,76,128,32l80.35,44Zm8,99.64V133.83l80-43.78v85.76Z"/>'),zG=rl("cube","0 0 256 256",'<path d="M128,129.09V232a8,8,0,0,1-3.84-1l-88-48.16a8,8,0,0,1-4.16-7V80.2a8,8,0,0,1,.7-3.27Z" opacity="0.2"/><path d="M223.68,66.15,135.68,18h0a15.88,15.88,0,0,0-15.36,0l-88,48.17a16,16,0,0,0-8.32,14v95.64a16,16,0,0,0,8.32,14l88,48.17a15.88,15.88,0,0,0,15.36,0l88-48.17a16,16,0,0,0,8.32-14V80.18A16,16,0,0,0,223.68,66.15ZM128,32h0l80.34,44L128,120,47.66,76ZM40,90l80,43.78v85.79L40,175.82Zm96,129.57V133.82L216,90v85.78Z"/>'),UG="cube",WG=Object.freeze(Object.defineProperty({__proto__:null,bold:BG,default:k_,duotone:zG,fill:FG,glyphName:UG,light:ZG,regular:k_,thin:DG},Symbol.toStringTag,{value:"Module"})),sl=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},jG=sl("door","0 0 256 256",'<path d="M232,220H204V40a12,12,0,0,0-12-12H64A12,12,0,0,0,52,40V220H24a4,4,0,0,0,0,8H232a4,4,0,0,0,0-8ZM60,40a4,4,0,0,1,4-4H192a4,4,0,0,1,4,4V220H60Zm104,92a8,8,0,1,1-8-8A8,8,0,0,1,164,132Z"/>'),KG=sl("door","0 0 256 256",'<path d="M232,218H206V40a14,14,0,0,0-14-14H64A14,14,0,0,0,50,40V218H24a6,6,0,0,0,0,12H232a6,6,0,0,0,0-12ZM62,40a2,2,0,0,1,2-2H192a2,2,0,0,1,2,2V218H62Zm104,92a10,10,0,1,1-10-10A10,10,0,0,1,166,132Z"/>'),A_=sl("door","0 0 256 256",'<path d="M232,216H208V40a16,16,0,0,0-16-16H64A16,16,0,0,0,48,40V216H24a8,8,0,0,0,0,16H232a8,8,0,0,0,0-16ZM64,40H192V216H64Zm104,92a12,12,0,1,1-12-12A12,12,0,0,1,168,132Z"/>'),qG=sl("door","0 0 256 256",'<path d="M232,212H212V40a20,20,0,0,0-20-20H64A20,20,0,0,0,44,40V212H24a12,12,0,0,0,0,24H232a12,12,0,0,0,0-24ZM68,44H188V212H68Zm104,88a16,16,0,1,1-16-16A16,16,0,0,1,172,132Z"/>'),GG=sl("door","0 0 256 256",'<path d="M232,216H208V40a16,16,0,0,0-16-16H64A16,16,0,0,0,48,40V216H24a8,8,0,0,0,0,16H232a8,8,0,0,0,0-16Zm-68-72a12,12,0,1,1,12-12A12,12,0,0,1,164,144Z"/>'),YG=sl("door","0 0 256 256",'<path d="M200,40V224H56V40a8,8,0,0,1,8-8H192A8,8,0,0,1,200,40Z" opacity="0.2"/><path d="M232,216H208V40a16,16,0,0,0-16-16H64A16,16,0,0,0,48,40V216H24a8,8,0,0,0,0,16H232a8,8,0,0,0,0-16ZM64,40H192V216H64Zm104,92a12,12,0,1,1-12-12A12,12,0,0,1,168,132Z"/>'),XG="door",JG=Object.freeze(Object.defineProperty({__proto__:null,bold:qG,default:A_,duotone:YG,fill:GG,glyphName:XG,light:KG,regular:A_,thin:jG},Symbol.toStringTag,{value:"Module"})),al=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},QG=al("drop","0 0 256 256",'<path d="M171,50.38a250,250,0,0,0-40.73-37.66,4,4,0,0,0-4.58,0A250,250,0,0,0,85,50.38C58.17,81.21,44,113.58,44,144a84,84,0,0,0,168,0C212,113.58,197.83,81.21,171,50.38ZM128,220a76.08,76.08,0,0,1-76-76c0-35.9,21.15-67.8,38.9-88.24A255,255,0,0,1,128,21a255,255,0,0,1,37.1,34.8C182.85,76.2,204,108.1,204,144A76.08,76.08,0,0,1,128,220Zm51.94-67.33a53.51,53.51,0,0,1-43.28,43.27,3.68,3.68,0,0,1-.66.06,4,4,0,0,1-.66-7.94c18.18-3.06,33.63-18.51,36.72-36.73a4,4,0,0,1,7.88,1.34Z"/>'),eY=al("drop","0 0 256 256",'<path d="M172.53,49.06a252.86,252.86,0,0,0-41.09-38,6,6,0,0,0-6.88,0,252.86,252.86,0,0,0-41.09,38C56.34,80.26,42,113.09,42,144a86,86,0,0,0,172,0C214,113.09,199.66,80.26,172.53,49.06ZM128,218a74.09,74.09,0,0,1-74-74c0-59.62,59-108.93,74-120.51C143,35.07,202,84.38,202,144A74.09,74.09,0,0,1,128,218Zm53.92-65A55.58,55.58,0,0,1,137,197.92a7,7,0,0,1-1,.08,6,6,0,0,1-1-11.92c17.38-2.92,32.13-17.68,35.08-35.08a6,6,0,1,1,11.84,2Z"/>'),M_=al("drop","0 0 256 256",'<path d="M174,47.75a254.19,254.19,0,0,0-41.45-38.3,8,8,0,0,0-9.18,0A254.19,254.19,0,0,0,82,47.75C54.51,79.32,40,112.6,40,144a88,88,0,0,0,176,0C216,112.6,201.49,79.32,174,47.75ZM128,216a72.08,72.08,0,0,1-72-72c0-57.23,55.47-105,72-118,16.53,13,72,60.75,72,118A72.08,72.08,0,0,1,128,216Zm55.89-62.66a57.6,57.6,0,0,1-46.56,46.55A8.75,8.75,0,0,1,136,200a8,8,0,0,1-1.32-15.89c16.57-2.79,30.63-16.85,33.44-33.45a8,8,0,0,1,15.78,2.68Z"/>'),tY=al("drop","0 0 256 256",'<path d="M134.88,6.17a12,12,0,0,0-13.76,0,259,259,0,0,0-42.18,39C50.85,77.43,36,111.62,36,144a92,92,0,0,0,184,0C220,66.64,138.36,8.6,134.88,6.17ZM128,212a68.07,68.07,0,0,1-68-68c0-33.31,20-63.37,36.7-82.71A249.35,249.35,0,0,1,128,31.11a249.35,249.35,0,0,1,31.3,30.18C176,80.63,196,110.69,196,144A68.07,68.07,0,0,1,128,212Zm49.62-52.4a52,52,0,0,1-34,34,12.2,12.2,0,0,1-3.6.55,12,12,0,0,1-3.6-23.45,28,28,0,0,0,18.32-18.32,12,12,0,0,1,22.9,7.2Z"/>'),iY=al("drop","0 0 256 256",'<path d="M174,47.75a254.19,254.19,0,0,0-41.45-38.3,8,8,0,0,0-9.18,0A254.19,254.19,0,0,0,82,47.75C54.51,79.32,40,112.6,40,144a88,88,0,0,0,176,0C216,112.6,201.49,79.32,174,47.75Zm9.85,105.59a57.6,57.6,0,0,1-46.56,46.55A8.75,8.75,0,0,1,136,200a8,8,0,0,1-1.32-15.89c16.57-2.79,30.63-16.85,33.44-33.45a8,8,0,0,1,15.78,2.68Z"/>'),nY=al("drop","0 0 256 256",'<path d="M208,144a80,80,0,0,1-160,0c0-72,80-128,80-128S208,72,208,144Z" opacity="0.2"/><path d="M174,47.75a254.19,254.19,0,0,0-41.45-38.3,8,8,0,0,0-9.18,0A254.19,254.19,0,0,0,82,47.75C54.51,79.32,40,112.6,40,144a88,88,0,0,0,176,0C216,112.6,201.49,79.32,174,47.75ZM128,216a72.08,72.08,0,0,1-72-72c0-57.23,55.47-105,72-118,16.53,13,72,60.75,72,118A72.08,72.08,0,0,1,128,216Zm55.89-62.66a57.6,57.6,0,0,1-46.56,46.55A8.75,8.75,0,0,1,136,200a8,8,0,0,1-1.32-15.89c16.57-2.79,30.63-16.85,33.44-33.45a8,8,0,0,1,15.78,2.68Z"/>'),rY="drop",sY=Object.freeze(Object.defineProperty({__proto__:null,bold:tY,default:M_,duotone:nY,fill:iY,glyphName:rY,light:eY,regular:M_,thin:QG},Symbol.toStringTag,{value:"Module"})),ll=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},aY=ll("fan","0 0 256 256",'<path d="M229.12,136a56,56,0,0,0-86-31.56,28.25,28.25,0,0,0-4.56-2.39l17.27-68.94a4,4,0,0,0-1.72-4.34A56,56,0,1,0,100,126.62c0,.46,0,.92,0,1.38a27.39,27.39,0,0,0,.26,3.76L31.91,151.28A4,4,0,0,0,29,154.94a56,56,0,0,0,41.45,56.62,56.46,56.46,0,0,0,14.59,1.93,56.07,56.07,0,0,0,55.73-60.59,27.93,27.93,0,0,0,4.33-2.77l51.09,49.44A4,4,0,0,0,199,200.7a4.06,4.06,0,0,0,1.84-.45A56,56,0,0,0,229.12,136ZM128,148a20,20,0,1,1,20-20A20,20,0,0,1,128,148ZM76,76a48,48,0,0,1,71.4-41.92l-16.55,66.06c-.94-.09-1.89-.14-2.85-.14a28.06,28.06,0,0,0-26.34,18.49A47.82,47.82,0,0,1,76,76Zm33,123a48,48,0,0,1-72-40.87l65.5-18.7A28,28,0,0,0,128,156a28.81,28.81,0,0,0,4.94-.44A47.81,47.81,0,0,1,109,199ZM216.6,174.54a47.93,47.93,0,0,1-17,17.22l-49-47.37a27.91,27.91,0,0,0-1.3-34.44,48,48,0,0,1,67.22,64.59Z"/>'),lY=ll("fan","0 0 256 256",'<path d="M231.06,135.52a58,58,0,0,0-88-33.42c-.69-.41-1.41-.8-2.14-1.15l16.86-67.32a6,6,0,0,0-2.58-6.51A58,58,0,1,0,98,127.86V128c0,.77,0,1.54.1,2.3L31.37,149.36A6,6,0,0,0,27,154.85,58,58,0,1,0,142.88,154c.7-.4,1.39-.83,2.06-1.29L194.81,201a6,6,0,0,0,6.94,1,58,58,0,0,0,29.31-66.51ZM110,128a18,18,0,1,1,18,18A18,18,0,0,1,110,128ZM78,76a46,46,0,0,1,67.08-40.9L129.32,98q-.66,0-1.32,0a30,30,0,0,0-27.33,17.66A45.84,45.84,0,0,1,78,76Zm30,121.3a46,46,0,0,1-69-37.64l62.39-17.82A30,30,0,0,0,128,158a29.29,29.29,0,0,0,3-.15A45.85,45.85,0,0,1,108,197.3Zm106.9-23.76a45.91,45.91,0,0,1-15,15.7l-46.63-45.12a29.91,29.91,0,0,0-.93-33.62,46,46,0,0,1,62.52,63Z"/>'),$_=ll("fan","0 0 256 256",'<path d="M233,135a60,60,0,0,0-89.62-35.45l16.39-65.44a8,8,0,0,0-3.45-8.68A60,60,0,1,0,95.69,128.91L30.82,147.44a8,8,0,0,0-5.8,7.32,60,60,0,0,0,44.42,60.66,60.52,60.52,0,0,0,15.62,2.07,60.07,60.07,0,0,0,59.88-62l48.48,46.92a8,8,0,0,0,9.25,1.35A60,60,0,0,0,233,135Zm-121-7a16,16,0,1,1,16,16A16,16,0,0,1,112,128ZM80,76a44,44,0,0,1,62.75-39.82L127.77,96A32,32,0,0,0,99.85,112.8,43.85,43.85,0,0,1,80,76Zm27,119.57a44,44,0,0,1-65.86-34.43l59.31-16.94A32,32,0,0,0,128,160l.91,0A43.82,43.82,0,0,1,107,195.57Zm106.17-23a43.92,43.92,0,0,1-13,14.14l-44.32-42.89a31.91,31.91,0,0,0-.59-32.57,44,44,0,0,1,57.91,61.32Z"/>'),oY=ll("fan","0 0 256 256",'<path d="M236.85,134a64,64,0,0,0-87.43-42.11l14.22-56.77a12,12,0,0,0-5.17-13A64,64,0,0,0,86,127.52L29.72,143.59a12,12,0,0,0-8.69,11,64,64,0,0,0,127.56,10l42,40.7a12,12,0,0,0,13.86,2A64,64,0,0,0,236.85,134ZM116,128a12,12,0,1,1,12,12A12,12,0,0,1,116,128Zm8-92a40,40,0,0,1,14,2.53L124.6,92.17a36,36,0,0,0-25.85,14.88A40,40,0,0,1,124,36ZM105,192.1A40,40,0,0,1,45.5,164l53.18-15.19a36,36,0,0,0,25.8,15A39.84,39.84,0,0,1,105,192.1Zm104.7-21.56a39.92,39.92,0,0,1-9.21,10.89L160.73,143a35.9,35.9,0,0,0,.05-29.83,40,40,0,0,1,48.89,57.4Z"/>'),cY=ll("fan","0 0 256 256",'<path d="M233,135a60,60,0,0,0-89.62-35.45l16.39-65.44a8,8,0,0,0-3.45-8.68A60,60,0,1,0,95.69,128.91L30.82,147.44a8,8,0,0,0-5.8,7.32,60,60,0,0,0,44.42,60.66,60.52,60.52,0,0,0,15.62,2.07,60.07,60.07,0,0,0,59.88-62l48.48,46.92a8,8,0,0,0,9.25,1.35A60,60,0,0,0,233,135ZM130.44,147.85a20,20,0,1,1,17.41-22.29A20,20,0,0,1,130.44,147.85Z"/>'),uY=ll("fan","0 0 256 256",'<path d="M136.5,150.45A52,52,0,1,1,33,155.13l71.91-20.54h0A24,24,0,0,0,128,152a23.75,23.75,0,0,0,8.5-1.56Zm-32.19-26.31h0a24,24,0,0,1,29.52-19.42h0L152,32.17a52,52,0,1,0-47.69,92ZM201,105.5a52,52,0,0,0-57.84,3.91h0a24,24,0,0,1,2.06,35.26h0l53.74,52a52,52,0,0,0,2-91.2Z" opacity="0.2"/><path d="M233,135a60,60,0,0,0-89.62-35.45l16.39-65.44a8,8,0,0,0-3.45-8.68A60,60,0,1,0,95.69,128.91L30.82,147.44a8,8,0,0,0-5.8,7.32,60,60,0,0,0,44.42,60.66,60.52,60.52,0,0,0,15.62,2.07,60.07,60.07,0,0,0,59.88-62l48.48,46.92a8,8,0,0,0,9.25,1.35A60,60,0,0,0,233,135Zm-121-7a16,16,0,1,1,16,16A16,16,0,0,1,112,128ZM80,76a44,44,0,0,1,62.75-39.82L127.77,96A32,32,0,0,0,99.85,112.8,43.85,43.85,0,0,1,80,76Zm27,119.57a44,44,0,0,1-65.86-34.43l59.31-16.94A32,32,0,0,0,128,160l.91,0A43.82,43.82,0,0,1,107,195.57Zm106.17-23a43.92,43.92,0,0,1-13,14.14l-44.32-42.89a31.91,31.91,0,0,0-.59-32.57,44,44,0,0,1,57.91,61.32Z"/>'),dY="fan",hY=Object.freeze(Object.defineProperty({__proto__:null,bold:oY,default:$_,duotone:uY,fill:cY,glyphName:dY,light:lY,regular:$_,thin:aY},Symbol.toStringTag,{value:"Module"})),ol=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},fY=ol("game-controller","0 0 256 256",'<path d="M176,108H152a4,4,0,0,1,0-8h24a4,4,0,0,1,0,8Zm-72-8H92V88a4,4,0,0,0-8,0v12H72a4,4,0,0,0,0,8H84v12a4,4,0,0,0,8,0V108h12a4,4,0,0,0,0-8Zm134.21,98.36a32,32,0,0,1-48.84,4.27l-.17-.18L148.29,156H107.72L66.81,202.44l-.18.19A32.08,32.08,0,0,1,44,212a32,32,0,0,1-31.5-37.56L28.87,90.21A55.87,55.87,0,0,1,83.89,44H172a56.07,56.07,0,0,1,55.1,46.1.29.29,0,0,1,0,.1l16.37,84.16A31.86,31.86,0,0,1,238.21,198.36ZM172,148a48,48,0,1,0,0-96H83.9A47.9,47.9,0,0,0,36.74,91.67L20.36,175.9a24,24,0,0,0,19.48,27.73,24,24,0,0,0,21-6.58l42-47.69a4,4,0,0,1,3-1.36Zm63.63,27.83-11-56.66A56.09,56.09,0,0,1,172,156H159l36.16,41.06a24,24,0,0,0,40.52-21.23Z"/>'),pY=ol("game-controller","0 0 256 256",'<path d="M176,110H152a6,6,0,0,1,0-12h24a6,6,0,0,1,0,12ZM104,98H94V88a6,6,0,0,0-12,0V98H72a6,6,0,0,0,0,12H82v10a6,6,0,0,0,12,0V110h10a6,6,0,0,0,0-12ZM239.84,199.5A34,34,0,0,1,212,214,34.11,34.11,0,0,1,188,204.05l-.26-.28L147.38,158H108.62L68.31,203.76,68,204A34,34,0,0,1,44,214a34,34,0,0,1-33.46-39.91s0-.06,0-.1L26.9,89.88A57.89,57.89,0,0,1,83.89,42H172a58.07,58.07,0,0,1,57.05,47.63c0,.07,0,.12,0,.19L245.46,174s0,.07,0,.11A33.75,33.75,0,0,1,239.84,199.5ZM172,146a46,46,0,0,0,0-92H83.89A45.9,45.9,0,0,0,38.71,92a.36.36,0,0,0,0,.1L22.33,176.23a22,22,0,0,0,37.11,19.45l42-47.65a6,6,0,0,1,4.5-2Zm61.67,30.23-9.79-50.35A58.06,58.06,0,0,1,172,158h-8.63l33.19,37.68a22,22,0,0,0,37.11-19.45Z"/>'),L_=ol("game-controller","0 0 256 256",'<path d="M176,112H152a8,8,0,0,1,0-16h24a8,8,0,0,1,0,16ZM104,96H96V88a8,8,0,0,0-16,0v8H72a8,8,0,0,0,0,16h8v8a8,8,0,0,0,16,0v-8h8a8,8,0,0,0,0-16ZM241.48,200.65a36,36,0,0,1-54.94,4.81c-.12-.12-.24-.24-.35-.37L146.48,160h-37L69.81,205.09l-.35.37A36.08,36.08,0,0,1,44,216,36,36,0,0,1,8.56,173.75a.68.68,0,0,1,0-.14L24.93,89.52A59.88,59.88,0,0,1,83.89,40H172a60.08,60.08,0,0,1,59,49.25c0,.06,0,.12,0,.18l16.37,84.17a.68.68,0,0,1,0,.14A35.74,35.74,0,0,1,241.48,200.65ZM172,144a44,44,0,0,0,0-88H83.89A43.9,43.9,0,0,0,40.68,92.37l0,.13L24.3,176.59A20,20,0,0,0,58,194.3l41.92-47.59a8,8,0,0,1,6-2.71Zm59.7,32.59-8.74-45A60,60,0,0,1,172,160h-4.2L198,194.31a20.09,20.09,0,0,0,17.46,5.39,20,20,0,0,0,16.23-23.11Z"/>'),_Y=ol("game-controller","0 0 256 256",'<path d="M176,116H152a12,12,0,0,1,0-24h24a12,12,0,0,1,0,24ZM104,92h-4V88a12,12,0,0,0-24,0v4H72a12,12,0,0,0,0,24h4v4a12,12,0,0,0,24,0v-4h4a12,12,0,0,0,0-24ZM244.76,202.94a40,40,0,0,1-61,5.35,7,7,0,0,1-.53-.56L144.67,164H111.33L72.81,207.73c-.17.19-.35.38-.53.56A40,40,0,0,1,4.62,173.05a1.18,1.18,0,0,1,0-.2L21,88.79A63.88,63.88,0,0,1,83.88,36H172a64.08,64.08,0,0,1,62.93,52.48,1.8,1.8,0,0,1,0,.19l16.36,84.17a1.77,1.77,0,0,1,0,.2A39.74,39.74,0,0,1,244.76,202.94ZM172,140a40,40,0,0,0,0-80H83.89A39.9,39.9,0,0,0,44.62,93.06a1.55,1.55,0,0,0,0,.21l-16.34,84a16,16,0,0,0,13,18.44,16.07,16.07,0,0,0,13.86-4.21L96.9,144.07a12,12,0,0,1,9-4.07Zm55.76,37.31-7-35.95a63.84,63.84,0,0,1-44.27,22.46l24.41,27.72a16,16,0,0,0,26.85-14.23Z"/>'),mY=ol("game-controller","0 0 256 256",'<path d="M247.44,173.75a.68.68,0,0,0,0-.14L231.05,89.44c0-.06,0-.12,0-.18A60.08,60.08,0,0,0,172,40H83.89a59.88,59.88,0,0,0-59,49.52L8.58,173.61a.68.68,0,0,0,0,.14,36,36,0,0,0,60.9,31.71l.35-.37L109.52,160h37l39.71,45.09c.11.13.23.25.35.37A36.08,36.08,0,0,0,212,216a36,36,0,0,0,35.43-42.25ZM104,112H96v8a8,8,0,0,1-16,0v-8H72a8,8,0,0,1,0-16h8V88a8,8,0,0,1,16,0v8h8a8,8,0,0,1,0,16Zm40-8a8,8,0,0,1,8-8h24a8,8,0,0,1,0,16H152A8,8,0,0,1,144,104Zm84.37,87.47a19.84,19.84,0,0,1-12.9,8.23A20.09,20.09,0,0,1,198,194.31L167.8,160H172a60,60,0,0,0,51-28.38l8.74,45A19.82,19.82,0,0,1,228.37,191.47Z"/>'),vY=ol("game-controller","0 0 256 256",'<path d="M216.86,207.57a28,28,0,0,1-24.66-7.77L150.09,152H172a51.94,51.94,0,0,0,51.2-61h0l16.36,84.17A28,28,0,0,1,216.86,207.57Z" opacity="0.2"/><path d="M176,112H152a8,8,0,0,1,0-16h24a8,8,0,0,1,0,16ZM104,96H96V88a8,8,0,0,0-16,0v8H72a8,8,0,0,0,0,16h8v8a8,8,0,0,0,16,0v-8h8a8,8,0,0,0,0-16ZM241.48,200.65a36,36,0,0,1-54.94,4.81c-.12-.12-.24-.24-.35-.37L146.48,160h-37L69.81,205.09l-.35.37A36.08,36.08,0,0,1,44,216,36,36,0,0,1,8.56,173.75a.68.68,0,0,1,0-.14L24.93,89.52A59.88,59.88,0,0,1,83.89,40H172a60.08,60.08,0,0,1,59,49.25c0,.06,0,.12,0,.18l16.37,84.17a.68.68,0,0,1,0,.14A35.74,35.74,0,0,1,241.48,200.65ZM172,144a44,44,0,0,0,0-88H83.89A43.9,43.9,0,0,0,40.68,92.37l0,.13L24.3,176.59A20,20,0,0,0,58,194.3l41.92-47.59a8,8,0,0,1,6-2.71Zm59.7,32.59-8.74-45A60,60,0,0,1,172,160h-4.2L198,194.31a20.09,20.09,0,0,0,17.46,5.39,20,20,0,0,0,16.23-23.11Z"/>'),gY="game-controller",bY=Object.freeze(Object.defineProperty({__proto__:null,bold:_Y,default:L_,duotone:vY,fill:mY,glyphName:gY,light:pY,regular:L_,thin:fY},Symbol.toStringTag,{value:"Module"})),cl=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},yY=cl("garage","0 0 256 256",'<path d="M240,196H228V98.67a12,12,0,0,0-5.34-10L134.66,30a12,12,0,0,0-13.32,0l-88,58.67a12,12,0,0,0-5.34,10V196H16a4,4,0,0,0,0,8H240a4,4,0,0,0,0-8ZM36,98.67a4,4,0,0,1,1.78-3.33l88-58.66a4,4,0,0,1,4.44,0l88,58.66A4,4,0,0,1,220,98.67V196H188V136a4,4,0,0,0-4-4H72a4,4,0,0,0-4,4v60H36ZM180,140v24H132V140Zm-56,24H76V140h48Zm-48,8h48v24H76Zm56,0h48v24H132Z"/>'),wY=cl("garage","0 0 256 256",'<path d="M240,194H230V98.67A14,14,0,0,0,223.77,87l-88-58.66a14,14,0,0,0-15.54,0L32.23,87A14,14,0,0,0,26,98.67V194H16a6,6,0,0,0,0,12H240a6,6,0,0,0,0-12ZM38,98.67A2,2,0,0,1,38.89,97l88-58.67a2,2,0,0,1,2.22,0l88,58.67a2,2,0,0,1,.89,1.66V194H190V136a6,6,0,0,0-6-6H72a6,6,0,0,0-6,6v58H38ZM178,142v20H134V142Zm-56,20H78V142h44ZM78,174h44v20H78Zm56,0h44v20H134Z"/>'),E_=cl("garage","0 0 256 256",'<path d="M240,192h-8V98.67a16,16,0,0,0-7.12-13.31l-88-58.67a16,16,0,0,0-17.75,0l-88,58.67A16,16,0,0,0,24,98.67V192H16a8,8,0,0,0,0,16H240a8,8,0,0,0,0-16ZM40,98.67,128,40l88,58.66V192H192V136a8,8,0,0,0-8-8H72a8,8,0,0,0-8,8v56H40ZM176,144v16H136V144Zm-56,16H80V144h40ZM80,176h40v16H80Zm56,0h40v16H136Z"/>'),SY=cl("garage","0 0 256 256",'<path d="M240,188h-4V98.67A20,20,0,0,0,227.09,82l-88-58.66a19.94,19.94,0,0,0-22.18,0L28.91,82A20,20,0,0,0,20,98.67V188H16a12,12,0,0,0,0,24H240a12,12,0,0,0,0-24ZM44,100.81l84-56,84,56V188H196V120a12,12,0,0,0-12-12H72a12,12,0,0,0-12,12v68H44ZM172,132v16H140V132Zm-56,16H84V132h32ZM84,172h32v16H84Zm56,0h32v16H140Z"/>'),CY=cl("garage","0 0 256 256",'<path d="M240,192h-8V98.67a16,16,0,0,0-7.12-13.31l-88-58.67a16,16,0,0,0-17.75,0l-88,58.67A16,16,0,0,0,24,98.67V192H16a8,8,0,0,0,0,16H240a8,8,0,0,0,0-16ZM136,128h56v24H136Zm-16,24H64V128h56ZM64,168h56v24H64Zm72,0h56v24H136Z"/>'),kY=cl("garage","0 0 256 256",'<path d="M184,136v64H72V136Z" opacity="0.2"/><path d="M240,192h-8V98.67a16,16,0,0,0-7.12-13.31l-88-58.67a16,16,0,0,0-17.75,0l-88,58.67A16,16,0,0,0,24,98.67V192H16a8,8,0,0,0,0,16H240a8,8,0,0,0,0-16ZM40,98.67,128,40l88,58.66V192H192V136a8,8,0,0,0-8-8H72a8,8,0,0,0-8,8v56H40ZM176,144v16H136V144Zm-56,16H80V144h40ZM80,176h40v16H80Zm56,0h40v16H136Z"/>'),AY="garage",MY=Object.freeze(Object.defineProperty({__proto__:null,bold:SY,default:E_,duotone:kY,fill:CY,glyphName:AY,light:wY,regular:E_,thin:yY},Symbol.toStringTag,{value:"Module"})),ul=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},$Y=ul("house","0 0 256 256",'<path d="M216.49,111.51l-80-80a12,12,0,0,0-17,0l-80,80A12,12,0,0,0,36,120v96a4,4,0,0,0,4,4h64a4,4,0,0,0,4-4V156h40v60a4,4,0,0,0,4,4h64a4,4,0,0,0,4-4V120A12,12,0,0,0,216.49,111.51ZM212,212H156V152a4,4,0,0,0-4-4H104a4,4,0,0,0-4,4v60H44V120a4,4,0,0,1,1.17-2.83l80-80a4,4,0,0,1,5.66,0l80,80A4,4,0,0,1,212,120Z"/>'),LY=ul("house","0 0 256 256",'<path d="M217.9,110.1l-80-80a14,14,0,0,0-19.8,0l-80,80A13.92,13.92,0,0,0,34,120v96a6,6,0,0,0,6,6h64a6,6,0,0,0,6-6V158h36v58a6,6,0,0,0,6,6h64a6,6,0,0,0,6-6V120A13.92,13.92,0,0,0,217.9,110.1ZM210,210H158V152a6,6,0,0,0-6-6H104a6,6,0,0,0-6,6v58H46V120a2,2,0,0,1,.58-1.42l80-80a2,2,0,0,1,2.84,0l80,80A2,2,0,0,1,210,120Z"/>'),x_=ul("house","0 0 256 256",'<path d="M219.31,108.68l-80-80a16,16,0,0,0-22.62,0l-80,80A15.87,15.87,0,0,0,32,120v96a8,8,0,0,0,8,8h64a8,8,0,0,0,8-8V160h32v56a8,8,0,0,0,8,8h64a8,8,0,0,0,8-8V120A15.87,15.87,0,0,0,219.31,108.68ZM208,208H160V152a8,8,0,0,0-8-8H104a8,8,0,0,0-8,8v56H48V120l80-80,80,80Z"/>'),EY=ul("house","0 0 256 256",'<path d="M222.14,105.85l-80-80a20,20,0,0,0-28.28,0l-80,80A19.86,19.86,0,0,0,28,120v96a12,12,0,0,0,12,12h64a12,12,0,0,0,12-12V164h24v52a12,12,0,0,0,12,12h64a12,12,0,0,0,12-12V120A19.86,19.86,0,0,0,222.14,105.85ZM204,204H164V152a12,12,0,0,0-12-12H104a12,12,0,0,0-12,12v52H52V121.65l76-76,76,76Z"/>'),xY=ul("house","0 0 256 256",'<path d="M224,120v96a8,8,0,0,1-8,8H160a8,8,0,0,1-8-8V164a4,4,0,0,0-4-4H108a4,4,0,0,0-4,4v52a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V120a16,16,0,0,1,4.69-11.31l80-80a16,16,0,0,1,22.62,0l80,80A16,16,0,0,1,224,120Z"/>'),HY=ul("house","0 0 256 256",'<path d="M216,120v96H152V152H104v64H40V120a8,8,0,0,1,2.34-5.66l80-80a8,8,0,0,1,11.32,0l80,80A8,8,0,0,1,216,120Z" opacity="0.2"/><path d="M219.31,108.68l-80-80a16,16,0,0,0-22.62,0l-80,80A15.87,15.87,0,0,0,32,120v96a8,8,0,0,0,8,8h64a8,8,0,0,0,8-8V160h32v56a8,8,0,0,0,8,8h64a8,8,0,0,0,8-8V120A15.87,15.87,0,0,0,219.31,108.68ZM208,208H160V152a8,8,0,0,0-8-8H104a8,8,0,0,0-8,8v56H48V120l80-80,80,80Z"/>'),TY="house",NY=Object.freeze(Object.defineProperty({__proto__:null,bold:EY,default:x_,duotone:HY,fill:xY,glyphName:TY,light:LY,regular:x_,thin:$Y},Symbol.toStringTag,{value:"Module"})),dl=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},PY=dl("intersect","0 0 256 256",'<path d="M171.17,84.83a76,76,0,1,0-86.34,86.34,76,76,0,1,0,86.34-86.34ZM28,96A68,68,0,0,1,162.93,84.07c-1,0-2-.07-2.93-.07a76.08,76.08,0,0,0-76,76c0,1,0,2,.07,2.93A68.1,68.1,0,0,1,28,96Zm136,0a67.59,67.59,0,0,1-7.45,30.89L129.11,99.45A67.59,67.59,0,0,1,160,92c1.3,0,2.6,0,3.88.12C164,93.4,164,94.7,164,96ZM92,160a67.59,67.59,0,0,1,7.45-30.89l27.44,27.44A67.59,67.59,0,0,1,96,164c-1.3,0-2.6-.05-3.88-.12C92.05,162.6,92,161.3,92,160Zm42-7.64L103.64,122A68.74,68.74,0,0,1,122,103.64L152.36,134A68.74,68.74,0,0,1,134,152.36ZM160,228a68.1,68.1,0,0,1-66.93-56.07c1,0,2,.07,2.93.07a76.08,76.08,0,0,0,76-76c0-1,0-2-.07-2.93A68,68,0,0,1,160,228Z"/>'),OY=dl("intersect","0 0 256 256",'<path d="M172.91,83.09a78,78,0,1,0-89.82,89.82,78,78,0,1,0,89.82-89.82ZM30,96A66,66,0,0,1,160.49,82H160a78.09,78.09,0,0,0-78,78c0,.17,0,.33,0,.49A66.1,66.1,0,0,1,30,96Zm64,64a65.62,65.62,0,0,1,6-27.49L123.49,156A65.62,65.62,0,0,1,96,162c-.65,0-1.3,0-2-.05C94,161.3,94,160.65,94,160Zm40.23-10.25-28-28a66.47,66.47,0,0,1,15.52-15.52l28,28A66.47,66.47,0,0,1,134.23,149.75ZM162,96a65.62,65.62,0,0,1-6,27.49L132.51,100A65.62,65.62,0,0,1,160,94c.65,0,1.3,0,1.95,0C162,94.7,162,95.35,162,96Zm-2,130a66.1,66.1,0,0,1-64.49-52H96a78.09,78.09,0,0,0,78-78c0-.17,0-.33,0-.49A66,66,0,0,1,160,226Z"/>'),H_=dl("intersect","0 0 256 256",'<path d="M174.63,81.37a80,80,0,1,0-93.26,93.26,80,80,0,1,0,93.26-93.26ZM100.69,136,120,155.31A63.48,63.48,0,0,1,96,160,63.48,63.48,0,0,1,100.69,136Zm33.75,11.13-25.57-25.57a64.65,64.65,0,0,1,12.69-12.69l25.57,25.57A64.65,64.65,0,0,1,134.44,147.13ZM155.31,120,136,100.69A63.48,63.48,0,0,1,160,96,63.48,63.48,0,0,1,155.31,120ZM32,96a64,64,0,0,1,126-16A80.08,80.08,0,0,0,80.05,158,64.11,64.11,0,0,1,32,96ZM160,224A64.11,64.11,0,0,1,98,176,80.08,80.08,0,0,0,176,98,64,64,0,0,1,160,224Z"/>'),IY=dl("intersect","0 0 256 256",'<path d="M178,78A84,84,0,1,0,78,178,84,84,0,1,0,178,78Zm-22.19,22.19a59.57,59.57,0,0,1-9.81,28.9L126.94,110A59.57,59.57,0,0,1,155.84,100.16Zm-79.5,52.51a60,60,0,1,1,76.33-76.33A84.11,84.11,0,0,0,76.34,152.67Zm23.82,3.17a59.57,59.57,0,0,1,9.81-28.9L129.06,146A59.57,59.57,0,0,1,100.16,155.84ZM160,220a60.09,60.09,0,0,1-56.67-40.34,84.11,84.11,0,0,0,76.33-76.33A60,60,0,0,1,160,220Z"/>'),RY=dl("intersect","0 0 256 256",'<path d="M174.63,81.37a80,80,0,1,0-93.26,93.26,80,80,0,1,0,93.26-93.26ZM32,96a64,64,0,0,1,126-16A80.08,80.08,0,0,0,80.05,158,64.11,64.11,0,0,1,32,96ZM160,224A64.11,64.11,0,0,1,98,176,80.08,80.08,0,0,0,176,98,64,64,0,0,1,160,224Z"/>'),VY=dl("intersect","0 0 256 256",'<path d="M168,96a72,72,0,0,1-72,72,73.37,73.37,0,0,1-7.6-.4A73.37,73.37,0,0,1,88,160a72,72,0,0,1,72-72,73.37,73.37,0,0,1,7.6.4A73.37,73.37,0,0,1,168,96Z" opacity="0.2"/><path d="M174.63,81.37a80,80,0,1,0-93.26,93.26,80,80,0,1,0,93.26-93.26ZM32,96a64,64,0,0,1,126-16A80.08,80.08,0,0,0,80.05,158,64.11,64.11,0,0,1,32,96Zm128,0a64.07,64.07,0,0,1-64,64A64.07,64.07,0,0,1,160,96Zm0,128A64.11,64.11,0,0,1,98,176,80.08,80.08,0,0,0,176,98,64,64,0,0,1,160,224Z"/>'),DY="intersect",ZY=Object.freeze(Object.defineProperty({__proto__:null,bold:IY,default:H_,duotone:VY,fill:RY,glyphName:DY,light:OY,regular:H_,thin:PY},Symbol.toStringTag,{value:"Module"})),hl=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},BY=hl("lamp","0 0 256 256",'<path d="M243.68,150.42l-48-112A4,4,0,0,0,192,36H64a4,4,0,0,0-3.68,2.42l-48,112A4,4,0,0,0,16,156H124v56H96a4,4,0,0,0,0,8h64a4,4,0,0,0,0-8H132V156h64v36a4,4,0,0,0,8,0V156h36a4,4,0,0,0,3.68-5.58ZM22.07,148,66.64,44H189.36l44.57,104Z"/>'),FY=hl("lamp","0 0 256 256",'<path d="M245.51,149.64l-48-112A6,6,0,0,0,192,34H64a6,6,0,0,0-5.51,3.64l-48,112A6,6,0,0,0,16,158H122v52H96a6,6,0,0,0,0,12h64a6,6,0,0,0,0-12H134V158h60v34a6,6,0,0,0,12,0V158h34a6,6,0,0,0,5.51-8.36ZM25.1,146,68,46H188L230.9,146Z"/>'),T_=hl("lamp","0 0 256 256",'<path d="M247.35,148.85l-48-112A8,8,0,0,0,192,32H64a8,8,0,0,0-7.35,4.85l-48,112A8,8,0,0,0,16,160H120v48H96a8,8,0,0,0,0,16h64a8,8,0,0,0,0-16H136V160h56v32a8,8,0,0,0,16,0V160h32a8,8,0,0,0,7.35-11.15ZM28.13,144,69.28,48H186.72l41.15,96Z"/>'),zY=hl("lamp","0 0 256 256",'<path d="M251,147.27l-48-112A12,12,0,0,0,192,28H64a12,12,0,0,0-11,7.27l-48,112A12,12,0,0,0,16,164H116v40H96a12,12,0,0,0,0,24h64a12,12,0,0,0,0-24H140V164h48v28a12,12,0,0,0,24,0V164h28a12,12,0,0,0,11-16.73ZM34.2,140,71.91,52H184.09l37.71,88Z"/>'),UY=hl("lamp","0 0 256 256",'<path d="M246.68,156.4A8,8,0,0,1,240,160H208v32a8,8,0,0,1-16,0V160H136v48h24a8,8,0,0,1,0,16H96a8,8,0,0,1,0-16h24V160H16a8,8,0,0,1-7.35-11.15l48-112A8,8,0,0,1,64,32H192a8,8,0,0,1,7.35,4.85l48,112A8,8,0,0,1,246.68,156.4Z"/>'),WY=hl("lamp","0 0 256 256",'<path d="M240,152H16L64,40H192Z" opacity="0.2"/><path d="M247.35,148.85l-48-112A8,8,0,0,0,192,32H64a8,8,0,0,0-7.35,4.85l-48,112A8,8,0,0,0,16,160H120v48H96a8,8,0,0,0,0,16h64a8,8,0,0,0,0-16H136V160h56v32a8,8,0,0,0,16,0V160h32a8,8,0,0,0,7.35-11.15ZM28.13,144,69.28,48H186.72l41.15,96Z"/>'),jY="lamp",KY=Object.freeze(Object.defineProperty({__proto__:null,bold:zY,default:T_,duotone:WY,fill:UY,glyphName:jY,light:FY,regular:T_,thin:BY},Symbol.toStringTag,{value:"Module"})),fl=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},qY=fl("lightbulb","0 0 256 256",'<path d="M172,232a4,4,0,0,1-4,4H88a4,4,0,0,1,0-8h80A4,4,0,0,1,172,232Zm40-128a83.59,83.59,0,0,1-32.11,66.06A20.2,20.2,0,0,0,172,186v6a12,12,0,0,1-12,12H96a12,12,0,0,1-12-12v-6a20,20,0,0,0-7.76-15.81A83.58,83.58,0,0,1,44,104.47C43.75,59,80.52,21.09,126,20a84,84,0,0,1,86,84Zm-8,0a76,76,0,0,0-77.83-76C85,29,51.77,63.27,52,104.43a75.62,75.62,0,0,0,29.17,59.43A28,28,0,0,1,92,186v6a4,4,0,0,0,4,4h64a4,4,0,0,0,4-4v-6a28.14,28.14,0,0,1,10.94-22.2A75.62,75.62,0,0,0,204,104ZM136.66,52.06a4,4,0,0,0-1.32,7.88C153.53,63,169,78.45,172.06,96.67A4,4,0,0,0,176,100a3.88,3.88,0,0,0,.67-.06,4,4,0,0,0,3.27-4.61A53.51,53.51,0,0,0,136.66,52.06Z"/>'),GY=fl("lightbulb","0 0 256 256",'<path d="M174,232a6,6,0,0,1-6,6H88a6,6,0,0,1,0-12h80A6,6,0,0,1,174,232Zm40-128a85.56,85.56,0,0,1-32.88,67.64A18.23,18.23,0,0,0,174,186v6a14,14,0,0,1-14,14H96a14,14,0,0,1-14-14v-6a18,18,0,0,0-7-14.23h0a85.59,85.59,0,0,1-33-67.24C41.74,57.91,79.39,19.12,125.93,18A86,86,0,0,1,214,104Zm-12,0a74,74,0,0,0-75.79-74C86.17,31,53.78,64.34,54,104.42a73.67,73.67,0,0,0,28.4,57.87A29.92,29.92,0,0,1,94,186v6a2,2,0,0,0,2,2h64a2,2,0,0,0,2-2v-6a30.18,30.18,0,0,1,11.7-23.78A73.59,73.59,0,0,0,202,104Zm-20.08-9A55.58,55.58,0,0,0,137,50.08a6,6,0,1,0-2,11.84C152.38,64.84,167.13,79.6,170.08,97a6,6,0,0,0,5.91,5,6.87,6.87,0,0,0,1-.08A6,6,0,0,0,181.92,95Z"/>'),N_=fl("lightbulb","0 0 256 256",'<path d="M176,232a8,8,0,0,1-8,8H88a8,8,0,0,1,0-16h80A8,8,0,0,1,176,232Zm40-128a87.55,87.55,0,0,1-33.64,69.21A16.24,16.24,0,0,0,176,186v6a16,16,0,0,1-16,16H96a16,16,0,0,1-16-16v-6a16,16,0,0,0-6.23-12.66A87.59,87.59,0,0,1,40,104.49C39.74,56.83,78.26,17.14,125.88,16A88,88,0,0,1,216,104Zm-16,0a72,72,0,0,0-73.74-72c-39,.92-70.47,33.39-70.26,72.39a71.65,71.65,0,0,0,27.64,56.3A32,32,0,0,1,96,186v6h64v-6a32.15,32.15,0,0,1,12.47-25.35A71.65,71.65,0,0,0,200,104Zm-16.11-9.34a57.6,57.6,0,0,0-46.56-46.55,8,8,0,0,0-2.66,15.78c16.57,2.79,30.63,16.85,33.44,33.45A8,8,0,0,0,176,104a9,9,0,0,0,1.35-.11A8,8,0,0,0,183.89,94.66Z"/>'),YY=fl("lightbulb","0 0 256 256",'<path d="M180,232a12,12,0,0,1-12,12H88a12,12,0,0,1,0-24h80A12,12,0,0,1,180,232Zm40-128a91.51,91.51,0,0,1-35.17,72.35A12.26,12.26,0,0,0,180,186v2a20,20,0,0,1-20,20H96a20,20,0,0,1-20-20v-2a12,12,0,0,0-4.7-9.51A91.57,91.57,0,0,1,36,104.52C35.73,54.69,76,13.2,125.79,12A92,92,0,0,1,220,104Zm-24,0a68,68,0,0,0-69.65-68C89.56,36.88,59.8,67.55,60,104.38a67.71,67.71,0,0,0,26.1,53.19A35.87,35.87,0,0,1,100,184h56.1A36.13,36.13,0,0,1,170,157.49,67.68,67.68,0,0,0,196,104Zm-20.07-5.32a48.5,48.5,0,0,0-31.91-40,12,12,0,0,0-8,22.62,24.31,24.31,0,0,1,16.09,20,12,12,0,0,0,23.86-2.64Z"/>'),XY=fl("lightbulb","0 0 256 256",'<path d="M176,232a8,8,0,0,1-8,8H88a8,8,0,0,1,0-16h80A8,8,0,0,1,176,232Zm40-128a87.55,87.55,0,0,1-33.64,69.21A16.24,16.24,0,0,0,176,186v6a16,16,0,0,1-16,16H96a16,16,0,0,1-16-16v-6a16,16,0,0,0-6.23-12.66A87.59,87.59,0,0,1,40,104.49C39.74,56.83,78.26,17.14,125.88,16A88,88,0,0,1,216,104Zm-32.11-9.34a57.6,57.6,0,0,0-46.56-46.55,8,8,0,0,0-2.66,15.78c16.57,2.79,30.63,16.85,33.44,33.45A8,8,0,0,0,176,104a9,9,0,0,0,1.35-.11A8,8,0,0,0,183.89,94.66Z"/>'),JY=fl("lightbulb","0 0 256 256",'<path d="M208,104a79.86,79.86,0,0,1-30.59,62.92A24.29,24.29,0,0,0,168,186v6a8,8,0,0,1-8,8H96a8,8,0,0,1-8-8v-6a24.11,24.11,0,0,0-9.3-19A79.87,79.87,0,0,1,48,104.45C47.76,61.09,82.72,25,126.07,24A80,80,0,0,1,208,104Z" opacity="0.2"/><path d="M176,232a8,8,0,0,1-8,8H88a8,8,0,0,1,0-16h80A8,8,0,0,1,176,232Zm40-128a87.55,87.55,0,0,1-33.64,69.21A16.24,16.24,0,0,0,176,186v6a16,16,0,0,1-16,16H96a16,16,0,0,1-16-16v-6a16,16,0,0,0-6.23-12.66A87.59,87.59,0,0,1,40,104.49C39.74,56.83,78.26,17.14,125.88,16A88,88,0,0,1,216,104Zm-16,0a72,72,0,0,0-73.74-72c-39,.92-70.47,33.39-70.26,72.39a71.65,71.65,0,0,0,27.64,56.3A32,32,0,0,1,96,186v6h64v-6a32.15,32.15,0,0,1,12.47-25.35A71.65,71.65,0,0,0,200,104Zm-16.11-9.34a57.6,57.6,0,0,0-46.56-46.55,8,8,0,0,0-2.66,15.78c16.57,2.79,30.63,16.85,33.44,33.45A8,8,0,0,0,176,104a9,9,0,0,0,1.35-.11A8,8,0,0,0,183.89,94.66Z"/>'),QY="lightbulb",eX=Object.freeze(Object.defineProperty({__proto__:null,bold:YY,default:N_,duotone:JY,fill:XY,glyphName:QY,light:GY,regular:N_,thin:qY},Symbol.toStringTag,{value:"Module"})),pl=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},tX=pl("lightning","0 0 256 256",'<path d="M211.89,119.09a4,4,0,0,0-2.49-2.84l-60.81-22.8,15.33-76.67a4,4,0,0,0-6.84-3.51l-112,120a4,4,0,0,0-1,3.64,4,4,0,0,0,2.49,2.84l60.81,22.8L92.08,239.22a4,4,0,0,0,6.84,3.51l112-120A4,4,0,0,0,211.89,119.09ZM102.68,227l13.24-66.2a4,4,0,0,0-2.52-4.53L55,134.36,153.32,29l-13.24,66.2a4,4,0,0,0,2.52,4.53L201,121.64Z"/>'),iX=pl("lightning","0 0 256 256",'<path d="M213.84,118.63a6,6,0,0,0-3.73-4.25L150.88,92.17l15-75a6,6,0,0,0-10.27-5.27l-112,120a6,6,0,0,0,2.28,9.71l59.23,22.21-15,75a6,6,0,0,0,3.14,6.52A6.07,6.07,0,0,0,96,246a6,6,0,0,0,4.39-1.91l112-120A6,6,0,0,0,213.84,118.63ZM106,220.46l11.85-59.28a6,6,0,0,0-3.77-6.8l-55.6-20.85,91.46-98L138.12,94.82a6,6,0,0,0,3.77,6.8l55.6,20.85Z"/>'),P_=pl("lightning","0 0 256 256",'<path d="M215.79,118.17a8,8,0,0,0-5-5.66L153.18,90.9l14.66-73.33a8,8,0,0,0-13.69-7l-112,120a8,8,0,0,0,3,13l57.63,21.61L88.16,238.43a8,8,0,0,0,13.69,7l112-120A8,8,0,0,0,215.79,118.17ZM109.37,214l10.47-52.38a8,8,0,0,0-5-9.06L62,132.71l84.62-90.66L136.16,94.43a8,8,0,0,0,5,9.06l52.8,19.8Z"/>'),nX=pl("lightning","0 0 256 256",'<path d="M219.71,117.38a12,12,0,0,0-7.25-8.52L161.28,88.39l10.59-70.61a12,12,0,0,0-20.64-10l-112,120a12,12,0,0,0,4.31,19.33l51.18,20.47L84.13,238.22a12,12,0,0,0,20.64,10l112-120A12,12,0,0,0,219.71,117.38ZM113.6,203.55l6.27-41.77a12,12,0,0,0-7.41-12.92L68.74,131.37,142.4,52.45l-6.27,41.77a12,12,0,0,0,7.41,12.92l43.72,17.49Z"/>'),rX=pl("lightning","0 0 256 256",'<path d="M213.85,125.46l-112,120a8,8,0,0,1-13.69-7l14.66-73.33L45.19,143.49a8,8,0,0,1-3-13l112-120a8,8,0,0,1,13.69,7L153.18,90.9l57.63,21.61a8,8,0,0,1,3,12.95Z"/>'),sX=pl("lightning","0 0 256 256",'<path d="M96,240l16-80L48,136,160,16,144,96l64,24Z" opacity="0.2"/><path d="M215.79,118.17a8,8,0,0,0-5-5.66L153.18,90.9l14.66-73.33a8,8,0,0,0-13.69-7l-112,120a8,8,0,0,0,3,13l57.63,21.61L88.16,238.43a8,8,0,0,0,13.69,7l112-120A8,8,0,0,0,215.79,118.17ZM109.37,214l10.47-52.38a8,8,0,0,0-5-9.06L62,132.71l84.62-90.66L136.16,94.43a8,8,0,0,0,5,9.06l52.8,19.8Z"/>'),aX="lightning",lX=Object.freeze(Object.defineProperty({__proto__:null,bold:nX,default:P_,duotone:sX,fill:rX,glyphName:aX,light:iX,regular:P_,thin:tX},Symbol.toStringTag,{value:"Module"})),_l=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},oX=_l("lock","0 0 256 256",'<path d="M208,84H172V56a44,44,0,0,0-88,0V84H48A12,12,0,0,0,36,96V208a12,12,0,0,0,12,12H208a12,12,0,0,0,12-12V96A12,12,0,0,0,208,84ZM92,56a36,36,0,0,1,72,0V84H92ZM212,208a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V96a4,4,0,0,1,4-4H208a4,4,0,0,1,4,4Zm-76-56a8,8,0,1,1-8-8A8,8,0,0,1,136,152Z"/>'),cX=_l("lock","0 0 256 256",'<path d="M208,82H174V56a46,46,0,0,0-92,0V82H48A14,14,0,0,0,34,96V208a14,14,0,0,0,14,14H208a14,14,0,0,0,14-14V96A14,14,0,0,0,208,82ZM94,56a34,34,0,0,1,68,0V82H94ZM210,208a2,2,0,0,1-2,2H48a2,2,0,0,1-2-2V96a2,2,0,0,1,2-2H208a2,2,0,0,1,2,2Zm-72-56a10,10,0,1,1-10-10A10,10,0,0,1,138,152Z"/>'),O_=_l("lock","0 0 256 256",'<path d="M208,80H176V56a48,48,0,0,0-96,0V80H48A16,16,0,0,0,32,96V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V96A16,16,0,0,0,208,80ZM96,56a32,32,0,0,1,64,0V80H96ZM208,208H48V96H208V208Zm-68-56a12,12,0,1,1-12-12A12,12,0,0,1,140,152Z"/>'),uX=_l("lock","0 0 256 256",'<path d="M208,76H180V56A52,52,0,0,0,76,56V76H48A20,20,0,0,0,28,96V208a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V96A20,20,0,0,0,208,76ZM100,56a28,28,0,0,1,56,0V76H100ZM204,204H52V100H204Zm-60-52a16,16,0,1,1-16-16A16,16,0,0,1,144,152Z"/>'),dX=_l("lock","0 0 256 256",'<path d="M208,80H176V56a48,48,0,0,0-96,0V80H48A16,16,0,0,0,32,96V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V96A16,16,0,0,0,208,80Zm-80,84a12,12,0,1,1,12-12A12,12,0,0,1,128,164Zm32-84H96V56a32,32,0,0,1,64,0Z"/>'),hX=_l("lock","0 0 256 256",'<path d="M216,96V208a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V96a8,8,0,0,1,8-8H208A8,8,0,0,1,216,96Z" opacity="0.2"/><path d="M208,80H176V56a48,48,0,0,0-96,0V80H48A16,16,0,0,0,32,96V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V96A16,16,0,0,0,208,80ZM96,56a32,32,0,0,1,64,0V80H96ZM208,208H48V96H208V208Zm-68-56a12,12,0,1,1-12-12A12,12,0,0,1,140,152Z"/>'),fX="lock",pX=Object.freeze(Object.defineProperty({__proto__:null,bold:uX,default:O_,duotone:hX,fill:dX,glyphName:fX,light:cX,regular:O_,thin:oX},Symbol.toStringTag,{value:"Module"})),ml=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},_X=ml("plugs","0 0 256 256",'<path d="M146.83,141.17a4,4,0,0,0-5.66,0L120,162.34,93.66,136l21.17-21.17a4,4,0,0,0-5.66-5.66L88,130.34,66.83,109.17a4,4,0,0,0-5.66,5.66L70.34,124,44.2,150.14a28,28,0,0,0,0,39.6l8.2,8.2L21.17,229.17a4,4,0,0,0,5.66,5.66L58.06,203.6l8.2,8.2a28,28,0,0,0,39.6,0L132,185.66l9.17,9.17a4,4,0,0,0,5.66-5.66L125.66,168l21.17-21.17A4,4,0,0,0,146.83,141.17Zm-46.63,65a20,20,0,0,1-28.28,0L49.86,184.08a20,20,0,0,1,0-28.28L76,129.66,126.34,180Zm134.63-185a4,4,0,0,0-5.66,0L197.94,52.4l-8.2-8.2a28,28,0,0,0-39.6,0L124,70.34l-9.17-9.17a4,4,0,0,0-5.66,5.66l80,80a4,4,0,0,0,5.66-5.66L185.66,132l26.14-26.14a28,28,0,0,0,0-39.6l-8.2-8.2,31.23-31.23A4,4,0,0,0,234.83,21.17ZM212,86.06a19.86,19.86,0,0,1-5.86,14.14L180,126.34,129.66,76,155.8,49.86a20,20,0,0,1,28.28,0l22.06,22.06A19.85,19.85,0,0,1,212,86.06Z"/>'),mX=ml("plugs","0 0 256 256",'<path d="M148.24,139.76a6,6,0,0,0-8.48,0L120,159.51,96.49,136l19.75-19.76a6,6,0,0,0-8.48-8.48L88,127.51,68.24,107.76a6,6,0,0,0-8.48,8.48L67.51,124,42.79,148.73a30,30,0,0,0,0,42.42l6.78,6.79L19.76,227.76a6,6,0,1,0,8.48,8.48l29.82-29.81,6.79,6.78a30,30,0,0,0,42.42,0L132,188.49l7.76,7.75a6,6,0,0,0,8.48-8.48L128.49,168l19.75-19.76A6,6,0,0,0,148.24,139.76Zm-49.45,65a18,18,0,0,1-25.46,0L51.27,182.67a18,18,0,0,1,0-25.46L76,132.49,123.51,180Zm137.45-185a6,6,0,0,0-8.48,0L197.94,49.57l-6.79-6.78a30,30,0,0,0-42.42,0L124,67.51l-7.76-7.75a6,6,0,0,0-8.48,8.48l80,80a6,6,0,0,0,8.48-8.48L188.49,132l24.72-24.73a30,30,0,0,0,0-42.42l-6.78-6.79,29.81-29.82A6,6,0,0,0,236.24,19.76Zm-31.51,79L180,123.51,132.49,76l24.72-24.73a18,18,0,0,1,25.46,0l22.06,22.06a18,18,0,0,1,0,25.46Z"/>'),I_=ml("plugs","0 0 256 256",'<path d="M149.66,138.34a8,8,0,0,0-11.32,0L120,156.69,99.31,136l18.35-18.34a8,8,0,0,0-11.32-11.32L88,124.69,69.66,106.34a8,8,0,0,0-11.32,11.32L64.69,124,41.37,147.31a32,32,0,0,0,0,45.26l5.38,5.37-28.41,28.4a8,8,0,0,0,11.32,11.32l28.4-28.41,5.37,5.38a32,32,0,0,0,45.26,0L132,191.31l6.34,6.35a8,8,0,0,0,11.32-11.32L131.31,168l18.35-18.34A8,8,0,0,0,149.66,138.34Zm-52.29,65a16,16,0,0,1-22.62,0L52.69,181.25a16,16,0,0,1,0-22.62L76,135.31,120.69,180Zm140.29-185a8,8,0,0,0-11.32,0l-28.4,28.41-5.37-5.38a32.05,32.05,0,0,0-45.26,0L124,64.69l-6.34-6.35a8,8,0,0,0-11.32,11.32l80,80a8,8,0,0,0,11.32-11.32L191.31,132l23.32-23.31a32,32,0,0,0,0-45.26l-5.38-5.37,28.41-28.4A8,8,0,0,0,237.66,18.34Zm-34.35,79L180,120.69,135.31,76l23.32-23.31a16,16,0,0,1,22.62,0l22.06,22A16,16,0,0,1,203.31,97.37Z"/>'),vX=ml("plugs","0 0 256 256",'<path d="M137,168l11.52-11.51a12,12,0,0,0-17-17L120,151l-15-15,11.52-11.51a12,12,0,0,0-17-17L88,119,72.49,103.51a12,12,0,0,0-17,17L59,124,38.54,144.49a36,36,0,0,0,0,50.91l2.55,2.54L15.51,223.51a12,12,0,0,0,17,17l25.57-25.58,2.54,2.55a36.06,36.06,0,0,0,50.91,0L132,197l3.51,3.52a12,12,0,0,0,17-17ZM94.54,200.49a12,12,0,0,1-17,0L55.51,178.43a12,12,0,0,1,0-17L76,141l39,39Zm146-185a12,12,0,0,0-17,0L197.94,41.09l-2.54-2.55a36.05,36.05,0,0,0-50.91,0L124,59l-3.51-3.52a12,12,0,0,0-17,17l80,80a12,12,0,0,0,17-17L197,132l20.49-20.49a36,36,0,0,0,0-50.91l-2.55-2.54,25.58-25.57A12,12,0,0,0,240.49,15.51Zm-40,79L180,115,141,76l20.49-20.49a12,12,0,0,1,17,0l22.06,22.06a12,12,0,0,1,0,17Z"/>'),gX=ml("plugs","0 0 256 256",'<path d="M149.66,149.66,131.31,168l18.35,18.34a8,8,0,0,1-11.32,11.32L132,191.31l-23.31,23.32a32.06,32.06,0,0,1-45.26,0l-5.37-5.38-28.4,28.41a8,8,0,0,1-11.32-11.32l28.41-28.4-5.38-5.37a32,32,0,0,1,0-45.26L64.69,124l-6.35-6.34a8,8,0,0,1,11.32-11.32L88,124.69l18.34-18.35a8,8,0,0,1,11.32,11.32L99.31,136,120,156.69l18.34-18.35a8,8,0,0,1,11.32,11.32Zm88-131.32a8,8,0,0,0-11.32,0l-28.4,28.41-5.37-5.38a32.05,32.05,0,0,0-45.26,0L124,64.69l-6.34-6.35a8,8,0,0,0-11.32,11.32l80,80a8,8,0,0,0,11.32-11.32L191.31,132l23.32-23.31a32,32,0,0,0,0-45.26l-5.38-5.37,28.41-28.4A8,8,0,0,0,237.66,18.34Z"/>'),bX=ml("plugs","0 0 256 256",'<path d="M76,124l56,56-29,29a24,24,0,0,1-33.94,0L47,186.91A24,24,0,0,1,47,153ZM209,69.09,186.91,47A24,24,0,0,0,153,47L124,76l56,56,29-29A24,24,0,0,0,209,69.09Z" opacity="0.2"/><path d="M149.66,138.34a8,8,0,0,0-11.32,0L120,156.69,99.31,136l18.35-18.34a8,8,0,0,0-11.32-11.32L88,124.69,69.66,106.34a8,8,0,0,0-11.32,11.32L64.69,124,41.37,147.31a32,32,0,0,0,0,45.26l5.38,5.37-28.41,28.4a8,8,0,0,0,11.32,11.32l28.4-28.41,5.37,5.38a32,32,0,0,0,45.26,0L132,191.31l6.34,6.35a8,8,0,0,0,11.32-11.32L131.31,168l18.35-18.34A8,8,0,0,0,149.66,138.34Zm-52.29,65a16,16,0,0,1-22.62,0L52.69,181.25a16,16,0,0,1,0-22.62L76,135.31,120.69,180Zm140.29-185a8,8,0,0,0-11.32,0l-28.4,28.41-5.37-5.38a32.05,32.05,0,0,0-45.26,0L124,64.69l-6.34-6.35a8,8,0,0,0-11.32,11.32l80,80a8,8,0,0,0,11.32-11.32L191.31,132l23.32-23.31a32,32,0,0,0,0-45.26l-5.38-5.37,28.41-28.4A8,8,0,0,0,237.66,18.34Zm-34.35,79L180,120.69,135.31,76l23.32-23.31a16,16,0,0,1,22.62,0l22.06,22A16,16,0,0,1,203.31,97.37Z"/>'),yX="plugs",wX=Object.freeze(Object.defineProperty({__proto__:null,bold:vX,default:I_,duotone:bX,fill:gX,glyphName:yX,light:mX,regular:I_,thin:_X},Symbol.toStringTag,{value:"Module"})),vl=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},SX=vl("rows","0 0 256 256",'<path d="M208,140H48a12,12,0,0,0-12,12v40a12,12,0,0,0,12,12H208a12,12,0,0,0,12-12V152A12,12,0,0,0,208,140Zm4,52a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V152a4,4,0,0,1,4-4H208a4,4,0,0,1,4,4ZM208,52H48A12,12,0,0,0,36,64v40a12,12,0,0,0,12,12H208a12,12,0,0,0,12-12V64A12,12,0,0,0,208,52Zm4,52a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V64a4,4,0,0,1,4-4H208a4,4,0,0,1,4,4Z"/>'),CX=vl("rows","0 0 256 256",'<path d="M208,138H48a14,14,0,0,0-14,14v40a14,14,0,0,0,14,14H208a14,14,0,0,0,14-14V152A14,14,0,0,0,208,138Zm2,54a2,2,0,0,1-2,2H48a2,2,0,0,1-2-2V152a2,2,0,0,1,2-2H208a2,2,0,0,1,2,2ZM208,50H48A14,14,0,0,0,34,64v40a14,14,0,0,0,14,14H208a14,14,0,0,0,14-14V64A14,14,0,0,0,208,50Zm2,54a2,2,0,0,1-2,2H48a2,2,0,0,1-2-2V64a2,2,0,0,1,2-2H208a2,2,0,0,1,2,2Z"/>'),R_=vl("rows","0 0 256 256",'<path d="M208,136H48a16,16,0,0,0-16,16v40a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V152A16,16,0,0,0,208,136Zm0,56H48V152H208v40Zm0-144H48A16,16,0,0,0,32,64v40a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V64A16,16,0,0,0,208,48Zm0,56H48V64H208v40Z"/>'),kX=vl("rows","0 0 256 256",'<path d="M208,136H48a20,20,0,0,0-20,20v36a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V156A20,20,0,0,0,208,136Zm-4,52H52V160H204Zm4-144H48A20,20,0,0,0,28,64v36a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V64A20,20,0,0,0,208,44Zm-4,52H52V68H204Z"/>'),AX=vl("rows","0 0 256 256",'<path d="M224,152v40a16,16,0,0,1-16,16H48a16,16,0,0,1-16-16V152a16,16,0,0,1,16-16H208A16,16,0,0,1,224,152ZM208,48H48A16,16,0,0,0,32,64v40a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V64A16,16,0,0,0,208,48Z"/>'),MX=vl("rows","0 0 256 256",'<path d="M216,152v40a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V152a8,8,0,0,1,8-8H208A8,8,0,0,1,216,152Zm-8-96H48a8,8,0,0,0-8,8v40a8,8,0,0,0,8,8H208a8,8,0,0,0,8-8V64A8,8,0,0,0,208,56Z" opacity="0.2"/><path d="M208,136H48a16,16,0,0,0-16,16v40a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V152A16,16,0,0,0,208,136Zm0,56H48V152H208v40Zm0-144H48A16,16,0,0,0,32,64v40a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V64A16,16,0,0,0,208,48Zm0,56H48V64H208v40Z"/>'),$X="rows",LX=Object.freeze(Object.defineProperty({__proto__:null,bold:kX,default:R_,duotone:MX,fill:AX,glyphName:$X,light:CX,regular:R_,thin:SX},Symbol.toStringTag,{value:"Module"})),gl=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},EX=gl("shield","0 0 256 256",'<path d="M208,44H48A12,12,0,0,0,36,56v56c0,51.16,24.73,82.12,45.47,99.1,22.4,18.32,44.55,24.5,45.48,24.76a4,4,0,0,0,2.1,0c.93-.26,23.08-6.44,45.48-24.76,20.74-17,45.47-47.94,45.47-99.1V56A12,12,0,0,0,208,44Zm4,68c0,38.44-14.23,69.63-42.29,92.71A132.45,132.45,0,0,1,128,227.82a132.23,132.23,0,0,1-41.71-23.11C58.23,181.63,44,150.44,44,112V56a4,4,0,0,1,4-4H208a4,4,0,0,1,4,4Z"/>'),xX=gl("shield","0 0 256 256",'<path d="M208,42H48A14,14,0,0,0,34,56v56c0,51.94,25.12,83.4,46.2,100.64,22.73,18.6,45.27,24.89,46.22,25.15a6,6,0,0,0,3.16,0c.95-.26,23.49-6.55,46.22-25.15C196.88,195.4,222,163.94,222,112V56A14,14,0,0,0,208,42Zm2,70c0,37.76-13.94,68.39-41.44,91.06A131.17,131.17,0,0,1,128,225.72a130.94,130.94,0,0,1-40.56-22.66C59.94,180.39,46,149.76,46,112V56a2,2,0,0,1,2-2H208a2,2,0,0,1,2,2Z"/>'),V_=gl("shield","0 0 256 256",'<path d="M208,40H48A16,16,0,0,0,32,56v56c0,52.72,25.52,84.67,46.93,102.19,23.06,18.86,46,25.27,47,25.53a8,8,0,0,0,4.2,0c1-.26,23.91-6.67,47-25.53C198.48,196.67,224,164.72,224,112V56A16,16,0,0,0,208,40Zm0,72c0,37.07-13.66,67.16-40.6,89.42A129.3,129.3,0,0,1,128,223.62a128.25,128.25,0,0,1-38.92-21.81C61.82,179.51,48,149.3,48,112l0-56,160,0Z"/>'),HX=gl("shield","0 0 256 256",'<path d="M208,36H48A20,20,0,0,0,28,56v56c0,54.29,26.32,87.22,48.4,105.29,23.71,19.39,47.44,26,48.44,26.29a12.1,12.1,0,0,0,6.32,0c1-.28,24.73-6.9,48.44-26.29,22.08-18.07,48.4-51,48.4-105.29V56A20,20,0,0,0,208,36Zm-4,76c0,35.71-13.09,64.69-38.91,86.15A126.28,126.28,0,0,1,128,219.38a126.14,126.14,0,0,1-37.09-21.23C65.09,176.69,52,147.71,52,112V60H204Z"/>'),TX=gl("shield","0 0 256 256",'<path d="M224,56v56c0,52.72-25.52,84.67-46.93,102.19-23.06,18.86-46,25.27-47,25.53a8,8,0,0,1-4.2,0c-1-.26-23.91-6.67-47-25.53C57.52,196.67,32,164.72,32,112V56A16,16,0,0,1,48,40H208A16,16,0,0,1,224,56Z"/>'),NX=gl("shield","0 0 256 256",'<path d="M216,56v56c0,96-88,120-88,120S40,208,40,112V56a8,8,0,0,1,8-8H208A8,8,0,0,1,216,56Z" opacity="0.2"/><path d="M208,40H48A16,16,0,0,0,32,56v56c0,52.72,25.52,84.67,46.93,102.19,23.06,18.86,46,25.27,47,25.53a8,8,0,0,0,4.2,0c1-.26,23.91-6.67,47-25.53C198.48,196.67,224,164.72,224,112V56A16,16,0,0,0,208,40Zm0,72c0,37.07-13.66,67.16-40.6,89.42A129.3,129.3,0,0,1,128,223.62a128.25,128.25,0,0,1-38.92-21.81C61.82,179.51,48,149.3,48,112l0-56,160,0Z"/>'),PX="shield",OX=Object.freeze(Object.defineProperty({__proto__:null,bold:HX,default:V_,duotone:NX,fill:TX,glyphName:PX,light:xX,regular:V_,thin:EX},Symbol.toStringTag,{value:"Module"})),bl=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},IX=bl("sliders","0 0 256 256",'<path d="M60,108.29V40a4,4,0,0,0-8,0v68.29a28,28,0,0,0,0,55.42V216a4,4,0,0,0,8,0V163.71a28,28,0,0,0,0-55.42ZM56,156a20,20,0,1,1,20-20A20,20,0,0,1,56,156Zm76-95.71V40a4,4,0,0,0-8,0V60.29a28,28,0,0,0,0,55.42V216a4,4,0,0,0,8,0V115.71a28,28,0,0,0,0-55.42ZM128,108a20,20,0,1,1,20-20A20,20,0,0,1,128,108Zm100,60a28,28,0,0,0-24-27.71V40a4,4,0,0,0-8,0V140.29a28,28,0,0,0,0,55.42V216a4,4,0,0,0,8,0V195.71A28,28,0,0,0,228,168Zm-28,20a20,20,0,1,1,20-20A20,20,0,0,1,200,188Z"/>'),RX=bl("sliders","0 0 256 256",'<path d="M62,106.6V40a6,6,0,0,0-12,0v66.6a30,30,0,0,0,0,58.8V216a6,6,0,0,0,12,0V165.4a30,30,0,0,0,0-58.8ZM56,154a18,18,0,1,1,18-18A18,18,0,0,1,56,154Zm78-95.4V40a6,6,0,0,0-12,0V58.6a30,30,0,0,0,0,58.8V216a6,6,0,0,0,12,0V117.4a30,30,0,0,0,0-58.8ZM128,106a18,18,0,1,1,18-18A18,18,0,0,1,128,106Zm102,62a30.05,30.05,0,0,0-24-29.4V40a6,6,0,0,0-12,0v98.6a30,30,0,0,0,0,58.8V216a6,6,0,0,0,12,0V197.4A30.05,30.05,0,0,0,230,168Zm-30,18a18,18,0,1,1,18-18A18,18,0,0,1,200,186Z"/>'),D_=bl("sliders","0 0 256 256",'<path d="M64,105V40a8,8,0,0,0-16,0v65a32,32,0,0,0,0,62v49a8,8,0,0,0,16,0V167a32,32,0,0,0,0-62Zm-8,47a16,16,0,1,1,16-16A16,16,0,0,1,56,152Zm80-95V40a8,8,0,0,0-16,0V57a32,32,0,0,0,0,62v97a8,8,0,0,0,16,0V119a32,32,0,0,0,0-62Zm-8,47a16,16,0,1,1,16-16A16,16,0,0,1,128,104Zm104,64a32.06,32.06,0,0,0-24-31V40a8,8,0,0,0-16,0v97a32,32,0,0,0,0,62v17a8,8,0,0,0,16,0V199A32.06,32.06,0,0,0,232,168Zm-32,16a16,16,0,1,1,16-16A16,16,0,0,1,200,184Z"/>'),VX=bl("sliders","0 0 256 256",'<path d="M68,102.06V40a12,12,0,0,0-24,0v62.06a36,36,0,0,0,0,67.88V216a12,12,0,0,0,24,0V169.94a36,36,0,0,0,0-67.88ZM56,148a12,12,0,1,1,12-12A12,12,0,0,1,56,148ZM164,88a36.07,36.07,0,0,0-24-33.94V40a12,12,0,0,0-24,0V54.06a36,36,0,0,0,0,67.88V216a12,12,0,0,0,24,0V121.94A36.07,36.07,0,0,0,164,88Zm-36,12a12,12,0,1,1,12-12A12,12,0,0,1,128,100Zm108,68a36.07,36.07,0,0,0-24-33.94V40a12,12,0,0,0-24,0v94.06a36,36,0,0,0,0,67.88V216a12,12,0,0,0,24,0V201.94A36.07,36.07,0,0,0,236,168Zm-36,12a12,12,0,1,1,12-12A12,12,0,0,1,200,180Z"/>'),DX=bl("sliders","0 0 256 256",'<path d="M84,136a28,28,0,0,1-20,26.83V216a8,8,0,0,1-16,0V162.83a28,28,0,0,1,0-53.66V40a8,8,0,0,1,16,0v69.17A28,28,0,0,1,84,136Zm52-74.83V40a8,8,0,0,0-16,0V61.17a28,28,0,0,0,0,53.66V216a8,8,0,0,0,16,0V114.83a28,28,0,0,0,0-53.66Zm72,80V40a8,8,0,0,0-16,0V141.17a28,28,0,0,0,0,53.66V216a8,8,0,0,0,16,0V194.83a28,28,0,0,0,0-53.66Z"/>'),ZX=bl("sliders","0 0 256 256",'<path d="M80,136a24,24,0,1,1-24-24A24,24,0,0,1,80,136Zm48-72a24,24,0,1,0,24,24A24,24,0,0,0,128,64Zm72,80a24,24,0,1,0,24,24A24,24,0,0,0,200,144Z" opacity="0.2"/><path d="M64,105V40a8,8,0,0,0-16,0v65a32,32,0,0,0,0,62v49a8,8,0,0,0,16,0V167a32,32,0,0,0,0-62Zm-8,47a16,16,0,1,1,16-16A16,16,0,0,1,56,152Zm80-95V40a8,8,0,0,0-16,0V57a32,32,0,0,0,0,62v97a8,8,0,0,0,16,0V119a32,32,0,0,0,0-62Zm-8,47a16,16,0,1,1,16-16A16,16,0,0,1,128,104Zm104,64a32.06,32.06,0,0,0-24-31V40a8,8,0,0,0-16,0v97a32,32,0,0,0,0,62v17a8,8,0,0,0,16,0V199A32.06,32.06,0,0,0,232,168Zm-32,16a16,16,0,1,1,16-16A16,16,0,0,1,200,184Z"/>'),BX="sliders",FX=Object.freeze(Object.defineProperty({__proto__:null,bold:VX,default:D_,duotone:ZX,fill:DX,glyphName:BX,light:RX,regular:D_,thin:IX},Symbol.toStringTag,{value:"Module"})),yl=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},zX=yl("snowflake","0 0 256 256",'<path d="M219.88,151.05a4,4,0,0,1-2.93,4.83l-28.6,7L195.86,191a4,4,0,0,1-2.83,4.9,3.65,3.65,0,0,1-1,.14,4,4,0,0,1-3.86-3L180,162.64l-48-27.71v55.41l22.83,22.83a4,4,0,0,1-5.66,5.66L128,197.66l-21.17,21.17a4,4,0,0,1-5.66-5.66L124,190.34V134.93L76,162.64,67.86,193A4,4,0,0,1,64,196a3.65,3.65,0,0,1-1-.14,4,4,0,0,1-2.83-4.9l7.51-28.05-28.6-7A4,4,0,1,1,41,148.12l31,7.61L120,128,72,100.27l-31,7.61a4.07,4.07,0,0,1-1,.12,4,4,0,0,1-1-7.88l28.6-7L60.14,65A4,4,0,0,1,67.86,63L76,93.36l48,27.71V65.66L101.17,42.83a4,4,0,0,1,5.66-5.66L128,58.34l21.17-21.17a4,4,0,1,1,5.66,5.66L132,65.66v55.41l48-27.71L188.14,63A4,4,0,0,1,195.86,65l-7.51,28.05,28.6,7A4,4,0,0,1,216,108a4.07,4.07,0,0,1-1-.12l-31-7.61L136,128l48,27.73,31-7.61A4,4,0,0,1,219.88,151.05Z"/>'),UX=yl("snowflake","0 0 256 256",'<path d="M221.83,150.57a6,6,0,0,1-4.4,7.26l-26.62,6.54,7,26.08a6,6,0,0,1-4.24,7.35,6.4,6.4,0,0,1-1.55.2,6,6,0,0,1-5.8-4.45L178.27,164,134,138.39v51.13l22.24,22.24a6,6,0,1,1-8.48,8.48L128,200.49l-19.76,19.75a6,6,0,0,1-8.48-8.48L122,189.52V138.39L77.73,164l-7.93,29.6A6,6,0,0,1,64,198a6.4,6.4,0,0,1-1.55-.2,6,6,0,0,1-4.24-7.35l7-26.08-26.62-6.54a6,6,0,0,1,2.86-11.66l30.23,7.43L116,128,71.66,102.4l-30.23,7.43A5.88,5.88,0,0,1,40,110a6,6,0,0,1-1.43-11.83l26.62-6.54-7-26.08a6,6,0,1,1,11.59-3.1l7.93,29.6L122,117.61V66.48L99.76,44.24a6,6,0,0,1,8.48-8.48L128,55.51l19.76-19.75a6,6,0,0,1,8.48,8.48L134,66.48v51.13l44.27-25.56,7.93-29.6a6,6,0,1,1,11.59,3.1l-7,26.08,26.62,6.54A6,6,0,0,1,216,110a5.88,5.88,0,0,1-1.43-.17l-30.23-7.43L140,128l44.34,25.6,30.23-7.43A6,6,0,0,1,221.83,150.57Z"/>'),Z_=yl("snowflake","0 0 256 256",'<path d="M223.77,150.09a8,8,0,0,1-5.86,9.68l-24.64,6,6.46,24.11a8,8,0,0,1-5.66,9.8A8.25,8.25,0,0,1,192,200a8,8,0,0,1-7.72-5.93l-7.72-28.8L136,141.86v46.83l21.66,21.65a8,8,0,0,1-11.32,11.32L128,203.31l-18.34,18.35a8,8,0,0,1-11.32-11.32L120,188.69V141.86L79.45,165.27l-7.72,28.8A8,8,0,0,1,64,200a8.25,8.25,0,0,1-2.08-.27,8,8,0,0,1-5.66-9.8l6.46-24.11-24.64-6a8,8,0,0,1,3.82-15.54l29.45,7.23L112,128,71.36,104.54l-29.45,7.23A7.85,7.85,0,0,1,40,112a8,8,0,0,1-1.91-15.77l24.64-6L56.27,66.07a8,8,0,0,1,15.46-4.14l7.72,28.8L120,114.14V67.31L98.34,45.66a8,8,0,0,1,11.32-11.32L128,52.69l18.34-18.35a8,8,0,0,1,11.32,11.32L136,67.31v46.83l40.55-23.41,7.72-28.8a8,8,0,0,1,15.46,4.14l-6.46,24.11,24.64,6A8,8,0,0,1,216,112a7.85,7.85,0,0,1-1.91-.23l-29.45-7.23L144,128l40.64,23.46,29.45-7.23A8,8,0,0,1,223.77,150.09Z"/>'),WX=yl("snowflake","0 0 256 256",'<path d="M227.65,149.14a12,12,0,0,1-8.79,14.51l-20.67,5.08,5.4,20.16a12,12,0,0,1-23.18,6.22l-7.29-27.2L140,148.78V187l20.48,20.48a12,12,0,0,1-17,17L128,209l-15.51,15.52a12,12,0,0,1-17-17L116,187V148.78L82.88,167.91l-7.29,27.2a12,12,0,0,1-23.18-6.22l5.4-20.16-20.67-5.08a12,12,0,1,1,5.72-23.3l27.89,6.85L104,128,70.75,108.8l-27.89,6.85A11.8,11.8,0,0,1,40,116a12,12,0,0,1-2.85-23.65l20.67-5.08-5.4-20.16a12,12,0,0,1,23.18-6.22l7.29,27.2L116,107.21V69L95.52,48.48a12,12,0,0,1,17-17L128,47l15.51-15.52a12,12,0,1,1,17,17L140,69v38.24l33.12-19.12,7.29-27.2a12,12,0,0,1,23.18,6.22l-5.4,20.16,20.67,5.08A12,12,0,0,1,216,116a11.8,11.8,0,0,1-2.87-.35l-27.89-6.85L152,128l33.25,19.2,27.89-6.85A12,12,0,0,1,227.65,149.14Z"/>'),jX=yl("snowflake","0 0 256 256",'<path d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm42.37,119.22,18.94-6.76a8,8,0,1,1,5.38,15.08l-15.48,5.52,4.52,16.87a8,8,0,0,1-5.66,9.8A8.23,8.23,0,0,1,176,184a8,8,0,0,1-7.73-5.93l-5.57-20.8L136,141.86v30.83l13.66,13.65a8,8,0,0,1-11.32,11.32L128,187.31l-10.34,10.35a8,8,0,0,1-11.32-11.32L120,172.69V141.86L93.3,157.27l-5.57,20.8A8,8,0,0,1,80,184a8.23,8.23,0,0,1-2.07-.27,8,8,0,0,1-5.66-9.8l4.52-16.87-15.48-5.52a8,8,0,0,1,5.38-15.08l18.94,6.76L112,128,85.63,112.78l-18.94,6.76A8.18,8.18,0,0,1,64,120a8,8,0,0,1-2.69-15.54l15.48-5.52L72.27,82.07a8,8,0,0,1,15.46-4.14l5.57,20.8L120,114.14V83.31L106.34,69.66a8,8,0,0,1,11.32-11.32L128,68.69l10.34-10.35a8,8,0,0,1,11.32,11.32L136,83.31v30.83l26.7-15.41,5.57-20.8a8,8,0,0,1,15.46,4.14l-4.52,16.87,15.48,5.52A8,8,0,0,1,192,120a8.18,8.18,0,0,1-2.69-.46l-18.94-6.76L144,128Z"/>'),KX=yl("snowflake","0 0 256 256",'<path d="M220,128a92,92,0,1,1-92-92A92.1,92.1,0,0,1,220,128Z" opacity="0.2"/><path d="M223.77,150.09a8,8,0,0,1-5.86,9.68l-24.64,6,6.46,24.11a8,8,0,0,1-5.66,9.8A8.25,8.25,0,0,1,192,200a8,8,0,0,1-7.72-5.93l-7.72-28.8L136,141.86v46.83l21.66,21.65a8,8,0,0,1-11.32,11.32L128,203.31l-18.34,18.35a8,8,0,0,1-11.32-11.32L120,188.69V141.86L79.45,165.27l-7.72,28.8A8,8,0,0,1,64,200a8.25,8.25,0,0,1-2.08-.27,8,8,0,0,1-5.66-9.8l6.46-24.11-24.64-6a8,8,0,0,1,3.82-15.54l29.45,7.23L112,128,71.36,104.54l-29.45,7.23A7.85,7.85,0,0,1,40,112a8,8,0,0,1-1.91-15.77l24.64-6L56.27,66.07a8,8,0,0,1,15.46-4.14l7.72,28.8L120,114.14V67.31L98.34,45.66a8,8,0,0,1,11.32-11.32L128,52.69l18.34-18.35a8,8,0,0,1,11.32,11.32L136,67.31v46.83l40.55-23.41,7.72-28.8a8,8,0,0,1,15.46,4.14l-6.46,24.11,24.64,6A8,8,0,0,1,216,112a7.85,7.85,0,0,1-1.91-.23l-29.45-7.23L144,128l40.64,23.46,29.45-7.23A8,8,0,0,1,223.77,150.09Z"/>'),qX="snowflake",GX=Object.freeze(Object.defineProperty({__proto__:null,bold:WX,default:Z_,duotone:KX,fill:jX,glyphName:qX,light:UX,regular:Z_,thin:zX},Symbol.toStringTag,{value:"Module"})),wl=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},YX=wl("speaker-hifi","0 0 256 256",'<path d="M192,28H64A12,12,0,0,0,52,40V216a12,12,0,0,0,12,12H192a12,12,0,0,0,12-12V40A12,12,0,0,0,192,28Zm4,188a4,4,0,0,1-4,4H64a4,4,0,0,1-4-4V40a4,4,0,0,1,4-4H192a4,4,0,0,1,4,4ZM120,76a8,8,0,1,1,8,8A8,8,0,0,1,120,76Zm8,40a36,36,0,1,0,36,36A36,36,0,0,0,128,116Zm0,64a28,28,0,1,1,28-28A28,28,0,0,1,128,180Z"/>'),XX=wl("speaker-hifi","0 0 256 256",'<path d="M192,26H64A14,14,0,0,0,50,40V216a14,14,0,0,0,14,14H192a14,14,0,0,0,14-14V40A14,14,0,0,0,192,26Zm2,190a2,2,0,0,1-2,2H64a2,2,0,0,1-2-2V40a2,2,0,0,1,2-2H192a2,2,0,0,1,2,2ZM118,76a10,10,0,1,1,10,10A10,10,0,0,1,118,76Zm10,38a38,38,0,1,0,38,38A38,38,0,0,0,128,114Zm0,64a26,26,0,1,1,26-26A26,26,0,0,1,128,178Z"/>'),B_=wl("speaker-hifi","0 0 256 256",'<path d="M192,24H64A16,16,0,0,0,48,40V216a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V40A16,16,0,0,0,192,24Zm0,192H64V40H192ZM116,76a12,12,0,1,1,12,12A12,12,0,0,1,116,76Zm12,116a40,40,0,1,0-40-40A40,40,0,0,0,128,192Zm0-64a24,24,0,1,1-24,24A24,24,0,0,1,128,128Z"/>'),JX=wl("speaker-hifi","0 0 256 256",'<path d="M192,20H64A20,20,0,0,0,44,40V216a20,20,0,0,0,20,20H192a20,20,0,0,0,20-20V40A20,20,0,0,0,192,20Zm-4,192H68V44H188ZM112,76a16,16,0,1,1,16,16A16,16,0,0,1,112,76Zm16,120a44,44,0,1,0-44-44A44.05,44.05,0,0,0,128,196Zm0-64a20,20,0,1,1-20,20A20,20,0,0,1,128,132Z"/>'),QX=wl("speaker-hifi","0 0 256 256",'<path d="M152,160a24,24,0,1,1-24-24A24,24,0,0,1,152,160ZM208,40V216a16,16,0,0,1-16,16H64a16,16,0,0,1-16-16V40A16,16,0,0,1,64,24H192A16,16,0,0,1,208,40ZM116,68a12,12,0,1,0,12-12A12,12,0,0,0,116,68Zm52,92a40,40,0,1,0-40,40A40,40,0,0,0,168,160Z"/>'),eJ=wl("speaker-hifi","0 0 256 256",'<path d="M192,32H64a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H192a8,8,0,0,0,8-8V40A8,8,0,0,0,192,32ZM128,184a32,32,0,1,1,32-32A32,32,0,0,1,128,184Z" opacity="0.2"/><path d="M192,24H64A16,16,0,0,0,48,40V216a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V40A16,16,0,0,0,192,24Zm0,192H64V40H192ZM116,76a12,12,0,1,1,12,12A12,12,0,0,1,116,76Zm12,116a40,40,0,1,0-40-40A40,40,0,0,0,128,192Zm0-64a24,24,0,1,1-24,24A24,24,0,0,1,128,128Z"/>'),tJ="speaker-hifi",iJ=Object.freeze(Object.defineProperty({__proto__:null,bold:JX,default:B_,duotone:eJ,fill:QX,glyphName:tJ,light:XX,regular:B_,thin:YX},Symbol.toStringTag,{value:"Module"})),Sl=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},nJ=Sl("speaker-high","0 0 256 256",'<path d="M153.76,28.41a4,4,0,0,0-4.22.43L78.63,84H32A12,12,0,0,0,20,96v64a12,12,0,0,0,12,12H78.63l70.91,55.16A4.07,4.07,0,0,0,152,228a3.92,3.92,0,0,0,1.76-.41A4,4,0,0,0,156,224V32A4,4,0,0,0,153.76,28.41ZM28,160V96a4,4,0,0,1,4-4H76v72H32A4,4,0,0,1,28,160Zm120,55.82L84,166V90l64-49.78Zm47-111.61a36,36,0,0,1,0,47.59,4,4,0,1,1-6-5.3,28,28,0,0,0,0-37,4,4,0,0,1,6-5.28ZM244,128a75.88,75.88,0,0,1-19.35,50.67,4,4,0,0,1-6-5.34,68,68,0,0,0,0-90.66,4,4,0,0,1,6-5.34A75.88,75.88,0,0,1,244,128Z"/>'),rJ=Sl("speaker-high","0 0 256 256",'<path d="M154.64,26.61a6,6,0,0,0-6.32.65L77.94,82H32A14,14,0,0,0,18,96v64a14,14,0,0,0,14,14H77.94l70.38,54.74A6,6,0,0,0,158,224V32A6,6,0,0,0,154.64,26.61ZM30,160V96a2,2,0,0,1,2-2H74v68H32A2,2,0,0,1,30,160Zm116,51.73L86,165.07V90.93l60-46.66Zm50.53-108.85a38,38,0,0,1,0,50.24,6,6,0,1,1-9-7.94,26,26,0,0,0,0-34.37,6,6,0,0,1,9-7.93ZM246,128a77.86,77.86,0,0,1-19.86,52,6,6,0,1,1-8.94-8,66,66,0,0,0,0-88,6,6,0,1,1,8.94-8A77.86,77.86,0,0,1,246,128Z"/>'),F_=Sl("speaker-high","0 0 256 256",'<path d="M155.51,24.81a8,8,0,0,0-8.42.88L77.25,80H32A16,16,0,0,0,16,96v64a16,16,0,0,0,16,16H77.25l69.84,54.31A8,8,0,0,0,160,224V32A8,8,0,0,0,155.51,24.81ZM32,96H72v64H32ZM144,207.64,88,164.09V91.91l56-43.55Zm54-106.08a40,40,0,0,1,0,52.88,8,8,0,0,1-12-10.58,24,24,0,0,0,0-31.72,8,8,0,0,1,12-10.58ZM248,128a79.9,79.9,0,0,1-20.37,53.34,8,8,0,0,1-11.92-10.67,64,64,0,0,0,0-85.33,8,8,0,1,1,11.92-10.67A79.83,79.83,0,0,1,248,128Z"/>'),sJ=Sl("speaker-high","0 0 256 256",'<path d="M157.27,21.22a12,12,0,0,0-12.64,1.31L75.88,76H32A20,20,0,0,0,12,96v64a20,20,0,0,0,20,20H75.88l68.75,53.47A12,12,0,0,0,164,224V32A12,12,0,0,0,157.27,21.22ZM36,100H68v56H36Zm104,99.46L92,162.13V93.87l48-37.33ZM212,128a44,44,0,0,1-11,29.11,12,12,0,1,1-18-15.88,20,20,0,0,0,0-26.43,12,12,0,0,1,18-15.86A43.94,43.94,0,0,1,212,128Zm40,0a83.87,83.87,0,0,1-21.39,56,12,12,0,0,1-17.89-16,60,60,0,0,0,0-80,12,12,0,1,1,17.88-16A83.87,83.87,0,0,1,252,128Z"/>'),aJ=Sl("speaker-high","0 0 256 256",'<path d="M160,32.25V223.69a8.29,8.29,0,0,1-3.91,7.18,8,8,0,0,1-9-.56l-65.57-51A4,4,0,0,1,80,176.16V79.84a4,4,0,0,1,1.55-3.15l65.57-51a8,8,0,0,1,10,.16A8.27,8.27,0,0,1,160,32.25ZM60,80H32A16,16,0,0,0,16,96v64a16,16,0,0,0,16,16H60a4,4,0,0,0,4-4V84A4,4,0,0,0,60,80Zm126.77,20.84a8,8,0,0,0-.72,11.3,24,24,0,0,1,0,31.72,8,8,0,1,0,12,10.58,40,40,0,0,0,0-52.88A8,8,0,0,0,186.74,100.84Zm40.89-26.17a8,8,0,1,0-11.92,10.66,64,64,0,0,1,0,85.34,8,8,0,1,0,11.92,10.66,80,80,0,0,0,0-106.66Z"/>'),lJ=Sl("speaker-high","0 0 256 256",'<path d="M80,88v80H32a8,8,0,0,1-8-8V96a8,8,0,0,1,8-8Z" opacity="0.2"/><path d="M155.51,24.81a8,8,0,0,0-8.42.88L77.25,80H32A16,16,0,0,0,16,96v64a16,16,0,0,0,16,16H77.25l69.84,54.31A8,8,0,0,0,160,224V32A8,8,0,0,0,155.51,24.81ZM32,96H72v64H32ZM144,207.64,88,164.09V91.91l56-43.55Zm54-106.08a40,40,0,0,1,0,52.88,8,8,0,0,1-12-10.58,24,24,0,0,0,0-31.72,8,8,0,0,1,12-10.58ZM248,128a79.9,79.9,0,0,1-20.37,53.34,8,8,0,0,1-11.92-10.67,64,64,0,0,0,0-85.33,8,8,0,1,1,11.92-10.67A79.83,79.83,0,0,1,248,128Z"/>'),oJ="speaker-high",cJ=Object.freeze(Object.defineProperty({__proto__:null,bold:sJ,default:F_,duotone:lJ,fill:aJ,glyphName:oJ,light:rJ,regular:F_,thin:nJ},Symbol.toStringTag,{value:"Module"})),Cl=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},uJ=Cl("television","0 0 256 256",'<path d="M216,68H137.66l41.17-41.17a4,4,0,1,0-5.66-5.66L128,66.34,82.83,21.17a4,4,0,0,0-5.66,5.66L118.34,68H40A12,12,0,0,0,28,80V200a12,12,0,0,0,12,12H216a12,12,0,0,0,12-12V80A12,12,0,0,0,216,68ZM36,200V80a4,4,0,0,1,4-4H148V204H40A4,4,0,0,1,36,200Zm184,0a4,4,0,0,1-4,4H156V76h60a4,4,0,0,1,4,4Zm-24-84a8,8,0,1,1-8-8A8,8,0,0,1,196,116Zm0,48a8,8,0,1,1-8-8A8,8,0,0,1,196,164Z"/>'),dJ=Cl("television","0 0 256 256",'<path d="M216,66H142.48l37.76-37.76a6,6,0,0,0-8.48-8.48L128,63.51,84.24,19.76a6,6,0,1,0-8.48,8.48L113.52,66H40A14,14,0,0,0,26,80V200a14,14,0,0,0,14,14H216a14,14,0,0,0,14-14V80A14,14,0,0,0,216,66ZM38,200V80a2,2,0,0,1,2-2H146V202H40A2,2,0,0,1,38,200Zm180,0a2,2,0,0,1-2,2H158V78h58a2,2,0,0,1,2,2Zm-20-84a10,10,0,1,1-10-10A10,10,0,0,1,198,116Zm0,48a10,10,0,1,1-10-10A10,10,0,0,1,198,164Z"/>'),z_=Cl("television","0 0 256 256",'<path d="M216,64H147.31l34.35-34.34a8,8,0,1,0-11.32-11.32L128,60.69,85.66,18.34A8,8,0,0,0,74.34,29.66L108.69,64H40A16,16,0,0,0,24,80V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V80A16,16,0,0,0,216,64ZM40,80H144V200H40ZM216,200H160V80h56V200Zm-16-84a12,12,0,1,1-12-12A12,12,0,0,1,200,116Zm0,48a12,12,0,1,1-12-12A12,12,0,0,1,200,164Z"/>'),hJ=Cl("television","0 0 256 256",'<path d="M216,60H157l27.52-27.52a12,12,0,0,0-17-17L128,55,88.49,15.51a12,12,0,0,0-17,17L99,60H40A20,20,0,0,0,20,80V200a20,20,0,0,0,20,20H216a20,20,0,0,0,20-20V80A20,20,0,0,0,216,60ZM44,84h84V196H44ZM212,196H152V84h60Zm-44-80a16,16,0,1,1,16,16A16,16,0,0,1,168,116Zm32,48a16,16,0,1,1-16-16A16,16,0,0,1,200,164Z"/>'),fJ=Cl("television","0 0 256 256",'<path d="M216,64H147.31l34.35-34.34a8,8,0,1,0-11.32-11.32L128,60.69,85.66,18.34A8,8,0,0,0,74.34,29.66L108.69,64H40A16,16,0,0,0,24,80V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V80A16,16,0,0,0,216,64Zm0,136H160V80h56V200Zm-16-84a12,12,0,1,1-12-12A12,12,0,0,1,200,116Zm0,48a12,12,0,1,1-12-12A12,12,0,0,1,200,164Z"/>'),pJ=Cl("television","0 0 256 256",'<path d="M152,72V208H40a8,8,0,0,1-8-8V80a8,8,0,0,1,8-8Z" opacity="0.2"/><path d="M216,64H147.31l34.35-34.34a8,8,0,1,0-11.32-11.32L128,60.69,85.66,18.34A8,8,0,0,0,74.34,29.66L108.69,64H40A16,16,0,0,0,24,80V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V80A16,16,0,0,0,216,64ZM40,80H144V200H40ZM216,200H160V80h56V200Zm-16-84a12,12,0,1,1-12-12A12,12,0,0,1,200,116Zm0,48a12,12,0,1,1-12-12A12,12,0,0,1,200,164Z"/>'),_J="television",mJ=Object.freeze(Object.defineProperty({__proto__:null,bold:hJ,default:z_,duotone:pJ,fill:fJ,glyphName:_J,light:dJ,regular:z_,thin:uJ},Symbol.toStringTag,{value:"Module"})),kl=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},vJ=kl("terminal","0 0 256 256",'<path d="M116,128a4,4,0,0,1-1.34,3l-72,64a4,4,0,1,1-5.32-6L106,128,37.34,67a4,4,0,0,1,5.32-6l72,64A4,4,0,0,1,116,128Zm100,60H120a4,4,0,0,0,0,8h96a4,4,0,0,0,0-8Z"/>'),gJ=kl("terminal","0 0 256 256",'<path d="M116,132.48l-72,64a6,6,0,0,1-8-9L103,128,36,68.49a6,6,0,0,1,8-9l72,64a6,6,0,0,1,0,9ZM216,186H120a6,6,0,0,0,0,12h96a6,6,0,0,0,0-12Z"/>'),U_=kl("terminal","0 0 256 256",'<path d="M117.31,134l-72,64a8,8,0,1,1-10.63-12L100,128,34.69,70A8,8,0,1,1,45.32,58l72,64a8,8,0,0,1,0,12ZM216,184H120a8,8,0,0,0,0,16h96a8,8,0,0,0,0-16Z"/>'),bJ=kl("terminal","0 0 256 256",'<path d="M120,137,48,201A12,12,0,1,1,32,183l61.91-55L32,73A12,12,0,1,1,48,55l72,64A12,12,0,0,1,120,137Zm96,43H120a12,12,0,0,0,0,24h96a12,12,0,0,0,0-24Z"/>'),yJ=kl("terminal","0 0 256 256",'<path d="M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM77.66,173.66a8,8,0,0,1-11.32-11.32L100.69,128,66.34,93.66A8,8,0,0,1,77.66,82.34l40,40a8,8,0,0,1,0,11.32ZM192,176H128a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Z"/>'),wJ=kl("terminal","0 0 256 256",'<path d="M216,80V192H40V64H200A16,16,0,0,1,216,80Z" opacity="0.2"/><path d="M117.31,134l-72,64a8,8,0,1,1-10.63-12L100,128,34.69,70A8,8,0,1,1,45.32,58l72,64a8,8,0,0,1,0,12ZM216,184H120a8,8,0,0,0,0,16h96a8,8,0,0,0,0-16Z"/>'),SJ="terminal",CJ=Object.freeze(Object.defineProperty({__proto__:null,bold:bJ,default:U_,duotone:wJ,fill:yJ,glyphName:SJ,light:gJ,regular:U_,thin:vJ},Symbol.toStringTag,{value:"Module"})),Al=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},kJ=Al("thermometer","0 0 256 256",'<path d="M212,60a24,24,0,1,0,24,24A24,24,0,0,0,212,60Zm0,40a16,16,0,1,1,16-16A16,16,0,0,1,212,100Zm-88,56.29V88a4,4,0,0,0-8,0v68.29a28,28,0,1,0,8,0ZM120,204a20,20,0,1,1,20-20A20,20,0,0,1,120,204Zm36-68V48a36,36,0,0,0-72,0v88a60,60,0,1,0,72,0ZM120,236a52,52,0,0,1-29.71-94.68A4,4,0,0,0,92,138V48a28,28,0,0,1,56,0v90a4,4,0,0,0,1.71,3.28A52,52,0,0,1,120,236Z"/>'),AJ=Al("thermometer","0 0 256 256",'<path d="M212,58a26,26,0,1,0,26,26A26,26,0,0,0,212,58Zm0,40a14,14,0,1,1,14-14A14,14,0,0,1,212,98Zm-86,56.6V88a6,6,0,0,0-12,0v66.6a30,30,0,1,0,12,0ZM120,202a18,18,0,1,1,18-18A18,18,0,0,1,120,202Zm38-67V48a38,38,0,0,0-76,0v87a62,62,0,1,0,76,0Zm-38,99a50,50,0,0,1-28.57-91A6,6,0,0,0,94,138V48a26,26,0,0,1,52,0v90a6,6,0,0,0,2.57,4.92A50,50,0,0,1,120,234Z"/>'),W_=Al("thermometer","0 0 256 256",'<path d="M212,56a28,28,0,1,0,28,28A28,28,0,0,0,212,56Zm0,40a12,12,0,1,1,12-12A12,12,0,0,1,212,96Zm-84,57V88a8,8,0,0,0-16,0v65a32,32,0,1,0,16,0Zm-8,47a16,16,0,1,1,16-16A16,16,0,0,1,120,200Zm40-66V48a40,40,0,0,0-80,0v86a64,64,0,1,0,80,0Zm-40,98a48,48,0,0,1-27.42-87.4A8,8,0,0,0,96,138V48a24,24,0,0,1,48,0v90a8,8,0,0,0,3.42,6.56A48,48,0,0,1,120,232Z"/>'),MJ=Al("thermometer","0 0 256 256",'<path d="M212,52a32,32,0,1,0,32,32A32,32,0,0,0,212,52Zm0,40a8,8,0,1,1,8-8A8,8,0,0,1,212,92ZM160,56A52,52,0,0,0,56,56v94.69a64,64,0,1,0,104,0ZM108,228a40,40,0,0,1-30.91-65.39A12,12,0,0,0,80,154.78V56a28,28,0,0,1,56,0v98.77a12,12,0,0,0,2.77,7.68A40,40,0,0,1,108,228Zm24-40a24,24,0,1,1-36-20.78V92a12,12,0,0,1,24,0v75.22A24,24,0,0,1,132,188Z"/>'),$J=Al("thermometer","0 0 256 256",'<path d="M212,56a28,28,0,1,0,28,28A28,28,0,0,0,212,56Zm0,40a12,12,0,1,1,12-12A12,12,0,0,1,212,96Zm-60,50.08V40a32,32,0,0,0-64,0V146.08a56,56,0,1,0,64,0ZM136,104H104V40a16,16,0,0,1,32,0Z"/>'),LJ=Al("thermometer","0 0 256 256",'<path d="M152,138V48a32,32,0,0,0-64,0v90a56,56,0,1,0,64,0Zm-32,70a24,24,0,1,1,24-24A24,24,0,0,1,120,208Z" opacity="0.2"/><path d="M212,56a28,28,0,1,0,28,28A28,28,0,0,0,212,56Zm0,40a12,12,0,1,1,12-12A12,12,0,0,1,212,96Zm-84,57V88a8,8,0,0,0-16,0v65a32,32,0,1,0,16,0Zm-8,47a16,16,0,1,1,16-16A16,16,0,0,1,120,200Zm40-66V48a40,40,0,0,0-80,0v86a64,64,0,1,0,80,0Zm-40,98a48,48,0,0,1-27.42-87.4A8,8,0,0,0,96,138V48a24,24,0,0,1,48,0v90a8,8,0,0,0,3.42,6.56A48,48,0,0,1,120,232Z"/>'),EJ="thermometer",xJ=Object.freeze(Object.defineProperty({__proto__:null,bold:MJ,default:W_,duotone:LJ,fill:$J,glyphName:EJ,light:AJ,regular:W_,thin:kJ},Symbol.toStringTag,{value:"Module"})),Ml=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},HJ=Ml("thermometer-hot","0 0 256 256",'<path d="M124,156.29V48a4,4,0,0,0-8,0V156.29a28,28,0,1,0,8,0ZM120,204a20,20,0,1,1,20-20A20,20,0,0,1,120,204Zm36-68V48a36,36,0,0,0-72,0v88a60,60,0,1,0,72,0ZM120,236a52,52,0,0,1-29.71-94.68A4,4,0,0,0,92,138V48a28,28,0,0,1,56,0v90a4,4,0,0,0,1.71,3.28A52,52,0,0,1,120,236ZM180.65,78.59a4,4,0,0,1,1.17-5.54c13.24-8.63,23.07-4.43,31.75-.73,8.15,3.48,14.58,6.22,24.25-.07a4,4,0,1,1,4.36,6.7C236.43,82.7,231.32,84,226.67,84c-6.06,0-11.33-2.25-16.24-4.34-8.15-3.47-14.58-6.22-24.25.07A4,4,0,0,1,180.65,78.59Zm62.7,26.82a4,4,0,0,1-1.17,5.54c-5.75,3.75-10.86,5.07-15.51,5.07-6.06,0-11.33-2.25-16.24-4.34-8.15-3.47-14.58-6.22-24.25.07a4,4,0,1,1-4.36-6.7c13.24-8.63,23.07-4.43,31.75-.73,8.15,3.48,14.58,6.22,24.25-.07A4,4,0,0,1,243.35,105.41Z"/>'),TJ=Ml("thermometer-hot","0 0 256 256",'<path d="M126,154.6V48a6,6,0,0,0-12,0V154.6a30,30,0,1,0,12,0ZM120,202a18,18,0,1,1,18-18A18,18,0,0,1,120,202Zm38-67V48a38,38,0,0,0-76,0v87a62,62,0,1,0,76,0Zm-38,99a50,50,0,0,1-28.57-91A6,6,0,0,0,94,138V48a26,26,0,0,1,52,0v90a6,6,0,0,0,2.57,4.92A50,50,0,0,1,120,234ZM179,79.68a6,6,0,0,1,1.75-8.3c14.14-9.21,24.95-4.61,33.63-.9,7.9,3.37,13.6,5.8,22.37.09a6,6,0,1,1,6.55,10.05c-6.12,4-11.62,5.39-16.59,5.39-6.51,0-12.11-2.39-17-4.49-7.89-3.37-13.59-5.8-22.37-.09A6,6,0,0,1,179,79.68ZM245,104.32a6,6,0,0,1-1.76,8.3c-6.12,4-11.62,5.39-16.59,5.39-6.51,0-12.11-2.39-17-4.49-7.89-3.37-13.59-5.8-22.37-.09a6,6,0,0,1-6.55-10.05c14.14-9.21,24.95-4.6,33.63-.9,7.9,3.37,13.6,5.8,22.37.09A6,6,0,0,1,245,104.32Z"/>'),j_=Ml("thermometer-hot","0 0 256 256",'<path d="M128,153V48a8,8,0,0,0-16,0V153a32,32,0,1,0,16,0Zm-8,47a16,16,0,1,1,16-16A16,16,0,0,1,120,200Zm40-66V48a40,40,0,0,0-80,0v86a64,64,0,1,0,80,0Zm-40,98a48,48,0,0,1-27.42-87.4A8,8,0,0,0,96,138V48a24,24,0,0,1,48,0v90a8,8,0,0,0,3.42,6.56A48,48,0,0,1,120,232ZM177.3,80.77a8,8,0,0,1,2.33-11.07c15-9.79,26.87-4.75,35.51-1.06C223,72,227.76,74,235.63,68.89a8,8,0,0,1,8.74,13.41C237.88,86.53,232,88,226.69,88c-7,0-12.92-2.54-17.83-4.63C201,80,196.24,78,188.37,83.11A8,8,0,0,1,177.3,80.77Zm69.4,22.46a8,8,0,0,1-2.33,11.07C237.88,118.53,232,120,226.69,120c-7,0-12.92-2.54-17.83-4.63-7.87-3.36-12.62-5.38-20.49-.25a8,8,0,0,1-8.74-13.41c15-9.79,26.87-4.75,35.51-1.06,7.87,3.36,12.62,5.39,20.49.25A8,8,0,0,1,246.7,103.23Z"/>'),NJ=Ml("thermometer-hot","0 0 256 256",'<path d="M160,56A52,52,0,0,0,56,56v94.69a64,64,0,1,0,104,0ZM108,228a40,40,0,0,1-30.91-65.39A12,12,0,0,0,80,154.78V56a28,28,0,0,1,56,0v98.77a12,12,0,0,0,2.77,7.68A40,40,0,0,1,108,228Zm24-40a24,24,0,1,1-36-20.78V56a12,12,0,0,1,24,0V167.22A24,24,0,0,1,132,188ZM173.94,83a12,12,0,0,1,3.51-16.6c16.82-11,30.32-5.2,39.26-1.39,8.09,3.46,10.93,4.37,16.74.58a12,12,0,0,1,13.1,20.11C239.28,90.38,232.64,92,226.71,92c-7.79,0-14.34-2.8-19.42-5-8.09-3.46-10.93-4.37-16.74-.58A12,12,0,0,1,173.94,83Zm76.11,26.1a12,12,0,0,1-3.5,16.6c-7.27,4.73-13.91,6.35-19.84,6.35-7.79,0-14.34-2.8-19.42-5-8.09-3.46-10.93-4.37-16.74-.58a12,12,0,1,1-13.1-20.11c16.82-11,30.32-5.2,39.26-1.39,8.09,3.46,10.93,4.37,16.74.58A12,12,0,0,1,250.05,109.05Z"/>'),PJ=Ml("thermometer-hot","0 0 256 256",'<path d="M152,146.08V40a32,32,0,0,0-64,0V146.08a56,56,0,1,0,64,0ZM136,56H104V40a16,16,0,0,1,32,0Zm41.3,24.77a8,8,0,0,1,2.33-11.07c15-9.79,26.87-4.75,35.51-1.06C223,72,227.76,74,235.63,68.89a8,8,0,0,1,8.74,13.41C237.88,86.53,232,88,226.69,88c-7,0-12.92-2.54-17.83-4.63C201,80,196.24,78,188.37,83.11A8,8,0,0,1,177.3,80.77Zm69.4,22.46a8,8,0,0,1-2.33,11.07C237.88,118.53,232,120,226.69,120c-7,0-12.92-2.54-17.83-4.63-7.87-3.36-12.62-5.38-20.49-.25a8,8,0,0,1-8.74-13.41c15-9.79,26.87-4.75,35.51-1.06,7.87,3.36,12.62,5.39,20.49.25A8,8,0,0,1,246.7,103.23Z"/>'),OJ=Ml("thermometer-hot","0 0 256 256",'<path d="M152,138V48a32,32,0,0,0-64,0v90a56,56,0,1,0,64,0Zm-32,70a24,24,0,1,1,24-24A24,24,0,0,1,120,208Z" opacity="0.2"/><path d="M128,153V48a8,8,0,0,0-16,0V153a32,32,0,1,0,16,0Zm-8,47a16,16,0,1,1,16-16A16,16,0,0,1,120,200Zm40-66V48a40,40,0,0,0-80,0v86a64,64,0,1,0,80,0Zm-40,98a48,48,0,0,1-27.42-87.4A8,8,0,0,0,96,138V48a24,24,0,0,1,48,0v90a8,8,0,0,0,3.42,6.56A48,48,0,0,1,120,232ZM177.3,80.77a8,8,0,0,1,2.33-11.07c15-9.79,26.87-4.75,35.51-1.06C223,72,227.76,74,235.63,68.89a8,8,0,0,1,8.74,13.41C237.88,86.53,232,88,226.69,88c-7,0-12.92-2.54-17.83-4.63C201,80,196.24,78,188.37,83.11A8,8,0,0,1,177.3,80.77Zm69.4,22.46a8,8,0,0,1-2.33,11.07C237.88,118.53,232,120,226.69,120c-7,0-12.92-2.54-17.83-4.63-7.87-3.36-12.62-5.38-20.49-.25a8,8,0,0,1-8.74-13.41c15-9.79,26.87-4.75,35.51-1.06,7.87,3.36,12.62,5.39,20.49.25A8,8,0,0,1,246.7,103.23Z"/>'),IJ="thermometer-hot",RJ=Object.freeze(Object.defineProperty({__proto__:null,bold:NJ,default:j_,duotone:OJ,fill:PJ,glyphName:IJ,light:TJ,regular:j_,thin:HJ},Symbol.toStringTag,{value:"Module"})),$l=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},VJ=$l("toggle-right","0 0 256 256",'<path d="M176,60H80a68,68,0,0,0,0,136h96a68,68,0,0,0,0-136Zm0,128H80A60,60,0,0,1,80,68h96a60,60,0,0,1,0,120Zm0-96a36,36,0,1,0,36,36A36,36,0,0,0,176,92Zm0,64a28,28,0,1,1,28-28A28,28,0,0,1,176,156Z"/>'),DJ=$l("toggle-right","0 0 256 256",'<path d="M176,58H80a70,70,0,0,0,0,140h96a70,70,0,0,0,0-140Zm0,128H80A58,58,0,0,1,80,70h96a58,58,0,0,1,0,116Zm0-96a38,38,0,1,0,38,38A38,38,0,0,0,176,90Zm0,64a26,26,0,1,1,26-26A26,26,0,0,1,176,154Z"/>'),K_=$l("toggle-right","0 0 256 256",'<path d="M176,56H80a72,72,0,0,0,0,144h96a72,72,0,0,0,0-144Zm0,128H80A56,56,0,0,1,80,72h96a56,56,0,0,1,0,112Zm0-96a40,40,0,1,0,40,40A40,40,0,0,0,176,88Zm0,64a24,24,0,1,1,24-24A24,24,0,0,1,176,152Z"/>'),ZJ=$l("toggle-right","0 0 256 256",'<path d="M176,52H80a76,76,0,0,0,0,152h96a76,76,0,0,0,0-152Zm0,128H80A52,52,0,0,1,80,76h96a52,52,0,0,1,0,104Zm0-92a40,40,0,1,0,40,40A40,40,0,0,0,176,88Zm0,56a16,16,0,1,1,16-16A16,16,0,0,1,176,144Z"/>'),BJ=$l("toggle-right","0 0 256 256",'<path d="M176,56H80a72,72,0,0,0,0,144h96a72,72,0,0,0,0-144Zm0,112a40,40,0,1,1,40-40A40,40,0,0,1,176,168Z"/>'),FJ=$l("toggle-right","0 0 256 256",'<path d="M208,128a32,32,0,1,1-32-32A32,32,0,0,1,208,128Z" opacity="0.2"/><path d="M176,56H80a72,72,0,0,0,0,144h96a72,72,0,0,0,0-144Zm0,128H80A56,56,0,0,1,80,72h96a56,56,0,0,1,0,112Zm0-96a40,40,0,1,0,40,40A40,40,0,0,0,176,88Zm0,64a24,24,0,1,1,24-24A24,24,0,0,1,176,152Z"/>'),zJ="toggle-right",UJ=Object.freeze(Object.defineProperty({__proto__:null,bold:ZJ,default:K_,duotone:FJ,fill:BJ,glyphName:zJ,light:DJ,regular:K_,thin:VJ},Symbol.toStringTag,{value:"Module"})),Ll=(e,t,i)=>{const n=r=>Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},WJ=Ll("wind","0 0 256 256",'<path d="M180,184a28,28,0,0,1-28,28c-12.09,0-23.76-7.83-27.75-18.61a4,4,0,1,1,7.5-2.78C134.58,198.24,143.28,204,152,204a20,20,0,0,0,0-40H40a4,4,0,0,1,0-8H152A28,28,0,0,1,180,184ZM148,72a28,28,0,0,0-28-28c-12.09,0-23.76,7.83-27.75,18.61a4,4,0,0,0,7.5,2.78C102.58,57.76,111.28,52,120,52a20,20,0,0,1,0,40H24a4,4,0,0,0,0,8h96A28,28,0,0,0,148,72Zm60,4c-12.09,0-23.76,7.83-27.75,18.61a4,4,0,1,0,7.5,2.78C190.58,89.76,199.28,84,208,84a20,20,0,0,1,0,40H32a4,4,0,0,0,0,8H208a28,28,0,0,0,0-56Z"/>'),jJ=Ll("wind","0 0 256 256",'<path d="M182,184a30,30,0,0,1-30,30c-12.9,0-25.36-8.38-29.63-19.92a6,6,0,0,1,11.26-4.16C136.13,196.69,144.2,202,152,202a18,18,0,0,0,0-36H40a6,6,0,0,1,0-12H152A30,30,0,0,1,182,184ZM150,72a30,30,0,0,0-30-30c-12.9,0-25.36,8.38-29.63,19.92a6,6,0,1,0,11.26,4.16C104.13,59.31,112.2,54,120,54a18,18,0,0,1,0,36H24a6,6,0,0,0,0,12h96A30,30,0,0,0,150,72Zm58,2c-12.9,0-25.36,8.38-29.63,19.92a6,6,0,1,0,11.26,4.16C192.13,91.31,200.2,86,208,86a18,18,0,0,1,0,36H32a6,6,0,0,0,0,12H208a30,30,0,0,0,0-60Z"/>'),q_=Ll("wind","0 0 256 256",'<path d="M184,184a32,32,0,0,1-32,32c-13.7,0-26.95-8.93-31.5-21.22a8,8,0,0,1,15-5.56C137.74,195.27,145,200,152,200a16,16,0,0,0,0-32H40a8,8,0,0,1,0-16H152A32,32,0,0,1,184,184Zm-64-80a32,32,0,0,0,0-64c-13.7,0-26.95,8.93-31.5,21.22a8,8,0,0,0,15,5.56C105.74,60.73,113,56,120,56a16,16,0,0,1,0,32H24a8,8,0,0,0,0,16Zm88-32c-13.7,0-26.95,8.93-31.5,21.22a8,8,0,0,0,15,5.56C193.74,92.73,201,88,208,88a16,16,0,0,1,0,32H32a8,8,0,0,0,0,16H208a32,32,0,0,0,0-64Z"/>'),KJ=Ll("wind","0 0 256 256",'<path d="M24,104a12,12,0,0,1,0-24h96a12,12,0,0,0,0-24,15.07,15.07,0,0,0-10.26,4.45,12,12,0,0,1-17-16.9A39.34,39.34,0,0,1,120,32a36,36,0,0,1,0,72ZM208,68a39.34,39.34,0,0,0-27.3,11.55,12,12,0,0,0,17,16.9A15.07,15.07,0,0,1,208,92a12,12,0,0,1,0,24H32a12,12,0,0,0,0,24H208a36,36,0,0,0,0-72Zm-56,84H40a12,12,0,0,0,0,24H152a12,12,0,0,1,0,24,15.11,15.11,0,0,1-10.27-4.45,12,12,0,1,0-17,16.9A39.34,39.34,0,0,0,152,224a36,36,0,0,0,0-72Z"/>'),qJ=Ll("wind","0 0 256 256",'<path d="M120,104H24a8,8,0,0,1-8-8.53A8.17,8.17,0,0,1,24.27,88H112a8,8,0,0,0,8-8.53A8.17,8.17,0,0,0,111.73,72H92.29a4,4,0,0,1-4-4.58A32,32,0,1,1,120,104Zm119.92-2.29a32,32,0,0,0-63.59-2.29,4,4,0,0,0,4,4.58h19.44a8.17,8.17,0,0,1,8.25,7.47,8,8,0,0,1-8,8.53H32.27A8.17,8.17,0,0,0,24,127.47,8,8,0,0,0,32,136H208A32,32,0,0,0,239.92,101.71ZM152,152H40.27A8.17,8.17,0,0,0,32,159.47,8,8,0,0,0,40,168H143.73a8.17,8.17,0,0,1,8.25,7.47,8,8,0,0,1-8,8.53H124.29a4,4,0,0,0-4,4.58A32,32,0,1,0,152,152Z"/>'),GJ=Ll("wind","0 0 256 256",'<path d="M120,96a24,24,0,1,1,24-24A24,24,0,0,1,120,96Zm88-16a24,24,0,1,0,24,24A24,24,0,0,0,208,80Zm-56,80a24,24,0,1,0,24,24A24,24,0,0,0,152,160Z" opacity="0.2"/><path d="M184,184a32,32,0,0,1-32,32c-13.7,0-26.95-8.93-31.5-21.22a8,8,0,0,1,15-5.56C137.74,195.27,145,200,152,200a16,16,0,0,0,0-32H40a8,8,0,0,1,0-16H152A32,32,0,0,1,184,184Zm-64-80a32,32,0,0,0,0-64c-13.7,0-26.95,8.93-31.5,21.22a8,8,0,0,0,15,5.56C105.74,60.73,113,56,120,56a16,16,0,0,1,0,32H24a8,8,0,0,0,0,16Zm88-32c-13.7,0-26.95,8.93-31.5,21.22a8,8,0,0,0,15,5.56C193.74,92.73,201,88,208,88a16,16,0,0,1,0,32H32a8,8,0,0,0,0,16H208a32,32,0,0,0,0-64Z"/>'),YJ="wind",XJ=Object.freeze(Object.defineProperty({__proto__:null,bold:KJ,default:q_,duotone:GJ,fill:qJ,glyphName:YJ,light:jJ,regular:q_,thin:WJ},Symbol.toStringTag,{value:"Module"}));function JJ(){J9({"app-window":vG,bell:GT,"brackets-curly":kG,broadcast:HG,camera:VG,cube:WG,devices:Wz,door:JG,drop:sY,fan:hY,"game-controller":bY,garage:MY,gear:Bg,house:NY,intersect:ZY,lamp:KY,lightbulb:eX,lightning:lX,lock:pX,plugs:wX,pulse:zB,"puzzle-piece":GO,rows:LX,shield:OX,sliders:FX,snowflake:GX,"speaker-hifi":iJ,"speaker-high":cJ,television:mJ,terminal:CJ,thermometer:xJ,"thermometer-hot":RJ,"toggle-right":UJ,wind:XJ})}const QJ={key:0,class:"pcf-section"},eQ={class:"pcf-section-label"},tQ={class:"pcf-section-body"},iQ={key:1,class:"pcf-row pcf-row--switch"},nQ={class:"pcf-label-wrap"},rQ={class:"pcf-label"},sQ={key:0,class:"pcf-required"},aQ={key:0,class:"pcf-hint"},lQ={key:2,class:"pcf-row"},oQ={class:"pcf-label"},cQ={key:0,class:"pcf-required"},uQ={class:"pcf-control"},dQ={key:0,class:"pcf-hint"},hQ={key:3,class:"pcf-row pcf-row--array"},fQ={class:"pcf-label"},pQ={key:0,class:"pcf-required"},_Q={class:"pcf-control"},mQ={class:"pcf-array"},vQ={key:0,class:"pcf-hint"},gQ={key:4,class:"pcf-row"},bQ={class:"pcf-label"},yQ={key:0,class:"pcf-required"},wQ={class:"pcf-control"},SQ={key:0,class:"pcf-hint"},CQ={key:5,class:"pcf-row"},kQ={class:"pcf-label"},AQ={key:0,class:"pcf-required"},MQ={class:"pcf-control"},$Q={key:0,class:"pcf-hint"},LQ=Ne({__name:"PluginConfigField",props:{fieldKey:{},field:{},path:{},required:{type:Boolean},value:{}},emits:["change","addArray","removeArray","updateArray"],setup(e,{emit:t}){const i=e,n=t;function r(){return Array.isArray(i.field.type)?i.field.type[0]:i.field.type??"string"}function s(){return i.field.title??i.fieldKey.replace(/([A-Z])/g," $1").replace(/^./,d=>d.toUpperCase())}function a(){return(i.field.enum??[]).map((d,h)=>{var f;return{value:d,label:((f=i.field.enumNames)==null?void 0:f[h])??String(d)}})}function l(){return i.value??i.field.default??""}function o(d){const h=i.value;return h==null?void 0:h[d]}function c(d,h){const f=typeof i.value=="object"&&i.value!==null?{...i.value}:{};f[d]=h,n("change",f)}function u(){return Array.isArray(i.value)?i.value:[]}return(d,h)=>{const f=wo("PluginConfigField",!0),v=o1,p=ba,w=Wr,_=Pt;return r()==="object"&&e.field.properties?(m(),M("div",QJ,[b("div",eQ,Z(s()),1),b("div",tQ,[(m(!0),M(Ce,null,Fe(e.field.properties,(y,C)=>{var g;return m(),he(f,{key:C,"field-key":String(C),field:y,path:[...e.path,String(C)],required:((g=e.field.required)==null?void 0:g.includes(String(C)))??!1,value:o(String(C)),onChange:$=>c(String(C),$),onAddArray:h[0]||(h[0]=($,E)=>n("addArray",$,E)),onRemoveArray:h[1]||(h[1]=($,E)=>n("removeArray",$,E)),onUpdateArray:h[2]||(h[2]=($,E,L)=>n("updateArray",$,E,L))},null,8,["field-key","field","path","required","value","onChange"])}),128))])])):r()==="boolean"?(m(),M("div",iQ,[b("div",nQ,[b("span",rQ,[le(Z(s())+" ",1),e.required?(m(),M("span",sQ,"*")):V("",!0)]),e.field.description?(m(),M("span",aQ,Z(e.field.description),1)):V("",!0)]),j(v,{"model-value":!!(e.value??e.field.default??!1),name:`pcf-${e.path.join("-")}`,size:"sm",variant:"primary","onUpdate:modelValue":h[3]||(h[3]=y=>n("change",y))},null,8,["model-value","name"])])):e.field.enum?(m(),M("div",lQ,[b("label",oQ,[le(Z(s())+" ",1),e.required?(m(),M("span",cQ,"*")):V("",!0)]),b("div",uQ,[j(p,{"model-value":l(),options:a(),size:"sm","onUpdate:modelValue":h[4]||(h[4]=y=>n("change",y))},null,8,["model-value","options"]),e.field.description?(m(),M("span",dQ,Z(e.field.description),1)):V("",!0)])])):r()==="array"?(m(),M("div",hQ,[b("label",fQ,[le(Z(s())+" ",1),e.required?(m(),M("span",pQ,"*")):V("",!0)]),b("div",_Q,[b("div",mQ,[(m(!0),M(Ce,null,Fe(u(),(y,C)=>(m(),M("div",{key:C,class:"pcf-array-row"},[j(w,{"model-value":String(y),size:"sm",placeholder:`${s()} ${C+1}`,style:{flex:"1"},"onUpdate:modelValue":g=>n("updateArray",e.path,C,g)},null,8,["model-value","placeholder","onUpdate:modelValue"]),j(_,{variant:"ghost",size:"sm",icon:C2,"aria-label":`Remove ${s()} ${C+1}`,onClick:g=>n("removeArray",e.path,C)},null,8,["aria-label","onClick"])]))),128)),j(_,{variant:"ghost",size:"sm",icon:sg,onClick:h[5]||(h[5]=y=>n("addArray",e.path,e.field.items??{type:"string"}))},{default:G(()=>[...h[8]||(h[8]=[le(" Add ",-1)])]),_:1})]),e.field.description?(m(),M("span",vQ,Z(e.field.description),1)):V("",!0)])])):r()==="number"||r()==="integer"?(m(),M("div",gQ,[b("label",bQ,[le(Z(s())+" ",1),e.required?(m(),M("span",yQ,"*")):V("",!0)]),b("div",wQ,[j(w,{"model-value":e.value!==void 0?String(e.value):e.field.default!==void 0?String(e.field.default):"",type:"number",size:"sm",placeholder:e.field.default!==void 0?String(e.field.default):"",style:{"max-width":"180px"},"onUpdate:modelValue":h[6]||(h[6]=y=>n("change",Number(y)))},null,8,["model-value","placeholder"]),e.field.description?(m(),M("span",SQ,Z(e.field.description),1)):V("",!0)])])):(m(),M("div",CQ,[b("label",kQ,[le(Z(s())+" ",1),e.required?(m(),M("span",AQ,"*")):V("",!0)]),b("div",MQ,[j(w,{"model-value":e.value!==void 0?String(e.value):e.field.default!==void 0?String(e.field.default):"",size:"sm",placeholder:e.field.default!==void 0?String(e.field.default):"","onUpdate:modelValue":h[7]||(h[7]=y=>n("change",y))},null,8,["model-value","placeholder"]),e.field.description?(m(),M("span",$Q,Z(e.field.description),1)):V("",!0)])]))}}}),EQ=zt(LQ,[["__scopeId","data-v-79b9818f"]]);DM({storageKey:"openbridge.theme"});JN({themes:["openbridge"],defaultTheme:"openbridge"});const El=y4(uP);El.use(zy());El.use(r5);El.use(Vw({legacy:!1,locale:navigator.language,fallbackLocale:"en"}));El.use(Y9);JJ();El.component("PluginConfigField",EQ);El.mount("#app");
|