smart-home-engine 1.48.2 → 1.48.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/jsonMode-BRIqcXAV.js","assets/monaco-langs-DKJI_o9J.js","assets/monaco-langs-DyX1CsEw.css","assets/tsMode-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/jsonMode-BRIqcXAV.js","assets/monaco-langs-DKJI_o9J.js","assets/monaco-langs-DyX1CsEw.css","assets/tsMode-Daa0DLzL.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
var xF=Object.defineProperty;var A2=r=>{throw TypeError(r)};var mF=(r,e,t)=>e in r?xF(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var es=(r,e,t)=>mF(r,typeof e!="symbol"?e+"":e,t),yb=(r,e,t)=>e.has(r)||A2("Cannot "+t);var Zt=(r,e,t)=>(yb(r,e,"read from private field"),t?t.call(r):e.get(r)),Zn=(r,e,t)=>e.has(r)?A2("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(r):e.set(r,t),Yn=(r,e,t,i)=>(yb(r,e,"write to private field"),i?i.call(r,t):e.set(r,t),t),Ms=(r,e,t)=>(yb(r,e,"access private method"),t);import{_ as e6,m as t6,l as Yi,A as fr,C as si,I as Hs,D as G0,a as ao,g as i6,M as Hi,b as mn,E as Ya,c as le,r as gs,d as Ea,e as F,f as _F,h as Ts,R as Xn,S as pn,i as qo,j as Sa,k as ns,n as On,o as Qt,p as yi,K as co,q as Ui,s as Pi,t as go,u as Ge,v as qn,O as Bl,w as ho,P as Xi,x as wb,y as K0,z as n6,B as rc,F as Xa,G as ey,H as Ao,U as xs,J as lp,L as Qi,N as hc,Q as bF,T as lr,V as ty,W as CF,X as s6,$ as qi,Y as as,Z as is,a0 as Vs,a1 as Ln,a2 as zr,a3 as Jg,a4 as Li,a5 as _x,a6 as yF,a7 as wF,a8 as po,a9 as EF,aa as Qa,ab as pr,ac as nn,ad as o6,ae as Rs,af as SF,ag as kF,ah as dr,ai as zp,aj as uo,ak as d1,al as tr,am as Id,an as AS,ao as u1,ap as yo,aq as cp,ar as wo,as as h1,at as f1,au as DF,av as Z0,aw as Wp,ax as wc,ay as AF,az as jp,aA as BF,aB as BS,aC as FF,aD as LF,aE as B2,aF as ro,aG as ac,aH as ir,aI as Rn,aJ as tc,aK as IF,aL as Tl,aM as Nr,aN as bo,aO as Ja,aP as FS,aQ as vo,aR as io,aS as Kx,aT as Mn,aU as r6,aV as PF,aW as LS,aX as p1,aY as IS,aZ as PS,a_ as uu,a$ as TF,b0 as TS,b1 as MF,b2 as MS,b3 as Ec,b4 as Sc,b5 as dp,b6 as e0,b7 as Er,b8 as Y0,b9 as Zx,ba as Eb,bb as Ds,bc as RS,bd as X0,be as g1,bf as RF,bg as a6,bh as t0,bi as up,bj as i0,bk as Q0,bl as v1,bm as ss,bn as Pd,bo as J0,bp as NF,bq as OF,br as NS,bs as HF,bt as Yx,bu as Jr,bv as OS,bw as hp,bx as kc,by as Vp,bz as Vn,bA as fp,bB as l6,bC as ev,bD as zF,bE as hu,bF as zi,bG as F2,bH as bx,bI as c6,bJ as Aa,bK as Ua,bL as Ls,bM as pp,bN as xa,bO as gp,bP as js,bQ as n0,bR as Dh,bS as iy,bT as d6,bU as u6,bV as h6,bW as HS,bX as mr,bY as fs,bZ as tv,b_ as f6,b$ as lc,c0 as x1,c1 as WF,c2 as vf,c3 as L2,c4 as iv,c5 as p6,c6 as xf,c7 as jF,c8 as la,c9 as m1,ca as VF,cb as gr,cc as el,cd as nv,ce as s0,cf as g6,cg as Zr,ch as sv,ci as _1,cj as $F,ck as qF,cl as UF,cm as $p,cn as Ml,co as Co,cp as GF,cq as zS,cr as KF,cs as ZF,ct as I2,cu as YF,cv as ov,cw as fc,cx as ny,cy as lh,cz as pc,cA as XF,cB as Fl,cC as ma,cD as Tr,cE as P2,cF as Go,cG as rv,cH as yd,cI as Rl,cJ as QF,cK as tl,cL as o0,cM as b1,cN as v6,cO as JF,cP as eL,cQ as WS,cR as tL,cS as r0,cT as iL,cU as Xc,cV as a0,cW as T2,cX as nL,cY as sL,cZ as Hl,c_ as oL,c$ as jS,d0 as x6,d1 as m6,d2 as _6,d3 as b6,d4 as rL,d5 as aL,d6 as C6,d7 as y6,d8 as lL,d9 as VS,da as cL,db as dL,dc as Ys,dd as uL,de as $S,df as hL,dg as mf,dh as M2,di as fL,dj as pL,dk as gL,dl as vL,dm as xL,dn as mL,dp as vp,dq as C1,dr as sy,ds as _L,dt as bL,du as R2,dv as oy,dw as CL,dx as N2,dy as Sb,dz as yL,dA as w6,dB as wL,dC as E6,dD as ry,dE as EL,dF as SL,dG as kL,dH as S6,dI as k6,dJ as DL,dK as Xx,dL as D6,dM as y1,dN as AL,dO as BL,dP as wd,dQ as qS,dR as FL,dS as O2,dT as H2,dU as LL,dV as _f,dW as A6,dX as IL,dY as PL,dZ as TL,d_ as ML,d$ as B6,e0 as F6,e1 as L6,e2 as I6,e3 as RL,e4 as Ll,e5 as z2,e6 as NL,e7 as av,e8 as OL,e9 as vg,ea as P6,eb as W2,ec as l0,ed as T6,ee as Qx,ef as HL,eg as M6,eh as zL,ei as R6,ej as WL,ek as jL,el as N6,em as O6,en as gc,eo as w1,ep as VL,eq as H6,er as Or,es as fu,et as z6,eu as $L,ev as qL,ew as W6,ex as j6,ey as UL,ez as V6,eA as $6,eB as c0,eC as GL,eD as KL,eE as ZL,eF as YL,eG as og,eH as j2,eI as XL,eJ as QL,eK as JL,eL as Jx,eM as Io,eN as eI,eO as ay,eP as Ah,eQ as tI,eR as ec,eS as iI,eT as nI,eU as q6,eV as sI,eW as Pg,eX as oI,eY as rI,eZ as aI,e_ as lI,e$ as V2,f0 as $2,f1 as q2,f2 as Bh,f3 as US,f4 as U6,f5 as ly,f6 as Cx,f7 as G6,f8 as em,f9 as cI,fa as dI,fb as uI,fc as hI,fd as GS,fe as K6,ff as fI,fg as tm,fh as Z6,fi as Y6,fj as pI,fk as gI,fl as vI,fm as xI,fn as mI,fo as _I,fp as bI,fq as CI,fr as X6,fs as yI,ft as im,fu as Q6,fv as wI,fw as J6,fx as EI,fy as e5,fz as t5,fA as SI,fB as U2,fC as i5,fD as G2,fE as kI,fF as kb,fG as K2,fH as DI,fI as AI,fJ as BI,fK as wl,fL as Ed,fM as FI,fN as Z2,fO as yx,fP as LI,fQ as ic,fR as E1,fS as cy,fT as II,fU as n5,fV as s5,fW as Ko,fX as Y2,fY as Nv,fZ as KS,f_ as PI,f$ as TI,g0 as MI,g1 as RI,g2 as NI,g3 as OI,g4 as HI,g5 as zI,g6 as X2,g7 as WI,g8 as jI,g9 as VI,ga as xp,gb as Tg,gc as o5,gd as $I,ge as ZS,gf as wx,gg as Ov,gh as Db,gi as qI,gj as UI,gk as r5,gl as GI,gm as YS,gn as KI,go as ZI,gp as a5,gq as S1,gr as YI,gs as nm,gt as XS,gu as QS,gv as JS,gw as l5,gx as c5,gy as d5,gz as u5,gA as h5,gB as f5,gC as p5,gD as Q2,gE as g5,gF as Uh,gG as XI,gH as QI,gI as JI,gJ as eP,gK as v5,gL as tP,gM as iP,gN as J2,gO as dy,gP as nd,gQ as nP,gR as sP,gS as oP,gT as rP,gU as aP,gV as lP,gW as e8,gX as e9,gY as uy,gZ as cP,g_ as hy,g$ as dP,h0 as uP,h1 as hP,h2 as fP,h3 as t9,h4 as x5,h5 as t8,h6 as i8,h7 as pP,h8 as gP,h9 as vP,ha as n8,hb as Ab,hc as xP,hd as mP,he as _P,hf as Bb,hg as m5,hh as _5,hi as b5,hj as C5,hk as vc,hl as y5,hm as i9,hn as s8,ho as bP,hp as w5,hq as CP,hr as yP,hs as k1,ht as D1,hu as Fh,hv as A1,hw as lv,hx as wP,hy as B1,hz as EP,hA as SP,hB as kP,hC as E5,hD as rg,hE as DP,hF as AP,hG as BP,hH as FP,hI as cv,hJ as LP,hK as S5,hL as k5,hM as D5,hN as fy,hO as IP,hP as PP,hQ as TP,hR as MP,hS as RP,hT as py,hU as NP,hV as OP,hW as HP,hX as zP,hY as WP,hZ as jP,h_ as VP,h$ as $P,i0 as A5,i1 as qP,i2 as UP,i3 as GP,i4 as o8,i5 as KP,i6 as ZP,i7 as $a,i8 as $o,i9 as gy,ia as B5,ib as YP,ic as XP}from"./monaco-langs-DKJI_o9J.js";(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))i(n);new MutationObserver(n=>{for(const s of n)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&i(a)}).observe(document,{childList:!0,subtree:!0});function t(n){const s={};return n.integrity&&(s.integrity=n.integrity),n.referrerPolicy&&(s.referrerPolicy=n.referrerPolicy),n.crossOrigin==="use-credentials"?s.credentials="include":n.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function i(n){if(n.ep)return;n.ep=!0;const s=t(n);fetch(n.href,s)}})();const F5=!1;var n9=Array.isArray,QP=Array.prototype.indexOf,sm=Array.prototype.includes,F1=Array.from,JP=Object.defineProperty,Mf=Object.getOwnPropertyDescriptor,eT=Object.getOwnPropertyDescriptors,tT=Object.prototype,iT=Array.prototype,L5=Object.getPrototypeOf,r8=Object.isExtensible;const ar=()=>{};function nT(r){for(var e=0;e<r.length;e++)r[e]()}function I5(){var r,e,t=new Promise((i,n)=>{r=i,e=n});return{promise:t,resolve:r,reject:e}}function sT(r,e,t=!1){return r===void 0?t?e():e:r}function om(r,e){if(Array.isArray(r))return r;if(!(Symbol.iterator in r))return Array.from(r);const t=[];for(const i of r)if(t.push(i),t.length===e)break;return t}const Jo=2,mp=4,L1=8,P5=1<<24,Ga=16,Za=32,Sd=64,vy=128,Ca=512,Po=1024,Oo=2048,Nl=4096,br=8192,ya=16384,qp=32768,xy=1<<25,_p=65536,rm=1<<17,oT=1<<18,Up=1<<19,rT=1<<20,Dl=1<<25,ch=65536,am=1<<21,Rf=1<<22,sd=1<<23,pu=Symbol("$state"),aT=Symbol("legacy props"),lT=Symbol(""),Ex=Symbol("attributes"),my=Symbol("class"),_y=Symbol("style"),xg=Symbol("text"),Sx=Symbol("form reset"),I1=new class extends Error{constructor(){super(...arguments);es(this,"name","StaleReactionError");es(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}};var XA;const cT=!!((XA=globalThis.document)!=null&&XA.contentType)&&globalThis.document.contentType.includes("xml");function T5(r){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function dT(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function uT(r,e,t){throw new Error("https://svelte.dev/e/each_key_duplicate")}function hT(r){throw new Error("https://svelte.dev/e/effect_in_teardown")}function fT(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function pT(r){throw new Error("https://svelte.dev/e/effect_orphan")}function gT(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function vT(r){throw new Error("https://svelte.dev/e/props_invalid_value")}function xT(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function mT(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function _T(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function bT(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const CT=1,yT=2,M5=4,wT=8,ET=16,ST=1,kT=4,DT=8,AT=16,R5=1,BT=2,Lo=Symbol("uninitialized"),N5="http://www.w3.org/1999/xhtml",FT="http://www.w3.org/2000/svg",LT="http://www.w3.org/1998/Math/MathML";function IT(){console.warn("https://svelte.dev/e/derived_inert")}function PT(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function TT(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function O5(r){return r===this.v}function MT(r,e){return r!=r?e==e:r!==e||r!==null&&typeof r=="object"||typeof r=="function"}function H5(r){return!MT(r,this.v)}let RT=!1,Qo=null;function bp(r){Qo=r}function ls(r,e=!1,t){Qo={p:Qo,i:!1,c:null,e:null,s:r,x:null,r:ps,l:null}}function cs(r){var e=Qo,t=e.e;if(t!==null){e.e=null;for(var i of t)l3(i)}return r!==void 0&&(e.x=r),e.i=!0,Qo=e.p,r??{}}function z5(){return!0}let iu=[];function W5(){var r=iu;iu=[],nT(r)}function Il(r){if(iu.length===0&&!Rg){var e=iu;queueMicrotask(()=>{e===iu&&W5()})}iu.push(r)}function NT(){for(;iu.length>0;)W5()}function j5(r){var e=ps;if(e===null)return hs.f|=sd,r;if((e.f&qp)===0&&(e.f&mp)===0)throw r;Qc(r,e)}function Qc(r,e){for(;e!==null;){if((e.f&vy)!==0){if((e.f&qp)===0)throw r;try{e.b.error(r);return}catch(t){r=t}}e=e.parent}throw r}const OT=-7169;function mo(r,e){r.f=r.f&OT|e}function s9(r){(r.f&Ca)!==0||r.deps===null?mo(r,Po):mo(r,Nl)}function V5(r){if(r!==null)for(const e of r)(e.f&Jo)===0||(e.f&ch)===0||(e.f^=ch,V5(e.deps))}function $5(r,e,t){(r.f&Oo)!==0?e.add(r):(r.f&Nl)!==0&&t.add(r),V5(r.deps),mo(r,Po)}let Hv=!1;function HT(r){var e=Hv;try{return Hv=!1,[r(),Hv]}finally{Hv=e}}let Fb=null,Gh=null,Pn=null,Mg=null,Uo=null,by=null,Rg=!1,Lb=!1,bf=null,kx=null;var a8=0;let zT=1;var $f,Kc,ru,qf,Uf,Gf,Yl,Kf,Lr,W0,Xl,Ma,_l,Zf,au,Xs,Cy,mg,yy,q5,U5,df,WT,_g;const x_=class x_{constructor(){Zn(this,Xs);es(this,"id",zT++);Zn(this,$f,!1);es(this,"linked",!0);Zn(this,Kc,null);Zn(this,ru,null);es(this,"async_deriveds",new Map);es(this,"current",new Map);es(this,"previous",new Map);Zn(this,qf,new Set);Zn(this,Uf,new Set);Zn(this,Gf,0);Zn(this,Yl,new Map);Zn(this,Kf,null);Zn(this,Lr,[]);Zn(this,W0,[]);Zn(this,Xl,new Set);Zn(this,Ma,new Set);Zn(this,_l,new Map);Zn(this,Zf,new Set);es(this,"is_fork",!1);Zn(this,au,!1);Gh===null?Fb=Gh=this:(Yn(Gh,ru,this),Yn(this,Kc,Gh)),Gh=this}skip_effect(e){Zt(this,_l).has(e)||Zt(this,_l).set(e,{d:[],m:[]}),Zt(this,Zf).delete(e)}unskip_effect(e,t=i=>this.schedule(i)){var i=Zt(this,_l).get(e);if(i){Zt(this,_l).delete(e);for(var n of i.d)mo(n,Oo),t(n);for(n of i.m)mo(n,Nl),t(n)}Zt(this,Zf).add(e)}capture(e,t,i=!1){e.v!==Lo&&!this.previous.has(e)&&this.previous.set(e,e.v),(e.f&sd)===0&&(this.current.set(e,[t,i]),Uo==null||Uo.set(e,t)),this.is_fork||(e.v=t)}activate(){Pn=this}deactivate(){Pn=null,Uo=null}flush(){try{Lb=!0,Pn=this,Ms(this,Xs,mg).call(this)}finally{a8=0,by=null,bf=null,kx=null,Lb=!1,Pn=null,Uo=null,gu.clear()}}discard(){var e;for(const t of Zt(this,Uf))t(this);Zt(this,Uf).clear(),Ms(this,Xs,_g).call(this),(e=Zt(this,Kf))==null||e.resolve()}register_created_effect(e){Zt(this,W0).push(e)}increment(e,t){if(Yn(this,Gf,Zt(this,Gf)+1),e){let i=Zt(this,Yl).get(t)??0;Zt(this,Yl).set(t,i+1)}}decrement(e,t){if(Yn(this,Gf,Zt(this,Gf)-1),e){let i=Zt(this,Yl).get(t)??0;i===1?Zt(this,Yl).delete(t):Zt(this,Yl).set(t,i-1)}Zt(this,au)||(Yn(this,au,!0),Il(()=>{Yn(this,au,!1),this.linked&&this.flush()}))}transfer_effects(e,t){for(const i of e)Zt(this,Xl).add(i);for(const i of t)Zt(this,Ma).add(i);e.clear(),t.clear()}oncommit(e){Zt(this,qf).add(e)}ondiscard(e){Zt(this,Uf).add(e)}settled(){return(Zt(this,Kf)??Yn(this,Kf,I5())).promise}static ensure(){if(Pn===null){const e=Pn=new x_;!Lb&&!Rg&&Il(()=>{Zt(e,$f)||e.flush()})}return Pn}apply(){{Uo=null;return}}schedule(e){var n;if(by=e,(n=e.b)!=null&&n.is_pending&&(e.f&(mp|L1|P5))!==0&&(e.f&qp)===0){e.b.defer_effect(e);return}for(var t=e;t.parent!==null;){t=t.parent;var i=t.f;if(bf!==null&&t===ps&&(hs===null||(hs.f&Jo)===0))return;if((i&(Sd|Za))!==0){if((i&Po)===0)return;t.f^=Po}}Zt(this,Lr).push(t)}};$f=new WeakMap,Kc=new WeakMap,ru=new WeakMap,qf=new WeakMap,Uf=new WeakMap,Gf=new WeakMap,Yl=new WeakMap,Kf=new WeakMap,Lr=new WeakMap,W0=new WeakMap,Xl=new WeakMap,Ma=new WeakMap,_l=new WeakMap,Zf=new WeakMap,au=new WeakMap,Xs=new WeakSet,Cy=function(){if(this.is_fork)return!0;for(const i of Zt(this,Yl).keys()){for(var e=i,t=!1;e.parent!==null;){if(Zt(this,_l).has(e)){t=!0;break}e=e.parent}if(!t)return!0}return!1},mg=function(){var d,u,g,x;Yn(this,$f,!0),a8++>1e3&&(Ms(this,Xs,_g).call(this),VT());for(const m of Zt(this,Xl))Zt(this,Ma).delete(m),mo(m,Oo),this.schedule(m);for(const m of Zt(this,Ma))mo(m,Nl),this.schedule(m);const e=Zt(this,Lr);Yn(this,Lr,[]),this.apply();var t=bf=[],i=[],n=kx=[];for(const m of e)try{Ms(this,Xs,yy).call(this,m,t,i)}catch(C){throw Z5(m),Ms(this,Xs,Cy).call(this)||this.discard(),C}if(Pn=null,n.length>0){var s=x_.ensure();for(const m of n)s.schedule(m)}if(bf=null,kx=null,Ms(this,Xs,Cy).call(this)){Ms(this,Xs,df).call(this,i),Ms(this,Xs,df).call(this,t);for(const[m,C]of Zt(this,_l))K5(m,C);n.length>0&&Ms(d=Pn,Xs,mg).call(d);return}const a=Ms(this,Xs,q5).call(this);if(a){Ms(this,Xs,df).call(this,i),Ms(this,Xs,df).call(this,t),Ms(u=a,Xs,U5).call(u,this);return}Zt(this,Xl).clear(),Zt(this,Ma).clear();for(const m of Zt(this,qf))m(this);Zt(this,qf).clear(),Mg=this,l8(i),l8(t),Mg=null,(g=Zt(this,Kf))==null||g.resolve();var l=Pn;if(Zt(this,Gf)===0&&(Zt(this,Lr).length===0||l!==null)&&Ms(this,Xs,_g).call(this),Zt(this,Lr).length>0)if(l!==null){const m=l;Zt(m,Lr).push(...Zt(this,Lr).filter(C=>!Zt(m,Lr).includes(C)))}else l=this;l!==null&&Ms(x=l,Xs,mg).call(x)},yy=function(e,t,i){e.f^=Po;for(var n=e.first;n!==null;){var s=n.f,a=(s&(Za|Sd))!==0,l=a&&(s&Po)!==0,d=l||(s&br)!==0||Zt(this,_l).has(n);if(!d&&n.fn!==null){a?n.f^=Po:(s&mp)!==0?t.push(n):hv(n)&&((s&Ga)!==0&&Zt(this,Ma).add(n),yp(n));var u=n.first;if(u!==null){n=u;continue}}for(;n!==null;){var g=n.next;if(g!==null){n=g;break}n=n.parent}}},q5=function(){for(var e=Zt(this,Kc);e!==null;){if(!e.is_fork){for(const[t,[,i]]of this.current)if(e.current.has(t)&&!i)return e}e=Zt(e,Kc)}return null},U5=function(e){var i;for(const[n,s]of e.current)!this.previous.has(n)&&e.previous.has(n)&&this.previous.set(n,e.previous.get(n)),this.current.set(n,s);for(const[n,s]of e.async_deriveds){const a=this.async_deriveds.get(n);a&&s.promise.then(a.resolve).catch(a.reject)}this.transfer_effects(Zt(e,Xl),Zt(e,Ma));const t=n=>{var s=n.reactions;if(s!==null)for(const d of s){var a=d.f;if((a&Jo)!==0)t(d);else{var l=d;a&(Rf|Ga)&&!this.async_deriveds.has(l)&&(Zt(this,Ma).delete(l),mo(l,Oo),this.schedule(l))}}};for(const n of this.current.keys())t(n);this.oncommit(()=>e.discard()),Ms(i=e,Xs,_g).call(i),Pn=this,Ms(this,Xs,mg).call(this)},df=function(e){for(var t=0;t<e.length;t+=1)$5(e[t],Zt(this,Xl),Zt(this,Ma))},WT=function(){var g;for(let x=Fb;x!==null;x=Zt(x,ru)){var e=x.id<this.id,t=[];for(const[m,[C,_]]of this.current){if(x.current.has(m)){var i=x.current.get(m)[0];if(e&&C!==i)x.current.set(m,[C,_]);else continue}t.push(m)}if(e)for(const[m,C]of this.async_deriveds){const _=x.async_deriveds.get(m);_&&C.promise.then(_.resolve).catch(_.reject)}if(Zt(x,$f)){var n=[...x.current.keys()].filter(m=>!x.current.get(m)[1]&&!this.current.has(m));if(n.length===0)e&&x.discard();else if(t.length>0){if(e)for(const m of Zt(this,Zf))x.unskip_effect(m,C=>{var _;(C.f&(Ga|Rf))!==0?x.schedule(C):Ms(_=x,Xs,df).call(_,[C])});x.activate();var s=new Set,a=new Map;for(var l of t)G5(l,n,s,a);a=new Map;var d=[...x.current].filter(([m,C])=>{const _=this.current.get(m);return _?_[0]!==C[0]||_[1]!==C[1]:!0}).map(([m])=>m);if(d.length>0)for(const m of Zt(this,W0))(m.f&(ya|br|rm))===0&&o9(m,d,a)&&((m.f&(Rf|Ga))!==0?(mo(m,Oo),x.schedule(m)):Zt(x,Xl).add(m));if(Zt(x,Lr).length>0&&!Zt(x,au)){x.apply();for(var u of Zt(x,Lr))Ms(g=x,Xs,yy).call(g,u,[],[]);Yn(x,Lr,[])}x.deactivate()}}}},_g=function(){if(this.linked){var e=Zt(this,Kc),t=Zt(this,ru);e===null?Fb=t:Yn(e,ru,t),t===null?Gh=e:Yn(t,Kc,e),this.linked=!1}};let dh=x_;function jT(r){var e=Rg;Rg=!0;try{for(var t;;){if(NT(),Pn===null)return t;Pn.flush()}}finally{Rg=e}}function VT(){try{gT()}catch(r){Qc(r,by)}}let Ia=null;function l8(r){var e=r.length;if(e!==0){for(var t=0;t<e;){var i=r[t++];if((i.f&(ya|br))===0&&hv(i)&&(Ia=new Set,yp(i),i.deps===null&&i.first===null&&i.nodes===null&&i.teardown===null&&i.ac===null&&u3(i),(Ia==null?void 0:Ia.size)>0)){gu.clear();for(const n of Ia){if((n.f&(ya|br))!==0)continue;const s=[n];let a=n.parent;for(;a!==null;)Ia.has(a)&&(Ia.delete(a),s.push(a)),a=a.parent;for(let l=s.length-1;l>=0;l--){const d=s[l];(d.f&(ya|br))===0&&yp(d)}}Ia.clear()}}Ia=null}}function G5(r,e,t,i){if(!t.has(r)&&(t.add(r),r.reactions!==null))for(const n of r.reactions){const s=n.f;(s&Jo)!==0?G5(n,e,t,i):(s&(Rf|Ga))!==0&&(s&Oo)===0&&o9(n,e,i)&&(mo(n,Oo),r9(n))}}function o9(r,e,t){const i=t.get(r);if(i!==void 0)return i;if(r.deps!==null)for(const n of r.deps){if(sm.call(e,n))return!0;if((n.f&Jo)!==0&&o9(n,e,t))return t.set(n,!0),!0}return t.set(r,!1),!1}function r9(r){Pn.schedule(r)}function K5(r,e){if(!((r.f&Za)!==0&&(r.f&Po)!==0)){(r.f&Oo)!==0?e.d.push(r):(r.f&Nl)!==0&&e.m.push(r),mo(r,Po);for(var t=r.first;t!==null;)K5(t,e),t=t.next}}function Z5(r){mo(r,Po);for(var e=r.first;e!==null;)Z5(e),e=e.next}function $T(r){let e=0,t=uh(0),i;return()=>{c9()&&(o(t),uv(()=>(e===0&&(i=Ho(()=>r(()=>Ng(t)))),e+=1,()=>{Il(()=>{e-=1,e===0&&(i==null||i(),i=void 0,Ng(t))})})))}}var qT=_p|Up;function UT(r,e,t,i){new GT(r,e,t,i)}var da,DS,ua,lu,Ir,ha,vr,qr,Ql,cu,Zc,Yf,j0,V0,Jl,m_,_o,KT,ZT,YT,wy,Dx,Ax,Ey,Sy;class GT{constructor(e,t,i,n){Zn(this,_o);es(this,"parent");es(this,"is_pending",!1);es(this,"transform_error");Zn(this,da);Zn(this,DS,null);Zn(this,ua);Zn(this,lu);Zn(this,Ir);Zn(this,ha,null);Zn(this,vr,null);Zn(this,qr,null);Zn(this,Ql,null);Zn(this,cu,0);Zn(this,Zc,0);Zn(this,Yf,!1);Zn(this,j0,new Set);Zn(this,V0,new Set);Zn(this,Jl,null);Zn(this,m_,$T(()=>(Yn(this,Jl,uh(Zt(this,cu))),()=>{Yn(this,Jl,null)})));var s;Yn(this,da,e),Yn(this,ua,t),Yn(this,lu,a=>{var l=ps;l.b=this,l.f|=vy,i(a)}),this.parent=ps.b,this.transform_error=n??((s=this.parent)==null?void 0:s.transform_error)??(a=>a),Yn(this,Ir,R1(()=>{Ms(this,_o,wy).call(this)},qT))}defer_effect(e){$5(e,Zt(this,j0),Zt(this,V0))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!Zt(this,ua).pending}update_pending_count(e,t){Ms(this,_o,Ey).call(this,e,t),Yn(this,cu,Zt(this,cu)+e),!(!Zt(this,Jl)||Zt(this,Yf))&&(Yn(this,Yf,!0),Il(()=>{Yn(this,Yf,!1),Zt(this,Jl)&&Cp(Zt(this,Jl),Zt(this,cu))}))}get_effect_pending(){return Zt(this,m_).call(this),o(Zt(this,Jl))}error(e){if(!Zt(this,ua).onerror&&!Zt(this,ua).failed)throw e;Pn!=null&&Pn.is_fork?(Zt(this,ha)&&Pn.skip_effect(Zt(this,ha)),Zt(this,vr)&&Pn.skip_effect(Zt(this,vr)),Zt(this,qr)&&Pn.skip_effect(Zt(this,qr)),Pn.oncommit(()=>{Ms(this,_o,Sy).call(this,e)})):Ms(this,_o,Sy).call(this,e)}}da=new WeakMap,DS=new WeakMap,ua=new WeakMap,lu=new WeakMap,Ir=new WeakMap,ha=new WeakMap,vr=new WeakMap,qr=new WeakMap,Ql=new WeakMap,cu=new WeakMap,Zc=new WeakMap,Yf=new WeakMap,j0=new WeakMap,V0=new WeakMap,Jl=new WeakMap,m_=new WeakMap,_o=new WeakSet,KT=function(){try{Yn(this,ha,fa(()=>Zt(this,lu).call(this,Zt(this,da))))}catch(e){this.error(e)}},ZT=function(e){const t=Zt(this,ua).failed;t&&Yn(this,qr,fa(()=>{t(Zt(this,da),()=>e,()=>()=>{})}))},YT=function(){const e=Zt(this,ua).pending;e&&(this.is_pending=!0,Yn(this,vr,fa(()=>e(Zt(this,da)))),Il(()=>{var t=Yn(this,Ql,document.createDocumentFragment()),i=cc();t.append(i),Yn(this,ha,Ms(this,_o,Ax).call(this,()=>fa(()=>Zt(this,lu).call(this,i)))),Zt(this,Zc)===0&&(Zt(this,da).before(t),Yn(this,Ql,null),vu(Zt(this,vr),()=>{Yn(this,vr,null)}),Ms(this,_o,Dx).call(this,Pn))}))},wy=function(){try{if(this.is_pending=this.has_pending_snippet(),Yn(this,Zc,0),Yn(this,cu,0),Yn(this,ha,fa(()=>{Zt(this,lu).call(this,Zt(this,da))})),Zt(this,Zc)>0){var e=Yn(this,Ql,document.createDocumentFragment());h9(Zt(this,ha),e);const t=Zt(this,ua).pending;Yn(this,vr,fa(()=>t(Zt(this,da))))}else Ms(this,_o,Dx).call(this,Pn)}catch(t){this.error(t)}},Dx=function(e){this.is_pending=!1,e.transfer_effects(Zt(this,j0),Zt(this,V0))},Ax=function(e){var t=ps,i=hs,n=Qo;Ol(Zt(this,Ir)),ka(Zt(this,Ir)),bp(Zt(this,Ir).ctx);try{return dh.ensure(),e()}catch(s){return j5(s),null}finally{Ol(t),ka(i),bp(n)}},Ey=function(e,t){var i;if(!this.has_pending_snippet()){this.parent&&Ms(i=this.parent,_o,Ey).call(i,e,t);return}Yn(this,Zc,Zt(this,Zc)+e),Zt(this,Zc)===0&&(Ms(this,_o,Dx).call(this,t),Zt(this,vr)&&vu(Zt(this,vr),()=>{Yn(this,vr,null)}),Zt(this,Ql)&&(Zt(this,da).before(Zt(this,Ql)),Yn(this,Ql,null)))},Sy=function(e){Zt(this,ha)&&(Hr(Zt(this,ha)),Yn(this,ha,null)),Zt(this,vr)&&(Hr(Zt(this,vr)),Yn(this,vr,null)),Zt(this,qr)&&(Hr(Zt(this,qr)),Yn(this,qr,null));var t=Zt(this,ua).onerror;let i=Zt(this,ua).failed;var n=!1,s=!1;const a=()=>{if(n){TT();return}n=!0,s&&bT(),Zt(this,qr)!==null&&vu(Zt(this,qr),()=>{Yn(this,qr,null)}),Ms(this,_o,Ax).call(this,()=>{Ms(this,_o,wy).call(this)})},l=d=>{try{s=!0,t==null||t(d,a),s=!1}catch(u){Qc(u,Zt(this,Ir)&&Zt(this,Ir).parent)}i&&Yn(this,qr,Ms(this,_o,Ax).call(this,()=>{try{return fa(()=>{var u=ps;u.b=this,u.f|=vy,i(Zt(this,da),()=>d,()=>a)})}catch(u){return Qc(u,Zt(this,Ir).parent),null}}))};Il(()=>{var d;try{d=this.transform_error(e)}catch(u){Qc(u,Zt(this,Ir)&&Zt(this,Ir).parent);return}d!==null&&typeof d=="object"&&typeof d.then=="function"?d.then(l,u=>Qc(u,Zt(this,Ir)&&Zt(this,Ir).parent)):l(d)})};function XT(r,e,t,i){const n=d0;var s=r.filter(m=>!m.settled);if(t.length===0&&s.length===0){i(e.map(n));return}var a=ps,l=QT(),d=s.length===1?s[0].promise:s.length>1?Promise.all(s.map(m=>m.promise)):null;function u(m){if((a.f&ya)===0){l();try{i(m)}catch(C){Qc(C,a)}lm()}}var g=Y5();if(t.length===0){d.then(()=>u(e.map(n))).finally(g);return}function x(){Promise.all(t.map(m=>JT(m))).then(m=>u([...e.map(n),...m])).catch(m=>Qc(m,a)).finally(g)}d?d.then(()=>{l(),x(),lm()}):x()}function QT(){var r=ps,e=hs,t=Qo,i=Pn;return function(s=!0){Ol(r),ka(e),bp(t),s&&(r.f&ya)===0&&(i==null||i.activate(),i==null||i.apply())}}function lm(r=!0){Ol(null),ka(null),bp(null),r&&(Pn==null||Pn.deactivate())}function Y5(){var r=ps,e=r.b,t=Pn,i=!!(e!=null&&e.is_rendered());return e==null||e.update_pending_count(1,t),t.increment(i,r),()=>{e==null||e.update_pending_count(-1,t),t.decrement(i,r)}}function d0(r){var e=Jo|Oo;return ps!==null&&(ps.f|=Up),{ctx:Qo,deps:null,effects:null,equals:O5,f:e,fn:r,reactions:null,rv:0,v:Lo,wv:0,parent:ps,ac:null}}const zv=Symbol("obsolete");function JT(r,e,t){let i=ps;i===null&&dT();var n=void 0,s=uh(Lo),a=!hs,l=new Set;return dM(()=>{var C,_;var d=ps,u=I5();n=u.promise;try{Promise.resolve(r()).then(u.resolve,E=>{E!==I1&&u.reject(E)}).finally(lm)}catch(E){u.reject(E),lm()}var g=Pn;if(a){if((d.f&qp)!==0)var x=Y5();if((C=i.b)!=null&&C.is_rendered())(_=g.async_deriveds.get(d))==null||_.reject(zv);else for(const E of l.values())E.reject(zv);l.add(u),g.async_deriveds.set(d,u)}const m=(E,S=void 0)=>{x==null||x(),l.delete(u),S!==zv&&(g.activate(),S?(s.f|=sd,Cp(s,S)):((s.f&sd)!==0&&(s.f^=sd),Cp(s,E)),g.deactivate())};u.promise.then(m,E=>m(null,E||"unknown"))}),M1(()=>{for(const d of l)d.reject(zv)}),new Promise(d=>{function u(g){function x(){g===n?d(s):u(n)}g.then(x,x)}u(n)})}function ct(r){const e=d0(r);return p3(e),e}function a9(r){const e=d0(r);return e.equals=H5,e}function eM(r){var e=r.effects;if(e!==null){r.effects=null;for(var t=0;t<e.length;t+=1)Hr(e[t])}}function l9(r){var e,t=ps,i=r.parent;if(!xc&&i!==null&&r.v!==Lo&&(i.f&(ya|br))!==0)return IT(),r.v;Ol(i);try{r.f&=~ch,eM(r),e=m3(r)}finally{Ol(t)}return e}function X5(r){var e=l9(r);if(!r.equals(e)&&(r.wv=v3(),(!(Pn!=null&&Pn.is_fork)||r.deps===null)&&(Pn!==null?(Pn.capture(r,e,!0),Mg==null||Mg.capture(r,e,!0)):r.v=e,r.deps===null))){mo(r,Po);return}xc||(Uo!==null?(c9()||Pn!=null&&Pn.is_fork)&&Uo.set(r,e):s9(r))}function tM(r){var e,t;if(r.effects!==null)for(const i of r.effects)(i.teardown||i.ac)&&((e=i.teardown)==null||e.call(i),(t=i.ac)==null||t.abort(I1),i.fn!==null&&(i.teardown=ar),i.ac=null,u0(i,0),u9(i))}function Q5(r){if(r.effects!==null)for(const e of r.effects)e.teardown&&e.fn!==null&&yp(e)}let cm=new Set;const gu=new Map;let J5=!1;function uh(r,e){var t={f:0,v:r,reactions:null,equals:O5,rv:0,wv:0};return t}function A(r,e){const t=uh(r);return p3(t),t}function iM(r,e=!1,t=!0){const i=uh(r);return e||(i.equals=H5),i}function p(r,e,t=!1){hs!==null&&(!Ka||(hs.f&rm)!==0)&&z5()&&(hs.f&(Jo|Ga|Rf|rm))!==0&&(Pl===null||!Pl.has(r))&&_T();let i=t?Ci(e):e;return Cp(r,i,kx)}function Cp(r,e,t=null){if(!r.equals(e)){gu.set(r,xc?e:r.v);var i=dh.ensure();if(i.capture(r,e),(r.f&Jo)!==0){const n=r;(r.f&Oo)!==0&&l9(n),Uo===null&&s9(n)}r.wv=v3(),e3(r,Oo,t),ps!==null&&(ps.f&Po)!==0&&(ps.f&(Za|Sd))===0&&(ca===null?hM([r]):ca.push(r)),!i.is_fork&&cm.size>0&&!J5&&nM()}return e}function nM(){J5=!1;for(const r of cm){(r.f&Po)!==0&&mo(r,Nl);let e;try{e=hv(r)}catch{e=!0}e&&yp(r)}cm.clear()}function ky(r,e=1){var t=o(r),i=e===1?t++:t--;return p(r,t),i}function Ng(r){p(r,r.v+1)}function e3(r,e,t){var i=r.reactions;if(i!==null)for(var n=i.length,s=0;s<n;s++){var a=i[s],l=a.f,d=(l&Oo)===0;if(d&&mo(a,e),(l&rm)!==0)cm.add(a);else if((l&Jo)!==0){var u=a;Uo==null||Uo.delete(u),(l&ch)===0&&(l&Ca&&(ps===null||(ps.f&am)===0)&&(a.f|=ch),e3(u,Nl,t))}else if(d){var g=a;(l&Ga)!==0&&Ia!==null&&Ia.add(g),t!==null?t.push(g):r9(g)}}}function Ci(r){if(typeof r!="object"||r===null||pu in r)return r;const e=L5(r);if(e!==tT&&e!==iT)return r;var t=new Map,i=n9(r),n=A(0),s=xu,a=l=>{if(xu===s)return l();var d=hs,u=xu;ka(null),h8(s);var g=l();return ka(d),h8(u),g};return i&&t.set("length",A(r.length)),new Proxy(r,{defineProperty(l,d,u){(!("value"in u)||u.configurable===!1||u.enumerable===!1||u.writable===!1)&&xT();var g=t.get(d);return g===void 0?a(()=>{var x=A(u.value);return t.set(d,x),x}):p(g,u.value,!0),!0},deleteProperty(l,d){var u=t.get(d);if(u===void 0){if(d in l){const g=a(()=>A(Lo));t.set(d,g),Ng(n)}}else p(u,Lo),Ng(n);return!0},get(l,d,u){var C;if(d===pu)return r;var g=t.get(d),x=d in l;if(g===void 0&&(!x||(C=Mf(l,d))!=null&&C.writable)&&(g=a(()=>{var _=Ci(x?l[d]:Lo),E=A(_);return E}),t.set(d,g)),g!==void 0){var m=o(g);return m===Lo?void 0:m}return Reflect.get(l,d,u)},getOwnPropertyDescriptor(l,d){var u=Reflect.getOwnPropertyDescriptor(l,d);if(u&&"value"in u){var g=t.get(d);g&&(u.value=o(g))}else if(u===void 0){var x=t.get(d),m=x==null?void 0:x.v;if(x!==void 0&&m!==Lo)return{enumerable:!0,configurable:!0,value:m,writable:!0}}return u},has(l,d){var m;if(d===pu)return!0;var u=t.get(d),g=u!==void 0&&u.v!==Lo||Reflect.has(l,d);if(u!==void 0||ps!==null&&(!g||(m=Mf(l,d))!=null&&m.writable)){u===void 0&&(u=a(()=>{var C=g?Ci(l[d]):Lo,_=A(C);return _}),t.set(d,u));var x=o(u);if(x===Lo)return!1}return g},set(l,d,u,g){var O;var x=t.get(d),m=d in l;if(i&&d==="length")for(var C=u;C<x.v;C+=1){var _=t.get(C+"");_!==void 0?p(_,Lo):C in l&&(_=a(()=>A(Lo)),t.set(C+"",_))}if(x===void 0)(!m||(O=Mf(l,d))!=null&&O.writable)&&(x=a(()=>A(void 0)),p(x,Ci(u)),t.set(d,x));else{m=x.v!==Lo;var E=a(()=>Ci(u));p(x,E)}var S=Reflect.getOwnPropertyDescriptor(l,d);if(S!=null&&S.set&&S.set.call(g,u),!m){if(i&&typeof d=="string"){var I=t.get("length"),M=Number(d);Number.isInteger(M)&&M>=I.v&&p(I,M+1)}Ng(n)}return!0},ownKeys(l){o(n);var d=Reflect.ownKeys(l).filter(x=>{var m=t.get(x);return m===void 0||m.v!==Lo});for(var[u,g]of t)g.v!==Lo&&!(u in l)&&d.push(u);return d},setPrototypeOf(){mT()}})}function c8(r){try{if(r!==null&&typeof r=="object"&&pu in r)return r[pu]}catch{}return r}function t3(r,e){return Object.is(c8(r),c8(e))}var wa,i3,n3,s3,o3;function sM(){if(wa===void 0){wa=window,i3=document,n3=/Firefox/.test(navigator.userAgent);var r=Element.prototype,e=Node.prototype,t=Text.prototype;s3=Mf(e,"firstChild").get,o3=Mf(e,"nextSibling").get,r8(r)&&(r[my]=void 0,r[Ex]=null,r[_y]=void 0,r.__e=void 0),r8(t)&&(t[xg]=void 0)}}function cc(r=""){return document.createTextNode(r)}function Xr(r){return s3.call(r)}function dv(r){return o3.call(r)}function f(r,e){return Xr(r)}function Dt(r,e=!1){{var t=Xr(r);return t instanceof Comment&&t.data===""?dv(t):t}}function h(r,e=1,t=!1){let i=r;for(;e--;)i=dv(i);return i}function oM(r){r.textContent=""}function r3(){return!1}function a3(r,e,t){return e==null||e===N5?t?document.createElement(r,{is:t}):document.createElement(r):t?document.createElementNS(e,r,{is:t}):document.createElementNS(e,r)}let d8=!1;function rM(){d8||(d8=!0,document.addEventListener("reset",r=>{Promise.resolve().then(()=>{var e;if(!r.defaultPrevented)for(const t of r.target.elements)(e=t[Sx])==null||e.call(t)})},{capture:!0}))}function P1(r){var e=hs,t=ps;ka(null),Ol(null);try{return r()}finally{ka(e),Ol(t)}}function T1(r,e,t,i=t){r.addEventListener(e,()=>P1(t));const n=r[Sx];n?r[Sx]=()=>{n(),i(!0)}:r[Sx]=()=>i(!0),rM()}function aM(r){ps===null&&(hs===null&&pT(),fT()),xc&&hT()}function lM(r,e){var t=e.last;t===null?e.last=e.first=r:(t.next=r,r.prev=t,e.last=r)}function Dc(r,e){var t=ps;t!==null&&(t.f&br)!==0&&(r|=br);var i={ctx:Qo,deps:null,nodes:null,f:r|Oo|Ca,first:null,fn:e,last:null,next:null,parent:t,b:t&&t.b,prev:null,teardown:null,wv:0,ac:null};Pn==null||Pn.register_created_effect(i);var n=i;if((r&mp)!==0)bf!==null?bf.push(i):dh.ensure().schedule(i);else if(e!==null){try{yp(i)}catch(a){throw Hr(i),a}n.deps===null&&n.teardown===null&&n.nodes===null&&n.first===n.last&&(n.f&Up)===0&&(n=n.first,(r&Ga)!==0&&(r&_p)!==0&&n!==null&&(n.f|=_p))}if(n!==null&&(n.parent=t,t!==null&&lM(n,t),hs!==null&&(hs.f&Jo)!==0&&(r&Sd)===0)){var s=hs;(s.effects??(s.effects=[])).push(n)}return i}function c9(){return hs!==null&&!Ka}function M1(r){const e=Dc(L1,null);return mo(e,Po),e.teardown=r,e}function cn(r){aM();var e=ps.f,t=!hs&&(e&Za)!==0&&Qo!==null&&!Qo.i;if(t){var i=Qo;(i.e??(i.e=[])).push(r)}else return l3(r)}function l3(r){return Dc(mp|rT,r)}function cM(r){dh.ensure();const e=Dc(Sd|Up,r);return(t={})=>new Promise(i=>{t.outro?vu(e,()=>{Hr(e),i(void 0)}):(Hr(e),i(void 0))})}function d9(r){return Dc(mp,r)}function dM(r){return Dc(Rf|Up,r)}function uv(r,e=0){return Dc(L1|e,r)}function P(r,e=[],t=[],i=[]){XT(i,e,t,n=>{Dc(L1,()=>r(...n.map(o)))})}function R1(r,e=0){var t=Dc(Ga|e,r);return t}function fa(r){return Dc(Za|Up,r)}function c3(r){var e=r.teardown;if(e!==null){const t=xc,i=hs;u8(!0),ka(null);try{e.call(null)}finally{u8(t),ka(i)}}}function u9(r,e=!1){var t=r.first;for(r.first=r.last=null;t!==null;){const n=t.ac;n!==null&&P1(()=>{n.abort(I1)});var i=t.next;(t.f&Sd)!==0?t.parent=null:Hr(t,e),t=i}}function uM(r){for(var e=r.first;e!==null;){var t=e.next;(e.f&Za)===0&&Hr(e),e=t}}function Hr(r,e=!0){var t=!1;(e||(r.f&oT)!==0)&&r.nodes!==null&&r.nodes.end!==null&&(d3(r.nodes.start,r.nodes.end),t=!0),mo(r,xy),u9(r,e&&!t),u0(r,0);var i=r.nodes&&r.nodes.t;if(i!==null)for(const s of i)s.stop();c3(r),r.f^=xy,r.f|=ya;var n=r.parent;n!==null&&n.first!==null&&u3(r),r.next=r.prev=r.teardown=r.ctx=r.deps=r.fn=r.nodes=r.ac=r.b=null}function d3(r,e){for(;r!==null;){var t=r===e?null:dv(r);r.remove(),r=t}}function u3(r){var e=r.parent,t=r.prev,i=r.next;t!==null&&(t.next=i),i!==null&&(i.prev=t),e!==null&&(e.first===r&&(e.first=i),e.last===r&&(e.last=t))}function vu(r,e,t=!0){var i=[];h3(r,i,!0);var n=()=>{t&&Hr(r),e&&e()},s=i.length;if(s>0){var a=()=>--s||n();for(var l of i)l.out(a)}else n()}function h3(r,e,t){if((r.f&br)===0){r.f^=br;var i=r.nodes&&r.nodes.t;if(i!==null)for(const l of i)(l.is_global||t)&&e.push(l);for(var n=r.first;n!==null;){var s=n.next;if((n.f&Sd)===0){var a=(n.f&_p)!==0||(n.f&Za)!==0&&(r.f&Ga)!==0;h3(n,e,a?t:!1)}n=s}}}function dm(r){f3(r,!0)}function f3(r,e){if((r.f&br)!==0){r.f^=br,(r.f&Po)===0&&(mo(r,Oo),dh.ensure().schedule(r));for(var t=r.first;t!==null;){var i=t.next,n=(t.f&_p)!==0||(t.f&Za)!==0;f3(t,n?e:!1),t=i}var s=r.nodes&&r.nodes.t;if(s!==null)for(const a of s)(a.is_global||e)&&a.in()}}function h9(r,e){if(r.nodes)for(var t=r.nodes.start,i=r.nodes.end;t!==null;){var n=t===i?null:dv(t);e.append(t),t=n}}let Bx=!1,xc=!1;function u8(r){xc=r}let hs=null,Ka=!1;function ka(r){hs=r}let ps=null;function Ol(r){ps=r}let Pl=null;function p3(r){hs!==null&&(Pl??(Pl=new Set)).add(r)}let Pr=null,Vr=0,ca=null;function hM(r){ca=r}let g3=1,nu=0,xu=nu;function h8(r){xu=r}function v3(){return++g3}function hv(r){var e=r.f;if((e&Oo)!==0)return!0;if(e&Jo&&(r.f&=~ch),(e&Nl)!==0){for(var t=r.deps,i=t.length,n=0;n<i;n++){var s=t[n];if(hv(s)&&X5(s),s.wv>r.wv)return!0}(e&Ca)!==0&&Uo===null&&mo(r,Po)}return!1}function x3(r,e,t=!0){var i=r.reactions;if(i!==null&&!(Pl!==null&&Pl.has(r)))for(var n=0;n<i.length;n++){var s=i[n];(s.f&Jo)!==0?x3(s,e,!1):e===s&&(t?mo(s,Oo):(s.f&Po)!==0&&mo(s,Nl),r9(s))}}function m3(r){var E;var e=Pr,t=Vr,i=ca,n=hs,s=Pl,a=Qo,l=Ka,d=xu,u=r.f;Pr=null,Vr=0,ca=null,hs=(u&(Za|Sd))===0?r:null,Pl=null,bp(r.ctx),Ka=!1,xu=++nu,r.ac!==null&&(P1(()=>{r.ac.abort(I1)}),r.ac=null);try{r.f|=am;var g=r.fn,x=g();r.f|=qp;var m=r.deps,C=Pn==null?void 0:Pn.is_fork;if(Pr!==null){var _;if(C||u0(r,Vr),m!==null&&Vr>0)for(m.length=Vr+Pr.length,_=0;_<Pr.length;_++)m[Vr+_]=Pr[_];else r.deps=m=Pr;if(c9()&&(r.f&Ca)!==0)for(_=Vr;_<m.length;_++)((E=m[_]).reactions??(E.reactions=[])).push(r)}else!C&&m!==null&&Vr<m.length&&(u0(r,Vr),m.length=Vr);if(z5()&&ca!==null&&!Ka&&m!==null&&(r.f&(Jo|Nl|Oo))===0)for(_=0;_<ca.length;_++)x3(ca[_],r);if(n!==null&&n!==r){if(nu++,n.deps!==null)for(let S=0;S<t;S+=1)n.deps[S].rv=nu;if(e!==null)for(const S of e)S.rv=nu;ca!==null&&(i===null?i=ca:i.push(...ca))}return(r.f&sd)!==0&&(r.f^=sd),x}catch(S){return j5(S)}finally{r.f^=am,Pr=e,Vr=t,ca=i,hs=n,Pl=s,bp(a),Ka=l,xu=d}}function fM(r,e){let t=e.reactions;if(t!==null){var i=QP.call(t,r);if(i!==-1){var n=t.length-1;n===0?t=e.reactions=null:(t[i]=t[n],t.pop())}}if(t===null&&(e.f&Jo)!==0&&(Pr===null||!sm.call(Pr,e))){var s=e;(s.f&Ca)!==0&&(s.f^=Ca,s.f&=~ch),s.v!==Lo&&s9(s),tM(s),u0(s,0)}}function u0(r,e){var t=r.deps;if(t!==null)for(var i=e;i<t.length;i++)fM(r,t[i])}function yp(r){var e=r.f;if((e&ya)===0){mo(r,Po);var t=ps,i=Bx;ps=r,Bx=!0;try{(e&(Ga|P5))!==0?uM(r):u9(r),c3(r);var n=m3(r);r.teardown=typeof n=="function"?n:null,r.wv=g3;var s;F5&&RT&&(r.f&Oo)!==0&&r.deps}finally{Bx=i,ps=t}}}async function ga(){await Promise.resolve(),jT()}function o(r){var e=r.f,t=(e&Jo)!==0;if(hs!==null&&!Ka){var i=ps!==null&&(ps.f&ya)!==0;if(!i&&(Pl===null||!Pl.has(r))){var n=hs.deps;if((hs.f&am)!==0)r.rv<nu&&(r.rv=nu,Pr===null&&n!==null&&n[Vr]===r?Vr++:Pr===null?Pr=[r]:Pr.push(r));else{hs.deps??(hs.deps=[]),sm.call(hs.deps,r)||hs.deps.push(r);var s=r.reactions;s===null?r.reactions=[hs]:sm.call(s,hs)||s.push(hs)}}}if(xc&&gu.has(r))return gu.get(r);if(t){var a=r;if(xc){var l=a.v;return((a.f&Po)===0&&a.reactions!==null||b3(a))&&(l=l9(a)),gu.set(a,l),l}var d=(a.f&Ca)===0&&!Ka&&hs!==null&&(Bx||(hs.f&Ca)!==0),u=(a.f&qp)===0;hv(a)&&(d&&(a.f|=Ca),X5(a)),d&&!u&&(Q5(a),_3(a))}if(Uo!=null&&Uo.has(r))return Uo.get(r);if((r.f&sd)!==0)throw r.v;return r.v}function _3(r){if(r.f|=Ca,r.deps!==null)for(const e of r.deps)(e.reactions??(e.reactions=[])).push(r),(e.f&Jo)!==0&&(e.f&Ca)===0&&(Q5(e),_3(e))}function b3(r){if(r.v===Lo)return!0;if(r.deps===null)return!1;for(const e of r.deps)if(gu.has(e)||(e.f&Jo)!==0&&b3(e))return!0;return!1}function Ho(r){var e=Ka;try{return Ka=!0,r()}finally{Ka=e}}const pM=["touchstart","touchmove"];function gM(r){return pM.includes(r)}const su=Symbol("events"),C3=new Set,Dy=new Set;function vM(r,e,t,i={}){function n(s){if(i.capture||Ay.call(e,s),!s.cancelBubble)return P1(()=>t==null?void 0:t.call(this,s))}return r.startsWith("pointer")||r.startsWith("touch")||r==="wheel"?Il(()=>{e.addEventListener(r,n,i)}):e.addEventListener(r,n,i),n}function ws(r,e,t,i,n){var s={capture:i,passive:n},a=vM(r,e,t,s);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&M1(()=>{e.removeEventListener(r,a,s)})}function z(r,e,t){(e[su]??(e[su]={}))[r]=t}function ms(r){for(var e=0;e<r.length;e++)C3.add(r[e]);for(var t of Dy)t(r)}let f8=null;function Ay(r){var E,S;var e=this,t=e.ownerDocument,i=r.type,n=((E=r.composedPath)==null?void 0:E.call(r))||[],s=n[0]||r.target;f8=r;var a=0,l=f8===r&&r[su];if(l){var d=n.indexOf(l);if(d!==-1&&(e===document||e===window)){r[su]=e;return}var u=n.indexOf(e);if(u===-1)return;d<=u&&(a=d)}if(s=n[a]||r.target,s!==e){JP(r,"currentTarget",{configurable:!0,get(){return s||t}});var g=hs,x=ps;ka(null),Ol(null);try{for(var m,C=[];s!==null&&s!==e;){try{var _=(S=s[su])==null?void 0:S[i];_!=null&&(!s.disabled||r.target===s)&&_.call(s,r)}catch(I){m?C.push(I):m=I}if(r.cancelBubble)break;a++,s=a<n.length?n[a]:null}if(m){for(let I of C)queueMicrotask(()=>{throw I});throw m}}finally{r[su]=e,delete r.currentTarget,ka(g),Ol(x)}}}var QA;const Ib=((QA=globalThis==null?void 0:globalThis.window)==null?void 0:QA.trustedTypes)&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:r=>r});function xM(r){return(Ib==null?void 0:Ib.createHTML(r))??r}function y3(r){var e=a3("template");return e.innerHTML=xM(r.replaceAll("<!>","<!---->")),e.content}function kd(r,e){var t=ps;t.nodes===null&&(t.nodes={start:r,end:e,a:null,t:null})}function k(r,e){var t=(e&R5)!==0,i=(e&BT)!==0,n,s=!r.startsWith("<!>");return()=>{n===void 0&&(n=y3(s?r:"<!>"+r),t||(n=Xr(n)));var a=i||n3?document.importNode(n,!0):n.cloneNode(!0);if(t){var l=Xr(a),d=a.lastChild;kd(l,d)}else kd(a,a);return a}}function mM(r,e,t="svg"){var i=!r.startsWith("<!>"),n=(e&R5)!==0,s=`<${t}>${i?r:"<!>"+r}</${t}>`,a;return()=>{if(!a){var l=y3(s),d=Xr(l);if(n)for(a=document.createDocumentFragment();Xr(d);)a.appendChild(Xr(d));else a=Xr(d)}var u=a.cloneNode(!0);if(n){var g=Xr(u),x=u.lastChild;kd(g,x)}else kd(u,u);return u}}function Wo(r,e){return mM(r,e,"svg")}function kn(r=""){{var e=cc(r+"");return kd(e,e),e}}function ks(){var r=document.createDocumentFragment(),e=document.createComment(""),t=cc();return r.append(e,t),kd(e,t),r}function y(r,e){r!==null&&r.before(e)}function B(r,e){var t=e==null?"":typeof e=="object"?`${e}`:e;t!==(r[xg]??(r[xg]=r.nodeValue))&&(r[xg]=t,r.nodeValue=`${t}`)}function _M(r,e){return bM(r,e)}const Wv=new Map;function bM(r,{target:e,anchor:t,props:i={},events:n,context:s,intro:a=!0,transformError:l}){sM();var d=void 0,u=cM(()=>{var g=t??e.appendChild(cc());UT(g,{pending:()=>{}},C=>{ls({});var _=Qo;s&&(_.c=s),n&&(i.$$events=n),d=r(C,i)||{},cs()},l);var x=new Set,m=C=>{for(var _=0;_<C.length;_++){var E=C[_];if(!x.has(E)){x.add(E);var S=gM(E);for(const O of[e,document]){var I=Wv.get(O);I===void 0&&(I=new Map,Wv.set(O,I));var M=I.get(E);M===void 0?(O.addEventListener(E,Ay,{passive:S}),I.set(E,1)):I.set(E,M+1)}}}};return m(F1(C3)),Dy.add(m),()=>{var S;for(var C of x)for(const I of[e,document]){var _=Wv.get(I),E=_.get(C);--E==0?(I.removeEventListener(C,Ay),_.delete(C),_.size===0&&Wv.delete(I)):_.set(C,E)}Dy.delete(m),g!==t&&((S=g.parentNode)==null||S.removeChild(g))}});return CM.set(d,u),d}let CM=new WeakMap;var Ra,bl,Ur,du,$0,q0,__;class w3{constructor(e,t=!0){es(this,"anchor");Zn(this,Ra,new Map);Zn(this,bl,new Map);Zn(this,Ur,new Map);Zn(this,du,new Set);Zn(this,$0,!0);Zn(this,q0,e=>{if(Zt(this,Ra).has(e)){var t=Zt(this,Ra).get(e),i=Zt(this,bl).get(t);if(i)dm(i),Zt(this,du).delete(t);else{var n=Zt(this,Ur).get(t);n&&(dm(n.effect),Zt(this,bl).set(t,n.effect),Zt(this,Ur).delete(t),n.fragment.lastChild.remove(),this.anchor.before(n.fragment),i=n.effect)}for(const[s,a]of Zt(this,Ra)){if(Zt(this,Ra).delete(s),s===e)break;const l=Zt(this,Ur).get(a);l&&(Hr(l.effect),Zt(this,Ur).delete(a))}for(const[s,a]of Zt(this,bl)){if(s===t||Zt(this,du).has(s))continue;const l=()=>{if(Array.from(Zt(this,Ra).values()).includes(s)){var u=document.createDocumentFragment();h9(a,u),u.append(cc()),Zt(this,Ur).set(s,{effect:a,fragment:u})}else Hr(a);Zt(this,du).delete(s),Zt(this,bl).delete(s)};Zt(this,$0)||!i?(Zt(this,du).add(s),vu(a,l,!1)):l()}}});Zn(this,__,e=>{Zt(this,Ra).delete(e);const t=Array.from(Zt(this,Ra).values());for(const[i,n]of Zt(this,Ur))t.includes(i)||(Hr(n.effect),Zt(this,Ur).delete(i))});this.anchor=e,Yn(this,$0,t)}ensure(e,t){var i=Pn,n=r3();if(t&&!Zt(this,bl).has(e)&&!Zt(this,Ur).has(e))if(n){var s=document.createDocumentFragment(),a=cc();s.append(a),Zt(this,Ur).set(e,{effect:fa(()=>t(a)),fragment:s})}else Zt(this,bl).set(e,fa(()=>t(this.anchor)));if(Zt(this,Ra).set(i,e),n){for(const[l,d]of Zt(this,bl))l===e?i.unskip_effect(d):i.skip_effect(d);for(const[l,d]of Zt(this,Ur))l===e?i.unskip_effect(d.effect):i.skip_effect(d.effect);i.oncommit(Zt(this,q0)),i.ondiscard(Zt(this,__))}else Zt(this,q0).call(this,i)}}Ra=new WeakMap,bl=new WeakMap,Ur=new WeakMap,du=new WeakMap,$0=new WeakMap,q0=new WeakMap,__=new WeakMap;function T(r,e,t=!1){var i=new w3(r),n=t?_p:0;function s(a,l){i.ensure(a,l)}R1(()=>{var a=!1;e((l,d=0)=>{a=!0,s(d,l)}),a||s(-1,null)},n)}const yM=Symbol("NaN");function E3(r,e,t){var i=new w3(r);R1(()=>{var n=e();n!==n&&(n=yM),i.ensure(n,t)})}function Ki(r,e){return e}function wM(r,e,t){for(var i=[],n=e.length,s,a=e.length,l=0;l<n;l++){let x=e[l];vu(x,()=>{if(s){if(s.pending.delete(x),s.done.add(x),s.pending.size===0){var m=r.outrogroups;By(r,F1(s.done)),m.delete(s),m.size===0&&(r.outrogroups=null)}}else a-=1},!1)}if(a===0){var d=i.length===0&&t!==null;if(d){var u=t,g=u.parentNode;oM(g),g.append(u),r.items.clear()}By(r,e,!d)}else s={pending:new Set(e),done:new Set},(r.outrogroups??(r.outrogroups=new Set)).add(s)}function By(r,e,t=!0){var i;if(r.pending.size>0){i=new Set;for(const a of r.pending.values())for(const l of a)i.add(r.items.get(l).e)}for(var n=0;n<e.length;n++){var s=e[n];if(i!=null&&i.has(s)){s.f|=Dl;const a=document.createDocumentFragment();h9(s,a)}else Hr(e[n],t)}}var p8;function gi(r,e,t,i,n,s=null){var a=r,l=new Map,d=(e&M5)!==0;if(d){var u=r;a=u.appendChild(cc())}var g=null,x=a9(()=>{var O=t();return n9(O)?O:O==null?[]:F1(O)}),m,C=new Map,_=!0;function E(O){(M.effect.f&ya)===0&&(M.pending.delete(O),M.fallback=g,EM(M,m,a,e,i),g!==null&&(m.length===0?(g.f&Dl)===0?dm(g):(g.f^=Dl,bg(g,null,a)):vu(g,()=>{g=null})))}function S(O){M.pending.delete(O)}var I=R1(()=>{m=o(x);for(var O=m.length,R=new Set,H=Pn,G=r3(),q=0;q<O;q+=1){var te=m[q],ye=i(te,q),Ne=_?null:l.get(ye);Ne?(Ne.v&&Cp(Ne.v,te),Ne.i&&Cp(Ne.i,q),G&&H.unskip_effect(Ne.e)):(Ne=SM(l,_?a:p8??(p8=cc()),te,ye,q,n,e,t),_||(Ne.e.f|=Dl),l.set(ye,Ne)),R.add(ye)}if(O===0&&s&&!g&&(_?g=fa(()=>s(a)):(g=fa(()=>s(p8??(p8=cc()))),g.f|=Dl)),O>R.size&&uT(),!_)if(C.set(H,R),G){for(const[ge,Ae]of l)R.has(ge)||H.skip_effect(Ae.e);H.oncommit(E),H.ondiscard(S)}else E(H);o(x)}),M={effect:I,items:l,pending:C,outrogroups:null,fallback:g};_=!1}function ag(r){for(;r!==null&&(r.f&Za)===0;)r=r.next;return r}function EM(r,e,t,i,n){var Ne,ge,Ae,dt,he,We,de,je,fe;var s=(i&wT)!==0,a=e.length,l=r.items,d=ag(r.effect.first),u,g=null,x,m=[],C=[],_,E,S,I;if(s)for(I=0;I<a;I+=1)_=e[I],E=n(_,I),S=l.get(E).e,(S.f&Dl)===0&&((ge=(Ne=S.nodes)==null?void 0:Ne.a)==null||ge.measure(),(x??(x=new Set)).add(S));for(I=0;I<a;I+=1){if(_=e[I],E=n(_,I),S=l.get(E).e,r.outrogroups!==null)for(const Ft of r.outrogroups)Ft.pending.delete(S),Ft.done.delete(S);if((S.f&br)!==0&&(dm(S),s&&((dt=(Ae=S.nodes)==null?void 0:Ae.a)==null||dt.unfix(),(x??(x=new Set)).delete(S))),(S.f&Dl)!==0)if(S.f^=Dl,S===d)bg(S,null,t);else{var M=g?g.next:d;S===r.effect.last&&(r.effect.last=S.prev),S.prev&&(S.prev.next=S.next),S.next&&(S.next.prev=S.prev),Pc(r,g,S),Pc(r,S,M),bg(S,M,t),g=S,m=[],C=[],d=ag(g.next);continue}if(S!==d){if(u!==void 0&&u.has(S)){if(m.length<C.length){var O=C[0],R;g=O.prev;var H=m[0],G=m[m.length-1];for(R=0;R<m.length;R+=1)bg(m[R],O,t);for(R=0;R<C.length;R+=1)u.delete(C[R]);Pc(r,H.prev,G.next),Pc(r,g,H),Pc(r,G,O),d=O,g=G,I-=1,m=[],C=[]}else u.delete(S),bg(S,d,t),Pc(r,S.prev,S.next),Pc(r,S,g===null?r.effect.first:g.next),Pc(r,g,S),g=S;continue}for(m=[],C=[];d!==null&&d!==S;)(u??(u=new Set)).add(d),C.push(d),d=ag(d.next);if(d===null)continue}(S.f&Dl)===0&&m.push(S),g=S,d=ag(S.next)}if(r.outrogroups!==null){for(const Ft of r.outrogroups)Ft.pending.size===0&&(By(r,F1(Ft.done)),(he=r.outrogroups)==null||he.delete(Ft));r.outrogroups.size===0&&(r.outrogroups=null)}if(d!==null||u!==void 0){var q=[];if(u!==void 0)for(S of u)(S.f&br)===0&&q.push(S);for(;d!==null;)(d.f&br)===0&&d!==r.fallback&&q.push(d),d=ag(d.next);var te=q.length;if(te>0){var ye=(i&M5)!==0&&a===0?t:null;if(s){for(I=0;I<te;I+=1)(de=(We=q[I].nodes)==null?void 0:We.a)==null||de.measure();for(I=0;I<te;I+=1)(fe=(je=q[I].nodes)==null?void 0:je.a)==null||fe.fix()}wM(r,q,ye)}}s&&Il(()=>{var Ft,Te;if(x!==void 0)for(S of x)(Te=(Ft=S.nodes)==null?void 0:Ft.a)==null||Te.apply()})}function SM(r,e,t,i,n,s,a,l){var d=(a&CT)!==0?(a&ET)===0?iM(t,!1,!1):uh(t):null,u=(a&yT)!==0?uh(n):null;return{v:d,i:u,e:fa(()=>(s(e,d??t,u??n,l),()=>{r.delete(i)}))}}function bg(r,e,t){if(r.nodes)for(var i=r.nodes.start,n=r.nodes.end,s=e&&(e.f&Dl)===0?e.nodes.start:t;i!==null;){var a=dv(i);if(s.before(i),i===n)return;i=a}}function Pc(r,e,t){e===null?r.effect.first=t:e.next=t,t===null?r.effect.last=e:t.prev=e}function Jc(r,e,t=!1,i=!1,n=!1,s=!1){var a=r,l="";if(t)var d=r;P(()=>{var u=ps;if(l!==(l=e()??"")){if(t){u.nodes=null,d.innerHTML=l,l!==""&&kd(Xr(d),d.lastChild);return}if(u.nodes!==null&&(d3(u.nodes.start,u.nodes.end),u.nodes=null),l!==""){var g=i?FT:n?LT:void 0,x=a3(i?"svg":n?"math":"template",g);x.innerHTML=l;var m=i||n?x:x.content;if(kd(Xr(m),m.lastChild),i||n)for(;Xr(m);)a.before(Xr(m));else a.before(m)}}})}function S3(r){var e,t,i="";if(typeof r=="string"||typeof r=="number")i+=r;else if(typeof r=="object")if(Array.isArray(r)){var n=r.length;for(e=0;e<n;e++)r[e]&&(t=S3(r[e]))&&(i&&(i+=" "),i+=t)}else for(t in r)r[t]&&(i&&(i+=" "),i+=t);return i}function kM(){for(var r,e,t=0,i="",n=arguments.length;t<n;t++)(r=arguments[t])&&(e=S3(r))&&(i&&(i+=" "),i+=e);return i}function Nf(r){return typeof r=="object"?kM(r):r??""}const g8=[...`
|
|
3
3
|
\r\f \v\uFEFF`];function DM(r,e,t){var i=r==null?"":""+r;if(e&&(i=i?i+" "+e:e),t){for(var n of Object.keys(t))if(t[n])i=i?i+" "+n:n;else if(i.length)for(var s=n.length,a=0;(a=i.indexOf(n,a))>=0;){var l=a+s;(a===0||g8.includes(i[a-1]))&&(l===i.length||g8.includes(i[l]))?i=(a===0?"":i.substring(0,a))+i.substring(l+1):a=l}}return i===""?null:i}function v8(r,e=!1){var t=e?" !important;":";",i="";for(var n of Object.keys(r)){var s=r[n];s!=null&&s!==""&&(i+=" "+n+": "+s+t)}return i}function Pb(r){return r[0]!=="-"||r[1]!=="-"?r.toLowerCase():r}function AM(r,e){if(e){var t="",i,n;if(Array.isArray(e)?(i=e[0],n=e[1]):i=e,r){r=String(r).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var s=!1,a=0,l=!1,d=[];i&&d.push(...Object.keys(i).map(Pb)),n&&d.push(...Object.keys(n).map(Pb));var u=0,g=-1;const E=r.length;for(var x=0;x<E;x++){var m=r[x];if(l?m==="/"&&r[x-1]==="*"&&(l=!1):s?s===m&&(s=!1):m==="/"&&r[x+1]==="*"?l=!0:m==='"'||m==="'"?s=m:m==="("?a++:m===")"&&a--,!l&&s===!1&&a===0){if(m===":"&&g===-1)g=x;else if(m===";"||x===E-1){if(g!==-1){var C=Pb(r.substring(u,g).trim());if(!d.includes(C)){m!==";"&&x++;var _=r.substring(u,x).trim();t+=" "+_+";"}}u=x+1,g=-1}}}}return i&&(t+=v8(i)),n&&(t+=v8(n,!0)),t=t.trim(),t===""?null:t}return r==null?null:String(r)}function Xt(r,e,t,i,n,s){var a=r[my];if(a!==t||a===void 0){var l=DM(t,i,s);l==null?r.removeAttribute("class"):e?r.className=l:r.setAttribute("class",l),r[my]=t}else if(s&&n!==s)for(var d in s){var u=!!s[d];(n==null||u!==!!n[d])&&r.classList.toggle(d,u)}return s}function Tb(r,e={},t,i){for(var n in t){var s=t[n];e[n]!==s&&(t[n]==null?r.style.removeProperty(n):r.style.setProperty(n,s,i))}}function Do(r,e,t,i){var n=r[_y];if(n!==e){var s=AM(e,i);s==null?r.removeAttribute("style"):r.style.cssText=s,r[_y]=e}else i&&(Array.isArray(i)?(Tb(r,t==null?void 0:t[0],i[0]),Tb(r,t==null?void 0:t[1],i[1],"important")):Tb(r,t,i));return i}function hh(r,e,t=!1){if(r.multiple){if(e==null)return;if(!n9(e))return PT();for(var i of r.options)i.selected=e.includes(Og(i));return}for(i of r.options){var n=Og(i);if(t3(n,e)){i.selected=!0;return}}(!t||e!==void 0)&&(r.selectedIndex=-1)}function wp(r){var e=new MutationObserver(()=>{hh(r,r.__value)});e.observe(r,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),M1(()=>{e.disconnect()})}function to(r,e,t=e){var i=new WeakSet,n=!0;T1(r,"change",s=>{var a=s?"[selected]":":checked",l;if(r.multiple)l=[].map.call(r.querySelectorAll(a),Og);else{var d=r.querySelector(a)??r.querySelector("option:not([disabled])");l=d&&Og(d)}t(l),r.__value=l,Pn!==null&&i.add(Pn)}),d9(()=>{var s=e();if(r===document.activeElement){var a=Pn;if(i.has(a))return}if(hh(r,s,n),n&&s===void 0){var l=r.querySelector(":checked");l!==null&&(s=Og(l),t(s))}r.__value=s,n=!1}),wp(r)}function Og(r){return"__value"in r?r.__value:r.value}const BM=Symbol("is custom element"),FM=Symbol("is html"),LM=cT?"progress":"PROGRESS";function qa(r,e){var t=f9(r);t.value===(t.value=e??void 0)||r.value===e&&(e!==0||r.nodeName!==LM)||(r.value=e??"")}function Zo(r,e){var t=f9(r);t.checked!==(t.checked=e??void 0)&&(r.checked=e)}function xi(r,e,t,i){var n=f9(r);n[e]!==(n[e]=t)&&(e==="loading"&&(r[lT]=t),t==null?r.removeAttribute(e):typeof t!="string"&&IM(r).includes(e)?r[e]=t:r.setAttribute(e,t))}function f9(r){return r[Ex]??(r[Ex]={[BM]:r.nodeName.includes("-"),[FM]:r.namespaceURI===N5})}var x8=new Map;function IM(r){var e=r.getAttribute("is")||r.nodeName,t=x8.get(e);if(t)return t;x8.set(e,t=[]);for(var i,n=r,s=Element.prototype;s!==n;){i=eT(n);for(var a in i)i[a].set&&a!=="innerHTML"&&a!=="textContent"&&a!=="innerText"&&t.push(a);n=L5(n)}return t}function ui(r,e,t=e){var i=new WeakSet;T1(r,"input",async n=>{var s=n?r.defaultValue:r.value;if(s=Rb(r)?Nb(s):s,t(s),Pn!==null&&i.add(Pn),await ga(),s!==(s=e())){var a=r.selectionStart,l=r.selectionEnd,d=r.value.length;if(r.value=s??"",l!==null){var u=r.value.length;a===l&&l===d&&u>d?(r.selectionStart=u,r.selectionEnd=u):(r.selectionStart=a,r.selectionEnd=Math.min(l,u))}}}),Ho(e)==null&&r.value&&(t(Rb(r)?Nb(r.value):r.value),Pn!==null&&i.add(Pn)),uv(()=>{var n=e();if(r===document.activeElement){var s=Pn;if(i.has(s))return}Rb(r)&&n===Nb(r.value)||r.type==="date"&&!n&&!r.value||n!==r.value&&(r.value=n??"")})}const Mb=new Set;function Of(r,e,t,i,n=i){var s=t.getAttribute("type")==="checkbox",a=r;if(e!==null)for(var l of e)a=a[l]??(a[l]=[]);a.push(t),T1(t,"change",()=>{var d=t.__value;s&&(d=PM(a,d,t.checked)),n(d)},()=>n(s?[]:null)),uv(()=>{var d=i();s?(d=d||[],t.checked=d.includes(t.__value)):t.checked=t3(t.__value,d)}),M1(()=>{var d=a.indexOf(t);d!==-1&&a.splice(d,1)}),Mb.has(a)||(Mb.add(a),Il(()=>{a.sort((d,u)=>d.compareDocumentPosition(u)===4?-1:1),Mb.delete(a)})),Il(()=>{})}function Ss(r,e,t=e){T1(r,"change",i=>{var n=i?r.defaultChecked:r.checked;t(n)}),Ho(e)==null&&t(r.checked),uv(()=>{var i=e();r.checked=!!i})}function PM(r,e,t){for(var i=new Set,n=0;n<r.length;n+=1)r[n].checked&&i.add(r[n].__value);return t||i.delete(e),Array.from(i)}function Rb(r){var e=r.type;return e==="number"||e==="range"}function Nb(r){return r===""?null:+r}var Yc,Xf,U0,b_,k3;const C_=class C_{constructor(e){Zn(this,b_);Zn(this,Yc,new WeakMap);Zn(this,Xf);Zn(this,U0);Yn(this,U0,e)}observe(e,t){var i=Zt(this,Yc).get(e)||new Set;return i.add(t),Zt(this,Yc).set(e,i),Ms(this,b_,k3).call(this).observe(e,Zt(this,U0)),()=>{var n=Zt(this,Yc).get(e);n.delete(t),n.size===0&&(Zt(this,Yc).delete(e),Zt(this,Xf).unobserve(e))}}};Yc=new WeakMap,Xf=new WeakMap,U0=new WeakMap,b_=new WeakSet,k3=function(){return Zt(this,Xf)??Yn(this,Xf,new ResizeObserver(e=>{for(var t of e){C_.entries.set(t.target,t);for(var i of Zt(this,Yc).get(t.target)||[])i(t)}}))},es(C_,"entries",new WeakMap);let Fy=C_;var TM=new Fy({box:"border-box"});function MM(r,e,t){var i=TM.observe(r,()=>t(r[e]));d9(()=>(Ho(()=>t(r[e])),i))}function Ob(r,e){return r===e||(r==null?void 0:r[pu])===e}function ts(r={},e,t,i){var n=Qo.r,s=ps;return d9(()=>{var a,l;return uv(()=>{a=l,l=[],Ho(()=>{Ob(t(...l),r)||(e(r,...l),a&&Ob(t(...a),r)&&e(null,...a))})}),()=>{let d=s;for(;d!==n&&d.parent!==null&&d.parent.f&xy;)d=d.parent;const u=()=>{l&&Ob(t(...l),r)&&e(null,...l)},g=d.teardown;d.teardown=()=>{u(),g==null||g()}}}),r}function $n(r,e,t,i){var R;var n=!0,s=(t&DT)!==0,a=(t&AT)!==0,l=i,d=!0,u=void 0,g=()=>a&&n?(u??(u=d0(i)),o(u)):(d&&(d=!1,l=a?Ho(i):i),l);let x;if(s){var m=pu in r||aT in r;x=((R=Mf(r,e))==null?void 0:R.set)??(m&&e in r?H=>r[e]=H:void 0)}var C,_=!1;s?[C,_]=HT(()=>r[e]):C=r[e],C===void 0&&i!==void 0&&(C=g(),x&&(vT(),x(C)));var E;if(E=()=>{var H=r[e];return H===void 0?g():(d=!0,H)},(t&kT)===0)return E;if(x){var S=r.$$legacy;return(function(H,G){return arguments.length>0?((!G||S||_)&&x(G?E():H),H):E()})}var I=!1,M=((t&ST)!==0?d0:a9)(()=>(I=!1,E()));s&&o(M);var O=ps;return(function(H,G){if(arguments.length>0){const q=G?o(M):s?Ci(H):H;return p(M,q),I=!0,l!==void 0&&(l=q),H}return xc&&I||(O.f&ya)!==0?M.v:o(M)})}function Os(r){Qo===null&&T5(),cn(()=>{const e=Ho(r);if(typeof e=="function")return e})}function Lh(r){Qo===null&&T5(),Os(()=>()=>Ho(r))}const RM="5";var JA;typeof window<"u"&&((JA=window.__svelte??(window.__svelte={})).v??(JA.v=new Set)).add(RM);/*!-----------------------------------------------------------------------------
|
|
4
4
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -10,7 +10,7 @@ var xF=Object.defineProperty;var A2=r=>{throw TypeError(r)};var mF=(r,e,t)=>e in
|
|
|
10
10
|
* Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
|
|
11
11
|
* Released under the MIT license
|
|
12
12
|
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
|
13
|
-
*-----------------------------------------------------------------------------*/var GM=Object.defineProperty,KM=Object.getOwnPropertyDescriptor,ZM=Object.getOwnPropertyNames,YM=Object.prototype.hasOwnProperty,XM=(r,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of ZM(e))!YM.call(r,n)&&n!==t&&GM(r,n,{get:()=>e[n],enumerable:!(i=KM(e,n))||i.enumerable});return r},QM=(r,e,t)=>(XM(r,e,"default"),t),JM="5.4.5",Ep={};QM(Ep,t6);var B3=(r=>(r[r.None=0]="None",r[r.CommonJS=1]="CommonJS",r[r.AMD=2]="AMD",r[r.UMD=3]="UMD",r[r.System=4]="System",r[r.ES2015=5]="ES2015",r[r.ESNext=99]="ESNext",r))(B3||{}),F3=(r=>(r[r.None=0]="None",r[r.Preserve=1]="Preserve",r[r.React=2]="React",r[r.ReactNative=3]="ReactNative",r[r.ReactJSX=4]="ReactJSX",r[r.ReactJSXDev=5]="ReactJSXDev",r))(F3||{}),L3=(r=>(r[r.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",r[r.LineFeed=1]="LineFeed",r))(L3||{}),I3=(r=>(r[r.ES3=0]="ES3",r[r.ES5=1]="ES5",r[r.ES2015=2]="ES2015",r[r.ES2016=3]="ES2016",r[r.ES2017=4]="ES2017",r[r.ES2018=5]="ES2018",r[r.ES2019=6]="ES2019",r[r.ES2020=7]="ES2020",r[r.ESNext=99]="ESNext",r[r.JSON=100]="JSON",r[r.Latest=99]="Latest",r))(I3||{}),P3=(r=>(r[r.Classic=1]="Classic",r[r.NodeJs=2]="NodeJs",r))(P3||{}),T3=class{constructor(r,e,t,i,n){this._onDidChange=new Ep.Emitter,this._onDidExtraLibsChange=new Ep.Emitter,this._extraLibs=Object.create(null),this._removedExtraLibs=Object.create(null),this._eagerModelSync=!1,this.setCompilerOptions(r),this.setDiagnosticsOptions(e),this.setWorkerOptions(t),this.setInlayHintsOptions(i),this.setModeConfiguration(n),this._onDidExtraLibsChangeTimeout=-1}get onDidChange(){return this._onDidChange.event}get onDidExtraLibsChange(){return this._onDidExtraLibsChange.event}get modeConfiguration(){return this._modeConfiguration}get workerOptions(){return this._workerOptions}get inlayHintsOptions(){return this._inlayHintsOptions}getExtraLibs(){return this._extraLibs}addExtraLib(r,e){let t;if(typeof e>"u"?t=`ts:extralib-${Math.random().toString(36).substring(2,15)}`:t=e,this._extraLibs[t]&&this._extraLibs[t].content===r)return{dispose:()=>{}};let i=1;return this._removedExtraLibs[t]&&(i=this._removedExtraLibs[t]+1),this._extraLibs[t]&&(i=this._extraLibs[t].version+1),this._extraLibs[t]={content:r,version:i},this._fireOnDidExtraLibsChangeSoon(),{dispose:()=>{let n=this._extraLibs[t];n&&n.version===i&&(delete this._extraLibs[t],this._removedExtraLibs[t]=i,this._fireOnDidExtraLibsChangeSoon())}}}setExtraLibs(r){for(const e in this._extraLibs)this._removedExtraLibs[e]=this._extraLibs[e].version;if(this._extraLibs=Object.create(null),r&&r.length>0)for(const e of r){const t=e.filePath||`ts:extralib-${Math.random().toString(36).substring(2,15)}`,i=e.content;let n=1;this._removedExtraLibs[t]&&(n=this._removedExtraLibs[t]+1),this._extraLibs[t]={content:i,version:n}}this._fireOnDidExtraLibsChangeSoon()}_fireOnDidExtraLibsChangeSoon(){this._onDidExtraLibsChangeTimeout===-1&&(this._onDidExtraLibsChangeTimeout=window.setTimeout(()=>{this._onDidExtraLibsChangeTimeout=-1,this._onDidExtraLibsChange.fire(void 0)},0))}getCompilerOptions(){return this._compilerOptions}setCompilerOptions(r){this._compilerOptions=r||Object.create(null),this._onDidChange.fire(void 0)}getDiagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(r){this._diagnosticsOptions=r||Object.create(null),this._onDidChange.fire(void 0)}setWorkerOptions(r){this._workerOptions=r||Object.create(null),this._onDidChange.fire(void 0)}setInlayHintsOptions(r){this._inlayHintsOptions=r||Object.create(null),this._onDidChange.fire(void 0)}setMaximumWorkerIdleTime(r){}setEagerModelSync(r){this._eagerModelSync=r}getEagerModelSync(){return this._eagerModelSync}setModeConfiguration(r){this._modeConfiguration=r||Object.create(null),this._onDidChange.fire(void 0)}},eR=JM,M3={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,diagnostics:!0,documentRangeFormattingEdits:!0,signatureHelp:!0,onTypeFormattingEdits:!0,codeActions:!0,inlayHints:!0},R3=new T3({allowNonTsExtensions:!0,target:99},{noSemanticValidation:!1,noSyntaxValidation:!1,onlyVisible:!1},{},{},M3),N3=new T3({allowNonTsExtensions:!0,allowJs:!0,target:99},{noSemanticValidation:!0,noSyntaxValidation:!1,onlyVisible:!1},{},{},M3),tR=()=>N1().then(r=>r.getTypeScriptWorker()),iR=()=>N1().then(r=>r.getJavaScriptWorker());Ep.languages.typescript={ModuleKind:B3,JsxEmit:F3,NewLineKind:L3,ScriptTarget:I3,ModuleResolutionKind:P3,typescriptVersion:eR,typescriptDefaults:R3,javascriptDefaults:N3,getTypeScriptWorker:tR,getJavaScriptWorker:iR};function N1(){return e6(()=>import("./tsMode-B1gyNry3.js"),__vite__mapDeps([3,1,2]))}Ep.languages.onLanguage("typescript",()=>N1().then(r=>r.setupTypeScript(R3)));Ep.languages.onLanguage("javascript",()=>N1().then(r=>r.setupJavaScript(N3)));class nR extends fr{constructor(){super({id:"diffEditor.toggleCollapseUnchangedRegions",title:Yi("toggleCollapseUnchangedRegions","Toggle Collapse Unchanged Regions"),icon:mn.map,toggled:si.has("config.diffEditor.hideUnchangedRegions.enabled"),precondition:si.has("isInDiffEditor"),menu:{when:si.has("isInDiffEditor"),id:Hi.EditorTitle,order:22,group:"navigation"}})}run(e,...t){const i=e.get(Hs),n=!i.getValue("diffEditor.hideUnchangedRegions.enabled");i.updateValue("diffEditor.hideUnchangedRegions.enabled",n)}}class O3 extends fr{constructor(){super({id:"diffEditor.toggleShowMovedCodeBlocks",title:Yi("toggleShowMovedCodeBlocks","Toggle Show Moved Code Blocks"),precondition:si.has("isInDiffEditor")})}run(e,...t){const i=e.get(Hs),n=!i.getValue("diffEditor.experimental.showMoves");i.updateValue("diffEditor.experimental.showMoves",n)}}class H3 extends fr{constructor(){super({id:"diffEditor.toggleUseInlineViewWhenSpaceIsLimited",title:Yi("toggleUseInlineViewWhenSpaceIsLimited","Toggle Use Inline View When Space Is Limited"),precondition:si.has("isInDiffEditor")})}run(e,...t){const i=e.get(Hs),n=!i.getValue("diffEditor.useInlineViewWhenSpaceIsLimited");i.updateValue("diffEditor.useInlineViewWhenSpaceIsLimited",n)}}const pv=Yi("diffEditor","Diff Editor");class sR extends Ya{constructor(){super({id:"diffEditor.switchSide",title:Yi("switchSide","Switch Side"),icon:mn.arrowSwap,precondition:si.has("isInDiffEditor"),f1:!0,category:pv})}runEditorCommand(e,t,i){const n=Gp(e);if(n instanceof G0){if(i&&i.dryRun)return{destinationSelection:n.mapToOtherSide().destinationSelection};n.switchSide()}}}class oR extends Ya{constructor(){super({id:"diffEditor.exitCompareMove",title:Yi("exitCompareMove","Exit Compare Move"),icon:mn.close,precondition:le.comparingMovedCode,f1:!1,category:pv,keybinding:{weight:1e4,primary:9}})}runEditorCommand(e,t,...i){const n=Gp(e);n instanceof G0&&n.exitCompareMove()}}class rR extends Ya{constructor(){super({id:"diffEditor.collapseAllUnchangedRegions",title:Yi("collapseAllUnchangedRegions","Collapse All Unchanged Regions"),icon:mn.fold,precondition:si.has("isInDiffEditor"),f1:!0,category:pv})}runEditorCommand(e,t,...i){const n=Gp(e);n instanceof G0&&n.collapseAllUnchangedRegions()}}class aR extends Ya{constructor(){super({id:"diffEditor.showAllUnchangedRegions",title:Yi("showAllUnchangedRegions","Show All Unchanged Regions"),icon:mn.unfold,precondition:si.has("isInDiffEditor"),f1:!0,category:pv})}runEditorCommand(e,t,...i){const n=Gp(e);n instanceof G0&&n.showAllUnchangedRegions()}}class Ly extends fr{constructor(){super({id:"diffEditor.revert",title:Yi("revert","Revert"),f1:!1,category:pv})}run(e,t){const i=lR(e,t.originalUri,t.modifiedUri);i instanceof G0&&i.revertRangeMappings(t.mapping.innerChanges??[])}}const z3=Yi("accessibleDiffViewer","Accessible Diff Viewer"),y_=class y_ extends fr{constructor(){super({id:y_.id,title:Yi("editor.action.accessibleDiffViewer.next","Go to Next Difference"),category:z3,precondition:si.has("isInDiffEditor"),keybinding:{primary:65,weight:100},f1:!0})}run(e){const t=Gp(e);t==null||t.accessibleDiffViewerNext()}};y_.id="editor.action.accessibleDiffViewer.next";let h0=y_;const w_=class w_ extends fr{constructor(){super({id:w_.id,title:Yi("editor.action.accessibleDiffViewer.prev","Go to Previous Difference"),category:z3,precondition:si.has("isInDiffEditor"),keybinding:{primary:1089,weight:100},f1:!0})}run(e){const t=Gp(e);t==null||t.accessibleDiffViewerPrev()}};w_.id="editor.action.accessibleDiffViewer.prev";let um=w_;function lR(r,e,t){return r.get(ao).listDiffEditors().find(s=>{var d,u;const a=s.getModifiedEditor(),l=s.getOriginalEditor();return a&&((d=a.getModel())==null?void 0:d.uri.toString())===t.toString()&&l&&((u=l.getModel())==null?void 0:u.uri.toString())===e.toString()})||null}function Gp(r){const t=r.get(ao).listDiffEditors(),i=i6();if(i)for(const n of t){const s=n.getContainerDomNode();if(cR(s,i))return n}return null}function cR(r,e){let t=e;for(;t;){if(t===r)return!0;t=t.parentElement}return!1}gs(nR);gs(O3);gs(H3);Ea.appendMenuItem(Hi.EditorTitle,{command:{id:new H3().desc.id,title:F("useInlineViewWhenSpaceIsLimited","Use Inline View When Space Is Limited"),toggled:si.has("config.diffEditor.useInlineViewWhenSpaceIsLimited"),precondition:si.has("isInDiffEditor")},order:11,group:"1_diff",when:si.and(le.diffEditorRenderSideBySideInlineBreakpointReached,si.has("isInDiffEditor"))});Ea.appendMenuItem(Hi.EditorTitle,{command:{id:new O3().desc.id,title:F("showMoves","Show Moved Code Blocks"),icon:mn.move,toggled:_F.create("config.diffEditor.experimental.showMoves",!0),precondition:si.has("isInDiffEditor")},order:10,group:"1_diff",when:si.has("isInDiffEditor")});gs(Ly);for(const r of[{icon:mn.arrowRight,key:le.diffEditorInlineMode.toNegated()},{icon:mn.discard,key:le.diffEditorInlineMode}])Ea.appendMenuItem(Hi.DiffEditorHunkToolbar,{command:{id:new Ly().desc.id,title:F("revertHunk","Revert Block"),icon:r.icon},when:si.and(le.diffEditorModifiedWritable,r.key),order:5,group:"primary"}),Ea.appendMenuItem(Hi.DiffEditorSelectionToolbar,{command:{id:new Ly().desc.id,title:F("revertSelection","Revert Selection"),icon:r.icon},when:si.and(le.diffEditorModifiedWritable,r.key),order:5,group:"primary"});gs(sR);gs(oR);gs(rR);gs(aR);Ea.appendMenuItem(Hi.EditorTitle,{command:{id:h0.id,title:F("Open Accessible Diff Viewer","Open Accessible Diff Viewer"),precondition:si.has("isInDiffEditor")},order:10,group:"2_diff",when:si.and(le.accessibleDiffViewerVisible.negate(),si.has("isInDiffEditor"))});Ts.registerCommandAlias("editor.action.diffReview.next",h0.id);gs(h0);Ts.registerCommandAlias("editor.action.diffReview.prev",um.id);gs(um);var dR=function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var l=r.length-1;l>=0;l--)(a=r[l])&&(s=(n<3?a(s):n>3?a(e,t,s):a(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},uR=function(r,e){return function(t,i){e(t,i,r)}},Iy;const O1=new Xn("selectionAnchorSet",!1);var Cu;let Dd=(Cu=class{static get(e){return e.getContribution(Iy.ID)}constructor(e,t){this.editor=e,this.selectionAnchorSetContextKey=O1.bindTo(t),this.modelChangeListener=e.onDidChangeModel(()=>this.selectionAnchorSetContextKey.reset())}setSelectionAnchor(){if(this.editor.hasModel()){const e=this.editor.getPosition();this.editor.changeDecorations(t=>{this.decorationId&&t.removeDecoration(this.decorationId),this.decorationId=t.addDecoration(pn.fromPositions(e,e),{description:"selection-anchor",stickiness:1,hoverMessage:new qo().appendText(F("selectionAnchor","Selection Anchor")),className:"selection-anchor"})}),this.selectionAnchorSetContextKey.set(!!this.decorationId),Sa(F("anchorSet","Anchor set at {0}:{1}",e.lineNumber,e.column))}}goToSelectionAnchor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);e&&this.editor.setPosition(e.getStartPosition())}}selectFromAnchorToCursor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);if(e){const t=this.editor.getPosition();this.editor.setSelection(pn.fromPositions(e.getStartPosition(),t)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){if(this.decorationId){const e=this.decorationId;this.editor.changeDecorations(t=>{t.removeDecoration(e),this.decorationId=void 0}),this.selectionAnchorSetContextKey.set(!1)}}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}},Iy=Cu,Cu.ID="editor.contrib.selectionAnchorController",Cu);Dd=Iy=dR([uR(1,ns)],Dd);class hR extends yi{constructor(){super({id:"editor.action.setSelectionAnchor",label:F("setSelectionAnchor","Set Selection Anchor"),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:le.editorTextFocus,primary:co(2089,2080),weight:100}})}async run(e,t){var i;(i=Dd.get(t))==null||i.setSelectionAnchor()}}class fR extends yi{constructor(){super({id:"editor.action.goToSelectionAnchor",label:F("goToSelectionAnchor","Go to Selection Anchor"),alias:"Go to Selection Anchor",precondition:O1})}async run(e,t){var i;(i=Dd.get(t))==null||i.goToSelectionAnchor()}}class pR extends yi{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:F("selectFromAnchorToCursor","Select from Anchor to Cursor"),alias:"Select from Anchor to Cursor",precondition:O1,kbOpts:{kbExpr:le.editorTextFocus,primary:co(2089,2089),weight:100}})}async run(e,t){var i;(i=Dd.get(t))==null||i.selectFromAnchorToCursor()}}class gR extends yi{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:F("cancelSelectionAnchor","Cancel Selection Anchor"),alias:"Cancel Selection Anchor",precondition:O1,kbOpts:{kbExpr:le.editorTextFocus,primary:9,weight:100}})}async run(e,t){var i;(i=Dd.get(t))==null||i.cancelSelectionAnchor()}}On(Dd.ID,Dd,4);Qt(hR);Qt(fR);Qt(pR);Qt(gR);const vR=Ui("editorOverviewRuler.bracketMatchForeground","#A0A0A0",F("overviewRulerBracketMatchForeground","Overview ruler marker color for matching brackets."));class xR extends yi{constructor(){super({id:"editor.action.jumpToBracket",label:F("smartSelect.jumpBracket","Go to Bracket"),alias:"Go to Bracket",precondition:void 0,kbOpts:{kbExpr:le.editorTextFocus,primary:3165,weight:100}})}run(e,t){var i;(i=fh.get(t))==null||i.jumpToBracket()}}class mR extends yi{constructor(){super({id:"editor.action.selectToBracket",label:F("smartSelect.selectToBracket","Select to Bracket"),alias:"Select to Bracket",precondition:void 0,metadata:{description:Yi("smartSelect.selectToBracketDescription","Select the text inside and including the brackets or curly braces"),args:[{name:"args",schema:{type:"object",properties:{selectBrackets:{type:"boolean",default:!0}}}}]}})}run(e,t,i){var s;let n=!0;i&&i.selectBrackets===!1&&(n=!1),(s=fh.get(t))==null||s.selectToBracket(n)}}class _R extends yi{constructor(){super({id:"editor.action.removeBrackets",label:F("smartSelect.removeBrackets","Remove Brackets"),alias:"Remove Brackets",precondition:void 0,kbOpts:{kbExpr:le.editorTextFocus,primary:2561,weight:100}})}run(e,t){var i;(i=fh.get(t))==null||i.removeBrackets(this.id)}}class bR{constructor(e,t,i){this.position=e,this.brackets=t,this.options=i}}const jc=class jc extends Pi{static get(e){return e.getContribution(jc.ID)}constructor(e){super(),this._editor=e,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=this._editor.createDecorationsCollection(),this._updateBracketsSoon=this._register(new go(()=>this._updateBrackets(),50)),this._matchBrackets=this._editor.getOption(72),this._updateBracketsSoon.schedule(),this._register(e.onDidChangeCursorPosition(t=>{this._matchBrackets!=="never"&&this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelContent(t=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModel(t=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelLanguageConfiguration(t=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeConfiguration(t=>{t.hasChanged(72)&&(this._matchBrackets=this._editor.getOption(72),this._decorations.clear(),this._lastBracketsData=[],this._lastVersionId=0,this._updateBracketsSoon.schedule())})),this._register(e.onDidBlurEditorWidget(()=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidFocusEditorWidget(()=>{this._updateBracketsSoon.schedule()}))}jumpToBracket(){if(!this._editor.hasModel())return;const e=this._editor.getModel(),t=this._editor.getSelections().map(i=>{const n=i.getStartPosition(),s=e.bracketPairs.matchBracket(n);let a=null;if(s)s[0].containsPosition(n)&&!s[1].containsPosition(n)?a=s[1].getStartPosition():s[1].containsPosition(n)&&(a=s[0].getStartPosition());else{const l=e.bracketPairs.findEnclosingBrackets(n);if(l)a=l[1].getStartPosition();else{const d=e.bracketPairs.findNextBracket(n);d&&d.range&&(a=d.range.getStartPosition())}}return a?new pn(a.lineNumber,a.column,a.lineNumber,a.column):new pn(n.lineNumber,n.column,n.lineNumber,n.column)});this._editor.setSelections(t),this._editor.revealRange(t[0])}selectToBracket(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),i=[];this._editor.getSelections().forEach(n=>{const s=n.getStartPosition();let a=t.bracketPairs.matchBracket(s);if(!a&&(a=t.bracketPairs.findEnclosingBrackets(s),!a)){const u=t.bracketPairs.findNextBracket(s);u&&u.range&&(a=t.bracketPairs.matchBracket(u.range.getStartPosition()))}let l=null,d=null;if(a){a.sort(Ge.compareRangesUsingStarts);const[u,g]=a;if(l=e?u.getStartPosition():u.getEndPosition(),d=e?g.getEndPosition():g.getStartPosition(),g.containsPosition(s)){const x=l;l=d,d=x}}l&&d&&i.push(new pn(l.lineNumber,l.column,d.lineNumber,d.column))}),i.length>0&&(this._editor.setSelections(i),this._editor.revealRange(i[0]))}removeBrackets(e){if(!this._editor.hasModel())return;const t=this._editor.getModel();this._editor.getSelections().forEach(i=>{const n=i.getPosition();let s=t.bracketPairs.matchBracket(n);s||(s=t.bracketPairs.findEnclosingBrackets(n)),s&&(this._editor.pushUndoStop(),this._editor.executeEdits(e,[{range:s[0],text:""},{range:s[1],text:""}]),this._editor.pushUndoStop())})}_updateBrackets(){if(this._matchBrackets==="never")return;this._recomputeBrackets();const e=[];let t=0;for(const i of this._lastBracketsData){const n=i.brackets;n&&(e[t++]={range:n[0],options:i.options},e[t++]={range:n[1],options:i.options})}this._decorations.set(e)}_recomputeBrackets(){if(!this._editor.hasModel()||!this._editor.hasWidgetFocus()){this._lastBracketsData=[],this._lastVersionId=0;return}const e=this._editor.getSelections();if(e.length>100){this._lastBracketsData=[],this._lastVersionId=0;return}const t=this._editor.getModel(),i=t.getVersionId();let n=[];this._lastVersionId===i&&(n=this._lastBracketsData);const s=[];let a=0;for(let x=0,m=e.length;x<m;x++){const C=e[x];C.isEmpty()&&(s[a++]=C.getStartPosition())}s.length>1&&s.sort(Xi.compare);const l=[];let d=0,u=0;const g=n.length;for(let x=0,m=s.length;x<m;x++){const C=s[x];for(;u<g&&n[u].position.isBefore(C);)u++;if(u<g&&n[u].position.equals(C))l[d++]=n[u];else{let _=t.bracketPairs.matchBracket(C,20),E=jc._DECORATION_OPTIONS_WITH_OVERVIEW_RULER;!_&&this._matchBrackets==="always"&&(_=t.bracketPairs.findEnclosingBrackets(C,20),E=jc._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER),l[d++]=new bR(C,_,E)}}this._lastBracketsData=l,this._lastVersionId=i}};jc.ID="editor.contrib.bracketMatchingController",jc._DECORATION_OPTIONS_WITH_OVERVIEW_RULER=qn.register({description:"bracket-match-overview",stickiness:1,className:"bracket-match",overviewRuler:{color:ho(vR),position:Bl.Center}}),jc._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER=qn.register({description:"bracket-match-no-overview",stickiness:1,className:"bracket-match"});let fh=jc;On(fh.ID,fh,1);Qt(mR);Qt(xR);Qt(_R);Ea.appendMenuItem(Hi.MenubarGoMenu,{group:"5_infile_nav",command:{id:"editor.action.jumpToBracket",title:F({key:"miGoToBracket",comment:["&& denotes a mnemonic"]},"Go to &&Bracket")},order:2});class CR{constructor(e,t){this._selection=e,this._isMovingLeft=t}getEditOperations(e,t){if(this._selection.startLineNumber!==this._selection.endLineNumber||this._selection.isEmpty())return;const i=this._selection.startLineNumber,n=this._selection.startColumn,s=this._selection.endColumn;if(!(this._isMovingLeft&&n===1)&&!(!this._isMovingLeft&&s===e.getLineMaxColumn(i)))if(this._isMovingLeft){const a=new Ge(i,n-1,i,n),l=e.getValueInRange(a);t.addEditOperation(a,null),t.addEditOperation(new Ge(i,s,i,s),l)}else{const a=new Ge(i,s,i,s+1),l=e.getValueInRange(a);t.addEditOperation(a,null),t.addEditOperation(new Ge(i,n,i,n),l)}}computeCursorState(e,t){return this._isMovingLeft?new pn(this._selection.startLineNumber,this._selection.startColumn-1,this._selection.endLineNumber,this._selection.endColumn-1):new pn(this._selection.startLineNumber,this._selection.startColumn+1,this._selection.endLineNumber,this._selection.endColumn+1)}}class W3 extends yi{constructor(e,t){super(t),this.left=e}run(e,t){if(!t.hasModel())return;const i=[],n=t.getSelections();for(const s of n)i.push(new CR(s,this.left));t.pushUndoStop(),t.executeCommands(this.id,i),t.pushUndoStop()}}class yR extends W3{constructor(){super(!0,{id:"editor.action.moveCarretLeftAction",label:F("caret.moveLeft","Move Selected Text Left"),alias:"Move Selected Text Left",precondition:le.writable})}}class wR extends W3{constructor(){super(!1,{id:"editor.action.moveCarretRightAction",label:F("caret.moveRight","Move Selected Text Right"),alias:"Move Selected Text Right",precondition:le.writable})}}Qt(yR);Qt(wR);class ER extends yi{constructor(){super({id:"editor.action.transposeLetters",label:F("transposeLetters.label","Transpose Letters"),alias:"Transpose Letters",precondition:le.writable,kbOpts:{kbExpr:le.textInputFocus,primary:0,mac:{primary:306},weight:100}})}run(e,t){if(!t.hasModel())return;const i=t.getModel(),n=[],s=t.getSelections();for(const a of s){if(!a.isEmpty())continue;const l=a.startLineNumber,d=a.startColumn,u=i.getLineMaxColumn(l);if(l===1&&(d===1||d===2&&u===2))continue;const g=d===u?a.getPosition():wb.rightPosition(i,a.getPosition().lineNumber,a.getPosition().column),x=wb.leftPosition(i,g),m=wb.leftPosition(i,x),C=i.getValueInRange(Ge.fromPositions(m,x)),_=i.getValueInRange(Ge.fromPositions(x,g)),E=Ge.fromPositions(m,g);n.push(new K0(E,_+C))}n.length>0&&(t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop())}}Qt(ER);const H1=(function(){if(typeof crypto=="object"&&typeof crypto.randomUUID=="function")return crypto.randomUUID.bind(crypto);let r;typeof crypto=="object"&&typeof crypto.getRandomValues=="function"?r=crypto.getRandomValues.bind(crypto):r=function(i){for(let n=0;n<i.length;n++)i[n]=Math.floor(Math.random()*256);return i};const e=new Uint8Array(16),t=[];for(let i=0;i<256;i++)t.push(i.toString(16).padStart(2,"0"));return function(){r(e),e[6]=e[6]&15|64,e[8]=e[8]&63|128;let n=0,s="";return s+=t[e[n++]],s+=t[e[n++]],s+=t[e[n++]],s+=t[e[n++]],s+="-",s+=t[e[n++]],s+=t[e[n++]],s+="-",s+=t[e[n++]],s+=t[e[n++]],s+="-",s+=t[e[n++]],s+=t[e[n++]],s+="-",s+=t[e[n++]],s+=t[e[n++]],s+=t[e[n++]],s+=t[e[n++]],s+=t[e[n++]],s+=t[e[n++]],s}})();function p9(r){return{asString:async()=>r,asFile:()=>{},value:typeof r=="string"?r:void 0}}function SR(r,e,t){const i={id:H1(),name:r,uri:e,data:t};return{asString:async()=>"",asFile:()=>i,value:void 0}}class j3{constructor(){this._entries=new Map}get size(){let e=0;for(const t of this._entries)e++;return e}has(e){return this._entries.has(this.toKey(e))}matches(e){const t=[...this._entries.keys()];return rc.some(this,([i,n])=>n.asFile())&&t.push("files"),$3(hm(e),t)}get(e){var t;return(t=this._entries.get(this.toKey(e)))==null?void 0:t[0]}append(e,t){const i=this._entries.get(e);i?i.push(t):this._entries.set(this.toKey(e),[t])}replace(e,t){this._entries.set(this.toKey(e),[t])}delete(e){this._entries.delete(this.toKey(e))}*[Symbol.iterator](){for(const[e,t]of this._entries)for(const i of t)yield[e,i]}toKey(e){return hm(e)}}function hm(r){return r.toLowerCase()}function V3(r,e){return $3(hm(r),e.map(hm))}function $3(r,e){if(r==="*/*")return e.length>0;if(e.includes(r))return!0;const t=r.match(/^([a-z]+)\/([a-z]+|\*)$/i);if(!t)return!1;const[i,n,s]=t;return s==="*"?e.some(a=>a.startsWith(n+"/")):!1}const z1=Object.freeze({create:r=>n6(r.map(e=>e.toString())).join(`\r
|
|
13
|
+
*-----------------------------------------------------------------------------*/var GM=Object.defineProperty,KM=Object.getOwnPropertyDescriptor,ZM=Object.getOwnPropertyNames,YM=Object.prototype.hasOwnProperty,XM=(r,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of ZM(e))!YM.call(r,n)&&n!==t&&GM(r,n,{get:()=>e[n],enumerable:!(i=KM(e,n))||i.enumerable});return r},QM=(r,e,t)=>(XM(r,e,"default"),t),JM="5.4.5",Ep={};QM(Ep,t6);var B3=(r=>(r[r.None=0]="None",r[r.CommonJS=1]="CommonJS",r[r.AMD=2]="AMD",r[r.UMD=3]="UMD",r[r.System=4]="System",r[r.ES2015=5]="ES2015",r[r.ESNext=99]="ESNext",r))(B3||{}),F3=(r=>(r[r.None=0]="None",r[r.Preserve=1]="Preserve",r[r.React=2]="React",r[r.ReactNative=3]="ReactNative",r[r.ReactJSX=4]="ReactJSX",r[r.ReactJSXDev=5]="ReactJSXDev",r))(F3||{}),L3=(r=>(r[r.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",r[r.LineFeed=1]="LineFeed",r))(L3||{}),I3=(r=>(r[r.ES3=0]="ES3",r[r.ES5=1]="ES5",r[r.ES2015=2]="ES2015",r[r.ES2016=3]="ES2016",r[r.ES2017=4]="ES2017",r[r.ES2018=5]="ES2018",r[r.ES2019=6]="ES2019",r[r.ES2020=7]="ES2020",r[r.ESNext=99]="ESNext",r[r.JSON=100]="JSON",r[r.Latest=99]="Latest",r))(I3||{}),P3=(r=>(r[r.Classic=1]="Classic",r[r.NodeJs=2]="NodeJs",r))(P3||{}),T3=class{constructor(r,e,t,i,n){this._onDidChange=new Ep.Emitter,this._onDidExtraLibsChange=new Ep.Emitter,this._extraLibs=Object.create(null),this._removedExtraLibs=Object.create(null),this._eagerModelSync=!1,this.setCompilerOptions(r),this.setDiagnosticsOptions(e),this.setWorkerOptions(t),this.setInlayHintsOptions(i),this.setModeConfiguration(n),this._onDidExtraLibsChangeTimeout=-1}get onDidChange(){return this._onDidChange.event}get onDidExtraLibsChange(){return this._onDidExtraLibsChange.event}get modeConfiguration(){return this._modeConfiguration}get workerOptions(){return this._workerOptions}get inlayHintsOptions(){return this._inlayHintsOptions}getExtraLibs(){return this._extraLibs}addExtraLib(r,e){let t;if(typeof e>"u"?t=`ts:extralib-${Math.random().toString(36).substring(2,15)}`:t=e,this._extraLibs[t]&&this._extraLibs[t].content===r)return{dispose:()=>{}};let i=1;return this._removedExtraLibs[t]&&(i=this._removedExtraLibs[t]+1),this._extraLibs[t]&&(i=this._extraLibs[t].version+1),this._extraLibs[t]={content:r,version:i},this._fireOnDidExtraLibsChangeSoon(),{dispose:()=>{let n=this._extraLibs[t];n&&n.version===i&&(delete this._extraLibs[t],this._removedExtraLibs[t]=i,this._fireOnDidExtraLibsChangeSoon())}}}setExtraLibs(r){for(const e in this._extraLibs)this._removedExtraLibs[e]=this._extraLibs[e].version;if(this._extraLibs=Object.create(null),r&&r.length>0)for(const e of r){const t=e.filePath||`ts:extralib-${Math.random().toString(36).substring(2,15)}`,i=e.content;let n=1;this._removedExtraLibs[t]&&(n=this._removedExtraLibs[t]+1),this._extraLibs[t]={content:i,version:n}}this._fireOnDidExtraLibsChangeSoon()}_fireOnDidExtraLibsChangeSoon(){this._onDidExtraLibsChangeTimeout===-1&&(this._onDidExtraLibsChangeTimeout=window.setTimeout(()=>{this._onDidExtraLibsChangeTimeout=-1,this._onDidExtraLibsChange.fire(void 0)},0))}getCompilerOptions(){return this._compilerOptions}setCompilerOptions(r){this._compilerOptions=r||Object.create(null),this._onDidChange.fire(void 0)}getDiagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(r){this._diagnosticsOptions=r||Object.create(null),this._onDidChange.fire(void 0)}setWorkerOptions(r){this._workerOptions=r||Object.create(null),this._onDidChange.fire(void 0)}setInlayHintsOptions(r){this._inlayHintsOptions=r||Object.create(null),this._onDidChange.fire(void 0)}setMaximumWorkerIdleTime(r){}setEagerModelSync(r){this._eagerModelSync=r}getEagerModelSync(){return this._eagerModelSync}setModeConfiguration(r){this._modeConfiguration=r||Object.create(null),this._onDidChange.fire(void 0)}},eR=JM,M3={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,diagnostics:!0,documentRangeFormattingEdits:!0,signatureHelp:!0,onTypeFormattingEdits:!0,codeActions:!0,inlayHints:!0},R3=new T3({allowNonTsExtensions:!0,target:99},{noSemanticValidation:!1,noSyntaxValidation:!1,onlyVisible:!1},{},{},M3),N3=new T3({allowNonTsExtensions:!0,allowJs:!0,target:99},{noSemanticValidation:!0,noSyntaxValidation:!1,onlyVisible:!1},{},{},M3),tR=()=>N1().then(r=>r.getTypeScriptWorker()),iR=()=>N1().then(r=>r.getJavaScriptWorker());Ep.languages.typescript={ModuleKind:B3,JsxEmit:F3,NewLineKind:L3,ScriptTarget:I3,ModuleResolutionKind:P3,typescriptVersion:eR,typescriptDefaults:R3,javascriptDefaults:N3,getTypeScriptWorker:tR,getJavaScriptWorker:iR};function N1(){return e6(()=>import("./tsMode-Daa0DLzL.js"),__vite__mapDeps([3,1,2]))}Ep.languages.onLanguage("typescript",()=>N1().then(r=>r.setupTypeScript(R3)));Ep.languages.onLanguage("javascript",()=>N1().then(r=>r.setupJavaScript(N3)));class nR extends fr{constructor(){super({id:"diffEditor.toggleCollapseUnchangedRegions",title:Yi("toggleCollapseUnchangedRegions","Toggle Collapse Unchanged Regions"),icon:mn.map,toggled:si.has("config.diffEditor.hideUnchangedRegions.enabled"),precondition:si.has("isInDiffEditor"),menu:{when:si.has("isInDiffEditor"),id:Hi.EditorTitle,order:22,group:"navigation"}})}run(e,...t){const i=e.get(Hs),n=!i.getValue("diffEditor.hideUnchangedRegions.enabled");i.updateValue("diffEditor.hideUnchangedRegions.enabled",n)}}class O3 extends fr{constructor(){super({id:"diffEditor.toggleShowMovedCodeBlocks",title:Yi("toggleShowMovedCodeBlocks","Toggle Show Moved Code Blocks"),precondition:si.has("isInDiffEditor")})}run(e,...t){const i=e.get(Hs),n=!i.getValue("diffEditor.experimental.showMoves");i.updateValue("diffEditor.experimental.showMoves",n)}}class H3 extends fr{constructor(){super({id:"diffEditor.toggleUseInlineViewWhenSpaceIsLimited",title:Yi("toggleUseInlineViewWhenSpaceIsLimited","Toggle Use Inline View When Space Is Limited"),precondition:si.has("isInDiffEditor")})}run(e,...t){const i=e.get(Hs),n=!i.getValue("diffEditor.useInlineViewWhenSpaceIsLimited");i.updateValue("diffEditor.useInlineViewWhenSpaceIsLimited",n)}}const pv=Yi("diffEditor","Diff Editor");class sR extends Ya{constructor(){super({id:"diffEditor.switchSide",title:Yi("switchSide","Switch Side"),icon:mn.arrowSwap,precondition:si.has("isInDiffEditor"),f1:!0,category:pv})}runEditorCommand(e,t,i){const n=Gp(e);if(n instanceof G0){if(i&&i.dryRun)return{destinationSelection:n.mapToOtherSide().destinationSelection};n.switchSide()}}}class oR extends Ya{constructor(){super({id:"diffEditor.exitCompareMove",title:Yi("exitCompareMove","Exit Compare Move"),icon:mn.close,precondition:le.comparingMovedCode,f1:!1,category:pv,keybinding:{weight:1e4,primary:9}})}runEditorCommand(e,t,...i){const n=Gp(e);n instanceof G0&&n.exitCompareMove()}}class rR extends Ya{constructor(){super({id:"diffEditor.collapseAllUnchangedRegions",title:Yi("collapseAllUnchangedRegions","Collapse All Unchanged Regions"),icon:mn.fold,precondition:si.has("isInDiffEditor"),f1:!0,category:pv})}runEditorCommand(e,t,...i){const n=Gp(e);n instanceof G0&&n.collapseAllUnchangedRegions()}}class aR extends Ya{constructor(){super({id:"diffEditor.showAllUnchangedRegions",title:Yi("showAllUnchangedRegions","Show All Unchanged Regions"),icon:mn.unfold,precondition:si.has("isInDiffEditor"),f1:!0,category:pv})}runEditorCommand(e,t,...i){const n=Gp(e);n instanceof G0&&n.showAllUnchangedRegions()}}class Ly extends fr{constructor(){super({id:"diffEditor.revert",title:Yi("revert","Revert"),f1:!1,category:pv})}run(e,t){const i=lR(e,t.originalUri,t.modifiedUri);i instanceof G0&&i.revertRangeMappings(t.mapping.innerChanges??[])}}const z3=Yi("accessibleDiffViewer","Accessible Diff Viewer"),y_=class y_ extends fr{constructor(){super({id:y_.id,title:Yi("editor.action.accessibleDiffViewer.next","Go to Next Difference"),category:z3,precondition:si.has("isInDiffEditor"),keybinding:{primary:65,weight:100},f1:!0})}run(e){const t=Gp(e);t==null||t.accessibleDiffViewerNext()}};y_.id="editor.action.accessibleDiffViewer.next";let h0=y_;const w_=class w_ extends fr{constructor(){super({id:w_.id,title:Yi("editor.action.accessibleDiffViewer.prev","Go to Previous Difference"),category:z3,precondition:si.has("isInDiffEditor"),keybinding:{primary:1089,weight:100},f1:!0})}run(e){const t=Gp(e);t==null||t.accessibleDiffViewerPrev()}};w_.id="editor.action.accessibleDiffViewer.prev";let um=w_;function lR(r,e,t){return r.get(ao).listDiffEditors().find(s=>{var d,u;const a=s.getModifiedEditor(),l=s.getOriginalEditor();return a&&((d=a.getModel())==null?void 0:d.uri.toString())===t.toString()&&l&&((u=l.getModel())==null?void 0:u.uri.toString())===e.toString()})||null}function Gp(r){const t=r.get(ao).listDiffEditors(),i=i6();if(i)for(const n of t){const s=n.getContainerDomNode();if(cR(s,i))return n}return null}function cR(r,e){let t=e;for(;t;){if(t===r)return!0;t=t.parentElement}return!1}gs(nR);gs(O3);gs(H3);Ea.appendMenuItem(Hi.EditorTitle,{command:{id:new H3().desc.id,title:F("useInlineViewWhenSpaceIsLimited","Use Inline View When Space Is Limited"),toggled:si.has("config.diffEditor.useInlineViewWhenSpaceIsLimited"),precondition:si.has("isInDiffEditor")},order:11,group:"1_diff",when:si.and(le.diffEditorRenderSideBySideInlineBreakpointReached,si.has("isInDiffEditor"))});Ea.appendMenuItem(Hi.EditorTitle,{command:{id:new O3().desc.id,title:F("showMoves","Show Moved Code Blocks"),icon:mn.move,toggled:_F.create("config.diffEditor.experimental.showMoves",!0),precondition:si.has("isInDiffEditor")},order:10,group:"1_diff",when:si.has("isInDiffEditor")});gs(Ly);for(const r of[{icon:mn.arrowRight,key:le.diffEditorInlineMode.toNegated()},{icon:mn.discard,key:le.diffEditorInlineMode}])Ea.appendMenuItem(Hi.DiffEditorHunkToolbar,{command:{id:new Ly().desc.id,title:F("revertHunk","Revert Block"),icon:r.icon},when:si.and(le.diffEditorModifiedWritable,r.key),order:5,group:"primary"}),Ea.appendMenuItem(Hi.DiffEditorSelectionToolbar,{command:{id:new Ly().desc.id,title:F("revertSelection","Revert Selection"),icon:r.icon},when:si.and(le.diffEditorModifiedWritable,r.key),order:5,group:"primary"});gs(sR);gs(oR);gs(rR);gs(aR);Ea.appendMenuItem(Hi.EditorTitle,{command:{id:h0.id,title:F("Open Accessible Diff Viewer","Open Accessible Diff Viewer"),precondition:si.has("isInDiffEditor")},order:10,group:"2_diff",when:si.and(le.accessibleDiffViewerVisible.negate(),si.has("isInDiffEditor"))});Ts.registerCommandAlias("editor.action.diffReview.next",h0.id);gs(h0);Ts.registerCommandAlias("editor.action.diffReview.prev",um.id);gs(um);var dR=function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var l=r.length-1;l>=0;l--)(a=r[l])&&(s=(n<3?a(s):n>3?a(e,t,s):a(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},uR=function(r,e){return function(t,i){e(t,i,r)}},Iy;const O1=new Xn("selectionAnchorSet",!1);var Cu;let Dd=(Cu=class{static get(e){return e.getContribution(Iy.ID)}constructor(e,t){this.editor=e,this.selectionAnchorSetContextKey=O1.bindTo(t),this.modelChangeListener=e.onDidChangeModel(()=>this.selectionAnchorSetContextKey.reset())}setSelectionAnchor(){if(this.editor.hasModel()){const e=this.editor.getPosition();this.editor.changeDecorations(t=>{this.decorationId&&t.removeDecoration(this.decorationId),this.decorationId=t.addDecoration(pn.fromPositions(e,e),{description:"selection-anchor",stickiness:1,hoverMessage:new qo().appendText(F("selectionAnchor","Selection Anchor")),className:"selection-anchor"})}),this.selectionAnchorSetContextKey.set(!!this.decorationId),Sa(F("anchorSet","Anchor set at {0}:{1}",e.lineNumber,e.column))}}goToSelectionAnchor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);e&&this.editor.setPosition(e.getStartPosition())}}selectFromAnchorToCursor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);if(e){const t=this.editor.getPosition();this.editor.setSelection(pn.fromPositions(e.getStartPosition(),t)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){if(this.decorationId){const e=this.decorationId;this.editor.changeDecorations(t=>{t.removeDecoration(e),this.decorationId=void 0}),this.selectionAnchorSetContextKey.set(!1)}}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}},Iy=Cu,Cu.ID="editor.contrib.selectionAnchorController",Cu);Dd=Iy=dR([uR(1,ns)],Dd);class hR extends yi{constructor(){super({id:"editor.action.setSelectionAnchor",label:F("setSelectionAnchor","Set Selection Anchor"),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:le.editorTextFocus,primary:co(2089,2080),weight:100}})}async run(e,t){var i;(i=Dd.get(t))==null||i.setSelectionAnchor()}}class fR extends yi{constructor(){super({id:"editor.action.goToSelectionAnchor",label:F("goToSelectionAnchor","Go to Selection Anchor"),alias:"Go to Selection Anchor",precondition:O1})}async run(e,t){var i;(i=Dd.get(t))==null||i.goToSelectionAnchor()}}class pR extends yi{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:F("selectFromAnchorToCursor","Select from Anchor to Cursor"),alias:"Select from Anchor to Cursor",precondition:O1,kbOpts:{kbExpr:le.editorTextFocus,primary:co(2089,2089),weight:100}})}async run(e,t){var i;(i=Dd.get(t))==null||i.selectFromAnchorToCursor()}}class gR extends yi{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:F("cancelSelectionAnchor","Cancel Selection Anchor"),alias:"Cancel Selection Anchor",precondition:O1,kbOpts:{kbExpr:le.editorTextFocus,primary:9,weight:100}})}async run(e,t){var i;(i=Dd.get(t))==null||i.cancelSelectionAnchor()}}On(Dd.ID,Dd,4);Qt(hR);Qt(fR);Qt(pR);Qt(gR);const vR=Ui("editorOverviewRuler.bracketMatchForeground","#A0A0A0",F("overviewRulerBracketMatchForeground","Overview ruler marker color for matching brackets."));class xR extends yi{constructor(){super({id:"editor.action.jumpToBracket",label:F("smartSelect.jumpBracket","Go to Bracket"),alias:"Go to Bracket",precondition:void 0,kbOpts:{kbExpr:le.editorTextFocus,primary:3165,weight:100}})}run(e,t){var i;(i=fh.get(t))==null||i.jumpToBracket()}}class mR extends yi{constructor(){super({id:"editor.action.selectToBracket",label:F("smartSelect.selectToBracket","Select to Bracket"),alias:"Select to Bracket",precondition:void 0,metadata:{description:Yi("smartSelect.selectToBracketDescription","Select the text inside and including the brackets or curly braces"),args:[{name:"args",schema:{type:"object",properties:{selectBrackets:{type:"boolean",default:!0}}}}]}})}run(e,t,i){var s;let n=!0;i&&i.selectBrackets===!1&&(n=!1),(s=fh.get(t))==null||s.selectToBracket(n)}}class _R extends yi{constructor(){super({id:"editor.action.removeBrackets",label:F("smartSelect.removeBrackets","Remove Brackets"),alias:"Remove Brackets",precondition:void 0,kbOpts:{kbExpr:le.editorTextFocus,primary:2561,weight:100}})}run(e,t){var i;(i=fh.get(t))==null||i.removeBrackets(this.id)}}class bR{constructor(e,t,i){this.position=e,this.brackets=t,this.options=i}}const jc=class jc extends Pi{static get(e){return e.getContribution(jc.ID)}constructor(e){super(),this._editor=e,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=this._editor.createDecorationsCollection(),this._updateBracketsSoon=this._register(new go(()=>this._updateBrackets(),50)),this._matchBrackets=this._editor.getOption(72),this._updateBracketsSoon.schedule(),this._register(e.onDidChangeCursorPosition(t=>{this._matchBrackets!=="never"&&this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelContent(t=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModel(t=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelLanguageConfiguration(t=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeConfiguration(t=>{t.hasChanged(72)&&(this._matchBrackets=this._editor.getOption(72),this._decorations.clear(),this._lastBracketsData=[],this._lastVersionId=0,this._updateBracketsSoon.schedule())})),this._register(e.onDidBlurEditorWidget(()=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidFocusEditorWidget(()=>{this._updateBracketsSoon.schedule()}))}jumpToBracket(){if(!this._editor.hasModel())return;const e=this._editor.getModel(),t=this._editor.getSelections().map(i=>{const n=i.getStartPosition(),s=e.bracketPairs.matchBracket(n);let a=null;if(s)s[0].containsPosition(n)&&!s[1].containsPosition(n)?a=s[1].getStartPosition():s[1].containsPosition(n)&&(a=s[0].getStartPosition());else{const l=e.bracketPairs.findEnclosingBrackets(n);if(l)a=l[1].getStartPosition();else{const d=e.bracketPairs.findNextBracket(n);d&&d.range&&(a=d.range.getStartPosition())}}return a?new pn(a.lineNumber,a.column,a.lineNumber,a.column):new pn(n.lineNumber,n.column,n.lineNumber,n.column)});this._editor.setSelections(t),this._editor.revealRange(t[0])}selectToBracket(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),i=[];this._editor.getSelections().forEach(n=>{const s=n.getStartPosition();let a=t.bracketPairs.matchBracket(s);if(!a&&(a=t.bracketPairs.findEnclosingBrackets(s),!a)){const u=t.bracketPairs.findNextBracket(s);u&&u.range&&(a=t.bracketPairs.matchBracket(u.range.getStartPosition()))}let l=null,d=null;if(a){a.sort(Ge.compareRangesUsingStarts);const[u,g]=a;if(l=e?u.getStartPosition():u.getEndPosition(),d=e?g.getEndPosition():g.getStartPosition(),g.containsPosition(s)){const x=l;l=d,d=x}}l&&d&&i.push(new pn(l.lineNumber,l.column,d.lineNumber,d.column))}),i.length>0&&(this._editor.setSelections(i),this._editor.revealRange(i[0]))}removeBrackets(e){if(!this._editor.hasModel())return;const t=this._editor.getModel();this._editor.getSelections().forEach(i=>{const n=i.getPosition();let s=t.bracketPairs.matchBracket(n);s||(s=t.bracketPairs.findEnclosingBrackets(n)),s&&(this._editor.pushUndoStop(),this._editor.executeEdits(e,[{range:s[0],text:""},{range:s[1],text:""}]),this._editor.pushUndoStop())})}_updateBrackets(){if(this._matchBrackets==="never")return;this._recomputeBrackets();const e=[];let t=0;for(const i of this._lastBracketsData){const n=i.brackets;n&&(e[t++]={range:n[0],options:i.options},e[t++]={range:n[1],options:i.options})}this._decorations.set(e)}_recomputeBrackets(){if(!this._editor.hasModel()||!this._editor.hasWidgetFocus()){this._lastBracketsData=[],this._lastVersionId=0;return}const e=this._editor.getSelections();if(e.length>100){this._lastBracketsData=[],this._lastVersionId=0;return}const t=this._editor.getModel(),i=t.getVersionId();let n=[];this._lastVersionId===i&&(n=this._lastBracketsData);const s=[];let a=0;for(let x=0,m=e.length;x<m;x++){const C=e[x];C.isEmpty()&&(s[a++]=C.getStartPosition())}s.length>1&&s.sort(Xi.compare);const l=[];let d=0,u=0;const g=n.length;for(let x=0,m=s.length;x<m;x++){const C=s[x];for(;u<g&&n[u].position.isBefore(C);)u++;if(u<g&&n[u].position.equals(C))l[d++]=n[u];else{let _=t.bracketPairs.matchBracket(C,20),E=jc._DECORATION_OPTIONS_WITH_OVERVIEW_RULER;!_&&this._matchBrackets==="always"&&(_=t.bracketPairs.findEnclosingBrackets(C,20),E=jc._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER),l[d++]=new bR(C,_,E)}}this._lastBracketsData=l,this._lastVersionId=i}};jc.ID="editor.contrib.bracketMatchingController",jc._DECORATION_OPTIONS_WITH_OVERVIEW_RULER=qn.register({description:"bracket-match-overview",stickiness:1,className:"bracket-match",overviewRuler:{color:ho(vR),position:Bl.Center}}),jc._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER=qn.register({description:"bracket-match-no-overview",stickiness:1,className:"bracket-match"});let fh=jc;On(fh.ID,fh,1);Qt(mR);Qt(xR);Qt(_R);Ea.appendMenuItem(Hi.MenubarGoMenu,{group:"5_infile_nav",command:{id:"editor.action.jumpToBracket",title:F({key:"miGoToBracket",comment:["&& denotes a mnemonic"]},"Go to &&Bracket")},order:2});class CR{constructor(e,t){this._selection=e,this._isMovingLeft=t}getEditOperations(e,t){if(this._selection.startLineNumber!==this._selection.endLineNumber||this._selection.isEmpty())return;const i=this._selection.startLineNumber,n=this._selection.startColumn,s=this._selection.endColumn;if(!(this._isMovingLeft&&n===1)&&!(!this._isMovingLeft&&s===e.getLineMaxColumn(i)))if(this._isMovingLeft){const a=new Ge(i,n-1,i,n),l=e.getValueInRange(a);t.addEditOperation(a,null),t.addEditOperation(new Ge(i,s,i,s),l)}else{const a=new Ge(i,s,i,s+1),l=e.getValueInRange(a);t.addEditOperation(a,null),t.addEditOperation(new Ge(i,n,i,n),l)}}computeCursorState(e,t){return this._isMovingLeft?new pn(this._selection.startLineNumber,this._selection.startColumn-1,this._selection.endLineNumber,this._selection.endColumn-1):new pn(this._selection.startLineNumber,this._selection.startColumn+1,this._selection.endLineNumber,this._selection.endColumn+1)}}class W3 extends yi{constructor(e,t){super(t),this.left=e}run(e,t){if(!t.hasModel())return;const i=[],n=t.getSelections();for(const s of n)i.push(new CR(s,this.left));t.pushUndoStop(),t.executeCommands(this.id,i),t.pushUndoStop()}}class yR extends W3{constructor(){super(!0,{id:"editor.action.moveCarretLeftAction",label:F("caret.moveLeft","Move Selected Text Left"),alias:"Move Selected Text Left",precondition:le.writable})}}class wR extends W3{constructor(){super(!1,{id:"editor.action.moveCarretRightAction",label:F("caret.moveRight","Move Selected Text Right"),alias:"Move Selected Text Right",precondition:le.writable})}}Qt(yR);Qt(wR);class ER extends yi{constructor(){super({id:"editor.action.transposeLetters",label:F("transposeLetters.label","Transpose Letters"),alias:"Transpose Letters",precondition:le.writable,kbOpts:{kbExpr:le.textInputFocus,primary:0,mac:{primary:306},weight:100}})}run(e,t){if(!t.hasModel())return;const i=t.getModel(),n=[],s=t.getSelections();for(const a of s){if(!a.isEmpty())continue;const l=a.startLineNumber,d=a.startColumn,u=i.getLineMaxColumn(l);if(l===1&&(d===1||d===2&&u===2))continue;const g=d===u?a.getPosition():wb.rightPosition(i,a.getPosition().lineNumber,a.getPosition().column),x=wb.leftPosition(i,g),m=wb.leftPosition(i,x),C=i.getValueInRange(Ge.fromPositions(m,x)),_=i.getValueInRange(Ge.fromPositions(x,g)),E=Ge.fromPositions(m,g);n.push(new K0(E,_+C))}n.length>0&&(t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop())}}Qt(ER);const H1=(function(){if(typeof crypto=="object"&&typeof crypto.randomUUID=="function")return crypto.randomUUID.bind(crypto);let r;typeof crypto=="object"&&typeof crypto.getRandomValues=="function"?r=crypto.getRandomValues.bind(crypto):r=function(i){for(let n=0;n<i.length;n++)i[n]=Math.floor(Math.random()*256);return i};const e=new Uint8Array(16),t=[];for(let i=0;i<256;i++)t.push(i.toString(16).padStart(2,"0"));return function(){r(e),e[6]=e[6]&15|64,e[8]=e[8]&63|128;let n=0,s="";return s+=t[e[n++]],s+=t[e[n++]],s+=t[e[n++]],s+=t[e[n++]],s+="-",s+=t[e[n++]],s+=t[e[n++]],s+="-",s+=t[e[n++]],s+=t[e[n++]],s+="-",s+=t[e[n++]],s+=t[e[n++]],s+="-",s+=t[e[n++]],s+=t[e[n++]],s+=t[e[n++]],s+=t[e[n++]],s+=t[e[n++]],s+=t[e[n++]],s}})();function p9(r){return{asString:async()=>r,asFile:()=>{},value:typeof r=="string"?r:void 0}}function SR(r,e,t){const i={id:H1(),name:r,uri:e,data:t};return{asString:async()=>"",asFile:()=>i,value:void 0}}class j3{constructor(){this._entries=new Map}get size(){let e=0;for(const t of this._entries)e++;return e}has(e){return this._entries.has(this.toKey(e))}matches(e){const t=[...this._entries.keys()];return rc.some(this,([i,n])=>n.asFile())&&t.push("files"),$3(hm(e),t)}get(e){var t;return(t=this._entries.get(this.toKey(e)))==null?void 0:t[0]}append(e,t){const i=this._entries.get(e);i?i.push(t):this._entries.set(this.toKey(e),[t])}replace(e,t){this._entries.set(this.toKey(e),[t])}delete(e){this._entries.delete(this.toKey(e))}*[Symbol.iterator](){for(const[e,t]of this._entries)for(const i of t)yield[e,i]}toKey(e){return hm(e)}}function hm(r){return r.toLowerCase()}function V3(r,e){return $3(hm(r),e.map(hm))}function $3(r,e){if(r==="*/*")return e.length>0;if(e.includes(r))return!0;const t=r.match(/^([a-z]+)\/([a-z]+|\*)$/i);if(!t)return!1;const[i,n,s]=t;return s==="*"?e.some(a=>a.startsWith(n+"/")):!1}const z1=Object.freeze({create:r=>n6(r.map(e=>e.toString())).join(`\r
|
|
14
14
|
`),split:r=>r.split(`\r
|
|
15
15
|
`),parse:r=>z1.split(r).filter(e=>!e.startsWith("#"))}),gl=class gl{constructor(e){this.value=e}equals(e){return this.value===e.value}contains(e){return this.equals(e)||this.value===""||e.value.startsWith(this.value+gl.sep)}intersects(e){return this.contains(e)||e.contains(this)}append(...e){return new gl((this.value?[this.value,...e]:e).join(gl.sep))}};gl.sep=".",gl.None=new gl("@@none@@"),gl.Empty=new gl("");let Ns=gl;const m8={EDITORS:"CodeEditors",FILES:"CodeFiles"};class kR{}const DR={DragAndDropContribution:"workbench.contributions.dragAndDrop"};Xa.add(DR.DragAndDropContribution,new kR);const Zg=class Zg{constructor(){}static getInstance(){return Zg.INSTANCE}hasData(e){return e&&e===this.proto}getData(e){if(this.hasData(e))return this.data}};Zg.INSTANCE=new Zg;let Py=Zg;function q3(r){const e=new j3;for(const t of r.items){const i=t.type;if(t.kind==="string"){const n=new Promise(s=>t.getAsString(s));e.append(i,p9(n))}else if(t.kind==="file"){const n=t.getAsFile();n&&e.append(i,AR(n))}}return e}function AR(r){const e=r.path?xs.parse(r.path):void 0;return SR(r.name,e,async()=>new Uint8Array(await r.arrayBuffer()))}const BR=Object.freeze([m8.EDITORS,m8.FILES,ey.RESOURCES,ey.INTERNAL_URI_LIST]);function U3(r,e=!1){const t=q3(r),i=t.get(ey.INTERNAL_URI_LIST);if(i)t.replace(Ao.uriList,i);else if(e||!t.has(Ao.uriList)){const n=[];for(const s of r.items){const a=s.getAsFile();if(a){const l=a.path;try{l?n.push(xs.file(l).toString()):n.push(xs.parse(a.name,!0).toString())}catch{}}}n.length&&t.replace(Ao.uriList,p9(z1.create(n)))}for(const n of BR)t.delete(n);return t}var g9=function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var l=r.length-1;l>=0;l--)(a=r[l])&&(s=(n<3?a(s):n>3?a(e,t,s):a(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},f0=function(r,e){return function(t,i){e(t,i,r)}};class v9{async provideDocumentPasteEdits(e,t,i,n,s){const a=await this.getEdit(i,s);if(a)return{edits:[{insertText:a.insertText,title:a.title,kind:a.kind,handledMimeType:a.handledMimeType,yieldTo:a.yieldTo}],dispose(){}}}async provideDocumentDropEdits(e,t,i,n){const s=await this.getEdit(i,n);if(s)return{edits:[{insertText:s.insertText,title:s.title,kind:s.kind,handledMimeType:s.handledMimeType,yieldTo:s.yieldTo}],dispose(){}}}}const Yg=class Yg extends v9{constructor(){super(...arguments),this.kind=Yg.kind,this.dropMimeTypes=[Ao.text],this.pasteMimeTypes=[Ao.text]}async getEdit(e,t){const i=e.get(Ao.text);if(!i||e.has(Ao.uriList))return;const n=await i.asString();return{handledMimeType:Ao.text,title:F("text.label","Insert Plain Text"),insertText:n,kind:this.kind}}};Yg.id="text",Yg.kind=new Ns("text.plain");let ph=Yg;class G3 extends v9{constructor(){super(...arguments),this.kind=new Ns("uri.absolute"),this.dropMimeTypes=[Ao.uriList],this.pasteMimeTypes=[Ao.uriList]}async getEdit(e,t){const i=await K3(e);if(!i.length||t.isCancellationRequested)return;let n=0;const s=i.map(({uri:l,originalText:d})=>l.scheme===lr.file?l.fsPath:(n++,d)).join(" ");let a;return n>0?a=i.length>1?F("defaultDropProvider.uriList.uris","Insert Uris"):F("defaultDropProvider.uriList.uri","Insert Uri"):a=i.length>1?F("defaultDropProvider.uriList.paths","Insert Paths"):F("defaultDropProvider.uriList.path","Insert Path"),{handledMimeType:Ao.uriList,insertText:s,title:a,kind:this.kind}}}let fm=class extends v9{constructor(e){super(),this._workspaceContextService=e,this.kind=new Ns("uri.relative"),this.dropMimeTypes=[Ao.uriList],this.pasteMimeTypes=[Ao.uriList]}async getEdit(e,t){const i=await K3(e);if(!i.length||t.isCancellationRequested)return;const n=hc(i.map(({uri:s})=>{const a=this._workspaceContextService.getWorkspaceFolder(s);return a?bF(a.uri,s):void 0}));if(n.length)return{handledMimeType:Ao.uriList,insertText:n.join(" "),title:i.length>1?F("defaultDropProvider.uriList.relativePaths","Insert Relative Paths"):F("defaultDropProvider.uriList.relativePath","Insert Relative Path"),kind:this.kind}}};fm=g9([f0(0,lp)],fm);class FR{constructor(){this.kind=new Ns("html"),this.pasteMimeTypes=["text/html"],this._yieldTo=[{mimeType:Ao.text}]}async provideDocumentPasteEdits(e,t,i,n,s){var d;if(n.triggerKind!==ty.PasteAs&&!((d=n.only)!=null&&d.contains(this.kind)))return;const a=i.get("text/html"),l=await(a==null?void 0:a.asString());if(!(!l||s.isCancellationRequested))return{dispose(){},edits:[{insertText:l,yieldTo:this._yieldTo,title:F("pasteHtmlLabel","Insert HTML"),kind:this.kind}]}}}async function K3(r){const e=r.get(Ao.uriList);if(!e)return[];const t=await e.asString(),i=[];for(const n of z1.parse(t))try{i.push({uri:xs.parse(n),originalText:n})}catch{}return i}let Ty=class extends Pi{constructor(e,t){super(),this._register(e.documentDropEditProvider.register("*",new ph)),this._register(e.documentDropEditProvider.register("*",new G3)),this._register(e.documentDropEditProvider.register("*",new fm(t)))}};Ty=g9([f0(0,Qi),f0(1,lp)],Ty);let My=class extends Pi{constructor(e,t){super(),this._register(e.documentPasteEditProvider.register("*",new ph)),this._register(e.documentPasteEditProvider.register("*",new G3)),this._register(e.documentPasteEditProvider.register("*",new fm(t))),this._register(e.documentPasteEditProvider.register("*",new FR))}};My=g9([f0(0,Qi),f0(1,lp)],My);const oa=class oa{constructor(){this.value="",this.pos=0}static isDigitCharacter(e){return e>=48&&e<=57}static isVariableCharacter(e){return e===95||e>=97&&e<=122||e>=65&&e<=90}text(e){this.value=e,this.pos=0}tokenText(e){return this.value.substr(e.pos,e.len)}next(){if(this.pos>=this.value.length)return{type:14,pos:this.pos,len:0};const e=this.pos;let t=0,i=this.value.charCodeAt(e),n;if(n=oa._table[i],typeof n=="number")return this.pos+=1,{type:n,pos:e,len:1};if(oa.isDigitCharacter(i)){n=8;do t+=1,i=this.value.charCodeAt(e+t);while(oa.isDigitCharacter(i));return this.pos+=t,{type:n,pos:e,len:t}}if(oa.isVariableCharacter(i)){n=9;do i=this.value.charCodeAt(e+ ++t);while(oa.isVariableCharacter(i)||oa.isDigitCharacter(i));return this.pos+=t,{type:n,pos:e,len:t}}n=10;do t+=1,i=this.value.charCodeAt(e+t);while(!isNaN(i)&&typeof oa._table[i]>"u"&&!oa.isDigitCharacter(i)&&!oa.isVariableCharacter(i));return this.pos+=t,{type:n,pos:e,len:t}}};oa._table={36:0,58:1,44:2,123:3,125:4,92:5,47:6,124:7,43:11,45:12,63:13};let Ry=oa;class Kp{constructor(){this._children=[]}appendChild(e){return e instanceof _r&&this._children[this._children.length-1]instanceof _r?this._children[this._children.length-1].value+=e.value:(e.parent=this,this._children.push(e)),this}replace(e,t){const{parent:i}=e,n=i.children.indexOf(e),s=i.children.slice(0);s.splice(n,1,...t),i._children=s,(function a(l,d){for(const u of l)u.parent=d,a(u.children,u)})(t,i)}get children(){return this._children}get rightMostDescendant(){return this._children.length>0?this._children[this._children.length-1].rightMostDescendant:this}get snippet(){let e=this;for(;;){if(!e)return;if(e instanceof gv)return e;e=e.parent}}toString(){return this.children.reduce((e,t)=>e+t.toString(),"")}len(){return 0}}let _r=class Z3 extends Kp{constructor(e){super(),this.value=e}toString(){return this.value}len(){return this.value.length}clone(){return new Z3(this.value)}};class Y3 extends Kp{}class Yr extends Y3{static compareByIndex(e,t){return e.index===t.index?0:e.isFinalTabstop?1:t.isFinalTabstop||e.index<t.index?-1:e.index>t.index?1:0}constructor(e){super(),this.index=e}get isFinalTabstop(){return this.index===0}get choice(){return this._children.length===1&&this._children[0]instanceof Zp?this._children[0]:void 0}clone(){const e=new Yr(this.index);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(t=>t.clone()),e}}class Zp extends Kp{constructor(){super(...arguments),this.options=[]}appendChild(e){return e instanceof _r&&(e.parent=this,this.options.push(e)),this}toString(){return this.options[0].value}len(){return this.options[0].len()}clone(){const e=new Zp;return this.options.forEach(e.appendChild,e),e}}class x9 extends Kp{constructor(){super(...arguments),this.regexp=new RegExp("")}resolve(e){const t=this;let i=!1,n=e.replace(this.regexp,function(){return i=!0,t._replace(Array.prototype.slice.call(arguments,0,-2))});return!i&&this._children.some(s=>s instanceof Na&&!!s.elseValue)&&(n=this._replace([])),n}_replace(e){let t="";for(const i of this._children)if(i instanceof Na){let n=e[i.index]||"";n=i.resolve(n),t+=n}else t+=i.toString();return t}toString(){return""}clone(){const e=new x9;return e.regexp=new RegExp(this.regexp.source,(this.regexp.ignoreCase?"i":"")+(this.regexp.global?"g":"")),e._children=this.children.map(t=>t.clone()),e}}class Na extends Kp{constructor(e,t,i,n){super(),this.index=e,this.shorthandName=t,this.ifValue=i,this.elseValue=n}resolve(e){return this.shorthandName==="upcase"?e?e.toLocaleUpperCase():"":this.shorthandName==="downcase"?e?e.toLocaleLowerCase():"":this.shorthandName==="capitalize"?e?e[0].toLocaleUpperCase()+e.substr(1):"":this.shorthandName==="pascalcase"?e?this._toPascalCase(e):"":this.shorthandName==="camelcase"?e?this._toCamelCase(e):"":e&&typeof this.ifValue=="string"?this.ifValue:!e&&typeof this.elseValue=="string"?this.elseValue:e||""}_toPascalCase(e){const t=e.match(/[a-z0-9]+/gi);return t?t.map(i=>i.charAt(0).toUpperCase()+i.substr(1)).join(""):e}_toCamelCase(e){const t=e.match(/[a-z0-9]+/gi);return t?t.map((i,n)=>n===0?i.charAt(0).toLowerCase()+i.substr(1):i.charAt(0).toUpperCase()+i.substr(1)).join(""):e}clone(){return new Na(this.index,this.shorthandName,this.ifValue,this.elseValue)}}class p0 extends Y3{constructor(e){super(),this.name=e}resolve(e){let t=e.resolve(this);return this.transform&&(t=this.transform.resolve(t||"")),t!==void 0?(this._children=[new _r(t)],!0):!1}clone(){const e=new p0(this.name);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(t=>t.clone()),e}}function _8(r,e){const t=[...r];for(;t.length>0;){const i=t.shift();if(!e(i))break;t.unshift(...i.children)}}class gv extends Kp{get placeholderInfo(){if(!this._placeholders){const e=[];let t;this.walk(function(i){return i instanceof Yr&&(e.push(i),t=!t||t.index<i.index?i:t),!0}),this._placeholders={all:e,last:t}}return this._placeholders}get placeholders(){const{all:e}=this.placeholderInfo;return e}offset(e){let t=0,i=!1;return this.walk(n=>n===e?(i=!0,!1):(t+=n.len(),!0)),i?t:-1}fullLen(e){let t=0;return _8([e],i=>(t+=i.len(),!0)),t}enclosingPlaceholders(e){const t=[];let{parent:i}=e;for(;i;)i instanceof Yr&&t.push(i),i=i.parent;return t}resolveVariables(e){return this.walk(t=>(t instanceof p0&&t.resolve(e)&&(this._placeholders=void 0),!0)),this}appendChild(e){return this._placeholders=void 0,super.appendChild(e)}replace(e,t){return this._placeholders=void 0,super.replace(e,t)}clone(){const e=new gv;return this._children=this.children.map(t=>t.clone()),e}walk(e){_8(this.children,e)}}class gh{constructor(){this._scanner=new Ry,this._token={type:14,pos:0,len:0}}static escape(e){return e.replace(/\$|}|\\/g,"\\$&")}static guessNeedsClipboard(e){return/\${?CLIPBOARD/.test(e)}parse(e,t,i){const n=new gv;return this.parseFragment(e,n),this.ensureFinalTabstop(n,i??!1,t??!1),n}parseFragment(e,t){const i=t.children.length;for(this._scanner.text(e),this._token=this._scanner.next();this._parse(t););const n=new Map,s=[];t.walk(d=>(d instanceof Yr&&(d.isFinalTabstop?n.set(0,void 0):!n.has(d.index)&&d.children.length>0?n.set(d.index,d.children):s.push(d)),!0));const a=(d,u)=>{const g=n.get(d.index);if(!g)return;const x=new Yr(d.index);x.transform=d.transform;for(const m of g){const C=m.clone();x.appendChild(C),C instanceof Yr&&n.has(C.index)&&!u.has(C.index)&&(u.add(C.index),a(C,u),u.delete(C.index))}t.replace(d,[x])},l=new Set;for(const d of s)a(d,l);return t.children.slice(i)}ensureFinalTabstop(e,t,i){(t||i&&e.placeholders.length>0)&&(e.placeholders.find(s=>s.index===0)||e.appendChild(new Yr(0)))}_accept(e,t){if(e===void 0||this._token.type===e){const i=t?this._scanner.tokenText(this._token):!0;return this._token=this._scanner.next(),i}return!1}_backTo(e){return this._scanner.pos=e.pos+e.len,this._token=e,!1}_until(e){const t=this._token;for(;this._token.type!==e;){if(this._token.type===14)return!1;if(this._token.type===5){const n=this._scanner.next();if(n.type!==0&&n.type!==4&&n.type!==5)return!1}this._token=this._scanner.next()}const i=this._scanner.value.substring(t.pos,this._token.pos).replace(/\\(\$|}|\\)/g,"$1");return this._token=this._scanner.next(),i}_parse(e){return this._parseEscaped(e)||this._parseTabstopOrVariableName(e)||this._parseComplexPlaceholder(e)||this._parseComplexVariable(e)||this._parseAnything(e)}_parseEscaped(e){let t;return(t=this._accept(5,!0))?(t=this._accept(0,!0)||this._accept(4,!0)||this._accept(5,!0)||t,e.appendChild(new _r(t)),!0):!1}_parseTabstopOrVariableName(e){let t;const i=this._token;return this._accept(0)&&(t=this._accept(9,!0)||this._accept(8,!0))?(e.appendChild(/^\d+$/.test(t)?new Yr(Number(t)):new p0(t)),!0):this._backTo(i)}_parseComplexPlaceholder(e){let t;const i=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(8,!0))))return this._backTo(i);const s=new Yr(Number(t));if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(s),!0;if(!this._parse(s))return e.appendChild(new _r("${"+t+":")),s.children.forEach(e.appendChild,e),!0}else if(s.index>0&&this._accept(7)){const a=new Zp;for(;;){if(this._parseChoiceElement(a)){if(this._accept(2))continue;if(this._accept(7)&&(s.appendChild(a),this._accept(4)))return e.appendChild(s),!0}return this._backTo(i),!1}}else return this._accept(6)?this._parseTransform(s)?(e.appendChild(s),!0):(this._backTo(i),!1):this._accept(4)?(e.appendChild(s),!0):this._backTo(i)}_parseChoiceElement(e){const t=this._token,i=[];for(;!(this._token.type===2||this._token.type===7);){let n;if((n=this._accept(5,!0))?n=this._accept(2,!0)||this._accept(7,!0)||this._accept(5,!0)||n:n=this._accept(void 0,!0),!n)return this._backTo(t),!1;i.push(n)}return i.length===0?(this._backTo(t),!1):(e.appendChild(new _r(i.join(""))),!0)}_parseComplexVariable(e){let t;const i=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(9,!0))))return this._backTo(i);const s=new p0(t);if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(s),!0;if(!this._parse(s))return e.appendChild(new _r("${"+t+":")),s.children.forEach(e.appendChild,e),!0}else return this._accept(6)?this._parseTransform(s)?(e.appendChild(s),!0):(this._backTo(i),!1):this._accept(4)?(e.appendChild(s),!0):this._backTo(i)}_parseTransform(e){const t=new x9;let i="",n="";for(;!this._accept(6);){let s;if(s=this._accept(5,!0)){s=this._accept(6,!0)||s,i+=s;continue}if(this._token.type!==14){i+=this._accept(void 0,!0);continue}return!1}for(;!this._accept(6);){let s;if(s=this._accept(5,!0)){s=this._accept(5,!0)||this._accept(6,!0)||s,t.appendChild(new _r(s));continue}if(!(this._parseFormatString(t)||this._parseAnything(t)))return!1}for(;!this._accept(4);){if(this._token.type!==14){n+=this._accept(void 0,!0);continue}return!1}try{t.regexp=new RegExp(i,n)}catch{return!1}return e.transform=t,!0}_parseFormatString(e){const t=this._token;if(!this._accept(0))return!1;let i=!1;this._accept(3)&&(i=!0);const n=this._accept(8,!0);if(n)if(i){if(this._accept(4))return e.appendChild(new Na(Number(n))),!0;if(!this._accept(1))return this._backTo(t),!1}else return e.appendChild(new Na(Number(n))),!0;else return this._backTo(t),!1;if(this._accept(6)){const s=this._accept(9,!0);return!s||!this._accept(4)?(this._backTo(t),!1):(e.appendChild(new Na(Number(n),s)),!0)}else if(this._accept(11)){const s=this._until(4);if(s)return e.appendChild(new Na(Number(n),void 0,s,void 0)),!0}else if(this._accept(12)){const s=this._until(4);if(s)return e.appendChild(new Na(Number(n),void 0,void 0,s)),!0}else if(this._accept(13)){const s=this._until(1);if(s){const a=this._until(4);if(a)return e.appendChild(new Na(Number(n),void 0,s,a)),!0}}else{const s=this._until(4);if(s)return e.appendChild(new Na(Number(n),void 0,void 0,s)),!0}return this._backTo(t),!1}_parseAnything(e){return this._token.type!==14?(e.appendChild(new _r(this._scanner.tokenText(this._token))),this._accept(void 0),!0):!1}}function X3(r,e,t){var i,n;return(typeof t.insertText=="string"?t.insertText==="":t.insertText.snippet==="")?{edits:((i=t.additionalEdit)==null?void 0:i.edits)??[]}:{edits:[...e.map(s=>new CF(r,{range:s,text:typeof t.insertText=="string"?gh.escape(t.insertText)+"$0":t.insertText.snippet,insertAsSnippet:!0})),...((n=t.additionalEdit)==null?void 0:n.edits)??[]]}}function Q3(r){function e(a,l){return"mimeType"in a?a.mimeType===l.handledMimeType:!!l.kind&&a.kind.contains(l.kind)}const t=new Map;for(const a of r)for(const l of a.yieldTo??[])for(const d of r)if(d!==a&&e(l,d)){let u=t.get(a);u||(u=[],t.set(a,u)),u.push(d)}if(!t.size)return Array.from(r);const i=new Set,n=[];function s(a){if(!a.length)return[];const l=a[0];if(n.includes(l))return console.warn("Yield to cycle detected",l),a;if(i.has(l))return s(a.slice(1));let d=[];const u=t.get(l);return u&&(n.push(l),d=s(u),n.pop()),i.add(l),[...d,l,...s(a.slice(1))]}return s(Array.from(r))}var LR=function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var l=r.length-1;l>=0;l--)(a=r[l])&&(s=(n<3?a(s):n>3?a(e,t,s):a(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},IR=function(r,e){return function(t,i){e(t,i,r)}};const PR=qn.register({description:"inline-progress-widget",stickiness:1,showIfCollapsed:!0,after:{content:s6,inlineClassName:"inline-editor-progress-decoration",inlineClassNameAffectsLetterSpacing:!0}}),E_=class E_ extends Pi{constructor(e,t,i,n,s){super(),this.typeId=e,this.editor=t,this.range=i,this.delegate=s,this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this.create(n),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this)}create(e){this.domNode=qi(".inline-progress-widget"),this.domNode.role="button",this.domNode.title=e;const t=qi("span.icon");this.domNode.append(t),t.classList.add(...as.asClassNameArray(mn.loading),"codicon-modifier-spin");const i=()=>{const n=this.editor.getOption(67);this.domNode.style.height=`${n}px`,this.domNode.style.width=`${Math.ceil(.8*n)}px`};i(),this._register(this.editor.onDidChangeConfiguration(n=>{(n.hasChanged(52)||n.hasChanged(67))&&i()})),this._register(is(this.domNode,Vs.CLICK,n=>{this.delegate.cancel()}))}getId(){return E_.baseId+"."+this.typeId}getDomNode(){return this.domNode}getPosition(){return{position:{lineNumber:this.range.startLineNumber,column:this.range.startColumn},preference:[0]}}dispose(){super.dispose(),this.editor.removeContentWidget(this)}};E_.baseId="editor.widget.inlineProgressWidget";let Ny=E_,pm=class extends Pi{constructor(e,t,i){super(),this.id=e,this._editor=t,this._instantiationService=i,this._showDelay=500,this._showPromise=this._register(new zr),this._currentWidget=this._register(new zr),this._operationIdPool=0,this._currentDecorations=t.createDecorationsCollection()}dispose(){super.dispose(),this._currentDecorations.clear()}async showWhile(e,t,i,n,s){const a=this._operationIdPool++;this._currentOperation=a,this.clear(),this._showPromise.value=Jg(()=>{const l=Ge.fromPositions(e);this._currentDecorations.set([{range:l,options:PR}]).length>0&&(this._currentWidget.value=this._instantiationService.createInstance(Ny,this.id,this._editor,l,t,n))},s??this._showDelay);try{return await i}finally{this._currentOperation===a&&(this.clear(),this._currentOperation=void 0)}}clear(){this._showPromise.clear(),this._currentDecorations.clear(),this._currentWidget.clear()}};pm=LR([IR(2,Ln)],pm);var TR=function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var l=r.length-1;l>=0;l--)(a=r[l])&&(s=(n<3?a(s):n>3?a(e,t,s):a(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},b8=function(r,e){return function(t,i){e(t,i,r)}},Fx,rd;let Cr=(rd=class{static get(e){return e.getContribution(Fx.ID)}constructor(e,t,i){this._openerService=i,this._messageWidget=new zr,this._messageListeners=new Li,this._mouseOverMessage=!1,this._editor=e,this._visible=Fx.MESSAGE_VISIBLE.bindTo(t)}dispose(){var e;(e=this._message)==null||e.dispose(),this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}showMessage(e,t){Sa(_x(e)?e.value:e),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),this._message=_x(e)?yF(e,{actionHandler:{callback:n=>{this.closeMessage(),wF(this._openerService,n,_x(e)?e.isTrusted:void 0)},disposables:this._messageListeners}}):void 0,this._messageWidget.value=new C8(this._editor,t,typeof e=="string"?e:this._message.element),this._messageListeners.add(po.debounce(this._editor.onDidBlurEditorText,(n,s)=>s,0)(()=>{this._mouseOverMessage||this._messageWidget.value&&EF(i6(),this._messageWidget.value.getDomNode())||this.closeMessage()})),this._messageListeners.add(this._editor.onDidChangeCursorPosition(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidDispose(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidChangeModel(()=>this.closeMessage())),this._messageListeners.add(is(this._messageWidget.value.getDomNode(),Vs.MOUSE_ENTER,()=>this._mouseOverMessage=!0,!0)),this._messageListeners.add(is(this._messageWidget.value.getDomNode(),Vs.MOUSE_LEAVE,()=>this._mouseOverMessage=!1,!0));let i;this._messageListeners.add(this._editor.onMouseMove(n=>{n.target.position&&(i?i.containsPosition(n.target.position)||this.closeMessage():i=new Ge(t.lineNumber-3,1,n.target.position.lineNumber+3,1))}))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(C8.fadeOut(this._messageWidget.value))}},Fx=rd,rd.ID="editor.contrib.messageController",rd.MESSAGE_VISIBLE=new Xn("messageVisible",!1,F("messageVisible","Whether the editor is currently showing an inline message")),rd);Cr=Fx=TR([b8(1,ns),b8(2,Qa)],Cr);const MR=pr.bindToContribution(Cr.get);nn(new MR({id:"leaveEditorMessage",precondition:Cr.MESSAGE_VISIBLE,handler:r=>r.closeMessage(),kbOpts:{weight:130,primary:9}}));let C8=class{static fadeOut(e){const t=()=>{e.dispose(),clearTimeout(i),e.getDomNode().removeEventListener("animationend",t)},i=setTimeout(t,110);return e.getDomNode().addEventListener("animationend",t),e.getDomNode().classList.add("fadeOut"),{dispose:t}}constructor(e,{lineNumber:t,column:i},n){this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._editor=e,this._editor.revealLinesInCenterIfOutsideViewport(t,t,0),this._position={lineNumber:t,column:i},this._domNode=document.createElement("div"),this._domNode.classList.add("monaco-editor-overlaymessage"),this._domNode.style.marginLeft="-6px";const s=document.createElement("div");s.classList.add("anchor","top"),this._domNode.appendChild(s);const a=document.createElement("div");typeof n=="string"?(a.classList.add("message"),a.textContent=n):(n.classList.add("message"),a.appendChild(n)),this._domNode.appendChild(a);const l=document.createElement("div");l.classList.add("anchor","below"),this._domNode.appendChild(l),this._editor.addContentWidget(this),this._domNode.classList.add("fadeIn")}dispose(){this._editor.removeContentWidget(this)}getId(){return"messageoverlay"}getDomNode(){return this._domNode}getPosition(){return{position:this._position,preference:[1,2],positionAffinity:1}}afterRender(e){this._domNode.classList.toggle("below",e===2)}};On(Cr.ID,Cr,4);function Hb(r,e){return e&&(r.stack||r.stacktrace)?F("stackTrace.format","{0}: {1}",w8(r),y8(r.stack)||y8(r.stacktrace)):w8(r)}function y8(r){return Array.isArray(r)?r.join(`
|
|
16
16
|
`):r}function w8(r){return r.code==="ERR_UNC_HOST_NOT_ALLOWED"?`${r.message}. Please update the 'security.allowedUNCHosts' setting if you want to allow this host.`:typeof r.code=="string"&&typeof r.errno=="number"&&typeof r.syscall=="string"?F("nodeExceptionMessage","A system error occurred ({0})",r.message):r.message||F("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}function gm(r=null,e=!1){if(!r)return F("error.defaultMessage","An unknown error occurred. Please consult the log for more details.");if(Array.isArray(r)){const t=hc(r),i=gm(t[0],e);return t.length>1?F("error.moreErrors","{0} ({1} errors in total)",i,t.length):i}if(o6(r))return r;if(r.detail){const t=r.detail;if(t.error)return Hb(t.error,e);if(t.exception)return Hb(t.exception,e)}return r.stack?Hb(r,e):r.message?r.message:F("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}var J3=function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var l=r.length-1;l>=0;l--)(a=r[l])&&(s=(n<3?a(s):n>3?a(e,t,s):a(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Hf=function(r,e){return function(t,i){e(t,i,r)}},Oy,yu;let Hy=(yu=class extends Pi{constructor(e,t,i,n,s,a,l,d,u,g){super(),this.typeId=e,this.editor=t,this.showCommand=n,this.range=s,this.edits=a,this.onSelectNewEdit=l,this._contextMenuService=d,this._keybindingService=g,this.allowEditorOverflow=!0,this.suppressMouseDown=!0,this.create(),this.visibleContext=i.bindTo(u),this.visibleContext.set(!0),this._register(Rs(()=>this.visibleContext.reset())),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this),this._register(Rs((()=>this.editor.removeContentWidget(this)))),this._register(this.editor.onDidChangeCursorPosition(x=>{s.containsPosition(x.position)||this.dispose()})),this._register(po.runAndSubscribe(g.onDidUpdateKeybindings,()=>{this._updateButtonTitle()}))}_updateButtonTitle(){var t;const e=(t=this._keybindingService.lookupKeybinding(this.showCommand.id))==null?void 0:t.getLabel();this.button.element.title=this.showCommand.label+(e?` (${e})`:"")}create(){this.domNode=qi(".post-edit-widget"),this.button=this._register(new SF(this.domNode,{supportIcons:!0})),this.button.label="$(insert)",this._register(is(this.domNode,Vs.CLICK,()=>this.showSelector()))}getId(){return Oy.baseId+"."+this.typeId}getDomNode(){return this.domNode}getPosition(){return{position:this.range.getEndPosition(),preference:[2]}}showSelector(){this._contextMenuService.showContextMenu({getAnchor:()=>{const e=dr(this.button.element);return{x:e.left+e.width,y:e.top+e.height}},getActions:()=>this.edits.allEdits.map((e,t)=>kF({id:"",label:e.title,checked:t===this.edits.activeEditIndex,run:()=>{if(t!==this.edits.activeEditIndex)return this.onSelectNewEdit(t)}}))})}},Oy=yu,yu.baseId="editor.widget.postEditWidget",yu);Hy=Oy=J3([Hf(7,zp),Hf(8,ns),Hf(9,uo)],Hy);let vm=class extends Pi{constructor(e,t,i,n,s,a,l){super(),this._id=e,this._editor=t,this._visibleContext=i,this._showCommand=n,this._instantiationService=s,this._bulkEditService=a,this._notificationService=l,this._currentWidget=this._register(new zr),this._register(po.any(t.onDidChangeModel,t.onDidChangeModelContent)(()=>this.clear()))}async applyEditAndShowIfNeeded(e,t,i,n,s){const a=this._editor.getModel();if(!a||!e.length)return;const l=t.allEdits.at(t.activeEditIndex);if(!l)return;const d=async S=>{const I=this._editor.getModel();I&&(await I.undo(),this.applyEditAndShowIfNeeded(e,{activeEditIndex:S,allEdits:t.allEdits},i,n,s))},u=(S,I)=>{Id(S)||(this._notificationService.error(I),i&&this.show(e[0],t,d))};let g;try{g=await n(l,s)}catch(S){return u(S,F("resolveError",`Error resolving edit '{0}':
|
|
@@ -292,4 +292,4 @@ ${Je.length===1?"There is an instance":"There are "+Je.length+" instances"} of i
|
|
|
292
292
|
`)]),y(ft,ut)};T(ve,ft=>{"error"in o(Ce)&&o(Ce).error&&!("ok"in o(Ce))?ft(it):"ok"in o(Ce)&&o(Ce).ok?ft(Mt,1):"ok"in o(Ce)&&ft(Jt,2)})}P(()=>ti=Xt(Lt,1,"deploy-box in-card svelte-ns6riw",null,ti,{"deploy-ok":"ok"in o(Ce)&&o(Ce).ok})),y(Me,Lt)};T(X,Me=>{o(te)[He()]&&Me(Ve)})}y(ke,re)};let a=$n(e,"generation",3,0),l=$n(e,"origin",3,null),d=A(Ci([])),u=A(""),g=A(Ci([])),x=A(!0),m=A(!1),C=A(""),_=A(""),E=A(""),S=A(void 0),I=A("list"),M=A(null),O=A(null),R=A(Ci({})),H=A(null),G=ct(()=>o(g).filter(ke=>ke.ok&&ke.helperOutdated).length);cn(()=>{var ke;(ke=e.onupdates)==null||ke.call(e,o(G))});let q=A(null),te=A(Ci({}));async function ye(ke){var He;p(q,ke,!0);try{const re=await _D(ke);p(te,{...o(te),[ke]:re},!0),re.ok&&(p(g,(await pa(!0)).hosts,!0),(He=e.onchanged)==null||He.call(e))}catch(re){p(te,{...o(te),[ke]:{error:re.message??String(re)}},!0)}finally{p(q,null)}}let Ne=A(!1),ge=A(""),Ae=ct(()=>o(g).filter(ke=>ke.ok&&ke.helperOutdated).map(ke=>ke.name));async function dt(){var He;const ke=o(Ae);if(!(ke.length===0||o(Ne))){p(Ne,!0);try{for(const[re,X]of ke.entries()){p(ge,`${re+1} of ${ke.length}: ${X}`);try{p(te,{...o(te),[X]:await _D(X)},!0)}catch(Ve){p(te,{...o(te),[X]:{error:Ve.message??String(Ve)}},!0)}}p(g,(await pa(!0)).hosts,!0),(He=e.onchanged)==null||He.call(e)}finally{p(Ne,!1),p(ge,"")}}}let he=A(null),We=A(Ci({})),de=A(null),je=A(Ci({})),fe=A(null);const Ft=[{key:"stable",label:"stable"},{key:"lts",label:"LTS"},{key:"latest",label:"latest"}],Te=ke=>{var He,re;return(ke==="latest"?(He=o(fe))==null?void 0:He.latest:(re=o(fe))==null?void 0:re.lts)??null};function Be(ke,He){if(!ke||!He)return null;const re=Me=>Me.replace(/^v/,"").split(".").map(Ce=>Number(Ce)||0),[X,Ve]=[re(ke),re(He)];for(let Me=0;Me<Math.max(X.length,Ve.length);Me++)if((X[Me]??0)!==(Ve[Me]??0))return(X[Me]??0)<(Ve[Me]??0)?-1:1;return 0}const Je=ke=>ke&&Number(ke.replace(/^v/,"").split(".")[0])||0;let It=ct(()=>o(g).filter(ke=>{if(!ke.ok||!ke.node||!o(fe))return!1;const re=!!o(fe).latest&&Je(ke.node)===Je(o(fe).latest)?o(fe).latest:o(fe).lts;return!!re&&Be(re,ke.node)===1}).length);cn(()=>{var ke;(ke=e.onnodeupdates)==null||ke.call(e,o(It))});function ue(ke){return Ft.map(He=>{const re=Te(He.key);return{...He,target:re,current:!!re&&re===ke.node,downgrade:Be(re,ke.node)===-1}})}async function xe(ke,He){var Ve,Me,Ce;const re=((Ve=Ht(ke))==null?void 0:Ve.local)===!0;if(await((Me=o(S))==null?void 0:Me.show(`Install Node.js ${Te(He)??`"${He}"`} on ${ke} with n install ${He}? This replaces the host's node binary; running adapters keep the current version until they are restarted.`+(re?" she runs on this host too — it keeps the old binary until the daemon itself is restarted.":""),{confirm:"Update Node.js"}))){p(he,ke,!0),p(je,{...o(je),[ke]:void 0},!0);try{const Lt=await $K(ke,He);p(We,{...o(We),[ke]:Lt},!0),p(g,(await pa(!0)).hosts,!0),(Ce=e.onchanged)==null||Ce.call(e)}catch(Lt){p(We,{...o(We),[ke]:{error:Lt.message??String(Lt)}},!0)}finally{p(he,null)}}}async function Fe(ke){var He;p(de,ke,!0);try{p(je,{...o(je),[ke]:await UK(ke)},!0),(He=e.onchanged)==null||He.call(e)}catch(re){p(je,{...o(je),[ke]:{error:re.message??String(re)}},!0)}finally{p(de,null)}}let Ye=A(null),nt=A(""),yt=A(!1),ci=A(!1),Rt=A(Ci({host:"",port:"",user:"",identityFile:"",hostname:""})),Ke=A(null),vt=A(!1),Ze=A(Ci(location.origin)),ee=A(null),ht=A(null),qe=A(""),Ue=A(!1),Z=A(""),Se=A(!1),Oe=null;const $t=ct(()=>JSON.stringify({remotes:o(d)})!==o(u)),Ht=ke=>o(g).find(He=>He.name===ke)??null,zt=ct(()=>o(g).find(ke=>ke.local)??null),Ut=(ke,He)=>(ke.hostname||ke.host).localeCompare(He.hostname||He.host,void 0,{numeric:!0,sensitivity:"base"});function et(ke){const He=ke.services,re=Array.isArray(He==null?void 0:He.hosts)?He.hosts:null;p(d,(re??[]).filter(X=>X&&X.ssh).map(X=>({host:String(X.ssh.host??""),port:typeof X.ssh.port=="number"?X.ssh.port:"",user:String(X.ssh.user??""),identityFile:String(X.ssh.identityFile??""),hostname:String(X.hostname??"")})).sort(Ut),!0),p(u,JSON.stringify({remotes:o(d)}),!0)}async function rt(ke=!1){p(x,!0),p(C,"");try{const[He,re]=await Promise.all([yc(),pa(ke).catch(()=>({hosts:[]}))]);et(He),p(g,re.hosts,!0)}catch(He){p(C,He.message??String(He),!0)}finally{p(x,!1)}w()}async function w(){try{const ke=await WK();p(Ye,ke.publicKey,!0),p(nt,ke.identityFile,!0)}catch{}try{p(E,(await Gc()).user??"",!0)}catch{}}Os(()=>rt());let V=0;cn(()=>{const ke=a();ke!==V&&(V=ke,Ho(()=>{l()!=="hostsconf"&&(async()=>{if(o($t))try{p(g,(await pa(!0)).hosts,!0)}catch{}else await rt(!0)})()}))}),Os(async()=>{try{p(fe,await qK(),!0)}catch{}}),Lh(()=>pt());function Y(ke){p(_,ke,!0),setTimeout(()=>{o(_)===ke&&p(_,"")},3e3)}async function oe(){var ke;p(m,!0),p(C,"");try{const He=[{name:"local"}];for(const re of o(d)){if(!re.host.trim())continue;const X={host:re.host.trim()};re.port!==""&&Number(re.port)>0&&(X.port=Number(re.port)),re.user.trim()&&(X.user=re.user.trim()),re.identityFile.trim()&&(X.identityFile=re.identityFile.trim()),He.push({...re.hostname.trim()?{hostname:re.hostname.trim()}:{},ssh:X})}await z0("services.hosts",He),window.dispatchEvent(new CustomEvent("she:config-changed")),p(u,JSON.stringify({remotes:o(d)}),!0),p(M,null),Y("saved"),(ke=e.onchanged)==null||ke.call(e),p(g,(await pa(!0)).hosts,!0)}catch(He){p(C,He.message??String(He),!0)}finally{p(m,!1)}}function Ee(){const ke=JSON.parse(o(u));p(d,ke.remotes,!0),p(M,null)}async function lt(ke){const He=ke.host;p(H,He,!0);try{const re=await mD({host:ke.host.trim(),port:ke.port,user:ke.user.trim(),identityFile:ke.identityFile.trim()});p(R,{...o(R),[He]:re.ok?{ok:!0,msg:`helper v${re.helper??"?"}`}:{ok:!1,msg:`${re.code}: ${re.error}`}},!0)}catch(re){p(R,{...o(R),[He]:{ok:!1,msg:re.message??String(re)}},!0)}finally{p(H,null)}}async function j(){p(H,"local");try{const ke=await VK("local");p(R,{...o(R),local:ke.ok?{ok:!0,msg:`helper v${ke.helper??"?"}`}:{ok:!1,msg:`${ke.code}: ${ke.error}`}},!0)}catch(ke){p(R,{...o(R),local:{ok:!1,msg:ke.message??String(ke)}},!0)}finally{p(H,null)}}async function Xe(ke){var re;const He=o(d)[ke];await((re=o(S))==null?void 0:re.show(`Remove ${He.hostname||He.host} from the list? she stops managing it; nothing on the host is changed (use "Remove from host…" for that).`,{confirm:"Remove",danger:!0}))&&(p(d,o(d).filter((X,Ve)=>Ve!==ke),!0),o(M)===ke&&p(M,null))}function Ct(){p(Rt,{host:"",port:"",user:"",identityFile:"",hostname:""},!0),p(Ke,null),p(Z,""),p(I,"add")}async function ce(){if(!o(Rt).host.trim()){p(Ke,{ok:!1,msg:"enter a host first"},!0);return}p(vt,!0);try{const ke=await mD({host:o(Rt).host.trim(),port:o(Rt).port,user:o(Rt).user.trim(),identityFile:o(Rt).identityFile.trim()});p(Ke,ke.ok?{ok:!0,msg:`helper v${ke.helper??"?"}`}:{ok:!1,msg:`${ke.code}: ${ke.error}`},!0)}catch(ke){p(Ke,{ok:!1,msg:ke.message??String(ke)},!0)}finally{p(vt,!1)}}function Qe(){o(Rt).host.trim()&&(p(d,[...o(d),{...o(Rt),host:o(Rt).host.trim(),user:o(Rt).user.trim(),identityFile:o(Rt).identityFile.trim(),hostname:o(Rt).hostname.trim()}].sort(Ut),!0),p(I,"list"),Y("host added — Save to keep it"))}function pt(){Oe&&(clearInterval(Oe),Oe=null)}async function At(){p(Ue,!0),p(Z,""),p(ee,null),p(ht,null),p(qe,""),p(Se,!1),pt();try{p(ee,await GK(o(Ze).trim().replace(/\/+$/,"")),!0),p(ht,"pending"),w(),Oe=setInterval(async()=>{var ke;if(!o(ee))return pt();try{const He=await KK(o(ee).token);p(ht,He.status,!0),He.status==="done"?(p(qe,He.host??"",!0),pt(),et(await yc()),p(g,(await pa(!0)).hosts,!0),(ke=e.onchanged)==null||ke.call(e)):He.status==="expired"&&pt()}catch{}},3e3)}catch(ke){p(Z,ke.message??String(ke),!0)}finally{p(Ue,!1)}}async function jt(ke,He){try{await navigator.clipboard.writeText(ke),He(!0),setTimeout(()=>He(!1),2e3)}catch{}}async function we(){var ke;if(!(o(Ye)&&!await((ke=o(S))==null?void 0:ke.show("Regenerate the services SSH key? Every remote host then needs the new public key (re-run the setup command, or replace it in authorized_keys).",{confirm:"Regenerate",danger:!0})))){p(yt,!0);try{const He=await jK();p(Ye,He.publicKey,!0),p(nt,He.identityFile,!0),Y("key generated")}catch(He){p(C,He.message??String(He),!0)}finally{p(yt,!1)}}}var tt=yde(),$=Dt(tt);ts(kr($,{}),ke=>p(S,ke,!0),()=>o(S));var be=h($,2),Le=f(be);{var at=ke=>{var He=sde(),re=Dt(He),X=f(re),Ve=h(re,2),Me=f(Ve),Ce=h(f(Me),4),Lt=h(f(Ce),2),ti=h(Lt,2),xt=f(ti),ve=h(Ce,2);{var it=me=>{var Ie=Jce(),st=f(Ie);P(()=>B(st,o(Z))),y(me,Ie)};T(ve,me=>{o(Z)&&me(it)})}var Mt=h(ve,2);{var Jt=me=>{var Ie=nde(),st=Dt(Ie),mt=f(st),Ot=f(mt),Kt=h(mt),Wt=f(Kt),qt=h(st,2),Yt=f(qt),ni=h(Yt),Ai=f(ni),Pe=h(ni,2),$e=f(Pe),Gt=h(qt,2),ai=f(Gt);{var _e=Pt=>{var hi=ede();y(Pt,hi)},Vt=Pt=>{var hi=tde();y(Pt,hi)},_t=Pt=>{var hi=ide(),Et=Dt(hi),kt=f(Et),di=h(kt),ki=f(di),_i=h(Et,2);P(()=>{B(kt,`✓ ${o(qe)??""} registered as `),B(ki,o(ee).user)}),z("click",_i,()=>p(I,"list")),y(Pt,hi)},bt=Pt=>{var hi=kn("command expired — create a new one.");y(Pt,hi)};T(ai,Pt=>{o(ht)==="pending"?Pt(_e):o(ht)==="fetched"?Pt(Vt,1):o(ht)==="done"?Pt(_t,2):o(ht)==="expired"&&Pt(bt,3)})}P(Pt=>{B(Ot,o(ee).command),B(Wt,o(Se)?"Copied":"Copy"),B(Yt,`Valid until ${Pt??""}, single use. To read it first: `),B(Ai,`curl -fsSL '${o(ee).scriptUrl??""}' -o she-setup.sh`),B($e,o(ee).sha256)},[()=>new Date(o(ee).expires).toLocaleTimeString()]),z("click",Kt,()=>jt(o(ee).command,Pt=>p(Se,Pt,!0))),y(me,Ie)};T(Mt,me=>{o(ee)&&me(Jt)})}var ft=h(Me,2),ut=h(f(ft),4),Bt=f(ut),ei=h(f(Bt)),J=h(Bt,2),Re=h(f(J)),ne=h(J,2),se=h(f(ne)),De=h(ne,2),pe=h(f(De)),gt=h(ut,2),U=f(gt),ot=f(U),W=h(U,2);{var Q=me=>{var Ie=GA();let st;var mt=f(Ie);P(()=>{st=Xt(Ie,1,"test-mark svelte-ns6riw",null,st,{ok:o(Ke).ok,err:!o(Ke).ok}),B(mt,o(Ke).ok?`✓ ${o(Ke).msg}`:`✗ ${o(Ke).msg}`)}),y(me,Ie)};T(W,me=>{o(Ke)&&me(Q)})}var ae=h(W,4);P(me=>{ti.disabled=o(Ue),B(xt,o(Ue)?"Preparing…":"Create setup command"),xi(se,"placeholder",o(E)?`${o(E)} (default)`:"user she runs as"),U.disabled=o(vt),B(ot,o(vt)?"Testing…":"Test connection"),ae.disabled=me},[()=>!o(Rt).host.trim()]),z("click",X,()=>p(I,"list")),ui(Lt,()=>o(Ze),me=>p(Ze,me)),z("click",ti,At),ui(ei,()=>o(Rt).host,me=>o(Rt).host=me),ui(Re,()=>o(Rt).port,me=>o(Rt).port=me),ui(se,()=>o(Rt).user,me=>o(Rt).user=me),ui(pe,()=>o(Rt).identityFile,me=>o(Rt).identityFile=me),z("click",U,ce),z("click",ae,Qe),y(ke,He)},St=ke=>{var He=Cde(),re=Dt(He),X=f(re),Ve=f(X);let Me;var Ce=h(X,2),Lt=h(Ce,2),ti=f(Lt),xt=h(Lt,2);{var ve=_t=>{var bt=ode();y(_t,bt)};T(xt,_t=>{o(x)&&_t(ve)})}var it=h(xt,2);{var Mt=_t=>{var bt=rde(),Pt=f(bt);P(()=>{bt.disabled=o(Ne)||o(q)!==null,B(Pt,o(Ne)?`Updating ${o(ge)}…`:`Update all helpers (${o(Ae).length})`)}),z("click",bt,dt),y(_t,bt)};T(it,_t=>{o(Ae).length>1&&_t(Mt)})}var Jt=h(it,4);{var ft=_t=>{var bt=ade(),Pt=f(bt);P(()=>B(Pt,o(_))),y(_t,bt)};T(Jt,_t=>{o(_)&&_t(ft)})}var ut=h(Jt,2);{var Bt=_t=>{var bt=lde(),Pt=h(Dt(bt),2),hi=h(Pt,2),Et=f(hi);P(()=>{Pt.disabled=o(m),hi.disabled=o(m),B(Et,o(m)?"Saving…":"Save")}),z("click",Pt,Ee),z("click",hi,oe),y(_t,bt)};T(ut,_t=>{o($t)&&_t(Bt)})}var ei=h(re,2);{var J=_t=>{var bt=cde(),Pt=f(bt);P(()=>B(Pt,o(C))),y(_t,bt)};T(ei,_t=>{o(C)&&_t(J)})}var Re=h(ei,2),ne=f(Re),se=f(ne),De=f(se);let pe;var gt=h(De,2),U=f(gt),ot=h(gt,6);{var W=_t=>{i(_t,()=>"local",()=>o(zt))};T(ot,_t=>{var bt;(bt=o(zt))!=null&&bt.ok&&_t(W)})}var Q=h(ot,2),ae=h(Q);t(ae,()=>"local");var me=h(se,2);{var Ie=_t=>{n(_t,()=>"local",()=>o(zt))};T(me,_t=>{var bt;(bt=o(zt))!=null&&bt.ok&&_t(Ie)})}var st=h(me,2);s(st,()=>"local");var mt=h(st,2);{var Ot=_t=>{var bt=ude(),Pt=f(bt),hi=h(Pt);{var Et=kt=>{var di=dde(),ki=Dt(di);ki.nodeValue=" — run ",y(kt,di)};T(hi,kt=>{o(zt).code==="HELPER_MISSING"&&kt(Et)})}P(()=>B(Pt,o(zt).error)),y(_t,bt)};T(mt,_t=>{o(zt)&&!o(zt).ok&&_t(Ot)})}var Kt=h(ne,2);gi(Kt,17,()=>o(d),Ki,(_t,bt,Pt)=>{const hi=ct(()=>Ht(o(bt).host));var Et=xde(),kt=f(Et),di=f(kt);let ki;var _i=h(di,2),Fi=f(_i),Nt=h(_i,2),ri=f(Nt),bi=h(Nt,2);{var Oi=mi=>{var Ri=hde();P(()=>xi(Ri,"title",o(bt).identityFile)),y(mi,Ri)};T(bi,mi=>{o(bt).identityFile&&mi(Oi)})}var wi=h(bi,4);{var Ji=mi=>{i(mi,()=>o(bt).host,()=>o(hi))},en=mi=>{var Ri=fde(),Ni=f(Ri);P(()=>{Ri.disabled=o(q)!==null,B(Ni,o(q)===o(bt).host?"Deploying…":"Deploy helper")}),z("click",Ri,()=>ye(o(bt).host)),y(mi,Ri)};T(wi,mi=>{var Ri;(Ri=o(hi))!=null&&Ri.ok?mi(Ji):o(hi)&&!o(hi).ok&&mi(en,1)})}var Cn=h(wi,2),tn=h(Cn);t(tn,()=>o(bt).host);var Mi=h(tn,2);let An;var on=h(Mi,2);let sn;var zn=h(on,2),wn=h(kt,2);{var _s=mi=>{n(mi,()=>o(bt).host,()=>o(hi))};T(wn,mi=>{var Ri;(Ri=o(hi))!=null&&Ri.ok&&mi(_s)})}var Gs=h(wn,2);s(Gs,()=>o(bt).host);var $s=h(Gs,2);{var vi=mi=>{var Ri=pde(),Ni=f(Ri);P(()=>B(Ni,o(hi).error)),y(mi,Ri)};T($s,mi=>{o(hi)&&!o(hi).ok&&mi(vi)})}var Bi=h($s,2);{var Ti=mi=>{var Ri=gde(),Ni=f(Ri),Zi=h(f(Ni)),$i=h(Ni,2),ji=h(f($i)),_n=h($i,2),un=h(f(_n)),En=h(_n,2),Bn=h(f(En)),bn=h(En,2),dn=h(f(bn));P(()=>xi(un,"placeholder",o(E)?`${o(E)} (default)`:"user she runs as")),ui(Zi,()=>o(bt).host,hn=>o(bt).host=hn),ui(ji,()=>o(bt).port,hn=>o(bt).port=hn),ui(un,()=>o(bt).user,hn=>o(bt).user=hn),ui(Bn,()=>o(bt).identityFile,hn=>o(bt).identityFile=hn),ui(dn,()=>o(bt).hostname,hn=>o(bt).hostname=hn),y(mi,Ri)};T(Bi,mi=>{o(M)===Pt&&mi(Ti)})}var Wi=h(Bi,2);{var rn=mi=>{var Ri=vde(),Ni=f(Ri);{let Zi=ct(()=>o(bt).hostname||o(bt).host);Nce(Ni,{get host(){return o(bt).host},get label(){return o(Zi)},onclose:()=>p(O,null),ondone:()=>{var $i;p(O,null),rt(!0),($i=e.onchanged)==null||$i.call(e)}})}y(mi,Ri)};T(Wi,mi=>{o(O)===Pt&&mi(rn)})}P(mi=>{var Ri,Ni;ki=Xt(di,1,"dot svelte-ns6riw",null,ki,{ok:(Ri=o(hi))==null?void 0:Ri.ok,err:o(hi)&&!o(hi).ok}),B(Fi,o(bt).hostname||((Ni=o(hi))==null?void 0:Ni.hostname)||o(bt).host),B(ri,`${(o(bt).user||o(E)||"?")??""}@${o(bt).host??""}${o(bt).port?`:${o(bt).port}`:""}`),Cn.disabled=mi,An=Xt(Mi,1,"ghost sm svelte-ns6riw",null,An,{active:o(M)===Pt}),sn=Xt(on,1,"ghost sm svelte-ns6riw",null,sn,{active:o(O)===Pt})},[()=>o(H)!==null||!o(bt).host.trim()]),z("click",Cn,()=>lt(o(bt))),z("click",Mi,()=>p(M,o(M)===Pt?null:Pt,!0)),z("click",on,()=>p(O,o(O)===Pt?null:Pt,!0)),z("click",zn,()=>Xe(Pt)),y(_t,Et)});var Wt=h(Kt,2);{var qt=_t=>{var bt=mde();y(_t,bt)};T(Wt,_t=>{o(d).length===0&&!o(x)&&_t(qt)})}var Yt=h(Wt,2),ni=f(Yt),Ai=h(f(ni),6);{var Pe=_t=>{var bt=_de(),Pt=f(bt);P(()=>B(Pt,o(ci)?"Copied":"Copy public key")),z("click",bt,()=>jt(o(Ye),hi=>p(ci,hi,!0))),y(_t,bt)};T(Ai,_t=>{o(Ye)&&_t(Pe)})}var $e=h(Ai,2),Gt=f($e),ai=h(ni,2);{var _e=_t=>{var bt=bde(),Pt=Dt(bt),hi=f(Pt),Et=h(Pt,2),kt=f(Et);P(()=>{B(hi,o(Ye)),B(kt,o(nt))}),y(_t,bt)},Vt=_t=>{var bt=KA(),Pt=f(bt);P(()=>B(Pt,`No services key yet (${(o(nt)||"data-dir/ssh/services_id_ed25519")??""}) — the setup command creates it.`)),y(_t,bt)};T(ai,_t=>{o(Ye)?_t(_e):_t(Vt,-1)})}P(()=>{var _t,bt;X.disabled=o(x),Me=Xt(Ve,1,"svelte-ns6riw",null,Me,{spinning:o(x)}),B(ti,`${o(d).length+1} host${o(d).length===0?"":"s"}`),pe=Xt(De,1,"dot svelte-ns6riw",null,pe,{ok:(_t=o(zt))==null?void 0:_t.ok,err:o(zt)&&!o(zt).ok}),B(U,((bt=o(zt))==null?void 0:bt.hostname)??"this host"),Q.disabled=o(H)!==null,$e.disabled=o(yt),B(Gt,o(yt)?"Generating…":o(Ye)?"Regenerate":"Generate key")}),z("click",X,()=>rt(!0)),z("click",Ce,Ct),z("click",Q,j),z("click",$e,we),y(ke,He)};T(Le,ke=>{o(I)==="add"?ke(at):ke(St,-1)})}y(r,tt),cs()}ms(["click"]);var ZA=k('<span class="tab-dot svelte-ymmv06"></span>'),Ede=k('<div class="services-page svelte-ymmv06"><div class="sub-nav svelte-ymmv06"><button>Instances</button> <button>Installations <!></button> <button>Catalog</button> <button>Hosts <!></button></div> <div><!></div> <div><!></div> <div><!></div> <div><!></div></div>');function Sde(r,e){ls(e,!0);let t=$n(e,"active",3,!1),i=$n(e,"sub",3,null);const n=["instances","hosts","catalog","hostsconf"],s="she-services-tab",a=localStorage.getItem(s);let l=A(Ci(a&&n.includes(a)?a:"instances"));cn(()=>{localStorage.setItem(s,o(l))});const d={instances:"instances",hosts:"installations",catalog:"catalog",hostsconf:"hosts"},u=vt=>Object.keys(d).find(Ze=>d[Ze]===vt)??null;let g;cn(()=>{if(i()===g)return;g=i();const vt=u(i());vt&&Ho(()=>{vt!==o(l)&&p(l,vt,!0)})}),cn(()=>{var vt;t()&&((vt=e.onsub)==null||vt.call(e,d[o(l)]))});let x=A(0),m=A(null);function C(vt){p(m,vt,!0),ky(x)}let _=A(null),E=0;function S(vt,Ze){p(_,{host:vt,adapter:Ze,n:++E},!0),C("catalog"),p(l,"hosts")}let I=A(0),M=A(0),O=A(0),R=A("none"),H=A(""),G=ct(()=>[o(I)>0?`${o(I)} adapter update${o(I)===1?"":"s"} available`:"",o(M)>0?`${o(M)} host${o(M)===1?"":"s"} with an outdated helper`:"",o(O)>0?`${o(O)} host${o(O)===1?"":"s"} with a newer Node.js`:""].filter(Boolean).join(" · "));cn(()=>{var vt,Ze;o(G)?(vt=e.onstatus)==null||vt.call(e,"warn",o(G)):(Ze=e.onstatus)==null||Ze.call(e,o(R),o(H))});var q=Ede(),te=f(q),ye=f(te);let Ne;var ge=h(ye,2);let Ae;var dt=h(f(ge));{var he=vt=>{var Ze=ZA();P(()=>xi(Ze,"title",`${o(I)??""} adapter update${o(I)===1?"":"s"} available`)),y(vt,Ze)};T(dt,vt=>{o(I)>0&&vt(he)})}var We=h(ge,2);let de;var je=h(We,2);let fe;var Ft=h(f(je));{var Te=vt=>{var Ze=ZA();P(ee=>xi(Ze,"title",ee),[()=>[o(M)>0?`${o(M)} host${o(M)===1?"":"s"} running an outdated she-servicectl`:"",o(O)>0?`${o(O)} host${o(O)===1?"":"s"} with a newer Node.js available`:""].filter(Boolean).join(" · ")]),y(vt,Ze)};T(Ft,vt=>{o(M)+o(O)>0&&vt(Te)})}var Be=h(te,2);let Je;var It=f(Be);Uae(It,{onstatus:(vt,Ze)=>{p(R,vt,!0),p(H,Ze,!0)},get generation(){return o(x)},get origin(){return o(m)},onchanged:()=>C("instances")});var ue=h(Be,2);let xe;var Fe=f(ue);oce(Fe,{onchanged:()=>C("hosts"),onupdates:vt=>p(I,vt,!0),get generation(){return o(x)},get origin(){return o(m)},get addPreset(){return o(_)}});var Ye=h(ue,2);let nt;var yt=f(Ye);{let vt=ct(()=>t()&&o(l)==="catalog");Ice(yt,{get active(){return o(vt)},oninstalled:S})}var ci=h(Ye,2);let Rt;var Ke=f(ci);wde(Ke,{onchanged:()=>C("hostsconf"),onupdates:vt=>p(M,vt,!0),onnodeupdates:vt=>p(O,vt,!0),get generation(){return o(x)},get origin(){return o(m)}}),P(()=>{Ne=Xt(ye,1,"svelte-ymmv06",null,Ne,{active:o(l)==="instances"}),Ae=Xt(ge,1,"svelte-ymmv06",null,Ae,{active:o(l)==="hosts"}),de=Xt(We,1,"svelte-ymmv06",null,de,{active:o(l)==="catalog"}),fe=Xt(je,1,"svelte-ymmv06",null,fe,{active:o(l)==="hostsconf"}),Je=Xt(Be,1,"tab-wrap svelte-ymmv06",null,Je,{hidden:o(l)!=="instances"}),xe=Xt(ue,1,"tab-wrap svelte-ymmv06",null,xe,{hidden:o(l)!=="hosts"}),nt=Xt(Ye,1,"tab-wrap svelte-ymmv06",null,nt,{hidden:o(l)!=="catalog"}),Rt=Xt(ci,1,"tab-wrap svelte-ymmv06",null,Rt,{hidden:o(l)!=="hostsconf"})}),z("click",ye,()=>p(l,"instances")),z("click",ge,()=>p(l,"hosts")),z("click",We,()=>p(l,"catalog")),z("click",je,()=>p(l,"hostsconf")),y(r,q),cs()}ms(["click"]);const JC=(r,e=ar)=>{var t=Ade(),i=h(f(t));{var n=a=>{var l=kde();y(a,l)},s=a=>{var l=Dde();y(a,l)};T(i,a=>{e()?a(n):a(s,-1)})}y(r,t)};var kde=Wo('<path d="M5.5 7V5a2.5 2.5 0 0 1 5 0v2"></path>'),Dde=Wo('<path d="M5.5 7V5a2.5 2.5 0 0 1 5 0"></path>'),Ade=Wo('<svg width="12" height="12" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="3" y="7" width="10" height="7" rx="1.5"></rect><!></svg>'),Bde=k('<span class="ok svelte-1az45ix"> </span>'),Fde=k('<span class="muted svelte-1az45ix"> </span>'),Lde=k('<div class="err-box svelte-1az45ix"> <button class="ghost sm svelte-1az45ix">×</button></div>'),Ide=k(`<div class="err-box svelte-1az45ix"><b>Secrets store locked:</b> <code class="svelte-1az45ix">SHE_SECRETS_KEY</code> in the daemon's environment or restore <code class="svelte-1az45ix"> </code>, then restart she. Starting over means deleting <code class="svelte-1az45ix"> </code>.</div>`),Pde=k('<button><span class="name svelte-1az45ix"> </span> <span class="count svelte-1az45ix"> </span></button>'),Tde=k('<div class="muted empty svelte-1az45ix">No secrets yet.</div>'),Mde=k("<!> <!>",1),Rde=k('<button type="button" class="lock is-secret svelte-1az45ix" disabled="" title="secret — write-only, never shown again"><!></button> <input placeholder="•••••• (type to replace)" autocomplete="off" spellcheck="false" class="svelte-1az45ix"/>',1),Nde=k('<textarea spellcheck="false" class="svelte-1az45ix"></textarea>'),Ode=k('<input type="text" autocomplete="off" spellcheck="false" class="svelte-1az45ix"/>'),Hde=k('<button type="button" class="lock svelte-1az45ix" title="plain — shown in clear; click to mark it secret (never shown again)"><!></button> <!>',1),zde=k('<tr><td class="mono svelte-1az45ix"> </td><td class="svelte-1az45ix"><form class="val svelte-1az45ix"><!> <button type="submit" class="sm svelte-1az45ix">Save</button></form></td><td class="muted svelte-1az45ix"> </td><td class="c-act svelte-1az45ix"><button class="ghost sm svelte-1az45ix" title="Delete">×</button></td></tr>'),Wde=k('<textarea placeholder="value" spellcheck="false" class="svelte-1az45ix"></textarea>'),jde=k('<input type="password" placeholder="value" autocomplete="off" class="svelte-1az45ix"/>'),Vde=k('<div class="fields-head svelte-1az45ix"><span class="title svelte-1az45ix"> </span> <span class="muted svelte-1az45ix"> </span> <span class="spacer svelte-1az45ix"></span> <label class="reveal check-label svelte-1az45ix"><input type="checkbox" class="svelte-1az45ix"/><span class="checkmark svelte-1az45ix"></span> show while typing</label> <button class="ghost sm danger svelte-1az45ix">Delete group</button></div> <table class="svelte-1az45ix"><colgroup><col class="c-name svelte-1az45ix"/><col class="c-value"/><col class="c-changed svelte-1az45ix"/><col class="c-act svelte-1az45ix"/></colgroup><thead><tr><th class="svelte-1az45ix">field</th><th class="svelte-1az45ix">value</th><th class="svelte-1az45ix">changed</th><th class="svelte-1az45ix"></th></tr></thead><tbody><!><tr class="new svelte-1az45ix"><td class="svelte-1az45ix"><input type="text" placeholder="new field" spellcheck="false" class="svelte-1az45ix"/></td><td class="svelte-1az45ix"><form class="val svelte-1az45ix"><button type="button"><!></button> <!> <button type="submit" class="sm svelte-1az45ix">Add</button></form></td><td class="muted svelte-1az45ix" colspan="2">the lock decides the kind: secret fields are write-only forever, plain fields (user names, hosts) stay readable here. Multi-line values: tick <i>show while typing</i> and paste.</td></tr></tbody></table> <div class="hint svelte-1az45ix"><code class="svelte-1az45ix"> </code> returns the string, <code class="svelte-1az45ix"> </code> the whole group as a frozen object, <code class="svelte-1az45ix">she.secrets.has(…)</code> checks without a warning. Scripts that read a secret at load time keep the old value until they are reloaded.</div>',1),$de=k('Create a group on the left, then add fields to it — e.g. group <code class="svelte-1az45ix">smtp</code> with <code class="svelte-1az45ix">host</code>, <code class="svelte-1az45ix">user</code>, <code class="svelte-1az45ix">password</code>.',1),qde=k('<div class="muted empty svelte-1az45ix"><!></div>'),Ude=k(`<!> <div class="sec-shell svelte-1az45ix"><div class="bar svelte-1az45ix"><span class="muted svelte-1az45ix">Values are stored encrypted and never sent back to the browser — scripts read them with <code class="svelte-1az45ix">she.secrets.get('group/field')</code>.</span> <span class="spacer svelte-1az45ix"></span> <!> <!> <button class="ghost svelte-1az45ix" title="Reload">↺</button></div> <!> <!> <div class="body svelte-1az45ix"><div class="groups svelte-1az45ix"><div class="groups-head svelte-1az45ix">Groups</div> <!> <form class="add-group svelte-1az45ix"><input type="text" placeholder="new group" spellcheck="false" class="svelte-1az45ix"/> <button type="submit" class="ghost sm svelte-1az45ix">+</button></form></div> <div class="fields svelte-1az45ix"><!></div></div></div>`,1);function Gde(r,e){ls(e,!0);let t=$n(e,"active",3,!0),i=A(null),n=A(null),s=A(""),a=A(""),l=A(!1),d=A(""),u=A(""),g=A(""),x=A(!0),m=A(Ci({})),C=A(!1),_=A(void 0),E=!1;const S=/^[A-Za-z0-9_.-]{1,64}$/,I=ct(()=>{var ee;return((ee=o(i))==null?void 0:ee.groups.find(ht=>ht.name===o(n)))??null}),M=ct(()=>{var ee,ht;return((ee=o(i))==null?void 0:ee.status)==="locked"||((ht=o(i))==null?void 0:ht.status)==="error"});async function O(){try{p(i,await dG(),!0),p(s,""),o(n)&&!o(i).groups.some(ee=>ee.name===o(n))&&p(n,null),!o(n)&&o(i).groups.length>0&&p(n,o(i).groups[0].name,!0)}catch(ee){p(s,ee.message??String(ee),!0)}}cn(()=>{t()&&!E&&(E=!0,O())});function R(ee){p(a,ee,!0),setTimeout(()=>{o(a)===ee&&p(a,"")},2500)}async function H(ee,ht,qe,Ue=!0){if(qe){p(l,!0);try{await uG(ee,ht,qe,Ue),p(m,{...o(m),[`${ee}/${ht}`]:""},!0),p(u,""),p(g,""),p(x,!0),R(`saved ${ee}/${ht}`),await O(),p(n,ee,!0)}catch(Z){p(s,Z.message??String(Z),!0)}finally{p(l,!1)}}}async function G(){var ht;const ee=o(d).trim();if(!S.test(ee)){p(s,"group name: letters, digits, _ . - (max 64)");return}(ht=o(i))!=null&&ht.groups.some(qe=>qe.name===ee)||p(i,o(i)?{...o(i),groups:[...o(i).groups,{name:ee,changed:0,fields:[]}].sort((qe,Ue)=>qe.name.localeCompare(Ue.name))}:o(i),!0),p(n,ee,!0),p(d,""),p(s,"")}async function q(ee,ht){var qe;if(await((qe=o(_))==null?void 0:qe.show(`Mark ${ee}/${ht} as secret? Its value will never be shown again — not here, not through the API. Scripts keep reading it. This cannot be undone (delete and re-create to change your mind).`,{confirm:"Mark secret",danger:!0}))){p(l,!0);try{await hG(ee,ht),p(m,{...o(m),[`${ee}/${ht}`]:""},!0),R(`${ee}/${ht} is secret now`),await O()}catch(Ue){p(s,Ue.message??String(Ue),!0)}finally{p(l,!1)}}}async function te(ee,ht){var qe;if(await((qe=o(_))==null?void 0:qe.show(`Delete secret ${ee}/${ht}? Scripts reading it get undefined from now on.`,{confirm:"Delete",danger:!0}))){p(l,!0);try{await oD(ee,ht),R(`deleted ${ee}/${ht}`),await O()}catch(Ue){p(s,Ue.message??String(Ue),!0)}finally{p(l,!1)}}}async function ye(ee){var qe,Ue,Z,Se;const ht=((qe=o(I))==null?void 0:qe.fields.length)??0;if(ht===0){p(i,o(i)?{...o(i),groups:o(i).groups.filter(Oe=>Oe.name!==ee)}:o(i),!0),p(n,((Z=(Ue=o(i))==null?void 0:Ue.groups[0])==null?void 0:Z.name)??null,!0);return}if(await((Se=o(_))==null?void 0:Se.show(`Delete the group ${ee} with its ${ht} secret${ht===1?"":"s"}?`,{confirm:"Delete group",danger:!0}))){p(l,!0);try{await oD(ee),R(`deleted ${ee}`),p(n,null),await O()}catch(Oe){p(s,Oe.message??String(Oe),!0)}finally{p(l,!1)}}}function Ne(ee){return ee?new Date(ee).toLocaleString():"—"}var ge=Ude(),Ae=Dt(ge);ts(kr(Ae,{}),ee=>p(_,ee,!0),()=>o(_));var dt=h(Ae,2),he=f(dt),We=h(f(he),4);{var de=ee=>{var ht=Bde(),qe=f(ht);P(()=>B(qe,o(a))),y(ee,ht)};T(We,ee=>{o(a)&&ee(de)})}var je=h(We,2);{var fe=ee=>{var ht=Fde(),qe=f(ht);P(()=>{xi(ht,"title",o(i).file),B(qe,`key: ${(o(i).keySource==="env"?"SHE_SECRETS_KEY":o(i).keySource==="file"?o(i).keyFile:"none yet — generated on first save")??""}`)}),y(ee,ht)};T(je,ee=>{o(i)&&ee(fe)})}var Ft=h(je,2),Te=h(he,2);{var Be=ee=>{var ht=Lde(),qe=f(ht),Ue=h(qe);P(()=>B(qe,`${o(s)??""} `)),z("click",Ue,()=>p(s,"")),y(ee,ht)};T(Te,ee=>{o(s)&&ee(Be)})}var Je=h(Te,2);{var It=ee=>{var ht=Ide(),qe=h(f(ht)),Ue=h(qe,3),Z=f(Ue),Se=h(Ue,2),Oe=f(Se);P(()=>{B(qe,` ${o(i).error??""}. Values cannot be read or changed until the key is back — set `),B(Z,o(i).keyFile),B(Oe,o(i).file)}),y(ee,ht)};T(Je,ee=>{o(M)&&o(i)&&ee(It)})}var ue=h(Je,2),xe=f(ue),Fe=h(f(xe),2);{var Ye=ee=>{var ht=Mde(),qe=Dt(ht);gi(qe,17,()=>o(i).groups,Se=>Se.name,(Se,Oe)=>{var $t=Pde();let Ht;var zt=f($t),Ut=f(zt),et=h(zt,2),rt=f(et);P(()=>{Ht=Xt($t,1,"group svelte-1az45ix",null,Ht,{active:o(n)===o(Oe).name}),B(Ut,o(Oe).name),B(rt,o(Oe).fields.length)}),z("click",$t,()=>p(n,o(Oe).name,!0)),y(Se,$t)});var Ue=h(qe,2);{var Z=Se=>{var Oe=Tde();y(Se,Oe)};T(Ue,Se=>{o(i).groups.length===0&&Se(Z)})}y(ee,ht)};T(Fe,ee=>{o(i)&&ee(Ye)})}var nt=h(Fe,2),yt=f(nt),ci=h(yt,2),Rt=h(xe,2),Ke=f(Rt);{var vt=ee=>{var ht=Vde(),qe=Dt(ht),Ue=f(qe),Z=f(Ue),Se=h(Ue,2),Oe=f(Se),$t=h(Se,4),Ht=f($t),zt=h($t,2),Ut=h(qe,2),et=h(f(Ut),2),rt=f(et);gi(rt,17,()=>o(I).fields,Le=>Le.name,(Le,at)=>{const St=ct(()=>`${o(I).name}/${o(at).name}`),ke=ct(()=>o(m)[o(St)]??(o(at).secret?"":o(at).value??"")),He=ct(()=>o(at).secret?o(ke)!=="":o(ke)!==(o(at).value??""));var re=zde(),X=f(re),Ve=f(X),Me=h(X),Ce=f(Me),Lt=f(Ce);{var ti=ut=>{var Bt=Rde(),ei=Dt(Bt),J=f(ei);JC(J,()=>!0);var Re=h(ei,2);P(()=>{xi(Re,"type",o(C)?"text":"password"),qa(Re,o(ke)),Re.disabled=o(M)}),z("input",Re,ne=>p(m,{...o(m),[o(St)]:ne.target.value},!0)),y(ut,Bt)},xt=ut=>{var Bt=Hde(),ei=Dt(Bt),J=f(ei);JC(J,()=>!1);var Re=h(ei,2);{var ne=pe=>{var gt=Nde();xi(gt,"rows",4),P(()=>{qa(gt,o(ke)),gt.disabled=o(M)}),z("input",gt,U=>p(m,{...o(m),[o(St)]:U.target.value},!0)),y(pe,gt)},se=ct(()=>o(ke).includes(`
|
|
293
293
|
`)),De=pe=>{var gt=Ode();P(()=>{qa(gt,o(ke)),gt.disabled=o(M)}),z("input",gt,U=>p(m,{...o(m),[o(St)]:U.target.value},!0)),y(pe,gt)};T(Re,pe=>{o(se)?pe(ne):pe(De,-1)})}P(()=>ei.disabled=o(l)||o(M)),z("click",ei,()=>q(o(I).name,o(at).name)),y(ut,Bt)};T(Lt,ut=>{o(at).secret?ut(ti):ut(xt,-1)})}var ve=h(Lt,2),it=h(Me),Mt=f(it),Jt=h(it),ft=f(Jt);P(ut=>{xi(X,"title",`she.secrets.get('${o(St)??""}')`),B(Ve,o(at).name),ve.disabled=o(l)||o(M)||!o(He)||!o(ke),B(Mt,ut),ft.disabled=o(l)||o(M)},[()=>Ne(o(at).changed)]),ws("submit",Ce,ut=>{ut.preventDefault(),o(He)&&H(o(I).name,o(at).name,o(ke),o(at).secret)}),z("click",ft,()=>te(o(I).name,o(at).name)),y(Le,re)});var w=h(rt),V=f(w),Y=f(V),oe=h(V),Ee=f(oe),lt=f(Ee);let j;var Xe=f(lt);JC(Xe,()=>o(x));var Ct=h(lt,2);{var ce=Le=>{var at=Wde();P(St=>{xi(at,"rows",St),at.disabled=o(M)},[()=>o(g).includes(`
|
|
294
294
|
`)?4:1]),ui(at,()=>o(g),St=>p(g,St)),y(Le,at)},Qe=ct(()=>o(g).includes(`
|
|
295
|
-
`)||o(C)||!o(x)),pt=Le=>{var at=jde();P(()=>at.disabled=o(M)),ui(at,()=>o(g),St=>p(g,St)),y(Le,at)};T(Ct,Le=>{o(Qe)?Le(ce):Le(pt,-1)})}var At=h(Ct,2),jt=h(Ut,2),we=f(jt),tt=f(we),$=h(we,2),be=f($);P((Le,at)=>{B(Z,o(I).name),B(Oe,`changed ${Le??""}`),zt.disabled=o(l)||o(M),Y.disabled=o(M),j=Xt(lt,1,"lock svelte-1az45ix",null,j,{"is-secret":o(x)}),lt.disabled=o(M),xi(lt,"title",o(x)?"secret — write-only once saved (click for a plain field, e.g. a user name)":"plain — shown in clear (click for a secret)"),At.disabled=at,B(tt,`she.secrets.get('${o(I).name??""}/<field>')`),B(be,`she.secrets.get('${o(I).name??""}')`)},[()=>Ne(o(I).changed),()=>o(l)||o(M)||!o(u).trim()||!o(g)]),Ss(Ht,()=>o(C),Le=>p(C,Le)),z("click",zt,()=>ye(o(I).name)),ui(Y,()=>o(u),Le=>p(u,Le)),ws("submit",Ee,Le=>{Le.preventDefault(),S.test(o(u).trim())?H(o(I).name,o(u).trim(),o(g),o(x)):p(s,"field name: letters, digits, _ . - (max 64)")}),z("click",lt,()=>p(x,!o(x))),y(ee,ht)},Ze=ee=>{var ht=qde(),qe=f(ht);{var Ue=Se=>{var Oe=$de();y(Se,Oe)},Z=Se=>{var Oe=kn("Select a group.");y(Se,Oe)};T(qe,Se=>{o(i).groups.length===0?Se(Ue):Se(Z,-1)})}y(ee,ht)};T(Ke,ee=>{o(I)?ee(vt):o(i)&&!o(M)&&ee(Ze,1)})}P(ee=>{yt.disabled=o(M),ci.disabled=ee},[()=>o(M)||!o(d).trim()]),z("click",Ft,O),ws("submit",nt,ee=>{ee.preventDefault(),G()}),ui(yt,()=>o(d),ee=>p(d,ee)),y(r,ge),cs()}ms(["click","input"]);var Kde=k('<div class="safe-banner svelte-1n46o8q"><strong class="svelte-1n46o8q">⚠ SAFE MODE</strong> — no user script is running and the script directory is not watched. She was killed instead of stopped last time, which usually means a script blocked the event loop. Edit or delete it, then restart. <button class="safe-restart svelte-1n46o8q">Restart daemon</button></div>'),YA=k('<span class="nav-dot nav-dot--warn svelte-1n46o8q"></span>'),Zde=k('<span class="nav-dot nav-dot--err svelte-1n46o8q" title="MQTT broker not connected"></span>'),Yde=k('<span class="nav-dot nav-dot--warn nav-dot--blink svelte-1n46o8q" title="Waiting for retained MQTT state"></span>'),Xde=k('<span class="nav-dot nav-dot--ok svelte-1n46o8q" title="MQTT connected"></span>'),Qde=k('<button><svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" class="svelte-1n46o8q"><path d="M8.36,5.73 A2.6,2.6 0 0,1 9.38,10.50" class="svelte-1n46o8q"></path><path d="M7.64,5.73 A2.6,2.6 0 0,0 6.62,10.50" class="svelte-1n46o8q"></path><path d="M9.16,3.95 A4.5,4.5 0 0,1 10.38,12.12" class="svelte-1n46o8q"></path><path d="M6.84,3.95 A4.5,4.5 0 0,0 5.62,12.12" class="svelte-1n46o8q"></path><path d="M10.40,2.37 A6.4,6.4 0 0,1 11.39,13.73" class="svelte-1n46o8q"></path><path d="M5.60,2.37 A6.4,6.4 0 0,0 4.61,13.73" class="svelte-1n46o8q"></path><path d="M7.15,8.3 L8,15.4 L8.85,8.3 Z" fill="currentColor" stroke="none" class="svelte-1n46o8q"></path><circle cx="8" cy="8.3" r="1.45" fill="currentColor" stroke="none" class="svelte-1n46o8q"></circle></svg> Broker</button>'),Jde=k('<span class="nav-dot nav-dot--none svelte-1n46o8q"></span>'),eue=k('<button><svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="svelte-1n46o8q"><rect x="2" y="2" width="12" height="4" rx="1" class="svelte-1n46o8q"></rect><rect x="2" y="10" width="12" height="4" rx="1" class="svelte-1n46o8q"></rect><circle cx="4.5" cy="4" r="0.6" fill="currentColor" class="svelte-1n46o8q"></circle><circle cx="4.5" cy="12" r="0.6" fill="currentColor" class="svelte-1n46o8q"></circle></svg> Adapters <!></button>'),tue=k('<span class="nav-dot nav-dot--ok svelte-1n46o8q" title="All Matter devices online"></span>'),iue=k('<span class="nav-dot nav-dot--warn svelte-1n46o8q" title="Some Matter devices offline"></span>'),nue=k('<span class="nav-dot nav-dot--err svelte-1n46o8q" title="No Matter devices online"></span>'),sue=k('<button><svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round" class="svelte-1n46o8q"><path d="M8,2 L8,7" class="svelte-1n46o8q"></path><path d="M6,5 L8,7.5 L10,5" class="svelte-1n46o8q"></path><path d="M2.5,14 L6,10" class="svelte-1n46o8q"></path><path d="M6.2,12.8 L6,10 L3.2,10.2" class="svelte-1n46o8q"></path><path d="M13.5,14 L10,10" class="svelte-1n46o8q"></path><path d="M9.8,12.8 L10,10 L12.8,10.2" class="svelte-1n46o8q"></path></svg> Matter <!></button>'),oue=k('<button><svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="svelte-1n46o8q"><ellipse cx="8" cy="4.5" rx="5" ry="1.8" class="svelte-1n46o8q"></ellipse><path d="M3,4.5 v7 a5,1.8 0,0,0 10,0 v-7" class="svelte-1n46o8q"></path><path d="M3,8 a5,1.8 0,0,0 10,0" class="svelte-1n46o8q"></path></svg> DB</button>'),rue=k('<span class="nav-dot nav-dot--err svelte-1n46o8q" title="Errors in recent logs"></span>'),aue=k('<span class="nav-dot nav-dot--warn svelte-1n46o8q" title="Warnings in recent logs"></span>'),lue=k('<span class="update-dot svelte-1n46o8q" title="Update available"></span>'),cue=k('<dt class="svelte-1n46o8q">Latest</dt><dd style="color: #f90" class="svelte-1n46o8q"> </dd>',1),due=k('<dt class="svelte-1n46o8q">Latest</dt><dd class="svelte-1n46o8q">up to date</dd>',1),uue=k('<button class="svelte-1n46o8q"><svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svelte-1n46o8q"><polyline points="4 4 4 10 10 10" class="svelte-1n46o8q"></polyline><path d="M4 10A9 9 0 1 0 6.5 5" class="svelte-1n46o8q"></path></svg> </button>'),hue=k('<div class="version-popup svelte-1n46o8q"><dl class="svelte-1n46o8q"><dt class="svelte-1n46o8q">Installed</dt><dd class="svelte-1n46o8q"></dd> <!></dl> <div class="version-actions svelte-1n46o8q"><!> <button class="check-btn svelte-1n46o8q" title="Check for updates now"><svg width="11" height="11" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><polyline points="4 4 4 10 10 10" class="svelte-1n46o8q"></polyline><path d="M4 10A9 9 0 1 0 6.5 5" class="svelte-1n46o8q"></path></svg> </button></div></div>'),fue=k('<dt class="svelte-1n46o8q">Uptime</dt><dd class="svelte-1n46o8q"> </dd>',1),pue=k('<dt class="svelte-1n46o8q">Matter nodes</dt><dd class="svelte-1n46o8q"> </dd> <dt class="svelte-1n46o8q">Matter endpoints</dt><dd class="svelte-1n46o8q"> </dd>',1),gue=k('<dt class="svelte-1n46o8q">DB docs</dt><dd class="svelte-1n46o8q"> </dd> <dt class="svelte-1n46o8q">DB views</dt><dd class="svelte-1n46o8q"> </dd>',1),vue=k('<dl class="svelte-1n46o8q"><!> <dt class="svelte-1n46o8q">Scripts</dt><dd class="svelte-1n46o8q"> </dd> <dt class="svelte-1n46o8q">MQTT topics</dt><dd class="svelte-1n46o8q"> </dd> <dt class="svelte-1n46o8q">MQTT msg/s</dt><dd class="svelte-1n46o8q"> </dd> <!> <!> <dt class="svelte-1n46o8q">Handlers</dt><dd class="svelte-1n46o8q"> </dd> <dt class="svelte-1n46o8q">Memory</dt><dd class="svelte-1n46o8q"> </dd> <dt class="svelte-1n46o8q">CPU</dt><dd class="svelte-1n46o8q"> </dd> <dt class="svelte-1n46o8q">EL util</dt><dd class="svelte-1n46o8q"> </dd> <dt class="svelte-1n46o8q">EL lag mean</dt><dd class="svelte-1n46o8q"> </dd> <dt class="svelte-1n46o8q">EL lag max</dt><dd class="svelte-1n46o8q"> </dd></dl>'),xue=k('<span class="stats-empty svelte-1n46o8q">Loading…</span>'),mue=k('<button class="svelte-1n46o8q"><svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svelte-1n46o8q"><path d="M18.36 6.64a9 9 0 1 1-12.73 0" class="svelte-1n46o8q"></path><line x1="12" y1="2" x2="12" y2="12" class="svelte-1n46o8q"></line></svg> Restart daemon</button>'),_ue=k('<div class="stats-popup svelte-1n46o8q"><!> <div class="stats-actions svelte-1n46o8q"><!></div></div>'),bue=k('<button class="nav-logout svelte-1n46o8q" title="Logout"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svelte-1n46o8q"><path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" class="svelte-1n46o8q"></path><polyline points="16 17 21 12 16 7" class="svelte-1n46o8q"></polyline><line x1="21" y1="12" x2="9" y2="12" class="svelte-1n46o8q"></line></svg></button>'),Cue=k("<div><!></div>"),yue=k('<div class="shell svelte-1n46o8q"><!> <nav class="svelte-1n46o8q"><span class="brand svelte-1n46o8q">she</span> <button><svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="svelte-1n46o8q"><polyline points="5,3 1,8 5,13" class="svelte-1n46o8q"></polyline><polyline points="11,3 15,8 11,13" class="svelte-1n46o8q"></polyline></svg> Scripts</button> <button><svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="square" stroke-linejoin="miter" class="svelte-1n46o8q"><rect x="0.75" y="0.75" width="14.5" height="14.5" rx="1" class="svelte-1n46o8q"></rect><path d="M2,11 V5 H5 V11" class="svelte-1n46o8q"></path><path d="M6,12 V5 H9 V8 H6" class="svelte-1n46o8q"></path><path d="M10,11 V5 H15 V11" class="svelte-1n46o8q"></path><line x1="12.5" y1="5" x2="12.5" y2="11" class="svelte-1n46o8q"></line></svg> Packages <!></button> <button><svg width="12" height="12" viewBox="0 0 16 16" fill="currentColor" stroke="none" style="vertical-align: middle" class="svelte-1n46o8q"><path fill-rule="evenodd" d="M2,0 H14 A2,2 0 0,1 16,2 V14 A2,2 0 0,1 14,16 H0 V2 A2,2 0 0,1 2,0 Z M0,16 L0,12 A4,4 0 0,1 4,16 Z M0,10.5 A5.5,5.5 0 0,1 5.5,16 L9,16 A9,9 0 0,0 0,7 Z M0,5.5 A10.5,10.5 0 0,1 10.5,16 L13.5,16 A13.5,13.5 0 0,0 0,2.5 Z" class="svelte-1n46o8q"></path></svg> MQTT <!></button> <!> <!> <!> <!> <button><svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="svelte-1n46o8q"><rect x="3" y="7" width="10" height="7" rx="1.5" class="svelte-1n46o8q"></rect><path d="M5.5 7V5a2.5 2.5 0 0 1 5 0v2" class="svelte-1n46o8q"></path><circle cx="8" cy="9.9" r="1.15" stroke-width="1.1" class="svelte-1n46o8q"></circle><path d="M8 11v1.2" stroke-width="1.1" class="svelte-1n46o8q"></path></svg> Secrets</button> <button><svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" class="svelte-1n46o8q"><line x1="2" y1="5" x2="14" y2="5" class="svelte-1n46o8q"></line><line x1="2" y1="8" x2="14" y2="8" class="svelte-1n46o8q"></line><line x1="2" y1="11" x2="9" y2="11" class="svelte-1n46o8q"></line></svg> Logs <!></button> <div class="nav-spacer svelte-1n46o8q"></div> <div class="nav-right svelte-1n46o8q"><a class="nav-icon svelte-1n46o8q" href="https://github.com/hobbyquaker/she" target="_blank" rel="noopener" title="GitHub"><svg width="16" height="16" viewBox="0 0 16 16" fill="currentColor" class="svelte-1n46o8q"><path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z" class="svelte-1n46o8q"></path></svg></a> <div class="version-wrap svelte-1n46o8q"><button class="version svelte-1n46o8q"> <!></button> <!></div> <div class="stats-wrap svelte-1n46o8q"><button class="nav-icon svelte-1n46o8q" title="Daemon status"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svelte-1n46o8q"><line x1="18" y1="20" x2="18" y2="10" class="svelte-1n46o8q"></line><line x1="12" y1="20" x2="12" y2="4" class="svelte-1n46o8q"></line><line x1="6" y1="20" x2="6" y2="14" class="svelte-1n46o8q"></line></svg></button> <!></div> <button title="Settings"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svelte-1n46o8q"><path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z" class="svelte-1n46o8q"></path><circle cx="12" cy="12" r="3" class="svelte-1n46o8q"></circle></svg></button> <!></div></nav> <main class="svelte-1n46o8q"><!> <div><!></div> <div><!></div> <div><!></div> <div><!></div> <div><!></div> <!> <div><!></div> <div><!></div> <div><!></div> <div><!></div></main></div>'),wue=k('<div class="login-error svelte-1n46o8q"> </div>'),Eue=k('<div class="login-overlay svelte-1n46o8q"><form class="login-box svelte-1n46o8q"><div class="login-brand svelte-1n46o8q">she</div> <h2 class="svelte-1n46o8q">Sign in</h2> <div class="login-field svelte-1n46o8q"><label for="she-password" class="svelte-1n46o8q">Password</label> <input id="she-password" type="password" placeholder="Enter password" autocomplete="current-password" class="svelte-1n46o8q"/></div> <!> <button type="submit" class="login-btn svelte-1n46o8q"> </button></form></div>'),Sue=k('<div class="updating-overlay svelte-1n46o8q"><div class="updating-box svelte-1n46o8q"><svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svelte-1n46o8q"><polyline points="4 4 4 10 10 10" class="svelte-1n46o8q"></polyline><path d="M4 10A9 9 0 1 0 6.5 5" class="svelte-1n46o8q"></path></svg> Restarting smart-home-engine…</div></div>'),kue=k('<div class="updating-overlay svelte-1n46o8q"><div class="updating-box svelte-1n46o8q"><svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svelte-1n46o8q"><polyline points="4 4 4 10 10 10" class="svelte-1n46o8q"></polyline><path d="M4 10A9 9 0 1 0 6.5 5" class="svelte-1n46o8q"></path></svg> Updating smart-home-engine…</div></div>'),Due=k("<!> <!> <!> <!>",1);function Aue(r,e){ls(e,!0);const t=["scripts","mqtt","matter","broker","adapters","secrets","db","logs","config","packages"],i={services:"adapters",security:"broker"};function n(){const Oe=location.hash.replace(/^#\/?/,""),[$t,Ht]=Oe.split("/"),zt=i[$t]??$t;return{page:t.includes(zt)?zt:"scripts",sub:Ht||null}}let s=A(Ci(n().page)),a=A(Ci(n().sub)),l=A(null),d=A(!1),u=A(!1),g=A(!1),x=A(!1),m=A("none"),C=A(""),_=A(!1),E=A(""),S=A(""),I=A(!1),M=A(!1);iG(()=>{p(_,!0)});async function O(){p(S,""),p(I,!0);try{await oG(o(E)),p(E,""),p(_,!1)}catch(Oe){p(S,Oe.message??"Login failed",!0)}finally{p(I,!1)}}async function R(){if(o(m)==="proxy"&&o(C)){window.location.href=o(C);return}await rG(),p(_,!0)}let H=A(null),G=A(!1),q=A(!1),te=A(!1),ye=A(!1),Ne=A(Ci([])),ge=A(0),Ae=A(!1),dt=A(!1),he=A("none"),We=A(""),de=A(Ci([]));const je=ct(()=>o(de).filter(Oe=>Oe.online).length),fe=ct(()=>o(de).length===0?"none":o(je)===o(de).length?"all":o(je)>0?"some":"offline");let Ft=A(!1),Te=A(!1);async function Be(){if(!await o(H).show("Restart the she daemon? The page will reload after a moment.",{confirm:"Restart"}))return;p(G,!0);let Oe;try{Oe=(await Gc()).startedAt}catch{}try{await v7()}catch{}const $t=Date.now()+6e4;for(;Date.now()<$t;){await new Promise(Ht=>setTimeout(Ht,250));try{const Ht=await Gc();if(Oe===void 0||Ht.startedAt!==Oe){location.reload();return}}catch{}}location.reload()}async function Je(){p(g,!0);try{const Oe=await pG();o(l)&&p(l,{...o(l),latestVersion:Oe.latestVersion??void 0},!0)}catch{}finally{p(g,!1)}}async function It(){var Ht,zt;if(!await o(H).show(`Update to v${(Ht=o(l))==null?void 0:Ht.latestVersion}? The daemon will restart after the update completes.`,{confirm:"Update"}))return;p(u,!1),p(x,!0);const Oe=(zt=o(l))==null?void 0:zt.startedAt;try{await fG()}catch{}const $t=Date.now()+18e4;for(;Date.now()<$t;){await new Promise(Ut=>setTimeout(Ut,1e3));try{const Ut=await Gc();if(Oe===void 0||Ut.startedAt!==Oe){location.reload();return}}catch{p(x,!1),p(G,!0)}}location.reload()}let ue=A(void 0),xe=A(0);function Fe(){if(!o(ue))return;const Oe=getComputedStyle(o(ue)),$t=parseFloat(Oe.columnGap)||0,Ht=[...o(ue).children];let zt=parseFloat(Oe.paddingLeft)+parseFloat(Oe.paddingRight)+$t*Math.max(0,Ht.length-1);for(const et of Ht)et.classList.contains("nav-spacer")||(zt+=et.getBoundingClientRect().width);const Ut=Math.ceil(zt)+8;Ut>0&&Ut!==o(xe)&&p(xe,Ut)}let Ye=null;function nt(){if(!(!o(ue)||!Ye)){Ye.disconnect(),Ye.observe(o(ue));for(const Oe of o(ue).children)Ye.observe(Oe);Fe()}}Os(()=>(Ye=new ResizeObserver(()=>Fe()),nt(),()=>{Ye==null||Ye.disconnect(),Ye=null})),cn(()=>{var Oe,$t,Ht,zt;o(Ae),o(dt),(Oe=o(l))==null||Oe.matterEnabled,($t=o(l))==null||$t.dbEnabled,(Ht=o(l))==null||Ht.latestVersion,(zt=o(l))==null||zt.docker,ga().then(()=>Ho(nt))});function yt(Oe){p(s,Oe,!0),p(a,null),location.hash=ci(Oe,null)}function ci(Oe,$t){return`#/${Oe}${$t?"/"+$t:""}`}function Rt(Oe,$t){o(s)!==Oe||o(a)===$t||(p(a,$t,!0),history.replaceState(null,"",ci(Oe,$t)))}Os(async()=>{const Oe=ci(o(s),o(a));location.hash!==Oe&&history.replaceState(null,"",Oe);const $t=()=>{const oe=n();p(s,oe.page,!0),p(a,oe.sub,!0)};window.addEventListener("hashchange",$t);const Ht=()=>{document.visibilityState==="visible"&&(aZ(),Gc().then(oe=>{p(l,oe,!0)}).catch(()=>{}),requestAnimationFrame(()=>{document.body.style.display="none",document.body.offsetHeight,document.body.style.display="",window.dispatchEvent(new Event("she:visible"))}))};document.addEventListener("visibilitychange",Ht);try{const oe=await sG();p(m,oe.mode,!0),p(C,oe.proxyLogoutUrl??"",!0),o(m)==="password"&&(await fetch("/she/scripts")).status===401&&p(_,!0)}catch{}p(M,!0);async function zt(){var oe,Ee,lt,j;try{p(l,await Gc(),!0)}catch{}try{const[Xe,Ct]=await Promise.all([_7(),yc()]);p(Ne,Array.isArray(Ct.pinnedPackages)?Ct.pinnedPackages:[],!0),p(ge,Object.keys(Xe).filter(pt=>!o(Ne).includes(pt)).length,!0);const ce=o(Ae);p(Ae,((oe=Ct.broker)==null?void 0:oe.enabled)===!0),ce&&!o(Ae)&&o(s)==="broker"&&yt("scripts");const Qe=o(dt);p(dt,((Ee=Ct.services)==null?void 0:Ee.enabled)===!0),Qe&&!o(dt)&&o(s)==="adapters"&&yt("scripts")}catch{}!((lt=o(l))!=null&<.matterEnabled)&&o(s)==="matter"&&yt("scripts"),!((j=o(l))!=null&&j.dbEnabled)&&o(s)==="db"&&yt("scripts")}zt();const Ut=setInterval(zt,5e3),et=Xo("mqtt:status",oe=>{oe.connected===!1?(p(ye,!0),p(q,!1),p(te,!1)):(p(ye,!1),p(q,oe.ready===!1),p(te,oe.ready===!0))}),rt=Xo("matter:deviceList",oe=>{Array.isArray(oe.devices)&&p(de,oe.devices.map(Ee=>({nodeId:String(Ee.nodeId),online:!!Ee.online})),!0)}),w=Xo("matter:deviceStatus",oe=>{if(oe.nodeId===void 0)return;const Ee=String(oe.nodeId),lt=!!oe.online;p(de,o(de).map(j=>j.nodeId===Ee?{...j,online:lt}:j),!0)}),V=A7();p(Ft,V.some(oe=>oe.level==="error"),!0),p(Te,!o(Ft)&&V.some(oe=>oe.level==="warn"),!0);const Y=l2(oe=>{oe.level==="error"?(p(Ft,!0),p(Te,!1)):oe.level==="warn"&&!o(Ft)&&p(Te,!0)});return()=>{window.removeEventListener("hashchange",$t),document.removeEventListener("visibilitychange",Ht),clearInterval(Ut),et(),rt(),w(),Y()}});var Ke=Due();ws("click",i3,()=>{o(d)&&p(d,!1),o(u)&&p(u,!1)});var vt=Dt(Ke);{var Ze=Oe=>{var $t=yue(),Ht=f($t);{var zt=Et=>{var kt=Kde(),di=h(f(kt),2);z("click",di,Be),y(Et,kt)};T(Ht,Et=>{var kt;(kt=o(l))!=null&&kt.safeMode&&Et(zt)})}var Ut=h(Ht,2),et=h(f(Ut),2);let rt;var w=h(et,2);let V;var Y=h(f(w),2);{var oe=Et=>{var kt=YA();P(()=>xi(kt,"title",`${o(ge)??""} package update${o(ge)===1?"":"s"} available`)),y(Et,kt)};T(Y,Et=>{o(ge)>0&&Et(oe)})}var Ee=h(w,2);let lt;var j=h(f(Ee),2);{var Xe=Et=>{var kt=Zde();y(Et,kt)},Ct=Et=>{var kt=Yde();y(Et,kt)},ce=Et=>{var kt=Xde();y(Et,kt)};T(j,Et=>{o(ye)?Et(Xe):o(q)?Et(Ct,1):o(te)&&Et(ce,2)})}var Qe=h(Ee,2);{var pt=Et=>{var kt=Qde();let di;P(()=>di=Xt(kt,1,"svelte-1n46o8q",null,di,{active:o(s)==="broker"})),z("click",kt,()=>yt("broker")),y(Et,kt)};T(Qe,Et=>{o(Ae)&&Et(pt)})}var At=h(Qe,2);{var jt=Et=>{var kt=eue();let di;var ki=h(f(kt),2);{var _i=Nt=>{var ri=YA();P(()=>xi(ri,"title",o(We))),y(Nt,ri)},Fi=Nt=>{var ri=Jde();y(Nt,ri)};T(ki,Nt=>{o(he)==="warn"?Nt(_i):Nt(Fi,-1)})}P(()=>di=Xt(kt,1,"svelte-1n46o8q",null,di,{active:o(s)==="adapters"})),z("click",kt,()=>yt("adapters")),y(Et,kt)};T(At,Et=>{o(dt)&&Et(jt)})}var we=h(At,2);{var tt=Et=>{var kt=sue();let di;var ki=h(f(kt),2);{var _i=ri=>{var bi=tue();y(ri,bi)},Fi=ri=>{var bi=iue();y(ri,bi)},Nt=ri=>{var bi=nue();y(ri,bi)};T(ki,ri=>{o(fe)==="all"?ri(_i):o(fe)==="some"?ri(Fi,1):o(fe)==="offline"&&ri(Nt,2)})}P(()=>di=Xt(kt,1,"svelte-1n46o8q",null,di,{active:o(s)==="matter"})),z("click",kt,()=>yt("matter")),y(Et,kt)};T(we,Et=>{var kt;(kt=o(l))!=null&&kt.matterEnabled&&Et(tt)})}var $=h(we,2);{var be=Et=>{var kt=oue();let di;P(()=>di=Xt(kt,1,"svelte-1n46o8q",null,di,{active:o(s)==="db"})),z("click",kt,()=>yt("db")),y(Et,kt)};T($,Et=>{var kt;(kt=o(l))!=null&&kt.dbEnabled&&Et(be)})}var Le=h($,2);let at;var St=h(Le,2);let ke;var He=h(f(St),2);{var re=Et=>{var kt=rue();y(Et,kt)},X=Et=>{var kt=aue();y(Et,kt)};T(He,Et=>{o(Ft)?Et(re):o(Te)&&Et(X,1)})}var Ve=h(St,4),Me=h(f(Ve),2),Ce=f(Me),Lt=f(Ce);Lt.nodeValue="v1.48.2 ";var ti=h(Lt);{var xt=Et=>{var kt=lue();y(Et,kt)};T(ti,Et=>{var kt,di;(kt=o(l))!=null&&kt.latestVersion&&!((di=o(l))!=null&&di.docker)&&Et(xt)})}var ve=h(Ce,2);{var it=Et=>{var kt=hue(),di=f(kt),ki=h(f(di));ki.textContent="v1.48.2";var _i=h(ki,2);{var Fi=tn=>{var Mi=cue(),An=h(Dt(Mi)),on=f(An);P(()=>B(on,`v${o(l).latestVersion??""}`)),y(tn,Mi)},Nt=tn=>{var Mi=due();y(tn,Mi)};T(_i,tn=>{var Mi;(Mi=o(l))!=null&&Mi.latestVersion?tn(Fi):tn(Nt,-1)})}var ri=h(di,2),bi=f(ri);{var Oi=tn=>{var Mi=uue(),An=h(f(Mi));P(()=>B(An,` Update to v${o(l).latestVersion??""}`)),z("click",Mi,It),y(tn,Mi)};T(bi,tn=>{var Mi;(Mi=o(l))!=null&&Mi.latestVersion&&tn(Oi)})}var wi=h(bi,2),Ji=f(wi);let en;var Cn=h(Ji);P(()=>{wi.disabled=o(g),en=Xt(Ji,0,"svelte-1n46o8q",null,en,{spinning:o(g)}),B(Cn,` ${o(g)?"Checking…":"Check for updates"}`)}),z("click",kt,tn=>tn.stopPropagation()),z("click",wi,Je),y(Et,kt)};T(ve,Et=>{var kt;o(u)&&!((kt=o(l))!=null&&kt.docker)&&Et(it)})}var Mt=h(Me,2),Jt=f(Mt),ft=h(Jt,2);{var ut=Et=>{var kt=_ue(),di=f(kt);{var ki=bi=>{var Oi=vue(),wi=f(Oi);{var Ji=ji=>{const _n=ct(()=>Math.floor((Date.now()-o(l).startedAt)/1e3)),un=ct(()=>Math.floor(o(_n)/86400)),En=ct(()=>Math.floor(o(_n)%86400/3600)),Bn=ct(()=>Math.floor(o(_n)%3600/60));var bn=fue(),dn=h(Dt(bn)),hn=f(dn);P(()=>B(hn,`${o(un)>0?o(un)+"d ":""}${o(En)>0||o(un)>0?o(En)+"h ":""}${o(Bn)??""}m`)),y(ji,bn)};T(wi,ji=>{o(l).startedAt&&ji(Ji)})}var en=h(wi,3),Cn=f(en),tn=h(en,3),Mi=f(tn),An=h(tn,3),on=f(An),sn=h(An,2);{var zn=ji=>{var _n=pue(),un=h(Dt(_n)),En=f(un),Bn=h(un,3),bn=f(Bn);P(()=>{B(En,o(l).matterNodes??0),B(bn,o(l).matterEndpoints??0)}),y(ji,_n)};T(sn,ji=>{o(l).matterEnabled&&ji(zn)})}var wn=h(sn,2);{var _s=ji=>{var _n=gue(),un=h(Dt(_n)),En=f(un),Bn=h(un,3),bn=f(Bn);P(()=>{B(En,o(l).dbDocs??"—"),B(bn,o(l).dbViews??"—")}),y(ji,_n)};T(wn,ji=>{o(l).dbEnabled&&ji(_s)})}var Gs=h(wn,3),$s=f(Gs),vi=h(Gs,3),Bi=f(vi),Ti=h(vi,3),Wi=f(Ti),rn=h(Ti,3),mi=f(rn),Ri=h(rn,3),Ni=f(Ri),Zi=h(Ri,3),$i=f(Zi);P(()=>{B(Cn,o(l).scripts),B(Mi,o(l).topics),B(on,o(l).mqttMsgPerSec??"—"),B($s,o(l).handlers??"—"),B(Bi,o(l).memMb!=null?o(l).memMb+" MB":"—"),B(Wi,o(l).cpuPercent!=null?o(l).cpuPercent+" %":"—"),B(mi,o(l).eluPercent!=null?o(l).eluPercent+" %":"—"),B(Ni,o(l).elMeanMs!=null?o(l).elMeanMs+" ms":"—"),B($i,o(l).elMaxMs!=null?o(l).elMaxMs+" ms":"—")}),y(bi,Oi)},_i=bi=>{var Oi=xue();y(bi,Oi)};T(di,bi=>{o(l)?bi(ki):bi(_i,-1)})}var Fi=h(di,2),Nt=f(Fi);{var ri=bi=>{var Oi=mue();z("click",Oi,()=>{p(d,!1),Be()}),y(bi,Oi)};T(Nt,bi=>{var Oi;(Oi=o(l))!=null&&Oi.docker||bi(ri)})}z("click",kt,bi=>bi.stopPropagation()),y(Et,kt)};T(ft,Et=>{o(d)&&Et(ut)})}var Bt=h(Mt,2);let ei;var J=h(Bt,2);{var Re=Et=>{var kt=bue();z("click",kt,R),y(Et,kt)};T(J,Et=>{o(m)==="password"&&Et(Re)})}ts(Ut,Et=>p(ue,Et),()=>o(ue));var ne=h(Ut,2),se=f(ne);ts(kr(se,{}),Et=>p(H,Et,!0),()=>o(H));var De=h(se,2);let pe;var gt=f(De);{let Et=ct(()=>o(s)==="scripts");wQ(gt,{get active(){return o(Et)}})}var U=h(De,2);let ot;var W=f(U);Qie(W,{});var Q=h(U,2);let ae;var me=f(Q);{let Et=ct(()=>o(s)==="mqtt"),kt=ct(()=>o(s)==="mqtt"?o(a):null);Pie(me,{get active(){return o(Et)},get sub(){return o(kt)},onsub:di=>Rt("mqtt",di)})}var Ie=h(Q,2);let st;var mt=f(Ie);Dte(mt,{});var Ot=h(Ie,2);let Kt;var Wt=f(Ot);{let Et=ct(()=>o(s)==="broker"),kt=ct(()=>o(s)==="broker"?o(a):null);Foe(Wt,{get active(){return o(Et)},get sub(){return o(kt)},onsub:di=>Rt("broker",di)})}var qt=h(Ot,2);{var Yt=Et=>{var kt=Cue();let di;var ki=f(kt);{let _i=ct(()=>o(s)==="adapters"),Fi=ct(()=>o(s)==="adapters"?o(a):null);Sde(ki,{onstatus:(Nt,ri)=>{p(he,Nt,!0),p(We,ri,!0)},get active(){return o(_i)},get sub(){return o(Fi)},onsub:Nt=>Rt("adapters",Nt)})}P(()=>di=Xt(kt,1,"page-wrap svelte-1n46o8q",null,di,{hidden:o(s)!=="adapters"})),y(Et,kt)};T(qt,Et=>{o(dt)&&Et(Yt)})}var ni=h(qt,2);let Ai;var Pe=f(ni);{let Et=ct(()=>o(s)==="secrets");Gde(Pe,{get active(){return o(Et)}})}var $e=h(ni,2);let Gt;var ai=f($e);{let Et=ct(()=>o(s)==="db"),kt=ct(()=>o(s)==="db"?o(a):null);Aee(ai,{get active(){return o(Et)},get sub(){return o(kt)},onsub:di=>Rt("db",di)})}var _e=h($e,2);let Vt;var _t=f(_e);vJ(_t,{});var bt=h(_e,2);let Pt;var hi=f(bt);yJ(hi,{}),P(()=>{Do($t,o(xe)?`min-width: ${o(xe)}px`:void 0),rt=Xt(et,1,"svelte-1n46o8q",null,rt,{active:o(s)==="scripts"}),V=Xt(w,1,"svelte-1n46o8q",null,V,{active:o(s)==="packages"}),lt=Xt(Ee,1,"svelte-1n46o8q",null,lt,{active:o(s)==="mqtt"}),at=Xt(Le,1,"svelte-1n46o8q",null,at,{active:o(s)==="secrets"}),ke=Xt(St,1,"svelte-1n46o8q",null,ke,{active:o(s)==="logs"}),ei=Xt(Bt,1,"nav-settings svelte-1n46o8q",null,ei,{active:o(s)==="config"}),pe=Xt(De,1,"page-wrap svelte-1n46o8q",null,pe,{hidden:o(s)!=="scripts"}),ot=Xt(U,1,"page-wrap svelte-1n46o8q",null,ot,{hidden:o(s)!=="packages"}),ae=Xt(Q,1,"page-wrap svelte-1n46o8q",null,ae,{hidden:o(s)!=="mqtt"}),st=Xt(Ie,1,"page-wrap svelte-1n46o8q",null,st,{hidden:o(s)!=="matter"}),Kt=Xt(Ot,1,"page-wrap svelte-1n46o8q",null,Kt,{hidden:o(s)!=="broker"}),Ai=Xt(ni,1,"page-wrap svelte-1n46o8q",null,Ai,{hidden:o(s)!=="secrets"}),Gt=Xt($e,1,"page-wrap svelte-1n46o8q",null,Gt,{hidden:o(s)!=="db"}),Vt=Xt(_e,1,"page-wrap svelte-1n46o8q",null,Vt,{hidden:o(s)!=="config"}),Pt=Xt(bt,1,"page-wrap svelte-1n46o8q",null,Pt,{hidden:o(s)!=="logs"})}),z("click",et,()=>yt("scripts")),z("click",w,()=>yt("packages")),z("click",Ee,()=>yt("mqtt")),z("click",Le,()=>yt("secrets")),z("click",St,()=>{yt("logs"),p(Ft,!1),p(Te,!1)}),z("click",Ce,Et=>{Et.stopPropagation(),p(u,!o(u)),p(d,!1)}),z("click",Jt,Et=>{Et.stopPropagation(),p(d,!o(d)),p(u,!1)}),z("click",Bt,()=>yt("config")),y(Oe,$t)};T(vt,Oe=>{o(M)&&!o(_)&&Oe(Ze)})}var ee=h(vt,2);{var ht=Oe=>{var $t=Eue(),Ht=f($t),zt=h(f(Ht),4),Ut=h(f(zt),2),et=h(zt,2);{var rt=Y=>{var oe=wue(),Ee=f(oe);P(()=>B(Ee,o(S))),y(Y,oe)};T(et,Y=>{o(S)&&Y(rt)})}var w=h(et,2),V=f(w);P(()=>{Ut.disabled=o(I),w.disabled=o(I)||!o(E),B(V,o(I)?"Signing in…":"Sign in")}),ws("submit",Ht,Y=>{Y.preventDefault(),O()}),ui(Ut,()=>o(E),Y=>p(E,Y)),y(Oe,$t)};T(ee,Oe=>{o(_)&&Oe(ht)})}var qe=h(ee,2);{var Ue=Oe=>{var $t=Sue();y(Oe,$t)};T(qe,Oe=>{o(G)&&Oe(Ue)})}var Z=h(qe,2);{var Se=Oe=>{var $t=kue();y(Oe,$t)};T(Z,Oe=>{o(x)&&Oe(Se)})}y(r,Ke),cs()}ms(["click"]);_M(Aue,{target:document.getElementById("app")});export{R3 as t};
|
|
295
|
+
`)||o(C)||!o(x)),pt=Le=>{var at=jde();P(()=>at.disabled=o(M)),ui(at,()=>o(g),St=>p(g,St)),y(Le,at)};T(Ct,Le=>{o(Qe)?Le(ce):Le(pt,-1)})}var At=h(Ct,2),jt=h(Ut,2),we=f(jt),tt=f(we),$=h(we,2),be=f($);P((Le,at)=>{B(Z,o(I).name),B(Oe,`changed ${Le??""}`),zt.disabled=o(l)||o(M),Y.disabled=o(M),j=Xt(lt,1,"lock svelte-1az45ix",null,j,{"is-secret":o(x)}),lt.disabled=o(M),xi(lt,"title",o(x)?"secret — write-only once saved (click for a plain field, e.g. a user name)":"plain — shown in clear (click for a secret)"),At.disabled=at,B(tt,`she.secrets.get('${o(I).name??""}/<field>')`),B(be,`she.secrets.get('${o(I).name??""}')`)},[()=>Ne(o(I).changed),()=>o(l)||o(M)||!o(u).trim()||!o(g)]),Ss(Ht,()=>o(C),Le=>p(C,Le)),z("click",zt,()=>ye(o(I).name)),ui(Y,()=>o(u),Le=>p(u,Le)),ws("submit",Ee,Le=>{Le.preventDefault(),S.test(o(u).trim())?H(o(I).name,o(u).trim(),o(g),o(x)):p(s,"field name: letters, digits, _ . - (max 64)")}),z("click",lt,()=>p(x,!o(x))),y(ee,ht)},Ze=ee=>{var ht=qde(),qe=f(ht);{var Ue=Se=>{var Oe=$de();y(Se,Oe)},Z=Se=>{var Oe=kn("Select a group.");y(Se,Oe)};T(qe,Se=>{o(i).groups.length===0?Se(Ue):Se(Z,-1)})}y(ee,ht)};T(Ke,ee=>{o(I)?ee(vt):o(i)&&!o(M)&&ee(Ze,1)})}P(ee=>{yt.disabled=o(M),ci.disabled=ee},[()=>o(M)||!o(d).trim()]),z("click",Ft,O),ws("submit",nt,ee=>{ee.preventDefault(),G()}),ui(yt,()=>o(d),ee=>p(d,ee)),y(r,ge),cs()}ms(["click","input"]);var Kde=k('<div class="safe-banner svelte-1n46o8q"><strong class="svelte-1n46o8q">⚠ SAFE MODE</strong> — no user script is running and the script directory is not watched. She was killed instead of stopped last time, which usually means a script blocked the event loop. Edit or delete it, then restart. <button class="safe-restart svelte-1n46o8q">Restart daemon</button></div>'),YA=k('<span class="nav-dot nav-dot--warn svelte-1n46o8q"></span>'),Zde=k('<span class="nav-dot nav-dot--err svelte-1n46o8q" title="MQTT broker not connected"></span>'),Yde=k('<span class="nav-dot nav-dot--warn nav-dot--blink svelte-1n46o8q" title="Waiting for retained MQTT state"></span>'),Xde=k('<span class="nav-dot nav-dot--ok svelte-1n46o8q" title="MQTT connected"></span>'),Qde=k('<button><svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" class="svelte-1n46o8q"><path d="M8.36,5.73 A2.6,2.6 0 0,1 9.38,10.50" class="svelte-1n46o8q"></path><path d="M7.64,5.73 A2.6,2.6 0 0,0 6.62,10.50" class="svelte-1n46o8q"></path><path d="M9.16,3.95 A4.5,4.5 0 0,1 10.38,12.12" class="svelte-1n46o8q"></path><path d="M6.84,3.95 A4.5,4.5 0 0,0 5.62,12.12" class="svelte-1n46o8q"></path><path d="M10.40,2.37 A6.4,6.4 0 0,1 11.39,13.73" class="svelte-1n46o8q"></path><path d="M5.60,2.37 A6.4,6.4 0 0,0 4.61,13.73" class="svelte-1n46o8q"></path><path d="M7.15,8.3 L8,15.4 L8.85,8.3 Z" fill="currentColor" stroke="none" class="svelte-1n46o8q"></path><circle cx="8" cy="8.3" r="1.45" fill="currentColor" stroke="none" class="svelte-1n46o8q"></circle></svg> Broker</button>'),Jde=k('<span class="nav-dot nav-dot--none svelte-1n46o8q"></span>'),eue=k('<button><svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="svelte-1n46o8q"><rect x="2" y="2" width="12" height="4" rx="1" class="svelte-1n46o8q"></rect><rect x="2" y="10" width="12" height="4" rx="1" class="svelte-1n46o8q"></rect><circle cx="4.5" cy="4" r="0.6" fill="currentColor" class="svelte-1n46o8q"></circle><circle cx="4.5" cy="12" r="0.6" fill="currentColor" class="svelte-1n46o8q"></circle></svg> Adapters <!></button>'),tue=k('<span class="nav-dot nav-dot--ok svelte-1n46o8q" title="All Matter devices online"></span>'),iue=k('<span class="nav-dot nav-dot--warn svelte-1n46o8q" title="Some Matter devices offline"></span>'),nue=k('<span class="nav-dot nav-dot--err svelte-1n46o8q" title="No Matter devices online"></span>'),sue=k('<button><svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round" class="svelte-1n46o8q"><path d="M8,2 L8,7" class="svelte-1n46o8q"></path><path d="M6,5 L8,7.5 L10,5" class="svelte-1n46o8q"></path><path d="M2.5,14 L6,10" class="svelte-1n46o8q"></path><path d="M6.2,12.8 L6,10 L3.2,10.2" class="svelte-1n46o8q"></path><path d="M13.5,14 L10,10" class="svelte-1n46o8q"></path><path d="M9.8,12.8 L10,10 L12.8,10.2" class="svelte-1n46o8q"></path></svg> Matter <!></button>'),oue=k('<button><svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="svelte-1n46o8q"><ellipse cx="8" cy="4.5" rx="5" ry="1.8" class="svelte-1n46o8q"></ellipse><path d="M3,4.5 v7 a5,1.8 0,0,0 10,0 v-7" class="svelte-1n46o8q"></path><path d="M3,8 a5,1.8 0,0,0 10,0" class="svelte-1n46o8q"></path></svg> DB</button>'),rue=k('<span class="nav-dot nav-dot--err svelte-1n46o8q" title="Errors in recent logs"></span>'),aue=k('<span class="nav-dot nav-dot--warn svelte-1n46o8q" title="Warnings in recent logs"></span>'),lue=k('<span class="update-dot svelte-1n46o8q" title="Update available"></span>'),cue=k('<dt class="svelte-1n46o8q">Latest</dt><dd style="color: #f90" class="svelte-1n46o8q"> </dd>',1),due=k('<dt class="svelte-1n46o8q">Latest</dt><dd class="svelte-1n46o8q">up to date</dd>',1),uue=k('<button class="svelte-1n46o8q"><svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svelte-1n46o8q"><polyline points="4 4 4 10 10 10" class="svelte-1n46o8q"></polyline><path d="M4 10A9 9 0 1 0 6.5 5" class="svelte-1n46o8q"></path></svg> </button>'),hue=k('<div class="version-popup svelte-1n46o8q"><dl class="svelte-1n46o8q"><dt class="svelte-1n46o8q">Installed</dt><dd class="svelte-1n46o8q"></dd> <!></dl> <div class="version-actions svelte-1n46o8q"><!> <button class="check-btn svelte-1n46o8q" title="Check for updates now"><svg width="11" height="11" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><polyline points="4 4 4 10 10 10" class="svelte-1n46o8q"></polyline><path d="M4 10A9 9 0 1 0 6.5 5" class="svelte-1n46o8q"></path></svg> </button></div></div>'),fue=k('<dt class="svelte-1n46o8q">Uptime</dt><dd class="svelte-1n46o8q"> </dd>',1),pue=k('<dt class="svelte-1n46o8q">Matter nodes</dt><dd class="svelte-1n46o8q"> </dd> <dt class="svelte-1n46o8q">Matter endpoints</dt><dd class="svelte-1n46o8q"> </dd>',1),gue=k('<dt class="svelte-1n46o8q">DB docs</dt><dd class="svelte-1n46o8q"> </dd> <dt class="svelte-1n46o8q">DB views</dt><dd class="svelte-1n46o8q"> </dd>',1),vue=k('<dl class="svelte-1n46o8q"><!> <dt class="svelte-1n46o8q">Scripts</dt><dd class="svelte-1n46o8q"> </dd> <dt class="svelte-1n46o8q">MQTT topics</dt><dd class="svelte-1n46o8q"> </dd> <dt class="svelte-1n46o8q">MQTT msg/s</dt><dd class="svelte-1n46o8q"> </dd> <!> <!> <dt class="svelte-1n46o8q">Handlers</dt><dd class="svelte-1n46o8q"> </dd> <dt class="svelte-1n46o8q">Memory</dt><dd class="svelte-1n46o8q"> </dd> <dt class="svelte-1n46o8q">CPU</dt><dd class="svelte-1n46o8q"> </dd> <dt class="svelte-1n46o8q">EL util</dt><dd class="svelte-1n46o8q"> </dd> <dt class="svelte-1n46o8q">EL lag mean</dt><dd class="svelte-1n46o8q"> </dd> <dt class="svelte-1n46o8q">EL lag max</dt><dd class="svelte-1n46o8q"> </dd></dl>'),xue=k('<span class="stats-empty svelte-1n46o8q">Loading…</span>'),mue=k('<button class="svelte-1n46o8q"><svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svelte-1n46o8q"><path d="M18.36 6.64a9 9 0 1 1-12.73 0" class="svelte-1n46o8q"></path><line x1="12" y1="2" x2="12" y2="12" class="svelte-1n46o8q"></line></svg> Restart daemon</button>'),_ue=k('<div class="stats-popup svelte-1n46o8q"><!> <div class="stats-actions svelte-1n46o8q"><!></div></div>'),bue=k('<button class="nav-logout svelte-1n46o8q" title="Logout"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svelte-1n46o8q"><path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" class="svelte-1n46o8q"></path><polyline points="16 17 21 12 16 7" class="svelte-1n46o8q"></polyline><line x1="21" y1="12" x2="9" y2="12" class="svelte-1n46o8q"></line></svg></button>'),Cue=k("<div><!></div>"),yue=k('<div class="shell svelte-1n46o8q"><!> <nav class="svelte-1n46o8q"><span class="brand svelte-1n46o8q">she</span> <button><svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="svelte-1n46o8q"><polyline points="5,3 1,8 5,13" class="svelte-1n46o8q"></polyline><polyline points="11,3 15,8 11,13" class="svelte-1n46o8q"></polyline></svg> Scripts</button> <button><svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="square" stroke-linejoin="miter" class="svelte-1n46o8q"><rect x="0.75" y="0.75" width="14.5" height="14.5" rx="1" class="svelte-1n46o8q"></rect><path d="M2,11 V5 H5 V11" class="svelte-1n46o8q"></path><path d="M6,12 V5 H9 V8 H6" class="svelte-1n46o8q"></path><path d="M10,11 V5 H15 V11" class="svelte-1n46o8q"></path><line x1="12.5" y1="5" x2="12.5" y2="11" class="svelte-1n46o8q"></line></svg> Packages <!></button> <button><svg width="12" height="12" viewBox="0 0 16 16" fill="currentColor" stroke="none" style="vertical-align: middle" class="svelte-1n46o8q"><path fill-rule="evenodd" d="M2,0 H14 A2,2 0 0,1 16,2 V14 A2,2 0 0,1 14,16 H0 V2 A2,2 0 0,1 2,0 Z M0,16 L0,12 A4,4 0 0,1 4,16 Z M0,10.5 A5.5,5.5 0 0,1 5.5,16 L9,16 A9,9 0 0,0 0,7 Z M0,5.5 A10.5,10.5 0 0,1 10.5,16 L13.5,16 A13.5,13.5 0 0,0 0,2.5 Z" class="svelte-1n46o8q"></path></svg> MQTT <!></button> <!> <!> <!> <!> <button><svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="svelte-1n46o8q"><rect x="3" y="7" width="10" height="7" rx="1.5" class="svelte-1n46o8q"></rect><path d="M5.5 7V5a2.5 2.5 0 0 1 5 0v2" class="svelte-1n46o8q"></path><circle cx="8" cy="9.9" r="1.15" stroke-width="1.1" class="svelte-1n46o8q"></circle><path d="M8 11v1.2" stroke-width="1.1" class="svelte-1n46o8q"></path></svg> Secrets</button> <button><svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" class="svelte-1n46o8q"><line x1="2" y1="5" x2="14" y2="5" class="svelte-1n46o8q"></line><line x1="2" y1="8" x2="14" y2="8" class="svelte-1n46o8q"></line><line x1="2" y1="11" x2="9" y2="11" class="svelte-1n46o8q"></line></svg> Logs <!></button> <div class="nav-spacer svelte-1n46o8q"></div> <div class="nav-right svelte-1n46o8q"><a class="nav-icon svelte-1n46o8q" href="https://github.com/hobbyquaker/she" target="_blank" rel="noopener" title="GitHub"><svg width="16" height="16" viewBox="0 0 16 16" fill="currentColor" class="svelte-1n46o8q"><path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z" class="svelte-1n46o8q"></path></svg></a> <div class="version-wrap svelte-1n46o8q"><button class="version svelte-1n46o8q"> <!></button> <!></div> <div class="stats-wrap svelte-1n46o8q"><button class="nav-icon svelte-1n46o8q" title="Daemon status"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svelte-1n46o8q"><line x1="18" y1="20" x2="18" y2="10" class="svelte-1n46o8q"></line><line x1="12" y1="20" x2="12" y2="4" class="svelte-1n46o8q"></line><line x1="6" y1="20" x2="6" y2="14" class="svelte-1n46o8q"></line></svg></button> <!></div> <button title="Settings"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svelte-1n46o8q"><path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z" class="svelte-1n46o8q"></path><circle cx="12" cy="12" r="3" class="svelte-1n46o8q"></circle></svg></button> <!></div></nav> <main class="svelte-1n46o8q"><!> <div><!></div> <div><!></div> <div><!></div> <div><!></div> <div><!></div> <!> <div><!></div> <div><!></div> <div><!></div> <div><!></div></main></div>'),wue=k('<div class="login-error svelte-1n46o8q"> </div>'),Eue=k('<div class="login-overlay svelte-1n46o8q"><form class="login-box svelte-1n46o8q"><div class="login-brand svelte-1n46o8q">she</div> <h2 class="svelte-1n46o8q">Sign in</h2> <div class="login-field svelte-1n46o8q"><label for="she-password" class="svelte-1n46o8q">Password</label> <input id="she-password" type="password" placeholder="Enter password" autocomplete="current-password" class="svelte-1n46o8q"/></div> <!> <button type="submit" class="login-btn svelte-1n46o8q"> </button></form></div>'),Sue=k('<div class="updating-overlay svelte-1n46o8q"><div class="updating-box svelte-1n46o8q"><svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svelte-1n46o8q"><polyline points="4 4 4 10 10 10" class="svelte-1n46o8q"></polyline><path d="M4 10A9 9 0 1 0 6.5 5" class="svelte-1n46o8q"></path></svg> Restarting smart-home-engine…</div></div>'),kue=k('<div class="updating-overlay svelte-1n46o8q"><div class="updating-box svelte-1n46o8q"><svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svelte-1n46o8q"><polyline points="4 4 4 10 10 10" class="svelte-1n46o8q"></polyline><path d="M4 10A9 9 0 1 0 6.5 5" class="svelte-1n46o8q"></path></svg> Updating smart-home-engine…</div></div>'),Due=k("<!> <!> <!> <!>",1);function Aue(r,e){ls(e,!0);const t=["scripts","mqtt","matter","broker","adapters","secrets","db","logs","config","packages"],i={services:"adapters",security:"broker"};function n(){const Oe=location.hash.replace(/^#\/?/,""),[$t,Ht]=Oe.split("/"),zt=i[$t]??$t;return{page:t.includes(zt)?zt:"scripts",sub:Ht||null}}let s=A(Ci(n().page)),a=A(Ci(n().sub)),l=A(null),d=A(!1),u=A(!1),g=A(!1),x=A(!1),m=A("none"),C=A(""),_=A(!1),E=A(""),S=A(""),I=A(!1),M=A(!1);iG(()=>{p(_,!0)});async function O(){p(S,""),p(I,!0);try{await oG(o(E)),p(E,""),p(_,!1)}catch(Oe){p(S,Oe.message??"Login failed",!0)}finally{p(I,!1)}}async function R(){if(o(m)==="proxy"&&o(C)){window.location.href=o(C);return}await rG(),p(_,!0)}let H=A(null),G=A(!1),q=A(!1),te=A(!1),ye=A(!1),Ne=A(Ci([])),ge=A(0),Ae=A(!1),dt=A(!1),he=A("none"),We=A(""),de=A(Ci([]));const je=ct(()=>o(de).filter(Oe=>Oe.online).length),fe=ct(()=>o(de).length===0?"none":o(je)===o(de).length?"all":o(je)>0?"some":"offline");let Ft=A(!1),Te=A(!1);async function Be(){if(!await o(H).show("Restart the she daemon? The page will reload after a moment.",{confirm:"Restart"}))return;p(G,!0);let Oe;try{Oe=(await Gc()).startedAt}catch{}try{await v7()}catch{}const $t=Date.now()+6e4;for(;Date.now()<$t;){await new Promise(Ht=>setTimeout(Ht,250));try{const Ht=await Gc();if(Oe===void 0||Ht.startedAt!==Oe){location.reload();return}}catch{}}location.reload()}async function Je(){p(g,!0);try{const Oe=await pG();o(l)&&p(l,{...o(l),latestVersion:Oe.latestVersion??void 0},!0)}catch{}finally{p(g,!1)}}async function It(){var Ht,zt;if(!await o(H).show(`Update to v${(Ht=o(l))==null?void 0:Ht.latestVersion}? The daemon will restart after the update completes.`,{confirm:"Update"}))return;p(u,!1),p(x,!0);const Oe=(zt=o(l))==null?void 0:zt.startedAt;try{await fG()}catch{}const $t=Date.now()+18e4;for(;Date.now()<$t;){await new Promise(Ut=>setTimeout(Ut,1e3));try{const Ut=await Gc();if(Oe===void 0||Ut.startedAt!==Oe){location.reload();return}}catch{p(x,!1),p(G,!0)}}location.reload()}let ue=A(void 0),xe=A(0);function Fe(){if(!o(ue))return;const Oe=getComputedStyle(o(ue)),$t=parseFloat(Oe.columnGap)||0,Ht=[...o(ue).children];let zt=parseFloat(Oe.paddingLeft)+parseFloat(Oe.paddingRight)+$t*Math.max(0,Ht.length-1);for(const et of Ht)et.classList.contains("nav-spacer")||(zt+=et.getBoundingClientRect().width);const Ut=Math.ceil(zt)+8;Ut>0&&Ut!==o(xe)&&p(xe,Ut)}let Ye=null;function nt(){if(!(!o(ue)||!Ye)){Ye.disconnect(),Ye.observe(o(ue));for(const Oe of o(ue).children)Ye.observe(Oe);Fe()}}Os(()=>(Ye=new ResizeObserver(()=>Fe()),nt(),()=>{Ye==null||Ye.disconnect(),Ye=null})),cn(()=>{var Oe,$t,Ht,zt;o(Ae),o(dt),(Oe=o(l))==null||Oe.matterEnabled,($t=o(l))==null||$t.dbEnabled,(Ht=o(l))==null||Ht.latestVersion,(zt=o(l))==null||zt.docker,ga().then(()=>Ho(nt))});function yt(Oe){p(s,Oe,!0),p(a,null),location.hash=ci(Oe,null)}function ci(Oe,$t){return`#/${Oe}${$t?"/"+$t:""}`}function Rt(Oe,$t){o(s)!==Oe||o(a)===$t||(p(a,$t,!0),history.replaceState(null,"",ci(Oe,$t)))}Os(async()=>{const Oe=ci(o(s),o(a));location.hash!==Oe&&history.replaceState(null,"",Oe);const $t=()=>{const oe=n();p(s,oe.page,!0),p(a,oe.sub,!0)};window.addEventListener("hashchange",$t);const Ht=()=>{document.visibilityState==="visible"&&(aZ(),Gc().then(oe=>{p(l,oe,!0)}).catch(()=>{}),requestAnimationFrame(()=>{document.body.style.display="none",document.body.offsetHeight,document.body.style.display="",window.dispatchEvent(new Event("she:visible"))}))};document.addEventListener("visibilitychange",Ht);try{const oe=await sG();p(m,oe.mode,!0),p(C,oe.proxyLogoutUrl??"",!0),o(m)==="password"&&(await fetch("/she/scripts")).status===401&&p(_,!0)}catch{}p(M,!0);async function zt(){var oe,Ee,lt,j;try{p(l,await Gc(),!0)}catch{}try{const[Xe,Ct]=await Promise.all([_7(),yc()]);p(Ne,Array.isArray(Ct.pinnedPackages)?Ct.pinnedPackages:[],!0),p(ge,Object.keys(Xe).filter(pt=>!o(Ne).includes(pt)).length,!0);const ce=o(Ae);p(Ae,((oe=Ct.broker)==null?void 0:oe.enabled)===!0),ce&&!o(Ae)&&o(s)==="broker"&&yt("scripts");const Qe=o(dt);p(dt,((Ee=Ct.services)==null?void 0:Ee.enabled)===!0),Qe&&!o(dt)&&o(s)==="adapters"&&yt("scripts")}catch{}!((lt=o(l))!=null&<.matterEnabled)&&o(s)==="matter"&&yt("scripts"),!((j=o(l))!=null&&j.dbEnabled)&&o(s)==="db"&&yt("scripts")}zt();const Ut=setInterval(zt,5e3),et=Xo("mqtt:status",oe=>{oe.connected===!1?(p(ye,!0),p(q,!1),p(te,!1)):(p(ye,!1),p(q,oe.ready===!1),p(te,oe.ready===!0))}),rt=Xo("matter:deviceList",oe=>{Array.isArray(oe.devices)&&p(de,oe.devices.map(Ee=>({nodeId:String(Ee.nodeId),online:!!Ee.online})),!0)}),w=Xo("matter:deviceStatus",oe=>{if(oe.nodeId===void 0)return;const Ee=String(oe.nodeId),lt=!!oe.online;p(de,o(de).map(j=>j.nodeId===Ee?{...j,online:lt}:j),!0)}),V=A7();p(Ft,V.some(oe=>oe.level==="error"),!0),p(Te,!o(Ft)&&V.some(oe=>oe.level==="warn"),!0);const Y=l2(oe=>{oe.level==="error"?(p(Ft,!0),p(Te,!1)):oe.level==="warn"&&!o(Ft)&&p(Te,!0)});return()=>{window.removeEventListener("hashchange",$t),document.removeEventListener("visibilitychange",Ht),clearInterval(Ut),et(),rt(),w(),Y()}});var Ke=Due();ws("click",i3,()=>{o(d)&&p(d,!1),o(u)&&p(u,!1)});var vt=Dt(Ke);{var Ze=Oe=>{var $t=yue(),Ht=f($t);{var zt=Et=>{var kt=Kde(),di=h(f(kt),2);z("click",di,Be),y(Et,kt)};T(Ht,Et=>{var kt;(kt=o(l))!=null&&kt.safeMode&&Et(zt)})}var Ut=h(Ht,2),et=h(f(Ut),2);let rt;var w=h(et,2);let V;var Y=h(f(w),2);{var oe=Et=>{var kt=YA();P(()=>xi(kt,"title",`${o(ge)??""} package update${o(ge)===1?"":"s"} available`)),y(Et,kt)};T(Y,Et=>{o(ge)>0&&Et(oe)})}var Ee=h(w,2);let lt;var j=h(f(Ee),2);{var Xe=Et=>{var kt=Zde();y(Et,kt)},Ct=Et=>{var kt=Yde();y(Et,kt)},ce=Et=>{var kt=Xde();y(Et,kt)};T(j,Et=>{o(ye)?Et(Xe):o(q)?Et(Ct,1):o(te)&&Et(ce,2)})}var Qe=h(Ee,2);{var pt=Et=>{var kt=Qde();let di;P(()=>di=Xt(kt,1,"svelte-1n46o8q",null,di,{active:o(s)==="broker"})),z("click",kt,()=>yt("broker")),y(Et,kt)};T(Qe,Et=>{o(Ae)&&Et(pt)})}var At=h(Qe,2);{var jt=Et=>{var kt=eue();let di;var ki=h(f(kt),2);{var _i=Nt=>{var ri=YA();P(()=>xi(ri,"title",o(We))),y(Nt,ri)},Fi=Nt=>{var ri=Jde();y(Nt,ri)};T(ki,Nt=>{o(he)==="warn"?Nt(_i):Nt(Fi,-1)})}P(()=>di=Xt(kt,1,"svelte-1n46o8q",null,di,{active:o(s)==="adapters"})),z("click",kt,()=>yt("adapters")),y(Et,kt)};T(At,Et=>{o(dt)&&Et(jt)})}var we=h(At,2);{var tt=Et=>{var kt=sue();let di;var ki=h(f(kt),2);{var _i=ri=>{var bi=tue();y(ri,bi)},Fi=ri=>{var bi=iue();y(ri,bi)},Nt=ri=>{var bi=nue();y(ri,bi)};T(ki,ri=>{o(fe)==="all"?ri(_i):o(fe)==="some"?ri(Fi,1):o(fe)==="offline"&&ri(Nt,2)})}P(()=>di=Xt(kt,1,"svelte-1n46o8q",null,di,{active:o(s)==="matter"})),z("click",kt,()=>yt("matter")),y(Et,kt)};T(we,Et=>{var kt;(kt=o(l))!=null&&kt.matterEnabled&&Et(tt)})}var $=h(we,2);{var be=Et=>{var kt=oue();let di;P(()=>di=Xt(kt,1,"svelte-1n46o8q",null,di,{active:o(s)==="db"})),z("click",kt,()=>yt("db")),y(Et,kt)};T($,Et=>{var kt;(kt=o(l))!=null&&kt.dbEnabled&&Et(be)})}var Le=h($,2);let at;var St=h(Le,2);let ke;var He=h(f(St),2);{var re=Et=>{var kt=rue();y(Et,kt)},X=Et=>{var kt=aue();y(Et,kt)};T(He,Et=>{o(Ft)?Et(re):o(Te)&&Et(X,1)})}var Ve=h(St,4),Me=h(f(Ve),2),Ce=f(Me),Lt=f(Ce);Lt.nodeValue="v1.48.3 ";var ti=h(Lt);{var xt=Et=>{var kt=lue();y(Et,kt)};T(ti,Et=>{var kt,di;(kt=o(l))!=null&&kt.latestVersion&&!((di=o(l))!=null&&di.docker)&&Et(xt)})}var ve=h(Ce,2);{var it=Et=>{var kt=hue(),di=f(kt),ki=h(f(di));ki.textContent="v1.48.3";var _i=h(ki,2);{var Fi=tn=>{var Mi=cue(),An=h(Dt(Mi)),on=f(An);P(()=>B(on,`v${o(l).latestVersion??""}`)),y(tn,Mi)},Nt=tn=>{var Mi=due();y(tn,Mi)};T(_i,tn=>{var Mi;(Mi=o(l))!=null&&Mi.latestVersion?tn(Fi):tn(Nt,-1)})}var ri=h(di,2),bi=f(ri);{var Oi=tn=>{var Mi=uue(),An=h(f(Mi));P(()=>B(An,` Update to v${o(l).latestVersion??""}`)),z("click",Mi,It),y(tn,Mi)};T(bi,tn=>{var Mi;(Mi=o(l))!=null&&Mi.latestVersion&&tn(Oi)})}var wi=h(bi,2),Ji=f(wi);let en;var Cn=h(Ji);P(()=>{wi.disabled=o(g),en=Xt(Ji,0,"svelte-1n46o8q",null,en,{spinning:o(g)}),B(Cn,` ${o(g)?"Checking…":"Check for updates"}`)}),z("click",kt,tn=>tn.stopPropagation()),z("click",wi,Je),y(Et,kt)};T(ve,Et=>{var kt;o(u)&&!((kt=o(l))!=null&&kt.docker)&&Et(it)})}var Mt=h(Me,2),Jt=f(Mt),ft=h(Jt,2);{var ut=Et=>{var kt=_ue(),di=f(kt);{var ki=bi=>{var Oi=vue(),wi=f(Oi);{var Ji=ji=>{const _n=ct(()=>Math.floor((Date.now()-o(l).startedAt)/1e3)),un=ct(()=>Math.floor(o(_n)/86400)),En=ct(()=>Math.floor(o(_n)%86400/3600)),Bn=ct(()=>Math.floor(o(_n)%3600/60));var bn=fue(),dn=h(Dt(bn)),hn=f(dn);P(()=>B(hn,`${o(un)>0?o(un)+"d ":""}${o(En)>0||o(un)>0?o(En)+"h ":""}${o(Bn)??""}m`)),y(ji,bn)};T(wi,ji=>{o(l).startedAt&&ji(Ji)})}var en=h(wi,3),Cn=f(en),tn=h(en,3),Mi=f(tn),An=h(tn,3),on=f(An),sn=h(An,2);{var zn=ji=>{var _n=pue(),un=h(Dt(_n)),En=f(un),Bn=h(un,3),bn=f(Bn);P(()=>{B(En,o(l).matterNodes??0),B(bn,o(l).matterEndpoints??0)}),y(ji,_n)};T(sn,ji=>{o(l).matterEnabled&&ji(zn)})}var wn=h(sn,2);{var _s=ji=>{var _n=gue(),un=h(Dt(_n)),En=f(un),Bn=h(un,3),bn=f(Bn);P(()=>{B(En,o(l).dbDocs??"—"),B(bn,o(l).dbViews??"—")}),y(ji,_n)};T(wn,ji=>{o(l).dbEnabled&&ji(_s)})}var Gs=h(wn,3),$s=f(Gs),vi=h(Gs,3),Bi=f(vi),Ti=h(vi,3),Wi=f(Ti),rn=h(Ti,3),mi=f(rn),Ri=h(rn,3),Ni=f(Ri),Zi=h(Ri,3),$i=f(Zi);P(()=>{B(Cn,o(l).scripts),B(Mi,o(l).topics),B(on,o(l).mqttMsgPerSec??"—"),B($s,o(l).handlers??"—"),B(Bi,o(l).memMb!=null?o(l).memMb+" MB":"—"),B(Wi,o(l).cpuPercent!=null?o(l).cpuPercent+" %":"—"),B(mi,o(l).eluPercent!=null?o(l).eluPercent+" %":"—"),B(Ni,o(l).elMeanMs!=null?o(l).elMeanMs+" ms":"—"),B($i,o(l).elMaxMs!=null?o(l).elMaxMs+" ms":"—")}),y(bi,Oi)},_i=bi=>{var Oi=xue();y(bi,Oi)};T(di,bi=>{o(l)?bi(ki):bi(_i,-1)})}var Fi=h(di,2),Nt=f(Fi);{var ri=bi=>{var Oi=mue();z("click",Oi,()=>{p(d,!1),Be()}),y(bi,Oi)};T(Nt,bi=>{var Oi;(Oi=o(l))!=null&&Oi.docker||bi(ri)})}z("click",kt,bi=>bi.stopPropagation()),y(Et,kt)};T(ft,Et=>{o(d)&&Et(ut)})}var Bt=h(Mt,2);let ei;var J=h(Bt,2);{var Re=Et=>{var kt=bue();z("click",kt,R),y(Et,kt)};T(J,Et=>{o(m)==="password"&&Et(Re)})}ts(Ut,Et=>p(ue,Et),()=>o(ue));var ne=h(Ut,2),se=f(ne);ts(kr(se,{}),Et=>p(H,Et,!0),()=>o(H));var De=h(se,2);let pe;var gt=f(De);{let Et=ct(()=>o(s)==="scripts");wQ(gt,{get active(){return o(Et)}})}var U=h(De,2);let ot;var W=f(U);Qie(W,{});var Q=h(U,2);let ae;var me=f(Q);{let Et=ct(()=>o(s)==="mqtt"),kt=ct(()=>o(s)==="mqtt"?o(a):null);Pie(me,{get active(){return o(Et)},get sub(){return o(kt)},onsub:di=>Rt("mqtt",di)})}var Ie=h(Q,2);let st;var mt=f(Ie);Dte(mt,{});var Ot=h(Ie,2);let Kt;var Wt=f(Ot);{let Et=ct(()=>o(s)==="broker"),kt=ct(()=>o(s)==="broker"?o(a):null);Foe(Wt,{get active(){return o(Et)},get sub(){return o(kt)},onsub:di=>Rt("broker",di)})}var qt=h(Ot,2);{var Yt=Et=>{var kt=Cue();let di;var ki=f(kt);{let _i=ct(()=>o(s)==="adapters"),Fi=ct(()=>o(s)==="adapters"?o(a):null);Sde(ki,{onstatus:(Nt,ri)=>{p(he,Nt,!0),p(We,ri,!0)},get active(){return o(_i)},get sub(){return o(Fi)},onsub:Nt=>Rt("adapters",Nt)})}P(()=>di=Xt(kt,1,"page-wrap svelte-1n46o8q",null,di,{hidden:o(s)!=="adapters"})),y(Et,kt)};T(qt,Et=>{o(dt)&&Et(Yt)})}var ni=h(qt,2);let Ai;var Pe=f(ni);{let Et=ct(()=>o(s)==="secrets");Gde(Pe,{get active(){return o(Et)}})}var $e=h(ni,2);let Gt;var ai=f($e);{let Et=ct(()=>o(s)==="db"),kt=ct(()=>o(s)==="db"?o(a):null);Aee(ai,{get active(){return o(Et)},get sub(){return o(kt)},onsub:di=>Rt("db",di)})}var _e=h($e,2);let Vt;var _t=f(_e);vJ(_t,{});var bt=h(_e,2);let Pt;var hi=f(bt);yJ(hi,{}),P(()=>{Do($t,o(xe)?`min-width: ${o(xe)}px`:void 0),rt=Xt(et,1,"svelte-1n46o8q",null,rt,{active:o(s)==="scripts"}),V=Xt(w,1,"svelte-1n46o8q",null,V,{active:o(s)==="packages"}),lt=Xt(Ee,1,"svelte-1n46o8q",null,lt,{active:o(s)==="mqtt"}),at=Xt(Le,1,"svelte-1n46o8q",null,at,{active:o(s)==="secrets"}),ke=Xt(St,1,"svelte-1n46o8q",null,ke,{active:o(s)==="logs"}),ei=Xt(Bt,1,"nav-settings svelte-1n46o8q",null,ei,{active:o(s)==="config"}),pe=Xt(De,1,"page-wrap svelte-1n46o8q",null,pe,{hidden:o(s)!=="scripts"}),ot=Xt(U,1,"page-wrap svelte-1n46o8q",null,ot,{hidden:o(s)!=="packages"}),ae=Xt(Q,1,"page-wrap svelte-1n46o8q",null,ae,{hidden:o(s)!=="mqtt"}),st=Xt(Ie,1,"page-wrap svelte-1n46o8q",null,st,{hidden:o(s)!=="matter"}),Kt=Xt(Ot,1,"page-wrap svelte-1n46o8q",null,Kt,{hidden:o(s)!=="broker"}),Ai=Xt(ni,1,"page-wrap svelte-1n46o8q",null,Ai,{hidden:o(s)!=="secrets"}),Gt=Xt($e,1,"page-wrap svelte-1n46o8q",null,Gt,{hidden:o(s)!=="db"}),Vt=Xt(_e,1,"page-wrap svelte-1n46o8q",null,Vt,{hidden:o(s)!=="config"}),Pt=Xt(bt,1,"page-wrap svelte-1n46o8q",null,Pt,{hidden:o(s)!=="logs"})}),z("click",et,()=>yt("scripts")),z("click",w,()=>yt("packages")),z("click",Ee,()=>yt("mqtt")),z("click",Le,()=>yt("secrets")),z("click",St,()=>{yt("logs"),p(Ft,!1),p(Te,!1)}),z("click",Ce,Et=>{Et.stopPropagation(),p(u,!o(u)),p(d,!1)}),z("click",Jt,Et=>{Et.stopPropagation(),p(d,!o(d)),p(u,!1)}),z("click",Bt,()=>yt("config")),y(Oe,$t)};T(vt,Oe=>{o(M)&&!o(_)&&Oe(Ze)})}var ee=h(vt,2);{var ht=Oe=>{var $t=Eue(),Ht=f($t),zt=h(f(Ht),4),Ut=h(f(zt),2),et=h(zt,2);{var rt=Y=>{var oe=wue(),Ee=f(oe);P(()=>B(Ee,o(S))),y(Y,oe)};T(et,Y=>{o(S)&&Y(rt)})}var w=h(et,2),V=f(w);P(()=>{Ut.disabled=o(I),w.disabled=o(I)||!o(E),B(V,o(I)?"Signing in…":"Sign in")}),ws("submit",Ht,Y=>{Y.preventDefault(),O()}),ui(Ut,()=>o(E),Y=>p(E,Y)),y(Oe,$t)};T(ee,Oe=>{o(_)&&Oe(ht)})}var qe=h(ee,2);{var Ue=Oe=>{var $t=Sue();y(Oe,$t)};T(qe,Oe=>{o(G)&&Oe(Ue)})}var Z=h(qe,2);{var Se=Oe=>{var $t=kue();y(Oe,$t)};T(Z,Oe=>{o(x)&&Oe(Se)})}y(r,Ke),cs()}ms(["click"]);_M(Aue,{target:document.getElementById("app")});export{R3 as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{m as O}from"./monaco-langs-DKJI_o9J.js";import{t as I}from"./index-
|
|
1
|
+
import{m as O}from"./monaco-langs-DKJI_o9J.js";import{t as I}from"./index-BMdhxdQq.js";/*!-----------------------------------------------------------------------------
|
|
2
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
3
|
* Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
|
|
4
4
|
* Released under the MIT license
|
package/dist/web/index.html
CHANGED
|
@@ -175,7 +175,7 @@
|
|
|
175
175
|
}
|
|
176
176
|
})();
|
|
177
177
|
</script>
|
|
178
|
-
<script type="module" crossorigin src="/assets/index-
|
|
178
|
+
<script type="module" crossorigin src="/assets/index-BMdhxdQq.js"></script>
|
|
179
179
|
<link rel="modulepreload" crossorigin href="/assets/monaco-langs-DKJI_o9J.js">
|
|
180
180
|
<link rel="stylesheet" crossorigin href="/assets/monaco-langs-DyX1CsEw.css">
|
|
181
181
|
<link rel="stylesheet" crossorigin href="/assets/index-BTq9iige.css">
|
package/package.json
CHANGED
package/service/she-servicectl
CHANGED
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
|
|
46
46
|
set -eu
|
|
47
47
|
|
|
48
|
-
VERSION=
|
|
48
|
+
VERSION=14
|
|
49
49
|
BROKER_ENV=/etc/mqtt-interfaces/broker.env
|
|
50
50
|
UNIT_DIR=/etc/systemd/system
|
|
51
51
|
|
|
@@ -84,10 +84,25 @@ need_instance() {
|
|
|
84
84
|
valid_instance "$1" || die "invalid instance name: $1"
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
+
# the command behind <adapter> belongs to an npm package of that name — what tells an adapter
|
|
88
|
+
# apart from any other daemon that happens to keep its binary in /usr/local/bin
|
|
89
|
+
npm_adapter_pkg() {
|
|
90
|
+
dir=$(adapter_dir "$1" 2>/dev/null) || return 1
|
|
91
|
+
[ "$(basename "$dir")" = "$1" ] && return 0
|
|
92
|
+
grep -Eq "\"name\"[[:space:]]*:[[:space:]]*\"(@[^\"/]*/)?$1\"" "$dir/package.json" 2>/dev/null
|
|
93
|
+
}
|
|
94
|
+
|
|
87
95
|
# a plain <adapter>.service of an npm-installed adapter (pre-core layout)
|
|
88
96
|
legacy_unit() {
|
|
89
97
|
[ -f "$UNIT_DIR/$1.service" ] || return 1
|
|
90
|
-
|
|
98
|
+
# the unit naming the package directory is conclusive on its own
|
|
99
|
+
if grep -Eq "/node_modules/$1/" "$UNIT_DIR/$1.service" 2>/dev/null; then
|
|
100
|
+
return 0
|
|
101
|
+
fi
|
|
102
|
+
# ExecStart=/usr/local/bin/<name> alone is not: dnscrypt-proxy, dnsproxy and the like live
|
|
103
|
+
# there too. It counts only when that binary is an npm package called <adapter>.
|
|
104
|
+
grep -Eq "/usr/local/bin/$1( |$)" "$UNIT_DIR/$1.service" 2>/dev/null || return 1
|
|
105
|
+
npm_adapter_pkg "$1"
|
|
91
106
|
}
|
|
92
107
|
# the env file of a legacy unit: its EnvironmentFile= (leading - stripped), default /etc/default/<adapter>;
|
|
93
108
|
# only /etc/default/<adapter> or something inside /etc/<adapter>/ is accepted
|
package/src/lib/services-host.js
CHANGED
|
@@ -26,7 +26,7 @@ const { execFile, spawn } = require('child_process');
|
|
|
26
26
|
const sshDeploy = require('./ssh-deploy');
|
|
27
27
|
|
|
28
28
|
const HELPER = '/usr/local/bin/she-servicectl';
|
|
29
|
-
const HELPER_VERSION =
|
|
29
|
+
const HELPER_VERSION = 14; // must match VERSION in service/she-servicectl (test/unit/helper-version.test.js)
|
|
30
30
|
/** Default identity for services.hosts[].ssh — one key for all managed hosts (I5). */
|
|
31
31
|
const DEFAULT_SERVICES_IDENTITY = '~/.she/ssh/services_id_ed25519';
|
|
32
32
|
/** The helper as shipped with this she version (copied to remote hosts by the deploy route). */
|