aiservermanager 0.7.3 → 0.7.6

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,5 +1,5 @@
1
- import{$ as ne,$a as yr,$b as Td,A as Et,Aa as Co,Ab as _e,B as rd,Ba as xo,Bb as ft,C as Lt,Ca as fd,Cb as Jt,D as pt,Da as gd,Db as ot,E as sd,Ea as _d,Eb as S,Ec as Fd,F as ci,Fa as vd,Fb as xr,Fc as ha,G as fr,Ga as bd,Gb as v,Gc as Dr,H as el,Ha as yd,Hb as ve,I as ld,Ia as Cd,Ib as W,Ic as Nd,J as tl,Ja as zt,Jb as dt,K as gr,Ka as ol,Kb as Re,Kc as Sr,L as Ee,La as wo,Lb as N,M as $e,Ma as xd,Mb as L,Mc as Ld,N as ue,Na as al,Nb as Dd,O as cd,Oa as vr,Ob as Sd,P as wi,Pa as Ge,Pb as cl,Q as he,Qa as c,Qb as Se,R as lt,Ra as tt,Rb as je,Rc as Vd,S as ae,Sa as ct,Sb as p,T as H,Ta as we,Tb as at,U as k,Ua as y,Ub as d,V as me,Va as C,Vb as I,W as m,Wa as da,Wb as Q,X as ca,Xa as be,Xb as mi,Y as dd,Ya as br,Yb as kd,Z as Di,Za as it,Zb as Md,_ as md,_a as rl,_b as Ed,a as V,aa as oe,ab as R,ac as le,b as Fe,ba as Bi,bb as U,bc as Do,c as q,ca as il,cb as T,cc as So,d as Te,da as Z,db as sl,dc as dl,e as Nt,ea as K,eb as ll,ec as ml,f as nd,fa as Vt,fb as wd,fc as P,g as O,ga as X,gb as ie,gc as Tt,h as _o,ha as $,hb as We,hc as zi,i as dr,ia as Wn,ib as Cr,ic as Ad,j as Zs,ja as E,jb as bn,jc as ko,k as Qs,ka as qn,kb as J,kc as ma,l as mr,la as ud,lb as w,lc as Id,m as od,ma as bo,mb as D,mc as ua,n as ge,na as nn,nb as Ye,nc as se,o as ur,oa as yo,ob as ee,oc as Rd,p as Js,pa as hd,pb as te,pc as Pd,q as re,qa as Bt,qb as x,qc as z,r as Ve,ra as _n,rb as s,rc as jt,s as vo,sa as nl,sb as l,sc as Od,t as ad,ta as Ie,tb as _,tc as wr,u as gn,ua as xe,ub as Ne,v as hr,va as Y,vb as qe,w as pr,wa as B,wb as kt,x as Xe,xa as vn,xb as Si,y as ke,ya as pd,yb as ki,z as la,za as _r,zb as di}from"./chunk-QZRO6WVW.js";var Bd=null;function ui(){return Bd}function ul(i){Bd??=i}var pa=class{},Mo=(()=>{class i{historyGo(e){throw new Error("")}static \u0275fac=function(t){return new(t||i)};static \u0275prov=ae({token:i,factory:()=>m(zd),providedIn:"platform"})}return i})();var zd=(()=>{class i extends Mo{_location;_history;_doc=m(K);constructor(){super(),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return ui().getBaseHref(this._doc)}onPopState(e){let t=ui().getGlobalEventTarget(this._doc,"window");return t.addEventListener("popstate",e,!1),()=>t.removeEventListener("popstate",e)}onHashChange(e){let t=ui().getGlobalEventTarget(this._doc,"window");return t.addEventListener("hashchange",e,!1),()=>t.removeEventListener("hashchange",e)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(e){this._location.pathname=e}pushState(e,t,n){this._history.pushState(e,t,n)}replaceState(e,t,n){this._history.replaceState(e,t,n)}forward(){this._history.forward()}back(){this._history.back()}historyGo(e=0){this._history.go(e)}getState(){return this._history.state}static \u0275fac=function(t){return new(t||i)};static \u0275prov=ae({token:i,factory:()=>new i,providedIn:"platform"})}return i})();function Ud(i,o){return i?o?i.endsWith("/")?o.startsWith("/")?i+o.slice(1):i+o:o.startsWith("/")?i+o:`${i}/${o}`:i:o}function jd(i){let o=i.search(/#|\?|$/);return i[o-1]==="/"?i.slice(0,o-1)+i.slice(o):i}function yn(i){return i&&i[0]!=="?"?`?${i}`:i}var kr=(()=>{class i{historyGo(e){throw new Error("")}static \u0275fac=function(t){return new(t||i)};static \u0275prov=ae({token:i,factory:()=>m(tf),providedIn:"root"})}return i})(),ef=new k(""),tf=(()=>{class i extends kr{_platformLocation;_baseHref;_removeListenerFns=[];constructor(e,t){super(),this._platformLocation=e,this._baseHref=t??this._platformLocation.getBaseHrefFromDOM()??m(K).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(e){this._removeListenerFns.push(this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e))}getBaseHref(){return this._baseHref}prepareExternalUrl(e){return Ud(this._baseHref,e)}path(e=!1){let t=this._platformLocation.pathname+yn(this._platformLocation.search),n=this._platformLocation.hash;return n&&e?`${t}${n}`:t}pushState(e,t,n,a){let r=this.prepareExternalUrl(n+yn(a));this._platformLocation.pushState(e,t,r)}replaceState(e,t,n,a){let r=this.prepareExternalUrl(n+yn(a));this._platformLocation.replaceState(e,t,r)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(e=0){this._platformLocation.historyGo?.(e)}static \u0275fac=function(t){return new(t||i)(me(Mo),me(ef,8))};static \u0275prov=ae({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var Mr=(()=>{class i{_subject=new O;_basePath;_locationStrategy;_urlChangeListeners=[];_urlChangeSubscription=null;constructor(e){this._locationStrategy=e;let t=this._locationStrategy.getBaseHref();this._basePath=af(jd(Hd(t))),this._locationStrategy.onPopState(n=>{this._subject.next({url:this.path(!0),pop:!0,state:n.state,type:n.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(e=!1){return this.normalize(this._locationStrategy.path(e))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(e,t=""){return this.path()==this.normalize(e+yn(t))}normalize(e){return i.stripTrailingSlash(of(this._basePath,Hd(e)))}prepareExternalUrl(e){return e&&e[0]!=="/"&&(e="/"+e),this._locationStrategy.prepareExternalUrl(e)}go(e,t="",n=null){this._locationStrategy.pushState(n,"",e,t),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+yn(t)),n)}replaceState(e,t="",n=null){this._locationStrategy.replaceState(n,"",e,t),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+yn(t)),n)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(e=0){this._locationStrategy.historyGo?.(e)}onUrlChange(e){return this._urlChangeListeners.push(e),this._urlChangeSubscription??=this.subscribe(t=>{this._notifyUrlChangeListeners(t.url,t.state)}),()=>{let t=this._urlChangeListeners.indexOf(e);this._urlChangeListeners.splice(t,1),this._urlChangeListeners.length===0&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(e="",t){this._urlChangeListeners.forEach(n=>n(e,t))}subscribe(e,t,n){return this._subject.subscribe({next:e,error:t??void 0,complete:n??void 0})}static normalizeQueryParams=yn;static joinWithSlash=Ud;static stripTrailingSlash=jd;static \u0275fac=function(t){return new(t||i)(me(kr))};static \u0275prov=ae({token:i,factory:()=>nf(),providedIn:"root"})}return i})();function nf(){return new Mr(me(kr))}function of(i,o){if(!i||!o.startsWith(i))return o;let e=o.substring(i.length);return e===""||["/",";","?","#"].includes(e[0])?e:o}function Hd(i){return i.replace(/\/index\.html$/,"")}function af(i){if(new RegExp("^(https?:)?//").test(i)){let[,e]=i.split(/\/\/[^\/]+/);return e}return i}var bl=(function(i){return i[i.Decimal=0]="Decimal",i[i.Percent=1]="Percent",i[i.Currency=2]="Currency",i[i.Scientific=3]="Scientific",i})(bl||{});var At=(function(i){return i[i.Format=0]="Format",i[i.Standalone=1]="Standalone",i})(At||{}),Le=(function(i){return i[i.Narrow=0]="Narrow",i[i.Abbreviated=1]="Abbreviated",i[i.Wide=2]="Wide",i[i.Short=3]="Short",i})(Le||{}),qt=(function(i){return i[i.Short=0]="Short",i[i.Medium=1]="Medium",i[i.Long=2]="Long",i[i.Full=3]="Full",i})(qt||{}),Kt={Decimal:0,Group:1,List:2,PercentSign:3,PlusSign:4,MinusSign:5,Exponential:6,SuperscriptingExponent:7,PerMille:8,Infinity:9,NaN:10,TimeSeparator:11,CurrencyDecimal:12,CurrencyGroup:13};function Kd(i){return Jt(i)[ot.LocaleId]}function Xd(i,o,e){let t=Jt(i),n=[t[ot.DayPeriodsFormat],t[ot.DayPeriodsStandalone]],a=hi(n,o);return hi(a,e)}function Yd(i,o,e){let t=Jt(i),n=[t[ot.DaysFormat],t[ot.DaysStandalone]],a=hi(n,o);return hi(a,e)}function Zd(i,o,e){let t=Jt(i),n=[t[ot.MonthsFormat],t[ot.MonthsStandalone]],a=hi(n,o);return hi(a,e)}function Qd(i,o){let t=Jt(i)[ot.Eras];return hi(t,o)}function fa(i,o){let e=Jt(i);return hi(e[ot.DateFormat],o)}function ga(i,o){let e=Jt(i);return hi(e[ot.TimeFormat],o)}function _a(i,o){let t=Jt(i)[ot.DateTimeFormat];return hi(t,o)}function ji(i,o){let e=Jt(i),t=e[ot.NumberSymbols][o];if(typeof t>"u"){if(o===Kt.CurrencyDecimal)return e[ot.NumberSymbols][Kt.Decimal];if(o===Kt.CurrencyGroup)return e[ot.NumberSymbols][Kt.Group]}return t}function Jd(i,o){return Jt(i)[ot.NumberFormats][o]}function em(i){if(!i[ot.ExtraData])throw new he(2303,!1)}function tm(i){let o=Jt(i);return em(o),(o[ot.ExtraData][2]||[]).map(t=>typeof t=="string"?hl(t):[hl(t[0]),hl(t[1])])}function im(i,o,e){let t=Jt(i);em(t);let n=[t[ot.ExtraData][0],t[ot.ExtraData][1]],a=hi(n,o)||[];return hi(a,e)||[]}function hi(i,o){for(let e=o;e>-1;e--)if(typeof i[e]<"u")return i[e];throw new he(2304,!1)}function hl(i){let[o,e]=i.split(":");return{hours:+o,minutes:+e}}var rf=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,Er={},sf=/((?:[^BEGHLMOSWYZabcdhmswyz']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|Y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|c{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\s\S]*)/,lf=256;function nm(i,o,e,t){let n=vf(i);cf(o),o=on(e,o)||o;let r=[],u;for(;o;)if(u=sf.exec(o),u){r=r.concat(u.slice(1));let b=r.pop();if(!b)break;o=b}else{r.push(o);break}let h=n.getTimezoneOffset();t&&(h=am(t,h),n=_f(n,t));let f="";return r.forEach(b=>{let M=ff(b);f+=M?M(n,e,h):b==="''"?"'":b.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),f}function cf(i){if(i.length>lf)throw new he(2300,!1)}function Pr(i,o,e){let t=new Date(0);return t.setFullYear(i,o,e),t.setHours(0,0,0),t}function on(i,o){let e=Kd(i);if(Er[e]??={},Er[e][o])return Er[e][o];let t="";switch(o){case"shortDate":t=fa(i,qt.Short);break;case"mediumDate":t=fa(i,qt.Medium);break;case"longDate":t=fa(i,qt.Long);break;case"fullDate":t=fa(i,qt.Full);break;case"shortTime":t=ga(i,qt.Short);break;case"mediumTime":t=ga(i,qt.Medium);break;case"longTime":t=ga(i,qt.Long);break;case"fullTime":t=ga(i,qt.Full);break;case"short":let n=on(i,"shortTime"),a=on(i,"shortDate");t=Tr(_a(i,qt.Short),[n,a]);break;case"medium":let r=on(i,"mediumTime"),u=on(i,"mediumDate");t=Tr(_a(i,qt.Medium),[r,u]);break;case"long":let h=on(i,"longTime"),f=on(i,"longDate");t=Tr(_a(i,qt.Long),[h,f]);break;case"full":let b=on(i,"fullTime"),M=on(i,"fullDate");t=Tr(_a(i,qt.Full),[b,M]);break}return t&&(Er[e][o]=t),t}function Tr(i,o){return o&&(i=i.replace(/\{([^}]+)}/g,function(e,t){return Object.hasOwn(o,t)?o[t]:e})),i}function Mi(i,o,e="-",t,n){let a="";(i<0||n&&i<=0)&&(n?i=-i+1:(i=-i,a=e));let r=String(i);for(;r.length<o;)r="0"+r;return t&&(r=r.slice(r.length-o)),a+r}function df(i,o){return Mi(i,3).substring(0,o)}function rt(i,o,e=0,t=!1,n=!1){return function(a,r){let u=mf(i,a);if((e>0||u>-e)&&(u+=e),i===3)u===0&&e===-12&&(u=12);else if(i===6)return df(u,o);let h=ji(r,Kt.MinusSign);return Mi(u,o,h,t,n)}}function mf(i,o){switch(i){case 0:return o.getFullYear();case 1:return o.getMonth();case 2:return o.getDate();case 3:return o.getHours();case 4:return o.getMinutes();case 5:return o.getSeconds();case 6:return o.getMilliseconds();case 7:return o.getDay();default:throw new he(2301,!1)}}function He(i,o,e=At.Format,t=!1){return function(n,a){return uf(n,a,i,o,e,t)}}function uf(i,o,e,t,n,a){switch(e){case 2:return Zd(o,n,t)[i.getMonth()];case 1:return Yd(o,n,t)[i.getDay()];case 0:let r=i.getHours(),u=i.getMinutes();if(a){let f=tm(o),b=im(o,n,t),M=f.findIndex(j=>{if(Array.isArray(j)){let[G,de]=j,Ce=r>=G.hours&&u>=G.minutes,pe=r<de.hours||r===de.hours&&u<de.minutes;if(G.hours<de.hours){if(Ce&&pe)return!0}else if(Ce||pe)return!0}else if(j.hours===r&&j.minutes===u)return!0;return!1});if(M!==-1)return b[M]}return Xd(o,n,t)[r<12?0:1];case 3:return Qd(o,t)[i.getFullYear()<=0?0:1];default:let h=e;throw new he(2302,!1)}}function Ar(i){return function(o,e,t){let n=-1*t,a=ji(e,Kt.MinusSign),r=n>0?Math.floor(n/60):Math.ceil(n/60);switch(i){case 0:return(n>=0?"+":"")+Mi(r,2,a)+Mi(Math.abs(n%60),2,a);case 1:return"GMT"+(n>=0?"+":"")+Mi(r,1,a);case 2:return"GMT"+(n>=0?"+":"")+Mi(r,2,a)+":"+Mi(Math.abs(n%60),2,a);case 3:return t===0?"Z":(n>=0?"+":"")+Mi(r,2,a)+":"+Mi(Math.abs(n%60),2,a);default:throw new he(2310,!1)}}}var hf=0,Rr=4;function pf(i){let o=Pr(i,hf,1).getDay();return Pr(i,0,1+(o<=Rr?Rr:Rr+7)-o)}function om(i){let o=i.getDay(),e=o===0?-3:Rr-o;return Pr(i.getFullYear(),i.getMonth(),i.getDate()+e)}function pl(i,o=!1){return function(e,t){let n;if(o){let a=new Date(e.getFullYear(),e.getMonth(),1).getDay()-1,r=e.getDate();n=1+Math.floor((r+a)/7)}else{let a=om(e),r=pf(a.getFullYear()),u=a.getTime()-r.getTime();n=1+Math.round(u/6048e5)}return Mi(n,i,ji(t,Kt.MinusSign))}}function Ir(i,o=!1){return function(e,t){let a=om(e).getFullYear();return Mi(a,i,ji(t,Kt.MinusSign),o)}}var fl={};function ff(i){if(fl[i])return fl[i];let o;switch(i){case"G":case"GG":case"GGG":o=He(3,Le.Abbreviated);break;case"GGGG":o=He(3,Le.Wide);break;case"GGGGG":o=He(3,Le.Narrow);break;case"y":o=rt(0,1,0,!1,!0);break;case"yy":o=rt(0,2,0,!0,!0);break;case"yyy":o=rt(0,3,0,!1,!0);break;case"yyyy":o=rt(0,4,0,!1,!0);break;case"Y":o=Ir(1);break;case"YY":o=Ir(2,!0);break;case"YYY":o=Ir(3);break;case"YYYY":o=Ir(4);break;case"M":case"L":o=rt(1,1,1);break;case"MM":case"LL":o=rt(1,2,1);break;case"MMM":o=He(2,Le.Abbreviated);break;case"MMMM":o=He(2,Le.Wide);break;case"MMMMM":o=He(2,Le.Narrow);break;case"LLL":o=He(2,Le.Abbreviated,At.Standalone);break;case"LLLL":o=He(2,Le.Wide,At.Standalone);break;case"LLLLL":o=He(2,Le.Narrow,At.Standalone);break;case"w":o=pl(1);break;case"ww":o=pl(2);break;case"W":o=pl(1,!0);break;case"d":o=rt(2,1);break;case"dd":o=rt(2,2);break;case"c":case"cc":o=rt(7,1);break;case"ccc":o=He(1,Le.Abbreviated,At.Standalone);break;case"cccc":o=He(1,Le.Wide,At.Standalone);break;case"ccccc":o=He(1,Le.Narrow,At.Standalone);break;case"cccccc":o=He(1,Le.Short,At.Standalone);break;case"E":case"EE":case"EEE":o=He(1,Le.Abbreviated);break;case"EEEE":o=He(1,Le.Wide);break;case"EEEEE":o=He(1,Le.Narrow);break;case"EEEEEE":o=He(1,Le.Short);break;case"a":case"aa":case"aaa":o=He(0,Le.Abbreviated);break;case"aaaa":o=He(0,Le.Wide);break;case"aaaaa":o=He(0,Le.Narrow);break;case"b":case"bb":case"bbb":o=He(0,Le.Abbreviated,At.Standalone,!0);break;case"bbbb":o=He(0,Le.Wide,At.Standalone,!0);break;case"bbbbb":o=He(0,Le.Narrow,At.Standalone,!0);break;case"B":case"BB":case"BBB":o=He(0,Le.Abbreviated,At.Format,!0);break;case"BBBB":o=He(0,Le.Wide,At.Format,!0);break;case"BBBBB":o=He(0,Le.Narrow,At.Format,!0);break;case"h":o=rt(3,1,-12);break;case"hh":o=rt(3,2,-12);break;case"H":o=rt(3,1);break;case"HH":o=rt(3,2);break;case"m":o=rt(4,1);break;case"mm":o=rt(4,2);break;case"s":o=rt(5,1);break;case"ss":o=rt(5,2);break;case"S":o=rt(6,1);break;case"SS":o=rt(6,2);break;case"SSS":o=rt(6,3);break;case"Z":case"ZZ":case"ZZZ":o=Ar(0);break;case"ZZZZZ":o=Ar(3);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":o=Ar(1);break;case"OOOO":case"ZZZZ":case"zzzz":o=Ar(2);break;default:return null}return fl[i]=o,o}function am(i,o){i=i.replace(/:/g,"");let e=Date.parse("Jan 01, 1970 00:00:00 "+i)/6e4;return isNaN(e)?o:e}function gf(i,o){return i=new Date(i.getTime()),i.setMinutes(i.getMinutes()+o),i}function _f(i,o,e){let n=i.getTimezoneOffset(),a=am(o,n);return gf(i,-1*(a-n))}function vf(i){if($d(i))return i;if(typeof i=="number"&&!isNaN(i))return new Date(i);if(typeof i=="string"){if(i=i.trim(),/^(\d{4}(-\d{1,2}(-\d{1,2})?)?)$/.test(i)){let[n,a=1,r=1]=i.split("-").map(u=>+u);return Pr(n,a-1,r)}let e=parseFloat(i);if(!isNaN(i-e))return new Date(e);let t;if(t=i.match(rf))return bf(t)}let o=new Date(i);if(!$d(o))throw new he(2311,!1);return o}function bf(i){let o=new Date(0),e=0,t=0,n=i[8]?o.setUTCFullYear:o.setFullYear,a=i[8]?o.setUTCHours:o.setHours;i[9]&&(e=Number(i[9]+i[10]),t=Number(i[9]+i[11])),n.call(o,Number(i[1]),Number(i[2])-1,Number(i[3]));let r=Number(i[4]||0)-e,u=Number(i[5]||0)-t,h=Number(i[6]||0),f=Math.floor(parseFloat("0."+(i[7]||0))*1e3);return a.call(o,r,u,h,f),o}function $d(i){return i instanceof Date&&!isNaN(i.valueOf())}var yf=/^(\d+)?\.((\d+)(-(\d+))?)?$/,Gd=22,Or=".",va="0",Cf=";",xf=",",gl="#";function wf(i,o,e,t,n,a,r=!1){let u="",h=!1;if(!isFinite(i))u=ji(e,Kt.Infinity);else{let f=kf(i);r&&(f=Sf(f));let b=o.minInt,M=o.minFrac,j=o.maxFrac;if(a){let ht=a.match(yf);if(ht===null)throw new he(2306,!1);let Ci=ht[1],Vi=ht[3],fn=ht[5];Ci!=null&&(b=_l(Ci)),Vi!=null&&(M=_l(Vi)),fn!=null?j=_l(fn):Vi!=null&&M>j&&(j=M);let xi=100;if(b>xi||M>xi||j>xi)throw new he(2306,!1)}Mf(f,M,j);let G=f.digits,de=f.integerLen,Ce=f.exponent,pe=[];for(h=G.every(ht=>!ht);de<b;de++)G.unshift(0);for(;de<0;de++)G.unshift(0);de>0?pe=G.splice(de,G.length):(pe=G,G=[0]);let Oe=[];for(G.length>=o.lgSize&&Oe.unshift(G.splice(-o.lgSize,G.length).join(""));G.length>o.gSize;)Oe.unshift(G.splice(-o.gSize,G.length).join(""));G.length&&Oe.unshift(G.join("")),u=Oe.join(ji(e,t)),pe.length&&(u+=ji(e,n)+pe.join("")),Ce&&(u+=ji(e,Kt.Exponential)+"+"+Ce)}return i<0&&!h?u=o.negPre+u+o.negSuf:u=o.posPre+u+o.posSuf,u}function rm(i,o,e){let t=Jd(o,bl.Decimal),n=Df(t,ji(o,Kt.MinusSign));return wf(i,n,o,Kt.Group,Kt.Decimal,e)}function Df(i,o="-"){let e={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},t=i.split(Cf),n=t[0],a=t[1],r=n.indexOf(Or)!==-1?n.split(Or):[n.substring(0,n.lastIndexOf(va)+1),n.substring(n.lastIndexOf(va)+1)],u=r[0],h=r[1]||"";e.posPre=u.substring(0,u.indexOf(gl));for(let b=0;b<h.length;b++){let M=h.charAt(b);M===va?e.minFrac=e.maxFrac=b+1:M===gl?e.maxFrac=b+1:e.posSuf+=M}let f=u.split(xf);if(e.gSize=f[1]?f[1].length:0,e.lgSize=f[2]||f[1]?(f[2]||f[1]).length:0,a){let b=n.length-e.posPre.length-e.posSuf.length,M=a.indexOf(gl);e.negPre=a.substring(0,M).replace(/'/g,""),e.negSuf=a.slice(M+b).replace(/'/g,"")}else e.negPre=o+e.posPre,e.negSuf=e.posSuf;return e}function Sf(i){if(i.digits[0]===0)return i;let o=i.digits.length-i.integerLen;return i.exponent?i.exponent+=2:(o===0?i.digits.push(0,0):o===1&&i.digits.push(0),i.integerLen+=2),i}function kf(i){let o=Math.abs(i)+"",e=0,t,n,a,r,u;for((n=o.indexOf(Or))>-1&&(o=o.replace(Or,"")),(a=o.search(/e/i))>0?(n<0&&(n=a),n+=+o.slice(a+1),o=o.substring(0,a)):n<0&&(n=o.length),a=0;o.charAt(a)===va;a++);if(a===(u=o.length))t=[0],n=1;else{for(u--;o.charAt(u)===va;)u--;for(n-=a,t=[],r=0;a<=u;a++,r++)t[r]=Number(o.charAt(a))}return n>Gd&&(t=t.splice(0,Gd-1),e=n-1,n=1),{digits:t,exponent:e,integerLen:n}}function Mf(i,o,e){if(o>e)throw new he(2307,!1);let t=i.digits,n=t.length-i.integerLen,a=Math.min(Math.max(o,n),e),r=a+i.integerLen,u=t[r];if(r>0){t.splice(Math.max(i.integerLen,r));for(let M=r;M<t.length;M++)t[M]=0}else{n=Math.max(0,n),i.integerLen=1,t.length=Math.max(1,r=a+1),t[0]=0;for(let M=1;M<r;M++)t[M]=0}if(u>=5)if(r-1<0){for(let M=0;M>r;M--)t.unshift(0),i.integerLen++;t.unshift(1),i.integerLen++}else t[r-1]++;for(;n<Math.max(0,a);n++)t.push(0);let h=a!==0,f=o+i.integerLen,b=t.reduceRight(function(M,j,G,de){return j=j+M,de[G]=j<10?j:j-10,h&&(de[G]===0&&G>=f?de.pop():h=!1),j>=10?1:0},0);b&&(t.unshift(b),i.integerLen++)}function _l(i){let o=parseInt(i);if(isNaN(o))throw new he(2305,!1);return o}var vl=/\s+/,Wd=[],yl=(()=>{class i{_ngEl;_renderer;initialClasses=Wd;rawClass;stateMap=new Map;constructor(e,t){this._ngEl=e,this._renderer=t}set klass(e){this.initialClasses=e!=null?e.trim().split(vl):Wd}set ngClass(e){this.rawClass=typeof e=="string"?e.trim().split(vl):e}ngDoCheck(){for(let t of this.initialClasses)this._updateState(t,!0);let e=this.rawClass;if(Array.isArray(e)||e instanceof Set)for(let t of e)this._updateState(t,!0);else if(e!=null)for(let t of Object.keys(e))this._updateState(t,!!e[t]);this._applyStateDiff()}_updateState(e,t){let n=this.stateMap.get(e);n!==void 0?(n.enabled!==t&&(n.changed=!0,n.enabled=t),n.touched=!0):this.stateMap.set(e,{enabled:t,changed:!0,touched:!0})}_applyStateDiff(){for(let e of this.stateMap){let t=e[0],n=e[1];n.changed?(this._toggleClass(t,n.enabled),n.changed=!1):n.touched||(n.enabled&&this._toggleClass(t,!1),this.stateMap.delete(t)),n.touched=!1}}_toggleClass(e,t){e=e.trim(),e.length>0&&e.split(vl).forEach(n=>{t?this._renderer.addClass(this._ngEl.nativeElement,n):this._renderer.removeClass(this._ngEl.nativeElement,n)})}static \u0275fac=function(t){return new(t||i)(be(B),be(we))};static \u0275dir=T({type:i,selectors:[["","ngClass",""]],inputs:{klass:[0,"class","klass"],ngClass:"ngClass"}})}return i})();var Cl=(()=>{class i{_viewContainerRef;_viewRef=null;ngTemplateOutletContext=null;ngTemplateOutlet=null;ngTemplateOutletInjector=null;injector=m(Z);constructor(e){this._viewContainerRef=e}ngOnChanges(e){if(this._shouldRecreateView(e)){let t=this._viewContainerRef;if(this._viewRef&&t.remove(t.indexOf(this._viewRef)),!this.ngTemplateOutlet){this._viewRef=null;return}let n=this._createContextForwardProxy();this._viewRef=t.createEmbeddedView(this.ngTemplateOutlet,n,{injector:this._getInjector()})}}_getInjector(){return this.ngTemplateOutletInjector==="outlet"?this.injector:this.ngTemplateOutletInjector??void 0}_shouldRecreateView(e){return!!e.ngTemplateOutlet||!!e.ngTemplateOutletInjector}_createContextForwardProxy(){return new Proxy({},{set:(e,t,n)=>this.ngTemplateOutletContext?Reflect.set(this.ngTemplateOutletContext,t,n):!1,get:(e,t,n)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,t,n)}})}static \u0275fac=function(t){return new(t||i)(be(it))};static \u0275dir=T({type:i,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},features:[Ie]})}return i})();function sm(i,o){return new he(2100,!1)}var Ef="mediumDate",lm=new k(""),cm=new k(""),xl=(()=>{class i{locale;defaultTimezone;defaultOptions;constructor(e,t,n){this.locale=e,this.defaultTimezone=t,this.defaultOptions=n}transform(e,t,n,a){if(e==null||e===""||e!==e)return null;try{let r=t??this.defaultOptions?.dateFormat??Ef,u=n??this.defaultOptions?.timezone??this.defaultTimezone??void 0;return nm(e,r,a||this.locale,u)}catch(r){throw sm(i,r.message)}}static \u0275fac=function(t){return new(t||i)(be(ml,16),be(lm,24),be(cm,24))};static \u0275pipe=sl({name:"date",type:i,pure:!0})}return i})();var wl=(()=>{class i{_locale;constructor(e){this._locale=e}transform(e,t,n){if(!Tf(e))return null;n||=this._locale;try{let a=Af(e);return rm(a,n,t)}catch(a){throw sm(i,a.message)}}static \u0275fac=function(t){return new(t||i)(be(ml,16))};static \u0275pipe=sl({name:"number",type:i,pure:!0})}return i})();function Tf(i){return!(i==null||i===""||i!==i)}function Af(i){if(typeof i=="string"&&!isNaN(Number(i)-parseFloat(i)))return Number(i);if(typeof i!="number")throw new he(2309,!1);return i}var Me=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=U({type:i});static \u0275inj=H({})}return i})();function ba(i,o){o=encodeURIComponent(o);for(let e of i.split(";")){let t=e.indexOf("="),[n,a]=t==-1?[e,""]:[e.slice(0,t),e.slice(t+1)];if(n.trim()===o)return decodeURIComponent(a)}return null}var Dl="browser";function dm(i){return i===Dl}var ya=class{_doc;constructor(o){this._doc=o}manager},Fr=(()=>{class i extends ya{constructor(e){super(e)}supports(e){return!0}addEventListener(e,t,n,a){return e.addEventListener(t,n,a),()=>this.removeEventListener(e,t,n,a)}removeEventListener(e,t,n,a){return e.removeEventListener(t,n,a)}static \u0275fac=function(t){return new(t||i)(me(K))};static \u0275prov=ae({token:i,factory:i.\u0275fac})}return i})(),Vr=new k(""),El=(()=>{class i{_zone;_plugins;_eventNameToPlugin=new Map;constructor(e,t){this._zone=t,e.forEach(r=>{r.manager=this});let n=e.filter(r=>!(r instanceof Fr));this._plugins=n.slice().reverse();let a=e.find(r=>r instanceof Fr);a&&this._plugins.push(a)}addEventListener(e,t,n,a){return this._findPluginFor(t).addEventListener(e,t,n,a)}getZone(){return this._zone}_findPluginFor(e){let t=this._eventNameToPlugin.get(e);if(t)return t;if(t=this._plugins.find(a=>a.supports(e)),!t)throw new he(-5101,!1);return this._eventNameToPlugin.set(e,t),t}static \u0275fac=function(t){return new(t||i)(me(Vr),me($))};static \u0275prov=ae({token:i,factory:i.\u0275fac})}return i})(),Sl="ng-app-id";function um(i){for(let o of i)o.remove()}function hm(i,o){let e=o.createElement("style");return e.textContent=i,e}function Pf(i,o,e,t){let n=i.head?.querySelectorAll(`style[${Sl}="${o}"],link[${Sl}="${o}"]`);if(!n||n.length===0)return!1;for(let a of n)a.removeAttribute(Sl),a instanceof HTMLLinkElement?t.set(a.href.slice(a.href.lastIndexOf("/")+1),{usage:0,elements:[a]}):a.textContent&&e.set(a.textContent,{usage:0,elements:[a]});return!0}function Ml(i,o){let e=o.createElement("link");return e.setAttribute("rel","stylesheet"),e.setAttribute("href",i),e}var Tl=(()=>{class i{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;constructor(e,t,n,a={}){this.doc=e,this.appId=t,this.nonce=n,Pf(e,t,this.inline,this.external)&&this.hosts.add(e.head)}addStyles(e,t){for(let n of e)this.addUsage(n,this.inline,hm);t?.forEach(n=>this.addUsage(n,this.external,Ml))}removeStyles(e,t){for(let n of e)this.removeUsage(n,this.inline);t?.forEach(n=>this.removeUsage(n,this.external))}addUsage(e,t,n){let a=t.get(e);a?a.usage++:t.set(e,{usage:1,elements:[...this.hosts].map(r=>this.addElement(r,n(e,this.doc)))})}removeUsage(e,t){let n=t.get(e);n&&(n.usage--,n.usage<=0&&(um(n.elements),t.delete(e)))}ngOnDestroy(){for(let[,{elements:e}]of[...this.inline,...this.external])um(e);this.hosts.clear()}addHost(e){if(!this.hosts.has(e)){this.hosts.add(e);for(let[t,{elements:n}]of this.inline)n.push(this.addElement(e,hm(t,this.doc)));for(let[t,{elements:n}]of this.external)n.push(this.addElement(e,Ml(t,this.doc)))}}removeHost(e){this.hosts.delete(e);for(let t of[...this.inline.values(),...this.external.values()]){let n=[];for(let a of t.elements)a.parentNode===e?a.remove():n.push(a);t.elements=n}}addElement(e,t){return this.nonce&&t.setAttribute("nonce",this.nonce),e.appendChild(t)}static \u0275fac=function(t){return new(t||i)(me(K),me(qn),me(yo,8),me(bo))};static \u0275prov=ae({token:i,factory:i.\u0275fac})}return i})(),kl={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/Math/MathML"},Al=/%COMP%/g;var fm="%COMP%",Of=`_nghost-${fm}`,Ff=`_ngcontent-${fm}`,Nf=!0,Lf=new k("",{factory:()=>Nf});function Vf(i){return Ff.replace(Al,i)}function Bf(i){return Of.replace(Al,i)}function gm(i,o){return o.map(e=>e.replace(Al,i))}var Kn=(()=>{class i{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;constructor(e,t,n,a,r,u,h=null,f=null){this.eventManager=e,this.sharedStylesHost=t,this.appId=n,this.removeStylesOnCompDestroy=a,this.doc=r,this.ngZone=u,this.nonce=h,this.tracingService=f,this.defaultRenderer=new Ca(e,r,u,this.tracingService)}createRenderer(e,t){if(!e||!t)return this.defaultRenderer;let n=this.getOrCreateRenderer(e,t);return n instanceof Lr?n.applyToHost(e):n instanceof xa&&n.applyStyles(),n}getOrCreateRenderer(e,t){let n=this.rendererByCompId,a=n.get(t.id);if(!a){let r=this.doc,u=this.ngZone,h=this.eventManager,f=this.sharedStylesHost,b=this.removeStylesOnCompDestroy,M=this.tracingService;switch(t.encapsulation){case _r.Emulated:a=new Lr(h,f,t,this.appId,b,r,u,M);break;case _r.ShadowDom:return new Nr(h,e,t,r,u,this.nonce,M,f);case _r.ExperimentalIsolatedShadowDom:return new Nr(h,e,t,r,u,this.nonce,M);default:a=new xa(h,f,t,b,r,u,M);break}n.set(t.id,a)}return a}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(e){this.rendererByCompId.delete(e)}static \u0275fac=function(t){return new(t||i)(me(El),me(da),me(qn),me(Lf),me(K),me($),me(yo),me(al,8))};static \u0275prov=ae({token:i,factory:i.\u0275fac})}return i})(),Ca=class{eventManager;doc;ngZone;tracingService;data=Object.create(null);throwOnSyntheticProps=!0;constructor(o,e,t,n){this.eventManager=o,this.doc=e,this.ngZone=t,this.tracingService=n}destroy(){}destroyNode=null;createElement(o,e){return e?this.doc.createElementNS(kl[e]||e,o):this.doc.createElement(o)}createComment(o){return this.doc.createComment(o)}createText(o){return this.doc.createTextNode(o)}appendChild(o,e){(pm(o)?o.content:o).appendChild(e)}insertBefore(o,e,t){o&&(pm(o)?o.content:o).insertBefore(e,t)}removeChild(o,e){e.remove()}selectRootElement(o,e){let t=typeof o=="string"?this.doc.querySelector(o):o;if(!t)throw new he(-5104,!1);return e||(t.textContent=""),t}parentNode(o){return o.parentNode}nextSibling(o){return o.nextSibling}setAttribute(o,e,t,n){if(n){e=n+":"+e;let a=kl[n];a?o.setAttributeNS(a,e,t):o.setAttribute(e,t)}else o.setAttribute(e,t)}removeAttribute(o,e,t){if(t){let n=kl[t];n?o.removeAttributeNS(n,e):o.removeAttribute(`${t}:${e}`)}else o.removeAttribute(e)}addClass(o,e){o.classList.add(e)}removeClass(o,e){o.classList.remove(e)}setStyle(o,e,t,n){n&(wo.DashCase|wo.Important)?o.style.setProperty(e,t,n&wo.Important?"important":""):o.style[e]=t}removeStyle(o,e,t){t&wo.DashCase?o.style.removeProperty(e):o.style[e]=""}setProperty(o,e,t){o!=null&&(o[e]=t)}setValue(o,e){o.nodeValue=e}listen(o,e,t,n){if(typeof o=="string"&&(o=ui().getGlobalEventTarget(this.doc,o),!o))throw new he(-5102,!1);let a=this.decoratePreventDefault(t);return this.tracingService?.wrapEventListener&&(a=this.tracingService.wrapEventListener(o,e,a)),this.eventManager.addEventListener(o,e,a,n)}decoratePreventDefault(o){return e=>{if(e==="__ngUnwrap__")return o;o(e)===!1&&e.preventDefault()}}};function pm(i){return i.tagName==="TEMPLATE"&&i.content!==void 0}var Nr=class extends Ca{hostEl;sharedStylesHost;shadowRoot;constructor(o,e,t,n,a,r,u,h){super(o,n,a,u),this.hostEl=e,this.sharedStylesHost=h,this.shadowRoot=e.attachShadow({mode:"open"}),this.sharedStylesHost&&this.sharedStylesHost.addHost(this.shadowRoot);let f=t.styles;f=gm(t.id,f);for(let M of f){let j=document.createElement("style");r&&j.setAttribute("nonce",r),j.textContent=M,this.shadowRoot.appendChild(j)}let b=t.getExternalStyles?.();if(b)for(let M of b){let j=Ml(M,n);r&&j.setAttribute("nonce",r),this.shadowRoot.appendChild(j)}}nodeOrShadowRoot(o){return o===this.hostEl?this.shadowRoot:o}appendChild(o,e){return super.appendChild(this.nodeOrShadowRoot(o),e)}insertBefore(o,e,t){return super.insertBefore(this.nodeOrShadowRoot(o),e,t)}removeChild(o,e){return super.removeChild(null,e)}parentNode(o){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(o)))}destroy(){this.sharedStylesHost&&this.sharedStylesHost.removeHost(this.shadowRoot)}},xa=class extends Ca{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(o,e,t,n,a,r,u,h){super(o,a,r,u),this.sharedStylesHost=e,this.removeStylesOnCompDestroy=n;let f=t.styles;this.styles=h?gm(h,f):f,this.styleUrls=t.getExternalStyles?.(h)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&xd.size===0&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},Lr=class extends xa{contentAttr;hostAttr;constructor(o,e,t,n,a,r,u,h){let f=n+"-"+t.id;super(o,e,t,a,r,u,h,f),this.contentAttr=Vf(f),this.hostAttr=Bf(f)}applyToHost(o){this.applyStyles(),this.setAttribute(o,this.hostAttr,"")}createElement(o,e){let t=super.createElement(o,e);return super.setAttribute(t,this.contentAttr,""),t}};var Br=class i extends pa{supportsDOMEvents=!0;static makeCurrent(){ul(new i)}onAndCancel(o,e,t,n){return o.addEventListener(e,t,n),()=>{o.removeEventListener(e,t,n)}}dispatchEvent(o,e){o.dispatchEvent(e)}remove(o){o.remove()}createElement(o,e){return e=e||this.getDefaultDocument(),e.createElement(o)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(o){return o.nodeType===Node.ELEMENT_NODE}isShadowRoot(o){return o instanceof DocumentFragment}getGlobalEventTarget(o,e){return e==="window"?window:e==="document"?o:e==="body"?o.body:null}getBaseHref(o){let e=jf();return e==null?null:Hf(e)}resetBaseElement(){wa=null}getUserAgent(){return window.navigator.userAgent}getCookie(o){return ba(document.cookie,o)}},wa=null;function jf(){return wa=wa||document.head.querySelector("base"),wa?wa.getAttribute("href"):null}function Hf(i){return new URL(i,document.baseURI).pathname}var _m=["alt","control","meta","shift"],Uf={"\b":"Backspace"," ":"Tab","\x7F":"Delete","\x1B":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},$f={alt:i=>i.altKey,control:i=>i.ctrlKey,meta:i=>i.metaKey,shift:i=>i.shiftKey},vm=(()=>{class i extends ya{constructor(e){super(e)}supports(e){return i.parseEventName(e)!=null}addEventListener(e,t,n,a){let r=i.parseEventName(t),u=i.eventCallback(r.fullKey,n,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>ui().onAndCancel(e,r.domEventName,u,a))}static parseEventName(e){let t=e.toLowerCase().split("."),n=t.shift();if(t.length===0||!(n==="keydown"||n==="keyup"))return null;let a=i._normalizeKey(t.pop()),r="",u=t.indexOf("code");if(u>-1&&(t.splice(u,1),r="code."),_m.forEach(f=>{let b=t.indexOf(f);b>-1&&(t.splice(b,1),r+=f+".")}),r+=a,t.length!=0||a.length===0)return null;let h={};return h.domEventName=n,h.fullKey=r,h}static matchEventFullKeyCode(e,t){let n=Uf[e.key]||e.key,a="";return t.indexOf("code.")>-1&&(n=e.code,a="code."),n==null||!n?!1:(n=n.toLowerCase(),n===" "?n="space":n==="."&&(n="dot"),_m.forEach(r=>{if(r!==n){let u=$f[r];u(e)&&(a+=r+".")}}),a+=n,a===t)}static eventCallback(e,t,n){return a=>{i.matchEventFullKeyCode(a,e)&&n.runGuarded(()=>t(a))}}static _normalizeKey(e){return e==="esc"?"escape":e}static \u0275fac=function(t){return new(t||i)(me(K))};static \u0275prov=ae({token:i,factory:i.\u0275fac})}return i})();function Il(i,o,e){return q(this,null,function*(){let t=V({rootComponent:i},Gf(o,e));return Pd(t)})}function Gf(i,o){return{platformRef:o?.platformRef,appProviders:[...Yf,...i?.providers??[]],platformProviders:Xf}}function Wf(){Br.makeCurrent()}function qf(){return new Wn}function Kf(){return pd(document),document}var Xf=[{provide:bo,useValue:Dl},{provide:ud,useValue:Wf,multi:!0},{provide:K,useFactory:Kf}];var Yf=[{provide:dd,useValue:"root"},{provide:Wn,useFactory:qf},{provide:Vr,useClass:Fr,multi:!0},{provide:Vr,useClass:vm,multi:!0},Kn,{provide:da,useClass:Tl},{provide:Tl,useExisting:da},El,{provide:ct,useExisting:Kn},[]];var rn=class i{headers;normalizedNames=new Map;lazyInit;lazyUpdate=null;constructor(o){o?typeof o=="string"?this.lazyInit=()=>{this.headers=new Map,o.split(`
2
- `).forEach(e=>{let t=e.indexOf(":");if(t>0){let n=e.slice(0,t),a=e.slice(t+1).trim();this.addHeaderEntry(n,a)}})}:typeof Headers<"u"&&o instanceof Headers?(this.headers=new Map,o.forEach((e,t)=>{this.addHeaderEntry(t,e)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(o).forEach(([e,t])=>{this.setHeaderEntries(e,t)})}:this.headers=new Map}has(o){return this.init(),this.headers.has(o.toLowerCase())}get(o){this.init();let e=this.headers.get(o.toLowerCase());return e&&e.length>0?e[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(o){return this.init(),this.headers.get(o.toLowerCase())||null}append(o,e){return this.clone({name:o,value:e,op:"a"})}set(o,e){return this.clone({name:o,value:e,op:"s"})}delete(o,e){return this.clone({name:o,value:e,op:"d"})}maybeSetNormalizedName(o,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,o)}init(){this.lazyInit&&(this.lazyInit instanceof i?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(o=>this.applyUpdate(o)),this.lazyUpdate=null))}copyFrom(o){o.init(),Array.from(o.headers.keys()).forEach(e=>{this.headers.set(e,o.headers.get(e)),this.normalizedNames.set(e,o.normalizedNames.get(e))})}clone(o){let e=new i;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof i?this.lazyInit:this,e.lazyUpdate=(this.lazyUpdate||[]).concat([o]),e}applyUpdate(o){let e=o.name.toLowerCase();switch(o.op){case"a":case"s":let t=o.value;if(typeof t=="string"&&(t=[t]),t.length===0)return;this.maybeSetNormalizedName(o.name,e);let n=(o.op==="a"?this.headers.get(e):void 0)||[];n.push(...t),this.headers.set(e,n);break;case"d":let a=o.value;if(!a)this.headers.delete(e),this.normalizedNames.delete(e);else{let r=this.headers.get(e);if(!r)return;r=r.filter(u=>a.indexOf(u)===-1),r.length===0?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,r)}break}}addHeaderEntry(o,e){let t=o.toLowerCase();this.maybeSetNormalizedName(o,t),this.headers.has(t)?this.headers.get(t).push(e):this.headers.set(t,[e])}setHeaderEntries(o,e){let t=(Array.isArray(e)?e:[e]).map(a=>a.toString()),n=o.toLowerCase();this.headers.set(n,t),this.maybeSetNormalizedName(o,n)}forEach(o){this.init(),Array.from(this.normalizedNames.keys()).forEach(e=>o(this.normalizedNames.get(e),this.headers.get(e)))}};var jr=class{map=new Map;set(o,e){return this.map.set(o,e),this}get(o){return this.map.has(o)||this.map.set(o,o.defaultValue()),this.map.get(o)}delete(o){return this.map.delete(o),this}has(o){return this.map.has(o)}keys(){return this.map.keys()}},Hr=class{encodeKey(o){return bm(o)}encodeValue(o){return bm(o)}decodeKey(o){return decodeURIComponent(o)}decodeValue(o){return decodeURIComponent(o)}};function Zf(i,o){let e=new Map;return i.length>0&&i.replace(/^\?/,"").split("&").forEach(n=>{let a=n.indexOf("="),[r,u]=a==-1?[o.decodeKey(n),""]:[o.decodeKey(n.slice(0,a)),o.decodeValue(n.slice(a+1))],h=e.get(r)||[];h.push(u),e.set(r,h)}),e}var Qf=/%(\d[a-f0-9])/gi,Jf={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function bm(i){return encodeURIComponent(i).replace(Qf,(o,e)=>Jf[e]??o)}function zr(i){return`${i}`}var an=class i{map;encoder;updates=null;cloneFrom=null;constructor(o={}){if(this.encoder=o.encoder||new Hr,o.fromString){if(o.fromObject)throw new he(2805,!1);this.map=Zf(o.fromString,this.encoder)}else o.fromObject?(this.map=new Map,Object.keys(o.fromObject).forEach(e=>{let t=o.fromObject[e],n=Array.isArray(t)?t.map(zr):[zr(t)];this.map.set(e,n)})):this.map=null}has(o){return this.init(),this.map.has(o)}get(o){this.init();let e=this.map.get(o);return e?e[0]:null}getAll(o){return this.init(),this.map.get(o)||null}keys(){return this.init(),Array.from(this.map.keys())}append(o,e){return this.clone({param:o,value:e,op:"a"})}appendAll(o){let e=[];return Object.keys(o).forEach(t=>{let n=o[t];Array.isArray(n)?n.forEach(a=>{e.push({param:t,value:a,op:"a"})}):e.push({param:t,value:n,op:"a"})}),this.clone(e)}set(o,e){return this.clone({param:o,value:e,op:"s"})}delete(o,e){return this.clone({param:o,value:e,op:"d"})}toString(){return this.init(),this.keys().map(o=>{let e=this.encoder.encodeKey(o);return this.map.get(o).map(t=>e+"="+this.encoder.encodeValue(t)).join("&")}).filter(o=>o!=="").join("&")}clone(o){let e=new i({encoder:this.encoder});return e.cloneFrom=this.cloneFrom||this,e.updates=(this.updates||[]).concat(o),e}init(){this.map===null&&(this.map=new Map),this.cloneFrom!==null&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(o=>this.map.set(o,this.cloneFrom.map.get(o))),this.updates.forEach(o=>{switch(o.op){case"a":case"s":let e=(o.op==="a"?this.map.get(o.param):void 0)||[];e.push(zr(o.value)),this.map.set(o.param,e);break;case"d":if(o.value!==void 0){let t=this.map.get(o.param)||[],n=t.indexOf(zr(o.value));n!==-1&&t.splice(n,1),t.length>0?this.map.set(o.param,t):this.map.delete(o.param)}else{this.map.delete(o.param);break}}}),this.cloneFrom=this.updates=null)}};function eg(i){switch(i){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function ym(i){return typeof ArrayBuffer<"u"&&i instanceof ArrayBuffer}function Cm(i){return typeof Blob<"u"&&i instanceof Blob}function xm(i){return typeof FormData<"u"&&i instanceof FormData}function tg(i){return typeof URLSearchParams<"u"&&i instanceof URLSearchParams}var Rl="Content-Type",wm="Accept",Sm="text/plain",km="application/json",ig=`${km}, ${Sm}, */*`,Eo=class i{url;body=null;headers;context;reportProgress=!1;reportUploadProgress=!1;reportDownloadProgress=!1;withCredentials=!1;credentials;keepalive=!1;cache;priority;mode;redirect;referrer;integrity;referrerPolicy;responseType="json";method;params;urlWithParams;transferCache;timeout;constructor(o,e,t,n){this.url=e,this.method=o.toUpperCase();let a;if(eg(this.method)||n?(this.body=t!==void 0?t:null,a=n):a=t,a){if(this.reportProgress=!!a.reportProgress,this.reportUploadProgress=!!a.reportUploadProgress,this.reportDownloadProgress=!!a.reportDownloadProgress,this.withCredentials=!!a.withCredentials,this.keepalive=!!a.keepalive,a.responseType&&(this.responseType=a.responseType),a.headers&&(this.headers=a.headers),a.context&&(this.context=a.context),a.params&&(this.params=a.params),a.priority&&(this.priority=a.priority),a.cache&&(this.cache=a.cache),a.credentials&&(this.credentials=a.credentials),typeof a.timeout=="number"){if(a.timeout<1||!Number.isInteger(a.timeout))throw new he(2822,"");this.timeout=a.timeout}a.mode&&(this.mode=a.mode),a.redirect&&(this.redirect=a.redirect),a.integrity&&(this.integrity=a.integrity),a.referrer!==void 0&&(this.referrer=a.referrer),a.referrerPolicy&&(this.referrerPolicy=a.referrerPolicy),this.transferCache=a.transferCache}if(this.headers??=new rn,this.context??=new jr,!this.params)this.params=new an,this.urlWithParams=e;else{let r=this.params.toString();if(r.length===0)this.urlWithParams=e;else{let u=e,h="",f=e.indexOf("#");f!==-1&&(h=e.substring(f),u=e.substring(0,f));let b=u.indexOf("?"),M=b===-1?"?":b<u.length-1?"&":"";this.urlWithParams=u+M+r+h}}}serializeBody(){return this.body===null?null:typeof this.body=="string"||ym(this.body)||Cm(this.body)||xm(this.body)||tg(this.body)?this.body:this.body instanceof an?this.body.toString():typeof this.body=="object"||typeof this.body=="boolean"||Array.isArray(this.body)?JSON.stringify(this.body):this.body.toString()}detectContentTypeHeader(){return this.body===null||xm(this.body)?null:Cm(this.body)?this.body.type||null:ym(this.body)?null:typeof this.body=="string"?Sm:this.body instanceof an?"application/x-www-form-urlencoded;charset=UTF-8":typeof this.body=="object"||typeof this.body=="number"||typeof this.body=="boolean"?km:null}clone(o={}){let e=o.method||this.method,t=o.url||this.url,n=o.responseType||this.responseType,a=o.keepalive??this.keepalive,r=o.priority||this.priority,u=o.cache||this.cache,h=o.mode||this.mode,f=o.redirect||this.redirect,b=o.credentials||this.credentials,M=o.referrer??this.referrer,j=o.integrity||this.integrity,G=o.referrerPolicy||this.referrerPolicy,de=o.transferCache??this.transferCache,Ce=o.timeout??this.timeout,pe=o.body!==void 0?o.body:this.body,Oe=o.withCredentials??this.withCredentials,ht=o.reportProgress??this.reportProgress,Ci=o.reportUploadProgress??this.reportUploadProgress,Vi=o.reportDownloadProgress??this.reportDownloadProgress,fn=o.headers||this.headers,xi=o.params||this.params,cr=o.context??this.context;return o.setHeaders!==void 0&&(fn=Object.keys(o.setHeaders).reduce((go,Gn)=>go.set(Gn,o.setHeaders[Gn]),fn)),o.setParams&&(xi=Object.keys(o.setParams).reduce((go,Gn)=>go.set(Gn,o.setParams[Gn]),xi)),new i(e,t,pe,{params:xi,headers:fn,context:cr,reportProgress:ht,reportUploadProgress:Ci,reportDownloadProgress:Vi,responseType:n,withCredentials:Oe,transferCache:de,keepalive:a,cache:u,priority:r,timeout:Ce,mode:h,redirect:f,credentials:b,referrer:M,integrity:j,referrerPolicy:G})}},To=(function(i){return i[i.Sent=0]="Sent",i[i.UploadProgress=1]="UploadProgress",i[i.ResponseHeader=2]="ResponseHeader",i[i.DownloadProgress=3]="DownloadProgress",i[i.Response=4]="Response",i[i.User=5]="User",i})(To||{}),Ao=class{headers;status;statusText;url;ok;type;redirected;responseType;constructor(o,e=200,t="OK"){this.headers=o.headers||new rn,this.status=o.status!==void 0?o.status:e,this.statusText=o.statusText||t,this.url=o.url||null,this.redirected=o.redirected,this.responseType=o.responseType,this.ok=this.status>=200&&this.status<300}},Ur=class i extends Ao{constructor(o={}){super(o)}type=To.ResponseHeader;clone(o={}){return new i({headers:o.headers||this.headers,status:o.status!==void 0?o.status:this.status,statusText:o.statusText||this.statusText,url:o.url||this.url||void 0})}},Da=class i extends Ao{body;constructor(o={}){super(o),this.body=o.body!==void 0?o.body:null}type=To.Response;clone(o={}){return new i({body:o.body!==void 0?o.body:this.body,headers:o.headers||this.headers,status:o.status!==void 0?o.status:this.status,statusText:o.statusText||this.statusText,url:o.url||this.url||void 0,redirected:o.redirected??this.redirected,responseType:o.responseType??this.responseType})}},ei=class extends Ao{name="HttpErrorResponse";message;error;ok=!1;constructor(o){super(o,0,"Unknown Error"),this.status>=200&&this.status<300?this.message=`Http failure during parsing for ${o.url||"(unknown url)"}`:this.message=`Http failure response for ${o.url||"(unknown url)"}: ${o.status} ${o.statusText}`,this.error=o.error||null}},ng=200;var og=/^\)\]\}',?\n/,kS=1024*1024,Mm=new k("",{factory:()=>null}),$r=(()=>{class i{fetchImpl=m(Ol,{optional:!0})?.fetch??((...e)=>globalThis.fetch(...e));ngZone=m($);destroyRef=m(Vt);maxResponseSize=m(Mm);handle(e){return new Nt(t=>{let n=new AbortController;this.doRequest(e,n.signal,t).then(Fl,r=>t.error(new ei({error:r})));let a;return e.timeout&&(a=this.ngZone.runOutsideAngular(()=>setTimeout(()=>{n.signal.aborted||n.abort(new DOMException("signal timed out","TimeoutError"))},e.timeout))),()=>{a!==void 0&&clearTimeout(a),n.abort()}})}doRequest(e,t,n){return q(this,null,function*(){let a=this.createRequestInit(e),r;try{let pe=this.ngZone.runOutsideAngular(()=>this.fetchImpl(e.urlWithParams,V({signal:t},a)));ag(pe),n.next({type:To.Sent}),r=yield pe}catch(pe){n.error(new ei({error:pe,status:pe.status??0,statusText:pe.statusText,url:e.urlWithParams,headers:pe.headers}));return}let u=new rn(r.headers),h=r.statusText,f=r.url||e.urlWithParams,b=r.status,M=null,j=e.reportProgress||e.reportDownloadProgress;if(j&&n.next(new Ur({headers:u,status:b,statusText:h,url:f})),r.body){let pe=r.headers.get("content-length"),Oe=pe!==null?Number(pe):NaN;this.maxResponseSize!==null&&Number.isFinite(Oe)&&Oe>this.maxResponseSize&&Dm(this.maxResponseSize);let ht=[],Ci=r.body.getReader(),Vi=0,fn,xi,cr=typeof Zone<"u"&&Zone.current,go=!1;if(yield this.ngZone.runOutsideAngular(()=>q(this,null,function*(){for(;;){if(this.destroyRef.destroyed){yield Ci.cancel(),go=!0;break}let{done:sa,value:Ys}=yield Ci.read();if(sa)break;if(ht.push(Ys),Vi+=Ys.length,this.maxResponseSize!==null&&Vi>this.maxResponseSize&&(yield Ci.cancel(),Dm(this.maxResponseSize)),j){xi=e.responseType==="text"?(xi??"")+(fn??=new TextDecoder).decode(Ys,{stream:!0}):void 0;let id=()=>n.next({type:To.DownloadProgress,total:Number.isFinite(Oe)?Oe:void 0,loaded:Vi,partialText:xi});cr?cr.run(id):id()}}})),go){n.complete();return}let Gn=this.concatChunks(ht,Vi);try{let sa=r.headers.get(Rl)??"";M=this.parseBody(e,Gn,sa,b)}catch(sa){n.error(new ei({error:sa,headers:new rn(r.headers),status:r.status,statusText:r.statusText,url:r.url||e.urlWithParams}));return}}b===0&&(b=M?ng:0);let G=b>=200&&b<300,de=r.redirected,Ce=r.type;G?(n.next(new Da({body:M,headers:u,status:b,statusText:h,url:f,redirected:de,responseType:Ce})),n.complete()):n.error(new ei({error:M,headers:u,status:b,statusText:h,url:f,redirected:de,responseType:Ce}))})}parseBody(e,t,n,a){switch(e.responseType){case"json":let r=new TextDecoder().decode(t).replace(og,"");if(r==="")return null;try{return JSON.parse(r)}catch(u){if(a<200||a>=300)return r;throw u}case"text":return new TextDecoder().decode(t);case"blob":return new Blob([t],{type:n});case"arraybuffer":return t.buffer}}createRequestInit(e){if(e.reportUploadProgress)throw new he(2824,!1);let t={},n;if(n=e.credentials,e.withCredentials&&(n="include"),e.headers.forEach((a,r)=>t[a]=r.join(",")),e.headers.has(wm)||(t[wm]=ig),!e.headers.has(Rl)){let a=e.detectContentTypeHeader();a!==null&&(t[Rl]=a)}return{body:e.serializeBody(),method:e.method,headers:t,credentials:n,keepalive:e.keepalive,cache:e.cache,priority:e.priority,mode:e.mode,redirect:e.redirect,referrer:e.referrer,integrity:e.integrity,referrerPolicy:e.referrerPolicy}}concatChunks(e,t){let n=new Uint8Array(t),a=0;for(let r of e)n.set(r,a),a+=r.length;return n}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})(),Ol=class{};function Fl(){}function ag(i){i.then(Fl,Fl)}function Dm(i){throw new he(-2825,!1)}function rg(i,o){return o(i)}function sg(i,o,e){return(t,n)=>md(e,()=>o(t,a=>i(a,n)))}var Nl=new k("",{factory:()=>[]}),Em=new k(""),Tm=new k("",{factory:()=>!0});var Ll=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275prov=ae({token:i,factory:function(t){let n=null;return t?n=new(t||i):n=me($r),n},providedIn:"root"})}return i})();var Gr=(()=>{class i{backend;injector;chain=null;pendingTasks=m(nl);contributeToStability=m(Tm);constructor(e,t){this.backend=e,this.injector=t}handle(e){if(this.chain===null){let t=Array.from(new Set([...this.injector.get(Nl),...this.injector.get(Em,[])]));this.chain=t.reduceRight((n,a)=>sg(n,a,this.injector),rg)}if(this.contributeToStability){let t=this.pendingTasks.add();return this.chain(e,n=>this.backend.handle(n)).pipe(fr(t))}else return this.chain(e,t=>this.backend.handle(t))}static \u0275fac=function(t){return new(t||i)(me(Ll),me(Di))};static \u0275prov=ae({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),Vl=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275prov=ae({token:i,factory:function(t){let n=null;return t?n=new(t||i):n=me(Gr),n},providedIn:"root"})}return i})();function Pl(i,o){return V({body:o},i)}var It=(()=>{class i{handler;constructor(e){this.handler=e}request(e,t,n={}){let a;if(e instanceof Eo)a=e;else{let h;n.headers instanceof rn?h=n.headers:h=new rn(n.headers);let f;n.params&&(n.params instanceof an?f=n.params:f=new an({fromObject:n.params})),a=new Eo(e,t,n.body!==void 0?n.body:null,{headers:h,context:n.context,params:f,reportProgress:n.reportProgress,reportUploadProgress:n.reportUploadProgress,reportDownloadProgress:n.reportDownloadProgress,responseType:n.responseType||"json",withCredentials:n.withCredentials,transferCache:n.transferCache,keepalive:n.keepalive,priority:n.priority,cache:n.cache,mode:n.mode,redirect:n.redirect,credentials:n.credentials,referrer:n.referrer,referrerPolicy:n.referrerPolicy,integrity:n.integrity,timeout:n.timeout})}let r=ge(a).pipe(rd(h=>this.handler.handle(h)));if(e instanceof Eo||n.observe==="events")return r;let u=r.pipe(ke(h=>h instanceof Da));switch(n.observe||"body"){case"body":switch(a.responseType){case"arraybuffer":return u.pipe(Ve(h=>{if(h.body!==null&&!(h.body instanceof ArrayBuffer))throw new he(2806,!1);return h.body}));case"blob":return u.pipe(Ve(h=>{if(h.body!==null&&!(h.body instanceof Blob))throw new he(2807,!1);return h.body}));case"text":return u.pipe(Ve(h=>{if(h.body!==null&&typeof h.body!="string")throw new he(2808,!1);return h.body}));default:return u.pipe(Ve(h=>h.body))}case"response":return u;default:throw new he(2809,!1)}}delete(e,t={}){return this.request("DELETE",e,t)}get(e,t={}){return this.request("GET",e,t)}head(e,t={}){return this.request("HEAD",e,t)}jsonp(e,t){return this.request("JSONP",e,{params:new an().append(t,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(e,t={}){return this.request("OPTIONS",e,t)}patch(e,t,n={}){return this.request("PATCH",e,Pl(n,t))}post(e,t,n={}){return this.request("POST",e,Pl(n,t))}put(e,t,n={}){return this.request("PUT",e,Pl(n,t))}static \u0275fac=function(t){return new(t||i)(me(Vl))};static \u0275prov=ae({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var lg=new k("",{factory:()=>!0}),cg="XSRF-TOKEN",dg=new k("",{factory:()=>cg}),mg="X-XSRF-TOKEN",ug=new k("",{factory:()=>mg}),hg=(()=>{class i{cookieName=m(dg);doc=m(K);lastCookieString="";lastToken=null;parseCount=0;getToken(){let e=this.doc.cookie||"";return e!==this.lastCookieString&&(this.parseCount++,this.lastToken=ba(e,this.cookieName),this.lastCookieString=e),this.lastToken}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})(),Am=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275prov=ae({token:i,factory:function(t){let n=null;return t?n=new(t||i):n=me(hg),n},providedIn:"root"})}return i})();function pg(i,o){if(!m(lg)||i.method==="GET"||i.method==="HEAD")return o(i);try{let n=m(Mo).href,{origin:a}=new URL(n),{origin:r}=new URL(i.url,a);if(a!==r)return o(i)}catch(n){return o(i)}let e=m(Am).getToken(),t=m(ug);return e!=null&&!i.headers.has(t)&&(i=i.clone({headers:i.headers.set(t,e)})),o(i)}var Bl=(function(i){return i[i.Interceptors=0]="Interceptors",i[i.LegacyInterceptors=1]="LegacyInterceptors",i[i.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",i[i.NoXsrfProtection=3]="NoXsrfProtection",i[i.JsonpSupport=4]="JsonpSupport",i[i.RequestsMadeViaParent=5]="RequestsMadeViaParent",i[i.Fetch=6]="Fetch",i[i.Xhr=7]="Xhr",i})(Bl||{});function fg(i,o){return{\u0275kind:i,\u0275providers:o}}function zl(...i){let o=[It,$r,Gr,{provide:Vl,useExisting:Gr},{provide:Ll,useFactory:()=>m($r)},{provide:Nl,useValue:pg,multi:!0}];for(let e of i)o.push(...e.\u0275providers);return ca(o)}function jl(i){return fg(Bl.Interceptors,i.map(o=>({provide:Nl,useValue:o,multi:!0})))}var Sa=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275prov=ae({token:i,factory:function(t){let n=null;return t?n=new(t||i):n=me(vg),n},providedIn:"root"})}return i})(),vg=(()=>{class i extends Sa{_doc=m(K);sanitize(e,t){if(t==null)return null;switch(e){case zt.NONE:return t;case zt.HTML:return xo(t,"HTML")?Co(t):Cd(this._doc,String(t)).toString();case zt.STYLE:return xo(t,"Style")?Co(t):t;case zt.SCRIPT:if(xo(t,"Script"))return Co(t);throw new he(5200,!1);case zt.URL:return xo(t,"URL")?Co(t):yd(String(t));case zt.RESOURCE_URL:if(xo(t,"ResourceURL"))return Co(t);throw new he(5201,!1);default:throw new he(5202,!1)}}bypassSecurityTrustHtml(e){return fd(e)}bypassSecurityTrustStyle(e){return gd(e)}bypassSecurityTrustScript(e){return _d(e)}bypassSecurityTrustUrl(e){return vd(e)}bypassSecurityTrustResourceUrl(e){return bd(e)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();var yg=(()=>{class i extends Sr{constructor(e,t,n){super(e,t,n)}ngOnDestroy(){this.flush()}static \u0275fac=function(t){return new(t||i)(me(K),me(ha),me(Dr))};static \u0275prov=ae({token:i,factory:i.\u0275fac})}return i})();function Cg(){return new Nd}function xg(){return new Vd(m(Kn),m(Sr),m($))}var Im=[{provide:Dr,useFactory:Cg},{provide:Sr,useClass:yg},{provide:ct,useFactory:xg}],k1=[{provide:ha,useClass:Fd},{provide:nn,useValue:"NoopAnimations"},...Im],wg=[{provide:ha,useFactory:()=>new Ld},{provide:nn,useFactory:()=>"BrowserAnimations"},...Im];function Rm(){return vr("NgEagerAnimations"),[...wg]}var Dg="@",Sg=(()=>{class i{doc;delegate;zone;animationType;moduleImpl;_rendererFactoryPromise=null;scheduler=null;injector=m(Z);loadingSchedulerFn=m(kg,{optional:!0});_engine;constructor(e,t,n,a,r){this.doc=e,this.delegate=t,this.zone=n,this.animationType=a,this.moduleImpl=r}ngOnDestroy(){this._engine?.flush()}loadImpl(){let e=()=>this.moduleImpl??import("./chunk-P5KEWYS5.js").then(n=>n),t;return this.loadingSchedulerFn?t=this.loadingSchedulerFn(e):t=e(),t.catch(n=>{throw new he(5300,!1)}).then(({\u0275createEngine:n,\u0275AnimationRendererFactory:a})=>{this._engine=n(this.animationType,this.doc);let r=new a(this.delegate,this._engine,this.zone);return this.delegate=r,r})}createRenderer(e,t){let n=this.delegate.createRenderer(e,t);if(n.\u0275type===0)return n;typeof n.throwOnSyntheticProps=="boolean"&&(n.throwOnSyntheticProps=!1);let a=new Hl(n);return t?.data?.animation&&!this._rendererFactoryPromise&&(this._rendererFactoryPromise=this.loadImpl()),this._rendererFactoryPromise?.then(r=>{let u=r.createRenderer(e,t);a.use(u),this.scheduler??=this.injector.get(hd,null,{optional:!0}),this.scheduler?.notify(10)}).catch(r=>{a.use(n)}),a}begin(){this.delegate.begin?.()}end(){this.delegate.end?.()}whenRenderingDone(){return this.delegate.whenRenderingDone?.()??Promise.resolve()}componentReplaced(e){this._engine?.flush(),this.delegate.componentReplaced?.(e)}static \u0275fac=function(t){br()};static \u0275prov=ae({token:i,factory:i.\u0275fac})}return i})(),Hl=class{delegate;replay=[];\u0275type=1;constructor(o){this.delegate=o}use(o){if(this.delegate=o,this.replay!==null){for(let e of this.replay)e(o);this.replay=null}}get data(){return this.delegate.data}destroy(){this.replay=null,this.delegate.destroy()}createElement(o,e){return this.delegate.createElement(o,e)}createComment(o){return this.delegate.createComment(o)}createText(o){return this.delegate.createText(o)}get destroyNode(){return this.delegate.destroyNode}appendChild(o,e){this.delegate.appendChild(o,e)}insertBefore(o,e,t,n){this.delegate.insertBefore(o,e,t,n)}removeChild(o,e,t,n){this.delegate.removeChild(o,e,t,n)}selectRootElement(o,e){return this.delegate.selectRootElement(o,e)}parentNode(o){return this.delegate.parentNode(o)}nextSibling(o){return this.delegate.nextSibling(o)}setAttribute(o,e,t,n){this.delegate.setAttribute(o,e,t,n)}removeAttribute(o,e,t){this.delegate.removeAttribute(o,e,t)}addClass(o,e){this.delegate.addClass(o,e)}removeClass(o,e){this.delegate.removeClass(o,e)}setStyle(o,e,t,n){this.delegate.setStyle(o,e,t,n)}removeStyle(o,e,t){this.delegate.removeStyle(o,e,t)}setProperty(o,e,t){this.shouldReplay(e)&&this.replay.push(n=>n.setProperty(o,e,t)),this.delegate.setProperty(o,e,t)}setValue(o,e){this.delegate.setValue(o,e)}listen(o,e,t,n){return this.shouldReplay(e)&&this.replay.push(a=>a.listen(o,e,t,n)),this.delegate.listen(o,e,t,n)}shouldReplay(o){return this.replay!==null&&o.startsWith(Dg)}},kg=new k("");function Pm(i="animations"){return vr("NgAsyncAnimations"),ca([{provide:ct,useFactory:()=>new Sg(m(K),m(Kn),m($),i)},{provide:nn,useValue:i==="noop"?"NoopAnimations":"BrowserAnimations"}])}var Wr="asm_token",qr=(()=>{class i{constructor(){this.http=m(It),this.authState=new _o(this.hasToken())}login(e){return q(this,null,function*(){try{let t=yield re(this.http.post("/api/auth/login",{password:e}));return localStorage.setItem(Wr,t.token),this.authState.next(!0),!0}catch(t){return!1}})}logout(){localStorage.removeItem(Wr),this.authState.next(!1)}getToken(){return localStorage.getItem(Wr)}isAuthenticated(){return this.hasToken()}hasToken(){return!!localStorage.getItem(Wr)}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275prov=ae({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var Om=(i,o)=>{let e=m(qr),t=e.getToken(),n=i.url.includes("/api/auth/login"),a=t&&!n?i.clone({setHeaders:{Authorization:`Bearer ${t}`}}):i;return o(a).pipe(Et(r=>(r.status===401&&!n&&e.logout(),ur(()=>r))))};var Fm={providers:[Rd({eventCoalescing:!0}),zl(jl([Om])),Rm(),Pm()]};var Ul;try{Ul=typeof Intl<"u"&&Intl.v8BreakIterator}catch(i){Ul=!1}var fe=(()=>{class i{_platformId=m(bo);isBrowser=this._platformId?dm(this._platformId):typeof document=="object"&&!!document;EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent);TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent);BLINK=this.isBrowser&&!!(window.chrome||Ul)&&typeof CSS<"u"&&!this.EDGE&&!this.TRIDENT;WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT;IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window);FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent);ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT;SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT;static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();function sn(i){return Array.isArray(i)?i:[i]}var Nm=new Set,Xn,Io=(()=>{class i{_platform=m(fe);_nonce=m(yo,{optional:!0});_matchMedia;constructor(){this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):Eg}matchMedia(e){return(this._platform.WEBKIT||this._platform.BLINK)&&Mg(e,this._nonce),this._matchMedia(e)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();function Mg(i,o){if(!Nm.has(i))try{Xn||(Xn=document.createElement("style"),o&&Xn.setAttribute("nonce",o),Xn.setAttribute("type","text/css"),document.head.appendChild(Xn)),Xn.sheet&&(Xn.sheet.insertRule(`@media ${i.replace(/[{}]/g,"")} {body{ }}`,0),Nm.add(i))}catch(e){console.error(e)}}function Eg(i){return{matches:i==="all"||i==="",media:i,addListener:()=>{},removeListener:()=>{}}}var Yn=(()=>{class i{_mediaMatcher=m(Io);_zone=m($);_queries=new Map;_destroySubject=new O;ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(e){return Lm(sn(e)).some(n=>this._registerQuery(n).mql.matches)}observe(e){let n=Lm(sn(e)).map(r=>this._registerQuery(r).observable),a=vo(n);return a=ad(a.pipe(pt(1)),a.pipe(gr(1),Lt(0))),a.pipe(Ve(r=>{let u={matches:!1,breakpoints:{}};return r.forEach(({matches:h,query:f})=>{u.matches=u.matches||h,u.breakpoints[f]=h}),u}))}_registerQuery(e){if(this._queries.has(e))return this._queries.get(e);let t=this._mediaMatcher.matchMedia(e),a={observable:new Nt(r=>{let u=h=>this._zone.run(()=>r.next(h));return t.addListener(u),()=>{t.removeListener(u)}}).pipe(Ee(t),Ve(({matches:r})=>({query:e,matches:r})),ue(this._destroySubject)),mql:t};return this._queries.set(e,a),a}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();function Lm(i){return i.map(o=>o.split(",")).reduce((o,e)=>o.concat(e)).map(o=>o.trim())}var Kr={XSmall:"(max-width: 599.98px)",Small:"(min-width: 600px) and (max-width: 959.98px)",Medium:"(min-width: 960px) and (max-width: 1279.98px)",Large:"(min-width: 1280px) and (max-width: 1919.98px)",XLarge:"(min-width: 1920px)",Handset:"(max-width: 599.98px) and (orientation: portrait), (max-width: 959.98px) and (orientation: landscape)",Tablet:"(min-width: 600px) and (max-width: 839.98px) and (orientation: portrait), (min-width: 960px) and (max-width: 1279.98px) and (orientation: landscape)",Web:"(min-width: 840px) and (orientation: portrait), (min-width: 1280px) and (orientation: landscape)",HandsetPortrait:"(max-width: 599.98px) and (orientation: portrait)",TabletPortrait:"(min-width: 600px) and (max-width: 839.98px) and (orientation: portrait)",WebPortrait:"(min-width: 840px) and (orientation: portrait)",HandsetLandscape:"(max-width: 959.98px) and (orientation: landscape)",TabletLandscape:"(min-width: 960px) and (max-width: 1279.98px) and (orientation: landscape)",WebLandscape:"(min-width: 1280px) and (orientation: landscape)"};var Tg=new k("MATERIAL_ANIMATIONS"),Vm=null;function $l(){return m(Tg,{optional:!0})?.animationsDisabled||m(nn,{optional:!0})==="NoopAnimations"?"di-disabled":(Vm??=m(Io).matchMedia("(prefers-reduced-motion)").matches,Vm?"reduced-motion":"enabled")}function ye(){return $l()!=="enabled"}var Ag=new k("cdk-dir-doc",{providedIn:"root",factory:()=>m(K)}),Ig=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;function Bm(i){let o=i?.toLowerCase()||"";return o==="auto"&&typeof navigator<"u"&&navigator?.language?Ig.test(navigator.language)?"rtl":"ltr":o==="rtl"?"rtl":"ltr"}var Ze=(()=>{class i{get value(){return this.valueSignal()}valueSignal=E("ltr");change=new X;constructor(){let e=m(Ag,{optional:!0});if(e){let t=e.body?e.body.dir:null,n=e.documentElement?e.documentElement.dir:null;this.valueSignal.set(Bm(t||n||"ltr"))}}ngOnDestroy(){this.change.complete()}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();var ce=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=U({type:i});static \u0275inj=H({})}return i})();function Rg(i,o){i&1&&kt(0,"div",2)}var Pg=new k("MAT_PROGRESS_BAR_DEFAULT_OPTIONS");var Hi=(()=>{class i{_elementRef=m(B);_ngZone=m($);_changeDetectorRef=m(se);_renderer=m(we);_cleanupTransitionEnd;constructor(){let e=$l(),t=m(Pg,{optional:!0});this._isNoopAnimation=e==="di-disabled",e==="reduced-motion"&&this._elementRef.nativeElement.classList.add("mat-progress-bar-reduced-motion"),t&&(t.color&&(this.color=this._defaultColor=t.color),this.mode=t.mode||this.mode)}_isNoopAnimation;get color(){return this._color||this._defaultColor}set color(e){this._color=e}_color;_defaultColor="primary";get value(){return this._value}set value(e){this._value=zm(e||0),this._changeDetectorRef.markForCheck()}_value=0;get bufferValue(){return this._bufferValue||0}set bufferValue(e){this._bufferValue=zm(e||0),this._changeDetectorRef.markForCheck()}_bufferValue=0;animationEnd=new X;get mode(){return this._mode}set mode(e){this._mode=e,this._changeDetectorRef.markForCheck()}_mode="determinate";ngAfterViewInit(){this._ngZone.runOutsideAngular(()=>{this._cleanupTransitionEnd=this._renderer.listen(this._elementRef.nativeElement,"transitionend",this._transitionendHandler)})}ngOnDestroy(){this._cleanupTransitionEnd?.()}_getPrimaryBarTransform(){return`scaleX(${this._isIndeterminate()?1:this.value/100})`}_getBufferBarFlexBasis(){return`${this.mode==="buffer"?this.bufferValue:100}%`}_isIndeterminate(){return this.mode==="indeterminate"||this.mode==="query"}_transitionendHandler=e=>{this.animationEnd.observers.length===0||!e.target||!e.target.classList.contains("mdc-linear-progress__primary-bar")||(this.mode==="determinate"||this.mode==="buffer")&&this._ngZone.run(()=>this.animationEnd.next({value:this.value}))};static \u0275fac=function(t){return new(t||i)};static \u0275cmp=R({type:i,selectors:[["mat-progress-bar"]],hostAttrs:["role","progressbar","aria-valuemin","0","aria-valuemax","100","tabindex","-1",1,"mat-mdc-progress-bar","mdc-linear-progress"],hostVars:10,hostBindings:function(t,n){t&2&&(J("aria-valuenow",n._isIndeterminate()?null:n.value)("mode",n.mode),at("mat-"+n.color),p("_mat-animation-noopable",n._isNoopAnimation)("mdc-linear-progress--animation-ready",!n._isNoopAnimation)("mdc-linear-progress--indeterminate",n._isIndeterminate()))},inputs:{color:"color",value:[2,"value","value",jt],bufferValue:[2,"bufferValue","bufferValue",jt],mode:"mode"},outputs:{animationEnd:"animationEnd"},exportAs:["matProgressBar"],decls:7,vars:5,consts:[["aria-hidden","true",1,"mdc-linear-progress__buffer"],[1,"mdc-linear-progress__buffer-bar"],[1,"mdc-linear-progress__buffer-dots"],["aria-hidden","true",1,"mdc-linear-progress__bar","mdc-linear-progress__primary-bar"],[1,"mdc-linear-progress__bar-inner"],["aria-hidden","true",1,"mdc-linear-progress__bar","mdc-linear-progress__secondary-bar"]],template:function(t,n){t&1&&(Ne(0,"div",0),kt(1,"div",1),w(2,Rg,1,0,"div",2),qe(),Ne(3,"div",3),kt(4,"span",4),qe(),Ne(5,"div",5),kt(6,"span",4),qe()),t&2&&(c(),je("flex-basis",n._getBufferBarFlexBasis()),c(),D(n.mode==="buffer"?2:-1),c(),je("transform",n._getPrimaryBarTransform()))},styles:[`.mat-mdc-progress-bar {
1
+ import{$ as ne,$a as yr,$b as Td,A as Et,Aa as Co,Ab as _e,B as rd,Ba as xo,Bb as ft,C as Lt,Ca as fd,Cb as ei,D as pt,Da as gd,Db as ot,E as sd,Ea as _d,Eb as S,Ec as Fd,F as ci,Fa as vd,Fb as xr,Fc as ha,G as fr,Ga as bd,Gb as v,Gc as Dr,H as el,Ha as yd,Hb as ve,I as ld,Ia as Cd,Ib as W,Ic as Nd,J as tl,Ja as zt,Jb as dt,K as gr,Ka as ol,Kb as Re,Kc as Sr,L as Ee,La as wo,Lb as N,M as $e,Ma as xd,Mb as L,Mc as Ld,N as ue,Na as al,Nb as Dd,O as cd,Oa as vr,Ob as Sd,P as wi,Pa as Ge,Pb as cl,Q as he,Qa as c,Qb as Se,R as lt,Ra as tt,Rb as je,Rc as Vd,S as ae,Sa as ct,Sb as p,T as H,Ta as we,Tb as at,U as k,Ua as y,Ub as d,V as me,Va as C,Vb as I,W as m,Wa as da,Wb as Q,X as ca,Xa as be,Xb as mi,Y as dd,Ya as br,Yb as kd,Z as Di,Za as it,Zb as Md,_ as md,_a as rl,_b as Ed,a as V,aa as oe,ab as R,ac as le,b as Fe,ba as Bi,bb as U,bc as Do,c as q,ca as il,cb as T,cc as So,d as Te,da as Z,db as sl,dc as dl,e as Nt,ea as K,eb as ll,ec as ml,f as nd,fa as Vt,fb as wd,fc as P,g as O,ga as X,gb as ie,gc as Tt,h as _o,ha as $,hb as We,hc as zi,i as dr,ia as Wn,ib as Cr,ic as Ad,j as Zs,ja as E,jb as bn,jc as ko,k as Qs,ka as qn,kb as J,kc as ma,l as mr,la as ud,lb as w,lc as Id,m as od,ma as bo,mb as D,mc as ua,n as ge,na as nn,nb as Ye,nc as se,o as ur,oa as yo,ob as ee,oc as Rd,p as Js,pa as hd,pb as te,pc as Pd,q as re,qa as Bt,qb as x,qc as z,r as Ve,ra as _n,rb as s,rc as jt,s as vo,sa as nl,sb as l,sc as Od,t as ad,ta as Ie,tb as _,tc as wr,u as gn,ua as xe,ub as Ne,v as hr,va as Y,vb as qe,w as pr,wa as B,wb as kt,x as Xe,xa as vn,xb as Si,y as ke,ya as pd,yb as ki,z as la,za as _r,zb as di}from"./chunk-QZRO6WVW.js";var Bd=null;function ui(){return Bd}function ul(i){Bd??=i}var pa=class{},Mo=(()=>{class i{historyGo(e){throw new Error("")}static \u0275fac=function(t){return new(t||i)};static \u0275prov=ae({token:i,factory:()=>m(zd),providedIn:"platform"})}return i})();var zd=(()=>{class i extends Mo{_location;_history;_doc=m(K);constructor(){super(),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return ui().getBaseHref(this._doc)}onPopState(e){let t=ui().getGlobalEventTarget(this._doc,"window");return t.addEventListener("popstate",e,!1),()=>t.removeEventListener("popstate",e)}onHashChange(e){let t=ui().getGlobalEventTarget(this._doc,"window");return t.addEventListener("hashchange",e,!1),()=>t.removeEventListener("hashchange",e)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(e){this._location.pathname=e}pushState(e,t,n){this._history.pushState(e,t,n)}replaceState(e,t,n){this._history.replaceState(e,t,n)}forward(){this._history.forward()}back(){this._history.back()}historyGo(e=0){this._history.go(e)}getState(){return this._history.state}static \u0275fac=function(t){return new(t||i)};static \u0275prov=ae({token:i,factory:()=>new i,providedIn:"platform"})}return i})();function Ud(i,o){return i?o?i.endsWith("/")?o.startsWith("/")?i+o.slice(1):i+o:o.startsWith("/")?i+o:`${i}/${o}`:i:o}function jd(i){let o=i.search(/#|\?|$/);return i[o-1]==="/"?i.slice(0,o-1)+i.slice(o):i}function yn(i){return i&&i[0]!=="?"?`?${i}`:i}var kr=(()=>{class i{historyGo(e){throw new Error("")}static \u0275fac=function(t){return new(t||i)};static \u0275prov=ae({token:i,factory:()=>m(tf),providedIn:"root"})}return i})(),ef=new k(""),tf=(()=>{class i extends kr{_platformLocation;_baseHref;_removeListenerFns=[];constructor(e,t){super(),this._platformLocation=e,this._baseHref=t??this._platformLocation.getBaseHrefFromDOM()??m(K).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(e){this._removeListenerFns.push(this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e))}getBaseHref(){return this._baseHref}prepareExternalUrl(e){return Ud(this._baseHref,e)}path(e=!1){let t=this._platformLocation.pathname+yn(this._platformLocation.search),n=this._platformLocation.hash;return n&&e?`${t}${n}`:t}pushState(e,t,n,a){let r=this.prepareExternalUrl(n+yn(a));this._platformLocation.pushState(e,t,r)}replaceState(e,t,n,a){let r=this.prepareExternalUrl(n+yn(a));this._platformLocation.replaceState(e,t,r)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(e=0){this._platformLocation.historyGo?.(e)}static \u0275fac=function(t){return new(t||i)(me(Mo),me(ef,8))};static \u0275prov=ae({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var Mr=(()=>{class i{_subject=new O;_basePath;_locationStrategy;_urlChangeListeners=[];_urlChangeSubscription=null;constructor(e){this._locationStrategy=e;let t=this._locationStrategy.getBaseHref();this._basePath=af(jd(Hd(t))),this._locationStrategy.onPopState(n=>{this._subject.next({url:this.path(!0),pop:!0,state:n.state,type:n.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(e=!1){return this.normalize(this._locationStrategy.path(e))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(e,t=""){return this.path()==this.normalize(e+yn(t))}normalize(e){return i.stripTrailingSlash(of(this._basePath,Hd(e)))}prepareExternalUrl(e){return e&&e[0]!=="/"&&(e="/"+e),this._locationStrategy.prepareExternalUrl(e)}go(e,t="",n=null){this._locationStrategy.pushState(n,"",e,t),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+yn(t)),n)}replaceState(e,t="",n=null){this._locationStrategy.replaceState(n,"",e,t),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+yn(t)),n)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(e=0){this._locationStrategy.historyGo?.(e)}onUrlChange(e){return this._urlChangeListeners.push(e),this._urlChangeSubscription??=this.subscribe(t=>{this._notifyUrlChangeListeners(t.url,t.state)}),()=>{let t=this._urlChangeListeners.indexOf(e);this._urlChangeListeners.splice(t,1),this._urlChangeListeners.length===0&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(e="",t){this._urlChangeListeners.forEach(n=>n(e,t))}subscribe(e,t,n){return this._subject.subscribe({next:e,error:t??void 0,complete:n??void 0})}static normalizeQueryParams=yn;static joinWithSlash=Ud;static stripTrailingSlash=jd;static \u0275fac=function(t){return new(t||i)(me(kr))};static \u0275prov=ae({token:i,factory:()=>nf(),providedIn:"root"})}return i})();function nf(){return new Mr(me(kr))}function of(i,o){if(!i||!o.startsWith(i))return o;let e=o.substring(i.length);return e===""||["/",";","?","#"].includes(e[0])?e:o}function Hd(i){return i.replace(/\/index\.html$/,"")}function af(i){if(new RegExp("^(https?:)?//").test(i)){let[,e]=i.split(/\/\/[^\/]+/);return e}return i}var bl=(function(i){return i[i.Decimal=0]="Decimal",i[i.Percent=1]="Percent",i[i.Currency=2]="Currency",i[i.Scientific=3]="Scientific",i})(bl||{});var At=(function(i){return i[i.Format=0]="Format",i[i.Standalone=1]="Standalone",i})(At||{}),Le=(function(i){return i[i.Narrow=0]="Narrow",i[i.Abbreviated=1]="Abbreviated",i[i.Wide=2]="Wide",i[i.Short=3]="Short",i})(Le||{}),Kt=(function(i){return i[i.Short=0]="Short",i[i.Medium=1]="Medium",i[i.Long=2]="Long",i[i.Full=3]="Full",i})(Kt||{}),Xt={Decimal:0,Group:1,List:2,PercentSign:3,PlusSign:4,MinusSign:5,Exponential:6,SuperscriptingExponent:7,PerMille:8,Infinity:9,NaN:10,TimeSeparator:11,CurrencyDecimal:12,CurrencyGroup:13};function Kd(i){return ei(i)[ot.LocaleId]}function Xd(i,o,e){let t=ei(i),n=[t[ot.DayPeriodsFormat],t[ot.DayPeriodsStandalone]],a=hi(n,o);return hi(a,e)}function Yd(i,o,e){let t=ei(i),n=[t[ot.DaysFormat],t[ot.DaysStandalone]],a=hi(n,o);return hi(a,e)}function Zd(i,o,e){let t=ei(i),n=[t[ot.MonthsFormat],t[ot.MonthsStandalone]],a=hi(n,o);return hi(a,e)}function Qd(i,o){let t=ei(i)[ot.Eras];return hi(t,o)}function fa(i,o){let e=ei(i);return hi(e[ot.DateFormat],o)}function ga(i,o){let e=ei(i);return hi(e[ot.TimeFormat],o)}function _a(i,o){let t=ei(i)[ot.DateTimeFormat];return hi(t,o)}function ji(i,o){let e=ei(i),t=e[ot.NumberSymbols][o];if(typeof t>"u"){if(o===Xt.CurrencyDecimal)return e[ot.NumberSymbols][Xt.Decimal];if(o===Xt.CurrencyGroup)return e[ot.NumberSymbols][Xt.Group]}return t}function Jd(i,o){return ei(i)[ot.NumberFormats][o]}function em(i){if(!i[ot.ExtraData])throw new he(2303,!1)}function tm(i){let o=ei(i);return em(o),(o[ot.ExtraData][2]||[]).map(t=>typeof t=="string"?hl(t):[hl(t[0]),hl(t[1])])}function im(i,o,e){let t=ei(i);em(t);let n=[t[ot.ExtraData][0],t[ot.ExtraData][1]],a=hi(n,o)||[];return hi(a,e)||[]}function hi(i,o){for(let e=o;e>-1;e--)if(typeof i[e]<"u")return i[e];throw new he(2304,!1)}function hl(i){let[o,e]=i.split(":");return{hours:+o,minutes:+e}}var rf=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,Er={},sf=/((?:[^BEGHLMOSWYZabcdhmswyz']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|Y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|c{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\s\S]*)/,lf=256;function nm(i,o,e,t){let n=vf(i);cf(o),o=on(e,o)||o;let r=[],u;for(;o;)if(u=sf.exec(o),u){r=r.concat(u.slice(1));let b=r.pop();if(!b)break;o=b}else{r.push(o);break}let h=n.getTimezoneOffset();t&&(h=am(t,h),n=_f(n,t));let f="";return r.forEach(b=>{let M=ff(b);f+=M?M(n,e,h):b==="''"?"'":b.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),f}function cf(i){if(i.length>lf)throw new he(2300,!1)}function Pr(i,o,e){let t=new Date(0);return t.setFullYear(i,o,e),t.setHours(0,0,0),t}function on(i,o){let e=Kd(i);if(Er[e]??={},Er[e][o])return Er[e][o];let t="";switch(o){case"shortDate":t=fa(i,Kt.Short);break;case"mediumDate":t=fa(i,Kt.Medium);break;case"longDate":t=fa(i,Kt.Long);break;case"fullDate":t=fa(i,Kt.Full);break;case"shortTime":t=ga(i,Kt.Short);break;case"mediumTime":t=ga(i,Kt.Medium);break;case"longTime":t=ga(i,Kt.Long);break;case"fullTime":t=ga(i,Kt.Full);break;case"short":let n=on(i,"shortTime"),a=on(i,"shortDate");t=Tr(_a(i,Kt.Short),[n,a]);break;case"medium":let r=on(i,"mediumTime"),u=on(i,"mediumDate");t=Tr(_a(i,Kt.Medium),[r,u]);break;case"long":let h=on(i,"longTime"),f=on(i,"longDate");t=Tr(_a(i,Kt.Long),[h,f]);break;case"full":let b=on(i,"fullTime"),M=on(i,"fullDate");t=Tr(_a(i,Kt.Full),[b,M]);break}return t&&(Er[e][o]=t),t}function Tr(i,o){return o&&(i=i.replace(/\{([^}]+)}/g,function(e,t){return Object.hasOwn(o,t)?o[t]:e})),i}function Mi(i,o,e="-",t,n){let a="";(i<0||n&&i<=0)&&(n?i=-i+1:(i=-i,a=e));let r=String(i);for(;r.length<o;)r="0"+r;return t&&(r=r.slice(r.length-o)),a+r}function df(i,o){return Mi(i,3).substring(0,o)}function rt(i,o,e=0,t=!1,n=!1){return function(a,r){let u=mf(i,a);if((e>0||u>-e)&&(u+=e),i===3)u===0&&e===-12&&(u=12);else if(i===6)return df(u,o);let h=ji(r,Xt.MinusSign);return Mi(u,o,h,t,n)}}function mf(i,o){switch(i){case 0:return o.getFullYear();case 1:return o.getMonth();case 2:return o.getDate();case 3:return o.getHours();case 4:return o.getMinutes();case 5:return o.getSeconds();case 6:return o.getMilliseconds();case 7:return o.getDay();default:throw new he(2301,!1)}}function He(i,o,e=At.Format,t=!1){return function(n,a){return uf(n,a,i,o,e,t)}}function uf(i,o,e,t,n,a){switch(e){case 2:return Zd(o,n,t)[i.getMonth()];case 1:return Yd(o,n,t)[i.getDay()];case 0:let r=i.getHours(),u=i.getMinutes();if(a){let f=tm(o),b=im(o,n,t),M=f.findIndex(j=>{if(Array.isArray(j)){let[G,de]=j,Ce=r>=G.hours&&u>=G.minutes,pe=r<de.hours||r===de.hours&&u<de.minutes;if(G.hours<de.hours){if(Ce&&pe)return!0}else if(Ce||pe)return!0}else if(j.hours===r&&j.minutes===u)return!0;return!1});if(M!==-1)return b[M]}return Xd(o,n,t)[r<12?0:1];case 3:return Qd(o,t)[i.getFullYear()<=0?0:1];default:let h=e;throw new he(2302,!1)}}function Ar(i){return function(o,e,t){let n=-1*t,a=ji(e,Xt.MinusSign),r=n>0?Math.floor(n/60):Math.ceil(n/60);switch(i){case 0:return(n>=0?"+":"")+Mi(r,2,a)+Mi(Math.abs(n%60),2,a);case 1:return"GMT"+(n>=0?"+":"")+Mi(r,1,a);case 2:return"GMT"+(n>=0?"+":"")+Mi(r,2,a)+":"+Mi(Math.abs(n%60),2,a);case 3:return t===0?"Z":(n>=0?"+":"")+Mi(r,2,a)+":"+Mi(Math.abs(n%60),2,a);default:throw new he(2310,!1)}}}var hf=0,Rr=4;function pf(i){let o=Pr(i,hf,1).getDay();return Pr(i,0,1+(o<=Rr?Rr:Rr+7)-o)}function om(i){let o=i.getDay(),e=o===0?-3:Rr-o;return Pr(i.getFullYear(),i.getMonth(),i.getDate()+e)}function pl(i,o=!1){return function(e,t){let n;if(o){let a=new Date(e.getFullYear(),e.getMonth(),1).getDay()-1,r=e.getDate();n=1+Math.floor((r+a)/7)}else{let a=om(e),r=pf(a.getFullYear()),u=a.getTime()-r.getTime();n=1+Math.round(u/6048e5)}return Mi(n,i,ji(t,Xt.MinusSign))}}function Ir(i,o=!1){return function(e,t){let a=om(e).getFullYear();return Mi(a,i,ji(t,Xt.MinusSign),o)}}var fl={};function ff(i){if(fl[i])return fl[i];let o;switch(i){case"G":case"GG":case"GGG":o=He(3,Le.Abbreviated);break;case"GGGG":o=He(3,Le.Wide);break;case"GGGGG":o=He(3,Le.Narrow);break;case"y":o=rt(0,1,0,!1,!0);break;case"yy":o=rt(0,2,0,!0,!0);break;case"yyy":o=rt(0,3,0,!1,!0);break;case"yyyy":o=rt(0,4,0,!1,!0);break;case"Y":o=Ir(1);break;case"YY":o=Ir(2,!0);break;case"YYY":o=Ir(3);break;case"YYYY":o=Ir(4);break;case"M":case"L":o=rt(1,1,1);break;case"MM":case"LL":o=rt(1,2,1);break;case"MMM":o=He(2,Le.Abbreviated);break;case"MMMM":o=He(2,Le.Wide);break;case"MMMMM":o=He(2,Le.Narrow);break;case"LLL":o=He(2,Le.Abbreviated,At.Standalone);break;case"LLLL":o=He(2,Le.Wide,At.Standalone);break;case"LLLLL":o=He(2,Le.Narrow,At.Standalone);break;case"w":o=pl(1);break;case"ww":o=pl(2);break;case"W":o=pl(1,!0);break;case"d":o=rt(2,1);break;case"dd":o=rt(2,2);break;case"c":case"cc":o=rt(7,1);break;case"ccc":o=He(1,Le.Abbreviated,At.Standalone);break;case"cccc":o=He(1,Le.Wide,At.Standalone);break;case"ccccc":o=He(1,Le.Narrow,At.Standalone);break;case"cccccc":o=He(1,Le.Short,At.Standalone);break;case"E":case"EE":case"EEE":o=He(1,Le.Abbreviated);break;case"EEEE":o=He(1,Le.Wide);break;case"EEEEE":o=He(1,Le.Narrow);break;case"EEEEEE":o=He(1,Le.Short);break;case"a":case"aa":case"aaa":o=He(0,Le.Abbreviated);break;case"aaaa":o=He(0,Le.Wide);break;case"aaaaa":o=He(0,Le.Narrow);break;case"b":case"bb":case"bbb":o=He(0,Le.Abbreviated,At.Standalone,!0);break;case"bbbb":o=He(0,Le.Wide,At.Standalone,!0);break;case"bbbbb":o=He(0,Le.Narrow,At.Standalone,!0);break;case"B":case"BB":case"BBB":o=He(0,Le.Abbreviated,At.Format,!0);break;case"BBBB":o=He(0,Le.Wide,At.Format,!0);break;case"BBBBB":o=He(0,Le.Narrow,At.Format,!0);break;case"h":o=rt(3,1,-12);break;case"hh":o=rt(3,2,-12);break;case"H":o=rt(3,1);break;case"HH":o=rt(3,2);break;case"m":o=rt(4,1);break;case"mm":o=rt(4,2);break;case"s":o=rt(5,1);break;case"ss":o=rt(5,2);break;case"S":o=rt(6,1);break;case"SS":o=rt(6,2);break;case"SSS":o=rt(6,3);break;case"Z":case"ZZ":case"ZZZ":o=Ar(0);break;case"ZZZZZ":o=Ar(3);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":o=Ar(1);break;case"OOOO":case"ZZZZ":case"zzzz":o=Ar(2);break;default:return null}return fl[i]=o,o}function am(i,o){i=i.replace(/:/g,"");let e=Date.parse("Jan 01, 1970 00:00:00 "+i)/6e4;return isNaN(e)?o:e}function gf(i,o){return i=new Date(i.getTime()),i.setMinutes(i.getMinutes()+o),i}function _f(i,o,e){let n=i.getTimezoneOffset(),a=am(o,n);return gf(i,-1*(a-n))}function vf(i){if($d(i))return i;if(typeof i=="number"&&!isNaN(i))return new Date(i);if(typeof i=="string"){if(i=i.trim(),/^(\d{4}(-\d{1,2}(-\d{1,2})?)?)$/.test(i)){let[n,a=1,r=1]=i.split("-").map(u=>+u);return Pr(n,a-1,r)}let e=parseFloat(i);if(!isNaN(i-e))return new Date(e);let t;if(t=i.match(rf))return bf(t)}let o=new Date(i);if(!$d(o))throw new he(2311,!1);return o}function bf(i){let o=new Date(0),e=0,t=0,n=i[8]?o.setUTCFullYear:o.setFullYear,a=i[8]?o.setUTCHours:o.setHours;i[9]&&(e=Number(i[9]+i[10]),t=Number(i[9]+i[11])),n.call(o,Number(i[1]),Number(i[2])-1,Number(i[3]));let r=Number(i[4]||0)-e,u=Number(i[5]||0)-t,h=Number(i[6]||0),f=Math.floor(parseFloat("0."+(i[7]||0))*1e3);return a.call(o,r,u,h,f),o}function $d(i){return i instanceof Date&&!isNaN(i.valueOf())}var yf=/^(\d+)?\.((\d+)(-(\d+))?)?$/,Gd=22,Or=".",va="0",Cf=";",xf=",",gl="#";function wf(i,o,e,t,n,a,r=!1){let u="",h=!1;if(!isFinite(i))u=ji(e,Xt.Infinity);else{let f=kf(i);r&&(f=Sf(f));let b=o.minInt,M=o.minFrac,j=o.maxFrac;if(a){let ht=a.match(yf);if(ht===null)throw new he(2306,!1);let Ci=ht[1],Vi=ht[3],fn=ht[5];Ci!=null&&(b=_l(Ci)),Vi!=null&&(M=_l(Vi)),fn!=null?j=_l(fn):Vi!=null&&M>j&&(j=M);let xi=100;if(b>xi||M>xi||j>xi)throw new he(2306,!1)}Mf(f,M,j);let G=f.digits,de=f.integerLen,Ce=f.exponent,pe=[];for(h=G.every(ht=>!ht);de<b;de++)G.unshift(0);for(;de<0;de++)G.unshift(0);de>0?pe=G.splice(de,G.length):(pe=G,G=[0]);let Oe=[];for(G.length>=o.lgSize&&Oe.unshift(G.splice(-o.lgSize,G.length).join(""));G.length>o.gSize;)Oe.unshift(G.splice(-o.gSize,G.length).join(""));G.length&&Oe.unshift(G.join("")),u=Oe.join(ji(e,t)),pe.length&&(u+=ji(e,n)+pe.join("")),Ce&&(u+=ji(e,Xt.Exponential)+"+"+Ce)}return i<0&&!h?u=o.negPre+u+o.negSuf:u=o.posPre+u+o.posSuf,u}function rm(i,o,e){let t=Jd(o,bl.Decimal),n=Df(t,ji(o,Xt.MinusSign));return wf(i,n,o,Xt.Group,Xt.Decimal,e)}function Df(i,o="-"){let e={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},t=i.split(Cf),n=t[0],a=t[1],r=n.indexOf(Or)!==-1?n.split(Or):[n.substring(0,n.lastIndexOf(va)+1),n.substring(n.lastIndexOf(va)+1)],u=r[0],h=r[1]||"";e.posPre=u.substring(0,u.indexOf(gl));for(let b=0;b<h.length;b++){let M=h.charAt(b);M===va?e.minFrac=e.maxFrac=b+1:M===gl?e.maxFrac=b+1:e.posSuf+=M}let f=u.split(xf);if(e.gSize=f[1]?f[1].length:0,e.lgSize=f[2]||f[1]?(f[2]||f[1]).length:0,a){let b=n.length-e.posPre.length-e.posSuf.length,M=a.indexOf(gl);e.negPre=a.substring(0,M).replace(/'/g,""),e.negSuf=a.slice(M+b).replace(/'/g,"")}else e.negPre=o+e.posPre,e.negSuf=e.posSuf;return e}function Sf(i){if(i.digits[0]===0)return i;let o=i.digits.length-i.integerLen;return i.exponent?i.exponent+=2:(o===0?i.digits.push(0,0):o===1&&i.digits.push(0),i.integerLen+=2),i}function kf(i){let o=Math.abs(i)+"",e=0,t,n,a,r,u;for((n=o.indexOf(Or))>-1&&(o=o.replace(Or,"")),(a=o.search(/e/i))>0?(n<0&&(n=a),n+=+o.slice(a+1),o=o.substring(0,a)):n<0&&(n=o.length),a=0;o.charAt(a)===va;a++);if(a===(u=o.length))t=[0],n=1;else{for(u--;o.charAt(u)===va;)u--;for(n-=a,t=[],r=0;a<=u;a++,r++)t[r]=Number(o.charAt(a))}return n>Gd&&(t=t.splice(0,Gd-1),e=n-1,n=1),{digits:t,exponent:e,integerLen:n}}function Mf(i,o,e){if(o>e)throw new he(2307,!1);let t=i.digits,n=t.length-i.integerLen,a=Math.min(Math.max(o,n),e),r=a+i.integerLen,u=t[r];if(r>0){t.splice(Math.max(i.integerLen,r));for(let M=r;M<t.length;M++)t[M]=0}else{n=Math.max(0,n),i.integerLen=1,t.length=Math.max(1,r=a+1),t[0]=0;for(let M=1;M<r;M++)t[M]=0}if(u>=5)if(r-1<0){for(let M=0;M>r;M--)t.unshift(0),i.integerLen++;t.unshift(1),i.integerLen++}else t[r-1]++;for(;n<Math.max(0,a);n++)t.push(0);let h=a!==0,f=o+i.integerLen,b=t.reduceRight(function(M,j,G,de){return j=j+M,de[G]=j<10?j:j-10,h&&(de[G]===0&&G>=f?de.pop():h=!1),j>=10?1:0},0);b&&(t.unshift(b),i.integerLen++)}function _l(i){let o=parseInt(i);if(isNaN(o))throw new he(2305,!1);return o}var vl=/\s+/,Wd=[],yl=(()=>{class i{_ngEl;_renderer;initialClasses=Wd;rawClass;stateMap=new Map;constructor(e,t){this._ngEl=e,this._renderer=t}set klass(e){this.initialClasses=e!=null?e.trim().split(vl):Wd}set ngClass(e){this.rawClass=typeof e=="string"?e.trim().split(vl):e}ngDoCheck(){for(let t of this.initialClasses)this._updateState(t,!0);let e=this.rawClass;if(Array.isArray(e)||e instanceof Set)for(let t of e)this._updateState(t,!0);else if(e!=null)for(let t of Object.keys(e))this._updateState(t,!!e[t]);this._applyStateDiff()}_updateState(e,t){let n=this.stateMap.get(e);n!==void 0?(n.enabled!==t&&(n.changed=!0,n.enabled=t),n.touched=!0):this.stateMap.set(e,{enabled:t,changed:!0,touched:!0})}_applyStateDiff(){for(let e of this.stateMap){let t=e[0],n=e[1];n.changed?(this._toggleClass(t,n.enabled),n.changed=!1):n.touched||(n.enabled&&this._toggleClass(t,!1),this.stateMap.delete(t)),n.touched=!1}}_toggleClass(e,t){e=e.trim(),e.length>0&&e.split(vl).forEach(n=>{t?this._renderer.addClass(this._ngEl.nativeElement,n):this._renderer.removeClass(this._ngEl.nativeElement,n)})}static \u0275fac=function(t){return new(t||i)(be(B),be(we))};static \u0275dir=T({type:i,selectors:[["","ngClass",""]],inputs:{klass:[0,"class","klass"],ngClass:"ngClass"}})}return i})();var Cl=(()=>{class i{_viewContainerRef;_viewRef=null;ngTemplateOutletContext=null;ngTemplateOutlet=null;ngTemplateOutletInjector=null;injector=m(Z);constructor(e){this._viewContainerRef=e}ngOnChanges(e){if(this._shouldRecreateView(e)){let t=this._viewContainerRef;if(this._viewRef&&t.remove(t.indexOf(this._viewRef)),!this.ngTemplateOutlet){this._viewRef=null;return}let n=this._createContextForwardProxy();this._viewRef=t.createEmbeddedView(this.ngTemplateOutlet,n,{injector:this._getInjector()})}}_getInjector(){return this.ngTemplateOutletInjector==="outlet"?this.injector:this.ngTemplateOutletInjector??void 0}_shouldRecreateView(e){return!!e.ngTemplateOutlet||!!e.ngTemplateOutletInjector}_createContextForwardProxy(){return new Proxy({},{set:(e,t,n)=>this.ngTemplateOutletContext?Reflect.set(this.ngTemplateOutletContext,t,n):!1,get:(e,t,n)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,t,n)}})}static \u0275fac=function(t){return new(t||i)(be(it))};static \u0275dir=T({type:i,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},features:[Ie]})}return i})();function sm(i,o){return new he(2100,!1)}var Ef="mediumDate",lm=new k(""),cm=new k(""),xl=(()=>{class i{locale;defaultTimezone;defaultOptions;constructor(e,t,n){this.locale=e,this.defaultTimezone=t,this.defaultOptions=n}transform(e,t,n,a){if(e==null||e===""||e!==e)return null;try{let r=t??this.defaultOptions?.dateFormat??Ef,u=n??this.defaultOptions?.timezone??this.defaultTimezone??void 0;return nm(e,r,a||this.locale,u)}catch(r){throw sm(i,r.message)}}static \u0275fac=function(t){return new(t||i)(be(ml,16),be(lm,24),be(cm,24))};static \u0275pipe=sl({name:"date",type:i,pure:!0})}return i})();var wl=(()=>{class i{_locale;constructor(e){this._locale=e}transform(e,t,n){if(!Tf(e))return null;n||=this._locale;try{let a=Af(e);return rm(a,n,t)}catch(a){throw sm(i,a.message)}}static \u0275fac=function(t){return new(t||i)(be(ml,16))};static \u0275pipe=sl({name:"number",type:i,pure:!0})}return i})();function Tf(i){return!(i==null||i===""||i!==i)}function Af(i){if(typeof i=="string"&&!isNaN(Number(i)-parseFloat(i)))return Number(i);if(typeof i!="number")throw new he(2309,!1);return i}var Me=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=U({type:i});static \u0275inj=H({})}return i})();function ba(i,o){o=encodeURIComponent(o);for(let e of i.split(";")){let t=e.indexOf("="),[n,a]=t==-1?[e,""]:[e.slice(0,t),e.slice(t+1)];if(n.trim()===o)return decodeURIComponent(a)}return null}var Dl="browser";function dm(i){return i===Dl}var ya=class{_doc;constructor(o){this._doc=o}manager},Fr=(()=>{class i extends ya{constructor(e){super(e)}supports(e){return!0}addEventListener(e,t,n,a){return e.addEventListener(t,n,a),()=>this.removeEventListener(e,t,n,a)}removeEventListener(e,t,n,a){return e.removeEventListener(t,n,a)}static \u0275fac=function(t){return new(t||i)(me(K))};static \u0275prov=ae({token:i,factory:i.\u0275fac})}return i})(),Vr=new k(""),El=(()=>{class i{_zone;_plugins;_eventNameToPlugin=new Map;constructor(e,t){this._zone=t,e.forEach(r=>{r.manager=this});let n=e.filter(r=>!(r instanceof Fr));this._plugins=n.slice().reverse();let a=e.find(r=>r instanceof Fr);a&&this._plugins.push(a)}addEventListener(e,t,n,a){return this._findPluginFor(t).addEventListener(e,t,n,a)}getZone(){return this._zone}_findPluginFor(e){let t=this._eventNameToPlugin.get(e);if(t)return t;if(t=this._plugins.find(a=>a.supports(e)),!t)throw new he(-5101,!1);return this._eventNameToPlugin.set(e,t),t}static \u0275fac=function(t){return new(t||i)(me(Vr),me($))};static \u0275prov=ae({token:i,factory:i.\u0275fac})}return i})(),Sl="ng-app-id";function um(i){for(let o of i)o.remove()}function hm(i,o){let e=o.createElement("style");return e.textContent=i,e}function Pf(i,o,e,t){let n=i.head?.querySelectorAll(`style[${Sl}="${o}"],link[${Sl}="${o}"]`);if(!n||n.length===0)return!1;for(let a of n)a.removeAttribute(Sl),a instanceof HTMLLinkElement?t.set(a.href.slice(a.href.lastIndexOf("/")+1),{usage:0,elements:[a]}):a.textContent&&e.set(a.textContent,{usage:0,elements:[a]});return!0}function Ml(i,o){let e=o.createElement("link");return e.setAttribute("rel","stylesheet"),e.setAttribute("href",i),e}var Tl=(()=>{class i{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;constructor(e,t,n,a={}){this.doc=e,this.appId=t,this.nonce=n,Pf(e,t,this.inline,this.external)&&this.hosts.add(e.head)}addStyles(e,t){for(let n of e)this.addUsage(n,this.inline,hm);t?.forEach(n=>this.addUsage(n,this.external,Ml))}removeStyles(e,t){for(let n of e)this.removeUsage(n,this.inline);t?.forEach(n=>this.removeUsage(n,this.external))}addUsage(e,t,n){let a=t.get(e);a?a.usage++:t.set(e,{usage:1,elements:[...this.hosts].map(r=>this.addElement(r,n(e,this.doc)))})}removeUsage(e,t){let n=t.get(e);n&&(n.usage--,n.usage<=0&&(um(n.elements),t.delete(e)))}ngOnDestroy(){for(let[,{elements:e}]of[...this.inline,...this.external])um(e);this.hosts.clear()}addHost(e){if(!this.hosts.has(e)){this.hosts.add(e);for(let[t,{elements:n}]of this.inline)n.push(this.addElement(e,hm(t,this.doc)));for(let[t,{elements:n}]of this.external)n.push(this.addElement(e,Ml(t,this.doc)))}}removeHost(e){this.hosts.delete(e);for(let t of[...this.inline.values(),...this.external.values()]){let n=[];for(let a of t.elements)a.parentNode===e?a.remove():n.push(a);t.elements=n}}addElement(e,t){return this.nonce&&t.setAttribute("nonce",this.nonce),e.appendChild(t)}static \u0275fac=function(t){return new(t||i)(me(K),me(qn),me(yo,8),me(bo))};static \u0275prov=ae({token:i,factory:i.\u0275fac})}return i})(),kl={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/Math/MathML"},Al=/%COMP%/g;var fm="%COMP%",Of=`_nghost-${fm}`,Ff=`_ngcontent-${fm}`,Nf=!0,Lf=new k("",{factory:()=>Nf});function Vf(i){return Ff.replace(Al,i)}function Bf(i){return Of.replace(Al,i)}function gm(i,o){return o.map(e=>e.replace(Al,i))}var Kn=(()=>{class i{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;constructor(e,t,n,a,r,u,h=null,f=null){this.eventManager=e,this.sharedStylesHost=t,this.appId=n,this.removeStylesOnCompDestroy=a,this.doc=r,this.ngZone=u,this.nonce=h,this.tracingService=f,this.defaultRenderer=new Ca(e,r,u,this.tracingService)}createRenderer(e,t){if(!e||!t)return this.defaultRenderer;let n=this.getOrCreateRenderer(e,t);return n instanceof Lr?n.applyToHost(e):n instanceof xa&&n.applyStyles(),n}getOrCreateRenderer(e,t){let n=this.rendererByCompId,a=n.get(t.id);if(!a){let r=this.doc,u=this.ngZone,h=this.eventManager,f=this.sharedStylesHost,b=this.removeStylesOnCompDestroy,M=this.tracingService;switch(t.encapsulation){case _r.Emulated:a=new Lr(h,f,t,this.appId,b,r,u,M);break;case _r.ShadowDom:return new Nr(h,e,t,r,u,this.nonce,M,f);case _r.ExperimentalIsolatedShadowDom:return new Nr(h,e,t,r,u,this.nonce,M);default:a=new xa(h,f,t,b,r,u,M);break}n.set(t.id,a)}return a}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(e){this.rendererByCompId.delete(e)}static \u0275fac=function(t){return new(t||i)(me(El),me(da),me(qn),me(Lf),me(K),me($),me(yo),me(al,8))};static \u0275prov=ae({token:i,factory:i.\u0275fac})}return i})(),Ca=class{eventManager;doc;ngZone;tracingService;data=Object.create(null);throwOnSyntheticProps=!0;constructor(o,e,t,n){this.eventManager=o,this.doc=e,this.ngZone=t,this.tracingService=n}destroy(){}destroyNode=null;createElement(o,e){return e?this.doc.createElementNS(kl[e]||e,o):this.doc.createElement(o)}createComment(o){return this.doc.createComment(o)}createText(o){return this.doc.createTextNode(o)}appendChild(o,e){(pm(o)?o.content:o).appendChild(e)}insertBefore(o,e,t){o&&(pm(o)?o.content:o).insertBefore(e,t)}removeChild(o,e){e.remove()}selectRootElement(o,e){let t=typeof o=="string"?this.doc.querySelector(o):o;if(!t)throw new he(-5104,!1);return e||(t.textContent=""),t}parentNode(o){return o.parentNode}nextSibling(o){return o.nextSibling}setAttribute(o,e,t,n){if(n){e=n+":"+e;let a=kl[n];a?o.setAttributeNS(a,e,t):o.setAttribute(e,t)}else o.setAttribute(e,t)}removeAttribute(o,e,t){if(t){let n=kl[t];n?o.removeAttributeNS(n,e):o.removeAttribute(`${t}:${e}`)}else o.removeAttribute(e)}addClass(o,e){o.classList.add(e)}removeClass(o,e){o.classList.remove(e)}setStyle(o,e,t,n){n&(wo.DashCase|wo.Important)?o.style.setProperty(e,t,n&wo.Important?"important":""):o.style[e]=t}removeStyle(o,e,t){t&wo.DashCase?o.style.removeProperty(e):o.style[e]=""}setProperty(o,e,t){o!=null&&(o[e]=t)}setValue(o,e){o.nodeValue=e}listen(o,e,t,n){if(typeof o=="string"&&(o=ui().getGlobalEventTarget(this.doc,o),!o))throw new he(-5102,!1);let a=this.decoratePreventDefault(t);return this.tracingService?.wrapEventListener&&(a=this.tracingService.wrapEventListener(o,e,a)),this.eventManager.addEventListener(o,e,a,n)}decoratePreventDefault(o){return e=>{if(e==="__ngUnwrap__")return o;o(e)===!1&&e.preventDefault()}}};function pm(i){return i.tagName==="TEMPLATE"&&i.content!==void 0}var Nr=class extends Ca{hostEl;sharedStylesHost;shadowRoot;constructor(o,e,t,n,a,r,u,h){super(o,n,a,u),this.hostEl=e,this.sharedStylesHost=h,this.shadowRoot=e.attachShadow({mode:"open"}),this.sharedStylesHost&&this.sharedStylesHost.addHost(this.shadowRoot);let f=t.styles;f=gm(t.id,f);for(let M of f){let j=document.createElement("style");r&&j.setAttribute("nonce",r),j.textContent=M,this.shadowRoot.appendChild(j)}let b=t.getExternalStyles?.();if(b)for(let M of b){let j=Ml(M,n);r&&j.setAttribute("nonce",r),this.shadowRoot.appendChild(j)}}nodeOrShadowRoot(o){return o===this.hostEl?this.shadowRoot:o}appendChild(o,e){return super.appendChild(this.nodeOrShadowRoot(o),e)}insertBefore(o,e,t){return super.insertBefore(this.nodeOrShadowRoot(o),e,t)}removeChild(o,e){return super.removeChild(null,e)}parentNode(o){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(o)))}destroy(){this.sharedStylesHost&&this.sharedStylesHost.removeHost(this.shadowRoot)}},xa=class extends Ca{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(o,e,t,n,a,r,u,h){super(o,a,r,u),this.sharedStylesHost=e,this.removeStylesOnCompDestroy=n;let f=t.styles;this.styles=h?gm(h,f):f,this.styleUrls=t.getExternalStyles?.(h)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&xd.size===0&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},Lr=class extends xa{contentAttr;hostAttr;constructor(o,e,t,n,a,r,u,h){let f=n+"-"+t.id;super(o,e,t,a,r,u,h,f),this.contentAttr=Vf(f),this.hostAttr=Bf(f)}applyToHost(o){this.applyStyles(),this.setAttribute(o,this.hostAttr,"")}createElement(o,e){let t=super.createElement(o,e);return super.setAttribute(t,this.contentAttr,""),t}};var Br=class i extends pa{supportsDOMEvents=!0;static makeCurrent(){ul(new i)}onAndCancel(o,e,t,n){return o.addEventListener(e,t,n),()=>{o.removeEventListener(e,t,n)}}dispatchEvent(o,e){o.dispatchEvent(e)}remove(o){o.remove()}createElement(o,e){return e=e||this.getDefaultDocument(),e.createElement(o)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(o){return o.nodeType===Node.ELEMENT_NODE}isShadowRoot(o){return o instanceof DocumentFragment}getGlobalEventTarget(o,e){return e==="window"?window:e==="document"?o:e==="body"?o.body:null}getBaseHref(o){let e=jf();return e==null?null:Hf(e)}resetBaseElement(){wa=null}getUserAgent(){return window.navigator.userAgent}getCookie(o){return ba(document.cookie,o)}},wa=null;function jf(){return wa=wa||document.head.querySelector("base"),wa?wa.getAttribute("href"):null}function Hf(i){return new URL(i,document.baseURI).pathname}var _m=["alt","control","meta","shift"],Uf={"\b":"Backspace"," ":"Tab","\x7F":"Delete","\x1B":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},$f={alt:i=>i.altKey,control:i=>i.ctrlKey,meta:i=>i.metaKey,shift:i=>i.shiftKey},vm=(()=>{class i extends ya{constructor(e){super(e)}supports(e){return i.parseEventName(e)!=null}addEventListener(e,t,n,a){let r=i.parseEventName(t),u=i.eventCallback(r.fullKey,n,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>ui().onAndCancel(e,r.domEventName,u,a))}static parseEventName(e){let t=e.toLowerCase().split("."),n=t.shift();if(t.length===0||!(n==="keydown"||n==="keyup"))return null;let a=i._normalizeKey(t.pop()),r="",u=t.indexOf("code");if(u>-1&&(t.splice(u,1),r="code."),_m.forEach(f=>{let b=t.indexOf(f);b>-1&&(t.splice(b,1),r+=f+".")}),r+=a,t.length!=0||a.length===0)return null;let h={};return h.domEventName=n,h.fullKey=r,h}static matchEventFullKeyCode(e,t){let n=Uf[e.key]||e.key,a="";return t.indexOf("code.")>-1&&(n=e.code,a="code."),n==null||!n?!1:(n=n.toLowerCase(),n===" "?n="space":n==="."&&(n="dot"),_m.forEach(r=>{if(r!==n){let u=$f[r];u(e)&&(a+=r+".")}}),a+=n,a===t)}static eventCallback(e,t,n){return a=>{i.matchEventFullKeyCode(a,e)&&n.runGuarded(()=>t(a))}}static _normalizeKey(e){return e==="esc"?"escape":e}static \u0275fac=function(t){return new(t||i)(me(K))};static \u0275prov=ae({token:i,factory:i.\u0275fac})}return i})();function Il(i,o,e){return q(this,null,function*(){let t=V({rootComponent:i},Gf(o,e));return Pd(t)})}function Gf(i,o){return{platformRef:o?.platformRef,appProviders:[...Yf,...i?.providers??[]],platformProviders:Xf}}function Wf(){Br.makeCurrent()}function qf(){return new Wn}function Kf(){return pd(document),document}var Xf=[{provide:bo,useValue:Dl},{provide:ud,useValue:Wf,multi:!0},{provide:K,useFactory:Kf}];var Yf=[{provide:dd,useValue:"root"},{provide:Wn,useFactory:qf},{provide:Vr,useClass:Fr,multi:!0},{provide:Vr,useClass:vm,multi:!0},Kn,{provide:da,useClass:Tl},{provide:Tl,useExisting:da},El,{provide:ct,useExisting:Kn},[]];var rn=class i{headers;normalizedNames=new Map;lazyInit;lazyUpdate=null;constructor(o){o?typeof o=="string"?this.lazyInit=()=>{this.headers=new Map,o.split(`
2
+ `).forEach(e=>{let t=e.indexOf(":");if(t>0){let n=e.slice(0,t),a=e.slice(t+1).trim();this.addHeaderEntry(n,a)}})}:typeof Headers<"u"&&o instanceof Headers?(this.headers=new Map,o.forEach((e,t)=>{this.addHeaderEntry(t,e)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(o).forEach(([e,t])=>{this.setHeaderEntries(e,t)})}:this.headers=new Map}has(o){return this.init(),this.headers.has(o.toLowerCase())}get(o){this.init();let e=this.headers.get(o.toLowerCase());return e&&e.length>0?e[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(o){return this.init(),this.headers.get(o.toLowerCase())||null}append(o,e){return this.clone({name:o,value:e,op:"a"})}set(o,e){return this.clone({name:o,value:e,op:"s"})}delete(o,e){return this.clone({name:o,value:e,op:"d"})}maybeSetNormalizedName(o,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,o)}init(){this.lazyInit&&(this.lazyInit instanceof i?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(o=>this.applyUpdate(o)),this.lazyUpdate=null))}copyFrom(o){o.init(),Array.from(o.headers.keys()).forEach(e=>{this.headers.set(e,o.headers.get(e)),this.normalizedNames.set(e,o.normalizedNames.get(e))})}clone(o){let e=new i;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof i?this.lazyInit:this,e.lazyUpdate=(this.lazyUpdate||[]).concat([o]),e}applyUpdate(o){let e=o.name.toLowerCase();switch(o.op){case"a":case"s":let t=o.value;if(typeof t=="string"&&(t=[t]),t.length===0)return;this.maybeSetNormalizedName(o.name,e);let n=(o.op==="a"?this.headers.get(e):void 0)||[];n.push(...t),this.headers.set(e,n);break;case"d":let a=o.value;if(!a)this.headers.delete(e),this.normalizedNames.delete(e);else{let r=this.headers.get(e);if(!r)return;r=r.filter(u=>a.indexOf(u)===-1),r.length===0?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,r)}break}}addHeaderEntry(o,e){let t=o.toLowerCase();this.maybeSetNormalizedName(o,t),this.headers.has(t)?this.headers.get(t).push(e):this.headers.set(t,[e])}setHeaderEntries(o,e){let t=(Array.isArray(e)?e:[e]).map(a=>a.toString()),n=o.toLowerCase();this.headers.set(n,t),this.maybeSetNormalizedName(o,n)}forEach(o){this.init(),Array.from(this.normalizedNames.keys()).forEach(e=>o(this.normalizedNames.get(e),this.headers.get(e)))}};var jr=class{map=new Map;set(o,e){return this.map.set(o,e),this}get(o){return this.map.has(o)||this.map.set(o,o.defaultValue()),this.map.get(o)}delete(o){return this.map.delete(o),this}has(o){return this.map.has(o)}keys(){return this.map.keys()}},Hr=class{encodeKey(o){return bm(o)}encodeValue(o){return bm(o)}decodeKey(o){return decodeURIComponent(o)}decodeValue(o){return decodeURIComponent(o)}};function Zf(i,o){let e=new Map;return i.length>0&&i.replace(/^\?/,"").split("&").forEach(n=>{let a=n.indexOf("="),[r,u]=a==-1?[o.decodeKey(n),""]:[o.decodeKey(n.slice(0,a)),o.decodeValue(n.slice(a+1))],h=e.get(r)||[];h.push(u),e.set(r,h)}),e}var Qf=/%(\d[a-f0-9])/gi,Jf={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function bm(i){return encodeURIComponent(i).replace(Qf,(o,e)=>Jf[e]??o)}function zr(i){return`${i}`}var an=class i{map;encoder;updates=null;cloneFrom=null;constructor(o={}){if(this.encoder=o.encoder||new Hr,o.fromString){if(o.fromObject)throw new he(2805,!1);this.map=Zf(o.fromString,this.encoder)}else o.fromObject?(this.map=new Map,Object.keys(o.fromObject).forEach(e=>{let t=o.fromObject[e],n=Array.isArray(t)?t.map(zr):[zr(t)];this.map.set(e,n)})):this.map=null}has(o){return this.init(),this.map.has(o)}get(o){this.init();let e=this.map.get(o);return e?e[0]:null}getAll(o){return this.init(),this.map.get(o)||null}keys(){return this.init(),Array.from(this.map.keys())}append(o,e){return this.clone({param:o,value:e,op:"a"})}appendAll(o){let e=[];return Object.keys(o).forEach(t=>{let n=o[t];Array.isArray(n)?n.forEach(a=>{e.push({param:t,value:a,op:"a"})}):e.push({param:t,value:n,op:"a"})}),this.clone(e)}set(o,e){return this.clone({param:o,value:e,op:"s"})}delete(o,e){return this.clone({param:o,value:e,op:"d"})}toString(){return this.init(),this.keys().map(o=>{let e=this.encoder.encodeKey(o);return this.map.get(o).map(t=>e+"="+this.encoder.encodeValue(t)).join("&")}).filter(o=>o!=="").join("&")}clone(o){let e=new i({encoder:this.encoder});return e.cloneFrom=this.cloneFrom||this,e.updates=(this.updates||[]).concat(o),e}init(){this.map===null&&(this.map=new Map),this.cloneFrom!==null&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(o=>this.map.set(o,this.cloneFrom.map.get(o))),this.updates.forEach(o=>{switch(o.op){case"a":case"s":let e=(o.op==="a"?this.map.get(o.param):void 0)||[];e.push(zr(o.value)),this.map.set(o.param,e);break;case"d":if(o.value!==void 0){let t=this.map.get(o.param)||[],n=t.indexOf(zr(o.value));n!==-1&&t.splice(n,1),t.length>0?this.map.set(o.param,t):this.map.delete(o.param)}else{this.map.delete(o.param);break}}}),this.cloneFrom=this.updates=null)}};function eg(i){switch(i){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function ym(i){return typeof ArrayBuffer<"u"&&i instanceof ArrayBuffer}function Cm(i){return typeof Blob<"u"&&i instanceof Blob}function xm(i){return typeof FormData<"u"&&i instanceof FormData}function tg(i){return typeof URLSearchParams<"u"&&i instanceof URLSearchParams}var Rl="Content-Type",wm="Accept",Sm="text/plain",km="application/json",ig=`${km}, ${Sm}, */*`,Eo=class i{url;body=null;headers;context;reportProgress=!1;reportUploadProgress=!1;reportDownloadProgress=!1;withCredentials=!1;credentials;keepalive=!1;cache;priority;mode;redirect;referrer;integrity;referrerPolicy;responseType="json";method;params;urlWithParams;transferCache;timeout;constructor(o,e,t,n){this.url=e,this.method=o.toUpperCase();let a;if(eg(this.method)||n?(this.body=t!==void 0?t:null,a=n):a=t,a){if(this.reportProgress=!!a.reportProgress,this.reportUploadProgress=!!a.reportUploadProgress,this.reportDownloadProgress=!!a.reportDownloadProgress,this.withCredentials=!!a.withCredentials,this.keepalive=!!a.keepalive,a.responseType&&(this.responseType=a.responseType),a.headers&&(this.headers=a.headers),a.context&&(this.context=a.context),a.params&&(this.params=a.params),a.priority&&(this.priority=a.priority),a.cache&&(this.cache=a.cache),a.credentials&&(this.credentials=a.credentials),typeof a.timeout=="number"){if(a.timeout<1||!Number.isInteger(a.timeout))throw new he(2822,"");this.timeout=a.timeout}a.mode&&(this.mode=a.mode),a.redirect&&(this.redirect=a.redirect),a.integrity&&(this.integrity=a.integrity),a.referrer!==void 0&&(this.referrer=a.referrer),a.referrerPolicy&&(this.referrerPolicy=a.referrerPolicy),this.transferCache=a.transferCache}if(this.headers??=new rn,this.context??=new jr,!this.params)this.params=new an,this.urlWithParams=e;else{let r=this.params.toString();if(r.length===0)this.urlWithParams=e;else{let u=e,h="",f=e.indexOf("#");f!==-1&&(h=e.substring(f),u=e.substring(0,f));let b=u.indexOf("?"),M=b===-1?"?":b<u.length-1?"&":"";this.urlWithParams=u+M+r+h}}}serializeBody(){return this.body===null?null:typeof this.body=="string"||ym(this.body)||Cm(this.body)||xm(this.body)||tg(this.body)?this.body:this.body instanceof an?this.body.toString():typeof this.body=="object"||typeof this.body=="boolean"||Array.isArray(this.body)?JSON.stringify(this.body):this.body.toString()}detectContentTypeHeader(){return this.body===null||xm(this.body)?null:Cm(this.body)?this.body.type||null:ym(this.body)?null:typeof this.body=="string"?Sm:this.body instanceof an?"application/x-www-form-urlencoded;charset=UTF-8":typeof this.body=="object"||typeof this.body=="number"||typeof this.body=="boolean"?km:null}clone(o={}){let e=o.method||this.method,t=o.url||this.url,n=o.responseType||this.responseType,a=o.keepalive??this.keepalive,r=o.priority||this.priority,u=o.cache||this.cache,h=o.mode||this.mode,f=o.redirect||this.redirect,b=o.credentials||this.credentials,M=o.referrer??this.referrer,j=o.integrity||this.integrity,G=o.referrerPolicy||this.referrerPolicy,de=o.transferCache??this.transferCache,Ce=o.timeout??this.timeout,pe=o.body!==void 0?o.body:this.body,Oe=o.withCredentials??this.withCredentials,ht=o.reportProgress??this.reportProgress,Ci=o.reportUploadProgress??this.reportUploadProgress,Vi=o.reportDownloadProgress??this.reportDownloadProgress,fn=o.headers||this.headers,xi=o.params||this.params,cr=o.context??this.context;return o.setHeaders!==void 0&&(fn=Object.keys(o.setHeaders).reduce((go,Gn)=>go.set(Gn,o.setHeaders[Gn]),fn)),o.setParams&&(xi=Object.keys(o.setParams).reduce((go,Gn)=>go.set(Gn,o.setParams[Gn]),xi)),new i(e,t,pe,{params:xi,headers:fn,context:cr,reportProgress:ht,reportUploadProgress:Ci,reportDownloadProgress:Vi,responseType:n,withCredentials:Oe,transferCache:de,keepalive:a,cache:u,priority:r,timeout:Ce,mode:h,redirect:f,credentials:b,referrer:M,integrity:j,referrerPolicy:G})}},To=(function(i){return i[i.Sent=0]="Sent",i[i.UploadProgress=1]="UploadProgress",i[i.ResponseHeader=2]="ResponseHeader",i[i.DownloadProgress=3]="DownloadProgress",i[i.Response=4]="Response",i[i.User=5]="User",i})(To||{}),Ao=class{headers;status;statusText;url;ok;type;redirected;responseType;constructor(o,e=200,t="OK"){this.headers=o.headers||new rn,this.status=o.status!==void 0?o.status:e,this.statusText=o.statusText||t,this.url=o.url||null,this.redirected=o.redirected,this.responseType=o.responseType,this.ok=this.status>=200&&this.status<300}},Ur=class i extends Ao{constructor(o={}){super(o)}type=To.ResponseHeader;clone(o={}){return new i({headers:o.headers||this.headers,status:o.status!==void 0?o.status:this.status,statusText:o.statusText||this.statusText,url:o.url||this.url||void 0})}},Da=class i extends Ao{body;constructor(o={}){super(o),this.body=o.body!==void 0?o.body:null}type=To.Response;clone(o={}){return new i({body:o.body!==void 0?o.body:this.body,headers:o.headers||this.headers,status:o.status!==void 0?o.status:this.status,statusText:o.statusText||this.statusText,url:o.url||this.url||void 0,redirected:o.redirected??this.redirected,responseType:o.responseType??this.responseType})}},Ht=class extends Ao{name="HttpErrorResponse";message;error;ok=!1;constructor(o){super(o,0,"Unknown Error"),this.status>=200&&this.status<300?this.message=`Http failure during parsing for ${o.url||"(unknown url)"}`:this.message=`Http failure response for ${o.url||"(unknown url)"}: ${o.status} ${o.statusText}`,this.error=o.error||null}},ng=200;var og=/^\)\]\}',?\n/,MS=1024*1024,Mm=new k("",{factory:()=>null}),$r=(()=>{class i{fetchImpl=m(Ol,{optional:!0})?.fetch??((...e)=>globalThis.fetch(...e));ngZone=m($);destroyRef=m(Vt);maxResponseSize=m(Mm);handle(e){return new Nt(t=>{let n=new AbortController;this.doRequest(e,n.signal,t).then(Fl,r=>t.error(new Ht({error:r})));let a;return e.timeout&&(a=this.ngZone.runOutsideAngular(()=>setTimeout(()=>{n.signal.aborted||n.abort(new DOMException("signal timed out","TimeoutError"))},e.timeout))),()=>{a!==void 0&&clearTimeout(a),n.abort()}})}doRequest(e,t,n){return q(this,null,function*(){let a=this.createRequestInit(e),r;try{let pe=this.ngZone.runOutsideAngular(()=>this.fetchImpl(e.urlWithParams,V({signal:t},a)));ag(pe),n.next({type:To.Sent}),r=yield pe}catch(pe){n.error(new Ht({error:pe,status:pe.status??0,statusText:pe.statusText,url:e.urlWithParams,headers:pe.headers}));return}let u=new rn(r.headers),h=r.statusText,f=r.url||e.urlWithParams,b=r.status,M=null,j=e.reportProgress||e.reportDownloadProgress;if(j&&n.next(new Ur({headers:u,status:b,statusText:h,url:f})),r.body){let pe=r.headers.get("content-length"),Oe=pe!==null?Number(pe):NaN;this.maxResponseSize!==null&&Number.isFinite(Oe)&&Oe>this.maxResponseSize&&Dm(this.maxResponseSize);let ht=[],Ci=r.body.getReader(),Vi=0,fn,xi,cr=typeof Zone<"u"&&Zone.current,go=!1;if(yield this.ngZone.runOutsideAngular(()=>q(this,null,function*(){for(;;){if(this.destroyRef.destroyed){yield Ci.cancel(),go=!0;break}let{done:sa,value:Ys}=yield Ci.read();if(sa)break;if(ht.push(Ys),Vi+=Ys.length,this.maxResponseSize!==null&&Vi>this.maxResponseSize&&(yield Ci.cancel(),Dm(this.maxResponseSize)),j){xi=e.responseType==="text"?(xi??"")+(fn??=new TextDecoder).decode(Ys,{stream:!0}):void 0;let id=()=>n.next({type:To.DownloadProgress,total:Number.isFinite(Oe)?Oe:void 0,loaded:Vi,partialText:xi});cr?cr.run(id):id()}}})),go){n.complete();return}let Gn=this.concatChunks(ht,Vi);try{let sa=r.headers.get(Rl)??"";M=this.parseBody(e,Gn,sa,b)}catch(sa){n.error(new Ht({error:sa,headers:new rn(r.headers),status:r.status,statusText:r.statusText,url:r.url||e.urlWithParams}));return}}b===0&&(b=M?ng:0);let G=b>=200&&b<300,de=r.redirected,Ce=r.type;G?(n.next(new Da({body:M,headers:u,status:b,statusText:h,url:f,redirected:de,responseType:Ce})),n.complete()):n.error(new Ht({error:M,headers:u,status:b,statusText:h,url:f,redirected:de,responseType:Ce}))})}parseBody(e,t,n,a){switch(e.responseType){case"json":let r=new TextDecoder().decode(t).replace(og,"");if(r==="")return null;try{return JSON.parse(r)}catch(u){if(a<200||a>=300)return r;throw u}case"text":return new TextDecoder().decode(t);case"blob":return new Blob([t],{type:n});case"arraybuffer":return t.buffer}}createRequestInit(e){if(e.reportUploadProgress)throw new he(2824,!1);let t={},n;if(n=e.credentials,e.withCredentials&&(n="include"),e.headers.forEach((a,r)=>t[a]=r.join(",")),e.headers.has(wm)||(t[wm]=ig),!e.headers.has(Rl)){let a=e.detectContentTypeHeader();a!==null&&(t[Rl]=a)}return{body:e.serializeBody(),method:e.method,headers:t,credentials:n,keepalive:e.keepalive,cache:e.cache,priority:e.priority,mode:e.mode,redirect:e.redirect,referrer:e.referrer,integrity:e.integrity,referrerPolicy:e.referrerPolicy}}concatChunks(e,t){let n=new Uint8Array(t),a=0;for(let r of e)n.set(r,a),a+=r.length;return n}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})(),Ol=class{};function Fl(){}function ag(i){i.then(Fl,Fl)}function Dm(i){throw new he(-2825,!1)}function rg(i,o){return o(i)}function sg(i,o,e){return(t,n)=>md(e,()=>o(t,a=>i(a,n)))}var Nl=new k("",{factory:()=>[]}),Em=new k(""),Tm=new k("",{factory:()=>!0});var Ll=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275prov=ae({token:i,factory:function(t){let n=null;return t?n=new(t||i):n=me($r),n},providedIn:"root"})}return i})();var Gr=(()=>{class i{backend;injector;chain=null;pendingTasks=m(nl);contributeToStability=m(Tm);constructor(e,t){this.backend=e,this.injector=t}handle(e){if(this.chain===null){let t=Array.from(new Set([...this.injector.get(Nl),...this.injector.get(Em,[])]));this.chain=t.reduceRight((n,a)=>sg(n,a,this.injector),rg)}if(this.contributeToStability){let t=this.pendingTasks.add();return this.chain(e,n=>this.backend.handle(n)).pipe(fr(t))}else return this.chain(e,t=>this.backend.handle(t))}static \u0275fac=function(t){return new(t||i)(me(Ll),me(Di))};static \u0275prov=ae({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),Vl=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275prov=ae({token:i,factory:function(t){let n=null;return t?n=new(t||i):n=me(Gr),n},providedIn:"root"})}return i})();function Pl(i,o){return V({body:o},i)}var It=(()=>{class i{handler;constructor(e){this.handler=e}request(e,t,n={}){let a;if(e instanceof Eo)a=e;else{let h;n.headers instanceof rn?h=n.headers:h=new rn(n.headers);let f;n.params&&(n.params instanceof an?f=n.params:f=new an({fromObject:n.params})),a=new Eo(e,t,n.body!==void 0?n.body:null,{headers:h,context:n.context,params:f,reportProgress:n.reportProgress,reportUploadProgress:n.reportUploadProgress,reportDownloadProgress:n.reportDownloadProgress,responseType:n.responseType||"json",withCredentials:n.withCredentials,transferCache:n.transferCache,keepalive:n.keepalive,priority:n.priority,cache:n.cache,mode:n.mode,redirect:n.redirect,credentials:n.credentials,referrer:n.referrer,referrerPolicy:n.referrerPolicy,integrity:n.integrity,timeout:n.timeout})}let r=ge(a).pipe(rd(h=>this.handler.handle(h)));if(e instanceof Eo||n.observe==="events")return r;let u=r.pipe(ke(h=>h instanceof Da));switch(n.observe||"body"){case"body":switch(a.responseType){case"arraybuffer":return u.pipe(Ve(h=>{if(h.body!==null&&!(h.body instanceof ArrayBuffer))throw new he(2806,!1);return h.body}));case"blob":return u.pipe(Ve(h=>{if(h.body!==null&&!(h.body instanceof Blob))throw new he(2807,!1);return h.body}));case"text":return u.pipe(Ve(h=>{if(h.body!==null&&typeof h.body!="string")throw new he(2808,!1);return h.body}));default:return u.pipe(Ve(h=>h.body))}case"response":return u;default:throw new he(2809,!1)}}delete(e,t={}){return this.request("DELETE",e,t)}get(e,t={}){return this.request("GET",e,t)}head(e,t={}){return this.request("HEAD",e,t)}jsonp(e,t){return this.request("JSONP",e,{params:new an().append(t,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(e,t={}){return this.request("OPTIONS",e,t)}patch(e,t,n={}){return this.request("PATCH",e,Pl(n,t))}post(e,t,n={}){return this.request("POST",e,Pl(n,t))}put(e,t,n={}){return this.request("PUT",e,Pl(n,t))}static \u0275fac=function(t){return new(t||i)(me(Vl))};static \u0275prov=ae({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var lg=new k("",{factory:()=>!0}),cg="XSRF-TOKEN",dg=new k("",{factory:()=>cg}),mg="X-XSRF-TOKEN",ug=new k("",{factory:()=>mg}),hg=(()=>{class i{cookieName=m(dg);doc=m(K);lastCookieString="";lastToken=null;parseCount=0;getToken(){let e=this.doc.cookie||"";return e!==this.lastCookieString&&(this.parseCount++,this.lastToken=ba(e,this.cookieName),this.lastCookieString=e),this.lastToken}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})(),Am=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275prov=ae({token:i,factory:function(t){let n=null;return t?n=new(t||i):n=me(hg),n},providedIn:"root"})}return i})();function pg(i,o){if(!m(lg)||i.method==="GET"||i.method==="HEAD")return o(i);try{let n=m(Mo).href,{origin:a}=new URL(n),{origin:r}=new URL(i.url,a);if(a!==r)return o(i)}catch(n){return o(i)}let e=m(Am).getToken(),t=m(ug);return e!=null&&!i.headers.has(t)&&(i=i.clone({headers:i.headers.set(t,e)})),o(i)}var Bl=(function(i){return i[i.Interceptors=0]="Interceptors",i[i.LegacyInterceptors=1]="LegacyInterceptors",i[i.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",i[i.NoXsrfProtection=3]="NoXsrfProtection",i[i.JsonpSupport=4]="JsonpSupport",i[i.RequestsMadeViaParent=5]="RequestsMadeViaParent",i[i.Fetch=6]="Fetch",i[i.Xhr=7]="Xhr",i})(Bl||{});function fg(i,o){return{\u0275kind:i,\u0275providers:o}}function zl(...i){let o=[It,$r,Gr,{provide:Vl,useExisting:Gr},{provide:Ll,useFactory:()=>m($r)},{provide:Nl,useValue:pg,multi:!0}];for(let e of i)o.push(...e.\u0275providers);return ca(o)}function jl(i){return fg(Bl.Interceptors,i.map(o=>({provide:Nl,useValue:o,multi:!0})))}var Sa=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275prov=ae({token:i,factory:function(t){let n=null;return t?n=new(t||i):n=me(vg),n},providedIn:"root"})}return i})(),vg=(()=>{class i extends Sa{_doc=m(K);sanitize(e,t){if(t==null)return null;switch(e){case zt.NONE:return t;case zt.HTML:return xo(t,"HTML")?Co(t):Cd(this._doc,String(t)).toString();case zt.STYLE:return xo(t,"Style")?Co(t):t;case zt.SCRIPT:if(xo(t,"Script"))return Co(t);throw new he(5200,!1);case zt.URL:return xo(t,"URL")?Co(t):yd(String(t));case zt.RESOURCE_URL:if(xo(t,"ResourceURL"))return Co(t);throw new he(5201,!1);default:throw new he(5202,!1)}}bypassSecurityTrustHtml(e){return fd(e)}bypassSecurityTrustStyle(e){return gd(e)}bypassSecurityTrustScript(e){return _d(e)}bypassSecurityTrustUrl(e){return vd(e)}bypassSecurityTrustResourceUrl(e){return bd(e)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();var yg=(()=>{class i extends Sr{constructor(e,t,n){super(e,t,n)}ngOnDestroy(){this.flush()}static \u0275fac=function(t){return new(t||i)(me(K),me(ha),me(Dr))};static \u0275prov=ae({token:i,factory:i.\u0275fac})}return i})();function Cg(){return new Nd}function xg(){return new Vd(m(Kn),m(Sr),m($))}var Im=[{provide:Dr,useFactory:Cg},{provide:Sr,useClass:yg},{provide:ct,useFactory:xg}],M1=[{provide:ha,useClass:Fd},{provide:nn,useValue:"NoopAnimations"},...Im],wg=[{provide:ha,useFactory:()=>new Ld},{provide:nn,useFactory:()=>"BrowserAnimations"},...Im];function Rm(){return vr("NgEagerAnimations"),[...wg]}var Dg="@",Sg=(()=>{class i{doc;delegate;zone;animationType;moduleImpl;_rendererFactoryPromise=null;scheduler=null;injector=m(Z);loadingSchedulerFn=m(kg,{optional:!0});_engine;constructor(e,t,n,a,r){this.doc=e,this.delegate=t,this.zone=n,this.animationType=a,this.moduleImpl=r}ngOnDestroy(){this._engine?.flush()}loadImpl(){let e=()=>this.moduleImpl??import("./chunk-P5KEWYS5.js").then(n=>n),t;return this.loadingSchedulerFn?t=this.loadingSchedulerFn(e):t=e(),t.catch(n=>{throw new he(5300,!1)}).then(({\u0275createEngine:n,\u0275AnimationRendererFactory:a})=>{this._engine=n(this.animationType,this.doc);let r=new a(this.delegate,this._engine,this.zone);return this.delegate=r,r})}createRenderer(e,t){let n=this.delegate.createRenderer(e,t);if(n.\u0275type===0)return n;typeof n.throwOnSyntheticProps=="boolean"&&(n.throwOnSyntheticProps=!1);let a=new Hl(n);return t?.data?.animation&&!this._rendererFactoryPromise&&(this._rendererFactoryPromise=this.loadImpl()),this._rendererFactoryPromise?.then(r=>{let u=r.createRenderer(e,t);a.use(u),this.scheduler??=this.injector.get(hd,null,{optional:!0}),this.scheduler?.notify(10)}).catch(r=>{a.use(n)}),a}begin(){this.delegate.begin?.()}end(){this.delegate.end?.()}whenRenderingDone(){return this.delegate.whenRenderingDone?.()??Promise.resolve()}componentReplaced(e){this._engine?.flush(),this.delegate.componentReplaced?.(e)}static \u0275fac=function(t){br()};static \u0275prov=ae({token:i,factory:i.\u0275fac})}return i})(),Hl=class{delegate;replay=[];\u0275type=1;constructor(o){this.delegate=o}use(o){if(this.delegate=o,this.replay!==null){for(let e of this.replay)e(o);this.replay=null}}get data(){return this.delegate.data}destroy(){this.replay=null,this.delegate.destroy()}createElement(o,e){return this.delegate.createElement(o,e)}createComment(o){return this.delegate.createComment(o)}createText(o){return this.delegate.createText(o)}get destroyNode(){return this.delegate.destroyNode}appendChild(o,e){this.delegate.appendChild(o,e)}insertBefore(o,e,t,n){this.delegate.insertBefore(o,e,t,n)}removeChild(o,e,t,n){this.delegate.removeChild(o,e,t,n)}selectRootElement(o,e){return this.delegate.selectRootElement(o,e)}parentNode(o){return this.delegate.parentNode(o)}nextSibling(o){return this.delegate.nextSibling(o)}setAttribute(o,e,t,n){this.delegate.setAttribute(o,e,t,n)}removeAttribute(o,e,t){this.delegate.removeAttribute(o,e,t)}addClass(o,e){this.delegate.addClass(o,e)}removeClass(o,e){this.delegate.removeClass(o,e)}setStyle(o,e,t,n){this.delegate.setStyle(o,e,t,n)}removeStyle(o,e,t){this.delegate.removeStyle(o,e,t)}setProperty(o,e,t){this.shouldReplay(e)&&this.replay.push(n=>n.setProperty(o,e,t)),this.delegate.setProperty(o,e,t)}setValue(o,e){this.delegate.setValue(o,e)}listen(o,e,t,n){return this.shouldReplay(e)&&this.replay.push(a=>a.listen(o,e,t,n)),this.delegate.listen(o,e,t,n)}shouldReplay(o){return this.replay!==null&&o.startsWith(Dg)}},kg=new k("");function Pm(i="animations"){return vr("NgAsyncAnimations"),ca([{provide:ct,useFactory:()=>new Sg(m(K),m(Kn),m($),i)},{provide:nn,useValue:i==="noop"?"NoopAnimations":"BrowserAnimations"}])}var Wr="asm_token";function Mg(i){return i instanceof Ht&&typeof i.error?.error=="string"?i.error.error:"Invalid password"}var qr=(()=>{class i{constructor(){this.http=m(It),this.authState=new _o(this.hasToken())}login(e){return q(this,null,function*(){try{let t=yield re(this.http.post("/api/auth/login",{password:e}));return localStorage.setItem(Wr,t.token),this.authState.next(!0),{ok:!0}}catch(t){return{ok:!1,message:Mg(t)}}})}logout(){localStorage.removeItem(Wr),this.authState.next(!1)}getToken(){return localStorage.getItem(Wr)}isAuthenticated(){return this.hasToken()}hasToken(){return!!localStorage.getItem(Wr)}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275prov=ae({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var Om=(i,o)=>{let e=m(qr),t=e.getToken(),n=i.url.includes("/api/auth/login"),a=t&&!n?i.clone({setHeaders:{Authorization:`Bearer ${t}`}}):i;return o(a).pipe(Et(r=>(r.status===401&&!n&&e.logout(),ur(()=>r))))};var Fm={providers:[Rd({eventCoalescing:!0}),zl(jl([Om])),Rm(),Pm()]};var Ul;try{Ul=typeof Intl<"u"&&Intl.v8BreakIterator}catch(i){Ul=!1}var fe=(()=>{class i{_platformId=m(bo);isBrowser=this._platformId?dm(this._platformId):typeof document=="object"&&!!document;EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent);TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent);BLINK=this.isBrowser&&!!(window.chrome||Ul)&&typeof CSS<"u"&&!this.EDGE&&!this.TRIDENT;WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT;IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window);FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent);ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT;SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT;static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();function sn(i){return Array.isArray(i)?i:[i]}var Nm=new Set,Xn,Io=(()=>{class i{_platform=m(fe);_nonce=m(yo,{optional:!0});_matchMedia;constructor(){this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):Tg}matchMedia(e){return(this._platform.WEBKIT||this._platform.BLINK)&&Eg(e,this._nonce),this._matchMedia(e)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();function Eg(i,o){if(!Nm.has(i))try{Xn||(Xn=document.createElement("style"),o&&Xn.setAttribute("nonce",o),Xn.setAttribute("type","text/css"),document.head.appendChild(Xn)),Xn.sheet&&(Xn.sheet.insertRule(`@media ${i.replace(/[{}]/g,"")} {body{ }}`,0),Nm.add(i))}catch(e){console.error(e)}}function Tg(i){return{matches:i==="all"||i==="",media:i,addListener:()=>{},removeListener:()=>{}}}var Yn=(()=>{class i{_mediaMatcher=m(Io);_zone=m($);_queries=new Map;_destroySubject=new O;ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(e){return Lm(sn(e)).some(n=>this._registerQuery(n).mql.matches)}observe(e){let n=Lm(sn(e)).map(r=>this._registerQuery(r).observable),a=vo(n);return a=ad(a.pipe(pt(1)),a.pipe(gr(1),Lt(0))),a.pipe(Ve(r=>{let u={matches:!1,breakpoints:{}};return r.forEach(({matches:h,query:f})=>{u.matches=u.matches||h,u.breakpoints[f]=h}),u}))}_registerQuery(e){if(this._queries.has(e))return this._queries.get(e);let t=this._mediaMatcher.matchMedia(e),a={observable:new Nt(r=>{let u=h=>this._zone.run(()=>r.next(h));return t.addListener(u),()=>{t.removeListener(u)}}).pipe(Ee(t),Ve(({matches:r})=>({query:e,matches:r})),ue(this._destroySubject)),mql:t};return this._queries.set(e,a),a}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();function Lm(i){return i.map(o=>o.split(",")).reduce((o,e)=>o.concat(e)).map(o=>o.trim())}var Kr={XSmall:"(max-width: 599.98px)",Small:"(min-width: 600px) and (max-width: 959.98px)",Medium:"(min-width: 960px) and (max-width: 1279.98px)",Large:"(min-width: 1280px) and (max-width: 1919.98px)",XLarge:"(min-width: 1920px)",Handset:"(max-width: 599.98px) and (orientation: portrait), (max-width: 959.98px) and (orientation: landscape)",Tablet:"(min-width: 600px) and (max-width: 839.98px) and (orientation: portrait), (min-width: 960px) and (max-width: 1279.98px) and (orientation: landscape)",Web:"(min-width: 840px) and (orientation: portrait), (min-width: 1280px) and (orientation: landscape)",HandsetPortrait:"(max-width: 599.98px) and (orientation: portrait)",TabletPortrait:"(min-width: 600px) and (max-width: 839.98px) and (orientation: portrait)",WebPortrait:"(min-width: 840px) and (orientation: portrait)",HandsetLandscape:"(max-width: 959.98px) and (orientation: landscape)",TabletLandscape:"(min-width: 960px) and (max-width: 1279.98px) and (orientation: landscape)",WebLandscape:"(min-width: 1280px) and (orientation: landscape)"};var Ag=new k("MATERIAL_ANIMATIONS"),Vm=null;function $l(){return m(Ag,{optional:!0})?.animationsDisabled||m(nn,{optional:!0})==="NoopAnimations"?"di-disabled":(Vm??=m(Io).matchMedia("(prefers-reduced-motion)").matches,Vm?"reduced-motion":"enabled")}function ye(){return $l()!=="enabled"}var Ig=new k("cdk-dir-doc",{providedIn:"root",factory:()=>m(K)}),Rg=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;function Bm(i){let o=i?.toLowerCase()||"";return o==="auto"&&typeof navigator<"u"&&navigator?.language?Rg.test(navigator.language)?"rtl":"ltr":o==="rtl"?"rtl":"ltr"}var Ze=(()=>{class i{get value(){return this.valueSignal()}valueSignal=E("ltr");change=new X;constructor(){let e=m(Ig,{optional:!0});if(e){let t=e.body?e.body.dir:null,n=e.documentElement?e.documentElement.dir:null;this.valueSignal.set(Bm(t||n||"ltr"))}}ngOnDestroy(){this.change.complete()}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();var ce=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=U({type:i});static \u0275inj=H({})}return i})();function Pg(i,o){i&1&&kt(0,"div",2)}var Og=new k("MAT_PROGRESS_BAR_DEFAULT_OPTIONS");var Hi=(()=>{class i{_elementRef=m(B);_ngZone=m($);_changeDetectorRef=m(se);_renderer=m(we);_cleanupTransitionEnd;constructor(){let e=$l(),t=m(Og,{optional:!0});this._isNoopAnimation=e==="di-disabled",e==="reduced-motion"&&this._elementRef.nativeElement.classList.add("mat-progress-bar-reduced-motion"),t&&(t.color&&(this.color=this._defaultColor=t.color),this.mode=t.mode||this.mode)}_isNoopAnimation;get color(){return this._color||this._defaultColor}set color(e){this._color=e}_color;_defaultColor="primary";get value(){return this._value}set value(e){this._value=zm(e||0),this._changeDetectorRef.markForCheck()}_value=0;get bufferValue(){return this._bufferValue||0}set bufferValue(e){this._bufferValue=zm(e||0),this._changeDetectorRef.markForCheck()}_bufferValue=0;animationEnd=new X;get mode(){return this._mode}set mode(e){this._mode=e,this._changeDetectorRef.markForCheck()}_mode="determinate";ngAfterViewInit(){this._ngZone.runOutsideAngular(()=>{this._cleanupTransitionEnd=this._renderer.listen(this._elementRef.nativeElement,"transitionend",this._transitionendHandler)})}ngOnDestroy(){this._cleanupTransitionEnd?.()}_getPrimaryBarTransform(){return`scaleX(${this._isIndeterminate()?1:this.value/100})`}_getBufferBarFlexBasis(){return`${this.mode==="buffer"?this.bufferValue:100}%`}_isIndeterminate(){return this.mode==="indeterminate"||this.mode==="query"}_transitionendHandler=e=>{this.animationEnd.observers.length===0||!e.target||!e.target.classList.contains("mdc-linear-progress__primary-bar")||(this.mode==="determinate"||this.mode==="buffer")&&this._ngZone.run(()=>this.animationEnd.next({value:this.value}))};static \u0275fac=function(t){return new(t||i)};static \u0275cmp=R({type:i,selectors:[["mat-progress-bar"]],hostAttrs:["role","progressbar","aria-valuemin","0","aria-valuemax","100","tabindex","-1",1,"mat-mdc-progress-bar","mdc-linear-progress"],hostVars:10,hostBindings:function(t,n){t&2&&(J("aria-valuenow",n._isIndeterminate()?null:n.value)("mode",n.mode),at("mat-"+n.color),p("_mat-animation-noopable",n._isNoopAnimation)("mdc-linear-progress--animation-ready",!n._isNoopAnimation)("mdc-linear-progress--indeterminate",n._isIndeterminate()))},inputs:{color:"color",value:[2,"value","value",jt],bufferValue:[2,"bufferValue","bufferValue",jt],mode:"mode"},outputs:{animationEnd:"animationEnd"},exportAs:["matProgressBar"],decls:7,vars:5,consts:[["aria-hidden","true",1,"mdc-linear-progress__buffer"],[1,"mdc-linear-progress__buffer-bar"],[1,"mdc-linear-progress__buffer-dots"],["aria-hidden","true",1,"mdc-linear-progress__bar","mdc-linear-progress__primary-bar"],[1,"mdc-linear-progress__bar-inner"],["aria-hidden","true",1,"mdc-linear-progress__bar","mdc-linear-progress__secondary-bar"]],template:function(t,n){t&1&&(Ne(0,"div",0),kt(1,"div",1),w(2,Pg,1,0,"div",2),qe(),Ne(3,"div",3),kt(4,"span",4),qe(),Ne(5,"div",5),kt(6,"span",4),qe()),t&2&&(c(),je("flex-basis",n._getBufferBarFlexBasis()),c(),D(n.mode==="buffer"?2:-1),c(),je("transform",n._getPrimaryBarTransform()))},styles:[`.mat-mdc-progress-bar {
3
3
  --mat-progress-bar-animation-multiplier: 1;
4
4
  display: block;
5
5
  text-align: start;
@@ -253,7 +253,7 @@ import{$ as ne,$a as yr,$b as Td,A as Et,Aa as Co,Ab as _e,B as rd,Ba as xo,Bb a
253
253
  transform: translateX(-10px);
254
254
  }
255
255
  }
256
- `],encapsulation:2})}return i})();function zm(i,o=0,e=100){return Math.max(o,Math.min(e,i))}var pi=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=U({type:i});static \u0275inj=H({imports:[ce]})}return i})();var Og=["*"];var Fg=new k("MAT_CARD_CONFIG"),Cn=(()=>{class i{appearance;constructor(){let e=m(Fg,{optional:!0});this.appearance=e?.appearance||"raised"}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=R({type:i,selectors:[["mat-card"]],hostAttrs:[1,"mat-mdc-card","mdc-card"],hostVars:8,hostBindings:function(t,n){t&2&&p("mat-mdc-card-outlined",n.appearance==="outlined")("mdc-card--outlined",n.appearance==="outlined")("mat-mdc-card-filled",n.appearance==="filled")("mdc-card--filled",n.appearance==="filled")},inputs:{appearance:"appearance"},exportAs:["matCard"],ngContentSelectors:Og,decls:1,vars:0,template:function(t,n){t&1&&(ve(),W(0))},styles:[`.mat-mdc-card {
256
+ `],encapsulation:2})}return i})();function zm(i,o=0,e=100){return Math.max(o,Math.min(e,i))}var pi=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=U({type:i});static \u0275inj=H({imports:[ce]})}return i})();var Fg=["*"];var Ng=new k("MAT_CARD_CONFIG"),Cn=(()=>{class i{appearance;constructor(){let e=m(Ng,{optional:!0});this.appearance=e?.appearance||"raised"}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=R({type:i,selectors:[["mat-card"]],hostAttrs:[1,"mat-mdc-card","mdc-card"],hostVars:8,hostBindings:function(t,n){t&2&&p("mat-mdc-card-outlined",n.appearance==="outlined")("mdc-card--outlined",n.appearance==="outlined")("mat-mdc-card-filled",n.appearance==="filled")("mdc-card--filled",n.appearance==="filled")},inputs:{appearance:"appearance"},exportAs:["matCard"],ngContentSelectors:Fg,decls:1,vars:0,template:function(t,n){t&1&&(ve(),W(0))},styles:[`.mat-mdc-card {
257
257
  display: flex;
258
258
  flex-direction: column;
259
259
  box-sizing: border-box;
@@ -423,7 +423,7 @@ import{$ as ne,$a as yr,$b as Td,A as Et,Aa as Co,Ab as _e,B as rd,Ba as xo,Bb a
423
423
  .mat-mdc-card-actions-align-end {
424
424
  justify-content: flex-end;
425
425
  }
426
- `],encapsulation:2})}return i})();var xn=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,selectors:[["mat-card-content"]],hostAttrs:[1,"mat-mdc-card-content"]})}return i})();var wn=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=U({type:i});static \u0275inj=H({imports:[ce]})}return i})();function ti(i,o=0){return jm(i)?Number(i):arguments.length===2?o:0}function jm(i){return!isNaN(parseFloat(i))&&!isNaN(Number(i))}function Ht(i){return i instanceof B?i.nativeElement:i}function nt(i){return i==null?"":typeof i=="string"?i:`${i}px`}function gt(i){return i!=null&&`${i}`!="false"}var Ei=(function(i){return i[i.NORMAL=0]="NORMAL",i[i.NEGATED=1]="NEGATED",i[i.INVERTED=2]="INVERTED",i})(Ei||{}),Yr,Zn;function Zr(){if(Zn==null){if(typeof document!="object"||!document||typeof Element!="function"||!Element)return Zn=!1,Zn;if(document.documentElement?.style&&"scrollBehavior"in document.documentElement.style)Zn=!0;else{let i=Element.prototype.scrollTo;i?Zn=!/\{\s*\[native code\]\s*\}/.test(i.toString()):Zn=!1}}return Zn}function Ro(){if(typeof document!="object"||!document)return Ei.NORMAL;if(Yr==null){let i=document.createElement("div"),o=i.style;i.dir="rtl",o.width="1px",o.overflow="auto",o.visibility="hidden",o.pointerEvents="none",o.position="absolute";let e=document.createElement("div"),t=e.style;t.width="2px",t.height="1px",i.appendChild(e),document.body.appendChild(i),Yr=Ei.NORMAL,i.scrollLeft===0&&(i.scrollLeft=1,Yr=i.scrollLeft===0?Ei.NEGATED:Ei.INVERTED),i.remove()}return Yr}var Gl;function Hm(){if(Gl==null){let i=typeof document<"u"?document.head:null;Gl=!!(i&&(i.createShadowRoot||i.attachShadow))}return Gl}function Wl(i){if(Hm()){let o=i.getRootNode?i.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&o instanceof ShadowRoot)return o}return null}function Dn(){let i=typeof document<"u"&&document?document.activeElement:null;for(;i&&i.shadowRoot;){let o=i.shadowRoot.activeElement;if(o===i)break;i=o}return i}function mt(i){if(i.composedPath)try{return i.composedPath()[0]}catch(o){}return i.target}function ql(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}var Ma;function Um(){if(Ma==null&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>Ma=!0}))}finally{Ma=Ma||!1}return Ma}function Po(i){return Um()?i:!!i.capture}var Oo,$m=["color","button","checkbox","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"];function Kl(){if(Oo)return Oo;if(typeof document!="object"||!document)return Oo=new Set($m),Oo;let i=document.createElement("input");return Oo=new Set($m.filter(o=>(i.setAttribute("type",o),i.type===o))),Oo}var Qr=new WeakMap,Be=(()=>{class i{_appRef;_injector=m(Z);_environmentInjector=m(Di);load(e){let t=this._appRef=this._appRef||this._injector.get(bn),n=Qr.get(t);n||(n={loaders:new Set,refs:[]},Qr.set(t,n),t.onDestroy(()=>{Qr.get(t)?.refs.forEach(a=>a.destroy()),Qr.delete(t)})),n.loaders.has(e)||(n.loaders.add(e),n.refs.push(wr(e,{environmentInjector:this._environmentInjector})))}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();var Ng=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275cmp=R({type:i,selectors:[["ng-component"]],hostAttrs:["cdk-text-field-style-loader",""],decls:0,vars:0,template:function(t,n){},styles:[`textarea.cdk-textarea-autosize {
426
+ `],encapsulation:2})}return i})();var xn=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,selectors:[["mat-card-content"]],hostAttrs:[1,"mat-mdc-card-content"]})}return i})();var wn=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=U({type:i});static \u0275inj=H({imports:[ce]})}return i})();function ti(i,o=0){return jm(i)?Number(i):arguments.length===2?o:0}function jm(i){return!isNaN(parseFloat(i))&&!isNaN(Number(i))}function Ut(i){return i instanceof B?i.nativeElement:i}function nt(i){return i==null?"":typeof i=="string"?i:`${i}px`}function gt(i){return i!=null&&`${i}`!="false"}var Ei=(function(i){return i[i.NORMAL=0]="NORMAL",i[i.NEGATED=1]="NEGATED",i[i.INVERTED=2]="INVERTED",i})(Ei||{}),Yr,Zn;function Zr(){if(Zn==null){if(typeof document!="object"||!document||typeof Element!="function"||!Element)return Zn=!1,Zn;if(document.documentElement?.style&&"scrollBehavior"in document.documentElement.style)Zn=!0;else{let i=Element.prototype.scrollTo;i?Zn=!/\{\s*\[native code\]\s*\}/.test(i.toString()):Zn=!1}}return Zn}function Ro(){if(typeof document!="object"||!document)return Ei.NORMAL;if(Yr==null){let i=document.createElement("div"),o=i.style;i.dir="rtl",o.width="1px",o.overflow="auto",o.visibility="hidden",o.pointerEvents="none",o.position="absolute";let e=document.createElement("div"),t=e.style;t.width="2px",t.height="1px",i.appendChild(e),document.body.appendChild(i),Yr=Ei.NORMAL,i.scrollLeft===0&&(i.scrollLeft=1,Yr=i.scrollLeft===0?Ei.NEGATED:Ei.INVERTED),i.remove()}return Yr}var Gl;function Hm(){if(Gl==null){let i=typeof document<"u"?document.head:null;Gl=!!(i&&(i.createShadowRoot||i.attachShadow))}return Gl}function Wl(i){if(Hm()){let o=i.getRootNode?i.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&o instanceof ShadowRoot)return o}return null}function Dn(){let i=typeof document<"u"&&document?document.activeElement:null;for(;i&&i.shadowRoot;){let o=i.shadowRoot.activeElement;if(o===i)break;i=o}return i}function mt(i){if(i.composedPath)try{return i.composedPath()[0]}catch(o){}return i.target}function ql(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}var Ma;function Um(){if(Ma==null&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>Ma=!0}))}finally{Ma=Ma||!1}return Ma}function Po(i){return Um()?i:!!i.capture}var Oo,$m=["color","button","checkbox","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"];function Kl(){if(Oo)return Oo;if(typeof document!="object"||!document)return Oo=new Set($m),Oo;let i=document.createElement("input");return Oo=new Set($m.filter(o=>(i.setAttribute("type",o),i.type===o))),Oo}var Qr=new WeakMap,Be=(()=>{class i{_appRef;_injector=m(Z);_environmentInjector=m(Di);load(e){let t=this._appRef=this._appRef||this._injector.get(bn),n=Qr.get(t);n||(n={loaders:new Set,refs:[]},Qr.set(t,n),t.onDestroy(()=>{Qr.get(t)?.refs.forEach(a=>a.destroy()),Qr.delete(t)})),n.loaders.has(e)||(n.loaders.add(e),n.refs.push(wr(e,{environmentInjector:this._environmentInjector})))}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();var Lg=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275cmp=R({type:i,selectors:[["ng-component"]],hostAttrs:["cdk-text-field-style-loader",""],decls:0,vars:0,template:function(t,n){},styles:[`textarea.cdk-textarea-autosize {
427
427
  resize: none;
428
428
  }
429
429
 
@@ -449,7 +449,7 @@ textarea.cdk-textarea-autosize-measuring-firefox {
449
449
  .cdk-text-field-autofill-monitored:not(:-webkit-autofill) {
450
450
  animation: cdk-text-field-autofill-end 0s 1ms;
451
451
  }
452
- `],encapsulation:2})}return i})(),Lg={passive:!0},Gm=(()=>{class i{_platform=m(fe);_ngZone=m($);_renderer=m(ct).createRenderer(null,null);_styleLoader=m(Be);_monitoredElements=new Map;monitor(e){if(!this._platform.isBrowser)return mr;this._styleLoader.load(Ng);let t=Ht(e),n=this._monitoredElements.get(t);if(n)return n.subject;let a=new O,r="cdk-text-field-autofilled",u=f=>{f.animationName==="cdk-text-field-autofill-start"&&!t.classList.contains(r)?(t.classList.add(r),this._ngZone.run(()=>a.next({target:f.target,isAutofilled:!0}))):f.animationName==="cdk-text-field-autofill-end"&&t.classList.contains(r)&&(t.classList.remove(r),this._ngZone.run(()=>a.next({target:f.target,isAutofilled:!1})))},h=this._ngZone.runOutsideAngular(()=>(t.classList.add("cdk-text-field-autofill-monitored"),this._renderer.listen(t,"animationstart",u,Lg)));return this._monitoredElements.set(t,{subject:a,unlisten:h}),a}stopMonitoring(e){let t=Ht(e),n=this._monitoredElements.get(t);n&&(n.unlisten(),n.subject.complete(),t.classList.remove("cdk-text-field-autofill-monitored"),t.classList.remove("cdk-text-field-autofilled"),this._monitoredElements.delete(t))}ngOnDestroy(){this._monitoredElements.forEach((e,t)=>this.stopMonitoring(t))}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();var Wm=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=U({type:i});static \u0275inj=H({})}return i})();function Qn(i){return i.buttons===0||i.detail===0}function Jn(i){let o=i.touches&&i.touches[0]||i.changedTouches&&i.changedTouches[0];return!!o&&o.identifier===-1&&(o.radiusX==null||o.radiusX===1)&&(o.radiusY==null||o.radiusY===1)}var qm=new k("cdk-input-modality-detector-options"),Km={ignoreKeys:[18,17,224,91,16]},Xm=650,Xl={passive:!0,capture:!0},Ym=(()=>{class i{_platform=m(fe);_listenerCleanups;modalityDetected;modalityChanged;get mostRecentModality(){return this._modality.value}_mostRecentTarget=null;_modality=new _o(null);_options;_lastTouchMs=0;_onKeydown=e=>{this._options?.ignoreKeys?.some(t=>t===e.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=mt(e))};_onMousedown=e=>{Date.now()-this._lastTouchMs<Xm||(this._modality.next(Qn(e)?"keyboard":"mouse"),this._mostRecentTarget=mt(e))};_onTouchstart=e=>{if(Jn(e)){this._modality.next("keyboard");return}this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=mt(e)};constructor(){let e=m($),t=m(K),n=m(qm,{optional:!0});if(this._options=V(V({},Km),n),this.modalityDetected=this._modality.pipe(gr(1)),this.modalityChanged=this.modalityDetected.pipe(ci()),this._platform.isBrowser){let a=m(ct).createRenderer(null,null);this._listenerCleanups=e.runOutsideAngular(()=>[a.listen(t,"keydown",this._onKeydown,Xl),a.listen(t,"mousedown",this._onMousedown,Xl),a.listen(t,"touchstart",this._onTouchstart,Xl)])}}ngOnDestroy(){this._modality.complete(),this._listenerCleanups?.forEach(e=>e())}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})(),Ea=(function(i){return i[i.IMMEDIATE=0]="IMMEDIATE",i[i.EVENTUAL=1]="EVENTUAL",i})(Ea||{}),Zm=new k("cdk-focus-monitor-default-options"),Jr=Po({passive:!0,capture:!0}),Xt=(()=>{class i{_ngZone=m($);_platform=m(fe);_inputModalityDetector=m(Ym);_origin=null;_lastFocusOrigin=null;_windowFocused=!1;_windowFocusTimeoutId;_originTimeoutId;_originFromTouchInteraction=!1;_elementInfo=new Map;_monitoredElementCount=0;_rootNodeFocusListenerCount=new Map;_detectionMode;_windowFocusListener=()=>{this._windowFocused=!0,this._windowFocusTimeoutId=setTimeout(()=>this._windowFocused=!1)};_document=m(K);_stopInputModalityDetector=new O;constructor(){let e=m(Zm,{optional:!0});this._detectionMode=e?.detectionMode||Ea.IMMEDIATE}_rootNodeFocusAndBlurListener=e=>{let t=mt(e);for(let n=t;n;n=n.parentElement)e.type==="focus"?this._onFocus(e,n):this._onBlur(e,n)};monitor(e,t=!1){let n=Ht(e);if(!this._platform.isBrowser||n.nodeType!==1)return ge();let a=Wl(n)||this._document,r=this._elementInfo.get(n);if(r)return t&&(r.checkChildren=!0),r.subject;let u={checkChildren:t,subject:new O,rootNode:a};return this._elementInfo.set(n,u),this._registerGlobalListeners(u),u.subject}stopMonitoring(e){let t=Ht(e),n=this._elementInfo.get(t);n&&(n.subject.complete(),this._setClasses(t),this._elementInfo.delete(t),this._removeGlobalListeners(n))}focusVia(e,t,n){let a=Ht(e),r=this._document.activeElement;a===r?this._getClosestElementsInfo(a).forEach(([u,h])=>this._originChanged(u,t,h)):(this._setOrigin(t),typeof a.focus=="function"&&a.focus(n))}ngOnDestroy(){this._elementInfo.forEach((e,t)=>this.stopMonitoring(t))}_getWindow(){return this._document.defaultView||window}_getFocusOrigin(e){return this._origin?this._originFromTouchInteraction?this._shouldBeAttributedToTouch(e)?"touch":"program":this._origin:this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:e&&this._isLastInteractionFromInputLabel(e)?"mouse":"program"}_shouldBeAttributedToTouch(e){return this._detectionMode===Ea.EVENTUAL||!!e?.contains(this._inputModalityDetector._mostRecentTarget)}_setClasses(e,t){e.classList.toggle("cdk-focused",!!t),e.classList.toggle("cdk-touch-focused",t==="touch"),e.classList.toggle("cdk-keyboard-focused",t==="keyboard"),e.classList.toggle("cdk-mouse-focused",t==="mouse"),e.classList.toggle("cdk-program-focused",t==="program")}_setOrigin(e,t=!1){this._ngZone.runOutsideAngular(()=>{if(this._origin=e,this._originFromTouchInteraction=e==="touch"&&t,this._detectionMode===Ea.IMMEDIATE){clearTimeout(this._originTimeoutId);let n=this._originFromTouchInteraction?Xm:1;this._originTimeoutId=setTimeout(()=>this._origin=null,n)}})}_onFocus(e,t){let n=this._elementInfo.get(t),a=mt(e);!n||!n.checkChildren&&t!==a||this._originChanged(t,this._getFocusOrigin(a),n)}_onBlur(e,t){let n=this._elementInfo.get(t);!n||n.checkChildren&&e.relatedTarget instanceof Node&&t.contains(e.relatedTarget)||(this._setClasses(t),this._emitOrigin(n,null))}_emitOrigin(e,t){e.subject.observers.length&&this._ngZone.run(()=>e.subject.next(t))}_registerGlobalListeners(e){if(!this._platform.isBrowser)return;let t=e.rootNode,n=this._rootNodeFocusListenerCount.get(t)||0;n||this._ngZone.runOutsideAngular(()=>{t.addEventListener("focus",this._rootNodeFocusAndBlurListener,Jr),t.addEventListener("blur",this._rootNodeFocusAndBlurListener,Jr)}),this._rootNodeFocusListenerCount.set(t,n+1),++this._monitoredElementCount===1&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(ue(this._stopInputModalityDetector)).subscribe(a=>{this._setOrigin(a,!0)}))}_removeGlobalListeners(e){let t=e.rootNode;if(this._rootNodeFocusListenerCount.has(t)){let n=this._rootNodeFocusListenerCount.get(t);n>1?this._rootNodeFocusListenerCount.set(t,n-1):(t.removeEventListener("focus",this._rootNodeFocusAndBlurListener,Jr),t.removeEventListener("blur",this._rootNodeFocusAndBlurListener,Jr),this._rootNodeFocusListenerCount.delete(t))}--this._monitoredElementCount||(this._getWindow().removeEventListener("focus",this._windowFocusListener),this._stopInputModalityDetector.next(),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._originTimeoutId))}_originChanged(e,t,n){this._setClasses(e,t),this._emitOrigin(n,t),this._lastFocusOrigin=t}_getClosestElementsInfo(e){let t=[];return this._elementInfo.forEach((n,a)=>{(a===e||n.checkChildren&&a.contains(e))&&t.push([a,n])}),t}_isLastInteractionFromInputLabel(e){let{_mostRecentTarget:t,mostRecentModality:n}=this._inputModalityDetector;if(n!=="mouse"||!t||t===e||e.nodeName!=="INPUT"&&e.nodeName!=="TEXTAREA"||e.disabled)return!1;let a=e.labels;if(a){for(let r=0;r<a.length;r++)if(a[r].contains(t))return!0}return!1}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();var Sn=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275cmp=R({type:i,selectors:[["ng-component"]],exportAs:["cdkVisuallyHidden"],decls:0,vars:0,template:function(t,n){},styles:[`.cdk-visually-hidden {
452
+ `],encapsulation:2})}return i})(),Vg={passive:!0},Gm=(()=>{class i{_platform=m(fe);_ngZone=m($);_renderer=m(ct).createRenderer(null,null);_styleLoader=m(Be);_monitoredElements=new Map;monitor(e){if(!this._platform.isBrowser)return mr;this._styleLoader.load(Lg);let t=Ut(e),n=this._monitoredElements.get(t);if(n)return n.subject;let a=new O,r="cdk-text-field-autofilled",u=f=>{f.animationName==="cdk-text-field-autofill-start"&&!t.classList.contains(r)?(t.classList.add(r),this._ngZone.run(()=>a.next({target:f.target,isAutofilled:!0}))):f.animationName==="cdk-text-field-autofill-end"&&t.classList.contains(r)&&(t.classList.remove(r),this._ngZone.run(()=>a.next({target:f.target,isAutofilled:!1})))},h=this._ngZone.runOutsideAngular(()=>(t.classList.add("cdk-text-field-autofill-monitored"),this._renderer.listen(t,"animationstart",u,Vg)));return this._monitoredElements.set(t,{subject:a,unlisten:h}),a}stopMonitoring(e){let t=Ut(e),n=this._monitoredElements.get(t);n&&(n.unlisten(),n.subject.complete(),t.classList.remove("cdk-text-field-autofill-monitored"),t.classList.remove("cdk-text-field-autofilled"),this._monitoredElements.delete(t))}ngOnDestroy(){this._monitoredElements.forEach((e,t)=>this.stopMonitoring(t))}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();var Wm=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=U({type:i});static \u0275inj=H({})}return i})();function Qn(i){return i.buttons===0||i.detail===0}function Jn(i){let o=i.touches&&i.touches[0]||i.changedTouches&&i.changedTouches[0];return!!o&&o.identifier===-1&&(o.radiusX==null||o.radiusX===1)&&(o.radiusY==null||o.radiusY===1)}var qm=new k("cdk-input-modality-detector-options"),Km={ignoreKeys:[18,17,224,91,16]},Xm=650,Xl={passive:!0,capture:!0},Ym=(()=>{class i{_platform=m(fe);_listenerCleanups;modalityDetected;modalityChanged;get mostRecentModality(){return this._modality.value}_mostRecentTarget=null;_modality=new _o(null);_options;_lastTouchMs=0;_onKeydown=e=>{this._options?.ignoreKeys?.some(t=>t===e.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=mt(e))};_onMousedown=e=>{Date.now()-this._lastTouchMs<Xm||(this._modality.next(Qn(e)?"keyboard":"mouse"),this._mostRecentTarget=mt(e))};_onTouchstart=e=>{if(Jn(e)){this._modality.next("keyboard");return}this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=mt(e)};constructor(){let e=m($),t=m(K),n=m(qm,{optional:!0});if(this._options=V(V({},Km),n),this.modalityDetected=this._modality.pipe(gr(1)),this.modalityChanged=this.modalityDetected.pipe(ci()),this._platform.isBrowser){let a=m(ct).createRenderer(null,null);this._listenerCleanups=e.runOutsideAngular(()=>[a.listen(t,"keydown",this._onKeydown,Xl),a.listen(t,"mousedown",this._onMousedown,Xl),a.listen(t,"touchstart",this._onTouchstart,Xl)])}}ngOnDestroy(){this._modality.complete(),this._listenerCleanups?.forEach(e=>e())}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})(),Ea=(function(i){return i[i.IMMEDIATE=0]="IMMEDIATE",i[i.EVENTUAL=1]="EVENTUAL",i})(Ea||{}),Zm=new k("cdk-focus-monitor-default-options"),Jr=Po({passive:!0,capture:!0}),Yt=(()=>{class i{_ngZone=m($);_platform=m(fe);_inputModalityDetector=m(Ym);_origin=null;_lastFocusOrigin=null;_windowFocused=!1;_windowFocusTimeoutId;_originTimeoutId;_originFromTouchInteraction=!1;_elementInfo=new Map;_monitoredElementCount=0;_rootNodeFocusListenerCount=new Map;_detectionMode;_windowFocusListener=()=>{this._windowFocused=!0,this._windowFocusTimeoutId=setTimeout(()=>this._windowFocused=!1)};_document=m(K);_stopInputModalityDetector=new O;constructor(){let e=m(Zm,{optional:!0});this._detectionMode=e?.detectionMode||Ea.IMMEDIATE}_rootNodeFocusAndBlurListener=e=>{let t=mt(e);for(let n=t;n;n=n.parentElement)e.type==="focus"?this._onFocus(e,n):this._onBlur(e,n)};monitor(e,t=!1){let n=Ut(e);if(!this._platform.isBrowser||n.nodeType!==1)return ge();let a=Wl(n)||this._document,r=this._elementInfo.get(n);if(r)return t&&(r.checkChildren=!0),r.subject;let u={checkChildren:t,subject:new O,rootNode:a};return this._elementInfo.set(n,u),this._registerGlobalListeners(u),u.subject}stopMonitoring(e){let t=Ut(e),n=this._elementInfo.get(t);n&&(n.subject.complete(),this._setClasses(t),this._elementInfo.delete(t),this._removeGlobalListeners(n))}focusVia(e,t,n){let a=Ut(e),r=this._document.activeElement;a===r?this._getClosestElementsInfo(a).forEach(([u,h])=>this._originChanged(u,t,h)):(this._setOrigin(t),typeof a.focus=="function"&&a.focus(n))}ngOnDestroy(){this._elementInfo.forEach((e,t)=>this.stopMonitoring(t))}_getWindow(){return this._document.defaultView||window}_getFocusOrigin(e){return this._origin?this._originFromTouchInteraction?this._shouldBeAttributedToTouch(e)?"touch":"program":this._origin:this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:e&&this._isLastInteractionFromInputLabel(e)?"mouse":"program"}_shouldBeAttributedToTouch(e){return this._detectionMode===Ea.EVENTUAL||!!e?.contains(this._inputModalityDetector._mostRecentTarget)}_setClasses(e,t){e.classList.toggle("cdk-focused",!!t),e.classList.toggle("cdk-touch-focused",t==="touch"),e.classList.toggle("cdk-keyboard-focused",t==="keyboard"),e.classList.toggle("cdk-mouse-focused",t==="mouse"),e.classList.toggle("cdk-program-focused",t==="program")}_setOrigin(e,t=!1){this._ngZone.runOutsideAngular(()=>{if(this._origin=e,this._originFromTouchInteraction=e==="touch"&&t,this._detectionMode===Ea.IMMEDIATE){clearTimeout(this._originTimeoutId);let n=this._originFromTouchInteraction?Xm:1;this._originTimeoutId=setTimeout(()=>this._origin=null,n)}})}_onFocus(e,t){let n=this._elementInfo.get(t),a=mt(e);!n||!n.checkChildren&&t!==a||this._originChanged(t,this._getFocusOrigin(a),n)}_onBlur(e,t){let n=this._elementInfo.get(t);!n||n.checkChildren&&e.relatedTarget instanceof Node&&t.contains(e.relatedTarget)||(this._setClasses(t),this._emitOrigin(n,null))}_emitOrigin(e,t){e.subject.observers.length&&this._ngZone.run(()=>e.subject.next(t))}_registerGlobalListeners(e){if(!this._platform.isBrowser)return;let t=e.rootNode,n=this._rootNodeFocusListenerCount.get(t)||0;n||this._ngZone.runOutsideAngular(()=>{t.addEventListener("focus",this._rootNodeFocusAndBlurListener,Jr),t.addEventListener("blur",this._rootNodeFocusAndBlurListener,Jr)}),this._rootNodeFocusListenerCount.set(t,n+1),++this._monitoredElementCount===1&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(ue(this._stopInputModalityDetector)).subscribe(a=>{this._setOrigin(a,!0)}))}_removeGlobalListeners(e){let t=e.rootNode;if(this._rootNodeFocusListenerCount.has(t)){let n=this._rootNodeFocusListenerCount.get(t);n>1?this._rootNodeFocusListenerCount.set(t,n-1):(t.removeEventListener("focus",this._rootNodeFocusAndBlurListener,Jr),t.removeEventListener("blur",this._rootNodeFocusAndBlurListener,Jr),this._rootNodeFocusListenerCount.delete(t))}--this._monitoredElementCount||(this._getWindow().removeEventListener("focus",this._windowFocusListener),this._stopInputModalityDetector.next(),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._originTimeoutId))}_originChanged(e,t,n){this._setClasses(e,t),this._emitOrigin(n,t),this._lastFocusOrigin=t}_getClosestElementsInfo(e){let t=[];return this._elementInfo.forEach((n,a)=>{(a===e||n.checkChildren&&a.contains(e))&&t.push([a,n])}),t}_isLastInteractionFromInputLabel(e){let{_mostRecentTarget:t,mostRecentModality:n}=this._inputModalityDetector;if(n!=="mouse"||!t||t===e||e.nodeName!=="INPUT"&&e.nodeName!=="TEXTAREA"||e.disabled)return!1;let a=e.labels;if(a){for(let r=0;r<a.length;r++)if(a[r].contains(t))return!0}return!1}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();var Sn=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275cmp=R({type:i,selectors:[["ng-component"]],exportAs:["cdkVisuallyHidden"],decls:0,vars:0,template:function(t,n){},styles:[`.cdk-visually-hidden {
453
453
  border: 0;
454
454
  clip: rect(0 0 0 0);
455
455
  height: 1px;
@@ -468,7 +468,7 @@ textarea.cdk-textarea-autosize-measuring-firefox {
468
468
  left: auto;
469
469
  right: 0;
470
470
  }
471
- `],encapsulation:2})}return i})(),es;function Vg(){if(es===void 0&&(es=null,typeof window<"u")){let i=window;i.trustedTypes!==void 0&&(es=i.trustedTypes.createPolicy("angular#components",{createHTML:o=>o}))}return es}function eo(i){return Vg()?.createHTML(i)||i}function Qm(i,o,e){let t=e.sanitize(zt.HTML,o);i.innerHTML=eo(t||"")}function Bg(i){if(i.type==="characterData"&&i.target instanceof Comment)return!0;if(i.type==="childList"){for(let o=0;o<i.addedNodes.length;o++)if(!(i.addedNodes[o]instanceof Comment))return!1;for(let o=0;o<i.removedNodes.length;o++)if(!(i.removedNodes[o]instanceof Comment))return!1;return!0}return!1}var Jm=(()=>{class i{create(e){return typeof MutationObserver>"u"?null:new MutationObserver(e)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})(),eu=(()=>{class i{_mutationObserverFactory=m(Jm);_observedElements=new Map;_ngZone=m($);ngOnDestroy(){this._observedElements.forEach((e,t)=>this._cleanupObserver(t))}observe(e){let t=Ht(e);return new Nt(n=>{let r=this._observeElement(t).pipe(Ve(u=>u.filter(h=>!Bg(h))),ke(u=>!!u.length)).subscribe(u=>{this._ngZone.run(()=>{n.next(u)})});return()=>{r.unsubscribe(),this._unobserveElement(t)}})}_observeElement(e){return this._ngZone.runOutsideAngular(()=>{if(this._observedElements.has(e))this._observedElements.get(e).count++;else{let t=new O,n=this._mutationObserverFactory.create(a=>t.next(a));n&&n.observe(e,{characterData:!0,childList:!0,subtree:!0}),this._observedElements.set(e,{observer:n,stream:t,count:1})}return this._observedElements.get(e).stream})}_unobserveElement(e){this._observedElements.has(e)&&(this._observedElements.get(e).count--,this._observedElements.get(e).count||this._cleanupObserver(e))}_cleanupObserver(e){if(this._observedElements.has(e)){let{observer:t,stream:n}=this._observedElements.get(e);t&&t.disconnect(),n.complete(),this._observedElements.delete(e)}}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})(),tu=(()=>{class i{_contentObserver=m(eu);_elementRef=m(B);event=new X;get disabled(){return this._disabled}set disabled(e){this._disabled=e,this._disabled?this._unsubscribe():this._subscribe()}_disabled=!1;get debounce(){return this._debounce}set debounce(e){this._debounce=ti(e),this._subscribe()}_debounce;_currentSubscription=null;ngAfterContentInit(){!this._currentSubscription&&!this.disabled&&this._subscribe()}ngOnDestroy(){this._unsubscribe()}_subscribe(){this._unsubscribe();let e=this._contentObserver.observe(this._elementRef);this._currentSubscription=(this.debounce?e.pipe(Lt(this.debounce)):e).subscribe(this.event)}_unsubscribe(){this._currentSubscription?.unsubscribe()}static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,selectors:[["","cdkObserveContent",""]],inputs:{disabled:[2,"cdkObserveContentDisabled","disabled",z],debounce:"debounce"},outputs:{event:"cdkObserveContent"},exportAs:["cdkObserveContent"]})}return i})(),Fo=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=U({type:i});static \u0275inj=H({providers:[Jm]})}return i})();var Ql=(()=>{class i{_platform=m(fe);isDisabled(e){return e.hasAttribute("disabled")}isVisible(e){return jg(e)&&getComputedStyle(e).visibility==="visible"}isTabbable(e){if(!this._platform.isBrowser)return!1;let t=zg(Xg(e));if(t&&(iu(t)===-1||!this.isVisible(t)))return!1;let n=e.nodeName.toLowerCase(),a=iu(e);return e.hasAttribute("contenteditable")?a!==-1:n==="iframe"||n==="object"||this._platform.WEBKIT&&this._platform.IOS&&!qg(e)?!1:n==="audio"?e.hasAttribute("controls")?a!==-1:!1:n==="video"?a===-1?!1:a!==null?!0:this._platform.FIREFOX||e.hasAttribute("controls"):e.tabIndex>=0}isFocusable(e,t){return Kg(e)&&!this.isDisabled(e)&&(t?.ignoreVisibility||this.isVisible(e))}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();function zg(i){try{return i.frameElement}catch(o){return null}}function jg(i){return!!(i.offsetWidth||i.offsetHeight||typeof i.getClientRects=="function"&&i.getClientRects().length)}function Hg(i){let o=i.nodeName.toLowerCase();return o==="input"||o==="select"||o==="button"||o==="textarea"}function Ug(i){return Gg(i)&&i.type=="hidden"}function $g(i){return Wg(i)&&i.hasAttribute("href")}function Gg(i){return i.nodeName.toLowerCase()=="input"}function Wg(i){return i.nodeName.toLowerCase()=="a"}function au(i){if(!i.hasAttribute("tabindex")||i.tabIndex===void 0)return!1;let o=i.getAttribute("tabindex");return!!(o&&!isNaN(parseInt(o,10)))}function iu(i){if(!au(i))return null;let o=parseInt(i.getAttribute("tabindex")||"",10);return isNaN(o)?-1:o}function qg(i){let o=i.nodeName.toLowerCase(),e=o==="input"&&i.type;return e==="text"||e==="password"||o==="select"||o==="textarea"}function Kg(i){return Ug(i)?!1:Hg(i)||$g(i)||i.hasAttribute("contenteditable")||au(i)}function Xg(i){return i.ownerDocument&&i.ownerDocument.defaultView||window}var Zl=class{_element;_checker;_ngZone;_document;_injector;_startAnchor=null;_endAnchor=null;_hasAttached=!1;startAnchorListener=()=>this.focusLastTabbableElement();endAnchorListener=()=>this.focusFirstTabbableElement();get enabled(){return this._enabled}set enabled(o){this._enabled=o,this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(o,this._startAnchor),this._toggleAnchorTabIndex(o,this._endAnchor))}_enabled=!0;constructor(o,e,t,n,a=!1,r){this._element=o,this._checker=e,this._ngZone=t,this._document=n,this._injector=r,a||this.attachAnchors()}destroy(){let o=this._startAnchor,e=this._endAnchor;o&&(o.removeEventListener("focus",this.startAnchorListener),o.remove()),e&&(e.removeEventListener("focus",this.endAnchorListener),e.remove()),this._startAnchor=this._endAnchor=null,this._hasAttached=!1}attachAnchors(){return this._hasAttached?!0:(this._ngZone.runOutsideAngular(()=>{this._startAnchor||(this._startAnchor=this._createAnchor(),this._startAnchor.addEventListener("focus",this.startAnchorListener)),this._endAnchor||(this._endAnchor=this._createAnchor(),this._endAnchor.addEventListener("focus",this.endAnchorListener))}),this._element.parentNode&&(this._element.parentNode.insertBefore(this._startAnchor,this._element),this._element.parentNode.insertBefore(this._endAnchor,this._element.nextSibling),this._hasAttached=!0),this._hasAttached)}focusInitialElementWhenReady(o){return new Promise(e=>{this._executeOnStable(()=>e(this.focusInitialElement(o)))})}focusFirstTabbableElementWhenReady(o){return new Promise(e=>{this._executeOnStable(()=>e(this.focusFirstTabbableElement(o)))})}focusLastTabbableElementWhenReady(o){return new Promise(e=>{this._executeOnStable(()=>e(this.focusLastTabbableElement(o)))})}_getRegionBoundary(o){let e=this._element.querySelectorAll(`[cdk-focus-region-${o}], [cdkFocusRegion${o}], [cdk-focus-${o}]`);return o=="start"?e.length?e[0]:this._getFirstTabbableElement(this._element):e.length?e[e.length-1]:this._getLastTabbableElement(this._element)}focusInitialElement(o){let e=this._element.querySelector("[cdk-focus-initial], [cdkFocusInitial]");if(e){if(!this._checker.isFocusable(e)){let t=this._getFirstTabbableElement(e);return t?.focus(o),!!t}return e.focus(o),!0}return this.focusFirstTabbableElement(o)}focusFirstTabbableElement(o){let e=this._getRegionBoundary("start");return e&&e.focus(o),!!e}focusLastTabbableElement(o){let e=this._getRegionBoundary("end");return e&&e.focus(o),!!e}hasAttached(){return this._hasAttached}_getFirstTabbableElement(o){if(this._checker.isFocusable(o)&&this._checker.isTabbable(o))return o;let e=o.children;for(let t=0;t<e.length;t++){let n=e[t].nodeType===this._document.ELEMENT_NODE?this._getFirstTabbableElement(e[t]):null;if(n)return n}return null}_getLastTabbableElement(o){if(this._checker.isFocusable(o)&&this._checker.isTabbable(o))return o;let e=o.children;for(let t=e.length-1;t>=0;t--){let n=e[t].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(e[t]):null;if(n)return n}return null}_createAnchor(){let o=this._document.createElement("div");return this._toggleAnchorTabIndex(this._enabled,o),o.classList.add("cdk-visually-hidden"),o.classList.add("cdk-focus-trap-anchor"),o.setAttribute("aria-hidden","true"),o}_toggleAnchorTabIndex(o,e){o?e.setAttribute("tabindex","0"):e.removeAttribute("tabindex")}toggleAnchors(o){this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(o,this._startAnchor),this._toggleAnchorTabIndex(o,this._endAnchor))}_executeOnStable(o){Ge(o,{injector:this._injector})}},Jl=(()=>{class i{_checker=m(Ql);_ngZone=m($);_document=m(K);_injector=m(Z);constructor(){m(Be).load(Sn)}create(e,t=!1){return new Zl(e,this._checker,this._ngZone,this._document,t,this._injector)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();var ru=new k("liveAnnouncerElement",{providedIn:"root",factory:()=>null}),su=new k("LIVE_ANNOUNCER_DEFAULT_OPTIONS"),Yg=0,Ta=(()=>{class i{_ngZone=m($);_defaultOptions=m(su,{optional:!0});_liveElement;_document=m(K);_sanitizer=m(Sa);_previousTimeout;_currentPromise;_currentResolve;constructor(){let e=m(ru,{optional:!0});this._liveElement=e||this._createLiveElement()}announce(e,...t){let n=this._defaultOptions,a,r;return t.length===1&&typeof t[0]=="number"?r=t[0]:[a,r]=t,this.clear(),clearTimeout(this._previousTimeout),a||(a=n&&n.politeness?n.politeness:"polite"),r==null&&n&&(r=n.duration),this._liveElement.setAttribute("aria-live",a),this._liveElement.id&&this._exposeAnnouncerToModals(this._liveElement.id),this._ngZone.runOutsideAngular(()=>(this._currentPromise||(this._currentPromise=new Promise(u=>this._currentResolve=u)),clearTimeout(this._previousTimeout),this._previousTimeout=setTimeout(()=>{!e||typeof e=="string"?this._liveElement.textContent=e:Qm(this._liveElement,e,this._sanitizer),typeof r=="number"&&(this._previousTimeout=setTimeout(()=>this.clear(),r)),this._currentResolve?.(),this._currentPromise=this._currentResolve=void 0},100),this._currentPromise))}clear(){this._liveElement&&(this._liveElement.textContent="")}ngOnDestroy(){clearTimeout(this._previousTimeout),this._liveElement?.remove(),this._liveElement=null,this._currentResolve?.(),this._currentPromise=this._currentResolve=void 0}_createLiveElement(){let e="cdk-live-announcer-element",t=this._document.getElementsByClassName(e),n=this._document.createElement("div");for(let a=0;a<t.length;a++)t[a].remove();return n.classList.add(e),n.classList.add("cdk-visually-hidden"),n.setAttribute("aria-atomic","true"),n.setAttribute("aria-live","polite"),n.id=`cdk-live-announcer-${Yg++}`,this._document.body.appendChild(n),n}_exposeAnnouncerToModals(e){let t=this._document.querySelectorAll('body > .cdk-overlay-container [aria-modal="true"]');for(let n=0;n<t.length;n++){let a=t[n],r=a.getAttribute("aria-owns");r?r.indexOf(e)===-1&&a.setAttribute("aria-owns",r+" "+e):a.setAttribute("aria-owns",e)}}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();var kn=(function(i){return i[i.NONE=0]="NONE",i[i.BLACK_ON_WHITE=1]="BLACK_ON_WHITE",i[i.WHITE_ON_BLACK=2]="WHITE_ON_BLACK",i})(kn||{}),nu="cdk-high-contrast-black-on-white",ou="cdk-high-contrast-white-on-black",Yl="cdk-high-contrast-active",lu=(()=>{class i{_platform=m(fe);_hasCheckedHighContrastMode=!1;_document=m(K);_breakpointSubscription;constructor(){this._breakpointSubscription=m(Yn).observe("(forced-colors: active)").subscribe(()=>{this._hasCheckedHighContrastMode&&(this._hasCheckedHighContrastMode=!1,this._applyBodyHighContrastModeCssClasses())})}getHighContrastMode(){if(!this._platform.isBrowser)return kn.NONE;let e=this._document.createElement("div");e.style.backgroundColor="rgb(1,2,3)",e.style.position="absolute",this._document.body.appendChild(e);let t=this._document.defaultView||window,n=t&&t.getComputedStyle?t.getComputedStyle(e):null,a=(n&&n.backgroundColor||"").replace(/ /g,"");switch(e.remove(),a){case"rgb(0,0,0)":case"rgb(45,50,54)":case"rgb(32,32,32)":return kn.WHITE_ON_BLACK;case"rgb(255,255,255)":case"rgb(255,250,239)":return kn.BLACK_ON_WHITE}return kn.NONE}ngOnDestroy(){this._breakpointSubscription.unsubscribe()}_applyBodyHighContrastModeCssClasses(){if(!this._hasCheckedHighContrastMode&&this._platform.isBrowser&&this._document.body){let e=this._document.body.classList;e.remove(Yl,nu,ou),this._hasCheckedHighContrastMode=!0;let t=this.getHighContrastMode();t===kn.BLACK_ON_WHITE?e.add(Yl,nu):t===kn.WHITE_ON_BLACK&&e.add(Yl,ou)}}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})(),Aa=(()=>{class i{constructor(){m(lu)._applyBodyHighContrastModeCssClasses()}static \u0275fac=function(t){return new(t||i)};static \u0275mod=U({type:i});static \u0275inj=H({imports:[Fo]})}return i})();var Zg=200,ts=class{_letterKeyStream=new O;_items=[];_selectedItemIndex=-1;_pressedLetters=[];_skipPredicateFn;_selectedItem=new O;selectedItem=this._selectedItem;constructor(o,e){let t=typeof e?.debounceInterval=="number"?e.debounceInterval:Zg;e?.skipPredicate&&(this._skipPredicateFn=e.skipPredicate),this.setItems(o),this._setupKeyHandler(t)}destroy(){this._pressedLetters=[],this._letterKeyStream.complete(),this._selectedItem.complete()}setCurrentSelectedItemIndex(o){this._selectedItemIndex=o}setItems(o){this._items=o}handleKey(o){let e=o.keyCode;o.key&&o.key.length===1?this._letterKeyStream.next(o.key.toLocaleUpperCase()):(e>=65&&e<=90||e>=48&&e<=57)&&this._letterKeyStream.next(String.fromCharCode(e))}isTyping(){return this._pressedLetters.length>0}reset(){this._pressedLetters=[]}_setupKeyHandler(o){this._letterKeyStream.pipe(wi(e=>this._pressedLetters.push(e)),Lt(o),ke(()=>this._pressedLetters.length>0),Ve(()=>this._pressedLetters.join("").toLocaleUpperCase())).subscribe(e=>{for(let t=1;t<this._items.length+1;t++){let n=(this._selectedItemIndex+t)%this._items.length,a=this._items[n];if(!this._skipPredicateFn?.(a)&&a.getLabel?.().toLocaleUpperCase().trim().indexOf(e)===0){this._selectedItem.next(a);break}}this._pressedLetters=[]})}};function Ke(i,...o){return o.length?o.some(e=>i[e]):i.altKey||i.shiftKey||i.ctrlKey||i.metaKey}var No=class{_items;_activeItemIndex=E(-1);_activeItem=E(null);_wrap=!1;_typeaheadSubscription=Te.EMPTY;_itemChangesSubscription;_vertical=!0;_horizontal=null;_allowedModifierKeys=[];_homeAndEnd=!1;_pageUpAndDown={enabled:!1,delta:10};_effectRef;_typeahead;_skipPredicateFn=o=>o.disabled;constructor(o,e){this._items=o,o instanceof vn?this._itemChangesSubscription=o.changes.subscribe(t=>this._itemsChanged(t.toArray())):_n(o)&&(this._effectRef=Bt(()=>this._itemsChanged(o()),{injector:e}))}tabOut=new O;change=new O;skipPredicate(o){return this._skipPredicateFn=o,this}withWrap(o=!0){return this._wrap=o,this}withVerticalOrientation(o=!0){return this._vertical=o,this}withHorizontalOrientation(o){return this._horizontal=o,this}withAllowedModifierKeys(o){return this._allowedModifierKeys=o,this}withTypeAhead(o=200){this._typeaheadSubscription.unsubscribe();let e=this._getItemsArray();return this._typeahead=new ts(e,{debounceInterval:typeof o=="number"?o:void 0,skipPredicate:t=>this._skipPredicateFn(t)}),this._typeaheadSubscription=this._typeahead.selectedItem.subscribe(t=>{this.setActiveItem(t)}),this}cancelTypeahead(){return this._typeahead?.reset(),this}withHomeAndEnd(o=!0){return this._homeAndEnd=o,this}withPageUpDown(o=!0,e=10){return this._pageUpAndDown={enabled:o,delta:e},this}setActiveItem(o){let e=this._activeItem();this.updateActiveItem(o),this._activeItem()!==e&&this.change.next(this._activeItemIndex())}onKeydown(o){let e=o.keyCode,n=["altKey","ctrlKey","metaKey","shiftKey"].every(a=>!o[a]||this._allowedModifierKeys.indexOf(a)>-1);switch(e){case 9:this.tabOut.next();return;case 40:if(this._vertical&&n){this.setNextItemActive();break}else return;case 38:if(this._vertical&&n){this.setPreviousItemActive();break}else return;case 39:if(this._horizontal&&n){this._horizontal==="rtl"?this.setPreviousItemActive():this.setNextItemActive();break}else return;case 37:if(this._horizontal&&n){this._horizontal==="rtl"?this.setNextItemActive():this.setPreviousItemActive();break}else return;case 36:if(this._homeAndEnd&&n){this.setFirstItemActive();break}else return;case 35:if(this._homeAndEnd&&n){this.setLastItemActive();break}else return;case 33:if(this._pageUpAndDown.enabled&&n){let a=this._activeItemIndex()-this._pageUpAndDown.delta;this._setActiveItemByIndex(a>0?a:0,1);break}else return;case 34:if(this._pageUpAndDown.enabled&&n){let a=this._activeItemIndex()+this._pageUpAndDown.delta,r=this._getItemsArray().length;this._setActiveItemByIndex(a<r?a:r-1,-1);break}else return;default:(n||Ke(o,"shiftKey"))&&this._typeahead?.handleKey(o);return}this._typeahead?.reset(),o.preventDefault()}get activeItemIndex(){return this._activeItemIndex()}get activeItem(){return this._activeItem()}isTyping(){return!!this._typeahead&&this._typeahead.isTyping()}setFirstItemActive(){this._setActiveItemByIndex(0,1)}setLastItemActive(){this._setActiveItemByIndex(this._getItemsArray().length-1,-1)}setNextItemActive(){this._activeItemIndex()<0?this.setFirstItemActive():this._setActiveItemByDelta(1)}setPreviousItemActive(){this._activeItemIndex()<0&&this._wrap?this.setLastItemActive():this._setActiveItemByDelta(-1)}updateActiveItem(o){let e=this._getItemsArray(),t=typeof o=="number"?o:e.indexOf(o),n=e[t];this._activeItem.set(n??null),this._activeItemIndex.set(t),this._typeahead?.setCurrentSelectedItemIndex(t)}destroy(){this._typeaheadSubscription.unsubscribe(),this._itemChangesSubscription?.unsubscribe(),this._effectRef?.destroy(),this._typeahead?.destroy(),this.tabOut.complete(),this.change.complete()}_setActiveItemByDelta(o){this._wrap?this._setActiveInWrapMode(o):this._setActiveInDefaultMode(o)}_setActiveInWrapMode(o){let e=this._getItemsArray();for(let t=1;t<=e.length;t++){let n=(this._activeItemIndex()+o*t+e.length)%e.length,a=e[n];if(!this._skipPredicateFn(a)){this.setActiveItem(n);return}}}_setActiveInDefaultMode(o){this._setActiveItemByIndex(this._activeItemIndex()+o,o)}_setActiveItemByIndex(o,e){let t=this._getItemsArray();if(t[o]){for(;this._skipPredicateFn(t[o]);)if(o+=e,!t[o])return;this.setActiveItem(o)}}_getItemsArray(){return _n(this._items)?this._items():this._items instanceof vn?this._items.toArray():this._items}_itemsChanged(o){this._typeahead?.setItems(o);let e=this._activeItem();if(e){let t=o.indexOf(e);t>-1&&t!==this._activeItemIndex()&&(this._activeItemIndex.set(t),this._typeahead?.setCurrentSelectedItemIndex(t))}}};var io=class extends No{setActiveItem(o){this.activeItem&&this.activeItem.setInactiveStyles(),super.setActiveItem(o),this.activeItem&&this.activeItem.setActiveStyles()}};var En=class extends No{_origin="program";setFocusOrigin(o){return this._origin=o,this}setActiveItem(o){super.setActiveItem(o),this.activeItem&&this.activeItem.focus(this._origin)}};var mu=new Map,De=class i{_appId=m(qn);static _infix=`a${Math.floor(Math.random()*1e5).toString()}`;getId(o,e=!1){this._appId!=="ng"&&(o+=this._appId);let t=mu.get(o);return t===void 0?t=0:t++,mu.set(o,t),`${o}${e?i._infix+"-":""}${t}`}static \u0275fac=function(e){return new(e||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})};var hu=" ";function Qg(i,o,e){let t=ns(i,o);e=e.trim(),!t.some(n=>n.trim()===e)&&(t.push(e),i.setAttribute(o,t.join(hu)))}function Jg(i,o,e){let t=ns(i,o);e=e.trim();let n=t.filter(a=>a!==e);n.length?i.setAttribute(o,n.join(hu)):i.removeAttribute(o)}function ns(i,o){return i.getAttribute(o)?.match(/\S+/g)??[]}var pu="cdk-describedby-message",is="cdk-describedby-host",tc=0,fu=(()=>{class i{_platform=m(fe);_document=m(K);_messageRegistry=new Map;_messagesContainer=null;_id=`${tc++}`;constructor(){m(Be).load(Sn),this._id=m(qn)+"-"+tc++}describe(e,t,n){if(!this._canBeDescribed(e,t))return;let a=ec(t,n);typeof t!="string"?(uu(t,this._id),this._messageRegistry.set(a,{messageElement:t,referenceCount:0})):this._messageRegistry.has(a)||this._createMessageElement(t,n),this._isElementDescribedByMessage(e,a)||this._addMessageReference(e,a)}removeDescription(e,t,n){if(!t||!this._isElementNode(e))return;let a=ec(t,n);if(this._isElementDescribedByMessage(e,a)&&this._removeMessageReference(e,a),typeof t=="string"){let r=this._messageRegistry.get(a);r&&r.referenceCount===0&&this._deleteMessageElement(a)}this._messagesContainer?.childNodes.length===0&&(this._messagesContainer.remove(),this._messagesContainer=null)}ngOnDestroy(){let e=this._document.querySelectorAll(`[${is}="${this._id}"]`);for(let t=0;t<e.length;t++)this._removeCdkDescribedByReferenceIds(e[t]),e[t].removeAttribute(is);this._messagesContainer?.remove(),this._messagesContainer=null,this._messageRegistry.clear()}_createMessageElement(e,t){let n=this._document.createElement("div");uu(n,this._id),n.textContent=e,t&&n.setAttribute("role",t),this._createMessagesContainer(),this._messagesContainer.appendChild(n),this._messageRegistry.set(ec(e,t),{messageElement:n,referenceCount:0})}_deleteMessageElement(e){this._messageRegistry.get(e)?.messageElement?.remove(),this._messageRegistry.delete(e)}_createMessagesContainer(){if(this._messagesContainer)return;let e="cdk-describedby-message-container",t=this._document.querySelectorAll(`.${e}[platform="server"]`);for(let a=0;a<t.length;a++)t[a].remove();let n=this._document.createElement("div");n.style.visibility="hidden",n.classList.add(e),n.classList.add("cdk-visually-hidden"),this._platform.isBrowser||n.setAttribute("platform","server"),this._document.body.appendChild(n),this._messagesContainer=n}_removeCdkDescribedByReferenceIds(e){let t=ns(e,"aria-describedby").filter(n=>n.indexOf(pu)!=0);e.setAttribute("aria-describedby",t.join(" "))}_addMessageReference(e,t){let n=this._messageRegistry.get(t);Qg(e,"aria-describedby",n.messageElement.id),e.setAttribute(is,this._id),n.referenceCount++}_removeMessageReference(e,t){let n=this._messageRegistry.get(t);n.referenceCount--,Jg(e,"aria-describedby",n.messageElement.id),e.removeAttribute(is)}_isElementDescribedByMessage(e,t){let n=ns(e,"aria-describedby"),a=this._messageRegistry.get(t),r=a&&a.messageElement.id;return!!r&&n.indexOf(r)!=-1}_canBeDescribed(e,t){if(!this._isElementNode(e))return!1;if(t&&typeof t=="object")return!0;let n=t==null?"":`${t}`.trim(),a=e.getAttribute("aria-label");return n?!a||a.trim()!==n:!1}_isElementNode(e){return e.nodeType===this._document.ELEMENT_NODE}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();function ec(i,o){return typeof i=="string"?`${o||""}/${i}`:i}function uu(i,o){i.id||(i.id=`${pu}-${o}-${tc++}`)}var Du=(()=>{class i{_renderer;_elementRef;onChange=e=>{};onTouched=()=>{};constructor(e,t){this._renderer=e,this._elementRef=t}setProperty(e,t){this._renderer.setProperty(this._elementRef.nativeElement,e,t)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}static \u0275fac=function(t){return new(t||i)(be(we),be(B))};static \u0275dir=T({type:i})}return i})(),Su=(()=>{class i extends Du{static \u0275fac=(()=>{let e;return function(n){return(e||(e=xe(i)))(n||i)}})();static \u0275dir=T({type:i,features:[ie]})}return i})(),Ui=new k("");var e_={provide:Ui,useExisting:lt(()=>Yt),multi:!0};function t_(){let i=ui()?ui().getUserAgent():"";return/android (\d+)/.test(i.toLowerCase())}var i_=new k(""),Yt=(()=>{class i extends Du{_compositionMode;_composing=!1;constructor(e,t,n){super(e,t),this._compositionMode=n,this._compositionMode==null&&(this._compositionMode=!t_())}writeValue(e){let t=e??"";this.setProperty("value",t)}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}static \u0275fac=function(t){return new(t||i)(be(we),be(B),be(i_,8))};static \u0275dir=T({type:i,selectors:[["input","formControlName","",3,"type","checkbox",3,"ngNoCva",""],["textarea","formControlName","",3,"ngNoCva",""],["input","formControl","",3,"type","checkbox",3,"ngNoCva",""],["textarea","formControl","",3,"ngNoCva",""],["input","ngModel","",3,"type","checkbox",3,"ngNoCva",""],["textarea","ngModel","",3,"ngNoCva",""],["","ngDefaultControl",""]],hostBindings:function(t,n){t&1&&S("input",function(r){return n._handleInput(r.target.value)})("blur",function(){return n.onTouched()})("compositionstart",function(){return n._compositionStart()})("compositionend",function(r){return n._compositionEnd(r.target.value)})},standalone:!1,features:[le([e_]),ie]})}return i})();function sc(i){return i==null||lc(i)===0}function lc(i){return i==null?null:Array.isArray(i)||typeof i=="string"?i.length:i instanceof Set?i.size:null}var cn=new k(""),hs=new k(""),n_=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Qe=class{static min(o){return ku(o)}static max(o){return Mu(o)}static required(o){return Eu(o)}static requiredTrue(o){return o_(o)}static email(o){return a_(o)}static minLength(o){return r_(o)}static maxLength(o){return s_(o)}static pattern(o){return l_(o)}static nullValidator(o){return as()}static compose(o){return Ou(o)}static composeAsync(o){return Fu(o)}};function ku(i){return o=>{if(o.value==null||i==null)return null;let e=parseFloat(o.value);return!isNaN(e)&&e<i?{min:{min:i,actual:o.value}}:null}}function Mu(i){return o=>{if(o.value==null||i==null)return null;let e=parseFloat(o.value);return!isNaN(e)&&e>i?{max:{max:i,actual:o.value}}:null}}function Eu(i){return sc(i.value)?{required:!0}:null}function o_(i){return i.value===!0?null:{required:!0}}function a_(i){return sc(i.value)||n_.test(i.value)?null:{email:!0}}function r_(i){return o=>{let e=o.value?.length??lc(o.value);return e===null||e===0?null:e<i?{minlength:{requiredLength:i,actualLength:e}}:null}}function s_(i){return o=>{let e=o.value?.length??lc(o.value);return e!==null&&e>i?{maxlength:{requiredLength:i,actualLength:e}}:null}}function l_(i){if(!i)return as;let o,e;return typeof i=="string"?(e="",i.charAt(0)!=="^"&&(e+="^"),e+=i,i.charAt(i.length-1)!=="$"&&(e+="$"),o=new RegExp(e)):(e=i.toString(),o=i),t=>{if(sc(t.value))return null;let n=t.value;return o.test(n)?null:{pattern:{requiredPattern:e,actualValue:n}}}}function as(i){return null}function Tu(i){return i!=null}function Au(i){return rl(i)?od(i):i}function Iu(i){let o={};return i.forEach(e=>{o=e!=null?V(V({},o),e):o}),Object.keys(o).length===0?null:o}function Ru(i,o){return o.map(e=>e(i))}function c_(i){return!i.validate}function Pu(i){return i.map(o=>c_(o)?o:e=>o.validate(e))}function Ou(i){if(!i)return null;let o=i.filter(Tu);return o.length==0?null:function(e){return Iu(Ru(e,o))}}function cc(i){return i!=null?Ou(Pu(i)):null}function Fu(i){if(!i)return null;let o=i.filter(Tu);return o.length==0?null:function(e){let t=Ru(e,o).map(Au);return hr(t).pipe(Ve(Iu))}}function dc(i){return i!=null?Fu(Pu(i)):null}function gu(i,o){return i===null?[o]:Array.isArray(i)?[...i,o]:[i,o]}function Nu(i){return i._rawValidators}function Lu(i){return i._rawAsyncValidators}function ic(i){return i?Array.isArray(i)?i:[i]:[]}function rs(i,o){return Array.isArray(i)?i.includes(o):i===o}function _u(i,o){let e=ic(o);return ic(i).forEach(n=>{rs(e,n)||e.push(n)}),e}function vu(i,o){return ic(o).filter(e=>!rs(i,e))}var ss=class{get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators=[];_rawAsyncValidators=[];_setValidators(o){this._rawValidators=o||[],this._composedValidatorFn=cc(this._rawValidators)}_setAsyncValidators(o){this._rawAsyncValidators=o||[],this._composedAsyncValidatorFn=dc(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(o){this._onDestroyCallbacks.push(o)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(o=>o()),this._onDestroyCallbacks=[]}reset(o=void 0){this.control?.reset(o)}hasError(o,e){return this.control?this.control.hasError(o,e):!1}getError(o,e){return this.control?this.control.getError(o,e):null}},ln=class extends ss{name;get formDirective(){return null}get path(){return null}};var Pa="VALID",os="INVALID",Lo="PENDING",Oa="DISABLED",Tn=class{},ls=class extends Tn{value;source;constructor(o,e){super(),this.value=o,this.source=e}},Na=class extends Tn{pristine;source;constructor(o,e){super(),this.pristine=o,this.source=e}},La=class extends Tn{touched;source;constructor(o,e){super(),this.touched=o,this.source=e}},Vo=class extends Tn{status;source;constructor(o,e){super(),this.status=o,this.source=e}},cs=class extends Tn{source;constructor(o){super(),this.source=o}},no=class extends Tn{source;constructor(o){super(),this.source=o}};function mc(i){return(ps(i)?i.validators:i)||null}function d_(i){return Array.isArray(i)?cc(i):i||null}function uc(i,o){return(ps(o)?o.asyncValidators:i)||null}function m_(i){return Array.isArray(i)?dc(i):i||null}function ps(i){return i!=null&&!Array.isArray(i)&&typeof i=="object"}function Vu(i,o,e){let t=i.controls;if(!(o?Object.keys(t):t).length)throw new he(1e3,"");if(!zu(t,e))throw new he(1001,"")}function Bu(i,o,e){i._forEachChild((t,n)=>{if(e[n]===void 0)throw new he(-1002,"")})}var Bo=class{_pendingDirty=!1;_hasOwnPendingAsyncValidator=null;_pendingTouched=!1;_onCollectionChange=()=>{};_updateOn;_hasRequired=E(!1);_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(o,e){this._assignValidators(o),this._assignAsyncValidators(e)}get validator(){return this._composedValidatorFn}set validator(o){this._rawValidators=this._composedValidatorFn=o,this._updateHasRequiredValidator()}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(o){this._rawAsyncValidators=this._composedAsyncValidatorFn=o}get parent(){return this._parent}get status(){return Tt(this.statusReactive)}set status(o){Tt(()=>this.statusReactive.set(o))}_status=P(()=>this.statusReactive());statusReactive=E(void 0);get valid(){return this.status===Pa}get invalid(){return this.status===os}get pending(){return this.status===Lo}get disabled(){return this.status===Oa}get enabled(){return this.status!==Oa}errors;get pristine(){return Tt(this.pristineReactive)}set pristine(o){Tt(()=>this.pristineReactive.set(o))}_pristine=P(()=>this.pristineReactive());pristineReactive=E(!0);get dirty(){return!this.pristine}get touched(){return Tt(this.touchedReactive)}set touched(o){Tt(()=>this.touchedReactive.set(o))}_touched=P(()=>this.touchedReactive());touchedReactive=E(!1);get untouched(){return!this.touched}_events=new O;events=this._events.asObservable();valueChanges;statusChanges;get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(o){this._assignValidators(o)}setAsyncValidators(o){this._assignAsyncValidators(o)}addValidators(o){this.setValidators(_u(o,this._rawValidators))}addAsyncValidators(o){this.setAsyncValidators(_u(o,this._rawAsyncValidators))}removeValidators(o){this.setValidators(vu(o,this._rawValidators))}removeAsyncValidators(o){this.setAsyncValidators(vu(o,this._rawAsyncValidators))}hasValidator(o){return rs(this._rawValidators,o)}hasAsyncValidator(o){return rs(this._rawAsyncValidators,o)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(o={}){let e=this.touched===!1;this.touched=!0;let t=o.sourceControl??this;o.onlySelf||this._parent?.markAsTouched(Fe(V({},o),{sourceControl:t})),e&&o.emitEvent!==!1&&this._events.next(new La(!0,t))}markAllAsDirty(o={}){this.markAsDirty({onlySelf:!0,emitEvent:o.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsDirty(o))}markAllAsTouched(o={}){this.markAsTouched({onlySelf:!0,emitEvent:o.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsTouched(o))}markAsUntouched(o={}){let e=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let t=o.sourceControl??this;this._forEachChild(n=>{n.markAsUntouched({onlySelf:!0,emitEvent:o.emitEvent,sourceControl:t})}),o.onlySelf||this._parent?._updateTouched(o,t),e&&o.emitEvent!==!1&&this._events.next(new La(!1,t))}markAsDirty(o={}){let e=this.pristine===!0;this.pristine=!1;let t=o.sourceControl??this;o.onlySelf||this._parent?.markAsDirty(Fe(V({},o),{sourceControl:t})),e&&o.emitEvent!==!1&&this._events.next(new Na(!1,t))}markAsPristine(o={}){let e=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let t=o.sourceControl??this;this._forEachChild(n=>{n.markAsPristine({onlySelf:!0,emitEvent:o.emitEvent})}),o.onlySelf||this._parent?._updatePristine(o,t),e&&o.emitEvent!==!1&&this._events.next(new Na(!0,t))}markAsPending(o={}){this.status=Lo;let e=o.sourceControl??this;o.emitEvent!==!1&&(this._events.next(new Vo(this.status,e)),this.statusChanges.emit(this.status)),o.onlySelf||this._parent?.markAsPending(Fe(V({},o),{sourceControl:e}))}disable(o={}){let e=this._parentMarkedDirty(o.onlySelf);this.status=Oa,this.errors=null,this._forEachChild(n=>{n.disable(Fe(V({},o),{onlySelf:!0}))}),this._updateValue();let t=o.sourceControl??this;o.emitEvent!==!1&&(this._events.next(new ls(this.value,t)),this._events.next(new Vo(this.status,t)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(Fe(V({},o),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(n=>n(!0))}enable(o={}){let e=this._parentMarkedDirty(o.onlySelf);this.status=Pa,this._forEachChild(t=>{t.enable(Fe(V({},o),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:o.emitEvent}),this._updateAncestors(Fe(V({},o),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(t=>t(!1))}_updateAncestors(o,e){o.onlySelf||(this._parent?.updateValueAndValidity(o),o.skipPristineCheck||this._parent?._updatePristine({},e),this._parent?._updateTouched({},e))}setParent(o){this._parent=o}getRawValue(){return this.value}updateValueAndValidity(o={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let t=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===Pa||this.status===Lo)&&this._runAsyncValidator(t,o.emitEvent)}let e=o.sourceControl??this;o.emitEvent!==!1&&(this._events.next(new ls(this.value,e)),this._events.next(new Vo(this.status,e)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),o.onlySelf||this._parent?.updateValueAndValidity(Fe(V({},o),{sourceControl:e}))}_updateTreeValidity(o={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(o)),this.updateValueAndValidity({onlySelf:!0,emitEvent:o.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?Oa:Pa}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(o,e){if(this.asyncValidator){this.status=Lo,this._hasOwnPendingAsyncValidator={emitEvent:e!==!1,shouldHaveEmitted:o!==!1};let t=Au(this.asyncValidator(this));this._asyncValidationSubscription=t.subscribe(n=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(n,{emitEvent:e,shouldHaveEmitted:o})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let o=(this._hasOwnPendingAsyncValidator?.emitEvent||this._hasOwnPendingAsyncValidator?.shouldHaveEmitted)??!1;return this._hasOwnPendingAsyncValidator=null,o}return!1}setErrors(o,e={}){this.errors=o,this._updateControlsErrors(e.emitEvent!==!1,this,e.shouldHaveEmitted)}get(o){let e=o;return e==null||(Array.isArray(e)||(e=e.split(".")),e.length===0)?null:e.reduce((t,n)=>t&&t._find(n),this)}getError(o,e){let t=e?this.get(e):this;return t?.errors?t.errors[o]:null}hasError(o,e){return!!this.getError(o,e)}get root(){let o=this;for(;o._parent;)o=o._parent;return o}_updateControlsErrors(o,e,t){this.status=this._calculateStatus(),o&&this.statusChanges.emit(this.status),(o||t)&&this._events.next(new Vo(this.status,e)),this._parent&&this._parent._updateControlsErrors(o,e,t)}_initObservables(){this.valueChanges=new X,this.statusChanges=new X}_calculateStatus(){return this._allControlsDisabled()?Oa:this.errors?os:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(Lo)?Lo:this._anyControlsHaveStatus(os)?os:Pa}_anyControlsHaveStatus(o){return this._anyControls(e=>e.status===o)}_anyControlsDirty(){return this._anyControls(o=>o.dirty)}_anyControlsTouched(){return this._anyControls(o=>o.touched)}_updatePristine(o,e){let t=!this._anyControlsDirty(),n=this.pristine!==t;this.pristine=t,o.onlySelf||this._parent?._updatePristine(o,e),n&&this._events.next(new Na(this.pristine,e))}_updateTouched(o={},e){this.touched=this._anyControlsTouched(),this._events.next(new La(this.touched,e)),o.onlySelf||this._parent?._updateTouched(o,e)}_onDisabledChange=[];_registerOnCollectionChange(o){this._onCollectionChange=o}_setUpdateStrategy(o){ps(o)&&o.updateOn!=null&&(this._updateOn=o.updateOn)}_parentMarkedDirty(o){return!o&&!!this._parent?.dirty&&!this._parent._anyControlsDirty()}_find(o){return null}_assignValidators(o){this._rawValidators=Array.isArray(o)?o.slice():o,this._composedValidatorFn=d_(this._rawValidators),this._updateHasRequiredValidator()}_assignAsyncValidators(o){this._rawAsyncValidators=Array.isArray(o)?o.slice():o,this._composedAsyncValidatorFn=m_(this._rawAsyncValidators)}_updateHasRequiredValidator(){Tt(()=>this._hasRequired.set(this.hasValidator(Qe.required)))}};function zu(i,o){return Object.hasOwn(i,o)}function u_(i){return i.tagName==="INPUT"||i.tagName==="SELECT"||i.tagName==="TEXTAREA"}function h_(i,o,e,t){switch(e){case"name":i.setAttribute(o,e,t);break;case"disabled":case"readonly":case"required":t?i.setAttribute(o,e,""):i.removeAttribute(o,e);break;case"max":case"min":case"minLength":case"maxLength":t!==void 0?i.setAttribute(o,e,t.toString()):i.removeAttribute(o,e);break}}var nc=class{kind;context;control;message;constructor({kind:o,context:e,control:t}){this.kind=o,this.context=e,this.control=t}};function ju(i){return typeof i=="number"?i:parseFloat(i)}var hc=(()=>{class i{_validator=as;_onChange;_enabled;ngOnChanges(e){if(this.inputName in e){let t=this.normalizeInput(e[this.inputName].currentValue);this._enabled=this.enabled(t),this._validator=this._enabled?this.createValidator(t):as,this._onChange?.()}}validate(e){return this._validator(e)}registerOnValidatorChange(e){this._onChange=e}enabled(e){return e!=null}static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,features:[Ie]})}return i})(),p_={provide:cn,useExisting:lt(()=>pc),multi:!0},pc=(()=>{class i extends hc{max;inputName="max";normalizeInput=e=>ju(e);createValidator=e=>Mu(e);static \u0275fac=(()=>{let e;return function(n){return(e||(e=xe(i)))(n||i)}})();static \u0275dir=T({type:i,selectors:[["input","type","number","max","","formControlName",""],["input","type","number","max","","formControl",""],["input","type","number","max","","ngModel",""]],hostVars:1,hostBindings:function(t,n){t&2&&J("max",n._enabled?n.max:null)},inputs:{max:"max"},standalone:!1,features:[le([p_]),ie]})}return i})(),f_={provide:cn,useExisting:lt(()=>Ba),multi:!0},Ba=(()=>{class i extends hc{min;inputName="min";normalizeInput=e=>ju(e);createValidator=e=>ku(e);static \u0275fac=(()=>{let e;return function(n){return(e||(e=xe(i)))(n||i)}})();static \u0275dir=T({type:i,selectors:[["input","type","number","min","","formControlName",""],["input","type","number","min","","formControl",""],["input","type","number","min","","ngModel",""]],hostVars:1,hostBindings:function(t,n){t&2&&J("min",n._enabled?n.min:null)},inputs:{min:"min"},standalone:!1,features:[le([f_]),ie]})}return i})(),g_={provide:cn,useExisting:lt(()=>fs),multi:!0};var fs=(()=>{class i extends hc{required;inputName="required";normalizeInput=z;createValidator=e=>Eu;enabled(e){return e}static \u0275fac=(()=>{let e;return function(n){return(e||(e=xe(i)))(n||i)}})();static \u0275dir=T({type:i,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(t,n){t&2&&J("required",n._enabled?"":null)},inputs:{required:"required"},standalone:!1,features:[le([g_]),ie]})}return i})();var __=new k(""),za=new k("",{factory:()=>gs}),gs="always";function Hu(i,o){return[...o.path,i]}function oc(i,o,e=gs){fc(i,o),o.valueAccessor.writeValue(i.value),(i.disabled||e==="always")&&o.valueAccessor.setDisabledState?.(i.disabled),b_(i,o),C_(i,o),y_(i,o),v_(i,o)}function bu(i,o,e=!0){let t=()=>{};o?.valueAccessor?.registerOnChange(t),o?.valueAccessor?.registerOnTouched(t),ms(i,o),i&&(o._invokeOnDestroyCallbacks(),i._registerOnCollectionChange(()=>{}))}function ds(i,o){i.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(o)})}function v_(i,o){if(o.valueAccessor.setDisabledState){let e=t=>{o.valueAccessor.setDisabledState(t)};i.registerOnDisabledChange(e),o._registerOnDestroy(()=>{i._unregisterOnDisabledChange(e)})}}function fc(i,o){let e=Nu(i);o.validator!==null?i.setValidators(gu(e,o.validator)):typeof e=="function"&&i.setValidators([e]);let t=Lu(i);o.asyncValidator!==null?i.setAsyncValidators(gu(t,o.asyncValidator)):typeof t=="function"&&i.setAsyncValidators([t]);let n=()=>i.updateValueAndValidity();ds(o._rawValidators,n),ds(o._rawAsyncValidators,n)}function ms(i,o){let e=!1;if(i!==null){if(o.validator!==null){let n=Nu(i);if(Array.isArray(n)&&n.length>0){let a=n.filter(r=>r!==o.validator);a.length!==n.length&&(e=!0,i.setValidators(a))}}if(o.asyncValidator!==null){let n=Lu(i);if(Array.isArray(n)&&n.length>0){let a=n.filter(r=>r!==o.asyncValidator);a.length!==n.length&&(e=!0,i.setAsyncValidators(a))}}}let t=()=>{};return ds(o._rawValidators,t),ds(o._rawAsyncValidators,t),e}function b_(i,o){o.valueAccessor.registerOnChange(e=>{i._pendingValue=e,i._pendingChange=!0,i._pendingDirty=!0,i.updateOn==="change"&&Uu(i,o)})}function y_(i,o){o.valueAccessor.registerOnTouched(()=>{i._pendingTouched=!0,i.updateOn==="blur"&&i._pendingChange&&Uu(i,o),i.updateOn!=="submit"&&i.markAsTouched()})}function Uu(i,o){i._pendingDirty&&i.markAsDirty(),i.setValue(i._pendingValue,{emitModelToViewChange:!1}),o.viewToModelUpdate(i._pendingValue),i._pendingChange=!1}function C_(i,o){let e=(t,n)=>{o.valueAccessor.writeValue(t),n&&o.viewToModelUpdate(t)};i.registerOnChange(e),o._registerOnDestroy(()=>{i._unregisterOnChange(e)})}function $u(i,o){i==null,fc(i,o)}function x_(i,o){return ms(i,o)}function Gu(i,o){if(!i.hasOwnProperty("model"))return!1;let e=i.model;return e.isFirstChange()?!0:!Object.is(o,e.currentValue)}function w_(i){return Object.getPrototypeOf(i.constructor)===Su}function Wu(i,o){i._syncPendingControls(),o.forEach(e=>{let t=e.control;t.updateOn==="submit"&&t._pendingChange&&(e.viewToModelUpdate(t._pendingValue),t._pendingChange=!1)})}function D_(i,o){if(!o)return null;Array.isArray(o);let e,t,n;return o.forEach(a=>{a.constructor===Yt?e=a:w_(a)?t=a:n=a}),n||t||e||null}function S_(i,o){let e=i.indexOf(o);e>-1&&i.splice(e,1)}var qu={provide:__,useFactory:()=>{let i=m(fi,{self:!0});return{setParseErrors:o=>{i.setParseErrorSource(o)},set onReset(o){i.onReset=o}}}},fi=class extends ss{_parent=null;name=null;valueAccessor=null;isCustomControlBased=!1;userOnReset;resetSubscription;set onReset(o){this.userOnReset=o,this.resetSubscription?.unsubscribe(),this.resetSubscription=void 0,this.control&&(this.resetSubscription=this.control.events.subscribe(e=>{e instanceof no&&this.control&&this.userOnReset?.(this.control.value)}),this.subscription?.add(this.resetSubscription))}isNativeFormElement=!1;rawValueAccessors;_selectedValueAccessor=null;get selectedValueAccessor(){return this._selectedValueAccessor??=D_(this,this.rawValueAccessors)}parseErrorsValidator=null;renderer;injector;requiredValidatorViaDi;subscription;customControlBindings=null;constructor(o,e,t){super(),this.injector=o,this.renderer=e,this.rawValueAccessors=t,this.injector?.get(Vt)?.onDestroy(()=>{this.removeParseErrorsValidator(this.control),this.subscription?.unsubscribe()})}setupCustomControl(){this.subscription?.unsubscribe();let o=this.injector?.get(se);if(!this.control||!o)return;let e=o.markForCheck.bind(o);this.subscription=new Te,this.subscription.add(this.control.valueChanges.subscribe(e)),this.subscription.add(this.control.statusChanges.subscribe(e)),this.resetSubscription?.unsubscribe(),this.resetSubscription=void 0,this.userOnReset&&(this.resetSubscription=this.control.events.subscribe(t=>{t instanceof no&&this.control&&this.userOnReset?.(this.control.value)}),this.subscription.add(this.resetSubscription)),this.parseErrorsValidator&&this.control.addValidators(this.parseErrorsValidator)}ngControlCreate(o){!o.nativeElement.hasAttribute?.("ngNoCva")&&(this.rawValueAccessors&&this.rawValueAccessors.length>0||this.valueAccessor!==null)||!o.customControl||(this.isCustomControlBased=!0,o.listenToCustomControlModel(n=>{this.control?.setValue(n,{emitModelToViewChange:!1}),this.control?.markAsDirty(),this.viewToModelUpdate(n)}),o.listenToCustomControlOutput("touch",()=>{this.control?.markAsTouched()}),this.customControlBindings={},this.isNativeFormElement=u_(o.nativeElement),this.requiredValidatorViaDi=this._rawValidators.find(n=>n instanceof fs))}ngControlUpdate(o,e){if(!this.isCustomControlBased)return;let t=this.control,n=this.customControlBindings;Object.is(n.value,t.value)||(n.value=t.value,o.setCustomControlModelInput(t.value)),this.bindControlProperty(o,n,"touched",t.touched),this.bindControlProperty(o,n,"dirty",t.dirty),this.bindControlProperty(o,n,"valid",t.valid),this.bindControlProperty(o,n,"invalid",t.invalid),this.bindControlProperty(o,n,"pending",t.pending),this.bindControlProperty(o,n,"disabled",t.disabled),this.shouldBindRequired&&this.bindControlProperty(o,n,"required",this.isRequired);let a=t.errors;if(n.errors!==a){n.errors=a;let r=this._convertErrors(a);o.setInputOnDirectives("errors",r)}}get isRequired(){return(this.requiredValidatorViaDi?._enabled||this.control?._hasRequired())??!1}get shouldBindRequired(){return!0}bindControlProperty(o,e,t,n){if(e[t]===n)return;e[t]=n;let a=o.setInputOnDirectives(t,n);this.isNativeFormElement&&!a&&(t==="disabled"||t==="required")&&this.renderer&&h_(this.renderer,o.nativeElement,t,n)}_convertErrors(o){if(o===null)return[];let e=this.control;return Object.entries(o).map(([t,n])=>new nc({context:n,kind:t,control:e}))}setParseErrorSource(o){if(o===void 0)return;let e=null,t=P(()=>{let n=o();return n.length===0?null:n.reduce((a,r)=>(a[r.kind]=r,a),{})});this.parseErrorsValidator=(()=>e).bind(this),Bt(()=>{e=t(),this.control?.updateValueAndValidity({emitEvent:!1})},{injector:this.injector})}removeParseErrorsValidator(o){this.parseErrorsValidator&&(o?.removeValidators(this.parseErrorsValidator),o?.updateValueAndValidity({emitEvent:!1}))}},us=class{_cd;constructor(o){this._cd=o}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}};var Zt=(()=>{class i extends us{constructor(e){super(e)}static \u0275fac=function(t){return new(t||i)(be(fi,2))};static \u0275dir=T({type:i,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(t,n){t&2&&p("ng-untouched",n.isUntouched)("ng-touched",n.isTouched)("ng-pristine",n.isPristine)("ng-dirty",n.isDirty)("ng-valid",n.isValid)("ng-invalid",n.isInvalid)("ng-pending",n.isPending)},standalone:!1,features:[ie]})}return i})(),$i=(()=>{class i extends us{constructor(e){super(e)}static \u0275fac=function(t){return new(t||i)(be(ln,10))};static \u0275dir=T({type:i,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["","formArray",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(t,n){t&2&&p("ng-untouched",n.isUntouched)("ng-touched",n.isTouched)("ng-pristine",n.isPristine)("ng-dirty",n.isDirty)("ng-valid",n.isValid)("ng-invalid",n.isInvalid)("ng-pending",n.isPending)("ng-submitted",n.isSubmitted)},standalone:!1,features:[ie]})}return i})(),zo=class extends Bo{constructor(o,e,t){super(mc(e),uc(t,e)),this.controls=o,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;registerControl(o,e){let t=this._find(o);return t||(this.controls[o]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(o,e,t={}){this.registerControl(o,e),this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}removeControl(o,e={}){let t=this._find(o);t&&t._registerOnCollectionChange(()=>{}),delete this.controls[o],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}setControl(o,e,t={}){let n=this._find(o);n&&n._registerOnCollectionChange(()=>{}),delete this.controls[o],e&&this.registerControl(o,e),this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}contains(o){return this._find(o)?.enabled===!0}setValue(o,e={}){Tt(()=>{Bu(this,!0,o),Object.keys(o).forEach(t=>{Vu(this,!0,t),this.controls[t].setValue(o[t],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)})}patchValue(o,e={}){o!=null&&(Object.keys(o).forEach(t=>{let n=this._find(t);n&&n.patchValue(o[t],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(o={},e={}){this._forEachChild((t,n)=>{t.reset(o?o[n]:null,Fe(V({},e),{onlySelf:!0}))}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e),e?.emitEvent!==!1&&this._events.next(new no(this))}getRawValue(){return this._reduceChildren({},(o,e,t)=>(o[t]=e.getRawValue(),o))}_syncPendingControls(){let o=this._reduceChildren(!1,(e,t)=>t._syncPendingControls()?!0:e);return o&&this.updateValueAndValidity({onlySelf:!0}),o}_forEachChild(o){Object.keys(this.controls).forEach(e=>{let t=this.controls[e];t&&o(t,e)})}_setUpControls(){this._forEachChild(o=>{o.setParent(this),o._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(o){for(let[e,t]of Object.entries(this.controls))if(this.contains(e)&&o(t))return!0;return!1}_reduceValue(){let o={};return this._reduceChildren(o,(e,t,n)=>((t.enabled||this.disabled)&&(e[n]=t.value),e))}_reduceChildren(o,e){let t=o;return this._forEachChild((n,a)=>{t=e(t,n,a)}),t}_allControlsDisabled(){for(let o of Object.keys(this.controls))if(this.controls[o].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(o){return zu(this.controls,o)?this.controls[o]:null}};var ac=class extends zo{};var k_={provide:ln,useExisting:lt(()=>ja)},Fa=Promise.resolve(),ja=(()=>{class i extends ln{callSetDisabledState;get submitted(){return Tt(this.submittedReactive)}_submitted=P(()=>this.submittedReactive());submittedReactive=E(!1);_directives=new Set;form;ngSubmit=new X;options;constructor(e,t,n){super(),this.callSetDisabledState=n,this.form=new zo({},cc(e),dc(t))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){Fa.then(()=>{let t=this._findContainer(e.path);e.control=t.registerControl(e.name,e.control),e._setupWithForm(this.callSetDisabledState),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(e)})}getControl(e){return this.form.get(e.path)}removeControl(e){Fa.then(()=>{this._findContainer(e.path)?.removeControl(e.name),this._directives.delete(e)})}addFormGroup(e){Fa.then(()=>{let t=this._findContainer(e.path),n=new zo({});$u(n,e),t.registerControl(e.name,n),n.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){Fa.then(()=>{this._findContainer(e.path)?.removeControl?.(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,t){Fa.then(()=>{this.form.get(e.path).setValue(t)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submittedReactive.set(!0),Wu(this.form,this._directives),this.ngSubmit.emit(e),this.form._events.next(new cs(this.control)),e?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(e=void 0){this.form.reset(e),this.submittedReactive.set(!1)}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.form._updateOn=this.options.updateOn)}_findContainer(e){return e.pop(),e.length?this.form.get(e):this.form}static \u0275fac=function(t){return new(t||i)(be(cn,10),be(hs,10),be(za,8))};static \u0275dir=T({type:i,selectors:[["form",3,"ngNoForm","",3,"formGroup","",3,"formArray",""],["ng-form"],["","ngForm",""]],hostBindings:function(t,n){t&1&&S("submit",function(r){return n.onSubmit(r)})("reset",function(){return n.onReset()})},inputs:{options:[0,"ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[le([k_]),ie]})}return i})();function yu(i,o){let e=i.indexOf(o);e>-1&&i.splice(e,1)}function Cu(i){return typeof i=="object"&&i!==null&&Object.keys(i).length===2&&"value"in i&&"disabled"in i}var Va=class extends Bo{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(o=null,e,t){super(mc(e),uc(t,e)),this._applyFormState(o),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),ps(e)&&(e.nonNullable||e.initialValueIsDefault)&&(Cu(o)?this.defaultValue=o.value:this.defaultValue=o)}setValue(o,e={}){Tt(()=>{this.value=this._pendingValue=o,this._onChange.length&&e.emitModelToViewChange!==!1&&this._onChange.forEach(t=>t(this.value,e.emitViewToModelChange!==!1)),this.updateValueAndValidity(e)})}patchValue(o,e={}){this.setValue(o,e)}reset(o=this.defaultValue,e={}){this._applyFormState(o),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),e.overwriteDefaultValue&&(this.defaultValue=this.value),this._pendingChange=!1,e?.emitEvent!==!1&&this._events.next(new no(this))}_updateValue(){}_anyControls(o){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(o){this._onChange.push(o)}_unregisterOnChange(o){yu(this._onChange,o)}registerOnDisabledChange(o){this._onDisabledChange.push(o)}_unregisterOnDisabledChange(o){yu(this._onDisabledChange,o)}_forEachChild(o){}_syncPendingControls(){return this.updateOn==="submit"&&(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),this._pendingChange)?(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0):!1}_applyFormState(o){Cu(o)?(this.value=this._pendingValue=o.value,o.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=o}};var M_=i=>i instanceof Va;var E_={provide:fi,useExisting:lt(()=>Ha)},xu=Promise.resolve(),Ha=(()=>{class i extends fi{_changeDetectorRef;callSetDisabledState;control=new Va;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new X;constructor(e,t,n,a,r,u,h,f){super(h,f,a),this._changeDetectorRef=r,this.callSetDisabledState=u,this._parent=e,this._setValidators(t),this._setAsyncValidators(n)}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){let t=e.name.previousValue;this.formDirective.removeControl({name:t,path:this._getPath(t)})}this._setUpControl()}"isDisabled"in e&&this._updateDisabled(e),Gu(e,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective?.removeControl(this)}\u0275ngControlCreate(e){super.ngControlCreate(e)}\u0275ngControlUpdate(e){super.ngControlUpdate(e,!1)}get shouldBindRequired(){return!1}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!!(this.options&&this.options.standalone)}_setUpStandalone(){this.isCustomControlBased?this.setupCustomControl():(this.valueAccessor??=this.selectedValueAccessor,oc(this.control,this,this.callSetDisabledState)),this.control.updateValueAndValidity({emitEvent:!1})}_setupWithForm(e){this.isCustomControlBased?this.setupCustomControl():(this.valueAccessor??=this.selectedValueAccessor,oc(this.control,this,e))}_checkForErrors(){this._checkName()}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(e){xu.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){let t=e.isDisabled.currentValue,n=t!==0&&z(t);xu.then(()=>{n&&!this.control.disabled?this.control.disable():!n&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?Hu(e,this._parent):[e]}static \u0275fac=function(t){return new(t||i)(be(ln,9),be(cn,10),be(hs,10),be(Ui,10),be(se,8),be(za,8),be(Z,8),be(we,8))};static \u0275dir=T({type:i,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"],options:[0,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],standalone:!1,features:[le([E_,qu]),ie,Ie,ll(null)]})}return i})();var An=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""],standalone:!1})}return i})(),T_={provide:Ui,useExisting:lt(()=>oo),multi:!0},oo=(()=>{class i extends Su{writeValue(e){let t=e??"";this.setProperty("value",t)}registerOnChange(e){this.onChange=t=>{e(t==""?null:parseFloat(t))}}static \u0275fac=(()=>{let e;return function(n){return(e||(e=xe(i)))(n||i)}})();static \u0275dir=T({type:i,selectors:[["input","type","number","formControlName","",3,"ngNoCva",""],["input","type","number","formControl","",3,"ngNoCva",""],["input","type","number","ngModel","",3,"ngNoCva",""]],hostBindings:function(t,n){t&1&&S("input",function(r){return n.onChange(r.target.value)})("blur",function(){return n.onTouched()})},standalone:!1,features:[le([T_]),ie]})}return i})();var rc=class extends Bo{constructor(o,e,t){super(mc(e),uc(t,e)),this.controls=o,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;at(o){return this.controls[this._adjustIndex(o)]}push(o,e={}){Array.isArray(o)?o.forEach(t=>{this.controls.push(t),this._registerControl(t)}):(this.controls.push(o),this._registerControl(o)),this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}insert(o,e,t={}){this.controls.splice(o,0,e),this._registerControl(e),this.updateValueAndValidity({emitEvent:t.emitEvent})}removeAt(o,e={}){let t=this._adjustIndex(o);t<0&&(t=0),this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),this.controls.splice(t,1),this.updateValueAndValidity({emitEvent:e.emitEvent})}setControl(o,e,t={}){let n=this._adjustIndex(o);n<0&&(n=0),this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),this.controls.splice(n,1),e&&(this.controls.splice(n,0,e),this._registerControl(e)),this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(o,e={}){Tt(()=>{Bu(this,!1,o),o.forEach((t,n)=>{Vu(this,!1,n),this.at(n).setValue(t,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)})}patchValue(o,e={}){o!=null&&(o.forEach((t,n)=>{this.at(n)&&this.at(n).patchValue(t,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(o=[],e={}){this._forEachChild((t,n)=>{t.reset(o[n],Fe(V({},e),{onlySelf:!0}))}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e),e?.emitEvent!==!1&&this._events.next(new no(this))}getRawValue(){return this.controls.map(o=>o.getRawValue())}clear(o={}){this.controls.length<1||(this._forEachChild(e=>e._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:o.emitEvent}))}_adjustIndex(o){return o<0?o+this.length:o}_syncPendingControls(){let o=this.controls.reduce((e,t)=>t._syncPendingControls()?!0:e,!1);return o&&this.updateValueAndValidity({onlySelf:!0}),o}_forEachChild(o){this.controls.forEach((e,t)=>{o(e,t)})}_updateValue(){this.value=this.controls.filter(o=>o.enabled||this.disabled).map(o=>o.value)}_anyControls(o){return this.controls.some(e=>e.enabled&&o(e))}_setUpControls(){this._forEachChild(o=>this._registerControl(o))}_allControlsDisabled(){for(let o of this.controls)if(o.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(o){o.setParent(this),o._registerOnCollectionChange(this._onCollectionChange)}_find(o){return this.at(o)??null}};var A_=(()=>{class i extends ln{callSetDisabledState;get submitted(){return Tt(this._submittedReactive)}set submitted(e){this._submittedReactive.set(e)}_submitted=P(()=>this._submittedReactive());_submittedReactive=E(!1);_oldForm;_onCollectionChange=()=>this._updateDomValue();directives=[];constructor(e,t,n){super(),this.callSetDisabledState=n,this._setValidators(e),this._setAsyncValidators(t)}ngOnChanges(e){this.onChanges(e)}ngOnDestroy(){this.onDestroy()}onChanges(e){this._checkFormPresent(),e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}onDestroy(){this.form&&(ms(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get path(){return[]}addControl(e){let t=this.form.get(e.path);return e._setupWithForm(t,this.callSetDisabledState),t.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),t}getControl(e){return this.form.get(e.path)}removeControl(e){bu(e.control||null,e,!1),S_(this.directives,e)}addFormGroup(e){this._setUpFormContainer(e)}removeFormGroup(e){this._cleanUpFormContainer(e)}getFormGroup(e){return this.form.get(e.path)}getFormArray(e){return this.form.get(e.path)}addFormArray(e){this._setUpFormContainer(e)}removeFormArray(e){this._cleanUpFormContainer(e)}updateModel(e,t){this.form.get(e.path).setValue(t)}onReset(){this.resetForm()}resetForm(e=void 0,t={}){this.form.reset(e,t),this._submittedReactive.set(!1)}onSubmit(e){return this.submitted=!0,Wu(this.form,this.directives),this.ngSubmit.emit(e),this.form._events.next(new cs(this.control)),e?.target?.method==="dialog"}_updateDomValue(){this.directives.forEach(e=>{let t=e.control,n=this.form.get(e.path);t!==n&&(bu(t||null,e),M_(n)&&e._setupWithForm(n,this.callSetDisabledState))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){let t=this.form.get(e.path);$u(t,e),t.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){let t=this.form?.get(e.path);t&&x_(t,e)&&t.updateValueAndValidity({emitEvent:!1})}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm?._registerOnCollectionChange(()=>{})}_updateValidators(){fc(this.form,this),this._oldForm&&ms(this._oldForm,this)}_checkFormPresent(){this.form}static \u0275fac=function(t){return new(t||i)(be(cn,10),be(hs,10),be(za,8))};static \u0275dir=T({type:i,features:[ie,Ie]})}return i})();var Ku=new k("");var I_={provide:fi,useExisting:lt(()=>Ti)},Ti=(()=>{class i extends fi{_ngModelWarningConfig;_added=!1;viewModel;control;name=null;set isDisabled(e){}model;update=new X;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(e,t,n,a,r,u,h){super(h,u,a),this._ngModelWarningConfig=r,this._parent=e,this._setValidators(t),this._setAsyncValidators(n)}_setupWithForm(e,t){this.control=e,this.isCustomControlBased?this.setupCustomControl():(this.valueAccessor??=this.selectedValueAccessor,oc(e,this,t))}ngOnChanges(e){this._added||this._setUpControl(),Gu(e,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective?.removeControl(this)}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}get path(){return Hu(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_setUpControl(){this.control=this.formDirective.addControl(this),this._added=!0}\u0275ngControlCreate(e){super.ngControlCreate(e)}\u0275ngControlUpdate(e){this.isCustomControlBased&&(this._added||this._setUpControl(),super.ngControlUpdate(e,!0))}static \u0275fac=function(t){return new(t||i)(be(ln,13),be(cn,10),be(hs,10),be(Ui,10),be(Ku,8),be(we,8),be(Z,8))};static \u0275dir=T({type:i,selectors:[["","formControlName",""]],inputs:{name:[0,"formControlName","name"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},standalone:!1,features:[le([I_,qu]),ie,Ie,ll(null)]})}return i})();var R_={provide:ln,useExisting:lt(()=>Ut)},Ut=(()=>{class i extends A_{form=null;ngSubmit=new X;get control(){return this.form}static \u0275fac=(()=>{let e;return function(n){return(e||(e=xe(i)))(n||i)}})();static \u0275dir=T({type:i,selectors:[["","formGroup",""]],hostBindings:function(t,n){t&1&&S("submit",function(r){return n.onSubmit(r)})("reset",function(){return n.onReset()})},inputs:{form:[0,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[le([R_]),ie]})}return i})();var Xu=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=U({type:i});static \u0275inj=H({})}return i})();function wu(i){return!!i&&(i.asyncValidators!==void 0||i.validators!==void 0||i.updateOn!==void 0)}var Gi=(()=>{class i{useNonNullable=!1;get nonNullable(){let e=new i;return e.useNonNullable=!0,e}group(e,t=null){let n=this._reduceControls(e),a={};return wu(t)?a=t:t!==null&&(a.validators=t.validator,a.asyncValidators=t.asyncValidator),new zo(n,a)}record(e,t=null){let n=this._reduceControls(e);return new ac(n,t)}control(e,t,n){let a={};return this.useNonNullable?(wu(t)?a=t:(a.validators=t,a.asyncValidators=n),new Va(e,Fe(V({},a),{nonNullable:!0}))):new Va(e,t,n)}array(e,t,n){let a=e.map(r=>this._createControl(r));return new rc(a,t,n)}_reduceControls(e){let t={};return Object.keys(e).forEach(n=>{t[n]=this._createControl(e[n])}),t}_createControl(e){if(e instanceof Va)return e;if(e instanceof Bo)return e;if(Array.isArray(e)){let t=e[0],n=e.length>1?e[1]:null,a=e.length>2?e[2]:null;return this.control(t,n,a)}else return this.control(e)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();var gi=(()=>{class i{static withConfig(e){return{ngModule:i,providers:[{provide:za,useValue:e.callSetDisabledState??gs}]}}static \u0275fac=function(t){return new(t||i)};static \u0275mod=U({type:i});static \u0275inj=H({imports:[Xu]})}return i})(),Wi=(()=>{class i{static withConfig(e){return{ngModule:i,providers:[{provide:Ku,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:za,useValue:e.callSetDisabledState??gs}]}}static \u0275fac=function(t){return new(t||i)};static \u0275mod=U({type:i});static \u0275inj=H({imports:[Xu]})}return i})();var Yu=new k("MAT_INPUT_VALUE_ACCESSOR");var gc=class{_box;_destroyed=new O;_resizeSubject=new O;_resizeObserver;_elementObservables=new Map;constructor(o){this._box=o,typeof ResizeObserver<"u"&&(this._resizeObserver=new ResizeObserver(e=>this._resizeSubject.next(e)))}observe(o){return this._elementObservables.has(o)||this._elementObservables.set(o,new Nt(e=>{let t=this._resizeSubject.subscribe(e);return this._resizeObserver?.observe(o,{box:this._box}),()=>{this._resizeObserver?.unobserve(o),t.unsubscribe(),this._elementObservables.delete(o)}}).pipe(ke(e=>e.some(t=>t.target===o)),tl({bufferSize:1,refCount:!0}),ue(this._destroyed))),this._elementObservables.get(o)}destroy(){this._destroyed.next(),this._destroyed.complete(),this._resizeSubject.complete(),this._elementObservables.clear()}},Zu=(()=>{class i{_cleanupErrorListener;_observers=new Map;_ngZone=m($);constructor(){typeof ResizeObserver<"u"}ngOnDestroy(){for(let[,e]of this._observers)e.destroy();this._observers.clear(),this._cleanupErrorListener?.()}observe(e,t){let n=t?.box||"content-box";return this._observers.has(n)||this._observers.set(n,new gc(n)),this._observers.get(n).observe(e)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();var P_=["notch"],O_=["*"],Qu=["iconPrefixContainer"],Ju=["textPrefixContainer"],eh=["iconSuffixContainer"],th=["textSuffixContainer"],F_=["textField"],N_=["*",[["mat-label"]],[["","matPrefix",""],["","matIconPrefix",""]],[["","matTextPrefix",""]],[["","matTextSuffix",""]],[["","matSuffix",""],["","matIconSuffix",""]],[["mat-error"],["","matError",""]],[["mat-hint",3,"align","end"]],[["mat-hint","align","end"]]],L_=["*","mat-label","[matPrefix], [matIconPrefix]","[matTextPrefix]","[matTextSuffix]","[matSuffix], [matIconSuffix]","mat-error, [matError]","mat-hint:not([align='end'])","mat-hint[align='end']"];function V_(i,o){i&1&&_(0,"span",21)}function B_(i,o){if(i&1&&(s(0,"label",20),W(1,1),w(2,V_,1,0,"span",21),l()),i&2){let e=v(2);x("floating",e._shouldLabelFloat())("monitorResize",e._hasOutline())("id",e._labelId),J("for",e._control.disableAutomaticLabeling?null:e._control.id),c(2),D(!e.hideRequiredMarker&&e._control.required?2:-1)}}function z_(i,o){if(i&1&&w(0,B_,3,5,"label",20),i&2){let e=v();D(e._hasFloatingLabel()?0:-1)}}function j_(i,o){i&1&&_(0,"div",7)}function H_(i,o){}function U_(i,o){if(i&1&&We(0,H_,0,0,"ng-template",13),i&2){v(2);let e=Se(1);x("ngTemplateOutlet",e)}}function $_(i,o){if(i&1&&(s(0,"div",9),w(1,U_,1,1,null,13),l()),i&2){let e=v();x("matFormFieldNotchedOutlineOpen",e._shouldLabelFloat()),c(),D(e._forceDisplayInfixLabel()?-1:1)}}function G_(i,o){i&1&&(s(0,"div",10,2),W(2,2),l())}function W_(i,o){i&1&&(s(0,"div",11,3),W(2,3),l())}function q_(i,o){}function K_(i,o){if(i&1&&We(0,q_,0,0,"ng-template",13),i&2){v();let e=Se(1);x("ngTemplateOutlet",e)}}function X_(i,o){i&1&&(s(0,"div",14,4),W(2,4),l())}function Y_(i,o){i&1&&(s(0,"div",15,5),W(2,5),l())}function Z_(i,o){i&1&&_(0,"div",16)}function Q_(i,o){i&1&&(s(0,"div",18),W(1,6),l())}function J_(i,o){if(i&1&&(s(0,"mat-hint",22),d(1),l()),i&2){let e=v(2);x("id",e._hintLabelId),c(),I(e.hintLabel)}}function ev(i,o){if(i&1&&(s(0,"div",19),w(1,J_,2,2,"mat-hint",22),W(2,7),_(3,"div",23),W(4,8),l()),i&2){let e=v();c(),D(e.hintLabel?1:-1)}}var _t=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,selectors:[["mat-label"]]})}return i})(),lh=new k("MatError"),qi=(()=>{class i{id=m(De).getId("mat-mdc-error-");static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,selectors:[["mat-error"],["","matError",""]],hostAttrs:[1,"mat-mdc-form-field-error","mat-mdc-form-field-bottom-align"],hostVars:1,hostBindings:function(t,n){t&2&&ft("id",n.id)},inputs:{id:"id"},features:[le([{provide:lh,useExisting:i}])]})}return i})(),jo=(()=>{class i{align="start";id=m(De).getId("mat-mdc-hint-");static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,selectors:[["mat-hint"]],hostAttrs:[1,"mat-mdc-form-field-hint","mat-mdc-form-field-bottom-align"],hostVars:4,hostBindings:function(t,n){t&2&&(ft("id",n.id),J("align",null),p("mat-mdc-form-field-hint-end",n.align==="end"))},inputs:{align:"align",id:"id"}})}return i})(),tv=new k("MatPrefix");var iv=new k("MatSuffix");var ch=new k("FloatingLabelParent"),ih=(()=>{class i{_elementRef=m(B);get floating(){return this._floating}set floating(e){this._floating=e,this.monitorResize&&this._handleResize()}_floating=!1;get monitorResize(){return this._monitorResize}set monitorResize(e){this._monitorResize=e,this._monitorResize?this._subscribeToResize():this._resizeSubscription.unsubscribe()}_monitorResize=!1;_resizeObserver=m(Zu);_ngZone=m($);_parent=m(ch);_resizeSubscription=new Te;ngOnDestroy(){this._resizeSubscription.unsubscribe()}getWidth(){return nv(this._elementRef.nativeElement)}get element(){return this._elementRef.nativeElement}_handleResize(){setTimeout(()=>this._parent._handleLabelResized())}_subscribeToResize(){this._resizeSubscription.unsubscribe(),this._ngZone.runOutsideAngular(()=>{this._resizeSubscription=this._resizeObserver.observe(this._elementRef.nativeElement,{box:"border-box"}).subscribe(()=>this._handleResize())})}static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,selectors:[["label","matFormFieldFloatingLabel",""]],hostAttrs:[1,"mdc-floating-label","mat-mdc-floating-label"],hostVars:2,hostBindings:function(t,n){t&2&&p("mdc-floating-label--float-above",n.floating)},inputs:{floating:"floating",monitorResize:"monitorResize"}})}return i})();function nv(i){let o=i;if(o.offsetParent!==null)return o.scrollWidth;let e=o.cloneNode(!0);e.style.setProperty("position","absolute"),e.style.setProperty("transform","translate(-9999px, -9999px)"),document.documentElement.appendChild(e);let t=e.scrollWidth;return e.remove(),t}var nh="mdc-line-ripple--active",_s="mdc-line-ripple--deactivating",oh=(()=>{class i{_elementRef=m(B);_cleanupTransitionEnd;constructor(){let e=m($),t=m(we);e.runOutsideAngular(()=>{this._cleanupTransitionEnd=t.listen(this._elementRef.nativeElement,"transitionend",this._handleTransitionEnd)})}activate(){let e=this._elementRef.nativeElement.classList;e.remove(_s),e.add(nh)}deactivate(){this._elementRef.nativeElement.classList.add(_s)}_handleTransitionEnd=e=>{let t=this._elementRef.nativeElement.classList,n=t.contains(_s);e.propertyName==="opacity"&&n&&t.remove(nh,_s)};ngOnDestroy(){this._cleanupTransitionEnd()}static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,selectors:[["div","matFormFieldLineRipple",""]],hostAttrs:[1,"mdc-line-ripple"]})}return i})(),ah=(()=>{class i{_elementRef=m(B);_ngZone=m($);open=!1;_notch;ngAfterViewInit(){let e=this._elementRef.nativeElement,t=e.querySelector(".mdc-floating-label");t?(e.classList.add("mdc-notched-outline--upgraded"),typeof requestAnimationFrame=="function"&&(t.style.transitionDuration="0s",this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>t.style.transitionDuration="")}))):e.classList.add("mdc-notched-outline--no-label")}_setNotchWidth(e){let t=this._notch.nativeElement;!this.open||!e?t.style.width="":t.style.width=`calc(${e}px * var(--mat-mdc-form-field-floating-label-scale, 0.75) + 9px)`}_setMaxWidth(e){this._notch.nativeElement.style.setProperty("--mat-form-field-notch-max-width",`calc(100% - ${e}px)`)}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=R({type:i,selectors:[["div","matFormFieldNotchedOutline",""]],viewQuery:function(t,n){if(t&1&&Re(P_,5),t&2){let a;N(a=L())&&(n._notch=a.first)}},hostAttrs:[1,"mdc-notched-outline"],hostVars:2,hostBindings:function(t,n){t&2&&p("mdc-notched-outline--notched",n.open)},inputs:{open:[0,"matFormFieldNotchedOutlineOpen","open"]},ngContentSelectors:O_,decls:5,vars:0,consts:[["notch",""],[1,"mat-mdc-notch-piece","mdc-notched-outline__leading"],[1,"mat-mdc-notch-piece","mdc-notched-outline__notch"],[1,"mat-mdc-notch-piece","mdc-notched-outline__trailing"]],template:function(t,n){t&1&&(ve(),kt(0,"div",1),Ne(1,"div",2,0),W(3),qe(),kt(4,"div",3))},encapsulation:2})}return i})(),Ua=(()=>{class i{value=null;stateChanges;id;placeholder;ngControl=null;focused=!1;empty=!1;shouldLabelFloat=!1;required=!1;disabled=!1;errorState=!1;controlType;autofilled;userAriaDescribedBy;disableAutomaticLabeling;describedByIds;static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i})}return i})();var ro=new k("MatFormField"),ov=new k("MAT_FORM_FIELD_DEFAULT_OPTIONS"),rh="fill",av="auto",sh="fixed",rv="translateY(-50%)",ut=(()=>{class i{_elementRef=m(B);_changeDetectorRef=m(se);_platform=m(fe);_idGenerator=m(De);_ngZone=m($);_defaults=m(ov,{optional:!0});_currentDirection;_textField;_iconPrefixContainer;_textPrefixContainer;_iconSuffixContainer;_textSuffixContainer;_floatingLabel;_notchedOutline;_lineRipple;_iconPrefixContainerSignal=ma("iconPrefixContainer");_textPrefixContainerSignal=ma("textPrefixContainer");_iconSuffixContainerSignal=ma("iconSuffixContainer");_textSuffixContainerSignal=ma("textSuffixContainer");_prefixSuffixContainers=P(()=>[this._iconPrefixContainerSignal(),this._textPrefixContainerSignal(),this._iconSuffixContainerSignal(),this._textSuffixContainerSignal()].map(e=>e?.nativeElement).filter(e=>e!==void 0));_formFieldControl;_prefixChildren;_suffixChildren;_errorChildren;_hintChildren;_labelChild=Id(_t);get hideRequiredMarker(){return this._hideRequiredMarker}set hideRequiredMarker(e){this._hideRequiredMarker=gt(e)}_hideRequiredMarker=!1;color="primary";get floatLabel(){return this._floatLabel||this._defaults?.floatLabel||av}set floatLabel(e){e!==this._floatLabel&&(this._floatLabel=e,this._changeDetectorRef.markForCheck())}_floatLabel;get appearance(){return this._appearanceSignal()}set appearance(e){let t=e||this._defaults?.appearance||rh;this._appearanceSignal.set(t)}_appearanceSignal=E(rh);get subscriptSizing(){return this._subscriptSizing||this._defaults?.subscriptSizing||sh}set subscriptSizing(e){this._subscriptSizing=e||this._defaults?.subscriptSizing||sh}_subscriptSizing=null;get hintLabel(){return this._hintLabel}set hintLabel(e){this._hintLabel=e,this._processHints()}_hintLabel="";_hasIconPrefix=!1;_hasTextPrefix=!1;_hasIconSuffix=!1;_hasTextSuffix=!1;_labelId=this._idGenerator.getId("mat-mdc-form-field-label-");_hintLabelId=this._idGenerator.getId("mat-mdc-hint-");_describedByIds;get _control(){return this._explicitFormFieldControl||this._formFieldControl}set _control(e){this._explicitFormFieldControl=e}_destroyed=new O;_isFocused=null;_explicitFormFieldControl;_previousControl=null;_previousControlValidatorFn=null;_stateChanges;_valueChanges;_describedByChanges;_outlineLabelOffsetResizeObserver=null;_animationsDisabled=ye();constructor(){let e=this._defaults,t=m(Ze);e&&(e.appearance&&(this.appearance=e.appearance),this._hideRequiredMarker=!!e?.hideRequiredMarker,e.color&&(this.color=e.color)),Bt(()=>this._currentDirection=t.valueSignal()),this._syncOutlineLabelOffset()}ngAfterViewInit(){this._updateFocusState(),this._animationsDisabled||this._ngZone.runOutsideAngular(()=>{setTimeout(()=>{this._elementRef.nativeElement.classList.add("mat-form-field-animations-enabled")},300)}),this._changeDetectorRef.detectChanges()}ngAfterContentInit(){this._assertFormFieldControl(),this._initializeSubscript(),this._initializePrefixAndSuffix()}ngAfterContentChecked(){this._assertFormFieldControl(),this._control!==this._previousControl&&(this._initializeControl(this._previousControl),this._control.ngControl&&this._control.ngControl.control&&(this._previousControlValidatorFn=this._control.ngControl.control.validator),this._previousControl=this._control),this._control.ngControl&&this._control.ngControl.control&&this._control.ngControl.control.validator!==this._previousControlValidatorFn&&this._changeDetectorRef.markForCheck()}ngOnDestroy(){this._outlineLabelOffsetResizeObserver?.disconnect(),this._stateChanges?.unsubscribe(),this._valueChanges?.unsubscribe(),this._describedByChanges?.unsubscribe(),this._destroyed.next(),this._destroyed.complete()}getLabelId=P(()=>this._hasFloatingLabel()?this._labelId:null);getConnectedOverlayOrigin(){return this._textField||this._elementRef}_animateAndLockLabel(){this._hasFloatingLabel()&&(this.floatLabel="always")}_initializeControl(e){let t=this._control,n="mat-mdc-form-field-type-";e&&this._elementRef.nativeElement.classList.remove(n+e.controlType),t.controlType&&this._elementRef.nativeElement.classList.add(n+t.controlType),this._stateChanges?.unsubscribe(),this._stateChanges=t.stateChanges.subscribe(()=>{this._updateFocusState(),this._changeDetectorRef.markForCheck()}),this._describedByChanges?.unsubscribe(),this._describedByChanges=t.stateChanges.pipe(Ee([void 0,void 0]),Ve(()=>[t.errorState,t.userAriaDescribedBy]),el(),ke(([[a,r],[u,h]])=>a!==u||r!==h)).subscribe(()=>this._syncDescribedByIds()),this._valueChanges?.unsubscribe(),t.ngControl&&t.ngControl.valueChanges&&(this._valueChanges=t.ngControl.valueChanges.pipe(ue(this._destroyed)).subscribe(()=>this._changeDetectorRef.markForCheck()))}_checkPrefixAndSuffixTypes(){this._hasIconPrefix=!!this._prefixChildren.find(e=>!e._isText),this._hasTextPrefix=!!this._prefixChildren.find(e=>e._isText),this._hasIconSuffix=!!this._suffixChildren.find(e=>!e._isText),this._hasTextSuffix=!!this._suffixChildren.find(e=>e._isText)}_initializePrefixAndSuffix(){this._checkPrefixAndSuffixTypes(),Xe(this._prefixChildren.changes,this._suffixChildren.changes).subscribe(()=>{this._checkPrefixAndSuffixTypes(),this._changeDetectorRef.markForCheck()})}_initializeSubscript(){this._hintChildren.changes.subscribe(()=>{this._processHints(),this._changeDetectorRef.markForCheck()}),this._errorChildren.changes.subscribe(()=>{this._syncDescribedByIds(),this._changeDetectorRef.markForCheck()}),this._validateHints(),this._syncDescribedByIds()}_assertFormFieldControl(){this._control}_updateFocusState(){let e=this._control.focused;e&&!this._isFocused?(this._isFocused=!0,this._lineRipple?.activate()):!e&&(this._isFocused||this._isFocused===null)&&(this._isFocused=!1,this._lineRipple?.deactivate()),this._elementRef.nativeElement.classList.toggle("mat-focused",e),this._textField?.nativeElement.classList.toggle("mdc-text-field--focused",e)}_syncOutlineLabelOffset(){Od({earlyRead:()=>{if(this._appearanceSignal()!=="outline")return this._outlineLabelOffsetResizeObserver?.disconnect(),null;if(globalThis.ResizeObserver){this._outlineLabelOffsetResizeObserver||=new globalThis.ResizeObserver(()=>{this._writeOutlinedLabelStyles(this._getOutlinedLabelOffset())});for(let e of this._prefixSuffixContainers())this._outlineLabelOffsetResizeObserver.observe(e,{box:"border-box"})}return this._getOutlinedLabelOffset()},write:e=>this._writeOutlinedLabelStyles(e())})}_shouldAlwaysFloat(){return this.floatLabel==="always"}_hasOutline(){return this.appearance==="outline"}_forceDisplayInfixLabel(){return!this._platform.isBrowser&&this._prefixChildren.length&&!this._shouldLabelFloat()}_hasFloatingLabel=P(()=>!!this._labelChild());_shouldLabelFloat(){return this._hasFloatingLabel()?this._control.shouldLabelFloat||this._shouldAlwaysFloat():!1}_shouldForward(e){let t=this._control?this._control.ngControl:null;return t&&t[e]}_getSubscriptMessageType(){return this._errorChildren&&this._errorChildren.length>0&&this._control.errorState?"error":"hint"}_handleLabelResized(){this._refreshOutlineNotchWidth()}_refreshOutlineNotchWidth(){!this._hasOutline()||!this._floatingLabel||!this._shouldLabelFloat()?this._notchedOutline?._setNotchWidth(0):this._notchedOutline?._setNotchWidth(this._floatingLabel.getWidth())}_processHints(){this._validateHints(),this._syncDescribedByIds()}_validateHints(){this._hintChildren}_syncDescribedByIds(){if(this._control){let e=[];if(this._control.userAriaDescribedBy&&typeof this._control.userAriaDescribedBy=="string"&&e.push(...this._control.userAriaDescribedBy.split(" ")),this._getSubscriptMessageType()==="hint"){let a=this._hintChildren?this._hintChildren.find(u=>u.align==="start"):null,r=this._hintChildren?this._hintChildren.find(u=>u.align==="end"):null;a?e.push(a.id):this._hintLabel&&e.push(this._hintLabelId),r&&e.push(r.id)}else this._errorChildren&&e.push(...this._errorChildren.map(a=>a.id));let t=this._control.describedByIds,n;if(t){let a=this._describedByIds||e;n=e.concat(t.filter(r=>r&&!a.includes(r)))}else n=e;this._control.setDescribedByIds(n),this._describedByIds=e}}_getOutlinedLabelOffset(){if(!this._hasOutline()||!this._floatingLabel)return null;if(!this._iconPrefixContainer&&!this._textPrefixContainer)return["",null];if(!this._isAttachedToDom())return null;let e=this._iconPrefixContainer?.nativeElement,t=this._textPrefixContainer?.nativeElement,n=this._iconSuffixContainer?.nativeElement,a=this._textSuffixContainer?.nativeElement,r=e?.getBoundingClientRect().width??0,u=t?.getBoundingClientRect().width??0,h=n?.getBoundingClientRect().width??0,f=a?.getBoundingClientRect().width??0,b=this._currentDirection==="rtl"?"-1":"1",M=`${r+u}px`,G=`calc(${b} * (${M} + var(--mat-mdc-form-field-label-offset-x, 0px)))`,de=`var(--mat-mdc-form-field-label-transform, ${rv} translateX(${G}))`,Ce=r+u+h+f;return[de,Ce]}_writeOutlinedLabelStyles(e){if(e!==null){let[t,n]=e;this._floatingLabel&&(this._floatingLabel.element.style.transform=t),n!==null&&this._notchedOutline?._setMaxWidth(n)}}_isAttachedToDom(){let e=this._elementRef.nativeElement;if(e.getRootNode){let t=e.getRootNode();return t&&t!==e}return document.documentElement.contains(e)}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=R({type:i,selectors:[["mat-form-field"]],contentQueries:function(t,n,a){if(t&1&&(Dd(a,n._labelChild,_t,5),dt(a,Ua,5)(a,tv,5)(a,iv,5)(a,lh,5)(a,jo,5)),t&2){cl();let r;N(r=L())&&(n._formFieldControl=r.first),N(r=L())&&(n._prefixChildren=r),N(r=L())&&(n._suffixChildren=r),N(r=L())&&(n._errorChildren=r),N(r=L())&&(n._hintChildren=r)}},viewQuery:function(t,n){if(t&1&&(Sd(n._iconPrefixContainerSignal,Qu,5)(n._textPrefixContainerSignal,Ju,5)(n._iconSuffixContainerSignal,eh,5)(n._textSuffixContainerSignal,th,5),Re(F_,5)(Qu,5)(Ju,5)(eh,5)(th,5)(ih,5)(ah,5)(oh,5)),t&2){cl(4);let a;N(a=L())&&(n._textField=a.first),N(a=L())&&(n._iconPrefixContainer=a.first),N(a=L())&&(n._textPrefixContainer=a.first),N(a=L())&&(n._iconSuffixContainer=a.first),N(a=L())&&(n._textSuffixContainer=a.first),N(a=L())&&(n._floatingLabel=a.first),N(a=L())&&(n._notchedOutline=a.first),N(a=L())&&(n._lineRipple=a.first)}},hostAttrs:[1,"mat-mdc-form-field"],hostVars:38,hostBindings:function(t,n){t&2&&p("mat-mdc-form-field-label-always-float",n._shouldAlwaysFloat())("mat-mdc-form-field-has-icon-prefix",n._hasIconPrefix)("mat-mdc-form-field-has-icon-suffix",n._hasIconSuffix)("mat-form-field-invalid",n._control.errorState)("mat-form-field-disabled",n._control.disabled)("mat-form-field-autofilled",n._control.autofilled)("mat-form-field-appearance-fill",n.appearance=="fill")("mat-form-field-appearance-outline",n.appearance=="outline")("mat-form-field-hide-placeholder",n._hasFloatingLabel()&&!n._shouldLabelFloat())("mat-primary",n.color!=="accent"&&n.color!=="warn")("mat-accent",n.color==="accent")("mat-warn",n.color==="warn")("ng-untouched",n._shouldForward("untouched"))("ng-touched",n._shouldForward("touched"))("ng-pristine",n._shouldForward("pristine"))("ng-dirty",n._shouldForward("dirty"))("ng-valid",n._shouldForward("valid"))("ng-invalid",n._shouldForward("invalid"))("ng-pending",n._shouldForward("pending"))},inputs:{hideRequiredMarker:"hideRequiredMarker",color:"color",floatLabel:"floatLabel",appearance:"appearance",subscriptSizing:"subscriptSizing",hintLabel:"hintLabel"},exportAs:["matFormField"],features:[le([{provide:ro,useExisting:i},{provide:ch,useExisting:i}])],ngContentSelectors:L_,decls:18,vars:21,consts:[["labelTemplate",""],["textField",""],["iconPrefixContainer",""],["textPrefixContainer",""],["textSuffixContainer",""],["iconSuffixContainer",""],[1,"mat-mdc-text-field-wrapper","mdc-text-field",3,"click"],[1,"mat-mdc-form-field-focus-overlay"],[1,"mat-mdc-form-field-flex"],["matFormFieldNotchedOutline","",3,"matFormFieldNotchedOutlineOpen"],[1,"mat-mdc-form-field-icon-prefix"],[1,"mat-mdc-form-field-text-prefix"],[1,"mat-mdc-form-field-infix"],[3,"ngTemplateOutlet"],[1,"mat-mdc-form-field-text-suffix"],[1,"mat-mdc-form-field-icon-suffix"],["matFormFieldLineRipple",""],["aria-atomic","true","aria-live","polite",1,"mat-mdc-form-field-subscript-wrapper","mat-mdc-form-field-bottom-align"],[1,"mat-mdc-form-field-error-wrapper"],[1,"mat-mdc-form-field-hint-wrapper"],["matFormFieldFloatingLabel","",3,"floating","monitorResize","id"],["aria-hidden","true",1,"mat-mdc-form-field-required-marker","mdc-floating-label--required"],[3,"id"],[1,"mat-mdc-form-field-hint-spacer"]],template:function(t,n){if(t&1&&(ve(N_),We(0,z_,1,1,"ng-template",null,0,dl),s(2,"div",6,1),S("click",function(r){return n._control.onContainerClick(r)}),w(4,j_,1,0,"div",7),s(5,"div",8),w(6,$_,2,2,"div",9),w(7,G_,3,0,"div",10),w(8,W_,3,0,"div",11),s(9,"div",12),w(10,K_,1,1,null,13),W(11),l(),w(12,X_,3,0,"div",14),w(13,Y_,3,0,"div",15),l(),w(14,Z_,1,0,"div",16),l(),s(15,"div",17),w(16,Q_,2,0,"div",18)(17,ev,5,1,"div",19),l()),t&2){let a;c(2),p("mdc-text-field--filled",!n._hasOutline())("mdc-text-field--outlined",n._hasOutline())("mdc-text-field--no-label",!n._hasFloatingLabel())("mdc-text-field--disabled",n._control.disabled)("mdc-text-field--invalid",n._control.errorState),c(2),D(!n._hasOutline()&&!n._control.disabled?4:-1),c(2),D(n._hasOutline()?6:-1),c(),D(n._hasIconPrefix?7:-1),c(),D(n._hasTextPrefix?8:-1),c(2),D(!n._hasOutline()||n._forceDisplayInfixLabel()?10:-1),c(2),D(n._hasTextSuffix?12:-1),c(),D(n._hasIconSuffix?13:-1),c(),D(n._hasOutline()?-1:14),c(),p("mat-mdc-form-field-subscript-dynamic-size",n.subscriptSizing==="dynamic");let r=n._getSubscriptMessageType();c(),D((a=r)==="error"?16:a==="hint"?17:-1)}},dependencies:[ih,ah,Cl,oh,jo],styles:[`.mdc-text-field {
471
+ `],encapsulation:2})}return i})(),es;function Bg(){if(es===void 0&&(es=null,typeof window<"u")){let i=window;i.trustedTypes!==void 0&&(es=i.trustedTypes.createPolicy("angular#components",{createHTML:o=>o}))}return es}function eo(i){return Bg()?.createHTML(i)||i}function Qm(i,o,e){let t=e.sanitize(zt.HTML,o);i.innerHTML=eo(t||"")}function zg(i){if(i.type==="characterData"&&i.target instanceof Comment)return!0;if(i.type==="childList"){for(let o=0;o<i.addedNodes.length;o++)if(!(i.addedNodes[o]instanceof Comment))return!1;for(let o=0;o<i.removedNodes.length;o++)if(!(i.removedNodes[o]instanceof Comment))return!1;return!0}return!1}var Jm=(()=>{class i{create(e){return typeof MutationObserver>"u"?null:new MutationObserver(e)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})(),eu=(()=>{class i{_mutationObserverFactory=m(Jm);_observedElements=new Map;_ngZone=m($);ngOnDestroy(){this._observedElements.forEach((e,t)=>this._cleanupObserver(t))}observe(e){let t=Ut(e);return new Nt(n=>{let r=this._observeElement(t).pipe(Ve(u=>u.filter(h=>!zg(h))),ke(u=>!!u.length)).subscribe(u=>{this._ngZone.run(()=>{n.next(u)})});return()=>{r.unsubscribe(),this._unobserveElement(t)}})}_observeElement(e){return this._ngZone.runOutsideAngular(()=>{if(this._observedElements.has(e))this._observedElements.get(e).count++;else{let t=new O,n=this._mutationObserverFactory.create(a=>t.next(a));n&&n.observe(e,{characterData:!0,childList:!0,subtree:!0}),this._observedElements.set(e,{observer:n,stream:t,count:1})}return this._observedElements.get(e).stream})}_unobserveElement(e){this._observedElements.has(e)&&(this._observedElements.get(e).count--,this._observedElements.get(e).count||this._cleanupObserver(e))}_cleanupObserver(e){if(this._observedElements.has(e)){let{observer:t,stream:n}=this._observedElements.get(e);t&&t.disconnect(),n.complete(),this._observedElements.delete(e)}}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})(),tu=(()=>{class i{_contentObserver=m(eu);_elementRef=m(B);event=new X;get disabled(){return this._disabled}set disabled(e){this._disabled=e,this._disabled?this._unsubscribe():this._subscribe()}_disabled=!1;get debounce(){return this._debounce}set debounce(e){this._debounce=ti(e),this._subscribe()}_debounce;_currentSubscription=null;ngAfterContentInit(){!this._currentSubscription&&!this.disabled&&this._subscribe()}ngOnDestroy(){this._unsubscribe()}_subscribe(){this._unsubscribe();let e=this._contentObserver.observe(this._elementRef);this._currentSubscription=(this.debounce?e.pipe(Lt(this.debounce)):e).subscribe(this.event)}_unsubscribe(){this._currentSubscription?.unsubscribe()}static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,selectors:[["","cdkObserveContent",""]],inputs:{disabled:[2,"cdkObserveContentDisabled","disabled",z],debounce:"debounce"},outputs:{event:"cdkObserveContent"},exportAs:["cdkObserveContent"]})}return i})(),Fo=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=U({type:i});static \u0275inj=H({providers:[Jm]})}return i})();var Ql=(()=>{class i{_platform=m(fe);isDisabled(e){return e.hasAttribute("disabled")}isVisible(e){return Hg(e)&&getComputedStyle(e).visibility==="visible"}isTabbable(e){if(!this._platform.isBrowser)return!1;let t=jg(Yg(e));if(t&&(iu(t)===-1||!this.isVisible(t)))return!1;let n=e.nodeName.toLowerCase(),a=iu(e);return e.hasAttribute("contenteditable")?a!==-1:n==="iframe"||n==="object"||this._platform.WEBKIT&&this._platform.IOS&&!Kg(e)?!1:n==="audio"?e.hasAttribute("controls")?a!==-1:!1:n==="video"?a===-1?!1:a!==null?!0:this._platform.FIREFOX||e.hasAttribute("controls"):e.tabIndex>=0}isFocusable(e,t){return Xg(e)&&!this.isDisabled(e)&&(t?.ignoreVisibility||this.isVisible(e))}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();function jg(i){try{return i.frameElement}catch(o){return null}}function Hg(i){return!!(i.offsetWidth||i.offsetHeight||typeof i.getClientRects=="function"&&i.getClientRects().length)}function Ug(i){let o=i.nodeName.toLowerCase();return o==="input"||o==="select"||o==="button"||o==="textarea"}function $g(i){return Wg(i)&&i.type=="hidden"}function Gg(i){return qg(i)&&i.hasAttribute("href")}function Wg(i){return i.nodeName.toLowerCase()=="input"}function qg(i){return i.nodeName.toLowerCase()=="a"}function au(i){if(!i.hasAttribute("tabindex")||i.tabIndex===void 0)return!1;let o=i.getAttribute("tabindex");return!!(o&&!isNaN(parseInt(o,10)))}function iu(i){if(!au(i))return null;let o=parseInt(i.getAttribute("tabindex")||"",10);return isNaN(o)?-1:o}function Kg(i){let o=i.nodeName.toLowerCase(),e=o==="input"&&i.type;return e==="text"||e==="password"||o==="select"||o==="textarea"}function Xg(i){return $g(i)?!1:Ug(i)||Gg(i)||i.hasAttribute("contenteditable")||au(i)}function Yg(i){return i.ownerDocument&&i.ownerDocument.defaultView||window}var Zl=class{_element;_checker;_ngZone;_document;_injector;_startAnchor=null;_endAnchor=null;_hasAttached=!1;startAnchorListener=()=>this.focusLastTabbableElement();endAnchorListener=()=>this.focusFirstTabbableElement();get enabled(){return this._enabled}set enabled(o){this._enabled=o,this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(o,this._startAnchor),this._toggleAnchorTabIndex(o,this._endAnchor))}_enabled=!0;constructor(o,e,t,n,a=!1,r){this._element=o,this._checker=e,this._ngZone=t,this._document=n,this._injector=r,a||this.attachAnchors()}destroy(){let o=this._startAnchor,e=this._endAnchor;o&&(o.removeEventListener("focus",this.startAnchorListener),o.remove()),e&&(e.removeEventListener("focus",this.endAnchorListener),e.remove()),this._startAnchor=this._endAnchor=null,this._hasAttached=!1}attachAnchors(){return this._hasAttached?!0:(this._ngZone.runOutsideAngular(()=>{this._startAnchor||(this._startAnchor=this._createAnchor(),this._startAnchor.addEventListener("focus",this.startAnchorListener)),this._endAnchor||(this._endAnchor=this._createAnchor(),this._endAnchor.addEventListener("focus",this.endAnchorListener))}),this._element.parentNode&&(this._element.parentNode.insertBefore(this._startAnchor,this._element),this._element.parentNode.insertBefore(this._endAnchor,this._element.nextSibling),this._hasAttached=!0),this._hasAttached)}focusInitialElementWhenReady(o){return new Promise(e=>{this._executeOnStable(()=>e(this.focusInitialElement(o)))})}focusFirstTabbableElementWhenReady(o){return new Promise(e=>{this._executeOnStable(()=>e(this.focusFirstTabbableElement(o)))})}focusLastTabbableElementWhenReady(o){return new Promise(e=>{this._executeOnStable(()=>e(this.focusLastTabbableElement(o)))})}_getRegionBoundary(o){let e=this._element.querySelectorAll(`[cdk-focus-region-${o}], [cdkFocusRegion${o}], [cdk-focus-${o}]`);return o=="start"?e.length?e[0]:this._getFirstTabbableElement(this._element):e.length?e[e.length-1]:this._getLastTabbableElement(this._element)}focusInitialElement(o){let e=this._element.querySelector("[cdk-focus-initial], [cdkFocusInitial]");if(e){if(!this._checker.isFocusable(e)){let t=this._getFirstTabbableElement(e);return t?.focus(o),!!t}return e.focus(o),!0}return this.focusFirstTabbableElement(o)}focusFirstTabbableElement(o){let e=this._getRegionBoundary("start");return e&&e.focus(o),!!e}focusLastTabbableElement(o){let e=this._getRegionBoundary("end");return e&&e.focus(o),!!e}hasAttached(){return this._hasAttached}_getFirstTabbableElement(o){if(this._checker.isFocusable(o)&&this._checker.isTabbable(o))return o;let e=o.children;for(let t=0;t<e.length;t++){let n=e[t].nodeType===this._document.ELEMENT_NODE?this._getFirstTabbableElement(e[t]):null;if(n)return n}return null}_getLastTabbableElement(o){if(this._checker.isFocusable(o)&&this._checker.isTabbable(o))return o;let e=o.children;for(let t=e.length-1;t>=0;t--){let n=e[t].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(e[t]):null;if(n)return n}return null}_createAnchor(){let o=this._document.createElement("div");return this._toggleAnchorTabIndex(this._enabled,o),o.classList.add("cdk-visually-hidden"),o.classList.add("cdk-focus-trap-anchor"),o.setAttribute("aria-hidden","true"),o}_toggleAnchorTabIndex(o,e){o?e.setAttribute("tabindex","0"):e.removeAttribute("tabindex")}toggleAnchors(o){this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(o,this._startAnchor),this._toggleAnchorTabIndex(o,this._endAnchor))}_executeOnStable(o){Ge(o,{injector:this._injector})}},Jl=(()=>{class i{_checker=m(Ql);_ngZone=m($);_document=m(K);_injector=m(Z);constructor(){m(Be).load(Sn)}create(e,t=!1){return new Zl(e,this._checker,this._ngZone,this._document,t,this._injector)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();var ru=new k("liveAnnouncerElement",{providedIn:"root",factory:()=>null}),su=new k("LIVE_ANNOUNCER_DEFAULT_OPTIONS"),Zg=0,Ta=(()=>{class i{_ngZone=m($);_defaultOptions=m(su,{optional:!0});_liveElement;_document=m(K);_sanitizer=m(Sa);_previousTimeout;_currentPromise;_currentResolve;constructor(){let e=m(ru,{optional:!0});this._liveElement=e||this._createLiveElement()}announce(e,...t){let n=this._defaultOptions,a,r;return t.length===1&&typeof t[0]=="number"?r=t[0]:[a,r]=t,this.clear(),clearTimeout(this._previousTimeout),a||(a=n&&n.politeness?n.politeness:"polite"),r==null&&n&&(r=n.duration),this._liveElement.setAttribute("aria-live",a),this._liveElement.id&&this._exposeAnnouncerToModals(this._liveElement.id),this._ngZone.runOutsideAngular(()=>(this._currentPromise||(this._currentPromise=new Promise(u=>this._currentResolve=u)),clearTimeout(this._previousTimeout),this._previousTimeout=setTimeout(()=>{!e||typeof e=="string"?this._liveElement.textContent=e:Qm(this._liveElement,e,this._sanitizer),typeof r=="number"&&(this._previousTimeout=setTimeout(()=>this.clear(),r)),this._currentResolve?.(),this._currentPromise=this._currentResolve=void 0},100),this._currentPromise))}clear(){this._liveElement&&(this._liveElement.textContent="")}ngOnDestroy(){clearTimeout(this._previousTimeout),this._liveElement?.remove(),this._liveElement=null,this._currentResolve?.(),this._currentPromise=this._currentResolve=void 0}_createLiveElement(){let e="cdk-live-announcer-element",t=this._document.getElementsByClassName(e),n=this._document.createElement("div");for(let a=0;a<t.length;a++)t[a].remove();return n.classList.add(e),n.classList.add("cdk-visually-hidden"),n.setAttribute("aria-atomic","true"),n.setAttribute("aria-live","polite"),n.id=`cdk-live-announcer-${Zg++}`,this._document.body.appendChild(n),n}_exposeAnnouncerToModals(e){let t=this._document.querySelectorAll('body > .cdk-overlay-container [aria-modal="true"]');for(let n=0;n<t.length;n++){let a=t[n],r=a.getAttribute("aria-owns");r?r.indexOf(e)===-1&&a.setAttribute("aria-owns",r+" "+e):a.setAttribute("aria-owns",e)}}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();var kn=(function(i){return i[i.NONE=0]="NONE",i[i.BLACK_ON_WHITE=1]="BLACK_ON_WHITE",i[i.WHITE_ON_BLACK=2]="WHITE_ON_BLACK",i})(kn||{}),nu="cdk-high-contrast-black-on-white",ou="cdk-high-contrast-white-on-black",Yl="cdk-high-contrast-active",lu=(()=>{class i{_platform=m(fe);_hasCheckedHighContrastMode=!1;_document=m(K);_breakpointSubscription;constructor(){this._breakpointSubscription=m(Yn).observe("(forced-colors: active)").subscribe(()=>{this._hasCheckedHighContrastMode&&(this._hasCheckedHighContrastMode=!1,this._applyBodyHighContrastModeCssClasses())})}getHighContrastMode(){if(!this._platform.isBrowser)return kn.NONE;let e=this._document.createElement("div");e.style.backgroundColor="rgb(1,2,3)",e.style.position="absolute",this._document.body.appendChild(e);let t=this._document.defaultView||window,n=t&&t.getComputedStyle?t.getComputedStyle(e):null,a=(n&&n.backgroundColor||"").replace(/ /g,"");switch(e.remove(),a){case"rgb(0,0,0)":case"rgb(45,50,54)":case"rgb(32,32,32)":return kn.WHITE_ON_BLACK;case"rgb(255,255,255)":case"rgb(255,250,239)":return kn.BLACK_ON_WHITE}return kn.NONE}ngOnDestroy(){this._breakpointSubscription.unsubscribe()}_applyBodyHighContrastModeCssClasses(){if(!this._hasCheckedHighContrastMode&&this._platform.isBrowser&&this._document.body){let e=this._document.body.classList;e.remove(Yl,nu,ou),this._hasCheckedHighContrastMode=!0;let t=this.getHighContrastMode();t===kn.BLACK_ON_WHITE?e.add(Yl,nu):t===kn.WHITE_ON_BLACK&&e.add(Yl,ou)}}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})(),Aa=(()=>{class i{constructor(){m(lu)._applyBodyHighContrastModeCssClasses()}static \u0275fac=function(t){return new(t||i)};static \u0275mod=U({type:i});static \u0275inj=H({imports:[Fo]})}return i})();var Qg=200,ts=class{_letterKeyStream=new O;_items=[];_selectedItemIndex=-1;_pressedLetters=[];_skipPredicateFn;_selectedItem=new O;selectedItem=this._selectedItem;constructor(o,e){let t=typeof e?.debounceInterval=="number"?e.debounceInterval:Qg;e?.skipPredicate&&(this._skipPredicateFn=e.skipPredicate),this.setItems(o),this._setupKeyHandler(t)}destroy(){this._pressedLetters=[],this._letterKeyStream.complete(),this._selectedItem.complete()}setCurrentSelectedItemIndex(o){this._selectedItemIndex=o}setItems(o){this._items=o}handleKey(o){let e=o.keyCode;o.key&&o.key.length===1?this._letterKeyStream.next(o.key.toLocaleUpperCase()):(e>=65&&e<=90||e>=48&&e<=57)&&this._letterKeyStream.next(String.fromCharCode(e))}isTyping(){return this._pressedLetters.length>0}reset(){this._pressedLetters=[]}_setupKeyHandler(o){this._letterKeyStream.pipe(wi(e=>this._pressedLetters.push(e)),Lt(o),ke(()=>this._pressedLetters.length>0),Ve(()=>this._pressedLetters.join("").toLocaleUpperCase())).subscribe(e=>{for(let t=1;t<this._items.length+1;t++){let n=(this._selectedItemIndex+t)%this._items.length,a=this._items[n];if(!this._skipPredicateFn?.(a)&&a.getLabel?.().toLocaleUpperCase().trim().indexOf(e)===0){this._selectedItem.next(a);break}}this._pressedLetters=[]})}};function Ke(i,...o){return o.length?o.some(e=>i[e]):i.altKey||i.shiftKey||i.ctrlKey||i.metaKey}var No=class{_items;_activeItemIndex=E(-1);_activeItem=E(null);_wrap=!1;_typeaheadSubscription=Te.EMPTY;_itemChangesSubscription;_vertical=!0;_horizontal=null;_allowedModifierKeys=[];_homeAndEnd=!1;_pageUpAndDown={enabled:!1,delta:10};_effectRef;_typeahead;_skipPredicateFn=o=>o.disabled;constructor(o,e){this._items=o,o instanceof vn?this._itemChangesSubscription=o.changes.subscribe(t=>this._itemsChanged(t.toArray())):_n(o)&&(this._effectRef=Bt(()=>this._itemsChanged(o()),{injector:e}))}tabOut=new O;change=new O;skipPredicate(o){return this._skipPredicateFn=o,this}withWrap(o=!0){return this._wrap=o,this}withVerticalOrientation(o=!0){return this._vertical=o,this}withHorizontalOrientation(o){return this._horizontal=o,this}withAllowedModifierKeys(o){return this._allowedModifierKeys=o,this}withTypeAhead(o=200){this._typeaheadSubscription.unsubscribe();let e=this._getItemsArray();return this._typeahead=new ts(e,{debounceInterval:typeof o=="number"?o:void 0,skipPredicate:t=>this._skipPredicateFn(t)}),this._typeaheadSubscription=this._typeahead.selectedItem.subscribe(t=>{this.setActiveItem(t)}),this}cancelTypeahead(){return this._typeahead?.reset(),this}withHomeAndEnd(o=!0){return this._homeAndEnd=o,this}withPageUpDown(o=!0,e=10){return this._pageUpAndDown={enabled:o,delta:e},this}setActiveItem(o){let e=this._activeItem();this.updateActiveItem(o),this._activeItem()!==e&&this.change.next(this._activeItemIndex())}onKeydown(o){let e=o.keyCode,n=["altKey","ctrlKey","metaKey","shiftKey"].every(a=>!o[a]||this._allowedModifierKeys.indexOf(a)>-1);switch(e){case 9:this.tabOut.next();return;case 40:if(this._vertical&&n){this.setNextItemActive();break}else return;case 38:if(this._vertical&&n){this.setPreviousItemActive();break}else return;case 39:if(this._horizontal&&n){this._horizontal==="rtl"?this.setPreviousItemActive():this.setNextItemActive();break}else return;case 37:if(this._horizontal&&n){this._horizontal==="rtl"?this.setNextItemActive():this.setPreviousItemActive();break}else return;case 36:if(this._homeAndEnd&&n){this.setFirstItemActive();break}else return;case 35:if(this._homeAndEnd&&n){this.setLastItemActive();break}else return;case 33:if(this._pageUpAndDown.enabled&&n){let a=this._activeItemIndex()-this._pageUpAndDown.delta;this._setActiveItemByIndex(a>0?a:0,1);break}else return;case 34:if(this._pageUpAndDown.enabled&&n){let a=this._activeItemIndex()+this._pageUpAndDown.delta,r=this._getItemsArray().length;this._setActiveItemByIndex(a<r?a:r-1,-1);break}else return;default:(n||Ke(o,"shiftKey"))&&this._typeahead?.handleKey(o);return}this._typeahead?.reset(),o.preventDefault()}get activeItemIndex(){return this._activeItemIndex()}get activeItem(){return this._activeItem()}isTyping(){return!!this._typeahead&&this._typeahead.isTyping()}setFirstItemActive(){this._setActiveItemByIndex(0,1)}setLastItemActive(){this._setActiveItemByIndex(this._getItemsArray().length-1,-1)}setNextItemActive(){this._activeItemIndex()<0?this.setFirstItemActive():this._setActiveItemByDelta(1)}setPreviousItemActive(){this._activeItemIndex()<0&&this._wrap?this.setLastItemActive():this._setActiveItemByDelta(-1)}updateActiveItem(o){let e=this._getItemsArray(),t=typeof o=="number"?o:e.indexOf(o),n=e[t];this._activeItem.set(n??null),this._activeItemIndex.set(t),this._typeahead?.setCurrentSelectedItemIndex(t)}destroy(){this._typeaheadSubscription.unsubscribe(),this._itemChangesSubscription?.unsubscribe(),this._effectRef?.destroy(),this._typeahead?.destroy(),this.tabOut.complete(),this.change.complete()}_setActiveItemByDelta(o){this._wrap?this._setActiveInWrapMode(o):this._setActiveInDefaultMode(o)}_setActiveInWrapMode(o){let e=this._getItemsArray();for(let t=1;t<=e.length;t++){let n=(this._activeItemIndex()+o*t+e.length)%e.length,a=e[n];if(!this._skipPredicateFn(a)){this.setActiveItem(n);return}}}_setActiveInDefaultMode(o){this._setActiveItemByIndex(this._activeItemIndex()+o,o)}_setActiveItemByIndex(o,e){let t=this._getItemsArray();if(t[o]){for(;this._skipPredicateFn(t[o]);)if(o+=e,!t[o])return;this.setActiveItem(o)}}_getItemsArray(){return _n(this._items)?this._items():this._items instanceof vn?this._items.toArray():this._items}_itemsChanged(o){this._typeahead?.setItems(o);let e=this._activeItem();if(e){let t=o.indexOf(e);t>-1&&t!==this._activeItemIndex()&&(this._activeItemIndex.set(t),this._typeahead?.setCurrentSelectedItemIndex(t))}}};var io=class extends No{setActiveItem(o){this.activeItem&&this.activeItem.setInactiveStyles(),super.setActiveItem(o),this.activeItem&&this.activeItem.setActiveStyles()}};var En=class extends No{_origin="program";setFocusOrigin(o){return this._origin=o,this}setActiveItem(o){super.setActiveItem(o),this.activeItem&&this.activeItem.focus(this._origin)}};var mu=new Map,De=class i{_appId=m(qn);static _infix=`a${Math.floor(Math.random()*1e5).toString()}`;getId(o,e=!1){this._appId!=="ng"&&(o+=this._appId);let t=mu.get(o);return t===void 0?t=0:t++,mu.set(o,t),`${o}${e?i._infix+"-":""}${t}`}static \u0275fac=function(e){return new(e||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})};var hu=" ";function Jg(i,o,e){let t=ns(i,o);e=e.trim(),!t.some(n=>n.trim()===e)&&(t.push(e),i.setAttribute(o,t.join(hu)))}function e_(i,o,e){let t=ns(i,o);e=e.trim();let n=t.filter(a=>a!==e);n.length?i.setAttribute(o,n.join(hu)):i.removeAttribute(o)}function ns(i,o){return i.getAttribute(o)?.match(/\S+/g)??[]}var pu="cdk-describedby-message",is="cdk-describedby-host",tc=0,fu=(()=>{class i{_platform=m(fe);_document=m(K);_messageRegistry=new Map;_messagesContainer=null;_id=`${tc++}`;constructor(){m(Be).load(Sn),this._id=m(qn)+"-"+tc++}describe(e,t,n){if(!this._canBeDescribed(e,t))return;let a=ec(t,n);typeof t!="string"?(uu(t,this._id),this._messageRegistry.set(a,{messageElement:t,referenceCount:0})):this._messageRegistry.has(a)||this._createMessageElement(t,n),this._isElementDescribedByMessage(e,a)||this._addMessageReference(e,a)}removeDescription(e,t,n){if(!t||!this._isElementNode(e))return;let a=ec(t,n);if(this._isElementDescribedByMessage(e,a)&&this._removeMessageReference(e,a),typeof t=="string"){let r=this._messageRegistry.get(a);r&&r.referenceCount===0&&this._deleteMessageElement(a)}this._messagesContainer?.childNodes.length===0&&(this._messagesContainer.remove(),this._messagesContainer=null)}ngOnDestroy(){let e=this._document.querySelectorAll(`[${is}="${this._id}"]`);for(let t=0;t<e.length;t++)this._removeCdkDescribedByReferenceIds(e[t]),e[t].removeAttribute(is);this._messagesContainer?.remove(),this._messagesContainer=null,this._messageRegistry.clear()}_createMessageElement(e,t){let n=this._document.createElement("div");uu(n,this._id),n.textContent=e,t&&n.setAttribute("role",t),this._createMessagesContainer(),this._messagesContainer.appendChild(n),this._messageRegistry.set(ec(e,t),{messageElement:n,referenceCount:0})}_deleteMessageElement(e){this._messageRegistry.get(e)?.messageElement?.remove(),this._messageRegistry.delete(e)}_createMessagesContainer(){if(this._messagesContainer)return;let e="cdk-describedby-message-container",t=this._document.querySelectorAll(`.${e}[platform="server"]`);for(let a=0;a<t.length;a++)t[a].remove();let n=this._document.createElement("div");n.style.visibility="hidden",n.classList.add(e),n.classList.add("cdk-visually-hidden"),this._platform.isBrowser||n.setAttribute("platform","server"),this._document.body.appendChild(n),this._messagesContainer=n}_removeCdkDescribedByReferenceIds(e){let t=ns(e,"aria-describedby").filter(n=>n.indexOf(pu)!=0);e.setAttribute("aria-describedby",t.join(" "))}_addMessageReference(e,t){let n=this._messageRegistry.get(t);Jg(e,"aria-describedby",n.messageElement.id),e.setAttribute(is,this._id),n.referenceCount++}_removeMessageReference(e,t){let n=this._messageRegistry.get(t);n.referenceCount--,e_(e,"aria-describedby",n.messageElement.id),e.removeAttribute(is)}_isElementDescribedByMessage(e,t){let n=ns(e,"aria-describedby"),a=this._messageRegistry.get(t),r=a&&a.messageElement.id;return!!r&&n.indexOf(r)!=-1}_canBeDescribed(e,t){if(!this._isElementNode(e))return!1;if(t&&typeof t=="object")return!0;let n=t==null?"":`${t}`.trim(),a=e.getAttribute("aria-label");return n?!a||a.trim()!==n:!1}_isElementNode(e){return e.nodeType===this._document.ELEMENT_NODE}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();function ec(i,o){return typeof i=="string"?`${o||""}/${i}`:i}function uu(i,o){i.id||(i.id=`${pu}-${o}-${tc++}`)}var Du=(()=>{class i{_renderer;_elementRef;onChange=e=>{};onTouched=()=>{};constructor(e,t){this._renderer=e,this._elementRef=t}setProperty(e,t){this._renderer.setProperty(this._elementRef.nativeElement,e,t)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}static \u0275fac=function(t){return new(t||i)(be(we),be(B))};static \u0275dir=T({type:i})}return i})(),Su=(()=>{class i extends Du{static \u0275fac=(()=>{let e;return function(n){return(e||(e=xe(i)))(n||i)}})();static \u0275dir=T({type:i,features:[ie]})}return i})(),Ui=new k("");var t_={provide:Ui,useExisting:lt(()=>Zt),multi:!0};function i_(){let i=ui()?ui().getUserAgent():"";return/android (\d+)/.test(i.toLowerCase())}var n_=new k(""),Zt=(()=>{class i extends Du{_compositionMode;_composing=!1;constructor(e,t,n){super(e,t),this._compositionMode=n,this._compositionMode==null&&(this._compositionMode=!i_())}writeValue(e){let t=e??"";this.setProperty("value",t)}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}static \u0275fac=function(t){return new(t||i)(be(we),be(B),be(n_,8))};static \u0275dir=T({type:i,selectors:[["input","formControlName","",3,"type","checkbox",3,"ngNoCva",""],["textarea","formControlName","",3,"ngNoCva",""],["input","formControl","",3,"type","checkbox",3,"ngNoCva",""],["textarea","formControl","",3,"ngNoCva",""],["input","ngModel","",3,"type","checkbox",3,"ngNoCva",""],["textarea","ngModel","",3,"ngNoCva",""],["","ngDefaultControl",""]],hostBindings:function(t,n){t&1&&S("input",function(r){return n._handleInput(r.target.value)})("blur",function(){return n.onTouched()})("compositionstart",function(){return n._compositionStart()})("compositionend",function(r){return n._compositionEnd(r.target.value)})},standalone:!1,features:[le([t_]),ie]})}return i})();function sc(i){return i==null||lc(i)===0}function lc(i){return i==null?null:Array.isArray(i)||typeof i=="string"?i.length:i instanceof Set?i.size:null}var cn=new k(""),hs=new k(""),o_=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Qe=class{static min(o){return ku(o)}static max(o){return Mu(o)}static required(o){return Eu(o)}static requiredTrue(o){return a_(o)}static email(o){return r_(o)}static minLength(o){return s_(o)}static maxLength(o){return l_(o)}static pattern(o){return c_(o)}static nullValidator(o){return as()}static compose(o){return Ou(o)}static composeAsync(o){return Fu(o)}};function ku(i){return o=>{if(o.value==null||i==null)return null;let e=parseFloat(o.value);return!isNaN(e)&&e<i?{min:{min:i,actual:o.value}}:null}}function Mu(i){return o=>{if(o.value==null||i==null)return null;let e=parseFloat(o.value);return!isNaN(e)&&e>i?{max:{max:i,actual:o.value}}:null}}function Eu(i){return sc(i.value)?{required:!0}:null}function a_(i){return i.value===!0?null:{required:!0}}function r_(i){return sc(i.value)||o_.test(i.value)?null:{email:!0}}function s_(i){return o=>{let e=o.value?.length??lc(o.value);return e===null||e===0?null:e<i?{minlength:{requiredLength:i,actualLength:e}}:null}}function l_(i){return o=>{let e=o.value?.length??lc(o.value);return e!==null&&e>i?{maxlength:{requiredLength:i,actualLength:e}}:null}}function c_(i){if(!i)return as;let o,e;return typeof i=="string"?(e="",i.charAt(0)!=="^"&&(e+="^"),e+=i,i.charAt(i.length-1)!=="$"&&(e+="$"),o=new RegExp(e)):(e=i.toString(),o=i),t=>{if(sc(t.value))return null;let n=t.value;return o.test(n)?null:{pattern:{requiredPattern:e,actualValue:n}}}}function as(i){return null}function Tu(i){return i!=null}function Au(i){return rl(i)?od(i):i}function Iu(i){let o={};return i.forEach(e=>{o=e!=null?V(V({},o),e):o}),Object.keys(o).length===0?null:o}function Ru(i,o){return o.map(e=>e(i))}function d_(i){return!i.validate}function Pu(i){return i.map(o=>d_(o)?o:e=>o.validate(e))}function Ou(i){if(!i)return null;let o=i.filter(Tu);return o.length==0?null:function(e){return Iu(Ru(e,o))}}function cc(i){return i!=null?Ou(Pu(i)):null}function Fu(i){if(!i)return null;let o=i.filter(Tu);return o.length==0?null:function(e){let t=Ru(e,o).map(Au);return hr(t).pipe(Ve(Iu))}}function dc(i){return i!=null?Fu(Pu(i)):null}function gu(i,o){return i===null?[o]:Array.isArray(i)?[...i,o]:[i,o]}function Nu(i){return i._rawValidators}function Lu(i){return i._rawAsyncValidators}function ic(i){return i?Array.isArray(i)?i:[i]:[]}function rs(i,o){return Array.isArray(i)?i.includes(o):i===o}function _u(i,o){let e=ic(o);return ic(i).forEach(n=>{rs(e,n)||e.push(n)}),e}function vu(i,o){return ic(o).filter(e=>!rs(i,e))}var ss=class{get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators=[];_rawAsyncValidators=[];_setValidators(o){this._rawValidators=o||[],this._composedValidatorFn=cc(this._rawValidators)}_setAsyncValidators(o){this._rawAsyncValidators=o||[],this._composedAsyncValidatorFn=dc(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(o){this._onDestroyCallbacks.push(o)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(o=>o()),this._onDestroyCallbacks=[]}reset(o=void 0){this.control?.reset(o)}hasError(o,e){return this.control?this.control.hasError(o,e):!1}getError(o,e){return this.control?this.control.getError(o,e):null}},ln=class extends ss{name;get formDirective(){return null}get path(){return null}};var Pa="VALID",os="INVALID",Lo="PENDING",Oa="DISABLED",Tn=class{},ls=class extends Tn{value;source;constructor(o,e){super(),this.value=o,this.source=e}},Na=class extends Tn{pristine;source;constructor(o,e){super(),this.pristine=o,this.source=e}},La=class extends Tn{touched;source;constructor(o,e){super(),this.touched=o,this.source=e}},Vo=class extends Tn{status;source;constructor(o,e){super(),this.status=o,this.source=e}},cs=class extends Tn{source;constructor(o){super(),this.source=o}},no=class extends Tn{source;constructor(o){super(),this.source=o}};function mc(i){return(ps(i)?i.validators:i)||null}function m_(i){return Array.isArray(i)?cc(i):i||null}function uc(i,o){return(ps(o)?o.asyncValidators:i)||null}function u_(i){return Array.isArray(i)?dc(i):i||null}function ps(i){return i!=null&&!Array.isArray(i)&&typeof i=="object"}function Vu(i,o,e){let t=i.controls;if(!(o?Object.keys(t):t).length)throw new he(1e3,"");if(!zu(t,e))throw new he(1001,"")}function Bu(i,o,e){i._forEachChild((t,n)=>{if(e[n]===void 0)throw new he(-1002,"")})}var Bo=class{_pendingDirty=!1;_hasOwnPendingAsyncValidator=null;_pendingTouched=!1;_onCollectionChange=()=>{};_updateOn;_hasRequired=E(!1);_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(o,e){this._assignValidators(o),this._assignAsyncValidators(e)}get validator(){return this._composedValidatorFn}set validator(o){this._rawValidators=this._composedValidatorFn=o,this._updateHasRequiredValidator()}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(o){this._rawAsyncValidators=this._composedAsyncValidatorFn=o}get parent(){return this._parent}get status(){return Tt(this.statusReactive)}set status(o){Tt(()=>this.statusReactive.set(o))}_status=P(()=>this.statusReactive());statusReactive=E(void 0);get valid(){return this.status===Pa}get invalid(){return this.status===os}get pending(){return this.status===Lo}get disabled(){return this.status===Oa}get enabled(){return this.status!==Oa}errors;get pristine(){return Tt(this.pristineReactive)}set pristine(o){Tt(()=>this.pristineReactive.set(o))}_pristine=P(()=>this.pristineReactive());pristineReactive=E(!0);get dirty(){return!this.pristine}get touched(){return Tt(this.touchedReactive)}set touched(o){Tt(()=>this.touchedReactive.set(o))}_touched=P(()=>this.touchedReactive());touchedReactive=E(!1);get untouched(){return!this.touched}_events=new O;events=this._events.asObservable();valueChanges;statusChanges;get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(o){this._assignValidators(o)}setAsyncValidators(o){this._assignAsyncValidators(o)}addValidators(o){this.setValidators(_u(o,this._rawValidators))}addAsyncValidators(o){this.setAsyncValidators(_u(o,this._rawAsyncValidators))}removeValidators(o){this.setValidators(vu(o,this._rawValidators))}removeAsyncValidators(o){this.setAsyncValidators(vu(o,this._rawAsyncValidators))}hasValidator(o){return rs(this._rawValidators,o)}hasAsyncValidator(o){return rs(this._rawAsyncValidators,o)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(o={}){let e=this.touched===!1;this.touched=!0;let t=o.sourceControl??this;o.onlySelf||this._parent?.markAsTouched(Fe(V({},o),{sourceControl:t})),e&&o.emitEvent!==!1&&this._events.next(new La(!0,t))}markAllAsDirty(o={}){this.markAsDirty({onlySelf:!0,emitEvent:o.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsDirty(o))}markAllAsTouched(o={}){this.markAsTouched({onlySelf:!0,emitEvent:o.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsTouched(o))}markAsUntouched(o={}){let e=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let t=o.sourceControl??this;this._forEachChild(n=>{n.markAsUntouched({onlySelf:!0,emitEvent:o.emitEvent,sourceControl:t})}),o.onlySelf||this._parent?._updateTouched(o,t),e&&o.emitEvent!==!1&&this._events.next(new La(!1,t))}markAsDirty(o={}){let e=this.pristine===!0;this.pristine=!1;let t=o.sourceControl??this;o.onlySelf||this._parent?.markAsDirty(Fe(V({},o),{sourceControl:t})),e&&o.emitEvent!==!1&&this._events.next(new Na(!1,t))}markAsPristine(o={}){let e=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let t=o.sourceControl??this;this._forEachChild(n=>{n.markAsPristine({onlySelf:!0,emitEvent:o.emitEvent})}),o.onlySelf||this._parent?._updatePristine(o,t),e&&o.emitEvent!==!1&&this._events.next(new Na(!0,t))}markAsPending(o={}){this.status=Lo;let e=o.sourceControl??this;o.emitEvent!==!1&&(this._events.next(new Vo(this.status,e)),this.statusChanges.emit(this.status)),o.onlySelf||this._parent?.markAsPending(Fe(V({},o),{sourceControl:e}))}disable(o={}){let e=this._parentMarkedDirty(o.onlySelf);this.status=Oa,this.errors=null,this._forEachChild(n=>{n.disable(Fe(V({},o),{onlySelf:!0}))}),this._updateValue();let t=o.sourceControl??this;o.emitEvent!==!1&&(this._events.next(new ls(this.value,t)),this._events.next(new Vo(this.status,t)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(Fe(V({},o),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(n=>n(!0))}enable(o={}){let e=this._parentMarkedDirty(o.onlySelf);this.status=Pa,this._forEachChild(t=>{t.enable(Fe(V({},o),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:o.emitEvent}),this._updateAncestors(Fe(V({},o),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(t=>t(!1))}_updateAncestors(o,e){o.onlySelf||(this._parent?.updateValueAndValidity(o),o.skipPristineCheck||this._parent?._updatePristine({},e),this._parent?._updateTouched({},e))}setParent(o){this._parent=o}getRawValue(){return this.value}updateValueAndValidity(o={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let t=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===Pa||this.status===Lo)&&this._runAsyncValidator(t,o.emitEvent)}let e=o.sourceControl??this;o.emitEvent!==!1&&(this._events.next(new ls(this.value,e)),this._events.next(new Vo(this.status,e)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),o.onlySelf||this._parent?.updateValueAndValidity(Fe(V({},o),{sourceControl:e}))}_updateTreeValidity(o={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(o)),this.updateValueAndValidity({onlySelf:!0,emitEvent:o.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?Oa:Pa}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(o,e){if(this.asyncValidator){this.status=Lo,this._hasOwnPendingAsyncValidator={emitEvent:e!==!1,shouldHaveEmitted:o!==!1};let t=Au(this.asyncValidator(this));this._asyncValidationSubscription=t.subscribe(n=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(n,{emitEvent:e,shouldHaveEmitted:o})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let o=(this._hasOwnPendingAsyncValidator?.emitEvent||this._hasOwnPendingAsyncValidator?.shouldHaveEmitted)??!1;return this._hasOwnPendingAsyncValidator=null,o}return!1}setErrors(o,e={}){this.errors=o,this._updateControlsErrors(e.emitEvent!==!1,this,e.shouldHaveEmitted)}get(o){let e=o;return e==null||(Array.isArray(e)||(e=e.split(".")),e.length===0)?null:e.reduce((t,n)=>t&&t._find(n),this)}getError(o,e){let t=e?this.get(e):this;return t?.errors?t.errors[o]:null}hasError(o,e){return!!this.getError(o,e)}get root(){let o=this;for(;o._parent;)o=o._parent;return o}_updateControlsErrors(o,e,t){this.status=this._calculateStatus(),o&&this.statusChanges.emit(this.status),(o||t)&&this._events.next(new Vo(this.status,e)),this._parent&&this._parent._updateControlsErrors(o,e,t)}_initObservables(){this.valueChanges=new X,this.statusChanges=new X}_calculateStatus(){return this._allControlsDisabled()?Oa:this.errors?os:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(Lo)?Lo:this._anyControlsHaveStatus(os)?os:Pa}_anyControlsHaveStatus(o){return this._anyControls(e=>e.status===o)}_anyControlsDirty(){return this._anyControls(o=>o.dirty)}_anyControlsTouched(){return this._anyControls(o=>o.touched)}_updatePristine(o,e){let t=!this._anyControlsDirty(),n=this.pristine!==t;this.pristine=t,o.onlySelf||this._parent?._updatePristine(o,e),n&&this._events.next(new Na(this.pristine,e))}_updateTouched(o={},e){this.touched=this._anyControlsTouched(),this._events.next(new La(this.touched,e)),o.onlySelf||this._parent?._updateTouched(o,e)}_onDisabledChange=[];_registerOnCollectionChange(o){this._onCollectionChange=o}_setUpdateStrategy(o){ps(o)&&o.updateOn!=null&&(this._updateOn=o.updateOn)}_parentMarkedDirty(o){return!o&&!!this._parent?.dirty&&!this._parent._anyControlsDirty()}_find(o){return null}_assignValidators(o){this._rawValidators=Array.isArray(o)?o.slice():o,this._composedValidatorFn=m_(this._rawValidators),this._updateHasRequiredValidator()}_assignAsyncValidators(o){this._rawAsyncValidators=Array.isArray(o)?o.slice():o,this._composedAsyncValidatorFn=u_(this._rawAsyncValidators)}_updateHasRequiredValidator(){Tt(()=>this._hasRequired.set(this.hasValidator(Qe.required)))}};function zu(i,o){return Object.hasOwn(i,o)}function h_(i){return i.tagName==="INPUT"||i.tagName==="SELECT"||i.tagName==="TEXTAREA"}function p_(i,o,e,t){switch(e){case"name":i.setAttribute(o,e,t);break;case"disabled":case"readonly":case"required":t?i.setAttribute(o,e,""):i.removeAttribute(o,e);break;case"max":case"min":case"minLength":case"maxLength":t!==void 0?i.setAttribute(o,e,t.toString()):i.removeAttribute(o,e);break}}var nc=class{kind;context;control;message;constructor({kind:o,context:e,control:t}){this.kind=o,this.context=e,this.control=t}};function ju(i){return typeof i=="number"?i:parseFloat(i)}var hc=(()=>{class i{_validator=as;_onChange;_enabled;ngOnChanges(e){if(this.inputName in e){let t=this.normalizeInput(e[this.inputName].currentValue);this._enabled=this.enabled(t),this._validator=this._enabled?this.createValidator(t):as,this._onChange?.()}}validate(e){return this._validator(e)}registerOnValidatorChange(e){this._onChange=e}enabled(e){return e!=null}static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,features:[Ie]})}return i})(),f_={provide:cn,useExisting:lt(()=>pc),multi:!0},pc=(()=>{class i extends hc{max;inputName="max";normalizeInput=e=>ju(e);createValidator=e=>Mu(e);static \u0275fac=(()=>{let e;return function(n){return(e||(e=xe(i)))(n||i)}})();static \u0275dir=T({type:i,selectors:[["input","type","number","max","","formControlName",""],["input","type","number","max","","formControl",""],["input","type","number","max","","ngModel",""]],hostVars:1,hostBindings:function(t,n){t&2&&J("max",n._enabled?n.max:null)},inputs:{max:"max"},standalone:!1,features:[le([f_]),ie]})}return i})(),g_={provide:cn,useExisting:lt(()=>Ba),multi:!0},Ba=(()=>{class i extends hc{min;inputName="min";normalizeInput=e=>ju(e);createValidator=e=>ku(e);static \u0275fac=(()=>{let e;return function(n){return(e||(e=xe(i)))(n||i)}})();static \u0275dir=T({type:i,selectors:[["input","type","number","min","","formControlName",""],["input","type","number","min","","formControl",""],["input","type","number","min","","ngModel",""]],hostVars:1,hostBindings:function(t,n){t&2&&J("min",n._enabled?n.min:null)},inputs:{min:"min"},standalone:!1,features:[le([g_]),ie]})}return i})(),__={provide:cn,useExisting:lt(()=>fs),multi:!0};var fs=(()=>{class i extends hc{required;inputName="required";normalizeInput=z;createValidator=e=>Eu;enabled(e){return e}static \u0275fac=(()=>{let e;return function(n){return(e||(e=xe(i)))(n||i)}})();static \u0275dir=T({type:i,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(t,n){t&2&&J("required",n._enabled?"":null)},inputs:{required:"required"},standalone:!1,features:[le([__]),ie]})}return i})();var v_=new k(""),za=new k("",{factory:()=>gs}),gs="always";function Hu(i,o){return[...o.path,i]}function oc(i,o,e=gs){fc(i,o),o.valueAccessor.writeValue(i.value),(i.disabled||e==="always")&&o.valueAccessor.setDisabledState?.(i.disabled),y_(i,o),x_(i,o),C_(i,o),b_(i,o)}function bu(i,o,e=!0){let t=()=>{};o?.valueAccessor?.registerOnChange(t),o?.valueAccessor?.registerOnTouched(t),ms(i,o),i&&(o._invokeOnDestroyCallbacks(),i._registerOnCollectionChange(()=>{}))}function ds(i,o){i.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(o)})}function b_(i,o){if(o.valueAccessor.setDisabledState){let e=t=>{o.valueAccessor.setDisabledState(t)};i.registerOnDisabledChange(e),o._registerOnDestroy(()=>{i._unregisterOnDisabledChange(e)})}}function fc(i,o){let e=Nu(i);o.validator!==null?i.setValidators(gu(e,o.validator)):typeof e=="function"&&i.setValidators([e]);let t=Lu(i);o.asyncValidator!==null?i.setAsyncValidators(gu(t,o.asyncValidator)):typeof t=="function"&&i.setAsyncValidators([t]);let n=()=>i.updateValueAndValidity();ds(o._rawValidators,n),ds(o._rawAsyncValidators,n)}function ms(i,o){let e=!1;if(i!==null){if(o.validator!==null){let n=Nu(i);if(Array.isArray(n)&&n.length>0){let a=n.filter(r=>r!==o.validator);a.length!==n.length&&(e=!0,i.setValidators(a))}}if(o.asyncValidator!==null){let n=Lu(i);if(Array.isArray(n)&&n.length>0){let a=n.filter(r=>r!==o.asyncValidator);a.length!==n.length&&(e=!0,i.setAsyncValidators(a))}}}let t=()=>{};return ds(o._rawValidators,t),ds(o._rawAsyncValidators,t),e}function y_(i,o){o.valueAccessor.registerOnChange(e=>{i._pendingValue=e,i._pendingChange=!0,i._pendingDirty=!0,i.updateOn==="change"&&Uu(i,o)})}function C_(i,o){o.valueAccessor.registerOnTouched(()=>{i._pendingTouched=!0,i.updateOn==="blur"&&i._pendingChange&&Uu(i,o),i.updateOn!=="submit"&&i.markAsTouched()})}function Uu(i,o){i._pendingDirty&&i.markAsDirty(),i.setValue(i._pendingValue,{emitModelToViewChange:!1}),o.viewToModelUpdate(i._pendingValue),i._pendingChange=!1}function x_(i,o){let e=(t,n)=>{o.valueAccessor.writeValue(t),n&&o.viewToModelUpdate(t)};i.registerOnChange(e),o._registerOnDestroy(()=>{i._unregisterOnChange(e)})}function $u(i,o){i==null,fc(i,o)}function w_(i,o){return ms(i,o)}function Gu(i,o){if(!i.hasOwnProperty("model"))return!1;let e=i.model;return e.isFirstChange()?!0:!Object.is(o,e.currentValue)}function D_(i){return Object.getPrototypeOf(i.constructor)===Su}function Wu(i,o){i._syncPendingControls(),o.forEach(e=>{let t=e.control;t.updateOn==="submit"&&t._pendingChange&&(e.viewToModelUpdate(t._pendingValue),t._pendingChange=!1)})}function S_(i,o){if(!o)return null;Array.isArray(o);let e,t,n;return o.forEach(a=>{a.constructor===Zt?e=a:D_(a)?t=a:n=a}),n||t||e||null}function k_(i,o){let e=i.indexOf(o);e>-1&&i.splice(e,1)}var qu={provide:v_,useFactory:()=>{let i=m(fi,{self:!0});return{setParseErrors:o=>{i.setParseErrorSource(o)},set onReset(o){i.onReset=o}}}},fi=class extends ss{_parent=null;name=null;valueAccessor=null;isCustomControlBased=!1;userOnReset;resetSubscription;set onReset(o){this.userOnReset=o,this.resetSubscription?.unsubscribe(),this.resetSubscription=void 0,this.control&&(this.resetSubscription=this.control.events.subscribe(e=>{e instanceof no&&this.control&&this.userOnReset?.(this.control.value)}),this.subscription?.add(this.resetSubscription))}isNativeFormElement=!1;rawValueAccessors;_selectedValueAccessor=null;get selectedValueAccessor(){return this._selectedValueAccessor??=S_(this,this.rawValueAccessors)}parseErrorsValidator=null;renderer;injector;requiredValidatorViaDi;subscription;customControlBindings=null;constructor(o,e,t){super(),this.injector=o,this.renderer=e,this.rawValueAccessors=t,this.injector?.get(Vt)?.onDestroy(()=>{this.removeParseErrorsValidator(this.control),this.subscription?.unsubscribe()})}setupCustomControl(){this.subscription?.unsubscribe();let o=this.injector?.get(se);if(!this.control||!o)return;let e=o.markForCheck.bind(o);this.subscription=new Te,this.subscription.add(this.control.valueChanges.subscribe(e)),this.subscription.add(this.control.statusChanges.subscribe(e)),this.resetSubscription?.unsubscribe(),this.resetSubscription=void 0,this.userOnReset&&(this.resetSubscription=this.control.events.subscribe(t=>{t instanceof no&&this.control&&this.userOnReset?.(this.control.value)}),this.subscription.add(this.resetSubscription)),this.parseErrorsValidator&&this.control.addValidators(this.parseErrorsValidator)}ngControlCreate(o){!o.nativeElement.hasAttribute?.("ngNoCva")&&(this.rawValueAccessors&&this.rawValueAccessors.length>0||this.valueAccessor!==null)||!o.customControl||(this.isCustomControlBased=!0,o.listenToCustomControlModel(n=>{this.control?.setValue(n,{emitModelToViewChange:!1}),this.control?.markAsDirty(),this.viewToModelUpdate(n)}),o.listenToCustomControlOutput("touch",()=>{this.control?.markAsTouched()}),this.customControlBindings={},this.isNativeFormElement=h_(o.nativeElement),this.requiredValidatorViaDi=this._rawValidators.find(n=>n instanceof fs))}ngControlUpdate(o,e){if(!this.isCustomControlBased)return;let t=this.control,n=this.customControlBindings;Object.is(n.value,t.value)||(n.value=t.value,o.setCustomControlModelInput(t.value)),this.bindControlProperty(o,n,"touched",t.touched),this.bindControlProperty(o,n,"dirty",t.dirty),this.bindControlProperty(o,n,"valid",t.valid),this.bindControlProperty(o,n,"invalid",t.invalid),this.bindControlProperty(o,n,"pending",t.pending),this.bindControlProperty(o,n,"disabled",t.disabled),this.shouldBindRequired&&this.bindControlProperty(o,n,"required",this.isRequired);let a=t.errors;if(n.errors!==a){n.errors=a;let r=this._convertErrors(a);o.setInputOnDirectives("errors",r)}}get isRequired(){return(this.requiredValidatorViaDi?._enabled||this.control?._hasRequired())??!1}get shouldBindRequired(){return!0}bindControlProperty(o,e,t,n){if(e[t]===n)return;e[t]=n;let a=o.setInputOnDirectives(t,n);this.isNativeFormElement&&!a&&(t==="disabled"||t==="required")&&this.renderer&&p_(this.renderer,o.nativeElement,t,n)}_convertErrors(o){if(o===null)return[];let e=this.control;return Object.entries(o).map(([t,n])=>new nc({context:n,kind:t,control:e}))}setParseErrorSource(o){if(o===void 0)return;let e=null,t=P(()=>{let n=o();return n.length===0?null:n.reduce((a,r)=>(a[r.kind]=r,a),{})});this.parseErrorsValidator=(()=>e).bind(this),Bt(()=>{e=t(),this.control?.updateValueAndValidity({emitEvent:!1})},{injector:this.injector})}removeParseErrorsValidator(o){this.parseErrorsValidator&&(o?.removeValidators(this.parseErrorsValidator),o?.updateValueAndValidity({emitEvent:!1}))}},us=class{_cd;constructor(o){this._cd=o}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}};var Qt=(()=>{class i extends us{constructor(e){super(e)}static \u0275fac=function(t){return new(t||i)(be(fi,2))};static \u0275dir=T({type:i,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(t,n){t&2&&p("ng-untouched",n.isUntouched)("ng-touched",n.isTouched)("ng-pristine",n.isPristine)("ng-dirty",n.isDirty)("ng-valid",n.isValid)("ng-invalid",n.isInvalid)("ng-pending",n.isPending)},standalone:!1,features:[ie]})}return i})(),$i=(()=>{class i extends us{constructor(e){super(e)}static \u0275fac=function(t){return new(t||i)(be(ln,10))};static \u0275dir=T({type:i,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["","formArray",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(t,n){t&2&&p("ng-untouched",n.isUntouched)("ng-touched",n.isTouched)("ng-pristine",n.isPristine)("ng-dirty",n.isDirty)("ng-valid",n.isValid)("ng-invalid",n.isInvalid)("ng-pending",n.isPending)("ng-submitted",n.isSubmitted)},standalone:!1,features:[ie]})}return i})(),zo=class extends Bo{constructor(o,e,t){super(mc(e),uc(t,e)),this.controls=o,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;registerControl(o,e){let t=this._find(o);return t||(this.controls[o]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(o,e,t={}){this.registerControl(o,e),this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}removeControl(o,e={}){let t=this._find(o);t&&t._registerOnCollectionChange(()=>{}),delete this.controls[o],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}setControl(o,e,t={}){let n=this._find(o);n&&n._registerOnCollectionChange(()=>{}),delete this.controls[o],e&&this.registerControl(o,e),this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}contains(o){return this._find(o)?.enabled===!0}setValue(o,e={}){Tt(()=>{Bu(this,!0,o),Object.keys(o).forEach(t=>{Vu(this,!0,t),this.controls[t].setValue(o[t],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)})}patchValue(o,e={}){o!=null&&(Object.keys(o).forEach(t=>{let n=this._find(t);n&&n.patchValue(o[t],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(o={},e={}){this._forEachChild((t,n)=>{t.reset(o?o[n]:null,Fe(V({},e),{onlySelf:!0}))}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e),e?.emitEvent!==!1&&this._events.next(new no(this))}getRawValue(){return this._reduceChildren({},(o,e,t)=>(o[t]=e.getRawValue(),o))}_syncPendingControls(){let o=this._reduceChildren(!1,(e,t)=>t._syncPendingControls()?!0:e);return o&&this.updateValueAndValidity({onlySelf:!0}),o}_forEachChild(o){Object.keys(this.controls).forEach(e=>{let t=this.controls[e];t&&o(t,e)})}_setUpControls(){this._forEachChild(o=>{o.setParent(this),o._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(o){for(let[e,t]of Object.entries(this.controls))if(this.contains(e)&&o(t))return!0;return!1}_reduceValue(){let o={};return this._reduceChildren(o,(e,t,n)=>((t.enabled||this.disabled)&&(e[n]=t.value),e))}_reduceChildren(o,e){let t=o;return this._forEachChild((n,a)=>{t=e(t,n,a)}),t}_allControlsDisabled(){for(let o of Object.keys(this.controls))if(this.controls[o].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(o){return zu(this.controls,o)?this.controls[o]:null}};var ac=class extends zo{};var M_={provide:ln,useExisting:lt(()=>ja)},Fa=Promise.resolve(),ja=(()=>{class i extends ln{callSetDisabledState;get submitted(){return Tt(this.submittedReactive)}_submitted=P(()=>this.submittedReactive());submittedReactive=E(!1);_directives=new Set;form;ngSubmit=new X;options;constructor(e,t,n){super(),this.callSetDisabledState=n,this.form=new zo({},cc(e),dc(t))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){Fa.then(()=>{let t=this._findContainer(e.path);e.control=t.registerControl(e.name,e.control),e._setupWithForm(this.callSetDisabledState),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(e)})}getControl(e){return this.form.get(e.path)}removeControl(e){Fa.then(()=>{this._findContainer(e.path)?.removeControl(e.name),this._directives.delete(e)})}addFormGroup(e){Fa.then(()=>{let t=this._findContainer(e.path),n=new zo({});$u(n,e),t.registerControl(e.name,n),n.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){Fa.then(()=>{this._findContainer(e.path)?.removeControl?.(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,t){Fa.then(()=>{this.form.get(e.path).setValue(t)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submittedReactive.set(!0),Wu(this.form,this._directives),this.ngSubmit.emit(e),this.form._events.next(new cs(this.control)),e?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(e=void 0){this.form.reset(e),this.submittedReactive.set(!1)}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.form._updateOn=this.options.updateOn)}_findContainer(e){return e.pop(),e.length?this.form.get(e):this.form}static \u0275fac=function(t){return new(t||i)(be(cn,10),be(hs,10),be(za,8))};static \u0275dir=T({type:i,selectors:[["form",3,"ngNoForm","",3,"formGroup","",3,"formArray",""],["ng-form"],["","ngForm",""]],hostBindings:function(t,n){t&1&&S("submit",function(r){return n.onSubmit(r)})("reset",function(){return n.onReset()})},inputs:{options:[0,"ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[le([M_]),ie]})}return i})();function yu(i,o){let e=i.indexOf(o);e>-1&&i.splice(e,1)}function Cu(i){return typeof i=="object"&&i!==null&&Object.keys(i).length===2&&"value"in i&&"disabled"in i}var Va=class extends Bo{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(o=null,e,t){super(mc(e),uc(t,e)),this._applyFormState(o),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),ps(e)&&(e.nonNullable||e.initialValueIsDefault)&&(Cu(o)?this.defaultValue=o.value:this.defaultValue=o)}setValue(o,e={}){Tt(()=>{this.value=this._pendingValue=o,this._onChange.length&&e.emitModelToViewChange!==!1&&this._onChange.forEach(t=>t(this.value,e.emitViewToModelChange!==!1)),this.updateValueAndValidity(e)})}patchValue(o,e={}){this.setValue(o,e)}reset(o=this.defaultValue,e={}){this._applyFormState(o),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),e.overwriteDefaultValue&&(this.defaultValue=this.value),this._pendingChange=!1,e?.emitEvent!==!1&&this._events.next(new no(this))}_updateValue(){}_anyControls(o){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(o){this._onChange.push(o)}_unregisterOnChange(o){yu(this._onChange,o)}registerOnDisabledChange(o){this._onDisabledChange.push(o)}_unregisterOnDisabledChange(o){yu(this._onDisabledChange,o)}_forEachChild(o){}_syncPendingControls(){return this.updateOn==="submit"&&(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),this._pendingChange)?(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0):!1}_applyFormState(o){Cu(o)?(this.value=this._pendingValue=o.value,o.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=o}};var E_=i=>i instanceof Va;var T_={provide:fi,useExisting:lt(()=>Ha)},xu=Promise.resolve(),Ha=(()=>{class i extends fi{_changeDetectorRef;callSetDisabledState;control=new Va;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new X;constructor(e,t,n,a,r,u,h,f){super(h,f,a),this._changeDetectorRef=r,this.callSetDisabledState=u,this._parent=e,this._setValidators(t),this._setAsyncValidators(n)}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){let t=e.name.previousValue;this.formDirective.removeControl({name:t,path:this._getPath(t)})}this._setUpControl()}"isDisabled"in e&&this._updateDisabled(e),Gu(e,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective?.removeControl(this)}\u0275ngControlCreate(e){super.ngControlCreate(e)}\u0275ngControlUpdate(e){super.ngControlUpdate(e,!1)}get shouldBindRequired(){return!1}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!!(this.options&&this.options.standalone)}_setUpStandalone(){this.isCustomControlBased?this.setupCustomControl():(this.valueAccessor??=this.selectedValueAccessor,oc(this.control,this,this.callSetDisabledState)),this.control.updateValueAndValidity({emitEvent:!1})}_setupWithForm(e){this.isCustomControlBased?this.setupCustomControl():(this.valueAccessor??=this.selectedValueAccessor,oc(this.control,this,e))}_checkForErrors(){this._checkName()}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(e){xu.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){let t=e.isDisabled.currentValue,n=t!==0&&z(t);xu.then(()=>{n&&!this.control.disabled?this.control.disable():!n&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?Hu(e,this._parent):[e]}static \u0275fac=function(t){return new(t||i)(be(ln,9),be(cn,10),be(hs,10),be(Ui,10),be(se,8),be(za,8),be(Z,8),be(we,8))};static \u0275dir=T({type:i,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"],options:[0,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],standalone:!1,features:[le([T_,qu]),ie,Ie,ll(null)]})}return i})();var An=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""],standalone:!1})}return i})(),A_={provide:Ui,useExisting:lt(()=>oo),multi:!0},oo=(()=>{class i extends Su{writeValue(e){let t=e??"";this.setProperty("value",t)}registerOnChange(e){this.onChange=t=>{e(t==""?null:parseFloat(t))}}static \u0275fac=(()=>{let e;return function(n){return(e||(e=xe(i)))(n||i)}})();static \u0275dir=T({type:i,selectors:[["input","type","number","formControlName","",3,"ngNoCva",""],["input","type","number","formControl","",3,"ngNoCva",""],["input","type","number","ngModel","",3,"ngNoCva",""]],hostBindings:function(t,n){t&1&&S("input",function(r){return n.onChange(r.target.value)})("blur",function(){return n.onTouched()})},standalone:!1,features:[le([A_]),ie]})}return i})();var rc=class extends Bo{constructor(o,e,t){super(mc(e),uc(t,e)),this.controls=o,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;at(o){return this.controls[this._adjustIndex(o)]}push(o,e={}){Array.isArray(o)?o.forEach(t=>{this.controls.push(t),this._registerControl(t)}):(this.controls.push(o),this._registerControl(o)),this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}insert(o,e,t={}){this.controls.splice(o,0,e),this._registerControl(e),this.updateValueAndValidity({emitEvent:t.emitEvent})}removeAt(o,e={}){let t=this._adjustIndex(o);t<0&&(t=0),this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),this.controls.splice(t,1),this.updateValueAndValidity({emitEvent:e.emitEvent})}setControl(o,e,t={}){let n=this._adjustIndex(o);n<0&&(n=0),this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),this.controls.splice(n,1),e&&(this.controls.splice(n,0,e),this._registerControl(e)),this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(o,e={}){Tt(()=>{Bu(this,!1,o),o.forEach((t,n)=>{Vu(this,!1,n),this.at(n).setValue(t,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)})}patchValue(o,e={}){o!=null&&(o.forEach((t,n)=>{this.at(n)&&this.at(n).patchValue(t,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(o=[],e={}){this._forEachChild((t,n)=>{t.reset(o[n],Fe(V({},e),{onlySelf:!0}))}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e),e?.emitEvent!==!1&&this._events.next(new no(this))}getRawValue(){return this.controls.map(o=>o.getRawValue())}clear(o={}){this.controls.length<1||(this._forEachChild(e=>e._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:o.emitEvent}))}_adjustIndex(o){return o<0?o+this.length:o}_syncPendingControls(){let o=this.controls.reduce((e,t)=>t._syncPendingControls()?!0:e,!1);return o&&this.updateValueAndValidity({onlySelf:!0}),o}_forEachChild(o){this.controls.forEach((e,t)=>{o(e,t)})}_updateValue(){this.value=this.controls.filter(o=>o.enabled||this.disabled).map(o=>o.value)}_anyControls(o){return this.controls.some(e=>e.enabled&&o(e))}_setUpControls(){this._forEachChild(o=>this._registerControl(o))}_allControlsDisabled(){for(let o of this.controls)if(o.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(o){o.setParent(this),o._registerOnCollectionChange(this._onCollectionChange)}_find(o){return this.at(o)??null}};var I_=(()=>{class i extends ln{callSetDisabledState;get submitted(){return Tt(this._submittedReactive)}set submitted(e){this._submittedReactive.set(e)}_submitted=P(()=>this._submittedReactive());_submittedReactive=E(!1);_oldForm;_onCollectionChange=()=>this._updateDomValue();directives=[];constructor(e,t,n){super(),this.callSetDisabledState=n,this._setValidators(e),this._setAsyncValidators(t)}ngOnChanges(e){this.onChanges(e)}ngOnDestroy(){this.onDestroy()}onChanges(e){this._checkFormPresent(),e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}onDestroy(){this.form&&(ms(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get path(){return[]}addControl(e){let t=this.form.get(e.path);return e._setupWithForm(t,this.callSetDisabledState),t.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),t}getControl(e){return this.form.get(e.path)}removeControl(e){bu(e.control||null,e,!1),k_(this.directives,e)}addFormGroup(e){this._setUpFormContainer(e)}removeFormGroup(e){this._cleanUpFormContainer(e)}getFormGroup(e){return this.form.get(e.path)}getFormArray(e){return this.form.get(e.path)}addFormArray(e){this._setUpFormContainer(e)}removeFormArray(e){this._cleanUpFormContainer(e)}updateModel(e,t){this.form.get(e.path).setValue(t)}onReset(){this.resetForm()}resetForm(e=void 0,t={}){this.form.reset(e,t),this._submittedReactive.set(!1)}onSubmit(e){return this.submitted=!0,Wu(this.form,this.directives),this.ngSubmit.emit(e),this.form._events.next(new cs(this.control)),e?.target?.method==="dialog"}_updateDomValue(){this.directives.forEach(e=>{let t=e.control,n=this.form.get(e.path);t!==n&&(bu(t||null,e),E_(n)&&e._setupWithForm(n,this.callSetDisabledState))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){let t=this.form.get(e.path);$u(t,e),t.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){let t=this.form?.get(e.path);t&&w_(t,e)&&t.updateValueAndValidity({emitEvent:!1})}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm?._registerOnCollectionChange(()=>{})}_updateValidators(){fc(this.form,this),this._oldForm&&ms(this._oldForm,this)}_checkFormPresent(){this.form}static \u0275fac=function(t){return new(t||i)(be(cn,10),be(hs,10),be(za,8))};static \u0275dir=T({type:i,features:[ie,Ie]})}return i})();var Ku=new k("");var R_={provide:fi,useExisting:lt(()=>Ti)},Ti=(()=>{class i extends fi{_ngModelWarningConfig;_added=!1;viewModel;control;name=null;set isDisabled(e){}model;update=new X;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(e,t,n,a,r,u,h){super(h,u,a),this._ngModelWarningConfig=r,this._parent=e,this._setValidators(t),this._setAsyncValidators(n)}_setupWithForm(e,t){this.control=e,this.isCustomControlBased?this.setupCustomControl():(this.valueAccessor??=this.selectedValueAccessor,oc(e,this,t))}ngOnChanges(e){this._added||this._setUpControl(),Gu(e,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective?.removeControl(this)}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}get path(){return Hu(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_setUpControl(){this.control=this.formDirective.addControl(this),this._added=!0}\u0275ngControlCreate(e){super.ngControlCreate(e)}\u0275ngControlUpdate(e){this.isCustomControlBased&&(this._added||this._setUpControl(),super.ngControlUpdate(e,!0))}static \u0275fac=function(t){return new(t||i)(be(ln,13),be(cn,10),be(hs,10),be(Ui,10),be(Ku,8),be(we,8),be(Z,8))};static \u0275dir=T({type:i,selectors:[["","formControlName",""]],inputs:{name:[0,"formControlName","name"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},standalone:!1,features:[le([R_,qu]),ie,Ie,ll(null)]})}return i})();var P_={provide:ln,useExisting:lt(()=>$t)},$t=(()=>{class i extends I_{form=null;ngSubmit=new X;get control(){return this.form}static \u0275fac=(()=>{let e;return function(n){return(e||(e=xe(i)))(n||i)}})();static \u0275dir=T({type:i,selectors:[["","formGroup",""]],hostBindings:function(t,n){t&1&&S("submit",function(r){return n.onSubmit(r)})("reset",function(){return n.onReset()})},inputs:{form:[0,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[le([P_]),ie]})}return i})();var Xu=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=U({type:i});static \u0275inj=H({})}return i})();function wu(i){return!!i&&(i.asyncValidators!==void 0||i.validators!==void 0||i.updateOn!==void 0)}var Gi=(()=>{class i{useNonNullable=!1;get nonNullable(){let e=new i;return e.useNonNullable=!0,e}group(e,t=null){let n=this._reduceControls(e),a={};return wu(t)?a=t:t!==null&&(a.validators=t.validator,a.asyncValidators=t.asyncValidator),new zo(n,a)}record(e,t=null){let n=this._reduceControls(e);return new ac(n,t)}control(e,t,n){let a={};return this.useNonNullable?(wu(t)?a=t:(a.validators=t,a.asyncValidators=n),new Va(e,Fe(V({},a),{nonNullable:!0}))):new Va(e,t,n)}array(e,t,n){let a=e.map(r=>this._createControl(r));return new rc(a,t,n)}_reduceControls(e){let t={};return Object.keys(e).forEach(n=>{t[n]=this._createControl(e[n])}),t}_createControl(e){if(e instanceof Va)return e;if(e instanceof Bo)return e;if(Array.isArray(e)){let t=e[0],n=e.length>1?e[1]:null,a=e.length>2?e[2]:null;return this.control(t,n,a)}else return this.control(e)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();var gi=(()=>{class i{static withConfig(e){return{ngModule:i,providers:[{provide:za,useValue:e.callSetDisabledState??gs}]}}static \u0275fac=function(t){return new(t||i)};static \u0275mod=U({type:i});static \u0275inj=H({imports:[Xu]})}return i})(),Wi=(()=>{class i{static withConfig(e){return{ngModule:i,providers:[{provide:Ku,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:za,useValue:e.callSetDisabledState??gs}]}}static \u0275fac=function(t){return new(t||i)};static \u0275mod=U({type:i});static \u0275inj=H({imports:[Xu]})}return i})();var Yu=new k("MAT_INPUT_VALUE_ACCESSOR");var gc=class{_box;_destroyed=new O;_resizeSubject=new O;_resizeObserver;_elementObservables=new Map;constructor(o){this._box=o,typeof ResizeObserver<"u"&&(this._resizeObserver=new ResizeObserver(e=>this._resizeSubject.next(e)))}observe(o){return this._elementObservables.has(o)||this._elementObservables.set(o,new Nt(e=>{let t=this._resizeSubject.subscribe(e);return this._resizeObserver?.observe(o,{box:this._box}),()=>{this._resizeObserver?.unobserve(o),t.unsubscribe(),this._elementObservables.delete(o)}}).pipe(ke(e=>e.some(t=>t.target===o)),tl({bufferSize:1,refCount:!0}),ue(this._destroyed))),this._elementObservables.get(o)}destroy(){this._destroyed.next(),this._destroyed.complete(),this._resizeSubject.complete(),this._elementObservables.clear()}},Zu=(()=>{class i{_cleanupErrorListener;_observers=new Map;_ngZone=m($);constructor(){typeof ResizeObserver<"u"}ngOnDestroy(){for(let[,e]of this._observers)e.destroy();this._observers.clear(),this._cleanupErrorListener?.()}observe(e,t){let n=t?.box||"content-box";return this._observers.has(n)||this._observers.set(n,new gc(n)),this._observers.get(n).observe(e)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();var O_=["notch"],F_=["*"],Qu=["iconPrefixContainer"],Ju=["textPrefixContainer"],eh=["iconSuffixContainer"],th=["textSuffixContainer"],N_=["textField"],L_=["*",[["mat-label"]],[["","matPrefix",""],["","matIconPrefix",""]],[["","matTextPrefix",""]],[["","matTextSuffix",""]],[["","matSuffix",""],["","matIconSuffix",""]],[["mat-error"],["","matError",""]],[["mat-hint",3,"align","end"]],[["mat-hint","align","end"]]],V_=["*","mat-label","[matPrefix], [matIconPrefix]","[matTextPrefix]","[matTextSuffix]","[matSuffix], [matIconSuffix]","mat-error, [matError]","mat-hint:not([align='end'])","mat-hint[align='end']"];function B_(i,o){i&1&&_(0,"span",21)}function z_(i,o){if(i&1&&(s(0,"label",20),W(1,1),w(2,B_,1,0,"span",21),l()),i&2){let e=v(2);x("floating",e._shouldLabelFloat())("monitorResize",e._hasOutline())("id",e._labelId),J("for",e._control.disableAutomaticLabeling?null:e._control.id),c(2),D(!e.hideRequiredMarker&&e._control.required?2:-1)}}function j_(i,o){if(i&1&&w(0,z_,3,5,"label",20),i&2){let e=v();D(e._hasFloatingLabel()?0:-1)}}function H_(i,o){i&1&&_(0,"div",7)}function U_(i,o){}function $_(i,o){if(i&1&&We(0,U_,0,0,"ng-template",13),i&2){v(2);let e=Se(1);x("ngTemplateOutlet",e)}}function G_(i,o){if(i&1&&(s(0,"div",9),w(1,$_,1,1,null,13),l()),i&2){let e=v();x("matFormFieldNotchedOutlineOpen",e._shouldLabelFloat()),c(),D(e._forceDisplayInfixLabel()?-1:1)}}function W_(i,o){i&1&&(s(0,"div",10,2),W(2,2),l())}function q_(i,o){i&1&&(s(0,"div",11,3),W(2,3),l())}function K_(i,o){}function X_(i,o){if(i&1&&We(0,K_,0,0,"ng-template",13),i&2){v();let e=Se(1);x("ngTemplateOutlet",e)}}function Y_(i,o){i&1&&(s(0,"div",14,4),W(2,4),l())}function Z_(i,o){i&1&&(s(0,"div",15,5),W(2,5),l())}function Q_(i,o){i&1&&_(0,"div",16)}function J_(i,o){i&1&&(s(0,"div",18),W(1,6),l())}function ev(i,o){if(i&1&&(s(0,"mat-hint",22),d(1),l()),i&2){let e=v(2);x("id",e._hintLabelId),c(),I(e.hintLabel)}}function tv(i,o){if(i&1&&(s(0,"div",19),w(1,ev,2,2,"mat-hint",22),W(2,7),_(3,"div",23),W(4,8),l()),i&2){let e=v();c(),D(e.hintLabel?1:-1)}}var _t=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,selectors:[["mat-label"]]})}return i})(),lh=new k("MatError"),qi=(()=>{class i{id=m(De).getId("mat-mdc-error-");static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,selectors:[["mat-error"],["","matError",""]],hostAttrs:[1,"mat-mdc-form-field-error","mat-mdc-form-field-bottom-align"],hostVars:1,hostBindings:function(t,n){t&2&&ft("id",n.id)},inputs:{id:"id"},features:[le([{provide:lh,useExisting:i}])]})}return i})(),jo=(()=>{class i{align="start";id=m(De).getId("mat-mdc-hint-");static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,selectors:[["mat-hint"]],hostAttrs:[1,"mat-mdc-form-field-hint","mat-mdc-form-field-bottom-align"],hostVars:4,hostBindings:function(t,n){t&2&&(ft("id",n.id),J("align",null),p("mat-mdc-form-field-hint-end",n.align==="end"))},inputs:{align:"align",id:"id"}})}return i})(),iv=new k("MatPrefix");var nv=new k("MatSuffix");var ch=new k("FloatingLabelParent"),ih=(()=>{class i{_elementRef=m(B);get floating(){return this._floating}set floating(e){this._floating=e,this.monitorResize&&this._handleResize()}_floating=!1;get monitorResize(){return this._monitorResize}set monitorResize(e){this._monitorResize=e,this._monitorResize?this._subscribeToResize():this._resizeSubscription.unsubscribe()}_monitorResize=!1;_resizeObserver=m(Zu);_ngZone=m($);_parent=m(ch);_resizeSubscription=new Te;ngOnDestroy(){this._resizeSubscription.unsubscribe()}getWidth(){return ov(this._elementRef.nativeElement)}get element(){return this._elementRef.nativeElement}_handleResize(){setTimeout(()=>this._parent._handleLabelResized())}_subscribeToResize(){this._resizeSubscription.unsubscribe(),this._ngZone.runOutsideAngular(()=>{this._resizeSubscription=this._resizeObserver.observe(this._elementRef.nativeElement,{box:"border-box"}).subscribe(()=>this._handleResize())})}static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,selectors:[["label","matFormFieldFloatingLabel",""]],hostAttrs:[1,"mdc-floating-label","mat-mdc-floating-label"],hostVars:2,hostBindings:function(t,n){t&2&&p("mdc-floating-label--float-above",n.floating)},inputs:{floating:"floating",monitorResize:"monitorResize"}})}return i})();function ov(i){let o=i;if(o.offsetParent!==null)return o.scrollWidth;let e=o.cloneNode(!0);e.style.setProperty("position","absolute"),e.style.setProperty("transform","translate(-9999px, -9999px)"),document.documentElement.appendChild(e);let t=e.scrollWidth;return e.remove(),t}var nh="mdc-line-ripple--active",_s="mdc-line-ripple--deactivating",oh=(()=>{class i{_elementRef=m(B);_cleanupTransitionEnd;constructor(){let e=m($),t=m(we);e.runOutsideAngular(()=>{this._cleanupTransitionEnd=t.listen(this._elementRef.nativeElement,"transitionend",this._handleTransitionEnd)})}activate(){let e=this._elementRef.nativeElement.classList;e.remove(_s),e.add(nh)}deactivate(){this._elementRef.nativeElement.classList.add(_s)}_handleTransitionEnd=e=>{let t=this._elementRef.nativeElement.classList,n=t.contains(_s);e.propertyName==="opacity"&&n&&t.remove(nh,_s)};ngOnDestroy(){this._cleanupTransitionEnd()}static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,selectors:[["div","matFormFieldLineRipple",""]],hostAttrs:[1,"mdc-line-ripple"]})}return i})(),ah=(()=>{class i{_elementRef=m(B);_ngZone=m($);open=!1;_notch;ngAfterViewInit(){let e=this._elementRef.nativeElement,t=e.querySelector(".mdc-floating-label");t?(e.classList.add("mdc-notched-outline--upgraded"),typeof requestAnimationFrame=="function"&&(t.style.transitionDuration="0s",this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>t.style.transitionDuration="")}))):e.classList.add("mdc-notched-outline--no-label")}_setNotchWidth(e){let t=this._notch.nativeElement;!this.open||!e?t.style.width="":t.style.width=`calc(${e}px * var(--mat-mdc-form-field-floating-label-scale, 0.75) + 9px)`}_setMaxWidth(e){this._notch.nativeElement.style.setProperty("--mat-form-field-notch-max-width",`calc(100% - ${e}px)`)}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=R({type:i,selectors:[["div","matFormFieldNotchedOutline",""]],viewQuery:function(t,n){if(t&1&&Re(O_,5),t&2){let a;N(a=L())&&(n._notch=a.first)}},hostAttrs:[1,"mdc-notched-outline"],hostVars:2,hostBindings:function(t,n){t&2&&p("mdc-notched-outline--notched",n.open)},inputs:{open:[0,"matFormFieldNotchedOutlineOpen","open"]},ngContentSelectors:F_,decls:5,vars:0,consts:[["notch",""],[1,"mat-mdc-notch-piece","mdc-notched-outline__leading"],[1,"mat-mdc-notch-piece","mdc-notched-outline__notch"],[1,"mat-mdc-notch-piece","mdc-notched-outline__trailing"]],template:function(t,n){t&1&&(ve(),kt(0,"div",1),Ne(1,"div",2,0),W(3),qe(),kt(4,"div",3))},encapsulation:2})}return i})(),Ua=(()=>{class i{value=null;stateChanges;id;placeholder;ngControl=null;focused=!1;empty=!1;shouldLabelFloat=!1;required=!1;disabled=!1;errorState=!1;controlType;autofilled;userAriaDescribedBy;disableAutomaticLabeling;describedByIds;static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i})}return i})();var ro=new k("MatFormField"),av=new k("MAT_FORM_FIELD_DEFAULT_OPTIONS"),rh="fill",rv="auto",sh="fixed",sv="translateY(-50%)",ut=(()=>{class i{_elementRef=m(B);_changeDetectorRef=m(se);_platform=m(fe);_idGenerator=m(De);_ngZone=m($);_defaults=m(av,{optional:!0});_currentDirection;_textField;_iconPrefixContainer;_textPrefixContainer;_iconSuffixContainer;_textSuffixContainer;_floatingLabel;_notchedOutline;_lineRipple;_iconPrefixContainerSignal=ma("iconPrefixContainer");_textPrefixContainerSignal=ma("textPrefixContainer");_iconSuffixContainerSignal=ma("iconSuffixContainer");_textSuffixContainerSignal=ma("textSuffixContainer");_prefixSuffixContainers=P(()=>[this._iconPrefixContainerSignal(),this._textPrefixContainerSignal(),this._iconSuffixContainerSignal(),this._textSuffixContainerSignal()].map(e=>e?.nativeElement).filter(e=>e!==void 0));_formFieldControl;_prefixChildren;_suffixChildren;_errorChildren;_hintChildren;_labelChild=Id(_t);get hideRequiredMarker(){return this._hideRequiredMarker}set hideRequiredMarker(e){this._hideRequiredMarker=gt(e)}_hideRequiredMarker=!1;color="primary";get floatLabel(){return this._floatLabel||this._defaults?.floatLabel||rv}set floatLabel(e){e!==this._floatLabel&&(this._floatLabel=e,this._changeDetectorRef.markForCheck())}_floatLabel;get appearance(){return this._appearanceSignal()}set appearance(e){let t=e||this._defaults?.appearance||rh;this._appearanceSignal.set(t)}_appearanceSignal=E(rh);get subscriptSizing(){return this._subscriptSizing||this._defaults?.subscriptSizing||sh}set subscriptSizing(e){this._subscriptSizing=e||this._defaults?.subscriptSizing||sh}_subscriptSizing=null;get hintLabel(){return this._hintLabel}set hintLabel(e){this._hintLabel=e,this._processHints()}_hintLabel="";_hasIconPrefix=!1;_hasTextPrefix=!1;_hasIconSuffix=!1;_hasTextSuffix=!1;_labelId=this._idGenerator.getId("mat-mdc-form-field-label-");_hintLabelId=this._idGenerator.getId("mat-mdc-hint-");_describedByIds;get _control(){return this._explicitFormFieldControl||this._formFieldControl}set _control(e){this._explicitFormFieldControl=e}_destroyed=new O;_isFocused=null;_explicitFormFieldControl;_previousControl=null;_previousControlValidatorFn=null;_stateChanges;_valueChanges;_describedByChanges;_outlineLabelOffsetResizeObserver=null;_animationsDisabled=ye();constructor(){let e=this._defaults,t=m(Ze);e&&(e.appearance&&(this.appearance=e.appearance),this._hideRequiredMarker=!!e?.hideRequiredMarker,e.color&&(this.color=e.color)),Bt(()=>this._currentDirection=t.valueSignal()),this._syncOutlineLabelOffset()}ngAfterViewInit(){this._updateFocusState(),this._animationsDisabled||this._ngZone.runOutsideAngular(()=>{setTimeout(()=>{this._elementRef.nativeElement.classList.add("mat-form-field-animations-enabled")},300)}),this._changeDetectorRef.detectChanges()}ngAfterContentInit(){this._assertFormFieldControl(),this._initializeSubscript(),this._initializePrefixAndSuffix()}ngAfterContentChecked(){this._assertFormFieldControl(),this._control!==this._previousControl&&(this._initializeControl(this._previousControl),this._control.ngControl&&this._control.ngControl.control&&(this._previousControlValidatorFn=this._control.ngControl.control.validator),this._previousControl=this._control),this._control.ngControl&&this._control.ngControl.control&&this._control.ngControl.control.validator!==this._previousControlValidatorFn&&this._changeDetectorRef.markForCheck()}ngOnDestroy(){this._outlineLabelOffsetResizeObserver?.disconnect(),this._stateChanges?.unsubscribe(),this._valueChanges?.unsubscribe(),this._describedByChanges?.unsubscribe(),this._destroyed.next(),this._destroyed.complete()}getLabelId=P(()=>this._hasFloatingLabel()?this._labelId:null);getConnectedOverlayOrigin(){return this._textField||this._elementRef}_animateAndLockLabel(){this._hasFloatingLabel()&&(this.floatLabel="always")}_initializeControl(e){let t=this._control,n="mat-mdc-form-field-type-";e&&this._elementRef.nativeElement.classList.remove(n+e.controlType),t.controlType&&this._elementRef.nativeElement.classList.add(n+t.controlType),this._stateChanges?.unsubscribe(),this._stateChanges=t.stateChanges.subscribe(()=>{this._updateFocusState(),this._changeDetectorRef.markForCheck()}),this._describedByChanges?.unsubscribe(),this._describedByChanges=t.stateChanges.pipe(Ee([void 0,void 0]),Ve(()=>[t.errorState,t.userAriaDescribedBy]),el(),ke(([[a,r],[u,h]])=>a!==u||r!==h)).subscribe(()=>this._syncDescribedByIds()),this._valueChanges?.unsubscribe(),t.ngControl&&t.ngControl.valueChanges&&(this._valueChanges=t.ngControl.valueChanges.pipe(ue(this._destroyed)).subscribe(()=>this._changeDetectorRef.markForCheck()))}_checkPrefixAndSuffixTypes(){this._hasIconPrefix=!!this._prefixChildren.find(e=>!e._isText),this._hasTextPrefix=!!this._prefixChildren.find(e=>e._isText),this._hasIconSuffix=!!this._suffixChildren.find(e=>!e._isText),this._hasTextSuffix=!!this._suffixChildren.find(e=>e._isText)}_initializePrefixAndSuffix(){this._checkPrefixAndSuffixTypes(),Xe(this._prefixChildren.changes,this._suffixChildren.changes).subscribe(()=>{this._checkPrefixAndSuffixTypes(),this._changeDetectorRef.markForCheck()})}_initializeSubscript(){this._hintChildren.changes.subscribe(()=>{this._processHints(),this._changeDetectorRef.markForCheck()}),this._errorChildren.changes.subscribe(()=>{this._syncDescribedByIds(),this._changeDetectorRef.markForCheck()}),this._validateHints(),this._syncDescribedByIds()}_assertFormFieldControl(){this._control}_updateFocusState(){let e=this._control.focused;e&&!this._isFocused?(this._isFocused=!0,this._lineRipple?.activate()):!e&&(this._isFocused||this._isFocused===null)&&(this._isFocused=!1,this._lineRipple?.deactivate()),this._elementRef.nativeElement.classList.toggle("mat-focused",e),this._textField?.nativeElement.classList.toggle("mdc-text-field--focused",e)}_syncOutlineLabelOffset(){Od({earlyRead:()=>{if(this._appearanceSignal()!=="outline")return this._outlineLabelOffsetResizeObserver?.disconnect(),null;if(globalThis.ResizeObserver){this._outlineLabelOffsetResizeObserver||=new globalThis.ResizeObserver(()=>{this._writeOutlinedLabelStyles(this._getOutlinedLabelOffset())});for(let e of this._prefixSuffixContainers())this._outlineLabelOffsetResizeObserver.observe(e,{box:"border-box"})}return this._getOutlinedLabelOffset()},write:e=>this._writeOutlinedLabelStyles(e())})}_shouldAlwaysFloat(){return this.floatLabel==="always"}_hasOutline(){return this.appearance==="outline"}_forceDisplayInfixLabel(){return!this._platform.isBrowser&&this._prefixChildren.length&&!this._shouldLabelFloat()}_hasFloatingLabel=P(()=>!!this._labelChild());_shouldLabelFloat(){return this._hasFloatingLabel()?this._control.shouldLabelFloat||this._shouldAlwaysFloat():!1}_shouldForward(e){let t=this._control?this._control.ngControl:null;return t&&t[e]}_getSubscriptMessageType(){return this._errorChildren&&this._errorChildren.length>0&&this._control.errorState?"error":"hint"}_handleLabelResized(){this._refreshOutlineNotchWidth()}_refreshOutlineNotchWidth(){!this._hasOutline()||!this._floatingLabel||!this._shouldLabelFloat()?this._notchedOutline?._setNotchWidth(0):this._notchedOutline?._setNotchWidth(this._floatingLabel.getWidth())}_processHints(){this._validateHints(),this._syncDescribedByIds()}_validateHints(){this._hintChildren}_syncDescribedByIds(){if(this._control){let e=[];if(this._control.userAriaDescribedBy&&typeof this._control.userAriaDescribedBy=="string"&&e.push(...this._control.userAriaDescribedBy.split(" ")),this._getSubscriptMessageType()==="hint"){let a=this._hintChildren?this._hintChildren.find(u=>u.align==="start"):null,r=this._hintChildren?this._hintChildren.find(u=>u.align==="end"):null;a?e.push(a.id):this._hintLabel&&e.push(this._hintLabelId),r&&e.push(r.id)}else this._errorChildren&&e.push(...this._errorChildren.map(a=>a.id));let t=this._control.describedByIds,n;if(t){let a=this._describedByIds||e;n=e.concat(t.filter(r=>r&&!a.includes(r)))}else n=e;this._control.setDescribedByIds(n),this._describedByIds=e}}_getOutlinedLabelOffset(){if(!this._hasOutline()||!this._floatingLabel)return null;if(!this._iconPrefixContainer&&!this._textPrefixContainer)return["",null];if(!this._isAttachedToDom())return null;let e=this._iconPrefixContainer?.nativeElement,t=this._textPrefixContainer?.nativeElement,n=this._iconSuffixContainer?.nativeElement,a=this._textSuffixContainer?.nativeElement,r=e?.getBoundingClientRect().width??0,u=t?.getBoundingClientRect().width??0,h=n?.getBoundingClientRect().width??0,f=a?.getBoundingClientRect().width??0,b=this._currentDirection==="rtl"?"-1":"1",M=`${r+u}px`,G=`calc(${b} * (${M} + var(--mat-mdc-form-field-label-offset-x, 0px)))`,de=`var(--mat-mdc-form-field-label-transform, ${sv} translateX(${G}))`,Ce=r+u+h+f;return[de,Ce]}_writeOutlinedLabelStyles(e){if(e!==null){let[t,n]=e;this._floatingLabel&&(this._floatingLabel.element.style.transform=t),n!==null&&this._notchedOutline?._setMaxWidth(n)}}_isAttachedToDom(){let e=this._elementRef.nativeElement;if(e.getRootNode){let t=e.getRootNode();return t&&t!==e}return document.documentElement.contains(e)}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=R({type:i,selectors:[["mat-form-field"]],contentQueries:function(t,n,a){if(t&1&&(Dd(a,n._labelChild,_t,5),dt(a,Ua,5)(a,iv,5)(a,nv,5)(a,lh,5)(a,jo,5)),t&2){cl();let r;N(r=L())&&(n._formFieldControl=r.first),N(r=L())&&(n._prefixChildren=r),N(r=L())&&(n._suffixChildren=r),N(r=L())&&(n._errorChildren=r),N(r=L())&&(n._hintChildren=r)}},viewQuery:function(t,n){if(t&1&&(Sd(n._iconPrefixContainerSignal,Qu,5)(n._textPrefixContainerSignal,Ju,5)(n._iconSuffixContainerSignal,eh,5)(n._textSuffixContainerSignal,th,5),Re(N_,5)(Qu,5)(Ju,5)(eh,5)(th,5)(ih,5)(ah,5)(oh,5)),t&2){cl(4);let a;N(a=L())&&(n._textField=a.first),N(a=L())&&(n._iconPrefixContainer=a.first),N(a=L())&&(n._textPrefixContainer=a.first),N(a=L())&&(n._iconSuffixContainer=a.first),N(a=L())&&(n._textSuffixContainer=a.first),N(a=L())&&(n._floatingLabel=a.first),N(a=L())&&(n._notchedOutline=a.first),N(a=L())&&(n._lineRipple=a.first)}},hostAttrs:[1,"mat-mdc-form-field"],hostVars:38,hostBindings:function(t,n){t&2&&p("mat-mdc-form-field-label-always-float",n._shouldAlwaysFloat())("mat-mdc-form-field-has-icon-prefix",n._hasIconPrefix)("mat-mdc-form-field-has-icon-suffix",n._hasIconSuffix)("mat-form-field-invalid",n._control.errorState)("mat-form-field-disabled",n._control.disabled)("mat-form-field-autofilled",n._control.autofilled)("mat-form-field-appearance-fill",n.appearance=="fill")("mat-form-field-appearance-outline",n.appearance=="outline")("mat-form-field-hide-placeholder",n._hasFloatingLabel()&&!n._shouldLabelFloat())("mat-primary",n.color!=="accent"&&n.color!=="warn")("mat-accent",n.color==="accent")("mat-warn",n.color==="warn")("ng-untouched",n._shouldForward("untouched"))("ng-touched",n._shouldForward("touched"))("ng-pristine",n._shouldForward("pristine"))("ng-dirty",n._shouldForward("dirty"))("ng-valid",n._shouldForward("valid"))("ng-invalid",n._shouldForward("invalid"))("ng-pending",n._shouldForward("pending"))},inputs:{hideRequiredMarker:"hideRequiredMarker",color:"color",floatLabel:"floatLabel",appearance:"appearance",subscriptSizing:"subscriptSizing",hintLabel:"hintLabel"},exportAs:["matFormField"],features:[le([{provide:ro,useExisting:i},{provide:ch,useExisting:i}])],ngContentSelectors:V_,decls:18,vars:21,consts:[["labelTemplate",""],["textField",""],["iconPrefixContainer",""],["textPrefixContainer",""],["textSuffixContainer",""],["iconSuffixContainer",""],[1,"mat-mdc-text-field-wrapper","mdc-text-field",3,"click"],[1,"mat-mdc-form-field-focus-overlay"],[1,"mat-mdc-form-field-flex"],["matFormFieldNotchedOutline","",3,"matFormFieldNotchedOutlineOpen"],[1,"mat-mdc-form-field-icon-prefix"],[1,"mat-mdc-form-field-text-prefix"],[1,"mat-mdc-form-field-infix"],[3,"ngTemplateOutlet"],[1,"mat-mdc-form-field-text-suffix"],[1,"mat-mdc-form-field-icon-suffix"],["matFormFieldLineRipple",""],["aria-atomic","true","aria-live","polite",1,"mat-mdc-form-field-subscript-wrapper","mat-mdc-form-field-bottom-align"],[1,"mat-mdc-form-field-error-wrapper"],[1,"mat-mdc-form-field-hint-wrapper"],["matFormFieldFloatingLabel","",3,"floating","monitorResize","id"],["aria-hidden","true",1,"mat-mdc-form-field-required-marker","mdc-floating-label--required"],[3,"id"],[1,"mat-mdc-form-field-hint-spacer"]],template:function(t,n){if(t&1&&(ve(L_),We(0,j_,1,1,"ng-template",null,0,dl),s(2,"div",6,1),S("click",function(r){return n._control.onContainerClick(r)}),w(4,H_,1,0,"div",7),s(5,"div",8),w(6,G_,2,2,"div",9),w(7,W_,3,0,"div",10),w(8,q_,3,0,"div",11),s(9,"div",12),w(10,X_,1,1,null,13),W(11),l(),w(12,Y_,3,0,"div",14),w(13,Z_,3,0,"div",15),l(),w(14,Q_,1,0,"div",16),l(),s(15,"div",17),w(16,J_,2,0,"div",18)(17,tv,5,1,"div",19),l()),t&2){let a;c(2),p("mdc-text-field--filled",!n._hasOutline())("mdc-text-field--outlined",n._hasOutline())("mdc-text-field--no-label",!n._hasFloatingLabel())("mdc-text-field--disabled",n._control.disabled)("mdc-text-field--invalid",n._control.errorState),c(2),D(!n._hasOutline()&&!n._control.disabled?4:-1),c(2),D(n._hasOutline()?6:-1),c(),D(n._hasIconPrefix?7:-1),c(),D(n._hasTextPrefix?8:-1),c(2),D(!n._hasOutline()||n._forceDisplayInfixLabel()?10:-1),c(2),D(n._hasTextSuffix?12:-1),c(),D(n._hasIconSuffix?13:-1),c(),D(n._hasOutline()?-1:14),c(),p("mat-mdc-form-field-subscript-dynamic-size",n.subscriptSizing==="dynamic");let r=n._getSubscriptMessageType();c(),D((a=r)==="error"?16:a==="hint"?17:-1)}},dependencies:[ih,ah,Cl,oh,jo],styles:[`.mdc-text-field {
472
472
  display: inline-flex;
473
473
  align-items: baseline;
474
474
  padding: 0 16px;
@@ -1417,7 +1417,7 @@ select.mat-mdc-form-field-input-control:not(.mat-mdc-native-select-inline) optio
1417
1417
  .mdc-notched-outline--upgraded .mdc-floating-label--float-above {
1418
1418
  max-width: calc(133.3333333333% + 1px);
1419
1419
  }
1420
- `],encapsulation:2})}return i})();var Ho=(()=>{class i{isErrorState(e,t){return!!(e&&e.invalid&&(e.touched||t&&t.submitted))}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();var Uo=class{_defaultMatcher;ngControl;_parentFormGroup;_parentForm;_stateChanges;errorState=!1;matcher;constructor(o,e,t,n,a){this._defaultMatcher=o,this.ngControl=e,this._parentFormGroup=t,this._parentForm=n,this._stateChanges=a}updateErrorState(){let o=this.errorState,e=this._parentFormGroup||this._parentForm,t=this.matcher||this._defaultMatcher,n=this.ngControl?this.ngControl.control:null,a=t?.isErrorState(n,e)??!1;a!==o&&(this.errorState=a,this._stateChanges.next())}};var Mt=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=U({type:i});static \u0275inj=H({imports:[Fo,ut,ce]})}return i})();var cv=["button","checkbox","file","hidden","image","radio","range","reset","submit"],dv=new k("MAT_INPUT_CONFIG"),Rt=(()=>{class i{_elementRef=m(B);_platform=m(fe);ngControl=m(fi,{optional:!0,self:!0});_autofillMonitor=m(Gm);_ngZone=m($);_formField=m(ro,{optional:!0});_renderer=m(we);_uid=m(De).getId("mat-input-");_previousNativeValue;_inputValueAccessor;_signalBasedValueAccessor;_previousPlaceholder=null;_errorStateTracker;_config=m(dv,{optional:!0});_cleanupIosKeyup;_cleanupWebkitWheel;_isServer=!1;_isNativeSelect=!1;_isTextarea=!1;_isInFormField=!1;focused=!1;stateChanges=new O;controlType="mat-input";autofilled=!1;get disabled(){return this._disabled}set disabled(e){this._disabled=gt(e),this.focused&&(this.focused=!1,this.stateChanges.next())}_disabled=!1;get id(){return this._id}set id(e){this._id=e||this._uid}_id;placeholder;name;get required(){return this._required??this.ngControl?.control?.hasValidator(Qe.required)??!1}set required(e){this._required=gt(e)}_required;get type(){return this._type}set type(e){this._type=e||"text",this._validateType(),!this._isTextarea&&Kl().has(this._type)&&(this._elementRef.nativeElement.type=this._type)}_type="text";get errorStateMatcher(){return this._errorStateTracker.matcher}set errorStateMatcher(e){this._errorStateTracker.matcher=e}userAriaDescribedBy;get value(){return this._signalBasedValueAccessor?this._signalBasedValueAccessor.value():this._inputValueAccessor.value}set value(e){e!==this.value&&(this._signalBasedValueAccessor?this._signalBasedValueAccessor.value.set(e):this._inputValueAccessor.value=e,this.stateChanges.next())}get readonly(){return this._readonly}set readonly(e){this._readonly=gt(e)}_readonly=!1;disabledInteractive;get errorState(){return this._errorStateTracker.errorState}set errorState(e){this._errorStateTracker.errorState=e}_neverEmptyInputTypes=["date","datetime","datetime-local","month","time","week"].filter(e=>Kl().has(e));constructor(){let e=m(ja,{optional:!0}),t=m(Ut,{optional:!0}),n=m(Ho),a=m(Yu,{optional:!0,self:!0}),r=this._elementRef.nativeElement,u=r.nodeName.toLowerCase();a?_n(a.value)?this._signalBasedValueAccessor=a:this._inputValueAccessor=a:this._inputValueAccessor=r,this._previousNativeValue=this.value,this.id=this.id,this._platform.IOS&&this._ngZone.runOutsideAngular(()=>{this._cleanupIosKeyup=this._renderer.listen(r,"keyup",this._iOSKeyupListener)}),this._errorStateTracker=new Uo(n,this.ngControl,t,e,this.stateChanges),this._isServer=!this._platform.isBrowser,this._isNativeSelect=u==="select",this._isTextarea=u==="textarea",this._isInFormField=!!this._formField,this.disabledInteractive=this._config?.disabledInteractive||!1,this._isNativeSelect&&(this.controlType=r.multiple?"mat-native-select-multiple":"mat-native-select"),this._signalBasedValueAccessor&&Bt(()=>{this._signalBasedValueAccessor.value(),this.stateChanges.next()})}ngAfterViewInit(){this._platform.isBrowser&&this._autofillMonitor.monitor(this._elementRef.nativeElement).subscribe(e=>{this.autofilled=e.isAutofilled,this.stateChanges.next()})}ngOnChanges(){this.stateChanges.next()}ngOnDestroy(){this.stateChanges.complete(),this._platform.isBrowser&&this._autofillMonitor.stopMonitoring(this._elementRef.nativeElement),this._cleanupIosKeyup?.(),this._cleanupWebkitWheel?.()}ngDoCheck(){this.ngControl&&(this.updateErrorState(),this.ngControl.disabled!==null&&this.ngControl.disabled!==this.disabled&&(this.disabled=this.ngControl.disabled,this.stateChanges.next())),this._dirtyCheckNativeValue(),this._dirtyCheckPlaceholder()}focus(e){this._elementRef.nativeElement.focus(e)}updateErrorState(){this._errorStateTracker.updateErrorState()}_focusChanged(e){if(e!==this.focused){if(!this._isNativeSelect&&e&&this.disabled&&this.disabledInteractive){let t=this._elementRef.nativeElement;t.type==="number"?(t.type="text",t.setSelectionRange(0,0),t.type="number"):t.setSelectionRange(0,0)}this.focused=e,this.stateChanges.next()}}_onInput(){}_dirtyCheckNativeValue(){let e=this._elementRef.nativeElement.value;this._previousNativeValue!==e&&(this._previousNativeValue=e,this.stateChanges.next())}_dirtyCheckPlaceholder(){let e=this._getPlaceholder();if(e!==this._previousPlaceholder){let t=this._elementRef.nativeElement;this._previousPlaceholder=e,e?t.setAttribute("placeholder",e):t.removeAttribute("placeholder")}}_getPlaceholder(){return this.placeholder||null}_validateType(){cv.indexOf(this._type)>-1}_isNeverEmpty(){return this._neverEmptyInputTypes.indexOf(this._type)>-1}_isBadInput(){let e=this._elementRef.nativeElement.validity;return e&&e.badInput}get empty(){return!this._isNeverEmpty()&&!this._elementRef.nativeElement.value&&!this._isBadInput()&&!this.autofilled}get shouldLabelFloat(){if(this._isNativeSelect){let e=this._elementRef.nativeElement,t=e.options[0];return this.focused||e.multiple||!this.empty||!!(e.selectedIndex>-1&&t&&t.label)}else return this.focused&&!this.disabled||!this.empty}get describedByIds(){return this._elementRef.nativeElement.getAttribute("aria-describedby")?.split(" ")||[]}setDescribedByIds(e){let t=this._elementRef.nativeElement;e.length?t.setAttribute("aria-describedby",e.join(" ")):t.removeAttribute("aria-describedby")}onContainerClick(){this.focused||this.focus()}_isInlineSelect(){let e=this._elementRef.nativeElement;return this._isNativeSelect&&(e.multiple||e.size>1)}_iOSKeyupListener=e=>{let t=e.target;!t.value&&t.selectionStart===0&&t.selectionEnd===0&&(t.setSelectionRange(1,1),t.setSelectionRange(0,0))};_getReadonlyAttribute(){return this._isNativeSelect?null:this.readonly||this.disabled&&this.disabledInteractive?"true":null}static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,selectors:[["input","matInput",""],["textarea","matInput",""],["select","matNativeControl",""],["input","matNativeControl",""],["textarea","matNativeControl",""]],hostAttrs:[1,"mat-mdc-input-element"],hostVars:21,hostBindings:function(t,n){t&1&&S("focus",function(){return n._focusChanged(!0)})("blur",function(){return n._focusChanged(!1)})("input",function(){return n._onInput()}),t&2&&(ft("id",n.id)("disabled",n.disabled&&!n.disabledInteractive)("required",n.required),J("name",n.name||null)("readonly",n._getReadonlyAttribute())("aria-disabled",n.disabled&&n.disabledInteractive?"true":null)("aria-invalid",n.empty&&n.required?null:n.errorState)("aria-required",n.required)("id",n.id),p("mat-input-server",n._isServer)("mat-mdc-form-field-textarea-control",n._isInFormField&&n._isTextarea)("mat-mdc-form-field-input-control",n._isInFormField)("mat-mdc-input-disabled-interactive",n.disabledInteractive)("mdc-text-field__input",n._isInFormField)("mat-mdc-native-select-inline",n._isInlineSelect()))},inputs:{disabled:"disabled",id:"id",placeholder:"placeholder",name:"name",required:"required",type:"type",errorStateMatcher:"errorStateMatcher",userAriaDescribedBy:[0,"aria-describedby","userAriaDescribedBy"],value:"value",readonly:"readonly",disabledInteractive:[2,"disabledInteractive","disabledInteractive",z]},exportAs:["matInput"],features:[le([{provide:Ua,useExisting:i}]),Ie]})}return i})(),Pt=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=U({type:i});static \u0275inj=H({imports:[Mt,Mt,Wm,ce]})}return i})();var _i=(function(i){return i[i.FADING_IN=0]="FADING_IN",i[i.VISIBLE=1]="VISIBLE",i[i.FADING_OUT=2]="FADING_OUT",i[i.HIDDEN=3]="HIDDEN",i})(_i||{}),_c=class{_renderer;element;config;_animationForciblyDisabledThroughCss;state=_i.HIDDEN;constructor(o,e,t,n=!1){this._renderer=o,this.element=e,this.config=t,this._animationForciblyDisabledThroughCss=n}fadeOut(){this._renderer.fadeOutRipple(this)}},dh=Po({passive:!0,capture:!0}),vc=class{_events=new Map;addHandler(o,e,t,n){let a=this._events.get(e);if(a){let r=a.get(t);r?r.add(n):a.set(t,new Set([n]))}else this._events.set(e,new Map([[t,new Set([n])]])),o.runOutsideAngular(()=>{document.addEventListener(e,this._delegateEventHandler,dh)})}removeHandler(o,e,t){let n=this._events.get(o);if(!n)return;let a=n.get(e);a&&(a.delete(t),a.size===0&&n.delete(e),n.size===0&&(this._events.delete(o),document.removeEventListener(o,this._delegateEventHandler,dh)))}_delegateEventHandler=o=>{let e=mt(o);e&&this._events.get(o.type)?.forEach((t,n)=>{(n===e||n.contains(e))&&t.forEach(a=>a.handleEvent(o))})}},$a={enterDuration:225,exitDuration:150},mv=800,mh=Po({passive:!0,capture:!0}),uh=["mousedown","touchstart"],hh=["mouseup","mouseleave","touchend","touchcancel"],uv=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275cmp=R({type:i,selectors:[["ng-component"]],hostAttrs:["mat-ripple-style-loader",""],decls:0,vars:0,template:function(t,n){},styles:[`.mat-ripple {
1420
+ `],encapsulation:2})}return i})();var Ho=(()=>{class i{isErrorState(e,t){return!!(e&&e.invalid&&(e.touched||t&&t.submitted))}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();var Uo=class{_defaultMatcher;ngControl;_parentFormGroup;_parentForm;_stateChanges;errorState=!1;matcher;constructor(o,e,t,n,a){this._defaultMatcher=o,this.ngControl=e,this._parentFormGroup=t,this._parentForm=n,this._stateChanges=a}updateErrorState(){let o=this.errorState,e=this._parentFormGroup||this._parentForm,t=this.matcher||this._defaultMatcher,n=this.ngControl?this.ngControl.control:null,a=t?.isErrorState(n,e)??!1;a!==o&&(this.errorState=a,this._stateChanges.next())}};var Mt=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=U({type:i});static \u0275inj=H({imports:[Fo,ut,ce]})}return i})();var dv=["button","checkbox","file","hidden","image","radio","range","reset","submit"],mv=new k("MAT_INPUT_CONFIG"),Rt=(()=>{class i{_elementRef=m(B);_platform=m(fe);ngControl=m(fi,{optional:!0,self:!0});_autofillMonitor=m(Gm);_ngZone=m($);_formField=m(ro,{optional:!0});_renderer=m(we);_uid=m(De).getId("mat-input-");_previousNativeValue;_inputValueAccessor;_signalBasedValueAccessor;_previousPlaceholder=null;_errorStateTracker;_config=m(mv,{optional:!0});_cleanupIosKeyup;_cleanupWebkitWheel;_isServer=!1;_isNativeSelect=!1;_isTextarea=!1;_isInFormField=!1;focused=!1;stateChanges=new O;controlType="mat-input";autofilled=!1;get disabled(){return this._disabled}set disabled(e){this._disabled=gt(e),this.focused&&(this.focused=!1,this.stateChanges.next())}_disabled=!1;get id(){return this._id}set id(e){this._id=e||this._uid}_id;placeholder;name;get required(){return this._required??this.ngControl?.control?.hasValidator(Qe.required)??!1}set required(e){this._required=gt(e)}_required;get type(){return this._type}set type(e){this._type=e||"text",this._validateType(),!this._isTextarea&&Kl().has(this._type)&&(this._elementRef.nativeElement.type=this._type)}_type="text";get errorStateMatcher(){return this._errorStateTracker.matcher}set errorStateMatcher(e){this._errorStateTracker.matcher=e}userAriaDescribedBy;get value(){return this._signalBasedValueAccessor?this._signalBasedValueAccessor.value():this._inputValueAccessor.value}set value(e){e!==this.value&&(this._signalBasedValueAccessor?this._signalBasedValueAccessor.value.set(e):this._inputValueAccessor.value=e,this.stateChanges.next())}get readonly(){return this._readonly}set readonly(e){this._readonly=gt(e)}_readonly=!1;disabledInteractive;get errorState(){return this._errorStateTracker.errorState}set errorState(e){this._errorStateTracker.errorState=e}_neverEmptyInputTypes=["date","datetime","datetime-local","month","time","week"].filter(e=>Kl().has(e));constructor(){let e=m(ja,{optional:!0}),t=m($t,{optional:!0}),n=m(Ho),a=m(Yu,{optional:!0,self:!0}),r=this._elementRef.nativeElement,u=r.nodeName.toLowerCase();a?_n(a.value)?this._signalBasedValueAccessor=a:this._inputValueAccessor=a:this._inputValueAccessor=r,this._previousNativeValue=this.value,this.id=this.id,this._platform.IOS&&this._ngZone.runOutsideAngular(()=>{this._cleanupIosKeyup=this._renderer.listen(r,"keyup",this._iOSKeyupListener)}),this._errorStateTracker=new Uo(n,this.ngControl,t,e,this.stateChanges),this._isServer=!this._platform.isBrowser,this._isNativeSelect=u==="select",this._isTextarea=u==="textarea",this._isInFormField=!!this._formField,this.disabledInteractive=this._config?.disabledInteractive||!1,this._isNativeSelect&&(this.controlType=r.multiple?"mat-native-select-multiple":"mat-native-select"),this._signalBasedValueAccessor&&Bt(()=>{this._signalBasedValueAccessor.value(),this.stateChanges.next()})}ngAfterViewInit(){this._platform.isBrowser&&this._autofillMonitor.monitor(this._elementRef.nativeElement).subscribe(e=>{this.autofilled=e.isAutofilled,this.stateChanges.next()})}ngOnChanges(){this.stateChanges.next()}ngOnDestroy(){this.stateChanges.complete(),this._platform.isBrowser&&this._autofillMonitor.stopMonitoring(this._elementRef.nativeElement),this._cleanupIosKeyup?.(),this._cleanupWebkitWheel?.()}ngDoCheck(){this.ngControl&&(this.updateErrorState(),this.ngControl.disabled!==null&&this.ngControl.disabled!==this.disabled&&(this.disabled=this.ngControl.disabled,this.stateChanges.next())),this._dirtyCheckNativeValue(),this._dirtyCheckPlaceholder()}focus(e){this._elementRef.nativeElement.focus(e)}updateErrorState(){this._errorStateTracker.updateErrorState()}_focusChanged(e){if(e!==this.focused){if(!this._isNativeSelect&&e&&this.disabled&&this.disabledInteractive){let t=this._elementRef.nativeElement;t.type==="number"?(t.type="text",t.setSelectionRange(0,0),t.type="number"):t.setSelectionRange(0,0)}this.focused=e,this.stateChanges.next()}}_onInput(){}_dirtyCheckNativeValue(){let e=this._elementRef.nativeElement.value;this._previousNativeValue!==e&&(this._previousNativeValue=e,this.stateChanges.next())}_dirtyCheckPlaceholder(){let e=this._getPlaceholder();if(e!==this._previousPlaceholder){let t=this._elementRef.nativeElement;this._previousPlaceholder=e,e?t.setAttribute("placeholder",e):t.removeAttribute("placeholder")}}_getPlaceholder(){return this.placeholder||null}_validateType(){dv.indexOf(this._type)>-1}_isNeverEmpty(){return this._neverEmptyInputTypes.indexOf(this._type)>-1}_isBadInput(){let e=this._elementRef.nativeElement.validity;return e&&e.badInput}get empty(){return!this._isNeverEmpty()&&!this._elementRef.nativeElement.value&&!this._isBadInput()&&!this.autofilled}get shouldLabelFloat(){if(this._isNativeSelect){let e=this._elementRef.nativeElement,t=e.options[0];return this.focused||e.multiple||!this.empty||!!(e.selectedIndex>-1&&t&&t.label)}else return this.focused&&!this.disabled||!this.empty}get describedByIds(){return this._elementRef.nativeElement.getAttribute("aria-describedby")?.split(" ")||[]}setDescribedByIds(e){let t=this._elementRef.nativeElement;e.length?t.setAttribute("aria-describedby",e.join(" ")):t.removeAttribute("aria-describedby")}onContainerClick(){this.focused||this.focus()}_isInlineSelect(){let e=this._elementRef.nativeElement;return this._isNativeSelect&&(e.multiple||e.size>1)}_iOSKeyupListener=e=>{let t=e.target;!t.value&&t.selectionStart===0&&t.selectionEnd===0&&(t.setSelectionRange(1,1),t.setSelectionRange(0,0))};_getReadonlyAttribute(){return this._isNativeSelect?null:this.readonly||this.disabled&&this.disabledInteractive?"true":null}static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,selectors:[["input","matInput",""],["textarea","matInput",""],["select","matNativeControl",""],["input","matNativeControl",""],["textarea","matNativeControl",""]],hostAttrs:[1,"mat-mdc-input-element"],hostVars:21,hostBindings:function(t,n){t&1&&S("focus",function(){return n._focusChanged(!0)})("blur",function(){return n._focusChanged(!1)})("input",function(){return n._onInput()}),t&2&&(ft("id",n.id)("disabled",n.disabled&&!n.disabledInteractive)("required",n.required),J("name",n.name||null)("readonly",n._getReadonlyAttribute())("aria-disabled",n.disabled&&n.disabledInteractive?"true":null)("aria-invalid",n.empty&&n.required?null:n.errorState)("aria-required",n.required)("id",n.id),p("mat-input-server",n._isServer)("mat-mdc-form-field-textarea-control",n._isInFormField&&n._isTextarea)("mat-mdc-form-field-input-control",n._isInFormField)("mat-mdc-input-disabled-interactive",n.disabledInteractive)("mdc-text-field__input",n._isInFormField)("mat-mdc-native-select-inline",n._isInlineSelect()))},inputs:{disabled:"disabled",id:"id",placeholder:"placeholder",name:"name",required:"required",type:"type",errorStateMatcher:"errorStateMatcher",userAriaDescribedBy:[0,"aria-describedby","userAriaDescribedBy"],value:"value",readonly:"readonly",disabledInteractive:[2,"disabledInteractive","disabledInteractive",z]},exportAs:["matInput"],features:[le([{provide:Ua,useExisting:i}]),Ie]})}return i})(),Pt=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=U({type:i});static \u0275inj=H({imports:[Mt,Mt,Wm,ce]})}return i})();var _i=(function(i){return i[i.FADING_IN=0]="FADING_IN",i[i.VISIBLE=1]="VISIBLE",i[i.FADING_OUT=2]="FADING_OUT",i[i.HIDDEN=3]="HIDDEN",i})(_i||{}),_c=class{_renderer;element;config;_animationForciblyDisabledThroughCss;state=_i.HIDDEN;constructor(o,e,t,n=!1){this._renderer=o,this.element=e,this.config=t,this._animationForciblyDisabledThroughCss=n}fadeOut(){this._renderer.fadeOutRipple(this)}},dh=Po({passive:!0,capture:!0}),vc=class{_events=new Map;addHandler(o,e,t,n){let a=this._events.get(e);if(a){let r=a.get(t);r?r.add(n):a.set(t,new Set([n]))}else this._events.set(e,new Map([[t,new Set([n])]])),o.runOutsideAngular(()=>{document.addEventListener(e,this._delegateEventHandler,dh)})}removeHandler(o,e,t){let n=this._events.get(o);if(!n)return;let a=n.get(e);a&&(a.delete(t),a.size===0&&n.delete(e),n.size===0&&(this._events.delete(o),document.removeEventListener(o,this._delegateEventHandler,dh)))}_delegateEventHandler=o=>{let e=mt(o);e&&this._events.get(o.type)?.forEach((t,n)=>{(n===e||n.contains(e))&&t.forEach(a=>a.handleEvent(o))})}},$a={enterDuration:225,exitDuration:150},uv=800,mh=Po({passive:!0,capture:!0}),uh=["mousedown","touchstart"],hh=["mouseup","mouseleave","touchend","touchcancel"],hv=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275cmp=R({type:i,selectors:[["ng-component"]],hostAttrs:["mat-ripple-style-loader",""],decls:0,vars:0,template:function(t,n){},styles:[`.mat-ripple {
1421
1421
  overflow: hidden;
1422
1422
  position: relative;
1423
1423
  }
@@ -1445,7 +1445,7 @@ select.mat-mdc-form-field-input-control:not(.mat-mdc-native-select-inline) optio
1445
1445
  .cdk-drag-preview .mat-ripple-element, .cdk-drag-placeholder .mat-ripple-element {
1446
1446
  display: none;
1447
1447
  }
1448
- `],encapsulation:2})}return i})(),so=class i{_target;_ngZone;_platform;_containerElement;_triggerElement=null;_isPointerDown=!1;_activeRipples=new Map;_mostRecentTransientRipple=null;_lastTouchStartEvent;_pointerUpEventsRegistered=!1;_containerRect=null;static _eventManager=new vc;constructor(o,e,t,n,a){this._target=o,this._ngZone=e,this._platform=n,n.isBrowser&&(this._containerElement=Ht(t)),a&&a.get(Be).load(uv)}fadeInRipple(o,e,t={}){let n=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),a=V(V({},$a),t.animation);t.centered&&(o=n.left+n.width/2,e=n.top+n.height/2);let r=t.radius||hv(o,e,n),u=o-n.left,h=e-n.top,f=a.enterDuration,b=document.createElement("div");b.classList.add("mat-ripple-element"),b.style.left=`${u-r}px`,b.style.top=`${h-r}px`,b.style.height=`${r*2}px`,b.style.width=`${r*2}px`,t.color!=null&&(b.style.backgroundColor=t.color),b.style.transitionDuration=`${f}ms`,this._containerElement.appendChild(b);let M=window.getComputedStyle(b),j=M.transitionProperty,G=M.transitionDuration,de=j==="none"||G==="0s"||G==="0s, 0s"||n.width===0&&n.height===0,Ce=new _c(this,b,t,de);b.style.transform="scale3d(1, 1, 1)",Ce.state=_i.FADING_IN,t.persistent||(this._mostRecentTransientRipple=Ce);let pe=null;return!de&&(f||a.exitDuration)&&this._ngZone.runOutsideAngular(()=>{let Oe=()=>{pe&&(pe.fallbackTimer=null),clearTimeout(Ci),this._finishRippleTransition(Ce)},ht=()=>this._destroyRipple(Ce),Ci=setTimeout(ht,f+100);b.addEventListener("transitionend",Oe),b.addEventListener("transitioncancel",ht),pe={onTransitionEnd:Oe,onTransitionCancel:ht,fallbackTimer:Ci}}),this._activeRipples.set(Ce,pe),(de||!f)&&this._finishRippleTransition(Ce),Ce}fadeOutRipple(o){if(o.state===_i.FADING_OUT||o.state===_i.HIDDEN)return;let e=o.element,t=V(V({},$a),o.config.animation);e.style.transitionDuration=`${t.exitDuration}ms`,e.style.opacity="0",o.state=_i.FADING_OUT,(o._animationForciblyDisabledThroughCss||!t.exitDuration)&&this._finishRippleTransition(o)}fadeOutAll(){this._getActiveRipples().forEach(o=>o.fadeOut())}fadeOutAllNonPersistent(){this._getActiveRipples().forEach(o=>{o.config.persistent||o.fadeOut()})}setupTriggerEvents(o){let e=Ht(o);!this._platform.isBrowser||!e||e===this._triggerElement||(this._removeTriggerEvents(),this._triggerElement=e,uh.forEach(t=>{i._eventManager.addHandler(this._ngZone,t,e,this)}))}handleEvent(o){o.type==="mousedown"?this._onMousedown(o):o.type==="touchstart"?this._onTouchStart(o):this._onPointerUp(),this._pointerUpEventsRegistered||(this._ngZone.runOutsideAngular(()=>{hh.forEach(e=>{this._triggerElement.addEventListener(e,this,mh)})}),this._pointerUpEventsRegistered=!0)}_finishRippleTransition(o){o.state===_i.FADING_IN?this._startFadeOutTransition(o):o.state===_i.FADING_OUT&&this._destroyRipple(o)}_startFadeOutTransition(o){let e=o===this._mostRecentTransientRipple,{persistent:t}=o.config;o.state=_i.VISIBLE,!t&&(!e||!this._isPointerDown)&&o.fadeOut()}_destroyRipple(o){let e=this._activeRipples.get(o)??null;this._activeRipples.delete(o),this._activeRipples.size||(this._containerRect=null),o===this._mostRecentTransientRipple&&(this._mostRecentTransientRipple=null),o.state=_i.HIDDEN,e!==null&&(o.element.removeEventListener("transitionend",e.onTransitionEnd),o.element.removeEventListener("transitioncancel",e.onTransitionCancel),e.fallbackTimer!==null&&clearTimeout(e.fallbackTimer)),o.element.remove()}_onMousedown(o){let e=Qn(o),t=this._lastTouchStartEvent&&Date.now()<this._lastTouchStartEvent+mv;!this._target.rippleDisabled&&!e&&!t&&(this._isPointerDown=!0,this.fadeInRipple(o.clientX,o.clientY,this._target.rippleConfig))}_onTouchStart(o){if(!this._target.rippleDisabled&&!Jn(o)){this._lastTouchStartEvent=Date.now(),this._isPointerDown=!0;let e=o.changedTouches;if(e)for(let t=0;t<e.length;t++)this.fadeInRipple(e[t].clientX,e[t].clientY,this._target.rippleConfig)}}_onPointerUp(){this._isPointerDown&&(this._isPointerDown=!1,this._getActiveRipples().forEach(o=>{let e=o.state===_i.VISIBLE||o.config.terminateOnPointerUp&&o.state===_i.FADING_IN;!o.config.persistent&&e&&o.fadeOut()}))}_getActiveRipples(){return Array.from(this._activeRipples.keys())}_removeTriggerEvents(){let o=this._triggerElement;o&&(uh.forEach(e=>i._eventManager.removeHandler(e,o,this)),this._pointerUpEventsRegistered&&(hh.forEach(e=>o.removeEventListener(e,this,mh)),this._pointerUpEventsRegistered=!1))}};function hv(i,o,e){let t=Math.max(Math.abs(i-e.left),Math.abs(i-e.right)),n=Math.max(Math.abs(o-e.top),Math.abs(o-e.bottom));return Math.sqrt(t*t+n*n)}var lo=new k("mat-ripple-global-options"),$o=(()=>{class i{_elementRef=m(B);_animationsDisabled=ye();color;unbounded=!1;centered=!1;radius=0;animation;get disabled(){return this._disabled}set disabled(e){e&&this.fadeOutAllNonPersistent(),this._disabled=e,this._setupTriggerEventsIfEnabled()}_disabled=!1;get trigger(){return this._trigger||this._elementRef.nativeElement}set trigger(e){this._trigger=e,this._setupTriggerEventsIfEnabled()}_trigger;_rippleRenderer;_globalOptions;_isInitialized=!1;constructor(){let e=m($),t=m(fe),n=m(lo,{optional:!0}),a=m(Z);this._globalOptions=n||{},this._rippleRenderer=new so(this,e,this._elementRef,t,a)}ngOnInit(){this._isInitialized=!0,this._setupTriggerEventsIfEnabled()}ngOnDestroy(){this._rippleRenderer._removeTriggerEvents()}fadeOutAll(){this._rippleRenderer.fadeOutAll()}fadeOutAllNonPersistent(){this._rippleRenderer.fadeOutAllNonPersistent()}get rippleConfig(){return{centered:this.centered,radius:this.radius,color:this.color,animation:V(V(V({},this._globalOptions.animation),this._animationsDisabled?{enterDuration:0,exitDuration:0}:{}),this.animation),terminateOnPointerUp:this._globalOptions.terminateOnPointerUp}}get rippleDisabled(){return this.disabled||!!this._globalOptions.disabled}_setupTriggerEventsIfEnabled(){!this.disabled&&this._isInitialized&&this._rippleRenderer.setupTriggerEvents(this.trigger)}launch(e,t=0,n){return typeof e=="number"?this._rippleRenderer.fadeInRipple(e,t,V(V({},this.rippleConfig),n)):this._rippleRenderer.fadeInRipple(0,0,V(V({},this.rippleConfig),e))}static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,selectors:[["","mat-ripple",""],["","matRipple",""]],hostAttrs:[1,"mat-ripple"],hostVars:2,hostBindings:function(t,n){t&2&&p("mat-ripple-unbounded",n.unbounded)},inputs:{color:[0,"matRippleColor","color"],unbounded:[0,"matRippleUnbounded","unbounded"],centered:[0,"matRippleCentered","centered"],radius:[0,"matRippleRadius","radius"],animation:[0,"matRippleAnimation","animation"],disabled:[0,"matRippleDisabled","disabled"],trigger:[0,"matRippleTrigger","trigger"]},exportAs:["matRipple"]})}return i})();var pv={capture:!0},fv=["focus","mousedown","mouseenter","touchstart"],bc="mat-ripple-loader-uninitialized",yc="mat-ripple-loader-class-name",ph="mat-ripple-loader-centered",vs="mat-ripple-loader-disabled",bs=(()=>{class i{_document=m(K);_animationsDisabled=ye();_globalRippleOptions=m(lo,{optional:!0});_platform=m(fe);_ngZone=m($);_injector=m(Z);_eventCleanups;_hosts=new Map;constructor(){let e=m(ct).createRenderer(null,null);this._eventCleanups=this._ngZone.runOutsideAngular(()=>fv.map(t=>e.listen(this._document,t,this._onInteraction,pv)))}ngOnDestroy(){let e=this._hosts.keys();for(let t of e)this.destroyRipple(t);this._eventCleanups.forEach(t=>t())}configureRipple(e,t){e.setAttribute(bc,this._globalRippleOptions?.namespace??""),(t.className||!e.hasAttribute(yc))&&e.setAttribute(yc,t.className||""),t.centered&&e.setAttribute(ph,""),t.disabled&&e.setAttribute(vs,"")}setDisabled(e,t){let n=this._hosts.get(e);n?(n.target.rippleDisabled=t,!t&&!n.hasSetUpEvents&&(n.hasSetUpEvents=!0,n.renderer.setupTriggerEvents(e))):t?e.setAttribute(vs,""):e.removeAttribute(vs)}_onInteraction=e=>{let t=mt(e);if(t instanceof HTMLElement){let n=t.closest(`[${bc}="${this._globalRippleOptions?.namespace??""}"]`);n&&this._createRipple(n)}};_createRipple(e){if(!this._document||this._hosts.has(e))return;e.querySelector(".mat-ripple")?.remove();let t=this._document.createElement("span");t.classList.add("mat-ripple",e.getAttribute(yc)),e.append(t);let n=this._globalRippleOptions,a=this._animationsDisabled?0:n?.animation?.enterDuration??$a.enterDuration,r=this._animationsDisabled?0:n?.animation?.exitDuration??$a.exitDuration,u={rippleDisabled:this._animationsDisabled||n?.disabled||e.hasAttribute(vs),rippleConfig:{centered:e.hasAttribute(ph),terminateOnPointerUp:n?.terminateOnPointerUp,animation:{enterDuration:a,exitDuration:r}}},h=new so(u,this._ngZone,t,this._platform,this._injector),f=!u.rippleDisabled;f&&h.setupTriggerEvents(e),this._hosts.set(e,{target:u,renderer:h,hasSetUpEvents:f}),e.removeAttribute(bc)}destroyRipple(e){let t=this._hosts.get(e);t&&(t.renderer._removeTriggerEvents(),this._hosts.delete(e))}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();var $t=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275cmp=R({type:i,selectors:[["structural-styles"]],decls:0,vars:0,template:function(t,n){},styles:[`.mat-focus-indicator {
1448
+ `],encapsulation:2})}return i})(),so=class i{_target;_ngZone;_platform;_containerElement;_triggerElement=null;_isPointerDown=!1;_activeRipples=new Map;_mostRecentTransientRipple=null;_lastTouchStartEvent;_pointerUpEventsRegistered=!1;_containerRect=null;static _eventManager=new vc;constructor(o,e,t,n,a){this._target=o,this._ngZone=e,this._platform=n,n.isBrowser&&(this._containerElement=Ut(t)),a&&a.get(Be).load(hv)}fadeInRipple(o,e,t={}){let n=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),a=V(V({},$a),t.animation);t.centered&&(o=n.left+n.width/2,e=n.top+n.height/2);let r=t.radius||pv(o,e,n),u=o-n.left,h=e-n.top,f=a.enterDuration,b=document.createElement("div");b.classList.add("mat-ripple-element"),b.style.left=`${u-r}px`,b.style.top=`${h-r}px`,b.style.height=`${r*2}px`,b.style.width=`${r*2}px`,t.color!=null&&(b.style.backgroundColor=t.color),b.style.transitionDuration=`${f}ms`,this._containerElement.appendChild(b);let M=window.getComputedStyle(b),j=M.transitionProperty,G=M.transitionDuration,de=j==="none"||G==="0s"||G==="0s, 0s"||n.width===0&&n.height===0,Ce=new _c(this,b,t,de);b.style.transform="scale3d(1, 1, 1)",Ce.state=_i.FADING_IN,t.persistent||(this._mostRecentTransientRipple=Ce);let pe=null;return!de&&(f||a.exitDuration)&&this._ngZone.runOutsideAngular(()=>{let Oe=()=>{pe&&(pe.fallbackTimer=null),clearTimeout(Ci),this._finishRippleTransition(Ce)},ht=()=>this._destroyRipple(Ce),Ci=setTimeout(ht,f+100);b.addEventListener("transitionend",Oe),b.addEventListener("transitioncancel",ht),pe={onTransitionEnd:Oe,onTransitionCancel:ht,fallbackTimer:Ci}}),this._activeRipples.set(Ce,pe),(de||!f)&&this._finishRippleTransition(Ce),Ce}fadeOutRipple(o){if(o.state===_i.FADING_OUT||o.state===_i.HIDDEN)return;let e=o.element,t=V(V({},$a),o.config.animation);e.style.transitionDuration=`${t.exitDuration}ms`,e.style.opacity="0",o.state=_i.FADING_OUT,(o._animationForciblyDisabledThroughCss||!t.exitDuration)&&this._finishRippleTransition(o)}fadeOutAll(){this._getActiveRipples().forEach(o=>o.fadeOut())}fadeOutAllNonPersistent(){this._getActiveRipples().forEach(o=>{o.config.persistent||o.fadeOut()})}setupTriggerEvents(o){let e=Ut(o);!this._platform.isBrowser||!e||e===this._triggerElement||(this._removeTriggerEvents(),this._triggerElement=e,uh.forEach(t=>{i._eventManager.addHandler(this._ngZone,t,e,this)}))}handleEvent(o){o.type==="mousedown"?this._onMousedown(o):o.type==="touchstart"?this._onTouchStart(o):this._onPointerUp(),this._pointerUpEventsRegistered||(this._ngZone.runOutsideAngular(()=>{hh.forEach(e=>{this._triggerElement.addEventListener(e,this,mh)})}),this._pointerUpEventsRegistered=!0)}_finishRippleTransition(o){o.state===_i.FADING_IN?this._startFadeOutTransition(o):o.state===_i.FADING_OUT&&this._destroyRipple(o)}_startFadeOutTransition(o){let e=o===this._mostRecentTransientRipple,{persistent:t}=o.config;o.state=_i.VISIBLE,!t&&(!e||!this._isPointerDown)&&o.fadeOut()}_destroyRipple(o){let e=this._activeRipples.get(o)??null;this._activeRipples.delete(o),this._activeRipples.size||(this._containerRect=null),o===this._mostRecentTransientRipple&&(this._mostRecentTransientRipple=null),o.state=_i.HIDDEN,e!==null&&(o.element.removeEventListener("transitionend",e.onTransitionEnd),o.element.removeEventListener("transitioncancel",e.onTransitionCancel),e.fallbackTimer!==null&&clearTimeout(e.fallbackTimer)),o.element.remove()}_onMousedown(o){let e=Qn(o),t=this._lastTouchStartEvent&&Date.now()<this._lastTouchStartEvent+uv;!this._target.rippleDisabled&&!e&&!t&&(this._isPointerDown=!0,this.fadeInRipple(o.clientX,o.clientY,this._target.rippleConfig))}_onTouchStart(o){if(!this._target.rippleDisabled&&!Jn(o)){this._lastTouchStartEvent=Date.now(),this._isPointerDown=!0;let e=o.changedTouches;if(e)for(let t=0;t<e.length;t++)this.fadeInRipple(e[t].clientX,e[t].clientY,this._target.rippleConfig)}}_onPointerUp(){this._isPointerDown&&(this._isPointerDown=!1,this._getActiveRipples().forEach(o=>{let e=o.state===_i.VISIBLE||o.config.terminateOnPointerUp&&o.state===_i.FADING_IN;!o.config.persistent&&e&&o.fadeOut()}))}_getActiveRipples(){return Array.from(this._activeRipples.keys())}_removeTriggerEvents(){let o=this._triggerElement;o&&(uh.forEach(e=>i._eventManager.removeHandler(e,o,this)),this._pointerUpEventsRegistered&&(hh.forEach(e=>o.removeEventListener(e,this,mh)),this._pointerUpEventsRegistered=!1))}};function pv(i,o,e){let t=Math.max(Math.abs(i-e.left),Math.abs(i-e.right)),n=Math.max(Math.abs(o-e.top),Math.abs(o-e.bottom));return Math.sqrt(t*t+n*n)}var lo=new k("mat-ripple-global-options"),$o=(()=>{class i{_elementRef=m(B);_animationsDisabled=ye();color;unbounded=!1;centered=!1;radius=0;animation;get disabled(){return this._disabled}set disabled(e){e&&this.fadeOutAllNonPersistent(),this._disabled=e,this._setupTriggerEventsIfEnabled()}_disabled=!1;get trigger(){return this._trigger||this._elementRef.nativeElement}set trigger(e){this._trigger=e,this._setupTriggerEventsIfEnabled()}_trigger;_rippleRenderer;_globalOptions;_isInitialized=!1;constructor(){let e=m($),t=m(fe),n=m(lo,{optional:!0}),a=m(Z);this._globalOptions=n||{},this._rippleRenderer=new so(this,e,this._elementRef,t,a)}ngOnInit(){this._isInitialized=!0,this._setupTriggerEventsIfEnabled()}ngOnDestroy(){this._rippleRenderer._removeTriggerEvents()}fadeOutAll(){this._rippleRenderer.fadeOutAll()}fadeOutAllNonPersistent(){this._rippleRenderer.fadeOutAllNonPersistent()}get rippleConfig(){return{centered:this.centered,radius:this.radius,color:this.color,animation:V(V(V({},this._globalOptions.animation),this._animationsDisabled?{enterDuration:0,exitDuration:0}:{}),this.animation),terminateOnPointerUp:this._globalOptions.terminateOnPointerUp}}get rippleDisabled(){return this.disabled||!!this._globalOptions.disabled}_setupTriggerEventsIfEnabled(){!this.disabled&&this._isInitialized&&this._rippleRenderer.setupTriggerEvents(this.trigger)}launch(e,t=0,n){return typeof e=="number"?this._rippleRenderer.fadeInRipple(e,t,V(V({},this.rippleConfig),n)):this._rippleRenderer.fadeInRipple(0,0,V(V({},this.rippleConfig),e))}static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,selectors:[["","mat-ripple",""],["","matRipple",""]],hostAttrs:[1,"mat-ripple"],hostVars:2,hostBindings:function(t,n){t&2&&p("mat-ripple-unbounded",n.unbounded)},inputs:{color:[0,"matRippleColor","color"],unbounded:[0,"matRippleUnbounded","unbounded"],centered:[0,"matRippleCentered","centered"],radius:[0,"matRippleRadius","radius"],animation:[0,"matRippleAnimation","animation"],disabled:[0,"matRippleDisabled","disabled"],trigger:[0,"matRippleTrigger","trigger"]},exportAs:["matRipple"]})}return i})();var fv={capture:!0},gv=["focus","mousedown","mouseenter","touchstart"],bc="mat-ripple-loader-uninitialized",yc="mat-ripple-loader-class-name",ph="mat-ripple-loader-centered",vs="mat-ripple-loader-disabled",bs=(()=>{class i{_document=m(K);_animationsDisabled=ye();_globalRippleOptions=m(lo,{optional:!0});_platform=m(fe);_ngZone=m($);_injector=m(Z);_eventCleanups;_hosts=new Map;constructor(){let e=m(ct).createRenderer(null,null);this._eventCleanups=this._ngZone.runOutsideAngular(()=>gv.map(t=>e.listen(this._document,t,this._onInteraction,fv)))}ngOnDestroy(){let e=this._hosts.keys();for(let t of e)this.destroyRipple(t);this._eventCleanups.forEach(t=>t())}configureRipple(e,t){e.setAttribute(bc,this._globalRippleOptions?.namespace??""),(t.className||!e.hasAttribute(yc))&&e.setAttribute(yc,t.className||""),t.centered&&e.setAttribute(ph,""),t.disabled&&e.setAttribute(vs,"")}setDisabled(e,t){let n=this._hosts.get(e);n?(n.target.rippleDisabled=t,!t&&!n.hasSetUpEvents&&(n.hasSetUpEvents=!0,n.renderer.setupTriggerEvents(e))):t?e.setAttribute(vs,""):e.removeAttribute(vs)}_onInteraction=e=>{let t=mt(e);if(t instanceof HTMLElement){let n=t.closest(`[${bc}="${this._globalRippleOptions?.namespace??""}"]`);n&&this._createRipple(n)}};_createRipple(e){if(!this._document||this._hosts.has(e))return;e.querySelector(".mat-ripple")?.remove();let t=this._document.createElement("span");t.classList.add("mat-ripple",e.getAttribute(yc)),e.append(t);let n=this._globalRippleOptions,a=this._animationsDisabled?0:n?.animation?.enterDuration??$a.enterDuration,r=this._animationsDisabled?0:n?.animation?.exitDuration??$a.exitDuration,u={rippleDisabled:this._animationsDisabled||n?.disabled||e.hasAttribute(vs),rippleConfig:{centered:e.hasAttribute(ph),terminateOnPointerUp:n?.terminateOnPointerUp,animation:{enterDuration:a,exitDuration:r}}},h=new so(u,this._ngZone,t,this._platform,this._injector),f=!u.rippleDisabled;f&&h.setupTriggerEvents(e),this._hosts.set(e,{target:u,renderer:h,hasSetUpEvents:f}),e.removeAttribute(bc)}destroyRipple(e){let t=this._hosts.get(e);t&&(t.renderer._removeTriggerEvents(),this._hosts.delete(e))}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();var Gt=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275cmp=R({type:i,selectors:[["structural-styles"]],decls:0,vars:0,template:function(t,n){},styles:[`.mat-focus-indicator {
1449
1449
  position: relative;
1450
1450
  }
1451
1451
  .mat-focus-indicator::before {
@@ -1471,7 +1471,7 @@ select.mat-mdc-form-field-input-control:not(.mat-mdc-native-select-inline) optio
1471
1471
  --mat-focus-indicator-display: block;
1472
1472
  }
1473
1473
  }
1474
- `],encapsulation:2})}return i})();var gv=["*",[["","progressIndicator",""]]],_v=["*","[progressIndicator]"];function vv(i,o){i&1&&(Ne(0,"div",1),W(1,1),qe())}var bv=new k("MAT_BUTTON_CONFIG");function fh(i){return i==null?void 0:jt(i)}var Cc=(()=>{class i{_elementRef=m(B);_ngZone=m($);_animationsDisabled=ye();_config=m(bv,{optional:!0});_focusMonitor=m(Xt);_cleanupClick;_renderer=m(we);_rippleLoader=m(bs);_isAnchor;_isFab=!1;color;get disableRipple(){return this._disableRipple}set disableRipple(e){this._disableRipple=e,this._updateRippleDisabled()}_disableRipple=!1;get disabled(){return this._disabled}set disabled(e){this._disabled=e,this._updateRippleDisabled()}_disabled=!1;ariaDisabled;disabledInteractive;tabIndex;set _tabindex(e){this.tabIndex=e}showProgress=ko(!1,{transform:z});constructor(){m(Be).load($t);let e=this._elementRef.nativeElement;this._isAnchor=e.tagName==="A",this.disabledInteractive=this._config?.disabledInteractive??!1,this.color=this._config?.color??null,this._rippleLoader?.configureRipple(e,{className:"mat-mdc-button-ripple"})}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0),this._isAnchor&&this._setupAsAnchor()}ngOnDestroy(){this._cleanupClick?.(),this._focusMonitor.stopMonitoring(this._elementRef),this._rippleLoader?.destroyRipple(this._elementRef.nativeElement)}focus(e="program",t){e?this._focusMonitor.focusVia(this._elementRef.nativeElement,e,t):this._elementRef.nativeElement.focus(t)}_getAriaDisabled(){return this.ariaDisabled!=null?this.ariaDisabled:this._isAnchor?this.disabled||null:this.disabled&&this.disabledInteractive?!0:null}_getDisabledAttribute(){return this.disabledInteractive||!this.disabled?null:!0}_updateRippleDisabled(){this._rippleLoader?.setDisabled(this._elementRef.nativeElement,this.disableRipple||this.disabled)}_getTabIndex(){return this._isAnchor?this.disabled&&!this.disabledInteractive?-1:this.tabIndex:this.tabIndex}_setupAsAnchor(){this._cleanupClick=this._ngZone.runOutsideAngular(()=>this._renderer.listen(this._elementRef.nativeElement,"click",e=>{this.disabled&&(e.preventDefault(),e.stopImmediatePropagation())}))}static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,hostAttrs:[1,"mat-mdc-button-base"],hostVars:15,hostBindings:function(t,n){t&2&&(J("disabled",n._getDisabledAttribute())("aria-disabled",n._getAriaDisabled())("tabindex",n._getTabIndex()),at(n.color?"mat-"+n.color:""),p("mat-mdc-button-progress-indicator-shown",n.showProgress())("mat-mdc-button-disabled",n.disabled)("mat-mdc-button-disabled-interactive",n.disabledInteractive)("mat-unthemed",!n.color)("_mat-animation-noopable",n._animationsDisabled))},inputs:{color:"color",disableRipple:[2,"disableRipple","disableRipple",z],disabled:[2,"disabled","disabled",z],ariaDisabled:[2,"aria-disabled","ariaDisabled",z],disabledInteractive:[2,"disabledInteractive","disabledInteractive",z],tabIndex:[2,"tabIndex","tabIndex",fh],_tabindex:[2,"tabindex","_tabindex",fh],showProgress:[1,"showProgress"]}})}return i})(),Ai=(()=>{class i extends Cc{constructor(){super(),this._rippleLoader.configureRipple(this._elementRef.nativeElement,{centered:!0})}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=R({type:i,selectors:[["button","mat-icon-button",""],["a","mat-icon-button",""],["button","matIconButton",""],["a","matIconButton",""]],hostAttrs:[1,"mdc-icon-button","mat-mdc-icon-button"],exportAs:["matButton","matAnchor"],features:[ie],ngContentSelectors:_v,decls:5,vars:1,consts:[[1,"mat-mdc-button-persistent-ripple","mdc-icon-button__ripple"],[1,"mat-mdc-button-progress-indicator-container"],[1,"mat-focus-indicator"],[1,"mat-mdc-button-touch-target"]],template:function(t,n){t&1&&(ve(gv),kt(0,"span",0),W(1),w(2,vv,2,0,"div",1),kt(3,"span",2)(4,"span",3)),t&2&&(c(2),D(n.showProgress()?2:-1))},styles:[`.mat-mdc-icon-button {
1474
+ `],encapsulation:2})}return i})();var _v=["*",[["","progressIndicator",""]]],vv=["*","[progressIndicator]"];function bv(i,o){i&1&&(Ne(0,"div",1),W(1,1),qe())}var yv=new k("MAT_BUTTON_CONFIG");function fh(i){return i==null?void 0:jt(i)}var Cc=(()=>{class i{_elementRef=m(B);_ngZone=m($);_animationsDisabled=ye();_config=m(yv,{optional:!0});_focusMonitor=m(Yt);_cleanupClick;_renderer=m(we);_rippleLoader=m(bs);_isAnchor;_isFab=!1;color;get disableRipple(){return this._disableRipple}set disableRipple(e){this._disableRipple=e,this._updateRippleDisabled()}_disableRipple=!1;get disabled(){return this._disabled}set disabled(e){this._disabled=e,this._updateRippleDisabled()}_disabled=!1;ariaDisabled;disabledInteractive;tabIndex;set _tabindex(e){this.tabIndex=e}showProgress=ko(!1,{transform:z});constructor(){m(Be).load(Gt);let e=this._elementRef.nativeElement;this._isAnchor=e.tagName==="A",this.disabledInteractive=this._config?.disabledInteractive??!1,this.color=this._config?.color??null,this._rippleLoader?.configureRipple(e,{className:"mat-mdc-button-ripple"})}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0),this._isAnchor&&this._setupAsAnchor()}ngOnDestroy(){this._cleanupClick?.(),this._focusMonitor.stopMonitoring(this._elementRef),this._rippleLoader?.destroyRipple(this._elementRef.nativeElement)}focus(e="program",t){e?this._focusMonitor.focusVia(this._elementRef.nativeElement,e,t):this._elementRef.nativeElement.focus(t)}_getAriaDisabled(){return this.ariaDisabled!=null?this.ariaDisabled:this._isAnchor?this.disabled||null:this.disabled&&this.disabledInteractive?!0:null}_getDisabledAttribute(){return this.disabledInteractive||!this.disabled?null:!0}_updateRippleDisabled(){this._rippleLoader?.setDisabled(this._elementRef.nativeElement,this.disableRipple||this.disabled)}_getTabIndex(){return this._isAnchor?this.disabled&&!this.disabledInteractive?-1:this.tabIndex:this.tabIndex}_setupAsAnchor(){this._cleanupClick=this._ngZone.runOutsideAngular(()=>this._renderer.listen(this._elementRef.nativeElement,"click",e=>{this.disabled&&(e.preventDefault(),e.stopImmediatePropagation())}))}static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,hostAttrs:[1,"mat-mdc-button-base"],hostVars:15,hostBindings:function(t,n){t&2&&(J("disabled",n._getDisabledAttribute())("aria-disabled",n._getAriaDisabled())("tabindex",n._getTabIndex()),at(n.color?"mat-"+n.color:""),p("mat-mdc-button-progress-indicator-shown",n.showProgress())("mat-mdc-button-disabled",n.disabled)("mat-mdc-button-disabled-interactive",n.disabledInteractive)("mat-unthemed",!n.color)("_mat-animation-noopable",n._animationsDisabled))},inputs:{color:"color",disableRipple:[2,"disableRipple","disableRipple",z],disabled:[2,"disabled","disabled",z],ariaDisabled:[2,"aria-disabled","ariaDisabled",z],disabledInteractive:[2,"disabledInteractive","disabledInteractive",z],tabIndex:[2,"tabIndex","tabIndex",fh],_tabindex:[2,"tabindex","_tabindex",fh],showProgress:[1,"showProgress"]}})}return i})(),Ai=(()=>{class i extends Cc{constructor(){super(),this._rippleLoader.configureRipple(this._elementRef.nativeElement,{centered:!0})}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=R({type:i,selectors:[["button","mat-icon-button",""],["a","mat-icon-button",""],["button","matIconButton",""],["a","matIconButton",""]],hostAttrs:[1,"mdc-icon-button","mat-mdc-icon-button"],exportAs:["matButton","matAnchor"],features:[ie],ngContentSelectors:vv,decls:5,vars:1,consts:[[1,"mat-mdc-button-persistent-ripple","mdc-icon-button__ripple"],[1,"mat-mdc-button-progress-indicator-container"],[1,"mat-focus-indicator"],[1,"mat-mdc-button-touch-target"]],template:function(t,n){t&1&&(ve(_v),kt(0,"span",0),W(1),w(2,bv,2,0,"div",1),kt(3,"span",2)(4,"span",3)),t&2&&(c(2),D(n.showProgress()?2:-1))},styles:[`.mat-mdc-icon-button {
1475
1475
  -webkit-user-select: none;
1476
1476
  user-select: none;
1477
1477
  display: inline-block;
@@ -1619,7 +1619,7 @@ select.mat-mdc-form-field-input-control:not(.mat-mdc-native-select-inline) optio
1619
1619
  outline: solid 1px;
1620
1620
  }
1621
1621
  }
1622
- `],encapsulation:2})}return i})();var Ki=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=U({type:i});static \u0275inj=H({imports:[ce]})}return i})();var yv=[[["",8,"material-icons",3,"iconPositionEnd",""],["mat-icon",3,"iconPositionEnd",""],["","matButtonIcon","",3,"iconPositionEnd",""]],"*",[["","iconPositionEnd","",8,"material-icons"],["mat-icon","iconPositionEnd",""],["","matButtonIcon","","iconPositionEnd",""]],[["","progressIndicator",""]]],Cv=[".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])","*",".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]","[progressIndicator]"];function xv(i,o){i&1&&(Ne(0,"div",2),W(1,3),qe())}var gh=new Map([["text",["mat-mdc-button"]],["filled",["mdc-button--unelevated","mat-mdc-unelevated-button"]],["elevated",["mdc-button--raised","mat-mdc-raised-button"]],["outlined",["mdc-button--outlined","mat-mdc-outlined-button"]],["tonal",["mat-tonal-button"]]]),Ue=(()=>{class i extends Cc{get appearance(){return this._appearance}set appearance(e){this.setAppearance(e||this._config?.defaultAppearance||"text")}_appearance=null;constructor(){super();let e=wv(this._elementRef.nativeElement);e&&this.setAppearance(e)}setAppearance(e){if(e===this._appearance)return;let t=this._elementRef.nativeElement.classList,n=this._appearance?gh.get(this._appearance):null,a=gh.get(e);n&&t.remove(...n),t.add(...a),this._appearance=e}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=R({type:i,selectors:[["button","matButton",""],["a","matButton",""],["button","mat-button",""],["button","mat-raised-button",""],["button","mat-flat-button",""],["button","mat-stroked-button",""],["a","mat-button",""],["a","mat-raised-button",""],["a","mat-flat-button",""],["a","mat-stroked-button",""]],hostAttrs:[1,"mdc-button"],inputs:{appearance:[0,"matButton","appearance"]},exportAs:["matButton","matAnchor"],features:[ie],ngContentSelectors:Cv,decls:8,vars:5,consts:[[1,"mat-mdc-button-persistent-ripple"],[1,"mdc-button__label"],[1,"mat-mdc-button-progress-indicator-container"],[1,"mat-focus-indicator"],[1,"mat-mdc-button-touch-target"]],template:function(t,n){t&1&&(ve(yv),kt(0,"span",0),W(1),Ne(2,"span",1),W(3,1),qe(),W(4,2),w(5,xv,2,0,"div",2),kt(6,"span",3)(7,"span",4)),t&2&&(p("mdc-button__ripple",!n._isFab)("mdc-fab__ripple",n._isFab),c(5),D(n.showProgress()?5:-1))},styles:[`.mat-mdc-button-base {
1622
+ `],encapsulation:2})}return i})();var Ki=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=U({type:i});static \u0275inj=H({imports:[ce]})}return i})();var Cv=[[["",8,"material-icons",3,"iconPositionEnd",""],["mat-icon",3,"iconPositionEnd",""],["","matButtonIcon","",3,"iconPositionEnd",""]],"*",[["","iconPositionEnd","",8,"material-icons"],["mat-icon","iconPositionEnd",""],["","matButtonIcon","","iconPositionEnd",""]],[["","progressIndicator",""]]],xv=[".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])","*",".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]","[progressIndicator]"];function wv(i,o){i&1&&(Ne(0,"div",2),W(1,3),qe())}var gh=new Map([["text",["mat-mdc-button"]],["filled",["mdc-button--unelevated","mat-mdc-unelevated-button"]],["elevated",["mdc-button--raised","mat-mdc-raised-button"]],["outlined",["mdc-button--outlined","mat-mdc-outlined-button"]],["tonal",["mat-tonal-button"]]]),Ue=(()=>{class i extends Cc{get appearance(){return this._appearance}set appearance(e){this.setAppearance(e||this._config?.defaultAppearance||"text")}_appearance=null;constructor(){super();let e=Dv(this._elementRef.nativeElement);e&&this.setAppearance(e)}setAppearance(e){if(e===this._appearance)return;let t=this._elementRef.nativeElement.classList,n=this._appearance?gh.get(this._appearance):null,a=gh.get(e);n&&t.remove(...n),t.add(...a),this._appearance=e}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=R({type:i,selectors:[["button","matButton",""],["a","matButton",""],["button","mat-button",""],["button","mat-raised-button",""],["button","mat-flat-button",""],["button","mat-stroked-button",""],["a","mat-button",""],["a","mat-raised-button",""],["a","mat-flat-button",""],["a","mat-stroked-button",""]],hostAttrs:[1,"mdc-button"],inputs:{appearance:[0,"matButton","appearance"]},exportAs:["matButton","matAnchor"],features:[ie],ngContentSelectors:xv,decls:8,vars:5,consts:[[1,"mat-mdc-button-persistent-ripple"],[1,"mdc-button__label"],[1,"mat-mdc-button-progress-indicator-container"],[1,"mat-focus-indicator"],[1,"mat-mdc-button-touch-target"]],template:function(t,n){t&1&&(ve(Cv),kt(0,"span",0),W(1),Ne(2,"span",1),W(3,1),qe(),W(4,2),w(5,wv,2,0,"div",2),kt(6,"span",3)(7,"span",4)),t&2&&(p("mdc-button__ripple",!n._isFab)("mdc-fab__ripple",n._isFab),c(5),D(n.showProgress()?5:-1))},styles:[`.mat-mdc-button-base {
1623
1623
  text-decoration: none;
1624
1624
  }
1625
1625
  .mat-mdc-button-base .mat-icon {
@@ -2184,7 +2184,7 @@ select.mat-mdc-form-field-input-control:not(.mat-mdc-native-select-inline) optio
2184
2184
  outline: solid 1px;
2185
2185
  }
2186
2186
  }
2187
- `],encapsulation:2})}return i})();function wv(i){return i.hasAttribute("mat-raised-button")?"elevated":i.hasAttribute("mat-stroked-button")?"outlined":i.hasAttribute("mat-flat-button")?"filled":i.hasAttribute("mat-button")?"text":null}var ze=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=U({type:i});static \u0275inj=H({imports:[Ki,ce]})}return i})();function _h(i){return Error(`Unable to find icon with the name "${i}"`)}function Dv(){return Error("Could not find HttpClient for use with Angular Material icons. Please add provideHttpClient() to your providers.")}function vh(i){return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was "${i}".`)}function bh(i){return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by Angular's DomSanitizer. Attempted literal was "${i}".`)}var dn=class{url;svgText;options;svgElement=null;constructor(o,e,t){this.url=o,this.svgText=e,this.options=t}},Ch=(()=>{class i{_httpClient;_sanitizer;_errorHandler;_document;_svgIconConfigs=new Map;_iconSetConfigs=new Map;_cachedIconsByUrl=new Map;_inProgressUrlFetches=new Map;_fontCssClassesByAlias=new Map;_resolvers=[];_defaultFontSetClass=["material-icons","mat-ligature-font"];constructor(e,t,n,a){this._httpClient=e,this._sanitizer=t,this._errorHandler=a,this._document=n}addSvgIcon(e,t,n){return this.addSvgIconInNamespace("",e,t,n)}addSvgIconLiteral(e,t,n){return this.addSvgIconLiteralInNamespace("",e,t,n)}addSvgIconInNamespace(e,t,n,a){return this._addSvgIconConfig(e,t,new dn(n,null,a))}addSvgIconResolver(e){return this._resolvers.push(e),this}addSvgIconLiteralInNamespace(e,t,n,a){let r=this._sanitizer.sanitize(zt.HTML,n);if(!r)throw bh(n);let u=eo(r);return this._addSvgIconConfig(e,t,new dn("",u,a))}addSvgIconSet(e,t){return this.addSvgIconSetInNamespace("",e,t)}addSvgIconSetLiteral(e,t){return this.addSvgIconSetLiteralInNamespace("",e,t)}addSvgIconSetInNamespace(e,t,n){return this._addSvgIconSetConfig(e,new dn(t,null,n))}addSvgIconSetLiteralInNamespace(e,t,n){let a=this._sanitizer.sanitize(zt.HTML,t);if(!a)throw bh(t);let r=eo(a);return this._addSvgIconSetConfig(e,new dn("",r,n))}registerFontClassAlias(e,t=e){return this._fontCssClassesByAlias.set(e,t),this}classNameForFontAlias(e){return this._fontCssClassesByAlias.get(e)||e}setDefaultFontSetClass(...e){return this._defaultFontSetClass=e,this}getDefaultFontSetClass(){return this._defaultFontSetClass}getSvgIconFromUrl(e){let t=this._sanitizer.sanitize(zt.RESOURCE_URL,e);if(!t)throw vh(e);let n=this._cachedIconsByUrl.get(t);return n?ge(ys(n)):this._loadSvgIconFromConfig(new dn(e,null)).pipe(wi(a=>this._cachedIconsByUrl.set(t,a)),Ve(a=>ys(a)))}getNamedSvgIcon(e,t=""){let n=yh(t,e),a=this._svgIconConfigs.get(n);if(a)return this._getSvgFromConfig(a);if(a=this._getIconConfigFromResolvers(t,e),a)return this._svgIconConfigs.set(n,a),this._getSvgFromConfig(a);let r=this._iconSetConfigs.get(t);return r?this._getSvgFromIconSetConfigs(e,r):ur(_h(n))}ngOnDestroy(){this._resolvers=[],this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear()}_getSvgFromConfig(e){return e.svgText?ge(ys(this._svgElementFromConfig(e))):this._loadSvgIconFromConfig(e).pipe(Ve(t=>ys(t)))}_getSvgFromIconSetConfigs(e,t){let n=this._extractIconWithNameFromAnySet(e,t);if(n)return ge(n);let a=t.filter(r=>!r.svgText).map(r=>this._loadSvgIconSetFromConfig(r).pipe(Et(u=>{let f=`Loading icon set URL: ${this._sanitizer.sanitize(zt.RESOURCE_URL,r.url)} failed: ${u.message}`;return this._errorHandler.handleError(new Error(f)),ge(null)})));return hr(a).pipe(Ve(()=>{let r=this._extractIconWithNameFromAnySet(e,t);if(!r)throw _h(e);return r}))}_extractIconWithNameFromAnySet(e,t){for(let n=t.length-1;n>=0;n--){let a=t[n];if(a.svgText&&a.svgText.toString().indexOf(e)>-1){let r=this._svgElementFromConfig(a),u=this._extractSvgIconFromSet(r,e,a.options);if(u)return u}}return null}_loadSvgIconFromConfig(e){return this._fetchIcon(e).pipe(wi(t=>e.svgText=t),Ve(()=>this._svgElementFromConfig(e)))}_loadSvgIconSetFromConfig(e){return e.svgText?ge(null):this._fetchIcon(e).pipe(wi(t=>e.svgText=t))}_extractSvgIconFromSet(e,t,n){let a=e.querySelector(`[id="${t}"]`);if(!a)return null;let r=a.cloneNode(!0);if(r.removeAttribute("id"),r.nodeName.toLowerCase()==="svg")return this._setSvgAttributes(r,n);if(r.nodeName.toLowerCase()==="symbol")return this._setSvgAttributes(this._toSvgElement(r),n);let u=this._svgElementFromString(eo("<svg></svg>"));return u.appendChild(r),this._setSvgAttributes(u,n)}_svgElementFromString(e){let t=this._document.createElement("DIV");t.innerHTML=e;let n=t.querySelector("svg");if(!n)throw Error("<svg> tag not found");return n}_toSvgElement(e){let t=this._svgElementFromString(eo("<svg></svg>")),n=e.attributes;for(let a=0;a<n.length;a++){let{name:r,value:u}=n[a];r!=="id"&&t.setAttribute(r,u)}for(let a=0;a<e.childNodes.length;a++)e.childNodes[a].nodeType===this._document.ELEMENT_NODE&&t.appendChild(e.childNodes[a].cloneNode(!0));return t}_setSvgAttributes(e,t){return e.setAttribute("fit",""),e.setAttribute("height","100%"),e.setAttribute("width","100%"),e.setAttribute("preserveAspectRatio","xMidYMid meet"),e.setAttribute("focusable","false"),t&&t.viewBox&&e.setAttribute("viewBox",t.viewBox),e}_fetchIcon(e){let{url:t,options:n}=e,a=n?.withCredentials??!1;if(!this._httpClient)throw Dv();if(t==null)throw Error(`Cannot fetch icon from URL "${t}".`);let r=this._sanitizer.sanitize(zt.RESOURCE_URL,t);if(!r)throw vh(t);let u=this._inProgressUrlFetches.get(r);if(u)return u;let h=this._httpClient.get(r,{responseType:"text",withCredentials:a}).pipe(Ve(f=>eo(f)),fr(()=>this._inProgressUrlFetches.delete(r)),ld());return this._inProgressUrlFetches.set(r,h),h}_addSvgIconConfig(e,t,n){return this._svgIconConfigs.set(yh(e,t),n),this}_addSvgIconSetConfig(e,t){let n=this._iconSetConfigs.get(e);return n?n.push(t):this._iconSetConfigs.set(e,[t]),this}_svgElementFromConfig(e){if(!e.svgElement){let t=this._svgElementFromString(e.svgText);this._setSvgAttributes(t,e.options),e.svgElement=t}return e.svgElement}_getIconConfigFromResolvers(e,t){for(let n=0;n<this._resolvers.length;n++){let a=this._resolvers[n](t,e);if(a)return Sv(a)?new dn(a.url,null,a.options):new dn(a,null)}}static \u0275fac=function(t){return new(t||i)(me(It,8),me(Sa),me(K,8),me(Wn))};static \u0275prov=ae({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();function ys(i){return i.cloneNode(!0)}function yh(i,o){return i+":"+o}function Sv(i){return!!(i.url&&i.options)}var kv=["*"],Mv=new k("MAT_ICON_DEFAULT_OPTIONS"),Ev=new k("mat-icon-location",{providedIn:"root",factory:()=>{let i=m(K),o=i?i.location:null;return{getPathname:()=>o?o.pathname+o.search:""}}}),xh=["clip-path","color-profile","src","cursor","fill","filter","marker","marker-start","marker-mid","marker-end","mask","stroke"],Tv=xh.map(i=>`[${i}]`).join(", "),Av=/^url\(['"]?#(.*?)['"]?\)$/,vt=(()=>{class i{_elementRef=m(B);_iconRegistry=m(Ch);_location=m(Ev);_errorHandler=m(Wn);_defaultColor;get color(){return this._color||this._defaultColor}set color(e){this._color=e}_color;inline=!1;get svgIcon(){return this._svgIcon}set svgIcon(e){e!==this._svgIcon&&(e?this._updateSvgIcon(e):this._svgIcon&&this._clearSvgElement(),this._svgIcon=e)}_svgIcon;get fontSet(){return this._fontSet}set fontSet(e){let t=this._cleanupFontValue(e);t!==this._fontSet&&(this._fontSet=t,this._updateFontIconClasses())}_fontSet;get fontIcon(){return this._fontIcon}set fontIcon(e){let t=this._cleanupFontValue(e);t!==this._fontIcon&&(this._fontIcon=t,this._updateFontIconClasses())}_fontIcon;_previousFontSetClass=[];_previousFontIconClass;_svgName=null;_svgNamespace=null;_previousPath;_elementsWithExternalReferences;_currentIconFetch=Te.EMPTY;constructor(){let e=m(new zi("aria-hidden"),{optional:!0}),t=m(Mv,{optional:!0});t&&(t.color&&(this.color=this._defaultColor=t.color),t.fontSet&&(this.fontSet=t.fontSet)),e||this._elementRef.nativeElement.setAttribute("aria-hidden","true")}_splitIconName(e){if(!e)return["",""];let t=e.split(":");switch(t.length){case 1:return["",t[0]];case 2:return t;default:throw Error(`Invalid icon name: "${e}"`)}}ngOnInit(){this._updateFontIconClasses()}ngAfterViewChecked(){let e=this._elementsWithExternalReferences;if(e&&e.size){let t=this._location.getPathname();t!==this._previousPath&&(this._previousPath=t,this._prependPathToReferences(t))}}ngOnDestroy(){this._currentIconFetch.unsubscribe(),this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear()}_usingFontIcon(){return!this.svgIcon}_setSvgElement(e){this._clearSvgElement();let t=this._location.getPathname();this._previousPath=t,this._cacheChildrenWithExternalReferences(e),this._prependPathToReferences(t),this._elementRef.nativeElement.appendChild(e)}_clearSvgElement(){let e=this._elementRef.nativeElement,t=e.childNodes.length;for(this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear();t--;){let n=e.childNodes[t];(n.nodeType!==1||n.nodeName.toLowerCase()==="svg")&&n.remove()}}_updateFontIconClasses(){if(!this._usingFontIcon())return;let e=this._elementRef.nativeElement,t=(this.fontSet?this._iconRegistry.classNameForFontAlias(this.fontSet).split(/ +/):this._iconRegistry.getDefaultFontSetClass()).filter(n=>n.length>0);this._previousFontSetClass.forEach(n=>e.classList.remove(n)),t.forEach(n=>e.classList.add(n)),this._previousFontSetClass=t,this.fontIcon!==this._previousFontIconClass&&!t.includes("mat-ligature-font")&&(this._previousFontIconClass&&e.classList.remove(this._previousFontIconClass),this.fontIcon&&e.classList.add(this.fontIcon),this._previousFontIconClass=this.fontIcon)}_cleanupFontValue(e){return typeof e=="string"?e.trim().split(" ")[0]:e}_prependPathToReferences(e){let t=this._elementsWithExternalReferences;t&&t.forEach((n,a)=>{n.forEach(r=>{a.setAttribute(r.name,`url('${e}#${r.value}')`)})})}_cacheChildrenWithExternalReferences(e){let t=e.querySelectorAll(Tv),n=this._elementsWithExternalReferences=this._elementsWithExternalReferences||new Map;for(let a=0;a<t.length;a++)xh.forEach(r=>{let u=t[a],h=u.getAttribute(r),f=h?h.match(Av):null;if(f){let b=n.get(u);b||(b=[],n.set(u,b)),b.push({name:r,value:f[1]})}})}_updateSvgIcon(e){if(this._svgNamespace=null,this._svgName=null,this._currentIconFetch.unsubscribe(),e){let[t,n]=this._splitIconName(e);t&&(this._svgNamespace=t),n&&(this._svgName=n),this._currentIconFetch=this._iconRegistry.getNamedSvgIcon(n,t).pipe(pt(1)).subscribe(a=>this._setSvgElement(a),a=>{let r=`Error retrieving icon ${t}:${n}! ${a.message}`;this._errorHandler.handleError(new Error(r))})}}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=R({type:i,selectors:[["mat-icon"]],hostAttrs:["role","img",1,"mat-icon","notranslate"],hostVars:10,hostBindings:function(t,n){t&2&&(J("data-mat-icon-type",n._usingFontIcon()?"font":"svg")("data-mat-icon-name",n._svgName||n.fontIcon)("data-mat-icon-namespace",n._svgNamespace||n.fontSet)("fontIcon",n._usingFontIcon()?n.fontIcon:null),at(n.color?"mat-"+n.color:""),p("mat-icon-inline",n.inline)("mat-icon-no-color",n.color!=="primary"&&n.color!=="accent"&&n.color!=="warn"))},inputs:{color:"color",inline:[2,"inline","inline",z],svgIcon:"svgIcon",fontSet:"fontSet",fontIcon:"fontIcon"},exportAs:["matIcon"],ngContentSelectors:kv,decls:1,vars:0,template:function(t,n){t&1&&(ve(),W(0))},styles:[`mat-icon, mat-icon.mat-primary, mat-icon.mat-accent, mat-icon.mat-warn {
2187
+ `],encapsulation:2})}return i})();function Dv(i){return i.hasAttribute("mat-raised-button")?"elevated":i.hasAttribute("mat-stroked-button")?"outlined":i.hasAttribute("mat-flat-button")?"filled":i.hasAttribute("mat-button")?"text":null}var ze=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=U({type:i});static \u0275inj=H({imports:[Ki,ce]})}return i})();function _h(i){return Error(`Unable to find icon with the name "${i}"`)}function Sv(){return Error("Could not find HttpClient for use with Angular Material icons. Please add provideHttpClient() to your providers.")}function vh(i){return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was "${i}".`)}function bh(i){return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by Angular's DomSanitizer. Attempted literal was "${i}".`)}var dn=class{url;svgText;options;svgElement=null;constructor(o,e,t){this.url=o,this.svgText=e,this.options=t}},Ch=(()=>{class i{_httpClient;_sanitizer;_errorHandler;_document;_svgIconConfigs=new Map;_iconSetConfigs=new Map;_cachedIconsByUrl=new Map;_inProgressUrlFetches=new Map;_fontCssClassesByAlias=new Map;_resolvers=[];_defaultFontSetClass=["material-icons","mat-ligature-font"];constructor(e,t,n,a){this._httpClient=e,this._sanitizer=t,this._errorHandler=a,this._document=n}addSvgIcon(e,t,n){return this.addSvgIconInNamespace("",e,t,n)}addSvgIconLiteral(e,t,n){return this.addSvgIconLiteralInNamespace("",e,t,n)}addSvgIconInNamespace(e,t,n,a){return this._addSvgIconConfig(e,t,new dn(n,null,a))}addSvgIconResolver(e){return this._resolvers.push(e),this}addSvgIconLiteralInNamespace(e,t,n,a){let r=this._sanitizer.sanitize(zt.HTML,n);if(!r)throw bh(n);let u=eo(r);return this._addSvgIconConfig(e,t,new dn("",u,a))}addSvgIconSet(e,t){return this.addSvgIconSetInNamespace("",e,t)}addSvgIconSetLiteral(e,t){return this.addSvgIconSetLiteralInNamespace("",e,t)}addSvgIconSetInNamespace(e,t,n){return this._addSvgIconSetConfig(e,new dn(t,null,n))}addSvgIconSetLiteralInNamespace(e,t,n){let a=this._sanitizer.sanitize(zt.HTML,t);if(!a)throw bh(t);let r=eo(a);return this._addSvgIconSetConfig(e,new dn("",r,n))}registerFontClassAlias(e,t=e){return this._fontCssClassesByAlias.set(e,t),this}classNameForFontAlias(e){return this._fontCssClassesByAlias.get(e)||e}setDefaultFontSetClass(...e){return this._defaultFontSetClass=e,this}getDefaultFontSetClass(){return this._defaultFontSetClass}getSvgIconFromUrl(e){let t=this._sanitizer.sanitize(zt.RESOURCE_URL,e);if(!t)throw vh(e);let n=this._cachedIconsByUrl.get(t);return n?ge(ys(n)):this._loadSvgIconFromConfig(new dn(e,null)).pipe(wi(a=>this._cachedIconsByUrl.set(t,a)),Ve(a=>ys(a)))}getNamedSvgIcon(e,t=""){let n=yh(t,e),a=this._svgIconConfigs.get(n);if(a)return this._getSvgFromConfig(a);if(a=this._getIconConfigFromResolvers(t,e),a)return this._svgIconConfigs.set(n,a),this._getSvgFromConfig(a);let r=this._iconSetConfigs.get(t);return r?this._getSvgFromIconSetConfigs(e,r):ur(_h(n))}ngOnDestroy(){this._resolvers=[],this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear()}_getSvgFromConfig(e){return e.svgText?ge(ys(this._svgElementFromConfig(e))):this._loadSvgIconFromConfig(e).pipe(Ve(t=>ys(t)))}_getSvgFromIconSetConfigs(e,t){let n=this._extractIconWithNameFromAnySet(e,t);if(n)return ge(n);let a=t.filter(r=>!r.svgText).map(r=>this._loadSvgIconSetFromConfig(r).pipe(Et(u=>{let f=`Loading icon set URL: ${this._sanitizer.sanitize(zt.RESOURCE_URL,r.url)} failed: ${u.message}`;return this._errorHandler.handleError(new Error(f)),ge(null)})));return hr(a).pipe(Ve(()=>{let r=this._extractIconWithNameFromAnySet(e,t);if(!r)throw _h(e);return r}))}_extractIconWithNameFromAnySet(e,t){for(let n=t.length-1;n>=0;n--){let a=t[n];if(a.svgText&&a.svgText.toString().indexOf(e)>-1){let r=this._svgElementFromConfig(a),u=this._extractSvgIconFromSet(r,e,a.options);if(u)return u}}return null}_loadSvgIconFromConfig(e){return this._fetchIcon(e).pipe(wi(t=>e.svgText=t),Ve(()=>this._svgElementFromConfig(e)))}_loadSvgIconSetFromConfig(e){return e.svgText?ge(null):this._fetchIcon(e).pipe(wi(t=>e.svgText=t))}_extractSvgIconFromSet(e,t,n){let a=e.querySelector(`[id="${t}"]`);if(!a)return null;let r=a.cloneNode(!0);if(r.removeAttribute("id"),r.nodeName.toLowerCase()==="svg")return this._setSvgAttributes(r,n);if(r.nodeName.toLowerCase()==="symbol")return this._setSvgAttributes(this._toSvgElement(r),n);let u=this._svgElementFromString(eo("<svg></svg>"));return u.appendChild(r),this._setSvgAttributes(u,n)}_svgElementFromString(e){let t=this._document.createElement("DIV");t.innerHTML=e;let n=t.querySelector("svg");if(!n)throw Error("<svg> tag not found");return n}_toSvgElement(e){let t=this._svgElementFromString(eo("<svg></svg>")),n=e.attributes;for(let a=0;a<n.length;a++){let{name:r,value:u}=n[a];r!=="id"&&t.setAttribute(r,u)}for(let a=0;a<e.childNodes.length;a++)e.childNodes[a].nodeType===this._document.ELEMENT_NODE&&t.appendChild(e.childNodes[a].cloneNode(!0));return t}_setSvgAttributes(e,t){return e.setAttribute("fit",""),e.setAttribute("height","100%"),e.setAttribute("width","100%"),e.setAttribute("preserveAspectRatio","xMidYMid meet"),e.setAttribute("focusable","false"),t&&t.viewBox&&e.setAttribute("viewBox",t.viewBox),e}_fetchIcon(e){let{url:t,options:n}=e,a=n?.withCredentials??!1;if(!this._httpClient)throw Sv();if(t==null)throw Error(`Cannot fetch icon from URL "${t}".`);let r=this._sanitizer.sanitize(zt.RESOURCE_URL,t);if(!r)throw vh(t);let u=this._inProgressUrlFetches.get(r);if(u)return u;let h=this._httpClient.get(r,{responseType:"text",withCredentials:a}).pipe(Ve(f=>eo(f)),fr(()=>this._inProgressUrlFetches.delete(r)),ld());return this._inProgressUrlFetches.set(r,h),h}_addSvgIconConfig(e,t,n){return this._svgIconConfigs.set(yh(e,t),n),this}_addSvgIconSetConfig(e,t){let n=this._iconSetConfigs.get(e);return n?n.push(t):this._iconSetConfigs.set(e,[t]),this}_svgElementFromConfig(e){if(!e.svgElement){let t=this._svgElementFromString(e.svgText);this._setSvgAttributes(t,e.options),e.svgElement=t}return e.svgElement}_getIconConfigFromResolvers(e,t){for(let n=0;n<this._resolvers.length;n++){let a=this._resolvers[n](t,e);if(a)return kv(a)?new dn(a.url,null,a.options):new dn(a,null)}}static \u0275fac=function(t){return new(t||i)(me(It,8),me(Sa),me(K,8),me(Wn))};static \u0275prov=ae({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();function ys(i){return i.cloneNode(!0)}function yh(i,o){return i+":"+o}function kv(i){return!!(i.url&&i.options)}var Mv=["*"],Ev=new k("MAT_ICON_DEFAULT_OPTIONS"),Tv=new k("mat-icon-location",{providedIn:"root",factory:()=>{let i=m(K),o=i?i.location:null;return{getPathname:()=>o?o.pathname+o.search:""}}}),xh=["clip-path","color-profile","src","cursor","fill","filter","marker","marker-start","marker-mid","marker-end","mask","stroke"],Av=xh.map(i=>`[${i}]`).join(", "),Iv=/^url\(['"]?#(.*?)['"]?\)$/,vt=(()=>{class i{_elementRef=m(B);_iconRegistry=m(Ch);_location=m(Tv);_errorHandler=m(Wn);_defaultColor;get color(){return this._color||this._defaultColor}set color(e){this._color=e}_color;inline=!1;get svgIcon(){return this._svgIcon}set svgIcon(e){e!==this._svgIcon&&(e?this._updateSvgIcon(e):this._svgIcon&&this._clearSvgElement(),this._svgIcon=e)}_svgIcon;get fontSet(){return this._fontSet}set fontSet(e){let t=this._cleanupFontValue(e);t!==this._fontSet&&(this._fontSet=t,this._updateFontIconClasses())}_fontSet;get fontIcon(){return this._fontIcon}set fontIcon(e){let t=this._cleanupFontValue(e);t!==this._fontIcon&&(this._fontIcon=t,this._updateFontIconClasses())}_fontIcon;_previousFontSetClass=[];_previousFontIconClass;_svgName=null;_svgNamespace=null;_previousPath;_elementsWithExternalReferences;_currentIconFetch=Te.EMPTY;constructor(){let e=m(new zi("aria-hidden"),{optional:!0}),t=m(Ev,{optional:!0});t&&(t.color&&(this.color=this._defaultColor=t.color),t.fontSet&&(this.fontSet=t.fontSet)),e||this._elementRef.nativeElement.setAttribute("aria-hidden","true")}_splitIconName(e){if(!e)return["",""];let t=e.split(":");switch(t.length){case 1:return["",t[0]];case 2:return t;default:throw Error(`Invalid icon name: "${e}"`)}}ngOnInit(){this._updateFontIconClasses()}ngAfterViewChecked(){let e=this._elementsWithExternalReferences;if(e&&e.size){let t=this._location.getPathname();t!==this._previousPath&&(this._previousPath=t,this._prependPathToReferences(t))}}ngOnDestroy(){this._currentIconFetch.unsubscribe(),this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear()}_usingFontIcon(){return!this.svgIcon}_setSvgElement(e){this._clearSvgElement();let t=this._location.getPathname();this._previousPath=t,this._cacheChildrenWithExternalReferences(e),this._prependPathToReferences(t),this._elementRef.nativeElement.appendChild(e)}_clearSvgElement(){let e=this._elementRef.nativeElement,t=e.childNodes.length;for(this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear();t--;){let n=e.childNodes[t];(n.nodeType!==1||n.nodeName.toLowerCase()==="svg")&&n.remove()}}_updateFontIconClasses(){if(!this._usingFontIcon())return;let e=this._elementRef.nativeElement,t=(this.fontSet?this._iconRegistry.classNameForFontAlias(this.fontSet).split(/ +/):this._iconRegistry.getDefaultFontSetClass()).filter(n=>n.length>0);this._previousFontSetClass.forEach(n=>e.classList.remove(n)),t.forEach(n=>e.classList.add(n)),this._previousFontSetClass=t,this.fontIcon!==this._previousFontIconClass&&!t.includes("mat-ligature-font")&&(this._previousFontIconClass&&e.classList.remove(this._previousFontIconClass),this.fontIcon&&e.classList.add(this.fontIcon),this._previousFontIconClass=this.fontIcon)}_cleanupFontValue(e){return typeof e=="string"?e.trim().split(" ")[0]:e}_prependPathToReferences(e){let t=this._elementsWithExternalReferences;t&&t.forEach((n,a)=>{n.forEach(r=>{a.setAttribute(r.name,`url('${e}#${r.value}')`)})})}_cacheChildrenWithExternalReferences(e){let t=e.querySelectorAll(Av),n=this._elementsWithExternalReferences=this._elementsWithExternalReferences||new Map;for(let a=0;a<t.length;a++)xh.forEach(r=>{let u=t[a],h=u.getAttribute(r),f=h?h.match(Iv):null;if(f){let b=n.get(u);b||(b=[],n.set(u,b)),b.push({name:r,value:f[1]})}})}_updateSvgIcon(e){if(this._svgNamespace=null,this._svgName=null,this._currentIconFetch.unsubscribe(),e){let[t,n]=this._splitIconName(e);t&&(this._svgNamespace=t),n&&(this._svgName=n),this._currentIconFetch=this._iconRegistry.getNamedSvgIcon(n,t).pipe(pt(1)).subscribe(a=>this._setSvgElement(a),a=>{let r=`Error retrieving icon ${t}:${n}! ${a.message}`;this._errorHandler.handleError(new Error(r))})}}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=R({type:i,selectors:[["mat-icon"]],hostAttrs:["role","img",1,"mat-icon","notranslate"],hostVars:10,hostBindings:function(t,n){t&2&&(J("data-mat-icon-type",n._usingFontIcon()?"font":"svg")("data-mat-icon-name",n._svgName||n.fontIcon)("data-mat-icon-namespace",n._svgNamespace||n.fontSet)("fontIcon",n._usingFontIcon()?n.fontIcon:null),at(n.color?"mat-"+n.color:""),p("mat-icon-inline",n.inline)("mat-icon-no-color",n.color!=="primary"&&n.color!=="accent"&&n.color!=="warn"))},inputs:{color:"color",inline:[2,"inline","inline",z],svgIcon:"svgIcon",fontSet:"fontSet",fontIcon:"fontIcon"},exportAs:["matIcon"],ngContentSelectors:Mv,decls:1,vars:0,template:function(t,n){t&1&&(ve(),W(0))},styles:[`mat-icon, mat-icon.mat-primary, mat-icon.mat-accent, mat-icon.mat-warn {
2188
2188
  color: var(--mat-icon-color, inherit);
2189
2189
  }
2190
2190
 
@@ -2220,10 +2220,10 @@ select.mat-mdc-form-field-input-control:not(.mat-mdc-native-select-inline) optio
2220
2220
  .mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-icon {
2221
2221
  margin: auto;
2222
2222
  }
2223
- `],encapsulation:2})}return i})(),bt=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=U({type:i});static \u0275inj=H({imports:[ce]})}return i})();var Go=(()=>{class i{constructor(){this.http=m(It),this.staticUrl="/api/gpus",this.usageUrl="/api/gpus/usage"}fetchGpus(){return this.http.get(this.staticUrl).pipe(wi({error:e=>console.error("[GpuService] static fetch error:",e)}))}fetchStatus(){return this.http.get(this.usageUrl).pipe(wi({error:e=>console.error("[GpuService] status fetch error:",e)}))}watchStatus(e){return pr(0,e).pipe($e(()=>this.fetchStatus()))}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275prov=ae({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();function Cs(i){return i&&typeof i.connect=="function"&&!(i instanceof nd)}var Ii=(function(i){return i[i.REPLACED=0]="REPLACED",i[i.INSERTED=1]="INSERTED",i[i.MOVED=2]="MOVED",i[i.REMOVED=3]="REMOVED",i})(Ii||{}),xs=class{viewCacheSize=20;_viewCache=[];applyChanges(o,e,t,n,a){o.forEachOperation((r,u,h)=>{let f,b;if(r.previousIndex==null){let M=()=>t(r,u,h);f=this._insertView(M,h,e,n(r)),b=f?Ii.INSERTED:Ii.REPLACED}else h==null?(this._detachAndCacheView(u,e),b=Ii.REMOVED):(f=this._moveView(u,h,e,n(r)),b=Ii.MOVED);a&&a({context:f?.context,operation:b,record:r})})}detach(){for(let o of this._viewCache)o.destroy();this._viewCache=[]}_insertView(o,e,t,n){let a=this._insertViewFromCache(e,t);if(a){a.context.$implicit=n;return}let r=o();return t.createEmbeddedView(r.templateRef,r.context,r.index)}_detachAndCacheView(o,e){let t=e.detach(o);this._maybeCacheView(t,e)}_moveView(o,e,t,n){let a=t.get(o);return t.move(a,e),a.context.$implicit=n,a}_maybeCacheView(o,e){if(this._viewCache.length<this.viewCacheSize)this._viewCache.push(o);else{let t=e.indexOf(o);t===-1?o.destroy():e.remove(t)}}_insertViewFromCache(o,e){let t=this._viewCache.pop();return t&&e.insert(t,o),t||null}};var Iv=20,Rn=(()=>{class i{_ngZone=m($);_platform=m(fe);_renderer=m(ct).createRenderer(null,null);_cleanupGlobalListener;_scrolled=new O;_scrolledCount=0;scrollContainers=new Map;register(e){this.scrollContainers.has(e)||this.scrollContainers.set(e,e.elementScrolled().subscribe(()=>this._scrolled.next(e)))}deregister(e){let t=this.scrollContainers.get(e);t&&(t.unsubscribe(),this.scrollContainers.delete(e))}scrolled(e=Iv){return this._platform.isBrowser?new Nt(t=>{this._cleanupGlobalListener||(this._cleanupGlobalListener=this._ngZone.runOutsideAngular(()=>this._renderer.listen("document","scroll",()=>this._scrolled.next())));let n=e>0?this._scrolled.pipe(la(e)).subscribe(t):this._scrolled.subscribe(t);return this._scrolledCount++,()=>{n.unsubscribe(),this._scrolledCount--,this._scrolledCount||(this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0)}}):ge()}ngOnDestroy(){this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0,this.scrollContainers.forEach((e,t)=>this.deregister(t)),this._scrolled.complete()}ancestorScrolled(e,t){let n=this.getAncestorScrollContainers(e);return this.scrolled(t).pipe(ke(a=>!a||n.indexOf(a)>-1))}getAncestorScrollContainers(e){let t=[];return this.scrollContainers.forEach((n,a)=>{this._targetContainsElement(a,e)&&t.push(a)}),t}_targetContainsElement(e,t){let n=Ht(t),a=e.getElementRef().nativeElement;do if(n==a)return!0;while(n=n.parentElement);return!1}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})(),xc=(()=>{class i{elementRef=m(B);scrollDispatcher=m(Rn);ngZone=m($);dir=m(Ze,{optional:!0});_scrollElement=this.elementRef.nativeElement;_destroyed=new O;_renderer=m(we);_cleanupScroll;_elementScrolled=new O;ngOnInit(){this._cleanupScroll=this.ngZone.runOutsideAngular(()=>this._renderer.listen(this._scrollElement,"scroll",e=>this._elementScrolled.next(e))),this.scrollDispatcher.register(this)}ngOnDestroy(){this._cleanupScroll?.(),this._elementScrolled.complete(),this.scrollDispatcher.deregister(this),this._destroyed.next(),this._destroyed.complete()}elementScrolled(){return this._elementScrolled}getElementRef(){return this.elementRef}scrollTo(e){let t=this.elementRef.nativeElement,n=this.dir&&this.dir.value=="rtl";e.left==null&&(e.left=n?e.end:e.start),e.right==null&&(e.right=n?e.start:e.end),e.bottom!=null&&(e.top=t.scrollHeight-t.clientHeight-e.bottom),n&&Ro()!=Ei.NORMAL?(e.left!=null&&(e.right=t.scrollWidth-t.clientWidth-e.left),Ro()==Ei.INVERTED?e.left=e.right:Ro()==Ei.NEGATED&&(e.left=e.right?-e.right:e.right)):e.right!=null&&(e.left=t.scrollWidth-t.clientWidth-e.right),this._applyScrollToOptions(e)}_applyScrollToOptions(e){let t=this.elementRef.nativeElement;Zr()?t.scrollTo(e):(e.top!=null&&(t.scrollTop=e.top),e.left!=null&&(t.scrollLeft=e.left))}measureScrollOffset(e){let t="left",n="right",a=this.elementRef.nativeElement;if(e=="top")return a.scrollTop;if(e=="bottom")return a.scrollHeight-a.clientHeight-a.scrollTop;let r=this.dir&&this.dir.value=="rtl";return e=="start"?e=r?n:t:e=="end"&&(e=r?t:n),r&&Ro()==Ei.INVERTED?e==t?a.scrollWidth-a.clientWidth-a.scrollLeft:a.scrollLeft:r&&Ro()==Ei.NEGATED?e==t?a.scrollLeft+a.scrollWidth-a.clientWidth:-a.scrollLeft:e==t?a.scrollLeft:a.scrollWidth-a.clientWidth-a.scrollLeft}static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]]})}return i})(),Rv=20,ni=(()=>{class i{_platform=m(fe);_listeners;_viewportSize=null;_change=new O;_document=m(K);constructor(){let e=m($),t=m(ct).createRenderer(null,null);e.runOutsideAngular(()=>{if(this._platform.isBrowser){let n=a=>this._change.next(a);this._listeners=[t.listen("window","resize",n),t.listen("window","orientationchange",n)]}this.change().subscribe(()=>this._viewportSize=null)})}ngOnDestroy(){this._listeners?.forEach(e=>e()),this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();let e={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),e}getViewportRect(){let e=this.getViewportScrollPosition(),{width:t,height:n}=this.getViewportSize();return{top:e.top,left:e.left,bottom:e.top+n,right:e.left+t,height:n,width:t}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};let e=this._document,t=this._getWindow(),n=e.documentElement,a=n.getBoundingClientRect(),r=-a.top||e.body?.scrollTop||t.scrollY||n.scrollTop||0,u=-a.left||e.body?.scrollLeft||t.scrollX||n.scrollLeft||0;return{top:r,left:u}}change(e=Rv){return e>0?this._change.pipe(la(e)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){let e=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:e.innerWidth,height:e.innerHeight}:{width:0,height:0}}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();var wh=new k("CDK_VIRTUAL_SCROLL_VIEWPORT");var Ri=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=U({type:i});static \u0275inj=H({})}return i})(),Ga=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=U({type:i});static \u0275inj=H({imports:[ce,Ri,ce,Ri]})}return i})();var ws=class{applyChanges(o,e,t,n,a){o.forEachOperation((r,u,h)=>{let f,b;if(r.previousIndex==null){let M=t(r,u,h);f=e.createEmbeddedView(M.templateRef,M.context,M.index),b=Ii.INSERTED}else h==null?(e.remove(u),b=Ii.REMOVED):(f=e.get(u),e.move(f,h),b=Ii.MOVED);a&&a({context:f?.context,operation:b,record:r})})}detach(){}};var Ov=[[["caption"]],[["colgroup"],["col"]],"*"],Fv=["caption","colgroup, col","*"];function Nv(i,o){i&1&&W(0,2)}function Lv(i,o){i&1&&(s(0,"thead",0),di(1,1),l(),s(2,"tbody",0),di(3,2)(4,3),l(),s(5,"tfoot",0),di(6,4),l())}function Vv(i,o){i&1&&di(0,1)(1,2)(2,3)(3,4)}var Pi=new k("CDK_TABLE");var Ss=(()=>{class i{template=m(tt);static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,selectors:[["","cdkCellDef",""]]})}return i})(),kh=(()=>{class i{template=m(tt);static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,selectors:[["","cdkHeaderCellDef",""]]})}return i})(),Mh=(()=>{class i{template=m(tt);static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,selectors:[["","cdkFooterCellDef",""]]})}return i})(),Ka=(()=>{class i{_table=m(Pi,{optional:!0});_hasStickyChanged=!1;get name(){return this._name}set name(e){this._setNameInput(e)}_name;get sticky(){return this._sticky}set sticky(e){e!==this._sticky&&(this._sticky=e,this._hasStickyChanged=!0)}_sticky=!1;get stickyEnd(){return this._stickyEnd}set stickyEnd(e){e!==this._stickyEnd&&(this._stickyEnd=e,this._hasStickyChanged=!0)}_stickyEnd=!1;cell;headerCell;footerCell;cssClassFriendlyName;_columnCssClassName;hasStickyChanged(){let e=this._hasStickyChanged;return this.resetStickyChanged(),e}resetStickyChanged(){this._hasStickyChanged=!1}_updateColumnCssClassName(){this._columnCssClassName=[`cdk-column-${this.cssClassFriendlyName}`]}_setNameInput(e){e&&(this._name=e,this.cssClassFriendlyName=e.replace(/[^a-z0-9_-]/gi,"-"),this._updateColumnCssClassName())}static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,selectors:[["","cdkColumnDef",""]],contentQueries:function(t,n,a){if(t&1&&dt(a,Ss,5)(a,kh,5)(a,Mh,5),t&2){let r;N(r=L())&&(n.cell=r.first),N(r=L())&&(n.headerCell=r.first),N(r=L())&&(n.footerCell=r.first)}},inputs:{name:[0,"cdkColumnDef","name"],sticky:[2,"sticky","sticky",z],stickyEnd:[2,"stickyEnd","stickyEnd",z]}})}return i})(),wc=class{constructor(o,e){e.nativeElement.classList.add(...o._columnCssClassName)}};var Eh=(()=>{class i extends wc{constructor(){let e=m(Ka),t=m(B);super(e,t);let n=e._table?._getCellRole();n&&t.nativeElement.setAttribute("role",n)}static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,selectors:[["cdk-cell"],["td","cdk-cell",""]],hostAttrs:[1,"cdk-cell"],features:[ie]})}return i})();var Sc=(()=>{class i{template=m(tt);_differs=m(ua);columns;_columnsDiffer;ngOnChanges(e){if(!this._columnsDiffer){let t=e.columns&&e.columns.currentValue||[];this._columnsDiffer=this._differs.find(t).create(),this._columnsDiffer.diff(t)}}getColumnsDiff(){return this._columnsDiffer.diff(this.columns)}extractCellTemplate(e){return this instanceof kc?e.headerCell.template:this instanceof Mc?e.footerCell.template:e.cell.template}static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,features:[Ie]})}return i})(),kc=(()=>{class i extends Sc{_table=m(Pi,{optional:!0});_hasStickyChanged=!1;get sticky(){return this._sticky}set sticky(e){e!==this._sticky&&(this._sticky=e,this._hasStickyChanged=!0)}_sticky=!1;ngOnChanges(e){super.ngOnChanges(e)}hasStickyChanged(){let e=this._hasStickyChanged;return this.resetStickyChanged(),e}resetStickyChanged(){this._hasStickyChanged=!1}static \u0275fac=(()=>{let e;return function(n){return(e||(e=xe(i)))(n||i)}})();static \u0275dir=T({type:i,selectors:[["","cdkHeaderRowDef",""]],inputs:{columns:[0,"cdkHeaderRowDef","columns"],sticky:[2,"cdkHeaderRowDefSticky","sticky",z]},features:[ie,Ie]})}return i})(),Mc=(()=>{class i extends Sc{_table=m(Pi,{optional:!0});_hasStickyChanged=!1;get sticky(){return this._sticky}set sticky(e){e!==this._sticky&&(this._sticky=e,this._hasStickyChanged=!0)}_sticky=!1;ngOnChanges(e){super.ngOnChanges(e)}hasStickyChanged(){let e=this._hasStickyChanged;return this.resetStickyChanged(),e}resetStickyChanged(){this._hasStickyChanged=!1}static \u0275fac=(()=>{let e;return function(n){return(e||(e=xe(i)))(n||i)}})();static \u0275dir=T({type:i,selectors:[["","cdkFooterRowDef",""]],inputs:{columns:[0,"cdkFooterRowDef","columns"],sticky:[2,"cdkFooterRowDefSticky","sticky",z]},features:[ie,Ie]})}return i})(),ks=(()=>{class i extends Sc{_table=m(Pi,{optional:!0});when;static \u0275fac=(()=>{let e;return function(n){return(e||(e=xe(i)))(n||i)}})();static \u0275dir=T({type:i,selectors:[["","cdkRowDef",""]],inputs:{columns:[0,"cdkRowDefColumns","columns"],when:[0,"cdkRowDefWhen","when"]},features:[ie]})}return i})(),qa=(()=>{class i{_viewContainer=m(it);cells;context;static mostRecentCellOutlet=null;constructor(){i.mostRecentCellOutlet=this}ngOnDestroy(){i.mostRecentCellOutlet===this&&(i.mostRecentCellOutlet=null)}static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,selectors:[["","cdkCellOutlet",""]]})}return i})();var Ec=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275cmp=R({type:i,selectors:[["cdk-row"],["tr","cdk-row",""]],hostAttrs:["role","row",1,"cdk-row"],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,n){t&1&&di(0,0)},dependencies:[qa],encapsulation:2,changeDetection:1})}return i})(),Th=(()=>{class i{templateRef=m(tt);_contentClassNames=["cdk-no-data-row","cdk-row"];_cellClassNames=["cdk-cell","cdk-no-data-cell"];_cellSelector="td, cdk-cell, [cdk-cell], .cdk-cell";static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,selectors:[["ng-template","cdkNoDataRow",""]]})}return i})(),Dh=["top","bottom","left","right"],Dc=class{_isNativeHtmlTable;_stickCellCss;_isBrowser;_needsPositionStickyOnElement;direction;_positionListener;_tableInjector;_elemSizeCache=new WeakMap;_resizeObserver=globalThis?.ResizeObserver?new globalThis.ResizeObserver(o=>this._updateCachedSizes(o)):null;_updatedStickyColumnsParamsToReplay=[];_stickyColumnsReplayTimeout=null;_cachedCellWidths=[];_borderCellCss;_destroyed=!1;constructor(o,e,t=!0,n=!0,a,r,u){this._isNativeHtmlTable=o,this._stickCellCss=e,this._isBrowser=t,this._needsPositionStickyOnElement=n,this.direction=a,this._positionListener=r,this._tableInjector=u,this._borderCellCss={top:`${e}-border-elem-top`,bottom:`${e}-border-elem-bottom`,left:`${e}-border-elem-left`,right:`${e}-border-elem-right`}}clearStickyPositioning(o,e){(e.includes("left")||e.includes("right"))&&this._removeFromStickyColumnReplayQueue(o);let t=[];for(let n of o)n.nodeType===n.ELEMENT_NODE&&t.push(n,...Array.from(n.children));Ge({write:()=>{for(let n of t)this._removeStickyStyle(n,e)}},{injector:this._tableInjector})}updateStickyColumns(o,e,t,n=!0,a=!0){if(!o.length||!this._isBrowser||!(e.some(pe=>pe)||t.some(pe=>pe))){this._positionListener?.stickyColumnsUpdated({sizes:[]}),this._positionListener?.stickyEndColumnsUpdated({sizes:[]});return}let r=o[0],u=r.children.length,h=this.direction==="rtl",f=h?"right":"left",b=h?"left":"right",M=e.lastIndexOf(!0),j=t.indexOf(!0),G,de,Ce;a&&this._updateStickyColumnReplayQueue({rows:[...o],stickyStartStates:[...e],stickyEndStates:[...t]}),Ge({earlyRead:()=>{G=this._getCellWidths(r,n),de=this._getStickyStartColumnPositions(G,e),Ce=this._getStickyEndColumnPositions(G,t)},write:()=>{for(let pe of o)for(let Oe=0;Oe<u;Oe++){let ht=pe.children[Oe];e[Oe]&&this._addStickyStyle(ht,f,de[Oe],Oe===M),t[Oe]&&this._addStickyStyle(ht,b,Ce[Oe],Oe===j)}this._positionListener&&G.some(pe=>!!pe)&&(this._positionListener.stickyColumnsUpdated({sizes:M===-1?[]:G.slice(0,M+1).map((pe,Oe)=>e[Oe]?pe:null)}),this._positionListener.stickyEndColumnsUpdated({sizes:j===-1?[]:G.slice(j).map((pe,Oe)=>t[Oe+j]?pe:null).reverse()}))}},{injector:this._tableInjector})}stickRows(o,e,t){if(!this._isBrowser)return;let n=t==="bottom"?o.slice().reverse():o,a=t==="bottom"?e.slice().reverse():e,r=[],u=[],h=[];Ge({earlyRead:()=>{for(let f=0,b=0;f<n.length;f++){if(!a[f])continue;r[f]=b;let M=n[f];h[f]=this._isNativeHtmlTable?Array.from(M.children):[M];let j=this._retrieveElementSize(M).height;b+=j,u[f]=j}},write:()=>{let f=a.lastIndexOf(!0);for(let b=0;b<n.length;b++){if(!a[b])continue;let M=r[b],j=b===f;for(let G of h[b])this._addStickyStyle(G,t,M,j)}t==="top"?this._positionListener?.stickyHeaderRowsUpdated({sizes:u,offsets:r,elements:h}):this._positionListener?.stickyFooterRowsUpdated({sizes:u,offsets:r,elements:h})}},{injector:this._tableInjector})}updateStickyFooterContainer(o,e){this._isNativeHtmlTable&&Ge({write:()=>{let t=o.querySelector("tfoot");t&&(e.some(n=>!n)?this._removeStickyStyle(t,["bottom"]):this._addStickyStyle(t,"bottom",0,!1))}},{injector:this._tableInjector})}destroy(){this._stickyColumnsReplayTimeout&&clearTimeout(this._stickyColumnsReplayTimeout),this._resizeObserver?.disconnect(),this._destroyed=!0}_removeStickyStyle(o,e){if(!o.classList.contains(this._stickCellCss))return;for(let n of e)o.style[n]="",o.classList.remove(this._borderCellCss[n]);Dh.some(n=>e.indexOf(n)===-1&&o.style[n])?o.style.zIndex=this._getCalculatedZIndex(o):(o.style.zIndex="",this._needsPositionStickyOnElement&&(o.style.position=""),o.classList.remove(this._stickCellCss))}_addStickyStyle(o,e,t,n){o.classList.add(this._stickCellCss),n&&o.classList.add(this._borderCellCss[e]),o.style[e]=`${t}px`,o.style.zIndex=this._getCalculatedZIndex(o),this._needsPositionStickyOnElement&&(o.style.cssText+="position: -webkit-sticky; position: sticky; ")}_getCalculatedZIndex(o){let e={top:100,bottom:10,left:1,right:1},t=0;for(let n of Dh)o.style[n]&&(t+=e[n]);return t?`${t}`:""}_getCellWidths(o,e=!0){if(!e&&this._cachedCellWidths.length)return this._cachedCellWidths;let t=[],n=o.children;for(let a=0;a<n.length;a++){let r=n[a];t.push(this._retrieveElementSize(r).width)}return this._cachedCellWidths=t,t}_getStickyStartColumnPositions(o,e){let t=[],n=0;for(let a=0;a<o.length;a++)e[a]&&(t[a]=n,n+=o[a]);return t}_getStickyEndColumnPositions(o,e){let t=[],n=0;for(let a=o.length;a>0;a--)e[a]&&(t[a]=n,n+=o[a]);return t}_retrieveElementSize(o){let e=this._elemSizeCache.get(o);if(e)return e;let t=o.getBoundingClientRect(),n={width:t.width,height:t.height};return this._resizeObserver&&(this._elemSizeCache.set(o,n),this._resizeObserver.observe(o,{box:"border-box"})),n}_updateStickyColumnReplayQueue(o){this._removeFromStickyColumnReplayQueue(o.rows),this._stickyColumnsReplayTimeout||this._updatedStickyColumnsParamsToReplay.push(o)}_removeFromStickyColumnReplayQueue(o){let e=new Set(o);for(let t of this._updatedStickyColumnsParamsToReplay)t.rows=t.rows.filter(n=>!e.has(n));this._updatedStickyColumnsParamsToReplay=this._updatedStickyColumnsParamsToReplay.filter(t=>!!t.rows.length)}_updateCachedSizes(o){let e=!1;for(let t of o){let n=t.borderBoxSize?.length?{width:t.borderBoxSize[0].inlineSize,height:t.borderBoxSize[0].blockSize}:{width:t.contentRect.width,height:t.contentRect.height};n.width!==this._elemSizeCache.get(t.target)?.width&&Bv(t.target)&&(e=!0),this._elemSizeCache.set(t.target,n)}e&&this._updatedStickyColumnsParamsToReplay.length&&(this._stickyColumnsReplayTimeout&&clearTimeout(this._stickyColumnsReplayTimeout),this._stickyColumnsReplayTimeout=setTimeout(()=>{if(!this._destroyed){for(let t of this._updatedStickyColumnsParamsToReplay)this.updateStickyColumns(t.rows,t.stickyStartStates,t.stickyEndStates,!0,!1);this._updatedStickyColumnsParamsToReplay=[],this._stickyColumnsReplayTimeout=null}},0))}};function Bv(i){return["cdk-cell","cdk-header-cell","cdk-footer-cell"].some(o=>i.classList.contains(o))}var Wa=new k("STICKY_POSITIONING_LISTENER");var Tc=(()=>{class i{viewContainer=m(it);elementRef=m(B);constructor(){let e=m(Pi);e._rowOutlet=this,e._outletAssigned()}static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,selectors:[["","rowOutlet",""]]})}return i})(),Ac=(()=>{class i{viewContainer=m(it);elementRef=m(B);constructor(){let e=m(Pi);e._headerRowOutlet=this,e._outletAssigned()}static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,selectors:[["","headerRowOutlet",""]]})}return i})(),Ic=(()=>{class i{viewContainer=m(it);elementRef=m(B);constructor(){let e=m(Pi);e._footerRowOutlet=this,e._outletAssigned()}static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,selectors:[["","footerRowOutlet",""]]})}return i})(),Rc=(()=>{class i{viewContainer=m(it);elementRef=m(B);constructor(){let e=m(Pi);e._noDataRowOutlet=this,e._outletAssigned()}static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,selectors:[["","noDataRowOutlet",""]]})}return i})(),Pc=(()=>{class i{_differs=m(ua);_changeDetectorRef=m(se);_elementRef=m(B);_dir=m(Ze,{optional:!0});_platform=m(fe);_viewRepeater;_viewportRuler=m(ni);_injector=m(Z);_virtualScrollViewport=m(wh,{optional:!0,host:!0});_positionListener=m(Wa,{optional:!0})||m(Wa,{optional:!0,skipSelf:!0});_document=m(K);_data;_renderedRange;_onDestroy=new O;_renderRows;_renderChangeSubscription=null;_columnDefsByName=new Map;_rowDefs;_headerRowDefs;_footerRowDefs;_dataDiffer;_defaultRowDef=null;_customColumnDefs=new Set;_customRowDefs=new Set;_customHeaderRowDefs=new Set;_customFooterRowDefs=new Set;_customNoDataRow=null;_headerRowDefChanged=!0;_footerRowDefChanged=!0;_stickyColumnStylesNeedReset=!0;_forceRecalculateCellWidths=!0;_cachedRenderRowsMap=new Map;_isNativeHtmlTable;_stickyStyler;stickyCssClass="cdk-table-sticky";needsPositionStickyOnElement=!0;_isServer;_isShowingNoDataRow=!1;_hasAllOutlets=!1;_hasInitialized=!1;_headerRowStickyUpdates=new O;_footerRowStickyUpdates=new O;_disableVirtualScrolling=!1;_getCellRole(){if(this._cellRoleInternal===void 0){let e=this._elementRef.nativeElement.getAttribute("role");return e==="grid"||e==="treegrid"?"gridcell":"cell"}return this._cellRoleInternal}_cellRoleInternal=void 0;get trackBy(){return this._trackByFn}set trackBy(e){this._trackByFn=e}_trackByFn;get dataSource(){return this._dataSource}set dataSource(e){this._dataSource!==e&&(this._switchDataSource(e),this._changeDetectorRef.markForCheck())}_dataSource;_dataSourceChanges=new O;_dataStream=new O;get multiTemplateDataRows(){return this._multiTemplateDataRows}set multiTemplateDataRows(e){this._multiTemplateDataRows=e,this._rowOutlet&&this._rowOutlet.viewContainer.length&&(this._forceRenderDataRows(),this.updateStickyColumnStyles())}_multiTemplateDataRows=!1;get fixedLayout(){return this._virtualScrollEnabled()?!0:this._fixedLayout}set fixedLayout(e){this._fixedLayout=e,this._forceRecalculateCellWidths=!0,this._stickyColumnStylesNeedReset=!0}_fixedLayout=!1;recycleRows=!1;contentChanged=new X;viewChange=new _o({start:0,end:Number.MAX_VALUE});_rowOutlet;_headerRowOutlet;_footerRowOutlet;_noDataRowOutlet;_contentColumnDefs;_contentRowDefs;_contentHeaderRowDefs;_contentFooterRowDefs;_noDataRow;get renderedRows(){return this._renderRows}constructor(){m(new zi("role"),{optional:!0})||this._elementRef.nativeElement.setAttribute("role","table"),this._isServer=!this._platform.isBrowser,this._isNativeHtmlTable=this._elementRef.nativeElement.nodeName==="TABLE",this._dataDiffer=this._differs.find([]).create((t,n)=>this.trackBy?this.trackBy(n.dataIndex,n.data):n)}ngOnInit(){this._setupStickyStyler(),this._viewportRuler.change().pipe(ue(this._onDestroy)).subscribe(()=>{this._forceRecalculateCellWidths=!0})}ngAfterContentInit(){this._viewRepeater=this.recycleRows||this._virtualScrollEnabled()?new xs:new ws,this._virtualScrollEnabled()&&this._setupVirtualScrolling(this._virtualScrollViewport),this._hasInitialized=!0}ngAfterContentChecked(){this._canRender()&&this._render()}ngOnDestroy(){this._stickyStyler?.destroy(),[this._rowOutlet?.viewContainer,this._headerRowOutlet?.viewContainer,this._footerRowOutlet?.viewContainer,this._cachedRenderRowsMap,this._customColumnDefs,this._customRowDefs,this._customHeaderRowDefs,this._customFooterRowDefs,this._columnDefsByName].forEach(e=>{e?.clear()}),this._headerRowDefs=[],this._footerRowDefs=[],this._defaultRowDef=null,this._headerRowStickyUpdates.complete(),this._footerRowStickyUpdates.complete(),this._onDestroy.next(),this._onDestroy.complete(),Cs(this.dataSource)&&this.dataSource.disconnect(this)}renderRows(){this._renderRows=this._getAllRenderRows();let e=this._dataDiffer.diff(this._renderRows);if(!e){this._updateNoDataRow(),this.contentChanged.next();return}let t=this._rowOutlet.viewContainer;this._viewRepeater.applyChanges(e,t,(n,a,r)=>this._getEmbeddedViewArgs(n.item,r),n=>n.item.data,n=>{n.operation===Ii.INSERTED&&n.context&&this._renderCellTemplateForItem(n.record.item.rowDef,n.context)}),this._updateRowIndexContext(),e.forEachIdentityChange(n=>{let a=t.get(n.currentIndex);a.context.$implicit=n.item.data}),this._updateNoDataRow(),this.contentChanged.next(),this.updateStickyColumnStyles()}addColumnDef(e){this._customColumnDefs.add(e)}removeColumnDef(e){this._customColumnDefs.delete(e)}addRowDef(e){this._customRowDefs.add(e)}removeRowDef(e){this._customRowDefs.delete(e)}addHeaderRowDef(e){this._customHeaderRowDefs.add(e),this._headerRowDefChanged=!0}removeHeaderRowDef(e){this._customHeaderRowDefs.delete(e),this._headerRowDefChanged=!0}addFooterRowDef(e){this._customFooterRowDefs.add(e),this._footerRowDefChanged=!0}removeFooterRowDef(e){this._customFooterRowDefs.delete(e),this._footerRowDefChanged=!0}setNoDataRow(e){this._customNoDataRow=e}updateStickyHeaderRowStyles(){let e=this._getRenderedRows(this._headerRowOutlet);if(this._isNativeHtmlTable){let n=Sh(this._headerRowOutlet,"thead");n&&(n.style.display=e.length?"":"none")}let t=this._headerRowDefs.map(n=>n.sticky);this._stickyStyler.clearStickyPositioning(e,["top"]),this._stickyStyler.stickRows(e,t,"top"),this._headerRowDefs.forEach(n=>n.resetStickyChanged())}updateStickyFooterRowStyles(){let e=this._getRenderedRows(this._footerRowOutlet);if(this._isNativeHtmlTable){let n=Sh(this._footerRowOutlet,"tfoot");n&&(n.style.display=e.length?"":"none")}let t=this._footerRowDefs.map(n=>n.sticky);this._stickyStyler.clearStickyPositioning(e,["bottom"]),this._stickyStyler.stickRows(e,t,"bottom"),this._stickyStyler.updateStickyFooterContainer(this._elementRef.nativeElement,t),this._footerRowDefs.forEach(n=>n.resetStickyChanged())}updateStickyColumnStyles(){let e=this._getRenderedRows(this._headerRowOutlet),t=this._getRenderedRows(this._rowOutlet),n=this._getRenderedRows(this._footerRowOutlet);(this._isNativeHtmlTable&&!this.fixedLayout||this._stickyColumnStylesNeedReset)&&(this._stickyStyler.clearStickyPositioning([...e,...t,...n],["left","right"]),this._stickyColumnStylesNeedReset=!1),e.forEach((a,r)=>{this._addStickyColumnStyles([a],this._headerRowDefs[r])}),this._rowDefs.forEach(a=>{let r=[];for(let u=0;u<t.length;u++)this._renderRows[u].rowDef===a&&r.push(t[u]);this._addStickyColumnStyles(r,a)}),n.forEach((a,r)=>{this._addStickyColumnStyles([a],this._footerRowDefs[r])}),Array.from(this._columnDefsByName.values()).forEach(a=>a.resetStickyChanged())}stickyColumnsUpdated(e){this._positionListener?.stickyColumnsUpdated(e)}stickyEndColumnsUpdated(e){this._positionListener?.stickyEndColumnsUpdated(e)}stickyHeaderRowsUpdated(e){this._headerRowStickyUpdates.next(e),this._positionListener?.stickyHeaderRowsUpdated(e)}stickyFooterRowsUpdated(e){this._footerRowStickyUpdates.next(e),this._positionListener?.stickyFooterRowsUpdated(e)}_outletAssigned(){!this._hasAllOutlets&&this._rowOutlet&&this._headerRowOutlet&&this._footerRowOutlet&&this._noDataRowOutlet&&(this._hasAllOutlets=!0,this._canRender()&&this._render())}_canRender(){return this._hasAllOutlets&&this._hasInitialized}_render(){this._cacheRowDefs(),this._cacheColumnDefs(),!this._headerRowDefs.length&&!this._footerRowDefs.length&&this._rowDefs.length;let t=this._renderUpdatedColumns()||this._headerRowDefChanged||this._footerRowDefChanged;this._stickyColumnStylesNeedReset=this._stickyColumnStylesNeedReset||t,this._forceRecalculateCellWidths=t,this._headerRowDefChanged&&(this._forceRenderHeaderRows(),this._headerRowDefChanged=!1),this._footerRowDefChanged&&(this._forceRenderFooterRows(),this._footerRowDefChanged=!1),this.dataSource&&this._rowDefs.length>0&&!this._renderChangeSubscription?this._observeRenderChanges():this._stickyColumnStylesNeedReset&&this.updateStickyColumnStyles(),this._checkStickyStates()}_getAllRenderRows(){if(!Array.isArray(this._data)||!this._renderedRange)return[];let e=[],t=Math.min(this._data.length,this._renderedRange.end),n=this._cachedRenderRowsMap;this._cachedRenderRowsMap=new Map;for(let a=this._renderedRange.start;a<t;a++){let r=this._data[a],u=this._getRenderRowsForData(r,a,n.get(r));this._cachedRenderRowsMap.has(r)||this._cachedRenderRowsMap.set(r,new WeakMap);for(let h=0;h<u.length;h++){let f=u[h],b=this._cachedRenderRowsMap.get(f.data);b.has(f.rowDef)?b.get(f.rowDef).push(f):b.set(f.rowDef,[f]),e.push(f)}}return e}_getRenderRowsForData(e,t,n){return this._getRowDefs(e,t).map(r=>{let u=n&&n.has(r)?n.get(r):[];if(u.length){let h=u.shift();return h.dataIndex=t,h}else return{data:e,rowDef:r,dataIndex:t}})}_cacheColumnDefs(){this._columnDefsByName.clear(),Ds(this._getOwnDefs(this._contentColumnDefs),this._customColumnDefs).forEach(t=>{this._columnDefsByName.has(t.name),this._columnDefsByName.set(t.name,t)})}_cacheRowDefs(){this._headerRowDefs=Ds(this._getOwnDefs(this._contentHeaderRowDefs),this._customHeaderRowDefs),this._footerRowDefs=Ds(this._getOwnDefs(this._contentFooterRowDefs),this._customFooterRowDefs),this._rowDefs=Ds(this._getOwnDefs(this._contentRowDefs),this._customRowDefs);let e=this._rowDefs.filter(t=>!t.when);this._defaultRowDef=e[0]}_renderUpdatedColumns(){let e=(r,u)=>{let h=!!u.getColumnsDiff();return r||h},t=this._rowDefs.reduce(e,!1);t&&this._forceRenderDataRows();let n=this._headerRowDefs.reduce(e,!1);n&&this._forceRenderHeaderRows();let a=this._footerRowDefs.reduce(e,!1);return a&&this._forceRenderFooterRows(),t||n||a}_switchDataSource(e){this._data=[],Cs(this.dataSource)&&this.dataSource.disconnect(this),this._renderChangeSubscription&&(this._renderChangeSubscription.unsubscribe(),this._renderChangeSubscription=null),e||(this._dataDiffer&&this._dataDiffer.diff([]),this._rowOutlet&&this._rowOutlet.viewContainer.clear()),this._dataSource=e}_observeRenderChanges(){if(!this.dataSource)return;let e;Cs(this.dataSource)?e=this.dataSource.connect(this):Js(this.dataSource)?e=this.dataSource:Array.isArray(this.dataSource)&&(e=ge(this.dataSource)),this._renderChangeSubscription=vo([e,this.viewChange]).pipe(ue(this._onDestroy)).subscribe(([t,n])=>{this._data=t||[],this._renderedRange=n,this._dataStream.next(t),this.renderRows()})}_forceRenderHeaderRows(){this._headerRowOutlet.viewContainer.length>0&&this._headerRowOutlet.viewContainer.clear(),this._headerRowDefs.forEach((e,t)=>this._renderRow(this._headerRowOutlet,e,t)),this.updateStickyHeaderRowStyles()}_forceRenderFooterRows(){this._footerRowOutlet.viewContainer.length>0&&this._footerRowOutlet.viewContainer.clear(),this._footerRowDefs.forEach((e,t)=>this._renderRow(this._footerRowOutlet,e,t)),this.updateStickyFooterRowStyles()}_addStickyColumnStyles(e,t){let n=Array.from(t?.columns||[]).map(u=>{let h=this._columnDefsByName.get(u);return h}),a=n.map(u=>u.sticky),r=n.map(u=>u.stickyEnd);this._stickyStyler.updateStickyColumns(e,a,r,!this.fixedLayout||this._forceRecalculateCellWidths)}_getRenderedRows(e){let t=[];for(let n=0;n<e.viewContainer.length;n++){let a=e.viewContainer.get(n);t.push(a.rootNodes[0])}return t}_getRowDefs(e,t){if(this._rowDefs.length===1)return[this._rowDefs[0]];let n=[];if(this.multiTemplateDataRows)n=this._rowDefs.filter(a=>!a.when||a.when(t,e));else{let a=this._rowDefs.find(r=>r.when&&r.when(t,e))||this._defaultRowDef;a&&n.push(a)}return n.length,n}_getEmbeddedViewArgs(e,t){let n=e.rowDef,a={$implicit:e.data};return{templateRef:n.template,context:a,index:t}}_renderRow(e,t,n,a={}){let r=e.viewContainer.createEmbeddedView(t.template,a,n);return this._renderCellTemplateForItem(t,a),r}_renderCellTemplateForItem(e,t){for(let n of this._getCellTemplates(e))qa.mostRecentCellOutlet&&qa.mostRecentCellOutlet._viewContainer.createEmbeddedView(n,t);this._changeDetectorRef.markForCheck()}_updateRowIndexContext(){let e=this._rowOutlet.viewContainer;for(let t=0,n=e.length;t<n;t++){let r=e.get(t).context;r.count=n,r.first=t===0,r.last=t===n-1,r.even=t%2===0,r.odd=!r.even,this.multiTemplateDataRows?(r.dataIndex=this._renderRows[t].dataIndex,r.renderIndex=t):r.index=this._renderRows[t].dataIndex}}_getCellTemplates(e){return!e||!e.columns?[]:Array.from(e.columns,t=>{let n=this._columnDefsByName.get(t);return e.extractCellTemplate(n)})}_forceRenderDataRows(){this._dataDiffer.diff([]),this._rowOutlet.viewContainer.clear(),this.renderRows()}_checkStickyStates(){let e=(t,n)=>t||n.hasStickyChanged();this._headerRowDefs.reduce(e,!1)&&this.updateStickyHeaderRowStyles(),this._footerRowDefs.reduce(e,!1)&&this.updateStickyFooterRowStyles(),Array.from(this._columnDefsByName.values()).reduce(e,!1)&&(this._stickyColumnStylesNeedReset=!0,this.updateStickyColumnStyles())}_setupStickyStyler(){let e=this._dir?this._dir.value:"ltr",t=this._injector;this._stickyStyler=new Dc(this._isNativeHtmlTable,this.stickyCssClass,this._platform.isBrowser,this.needsPositionStickyOnElement,e,this,t),(this._dir?this._dir.change:ge()).pipe(ue(this._onDestroy)).subscribe(n=>{this._stickyStyler.direction=n,this.updateStickyColumnStyles()})}_setupVirtualScrolling(e){let t=typeof requestAnimationFrame<"u"?Qs:Zs;this.viewChange.next({start:0,end:0}),e.renderedRangeStream.pipe(la(0,t),ue(this._onDestroy)).subscribe(this.viewChange),e.attach({dataStream:this._dataStream,measureRangeSize:(n,a)=>this._measureRangeSize(n,a)}),vo([e.renderedContentOffset,this._headerRowStickyUpdates]).pipe(ue(this._onDestroy)).subscribe(([n,a])=>{if(!(!a.sizes||!a.offsets||!a.elements))for(let r=0;r<a.elements.length;r++){let u=a.elements[r];if(u){let h=a.offsets[r],f=n!==0?Math.max(n-h,h):-h;for(let b of u)b.style.top=`${-f}px`}}}),vo([e.renderedContentOffset,this._footerRowStickyUpdates]).pipe(ue(this._onDestroy)).subscribe(([n,a])=>{if(!(!a.sizes||!a.offsets||!a.elements))for(let r=0;r<a.elements.length;r++){let u=a.elements[r];if(u)for(let h of u)h.style.bottom=`${n+a.offsets[r]}px`}})}_getOwnDefs(e){return e.filter(t=>!t._table||t._table===this)}_updateNoDataRow(){let e=this._customNoDataRow||this._noDataRow;if(!e)return;let t=this._rowOutlet.viewContainer.length===0;if(t===this._isShowingNoDataRow)return;let n=this._noDataRowOutlet.viewContainer;if(t){let a=n.createEmbeddedView(e.templateRef),r=a.rootNodes[0];if(a.rootNodes.length===1&&r?.nodeType===this._document.ELEMENT_NODE){r.setAttribute("role","row"),r.classList.add(...e._contentClassNames);let u=r.querySelectorAll(e._cellSelector);for(let h=0;h<u.length;h++)u[h].classList.add(...e._cellClassNames)}}else n.clear();this._isShowingNoDataRow=t,this._changeDetectorRef.markForCheck()}_measureRangeSize(e,t){if(e.start>=e.end||t!=="vertical")return 0;let n=this.viewChange.value,a=this._rowOutlet.viewContainer;e.start<n.start||e.end>n.end;let r=e.start-n.start,u=e.end-e.start,h,f;for(let j=0;j<u;j++){let G=a.get(j+r);if(G&&G.rootNodes.length){h=f=G.rootNodes[0];break}}for(let j=u-1;j>-1;j--){let G=a.get(j+r);if(G&&G.rootNodes.length){f=G.rootNodes[G.rootNodes.length-1];break}}let b=h?.getBoundingClientRect?.(),M=f?.getBoundingClientRect?.();return b&&M?M.bottom-b.top:0}_virtualScrollEnabled(){return!this._disableVirtualScrolling&&this._virtualScrollViewport!=null}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=R({type:i,selectors:[["cdk-table"],["table","cdk-table",""]],contentQueries:function(t,n,a){if(t&1&&dt(a,Th,5)(a,Ka,5)(a,ks,5)(a,kc,5)(a,Mc,5),t&2){let r;N(r=L())&&(n._noDataRow=r.first),N(r=L())&&(n._contentColumnDefs=r),N(r=L())&&(n._contentRowDefs=r),N(r=L())&&(n._contentHeaderRowDefs=r),N(r=L())&&(n._contentFooterRowDefs=r)}},hostAttrs:[1,"cdk-table"],hostVars:2,hostBindings:function(t,n){t&2&&p("cdk-table-fixed-layout",n.fixedLayout)},inputs:{trackBy:"trackBy",dataSource:"dataSource",multiTemplateDataRows:[2,"multiTemplateDataRows","multiTemplateDataRows",z],fixedLayout:[2,"fixedLayout","fixedLayout",z],recycleRows:[2,"recycleRows","recycleRows",z]},outputs:{contentChanged:"contentChanged"},exportAs:["cdkTable"],features:[le([{provide:Pi,useExisting:i},{provide:Wa,useValue:null}])],ngContentSelectors:Fv,decls:5,vars:2,consts:[["role","rowgroup"],["headerRowOutlet",""],["rowOutlet",""],["noDataRowOutlet",""],["footerRowOutlet",""]],template:function(t,n){t&1&&(ve(Ov),W(0),W(1,1),w(2,Nv,1,0),w(3,Lv,7,0)(4,Vv,4,0)),t&2&&(c(2),D(n._isServer?2:-1),c(),D(n._isNativeHtmlTable?3:4))},dependencies:[Ac,Tc,Rc,Ic],styles:[`.cdk-table-fixed-layout {
2223
+ `],encapsulation:2})}return i})(),bt=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=U({type:i});static \u0275inj=H({imports:[ce]})}return i})();var Go=(()=>{class i{constructor(){this.http=m(It),this.staticUrl="/api/gpus",this.usageUrl="/api/gpus/usage"}fetchGpus(){return this.http.get(this.staticUrl).pipe(wi({error:e=>console.error("[GpuService] static fetch error:",e)}))}fetchStatus(){return this.http.get(this.usageUrl).pipe(wi({error:e=>console.error("[GpuService] status fetch error:",e)}))}watchStatus(e){return pr(0,e).pipe($e(()=>this.fetchStatus()))}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275prov=ae({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();function Cs(i){return i&&typeof i.connect=="function"&&!(i instanceof nd)}var Ii=(function(i){return i[i.REPLACED=0]="REPLACED",i[i.INSERTED=1]="INSERTED",i[i.MOVED=2]="MOVED",i[i.REMOVED=3]="REMOVED",i})(Ii||{}),xs=class{viewCacheSize=20;_viewCache=[];applyChanges(o,e,t,n,a){o.forEachOperation((r,u,h)=>{let f,b;if(r.previousIndex==null){let M=()=>t(r,u,h);f=this._insertView(M,h,e,n(r)),b=f?Ii.INSERTED:Ii.REPLACED}else h==null?(this._detachAndCacheView(u,e),b=Ii.REMOVED):(f=this._moveView(u,h,e,n(r)),b=Ii.MOVED);a&&a({context:f?.context,operation:b,record:r})})}detach(){for(let o of this._viewCache)o.destroy();this._viewCache=[]}_insertView(o,e,t,n){let a=this._insertViewFromCache(e,t);if(a){a.context.$implicit=n;return}let r=o();return t.createEmbeddedView(r.templateRef,r.context,r.index)}_detachAndCacheView(o,e){let t=e.detach(o);this._maybeCacheView(t,e)}_moveView(o,e,t,n){let a=t.get(o);return t.move(a,e),a.context.$implicit=n,a}_maybeCacheView(o,e){if(this._viewCache.length<this.viewCacheSize)this._viewCache.push(o);else{let t=e.indexOf(o);t===-1?o.destroy():e.remove(t)}}_insertViewFromCache(o,e){let t=this._viewCache.pop();return t&&e.insert(t,o),t||null}};var Rv=20,Rn=(()=>{class i{_ngZone=m($);_platform=m(fe);_renderer=m(ct).createRenderer(null,null);_cleanupGlobalListener;_scrolled=new O;_scrolledCount=0;scrollContainers=new Map;register(e){this.scrollContainers.has(e)||this.scrollContainers.set(e,e.elementScrolled().subscribe(()=>this._scrolled.next(e)))}deregister(e){let t=this.scrollContainers.get(e);t&&(t.unsubscribe(),this.scrollContainers.delete(e))}scrolled(e=Rv){return this._platform.isBrowser?new Nt(t=>{this._cleanupGlobalListener||(this._cleanupGlobalListener=this._ngZone.runOutsideAngular(()=>this._renderer.listen("document","scroll",()=>this._scrolled.next())));let n=e>0?this._scrolled.pipe(la(e)).subscribe(t):this._scrolled.subscribe(t);return this._scrolledCount++,()=>{n.unsubscribe(),this._scrolledCount--,this._scrolledCount||(this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0)}}):ge()}ngOnDestroy(){this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0,this.scrollContainers.forEach((e,t)=>this.deregister(t)),this._scrolled.complete()}ancestorScrolled(e,t){let n=this.getAncestorScrollContainers(e);return this.scrolled(t).pipe(ke(a=>!a||n.indexOf(a)>-1))}getAncestorScrollContainers(e){let t=[];return this.scrollContainers.forEach((n,a)=>{this._targetContainsElement(a,e)&&t.push(a)}),t}_targetContainsElement(e,t){let n=Ut(t),a=e.getElementRef().nativeElement;do if(n==a)return!0;while(n=n.parentElement);return!1}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})(),xc=(()=>{class i{elementRef=m(B);scrollDispatcher=m(Rn);ngZone=m($);dir=m(Ze,{optional:!0});_scrollElement=this.elementRef.nativeElement;_destroyed=new O;_renderer=m(we);_cleanupScroll;_elementScrolled=new O;ngOnInit(){this._cleanupScroll=this.ngZone.runOutsideAngular(()=>this._renderer.listen(this._scrollElement,"scroll",e=>this._elementScrolled.next(e))),this.scrollDispatcher.register(this)}ngOnDestroy(){this._cleanupScroll?.(),this._elementScrolled.complete(),this.scrollDispatcher.deregister(this),this._destroyed.next(),this._destroyed.complete()}elementScrolled(){return this._elementScrolled}getElementRef(){return this.elementRef}scrollTo(e){let t=this.elementRef.nativeElement,n=this.dir&&this.dir.value=="rtl";e.left==null&&(e.left=n?e.end:e.start),e.right==null&&(e.right=n?e.start:e.end),e.bottom!=null&&(e.top=t.scrollHeight-t.clientHeight-e.bottom),n&&Ro()!=Ei.NORMAL?(e.left!=null&&(e.right=t.scrollWidth-t.clientWidth-e.left),Ro()==Ei.INVERTED?e.left=e.right:Ro()==Ei.NEGATED&&(e.left=e.right?-e.right:e.right)):e.right!=null&&(e.left=t.scrollWidth-t.clientWidth-e.right),this._applyScrollToOptions(e)}_applyScrollToOptions(e){let t=this.elementRef.nativeElement;Zr()?t.scrollTo(e):(e.top!=null&&(t.scrollTop=e.top),e.left!=null&&(t.scrollLeft=e.left))}measureScrollOffset(e){let t="left",n="right",a=this.elementRef.nativeElement;if(e=="top")return a.scrollTop;if(e=="bottom")return a.scrollHeight-a.clientHeight-a.scrollTop;let r=this.dir&&this.dir.value=="rtl";return e=="start"?e=r?n:t:e=="end"&&(e=r?t:n),r&&Ro()==Ei.INVERTED?e==t?a.scrollWidth-a.clientWidth-a.scrollLeft:a.scrollLeft:r&&Ro()==Ei.NEGATED?e==t?a.scrollLeft+a.scrollWidth-a.clientWidth:-a.scrollLeft:e==t?a.scrollLeft:a.scrollWidth-a.clientWidth-a.scrollLeft}static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]]})}return i})(),Pv=20,ni=(()=>{class i{_platform=m(fe);_listeners;_viewportSize=null;_change=new O;_document=m(K);constructor(){let e=m($),t=m(ct).createRenderer(null,null);e.runOutsideAngular(()=>{if(this._platform.isBrowser){let n=a=>this._change.next(a);this._listeners=[t.listen("window","resize",n),t.listen("window","orientationchange",n)]}this.change().subscribe(()=>this._viewportSize=null)})}ngOnDestroy(){this._listeners?.forEach(e=>e()),this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();let e={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),e}getViewportRect(){let e=this.getViewportScrollPosition(),{width:t,height:n}=this.getViewportSize();return{top:e.top,left:e.left,bottom:e.top+n,right:e.left+t,height:n,width:t}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};let e=this._document,t=this._getWindow(),n=e.documentElement,a=n.getBoundingClientRect(),r=-a.top||e.body?.scrollTop||t.scrollY||n.scrollTop||0,u=-a.left||e.body?.scrollLeft||t.scrollX||n.scrollLeft||0;return{top:r,left:u}}change(e=Pv){return e>0?this._change.pipe(la(e)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){let e=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:e.innerWidth,height:e.innerHeight}:{width:0,height:0}}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();var wh=new k("CDK_VIRTUAL_SCROLL_VIEWPORT");var Ri=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=U({type:i});static \u0275inj=H({})}return i})(),Ga=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=U({type:i});static \u0275inj=H({imports:[ce,Ri,ce,Ri]})}return i})();var ws=class{applyChanges(o,e,t,n,a){o.forEachOperation((r,u,h)=>{let f,b;if(r.previousIndex==null){let M=t(r,u,h);f=e.createEmbeddedView(M.templateRef,M.context,M.index),b=Ii.INSERTED}else h==null?(e.remove(u),b=Ii.REMOVED):(f=e.get(u),e.move(f,h),b=Ii.MOVED);a&&a({context:f?.context,operation:b,record:r})})}detach(){}};var Fv=[[["caption"]],[["colgroup"],["col"]],"*"],Nv=["caption","colgroup, col","*"];function Lv(i,o){i&1&&W(0,2)}function Vv(i,o){i&1&&(s(0,"thead",0),di(1,1),l(),s(2,"tbody",0),di(3,2)(4,3),l(),s(5,"tfoot",0),di(6,4),l())}function Bv(i,o){i&1&&di(0,1)(1,2)(2,3)(3,4)}var Pi=new k("CDK_TABLE");var Ss=(()=>{class i{template=m(tt);static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,selectors:[["","cdkCellDef",""]]})}return i})(),kh=(()=>{class i{template=m(tt);static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,selectors:[["","cdkHeaderCellDef",""]]})}return i})(),Mh=(()=>{class i{template=m(tt);static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,selectors:[["","cdkFooterCellDef",""]]})}return i})(),Ka=(()=>{class i{_table=m(Pi,{optional:!0});_hasStickyChanged=!1;get name(){return this._name}set name(e){this._setNameInput(e)}_name;get sticky(){return this._sticky}set sticky(e){e!==this._sticky&&(this._sticky=e,this._hasStickyChanged=!0)}_sticky=!1;get stickyEnd(){return this._stickyEnd}set stickyEnd(e){e!==this._stickyEnd&&(this._stickyEnd=e,this._hasStickyChanged=!0)}_stickyEnd=!1;cell;headerCell;footerCell;cssClassFriendlyName;_columnCssClassName;hasStickyChanged(){let e=this._hasStickyChanged;return this.resetStickyChanged(),e}resetStickyChanged(){this._hasStickyChanged=!1}_updateColumnCssClassName(){this._columnCssClassName=[`cdk-column-${this.cssClassFriendlyName}`]}_setNameInput(e){e&&(this._name=e,this.cssClassFriendlyName=e.replace(/[^a-z0-9_-]/gi,"-"),this._updateColumnCssClassName())}static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,selectors:[["","cdkColumnDef",""]],contentQueries:function(t,n,a){if(t&1&&dt(a,Ss,5)(a,kh,5)(a,Mh,5),t&2){let r;N(r=L())&&(n.cell=r.first),N(r=L())&&(n.headerCell=r.first),N(r=L())&&(n.footerCell=r.first)}},inputs:{name:[0,"cdkColumnDef","name"],sticky:[2,"sticky","sticky",z],stickyEnd:[2,"stickyEnd","stickyEnd",z]}})}return i})(),wc=class{constructor(o,e){e.nativeElement.classList.add(...o._columnCssClassName)}};var Eh=(()=>{class i extends wc{constructor(){let e=m(Ka),t=m(B);super(e,t);let n=e._table?._getCellRole();n&&t.nativeElement.setAttribute("role",n)}static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,selectors:[["cdk-cell"],["td","cdk-cell",""]],hostAttrs:[1,"cdk-cell"],features:[ie]})}return i})();var Sc=(()=>{class i{template=m(tt);_differs=m(ua);columns;_columnsDiffer;ngOnChanges(e){if(!this._columnsDiffer){let t=e.columns&&e.columns.currentValue||[];this._columnsDiffer=this._differs.find(t).create(),this._columnsDiffer.diff(t)}}getColumnsDiff(){return this._columnsDiffer.diff(this.columns)}extractCellTemplate(e){return this instanceof kc?e.headerCell.template:this instanceof Mc?e.footerCell.template:e.cell.template}static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,features:[Ie]})}return i})(),kc=(()=>{class i extends Sc{_table=m(Pi,{optional:!0});_hasStickyChanged=!1;get sticky(){return this._sticky}set sticky(e){e!==this._sticky&&(this._sticky=e,this._hasStickyChanged=!0)}_sticky=!1;ngOnChanges(e){super.ngOnChanges(e)}hasStickyChanged(){let e=this._hasStickyChanged;return this.resetStickyChanged(),e}resetStickyChanged(){this._hasStickyChanged=!1}static \u0275fac=(()=>{let e;return function(n){return(e||(e=xe(i)))(n||i)}})();static \u0275dir=T({type:i,selectors:[["","cdkHeaderRowDef",""]],inputs:{columns:[0,"cdkHeaderRowDef","columns"],sticky:[2,"cdkHeaderRowDefSticky","sticky",z]},features:[ie,Ie]})}return i})(),Mc=(()=>{class i extends Sc{_table=m(Pi,{optional:!0});_hasStickyChanged=!1;get sticky(){return this._sticky}set sticky(e){e!==this._sticky&&(this._sticky=e,this._hasStickyChanged=!0)}_sticky=!1;ngOnChanges(e){super.ngOnChanges(e)}hasStickyChanged(){let e=this._hasStickyChanged;return this.resetStickyChanged(),e}resetStickyChanged(){this._hasStickyChanged=!1}static \u0275fac=(()=>{let e;return function(n){return(e||(e=xe(i)))(n||i)}})();static \u0275dir=T({type:i,selectors:[["","cdkFooterRowDef",""]],inputs:{columns:[0,"cdkFooterRowDef","columns"],sticky:[2,"cdkFooterRowDefSticky","sticky",z]},features:[ie,Ie]})}return i})(),ks=(()=>{class i extends Sc{_table=m(Pi,{optional:!0});when;static \u0275fac=(()=>{let e;return function(n){return(e||(e=xe(i)))(n||i)}})();static \u0275dir=T({type:i,selectors:[["","cdkRowDef",""]],inputs:{columns:[0,"cdkRowDefColumns","columns"],when:[0,"cdkRowDefWhen","when"]},features:[ie]})}return i})(),qa=(()=>{class i{_viewContainer=m(it);cells;context;static mostRecentCellOutlet=null;constructor(){i.mostRecentCellOutlet=this}ngOnDestroy(){i.mostRecentCellOutlet===this&&(i.mostRecentCellOutlet=null)}static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,selectors:[["","cdkCellOutlet",""]]})}return i})();var Ec=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275cmp=R({type:i,selectors:[["cdk-row"],["tr","cdk-row",""]],hostAttrs:["role","row",1,"cdk-row"],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,n){t&1&&di(0,0)},dependencies:[qa],encapsulation:2,changeDetection:1})}return i})(),Th=(()=>{class i{templateRef=m(tt);_contentClassNames=["cdk-no-data-row","cdk-row"];_cellClassNames=["cdk-cell","cdk-no-data-cell"];_cellSelector="td, cdk-cell, [cdk-cell], .cdk-cell";static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,selectors:[["ng-template","cdkNoDataRow",""]]})}return i})(),Dh=["top","bottom","left","right"],Dc=class{_isNativeHtmlTable;_stickCellCss;_isBrowser;_needsPositionStickyOnElement;direction;_positionListener;_tableInjector;_elemSizeCache=new WeakMap;_resizeObserver=globalThis?.ResizeObserver?new globalThis.ResizeObserver(o=>this._updateCachedSizes(o)):null;_updatedStickyColumnsParamsToReplay=[];_stickyColumnsReplayTimeout=null;_cachedCellWidths=[];_borderCellCss;_destroyed=!1;constructor(o,e,t=!0,n=!0,a,r,u){this._isNativeHtmlTable=o,this._stickCellCss=e,this._isBrowser=t,this._needsPositionStickyOnElement=n,this.direction=a,this._positionListener=r,this._tableInjector=u,this._borderCellCss={top:`${e}-border-elem-top`,bottom:`${e}-border-elem-bottom`,left:`${e}-border-elem-left`,right:`${e}-border-elem-right`}}clearStickyPositioning(o,e){(e.includes("left")||e.includes("right"))&&this._removeFromStickyColumnReplayQueue(o);let t=[];for(let n of o)n.nodeType===n.ELEMENT_NODE&&t.push(n,...Array.from(n.children));Ge({write:()=>{for(let n of t)this._removeStickyStyle(n,e)}},{injector:this._tableInjector})}updateStickyColumns(o,e,t,n=!0,a=!0){if(!o.length||!this._isBrowser||!(e.some(pe=>pe)||t.some(pe=>pe))){this._positionListener?.stickyColumnsUpdated({sizes:[]}),this._positionListener?.stickyEndColumnsUpdated({sizes:[]});return}let r=o[0],u=r.children.length,h=this.direction==="rtl",f=h?"right":"left",b=h?"left":"right",M=e.lastIndexOf(!0),j=t.indexOf(!0),G,de,Ce;a&&this._updateStickyColumnReplayQueue({rows:[...o],stickyStartStates:[...e],stickyEndStates:[...t]}),Ge({earlyRead:()=>{G=this._getCellWidths(r,n),de=this._getStickyStartColumnPositions(G,e),Ce=this._getStickyEndColumnPositions(G,t)},write:()=>{for(let pe of o)for(let Oe=0;Oe<u;Oe++){let ht=pe.children[Oe];e[Oe]&&this._addStickyStyle(ht,f,de[Oe],Oe===M),t[Oe]&&this._addStickyStyle(ht,b,Ce[Oe],Oe===j)}this._positionListener&&G.some(pe=>!!pe)&&(this._positionListener.stickyColumnsUpdated({sizes:M===-1?[]:G.slice(0,M+1).map((pe,Oe)=>e[Oe]?pe:null)}),this._positionListener.stickyEndColumnsUpdated({sizes:j===-1?[]:G.slice(j).map((pe,Oe)=>t[Oe+j]?pe:null).reverse()}))}},{injector:this._tableInjector})}stickRows(o,e,t){if(!this._isBrowser)return;let n=t==="bottom"?o.slice().reverse():o,a=t==="bottom"?e.slice().reverse():e,r=[],u=[],h=[];Ge({earlyRead:()=>{for(let f=0,b=0;f<n.length;f++){if(!a[f])continue;r[f]=b;let M=n[f];h[f]=this._isNativeHtmlTable?Array.from(M.children):[M];let j=this._retrieveElementSize(M).height;b+=j,u[f]=j}},write:()=>{let f=a.lastIndexOf(!0);for(let b=0;b<n.length;b++){if(!a[b])continue;let M=r[b],j=b===f;for(let G of h[b])this._addStickyStyle(G,t,M,j)}t==="top"?this._positionListener?.stickyHeaderRowsUpdated({sizes:u,offsets:r,elements:h}):this._positionListener?.stickyFooterRowsUpdated({sizes:u,offsets:r,elements:h})}},{injector:this._tableInjector})}updateStickyFooterContainer(o,e){this._isNativeHtmlTable&&Ge({write:()=>{let t=o.querySelector("tfoot");t&&(e.some(n=>!n)?this._removeStickyStyle(t,["bottom"]):this._addStickyStyle(t,"bottom",0,!1))}},{injector:this._tableInjector})}destroy(){this._stickyColumnsReplayTimeout&&clearTimeout(this._stickyColumnsReplayTimeout),this._resizeObserver?.disconnect(),this._destroyed=!0}_removeStickyStyle(o,e){if(!o.classList.contains(this._stickCellCss))return;for(let n of e)o.style[n]="",o.classList.remove(this._borderCellCss[n]);Dh.some(n=>e.indexOf(n)===-1&&o.style[n])?o.style.zIndex=this._getCalculatedZIndex(o):(o.style.zIndex="",this._needsPositionStickyOnElement&&(o.style.position=""),o.classList.remove(this._stickCellCss))}_addStickyStyle(o,e,t,n){o.classList.add(this._stickCellCss),n&&o.classList.add(this._borderCellCss[e]),o.style[e]=`${t}px`,o.style.zIndex=this._getCalculatedZIndex(o),this._needsPositionStickyOnElement&&(o.style.cssText+="position: -webkit-sticky; position: sticky; ")}_getCalculatedZIndex(o){let e={top:100,bottom:10,left:1,right:1},t=0;for(let n of Dh)o.style[n]&&(t+=e[n]);return t?`${t}`:""}_getCellWidths(o,e=!0){if(!e&&this._cachedCellWidths.length)return this._cachedCellWidths;let t=[],n=o.children;for(let a=0;a<n.length;a++){let r=n[a];t.push(this._retrieveElementSize(r).width)}return this._cachedCellWidths=t,t}_getStickyStartColumnPositions(o,e){let t=[],n=0;for(let a=0;a<o.length;a++)e[a]&&(t[a]=n,n+=o[a]);return t}_getStickyEndColumnPositions(o,e){let t=[],n=0;for(let a=o.length;a>0;a--)e[a]&&(t[a]=n,n+=o[a]);return t}_retrieveElementSize(o){let e=this._elemSizeCache.get(o);if(e)return e;let t=o.getBoundingClientRect(),n={width:t.width,height:t.height};return this._resizeObserver&&(this._elemSizeCache.set(o,n),this._resizeObserver.observe(o,{box:"border-box"})),n}_updateStickyColumnReplayQueue(o){this._removeFromStickyColumnReplayQueue(o.rows),this._stickyColumnsReplayTimeout||this._updatedStickyColumnsParamsToReplay.push(o)}_removeFromStickyColumnReplayQueue(o){let e=new Set(o);for(let t of this._updatedStickyColumnsParamsToReplay)t.rows=t.rows.filter(n=>!e.has(n));this._updatedStickyColumnsParamsToReplay=this._updatedStickyColumnsParamsToReplay.filter(t=>!!t.rows.length)}_updateCachedSizes(o){let e=!1;for(let t of o){let n=t.borderBoxSize?.length?{width:t.borderBoxSize[0].inlineSize,height:t.borderBoxSize[0].blockSize}:{width:t.contentRect.width,height:t.contentRect.height};n.width!==this._elemSizeCache.get(t.target)?.width&&zv(t.target)&&(e=!0),this._elemSizeCache.set(t.target,n)}e&&this._updatedStickyColumnsParamsToReplay.length&&(this._stickyColumnsReplayTimeout&&clearTimeout(this._stickyColumnsReplayTimeout),this._stickyColumnsReplayTimeout=setTimeout(()=>{if(!this._destroyed){for(let t of this._updatedStickyColumnsParamsToReplay)this.updateStickyColumns(t.rows,t.stickyStartStates,t.stickyEndStates,!0,!1);this._updatedStickyColumnsParamsToReplay=[],this._stickyColumnsReplayTimeout=null}},0))}};function zv(i){return["cdk-cell","cdk-header-cell","cdk-footer-cell"].some(o=>i.classList.contains(o))}var Wa=new k("STICKY_POSITIONING_LISTENER");var Tc=(()=>{class i{viewContainer=m(it);elementRef=m(B);constructor(){let e=m(Pi);e._rowOutlet=this,e._outletAssigned()}static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,selectors:[["","rowOutlet",""]]})}return i})(),Ac=(()=>{class i{viewContainer=m(it);elementRef=m(B);constructor(){let e=m(Pi);e._headerRowOutlet=this,e._outletAssigned()}static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,selectors:[["","headerRowOutlet",""]]})}return i})(),Ic=(()=>{class i{viewContainer=m(it);elementRef=m(B);constructor(){let e=m(Pi);e._footerRowOutlet=this,e._outletAssigned()}static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,selectors:[["","footerRowOutlet",""]]})}return i})(),Rc=(()=>{class i{viewContainer=m(it);elementRef=m(B);constructor(){let e=m(Pi);e._noDataRowOutlet=this,e._outletAssigned()}static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,selectors:[["","noDataRowOutlet",""]]})}return i})(),Pc=(()=>{class i{_differs=m(ua);_changeDetectorRef=m(se);_elementRef=m(B);_dir=m(Ze,{optional:!0});_platform=m(fe);_viewRepeater;_viewportRuler=m(ni);_injector=m(Z);_virtualScrollViewport=m(wh,{optional:!0,host:!0});_positionListener=m(Wa,{optional:!0})||m(Wa,{optional:!0,skipSelf:!0});_document=m(K);_data;_renderedRange;_onDestroy=new O;_renderRows;_renderChangeSubscription=null;_columnDefsByName=new Map;_rowDefs;_headerRowDefs;_footerRowDefs;_dataDiffer;_defaultRowDef=null;_customColumnDefs=new Set;_customRowDefs=new Set;_customHeaderRowDefs=new Set;_customFooterRowDefs=new Set;_customNoDataRow=null;_headerRowDefChanged=!0;_footerRowDefChanged=!0;_stickyColumnStylesNeedReset=!0;_forceRecalculateCellWidths=!0;_cachedRenderRowsMap=new Map;_isNativeHtmlTable;_stickyStyler;stickyCssClass="cdk-table-sticky";needsPositionStickyOnElement=!0;_isServer;_isShowingNoDataRow=!1;_hasAllOutlets=!1;_hasInitialized=!1;_headerRowStickyUpdates=new O;_footerRowStickyUpdates=new O;_disableVirtualScrolling=!1;_getCellRole(){if(this._cellRoleInternal===void 0){let e=this._elementRef.nativeElement.getAttribute("role");return e==="grid"||e==="treegrid"?"gridcell":"cell"}return this._cellRoleInternal}_cellRoleInternal=void 0;get trackBy(){return this._trackByFn}set trackBy(e){this._trackByFn=e}_trackByFn;get dataSource(){return this._dataSource}set dataSource(e){this._dataSource!==e&&(this._switchDataSource(e),this._changeDetectorRef.markForCheck())}_dataSource;_dataSourceChanges=new O;_dataStream=new O;get multiTemplateDataRows(){return this._multiTemplateDataRows}set multiTemplateDataRows(e){this._multiTemplateDataRows=e,this._rowOutlet&&this._rowOutlet.viewContainer.length&&(this._forceRenderDataRows(),this.updateStickyColumnStyles())}_multiTemplateDataRows=!1;get fixedLayout(){return this._virtualScrollEnabled()?!0:this._fixedLayout}set fixedLayout(e){this._fixedLayout=e,this._forceRecalculateCellWidths=!0,this._stickyColumnStylesNeedReset=!0}_fixedLayout=!1;recycleRows=!1;contentChanged=new X;viewChange=new _o({start:0,end:Number.MAX_VALUE});_rowOutlet;_headerRowOutlet;_footerRowOutlet;_noDataRowOutlet;_contentColumnDefs;_contentRowDefs;_contentHeaderRowDefs;_contentFooterRowDefs;_noDataRow;get renderedRows(){return this._renderRows}constructor(){m(new zi("role"),{optional:!0})||this._elementRef.nativeElement.setAttribute("role","table"),this._isServer=!this._platform.isBrowser,this._isNativeHtmlTable=this._elementRef.nativeElement.nodeName==="TABLE",this._dataDiffer=this._differs.find([]).create((t,n)=>this.trackBy?this.trackBy(n.dataIndex,n.data):n)}ngOnInit(){this._setupStickyStyler(),this._viewportRuler.change().pipe(ue(this._onDestroy)).subscribe(()=>{this._forceRecalculateCellWidths=!0})}ngAfterContentInit(){this._viewRepeater=this.recycleRows||this._virtualScrollEnabled()?new xs:new ws,this._virtualScrollEnabled()&&this._setupVirtualScrolling(this._virtualScrollViewport),this._hasInitialized=!0}ngAfterContentChecked(){this._canRender()&&this._render()}ngOnDestroy(){this._stickyStyler?.destroy(),[this._rowOutlet?.viewContainer,this._headerRowOutlet?.viewContainer,this._footerRowOutlet?.viewContainer,this._cachedRenderRowsMap,this._customColumnDefs,this._customRowDefs,this._customHeaderRowDefs,this._customFooterRowDefs,this._columnDefsByName].forEach(e=>{e?.clear()}),this._headerRowDefs=[],this._footerRowDefs=[],this._defaultRowDef=null,this._headerRowStickyUpdates.complete(),this._footerRowStickyUpdates.complete(),this._onDestroy.next(),this._onDestroy.complete(),Cs(this.dataSource)&&this.dataSource.disconnect(this)}renderRows(){this._renderRows=this._getAllRenderRows();let e=this._dataDiffer.diff(this._renderRows);if(!e){this._updateNoDataRow(),this.contentChanged.next();return}let t=this._rowOutlet.viewContainer;this._viewRepeater.applyChanges(e,t,(n,a,r)=>this._getEmbeddedViewArgs(n.item,r),n=>n.item.data,n=>{n.operation===Ii.INSERTED&&n.context&&this._renderCellTemplateForItem(n.record.item.rowDef,n.context)}),this._updateRowIndexContext(),e.forEachIdentityChange(n=>{let a=t.get(n.currentIndex);a.context.$implicit=n.item.data}),this._updateNoDataRow(),this.contentChanged.next(),this.updateStickyColumnStyles()}addColumnDef(e){this._customColumnDefs.add(e)}removeColumnDef(e){this._customColumnDefs.delete(e)}addRowDef(e){this._customRowDefs.add(e)}removeRowDef(e){this._customRowDefs.delete(e)}addHeaderRowDef(e){this._customHeaderRowDefs.add(e),this._headerRowDefChanged=!0}removeHeaderRowDef(e){this._customHeaderRowDefs.delete(e),this._headerRowDefChanged=!0}addFooterRowDef(e){this._customFooterRowDefs.add(e),this._footerRowDefChanged=!0}removeFooterRowDef(e){this._customFooterRowDefs.delete(e),this._footerRowDefChanged=!0}setNoDataRow(e){this._customNoDataRow=e}updateStickyHeaderRowStyles(){let e=this._getRenderedRows(this._headerRowOutlet);if(this._isNativeHtmlTable){let n=Sh(this._headerRowOutlet,"thead");n&&(n.style.display=e.length?"":"none")}let t=this._headerRowDefs.map(n=>n.sticky);this._stickyStyler.clearStickyPositioning(e,["top"]),this._stickyStyler.stickRows(e,t,"top"),this._headerRowDefs.forEach(n=>n.resetStickyChanged())}updateStickyFooterRowStyles(){let e=this._getRenderedRows(this._footerRowOutlet);if(this._isNativeHtmlTable){let n=Sh(this._footerRowOutlet,"tfoot");n&&(n.style.display=e.length?"":"none")}let t=this._footerRowDefs.map(n=>n.sticky);this._stickyStyler.clearStickyPositioning(e,["bottom"]),this._stickyStyler.stickRows(e,t,"bottom"),this._stickyStyler.updateStickyFooterContainer(this._elementRef.nativeElement,t),this._footerRowDefs.forEach(n=>n.resetStickyChanged())}updateStickyColumnStyles(){let e=this._getRenderedRows(this._headerRowOutlet),t=this._getRenderedRows(this._rowOutlet),n=this._getRenderedRows(this._footerRowOutlet);(this._isNativeHtmlTable&&!this.fixedLayout||this._stickyColumnStylesNeedReset)&&(this._stickyStyler.clearStickyPositioning([...e,...t,...n],["left","right"]),this._stickyColumnStylesNeedReset=!1),e.forEach((a,r)=>{this._addStickyColumnStyles([a],this._headerRowDefs[r])}),this._rowDefs.forEach(a=>{let r=[];for(let u=0;u<t.length;u++)this._renderRows[u].rowDef===a&&r.push(t[u]);this._addStickyColumnStyles(r,a)}),n.forEach((a,r)=>{this._addStickyColumnStyles([a],this._footerRowDefs[r])}),Array.from(this._columnDefsByName.values()).forEach(a=>a.resetStickyChanged())}stickyColumnsUpdated(e){this._positionListener?.stickyColumnsUpdated(e)}stickyEndColumnsUpdated(e){this._positionListener?.stickyEndColumnsUpdated(e)}stickyHeaderRowsUpdated(e){this._headerRowStickyUpdates.next(e),this._positionListener?.stickyHeaderRowsUpdated(e)}stickyFooterRowsUpdated(e){this._footerRowStickyUpdates.next(e),this._positionListener?.stickyFooterRowsUpdated(e)}_outletAssigned(){!this._hasAllOutlets&&this._rowOutlet&&this._headerRowOutlet&&this._footerRowOutlet&&this._noDataRowOutlet&&(this._hasAllOutlets=!0,this._canRender()&&this._render())}_canRender(){return this._hasAllOutlets&&this._hasInitialized}_render(){this._cacheRowDefs(),this._cacheColumnDefs(),!this._headerRowDefs.length&&!this._footerRowDefs.length&&this._rowDefs.length;let t=this._renderUpdatedColumns()||this._headerRowDefChanged||this._footerRowDefChanged;this._stickyColumnStylesNeedReset=this._stickyColumnStylesNeedReset||t,this._forceRecalculateCellWidths=t,this._headerRowDefChanged&&(this._forceRenderHeaderRows(),this._headerRowDefChanged=!1),this._footerRowDefChanged&&(this._forceRenderFooterRows(),this._footerRowDefChanged=!1),this.dataSource&&this._rowDefs.length>0&&!this._renderChangeSubscription?this._observeRenderChanges():this._stickyColumnStylesNeedReset&&this.updateStickyColumnStyles(),this._checkStickyStates()}_getAllRenderRows(){if(!Array.isArray(this._data)||!this._renderedRange)return[];let e=[],t=Math.min(this._data.length,this._renderedRange.end),n=this._cachedRenderRowsMap;this._cachedRenderRowsMap=new Map;for(let a=this._renderedRange.start;a<t;a++){let r=this._data[a],u=this._getRenderRowsForData(r,a,n.get(r));this._cachedRenderRowsMap.has(r)||this._cachedRenderRowsMap.set(r,new WeakMap);for(let h=0;h<u.length;h++){let f=u[h],b=this._cachedRenderRowsMap.get(f.data);b.has(f.rowDef)?b.get(f.rowDef).push(f):b.set(f.rowDef,[f]),e.push(f)}}return e}_getRenderRowsForData(e,t,n){return this._getRowDefs(e,t).map(r=>{let u=n&&n.has(r)?n.get(r):[];if(u.length){let h=u.shift();return h.dataIndex=t,h}else return{data:e,rowDef:r,dataIndex:t}})}_cacheColumnDefs(){this._columnDefsByName.clear(),Ds(this._getOwnDefs(this._contentColumnDefs),this._customColumnDefs).forEach(t=>{this._columnDefsByName.has(t.name),this._columnDefsByName.set(t.name,t)})}_cacheRowDefs(){this._headerRowDefs=Ds(this._getOwnDefs(this._contentHeaderRowDefs),this._customHeaderRowDefs),this._footerRowDefs=Ds(this._getOwnDefs(this._contentFooterRowDefs),this._customFooterRowDefs),this._rowDefs=Ds(this._getOwnDefs(this._contentRowDefs),this._customRowDefs);let e=this._rowDefs.filter(t=>!t.when);this._defaultRowDef=e[0]}_renderUpdatedColumns(){let e=(r,u)=>{let h=!!u.getColumnsDiff();return r||h},t=this._rowDefs.reduce(e,!1);t&&this._forceRenderDataRows();let n=this._headerRowDefs.reduce(e,!1);n&&this._forceRenderHeaderRows();let a=this._footerRowDefs.reduce(e,!1);return a&&this._forceRenderFooterRows(),t||n||a}_switchDataSource(e){this._data=[],Cs(this.dataSource)&&this.dataSource.disconnect(this),this._renderChangeSubscription&&(this._renderChangeSubscription.unsubscribe(),this._renderChangeSubscription=null),e||(this._dataDiffer&&this._dataDiffer.diff([]),this._rowOutlet&&this._rowOutlet.viewContainer.clear()),this._dataSource=e}_observeRenderChanges(){if(!this.dataSource)return;let e;Cs(this.dataSource)?e=this.dataSource.connect(this):Js(this.dataSource)?e=this.dataSource:Array.isArray(this.dataSource)&&(e=ge(this.dataSource)),this._renderChangeSubscription=vo([e,this.viewChange]).pipe(ue(this._onDestroy)).subscribe(([t,n])=>{this._data=t||[],this._renderedRange=n,this._dataStream.next(t),this.renderRows()})}_forceRenderHeaderRows(){this._headerRowOutlet.viewContainer.length>0&&this._headerRowOutlet.viewContainer.clear(),this._headerRowDefs.forEach((e,t)=>this._renderRow(this._headerRowOutlet,e,t)),this.updateStickyHeaderRowStyles()}_forceRenderFooterRows(){this._footerRowOutlet.viewContainer.length>0&&this._footerRowOutlet.viewContainer.clear(),this._footerRowDefs.forEach((e,t)=>this._renderRow(this._footerRowOutlet,e,t)),this.updateStickyFooterRowStyles()}_addStickyColumnStyles(e,t){let n=Array.from(t?.columns||[]).map(u=>{let h=this._columnDefsByName.get(u);return h}),a=n.map(u=>u.sticky),r=n.map(u=>u.stickyEnd);this._stickyStyler.updateStickyColumns(e,a,r,!this.fixedLayout||this._forceRecalculateCellWidths)}_getRenderedRows(e){let t=[];for(let n=0;n<e.viewContainer.length;n++){let a=e.viewContainer.get(n);t.push(a.rootNodes[0])}return t}_getRowDefs(e,t){if(this._rowDefs.length===1)return[this._rowDefs[0]];let n=[];if(this.multiTemplateDataRows)n=this._rowDefs.filter(a=>!a.when||a.when(t,e));else{let a=this._rowDefs.find(r=>r.when&&r.when(t,e))||this._defaultRowDef;a&&n.push(a)}return n.length,n}_getEmbeddedViewArgs(e,t){let n=e.rowDef,a={$implicit:e.data};return{templateRef:n.template,context:a,index:t}}_renderRow(e,t,n,a={}){let r=e.viewContainer.createEmbeddedView(t.template,a,n);return this._renderCellTemplateForItem(t,a),r}_renderCellTemplateForItem(e,t){for(let n of this._getCellTemplates(e))qa.mostRecentCellOutlet&&qa.mostRecentCellOutlet._viewContainer.createEmbeddedView(n,t);this._changeDetectorRef.markForCheck()}_updateRowIndexContext(){let e=this._rowOutlet.viewContainer;for(let t=0,n=e.length;t<n;t++){let r=e.get(t).context;r.count=n,r.first=t===0,r.last=t===n-1,r.even=t%2===0,r.odd=!r.even,this.multiTemplateDataRows?(r.dataIndex=this._renderRows[t].dataIndex,r.renderIndex=t):r.index=this._renderRows[t].dataIndex}}_getCellTemplates(e){return!e||!e.columns?[]:Array.from(e.columns,t=>{let n=this._columnDefsByName.get(t);return e.extractCellTemplate(n)})}_forceRenderDataRows(){this._dataDiffer.diff([]),this._rowOutlet.viewContainer.clear(),this.renderRows()}_checkStickyStates(){let e=(t,n)=>t||n.hasStickyChanged();this._headerRowDefs.reduce(e,!1)&&this.updateStickyHeaderRowStyles(),this._footerRowDefs.reduce(e,!1)&&this.updateStickyFooterRowStyles(),Array.from(this._columnDefsByName.values()).reduce(e,!1)&&(this._stickyColumnStylesNeedReset=!0,this.updateStickyColumnStyles())}_setupStickyStyler(){let e=this._dir?this._dir.value:"ltr",t=this._injector;this._stickyStyler=new Dc(this._isNativeHtmlTable,this.stickyCssClass,this._platform.isBrowser,this.needsPositionStickyOnElement,e,this,t),(this._dir?this._dir.change:ge()).pipe(ue(this._onDestroy)).subscribe(n=>{this._stickyStyler.direction=n,this.updateStickyColumnStyles()})}_setupVirtualScrolling(e){let t=typeof requestAnimationFrame<"u"?Qs:Zs;this.viewChange.next({start:0,end:0}),e.renderedRangeStream.pipe(la(0,t),ue(this._onDestroy)).subscribe(this.viewChange),e.attach({dataStream:this._dataStream,measureRangeSize:(n,a)=>this._measureRangeSize(n,a)}),vo([e.renderedContentOffset,this._headerRowStickyUpdates]).pipe(ue(this._onDestroy)).subscribe(([n,a])=>{if(!(!a.sizes||!a.offsets||!a.elements))for(let r=0;r<a.elements.length;r++){let u=a.elements[r];if(u){let h=a.offsets[r],f=n!==0?Math.max(n-h,h):-h;for(let b of u)b.style.top=`${-f}px`}}}),vo([e.renderedContentOffset,this._footerRowStickyUpdates]).pipe(ue(this._onDestroy)).subscribe(([n,a])=>{if(!(!a.sizes||!a.offsets||!a.elements))for(let r=0;r<a.elements.length;r++){let u=a.elements[r];if(u)for(let h of u)h.style.bottom=`${n+a.offsets[r]}px`}})}_getOwnDefs(e){return e.filter(t=>!t._table||t._table===this)}_updateNoDataRow(){let e=this._customNoDataRow||this._noDataRow;if(!e)return;let t=this._rowOutlet.viewContainer.length===0;if(t===this._isShowingNoDataRow)return;let n=this._noDataRowOutlet.viewContainer;if(t){let a=n.createEmbeddedView(e.templateRef),r=a.rootNodes[0];if(a.rootNodes.length===1&&r?.nodeType===this._document.ELEMENT_NODE){r.setAttribute("role","row"),r.classList.add(...e._contentClassNames);let u=r.querySelectorAll(e._cellSelector);for(let h=0;h<u.length;h++)u[h].classList.add(...e._cellClassNames)}}else n.clear();this._isShowingNoDataRow=t,this._changeDetectorRef.markForCheck()}_measureRangeSize(e,t){if(e.start>=e.end||t!=="vertical")return 0;let n=this.viewChange.value,a=this._rowOutlet.viewContainer;e.start<n.start||e.end>n.end;let r=e.start-n.start,u=e.end-e.start,h,f;for(let j=0;j<u;j++){let G=a.get(j+r);if(G&&G.rootNodes.length){h=f=G.rootNodes[0];break}}for(let j=u-1;j>-1;j--){let G=a.get(j+r);if(G&&G.rootNodes.length){f=G.rootNodes[G.rootNodes.length-1];break}}let b=h?.getBoundingClientRect?.(),M=f?.getBoundingClientRect?.();return b&&M?M.bottom-b.top:0}_virtualScrollEnabled(){return!this._disableVirtualScrolling&&this._virtualScrollViewport!=null}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=R({type:i,selectors:[["cdk-table"],["table","cdk-table",""]],contentQueries:function(t,n,a){if(t&1&&dt(a,Th,5)(a,Ka,5)(a,ks,5)(a,kc,5)(a,Mc,5),t&2){let r;N(r=L())&&(n._noDataRow=r.first),N(r=L())&&(n._contentColumnDefs=r),N(r=L())&&(n._contentRowDefs=r),N(r=L())&&(n._contentHeaderRowDefs=r),N(r=L())&&(n._contentFooterRowDefs=r)}},hostAttrs:[1,"cdk-table"],hostVars:2,hostBindings:function(t,n){t&2&&p("cdk-table-fixed-layout",n.fixedLayout)},inputs:{trackBy:"trackBy",dataSource:"dataSource",multiTemplateDataRows:[2,"multiTemplateDataRows","multiTemplateDataRows",z],fixedLayout:[2,"fixedLayout","fixedLayout",z],recycleRows:[2,"recycleRows","recycleRows",z]},outputs:{contentChanged:"contentChanged"},exportAs:["cdkTable"],features:[le([{provide:Pi,useExisting:i},{provide:Wa,useValue:null}])],ngContentSelectors:Nv,decls:5,vars:2,consts:[["role","rowgroup"],["headerRowOutlet",""],["rowOutlet",""],["noDataRowOutlet",""],["footerRowOutlet",""]],template:function(t,n){t&1&&(ve(Fv),W(0),W(1,1),w(2,Lv,1,0),w(3,Vv,7,0)(4,Bv,4,0)),t&2&&(c(2),D(n._isServer?2:-1),c(),D(n._isNativeHtmlTable?3:4))},dependencies:[Ac,Tc,Rc,Ic],styles:[`.cdk-table-fixed-layout {
2224
2224
  table-layout: fixed;
2225
2225
  }
2226
- `],encapsulation:2,changeDetection:1})}return i})();function Ds(i,o){return i.concat(Array.from(o))}function Sh(i,o){let e=o.toUpperCase(),t=i.viewContainer.element.nativeElement;for(;t;){let n=t.nodeType===1?t.nodeName:null;if(n===e)return t;if(n==="TABLE")break;t=t.parentNode}return null}var Ah=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=U({type:i});static \u0275inj=H({imports:[Ga]})}return i})();var Xa=class{_multiple;_emitChanges;compareWith;_selection=new Set;_deselectedToEmit=[];_selectedToEmit=[];_selected=null;get selected(){return this._selected||(this._selected=Array.from(this._selection.values())),this._selected}changed=new O;bulk={select:o=>this._select(o),deselect:o=>this._deselect(o),setSelection:o=>this._setSelection(o)};constructor(o=!1,e,t=!0,n){this._multiple=o,this._emitChanges=t,this.compareWith=n,e&&e.length&&(o?e.forEach(a=>this._markSelected(a)):this._markSelected(e[0]),this._selectedToEmit.length=0)}select(...o){return this._select(o)}deselect(...o){return this._deselect(o)}setSelection(...o){return this._setSelection(o)}toggle(o){return this.isSelected(o)?this.deselect(o):this.select(o)}clear(o=!0){this._unmarkAll();let e=this._hasQueuedChanges();return o&&this._emitChangeEvent(),e}isSelected(o){return this._selection.has(this._getConcreteValue(o))}isEmpty(){return this._selection.size===0}hasValue(){return!this.isEmpty()}sort(o){this._multiple&&this.selected&&this._selected.sort(o)}isMultipleSelection(){return this._multiple}_select(o){this._verifyValueAssignment(o),o.forEach(t=>this._markSelected(t));let e=this._hasQueuedChanges();return this._emitChangeEvent(),e}_deselect(o){this._verifyValueAssignment(o),o.forEach(t=>this._unmarkSelected(t));let e=this._hasQueuedChanges();return this._emitChangeEvent(),e}_setSelection(o){this._verifyValueAssignment(o);let e=this.selected,t=new Set(o.map(a=>this._getConcreteValue(a)));o.forEach(a=>this._markSelected(a)),e.filter(a=>!t.has(this._getConcreteValue(a,t))).forEach(a=>this._unmarkSelected(a));let n=this._hasQueuedChanges();return this._emitChangeEvent(),n}_emitChangeEvent(){this._selected=null,(this._selectedToEmit.length||this._deselectedToEmit.length)&&(this.changed.next({source:this,added:this._selectedToEmit,removed:this._deselectedToEmit}),this._deselectedToEmit=[],this._selectedToEmit=[])}_markSelected(o){o=this._getConcreteValue(o),this.isSelected(o)||(this._multiple||this._unmarkAll(),this.isSelected(o)||this._selection.add(o),this._emitChanges&&this._selectedToEmit.push(o))}_unmarkSelected(o){o=this._getConcreteValue(o),this.isSelected(o)&&(this._selection.delete(o),this._emitChanges&&this._deselectedToEmit.push(o))}_unmarkAll(){this.isEmpty()||this._selection.forEach(o=>this._unmarkSelected(o))}_verifyValueAssignment(o){o.length>1&&this._multiple}_hasQueuedChanges(){return!!(this._deselectedToEmit.length||this._selectedToEmit.length)}_getConcreteValue(o,e){if(this.compareWith){e=e??this._selection;for(let t of e)if(this.compareWith(o,t))return t;return o}else return o}};var Ya=(()=>{class i{_listeners=[];notify(e,t){for(let n of this._listeners)n(e,t)}listen(e){return this._listeners.push(e),()=>{this._listeners=this._listeners.filter(t=>e!==t)}}ngOnDestroy(){this._listeners=[]}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();var zv=[[["caption"]],[["colgroup"],["col"]],"*"],jv=["caption","colgroup, col","*"];function Hv(i,o){i&1&&W(0,2)}function Uv(i,o){i&1&&(s(0,"thead",0),di(1,1),l(),s(2,"tbody",2),di(3,3)(4,4),l(),s(5,"tfoot",0),di(6,5),l())}function $v(i,o){i&1&&di(0,1)(1,3)(2,4)(3,5)}var Ih=(()=>{class i extends Pc{stickyCssClass="mat-mdc-table-sticky";needsPositionStickyOnElement=!1;static \u0275fac=(()=>{let e;return function(n){return(e||(e=xe(i)))(n||i)}})();static \u0275cmp=R({type:i,selectors:[["mat-table"],["table","mat-table",""]],hostAttrs:[1,"mat-mdc-table","mdc-data-table__table"],hostVars:2,hostBindings:function(t,n){t&2&&p("mat-table-fixed-layout",n.fixedLayout)},exportAs:["matTable"],features:[le([{provide:Pc,useExisting:i},{provide:Pi,useExisting:i},{provide:Wa,useValue:null}]),ie],ngContentSelectors:jv,decls:5,vars:2,consts:[["role","rowgroup"],["headerRowOutlet",""],["role","rowgroup",1,"mdc-data-table__content"],["rowOutlet",""],["noDataRowOutlet",""],["footerRowOutlet",""]],template:function(t,n){t&1&&(ve(zv),W(0),W(1,1),w(2,Hv,1,0),w(3,Uv,7,0)(4,$v,4,0)),t&2&&(c(2),D(n._isServer?2:-1),c(),D(n._isNativeHtmlTable?3:4))},dependencies:[Ac,Tc,Rc,Ic],styles:[`.mat-mdc-table-sticky {
2226
+ `],encapsulation:2,changeDetection:1})}return i})();function Ds(i,o){return i.concat(Array.from(o))}function Sh(i,o){let e=o.toUpperCase(),t=i.viewContainer.element.nativeElement;for(;t;){let n=t.nodeType===1?t.nodeName:null;if(n===e)return t;if(n==="TABLE")break;t=t.parentNode}return null}var Ah=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=U({type:i});static \u0275inj=H({imports:[Ga]})}return i})();var Xa=class{_multiple;_emitChanges;compareWith;_selection=new Set;_deselectedToEmit=[];_selectedToEmit=[];_selected=null;get selected(){return this._selected||(this._selected=Array.from(this._selection.values())),this._selected}changed=new O;bulk={select:o=>this._select(o),deselect:o=>this._deselect(o),setSelection:o=>this._setSelection(o)};constructor(o=!1,e,t=!0,n){this._multiple=o,this._emitChanges=t,this.compareWith=n,e&&e.length&&(o?e.forEach(a=>this._markSelected(a)):this._markSelected(e[0]),this._selectedToEmit.length=0)}select(...o){return this._select(o)}deselect(...o){return this._deselect(o)}setSelection(...o){return this._setSelection(o)}toggle(o){return this.isSelected(o)?this.deselect(o):this.select(o)}clear(o=!0){this._unmarkAll();let e=this._hasQueuedChanges();return o&&this._emitChangeEvent(),e}isSelected(o){return this._selection.has(this._getConcreteValue(o))}isEmpty(){return this._selection.size===0}hasValue(){return!this.isEmpty()}sort(o){this._multiple&&this.selected&&this._selected.sort(o)}isMultipleSelection(){return this._multiple}_select(o){this._verifyValueAssignment(o),o.forEach(t=>this._markSelected(t));let e=this._hasQueuedChanges();return this._emitChangeEvent(),e}_deselect(o){this._verifyValueAssignment(o),o.forEach(t=>this._unmarkSelected(t));let e=this._hasQueuedChanges();return this._emitChangeEvent(),e}_setSelection(o){this._verifyValueAssignment(o);let e=this.selected,t=new Set(o.map(a=>this._getConcreteValue(a)));o.forEach(a=>this._markSelected(a)),e.filter(a=>!t.has(this._getConcreteValue(a,t))).forEach(a=>this._unmarkSelected(a));let n=this._hasQueuedChanges();return this._emitChangeEvent(),n}_emitChangeEvent(){this._selected=null,(this._selectedToEmit.length||this._deselectedToEmit.length)&&(this.changed.next({source:this,added:this._selectedToEmit,removed:this._deselectedToEmit}),this._deselectedToEmit=[],this._selectedToEmit=[])}_markSelected(o){o=this._getConcreteValue(o),this.isSelected(o)||(this._multiple||this._unmarkAll(),this.isSelected(o)||this._selection.add(o),this._emitChanges&&this._selectedToEmit.push(o))}_unmarkSelected(o){o=this._getConcreteValue(o),this.isSelected(o)&&(this._selection.delete(o),this._emitChanges&&this._deselectedToEmit.push(o))}_unmarkAll(){this.isEmpty()||this._selection.forEach(o=>this._unmarkSelected(o))}_verifyValueAssignment(o){o.length>1&&this._multiple}_hasQueuedChanges(){return!!(this._deselectedToEmit.length||this._selectedToEmit.length)}_getConcreteValue(o,e){if(this.compareWith){e=e??this._selection;for(let t of e)if(this.compareWith(o,t))return t;return o}else return o}};var Ya=(()=>{class i{_listeners=[];notify(e,t){for(let n of this._listeners)n(e,t)}listen(e){return this._listeners.push(e),()=>{this._listeners=this._listeners.filter(t=>e!==t)}}ngOnDestroy(){this._listeners=[]}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();var jv=[[["caption"]],[["colgroup"],["col"]],"*"],Hv=["caption","colgroup, col","*"];function Uv(i,o){i&1&&W(0,2)}function $v(i,o){i&1&&(s(0,"thead",0),di(1,1),l(),s(2,"tbody",2),di(3,3)(4,4),l(),s(5,"tfoot",0),di(6,5),l())}function Gv(i,o){i&1&&di(0,1)(1,3)(2,4)(3,5)}var Ih=(()=>{class i extends Pc{stickyCssClass="mat-mdc-table-sticky";needsPositionStickyOnElement=!1;static \u0275fac=(()=>{let e;return function(n){return(e||(e=xe(i)))(n||i)}})();static \u0275cmp=R({type:i,selectors:[["mat-table"],["table","mat-table",""]],hostAttrs:[1,"mat-mdc-table","mdc-data-table__table"],hostVars:2,hostBindings:function(t,n){t&2&&p("mat-table-fixed-layout",n.fixedLayout)},exportAs:["matTable"],features:[le([{provide:Pc,useExisting:i},{provide:Pi,useExisting:i},{provide:Wa,useValue:null}]),ie],ngContentSelectors:Hv,decls:5,vars:2,consts:[["role","rowgroup"],["headerRowOutlet",""],["role","rowgroup",1,"mdc-data-table__content"],["rowOutlet",""],["noDataRowOutlet",""],["footerRowOutlet",""]],template:function(t,n){t&1&&(ve(jv),W(0),W(1,1),w(2,Uv,1,0),w(3,$v,7,0)(4,Gv,4,0)),t&2&&(c(2),D(n._isServer?2:-1),c(),D(n._isNativeHtmlTable?3:4))},dependencies:[Ac,Tc,Rc,Ic],styles:[`.mat-mdc-table-sticky {
2227
2227
  position: sticky !important;
2228
2228
  }
2229
2229
 
@@ -2400,7 +2400,7 @@ mat-cell.mat-mdc-cell,
2400
2400
  mat-footer-cell.mat-mdc-footer-cell {
2401
2401
  align-self: stretch;
2402
2402
  }
2403
- `],encapsulation:2,changeDetection:1})}return i})(),Rh=(()=>{class i extends Ss{static \u0275fac=(()=>{let e;return function(n){return(e||(e=xe(i)))(n||i)}})();static \u0275dir=T({type:i,selectors:[["","matCellDef",""]],features:[le([{provide:Ss,useExisting:i}]),ie]})}return i})();var Ph=(()=>{class i extends Ka{get name(){return this._name}set name(e){this._setNameInput(e)}_updateColumnCssClassName(){super._updateColumnCssClassName(),this._columnCssClassName.push(`mat-column-${this.cssClassFriendlyName}`)}static \u0275fac=(()=>{let e;return function(n){return(e||(e=xe(i)))(n||i)}})();static \u0275dir=T({type:i,selectors:[["","matColumnDef",""]],inputs:{name:[0,"matColumnDef","name"]},features:[le([{provide:Ka,useExisting:i}]),ie]})}return i})();var Oh=(()=>{class i extends Eh{static \u0275fac=(()=>{let e;return function(n){return(e||(e=xe(i)))(n||i)}})();static \u0275dir=T({type:i,selectors:[["mat-cell"],["td","mat-cell",""]],hostAttrs:[1,"mat-mdc-cell","mdc-data-table__cell"],features:[ie]})}return i})();var Fh=(()=>{class i extends ks{static \u0275fac=(()=>{let e;return function(n){return(e||(e=xe(i)))(n||i)}})();static \u0275dir=T({type:i,selectors:[["","matRowDef",""]],inputs:{columns:[0,"matRowDefColumns","columns"],when:[0,"matRowDefWhen","when"]},features:[le([{provide:ks,useExisting:i}]),ie]})}return i})();var Nh=(()=>{class i extends Ec{static \u0275fac=(()=>{let e;return function(n){return(e||(e=xe(i)))(n||i)}})();static \u0275cmp=R({type:i,selectors:[["mat-row"],["tr","mat-row",""]],hostAttrs:["role","row",1,"mat-mdc-row","mdc-data-table__row"],exportAs:["matRow"],features:[le([{provide:Ec,useExisting:i}]),ie],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,n){t&1&&di(0,0)},dependencies:[qa],encapsulation:2,changeDetection:1})}return i})();var Lh=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=U({type:i});static \u0275inj=H({imports:[Ah,ce]})}return i})();var Wv=["*",[["mat-chip-avatar"],["","matChipAvatar",""]],[["mat-chip-trailing-icon"],["","matChipRemove",""],["","matChipTrailingIcon",""]]],qv=["*","mat-chip-avatar, [matChipAvatar]","mat-chip-trailing-icon,[matChipRemove],[matChipTrailingIcon]"];function Kv(i,o){i&1&&(s(0,"span",3),W(1,1),l())}function Xv(i,o){i&1&&(s(0,"span",6),W(1,2),l())}var Yv=["*"];var Zv=new k("mat-chips-default-options",{providedIn:"root",factory:()=>({separatorKeyCodes:[13]})}),Vh=new k("MatChipAvatar"),Bh=new k("MatChipTrailingIcon"),zh=new k("MatChipEdit"),jh=new k("MatChipRemove"),Hh=new k("MatChip"),Uh=(()=>{class i{_elementRef=m(B);_parentChip=m(Hh);_isPrimary=!0;_isLeading=!1;get disabled(){return this._disabled||this._parentChip?.disabled||!1}set disabled(e){this._disabled=e}_disabled=!1;tabIndex=-1;_allowFocusWhenDisabled=!1;_getDisabledAttribute(){return this.disabled&&!this._allowFocusWhenDisabled?"":null}constructor(){m(Be).load($t),this._elementRef.nativeElement.nodeName==="BUTTON"&&this._elementRef.nativeElement.setAttribute("type","button")}focus(){this._elementRef.nativeElement.focus()}static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,selectors:[["","matChipContent",""]],hostAttrs:[1,"mat-mdc-chip-action","mdc-evolution-chip__action","mdc-evolution-chip__action--presentational"],hostVars:8,hostBindings:function(t,n){t&2&&(J("disabled",n._getDisabledAttribute())("aria-disabled",n.disabled),p("mdc-evolution-chip__action--primary",n._isPrimary)("mdc-evolution-chip__action--secondary",!n._isPrimary)("mdc-evolution-chip__action--trailing",!n._isPrimary&&!n._isLeading))},inputs:{disabled:[2,"disabled","disabled",z],tabIndex:[2,"tabIndex","tabIndex",e=>e==null?-1:jt(e)],_allowFocusWhenDisabled:"_allowFocusWhenDisabled"}})}return i})(),Qv=(()=>{class i extends Uh{_getTabindex(){return this.disabled&&!this._allowFocusWhenDisabled?null:this.tabIndex.toString()}_handleClick(e){!this.disabled&&this._isPrimary&&(e.preventDefault(),this._parentChip._handlePrimaryActionInteraction())}_handleKeydown(e){(e.keyCode===13||e.keyCode===32)&&!this.disabled&&this._isPrimary&&!this._parentChip._isEditing&&(e.preventDefault(),this._parentChip._handlePrimaryActionInteraction())}static \u0275fac=(()=>{let e;return function(n){return(e||(e=xe(i)))(n||i)}})();static \u0275dir=T({type:i,selectors:[["","matChipAction",""]],hostVars:3,hostBindings:function(t,n){t&1&&S("click",function(r){return n._handleClick(r)})("keydown",function(r){return n._handleKeydown(r)}),t&2&&(J("tabindex",n._getTabindex()),p("mdc-evolution-chip__action--presentational",!1))},features:[ie]})}return i})();var Za=(()=>{class i{_changeDetectorRef=m(se);_elementRef=m(B);_tagName=m(Ad);_ngZone=m($);_focusMonitor=m(Xt);_globalRippleOptions=m(lo,{optional:!0});_document=m(K);_onFocus=new O;_onBlur=new O;_isBasicChip=!1;role=null;_hasFocusInternal=!1;_pendingFocus=!1;_actionChanges;_animationsDisabled=ye();_allLeadingIcons;_allTrailingIcons;_allEditIcons;_allRemoveIcons;_hasFocus(){return this._hasFocusInternal}id=m(De).getId("mat-mdc-chip-");ariaLabel=null;ariaDescription=null;_chipListDisabled=!1;_hadFocusOnRemove=!1;_textElement;get value(){return this._value!==void 0?this._value:this._textElement.textContent.trim()}set value(e){this._value=e}_value;color;removable=!0;highlighted=!1;disableRipple=!1;get disabled(){return this._disabled||this._chipListDisabled}set disabled(e){this._disabled=e}_disabled=!1;removed=new X;destroyed=new X;basicChipAttrName="mat-basic-chip";leadingIcon;editIcon;trailingIcon;removeIcon;primaryAction;_rippleLoader=m(bs);_injector=m(Z);constructor(){let e=m(Be);e.load($t),e.load(Sn),this._monitorFocus(),this._rippleLoader?.configureRipple(this._elementRef.nativeElement,{className:"mat-mdc-chip-ripple",disabled:this._isRippleDisabled()})}ngOnInit(){this._isBasicChip=this._elementRef.nativeElement.hasAttribute(this.basicChipAttrName)||this._tagName.toLowerCase()===this.basicChipAttrName}ngAfterViewInit(){this._textElement=this._elementRef.nativeElement.querySelector(".mat-mdc-chip-action-label"),this._pendingFocus&&(this._pendingFocus=!1,this.focus())}ngAfterContentInit(){this._actionChanges=Xe(this._allLeadingIcons.changes,this._allTrailingIcons.changes,this._allEditIcons.changes,this._allRemoveIcons.changes).subscribe(()=>this._changeDetectorRef.markForCheck())}ngDoCheck(){this._rippleLoader.setDisabled(this._elementRef.nativeElement,this._isRippleDisabled())}ngOnDestroy(){this.destroyed.emit({chip:this}),this.destroyed.complete(),this._focusMonitor.stopMonitoring(this._elementRef),this._rippleLoader?.destroyRipple(this._elementRef.nativeElement),this._actionChanges?.unsubscribe()}remove(){this.removable&&(this._hadFocusOnRemove=this._hasFocus(),this.removed.emit({chip:this}))}_isRippleDisabled(){return this.disabled||this.disableRipple||this._animationsDisabled||this._isBasicChip||!this._hasInteractiveActions()||!!this._globalRippleOptions?.disabled}_hasTrailingIcon(){return!!(this.trailingIcon||this.removeIcon)}_handleKeydown(e){(e.keyCode===8&&!e.repeat||e.keyCode===46)&&(e.preventDefault(),this.remove())}focus(){this.disabled||(this.primaryAction?this.primaryAction.focus():this._pendingFocus=!0)}_getSourceAction(e){return this._getActions().find(t=>{let n=t._elementRef.nativeElement;return n===e||n.contains(e)})}_getActions(){let e=[];return this.editIcon&&e.push(this.editIcon),this.primaryAction&&e.push(this.primaryAction),this.removeIcon&&e.push(this.removeIcon),e}_handlePrimaryActionInteraction(){}_hasInteractiveActions(){return this._getActions().length>0}_edit(e){}_monitorFocus(){this._focusMonitor.monitor(this._elementRef,!0).subscribe(e=>{let t=e!==null;t!==this._hasFocusInternal&&(this._hasFocusInternal=t,t?this._onFocus.next({chip:this}):(this._changeDetectorRef.markForCheck(),setTimeout(()=>this._ngZone.run(()=>this._onBlur.next({chip:this})))))})}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=R({type:i,selectors:[["mat-basic-chip"],["","mat-basic-chip",""],["mat-chip"],["","mat-chip",""]],contentQueries:function(t,n,a){if(t&1&&dt(a,Vh,5)(a,zh,5)(a,Bh,5)(a,jh,5)(a,Vh,5)(a,Bh,5)(a,zh,5)(a,jh,5),t&2){let r;N(r=L())&&(n.leadingIcon=r.first),N(r=L())&&(n.editIcon=r.first),N(r=L())&&(n.trailingIcon=r.first),N(r=L())&&(n.removeIcon=r.first),N(r=L())&&(n._allLeadingIcons=r),N(r=L())&&(n._allTrailingIcons=r),N(r=L())&&(n._allEditIcons=r),N(r=L())&&(n._allRemoveIcons=r)}},viewQuery:function(t,n){if(t&1&&Re(Qv,5),t&2){let a;N(a=L())&&(n.primaryAction=a.first)}},hostAttrs:[1,"mat-mdc-chip"],hostVars:31,hostBindings:function(t,n){t&1&&S("keydown",function(r){return n._handleKeydown(r)}),t&2&&(ft("id",n.id),J("role",n.role)("aria-label",n.ariaLabel),at("mat-"+(n.color||"primary")),p("mdc-evolution-chip",!n._isBasicChip)("mdc-evolution-chip--disabled",n.disabled)("mdc-evolution-chip--with-trailing-action",n._hasTrailingIcon())("mdc-evolution-chip--with-primary-graphic",n.leadingIcon)("mdc-evolution-chip--with-primary-icon",n.leadingIcon)("mdc-evolution-chip--with-avatar",n.leadingIcon)("mat-mdc-chip-with-avatar",n.leadingIcon)("mat-mdc-chip-highlighted",n.highlighted)("mat-mdc-chip-disabled",n.disabled)("mat-mdc-basic-chip",n._isBasicChip)("mat-mdc-standard-chip",!n._isBasicChip)("mat-mdc-chip-with-trailing-icon",n._hasTrailingIcon())("_mat-animation-noopable",n._animationsDisabled))},inputs:{role:"role",id:"id",ariaLabel:[0,"aria-label","ariaLabel"],ariaDescription:[0,"aria-description","ariaDescription"],value:"value",color:"color",removable:[2,"removable","removable",z],highlighted:[2,"highlighted","highlighted",z],disableRipple:[2,"disableRipple","disableRipple",z],disabled:[2,"disabled","disabled",z]},outputs:{removed:"removed",destroyed:"destroyed"},exportAs:["matChip"],features:[le([{provide:Hh,useExisting:i}])],ngContentSelectors:qv,decls:8,vars:2,consts:[[1,"mat-mdc-chip-focus-overlay"],[1,"mdc-evolution-chip__cell","mdc-evolution-chip__cell--primary"],["matChipContent",""],[1,"mdc-evolution-chip__graphic","mat-mdc-chip-graphic"],[1,"mdc-evolution-chip__text-label","mat-mdc-chip-action-label"],[1,"mat-mdc-chip-primary-focus-indicator","mat-focus-indicator"],[1,"mdc-evolution-chip__cell","mdc-evolution-chip__cell--trailing"]],template:function(t,n){t&1&&(ve(Wv),_(0,"span",0),s(1,"span",1)(2,"span",2),w(3,Kv,2,0,"span",3),s(4,"span",4),W(5),_(6,"span",5),l()()(),w(7,Xv,2,0,"span",6)),t&2&&(c(3),D(n.leadingIcon?3:-1),c(4),D(n._hasTrailingIcon()?7:-1))},dependencies:[Uh],styles:[`.mdc-evolution-chip,
2403
+ `],encapsulation:2,changeDetection:1})}return i})(),Rh=(()=>{class i extends Ss{static \u0275fac=(()=>{let e;return function(n){return(e||(e=xe(i)))(n||i)}})();static \u0275dir=T({type:i,selectors:[["","matCellDef",""]],features:[le([{provide:Ss,useExisting:i}]),ie]})}return i})();var Ph=(()=>{class i extends Ka{get name(){return this._name}set name(e){this._setNameInput(e)}_updateColumnCssClassName(){super._updateColumnCssClassName(),this._columnCssClassName.push(`mat-column-${this.cssClassFriendlyName}`)}static \u0275fac=(()=>{let e;return function(n){return(e||(e=xe(i)))(n||i)}})();static \u0275dir=T({type:i,selectors:[["","matColumnDef",""]],inputs:{name:[0,"matColumnDef","name"]},features:[le([{provide:Ka,useExisting:i}]),ie]})}return i})();var Oh=(()=>{class i extends Eh{static \u0275fac=(()=>{let e;return function(n){return(e||(e=xe(i)))(n||i)}})();static \u0275dir=T({type:i,selectors:[["mat-cell"],["td","mat-cell",""]],hostAttrs:[1,"mat-mdc-cell","mdc-data-table__cell"],features:[ie]})}return i})();var Fh=(()=>{class i extends ks{static \u0275fac=(()=>{let e;return function(n){return(e||(e=xe(i)))(n||i)}})();static \u0275dir=T({type:i,selectors:[["","matRowDef",""]],inputs:{columns:[0,"matRowDefColumns","columns"],when:[0,"matRowDefWhen","when"]},features:[le([{provide:ks,useExisting:i}]),ie]})}return i})();var Nh=(()=>{class i extends Ec{static \u0275fac=(()=>{let e;return function(n){return(e||(e=xe(i)))(n||i)}})();static \u0275cmp=R({type:i,selectors:[["mat-row"],["tr","mat-row",""]],hostAttrs:["role","row",1,"mat-mdc-row","mdc-data-table__row"],exportAs:["matRow"],features:[le([{provide:Ec,useExisting:i}]),ie],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,n){t&1&&di(0,0)},dependencies:[qa],encapsulation:2,changeDetection:1})}return i})();var Lh=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=U({type:i});static \u0275inj=H({imports:[Ah,ce]})}return i})();var qv=["*",[["mat-chip-avatar"],["","matChipAvatar",""]],[["mat-chip-trailing-icon"],["","matChipRemove",""],["","matChipTrailingIcon",""]]],Kv=["*","mat-chip-avatar, [matChipAvatar]","mat-chip-trailing-icon,[matChipRemove],[matChipTrailingIcon]"];function Xv(i,o){i&1&&(s(0,"span",3),W(1,1),l())}function Yv(i,o){i&1&&(s(0,"span",6),W(1,2),l())}var Zv=["*"];var Qv=new k("mat-chips-default-options",{providedIn:"root",factory:()=>({separatorKeyCodes:[13]})}),Vh=new k("MatChipAvatar"),Bh=new k("MatChipTrailingIcon"),zh=new k("MatChipEdit"),jh=new k("MatChipRemove"),Hh=new k("MatChip"),Uh=(()=>{class i{_elementRef=m(B);_parentChip=m(Hh);_isPrimary=!0;_isLeading=!1;get disabled(){return this._disabled||this._parentChip?.disabled||!1}set disabled(e){this._disabled=e}_disabled=!1;tabIndex=-1;_allowFocusWhenDisabled=!1;_getDisabledAttribute(){return this.disabled&&!this._allowFocusWhenDisabled?"":null}constructor(){m(Be).load(Gt),this._elementRef.nativeElement.nodeName==="BUTTON"&&this._elementRef.nativeElement.setAttribute("type","button")}focus(){this._elementRef.nativeElement.focus()}static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,selectors:[["","matChipContent",""]],hostAttrs:[1,"mat-mdc-chip-action","mdc-evolution-chip__action","mdc-evolution-chip__action--presentational"],hostVars:8,hostBindings:function(t,n){t&2&&(J("disabled",n._getDisabledAttribute())("aria-disabled",n.disabled),p("mdc-evolution-chip__action--primary",n._isPrimary)("mdc-evolution-chip__action--secondary",!n._isPrimary)("mdc-evolution-chip__action--trailing",!n._isPrimary&&!n._isLeading))},inputs:{disabled:[2,"disabled","disabled",z],tabIndex:[2,"tabIndex","tabIndex",e=>e==null?-1:jt(e)],_allowFocusWhenDisabled:"_allowFocusWhenDisabled"}})}return i})(),Jv=(()=>{class i extends Uh{_getTabindex(){return this.disabled&&!this._allowFocusWhenDisabled?null:this.tabIndex.toString()}_handleClick(e){!this.disabled&&this._isPrimary&&(e.preventDefault(),this._parentChip._handlePrimaryActionInteraction())}_handleKeydown(e){(e.keyCode===13||e.keyCode===32)&&!this.disabled&&this._isPrimary&&!this._parentChip._isEditing&&(e.preventDefault(),this._parentChip._handlePrimaryActionInteraction())}static \u0275fac=(()=>{let e;return function(n){return(e||(e=xe(i)))(n||i)}})();static \u0275dir=T({type:i,selectors:[["","matChipAction",""]],hostVars:3,hostBindings:function(t,n){t&1&&S("click",function(r){return n._handleClick(r)})("keydown",function(r){return n._handleKeydown(r)}),t&2&&(J("tabindex",n._getTabindex()),p("mdc-evolution-chip__action--presentational",!1))},features:[ie]})}return i})();var Za=(()=>{class i{_changeDetectorRef=m(se);_elementRef=m(B);_tagName=m(Ad);_ngZone=m($);_focusMonitor=m(Yt);_globalRippleOptions=m(lo,{optional:!0});_document=m(K);_onFocus=new O;_onBlur=new O;_isBasicChip=!1;role=null;_hasFocusInternal=!1;_pendingFocus=!1;_actionChanges;_animationsDisabled=ye();_allLeadingIcons;_allTrailingIcons;_allEditIcons;_allRemoveIcons;_hasFocus(){return this._hasFocusInternal}id=m(De).getId("mat-mdc-chip-");ariaLabel=null;ariaDescription=null;_chipListDisabled=!1;_hadFocusOnRemove=!1;_textElement;get value(){return this._value!==void 0?this._value:this._textElement.textContent.trim()}set value(e){this._value=e}_value;color;removable=!0;highlighted=!1;disableRipple=!1;get disabled(){return this._disabled||this._chipListDisabled}set disabled(e){this._disabled=e}_disabled=!1;removed=new X;destroyed=new X;basicChipAttrName="mat-basic-chip";leadingIcon;editIcon;trailingIcon;removeIcon;primaryAction;_rippleLoader=m(bs);_injector=m(Z);constructor(){let e=m(Be);e.load(Gt),e.load(Sn),this._monitorFocus(),this._rippleLoader?.configureRipple(this._elementRef.nativeElement,{className:"mat-mdc-chip-ripple",disabled:this._isRippleDisabled()})}ngOnInit(){this._isBasicChip=this._elementRef.nativeElement.hasAttribute(this.basicChipAttrName)||this._tagName.toLowerCase()===this.basicChipAttrName}ngAfterViewInit(){this._textElement=this._elementRef.nativeElement.querySelector(".mat-mdc-chip-action-label"),this._pendingFocus&&(this._pendingFocus=!1,this.focus())}ngAfterContentInit(){this._actionChanges=Xe(this._allLeadingIcons.changes,this._allTrailingIcons.changes,this._allEditIcons.changes,this._allRemoveIcons.changes).subscribe(()=>this._changeDetectorRef.markForCheck())}ngDoCheck(){this._rippleLoader.setDisabled(this._elementRef.nativeElement,this._isRippleDisabled())}ngOnDestroy(){this.destroyed.emit({chip:this}),this.destroyed.complete(),this._focusMonitor.stopMonitoring(this._elementRef),this._rippleLoader?.destroyRipple(this._elementRef.nativeElement),this._actionChanges?.unsubscribe()}remove(){this.removable&&(this._hadFocusOnRemove=this._hasFocus(),this.removed.emit({chip:this}))}_isRippleDisabled(){return this.disabled||this.disableRipple||this._animationsDisabled||this._isBasicChip||!this._hasInteractiveActions()||!!this._globalRippleOptions?.disabled}_hasTrailingIcon(){return!!(this.trailingIcon||this.removeIcon)}_handleKeydown(e){(e.keyCode===8&&!e.repeat||e.keyCode===46)&&(e.preventDefault(),this.remove())}focus(){this.disabled||(this.primaryAction?this.primaryAction.focus():this._pendingFocus=!0)}_getSourceAction(e){return this._getActions().find(t=>{let n=t._elementRef.nativeElement;return n===e||n.contains(e)})}_getActions(){let e=[];return this.editIcon&&e.push(this.editIcon),this.primaryAction&&e.push(this.primaryAction),this.removeIcon&&e.push(this.removeIcon),e}_handlePrimaryActionInteraction(){}_hasInteractiveActions(){return this._getActions().length>0}_edit(e){}_monitorFocus(){this._focusMonitor.monitor(this._elementRef,!0).subscribe(e=>{let t=e!==null;t!==this._hasFocusInternal&&(this._hasFocusInternal=t,t?this._onFocus.next({chip:this}):(this._changeDetectorRef.markForCheck(),setTimeout(()=>this._ngZone.run(()=>this._onBlur.next({chip:this})))))})}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=R({type:i,selectors:[["mat-basic-chip"],["","mat-basic-chip",""],["mat-chip"],["","mat-chip",""]],contentQueries:function(t,n,a){if(t&1&&dt(a,Vh,5)(a,zh,5)(a,Bh,5)(a,jh,5)(a,Vh,5)(a,Bh,5)(a,zh,5)(a,jh,5),t&2){let r;N(r=L())&&(n.leadingIcon=r.first),N(r=L())&&(n.editIcon=r.first),N(r=L())&&(n.trailingIcon=r.first),N(r=L())&&(n.removeIcon=r.first),N(r=L())&&(n._allLeadingIcons=r),N(r=L())&&(n._allTrailingIcons=r),N(r=L())&&(n._allEditIcons=r),N(r=L())&&(n._allRemoveIcons=r)}},viewQuery:function(t,n){if(t&1&&Re(Jv,5),t&2){let a;N(a=L())&&(n.primaryAction=a.first)}},hostAttrs:[1,"mat-mdc-chip"],hostVars:31,hostBindings:function(t,n){t&1&&S("keydown",function(r){return n._handleKeydown(r)}),t&2&&(ft("id",n.id),J("role",n.role)("aria-label",n.ariaLabel),at("mat-"+(n.color||"primary")),p("mdc-evolution-chip",!n._isBasicChip)("mdc-evolution-chip--disabled",n.disabled)("mdc-evolution-chip--with-trailing-action",n._hasTrailingIcon())("mdc-evolution-chip--with-primary-graphic",n.leadingIcon)("mdc-evolution-chip--with-primary-icon",n.leadingIcon)("mdc-evolution-chip--with-avatar",n.leadingIcon)("mat-mdc-chip-with-avatar",n.leadingIcon)("mat-mdc-chip-highlighted",n.highlighted)("mat-mdc-chip-disabled",n.disabled)("mat-mdc-basic-chip",n._isBasicChip)("mat-mdc-standard-chip",!n._isBasicChip)("mat-mdc-chip-with-trailing-icon",n._hasTrailingIcon())("_mat-animation-noopable",n._animationsDisabled))},inputs:{role:"role",id:"id",ariaLabel:[0,"aria-label","ariaLabel"],ariaDescription:[0,"aria-description","ariaDescription"],value:"value",color:"color",removable:[2,"removable","removable",z],highlighted:[2,"highlighted","highlighted",z],disableRipple:[2,"disableRipple","disableRipple",z],disabled:[2,"disabled","disabled",z]},outputs:{removed:"removed",destroyed:"destroyed"},exportAs:["matChip"],features:[le([{provide:Hh,useExisting:i}])],ngContentSelectors:Kv,decls:8,vars:2,consts:[[1,"mat-mdc-chip-focus-overlay"],[1,"mdc-evolution-chip__cell","mdc-evolution-chip__cell--primary"],["matChipContent",""],[1,"mdc-evolution-chip__graphic","mat-mdc-chip-graphic"],[1,"mdc-evolution-chip__text-label","mat-mdc-chip-action-label"],[1,"mat-mdc-chip-primary-focus-indicator","mat-focus-indicator"],[1,"mdc-evolution-chip__cell","mdc-evolution-chip__cell--trailing"]],template:function(t,n){t&1&&(ve(qv),_(0,"span",0),s(1,"span",1)(2,"span",2),w(3,Xv,2,0,"span",3),s(4,"span",4),W(5),_(6,"span",5),l()()(),w(7,Yv,2,0,"span",6)),t&2&&(c(3),D(n.leadingIcon?3:-1),c(4),D(n._hasTrailingIcon()?7:-1))},dependencies:[Uh],styles:[`.mdc-evolution-chip,
2404
2404
  .mdc-evolution-chip__cell,
2405
2405
  .mdc-evolution-chip__action {
2406
2406
  display: inline-flex;
@@ -2948,7 +2948,7 @@ mat-footer-cell.mat-mdc-footer-cell {
2948
2948
  img.mdc-evolution-chip__icon {
2949
2949
  min-height: 0;
2950
2950
  }
2951
- `],encapsulation:2})}return i})();var $h=(()=>{class i{_elementRef=m(B);_changeDetectorRef=m(se);_dir=m(Ze,{optional:!0});_lastDestroyedFocusedChipIndex=null;_keyManager;_destroyed=new O;_defaultRole="presentation";get chipFocusChanges(){return this._getChipStream(e=>e._onFocus)}get chipDestroyedChanges(){return this._getChipStream(e=>e.destroyed)}get chipRemovedChanges(){return this._getChipStream(e=>e.removed)}get disabled(){return this._disabled}set disabled(e){this._disabled=e,this._syncChipsState()}_disabled=!1;get empty(){return!this._chips||this._chips.length===0}get role(){return this._explicitRole?this._explicitRole:this.empty?null:this._defaultRole}tabIndex=0;set role(e){this._explicitRole=e}_explicitRole=null;get focused(){return this._hasFocusedChip()}_chips;_chipActions=new vn;ngAfterViewInit(){this._setUpFocusManagement(),this._trackChipSetChanges(),this._trackDestroyedFocusedChip()}ngOnDestroy(){this._keyManager?.destroy(),this._chipActions.destroy(),this._destroyed.next(),this._destroyed.complete()}_hasFocusedChip(){return this._chips&&this._chips.some(e=>e._hasFocus())}_syncChipsState(){this._chips?.forEach(e=>{e._chipListDisabled=this._disabled,e._changeDetectorRef.markForCheck()})}focus(){}_handleKeydown(e){this._originatesFromChip(e)&&this._keyManager.onKeydown(e)}_isValidIndex(e){return e>=0&&e<this._chips.length}_allowFocusEscape(){let e=this._elementRef.nativeElement.tabIndex;e!==-1&&(this._elementRef.nativeElement.tabIndex=-1,setTimeout(()=>this._elementRef.nativeElement.tabIndex=e))}_getChipStream(e){return this._chips.changes.pipe(Ee(null),$e(()=>Xe(...this._chips.map(e))))}_originatesFromChip(e){let t=e.target;for(;t&&t!==this._elementRef.nativeElement;){if(t.classList.contains("mat-mdc-chip"))return!0;t=t.parentElement}return!1}_setUpFocusManagement(){this._chips.changes.pipe(Ee(this._chips)).subscribe(e=>{let t=[];e.forEach(n=>n._getActions().forEach(a=>t.push(a))),this._chipActions.reset(t),this._chipActions.notifyOnChanges()}),this._keyManager=new En(this._chipActions).withVerticalOrientation().withHorizontalOrientation(this._dir?this._dir.value:"ltr").withHomeAndEnd().skipPredicate(e=>this._skipPredicate(e)),this.chipFocusChanges.pipe(ue(this._destroyed)).subscribe(({chip:e})=>{let t=e._getSourceAction(document.activeElement);t&&this._keyManager.updateActiveItem(t)}),this._dir?.change.pipe(ue(this._destroyed)).subscribe(e=>this._keyManager.withHorizontalOrientation(e))}_skipPredicate(e){return e.disabled}_trackChipSetChanges(){this._chips.changes.pipe(Ee(null),ue(this._destroyed)).subscribe(()=>{this.disabled&&Promise.resolve().then(()=>this._syncChipsState()),this._redirectDestroyedChipFocus()})}_trackDestroyedFocusedChip(){this.chipDestroyedChanges.pipe(ue(this._destroyed)).subscribe(e=>{let n=this._chips.toArray().indexOf(e.chip),a=e.chip._hasFocus(),r=e.chip._hadFocusOnRemove&&this._keyManager.activeItem&&e.chip._getActions().includes(this._keyManager.activeItem),u=a||r;this._isValidIndex(n)&&u&&(this._lastDestroyedFocusedChipIndex=n)})}_redirectDestroyedChipFocus(){if(this._lastDestroyedFocusedChipIndex!=null){if(this._chips.length){let e=Math.min(this._lastDestroyedFocusedChipIndex,this._chips.length-1),t=this._chips.toArray()[e];t.disabled?this._chips.length===1?this.focus():this._keyManager.setPreviousItemActive():t.focus()}else this.focus();this._lastDestroyedFocusedChipIndex=null}}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=R({type:i,selectors:[["mat-chip-set"]],contentQueries:function(t,n,a){if(t&1&&dt(a,Za,5),t&2){let r;N(r=L())&&(n._chips=r)}},hostAttrs:[1,"mat-mdc-chip-set","mdc-evolution-chip-set"],hostVars:1,hostBindings:function(t,n){t&1&&S("keydown",function(r){return n._handleKeydown(r)}),t&2&&J("role",n.role)},inputs:{disabled:[2,"disabled","disabled",z],role:"role",tabIndex:[2,"tabIndex","tabIndex",e=>e==null?0:jt(e)]},ngContentSelectors:Yv,decls:2,vars:0,consts:[["role","presentation",1,"mdc-evolution-chip-set__chips"]],template:function(t,n){t&1&&(ve(),Ne(0,"div",0),W(1),qe())},styles:[`.mat-mdc-chip-set {
2951
+ `],encapsulation:2})}return i})();var $h=(()=>{class i{_elementRef=m(B);_changeDetectorRef=m(se);_dir=m(Ze,{optional:!0});_lastDestroyedFocusedChipIndex=null;_keyManager;_destroyed=new O;_defaultRole="presentation";get chipFocusChanges(){return this._getChipStream(e=>e._onFocus)}get chipDestroyedChanges(){return this._getChipStream(e=>e.destroyed)}get chipRemovedChanges(){return this._getChipStream(e=>e.removed)}get disabled(){return this._disabled}set disabled(e){this._disabled=e,this._syncChipsState()}_disabled=!1;get empty(){return!this._chips||this._chips.length===0}get role(){return this._explicitRole?this._explicitRole:this.empty?null:this._defaultRole}tabIndex=0;set role(e){this._explicitRole=e}_explicitRole=null;get focused(){return this._hasFocusedChip()}_chips;_chipActions=new vn;ngAfterViewInit(){this._setUpFocusManagement(),this._trackChipSetChanges(),this._trackDestroyedFocusedChip()}ngOnDestroy(){this._keyManager?.destroy(),this._chipActions.destroy(),this._destroyed.next(),this._destroyed.complete()}_hasFocusedChip(){return this._chips&&this._chips.some(e=>e._hasFocus())}_syncChipsState(){this._chips?.forEach(e=>{e._chipListDisabled=this._disabled,e._changeDetectorRef.markForCheck()})}focus(){}_handleKeydown(e){this._originatesFromChip(e)&&this._keyManager.onKeydown(e)}_isValidIndex(e){return e>=0&&e<this._chips.length}_allowFocusEscape(){let e=this._elementRef.nativeElement.tabIndex;e!==-1&&(this._elementRef.nativeElement.tabIndex=-1,setTimeout(()=>this._elementRef.nativeElement.tabIndex=e))}_getChipStream(e){return this._chips.changes.pipe(Ee(null),$e(()=>Xe(...this._chips.map(e))))}_originatesFromChip(e){let t=e.target;for(;t&&t!==this._elementRef.nativeElement;){if(t.classList.contains("mat-mdc-chip"))return!0;t=t.parentElement}return!1}_setUpFocusManagement(){this._chips.changes.pipe(Ee(this._chips)).subscribe(e=>{let t=[];e.forEach(n=>n._getActions().forEach(a=>t.push(a))),this._chipActions.reset(t),this._chipActions.notifyOnChanges()}),this._keyManager=new En(this._chipActions).withVerticalOrientation().withHorizontalOrientation(this._dir?this._dir.value:"ltr").withHomeAndEnd().skipPredicate(e=>this._skipPredicate(e)),this.chipFocusChanges.pipe(ue(this._destroyed)).subscribe(({chip:e})=>{let t=e._getSourceAction(document.activeElement);t&&this._keyManager.updateActiveItem(t)}),this._dir?.change.pipe(ue(this._destroyed)).subscribe(e=>this._keyManager.withHorizontalOrientation(e))}_skipPredicate(e){return e.disabled}_trackChipSetChanges(){this._chips.changes.pipe(Ee(null),ue(this._destroyed)).subscribe(()=>{this.disabled&&Promise.resolve().then(()=>this._syncChipsState()),this._redirectDestroyedChipFocus()})}_trackDestroyedFocusedChip(){this.chipDestroyedChanges.pipe(ue(this._destroyed)).subscribe(e=>{let n=this._chips.toArray().indexOf(e.chip),a=e.chip._hasFocus(),r=e.chip._hadFocusOnRemove&&this._keyManager.activeItem&&e.chip._getActions().includes(this._keyManager.activeItem),u=a||r;this._isValidIndex(n)&&u&&(this._lastDestroyedFocusedChipIndex=n)})}_redirectDestroyedChipFocus(){if(this._lastDestroyedFocusedChipIndex!=null){if(this._chips.length){let e=Math.min(this._lastDestroyedFocusedChipIndex,this._chips.length-1),t=this._chips.toArray()[e];t.disabled?this._chips.length===1?this.focus():this._keyManager.setPreviousItemActive():t.focus()}else this.focus();this._lastDestroyedFocusedChipIndex=null}}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=R({type:i,selectors:[["mat-chip-set"]],contentQueries:function(t,n,a){if(t&1&&dt(a,Za,5),t&2){let r;N(r=L())&&(n._chips=r)}},hostAttrs:[1,"mat-mdc-chip-set","mdc-evolution-chip-set"],hostVars:1,hostBindings:function(t,n){t&1&&S("keydown",function(r){return n._handleKeydown(r)}),t&2&&J("role",n.role)},inputs:{disabled:[2,"disabled","disabled",z],role:"role",tabIndex:[2,"tabIndex","tabIndex",e=>e==null?0:jt(e)]},ngContentSelectors:Zv,decls:2,vars:0,consts:[["role","presentation",1,"mdc-evolution-chip-set__chips"]],template:function(t,n){t&1&&(ve(),Ne(0,"div",0),W(1),qe())},styles:[`.mat-mdc-chip-set {
2952
2952
  display: flex;
2953
2953
  }
2954
2954
  .mat-mdc-chip-set:focus {
@@ -3016,7 +3016,7 @@ input.mat-mdc-chip-input {
3016
3016
  margin-left: 0;
3017
3017
  margin-right: 0;
3018
3018
  }
3019
- `],encapsulation:2})}return i})();var Wo=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=U({type:i});static \u0275inj=H({providers:[Ho,{provide:Zv,useValue:{separatorKeyCodes:[13]}}],imports:[Ki,ce]})}return i})();function Jv(i,o){if(i&1&&(s(0,"td",14),d(1),l()),i&2){let e=o.$implicit;c(),I(e.gpuIndex)}}function e0(i,o){if(i&1&&(s(0,"td",15)(1,"mat-chip",16),d(2),l()()),i&2){let e=o.$implicit,t=v();c(),x("ngClass",t.getVendorCssClass(e)),c(),Q(" ",t.makeGpuNameShort(e.name)+" / "+e.brand," ")}}function t0(i,o){if(i&1&&(s(0,"td",17)(1,"div",18)(2,"span",19),d(3),Do(4,"number"),Do(5,"number"),l(),s(6,"div",20),_(7,"div",21),l()()()),i&2){let e=o.$implicit,t=v();c(3),mi(" ",So(4,6,e.vramUsed,"1.0-0")," / ",So(5,9,e.vramTotal,"1.0-0")," GB "),c(4),je("width",t.vramPercent(e),"%")("background",t.colorForUsage(t.vramPercent(e)))}}function i0(i,o){if(i&1&&(s(0,"td",22)(1,"div",23)(2,"span",24),d(3),l(),s(4,"div",25),_(5,"div",26),l()()()),i&2){let e=o.$implicit,t=v();c(2),je("color",t.colorForUsage(e.usage)),c(),Q(" ",e.usage,"% "),c(2),je("width",e.usage,"%")("background",t.colorForUsage(e.usage))}}function n0(i,o){if(i&1&&(s(0,"td",27)(1,"span",28),d(2),l()()),i&2){let e=o.$implicit,t=v();c(),je("color",t.colorForTemp(e.temperature)),c(),Q(" ",e.temperature,"\xB0C ")}}function o0(i,o){if(i&1&&(s(0,"td",29),d(1),l()),i&2){let e=o.$implicit;c(),I(e.pciBusId)}}function a0(i,o){i&1&&_(0,"tr",30)}var Wh=(()=>{class i{constructor(){this.gpus=ko.required(),this.displayedColumns=["index","name","vram","usage","temperature","pciBusId"]}getVendorCssClass(e){return{"gpu-name":!0,"gpu-vendor-nvidia":e.vendor==="NVIDIA","gpu-vendor-amd":e.vendor==="AMD","gpu-vendor-other":!["NVIDIA","AMD"].includes(e.vendor)}}vramPercent(e){return e.vramTotal===0?0:Math.round(e.vramUsed/e.vramTotal*100)}colorForUsage(e){return e<40?"#4caf50":e<75?"#ff9800":"#f44336"}colorForTemp(e){return e<60?"#4caf50":e<80?"#ff9800":"#f44336"}makeGpuNameShort(e){return e=e.replace(/^AMD Radeon RX /,"RX "),e=e.replace(/^NVIDIA GeForce /,""),e}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=R({type:i,selectors:[["app-gpu-table"]],inputs:{gpus:[1,"gpus"]},decls:16,vars:2,consts:[["mat-table","",1,"gpu-table",3,"dataSource"],["matColumnDef","index"],["mat-cell","","class","index-cell","title","#",4,"matCellDef"],["matColumnDef","name"],["mat-cell","","title","Name",4,"matCellDef"],["matColumnDef","vram"],["mat-cell","","title","VRAM",4,"matCellDef"],["matColumnDef","usage"],["mat-cell","","title","GPU Usage",4,"matCellDef"],["matColumnDef","temperature"],["mat-cell","","title","Temp \xB0C",4,"matCellDef"],["matColumnDef","pciBusId"],["mat-cell","","class","pci-cell","title","PCI Bus",4,"matCellDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-cell","","title","#",1,"index-cell"],["mat-cell","","title","Name"],[1,"gpu-name",3,"ngClass"],["mat-cell","","title","VRAM"],[1,"vram-cell"],[1,"vram-text"],[1,"vram-bar-bg"],[1,"vram-bar-fill"],["mat-cell","","title","GPU Usage"],[1,"usage-cell"],[1,"usage-value"],[1,"usage-bar-bg"],[1,"usage-bar-fill"],["mat-cell","","title","Temp \xB0C"],[1,"temp-value"],["mat-cell","","title","PCI Bus",1,"pci-cell"],["mat-row",""]],template:function(t,n){t&1&&(s(0,"mat-card")(1,"mat-card-content")(2,"table",0),Si(3,1),We(4,Jv,2,1,"td",2),ki(),Si(5,3),We(6,e0,3,2,"td",4),ki(),Si(7,5),We(8,t0,8,12,"td",6),ki(),Si(9,7),We(10,i0,6,7,"td",8),ki(),Si(11,9),We(12,n0,3,3,"td",10),ki(),Si(13,11),We(14,o0,2,1,"td",12),ki(),We(15,a0,1,0,"tr",13),l()()()),t&2&&(c(2),x("dataSource",n.gpus()),c(13),x("matRowDefColumns",n.displayedColumns))},dependencies:[Me,yl,Lh,Ih,Ph,Rh,Fh,Oh,Nh,wn,Cn,xn,Wo,Za,wl],styles:["mat-card[_ngcontent-%COMP%]{flex:1 1 auto;min-height:0;display:flex;flex-direction:column}mat-card-content[_ngcontent-%COMP%]{flex:1 1 auto;min-height:0;overflow-x:hidden;overflow-y:auto}.gpu-table[_ngcontent-%COMP%]{width:100%;white-space:nowrap}.gpu-name[_ngcontent-%COMP%]{font-weight:500}.gpu-vendor-nvidia[_ngcontent-%COMP%]{--mat-chip-elevated-container-color: #a4f021}.gpu-vendor-amd[_ngcontent-%COMP%]{--mat-chip-elevated-container-color: #ffa1a1}.gpu-vendor-other[_ngcontent-%COMP%]{--mat-chip-elevated-container-color: #b6e7ff}.index-cell[_ngcontent-%COMP%]{padding-left:0;padding-right:0}.pci-cell[_ngcontent-%COMP%]{font-family:Roboto Mono,monospace;font-size:.85rem;color:#666}.vram-cell[_ngcontent-%COMP%]{min-width:160px}.vram-text[_ngcontent-%COMP%]{display:block;margin-bottom:4px;font-size:.85rem}.vram-bar-bg[_ngcontent-%COMP%]{height:8px;background:#e0e0e0;border-radius:4px;overflow:hidden}.vram-bar-fill[_ngcontent-%COMP%]{height:100%;border-radius:4px;transition:width .4s ease,background .4s ease}.usage-cell[_ngcontent-%COMP%]{min-width:130px}.usage-value[_ngcontent-%COMP%]{display:block;margin-bottom:4px;font-weight:500;font-size:.9rem}.usage-bar-bg[_ngcontent-%COMP%]{height:8px;background:#e0e0e0;border-radius:4px;overflow:hidden}.usage-bar-fill[_ngcontent-%COMP%]{height:100%;border-radius:4px;transition:width .4s ease,background .4s ease}.temp-value[_ngcontent-%COMP%]{font-weight:500;font-size:.95rem}.mat-row[_ngcontent-%COMP%]{transition:background .2s ease;height:44px}.mat-row[_ngcontent-%COMP%]:hover{background:#fafafa}"]})}}return i})();var Qa=class{_attachedHost=null;attach(o){return this._attachedHost=o,o.attach(this)}detach(){let o=this._attachedHost;o!=null&&(this._attachedHost=null,o.detach())}get isAttached(){return this._attachedHost!=null}setAttachedHost(o){this._attachedHost=o}},Oi=class extends Qa{component;viewContainerRef;injector;projectableNodes;bindings;directives;constructor(o,e,t,n,a,r){super(),this.component=o,this.viewContainerRef=e,this.injector=t,this.projectableNodes=n,this.bindings=a||null,this.directives=r||null}},Gt=class extends Qa{templateRef;viewContainerRef;context;injector;constructor(o,e,t,n){super(),this.templateRef=o,this.viewContainerRef=e,this.context=t,this.injector=n}get origin(){return this.templateRef.elementRef}attach(o,e=this.context){return this.context=e,super.attach(o)}detach(){return this.context=void 0,super.detach()}},Oc=class extends Qa{element;constructor(o){super(),this.element=o instanceof B?o.nativeElement:o}},Pn=class{_attachedPortal=null;_disposeFn=null;_isDisposed=!1;hasAttached(){return!!this._attachedPortal}attach(o){if(o instanceof Oi)return this._attachedPortal=o,this.attachComponentPortal(o);if(o instanceof Gt)return this._attachedPortal=o,this.attachTemplatePortal(o);if(this.attachDomPortal&&o instanceof Oc)return this._attachedPortal=o,this.attachDomPortal(o)}attachDomPortal=null;detach(){this._attachedPortal&&(this._attachedPortal.setAttachedHost(null),this._attachedPortal=null),this._invokeDisposeFn()}dispose(){this.hasAttached()&&this.detach(),this._invokeDisposeFn(),this._isDisposed=!0}setDisposeFn(o){this._disposeFn=o}_invokeDisposeFn(){this._disposeFn&&(this._disposeFn(),this._disposeFn=null)}},Ja=class extends Pn{outletElement;_appRef;_defaultInjector;constructor(o,e,t){super(),this.outletElement=o,this._appRef=e,this._defaultInjector=t}attachComponentPortal(o){let e;if(o.viewContainerRef){let t=o.injector||o.viewContainerRef.injector,n=t.get(yr,null,{optional:!0})||void 0;e=o.viewContainerRef.createComponent(o.component,{index:o.viewContainerRef.length,injector:t,ngModuleRef:n,projectableNodes:o.projectableNodes||void 0,bindings:o.bindings||void 0,directives:o.directives||void 0}),this.setDisposeFn(()=>e.destroy())}else{let t=this._appRef,n=o.injector||this._defaultInjector||Z.NULL,a=n.get(Di,t.injector);e=wr(o.component,{elementInjector:n,environmentInjector:a,projectableNodes:o.projectableNodes||void 0,bindings:o.bindings||void 0,directives:o.directives||void 0}),t.attachView(e.hostView),this.setDisposeFn(()=>{t.viewCount>0&&t.detachView(e.hostView),e.destroy()})}return this.outletElement.appendChild(this._getComponentRootNode(e)),this._attachedPortal=o,e}attachTemplatePortal(o){let e=o.viewContainerRef,t=e.createEmbeddedView(o.templateRef,o.context,{injector:o.injector});return t.rootNodes.forEach(n=>this.outletElement.appendChild(n)),t.detectChanges(),this.setDisposeFn(()=>{let n=e.indexOf(t);n!==-1&&e.remove(n)}),this._attachedPortal=o,t}attachDomPortal=o=>{let e=o.element;e.parentNode;let t=this.outletElement.ownerDocument.createComment("dom-portal");e.parentNode.insertBefore(t,e),this.outletElement.appendChild(e),this._attachedPortal=o,super.setDisposeFn(()=>{t.parentNode&&t.parentNode.replaceChild(e,t)})};dispose(){super.dispose(),this.outletElement.remove()}_getComponentRootNode(o){return o.hostView.rootNodes[0]}};var Xi=(()=>{class i extends Pn{_moduleRef=m(yr,{optional:!0});_document=m(K);_viewContainerRef=m(it);_isInitialized=!1;_attachedRef=null;get portal(){return this._attachedPortal}set portal(e){this.hasAttached()&&!e&&!this._isInitialized||(this.hasAttached()&&super.detach(),e&&super.attach(e),this._attachedPortal=e||null)}attached=new X;get attachedRef(){return this._attachedRef}ngOnInit(){this._isInitialized=!0}ngOnDestroy(){super.dispose(),this._attachedRef=this._attachedPortal=null}attachComponentPortal(e){e.setAttachedHost(this);let t=e.viewContainerRef!=null?e.viewContainerRef:this._viewContainerRef,n=t.createComponent(e.component,{index:t.length,injector:e.injector||t.injector,projectableNodes:e.projectableNodes||void 0,ngModuleRef:this._moduleRef||void 0,bindings:e.bindings||void 0,directives:e.directives||void 0});return t!==this._viewContainerRef&&this._getRootNode().appendChild(n.hostView.rootNodes[0]),super.setDisposeFn(()=>n.destroy()),this._attachedPortal=e,this._attachedRef=n,this.attached.emit(n),n}attachTemplatePortal(e){e.setAttachedHost(this);let t=this._viewContainerRef.createEmbeddedView(e.templateRef,e.context,{injector:e.injector});return super.setDisposeFn(()=>this._viewContainerRef.clear()),this._attachedPortal=e,this._attachedRef=t,this.attached.emit(t),t}attachDomPortal=e=>{let t=e.element;t.parentNode;let n=this._document.createComment("dom-portal");e.setAttachedHost(this),t.parentNode.insertBefore(n,t),this._getRootNode().appendChild(t),this._attachedPortal=e,super.setDisposeFn(()=>{n.parentNode&&n.parentNode.replaceChild(t,n)})};_getRootNode(){let e=this._viewContainerRef.element.nativeElement;return e.nodeType===e.ELEMENT_NODE?e:e.parentNode}static \u0275fac=(()=>{let e;return function(n){return(e||(e=xe(i)))(n||i)}})();static \u0275dir=T({type:i,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:[0,"cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[ie]})}return i})(),Yi=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=U({type:i});static \u0275inj=H({})}return i})();var qh=Zr();function Xo(i){return new Ms(i.get(ni),i.get(K))}var Ms=class{_viewportRuler;_previousHTMLStyles={top:"",left:""};_previousScrollPosition;_isEnabled=!1;_document;constructor(o,e){this._viewportRuler=o,this._document=e}attach(){}enable(){if(this._canBeEnabled()){let o=this._document.documentElement;this._previousScrollPosition=this._viewportRuler.getViewportScrollPosition(),this._previousHTMLStyles.left=o.style.left||"",this._previousHTMLStyles.top=o.style.top||"",o.style.left=nt(-this._previousScrollPosition.left),o.style.top=nt(-this._previousScrollPosition.top),o.classList.add("cdk-global-scrollblock"),this._isEnabled=!0}}disable(){if(this._isEnabled){let o=this._document.documentElement,e=this._document.body,t=o.style,n=e.style,a=t.scrollBehavior||"",r=n.scrollBehavior||"";this._isEnabled=!1,t.left=this._previousHTMLStyles.left,t.top=this._previousHTMLStyles.top,o.classList.remove("cdk-global-scrollblock"),qh&&(t.scrollBehavior=n.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),qh&&(t.scrollBehavior=a,n.scrollBehavior=r)}}_canBeEnabled(){if(this._document.documentElement.classList.contains("cdk-global-scrollblock")||this._isEnabled)return!1;let e=this._document.documentElement,t=this._viewportRuler.getViewportSize();return e.scrollHeight>t.height||e.scrollWidth>t.width}};function ep(i,o){return new Es(i.get(Rn),i.get($),i.get(ni),o)}var Es=class{_scrollDispatcher;_ngZone;_viewportRuler;_config;_scrollSubscription=null;_overlayRef;_initialScrollPosition;constructor(o,e,t,n){this._scrollDispatcher=o,this._ngZone=e,this._viewportRuler=t,this._config=n}attach(o){this._overlayRef,this._overlayRef=o}enable(){if(this._scrollSubscription)return;let o=this._scrollDispatcher.scrolled(0).pipe(ke(e=>!e||!this._overlayRef.overlayElement.contains(e.getElementRef().nativeElement)));this._config&&this._config.threshold&&this._config.threshold>1?(this._initialScrollPosition=this._viewportRuler.getViewportScrollPosition().top,this._scrollSubscription=o.subscribe(()=>{let e=this._viewportRuler.getViewportScrollPosition().top;Math.abs(e-this._initialScrollPosition)>this._config.threshold?this._detach():this._overlayRef.updatePosition()})):this._scrollSubscription=o.subscribe(this._detach)}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}_detach=()=>{this.disable(),this._overlayRef.hasAttached()&&this._ngZone.run(()=>this._overlayRef.detach())}};var er=class{enable(){}disable(){}attach(){}};function Fc(i,o){return o.some(e=>{let t=i.bottom<e.top,n=i.top>e.bottom,a=i.right<e.left,r=i.left>e.right;return t||n||a||r})}function Kh(i,o){return o.some(e=>{let t=i.top<e.top,n=i.bottom>e.bottom,a=i.left<e.left,r=i.right>e.right;return t||n||a||r})}function Fi(i,o){return new Ts(i.get(Rn),i.get(ni),i.get($),o)}var Ts=class{_scrollDispatcher;_viewportRuler;_ngZone;_config;_scrollSubscription=null;_overlayRef;constructor(o,e,t,n){this._scrollDispatcher=o,this._viewportRuler=e,this._ngZone=t,this._config=n}attach(o){this._overlayRef,this._overlayRef=o}enable(){if(!this._scrollSubscription){let o=this._config?this._config.scrollThrottle:0;this._scrollSubscription=this._scrollDispatcher.scrolled(o).subscribe(()=>{if(this._overlayRef.updatePosition(),this._config&&this._config.autoClose){let e=this._overlayRef.overlayElement.getBoundingClientRect(),{width:t,height:n}=this._viewportRuler.getViewportSize();Fc(e,[{width:t,height:n,bottom:n,right:t,top:0,left:0}])&&(this.disable(),this._ngZone.run(()=>this._overlayRef.detach()))}})}}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}},tp=(()=>{class i{_injector=m(Z);noop=()=>new er;close=e=>ep(this._injector,e);block=()=>Xo(this._injector);reposition=e=>Fi(this._injector,e);static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})(),ai=class{positionStrategy;scrollStrategy=new er;panelClass="";hasBackdrop=!1;backdropClass="cdk-overlay-dark-backdrop";disableAnimations;width;height;minWidth;minHeight;maxWidth;maxHeight;direction;disposeOnNavigation=!1;usePopover;eventPredicate;constructor(o){if(o){let e=Object.keys(o);for(let t of e)o[t]!==void 0&&(this[t]=o[t])}}};var As=class{connectionPair;scrollableViewProperties;constructor(o,e){this.connectionPair=o,this.scrollableViewProperties=e}};var ip=(()=>{class i{_attachedOverlays=[];_document=m(K);_isAttached=!1;ngOnDestroy(){this.detach()}add(e){this.remove(e),this._attachedOverlays.push(e)}remove(e){let t=this._attachedOverlays.indexOf(e);t>-1&&this._attachedOverlays.splice(t,1),this._attachedOverlays.length===0&&this.detach()}canReceiveEvent(e,t,n){return n.observers.length<1?!1:e.eventPredicate?e.eventPredicate(t):!0}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})(),np=(()=>{class i extends ip{_ngZone=m($);_renderer=m(ct).createRenderer(null,null);_cleanupKeydown;add(e){super.add(e),this._isAttached||(this._ngZone.runOutsideAngular(()=>{this._cleanupKeydown=this._renderer.listen("body","keydown",this._keydownListener)}),this._isAttached=!0)}detach(){this._isAttached&&(this._cleanupKeydown?.(),this._isAttached=!1)}_keydownListener=e=>{let t=this._attachedOverlays;for(let n=t.length-1;n>-1;n--){let a=t[n];if(this.canReceiveEvent(a,e,a._keydownEvents)){this._ngZone.run(()=>a._keydownEvents.next(e));break}}};static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})(),op=(()=>{class i extends ip{_platform=m(fe);_ngZone=m($);_renderer=m(ct).createRenderer(null,null);_cursorOriginalValue;_cursorStyleIsSet=!1;_pointerDownEventTarget=null;_cleanups;add(e){if(super.add(e),!this._isAttached){let t=this._document.body,n={capture:!0},a=this._renderer;this._cleanups=this._ngZone.runOutsideAngular(()=>[a.listen(t,"pointerdown",this._pointerDownListener,n),a.listen(t,"click",this._clickListener,n),a.listen(t,"auxclick",this._clickListener,n),a.listen(t,"contextmenu",this._clickListener,n)]),this._platform.IOS&&!this._cursorStyleIsSet&&(this._cursorOriginalValue=t.style.cursor,t.style.cursor="pointer",this._cursorStyleIsSet=!0),this._isAttached=!0}}detach(){this._isAttached&&(this._cleanups?.forEach(e=>e()),this._cleanups=void 0,this._platform.IOS&&this._cursorStyleIsSet&&(this._document.body.style.cursor=this._cursorOriginalValue,this._cursorStyleIsSet=!1),this._isAttached=!1)}_pointerDownListener=e=>{this._pointerDownEventTarget=mt(e)};_clickListener=e=>{let t=mt(e),n=e.type==="click"&&this._pointerDownEventTarget?this._pointerDownEventTarget:t;this._pointerDownEventTarget=null;let a=this._attachedOverlays.slice();for(let r=a.length-1;r>-1;r--){let u=a[r],h=u._outsidePointerEvents;if(!(!u.hasAttached()||!this.canReceiveEvent(u,e,h))){if(Xh(u.overlayElement,t)||Xh(u.overlayElement,n))break;this._ngZone?this._ngZone.run(()=>h.next(e)):h.next(e)}}};static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();function Xh(i,o){let e=typeof ShadowRoot<"u"&&ShadowRoot,t=o;for(;t;){if(t===i)return!0;t=e&&t instanceof ShadowRoot?t.host:t.parentNode}return!1}var ap=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275cmp=R({type:i,selectors:[["ng-component"]],hostAttrs:["cdk-overlay-style-loader",""],decls:0,vars:0,template:function(t,n){},styles:[`.cdk-overlay-container, .cdk-global-overlay-wrapper {
3019
+ `],encapsulation:2})}return i})();var Wo=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=U({type:i});static \u0275inj=H({providers:[Ho,{provide:Qv,useValue:{separatorKeyCodes:[13]}}],imports:[Ki,ce]})}return i})();function e0(i,o){if(i&1&&(s(0,"td",14),d(1),l()),i&2){let e=o.$implicit;c(),I(e.gpuIndex)}}function t0(i,o){if(i&1&&(s(0,"td",15)(1,"mat-chip",16),d(2),l()()),i&2){let e=o.$implicit,t=v();c(),x("ngClass",t.getVendorCssClass(e)),c(),Q(" ",t.makeGpuNameShort(e.name)+" / "+e.brand," ")}}function i0(i,o){if(i&1&&(s(0,"td",17)(1,"div",18)(2,"span",19),d(3),Do(4,"number"),Do(5,"number"),l(),s(6,"div",20),_(7,"div",21),l()()()),i&2){let e=o.$implicit,t=v();c(3),mi(" ",So(4,6,e.vramUsed,"1.0-0")," / ",So(5,9,e.vramTotal,"1.0-0")," GB "),c(4),je("width",t.vramPercent(e),"%")("background",t.colorForUsage(t.vramPercent(e)))}}function n0(i,o){if(i&1&&(s(0,"td",22)(1,"div",23)(2,"span",24),d(3),l(),s(4,"div",25),_(5,"div",26),l()()()),i&2){let e=o.$implicit,t=v();c(2),je("color",t.colorForUsage(e.usage)),c(),Q(" ",e.usage,"% "),c(2),je("width",e.usage,"%")("background",t.colorForUsage(e.usage))}}function o0(i,o){if(i&1&&(s(0,"td",27)(1,"span",28),d(2),l()()),i&2){let e=o.$implicit,t=v();c(),je("color",t.colorForTemp(e.temperature)),c(),Q(" ",e.temperature,"\xB0C ")}}function a0(i,o){if(i&1&&(s(0,"td",29),d(1),l()),i&2){let e=o.$implicit;c(),I(e.pciBusId)}}function r0(i,o){i&1&&_(0,"tr",30)}var Wh=(()=>{class i{constructor(){this.gpus=ko.required(),this.displayedColumns=["index","name","vram","usage","temperature","pciBusId"]}getVendorCssClass(e){return{"gpu-name":!0,"gpu-vendor-nvidia":e.vendor==="NVIDIA","gpu-vendor-amd":e.vendor==="AMD","gpu-vendor-other":!["NVIDIA","AMD"].includes(e.vendor)}}vramPercent(e){return e.vramTotal===0?0:Math.round(e.vramUsed/e.vramTotal*100)}colorForUsage(e){return e<40?"#4caf50":e<75?"#ff9800":"#f44336"}colorForTemp(e){return e<60?"#4caf50":e<80?"#ff9800":"#f44336"}makeGpuNameShort(e){return e=e.replace(/^AMD Radeon RX /,"RX "),e=e.replace(/^NVIDIA GeForce /,""),e}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=R({type:i,selectors:[["app-gpu-table"]],inputs:{gpus:[1,"gpus"]},decls:16,vars:2,consts:[["mat-table","",1,"gpu-table",3,"dataSource"],["matColumnDef","index"],["mat-cell","","class","index-cell","title","#",4,"matCellDef"],["matColumnDef","name"],["mat-cell","","title","Name",4,"matCellDef"],["matColumnDef","vram"],["mat-cell","","title","VRAM",4,"matCellDef"],["matColumnDef","usage"],["mat-cell","","title","GPU Usage",4,"matCellDef"],["matColumnDef","temperature"],["mat-cell","","title","Temp \xB0C",4,"matCellDef"],["matColumnDef","pciBusId"],["mat-cell","","class","pci-cell","title","PCI Bus",4,"matCellDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-cell","","title","#",1,"index-cell"],["mat-cell","","title","Name"],[1,"gpu-name",3,"ngClass"],["mat-cell","","title","VRAM"],[1,"vram-cell"],[1,"vram-text"],[1,"vram-bar-bg"],[1,"vram-bar-fill"],["mat-cell","","title","GPU Usage"],[1,"usage-cell"],[1,"usage-value"],[1,"usage-bar-bg"],[1,"usage-bar-fill"],["mat-cell","","title","Temp \xB0C"],[1,"temp-value"],["mat-cell","","title","PCI Bus",1,"pci-cell"],["mat-row",""]],template:function(t,n){t&1&&(s(0,"mat-card")(1,"mat-card-content")(2,"table",0),Si(3,1),We(4,e0,2,1,"td",2),ki(),Si(5,3),We(6,t0,3,2,"td",4),ki(),Si(7,5),We(8,i0,8,12,"td",6),ki(),Si(9,7),We(10,n0,6,7,"td",8),ki(),Si(11,9),We(12,o0,3,3,"td",10),ki(),Si(13,11),We(14,a0,2,1,"td",12),ki(),We(15,r0,1,0,"tr",13),l()()()),t&2&&(c(2),x("dataSource",n.gpus()),c(13),x("matRowDefColumns",n.displayedColumns))},dependencies:[Me,yl,Lh,Ih,Ph,Rh,Fh,Oh,Nh,wn,Cn,xn,Wo,Za,wl],styles:["mat-card[_ngcontent-%COMP%]{flex:1 1 auto;min-height:0;display:flex;flex-direction:column}mat-card-content[_ngcontent-%COMP%]{flex:1 1 auto;min-height:0;overflow-x:hidden;overflow-y:auto}.gpu-table[_ngcontent-%COMP%]{width:100%;white-space:nowrap}.gpu-name[_ngcontent-%COMP%]{font-weight:500}.gpu-vendor-nvidia[_ngcontent-%COMP%]{--mat-chip-elevated-container-color: #a4f021}.gpu-vendor-amd[_ngcontent-%COMP%]{--mat-chip-elevated-container-color: #ffa1a1}.gpu-vendor-other[_ngcontent-%COMP%]{--mat-chip-elevated-container-color: #b6e7ff}.index-cell[_ngcontent-%COMP%]{padding-left:0;padding-right:0}.pci-cell[_ngcontent-%COMP%]{font-family:Roboto Mono,monospace;font-size:.85rem;color:#666}.vram-cell[_ngcontent-%COMP%]{min-width:160px}.vram-text[_ngcontent-%COMP%]{display:block;margin-bottom:4px;font-size:.85rem}.vram-bar-bg[_ngcontent-%COMP%]{height:8px;background:#e0e0e0;border-radius:4px;overflow:hidden}.vram-bar-fill[_ngcontent-%COMP%]{height:100%;border-radius:4px;transition:width .4s ease,background .4s ease}.usage-cell[_ngcontent-%COMP%]{min-width:130px}.usage-value[_ngcontent-%COMP%]{display:block;margin-bottom:4px;font-weight:500;font-size:.9rem}.usage-bar-bg[_ngcontent-%COMP%]{height:8px;background:#e0e0e0;border-radius:4px;overflow:hidden}.usage-bar-fill[_ngcontent-%COMP%]{height:100%;border-radius:4px;transition:width .4s ease,background .4s ease}.temp-value[_ngcontent-%COMP%]{font-weight:500;font-size:.95rem}.mat-row[_ngcontent-%COMP%]{transition:background .2s ease;height:44px}.mat-row[_ngcontent-%COMP%]:hover{background:#fafafa}"]})}}return i})();var Qa=class{_attachedHost=null;attach(o){return this._attachedHost=o,o.attach(this)}detach(){let o=this._attachedHost;o!=null&&(this._attachedHost=null,o.detach())}get isAttached(){return this._attachedHost!=null}setAttachedHost(o){this._attachedHost=o}},Oi=class extends Qa{component;viewContainerRef;injector;projectableNodes;bindings;directives;constructor(o,e,t,n,a,r){super(),this.component=o,this.viewContainerRef=e,this.injector=t,this.projectableNodes=n,this.bindings=a||null,this.directives=r||null}},Wt=class extends Qa{templateRef;viewContainerRef;context;injector;constructor(o,e,t,n){super(),this.templateRef=o,this.viewContainerRef=e,this.context=t,this.injector=n}get origin(){return this.templateRef.elementRef}attach(o,e=this.context){return this.context=e,super.attach(o)}detach(){return this.context=void 0,super.detach()}},Oc=class extends Qa{element;constructor(o){super(),this.element=o instanceof B?o.nativeElement:o}},Pn=class{_attachedPortal=null;_disposeFn=null;_isDisposed=!1;hasAttached(){return!!this._attachedPortal}attach(o){if(o instanceof Oi)return this._attachedPortal=o,this.attachComponentPortal(o);if(o instanceof Wt)return this._attachedPortal=o,this.attachTemplatePortal(o);if(this.attachDomPortal&&o instanceof Oc)return this._attachedPortal=o,this.attachDomPortal(o)}attachDomPortal=null;detach(){this._attachedPortal&&(this._attachedPortal.setAttachedHost(null),this._attachedPortal=null),this._invokeDisposeFn()}dispose(){this.hasAttached()&&this.detach(),this._invokeDisposeFn(),this._isDisposed=!0}setDisposeFn(o){this._disposeFn=o}_invokeDisposeFn(){this._disposeFn&&(this._disposeFn(),this._disposeFn=null)}},Ja=class extends Pn{outletElement;_appRef;_defaultInjector;constructor(o,e,t){super(),this.outletElement=o,this._appRef=e,this._defaultInjector=t}attachComponentPortal(o){let e;if(o.viewContainerRef){let t=o.injector||o.viewContainerRef.injector,n=t.get(yr,null,{optional:!0})||void 0;e=o.viewContainerRef.createComponent(o.component,{index:o.viewContainerRef.length,injector:t,ngModuleRef:n,projectableNodes:o.projectableNodes||void 0,bindings:o.bindings||void 0,directives:o.directives||void 0}),this.setDisposeFn(()=>e.destroy())}else{let t=this._appRef,n=o.injector||this._defaultInjector||Z.NULL,a=n.get(Di,t.injector);e=wr(o.component,{elementInjector:n,environmentInjector:a,projectableNodes:o.projectableNodes||void 0,bindings:o.bindings||void 0,directives:o.directives||void 0}),t.attachView(e.hostView),this.setDisposeFn(()=>{t.viewCount>0&&t.detachView(e.hostView),e.destroy()})}return this.outletElement.appendChild(this._getComponentRootNode(e)),this._attachedPortal=o,e}attachTemplatePortal(o){let e=o.viewContainerRef,t=e.createEmbeddedView(o.templateRef,o.context,{injector:o.injector});return t.rootNodes.forEach(n=>this.outletElement.appendChild(n)),t.detectChanges(),this.setDisposeFn(()=>{let n=e.indexOf(t);n!==-1&&e.remove(n)}),this._attachedPortal=o,t}attachDomPortal=o=>{let e=o.element;e.parentNode;let t=this.outletElement.ownerDocument.createComment("dom-portal");e.parentNode.insertBefore(t,e),this.outletElement.appendChild(e),this._attachedPortal=o,super.setDisposeFn(()=>{t.parentNode&&t.parentNode.replaceChild(e,t)})};dispose(){super.dispose(),this.outletElement.remove()}_getComponentRootNode(o){return o.hostView.rootNodes[0]}};var Xi=(()=>{class i extends Pn{_moduleRef=m(yr,{optional:!0});_document=m(K);_viewContainerRef=m(it);_isInitialized=!1;_attachedRef=null;get portal(){return this._attachedPortal}set portal(e){this.hasAttached()&&!e&&!this._isInitialized||(this.hasAttached()&&super.detach(),e&&super.attach(e),this._attachedPortal=e||null)}attached=new X;get attachedRef(){return this._attachedRef}ngOnInit(){this._isInitialized=!0}ngOnDestroy(){super.dispose(),this._attachedRef=this._attachedPortal=null}attachComponentPortal(e){e.setAttachedHost(this);let t=e.viewContainerRef!=null?e.viewContainerRef:this._viewContainerRef,n=t.createComponent(e.component,{index:t.length,injector:e.injector||t.injector,projectableNodes:e.projectableNodes||void 0,ngModuleRef:this._moduleRef||void 0,bindings:e.bindings||void 0,directives:e.directives||void 0});return t!==this._viewContainerRef&&this._getRootNode().appendChild(n.hostView.rootNodes[0]),super.setDisposeFn(()=>n.destroy()),this._attachedPortal=e,this._attachedRef=n,this.attached.emit(n),n}attachTemplatePortal(e){e.setAttachedHost(this);let t=this._viewContainerRef.createEmbeddedView(e.templateRef,e.context,{injector:e.injector});return super.setDisposeFn(()=>this._viewContainerRef.clear()),this._attachedPortal=e,this._attachedRef=t,this.attached.emit(t),t}attachDomPortal=e=>{let t=e.element;t.parentNode;let n=this._document.createComment("dom-portal");e.setAttachedHost(this),t.parentNode.insertBefore(n,t),this._getRootNode().appendChild(t),this._attachedPortal=e,super.setDisposeFn(()=>{n.parentNode&&n.parentNode.replaceChild(t,n)})};_getRootNode(){let e=this._viewContainerRef.element.nativeElement;return e.nodeType===e.ELEMENT_NODE?e:e.parentNode}static \u0275fac=(()=>{let e;return function(n){return(e||(e=xe(i)))(n||i)}})();static \u0275dir=T({type:i,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:[0,"cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[ie]})}return i})(),Yi=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=U({type:i});static \u0275inj=H({})}return i})();var qh=Zr();function Xo(i){return new Ms(i.get(ni),i.get(K))}var Ms=class{_viewportRuler;_previousHTMLStyles={top:"",left:""};_previousScrollPosition;_isEnabled=!1;_document;constructor(o,e){this._viewportRuler=o,this._document=e}attach(){}enable(){if(this._canBeEnabled()){let o=this._document.documentElement;this._previousScrollPosition=this._viewportRuler.getViewportScrollPosition(),this._previousHTMLStyles.left=o.style.left||"",this._previousHTMLStyles.top=o.style.top||"",o.style.left=nt(-this._previousScrollPosition.left),o.style.top=nt(-this._previousScrollPosition.top),o.classList.add("cdk-global-scrollblock"),this._isEnabled=!0}}disable(){if(this._isEnabled){let o=this._document.documentElement,e=this._document.body,t=o.style,n=e.style,a=t.scrollBehavior||"",r=n.scrollBehavior||"";this._isEnabled=!1,t.left=this._previousHTMLStyles.left,t.top=this._previousHTMLStyles.top,o.classList.remove("cdk-global-scrollblock"),qh&&(t.scrollBehavior=n.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),qh&&(t.scrollBehavior=a,n.scrollBehavior=r)}}_canBeEnabled(){if(this._document.documentElement.classList.contains("cdk-global-scrollblock")||this._isEnabled)return!1;let e=this._document.documentElement,t=this._viewportRuler.getViewportSize();return e.scrollHeight>t.height||e.scrollWidth>t.width}};function ep(i,o){return new Es(i.get(Rn),i.get($),i.get(ni),o)}var Es=class{_scrollDispatcher;_ngZone;_viewportRuler;_config;_scrollSubscription=null;_overlayRef;_initialScrollPosition;constructor(o,e,t,n){this._scrollDispatcher=o,this._ngZone=e,this._viewportRuler=t,this._config=n}attach(o){this._overlayRef,this._overlayRef=o}enable(){if(this._scrollSubscription)return;let o=this._scrollDispatcher.scrolled(0).pipe(ke(e=>!e||!this._overlayRef.overlayElement.contains(e.getElementRef().nativeElement)));this._config&&this._config.threshold&&this._config.threshold>1?(this._initialScrollPosition=this._viewportRuler.getViewportScrollPosition().top,this._scrollSubscription=o.subscribe(()=>{let e=this._viewportRuler.getViewportScrollPosition().top;Math.abs(e-this._initialScrollPosition)>this._config.threshold?this._detach():this._overlayRef.updatePosition()})):this._scrollSubscription=o.subscribe(this._detach)}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}_detach=()=>{this.disable(),this._overlayRef.hasAttached()&&this._ngZone.run(()=>this._overlayRef.detach())}};var er=class{enable(){}disable(){}attach(){}};function Fc(i,o){return o.some(e=>{let t=i.bottom<e.top,n=i.top>e.bottom,a=i.right<e.left,r=i.left>e.right;return t||n||a||r})}function Kh(i,o){return o.some(e=>{let t=i.top<e.top,n=i.bottom>e.bottom,a=i.left<e.left,r=i.right>e.right;return t||n||a||r})}function Fi(i,o){return new Ts(i.get(Rn),i.get(ni),i.get($),o)}var Ts=class{_scrollDispatcher;_viewportRuler;_ngZone;_config;_scrollSubscription=null;_overlayRef;constructor(o,e,t,n){this._scrollDispatcher=o,this._viewportRuler=e,this._ngZone=t,this._config=n}attach(o){this._overlayRef,this._overlayRef=o}enable(){if(!this._scrollSubscription){let o=this._config?this._config.scrollThrottle:0;this._scrollSubscription=this._scrollDispatcher.scrolled(o).subscribe(()=>{if(this._overlayRef.updatePosition(),this._config&&this._config.autoClose){let e=this._overlayRef.overlayElement.getBoundingClientRect(),{width:t,height:n}=this._viewportRuler.getViewportSize();Fc(e,[{width:t,height:n,bottom:n,right:t,top:0,left:0}])&&(this.disable(),this._ngZone.run(()=>this._overlayRef.detach()))}})}}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}},tp=(()=>{class i{_injector=m(Z);noop=()=>new er;close=e=>ep(this._injector,e);block=()=>Xo(this._injector);reposition=e=>Fi(this._injector,e);static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})(),ai=class{positionStrategy;scrollStrategy=new er;panelClass="";hasBackdrop=!1;backdropClass="cdk-overlay-dark-backdrop";disableAnimations;width;height;minWidth;minHeight;maxWidth;maxHeight;direction;disposeOnNavigation=!1;usePopover;eventPredicate;constructor(o){if(o){let e=Object.keys(o);for(let t of e)o[t]!==void 0&&(this[t]=o[t])}}};var As=class{connectionPair;scrollableViewProperties;constructor(o,e){this.connectionPair=o,this.scrollableViewProperties=e}};var ip=(()=>{class i{_attachedOverlays=[];_document=m(K);_isAttached=!1;ngOnDestroy(){this.detach()}add(e){this.remove(e),this._attachedOverlays.push(e)}remove(e){let t=this._attachedOverlays.indexOf(e);t>-1&&this._attachedOverlays.splice(t,1),this._attachedOverlays.length===0&&this.detach()}canReceiveEvent(e,t,n){return n.observers.length<1?!1:e.eventPredicate?e.eventPredicate(t):!0}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})(),np=(()=>{class i extends ip{_ngZone=m($);_renderer=m(ct).createRenderer(null,null);_cleanupKeydown;add(e){super.add(e),this._isAttached||(this._ngZone.runOutsideAngular(()=>{this._cleanupKeydown=this._renderer.listen("body","keydown",this._keydownListener)}),this._isAttached=!0)}detach(){this._isAttached&&(this._cleanupKeydown?.(),this._isAttached=!1)}_keydownListener=e=>{let t=this._attachedOverlays;for(let n=t.length-1;n>-1;n--){let a=t[n];if(this.canReceiveEvent(a,e,a._keydownEvents)){this._ngZone.run(()=>a._keydownEvents.next(e));break}}};static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})(),op=(()=>{class i extends ip{_platform=m(fe);_ngZone=m($);_renderer=m(ct).createRenderer(null,null);_cursorOriginalValue;_cursorStyleIsSet=!1;_pointerDownEventTarget=null;_cleanups;add(e){if(super.add(e),!this._isAttached){let t=this._document.body,n={capture:!0},a=this._renderer;this._cleanups=this._ngZone.runOutsideAngular(()=>[a.listen(t,"pointerdown",this._pointerDownListener,n),a.listen(t,"click",this._clickListener,n),a.listen(t,"auxclick",this._clickListener,n),a.listen(t,"contextmenu",this._clickListener,n)]),this._platform.IOS&&!this._cursorStyleIsSet&&(this._cursorOriginalValue=t.style.cursor,t.style.cursor="pointer",this._cursorStyleIsSet=!0),this._isAttached=!0}}detach(){this._isAttached&&(this._cleanups?.forEach(e=>e()),this._cleanups=void 0,this._platform.IOS&&this._cursorStyleIsSet&&(this._document.body.style.cursor=this._cursorOriginalValue,this._cursorStyleIsSet=!1),this._isAttached=!1)}_pointerDownListener=e=>{this._pointerDownEventTarget=mt(e)};_clickListener=e=>{let t=mt(e),n=e.type==="click"&&this._pointerDownEventTarget?this._pointerDownEventTarget:t;this._pointerDownEventTarget=null;let a=this._attachedOverlays.slice();for(let r=a.length-1;r>-1;r--){let u=a[r],h=u._outsidePointerEvents;if(!(!u.hasAttached()||!this.canReceiveEvent(u,e,h))){if(Xh(u.overlayElement,t)||Xh(u.overlayElement,n))break;this._ngZone?this._ngZone.run(()=>h.next(e)):h.next(e)}}};static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();function Xh(i,o){let e=typeof ShadowRoot<"u"&&ShadowRoot,t=o;for(;t;){if(t===i)return!0;t=e&&t instanceof ShadowRoot?t.host:t.parentNode}return!1}var ap=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275cmp=R({type:i,selectors:[["ng-component"]],hostAttrs:["cdk-overlay-style-loader",""],decls:0,vars:0,template:function(t,n){},styles:[`.cdk-overlay-container, .cdk-global-overlay-wrapper {
3020
3020
  pointer-events: none;
3021
3021
  top: 0;
3022
3022
  left: 0;
@@ -3155,14 +3155,14 @@ input.mat-mdc-chip-input {
3155
3155
  position: fixed;
3156
3156
  z-index: auto;
3157
3157
  }
3158
- `],encapsulation:2})}return i})(),Ps=(()=>{class i{_platform=m(fe);_containerElement;_document=m(K);_styleLoader=m(Be);ngOnDestroy(){this._containerElement?.remove()}getContainerElement(){return this._loadStyles(),this._containerElement||this._createContainer(),this._containerElement}_createContainer(){let e="cdk-overlay-container";if(this._platform.isBrowser||ql()){let n=this._document.querySelectorAll(`.${e}[platform="server"], .${e}[platform="test"]`);for(let a=0;a<n.length;a++)n[a].remove()}let t=this._document.createElement("div");t.classList.add(e),ql()?t.setAttribute("platform","test"):this._platform.isBrowser||t.setAttribute("platform","server"),this._document.body.appendChild(t),this._containerElement=t}_loadStyles(){this._styleLoader.load(ap)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})(),Nc=class{_renderer;_ngZone;element;_cleanupClick;_cleanupTransitionEnd;_fallbackTimeout;constructor(o,e,t,n){this._renderer=e,this._ngZone=t,this.element=o.createElement("div"),this.element.classList.add("cdk-overlay-backdrop"),this._cleanupClick=e.listen(this.element,"click",n)}detach(){this._ngZone.runOutsideAngular(()=>{let o=this.element;clearTimeout(this._fallbackTimeout),this._cleanupTransitionEnd?.(),this._cleanupTransitionEnd=this._renderer.listen(o,"transitionend",this.dispose),this._fallbackTimeout=setTimeout(this.dispose,500),o.style.pointerEvents="none",o.classList.remove("cdk-overlay-backdrop-showing")})}dispose=()=>{clearTimeout(this._fallbackTimeout),this._cleanupClick?.(),this._cleanupTransitionEnd?.(),this._cleanupClick=this._cleanupTransitionEnd=this._fallbackTimeout=void 0,this.element.remove()}};function Lc(i){return i&&i.nodeType===1}var qo=class{_portalOutlet;_host;_pane;_config;_ngZone;_keyboardDispatcher;_document;_location;_outsideClickDispatcher;_animationsDisabled;_injector;_renderer;_backdropClick=new O;_attachments=new O;_detachments=new O;_positionStrategy;_scrollStrategy;_locationChanges=Te.EMPTY;_backdropRef=null;_detachContentMutationObserver;_detachContentAfterRenderRef;_disposed=!1;_previousHostParent;_keydownEvents=new O;_outsidePointerEvents=new O;_afterNextRenderRef;constructor(o,e,t,n,a,r,u,h,f,b=!1,M,j){this._portalOutlet=o,this._host=e,this._pane=t,this._config=n,this._ngZone=a,this._keyboardDispatcher=r,this._document=u,this._location=h,this._outsideClickDispatcher=f,this._animationsDisabled=b,this._injector=M,this._renderer=j,n.scrollStrategy&&(this._scrollStrategy=n.scrollStrategy,this._scrollStrategy.attach(this)),this._positionStrategy=n.positionStrategy}get overlayElement(){return this._pane}get backdropElement(){return this._backdropRef?.element||null}get hostElement(){return this._host}get eventPredicate(){return this._config?.eventPredicate||null}attach(o){if(this._disposed)return null;this._attachHost();let e=this._portalOutlet.attach(o);return this._positionStrategy?.attach(this),this._updateStackingOrder(),this._updateElementSize(),this._updateElementDirection(),this._scrollStrategy&&this._scrollStrategy.enable(),this._afterNextRenderRef?.destroy(),this._afterNextRenderRef=Ge(()=>{this.hasAttached()&&this.updatePosition()},{injector:this._injector}),this._togglePointerEvents(!0),this._config.hasBackdrop&&this._attachBackdrop(),this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!0),this._attachments.next(),this._completeDetachContent(),this._keyboardDispatcher.add(this),this._config.disposeOnNavigation&&(this._locationChanges=this._location.subscribe(()=>this.dispose())),this._outsideClickDispatcher.add(this),typeof e?.onDestroy=="function"&&e.onDestroy(()=>{this.hasAttached()&&this._ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>this.detach()))}),e}detach(){if(!this.hasAttached())return;this.detachBackdrop(),this._togglePointerEvents(!1),this._positionStrategy&&this._positionStrategy.detach&&this._positionStrategy.detach(),this._scrollStrategy&&this._scrollStrategy.disable();let o=this._portalOutlet.detach();return this._detachments.next(),this._completeDetachContent(),this._keyboardDispatcher.remove(this),this._detachContentWhenEmpty(),this._locationChanges.unsubscribe(),this._outsideClickDispatcher.remove(this),o}dispose(){if(this._disposed)return;let o=this.hasAttached();this._positionStrategy&&this._positionStrategy.dispose(),this._disposeScrollStrategy(),this._backdropRef?.dispose(),this._locationChanges.unsubscribe(),this._keyboardDispatcher.remove(this),this._portalOutlet.dispose(),this._attachments.complete(),this._backdropClick.complete(),this._keydownEvents.complete(),this._outsidePointerEvents.complete(),this._outsideClickDispatcher.remove(this),this._host?.remove(),this._afterNextRenderRef?.destroy(),this._previousHostParent=this._pane=this._host=this._backdropRef=null,o&&this._detachments.next(),this._detachments.complete(),this._completeDetachContent(),this._disposed=!0}hasAttached(){return this._portalOutlet.hasAttached()}backdropClick(){return this._backdropClick}attachments(){return this._attachments}detachments(){return this._detachments}keydownEvents(){return this._keydownEvents}outsidePointerEvents(){return this._outsidePointerEvents}getConfig(){return this._config}updatePosition(){this._positionStrategy&&this._positionStrategy.apply()}updatePositionStrategy(o){o!==this._positionStrategy&&(this._positionStrategy&&this._positionStrategy.dispose(),this._positionStrategy=o,this.hasAttached()&&(o.attach(this),this.updatePosition()))}updateSize(o){this._config=V(V({},this._config),o),this._updateElementSize()}setDirection(o){this._config=Fe(V({},this._config),{direction:o}),this._updateElementDirection()}addPanelClass(o){this._pane&&this._toggleClasses(this._pane,o,!0)}removePanelClass(o){this._pane&&this._toggleClasses(this._pane,o,!1)}getDirection(){let o=this._config.direction;return o?typeof o=="string"?o:o.value:"ltr"}updateScrollStrategy(o){o!==this._scrollStrategy&&(this._disposeScrollStrategy(),this._scrollStrategy=o,this.hasAttached()&&(o.attach(this),o.enable()))}_updateElementDirection(){this._host.setAttribute("dir",this.getDirection())}_updateElementSize(){if(!this._pane)return;let o=this._pane.style;o.width=nt(this._config.width),o.height=nt(this._config.height),o.minWidth=nt(this._config.minWidth),o.minHeight=nt(this._config.minHeight),o.maxWidth=nt(this._config.maxWidth),o.maxHeight=nt(this._config.maxHeight)}_togglePointerEvents(o){this._pane.style.pointerEvents=o?"":"none"}_attachHost(){if(!this._host.parentElement){let o=this._config.usePopover?this._positionStrategy?.getPopoverInsertionPoint?.():null;Lc(o)?o.after(this._host):o?.type==="parent"?o.element.appendChild(this._host):this._previousHostParent?.appendChild(this._host)}if(this._config.usePopover)try{this._host.showPopover()}catch(o){}}_attachBackdrop(){let o="cdk-overlay-backdrop-showing";this._backdropRef?.dispose(),this._backdropRef=new Nc(this._document,this._renderer,this._ngZone,e=>{this._backdropClick.next(e)}),this._animationsDisabled&&this._backdropRef.element.classList.add("cdk-overlay-backdrop-noop-animation"),this._config.backdropClass&&this._toggleClasses(this._backdropRef.element,this._config.backdropClass,!0),this._config.usePopover?this._host.prepend(this._backdropRef.element):this._host.parentElement.insertBefore(this._backdropRef.element,this._host),!this._animationsDisabled&&typeof requestAnimationFrame<"u"?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>this._backdropRef?.element.classList.add(o))}):this._backdropRef.element.classList.add(o)}_updateStackingOrder(){!this._config.usePopover&&this._host.nextSibling&&this._host.parentNode.appendChild(this._host)}detachBackdrop(){this._animationsDisabled?(this._backdropRef?.dispose(),this._backdropRef=null):this._backdropRef?.detach()}_toggleClasses(o,e,t){let n=sn(e||[]).filter(a=>!!a);n.length&&(t?o.classList.add(...n):o.classList.remove(...n))}_detachContentWhenEmpty(){let o=!1;try{this._detachContentAfterRenderRef=Ge(()=>{o=!0,this._detachContent()},{injector:this._injector})}catch(e){if(o)throw e;this._detachContent()}globalThis.MutationObserver&&this._pane&&(this._detachContentMutationObserver||=new globalThis.MutationObserver(()=>{this._detachContent()}),this._detachContentMutationObserver.observe(this._pane,{childList:!0}))}_detachContent(){(!this._pane||!this._host||this._pane.children.length===0)&&(this._pane&&this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!1),this._host&&this._host.parentElement&&(this._previousHostParent=this._host.parentElement,this._host.remove()),this._completeDetachContent())}_completeDetachContent(){this._detachContentAfterRenderRef?.destroy(),this._detachContentAfterRenderRef=void 0,this._detachContentMutationObserver?.disconnect()}_disposeScrollStrategy(){let o=this._scrollStrategy;o?.disable(),o?.detach?.()}},Yh="cdk-overlay-connected-position-bounding-box",r0=/([A-Za-z%]+)$/;function hn(i,o){return new Is(o,i.get(ni),i.get(K),i.get(fe),i.get(Ps))}var Is=class{_viewportRuler;_document;_platform;_overlayContainer;_overlayRef;_isInitialRender=!1;_lastBoundingBoxSize={width:0,height:0};_isPushed=!1;_canPush=!0;_growAfterOpen=!1;_hasFlexibleDimensions=!0;_positionLocked=!1;_originRect;_overlayRect;_viewportRect;_containerRect;_viewportMargin=0;_scrollables=[];_preferredPositions=[];_origin;_pane;_isDisposed=!1;_boundingBox=null;_lastPosition=null;_lastScrollVisibility=null;_positionChanges=new O;_resizeSubscription=Te.EMPTY;_offsetX=0;_offsetY=0;_transformOriginSelector;_appliedPanelClasses=[];_previousPushAmount=null;_popoverLocation="global";positionChanges=this._positionChanges;get positions(){return this._preferredPositions}constructor(o,e,t,n,a){this._viewportRuler=e,this._document=t,this._platform=n,this._overlayContainer=a,this.setOrigin(o)}attach(o){this._overlayRef&&this._overlayRef,this._validatePositions(),o.hostElement.classList.add(Yh),this._overlayRef=o,this._boundingBox=o.hostElement,this._pane=o.overlayElement,this._isDisposed=!1,this._isInitialRender=!0,this._lastPosition=null,this._resizeSubscription.unsubscribe(),this._resizeSubscription=this._viewportRuler.change().subscribe(()=>{this._isInitialRender=!0,this.apply()})}apply(){if(this._isDisposed||!this._platform.isBrowser)return;if(!this._isInitialRender&&this._positionLocked&&this._lastPosition){this.reapplyLastPosition();return}this._clearPanelClasses(),this._resetOverlayElementStyles(),this._resetBoundingBoxStyles(),this._viewportRect=this._getNarrowedViewportRect(),this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._containerRect=this._getContainerRect();let o=this._originRect,e=this._overlayRect,t=this._viewportRect,n=this._containerRect,a=[],r;for(let u of this._preferredPositions){let h=this._getOriginPoint(o,n,u),f=this._getOverlayPoint(h,e,u),b=this._getOverlayFit(f,e,t,u);if(b.isCompletelyWithinViewport){this._isPushed=!1,this._applyPosition(u,h);return}if(this._canFitWithFlexibleDimensions(b,f,t)){a.push({position:u,origin:h,overlayRect:e,boundingBoxRect:this._calculateBoundingBoxRect(h,u)});continue}(!r||r.overlayFit.visibleArea<b.visibleArea)&&(r={overlayFit:b,overlayPoint:f,originPoint:h,position:u,overlayRect:e})}if(a.length){let u=null,h=-1;for(let f of a){let b=f.boundingBoxRect.width*f.boundingBoxRect.height*(f.position.weight||1);b>h&&(h=b,u=f)}this._isPushed=!1,this._applyPosition(u.position,u.origin);return}if(this._canPush){this._isPushed=!0,this._applyPosition(r.position,r.originPoint);return}this._applyPosition(r.position,r.originPoint)}detach(){this._clearPanelClasses(),this._lastPosition=null,this._previousPushAmount=null,this._resizeSubscription.unsubscribe()}dispose(){this._isDisposed||(this._boundingBox&&co(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(Yh),this.detach(),this._positionChanges.complete(),this._overlayRef=this._boundingBox=null,this._isDisposed=!0)}reapplyLastPosition(){if(this._isDisposed||!this._platform.isBrowser)return;let o=this._lastPosition;o?(this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._viewportRect=this._getNarrowedViewportRect(),this._containerRect=this._getContainerRect(),this._applyPosition(o,this._getOriginPoint(this._originRect,this._containerRect,o))):this.apply()}withScrollableContainers(o){return this._scrollables=o,this}withPositions(o){return this._preferredPositions=o,o.indexOf(this._lastPosition)===-1&&(this._lastPosition=null),this._validatePositions(),this}withViewportMargin(o){return this._viewportMargin=o,this}withFlexibleDimensions(o=!0){return this._hasFlexibleDimensions=o,this}withGrowAfterOpen(o=!0){return this._growAfterOpen=o,this}withPush(o=!0){return this._canPush=o,this}withLockedPosition(o=!0){return this._positionLocked=o,this}setOrigin(o){return this._origin=o,this}withDefaultOffsetX(o){return this._offsetX=o,this}withDefaultOffsetY(o){return this._offsetY=o,this}withTransformOriginOn(o){return this._transformOriginSelector=o,this}withPopoverLocation(o){return this._popoverLocation=o,this}getPopoverInsertionPoint(){return this._popoverLocation==="global"?null:this._popoverLocation!=="inline"?this._popoverLocation:this._origin instanceof B?this._origin.nativeElement:Lc(this._origin)?this._origin:null}_getOriginPoint(o,e,t){let n;if(t.originX=="center")n=o.left+o.width/2;else{let r=this._isRtl()?o.right:o.left,u=this._isRtl()?o.left:o.right;n=t.originX=="start"?r:u}e.left<0&&(n-=e.left);let a;return t.originY=="center"?a=o.top+o.height/2:a=t.originY=="top"?o.top:o.bottom,e.top<0&&(a-=e.top),{x:n,y:a}}_getOverlayPoint(o,e,t){let n;t.overlayX=="center"?n=-e.width/2:t.overlayX==="start"?n=this._isRtl()?-e.width:0:n=this._isRtl()?0:-e.width;let a;return t.overlayY=="center"?a=-e.height/2:a=t.overlayY=="top"?0:-e.height,{x:o.x+n,y:o.y+a}}_getOverlayFit(o,e,t,n){let a=Qh(e),{x:r,y:u}=o,h=this._getOffset(n,"x"),f=this._getOffset(n,"y");h&&(r+=h),f&&(u+=f);let b=0-r,M=r+a.width-t.width,j=0-u,G=u+a.height-t.height,de=this._subtractOverflows(a.width,b,M),Ce=this._subtractOverflows(a.height,j,G),pe=de*Ce;return{visibleArea:pe,isCompletelyWithinViewport:a.width*a.height===pe,fitsInViewportVertically:Ce===a.height,fitsInViewportHorizontally:de==a.width}}_canFitWithFlexibleDimensions(o,e,t){if(this._hasFlexibleDimensions){let n=t.bottom-e.y,a=t.right-e.x,r=Zh(this._overlayRef.getConfig().minHeight),u=Zh(this._overlayRef.getConfig().minWidth),h=o.fitsInViewportVertically||r!=null&&r<=n,f=o.fitsInViewportHorizontally||u!=null&&u<=a;return h&&f}return!1}_pushOverlayOnScreen(o,e,t){if(this._previousPushAmount&&this._positionLocked)return{x:o.x+this._previousPushAmount.x,y:o.y+this._previousPushAmount.y};let n=Qh(e),a=this._viewportRect,r=Math.max(o.x+n.width-a.width,0),u=Math.max(o.y+n.height-a.height,0),h=Math.max(a.top-t.top-o.y,0),f=Math.max(a.left-t.left-o.x,0),b=0,M=0;return n.width<=a.width?b=f||-r:b=o.x<this._getViewportMarginStart()?a.left-t.left-o.x:0,n.height<=a.height?M=h||-u:M=o.y<this._getViewportMarginTop()?a.top-t.top-o.y:0,this._previousPushAmount={x:b,y:M},{x:o.x+b,y:o.y+M}}_applyPosition(o,e){if(this._setTransformOrigin(o),this._setOverlayElementStyles(e,o),this._setBoundingBoxStyles(e,o),o.panelClass&&this._addPanelClasses(o.panelClass),this._positionChanges.observers.length){let t=this._getScrollVisibility();if(o!==this._lastPosition||!this._lastScrollVisibility||!s0(this._lastScrollVisibility,t)){let n=new As(o,t);this._positionChanges.next(n)}this._lastScrollVisibility=t}this._lastPosition=o,this._isInitialRender=!1}_setTransformOrigin(o){if(!this._transformOriginSelector)return;let e=this._boundingBox.querySelectorAll(this._transformOriginSelector),t,n=o.overlayY;o.overlayX==="center"?t="center":this._isRtl()?t=o.overlayX==="start"?"right":"left":t=o.overlayX==="start"?"left":"right";for(let a=0;a<e.length;a++)e[a].style.transformOrigin=`${t} ${n}`}_calculateBoundingBoxRect(o,e){let t=this._viewportRect,n=this._isRtl(),a,r,u;if(e.overlayY==="top")r=o.y,a=t.height-r+this._getViewportMarginBottom();else if(e.overlayY==="bottom")u=t.height-o.y+this._getViewportMarginTop()+this._getViewportMarginBottom(),a=t.height-u+this._getViewportMarginTop();else{let G=Math.min(t.bottom-o.y+t.top,o.y),de=this._lastBoundingBoxSize.height;a=G*2,r=o.y-G,a>de&&!this._isInitialRender&&!this._growAfterOpen&&(r=o.y-de/2)}let h=e.overlayX==="start"&&!n||e.overlayX==="end"&&n,f=e.overlayX==="end"&&!n||e.overlayX==="start"&&n,b,M,j;if(f)j=t.width-o.x+this._getViewportMarginStart()+this._getViewportMarginEnd(),b=o.x-this._getViewportMarginStart();else if(h)M=o.x,b=t.right-o.x-this._getViewportMarginEnd();else{let G=Math.min(t.right-o.x+t.left,o.x),de=this._lastBoundingBoxSize.width;b=G*2,M=o.x-G,b>de&&!this._isInitialRender&&!this._growAfterOpen&&(M=o.x-de/2)}return{top:r,left:M,bottom:u,right:j,width:b,height:a}}_setBoundingBoxStyles(o,e){let t=this._calculateBoundingBoxRect(o,e);!this._isInitialRender&&!this._growAfterOpen&&(t.height=Math.min(t.height,this._lastBoundingBoxSize.height),t.width=Math.min(t.width,this._lastBoundingBoxSize.width));let n={};if(this._hasExactPosition())n.top=n.left="0",n.bottom=n.right="auto",n.maxHeight=n.maxWidth="",n.width=n.height="100%";else{let a=this._overlayRef.getConfig().maxHeight,r=this._overlayRef.getConfig().maxWidth;n.width=nt(t.width),n.height=nt(t.height),n.top=nt(t.top)||"auto",n.bottom=nt(t.bottom)||"auto",n.left=nt(t.left)||"auto",n.right=nt(t.right)||"auto",e.overlayX==="center"?n.alignItems="center":n.alignItems=e.overlayX==="end"?"flex-end":"flex-start",e.overlayY==="center"?n.justifyContent="center":n.justifyContent=e.overlayY==="bottom"?"flex-end":"flex-start",a&&(n.maxHeight=nt(a)),r&&(n.maxWidth=nt(r))}this._lastBoundingBoxSize=t,co(this._boundingBox.style,n)}_resetBoundingBoxStyles(){co(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){co(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})}_setOverlayElementStyles(o,e){let t={},n=this._hasExactPosition(),a=this._hasFlexibleDimensions,r=this._overlayRef.getConfig();if(n){let b=this._viewportRuler.getViewportScrollPosition();co(t,this._getExactOverlayY(e,o,b)),co(t,this._getExactOverlayX(e,o,b))}else t.position="static";let u="",h=this._getOffset(e,"x"),f=this._getOffset(e,"y");h&&(u+=`translateX(${h}px) `),f&&(u+=`translateY(${f}px)`),t.transform=u.trim(),r.maxHeight&&(n?t.maxHeight=nt(r.maxHeight):a&&(t.maxHeight="")),r.maxWidth&&(n?t.maxWidth=nt(r.maxWidth):a&&(t.maxWidth="")),co(this._pane.style,t)}_getExactOverlayY(o,e,t){let n={top:"",bottom:""},a=this._getOverlayPoint(e,this._overlayRect,o);if(this._isPushed&&(a=this._pushOverlayOnScreen(a,this._overlayRect,t)),o.overlayY==="bottom"){let r=this._document.documentElement.clientHeight;n.bottom=`${r-(a.y+this._overlayRect.height)}px`}else n.top=nt(a.y);return n}_getExactOverlayX(o,e,t){let n={left:"",right:""},a=this._getOverlayPoint(e,this._overlayRect,o);this._isPushed&&(a=this._pushOverlayOnScreen(a,this._overlayRect,t));let r;if(this._isRtl()?r=o.overlayX==="end"?"left":"right":r=o.overlayX==="end"?"right":"left",r==="right"){let u=this._document.documentElement.clientWidth;n.right=`${u-(a.x+this._overlayRect.width)}px`}else n.left=nt(a.x);return n}_getScrollVisibility(){let o=this._getOriginRect(),e=this._pane.getBoundingClientRect(),t=this._scrollables.map(n=>n.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:Kh(o,t),isOriginOutsideView:Fc(o,t),isOverlayClipped:Kh(e,t),isOverlayOutsideView:Fc(e,t)}}_subtractOverflows(o,...e){return e.reduce((t,n)=>t-Math.max(n,0),o)}_getNarrowedViewportRect(){let o=this._document.documentElement.clientWidth,e=this._document.documentElement.clientHeight,t=this._viewportRuler.getViewportScrollPosition();return{top:t.top+this._getViewportMarginTop(),left:t.left+this._getViewportMarginStart(),right:t.left+o-this._getViewportMarginEnd(),bottom:t.top+e-this._getViewportMarginBottom(),width:o-this._getViewportMarginStart()-this._getViewportMarginEnd(),height:e-this._getViewportMarginTop()-this._getViewportMarginBottom()}}_isRtl(){return this._overlayRef.getDirection()==="rtl"}_hasExactPosition(){return!this._hasFlexibleDimensions||this._isPushed}_getOffset(o,e){return e==="x"?o.offsetX==null?this._offsetX:o.offsetX:o.offsetY==null?this._offsetY:o.offsetY}_validatePositions(){}_addPanelClasses(o){this._pane&&sn(o).forEach(e=>{e!==""&&this._appliedPanelClasses.indexOf(e)===-1&&(this._appliedPanelClasses.push(e),this._pane.classList.add(e))})}_clearPanelClasses(){this._pane&&(this._appliedPanelClasses.forEach(o=>{this._pane.classList.remove(o)}),this._appliedPanelClasses=[])}_getViewportMarginStart(){return typeof this._viewportMargin=="number"?this._viewportMargin:this._viewportMargin?.start??0}_getViewportMarginEnd(){return typeof this._viewportMargin=="number"?this._viewportMargin:this._viewportMargin?.end??0}_getViewportMarginTop(){return typeof this._viewportMargin=="number"?this._viewportMargin:this._viewportMargin?.top??0}_getViewportMarginBottom(){return typeof this._viewportMargin=="number"?this._viewportMargin:this._viewportMargin?.bottom??0}_getOriginRect(){let o=this._origin;if(o instanceof B)return o.nativeElement.getBoundingClientRect();if(o instanceof Element)return o.getBoundingClientRect();let e=o.width||0,t=o.height||0;return{top:o.y,bottom:o.y+t,left:o.x,right:o.x+e,height:t,width:e}}_getContainerRect(){let o=this._overlayRef.getConfig().usePopover&&this._popoverLocation!=="global",e=this._overlayContainer.getContainerElement();o&&(e.style.display="block");let t=e.getBoundingClientRect();return o&&(e.style.display=""),t}};function co(i,o){for(let e in o)o.hasOwnProperty(e)&&(i[e]=o[e]);return i}function Zh(i){if(typeof i!="number"&&i!=null){let[o,e]=i.split(r0);return!e||e==="px"?parseFloat(o):null}return i||null}function Qh(i){return{top:Math.floor(i.top),right:Math.floor(i.right),bottom:Math.floor(i.bottom),left:Math.floor(i.left),width:Math.floor(i.width),height:Math.floor(i.height)}}function s0(i,o){return i===o?!0:i.isOriginClipped===o.isOriginClipped&&i.isOriginOutsideView===o.isOriginOutsideView&&i.isOverlayClipped===o.isOverlayClipped&&i.isOverlayOutsideView===o.isOverlayOutsideView}var Jh="cdk-global-overlay-wrapper";function On(i){return new Rs}var Rs=class{_overlayRef;_cssPosition="static";_topOffset="";_bottomOffset="";_alignItems="";_xPosition="";_xOffset="";_width="";_height="";_isDisposed=!1;attach(o){let e=o.getConfig();this._overlayRef=o,this._width&&!e.width&&o.updateSize({width:this._width}),this._height&&!e.height&&o.updateSize({height:this._height}),o.hostElement.classList.add(Jh),this._isDisposed=!1}top(o=""){return this._bottomOffset="",this._topOffset=o,this._alignItems="flex-start",this}left(o=""){return this._xOffset=o,this._xPosition="left",this}bottom(o=""){return this._topOffset="",this._bottomOffset=o,this._alignItems="flex-end",this}right(o=""){return this._xOffset=o,this._xPosition="right",this}start(o=""){return this._xOffset=o,this._xPosition="start",this}end(o=""){return this._xOffset=o,this._xPosition="end",this}width(o=""){return this._overlayRef?this._overlayRef.updateSize({width:o}):this._width=o,this}height(o=""){return this._overlayRef?this._overlayRef.updateSize({height:o}):this._height=o,this}centerHorizontally(o=""){return this.left(o),this._xPosition="center",this}centerVertically(o=""){return this.top(o),this._alignItems="center",this}apply(){if(!this._overlayRef||!this._overlayRef.hasAttached())return;let o=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement.style,t=this._overlayRef.getConfig(),{width:n,height:a,maxWidth:r,maxHeight:u}=t,h=(n==="100%"||n==="100vw")&&(!r||r==="100%"||r==="100vw"),f=(a==="100%"||a==="100vh")&&(!u||u==="100%"||u==="100vh"),b=this._xPosition,M=this._xOffset,j=this._overlayRef.getConfig().direction==="rtl",G="",de="",Ce="";h?Ce="flex-start":b==="center"?(Ce="center",j?de=M:G=M):j?b==="left"||b==="end"?(Ce="flex-end",G=M):(b==="right"||b==="start")&&(Ce="flex-start",de=M):b==="left"||b==="start"?(Ce="flex-start",G=M):(b==="right"||b==="end")&&(Ce="flex-end",de=M),o.position=this._cssPosition,o.marginLeft=h?"0":G,o.marginTop=f?"0":this._topOffset,o.marginBottom=this._bottomOffset,o.marginRight=h?"0":de,e.justifyContent=Ce,e.alignItems=f?"flex-start":this._alignItems}dispose(){if(this._isDisposed||!this._overlayRef)return;let o=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement,t=e.style;e.classList.remove(Jh),t.justifyContent=t.alignItems=o.marginTop=o.marginBottom=o.marginLeft=o.marginRight=o.position="",this._overlayRef=null,this._isDisposed=!0}},rp=(()=>{class i{_injector=m(Z);global(){return On()}flexibleConnectedTo(e){return hn(this._injector,e)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})(),tr=new k("OVERLAY_DEFAULT_CONFIG");function ri(i,o){i.get(Be).load(ap);let e=i.get(Ps),t=i.get(K),n=i.get(De),a=i.get(bn),r=i.get(Ze),u=i.get(we,null,{optional:!0})||i.get(ct).createRenderer(null,null),h=new ai(o),f=i.get(tr,null,{optional:!0})?.usePopover??!0;h.direction=h.direction||r.value,"showPopover"in t.body?h.usePopover=o?.usePopover??f:h.usePopover=!1;let b=t.createElement("div"),M=t.createElement("div");b.id=n.getId("cdk-overlay-"),b.classList.add("cdk-overlay-pane"),M.appendChild(b),h.usePopover&&(M.setAttribute("popover","manual"),M.classList.add("cdk-overlay-popover"));let j=h.usePopover?h.positionStrategy?.getPopoverInsertionPoint?.():null;return Lc(j)?j.after(M):j?.type==="parent"?j.element.appendChild(M):e.getContainerElement().appendChild(M),new qo(new Ja(b,a,i),M,b,h,i.get($),i.get(np),t,i.get(Mr),i.get(op),o?.disableAnimations??i.get(nn,null,{optional:!0})==="NoopAnimations",i.get(Di),u)}var sp=(()=>{class i{scrollStrategies=m(tp);_positionBuilder=m(rp);_injector=m(Z);create(e){return ri(this._injector,e)}position(){return this._positionBuilder}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})(),l0=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],c0=new k("cdk-connected-overlay-scroll-strategy",{providedIn:"root",factory:()=>{let i=m(Z);return()=>Fi(i)}}),Ko=(()=>{class i{elementRef=m(B);static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,selectors:[["","cdk-overlay-origin",""],["","overlay-origin",""],["","cdkOverlayOrigin",""]],exportAs:["cdkOverlayOrigin"]})}return i})(),lp=new k("cdk-connected-overlay-default-config"),Os=(()=>{class i{_dir=m(Ze,{optional:!0});_injector=m(Z);_overlayRef;_templatePortal;_backdropSubscription=Te.EMPTY;_attachSubscription=Te.EMPTY;_detachSubscription=Te.EMPTY;_positionSubscription=Te.EMPTY;_offsetX;_offsetY;_position;_scrollStrategyFactory=m(c0);_ngZone=m($);origin;positions;positionStrategy;get offsetX(){return this._offsetX}set offsetX(e){this._offsetX=e,this._position&&this._updatePositionStrategy(this._position)}get offsetY(){return this._offsetY}set offsetY(e){this._offsetY=e,this._position&&this._updatePositionStrategy(this._position)}width;height;minWidth;minHeight;backdropClass;panelClass;viewportMargin=0;scrollStrategy;open=!1;disableClose=!1;transformOriginSelector;hasBackdrop=!1;lockPosition=!1;flexibleDimensions=!1;growAfterOpen=!1;push=!1;disposeOnNavigation=!1;usePopover;matchWidth=!1;set _config(e){typeof e!="string"&&this._assignConfig(e)}backdropClick=new X;positionChange=new X;attach=new X;detach=new X;overlayKeydown=new X;overlayOutsideClick=new X;constructor(){let e=m(tt),t=m(it),n=m(lp,{optional:!0}),a=m(tr,{optional:!0});this.usePopover=a?.usePopover===!1?null:"global",this._templatePortal=new Gt(e,t),this.scrollStrategy=this._scrollStrategyFactory(),n&&this._assignConfig(n)}get overlayRef(){return this._overlayRef}get dir(){return this._dir?this._dir.value:"ltr"}ngOnDestroy(){this._attachSubscription.unsubscribe(),this._detachSubscription.unsubscribe(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this._overlayRef?.dispose()}ngOnChanges(e){this._position&&(this._updatePositionStrategy(this._position),this._overlayRef?.updateSize({width:this._getWidth(),minWidth:this.minWidth,height:this.height,minHeight:this.minHeight}),e.origin&&this.open&&this._position.apply()),e.open&&(this.open?this.attachOverlay():this.detachOverlay())}_createOverlay(){(!this.positions||!this.positions.length)&&(this.positions=l0);let e=this._overlayRef=ri(this._injector,this._buildConfig());this._attachSubscription=e.attachments().subscribe(()=>this.attach.emit()),this._detachSubscription=e.detachments().subscribe(()=>this.detach.emit()),e.keydownEvents().subscribe(t=>{this.overlayKeydown.next(t),t.keyCode===27&&!this.disableClose&&!Ke(t)&&(t.preventDefault(),this.detachOverlay())}),this._overlayRef.outsidePointerEvents().subscribe(t=>{let n=this._getOriginElement(),a=mt(t);(!n||n!==a&&!n.contains(a))&&this.overlayOutsideClick.next(t)})}_buildConfig(){let e=this._position=this.positionStrategy||this._createPositionStrategy(),t=new ai({direction:this._dir||"ltr",positionStrategy:e,scrollStrategy:this.scrollStrategy,hasBackdrop:this.hasBackdrop,disposeOnNavigation:this.disposeOnNavigation,usePopover:!!this.usePopover});return(this.height||this.height===0)&&(t.height=this.height),(this.minWidth||this.minWidth===0)&&(t.minWidth=this.minWidth),(this.minHeight||this.minHeight===0)&&(t.minHeight=this.minHeight),this.backdropClass&&(t.backdropClass=this.backdropClass),this.panelClass&&(t.panelClass=this.panelClass),t}_updatePositionStrategy(e){let t=this.positions.map(n=>({originX:n.originX,originY:n.originY,overlayX:n.overlayX,overlayY:n.overlayY,offsetX:n.offsetX||this.offsetX,offsetY:n.offsetY||this.offsetY,panelClass:n.panelClass||void 0}));return e.setOrigin(this._getOrigin()).withPositions(t).withFlexibleDimensions(this.flexibleDimensions).withPush(this.push).withGrowAfterOpen(this.growAfterOpen).withViewportMargin(this.viewportMargin).withLockedPosition(this.lockPosition).withTransformOriginOn(this.transformOriginSelector).withPopoverLocation(this.usePopover===null?"global":this.usePopover)}_createPositionStrategy(){let e=hn(this._injector,this._getOrigin());return this._updatePositionStrategy(e),e}_getOrigin(){return this.origin instanceof Ko?this.origin.elementRef:this.origin}_getOriginElement(){return this.origin instanceof Ko?this.origin.elementRef.nativeElement:this.origin instanceof B?this.origin.nativeElement:typeof Element<"u"&&this.origin instanceof Element?this.origin:null}_getWidth(){return this.width?this.width:this.matchWidth?this._getOriginElement()?.getBoundingClientRect?.().width:void 0}attachOverlay(){this._overlayRef||this._createOverlay();let e=this._overlayRef;e.getConfig().hasBackdrop=this.hasBackdrop,e.updateSize({width:this._getWidth()}),e.hasAttached()||e.attach(this._templatePortal),this.hasBackdrop?this._backdropSubscription=e.backdropClick().subscribe(t=>this.backdropClick.emit(t)):this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this.positionChange.observers.length>0&&(this._positionSubscription=this._position.positionChanges.pipe(cd(()=>this.positionChange.observers.length>0)).subscribe(t=>{this._ngZone.run(()=>this.positionChange.emit(t)),this.positionChange.observers.length===0&&this._positionSubscription.unsubscribe()})),this.open=!0}detachOverlay(){this._overlayRef?.detach(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this.open=!1}_assignConfig(e){this.origin=e.origin??this.origin,this.positions=e.positions??this.positions,this.positionStrategy=e.positionStrategy??this.positionStrategy,this.offsetX=e.offsetX??this.offsetX,this.offsetY=e.offsetY??this.offsetY,this.width=e.width??this.width,this.height=e.height??this.height,this.minWidth=e.minWidth??this.minWidth,this.minHeight=e.minHeight??this.minHeight,this.backdropClass=e.backdropClass??this.backdropClass,this.panelClass=e.panelClass??this.panelClass,this.viewportMargin=e.viewportMargin??this.viewportMargin,this.scrollStrategy=e.scrollStrategy??this.scrollStrategy,this.disableClose=e.disableClose??this.disableClose,this.transformOriginSelector=e.transformOriginSelector??this.transformOriginSelector,this.hasBackdrop=e.hasBackdrop??this.hasBackdrop,this.lockPosition=e.lockPosition??this.lockPosition,this.flexibleDimensions=e.flexibleDimensions??this.flexibleDimensions,this.growAfterOpen=e.growAfterOpen??this.growAfterOpen,this.push=e.push??this.push,this.disposeOnNavigation=e.disposeOnNavigation??this.disposeOnNavigation,this.usePopover=e.usePopover??this.usePopover,this.matchWidth=e.matchWidth??this.matchWidth}static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,selectors:[["","cdk-connected-overlay",""],["","connected-overlay",""],["","cdkConnectedOverlay",""]],inputs:{origin:[0,"cdkConnectedOverlayOrigin","origin"],positions:[0,"cdkConnectedOverlayPositions","positions"],positionStrategy:[0,"cdkConnectedOverlayPositionStrategy","positionStrategy"],offsetX:[0,"cdkConnectedOverlayOffsetX","offsetX"],offsetY:[0,"cdkConnectedOverlayOffsetY","offsetY"],width:[0,"cdkConnectedOverlayWidth","width"],height:[0,"cdkConnectedOverlayHeight","height"],minWidth:[0,"cdkConnectedOverlayMinWidth","minWidth"],minHeight:[0,"cdkConnectedOverlayMinHeight","minHeight"],backdropClass:[0,"cdkConnectedOverlayBackdropClass","backdropClass"],panelClass:[0,"cdkConnectedOverlayPanelClass","panelClass"],viewportMargin:[0,"cdkConnectedOverlayViewportMargin","viewportMargin"],scrollStrategy:[0,"cdkConnectedOverlayScrollStrategy","scrollStrategy"],open:[0,"cdkConnectedOverlayOpen","open"],disableClose:[0,"cdkConnectedOverlayDisableClose","disableClose"],transformOriginSelector:[0,"cdkConnectedOverlayTransformOriginOn","transformOriginSelector"],hasBackdrop:[2,"cdkConnectedOverlayHasBackdrop","hasBackdrop",z],lockPosition:[2,"cdkConnectedOverlayLockPosition","lockPosition",z],flexibleDimensions:[2,"cdkConnectedOverlayFlexibleDimensions","flexibleDimensions",z],growAfterOpen:[2,"cdkConnectedOverlayGrowAfterOpen","growAfterOpen",z],push:[2,"cdkConnectedOverlayPush","push",z],disposeOnNavigation:[2,"cdkConnectedOverlayDisposeOnNavigation","disposeOnNavigation",z],usePopover:[0,"cdkConnectedOverlayUsePopover","usePopover"],matchWidth:[2,"cdkConnectedOverlayMatchWidth","matchWidth",z],_config:[0,"cdkConnectedOverlay","_config"]},outputs:{backdropClick:"backdropClick",positionChange:"positionChange",attach:"attach",detach:"detach",overlayKeydown:"overlayKeydown",overlayOutsideClick:"overlayOutsideClick"},exportAs:["cdkConnectedOverlay"],features:[Ie]})}return i})(),Qt=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=U({type:i});static \u0275inj=H({providers:[sp],imports:[ce,Yi,Ga,Ga]})}return i})();function d0(i,o){}var Fn=class{viewContainerRef;injector;id;role="dialog";panelClass="";hasBackdrop=!0;backdropClass="";disableClose=!1;closePredicate;width="";height="";minWidth;minHeight;maxWidth;maxHeight;positionStrategy;data=null;direction;ariaDescribedBy=null;ariaLabelledBy=null;ariaLabel=null;ariaModal=!1;autoFocus="first-tabbable";restoreFocus=!0;scrollStrategy;closeOnNavigation=!0;closeOnDestroy=!0;closeOnOverlayDetachments=!0;disableAnimations=!1;providers;container;templateContext;bindings};var Bc=(()=>{class i extends Pn{_elementRef=m(B);_focusTrapFactory=m(Jl);_config;_interactivityChecker=m(Ql);_ngZone=m($);_focusMonitor=m(Xt);_renderer=m(we);_changeDetectorRef=m(se);_injector=m(Z);_platform=m(fe);_document=m(K);_portalOutlet;_focusTrapped=new O;_focusTrap=null;_elementFocusedBeforeDialogWasOpened=null;_closeInteractionType=null;_ariaLabelledByQueue=[];_isDestroyed=!1;constructor(){super(),this._config=m(Fn,{optional:!0})||new Fn,this._config.ariaLabelledBy&&this._ariaLabelledByQueue.push(this._config.ariaLabelledBy)}_addAriaLabelledBy(e){this._ariaLabelledByQueue.push(e),this._changeDetectorRef.markForCheck()}_removeAriaLabelledBy(e){let t=this._ariaLabelledByQueue.indexOf(e);t>-1&&(this._ariaLabelledByQueue.splice(t,1),this._changeDetectorRef.markForCheck())}_contentAttached(){this._initializeFocusTrap(),this._captureInitialFocus()}_captureInitialFocus(){this._trapFocus()}ngOnDestroy(){this._focusTrapped.complete(),this._isDestroyed=!0,this._restoreFocus()}attachComponentPortal(e){this._portalOutlet.hasAttached();let t=this._portalOutlet.attachComponentPortal(e);return this._contentAttached(),t}attachTemplatePortal(e){this._portalOutlet.hasAttached();let t=this._portalOutlet.attachTemplatePortal(e);return this._contentAttached(),t}attachDomPortal=e=>{this._portalOutlet.hasAttached();let t=this._portalOutlet.attachDomPortal(e);return this._contentAttached(),t};_recaptureFocus(){this._containsFocus()||this._trapFocus()}_forceFocus(e,t){this._interactivityChecker.isFocusable(e)||(e.tabIndex=-1,this._ngZone.runOutsideAngular(()=>{let n=()=>{a(),r(),e.removeAttribute("tabindex")},a=this._renderer.listen(e,"blur",n),r=this._renderer.listen(e,"mousedown",n)})),e.focus(t)}_focusByCssSelector(e,t){let n=this._elementRef.nativeElement.querySelector(e);n&&this._forceFocus(n,t)}_trapFocus(e){this._isDestroyed||Ge(()=>{let t=this._elementRef.nativeElement;switch(this._config.autoFocus){case!1:case"dialog":this._containsFocus()||t.focus(e);break;case!0:case"first-tabbable":this._focusTrap?.focusInitialElement(e)||this._focusDialogContainer(e);break;case"first-heading":this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role="heading"]',e);break;default:this._focusByCssSelector(this._config.autoFocus,e);break}this._focusTrapped.next()},{injector:this._injector})}_restoreFocus(){let e=this._config.restoreFocus,t=null;if(typeof e=="string"?t=this._document.querySelector(e):typeof e=="boolean"?t=e?this._elementFocusedBeforeDialogWasOpened:null:e&&(t=e),this._config.restoreFocus&&t&&typeof t.focus=="function"){let n=Dn(),a=this._elementRef.nativeElement;(!n||n===this._document.body||n===a||a.contains(n))&&(this._focusMonitor?(this._focusMonitor.focusVia(t,this._closeInteractionType),this._closeInteractionType=null):t.focus())}this._focusTrap&&this._focusTrap.destroy()}_focusDialogContainer(e){this._elementRef.nativeElement.focus?.(e)}_containsFocus(){let e=this._elementRef.nativeElement,t=Dn();return e===t||e.contains(t)}_initializeFocusTrap(){this._platform.isBrowser&&(this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=Dn()))}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=R({type:i,selectors:[["cdk-dialog-container"]],viewQuery:function(t,n){if(t&1&&Re(Xi,7),t&2){let a;N(a=L())&&(n._portalOutlet=a.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(t,n){t&2&&J("id",n._config.id||null)("role",n._config.role)("aria-modal",n._config.ariaModal)("aria-labelledby",n._config.ariaLabel?null:n._ariaLabelledByQueue[0])("aria-label",n._config.ariaLabel)("aria-describedby",n._config.ariaDescribedBy||null)},features:[ie],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(t,n){t&1&&We(0,d0,0,0,"ng-template",0)},dependencies:[Xi],styles:[`.cdk-dialog-container {
3158
+ `],encapsulation:2})}return i})(),Ps=(()=>{class i{_platform=m(fe);_containerElement;_document=m(K);_styleLoader=m(Be);ngOnDestroy(){this._containerElement?.remove()}getContainerElement(){return this._loadStyles(),this._containerElement||this._createContainer(),this._containerElement}_createContainer(){let e="cdk-overlay-container";if(this._platform.isBrowser||ql()){let n=this._document.querySelectorAll(`.${e}[platform="server"], .${e}[platform="test"]`);for(let a=0;a<n.length;a++)n[a].remove()}let t=this._document.createElement("div");t.classList.add(e),ql()?t.setAttribute("platform","test"):this._platform.isBrowser||t.setAttribute("platform","server"),this._document.body.appendChild(t),this._containerElement=t}_loadStyles(){this._styleLoader.load(ap)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})(),Nc=class{_renderer;_ngZone;element;_cleanupClick;_cleanupTransitionEnd;_fallbackTimeout;constructor(o,e,t,n){this._renderer=e,this._ngZone=t,this.element=o.createElement("div"),this.element.classList.add("cdk-overlay-backdrop"),this._cleanupClick=e.listen(this.element,"click",n)}detach(){this._ngZone.runOutsideAngular(()=>{let o=this.element;clearTimeout(this._fallbackTimeout),this._cleanupTransitionEnd?.(),this._cleanupTransitionEnd=this._renderer.listen(o,"transitionend",this.dispose),this._fallbackTimeout=setTimeout(this.dispose,500),o.style.pointerEvents="none",o.classList.remove("cdk-overlay-backdrop-showing")})}dispose=()=>{clearTimeout(this._fallbackTimeout),this._cleanupClick?.(),this._cleanupTransitionEnd?.(),this._cleanupClick=this._cleanupTransitionEnd=this._fallbackTimeout=void 0,this.element.remove()}};function Lc(i){return i&&i.nodeType===1}var qo=class{_portalOutlet;_host;_pane;_config;_ngZone;_keyboardDispatcher;_document;_location;_outsideClickDispatcher;_animationsDisabled;_injector;_renderer;_backdropClick=new O;_attachments=new O;_detachments=new O;_positionStrategy;_scrollStrategy;_locationChanges=Te.EMPTY;_backdropRef=null;_detachContentMutationObserver;_detachContentAfterRenderRef;_disposed=!1;_previousHostParent;_keydownEvents=new O;_outsidePointerEvents=new O;_afterNextRenderRef;constructor(o,e,t,n,a,r,u,h,f,b=!1,M,j){this._portalOutlet=o,this._host=e,this._pane=t,this._config=n,this._ngZone=a,this._keyboardDispatcher=r,this._document=u,this._location=h,this._outsideClickDispatcher=f,this._animationsDisabled=b,this._injector=M,this._renderer=j,n.scrollStrategy&&(this._scrollStrategy=n.scrollStrategy,this._scrollStrategy.attach(this)),this._positionStrategy=n.positionStrategy}get overlayElement(){return this._pane}get backdropElement(){return this._backdropRef?.element||null}get hostElement(){return this._host}get eventPredicate(){return this._config?.eventPredicate||null}attach(o){if(this._disposed)return null;this._attachHost();let e=this._portalOutlet.attach(o);return this._positionStrategy?.attach(this),this._updateStackingOrder(),this._updateElementSize(),this._updateElementDirection(),this._scrollStrategy&&this._scrollStrategy.enable(),this._afterNextRenderRef?.destroy(),this._afterNextRenderRef=Ge(()=>{this.hasAttached()&&this.updatePosition()},{injector:this._injector}),this._togglePointerEvents(!0),this._config.hasBackdrop&&this._attachBackdrop(),this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!0),this._attachments.next(),this._completeDetachContent(),this._keyboardDispatcher.add(this),this._config.disposeOnNavigation&&(this._locationChanges=this._location.subscribe(()=>this.dispose())),this._outsideClickDispatcher.add(this),typeof e?.onDestroy=="function"&&e.onDestroy(()=>{this.hasAttached()&&this._ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>this.detach()))}),e}detach(){if(!this.hasAttached())return;this.detachBackdrop(),this._togglePointerEvents(!1),this._positionStrategy&&this._positionStrategy.detach&&this._positionStrategy.detach(),this._scrollStrategy&&this._scrollStrategy.disable();let o=this._portalOutlet.detach();return this._detachments.next(),this._completeDetachContent(),this._keyboardDispatcher.remove(this),this._detachContentWhenEmpty(),this._locationChanges.unsubscribe(),this._outsideClickDispatcher.remove(this),o}dispose(){if(this._disposed)return;let o=this.hasAttached();this._positionStrategy&&this._positionStrategy.dispose(),this._disposeScrollStrategy(),this._backdropRef?.dispose(),this._locationChanges.unsubscribe(),this._keyboardDispatcher.remove(this),this._portalOutlet.dispose(),this._attachments.complete(),this._backdropClick.complete(),this._keydownEvents.complete(),this._outsidePointerEvents.complete(),this._outsideClickDispatcher.remove(this),this._host?.remove(),this._afterNextRenderRef?.destroy(),this._previousHostParent=this._pane=this._host=this._backdropRef=null,o&&this._detachments.next(),this._detachments.complete(),this._completeDetachContent(),this._disposed=!0}hasAttached(){return this._portalOutlet.hasAttached()}backdropClick(){return this._backdropClick}attachments(){return this._attachments}detachments(){return this._detachments}keydownEvents(){return this._keydownEvents}outsidePointerEvents(){return this._outsidePointerEvents}getConfig(){return this._config}updatePosition(){this._positionStrategy&&this._positionStrategy.apply()}updatePositionStrategy(o){o!==this._positionStrategy&&(this._positionStrategy&&this._positionStrategy.dispose(),this._positionStrategy=o,this.hasAttached()&&(o.attach(this),this.updatePosition()))}updateSize(o){this._config=V(V({},this._config),o),this._updateElementSize()}setDirection(o){this._config=Fe(V({},this._config),{direction:o}),this._updateElementDirection()}addPanelClass(o){this._pane&&this._toggleClasses(this._pane,o,!0)}removePanelClass(o){this._pane&&this._toggleClasses(this._pane,o,!1)}getDirection(){let o=this._config.direction;return o?typeof o=="string"?o:o.value:"ltr"}updateScrollStrategy(o){o!==this._scrollStrategy&&(this._disposeScrollStrategy(),this._scrollStrategy=o,this.hasAttached()&&(o.attach(this),o.enable()))}_updateElementDirection(){this._host.setAttribute("dir",this.getDirection())}_updateElementSize(){if(!this._pane)return;let o=this._pane.style;o.width=nt(this._config.width),o.height=nt(this._config.height),o.minWidth=nt(this._config.minWidth),o.minHeight=nt(this._config.minHeight),o.maxWidth=nt(this._config.maxWidth),o.maxHeight=nt(this._config.maxHeight)}_togglePointerEvents(o){this._pane.style.pointerEvents=o?"":"none"}_attachHost(){if(!this._host.parentElement){let o=this._config.usePopover?this._positionStrategy?.getPopoverInsertionPoint?.():null;Lc(o)?o.after(this._host):o?.type==="parent"?o.element.appendChild(this._host):this._previousHostParent?.appendChild(this._host)}if(this._config.usePopover)try{this._host.showPopover()}catch(o){}}_attachBackdrop(){let o="cdk-overlay-backdrop-showing";this._backdropRef?.dispose(),this._backdropRef=new Nc(this._document,this._renderer,this._ngZone,e=>{this._backdropClick.next(e)}),this._animationsDisabled&&this._backdropRef.element.classList.add("cdk-overlay-backdrop-noop-animation"),this._config.backdropClass&&this._toggleClasses(this._backdropRef.element,this._config.backdropClass,!0),this._config.usePopover?this._host.prepend(this._backdropRef.element):this._host.parentElement.insertBefore(this._backdropRef.element,this._host),!this._animationsDisabled&&typeof requestAnimationFrame<"u"?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>this._backdropRef?.element.classList.add(o))}):this._backdropRef.element.classList.add(o)}_updateStackingOrder(){!this._config.usePopover&&this._host.nextSibling&&this._host.parentNode.appendChild(this._host)}detachBackdrop(){this._animationsDisabled?(this._backdropRef?.dispose(),this._backdropRef=null):this._backdropRef?.detach()}_toggleClasses(o,e,t){let n=sn(e||[]).filter(a=>!!a);n.length&&(t?o.classList.add(...n):o.classList.remove(...n))}_detachContentWhenEmpty(){let o=!1;try{this._detachContentAfterRenderRef=Ge(()=>{o=!0,this._detachContent()},{injector:this._injector})}catch(e){if(o)throw e;this._detachContent()}globalThis.MutationObserver&&this._pane&&(this._detachContentMutationObserver||=new globalThis.MutationObserver(()=>{this._detachContent()}),this._detachContentMutationObserver.observe(this._pane,{childList:!0}))}_detachContent(){(!this._pane||!this._host||this._pane.children.length===0)&&(this._pane&&this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!1),this._host&&this._host.parentElement&&(this._previousHostParent=this._host.parentElement,this._host.remove()),this._completeDetachContent())}_completeDetachContent(){this._detachContentAfterRenderRef?.destroy(),this._detachContentAfterRenderRef=void 0,this._detachContentMutationObserver?.disconnect()}_disposeScrollStrategy(){let o=this._scrollStrategy;o?.disable(),o?.detach?.()}},Yh="cdk-overlay-connected-position-bounding-box",s0=/([A-Za-z%]+)$/;function hn(i,o){return new Is(o,i.get(ni),i.get(K),i.get(fe),i.get(Ps))}var Is=class{_viewportRuler;_document;_platform;_overlayContainer;_overlayRef;_isInitialRender=!1;_lastBoundingBoxSize={width:0,height:0};_isPushed=!1;_canPush=!0;_growAfterOpen=!1;_hasFlexibleDimensions=!0;_positionLocked=!1;_originRect;_overlayRect;_viewportRect;_containerRect;_viewportMargin=0;_scrollables=[];_preferredPositions=[];_origin;_pane;_isDisposed=!1;_boundingBox=null;_lastPosition=null;_lastScrollVisibility=null;_positionChanges=new O;_resizeSubscription=Te.EMPTY;_offsetX=0;_offsetY=0;_transformOriginSelector;_appliedPanelClasses=[];_previousPushAmount=null;_popoverLocation="global";positionChanges=this._positionChanges;get positions(){return this._preferredPositions}constructor(o,e,t,n,a){this._viewportRuler=e,this._document=t,this._platform=n,this._overlayContainer=a,this.setOrigin(o)}attach(o){this._overlayRef&&this._overlayRef,this._validatePositions(),o.hostElement.classList.add(Yh),this._overlayRef=o,this._boundingBox=o.hostElement,this._pane=o.overlayElement,this._isDisposed=!1,this._isInitialRender=!0,this._lastPosition=null,this._resizeSubscription.unsubscribe(),this._resizeSubscription=this._viewportRuler.change().subscribe(()=>{this._isInitialRender=!0,this.apply()})}apply(){if(this._isDisposed||!this._platform.isBrowser)return;if(!this._isInitialRender&&this._positionLocked&&this._lastPosition){this.reapplyLastPosition();return}this._clearPanelClasses(),this._resetOverlayElementStyles(),this._resetBoundingBoxStyles(),this._viewportRect=this._getNarrowedViewportRect(),this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._containerRect=this._getContainerRect();let o=this._originRect,e=this._overlayRect,t=this._viewportRect,n=this._containerRect,a=[],r;for(let u of this._preferredPositions){let h=this._getOriginPoint(o,n,u),f=this._getOverlayPoint(h,e,u),b=this._getOverlayFit(f,e,t,u);if(b.isCompletelyWithinViewport){this._isPushed=!1,this._applyPosition(u,h);return}if(this._canFitWithFlexibleDimensions(b,f,t)){a.push({position:u,origin:h,overlayRect:e,boundingBoxRect:this._calculateBoundingBoxRect(h,u)});continue}(!r||r.overlayFit.visibleArea<b.visibleArea)&&(r={overlayFit:b,overlayPoint:f,originPoint:h,position:u,overlayRect:e})}if(a.length){let u=null,h=-1;for(let f of a){let b=f.boundingBoxRect.width*f.boundingBoxRect.height*(f.position.weight||1);b>h&&(h=b,u=f)}this._isPushed=!1,this._applyPosition(u.position,u.origin);return}if(this._canPush){this._isPushed=!0,this._applyPosition(r.position,r.originPoint);return}this._applyPosition(r.position,r.originPoint)}detach(){this._clearPanelClasses(),this._lastPosition=null,this._previousPushAmount=null,this._resizeSubscription.unsubscribe()}dispose(){this._isDisposed||(this._boundingBox&&co(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(Yh),this.detach(),this._positionChanges.complete(),this._overlayRef=this._boundingBox=null,this._isDisposed=!0)}reapplyLastPosition(){if(this._isDisposed||!this._platform.isBrowser)return;let o=this._lastPosition;o?(this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._viewportRect=this._getNarrowedViewportRect(),this._containerRect=this._getContainerRect(),this._applyPosition(o,this._getOriginPoint(this._originRect,this._containerRect,o))):this.apply()}withScrollableContainers(o){return this._scrollables=o,this}withPositions(o){return this._preferredPositions=o,o.indexOf(this._lastPosition)===-1&&(this._lastPosition=null),this._validatePositions(),this}withViewportMargin(o){return this._viewportMargin=o,this}withFlexibleDimensions(o=!0){return this._hasFlexibleDimensions=o,this}withGrowAfterOpen(o=!0){return this._growAfterOpen=o,this}withPush(o=!0){return this._canPush=o,this}withLockedPosition(o=!0){return this._positionLocked=o,this}setOrigin(o){return this._origin=o,this}withDefaultOffsetX(o){return this._offsetX=o,this}withDefaultOffsetY(o){return this._offsetY=o,this}withTransformOriginOn(o){return this._transformOriginSelector=o,this}withPopoverLocation(o){return this._popoverLocation=o,this}getPopoverInsertionPoint(){return this._popoverLocation==="global"?null:this._popoverLocation!=="inline"?this._popoverLocation:this._origin instanceof B?this._origin.nativeElement:Lc(this._origin)?this._origin:null}_getOriginPoint(o,e,t){let n;if(t.originX=="center")n=o.left+o.width/2;else{let r=this._isRtl()?o.right:o.left,u=this._isRtl()?o.left:o.right;n=t.originX=="start"?r:u}e.left<0&&(n-=e.left);let a;return t.originY=="center"?a=o.top+o.height/2:a=t.originY=="top"?o.top:o.bottom,e.top<0&&(a-=e.top),{x:n,y:a}}_getOverlayPoint(o,e,t){let n;t.overlayX=="center"?n=-e.width/2:t.overlayX==="start"?n=this._isRtl()?-e.width:0:n=this._isRtl()?0:-e.width;let a;return t.overlayY=="center"?a=-e.height/2:a=t.overlayY=="top"?0:-e.height,{x:o.x+n,y:o.y+a}}_getOverlayFit(o,e,t,n){let a=Qh(e),{x:r,y:u}=o,h=this._getOffset(n,"x"),f=this._getOffset(n,"y");h&&(r+=h),f&&(u+=f);let b=0-r,M=r+a.width-t.width,j=0-u,G=u+a.height-t.height,de=this._subtractOverflows(a.width,b,M),Ce=this._subtractOverflows(a.height,j,G),pe=de*Ce;return{visibleArea:pe,isCompletelyWithinViewport:a.width*a.height===pe,fitsInViewportVertically:Ce===a.height,fitsInViewportHorizontally:de==a.width}}_canFitWithFlexibleDimensions(o,e,t){if(this._hasFlexibleDimensions){let n=t.bottom-e.y,a=t.right-e.x,r=Zh(this._overlayRef.getConfig().minHeight),u=Zh(this._overlayRef.getConfig().minWidth),h=o.fitsInViewportVertically||r!=null&&r<=n,f=o.fitsInViewportHorizontally||u!=null&&u<=a;return h&&f}return!1}_pushOverlayOnScreen(o,e,t){if(this._previousPushAmount&&this._positionLocked)return{x:o.x+this._previousPushAmount.x,y:o.y+this._previousPushAmount.y};let n=Qh(e),a=this._viewportRect,r=Math.max(o.x+n.width-a.width,0),u=Math.max(o.y+n.height-a.height,0),h=Math.max(a.top-t.top-o.y,0),f=Math.max(a.left-t.left-o.x,0),b=0,M=0;return n.width<=a.width?b=f||-r:b=o.x<this._getViewportMarginStart()?a.left-t.left-o.x:0,n.height<=a.height?M=h||-u:M=o.y<this._getViewportMarginTop()?a.top-t.top-o.y:0,this._previousPushAmount={x:b,y:M},{x:o.x+b,y:o.y+M}}_applyPosition(o,e){if(this._setTransformOrigin(o),this._setOverlayElementStyles(e,o),this._setBoundingBoxStyles(e,o),o.panelClass&&this._addPanelClasses(o.panelClass),this._positionChanges.observers.length){let t=this._getScrollVisibility();if(o!==this._lastPosition||!this._lastScrollVisibility||!l0(this._lastScrollVisibility,t)){let n=new As(o,t);this._positionChanges.next(n)}this._lastScrollVisibility=t}this._lastPosition=o,this._isInitialRender=!1}_setTransformOrigin(o){if(!this._transformOriginSelector)return;let e=this._boundingBox.querySelectorAll(this._transformOriginSelector),t,n=o.overlayY;o.overlayX==="center"?t="center":this._isRtl()?t=o.overlayX==="start"?"right":"left":t=o.overlayX==="start"?"left":"right";for(let a=0;a<e.length;a++)e[a].style.transformOrigin=`${t} ${n}`}_calculateBoundingBoxRect(o,e){let t=this._viewportRect,n=this._isRtl(),a,r,u;if(e.overlayY==="top")r=o.y,a=t.height-r+this._getViewportMarginBottom();else if(e.overlayY==="bottom")u=t.height-o.y+this._getViewportMarginTop()+this._getViewportMarginBottom(),a=t.height-u+this._getViewportMarginTop();else{let G=Math.min(t.bottom-o.y+t.top,o.y),de=this._lastBoundingBoxSize.height;a=G*2,r=o.y-G,a>de&&!this._isInitialRender&&!this._growAfterOpen&&(r=o.y-de/2)}let h=e.overlayX==="start"&&!n||e.overlayX==="end"&&n,f=e.overlayX==="end"&&!n||e.overlayX==="start"&&n,b,M,j;if(f)j=t.width-o.x+this._getViewportMarginStart()+this._getViewportMarginEnd(),b=o.x-this._getViewportMarginStart();else if(h)M=o.x,b=t.right-o.x-this._getViewportMarginEnd();else{let G=Math.min(t.right-o.x+t.left,o.x),de=this._lastBoundingBoxSize.width;b=G*2,M=o.x-G,b>de&&!this._isInitialRender&&!this._growAfterOpen&&(M=o.x-de/2)}return{top:r,left:M,bottom:u,right:j,width:b,height:a}}_setBoundingBoxStyles(o,e){let t=this._calculateBoundingBoxRect(o,e);!this._isInitialRender&&!this._growAfterOpen&&(t.height=Math.min(t.height,this._lastBoundingBoxSize.height),t.width=Math.min(t.width,this._lastBoundingBoxSize.width));let n={};if(this._hasExactPosition())n.top=n.left="0",n.bottom=n.right="auto",n.maxHeight=n.maxWidth="",n.width=n.height="100%";else{let a=this._overlayRef.getConfig().maxHeight,r=this._overlayRef.getConfig().maxWidth;n.width=nt(t.width),n.height=nt(t.height),n.top=nt(t.top)||"auto",n.bottom=nt(t.bottom)||"auto",n.left=nt(t.left)||"auto",n.right=nt(t.right)||"auto",e.overlayX==="center"?n.alignItems="center":n.alignItems=e.overlayX==="end"?"flex-end":"flex-start",e.overlayY==="center"?n.justifyContent="center":n.justifyContent=e.overlayY==="bottom"?"flex-end":"flex-start",a&&(n.maxHeight=nt(a)),r&&(n.maxWidth=nt(r))}this._lastBoundingBoxSize=t,co(this._boundingBox.style,n)}_resetBoundingBoxStyles(){co(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){co(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})}_setOverlayElementStyles(o,e){let t={},n=this._hasExactPosition(),a=this._hasFlexibleDimensions,r=this._overlayRef.getConfig();if(n){let b=this._viewportRuler.getViewportScrollPosition();co(t,this._getExactOverlayY(e,o,b)),co(t,this._getExactOverlayX(e,o,b))}else t.position="static";let u="",h=this._getOffset(e,"x"),f=this._getOffset(e,"y");h&&(u+=`translateX(${h}px) `),f&&(u+=`translateY(${f}px)`),t.transform=u.trim(),r.maxHeight&&(n?t.maxHeight=nt(r.maxHeight):a&&(t.maxHeight="")),r.maxWidth&&(n?t.maxWidth=nt(r.maxWidth):a&&(t.maxWidth="")),co(this._pane.style,t)}_getExactOverlayY(o,e,t){let n={top:"",bottom:""},a=this._getOverlayPoint(e,this._overlayRect,o);if(this._isPushed&&(a=this._pushOverlayOnScreen(a,this._overlayRect,t)),o.overlayY==="bottom"){let r=this._document.documentElement.clientHeight;n.bottom=`${r-(a.y+this._overlayRect.height)}px`}else n.top=nt(a.y);return n}_getExactOverlayX(o,e,t){let n={left:"",right:""},a=this._getOverlayPoint(e,this._overlayRect,o);this._isPushed&&(a=this._pushOverlayOnScreen(a,this._overlayRect,t));let r;if(this._isRtl()?r=o.overlayX==="end"?"left":"right":r=o.overlayX==="end"?"right":"left",r==="right"){let u=this._document.documentElement.clientWidth;n.right=`${u-(a.x+this._overlayRect.width)}px`}else n.left=nt(a.x);return n}_getScrollVisibility(){let o=this._getOriginRect(),e=this._pane.getBoundingClientRect(),t=this._scrollables.map(n=>n.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:Kh(o,t),isOriginOutsideView:Fc(o,t),isOverlayClipped:Kh(e,t),isOverlayOutsideView:Fc(e,t)}}_subtractOverflows(o,...e){return e.reduce((t,n)=>t-Math.max(n,0),o)}_getNarrowedViewportRect(){let o=this._document.documentElement.clientWidth,e=this._document.documentElement.clientHeight,t=this._viewportRuler.getViewportScrollPosition();return{top:t.top+this._getViewportMarginTop(),left:t.left+this._getViewportMarginStart(),right:t.left+o-this._getViewportMarginEnd(),bottom:t.top+e-this._getViewportMarginBottom(),width:o-this._getViewportMarginStart()-this._getViewportMarginEnd(),height:e-this._getViewportMarginTop()-this._getViewportMarginBottom()}}_isRtl(){return this._overlayRef.getDirection()==="rtl"}_hasExactPosition(){return!this._hasFlexibleDimensions||this._isPushed}_getOffset(o,e){return e==="x"?o.offsetX==null?this._offsetX:o.offsetX:o.offsetY==null?this._offsetY:o.offsetY}_validatePositions(){}_addPanelClasses(o){this._pane&&sn(o).forEach(e=>{e!==""&&this._appliedPanelClasses.indexOf(e)===-1&&(this._appliedPanelClasses.push(e),this._pane.classList.add(e))})}_clearPanelClasses(){this._pane&&(this._appliedPanelClasses.forEach(o=>{this._pane.classList.remove(o)}),this._appliedPanelClasses=[])}_getViewportMarginStart(){return typeof this._viewportMargin=="number"?this._viewportMargin:this._viewportMargin?.start??0}_getViewportMarginEnd(){return typeof this._viewportMargin=="number"?this._viewportMargin:this._viewportMargin?.end??0}_getViewportMarginTop(){return typeof this._viewportMargin=="number"?this._viewportMargin:this._viewportMargin?.top??0}_getViewportMarginBottom(){return typeof this._viewportMargin=="number"?this._viewportMargin:this._viewportMargin?.bottom??0}_getOriginRect(){let o=this._origin;if(o instanceof B)return o.nativeElement.getBoundingClientRect();if(o instanceof Element)return o.getBoundingClientRect();let e=o.width||0,t=o.height||0;return{top:o.y,bottom:o.y+t,left:o.x,right:o.x+e,height:t,width:e}}_getContainerRect(){let o=this._overlayRef.getConfig().usePopover&&this._popoverLocation!=="global",e=this._overlayContainer.getContainerElement();o&&(e.style.display="block");let t=e.getBoundingClientRect();return o&&(e.style.display=""),t}};function co(i,o){for(let e in o)o.hasOwnProperty(e)&&(i[e]=o[e]);return i}function Zh(i){if(typeof i!="number"&&i!=null){let[o,e]=i.split(s0);return!e||e==="px"?parseFloat(o):null}return i||null}function Qh(i){return{top:Math.floor(i.top),right:Math.floor(i.right),bottom:Math.floor(i.bottom),left:Math.floor(i.left),width:Math.floor(i.width),height:Math.floor(i.height)}}function l0(i,o){return i===o?!0:i.isOriginClipped===o.isOriginClipped&&i.isOriginOutsideView===o.isOriginOutsideView&&i.isOverlayClipped===o.isOverlayClipped&&i.isOverlayOutsideView===o.isOverlayOutsideView}var Jh="cdk-global-overlay-wrapper";function On(i){return new Rs}var Rs=class{_overlayRef;_cssPosition="static";_topOffset="";_bottomOffset="";_alignItems="";_xPosition="";_xOffset="";_width="";_height="";_isDisposed=!1;attach(o){let e=o.getConfig();this._overlayRef=o,this._width&&!e.width&&o.updateSize({width:this._width}),this._height&&!e.height&&o.updateSize({height:this._height}),o.hostElement.classList.add(Jh),this._isDisposed=!1}top(o=""){return this._bottomOffset="",this._topOffset=o,this._alignItems="flex-start",this}left(o=""){return this._xOffset=o,this._xPosition="left",this}bottom(o=""){return this._topOffset="",this._bottomOffset=o,this._alignItems="flex-end",this}right(o=""){return this._xOffset=o,this._xPosition="right",this}start(o=""){return this._xOffset=o,this._xPosition="start",this}end(o=""){return this._xOffset=o,this._xPosition="end",this}width(o=""){return this._overlayRef?this._overlayRef.updateSize({width:o}):this._width=o,this}height(o=""){return this._overlayRef?this._overlayRef.updateSize({height:o}):this._height=o,this}centerHorizontally(o=""){return this.left(o),this._xPosition="center",this}centerVertically(o=""){return this.top(o),this._alignItems="center",this}apply(){if(!this._overlayRef||!this._overlayRef.hasAttached())return;let o=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement.style,t=this._overlayRef.getConfig(),{width:n,height:a,maxWidth:r,maxHeight:u}=t,h=(n==="100%"||n==="100vw")&&(!r||r==="100%"||r==="100vw"),f=(a==="100%"||a==="100vh")&&(!u||u==="100%"||u==="100vh"),b=this._xPosition,M=this._xOffset,j=this._overlayRef.getConfig().direction==="rtl",G="",de="",Ce="";h?Ce="flex-start":b==="center"?(Ce="center",j?de=M:G=M):j?b==="left"||b==="end"?(Ce="flex-end",G=M):(b==="right"||b==="start")&&(Ce="flex-start",de=M):b==="left"||b==="start"?(Ce="flex-start",G=M):(b==="right"||b==="end")&&(Ce="flex-end",de=M),o.position=this._cssPosition,o.marginLeft=h?"0":G,o.marginTop=f?"0":this._topOffset,o.marginBottom=this._bottomOffset,o.marginRight=h?"0":de,e.justifyContent=Ce,e.alignItems=f?"flex-start":this._alignItems}dispose(){if(this._isDisposed||!this._overlayRef)return;let o=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement,t=e.style;e.classList.remove(Jh),t.justifyContent=t.alignItems=o.marginTop=o.marginBottom=o.marginLeft=o.marginRight=o.position="",this._overlayRef=null,this._isDisposed=!0}},rp=(()=>{class i{_injector=m(Z);global(){return On()}flexibleConnectedTo(e){return hn(this._injector,e)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})(),tr=new k("OVERLAY_DEFAULT_CONFIG");function ri(i,o){i.get(Be).load(ap);let e=i.get(Ps),t=i.get(K),n=i.get(De),a=i.get(bn),r=i.get(Ze),u=i.get(we,null,{optional:!0})||i.get(ct).createRenderer(null,null),h=new ai(o),f=i.get(tr,null,{optional:!0})?.usePopover??!0;h.direction=h.direction||r.value,"showPopover"in t.body?h.usePopover=o?.usePopover??f:h.usePopover=!1;let b=t.createElement("div"),M=t.createElement("div");b.id=n.getId("cdk-overlay-"),b.classList.add("cdk-overlay-pane"),M.appendChild(b),h.usePopover&&(M.setAttribute("popover","manual"),M.classList.add("cdk-overlay-popover"));let j=h.usePopover?h.positionStrategy?.getPopoverInsertionPoint?.():null;return Lc(j)?j.after(M):j?.type==="parent"?j.element.appendChild(M):e.getContainerElement().appendChild(M),new qo(new Ja(b,a,i),M,b,h,i.get($),i.get(np),t,i.get(Mr),i.get(op),o?.disableAnimations??i.get(nn,null,{optional:!0})==="NoopAnimations",i.get(Di),u)}var sp=(()=>{class i{scrollStrategies=m(tp);_positionBuilder=m(rp);_injector=m(Z);create(e){return ri(this._injector,e)}position(){return this._positionBuilder}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})(),c0=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],d0=new k("cdk-connected-overlay-scroll-strategy",{providedIn:"root",factory:()=>{let i=m(Z);return()=>Fi(i)}}),Ko=(()=>{class i{elementRef=m(B);static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,selectors:[["","cdk-overlay-origin",""],["","overlay-origin",""],["","cdkOverlayOrigin",""]],exportAs:["cdkOverlayOrigin"]})}return i})(),lp=new k("cdk-connected-overlay-default-config"),Os=(()=>{class i{_dir=m(Ze,{optional:!0});_injector=m(Z);_overlayRef;_templatePortal;_backdropSubscription=Te.EMPTY;_attachSubscription=Te.EMPTY;_detachSubscription=Te.EMPTY;_positionSubscription=Te.EMPTY;_offsetX;_offsetY;_position;_scrollStrategyFactory=m(d0);_ngZone=m($);origin;positions;positionStrategy;get offsetX(){return this._offsetX}set offsetX(e){this._offsetX=e,this._position&&this._updatePositionStrategy(this._position)}get offsetY(){return this._offsetY}set offsetY(e){this._offsetY=e,this._position&&this._updatePositionStrategy(this._position)}width;height;minWidth;minHeight;backdropClass;panelClass;viewportMargin=0;scrollStrategy;open=!1;disableClose=!1;transformOriginSelector;hasBackdrop=!1;lockPosition=!1;flexibleDimensions=!1;growAfterOpen=!1;push=!1;disposeOnNavigation=!1;usePopover;matchWidth=!1;set _config(e){typeof e!="string"&&this._assignConfig(e)}backdropClick=new X;positionChange=new X;attach=new X;detach=new X;overlayKeydown=new X;overlayOutsideClick=new X;constructor(){let e=m(tt),t=m(it),n=m(lp,{optional:!0}),a=m(tr,{optional:!0});this.usePopover=a?.usePopover===!1?null:"global",this._templatePortal=new Wt(e,t),this.scrollStrategy=this._scrollStrategyFactory(),n&&this._assignConfig(n)}get overlayRef(){return this._overlayRef}get dir(){return this._dir?this._dir.value:"ltr"}ngOnDestroy(){this._attachSubscription.unsubscribe(),this._detachSubscription.unsubscribe(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this._overlayRef?.dispose()}ngOnChanges(e){this._position&&(this._updatePositionStrategy(this._position),this._overlayRef?.updateSize({width:this._getWidth(),minWidth:this.minWidth,height:this.height,minHeight:this.minHeight}),e.origin&&this.open&&this._position.apply()),e.open&&(this.open?this.attachOverlay():this.detachOverlay())}_createOverlay(){(!this.positions||!this.positions.length)&&(this.positions=c0);let e=this._overlayRef=ri(this._injector,this._buildConfig());this._attachSubscription=e.attachments().subscribe(()=>this.attach.emit()),this._detachSubscription=e.detachments().subscribe(()=>this.detach.emit()),e.keydownEvents().subscribe(t=>{this.overlayKeydown.next(t),t.keyCode===27&&!this.disableClose&&!Ke(t)&&(t.preventDefault(),this.detachOverlay())}),this._overlayRef.outsidePointerEvents().subscribe(t=>{let n=this._getOriginElement(),a=mt(t);(!n||n!==a&&!n.contains(a))&&this.overlayOutsideClick.next(t)})}_buildConfig(){let e=this._position=this.positionStrategy||this._createPositionStrategy(),t=new ai({direction:this._dir||"ltr",positionStrategy:e,scrollStrategy:this.scrollStrategy,hasBackdrop:this.hasBackdrop,disposeOnNavigation:this.disposeOnNavigation,usePopover:!!this.usePopover});return(this.height||this.height===0)&&(t.height=this.height),(this.minWidth||this.minWidth===0)&&(t.minWidth=this.minWidth),(this.minHeight||this.minHeight===0)&&(t.minHeight=this.minHeight),this.backdropClass&&(t.backdropClass=this.backdropClass),this.panelClass&&(t.panelClass=this.panelClass),t}_updatePositionStrategy(e){let t=this.positions.map(n=>({originX:n.originX,originY:n.originY,overlayX:n.overlayX,overlayY:n.overlayY,offsetX:n.offsetX||this.offsetX,offsetY:n.offsetY||this.offsetY,panelClass:n.panelClass||void 0}));return e.setOrigin(this._getOrigin()).withPositions(t).withFlexibleDimensions(this.flexibleDimensions).withPush(this.push).withGrowAfterOpen(this.growAfterOpen).withViewportMargin(this.viewportMargin).withLockedPosition(this.lockPosition).withTransformOriginOn(this.transformOriginSelector).withPopoverLocation(this.usePopover===null?"global":this.usePopover)}_createPositionStrategy(){let e=hn(this._injector,this._getOrigin());return this._updatePositionStrategy(e),e}_getOrigin(){return this.origin instanceof Ko?this.origin.elementRef:this.origin}_getOriginElement(){return this.origin instanceof Ko?this.origin.elementRef.nativeElement:this.origin instanceof B?this.origin.nativeElement:typeof Element<"u"&&this.origin instanceof Element?this.origin:null}_getWidth(){return this.width?this.width:this.matchWidth?this._getOriginElement()?.getBoundingClientRect?.().width:void 0}attachOverlay(){this._overlayRef||this._createOverlay();let e=this._overlayRef;e.getConfig().hasBackdrop=this.hasBackdrop,e.updateSize({width:this._getWidth()}),e.hasAttached()||e.attach(this._templatePortal),this.hasBackdrop?this._backdropSubscription=e.backdropClick().subscribe(t=>this.backdropClick.emit(t)):this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this.positionChange.observers.length>0&&(this._positionSubscription=this._position.positionChanges.pipe(cd(()=>this.positionChange.observers.length>0)).subscribe(t=>{this._ngZone.run(()=>this.positionChange.emit(t)),this.positionChange.observers.length===0&&this._positionSubscription.unsubscribe()})),this.open=!0}detachOverlay(){this._overlayRef?.detach(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this.open=!1}_assignConfig(e){this.origin=e.origin??this.origin,this.positions=e.positions??this.positions,this.positionStrategy=e.positionStrategy??this.positionStrategy,this.offsetX=e.offsetX??this.offsetX,this.offsetY=e.offsetY??this.offsetY,this.width=e.width??this.width,this.height=e.height??this.height,this.minWidth=e.minWidth??this.minWidth,this.minHeight=e.minHeight??this.minHeight,this.backdropClass=e.backdropClass??this.backdropClass,this.panelClass=e.panelClass??this.panelClass,this.viewportMargin=e.viewportMargin??this.viewportMargin,this.scrollStrategy=e.scrollStrategy??this.scrollStrategy,this.disableClose=e.disableClose??this.disableClose,this.transformOriginSelector=e.transformOriginSelector??this.transformOriginSelector,this.hasBackdrop=e.hasBackdrop??this.hasBackdrop,this.lockPosition=e.lockPosition??this.lockPosition,this.flexibleDimensions=e.flexibleDimensions??this.flexibleDimensions,this.growAfterOpen=e.growAfterOpen??this.growAfterOpen,this.push=e.push??this.push,this.disposeOnNavigation=e.disposeOnNavigation??this.disposeOnNavigation,this.usePopover=e.usePopover??this.usePopover,this.matchWidth=e.matchWidth??this.matchWidth}static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,selectors:[["","cdk-connected-overlay",""],["","connected-overlay",""],["","cdkConnectedOverlay",""]],inputs:{origin:[0,"cdkConnectedOverlayOrigin","origin"],positions:[0,"cdkConnectedOverlayPositions","positions"],positionStrategy:[0,"cdkConnectedOverlayPositionStrategy","positionStrategy"],offsetX:[0,"cdkConnectedOverlayOffsetX","offsetX"],offsetY:[0,"cdkConnectedOverlayOffsetY","offsetY"],width:[0,"cdkConnectedOverlayWidth","width"],height:[0,"cdkConnectedOverlayHeight","height"],minWidth:[0,"cdkConnectedOverlayMinWidth","minWidth"],minHeight:[0,"cdkConnectedOverlayMinHeight","minHeight"],backdropClass:[0,"cdkConnectedOverlayBackdropClass","backdropClass"],panelClass:[0,"cdkConnectedOverlayPanelClass","panelClass"],viewportMargin:[0,"cdkConnectedOverlayViewportMargin","viewportMargin"],scrollStrategy:[0,"cdkConnectedOverlayScrollStrategy","scrollStrategy"],open:[0,"cdkConnectedOverlayOpen","open"],disableClose:[0,"cdkConnectedOverlayDisableClose","disableClose"],transformOriginSelector:[0,"cdkConnectedOverlayTransformOriginOn","transformOriginSelector"],hasBackdrop:[2,"cdkConnectedOverlayHasBackdrop","hasBackdrop",z],lockPosition:[2,"cdkConnectedOverlayLockPosition","lockPosition",z],flexibleDimensions:[2,"cdkConnectedOverlayFlexibleDimensions","flexibleDimensions",z],growAfterOpen:[2,"cdkConnectedOverlayGrowAfterOpen","growAfterOpen",z],push:[2,"cdkConnectedOverlayPush","push",z],disposeOnNavigation:[2,"cdkConnectedOverlayDisposeOnNavigation","disposeOnNavigation",z],usePopover:[0,"cdkConnectedOverlayUsePopover","usePopover"],matchWidth:[2,"cdkConnectedOverlayMatchWidth","matchWidth",z],_config:[0,"cdkConnectedOverlay","_config"]},outputs:{backdropClick:"backdropClick",positionChange:"positionChange",attach:"attach",detach:"detach",overlayKeydown:"overlayKeydown",overlayOutsideClick:"overlayOutsideClick"},exportAs:["cdkConnectedOverlay"],features:[Ie]})}return i})(),Jt=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=U({type:i});static \u0275inj=H({providers:[sp],imports:[ce,Yi,Ga,Ga]})}return i})();function m0(i,o){}var Fn=class{viewContainerRef;injector;id;role="dialog";panelClass="";hasBackdrop=!0;backdropClass="";disableClose=!1;closePredicate;width="";height="";minWidth;minHeight;maxWidth;maxHeight;positionStrategy;data=null;direction;ariaDescribedBy=null;ariaLabelledBy=null;ariaLabel=null;ariaModal=!1;autoFocus="first-tabbable";restoreFocus=!0;scrollStrategy;closeOnNavigation=!0;closeOnDestroy=!0;closeOnOverlayDetachments=!0;disableAnimations=!1;providers;container;templateContext;bindings};var Bc=(()=>{class i extends Pn{_elementRef=m(B);_focusTrapFactory=m(Jl);_config;_interactivityChecker=m(Ql);_ngZone=m($);_focusMonitor=m(Yt);_renderer=m(we);_changeDetectorRef=m(se);_injector=m(Z);_platform=m(fe);_document=m(K);_portalOutlet;_focusTrapped=new O;_focusTrap=null;_elementFocusedBeforeDialogWasOpened=null;_closeInteractionType=null;_ariaLabelledByQueue=[];_isDestroyed=!1;constructor(){super(),this._config=m(Fn,{optional:!0})||new Fn,this._config.ariaLabelledBy&&this._ariaLabelledByQueue.push(this._config.ariaLabelledBy)}_addAriaLabelledBy(e){this._ariaLabelledByQueue.push(e),this._changeDetectorRef.markForCheck()}_removeAriaLabelledBy(e){let t=this._ariaLabelledByQueue.indexOf(e);t>-1&&(this._ariaLabelledByQueue.splice(t,1),this._changeDetectorRef.markForCheck())}_contentAttached(){this._initializeFocusTrap(),this._captureInitialFocus()}_captureInitialFocus(){this._trapFocus()}ngOnDestroy(){this._focusTrapped.complete(),this._isDestroyed=!0,this._restoreFocus()}attachComponentPortal(e){this._portalOutlet.hasAttached();let t=this._portalOutlet.attachComponentPortal(e);return this._contentAttached(),t}attachTemplatePortal(e){this._portalOutlet.hasAttached();let t=this._portalOutlet.attachTemplatePortal(e);return this._contentAttached(),t}attachDomPortal=e=>{this._portalOutlet.hasAttached();let t=this._portalOutlet.attachDomPortal(e);return this._contentAttached(),t};_recaptureFocus(){this._containsFocus()||this._trapFocus()}_forceFocus(e,t){this._interactivityChecker.isFocusable(e)||(e.tabIndex=-1,this._ngZone.runOutsideAngular(()=>{let n=()=>{a(),r(),e.removeAttribute("tabindex")},a=this._renderer.listen(e,"blur",n),r=this._renderer.listen(e,"mousedown",n)})),e.focus(t)}_focusByCssSelector(e,t){let n=this._elementRef.nativeElement.querySelector(e);n&&this._forceFocus(n,t)}_trapFocus(e){this._isDestroyed||Ge(()=>{let t=this._elementRef.nativeElement;switch(this._config.autoFocus){case!1:case"dialog":this._containsFocus()||t.focus(e);break;case!0:case"first-tabbable":this._focusTrap?.focusInitialElement(e)||this._focusDialogContainer(e);break;case"first-heading":this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role="heading"]',e);break;default:this._focusByCssSelector(this._config.autoFocus,e);break}this._focusTrapped.next()},{injector:this._injector})}_restoreFocus(){let e=this._config.restoreFocus,t=null;if(typeof e=="string"?t=this._document.querySelector(e):typeof e=="boolean"?t=e?this._elementFocusedBeforeDialogWasOpened:null:e&&(t=e),this._config.restoreFocus&&t&&typeof t.focus=="function"){let n=Dn(),a=this._elementRef.nativeElement;(!n||n===this._document.body||n===a||a.contains(n))&&(this._focusMonitor?(this._focusMonitor.focusVia(t,this._closeInteractionType),this._closeInteractionType=null):t.focus())}this._focusTrap&&this._focusTrap.destroy()}_focusDialogContainer(e){this._elementRef.nativeElement.focus?.(e)}_containsFocus(){let e=this._elementRef.nativeElement,t=Dn();return e===t||e.contains(t)}_initializeFocusTrap(){this._platform.isBrowser&&(this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=Dn()))}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=R({type:i,selectors:[["cdk-dialog-container"]],viewQuery:function(t,n){if(t&1&&Re(Xi,7),t&2){let a;N(a=L())&&(n._portalOutlet=a.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(t,n){t&2&&J("id",n._config.id||null)("role",n._config.role)("aria-modal",n._config.ariaModal)("aria-labelledby",n._config.ariaLabel?null:n._ariaLabelledByQueue[0])("aria-label",n._config.ariaLabel)("aria-describedby",n._config.ariaDescribedBy||null)},features:[ie],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(t,n){t&1&&We(0,m0,0,0,"ng-template",0)},dependencies:[Xi],styles:[`.cdk-dialog-container {
3159
3159
  display: block;
3160
3160
  width: 100%;
3161
3161
  height: 100%;
3162
3162
  min-height: inherit;
3163
3163
  max-height: inherit;
3164
3164
  }
3165
- `],encapsulation:2,changeDetection:1})}return i})(),ir=class{overlayRef;config;componentInstance=null;componentRef=null;containerInstance;disableClose;closed=new O;backdropClick;keydownEvents;outsidePointerEvents;id;_detachSubscription;constructor(o,e){this.overlayRef=o,this.config=e,this.disableClose=e.disableClose,this.backdropClick=o.backdropClick(),this.keydownEvents=o.keydownEvents(),this.outsidePointerEvents=o.outsidePointerEvents(),this.id=e.id,this.keydownEvents.subscribe(t=>{t.keyCode===27&&!this.disableClose&&!Ke(t)&&(t.preventDefault(),this.close(void 0,{focusOrigin:"keyboard"}))}),this.backdropClick.subscribe(()=>{!this.disableClose&&this._canClose()?this.close(void 0,{focusOrigin:"mouse"}):this.containerInstance._recaptureFocus?.()}),this._detachSubscription=o.detachments().subscribe(()=>{e.closeOnOverlayDetachments!==!1&&this.close()})}close(o,e){if(this._canClose(o)){let t=this.closed;this.containerInstance._closeInteractionType=e?.focusOrigin||"program",this._detachSubscription.unsubscribe(),this.overlayRef.dispose(),t.next(o),t.complete(),this.componentInstance=this.containerInstance=null}}updatePosition(){return this.overlayRef.updatePosition(),this}updateSize(o="",e=""){return this.overlayRef.updateSize({width:o,height:e}),this}addPanelClass(o){return this.overlayRef.addPanelClass(o),this}removePanelClass(o){return this.overlayRef.removePanelClass(o),this}_canClose(o){let e=this.config;return!!this.containerInstance&&(!e.closePredicate||e.closePredicate(o,e,this.componentInstance))}},m0=new k("DialogScrollStrategy",{providedIn:"root",factory:()=>{let i=m(Z);return()=>Xo(i)}}),u0=new k("DialogData"),h0=new k("DefaultDialogConfig");function p0(i){let o=E(i),e=new X;return{valueSignal:o,get value(){return o()},change:e,ngOnDestroy(){e.complete()}}}var zc=(()=>{class i{_injector=m(Z);_defaultOptions=m(h0,{optional:!0});_parentDialog=m(i,{optional:!0,skipSelf:!0});_overlayContainer=m(Ps);_idGenerator=m(De);_openDialogsAtThisLevel=[];_afterAllClosedAtThisLevel=new O;_afterOpenedAtThisLevel=new O;_ariaHiddenElements=new Map;_scrollStrategy=m(m0);get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}afterAllClosed=gn(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Ee(void 0)));open(e,t){let n=this._defaultOptions||new Fn;t=V(V({},n),t),t.id=t.id||this._idGenerator.getId("cdk-dialog-"),t.id&&this.getDialogById(t.id);let a=this._getOverlayConfig(t),r=ri(this._injector,a),u=new ir(r,t),h=this._attachContainer(r,u,t);if(u.containerInstance=h,!this.openDialogs.length){let f=this._overlayContainer.getContainerElement();h._focusTrapped?h._focusTrapped.pipe(pt(1)).subscribe(()=>{this._hideNonDialogContentFromAssistiveTechnology(f)}):this._hideNonDialogContentFromAssistiveTechnology(f)}return this._attachDialogContent(e,u,h,t),this.openDialogs.push(u),u.closed.subscribe(()=>this._removeOpenDialog(u,!0)),this.afterOpened.next(u),u}closeAll(){Vc(this.openDialogs,e=>e.close())}getDialogById(e){return this.openDialogs.find(t=>t.id===e)}ngOnDestroy(){Vc(this._openDialogsAtThisLevel,e=>{e.config.closeOnDestroy===!1&&this._removeOpenDialog(e,!1)}),Vc(this._openDialogsAtThisLevel,e=>e.close()),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete(),this._openDialogsAtThisLevel=[]}_getOverlayConfig(e){let t=new ai({positionStrategy:e.positionStrategy||On().centerHorizontally().centerVertically(),scrollStrategy:e.scrollStrategy||this._scrollStrategy(),panelClass:e.panelClass,hasBackdrop:e.hasBackdrop,direction:e.direction,minWidth:e.minWidth,minHeight:e.minHeight,maxWidth:e.maxWidth,maxHeight:e.maxHeight,width:e.width,height:e.height,disposeOnNavigation:e.closeOnNavigation,disableAnimations:e.disableAnimations});return e.backdropClass&&(t.backdropClass=e.backdropClass),t}_attachContainer(e,t,n){let a=n.injector||n.viewContainerRef?.injector,r=[{provide:Fn,useValue:n},{provide:ir,useValue:t},{provide:qo,useValue:e}],u;n.container?typeof n.container=="function"?u=n.container:(u=n.container.type,r.push(...n.container.providers(n))):u=Bc;let h=new Oi(u,n.viewContainerRef,Z.create({parent:a||this._injector,providers:r}));return e.attach(h).instance}_attachDialogContent(e,t,n,a){if(e instanceof tt){let r=this._createInjector(a,t,n,void 0),u={$implicit:a.data,dialogRef:t};a.templateContext&&(u=V(V({},u),typeof a.templateContext=="function"?a.templateContext():a.templateContext)),n.attachTemplatePortal(new Gt(e,null,u,r))}else{let r=this._createInjector(a,t,n,this._injector),u=n.attachComponentPortal(new Oi(e,a.viewContainerRef,r,null,a.bindings));t.componentRef=u,t.componentInstance=u.instance}}_createInjector(e,t,n,a){let r=e.injector||e.viewContainerRef?.injector,u=[{provide:u0,useValue:e.data},{provide:ir,useValue:t}];return e.providers&&(typeof e.providers=="function"?u.push(...e.providers(t,e,n)):u.push(...e.providers)),e.direction&&(!r||!r.get(Ze,null,{optional:!0}))&&u.push({provide:Ze,useValue:p0(e.direction)}),Z.create({parent:r||a,providers:u})}_removeOpenDialog(e,t){let n=this.openDialogs.indexOf(e);n>-1&&(this.openDialogs.splice(n,1),this.openDialogs.length||(this._ariaHiddenElements.forEach((a,r)=>{a?r.setAttribute("aria-hidden",a):r.removeAttribute("aria-hidden")}),this._ariaHiddenElements.clear(),t&&this._getAfterAllClosed().next()))}_hideNonDialogContentFromAssistiveTechnology(e){if(e.parentElement){let t=e.parentElement.children;for(let n=t.length-1;n>-1;n--){let a=t[n];a!==e&&a.nodeName!=="SCRIPT"&&a.nodeName!=="STYLE"&&!a.hasAttribute("aria-live")&&!a.hasAttribute("popover")&&(this._ariaHiddenElements.set(a,a.getAttribute("aria-hidden")),a.setAttribute("aria-hidden","true"))}}}_getAfterAllClosed(){let e=this._parentDialog;return e?e._getAfterAllClosed():this._afterAllClosedAtThisLevel}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();function Vc(i,o){let e=i.length;for(;e--;)o(i[e])}var cp=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=U({type:i});static \u0275inj=H({providers:[zc],imports:[Qt,Yi,Aa,Yi]})}return i})();function f0(i,o){}var Ns=class{viewContainerRef;injector;id;role="dialog";panelClass="";hasBackdrop=!0;backdropClass="";disableClose=!1;closePredicate;width="";height="";minWidth;minHeight;maxWidth;maxHeight;position;data=null;direction;ariaDescribedBy=null;ariaLabelledBy=null;ariaLabel=null;ariaModal=!1;autoFocus="first-tabbable";restoreFocus=!0;delayFocusTrap=!0;scrollStrategy;closeOnNavigation=!0;enterAnimationDuration;exitAnimationDuration;bindings},jc="mdc-dialog--open",dp="mdc-dialog--opening",mp="mdc-dialog--closing",g0=150,_0=75,v0=(()=>{class i extends Bc{_animationStateChanged=new X;_animationsEnabled=!ye();_actionSectionCount=0;_hostElement=this._elementRef.nativeElement;_enterAnimationDuration=this._animationsEnabled?hp(this._config.enterAnimationDuration)??g0:0;_exitAnimationDuration=this._animationsEnabled?hp(this._config.exitAnimationDuration)??_0:0;_animationTimer=null;_contentAttached(){super._contentAttached(),this._startOpenAnimation()}_startOpenAnimation(){this._animationStateChanged.emit({state:"opening",totalTime:this._enterAnimationDuration}),this._animationsEnabled?(this._hostElement.style.setProperty(up,`${this._enterAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(dp,jc)),this._waitForAnimationToComplete(this._enterAnimationDuration,this._finishDialogOpen)):(this._hostElement.classList.add(jc),Promise.resolve().then(()=>this._finishDialogOpen()))}_startExitAnimation(){this._animationStateChanged.emit({state:"closing",totalTime:this._exitAnimationDuration}),this._hostElement.classList.remove(jc),this._animationsEnabled?(this._hostElement.style.setProperty(up,`${this._exitAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(mp)),this._waitForAnimationToComplete(this._exitAnimationDuration,this._finishDialogClose)):Promise.resolve().then(()=>this._finishDialogClose())}_updateActionSectionCount(e){this._actionSectionCount+=e,this._changeDetectorRef.markForCheck()}_finishDialogOpen=()=>{this._clearAnimationClasses(),this._openAnimationDone(this._enterAnimationDuration)};_finishDialogClose=()=>{this._clearAnimationClasses(),this._animationStateChanged.emit({state:"closed",totalTime:this._exitAnimationDuration})};_clearAnimationClasses(){this._hostElement.classList.remove(dp,mp)}_waitForAnimationToComplete(e,t){this._animationTimer!==null&&clearTimeout(this._animationTimer),this._animationTimer=setTimeout(t,e)}_requestAnimationFrame(e){this._ngZone.runOutsideAngular(()=>{typeof requestAnimationFrame=="function"?requestAnimationFrame(e):e()})}_captureInitialFocus(){this._config.delayFocusTrap||this._trapFocus()}_openAnimationDone(e){this._config.delayFocusTrap&&this._trapFocus(),this._animationStateChanged.next({state:"opened",totalTime:e})}ngOnDestroy(){super.ngOnDestroy(),this._animationTimer!==null&&clearTimeout(this._animationTimer)}attachComponentPortal(e){let t=super.attachComponentPortal(e);return t.location.nativeElement.classList.add("mat-mdc-dialog-component-host"),t}static \u0275fac=(()=>{let e;return function(n){return(e||(e=xe(i)))(n||i)}})();static \u0275cmp=R({type:i,selectors:[["mat-dialog-container"]],hostAttrs:["tabindex","-1",1,"mat-mdc-dialog-container","mdc-dialog"],hostVars:10,hostBindings:function(t,n){t&2&&(ft("id",n._config.id),J("aria-modal",n._config.ariaModal)("role",n._config.role)("aria-labelledby",n._config.ariaLabel?null:n._ariaLabelledByQueue[0])("aria-label",n._config.ariaLabel)("aria-describedby",n._config.ariaDescribedBy||null),p("_mat-animation-noopable",!n._animationsEnabled)("mat-mdc-dialog-container-with-actions",n._actionSectionCount>0))},features:[ie],decls:3,vars:0,consts:[[1,"mat-mdc-dialog-inner-container","mdc-dialog__container"],[1,"mat-mdc-dialog-surface","mdc-dialog__surface"],["cdkPortalOutlet",""]],template:function(t,n){t&1&&(s(0,"div",0)(1,"div",1),We(2,f0,0,0,"ng-template",2),l()())},dependencies:[Xi],styles:[`.mat-mdc-dialog-container {
3165
+ `],encapsulation:2,changeDetection:1})}return i})(),ir=class{overlayRef;config;componentInstance=null;componentRef=null;containerInstance;disableClose;closed=new O;backdropClick;keydownEvents;outsidePointerEvents;id;_detachSubscription;constructor(o,e){this.overlayRef=o,this.config=e,this.disableClose=e.disableClose,this.backdropClick=o.backdropClick(),this.keydownEvents=o.keydownEvents(),this.outsidePointerEvents=o.outsidePointerEvents(),this.id=e.id,this.keydownEvents.subscribe(t=>{t.keyCode===27&&!this.disableClose&&!Ke(t)&&(t.preventDefault(),this.close(void 0,{focusOrigin:"keyboard"}))}),this.backdropClick.subscribe(()=>{!this.disableClose&&this._canClose()?this.close(void 0,{focusOrigin:"mouse"}):this.containerInstance._recaptureFocus?.()}),this._detachSubscription=o.detachments().subscribe(()=>{e.closeOnOverlayDetachments!==!1&&this.close()})}close(o,e){if(this._canClose(o)){let t=this.closed;this.containerInstance._closeInteractionType=e?.focusOrigin||"program",this._detachSubscription.unsubscribe(),this.overlayRef.dispose(),t.next(o),t.complete(),this.componentInstance=this.containerInstance=null}}updatePosition(){return this.overlayRef.updatePosition(),this}updateSize(o="",e=""){return this.overlayRef.updateSize({width:o,height:e}),this}addPanelClass(o){return this.overlayRef.addPanelClass(o),this}removePanelClass(o){return this.overlayRef.removePanelClass(o),this}_canClose(o){let e=this.config;return!!this.containerInstance&&(!e.closePredicate||e.closePredicate(o,e,this.componentInstance))}},u0=new k("DialogScrollStrategy",{providedIn:"root",factory:()=>{let i=m(Z);return()=>Xo(i)}}),h0=new k("DialogData"),p0=new k("DefaultDialogConfig");function f0(i){let o=E(i),e=new X;return{valueSignal:o,get value(){return o()},change:e,ngOnDestroy(){e.complete()}}}var zc=(()=>{class i{_injector=m(Z);_defaultOptions=m(p0,{optional:!0});_parentDialog=m(i,{optional:!0,skipSelf:!0});_overlayContainer=m(Ps);_idGenerator=m(De);_openDialogsAtThisLevel=[];_afterAllClosedAtThisLevel=new O;_afterOpenedAtThisLevel=new O;_ariaHiddenElements=new Map;_scrollStrategy=m(u0);get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}afterAllClosed=gn(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Ee(void 0)));open(e,t){let n=this._defaultOptions||new Fn;t=V(V({},n),t),t.id=t.id||this._idGenerator.getId("cdk-dialog-"),t.id&&this.getDialogById(t.id);let a=this._getOverlayConfig(t),r=ri(this._injector,a),u=new ir(r,t),h=this._attachContainer(r,u,t);if(u.containerInstance=h,!this.openDialogs.length){let f=this._overlayContainer.getContainerElement();h._focusTrapped?h._focusTrapped.pipe(pt(1)).subscribe(()=>{this._hideNonDialogContentFromAssistiveTechnology(f)}):this._hideNonDialogContentFromAssistiveTechnology(f)}return this._attachDialogContent(e,u,h,t),this.openDialogs.push(u),u.closed.subscribe(()=>this._removeOpenDialog(u,!0)),this.afterOpened.next(u),u}closeAll(){Vc(this.openDialogs,e=>e.close())}getDialogById(e){return this.openDialogs.find(t=>t.id===e)}ngOnDestroy(){Vc(this._openDialogsAtThisLevel,e=>{e.config.closeOnDestroy===!1&&this._removeOpenDialog(e,!1)}),Vc(this._openDialogsAtThisLevel,e=>e.close()),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete(),this._openDialogsAtThisLevel=[]}_getOverlayConfig(e){let t=new ai({positionStrategy:e.positionStrategy||On().centerHorizontally().centerVertically(),scrollStrategy:e.scrollStrategy||this._scrollStrategy(),panelClass:e.panelClass,hasBackdrop:e.hasBackdrop,direction:e.direction,minWidth:e.minWidth,minHeight:e.minHeight,maxWidth:e.maxWidth,maxHeight:e.maxHeight,width:e.width,height:e.height,disposeOnNavigation:e.closeOnNavigation,disableAnimations:e.disableAnimations});return e.backdropClass&&(t.backdropClass=e.backdropClass),t}_attachContainer(e,t,n){let a=n.injector||n.viewContainerRef?.injector,r=[{provide:Fn,useValue:n},{provide:ir,useValue:t},{provide:qo,useValue:e}],u;n.container?typeof n.container=="function"?u=n.container:(u=n.container.type,r.push(...n.container.providers(n))):u=Bc;let h=new Oi(u,n.viewContainerRef,Z.create({parent:a||this._injector,providers:r}));return e.attach(h).instance}_attachDialogContent(e,t,n,a){if(e instanceof tt){let r=this._createInjector(a,t,n,void 0),u={$implicit:a.data,dialogRef:t};a.templateContext&&(u=V(V({},u),typeof a.templateContext=="function"?a.templateContext():a.templateContext)),n.attachTemplatePortal(new Wt(e,null,u,r))}else{let r=this._createInjector(a,t,n,this._injector),u=n.attachComponentPortal(new Oi(e,a.viewContainerRef,r,null,a.bindings));t.componentRef=u,t.componentInstance=u.instance}}_createInjector(e,t,n,a){let r=e.injector||e.viewContainerRef?.injector,u=[{provide:h0,useValue:e.data},{provide:ir,useValue:t}];return e.providers&&(typeof e.providers=="function"?u.push(...e.providers(t,e,n)):u.push(...e.providers)),e.direction&&(!r||!r.get(Ze,null,{optional:!0}))&&u.push({provide:Ze,useValue:f0(e.direction)}),Z.create({parent:r||a,providers:u})}_removeOpenDialog(e,t){let n=this.openDialogs.indexOf(e);n>-1&&(this.openDialogs.splice(n,1),this.openDialogs.length||(this._ariaHiddenElements.forEach((a,r)=>{a?r.setAttribute("aria-hidden",a):r.removeAttribute("aria-hidden")}),this._ariaHiddenElements.clear(),t&&this._getAfterAllClosed().next()))}_hideNonDialogContentFromAssistiveTechnology(e){if(e.parentElement){let t=e.parentElement.children;for(let n=t.length-1;n>-1;n--){let a=t[n];a!==e&&a.nodeName!=="SCRIPT"&&a.nodeName!=="STYLE"&&!a.hasAttribute("aria-live")&&!a.hasAttribute("popover")&&(this._ariaHiddenElements.set(a,a.getAttribute("aria-hidden")),a.setAttribute("aria-hidden","true"))}}}_getAfterAllClosed(){let e=this._parentDialog;return e?e._getAfterAllClosed():this._afterAllClosedAtThisLevel}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();function Vc(i,o){let e=i.length;for(;e--;)o(i[e])}var cp=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=U({type:i});static \u0275inj=H({providers:[zc],imports:[Jt,Yi,Aa,Yi]})}return i})();function g0(i,o){}var Ns=class{viewContainerRef;injector;id;role="dialog";panelClass="";hasBackdrop=!0;backdropClass="";disableClose=!1;closePredicate;width="";height="";minWidth;minHeight;maxWidth;maxHeight;position;data=null;direction;ariaDescribedBy=null;ariaLabelledBy=null;ariaLabel=null;ariaModal=!1;autoFocus="first-tabbable";restoreFocus=!0;delayFocusTrap=!0;scrollStrategy;closeOnNavigation=!0;enterAnimationDuration;exitAnimationDuration;bindings},jc="mdc-dialog--open",dp="mdc-dialog--opening",mp="mdc-dialog--closing",_0=150,v0=75,b0=(()=>{class i extends Bc{_animationStateChanged=new X;_animationsEnabled=!ye();_actionSectionCount=0;_hostElement=this._elementRef.nativeElement;_enterAnimationDuration=this._animationsEnabled?hp(this._config.enterAnimationDuration)??_0:0;_exitAnimationDuration=this._animationsEnabled?hp(this._config.exitAnimationDuration)??v0:0;_animationTimer=null;_contentAttached(){super._contentAttached(),this._startOpenAnimation()}_startOpenAnimation(){this._animationStateChanged.emit({state:"opening",totalTime:this._enterAnimationDuration}),this._animationsEnabled?(this._hostElement.style.setProperty(up,`${this._enterAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(dp,jc)),this._waitForAnimationToComplete(this._enterAnimationDuration,this._finishDialogOpen)):(this._hostElement.classList.add(jc),Promise.resolve().then(()=>this._finishDialogOpen()))}_startExitAnimation(){this._animationStateChanged.emit({state:"closing",totalTime:this._exitAnimationDuration}),this._hostElement.classList.remove(jc),this._animationsEnabled?(this._hostElement.style.setProperty(up,`${this._exitAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(mp)),this._waitForAnimationToComplete(this._exitAnimationDuration,this._finishDialogClose)):Promise.resolve().then(()=>this._finishDialogClose())}_updateActionSectionCount(e){this._actionSectionCount+=e,this._changeDetectorRef.markForCheck()}_finishDialogOpen=()=>{this._clearAnimationClasses(),this._openAnimationDone(this._enterAnimationDuration)};_finishDialogClose=()=>{this._clearAnimationClasses(),this._animationStateChanged.emit({state:"closed",totalTime:this._exitAnimationDuration})};_clearAnimationClasses(){this._hostElement.classList.remove(dp,mp)}_waitForAnimationToComplete(e,t){this._animationTimer!==null&&clearTimeout(this._animationTimer),this._animationTimer=setTimeout(t,e)}_requestAnimationFrame(e){this._ngZone.runOutsideAngular(()=>{typeof requestAnimationFrame=="function"?requestAnimationFrame(e):e()})}_captureInitialFocus(){this._config.delayFocusTrap||this._trapFocus()}_openAnimationDone(e){this._config.delayFocusTrap&&this._trapFocus(),this._animationStateChanged.next({state:"opened",totalTime:e})}ngOnDestroy(){super.ngOnDestroy(),this._animationTimer!==null&&clearTimeout(this._animationTimer)}attachComponentPortal(e){let t=super.attachComponentPortal(e);return t.location.nativeElement.classList.add("mat-mdc-dialog-component-host"),t}static \u0275fac=(()=>{let e;return function(n){return(e||(e=xe(i)))(n||i)}})();static \u0275cmp=R({type:i,selectors:[["mat-dialog-container"]],hostAttrs:["tabindex","-1",1,"mat-mdc-dialog-container","mdc-dialog"],hostVars:10,hostBindings:function(t,n){t&2&&(ft("id",n._config.id),J("aria-modal",n._config.ariaModal)("role",n._config.role)("aria-labelledby",n._config.ariaLabel?null:n._ariaLabelledByQueue[0])("aria-label",n._config.ariaLabel)("aria-describedby",n._config.ariaDescribedBy||null),p("_mat-animation-noopable",!n._animationsEnabled)("mat-mdc-dialog-container-with-actions",n._actionSectionCount>0))},features:[ie],decls:3,vars:0,consts:[[1,"mat-mdc-dialog-inner-container","mdc-dialog__container"],[1,"mat-mdc-dialog-surface","mdc-dialog__surface"],["cdkPortalOutlet",""]],template:function(t,n){t&1&&(s(0,"div",0)(1,"div",1),We(2,g0,0,0,"ng-template",2),l()())},dependencies:[Xi],styles:[`.mat-mdc-dialog-container {
3166
3166
  width: 100%;
3167
3167
  height: 100%;
3168
3168
  display: block;
@@ -3351,7 +3351,7 @@ input.mat-mdc-chip-input {
3351
3351
  .mat-mdc-dialog-component-host {
3352
3352
  display: contents;
3353
3353
  }
3354
- `],encapsulation:2,changeDetection:1})}return i})(),up="--mat-dialog-transition-duration";function hp(i){return i==null?null:typeof i=="number"?i:i.endsWith("ms")?ti(i.substring(0,i.length-2)):i.endsWith("s")?ti(i.substring(0,i.length-1))*1e3:i==="0"?0:null}var Fs=(function(i){return i[i.OPEN=0]="OPEN",i[i.CLOSING=1]="CLOSING",i[i.CLOSED=2]="CLOSED",i})(Fs||{}),et=class{_ref;_config;_containerInstance;componentInstance;componentRef=null;disableClose;id;_afterOpened=new dr(1);_beforeClosed=new dr(1);_result;_closeFallbackTimeout;_state=Fs.OPEN;_closeInteractionType;constructor(o,e,t){this._ref=o,this._config=e,this._containerInstance=t,this.disableClose=e.disableClose,this.id=o.id,o.addPanelClass("mat-mdc-dialog-panel"),t._animationStateChanged.pipe(ke(n=>n.state==="opened"),pt(1)).subscribe(()=>{this._afterOpened.next(),this._afterOpened.complete()}),t._animationStateChanged.pipe(ke(n=>n.state==="closed"),pt(1)).subscribe(()=>{clearTimeout(this._closeFallbackTimeout),this._finishDialogClose()}),o.overlayRef.detachments().subscribe(()=>{this._beforeClosed.next(this._result),this._beforeClosed.complete(),this._finishDialogClose()}),Xe(this.backdropClick(),this.keydownEvents().pipe(ke(n=>n.keyCode===27&&!this.disableClose&&!Ke(n)))).subscribe(n=>{this.disableClose||(n.preventDefault(),b0(this,n.type==="keydown"?"keyboard":"mouse"))})}close(o){let e=this._config.closePredicate;e&&!e(o,this._config,this.componentInstance)||(this._result=o,this._containerInstance._animationStateChanged.pipe(ke(t=>t.state==="closing"),pt(1)).subscribe(t=>{this._beforeClosed.next(o),this._beforeClosed.complete(),this._ref.overlayRef.detachBackdrop(),this._closeFallbackTimeout=setTimeout(()=>this._finishDialogClose(),t.totalTime+100)}),this._state=Fs.CLOSING,this._containerInstance._startExitAnimation())}afterOpened(){return this._afterOpened}afterClosed(){return this._ref.closed}beforeClosed(){return this._beforeClosed}backdropClick(){return this._ref.backdropClick}keydownEvents(){return this._ref.keydownEvents}updatePosition(o){let e=this._ref.config.positionStrategy;return o&&(o.left||o.right)?o.left?e.left(o.left):e.right(o.right):e.centerHorizontally(),o&&(o.top||o.bottom)?o.top?e.top(o.top):e.bottom(o.bottom):e.centerVertically(),this._ref.updatePosition(),this}updateSize(o="",e=""){return this._ref.updateSize(o,e),this}addPanelClass(o){return this._ref.addPanelClass(o),this}removePanelClass(o){return this._ref.removePanelClass(o),this}getState(){return this._state}_finishDialogClose(){this._state=Fs.CLOSED,this._ref.close(this._result,{focusOrigin:this._closeInteractionType}),this.componentInstance=null}};function b0(i,o,e){return i._closeInteractionType=o,i.close(e)}var Ni=new k("MatMdcDialogData"),y0=new k("mat-mdc-dialog-default-options"),C0=new k("mat-mdc-dialog-scroll-strategy",{providedIn:"root",factory:()=>{let i=m(Z);return()=>Xo(i)}}),Nn=(()=>{class i{_defaultOptions=m(y0,{optional:!0});_scrollStrategy=m(C0);_parentDialog=m(i,{optional:!0,skipSelf:!0});_idGenerator=m(De);_injector=m(Z);_dialog=m(zc);_animationsDisabled=ye();_openDialogsAtThisLevel=[];_afterAllClosedAtThisLevel=new O;_afterOpenedAtThisLevel=new O;dialogConfigClass=Ns;_dialogRefConstructor;_dialogContainerType;_dialogDataToken;get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}_getAfterAllClosed(){let e=this._parentDialog;return e?e._getAfterAllClosed():this._afterAllClosedAtThisLevel}afterAllClosed=gn(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Ee(void 0)));constructor(){this._dialogRefConstructor=et,this._dialogContainerType=v0,this._dialogDataToken=Ni}open(e,t){let n;t=V(V({},this._defaultOptions||new Ns),t),t.id=t.id||this._idGenerator.getId("mat-mdc-dialog-"),t.scrollStrategy=t.scrollStrategy||this._scrollStrategy();let a=this._dialog.open(e,Fe(V({},t),{positionStrategy:On(this._injector).centerHorizontally().centerVertically(),disableClose:!0,closePredicate:void 0,closeOnDestroy:!1,closeOnOverlayDetachments:!1,disableAnimations:this._animationsDisabled||t.enterAnimationDuration?.toLocaleString()==="0"||t.exitAnimationDuration?.toString()==="0",container:{type:this._dialogContainerType,providers:()=>[{provide:this.dialogConfigClass,useValue:t},{provide:Fn,useValue:t}]},templateContext:()=>({dialogRef:n}),providers:(r,u,h)=>(n=new this._dialogRefConstructor(r,t,h),n.updatePosition(t?.position),[{provide:this._dialogContainerType,useValue:h},{provide:this._dialogDataToken,useValue:u.data},{provide:this._dialogRefConstructor,useValue:n}])}));return n.componentRef=a.componentRef,n.componentInstance=a.componentInstance,this.openDialogs.push(n),this.afterOpened.next(n),n.afterClosed().subscribe(()=>{let r=this.openDialogs.indexOf(n);r>-1&&(this.openDialogs.splice(r,1),this.openDialogs.length||this._getAfterAllClosed().next())}),n}closeAll(){this._closeDialogs(this.openDialogs)}getDialogById(e){return this.openDialogs.find(t=>t.id===e)}ngOnDestroy(){this._closeDialogs(this._openDialogsAtThisLevel),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete()}_closeDialogs(e){let t=e.length;for(;t--;)e[t].close()}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();var pp=(()=>{class i{_dialogRef=m(et,{optional:!0});_elementRef=m(B);_dialog=m(Nn);ngOnInit(){this._dialogRef||(this._dialogRef=x0(this._elementRef,this._dialog.openDialogs)),this._dialogRef&&Promise.resolve().then(()=>{this._onAdd()})}ngOnDestroy(){this._dialogRef?._containerInstance&&Promise.resolve().then(()=>{this._onRemove()})}static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i})}return i})(),yt=(()=>{class i extends pp{id=m(De).getId("mat-mdc-dialog-title-");_onAdd(){this._dialogRef._containerInstance?._addAriaLabelledBy?.(this.id)}_onRemove(){this._dialogRef?._containerInstance?._removeAriaLabelledBy?.(this.id)}static \u0275fac=(()=>{let e;return function(n){return(e||(e=xe(i)))(n||i)}})();static \u0275dir=T({type:i,selectors:[["","mat-dialog-title",""],["","matDialogTitle",""]],hostAttrs:[1,"mat-mdc-dialog-title","mdc-dialog__title"],hostVars:1,hostBindings:function(t,n){t&2&&ft("id",n.id)},inputs:{id:"id"},exportAs:["matDialogTitle"],features:[ie]})}return i})(),Ct=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,selectors:[["","mat-dialog-content",""],["mat-dialog-content"],["","matDialogContent",""]],hostAttrs:[1,"mat-mdc-dialog-content","mdc-dialog__content"],features:[wd([xc])]})}return i})(),xt=(()=>{class i extends pp{align;_onAdd(){this._dialogRef._containerInstance?._updateActionSectionCount?.(1)}_onRemove(){this._dialogRef._containerInstance?._updateActionSectionCount?.(-1)}static \u0275fac=(()=>{let e;return function(n){return(e||(e=xe(i)))(n||i)}})();static \u0275dir=T({type:i,selectors:[["","mat-dialog-actions",""],["mat-dialog-actions"],["","matDialogActions",""]],hostAttrs:[1,"mat-mdc-dialog-actions","mdc-dialog__actions"],hostVars:6,hostBindings:function(t,n){t&2&&p("mat-mdc-dialog-actions-align-start",n.align==="start")("mat-mdc-dialog-actions-align-center",n.align==="center")("mat-mdc-dialog-actions-align-end",n.align==="end")},inputs:{align:"align"},features:[ie]})}return i})();function x0(i,o){let e=i.nativeElement.parentElement;for(;e&&!e.classList.contains("mat-mdc-dialog-container");)e=e.parentElement;return e?o.find(t=>t.id===e.id):null}var st=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=U({type:i});static \u0275inj=H({providers:[Nn],imports:[cp,Qt,Yi,ce]})}return i})();var w0=[[["mat-icon"],["","matMenuItemIcon",""]],"*"],D0=["mat-icon, [matMenuItemIcon]","*"];function S0(i,o){i&1&&(Bi(),s(0,"svg",2),_(1,"polygon",3),l())}var k0=["*"];function M0(i,o){if(i&1){let e=_e();Ne(0,"div",0),xr("click",function(){ne(e);let n=v();return oe(n.closed.emit("click"))})("animationstart",function(n){ne(e);let a=v();return oe(a._onAnimationStart(n.animationName))})("animationend",function(n){ne(e);let a=v();return oe(a._onAnimationDone(n.animationName))})("animationcancel",function(n){ne(e);let a=v();return oe(a._onAnimationDone(n.animationName))}),Ne(1,"div",1),W(2),qe()()}if(i&2){let e=v();at(e._classList),p("mat-menu-panel-animations-disabled",e._animationsDisabled)("mat-menu-panel-exit-animation",e._panelAnimationState==="void")("mat-menu-panel-animating",e._isAnimating()),ft("id",e.panelId),J("aria-label",e.ariaLabel||null)("aria-labelledby",e.ariaLabelledby||null)("aria-describedby",e.ariaDescribedby||null)}}var Uc=new k("MAT_MENU_PANEL"),mo=(()=>{class i{_elementRef=m(B);_document=m(K);_focusMonitor=m(Xt);_parentMenu=m(Uc,{optional:!0});_changeDetectorRef=m(se);role="menuitem";disabled=!1;disableRipple=!1;_hovered=new O;_focused=new O;_highlighted=!1;_triggersSubmenu=!1;constructor(){m(Be).load($t),this._parentMenu?.addItem?.(this)}focus(e,t){this._focusMonitor&&e?this._focusMonitor.focusVia(this._getHostElement(),e,t):this._getHostElement().focus(t),this._focused.next(this)}ngAfterViewInit(){this._focusMonitor&&this._focusMonitor.monitor(this._elementRef,!1)}ngOnDestroy(){this._focusMonitor&&this._focusMonitor.stopMonitoring(this._elementRef),this._parentMenu&&this._parentMenu.removeItem&&this._parentMenu.removeItem(this),this._hovered.complete(),this._focused.complete()}_getTabIndex(){return this.disabled?"-1":"0"}_getHostElement(){return this._elementRef.nativeElement}_checkDisabled(e){this.disabled&&(e.preventDefault(),e.stopPropagation())}_handleMouseEnter(){this._hovered.next(this)}getLabel(){let e=this._elementRef.nativeElement.cloneNode(!0),t=e.querySelectorAll("mat-icon, .material-icons");for(let n=0;n<t.length;n++)t[n].remove();return e.textContent?.trim()||""}_setHighlighted(e){this._highlighted=e,this._changeDetectorRef.markForCheck()}_setTriggersSubmenu(e){this._triggersSubmenu=e,this._changeDetectorRef.markForCheck()}_hasFocus(){return this._document&&this._document.activeElement===this._getHostElement()}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=R({type:i,selectors:[["","mat-menu-item",""]],hostAttrs:[1,"mat-mdc-menu-item","mat-focus-indicator"],hostVars:8,hostBindings:function(t,n){t&1&&S("click",function(r){return n._checkDisabled(r)})("mouseenter",function(){return n._handleMouseEnter()}),t&2&&(J("role",n.role)("tabindex",n._getTabIndex())("aria-disabled",n.disabled)("disabled",n.disabled||null),p("mat-mdc-menu-item-highlighted",n._highlighted)("mat-mdc-menu-item-submenu-trigger",n._triggersSubmenu))},inputs:{role:"role",disabled:[2,"disabled","disabled",z],disableRipple:[2,"disableRipple","disableRipple",z]},exportAs:["matMenuItem"],ngContentSelectors:D0,decls:5,vars:3,consts:[[1,"mat-mdc-menu-item-text"],["matRipple","",1,"mat-mdc-menu-ripple",3,"matRippleDisabled","matRippleTrigger"],["viewBox","0 0 5 10","focusable","false","aria-hidden","true",1,"mat-mdc-menu-submenu-icon"],["points","0,0 5,5 0,10"]],template:function(t,n){t&1&&(ve(w0),W(0),s(1,"span",0),W(2,1),l(),_(3,"div",1),w(4,S0,2,0,":svg:svg",2)),t&2&&(c(3),x("matRippleDisabled",n.disableRipple||n.disabled)("matRippleTrigger",n._getHostElement()),c(),D(n._triggersSubmenu?4:-1))},dependencies:[$o],encapsulation:2})}return i})();var E0=new k("MatMenuContent");var T0=new k("mat-menu-default-options",{providedIn:"root",factory:()=>({overlapTrigger:!1,xPosition:"after",yPosition:"below",backdropClass:"cdk-overlay-transparent-backdrop"})}),Hc="_mat-menu-enter",Ls="_mat-menu-exit",Ln=(()=>{class i{_elementRef=m(B);_changeDetectorRef=m(se);_injector=m(Z);_keyManager;_xPosition;_yPosition;_firstItemFocusRef;_exitFallbackTimeout;_animationsDisabled=ye();_allItems;_directDescendantItems=new vn;_classList={};_panelAnimationState="void";_animationDone=new O;_isAnimating=E(!1);parentMenu;direction;overlayPanelClass;backdropClass;ariaLabel;ariaLabelledby;ariaDescribedby;get xPosition(){return this._xPosition}set xPosition(e){this._xPosition=e,this.setPositionClasses()}get yPosition(){return this._yPosition}set yPosition(e){this._yPosition=e,this.setPositionClasses()}templateRef;items;lazyContent;overlapTrigger=!1;hasBackdrop;get panelClass(){return this._previousPanelClass}set panelClass(e){let t=this._previousPanelClass,n=V({},this._classList);t&&t.length&&t.split(" ").forEach(a=>{n[a]=!1}),this._previousPanelClass=e,e&&e.length&&(e.split(" ").forEach(a=>{n[a]=!0}),this._elementRef.nativeElement.className=""),this._classList=n}_previousPanelClass="";get classList(){return this.panelClass}set classList(e){this.panelClass=e}closed=new X;close=this.closed;panelId=m(De).getId("mat-menu-panel-");constructor(){let e=m(T0);this.overlayPanelClass=e.overlayPanelClass||"",this._xPosition=e.xPosition,this._yPosition=e.yPosition,this.backdropClass=e.backdropClass,this.overlapTrigger=e.overlapTrigger,this.hasBackdrop=e.hasBackdrop}ngOnInit(){this.setPositionClasses()}ngAfterContentInit(){this._updateDirectDescendants(),this._keyManager=new En(this._directDescendantItems).withWrap().withTypeAhead().withHomeAndEnd(),this._keyManager.tabOut.subscribe(()=>this.closed.emit("tab")),this._directDescendantItems.changes.pipe(Ee(this._directDescendantItems),$e(e=>Xe(...e.map(t=>t._focused)))).subscribe(e=>this._keyManager.updateActiveItem(e)),this._directDescendantItems.changes.subscribe(e=>{let t=this._keyManager;if(this._panelAnimationState==="enter"&&t.activeItem?._hasFocus()){let n=e.toArray(),a=Math.max(0,Math.min(n.length-1,t.activeItemIndex||0));n[a]&&!n[a].disabled?t.setActiveItem(a):t.setNextItemActive()}})}ngOnDestroy(){this._keyManager?.destroy(),this._directDescendantItems.destroy(),this.closed.complete(),this._firstItemFocusRef?.destroy(),clearTimeout(this._exitFallbackTimeout)}_hovered(){return this._directDescendantItems.changes.pipe(Ee(this._directDescendantItems),$e(t=>Xe(...t.map(n=>n._hovered))))}addItem(e){}removeItem(e){}_handleKeydown(e){let t=e.keyCode,n=this._keyManager;switch(t){case 27:Ke(e)||(e.preventDefault(),this.closed.emit("keydown"));break;case 37:this.parentMenu&&this.direction==="ltr"&&this.closed.emit("keydown");break;case 39:this.parentMenu&&this.direction==="rtl"&&this.closed.emit("keydown");break;default:(t===38||t===40)&&n.setFocusOrigin("keyboard"),n.onKeydown(e);return}}focusFirstItem(e="program"){this._firstItemFocusRef?.destroy(),this._firstItemFocusRef=Ge(()=>{let t=this._resolvePanel();if(!t||!t.contains(document.activeElement)){let n=this._keyManager;n.setFocusOrigin(e).setFirstItemActive(),!n.activeItem&&t&&t.focus()}},{injector:this._injector})}resetActiveItem(){this._keyManager.setActiveItem(-1)}setElevation(e){}setPositionClasses(e=this.xPosition,t=this.yPosition){this._classList=Fe(V({},this._classList),{"mat-menu-before":e==="before","mat-menu-after":e==="after","mat-menu-above":t==="above","mat-menu-below":t==="below"}),this._changeDetectorRef.markForCheck()}_onAnimationDone(e){let t=e===Ls;(t||e===Hc)&&(t&&(clearTimeout(this._exitFallbackTimeout),this._exitFallbackTimeout=void 0),this._animationDone.next(t?"void":"enter"),this._isAnimating.set(!1))}_onAnimationStart(e){(e===Hc||e===Ls)&&this._isAnimating.set(!0)}_setIsOpen(e){if(this._panelAnimationState=e?"enter":"void",e){if(this._keyManager.activeItemIndex===0){let t=this._resolvePanel();t&&(t.scrollTop=0)}}else this._animationsDisabled||(this._exitFallbackTimeout=setTimeout(()=>this._onAnimationDone(Ls),200));this._animationsDisabled&&setTimeout(()=>{this._onAnimationDone(e?Hc:Ls)}),this._changeDetectorRef.markForCheck()}_updateDirectDescendants(){this._allItems.changes.pipe(Ee(this._allItems)).subscribe(e=>{this._directDescendantItems.reset(e.filter(t=>t._parentMenu===this)),this._directDescendantItems.notifyOnChanges()})}_resolvePanel(){let e=null;return this._directDescendantItems.length&&(e=this._directDescendantItems.first._getHostElement().closest('[role="menu"]')),e}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=R({type:i,selectors:[["mat-menu"]],contentQueries:function(t,n,a){if(t&1&&dt(a,E0,5)(a,mo,5)(a,mo,4),t&2){let r;N(r=L())&&(n.lazyContent=r.first),N(r=L())&&(n._allItems=r),N(r=L())&&(n.items=r)}},viewQuery:function(t,n){if(t&1&&Re(tt,5),t&2){let a;N(a=L())&&(n.templateRef=a.first)}},hostVars:3,hostBindings:function(t,n){t&2&&J("aria-label",null)("aria-labelledby",null)("aria-describedby",null)},inputs:{backdropClass:"backdropClass",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[0,"aria-describedby","ariaDescribedby"],xPosition:"xPosition",yPosition:"yPosition",overlapTrigger:[2,"overlapTrigger","overlapTrigger",z],hasBackdrop:[2,"hasBackdrop","hasBackdrop",e=>e==null?null:z(e)],panelClass:[0,"class","panelClass"],classList:"classList"},outputs:{closed:"closed",close:"close"},exportAs:["matMenu"],features:[le([{provide:Uc,useExisting:i}])],ngContentSelectors:k0,decls:1,vars:0,consts:[["tabindex","-1","role","menu",1,"mat-mdc-menu-panel",3,"click","animationstart","animationend","animationcancel","id"],[1,"mat-mdc-menu-content"]],template:function(t,n){t&1&&(ve(),Cr(0,M0,3,12,"ng-template"))},styles:[`mat-menu {
3354
+ `],encapsulation:2,changeDetection:1})}return i})(),up="--mat-dialog-transition-duration";function hp(i){return i==null?null:typeof i=="number"?i:i.endsWith("ms")?ti(i.substring(0,i.length-2)):i.endsWith("s")?ti(i.substring(0,i.length-1))*1e3:i==="0"?0:null}var Fs=(function(i){return i[i.OPEN=0]="OPEN",i[i.CLOSING=1]="CLOSING",i[i.CLOSED=2]="CLOSED",i})(Fs||{}),et=class{_ref;_config;_containerInstance;componentInstance;componentRef=null;disableClose;id;_afterOpened=new dr(1);_beforeClosed=new dr(1);_result;_closeFallbackTimeout;_state=Fs.OPEN;_closeInteractionType;constructor(o,e,t){this._ref=o,this._config=e,this._containerInstance=t,this.disableClose=e.disableClose,this.id=o.id,o.addPanelClass("mat-mdc-dialog-panel"),t._animationStateChanged.pipe(ke(n=>n.state==="opened"),pt(1)).subscribe(()=>{this._afterOpened.next(),this._afterOpened.complete()}),t._animationStateChanged.pipe(ke(n=>n.state==="closed"),pt(1)).subscribe(()=>{clearTimeout(this._closeFallbackTimeout),this._finishDialogClose()}),o.overlayRef.detachments().subscribe(()=>{this._beforeClosed.next(this._result),this._beforeClosed.complete(),this._finishDialogClose()}),Xe(this.backdropClick(),this.keydownEvents().pipe(ke(n=>n.keyCode===27&&!this.disableClose&&!Ke(n)))).subscribe(n=>{this.disableClose||(n.preventDefault(),y0(this,n.type==="keydown"?"keyboard":"mouse"))})}close(o){let e=this._config.closePredicate;e&&!e(o,this._config,this.componentInstance)||(this._result=o,this._containerInstance._animationStateChanged.pipe(ke(t=>t.state==="closing"),pt(1)).subscribe(t=>{this._beforeClosed.next(o),this._beforeClosed.complete(),this._ref.overlayRef.detachBackdrop(),this._closeFallbackTimeout=setTimeout(()=>this._finishDialogClose(),t.totalTime+100)}),this._state=Fs.CLOSING,this._containerInstance._startExitAnimation())}afterOpened(){return this._afterOpened}afterClosed(){return this._ref.closed}beforeClosed(){return this._beforeClosed}backdropClick(){return this._ref.backdropClick}keydownEvents(){return this._ref.keydownEvents}updatePosition(o){let e=this._ref.config.positionStrategy;return o&&(o.left||o.right)?o.left?e.left(o.left):e.right(o.right):e.centerHorizontally(),o&&(o.top||o.bottom)?o.top?e.top(o.top):e.bottom(o.bottom):e.centerVertically(),this._ref.updatePosition(),this}updateSize(o="",e=""){return this._ref.updateSize(o,e),this}addPanelClass(o){return this._ref.addPanelClass(o),this}removePanelClass(o){return this._ref.removePanelClass(o),this}getState(){return this._state}_finishDialogClose(){this._state=Fs.CLOSED,this._ref.close(this._result,{focusOrigin:this._closeInteractionType}),this.componentInstance=null}};function y0(i,o,e){return i._closeInteractionType=o,i.close(e)}var Ni=new k("MatMdcDialogData"),C0=new k("mat-mdc-dialog-default-options"),x0=new k("mat-mdc-dialog-scroll-strategy",{providedIn:"root",factory:()=>{let i=m(Z);return()=>Xo(i)}}),Nn=(()=>{class i{_defaultOptions=m(C0,{optional:!0});_scrollStrategy=m(x0);_parentDialog=m(i,{optional:!0,skipSelf:!0});_idGenerator=m(De);_injector=m(Z);_dialog=m(zc);_animationsDisabled=ye();_openDialogsAtThisLevel=[];_afterAllClosedAtThisLevel=new O;_afterOpenedAtThisLevel=new O;dialogConfigClass=Ns;_dialogRefConstructor;_dialogContainerType;_dialogDataToken;get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}_getAfterAllClosed(){let e=this._parentDialog;return e?e._getAfterAllClosed():this._afterAllClosedAtThisLevel}afterAllClosed=gn(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Ee(void 0)));constructor(){this._dialogRefConstructor=et,this._dialogContainerType=b0,this._dialogDataToken=Ni}open(e,t){let n;t=V(V({},this._defaultOptions||new Ns),t),t.id=t.id||this._idGenerator.getId("mat-mdc-dialog-"),t.scrollStrategy=t.scrollStrategy||this._scrollStrategy();let a=this._dialog.open(e,Fe(V({},t),{positionStrategy:On(this._injector).centerHorizontally().centerVertically(),disableClose:!0,closePredicate:void 0,closeOnDestroy:!1,closeOnOverlayDetachments:!1,disableAnimations:this._animationsDisabled||t.enterAnimationDuration?.toLocaleString()==="0"||t.exitAnimationDuration?.toString()==="0",container:{type:this._dialogContainerType,providers:()=>[{provide:this.dialogConfigClass,useValue:t},{provide:Fn,useValue:t}]},templateContext:()=>({dialogRef:n}),providers:(r,u,h)=>(n=new this._dialogRefConstructor(r,t,h),n.updatePosition(t?.position),[{provide:this._dialogContainerType,useValue:h},{provide:this._dialogDataToken,useValue:u.data},{provide:this._dialogRefConstructor,useValue:n}])}));return n.componentRef=a.componentRef,n.componentInstance=a.componentInstance,this.openDialogs.push(n),this.afterOpened.next(n),n.afterClosed().subscribe(()=>{let r=this.openDialogs.indexOf(n);r>-1&&(this.openDialogs.splice(r,1),this.openDialogs.length||this._getAfterAllClosed().next())}),n}closeAll(){this._closeDialogs(this.openDialogs)}getDialogById(e){return this.openDialogs.find(t=>t.id===e)}ngOnDestroy(){this._closeDialogs(this._openDialogsAtThisLevel),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete()}_closeDialogs(e){let t=e.length;for(;t--;)e[t].close()}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();var pp=(()=>{class i{_dialogRef=m(et,{optional:!0});_elementRef=m(B);_dialog=m(Nn);ngOnInit(){this._dialogRef||(this._dialogRef=w0(this._elementRef,this._dialog.openDialogs)),this._dialogRef&&Promise.resolve().then(()=>{this._onAdd()})}ngOnDestroy(){this._dialogRef?._containerInstance&&Promise.resolve().then(()=>{this._onRemove()})}static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i})}return i})(),yt=(()=>{class i extends pp{id=m(De).getId("mat-mdc-dialog-title-");_onAdd(){this._dialogRef._containerInstance?._addAriaLabelledBy?.(this.id)}_onRemove(){this._dialogRef?._containerInstance?._removeAriaLabelledBy?.(this.id)}static \u0275fac=(()=>{let e;return function(n){return(e||(e=xe(i)))(n||i)}})();static \u0275dir=T({type:i,selectors:[["","mat-dialog-title",""],["","matDialogTitle",""]],hostAttrs:[1,"mat-mdc-dialog-title","mdc-dialog__title"],hostVars:1,hostBindings:function(t,n){t&2&&ft("id",n.id)},inputs:{id:"id"},exportAs:["matDialogTitle"],features:[ie]})}return i})(),Ct=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,selectors:[["","mat-dialog-content",""],["mat-dialog-content"],["","matDialogContent",""]],hostAttrs:[1,"mat-mdc-dialog-content","mdc-dialog__content"],features:[wd([xc])]})}return i})(),xt=(()=>{class i extends pp{align;_onAdd(){this._dialogRef._containerInstance?._updateActionSectionCount?.(1)}_onRemove(){this._dialogRef._containerInstance?._updateActionSectionCount?.(-1)}static \u0275fac=(()=>{let e;return function(n){return(e||(e=xe(i)))(n||i)}})();static \u0275dir=T({type:i,selectors:[["","mat-dialog-actions",""],["mat-dialog-actions"],["","matDialogActions",""]],hostAttrs:[1,"mat-mdc-dialog-actions","mdc-dialog__actions"],hostVars:6,hostBindings:function(t,n){t&2&&p("mat-mdc-dialog-actions-align-start",n.align==="start")("mat-mdc-dialog-actions-align-center",n.align==="center")("mat-mdc-dialog-actions-align-end",n.align==="end")},inputs:{align:"align"},features:[ie]})}return i})();function w0(i,o){let e=i.nativeElement.parentElement;for(;e&&!e.classList.contains("mat-mdc-dialog-container");)e=e.parentElement;return e?o.find(t=>t.id===e.id):null}var st=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=U({type:i});static \u0275inj=H({providers:[Nn],imports:[cp,Jt,Yi,ce]})}return i})();var D0=[[["mat-icon"],["","matMenuItemIcon",""]],"*"],S0=["mat-icon, [matMenuItemIcon]","*"];function k0(i,o){i&1&&(Bi(),s(0,"svg",2),_(1,"polygon",3),l())}var M0=["*"];function E0(i,o){if(i&1){let e=_e();Ne(0,"div",0),xr("click",function(){ne(e);let n=v();return oe(n.closed.emit("click"))})("animationstart",function(n){ne(e);let a=v();return oe(a._onAnimationStart(n.animationName))})("animationend",function(n){ne(e);let a=v();return oe(a._onAnimationDone(n.animationName))})("animationcancel",function(n){ne(e);let a=v();return oe(a._onAnimationDone(n.animationName))}),Ne(1,"div",1),W(2),qe()()}if(i&2){let e=v();at(e._classList),p("mat-menu-panel-animations-disabled",e._animationsDisabled)("mat-menu-panel-exit-animation",e._panelAnimationState==="void")("mat-menu-panel-animating",e._isAnimating()),ft("id",e.panelId),J("aria-label",e.ariaLabel||null)("aria-labelledby",e.ariaLabelledby||null)("aria-describedby",e.ariaDescribedby||null)}}var Uc=new k("MAT_MENU_PANEL"),mo=(()=>{class i{_elementRef=m(B);_document=m(K);_focusMonitor=m(Yt);_parentMenu=m(Uc,{optional:!0});_changeDetectorRef=m(se);role="menuitem";disabled=!1;disableRipple=!1;_hovered=new O;_focused=new O;_highlighted=!1;_triggersSubmenu=!1;constructor(){m(Be).load(Gt),this._parentMenu?.addItem?.(this)}focus(e,t){this._focusMonitor&&e?this._focusMonitor.focusVia(this._getHostElement(),e,t):this._getHostElement().focus(t),this._focused.next(this)}ngAfterViewInit(){this._focusMonitor&&this._focusMonitor.monitor(this._elementRef,!1)}ngOnDestroy(){this._focusMonitor&&this._focusMonitor.stopMonitoring(this._elementRef),this._parentMenu&&this._parentMenu.removeItem&&this._parentMenu.removeItem(this),this._hovered.complete(),this._focused.complete()}_getTabIndex(){return this.disabled?"-1":"0"}_getHostElement(){return this._elementRef.nativeElement}_checkDisabled(e){this.disabled&&(e.preventDefault(),e.stopPropagation())}_handleMouseEnter(){this._hovered.next(this)}getLabel(){let e=this._elementRef.nativeElement.cloneNode(!0),t=e.querySelectorAll("mat-icon, .material-icons");for(let n=0;n<t.length;n++)t[n].remove();return e.textContent?.trim()||""}_setHighlighted(e){this._highlighted=e,this._changeDetectorRef.markForCheck()}_setTriggersSubmenu(e){this._triggersSubmenu=e,this._changeDetectorRef.markForCheck()}_hasFocus(){return this._document&&this._document.activeElement===this._getHostElement()}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=R({type:i,selectors:[["","mat-menu-item",""]],hostAttrs:[1,"mat-mdc-menu-item","mat-focus-indicator"],hostVars:8,hostBindings:function(t,n){t&1&&S("click",function(r){return n._checkDisabled(r)})("mouseenter",function(){return n._handleMouseEnter()}),t&2&&(J("role",n.role)("tabindex",n._getTabIndex())("aria-disabled",n.disabled)("disabled",n.disabled||null),p("mat-mdc-menu-item-highlighted",n._highlighted)("mat-mdc-menu-item-submenu-trigger",n._triggersSubmenu))},inputs:{role:"role",disabled:[2,"disabled","disabled",z],disableRipple:[2,"disableRipple","disableRipple",z]},exportAs:["matMenuItem"],ngContentSelectors:S0,decls:5,vars:3,consts:[[1,"mat-mdc-menu-item-text"],["matRipple","",1,"mat-mdc-menu-ripple",3,"matRippleDisabled","matRippleTrigger"],["viewBox","0 0 5 10","focusable","false","aria-hidden","true",1,"mat-mdc-menu-submenu-icon"],["points","0,0 5,5 0,10"]],template:function(t,n){t&1&&(ve(D0),W(0),s(1,"span",0),W(2,1),l(),_(3,"div",1),w(4,k0,2,0,":svg:svg",2)),t&2&&(c(3),x("matRippleDisabled",n.disableRipple||n.disabled)("matRippleTrigger",n._getHostElement()),c(),D(n._triggersSubmenu?4:-1))},dependencies:[$o],encapsulation:2})}return i})();var T0=new k("MatMenuContent");var A0=new k("mat-menu-default-options",{providedIn:"root",factory:()=>({overlapTrigger:!1,xPosition:"after",yPosition:"below",backdropClass:"cdk-overlay-transparent-backdrop"})}),Hc="_mat-menu-enter",Ls="_mat-menu-exit",Ln=(()=>{class i{_elementRef=m(B);_changeDetectorRef=m(se);_injector=m(Z);_keyManager;_xPosition;_yPosition;_firstItemFocusRef;_exitFallbackTimeout;_animationsDisabled=ye();_allItems;_directDescendantItems=new vn;_classList={};_panelAnimationState="void";_animationDone=new O;_isAnimating=E(!1);parentMenu;direction;overlayPanelClass;backdropClass;ariaLabel;ariaLabelledby;ariaDescribedby;get xPosition(){return this._xPosition}set xPosition(e){this._xPosition=e,this.setPositionClasses()}get yPosition(){return this._yPosition}set yPosition(e){this._yPosition=e,this.setPositionClasses()}templateRef;items;lazyContent;overlapTrigger=!1;hasBackdrop;get panelClass(){return this._previousPanelClass}set panelClass(e){let t=this._previousPanelClass,n=V({},this._classList);t&&t.length&&t.split(" ").forEach(a=>{n[a]=!1}),this._previousPanelClass=e,e&&e.length&&(e.split(" ").forEach(a=>{n[a]=!0}),this._elementRef.nativeElement.className=""),this._classList=n}_previousPanelClass="";get classList(){return this.panelClass}set classList(e){this.panelClass=e}closed=new X;close=this.closed;panelId=m(De).getId("mat-menu-panel-");constructor(){let e=m(A0);this.overlayPanelClass=e.overlayPanelClass||"",this._xPosition=e.xPosition,this._yPosition=e.yPosition,this.backdropClass=e.backdropClass,this.overlapTrigger=e.overlapTrigger,this.hasBackdrop=e.hasBackdrop}ngOnInit(){this.setPositionClasses()}ngAfterContentInit(){this._updateDirectDescendants(),this._keyManager=new En(this._directDescendantItems).withWrap().withTypeAhead().withHomeAndEnd(),this._keyManager.tabOut.subscribe(()=>this.closed.emit("tab")),this._directDescendantItems.changes.pipe(Ee(this._directDescendantItems),$e(e=>Xe(...e.map(t=>t._focused)))).subscribe(e=>this._keyManager.updateActiveItem(e)),this._directDescendantItems.changes.subscribe(e=>{let t=this._keyManager;if(this._panelAnimationState==="enter"&&t.activeItem?._hasFocus()){let n=e.toArray(),a=Math.max(0,Math.min(n.length-1,t.activeItemIndex||0));n[a]&&!n[a].disabled?t.setActiveItem(a):t.setNextItemActive()}})}ngOnDestroy(){this._keyManager?.destroy(),this._directDescendantItems.destroy(),this.closed.complete(),this._firstItemFocusRef?.destroy(),clearTimeout(this._exitFallbackTimeout)}_hovered(){return this._directDescendantItems.changes.pipe(Ee(this._directDescendantItems),$e(t=>Xe(...t.map(n=>n._hovered))))}addItem(e){}removeItem(e){}_handleKeydown(e){let t=e.keyCode,n=this._keyManager;switch(t){case 27:Ke(e)||(e.preventDefault(),this.closed.emit("keydown"));break;case 37:this.parentMenu&&this.direction==="ltr"&&this.closed.emit("keydown");break;case 39:this.parentMenu&&this.direction==="rtl"&&this.closed.emit("keydown");break;default:(t===38||t===40)&&n.setFocusOrigin("keyboard"),n.onKeydown(e);return}}focusFirstItem(e="program"){this._firstItemFocusRef?.destroy(),this._firstItemFocusRef=Ge(()=>{let t=this._resolvePanel();if(!t||!t.contains(document.activeElement)){let n=this._keyManager;n.setFocusOrigin(e).setFirstItemActive(),!n.activeItem&&t&&t.focus()}},{injector:this._injector})}resetActiveItem(){this._keyManager.setActiveItem(-1)}setElevation(e){}setPositionClasses(e=this.xPosition,t=this.yPosition){this._classList=Fe(V({},this._classList),{"mat-menu-before":e==="before","mat-menu-after":e==="after","mat-menu-above":t==="above","mat-menu-below":t==="below"}),this._changeDetectorRef.markForCheck()}_onAnimationDone(e){let t=e===Ls;(t||e===Hc)&&(t&&(clearTimeout(this._exitFallbackTimeout),this._exitFallbackTimeout=void 0),this._animationDone.next(t?"void":"enter"),this._isAnimating.set(!1))}_onAnimationStart(e){(e===Hc||e===Ls)&&this._isAnimating.set(!0)}_setIsOpen(e){if(this._panelAnimationState=e?"enter":"void",e){if(this._keyManager.activeItemIndex===0){let t=this._resolvePanel();t&&(t.scrollTop=0)}}else this._animationsDisabled||(this._exitFallbackTimeout=setTimeout(()=>this._onAnimationDone(Ls),200));this._animationsDisabled&&setTimeout(()=>{this._onAnimationDone(e?Hc:Ls)}),this._changeDetectorRef.markForCheck()}_updateDirectDescendants(){this._allItems.changes.pipe(Ee(this._allItems)).subscribe(e=>{this._directDescendantItems.reset(e.filter(t=>t._parentMenu===this)),this._directDescendantItems.notifyOnChanges()})}_resolvePanel(){let e=null;return this._directDescendantItems.length&&(e=this._directDescendantItems.first._getHostElement().closest('[role="menu"]')),e}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=R({type:i,selectors:[["mat-menu"]],contentQueries:function(t,n,a){if(t&1&&dt(a,T0,5)(a,mo,5)(a,mo,4),t&2){let r;N(r=L())&&(n.lazyContent=r.first),N(r=L())&&(n._allItems=r),N(r=L())&&(n.items=r)}},viewQuery:function(t,n){if(t&1&&Re(tt,5),t&2){let a;N(a=L())&&(n.templateRef=a.first)}},hostVars:3,hostBindings:function(t,n){t&2&&J("aria-label",null)("aria-labelledby",null)("aria-describedby",null)},inputs:{backdropClass:"backdropClass",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[0,"aria-describedby","ariaDescribedby"],xPosition:"xPosition",yPosition:"yPosition",overlapTrigger:[2,"overlapTrigger","overlapTrigger",z],hasBackdrop:[2,"hasBackdrop","hasBackdrop",e=>e==null?null:z(e)],panelClass:[0,"class","panelClass"],classList:"classList"},outputs:{closed:"closed",close:"close"},exportAs:["matMenu"],features:[le([{provide:Uc,useExisting:i}])],ngContentSelectors:M0,decls:1,vars:0,consts:[["tabindex","-1","role","menu",1,"mat-mdc-menu-panel",3,"click","animationstart","animationend","animationcancel","id"],[1,"mat-mdc-menu-content"]],template:function(t,n){t&1&&(ve(),Cr(0,E0,3,12,"ng-template"))},styles:[`mat-menu {
3355
3355
  display: none;
3356
3356
  }
3357
3357
 
@@ -3543,15 +3543,15 @@ input.mat-mdc-chip-input {
3543
3543
  position: absolute;
3544
3544
  pointer-events: none;
3545
3545
  }
3546
- `],encapsulation:2})}return i})(),A0=new k("mat-menu-scroll-strategy",{providedIn:"root",factory:()=>{let i=m(Z);return()=>Fi(i)}});var Yo=new WeakMap,I0=(()=>{class i{_canHaveBackdrop;_element=m(B);_viewContainerRef=m(it);_menuItemInstance=m(mo,{optional:!0,self:!0});_dir=m(Ze,{optional:!0});_focusMonitor=m(Xt);_ngZone=m($);_injector=m(Z);_scrollStrategy=m(A0);_changeDetectorRef=m(se);_animationsDisabled=ye();_portal;_overlayRef=null;_menuOpen=!1;_closingActionsSubscription=Te.EMPTY;_menuCloseSubscription=Te.EMPTY;_pendingRemoval;_parentMaterialMenu;_parentInnerPadding;_openedBy=void 0;get _menu(){return this._menuInternal}set _menu(e){e!==this._menuInternal&&(this._menuInternal=e,this._menuCloseSubscription.unsubscribe(),e?(this._parentMaterialMenu,this._menuCloseSubscription=e.close.subscribe(t=>{this._destroyMenu(t),(t==="click"||t==="tab")&&this._parentMaterialMenu&&this._parentMaterialMenu.closed.emit(t)})):this._destroyMenu(),this._menuItemInstance?._setTriggersSubmenu(this._triggersSubmenu()))}_menuInternal=null;constructor(e){this._canHaveBackdrop=e;let t=m(Uc,{optional:!0});this._parentMaterialMenu=t instanceof Ln?t:void 0}ngOnDestroy(){this._menu&&this._ownsMenu(this._menu)&&Yo.delete(this._menu),this._pendingRemoval?.unsubscribe(),this._menuCloseSubscription.unsubscribe(),this._closingActionsSubscription.unsubscribe(),this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=null)}get menuOpen(){return this._menuOpen}get dir(){return this._dir&&this._dir.value==="rtl"?"rtl":"ltr"}_triggersSubmenu(){return!!(this._menuItemInstance&&this._parentMaterialMenu&&this._menu)}_closeMenu(){this._menu?.close.emit()}_openMenu(e){if(this._triggerIsAriaDisabled())return;let t=this._menu;if(this._menuOpen||!t)return;this._pendingRemoval?.unsubscribe();let n=Yo.get(t);Yo.set(t,this),n&&n!==this&&n._closeMenu();let a=this._createOverlay(t),r=a.getConfig(),u=r.positionStrategy;this._setPosition(t,u),this._canHaveBackdrop?r.hasBackdrop=t.hasBackdrop==null?!this._triggersSubmenu():t.hasBackdrop:r.hasBackdrop=t.hasBackdrop??!1,a.hasAttached()||(a.attach(this._getPortal(t)),t.lazyContent?.attach(this.menuData)),this._closingActionsSubscription=this._menuClosingActions().subscribe(()=>this._closeMenu()),t.parentMenu=this._triggersSubmenu()?this._parentMaterialMenu:void 0,t.direction=this.dir,e&&t.focusFirstItem(this._openedBy||"program"),this._setIsMenuOpen(!0),t instanceof Ln&&(t._setIsOpen(!0),t._directDescendantItems.changes.pipe(ue(t.close)).subscribe(()=>{u.withLockedPosition(!1).reapplyLastPosition(),u.withLockedPosition(!0)}))}focus(e,t){this._focusMonitor&&e?this._focusMonitor.focusVia(this._element,e,t):this._element.nativeElement.focus(t)}_destroyMenu(e){let t=this._overlayRef,n=this._menu;!t||!this.menuOpen||(this._closingActionsSubscription.unsubscribe(),this._pendingRemoval?.unsubscribe(),n instanceof Ln&&this._ownsMenu(n)?(this._pendingRemoval=n._animationDone.pipe(pt(1)).subscribe(()=>{t.detach(),Yo.has(n)||n.lazyContent?.detach()}),n._setIsOpen(!1)):(t.detach(),n?.lazyContent?.detach()),n&&this._ownsMenu(n)&&Yo.delete(n),this.restoreFocus&&(e==="keydown"||!this._openedBy||!this._triggersSubmenu())&&this.focus(this._openedBy),this._openedBy=void 0,this._setIsMenuOpen(!1))}_setIsMenuOpen(e){e!==this._menuOpen&&(this._menuOpen=e,this._menuOpen?this.menuOpened.emit():this.menuClosed.emit(),this._triggersSubmenu()&&this._menuItemInstance._setHighlighted(e),this._changeDetectorRef.markForCheck())}_createOverlay(e){if(!this._overlayRef){let t=this._getOverlayConfig(e);this._subscribeToPositions(e,t.positionStrategy),this._overlayRef=ri(this._injector,t),this._overlayRef.keydownEvents().subscribe(n=>{this._menu instanceof Ln&&this._menu._handleKeydown(n)})}return this._overlayRef}_getOverlayConfig(e){return new ai({positionStrategy:hn(this._injector,this._getOverlayOrigin()).withLockedPosition().withGrowAfterOpen().withTransformOriginOn(".mat-menu-panel, .mat-mdc-menu-panel"),backdropClass:e.backdropClass||"cdk-overlay-transparent-backdrop",panelClass:e.overlayPanelClass,scrollStrategy:this._scrollStrategy(),direction:this._dir||"ltr",disableAnimations:this._animationsDisabled})}_subscribeToPositions(e,t){e.setPositionClasses&&t.positionChanges.subscribe(n=>{this._ngZone.run(()=>{let a=n.connectionPair.overlayX==="start"?"after":"before",r=n.connectionPair.overlayY==="top"?"below":"above";e.setPositionClasses(a,r)})})}_setPosition(e,t){let[n,a]=e.xPosition==="before"?["end","start"]:["start","end"],[r,u]=e.yPosition==="above"?["bottom","top"]:["top","bottom"],[h,f]=[r,u],[b,M]=[n,a],j=0;if(this._triggersSubmenu()){if(M=n=e.xPosition==="before"?"start":"end",a=b=n==="end"?"start":"end",this._parentMaterialMenu){if(this._parentInnerPadding==null){let G=this._parentMaterialMenu.items.first;this._parentInnerPadding=G?G._getHostElement().offsetTop:0}j=r==="bottom"?this._parentInnerPadding:-this._parentInnerPadding}}else e.overlapTrigger||(h=r==="top"?"bottom":"top",f=u==="top"?"bottom":"top");t.withPositions([{originX:n,originY:h,overlayX:b,overlayY:r,offsetY:j},{originX:a,originY:h,overlayX:M,overlayY:r,offsetY:j},{originX:n,originY:f,overlayX:b,overlayY:u,offsetY:-j},{originX:a,originY:f,overlayX:M,overlayY:u,offsetY:-j}])}_menuClosingActions(){let e=this._getOutsideClickStream(this._overlayRef),t=this._overlayRef.detachments(),n=this._parentMaterialMenu?this._parentMaterialMenu.closed:ge(),a=this._parentMaterialMenu?this._parentMaterialMenu._hovered().pipe(ke(r=>this._menuOpen&&r!==this._menuItemInstance)):ge();return Xe(e,n,a,t)}_getPortal(e){return(!this._portal||this._portal.templateRef!==e.templateRef)&&(this._portal=new Gt(e.templateRef,this._viewContainerRef)),this._portal}_ownsMenu(e){return Yo.get(e)===this}_triggerIsAriaDisabled(){return z(this._element.nativeElement.getAttribute("aria-disabled"))}static \u0275fac=function(t){br()};static \u0275dir=T({type:i})}return i})(),Vs=(()=>{class i extends I0{_cleanupTouchstart;_hoverSubscription=Te.EMPTY;get _deprecatedMatMenuTriggerFor(){return this.menu}set _deprecatedMatMenuTriggerFor(e){this.menu=e}get menu(){return this._menu}set menu(e){this._menu=e}menuData;restoreFocus=!0;menuOpened=new X;onMenuOpen=this.menuOpened;menuClosed=new X;onMenuClose=this.menuClosed;constructor(){super(!0);let e=m(we);this._cleanupTouchstart=e.listen(this._element.nativeElement,"touchstart",t=>{Jn(t)||(this._openedBy="touch")},{passive:!0})}triggersSubmenu(){return super._triggersSubmenu()}toggleMenu(){return this.menuOpen?this.closeMenu():this.openMenu()}openMenu(){this._openMenu(!0)}closeMenu(){this._closeMenu()}updatePosition(){this._overlayRef?.updatePosition()}ngAfterContentInit(){this._handleHover()}ngOnDestroy(){super.ngOnDestroy(),this._cleanupTouchstart(),this._hoverSubscription.unsubscribe()}_getOverlayOrigin(){return this._element}_getOutsideClickStream(e){return e.backdropClick()}_handleMousedown(e){Qn(e)||(this._openedBy=e.button===0?"mouse":void 0,this.triggersSubmenu()&&e.preventDefault())}_handleKeydown(e){let t=e.keyCode;(t===13||t===32)&&(this._openedBy="keyboard"),this.triggersSubmenu()&&(t===39&&this.dir==="ltr"||t===37&&this.dir==="rtl")&&(this._openedBy="keyboard",this.openMenu())}_handleClick(e){this.triggersSubmenu()?(e.stopPropagation(),this.openMenu()):this.toggleMenu()}_handleHover(){this.triggersSubmenu()&&this._parentMaterialMenu&&(this._hoverSubscription=this._parentMaterialMenu._hovered().subscribe(e=>{e===this._menuItemInstance&&!e.disabled&&this._parentMaterialMenu?._panelAnimationState!=="void"&&(this._openedBy="mouse",this._openMenu(!1))}))}static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,selectors:[["","mat-menu-trigger-for",""],["","matMenuTriggerFor",""]],hostAttrs:[1,"mat-mdc-menu-trigger"],hostVars:3,hostBindings:function(t,n){t&1&&S("click",function(r){return n._handleClick(r)})("mousedown",function(r){return n._handleMousedown(r)})("keydown",function(r){return n._handleKeydown(r)}),t&2&&J("aria-haspopup",n.menu?"menu":null)("aria-expanded",n.menuOpen)("aria-controls",n.menuOpen?n.menu?.panelId:null)},inputs:{_deprecatedMatMenuTriggerFor:[0,"mat-menu-trigger-for","_deprecatedMatMenuTriggerFor"],menu:[0,"matMenuTriggerFor","menu"],menuData:[0,"matMenuTriggerData","menuData"],restoreFocus:[0,"matMenuTriggerRestoreFocus","restoreFocus"]},outputs:{menuOpened:"menuOpened",onMenuOpen:"onMenuOpen",menuClosed:"menuClosed",onMenuClose:"onMenuClose"},exportAs:["matMenuTrigger"],features:[ie]})}return i})();var Bs=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=U({type:i});static \u0275inj=H({imports:[Ki,Qt,ce,Ri]})}return i})();function R0(i,o){if(i&1){let e=_e();s(0,"div",1)(1,"button",2),S("click",function(){ne(e);let n=v();return oe(n.action())}),d(2),l()()}if(i&2){let e=v();c(2),Q(" ",e.data.action," ")}}var P0=["label"];function O0(i,o){}var F0=Math.pow(2,31)-1,nr=class{_overlayRef;instance;containerInstance;_afterDismissed=new O;_afterOpened=new O;_onAction=new O;_durationTimeoutId;_dismissedByAction=!1;constructor(o,e){this._overlayRef=e,this.containerInstance=o,o._onExit.subscribe(()=>this._finishDismiss())}dismiss(){this._afterDismissed.closed||this.containerInstance.exit(),clearTimeout(this._durationTimeoutId)}dismissWithAction(){this._onAction.closed||(this._dismissedByAction=!0,this._onAction.next(),this._onAction.complete(),this.dismiss()),clearTimeout(this._durationTimeoutId)}closeWithAction(){this.dismissWithAction()}_dismissAfter(o){this._durationTimeoutId=setTimeout(()=>this.dismiss(),Math.min(o,F0))}_open(){this._afterOpened.closed||(this._afterOpened.next(),this._afterOpened.complete())}_finishDismiss(){this._overlayRef.dispose(),this._onAction.closed||this._onAction.complete(),this._afterDismissed.next({dismissedByAction:this._dismissedByAction}),this._afterDismissed.complete(),this._dismissedByAction=!1}afterDismissed(){return this._afterDismissed}afterOpened(){return this.containerInstance._onEnter}onAction(){return this._onAction}},gp=new k("MatSnackBarData"),Zo=class{politeness="polite";announcementMessage="";viewContainerRef;duration=0;panelClass;direction;data=null;horizontalPosition="center";verticalPosition="bottom"},N0=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,selectors:[["","matSnackBarLabel",""]],hostAttrs:[1,"mat-mdc-snack-bar-label","mdc-snackbar__label"]})}return i})(),L0=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,selectors:[["","matSnackBarActions",""]],hostAttrs:[1,"mat-mdc-snack-bar-actions","mdc-snackbar__actions"]})}return i})(),V0=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,selectors:[["","matSnackBarAction",""]],hostAttrs:[1,"mat-mdc-snack-bar-action","mdc-snackbar__action"]})}return i})(),B0=(()=>{class i{snackBarRef=m(nr);data=m(gp);action(){this.snackBarRef.dismissWithAction()}get hasAction(){return!!this.data.action}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=R({type:i,selectors:[["simple-snack-bar"]],hostAttrs:[1,"mat-mdc-simple-snack-bar"],exportAs:["matSnackBar"],decls:3,vars:2,consts:[["matSnackBarLabel",""],["matSnackBarActions",""],["matButton","","matSnackBarAction","",3,"click"]],template:function(t,n){t&1&&(s(0,"div",0),d(1),l(),w(2,R0,3,1,"div",1)),t&2&&(c(),Q(" ",n.data.message,`
3547
- `),c(),D(n.hasAction?2:-1))},dependencies:[Ue,N0,L0,V0],styles:[`.mat-mdc-simple-snack-bar {
3546
+ `],encapsulation:2})}return i})(),I0=new k("mat-menu-scroll-strategy",{providedIn:"root",factory:()=>{let i=m(Z);return()=>Fi(i)}});var Yo=new WeakMap,R0=(()=>{class i{_canHaveBackdrop;_element=m(B);_viewContainerRef=m(it);_menuItemInstance=m(mo,{optional:!0,self:!0});_dir=m(Ze,{optional:!0});_focusMonitor=m(Yt);_ngZone=m($);_injector=m(Z);_scrollStrategy=m(I0);_changeDetectorRef=m(se);_animationsDisabled=ye();_portal;_overlayRef=null;_menuOpen=!1;_closingActionsSubscription=Te.EMPTY;_menuCloseSubscription=Te.EMPTY;_pendingRemoval;_parentMaterialMenu;_parentInnerPadding;_openedBy=void 0;get _menu(){return this._menuInternal}set _menu(e){e!==this._menuInternal&&(this._menuInternal=e,this._menuCloseSubscription.unsubscribe(),e?(this._parentMaterialMenu,this._menuCloseSubscription=e.close.subscribe(t=>{this._destroyMenu(t),(t==="click"||t==="tab")&&this._parentMaterialMenu&&this._parentMaterialMenu.closed.emit(t)})):this._destroyMenu(),this._menuItemInstance?._setTriggersSubmenu(this._triggersSubmenu()))}_menuInternal=null;constructor(e){this._canHaveBackdrop=e;let t=m(Uc,{optional:!0});this._parentMaterialMenu=t instanceof Ln?t:void 0}ngOnDestroy(){this._menu&&this._ownsMenu(this._menu)&&Yo.delete(this._menu),this._pendingRemoval?.unsubscribe(),this._menuCloseSubscription.unsubscribe(),this._closingActionsSubscription.unsubscribe(),this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=null)}get menuOpen(){return this._menuOpen}get dir(){return this._dir&&this._dir.value==="rtl"?"rtl":"ltr"}_triggersSubmenu(){return!!(this._menuItemInstance&&this._parentMaterialMenu&&this._menu)}_closeMenu(){this._menu?.close.emit()}_openMenu(e){if(this._triggerIsAriaDisabled())return;let t=this._menu;if(this._menuOpen||!t)return;this._pendingRemoval?.unsubscribe();let n=Yo.get(t);Yo.set(t,this),n&&n!==this&&n._closeMenu();let a=this._createOverlay(t),r=a.getConfig(),u=r.positionStrategy;this._setPosition(t,u),this._canHaveBackdrop?r.hasBackdrop=t.hasBackdrop==null?!this._triggersSubmenu():t.hasBackdrop:r.hasBackdrop=t.hasBackdrop??!1,a.hasAttached()||(a.attach(this._getPortal(t)),t.lazyContent?.attach(this.menuData)),this._closingActionsSubscription=this._menuClosingActions().subscribe(()=>this._closeMenu()),t.parentMenu=this._triggersSubmenu()?this._parentMaterialMenu:void 0,t.direction=this.dir,e&&t.focusFirstItem(this._openedBy||"program"),this._setIsMenuOpen(!0),t instanceof Ln&&(t._setIsOpen(!0),t._directDescendantItems.changes.pipe(ue(t.close)).subscribe(()=>{u.withLockedPosition(!1).reapplyLastPosition(),u.withLockedPosition(!0)}))}focus(e,t){this._focusMonitor&&e?this._focusMonitor.focusVia(this._element,e,t):this._element.nativeElement.focus(t)}_destroyMenu(e){let t=this._overlayRef,n=this._menu;!t||!this.menuOpen||(this._closingActionsSubscription.unsubscribe(),this._pendingRemoval?.unsubscribe(),n instanceof Ln&&this._ownsMenu(n)?(this._pendingRemoval=n._animationDone.pipe(pt(1)).subscribe(()=>{t.detach(),Yo.has(n)||n.lazyContent?.detach()}),n._setIsOpen(!1)):(t.detach(),n?.lazyContent?.detach()),n&&this._ownsMenu(n)&&Yo.delete(n),this.restoreFocus&&(e==="keydown"||!this._openedBy||!this._triggersSubmenu())&&this.focus(this._openedBy),this._openedBy=void 0,this._setIsMenuOpen(!1))}_setIsMenuOpen(e){e!==this._menuOpen&&(this._menuOpen=e,this._menuOpen?this.menuOpened.emit():this.menuClosed.emit(),this._triggersSubmenu()&&this._menuItemInstance._setHighlighted(e),this._changeDetectorRef.markForCheck())}_createOverlay(e){if(!this._overlayRef){let t=this._getOverlayConfig(e);this._subscribeToPositions(e,t.positionStrategy),this._overlayRef=ri(this._injector,t),this._overlayRef.keydownEvents().subscribe(n=>{this._menu instanceof Ln&&this._menu._handleKeydown(n)})}return this._overlayRef}_getOverlayConfig(e){return new ai({positionStrategy:hn(this._injector,this._getOverlayOrigin()).withLockedPosition().withGrowAfterOpen().withTransformOriginOn(".mat-menu-panel, .mat-mdc-menu-panel"),backdropClass:e.backdropClass||"cdk-overlay-transparent-backdrop",panelClass:e.overlayPanelClass,scrollStrategy:this._scrollStrategy(),direction:this._dir||"ltr",disableAnimations:this._animationsDisabled})}_subscribeToPositions(e,t){e.setPositionClasses&&t.positionChanges.subscribe(n=>{this._ngZone.run(()=>{let a=n.connectionPair.overlayX==="start"?"after":"before",r=n.connectionPair.overlayY==="top"?"below":"above";e.setPositionClasses(a,r)})})}_setPosition(e,t){let[n,a]=e.xPosition==="before"?["end","start"]:["start","end"],[r,u]=e.yPosition==="above"?["bottom","top"]:["top","bottom"],[h,f]=[r,u],[b,M]=[n,a],j=0;if(this._triggersSubmenu()){if(M=n=e.xPosition==="before"?"start":"end",a=b=n==="end"?"start":"end",this._parentMaterialMenu){if(this._parentInnerPadding==null){let G=this._parentMaterialMenu.items.first;this._parentInnerPadding=G?G._getHostElement().offsetTop:0}j=r==="bottom"?this._parentInnerPadding:-this._parentInnerPadding}}else e.overlapTrigger||(h=r==="top"?"bottom":"top",f=u==="top"?"bottom":"top");t.withPositions([{originX:n,originY:h,overlayX:b,overlayY:r,offsetY:j},{originX:a,originY:h,overlayX:M,overlayY:r,offsetY:j},{originX:n,originY:f,overlayX:b,overlayY:u,offsetY:-j},{originX:a,originY:f,overlayX:M,overlayY:u,offsetY:-j}])}_menuClosingActions(){let e=this._getOutsideClickStream(this._overlayRef),t=this._overlayRef.detachments(),n=this._parentMaterialMenu?this._parentMaterialMenu.closed:ge(),a=this._parentMaterialMenu?this._parentMaterialMenu._hovered().pipe(ke(r=>this._menuOpen&&r!==this._menuItemInstance)):ge();return Xe(e,n,a,t)}_getPortal(e){return(!this._portal||this._portal.templateRef!==e.templateRef)&&(this._portal=new Wt(e.templateRef,this._viewContainerRef)),this._portal}_ownsMenu(e){return Yo.get(e)===this}_triggerIsAriaDisabled(){return z(this._element.nativeElement.getAttribute("aria-disabled"))}static \u0275fac=function(t){br()};static \u0275dir=T({type:i})}return i})(),Vs=(()=>{class i extends R0{_cleanupTouchstart;_hoverSubscription=Te.EMPTY;get _deprecatedMatMenuTriggerFor(){return this.menu}set _deprecatedMatMenuTriggerFor(e){this.menu=e}get menu(){return this._menu}set menu(e){this._menu=e}menuData;restoreFocus=!0;menuOpened=new X;onMenuOpen=this.menuOpened;menuClosed=new X;onMenuClose=this.menuClosed;constructor(){super(!0);let e=m(we);this._cleanupTouchstart=e.listen(this._element.nativeElement,"touchstart",t=>{Jn(t)||(this._openedBy="touch")},{passive:!0})}triggersSubmenu(){return super._triggersSubmenu()}toggleMenu(){return this.menuOpen?this.closeMenu():this.openMenu()}openMenu(){this._openMenu(!0)}closeMenu(){this._closeMenu()}updatePosition(){this._overlayRef?.updatePosition()}ngAfterContentInit(){this._handleHover()}ngOnDestroy(){super.ngOnDestroy(),this._cleanupTouchstart(),this._hoverSubscription.unsubscribe()}_getOverlayOrigin(){return this._element}_getOutsideClickStream(e){return e.backdropClick()}_handleMousedown(e){Qn(e)||(this._openedBy=e.button===0?"mouse":void 0,this.triggersSubmenu()&&e.preventDefault())}_handleKeydown(e){let t=e.keyCode;(t===13||t===32)&&(this._openedBy="keyboard"),this.triggersSubmenu()&&(t===39&&this.dir==="ltr"||t===37&&this.dir==="rtl")&&(this._openedBy="keyboard",this.openMenu())}_handleClick(e){this.triggersSubmenu()?(e.stopPropagation(),this.openMenu()):this.toggleMenu()}_handleHover(){this.triggersSubmenu()&&this._parentMaterialMenu&&(this._hoverSubscription=this._parentMaterialMenu._hovered().subscribe(e=>{e===this._menuItemInstance&&!e.disabled&&this._parentMaterialMenu?._panelAnimationState!=="void"&&(this._openedBy="mouse",this._openMenu(!1))}))}static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,selectors:[["","mat-menu-trigger-for",""],["","matMenuTriggerFor",""]],hostAttrs:[1,"mat-mdc-menu-trigger"],hostVars:3,hostBindings:function(t,n){t&1&&S("click",function(r){return n._handleClick(r)})("mousedown",function(r){return n._handleMousedown(r)})("keydown",function(r){return n._handleKeydown(r)}),t&2&&J("aria-haspopup",n.menu?"menu":null)("aria-expanded",n.menuOpen)("aria-controls",n.menuOpen?n.menu?.panelId:null)},inputs:{_deprecatedMatMenuTriggerFor:[0,"mat-menu-trigger-for","_deprecatedMatMenuTriggerFor"],menu:[0,"matMenuTriggerFor","menu"],menuData:[0,"matMenuTriggerData","menuData"],restoreFocus:[0,"matMenuTriggerRestoreFocus","restoreFocus"]},outputs:{menuOpened:"menuOpened",onMenuOpen:"onMenuOpen",menuClosed:"menuClosed",onMenuClose:"onMenuClose"},exportAs:["matMenuTrigger"],features:[ie]})}return i})();var Bs=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=U({type:i});static \u0275inj=H({imports:[Ki,Jt,ce,Ri]})}return i})();function P0(i,o){if(i&1){let e=_e();s(0,"div",1)(1,"button",2),S("click",function(){ne(e);let n=v();return oe(n.action())}),d(2),l()()}if(i&2){let e=v();c(2),Q(" ",e.data.action," ")}}var O0=["label"];function F0(i,o){}var N0=Math.pow(2,31)-1,nr=class{_overlayRef;instance;containerInstance;_afterDismissed=new O;_afterOpened=new O;_onAction=new O;_durationTimeoutId;_dismissedByAction=!1;constructor(o,e){this._overlayRef=e,this.containerInstance=o,o._onExit.subscribe(()=>this._finishDismiss())}dismiss(){this._afterDismissed.closed||this.containerInstance.exit(),clearTimeout(this._durationTimeoutId)}dismissWithAction(){this._onAction.closed||(this._dismissedByAction=!0,this._onAction.next(),this._onAction.complete(),this.dismiss()),clearTimeout(this._durationTimeoutId)}closeWithAction(){this.dismissWithAction()}_dismissAfter(o){this._durationTimeoutId=setTimeout(()=>this.dismiss(),Math.min(o,N0))}_open(){this._afterOpened.closed||(this._afterOpened.next(),this._afterOpened.complete())}_finishDismiss(){this._overlayRef.dispose(),this._onAction.closed||this._onAction.complete(),this._afterDismissed.next({dismissedByAction:this._dismissedByAction}),this._afterDismissed.complete(),this._dismissedByAction=!1}afterDismissed(){return this._afterDismissed}afterOpened(){return this.containerInstance._onEnter}onAction(){return this._onAction}},gp=new k("MatSnackBarData"),Zo=class{politeness="polite";announcementMessage="";viewContainerRef;duration=0;panelClass;direction;data=null;horizontalPosition="center";verticalPosition="bottom"},L0=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,selectors:[["","matSnackBarLabel",""]],hostAttrs:[1,"mat-mdc-snack-bar-label","mdc-snackbar__label"]})}return i})(),V0=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,selectors:[["","matSnackBarActions",""]],hostAttrs:[1,"mat-mdc-snack-bar-actions","mdc-snackbar__actions"]})}return i})(),B0=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,selectors:[["","matSnackBarAction",""]],hostAttrs:[1,"mat-mdc-snack-bar-action","mdc-snackbar__action"]})}return i})(),z0=(()=>{class i{snackBarRef=m(nr);data=m(gp);action(){this.snackBarRef.dismissWithAction()}get hasAction(){return!!this.data.action}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=R({type:i,selectors:[["simple-snack-bar"]],hostAttrs:[1,"mat-mdc-simple-snack-bar"],exportAs:["matSnackBar"],decls:3,vars:2,consts:[["matSnackBarLabel",""],["matSnackBarActions",""],["matButton","","matSnackBarAction","",3,"click"]],template:function(t,n){t&1&&(s(0,"div",0),d(1),l(),w(2,P0,3,1,"div",1)),t&2&&(c(),Q(" ",n.data.message,`
3547
+ `),c(),D(n.hasAction?2:-1))},dependencies:[Ue,L0,V0,B0],styles:[`.mat-mdc-simple-snack-bar {
3548
3548
  display: flex;
3549
3549
  }
3550
3550
  .mat-mdc-simple-snack-bar .mat-mdc-snack-bar-label {
3551
3551
  max-height: 50vh;
3552
3552
  overflow: auto;
3553
3553
  }
3554
- `],encapsulation:2})}return i})(),$c="_mat-snack-bar-enter",Gc="_mat-snack-bar-exit",z0=(()=>{class i extends Pn{_ngZone=m($);_elementRef=m(B);_changeDetectorRef=m(se);_platform=m(fe);_animationsDisabled=ye();snackBarConfig=m(Zo);_document=m(K);_trackedModals=new Set;_enterFallback;_exitFallback;_injector=m(Z);_announceDelay=150;_announceTimeoutId;_destroyed=!1;_portalOutlet;_onAnnounce=new O;_onExit=new O;_onEnter=new O;_animationState="void";_live;_label;_role;_liveElementId=m(De).getId("mat-snack-bar-container-live-");constructor(){super();let e=this.snackBarConfig;e.politeness==="assertive"&&!e.announcementMessage?this._live="assertive":e.politeness==="off"?this._live="off":this._live="polite",this._platform.FIREFOX&&(this._live==="polite"&&(this._role="status"),this._live==="assertive"&&(this._role="alert"))}attachComponentPortal(e){this._assertNotAttached();let t=this._portalOutlet.attachComponentPortal(e);return this._afterPortalAttached(),t}attachTemplatePortal(e){this._assertNotAttached();let t=this._portalOutlet.attachTemplatePortal(e);return this._afterPortalAttached(),t}attachDomPortal=e=>{this._assertNotAttached();let t=this._portalOutlet.attachDomPortal(e);return this._afterPortalAttached(),t};onAnimationEnd(e){e===Gc?this._completeExit():e===$c&&(clearTimeout(this._enterFallback),this._ngZone.run(()=>{this._onEnter.next(),this._onEnter.complete()}))}enter(){this._destroyed||(this._animationState="visible",this._changeDetectorRef.markForCheck(),this._changeDetectorRef.detectChanges(),this._screenReaderAnnounce(),this._animationsDisabled?Ge(()=>{this._ngZone.run(()=>queueMicrotask(()=>this.onAnimationEnd($c)))},{injector:this._injector}):(clearTimeout(this._enterFallback),this._enterFallback=setTimeout(()=>{this._elementRef.nativeElement.classList.add("mat-snack-bar-fallback-visible"),this.onAnimationEnd($c)},200)))}exit(){return this._destroyed?ge(void 0):(this._ngZone.run(()=>{this._animationState="hidden",this._changeDetectorRef.markForCheck(),this._elementRef.nativeElement.setAttribute("mat-exit",""),clearTimeout(this._announceTimeoutId),this._animationsDisabled?Ge(()=>{this._ngZone.run(()=>queueMicrotask(()=>this.onAnimationEnd(Gc)))},{injector:this._injector}):(clearTimeout(this._exitFallback),this._exitFallback=setTimeout(()=>this.onAnimationEnd(Gc),200))}),this._onExit)}ngOnDestroy(){this._destroyed=!0,this._clearFromModals(),this._completeExit()}_completeExit(){clearTimeout(this._exitFallback),queueMicrotask(()=>{this._onExit.next(),this._onExit.complete()})}_afterPortalAttached(){let e=this._elementRef.nativeElement,t=this.snackBarConfig.panelClass;t&&(Array.isArray(t)?t.forEach(r=>e.classList.add(r)):e.classList.add(t)),this._exposeToModals();let n=this._label.nativeElement,a="mdc-snackbar__label";n.classList.toggle(a,!n.querySelector(`.${a}`))}_exposeToModals(){let e=this._liveElementId,t=this._document.querySelectorAll('body > .cdk-overlay-container [aria-modal="true"]');for(let n=0;n<t.length;n++){let a=t[n],r=a.getAttribute("aria-owns");this._trackedModals.add(a),r?r.indexOf(e)===-1&&a.setAttribute("aria-owns",r+" "+e):a.setAttribute("aria-owns",e)}}_clearFromModals(){this._trackedModals.forEach(e=>{let t=e.getAttribute("aria-owns");if(t){let n=t.replace(this._liveElementId,"").trim();n.length>0?e.setAttribute("aria-owns",n):e.removeAttribute("aria-owns")}}),this._trackedModals.clear()}_assertNotAttached(){this._portalOutlet.hasAttached()}_screenReaderAnnounce(){this._announceTimeoutId||this._ngZone.runOutsideAngular(()=>{this._announceTimeoutId=setTimeout(()=>{if(this._destroyed)return;let e=this._elementRef.nativeElement,t=e.querySelector("[aria-hidden]"),n=e.querySelector("[aria-live]");if(t&&n){let a=null;this._platform.isBrowser&&document.activeElement instanceof HTMLElement&&t.contains(document.activeElement)&&(a=document.activeElement),t.removeAttribute("aria-hidden"),n.appendChild(t),a?.focus(),this._onAnnounce.next(),this._onAnnounce.complete()}},this._announceDelay)})}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=R({type:i,selectors:[["mat-snack-bar-container"]],viewQuery:function(t,n){if(t&1&&Re(Xi,7)(P0,7),t&2){let a;N(a=L())&&(n._portalOutlet=a.first),N(a=L())&&(n._label=a.first)}},hostAttrs:[1,"mdc-snackbar","mat-mdc-snack-bar-container"],hostVars:6,hostBindings:function(t,n){t&1&&S("animationend",function(r){return n.onAnimationEnd(r.animationName)})("animationcancel",function(r){return n.onAnimationEnd(r.animationName)}),t&2&&p("mat-snack-bar-container-enter",n._animationState==="visible")("mat-snack-bar-container-exit",n._animationState==="hidden")("mat-snack-bar-container-animations-enabled",!n._animationsDisabled)},features:[ie],decls:6,vars:3,consts:[["label",""],[1,"mdc-snackbar__surface","mat-mdc-snackbar-surface"],[1,"mat-mdc-snack-bar-label"],["aria-hidden","true"],["cdkPortalOutlet",""]],template:function(t,n){t&1&&(s(0,"div",1)(1,"div",2,0)(3,"div",3),We(4,O0,0,0,"ng-template",4),l(),_(5,"div"),l()()),t&2&&(c(5),J("aria-live",n._live)("role",n._role)("id",n._liveElementId))},dependencies:[Xi],styles:[`@keyframes _mat-snack-bar-enter {
3554
+ `],encapsulation:2})}return i})(),$c="_mat-snack-bar-enter",Gc="_mat-snack-bar-exit",j0=(()=>{class i extends Pn{_ngZone=m($);_elementRef=m(B);_changeDetectorRef=m(se);_platform=m(fe);_animationsDisabled=ye();snackBarConfig=m(Zo);_document=m(K);_trackedModals=new Set;_enterFallback;_exitFallback;_injector=m(Z);_announceDelay=150;_announceTimeoutId;_destroyed=!1;_portalOutlet;_onAnnounce=new O;_onExit=new O;_onEnter=new O;_animationState="void";_live;_label;_role;_liveElementId=m(De).getId("mat-snack-bar-container-live-");constructor(){super();let e=this.snackBarConfig;e.politeness==="assertive"&&!e.announcementMessage?this._live="assertive":e.politeness==="off"?this._live="off":this._live="polite",this._platform.FIREFOX&&(this._live==="polite"&&(this._role="status"),this._live==="assertive"&&(this._role="alert"))}attachComponentPortal(e){this._assertNotAttached();let t=this._portalOutlet.attachComponentPortal(e);return this._afterPortalAttached(),t}attachTemplatePortal(e){this._assertNotAttached();let t=this._portalOutlet.attachTemplatePortal(e);return this._afterPortalAttached(),t}attachDomPortal=e=>{this._assertNotAttached();let t=this._portalOutlet.attachDomPortal(e);return this._afterPortalAttached(),t};onAnimationEnd(e){e===Gc?this._completeExit():e===$c&&(clearTimeout(this._enterFallback),this._ngZone.run(()=>{this._onEnter.next(),this._onEnter.complete()}))}enter(){this._destroyed||(this._animationState="visible",this._changeDetectorRef.markForCheck(),this._changeDetectorRef.detectChanges(),this._screenReaderAnnounce(),this._animationsDisabled?Ge(()=>{this._ngZone.run(()=>queueMicrotask(()=>this.onAnimationEnd($c)))},{injector:this._injector}):(clearTimeout(this._enterFallback),this._enterFallback=setTimeout(()=>{this._elementRef.nativeElement.classList.add("mat-snack-bar-fallback-visible"),this.onAnimationEnd($c)},200)))}exit(){return this._destroyed?ge(void 0):(this._ngZone.run(()=>{this._animationState="hidden",this._changeDetectorRef.markForCheck(),this._elementRef.nativeElement.setAttribute("mat-exit",""),clearTimeout(this._announceTimeoutId),this._animationsDisabled?Ge(()=>{this._ngZone.run(()=>queueMicrotask(()=>this.onAnimationEnd(Gc)))},{injector:this._injector}):(clearTimeout(this._exitFallback),this._exitFallback=setTimeout(()=>this.onAnimationEnd(Gc),200))}),this._onExit)}ngOnDestroy(){this._destroyed=!0,this._clearFromModals(),this._completeExit()}_completeExit(){clearTimeout(this._exitFallback),queueMicrotask(()=>{this._onExit.next(),this._onExit.complete()})}_afterPortalAttached(){let e=this._elementRef.nativeElement,t=this.snackBarConfig.panelClass;t&&(Array.isArray(t)?t.forEach(r=>e.classList.add(r)):e.classList.add(t)),this._exposeToModals();let n=this._label.nativeElement,a="mdc-snackbar__label";n.classList.toggle(a,!n.querySelector(`.${a}`))}_exposeToModals(){let e=this._liveElementId,t=this._document.querySelectorAll('body > .cdk-overlay-container [aria-modal="true"]');for(let n=0;n<t.length;n++){let a=t[n],r=a.getAttribute("aria-owns");this._trackedModals.add(a),r?r.indexOf(e)===-1&&a.setAttribute("aria-owns",r+" "+e):a.setAttribute("aria-owns",e)}}_clearFromModals(){this._trackedModals.forEach(e=>{let t=e.getAttribute("aria-owns");if(t){let n=t.replace(this._liveElementId,"").trim();n.length>0?e.setAttribute("aria-owns",n):e.removeAttribute("aria-owns")}}),this._trackedModals.clear()}_assertNotAttached(){this._portalOutlet.hasAttached()}_screenReaderAnnounce(){this._announceTimeoutId||this._ngZone.runOutsideAngular(()=>{this._announceTimeoutId=setTimeout(()=>{if(this._destroyed)return;let e=this._elementRef.nativeElement,t=e.querySelector("[aria-hidden]"),n=e.querySelector("[aria-live]");if(t&&n){let a=null;this._platform.isBrowser&&document.activeElement instanceof HTMLElement&&t.contains(document.activeElement)&&(a=document.activeElement),t.removeAttribute("aria-hidden"),n.appendChild(t),a?.focus(),this._onAnnounce.next(),this._onAnnounce.complete()}},this._announceDelay)})}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=R({type:i,selectors:[["mat-snack-bar-container"]],viewQuery:function(t,n){if(t&1&&Re(Xi,7)(O0,7),t&2){let a;N(a=L())&&(n._portalOutlet=a.first),N(a=L())&&(n._label=a.first)}},hostAttrs:[1,"mdc-snackbar","mat-mdc-snack-bar-container"],hostVars:6,hostBindings:function(t,n){t&1&&S("animationend",function(r){return n.onAnimationEnd(r.animationName)})("animationcancel",function(r){return n.onAnimationEnd(r.animationName)}),t&2&&p("mat-snack-bar-container-enter",n._animationState==="visible")("mat-snack-bar-container-exit",n._animationState==="hidden")("mat-snack-bar-container-animations-enabled",!n._animationsDisabled)},features:[ie],decls:6,vars:3,consts:[["label",""],[1,"mdc-snackbar__surface","mat-mdc-snackbar-surface"],[1,"mat-mdc-snack-bar-label"],["aria-hidden","true"],["cdkPortalOutlet",""]],template:function(t,n){t&1&&(s(0,"div",1)(1,"div",2,0)(3,"div",3),We(4,F0,0,0,"ng-template",4),l(),_(5,"div"),l()()),t&2&&(c(5),J("aria-live",n._live)("role",n._role)("id",n._liveElementId))},dependencies:[Xi],styles:[`@keyframes _mat-snack-bar-enter {
3555
3555
  from {
3556
3556
  transform: scale(0.8);
3557
3557
  opacity: 0;
@@ -3667,7 +3667,7 @@ input.mat-mdc-chip-input {
3667
3667
  .mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled) .mat-ripple-element {
3668
3668
  opacity: 0.1;
3669
3669
  }
3670
- `],encapsulation:2,changeDetection:1})}return i})(),j0=new k("mat-snack-bar-default-options",{providedIn:"root",factory:()=>new Zo}),zs=(()=>{class i{_live=m(Ta);_injector=m(Z);_breakpointObserver=m(Yn);_parentSnackBar=m(i,{optional:!0,skipSelf:!0});_defaultConfig=m(j0);_animationsDisabled=ye();_snackBarRefAtThisLevel=null;simpleSnackBarComponent=B0;snackBarContainerComponent=z0;handsetCssClass="mat-mdc-snack-bar-handset";get _openedSnackBarRef(){let e=this._parentSnackBar;return e?e._openedSnackBarRef:this._snackBarRefAtThisLevel}set _openedSnackBarRef(e){this._parentSnackBar?this._parentSnackBar._openedSnackBarRef=e:this._snackBarRefAtThisLevel=e}openFromComponent(e,t){return this._attach(e,t)}openFromTemplate(e,t){return this._attach(e,t)}open(e,t="",n){let a=V(V({},this._defaultConfig),n);return a.data={message:e,action:t},a.announcementMessage===e&&(a.announcementMessage=void 0),this.openFromComponent(this.simpleSnackBarComponent,a)}dismiss(){this._openedSnackBarRef&&this._openedSnackBarRef.dismiss()}ngOnDestroy(){this._snackBarRefAtThisLevel&&this._snackBarRefAtThisLevel.dismiss()}_attachSnackBarContainer(e,t){let n=t&&t.viewContainerRef&&t.viewContainerRef.injector,a=Z.create({parent:n||this._injector,providers:[{provide:Zo,useValue:t}]}),r=new Oi(this.snackBarContainerComponent,t.viewContainerRef,a),u=e.attach(r);return u.instance.snackBarConfig=t,u.instance}_attach(e,t){let n=V(V(V({},new Zo),this._defaultConfig),t),a=this._createOverlay(n),r=this._attachSnackBarContainer(a,n),u=new nr(r,a);if(e instanceof tt){let h=new Gt(e,null,{$implicit:n.data,snackBarRef:u});u.instance=r.attachTemplatePortal(h)}else{let h=this._createInjector(n,u),f=new Oi(e,void 0,h),b=r.attachComponentPortal(f);u.instance=b.instance}return this._breakpointObserver.observe(Kr.HandsetPortrait).pipe(ue(a.detachments())).subscribe(h=>{a.overlayElement.classList.toggle(this.handsetCssClass,h.matches)}),n.announcementMessage&&r._onAnnounce.subscribe(()=>{this._live.announce(n.announcementMessage,n.politeness)}),this._animateSnackBar(u,n),this._openedSnackBarRef=u,this._openedSnackBarRef}_animateSnackBar(e,t){e.afterDismissed().subscribe(()=>{this._openedSnackBarRef==e&&(this._openedSnackBarRef=null),t.announcementMessage&&this._live.clear()}),t.duration&&t.duration>0&&e.afterOpened().subscribe(()=>e._dismissAfter(t.duration)),this._openedSnackBarRef?(this._openedSnackBarRef.afterDismissed().subscribe(()=>{e.containerInstance.enter()}),this._openedSnackBarRef.dismiss()):e.containerInstance.enter()}_createOverlay(e){let t=new ai;t.direction=e.direction;let n=On(this._injector),a=e.direction==="rtl",r=e.horizontalPosition==="left"||e.horizontalPosition==="start"&&!a||e.horizontalPosition==="end"&&a,u=!r&&e.horizontalPosition!=="center";return r?n.left("0"):u?n.right("0"):n.centerHorizontally(),e.verticalPosition==="top"?n.top("0"):n.bottom("0"),t.positionStrategy=n,t.disableAnimations=this._animationsDisabled,ri(this._injector,t)}_createInjector(e,t){let n=e&&e.viewContainerRef&&e.viewContainerRef.injector;return Z.create({parent:n||this._injector,providers:[{provide:nr,useValue:t},{provide:gp,useValue:e.data}]})}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();var wt=(()=>{class i{constructor(){this.http=m(It),this.url="/api/services"}fetchServices(){return this.http.get(this.url)}control(e,t){return this.http.post(`${this.url}/control`,{name:e,action:t})}installService(e,t){return this.http.post(`${this.url}/install`,{name:e,runAsPassword:t})}fetchConfigs(){return this.http.get(`${this.url}/config`)}getConfig(e){return this.http.get(`${this.url}/config/${e}`)}saveConfig(e){return this.http.post(`${this.url}/config`,e)}deleteConfig(e){return this.http.delete(`${this.url}/config/${e}`)}fetchArchivedConfigs(){return this.http.get(`${this.url}/archive`)}archiveService(e){return this.http.post(`${this.url}/config/${e}/archive`,{})}restoreService(e,t){return this.http.post(`${this.url}/config/${e}/restore`,{runAsPassword:t})}listAvailableServices(){return this.http.get(`${this.url}/managed/available`)}listManagedServices(){return this.http.get(`${this.url}/managed`)}addManagedService(e){return this.http.post(`${this.url}/managed`,{name:e})}removeManagedService(e){return this.http.delete(`${this.url}/managed`,{body:{name:e}})}fetchJournal(e,t=100){return this.http.get(`${this.url}/journal/${e}`,{params:{lines:t}})}getLlamaAutocomplete(e,t,n){let a={type:e,query:t};return n&&(a.binary=n),this.http.get(`${this.url}/llama/autocomplete`,{params:a})}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275prov=ae({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var _p="journal-selected-service",js=(()=>{class i{constructor(){this.selectedService=E(this.readSaved())}select(e){this.selectedService.set(e),localStorage.setItem(_p,JSON.stringify(e))}readSaved(){let e=localStorage.getItem(_p);if(e===null)return null;try{return JSON.parse(e)}catch(t){return null}}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275prov=ae({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var Hs=(()=>{class i{constructor(){this.serviceService=m(wt),this.services=E([]),this.loaded=E(!1),this.error=E(null)}refresh(){return q(this,null,function*(){try{let e=yield re(this.serviceService.fetchServices());this.services.set(e),this.error.set(null),this.loaded.set(!0)}catch(e){this.error.set(e instanceof Error?e.message:String(e)),console.error("[ServiceListService] refresh error:",e)}})}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275prov=ae({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var Ot=(()=>{class i{constructor(){this.http=m(It),this.baseUrl="/api/system",this._platform=E(void 0),this.platform=this._platform.asReadonly(),this.windows=P(()=>this._platform()==="win32")}reboot(){return q(this,null,function*(){yield re(this.http.post(`${this.baseUrl}/reboot`,null))})}shutdown(){return q(this,null,function*(){yield re(this.http.post(`${this.baseUrl}/shutdown`,null))})}getSystemInfo(){return q(this,null,function*(){return re(this.http.get(`${this.baseUrl}/info`))})}detectWindows(){return this.platformQuery??=this.getSystemInfo().then(e=>(this._platform.set(e.server?.platform),this.windows())).catch(()=>(this.platformQuery=void 0,!1)),this.platformQuery}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275prov=ae({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var vp=(()=>{class i{_animationsDisabled=ye();state="unchecked";disabled=!1;appearance="full";static \u0275fac=function(t){return new(t||i)};static \u0275cmp=R({type:i,selectors:[["mat-pseudo-checkbox"]],hostAttrs:[1,"mat-pseudo-checkbox"],hostVars:12,hostBindings:function(t,n){t&2&&p("mat-pseudo-checkbox-indeterminate",n.state==="indeterminate")("mat-pseudo-checkbox-checked",n.state==="checked")("mat-pseudo-checkbox-disabled",n.disabled)("mat-pseudo-checkbox-minimal",n.appearance==="minimal")("mat-pseudo-checkbox-full",n.appearance==="full")("_mat-animation-noopable",n._animationsDisabled)},inputs:{state:"state",disabled:"disabled",appearance:"appearance"},decls:0,vars:0,template:function(t,n){},styles:[`.mat-pseudo-checkbox {
3670
+ `],encapsulation:2,changeDetection:1})}return i})(),H0=new k("mat-snack-bar-default-options",{providedIn:"root",factory:()=>new Zo}),zs=(()=>{class i{_live=m(Ta);_injector=m(Z);_breakpointObserver=m(Yn);_parentSnackBar=m(i,{optional:!0,skipSelf:!0});_defaultConfig=m(H0);_animationsDisabled=ye();_snackBarRefAtThisLevel=null;simpleSnackBarComponent=z0;snackBarContainerComponent=j0;handsetCssClass="mat-mdc-snack-bar-handset";get _openedSnackBarRef(){let e=this._parentSnackBar;return e?e._openedSnackBarRef:this._snackBarRefAtThisLevel}set _openedSnackBarRef(e){this._parentSnackBar?this._parentSnackBar._openedSnackBarRef=e:this._snackBarRefAtThisLevel=e}openFromComponent(e,t){return this._attach(e,t)}openFromTemplate(e,t){return this._attach(e,t)}open(e,t="",n){let a=V(V({},this._defaultConfig),n);return a.data={message:e,action:t},a.announcementMessage===e&&(a.announcementMessage=void 0),this.openFromComponent(this.simpleSnackBarComponent,a)}dismiss(){this._openedSnackBarRef&&this._openedSnackBarRef.dismiss()}ngOnDestroy(){this._snackBarRefAtThisLevel&&this._snackBarRefAtThisLevel.dismiss()}_attachSnackBarContainer(e,t){let n=t&&t.viewContainerRef&&t.viewContainerRef.injector,a=Z.create({parent:n||this._injector,providers:[{provide:Zo,useValue:t}]}),r=new Oi(this.snackBarContainerComponent,t.viewContainerRef,a),u=e.attach(r);return u.instance.snackBarConfig=t,u.instance}_attach(e,t){let n=V(V(V({},new Zo),this._defaultConfig),t),a=this._createOverlay(n),r=this._attachSnackBarContainer(a,n),u=new nr(r,a);if(e instanceof tt){let h=new Wt(e,null,{$implicit:n.data,snackBarRef:u});u.instance=r.attachTemplatePortal(h)}else{let h=this._createInjector(n,u),f=new Oi(e,void 0,h),b=r.attachComponentPortal(f);u.instance=b.instance}return this._breakpointObserver.observe(Kr.HandsetPortrait).pipe(ue(a.detachments())).subscribe(h=>{a.overlayElement.classList.toggle(this.handsetCssClass,h.matches)}),n.announcementMessage&&r._onAnnounce.subscribe(()=>{this._live.announce(n.announcementMessage,n.politeness)}),this._animateSnackBar(u,n),this._openedSnackBarRef=u,this._openedSnackBarRef}_animateSnackBar(e,t){e.afterDismissed().subscribe(()=>{this._openedSnackBarRef==e&&(this._openedSnackBarRef=null),t.announcementMessage&&this._live.clear()}),t.duration&&t.duration>0&&e.afterOpened().subscribe(()=>e._dismissAfter(t.duration)),this._openedSnackBarRef?(this._openedSnackBarRef.afterDismissed().subscribe(()=>{e.containerInstance.enter()}),this._openedSnackBarRef.dismiss()):e.containerInstance.enter()}_createOverlay(e){let t=new ai;t.direction=e.direction;let n=On(this._injector),a=e.direction==="rtl",r=e.horizontalPosition==="left"||e.horizontalPosition==="start"&&!a||e.horizontalPosition==="end"&&a,u=!r&&e.horizontalPosition!=="center";return r?n.left("0"):u?n.right("0"):n.centerHorizontally(),e.verticalPosition==="top"?n.top("0"):n.bottom("0"),t.positionStrategy=n,t.disableAnimations=this._animationsDisabled,ri(this._injector,t)}_createInjector(e,t){let n=e&&e.viewContainerRef&&e.viewContainerRef.injector;return Z.create({parent:n||this._injector,providers:[{provide:nr,useValue:t},{provide:gp,useValue:e.data}]})}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();var wt=(()=>{class i{constructor(){this.http=m(It),this.url="/api/services"}fetchServices(){return this.http.get(this.url)}control(e,t){return this.http.post(`${this.url}/control`,{name:e,action:t})}installService(e,t){return this.http.post(`${this.url}/install`,{name:e,runAsPassword:t})}fetchConfigs(){return this.http.get(`${this.url}/config`)}getConfig(e){return this.http.get(`${this.url}/config/${e}`)}saveConfig(e){return this.http.post(`${this.url}/config`,e)}deleteConfig(e){return this.http.delete(`${this.url}/config/${e}`)}fetchArchivedConfigs(){return this.http.get(`${this.url}/archive`)}archiveService(e){return this.http.post(`${this.url}/config/${e}/archive`,{})}restoreService(e,t){return this.http.post(`${this.url}/config/${e}/restore`,{runAsPassword:t})}listAvailableServices(){return this.http.get(`${this.url}/managed/available`)}listManagedServices(){return this.http.get(`${this.url}/managed`)}addManagedService(e){return this.http.post(`${this.url}/managed`,{name:e})}removeManagedService(e){return this.http.delete(`${this.url}/managed`,{body:{name:e}})}fetchJournal(e,t=100){return this.http.get(`${this.url}/journal/${e}`,{params:{lines:t}})}getLlamaAutocomplete(e,t,n){let a={type:e,query:t};return n&&(a.binary=n),this.http.get(`${this.url}/llama/autocomplete`,{params:a})}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275prov=ae({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var _p="journal-selected-service",js=(()=>{class i{constructor(){this.selectedService=E(this.readSaved())}select(e){this.selectedService.set(e),localStorage.setItem(_p,JSON.stringify(e))}readSaved(){let e=localStorage.getItem(_p);if(e===null)return null;try{return JSON.parse(e)}catch(t){return null}}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275prov=ae({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var Hs=(()=>{class i{constructor(){this.serviceService=m(wt),this.services=E([]),this.loaded=E(!1),this.error=E(null)}refresh(){return q(this,null,function*(){try{let e=yield re(this.serviceService.fetchServices());this.services.set(e),this.error.set(null),this.loaded.set(!0)}catch(e){this.error.set(e instanceof Error?e.message:String(e)),console.error("[ServiceListService] refresh error:",e)}})}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275prov=ae({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var Ot=(()=>{class i{constructor(){this.http=m(It),this.baseUrl="/api/system",this._platform=E(void 0),this.platform=this._platform.asReadonly(),this.windows=P(()=>this._platform()==="win32")}reboot(){return q(this,null,function*(){yield re(this.http.post(`${this.baseUrl}/reboot`,null))})}shutdown(){return q(this,null,function*(){yield re(this.http.post(`${this.baseUrl}/shutdown`,null))})}getSystemInfo(){return q(this,null,function*(){return re(this.http.get(`${this.baseUrl}/info`))})}detectWindows(){return this.platformQuery??=this.getSystemInfo().then(e=>(this._platform.set(e.server?.platform),this.windows())).catch(()=>(this.platformQuery=void 0,!1)),this.platformQuery}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275prov=ae({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var vp=(()=>{class i{_animationsDisabled=ye();state="unchecked";disabled=!1;appearance="full";static \u0275fac=function(t){return new(t||i)};static \u0275cmp=R({type:i,selectors:[["mat-pseudo-checkbox"]],hostAttrs:[1,"mat-pseudo-checkbox"],hostVars:12,hostBindings:function(t,n){t&2&&p("mat-pseudo-checkbox-indeterminate",n.state==="indeterminate")("mat-pseudo-checkbox-checked",n.state==="checked")("mat-pseudo-checkbox-disabled",n.disabled)("mat-pseudo-checkbox-minimal",n.appearance==="minimal")("mat-pseudo-checkbox-full",n.appearance==="full")("_mat-animation-noopable",n._animationsDisabled)},inputs:{state:"state",disabled:"disabled",appearance:"appearance"},decls:0,vars:0,template:function(t,n){},styles:[`.mat-pseudo-checkbox {
3671
3671
  border-radius: 2px;
3672
3672
  cursor: pointer;
3673
3673
  display: inline-block;
@@ -3773,7 +3773,7 @@ input.mat-mdc-chip-input {
3773
3773
  top: 6px;
3774
3774
  width: 12px;
3775
3775
  }
3776
- `],encapsulation:2})}return i})();var H0=["text"],U0=[[["mat-icon"]],"*"],$0=["mat-icon","*"];function G0(i,o){if(i&1&&_(0,"mat-pseudo-checkbox",1),i&2){let e=v();x("disabled",e.disabled)("state",e.selected?"checked":"unchecked")}}function W0(i,o){if(i&1&&_(0,"mat-pseudo-checkbox",3),i&2){let e=v();x("disabled",e.disabled)}}function q0(i,o){if(i&1&&(s(0,"span",4),d(1),l()),i&2){let e=v();c(),Q("(",e.group.label,")")}}var ar=new k("MAT_OPTION_PARENT_COMPONENT"),rr=new k("MatOptgroup");var or=class{source;isUserInput;constructor(o,e=!1){this.source=o,this.isUserInput=e}},Dt=(()=>{class i{_element=m(B);_changeDetectorRef=m(se);_parent=m(ar,{optional:!0});group=m(rr,{optional:!0});_signalDisableRipple=!1;_selected=!1;_active=!1;_mostRecentViewValue="";get multiple(){return this._parent&&this._parent.multiple}get selected(){return this._selected}value;id=m(De).getId("mat-option-");get disabled(){return this.group&&this.group.disabled||this._disabled()}set disabled(e){this._disabled.set(e)}_disabled=E(!1);get disableRipple(){return this._signalDisableRipple?this._parent.disableRipple():!!this._parent?.disableRipple}get hideSingleSelectionIndicator(){return!!(this._parent&&this._parent.hideSingleSelectionIndicator)}onSelectionChange=new X;_text;_stateChanges=new O;constructor(){let e=m(Be);e.load($t),e.load(Sn),this._signalDisableRipple=!!this._parent&&_n(this._parent.disableRipple)}get active(){return this._active}get viewValue(){return(this._text?.nativeElement.textContent||"").trim()}select(e=!0){this._selected||(this._selected=!0,this._changeDetectorRef.markForCheck(),e&&this._emitSelectionChangeEvent())}deselect(e=!0){this._selected&&(this._selected=!1,this._changeDetectorRef.markForCheck(),e&&this._emitSelectionChangeEvent())}focus(e,t){let n=this._getHostElement();typeof n.focus=="function"&&n.focus(t)}setActiveStyles(){this._active||(this._active=!0,this._changeDetectorRef.markForCheck())}setInactiveStyles(){this._active&&(this._active=!1,this._changeDetectorRef.markForCheck())}getLabel(){return this.viewValue}_handleKeydown(e){(e.keyCode===13||e.keyCode===32)&&!Ke(e)&&(this._selectViaInteraction(),e.preventDefault())}_selectViaInteraction(){this.disabled||(this._selected=this.multiple?!this._selected:!0,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent(!0))}_getTabIndex(){return this.disabled?"-1":"0"}_getHostElement(){return this._element.nativeElement}ngAfterViewChecked(){if(this._selected){let e=this.viewValue;e!==this._mostRecentViewValue&&(this._mostRecentViewValue&&this._stateChanges.next(),this._mostRecentViewValue=e)}}ngOnDestroy(){this._stateChanges.complete()}_emitSelectionChangeEvent(e=!1){this.onSelectionChange.emit(new or(this,e))}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=R({type:i,selectors:[["mat-option"]],viewQuery:function(t,n){if(t&1&&Re(H0,7),t&2){let a;N(a=L())&&(n._text=a.first)}},hostAttrs:["role","option",1,"mat-mdc-option","mdc-list-item"],hostVars:11,hostBindings:function(t,n){t&1&&S("click",function(){return n._selectViaInteraction()})("keydown",function(r){return n._handleKeydown(r)}),t&2&&(ft("id",n.id),J("aria-selected",n.selected)("aria-disabled",n.disabled.toString()),p("mdc-list-item--selected",n.selected)("mat-mdc-option-multiple",n.multiple)("mat-mdc-option-active",n.active)("mdc-list-item--disabled",n.disabled))},inputs:{value:"value",id:"id",disabled:[2,"disabled","disabled",z]},outputs:{onSelectionChange:"onSelectionChange"},exportAs:["matOption"],ngContentSelectors:$0,decls:8,vars:5,consts:[["text",""],["aria-hidden","true",1,"mat-mdc-option-pseudo-checkbox",3,"disabled","state"],[1,"mdc-list-item__primary-text"],["state","checked","aria-hidden","true","appearance","minimal",1,"mat-mdc-option-pseudo-checkbox",3,"disabled"],[1,"cdk-visually-hidden"],["aria-hidden","true","mat-ripple","",1,"mat-mdc-option-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled"]],template:function(t,n){t&1&&(ve(U0),w(0,G0,1,2,"mat-pseudo-checkbox",1),W(1),s(2,"span",2,0),W(4,1),l(),w(5,W0,1,1,"mat-pseudo-checkbox",3),w(6,q0,2,1,"span",4),_(7,"div",5)),t&2&&(D(n.multiple?0:-1),c(5),D(!n.multiple&&n.selected&&!n.hideSingleSelectionIndicator?5:-1),c(),D(n.group&&n.group._inert?6:-1),c(),x("matRippleTrigger",n._getHostElement())("matRippleDisabled",n.disabled||n.disableRipple))},dependencies:[vp,$o],styles:[`.mat-mdc-option {
3776
+ `],encapsulation:2})}return i})();var U0=["text"],$0=[[["mat-icon"]],"*"],G0=["mat-icon","*"];function W0(i,o){if(i&1&&_(0,"mat-pseudo-checkbox",1),i&2){let e=v();x("disabled",e.disabled)("state",e.selected?"checked":"unchecked")}}function q0(i,o){if(i&1&&_(0,"mat-pseudo-checkbox",3),i&2){let e=v();x("disabled",e.disabled)}}function K0(i,o){if(i&1&&(s(0,"span",4),d(1),l()),i&2){let e=v();c(),Q("(",e.group.label,")")}}var ar=new k("MAT_OPTION_PARENT_COMPONENT"),rr=new k("MatOptgroup");var or=class{source;isUserInput;constructor(o,e=!1){this.source=o,this.isUserInput=e}},Dt=(()=>{class i{_element=m(B);_changeDetectorRef=m(se);_parent=m(ar,{optional:!0});group=m(rr,{optional:!0});_signalDisableRipple=!1;_selected=!1;_active=!1;_mostRecentViewValue="";get multiple(){return this._parent&&this._parent.multiple}get selected(){return this._selected}value;id=m(De).getId("mat-option-");get disabled(){return this.group&&this.group.disabled||this._disabled()}set disabled(e){this._disabled.set(e)}_disabled=E(!1);get disableRipple(){return this._signalDisableRipple?this._parent.disableRipple():!!this._parent?.disableRipple}get hideSingleSelectionIndicator(){return!!(this._parent&&this._parent.hideSingleSelectionIndicator)}onSelectionChange=new X;_text;_stateChanges=new O;constructor(){let e=m(Be);e.load(Gt),e.load(Sn),this._signalDisableRipple=!!this._parent&&_n(this._parent.disableRipple)}get active(){return this._active}get viewValue(){return(this._text?.nativeElement.textContent||"").trim()}select(e=!0){this._selected||(this._selected=!0,this._changeDetectorRef.markForCheck(),e&&this._emitSelectionChangeEvent())}deselect(e=!0){this._selected&&(this._selected=!1,this._changeDetectorRef.markForCheck(),e&&this._emitSelectionChangeEvent())}focus(e,t){let n=this._getHostElement();typeof n.focus=="function"&&n.focus(t)}setActiveStyles(){this._active||(this._active=!0,this._changeDetectorRef.markForCheck())}setInactiveStyles(){this._active&&(this._active=!1,this._changeDetectorRef.markForCheck())}getLabel(){return this.viewValue}_handleKeydown(e){(e.keyCode===13||e.keyCode===32)&&!Ke(e)&&(this._selectViaInteraction(),e.preventDefault())}_selectViaInteraction(){this.disabled||(this._selected=this.multiple?!this._selected:!0,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent(!0))}_getTabIndex(){return this.disabled?"-1":"0"}_getHostElement(){return this._element.nativeElement}ngAfterViewChecked(){if(this._selected){let e=this.viewValue;e!==this._mostRecentViewValue&&(this._mostRecentViewValue&&this._stateChanges.next(),this._mostRecentViewValue=e)}}ngOnDestroy(){this._stateChanges.complete()}_emitSelectionChangeEvent(e=!1){this.onSelectionChange.emit(new or(this,e))}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=R({type:i,selectors:[["mat-option"]],viewQuery:function(t,n){if(t&1&&Re(U0,7),t&2){let a;N(a=L())&&(n._text=a.first)}},hostAttrs:["role","option",1,"mat-mdc-option","mdc-list-item"],hostVars:11,hostBindings:function(t,n){t&1&&S("click",function(){return n._selectViaInteraction()})("keydown",function(r){return n._handleKeydown(r)}),t&2&&(ft("id",n.id),J("aria-selected",n.selected)("aria-disabled",n.disabled.toString()),p("mdc-list-item--selected",n.selected)("mat-mdc-option-multiple",n.multiple)("mat-mdc-option-active",n.active)("mdc-list-item--disabled",n.disabled))},inputs:{value:"value",id:"id",disabled:[2,"disabled","disabled",z]},outputs:{onSelectionChange:"onSelectionChange"},exportAs:["matOption"],ngContentSelectors:G0,decls:8,vars:5,consts:[["text",""],["aria-hidden","true",1,"mat-mdc-option-pseudo-checkbox",3,"disabled","state"],[1,"mdc-list-item__primary-text"],["state","checked","aria-hidden","true","appearance","minimal",1,"mat-mdc-option-pseudo-checkbox",3,"disabled"],[1,"cdk-visually-hidden"],["aria-hidden","true","mat-ripple","",1,"mat-mdc-option-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled"]],template:function(t,n){t&1&&(ve($0),w(0,W0,1,2,"mat-pseudo-checkbox",1),W(1),s(2,"span",2,0),W(4,1),l(),w(5,q0,1,1,"mat-pseudo-checkbox",3),w(6,K0,2,1,"span",4),_(7,"div",5)),t&2&&(D(n.multiple?0:-1),c(5),D(!n.multiple&&n.selected&&!n.hideSingleSelectionIndicator?5:-1),c(),D(n.group&&n.group._inert?6:-1),c(),x("matRippleTrigger",n._getHostElement())("matRippleDisabled",n.disabled||n.disableRipple))},dependencies:[vp,$o],styles:[`.mat-mdc-option {
3777
3777
  -webkit-user-select: none;
3778
3778
  user-select: none;
3779
3779
  -moz-osx-font-smoothing: grayscale;
@@ -3894,7 +3894,7 @@ input.mat-mdc-chip-input {
3894
3894
  .mat-mdc-option-active .mat-focus-indicator::before {
3895
3895
  content: "";
3896
3896
  }
3897
- `],encapsulation:2})}return i})();function Us(i,o,e){if(e.length){let t=o.toArray(),n=e.toArray(),a=0;for(let r=0;r<i+1;r++)t[r].group&&t[r].group===n[a]&&a++;return a}return 0}function $s(i,o,e,t){return i<e?i:i+o>e+t?Math.max(0,i-t+o):e}var Gs=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=U({type:i});static \u0275inj=H({imports:[ce]})}return i})();var Qo=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=U({type:i});static \u0275inj=H({imports:[Ki,Gs,Dt,ce]})}return i})();var K0=["panel"],X0=["*"];function Y0(i,o){if(i&1&&(Ne(0,"div",1,0),W(2),qe()),i&2){let e=o.id,t=v();at(t._classList),p("mat-mdc-autocomplete-visible",t.showPanel)("mat-mdc-autocomplete-hidden",!t.showPanel)("mat-autocomplete-panel-animations-enabled",!t._animationsDisabled)("mat-primary",t._color==="primary")("mat-accent",t._color==="accent")("mat-warn",t._color==="warn"),ft("id",t.id),J("aria-label",t.ariaLabel||null)("aria-labelledby",t._getPanelAriaLabelledby(e))}}var Wc=class{source;option;constructor(o,e){this.source=o,this.option=e}},bp=new k("mat-autocomplete-default-options",{providedIn:"root",factory:()=>({autoActiveFirstOption:!1,autoSelectActiveOption:!1,hideSingleSelectionIndicator:!1,requireSelection:!1,hasBackdrop:!1})}),Zi=(()=>{class i{_changeDetectorRef=m(se);_elementRef=m(B);_defaults=m(bp);_animationsDisabled=ye();_activeOptionChanges=Te.EMPTY;_keyManager;showPanel=!1;get isOpen(){return this._isOpen&&this.showPanel}_isOpen=!1;_latestOpeningTrigger;_setColor(e){this._color=e,this._changeDetectorRef.markForCheck()}_color;template;panel;options;optionGroups;ariaLabel;ariaLabelledby;displayWith=null;autoActiveFirstOption;autoSelectActiveOption;requireSelection;panelWidth;disableRipple=!1;optionSelected=new X;opened=new X;closed=new X;optionActivated=new X;set classList(e){this._classList=e,this._elementRef.nativeElement.className=""}_classList;get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=e,this._syncParentProperties()}_hideSingleSelectionIndicator;_syncParentProperties(){if(this.options)for(let e of this.options)e._changeDetectorRef.markForCheck()}id=m(De).getId("mat-autocomplete-");inertGroups;constructor(){let e=m(fe);this.inertGroups=e?.SAFARI||!1,this.autoActiveFirstOption=!!this._defaults.autoActiveFirstOption,this.autoSelectActiveOption=!!this._defaults.autoSelectActiveOption,this.requireSelection=!!this._defaults.requireSelection,this._hideSingleSelectionIndicator=this._defaults.hideSingleSelectionIndicator??!1}ngAfterContentInit(){this._keyManager=new io(this.options).withWrap().skipPredicate(this._skipPredicate),this._activeOptionChanges=this._keyManager.change.subscribe(e=>{this.isOpen&&this.optionActivated.emit({source:this,option:this.options.toArray()[e]||null})}),this._setVisibility()}ngOnDestroy(){this._keyManager?.destroy(),this._activeOptionChanges.unsubscribe()}_setScrollTop(e){this.panel&&(this.panel.nativeElement.scrollTop=e)}_getScrollTop(){return this.panel?this.panel.nativeElement.scrollTop:0}_setVisibility(){this.showPanel=!!this.options?.length,this._changeDetectorRef.markForCheck()}_emitSelectEvent(e){let t=new Wc(this,e);this.optionSelected.emit(t)}_getPanelAriaLabelledby(e){if(this.ariaLabel)return null;let t=e?e+" ":"";return this.ariaLabelledby?t+this.ariaLabelledby:e}_skipPredicate(){return!1}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=R({type:i,selectors:[["mat-autocomplete"]],contentQueries:function(t,n,a){if(t&1&&dt(a,Dt,5)(a,rr,5),t&2){let r;N(r=L())&&(n.options=r),N(r=L())&&(n.optionGroups=r)}},viewQuery:function(t,n){if(t&1&&Re(tt,7)(K0,5),t&2){let a;N(a=L())&&(n.template=a.first),N(a=L())&&(n.panel=a.first)}},hostAttrs:[1,"mat-mdc-autocomplete"],inputs:{ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],displayWith:"displayWith",autoActiveFirstOption:[2,"autoActiveFirstOption","autoActiveFirstOption",z],autoSelectActiveOption:[2,"autoSelectActiveOption","autoSelectActiveOption",z],requireSelection:[2,"requireSelection","requireSelection",z],panelWidth:"panelWidth",disableRipple:[2,"disableRipple","disableRipple",z],classList:[0,"class","classList"],hideSingleSelectionIndicator:[2,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",z]},outputs:{optionSelected:"optionSelected",opened:"opened",closed:"closed",optionActivated:"optionActivated"},exportAs:["matAutocomplete"],features:[le([{provide:ar,useExisting:i}])],ngContentSelectors:X0,decls:1,vars:0,consts:[["panel",""],["role","listbox",1,"mat-mdc-autocomplete-panel","mdc-menu-surface","mdc-menu-surface--open",3,"id"]],template:function(t,n){t&1&&(ve(),Cr(0,Y0,3,17,"ng-template"))},styles:[`div.mat-mdc-autocomplete-panel {
3897
+ `],encapsulation:2})}return i})();function Us(i,o,e){if(e.length){let t=o.toArray(),n=e.toArray(),a=0;for(let r=0;r<i+1;r++)t[r].group&&t[r].group===n[a]&&a++;return a}return 0}function $s(i,o,e,t){return i<e?i:i+o>e+t?Math.max(0,i-t+o):e}var Gs=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=U({type:i});static \u0275inj=H({imports:[ce]})}return i})();var Qo=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=U({type:i});static \u0275inj=H({imports:[Ki,Gs,Dt,ce]})}return i})();var X0=["panel"],Y0=["*"];function Z0(i,o){if(i&1&&(Ne(0,"div",1,0),W(2),qe()),i&2){let e=o.id,t=v();at(t._classList),p("mat-mdc-autocomplete-visible",t.showPanel)("mat-mdc-autocomplete-hidden",!t.showPanel)("mat-autocomplete-panel-animations-enabled",!t._animationsDisabled)("mat-primary",t._color==="primary")("mat-accent",t._color==="accent")("mat-warn",t._color==="warn"),ft("id",t.id),J("aria-label",t.ariaLabel||null)("aria-labelledby",t._getPanelAriaLabelledby(e))}}var Wc=class{source;option;constructor(o,e){this.source=o,this.option=e}},bp=new k("mat-autocomplete-default-options",{providedIn:"root",factory:()=>({autoActiveFirstOption:!1,autoSelectActiveOption:!1,hideSingleSelectionIndicator:!1,requireSelection:!1,hasBackdrop:!1})}),Zi=(()=>{class i{_changeDetectorRef=m(se);_elementRef=m(B);_defaults=m(bp);_animationsDisabled=ye();_activeOptionChanges=Te.EMPTY;_keyManager;showPanel=!1;get isOpen(){return this._isOpen&&this.showPanel}_isOpen=!1;_latestOpeningTrigger;_setColor(e){this._color=e,this._changeDetectorRef.markForCheck()}_color;template;panel;options;optionGroups;ariaLabel;ariaLabelledby;displayWith=null;autoActiveFirstOption;autoSelectActiveOption;requireSelection;panelWidth;disableRipple=!1;optionSelected=new X;opened=new X;closed=new X;optionActivated=new X;set classList(e){this._classList=e,this._elementRef.nativeElement.className=""}_classList;get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=e,this._syncParentProperties()}_hideSingleSelectionIndicator;_syncParentProperties(){if(this.options)for(let e of this.options)e._changeDetectorRef.markForCheck()}id=m(De).getId("mat-autocomplete-");inertGroups;constructor(){let e=m(fe);this.inertGroups=e?.SAFARI||!1,this.autoActiveFirstOption=!!this._defaults.autoActiveFirstOption,this.autoSelectActiveOption=!!this._defaults.autoSelectActiveOption,this.requireSelection=!!this._defaults.requireSelection,this._hideSingleSelectionIndicator=this._defaults.hideSingleSelectionIndicator??!1}ngAfterContentInit(){this._keyManager=new io(this.options).withWrap().skipPredicate(this._skipPredicate),this._activeOptionChanges=this._keyManager.change.subscribe(e=>{this.isOpen&&this.optionActivated.emit({source:this,option:this.options.toArray()[e]||null})}),this._setVisibility()}ngOnDestroy(){this._keyManager?.destroy(),this._activeOptionChanges.unsubscribe()}_setScrollTop(e){this.panel&&(this.panel.nativeElement.scrollTop=e)}_getScrollTop(){return this.panel?this.panel.nativeElement.scrollTop:0}_setVisibility(){this.showPanel=!!this.options?.length,this._changeDetectorRef.markForCheck()}_emitSelectEvent(e){let t=new Wc(this,e);this.optionSelected.emit(t)}_getPanelAriaLabelledby(e){if(this.ariaLabel)return null;let t=e?e+" ":"";return this.ariaLabelledby?t+this.ariaLabelledby:e}_skipPredicate(){return!1}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=R({type:i,selectors:[["mat-autocomplete"]],contentQueries:function(t,n,a){if(t&1&&dt(a,Dt,5)(a,rr,5),t&2){let r;N(r=L())&&(n.options=r),N(r=L())&&(n.optionGroups=r)}},viewQuery:function(t,n){if(t&1&&Re(tt,7)(X0,5),t&2){let a;N(a=L())&&(n.template=a.first),N(a=L())&&(n.panel=a.first)}},hostAttrs:[1,"mat-mdc-autocomplete"],inputs:{ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],displayWith:"displayWith",autoActiveFirstOption:[2,"autoActiveFirstOption","autoActiveFirstOption",z],autoSelectActiveOption:[2,"autoSelectActiveOption","autoSelectActiveOption",z],requireSelection:[2,"requireSelection","requireSelection",z],panelWidth:"panelWidth",disableRipple:[2,"disableRipple","disableRipple",z],classList:[0,"class","classList"],hideSingleSelectionIndicator:[2,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",z]},outputs:{optionSelected:"optionSelected",opened:"opened",closed:"closed",optionActivated:"optionActivated"},exportAs:["matAutocomplete"],features:[le([{provide:ar,useExisting:i}])],ngContentSelectors:Y0,decls:1,vars:0,consts:[["panel",""],["role","listbox",1,"mat-mdc-autocomplete-panel","mdc-menu-surface","mdc-menu-surface--open",3,"id"]],template:function(t,n){t&1&&(ve(),Cr(0,Z0,3,17,"ng-template"))},styles:[`div.mat-mdc-autocomplete-panel {
3898
3898
  width: 100%;
3899
3899
  max-height: 256px;
3900
3900
  visibility: hidden;
@@ -3948,7 +3948,7 @@ div.mat-mdc-autocomplete-panel.mat-mdc-autocomplete-hidden,
3948
3948
  mat-autocomplete {
3949
3949
  display: none;
3950
3950
  }
3951
- `],encapsulation:2})}return i})();var Z0={provide:Ui,useExisting:lt(()=>Li),multi:!0};var Q0=new k("mat-autocomplete-scroll-strategy",{providedIn:"root",factory:()=>{let i=m(Z);return()=>Fi(i)}}),Li=(()=>{class i{_environmentInjector=m(Di);_element=m(B);_injector=m(Z);_viewContainerRef=m(it);_zone=m($);_changeDetectorRef=m(se);_dir=m(Ze,{optional:!0});_formField=m(ro,{optional:!0,host:!0});_viewportRuler=m(ni);_scrollStrategy=m(Q0);_renderer=m(we);_animationsDisabled=ye();_defaults=m(bp,{optional:!0});_overlayRef=null;_portal;_componentDestroyed=!1;_initialized=new O;_keydownSubscription;_outsideClickSubscription;_cleanupWindowBlur;_previousValue=null;_valueOnAttach=null;_valueOnLastKeydown=null;_positionStrategy;_manuallyFloatingLabel=!1;_closingActionsSubscription;_viewportSubscription=Te.EMPTY;_breakpointObserver=m(Yn);_handsetLandscapeSubscription=Te.EMPTY;_canOpenOnNextFocus=!0;_valueBeforeAutoSelection;_pendingAutoselectedOption=null;_closeKeyEventStream=new O;_overlayPanelClass=sn(this._defaults?.overlayPanelClass||[]);_windowBlurHandler=()=>{this._canOpenOnNextFocus=this.panelOpen||!this._hasFocus()};_onChange=()=>{};_onTouched=()=>{};autocomplete;position="auto";connectedTo;autocompleteAttribute="off";autocompleteDisabled=!1;_aboveClass="mat-mdc-autocomplete-panel-above";ngAfterViewInit(){this._initialized.next(),this._initialized.complete(),this._cleanupWindowBlur=this._renderer.listen("window","blur",this._windowBlurHandler)}ngOnChanges(e){e.position&&this._positionStrategy&&(this._setStrategyPositions(this._positionStrategy),this.panelOpen&&this._overlayRef.updatePosition())}ngOnDestroy(){this._cleanupWindowBlur?.(),this._handsetLandscapeSubscription.unsubscribe(),this._viewportSubscription.unsubscribe(),this._componentDestroyed=!0,this._destroyPanel(),this._closeKeyEventStream.complete()}get panelOpen(){return this._overlayAttached&&this.autocomplete.showPanel}_overlayAttached=!1;openPanel(){this._openPanelInternal()}closePanel(){this._resetLabel(),this._overlayAttached&&(this.panelOpen&&this._zone.run(()=>{this.autocomplete.closed.emit()}),this.autocomplete._latestOpeningTrigger===this&&(this.autocomplete._isOpen=!1,this.autocomplete._latestOpeningTrigger=null),this._overlayAttached=!1,this._pendingAutoselectedOption=null,this._overlayRef&&this._overlayRef.hasAttached()&&(this._overlayRef.detach(),this._closingActionsSubscription.unsubscribe()),this._updatePanelState(),this._componentDestroyed||this._changeDetectorRef.detectChanges())}updatePosition(){this._overlayAttached&&this._overlayRef.updatePosition()}get panelClosingActions(){return Xe(this.optionSelections,this.autocomplete._keyManager.tabOut.pipe(ke(()=>this._overlayAttached)),this._closeKeyEventStream,this._getOutsideClickStream(),this._overlayRef?this._overlayRef.detachments().pipe(ke(()=>this._overlayAttached)):ge()).pipe(Ve(e=>e instanceof or?e:null))}optionSelections=gn(()=>{let e=this.autocomplete?this.autocomplete.options:null;return e?e.changes.pipe(Ee(e),$e(()=>Xe(...e.map(t=>t.onSelectionChange)))):this._initialized.pipe($e(()=>this.optionSelections))});get activeOption(){return this.autocomplete&&this.autocomplete._keyManager?this.autocomplete._keyManager.activeItem:null}_getOutsideClickStream(){return new Nt(e=>{let t=a=>{let r=mt(a),u=this._formField?this._formField.getConnectedOverlayOrigin().nativeElement:null,h=this.connectedTo?this.connectedTo.elementRef.nativeElement:null;this._overlayAttached&&r!==this._element.nativeElement&&!this._hasFocus()&&(!u||!u.contains(r))&&(!h||!h.contains(r))&&this._overlayRef&&!this._overlayRef.overlayElement.contains(r)&&e.next(a)},n=[this._renderer.listen("document","click",t),this._renderer.listen("document","auxclick",t),this._renderer.listen("document","touchend",t)];return()=>{n.forEach(a=>a())}})}writeValue(e){Promise.resolve(null).then(()=>this._assignOptionValue(e))}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this._element.nativeElement.disabled=e}_handleKeydown(e){let t=e,n=t.keyCode,a=Ke(t);if(n===27&&!a&&t.preventDefault(),this._valueOnLastKeydown=this._element.nativeElement.value,this.activeOption&&n===13&&this.panelOpen&&!a)this.activeOption._selectViaInteraction(),this._resetActiveItem(),t.preventDefault();else if(this.autocomplete){let r=this.autocomplete._keyManager.activeItem,u=n===38||n===40;n===9||u&&!a&&this.panelOpen?this.autocomplete._keyManager.onKeydown(t):u&&this._canOpen()&&this._openPanelInternal(this._valueOnLastKeydown),(u||this.autocomplete._keyManager.activeItem!==r)&&(this._scrollToOption(this.autocomplete._keyManager.activeItemIndex||0),this.autocomplete.autoSelectActiveOption&&this.activeOption&&(this._pendingAutoselectedOption||(this._valueBeforeAutoSelection=this._valueOnLastKeydown),this._pendingAutoselectedOption=this.activeOption,this._assignOptionValue(this.activeOption.value)))}}_handleInput(e){let t=e.target,n=t.value;if(t.type==="number"&&(n=n==""?null:parseFloat(n)),this._previousValue!==n){if(this._previousValue=n,this._pendingAutoselectedOption=null,(!this.autocomplete||!this.autocomplete.requireSelection)&&this._onChange(n),!n)this._clearPreviousSelectedOption(null,!1);else if(this.panelOpen&&!this.autocomplete.requireSelection){let a=this.autocomplete.options?.find(r=>r.selected);if(a){let r=this._getDisplayValue(a.value);n!==r&&a.deselect(!1)}}if(this._canOpen()&&this._hasFocus()){let a=this._valueOnLastKeydown??this._element.nativeElement.value;this._valueOnLastKeydown=null,this._openPanelInternal(a)}}}_handleFocus(){this._canOpenOnNextFocus?this._canOpen()&&(this._previousValue=this._element.nativeElement.value,this._attachOverlay(this._previousValue),this._floatLabel(!0)):this._canOpenOnNextFocus=!0}_handleClick(){this._canOpen()&&!this.panelOpen&&this._openPanelInternal()}_hasFocus(){return Dn()===this._element.nativeElement}_floatLabel(e=!1){this._formField&&this._formField.floatLabel==="auto"&&(e?this._formField._animateAndLockLabel():this._formField.floatLabel="always",this._manuallyFloatingLabel=!0)}_resetLabel(){this._manuallyFloatingLabel&&(this._formField&&(this._formField.floatLabel="auto"),this._manuallyFloatingLabel=!1)}_subscribeToClosingActions(){let e=new Nt(n=>{Ge(()=>{n.next()},{injector:this._environmentInjector})}),t=this.autocomplete.options?.changes.pipe(wi(()=>this._positionStrategy.reapplyLastPosition()),sd(0))??ge();return Xe(e,t).pipe($e(()=>this._zone.run(()=>{let n=this.panelOpen;return this._resetActiveItem(),this._updatePanelState(),this._changeDetectorRef.detectChanges(),this.panelOpen&&this._overlayRef.updatePosition(),n!==this.panelOpen&&(this.panelOpen?this._emitOpened():this.autocomplete.closed.emit()),this.panelClosingActions})),pt(1)).subscribe(n=>this._setValueAndClose(n))}_emitOpened(){this.autocomplete.opened.emit()}_destroyPanel(){this._overlayRef&&(this.closePanel(),this._overlayRef.dispose(),this._overlayRef=null)}_getDisplayValue(e){let t=this.autocomplete;return t&&t.displayWith?t.displayWith(e):e}_assignOptionValue(e){let t=this._getDisplayValue(e);e==null&&this._clearPreviousSelectedOption(null,!1),this._updateNativeInputValue(t??"")}_updateNativeInputValue(e){this._formField?this._formField._control.value=e:this._element.nativeElement.value=e,this._previousValue=e}_setValueAndClose(e){let t=this.autocomplete,n=e?e.source:this._pendingAutoselectedOption;n?(this._clearPreviousSelectedOption(n),this._assignOptionValue(n.value),this._onChange(n.value),t._emitSelectEvent(n),this._element.nativeElement.focus()):t.requireSelection&&this._element.nativeElement.value!==this._valueOnAttach&&(this._clearPreviousSelectedOption(null),this._assignOptionValue(null),this._onChange(null)),this.closePanel()}_clearPreviousSelectedOption(e,t){this.autocomplete?.options?.forEach(n=>{n!==e&&n.selected&&n.deselect(t)})}_openPanelInternal(e=this._element.nativeElement.value){this._attachOverlay(e),this._floatLabel()}_attachOverlay(e){if(!this.autocomplete)return;let t=this._overlayRef;t?(this._positionStrategy.setOrigin(this._getConnectedElement()),t.updateSize({width:this._getPanelWidth()})):(this._portal=new Gt(this.autocomplete.template,this._viewContainerRef,{id:this._formField?.getLabelId()}),t=ri(this._injector,this._getOverlayConfig()),this._overlayRef=t,this._viewportSubscription=this._viewportRuler.change().subscribe(()=>{this.panelOpen&&t&&t.updateSize({width:this._getPanelWidth()})}),this._handsetLandscapeSubscription=this._breakpointObserver.observe(Kr.HandsetLandscape).subscribe(a=>{a.matches?this._positionStrategy.withFlexibleDimensions(!0).withGrowAfterOpen(!0).withViewportMargin(8):this._positionStrategy.withFlexibleDimensions(!1).withGrowAfterOpen(!1).withViewportMargin(0)})),t&&!t.hasAttached()&&(t.attach(this._portal),this._valueOnAttach=e,this._valueOnLastKeydown=null,this._closingActionsSubscription=this._subscribeToClosingActions());let n=this.panelOpen;this.autocomplete._isOpen=this._overlayAttached=!0,this.autocomplete._latestOpeningTrigger=this,this.autocomplete._setColor(this._formField?.color),this._updatePanelState(),this.panelOpen&&n!==this.panelOpen&&this._emitOpened()}_handlePanelKeydown=e=>{(e.keyCode===27&&!Ke(e)||e.keyCode===38&&Ke(e,"altKey"))&&(this._pendingAutoselectedOption&&(this._updateNativeInputValue(this._valueBeforeAutoSelection??""),this._pendingAutoselectedOption=null),this._closeKeyEventStream.next(),this._resetActiveItem(),e.stopPropagation(),e.preventDefault())};_updatePanelState(){if(this.autocomplete._setVisibility(),this.panelOpen){let e=this._overlayRef;this._keydownSubscription||(this._keydownSubscription=e.keydownEvents().subscribe(this._handlePanelKeydown)),this._outsideClickSubscription||(this._outsideClickSubscription=e.outsidePointerEvents().subscribe())}else this._keydownSubscription?.unsubscribe(),this._outsideClickSubscription?.unsubscribe(),this._keydownSubscription=this._outsideClickSubscription=void 0}_getOverlayConfig(){return new ai({positionStrategy:this._getOverlayPosition(),scrollStrategy:this._scrollStrategy(),width:this._getPanelWidth(),direction:this._dir??void 0,hasBackdrop:this._defaults?.hasBackdrop,backdropClass:this._defaults?.backdropClass||"cdk-overlay-transparent-backdrop",panelClass:this._overlayPanelClass,disableAnimations:this._animationsDisabled})}_getOverlayPosition(){let e=hn(this._injector,this._getConnectedElement()).withFlexibleDimensions(!1).withPush(!1).withPopoverLocation("inline");return this._setStrategyPositions(e),this._positionStrategy=e,e}_setStrategyPositions(e){let t=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],n=this._aboveClass,a=[{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:n},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",panelClass:n}],r;this.position==="above"?r=a:this.position==="below"?r=t:r=[...t,...a],e.withPositions(r)}_getConnectedElement(){return this.connectedTo?this.connectedTo.elementRef:this._formField?this._formField.getConnectedOverlayOrigin():this._element}_getPanelWidth(){return this.autocomplete.panelWidth||this._getHostWidth()}_getHostWidth(){return this._getConnectedElement().nativeElement.getBoundingClientRect().width}_resetActiveItem(){let e=this.autocomplete;if(e.autoActiveFirstOption){let t=-1;for(let n=0;n<e.options.length;n++)if(!e.options.get(n).disabled){t=n;break}e._keyManager.setActiveItem(t)}else e._keyManager.setActiveItem(-1)}_canOpen(){let e=this._element.nativeElement;return!e.readOnly&&!e.disabled&&!this.autocompleteDisabled}_scrollToOption(e){let t=this.autocomplete,n=Us(e,t.options,t.optionGroups);if(e===0&&n===1)t._setScrollTop(0);else if(t.panel){let a=t.options.toArray()[e];if(a){let r=a._getHostElement(),u=$s(r.offsetTop,r.offsetHeight,t._getScrollTop(),t.panel.nativeElement.offsetHeight);t._setScrollTop(u)}}}static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,selectors:[["input","matAutocomplete",""],["textarea","matAutocomplete",""]],hostAttrs:[1,"mat-mdc-autocomplete-trigger"],hostVars:7,hostBindings:function(t,n){t&1&&S("focusin",function(){return n._handleFocus()})("blur",function(){return n._onTouched()})("input",function(r){return n._handleInput(r)})("keydown",function(r){return n._handleKeydown(r)})("click",function(){return n._handleClick()}),t&2&&J("autocomplete",n.autocompleteAttribute)("role",n.autocompleteDisabled?null:"combobox")("aria-autocomplete",n.autocompleteDisabled?null:"list")("aria-activedescendant",n.panelOpen&&n.activeOption?n.activeOption.id:null)("aria-expanded",n.autocompleteDisabled?null:n.panelOpen.toString())("aria-controls",n.autocompleteDisabled||!n.panelOpen?null:n.autocomplete?.id)("aria-haspopup",n.autocompleteDisabled?null:"listbox")},inputs:{autocomplete:[0,"matAutocomplete","autocomplete"],position:[0,"matAutocompletePosition","position"],connectedTo:[0,"matAutocompleteConnectedTo","connectedTo"],autocompleteAttribute:[0,"autocomplete","autocompleteAttribute"],autocompleteDisabled:[2,"matAutocompleteDisabled","autocompleteDisabled",z]},exportAs:["matAutocompleteTrigger"],features:[le([Z0]),Ie]})}return i})(),Qi=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=U({type:i});static \u0275inj=H({imports:[Qt,Qo,Ri,Qo,ce]})}return i})();var J0=["trigger"],eb=["panel"],tb=[[["mat-select-trigger"]],"*"],ib=["mat-select-trigger","*"];function nb(i,o){if(i&1&&(s(0,"span",4),d(1),l()),i&2){let e=v();c(),I(e.placeholder)}}function ob(i,o){i&1&&W(0)}function ab(i,o){if(i&1&&(s(0,"span",11),d(1),l()),i&2){let e=v(2);c(),I(e.triggerValue)}}function rb(i,o){if(i&1&&(s(0,"span",5),w(1,ob,1,0)(2,ab,2,1,"span",11),l()),i&2){let e=v();c(),D(e.customTrigger?1:2)}}function sb(i,o){if(i&1){let e=_e();s(0,"div",12,1),S("keydown",function(n){ne(e);let a=v();return oe(a._handleKeydown(n))}),W(2,1),l()}if(i&2){let e=v();at(e.panelClass),p("mat-select-panel-animations-enabled",!e._animationsDisabled)("mat-primary",e._parentFormField?.color==="primary")("mat-accent",e._parentFormField?.color==="accent")("mat-warn",e._parentFormField?.color==="warn")("mat-undefined",!e._parentFormField?.color),J("id",e.id+"-panel")("aria-multiselectable",e.multiple)("aria-label",e.ariaLabel||null)("aria-labelledby",e._getPanelAriaLabelledby())}}var lb=new k("mat-select-scroll-strategy",{providedIn:"root",factory:()=>{let i=m(Z);return()=>Fi(i)}}),cb=new k("MAT_SELECT_CONFIG"),db=new k("MatSelectTrigger"),qc=class{source;value;constructor(o,e){this.source=o,this.value=e}},Ji=(()=>{class i{_viewportRuler=m(ni);_changeDetectorRef=m(se);_elementRef=m(B);_dir=m(Ze,{optional:!0});_idGenerator=m(De);_renderer=m(we);_parentFormField=m(ro,{optional:!0});ngControl=m(fi,{self:!0,optional:!0});_liveAnnouncer=m(Ta);_defaultOptions=m(cb,{optional:!0});_animationsDisabled=ye();_popoverLocation;_initialized=new O;_cleanupDetach;options;optionGroups;customTrigger;_positions=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:"mat-mdc-select-panel-above"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",panelClass:"mat-mdc-select-panel-above"}];_scrollOptionIntoView(e){let t=this.options.toArray()[e];if(t){let n=this.panel.nativeElement,a=Us(e,this.options,this.optionGroups),r=t._getHostElement();e===0&&a===1?n.scrollTop=0:n.scrollTop=$s(r.offsetTop,r.offsetHeight,n.scrollTop,n.offsetHeight)}}_positioningSettled(){this._scrollOptionIntoView(this._keyManager.activeItemIndex||0)}_getChangeEvent(e){return new qc(this,e)}_scrollStrategyFactory=m(lb);_panelOpen=!1;_compareWith=(e,t)=>e===t;_uid=this._idGenerator.getId("mat-select-");_triggerAriaLabelledBy=null;_previousControl;_destroy=new O;_errorStateTracker;stateChanges=new O;disableAutomaticLabeling=!0;userAriaDescribedBy;_selectionModel;_keyManager;_preferredOverlayOrigin;_overlayWidth;_onChange=()=>{};_onTouched=()=>{};_valueId=this._idGenerator.getId("mat-select-value-");_scrollStrategy;_overlayPanelClass=this._defaultOptions?.overlayPanelClass||"";get focused(){return this._focused||this._panelOpen}_focused=!1;controlType="mat-select";trigger;panel;_overlayDir;panelClass;disabled=!1;get disableRipple(){return this._disableRipple()}set disableRipple(e){this._disableRipple.set(e)}_disableRipple=E(!1);tabIndex=0;get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=e,this._syncParentProperties()}_hideSingleSelectionIndicator=this._defaultOptions?.hideSingleSelectionIndicator??!1;get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.stateChanges.next()}_placeholder;get required(){return this._required??this.ngControl?.control?.hasValidator(Qe.required)??!1}set required(e){this._required=e,this.stateChanges.next()}_required;get multiple(){return this._multiple}set multiple(e){this._selectionModel,this._multiple=e}_multiple=!1;disableOptionCentering=this._defaultOptions?.disableOptionCentering??!1;get compareWith(){return this._compareWith}set compareWith(e){this._compareWith=e,this._selectionModel&&this._initializeSelection()}get value(){return this._value}set value(e){this._assignValue(e)&&this._onChange(e)}_value;ariaLabel="";ariaLabelledby;get errorStateMatcher(){return this._errorStateTracker.matcher}set errorStateMatcher(e){this._errorStateTracker.matcher=e}typeaheadDebounceInterval;sortComparator;get id(){return this._id}set id(e){this._id=e||this._uid,this.stateChanges.next()}_id;get errorState(){return this._errorStateTracker.errorState}set errorState(e){this._errorStateTracker.errorState=e}panelWidth=this._defaultOptions&&typeof this._defaultOptions.panelWidth<"u"?this._defaultOptions.panelWidth:"auto";canSelectNullableOptions=this._defaultOptions?.canSelectNullableOptions??!1;optionSelectionChanges=gn(()=>{let e=this.options;return e?e.changes.pipe(Ee(e),$e(()=>Xe(...e.map(t=>t.onSelectionChange)))):this._initialized.pipe($e(()=>this.optionSelectionChanges))});openedChange=new X;_openedStream=this.openedChange.pipe(ke(e=>e),Ve(()=>{}));_closedStream=this.openedChange.pipe(ke(e=>!e),Ve(()=>{}));selectionChange=new X;valueChange=new X;constructor(){let e=m(Ho),t=m(ja,{optional:!0}),n=m(Ut,{optional:!0}),a=m(new zi("tabindex"),{optional:!0}),r=m(tr,{optional:!0});this.ngControl&&(this.ngControl.valueAccessor=this),this._defaultOptions?.typeaheadDebounceInterval!=null&&(this.typeaheadDebounceInterval=this._defaultOptions.typeaheadDebounceInterval),this._errorStateTracker=new Uo(e,this.ngControl,n,t,this.stateChanges),this._scrollStrategy=this._scrollStrategyFactory(),this.tabIndex=a==null?0:parseInt(a)||0,this._popoverLocation=r?.usePopover===!1?null:"inline",this.id=this.id}ngOnInit(){this._selectionModel=new Xa(this.multiple),this.stateChanges.next(),this._viewportRuler.change().pipe(ue(this._destroy)).subscribe(()=>{this.panelOpen&&(this._overlayWidth=this._getOverlayWidth(this._preferredOverlayOrigin),this._changeDetectorRef.detectChanges())})}ngAfterContentInit(){this._initialized.next(),this._initialized.complete(),this._initKeyManager(),this._selectionModel.changed.pipe(ue(this._destroy)).subscribe(e=>{e.added.forEach(t=>t.select()),e.removed.forEach(t=>t.deselect())}),this.options.changes.pipe(Ee(null),ue(this._destroy)).subscribe(()=>{this._resetOptions(),this._initializeSelection()})}ngDoCheck(){let e=this._getTriggerAriaLabelledby(),t=this.ngControl;if(e!==this._triggerAriaLabelledBy){let n=this._elementRef.nativeElement;this._triggerAriaLabelledBy=e,e?n.setAttribute("aria-labelledby",e):n.removeAttribute("aria-labelledby")}t&&(this._previousControl!==t.control&&(this._previousControl!==void 0&&t.disabled!==null&&t.disabled!==this.disabled&&(this.disabled=t.disabled),this._previousControl=t.control),this.updateErrorState())}ngOnChanges(e){(e.disabled||e.userAriaDescribedBy)&&this.stateChanges.next(),e.typeaheadDebounceInterval&&this._keyManager&&this._keyManager.withTypeAhead(this.typeaheadDebounceInterval),e.panelClass&&this.panelClass instanceof Set&&(this.panelClass=Array.from(this.panelClass))}ngOnDestroy(){this._cleanupDetach?.(),this._keyManager?.destroy(),this._destroy.next(),this._destroy.complete(),this.stateChanges.complete()}toggle(){this.panelOpen?this.close():this.open()}open(){this._canOpen()&&(this._parentFormField&&(this._preferredOverlayOrigin=this._parentFormField.getConnectedOverlayOrigin()),this._cleanupDetach?.(),this._overlayWidth=this._getOverlayWidth(this._preferredOverlayOrigin),this._panelOpen=!0,this._overlayDir.positionChange.pipe(pt(1)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this._positioningSettled()}),this._overlayDir.attachOverlay(),this._keyManager.withHorizontalOrientation(null),this._highlightCorrectOption(),this._changeDetectorRef.markForCheck(),this.stateChanges.next(),Promise.resolve().then(()=>this.openedChange.emit(!0)))}close(){this._panelOpen&&(this._panelOpen=!1,this._exitAndDetach(),this._keyManager.withHorizontalOrientation(this._isRtl()?"rtl":"ltr"),this._changeDetectorRef.markForCheck(),this._onTouched(),this.stateChanges.next(),Promise.resolve().then(()=>this.openedChange.emit(!1)))}_exitAndDetach(){if(this._animationsDisabled||!this.panel){this._detachOverlay();return}this._cleanupDetach?.(),this._cleanupDetach=()=>{t(),clearTimeout(n),this._cleanupDetach=void 0};let e=this.panel.nativeElement,t=this._renderer.listen(e,"animationend",a=>{a.animationName==="_mat-select-exit"&&(this._cleanupDetach?.(),this._detachOverlay())}),n=setTimeout(()=>{this._cleanupDetach?.(),this._detachOverlay()},200);e.classList.add("mat-select-panel-exit")}_detachOverlay(){this._overlayDir.detachOverlay(),this._changeDetectorRef.markForCheck()}writeValue(e){this._assignValue(e)}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e,this._changeDetectorRef.markForCheck(),this.stateChanges.next()}get panelOpen(){return this._panelOpen}get selected(){return this.multiple?this._selectionModel?.selected||[]:this._selectionModel?.selected[0]}get triggerValue(){if(this.empty)return"";if(this._multiple){let e=this._selectionModel.selected.map(t=>t.viewValue);return this._isRtl()&&e.reverse(),e.join(", ")}return this._selectionModel.selected[0].viewValue}updateErrorState(){this._errorStateTracker.updateErrorState()}_isRtl(){return this._dir?this._dir.value==="rtl":!1}_handleKeydown(e){this.disabled||(this.panelOpen?this._handleOpenKeydown(e):this._handleClosedKeydown(e))}_handleClosedKeydown(e){let t=e.keyCode,n=t===40||t===38||t===37||t===39,a=t===13||t===32,r=this._keyManager;if(!r.isTyping()&&a&&!Ke(e)||(this.multiple||e.altKey)&&n)e.preventDefault(),this.open();else if(!this.multiple){let u=this.selected;r.onKeydown(e);let h=this.selected;h&&u!==h&&this._liveAnnouncer.announce(h.viewValue,1e4)}}_handleOpenKeydown(e){let t=this._keyManager,n=e.keyCode,a=n===40||n===38,r=t.isTyping();if(a&&e.altKey)e.preventDefault(),this.close();else if(!r&&(n===13||n===32)&&t.activeItem&&!Ke(e))e.preventDefault(),t.activeItem._selectViaInteraction();else if(!r&&this._multiple&&n===65&&e.ctrlKey){e.preventDefault();let u=this.options.some(h=>!h.disabled&&!h.selected);this.options.forEach(h=>{h.disabled||(u?h.select():h.deselect())})}else{let u=t.activeItemIndex;t.onKeydown(e),this._multiple&&a&&e.shiftKey&&t.activeItem&&t.activeItemIndex!==u&&t.activeItem._selectViaInteraction()}}_handleOverlayKeydown(e){e.keyCode===27&&!Ke(e)&&(e.preventDefault(),this.close())}_onFocus(){this.disabled||(this._focused=!0,this.stateChanges.next())}_onBlur(){this._focused=!1,this._keyManager?.cancelTypeahead(),!this.disabled&&!this.panelOpen&&(this._onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next())}get empty(){return!this._selectionModel||this._selectionModel.isEmpty()}_initializeSelection(){Promise.resolve().then(()=>{this.ngControl&&(this._value=this.ngControl.value),this._setSelectionByValue(this._value),this.stateChanges.next()})}_setSelectionByValue(e){if(this.options.forEach(t=>t.setInactiveStyles()),this._selectionModel.clear(),this.multiple&&e)Array.isArray(e),e.forEach(t=>this._selectOptionByValue(t)),this._sortValues();else{let t=this._selectOptionByValue(e);t?this._keyManager.updateActiveItem(t):this.panelOpen||this._keyManager.updateActiveItem(-1)}this._changeDetectorRef.markForCheck()}_selectOptionByValue(e){let t=this.options.find(n=>{if(this._selectionModel.isSelected(n))return!1;try{return(n.value!=null||this.canSelectNullableOptions)&&this._compareWith(n.value,e)}catch(a){return!1}});return t&&this._selectionModel.select(t),t}_assignValue(e){return e!==this._value||this._multiple&&Array.isArray(e)?(this.options&&this._setSelectionByValue(e),this._value=e,!0):!1}_skipPredicate=e=>this.panelOpen?!1:e.disabled;_getOverlayWidth(e){return this.panelWidth==="auto"?(e instanceof Ko?e.elementRef:e||this._elementRef).nativeElement.getBoundingClientRect().width:this.panelWidth===null?"":this.panelWidth}_syncParentProperties(){if(this.options)for(let e of this.options)e._changeDetectorRef.markForCheck()}_initKeyManager(){this._keyManager=new io(this.options).withTypeAhead(this.typeaheadDebounceInterval).withVerticalOrientation().withHorizontalOrientation(this._isRtl()?"rtl":"ltr").withHomeAndEnd().withPageUpDown().withAllowedModifierKeys(["shiftKey"]).skipPredicate(this._skipPredicate),this._keyManager.tabOut.subscribe(()=>{this.panelOpen&&(!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction(),this.focus(),this.close())}),this._keyManager.change.subscribe(()=>{this._panelOpen&&this.panel?this._scrollOptionIntoView(this._keyManager.activeItemIndex||0):!this._panelOpen&&!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction()})}_resetOptions(){let e=Xe(this.options.changes,this._destroy);this.optionSelectionChanges.pipe(ue(e)).subscribe(t=>{this._onSelect(t.source,t.isUserInput),t.isUserInput&&!this.multiple&&this._panelOpen&&(this.close(),this.focus())}),Xe(...this.options.map(t=>t._stateChanges)).pipe(ue(e)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this.stateChanges.next()})}_onSelect(e,t){let n=this._selectionModel.isSelected(e);!this.canSelectNullableOptions&&e.value==null&&!this._multiple?(e.deselect(),this._selectionModel.clear(),this.value!=null&&this._propagateChanges(e.value)):(n!==e.selected&&(e.selected?this._selectionModel.select(e):this._selectionModel.deselect(e)),t&&this._keyManager.setActiveItem(e),this.multiple&&(this._sortValues(),t&&this.focus())),n!==this._selectionModel.isSelected(e)&&this._propagateChanges(),this.stateChanges.next()}_sortValues(){if(this.multiple){let e=this.options.toArray();this._selectionModel.sort((t,n)=>this.sortComparator?this.sortComparator(t,n,e):e.indexOf(t)-e.indexOf(n)),this.stateChanges.next()}}_propagateChanges(e){let t;this.multiple?t=this.selected.map(n=>n.value):t=this.selected?this.selected.value:e,this._value=t,this.valueChange.emit(t),this._onChange(t),this.selectionChange.emit(this._getChangeEvent(t)),this._changeDetectorRef.markForCheck()}_highlightCorrectOption(){if(this._keyManager)if(this.empty){let e=-1;for(let t=0;t<this.options.length;t++)if(!this.options.get(t).disabled){e=t;break}this._keyManager.setActiveItem(e)}else this._keyManager.setActiveItem(this._selectionModel.selected[0])}_canOpen(){return!this._panelOpen&&!this.disabled&&this.options?.length>0&&!!this._overlayDir}focus(e){this._elementRef.nativeElement.focus(e)}_getPanelAriaLabelledby(){if(this.ariaLabel)return null;let e=this._parentFormField?.getLabelId()||null,t=e?e+" ":"";return this.ariaLabelledby?t+this.ariaLabelledby:e}_getAriaActiveDescendant(){return this.panelOpen&&this._keyManager&&this._keyManager.activeItem?this._keyManager.activeItem.id:null}_getTriggerAriaLabelledby(){if(this.ariaLabel)return null;let e=this._parentFormField?.getLabelId()||"";return this.ariaLabelledby&&(e+=" "+this.ariaLabelledby),e||(e=this._valueId),e}get describedByIds(){return this._elementRef.nativeElement.getAttribute("aria-describedby")?.split(" ")||[]}setDescribedByIds(e){let t=this._elementRef.nativeElement;e.length?t.setAttribute("aria-describedby",e.join(" ")):t.removeAttribute("aria-describedby")}onContainerClick(e){let t=mt(e);t&&(t.tagName==="MAT-OPTION"||t.classList.contains("cdk-overlay-backdrop")||t.closest(".mat-mdc-select-panel"))||(this.focus(),this.open())}get shouldLabelFloat(){return this.panelOpen||!this.empty||this.focused&&!!this.placeholder}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=R({type:i,selectors:[["mat-select"]],contentQueries:function(t,n,a){if(t&1&&dt(a,db,5)(a,Dt,5)(a,rr,5),t&2){let r;N(r=L())&&(n.customTrigger=r.first),N(r=L())&&(n.options=r),N(r=L())&&(n.optionGroups=r)}},viewQuery:function(t,n){if(t&1&&Re(J0,5)(eb,5)(Os,5),t&2){let a;N(a=L())&&(n.trigger=a.first),N(a=L())&&(n.panel=a.first),N(a=L())&&(n._overlayDir=a.first)}},hostAttrs:["role","combobox","aria-haspopup","listbox",1,"mat-mdc-select"],hostVars:21,hostBindings:function(t,n){t&1&&S("keydown",function(r){return n._handleKeydown(r)})("focus",function(){return n._onFocus()})("blur",function(){return n._onBlur()}),t&2&&(J("id",n.id)("tabindex",n.disabled?-1:n.tabIndex)("aria-controls",n.panelOpen?n.id+"-panel":null)("aria-expanded",n.panelOpen)("aria-label",n.ariaLabel||null)("aria-required",n.required.toString())("aria-disabled",n.disabled.toString())("aria-invalid",n.errorState)("aria-activedescendant",n._getAriaActiveDescendant()),p("mat-mdc-select-disabled",n.disabled)("mat-mdc-select-invalid",n.errorState)("mat-mdc-select-required",n.required)("mat-mdc-select-empty",n.empty)("mat-mdc-select-multiple",n.multiple)("mat-select-open",n.panelOpen))},inputs:{userAriaDescribedBy:[0,"aria-describedby","userAriaDescribedBy"],panelClass:"panelClass",disabled:[2,"disabled","disabled",z],disableRipple:[2,"disableRipple","disableRipple",z],tabIndex:[2,"tabIndex","tabIndex",e=>e==null?0:jt(e)],hideSingleSelectionIndicator:[2,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",z],placeholder:"placeholder",required:[2,"required","required",z],multiple:[2,"multiple","multiple",z],disableOptionCentering:[2,"disableOptionCentering","disableOptionCentering",z],compareWith:"compareWith",value:"value",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],errorStateMatcher:"errorStateMatcher",typeaheadDebounceInterval:[2,"typeaheadDebounceInterval","typeaheadDebounceInterval",jt],sortComparator:"sortComparator",id:"id",panelWidth:"panelWidth",canSelectNullableOptions:[2,"canSelectNullableOptions","canSelectNullableOptions",z]},outputs:{openedChange:"openedChange",_openedStream:"opened",_closedStream:"closed",selectionChange:"selectionChange",valueChange:"valueChange"},exportAs:["matSelect"],features:[le([{provide:Ua,useExisting:i},{provide:ar,useExisting:i}]),Ie],ngContentSelectors:ib,decls:11,vars:10,consts:[["fallbackOverlayOrigin","cdkOverlayOrigin","trigger",""],["panel",""],["cdk-overlay-origin","",1,"mat-mdc-select-trigger",3,"click"],[1,"mat-mdc-select-value"],[1,"mat-mdc-select-placeholder","mat-mdc-select-min-line"],[1,"mat-mdc-select-value-text"],[1,"mat-mdc-select-arrow-wrapper"],[1,"mat-mdc-select-arrow"],["viewBox","0 0 24 24","width","24px","height","24px","focusable","false","aria-hidden","true"],["d","M7 10l5 5 5-5z"],["cdk-connected-overlay","","cdkConnectedOverlayHasBackdrop","","cdkConnectedOverlayBackdropClass","cdk-overlay-transparent-backdrop",3,"detach","backdropClick","overlayKeydown","cdkConnectedOverlayDisableClose","cdkConnectedOverlayPanelClass","cdkConnectedOverlayScrollStrategy","cdkConnectedOverlayOrigin","cdkConnectedOverlayPositions","cdkConnectedOverlayWidth","cdkConnectedOverlayFlexibleDimensions","cdkConnectedOverlayUsePopover"],[1,"mat-mdc-select-min-line"],["role","listbox","tabindex","-1",1,"mat-mdc-select-panel","mdc-menu-surface","mdc-menu-surface--open",3,"keydown"]],template:function(t,n){if(t&1&&(ve(tb),s(0,"div",2,0),S("click",function(){return n.open()}),s(3,"div",3),w(4,nb,2,1,"span",4)(5,rb,3,1,"span",5),l(),s(6,"div",6)(7,"div",7),Bi(),s(8,"svg",8),_(9,"path",9),l()()()(),We(10,sb,3,16,"ng-template",10),S("detach",function(){return n.close()})("backdropClick",function(){return n.close()})("overlayKeydown",function(r){return n._handleOverlayKeydown(r)})),t&2){let a=Se(1);c(3),J("id",n._valueId),c(),D(n.empty?4:5),c(6),x("cdkConnectedOverlayDisableClose",!0)("cdkConnectedOverlayPanelClass",n._overlayPanelClass)("cdkConnectedOverlayScrollStrategy",n._scrollStrategy)("cdkConnectedOverlayOrigin",n._preferredOverlayOrigin||a)("cdkConnectedOverlayPositions",n._positions)("cdkConnectedOverlayWidth",n._overlayWidth)("cdkConnectedOverlayFlexibleDimensions",!0)("cdkConnectedOverlayUsePopover",n._popoverLocation)}},dependencies:[Ko,Os],styles:[`@keyframes _mat-select-enter {
3951
+ `],encapsulation:2})}return i})();var Q0={provide:Ui,useExisting:lt(()=>Li),multi:!0};var J0=new k("mat-autocomplete-scroll-strategy",{providedIn:"root",factory:()=>{let i=m(Z);return()=>Fi(i)}}),Li=(()=>{class i{_environmentInjector=m(Di);_element=m(B);_injector=m(Z);_viewContainerRef=m(it);_zone=m($);_changeDetectorRef=m(se);_dir=m(Ze,{optional:!0});_formField=m(ro,{optional:!0,host:!0});_viewportRuler=m(ni);_scrollStrategy=m(J0);_renderer=m(we);_animationsDisabled=ye();_defaults=m(bp,{optional:!0});_overlayRef=null;_portal;_componentDestroyed=!1;_initialized=new O;_keydownSubscription;_outsideClickSubscription;_cleanupWindowBlur;_previousValue=null;_valueOnAttach=null;_valueOnLastKeydown=null;_positionStrategy;_manuallyFloatingLabel=!1;_closingActionsSubscription;_viewportSubscription=Te.EMPTY;_breakpointObserver=m(Yn);_handsetLandscapeSubscription=Te.EMPTY;_canOpenOnNextFocus=!0;_valueBeforeAutoSelection;_pendingAutoselectedOption=null;_closeKeyEventStream=new O;_overlayPanelClass=sn(this._defaults?.overlayPanelClass||[]);_windowBlurHandler=()=>{this._canOpenOnNextFocus=this.panelOpen||!this._hasFocus()};_onChange=()=>{};_onTouched=()=>{};autocomplete;position="auto";connectedTo;autocompleteAttribute="off";autocompleteDisabled=!1;_aboveClass="mat-mdc-autocomplete-panel-above";ngAfterViewInit(){this._initialized.next(),this._initialized.complete(),this._cleanupWindowBlur=this._renderer.listen("window","blur",this._windowBlurHandler)}ngOnChanges(e){e.position&&this._positionStrategy&&(this._setStrategyPositions(this._positionStrategy),this.panelOpen&&this._overlayRef.updatePosition())}ngOnDestroy(){this._cleanupWindowBlur?.(),this._handsetLandscapeSubscription.unsubscribe(),this._viewportSubscription.unsubscribe(),this._componentDestroyed=!0,this._destroyPanel(),this._closeKeyEventStream.complete()}get panelOpen(){return this._overlayAttached&&this.autocomplete.showPanel}_overlayAttached=!1;openPanel(){this._openPanelInternal()}closePanel(){this._resetLabel(),this._overlayAttached&&(this.panelOpen&&this._zone.run(()=>{this.autocomplete.closed.emit()}),this.autocomplete._latestOpeningTrigger===this&&(this.autocomplete._isOpen=!1,this.autocomplete._latestOpeningTrigger=null),this._overlayAttached=!1,this._pendingAutoselectedOption=null,this._overlayRef&&this._overlayRef.hasAttached()&&(this._overlayRef.detach(),this._closingActionsSubscription.unsubscribe()),this._updatePanelState(),this._componentDestroyed||this._changeDetectorRef.detectChanges())}updatePosition(){this._overlayAttached&&this._overlayRef.updatePosition()}get panelClosingActions(){return Xe(this.optionSelections,this.autocomplete._keyManager.tabOut.pipe(ke(()=>this._overlayAttached)),this._closeKeyEventStream,this._getOutsideClickStream(),this._overlayRef?this._overlayRef.detachments().pipe(ke(()=>this._overlayAttached)):ge()).pipe(Ve(e=>e instanceof or?e:null))}optionSelections=gn(()=>{let e=this.autocomplete?this.autocomplete.options:null;return e?e.changes.pipe(Ee(e),$e(()=>Xe(...e.map(t=>t.onSelectionChange)))):this._initialized.pipe($e(()=>this.optionSelections))});get activeOption(){return this.autocomplete&&this.autocomplete._keyManager?this.autocomplete._keyManager.activeItem:null}_getOutsideClickStream(){return new Nt(e=>{let t=a=>{let r=mt(a),u=this._formField?this._formField.getConnectedOverlayOrigin().nativeElement:null,h=this.connectedTo?this.connectedTo.elementRef.nativeElement:null;this._overlayAttached&&r!==this._element.nativeElement&&!this._hasFocus()&&(!u||!u.contains(r))&&(!h||!h.contains(r))&&this._overlayRef&&!this._overlayRef.overlayElement.contains(r)&&e.next(a)},n=[this._renderer.listen("document","click",t),this._renderer.listen("document","auxclick",t),this._renderer.listen("document","touchend",t)];return()=>{n.forEach(a=>a())}})}writeValue(e){Promise.resolve(null).then(()=>this._assignOptionValue(e))}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this._element.nativeElement.disabled=e}_handleKeydown(e){let t=e,n=t.keyCode,a=Ke(t);if(n===27&&!a&&t.preventDefault(),this._valueOnLastKeydown=this._element.nativeElement.value,this.activeOption&&n===13&&this.panelOpen&&!a)this.activeOption._selectViaInteraction(),this._resetActiveItem(),t.preventDefault();else if(this.autocomplete){let r=this.autocomplete._keyManager.activeItem,u=n===38||n===40;n===9||u&&!a&&this.panelOpen?this.autocomplete._keyManager.onKeydown(t):u&&this._canOpen()&&this._openPanelInternal(this._valueOnLastKeydown),(u||this.autocomplete._keyManager.activeItem!==r)&&(this._scrollToOption(this.autocomplete._keyManager.activeItemIndex||0),this.autocomplete.autoSelectActiveOption&&this.activeOption&&(this._pendingAutoselectedOption||(this._valueBeforeAutoSelection=this._valueOnLastKeydown),this._pendingAutoselectedOption=this.activeOption,this._assignOptionValue(this.activeOption.value)))}}_handleInput(e){let t=e.target,n=t.value;if(t.type==="number"&&(n=n==""?null:parseFloat(n)),this._previousValue!==n){if(this._previousValue=n,this._pendingAutoselectedOption=null,(!this.autocomplete||!this.autocomplete.requireSelection)&&this._onChange(n),!n)this._clearPreviousSelectedOption(null,!1);else if(this.panelOpen&&!this.autocomplete.requireSelection){let a=this.autocomplete.options?.find(r=>r.selected);if(a){let r=this._getDisplayValue(a.value);n!==r&&a.deselect(!1)}}if(this._canOpen()&&this._hasFocus()){let a=this._valueOnLastKeydown??this._element.nativeElement.value;this._valueOnLastKeydown=null,this._openPanelInternal(a)}}}_handleFocus(){this._canOpenOnNextFocus?this._canOpen()&&(this._previousValue=this._element.nativeElement.value,this._attachOverlay(this._previousValue),this._floatLabel(!0)):this._canOpenOnNextFocus=!0}_handleClick(){this._canOpen()&&!this.panelOpen&&this._openPanelInternal()}_hasFocus(){return Dn()===this._element.nativeElement}_floatLabel(e=!1){this._formField&&this._formField.floatLabel==="auto"&&(e?this._formField._animateAndLockLabel():this._formField.floatLabel="always",this._manuallyFloatingLabel=!0)}_resetLabel(){this._manuallyFloatingLabel&&(this._formField&&(this._formField.floatLabel="auto"),this._manuallyFloatingLabel=!1)}_subscribeToClosingActions(){let e=new Nt(n=>{Ge(()=>{n.next()},{injector:this._environmentInjector})}),t=this.autocomplete.options?.changes.pipe(wi(()=>this._positionStrategy.reapplyLastPosition()),sd(0))??ge();return Xe(e,t).pipe($e(()=>this._zone.run(()=>{let n=this.panelOpen;return this._resetActiveItem(),this._updatePanelState(),this._changeDetectorRef.detectChanges(),this.panelOpen&&this._overlayRef.updatePosition(),n!==this.panelOpen&&(this.panelOpen?this._emitOpened():this.autocomplete.closed.emit()),this.panelClosingActions})),pt(1)).subscribe(n=>this._setValueAndClose(n))}_emitOpened(){this.autocomplete.opened.emit()}_destroyPanel(){this._overlayRef&&(this.closePanel(),this._overlayRef.dispose(),this._overlayRef=null)}_getDisplayValue(e){let t=this.autocomplete;return t&&t.displayWith?t.displayWith(e):e}_assignOptionValue(e){let t=this._getDisplayValue(e);e==null&&this._clearPreviousSelectedOption(null,!1),this._updateNativeInputValue(t??"")}_updateNativeInputValue(e){this._formField?this._formField._control.value=e:this._element.nativeElement.value=e,this._previousValue=e}_setValueAndClose(e){let t=this.autocomplete,n=e?e.source:this._pendingAutoselectedOption;n?(this._clearPreviousSelectedOption(n),this._assignOptionValue(n.value),this._onChange(n.value),t._emitSelectEvent(n),this._element.nativeElement.focus()):t.requireSelection&&this._element.nativeElement.value!==this._valueOnAttach&&(this._clearPreviousSelectedOption(null),this._assignOptionValue(null),this._onChange(null)),this.closePanel()}_clearPreviousSelectedOption(e,t){this.autocomplete?.options?.forEach(n=>{n!==e&&n.selected&&n.deselect(t)})}_openPanelInternal(e=this._element.nativeElement.value){this._attachOverlay(e),this._floatLabel()}_attachOverlay(e){if(!this.autocomplete)return;let t=this._overlayRef;t?(this._positionStrategy.setOrigin(this._getConnectedElement()),t.updateSize({width:this._getPanelWidth()})):(this._portal=new Wt(this.autocomplete.template,this._viewContainerRef,{id:this._formField?.getLabelId()}),t=ri(this._injector,this._getOverlayConfig()),this._overlayRef=t,this._viewportSubscription=this._viewportRuler.change().subscribe(()=>{this.panelOpen&&t&&t.updateSize({width:this._getPanelWidth()})}),this._handsetLandscapeSubscription=this._breakpointObserver.observe(Kr.HandsetLandscape).subscribe(a=>{a.matches?this._positionStrategy.withFlexibleDimensions(!0).withGrowAfterOpen(!0).withViewportMargin(8):this._positionStrategy.withFlexibleDimensions(!1).withGrowAfterOpen(!1).withViewportMargin(0)})),t&&!t.hasAttached()&&(t.attach(this._portal),this._valueOnAttach=e,this._valueOnLastKeydown=null,this._closingActionsSubscription=this._subscribeToClosingActions());let n=this.panelOpen;this.autocomplete._isOpen=this._overlayAttached=!0,this.autocomplete._latestOpeningTrigger=this,this.autocomplete._setColor(this._formField?.color),this._updatePanelState(),this.panelOpen&&n!==this.panelOpen&&this._emitOpened()}_handlePanelKeydown=e=>{(e.keyCode===27&&!Ke(e)||e.keyCode===38&&Ke(e,"altKey"))&&(this._pendingAutoselectedOption&&(this._updateNativeInputValue(this._valueBeforeAutoSelection??""),this._pendingAutoselectedOption=null),this._closeKeyEventStream.next(),this._resetActiveItem(),e.stopPropagation(),e.preventDefault())};_updatePanelState(){if(this.autocomplete._setVisibility(),this.panelOpen){let e=this._overlayRef;this._keydownSubscription||(this._keydownSubscription=e.keydownEvents().subscribe(this._handlePanelKeydown)),this._outsideClickSubscription||(this._outsideClickSubscription=e.outsidePointerEvents().subscribe())}else this._keydownSubscription?.unsubscribe(),this._outsideClickSubscription?.unsubscribe(),this._keydownSubscription=this._outsideClickSubscription=void 0}_getOverlayConfig(){return new ai({positionStrategy:this._getOverlayPosition(),scrollStrategy:this._scrollStrategy(),width:this._getPanelWidth(),direction:this._dir??void 0,hasBackdrop:this._defaults?.hasBackdrop,backdropClass:this._defaults?.backdropClass||"cdk-overlay-transparent-backdrop",panelClass:this._overlayPanelClass,disableAnimations:this._animationsDisabled})}_getOverlayPosition(){let e=hn(this._injector,this._getConnectedElement()).withFlexibleDimensions(!1).withPush(!1).withPopoverLocation("inline");return this._setStrategyPositions(e),this._positionStrategy=e,e}_setStrategyPositions(e){let t=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],n=this._aboveClass,a=[{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:n},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",panelClass:n}],r;this.position==="above"?r=a:this.position==="below"?r=t:r=[...t,...a],e.withPositions(r)}_getConnectedElement(){return this.connectedTo?this.connectedTo.elementRef:this._formField?this._formField.getConnectedOverlayOrigin():this._element}_getPanelWidth(){return this.autocomplete.panelWidth||this._getHostWidth()}_getHostWidth(){return this._getConnectedElement().nativeElement.getBoundingClientRect().width}_resetActiveItem(){let e=this.autocomplete;if(e.autoActiveFirstOption){let t=-1;for(let n=0;n<e.options.length;n++)if(!e.options.get(n).disabled){t=n;break}e._keyManager.setActiveItem(t)}else e._keyManager.setActiveItem(-1)}_canOpen(){let e=this._element.nativeElement;return!e.readOnly&&!e.disabled&&!this.autocompleteDisabled}_scrollToOption(e){let t=this.autocomplete,n=Us(e,t.options,t.optionGroups);if(e===0&&n===1)t._setScrollTop(0);else if(t.panel){let a=t.options.toArray()[e];if(a){let r=a._getHostElement(),u=$s(r.offsetTop,r.offsetHeight,t._getScrollTop(),t.panel.nativeElement.offsetHeight);t._setScrollTop(u)}}}static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,selectors:[["input","matAutocomplete",""],["textarea","matAutocomplete",""]],hostAttrs:[1,"mat-mdc-autocomplete-trigger"],hostVars:7,hostBindings:function(t,n){t&1&&S("focusin",function(){return n._handleFocus()})("blur",function(){return n._onTouched()})("input",function(r){return n._handleInput(r)})("keydown",function(r){return n._handleKeydown(r)})("click",function(){return n._handleClick()}),t&2&&J("autocomplete",n.autocompleteAttribute)("role",n.autocompleteDisabled?null:"combobox")("aria-autocomplete",n.autocompleteDisabled?null:"list")("aria-activedescendant",n.panelOpen&&n.activeOption?n.activeOption.id:null)("aria-expanded",n.autocompleteDisabled?null:n.panelOpen.toString())("aria-controls",n.autocompleteDisabled||!n.panelOpen?null:n.autocomplete?.id)("aria-haspopup",n.autocompleteDisabled?null:"listbox")},inputs:{autocomplete:[0,"matAutocomplete","autocomplete"],position:[0,"matAutocompletePosition","position"],connectedTo:[0,"matAutocompleteConnectedTo","connectedTo"],autocompleteAttribute:[0,"autocomplete","autocompleteAttribute"],autocompleteDisabled:[2,"matAutocompleteDisabled","autocompleteDisabled",z]},exportAs:["matAutocompleteTrigger"],features:[le([Q0]),Ie]})}return i})(),Qi=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=U({type:i});static \u0275inj=H({imports:[Jt,Qo,Ri,Qo,ce]})}return i})();var eb=["trigger"],tb=["panel"],ib=[[["mat-select-trigger"]],"*"],nb=["mat-select-trigger","*"];function ob(i,o){if(i&1&&(s(0,"span",4),d(1),l()),i&2){let e=v();c(),I(e.placeholder)}}function ab(i,o){i&1&&W(0)}function rb(i,o){if(i&1&&(s(0,"span",11),d(1),l()),i&2){let e=v(2);c(),I(e.triggerValue)}}function sb(i,o){if(i&1&&(s(0,"span",5),w(1,ab,1,0)(2,rb,2,1,"span",11),l()),i&2){let e=v();c(),D(e.customTrigger?1:2)}}function lb(i,o){if(i&1){let e=_e();s(0,"div",12,1),S("keydown",function(n){ne(e);let a=v();return oe(a._handleKeydown(n))}),W(2,1),l()}if(i&2){let e=v();at(e.panelClass),p("mat-select-panel-animations-enabled",!e._animationsDisabled)("mat-primary",e._parentFormField?.color==="primary")("mat-accent",e._parentFormField?.color==="accent")("mat-warn",e._parentFormField?.color==="warn")("mat-undefined",!e._parentFormField?.color),J("id",e.id+"-panel")("aria-multiselectable",e.multiple)("aria-label",e.ariaLabel||null)("aria-labelledby",e._getPanelAriaLabelledby())}}var cb=new k("mat-select-scroll-strategy",{providedIn:"root",factory:()=>{let i=m(Z);return()=>Fi(i)}}),db=new k("MAT_SELECT_CONFIG"),mb=new k("MatSelectTrigger"),qc=class{source;value;constructor(o,e){this.source=o,this.value=e}},Ji=(()=>{class i{_viewportRuler=m(ni);_changeDetectorRef=m(se);_elementRef=m(B);_dir=m(Ze,{optional:!0});_idGenerator=m(De);_renderer=m(we);_parentFormField=m(ro,{optional:!0});ngControl=m(fi,{self:!0,optional:!0});_liveAnnouncer=m(Ta);_defaultOptions=m(db,{optional:!0});_animationsDisabled=ye();_popoverLocation;_initialized=new O;_cleanupDetach;options;optionGroups;customTrigger;_positions=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:"mat-mdc-select-panel-above"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",panelClass:"mat-mdc-select-panel-above"}];_scrollOptionIntoView(e){let t=this.options.toArray()[e];if(t){let n=this.panel.nativeElement,a=Us(e,this.options,this.optionGroups),r=t._getHostElement();e===0&&a===1?n.scrollTop=0:n.scrollTop=$s(r.offsetTop,r.offsetHeight,n.scrollTop,n.offsetHeight)}}_positioningSettled(){this._scrollOptionIntoView(this._keyManager.activeItemIndex||0)}_getChangeEvent(e){return new qc(this,e)}_scrollStrategyFactory=m(cb);_panelOpen=!1;_compareWith=(e,t)=>e===t;_uid=this._idGenerator.getId("mat-select-");_triggerAriaLabelledBy=null;_previousControl;_destroy=new O;_errorStateTracker;stateChanges=new O;disableAutomaticLabeling=!0;userAriaDescribedBy;_selectionModel;_keyManager;_preferredOverlayOrigin;_overlayWidth;_onChange=()=>{};_onTouched=()=>{};_valueId=this._idGenerator.getId("mat-select-value-");_scrollStrategy;_overlayPanelClass=this._defaultOptions?.overlayPanelClass||"";get focused(){return this._focused||this._panelOpen}_focused=!1;controlType="mat-select";trigger;panel;_overlayDir;panelClass;disabled=!1;get disableRipple(){return this._disableRipple()}set disableRipple(e){this._disableRipple.set(e)}_disableRipple=E(!1);tabIndex=0;get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=e,this._syncParentProperties()}_hideSingleSelectionIndicator=this._defaultOptions?.hideSingleSelectionIndicator??!1;get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.stateChanges.next()}_placeholder;get required(){return this._required??this.ngControl?.control?.hasValidator(Qe.required)??!1}set required(e){this._required=e,this.stateChanges.next()}_required;get multiple(){return this._multiple}set multiple(e){this._selectionModel,this._multiple=e}_multiple=!1;disableOptionCentering=this._defaultOptions?.disableOptionCentering??!1;get compareWith(){return this._compareWith}set compareWith(e){this._compareWith=e,this._selectionModel&&this._initializeSelection()}get value(){return this._value}set value(e){this._assignValue(e)&&this._onChange(e)}_value;ariaLabel="";ariaLabelledby;get errorStateMatcher(){return this._errorStateTracker.matcher}set errorStateMatcher(e){this._errorStateTracker.matcher=e}typeaheadDebounceInterval;sortComparator;get id(){return this._id}set id(e){this._id=e||this._uid,this.stateChanges.next()}_id;get errorState(){return this._errorStateTracker.errorState}set errorState(e){this._errorStateTracker.errorState=e}panelWidth=this._defaultOptions&&typeof this._defaultOptions.panelWidth<"u"?this._defaultOptions.panelWidth:"auto";canSelectNullableOptions=this._defaultOptions?.canSelectNullableOptions??!1;optionSelectionChanges=gn(()=>{let e=this.options;return e?e.changes.pipe(Ee(e),$e(()=>Xe(...e.map(t=>t.onSelectionChange)))):this._initialized.pipe($e(()=>this.optionSelectionChanges))});openedChange=new X;_openedStream=this.openedChange.pipe(ke(e=>e),Ve(()=>{}));_closedStream=this.openedChange.pipe(ke(e=>!e),Ve(()=>{}));selectionChange=new X;valueChange=new X;constructor(){let e=m(Ho),t=m(ja,{optional:!0}),n=m($t,{optional:!0}),a=m(new zi("tabindex"),{optional:!0}),r=m(tr,{optional:!0});this.ngControl&&(this.ngControl.valueAccessor=this),this._defaultOptions?.typeaheadDebounceInterval!=null&&(this.typeaheadDebounceInterval=this._defaultOptions.typeaheadDebounceInterval),this._errorStateTracker=new Uo(e,this.ngControl,n,t,this.stateChanges),this._scrollStrategy=this._scrollStrategyFactory(),this.tabIndex=a==null?0:parseInt(a)||0,this._popoverLocation=r?.usePopover===!1?null:"inline",this.id=this.id}ngOnInit(){this._selectionModel=new Xa(this.multiple),this.stateChanges.next(),this._viewportRuler.change().pipe(ue(this._destroy)).subscribe(()=>{this.panelOpen&&(this._overlayWidth=this._getOverlayWidth(this._preferredOverlayOrigin),this._changeDetectorRef.detectChanges())})}ngAfterContentInit(){this._initialized.next(),this._initialized.complete(),this._initKeyManager(),this._selectionModel.changed.pipe(ue(this._destroy)).subscribe(e=>{e.added.forEach(t=>t.select()),e.removed.forEach(t=>t.deselect())}),this.options.changes.pipe(Ee(null),ue(this._destroy)).subscribe(()=>{this._resetOptions(),this._initializeSelection()})}ngDoCheck(){let e=this._getTriggerAriaLabelledby(),t=this.ngControl;if(e!==this._triggerAriaLabelledBy){let n=this._elementRef.nativeElement;this._triggerAriaLabelledBy=e,e?n.setAttribute("aria-labelledby",e):n.removeAttribute("aria-labelledby")}t&&(this._previousControl!==t.control&&(this._previousControl!==void 0&&t.disabled!==null&&t.disabled!==this.disabled&&(this.disabled=t.disabled),this._previousControl=t.control),this.updateErrorState())}ngOnChanges(e){(e.disabled||e.userAriaDescribedBy)&&this.stateChanges.next(),e.typeaheadDebounceInterval&&this._keyManager&&this._keyManager.withTypeAhead(this.typeaheadDebounceInterval),e.panelClass&&this.panelClass instanceof Set&&(this.panelClass=Array.from(this.panelClass))}ngOnDestroy(){this._cleanupDetach?.(),this._keyManager?.destroy(),this._destroy.next(),this._destroy.complete(),this.stateChanges.complete()}toggle(){this.panelOpen?this.close():this.open()}open(){this._canOpen()&&(this._parentFormField&&(this._preferredOverlayOrigin=this._parentFormField.getConnectedOverlayOrigin()),this._cleanupDetach?.(),this._overlayWidth=this._getOverlayWidth(this._preferredOverlayOrigin),this._panelOpen=!0,this._overlayDir.positionChange.pipe(pt(1)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this._positioningSettled()}),this._overlayDir.attachOverlay(),this._keyManager.withHorizontalOrientation(null),this._highlightCorrectOption(),this._changeDetectorRef.markForCheck(),this.stateChanges.next(),Promise.resolve().then(()=>this.openedChange.emit(!0)))}close(){this._panelOpen&&(this._panelOpen=!1,this._exitAndDetach(),this._keyManager.withHorizontalOrientation(this._isRtl()?"rtl":"ltr"),this._changeDetectorRef.markForCheck(),this._onTouched(),this.stateChanges.next(),Promise.resolve().then(()=>this.openedChange.emit(!1)))}_exitAndDetach(){if(this._animationsDisabled||!this.panel){this._detachOverlay();return}this._cleanupDetach?.(),this._cleanupDetach=()=>{t(),clearTimeout(n),this._cleanupDetach=void 0};let e=this.panel.nativeElement,t=this._renderer.listen(e,"animationend",a=>{a.animationName==="_mat-select-exit"&&(this._cleanupDetach?.(),this._detachOverlay())}),n=setTimeout(()=>{this._cleanupDetach?.(),this._detachOverlay()},200);e.classList.add("mat-select-panel-exit")}_detachOverlay(){this._overlayDir.detachOverlay(),this._changeDetectorRef.markForCheck()}writeValue(e){this._assignValue(e)}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e,this._changeDetectorRef.markForCheck(),this.stateChanges.next()}get panelOpen(){return this._panelOpen}get selected(){return this.multiple?this._selectionModel?.selected||[]:this._selectionModel?.selected[0]}get triggerValue(){if(this.empty)return"";if(this._multiple){let e=this._selectionModel.selected.map(t=>t.viewValue);return this._isRtl()&&e.reverse(),e.join(", ")}return this._selectionModel.selected[0].viewValue}updateErrorState(){this._errorStateTracker.updateErrorState()}_isRtl(){return this._dir?this._dir.value==="rtl":!1}_handleKeydown(e){this.disabled||(this.panelOpen?this._handleOpenKeydown(e):this._handleClosedKeydown(e))}_handleClosedKeydown(e){let t=e.keyCode,n=t===40||t===38||t===37||t===39,a=t===13||t===32,r=this._keyManager;if(!r.isTyping()&&a&&!Ke(e)||(this.multiple||e.altKey)&&n)e.preventDefault(),this.open();else if(!this.multiple){let u=this.selected;r.onKeydown(e);let h=this.selected;h&&u!==h&&this._liveAnnouncer.announce(h.viewValue,1e4)}}_handleOpenKeydown(e){let t=this._keyManager,n=e.keyCode,a=n===40||n===38,r=t.isTyping();if(a&&e.altKey)e.preventDefault(),this.close();else if(!r&&(n===13||n===32)&&t.activeItem&&!Ke(e))e.preventDefault(),t.activeItem._selectViaInteraction();else if(!r&&this._multiple&&n===65&&e.ctrlKey){e.preventDefault();let u=this.options.some(h=>!h.disabled&&!h.selected);this.options.forEach(h=>{h.disabled||(u?h.select():h.deselect())})}else{let u=t.activeItemIndex;t.onKeydown(e),this._multiple&&a&&e.shiftKey&&t.activeItem&&t.activeItemIndex!==u&&t.activeItem._selectViaInteraction()}}_handleOverlayKeydown(e){e.keyCode===27&&!Ke(e)&&(e.preventDefault(),this.close())}_onFocus(){this.disabled||(this._focused=!0,this.stateChanges.next())}_onBlur(){this._focused=!1,this._keyManager?.cancelTypeahead(),!this.disabled&&!this.panelOpen&&(this._onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next())}get empty(){return!this._selectionModel||this._selectionModel.isEmpty()}_initializeSelection(){Promise.resolve().then(()=>{this.ngControl&&(this._value=this.ngControl.value),this._setSelectionByValue(this._value),this.stateChanges.next()})}_setSelectionByValue(e){if(this.options.forEach(t=>t.setInactiveStyles()),this._selectionModel.clear(),this.multiple&&e)Array.isArray(e),e.forEach(t=>this._selectOptionByValue(t)),this._sortValues();else{let t=this._selectOptionByValue(e);t?this._keyManager.updateActiveItem(t):this.panelOpen||this._keyManager.updateActiveItem(-1)}this._changeDetectorRef.markForCheck()}_selectOptionByValue(e){let t=this.options.find(n=>{if(this._selectionModel.isSelected(n))return!1;try{return(n.value!=null||this.canSelectNullableOptions)&&this._compareWith(n.value,e)}catch(a){return!1}});return t&&this._selectionModel.select(t),t}_assignValue(e){return e!==this._value||this._multiple&&Array.isArray(e)?(this.options&&this._setSelectionByValue(e),this._value=e,!0):!1}_skipPredicate=e=>this.panelOpen?!1:e.disabled;_getOverlayWidth(e){return this.panelWidth==="auto"?(e instanceof Ko?e.elementRef:e||this._elementRef).nativeElement.getBoundingClientRect().width:this.panelWidth===null?"":this.panelWidth}_syncParentProperties(){if(this.options)for(let e of this.options)e._changeDetectorRef.markForCheck()}_initKeyManager(){this._keyManager=new io(this.options).withTypeAhead(this.typeaheadDebounceInterval).withVerticalOrientation().withHorizontalOrientation(this._isRtl()?"rtl":"ltr").withHomeAndEnd().withPageUpDown().withAllowedModifierKeys(["shiftKey"]).skipPredicate(this._skipPredicate),this._keyManager.tabOut.subscribe(()=>{this.panelOpen&&(!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction(),this.focus(),this.close())}),this._keyManager.change.subscribe(()=>{this._panelOpen&&this.panel?this._scrollOptionIntoView(this._keyManager.activeItemIndex||0):!this._panelOpen&&!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction()})}_resetOptions(){let e=Xe(this.options.changes,this._destroy);this.optionSelectionChanges.pipe(ue(e)).subscribe(t=>{this._onSelect(t.source,t.isUserInput),t.isUserInput&&!this.multiple&&this._panelOpen&&(this.close(),this.focus())}),Xe(...this.options.map(t=>t._stateChanges)).pipe(ue(e)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this.stateChanges.next()})}_onSelect(e,t){let n=this._selectionModel.isSelected(e);!this.canSelectNullableOptions&&e.value==null&&!this._multiple?(e.deselect(),this._selectionModel.clear(),this.value!=null&&this._propagateChanges(e.value)):(n!==e.selected&&(e.selected?this._selectionModel.select(e):this._selectionModel.deselect(e)),t&&this._keyManager.setActiveItem(e),this.multiple&&(this._sortValues(),t&&this.focus())),n!==this._selectionModel.isSelected(e)&&this._propagateChanges(),this.stateChanges.next()}_sortValues(){if(this.multiple){let e=this.options.toArray();this._selectionModel.sort((t,n)=>this.sortComparator?this.sortComparator(t,n,e):e.indexOf(t)-e.indexOf(n)),this.stateChanges.next()}}_propagateChanges(e){let t;this.multiple?t=this.selected.map(n=>n.value):t=this.selected?this.selected.value:e,this._value=t,this.valueChange.emit(t),this._onChange(t),this.selectionChange.emit(this._getChangeEvent(t)),this._changeDetectorRef.markForCheck()}_highlightCorrectOption(){if(this._keyManager)if(this.empty){let e=-1;for(let t=0;t<this.options.length;t++)if(!this.options.get(t).disabled){e=t;break}this._keyManager.setActiveItem(e)}else this._keyManager.setActiveItem(this._selectionModel.selected[0])}_canOpen(){return!this._panelOpen&&!this.disabled&&this.options?.length>0&&!!this._overlayDir}focus(e){this._elementRef.nativeElement.focus(e)}_getPanelAriaLabelledby(){if(this.ariaLabel)return null;let e=this._parentFormField?.getLabelId()||null,t=e?e+" ":"";return this.ariaLabelledby?t+this.ariaLabelledby:e}_getAriaActiveDescendant(){return this.panelOpen&&this._keyManager&&this._keyManager.activeItem?this._keyManager.activeItem.id:null}_getTriggerAriaLabelledby(){if(this.ariaLabel)return null;let e=this._parentFormField?.getLabelId()||"";return this.ariaLabelledby&&(e+=" "+this.ariaLabelledby),e||(e=this._valueId),e}get describedByIds(){return this._elementRef.nativeElement.getAttribute("aria-describedby")?.split(" ")||[]}setDescribedByIds(e){let t=this._elementRef.nativeElement;e.length?t.setAttribute("aria-describedby",e.join(" ")):t.removeAttribute("aria-describedby")}onContainerClick(e){let t=mt(e);t&&(t.tagName==="MAT-OPTION"||t.classList.contains("cdk-overlay-backdrop")||t.closest(".mat-mdc-select-panel"))||(this.focus(),this.open())}get shouldLabelFloat(){return this.panelOpen||!this.empty||this.focused&&!!this.placeholder}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=R({type:i,selectors:[["mat-select"]],contentQueries:function(t,n,a){if(t&1&&dt(a,mb,5)(a,Dt,5)(a,rr,5),t&2){let r;N(r=L())&&(n.customTrigger=r.first),N(r=L())&&(n.options=r),N(r=L())&&(n.optionGroups=r)}},viewQuery:function(t,n){if(t&1&&Re(eb,5)(tb,5)(Os,5),t&2){let a;N(a=L())&&(n.trigger=a.first),N(a=L())&&(n.panel=a.first),N(a=L())&&(n._overlayDir=a.first)}},hostAttrs:["role","combobox","aria-haspopup","listbox",1,"mat-mdc-select"],hostVars:21,hostBindings:function(t,n){t&1&&S("keydown",function(r){return n._handleKeydown(r)})("focus",function(){return n._onFocus()})("blur",function(){return n._onBlur()}),t&2&&(J("id",n.id)("tabindex",n.disabled?-1:n.tabIndex)("aria-controls",n.panelOpen?n.id+"-panel":null)("aria-expanded",n.panelOpen)("aria-label",n.ariaLabel||null)("aria-required",n.required.toString())("aria-disabled",n.disabled.toString())("aria-invalid",n.errorState)("aria-activedescendant",n._getAriaActiveDescendant()),p("mat-mdc-select-disabled",n.disabled)("mat-mdc-select-invalid",n.errorState)("mat-mdc-select-required",n.required)("mat-mdc-select-empty",n.empty)("mat-mdc-select-multiple",n.multiple)("mat-select-open",n.panelOpen))},inputs:{userAriaDescribedBy:[0,"aria-describedby","userAriaDescribedBy"],panelClass:"panelClass",disabled:[2,"disabled","disabled",z],disableRipple:[2,"disableRipple","disableRipple",z],tabIndex:[2,"tabIndex","tabIndex",e=>e==null?0:jt(e)],hideSingleSelectionIndicator:[2,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",z],placeholder:"placeholder",required:[2,"required","required",z],multiple:[2,"multiple","multiple",z],disableOptionCentering:[2,"disableOptionCentering","disableOptionCentering",z],compareWith:"compareWith",value:"value",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],errorStateMatcher:"errorStateMatcher",typeaheadDebounceInterval:[2,"typeaheadDebounceInterval","typeaheadDebounceInterval",jt],sortComparator:"sortComparator",id:"id",panelWidth:"panelWidth",canSelectNullableOptions:[2,"canSelectNullableOptions","canSelectNullableOptions",z]},outputs:{openedChange:"openedChange",_openedStream:"opened",_closedStream:"closed",selectionChange:"selectionChange",valueChange:"valueChange"},exportAs:["matSelect"],features:[le([{provide:Ua,useExisting:i},{provide:ar,useExisting:i}]),Ie],ngContentSelectors:nb,decls:11,vars:10,consts:[["fallbackOverlayOrigin","cdkOverlayOrigin","trigger",""],["panel",""],["cdk-overlay-origin","",1,"mat-mdc-select-trigger",3,"click"],[1,"mat-mdc-select-value"],[1,"mat-mdc-select-placeholder","mat-mdc-select-min-line"],[1,"mat-mdc-select-value-text"],[1,"mat-mdc-select-arrow-wrapper"],[1,"mat-mdc-select-arrow"],["viewBox","0 0 24 24","width","24px","height","24px","focusable","false","aria-hidden","true"],["d","M7 10l5 5 5-5z"],["cdk-connected-overlay","","cdkConnectedOverlayHasBackdrop","","cdkConnectedOverlayBackdropClass","cdk-overlay-transparent-backdrop",3,"detach","backdropClick","overlayKeydown","cdkConnectedOverlayDisableClose","cdkConnectedOverlayPanelClass","cdkConnectedOverlayScrollStrategy","cdkConnectedOverlayOrigin","cdkConnectedOverlayPositions","cdkConnectedOverlayWidth","cdkConnectedOverlayFlexibleDimensions","cdkConnectedOverlayUsePopover"],[1,"mat-mdc-select-min-line"],["role","listbox","tabindex","-1",1,"mat-mdc-select-panel","mdc-menu-surface","mdc-menu-surface--open",3,"keydown"]],template:function(t,n){if(t&1&&(ve(ib),s(0,"div",2,0),S("click",function(){return n.open()}),s(3,"div",3),w(4,ob,2,1,"span",4)(5,sb,3,1,"span",5),l(),s(6,"div",6)(7,"div",7),Bi(),s(8,"svg",8),_(9,"path",9),l()()()(),We(10,lb,3,16,"ng-template",10),S("detach",function(){return n.close()})("backdropClick",function(){return n.close()})("overlayKeydown",function(r){return n._handleOverlayKeydown(r)})),t&2){let a=Se(1);c(3),J("id",n._valueId),c(),D(n.empty?4:5),c(6),x("cdkConnectedOverlayDisableClose",!0)("cdkConnectedOverlayPanelClass",n._overlayPanelClass)("cdkConnectedOverlayScrollStrategy",n._scrollStrategy)("cdkConnectedOverlayOrigin",n._preferredOverlayOrigin||a)("cdkConnectedOverlayPositions",n._positions)("cdkConnectedOverlayWidth",n._overlayWidth)("cdkConnectedOverlayFlexibleDimensions",!0)("cdkConnectedOverlayUsePopover",n._popoverLocation)}},dependencies:[Ko,Os],styles:[`@keyframes _mat-select-enter {
3952
3952
  from {
3953
3953
  opacity: 0;
3954
3954
  transform: scaleY(0.8);
@@ -4137,7 +4137,7 @@ div.mat-mdc-select-panel {
4137
4137
  .mat-form-field-appearance-fill .mat-mdc-select-arrow-wrapper {
4138
4138
  transform: var(--mat-select-arrow-transform, translateY(-8px));
4139
4139
  }
4140
- `],encapsulation:2})}return i})();var en=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=U({type:i});static \u0275inj=H({imports:[Qt,Qo,ce,Ri,Mt,Qo]})}return i})();var Vn=["no","on-success","on-failure","on-abnormal","on-watchdog","on-abort","always"];function Bn(i){return{userHint:P(()=>i()?"empty \u2192 LocalSystem":"empty \u2192 root"),userPlaceholder:P(()=>i()?"llama or HOST\\user":"llama"),groupHint:P(()=>i()?"not used on Windows":"systemd Group="),isGroupDisabled:P(()=>i())}}function zn(i,o){Bt(()=>{for(let[e,t]of Object.entries(o())){let n=i.get(e);n&&(t&&n.enabled?n.disable({emitEvent:!1}):!t&&n.disabled&&n.enable({emitEvent:!1}))}})}function jn(i,o){return e=>{let t=String(e.value??"").trim();return!t||t===o?null:i.some(n=>n.name===t)?{nameTaken:!0}:null}}var mb=(i,o)=>o.command;function ub(i,o){i&1&&(s(0,"mat-error"),d(1,"Required"),l())}function hb(i,o){i&1&&(s(0,"mat-error"),d(1,"Starts with letter, alphanumeric + hyphens/underscores, max 128 chars"),l())}function pb(i,o){i&1&&(s(0,"mat-error"),d(1,"Another service already uses this name"),l())}function fb(i,o){i&1&&(s(0,"mat-error"),d(1,"Required"),l())}function gb(i,o){if(i&1&&(s(0,"mat-option",6)(1,"span",17),d(2),l(),s(3,"span",18),d(4),l()()),i&2){let e=o.$implicit;x("value",e.command),c(2),I(e.command),c(2),Q("(",e.from,")")}}function _b(i,o){if(i&1&&(s(0,"mat-option",6),d(1),l()),i&2){let e=o.$implicit;x("value",e),c(),I(e==="no"?"no (default)":e)}}var vb="^[a-zA-Z][a-zA-Z0-9_-]{0,127}$",yp=(()=>{class i{constructor(){this.fb=m(Gi),this.dialogRef=m(et),this.data=m(Ni),this.isEdit=this.data.config!==null,this.isClone=this.data.clone===!0,this.form=this.fb.group({name:[this.data.config?.name??"",{validators:[Qe.required,Qe.pattern(vb),jn(this.data.allConfigs??[],this.data.config?.name??null)]}],command:[this.data.config?.command??"",Qe.required],flagsText:[""],envText:[""],user:[this.data.config?.user??""],group:[this.data.config?.group??""],restart:[this.data.config?.restart??"no"]}),this.restartOptions=Vn,this.system=m(Ot),this.runAs=Bn(this.system.windows),this.lockedFields=zn(this.form,()=>({group:this.runAs.isGroupDisabled()})),this.allExistingCommands=P(()=>{let e=this.data.allConfigs??[],t=this.data.config?.name??null,n=new Set,a=[];for(let r of e)r.name!==t&&(n.has(r.command)||(n.add(r.command),a.push({command:r.command,from:r.name})));return a}),this._commandValue=E(this.data.config?.command??""),this.commandValue=this._commandValue.asReadonly(),this.filteredCommands=P(()=>{let e=this.commandValue()?.toLowerCase()??"";return this.allExistingCommands().filter(t=>t.command.toLowerCase().includes(e)||t.from.toLowerCase().includes(e))})}get nameControl(){return this.form.get("name")}get commandControl(){return this.form.get("command")}ngOnInit(){if(this.system.detectWindows(),this.commandControl.valueChanges.subscribe(e=>this._commandValue.set(e)),this.data.config?.flags?.length&&this.form.get("flagsText").setValue(this.data.config.flags.join(`
4140
+ `],encapsulation:2})}return i})();var en=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=U({type:i});static \u0275inj=H({imports:[Jt,Qo,ce,Ri,Mt,Qo]})}return i})();var Vn=["no","on-success","on-failure","on-abnormal","on-watchdog","on-abort","always"];function Bn(i){return{userHint:P(()=>i()?"empty \u2192 LocalSystem":"empty \u2192 root"),userPlaceholder:P(()=>i()?"llama or HOST\\user":"llama"),groupHint:P(()=>i()?"not used on Windows":"systemd Group="),isGroupDisabled:P(()=>i())}}function zn(i,o){Bt(()=>{for(let[e,t]of Object.entries(o())){let n=i.get(e);n&&(t&&n.enabled?n.disable({emitEvent:!1}):!t&&n.disabled&&n.enable({emitEvent:!1}))}})}function jn(i,o){return e=>{let t=String(e.value??"").trim();return!t||t===o?null:i.some(n=>n.name===t)?{nameTaken:!0}:null}}var ub=(i,o)=>o.command;function hb(i,o){i&1&&(s(0,"mat-error"),d(1,"Required"),l())}function pb(i,o){i&1&&(s(0,"mat-error"),d(1,"Starts with letter, alphanumeric + hyphens/underscores, max 128 chars"),l())}function fb(i,o){i&1&&(s(0,"mat-error"),d(1,"Another service already uses this name"),l())}function gb(i,o){i&1&&(s(0,"mat-error"),d(1,"Required"),l())}function _b(i,o){if(i&1&&(s(0,"mat-option",6)(1,"span",17),d(2),l(),s(3,"span",18),d(4),l()()),i&2){let e=o.$implicit;x("value",e.command),c(2),I(e.command),c(2),Q("(",e.from,")")}}function vb(i,o){if(i&1&&(s(0,"mat-option",6),d(1),l()),i&2){let e=o.$implicit;x("value",e),c(),I(e==="no"?"no (default)":e)}}var bb="^[a-zA-Z][a-zA-Z0-9_-]{0,127}$",yp=(()=>{class i{constructor(){this.fb=m(Gi),this.dialogRef=m(et),this.data=m(Ni),this.isEdit=this.data.config!==null,this.isClone=this.data.clone===!0,this.form=this.fb.group({name:[this.data.config?.name??"",{validators:[Qe.required,Qe.pattern(bb),jn(this.data.allConfigs??[],this.data.config?.name??null)]}],command:[this.data.config?.command??"",Qe.required],flagsText:[""],envText:[""],user:[this.data.config?.user??""],group:[this.data.config?.group??""],restart:[this.data.config?.restart??"no"]}),this.restartOptions=Vn,this.system=m(Ot),this.runAs=Bn(this.system.windows),this.lockedFields=zn(this.form,()=>({group:this.runAs.isGroupDisabled()})),this.allExistingCommands=P(()=>{let e=this.data.allConfigs??[],t=this.data.config?.name??null,n=new Set,a=[];for(let r of e)r.name!==t&&(n.has(r.command)||(n.add(r.command),a.push({command:r.command,from:r.name})));return a}),this._commandValue=E(this.data.config?.command??""),this.commandValue=this._commandValue.asReadonly(),this.filteredCommands=P(()=>{let e=this.commandValue()?.toLowerCase()??"";return this.allExistingCommands().filter(t=>t.command.toLowerCase().includes(e)||t.from.toLowerCase().includes(e))})}get nameControl(){return this.form.get("name")}get commandControl(){return this.form.get("command")}ngOnInit(){if(this.system.detectWindows(),this.commandControl.valueChanges.subscribe(e=>this._commandValue.set(e)),this.data.config?.flags?.length&&this.form.get("flagsText").setValue(this.data.config.flags.join(`
4141
4141
  `)+`
4142
4142
  `),this.data.config?.environment){let e=Object.entries(this.data.config.environment).map(([t,n])=>`${t}=${n}`).join(`
4143
4143
  `);e&&this.form.get("envText").setValue(e+`
@@ -4147,7 +4147,7 @@ div.mat-mdc-select-panel {
4147
4147
  --ctx-size 4096
4148
4148
  --verbose`,1,"flags-textarea"],[1,"run-as-row"],["appearance","outline",1,"half-width"],["matInput","","formControlName","user",3,"placeholder"],["matInput","","formControlName","group","placeholder","ai"],["formControlName","restart"],["matInput","","formControlName","envText","rows","4","wrap","off","placeholder",`HF_HOME=/data/huggingface
4149
4149
  CUDA_VISIBLE_DEVICES=0,1
4150
- MY_API_KEY=secret`,1,"env-textarea"],["align","end"],["mat-stroked-button","",3,"click"],["mat-raised-button","","color","primary",3,"click","disabled"],[1,"auto-path"],[1,"auto-from"]],template:function(t,n){if(t&1&&(s(0,"h2",1),d(1),l(),s(2,"mat-dialog-content")(3,"form",2)(4,"mat-form-field",3),_(5,"input",4),y(),s(6,"mat-label"),d(7,"Service Name"),l(),w(8,ub,2,0,"mat-error")(9,hb,2,0,"mat-error")(10,pb,2,0,"mat-error"),l(),s(11,"mat-form-field",3),_(12,"input",5),y(),s(13,"mat-label"),d(14,"Command (absolute path)"),l(),w(15,fb,2,0,"mat-error"),l(),s(16,"mat-autocomplete",null,0),ee(18,gb,5,3,"mat-option",6,mb),l(),s(20,"mat-form-field",3),_(21,"textarea",7),y(),s(22,"mat-label"),d(23,"CLI Flags (one per line)"),l()(),s(24,"div",8)(25,"mat-form-field",9),_(26,"input",10),y(),s(27,"mat-label"),d(28,"Run as user"),l(),s(29,"mat-hint"),d(30),l()(),s(31,"mat-form-field",9),_(32,"input",11),y(),s(33,"mat-label"),d(34,"Run as group"),l(),s(35,"mat-hint"),d(36),l()(),s(37,"mat-form-field",9)(38,"mat-select",12),ee(39,_b,2,2,"mat-option",6,Ye),l(),y(),s(41,"mat-label"),d(42,"Restart policy"),l()()(),s(43,"mat-form-field",3),_(44,"textarea",13),y(),s(45,"mat-label"),d(46,"Environment variables (KEY=VALUE, one per line)"),l()()()(),s(47,"mat-dialog-actions",14)(48,"button",15),S("click",function(){return n.cancel()}),d(49,"Cancel"),l(),s(50,"button",16),S("click",function(){return n.save()}),d(51),l()()),t&2){let a=Se(17);c(),Q("",n.isClone?"Clone":n.isEdit?"Edit":"Add"," custom service"),c(2),x("formGroup",n.form),c(2),C(),c(3),D(n.nameControl.errors?.required?8:n.nameControl.errors?.pattern?9:n.nameControl.errors?.nameTaken?10:-1),c(4),x("matAutocomplete",a),C(),c(3),D(n.commandControl.errors?.required?15:-1),c(3),te(n.filteredCommands()),c(3),C(),c(5),x("placeholder",n.runAs.userPlaceholder()),C(),c(4),I(n.runAs.userHint()),c(2),C(),c(4),I(n.runAs.groupHint()),c(2),C(),c(),te(n.restartOptions),c(5),C(),c(6),x("disabled",n.form.invalid),c(),Q(" ",n.isEdit&&!n.isClone?"Save":"Create"," ")}},dependencies:[Me,gi,An,Yt,Zt,$i,Wi,Ut,Ti,Qi,Zi,Dt,Li,ze,Ue,Pt,Rt,ut,_t,jo,qi,en,Ji,st,yt,xt,Ct],styles:[".dialog-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px;min-width:480px}.auto-path[_ngcontent-%COMP%]{font-family:monospace}.auto-from[_ngcontent-%COMP%]{margin-left:8px;opacity:.6;font-size:12px}.full-width[_ngcontent-%COMP%]{width:100%}.run-as-row[_ngcontent-%COMP%]{display:flex;gap:12px}.half-width[_ngcontent-%COMP%]{flex:1;min-width:0}.flags-textarea[_ngcontent-%COMP%], .env-textarea[_ngcontent-%COMP%]{overflow-x:auto}mat-dialog-content[_ngcontent-%COMP%]{padding-top:10px!important}mat-dialog-actions[_ngcontent-%COMP%]{gap:8px}"]})}}return i})();var bb=["*"],Cp=(()=>{class i{labelPosition="after";static \u0275fac=function(t){return new(t||i)};static \u0275cmp=R({type:i,selectors:[["div","mat-internal-form-field",""]],hostAttrs:[1,"mdc-form-field","mat-internal-form-field"],hostVars:2,hostBindings:function(t,n){t&2&&p("mdc-form-field--align-end",n.labelPosition==="before")},inputs:{labelPosition:"labelPosition"},ngContentSelectors:bb,decls:1,vars:0,template:function(t,n){t&1&&(ve(),W(0))},styles:[`.mat-internal-form-field {
4150
+ MY_API_KEY=secret`,1,"env-textarea"],["align","end"],["mat-stroked-button","",3,"click"],["mat-raised-button","","color","primary",3,"click","disabled"],[1,"auto-path"],[1,"auto-from"]],template:function(t,n){if(t&1&&(s(0,"h2",1),d(1),l(),s(2,"mat-dialog-content")(3,"form",2)(4,"mat-form-field",3),_(5,"input",4),y(),s(6,"mat-label"),d(7,"Service Name"),l(),w(8,hb,2,0,"mat-error")(9,pb,2,0,"mat-error")(10,fb,2,0,"mat-error"),l(),s(11,"mat-form-field",3),_(12,"input",5),y(),s(13,"mat-label"),d(14,"Command (absolute path)"),l(),w(15,gb,2,0,"mat-error"),l(),s(16,"mat-autocomplete",null,0),ee(18,_b,5,3,"mat-option",6,ub),l(),s(20,"mat-form-field",3),_(21,"textarea",7),y(),s(22,"mat-label"),d(23,"CLI Flags (one per line)"),l()(),s(24,"div",8)(25,"mat-form-field",9),_(26,"input",10),y(),s(27,"mat-label"),d(28,"Run as user"),l(),s(29,"mat-hint"),d(30),l()(),s(31,"mat-form-field",9),_(32,"input",11),y(),s(33,"mat-label"),d(34,"Run as group"),l(),s(35,"mat-hint"),d(36),l()(),s(37,"mat-form-field",9)(38,"mat-select",12),ee(39,vb,2,2,"mat-option",6,Ye),l(),y(),s(41,"mat-label"),d(42,"Restart policy"),l()()(),s(43,"mat-form-field",3),_(44,"textarea",13),y(),s(45,"mat-label"),d(46,"Environment variables (KEY=VALUE, one per line)"),l()()()(),s(47,"mat-dialog-actions",14)(48,"button",15),S("click",function(){return n.cancel()}),d(49,"Cancel"),l(),s(50,"button",16),S("click",function(){return n.save()}),d(51),l()()),t&2){let a=Se(17);c(),Q("",n.isClone?"Clone":n.isEdit?"Edit":"Add"," custom service"),c(2),x("formGroup",n.form),c(2),C(),c(3),D(n.nameControl.errors?.required?8:n.nameControl.errors?.pattern?9:n.nameControl.errors?.nameTaken?10:-1),c(4),x("matAutocomplete",a),C(),c(3),D(n.commandControl.errors?.required?15:-1),c(3),te(n.filteredCommands()),c(3),C(),c(5),x("placeholder",n.runAs.userPlaceholder()),C(),c(4),I(n.runAs.userHint()),c(2),C(),c(4),I(n.runAs.groupHint()),c(2),C(),c(),te(n.restartOptions),c(5),C(),c(6),x("disabled",n.form.invalid),c(),Q(" ",n.isEdit&&!n.isClone?"Save":"Create"," ")}},dependencies:[Me,gi,An,Zt,Qt,$i,Wi,$t,Ti,Qi,Zi,Dt,Li,ze,Ue,Pt,Rt,ut,_t,jo,qi,en,Ji,st,yt,xt,Ct],styles:[".dialog-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px;min-width:480px}.auto-path[_ngcontent-%COMP%]{font-family:monospace}.auto-from[_ngcontent-%COMP%]{margin-left:8px;opacity:.6;font-size:12px}.full-width[_ngcontent-%COMP%]{width:100%}.run-as-row[_ngcontent-%COMP%]{display:flex;gap:12px}.half-width[_ngcontent-%COMP%]{flex:1;min-width:0}.flags-textarea[_ngcontent-%COMP%], .env-textarea[_ngcontent-%COMP%]{overflow-x:auto}mat-dialog-content[_ngcontent-%COMP%]{padding-top:10px!important}mat-dialog-actions[_ngcontent-%COMP%]{gap:8px}"]})}}return i})();var yb=["*"],Cp=(()=>{class i{labelPosition="after";static \u0275fac=function(t){return new(t||i)};static \u0275cmp=R({type:i,selectors:[["div","mat-internal-form-field",""]],hostAttrs:[1,"mdc-form-field","mat-internal-form-field"],hostVars:2,hostBindings:function(t,n){t&2&&p("mdc-form-field--align-end",n.labelPosition==="before")},inputs:{labelPosition:"labelPosition"},ngContentSelectors:yb,decls:1,vars:0,template:function(t,n){t&1&&(ve(),W(0))},styles:[`.mat-internal-form-field {
4151
4151
  -moz-osx-font-smoothing: grayscale;
4152
4152
  -webkit-font-smoothing: antialiased;
4153
4153
  display: inline-flex;
@@ -4181,7 +4181,7 @@ MY_API_KEY=secret`,1,"env-textarea"],["align","end"],["mat-stroked-button","",3,
4181
4181
  padding-left: 4px;
4182
4182
  padding-right: 0;
4183
4183
  }
4184
- `],encapsulation:2})}return i})();var yb=["input"],Cb=["label"],xb=["*"],Kc={color:"accent",clickAction:"check-indeterminate",disabledInteractive:!1},wb=new k("mat-checkbox-default-options",{providedIn:"root",factory:()=>Kc}),Ft=(function(i){return i[i.Init=0]="Init",i[i.Checked=1]="Checked",i[i.Unchecked=2]="Unchecked",i[i.Indeterminate=3]="Indeterminate",i})(Ft||{}),Xc=class{source;checked},Yc=(()=>{class i{_elementRef=m(B);_changeDetectorRef=m(se);_ngZone=m($);_animationsDisabled=ye();_options=m(wb,{optional:!0});focus(){this._inputElement.nativeElement.focus()}_createChangeEvent(e){let t=new Xc;return t.source=this,t.checked=e,t}_getAnimationTargetElement(){return this._inputElement?.nativeElement}_animationClasses={uncheckedToChecked:"mdc-checkbox--anim-unchecked-checked",uncheckedToIndeterminate:"mdc-checkbox--anim-unchecked-indeterminate",checkedToUnchecked:"mdc-checkbox--anim-checked-unchecked",checkedToIndeterminate:"mdc-checkbox--anim-checked-indeterminate",indeterminateToChecked:"mdc-checkbox--anim-indeterminate-checked",indeterminateToUnchecked:"mdc-checkbox--anim-indeterminate-unchecked"};ariaLabel="";ariaLabelledby=null;ariaDescribedby;ariaExpanded;ariaControls;ariaOwns;_uniqueId;id;get inputId(){return`${this.id||this._uniqueId}-input`}required=!1;labelPosition="after";name=null;change=new X;indeterminateChange=new X;value;disableRipple=!1;_inputElement;_labelElement;tabIndex;color;disabledInteractive;_onTouched=()=>{};_currentAnimationClass="";_currentCheckState=Ft.Init;_controlValueAccessorChangeFn=()=>{};_validatorChangeFn=()=>{};constructor(){m(Be).load($t);let e=m(new zi("tabindex"),{optional:!0});this._options=this._options||Kc,this.color=this._options.color||Kc.color,this.tabIndex=e==null?0:parseInt(e)||0,this.id=this._uniqueId=m(De).getId("mat-mdc-checkbox-"),this.disabledInteractive=this._options?.disabledInteractive??!1}ngOnChanges(e){e.required&&this._validatorChangeFn()}ngAfterViewInit(){this._syncIndeterminate(this.indeterminate)}get checked(){return this._checked}set checked(e){e!=this.checked&&(this._checked=e,this._changeDetectorRef.markForCheck())}_checked=!1;get disabled(){return this._disabled}set disabled(e){e!==this.disabled&&(this._disabled=e,this._changeDetectorRef.markForCheck())}_disabled=!1;get indeterminate(){return this._indeterminate()}set indeterminate(e){let t=e!=this._indeterminate();this._indeterminate.set(e),t&&(e?this._transitionCheckState(Ft.Indeterminate):this._transitionCheckState(this.checked?Ft.Checked:Ft.Unchecked),this.indeterminateChange.emit(e)),this._syncIndeterminate(e)}_indeterminate=E(!1);_isRippleDisabled(){return this.disableRipple||this.disabled}_onLabelTextChange(){this._changeDetectorRef.detectChanges()}writeValue(e){this.checked=!!e}registerOnChange(e){this._controlValueAccessorChangeFn=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e}validate(e){return this.required&&e.value!==!0?{required:!0}:null}registerOnValidatorChange(e){this._validatorChangeFn=e}_transitionCheckState(e){let t=this._currentCheckState,n=this._getAnimationTargetElement();if(!(t===e||!n)&&(this._currentAnimationClass&&n.classList.remove(this._currentAnimationClass),this._currentAnimationClass=this._getAnimationClassForCheckStateTransition(t,e),this._currentCheckState=e,this._currentAnimationClass.length>0)){n.classList.add(this._currentAnimationClass);let a=this._currentAnimationClass;this._ngZone.runOutsideAngular(()=>{setTimeout(()=>{n.classList.remove(a)},1e3)})}}_emitChangeEvent(){this._controlValueAccessorChangeFn(this.checked),this.change.emit(this._createChangeEvent(this.checked)),this._inputElement&&(this._inputElement.nativeElement.checked=this.checked)}toggle(){this.checked=!this.checked,this._controlValueAccessorChangeFn(this.checked)}_handleInputClick(){let e=this._options?.clickAction;!this.disabled&&e!=="noop"?(this.indeterminate&&e!=="check"&&Promise.resolve().then(()=>{this._indeterminate.set(!1),this.indeterminateChange.emit(!1)}),this._checked=!this._checked,this._transitionCheckState(this._checked?Ft.Checked:Ft.Unchecked),this._emitChangeEvent()):(this.disabled&&this.disabledInteractive||!this.disabled&&e==="noop")&&(this._inputElement.nativeElement.checked=this.checked,this._inputElement.nativeElement.indeterminate=this.indeterminate)}_onInteractionEvent(e){e.stopPropagation()}_onBlur(){Promise.resolve().then(()=>{this._onTouched(),this._changeDetectorRef.markForCheck()})}_getAnimationClassForCheckStateTransition(e,t){if(this._animationsDisabled)return"";switch(e){case Ft.Init:if(t===Ft.Checked)return this._animationClasses.uncheckedToChecked;if(t==Ft.Indeterminate)return this._checked?this._animationClasses.checkedToIndeterminate:this._animationClasses.uncheckedToIndeterminate;break;case Ft.Unchecked:return t===Ft.Checked?this._animationClasses.uncheckedToChecked:this._animationClasses.uncheckedToIndeterminate;case Ft.Checked:return t===Ft.Unchecked?this._animationClasses.checkedToUnchecked:this._animationClasses.checkedToIndeterminate;case Ft.Indeterminate:return t===Ft.Checked?this._animationClasses.indeterminateToChecked:this._animationClasses.indeterminateToUnchecked}return""}_syncIndeterminate(e){let t=this._inputElement;t&&(t.nativeElement.indeterminate=e)}_onInputClick(){this._handleInputClick()}_onTouchTargetClick(){this._handleInputClick(),this.disabled||this._inputElement.nativeElement.focus()}_preventBubblingFromLabel(e){e.target&&this._labelElement.nativeElement.contains(e.target)&&e.stopPropagation()}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=R({type:i,selectors:[["mat-checkbox"]],viewQuery:function(t,n){if(t&1&&Re(yb,5)(Cb,5),t&2){let a;N(a=L())&&(n._inputElement=a.first),N(a=L())&&(n._labelElement=a.first)}},hostAttrs:[1,"mat-mdc-checkbox"],hostVars:16,hostBindings:function(t,n){t&2&&(ft("id",n.id),J("tabindex",null)("aria-label",null)("aria-labelledby",null),at(n.color?"mat-"+n.color:"mat-accent"),p("_mat-animation-noopable",n._animationsDisabled)("mdc-checkbox--disabled",n.disabled)("mat-mdc-checkbox-disabled",n.disabled)("mat-mdc-checkbox-checked",n.checked)("mat-mdc-checkbox-disabled-interactive",n.disabledInteractive))},inputs:{ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[0,"aria-describedby","ariaDescribedby"],ariaExpanded:[2,"aria-expanded","ariaExpanded",z],ariaControls:[0,"aria-controls","ariaControls"],ariaOwns:[0,"aria-owns","ariaOwns"],id:"id",required:[2,"required","required",z],labelPosition:"labelPosition",name:"name",value:"value",disableRipple:[2,"disableRipple","disableRipple",z],tabIndex:[2,"tabIndex","tabIndex",e=>e==null?void 0:jt(e)],color:"color",disabledInteractive:[2,"disabledInteractive","disabledInteractive",z],checked:[2,"checked","checked",z],disabled:[2,"disabled","disabled",z],indeterminate:[2,"indeterminate","indeterminate",z]},outputs:{change:"change",indeterminateChange:"indeterminateChange"},exportAs:["matCheckbox"],features:[le([{provide:Ui,useExisting:lt(()=>i),multi:!0},{provide:cn,useExisting:i,multi:!0}]),Ie],ngContentSelectors:xb,decls:15,vars:23,consts:[["checkbox",""],["input",""],["label",""],["mat-internal-form-field","",3,"click","labelPosition"],[1,"mdc-checkbox"],["aria-hidden","true",1,"mat-mdc-checkbox-touch-target",3,"click"],["type","checkbox",1,"mdc-checkbox__native-control",3,"blur","click","change","checked","indeterminate","disabled","id","required","tabIndex"],["aria-hidden","true",1,"mdc-checkbox__ripple"],["aria-hidden","true",1,"mdc-checkbox__background"],["focusable","false","viewBox","0 0 24 24",1,"mdc-checkbox__checkmark"],["fill","none","d","M1.73,12.91 8.1,19.28 22.79,4.59",1,"mdc-checkbox__checkmark-path"],[1,"mdc-checkbox__mixedmark"],["mat-ripple","","aria-hidden","true",1,"mat-mdc-checkbox-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered"],[1,"mdc-label",3,"for"]],template:function(t,n){if(t&1&&(ve(),s(0,"div",3),S("click",function(r){return n._preventBubblingFromLabel(r)}),s(1,"div",4,0)(3,"div",5),S("click",function(){return n._onTouchTargetClick()}),l(),s(4,"input",6,1),S("blur",function(){return n._onBlur()})("click",function(){return n._onInputClick()})("change",function(r){return n._onInteractionEvent(r)}),l(),_(6,"div",7),s(7,"div",8),Bi(),s(8,"svg",9),_(9,"path",10),l(),il(),_(10,"div",11),l(),_(11,"div",12),l(),s(12,"label",13,2),W(14),l()()),t&2){let a=Se(2);x("labelPosition",n.labelPosition),c(4),p("mdc-checkbox--selected",n.checked),x("checked",n.checked)("indeterminate",n.indeterminate)("disabled",n.disabled&&!n.disabledInteractive)("id",n.inputId)("required",n.required)("tabIndex",n.disabled&&!n.disabledInteractive?-1:n.tabIndex),J("aria-label",n.ariaLabel||null)("aria-labelledby",n.ariaLabelledby)("aria-describedby",n.ariaDescribedby)("aria-checked",n.indeterminate?"mixed":null)("aria-controls",n.ariaControls)("aria-disabled",n.disabled&&n.disabledInteractive?!0:null)("aria-expanded",n.ariaExpanded)("aria-owns",n.ariaOwns)("name",n.name)("value",n.value),c(7),x("matRippleTrigger",a)("matRippleDisabled",n.disableRipple||n.disabled)("matRippleCentered",!0),c(),x("for",n.inputId)}},dependencies:[$o,Cp],styles:[`.mdc-checkbox {
4184
+ `],encapsulation:2})}return i})();var Cb=["input"],xb=["label"],wb=["*"],Kc={color:"accent",clickAction:"check-indeterminate",disabledInteractive:!1},Db=new k("mat-checkbox-default-options",{providedIn:"root",factory:()=>Kc}),Ft=(function(i){return i[i.Init=0]="Init",i[i.Checked=1]="Checked",i[i.Unchecked=2]="Unchecked",i[i.Indeterminate=3]="Indeterminate",i})(Ft||{}),Xc=class{source;checked},Yc=(()=>{class i{_elementRef=m(B);_changeDetectorRef=m(se);_ngZone=m($);_animationsDisabled=ye();_options=m(Db,{optional:!0});focus(){this._inputElement.nativeElement.focus()}_createChangeEvent(e){let t=new Xc;return t.source=this,t.checked=e,t}_getAnimationTargetElement(){return this._inputElement?.nativeElement}_animationClasses={uncheckedToChecked:"mdc-checkbox--anim-unchecked-checked",uncheckedToIndeterminate:"mdc-checkbox--anim-unchecked-indeterminate",checkedToUnchecked:"mdc-checkbox--anim-checked-unchecked",checkedToIndeterminate:"mdc-checkbox--anim-checked-indeterminate",indeterminateToChecked:"mdc-checkbox--anim-indeterminate-checked",indeterminateToUnchecked:"mdc-checkbox--anim-indeterminate-unchecked"};ariaLabel="";ariaLabelledby=null;ariaDescribedby;ariaExpanded;ariaControls;ariaOwns;_uniqueId;id;get inputId(){return`${this.id||this._uniqueId}-input`}required=!1;labelPosition="after";name=null;change=new X;indeterminateChange=new X;value;disableRipple=!1;_inputElement;_labelElement;tabIndex;color;disabledInteractive;_onTouched=()=>{};_currentAnimationClass="";_currentCheckState=Ft.Init;_controlValueAccessorChangeFn=()=>{};_validatorChangeFn=()=>{};constructor(){m(Be).load(Gt);let e=m(new zi("tabindex"),{optional:!0});this._options=this._options||Kc,this.color=this._options.color||Kc.color,this.tabIndex=e==null?0:parseInt(e)||0,this.id=this._uniqueId=m(De).getId("mat-mdc-checkbox-"),this.disabledInteractive=this._options?.disabledInteractive??!1}ngOnChanges(e){e.required&&this._validatorChangeFn()}ngAfterViewInit(){this._syncIndeterminate(this.indeterminate)}get checked(){return this._checked}set checked(e){e!=this.checked&&(this._checked=e,this._changeDetectorRef.markForCheck())}_checked=!1;get disabled(){return this._disabled}set disabled(e){e!==this.disabled&&(this._disabled=e,this._changeDetectorRef.markForCheck())}_disabled=!1;get indeterminate(){return this._indeterminate()}set indeterminate(e){let t=e!=this._indeterminate();this._indeterminate.set(e),t&&(e?this._transitionCheckState(Ft.Indeterminate):this._transitionCheckState(this.checked?Ft.Checked:Ft.Unchecked),this.indeterminateChange.emit(e)),this._syncIndeterminate(e)}_indeterminate=E(!1);_isRippleDisabled(){return this.disableRipple||this.disabled}_onLabelTextChange(){this._changeDetectorRef.detectChanges()}writeValue(e){this.checked=!!e}registerOnChange(e){this._controlValueAccessorChangeFn=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e}validate(e){return this.required&&e.value!==!0?{required:!0}:null}registerOnValidatorChange(e){this._validatorChangeFn=e}_transitionCheckState(e){let t=this._currentCheckState,n=this._getAnimationTargetElement();if(!(t===e||!n)&&(this._currentAnimationClass&&n.classList.remove(this._currentAnimationClass),this._currentAnimationClass=this._getAnimationClassForCheckStateTransition(t,e),this._currentCheckState=e,this._currentAnimationClass.length>0)){n.classList.add(this._currentAnimationClass);let a=this._currentAnimationClass;this._ngZone.runOutsideAngular(()=>{setTimeout(()=>{n.classList.remove(a)},1e3)})}}_emitChangeEvent(){this._controlValueAccessorChangeFn(this.checked),this.change.emit(this._createChangeEvent(this.checked)),this._inputElement&&(this._inputElement.nativeElement.checked=this.checked)}toggle(){this.checked=!this.checked,this._controlValueAccessorChangeFn(this.checked)}_handleInputClick(){let e=this._options?.clickAction;!this.disabled&&e!=="noop"?(this.indeterminate&&e!=="check"&&Promise.resolve().then(()=>{this._indeterminate.set(!1),this.indeterminateChange.emit(!1)}),this._checked=!this._checked,this._transitionCheckState(this._checked?Ft.Checked:Ft.Unchecked),this._emitChangeEvent()):(this.disabled&&this.disabledInteractive||!this.disabled&&e==="noop")&&(this._inputElement.nativeElement.checked=this.checked,this._inputElement.nativeElement.indeterminate=this.indeterminate)}_onInteractionEvent(e){e.stopPropagation()}_onBlur(){Promise.resolve().then(()=>{this._onTouched(),this._changeDetectorRef.markForCheck()})}_getAnimationClassForCheckStateTransition(e,t){if(this._animationsDisabled)return"";switch(e){case Ft.Init:if(t===Ft.Checked)return this._animationClasses.uncheckedToChecked;if(t==Ft.Indeterminate)return this._checked?this._animationClasses.checkedToIndeterminate:this._animationClasses.uncheckedToIndeterminate;break;case Ft.Unchecked:return t===Ft.Checked?this._animationClasses.uncheckedToChecked:this._animationClasses.uncheckedToIndeterminate;case Ft.Checked:return t===Ft.Unchecked?this._animationClasses.checkedToUnchecked:this._animationClasses.checkedToIndeterminate;case Ft.Indeterminate:return t===Ft.Checked?this._animationClasses.indeterminateToChecked:this._animationClasses.indeterminateToUnchecked}return""}_syncIndeterminate(e){let t=this._inputElement;t&&(t.nativeElement.indeterminate=e)}_onInputClick(){this._handleInputClick()}_onTouchTargetClick(){this._handleInputClick(),this.disabled||this._inputElement.nativeElement.focus()}_preventBubblingFromLabel(e){e.target&&this._labelElement.nativeElement.contains(e.target)&&e.stopPropagation()}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=R({type:i,selectors:[["mat-checkbox"]],viewQuery:function(t,n){if(t&1&&Re(Cb,5)(xb,5),t&2){let a;N(a=L())&&(n._inputElement=a.first),N(a=L())&&(n._labelElement=a.first)}},hostAttrs:[1,"mat-mdc-checkbox"],hostVars:16,hostBindings:function(t,n){t&2&&(ft("id",n.id),J("tabindex",null)("aria-label",null)("aria-labelledby",null),at(n.color?"mat-"+n.color:"mat-accent"),p("_mat-animation-noopable",n._animationsDisabled)("mdc-checkbox--disabled",n.disabled)("mat-mdc-checkbox-disabled",n.disabled)("mat-mdc-checkbox-checked",n.checked)("mat-mdc-checkbox-disabled-interactive",n.disabledInteractive))},inputs:{ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[0,"aria-describedby","ariaDescribedby"],ariaExpanded:[2,"aria-expanded","ariaExpanded",z],ariaControls:[0,"aria-controls","ariaControls"],ariaOwns:[0,"aria-owns","ariaOwns"],id:"id",required:[2,"required","required",z],labelPosition:"labelPosition",name:"name",value:"value",disableRipple:[2,"disableRipple","disableRipple",z],tabIndex:[2,"tabIndex","tabIndex",e=>e==null?void 0:jt(e)],color:"color",disabledInteractive:[2,"disabledInteractive","disabledInteractive",z],checked:[2,"checked","checked",z],disabled:[2,"disabled","disabled",z],indeterminate:[2,"indeterminate","indeterminate",z]},outputs:{change:"change",indeterminateChange:"indeterminateChange"},exportAs:["matCheckbox"],features:[le([{provide:Ui,useExisting:lt(()=>i),multi:!0},{provide:cn,useExisting:i,multi:!0}]),Ie],ngContentSelectors:wb,decls:15,vars:23,consts:[["checkbox",""],["input",""],["label",""],["mat-internal-form-field","",3,"click","labelPosition"],[1,"mdc-checkbox"],["aria-hidden","true",1,"mat-mdc-checkbox-touch-target",3,"click"],["type","checkbox",1,"mdc-checkbox__native-control",3,"blur","click","change","checked","indeterminate","disabled","id","required","tabIndex"],["aria-hidden","true",1,"mdc-checkbox__ripple"],["aria-hidden","true",1,"mdc-checkbox__background"],["focusable","false","viewBox","0 0 24 24",1,"mdc-checkbox__checkmark"],["fill","none","d","M1.73,12.91 8.1,19.28 22.79,4.59",1,"mdc-checkbox__checkmark-path"],[1,"mdc-checkbox__mixedmark"],["mat-ripple","","aria-hidden","true",1,"mat-mdc-checkbox-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered"],[1,"mdc-label",3,"for"]],template:function(t,n){if(t&1&&(ve(),s(0,"div",3),S("click",function(r){return n._preventBubblingFromLabel(r)}),s(1,"div",4,0)(3,"div",5),S("click",function(){return n._onTouchTargetClick()}),l(),s(4,"input",6,1),S("blur",function(){return n._onBlur()})("click",function(){return n._onInputClick()})("change",function(r){return n._onInteractionEvent(r)}),l(),_(6,"div",7),s(7,"div",8),Bi(),s(8,"svg",9),_(9,"path",10),l(),il(),_(10,"div",11),l(),_(11,"div",12),l(),s(12,"label",13,2),W(14),l()()),t&2){let a=Se(2);x("labelPosition",n.labelPosition),c(4),p("mdc-checkbox--selected",n.checked),x("checked",n.checked)("indeterminate",n.indeterminate)("disabled",n.disabled&&!n.disabledInteractive)("id",n.inputId)("required",n.required)("tabIndex",n.disabled&&!n.disabledInteractive?-1:n.tabIndex),J("aria-label",n.ariaLabel||null)("aria-labelledby",n.ariaLabelledby)("aria-describedby",n.ariaDescribedby)("aria-checked",n.indeterminate?"mixed":null)("aria-controls",n.ariaControls)("aria-disabled",n.disabled&&n.disabledInteractive?!0:null)("aria-expanded",n.ariaExpanded)("aria-owns",n.ariaOwns)("name",n.name)("value",n.value),c(7),x("matRippleTrigger",a)("matRippleDisabled",n.disableRipple||n.disabled)("matRippleCentered",!0),c(),x("for",n.inputId)}},dependencies:[$o,Cp],styles:[`.mdc-checkbox {
4185
4185
  display: inline-block;
4186
4186
  position: relative;
4187
4187
  flex: 0 0 18px;
@@ -4674,7 +4674,7 @@ MY_API_KEY=secret`,1,"env-textarea"],["align","end"],["mat-stroked-button","",3,
4674
4674
  margin-left: auto;
4675
4675
  margin-right: 80px;
4676
4676
  }
4677
- `],encapsulation:2})}return i})(),ea=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=U({type:i});static \u0275inj=H({imports:[ce]})}return i})();var Sb=["*"],kb=`.mdc-list {
4677
+ `],encapsulation:2})}return i})(),ea=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=U({type:i});static \u0275inj=H({imports:[ce]})}return i})();var kb=["*"],Mb=`.mdc-list {
4678
4678
  margin: 0;
4679
4679
  padding: 8px 0;
4680
4680
  list-style-type: none;
@@ -5218,7 +5218,7 @@ mat-action-list button::-moz-focus-inner {
5218
5218
  .mat-mdc-nav-list .mat-mdc-list-item.mdc-list-item--activated {
5219
5219
  background-color: var(--mat-list-active-indicator-color, var(--mat-sys-secondary-container));
5220
5220
  }
5221
- `,Mb=["unscopedContent"],Eb=["text"],Tb=[[["","matListItemAvatar",""],["","matListItemIcon",""]],[["","matListItemTitle",""]],[["","matListItemLine",""]],"*",[["","matListItemMeta",""]],[["mat-divider"]]],Ab=["[matListItemAvatar],[matListItemIcon]","[matListItemTitle]","[matListItemLine]","*","[matListItemMeta]","mat-divider"];var Ib=new k("ListOption"),Rb=(()=>{class i{_elementRef=m(B);static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,selectors:[["","matListItemTitle",""]],hostAttrs:[1,"mat-mdc-list-item-title","mdc-list-item__primary-text"]})}return i})(),Pb=(()=>{class i{_elementRef=m(B);static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,selectors:[["","matListItemLine",""]],hostAttrs:[1,"mat-mdc-list-item-line","mdc-list-item__secondary-text"]})}return i})(),Ob=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,selectors:[["","matListItemMeta",""]],hostAttrs:[1,"mat-mdc-list-item-meta","mdc-list-item__end"]})}return i})(),xp=(()=>{class i{_listOption=m(Ib,{optional:!0});_isAlignedAtStart(){return!this._listOption||this._listOption?._getTogglePosition()==="after"}static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,hostVars:4,hostBindings:function(t,n){t&2&&p("mdc-list-item__start",n._isAlignedAtStart())("mdc-list-item__end",!n._isAlignedAtStart())}})}return i})(),Fb=(()=>{class i extends xp{static \u0275fac=(()=>{let e;return function(n){return(e||(e=xe(i)))(n||i)}})();static \u0275dir=T({type:i,selectors:[["","matListItemAvatar",""]],hostAttrs:[1,"mat-mdc-list-item-avatar"],features:[ie]})}return i})(),Nb=(()=>{class i extends xp{static \u0275fac=(()=>{let e;return function(n){return(e||(e=xe(i)))(n||i)}})();static \u0275dir=T({type:i,selectors:[["","matListItemIcon",""]],hostAttrs:[1,"mat-mdc-list-item-icon"],features:[ie]})}return i})(),Lb=new k("MAT_LIST_CONFIG"),Zc=(()=>{class i{_isNonInteractive=!0;get disableRipple(){return this._disableRipple}set disableRipple(e){this._disableRipple=gt(e)}_disableRipple=!1;get disabled(){return this._disabled()}set disabled(e){this._disabled.set(gt(e))}_disabled=E(!1);_defaultOptions=m(Lb,{optional:!0});static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,hostVars:1,hostBindings:function(t,n){t&2&&J("aria-disabled",n.disabled)},inputs:{disableRipple:"disableRipple",disabled:"disabled"}})}return i})(),Vb=(()=>{class i{_elementRef=m(B);_ngZone=m($);_listBase=m(Zc,{optional:!0});_platform=m(fe);_hostElement;_isButtonElement;_noopAnimations=ye();_avatars;_icons;set lines(e){this._explicitLines=ti(e,null),this._updateItemLines(!1)}_explicitLines=null;get disableRipple(){return this.disabled||this._disableRipple||this._noopAnimations||!!this._listBase?.disableRipple}set disableRipple(e){this._disableRipple=gt(e)}_disableRipple=!1;get disabled(){return this._disabled()||!!this._listBase?.disabled}set disabled(e){this._disabled.set(gt(e))}_disabled=E(!1);_subscriptions=new Te;_rippleRenderer=null;_hasUnscopedTextContent=!1;rippleConfig;get rippleDisabled(){return this.disableRipple||!!this.rippleConfig.disabled}constructor(){m(Be).load($t);let e=m(lo,{optional:!0});this.rippleConfig=e||{},this._hostElement=this._elementRef.nativeElement,this._isButtonElement=this._hostElement.nodeName.toLowerCase()==="button",this._listBase&&!this._listBase._isNonInteractive&&this._initInteractiveListItem(),this._isButtonElement&&!this._hostElement.hasAttribute("type")&&this._hostElement.setAttribute("type","button")}ngAfterViewInit(){this._monitorProjectedLinesAndTitle(),this._updateItemLines(!0)}ngOnDestroy(){this._subscriptions.unsubscribe(),this._rippleRenderer!==null&&this._rippleRenderer._removeTriggerEvents()}_hasIconOrAvatar(){return!!(this._avatars.length||this._icons.length)}_initInteractiveListItem(){this._hostElement.classList.add("mat-mdc-list-item-interactive"),this._rippleRenderer=new so(this,this._ngZone,this._hostElement,this._platform,m(Z)),this._rippleRenderer.setupTriggerEvents(this._hostElement)}_monitorProjectedLinesAndTitle(){this._ngZone.runOutsideAngular(()=>{this._subscriptions.add(Xe(this._lines.changes,this._titles.changes).subscribe(()=>this._updateItemLines(!1)))})}_updateItemLines(e){if(!this._lines||!this._titles||!this._unscopedContent)return;e&&this._checkDomForUnscopedTextContent();let t=this._explicitLines??this._inferLinesFromContent(),n=this._unscopedContent.nativeElement;if(this._hostElement.classList.toggle("mat-mdc-list-item-single-line",t<=1),this._hostElement.classList.toggle("mdc-list-item--with-one-line",t<=1),this._hostElement.classList.toggle("mdc-list-item--with-two-lines",t===2),this._hostElement.classList.toggle("mdc-list-item--with-three-lines",t===3),this._hasUnscopedTextContent){let a=this._titles.length===0&&t===1;n.classList.toggle("mdc-list-item__primary-text",a),n.classList.toggle("mdc-list-item__secondary-text",!a)}else n.classList.remove("mdc-list-item__primary-text"),n.classList.remove("mdc-list-item__secondary-text")}_inferLinesFromContent(){let e=this._titles.length+this._lines.length;return this._hasUnscopedTextContent&&(e+=1),e}_checkDomForUnscopedTextContent(){this._hasUnscopedTextContent=Array.from(this._unscopedContent.nativeElement.childNodes).filter(e=>e.nodeType!==e.COMMENT_NODE).some(e=>!!(e.textContent&&e.textContent.trim()))}static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,contentQueries:function(t,n,a){if(t&1&&dt(a,Fb,4)(a,Nb,4),t&2){let r;N(r=L())&&(n._avatars=r),N(r=L())&&(n._icons=r)}},hostVars:4,hostBindings:function(t,n){t&2&&(J("aria-disabled",n.disabled)("disabled",n._isButtonElement&&n.disabled||null),p("mdc-list-item--disabled",n.disabled))},inputs:{lines:"lines",disableRipple:"disableRipple",disabled:"disabled"}})}return i})();var wp=(()=>{class i extends Zc{static \u0275fac=(()=>{let e;return function(n){return(e||(e=xe(i)))(n||i)}})();static \u0275cmp=R({type:i,selectors:[["mat-list"]],hostAttrs:[1,"mat-mdc-list","mat-mdc-list-base","mdc-list"],exportAs:["matList"],features:[le([{provide:Zc,useExisting:i}]),ie],ngContentSelectors:Sb,decls:1,vars:0,template:function(t,n){t&1&&(ve(),W(0))},styles:[kb],encapsulation:2})}return i})(),Dp=(()=>{class i extends Vb{_lines;_titles;_meta;_unscopedContent;_itemText;get activated(){return this._activated}set activated(e){this._activated=gt(e)}_activated=!1;_getAriaCurrent(){return this._hostElement.nodeName==="A"&&this._activated?"page":null}_hasBothLeadingAndTrailing(){return this._meta.length!==0&&(this._avatars.length!==0||this._icons.length!==0)}static \u0275fac=(()=>{let e;return function(n){return(e||(e=xe(i)))(n||i)}})();static \u0275cmp=R({type:i,selectors:[["mat-list-item"],["a","mat-list-item",""],["button","mat-list-item",""]],contentQueries:function(t,n,a){if(t&1&&dt(a,Pb,5)(a,Rb,5)(a,Ob,5),t&2){let r;N(r=L())&&(n._lines=r),N(r=L())&&(n._titles=r),N(r=L())&&(n._meta=r)}},viewQuery:function(t,n){if(t&1&&Re(Mb,5)(Eb,5),t&2){let a;N(a=L())&&(n._unscopedContent=a.first),N(a=L())&&(n._itemText=a.first)}},hostAttrs:[1,"mat-mdc-list-item","mdc-list-item"],hostVars:13,hostBindings:function(t,n){t&2&&(J("aria-current",n._getAriaCurrent()),p("mdc-list-item--activated",n.activated)("mdc-list-item--with-leading-avatar",n._avatars.length!==0)("mdc-list-item--with-leading-icon",n._icons.length!==0)("mdc-list-item--with-trailing-meta",n._meta.length!==0)("mat-mdc-list-item-both-leading-and-trailing",n._hasBothLeadingAndTrailing())("_mat-animation-noopable",n._noopAnimations))},inputs:{activated:"activated"},exportAs:["matListItem"],features:[ie],ngContentSelectors:Ab,decls:10,vars:0,consts:[["unscopedContent",""],[1,"mdc-list-item__content"],[1,"mat-mdc-list-item-unscoped-content",3,"cdkObserveContent"],[1,"mat-focus-indicator"]],template:function(t,n){t&1&&(ve(Tb),W(0),s(1,"span",1),W(2,1),W(3,2),s(4,"span",2,0),S("cdkObserveContent",function(){return n._updateItemLines(!0)}),W(6,3),l()(),W(7,4),W(8,5),_(9,"div",3))},dependencies:[tu],encapsulation:2})}return i})();var Sp=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=U({type:i});static \u0275inj=H({imports:[Fo,Ki,Gs,ce,ea]})}return i})();function Bb(i,o){i&1&&_(0,"mat-progress-bar",5)}function zb(i,o){i&1&&(s(0,"span",13),d(1,"(removed)"),l())}function jb(i,o){i&1&&(s(0,"mat-icon"),d(1,"check_box"),l())}function Hb(i,o){i&1&&(s(0,"mat-icon"),d(1,"check_box_outline_blank"),l())}function Ub(i,o){if(i&1){let e=_e();s(0,"mat-list-item")(1,"div",11)(2,"span",12),d(3),l(),w(4,zb,2,0,"span",13),s(5,"button",14),S("click",function(){let n=ne(e).$implicit,a=v(3);return oe(a.toggle(n))}),w(6,jb,2,0,"mat-icon")(7,Hb,2,0,"mat-icon"),l()()()}if(i&2){let e=o.$implicit,t=v(3);p("orphaned",t.isOrphaned(e)),c(3),I(e),c(),D(t.isOrphaned(e)?4:-1),c(),J("aria-label","Toggle "+e),c(),D(t.isManaged(e)?6:7)}}function $b(i,o){if(i&1&&(s(0,"mat-list"),ee(1,Ub,8,6,"mat-list-item",10,Ye),l()),i&2){let e=v(2);c(),te(e.filteredServices)}}function Gb(i,o){if(i&1&&d(0),i&2){let e=v(3);Q(' No services match "',e.filter(),'" ')}}function Wb(i,o){i&1&&d(0," No installed services found ")}function qb(i,o){if(i&1&&(s(0,"p",9),w(1,Gb,1,1)(2,Wb,1,0),l()),i&2){let e=v(2);c(),D(e.filter()?1:2)}}function Kb(i,o){if(i&1&&(s(0,"div",6),w(1,$b,3,0,"mat-list")(2,qb,3,1,"p",9),l()),i&2){let e=v();c(),D(e.filteredServices.length>0?1:2)}}var kp=(()=>{class i{constructor(){this.serviceService=m(wt),this.dialogRef=m(et),this.available=E([]),this.managed=E(new Set),this.orphaned=E(new Set),this.loading=E(!0),this.filter=E("")}ngOnInit(){return q(this,null,function*(){try{let[e,t]=yield Promise.all([re(this.serviceService.listAvailableServices()),re(this.serviceService.listManagedServices())]);this.available.set(e),this.managed.set(new Set(t));let n=new Set(e),a=t.filter(r=>!n.has(r));this.orphaned.set(new Set(a))}catch(e){console.error("[ManagedServicesDialog] load error:",e)}finally{this.loading.set(!1)}})}get filteredServices(){let e=this.available(),t=this.orphaned(),n=[...new Set([...e,...t])].sort(),a=this.filter();if(!a)return n;let r=a.toLowerCase();return n.filter(u=>u.toLowerCase().includes(r))}isOrphaned(e){return this.orphaned().has(e)}isManaged(e){return this.managed().has(e)}toggle(e){return q(this,null,function*(){try{this.isManaged(e)?yield re(this.serviceService.removeManagedService(e)):yield re(this.serviceService.addManagedService(e));let t=new Set(this.managed());t.has(e)?t.delete(e):t.add(e),this.managed.set(t)}catch(t){console.error(`[ManagedServicesDialog] toggle error (${e}):`,t)}})}close(){this.dialogRef.close(!0)}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=R({type:i,selectors:[["app-managed-services-dialog"]],decls:13,vars:2,consts:[[1,"dialog-container"],["mat-dialog-title",""],[1,"dialog-description"],["appearance","outline",1,"filter-field"],["matInput","","placeholder","Filter services...",3,"input","value"],["mode","indeterminate"],[1,"services-list"],["align","end"],["mat-raised-button","","color","primary",3,"click"],[1,"no-services"],[3,"orphaned"],[1,"service-row"],[1,"service-name"],[1,"orphaned-hint"],["mat-icon-button","",3,"click"]],template:function(t,n){t&1&&(s(0,"div",0)(1,"h2",1),d(2,"Manage services"),l(),s(3,"mat-dialog-content")(4,"p",2),d(5,"Select which system services to control."),l(),s(6,"mat-form-field",3)(7,"input",4),S("input",function(r){return n.filter.set(r.target.value)}),l()(),w(8,Bb,1,0,"mat-progress-bar",5)(9,Kb,3,1,"div",6),l(),s(10,"mat-dialog-actions",7)(11,"button",8),S("click",function(){return n.close()}),d(12,"Done"),l()()()),t&2&&(c(7),x("value",n.filter()),c(),D(n.loading()?8:9))},dependencies:[Me,ze,Ue,Ai,st,yt,xt,Ct,Hn,Sp,wp,Dp,pi,Hi,Mt,ut,Pt,Rt,bt,vt],styles:[".dialog-container[_ngcontent-%COMP%]{min-width:400px;max-width:500px}mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:8px}.dialog-description[_ngcontent-%COMP%]{margin:0 0 12px;color:#666;font-size:.9rem}.filter-field[_ngcontent-%COMP%]{width:100%;margin-bottom:8px}.services-list[_ngcontent-%COMP%]{max-height:400px;overflow-y:auto}.service-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;width:100%}.service-row[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin-left:auto;flex-shrink:0}.service-name[_ngcontent-%COMP%]{font-family:monospace;font-size:.95rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.no-services[_ngcontent-%COMP%]{text-align:center;color:#999;font-size:.9rem;padding:16px 0}mat-list-item.orphaned[_ngcontent-%COMP%] .service-name[_ngcontent-%COMP%]{color:#999}mat-list-item.orphaned[_ngcontent-%COMP%] .orphaned-hint[_ngcontent-%COMP%]{color:#bbb;font-size:.8rem;font-style:italic;margin-right:8px}"]})}}return i})();var Mp=(()=>{class i{constructor(){this.dialogRef=m(et),this.data=m(Ni),this.service=this.data.service,this.user=this.data.user,this.password=""}submit(){this.password&&this.dialogRef.close(this.password)}cancel(){this.dialogRef.close()}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=R({type:i,selectors:[["app-account-password-dialog"]],decls:20,vars:5,consts:[["mat-dialog-title",""],[1,"dialog-description"],["appearance","outline",1,"full-width"],["matInput","","type","password","name","accountPassword","autocomplete","new-password","autofocus","",3,"ngModelChange","keyup.enter","ngModel"],["align","end"],["mat-stroked-button","",3,"click"],["mat-raised-button","","color","primary",3,"click","disabled"]],template:function(t,n){t&1&&(s(0,"h2",0),d(1),l(),s(2,"mat-dialog-content")(3,"p",1),d(4," Service "),s(5,"strong"),d(6),l(),d(7," is registered to run as "),s(8,"strong"),d(9),l(),d(10,", and the Windows service manager logs that account on with its password. It keeps its own protected copy, so nothing you type here is saved \u2014 the next reinstall or edit asks for it again. "),l(),s(11,"mat-form-field",2)(12,"input",3),Td("ngModelChange",function(r){return Ed(n.password,r)||(n.password=r),r}),S("keyup.enter",function(){return n.submit()}),l(),y(),s(13,"mat-label"),d(14,"Password"),l()()(),s(15,"mat-dialog-actions",4)(16,"button",5),S("click",function(){return n.cancel()}),d(17,"Cancel"),l(),s(18,"button",6),S("click",function(){return n.submit()}),d(19,"Continue"),l()()),t&2&&(c(),Q("Password of ",n.user),c(5),I(n.service),c(3),I(n.user),c(3),Md("ngModel",n.password),C(),c(6),x("disabled",!n.password))},dependencies:[Me,gi,Yt,Zt,Ha,ze,Ue,Pt,Rt,ut,_t,st,yt,xt,Ct],styles:["mat-dialog-content[_ngcontent-%COMP%]{min-width:380px;display:flex;flex-direction:column;gap:8px}.dialog-description[_ngcontent-%COMP%]{margin:0;color:#666;font-size:.9rem;line-height:1.45}.full-width[_ngcontent-%COMP%]{width:100%}mat-dialog-actions[_ngcontent-%COMP%]{gap:8px}"]})}}return i})();var Ws=(()=>{class i{constructor(){this.dialog=m(Nn),this.system=m(Ot)}askFor(e){return q(this,null,function*(){if(!e?.user||!(yield this.system.detectWindows()))return;let t=this.dialog.open(Mp,{data:{service:e.name,user:e.user},width:"460px"});return(yield re(t.afterClosed()))||null})}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275prov=ae({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var Xb=(i,o)=>o.name;function Yb(i,o){i&1&&_(0,"mat-progress-bar",4)}function Zb(i,o){if(i&1){let e=_e();s(0,"button",14),S("click",function(){ne(e);let n=v().$implicit,a=v(2);return oe(a.restore(n.name))}),s(1,"mat-icon"),d(2,"restore"),l()()}if(i&2){let e=v(3);x("disabled",e.busy()!==null)}}function Qb(i,o){if(i&1){let e=_e();s(0,"button",15),S("click",function(){ne(e);let n=v().$implicit,a=v(2);return oe(a.archive(n.name))}),s(1,"mat-icon"),d(2,"inventory_2"),l()()}if(i&2){let e=v(3);x("disabled",e.busy()!==null)}}function Jb(i,o){if(i&1){let e=_e();s(0,"div",9)(1,"span",10),d(2),l(),w(3,Zb,3,1,"button",11)(4,Qb,3,1,"button",12),s(5,"button",13),S("click",function(){let n=ne(e).$implicit,a=v(2);return oe(a.remove(n.name,n.archived))}),s(6,"mat-icon"),d(7,"delete"),l()()()}if(i&2){let e=o.$implicit,t=v(2);c(),p("archived",e.archived),x("title",e.name),c(),I(e.name),c(),D(e.archived?3:4),c(2),x("disabled",t.busy()!==null)}}function ey(i,o){if(i&1&&(s(0,"div",5),ee(1,Jb,8,6,"div",9,Xb),l()),i&2){let e=v();c(),te(e.filtered())}}function ty(i,o){if(i&1&&d(0),i&2){let e=v(2);Q(' No services match "',e.filter().trim(),'". ')}}function iy(i,o){i&1&&d(0," No services configured. ")}function ny(i,o){if(i&1&&(s(0,"p",6),w(1,ty,1,1)(2,iy,1,0),l()),i&2){let e=v();c(),D(e.filter().trim()?1:2)}}var Ep=(()=>{class i{constructor(){this.serviceService=m(wt),this.dialogRef=m(et),this.snackBar=m(zs),this.accountPassword=m(Ws),this.active=E([]),this.archived=E([]),this.loading=E(!0),this.busy=E(null),this.filter=E(""),this.entries=P(()=>[...this.active().map(e=>({name:e.name,archived:!1})),...this.archived().map(e=>({name:e.name,archived:!0}))].sort((e,t)=>e.name.localeCompare(t.name))),this.filtered=P(()=>{let e=this.filter().trim().toLowerCase(),t=this.entries();return e?t.filter(n=>n.name.toLowerCase().includes(e)):t}),this.dirty=!1}onFilterInput(e){this.filter.set(e.target.value)}ngOnInit(){return q(this,null,function*(){try{let[e,t]=yield Promise.all([re(this.serviceService.fetchConfigs()),re(this.serviceService.fetchArchivedConfigs())]);this.active.set(e),this.archived.set(t)}catch(e){console.error("[ArchiveDialog] load error:",e)}finally{this.loading.set(!1)}})}archive(e){return q(this,null,function*(){this.busy.set(e);try{let t=this.active().find(n=>n.name===e);yield re(this.serviceService.archiveService(e)),t&&(this.active.set(this.active().filter(n=>n.name!==e)),this.archived.set([...this.archived(),t])),this.dirty=!0}catch(t){this.showError(`Archive "${e}": ${this.errorText(t)}`)}finally{this.busy.set(null)}})}restore(e){return q(this,null,function*(){let t=this.archived().find(a=>a.name===e),n=yield this.accountPassword.askFor(t);if(n!==null){this.busy.set(e);try{yield re(this.serviceService.restoreService(e,n??void 0)),t&&(this.archived.set(this.archived().filter(a=>a.name!==e)),this.active.set([...this.active(),t])),this.dirty=!0}catch(a){this.showError(`Restore "${e}": ${this.errorText(a)}`)}finally{this.busy.set(null)}}})}remove(e,t){return q(this,null,function*(){let n=t?`Delete archived service "${e}"? Its config will be permanently removed.`:`Delete service "${e}"? Its systemd unit will be uninstalled and its config permanently removed.`;if(confirm(n)){this.busy.set(e);try{yield re(this.serviceService.deleteConfig(e)),this.active.set(this.active().filter(a=>a.name!==e)),this.archived.set(this.archived().filter(a=>a.name!==e)),this.dirty=!0}catch(a){this.showError(`Delete "${e}": ${this.errorText(a)}`)}finally{this.busy.set(null)}}})}showError(e){this.snackBar.open(e,"Dismiss",{duration:6e3,horizontalPosition:"center",verticalPosition:"top"})}errorText(e){return e instanceof ei?e.error?.error??e.message:String(e)}close(){this.dialogRef.close(this.dirty)}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=R({type:i,selectors:[["app-archive-dialog"]],decls:13,vars:2,consts:[[1,"dialog-container"],["mat-dialog-title",""],[1,"dialog-description"],["type","text","placeholder","Filter by name\u2026",1,"archive-filter",3,"input","value"],["mode","indeterminate"],[1,"entry-list"],[1,"empty-panel"],["align","end"],["mat-raised-button","","color","primary",3,"click"],[1,"entry"],[1,"entry-name",3,"title"],["mat-icon-button","","title","Restore from archive",1,"entry-btn",3,"disabled"],["mat-icon-button","","title","Move to archive",1,"entry-btn",3,"disabled"],["mat-icon-button","","title","Delete service",1,"entry-btn","delete-btn",3,"click","disabled"],["mat-icon-button","","title","Restore from archive",1,"entry-btn",3,"click","disabled"],["mat-icon-button","","title","Move to archive",1,"entry-btn",3,"click","disabled"]],template:function(t,n){t&1&&(s(0,"div",0)(1,"h2",1),d(2,"Archive"),l(),s(3,"mat-dialog-content")(4,"p",2),d(5," Archive a service to stop, uninstall, and shelve its config \u2014 restore it any time. Archived services are shown grayed out. "),l(),s(6,"input",3),S("input",function(r){return n.onFilterInput(r)}),l(),w(7,Yb,1,0,"mat-progress-bar",4)(8,ey,3,0,"div",5)(9,ny,3,1,"p",6),l(),s(10,"mat-dialog-actions",7)(11,"button",8),S("click",function(){return n.close()}),d(12,"Done"),l()()()),t&2&&(c(6),x("value",n.filter()),c(),D(n.loading()?7:n.filtered().length>0?8:9))},dependencies:[Me,ze,Ue,Ai,st,yt,xt,Ct,pi,Hi,bt,vt],styles:['@charset "UTF-8";.dialog-container[_ngcontent-%COMP%]{min-width:560px;max-width:640px;height:80vh;display:flex;flex-direction:column}mat-dialog-title[_ngcontent-%COMP%]{flex:0 0 auto;margin-bottom:8px}mat-dialog-content[_ngcontent-%COMP%]{flex:1 1 auto;min-height:0;overflow:hidden;display:flex;flex-direction:column}.dialog-description[_ngcontent-%COMP%]{flex:0 0 auto;margin:0 0 12px;color:#666;font-size:.9rem}.archive-filter[_ngcontent-%COMP%]{flex:0 0 auto;width:100%;box-sizing:border-box;padding:8px 10px;margin-bottom:8px;font-size:.9rem;border:1px solid #e0e0e0;border-radius:6px;background-color:#fafafa;color:#333}.archive-filter[_ngcontent-%COMP%]:focus{outline:none;border-color:#9e9e9e}mat-dialog-actions[_ngcontent-%COMP%]{flex:0 0 auto}.entry-list[_ngcontent-%COMP%]{flex:1 1 auto;min-height:0;overflow-y:auto;border:1px solid #e0e0e0;border-radius:8px;padding:4px 0}.entry[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding:4px 12px}.entry[_ngcontent-%COMP%]:hover{background-color:#f5f5f5}.entry-name[_ngcontent-%COMP%]{flex:1;font-family:monospace;font-size:.9rem;color:#333;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.entry-name.archived[_ngcontent-%COMP%]{color:#999}.entry-btn[_ngcontent-%COMP%]{flex-shrink:0}.delete-btn[_ngcontent-%COMP%]{color:#b71c1c}.empty-panel[_ngcontent-%COMP%]{text-align:center;color:#999;font-size:.9rem;padding:16px 0;margin:0}']})}}return i})();var Tp=new k("CdkAccordion");var Ap=(()=>{class i{accordion=m(Tp,{optional:!0,skipSelf:!0});_changeDetectorRef=m(se);_expansionDispatcher=m(Ya);_openCloseAllSubscription=Te.EMPTY;closed=new X;opened=new X;destroyed=new X;expandedChange=new X;id=m(De).getId("cdk-accordion-child-");get expanded(){return this._expanded}set expanded(e){if(this._expanded!==e){if(this._expanded=e,this.expandedChange.emit(e),e){this.opened.emit();let t=this.accordion?this.accordion.id:this.id;this._expansionDispatcher.notify(this.id,t)}else this.closed.emit();this._changeDetectorRef.markForCheck()}}_expanded=!1;get disabled(){return this._disabled()}set disabled(e){this._disabled.set(e)}_disabled=E(!1);_removeUniqueSelectionListener=()=>{};ngOnInit(){this._removeUniqueSelectionListener=this._expansionDispatcher.listen((e,t)=>{this.accordion&&!this.accordion.multi&&this.accordion.id===t&&this.id!==e&&(this.expanded=!1)}),this.accordion&&(this._openCloseAllSubscription=this._subscribeToOpenCloseAllActions())}ngOnDestroy(){this.opened.complete(),this.closed.complete(),this.destroyed.emit(),this.destroyed.complete(),this._removeUniqueSelectionListener(),this._openCloseAllSubscription.unsubscribe()}toggle(){this.disabled||(this.expanded=!this.expanded)}close(){this.disabled||(this.expanded=!1)}open(){this.disabled||(this.expanded=!0)}_subscribeToOpenCloseAllActions(){return this.accordion._openCloseAllActions.subscribe(e=>{this.disabled||(this.expanded=e)})}static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,selectors:[["cdk-accordion-item"],["","cdkAccordionItem",""]],inputs:{expanded:[2,"expanded","expanded",z],disabled:[2,"disabled","disabled",z]},outputs:{closed:"closed",opened:"opened",destroyed:"destroyed",expandedChange:"expandedChange"},exportAs:["cdkAccordionItem"],features:[le([{provide:Tp,useValue:void 0}])]})}return i})(),Ip=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=U({type:i});static \u0275inj=H({})}return i})();var oy=["body"],ay=["bodyWrapper"],ry=[[["mat-expansion-panel-header"]],"*",[["mat-action-row"]]],sy=["mat-expansion-panel-header","*","mat-action-row"];function ly(i,o){}var cy=[[["mat-panel-title"]],[["mat-panel-description"]],"*"],dy=["mat-panel-title","mat-panel-description","*"];function my(i,o){i&1&&(Ne(0,"span",1),Bi(),Ne(1,"svg",2),kt(2,"path",3),qe()())}var Rp=new k("MAT_ACCORDION"),Pp=new k("MAT_EXPANSION_PANEL"),uy=(()=>{class i{_template=m(tt);_expansionPanel=m(Pp,{optional:!0});static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,selectors:[["ng-template","matExpansionPanelContent",""]]})}return i})(),Op=new k("MAT_EXPANSION_PANEL_DEFAULT_OPTIONS"),uo=(()=>{class i extends Ap{_viewContainerRef=m(it);_animationsDisabled=ye();_document=m(K);_ngZone=m($);_elementRef=m(B);_renderer=m(we);_cleanupTransitionEnd;get hideToggle(){return this._hideToggle||this.accordion&&this.accordion.hideToggle}set hideToggle(e){this._hideToggle=e}_hideToggle=!1;get togglePosition(){return this._togglePosition||this.accordion&&this.accordion.togglePosition}set togglePosition(e){this._togglePosition=e}_togglePosition;afterExpand=new X;afterCollapse=new X;_inputChanges=new O;accordion=m(Rp,{optional:!0,skipSelf:!0});_lazyContent;_body;_bodyWrapper;_portal;_headerId=m(De).getId("mat-expansion-panel-header-");constructor(){super();let e=m(Op,{optional:!0});this._expansionDispatcher=m(Ya),e&&(this.hideToggle=e.hideToggle)}_hasSpacing(){return this.accordion?this.expanded&&this.accordion.displayMode==="default":!1}_getExpandedState(){return this.expanded?"expanded":"collapsed"}toggle(){this.expanded=!this.expanded}close(){this.expanded=!1}open(){this.expanded=!0}ngAfterContentInit(){this._lazyContent&&this._lazyContent._expansionPanel===this&&this.opened.pipe(Ee(null),ke(()=>this.expanded&&!this._portal),pt(1)).subscribe(()=>{this._portal=new Gt(this._lazyContent._template,this._viewContainerRef)}),this._setupAnimationEvents()}ngOnChanges(e){this._inputChanges.next(e)}ngOnDestroy(){super.ngOnDestroy(),this._cleanupTransitionEnd?.(),this._inputChanges.complete()}_containsFocus(){if(this._body){let e=this._document.activeElement,t=this._body.nativeElement;return e===t||t.contains(e)}return!1}_transitionEndListener=({target:e,propertyName:t})=>{e===this._bodyWrapper?.nativeElement&&t==="grid-template-rows"&&this._ngZone.run(()=>{this.expanded?this.afterExpand.emit():this.afterCollapse.emit()})};_setupAnimationEvents(){this._ngZone.runOutsideAngular(()=>{this._animationsDisabled?(this.opened.subscribe(()=>this._ngZone.run(()=>this.afterExpand.emit())),this.closed.subscribe(()=>this._ngZone.run(()=>this.afterCollapse.emit()))):setTimeout(()=>{let e=this._elementRef.nativeElement;this._cleanupTransitionEnd=this._renderer.listen(e,"transitionend",this._transitionEndListener),e.classList.add("mat-expansion-panel-animations-enabled")},200)})}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=R({type:i,selectors:[["mat-expansion-panel"]],contentQueries:function(t,n,a){if(t&1&&dt(a,uy,5),t&2){let r;N(r=L())&&(n._lazyContent=r.first)}},viewQuery:function(t,n){if(t&1&&Re(oy,5)(ay,5),t&2){let a;N(a=L())&&(n._body=a.first),N(a=L())&&(n._bodyWrapper=a.first)}},hostAttrs:[1,"mat-expansion-panel"],hostVars:4,hostBindings:function(t,n){t&2&&p("mat-expanded",n.expanded)("mat-expansion-panel-spacing",n._hasSpacing())},inputs:{hideToggle:[2,"hideToggle","hideToggle",z],togglePosition:"togglePosition"},outputs:{afterExpand:"afterExpand",afterCollapse:"afterCollapse"},exportAs:["matExpansionPanel"],features:[le([{provide:Rp,useValue:void 0},{provide:Pp,useExisting:i}]),ie,Ie],ngContentSelectors:sy,decls:9,vars:4,consts:[["bodyWrapper",""],["body",""],[1,"mat-expansion-panel-content-wrapper"],["role","region",1,"mat-expansion-panel-content",3,"id"],[1,"mat-expansion-panel-body"],[3,"cdkPortalOutlet"]],template:function(t,n){t&1&&(ve(ry),W(0),s(1,"div",2,0)(3,"div",3,1)(5,"div",4),W(6,1),We(7,ly,0,0,"ng-template",5),l(),W(8,2),l()()),t&2&&(c(),J("inert",n.expanded?null:""),c(2),x("id",n.id),J("aria-labelledby",n._headerId),c(4),x("cdkPortalOutlet",n._portal))},dependencies:[Xi],styles:[`.mat-expansion-panel {
5221
+ `,Eb=["unscopedContent"],Tb=["text"],Ab=[[["","matListItemAvatar",""],["","matListItemIcon",""]],[["","matListItemTitle",""]],[["","matListItemLine",""]],"*",[["","matListItemMeta",""]],[["mat-divider"]]],Ib=["[matListItemAvatar],[matListItemIcon]","[matListItemTitle]","[matListItemLine]","*","[matListItemMeta]","mat-divider"];var Rb=new k("ListOption"),Pb=(()=>{class i{_elementRef=m(B);static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,selectors:[["","matListItemTitle",""]],hostAttrs:[1,"mat-mdc-list-item-title","mdc-list-item__primary-text"]})}return i})(),Ob=(()=>{class i{_elementRef=m(B);static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,selectors:[["","matListItemLine",""]],hostAttrs:[1,"mat-mdc-list-item-line","mdc-list-item__secondary-text"]})}return i})(),Fb=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,selectors:[["","matListItemMeta",""]],hostAttrs:[1,"mat-mdc-list-item-meta","mdc-list-item__end"]})}return i})(),xp=(()=>{class i{_listOption=m(Rb,{optional:!0});_isAlignedAtStart(){return!this._listOption||this._listOption?._getTogglePosition()==="after"}static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,hostVars:4,hostBindings:function(t,n){t&2&&p("mdc-list-item__start",n._isAlignedAtStart())("mdc-list-item__end",!n._isAlignedAtStart())}})}return i})(),Nb=(()=>{class i extends xp{static \u0275fac=(()=>{let e;return function(n){return(e||(e=xe(i)))(n||i)}})();static \u0275dir=T({type:i,selectors:[["","matListItemAvatar",""]],hostAttrs:[1,"mat-mdc-list-item-avatar"],features:[ie]})}return i})(),Lb=(()=>{class i extends xp{static \u0275fac=(()=>{let e;return function(n){return(e||(e=xe(i)))(n||i)}})();static \u0275dir=T({type:i,selectors:[["","matListItemIcon",""]],hostAttrs:[1,"mat-mdc-list-item-icon"],features:[ie]})}return i})(),Vb=new k("MAT_LIST_CONFIG"),Zc=(()=>{class i{_isNonInteractive=!0;get disableRipple(){return this._disableRipple}set disableRipple(e){this._disableRipple=gt(e)}_disableRipple=!1;get disabled(){return this._disabled()}set disabled(e){this._disabled.set(gt(e))}_disabled=E(!1);_defaultOptions=m(Vb,{optional:!0});static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,hostVars:1,hostBindings:function(t,n){t&2&&J("aria-disabled",n.disabled)},inputs:{disableRipple:"disableRipple",disabled:"disabled"}})}return i})(),Bb=(()=>{class i{_elementRef=m(B);_ngZone=m($);_listBase=m(Zc,{optional:!0});_platform=m(fe);_hostElement;_isButtonElement;_noopAnimations=ye();_avatars;_icons;set lines(e){this._explicitLines=ti(e,null),this._updateItemLines(!1)}_explicitLines=null;get disableRipple(){return this.disabled||this._disableRipple||this._noopAnimations||!!this._listBase?.disableRipple}set disableRipple(e){this._disableRipple=gt(e)}_disableRipple=!1;get disabled(){return this._disabled()||!!this._listBase?.disabled}set disabled(e){this._disabled.set(gt(e))}_disabled=E(!1);_subscriptions=new Te;_rippleRenderer=null;_hasUnscopedTextContent=!1;rippleConfig;get rippleDisabled(){return this.disableRipple||!!this.rippleConfig.disabled}constructor(){m(Be).load(Gt);let e=m(lo,{optional:!0});this.rippleConfig=e||{},this._hostElement=this._elementRef.nativeElement,this._isButtonElement=this._hostElement.nodeName.toLowerCase()==="button",this._listBase&&!this._listBase._isNonInteractive&&this._initInteractiveListItem(),this._isButtonElement&&!this._hostElement.hasAttribute("type")&&this._hostElement.setAttribute("type","button")}ngAfterViewInit(){this._monitorProjectedLinesAndTitle(),this._updateItemLines(!0)}ngOnDestroy(){this._subscriptions.unsubscribe(),this._rippleRenderer!==null&&this._rippleRenderer._removeTriggerEvents()}_hasIconOrAvatar(){return!!(this._avatars.length||this._icons.length)}_initInteractiveListItem(){this._hostElement.classList.add("mat-mdc-list-item-interactive"),this._rippleRenderer=new so(this,this._ngZone,this._hostElement,this._platform,m(Z)),this._rippleRenderer.setupTriggerEvents(this._hostElement)}_monitorProjectedLinesAndTitle(){this._ngZone.runOutsideAngular(()=>{this._subscriptions.add(Xe(this._lines.changes,this._titles.changes).subscribe(()=>this._updateItemLines(!1)))})}_updateItemLines(e){if(!this._lines||!this._titles||!this._unscopedContent)return;e&&this._checkDomForUnscopedTextContent();let t=this._explicitLines??this._inferLinesFromContent(),n=this._unscopedContent.nativeElement;if(this._hostElement.classList.toggle("mat-mdc-list-item-single-line",t<=1),this._hostElement.classList.toggle("mdc-list-item--with-one-line",t<=1),this._hostElement.classList.toggle("mdc-list-item--with-two-lines",t===2),this._hostElement.classList.toggle("mdc-list-item--with-three-lines",t===3),this._hasUnscopedTextContent){let a=this._titles.length===0&&t===1;n.classList.toggle("mdc-list-item__primary-text",a),n.classList.toggle("mdc-list-item__secondary-text",!a)}else n.classList.remove("mdc-list-item__primary-text"),n.classList.remove("mdc-list-item__secondary-text")}_inferLinesFromContent(){let e=this._titles.length+this._lines.length;return this._hasUnscopedTextContent&&(e+=1),e}_checkDomForUnscopedTextContent(){this._hasUnscopedTextContent=Array.from(this._unscopedContent.nativeElement.childNodes).filter(e=>e.nodeType!==e.COMMENT_NODE).some(e=>!!(e.textContent&&e.textContent.trim()))}static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,contentQueries:function(t,n,a){if(t&1&&dt(a,Nb,4)(a,Lb,4),t&2){let r;N(r=L())&&(n._avatars=r),N(r=L())&&(n._icons=r)}},hostVars:4,hostBindings:function(t,n){t&2&&(J("aria-disabled",n.disabled)("disabled",n._isButtonElement&&n.disabled||null),p("mdc-list-item--disabled",n.disabled))},inputs:{lines:"lines",disableRipple:"disableRipple",disabled:"disabled"}})}return i})();var wp=(()=>{class i extends Zc{static \u0275fac=(()=>{let e;return function(n){return(e||(e=xe(i)))(n||i)}})();static \u0275cmp=R({type:i,selectors:[["mat-list"]],hostAttrs:[1,"mat-mdc-list","mat-mdc-list-base","mdc-list"],exportAs:["matList"],features:[le([{provide:Zc,useExisting:i}]),ie],ngContentSelectors:kb,decls:1,vars:0,template:function(t,n){t&1&&(ve(),W(0))},styles:[Mb],encapsulation:2})}return i})(),Dp=(()=>{class i extends Bb{_lines;_titles;_meta;_unscopedContent;_itemText;get activated(){return this._activated}set activated(e){this._activated=gt(e)}_activated=!1;_getAriaCurrent(){return this._hostElement.nodeName==="A"&&this._activated?"page":null}_hasBothLeadingAndTrailing(){return this._meta.length!==0&&(this._avatars.length!==0||this._icons.length!==0)}static \u0275fac=(()=>{let e;return function(n){return(e||(e=xe(i)))(n||i)}})();static \u0275cmp=R({type:i,selectors:[["mat-list-item"],["a","mat-list-item",""],["button","mat-list-item",""]],contentQueries:function(t,n,a){if(t&1&&dt(a,Ob,5)(a,Pb,5)(a,Fb,5),t&2){let r;N(r=L())&&(n._lines=r),N(r=L())&&(n._titles=r),N(r=L())&&(n._meta=r)}},viewQuery:function(t,n){if(t&1&&Re(Eb,5)(Tb,5),t&2){let a;N(a=L())&&(n._unscopedContent=a.first),N(a=L())&&(n._itemText=a.first)}},hostAttrs:[1,"mat-mdc-list-item","mdc-list-item"],hostVars:13,hostBindings:function(t,n){t&2&&(J("aria-current",n._getAriaCurrent()),p("mdc-list-item--activated",n.activated)("mdc-list-item--with-leading-avatar",n._avatars.length!==0)("mdc-list-item--with-leading-icon",n._icons.length!==0)("mdc-list-item--with-trailing-meta",n._meta.length!==0)("mat-mdc-list-item-both-leading-and-trailing",n._hasBothLeadingAndTrailing())("_mat-animation-noopable",n._noopAnimations))},inputs:{activated:"activated"},exportAs:["matListItem"],features:[ie],ngContentSelectors:Ib,decls:10,vars:0,consts:[["unscopedContent",""],[1,"mdc-list-item__content"],[1,"mat-mdc-list-item-unscoped-content",3,"cdkObserveContent"],[1,"mat-focus-indicator"]],template:function(t,n){t&1&&(ve(Ab),W(0),s(1,"span",1),W(2,1),W(3,2),s(4,"span",2,0),S("cdkObserveContent",function(){return n._updateItemLines(!0)}),W(6,3),l()(),W(7,4),W(8,5),_(9,"div",3))},dependencies:[tu],encapsulation:2})}return i})();var Sp=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=U({type:i});static \u0275inj=H({imports:[Fo,Ki,Gs,ce,ea]})}return i})();function zb(i,o){i&1&&_(0,"mat-progress-bar",5)}function jb(i,o){i&1&&(s(0,"span",13),d(1,"(removed)"),l())}function Hb(i,o){i&1&&(s(0,"mat-icon"),d(1,"check_box"),l())}function Ub(i,o){i&1&&(s(0,"mat-icon"),d(1,"check_box_outline_blank"),l())}function $b(i,o){if(i&1){let e=_e();s(0,"mat-list-item")(1,"div",11)(2,"span",12),d(3),l(),w(4,jb,2,0,"span",13),s(5,"button",14),S("click",function(){let n=ne(e).$implicit,a=v(3);return oe(a.toggle(n))}),w(6,Hb,2,0,"mat-icon")(7,Ub,2,0,"mat-icon"),l()()()}if(i&2){let e=o.$implicit,t=v(3);p("orphaned",t.isOrphaned(e)),c(3),I(e),c(),D(t.isOrphaned(e)?4:-1),c(),J("aria-label","Toggle "+e),c(),D(t.isManaged(e)?6:7)}}function Gb(i,o){if(i&1&&(s(0,"mat-list"),ee(1,$b,8,6,"mat-list-item",10,Ye),l()),i&2){let e=v(2);c(),te(e.filteredServices)}}function Wb(i,o){if(i&1&&d(0),i&2){let e=v(3);Q(' No services match "',e.filter(),'" ')}}function qb(i,o){i&1&&d(0," No installed services found ")}function Kb(i,o){if(i&1&&(s(0,"p",9),w(1,Wb,1,1)(2,qb,1,0),l()),i&2){let e=v(2);c(),D(e.filter()?1:2)}}function Xb(i,o){if(i&1&&(s(0,"div",6),w(1,Gb,3,0,"mat-list")(2,Kb,3,1,"p",9),l()),i&2){let e=v();c(),D(e.filteredServices.length>0?1:2)}}var kp=(()=>{class i{constructor(){this.serviceService=m(wt),this.dialogRef=m(et),this.available=E([]),this.managed=E(new Set),this.orphaned=E(new Set),this.loading=E(!0),this.filter=E("")}ngOnInit(){return q(this,null,function*(){try{let[e,t]=yield Promise.all([re(this.serviceService.listAvailableServices()),re(this.serviceService.listManagedServices())]);this.available.set(e),this.managed.set(new Set(t));let n=new Set(e),a=t.filter(r=>!n.has(r));this.orphaned.set(new Set(a))}catch(e){console.error("[ManagedServicesDialog] load error:",e)}finally{this.loading.set(!1)}})}get filteredServices(){let e=this.available(),t=this.orphaned(),n=[...new Set([...e,...t])].sort(),a=this.filter();if(!a)return n;let r=a.toLowerCase();return n.filter(u=>u.toLowerCase().includes(r))}isOrphaned(e){return this.orphaned().has(e)}isManaged(e){return this.managed().has(e)}toggle(e){return q(this,null,function*(){try{this.isManaged(e)?yield re(this.serviceService.removeManagedService(e)):yield re(this.serviceService.addManagedService(e));let t=new Set(this.managed());t.has(e)?t.delete(e):t.add(e),this.managed.set(t)}catch(t){console.error(`[ManagedServicesDialog] toggle error (${e}):`,t)}})}close(){this.dialogRef.close(!0)}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=R({type:i,selectors:[["app-managed-services-dialog"]],decls:13,vars:2,consts:[[1,"dialog-container"],["mat-dialog-title",""],[1,"dialog-description"],["appearance","outline",1,"filter-field"],["matInput","","placeholder","Filter services...",3,"input","value"],["mode","indeterminate"],[1,"services-list"],["align","end"],["mat-raised-button","","color","primary",3,"click"],[1,"no-services"],[3,"orphaned"],[1,"service-row"],[1,"service-name"],[1,"orphaned-hint"],["mat-icon-button","",3,"click"]],template:function(t,n){t&1&&(s(0,"div",0)(1,"h2",1),d(2,"Manage services"),l(),s(3,"mat-dialog-content")(4,"p",2),d(5,"Select which system services to control."),l(),s(6,"mat-form-field",3)(7,"input",4),S("input",function(r){return n.filter.set(r.target.value)}),l()(),w(8,zb,1,0,"mat-progress-bar",5)(9,Xb,3,1,"div",6),l(),s(10,"mat-dialog-actions",7)(11,"button",8),S("click",function(){return n.close()}),d(12,"Done"),l()()()),t&2&&(c(7),x("value",n.filter()),c(),D(n.loading()?8:9))},dependencies:[Me,ze,Ue,Ai,st,yt,xt,Ct,Hn,Sp,wp,Dp,pi,Hi,Mt,ut,Pt,Rt,bt,vt],styles:[".dialog-container[_ngcontent-%COMP%]{min-width:400px;max-width:500px}mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:8px}.dialog-description[_ngcontent-%COMP%]{margin:0 0 12px;color:#666;font-size:.9rem}.filter-field[_ngcontent-%COMP%]{width:100%;margin-bottom:8px}.services-list[_ngcontent-%COMP%]{max-height:400px;overflow-y:auto}.service-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;width:100%}.service-row[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin-left:auto;flex-shrink:0}.service-name[_ngcontent-%COMP%]{font-family:monospace;font-size:.95rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.no-services[_ngcontent-%COMP%]{text-align:center;color:#999;font-size:.9rem;padding:16px 0}mat-list-item.orphaned[_ngcontent-%COMP%] .service-name[_ngcontent-%COMP%]{color:#999}mat-list-item.orphaned[_ngcontent-%COMP%] .orphaned-hint[_ngcontent-%COMP%]{color:#bbb;font-size:.8rem;font-style:italic;margin-right:8px}"]})}}return i})();var Mp=(()=>{class i{constructor(){this.dialogRef=m(et),this.data=m(Ni),this.service=this.data.service,this.user=this.data.user,this.password=""}submit(){this.password&&this.dialogRef.close(this.password)}cancel(){this.dialogRef.close()}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=R({type:i,selectors:[["app-account-password-dialog"]],decls:20,vars:5,consts:[["mat-dialog-title",""],[1,"dialog-description"],["appearance","outline",1,"full-width"],["matInput","","type","password","name","accountPassword","autocomplete","new-password","autofocus","",3,"ngModelChange","keyup.enter","ngModel"],["align","end"],["mat-stroked-button","",3,"click"],["mat-raised-button","","color","primary",3,"click","disabled"]],template:function(t,n){t&1&&(s(0,"h2",0),d(1),l(),s(2,"mat-dialog-content")(3,"p",1),d(4," Service "),s(5,"strong"),d(6),l(),d(7," is registered to run as "),s(8,"strong"),d(9),l(),d(10,", and the Windows service manager logs that account on with its password. It keeps its own protected copy, so nothing you type here is saved \u2014 the next reinstall or edit asks for it again. "),l(),s(11,"mat-form-field",2)(12,"input",3),Td("ngModelChange",function(r){return Ed(n.password,r)||(n.password=r),r}),S("keyup.enter",function(){return n.submit()}),l(),y(),s(13,"mat-label"),d(14,"Password"),l()()(),s(15,"mat-dialog-actions",4)(16,"button",5),S("click",function(){return n.cancel()}),d(17,"Cancel"),l(),s(18,"button",6),S("click",function(){return n.submit()}),d(19,"Continue"),l()()),t&2&&(c(),Q("Password of ",n.user),c(5),I(n.service),c(3),I(n.user),c(3),Md("ngModel",n.password),C(),c(6),x("disabled",!n.password))},dependencies:[Me,gi,Zt,Qt,Ha,ze,Ue,Pt,Rt,ut,_t,st,yt,xt,Ct],styles:["mat-dialog-content[_ngcontent-%COMP%]{min-width:380px;display:flex;flex-direction:column;gap:8px}.dialog-description[_ngcontent-%COMP%]{margin:0;color:#666;font-size:.9rem;line-height:1.45}.full-width[_ngcontent-%COMP%]{width:100%}mat-dialog-actions[_ngcontent-%COMP%]{gap:8px}"]})}}return i})();var Ws=(()=>{class i{constructor(){this.dialog=m(Nn),this.system=m(Ot)}askFor(e){return q(this,null,function*(){if(!e?.user||!(yield this.system.detectWindows()))return;let t=this.dialog.open(Mp,{data:{service:e.name,user:e.user},width:"460px"});return(yield re(t.afterClosed()))||null})}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275prov=ae({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var Yb=(i,o)=>o.name;function Zb(i,o){i&1&&_(0,"mat-progress-bar",4)}function Qb(i,o){if(i&1){let e=_e();s(0,"button",14),S("click",function(){ne(e);let n=v().$implicit,a=v(2);return oe(a.restore(n.name))}),s(1,"mat-icon"),d(2,"restore"),l()()}if(i&2){let e=v(3);x("disabled",e.busy()!==null)}}function Jb(i,o){if(i&1){let e=_e();s(0,"button",15),S("click",function(){ne(e);let n=v().$implicit,a=v(2);return oe(a.archive(n.name))}),s(1,"mat-icon"),d(2,"inventory_2"),l()()}if(i&2){let e=v(3);x("disabled",e.busy()!==null)}}function ey(i,o){if(i&1){let e=_e();s(0,"div",9)(1,"span",10),d(2),l(),w(3,Qb,3,1,"button",11)(4,Jb,3,1,"button",12),s(5,"button",13),S("click",function(){let n=ne(e).$implicit,a=v(2);return oe(a.remove(n.name,n.archived))}),s(6,"mat-icon"),d(7,"delete"),l()()()}if(i&2){let e=o.$implicit,t=v(2);c(),p("archived",e.archived),x("title",e.name),c(),I(e.name),c(),D(e.archived?3:4),c(2),x("disabled",t.busy()!==null)}}function ty(i,o){if(i&1&&(s(0,"div",5),ee(1,ey,8,6,"div",9,Yb),l()),i&2){let e=v();c(),te(e.filtered())}}function iy(i,o){if(i&1&&d(0),i&2){let e=v(2);Q(' No services match "',e.filter().trim(),'". ')}}function ny(i,o){i&1&&d(0," No services configured. ")}function oy(i,o){if(i&1&&(s(0,"p",6),w(1,iy,1,1)(2,ny,1,0),l()),i&2){let e=v();c(),D(e.filter().trim()?1:2)}}var Ep=(()=>{class i{constructor(){this.serviceService=m(wt),this.dialogRef=m(et),this.snackBar=m(zs),this.accountPassword=m(Ws),this.active=E([]),this.archived=E([]),this.loading=E(!0),this.busy=E(null),this.filter=E(""),this.entries=P(()=>[...this.active().map(e=>({name:e.name,archived:!1})),...this.archived().map(e=>({name:e.name,archived:!0}))].sort((e,t)=>e.name.localeCompare(t.name))),this.filtered=P(()=>{let e=this.filter().trim().toLowerCase(),t=this.entries();return e?t.filter(n=>n.name.toLowerCase().includes(e)):t}),this.dirty=!1}onFilterInput(e){this.filter.set(e.target.value)}ngOnInit(){return q(this,null,function*(){try{let[e,t]=yield Promise.all([re(this.serviceService.fetchConfigs()),re(this.serviceService.fetchArchivedConfigs())]);this.active.set(e),this.archived.set(t)}catch(e){console.error("[ArchiveDialog] load error:",e)}finally{this.loading.set(!1)}})}archive(e){return q(this,null,function*(){this.busy.set(e);try{let t=this.active().find(n=>n.name===e);yield re(this.serviceService.archiveService(e)),t&&(this.active.set(this.active().filter(n=>n.name!==e)),this.archived.set([...this.archived(),t])),this.dirty=!0}catch(t){this.showError(`Archive "${e}": ${this.errorText(t)}`)}finally{this.busy.set(null)}})}restore(e){return q(this,null,function*(){let t=this.archived().find(a=>a.name===e),n=yield this.accountPassword.askFor(t);if(n!==null){this.busy.set(e);try{yield re(this.serviceService.restoreService(e,n??void 0)),t&&(this.archived.set(this.archived().filter(a=>a.name!==e)),this.active.set([...this.active(),t])),this.dirty=!0}catch(a){this.showError(`Restore "${e}": ${this.errorText(a)}`)}finally{this.busy.set(null)}}})}remove(e,t){return q(this,null,function*(){let n=t?`Delete archived service "${e}"? Its config will be permanently removed.`:`Delete service "${e}"? Its systemd unit will be uninstalled and its config permanently removed.`;if(confirm(n)){this.busy.set(e);try{yield re(this.serviceService.deleteConfig(e)),this.active.set(this.active().filter(a=>a.name!==e)),this.archived.set(this.archived().filter(a=>a.name!==e)),this.dirty=!0}catch(a){this.showError(`Delete "${e}": ${this.errorText(a)}`)}finally{this.busy.set(null)}}})}showError(e){this.snackBar.open(e,"Dismiss",{duration:6e3,horizontalPosition:"center",verticalPosition:"top"})}errorText(e){return e instanceof Ht?e.error?.error??e.message:String(e)}close(){this.dialogRef.close(this.dirty)}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=R({type:i,selectors:[["app-archive-dialog"]],decls:13,vars:2,consts:[[1,"dialog-container"],["mat-dialog-title",""],[1,"dialog-description"],["type","text","placeholder","Filter by name\u2026",1,"archive-filter",3,"input","value"],["mode","indeterminate"],[1,"entry-list"],[1,"empty-panel"],["align","end"],["mat-raised-button","","color","primary",3,"click"],[1,"entry"],[1,"entry-name",3,"title"],["mat-icon-button","","title","Restore from archive",1,"entry-btn",3,"disabled"],["mat-icon-button","","title","Move to archive",1,"entry-btn",3,"disabled"],["mat-icon-button","","title","Delete service",1,"entry-btn","delete-btn",3,"click","disabled"],["mat-icon-button","","title","Restore from archive",1,"entry-btn",3,"click","disabled"],["mat-icon-button","","title","Move to archive",1,"entry-btn",3,"click","disabled"]],template:function(t,n){t&1&&(s(0,"div",0)(1,"h2",1),d(2,"Archive"),l(),s(3,"mat-dialog-content")(4,"p",2),d(5," Archive a service to stop, uninstall, and shelve its config \u2014 restore it any time. Archived services are shown grayed out. "),l(),s(6,"input",3),S("input",function(r){return n.onFilterInput(r)}),l(),w(7,Zb,1,0,"mat-progress-bar",4)(8,ty,3,0,"div",5)(9,oy,3,1,"p",6),l(),s(10,"mat-dialog-actions",7)(11,"button",8),S("click",function(){return n.close()}),d(12,"Done"),l()()()),t&2&&(c(6),x("value",n.filter()),c(),D(n.loading()?7:n.filtered().length>0?8:9))},dependencies:[Me,ze,Ue,Ai,st,yt,xt,Ct,pi,Hi,bt,vt],styles:['@charset "UTF-8";.dialog-container[_ngcontent-%COMP%]{min-width:560px;max-width:640px;height:80vh;display:flex;flex-direction:column}mat-dialog-title[_ngcontent-%COMP%]{flex:0 0 auto;margin-bottom:8px}mat-dialog-content[_ngcontent-%COMP%]{flex:1 1 auto;min-height:0;overflow:hidden;display:flex;flex-direction:column}.dialog-description[_ngcontent-%COMP%]{flex:0 0 auto;margin:0 0 12px;color:#666;font-size:.9rem}.archive-filter[_ngcontent-%COMP%]{flex:0 0 auto;width:100%;box-sizing:border-box;padding:8px 10px;margin-bottom:8px;font-size:.9rem;border:1px solid #e0e0e0;border-radius:6px;background-color:#fafafa;color:#333}.archive-filter[_ngcontent-%COMP%]:focus{outline:none;border-color:#9e9e9e}mat-dialog-actions[_ngcontent-%COMP%]{flex:0 0 auto}.entry-list[_ngcontent-%COMP%]{flex:1 1 auto;min-height:0;overflow-y:auto;border:1px solid #e0e0e0;border-radius:8px;padding:4px 0}.entry[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding:4px 12px}.entry[_ngcontent-%COMP%]:hover{background-color:#f5f5f5}.entry-name[_ngcontent-%COMP%]{flex:1;font-family:monospace;font-size:.9rem;color:#333;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.entry-name.archived[_ngcontent-%COMP%]{color:#999}.entry-btn[_ngcontent-%COMP%]{flex-shrink:0}.delete-btn[_ngcontent-%COMP%]{color:#b71c1c}.empty-panel[_ngcontent-%COMP%]{text-align:center;color:#999;font-size:.9rem;padding:16px 0;margin:0}']})}}return i})();var Tp=new k("CdkAccordion");var Ap=(()=>{class i{accordion=m(Tp,{optional:!0,skipSelf:!0});_changeDetectorRef=m(se);_expansionDispatcher=m(Ya);_openCloseAllSubscription=Te.EMPTY;closed=new X;opened=new X;destroyed=new X;expandedChange=new X;id=m(De).getId("cdk-accordion-child-");get expanded(){return this._expanded}set expanded(e){if(this._expanded!==e){if(this._expanded=e,this.expandedChange.emit(e),e){this.opened.emit();let t=this.accordion?this.accordion.id:this.id;this._expansionDispatcher.notify(this.id,t)}else this.closed.emit();this._changeDetectorRef.markForCheck()}}_expanded=!1;get disabled(){return this._disabled()}set disabled(e){this._disabled.set(e)}_disabled=E(!1);_removeUniqueSelectionListener=()=>{};ngOnInit(){this._removeUniqueSelectionListener=this._expansionDispatcher.listen((e,t)=>{this.accordion&&!this.accordion.multi&&this.accordion.id===t&&this.id!==e&&(this.expanded=!1)}),this.accordion&&(this._openCloseAllSubscription=this._subscribeToOpenCloseAllActions())}ngOnDestroy(){this.opened.complete(),this.closed.complete(),this.destroyed.emit(),this.destroyed.complete(),this._removeUniqueSelectionListener(),this._openCloseAllSubscription.unsubscribe()}toggle(){this.disabled||(this.expanded=!this.expanded)}close(){this.disabled||(this.expanded=!1)}open(){this.disabled||(this.expanded=!0)}_subscribeToOpenCloseAllActions(){return this.accordion._openCloseAllActions.subscribe(e=>{this.disabled||(this.expanded=e)})}static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,selectors:[["cdk-accordion-item"],["","cdkAccordionItem",""]],inputs:{expanded:[2,"expanded","expanded",z],disabled:[2,"disabled","disabled",z]},outputs:{closed:"closed",opened:"opened",destroyed:"destroyed",expandedChange:"expandedChange"},exportAs:["cdkAccordionItem"],features:[le([{provide:Tp,useValue:void 0}])]})}return i})(),Ip=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=U({type:i});static \u0275inj=H({})}return i})();var ay=["body"],ry=["bodyWrapper"],sy=[[["mat-expansion-panel-header"]],"*",[["mat-action-row"]]],ly=["mat-expansion-panel-header","*","mat-action-row"];function cy(i,o){}var dy=[[["mat-panel-title"]],[["mat-panel-description"]],"*"],my=["mat-panel-title","mat-panel-description","*"];function uy(i,o){i&1&&(Ne(0,"span",1),Bi(),Ne(1,"svg",2),kt(2,"path",3),qe()())}var Rp=new k("MAT_ACCORDION"),Pp=new k("MAT_EXPANSION_PANEL"),hy=(()=>{class i{_template=m(tt);_expansionPanel=m(Pp,{optional:!0});static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,selectors:[["ng-template","matExpansionPanelContent",""]]})}return i})(),Op=new k("MAT_EXPANSION_PANEL_DEFAULT_OPTIONS"),uo=(()=>{class i extends Ap{_viewContainerRef=m(it);_animationsDisabled=ye();_document=m(K);_ngZone=m($);_elementRef=m(B);_renderer=m(we);_cleanupTransitionEnd;get hideToggle(){return this._hideToggle||this.accordion&&this.accordion.hideToggle}set hideToggle(e){this._hideToggle=e}_hideToggle=!1;get togglePosition(){return this._togglePosition||this.accordion&&this.accordion.togglePosition}set togglePosition(e){this._togglePosition=e}_togglePosition;afterExpand=new X;afterCollapse=new X;_inputChanges=new O;accordion=m(Rp,{optional:!0,skipSelf:!0});_lazyContent;_body;_bodyWrapper;_portal;_headerId=m(De).getId("mat-expansion-panel-header-");constructor(){super();let e=m(Op,{optional:!0});this._expansionDispatcher=m(Ya),e&&(this.hideToggle=e.hideToggle)}_hasSpacing(){return this.accordion?this.expanded&&this.accordion.displayMode==="default":!1}_getExpandedState(){return this.expanded?"expanded":"collapsed"}toggle(){this.expanded=!this.expanded}close(){this.expanded=!1}open(){this.expanded=!0}ngAfterContentInit(){this._lazyContent&&this._lazyContent._expansionPanel===this&&this.opened.pipe(Ee(null),ke(()=>this.expanded&&!this._portal),pt(1)).subscribe(()=>{this._portal=new Wt(this._lazyContent._template,this._viewContainerRef)}),this._setupAnimationEvents()}ngOnChanges(e){this._inputChanges.next(e)}ngOnDestroy(){super.ngOnDestroy(),this._cleanupTransitionEnd?.(),this._inputChanges.complete()}_containsFocus(){if(this._body){let e=this._document.activeElement,t=this._body.nativeElement;return e===t||t.contains(e)}return!1}_transitionEndListener=({target:e,propertyName:t})=>{e===this._bodyWrapper?.nativeElement&&t==="grid-template-rows"&&this._ngZone.run(()=>{this.expanded?this.afterExpand.emit():this.afterCollapse.emit()})};_setupAnimationEvents(){this._ngZone.runOutsideAngular(()=>{this._animationsDisabled?(this.opened.subscribe(()=>this._ngZone.run(()=>this.afterExpand.emit())),this.closed.subscribe(()=>this._ngZone.run(()=>this.afterCollapse.emit()))):setTimeout(()=>{let e=this._elementRef.nativeElement;this._cleanupTransitionEnd=this._renderer.listen(e,"transitionend",this._transitionEndListener),e.classList.add("mat-expansion-panel-animations-enabled")},200)})}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=R({type:i,selectors:[["mat-expansion-panel"]],contentQueries:function(t,n,a){if(t&1&&dt(a,hy,5),t&2){let r;N(r=L())&&(n._lazyContent=r.first)}},viewQuery:function(t,n){if(t&1&&Re(ay,5)(ry,5),t&2){let a;N(a=L())&&(n._body=a.first),N(a=L())&&(n._bodyWrapper=a.first)}},hostAttrs:[1,"mat-expansion-panel"],hostVars:4,hostBindings:function(t,n){t&2&&p("mat-expanded",n.expanded)("mat-expansion-panel-spacing",n._hasSpacing())},inputs:{hideToggle:[2,"hideToggle","hideToggle",z],togglePosition:"togglePosition"},outputs:{afterExpand:"afterExpand",afterCollapse:"afterCollapse"},exportAs:["matExpansionPanel"],features:[le([{provide:Rp,useValue:void 0},{provide:Pp,useExisting:i}]),ie,Ie],ngContentSelectors:ly,decls:9,vars:4,consts:[["bodyWrapper",""],["body",""],[1,"mat-expansion-panel-content-wrapper"],["role","region",1,"mat-expansion-panel-content",3,"id"],[1,"mat-expansion-panel-body"],[3,"cdkPortalOutlet"]],template:function(t,n){t&1&&(ve(sy),W(0),s(1,"div",2,0)(3,"div",3,1)(5,"div",4),W(6,1),We(7,cy,0,0,"ng-template",5),l(),W(8,2),l()()),t&2&&(c(),J("inert",n.expanded?null:""),c(2),x("id",n.id),J("aria-labelledby",n._headerId),c(4),x("cdkPortalOutlet",n._portal))},dependencies:[Xi],styles:[`.mat-expansion-panel {
5222
5222
  box-sizing: content-box;
5223
5223
  display: block;
5224
5224
  margin: 0;
@@ -5334,7 +5334,7 @@ mat-action-list button::-moz-focus-inner {
5334
5334
  margin-left: 0;
5335
5335
  margin-right: 8px;
5336
5336
  }
5337
- `],encapsulation:2})}return i})();var ta=(()=>{class i{panel=m(uo,{host:!0});_element=m(B);_focusMonitor=m(Xt);_changeDetectorRef=m(se);_parentChangeSubscription=Te.EMPTY;constructor(){m(Be).load($t);let e=this.panel,t=m(Op,{optional:!0}),n=m(new zi("tabindex"),{optional:!0}),a=e.accordion?e.accordion._stateChanges.pipe(ke(r=>!!(r.hideToggle||r.togglePosition))):mr;this.tabIndex=parseInt(n||"")||0,this._parentChangeSubscription=Xe(e.opened,e.closed,a,e._inputChanges.pipe(ke(r=>!!(r.hideToggle||r.disabled||r.togglePosition)))).subscribe(()=>this._changeDetectorRef.markForCheck()),e.closed.pipe(ke(()=>e._containsFocus())).subscribe(()=>this._focusMonitor.focusVia(this._element,"program")),t&&(this.expandedHeight=t.expandedHeight,this.collapsedHeight=t.collapsedHeight)}expandedHeight;collapsedHeight;tabIndex=0;get disabled(){return this.panel.disabled}_toggle(){this.disabled||this.panel.toggle()}_isExpanded(){return this.panel.expanded}_getExpandedState(){return this.panel._getExpandedState()}_getPanelId(){return this.panel.id}_getTogglePosition(){return this.panel.togglePosition}_showToggle(){return!this.panel.hideToggle&&!this.panel.disabled}_getHeaderHeight(){let e=this._isExpanded();return e&&this.expandedHeight?this.expandedHeight:!e&&this.collapsedHeight?this.collapsedHeight:null}_keydown(e){switch(e.keyCode){case 32:case 13:Ke(e)||(e.preventDefault(),this._toggle());break;default:this.panel.accordion&&this.panel.accordion._handleHeaderKeydown(e);return}}focus(e,t){e?this._focusMonitor.focusVia(this._element,e,t):this._element.nativeElement.focus(t)}ngAfterViewInit(){this._focusMonitor.monitor(this._element).subscribe(e=>{e&&this.panel.accordion&&this.panel.accordion._handleHeaderFocus(this)})}ngOnDestroy(){this._parentChangeSubscription.unsubscribe(),this._focusMonitor.stopMonitoring(this._element)}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=R({type:i,selectors:[["mat-expansion-panel-header"]],hostAttrs:["role","button",1,"mat-expansion-panel-header","mat-focus-indicator"],hostVars:13,hostBindings:function(t,n){t&1&&S("click",function(){return n._toggle()})("keydown",function(r){return n._keydown(r)}),t&2&&(J("id",n.panel._headerId)("tabindex",n.disabled?-1:n.tabIndex)("aria-controls",n._getPanelId())("aria-expanded",n._isExpanded())("aria-disabled",n.panel.disabled),je("height",n._getHeaderHeight()),p("mat-expanded",n._isExpanded())("mat-expansion-toggle-indicator-after",n._getTogglePosition()==="after")("mat-expansion-toggle-indicator-before",n._getTogglePosition()==="before"))},inputs:{expandedHeight:"expandedHeight",collapsedHeight:"collapsedHeight",tabIndex:[2,"tabIndex","tabIndex",e=>e==null?0:jt(e)]},ngContentSelectors:dy,decls:5,vars:3,consts:[[1,"mat-content"],[1,"mat-expansion-indicator"],["xmlns","http://www.w3.org/2000/svg","viewBox","0 -960 960 960","aria-hidden","true","focusable","false"],["d","M480-345 240-585l56-56 184 184 184-184 56 56-240 240Z"]],template:function(t,n){t&1&&(ve(cy),Ne(0,"span",0),W(1),W(2,1),W(3,2),qe(),w(4,my,3,0,"span",1)),t&2&&(p("mat-content-hide-toggle",!n._showToggle()),c(4),D(n._showToggle()?4:-1))},styles:[`.mat-expansion-panel-header {
5337
+ `],encapsulation:2})}return i})();var ta=(()=>{class i{panel=m(uo,{host:!0});_element=m(B);_focusMonitor=m(Yt);_changeDetectorRef=m(se);_parentChangeSubscription=Te.EMPTY;constructor(){m(Be).load(Gt);let e=this.panel,t=m(Op,{optional:!0}),n=m(new zi("tabindex"),{optional:!0}),a=e.accordion?e.accordion._stateChanges.pipe(ke(r=>!!(r.hideToggle||r.togglePosition))):mr;this.tabIndex=parseInt(n||"")||0,this._parentChangeSubscription=Xe(e.opened,e.closed,a,e._inputChanges.pipe(ke(r=>!!(r.hideToggle||r.disabled||r.togglePosition)))).subscribe(()=>this._changeDetectorRef.markForCheck()),e.closed.pipe(ke(()=>e._containsFocus())).subscribe(()=>this._focusMonitor.focusVia(this._element,"program")),t&&(this.expandedHeight=t.expandedHeight,this.collapsedHeight=t.collapsedHeight)}expandedHeight;collapsedHeight;tabIndex=0;get disabled(){return this.panel.disabled}_toggle(){this.disabled||this.panel.toggle()}_isExpanded(){return this.panel.expanded}_getExpandedState(){return this.panel._getExpandedState()}_getPanelId(){return this.panel.id}_getTogglePosition(){return this.panel.togglePosition}_showToggle(){return!this.panel.hideToggle&&!this.panel.disabled}_getHeaderHeight(){let e=this._isExpanded();return e&&this.expandedHeight?this.expandedHeight:!e&&this.collapsedHeight?this.collapsedHeight:null}_keydown(e){switch(e.keyCode){case 32:case 13:Ke(e)||(e.preventDefault(),this._toggle());break;default:this.panel.accordion&&this.panel.accordion._handleHeaderKeydown(e);return}}focus(e,t){e?this._focusMonitor.focusVia(this._element,e,t):this._element.nativeElement.focus(t)}ngAfterViewInit(){this._focusMonitor.monitor(this._element).subscribe(e=>{e&&this.panel.accordion&&this.panel.accordion._handleHeaderFocus(this)})}ngOnDestroy(){this._parentChangeSubscription.unsubscribe(),this._focusMonitor.stopMonitoring(this._element)}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=R({type:i,selectors:[["mat-expansion-panel-header"]],hostAttrs:["role","button",1,"mat-expansion-panel-header","mat-focus-indicator"],hostVars:13,hostBindings:function(t,n){t&1&&S("click",function(){return n._toggle()})("keydown",function(r){return n._keydown(r)}),t&2&&(J("id",n.panel._headerId)("tabindex",n.disabled?-1:n.tabIndex)("aria-controls",n._getPanelId())("aria-expanded",n._isExpanded())("aria-disabled",n.panel.disabled),je("height",n._getHeaderHeight()),p("mat-expanded",n._isExpanded())("mat-expansion-toggle-indicator-after",n._getTogglePosition()==="after")("mat-expansion-toggle-indicator-before",n._getTogglePosition()==="before"))},inputs:{expandedHeight:"expandedHeight",collapsedHeight:"collapsedHeight",tabIndex:[2,"tabIndex","tabIndex",e=>e==null?0:jt(e)]},ngContentSelectors:my,decls:5,vars:3,consts:[[1,"mat-content"],[1,"mat-expansion-indicator"],["xmlns","http://www.w3.org/2000/svg","viewBox","0 -960 960 960","aria-hidden","true","focusable","false"],["d","M480-345 240-585l56-56 184 184 184-184 56 56-240 240Z"]],template:function(t,n){t&1&&(ve(dy),Ne(0,"span",0),W(1),W(2,1),W(3,2),qe(),w(4,uy,3,0,"span",1)),t&2&&(p("mat-content-hide-toggle",!n._showToggle()),c(4),D(n._showToggle()?4:-1))},styles:[`.mat-expansion-panel-header {
5338
5338
  display: flex;
5339
5339
  flex-direction: row;
5340
5340
  align-items: center;
@@ -5475,7 +5475,7 @@ mat-action-list button::-moz-focus-inner {
5475
5475
  border-top-right-radius: 0;
5476
5476
  }
5477
5477
  }
5478
- `],encapsulation:2})}return i})(),ia=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,selectors:[["mat-panel-description"]],hostAttrs:[1,"mat-expansion-panel-header-description"]})}return i})(),na=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,selectors:[["mat-panel-title"]],hostAttrs:[1,"mat-expansion-panel-header-title"]})}return i})();var oa=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=U({type:i});static \u0275inj=H({imports:[Ip,Yi,ce]})}return i})();var hy=["tooltip"],py=20;var fy=new k("mat-tooltip-scroll-strategy",{providedIn:"root",factory:()=>{let i=m(Z);return()=>Fi(i,{scrollThrottle:py})}}),gy=new k("mat-tooltip-default-options",{providedIn:"root",factory:()=>({showDelay:0,hideDelay:0,touchendHideDelay:1500})});var Fp="tooltip-panel",_y={passive:!0},vy=8,by=8,yy=24,Cy=200,ho=(()=>{class i{_elementRef=m(B);_ngZone=m($);_platform=m(fe);_ariaDescriber=m(fu);_focusMonitor=m(Xt);_dir=m(Ze);_injector=m(Z);_viewContainerRef=m(it);_mediaMatcher=m(Io);_document=m(K);_renderer=m(we);_animationsDisabled=ye();_defaultOptions=m(gy,{optional:!0});_overlayRef=null;_tooltipInstance=null;_overlayPanelClass;_portal;_position="below";_positionAtOrigin=!1;_disabled=!1;_tooltipClass;_viewInitialized=!1;_pointerExitEventsInitialized=!1;_tooltipComponent=Np;_viewportMargin=8;_currentPosition;_cssClassPrefix="mat-mdc";_ariaDescriptionPending=!1;_dirSubscribed=!1;get position(){return this._position}set position(e){e!==this._position&&(this._position=e,this._overlayRef&&(this._updatePosition(this._overlayRef),this._tooltipInstance?.show(0),this._overlayRef.updatePosition()))}get positionAtOrigin(){return this._positionAtOrigin}set positionAtOrigin(e){this._positionAtOrigin=gt(e),this._detach(),this._overlayRef=null}get disabled(){return this._disabled}set disabled(e){let t=gt(e);this._disabled!==t&&(this._disabled=t,t?this.hide(0):this._setupPointerEnterEventsIfNeeded(),this._syncAriaDescription(this.message))}get showDelay(){return this._showDelay}set showDelay(e){this._showDelay=ti(e)}_showDelay;get hideDelay(){return this._hideDelay}set hideDelay(e){this._hideDelay=ti(e),this._tooltipInstance&&(this._tooltipInstance._mouseLeaveHideDelay=this._hideDelay)}_hideDelay;touchGestures="auto";get message(){return this._message}set message(e){let t=this._message;this._message=e!=null?String(e).trim():"",!this._message&&this._isTooltipVisible()?this.hide(0):(this._setupPointerEnterEventsIfNeeded(),this._updateTooltipMessage()),this._syncAriaDescription(t)}_message="";get tooltipClass(){return this._tooltipClass}set tooltipClass(e){this._tooltipClass=e,this._tooltipInstance&&this._setTooltipClass(this._tooltipClass)}_eventCleanups=[];_touchstartTimeout=null;_destroyed=new O;_isDestroyed=!1;constructor(){let e=this._defaultOptions;e&&(this._showDelay=e.showDelay,this._hideDelay=e.hideDelay,e.position&&(this.position=e.position),e.positionAtOrigin&&(this.positionAtOrigin=e.positionAtOrigin),e.touchGestures&&(this.touchGestures=e.touchGestures),e.tooltipClass&&(this.tooltipClass=e.tooltipClass)),this._viewportMargin=vy}ngAfterViewInit(){this._viewInitialized=!0,this._setupPointerEnterEventsIfNeeded(),this._focusMonitor.monitor(this._elementRef).pipe(ue(this._destroyed)).subscribe(e=>{e?e==="keyboard"&&this._ngZone.run(()=>this.show()):this._ngZone.run(()=>this.hide(0))})}ngOnDestroy(){let e=this._elementRef.nativeElement;this._touchstartTimeout&&clearTimeout(this._touchstartTimeout),this._overlayRef&&(this._overlayRef.dispose(),this._tooltipInstance=null),this._eventCleanups.forEach(t=>t()),this._eventCleanups.length=0,this._destroyed.next(),this._destroyed.complete(),this._isDestroyed=!0,this._ariaDescriber.removeDescription(e,this.message,"tooltip"),this._focusMonitor.stopMonitoring(e)}show(e=this.showDelay,t){if(this.disabled||!this.message||this._isTooltipVisible()){this._tooltipInstance?._cancelPendingAnimations();return}let n=this._createOverlay(t);this._detach(),this._portal=this._portal||new Oi(this._tooltipComponent,this._viewContainerRef);let a=this._tooltipInstance=n.attach(this._portal).instance;a._triggerElement=this._elementRef.nativeElement,a._mouseLeaveHideDelay=this._hideDelay,a.afterHidden().pipe(ue(this._destroyed)).subscribe(()=>this._detach()),this._setTooltipClass(this._tooltipClass),this._updateTooltipMessage(),a.show(e)}hide(e=this.hideDelay){let t=this._tooltipInstance;t&&(t.isVisible()?t.hide(e):(t._cancelPendingAnimations(),this._detach()))}toggle(e){this._isTooltipVisible()?this.hide():this.show(void 0,e)}_isTooltipVisible(){return!!this._tooltipInstance&&this._tooltipInstance.isVisible()}_createOverlay(e){if(this._overlayRef){let r=this._overlayRef.getConfig().positionStrategy;if((!this.positionAtOrigin||!e)&&r._origin instanceof B)return this._overlayRef;this._detach()}let t=this._injector.get(Rn).getAncestorScrollContainers(this._elementRef),n=`${this._cssClassPrefix}-${Fp}`,a=hn(this._injector,this.positionAtOrigin?e||this._elementRef:this._elementRef).withTransformOriginOn(`.${this._cssClassPrefix}-tooltip`).withFlexibleDimensions(!1).withViewportMargin(this._viewportMargin).withScrollableContainers(t).withPopoverLocation("global");return a.positionChanges.pipe(ue(this._destroyed)).subscribe(r=>{this._updateCurrentPositionClass(r.connectionPair),this._tooltipInstance&&r.scrollableViewProperties.isOverlayClipped&&this._tooltipInstance.isVisible()&&this._ngZone.run(()=>this.hide(0))}),this._overlayRef=ri(this._injector,{direction:this._dir,positionStrategy:a,panelClass:this._overlayPanelClass?[...this._overlayPanelClass,n]:n,scrollStrategy:this._injector.get(fy)(),disableAnimations:this._animationsDisabled,eventPredicate:this._overlayEventPredicate}),this._updatePosition(this._overlayRef),this._overlayRef.detachments().pipe(ue(this._destroyed)).subscribe(()=>this._detach()),this._overlayRef.outsidePointerEvents().pipe(ue(this._destroyed)).subscribe(()=>this._tooltipInstance?._handleBodyInteraction()),this._overlayRef.keydownEvents().pipe(ue(this._destroyed)).subscribe(r=>{r.preventDefault(),r.stopPropagation(),this._ngZone.run(()=>this.hide(0))}),this._defaultOptions?.disableTooltipInteractivity&&this._overlayRef.addPanelClass(`${this._cssClassPrefix}-tooltip-panel-non-interactive`),this._dirSubscribed||(this._dirSubscribed=!0,this._dir.change.pipe(ue(this._destroyed)).subscribe(()=>{this._overlayRef&&this._updatePosition(this._overlayRef)})),this._overlayRef}_detach(){this._overlayRef&&this._overlayRef.hasAttached()&&this._overlayRef.detach(),this._tooltipInstance=null}_updatePosition(e){let t=e.getConfig().positionStrategy,n=this._getOrigin(),a=this._getOverlayPosition();t.withPositions([this._addOffset(V(V({},n.main),a.main)),this._addOffset(V(V({},n.fallback),a.fallback))])}_addOffset(e){let t=by,n=!this._dir||this._dir.value=="ltr";return e.originY==="top"?e.offsetY=-t:e.originY==="bottom"?e.offsetY=t:e.originX==="start"?e.offsetX=n?-t:t:e.originX==="end"&&(e.offsetX=n?t:-t),e}_getOrigin(){let e=!this._dir||this._dir.value=="ltr",t=this.position,n;t=="above"||t=="below"?n={originX:"center",originY:t=="above"?"top":"bottom"}:t=="before"||t=="left"&&e||t=="right"&&!e?n={originX:"start",originY:"center"}:(t=="after"||t=="right"&&e||t=="left"&&!e)&&(n={originX:"end",originY:"center"});let{x:a,y:r}=this._invertPosition(n.originX,n.originY);return{main:n,fallback:{originX:a,originY:r}}}_getOverlayPosition(){let e=!this._dir||this._dir.value=="ltr",t=this.position,n;t=="above"?n={overlayX:"center",overlayY:"bottom"}:t=="below"?n={overlayX:"center",overlayY:"top"}:t=="before"||t=="left"&&e||t=="right"&&!e?n={overlayX:"end",overlayY:"center"}:(t=="after"||t=="right"&&e||t=="left"&&!e)&&(n={overlayX:"start",overlayY:"center"});let{x:a,y:r}=this._invertPosition(n.overlayX,n.overlayY);return{main:n,fallback:{overlayX:a,overlayY:r}}}_updateTooltipMessage(){this._tooltipInstance&&(this._tooltipInstance.message=this.message,this._tooltipInstance._markForCheck(),Ge(()=>{this._tooltipInstance&&this._overlayRef.updatePosition()},{injector:this._injector}))}_setTooltipClass(e){this._tooltipInstance&&(this._tooltipInstance.tooltipClass=e instanceof Set?Array.from(e):e,this._tooltipInstance._markForCheck())}_invertPosition(e,t){return this.position==="above"||this.position==="below"?t==="top"?t="bottom":t==="bottom"&&(t="top"):e==="end"?e="start":e==="start"&&(e="end"),{x:e,y:t}}_updateCurrentPositionClass(e){let{overlayY:t,originX:n,originY:a}=e,r;if(t==="center"?this._dir&&this._dir.value==="rtl"?r=n==="end"?"left":"right":r=n==="start"?"left":"right":r=t==="bottom"&&a==="top"?"above":"below",r!==this._currentPosition){let u=this._overlayRef;if(u){let h=`${this._cssClassPrefix}-${Fp}-`;u.removePanelClass(h+this._currentPosition),u.addPanelClass(h+r)}this._currentPosition=r}}_setupPointerEnterEventsIfNeeded(){this._disabled||!this.message||!this._viewInitialized||this._eventCleanups.length||(this._isTouchPlatform()?this.touchGestures!=="off"&&(this._disableNativeGesturesIfNecessary(),this._addListener("touchstart",e=>{let t=e.targetTouches?.[0],n=t?{x:t.clientX,y:t.clientY}:void 0;this._setupPointerExitEventsIfNeeded(),this._touchstartTimeout&&clearTimeout(this._touchstartTimeout);let a=500;this._touchstartTimeout=setTimeout(()=>{this._touchstartTimeout=null,this.show(void 0,n)},this._defaultOptions?.touchLongPressShowDelay??a)})):this._addListener("mouseenter",e=>{this._setupPointerExitEventsIfNeeded();let t;e.x!==void 0&&e.y!==void 0&&(t=e),this.show(void 0,t)}))}_setupPointerExitEventsIfNeeded(){if(!this._pointerExitEventsInitialized){if(this._pointerExitEventsInitialized=!0,!this._isTouchPlatform())this._addListener("mouseleave",e=>{let t=e.relatedTarget;(!t||!this._overlayRef?.overlayElement.contains(t))&&this.hide()}),this._addListener("wheel",e=>{if(this._isTooltipVisible()){let t=this._document.elementFromPoint(e.clientX,e.clientY),n=this._elementRef.nativeElement;t!==n&&!n.contains(t)&&this.hide()}});else if(this.touchGestures!=="off"){this._disableNativeGesturesIfNecessary();let e=()=>{this._touchstartTimeout&&clearTimeout(this._touchstartTimeout),this.hide(this._defaultOptions?.touchendHideDelay)};this._addListener("touchend",e),this._addListener("touchcancel",e)}}}_addListener(e,t){this._eventCleanups.push(this._renderer.listen(this._elementRef.nativeElement,e,t,_y))}_isTouchPlatform(){let e=this._defaultOptions?.detectHoverCapability;return typeof e=="function"?!e():this._platform.IOS||this._platform.ANDROID?!0:this._platform.isBrowser?!!e&&this._mediaMatcher.matchMedia("(any-hover: none)").matches:!1}_disableNativeGesturesIfNecessary(){let e=this.touchGestures;if(e!=="off"){let t=this._elementRef.nativeElement,n=t.style;(e==="on"||t.nodeName!=="INPUT"&&t.nodeName!=="TEXTAREA")&&(n.userSelect=n.msUserSelect=n.webkitUserSelect=n.MozUserSelect="none"),(e==="on"||!t.draggable)&&(n.webkitUserDrag="none"),n.touchAction="none",n.webkitTapHighlightColor="transparent"}}_syncAriaDescription(e){this._ariaDescriptionPending||(this._ariaDescriptionPending=!0,this._ariaDescriber.removeDescription(this._elementRef.nativeElement,e,"tooltip"),this._isDestroyed||Ge({write:()=>{this._ariaDescriptionPending=!1,this.message&&!this.disabled&&this._ariaDescriber.describe(this._elementRef.nativeElement,this.message,"tooltip")}},{injector:this._injector}))}_overlayEventPredicate=e=>e.type==="keydown"?this._isTooltipVisible()&&e.keyCode===27&&!Ke(e):!0;static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,selectors:[["","matTooltip",""]],hostAttrs:[1,"mat-mdc-tooltip-trigger"],hostVars:2,hostBindings:function(t,n){t&2&&p("mat-mdc-tooltip-disabled",n.disabled)},inputs:{position:[0,"matTooltipPosition","position"],positionAtOrigin:[0,"matTooltipPositionAtOrigin","positionAtOrigin"],disabled:[0,"matTooltipDisabled","disabled"],showDelay:[0,"matTooltipShowDelay","showDelay"],hideDelay:[0,"matTooltipHideDelay","hideDelay"],touchGestures:[0,"matTooltipTouchGestures","touchGestures"],message:[0,"matTooltip","message"],tooltipClass:[0,"matTooltipClass","tooltipClass"]},exportAs:["matTooltip"]})}return i})(),Np=(()=>{class i{_changeDetectorRef=m(se);_elementRef=m(B);_isMultiline=!1;message;tooltipClass;_showTimeoutId;_hideTimeoutId;_triggerElement;_mouseLeaveHideDelay;_animationsDisabled=ye();_tooltip;_closeOnInteraction=!1;_isVisible=!1;_onHide=new O;_showAnimation="mat-mdc-tooltip-show";_hideAnimation="mat-mdc-tooltip-hide";show(e){this._hideTimeoutId!=null&&clearTimeout(this._hideTimeoutId),this._showTimeoutId=setTimeout(()=>{this._toggleVisibility(!0),this._showTimeoutId=void 0},e)}hide(e){this._showTimeoutId!=null&&clearTimeout(this._showTimeoutId),this._hideTimeoutId=setTimeout(()=>{this._toggleVisibility(!1),this._hideTimeoutId=void 0},e)}afterHidden(){return this._onHide}isVisible(){return this._isVisible}ngOnDestroy(){this._cancelPendingAnimations(),this._onHide.complete(),this._triggerElement=null}_handleBodyInteraction(){this._closeOnInteraction&&this.hide(0)}_markForCheck(){this._changeDetectorRef.markForCheck()}_handleMouseLeave({relatedTarget:e}){(!e||!this._triggerElement.contains(e))&&(this.isVisible()?this.hide(this._mouseLeaveHideDelay):this._finalizeAnimation(!1))}_onShow(){this._isMultiline=this._isTooltipMultiline(),this._markForCheck()}_isTooltipMultiline(){let e=this._elementRef.nativeElement.getBoundingClientRect();return e.height>yy&&e.width>=Cy}_handleAnimationEnd({animationName:e}){(e===this._showAnimation||e===this._hideAnimation)&&this._finalizeAnimation(e===this._showAnimation)}_cancelPendingAnimations(){this._showTimeoutId!=null&&clearTimeout(this._showTimeoutId),this._hideTimeoutId!=null&&clearTimeout(this._hideTimeoutId),this._showTimeoutId=this._hideTimeoutId=void 0}_finalizeAnimation(e){e?this._closeOnInteraction=!0:this.isVisible()||this._onHide.next()}_toggleVisibility(e){let t=this._tooltip.nativeElement,n=this._showAnimation,a=this._hideAnimation;if(t.classList.remove(e?a:n),t.classList.add(e?n:a),this._isVisible!==e&&(this._isVisible=e,this._changeDetectorRef.markForCheck()),e&&!this._animationsDisabled&&typeof getComputedStyle=="function"){let r=getComputedStyle(t);(r.getPropertyValue("animation-duration")==="0s"||r.getPropertyValue("animation-name")==="none")&&(this._animationsDisabled=!0)}e&&this._onShow(),this._animationsDisabled&&(t.classList.add("_mat-animation-noopable"),this._finalizeAnimation(e))}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=R({type:i,selectors:[["mat-tooltip-component"]],viewQuery:function(t,n){if(t&1&&Re(hy,7),t&2){let a;N(a=L())&&(n._tooltip=a.first)}},hostAttrs:["aria-hidden","true"],hostBindings:function(t,n){t&1&&S("mouseleave",function(r){return n._handleMouseLeave(r)})},decls:4,vars:5,consts:[["tooltip",""],[1,"mdc-tooltip","mat-mdc-tooltip",3,"animationend"],[1,"mat-mdc-tooltip-surface","mdc-tooltip__surface"]],template:function(t,n){t&1&&(Ne(0,"div",1,0),xr("animationend",function(r){return n._handleAnimationEnd(r)}),Ne(2,"div",2),d(3),qe()()),t&2&&(at(n.tooltipClass),p("mdc-tooltip--multiline",n._isMultiline),c(3),I(n.message))},styles:[`.mat-mdc-tooltip {
5478
+ `],encapsulation:2})}return i})(),ia=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,selectors:[["mat-panel-description"]],hostAttrs:[1,"mat-expansion-panel-header-description"]})}return i})(),na=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,selectors:[["mat-panel-title"]],hostAttrs:[1,"mat-expansion-panel-header-title"]})}return i})();var oa=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=U({type:i});static \u0275inj=H({imports:[Ip,Yi,ce]})}return i})();var py=["tooltip"],fy=20;var gy=new k("mat-tooltip-scroll-strategy",{providedIn:"root",factory:()=>{let i=m(Z);return()=>Fi(i,{scrollThrottle:fy})}}),_y=new k("mat-tooltip-default-options",{providedIn:"root",factory:()=>({showDelay:0,hideDelay:0,touchendHideDelay:1500})});var Fp="tooltip-panel",vy={passive:!0},by=8,yy=8,Cy=24,xy=200,ho=(()=>{class i{_elementRef=m(B);_ngZone=m($);_platform=m(fe);_ariaDescriber=m(fu);_focusMonitor=m(Yt);_dir=m(Ze);_injector=m(Z);_viewContainerRef=m(it);_mediaMatcher=m(Io);_document=m(K);_renderer=m(we);_animationsDisabled=ye();_defaultOptions=m(_y,{optional:!0});_overlayRef=null;_tooltipInstance=null;_overlayPanelClass;_portal;_position="below";_positionAtOrigin=!1;_disabled=!1;_tooltipClass;_viewInitialized=!1;_pointerExitEventsInitialized=!1;_tooltipComponent=Np;_viewportMargin=8;_currentPosition;_cssClassPrefix="mat-mdc";_ariaDescriptionPending=!1;_dirSubscribed=!1;get position(){return this._position}set position(e){e!==this._position&&(this._position=e,this._overlayRef&&(this._updatePosition(this._overlayRef),this._tooltipInstance?.show(0),this._overlayRef.updatePosition()))}get positionAtOrigin(){return this._positionAtOrigin}set positionAtOrigin(e){this._positionAtOrigin=gt(e),this._detach(),this._overlayRef=null}get disabled(){return this._disabled}set disabled(e){let t=gt(e);this._disabled!==t&&(this._disabled=t,t?this.hide(0):this._setupPointerEnterEventsIfNeeded(),this._syncAriaDescription(this.message))}get showDelay(){return this._showDelay}set showDelay(e){this._showDelay=ti(e)}_showDelay;get hideDelay(){return this._hideDelay}set hideDelay(e){this._hideDelay=ti(e),this._tooltipInstance&&(this._tooltipInstance._mouseLeaveHideDelay=this._hideDelay)}_hideDelay;touchGestures="auto";get message(){return this._message}set message(e){let t=this._message;this._message=e!=null?String(e).trim():"",!this._message&&this._isTooltipVisible()?this.hide(0):(this._setupPointerEnterEventsIfNeeded(),this._updateTooltipMessage()),this._syncAriaDescription(t)}_message="";get tooltipClass(){return this._tooltipClass}set tooltipClass(e){this._tooltipClass=e,this._tooltipInstance&&this._setTooltipClass(this._tooltipClass)}_eventCleanups=[];_touchstartTimeout=null;_destroyed=new O;_isDestroyed=!1;constructor(){let e=this._defaultOptions;e&&(this._showDelay=e.showDelay,this._hideDelay=e.hideDelay,e.position&&(this.position=e.position),e.positionAtOrigin&&(this.positionAtOrigin=e.positionAtOrigin),e.touchGestures&&(this.touchGestures=e.touchGestures),e.tooltipClass&&(this.tooltipClass=e.tooltipClass)),this._viewportMargin=by}ngAfterViewInit(){this._viewInitialized=!0,this._setupPointerEnterEventsIfNeeded(),this._focusMonitor.monitor(this._elementRef).pipe(ue(this._destroyed)).subscribe(e=>{e?e==="keyboard"&&this._ngZone.run(()=>this.show()):this._ngZone.run(()=>this.hide(0))})}ngOnDestroy(){let e=this._elementRef.nativeElement;this._touchstartTimeout&&clearTimeout(this._touchstartTimeout),this._overlayRef&&(this._overlayRef.dispose(),this._tooltipInstance=null),this._eventCleanups.forEach(t=>t()),this._eventCleanups.length=0,this._destroyed.next(),this._destroyed.complete(),this._isDestroyed=!0,this._ariaDescriber.removeDescription(e,this.message,"tooltip"),this._focusMonitor.stopMonitoring(e)}show(e=this.showDelay,t){if(this.disabled||!this.message||this._isTooltipVisible()){this._tooltipInstance?._cancelPendingAnimations();return}let n=this._createOverlay(t);this._detach(),this._portal=this._portal||new Oi(this._tooltipComponent,this._viewContainerRef);let a=this._tooltipInstance=n.attach(this._portal).instance;a._triggerElement=this._elementRef.nativeElement,a._mouseLeaveHideDelay=this._hideDelay,a.afterHidden().pipe(ue(this._destroyed)).subscribe(()=>this._detach()),this._setTooltipClass(this._tooltipClass),this._updateTooltipMessage(),a.show(e)}hide(e=this.hideDelay){let t=this._tooltipInstance;t&&(t.isVisible()?t.hide(e):(t._cancelPendingAnimations(),this._detach()))}toggle(e){this._isTooltipVisible()?this.hide():this.show(void 0,e)}_isTooltipVisible(){return!!this._tooltipInstance&&this._tooltipInstance.isVisible()}_createOverlay(e){if(this._overlayRef){let r=this._overlayRef.getConfig().positionStrategy;if((!this.positionAtOrigin||!e)&&r._origin instanceof B)return this._overlayRef;this._detach()}let t=this._injector.get(Rn).getAncestorScrollContainers(this._elementRef),n=`${this._cssClassPrefix}-${Fp}`,a=hn(this._injector,this.positionAtOrigin?e||this._elementRef:this._elementRef).withTransformOriginOn(`.${this._cssClassPrefix}-tooltip`).withFlexibleDimensions(!1).withViewportMargin(this._viewportMargin).withScrollableContainers(t).withPopoverLocation("global");return a.positionChanges.pipe(ue(this._destroyed)).subscribe(r=>{this._updateCurrentPositionClass(r.connectionPair),this._tooltipInstance&&r.scrollableViewProperties.isOverlayClipped&&this._tooltipInstance.isVisible()&&this._ngZone.run(()=>this.hide(0))}),this._overlayRef=ri(this._injector,{direction:this._dir,positionStrategy:a,panelClass:this._overlayPanelClass?[...this._overlayPanelClass,n]:n,scrollStrategy:this._injector.get(gy)(),disableAnimations:this._animationsDisabled,eventPredicate:this._overlayEventPredicate}),this._updatePosition(this._overlayRef),this._overlayRef.detachments().pipe(ue(this._destroyed)).subscribe(()=>this._detach()),this._overlayRef.outsidePointerEvents().pipe(ue(this._destroyed)).subscribe(()=>this._tooltipInstance?._handleBodyInteraction()),this._overlayRef.keydownEvents().pipe(ue(this._destroyed)).subscribe(r=>{r.preventDefault(),r.stopPropagation(),this._ngZone.run(()=>this.hide(0))}),this._defaultOptions?.disableTooltipInteractivity&&this._overlayRef.addPanelClass(`${this._cssClassPrefix}-tooltip-panel-non-interactive`),this._dirSubscribed||(this._dirSubscribed=!0,this._dir.change.pipe(ue(this._destroyed)).subscribe(()=>{this._overlayRef&&this._updatePosition(this._overlayRef)})),this._overlayRef}_detach(){this._overlayRef&&this._overlayRef.hasAttached()&&this._overlayRef.detach(),this._tooltipInstance=null}_updatePosition(e){let t=e.getConfig().positionStrategy,n=this._getOrigin(),a=this._getOverlayPosition();t.withPositions([this._addOffset(V(V({},n.main),a.main)),this._addOffset(V(V({},n.fallback),a.fallback))])}_addOffset(e){let t=yy,n=!this._dir||this._dir.value=="ltr";return e.originY==="top"?e.offsetY=-t:e.originY==="bottom"?e.offsetY=t:e.originX==="start"?e.offsetX=n?-t:t:e.originX==="end"&&(e.offsetX=n?t:-t),e}_getOrigin(){let e=!this._dir||this._dir.value=="ltr",t=this.position,n;t=="above"||t=="below"?n={originX:"center",originY:t=="above"?"top":"bottom"}:t=="before"||t=="left"&&e||t=="right"&&!e?n={originX:"start",originY:"center"}:(t=="after"||t=="right"&&e||t=="left"&&!e)&&(n={originX:"end",originY:"center"});let{x:a,y:r}=this._invertPosition(n.originX,n.originY);return{main:n,fallback:{originX:a,originY:r}}}_getOverlayPosition(){let e=!this._dir||this._dir.value=="ltr",t=this.position,n;t=="above"?n={overlayX:"center",overlayY:"bottom"}:t=="below"?n={overlayX:"center",overlayY:"top"}:t=="before"||t=="left"&&e||t=="right"&&!e?n={overlayX:"end",overlayY:"center"}:(t=="after"||t=="right"&&e||t=="left"&&!e)&&(n={overlayX:"start",overlayY:"center"});let{x:a,y:r}=this._invertPosition(n.overlayX,n.overlayY);return{main:n,fallback:{overlayX:a,overlayY:r}}}_updateTooltipMessage(){this._tooltipInstance&&(this._tooltipInstance.message=this.message,this._tooltipInstance._markForCheck(),Ge(()=>{this._tooltipInstance&&this._overlayRef.updatePosition()},{injector:this._injector}))}_setTooltipClass(e){this._tooltipInstance&&(this._tooltipInstance.tooltipClass=e instanceof Set?Array.from(e):e,this._tooltipInstance._markForCheck())}_invertPosition(e,t){return this.position==="above"||this.position==="below"?t==="top"?t="bottom":t==="bottom"&&(t="top"):e==="end"?e="start":e==="start"&&(e="end"),{x:e,y:t}}_updateCurrentPositionClass(e){let{overlayY:t,originX:n,originY:a}=e,r;if(t==="center"?this._dir&&this._dir.value==="rtl"?r=n==="end"?"left":"right":r=n==="start"?"left":"right":r=t==="bottom"&&a==="top"?"above":"below",r!==this._currentPosition){let u=this._overlayRef;if(u){let h=`${this._cssClassPrefix}-${Fp}-`;u.removePanelClass(h+this._currentPosition),u.addPanelClass(h+r)}this._currentPosition=r}}_setupPointerEnterEventsIfNeeded(){this._disabled||!this.message||!this._viewInitialized||this._eventCleanups.length||(this._isTouchPlatform()?this.touchGestures!=="off"&&(this._disableNativeGesturesIfNecessary(),this._addListener("touchstart",e=>{let t=e.targetTouches?.[0],n=t?{x:t.clientX,y:t.clientY}:void 0;this._setupPointerExitEventsIfNeeded(),this._touchstartTimeout&&clearTimeout(this._touchstartTimeout);let a=500;this._touchstartTimeout=setTimeout(()=>{this._touchstartTimeout=null,this.show(void 0,n)},this._defaultOptions?.touchLongPressShowDelay??a)})):this._addListener("mouseenter",e=>{this._setupPointerExitEventsIfNeeded();let t;e.x!==void 0&&e.y!==void 0&&(t=e),this.show(void 0,t)}))}_setupPointerExitEventsIfNeeded(){if(!this._pointerExitEventsInitialized){if(this._pointerExitEventsInitialized=!0,!this._isTouchPlatform())this._addListener("mouseleave",e=>{let t=e.relatedTarget;(!t||!this._overlayRef?.overlayElement.contains(t))&&this.hide()}),this._addListener("wheel",e=>{if(this._isTooltipVisible()){let t=this._document.elementFromPoint(e.clientX,e.clientY),n=this._elementRef.nativeElement;t!==n&&!n.contains(t)&&this.hide()}});else if(this.touchGestures!=="off"){this._disableNativeGesturesIfNecessary();let e=()=>{this._touchstartTimeout&&clearTimeout(this._touchstartTimeout),this.hide(this._defaultOptions?.touchendHideDelay)};this._addListener("touchend",e),this._addListener("touchcancel",e)}}}_addListener(e,t){this._eventCleanups.push(this._renderer.listen(this._elementRef.nativeElement,e,t,vy))}_isTouchPlatform(){let e=this._defaultOptions?.detectHoverCapability;return typeof e=="function"?!e():this._platform.IOS||this._platform.ANDROID?!0:this._platform.isBrowser?!!e&&this._mediaMatcher.matchMedia("(any-hover: none)").matches:!1}_disableNativeGesturesIfNecessary(){let e=this.touchGestures;if(e!=="off"){let t=this._elementRef.nativeElement,n=t.style;(e==="on"||t.nodeName!=="INPUT"&&t.nodeName!=="TEXTAREA")&&(n.userSelect=n.msUserSelect=n.webkitUserSelect=n.MozUserSelect="none"),(e==="on"||!t.draggable)&&(n.webkitUserDrag="none"),n.touchAction="none",n.webkitTapHighlightColor="transparent"}}_syncAriaDescription(e){this._ariaDescriptionPending||(this._ariaDescriptionPending=!0,this._ariaDescriber.removeDescription(this._elementRef.nativeElement,e,"tooltip"),this._isDestroyed||Ge({write:()=>{this._ariaDescriptionPending=!1,this.message&&!this.disabled&&this._ariaDescriber.describe(this._elementRef.nativeElement,this.message,"tooltip")}},{injector:this._injector}))}_overlayEventPredicate=e=>e.type==="keydown"?this._isTooltipVisible()&&e.keyCode===27&&!Ke(e):!0;static \u0275fac=function(t){return new(t||i)};static \u0275dir=T({type:i,selectors:[["","matTooltip",""]],hostAttrs:[1,"mat-mdc-tooltip-trigger"],hostVars:2,hostBindings:function(t,n){t&2&&p("mat-mdc-tooltip-disabled",n.disabled)},inputs:{position:[0,"matTooltipPosition","position"],positionAtOrigin:[0,"matTooltipPositionAtOrigin","positionAtOrigin"],disabled:[0,"matTooltipDisabled","disabled"],showDelay:[0,"matTooltipShowDelay","showDelay"],hideDelay:[0,"matTooltipHideDelay","hideDelay"],touchGestures:[0,"matTooltipTouchGestures","touchGestures"],message:[0,"matTooltip","message"],tooltipClass:[0,"matTooltipClass","tooltipClass"]},exportAs:["matTooltip"]})}return i})(),Np=(()=>{class i{_changeDetectorRef=m(se);_elementRef=m(B);_isMultiline=!1;message;tooltipClass;_showTimeoutId;_hideTimeoutId;_triggerElement;_mouseLeaveHideDelay;_animationsDisabled=ye();_tooltip;_closeOnInteraction=!1;_isVisible=!1;_onHide=new O;_showAnimation="mat-mdc-tooltip-show";_hideAnimation="mat-mdc-tooltip-hide";show(e){this._hideTimeoutId!=null&&clearTimeout(this._hideTimeoutId),this._showTimeoutId=setTimeout(()=>{this._toggleVisibility(!0),this._showTimeoutId=void 0},e)}hide(e){this._showTimeoutId!=null&&clearTimeout(this._showTimeoutId),this._hideTimeoutId=setTimeout(()=>{this._toggleVisibility(!1),this._hideTimeoutId=void 0},e)}afterHidden(){return this._onHide}isVisible(){return this._isVisible}ngOnDestroy(){this._cancelPendingAnimations(),this._onHide.complete(),this._triggerElement=null}_handleBodyInteraction(){this._closeOnInteraction&&this.hide(0)}_markForCheck(){this._changeDetectorRef.markForCheck()}_handleMouseLeave({relatedTarget:e}){(!e||!this._triggerElement.contains(e))&&(this.isVisible()?this.hide(this._mouseLeaveHideDelay):this._finalizeAnimation(!1))}_onShow(){this._isMultiline=this._isTooltipMultiline(),this._markForCheck()}_isTooltipMultiline(){let e=this._elementRef.nativeElement.getBoundingClientRect();return e.height>Cy&&e.width>=xy}_handleAnimationEnd({animationName:e}){(e===this._showAnimation||e===this._hideAnimation)&&this._finalizeAnimation(e===this._showAnimation)}_cancelPendingAnimations(){this._showTimeoutId!=null&&clearTimeout(this._showTimeoutId),this._hideTimeoutId!=null&&clearTimeout(this._hideTimeoutId),this._showTimeoutId=this._hideTimeoutId=void 0}_finalizeAnimation(e){e?this._closeOnInteraction=!0:this.isVisible()||this._onHide.next()}_toggleVisibility(e){let t=this._tooltip.nativeElement,n=this._showAnimation,a=this._hideAnimation;if(t.classList.remove(e?a:n),t.classList.add(e?n:a),this._isVisible!==e&&(this._isVisible=e,this._changeDetectorRef.markForCheck()),e&&!this._animationsDisabled&&typeof getComputedStyle=="function"){let r=getComputedStyle(t);(r.getPropertyValue("animation-duration")==="0s"||r.getPropertyValue("animation-name")==="none")&&(this._animationsDisabled=!0)}e&&this._onShow(),this._animationsDisabled&&(t.classList.add("_mat-animation-noopable"),this._finalizeAnimation(e))}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=R({type:i,selectors:[["mat-tooltip-component"]],viewQuery:function(t,n){if(t&1&&Re(py,7),t&2){let a;N(a=L())&&(n._tooltip=a.first)}},hostAttrs:["aria-hidden","true"],hostBindings:function(t,n){t&1&&S("mouseleave",function(r){return n._handleMouseLeave(r)})},decls:4,vars:5,consts:[["tooltip",""],[1,"mdc-tooltip","mat-mdc-tooltip",3,"animationend"],[1,"mat-mdc-tooltip-surface","mdc-tooltip__surface"]],template:function(t,n){t&1&&(Ne(0,"div",1,0),xr("animationend",function(r){return n._handleAnimationEnd(r)}),Ne(2,"div",2),d(3),qe()()),t&2&&(at(n.tooltipClass),p("mdc-tooltip--multiline",n._isMultiline),c(3),I(n.message))},styles:[`.mat-mdc-tooltip {
5479
5479
  position: relative;
5480
5480
  transform: scale(0);
5481
5481
  display: inline-flex;
@@ -5580,28 +5580,28 @@ mat-action-list button::-moz-focus-inner {
5580
5580
  .mat-mdc-tooltip-hide {
5581
5581
  animation: mat-mdc-tooltip-hide 75ms cubic-bezier(0.4, 0, 1, 1) forwards;
5582
5582
  }
5583
- `],encapsulation:2})}return i})();var aa=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=U({type:i});static \u0275inj=H({imports:[Aa,Qt,ce,Ri]})}return i})();function Un(i,o){for(let e of i){let t=e.indexOf("=");if(t>0&&e.slice(0,t)===o)return e.slice(t+1);let n=e.indexOf(" ");if(n>0&&e.slice(0,n)===o)return e.slice(n+1).trim()}for(let e=0;e<i.length;e++)if(i[e]===o&&e+1<i.length)return i[e+1];return null}function $n(i,o,e,t){for(let n of i){let a=n.split(/\s|=/)[0];if(a===o)return!0;if(a===e)return!1}return t}function Je(i,o,e){let t=Un(i,o);return t!==null?t:e}function Pe(i,o,e){let t=Un(i,o);if(t!==null){let n=parseInt(t,10);return isNaN(n)?e:n}return e}function St(i,o,e){let t=Un(i,o);if(t!==null){let n=parseFloat(t);return isNaN(n)?e:n}return e}var xy=(i,o)=>o.path;function wy(i,o){i&1&&(s(0,"span",7),d(1,"(dir)"),l())}function Dy(i,o){if(i&1&&(s(0,"mat-option",5)(1,"span",6),d(2),l(),w(3,wy,2,0,"span",7),l()),i&2){let e=o.$implicit;x("value",e.path),c(2),I(e.path),c(),D(e.isDir?3:-1)}}var qs=(()=>{class i{constructor(){this.fb=m(Gi),this.service=m(wt),this.label="Path",this.placeholder="/path/to/file",this.required=!1,this.fieldClass="",this.existingPaths=[],this.onChange=e=>{},this.onTouched=()=>{},this._subscription=null,this.suggestions=E([]),this.innerForm=this.fb.group({value:[""]})}writeValue(e){let t=(e??"").toString();this.innerForm.patchValue({value:t},{emitEvent:!1})}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){e?this.innerForm.disable():this.innerForm.enable()}ngOnInit(){this._subscription=this.innerForm.get("value").valueChanges.subscribe(e=>{this.onChange(e)}),this._subscription.add(this.innerForm.get("value").valueChanges.pipe(Lt(200),ci(),$e(e=>{let t=(e??"").trim();return t?this.service.getLlamaAutocomplete("path",t).pipe(Et(()=>ge([]))):ge(this.emptySuggestions)})).subscribe(e=>{this.suggestions.set(e)}))}get emptySuggestions(){return this.existingPaths.filter(Boolean).map(e=>({path:e,source:"existing config"}))}ngOnDestroy(){this._subscription?.unsubscribe()}onSelect(e){this.innerForm.patchValue({value:e},{emitEvent:!1}),this.onChange(e)}onBlur(){this.onTouched()}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=R({type:i,selectors:[["app-file-autocomplete"]],inputs:{label:"label",placeholder:"placeholder",required:"required",fieldClass:"fieldClass",existingPaths:"existingPaths"},features:[le([{provide:Ui,useExisting:lt(()=>i),multi:!0}])],decls:9,vars:7,consts:[["auto","matAutocomplete"],[3,"formGroup"],["appearance","outline",1,"full-width"],["matInput","","formControlName","value",3,"blur","placeholder","required","matAutocomplete"],[3,"optionSelected"],[3,"value"],[1,"file-path"],[1,"file-dir"]],template:function(t,n){if(t&1&&(Si(0,1),s(1,"mat-form-field",2)(2,"input",3),S("blur",function(){return n.onBlur()}),l(),y(),s(3,"mat-label"),d(4),l()(),s(5,"mat-autocomplete",4,0),S("optionSelected",function(r){return n.onSelect(r.option.value)}),ee(7,Dy,4,3,"mat-option",5,xy),l(),ki()),t&2){let a=Se(6);x("formGroup",n.innerForm),c(),at(n.fieldClass),c(),x("placeholder",n.placeholder)("required",n.required)("matAutocomplete",a),C(),c(2),I(n.label),c(3),te(n.suggestions())}},dependencies:[Me,Wi,Yt,Zt,$i,fs,Ut,Ti,Mt,ut,_t,Pt,Rt,Qi,Zi,Dt,Li],styles:[".full-width[_ngcontent-%COMP%]{width:100%}.file-path[_ngcontent-%COMP%]{font-family:monospace}.file-dir[_ngcontent-%COMP%]{margin-left:4px;color:#1976d2;font-size:11px;font-weight:500}.file-source[_ngcontent-%COMP%]{margin-left:8px;opacity:.6;font-size:12px}"]})}}return i})();function si(i){i||(i=m(Vt));let o=new Nt(e=>{if(i.destroyed){e.next();return}return i.onDestroy(e.next.bind(e))});return e=>e.pipe(ue(o))}function bi(i,o){let t=!o?.manualCleanup?o?.injector?.get(Vt)??m(Vt):null,n=Sy(o?.equal),a;o?.requireSync?a=E({kind:0},{equal:n}):a=E({kind:1,value:o?.initialValue},{equal:n});let r,u=i.subscribe({next:h=>a.set({kind:1,value:h}),error:h=>{a.set({kind:2,error:h}),r?.()},complete:()=>{r?.()}});if(o?.requireSync&&a().kind===0)throw new he(601,!1);return r=t?.onDestroy(u.unsubscribe.bind(u)),P(()=>{let h=a();switch(h.kind){case 1:return h.value;case 2:throw h.error;case 0:throw new he(601,!1)}},{equal:o?.equal})}function Sy(i=Object.is){return(o,e)=>o.kind===1&&e.kind===1&&i(o.value,e.value)}function yi(i){if(typeof i=="number")return i;let o=i.trim();if(!o)return 0;let e=o.split(/\s*x\s*/i),t=1,n;if(e.length>=2){let h=e[0].trim();h&&(t=parseInt(h,10),(isNaN(t)||t<1)&&(t=1)),n=e.slice(1).join("").trim()}else n=o;let a=n.match(/^(\d+(?:\.\d+)?)\s*([kKmM])?$/);if(!a)return 0;let r=parseFloat(a[1]),u=a[2];return u&&(u.toLowerCase()==="k"?r*=1024:u.toLowerCase()==="m"&&(r*=1024*1024)),t*r}var po=[8192,16384,32768,65536,98304,131072,196608,262144,524288,1048576];function Lp(i){return i<=0?"0":i>=1048576&&i%1048576===0?`${i/1048576}M`:i>=1024&&i%1024===0?`${i/1024}K`:`${i}`}function li(i,o){if(i<=0)return"";if(o>1&&i%o===0){let e=i/o;if(po.includes(e))return`${o} x ${Lp(e)}`}return Lp(i)}var ky=(i,o)=>o.command,td=(i,o)=>o.path,My=(i,o)=>o.label;function Ey(i,o){i&1&&(s(0,"mat-error"),d(1,"Required"),l())}function Ty(i,o){i&1&&(s(0,"mat-error"),d(1,"Starts with letter, alphanumeric + hyphens/underscores, max 128 chars"),l())}function Ay(i,o){i&1&&(s(0,"mat-error"),d(1,"Another service already uses this name"),l())}function Iy(i,o){i&1&&(s(0,"mat-error"),d(1,"Required"),l())}function Ry(i,o){if(i&1&&(s(0,"mat-option",8)(1,"span",104),d(2),l(),s(3,"span",105),d(4),l()()),i&2){let e=o.$implicit;x("value",e.command),c(2),I(e.command),c(2),Q("(",e.from,")")}}function Py(i,o){if(i&1&&(s(0,"mat-option",8),d(1),l()),i&2){let e=o.$implicit;x("value",e.path),c(),I(e.path)}}function Oy(i,o){if(i&1&&(s(0,"mat-option",8),d(1),l()),i&2){let e=o.$implicit;x("value",e.label),c(),I(e.label)}}function Fy(i,o){if(i&1&&(s(0,"mat-option",8),d(1),l()),i&2){let e=o.$implicit;x("value",e),c(),I(e)}}function Ny(i,o){if(i&1&&(s(0,"mat-option",8),d(1),l()),i&2){let e=o.$implicit;x("value",e),c(),I(e)}}function Ly(i,o){if(i&1&&(s(0,"div",26),d(1,"YaRN Parameters"),l(),s(2,"div",13)(3,"mat-form-field",18),_(4,"input",106),y(),s(5,"mat-label"),d(6,"YaRN Orig Ctx"),l()(),s(7,"mat-form-field",18),_(8,"input",107),y(),s(9,"mat-label"),d(10,"Extrapolation Mix"),l()(),s(11,"mat-form-field",18),_(12,"input",108),y(),s(13,"mat-label"),d(14,"Attn Factor"),l()(),s(15,"mat-form-field",18),_(16,"input",109),y(),s(17,"mat-label"),d(18,"Beta Slow"),l()(),s(19,"mat-form-field",18),_(20,"input",110),y(),s(21,"mat-label"),d(22,"Beta Fast"),l()()()),i&2){let e=v();c(3),p("changed",e.isControlChanged("yarnOrigCtx")),c(),C(),c(3),p("changed",e.isControlChanged("yarnExtFactor")),c(),C(),c(3),p("changed",e.isControlChanged("yarnAttnFactor")),c(),C(),c(3),p("changed",e.isControlChanged("yarnBetaSlow")),c(),C(),c(3),p("changed",e.isControlChanged("yarnBetaFast")),c(),C()}}function Vy(i,o){if(i&1&&(s(0,"mat-option",8),d(1),l()),i&2){let e=o.$implicit;x("value",e.path),c(),I(e.path)}}function By(i,o){if(i&1&&(s(0,"mat-option",8),d(1),l()),i&2){let e=o.$implicit;x("value",e),c(),I(e)}}function zy(i,o){if(i&1&&(s(0,"mat-option",8),d(1),l()),i&2){let e=o.$implicit;x("value",e),c(),I(e)}}function jy(i,o){if(i&1&&(s(0,"div",26),d(1,"Draft Model"),l(),_(2,"app-file-autocomplete",111),y(),s(3,"div",13)(4,"mat-form-field",18)(5,"mat-select",112),ee(6,Vy,2,2,"mat-option",8,td),l(),y(),s(8,"mat-label"),d(9,"Draft Device (multi-select)"),l()()(),s(10,"div",13)(11,"mat-form-field",18),_(12,"input",113),y(),s(13,"mat-label"),d(14,"Draft N Max"),l()(),s(15,"mat-form-field",18),_(16,"input",114),y(),s(17,"mat-label"),d(18,"Draft GPU Layers"),l()()(),s(19,"div",13)(20,"mat-form-field",18)(21,"mat-select",115),ee(22,By,2,2,"mat-option",8,Ye),l(),y(),s(24,"mat-label"),d(25,"Draft Cache Type K"),l()(),s(26,"mat-form-field",18)(27,"mat-select",116),ee(28,zy,2,2,"mat-option",8,Ye),l(),y(),s(30,"mat-label"),d(31,"Draft Cache Type V"),l()()()),i&2){let e=v();c(2),x("existingPaths",e.existingDraftModelPaths())("fieldClass",e.isControlChanged("modelDraft")?"changed":""),C(),c(2),p("changed",e.isControlChanged("specDraftDevice")),c(),C(),c(),te(e.availableDevices()),c(5),p("changed",e.isControlChanged("specDraftNMax")),c(),C(),c(3),p("changed",e.isControlChanged("nGpuLayersDraft")),c(),C(),c(4),p("changed",e.isControlChanged("specDraftCacheTypeK")),c(),C(),c(),te(e.kvCacheTypes),c(4),p("changed",e.isControlChanged("specDraftCacheTypeV")),c(),C(),c(),te(e.kvCacheTypes)}}function Hy(i,o){if(i&1&&(s(0,"div",26),d(1,"Ngram Mod Parameters"),l(),s(2,"div",13)(3,"mat-form-field",18),_(4,"input",117),y(),s(5,"mat-label"),d(6,"Ngram Mod N Min"),l()(),s(7,"mat-form-field",18),_(8,"input",118),y(),s(9,"mat-label"),d(10,"Ngram Mod N Max"),l()(),s(11,"mat-form-field",18),_(12,"input",119),y(),s(13,"mat-label"),d(14,"Ngram Mod Match"),l()()()),i&2){let e=v();c(3),p("changed",e.isControlChanged("specNgramModNMin")),c(),C(),c(3),p("changed",e.isControlChanged("specNgramModNMax")),c(),C(),c(3),p("changed",e.isControlChanged("specNgramModNMatch")),c(),C()}}function Uy(i,o){if(i&1&&(s(0,"div",26),d(1,"Ngram Simple Parameters"),l(),s(2,"div",13)(3,"mat-form-field",18),_(4,"input",120),y(),s(5,"mat-label"),d(6,"Simple Size N"),l()(),s(7,"mat-form-field",18),_(8,"input",121),y(),s(9,"mat-label"),d(10,"Simple Size M"),l()(),s(11,"mat-form-field",18),_(12,"input",122),y(),s(13,"mat-label"),d(14,"Simple Min Hits"),l()()()),i&2){let e=v();c(3),p("changed",e.isControlChanged("specNgramSimpleSizeN")),c(),C(),c(3),p("changed",e.isControlChanged("specNgramSimpleSizeM")),c(),C(),c(3),p("changed",e.isControlChanged("specNgramSimpleMinHits")),c(),C()}}function $y(i,o){if(i&1&&(s(0,"mat-option",8)(1,"span",104),d(2),l(),s(3,"span",105),d(4),l()()),i&2){let e=o.$implicit;x("value",e.path),c(2),I(e.path),c(2),Q("(",e.source,")")}}function Gy(i,o){if(i&1&&(s(0,"mat-option",8),d(1),l()),i&2){let e=o.$implicit;x("value",e),c(),I(e==="no"?"no (default)":e)}}var g={host:"127.0.0.1",port:8080,threads:-1,flashAttn:"auto",fit:"on",parallel:-1,alias:"",nPredict:-1,contextShift:"off",contBatching:"on",model:"",mmproj:"",nGpuLayers:"auto",device:[],tensorSplit:"",splitMode:"layer",mainGpu:0,fitTarget:1024,fitCtx:4096,mlock:"off",mmap:"on",cpuMoe:"off",nCpuMoe:0,ctxSize:0,batchSize:2048,ubatchSize:512,cacheTypeK:"f16",cacheTypeV:"f16",kvOffload:"on",cacheRam:8192,swaFull:"off",ropeScaling:"none",ropeScale:1,ropeFreqBase:0,ropeFreqScale:0,yarnOrigCtx:0,yarnExtFactor:-1,yarnAttnFactor:-1,yarnBetaSlow:-1,yarnBetaFast:-1,temperature:.8,seed:-1,topK:40,topP:.95,minP:.05,typicalP:1,repeatLastN:64,repeatPenalty:1,presencePenalty:0,frequencyPenalty:0,dryMultiplier:0,dryBase:1.75,mirostat:0,dynatempRange:0,modelDraft:"",specDraftDevice:[],specDraftNMax:3,nGpuLayersDraft:"auto",specDraftCacheTypeK:"f16",specDraftCacheTypeV:"f16",specType:"none",specNgramModNMin:48,specNgramModNMax:64,specNgramModNMatch:24,specNgramSimpleSizeN:12,specNgramSimpleSizeM:48,specNgramSimpleMinHits:1,lora:"",loraScaled:"",timeout:3600,threadsHttp:-1,metrics:"off",slots:"on",cachePrompt:"on",cacheReuse:0,reasoning:"auto",reasoningBudget:-1,reasoningFormat:"auto",reasoningPreserve:"on",apiKeyFile:""};function Wy(i,o){let e=g[i];if(e===void 0)return!1;if(Array.isArray(o)||Array.isArray(e)){let t=Array.isArray(o)?o:[],n=Array.isArray(e)?e:[];return t.length!==n.length||t.some((a,r)=>a!==n[r])}return String(o)!==String(e)}var qy="^[a-zA-Z][a-zA-Z0-9_-]{0,127}$",Ky=["f32","f16","bf16","q8_0","q4_0","q4_1","iq4_nl","q5_0","q5_1"],Xy=new Set(["--host","--port","--threads","--flash-attn","--fit","--parallel","--alias","--n-predict","--context-shift","--no-context-shift","--cont-batching","--no-cont-batching","--device","--tensor-split","--model","--mmproj","--n-gpu-layers","--split-mode","--main-gpu","--fit-target","--fit-ctx","--mlock","--mmap","--no-mmap","--cpu-moe","--n-cpu-moe","--ctx-size","--batch-size","--ubatch-size","--cache-type-k","--cache-type-v","--kv-offload","--no-kv-offload","--cache-ram","--swa-full","--rope-scaling","--rope-scale","--rope-freq-base","--rope-freq-scale","--yarn-orig-ctx","--yarn-ext-factor","--yarn-attn-factor","--yarn-beta-slow","--yarn-beta-fast","--temperature","--seed","--top-k","--top-p","--min-p","--typical","--repeat-last-n","--repeat-penalty","--presence-penalty","--frequency-penalty","--dry-multiplier","--dry-base","--mirostat","--dynatemp-range","--spec-type","--spec-draft-n-max","--model-draft","--spec-draft-device","--device-draft","--n-gpu-layers-draft","--cache-type-k-draft","--cache-type-v-draft","--spec-ngram-mod-n-min","--spec-ngram-mod-n-max","--spec-ngram-mod-n-match","--spec-ngram-simple-size-n","--spec-ngram-simple-size-m","--spec-ngram-simple-min-hits","--lora","--lora-scaled","--timeout","--threads-http","--metrics","--slots","--no-slots","--cache-prompt","--no-cache-prompt","--cache-reuse","--reasoning","--reasoning-budget","--reasoning-format","--reasoning-preserve","--no-reasoning-preserve","--api-key-file"]),Vp=(()=>{class i{constructor(){this.fb=m(Gi),this.dialogRef=m(et),this.data=m(Ni),this.serviceService=m(wt),this.cdr=m(se),this.destroyRef=m(Vt),this.system=m(Ot),this.runAs=Bn(this.system.windows),this.isEdit=this.data.config!==null,this.isClone=this.data.clone===!0,this.kvCacheTypes=Ky,this.allExistingCommands=P(()=>{let e=this.data.allConfigs??[],t=this.data.config?.name??null,n=new Set,a=[];for(let r of e)r.name!==t&&(n.has(r.command)||(n.add(r.command),a.push({command:r.command,from:r.name})));return a}),this._commandValue=E(this.data.config?.command??""),this.commandValue=this._commandValue.asReadonly(),this.filteredCommands=P(()=>{let e=this.commandValue()?.toLowerCase()??"";return this.allExistingCommands().filter(t=>t.command.toLowerCase().includes(e)||t.from.toLowerCase().includes(e))}),this.form=this.fb.group({name:[this.data.config?.name??"",{validators:[Qe.required,Qe.pattern(qy),jn(this.data.allConfigs??[],this.data.config?.name??null)]}],command:[this.data.config?.command??"",Qe.required],host:[g.host],port:[g.port],threads:[g.threads],flashAttn:[g.flashAttn],fit:[g.fit],parallel:[g.parallel],alias:[g.alias],nPredict:[g.nPredict],contextShift:[g.contextShift],contBatching:[g.contBatching],model:[""],mmproj:[""],nGpuLayers:[g.nGpuLayers],device:[[]],tensorSplit:[""],splitMode:[g.splitMode],mainGpu:[g.mainGpu],fitTarget:[g.fitTarget],fitCtx:[g.fitCtx],mlock:[g.mlock],mmap:[g.mmap],cpuMoe:[g.cpuMoe],nCpuMoe:[g.nCpuMoe],ctxSize:[""],batchSize:[g.batchSize],ubatchSize:[g.ubatchSize],cacheTypeK:[g.cacheTypeK],cacheTypeV:[g.cacheTypeV],kvOffload:[g.kvOffload],cacheRam:[g.cacheRam],swaFull:[g.swaFull],ropeScaling:[g.ropeScaling],ropeScale:[g.ropeScale],ropeFreqBase:[g.ropeFreqBase],ropeFreqScale:[g.ropeFreqScale],yarnOrigCtx:[g.yarnOrigCtx],yarnExtFactor:[g.yarnExtFactor],yarnAttnFactor:[g.yarnAttnFactor],yarnBetaSlow:[g.yarnBetaSlow],yarnBetaFast:[g.yarnBetaFast],temperature:[g.temperature],seed:[g.seed],topK:[g.topK],topP:[g.topP],minP:[g.minP],typicalP:[g.typicalP],repeatLastN:[g.repeatLastN],repeatPenalty:[g.repeatPenalty],presencePenalty:[g.presencePenalty],frequencyPenalty:[g.frequencyPenalty],dryMultiplier:[g.dryMultiplier],dryBase:[g.dryBase],mirostat:[g.mirostat],dynatempRange:[g.dynatempRange],modelDraft:[""],specDraftDevice:[[]],specDraftNMax:[g.specDraftNMax],nGpuLayersDraft:[g.nGpuLayersDraft],specDraftCacheTypeK:[g.specDraftCacheTypeK],specDraftCacheTypeV:[g.specDraftCacheTypeV],specType:[g.specType],specNgramModNMin:[g.specNgramModNMin],specNgramModNMax:[g.specNgramModNMax],specNgramModNMatch:[g.specNgramModNMatch],specNgramSimpleSizeN:[g.specNgramSimpleSizeN],specNgramSimpleSizeM:[g.specNgramSimpleSizeM],specNgramSimpleMinHits:[g.specNgramSimpleMinHits],lora:[""],loraScaled:[""],timeout:[g.timeout],threadsHttp:[g.threadsHttp],metrics:[g.metrics],slots:[g.slots],cachePrompt:[g.cachePrompt],cacheReuse:[g.cacheReuse],reasoning:[g.reasoning],reasoningBudget:[g.reasoningBudget],reasoningFormat:[g.reasoningFormat],reasoningPreserve:[g.reasoningPreserve],apiKeyFile:[""],extraFlags:[""],envText:[""],user:[this.data.config?.user??""],group:[this.data.config?.group??""],restart:[this.data.config?.restart??"no"]}),this.restartOptions=Vn,this.availableDevices=P(()=>this.availableDevicesRaw()),this.availableDevicesRaw=bi(this.form.controls.command.valueChanges.pipe(si(),Ee(this.form.controls.command.value),Lt(300),ci(),$e(e=>{let t=(e??"").trim();return t?this.serviceService.getLlamaAutocomplete("device","",t).pipe(Et(()=>ge([]))):this.serviceService.getLlamaAutocomplete("device","").pipe(Et(()=>ge([])))})),{initialValue:[]}),this.filteredHosts=bi(this.form.controls.host.valueChanges.pipe(si(),Ee(this.form.controls.host.value),Lt(250),ci(),$e(e=>{let t=(e??"").trim();return t?this.serviceService.getLlamaAutocomplete("host",t).pipe(Et(()=>ge([]))):ge([])})),{initialValue:[]}),this.existingModelPaths=P(()=>this.extractConfigPaths("--model")),this.existingMmprojPaths=P(()=>this.extractConfigPaths("--mmproj")),this.existingApiKeyPaths=P(()=>this.extractConfigPaths("--api-key-file")),this.existingDraftModelPaths=P(()=>this.extractConfigPaths("--model-draft")),this.existingLoraPaths=P(()=>this.extractConfigPaths("--lora")),this.formValue=bi(this.form.valueChanges,{initialValue:this.form.value}),this.fitValue=P(()=>this.formValue()?.fit),this.splitModeValue=P(()=>this.formValue()?.splitMode),this.specTypeValue=P(()=>this.formValue()?.specType),this.ropeScalingValue=P(()=>this.formValue()?.ropeScaling),this.cpuMoeValue=P(()=>this.formValue()?.cpuMoe),this.cachePromptValue=P(()=>this.formValue()?.cachePrompt),this.reasoningValue=P(()=>this.formValue()?.reasoning),this.mirostatValue=P(()=>this.formValue()?.mirostat),this.hostValue=P(()=>this.formValue()?.host),this.isTensorSplitDisabled=P(()=>this.splitModeValue()==="none"),this.isFitTargetDisabled=P(()=>this.fitValue()==="off"),this.isCpuMoeLayersDisabled=P(()=>this.cpuMoeValue()==="on"),this.isCacheReuseDisabled=P(()=>this.cachePromptValue()==="off"),this.isReasoningParamsDisabled=P(()=>this.reasoningValue()==="off"),this.isMirostatEnabled=P(()=>(this.mirostatValue()??0)!==0),this.isRopeParamsDisabled=P(()=>this.ropeScalingValue()==="none"),this.isPortDisabled=P(()=>(this.hostValue()??"").trim().toLowerCase().endsWith(".sock")),this.showDraftParams=P(()=>(this.specTypeValue()??"").includes("draft")),this.showNgramModParams=P(()=>(this.specTypeValue()??"").includes("ngram-mod")),this.showNgramSimpleParams=P(()=>(this.specTypeValue()??"").includes("ngram-simple")),this.showYarnParams=P(()=>this.ropeScalingValue()==="yarn"),this.parallelSlots=P(()=>{let e=this.formValue()?.parallel;return typeof e=="number"&&e>0?e:1}),this.ctxPresets=P(()=>{let e=this.parallelSlots();return po.map(t=>({label:li(e*t,e)}))}),this.lockedFields=zn(this.form,()=>({group:this.runAs.isGroupDisabled(),tensorSplit:this.isTensorSplitDisabled(),fitTarget:this.isFitTargetDisabled(),fitCtx:this.isFitTargetDisabled(),nCpuMoe:this.isCpuMoeLayersDisabled(),ropeScale:this.isRopeParamsDisabled(),ropeFreqBase:this.isRopeParamsDisabled(),ropeFreqScale:this.isRopeParamsDisabled(),topK:this.isMirostatEnabled(),topP:this.isMirostatEnabled(),typicalP:this.isMirostatEnabled(),port:this.isPortDisabled(),cacheReuse:this.isCacheReuseDisabled(),reasoningBudget:this.isReasoningParamsDisabled(),reasoningFormat:this.isReasoningParamsDisabled()})),this._flags=null}extractConfigPaths(e){let t=this.data.allConfigs??[],n=this.data.config?.name??null,a=new Set,r=[];for(let u of t){if(u.name===n||!u.flags)continue;let h=Un(u.flags,e);h&&!a.has(h)&&(a.add(h),r.push(h))}return r}isControlChanged(e){let t=this.form.get(e)?.value;return e==="ctxSize"?+yi(t)!==g.ctxSize:t!==void 0&&Wy(e,t)}isSectionChanged(...e){return e.some(t=>this.isControlChanged(t))}onCtxSizeInput(e){let t=e.target.value,n=yi(t),a=li(n,this.parallelSlots());this.form.get("ctxSize")?.setValue(a,{emitEvent:!1})}ngOnInit(){this.system.detectWindows(),this.form.controls.command.valueChanges.pipe(si(this.destroyRef)).subscribe(e=>this._commandValue.set(e)),this.data.config&&this.populateFormFromFlags(this.data.config.flags,this.data.config.environment),this.form.valueChanges.pipe(si(this.destroyRef)).subscribe(()=>{this.cdr.markForCheck()})}populateFormFromFlags(e,t){let n=this.form.controls;n.host.setValue(Je(e,"--host",g.host)),n.port.setValue(Pe(e,"--port",g.port)),n.threads.setValue(Pe(e,"--threads",g.threads)),n.flashAttn.setValue(Je(e,"--flash-attn",g.flashAttn)),n.fit.setValue(Je(e,"--fit",g.fit)),n.parallel.setValue(Pe(e,"--parallel",g.parallel)),n.alias.setValue(Je(e,"--alias","")),n.nPredict.setValue(Pe(e,"--n-predict",g.nPredict)),n.contextShift.setValue($n(e,"--context-shift","--no-context-shift",!1)?"on":"off"),n.contBatching.setValue($n(e,"--cont-batching","--no-cont-batching",!0)?"on":"off");let a=Un(e,"--device");n.device.setValue(a?a.split(",").map(f=>f.trim()).filter(Boolean):[]),n.tensorSplit.setValue(Je(e,"--tensor-split","")),n.model.setValue(Je(e,"--model","")),n.mmproj.setValue(Je(e,"--mmproj","")),n.nGpuLayers.setValue(Je(e,"--n-gpu-layers",g.nGpuLayers)),n.splitMode.setValue(Je(e,"--split-mode",g.splitMode)),n.mainGpu.setValue(Pe(e,"--main-gpu",g.mainGpu)),n.fitTarget.setValue(Pe(e,"--fit-target",g.fitTarget)),n.fitCtx.setValue(Pe(e,"--fit-ctx",g.fitCtx)),n.mlock.setValue(e.includes("--mlock")?"on":"off"),n.mmap.setValue($n(e,"--mmap","--no-mmap",!0)?"on":"off"),n.cpuMoe.setValue(e.includes("--cpu-moe")?"on":"off"),n.nCpuMoe.setValue(Pe(e,"--n-cpu-moe",0));let r=Pe(e,"--ctx-size",g.ctxSize),u=typeof n.parallel.value=="number"&&n.parallel.value>0?n.parallel.value:1;n.ctxSize.setValue(li(r,u)),n.batchSize.setValue(Pe(e,"--batch-size",g.batchSize)),n.ubatchSize.setValue(Pe(e,"--ubatch-size",g.ubatchSize)),n.cacheTypeK.setValue(Je(e,"--cache-type-k",g.cacheTypeK)),n.cacheTypeV.setValue(Je(e,"--cache-type-v",g.cacheTypeV)),n.kvOffload.setValue($n(e,"--kv-offload","--no-kv-offload",!0)?"on":"off"),n.cacheRam.setValue(Pe(e,"--cache-ram",g.cacheRam)),n.swaFull.setValue(e.includes("--swa-full")?"on":"off"),n.ropeScaling.setValue(Je(e,"--rope-scaling",g.ropeScaling)),n.ropeScale.setValue(St(e,"--rope-scale",g.ropeScale)),n.ropeFreqBase.setValue(St(e,"--rope-freq-base",g.ropeFreqBase)),n.ropeFreqScale.setValue(St(e,"--rope-freq-scale",g.ropeFreqScale)),n.yarnOrigCtx.setValue(Pe(e,"--yarn-orig-ctx",g.yarnOrigCtx)),n.yarnExtFactor.setValue(St(e,"--yarn-ext-factor",g.yarnExtFactor)),n.yarnAttnFactor.setValue(St(e,"--yarn-attn-factor",g.yarnAttnFactor)),n.yarnBetaSlow.setValue(St(e,"--yarn-beta-slow",g.yarnBetaSlow)),n.yarnBetaFast.setValue(St(e,"--yarn-beta-fast",g.yarnBetaFast)),n.temperature.setValue(St(e,"--temperature",g.temperature)),n.seed.setValue(Pe(e,"--seed",g.seed)),n.topK.setValue(Pe(e,"--top-k",g.topK)),n.topP.setValue(St(e,"--top-p",g.topP)),n.minP.setValue(St(e,"--min-p",g.minP)),n.typicalP.setValue(St(e,"--typical",g.typicalP)),n.repeatLastN.setValue(Pe(e,"--repeat-last-n",g.repeatLastN)),n.repeatPenalty.setValue(St(e,"--repeat-penalty",g.repeatPenalty)),n.presencePenalty.setValue(St(e,"--presence-penalty",g.presencePenalty)),n.frequencyPenalty.setValue(St(e,"--frequency-penalty",g.frequencyPenalty)),n.dryMultiplier.setValue(St(e,"--dry-multiplier",g.dryMultiplier)),n.dryBase.setValue(St(e,"--dry-base",g.dryBase)),n.mirostat.setValue(Pe(e,"--mirostat",g.mirostat)),n.dynatempRange.setValue(St(e,"--dynatemp-range",g.dynatempRange)),n.modelDraft.setValue(Je(e,"--model-draft",""));let h=Un(e,"--spec-draft-device")??Un(e,"--device-draft");if(n.specDraftDevice.setValue(h?h.split(",").map(f=>f.trim()).filter(Boolean):[]),n.specDraftNMax.setValue(Pe(e,"--spec-draft-n-max",g.specDraftNMax)),n.nGpuLayersDraft.setValue(Je(e,"--n-gpu-layers-draft",g.nGpuLayersDraft)),n.specDraftCacheTypeK.setValue(Je(e,"--cache-type-k-draft",g.specDraftCacheTypeK)),n.specDraftCacheTypeV.setValue(Je(e,"--cache-type-v-draft",g.specDraftCacheTypeV)),n.specType.setValue(Je(e,"--spec-type",g.specType)),n.specNgramModNMin.setValue(Pe(e,"--spec-ngram-mod-n-min",g.specNgramModNMin)),n.specNgramModNMax.setValue(Pe(e,"--spec-ngram-mod-n-max",g.specNgramModNMax)),n.specNgramModNMatch.setValue(Pe(e,"--spec-ngram-mod-n-match",g.specNgramModNMatch)),n.specNgramSimpleSizeN.setValue(Pe(e,"--spec-ngram-simple-size-n",g.specNgramSimpleSizeN)),n.specNgramSimpleSizeM.setValue(Pe(e,"--spec-ngram-simple-size-m",g.specNgramSimpleSizeM)),n.specNgramSimpleMinHits.setValue(Pe(e,"--spec-ngram-simple-min-hits",g.specNgramSimpleMinHits)),n.lora.setValue(Je(e,"--lora","")),n.loraScaled.setValue(Je(e,"--lora-scaled","")),n.timeout.setValue(Pe(e,"--timeout",g.timeout)),n.threadsHttp.setValue(Pe(e,"--threads-http",g.threadsHttp)),n.metrics.setValue(e.includes("--metrics")?"on":"off"),n.slots.setValue($n(e,"--slots","--no-slots",!0)?"on":"off"),n.cachePrompt.setValue($n(e,"--cache-prompt","--no-cache-prompt",!0)?"on":"off"),n.cacheReuse.setValue(Pe(e,"--cache-reuse",g.cacheReuse)),n.reasoning.setValue(Je(e,"--reasoning",g.reasoning)),n.reasoningBudget.setValue(Pe(e,"--reasoning-budget",g.reasoningBudget)),n.reasoningFormat.setValue(Je(e,"--reasoning-format",g.reasoningFormat)),n.reasoningPreserve.setValue($n(e,"--reasoning-preserve","--no-reasoning-preserve",!0)?"on":"off"),n.apiKeyFile.setValue(Je(e,"--api-key-file","")),n.extraFlags.setValue(this.extractExtraFlags(e).join(`
5583
+ `],encapsulation:2})}return i})();var aa=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=U({type:i});static \u0275inj=H({imports:[Aa,Jt,ce,Ri]})}return i})();function Un(i,o){for(let e of i){let t=e.indexOf("=");if(t>0&&e.slice(0,t)===o)return e.slice(t+1);let n=e.indexOf(" ");if(n>0&&e.slice(0,n)===o)return e.slice(n+1).trim()}for(let e=0;e<i.length;e++)if(i[e]===o&&e+1<i.length)return i[e+1];return null}function $n(i,o,e,t){for(let n of i){let a=n.split(/\s|=/)[0];if(a===o)return!0;if(a===e)return!1}return t}function Je(i,o,e){let t=Un(i,o);return t!==null?t:e}function Pe(i,o,e){let t=Un(i,o);if(t!==null){let n=parseInt(t,10);return isNaN(n)?e:n}return e}function St(i,o,e){let t=Un(i,o);if(t!==null){let n=parseFloat(t);return isNaN(n)?e:n}return e}var wy=(i,o)=>o.path;function Dy(i,o){i&1&&(s(0,"span",7),d(1,"(dir)"),l())}function Sy(i,o){if(i&1&&(s(0,"mat-option",5)(1,"span",6),d(2),l(),w(3,Dy,2,0,"span",7),l()),i&2){let e=o.$implicit;x("value",e.path),c(2),I(e.path),c(),D(e.isDir?3:-1)}}var qs=(()=>{class i{constructor(){this.fb=m(Gi),this.service=m(wt),this.label="Path",this.placeholder="/path/to/file",this.required=!1,this.fieldClass="",this.existingPaths=[],this.onChange=e=>{},this.onTouched=()=>{},this._subscription=null,this.suggestions=E([]),this.innerForm=this.fb.group({value:[""]})}writeValue(e){let t=(e??"").toString();this.innerForm.patchValue({value:t},{emitEvent:!1})}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){e?this.innerForm.disable():this.innerForm.enable()}ngOnInit(){this._subscription=this.innerForm.get("value").valueChanges.subscribe(e=>{this.onChange(e)}),this._subscription.add(this.innerForm.get("value").valueChanges.pipe(Lt(200),ci(),$e(e=>{let t=(e??"").trim();return t?this.service.getLlamaAutocomplete("path",t).pipe(Et(()=>ge([]))):ge(this.emptySuggestions)})).subscribe(e=>{this.suggestions.set(e)}))}get emptySuggestions(){return this.existingPaths.filter(Boolean).map(e=>({path:e,source:"existing config"}))}ngOnDestroy(){this._subscription?.unsubscribe()}onSelect(e){this.innerForm.patchValue({value:e},{emitEvent:!1}),this.onChange(e)}onBlur(){this.onTouched()}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=R({type:i,selectors:[["app-file-autocomplete"]],inputs:{label:"label",placeholder:"placeholder",required:"required",fieldClass:"fieldClass",existingPaths:"existingPaths"},features:[le([{provide:Ui,useExisting:lt(()=>i),multi:!0}])],decls:9,vars:7,consts:[["auto","matAutocomplete"],[3,"formGroup"],["appearance","outline",1,"full-width"],["matInput","","formControlName","value",3,"blur","placeholder","required","matAutocomplete"],[3,"optionSelected"],[3,"value"],[1,"file-path"],[1,"file-dir"]],template:function(t,n){if(t&1&&(Si(0,1),s(1,"mat-form-field",2)(2,"input",3),S("blur",function(){return n.onBlur()}),l(),y(),s(3,"mat-label"),d(4),l()(),s(5,"mat-autocomplete",4,0),S("optionSelected",function(r){return n.onSelect(r.option.value)}),ee(7,Sy,4,3,"mat-option",5,wy),l(),ki()),t&2){let a=Se(6);x("formGroup",n.innerForm),c(),at(n.fieldClass),c(),x("placeholder",n.placeholder)("required",n.required)("matAutocomplete",a),C(),c(2),I(n.label),c(3),te(n.suggestions())}},dependencies:[Me,Wi,Zt,Qt,$i,fs,$t,Ti,Mt,ut,_t,Pt,Rt,Qi,Zi,Dt,Li],styles:[".full-width[_ngcontent-%COMP%]{width:100%}.file-path[_ngcontent-%COMP%]{font-family:monospace}.file-dir[_ngcontent-%COMP%]{margin-left:4px;color:#1976d2;font-size:11px;font-weight:500}.file-source[_ngcontent-%COMP%]{margin-left:8px;opacity:.6;font-size:12px}"]})}}return i})();function si(i){i||(i=m(Vt));let o=new Nt(e=>{if(i.destroyed){e.next();return}return i.onDestroy(e.next.bind(e))});return e=>e.pipe(ue(o))}function bi(i,o){let t=!o?.manualCleanup?o?.injector?.get(Vt)??m(Vt):null,n=ky(o?.equal),a;o?.requireSync?a=E({kind:0},{equal:n}):a=E({kind:1,value:o?.initialValue},{equal:n});let r,u=i.subscribe({next:h=>a.set({kind:1,value:h}),error:h=>{a.set({kind:2,error:h}),r?.()},complete:()=>{r?.()}});if(o?.requireSync&&a().kind===0)throw new he(601,!1);return r=t?.onDestroy(u.unsubscribe.bind(u)),P(()=>{let h=a();switch(h.kind){case 1:return h.value;case 2:throw h.error;case 0:throw new he(601,!1)}},{equal:o?.equal})}function ky(i=Object.is){return(o,e)=>o.kind===1&&e.kind===1&&i(o.value,e.value)}function yi(i){if(typeof i=="number")return i;let o=i.trim();if(!o)return 0;let e=o.split(/\s*x\s*/i),t=1,n;if(e.length>=2){let h=e[0].trim();h&&(t=parseInt(h,10),(isNaN(t)||t<1)&&(t=1)),n=e.slice(1).join("").trim()}else n=o;let a=n.match(/^(\d+(?:\.\d+)?)\s*([kKmM])?$/);if(!a)return 0;let r=parseFloat(a[1]),u=a[2];return u&&(u.toLowerCase()==="k"?r*=1024:u.toLowerCase()==="m"&&(r*=1024*1024)),t*r}var po=[8192,16384,32768,65536,98304,131072,196608,262144,524288,1048576];function Lp(i){return i<=0?"0":i>=1048576&&i%1048576===0?`${i/1048576}M`:i>=1024&&i%1024===0?`${i/1024}K`:`${i}`}function li(i,o){if(i<=0)return"";if(o>1&&i%o===0){let e=i/o;if(po.includes(e))return`${o} x ${Lp(e)}`}return Lp(i)}var My=(i,o)=>o.command,td=(i,o)=>o.path,Ey=(i,o)=>o.label;function Ty(i,o){i&1&&(s(0,"mat-error"),d(1,"Required"),l())}function Ay(i,o){i&1&&(s(0,"mat-error"),d(1,"Starts with letter, alphanumeric + hyphens/underscores, max 128 chars"),l())}function Iy(i,o){i&1&&(s(0,"mat-error"),d(1,"Another service already uses this name"),l())}function Ry(i,o){i&1&&(s(0,"mat-error"),d(1,"Required"),l())}function Py(i,o){if(i&1&&(s(0,"mat-option",8)(1,"span",104),d(2),l(),s(3,"span",105),d(4),l()()),i&2){let e=o.$implicit;x("value",e.command),c(2),I(e.command),c(2),Q("(",e.from,")")}}function Oy(i,o){if(i&1&&(s(0,"mat-option",8),d(1),l()),i&2){let e=o.$implicit;x("value",e.path),c(),I(e.path)}}function Fy(i,o){if(i&1&&(s(0,"mat-option",8),d(1),l()),i&2){let e=o.$implicit;x("value",e.label),c(),I(e.label)}}function Ny(i,o){if(i&1&&(s(0,"mat-option",8),d(1),l()),i&2){let e=o.$implicit;x("value",e),c(),I(e)}}function Ly(i,o){if(i&1&&(s(0,"mat-option",8),d(1),l()),i&2){let e=o.$implicit;x("value",e),c(),I(e)}}function Vy(i,o){if(i&1&&(s(0,"div",26),d(1,"YaRN Parameters"),l(),s(2,"div",13)(3,"mat-form-field",18),_(4,"input",106),y(),s(5,"mat-label"),d(6,"YaRN Orig Ctx"),l()(),s(7,"mat-form-field",18),_(8,"input",107),y(),s(9,"mat-label"),d(10,"Extrapolation Mix"),l()(),s(11,"mat-form-field",18),_(12,"input",108),y(),s(13,"mat-label"),d(14,"Attn Factor"),l()(),s(15,"mat-form-field",18),_(16,"input",109),y(),s(17,"mat-label"),d(18,"Beta Slow"),l()(),s(19,"mat-form-field",18),_(20,"input",110),y(),s(21,"mat-label"),d(22,"Beta Fast"),l()()()),i&2){let e=v();c(3),p("changed",e.isControlChanged("yarnOrigCtx")),c(),C(),c(3),p("changed",e.isControlChanged("yarnExtFactor")),c(),C(),c(3),p("changed",e.isControlChanged("yarnAttnFactor")),c(),C(),c(3),p("changed",e.isControlChanged("yarnBetaSlow")),c(),C(),c(3),p("changed",e.isControlChanged("yarnBetaFast")),c(),C()}}function By(i,o){if(i&1&&(s(0,"mat-option",8),d(1),l()),i&2){let e=o.$implicit;x("value",e.path),c(),I(e.path)}}function zy(i,o){if(i&1&&(s(0,"mat-option",8),d(1),l()),i&2){let e=o.$implicit;x("value",e),c(),I(e)}}function jy(i,o){if(i&1&&(s(0,"mat-option",8),d(1),l()),i&2){let e=o.$implicit;x("value",e),c(),I(e)}}function Hy(i,o){if(i&1&&(s(0,"div",26),d(1,"Draft Model"),l(),_(2,"app-file-autocomplete",111),y(),s(3,"div",13)(4,"mat-form-field",18)(5,"mat-select",112),ee(6,By,2,2,"mat-option",8,td),l(),y(),s(8,"mat-label"),d(9,"Draft Device (multi-select)"),l()()(),s(10,"div",13)(11,"mat-form-field",18),_(12,"input",113),y(),s(13,"mat-label"),d(14,"Draft N Max"),l()(),s(15,"mat-form-field",18),_(16,"input",114),y(),s(17,"mat-label"),d(18,"Draft GPU Layers"),l()()(),s(19,"div",13)(20,"mat-form-field",18)(21,"mat-select",115),ee(22,zy,2,2,"mat-option",8,Ye),l(),y(),s(24,"mat-label"),d(25,"Draft Cache Type K"),l()(),s(26,"mat-form-field",18)(27,"mat-select",116),ee(28,jy,2,2,"mat-option",8,Ye),l(),y(),s(30,"mat-label"),d(31,"Draft Cache Type V"),l()()()),i&2){let e=v();c(2),x("existingPaths",e.existingDraftModelPaths())("fieldClass",e.isControlChanged("modelDraft")?"changed":""),C(),c(2),p("changed",e.isControlChanged("specDraftDevice")),c(),C(),c(),te(e.availableDevices()),c(5),p("changed",e.isControlChanged("specDraftNMax")),c(),C(),c(3),p("changed",e.isControlChanged("nGpuLayersDraft")),c(),C(),c(4),p("changed",e.isControlChanged("specDraftCacheTypeK")),c(),C(),c(),te(e.kvCacheTypes),c(4),p("changed",e.isControlChanged("specDraftCacheTypeV")),c(),C(),c(),te(e.kvCacheTypes)}}function Uy(i,o){if(i&1&&(s(0,"div",26),d(1,"Ngram Mod Parameters"),l(),s(2,"div",13)(3,"mat-form-field",18),_(4,"input",117),y(),s(5,"mat-label"),d(6,"Ngram Mod N Min"),l()(),s(7,"mat-form-field",18),_(8,"input",118),y(),s(9,"mat-label"),d(10,"Ngram Mod N Max"),l()(),s(11,"mat-form-field",18),_(12,"input",119),y(),s(13,"mat-label"),d(14,"Ngram Mod Match"),l()()()),i&2){let e=v();c(3),p("changed",e.isControlChanged("specNgramModNMin")),c(),C(),c(3),p("changed",e.isControlChanged("specNgramModNMax")),c(),C(),c(3),p("changed",e.isControlChanged("specNgramModNMatch")),c(),C()}}function $y(i,o){if(i&1&&(s(0,"div",26),d(1,"Ngram Simple Parameters"),l(),s(2,"div",13)(3,"mat-form-field",18),_(4,"input",120),y(),s(5,"mat-label"),d(6,"Simple Size N"),l()(),s(7,"mat-form-field",18),_(8,"input",121),y(),s(9,"mat-label"),d(10,"Simple Size M"),l()(),s(11,"mat-form-field",18),_(12,"input",122),y(),s(13,"mat-label"),d(14,"Simple Min Hits"),l()()()),i&2){let e=v();c(3),p("changed",e.isControlChanged("specNgramSimpleSizeN")),c(),C(),c(3),p("changed",e.isControlChanged("specNgramSimpleSizeM")),c(),C(),c(3),p("changed",e.isControlChanged("specNgramSimpleMinHits")),c(),C()}}function Gy(i,o){if(i&1&&(s(0,"mat-option",8)(1,"span",104),d(2),l(),s(3,"span",105),d(4),l()()),i&2){let e=o.$implicit;x("value",e.path),c(2),I(e.path),c(2),Q("(",e.source,")")}}function Wy(i,o){if(i&1&&(s(0,"mat-option",8),d(1),l()),i&2){let e=o.$implicit;x("value",e),c(),I(e==="no"?"no (default)":e)}}var g={host:"127.0.0.1",port:8080,threads:-1,flashAttn:"auto",fit:"on",parallel:-1,alias:"",nPredict:-1,contextShift:"off",contBatching:"on",model:"",mmproj:"",nGpuLayers:"auto",device:[],tensorSplit:"",splitMode:"layer",mainGpu:0,fitTarget:1024,fitCtx:4096,mlock:"off",mmap:"on",cpuMoe:"off",nCpuMoe:0,ctxSize:0,batchSize:2048,ubatchSize:512,cacheTypeK:"f16",cacheTypeV:"f16",kvOffload:"on",cacheRam:8192,swaFull:"off",ropeScaling:"none",ropeScale:1,ropeFreqBase:0,ropeFreqScale:0,yarnOrigCtx:0,yarnExtFactor:-1,yarnAttnFactor:-1,yarnBetaSlow:-1,yarnBetaFast:-1,temperature:.8,seed:-1,topK:40,topP:.95,minP:.05,typicalP:1,repeatLastN:64,repeatPenalty:1,presencePenalty:0,frequencyPenalty:0,dryMultiplier:0,dryBase:1.75,mirostat:0,dynatempRange:0,modelDraft:"",specDraftDevice:[],specDraftNMax:3,nGpuLayersDraft:"auto",specDraftCacheTypeK:"f16",specDraftCacheTypeV:"f16",specType:"none",specNgramModNMin:48,specNgramModNMax:64,specNgramModNMatch:24,specNgramSimpleSizeN:12,specNgramSimpleSizeM:48,specNgramSimpleMinHits:1,lora:"",loraScaled:"",timeout:3600,threadsHttp:-1,metrics:"off",slots:"on",cachePrompt:"on",cacheReuse:0,reasoning:"auto",reasoningBudget:-1,reasoningFormat:"auto",reasoningPreserve:"on",apiKeyFile:""};function qy(i,o){let e=g[i];if(e===void 0)return!1;if(Array.isArray(o)||Array.isArray(e)){let t=Array.isArray(o)?o:[],n=Array.isArray(e)?e:[];return t.length!==n.length||t.some((a,r)=>a!==n[r])}return String(o)!==String(e)}var Ky="^[a-zA-Z][a-zA-Z0-9_-]{0,127}$",Xy=["f32","f16","bf16","q8_0","q4_0","q4_1","iq4_nl","q5_0","q5_1"],Yy=new Set(["--host","--port","--threads","--flash-attn","--fit","--parallel","--alias","--n-predict","--context-shift","--no-context-shift","--cont-batching","--no-cont-batching","--device","--tensor-split","--model","--mmproj","--n-gpu-layers","--split-mode","--main-gpu","--fit-target","--fit-ctx","--mlock","--mmap","--no-mmap","--cpu-moe","--n-cpu-moe","--ctx-size","--batch-size","--ubatch-size","--cache-type-k","--cache-type-v","--kv-offload","--no-kv-offload","--cache-ram","--swa-full","--rope-scaling","--rope-scale","--rope-freq-base","--rope-freq-scale","--yarn-orig-ctx","--yarn-ext-factor","--yarn-attn-factor","--yarn-beta-slow","--yarn-beta-fast","--temperature","--seed","--top-k","--top-p","--min-p","--typical","--repeat-last-n","--repeat-penalty","--presence-penalty","--frequency-penalty","--dry-multiplier","--dry-base","--mirostat","--dynatemp-range","--spec-type","--spec-draft-n-max","--model-draft","--spec-draft-device","--device-draft","--n-gpu-layers-draft","--cache-type-k-draft","--cache-type-v-draft","--spec-ngram-mod-n-min","--spec-ngram-mod-n-max","--spec-ngram-mod-n-match","--spec-ngram-simple-size-n","--spec-ngram-simple-size-m","--spec-ngram-simple-min-hits","--lora","--lora-scaled","--timeout","--threads-http","--metrics","--slots","--no-slots","--cache-prompt","--no-cache-prompt","--cache-reuse","--reasoning","--reasoning-budget","--reasoning-format","--reasoning-preserve","--no-reasoning-preserve","--api-key-file"]),Vp=(()=>{class i{constructor(){this.fb=m(Gi),this.dialogRef=m(et),this.data=m(Ni),this.serviceService=m(wt),this.cdr=m(se),this.destroyRef=m(Vt),this.system=m(Ot),this.runAs=Bn(this.system.windows),this.isEdit=this.data.config!==null,this.isClone=this.data.clone===!0,this.kvCacheTypes=Xy,this.allExistingCommands=P(()=>{let e=this.data.allConfigs??[],t=this.data.config?.name??null,n=new Set,a=[];for(let r of e)r.name!==t&&(n.has(r.command)||(n.add(r.command),a.push({command:r.command,from:r.name})));return a}),this._commandValue=E(this.data.config?.command??""),this.commandValue=this._commandValue.asReadonly(),this.filteredCommands=P(()=>{let e=this.commandValue()?.toLowerCase()??"";return this.allExistingCommands().filter(t=>t.command.toLowerCase().includes(e)||t.from.toLowerCase().includes(e))}),this.form=this.fb.group({name:[this.data.config?.name??"",{validators:[Qe.required,Qe.pattern(Ky),jn(this.data.allConfigs??[],this.data.config?.name??null)]}],command:[this.data.config?.command??"",Qe.required],host:[g.host],port:[g.port],threads:[g.threads],flashAttn:[g.flashAttn],fit:[g.fit],parallel:[g.parallel],alias:[g.alias],nPredict:[g.nPredict],contextShift:[g.contextShift],contBatching:[g.contBatching],model:[""],mmproj:[""],nGpuLayers:[g.nGpuLayers],device:[[]],tensorSplit:[""],splitMode:[g.splitMode],mainGpu:[g.mainGpu],fitTarget:[g.fitTarget],fitCtx:[g.fitCtx],mlock:[g.mlock],mmap:[g.mmap],cpuMoe:[g.cpuMoe],nCpuMoe:[g.nCpuMoe],ctxSize:[""],batchSize:[g.batchSize],ubatchSize:[g.ubatchSize],cacheTypeK:[g.cacheTypeK],cacheTypeV:[g.cacheTypeV],kvOffload:[g.kvOffload],cacheRam:[g.cacheRam],swaFull:[g.swaFull],ropeScaling:[g.ropeScaling],ropeScale:[g.ropeScale],ropeFreqBase:[g.ropeFreqBase],ropeFreqScale:[g.ropeFreqScale],yarnOrigCtx:[g.yarnOrigCtx],yarnExtFactor:[g.yarnExtFactor],yarnAttnFactor:[g.yarnAttnFactor],yarnBetaSlow:[g.yarnBetaSlow],yarnBetaFast:[g.yarnBetaFast],temperature:[g.temperature],seed:[g.seed],topK:[g.topK],topP:[g.topP],minP:[g.minP],typicalP:[g.typicalP],repeatLastN:[g.repeatLastN],repeatPenalty:[g.repeatPenalty],presencePenalty:[g.presencePenalty],frequencyPenalty:[g.frequencyPenalty],dryMultiplier:[g.dryMultiplier],dryBase:[g.dryBase],mirostat:[g.mirostat],dynatempRange:[g.dynatempRange],modelDraft:[""],specDraftDevice:[[]],specDraftNMax:[g.specDraftNMax],nGpuLayersDraft:[g.nGpuLayersDraft],specDraftCacheTypeK:[g.specDraftCacheTypeK],specDraftCacheTypeV:[g.specDraftCacheTypeV],specType:[g.specType],specNgramModNMin:[g.specNgramModNMin],specNgramModNMax:[g.specNgramModNMax],specNgramModNMatch:[g.specNgramModNMatch],specNgramSimpleSizeN:[g.specNgramSimpleSizeN],specNgramSimpleSizeM:[g.specNgramSimpleSizeM],specNgramSimpleMinHits:[g.specNgramSimpleMinHits],lora:[""],loraScaled:[""],timeout:[g.timeout],threadsHttp:[g.threadsHttp],metrics:[g.metrics],slots:[g.slots],cachePrompt:[g.cachePrompt],cacheReuse:[g.cacheReuse],reasoning:[g.reasoning],reasoningBudget:[g.reasoningBudget],reasoningFormat:[g.reasoningFormat],reasoningPreserve:[g.reasoningPreserve],apiKeyFile:[""],extraFlags:[""],envText:[""],user:[this.data.config?.user??""],group:[this.data.config?.group??""],restart:[this.data.config?.restart??"no"]}),this.restartOptions=Vn,this.availableDevices=P(()=>this.availableDevicesRaw()),this.availableDevicesRaw=bi(this.form.controls.command.valueChanges.pipe(si(),Ee(this.form.controls.command.value),Lt(300),ci(),$e(e=>{let t=(e??"").trim();return t?this.serviceService.getLlamaAutocomplete("device","",t).pipe(Et(()=>ge([]))):this.serviceService.getLlamaAutocomplete("device","").pipe(Et(()=>ge([])))})),{initialValue:[]}),this.filteredHosts=bi(this.form.controls.host.valueChanges.pipe(si(),Ee(this.form.controls.host.value),Lt(250),ci(),$e(e=>{let t=(e??"").trim();return t?this.serviceService.getLlamaAutocomplete("host",t).pipe(Et(()=>ge([]))):ge([])})),{initialValue:[]}),this.existingModelPaths=P(()=>this.extractConfigPaths("--model")),this.existingMmprojPaths=P(()=>this.extractConfigPaths("--mmproj")),this.existingApiKeyPaths=P(()=>this.extractConfigPaths("--api-key-file")),this.existingDraftModelPaths=P(()=>this.extractConfigPaths("--model-draft")),this.existingLoraPaths=P(()=>this.extractConfigPaths("--lora")),this.formValue=bi(this.form.valueChanges,{initialValue:this.form.value}),this.fitValue=P(()=>this.formValue()?.fit),this.splitModeValue=P(()=>this.formValue()?.splitMode),this.specTypeValue=P(()=>this.formValue()?.specType),this.ropeScalingValue=P(()=>this.formValue()?.ropeScaling),this.cpuMoeValue=P(()=>this.formValue()?.cpuMoe),this.cachePromptValue=P(()=>this.formValue()?.cachePrompt),this.reasoningValue=P(()=>this.formValue()?.reasoning),this.mirostatValue=P(()=>this.formValue()?.mirostat),this.hostValue=P(()=>this.formValue()?.host),this.isTensorSplitDisabled=P(()=>this.splitModeValue()==="none"),this.isFitTargetDisabled=P(()=>this.fitValue()==="off"),this.isCpuMoeLayersDisabled=P(()=>this.cpuMoeValue()==="on"),this.isCacheReuseDisabled=P(()=>this.cachePromptValue()==="off"),this.isReasoningParamsDisabled=P(()=>this.reasoningValue()==="off"),this.isMirostatEnabled=P(()=>(this.mirostatValue()??0)!==0),this.isRopeParamsDisabled=P(()=>this.ropeScalingValue()==="none"),this.isPortDisabled=P(()=>(this.hostValue()??"").trim().toLowerCase().endsWith(".sock")),this.showDraftParams=P(()=>(this.specTypeValue()??"").includes("draft")),this.showNgramModParams=P(()=>(this.specTypeValue()??"").includes("ngram-mod")),this.showNgramSimpleParams=P(()=>(this.specTypeValue()??"").includes("ngram-simple")),this.showYarnParams=P(()=>this.ropeScalingValue()==="yarn"),this.parallelSlots=P(()=>{let e=this.formValue()?.parallel;return typeof e=="number"&&e>0?e:1}),this.ctxPresets=P(()=>{let e=this.parallelSlots();return po.map(t=>({label:li(e*t,e)}))}),this.lockedFields=zn(this.form,()=>({group:this.runAs.isGroupDisabled(),tensorSplit:this.isTensorSplitDisabled(),fitTarget:this.isFitTargetDisabled(),fitCtx:this.isFitTargetDisabled(),nCpuMoe:this.isCpuMoeLayersDisabled(),ropeScale:this.isRopeParamsDisabled(),ropeFreqBase:this.isRopeParamsDisabled(),ropeFreqScale:this.isRopeParamsDisabled(),topK:this.isMirostatEnabled(),topP:this.isMirostatEnabled(),typicalP:this.isMirostatEnabled(),port:this.isPortDisabled(),cacheReuse:this.isCacheReuseDisabled(),reasoningBudget:this.isReasoningParamsDisabled(),reasoningFormat:this.isReasoningParamsDisabled()})),this._flags=null}extractConfigPaths(e){let t=this.data.allConfigs??[],n=this.data.config?.name??null,a=new Set,r=[];for(let u of t){if(u.name===n||!u.flags)continue;let h=Un(u.flags,e);h&&!a.has(h)&&(a.add(h),r.push(h))}return r}isControlChanged(e){let t=this.form.get(e)?.value;return e==="ctxSize"?+yi(t)!==g.ctxSize:t!==void 0&&qy(e,t)}isSectionChanged(...e){return e.some(t=>this.isControlChanged(t))}onCtxSizeInput(e){let t=e.target.value,n=yi(t),a=li(n,this.parallelSlots());this.form.get("ctxSize")?.setValue(a,{emitEvent:!1})}ngOnInit(){this.system.detectWindows(),this.form.controls.command.valueChanges.pipe(si(this.destroyRef)).subscribe(e=>this._commandValue.set(e)),this.data.config&&this.populateFormFromFlags(this.data.config.flags,this.data.config.environment),this.form.valueChanges.pipe(si(this.destroyRef)).subscribe(()=>{this.cdr.markForCheck()})}populateFormFromFlags(e,t){let n=this.form.controls;n.host.setValue(Je(e,"--host",g.host)),n.port.setValue(Pe(e,"--port",g.port)),n.threads.setValue(Pe(e,"--threads",g.threads)),n.flashAttn.setValue(Je(e,"--flash-attn",g.flashAttn)),n.fit.setValue(Je(e,"--fit",g.fit)),n.parallel.setValue(Pe(e,"--parallel",g.parallel)),n.alias.setValue(Je(e,"--alias","")),n.nPredict.setValue(Pe(e,"--n-predict",g.nPredict)),n.contextShift.setValue($n(e,"--context-shift","--no-context-shift",!1)?"on":"off"),n.contBatching.setValue($n(e,"--cont-batching","--no-cont-batching",!0)?"on":"off");let a=Un(e,"--device");n.device.setValue(a?a.split(",").map(f=>f.trim()).filter(Boolean):[]),n.tensorSplit.setValue(Je(e,"--tensor-split","")),n.model.setValue(Je(e,"--model","")),n.mmproj.setValue(Je(e,"--mmproj","")),n.nGpuLayers.setValue(Je(e,"--n-gpu-layers",g.nGpuLayers)),n.splitMode.setValue(Je(e,"--split-mode",g.splitMode)),n.mainGpu.setValue(Pe(e,"--main-gpu",g.mainGpu)),n.fitTarget.setValue(Pe(e,"--fit-target",g.fitTarget)),n.fitCtx.setValue(Pe(e,"--fit-ctx",g.fitCtx)),n.mlock.setValue(e.includes("--mlock")?"on":"off"),n.mmap.setValue($n(e,"--mmap","--no-mmap",!0)?"on":"off"),n.cpuMoe.setValue(e.includes("--cpu-moe")?"on":"off"),n.nCpuMoe.setValue(Pe(e,"--n-cpu-moe",0));let r=Pe(e,"--ctx-size",g.ctxSize),u=typeof n.parallel.value=="number"&&n.parallel.value>0?n.parallel.value:1;n.ctxSize.setValue(li(r,u)),n.batchSize.setValue(Pe(e,"--batch-size",g.batchSize)),n.ubatchSize.setValue(Pe(e,"--ubatch-size",g.ubatchSize)),n.cacheTypeK.setValue(Je(e,"--cache-type-k",g.cacheTypeK)),n.cacheTypeV.setValue(Je(e,"--cache-type-v",g.cacheTypeV)),n.kvOffload.setValue($n(e,"--kv-offload","--no-kv-offload",!0)?"on":"off"),n.cacheRam.setValue(Pe(e,"--cache-ram",g.cacheRam)),n.swaFull.setValue(e.includes("--swa-full")?"on":"off"),n.ropeScaling.setValue(Je(e,"--rope-scaling",g.ropeScaling)),n.ropeScale.setValue(St(e,"--rope-scale",g.ropeScale)),n.ropeFreqBase.setValue(St(e,"--rope-freq-base",g.ropeFreqBase)),n.ropeFreqScale.setValue(St(e,"--rope-freq-scale",g.ropeFreqScale)),n.yarnOrigCtx.setValue(Pe(e,"--yarn-orig-ctx",g.yarnOrigCtx)),n.yarnExtFactor.setValue(St(e,"--yarn-ext-factor",g.yarnExtFactor)),n.yarnAttnFactor.setValue(St(e,"--yarn-attn-factor",g.yarnAttnFactor)),n.yarnBetaSlow.setValue(St(e,"--yarn-beta-slow",g.yarnBetaSlow)),n.yarnBetaFast.setValue(St(e,"--yarn-beta-fast",g.yarnBetaFast)),n.temperature.setValue(St(e,"--temperature",g.temperature)),n.seed.setValue(Pe(e,"--seed",g.seed)),n.topK.setValue(Pe(e,"--top-k",g.topK)),n.topP.setValue(St(e,"--top-p",g.topP)),n.minP.setValue(St(e,"--min-p",g.minP)),n.typicalP.setValue(St(e,"--typical",g.typicalP)),n.repeatLastN.setValue(Pe(e,"--repeat-last-n",g.repeatLastN)),n.repeatPenalty.setValue(St(e,"--repeat-penalty",g.repeatPenalty)),n.presencePenalty.setValue(St(e,"--presence-penalty",g.presencePenalty)),n.frequencyPenalty.setValue(St(e,"--frequency-penalty",g.frequencyPenalty)),n.dryMultiplier.setValue(St(e,"--dry-multiplier",g.dryMultiplier)),n.dryBase.setValue(St(e,"--dry-base",g.dryBase)),n.mirostat.setValue(Pe(e,"--mirostat",g.mirostat)),n.dynatempRange.setValue(St(e,"--dynatemp-range",g.dynatempRange)),n.modelDraft.setValue(Je(e,"--model-draft",""));let h=Un(e,"--spec-draft-device")??Un(e,"--device-draft");if(n.specDraftDevice.setValue(h?h.split(",").map(f=>f.trim()).filter(Boolean):[]),n.specDraftNMax.setValue(Pe(e,"--spec-draft-n-max",g.specDraftNMax)),n.nGpuLayersDraft.setValue(Je(e,"--n-gpu-layers-draft",g.nGpuLayersDraft)),n.specDraftCacheTypeK.setValue(Je(e,"--cache-type-k-draft",g.specDraftCacheTypeK)),n.specDraftCacheTypeV.setValue(Je(e,"--cache-type-v-draft",g.specDraftCacheTypeV)),n.specType.setValue(Je(e,"--spec-type",g.specType)),n.specNgramModNMin.setValue(Pe(e,"--spec-ngram-mod-n-min",g.specNgramModNMin)),n.specNgramModNMax.setValue(Pe(e,"--spec-ngram-mod-n-max",g.specNgramModNMax)),n.specNgramModNMatch.setValue(Pe(e,"--spec-ngram-mod-n-match",g.specNgramModNMatch)),n.specNgramSimpleSizeN.setValue(Pe(e,"--spec-ngram-simple-size-n",g.specNgramSimpleSizeN)),n.specNgramSimpleSizeM.setValue(Pe(e,"--spec-ngram-simple-size-m",g.specNgramSimpleSizeM)),n.specNgramSimpleMinHits.setValue(Pe(e,"--spec-ngram-simple-min-hits",g.specNgramSimpleMinHits)),n.lora.setValue(Je(e,"--lora","")),n.loraScaled.setValue(Je(e,"--lora-scaled","")),n.timeout.setValue(Pe(e,"--timeout",g.timeout)),n.threadsHttp.setValue(Pe(e,"--threads-http",g.threadsHttp)),n.metrics.setValue(e.includes("--metrics")?"on":"off"),n.slots.setValue($n(e,"--slots","--no-slots",!0)?"on":"off"),n.cachePrompt.setValue($n(e,"--cache-prompt","--no-cache-prompt",!0)?"on":"off"),n.cacheReuse.setValue(Pe(e,"--cache-reuse",g.cacheReuse)),n.reasoning.setValue(Je(e,"--reasoning",g.reasoning)),n.reasoningBudget.setValue(Pe(e,"--reasoning-budget",g.reasoningBudget)),n.reasoningFormat.setValue(Je(e,"--reasoning-format",g.reasoningFormat)),n.reasoningPreserve.setValue($n(e,"--reasoning-preserve","--no-reasoning-preserve",!0)?"on":"off"),n.apiKeyFile.setValue(Je(e,"--api-key-file","")),n.extraFlags.setValue(this.extractExtraFlags(e).join(`
5584
5584
  `)),t){let f=Object.entries(t).map(([b,M])=>`${b}=${M}`).join(`
5585
5585
  `);f&&n.envText.setValue(f+`
5586
- `)}}extractExtraFlags(e){let t=[];for(let n of e){let a=n.split(/\s|=/)[0];n.startsWith("--")&&!Xy.has(a)&&t.push(n)}return t}parseEnvironment(){let e={};for(let t of this.form.controls.envText.value.split(`
5586
+ `)}}extractExtraFlags(e){let t=[];for(let n of e){let a=n.split(/\s|=/)[0];n.startsWith("--")&&!Yy.has(a)&&t.push(n)}return t}parseEnvironment(){let e={};for(let t of this.form.controls.envText.value.split(`
5587
5587
  `)){let n=t.trim();if(!n||n.startsWith("#"))continue;let a=n.indexOf("=");a<=0||(e[n.slice(0,a).trim()]=n.slice(a+1))}return e}addIf(e,t,n){String(t)!==String(n)&&this._flags.push(`${e} ${t}`)}addToggle(e,t,n,a){let r=e==="on";r!==a&&this._flags.push(r?t:n)}buildFlags(){this._flags=[];let e=this.form.controls;this.addIf("--host",e.host.value,g.host),this.addIf("--port",e.port.value,g.port),this.addIf("--threads",e.threads.value,g.threads),this.addIf("--flash-attn",e.flashAttn.value,g.flashAttn),this.addIf("--fit",e.fit.value,g.fit),this.addIf("--parallel",e.parallel.value,g.parallel),this.addIf("--alias",e.alias.value,g.alias),this.addIf("--n-predict",e.nPredict.value,g.nPredict),this.addToggle(e.contextShift.value,"--context-shift","--no-context-shift",!1),this.addToggle(e.contBatching.value,"--cont-batching","--no-cont-batching",!0);let t=e.device.value;t&&t.length>0&&this._flags.push(`--device ${t.join(",")}`),e.splitMode.value!=="none"&&this.addIf("--tensor-split",e.tensorSplit.value,g.tensorSplit),this.addIf("--model",e.model.value,g.model),this.addIf("--mmproj",e.mmproj.value,g.mmproj),this.addIf("--n-gpu-layers",e.nGpuLayers.value,g.nGpuLayers),this.addIf("--split-mode",e.splitMode.value,g.splitMode),this.addIf("--main-gpu",e.mainGpu.value,g.mainGpu),e.fit.value==="on"&&(this.addIf("--fit-target",e.fitTarget.value,g.fitTarget),this.addIf("--fit-ctx",e.fitCtx.value,g.fitCtx)),e.mlock.value==="on"&&this._flags.push("--mlock"),this.addToggle(e.mmap.value,"--mmap","--no-mmap",!0),e.cpuMoe.value==="on"&&this._flags.push("--cpu-moe"),e.cpuMoe.value!=="on"&&this.addIf("--n-cpu-moe",e.nCpuMoe.value,g.nCpuMoe),this.addIf("--ctx-size",+yi(e.ctxSize.value??""),g.ctxSize),this.addIf("--batch-size",e.batchSize.value,g.batchSize),this.addIf("--ubatch-size",e.ubatchSize.value,g.ubatchSize),this.addIf("--cache-type-k",e.cacheTypeK.value,g.cacheTypeK),this.addIf("--cache-type-v",e.cacheTypeV.value,g.cacheTypeV),this.addToggle(e.kvOffload.value,"--kv-offload","--no-kv-offload",!0),this.addIf("--cache-ram",e.cacheRam.value,g.cacheRam),e.swaFull.value==="on"&&this._flags.push("--swa-full");let n=e.ropeScaling.value;n&&n!==g.ropeScaling&&(this._flags.push(`--rope-scaling ${n}`),this.addIf("--rope-scale",e.ropeScale.value,g.ropeScale),this.addIf("--rope-freq-base",e.ropeFreqBase.value,g.ropeFreqBase),this.addIf("--rope-freq-scale",e.ropeFreqScale.value,g.ropeFreqScale),n==="yarn"&&(this.addIf("--yarn-orig-ctx",e.yarnOrigCtx.value,g.yarnOrigCtx),this.addIf("--yarn-ext-factor",e.yarnExtFactor.value,g.yarnExtFactor),this.addIf("--yarn-attn-factor",e.yarnAttnFactor.value,g.yarnAttnFactor),this.addIf("--yarn-beta-slow",e.yarnBetaSlow.value,g.yarnBetaSlow),this.addIf("--yarn-beta-fast",e.yarnBetaFast.value,g.yarnBetaFast))),this.addIf("--temperature",e.temperature.value,g.temperature),this.addIf("--seed",e.seed.value,g.seed),this.addIf("--top-k",e.topK.value,g.topK),this.addIf("--top-p",e.topP.value,g.topP),this.addIf("--min-p",e.minP.value,g.minP),this.addIf("--typical",e.typicalP.value,g.typicalP),this.addIf("--repeat-last-n",e.repeatLastN.value,g.repeatLastN),this.addIf("--repeat-penalty",e.repeatPenalty.value,g.repeatPenalty),this.addIf("--presence-penalty",e.presencePenalty.value,g.presencePenalty),this.addIf("--frequency-penalty",e.frequencyPenalty.value,g.frequencyPenalty),this.addIf("--dry-multiplier",e.dryMultiplier.value,g.dryMultiplier),this.addIf("--dry-base",e.dryBase.value,g.dryBase),this.addIf("--mirostat",e.mirostat.value,g.mirostat),this.addIf("--dynatemp-range",e.dynatempRange.value,g.dynatempRange);let a=e.specType.value;if(this.addIf("--spec-type",a,g.specType),a?.includes("draft")){this.addIf("--spec-draft-n-max",e.specDraftNMax.value,g.specDraftNMax),this.addIf("--model-draft",e.modelDraft.value,g.modelDraft);let u=e.specDraftDevice.value;u&&u.length>0&&this._flags.push(`--spec-draft-device ${u.join(",")}`),this.addIf("--n-gpu-layers-draft",e.nGpuLayersDraft.value,g.nGpuLayersDraft),this.addIf("--cache-type-k-draft",e.specDraftCacheTypeK.value,g.specDraftCacheTypeK),this.addIf("--cache-type-v-draft",e.specDraftCacheTypeV.value,g.specDraftCacheTypeV)}a?.includes("ngram")&&(this.addIf("--spec-ngram-mod-n-min",e.specNgramModNMin.value,g.specNgramModNMin),this.addIf("--spec-ngram-mod-n-max",e.specNgramModNMax.value,g.specNgramModNMax),this.addIf("--spec-ngram-mod-n-match",e.specNgramModNMatch.value,g.specNgramModNMatch),this.addIf("--spec-ngram-simple-size-n",e.specNgramSimpleSizeN.value,g.specNgramSimpleSizeN),this.addIf("--spec-ngram-simple-size-m",e.specNgramSimpleSizeM.value,g.specNgramSimpleSizeM),this.addIf("--spec-ngram-simple-min-hits",e.specNgramSimpleMinHits.value,g.specNgramSimpleMinHits)),this.addIf("--lora",e.lora.value,g.lora),this.addIf("--lora-scaled",e.loraScaled.value,g.loraScaled),this.addIf("--timeout",e.timeout.value,g.timeout),this.addIf("--threads-http",e.threadsHttp.value,g.threadsHttp),e.metrics.value==="on"&&this._flags.push("--metrics"),this.addToggle(e.slots.value,"--slots","--no-slots",!0),this.addToggle(e.cachePrompt.value,"--cache-prompt","--no-cache-prompt",!0),e.cachePrompt.value==="on"&&this.addIf("--cache-reuse",e.cacheReuse.value,g.cacheReuse),this.addIf("--reasoning",e.reasoning.value,g.reasoning),this.addIf("--reasoning-budget",e.reasoningBudget.value,g.reasoningBudget),this.addIf("--reasoning-format",e.reasoningFormat.value,g.reasoningFormat),e.reasoningPreserve.value==="off"&&this._flags.push("--no-reasoning-preserve"),this.addIf("--api-key-file",e.apiKeyFile.value,g.apiKeyFile);for(let u of e.extraFlags.value.split(`
5588
5588
  `)){let h=u.trim();h&&h.startsWith("--")&&this._flags.push(h)}let r=this._flags;return this._flags=null,r}save(){if(this.form.invalid)return;let e=this.parseEnvironment(),t=V({name:this.form.controls.name.value.trim(),type:"llama-server",command:this.form.controls.command.value.trim(),flags:this.buildFlags()},Object.keys(e).length?{environment:e}:{}),n=(this.form.controls.user.value??"").trim(),a=(this.form.controls.group.value??"").trim(),r=this.form.controls.restart.value;n&&(t.user=n),a&&(t.group=a),r&&r!=="no"&&(t.restart=r),this.data.config?.workingDirectory&&(t.workingDirectory=this.data.config.workingDirectory),this.data.config?.stopCommand&&(t.stopCommand=this.data.config.stopCommand),this.dialogRef.close(t)}cancel(){this.dialogRef.close()}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=R({type:i,selectors:[["app-llama-server-dialog"]],decls:493,vars:174,consts:[["commandAuto","matAutocomplete"],["ctxSizeAuto","matAutocomplete"],["hostAuto","matAutocomplete"],["mat-dialog-title",""],[1,"llama-form",3,"formGroup"],["appearance","outline",1,"full-width"],["matInput","","formControlName","name","placeholder","e.g. llama-qwen3_6-27b-q8"],["matInput","","formControlName","command","placeholder","/path/to/llama-server",3,"matAutocomplete"],[3,"value"],["expanded",""],["formControlName","model","label","Model Path","placeholder","/path/to/model.gguf",3,"existingPaths","fieldClass"],["formControlName","mmproj","label","MMProj Path","placeholder","/path/to/mmproj.gguf (optional)",3,"existingPaths","fieldClass"],["matInput","","formControlName","alias","type","text","matTooltip","Set model name aliases (comma-separated). Used by API for model identification"],[1,"form-row"],["appearance","outline",1,"form-col-40"],["matInput","","formControlName","nGpuLayers","type","number","matTooltip","Max number of layers to store in VRAM. 999 = all layers. Can use 'auto' or 'all'"],["appearance","outline",1,"form-col-60"],["formControlName","device","multiple","","placeholder","Select GPU devices","matTooltip","Comma-separated list of devices for offloading. Use --list-devices to see available"],["appearance","outline",1,"form-col"],["formControlName","splitMode","matTooltip","How to split model across multiple GPUs. layer=pipelined, row=parallelized, tensor=experimental"],["value","layer"],["value","row"],["value","tensor"],["value","none"],["matInput","","formControlName","tensorSplit","placeholder","10,10,10","matTooltip","Fraction of model to offload to each GPU (comma-separated proportions, e.g. 3,1)"],["matInput","","formControlName","mainGpu","type","number","matTooltip","GPU index for model (with split-mode=none) or for intermediate results and KV (with split-mode=row)"],[1,"subsection-label"],["formControlName","fit","matTooltip","Adjust unset arguments to fit in device memory. Helps prevent OOM errors"],["value","on"],["value","off"],["matInput","","formControlName","fitTarget","type","number","matTooltip","Target margin per device in MiB for --fit option. Default: 1024"],["matInput","","formControlName","fitCtx","type","number","matTooltip","Minimum context size that can be set by --fit option. Default: 4096"],["formControlName","mlock","matTooltip","Force system to keep model in RAM rather than swapping or compressing"],["formControlName","mmap","matTooltip","Memory-map model. If disabled: slower load but may reduce pageouts if not using mlock"],["formControlName","cpuMoe","matTooltip","Keep all Mixture of Experts (MoE) weights in CPU memory"],["matInput","","formControlName","nCpuMoe","type","number","matTooltip","Keep MoE weights of first N layers in CPU. 0 = disabled"],["matInput","","formControlName","ctxSize","type","text","placeholder","e.g. 8K, 3x16K, 20000","matTooltip","Context size. Supports: 20000, 20K, 3x20K. 0 = from model metadata",3,"blur","keyup.enter","matAutocomplete"],["matInput","","formControlName","batchSize","type","number","matTooltip","Logical maximum batch size for processing. Default: 2048"],["matInput","","formControlName","ubatchSize","type","number","matTooltip","Physical maximum batch size. Default: 512"],["formControlName","cacheTypeK","matTooltip","KV cache data type for K. Options: f32, f16, bf16, q8_0, q4_0, q4_1, iq4_nl, q5_0, q5_1"],["formControlName","cacheTypeV","matTooltip","KV cache data type for V. Options: f32, f16, bf16, q8_0, q4_0, q4_1, iq4_nl, q5_0, q5_1"],["formControlName","kvOffload","matTooltip","Enable KV cache offloading to GPU. Reduces CPU memory usage"],["matInput","","formControlName","cacheRam","type","number","matTooltip","Maximum prompt cache size in MiB. -1 = no limit, 0 = disable. Default: 8192"],["formControlName","swaFull","matTooltip","Use full-size SWA (Sliding Window Attention) cache instead of compressed"],["formControlName","ropeScaling","matTooltip","RoPE frequency scaling method. linear or yarn for extended context"],["value","linear"],["value","yarn"],["matInput","","formControlName","ropeScale","type","number","matTooltip","RoPE context scaling factor. Expands context by factor of N"],["matInput","","formControlName","ropeFreqBase","type","number","matTooltip","RoPE base frequency for NTK-aware scaling. 0 = loaded from model"],["matInput","","formControlName","ropeFreqScale","type","number","matTooltip","RoPE frequency scaling factor. Expands context by factor of 1/N. 0 = from model"],["matInput","","formControlName","threads","type","number","matTooltip","Number of CPU threads to use during generation. -1 = auto-detect"],["matInput","","formControlName","parallel","type","number","matTooltip","Number of server slots for parallel requests. -1 = auto"],["matInput","","formControlName","nPredict","type","number","matTooltip","Maximum number of tokens to predict. -1 = infinity (unlimited generation)"],["formControlName","flashAttn","matTooltip","Enable Flash Attention for faster inference with lower VRAM usage"],["value","auto"],["formControlName","contBatching","matTooltip","Enable continuous (dynamic) batching for better throughput with multiple requests"],["formControlName","contextShift","matTooltip","Enable context shift on infinite text generation. Shifts context window when full"],["matInput","","formControlName","temperature","type","number","matTooltip","Temperature for sampling. Higher = more random, lower = more deterministic. Default: 0.8"],["matInput","","formControlName","seed","type","number","matTooltip","RNG seed for reproducibility. -1 = random seed"],["matInput","","formControlName","topK","type","number","matTooltip","Top-K sampling: limit to K most likely tokens. 0 = disabled. Default: 40"],["matInput","","formControlName","topP","type","number","matTooltip","Top-P (nucleus) sampling: cumulative probability threshold. 1.0 = disabled. Default: 0.95"],["matInput","","formControlName","minP","type","number","matTooltip","Min-P sampling: minimum probability threshold. 0.0 = disabled. Default: 0.05"],["matInput","","formControlName","typicalP","type","number","matTooltip","Locally typical sampling parameter p. 1.0 = disabled"],["formControlName","mirostat","matTooltip","Mirostat sampling mode. 0=disabled, 1=Mirostat, 2=Mirostat 2.0. Top-K/Nucleus ignored when enabled"],["matInput","","formControlName","dynatempRange","type","number","matTooltip","Dynamic temperature range. 0.0 = disabled"],["matInput","","formControlName","repeatLastN","type","number","matTooltip","Last N tokens to consider for penalty. 0 = disabled, -1 = ctx_size. Default: 64"],["matInput","","formControlName","repeatPenalty","type","number","matTooltip","Penalize repeat sequence of tokens. 1.0 = disabled"],["matInput","","formControlName","presencePenalty","type","number","matTooltip","Alpha presence penalty: penalize tokens that appeared. 0.0 = disabled"],["matInput","","formControlName","frequencyPenalty","type","number","matTooltip","Alpha frequency penalty: penalize by token frequency. 0.0 = disabled"],["matInput","","formControlName","dryMultiplier","type","number","matTooltip","DRY sampling multiplier: prevents repetition by penalizing recent tokens. 0.0 = disabled"],["matInput","","formControlName","dryBase","type","number","matTooltip","DRY sampling base value. Default: 1.75"],["appearance","outline","subscriptSizing","dynamic",1,"full-width"],["formControlName","specType","matTooltip","Type of speculative decoding. draft-* uses draft model, ngram-* uses n-gram lookup; draft-mtp,ngram-mod runs both (recent llama.cpp builds)"],["value","draft-simple"],["value","draft-eagle3"],["value","draft-mtp"],["value","ngram-simple"],["value","ngram-mod"],["value","draft-mtp,ngram-mod"],["formControlName","lora","label","LoRA Adapter Path","placeholder","/path/to/lora.gguf (comma-separated for multiple)",3,"existingPaths","fieldClass"],["matInput","","formControlName","loraScaled","type","text","matTooltip","LoRA adapter with user-defined scaling. Format: path:scale,... (e.g. lora.gguf:0.5)"],["matInput","","formControlName","host","type","text","matTooltip","IP address to listen (default: 127.0.0.1). Can bind to UNIX socket if ends with .sock",3,"matAutocomplete"],["matInput","","formControlName","port","type","number","matTooltip","Port to listen (default: 8080). Ignored when host is a UNIX socket"],["matInput","","formControlName","timeout","type","number","matTooltip","Server read/write timeout in seconds. Default: 3600"],["matInput","","formControlName","threadsHttp","type","number","matTooltip","Number of threads for HTTP requests. -1 = auto"],["formControlName","apiKeyFile","label","API Key File","placeholder","/path/to/keys.ini",3,"existingPaths","fieldClass"],["formControlName","metrics","matTooltip","Enable Prometheus-compatible metrics endpoint at /metrics"],["formControlName","slots","matTooltip","Expose slots monitoring endpoint at /slots"],["formControlName","cachePrompt","matTooltip","Enable prompt caching to speed up repeated prompts"],["matInput","","formControlName","cacheReuse","type","number","matTooltip","Min chunk size to attempt reusing from cache via KV shifting. Requires prompt caching"],["formControlName","reasoning","matTooltip","Use reasoning/thinking in chat. auto = detect from template"],["matInput","","formControlName","reasoningBudget","type","number","matTooltip","Token budget for thinking. -1 = unlimited, 0 = immediate end, N>0 = token limit"],["formControlName","reasoningFormat","matTooltip","Format for reasoning output. none=raw, deepseek=reasoning_content field, deepseek-legacy=keep think tags"],["value","deepseek"],["value","deepseek-legacy"],["formControlName","reasoningPreserve","matTooltip","Keep reasoning content in the chat history when context is shifted. off = --no-reasoning-preserve"],["matInput","","formControlName","extraFlags","rows","4","wrap","off","placeholder",`--custom-flag value
5589
5589
  --flash-attn on`,"matTooltip","Any llama-server flags not covered by the fields above (one per line). Pass-through \u2014 not validated",1,"flags-textarea"],["matInput","","formControlName","envText","rows","4","wrap","off","placeholder",`HF_HOME=/data/huggingface
5590
- HSA_OVERRIDE_GFX_VERSION=11.0.0`,"matTooltip","Environment variables for the service process (KEY=VALUE, one per line)",1,"env-textarea"],["matInput","","formControlName","user","placeholder","llama",3,"matTooltip"],["matInput","","formControlName","group","placeholder","ai",3,"matTooltip"],["formControlName","restart"],["align","end"],["mat-stroked-button","",3,"click"],["mat-raised-button","","color","primary",3,"click","disabled"],[1,"auto-path"],[1,"auto-from"],["matInput","","formControlName","yarnOrigCtx","type","number","matTooltip","YaRN: original context size of model. 0 = model training context size"],["matInput","","formControlName","yarnExtFactor","type","number","matTooltip","YaRN: extrapolation mix factor. -1 = default, 0.0 = full interpolation"],["matInput","","formControlName","yarnAttnFactor","type","number","matTooltip","YaRN: scale sqrt(t) or attention magnitude. -1 = default"],["matInput","","formControlName","yarnBetaSlow","type","number","matTooltip","YaRN: high correction dim (alpha). -1 = default"],["matInput","","formControlName","yarnBetaFast","type","number","matTooltip","YaRN: low correction dim (beta). -1 = default"],["formControlName","modelDraft","label","Draft Model Path","placeholder","/path/to/draft-model.gguf",3,"existingPaths","fieldClass"],["formControlName","specDraftDevice","multiple","","placeholder","Select GPU devices for draft model","matTooltip","Devices for offloading the draft model. Same options as main --device"],["matInput","","formControlName","specDraftNMax","type","number","matTooltip","Max number of tokens to draft for speculative decoding. Default: 3"],["matInput","","formControlName","nGpuLayersDraft","type","number","matTooltip","Max draft model layers to store in VRAM. 999 = all layers"],["formControlName","specDraftCacheTypeK","matTooltip","KV cache data type for K for the draft model"],["formControlName","specDraftCacheTypeV","matTooltip","KV cache data type for V for the draft model"],["matInput","","formControlName","specNgramModNMin","type","number","matTooltip","Min number of ngram tokens for ngram-mod speculative decoding. Default: 48"],["matInput","","formControlName","specNgramModNMax","type","number","matTooltip","Max number of ngram tokens for ngram-mod speculative decoding. Default: 64"],["matInput","","formControlName","specNgramModNMatch","type","number","matTooltip","Ngram-mod lookup length. Default: 24"],["matInput","","formControlName","specNgramSimpleSizeN","type","number","matTooltip","Ngram size N for ngram-simple: length of lookup n-gram. Default: 12"],["matInput","","formControlName","specNgramSimpleSizeM","type","number","matTooltip","Ngram size M for ngram-simple: length of draft m-gram. Default: 48"],["matInput","","formControlName","specNgramSimpleMinHits","type","number","matTooltip","Minimum hits for ngram-simple speculative decoding. Default: 1"]],template:function(t,n){if(t&1&&(s(0,"h2",3),d(1),l(),s(2,"mat-dialog-content")(3,"form",4)(4,"mat-form-field",5),_(5,"input",6),y(),s(6,"mat-label"),d(7,"Service Name"),l(),w(8,Ey,2,0,"mat-error")(9,Ty,2,0,"mat-error")(10,Ay,2,0,"mat-error"),l(),s(11,"mat-form-field",5),_(12,"input",7),y(),s(13,"mat-label"),d(14,"Binary Path"),l(),w(15,Iy,2,0,"mat-error"),l(),s(16,"mat-autocomplete",null,0),ee(18,Ry,5,3,"mat-option",8,ky),l(),s(20,"mat-expansion-panel",9)(21,"mat-expansion-panel-header")(22,"mat-panel-title"),d(23,"Model"),l()(),_(24,"app-file-autocomplete",10),y(),_(25,"app-file-autocomplete",11),y(),s(26,"mat-form-field",5),_(27,"input",12),y(),s(28,"mat-label"),d(29,"Model Alias"),l()()(),s(30,"mat-expansion-panel",9)(31,"mat-expansion-panel-header")(32,"mat-panel-title"),d(33,"GPU & Memory"),l()(),s(34,"div",13)(35,"mat-form-field",14),_(36,"input",15),y(),s(37,"mat-label"),d(38,"GPU Layers"),l()(),s(39,"mat-form-field",16)(40,"mat-select",17),ee(41,Py,2,2,"mat-option",8,td),l(),y(),s(43,"mat-label"),d(44,"Device (multi-select)"),l()()(),s(45,"div",13)(46,"mat-form-field",18)(47,"mat-select",19)(48,"mat-option",20),d(49,"layer (pipelined)"),l(),s(50,"mat-option",21),d(51,"row (parallelized)"),l(),s(52,"mat-option",22),d(53,"tensor (experimental)"),l(),s(54,"mat-option",23),d(55,"none (single GPU)"),l()(),y(),s(56,"mat-label"),d(57,"Split Mode"),l()(),s(58,"mat-form-field",18),_(59,"input",24),y(),s(60,"mat-label"),d(61,"Tensor Split"),l()(),s(62,"mat-form-field",18),_(63,"input",25),y(),s(64,"mat-label"),d(65,"Main GPU"),l()()(),s(66,"div",26),d(67,"Memory"),l(),s(68,"div",13)(69,"mat-form-field",18)(70,"mat-select",27)(71,"mat-option",28),d(72,"on"),l(),s(73,"mat-option",29),d(74,"off"),l()(),y(),s(75,"mat-label"),d(76,"Fit to VRAM"),l()(),s(77,"mat-form-field",18),_(78,"input",30),y(),s(79,"mat-label"),d(80,"Fit Target (MiB)"),l()(),s(81,"mat-form-field",18),_(82,"input",31),y(),s(83,"mat-label"),d(84,"Fit Min Ctx"),l()()(),s(85,"div",13)(86,"mat-form-field",18)(87,"mat-select",32)(88,"mat-option",28),d(89,"on"),l(),s(90,"mat-option",29),d(91,"off"),l()(),y(),s(92,"mat-label"),d(93,"mlock (pin RAM)"),l()(),s(94,"mat-form-field",18)(95,"mat-select",33)(96,"mat-option",28),d(97,"on"),l(),s(98,"mat-option",29),d(99,"off"),l()(),y(),s(100,"mat-label"),d(101,"mmap"),l()(),s(102,"mat-form-field",18)(103,"mat-select",34)(104,"mat-option",28),d(105,"on"),l(),s(106,"mat-option",29),d(107,"off"),l()(),y(),s(108,"mat-label"),d(109,"CPU MoE"),l()(),s(110,"mat-form-field",18),_(111,"input",35),y(),s(112,"mat-label"),d(113,"N CPU MoE Layers"),l()()()(),s(114,"mat-expansion-panel")(115,"mat-expansion-panel-header")(116,"mat-panel-title"),d(117,"Context & KV Cache"),l()(),s(118,"div",13)(119,"mat-form-field",18)(120,"input",36),S("blur",function(r){return n.onCtxSizeInput(r)})("keyup.enter",function(r){return n.onCtxSizeInput(r)}),l(),y(),s(121,"mat-label"),d(122,"Context Size"),l()(),s(123,"mat-autocomplete",null,1),ee(125,Oy,2,2,"mat-option",8,My),l(),s(127,"mat-form-field",18),_(128,"input",37),y(),s(129,"mat-label"),d(130,"Batch Size"),l()(),s(131,"mat-form-field",18),_(132,"input",38),y(),s(133,"mat-label"),d(134,"Ubatch Size"),l()()(),s(135,"div",13)(136,"mat-form-field",18)(137,"mat-select",39),ee(138,Fy,2,2,"mat-option",8,Ye),l(),y(),s(140,"mat-label"),d(141,"KV Cache Type K"),l()(),s(142,"mat-form-field",18)(143,"mat-select",40),ee(144,Ny,2,2,"mat-option",8,Ye),l(),y(),s(146,"mat-label"),d(147,"KV Cache Type V"),l()(),s(148,"mat-form-field",18)(149,"mat-select",41)(150,"mat-option",28),d(151,"on"),l(),s(152,"mat-option",29),d(153,"off"),l()(),y(),s(154,"mat-label"),d(155,"KV Offload"),l()()(),s(156,"div",13)(157,"mat-form-field",18),_(158,"input",42),y(),s(159,"mat-label"),d(160,"Cache RAM (MiB)"),l()(),s(161,"mat-form-field",18)(162,"mat-select",43)(163,"mat-option",28),d(164,"on"),l(),s(165,"mat-option",29),d(166,"off"),l()(),y(),s(167,"mat-label"),d(168,"Full SWA Cache"),l()()()(),s(169,"mat-expansion-panel")(170,"mat-expansion-panel-header")(171,"mat-panel-title"),d(172,"RoPE Scaling"),l()(),s(173,"div",13)(174,"mat-form-field",18)(175,"mat-select",44)(176,"mat-option",23),d(177,"none"),l(),s(178,"mat-option",45),d(179,"linear"),l(),s(180,"mat-option",46),d(181,"yarn"),l()(),y(),s(182,"mat-label"),d(183,"Scaling Method"),l()(),s(184,"mat-form-field",18),_(185,"input",47),y(),s(186,"mat-label"),d(187,"Scale Factor"),l()(),s(188,"mat-form-field",18),_(189,"input",48),y(),s(190,"mat-label"),d(191,"Freq Base"),l()(),s(192,"mat-form-field",18),_(193,"input",49),y(),s(194,"mat-label"),d(195,"Freq Scale"),l()()(),w(196,Ly,23,10),l(),s(197,"mat-expansion-panel")(198,"mat-expansion-panel-header")(199,"mat-panel-title"),d(200,"Generation"),l(),s(201,"mat-panel-description"),d(202,"Runtime and batching defaults"),l()(),s(203,"div",13)(204,"mat-form-field",18),_(205,"input",50),y(),s(206,"mat-label"),d(207,"Threads"),l()(),s(208,"mat-form-field",18),_(209,"input",51),y(),s(210,"mat-label"),d(211,"Parallel Slots"),l()(),s(212,"mat-form-field",18),_(213,"input",52),y(),s(214,"mat-label"),d(215,"Max Tokens (n-predict)"),l()()(),s(216,"div",13)(217,"mat-form-field",18)(218,"mat-select",53)(219,"mat-option",28),d(220,"on"),l(),s(221,"mat-option",29),d(222,"off"),l(),s(223,"mat-option",54),d(224,"auto"),l()(),y(),s(225,"mat-label"),d(226,"Flash Attention"),l()(),s(227,"mat-form-field",18)(228,"mat-select",55)(229,"mat-option",28),d(230,"on"),l(),s(231,"mat-option",29),d(232,"off"),l()(),y(),s(233,"mat-label"),d(234,"Cont. Batching"),l()(),s(235,"mat-form-field",18)(236,"mat-select",56)(237,"mat-option",28),d(238,"on"),l(),s(239,"mat-option",29),d(240,"off"),l()(),y(),s(241,"mat-label"),d(242,"Context Shift"),l()()()(),s(243,"mat-expansion-panel")(244,"mat-expansion-panel-header")(245,"mat-panel-title"),d(246,"Sampling Defaults"),l(),s(247,"mat-panel-description"),d(248,"Default sampling parameters for generation"),l()(),s(249,"div",26),d(250,"Core"),l(),s(251,"div",13)(252,"mat-form-field",18),_(253,"input",57),y(),s(254,"mat-label"),d(255,"Temperature"),l()(),s(256,"mat-form-field",18),_(257,"input",58),y(),s(258,"mat-label"),d(259,"Seed"),l()(),s(260,"mat-form-field",18),_(261,"input",59),y(),s(262,"mat-label"),d(263,"Top-K"),l()(),s(264,"mat-form-field",18),_(265,"input",60),y(),s(266,"mat-label"),d(267,"Top-P"),l()()(),s(268,"div",13)(269,"mat-form-field",18),_(270,"input",61),y(),s(271,"mat-label"),d(272,"Min-P"),l()(),s(273,"mat-form-field",18),_(274,"input",62),y(),s(275,"mat-label"),d(276,"Typical-P"),l()(),s(277,"mat-form-field",18)(278,"mat-select",63)(279,"mat-option",8),d(280,"disabled"),l(),s(281,"mat-option",8),d(282,"Mirostat"),l(),s(283,"mat-option",8),d(284,"Mirostat 2.0"),l()(),y(),s(285,"mat-label"),d(286,"Mirostat"),l()(),s(287,"mat-form-field",18),_(288,"input",64),y(),s(289,"mat-label"),d(290,"Dyn. Temp Range"),l()()(),s(291,"div",26),d(292,"Penalties"),l(),s(293,"div",13)(294,"mat-form-field",18),_(295,"input",65),y(),s(296,"mat-label"),d(297,"Repeat Last N"),l()(),s(298,"mat-form-field",18),_(299,"input",66),y(),s(300,"mat-label"),d(301,"Repeat Penalty"),l()(),s(302,"mat-form-field",18),_(303,"input",67),y(),s(304,"mat-label"),d(305,"Presence Penalty"),l()(),s(306,"mat-form-field",18),_(307,"input",68),y(),s(308,"mat-label"),d(309,"Frequency Penalty"),l()()(),s(310,"div",26),d(311,"DRY Sampling"),l(),s(312,"div",13)(313,"mat-form-field",18),_(314,"input",69),y(),s(315,"mat-label"),d(316,"DRY Multiplier"),l()(),s(317,"mat-form-field",18),_(318,"input",70),y(),s(319,"mat-label"),d(320,"DRY Base"),l()()()(),s(321,"mat-expansion-panel")(322,"mat-expansion-panel-header")(323,"mat-panel-title"),d(324,"Speculative Decoding"),l(),s(325,"mat-panel-description"),d(326,"Draft model and speculative decoding options"),l()(),s(327,"mat-form-field",71)(328,"mat-select",72)(329,"mat-option",23),d(330,"none"),l(),s(331,"mat-option",73),d(332,"draft-simple"),l(),s(333,"mat-option",74),d(334,"draft-eagle3"),l(),s(335,"mat-option",75),d(336,"draft-mtp"),l(),s(337,"mat-option",76),d(338,"ngram-simple"),l(),s(339,"mat-option",77),d(340,"ngram-mod"),l(),s(341,"mat-option",78),d(342,"draft-mtp,ngram-mod"),l()(),y(),s(343,"mat-label"),d(344,"Spec Type"),l()(),w(345,jy,32,12),w(346,Hy,15,6),w(347,Uy,15,6),l(),s(348,"mat-expansion-panel")(349,"mat-expansion-panel-header")(350,"mat-panel-title"),d(351,"LoRA & Adapters"),l()(),_(352,"app-file-autocomplete",79),y(),s(353,"mat-form-field",5),_(354,"input",80),y(),s(355,"mat-label"),d(356,"LoRA Scaled"),l()()(),s(357,"mat-expansion-panel")(358,"mat-expansion-panel-header")(359,"mat-panel-title"),d(360,"Server & Network"),l()(),s(361,"div",13)(362,"mat-form-field",18),_(363,"input",81),y(),s(364,"mat-label"),d(365,"Host"),l()(),s(366,"mat-autocomplete",null,2),ee(368,$y,5,3,"mat-option",8,td),l(),s(370,"mat-form-field",18),_(371,"input",82),y(),s(372,"mat-label"),d(373,"Port"),l()(),s(374,"mat-form-field",18),_(375,"input",83),y(),s(376,"mat-label"),d(377,"Timeout (s)"),l()(),s(378,"mat-form-field",18),_(379,"input",84),y(),s(380,"mat-label"),d(381,"HTTP Threads"),l()()(),_(382,"app-file-autocomplete",85),y(),s(383,"div",13)(384,"mat-form-field",18)(385,"mat-select",86)(386,"mat-option",28),d(387,"on"),l(),s(388,"mat-option",29),d(389,"off"),l()(),y(),s(390,"mat-label"),d(391,"Prometheus Metrics"),l()(),s(392,"mat-form-field",18)(393,"mat-select",87)(394,"mat-option",28),d(395,"on"),l(),s(396,"mat-option",29),d(397,"off"),l()(),y(),s(398,"mat-label"),d(399,"Slots Endpoint"),l()(),s(400,"mat-form-field",18)(401,"mat-select",88)(402,"mat-option",28),d(403,"on"),l(),s(404,"mat-option",29),d(405,"off"),l()(),y(),s(406,"mat-label"),d(407,"Prompt Cache"),l()(),s(408,"mat-form-field",18),_(409,"input",89),y(),s(410,"mat-label"),d(411,"Cache Reuse"),l()()()(),s(412,"mat-expansion-panel")(413,"mat-expansion-panel-header")(414,"mat-panel-title"),d(415,"Reasoning"),l(),s(416,"mat-panel-description"),d(417,"Thinking/reasoning mode settings"),l()(),s(418,"div",13)(419,"mat-form-field",18)(420,"mat-select",90)(421,"mat-option",28),d(422,"on"),l(),s(423,"mat-option",29),d(424,"off"),l(),s(425,"mat-option",54),d(426,"auto"),l()(),y(),s(427,"mat-label"),d(428,"Reasoning"),l()(),s(429,"mat-form-field",18),_(430,"input",91),y(),s(431,"mat-label"),d(432,"Reasoning Budget"),l()(),s(433,"mat-form-field",18)(434,"mat-select",92)(435,"mat-option",54),d(436,"auto"),l(),s(437,"mat-option",23),d(438,"none (raw)"),l(),s(439,"mat-option",93),d(440,"deepseek"),l(),s(441,"mat-option",94),d(442,"deepseek-legacy"),l()(),y(),s(443,"mat-label"),d(444,"Reasoning Format"),l()(),s(445,"mat-form-field",18)(446,"mat-select",95)(447,"mat-option",28),d(448,"on"),l(),s(449,"mat-option",29),d(450,"off"),l()(),y(),s(451,"mat-label"),d(452,"Reasoning Preserve"),l()()()(),s(453,"mat-expansion-panel")(454,"mat-expansion-panel-header")(455,"mat-panel-title"),d(456,"Additional"),l(),s(457,"mat-panel-description"),d(458,"Extra CLI flags and environment variables"),l()(),s(459,"mat-form-field",5),_(460,"textarea",96),y(),s(461,"mat-label"),d(462,"Extra CLI Flags (one per line)"),l()(),s(463,"mat-form-field",5),_(464,"textarea",97),y(),s(465,"mat-label"),d(466,"Environment variables (KEY=VALUE, one per line)"),l()()(),s(467,"mat-expansion-panel")(468,"mat-expansion-panel-header")(469,"mat-panel-title"),d(470,"Service unit"),l(),s(471,"mat-panel-description"),d(472,"systemd User / Group / Restart policy"),l()(),s(473,"div",13)(474,"mat-form-field",18),_(475,"input",98),y(),s(476,"mat-label"),d(477,"Run as user"),l()(),s(478,"mat-form-field",18),_(479,"input",99),y(),s(480,"mat-label"),d(481,"Run as group"),l()(),s(482,"mat-form-field",18)(483,"mat-select",100),ee(484,Gy,2,2,"mat-option",8,Ye),l(),y(),s(486,"mat-label"),d(487,"Restart policy"),l()()()()()(),s(488,"mat-dialog-actions",101)(489,"button",102),S("click",function(){return n.cancel()}),d(490,"Cancel"),l(),s(491,"button",103),S("click",function(){return n.save()}),d(492),l()()),t&2){let a=Se(17),r=Se(124),u=Se(367);c(),Q("",n.isClone?"Clone":n.isEdit?"Edit":"Add"," llama-server service"),c(2),x("formGroup",n.form),c(),p("changed",n.isControlChanged("name")),c(),C(),c(3),D(n.form.controls.name.errors?.required?8:n.form.controls.name.errors?.pattern?9:n.form.controls.name.errors?.nameTaken?10:-1),c(3),p("changed",n.isControlChanged("command")),c(),x("matAutocomplete",a),C(),c(3),D(n.form.controls.command.errors?.required?15:-1),c(3),te(n.filteredCommands()),c(2),p("has-changed",n.isSectionChanged("model","mmproj","alias")),c(4),x("existingPaths",n.existingModelPaths())("fieldClass",n.isControlChanged("model")?"changed":""),C(),c(),x("existingPaths",n.existingMmprojPaths())("fieldClass",n.isControlChanged("mmproj")?"changed":""),C(),c(),p("changed",n.isControlChanged("alias")),c(),C(),c(3),p("has-changed",n.isSectionChanged("nGpuLayers","device","tensorSplit","splitMode","mainGpu","fit","fitTarget","fitCtx","mlock","mmap","cpuMoe","nCpuMoe")),c(5),p("changed",n.isControlChanged("nGpuLayers")),c(),C(),c(3),p("changed",n.isControlChanged("device")),c(),C(),c(),te(n.availableDevices()),c(5),p("changed",n.isControlChanged("splitMode")),c(),C(),c(11),p("changed",n.isControlChanged("tensorSplit")&&!n.isTensorSplitDisabled()),c(),C(),c(3),p("changed",n.isControlChanged("mainGpu")),c(),C(),c(6),p("changed",n.isControlChanged("fit")),c(),C(),c(7),p("changed",n.isControlChanged("fitTarget")&&!n.isFitTargetDisabled()),c(),C(),c(3),p("changed",n.isControlChanged("fitCtx")&&!n.isFitTargetDisabled()),c(),C(),c(4),p("changed",n.isControlChanged("mlock")),c(),C(),c(7),p("changed",n.isControlChanged("mmap")),c(),C(),c(7),p("changed",n.isControlChanged("cpuMoe")),c(),C(),c(7),p("changed",n.isControlChanged("nCpuMoe")&&!n.isCpuMoeLayersDisabled()),c(),C(),c(3),p("has-changed",n.isSectionChanged("ctxSize","batchSize","ubatchSize","cacheTypeK","cacheTypeV","kvOffload","cacheRam","swaFull")),c(5),p("changed",n.isControlChanged("ctxSize")),c(),x("matAutocomplete",r),C(),c(5),te(n.ctxPresets()),c(2),p("changed",n.isControlChanged("batchSize")),c(),C(),c(3),p("changed",n.isControlChanged("ubatchSize")),c(),C(),c(4),p("changed",n.isControlChanged("cacheTypeK")),c(),C(),c(),te(n.kvCacheTypes),c(4),p("changed",n.isControlChanged("cacheTypeV")),c(),C(),c(),te(n.kvCacheTypes),c(4),p("changed",n.isControlChanged("kvOffload")),c(),C(),c(8),p("changed",n.isControlChanged("cacheRam")),c(),C(),c(3),p("changed",n.isControlChanged("swaFull")),c(),C(),c(7),p("has-changed",n.isSectionChanged("ropeScaling","ropeScale","ropeFreqBase","ropeFreqScale","yarnOrigCtx","yarnExtFactor","yarnAttnFactor","yarnBetaSlow","yarnBetaFast")),c(5),p("changed",n.isControlChanged("ropeScaling")),c(),C(),c(9),p("changed",n.isControlChanged("ropeScale")&&!n.isRopeParamsDisabled()),c(),C(),c(3),p("changed",n.isControlChanged("ropeFreqBase")&&!n.isRopeParamsDisabled()),c(),C(),c(3),p("changed",n.isControlChanged("ropeFreqScale")&&!n.isRopeParamsDisabled()),c(),C(),c(3),D(n.showYarnParams()?196:-1),c(),p("has-changed",n.isSectionChanged("threads","parallel","flashAttn","contBatching","contextShift","nPredict")),c(7),p("changed",n.isControlChanged("threads")),c(),C(),c(3),p("changed",n.isControlChanged("parallel")),c(),C(),c(3),p("changed",n.isControlChanged("nPredict")),c(),C(),c(4),p("changed",n.isControlChanged("flashAttn")),c(),C(),c(9),p("changed",n.isControlChanged("contBatching")),c(),C(),c(7),p("changed",n.isControlChanged("contextShift")),c(),C(),c(7),p("has-changed",n.isSectionChanged("temperature","seed","topK","topP","minP","typicalP","mirostat","dynatempRange","repeatLastN","repeatPenalty","presencePenalty","frequencyPenalty","dryMultiplier","dryBase")),c(9),p("changed",n.isControlChanged("temperature")),c(),C(),c(3),p("changed",n.isControlChanged("seed")),c(),C(),c(3),p("changed",n.isControlChanged("topK")&&!n.isMirostatEnabled()),c(),C(),c(3),p("changed",n.isControlChanged("topP")&&!n.isMirostatEnabled()),c(),C(),c(4),p("changed",n.isControlChanged("minP")),c(),C(),c(3),p("changed",n.isControlChanged("typicalP")&&!n.isMirostatEnabled()),c(),C(),c(3),p("changed",n.isControlChanged("mirostat")),c(),C(),c(),x("value",0),c(2),x("value",1),c(2),x("value",2),c(4),p("changed",n.isControlChanged("dynatempRange")),c(),C(),c(6),p("changed",n.isControlChanged("repeatLastN")),c(),C(),c(3),p("changed",n.isControlChanged("repeatPenalty")),c(),C(),c(3),p("changed",n.isControlChanged("presencePenalty")),c(),C(),c(3),p("changed",n.isControlChanged("frequencyPenalty")),c(),C(),c(6),p("changed",n.isControlChanged("dryMultiplier")),c(),C(),c(3),p("changed",n.isControlChanged("dryBase")),c(),C(),c(3),p("has-changed",n.isSectionChanged("modelDraft","specDraftDevice","specDraftNMax","nGpuLayersDraft","specDraftCacheTypeK","specDraftCacheTypeV","specType","specNgramModNMin","specNgramModNMax","specNgramModNMatch","specNgramSimpleSizeN","specNgramSimpleSizeM","specNgramSimpleMinHits")),c(6),p("changed",n.isControlChanged("specType")),c(),C(),c(17),D(n.showDraftParams()?345:-1),c(),D(n.showNgramModParams()?346:-1),c(),D(n.showNgramSimpleParams()?347:-1),c(),p("has-changed",n.isSectionChanged("lora","loraScaled")),c(4),x("existingPaths",n.existingLoraPaths())("fieldClass",n.isControlChanged("lora")?"changed":""),C(),c(),p("changed",n.isControlChanged("loraScaled")),c(),C(),c(3),p("has-changed",n.isSectionChanged("host","port","timeout","threadsHttp","apiKeyFile","metrics","slots","cachePrompt","cacheReuse")),c(5),p("changed",n.isControlChanged("host")),c(),x("matAutocomplete",u),C(),c(5),te(n.filteredHosts()),c(2),p("changed",n.isControlChanged("port")&&!n.isPortDisabled()),c(),C(),c(3),p("changed",n.isControlChanged("timeout")),c(),C(),c(3),p("changed",n.isControlChanged("threadsHttp")),c(),C(),c(3),x("existingPaths",n.existingApiKeyPaths())("fieldClass",n.isControlChanged("apiKeyFile")?"changed":""),C(),c(2),p("changed",n.isControlChanged("metrics")),c(),C(),c(7),p("changed",n.isControlChanged("slots")),c(),C(),c(7),p("changed",n.isControlChanged("cachePrompt")),c(),C(),c(7),p("changed",n.isControlChanged("cacheReuse")&&!n.isCacheReuseDisabled()),c(),C(),c(3),p("has-changed",n.isSectionChanged("reasoning","reasoningBudget","reasoningFormat","reasoningPreserve")),c(7),p("changed",n.isControlChanged("reasoning")),c(),C(),c(9),p("changed",n.isControlChanged("reasoningBudget")&&!n.isReasoningParamsDisabled()),c(),C(),c(3),p("changed",n.isControlChanged("reasoningFormat")&&!n.isReasoningParamsDisabled()),c(),C(),c(11),p("changed",n.isControlChanged("reasoningPreserve")),c(),C(),c(7),p("has-changed",n.isSectionChanged("extraFlags","envText")),c(6),p("changed",n.isControlChanged("extraFlags")),c(),C(),c(3),p("changed",n.isControlChanged("envText")),c(),C(),c(11),x("matTooltip",n.runAs.userHint()),C(),c(4),x("matTooltip",n.runAs.groupHint()),C(),c(4),C(),c(),te(n.restartOptions),c(7),x("disabled",n.form.invalid),c(),Q(" ",n.isEdit&&!n.isClone?"Save":"Create"," ")}},dependencies:[Me,gi,An,Yt,oo,Zt,$i,Wi,Ut,Ti,Qi,Zi,Dt,Li,ze,Ue,Hn,oa,uo,ta,na,ia,Mt,ut,_t,qi,Pt,Rt,st,yt,xt,Ct,en,Ji,aa,ho,qs],styles:['@charset "UTF-8";.llama-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px;min-width:640px}.form-row[_ngcontent-%COMP%]{display:flex;gap:12px;margin-bottom:4px}.form-col[_ngcontent-%COMP%]{flex:1}.form-col-60[_ngcontent-%COMP%]{flex:3}.form-col-40[_ngcontent-%COMP%]{flex:2}.full-width[_ngcontent-%COMP%]{width:100%}.auto-path[_ngcontent-%COMP%]{font-family:monospace}.auto-from[_ngcontent-%COMP%]{margin-left:8px;opacity:.6;font-size:12px}.flags-textarea[_ngcontent-%COMP%], .env-textarea[_ngcontent-%COMP%]{overflow-x:auto}mat-dialog-content[_ngcontent-%COMP%]{padding-top:10px!important;max-height:80vh}mat-expansion-panel[_ngcontent-%COMP%]{margin-bottom:0}mat-dialog-actions[_ngcontent-%COMP%]{gap:8px}.subsection-label[_ngcontent-%COMP%]{font-size:12px;font-weight:500;color:#0009;margin:4px 0 14px;text-transform:uppercase;letter-spacing:.5px}.sub-section-hint[_ngcontent-%COMP%]{font-size:11px;color:#0006;margin-bottom:4px}mat-expansion-panel.has-changed[_ngcontent-%COMP%] mat-panel-title[_ngcontent-%COMP%]{font-weight:700}mat-form-field.changed[_ngcontent-%COMP%] .mat-mdc-form-field-infix input, mat-form-field.changed[_ngcontent-%COMP%] .mat-mdc-form-field-infix .mat-mdc-select{font-weight:700}']})}}return i})();function ra(i,o){for(let e of i){let t=e.indexOf("=");if(t>0&&e.slice(0,t)===o)return e.slice(t+1);let n=e.indexOf(" ");if(n>0&&e.slice(0,n)===o)return e.slice(n+1).trim()}for(let e=0;e<i.length;e++)if(i[e]===o&&e+1<i.length)return i[e+1];return null}function Bp(i,o){let e=[];for(let t of i){let n=t.indexOf("=");if(n>0&&t.slice(0,n)===o){e.push(t.slice(n+1));continue}let a=t.indexOf(" ");a>0&&t.slice(0,a)===o&&e.push(t.slice(a+1).trim())}for(let t=0;t<i.length;t++)i[t]===o&&t+1<i.length&&e.push(i[t+1]);return e}var Yy=(i,o)=>o.command,Zy=(i,o)=>o.pciBusId,Qy=(i,o)=>o.label,Jy=(i,o)=>o.value,eC=(i,o)=>o.path;function tC(i,o){i&1&&(s(0,"mat-error"),d(1,"Required"),l())}function iC(i,o){i&1&&(s(0,"mat-error"),d(1,"Starts with letter, alphanumeric + hyphens/underscores, max 128 chars"),l())}function nC(i,o){i&1&&(s(0,"mat-error"),d(1,"Another service already uses this name"),l())}function oC(i,o){i&1&&(s(0,"mat-error"),d(1,"Required"),l())}function aC(i,o){if(i&1&&(s(0,"mat-option",9)(1,"span",60),d(2),l(),s(3,"span",61),d(4),l()()),i&2){let e=o.$implicit;x("value",e.command),c(2),I(e.command),c(2),Q("(",e.from,")")}}function rC(i,o){i&1&&(s(0,"mat-error"),d(1,"Required"),l())}function sC(i,o){if(i&1&&(s(0,"mat-option",9)(1,"span",60),d(2),l(),s(3,"span",61),d(4,"(existing config)"),l()()),i&2){let e=o.$implicit;x("value",e),c(2),I(e)}}function lC(i,o){if(i&1&&(s(0,"mat-option",9),d(1),l()),i&2){let e=o.$implicit;x("value",e),c(),I(e)}}function cC(i,o){if(i&1&&(s(0,"mat-option",9),d(1),l()),i&2){let e=o.$implicit;x("value",e),c(),I(e)}}function dC(i,o){if(i&1&&(s(0,"mat-option",9),d(1),l()),i&2){let e=o.$implicit;x("value",e.gpuIndex),c(),I(e.gpuIndex)}}function mC(i,o){if(i&1&&(s(0,"mat-option",9),d(1),l()),i&2){let e=o.$implicit;x("value",e.label),c(),I(e.label)}}function uC(i,o){if(i&1&&(s(0,"mat-option",9),d(1),l()),i&2){let e=o.$implicit;x("value",e.value),c(),I(e.label)}}function hC(i,o){if(i&1&&(s(0,"div",62),d(1,"Draft Model"),l(),s(2,"div",13)(3,"mat-form-field",63),_(4,"input",64),y(),s(5,"mat-label"),d(6,"Draft Model"),l()(),s(7,"mat-form-field",14),_(8,"input",65),y(),s(9,"mat-label"),d(10,"Draft TP Size"),l()(),s(11,"mat-form-field",14),_(12,"input",66),y(),s(13,"mat-label"),d(14,"Num Spec Tokens"),l()()()),i&2){let e=v();c(3),p("changed",e.isControlChanged("specDraftModel")),c(),C(),c(3),p("changed",e.isControlChanged("specDraftTensorParallelSize")),c(),C(),c(3),p("changed",e.isControlChanged("specNumDraftTokens")),c(),C()}}function pC(i,o){if(i&1&&(s(0,"mat-option",9),d(1),l()),i&2){let e=o.$implicit;x("value",e),c(),I(e||"(none)")}}function fC(i,o){if(i&1&&(s(0,"mat-option",9),d(1),l()),i&2){let e=o.$implicit;x("value",e),c(),I(e||"(none)")}}function gC(i,o){if(i&1&&(s(0,"mat-option",9)(1,"span",60),d(2),l(),s(3,"span",61),d(4),l()()),i&2){let e=o.$implicit;x("value",e.path),c(2),I(e.path),c(2),Q("(",e.source,")")}}function _C(i,o){if(i&1&&(s(0,"mat-option",9),d(1),l()),i&2){let e=o.$implicit;x("value",e),c(),I(e==="no"?"no (default)":e)}}var A={host:"127.0.0.1",port:8e3,servedModelName:"",model:"",tokenizer:"",dtype:"auto",tensorParallelSize:1,pipelineParallelSize:1,maxParallelLoadingWorkers:0,gpuMemoryUtilization:.9,swapSpace:4,cpuOffloadGb:0,kvCacheMemory:0,deviceIds:[],attentionBackend:"",maxModelLen:0,maxNumSeqs:256,maxNumBatchedTokens:0,blockSize:0,enableChunkedPrefill:"auto",specMethod:"none",specTokens:0,specDraftModel:"",specDraftTensorParallelSize:0,specNumDraftTokens:0,temperature:1,topP:1,topK:-1,minP:0,seed:-1,repetitionPenalty:1,maxNumSeq:0,trustRemoteCode:!1,enableAutoToolChoice:!1,toolCallParser:"",reasoningParser:"",enablePrefixCaching:"auto",apiKey:"",extraFlags:"",envText:""};function vC(i,o){let e=A[i];return e===void 0?!1:String(o)!==String(e)}var bC="^[a-zA-Z][a-zA-Z0-9_-]{0,127}$",yC=["auto","half","bfloat16","float","float16","float32"],CC=["TRITON_ATTN","ROCM_ATTN","ROCM_SEGMENTED_ATTN","FLASH_ATTN","FLASHINFER","TRITON_MLA","FLASHMLA","FLEX_ATTENTION","TORCH_SDPA","TREE_ATTN","XFORMERS"],xC=[{value:"none",label:"none"},{value:"ngram",label:"ngram"},{value:"eagle",label:"eagle"},{value:"eagle3",label:"eagle3"},{value:"medusa",label:"medusa"},{value:"mlp_speculator",label:"mlp_speculator"},{value:"draft_model",label:"draft_model"},{value:"mtp",label:"mtp"},{value:"qwen3_5_mtp",label:"qwen3_5_mtp"},{value:"qwen3_next_mtp",label:"qwen3_next_mtp"},{value:"deepseek_mtp",label:"deepseek_mtp"}],wC=["","hermes","mistral","llama3_json","qwen3_xml","qwen25_tool_call","phi4_mini_json","pythonic","internlm","glm45","step3","minimax_m2"],DC=["","deepseek_r1","qwen3","granite","phi4_reasoning","glm45","step3","minimax_m2"],zp=(()=>{class i{constructor(){this.fb=m(Gi),this.dialogRef=m(et),this.data=m(Ni),this.serviceService=m(wt),this.gpuService=m(Go),this.cdr=m(se),this.destroyRef=m(Vt),this.system=m(Ot),this.runAs=Bn(this.system.windows),this.isEdit=this.data.config!==null,this.isClone=this.data.clone===!0,this.dtypeOptions=yC,this.attentionBackends=CC,this.specMethods=xC,this.toolCallParsers=wC,this.reasoningParsers=DC,this.allExistingCommands=P(()=>{let e=this.data.allConfigs??[],t=this.data.config?.name??null,n=new Set,a=[];for(let r of e)r.name!==t&&(n.has(r.command)||(n.add(r.command),a.push({command:r.command,from:r.name})));return a}),this._commandValue=E(this.data.config?.command??""),this.commandValue=this._commandValue.asReadonly(),this.filteredCommands=P(()=>{let e=this.commandValue()?.toLowerCase()??"";return this.allExistingCommands().filter(t=>t.command.toLowerCase().includes(e)||t.from.toLowerCase().includes(e))}),this.form=this.fb.group({name:[this.data.config?.name??"",{validators:[Qe.required,Qe.pattern(bC),jn(this.data.allConfigs??[],this.data.config?.name??null)]}],command:[this.data.config?.command??"",Qe.required],host:[A.host],port:[A.port],servedModelName:[A.servedModelName],model:[A.model],tokenizer:[A.tokenizer],dtype:[A.dtype],tensorParallelSize:[A.tensorParallelSize],pipelineParallelSize:[A.pipelineParallelSize],maxParallelLoadingWorkers:[A.maxParallelLoadingWorkers],gpuMemoryUtilization:[A.gpuMemoryUtilization],swapSpace:[A.swapSpace],cpuOffloadGb:[A.cpuOffloadGb],kvCacheMemory:[A.kvCacheMemory],deviceIds:[[]],attentionBackend:[A.attentionBackend],maxModelLen:[""],maxNumSeqs:[A.maxNumSeqs],maxNumBatchedTokens:[A.maxNumBatchedTokens],blockSize:[A.blockSize],enableChunkedPrefill:[A.enableChunkedPrefill],specMethod:[A.specMethod],specTokens:[A.specTokens],specDraftModel:[A.specDraftModel],specDraftTensorParallelSize:[A.specDraftTensorParallelSize],specNumDraftTokens:[A.specNumDraftTokens],temperature:[A.temperature],topP:[A.topP],topK:[A.topK],minP:[A.minP],seed:[A.seed],repetitionPenalty:[A.repetitionPenalty],maxNumSeq:[A.maxNumSeq],trustRemoteCode:[A.trustRemoteCode],enableAutoToolChoice:[A.enableAutoToolChoice],toolCallParser:[A.toolCallParser],reasoningParser:[A.reasoningParser],enablePrefixCaching:[A.enablePrefixCaching],apiKey:[A.apiKey],extraFlags:[A.extraFlags],envText:[A.envText],user:[this.data.config?.user??""],group:[this.data.config?.group??""],restart:[this.data.config?.restart??"no"]}),this.restartOptions=Vn,this.availableGpus=bi(this.gpuService.fetchGpus().pipe(Et(()=>ge([]))),{initialValue:[]}),this.filteredHosts=bi(this.form.controls.host.valueChanges.pipe(si(),Ee(this.form.controls.host.value),Lt(250),ci(),$e(e=>{let t=(e??"").trim();return t?this.serviceService.getLlamaAutocomplete("host",t).pipe(Et(()=>ge([]))):ge([])})),{initialValue:[]}),this.existingModelPaths=P(()=>this.extractConfigModelPaths()),this.maxLenPresets=P(()=>po.map(e=>({label:li(e,1)}))),this.formValue=bi(this.form.valueChanges,{initialValue:this.form.value}),this.specMethodValue=P(()=>this.formValue()?.specMethod),this.showSpecDraftParams=P(()=>{let e=this.specMethodValue();return e!=="none"&&e!=="ngram"}),this.isToolCallParserDisabled=P(()=>!this.formValue()?.enableAutoToolChoice),this.lockedFields=zn(this.form,()=>({group:this.runAs.isGroupDisabled(),toolCallParser:this.isToolCallParserDisabled()}))}extractConfigModelPaths(){let e=this.data.allConfigs??[],t=this.data.config?.name??null,n=new Set,a=[];for(let r of e){if(r.name===t||!r.flags)continue;let u=ra(r.flags,"serve");u&&!n.has(u)&&(n.add(u),a.push(u))}return a}onMaxLenInput(){let e=yi(this.form.get("maxModelLen")?.value??"");this.form.get("maxModelLen")?.setValue(li(e,1),{emitEvent:!1})}isControlChanged(e){let t=this.form.get(e)?.value;return e==="maxModelLen"?+yi(t)!==A.maxModelLen:t!=null&&vC(e,t)}isSectionChanged(...e){return e.some(t=>this.isControlChanged(t))}ngOnInit(){this.system.detectWindows(),this.form.controls.command.valueChanges.pipe(si(this.destroyRef)).subscribe(e=>this._commandValue.set(e)),this.data.config&&this.populateForm(this.data.config),this.form.valueChanges.pipe(si(this.destroyRef)).subscribe(()=>{this.cdr.markForCheck()})}populateForm(e){let t=this.form.controls,n=e.flags,a=ra(n,"serve")??"";if(t.model.setValue(a),t.host.setValue(tn(n,"--host",A.host)),t.port.setValue(Wt(n,"--port",A.port)),t.servedModelName.setValue(Bp(n,"--served-model-name").flatMap(r=>r.split(/\s+/)).map(r=>r.trim()).filter(Boolean).join(", ")),t.tokenizer.setValue(tn(n,"--tokenizer","")),t.dtype.setValue(tn(n,"--dtype",A.dtype)),t.tensorParallelSize.setValue(Wt(n,"--tensor-parallel-size",A.tensorParallelSize)),t.pipelineParallelSize.setValue(Wt(n,"--pipeline-parallel-size",A.pipelineParallelSize)),t.maxParallelLoadingWorkers.setValue(Wt(n,"--max-parallel-loading-workers",A.maxParallelLoadingWorkers)),t.gpuMemoryUtilization.setValue(fo(n,"--gpu-memory-utilization",A.gpuMemoryUtilization)),t.swapSpace.setValue(fo(n,"--swap-space",A.swapSpace)),t.cpuOffloadGb.setValue(fo(n,"--cpu-offload-gb",A.cpuOffloadGb)),t.kvCacheMemory.setValue(Wt(n,"--kv-cache-memory-bytes",A.kvCacheMemory)),t.attentionBackend.setValue(tn(n,"--attention-backend",A.attentionBackend)),t.maxModelLen.setValue(li(Wt(n,"--max-model-len",A.maxModelLen),1)),t.maxNumSeqs.setValue(Wt(n,"--max-num-seqs",A.maxNumSeqs)),t.maxNumBatchedTokens.setValue(Wt(n,"--max-num-batched-tokens",A.maxNumBatchedTokens)),t.blockSize.setValue(Wt(n,"--block-size",A.blockSize)),t.enableChunkedPrefill.setValue(SC(n,"--enable-chunked-prefill","--no-enable-chunked-prefill",A.enableChunkedPrefill)),t.specMethod.setValue(tn(n,"--spec-method",A.specMethod)),t.specTokens.setValue(Wt(n,"--spec-tokens",A.specTokens)),t.specDraftModel.setValue(tn(n,"--spec-draft-model","")),t.specDraftTensorParallelSize.setValue(Wt(n,"--spec-draft-tensor-parallel-size",A.specDraftTensorParallelSize)),t.specNumDraftTokens.setValue(Wt(n,"--num-spec-tokens",A.specNumDraftTokens)),t.temperature.setValue(fo(n,"--temperature",A.temperature)),t.topP.setValue(fo(n,"--top-p",A.topP)),t.topK.setValue(Wt(n,"--top-k",A.topK)),t.minP.setValue(fo(n,"--min-p",A.minP)),t.seed.setValue(Wt(n,"--seed",A.seed)),t.repetitionPenalty.setValue(fo(n,"--repetition-penalty",A.repetitionPenalty)),t.maxNumSeq.setValue(Wt(n,"--max-num-seq",A.maxNumSeq)),t.trustRemoteCode.setValue(n.some(r=>r.split(/\s|=/)[0]==="--trust-remote-code")),t.enableAutoToolChoice.setValue(n.some(r=>r.split(/\s|=/)[0]==="--enable-auto-tool-choice")),t.toolCallParser.setValue(tn(n,"--tool-call-parser","")),t.reasoningParser.setValue(tn(n,"--reasoning-parser","")),t.enablePrefixCaching.setValue(tn(n,"--enable-prefix-caching",A.enablePrefixCaching)),t.apiKey.setValue(tn(n,"--api-key","")),t.extraFlags.setValue(this.extractExtraFlags(n).join(`
5590
+ HSA_OVERRIDE_GFX_VERSION=11.0.0`,"matTooltip","Environment variables for the service process (KEY=VALUE, one per line)",1,"env-textarea"],["matInput","","formControlName","user","placeholder","llama",3,"matTooltip"],["matInput","","formControlName","group","placeholder","ai",3,"matTooltip"],["formControlName","restart"],["align","end"],["mat-stroked-button","",3,"click"],["mat-raised-button","","color","primary",3,"click","disabled"],[1,"auto-path"],[1,"auto-from"],["matInput","","formControlName","yarnOrigCtx","type","number","matTooltip","YaRN: original context size of model. 0 = model training context size"],["matInput","","formControlName","yarnExtFactor","type","number","matTooltip","YaRN: extrapolation mix factor. -1 = default, 0.0 = full interpolation"],["matInput","","formControlName","yarnAttnFactor","type","number","matTooltip","YaRN: scale sqrt(t) or attention magnitude. -1 = default"],["matInput","","formControlName","yarnBetaSlow","type","number","matTooltip","YaRN: high correction dim (alpha). -1 = default"],["matInput","","formControlName","yarnBetaFast","type","number","matTooltip","YaRN: low correction dim (beta). -1 = default"],["formControlName","modelDraft","label","Draft Model Path","placeholder","/path/to/draft-model.gguf",3,"existingPaths","fieldClass"],["formControlName","specDraftDevice","multiple","","placeholder","Select GPU devices for draft model","matTooltip","Devices for offloading the draft model. Same options as main --device"],["matInput","","formControlName","specDraftNMax","type","number","matTooltip","Max number of tokens to draft for speculative decoding. Default: 3"],["matInput","","formControlName","nGpuLayersDraft","type","number","matTooltip","Max draft model layers to store in VRAM. 999 = all layers"],["formControlName","specDraftCacheTypeK","matTooltip","KV cache data type for K for the draft model"],["formControlName","specDraftCacheTypeV","matTooltip","KV cache data type for V for the draft model"],["matInput","","formControlName","specNgramModNMin","type","number","matTooltip","Min number of ngram tokens for ngram-mod speculative decoding. Default: 48"],["matInput","","formControlName","specNgramModNMax","type","number","matTooltip","Max number of ngram tokens for ngram-mod speculative decoding. Default: 64"],["matInput","","formControlName","specNgramModNMatch","type","number","matTooltip","Ngram-mod lookup length. Default: 24"],["matInput","","formControlName","specNgramSimpleSizeN","type","number","matTooltip","Ngram size N for ngram-simple: length of lookup n-gram. Default: 12"],["matInput","","formControlName","specNgramSimpleSizeM","type","number","matTooltip","Ngram size M for ngram-simple: length of draft m-gram. Default: 48"],["matInput","","formControlName","specNgramSimpleMinHits","type","number","matTooltip","Minimum hits for ngram-simple speculative decoding. Default: 1"]],template:function(t,n){if(t&1&&(s(0,"h2",3),d(1),l(),s(2,"mat-dialog-content")(3,"form",4)(4,"mat-form-field",5),_(5,"input",6),y(),s(6,"mat-label"),d(7,"Service Name"),l(),w(8,Ty,2,0,"mat-error")(9,Ay,2,0,"mat-error")(10,Iy,2,0,"mat-error"),l(),s(11,"mat-form-field",5),_(12,"input",7),y(),s(13,"mat-label"),d(14,"Binary Path"),l(),w(15,Ry,2,0,"mat-error"),l(),s(16,"mat-autocomplete",null,0),ee(18,Py,5,3,"mat-option",8,My),l(),s(20,"mat-expansion-panel",9)(21,"mat-expansion-panel-header")(22,"mat-panel-title"),d(23,"Model"),l()(),_(24,"app-file-autocomplete",10),y(),_(25,"app-file-autocomplete",11),y(),s(26,"mat-form-field",5),_(27,"input",12),y(),s(28,"mat-label"),d(29,"Model Alias"),l()()(),s(30,"mat-expansion-panel",9)(31,"mat-expansion-panel-header")(32,"mat-panel-title"),d(33,"GPU & Memory"),l()(),s(34,"div",13)(35,"mat-form-field",14),_(36,"input",15),y(),s(37,"mat-label"),d(38,"GPU Layers"),l()(),s(39,"mat-form-field",16)(40,"mat-select",17),ee(41,Oy,2,2,"mat-option",8,td),l(),y(),s(43,"mat-label"),d(44,"Device (multi-select)"),l()()(),s(45,"div",13)(46,"mat-form-field",18)(47,"mat-select",19)(48,"mat-option",20),d(49,"layer (pipelined)"),l(),s(50,"mat-option",21),d(51,"row (parallelized)"),l(),s(52,"mat-option",22),d(53,"tensor (experimental)"),l(),s(54,"mat-option",23),d(55,"none (single GPU)"),l()(),y(),s(56,"mat-label"),d(57,"Split Mode"),l()(),s(58,"mat-form-field",18),_(59,"input",24),y(),s(60,"mat-label"),d(61,"Tensor Split"),l()(),s(62,"mat-form-field",18),_(63,"input",25),y(),s(64,"mat-label"),d(65,"Main GPU"),l()()(),s(66,"div",26),d(67,"Memory"),l(),s(68,"div",13)(69,"mat-form-field",18)(70,"mat-select",27)(71,"mat-option",28),d(72,"on"),l(),s(73,"mat-option",29),d(74,"off"),l()(),y(),s(75,"mat-label"),d(76,"Fit to VRAM"),l()(),s(77,"mat-form-field",18),_(78,"input",30),y(),s(79,"mat-label"),d(80,"Fit Target (MiB)"),l()(),s(81,"mat-form-field",18),_(82,"input",31),y(),s(83,"mat-label"),d(84,"Fit Min Ctx"),l()()(),s(85,"div",13)(86,"mat-form-field",18)(87,"mat-select",32)(88,"mat-option",28),d(89,"on"),l(),s(90,"mat-option",29),d(91,"off"),l()(),y(),s(92,"mat-label"),d(93,"mlock (pin RAM)"),l()(),s(94,"mat-form-field",18)(95,"mat-select",33)(96,"mat-option",28),d(97,"on"),l(),s(98,"mat-option",29),d(99,"off"),l()(),y(),s(100,"mat-label"),d(101,"mmap"),l()(),s(102,"mat-form-field",18)(103,"mat-select",34)(104,"mat-option",28),d(105,"on"),l(),s(106,"mat-option",29),d(107,"off"),l()(),y(),s(108,"mat-label"),d(109,"CPU MoE"),l()(),s(110,"mat-form-field",18),_(111,"input",35),y(),s(112,"mat-label"),d(113,"N CPU MoE Layers"),l()()()(),s(114,"mat-expansion-panel")(115,"mat-expansion-panel-header")(116,"mat-panel-title"),d(117,"Context & KV Cache"),l()(),s(118,"div",13)(119,"mat-form-field",18)(120,"input",36),S("blur",function(r){return n.onCtxSizeInput(r)})("keyup.enter",function(r){return n.onCtxSizeInput(r)}),l(),y(),s(121,"mat-label"),d(122,"Context Size"),l()(),s(123,"mat-autocomplete",null,1),ee(125,Fy,2,2,"mat-option",8,Ey),l(),s(127,"mat-form-field",18),_(128,"input",37),y(),s(129,"mat-label"),d(130,"Batch Size"),l()(),s(131,"mat-form-field",18),_(132,"input",38),y(),s(133,"mat-label"),d(134,"Ubatch Size"),l()()(),s(135,"div",13)(136,"mat-form-field",18)(137,"mat-select",39),ee(138,Ny,2,2,"mat-option",8,Ye),l(),y(),s(140,"mat-label"),d(141,"KV Cache Type K"),l()(),s(142,"mat-form-field",18)(143,"mat-select",40),ee(144,Ly,2,2,"mat-option",8,Ye),l(),y(),s(146,"mat-label"),d(147,"KV Cache Type V"),l()(),s(148,"mat-form-field",18)(149,"mat-select",41)(150,"mat-option",28),d(151,"on"),l(),s(152,"mat-option",29),d(153,"off"),l()(),y(),s(154,"mat-label"),d(155,"KV Offload"),l()()(),s(156,"div",13)(157,"mat-form-field",18),_(158,"input",42),y(),s(159,"mat-label"),d(160,"Cache RAM (MiB)"),l()(),s(161,"mat-form-field",18)(162,"mat-select",43)(163,"mat-option",28),d(164,"on"),l(),s(165,"mat-option",29),d(166,"off"),l()(),y(),s(167,"mat-label"),d(168,"Full SWA Cache"),l()()()(),s(169,"mat-expansion-panel")(170,"mat-expansion-panel-header")(171,"mat-panel-title"),d(172,"RoPE Scaling"),l()(),s(173,"div",13)(174,"mat-form-field",18)(175,"mat-select",44)(176,"mat-option",23),d(177,"none"),l(),s(178,"mat-option",45),d(179,"linear"),l(),s(180,"mat-option",46),d(181,"yarn"),l()(),y(),s(182,"mat-label"),d(183,"Scaling Method"),l()(),s(184,"mat-form-field",18),_(185,"input",47),y(),s(186,"mat-label"),d(187,"Scale Factor"),l()(),s(188,"mat-form-field",18),_(189,"input",48),y(),s(190,"mat-label"),d(191,"Freq Base"),l()(),s(192,"mat-form-field",18),_(193,"input",49),y(),s(194,"mat-label"),d(195,"Freq Scale"),l()()(),w(196,Vy,23,10),l(),s(197,"mat-expansion-panel")(198,"mat-expansion-panel-header")(199,"mat-panel-title"),d(200,"Generation"),l(),s(201,"mat-panel-description"),d(202,"Runtime and batching defaults"),l()(),s(203,"div",13)(204,"mat-form-field",18),_(205,"input",50),y(),s(206,"mat-label"),d(207,"Threads"),l()(),s(208,"mat-form-field",18),_(209,"input",51),y(),s(210,"mat-label"),d(211,"Parallel Slots"),l()(),s(212,"mat-form-field",18),_(213,"input",52),y(),s(214,"mat-label"),d(215,"Max Tokens (n-predict)"),l()()(),s(216,"div",13)(217,"mat-form-field",18)(218,"mat-select",53)(219,"mat-option",28),d(220,"on"),l(),s(221,"mat-option",29),d(222,"off"),l(),s(223,"mat-option",54),d(224,"auto"),l()(),y(),s(225,"mat-label"),d(226,"Flash Attention"),l()(),s(227,"mat-form-field",18)(228,"mat-select",55)(229,"mat-option",28),d(230,"on"),l(),s(231,"mat-option",29),d(232,"off"),l()(),y(),s(233,"mat-label"),d(234,"Cont. Batching"),l()(),s(235,"mat-form-field",18)(236,"mat-select",56)(237,"mat-option",28),d(238,"on"),l(),s(239,"mat-option",29),d(240,"off"),l()(),y(),s(241,"mat-label"),d(242,"Context Shift"),l()()()(),s(243,"mat-expansion-panel")(244,"mat-expansion-panel-header")(245,"mat-panel-title"),d(246,"Sampling Defaults"),l(),s(247,"mat-panel-description"),d(248,"Default sampling parameters for generation"),l()(),s(249,"div",26),d(250,"Core"),l(),s(251,"div",13)(252,"mat-form-field",18),_(253,"input",57),y(),s(254,"mat-label"),d(255,"Temperature"),l()(),s(256,"mat-form-field",18),_(257,"input",58),y(),s(258,"mat-label"),d(259,"Seed"),l()(),s(260,"mat-form-field",18),_(261,"input",59),y(),s(262,"mat-label"),d(263,"Top-K"),l()(),s(264,"mat-form-field",18),_(265,"input",60),y(),s(266,"mat-label"),d(267,"Top-P"),l()()(),s(268,"div",13)(269,"mat-form-field",18),_(270,"input",61),y(),s(271,"mat-label"),d(272,"Min-P"),l()(),s(273,"mat-form-field",18),_(274,"input",62),y(),s(275,"mat-label"),d(276,"Typical-P"),l()(),s(277,"mat-form-field",18)(278,"mat-select",63)(279,"mat-option",8),d(280,"disabled"),l(),s(281,"mat-option",8),d(282,"Mirostat"),l(),s(283,"mat-option",8),d(284,"Mirostat 2.0"),l()(),y(),s(285,"mat-label"),d(286,"Mirostat"),l()(),s(287,"mat-form-field",18),_(288,"input",64),y(),s(289,"mat-label"),d(290,"Dyn. Temp Range"),l()()(),s(291,"div",26),d(292,"Penalties"),l(),s(293,"div",13)(294,"mat-form-field",18),_(295,"input",65),y(),s(296,"mat-label"),d(297,"Repeat Last N"),l()(),s(298,"mat-form-field",18),_(299,"input",66),y(),s(300,"mat-label"),d(301,"Repeat Penalty"),l()(),s(302,"mat-form-field",18),_(303,"input",67),y(),s(304,"mat-label"),d(305,"Presence Penalty"),l()(),s(306,"mat-form-field",18),_(307,"input",68),y(),s(308,"mat-label"),d(309,"Frequency Penalty"),l()()(),s(310,"div",26),d(311,"DRY Sampling"),l(),s(312,"div",13)(313,"mat-form-field",18),_(314,"input",69),y(),s(315,"mat-label"),d(316,"DRY Multiplier"),l()(),s(317,"mat-form-field",18),_(318,"input",70),y(),s(319,"mat-label"),d(320,"DRY Base"),l()()()(),s(321,"mat-expansion-panel")(322,"mat-expansion-panel-header")(323,"mat-panel-title"),d(324,"Speculative Decoding"),l(),s(325,"mat-panel-description"),d(326,"Draft model and speculative decoding options"),l()(),s(327,"mat-form-field",71)(328,"mat-select",72)(329,"mat-option",23),d(330,"none"),l(),s(331,"mat-option",73),d(332,"draft-simple"),l(),s(333,"mat-option",74),d(334,"draft-eagle3"),l(),s(335,"mat-option",75),d(336,"draft-mtp"),l(),s(337,"mat-option",76),d(338,"ngram-simple"),l(),s(339,"mat-option",77),d(340,"ngram-mod"),l(),s(341,"mat-option",78),d(342,"draft-mtp,ngram-mod"),l()(),y(),s(343,"mat-label"),d(344,"Spec Type"),l()(),w(345,Hy,32,12),w(346,Uy,15,6),w(347,$y,15,6),l(),s(348,"mat-expansion-panel")(349,"mat-expansion-panel-header")(350,"mat-panel-title"),d(351,"LoRA & Adapters"),l()(),_(352,"app-file-autocomplete",79),y(),s(353,"mat-form-field",5),_(354,"input",80),y(),s(355,"mat-label"),d(356,"LoRA Scaled"),l()()(),s(357,"mat-expansion-panel")(358,"mat-expansion-panel-header")(359,"mat-panel-title"),d(360,"Server & Network"),l()(),s(361,"div",13)(362,"mat-form-field",18),_(363,"input",81),y(),s(364,"mat-label"),d(365,"Host"),l()(),s(366,"mat-autocomplete",null,2),ee(368,Gy,5,3,"mat-option",8,td),l(),s(370,"mat-form-field",18),_(371,"input",82),y(),s(372,"mat-label"),d(373,"Port"),l()(),s(374,"mat-form-field",18),_(375,"input",83),y(),s(376,"mat-label"),d(377,"Timeout (s)"),l()(),s(378,"mat-form-field",18),_(379,"input",84),y(),s(380,"mat-label"),d(381,"HTTP Threads"),l()()(),_(382,"app-file-autocomplete",85),y(),s(383,"div",13)(384,"mat-form-field",18)(385,"mat-select",86)(386,"mat-option",28),d(387,"on"),l(),s(388,"mat-option",29),d(389,"off"),l()(),y(),s(390,"mat-label"),d(391,"Prometheus Metrics"),l()(),s(392,"mat-form-field",18)(393,"mat-select",87)(394,"mat-option",28),d(395,"on"),l(),s(396,"mat-option",29),d(397,"off"),l()(),y(),s(398,"mat-label"),d(399,"Slots Endpoint"),l()(),s(400,"mat-form-field",18)(401,"mat-select",88)(402,"mat-option",28),d(403,"on"),l(),s(404,"mat-option",29),d(405,"off"),l()(),y(),s(406,"mat-label"),d(407,"Prompt Cache"),l()(),s(408,"mat-form-field",18),_(409,"input",89),y(),s(410,"mat-label"),d(411,"Cache Reuse"),l()()()(),s(412,"mat-expansion-panel")(413,"mat-expansion-panel-header")(414,"mat-panel-title"),d(415,"Reasoning"),l(),s(416,"mat-panel-description"),d(417,"Thinking/reasoning mode settings"),l()(),s(418,"div",13)(419,"mat-form-field",18)(420,"mat-select",90)(421,"mat-option",28),d(422,"on"),l(),s(423,"mat-option",29),d(424,"off"),l(),s(425,"mat-option",54),d(426,"auto"),l()(),y(),s(427,"mat-label"),d(428,"Reasoning"),l()(),s(429,"mat-form-field",18),_(430,"input",91),y(),s(431,"mat-label"),d(432,"Reasoning Budget"),l()(),s(433,"mat-form-field",18)(434,"mat-select",92)(435,"mat-option",54),d(436,"auto"),l(),s(437,"mat-option",23),d(438,"none (raw)"),l(),s(439,"mat-option",93),d(440,"deepseek"),l(),s(441,"mat-option",94),d(442,"deepseek-legacy"),l()(),y(),s(443,"mat-label"),d(444,"Reasoning Format"),l()(),s(445,"mat-form-field",18)(446,"mat-select",95)(447,"mat-option",28),d(448,"on"),l(),s(449,"mat-option",29),d(450,"off"),l()(),y(),s(451,"mat-label"),d(452,"Reasoning Preserve"),l()()()(),s(453,"mat-expansion-panel")(454,"mat-expansion-panel-header")(455,"mat-panel-title"),d(456,"Additional"),l(),s(457,"mat-panel-description"),d(458,"Extra CLI flags and environment variables"),l()(),s(459,"mat-form-field",5),_(460,"textarea",96),y(),s(461,"mat-label"),d(462,"Extra CLI Flags (one per line)"),l()(),s(463,"mat-form-field",5),_(464,"textarea",97),y(),s(465,"mat-label"),d(466,"Environment variables (KEY=VALUE, one per line)"),l()()(),s(467,"mat-expansion-panel")(468,"mat-expansion-panel-header")(469,"mat-panel-title"),d(470,"Service unit"),l(),s(471,"mat-panel-description"),d(472,"systemd User / Group / Restart policy"),l()(),s(473,"div",13)(474,"mat-form-field",18),_(475,"input",98),y(),s(476,"mat-label"),d(477,"Run as user"),l()(),s(478,"mat-form-field",18),_(479,"input",99),y(),s(480,"mat-label"),d(481,"Run as group"),l()(),s(482,"mat-form-field",18)(483,"mat-select",100),ee(484,Wy,2,2,"mat-option",8,Ye),l(),y(),s(486,"mat-label"),d(487,"Restart policy"),l()()()()()(),s(488,"mat-dialog-actions",101)(489,"button",102),S("click",function(){return n.cancel()}),d(490,"Cancel"),l(),s(491,"button",103),S("click",function(){return n.save()}),d(492),l()()),t&2){let a=Se(17),r=Se(124),u=Se(367);c(),Q("",n.isClone?"Clone":n.isEdit?"Edit":"Add"," llama-server service"),c(2),x("formGroup",n.form),c(),p("changed",n.isControlChanged("name")),c(),C(),c(3),D(n.form.controls.name.errors?.required?8:n.form.controls.name.errors?.pattern?9:n.form.controls.name.errors?.nameTaken?10:-1),c(3),p("changed",n.isControlChanged("command")),c(),x("matAutocomplete",a),C(),c(3),D(n.form.controls.command.errors?.required?15:-1),c(3),te(n.filteredCommands()),c(2),p("has-changed",n.isSectionChanged("model","mmproj","alias")),c(4),x("existingPaths",n.existingModelPaths())("fieldClass",n.isControlChanged("model")?"changed":""),C(),c(),x("existingPaths",n.existingMmprojPaths())("fieldClass",n.isControlChanged("mmproj")?"changed":""),C(),c(),p("changed",n.isControlChanged("alias")),c(),C(),c(3),p("has-changed",n.isSectionChanged("nGpuLayers","device","tensorSplit","splitMode","mainGpu","fit","fitTarget","fitCtx","mlock","mmap","cpuMoe","nCpuMoe")),c(5),p("changed",n.isControlChanged("nGpuLayers")),c(),C(),c(3),p("changed",n.isControlChanged("device")),c(),C(),c(),te(n.availableDevices()),c(5),p("changed",n.isControlChanged("splitMode")),c(),C(),c(11),p("changed",n.isControlChanged("tensorSplit")&&!n.isTensorSplitDisabled()),c(),C(),c(3),p("changed",n.isControlChanged("mainGpu")),c(),C(),c(6),p("changed",n.isControlChanged("fit")),c(),C(),c(7),p("changed",n.isControlChanged("fitTarget")&&!n.isFitTargetDisabled()),c(),C(),c(3),p("changed",n.isControlChanged("fitCtx")&&!n.isFitTargetDisabled()),c(),C(),c(4),p("changed",n.isControlChanged("mlock")),c(),C(),c(7),p("changed",n.isControlChanged("mmap")),c(),C(),c(7),p("changed",n.isControlChanged("cpuMoe")),c(),C(),c(7),p("changed",n.isControlChanged("nCpuMoe")&&!n.isCpuMoeLayersDisabled()),c(),C(),c(3),p("has-changed",n.isSectionChanged("ctxSize","batchSize","ubatchSize","cacheTypeK","cacheTypeV","kvOffload","cacheRam","swaFull")),c(5),p("changed",n.isControlChanged("ctxSize")),c(),x("matAutocomplete",r),C(),c(5),te(n.ctxPresets()),c(2),p("changed",n.isControlChanged("batchSize")),c(),C(),c(3),p("changed",n.isControlChanged("ubatchSize")),c(),C(),c(4),p("changed",n.isControlChanged("cacheTypeK")),c(),C(),c(),te(n.kvCacheTypes),c(4),p("changed",n.isControlChanged("cacheTypeV")),c(),C(),c(),te(n.kvCacheTypes),c(4),p("changed",n.isControlChanged("kvOffload")),c(),C(),c(8),p("changed",n.isControlChanged("cacheRam")),c(),C(),c(3),p("changed",n.isControlChanged("swaFull")),c(),C(),c(7),p("has-changed",n.isSectionChanged("ropeScaling","ropeScale","ropeFreqBase","ropeFreqScale","yarnOrigCtx","yarnExtFactor","yarnAttnFactor","yarnBetaSlow","yarnBetaFast")),c(5),p("changed",n.isControlChanged("ropeScaling")),c(),C(),c(9),p("changed",n.isControlChanged("ropeScale")&&!n.isRopeParamsDisabled()),c(),C(),c(3),p("changed",n.isControlChanged("ropeFreqBase")&&!n.isRopeParamsDisabled()),c(),C(),c(3),p("changed",n.isControlChanged("ropeFreqScale")&&!n.isRopeParamsDisabled()),c(),C(),c(3),D(n.showYarnParams()?196:-1),c(),p("has-changed",n.isSectionChanged("threads","parallel","flashAttn","contBatching","contextShift","nPredict")),c(7),p("changed",n.isControlChanged("threads")),c(),C(),c(3),p("changed",n.isControlChanged("parallel")),c(),C(),c(3),p("changed",n.isControlChanged("nPredict")),c(),C(),c(4),p("changed",n.isControlChanged("flashAttn")),c(),C(),c(9),p("changed",n.isControlChanged("contBatching")),c(),C(),c(7),p("changed",n.isControlChanged("contextShift")),c(),C(),c(7),p("has-changed",n.isSectionChanged("temperature","seed","topK","topP","minP","typicalP","mirostat","dynatempRange","repeatLastN","repeatPenalty","presencePenalty","frequencyPenalty","dryMultiplier","dryBase")),c(9),p("changed",n.isControlChanged("temperature")),c(),C(),c(3),p("changed",n.isControlChanged("seed")),c(),C(),c(3),p("changed",n.isControlChanged("topK")&&!n.isMirostatEnabled()),c(),C(),c(3),p("changed",n.isControlChanged("topP")&&!n.isMirostatEnabled()),c(),C(),c(4),p("changed",n.isControlChanged("minP")),c(),C(),c(3),p("changed",n.isControlChanged("typicalP")&&!n.isMirostatEnabled()),c(),C(),c(3),p("changed",n.isControlChanged("mirostat")),c(),C(),c(),x("value",0),c(2),x("value",1),c(2),x("value",2),c(4),p("changed",n.isControlChanged("dynatempRange")),c(),C(),c(6),p("changed",n.isControlChanged("repeatLastN")),c(),C(),c(3),p("changed",n.isControlChanged("repeatPenalty")),c(),C(),c(3),p("changed",n.isControlChanged("presencePenalty")),c(),C(),c(3),p("changed",n.isControlChanged("frequencyPenalty")),c(),C(),c(6),p("changed",n.isControlChanged("dryMultiplier")),c(),C(),c(3),p("changed",n.isControlChanged("dryBase")),c(),C(),c(3),p("has-changed",n.isSectionChanged("modelDraft","specDraftDevice","specDraftNMax","nGpuLayersDraft","specDraftCacheTypeK","specDraftCacheTypeV","specType","specNgramModNMin","specNgramModNMax","specNgramModNMatch","specNgramSimpleSizeN","specNgramSimpleSizeM","specNgramSimpleMinHits")),c(6),p("changed",n.isControlChanged("specType")),c(),C(),c(17),D(n.showDraftParams()?345:-1),c(),D(n.showNgramModParams()?346:-1),c(),D(n.showNgramSimpleParams()?347:-1),c(),p("has-changed",n.isSectionChanged("lora","loraScaled")),c(4),x("existingPaths",n.existingLoraPaths())("fieldClass",n.isControlChanged("lora")?"changed":""),C(),c(),p("changed",n.isControlChanged("loraScaled")),c(),C(),c(3),p("has-changed",n.isSectionChanged("host","port","timeout","threadsHttp","apiKeyFile","metrics","slots","cachePrompt","cacheReuse")),c(5),p("changed",n.isControlChanged("host")),c(),x("matAutocomplete",u),C(),c(5),te(n.filteredHosts()),c(2),p("changed",n.isControlChanged("port")&&!n.isPortDisabled()),c(),C(),c(3),p("changed",n.isControlChanged("timeout")),c(),C(),c(3),p("changed",n.isControlChanged("threadsHttp")),c(),C(),c(3),x("existingPaths",n.existingApiKeyPaths())("fieldClass",n.isControlChanged("apiKeyFile")?"changed":""),C(),c(2),p("changed",n.isControlChanged("metrics")),c(),C(),c(7),p("changed",n.isControlChanged("slots")),c(),C(),c(7),p("changed",n.isControlChanged("cachePrompt")),c(),C(),c(7),p("changed",n.isControlChanged("cacheReuse")&&!n.isCacheReuseDisabled()),c(),C(),c(3),p("has-changed",n.isSectionChanged("reasoning","reasoningBudget","reasoningFormat","reasoningPreserve")),c(7),p("changed",n.isControlChanged("reasoning")),c(),C(),c(9),p("changed",n.isControlChanged("reasoningBudget")&&!n.isReasoningParamsDisabled()),c(),C(),c(3),p("changed",n.isControlChanged("reasoningFormat")&&!n.isReasoningParamsDisabled()),c(),C(),c(11),p("changed",n.isControlChanged("reasoningPreserve")),c(),C(),c(7),p("has-changed",n.isSectionChanged("extraFlags","envText")),c(6),p("changed",n.isControlChanged("extraFlags")),c(),C(),c(3),p("changed",n.isControlChanged("envText")),c(),C(),c(11),x("matTooltip",n.runAs.userHint()),C(),c(4),x("matTooltip",n.runAs.groupHint()),C(),c(4),C(),c(),te(n.restartOptions),c(7),x("disabled",n.form.invalid),c(),Q(" ",n.isEdit&&!n.isClone?"Save":"Create"," ")}},dependencies:[Me,gi,An,Zt,oo,Qt,$i,Wi,$t,Ti,Qi,Zi,Dt,Li,ze,Ue,Hn,oa,uo,ta,na,ia,Mt,ut,_t,qi,Pt,Rt,st,yt,xt,Ct,en,Ji,aa,ho,qs],styles:['@charset "UTF-8";.llama-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px;min-width:640px}.form-row[_ngcontent-%COMP%]{display:flex;gap:12px;margin-bottom:4px}.form-col[_ngcontent-%COMP%]{flex:1}.form-col-60[_ngcontent-%COMP%]{flex:3}.form-col-40[_ngcontent-%COMP%]{flex:2}.full-width[_ngcontent-%COMP%]{width:100%}.auto-path[_ngcontent-%COMP%]{font-family:monospace}.auto-from[_ngcontent-%COMP%]{margin-left:8px;opacity:.6;font-size:12px}.flags-textarea[_ngcontent-%COMP%], .env-textarea[_ngcontent-%COMP%]{overflow-x:auto}mat-dialog-content[_ngcontent-%COMP%]{padding-top:10px!important;max-height:80vh}mat-expansion-panel[_ngcontent-%COMP%]{margin-bottom:0}mat-dialog-actions[_ngcontent-%COMP%]{gap:8px}.subsection-label[_ngcontent-%COMP%]{font-size:12px;font-weight:500;color:#0009;margin:4px 0 14px;text-transform:uppercase;letter-spacing:.5px}.sub-section-hint[_ngcontent-%COMP%]{font-size:11px;color:#0006;margin-bottom:4px}mat-expansion-panel.has-changed[_ngcontent-%COMP%] mat-panel-title[_ngcontent-%COMP%]{font-weight:700}mat-form-field.changed[_ngcontent-%COMP%] .mat-mdc-form-field-infix input, mat-form-field.changed[_ngcontent-%COMP%] .mat-mdc-form-field-infix .mat-mdc-select{font-weight:700}']})}}return i})();function ra(i,o){for(let e of i){let t=e.indexOf("=");if(t>0&&e.slice(0,t)===o)return e.slice(t+1);let n=e.indexOf(" ");if(n>0&&e.slice(0,n)===o)return e.slice(n+1).trim()}for(let e=0;e<i.length;e++)if(i[e]===o&&e+1<i.length)return i[e+1];return null}function Bp(i,o){let e=[];for(let t of i){let n=t.indexOf("=");if(n>0&&t.slice(0,n)===o){e.push(t.slice(n+1));continue}let a=t.indexOf(" ");a>0&&t.slice(0,a)===o&&e.push(t.slice(a+1).trim())}for(let t=0;t<i.length;t++)i[t]===o&&t+1<i.length&&e.push(i[t+1]);return e}var Zy=(i,o)=>o.command,Qy=(i,o)=>o.pciBusId,Jy=(i,o)=>o.label,eC=(i,o)=>o.value,tC=(i,o)=>o.path;function iC(i,o){i&1&&(s(0,"mat-error"),d(1,"Required"),l())}function nC(i,o){i&1&&(s(0,"mat-error"),d(1,"Starts with letter, alphanumeric + hyphens/underscores, max 128 chars"),l())}function oC(i,o){i&1&&(s(0,"mat-error"),d(1,"Another service already uses this name"),l())}function aC(i,o){i&1&&(s(0,"mat-error"),d(1,"Required"),l())}function rC(i,o){if(i&1&&(s(0,"mat-option",9)(1,"span",60),d(2),l(),s(3,"span",61),d(4),l()()),i&2){let e=o.$implicit;x("value",e.command),c(2),I(e.command),c(2),Q("(",e.from,")")}}function sC(i,o){i&1&&(s(0,"mat-error"),d(1,"Required"),l())}function lC(i,o){if(i&1&&(s(0,"mat-option",9)(1,"span",60),d(2),l(),s(3,"span",61),d(4,"(existing config)"),l()()),i&2){let e=o.$implicit;x("value",e),c(2),I(e)}}function cC(i,o){if(i&1&&(s(0,"mat-option",9),d(1),l()),i&2){let e=o.$implicit;x("value",e),c(),I(e)}}function dC(i,o){if(i&1&&(s(0,"mat-option",9),d(1),l()),i&2){let e=o.$implicit;x("value",e),c(),I(e)}}function mC(i,o){if(i&1&&(s(0,"mat-option",9),d(1),l()),i&2){let e=o.$implicit;x("value",e.gpuIndex),c(),I(e.gpuIndex)}}function uC(i,o){if(i&1&&(s(0,"mat-option",9),d(1),l()),i&2){let e=o.$implicit;x("value",e.label),c(),I(e.label)}}function hC(i,o){if(i&1&&(s(0,"mat-option",9),d(1),l()),i&2){let e=o.$implicit;x("value",e.value),c(),I(e.label)}}function pC(i,o){if(i&1&&(s(0,"div",62),d(1,"Draft Model"),l(),s(2,"div",13)(3,"mat-form-field",63),_(4,"input",64),y(),s(5,"mat-label"),d(6,"Draft Model"),l()(),s(7,"mat-form-field",14),_(8,"input",65),y(),s(9,"mat-label"),d(10,"Draft TP Size"),l()(),s(11,"mat-form-field",14),_(12,"input",66),y(),s(13,"mat-label"),d(14,"Num Spec Tokens"),l()()()),i&2){let e=v();c(3),p("changed",e.isControlChanged("specDraftModel")),c(),C(),c(3),p("changed",e.isControlChanged("specDraftTensorParallelSize")),c(),C(),c(3),p("changed",e.isControlChanged("specNumDraftTokens")),c(),C()}}function fC(i,o){if(i&1&&(s(0,"mat-option",9),d(1),l()),i&2){let e=o.$implicit;x("value",e),c(),I(e||"(none)")}}function gC(i,o){if(i&1&&(s(0,"mat-option",9),d(1),l()),i&2){let e=o.$implicit;x("value",e),c(),I(e||"(none)")}}function _C(i,o){if(i&1&&(s(0,"mat-option",9)(1,"span",60),d(2),l(),s(3,"span",61),d(4),l()()),i&2){let e=o.$implicit;x("value",e.path),c(2),I(e.path),c(2),Q("(",e.source,")")}}function vC(i,o){if(i&1&&(s(0,"mat-option",9),d(1),l()),i&2){let e=o.$implicit;x("value",e),c(),I(e==="no"?"no (default)":e)}}var A={host:"127.0.0.1",port:8e3,servedModelName:"",model:"",tokenizer:"",dtype:"auto",tensorParallelSize:1,pipelineParallelSize:1,maxParallelLoadingWorkers:0,gpuMemoryUtilization:.9,swapSpace:4,cpuOffloadGb:0,kvCacheMemory:0,deviceIds:[],attentionBackend:"",maxModelLen:0,maxNumSeqs:256,maxNumBatchedTokens:0,blockSize:0,enableChunkedPrefill:"auto",specMethod:"none",specTokens:0,specDraftModel:"",specDraftTensorParallelSize:0,specNumDraftTokens:0,temperature:1,topP:1,topK:-1,minP:0,seed:-1,repetitionPenalty:1,maxNumSeq:0,trustRemoteCode:!1,enableAutoToolChoice:!1,toolCallParser:"",reasoningParser:"",enablePrefixCaching:"auto",apiKey:"",extraFlags:"",envText:""};function bC(i,o){let e=A[i];return e===void 0?!1:String(o)!==String(e)}var yC="^[a-zA-Z][a-zA-Z0-9_-]{0,127}$",CC=["auto","half","bfloat16","float","float16","float32"],xC=["TRITON_ATTN","ROCM_ATTN","ROCM_SEGMENTED_ATTN","FLASH_ATTN","FLASHINFER","TRITON_MLA","FLASHMLA","FLEX_ATTENTION","TORCH_SDPA","TREE_ATTN","XFORMERS"],wC=[{value:"none",label:"none"},{value:"ngram",label:"ngram"},{value:"eagle",label:"eagle"},{value:"eagle3",label:"eagle3"},{value:"medusa",label:"medusa"},{value:"mlp_speculator",label:"mlp_speculator"},{value:"draft_model",label:"draft_model"},{value:"mtp",label:"mtp"},{value:"qwen3_5_mtp",label:"qwen3_5_mtp"},{value:"qwen3_next_mtp",label:"qwen3_next_mtp"},{value:"deepseek_mtp",label:"deepseek_mtp"}],DC=["","hermes","mistral","llama3_json","qwen3_xml","qwen25_tool_call","phi4_mini_json","pythonic","internlm","glm45","step3","minimax_m2"],SC=["","deepseek_r1","qwen3","granite","phi4_reasoning","glm45","step3","minimax_m2"],zp=(()=>{class i{constructor(){this.fb=m(Gi),this.dialogRef=m(et),this.data=m(Ni),this.serviceService=m(wt),this.gpuService=m(Go),this.cdr=m(se),this.destroyRef=m(Vt),this.system=m(Ot),this.runAs=Bn(this.system.windows),this.isEdit=this.data.config!==null,this.isClone=this.data.clone===!0,this.dtypeOptions=CC,this.attentionBackends=xC,this.specMethods=wC,this.toolCallParsers=DC,this.reasoningParsers=SC,this.allExistingCommands=P(()=>{let e=this.data.allConfigs??[],t=this.data.config?.name??null,n=new Set,a=[];for(let r of e)r.name!==t&&(n.has(r.command)||(n.add(r.command),a.push({command:r.command,from:r.name})));return a}),this._commandValue=E(this.data.config?.command??""),this.commandValue=this._commandValue.asReadonly(),this.filteredCommands=P(()=>{let e=this.commandValue()?.toLowerCase()??"";return this.allExistingCommands().filter(t=>t.command.toLowerCase().includes(e)||t.from.toLowerCase().includes(e))}),this.form=this.fb.group({name:[this.data.config?.name??"",{validators:[Qe.required,Qe.pattern(yC),jn(this.data.allConfigs??[],this.data.config?.name??null)]}],command:[this.data.config?.command??"",Qe.required],host:[A.host],port:[A.port],servedModelName:[A.servedModelName],model:[A.model],tokenizer:[A.tokenizer],dtype:[A.dtype],tensorParallelSize:[A.tensorParallelSize],pipelineParallelSize:[A.pipelineParallelSize],maxParallelLoadingWorkers:[A.maxParallelLoadingWorkers],gpuMemoryUtilization:[A.gpuMemoryUtilization],swapSpace:[A.swapSpace],cpuOffloadGb:[A.cpuOffloadGb],kvCacheMemory:[A.kvCacheMemory],deviceIds:[[]],attentionBackend:[A.attentionBackend],maxModelLen:[""],maxNumSeqs:[A.maxNumSeqs],maxNumBatchedTokens:[A.maxNumBatchedTokens],blockSize:[A.blockSize],enableChunkedPrefill:[A.enableChunkedPrefill],specMethod:[A.specMethod],specTokens:[A.specTokens],specDraftModel:[A.specDraftModel],specDraftTensorParallelSize:[A.specDraftTensorParallelSize],specNumDraftTokens:[A.specNumDraftTokens],temperature:[A.temperature],topP:[A.topP],topK:[A.topK],minP:[A.minP],seed:[A.seed],repetitionPenalty:[A.repetitionPenalty],maxNumSeq:[A.maxNumSeq],trustRemoteCode:[A.trustRemoteCode],enableAutoToolChoice:[A.enableAutoToolChoice],toolCallParser:[A.toolCallParser],reasoningParser:[A.reasoningParser],enablePrefixCaching:[A.enablePrefixCaching],apiKey:[A.apiKey],extraFlags:[A.extraFlags],envText:[A.envText],user:[this.data.config?.user??""],group:[this.data.config?.group??""],restart:[this.data.config?.restart??"no"]}),this.restartOptions=Vn,this.availableGpus=bi(this.gpuService.fetchGpus().pipe(Et(()=>ge([]))),{initialValue:[]}),this.filteredHosts=bi(this.form.controls.host.valueChanges.pipe(si(),Ee(this.form.controls.host.value),Lt(250),ci(),$e(e=>{let t=(e??"").trim();return t?this.serviceService.getLlamaAutocomplete("host",t).pipe(Et(()=>ge([]))):ge([])})),{initialValue:[]}),this.existingModelPaths=P(()=>this.extractConfigModelPaths()),this.maxLenPresets=P(()=>po.map(e=>({label:li(e,1)}))),this.formValue=bi(this.form.valueChanges,{initialValue:this.form.value}),this.specMethodValue=P(()=>this.formValue()?.specMethod),this.showSpecDraftParams=P(()=>{let e=this.specMethodValue();return e!=="none"&&e!=="ngram"}),this.isToolCallParserDisabled=P(()=>!this.formValue()?.enableAutoToolChoice),this.lockedFields=zn(this.form,()=>({group:this.runAs.isGroupDisabled(),toolCallParser:this.isToolCallParserDisabled()}))}extractConfigModelPaths(){let e=this.data.allConfigs??[],t=this.data.config?.name??null,n=new Set,a=[];for(let r of e){if(r.name===t||!r.flags)continue;let u=ra(r.flags,"serve");u&&!n.has(u)&&(n.add(u),a.push(u))}return a}onMaxLenInput(){let e=yi(this.form.get("maxModelLen")?.value??"");this.form.get("maxModelLen")?.setValue(li(e,1),{emitEvent:!1})}isControlChanged(e){let t=this.form.get(e)?.value;return e==="maxModelLen"?+yi(t)!==A.maxModelLen:t!=null&&bC(e,t)}isSectionChanged(...e){return e.some(t=>this.isControlChanged(t))}ngOnInit(){this.system.detectWindows(),this.form.controls.command.valueChanges.pipe(si(this.destroyRef)).subscribe(e=>this._commandValue.set(e)),this.data.config&&this.populateForm(this.data.config),this.form.valueChanges.pipe(si(this.destroyRef)).subscribe(()=>{this.cdr.markForCheck()})}populateForm(e){let t=this.form.controls,n=e.flags,a=ra(n,"serve")??"";if(t.model.setValue(a),t.host.setValue(tn(n,"--host",A.host)),t.port.setValue(qt(n,"--port",A.port)),t.servedModelName.setValue(Bp(n,"--served-model-name").flatMap(r=>r.split(/\s+/)).map(r=>r.trim()).filter(Boolean).join(", ")),t.tokenizer.setValue(tn(n,"--tokenizer","")),t.dtype.setValue(tn(n,"--dtype",A.dtype)),t.tensorParallelSize.setValue(qt(n,"--tensor-parallel-size",A.tensorParallelSize)),t.pipelineParallelSize.setValue(qt(n,"--pipeline-parallel-size",A.pipelineParallelSize)),t.maxParallelLoadingWorkers.setValue(qt(n,"--max-parallel-loading-workers",A.maxParallelLoadingWorkers)),t.gpuMemoryUtilization.setValue(fo(n,"--gpu-memory-utilization",A.gpuMemoryUtilization)),t.swapSpace.setValue(fo(n,"--swap-space",A.swapSpace)),t.cpuOffloadGb.setValue(fo(n,"--cpu-offload-gb",A.cpuOffloadGb)),t.kvCacheMemory.setValue(qt(n,"--kv-cache-memory-bytes",A.kvCacheMemory)),t.attentionBackend.setValue(tn(n,"--attention-backend",A.attentionBackend)),t.maxModelLen.setValue(li(qt(n,"--max-model-len",A.maxModelLen),1)),t.maxNumSeqs.setValue(qt(n,"--max-num-seqs",A.maxNumSeqs)),t.maxNumBatchedTokens.setValue(qt(n,"--max-num-batched-tokens",A.maxNumBatchedTokens)),t.blockSize.setValue(qt(n,"--block-size",A.blockSize)),t.enableChunkedPrefill.setValue(kC(n,"--enable-chunked-prefill","--no-enable-chunked-prefill",A.enableChunkedPrefill)),t.specMethod.setValue(tn(n,"--spec-method",A.specMethod)),t.specTokens.setValue(qt(n,"--spec-tokens",A.specTokens)),t.specDraftModel.setValue(tn(n,"--spec-draft-model","")),t.specDraftTensorParallelSize.setValue(qt(n,"--spec-draft-tensor-parallel-size",A.specDraftTensorParallelSize)),t.specNumDraftTokens.setValue(qt(n,"--num-spec-tokens",A.specNumDraftTokens)),t.temperature.setValue(fo(n,"--temperature",A.temperature)),t.topP.setValue(fo(n,"--top-p",A.topP)),t.topK.setValue(qt(n,"--top-k",A.topK)),t.minP.setValue(fo(n,"--min-p",A.minP)),t.seed.setValue(qt(n,"--seed",A.seed)),t.repetitionPenalty.setValue(fo(n,"--repetition-penalty",A.repetitionPenalty)),t.maxNumSeq.setValue(qt(n,"--max-num-seq",A.maxNumSeq)),t.trustRemoteCode.setValue(n.some(r=>r.split(/\s|=/)[0]==="--trust-remote-code")),t.enableAutoToolChoice.setValue(n.some(r=>r.split(/\s|=/)[0]==="--enable-auto-tool-choice")),t.toolCallParser.setValue(tn(n,"--tool-call-parser","")),t.reasoningParser.setValue(tn(n,"--reasoning-parser","")),t.enablePrefixCaching.setValue(tn(n,"--enable-prefix-caching",A.enablePrefixCaching)),t.apiKey.setValue(tn(n,"--api-key","")),t.extraFlags.setValue(this.extractExtraFlags(n).join(`
5591
5591
  `)),e.environment){let r=Object.entries(e.environment),u=r.find(([f])=>f==="HIP_VISIBLE_DEVICES")??r.find(([f])=>f==="CUDA_VISIBLE_DEVICES");u&&t.deviceIds.setValue(u[1].split(",").map(f=>parseInt(f.trim(),10)).filter(f=>!isNaN(f)));let h=r.filter(([f])=>f!==u?.[0]).map(([f,b])=>`${f}=${b}`).join(`
5592
5592
  `);h&&t.envText.setValue(h+`
5593
5593
  `)}t.user.setValue(e.user??""),t.group.setValue(e.group??""),t.restart.setValue(e.restart??"no")}extractExtraFlags(e){let t=new Set(["--host","--port","--served-model-name","--tokenizer","--dtype","--tensor-parallel-size","--pipeline-parallel-size","--max-parallel-loading-workers","--gpu-memory-utilization","--swap-space","--cpu-offload-gb","--kv-cache-memory-bytes","--attention-backend","--max-model-len","--max-num-seqs","--max-num-batched-tokens","--block-size","--enable-chunked-prefill","--no-enable-chunked-prefill","--spec-method","--spec-tokens","--spec-draft-model","--spec-draft-tensor-parallel-size","--num-spec-tokens","--temperature","--top-p","--top-k","--min-p","--seed","--repetition-penalty","--max-num-seq","--trust-remote-code","--enable-auto-tool-choice","--tool-call-parser","--reasoning-parser","--enable-prefix-caching","--api-key"]),n=[];for(let a of e){let r=a.split(/\s|=/)[0];a.startsWith("--")&&!t.has(r)&&n.push(a)}return n}addIf(e,t,n,a){String(n)!==String(a)&&e.push(`${t} ${n}`)}addTri(e,t,n){t==="on"?e.push(n):t==="off"&&e.push(`--no-${n.slice(2)}`)}buildFlags(){let e=[],t=this.form.controls,n=(t.model.value??"").trim();n&&e.push(`serve ${n}`);let a=(t.servedModelName.value??"").split(",").map(u=>u.trim()).filter(Boolean);a.length&&e.push(`--served-model-name ${a.join(" ")}`),this.addIf(e,"--host",t.host.value,A.host),this.addIf(e,"--port",t.port.value,A.port),this.addIf(e,"--tokenizer",(t.tokenizer.value??"").trim(),A.tokenizer),this.addIf(e,"--dtype",t.dtype.value,A.dtype),this.addIf(e,"--tensor-parallel-size",t.tensorParallelSize.value,A.tensorParallelSize),this.addIf(e,"--pipeline-parallel-size",t.pipelineParallelSize.value,A.pipelineParallelSize),this.addIf(e,"--max-parallel-loading-workers",t.maxParallelLoadingWorkers.value,A.maxParallelLoadingWorkers),this.addIf(e,"--swap-space",t.swapSpace.value,A.swapSpace),this.addIf(e,"--cpu-offload-gb",t.cpuOffloadGb.value,A.cpuOffloadGb),this.addIf(e,"--max-model-len",+yi(t.maxModelLen.value??""),A.maxModelLen),this.addIf(e,"--max-num-seqs",t.maxNumSeqs.value,A.maxNumSeqs),this.addIf(e,"--block-size",t.blockSize.value,A.blockSize);let r=t.specMethod.value;r&&r!==A.specMethod&&(e.push(`--spec-method ${r}`),this.addIf(e,"--spec-tokens",t.specTokens.value,A.specTokens),this.showSpecDraftParams()&&(this.addIf(e,"--spec-draft-model",(t.specDraftModel.value??"").trim(),A.specDraftModel),this.addIf(e,"--spec-draft-tensor-parallel-size",t.specDraftTensorParallelSize.value,A.specDraftTensorParallelSize),this.addIf(e,"--num-spec-tokens",t.specNumDraftTokens.value,A.specNumDraftTokens))),this.addIf(e,"--gpu-memory-utilization",t.gpuMemoryUtilization.value,A.gpuMemoryUtilization),t.trustRemoteCode.value&&e.push("--trust-remote-code"),t.enableAutoToolChoice.value&&e.push("--enable-auto-tool-choice"),this.addIf(e,"--tool-call-parser",t.toolCallParser.value,A.toolCallParser),this.addIf(e,"--reasoning-parser",t.reasoningParser.value,A.reasoningParser),this.addTri(e,t.enableChunkedPrefill.value,"--enable-chunked-prefill"),this.addIf(e,"--attention-backend",t.attentionBackend.value,A.attentionBackend),this.addIf(e,"--max-num-batched-tokens",t.maxNumBatchedTokens.value,A.maxNumBatchedTokens),String(t.kvCacheMemory.value)!==String(A.kvCacheMemory)&&e.push(`--kv-cache-memory-bytes=${t.kvCacheMemory.value}`),this.addIf(e,"--temperature",t.temperature.value,A.temperature),this.addIf(e,"--top-p",t.topP.value,A.topP),this.addIf(e,"--top-k",t.topK.value,A.topK),this.addIf(e,"--min-p",t.minP.value,A.minP),this.addIf(e,"--seed",t.seed.value,A.seed),this.addIf(e,"--repetition-penalty",t.repetitionPenalty.value,A.repetitionPenalty),this.addIf(e,"--max-num-seq",t.maxNumSeq.value,A.maxNumSeq),this.addIf(e,"--enable-prefix-caching",t.enablePrefixCaching.value,A.enablePrefixCaching),this.addIf(e,"--api-key",(t.apiKey.value??"").trim(),A.apiKey);for(let u of t.extraFlags.value.split(`
5594
5594
  `)){let h=u.trim();h&&h.startsWith("--")&&e.push(h)}return e}parseEnvironment(){let e={};for(let t of this.form.controls.envText.value.split(`
5595
5595
  `)){let n=t.trim();if(!n||n.startsWith("#"))continue;let a=n.indexOf("=");a<=0||(e[n.slice(0,a).trim()]=n.slice(a+1))}return e}save(){if(this.form.invalid)return;let e=this.parseEnvironment();this.applyVisibleDevices(e);let t=V({name:this.form.controls.name.value.trim(),type:"vllm",command:this.form.controls.command.value.trim(),flags:this.buildFlags()},Object.keys(e).length?{environment:e}:{}),n=(this.form.controls.user.value??"").trim(),a=(this.form.controls.group.value??"").trim(),r=this.form.controls.restart.value;n&&(t.user=n),a&&(t.group=a),r&&r!=="no"&&(t.restart=r),this.data.config?.workingDirectory&&(t.workingDirectory=this.data.config.workingDirectory),this.data.config?.stopCommand&&(t.stopCommand=this.data.config.stopCommand),this.dialogRef.close(t)}applyVisibleDevices(e){let t=this.form.controls.deviceIds.value??[];if(!t.length)return;delete e.HIP_VISIBLE_DEVICES,delete e.CUDA_VISIBLE_DEVICES;let n=this.availableGpus(),a=n.filter(u=>t.includes(u.gpuIndex)),r=a.length?a.some(u=>u.vendor==="AMD"):n.some(u=>u.vendor==="AMD");e[r?"HIP_VISIBLE_DEVICES":"CUDA_VISIBLE_DEVICES"]=t.join(",")}cancel(){this.dialogRef.close()}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=R({type:i,selectors:[["app-vllm-dialog"]],decls:282,vars:108,consts:[["commandAuto","matAutocomplete"],["modelAuto","matAutocomplete"],["maxLenAuto","matAutocomplete"],["hostAuto","matAutocomplete"],["mat-dialog-title",""],[1,"vllm-form",3,"formGroup"],["appearance","outline",1,"full-width"],["matInput","","formControlName","name","placeholder","e.g. vllm-qwen-bf16-4gpu"],["matInput","","formControlName","command","placeholder","/path/to/vllm/run.sh",3,"matAutocomplete"],[3,"value"],["expanded",""],["matInput","","formControlName","model","placeholder","unsloth/Qwen3.8-27B or /path/to/model","matTooltip","Model to serve. HF repo id or local path. Passed as the positional argument to 'vllm serve'",3,"matAutocomplete"],["matInput","","formControlName","servedModelName","type","text","placeholder","e.g. qwen-256k, qwen-256k-fast","matTooltip","Name(s) the model is served under. List several separated by commas \u2014 emitted as a single --served-model-name flag with names separated by spaces"],[1,"form-row"],["appearance","outline",1,"form-col"],["matInput","","formControlName","tokenizer","type","text","matTooltip","Tokenizer path (HF repo id or local). Defaults to the model path"],["formControlName","dtype","matTooltip","Data type for model weights and activations"],["matInput","","formControlName","tensorParallelSize","type","number","matTooltip","Number of tensor-parallel replicas (GPUs sharding each model copy). 1 = single GPU"],["matInput","","formControlName","pipelineParallelSize","type","number","matTooltip","Number of pipeline-parallel replicas (model split in stages across GPU groups)"],["matInput","","formControlName","maxParallelLoadingWorkers","type","number","matTooltip","Max number of parallel workers for safetensors loading. 0 = default"],["matInput","","formControlName","gpuMemoryUtilization","type","number","step","0.05","min","0","max","1","matTooltip","Fraction of GPU memory to reserve for the model and KV cache (0.0\u20131.0)"],["matInput","","formControlName","swapSpace","type","number","matTooltip","CPU offload space per GPU (GiB)"],["matInput","","formControlName","cpuOffloadGb","type","number","matTooltip","Space to offload model weights to CPU (GiB). 0 = disabled"],["formControlName","attentionBackend","matTooltip","Attention kernel backend override. TRITON_ATTN is the tested choice on ROCm (4x RX 7900 XTX). Empty = auto"],["value",""],["matInput","","formControlName","kvCacheMemory","type","number","matTooltip","Explicit KV cache size in bytes. 0 = auto (derived from GPU memory utilization)"],["formControlName","deviceIds","multiple","","placeholder","GPU numbers","matTooltip","Selected GPU numbers are saved into the service environment as HIP_VISIBLE_DEVICES (AMD) or CUDA_VISIBLE_DEVICES (NVIDIA). Empty = leave env as-is (all GPUs)"],["matInput","","formControlName","maxModelLen","type","text","placeholder","e.g. 24K, 262144","matTooltip","Model context length. Supports: 20000, 20K. Empty = model's max. Large values need more KV cache",3,"blur","keyup.enter","matAutocomplete"],["matInput","","formControlName","maxNumSeqs","type","number","matTooltip","Maximum number of sequences per iteration (concurrent requests)"],["formControlName","enableChunkedPrefill","matTooltip","Split long prompts into chunks for continuous batching. auto = decided by vLLM"],["value","auto"],["value","on"],["value","off"],["matInput","","formControlName","maxNumBatchedTokens","type","number","matTooltip","Max number of tokens per batch (prefill+decode budget). 0 = default"],["matInput","","formControlName","blockSize","type","number","matTooltip","Token block size for the paged KV cache. 0 = default (platform-specific)"],["formControlName","specMethod","matTooltip","Speculative decoding method. draft-model variants use a separate draft model"],["matInput","","formControlName","specTokens","type","number","matTooltip","Number of speculative tokens (proposal length). 0 = method default"],["matInput","","formControlName","temperature","type","number","matTooltip","Default temperature. 1.0 = default"],["matInput","","formControlName","topP","type","number","step","0.05","matTooltip","Nucleus sampling. 1.0 = default"],["matInput","","formControlName","topK","type","number","matTooltip","Top-K sampling. -1 = disabled (default)"],["matInput","","formControlName","minP","type","number","step","0.05","matTooltip","Min-P sampling threshold. 0.0 = disabled (default)"],["matInput","","formControlName","seed","type","number","matTooltip","RNG seed. -1 = random (default)"],["matInput","","formControlName","repetitionPenalty","type","number","step","0.05","matTooltip","Penalty for repeating tokens. 1.0 = disabled (default)"],["matInput","","formControlName","maxNumSeq","type","number","matTooltip","Maximum number of tokens per sequence. 0 = model default"],["formControlName","trustRemoteCode"],["formControlName","enableAutoToolChoice"],["formControlName","toolCallParser","matTooltip","Parser for tool calls. Requires --enable-auto-tool-choice"],["formControlName","reasoningParser","matTooltip","Parser separating reasoning content from final content in chat completions"],["formControlName","enablePrefixCaching","matTooltip","Cache prefixes of prompts to speed up repeated requests. auto = decided by vLLM"],["matInput","","formControlName","host","type","text","matTooltip","IP address to listen (default: 127.0.0.1)",3,"matAutocomplete"],["matInput","","formControlName","port","type","number","matTooltip","Port to listen (default: 8000)"],["matInput","","formControlName","apiKey","type","text","matTooltip","API key for authentication. Leave empty if the launcher adds it itself (e.g. run.sh reads keys.ini)"],["matInput","","formControlName","extraFlags","rows","4","wrap","off","placeholder",`--enforce-eager
5596
5596
  --disable-log-requests`,"matTooltip","Any vLLM flags not covered by the fields above (one per line). Pass-through \u2014 not validated",1,"flags-textarea"],["matInput","","formControlName","envText","rows","4","wrap","off","placeholder",`HF_TOKEN=hf_xxx
5597
- FLASH_ATTENTION_TRITON_AMD_ENABLE=TRUE`,"matTooltip","Environment variables for the service process (KEY=VALUE, one per line)",1,"env-textarea"],["matInput","","formControlName","user","placeholder","llama",3,"matTooltip"],["matInput","","formControlName","group","placeholder","ai",3,"matTooltip"],["formControlName","restart"],["align","end"],["mat-stroked-button","",3,"click"],["mat-raised-button","","color","primary",3,"click","disabled"],[1,"auto-path"],[1,"auto-from"],[1,"subsection-label"],["appearance","outline",1,"form-col-60"],["matInput","","formControlName","specDraftModel","type","text","placeholder","/path/to/draft-model or HF repo id","matTooltip","Draft model for speculative decoding (draft-model methods)"],["matInput","","formControlName","specDraftTensorParallelSize","type","number","matTooltip","Tensor parallel size of the draft model. 0 = same as main model"],["matInput","","formControlName","specNumDraftTokens","type","number","matTooltip","Number of tokens the draft model proposes in one step. 0 = default"]],template:function(t,n){if(t&1&&(s(0,"h2",4),d(1),l(),s(2,"mat-dialog-content")(3,"form",5)(4,"mat-form-field",6),_(5,"input",7),y(),s(6,"mat-label"),d(7,"Service Name"),l(),w(8,tC,2,0,"mat-error")(9,iC,2,0,"mat-error")(10,nC,2,0,"mat-error"),l(),s(11,"mat-form-field",6),_(12,"input",8),y(),s(13,"mat-label"),d(14,"Command (launcher or binary)"),l(),w(15,oC,2,0,"mat-error"),l(),s(16,"mat-autocomplete",null,0),ee(18,aC,5,3,"mat-option",9,Yy),l(),s(20,"mat-expansion-panel",10)(21,"mat-expansion-panel-header")(22,"mat-panel-title"),d(23,"Model"),l()(),s(24,"mat-form-field",6),_(25,"input",11),y(),s(26,"mat-label"),d(27,"Model (serve)"),l(),w(28,rC,2,0,"mat-error"),l(),s(29,"mat-autocomplete",null,1),ee(31,sC,5,2,"mat-option",9,Ye),l(),s(33,"mat-form-field",6),_(34,"input",12),y(),s(35,"mat-label"),d(36,"Served Model Name"),l()(),s(37,"div",13)(38,"mat-form-field",14),_(39,"input",15),y(),s(40,"mat-label"),d(41,"Tokenizer"),l()(),s(42,"mat-form-field",14)(43,"mat-select",16),ee(44,lC,2,2,"mat-option",9,Ye),l(),y(),s(46,"mat-label"),d(47,"Dtype"),l()()()(),s(48,"mat-expansion-panel")(49,"mat-expansion-panel-header")(50,"mat-panel-title"),d(51,"Parallelism & Memory"),l()(),s(52,"div",13)(53,"mat-form-field",14),_(54,"input",17),y(),s(55,"mat-label"),d(56,"Tensor Parallel Size"),l()(),s(57,"mat-form-field",14),_(58,"input",18),y(),s(59,"mat-label"),d(60,"Pipeline Parallel Size"),l()(),s(61,"mat-form-field",14),_(62,"input",19),y(),s(63,"mat-label"),d(64,"Loading Workers"),l()()(),s(65,"div",13)(66,"mat-form-field",14),_(67,"input",20),y(),s(68,"mat-label"),d(69,"GPU Memory Utilization"),l()(),s(70,"mat-form-field",14),_(71,"input",21),y(),s(72,"mat-label"),d(73,"Swap Space (GiB)"),l()(),s(74,"mat-form-field",14),_(75,"input",22),y(),s(76,"mat-label"),d(77,"CPU Offload (GiB)"),l()()(),s(78,"div",13)(79,"mat-form-field",14)(80,"mat-select",23)(81,"mat-option",24),d(82,"(auto)"),l(),ee(83,cC,2,2,"mat-option",9,Ye),l(),y(),s(85,"mat-label"),d(86,"Attention Backend"),l()(),s(87,"mat-form-field",14),_(88,"input",25),y(),s(89,"mat-label"),d(90,"KV Cache Memory (bytes)"),l()(),s(91,"mat-form-field",14)(92,"mat-select",26),ee(93,dC,2,2,"mat-option",9,Zy),l(),y(),s(95,"mat-label"),d(96,"Visible GPUs"),l()()()(),s(97,"mat-expansion-panel")(98,"mat-expansion-panel-header")(99,"mat-panel-title"),d(100,"Context & Scheduling"),l()(),s(101,"div",13)(102,"mat-form-field",14)(103,"input",27),S("blur",function(){return n.onMaxLenInput()})("keyup.enter",function(){return n.onMaxLenInput()}),l(),y(),s(104,"mat-label"),d(105,"Max Model Len"),l()(),s(106,"mat-autocomplete",null,2),ee(108,mC,2,2,"mat-option",9,Qy),l(),s(110,"mat-form-field",14),_(111,"input",28),y(),s(112,"mat-label"),d(113,"Max Num Seqs"),l()(),s(114,"mat-form-field",14)(115,"mat-select",29)(116,"mat-option",30),d(117,"auto"),l(),s(118,"mat-option",31),d(119,"on"),l(),s(120,"mat-option",32),d(121,"off"),l()(),y(),s(122,"mat-label"),d(123,"Chunked Prefill"),l()()(),s(124,"div",13)(125,"mat-form-field",14),_(126,"input",33),y(),s(127,"mat-label"),d(128,"Max Batched Tokens"),l()(),s(129,"mat-form-field",14),_(130,"input",34),y(),s(131,"mat-label"),d(132,"Block Size"),l()()()(),s(133,"mat-expansion-panel")(134,"mat-expansion-panel-header")(135,"mat-panel-title"),d(136,"Speculative Decoding"),l(),s(137,"mat-panel-description"),d(138,"Draft method and speculative options"),l()(),s(139,"div",13)(140,"mat-form-field",14)(141,"mat-select",35),ee(142,uC,2,2,"mat-option",9,Jy),l(),y(),s(144,"mat-label"),d(145,"Spec Method"),l()(),s(146,"mat-form-field",14),_(147,"input",36),y(),s(148,"mat-label"),d(149,"Spec Tokens"),l()()(),w(150,hC,15,6),l(),s(151,"mat-expansion-panel")(152,"mat-expansion-panel-header")(153,"mat-panel-title"),d(154,"Sampling Defaults"),l(),s(155,"mat-panel-description"),d(156,"Default sampling parameters for generation"),l()(),s(157,"div",13)(158,"mat-form-field",14),_(159,"input",37),y(),s(160,"mat-label"),d(161,"Temperature"),l()(),s(162,"mat-form-field",14),_(163,"input",38),y(),s(164,"mat-label"),d(165,"Top-P"),l()(),s(166,"mat-form-field",14),_(167,"input",39),y(),s(168,"mat-label"),d(169,"Top-K"),l()(),s(170,"mat-form-field",14),_(171,"input",40),y(),s(172,"mat-label"),d(173,"Min-P"),l()()(),s(174,"div",13)(175,"mat-form-field",14),_(176,"input",41),y(),s(177,"mat-label"),d(178,"Seed"),l()(),s(179,"mat-form-field",14),_(180,"input",42),y(),s(181,"mat-label"),d(182,"Repetition Penalty"),l()(),s(183,"mat-form-field",14),_(184,"input",43),y(),s(185,"mat-label"),d(186,"Max Tokens (seq)"),l()()()(),s(187,"mat-expansion-panel")(188,"mat-expansion-panel-header")(189,"mat-panel-title"),d(190,"Tools & Chat"),l(),s(191,"mat-panel-description"),d(192,"Tool calling, reasoning and cache options"),l()(),s(193,"div",13)(194,"mat-checkbox",44),d(195," Trust Remote Code "),l(),y(),s(196,"mat-checkbox",45),d(197," Enable Auto Tool Choice "),l(),y(),l(),s(198,"div",13)(199,"mat-form-field",14)(200,"mat-select",46),ee(201,pC,2,2,"mat-option",9,Ye),l(),y(),s(203,"mat-label"),d(204,"Tool Call Parser"),l()(),s(205,"mat-form-field",14)(206,"mat-select",47),ee(207,fC,2,2,"mat-option",9,Ye),l(),y(),s(209,"mat-label"),d(210,"Reasoning Parser"),l()(),s(211,"mat-form-field",14)(212,"mat-select",48)(213,"mat-option",30),d(214,"auto"),l(),s(215,"mat-option",31),d(216,"on"),l(),s(217,"mat-option",32),d(218,"off"),l()(),y(),s(219,"mat-label"),d(220,"Prefix Caching"),l()()()(),s(221,"mat-expansion-panel")(222,"mat-expansion-panel-header")(223,"mat-panel-title"),d(224,"Server & Network"),l()(),s(225,"div",13)(226,"mat-form-field",14),_(227,"input",49),y(),s(228,"mat-label"),d(229,"Host"),l()(),s(230,"mat-autocomplete",null,3),ee(232,gC,5,3,"mat-option",9,eC),l(),s(234,"mat-form-field",14),_(235,"input",50),y(),s(236,"mat-label"),d(237,"Port"),l()(),s(238,"mat-form-field",14),_(239,"input",51),y(),s(240,"mat-label"),d(241,"API Key"),l()()()(),s(242,"mat-expansion-panel")(243,"mat-expansion-panel-header")(244,"mat-panel-title"),d(245,"Additional"),l(),s(246,"mat-panel-description"),d(247,"Extra CLI flags and environment variables"),l()(),s(248,"mat-form-field",6),_(249,"textarea",52),y(),s(250,"mat-label"),d(251,"Extra CLI Flags (one per line)"),l()(),s(252,"mat-form-field",6),_(253,"textarea",53),y(),s(254,"mat-label"),d(255,"Environment variables (KEY=VALUE, one per line)"),l()()(),s(256,"mat-expansion-panel")(257,"mat-expansion-panel-header")(258,"mat-panel-title"),d(259,"Service unit"),l(),s(260,"mat-panel-description"),d(261,"systemd User / Group / Restart policy"),l()(),s(262,"div",13)(263,"mat-form-field",14),_(264,"input",54),y(),s(265,"mat-label"),d(266,"Run as user"),l()(),s(267,"mat-form-field",14),_(268,"input",55),y(),s(269,"mat-label"),d(270,"Run as group"),l()(),s(271,"mat-form-field",14)(272,"mat-select",56),ee(273,_C,2,2,"mat-option",9,Ye),l(),y(),s(275,"mat-label"),d(276,"Restart policy"),l()()()()()(),s(277,"mat-dialog-actions",57)(278,"button",58),S("click",function(){return n.cancel()}),d(279,"Cancel"),l(),s(280,"button",59),S("click",function(){return n.save()}),d(281),l()()),t&2){let a=Se(17),r=Se(30),u=Se(107),h=Se(231);c(),Q("",n.isClone?"Clone":n.isEdit?"Edit":"Add"," vllm service"),c(2),x("formGroup",n.form),c(),p("changed",n.isControlChanged("name")),c(),C(),c(3),D(n.form.controls.name.errors?.required?8:n.form.controls.name.errors?.pattern?9:n.form.controls.name.errors?.nameTaken?10:-1),c(3),p("changed",n.isControlChanged("command")),c(),x("matAutocomplete",a),C(),c(3),D(n.form.controls.command.errors?.required?15:-1),c(3),te(n.filteredCommands()),c(2),p("has-changed",n.isSectionChanged("model","tokenizer","dtype","servedModelName")),c(4),p("changed",n.isControlChanged("model")),c(),x("matAutocomplete",r),C(),c(3),D(n.form.controls.model.errors?.required?28:-1),c(3),te(n.existingModelPaths()),c(2),p("changed",n.isControlChanged("servedModelName")),c(),C(),c(4),p("changed",n.isControlChanged("tokenizer")),c(),C(),c(3),p("changed",n.isControlChanged("dtype")),c(),C(),c(),te(n.dtypeOptions),c(4),p("has-changed",n.isSectionChanged("tensorParallelSize","pipelineParallelSize","maxParallelLoadingWorkers","gpuMemoryUtilization","swapSpace","cpuOffloadGb","kvCacheMemory","deviceIds","attentionBackend")),c(5),p("changed",n.isControlChanged("tensorParallelSize")),c(),C(),c(3),p("changed",n.isControlChanged("pipelineParallelSize")),c(),C(),c(3),p("changed",n.isControlChanged("maxParallelLoadingWorkers")),c(),C(),c(4),p("changed",n.isControlChanged("gpuMemoryUtilization")),c(),C(),c(3),p("changed",n.isControlChanged("swapSpace")),c(),C(),c(3),p("changed",n.isControlChanged("cpuOffloadGb")),c(),C(),c(4),p("changed",n.isControlChanged("attentionBackend")),c(),C(),c(3),te(n.attentionBackends),c(4),p("changed",n.isControlChanged("kvCacheMemory")),c(),C(),c(3),p("changed",n.isControlChanged("deviceIds")),c(),C(),c(),te(n.availableGpus()),c(4),p("has-changed",n.isSectionChanged("maxModelLen","maxNumSeqs","maxNumBatchedTokens","blockSize","enableChunkedPrefill")),c(5),p("changed",n.isControlChanged("maxModelLen")),c(),x("matAutocomplete",u),C(),c(5),te(n.maxLenPresets()),c(2),p("changed",n.isControlChanged("maxNumSeqs")),c(),C(),c(3),p("changed",n.isControlChanged("enableChunkedPrefill")),c(),C(),c(10),p("changed",n.isControlChanged("maxNumBatchedTokens")),c(),C(),c(3),p("changed",n.isControlChanged("blockSize")),c(),C(),c(3),p("has-changed",n.isSectionChanged("specMethod","specTokens","specDraftModel","specDraftTensorParallelSize","specNumDraftTokens")),c(7),p("changed",n.isControlChanged("specMethod")),c(),C(),c(),te(n.specMethods),c(4),p("changed",n.isControlChanged("specTokens")),c(),C(),c(3),D(n.showSpecDraftParams()?150:-1),c(),p("has-changed",n.isSectionChanged("temperature","topP","topK","minP","seed","repetitionPenalty","maxNumSeq")),c(7),p("changed",n.isControlChanged("temperature")),c(),C(),c(3),p("changed",n.isControlChanged("topP")),c(),C(),c(3),p("changed",n.isControlChanged("topK")),c(),C(),c(3),p("changed",n.isControlChanged("minP")),c(),C(),c(4),p("changed",n.isControlChanged("seed")),c(),C(),c(3),p("changed",n.isControlChanged("repetitionPenalty")),c(),C(),c(3),p("changed",n.isControlChanged("maxNumSeq")),c(),C(),c(3),p("has-changed",n.isSectionChanged("trustRemoteCode","enableAutoToolChoice","toolCallParser","reasoningParser","enablePrefixCaching")),c(7),p("changed",n.isControlChanged("trustRemoteCode")),C(),c(2),p("changed",n.isControlChanged("enableAutoToolChoice")),C(),c(3),p("changed",n.isControlChanged("toolCallParser")),c(),C(),c(),te(n.toolCallParsers),c(4),p("changed",n.isControlChanged("reasoningParser")),c(),C(),c(),te(n.reasoningParsers),c(4),p("changed",n.isControlChanged("enablePrefixCaching")),c(),C(),c(9),p("has-changed",n.isSectionChanged("host","port","apiKey")),c(5),p("changed",n.isControlChanged("host")),c(),x("matAutocomplete",h),C(),c(5),te(n.filteredHosts()),c(2),p("changed",n.isControlChanged("port")),c(),C(),c(3),p("changed",n.isControlChanged("apiKey")),c(),C(),c(3),p("has-changed",n.isSectionChanged("extraFlags","envText")),c(6),p("changed",n.isControlChanged("extraFlags")),c(),C(),c(3),p("changed",n.isControlChanged("envText")),c(),C(),c(11),x("matTooltip",n.runAs.userHint()),C(),c(4),x("matTooltip",n.runAs.groupHint()),C(),c(4),C(),c(),te(n.restartOptions),c(7),x("disabled",n.form.invalid),c(),Q(" ",n.isEdit&&!n.isClone?"Save":"Create"," ")}},dependencies:[Me,gi,An,Yt,oo,Zt,$i,Ba,pc,Wi,Ut,Ti,Qi,Zi,Dt,Li,ze,Ue,Hn,Yc,oa,uo,ta,na,ia,Mt,ut,_t,qi,Pt,Rt,st,yt,xt,Ct,en,Ji,aa,ho],styles:['@charset "UTF-8";.vllm-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px;min-width:640px}.form-row[_ngcontent-%COMP%]{display:flex;gap:12px;margin-bottom:4px;align-items:center}.form-col[_ngcontent-%COMP%]{flex:1}.form-col-60[_ngcontent-%COMP%]{flex:3}.full-width[_ngcontent-%COMP%]{width:100%}.auto-path[_ngcontent-%COMP%]{font-family:monospace}.auto-from[_ngcontent-%COMP%]{margin-left:8px;opacity:.6;font-size:12px}.flags-textarea[_ngcontent-%COMP%], .env-textarea[_ngcontent-%COMP%]{overflow-x:auto}mat-dialog-content[_ngcontent-%COMP%]{padding-top:10px!important;max-height:80vh}mat-expansion-panel[_ngcontent-%COMP%]{margin-bottom:0}mat-dialog-actions[_ngcontent-%COMP%]{gap:8px}.subsection-label[_ngcontent-%COMP%]{font-size:12px;font-weight:500;color:#0009;margin:4px 0 14px;text-transform:uppercase;letter-spacing:.5px}mat-expansion-panel.has-changed[_ngcontent-%COMP%] mat-panel-title[_ngcontent-%COMP%]{font-weight:700}mat-form-field.changed[_ngcontent-%COMP%] .mat-mdc-form-field-infix input, mat-form-field.changed[_ngcontent-%COMP%] .mat-mdc-form-field-infix .mat-mdc-select{font-weight:700}mat-checkbox.changed[_ngcontent-%COMP%] label{font-weight:700}']})}}return i})();function tn(i,o,e){let t=ra(i,o);return t!==null?t:e}function Wt(i,o,e){let t=ra(i,o);if(t!==null){let n=parseInt(t,10);return isNaN(n)?e:n}return e}function fo(i,o,e){let t=ra(i,o);if(t!==null){let n=parseFloat(t);return isNaN(n)?e:n}return e}function SC(i,o,e,t){let n=null;for(let a of i){let[r,...u]=a.split(/\s+/);r===o?u.join(" ").trim()==="false"?n="off":n="on":r===e&&(n="off")}return n??t}var kC=(i,o)=>o.command,MC=(i,o)=>o.path,EC=(i,o)=>o.label;function TC(i,o){i&1&&(s(0,"mat-error"),d(1,"Required"),l())}function AC(i,o){i&1&&(s(0,"mat-error"),d(1,"Starts with letter, alphanumeric + hyphens/underscores, max 128 chars"),l())}function IC(i,o){i&1&&(s(0,"mat-error"),d(1,"Another service already uses this name"),l())}function RC(i,o){i&1&&(s(0,"mat-error"),d(1,"Required"),l())}function PC(i,o){if(i&1&&(s(0,"mat-option",10)(1,"span",36),d(2),l(),s(3,"span",37),d(4),l()()),i&2){let e=o.$implicit;x("value",e.command),c(2),I(e.command),c(2),Q("(",e.from,")")}}function OC(i,o){if(i&1&&(s(0,"mat-option",10),d(1),l()),i&2){let e=o.$implicit;x("value",e),c(),I(e)}}function FC(i,o){if(i&1&&(s(0,"mat-option",10),d(1),l()),i&2){let e=o.$implicit;x("value",e),c(),I(e)}}function NC(i,o){i&1&&(s(0,"div",17),d(1,"Vision projector"),l())}function LC(i,o){if(i&1&&(s(0,"div",19)(1,"mat-icon"),d(2,"warning"),l(),s(3,"span"),d(4),l()()),i&2){let e=v();c(4),Q(" Vision GPU equals the LLM GPU (",e.form.controls.gpus.value,") \u2014 --fit takes that card's VRAM completely and the projector fails to allocate. Pick another card or set the vision GPU to cpu. ")}}function VC(i,o){if(i&1&&(s(0,"mat-option",10)(1,"span",36),d(2),l(),s(3,"span",37),d(4),l()()),i&2){let e=o.$implicit;x("value",e.path),c(2),I(e.path),c(2),Q("(",e.source,")")}}function BC(i,o){if(i&1&&(s(0,"mat-option",10),d(1),l()),i&2){let e=o.$implicit;x("value",e.label),c(),I(e.label)}}function zC(i,o){if(i&1&&(s(0,"mat-option",10),d(1),l()),i&2){let e=o.$implicit;x("value",e),c(),I(e==="no"?"no (default)":e)}}var Ae={model:"",gpus:"ROCm0",mmproj:"none",mmdev:"ROCm1",host:"0.0.0.0",port:4239,ctxSize:262144,parallel:1,reasoningPreserve:"on",extraFlags:"",envText:""},jp=["MODEL","GPUS","MMPROJ","MMDEV","HOST","PORT","CTX","EXTRA"];function jC(i){let o=(i??"").match(/--parallel(?:[=\s]+)(\d+)/);return o?parseInt(o[1],10):Ae.parallel}function HC(i){return/(^|\s)--no-reasoning-preserve(\s|=|$)/.test(i??"")?"off":"on"}function UC(i,o){let e=Ae[i];return e===void 0?!1:String(o)!==String(e)}var $C="^[a-zA-Z][a-zA-Z0-9_-]{0,127}$",Hp=(()=>{class i{constructor(){this.fb=m(Gi),this.dialogRef=m(et),this.data=m(Ni),this.serviceService=m(wt),this.gpuService=m(Go),this.cdr=m(se),this.destroyRef=m(Vt),this.system=m(Ot),this.runAs=Bn(this.system.windows),this.isEdit=this.data.config!==null,this.isClone=this.data.clone===!0,this.allExistingCommands=P(()=>{let e=this.data.allConfigs??[],t=this.data.config?.name??null,n=new Set,a=[];for(let r of e)r.name!==t&&(n.has(r.command)||(n.add(r.command),a.push({command:r.command,from:r.name})));return a}),this._commandValue=E(this.data.config?.command??""),this.commandValue=this._commandValue.asReadonly(),this.filteredCommands=P(()=>{let e=this.commandValue()?.toLowerCase()??"";return this.allExistingCommands().filter(t=>t.command.toLowerCase().includes(e)||t.from.toLowerCase().includes(e))}),this.form=this.fb.group({name:[this.data.config?.name??"",{validators:[Qe.required,Qe.pattern($C),jn(this.data.allConfigs??[],this.data.config?.name??null)]}],command:[this.data.config?.command??"",Qe.required],model:[Ae.model],gpus:[Ae.gpus],mmproj:[Ae.mmproj],mmdev:[Ae.mmdev],host:[Ae.host],port:[Ae.port],ctxSize:[li(Ae.ctxSize,1)],parallel:[Ae.parallel],reasoningPreserve:[Ae.reasoningPreserve],extraFlags:[Ae.extraFlags],envText:[Ae.envText],user:[this.data.config?.user??""],group:[this.data.config?.group??""],restart:[this.data.config?.restart??"no"]}),this.restartOptions=Vn,this.availableGpus=bi(this.gpuService.fetchGpus().pipe(Et(()=>ge([]))),{initialValue:[]}),this.deviceNames=P(()=>{let e=this.availableGpus().map(t=>`${t.vendor==="NVIDIA"?"CUDA":t.vendor==="AMD"?"ROCm":"GPU"}${t.gpuIndex}`);return[...new Set(e)]}),this.mmdevOffloadValues=["none","cpu"],this.mmdevSuggestions=P(()=>[...this.deviceNames(),...this.mmdevOffloadValues]),this.ctxPresets=P(()=>po.map(e=>({label:li(e,1)}))),this.filteredHosts=bi(this.form.controls.host.valueChanges.pipe(si(),Ee(this.form.controls.host.value),Lt(250),ci(),$e(e=>{let t=(e??"").trim();return t?this.serviceService.getLlamaAutocomplete("host",t).pipe(Et(()=>ge([]))):ge([])})),{initialValue:[]}),this.existingModelPaths=P(()=>this.existingEnvPaths("MODEL")),this.existingMmprojPaths=P(()=>this.existingEnvPaths("MMPROJ")),this.formValue=bi(this.form.valueChanges,{initialValue:this.form.value}),this.mmprojValue=P(()=>(this.formValue()?.mmproj??"").trim()),this.isVisionOn=P(()=>{let e=this.mmprojValue();return e!==""&&e.toLowerCase()!=="none"}),this.isVisionDeviceClash=P(()=>{if(!this.isVisionOn())return!1;let e=(this.formValue()?.mmdev??"").trim().toLowerCase();return!e||this.mmdevOffloadValues.includes(e)?!1:(this.formValue()?.gpus??"").split(",").map(n=>n.trim().toLowerCase()).filter(Boolean).includes(e)}),this.lockedFields=zn(this.form,()=>({group:this.runAs.isGroupDisabled()}))}existingEnvPaths(e){let t=this.data.allConfigs??[],n=this.data.config?.name??null,a=new Set,r=[];for(let u of t){if(u.name===n)continue;let h=u.environment?.[e];h&&!a.has(h)&&(a.add(h),r.push(h))}return r}onCtxSizeInput(){let e=yi(this.form.get("ctxSize")?.value??"");this.form.get("ctxSize")?.setValue(li(e,1),{emitEvent:!1})}isControlChanged(e){let t=this.form.get(e)?.value;return e==="ctxSize"?+yi(t)!==Ae.ctxSize:t!=null&&UC(e,t)}isSectionChanged(...e){return e.some(t=>this.isControlChanged(t))}ngOnInit(){this.system.detectWindows(),this.form.controls.command.valueChanges.pipe(si(this.destroyRef)).subscribe(e=>this._commandValue.set(e)),this.data.config&&this.populateForm(this.data.config),this.form.valueChanges.pipe(si(this.destroyRef)).subscribe(()=>{this.cdr.markForCheck()})}populateForm(e){let t=this.form.controls,n=e.environment??{},a=(f,b)=>n[f]!==void 0?n[f]:b;t.model.setValue(a("MODEL",Ae.model)),t.gpus.setValue(a("GPUS",Ae.gpus)),t.mmproj.setValue(a("MMPROJ",Ae.mmproj)),t.mmdev.setValue(a("MMDEV",Ae.mmdev)),t.host.setValue(a("HOST",Ae.host));let r=parseInt(n.PORT??"",10);t.port.setValue(isNaN(r)?Ae.port:r);let u=parseInt(n.CTX??"",10);t.ctxSize.setValue(li(isNaN(u)?Ae.ctxSize:u,1)),t.parallel.setValue(jC(n.EXTRA)),t.reasoningPreserve.setValue(HC(n.EXTRA)),t.extraFlags.setValue((e.flags??[]).join(`
5597
+ FLASH_ATTENTION_TRITON_AMD_ENABLE=TRUE`,"matTooltip","Environment variables for the service process (KEY=VALUE, one per line)",1,"env-textarea"],["matInput","","formControlName","user","placeholder","llama",3,"matTooltip"],["matInput","","formControlName","group","placeholder","ai",3,"matTooltip"],["formControlName","restart"],["align","end"],["mat-stroked-button","",3,"click"],["mat-raised-button","","color","primary",3,"click","disabled"],[1,"auto-path"],[1,"auto-from"],[1,"subsection-label"],["appearance","outline",1,"form-col-60"],["matInput","","formControlName","specDraftModel","type","text","placeholder","/path/to/draft-model or HF repo id","matTooltip","Draft model for speculative decoding (draft-model methods)"],["matInput","","formControlName","specDraftTensorParallelSize","type","number","matTooltip","Tensor parallel size of the draft model. 0 = same as main model"],["matInput","","formControlName","specNumDraftTokens","type","number","matTooltip","Number of tokens the draft model proposes in one step. 0 = default"]],template:function(t,n){if(t&1&&(s(0,"h2",4),d(1),l(),s(2,"mat-dialog-content")(3,"form",5)(4,"mat-form-field",6),_(5,"input",7),y(),s(6,"mat-label"),d(7,"Service Name"),l(),w(8,iC,2,0,"mat-error")(9,nC,2,0,"mat-error")(10,oC,2,0,"mat-error"),l(),s(11,"mat-form-field",6),_(12,"input",8),y(),s(13,"mat-label"),d(14,"Command (launcher or binary)"),l(),w(15,aC,2,0,"mat-error"),l(),s(16,"mat-autocomplete",null,0),ee(18,rC,5,3,"mat-option",9,Zy),l(),s(20,"mat-expansion-panel",10)(21,"mat-expansion-panel-header")(22,"mat-panel-title"),d(23,"Model"),l()(),s(24,"mat-form-field",6),_(25,"input",11),y(),s(26,"mat-label"),d(27,"Model (serve)"),l(),w(28,sC,2,0,"mat-error"),l(),s(29,"mat-autocomplete",null,1),ee(31,lC,5,2,"mat-option",9,Ye),l(),s(33,"mat-form-field",6),_(34,"input",12),y(),s(35,"mat-label"),d(36,"Served Model Name"),l()(),s(37,"div",13)(38,"mat-form-field",14),_(39,"input",15),y(),s(40,"mat-label"),d(41,"Tokenizer"),l()(),s(42,"mat-form-field",14)(43,"mat-select",16),ee(44,cC,2,2,"mat-option",9,Ye),l(),y(),s(46,"mat-label"),d(47,"Dtype"),l()()()(),s(48,"mat-expansion-panel")(49,"mat-expansion-panel-header")(50,"mat-panel-title"),d(51,"Parallelism & Memory"),l()(),s(52,"div",13)(53,"mat-form-field",14),_(54,"input",17),y(),s(55,"mat-label"),d(56,"Tensor Parallel Size"),l()(),s(57,"mat-form-field",14),_(58,"input",18),y(),s(59,"mat-label"),d(60,"Pipeline Parallel Size"),l()(),s(61,"mat-form-field",14),_(62,"input",19),y(),s(63,"mat-label"),d(64,"Loading Workers"),l()()(),s(65,"div",13)(66,"mat-form-field",14),_(67,"input",20),y(),s(68,"mat-label"),d(69,"GPU Memory Utilization"),l()(),s(70,"mat-form-field",14),_(71,"input",21),y(),s(72,"mat-label"),d(73,"Swap Space (GiB)"),l()(),s(74,"mat-form-field",14),_(75,"input",22),y(),s(76,"mat-label"),d(77,"CPU Offload (GiB)"),l()()(),s(78,"div",13)(79,"mat-form-field",14)(80,"mat-select",23)(81,"mat-option",24),d(82,"(auto)"),l(),ee(83,dC,2,2,"mat-option",9,Ye),l(),y(),s(85,"mat-label"),d(86,"Attention Backend"),l()(),s(87,"mat-form-field",14),_(88,"input",25),y(),s(89,"mat-label"),d(90,"KV Cache Memory (bytes)"),l()(),s(91,"mat-form-field",14)(92,"mat-select",26),ee(93,mC,2,2,"mat-option",9,Qy),l(),y(),s(95,"mat-label"),d(96,"Visible GPUs"),l()()()(),s(97,"mat-expansion-panel")(98,"mat-expansion-panel-header")(99,"mat-panel-title"),d(100,"Context & Scheduling"),l()(),s(101,"div",13)(102,"mat-form-field",14)(103,"input",27),S("blur",function(){return n.onMaxLenInput()})("keyup.enter",function(){return n.onMaxLenInput()}),l(),y(),s(104,"mat-label"),d(105,"Max Model Len"),l()(),s(106,"mat-autocomplete",null,2),ee(108,uC,2,2,"mat-option",9,Jy),l(),s(110,"mat-form-field",14),_(111,"input",28),y(),s(112,"mat-label"),d(113,"Max Num Seqs"),l()(),s(114,"mat-form-field",14)(115,"mat-select",29)(116,"mat-option",30),d(117,"auto"),l(),s(118,"mat-option",31),d(119,"on"),l(),s(120,"mat-option",32),d(121,"off"),l()(),y(),s(122,"mat-label"),d(123,"Chunked Prefill"),l()()(),s(124,"div",13)(125,"mat-form-field",14),_(126,"input",33),y(),s(127,"mat-label"),d(128,"Max Batched Tokens"),l()(),s(129,"mat-form-field",14),_(130,"input",34),y(),s(131,"mat-label"),d(132,"Block Size"),l()()()(),s(133,"mat-expansion-panel")(134,"mat-expansion-panel-header")(135,"mat-panel-title"),d(136,"Speculative Decoding"),l(),s(137,"mat-panel-description"),d(138,"Draft method and speculative options"),l()(),s(139,"div",13)(140,"mat-form-field",14)(141,"mat-select",35),ee(142,hC,2,2,"mat-option",9,eC),l(),y(),s(144,"mat-label"),d(145,"Spec Method"),l()(),s(146,"mat-form-field",14),_(147,"input",36),y(),s(148,"mat-label"),d(149,"Spec Tokens"),l()()(),w(150,pC,15,6),l(),s(151,"mat-expansion-panel")(152,"mat-expansion-panel-header")(153,"mat-panel-title"),d(154,"Sampling Defaults"),l(),s(155,"mat-panel-description"),d(156,"Default sampling parameters for generation"),l()(),s(157,"div",13)(158,"mat-form-field",14),_(159,"input",37),y(),s(160,"mat-label"),d(161,"Temperature"),l()(),s(162,"mat-form-field",14),_(163,"input",38),y(),s(164,"mat-label"),d(165,"Top-P"),l()(),s(166,"mat-form-field",14),_(167,"input",39),y(),s(168,"mat-label"),d(169,"Top-K"),l()(),s(170,"mat-form-field",14),_(171,"input",40),y(),s(172,"mat-label"),d(173,"Min-P"),l()()(),s(174,"div",13)(175,"mat-form-field",14),_(176,"input",41),y(),s(177,"mat-label"),d(178,"Seed"),l()(),s(179,"mat-form-field",14),_(180,"input",42),y(),s(181,"mat-label"),d(182,"Repetition Penalty"),l()(),s(183,"mat-form-field",14),_(184,"input",43),y(),s(185,"mat-label"),d(186,"Max Tokens (seq)"),l()()()(),s(187,"mat-expansion-panel")(188,"mat-expansion-panel-header")(189,"mat-panel-title"),d(190,"Tools & Chat"),l(),s(191,"mat-panel-description"),d(192,"Tool calling, reasoning and cache options"),l()(),s(193,"div",13)(194,"mat-checkbox",44),d(195," Trust Remote Code "),l(),y(),s(196,"mat-checkbox",45),d(197," Enable Auto Tool Choice "),l(),y(),l(),s(198,"div",13)(199,"mat-form-field",14)(200,"mat-select",46),ee(201,fC,2,2,"mat-option",9,Ye),l(),y(),s(203,"mat-label"),d(204,"Tool Call Parser"),l()(),s(205,"mat-form-field",14)(206,"mat-select",47),ee(207,gC,2,2,"mat-option",9,Ye),l(),y(),s(209,"mat-label"),d(210,"Reasoning Parser"),l()(),s(211,"mat-form-field",14)(212,"mat-select",48)(213,"mat-option",30),d(214,"auto"),l(),s(215,"mat-option",31),d(216,"on"),l(),s(217,"mat-option",32),d(218,"off"),l()(),y(),s(219,"mat-label"),d(220,"Prefix Caching"),l()()()(),s(221,"mat-expansion-panel")(222,"mat-expansion-panel-header")(223,"mat-panel-title"),d(224,"Server & Network"),l()(),s(225,"div",13)(226,"mat-form-field",14),_(227,"input",49),y(),s(228,"mat-label"),d(229,"Host"),l()(),s(230,"mat-autocomplete",null,3),ee(232,_C,5,3,"mat-option",9,tC),l(),s(234,"mat-form-field",14),_(235,"input",50),y(),s(236,"mat-label"),d(237,"Port"),l()(),s(238,"mat-form-field",14),_(239,"input",51),y(),s(240,"mat-label"),d(241,"API Key"),l()()()(),s(242,"mat-expansion-panel")(243,"mat-expansion-panel-header")(244,"mat-panel-title"),d(245,"Additional"),l(),s(246,"mat-panel-description"),d(247,"Extra CLI flags and environment variables"),l()(),s(248,"mat-form-field",6),_(249,"textarea",52),y(),s(250,"mat-label"),d(251,"Extra CLI Flags (one per line)"),l()(),s(252,"mat-form-field",6),_(253,"textarea",53),y(),s(254,"mat-label"),d(255,"Environment variables (KEY=VALUE, one per line)"),l()()(),s(256,"mat-expansion-panel")(257,"mat-expansion-panel-header")(258,"mat-panel-title"),d(259,"Service unit"),l(),s(260,"mat-panel-description"),d(261,"systemd User / Group / Restart policy"),l()(),s(262,"div",13)(263,"mat-form-field",14),_(264,"input",54),y(),s(265,"mat-label"),d(266,"Run as user"),l()(),s(267,"mat-form-field",14),_(268,"input",55),y(),s(269,"mat-label"),d(270,"Run as group"),l()(),s(271,"mat-form-field",14)(272,"mat-select",56),ee(273,vC,2,2,"mat-option",9,Ye),l(),y(),s(275,"mat-label"),d(276,"Restart policy"),l()()()()()(),s(277,"mat-dialog-actions",57)(278,"button",58),S("click",function(){return n.cancel()}),d(279,"Cancel"),l(),s(280,"button",59),S("click",function(){return n.save()}),d(281),l()()),t&2){let a=Se(17),r=Se(30),u=Se(107),h=Se(231);c(),Q("",n.isClone?"Clone":n.isEdit?"Edit":"Add"," vllm service"),c(2),x("formGroup",n.form),c(),p("changed",n.isControlChanged("name")),c(),C(),c(3),D(n.form.controls.name.errors?.required?8:n.form.controls.name.errors?.pattern?9:n.form.controls.name.errors?.nameTaken?10:-1),c(3),p("changed",n.isControlChanged("command")),c(),x("matAutocomplete",a),C(),c(3),D(n.form.controls.command.errors?.required?15:-1),c(3),te(n.filteredCommands()),c(2),p("has-changed",n.isSectionChanged("model","tokenizer","dtype","servedModelName")),c(4),p("changed",n.isControlChanged("model")),c(),x("matAutocomplete",r),C(),c(3),D(n.form.controls.model.errors?.required?28:-1),c(3),te(n.existingModelPaths()),c(2),p("changed",n.isControlChanged("servedModelName")),c(),C(),c(4),p("changed",n.isControlChanged("tokenizer")),c(),C(),c(3),p("changed",n.isControlChanged("dtype")),c(),C(),c(),te(n.dtypeOptions),c(4),p("has-changed",n.isSectionChanged("tensorParallelSize","pipelineParallelSize","maxParallelLoadingWorkers","gpuMemoryUtilization","swapSpace","cpuOffloadGb","kvCacheMemory","deviceIds","attentionBackend")),c(5),p("changed",n.isControlChanged("tensorParallelSize")),c(),C(),c(3),p("changed",n.isControlChanged("pipelineParallelSize")),c(),C(),c(3),p("changed",n.isControlChanged("maxParallelLoadingWorkers")),c(),C(),c(4),p("changed",n.isControlChanged("gpuMemoryUtilization")),c(),C(),c(3),p("changed",n.isControlChanged("swapSpace")),c(),C(),c(3),p("changed",n.isControlChanged("cpuOffloadGb")),c(),C(),c(4),p("changed",n.isControlChanged("attentionBackend")),c(),C(),c(3),te(n.attentionBackends),c(4),p("changed",n.isControlChanged("kvCacheMemory")),c(),C(),c(3),p("changed",n.isControlChanged("deviceIds")),c(),C(),c(),te(n.availableGpus()),c(4),p("has-changed",n.isSectionChanged("maxModelLen","maxNumSeqs","maxNumBatchedTokens","blockSize","enableChunkedPrefill")),c(5),p("changed",n.isControlChanged("maxModelLen")),c(),x("matAutocomplete",u),C(),c(5),te(n.maxLenPresets()),c(2),p("changed",n.isControlChanged("maxNumSeqs")),c(),C(),c(3),p("changed",n.isControlChanged("enableChunkedPrefill")),c(),C(),c(10),p("changed",n.isControlChanged("maxNumBatchedTokens")),c(),C(),c(3),p("changed",n.isControlChanged("blockSize")),c(),C(),c(3),p("has-changed",n.isSectionChanged("specMethod","specTokens","specDraftModel","specDraftTensorParallelSize","specNumDraftTokens")),c(7),p("changed",n.isControlChanged("specMethod")),c(),C(),c(),te(n.specMethods),c(4),p("changed",n.isControlChanged("specTokens")),c(),C(),c(3),D(n.showSpecDraftParams()?150:-1),c(),p("has-changed",n.isSectionChanged("temperature","topP","topK","minP","seed","repetitionPenalty","maxNumSeq")),c(7),p("changed",n.isControlChanged("temperature")),c(),C(),c(3),p("changed",n.isControlChanged("topP")),c(),C(),c(3),p("changed",n.isControlChanged("topK")),c(),C(),c(3),p("changed",n.isControlChanged("minP")),c(),C(),c(4),p("changed",n.isControlChanged("seed")),c(),C(),c(3),p("changed",n.isControlChanged("repetitionPenalty")),c(),C(),c(3),p("changed",n.isControlChanged("maxNumSeq")),c(),C(),c(3),p("has-changed",n.isSectionChanged("trustRemoteCode","enableAutoToolChoice","toolCallParser","reasoningParser","enablePrefixCaching")),c(7),p("changed",n.isControlChanged("trustRemoteCode")),C(),c(2),p("changed",n.isControlChanged("enableAutoToolChoice")),C(),c(3),p("changed",n.isControlChanged("toolCallParser")),c(),C(),c(),te(n.toolCallParsers),c(4),p("changed",n.isControlChanged("reasoningParser")),c(),C(),c(),te(n.reasoningParsers),c(4),p("changed",n.isControlChanged("enablePrefixCaching")),c(),C(),c(9),p("has-changed",n.isSectionChanged("host","port","apiKey")),c(5),p("changed",n.isControlChanged("host")),c(),x("matAutocomplete",h),C(),c(5),te(n.filteredHosts()),c(2),p("changed",n.isControlChanged("port")),c(),C(),c(3),p("changed",n.isControlChanged("apiKey")),c(),C(),c(3),p("has-changed",n.isSectionChanged("extraFlags","envText")),c(6),p("changed",n.isControlChanged("extraFlags")),c(),C(),c(3),p("changed",n.isControlChanged("envText")),c(),C(),c(11),x("matTooltip",n.runAs.userHint()),C(),c(4),x("matTooltip",n.runAs.groupHint()),C(),c(4),C(),c(),te(n.restartOptions),c(7),x("disabled",n.form.invalid),c(),Q(" ",n.isEdit&&!n.isClone?"Save":"Create"," ")}},dependencies:[Me,gi,An,Zt,oo,Qt,$i,Ba,pc,Wi,$t,Ti,Qi,Zi,Dt,Li,ze,Ue,Hn,Yc,oa,uo,ta,na,ia,Mt,ut,_t,qi,Pt,Rt,st,yt,xt,Ct,en,Ji,aa,ho],styles:['@charset "UTF-8";.vllm-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px;min-width:640px}.form-row[_ngcontent-%COMP%]{display:flex;gap:12px;margin-bottom:4px;align-items:center}.form-col[_ngcontent-%COMP%]{flex:1}.form-col-60[_ngcontent-%COMP%]{flex:3}.full-width[_ngcontent-%COMP%]{width:100%}.auto-path[_ngcontent-%COMP%]{font-family:monospace}.auto-from[_ngcontent-%COMP%]{margin-left:8px;opacity:.6;font-size:12px}.flags-textarea[_ngcontent-%COMP%], .env-textarea[_ngcontent-%COMP%]{overflow-x:auto}mat-dialog-content[_ngcontent-%COMP%]{padding-top:10px!important;max-height:80vh}mat-expansion-panel[_ngcontent-%COMP%]{margin-bottom:0}mat-dialog-actions[_ngcontent-%COMP%]{gap:8px}.subsection-label[_ngcontent-%COMP%]{font-size:12px;font-weight:500;color:#0009;margin:4px 0 14px;text-transform:uppercase;letter-spacing:.5px}mat-expansion-panel.has-changed[_ngcontent-%COMP%] mat-panel-title[_ngcontent-%COMP%]{font-weight:700}mat-form-field.changed[_ngcontent-%COMP%] .mat-mdc-form-field-infix input, mat-form-field.changed[_ngcontent-%COMP%] .mat-mdc-form-field-infix .mat-mdc-select{font-weight:700}mat-checkbox.changed[_ngcontent-%COMP%] label{font-weight:700}']})}}return i})();function tn(i,o,e){let t=ra(i,o);return t!==null?t:e}function qt(i,o,e){let t=ra(i,o);if(t!==null){let n=parseInt(t,10);return isNaN(n)?e:n}return e}function fo(i,o,e){let t=ra(i,o);if(t!==null){let n=parseFloat(t);return isNaN(n)?e:n}return e}function kC(i,o,e,t){let n=null;for(let a of i){let[r,...u]=a.split(/\s+/);r===o?u.join(" ").trim()==="false"?n="off":n="on":r===e&&(n="off")}return n??t}var MC=(i,o)=>o.command,EC=(i,o)=>o.path,TC=(i,o)=>o.label;function AC(i,o){i&1&&(s(0,"mat-error"),d(1,"Required"),l())}function IC(i,o){i&1&&(s(0,"mat-error"),d(1,"Starts with letter, alphanumeric + hyphens/underscores, max 128 chars"),l())}function RC(i,o){i&1&&(s(0,"mat-error"),d(1,"Another service already uses this name"),l())}function PC(i,o){i&1&&(s(0,"mat-error"),d(1,"Required"),l())}function OC(i,o){if(i&1&&(s(0,"mat-option",10)(1,"span",36),d(2),l(),s(3,"span",37),d(4),l()()),i&2){let e=o.$implicit;x("value",e.command),c(2),I(e.command),c(2),Q("(",e.from,")")}}function FC(i,o){if(i&1&&(s(0,"mat-option",10),d(1),l()),i&2){let e=o.$implicit;x("value",e),c(),I(e)}}function NC(i,o){if(i&1&&(s(0,"mat-option",10),d(1),l()),i&2){let e=o.$implicit;x("value",e),c(),I(e)}}function LC(i,o){i&1&&(s(0,"div",17),d(1,"Vision projector"),l())}function VC(i,o){if(i&1&&(s(0,"div",19)(1,"mat-icon"),d(2,"warning"),l(),s(3,"span"),d(4),l()()),i&2){let e=v();c(4),Q(" Vision GPU equals the LLM GPU (",e.form.controls.gpus.value,") \u2014 --fit takes that card's VRAM completely and the projector fails to allocate. Pick another card or set the vision GPU to cpu. ")}}function BC(i,o){if(i&1&&(s(0,"mat-option",10)(1,"span",36),d(2),l(),s(3,"span",37),d(4),l()()),i&2){let e=o.$implicit;x("value",e.path),c(2),I(e.path),c(2),Q("(",e.source,")")}}function zC(i,o){if(i&1&&(s(0,"mat-option",10),d(1),l()),i&2){let e=o.$implicit;x("value",e.label),c(),I(e.label)}}function jC(i,o){if(i&1&&(s(0,"mat-option",10),d(1),l()),i&2){let e=o.$implicit;x("value",e),c(),I(e==="no"?"no (default)":e)}}var Ae={model:"",gpus:"ROCm0",mmproj:"none",mmdev:"ROCm1",host:"0.0.0.0",port:4239,ctxSize:262144,parallel:1,reasoningPreserve:"on",extraFlags:"",envText:""},jp=["MODEL","GPUS","MMPROJ","MMDEV","HOST","PORT","CTX","EXTRA"];function HC(i){let o=(i??"").match(/--parallel(?:[=\s]+)(\d+)/);return o?parseInt(o[1],10):Ae.parallel}function UC(i){return/(^|\s)--no-reasoning-preserve(\s|=|$)/.test(i??"")?"off":"on"}function $C(i,o){let e=Ae[i];return e===void 0?!1:String(o)!==String(e)}var GC="^[a-zA-Z][a-zA-Z0-9_-]{0,127}$",Hp=(()=>{class i{constructor(){this.fb=m(Gi),this.dialogRef=m(et),this.data=m(Ni),this.serviceService=m(wt),this.gpuService=m(Go),this.cdr=m(se),this.destroyRef=m(Vt),this.system=m(Ot),this.runAs=Bn(this.system.windows),this.isEdit=this.data.config!==null,this.isClone=this.data.clone===!0,this.allExistingCommands=P(()=>{let e=this.data.allConfigs??[],t=this.data.config?.name??null,n=new Set,a=[];for(let r of e)r.name!==t&&(n.has(r.command)||(n.add(r.command),a.push({command:r.command,from:r.name})));return a}),this._commandValue=E(this.data.config?.command??""),this.commandValue=this._commandValue.asReadonly(),this.filteredCommands=P(()=>{let e=this.commandValue()?.toLowerCase()??"";return this.allExistingCommands().filter(t=>t.command.toLowerCase().includes(e)||t.from.toLowerCase().includes(e))}),this.form=this.fb.group({name:[this.data.config?.name??"",{validators:[Qe.required,Qe.pattern(GC),jn(this.data.allConfigs??[],this.data.config?.name??null)]}],command:[this.data.config?.command??"",Qe.required],model:[Ae.model],gpus:[Ae.gpus],mmproj:[Ae.mmproj],mmdev:[Ae.mmdev],host:[Ae.host],port:[Ae.port],ctxSize:[li(Ae.ctxSize,1)],parallel:[Ae.parallel],reasoningPreserve:[Ae.reasoningPreserve],extraFlags:[Ae.extraFlags],envText:[Ae.envText],user:[this.data.config?.user??""],group:[this.data.config?.group??""],restart:[this.data.config?.restart??"no"]}),this.restartOptions=Vn,this.availableGpus=bi(this.gpuService.fetchGpus().pipe(Et(()=>ge([]))),{initialValue:[]}),this.deviceNames=P(()=>{let e=this.availableGpus().map(t=>`${t.vendor==="NVIDIA"?"CUDA":t.vendor==="AMD"?"ROCm":"GPU"}${t.gpuIndex}`);return[...new Set(e)]}),this.mmdevOffloadValues=["none","cpu"],this.mmdevSuggestions=P(()=>[...this.deviceNames(),...this.mmdevOffloadValues]),this.ctxPresets=P(()=>po.map(e=>({label:li(e,1)}))),this.filteredHosts=bi(this.form.controls.host.valueChanges.pipe(si(),Ee(this.form.controls.host.value),Lt(250),ci(),$e(e=>{let t=(e??"").trim();return t?this.serviceService.getLlamaAutocomplete("host",t).pipe(Et(()=>ge([]))):ge([])})),{initialValue:[]}),this.existingModelPaths=P(()=>this.existingEnvPaths("MODEL")),this.existingMmprojPaths=P(()=>this.existingEnvPaths("MMPROJ")),this.formValue=bi(this.form.valueChanges,{initialValue:this.form.value}),this.mmprojValue=P(()=>(this.formValue()?.mmproj??"").trim()),this.isVisionOn=P(()=>{let e=this.mmprojValue();return e!==""&&e.toLowerCase()!=="none"}),this.isVisionDeviceClash=P(()=>{if(!this.isVisionOn())return!1;let e=(this.formValue()?.mmdev??"").trim().toLowerCase();return!e||this.mmdevOffloadValues.includes(e)?!1:(this.formValue()?.gpus??"").split(",").map(n=>n.trim().toLowerCase()).filter(Boolean).includes(e)}),this.lockedFields=zn(this.form,()=>({group:this.runAs.isGroupDisabled()}))}existingEnvPaths(e){let t=this.data.allConfigs??[],n=this.data.config?.name??null,a=new Set,r=[];for(let u of t){if(u.name===n)continue;let h=u.environment?.[e];h&&!a.has(h)&&(a.add(h),r.push(h))}return r}onCtxSizeInput(){let e=yi(this.form.get("ctxSize")?.value??"");this.form.get("ctxSize")?.setValue(li(e,1),{emitEvent:!1})}isControlChanged(e){let t=this.form.get(e)?.value;return e==="ctxSize"?+yi(t)!==Ae.ctxSize:t!=null&&$C(e,t)}isSectionChanged(...e){return e.some(t=>this.isControlChanged(t))}ngOnInit(){this.system.detectWindows(),this.form.controls.command.valueChanges.pipe(si(this.destroyRef)).subscribe(e=>this._commandValue.set(e)),this.data.config&&this.populateForm(this.data.config),this.form.valueChanges.pipe(si(this.destroyRef)).subscribe(()=>{this.cdr.markForCheck()})}populateForm(e){let t=this.form.controls,n=e.environment??{},a=(f,b)=>n[f]!==void 0?n[f]:b;t.model.setValue(a("MODEL",Ae.model)),t.gpus.setValue(a("GPUS",Ae.gpus)),t.mmproj.setValue(a("MMPROJ",Ae.mmproj)),t.mmdev.setValue(a("MMDEV",Ae.mmdev)),t.host.setValue(a("HOST",Ae.host));let r=parseInt(n.PORT??"",10);t.port.setValue(isNaN(r)?Ae.port:r);let u=parseInt(n.CTX??"",10);t.ctxSize.setValue(li(isNaN(u)?Ae.ctxSize:u,1)),t.parallel.setValue(HC(n.EXTRA)),t.reasoningPreserve.setValue(UC(n.EXTRA)),t.extraFlags.setValue((e.flags??[]).join(`
5598
5598
  `));let h=Object.entries(n).filter(([f])=>!jp.includes(f)).map(([f,b])=>`${f}=${b}`).join(`
5599
5599
  `);h&&t.envText.setValue(h+`
5600
5600
  `),t.user.setValue(e.user??""),t.group.setValue(e.group??""),t.restart.setValue(e.restart??"no")}parseEnvironment(e){let t={};for(let n of e.split(`
5601
5601
  `)){let a=n.trim();if(!a||a.startsWith("#"))continue;let r=a.indexOf("=");if(r<=0)continue;let u=a.slice(0,r).trim();jp.includes(u)||(t[u]=a.slice(r+1))}return t}buildEnvironment(){let e=this.form.controls,t={},n=(h,f,b)=>{f&&f!==b&&(t[h]=f)};n("MODEL",e.model.value.trim(),Ae.model),n("GPUS",e.gpus.value.trim(),Ae.gpus),n("MMPROJ",e.mmproj.value.trim(),Ae.mmproj),n("MMDEV",e.mmdev.value.trim(),Ae.mmdev),n("HOST",e.host.value.trim(),Ae.host),String(e.port.value)!==String(Ae.port)&&(t.PORT=String(e.port.value));let a=+yi(e.ctxSize.value);a>0&&a!==Ae.ctxSize&&(t.CTX=String(a));let r=e.parallel.value??Ae.parallel,u=[];return r!==Ae.parallel&&r>0&&u.push(`--parallel ${r}`),e.reasoningPreserve.value==="off"&&u.push("--no-reasoning-preserve"),u.length&&(t.EXTRA=u.join(" ")),Object.assign(t,this.parseEnvironment(e.envText.value))}save(){if(this.form.invalid)return;let e=this.buildEnvironment(),t=V({name:this.form.controls.name.value.trim(),type:"avalon",command:this.form.controls.command.value.trim(),flags:this.parseExtraFlags()},Object.keys(e).length?{environment:e}:{}),n=(this.form.controls.user.value??"").trim(),a=(this.form.controls.group.value??"").trim(),r=this.form.controls.restart.value;n&&(t.user=n),a&&(t.group=a),r&&r!=="no"&&(t.restart=r),this.data.config?.workingDirectory&&(t.workingDirectory=this.data.config.workingDirectory),this.data.config?.stopCommand&&(t.stopCommand=this.data.config.stopCommand),this.dialogRef.close(t)}parseExtraFlags(){return this.form.controls.extraFlags.value.split(`
5602
5602
  `).map(e=>e.trim()).filter(Boolean)}cancel(){this.dialogRef.close()}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=R({type:i,selectors:[["app-avalon-dialog"]],decls:149,vars:52,consts:[["commandAuto","matAutocomplete"],["gpusAuto","matAutocomplete"],["mmdevAuto","matAutocomplete"],["hostAuto","matAutocomplete"],["ctxAuto","matAutocomplete"],["mat-dialog-title",""],[1,"avalon-form",3,"formGroup"],["appearance","outline",1,"full-width"],["matInput","","formControlName","name","placeholder","e.g. avalon-qwen3_8_fn-q4-1gpu-256k"],["matInput","","formControlName","command","placeholder","/path/to/avalon/run.sh",3,"matAutocomplete"],[3,"value"],["expanded",""],["formControlName","model","label","Model \u2014 first GGUF shard (MODEL)","placeholder","/home/.../Qwen3.8-Flash-Next-UD-Q4_K_XL-00001-of-00004.gguf","fieldClass","full-width",3,"existingPaths"],[1,"form-row"],["appearance","outline",1,"form-col"],["matInput","","formControlName","gpus","type","text","placeholder","ROCm0","matTooltip","LLM card(s) as llama-server names them, comma-separated (GPUS). Passed to --device. --fit is tested on a single card only",3,"matAutocomplete"],["matInput","","formControlName","mmdev","type","text","placeholder","ROCm1","matTooltip","Card for the vision projector (MMDEV). Must differ from the LLM card \u2014 'cpu' or 'none' runs the ViT on the CPU. Ignored while vision is off",3,"matAutocomplete"],[1,"subsection-label"],["formControlName","mmproj","label","mmproj path (MMPROJ)","fieldClass","full-width",3,"placeholder","existingPaths"],["role","alert",1,"hint","hint-warning"],["matInput","","formControlName","host","type","text","matTooltip","Address to bind (HOST). Default: 0.0.0.0",3,"matAutocomplete"],["matInput","","formControlName","port","type","number","matTooltip","API port (PORT). Default: 4239"],["matInput","","formControlName","ctxSize","type","text","placeholder","e.g. 256K, 262144","matTooltip","Context length (CTX). Supports 20000, 20K. Default: 256K",3,"blur","keyup.enter","matAutocomplete"],["matInput","","formControlName","parallel","type","number","min","1","matTooltip","Concurrent requests \u2014 written to EXTRA as --parallel N (last occurrence wins, so it replaces the --parallel 1 of run.sh). 1 = nothing emitted. EXTRA belongs to this and the Reasoning fields: other EXTRA arguments are replaced"],[1,"hint"],["formControlName","reasoningPreserve","matTooltip","Keep reasoning content in the chat history when context is shifted. off = --no-reasoning-preserve in EXTRA; EXTRA belongs to this and the Parallel field, so other EXTRA arguments are replaced"],["value","on"],["value","off"],["matInput","","formControlName","extraFlags","rows","3","wrap","off","placeholder","--dry-run","matTooltip","Arguments appended to the launcher command line, kept verbatim (one per line). run.sh reads no argv \u2014 configure it with the fields above and the environment below",1,"flags-textarea"],["matInput","","formControlName","envText","rows","4","wrap","off","placeholder",`BIN=/path/to/other/build/llama-server
5603
5603
  DRAFT=/path/to/mtp-head.gguf
5604
- GGML_MOE_CACHE_LAYER_DEVICE=ROCm0`,"matTooltip","Environment variables for the service process (KEY=VALUE, one per line). MODEL, GPUS, MMPROJ, MMDEV, HOST, PORT, CTX and EXTRA belong to the fields above and are ignored here",1,"env-textarea"],["matInput","","formControlName","user","placeholder","llama",3,"matTooltip"],["matInput","","formControlName","group","placeholder","ai",3,"matTooltip"],["formControlName","restart"],["align","end"],["mat-stroked-button","",3,"click"],["mat-raised-button","","color","primary",3,"click","disabled"],[1,"auto-path"],[1,"auto-from"]],template:function(t,n){if(t&1&&(s(0,"h2",5),d(1),l(),s(2,"mat-dialog-content")(3,"form",6)(4,"mat-form-field",7),_(5,"input",8),y(),s(6,"mat-label"),d(7,"Service Name"),l(),w(8,TC,2,0,"mat-error")(9,AC,2,0,"mat-error")(10,IC,2,0,"mat-error"),l(),s(11,"mat-form-field",7),_(12,"input",9),y(),s(13,"mat-label"),d(14,"Command (Avalon launcher)"),l(),w(15,RC,2,0,"mat-error"),l(),s(16,"mat-autocomplete",null,0),ee(18,PC,5,3,"mat-option",10,kC),l(),s(20,"mat-expansion-panel",11)(21,"mat-expansion-panel-header")(22,"mat-panel-title"),d(23,"Model"),l(),s(24,"mat-panel-description"),d(25,"Empty = the model built into run.sh"),l()(),_(26,"app-file-autocomplete",12),y(),l(),s(27,"mat-expansion-panel",11)(28,"mat-expansion-panel-header")(29,"mat-panel-title"),d(30,"GPUs & Vision"),l(),s(31,"mat-panel-description"),d(32,"Hosted-MoE layout: dense weights on GPU, experts in RAM"),l()(),s(33,"div",13)(34,"mat-form-field",14),_(35,"input",15),y(),s(36,"mat-label"),d(37,"LLM GPU (GPUS)"),l()(),s(38,"mat-autocomplete",null,1),ee(40,OC,2,2,"mat-option",10,Ye),l(),s(42,"mat-form-field",14),_(43,"input",16),y(),s(44,"mat-label"),d(45,"Vision GPU (MMDEV)"),l()(),s(46,"mat-autocomplete",null,2),ee(48,FC,2,2,"mat-option",10,Ye),l()(),w(50,NC,2,0,"div",17),_(51,"app-file-autocomplete",18),y(),w(52,LC,5,1,"div",19),l(),s(53,"mat-expansion-panel",11)(54,"mat-expansion-panel-header")(55,"mat-panel-title"),d(56,"Server & Context"),l()(),s(57,"div",13)(58,"mat-form-field",14),_(59,"input",20),y(),s(60,"mat-label"),d(61,"Host"),l()(),s(62,"mat-autocomplete",null,3),ee(64,VC,5,3,"mat-option",10,MC),l(),s(66,"mat-form-field",14),_(67,"input",21),y(),s(68,"mat-label"),d(69,"Port"),l()(),s(70,"mat-form-field",14)(71,"input",22),S("blur",function(){return n.onCtxSizeInput()})("keyup.enter",function(){return n.onCtxSizeInput()}),l(),y(),s(72,"mat-label"),d(73,"Context (CTX)"),l()(),s(74,"mat-autocomplete",null,4),ee(76,BC,2,2,"mat-option",10,EC),l()()(),s(78,"mat-expansion-panel")(79,"mat-expansion-panel-header")(80,"mat-panel-title"),d(81,"Parallel Requests"),l(),s(82,"mat-panel-description"),d(83,"run.sh pins --parallel 1; this overrides it through EXTRA"),l()(),s(84,"div",13)(85,"mat-form-field",14),_(86,"input",23),y(),s(87,"mat-label"),d(88,"Concurrent requests (--parallel)"),l()()(),s(89,"div",24)(90,"mat-icon"),d(91,"info"),l(),s(92,"span"),d(93," Each slot carries its own KV cache, so N > 1 needs the context of every slot to fit the hosted-MoE cache left in VRAM. The launcher keeps the MTP draft on one card too. "),l()()(),s(94,"mat-expansion-panel")(95,"mat-expansion-panel-header")(96,"mat-panel-title"),d(97,"Reasoning"),l(),s(98,"mat-panel-description"),d(99,"run.sh forwards EXTRA to llama-server"),l()(),s(100,"div",13)(101,"mat-form-field",14)(102,"mat-select",25)(103,"mat-option",26),d(104,"on"),l(),s(105,"mat-option",27),d(106,"off"),l()(),y(),s(107,"mat-label"),d(108,"Reasoning Preserve"),l()()()(),s(109,"mat-expansion-panel")(110,"mat-expansion-panel-header")(111,"mat-panel-title"),d(112,"Additional"),l(),s(113,"mat-panel-description"),d(114,"Launcher arguments and environment variables"),l()(),s(115,"mat-form-field",7),_(116,"textarea",28),y(),s(117,"mat-label"),d(118,"Launcher arguments (one per line, unused by run.sh)"),l()(),s(119,"mat-form-field",7),_(120,"textarea",29),y(),s(121,"mat-label"),d(122,"Environment variables (KEY=VALUE, one per line)"),l()()(),s(123,"mat-expansion-panel")(124,"mat-expansion-panel-header")(125,"mat-panel-title"),d(126,"Service unit"),l(),s(127,"mat-panel-description"),d(128,"systemd User / Group / Restart policy"),l()(),s(129,"div",13)(130,"mat-form-field",14),_(131,"input",30),y(),s(132,"mat-label"),d(133,"Run as user"),l()(),s(134,"mat-form-field",14),_(135,"input",31),y(),s(136,"mat-label"),d(137,"Run as group"),l()(),s(138,"mat-form-field",14)(139,"mat-select",32),ee(140,zC,2,2,"mat-option",10,Ye),l(),y(),s(142,"mat-label"),d(143,"Restart policy"),l()()()()()(),s(144,"mat-dialog-actions",33)(145,"button",34),S("click",function(){return n.cancel()}),d(146,"Cancel"),l(),s(147,"button",35),S("click",function(){return n.save()}),d(148),l()()),t&2){let a=Se(17),r=Se(39),u=Se(47),h=Se(63),f=Se(75);c(),Q("",n.isClone?"Clone":n.isEdit?"Edit":"Add"," Avalon service"),c(2),x("formGroup",n.form),c(),p("changed",n.isControlChanged("name")),c(),C(),c(3),D(n.form.controls.name.errors?.required?8:n.form.controls.name.errors?.pattern?9:n.form.controls.name.errors?.nameTaken?10:-1),c(3),p("changed",n.isControlChanged("command")),c(),x("matAutocomplete",a),C(),c(3),D(n.form.controls.command.errors?.required?15:-1),c(3),te(n.filteredCommands()),c(2),p("has-changed",n.isSectionChanged("model")),c(6),x("existingPaths",n.existingModelPaths()),C(),c(),p("has-changed",n.isSectionChanged("gpus","mmproj","mmdev")),c(7),p("changed",n.isControlChanged("gpus")),c(),x("matAutocomplete",r),C(),c(5),te(n.deviceNames()),c(2),p("changed",n.isControlChanged("mmdev")),c(),x("matAutocomplete",u),C(),c(5),te(n.mmdevSuggestions()),c(2),D(n.isVisionOn()?50:-1),c(),x("placeholder",n.isVisionOn()?"/path/to/mmproj-F16.gguf or none":"none \u2014 vision off")("existingPaths",n.existingMmprojPaths()),C(),c(),D(n.isVisionDeviceClash()?52:-1),c(),p("has-changed",n.isSectionChanged("host","port","ctxSize")),c(5),p("changed",n.isControlChanged("host")),c(),x("matAutocomplete",h),C(),c(5),te(n.filteredHosts()),c(2),p("changed",n.isControlChanged("port")),c(),C(),c(3),p("changed",n.isControlChanged("ctxSize")),c(),x("matAutocomplete",f),C(),c(5),te(n.ctxPresets()),c(2),p("has-changed",n.isSectionChanged("parallel")),c(7),p("changed",n.isControlChanged("parallel")),c(),C(),c(8),p("has-changed",n.isSectionChanged("reasoningPreserve")),c(7),p("changed",n.isControlChanged("reasoningPreserve")),c(),C(),c(7),p("has-changed",n.isSectionChanged("extraFlags","envText")),c(6),p("changed",n.isControlChanged("extraFlags")),c(),C(),c(3),p("changed",n.isControlChanged("envText")),c(),C(),c(11),x("matTooltip",n.runAs.userHint()),C(),c(4),x("matTooltip",n.runAs.groupHint()),C(),c(4),C(),c(),te(n.restartOptions),c(7),x("disabled",n.form.invalid),c(),Q(" ",n.isEdit&&!n.isClone?"Save":"Create"," ")}},dependencies:[Me,gi,An,Yt,oo,Zt,$i,Ba,Wi,Ut,Ti,Qi,Zi,Dt,Li,ze,Ue,Hn,oa,uo,ta,na,ia,Mt,ut,_t,qi,Pt,Rt,st,yt,xt,Ct,bt,vt,en,Ji,aa,ho,qs],styles:['@charset "UTF-8";.avalon-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px;min-width:640px}.form-row[_ngcontent-%COMP%]{display:flex;gap:12px;margin-bottom:4px;align-items:center}.form-col[_ngcontent-%COMP%]{flex:1}.full-width[_ngcontent-%COMP%]{width:100%}.auto-path[_ngcontent-%COMP%]{font-family:monospace}.auto-from[_ngcontent-%COMP%]{margin-left:8px;opacity:.6;font-size:12px}.flags-textarea[_ngcontent-%COMP%], .env-textarea[_ngcontent-%COMP%]{overflow-x:auto}mat-dialog-content[_ngcontent-%COMP%]{padding-top:10px!important;max-height:80vh}mat-expansion-panel[_ngcontent-%COMP%]{margin-bottom:0}mat-dialog-actions[_ngcontent-%COMP%]{gap:8px}.subsection-label[_ngcontent-%COMP%]{font-size:12px;font-weight:500;color:#0009;margin:4px 0 14px;text-transform:uppercase;letter-spacing:.5px}.hint[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:8px;font-size:12px;line-height:1.45;color:#666;background:#f5f5f5;border:1px solid #e0e0e0;border-radius:6px;padding:8px 10px;margin:4px 0 8px}.hint[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px;color:#999}.hint-warning[_ngcontent-%COMP%]{color:#e65100;background:#fff3e0;border-color:#ffe0b2}.hint-warning[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#e65100}mat-expansion-panel.has-changed[_ngcontent-%COMP%] mat-panel-title[_ngcontent-%COMP%]{font-weight:700}mat-form-field.changed[_ngcontent-%COMP%] .mat-mdc-form-field-infix input, mat-form-field.changed[_ngcontent-%COMP%] .mat-mdc-form-field-infix .mat-mdc-select{font-weight:700}']})}}return i})();var GC=(i,o)=>o.name;function WC(i,o){if(i&1&&(s(0,"div",10)(1,"mat-icon"),d(2,"warning"),l(),s(3,"span"),d(4),l()()),i&2){let e=v();c(4),kd(" Backend pid ",e.serverIdentity().pid," on ",e.serverIdentity().host,":",e.serverIdentity().port," is not elevated, so services cannot be started, stopped or installed. Stop every backend instance and launch one as Administrator \u2014 port ",e.serverIdentity().port," may still be held by an older, non-elevated instance. ")}}function qC(i,o){if(i&1){let e=_e();s(0,"button",26),S("click",function(n){ne(e);let a=v(2).$implicit;return v(2).control(a.name,"start"),oe(n.stopPropagation())}),s(1,"mat-icon"),d(2,"play_arrow"),l(),d(3," Start "),l()}if(i&2){let e=v(2).$implicit,t=v(2);x("disabled",t.busy()?.name===e.name)}}function KC(i,o){if(i&1){let e=_e();s(0,"button",27),S("click",function(n){ne(e);let a=v(2).$implicit;return v(2).control(a.name,"stop"),oe(n.stopPropagation())}),s(1,"mat-icon"),d(2,"stop"),l(),d(3," Stop "),l()}if(i&2){let e=v(2).$implicit,t=v(2);x("disabled",t.busy()?.name===e.name)}}function XC(i,o){if(i&1){let e=_e();s(0,"button",28),S("click",function(n){ne(e);let a=v(2).$implicit;return v(2).control(a.name,"disable"),oe(n.stopPropagation())}),s(1,"mat-icon"),d(2,"lock"),l(),d(3," Disable "),l()}if(i&2){let e=v(2).$implicit,t=v(2);x("disabled",t.busy()?.name===e.name)}}function YC(i,o){if(i&1){let e=_e();s(0,"button",28),S("click",function(n){ne(e);let a=v(2).$implicit;return v(2).control(a.name,"enable"),oe(n.stopPropagation())}),s(1,"mat-icon"),d(2,"lock_open"),l(),d(3," Enable "),l()}if(i&2){let e=v(2).$implicit,t=v(2);x("disabled",e.enabled||t.busy()?.name===e.name)}}function ZC(i,o){if(i&1&&(w(0,qC,4,1,"button",20)(1,KC,4,1,"button",24),w(2,XC,4,1,"button",25)(3,YC,4,1,"button",25)),i&2){let e=v().$implicit;D(e.running?1:0),c(2),D(e.enabled?2:3)}}function QC(i,o){if(i&1){let e=_e();s(0,"button",26),S("click",function(n){ne(e);let a=v().$implicit;return v(2).installService(a.name),oe(n.stopPropagation())}),s(1,"mat-icon"),d(2,"download"),l(),d(3," Install "),l()}if(i&2){let e=v().$implicit,t=v(2);x("disabled",t.busy()?.name===e.name)}}function JC(i,o){if(i&1){let e=_e();s(0,"button",8),S("click",function(){ne(e);let n=v().$implicit,a=v(2);return oe(a.reinstallService(n.name))}),s(1,"mat-icon"),d(2,"refresh"),l(),s(3,"span"),d(4,"Reinstall"),l()()}}function ex(i,o){if(i&1){let e=_e();s(0,"tr",15),S("click",function(){let n=ne(e).$implicit,a=v(2);return oe(a.selectedServiceService.select(n.name))}),s(1,"td")(2,"div",16),_(3,"span",17),s(4,"span",18),d(5),l()()(),s(6,"td",19),w(7,ZC,4,2)(8,QC,4,1,"button",20),l(),s(9,"td",19)(10,"div")(11,"button",21)(12,"mat-icon"),d(13,"more_vert"),l()(),s(14,"mat-menu",22,2)(16,"button",8),S("click",function(){let n=ne(e).$implicit,a=v(2);return oe(a.editService(n))}),s(17,"mat-icon"),d(18,"edit"),l(),s(19,"span"),d(20,"Edit"),l()(),s(21,"button",8),S("click",function(){let n=ne(e).$implicit,a=v(2);return oe(a.cloneService(n))}),s(22,"mat-icon"),d(23,"content_copy"),l(),s(24,"span"),d(25,"Clone"),l()(),w(26,JC,5,0,"button",23),s(27,"button",8),S("click",function(){let n=ne(e).$implicit,a=v(2);return oe(a.archiveService(n.name))}),s(28,"mat-icon"),d(29,"inventory_2"),l(),s(30,"span"),d(31,"Move to Archive"),l()(),s(32,"button",8),S("click",function(){let n=ne(e).$implicit,a=v(2);return oe(a.deleteService(n.name))}),s(33,"mat-icon"),d(34,"delete"),l(),s(35,"span"),d(36,"Delete"),l()()()()()()}if(i&2){let e=o.$implicit,t=Se(15);p("custom",e.hasConfig),c(3),p("running",e.running),c(),p("disabled",!e.enabled),c(),I(e.name),c(2),D(e.installed?7:e.hasConfig?8:-1),c(3),je("visibility",e.hasConfig?"visible":"hidden"),c(),x("matMenuTriggerFor",t),c(15),D(e.installed?26:-1)}}function tx(i,o){if(i&1&&(s(0,"div",11)(1,"table",13)(2,"tbody"),ee(3,ex,37,12,"tr",14,GC),l()()()),i&2){let e=v();c(3),te(e.filtered())}}function ix(i,o){if(i&1&&(s(0,"p"),d(1),l()),i&2){let e=v(2);c(),Q('No services match "',e.filter().trim(),'".')}}function nx(i,o){i&1&&(s(0,"p"),d(1,'No services configured. Click "Managed services" to select system services or "Custom service" to create one.'),l())}function ox(i,o){if(i&1&&(s(0,"div",12),w(1,ix,2,1,"p")(2,nx,2,0,"p"),l()),i&2){let e=v();c(),D(e.filter().trim()?1:2)}}var Up=(()=>{class i{constructor(){this.serviceService=m(wt),this.serviceList=m(Hs),this.systemService=m(Ot),this.accountPassword=m(Ws),this.selectedServiceService=m(js),this.dialog=m(Nn),this.snackBar=m(zs),this.services=this.serviceList.services,this.configs=E([]),this.loading=E(!0),this.serverIdentity=E(null),this.busy=E(null),this.unified=P(()=>{let e=this.services(),t=this.configs(),n=new Map;for(let u of t)n.set(u.name,u);let a=e.filter(u=>n.has(u.name)).map(u=>{let h=n.get(u.name)??null;return{name:u.name,running:u.running,enabled:u.enabled,installed:u.installed,pid:u.pid,error:u.error,config:h,hasConfig:!0}}),r=e.filter(u=>!n.has(u.name)).map(u=>Fe(V({},u),{config:null,hasConfig:!1}));return[...a,...r]}),this.filter=E(""),this.filtered=P(()=>{let e=this.filter().trim().toLowerCase(),t=this.unified();return e?t.filter(n=>n.name.toLowerCase().includes(e)):t}),this.backendUnprivileged=P(()=>{let e=this.serverIdentity();return e!==null&&!e.privileged})}onFilterInput(e){this.filter.set(e.target.value)}ngOnInit(){this.load(),this.loadServerIdentity()}loadServerIdentity(){this.systemService.getSystemInfo().then(e=>this.serverIdentity.set(e.server??null)).catch(()=>this.serverIdentity.set(null))}load(){return q(this,null,function*(){this.loading.set(!0);try{yield this.serviceList.refresh(),this.configs.set(yield re(this.serviceService.fetchConfigs()))}catch(e){console.error("[ServicesComponent] load error:",e)}finally{this.loading.set(!1)}})}control(e,t){return q(this,null,function*(){let n=this.busy();if(!(n&&n.name===e&&n.action===t)){this.selectedServiceService.select(e),this.busy.set({name:e,action:t});try{let a=yield re(this.serviceService.control(e,t));a.error&&this.showError(`${e}: ${a.error}`),yield this.load()}catch(a){this.showError(`${e}: ${this.errorText(a)}`)}finally{this.busy.set(null)}}})}installService(e){return q(this,null,function*(){let t=this.busy();if(t&&t.name===e&&t.action==="install")return;let n=yield this.accountPassword.askFor(this.configOf(e));if(n!==null){this.selectedServiceService.select(e),this.busy.set({name:e,action:"install"});try{let a=yield re(this.serviceService.installService(e,n??void 0));a.error&&this.showError(`${e}: ${a.error}`),yield this.load()}catch(a){this.showError(`Install "${e}": ${this.errorText(a)}`)}finally{this.busy.set(null)}}})}configOf(e){return this.configs().find(t=>t.name===e)}reinstallService(e){return q(this,null,function*(){confirm(`Reinstall service "${e}" from its current config? A running instance will be stopped.`)&&(yield this.installService(e))})}showError(e){this.snackBar.open(e,"Dismiss",{duration:8e3,horizontalPosition:"center",verticalPosition:"top"})}errorText(e){return e instanceof ei?e.error?.error??e.message:String(e)}manageServices(){this.dialog.open(kp,{maxWidth:"600px"}).afterClosed().subscribe(t=>{t&&this.load()})}archiveServices(){this.dialog.open(Ep,{minWidth:"560px"}).afterClosed().subscribe(t=>{t&&this.load()})}addService(e){this.openDialog(null,e)}editService(e){this.selectedServiceService.select(e.name),this.openDialog(e.config,e.config?.type)}cloneService(e){if(!e.config)return;let t=Fe(V({},e.config),{name:this.uniqueCloneName(e.name)});this.openDialog(t,t.type,!0)}uniqueCloneName(e){let t=new Set(this.configs().map(a=>a.name));if(!t.has(`${e}-copy`))return`${e}-copy`;let n=2;for(;t.has(`${e}-copy-${n}`);)n++;return`${e}-copy-${n}`}deleteService(e){return q(this,null,function*(){if(confirm(`Delete service "${e}"? Its systemd unit will be uninstalled and the config removed.`)){this.selectedServiceService.select(e);try{yield re(this.serviceService.deleteConfig(e)),yield this.load()}catch(t){this.showError(`Delete "${e}": ${this.errorText(t)}`)}}})}archiveService(e){return q(this,null,function*(){if(confirm(`Move service "${e}" to the archive? It will be stopped, uninstalled, and its config shelved. You can restore it from the archive.`)){this.selectedServiceService.select(e);try{yield re(this.serviceService.archiveService(e)),yield this.load()}catch(t){this.showError(`Archive "${e}": ${this.errorText(t)}`)}}})}hasFlags(e){return e.flags.length>0}openDialog(e,t,n=!1){let a=t??e?.type??"generic";if(a==="llama-server"){let r={config:e,allConfigs:this.configs(),clone:n},u=this.dialog.open(Vp,{data:r,minWidth:"800px"});this.handleDialogResult(u,e,n)}else if(a==="vllm"){let r={config:e,allConfigs:this.configs(),clone:n},u=this.dialog.open(zp,{data:r,minWidth:"800px"});this.handleDialogResult(u,e,n)}else if(a==="avalon"){let r={config:e,allConfigs:this.configs(),clone:n},u=this.dialog.open(Hp,{data:r,minWidth:"800px"});this.handleDialogResult(u,e,n)}else{let r={config:e,allConfigs:this.configs(),clone:n},u=this.dialog.open(yp,{data:r,minWidth:"1000px"});this.handleDialogResult(u,e,n)}}handleDialogResult(e,t,n=!1){e.afterClosed().subscribe(a=>q(this,null,function*(){if(!a)return;let r=yield this.accountPassword.askFor(a);if(r===null)return;let u=r?Fe(V({},a),{runAsPassword:r}):a;try{if(n)yield re(this.serviceService.saveConfig(u));else{let h=t?.name??null;if(h!==null&&h!==a.name){let b=this.unified().find(G=>G.name===h),M=b?.running??!1,j=b?.enabled??!1;yield re(this.serviceService.deleteConfig(h)),yield re(this.serviceService.saveConfig(u)),j&&(yield re(this.serviceService.control(a.name,"enable"))),M&&(yield re(this.serviceService.control(a.name,"start")))}else yield re(this.serviceService.saveConfig(u))}}catch(h){this.showError(`Save: ${this.errorText(h)}`)}finally{yield this.load()}}))}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=R({type:i,selectors:[["app-services"]],decls:50,vars:5,consts:[["servicesMenu","matMenu"],["addMenu",""],["serviceMenu","matMenu"],[1,"services-card"],[1,"section-header"],["type","text","placeholder","Filter by name\u2026",1,"service-filter",3,"input","value"],["mat-icon-button","","title","Services actions",1,"header-menu-btn",3,"matMenuTriggerFor"],["xPosition","before"],["mat-menu-item","",3,"click"],["mat-menu-item","",3,"matMenuTriggerFor"],["role","alert",1,"privilege-warning"],[1,"services-scroll"],[1,"empty"],[1,"services-list"],[3,"custom"],[3,"click"],[1,"service-name"],[1,"status-dot"],[1,"name-text"],[1,"service-actions-cell"],["mat-raised-button","","color","primary",3,"disabled"],["mat-icon-button","","title","Service actions",3,"matMenuTriggerFor"],["yPosition","below"],["mat-menu-item",""],["mat-raised-button","","color","warn",3,"disabled"],["mat-stroked-button","",3,"disabled"],["mat-raised-button","","color","primary",3,"click","disabled"],["mat-raised-button","","color","warn",3,"click","disabled"],["mat-stroked-button","",3,"click","disabled"]],template:function(t,n){if(t&1&&(s(0,"div",3)(1,"div",4)(2,"h2"),d(3,"Services"),l(),s(4,"input",5),S("input",function(r){return n.onFilterInput(r)}),l(),s(5,"button",6)(6,"mat-icon"),d(7,"more_vert"),l()(),s(8,"mat-menu",7,0)(10,"button",8),S("click",function(){return n.manageServices()}),s(11,"mat-icon"),d(12,"tune"),l(),s(13,"span"),d(14,"Managed services"),l()(),s(15,"button",8),S("click",function(){return n.archiveServices()}),s(16,"mat-icon"),d(17,"inventory_2"),l(),s(18,"span"),d(19,"Archive"),l()(),s(20,"button",9)(21,"mat-icon"),d(22,"add"),l(),s(23,"span"),d(24,"Custom service"),l()()(),s(25,"mat-menu",null,1)(27,"button",8),S("click",function(){return n.addService("generic")}),s(28,"mat-icon"),d(29,"settings"),l(),s(30,"span"),d(31,"Generic service"),l()(),s(32,"button",8),S("click",function(){return n.addService("llama-server")}),s(33,"mat-icon"),d(34,"smart_toy"),l(),s(35,"span"),d(36,"llama-server"),l()(),s(37,"button",8),S("click",function(){return n.addService("vllm")}),s(38,"mat-icon"),d(39,"bolt"),l(),s(40,"span"),d(41,"vllm"),l()(),s(42,"button",8),S("click",function(){return n.addService("avalon")}),s(43,"mat-icon"),d(44,"hub"),l(),s(45,"span"),d(46,"Avalon"),l()()()(),w(47,WC,5,4,"div",10),w(48,tx,5,0,"div",11)(49,ox,3,1,"div",12),l()),t&2){let a=Se(9),r=Se(26);c(4),x("value",n.filter()),c(),x("matMenuTriggerFor",a),c(15),x("matMenuTriggerFor",r),c(27),D(n.backendUnprivileged()?47:-1),c(),D(n.filtered().length>0?48:n.loading()?-1:49)}},dependencies:[Me,ze,Ue,Ai,Wo,Bs,Ln,mo,Vs,bt,vt],styles:[".services-card[_ngcontent-%COMP%]{flex:1 1 auto;min-height:0;display:flex;flex-direction:column}.privilege-warning[_ngcontent-%COMP%]{flex:0 0 auto;display:flex;align-items:flex-start;gap:8px;margin-bottom:8px;padding:8px 12px;border-radius:6px;background:#ffebee;color:#c62828;font-size:.85rem;line-height:1.4}.privilege-warning[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px}.section-header[_ngcontent-%COMP%]{flex:0 0 auto;display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.section-header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0;font-size:1.1rem;font-weight:600;color:#333}.section-header[_ngcontent-%COMP%] .header-menu-btn[_ngcontent-%COMP%]{color:#666}.section-header[_ngcontent-%COMP%] .service-filter[_ngcontent-%COMP%]{flex:1 1 240px;max-width:320px;min-width:140px;margin:0 16px;padding:6px 12px;font-size:.9rem;border:1px solid #cfcfcf;border-radius:16px;outline:none;background:#fff;transition:border-color .15s ease,box-shadow .15s ease}.section-header[_ngcontent-%COMP%] .service-filter[_ngcontent-%COMP%]::placeholder{color:#9e9e9e}.section-header[_ngcontent-%COMP%] .service-filter[_ngcontent-%COMP%]:focus{border-color:#7c4dff;box-shadow:0 0 0 2px #7c4dff26}.services-scroll[_ngcontent-%COMP%]{flex:1 1 auto;min-height:0;overflow-y:auto}.services-list[_ngcontent-%COMP%]{width:100%;border-collapse:collapse}.services-list[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{border-bottom:1px solid #e0e0e0;transition:background-color .2s ease}.services-list[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{background-color:#fff}.services-list[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:last-child{border-bottom:none}.services-list[_ngcontent-%COMP%] tr.custom[_ngcontent-%COMP%], .services-list[_ngcontent-%COMP%] tr.custom[_ngcontent-%COMP%]:first-child td[_ngcontent-%COMP%]:first-child{border-left:3px solid #7c4dff}.services-list[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:4px 12px;vertical-align:middle}.service-name[_ngcontent-%COMP%]{font-size:1rem;font-weight:600;white-space:nowrap;display:flex;align-items:center;gap:8px}.service-name[_ngcontent-%COMP%] .status-dot[_ngcontent-%COMP%]{display:inline-block;width:10px;height:10px;border-radius:50%;background-color:#bdbdbd}.service-name[_ngcontent-%COMP%] .status-dot.running[_ngcontent-%COMP%]{background-color:#4caf50}.service-name[_ngcontent-%COMP%] .name-text[_ngcontent-%COMP%]{color:#212121}.service-name[_ngcontent-%COMP%] .name-text.disabled[_ngcontent-%COMP%]{color:#9e9e9e}.service-actions-cell[_ngcontent-%COMP%]{white-space:nowrap}.service-actions-cell[_ngcontent-%COMP%] button[_ngcontent-%COMP%] + button[_ngcontent-%COMP%]{margin-left:8px}.status-chip[_ngcontent-%COMP%], .enabled-chip[_ngcontent-%COMP%]{font-size:.8rem;font-weight:500}.status-chip.running[_ngcontent-%COMP%]{--mat-chip-elevated-container-color: #a5d6a7}.status-chip.stopped[_ngcontent-%COMP%]{--mat-chip-elevated-container-color: #ef9a9a}.enabled-chip.enabled[_ngcontent-%COMP%]{--mat-chip-elevated-container-color: #90caf9}.enabled-chip.disabled[_ngcontent-%COMP%]{--mat-chip-elevated-container-color: #bdbdbd}.empty[_ngcontent-%COMP%]{text-align:center;padding:24px;color:#999;font-size:.9rem}.empty[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0}"]})}}return i})();var ax=["journalBody"],rx=(i,o)=>o.name;function sx(i,o){if(i&1&&(s(0,"mat-option",7),d(1),l()),i&2){let e=o.$implicit;x("value",e.name),c(),I(e.name)}}function lx(i,o){if(i&1){let e=_e();s(0,"button",10),S("click",function(){ne(e);let n=v(2);return oe(n.toggleWordWrap())}),s(1,"mat-icon"),d(2,"wrap_text"),l()()}}function cx(i,o){if(i&1){let e=_e();s(0,"button",11),S("click",function(){ne(e);let n=v(2);return oe(n.toggleWordWrap())}),s(1,"mat-icon"),d(2,"wrap_text"),l()()}}function dx(i,o){if(i&1){let e=_e();s(0,"mat-select",6),S("ngModelChange",function(n){ne(e);let a=v();return oe(a.onServiceChange(n))}),s(1,"mat-option",7),d(2,"\u2014 None \u2014"),l(),ee(3,sx,2,2,"mat-option",7,rx),l(),y(),w(5,lx,3,0,"button",8)(6,cx,3,0,"button",9)}if(i&2){let e=v();x("ngModel",e.selectedService()),C(),c(),x("value",null),c(2),te(e.services()),c(2),D(e.wordWrap()?5:6)}}function mx(i,o){if(i&1&&(s(0,"div",3),d(1),l()),i&2){let e=v();c(),I(e.error())}}function ux(i,o){if(i&1&&(s(0,"div",4,0)(2,"pre"),d(3),l()()),i&2){let e=v();c(2),p("wrap-on",e.wordWrap()),c(),I(e.journalText())}}function hx(i,o){i&1&&(s(0,"div",5)(1,"p"),d(2,"No service selected"),l()())}var px=40,$p=(()=>{class i{toggleWordWrap(){this.wordWrap.update(e=>!e)}constructor(){this.serviceService=m(wt),this.selectedServiceService=m(js),this.serviceList=m(Hs),this.cdr=m(se),this.services=this.serviceList.services,this.servicesLoaded=this.serviceList.loaded,this.journalLines=E([]),this.journalLoading=E(!1),this.journalError=E(null),this.error=P(()=>this.serviceList.error()??this.journalError()),this.selectedService=P(()=>this.selectedServiceService.selectedService()),this.wordWrap=E(!0),this.journalText=P(()=>{let e=this.journalLines();return e.length===0?"":e.map(t=>t.timestamp?`${t.timestamp} ${t.message}`:t.message).join(`
5605
- `)}),Bt(()=>{if(!this.servicesLoaded())return;let e=this.selectedService();e!==null&&!this.services().some(t=>t.name===e)&&this.selectedServiceService.select(null)}),Bt(()=>{if(!this.servicesLoaded())return;this.selectedService()?(this.journalLines.set([]),this.journalError.set(null),this.restartPolling()):(this.stopPolling(),this.journalLines.set([]))}),this.serviceList.refresh()}ngAfterViewInit(){this.scrollToBottom()}ngOnDestroy(){this.stopPolling()}onServiceChange(e){this.selectedServiceService.select(e)}restartPolling(){this.stopPolling(),this.fetchJournal(),this.journalSub=pr(0,1e3).subscribe(()=>this.fetchJournal())}stopPolling(){this.journalSub&&(this.journalSub.unsubscribe(),this.journalSub=void 0)}fetchJournal(){let e=this.selectedService();e&&(this.isTextSelected()||(this.journalLoading.set(!0),this.serviceService.fetchJournal(e,100).subscribe({next:t=>{let n=this.isScrolledToBottom();this.journalLines.set(t),this.journalError.set(null),this.journalLoading.set(!1),this.cdr.markForCheck(),requestAnimationFrame(()=>{n&&this.scrollToBottom()})},error:t=>{this.journalError.set(t.message),this.journalLoading.set(!1),this.cdr.markForCheck()}})))}get scrollContainer(){return this.journalBody?.nativeElement??null}isTextSelected(){let e=typeof window<"u"?window:null;if(!e)return!1;let t=e.getSelection();if(!t||t.isCollapsed||!t.rangeCount)return!1;let n=this.scrollContainer;return n?n.contains(t.anchorNode):!1}isScrolledToBottom(){let e=this.scrollContainer;return e?e.scrollHeight-e.scrollTop-e.clientHeight<=px:!0}scrollToBottom(){let e=this.scrollContainer;e&&(e.scrollTop=e.scrollHeight)}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=R({type:i,selectors:[["app-journal-panel"]],viewQuery:function(t,n){if(t&1&&Re(ax,5),t&2){let a;N(a=L())&&(n.journalBody=a.first)}},decls:9,vars:3,consts:[["journalBody",""],[1,"journal-card"],[1,"journal-header"],[1,"journal-error"],[1,"journal-body"],[1,"journal-body","journal-empty"],["disableOptionCentering","",1,"service-select",3,"ngModelChange","ngModel"],[3,"value"],["mat-flat-button","","color","primary","aria-label","Disable word wrap"],["mat-stroked-button","","aria-label","Enable word wrap"],["mat-flat-button","","color","primary","aria-label","Disable word wrap",3,"click"],["mat-stroked-button","","aria-label","Enable word wrap",3,"click"]],template:function(t,n){t&1&&(s(0,"mat-card",1)(1,"mat-card-content")(2,"div",2)(3,"h2"),d(4,"Journal"),l(),w(5,dx,7,3),l(),w(6,mx,2,1,"div",3),w(7,ux,4,3,"div",4)(8,hx,3,0,"div",5),l()()),t&2&&(c(5),D(n.servicesLoaded()&&n.services().length>0?5:-1),c(),D(n.error()?6:-1),c(),D(n.selectedService()?7:8))},dependencies:[Me,wn,Cn,xn,en,Ji,Dt,ze,Ue,bt,vt,pi,gi,Zt,Ha],styles:[".journal-card[_ngcontent-%COMP%]{height:100%;display:flex;flex-direction:column;overflow:hidden}.journal-card[_ngcontent-%COMP%] mat-card-content[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;overflow:hidden;padding-bottom:8px}.journal-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;margin-bottom:12px;flex-shrink:0}.journal-header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0;font-size:20px;font-weight:500}.service-select[_ngcontent-%COMP%]{flex:1;min-width:150px}.journal-error[_ngcontent-%COMP%]{color:#f44336;font-size:13px;margin-bottom:8px;flex-shrink:0}.journal-body[_ngcontent-%COMP%]{flex:1;overflow-y:auto;background:#1e1e1e;border-radius:4px;padding:8px;min-height:0}.journal-body[_ngcontent-%COMP%]::-webkit-scrollbar{width:8px}.journal-body[_ngcontent-%COMP%]::-webkit-scrollbar-track{background:#2d2d2d;border-radius:4px}.journal-body[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#555;border-radius:4px}.journal-body[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background:#777}.journal-body[_ngcontent-%COMP%]{scrollbar-width:thin;scrollbar-color:#555 #2d2d2d}.journal-body[_ngcontent-%COMP%] pre[_ngcontent-%COMP%]{margin:0;font-family:Courier New,Courier,monospace;font-size:12px;line-height:1.6;color:#d4d4d4;white-space:pre}.journal-body[_ngcontent-%COMP%] pre.wrap-on[_ngcontent-%COMP%]{white-space:pre-wrap}.journal-empty[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center}.journal-empty[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;color:#888;font-size:14px}[_nghost-%COMP%] .mdc-button{min-width:32px}[_nghost-%COMP%] .mat-mdc-unelevated-button>.mat-icon, [_nghost-%COMP%] .mat-mdc-outlined-button>.mat-icon{margin-right:0}"]})}}return i})();var Ks=(()=>{class i{constructor(){this.http=m(It),this.baseUrl="/api/hf"}getStatus(){return q(this,null,function*(){return re(this.http.get(`${this.baseUrl}/status`))})}getDownloads(){return q(this,null,function*(){return re(this.http.get(`${this.baseUrl}/downloads`))})}getLocalModels(){return q(this,null,function*(){return re(this.http.get(`${this.baseUrl}/models`))})}deleteLocalModel(e){return q(this,null,function*(){let[t,...n]=e.split("/");yield re(this.http.delete(`${this.baseUrl}/models/${t}/${n.join("/")}`))})}deleteLocalModelFile(e,t){return q(this,null,function*(){let[n,...a]=e.split("/");yield re(this.http.delete(`${this.baseUrl}/models/${n}/${a.join("/")}/files/${encodeURIComponent(t)}`))})}getOrphanBlobs(){return q(this,null,function*(){return re(this.http.get(`${this.baseUrl}/models/orphans`))})}cleanupOrphanBlobs(){return q(this,null,function*(){return re(this.http.post(`${this.baseUrl}/models/orphans/cleanup`,{}))})}action(e,t){return q(this,null,function*(){yield re(this.http.post(`${this.baseUrl}/downloads/action`,{action:e,repoId:t.repoId,dest:t.dest}))})}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275prov=ae({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var fx=(i,o)=>o.device,gx=(i,o)=>o.path;function _x(i,o){i&1&&_(0,"mat-progress-bar",2)}function vx(i,o){if(i&1&&(s(0,"p",3),d(1),l()),i&2){let e=v();c(),I(e.error())}}function bx(i,o){if(i&1&&(s(0,"span",11),d(1),l()),i&2){let e=v(2);c(),I(e.info().uptime)}}function yx(i,o){if(i&1&&(s(0,"div",12)(1,"span",13),d(2,"Version"),l(),s(3,"span",14),d(4),l()()),i&2){let e=v(2);c(4),I(e.info().os.version)}}function Cx(i,o){i&1&&(s(0,"p",19),d(1," Without elevated rights the backend cannot start, stop or install services. Stop every backend instance and launch one elevated \u2014 an older instance may still own the port. "),l())}function xx(i,o){if(i&1&&(s(0,"div",6)(1,"h3"),d(2,"Backend"),l(),s(3,"div",7)(4,"div",8)(5,"mat-chip-set")(6,"mat-chip",18),d(7),l(),s(8,"mat-chip",9),d(9),l()()(),s(10,"div",12)(11,"span",13),d(12,"Listening on"),l(),s(13,"span",14),d(14),l()(),s(15,"div",12)(16,"span",13),d(17,"Started"),l(),s(18,"span",14),d(19),Do(20,"date"),l()(),s(21,"div",12)(22,"span",13),d(23,"Platform"),l(),s(24,"span",14),d(25),l()(),w(26,Cx,2,0,"p",19),l()(),_(27,"mat-divider",15)),i&2){let e=v(2);c(6),p("server-chip-ok",e.info().server.privileged)("server-chip-warn",!e.info().server.privileged),c(),Q(" ",e.info().server.privileged?"privileged":"not privileged"," "),c(2),Q("pid ",e.info().server.pid),c(5),mi("",e.info().server.host,":",e.info().server.port),c(5),I(So(20,11,e.info().server.startedAt,"medium")),c(6),I(e.info().server.platform),c(),D(e.info().server.privileged?-1:26)}}function wx(i,o){if(i&1&&(s(0,"div",16)(1,"div",20)(2,"span",21),d(3),l(),s(4,"span",22),d(5),l()(),s(6,"div",23),_(7,"div",24),l(),s(8,"div",25)(9,"span"),d(10),l(),s(11,"span"),d(12),l()()()),i&2){let e=o.$implicit,t=v(2);c(3),I(e.device),c(2),I(e.mountPoint),c(2),je("width",e.usePercent,"%")("background",e.usePercent>90?"#f44336":e.usePercent>75?"#ff9800":"#4caf50"),c(3),mi("",t.formatBytes(e.available)," free of ",t.formatBytes(e.total)),c(2),Q("",e.usePercent,"% used")}}function Dx(i,o){if(i&1&&(s(0,"div",29)(1,"span",33),d(2,"Last"),l(),s(3,"span",34),d(4),Do(5,"date"),l()()),i&2){let e=v(3);c(4),I(So(5,1,e.info().timeshift.lastSnapshot,"medium"))}}function Sx(i,o){if(i&1&&(s(0,"mat-chip",35),d(1),l()),i&2){let e=o.$implicit;c(),I(e)}}function kx(i,o){if(i&1&&(s(0,"mat-chip-set"),ee(1,Sx,2,1,"mat-chip",35,Ye),l()),i&2){let e=v(3);c(),te(e.info().timeshift.schedules)}}function Mx(i,o){if(i&1&&(s(0,"div",6)(1,"h3"),d(2,"Timeshift Backup"),l(),s(3,"div",7)(4,"div",8)(5,"mat-chip-set")(6,"mat-chip",26),d(7),l(),s(8,"mat-chip",27),d(9),l()(),s(10,"span",28),d(11),l()(),w(12,Dx,6,4,"div",29),s(13,"div",30),_(14,"div",31),l(),s(15,"div",32)(16,"span"),d(17),l(),w(18,kx,3,0,"mat-chip-set"),l()()(),_(19,"mat-divider",15)),i&2){let e=v(2);c(7),I(e.info().timeshift.mode),c(2),I(e.info().timeshift.device),c(2),Q("",e.info().timeshift.snapshots," snapshots"),c(),D(e.info().timeshift.lastSnapshot?12:-1),c(2),je("width",e.info().timeshift.totalSpace>0?(e.info().timeshift.totalSpace-e.info().timeshift.freeSpace)/e.info().timeshift.totalSpace*100:0,"%")("background",e.info().timeshift.totalSpace>0&&(e.info().timeshift.totalSpace-e.info().timeshift.freeSpace)/e.info().timeshift.totalSpace>.9?"#f44336":e.info().timeshift.totalSpace>0&&(e.info().timeshift.totalSpace-e.info().timeshift.freeSpace)/e.info().timeshift.totalSpace>.75?"#ff9800":"#4caf50"),c(3),mi("",e.formatBytes(e.info().timeshift.freeSpace)," free of ",e.formatBytes(e.info().timeshift.totalSpace)),c(),D(e.info().timeshift.schedules.length>0?18:-1)}}function Ex(i,o){if(i&1&&d(0),i&2){let e=v().$implicit,t=v(2);Q(" ",t.formatBytes(e.size)," ")}}function Tx(i,o){i&1&&d(0," \u2014 ")}function Ax(i,o){if(i&1&&(s(0,"div",17)(1,"span",36),d(2),l(),s(3,"span",37),w(4,Ex,1,1)(5,Tx,1,0),l()()),i&2){let e=o.$implicit;c(2),I(e.path),c(2),D(e.exists?4:5)}}function Ix(i,o){if(i&1&&(s(0,"div",6)(1,"h3"),d(2,"Operating System"),l(),s(3,"div",7)(4,"div",8)(5,"mat-chip-set")(6,"mat-chip",9),d(7),l(),s(8,"mat-chip",10),d(9),l()(),w(10,bx,2,1,"span",11),l(),w(11,yx,5,1,"div",12),s(12,"div",12)(13,"span",13),d(14,"Kernel"),l(),s(15,"span",14),d(16),l()()()(),_(17,"mat-divider",15),w(18,xx,28,14),s(19,"div",6)(20,"h3"),d(21,"Disks"),l(),ee(22,wx,13,9,"div",16,fx),l(),_(24,"mat-divider",15),w(25,Mx,20,11),s(26,"div",6)(27,"h3"),d(28,"System Logs"),l(),ee(29,Ax,6,2,"div",17,gx),l()),i&2){let e=v();c(7),I(e.info().hostname),c(2),I(e.info().os.name),c(),D(e.info().uptime?10:-1),c(),D(e.info().os.version?11:-1),c(5),I(e.info().kernel),c(2),D(e.info().server?18:-1),c(4),te(e.info().disks),c(3),D(e.info().timeshift?25:-1),c(4),te(e.info().logs)}}var Gp=(()=>{class i{constructor(){this.systemService=m(Ot),this.dialogRef=m(et),this.loading=E(!0),this.info=E(null),this.error=E(null)}ngOnInit(){return q(this,null,function*(){try{let e=yield this.systemService.getSystemInfo();this.info.set(e)}catch(e){this.error.set(e instanceof Error?e.message:"Failed to load system info")}finally{this.loading.set(!1)}})}formatBytes(e){return e===0?"0 B":`${(e/(1024*1024*1024)).toFixed(1)} GB`}close(){this.dialogRef.close()}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=R({type:i,selectors:[["app-system-info-dialog"]],decls:12,vars:1,consts:[[1,"dialog-container"],["mat-dialog-title",""],["mode","indeterminate"],[1,"dialog-error"],["align","end"],["mat-raised-button","","color","primary",3,"click"],[1,"info-section"],[1,"info-card"],[1,"info-card-header"],[1,"hostname-chip"],[1,"distro-chip"],[1,"os-uptime"],[1,"info-row"],[1,"info-label"],[1,"info-value"],[1,"section-divider"],[1,"disk-row"],[1,"log-row"],[1,"server-chip"],[1,"server-warning"],[1,"disk-header"],[1,"disk-device"],[1,"disk-mount"],[1,"disk-bar-bg"],[1,"disk-bar-fill"],[1,"disk-details"],[1,"mode-chip"],[1,"device-chip"],[1,"timeshift-snapshots"],[1,"timeshift-row"],[1,"timeshift-disk-bar-bg"],[1,"timeshift-disk-bar-fill"],[1,"timeshift-disk-details"],[1,"timeshift-label"],[1,"timeshift-value"],[1,"schedule-chip"],[1,"log-path"],[1,"log-size"]],template:function(t,n){t&1&&(s(0,"div",0)(1,"h2",1)(2,"mat-icon"),d(3,"info"),l(),d(4," System Info "),l(),s(5,"mat-dialog-content"),w(6,_x,1,0,"mat-progress-bar",2)(7,vx,2,1,"p",3)(8,Ix,31,7),l(),s(9,"mat-dialog-actions",4)(10,"button",5),S("click",function(){return n.close()}),d(11,"OK"),l()()()),t&2&&(c(6),D(n.loading()?6:n.error()?7:n.info()?8:-1))},dependencies:[Me,ze,Ue,st,yt,xt,Ct,pi,Hi,ea,lr,bt,vt,Wo,Za,$h,xl],styles:[".dialog-container[_ngcontent-%COMP%]{min-width:480px}.dialog-error[_ngcontent-%COMP%]{color:#f44336;padding:8px 0}.info-section[_ngcontent-%COMP%]{margin-bottom:8px}.info-section[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0 0 8px;font-size:14px;font-weight:600;color:#666;text-transform:uppercase;letter-spacing:.5px}.info-row[_ngcontent-%COMP%]{display:flex;justify-content:space-between;padding:4px 0}.info-row[_ngcontent-%COMP%] .info-label[_ngcontent-%COMP%]{color:#666;font-size:14px}.info-row[_ngcontent-%COMP%] .info-value[_ngcontent-%COMP%]{font-family:monospace;font-size:13px;color:#333}.section-divider[_ngcontent-%COMP%]{margin:12px 0}.disk-row[_ngcontent-%COMP%]{margin-bottom:12px}.disk-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;margin-bottom:4px}.disk-header[_ngcontent-%COMP%] .disk-device[_ngcontent-%COMP%]{font-family:monospace;font-size:13px}.disk-header[_ngcontent-%COMP%] .disk-mount[_ngcontent-%COMP%]{font-size:13px;color:#666}.disk-bar-bg[_ngcontent-%COMP%]{height:6px;background:#e0e0e0;border-radius:3px;overflow:hidden;margin-bottom:2px}.disk-bar-fill[_ngcontent-%COMP%]{height:100%;border-radius:3px}.disk-details[_ngcontent-%COMP%]{display:flex;justify-content:space-between;font-size:12px;color:#666}.info-card[_ngcontent-%COMP%]{background:#f5f5f5;border-radius:8px;padding:12px}.info-card-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.info-card-header[_ngcontent-%COMP%] .hostname-chip[_ngcontent-%COMP%]{font-family:monospace;background:#e8eaf6!important;color:#303f9f!important}.info-card-header[_ngcontent-%COMP%] .distro-chip[_ngcontent-%COMP%], .info-card-header[_ngcontent-%COMP%] .mode-chip[_ngcontent-%COMP%]{font-weight:600;background:#e3f2fd!important;color:#1976d2!important}.info-card-header[_ngcontent-%COMP%] .device-chip[_ngcontent-%COMP%]{font-family:monospace;background:#e8eaf6!important;color:#303f9f!important}.info-card-header[_ngcontent-%COMP%] .server-chip-ok[_ngcontent-%COMP%]{font-weight:600;background:#e8f5e9!important;color:#2e7d32!important}.info-card-header[_ngcontent-%COMP%] .server-chip-warn[_ngcontent-%COMP%]{font-weight:600;background:#ffebee!important;color:#c62828!important}.server-warning[_ngcontent-%COMP%]{margin:8px 0 0;font-size:13px;color:#c62828}.os-uptime[_ngcontent-%COMP%], .timeshift-snapshots[_ngcontent-%COMP%]{font-size:13px;color:#666;white-space:nowrap}.timeshift-row[_ngcontent-%COMP%]{display:flex;justify-content:space-between;padding:4px 0;margin-bottom:6px}.timeshift-row[_ngcontent-%COMP%] .timeshift-label[_ngcontent-%COMP%]{color:#666;font-size:13px}.timeshift-row[_ngcontent-%COMP%] .timeshift-value[_ngcontent-%COMP%]{font-size:13px;color:#333}.timeshift-disk-bar-bg[_ngcontent-%COMP%]{height:6px;background:#e0e0e0;border-radius:3px;overflow:hidden;margin-bottom:4px}.timeshift-disk-bar-fill[_ngcontent-%COMP%]{height:100%;border-radius:3px}.timeshift-disk-details[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;font-size:12px;color:#666}.timeshift-disk-details[_ngcontent-%COMP%] .schedule-chip[_ngcontent-%COMP%]{font-size:11px;background:#fff3e0!important;color:#e65100!important}.log-row[_ngcontent-%COMP%]{display:flex;justify-content:space-between;padding:4px 0}.log-row[_ngcontent-%COMP%] .log-path[_ngcontent-%COMP%]{font-family:monospace;font-size:13px}.log-row[_ngcontent-%COMP%] .log-size[_ngcontent-%COMP%]{font-family:monospace;font-size:13px;color:#333}"]})}}return i})();var Wp=(()=>{class i{constructor(){this.http=m(It),this.baseUrl="/api/lmstudio"}getModels(){return q(this,null,function*(){return re(this.http.get(`${this.baseUrl}/models`))})}deleteModel(e){return q(this,null,function*(){let[t,...n]=e.split("/");yield re(this.http.delete(`${this.baseUrl}/models/${t}/${n.join("/")}`))})}deleteModelFile(e,t){return q(this,null,function*(){let[n,...a]=e.split("/");yield re(this.http.delete(`${this.baseUrl}/models/${n}/${a.join("/")}/files/${encodeURIComponent(t)}`))})}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275prov=ae({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var Xs=(i,o)=>o.name,Rx=(i,o)=>o.repoId+o.dest;function Px(i,o){i&1&&(s(0,"div",2),d(1),l()),i&2&&(c(),I(o))}function Ox(i,o){i&1&&(s(0,"div",4),d(1,"Loading\u2026"),l())}function Fx(i,o){i&1&&(s(0,"div",5),d(1,"Loading\u2026"),l())}function Nx(i,o){i&1&&(s(0,"div",6),d(1,"No models in the Hugging Face cache"),l())}function Lx(i,o){if(i&1&&(s(0,"mat-icon",22),d(1),l(),s(2,"span",17),d(3),l(),s(4,"span",23),d(5),l()),i&2){let e=v().$implicit,t=v(3);c(),Q(" ",t.expanded()==="hf:"+e.name?"expand_more":"chevron_right"," "),c(2),I(e.name),c(2),Q("",t.hfFiles(e).length," file(s)")}}function Vx(i,o){if(i&1&&(s(0,"span",17),d(1),l()),i&2){let e=v().$implicit;c(),I(e.name)}}function Bx(i,o){if(i&1&&(s(0,"span",26),d(1),l()),i&2){let e=v().$implicit;c(),Q("",e.shards.length," shards")}}function zx(i,o){if(i&1){let e=_e();s(0,"div",24)(1,"span",25),d(2),l(),w(3,Bx,2,1,"span",26),s(4,"span",19),d(5),l(),s(6,"button",27),S("click",function(){let n=ne(e).$implicit,a=v(2).$implicit,r=v(3);return oe(r.deleteHfFile(a,n))}),s(7,"mat-icon"),d(8,"delete"),l()()()}if(i&2){let e=o.$implicit,t=v(2).$implicit,n=v(3);c(),x("title",e.shards?e.shards.join(`
5606
- `):e.name),c(),I(e.name),c(),D(e.shards?3:-1),c(2),I(n.formatBytes(e.size)),c(),x("disabled",n.fileDeleting()==="hf:"+t.name+"/"+e.name)}}function jx(i,o){if(i&1&&(s(0,"div",21),ee(1,zx,9,5,"div",24,Xs),l()),i&2){let e=v().$implicit,t=v(3);c(),te(t.hfFiles(e))}}function Hx(i,o){if(i&1){let e=_e();s(0,"div",14)(1,"div",15),S("click",function(){let n=ne(e).$implicit,a=v(3);return oe(a.hfFiles(n).length>0&&a.toggleExpand("hf:"+n.name))}),s(2,"div",16),w(3,Lx,6,3)(4,Vx,2,1,"span",17),l(),s(5,"span",18),d(6),l()(),s(7,"span",19),d(8),l(),s(9,"button",20),S("click",function(){let n=ne(e).$implicit,a=v(3);return oe(a.deleteModel(n))}),s(10,"mat-icon"),d(11,"delete"),l()()(),w(12,jx,3,0,"div",21)}if(i&2){let e=o.$implicit,t=v(3);c(),p("expandable",t.hfFiles(e).length>0),c(2),D(t.hfFiles(e).length>0?3:4),c(2),x("title",e.dir),c(),I(e.dir),c(2),I(t.formatBytes(e.size)),c(),x("disabled",t.deleting()===e.name),c(3),D(t.expanded()==="hf:"+e.name?12:-1)}}function Ux(i,o){if(i&1&&(s(0,"div",7),ee(1,Hx,13,8,null,null,Xs),l()),i&2){let e=v(2);c(),te(e.staticModels())}}function $x(i,o){i&1&&(s(0,"div",6),d(1,"No active downloads"),l())}function Gx(i,o){if(i&1&&(s(0,"span",31),d(1),l()),i&2){let e=v().$implicit;c(),Q("pid ",e.pids.join(", "))}}function Wx(i,o){if(i&1){let e=_e();s(0,"button",42),S("click",function(){ne(e);let n=v().$implicit,a=v(3);return oe(a.resume(n))}),s(1,"mat-icon"),d(2,"play_arrow"),l()()}}function qx(i,o){if(i&1){let e=_e();s(0,"button",43),S("click",function(){ne(e);let n=v().$implicit,a=v(3);return oe(a.pause(n))}),s(1,"mat-icon"),d(2,"pause"),l()()}}function Kx(i,o){if(i&1){let e=_e();s(0,"div",28)(1,"div",29)(2,"div",16)(3,"span",17),d(4),l(),s(5,"span",30),d(6),l(),w(7,Gx,2,1,"span",31),l(),s(8,"div",18),d(9),l(),_(10,"mat-progress-bar",32),s(11,"div",33)(12,"span",34),d(13),l(),s(14,"span",35),d(15),l(),s(16,"span",36),d(17),l(),s(18,"span",37),d(19),l()()(),s(20,"div",38),w(21,Wx,3,0,"button",39)(22,qx,3,0,"button",40),s(23,"button",41),S("click",function(){let n=ne(e).$implicit,a=v(3);return oe(a.cancel(n))}),s(24,"mat-icon"),d(25,"cancel"),l()()()()}if(i&2){let e=o.$implicit,t=v(3);c(4),I(e.repoId),c(),p("paused",e.status==="paused"),c(),I(e.status),c(),D(e.pids.length>0?7:-1),c(),x("title",e.dest),c(),I(e.dest),c(),x("mode",t.progressMode(e))("value",t.percent(e)??0),c(3),mi(" ",t.formatBytes(e.doneBytes)," / ",e.totalBytes>0?t.formatBytes(e.totalBytes):"\u2026"," "),c(2),mi("",e.filesDone," / ",e.filesTotal," files"),c(2),I(t.formatSpeed(e.speedBps)),c(2),I(e.status==="paused"?"paused":"\u2248 "+t.formatEta(e.etaSeconds)),c(2),D(e.status==="paused"?21:22)}}function Xx(i,o){if(i&1&&(s(0,"div",11),ee(1,Kx,26,16,"div",28,Rx),l()),i&2){let e=v(2);c(),te(e.downloads())}}function Yx(i,o){if(i&1&&(s(0,"span",12),d(1),l()),i&2){let e=v(2);c(),mi(" \u2014 ",e.orphans().length," file(s), ",e.formatBytes(e.totalOrphanBytes()))}}function Zx(i,o){i&1&&(s(0,"div",5),d(1,"Loading\u2026"),l())}function Qx(i,o){i&1&&(s(0,"div",6),d(1,"No orphaned blobs"),l())}function Jx(i,o){if(i&1){let e=_e();s(0,"div",13)(1,"button",44),S("click",function(){ne(e);let n=v(2);return oe(n.cleanupOrphans())}),d(2),l()()}if(i&2){let e=v(2);c(),x("disabled",e.cleaning()),c(),Q(" ",e.cleaning()?"Cleaning\u2026":"Cleanup ("+e.formatBytes(e.totalOrphanBytes())+")"," ")}}function ew(i,o){if(i&1&&(s(0,"div",10),d(1,"Downloaded models"),l(),w(2,Fx,2,0,"div",5)(3,Nx,2,0,"div",6)(4,Ux,3,0,"div",7),s(5,"div",10),d(6,"Downloading"),l(),w(7,$x,2,0,"div",6)(8,Xx,3,0,"div",11),s(9,"div",10),d(10," Orphaned blobs "),w(11,Yx,2,2,"span",12),l(),w(12,Zx,2,0,"div",5)(13,Qx,2,0,"div",6)(14,Jx,3,2,"div",13)),i&2){let e=v();c(2),D(e.modelsLoading()?2:e.staticModels().length===0?3:4),c(5),D(e.downloads().length===0?7:8),c(4),D(!e.orphansLoading()&&e.orphans().length>0?11:-1),c(),D(e.orphansLoading()?12:e.orphans().length===0?13:14)}}function tw(i,o){i&1&&(s(0,"div",5),d(1,"Loading\u2026"),l())}function iw(i,o){i&1&&(s(0,"div",6),d(1,"No models in ~/.lmstudio/models"),l())}function nw(i,o){if(i&1&&(s(0,"span",26),d(1),l()),i&2){let e=v().$implicit;c(),Q("",e.shards.length," shards")}}function ow(i,o){if(i&1){let e=_e();s(0,"div",24)(1,"span",25),d(2),l(),w(3,nw,2,1,"span",26),s(4,"span",19),d(5),l(),s(6,"button",27),S("click",function(){let n=ne(e).$implicit,a=v(2).$implicit,r=v(2);return oe(r.deleteLmFile(a,n))}),s(7,"mat-icon"),d(8,"delete"),l()()()}if(i&2){let e=o.$implicit,t=v(2).$implicit,n=v(2);c(),x("title",e.shards?e.shards.join(`
5607
- `):e.name),c(),I(e.name),c(),D(e.shards?3:-1),c(2),I(n.formatBytes(e.size)),c(),x("disabled",n.fileDeleting()==="lm:"+t.name+"/"+e.name)}}function aw(i,o){i&1&&(s(0,"div",6),d(1,"No .gguf files"),l())}function rw(i,o){if(i&1&&(s(0,"div",21),ee(1,ow,9,5,"div",24,Xs,!1,aw,2,0,"div",6),l()),i&2){let e=v().$implicit;c(),te(e.files)}}function sw(i,o){if(i&1){let e=_e();s(0,"div",45)(1,"div",46),S("click",function(){let n=ne(e).$implicit,a=v(2);return oe(a.toggleExpand("lm:"+n.name))}),s(2,"div",16)(3,"mat-icon",22),d(4),l(),s(5,"span",17),d(6),l(),s(7,"span",23),d(8),l()(),s(9,"span",18),d(10),l()(),s(11,"span",19),d(12),l(),s(13,"button",20),S("click",function(){let n=ne(e).$implicit,a=v(2);return oe(a.deleteLmModel(n))}),s(14,"mat-icon"),d(15,"delete"),l()()(),w(16,rw,4,1,"div",21)}if(i&2){let e=o.$implicit,t=v(2);c(4),I(t.expanded()==="lm:"+e.name?"expand_more":"chevron_right"),c(2),I(e.name),c(2),Q("",e.files.length," file(s)"),c(),x("title",e.dir),c(),I(e.dir),c(2),I(t.formatBytes(e.size)),c(),x("disabled",t.lmDeleting()===e.name),c(3),D(t.expanded()==="lm:"+e.name?16:-1)}}function lw(i,o){if(i&1&&(s(0,"div",7),ee(1,sw,17,8,null,null,Xs),l()),i&2){let e=v();c(),te(e.lmModels())}}var cw=2e3,qp=(()=>{class i{constructor(){this.hfService=m(Ks),this.lmStudioService=m(Wp),this.dialogRef=m(et),this.downloads=E([]),this.models=E([]),this.loading=E(!0),this.modelsLoading=E(!0),this.error=E(null),this.deleting=E(null),this.lmModels=E([]),this.lmLoading=E(!0),this.lmDeleting=E(null),this.expanded=E(null),this.fileDeleting=E(null),this.staticModels=P(()=>{let e=new Set(this.downloads().map(t=>t.dest));return this.models().filter(t=>!e.has(t.dir))}),this.orphans=E([]),this.orphansLoading=E(!0),this.cleaning=E(!1),this.totalOrphanBytes=P(()=>this.orphans().reduce((e,t)=>e+t.size,0)),this.timer=null,this.busy=!1}ngOnInit(){this.refresh(),this.refreshModels(),this.refreshOrphans(),this.refreshLmModels(),this.timer=setInterval(()=>{this.refresh()},cw)}ngOnDestroy(){this.timer&&clearInterval(this.timer)}refresh(){return q(this,null,function*(){try{this.downloads.set(yield this.hfService.getDownloads()),this.error.set(null)}catch(e){this.error.set(this.errorText(e,"Failed to load downloads"))}finally{this.loading.set(!1)}})}refreshModels(){return q(this,null,function*(){try{this.models.set(yield this.hfService.getLocalModels())}catch(e){this.error.set(this.errorText(e,"Failed to load models"))}finally{this.modelsLoading.set(!1)}})}refreshLmModels(){return q(this,null,function*(){try{this.lmModels.set(yield this.lmStudioService.getModels())}catch(e){this.error.set(this.errorText(e,"Failed to load LM Studio models"))}finally{this.lmLoading.set(!1)}})}toggleExpand(e){this.expanded.set(this.expanded()===e?null:e)}hfFiles(e){return e.files??[]}deleteLmModel(e){return q(this,null,function*(){if(!this.lmDeleting()&&confirm(`Delete model ${e.name} (${this.formatBytes(e.size)}) from the LM Studio folder?`)){this.lmDeleting.set(e.name);try{yield this.lmStudioService.deleteModel(e.name),yield this.refreshLmModels()}catch(t){this.error.set(this.errorText(t,`Failed to delete ${e.name}`))}finally{this.lmDeleting.set(null)}}})}deleteLmFile(e,t){return q(this,null,function*(){let n=t.shards??[t.name],a=`lm:${e.name}/${t.name}`;if(this.fileDeleting())return;let r=t.shards?`${t.name} (${t.shards.length} shard files)`:t.name;if(confirm(`Delete file ${r} (${this.formatBytes(t.size)})?`)){this.fileDeleting.set(a);try{for(let u of n)yield this.lmStudioService.deleteModelFile(e.name,u);yield this.refreshLmModels()}catch(u){this.error.set(this.errorText(u,`Failed to delete ${t.name}`))}finally{this.fileDeleting.set(null)}}})}deleteHfFile(e,t){return q(this,null,function*(){let n=t.shards??[t.name],a=`hf:${e.name}/${t.name}`;if(this.fileDeleting())return;let r=t.shards?`${t.name} (${t.shards.length} shard files)`:t.name;if(confirm(`Delete ${r} (${this.formatBytes(t.size)}) from the Hugging Face cache?`)){this.fileDeleting.set(a);try{for(let u of n)yield this.hfService.deleteLocalModelFile(e.name,u);yield this.refreshModels(),yield this.refreshOrphans()}catch(u){this.error.set(this.errorText(u,`Failed to delete ${t.name}`))}finally{this.fileDeleting.set(null)}}})}refreshOrphans(){return q(this,null,function*(){try{this.orphans.set(yield this.hfService.getOrphanBlobs())}catch(e){this.error.set(this.errorText(e,"Failed to load orphaned blobs"))}finally{this.orphansLoading.set(!1)}})}errorText(e,t){return e instanceof ei?e.error?.error??e.message:e instanceof Error?e.message:t}pause(e){return q(this,null,function*(){yield this.act("pause",e)})}resume(e){return q(this,null,function*(){yield this.act("resume",e)})}cancel(e){return q(this,null,function*(){confirm(`Cancel download of ${e.repoId}? Partial files will be kept for resume.`)&&(yield this.act("cancel",e))})}deleteModel(e){return q(this,null,function*(){if(!this.deleting()&&confirm(`Delete model ${e.name} (${this.formatBytes(e.size)}) from the Hugging Face cache?`)){this.deleting.set(e.name);try{yield this.hfService.deleteLocalModel(e.name),yield this.refreshModels(),yield this.refreshOrphans()}catch(t){this.error.set(this.errorText(t,`Failed to delete ${e.name}`))}finally{this.deleting.set(null)}}})}cleanupOrphans(){return q(this,null,function*(){if(this.cleaning())return;let e=this.orphans().length;if(confirm(`Delete ${e} orphaned blob file(s) (${this.formatBytes(this.totalOrphanBytes())})?`)){this.cleaning.set(!0);try{yield this.hfService.cleanupOrphanBlobs(),yield this.refreshOrphans()}catch(t){this.error.set(this.errorText(t,"Failed to clean up orphaned blobs"))}finally{this.cleaning.set(!1)}}})}act(e,t){return q(this,null,function*(){if(!this.busy){this.busy=!0;try{yield this.hfService.action(e,t),yield this.refresh()}catch(n){this.error.set(this.errorText(n,`Failed to ${e} download`))}finally{this.busy=!1}}})}percent(e){return e.totalBytes<=0?null:Math.min(100,e.doneBytes/e.totalBytes*100)}progressMode(e){return e.totalBytes>0?"determinate":"indeterminate"}formatBytes(e){if(e<=0)return"0 B";let t=e/1024**3;return t>=1?`${t.toFixed(1)} GB`:`${(e/1024**2).toFixed(0)} MB`}formatSpeed(e){return e<=0?"\u2014":`${(e/(1024*1024)).toFixed(1)} MB/s`}formatEta(e){if(e===null)return"\u2014";if(e<60)return`${e} s`;let t=Math.floor(e/3600),n=Math.round(e%3600/60);return t>0?`${t} h ${n} m`:`${n} m`}close(){this.dialogRef.close()}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=R({type:i,selectors:[["app-llm-models-dialog"]],decls:23,vars:3,consts:[[1,"dialog-container"],["mat-dialog-title",""],[1,"error"],[1,"section-title"],[1,"state"],[1,"state","small"],[1,"empty"],[1,"model-list"],["align","end"],["mat-raised-button","","color","primary",3,"click"],[1,"subsection-title"],[1,"download-list"],[1,"orphan-total"],[1,"orphan-actions"],[1,"model-row"],[1,"row-main",3,"click"],[1,"row-title"],[1,"repo"],[1,"row-dest",3,"title"],[1,"size"],["mat-icon-button","","color","warn","title","Delete model",3,"click","disabled"],[1,"file-list"],[1,"expand-icon"],[1,"file-count"],[1,"file-row"],[1,"file-name",3,"title"],[1,"shard-count"],["mat-icon-button","","color","warn","title","Delete quantization",3,"click","disabled"],[1,"download-row"],[1,"row-main"],[1,"status-chip"],[1,"pids"],[3,"mode","value"],[1,"row-meta"],[1,"progress-text"],[1,"files"],[1,"speed"],[1,"eta"],[1,"row-actions"],["mat-icon-button","","color","primary","title","Resume"],["mat-icon-button","","title","Pause"],["mat-icon-button","","color","warn","title","Cancel",3,"click"],["mat-icon-button","","color","primary","title","Resume",3,"click"],["mat-icon-button","","title","Pause",3,"click"],["mat-raised-button","","color","warn",3,"click","disabled"],[1,"model-row","lm"],[1,"row-main","expandable",3,"click"]],template:function(t,n){if(t&1&&(s(0,"div",0)(1,"h2",1)(2,"mat-icon"),d(3,"model_training"),l(),d(4," LLM Models "),l(),s(5,"mat-dialog-content"),w(6,Px,2,1,"div",2),s(7,"h3",3)(8,"mat-icon"),d(9,"cloud"),l(),d(10," HuggingFace "),l(),w(11,Ox,2,0,"div",4)(12,ew,15,4),s(13,"h3",3)(14,"mat-icon"),d(15,"computer"),l(),d(16," LM Studio "),l(),w(17,tw,2,0,"div",5)(18,iw,2,0,"div",6)(19,lw,3,0,"div",7),l(),s(20,"mat-dialog-actions",8)(21,"button",9),S("click",function(){return n.close()}),d(22,"Close"),l()()()),t&2){let a;c(6),D((a=n.error())?6:-1,a),c(5),D(n.loading()?11:12),c(6),D(n.lmLoading()?17:n.lmModels().length===0?18:19)}},dependencies:[Me,ze,Ue,Ai,st,yt,xt,Ct,pi,Hi,bt,vt],styles:['@charset "UTF-8";.dialog-container[_ngcontent-%COMP%]{min-width:480px}mat-dialog-content[_ngcontent-%COMP%]{max-height:72vh;overflow-y:auto}.error[_ngcontent-%COMP%]{margin:0 0 12px;padding:8px 12px;border-radius:6px;background:#f443361a;color:#d32f2f;font-size:13px}.section-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;margin:4px 0 12px;font-size:15px;font-weight:500;color:#333}.section-title[_ngcontent-%COMP%]:not(:first-of-type){margin-top:20px}.section-title[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px;color:#666}.subsection-title[_ngcontent-%COMP%]{margin:16px 0 8px;font-size:12px;font-weight:500;text-transform:uppercase;letter-spacing:.6px;color:#666}.subsection-title[_ngcontent-%COMP%]:first-of-type{margin-top:0}.orphan-total[_ngcontent-%COMP%]{text-transform:none;letter-spacing:0;font-weight:400;color:#999}.orphan-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;margin-top:8px}.state[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:8px;padding:40px 0;color:#999;font-size:14px}.state.small[_ngcontent-%COMP%]{padding:16px 0}.state[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:36px;width:36px;height:36px}.empty[_ngcontent-%COMP%]{padding:8px 4px;color:#999;font-size:13px}.model-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px}.model-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding:8px 12px;border-radius:8px;border:1px solid #e0e0e0;background:#fafafa}.model-row[_ngcontent-%COMP%] .row-main[_ngcontent-%COMP%]{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.model-row[_ngcontent-%COMP%] .repo[_ngcontent-%COMP%]{font-weight:500;font-size:14px;color:#333;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.model-row[_ngcontent-%COMP%] .row-dest[_ngcontent-%COMP%]{font-family:monospace;font-size:11px;color:#999;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.model-row[_ngcontent-%COMP%] .size[_ngcontent-%COMP%]{flex-shrink:0;font-size:13px;color:#666}.model-row[_ngcontent-%COMP%] .row-main.expandable[_ngcontent-%COMP%]{cursor:pointer}.model-row[_ngcontent-%COMP%] .row-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:4px;min-width:0}.model-row[_ngcontent-%COMP%] .row-title[_ngcontent-%COMP%] .expand-icon[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px;color:#999;flex-shrink:0}.model-row[_ngcontent-%COMP%] .row-title[_ngcontent-%COMP%] .file-count[_ngcontent-%COMP%]{font-size:11px;color:#999;flex-shrink:0}.file-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px;margin:-4px 0 8px 28px;padding:4px 8px;border-left:2px solid #e0e0e0}.file-list[_ngcontent-%COMP%] .file-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding:2px 4px;border-radius:6px}.file-list[_ngcontent-%COMP%] .file-row[_ngcontent-%COMP%]:hover{background:#f0f0f0}.file-list[_ngcontent-%COMP%] .file-row[_ngcontent-%COMP%] .file-name[_ngcontent-%COMP%]{flex:1;min-width:0;font-family:monospace;font-size:12px;color:#444;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.file-list[_ngcontent-%COMP%] .file-row[_ngcontent-%COMP%] .shard-count[_ngcontent-%COMP%]{flex-shrink:0;font-size:10px;text-transform:uppercase;letter-spacing:.4px;padding:2px 8px;border-radius:10px;background:#e3f2fd;color:#1565c0}.file-list[_ngcontent-%COMP%] .file-row[_ngcontent-%COMP%] .size[_ngcontent-%COMP%]{flex-shrink:0;font-size:12px;color:#666}.download-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px}.download-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding:12px;border-radius:8px;border:1px solid #e0e0e0;background:#fafafa}.download-row[_ngcontent-%COMP%] .row-main[_ngcontent-%COMP%]{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}.download-row[_ngcontent-%COMP%] .row-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}.download-row[_ngcontent-%COMP%] .row-title[_ngcontent-%COMP%] .repo[_ngcontent-%COMP%]{font-weight:500;font-size:14px;color:#333;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.download-row[_ngcontent-%COMP%] .row-title[_ngcontent-%COMP%] .pids[_ngcontent-%COMP%]{font-size:11px;color:#999}.download-row[_ngcontent-%COMP%] .status-chip[_ngcontent-%COMP%]{font-size:10px;text-transform:uppercase;letter-spacing:.4px;padding:2px 8px;border-radius:10px;background:#e8f5e9;color:#2e7d32}.download-row[_ngcontent-%COMP%] .status-chip.paused[_ngcontent-%COMP%]{background:#fff3e0;color:#e65100}.download-row[_ngcontent-%COMP%] .row-dest[_ngcontent-%COMP%]{font-family:monospace;font-size:11px;color:#999;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.download-row[_ngcontent-%COMP%] mat-progress-bar[_ngcontent-%COMP%]{margin:4px 0}.download-row[_ngcontent-%COMP%] .row-meta[_ngcontent-%COMP%]{display:flex;gap:16px;font-size:12px;color:#333}.download-row[_ngcontent-%COMP%] .row-meta[_ngcontent-%COMP%] .files[_ngcontent-%COMP%], .download-row[_ngcontent-%COMP%] .row-meta[_ngcontent-%COMP%] .speed[_ngcontent-%COMP%], .download-row[_ngcontent-%COMP%] .row-meta[_ngcontent-%COMP%] .eta[_ngcontent-%COMP%]{color:#666}.download-row[_ngcontent-%COMP%] .row-actions[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px}']})}}return i})();function dw(i,o){if(i&1){let e=_e();s(0,"button",14),S("click",function(){ne(e);let n=v();return oe(n.openLlmModels())}),s(1,"mat-icon"),d(2,"model_training"),l(),s(3,"span"),d(4,"LLM Models"),l()()}}var Kp=(()=>{class i{constructor(){this.systemInfo=ko.required(),this.systemService=m(Ot),this.hfService=m(Ks),this.dialog=m(Nn),this.hfInstalled=E(!1)}ngOnInit(){this.hfService.getStatus().then(e=>this.hfInstalled.set(e.installed)).catch(()=>this.hfInstalled.set(!1))}openSystemInfo(){this.dialog.open(Gp,{disableClose:!1})}openLlmModels(){this.dialog.open(qp,{width:"760px",maxWidth:"95vw",disableClose:!1})}reboot(){return q(this,null,function*(){confirm("Reboot the server?")&&(yield this.systemService.reboot())})}shutdown(){return q(this,null,function*(){confirm("Shutdown the server?")&&(yield this.systemService.shutdown())})}formatBytes(e){let t=e/1073741824;return`${Math.ceil(t)} GB`}ceilCpu(e){return Math.ceil(e)}colorForUsage(e){return e<40?"#4caf50":e<75?"#ff9800":"#f44336"}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=R({type:i,selectors:[["app-system-bar"]],inputs:{systemInfo:[1,"systemInfo"]},decls:50,vars:17,consts:[["menu","matMenu"],[1,"system-bar"],[1,"system-panel"],[1,"panel-body"],[1,"panel-icon"],[1,"panel-content"],[1,"panel-header"],[1,"panel-label"],[1,"panel-value"],[1,"bar-bg"],[1,"bar-fill"],[1,"server-controls"],["mat-icon-button","","color","warn","title","Server actions",3,"matMenuTriggerFor"],["yPosition","below"],["mat-menu-item","",3,"click"],["mat-menu-item",""]],template:function(t,n){if(t&1&&(s(0,"div",1)(1,"mat-card",2)(2,"mat-card-content")(3,"div",3)(4,"mat-icon",4),d(5,"dynamic_feed"),l(),s(6,"div",5)(7,"div",6)(8,"span",7),d(9,"CPU"),l(),s(10,"span",8),d(11),l()(),s(12,"div",9),_(13,"div",10),l()()()()(),s(14,"mat-card",2)(15,"mat-card-content")(16,"div",3)(17,"mat-icon",4),d(18,"memory"),l(),s(19,"div",5)(20,"div",6)(21,"span",7),d(22,"RAM"),l(),s(23,"span",8),d(24),l()(),s(25,"div",9),_(26,"div",10),l()()()()(),s(27,"div",11)(28,"button",12)(29,"mat-icon"),d(30,"more_vert"),l()(),s(31,"mat-menu",13,0)(33,"button",14),S("click",function(){return n.reboot()}),s(34,"mat-icon"),d(35,"restart_alt"),l(),s(36,"span"),d(37,"Reboot server"),l()(),s(38,"button",14),S("click",function(){return n.shutdown()}),s(39,"mat-icon"),d(40,"power_settings_new"),l(),s(41,"span"),d(42,"Shutdown server"),l()(),_(43,"mat-divider"),s(44,"button",14),S("click",function(){return n.openSystemInfo()}),s(45,"mat-icon"),d(46,"info"),l(),s(47,"span"),d(48,"System info"),l()(),w(49,dw,5,0,"button",15),l()()()),t&2){let a=Se(32);c(10),je("color",n.colorForUsage(n.systemInfo().cpuUsage)),c(),Q(" ",n.ceilCpu(n.systemInfo().cpuUsage),"% "),c(2),je("width",n.systemInfo().cpuUsage,"%")("background",n.colorForUsage(n.systemInfo().cpuUsage)),c(10),je("color",n.colorForUsage(n.systemInfo().memoryPercent)),c(),mi(" ",n.formatBytes(n.systemInfo().memoryUsed)," / ",n.formatBytes(n.systemInfo().memoryTotal)," "),c(2),je("width",n.systemInfo().memoryPercent,"%")("background",n.colorForUsage(n.systemInfo().memoryPercent)),c(2),x("matMenuTriggerFor",a),c(21),D(n.hfInstalled()?49:-1)}},dependencies:[Me,wn,Cn,xn,bt,vt,ze,Ai,Bs,Ln,mo,Vs,ea,lr,st],styles:[".system-bar[_ngcontent-%COMP%]{display:flex;gap:16px;margin-bottom:16px;align-items:stretch}.system-panel[_ngcontent-%COMP%]{flex:1}.server-controls[_ngcontent-%COMP%]{display:flex;align-items:center;gap:4px}.panel-body[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px}.panel-icon[_ngcontent-%COMP%]{color:#757575;font-size:24px;width:24px;height:24px}.panel-content[_ngcontent-%COMP%]{flex:1;min-width:0}.panel-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:4px}.panel-label[_ngcontent-%COMP%]{font-weight:500;font-size:.85rem;color:#555;text-transform:uppercase;letter-spacing:.5px}.panel-value[_ngcontent-%COMP%]{font-weight:500;font-size:.9rem;white-space:nowrap}.bar-bg[_ngcontent-%COMP%]{height:6px;background:#e0e0e0;border-radius:3px;overflow:hidden}.bar-fill[_ngcontent-%COMP%]{height:100%;border-radius:3px;transition:width .4s ease,background .4s ease}"]})}}return i})();function mw(i,o){if(i&1&&(s(0,"div",8)(1,"mat-icon",10),d(2,"warning"),l(),d(3),l()),i&2){let e=v(2);c(3),Q(" ",e.loginError()," ")}}function uw(i,o){if(i&1){let e=_e();s(0,"div",0)(1,"mat-card",1)(2,"mat-card-content")(3,"div",2)(4,"mat-icon",3),d(5,"lock"),l(),s(6,"h2"),d(7,"Authentication Required"),l(),s(8,"p",4),d(9,"Enter your system password to continue"),l()(),s(10,"form",5),S("submit",function(n){return ne(e),v().onLogin(),oe(n.preventDefault())}),s(11,"mat-form-field",6)(12,"mat-label"),d(13,"Password"),l(),s(14,"input",7),S("input",function(n){ne(e);let a=v();return oe(a.loginPassword.set(n.target.value))}),l()(),w(15,mw,4,1,"div",8),s(16,"button",9),d(17,"Sign In"),l()()()()()}if(i&2){let e=v();c(14),x("value",e.loginPassword()),c(),D(e.loginError()?15:-1)}}function hw(i,o){i&1&&_(0,"mat-progress-bar",11)}function pw(i,o){if(i&1&&(s(0,"mat-card",14)(1,"mat-card-content")(2,"mat-icon",15),d(3," error_outline "),l(),s(4,"p"),d(5),l(),s(6,"p",4),d(7,"Make sure the backend is running on port 4242."),l()()()),i&2){let e=v(2);c(5),I(e.error())}}function fw(i,o){i&1&&(s(0,"mat-card",19)(1,"mat-card-content")(2,"p"),d(3,"No GPUs detected."),l(),s(4,"p",4),d(5," Ensure nvidia-smi or rocm-smi is available on this system. "),l()()())}function gw(i,o){if(i&1&&_(0,"app-gpu-table",20),i&2){let e=v(3);x("gpus",e.gpus())}}function _w(i,o){if(i&1){let e=_e();s(0,"div",16)(1,"div",17),_(2,"app-system-bar",18),w(3,fw,6,0,"mat-card",19)(4,gw,1,1,"app-gpu-table",20),l(),s(5,"div",21),S("mousedown",function(n){ne(e);let a=v(2);return oe(a.startGpuColDrag(n))}),_(6,"span",22),l(),s(7,"div",23),_(8,"app-services"),l()(),s(9,"div",24),S("mousedown",function(n){ne(e);let a=v(2);return oe(a.startJournalHeightDrag(n))}),_(10,"span",22),l(),s(11,"div",25),_(12,"app-journal-panel"),l()}if(i&2){let e=v(2);c(),je("width",e.gpuColWidth(),"px"),c(),x("systemInfo",e.systemInfo()),c(),D(e.hasGpus()?4:3),c(8),je("height",e.journalHeight(),"px")}}function vw(i,o){if(i&1&&(w(0,hw,1,0,"mat-progress-bar",11),s(1,"div",12)(2,"div",13),w(3,pw,8,1,"mat-card",14)(4,_w,13,6),l()()),i&2){let e=v();D(e.loading()?0:-1),c(),p("dragging",e.isDragging()),c(2),D(e.error()?3:4)}}var Xp=160,Yp=800,bw=320,Zp=360,Qp=1400,yw=560,Jp=(()=>{class i{ngOnInit(){this.authService.authState.subscribe(n=>{this.isAuthenticated.set(n),n&&(this.loginError.set(null),this.loginPassword.set(""))});let e=localStorage.getItem("journal-bottom-height");if(e){let n=parseInt(e,10);n>=Xp&&n<=Yp&&this.journalHeight.set(n)}let t=localStorage.getItem("gpu-col-width");if(t){let n=parseInt(t,10);n>=Zp&&n<=Qp&&this.gpuColWidth.set(n)}}ngOnDestroy(){}onLogin(){return q(this,null,function*(){this.loginError.set(null),(yield this.authService.login(this.loginPassword()))?(this.loading.set(!0),this.initGpus()):this.loginError.set("Invalid password")})}startJournalHeightDrag(e){this.beginDrag("journalHeight",e.clientY,this.journalHeight())}startGpuColDrag(e){this.beginDrag("gpuColWidth",e.clientX,this.gpuColWidth())}beginDrag(e,t,n){this.dragTarget=e,this.dragStartCoord=t,this.dragStartValue=n,this.isDragging.set(!0)}onDrag(e){if(!(!this.isDragging()||!this.dragTarget)){if(this.dragTarget==="journalHeight"){let t=this.dragStartCoord-e.clientY;this.journalHeight.set(this.clamp(this.dragStartValue+t,Xp,Yp))}else if(this.dragTarget==="gpuColWidth"){let t=e.clientX-this.dragStartCoord;this.gpuColWidth.set(this.clamp(this.dragStartValue+t,Zp,Qp))}}}onDragEnd(){!this.isDragging()||!this.dragTarget||(this.dragTarget==="journalHeight"?localStorage.setItem("journal-bottom-height",String(this.journalHeight())):this.dragTarget==="gpuColWidth"&&localStorage.setItem("gpu-col-width",String(this.gpuColWidth())),this.dragTarget=null,this.isDragging.set(!1))}clamp(e,t,n){return Math.max(t,Math.min(n,e))}constructor(){this.gpuService=m(Go),this.authService=m(qr),this.gpus=E([]),this.systemInfo=E({cpuUsage:0,memoryTotal:0,memoryUsed:0,memoryPercent:0}),this.loading=E(!0),this.error=E(null),this.hasGpus=P(()=>this.gpus().length>0),this.isAuthenticated=E(this.authService.isAuthenticated()),this.loginPassword=E(""),this.loginError=E(null),this.journalHeight=E(bw),this.gpuColWidth=E(yw),this.isDragging=E(!1),this.dragTarget=null,this.dragStartCoord=0,this.dragStartValue=0,this.isAuthenticated()&&this.initGpus()}initGpus(e=0){this.gpuService.fetchGpus().subscribe({next:t=>{if(t.length===0){e<3?setTimeout(()=>this.initGpus(e+1),5e3):this.loading.set(!1);return}let n=t.map(a=>Fe(V({},a),{key:a.pciBusId,usage:0,temperature:0,vramUsed:0}));this.gpus.set(n),this.loading.set(!1),this.error.set(null),this.gpuService.watchStatus(3e3).subscribe({next:a=>{this.systemInfo.set(a.system),this.mergeUsage(a.gpus)},error:a=>{console.error("[AppComponent] status poll error:",a)}})},error:t=>{console.error("[AppComponent] static fetch error:",t),this.error.set(`Failed to fetch GPU data: ${t.message}`),this.loading.set(!1)}})}mergeUsage(e){let t=new Map;for(let n of e)t.set(n.key,n);this.gpus.update(n=>n.map(a=>{let r=t.get(a.pciBusId);return Fe(V({},a),{key:a.pciBusId,usage:r?.usage??0,temperature:r?.temperature??0,vramUsed:r?.vramUsed??0})}))}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=R({type:i,selectors:[["app-root"]],hostBindings:function(t,n){t&1&&S("mousemove",function(r){return n.onDrag(r)},ol)("mouseup",function(){return n.onDragEnd()},ol)},decls:2,vars:1,consts:[[1,"login-container"],[1,"login-card"],[1,"login-header"],[1,"login-icon"],[1,"mat-body-2",2,"color","#999"],[1,"login-form",3,"submit"],["appearance","outline",1,"full-width"],["matInput","","type","password","autofocus","",3,"input","value"],[1,"login-error"],["mat-raised-button","","color","primary","type","submit",1,"login-btn"],[2,"font-size","20px","vertical-align","middle"],["mode","query","color","primary"],[1,"layout"],[1,"main-content"],[1,"error-card"],[2,"color","#f44336","font-size","48px","float","left","margin-right","16px"],[1,"top-row-horizontal"],[1,"gpu-col"],[3,"systemInfo"],[1,"empty-card"],[3,"gpus"],[1,"splitter",3,"mousedown"],[1,"splitter-line"],[1,"services-col"],[1,"splitter","splitter-h",3,"mousedown"],[1,"journal-bottom"]],template:function(t,n){t&1&&w(0,uw,18,2,"div",0)(1,vw,5,4),t&2&&D(n.isAuthenticated()?1:0)},dependencies:[Me,pi,Hi,wn,Cn,xn,Pt,Rt,ut,_t,Mt,ze,Ue,bt,vt,Wh,Up,$p,Kp],styles:[".spacer[_ngcontent-%COMP%]{flex:1 1 auto}.login-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;min-height:calc(100vh - 56px);padding:24px;background:#f5f5f5}.login-card[_ngcontent-%COMP%]{width:100%;max-width:400px}.login-header[_ngcontent-%COMP%]{text-align:center;margin-bottom:24px}.login-header[_ngcontent-%COMP%] .login-icon[_ngcontent-%COMP%]{font-size:48px;width:48px;height:48px;line-height:48px;background:#e3f2fd;border-radius:50%;padding:8px;color:#1976d2}.login-header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:16px 0 4px;font-size:22px;font-weight:500}.login-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px}.login-error[_ngcontent-%COMP%]{color:#d32f2f;font-size:14px;text-align:center;padding:8px;background:#ffebee;border-radius:4px}.login-btn[_ngcontent-%COMP%]{width:100%;margin-top:8px}.full-width[_ngcontent-%COMP%]{width:100%}.layout[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;overflow:hidden}.layout.dragging[_ngcontent-%COMP%]{user-select:none;-webkit-user-select:none}.main-content[_ngcontent-%COMP%]{flex:1;min-width:0;min-height:0;overflow:hidden;display:flex;flex-direction:column;padding:24px;max-width:100%}.top-row-horizontal[_ngcontent-%COMP%]{display:flex;flex-direction:row;flex:1;min-height:0}.gpu-col[_ngcontent-%COMP%]{flex-shrink:0;overflow:hidden;display:flex;flex-direction:column}.gpu-col[_ngcontent-%COMP%] app-system-bar[_ngcontent-%COMP%]{flex:0 0 auto}.gpu-col[_ngcontent-%COMP%] app-gpu-table[_ngcontent-%COMP%]{flex:1 1 auto;min-height:0;display:flex;flex-direction:column}.gpu-col[_ngcontent-%COMP%] .empty-card[_ngcontent-%COMP%]{flex-shrink:0}.services-col[_ngcontent-%COMP%]{flex:1;min-width:0;overflow:hidden;display:flex;flex-direction:column}.services-col[_ngcontent-%COMP%] app-services[_ngcontent-%COMP%]{flex:1 1 auto;min-height:0;display:flex;flex-direction:column;margin-top:0}.splitter[_ngcontent-%COMP%]{width:8px;flex-shrink:0;cursor:col-resize;margin:0 8px;display:flex;align-items:center;justify-content:center;background:transparent;transition:background .15s}.splitter[_ngcontent-%COMP%]:hover{background:#0000000a}.splitter[_ngcontent-%COMP%] .splitter-line[_ngcontent-%COMP%]{width:2px;height:32px;border-radius:1px;background:#bdbdbd;transition:background .15s,width .15s}.splitter[_ngcontent-%COMP%]:hover .splitter-line[_ngcontent-%COMP%]{background:#757575;width:3px}.splitter-h[_ngcontent-%COMP%]{width:100%;height:8px;flex-shrink:0;cursor:row-resize;margin:8px 0;display:flex;align-items:center;justify-content:center;background:transparent;transition:background .15s}.splitter-h[_ngcontent-%COMP%]:hover{background:#0000000a}.splitter-h[_ngcontent-%COMP%] .splitter-line[_ngcontent-%COMP%]{width:32px;height:2px;border-radius:1px;background:#bdbdbd;transition:background .15s,height .15s}.splitter-h[_ngcontent-%COMP%]:hover .splitter-line[_ngcontent-%COMP%]{background:#757575;height:3px}.journal-bottom[_ngcontent-%COMP%]{flex-shrink:0;overflow-y:auto}.error-card[_ngcontent-%COMP%], .empty-card[_ngcontent-%COMP%]{margin-top:32px;max-width:600px;margin-left:auto;margin-right:auto}[_nghost-%COMP%] mat-card-content{padding-top:10px!important;padding-bottom:10px!important}app-services[_ngcontent-%COMP%]{display:block;margin-top:24px}"]})}}return i})();Il(Jp,Fm).catch(i=>console.error(i));
5604
+ GGML_MOE_CACHE_LAYER_DEVICE=ROCm0`,"matTooltip","Environment variables for the service process (KEY=VALUE, one per line). MODEL, GPUS, MMPROJ, MMDEV, HOST, PORT, CTX and EXTRA belong to the fields above and are ignored here",1,"env-textarea"],["matInput","","formControlName","user","placeholder","llama",3,"matTooltip"],["matInput","","formControlName","group","placeholder","ai",3,"matTooltip"],["formControlName","restart"],["align","end"],["mat-stroked-button","",3,"click"],["mat-raised-button","","color","primary",3,"click","disabled"],[1,"auto-path"],[1,"auto-from"]],template:function(t,n){if(t&1&&(s(0,"h2",5),d(1),l(),s(2,"mat-dialog-content")(3,"form",6)(4,"mat-form-field",7),_(5,"input",8),y(),s(6,"mat-label"),d(7,"Service Name"),l(),w(8,AC,2,0,"mat-error")(9,IC,2,0,"mat-error")(10,RC,2,0,"mat-error"),l(),s(11,"mat-form-field",7),_(12,"input",9),y(),s(13,"mat-label"),d(14,"Command (Avalon launcher)"),l(),w(15,PC,2,0,"mat-error"),l(),s(16,"mat-autocomplete",null,0),ee(18,OC,5,3,"mat-option",10,MC),l(),s(20,"mat-expansion-panel",11)(21,"mat-expansion-panel-header")(22,"mat-panel-title"),d(23,"Model"),l(),s(24,"mat-panel-description"),d(25,"Empty = the model built into run.sh"),l()(),_(26,"app-file-autocomplete",12),y(),l(),s(27,"mat-expansion-panel",11)(28,"mat-expansion-panel-header")(29,"mat-panel-title"),d(30,"GPUs & Vision"),l(),s(31,"mat-panel-description"),d(32,"Hosted-MoE layout: dense weights on GPU, experts in RAM"),l()(),s(33,"div",13)(34,"mat-form-field",14),_(35,"input",15),y(),s(36,"mat-label"),d(37,"LLM GPU (GPUS)"),l()(),s(38,"mat-autocomplete",null,1),ee(40,FC,2,2,"mat-option",10,Ye),l(),s(42,"mat-form-field",14),_(43,"input",16),y(),s(44,"mat-label"),d(45,"Vision GPU (MMDEV)"),l()(),s(46,"mat-autocomplete",null,2),ee(48,NC,2,2,"mat-option",10,Ye),l()(),w(50,LC,2,0,"div",17),_(51,"app-file-autocomplete",18),y(),w(52,VC,5,1,"div",19),l(),s(53,"mat-expansion-panel",11)(54,"mat-expansion-panel-header")(55,"mat-panel-title"),d(56,"Server & Context"),l()(),s(57,"div",13)(58,"mat-form-field",14),_(59,"input",20),y(),s(60,"mat-label"),d(61,"Host"),l()(),s(62,"mat-autocomplete",null,3),ee(64,BC,5,3,"mat-option",10,EC),l(),s(66,"mat-form-field",14),_(67,"input",21),y(),s(68,"mat-label"),d(69,"Port"),l()(),s(70,"mat-form-field",14)(71,"input",22),S("blur",function(){return n.onCtxSizeInput()})("keyup.enter",function(){return n.onCtxSizeInput()}),l(),y(),s(72,"mat-label"),d(73,"Context (CTX)"),l()(),s(74,"mat-autocomplete",null,4),ee(76,zC,2,2,"mat-option",10,TC),l()()(),s(78,"mat-expansion-panel")(79,"mat-expansion-panel-header")(80,"mat-panel-title"),d(81,"Parallel Requests"),l(),s(82,"mat-panel-description"),d(83,"run.sh pins --parallel 1; this overrides it through EXTRA"),l()(),s(84,"div",13)(85,"mat-form-field",14),_(86,"input",23),y(),s(87,"mat-label"),d(88,"Concurrent requests (--parallel)"),l()()(),s(89,"div",24)(90,"mat-icon"),d(91,"info"),l(),s(92,"span"),d(93," Each slot carries its own KV cache, so N > 1 needs the context of every slot to fit the hosted-MoE cache left in VRAM. The launcher keeps the MTP draft on one card too. "),l()()(),s(94,"mat-expansion-panel")(95,"mat-expansion-panel-header")(96,"mat-panel-title"),d(97,"Reasoning"),l(),s(98,"mat-panel-description"),d(99,"run.sh forwards EXTRA to llama-server"),l()(),s(100,"div",13)(101,"mat-form-field",14)(102,"mat-select",25)(103,"mat-option",26),d(104,"on"),l(),s(105,"mat-option",27),d(106,"off"),l()(),y(),s(107,"mat-label"),d(108,"Reasoning Preserve"),l()()()(),s(109,"mat-expansion-panel")(110,"mat-expansion-panel-header")(111,"mat-panel-title"),d(112,"Additional"),l(),s(113,"mat-panel-description"),d(114,"Launcher arguments and environment variables"),l()(),s(115,"mat-form-field",7),_(116,"textarea",28),y(),s(117,"mat-label"),d(118,"Launcher arguments (one per line, unused by run.sh)"),l()(),s(119,"mat-form-field",7),_(120,"textarea",29),y(),s(121,"mat-label"),d(122,"Environment variables (KEY=VALUE, one per line)"),l()()(),s(123,"mat-expansion-panel")(124,"mat-expansion-panel-header")(125,"mat-panel-title"),d(126,"Service unit"),l(),s(127,"mat-panel-description"),d(128,"systemd User / Group / Restart policy"),l()(),s(129,"div",13)(130,"mat-form-field",14),_(131,"input",30),y(),s(132,"mat-label"),d(133,"Run as user"),l()(),s(134,"mat-form-field",14),_(135,"input",31),y(),s(136,"mat-label"),d(137,"Run as group"),l()(),s(138,"mat-form-field",14)(139,"mat-select",32),ee(140,jC,2,2,"mat-option",10,Ye),l(),y(),s(142,"mat-label"),d(143,"Restart policy"),l()()()()()(),s(144,"mat-dialog-actions",33)(145,"button",34),S("click",function(){return n.cancel()}),d(146,"Cancel"),l(),s(147,"button",35),S("click",function(){return n.save()}),d(148),l()()),t&2){let a=Se(17),r=Se(39),u=Se(47),h=Se(63),f=Se(75);c(),Q("",n.isClone?"Clone":n.isEdit?"Edit":"Add"," Avalon service"),c(2),x("formGroup",n.form),c(),p("changed",n.isControlChanged("name")),c(),C(),c(3),D(n.form.controls.name.errors?.required?8:n.form.controls.name.errors?.pattern?9:n.form.controls.name.errors?.nameTaken?10:-1),c(3),p("changed",n.isControlChanged("command")),c(),x("matAutocomplete",a),C(),c(3),D(n.form.controls.command.errors?.required?15:-1),c(3),te(n.filteredCommands()),c(2),p("has-changed",n.isSectionChanged("model")),c(6),x("existingPaths",n.existingModelPaths()),C(),c(),p("has-changed",n.isSectionChanged("gpus","mmproj","mmdev")),c(7),p("changed",n.isControlChanged("gpus")),c(),x("matAutocomplete",r),C(),c(5),te(n.deviceNames()),c(2),p("changed",n.isControlChanged("mmdev")),c(),x("matAutocomplete",u),C(),c(5),te(n.mmdevSuggestions()),c(2),D(n.isVisionOn()?50:-1),c(),x("placeholder",n.isVisionOn()?"/path/to/mmproj-F16.gguf or none":"none \u2014 vision off")("existingPaths",n.existingMmprojPaths()),C(),c(),D(n.isVisionDeviceClash()?52:-1),c(),p("has-changed",n.isSectionChanged("host","port","ctxSize")),c(5),p("changed",n.isControlChanged("host")),c(),x("matAutocomplete",h),C(),c(5),te(n.filteredHosts()),c(2),p("changed",n.isControlChanged("port")),c(),C(),c(3),p("changed",n.isControlChanged("ctxSize")),c(),x("matAutocomplete",f),C(),c(5),te(n.ctxPresets()),c(2),p("has-changed",n.isSectionChanged("parallel")),c(7),p("changed",n.isControlChanged("parallel")),c(),C(),c(8),p("has-changed",n.isSectionChanged("reasoningPreserve")),c(7),p("changed",n.isControlChanged("reasoningPreserve")),c(),C(),c(7),p("has-changed",n.isSectionChanged("extraFlags","envText")),c(6),p("changed",n.isControlChanged("extraFlags")),c(),C(),c(3),p("changed",n.isControlChanged("envText")),c(),C(),c(11),x("matTooltip",n.runAs.userHint()),C(),c(4),x("matTooltip",n.runAs.groupHint()),C(),c(4),C(),c(),te(n.restartOptions),c(7),x("disabled",n.form.invalid),c(),Q(" ",n.isEdit&&!n.isClone?"Save":"Create"," ")}},dependencies:[Me,gi,An,Zt,oo,Qt,$i,Ba,Wi,$t,Ti,Qi,Zi,Dt,Li,ze,Ue,Hn,oa,uo,ta,na,ia,Mt,ut,_t,qi,Pt,Rt,st,yt,xt,Ct,bt,vt,en,Ji,aa,ho,qs],styles:['@charset "UTF-8";.avalon-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px;min-width:640px}.form-row[_ngcontent-%COMP%]{display:flex;gap:12px;margin-bottom:4px;align-items:center}.form-col[_ngcontent-%COMP%]{flex:1}.full-width[_ngcontent-%COMP%]{width:100%}.auto-path[_ngcontent-%COMP%]{font-family:monospace}.auto-from[_ngcontent-%COMP%]{margin-left:8px;opacity:.6;font-size:12px}.flags-textarea[_ngcontent-%COMP%], .env-textarea[_ngcontent-%COMP%]{overflow-x:auto}mat-dialog-content[_ngcontent-%COMP%]{padding-top:10px!important;max-height:80vh}mat-expansion-panel[_ngcontent-%COMP%]{margin-bottom:0}mat-dialog-actions[_ngcontent-%COMP%]{gap:8px}.subsection-label[_ngcontent-%COMP%]{font-size:12px;font-weight:500;color:#0009;margin:4px 0 14px;text-transform:uppercase;letter-spacing:.5px}.hint[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:8px;font-size:12px;line-height:1.45;color:#666;background:#f5f5f5;border:1px solid #e0e0e0;border-radius:6px;padding:8px 10px;margin:4px 0 8px}.hint[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px;color:#999}.hint-warning[_ngcontent-%COMP%]{color:#e65100;background:#fff3e0;border-color:#ffe0b2}.hint-warning[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#e65100}mat-expansion-panel.has-changed[_ngcontent-%COMP%] mat-panel-title[_ngcontent-%COMP%]{font-weight:700}mat-form-field.changed[_ngcontent-%COMP%] .mat-mdc-form-field-infix input, mat-form-field.changed[_ngcontent-%COMP%] .mat-mdc-form-field-infix .mat-mdc-select{font-weight:700}']})}}return i})();var WC=(i,o)=>o.name;function qC(i,o){if(i&1&&(s(0,"div",10)(1,"mat-icon"),d(2,"warning"),l(),s(3,"span"),d(4),l()()),i&2){let e=v();c(4),kd(" Backend pid ",e.serverIdentity().pid," on ",e.serverIdentity().host,":",e.serverIdentity().port," is not elevated, so services cannot be started, stopped or installed. Stop every backend instance and launch one as Administrator \u2014 port ",e.serverIdentity().port," may still be held by an older, non-elevated instance. ")}}function KC(i,o){if(i&1){let e=_e();s(0,"button",26),S("click",function(n){ne(e);let a=v(2).$implicit;return v(2).control(a.name,"start"),oe(n.stopPropagation())}),s(1,"mat-icon"),d(2,"play_arrow"),l(),d(3," Start "),l()}if(i&2){let e=v(2).$implicit,t=v(2);x("disabled",t.busy()?.name===e.name)}}function XC(i,o){if(i&1){let e=_e();s(0,"button",27),S("click",function(n){ne(e);let a=v(2).$implicit;return v(2).control(a.name,"stop"),oe(n.stopPropagation())}),s(1,"mat-icon"),d(2,"stop"),l(),d(3," Stop "),l()}if(i&2){let e=v(2).$implicit,t=v(2);x("disabled",t.busy()?.name===e.name)}}function YC(i,o){if(i&1){let e=_e();s(0,"button",28),S("click",function(n){ne(e);let a=v(2).$implicit;return v(2).control(a.name,"disable"),oe(n.stopPropagation())}),s(1,"mat-icon"),d(2,"lock"),l(),d(3," Disable "),l()}if(i&2){let e=v(2).$implicit,t=v(2);x("disabled",t.busy()?.name===e.name)}}function ZC(i,o){if(i&1){let e=_e();s(0,"button",28),S("click",function(n){ne(e);let a=v(2).$implicit;return v(2).control(a.name,"enable"),oe(n.stopPropagation())}),s(1,"mat-icon"),d(2,"lock_open"),l(),d(3," Enable "),l()}if(i&2){let e=v(2).$implicit,t=v(2);x("disabled",e.enabled||t.busy()?.name===e.name)}}function QC(i,o){if(i&1&&(w(0,KC,4,1,"button",20)(1,XC,4,1,"button",24),w(2,YC,4,1,"button",25)(3,ZC,4,1,"button",25)),i&2){let e=v().$implicit;D(e.running?1:0),c(2),D(e.enabled?2:3)}}function JC(i,o){if(i&1){let e=_e();s(0,"button",26),S("click",function(n){ne(e);let a=v().$implicit;return v(2).installService(a.name),oe(n.stopPropagation())}),s(1,"mat-icon"),d(2,"download"),l(),d(3," Install "),l()}if(i&2){let e=v().$implicit,t=v(2);x("disabled",t.busy()?.name===e.name)}}function ex(i,o){if(i&1){let e=_e();s(0,"button",8),S("click",function(){ne(e);let n=v().$implicit,a=v(2);return oe(a.reinstallService(n.name))}),s(1,"mat-icon"),d(2,"refresh"),l(),s(3,"span"),d(4,"Reinstall"),l()()}}function tx(i,o){if(i&1){let e=_e();s(0,"tr",15),S("click",function(){let n=ne(e).$implicit,a=v(2);return oe(a.selectedServiceService.select(n.name))}),s(1,"td")(2,"div",16),_(3,"span",17),s(4,"span",18),d(5),l()()(),s(6,"td",19),w(7,QC,4,2)(8,JC,4,1,"button",20),l(),s(9,"td",19)(10,"div")(11,"button",21)(12,"mat-icon"),d(13,"more_vert"),l()(),s(14,"mat-menu",22,2)(16,"button",8),S("click",function(){let n=ne(e).$implicit,a=v(2);return oe(a.editService(n))}),s(17,"mat-icon"),d(18,"edit"),l(),s(19,"span"),d(20,"Edit"),l()(),s(21,"button",8),S("click",function(){let n=ne(e).$implicit,a=v(2);return oe(a.cloneService(n))}),s(22,"mat-icon"),d(23,"content_copy"),l(),s(24,"span"),d(25,"Clone"),l()(),w(26,ex,5,0,"button",23),s(27,"button",8),S("click",function(){let n=ne(e).$implicit,a=v(2);return oe(a.archiveService(n.name))}),s(28,"mat-icon"),d(29,"inventory_2"),l(),s(30,"span"),d(31,"Move to Archive"),l()(),s(32,"button",8),S("click",function(){let n=ne(e).$implicit,a=v(2);return oe(a.deleteService(n.name))}),s(33,"mat-icon"),d(34,"delete"),l(),s(35,"span"),d(36,"Delete"),l()()()()()()}if(i&2){let e=o.$implicit,t=Se(15);p("custom",e.hasConfig),c(3),p("running",e.running),c(),p("disabled",!e.enabled),c(),I(e.name),c(2),D(e.installed?7:e.hasConfig?8:-1),c(3),je("visibility",e.hasConfig?"visible":"hidden"),c(),x("matMenuTriggerFor",t),c(15),D(e.installed?26:-1)}}function ix(i,o){if(i&1&&(s(0,"div",11)(1,"table",13)(2,"tbody"),ee(3,tx,37,12,"tr",14,WC),l()()()),i&2){let e=v();c(3),te(e.filtered())}}function nx(i,o){if(i&1&&(s(0,"p"),d(1),l()),i&2){let e=v(2);c(),Q('No services match "',e.filter().trim(),'".')}}function ox(i,o){i&1&&(s(0,"p"),d(1,'No services configured. Click "Managed services" to select system services or "Custom service" to create one.'),l())}function ax(i,o){if(i&1&&(s(0,"div",12),w(1,nx,2,1,"p")(2,ox,2,0,"p"),l()),i&2){let e=v();c(),D(e.filter().trim()?1:2)}}var Up=(()=>{class i{constructor(){this.serviceService=m(wt),this.serviceList=m(Hs),this.systemService=m(Ot),this.accountPassword=m(Ws),this.selectedServiceService=m(js),this.dialog=m(Nn),this.snackBar=m(zs),this.services=this.serviceList.services,this.configs=E([]),this.loading=E(!0),this.serverIdentity=E(null),this.busy=E(null),this.unified=P(()=>{let e=this.services(),t=this.configs(),n=new Map;for(let u of t)n.set(u.name,u);let a=e.filter(u=>n.has(u.name)).map(u=>{let h=n.get(u.name)??null;return{name:u.name,running:u.running,enabled:u.enabled,installed:u.installed,pid:u.pid,error:u.error,config:h,hasConfig:!0}}),r=e.filter(u=>!n.has(u.name)).map(u=>Fe(V({},u),{config:null,hasConfig:!1}));return[...a,...r]}),this.filter=E(""),this.filtered=P(()=>{let e=this.filter().trim().toLowerCase(),t=this.unified();return e?t.filter(n=>n.name.toLowerCase().includes(e)):t}),this.backendUnprivileged=P(()=>{let e=this.serverIdentity();return e!==null&&!e.privileged})}onFilterInput(e){this.filter.set(e.target.value)}ngOnInit(){this.load(),this.loadServerIdentity()}loadServerIdentity(){this.systemService.getSystemInfo().then(e=>this.serverIdentity.set(e.server??null)).catch(()=>this.serverIdentity.set(null))}load(){return q(this,null,function*(){this.loading.set(!0);try{yield this.serviceList.refresh(),this.configs.set(yield re(this.serviceService.fetchConfigs()))}catch(e){console.error("[ServicesComponent] load error:",e)}finally{this.loading.set(!1)}})}control(e,t){return q(this,null,function*(){let n=this.busy();if(!(n&&n.name===e&&n.action===t)){this.selectedServiceService.select(e),this.busy.set({name:e,action:t});try{let a=yield re(this.serviceService.control(e,t));a.error&&this.showError(`${e}: ${a.error}`),yield this.load()}catch(a){this.showError(`${e}: ${this.errorText(a)}`)}finally{this.busy.set(null)}}})}installService(e){return q(this,null,function*(){let t=this.busy();if(t&&t.name===e&&t.action==="install")return;let n=yield this.accountPassword.askFor(this.configOf(e));if(n!==null){this.selectedServiceService.select(e),this.busy.set({name:e,action:"install"});try{let a=yield re(this.serviceService.installService(e,n??void 0));a.error&&this.showError(`${e}: ${a.error}`),yield this.load()}catch(a){this.showError(`Install "${e}": ${this.errorText(a)}`)}finally{this.busy.set(null)}}})}configOf(e){return this.configs().find(t=>t.name===e)}reinstallService(e){return q(this,null,function*(){confirm(`Reinstall service "${e}" from its current config? A running instance will be stopped.`)&&(yield this.installService(e))})}showError(e){this.snackBar.open(e,"Dismiss",{duration:8e3,horizontalPosition:"center",verticalPosition:"top"})}errorText(e){return e instanceof Ht?e.error?.error??e.message:String(e)}manageServices(){this.dialog.open(kp,{maxWidth:"600px"}).afterClosed().subscribe(t=>{t&&this.load()})}archiveServices(){this.dialog.open(Ep,{minWidth:"560px"}).afterClosed().subscribe(t=>{t&&this.load()})}addService(e){this.openDialog(null,e)}editService(e){this.selectedServiceService.select(e.name),this.openDialog(e.config,e.config?.type)}cloneService(e){if(!e.config)return;let t=Fe(V({},e.config),{name:this.uniqueCloneName(e.name)});this.openDialog(t,t.type,!0)}uniqueCloneName(e){let t=new Set(this.configs().map(a=>a.name));if(!t.has(`${e}-copy`))return`${e}-copy`;let n=2;for(;t.has(`${e}-copy-${n}`);)n++;return`${e}-copy-${n}`}deleteService(e){return q(this,null,function*(){if(confirm(`Delete service "${e}"? Its systemd unit will be uninstalled and the config removed.`)){this.selectedServiceService.select(e);try{yield re(this.serviceService.deleteConfig(e)),yield this.load()}catch(t){this.showError(`Delete "${e}": ${this.errorText(t)}`)}}})}archiveService(e){return q(this,null,function*(){if(confirm(`Move service "${e}" to the archive? It will be stopped, uninstalled, and its config shelved. You can restore it from the archive.`)){this.selectedServiceService.select(e);try{yield re(this.serviceService.archiveService(e)),yield this.load()}catch(t){this.showError(`Archive "${e}": ${this.errorText(t)}`)}}})}hasFlags(e){return e.flags.length>0}openDialog(e,t,n=!1){let a=t??e?.type??"generic";if(a==="llama-server"){let r={config:e,allConfigs:this.configs(),clone:n},u=this.dialog.open(Vp,{data:r,minWidth:"800px"});this.handleDialogResult(u,e,n)}else if(a==="vllm"){let r={config:e,allConfigs:this.configs(),clone:n},u=this.dialog.open(zp,{data:r,minWidth:"800px"});this.handleDialogResult(u,e,n)}else if(a==="avalon"){let r={config:e,allConfigs:this.configs(),clone:n},u=this.dialog.open(Hp,{data:r,minWidth:"800px"});this.handleDialogResult(u,e,n)}else{let r={config:e,allConfigs:this.configs(),clone:n},u=this.dialog.open(yp,{data:r,minWidth:"1000px"});this.handleDialogResult(u,e,n)}}handleDialogResult(e,t,n=!1){e.afterClosed().subscribe(a=>q(this,null,function*(){if(!a)return;let r=yield this.accountPassword.askFor(a);if(r===null)return;let u=r?Fe(V({},a),{runAsPassword:r}):a;try{if(n)yield re(this.serviceService.saveConfig(u));else{let h=t?.name??null;if(h!==null&&h!==a.name){let b=this.unified().find(G=>G.name===h),M=b?.running??!1,j=b?.enabled??!1;yield re(this.serviceService.deleteConfig(h)),yield re(this.serviceService.saveConfig(u)),j&&(yield re(this.serviceService.control(a.name,"enable"))),M&&(yield re(this.serviceService.control(a.name,"start")))}else yield re(this.serviceService.saveConfig(u))}}catch(h){this.showError(`Save: ${this.errorText(h)}`)}finally{yield this.load()}}))}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=R({type:i,selectors:[["app-services"]],decls:50,vars:5,consts:[["servicesMenu","matMenu"],["addMenu",""],["serviceMenu","matMenu"],[1,"services-card"],[1,"section-header"],["type","text","placeholder","Filter by name\u2026",1,"service-filter",3,"input","value"],["mat-icon-button","","title","Services actions",1,"header-menu-btn",3,"matMenuTriggerFor"],["xPosition","before"],["mat-menu-item","",3,"click"],["mat-menu-item","",3,"matMenuTriggerFor"],["role","alert",1,"privilege-warning"],[1,"services-scroll"],[1,"empty"],[1,"services-list"],[3,"custom"],[3,"click"],[1,"service-name"],[1,"status-dot"],[1,"name-text"],[1,"service-actions-cell"],["mat-raised-button","","color","primary",3,"disabled"],["mat-icon-button","","title","Service actions",3,"matMenuTriggerFor"],["yPosition","below"],["mat-menu-item",""],["mat-raised-button","","color","warn",3,"disabled"],["mat-stroked-button","",3,"disabled"],["mat-raised-button","","color","primary",3,"click","disabled"],["mat-raised-button","","color","warn",3,"click","disabled"],["mat-stroked-button","",3,"click","disabled"]],template:function(t,n){if(t&1&&(s(0,"div",3)(1,"div",4)(2,"h2"),d(3,"Services"),l(),s(4,"input",5),S("input",function(r){return n.onFilterInput(r)}),l(),s(5,"button",6)(6,"mat-icon"),d(7,"more_vert"),l()(),s(8,"mat-menu",7,0)(10,"button",8),S("click",function(){return n.manageServices()}),s(11,"mat-icon"),d(12,"tune"),l(),s(13,"span"),d(14,"Managed services"),l()(),s(15,"button",8),S("click",function(){return n.archiveServices()}),s(16,"mat-icon"),d(17,"inventory_2"),l(),s(18,"span"),d(19,"Archive"),l()(),s(20,"button",9)(21,"mat-icon"),d(22,"add"),l(),s(23,"span"),d(24,"Custom service"),l()()(),s(25,"mat-menu",null,1)(27,"button",8),S("click",function(){return n.addService("generic")}),s(28,"mat-icon"),d(29,"settings"),l(),s(30,"span"),d(31,"Generic service"),l()(),s(32,"button",8),S("click",function(){return n.addService("llama-server")}),s(33,"mat-icon"),d(34,"smart_toy"),l(),s(35,"span"),d(36,"llama-server"),l()(),s(37,"button",8),S("click",function(){return n.addService("vllm")}),s(38,"mat-icon"),d(39,"bolt"),l(),s(40,"span"),d(41,"vllm"),l()(),s(42,"button",8),S("click",function(){return n.addService("avalon")}),s(43,"mat-icon"),d(44,"hub"),l(),s(45,"span"),d(46,"Avalon"),l()()()(),w(47,qC,5,4,"div",10),w(48,ix,5,0,"div",11)(49,ax,3,1,"div",12),l()),t&2){let a=Se(9),r=Se(26);c(4),x("value",n.filter()),c(),x("matMenuTriggerFor",a),c(15),x("matMenuTriggerFor",r),c(27),D(n.backendUnprivileged()?47:-1),c(),D(n.filtered().length>0?48:n.loading()?-1:49)}},dependencies:[Me,ze,Ue,Ai,Wo,Bs,Ln,mo,Vs,bt,vt],styles:[".services-card[_ngcontent-%COMP%]{flex:1 1 auto;min-height:0;display:flex;flex-direction:column}.privilege-warning[_ngcontent-%COMP%]{flex:0 0 auto;display:flex;align-items:flex-start;gap:8px;margin-bottom:8px;padding:8px 12px;border-radius:6px;background:#ffebee;color:#c62828;font-size:.85rem;line-height:1.4}.privilege-warning[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px}.section-header[_ngcontent-%COMP%]{flex:0 0 auto;display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.section-header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0;font-size:1.1rem;font-weight:600;color:#333}.section-header[_ngcontent-%COMP%] .header-menu-btn[_ngcontent-%COMP%]{color:#666}.section-header[_ngcontent-%COMP%] .service-filter[_ngcontent-%COMP%]{flex:1 1 240px;max-width:320px;min-width:140px;margin:0 16px;padding:6px 12px;font-size:.9rem;border:1px solid #cfcfcf;border-radius:16px;outline:none;background:#fff;transition:border-color .15s ease,box-shadow .15s ease}.section-header[_ngcontent-%COMP%] .service-filter[_ngcontent-%COMP%]::placeholder{color:#9e9e9e}.section-header[_ngcontent-%COMP%] .service-filter[_ngcontent-%COMP%]:focus{border-color:#7c4dff;box-shadow:0 0 0 2px #7c4dff26}.services-scroll[_ngcontent-%COMP%]{flex:1 1 auto;min-height:0;overflow-y:auto}.services-list[_ngcontent-%COMP%]{width:100%;border-collapse:collapse}.services-list[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{border-bottom:1px solid #e0e0e0;transition:background-color .2s ease}.services-list[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{background-color:#fff}.services-list[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:last-child{border-bottom:none}.services-list[_ngcontent-%COMP%] tr.custom[_ngcontent-%COMP%], .services-list[_ngcontent-%COMP%] tr.custom[_ngcontent-%COMP%]:first-child td[_ngcontent-%COMP%]:first-child{border-left:3px solid #7c4dff}.services-list[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:4px 12px;vertical-align:middle}.service-name[_ngcontent-%COMP%]{font-size:1rem;font-weight:600;white-space:nowrap;display:flex;align-items:center;gap:8px}.service-name[_ngcontent-%COMP%] .status-dot[_ngcontent-%COMP%]{display:inline-block;width:10px;height:10px;border-radius:50%;background-color:#bdbdbd}.service-name[_ngcontent-%COMP%] .status-dot.running[_ngcontent-%COMP%]{background-color:#4caf50}.service-name[_ngcontent-%COMP%] .name-text[_ngcontent-%COMP%]{color:#212121}.service-name[_ngcontent-%COMP%] .name-text.disabled[_ngcontent-%COMP%]{color:#9e9e9e}.service-actions-cell[_ngcontent-%COMP%]{white-space:nowrap}.service-actions-cell[_ngcontent-%COMP%] button[_ngcontent-%COMP%] + button[_ngcontent-%COMP%]{margin-left:8px}.status-chip[_ngcontent-%COMP%], .enabled-chip[_ngcontent-%COMP%]{font-size:.8rem;font-weight:500}.status-chip.running[_ngcontent-%COMP%]{--mat-chip-elevated-container-color: #a5d6a7}.status-chip.stopped[_ngcontent-%COMP%]{--mat-chip-elevated-container-color: #ef9a9a}.enabled-chip.enabled[_ngcontent-%COMP%]{--mat-chip-elevated-container-color: #90caf9}.enabled-chip.disabled[_ngcontent-%COMP%]{--mat-chip-elevated-container-color: #bdbdbd}.empty[_ngcontent-%COMP%]{text-align:center;padding:24px;color:#999;font-size:.9rem}.empty[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0}"]})}}return i})();var rx=["journalBody"],sx=(i,o)=>o.name;function lx(i,o){if(i&1&&(s(0,"mat-option",7),d(1),l()),i&2){let e=o.$implicit;x("value",e.name),c(),I(e.name)}}function cx(i,o){if(i&1){let e=_e();s(0,"button",10),S("click",function(){ne(e);let n=v(2);return oe(n.toggleWordWrap())}),s(1,"mat-icon"),d(2,"wrap_text"),l()()}}function dx(i,o){if(i&1){let e=_e();s(0,"button",11),S("click",function(){ne(e);let n=v(2);return oe(n.toggleWordWrap())}),s(1,"mat-icon"),d(2,"wrap_text"),l()()}}function mx(i,o){if(i&1){let e=_e();s(0,"mat-select",6),S("ngModelChange",function(n){ne(e);let a=v();return oe(a.onServiceChange(n))}),s(1,"mat-option",7),d(2,"\u2014 None \u2014"),l(),ee(3,lx,2,2,"mat-option",7,sx),l(),y(),w(5,cx,3,0,"button",8)(6,dx,3,0,"button",9)}if(i&2){let e=v();x("ngModel",e.selectedService()),C(),c(),x("value",null),c(2),te(e.services()),c(2),D(e.wordWrap()?5:6)}}function ux(i,o){if(i&1&&(s(0,"div",3),d(1),l()),i&2){let e=v();c(),I(e.error())}}function hx(i,o){if(i&1&&(s(0,"div",4,0)(2,"pre"),d(3),l()()),i&2){let e=v();c(2),p("wrap-on",e.wordWrap()),c(),I(e.journalText())}}function px(i,o){i&1&&(s(0,"div",5)(1,"p"),d(2,"No service selected"),l()())}var fx=40,$p=(()=>{class i{toggleWordWrap(){this.wordWrap.update(e=>!e)}constructor(){this.serviceService=m(wt),this.selectedServiceService=m(js),this.serviceList=m(Hs),this.cdr=m(se),this.services=this.serviceList.services,this.servicesLoaded=this.serviceList.loaded,this.journalLines=E([]),this.journalLoading=E(!1),this.journalError=E(null),this.error=P(()=>this.serviceList.error()??this.journalError()),this.selectedService=P(()=>this.selectedServiceService.selectedService()),this.wordWrap=E(!0),this.journalText=P(()=>{let e=this.journalLines();return e.length===0?"":e.map(t=>t.timestamp?`${t.timestamp} ${t.message}`:t.message).join(`
5605
+ `)}),Bt(()=>{if(!this.servicesLoaded())return;let e=this.selectedService();e!==null&&!this.services().some(t=>t.name===e)&&this.selectedServiceService.select(null)}),Bt(()=>{if(!this.servicesLoaded())return;this.selectedService()?(this.journalLines.set([]),this.journalError.set(null),this.restartPolling()):(this.stopPolling(),this.journalLines.set([]))}),this.serviceList.refresh()}ngAfterViewInit(){this.scrollToBottom()}ngOnDestroy(){this.stopPolling()}onServiceChange(e){this.selectedServiceService.select(e)}restartPolling(){this.stopPolling(),this.fetchJournal(),this.journalSub=pr(0,1e3).subscribe(()=>this.fetchJournal())}stopPolling(){this.journalSub&&(this.journalSub.unsubscribe(),this.journalSub=void 0)}fetchJournal(){let e=this.selectedService();e&&(this.isTextSelected()||(this.journalLoading.set(!0),this.serviceService.fetchJournal(e,100).subscribe({next:t=>{let n=this.isScrolledToBottom();this.journalLines.set(t),this.journalError.set(null),this.journalLoading.set(!1),this.cdr.markForCheck(),requestAnimationFrame(()=>{n&&this.scrollToBottom()})},error:t=>{this.journalError.set(t.message),this.journalLoading.set(!1),this.cdr.markForCheck()}})))}get scrollContainer(){return this.journalBody?.nativeElement??null}isTextSelected(){let e=typeof window<"u"?window:null;if(!e)return!1;let t=e.getSelection();if(!t||t.isCollapsed||!t.rangeCount)return!1;let n=this.scrollContainer;return n?n.contains(t.anchorNode):!1}isScrolledToBottom(){let e=this.scrollContainer;return e?e.scrollHeight-e.scrollTop-e.clientHeight<=fx:!0}scrollToBottom(){let e=this.scrollContainer;e&&(e.scrollTop=e.scrollHeight)}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=R({type:i,selectors:[["app-journal-panel"]],viewQuery:function(t,n){if(t&1&&Re(rx,5),t&2){let a;N(a=L())&&(n.journalBody=a.first)}},decls:9,vars:3,consts:[["journalBody",""],[1,"journal-card"],[1,"journal-header"],[1,"journal-error"],[1,"journal-body"],[1,"journal-body","journal-empty"],["disableOptionCentering","",1,"service-select",3,"ngModelChange","ngModel"],[3,"value"],["mat-flat-button","","color","primary","aria-label","Disable word wrap"],["mat-stroked-button","","aria-label","Enable word wrap"],["mat-flat-button","","color","primary","aria-label","Disable word wrap",3,"click"],["mat-stroked-button","","aria-label","Enable word wrap",3,"click"]],template:function(t,n){t&1&&(s(0,"mat-card",1)(1,"mat-card-content")(2,"div",2)(3,"h2"),d(4,"Journal"),l(),w(5,mx,7,3),l(),w(6,ux,2,1,"div",3),w(7,hx,4,3,"div",4)(8,px,3,0,"div",5),l()()),t&2&&(c(5),D(n.servicesLoaded()&&n.services().length>0?5:-1),c(),D(n.error()?6:-1),c(),D(n.selectedService()?7:8))},dependencies:[Me,wn,Cn,xn,en,Ji,Dt,ze,Ue,bt,vt,pi,gi,Qt,Ha],styles:[".journal-card[_ngcontent-%COMP%]{height:100%;display:flex;flex-direction:column;overflow:hidden}.journal-card[_ngcontent-%COMP%] mat-card-content[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;overflow:hidden;padding-bottom:8px}.journal-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;margin-bottom:12px;flex-shrink:0}.journal-header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0;font-size:20px;font-weight:500}.service-select[_ngcontent-%COMP%]{flex:1;min-width:150px}.journal-error[_ngcontent-%COMP%]{color:#f44336;font-size:13px;margin-bottom:8px;flex-shrink:0}.journal-body[_ngcontent-%COMP%]{flex:1;overflow-y:auto;background:#1e1e1e;border-radius:4px;padding:8px;min-height:0}.journal-body[_ngcontent-%COMP%]::-webkit-scrollbar{width:8px}.journal-body[_ngcontent-%COMP%]::-webkit-scrollbar-track{background:#2d2d2d;border-radius:4px}.journal-body[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#555;border-radius:4px}.journal-body[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background:#777}.journal-body[_ngcontent-%COMP%]{scrollbar-width:thin;scrollbar-color:#555 #2d2d2d}.journal-body[_ngcontent-%COMP%] pre[_ngcontent-%COMP%]{margin:0;font-family:Courier New,Courier,monospace;font-size:12px;line-height:1.6;color:#d4d4d4;white-space:pre}.journal-body[_ngcontent-%COMP%] pre.wrap-on[_ngcontent-%COMP%]{white-space:pre-wrap}.journal-empty[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center}.journal-empty[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;color:#888;font-size:14px}[_nghost-%COMP%] .mdc-button{min-width:32px}[_nghost-%COMP%] .mat-mdc-unelevated-button>.mat-icon, [_nghost-%COMP%] .mat-mdc-outlined-button>.mat-icon{margin-right:0}"]})}}return i})();var Ks=(()=>{class i{constructor(){this.http=m(It),this.baseUrl="/api/hf"}getStatus(){return q(this,null,function*(){return re(this.http.get(`${this.baseUrl}/status`))})}getDownloads(){return q(this,null,function*(){return re(this.http.get(`${this.baseUrl}/downloads`))})}getLocalModels(){return q(this,null,function*(){return re(this.http.get(`${this.baseUrl}/models`))})}deleteLocalModel(e){return q(this,null,function*(){let[t,...n]=e.split("/");yield re(this.http.delete(`${this.baseUrl}/models/${t}/${n.join("/")}`))})}deleteLocalModelFile(e,t){return q(this,null,function*(){let[n,...a]=e.split("/");yield re(this.http.delete(`${this.baseUrl}/models/${n}/${a.join("/")}/files/${encodeURIComponent(t)}`))})}getOrphanBlobs(){return q(this,null,function*(){return re(this.http.get(`${this.baseUrl}/models/orphans`))})}cleanupOrphanBlobs(){return q(this,null,function*(){return re(this.http.post(`${this.baseUrl}/models/orphans/cleanup`,{}))})}action(e,t){return q(this,null,function*(){yield re(this.http.post(`${this.baseUrl}/downloads/action`,{action:e,repoId:t.repoId,dest:t.dest}))})}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275prov=ae({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var gx=(i,o)=>o.device,_x=(i,o)=>o.path;function vx(i,o){i&1&&_(0,"mat-progress-bar",2)}function bx(i,o){if(i&1&&(s(0,"p",3),d(1),l()),i&2){let e=v();c(),I(e.error())}}function yx(i,o){if(i&1&&(s(0,"span",11),d(1),l()),i&2){let e=v(2);c(),I(e.info().uptime)}}function Cx(i,o){if(i&1&&(s(0,"div",12)(1,"span",13),d(2,"Version"),l(),s(3,"span",14),d(4),l()()),i&2){let e=v(2);c(4),I(e.info().os.version)}}function xx(i,o){i&1&&(s(0,"p",19),d(1," Without elevated rights the backend cannot start, stop or install services. Stop every backend instance and launch one elevated \u2014 an older instance may still own the port. "),l())}function wx(i,o){if(i&1&&(s(0,"div",6)(1,"h3"),d(2,"Backend"),l(),s(3,"div",7)(4,"div",8)(5,"mat-chip-set")(6,"mat-chip",18),d(7),l(),s(8,"mat-chip",9),d(9),l()()(),s(10,"div",12)(11,"span",13),d(12,"Listening on"),l(),s(13,"span",14),d(14),l()(),s(15,"div",12)(16,"span",13),d(17,"Started"),l(),s(18,"span",14),d(19),Do(20,"date"),l()(),s(21,"div",12)(22,"span",13),d(23,"Platform"),l(),s(24,"span",14),d(25),l()(),w(26,xx,2,0,"p",19),l()(),_(27,"mat-divider",15)),i&2){let e=v(2);c(6),p("server-chip-ok",e.info().server.privileged)("server-chip-warn",!e.info().server.privileged),c(),Q(" ",e.info().server.privileged?"privileged":"not privileged"," "),c(2),Q("pid ",e.info().server.pid),c(5),mi("",e.info().server.host,":",e.info().server.port),c(5),I(So(20,11,e.info().server.startedAt,"medium")),c(6),I(e.info().server.platform),c(),D(e.info().server.privileged?-1:26)}}function Dx(i,o){if(i&1&&(s(0,"div",16)(1,"div",20)(2,"span",21),d(3),l(),s(4,"span",22),d(5),l()(),s(6,"div",23),_(7,"div",24),l(),s(8,"div",25)(9,"span"),d(10),l(),s(11,"span"),d(12),l()()()),i&2){let e=o.$implicit,t=v(2);c(3),I(e.device),c(2),I(e.mountPoint),c(2),je("width",e.usePercent,"%")("background",e.usePercent>90?"#f44336":e.usePercent>75?"#ff9800":"#4caf50"),c(3),mi("",t.formatBytes(e.available)," free of ",t.formatBytes(e.total)),c(2),Q("",e.usePercent,"% used")}}function Sx(i,o){if(i&1&&(s(0,"div",29)(1,"span",33),d(2,"Last"),l(),s(3,"span",34),d(4),Do(5,"date"),l()()),i&2){let e=v(3);c(4),I(So(5,1,e.info().timeshift.lastSnapshot,"medium"))}}function kx(i,o){if(i&1&&(s(0,"mat-chip",35),d(1),l()),i&2){let e=o.$implicit;c(),I(e)}}function Mx(i,o){if(i&1&&(s(0,"mat-chip-set"),ee(1,kx,2,1,"mat-chip",35,Ye),l()),i&2){let e=v(3);c(),te(e.info().timeshift.schedules)}}function Ex(i,o){if(i&1&&(s(0,"div",6)(1,"h3"),d(2,"Timeshift Backup"),l(),s(3,"div",7)(4,"div",8)(5,"mat-chip-set")(6,"mat-chip",26),d(7),l(),s(8,"mat-chip",27),d(9),l()(),s(10,"span",28),d(11),l()(),w(12,Sx,6,4,"div",29),s(13,"div",30),_(14,"div",31),l(),s(15,"div",32)(16,"span"),d(17),l(),w(18,Mx,3,0,"mat-chip-set"),l()()(),_(19,"mat-divider",15)),i&2){let e=v(2);c(7),I(e.info().timeshift.mode),c(2),I(e.info().timeshift.device),c(2),Q("",e.info().timeshift.snapshots," snapshots"),c(),D(e.info().timeshift.lastSnapshot?12:-1),c(2),je("width",e.info().timeshift.totalSpace>0?(e.info().timeshift.totalSpace-e.info().timeshift.freeSpace)/e.info().timeshift.totalSpace*100:0,"%")("background",e.info().timeshift.totalSpace>0&&(e.info().timeshift.totalSpace-e.info().timeshift.freeSpace)/e.info().timeshift.totalSpace>.9?"#f44336":e.info().timeshift.totalSpace>0&&(e.info().timeshift.totalSpace-e.info().timeshift.freeSpace)/e.info().timeshift.totalSpace>.75?"#ff9800":"#4caf50"),c(3),mi("",e.formatBytes(e.info().timeshift.freeSpace)," free of ",e.formatBytes(e.info().timeshift.totalSpace)),c(),D(e.info().timeshift.schedules.length>0?18:-1)}}function Tx(i,o){if(i&1&&d(0),i&2){let e=v().$implicit,t=v(2);Q(" ",t.formatBytes(e.size)," ")}}function Ax(i,o){i&1&&d(0," \u2014 ")}function Ix(i,o){if(i&1&&(s(0,"div",17)(1,"span",36),d(2),l(),s(3,"span",37),w(4,Tx,1,1)(5,Ax,1,0),l()()),i&2){let e=o.$implicit;c(2),I(e.path),c(2),D(e.exists?4:5)}}function Rx(i,o){if(i&1&&(s(0,"div",6)(1,"h3"),d(2,"Operating System"),l(),s(3,"div",7)(4,"div",8)(5,"mat-chip-set")(6,"mat-chip",9),d(7),l(),s(8,"mat-chip",10),d(9),l()(),w(10,yx,2,1,"span",11),l(),w(11,Cx,5,1,"div",12),s(12,"div",12)(13,"span",13),d(14,"Kernel"),l(),s(15,"span",14),d(16),l()()()(),_(17,"mat-divider",15),w(18,wx,28,14),s(19,"div",6)(20,"h3"),d(21,"Disks"),l(),ee(22,Dx,13,9,"div",16,gx),l(),_(24,"mat-divider",15),w(25,Ex,20,11),s(26,"div",6)(27,"h3"),d(28,"System Logs"),l(),ee(29,Ix,6,2,"div",17,_x),l()),i&2){let e=v();c(7),I(e.info().hostname),c(2),I(e.info().os.name),c(),D(e.info().uptime?10:-1),c(),D(e.info().os.version?11:-1),c(5),I(e.info().kernel),c(2),D(e.info().server?18:-1),c(4),te(e.info().disks),c(3),D(e.info().timeshift?25:-1),c(4),te(e.info().logs)}}var Gp=(()=>{class i{constructor(){this.systemService=m(Ot),this.dialogRef=m(et),this.loading=E(!0),this.info=E(null),this.error=E(null)}ngOnInit(){return q(this,null,function*(){try{let e=yield this.systemService.getSystemInfo();this.info.set(e)}catch(e){this.error.set(e instanceof Error?e.message:"Failed to load system info")}finally{this.loading.set(!1)}})}formatBytes(e){return e===0?"0 B":`${(e/(1024*1024*1024)).toFixed(1)} GB`}close(){this.dialogRef.close()}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=R({type:i,selectors:[["app-system-info-dialog"]],decls:12,vars:1,consts:[[1,"dialog-container"],["mat-dialog-title",""],["mode","indeterminate"],[1,"dialog-error"],["align","end"],["mat-raised-button","","color","primary",3,"click"],[1,"info-section"],[1,"info-card"],[1,"info-card-header"],[1,"hostname-chip"],[1,"distro-chip"],[1,"os-uptime"],[1,"info-row"],[1,"info-label"],[1,"info-value"],[1,"section-divider"],[1,"disk-row"],[1,"log-row"],[1,"server-chip"],[1,"server-warning"],[1,"disk-header"],[1,"disk-device"],[1,"disk-mount"],[1,"disk-bar-bg"],[1,"disk-bar-fill"],[1,"disk-details"],[1,"mode-chip"],[1,"device-chip"],[1,"timeshift-snapshots"],[1,"timeshift-row"],[1,"timeshift-disk-bar-bg"],[1,"timeshift-disk-bar-fill"],[1,"timeshift-disk-details"],[1,"timeshift-label"],[1,"timeshift-value"],[1,"schedule-chip"],[1,"log-path"],[1,"log-size"]],template:function(t,n){t&1&&(s(0,"div",0)(1,"h2",1)(2,"mat-icon"),d(3,"info"),l(),d(4," System Info "),l(),s(5,"mat-dialog-content"),w(6,vx,1,0,"mat-progress-bar",2)(7,bx,2,1,"p",3)(8,Rx,31,7),l(),s(9,"mat-dialog-actions",4)(10,"button",5),S("click",function(){return n.close()}),d(11,"OK"),l()()()),t&2&&(c(6),D(n.loading()?6:n.error()?7:n.info()?8:-1))},dependencies:[Me,ze,Ue,st,yt,xt,Ct,pi,Hi,ea,lr,bt,vt,Wo,Za,$h,xl],styles:[".dialog-container[_ngcontent-%COMP%]{min-width:480px}.dialog-error[_ngcontent-%COMP%]{color:#f44336;padding:8px 0}.info-section[_ngcontent-%COMP%]{margin-bottom:8px}.info-section[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0 0 8px;font-size:14px;font-weight:600;color:#666;text-transform:uppercase;letter-spacing:.5px}.info-row[_ngcontent-%COMP%]{display:flex;justify-content:space-between;padding:4px 0}.info-row[_ngcontent-%COMP%] .info-label[_ngcontent-%COMP%]{color:#666;font-size:14px}.info-row[_ngcontent-%COMP%] .info-value[_ngcontent-%COMP%]{font-family:monospace;font-size:13px;color:#333}.section-divider[_ngcontent-%COMP%]{margin:12px 0}.disk-row[_ngcontent-%COMP%]{margin-bottom:12px}.disk-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;margin-bottom:4px}.disk-header[_ngcontent-%COMP%] .disk-device[_ngcontent-%COMP%]{font-family:monospace;font-size:13px}.disk-header[_ngcontent-%COMP%] .disk-mount[_ngcontent-%COMP%]{font-size:13px;color:#666}.disk-bar-bg[_ngcontent-%COMP%]{height:6px;background:#e0e0e0;border-radius:3px;overflow:hidden;margin-bottom:2px}.disk-bar-fill[_ngcontent-%COMP%]{height:100%;border-radius:3px}.disk-details[_ngcontent-%COMP%]{display:flex;justify-content:space-between;font-size:12px;color:#666}.info-card[_ngcontent-%COMP%]{background:#f5f5f5;border-radius:8px;padding:12px}.info-card-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.info-card-header[_ngcontent-%COMP%] .hostname-chip[_ngcontent-%COMP%]{font-family:monospace;background:#e8eaf6!important;color:#303f9f!important}.info-card-header[_ngcontent-%COMP%] .distro-chip[_ngcontent-%COMP%], .info-card-header[_ngcontent-%COMP%] .mode-chip[_ngcontent-%COMP%]{font-weight:600;background:#e3f2fd!important;color:#1976d2!important}.info-card-header[_ngcontent-%COMP%] .device-chip[_ngcontent-%COMP%]{font-family:monospace;background:#e8eaf6!important;color:#303f9f!important}.info-card-header[_ngcontent-%COMP%] .server-chip-ok[_ngcontent-%COMP%]{font-weight:600;background:#e8f5e9!important;color:#2e7d32!important}.info-card-header[_ngcontent-%COMP%] .server-chip-warn[_ngcontent-%COMP%]{font-weight:600;background:#ffebee!important;color:#c62828!important}.server-warning[_ngcontent-%COMP%]{margin:8px 0 0;font-size:13px;color:#c62828}.os-uptime[_ngcontent-%COMP%], .timeshift-snapshots[_ngcontent-%COMP%]{font-size:13px;color:#666;white-space:nowrap}.timeshift-row[_ngcontent-%COMP%]{display:flex;justify-content:space-between;padding:4px 0;margin-bottom:6px}.timeshift-row[_ngcontent-%COMP%] .timeshift-label[_ngcontent-%COMP%]{color:#666;font-size:13px}.timeshift-row[_ngcontent-%COMP%] .timeshift-value[_ngcontent-%COMP%]{font-size:13px;color:#333}.timeshift-disk-bar-bg[_ngcontent-%COMP%]{height:6px;background:#e0e0e0;border-radius:3px;overflow:hidden;margin-bottom:4px}.timeshift-disk-bar-fill[_ngcontent-%COMP%]{height:100%;border-radius:3px}.timeshift-disk-details[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;font-size:12px;color:#666}.timeshift-disk-details[_ngcontent-%COMP%] .schedule-chip[_ngcontent-%COMP%]{font-size:11px;background:#fff3e0!important;color:#e65100!important}.log-row[_ngcontent-%COMP%]{display:flex;justify-content:space-between;padding:4px 0}.log-row[_ngcontent-%COMP%] .log-path[_ngcontent-%COMP%]{font-family:monospace;font-size:13px}.log-row[_ngcontent-%COMP%] .log-size[_ngcontent-%COMP%]{font-family:monospace;font-size:13px;color:#333}"]})}}return i})();var Wp=(()=>{class i{constructor(){this.http=m(It),this.baseUrl="/api/lmstudio"}getModels(){return q(this,null,function*(){return re(this.http.get(`${this.baseUrl}/models`))})}deleteModel(e){return q(this,null,function*(){let[t,...n]=e.split("/");yield re(this.http.delete(`${this.baseUrl}/models/${t}/${n.join("/")}`))})}deleteModelFile(e,t){return q(this,null,function*(){let[n,...a]=e.split("/");yield re(this.http.delete(`${this.baseUrl}/models/${n}/${a.join("/")}/files/${encodeURIComponent(t)}`))})}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275prov=ae({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var Xs=(i,o)=>o.name,Px=(i,o)=>o.repoId+o.dest;function Ox(i,o){i&1&&(s(0,"div",2),d(1),l()),i&2&&(c(),I(o))}function Fx(i,o){i&1&&(s(0,"div",4),d(1,"Loading\u2026"),l())}function Nx(i,o){i&1&&(s(0,"div",5),d(1,"Loading\u2026"),l())}function Lx(i,o){i&1&&(s(0,"div",6),d(1,"No models in the Hugging Face cache"),l())}function Vx(i,o){if(i&1&&(s(0,"mat-icon",22),d(1),l(),s(2,"span",17),d(3),l(),s(4,"span",23),d(5),l()),i&2){let e=v().$implicit,t=v(3);c(),Q(" ",t.expanded()==="hf:"+e.name?"expand_more":"chevron_right"," "),c(2),I(e.name),c(2),Q("",t.hfFiles(e).length," file(s)")}}function Bx(i,o){if(i&1&&(s(0,"span",17),d(1),l()),i&2){let e=v().$implicit;c(),I(e.name)}}function zx(i,o){if(i&1&&(s(0,"span",26),d(1),l()),i&2){let e=v().$implicit;c(),Q("",e.shards.length," shards")}}function jx(i,o){if(i&1){let e=_e();s(0,"div",24)(1,"span",25),d(2),l(),w(3,zx,2,1,"span",26),s(4,"span",19),d(5),l(),s(6,"button",27),S("click",function(){let n=ne(e).$implicit,a=v(2).$implicit,r=v(3);return oe(r.deleteHfFile(a,n))}),s(7,"mat-icon"),d(8,"delete"),l()()()}if(i&2){let e=o.$implicit,t=v(2).$implicit,n=v(3);c(),x("title",e.shards?e.shards.join(`
5606
+ `):e.name),c(),I(e.name),c(),D(e.shards?3:-1),c(2),I(n.formatBytes(e.size)),c(),x("disabled",n.fileDeleting()==="hf:"+t.name+"/"+e.name)}}function Hx(i,o){if(i&1&&(s(0,"div",21),ee(1,jx,9,5,"div",24,Xs),l()),i&2){let e=v().$implicit,t=v(3);c(),te(t.hfFiles(e))}}function Ux(i,o){if(i&1){let e=_e();s(0,"div",14)(1,"div",15),S("click",function(){let n=ne(e).$implicit,a=v(3);return oe(a.hfFiles(n).length>0&&a.toggleExpand("hf:"+n.name))}),s(2,"div",16),w(3,Vx,6,3)(4,Bx,2,1,"span",17),l(),s(5,"span",18),d(6),l()(),s(7,"span",19),d(8),l(),s(9,"button",20),S("click",function(){let n=ne(e).$implicit,a=v(3);return oe(a.deleteModel(n))}),s(10,"mat-icon"),d(11,"delete"),l()()(),w(12,Hx,3,0,"div",21)}if(i&2){let e=o.$implicit,t=v(3);c(),p("expandable",t.hfFiles(e).length>0),c(2),D(t.hfFiles(e).length>0?3:4),c(2),x("title",e.dir),c(),I(e.dir),c(2),I(t.formatBytes(e.size)),c(),x("disabled",t.deleting()===e.name),c(3),D(t.expanded()==="hf:"+e.name?12:-1)}}function $x(i,o){if(i&1&&(s(0,"div",7),ee(1,Ux,13,8,null,null,Xs),l()),i&2){let e=v(2);c(),te(e.staticModels())}}function Gx(i,o){i&1&&(s(0,"div",6),d(1,"No active downloads"),l())}function Wx(i,o){if(i&1&&(s(0,"span",31),d(1),l()),i&2){let e=v().$implicit;c(),Q("pid ",e.pids.join(", "))}}function qx(i,o){if(i&1){let e=_e();s(0,"button",42),S("click",function(){ne(e);let n=v().$implicit,a=v(3);return oe(a.resume(n))}),s(1,"mat-icon"),d(2,"play_arrow"),l()()}}function Kx(i,o){if(i&1){let e=_e();s(0,"button",43),S("click",function(){ne(e);let n=v().$implicit,a=v(3);return oe(a.pause(n))}),s(1,"mat-icon"),d(2,"pause"),l()()}}function Xx(i,o){if(i&1){let e=_e();s(0,"div",28)(1,"div",29)(2,"div",16)(3,"span",17),d(4),l(),s(5,"span",30),d(6),l(),w(7,Wx,2,1,"span",31),l(),s(8,"div",18),d(9),l(),_(10,"mat-progress-bar",32),s(11,"div",33)(12,"span",34),d(13),l(),s(14,"span",35),d(15),l(),s(16,"span",36),d(17),l(),s(18,"span",37),d(19),l()()(),s(20,"div",38),w(21,qx,3,0,"button",39)(22,Kx,3,0,"button",40),s(23,"button",41),S("click",function(){let n=ne(e).$implicit,a=v(3);return oe(a.cancel(n))}),s(24,"mat-icon"),d(25,"cancel"),l()()()()}if(i&2){let e=o.$implicit,t=v(3);c(4),I(e.repoId),c(),p("paused",e.status==="paused"),c(),I(e.status),c(),D(e.pids.length>0?7:-1),c(),x("title",e.dest),c(),I(e.dest),c(),x("mode",t.progressMode(e))("value",t.percent(e)??0),c(3),mi(" ",t.formatBytes(e.doneBytes)," / ",e.totalBytes>0?t.formatBytes(e.totalBytes):"\u2026"," "),c(2),mi("",e.filesDone," / ",e.filesTotal," files"),c(2),I(t.formatSpeed(e.speedBps)),c(2),I(e.status==="paused"?"paused":"\u2248 "+t.formatEta(e.etaSeconds)),c(2),D(e.status==="paused"?21:22)}}function Yx(i,o){if(i&1&&(s(0,"div",11),ee(1,Xx,26,16,"div",28,Px),l()),i&2){let e=v(2);c(),te(e.downloads())}}function Zx(i,o){if(i&1&&(s(0,"span",12),d(1),l()),i&2){let e=v(2);c(),mi(" \u2014 ",e.orphans().length," file(s), ",e.formatBytes(e.totalOrphanBytes()))}}function Qx(i,o){i&1&&(s(0,"div",5),d(1,"Loading\u2026"),l())}function Jx(i,o){i&1&&(s(0,"div",6),d(1,"No orphaned blobs"),l())}function ew(i,o){if(i&1){let e=_e();s(0,"div",13)(1,"button",44),S("click",function(){ne(e);let n=v(2);return oe(n.cleanupOrphans())}),d(2),l()()}if(i&2){let e=v(2);c(),x("disabled",e.cleaning()),c(),Q(" ",e.cleaning()?"Cleaning\u2026":"Cleanup ("+e.formatBytes(e.totalOrphanBytes())+")"," ")}}function tw(i,o){if(i&1&&(s(0,"div",10),d(1,"Downloaded models"),l(),w(2,Nx,2,0,"div",5)(3,Lx,2,0,"div",6)(4,$x,3,0,"div",7),s(5,"div",10),d(6,"Downloading"),l(),w(7,Gx,2,0,"div",6)(8,Yx,3,0,"div",11),s(9,"div",10),d(10," Orphaned blobs "),w(11,Zx,2,2,"span",12),l(),w(12,Qx,2,0,"div",5)(13,Jx,2,0,"div",6)(14,ew,3,2,"div",13)),i&2){let e=v();c(2),D(e.modelsLoading()?2:e.staticModels().length===0?3:4),c(5),D(e.downloads().length===0?7:8),c(4),D(!e.orphansLoading()&&e.orphans().length>0?11:-1),c(),D(e.orphansLoading()?12:e.orphans().length===0?13:14)}}function iw(i,o){i&1&&(s(0,"div",5),d(1,"Loading\u2026"),l())}function nw(i,o){i&1&&(s(0,"div",6),d(1,"No models in ~/.lmstudio/models"),l())}function ow(i,o){if(i&1&&(s(0,"span",26),d(1),l()),i&2){let e=v().$implicit;c(),Q("",e.shards.length," shards")}}function aw(i,o){if(i&1){let e=_e();s(0,"div",24)(1,"span",25),d(2),l(),w(3,ow,2,1,"span",26),s(4,"span",19),d(5),l(),s(6,"button",27),S("click",function(){let n=ne(e).$implicit,a=v(2).$implicit,r=v(2);return oe(r.deleteLmFile(a,n))}),s(7,"mat-icon"),d(8,"delete"),l()()()}if(i&2){let e=o.$implicit,t=v(2).$implicit,n=v(2);c(),x("title",e.shards?e.shards.join(`
5607
+ `):e.name),c(),I(e.name),c(),D(e.shards?3:-1),c(2),I(n.formatBytes(e.size)),c(),x("disabled",n.fileDeleting()==="lm:"+t.name+"/"+e.name)}}function rw(i,o){i&1&&(s(0,"div",6),d(1,"No .gguf files"),l())}function sw(i,o){if(i&1&&(s(0,"div",21),ee(1,aw,9,5,"div",24,Xs,!1,rw,2,0,"div",6),l()),i&2){let e=v().$implicit;c(),te(e.files)}}function lw(i,o){if(i&1){let e=_e();s(0,"div",45)(1,"div",46),S("click",function(){let n=ne(e).$implicit,a=v(2);return oe(a.toggleExpand("lm:"+n.name))}),s(2,"div",16)(3,"mat-icon",22),d(4),l(),s(5,"span",17),d(6),l(),s(7,"span",23),d(8),l()(),s(9,"span",18),d(10),l()(),s(11,"span",19),d(12),l(),s(13,"button",20),S("click",function(){let n=ne(e).$implicit,a=v(2);return oe(a.deleteLmModel(n))}),s(14,"mat-icon"),d(15,"delete"),l()()(),w(16,sw,4,1,"div",21)}if(i&2){let e=o.$implicit,t=v(2);c(4),I(t.expanded()==="lm:"+e.name?"expand_more":"chevron_right"),c(2),I(e.name),c(2),Q("",e.files.length," file(s)"),c(),x("title",e.dir),c(),I(e.dir),c(2),I(t.formatBytes(e.size)),c(),x("disabled",t.lmDeleting()===e.name),c(3),D(t.expanded()==="lm:"+e.name?16:-1)}}function cw(i,o){if(i&1&&(s(0,"div",7),ee(1,lw,17,8,null,null,Xs),l()),i&2){let e=v();c(),te(e.lmModels())}}var dw=2e3,qp=(()=>{class i{constructor(){this.hfService=m(Ks),this.lmStudioService=m(Wp),this.dialogRef=m(et),this.downloads=E([]),this.models=E([]),this.loading=E(!0),this.modelsLoading=E(!0),this.error=E(null),this.deleting=E(null),this.lmModels=E([]),this.lmLoading=E(!0),this.lmDeleting=E(null),this.expanded=E(null),this.fileDeleting=E(null),this.staticModels=P(()=>{let e=new Set(this.downloads().map(t=>t.dest));return this.models().filter(t=>!e.has(t.dir))}),this.orphans=E([]),this.orphansLoading=E(!0),this.cleaning=E(!1),this.totalOrphanBytes=P(()=>this.orphans().reduce((e,t)=>e+t.size,0)),this.timer=null,this.busy=!1}ngOnInit(){this.refresh(),this.refreshModels(),this.refreshOrphans(),this.refreshLmModels(),this.timer=setInterval(()=>{this.refresh()},dw)}ngOnDestroy(){this.timer&&clearInterval(this.timer)}refresh(){return q(this,null,function*(){try{this.downloads.set(yield this.hfService.getDownloads()),this.error.set(null)}catch(e){this.error.set(this.errorText(e,"Failed to load downloads"))}finally{this.loading.set(!1)}})}refreshModels(){return q(this,null,function*(){try{this.models.set(yield this.hfService.getLocalModels())}catch(e){this.error.set(this.errorText(e,"Failed to load models"))}finally{this.modelsLoading.set(!1)}})}refreshLmModels(){return q(this,null,function*(){try{this.lmModels.set(yield this.lmStudioService.getModels())}catch(e){this.error.set(this.errorText(e,"Failed to load LM Studio models"))}finally{this.lmLoading.set(!1)}})}toggleExpand(e){this.expanded.set(this.expanded()===e?null:e)}hfFiles(e){return e.files??[]}deleteLmModel(e){return q(this,null,function*(){if(!this.lmDeleting()&&confirm(`Delete model ${e.name} (${this.formatBytes(e.size)}) from the LM Studio folder?`)){this.lmDeleting.set(e.name);try{yield this.lmStudioService.deleteModel(e.name),yield this.refreshLmModels()}catch(t){this.error.set(this.errorText(t,`Failed to delete ${e.name}`))}finally{this.lmDeleting.set(null)}}})}deleteLmFile(e,t){return q(this,null,function*(){let n=t.shards??[t.name],a=`lm:${e.name}/${t.name}`;if(this.fileDeleting())return;let r=t.shards?`${t.name} (${t.shards.length} shard files)`:t.name;if(confirm(`Delete file ${r} (${this.formatBytes(t.size)})?`)){this.fileDeleting.set(a);try{for(let u of n)yield this.lmStudioService.deleteModelFile(e.name,u);yield this.refreshLmModels()}catch(u){this.error.set(this.errorText(u,`Failed to delete ${t.name}`))}finally{this.fileDeleting.set(null)}}})}deleteHfFile(e,t){return q(this,null,function*(){let n=t.shards??[t.name],a=`hf:${e.name}/${t.name}`;if(this.fileDeleting())return;let r=t.shards?`${t.name} (${t.shards.length} shard files)`:t.name;if(confirm(`Delete ${r} (${this.formatBytes(t.size)}) from the Hugging Face cache?`)){this.fileDeleting.set(a);try{for(let u of n)yield this.hfService.deleteLocalModelFile(e.name,u);yield this.refreshModels(),yield this.refreshOrphans()}catch(u){this.error.set(this.errorText(u,`Failed to delete ${t.name}`))}finally{this.fileDeleting.set(null)}}})}refreshOrphans(){return q(this,null,function*(){try{this.orphans.set(yield this.hfService.getOrphanBlobs())}catch(e){this.error.set(this.errorText(e,"Failed to load orphaned blobs"))}finally{this.orphansLoading.set(!1)}})}errorText(e,t){return e instanceof Ht?e.error?.error??e.message:e instanceof Error?e.message:t}pause(e){return q(this,null,function*(){yield this.act("pause",e)})}resume(e){return q(this,null,function*(){yield this.act("resume",e)})}cancel(e){return q(this,null,function*(){confirm(`Cancel download of ${e.repoId}? Partial files will be kept for resume.`)&&(yield this.act("cancel",e))})}deleteModel(e){return q(this,null,function*(){if(!this.deleting()&&confirm(`Delete model ${e.name} (${this.formatBytes(e.size)}) from the Hugging Face cache?`)){this.deleting.set(e.name);try{yield this.hfService.deleteLocalModel(e.name),yield this.refreshModels(),yield this.refreshOrphans()}catch(t){this.error.set(this.errorText(t,`Failed to delete ${e.name}`))}finally{this.deleting.set(null)}}})}cleanupOrphans(){return q(this,null,function*(){if(this.cleaning())return;let e=this.orphans().length;if(confirm(`Delete ${e} orphaned blob file(s) (${this.formatBytes(this.totalOrphanBytes())})?`)){this.cleaning.set(!0);try{yield this.hfService.cleanupOrphanBlobs(),yield this.refreshOrphans()}catch(t){this.error.set(this.errorText(t,"Failed to clean up orphaned blobs"))}finally{this.cleaning.set(!1)}}})}act(e,t){return q(this,null,function*(){if(!this.busy){this.busy=!0;try{yield this.hfService.action(e,t),yield this.refresh()}catch(n){this.error.set(this.errorText(n,`Failed to ${e} download`))}finally{this.busy=!1}}})}percent(e){return e.totalBytes<=0?null:Math.min(100,e.doneBytes/e.totalBytes*100)}progressMode(e){return e.totalBytes>0?"determinate":"indeterminate"}formatBytes(e){if(e<=0)return"0 B";let t=e/1024**3;return t>=1?`${t.toFixed(1)} GB`:`${(e/1024**2).toFixed(0)} MB`}formatSpeed(e){return e<=0?"\u2014":`${(e/(1024*1024)).toFixed(1)} MB/s`}formatEta(e){if(e===null)return"\u2014";if(e<60)return`${e} s`;let t=Math.floor(e/3600),n=Math.round(e%3600/60);return t>0?`${t} h ${n} m`:`${n} m`}close(){this.dialogRef.close()}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=R({type:i,selectors:[["app-llm-models-dialog"]],decls:23,vars:3,consts:[[1,"dialog-container"],["mat-dialog-title",""],[1,"error"],[1,"section-title"],[1,"state"],[1,"state","small"],[1,"empty"],[1,"model-list"],["align","end"],["mat-raised-button","","color","primary",3,"click"],[1,"subsection-title"],[1,"download-list"],[1,"orphan-total"],[1,"orphan-actions"],[1,"model-row"],[1,"row-main",3,"click"],[1,"row-title"],[1,"repo"],[1,"row-dest",3,"title"],[1,"size"],["mat-icon-button","","color","warn","title","Delete model",3,"click","disabled"],[1,"file-list"],[1,"expand-icon"],[1,"file-count"],[1,"file-row"],[1,"file-name",3,"title"],[1,"shard-count"],["mat-icon-button","","color","warn","title","Delete quantization",3,"click","disabled"],[1,"download-row"],[1,"row-main"],[1,"status-chip"],[1,"pids"],[3,"mode","value"],[1,"row-meta"],[1,"progress-text"],[1,"files"],[1,"speed"],[1,"eta"],[1,"row-actions"],["mat-icon-button","","color","primary","title","Resume"],["mat-icon-button","","title","Pause"],["mat-icon-button","","color","warn","title","Cancel",3,"click"],["mat-icon-button","","color","primary","title","Resume",3,"click"],["mat-icon-button","","title","Pause",3,"click"],["mat-raised-button","","color","warn",3,"click","disabled"],[1,"model-row","lm"],[1,"row-main","expandable",3,"click"]],template:function(t,n){if(t&1&&(s(0,"div",0)(1,"h2",1)(2,"mat-icon"),d(3,"model_training"),l(),d(4," LLM Models "),l(),s(5,"mat-dialog-content"),w(6,Ox,2,1,"div",2),s(7,"h3",3)(8,"mat-icon"),d(9,"cloud"),l(),d(10," HuggingFace "),l(),w(11,Fx,2,0,"div",4)(12,tw,15,4),s(13,"h3",3)(14,"mat-icon"),d(15,"computer"),l(),d(16," LM Studio "),l(),w(17,iw,2,0,"div",5)(18,nw,2,0,"div",6)(19,cw,3,0,"div",7),l(),s(20,"mat-dialog-actions",8)(21,"button",9),S("click",function(){return n.close()}),d(22,"Close"),l()()()),t&2){let a;c(6),D((a=n.error())?6:-1,a),c(5),D(n.loading()?11:12),c(6),D(n.lmLoading()?17:n.lmModels().length===0?18:19)}},dependencies:[Me,ze,Ue,Ai,st,yt,xt,Ct,pi,Hi,bt,vt],styles:['@charset "UTF-8";.dialog-container[_ngcontent-%COMP%]{min-width:480px}mat-dialog-content[_ngcontent-%COMP%]{max-height:72vh;overflow-y:auto}.error[_ngcontent-%COMP%]{margin:0 0 12px;padding:8px 12px;border-radius:6px;background:#f443361a;color:#d32f2f;font-size:13px}.section-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;margin:4px 0 12px;font-size:15px;font-weight:500;color:#333}.section-title[_ngcontent-%COMP%]:not(:first-of-type){margin-top:20px}.section-title[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px;color:#666}.subsection-title[_ngcontent-%COMP%]{margin:16px 0 8px;font-size:12px;font-weight:500;text-transform:uppercase;letter-spacing:.6px;color:#666}.subsection-title[_ngcontent-%COMP%]:first-of-type{margin-top:0}.orphan-total[_ngcontent-%COMP%]{text-transform:none;letter-spacing:0;font-weight:400;color:#999}.orphan-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;margin-top:8px}.state[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:8px;padding:40px 0;color:#999;font-size:14px}.state.small[_ngcontent-%COMP%]{padding:16px 0}.state[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:36px;width:36px;height:36px}.empty[_ngcontent-%COMP%]{padding:8px 4px;color:#999;font-size:13px}.model-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px}.model-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding:8px 12px;border-radius:8px;border:1px solid #e0e0e0;background:#fafafa}.model-row[_ngcontent-%COMP%] .row-main[_ngcontent-%COMP%]{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.model-row[_ngcontent-%COMP%] .repo[_ngcontent-%COMP%]{font-weight:500;font-size:14px;color:#333;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.model-row[_ngcontent-%COMP%] .row-dest[_ngcontent-%COMP%]{font-family:monospace;font-size:11px;color:#999;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.model-row[_ngcontent-%COMP%] .size[_ngcontent-%COMP%]{flex-shrink:0;font-size:13px;color:#666}.model-row[_ngcontent-%COMP%] .row-main.expandable[_ngcontent-%COMP%]{cursor:pointer}.model-row[_ngcontent-%COMP%] .row-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:4px;min-width:0}.model-row[_ngcontent-%COMP%] .row-title[_ngcontent-%COMP%] .expand-icon[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px;color:#999;flex-shrink:0}.model-row[_ngcontent-%COMP%] .row-title[_ngcontent-%COMP%] .file-count[_ngcontent-%COMP%]{font-size:11px;color:#999;flex-shrink:0}.file-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px;margin:-4px 0 8px 28px;padding:4px 8px;border-left:2px solid #e0e0e0}.file-list[_ngcontent-%COMP%] .file-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding:2px 4px;border-radius:6px}.file-list[_ngcontent-%COMP%] .file-row[_ngcontent-%COMP%]:hover{background:#f0f0f0}.file-list[_ngcontent-%COMP%] .file-row[_ngcontent-%COMP%] .file-name[_ngcontent-%COMP%]{flex:1;min-width:0;font-family:monospace;font-size:12px;color:#444;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.file-list[_ngcontent-%COMP%] .file-row[_ngcontent-%COMP%] .shard-count[_ngcontent-%COMP%]{flex-shrink:0;font-size:10px;text-transform:uppercase;letter-spacing:.4px;padding:2px 8px;border-radius:10px;background:#e3f2fd;color:#1565c0}.file-list[_ngcontent-%COMP%] .file-row[_ngcontent-%COMP%] .size[_ngcontent-%COMP%]{flex-shrink:0;font-size:12px;color:#666}.download-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px}.download-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding:12px;border-radius:8px;border:1px solid #e0e0e0;background:#fafafa}.download-row[_ngcontent-%COMP%] .row-main[_ngcontent-%COMP%]{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}.download-row[_ngcontent-%COMP%] .row-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}.download-row[_ngcontent-%COMP%] .row-title[_ngcontent-%COMP%] .repo[_ngcontent-%COMP%]{font-weight:500;font-size:14px;color:#333;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.download-row[_ngcontent-%COMP%] .row-title[_ngcontent-%COMP%] .pids[_ngcontent-%COMP%]{font-size:11px;color:#999}.download-row[_ngcontent-%COMP%] .status-chip[_ngcontent-%COMP%]{font-size:10px;text-transform:uppercase;letter-spacing:.4px;padding:2px 8px;border-radius:10px;background:#e8f5e9;color:#2e7d32}.download-row[_ngcontent-%COMP%] .status-chip.paused[_ngcontent-%COMP%]{background:#fff3e0;color:#e65100}.download-row[_ngcontent-%COMP%] .row-dest[_ngcontent-%COMP%]{font-family:monospace;font-size:11px;color:#999;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.download-row[_ngcontent-%COMP%] mat-progress-bar[_ngcontent-%COMP%]{margin:4px 0}.download-row[_ngcontent-%COMP%] .row-meta[_ngcontent-%COMP%]{display:flex;gap:16px;font-size:12px;color:#333}.download-row[_ngcontent-%COMP%] .row-meta[_ngcontent-%COMP%] .files[_ngcontent-%COMP%], .download-row[_ngcontent-%COMP%] .row-meta[_ngcontent-%COMP%] .speed[_ngcontent-%COMP%], .download-row[_ngcontent-%COMP%] .row-meta[_ngcontent-%COMP%] .eta[_ngcontent-%COMP%]{color:#666}.download-row[_ngcontent-%COMP%] .row-actions[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px}']})}}return i})();function mw(i,o){if(i&1){let e=_e();s(0,"button",14),S("click",function(){ne(e);let n=v();return oe(n.openLlmModels())}),s(1,"mat-icon"),d(2,"model_training"),l(),s(3,"span"),d(4,"LLM Models"),l()()}}var Kp=(()=>{class i{constructor(){this.systemInfo=ko.required(),this.systemService=m(Ot),this.hfService=m(Ks),this.dialog=m(Nn),this.hfInstalled=E(!1)}ngOnInit(){this.hfService.getStatus().then(e=>this.hfInstalled.set(e.installed)).catch(()=>this.hfInstalled.set(!1))}openSystemInfo(){this.dialog.open(Gp,{disableClose:!1})}openLlmModels(){this.dialog.open(qp,{width:"760px",maxWidth:"95vw",disableClose:!1})}reboot(){return q(this,null,function*(){confirm("Reboot the server?")&&(yield this.systemService.reboot())})}shutdown(){return q(this,null,function*(){confirm("Shutdown the server?")&&(yield this.systemService.shutdown())})}formatBytes(e){let t=e/1073741824;return`${Math.ceil(t)} GB`}ceilCpu(e){return Math.ceil(e)}colorForUsage(e){return e<40?"#4caf50":e<75?"#ff9800":"#f44336"}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=R({type:i,selectors:[["app-system-bar"]],inputs:{systemInfo:[1,"systemInfo"]},decls:50,vars:17,consts:[["menu","matMenu"],[1,"system-bar"],[1,"system-panel"],[1,"panel-body"],[1,"panel-icon"],[1,"panel-content"],[1,"panel-header"],[1,"panel-label"],[1,"panel-value"],[1,"bar-bg"],[1,"bar-fill"],[1,"server-controls"],["mat-icon-button","","color","warn","title","Server actions",3,"matMenuTriggerFor"],["yPosition","below"],["mat-menu-item","",3,"click"],["mat-menu-item",""]],template:function(t,n){if(t&1&&(s(0,"div",1)(1,"mat-card",2)(2,"mat-card-content")(3,"div",3)(4,"mat-icon",4),d(5,"dynamic_feed"),l(),s(6,"div",5)(7,"div",6)(8,"span",7),d(9,"CPU"),l(),s(10,"span",8),d(11),l()(),s(12,"div",9),_(13,"div",10),l()()()()(),s(14,"mat-card",2)(15,"mat-card-content")(16,"div",3)(17,"mat-icon",4),d(18,"memory"),l(),s(19,"div",5)(20,"div",6)(21,"span",7),d(22,"RAM"),l(),s(23,"span",8),d(24),l()(),s(25,"div",9),_(26,"div",10),l()()()()(),s(27,"div",11)(28,"button",12)(29,"mat-icon"),d(30,"more_vert"),l()(),s(31,"mat-menu",13,0)(33,"button",14),S("click",function(){return n.reboot()}),s(34,"mat-icon"),d(35,"restart_alt"),l(),s(36,"span"),d(37,"Reboot server"),l()(),s(38,"button",14),S("click",function(){return n.shutdown()}),s(39,"mat-icon"),d(40,"power_settings_new"),l(),s(41,"span"),d(42,"Shutdown server"),l()(),_(43,"mat-divider"),s(44,"button",14),S("click",function(){return n.openSystemInfo()}),s(45,"mat-icon"),d(46,"info"),l(),s(47,"span"),d(48,"System info"),l()(),w(49,mw,5,0,"button",15),l()()()),t&2){let a=Se(32);c(10),je("color",n.colorForUsage(n.systemInfo().cpuUsage)),c(),Q(" ",n.ceilCpu(n.systemInfo().cpuUsage),"% "),c(2),je("width",n.systemInfo().cpuUsage,"%")("background",n.colorForUsage(n.systemInfo().cpuUsage)),c(10),je("color",n.colorForUsage(n.systemInfo().memoryPercent)),c(),mi(" ",n.formatBytes(n.systemInfo().memoryUsed)," / ",n.formatBytes(n.systemInfo().memoryTotal)," "),c(2),je("width",n.systemInfo().memoryPercent,"%")("background",n.colorForUsage(n.systemInfo().memoryPercent)),c(2),x("matMenuTriggerFor",a),c(21),D(n.hfInstalled()?49:-1)}},dependencies:[Me,wn,Cn,xn,bt,vt,ze,Ai,Bs,Ln,mo,Vs,ea,lr,st],styles:[".system-bar[_ngcontent-%COMP%]{display:flex;gap:16px;margin-bottom:16px;align-items:stretch}.system-panel[_ngcontent-%COMP%]{flex:1}.server-controls[_ngcontent-%COMP%]{display:flex;align-items:center;gap:4px}.panel-body[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px}.panel-icon[_ngcontent-%COMP%]{color:#757575;font-size:24px;width:24px;height:24px}.panel-content[_ngcontent-%COMP%]{flex:1;min-width:0}.panel-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:4px}.panel-label[_ngcontent-%COMP%]{font-weight:500;font-size:.85rem;color:#555;text-transform:uppercase;letter-spacing:.5px}.panel-value[_ngcontent-%COMP%]{font-weight:500;font-size:.9rem;white-space:nowrap}.bar-bg[_ngcontent-%COMP%]{height:6px;background:#e0e0e0;border-radius:3px;overflow:hidden}.bar-fill[_ngcontent-%COMP%]{height:100%;border-radius:3px;transition:width .4s ease,background .4s ease}"]})}}return i})();function uw(i,o){if(i&1&&(s(0,"div",8)(1,"mat-icon",10),d(2,"warning"),l(),d(3),l()),i&2){let e=v(2);c(3),Q(" ",e.loginError()," ")}}function hw(i,o){if(i&1){let e=_e();s(0,"div",0)(1,"mat-card",1)(2,"mat-card-content")(3,"div",2)(4,"mat-icon",3),d(5,"lock"),l(),s(6,"h2"),d(7,"Authentication Required"),l(),s(8,"p",4),d(9,"Enter your system password to continue"),l()(),s(10,"form",5),S("submit",function(n){return ne(e),v().onLogin(),oe(n.preventDefault())}),s(11,"mat-form-field",6)(12,"mat-label"),d(13,"Password"),l(),s(14,"input",7),S("input",function(n){ne(e);let a=v();return oe(a.loginPassword.set(n.target.value))}),l()(),w(15,uw,4,1,"div",8),s(16,"button",9),d(17,"Sign In"),l()()()()()}if(i&2){let e=v();c(14),x("value",e.loginPassword()),c(),D(e.loginError()?15:-1)}}function pw(i,o){i&1&&_(0,"mat-progress-bar",11)}function fw(i,o){if(i&1&&(s(0,"mat-card",14)(1,"mat-card-content")(2,"mat-icon",15),d(3," error_outline "),l(),s(4,"p"),d(5),l(),s(6,"p",4),d(7,"Make sure the backend is running on port 4242."),l()()()),i&2){let e=v(2);c(5),I(e.error())}}function gw(i,o){i&1&&(s(0,"mat-card",19)(1,"mat-card-content")(2,"p"),d(3,"No GPUs detected."),l(),s(4,"p",4),d(5," Ensure nvidia-smi or rocm-smi is available on this system. "),l()()())}function _w(i,o){if(i&1&&_(0,"app-gpu-table",20),i&2){let e=v(3);x("gpus",e.gpus())}}function vw(i,o){if(i&1){let e=_e();s(0,"div",16)(1,"div",17),_(2,"app-system-bar",18),w(3,gw,6,0,"mat-card",19)(4,_w,1,1,"app-gpu-table",20),l(),s(5,"div",21),S("mousedown",function(n){ne(e);let a=v(2);return oe(a.startGpuColDrag(n))}),_(6,"span",22),l(),s(7,"div",23),_(8,"app-services"),l()(),s(9,"div",24),S("mousedown",function(n){ne(e);let a=v(2);return oe(a.startJournalHeightDrag(n))}),_(10,"span",22),l(),s(11,"div",25),_(12,"app-journal-panel"),l()}if(i&2){let e=v(2);c(),je("width",e.gpuColWidth(),"px"),c(),x("systemInfo",e.systemInfo()),c(),D(e.hasGpus()?4:3),c(8),je("height",e.journalHeight(),"px")}}function bw(i,o){if(i&1&&(w(0,pw,1,0,"mat-progress-bar",11),s(1,"div",12)(2,"div",13),w(3,fw,8,1,"mat-card",14)(4,vw,13,6),l()()),i&2){let e=v();D(e.loading()?0:-1),c(),p("dragging",e.isDragging()),c(2),D(e.error()?3:4)}}var Xp=160,Yp=800,yw=320,Zp=360,Qp=1400,Cw=560,Jp=(()=>{class i{ngOnInit(){this.authService.authState.subscribe(n=>{this.isAuthenticated.set(n),n&&(this.loginError.set(null),this.loginPassword.set(""))});let e=localStorage.getItem("journal-bottom-height");if(e){let n=parseInt(e,10);n>=Xp&&n<=Yp&&this.journalHeight.set(n)}let t=localStorage.getItem("gpu-col-width");if(t){let n=parseInt(t,10);n>=Zp&&n<=Qp&&this.gpuColWidth.set(n)}}ngOnDestroy(){}onLogin(){return q(this,null,function*(){this.loginError.set(null);let e=yield this.authService.login(this.loginPassword());e.ok?(this.loading.set(!0),this.initGpus()):this.loginError.set(e.message)})}startJournalHeightDrag(e){this.beginDrag("journalHeight",e.clientY,this.journalHeight())}startGpuColDrag(e){this.beginDrag("gpuColWidth",e.clientX,this.gpuColWidth())}beginDrag(e,t,n){this.dragTarget=e,this.dragStartCoord=t,this.dragStartValue=n,this.isDragging.set(!0)}onDrag(e){if(!(!this.isDragging()||!this.dragTarget)){if(this.dragTarget==="journalHeight"){let t=this.dragStartCoord-e.clientY;this.journalHeight.set(this.clamp(this.dragStartValue+t,Xp,Yp))}else if(this.dragTarget==="gpuColWidth"){let t=e.clientX-this.dragStartCoord;this.gpuColWidth.set(this.clamp(this.dragStartValue+t,Zp,Qp))}}}onDragEnd(){!this.isDragging()||!this.dragTarget||(this.dragTarget==="journalHeight"?localStorage.setItem("journal-bottom-height",String(this.journalHeight())):this.dragTarget==="gpuColWidth"&&localStorage.setItem("gpu-col-width",String(this.gpuColWidth())),this.dragTarget=null,this.isDragging.set(!1))}clamp(e,t,n){return Math.max(t,Math.min(n,e))}constructor(){this.gpuService=m(Go),this.authService=m(qr),this.gpus=E([]),this.systemInfo=E({cpuUsage:0,memoryTotal:0,memoryUsed:0,memoryPercent:0}),this.loading=E(!0),this.error=E(null),this.hasGpus=P(()=>this.gpus().length>0),this.isAuthenticated=E(this.authService.isAuthenticated()),this.loginPassword=E(""),this.loginError=E(null),this.journalHeight=E(yw),this.gpuColWidth=E(Cw),this.isDragging=E(!1),this.dragTarget=null,this.dragStartCoord=0,this.dragStartValue=0,this.isAuthenticated()&&this.initGpus()}initGpus(e=0){this.gpuService.fetchGpus().subscribe({next:t=>{if(t.length===0){e<3?setTimeout(()=>this.initGpus(e+1),5e3):this.loading.set(!1);return}let n=t.map(a=>Fe(V({},a),{key:a.pciBusId,usage:0,temperature:0,vramUsed:0}));this.gpus.set(n),this.loading.set(!1),this.error.set(null),this.gpuService.watchStatus(3e3).subscribe({next:a=>{this.systemInfo.set(a.system),this.mergeUsage(a.gpus)},error:a=>{console.error("[AppComponent] status poll error:",a)}})},error:t=>{console.error("[AppComponent] static fetch error:",t),this.error.set(`Failed to fetch GPU data: ${t.message}`),this.loading.set(!1)}})}mergeUsage(e){let t=new Map;for(let n of e)t.set(n.key,n);this.gpus.update(n=>n.map(a=>{let r=t.get(a.pciBusId);return Fe(V({},a),{key:a.pciBusId,usage:r?.usage??0,temperature:r?.temperature??0,vramUsed:r?.vramUsed??0})}))}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=R({type:i,selectors:[["app-root"]],hostBindings:function(t,n){t&1&&S("mousemove",function(r){return n.onDrag(r)},ol)("mouseup",function(){return n.onDragEnd()},ol)},decls:2,vars:1,consts:[[1,"login-container"],[1,"login-card"],[1,"login-header"],[1,"login-icon"],[1,"mat-body-2",2,"color","#999"],[1,"login-form",3,"submit"],["appearance","outline",1,"full-width"],["matInput","","type","password","autofocus","",3,"input","value"],[1,"login-error"],["mat-raised-button","","color","primary","type","submit",1,"login-btn"],[2,"font-size","20px","vertical-align","middle"],["mode","query","color","primary"],[1,"layout"],[1,"main-content"],[1,"error-card"],[2,"color","#f44336","font-size","48px","float","left","margin-right","16px"],[1,"top-row-horizontal"],[1,"gpu-col"],[3,"systemInfo"],[1,"empty-card"],[3,"gpus"],[1,"splitter",3,"mousedown"],[1,"splitter-line"],[1,"services-col"],[1,"splitter","splitter-h",3,"mousedown"],[1,"journal-bottom"]],template:function(t,n){t&1&&w(0,hw,18,2,"div",0)(1,bw,5,4),t&2&&D(n.isAuthenticated()?1:0)},dependencies:[Me,pi,Hi,wn,Cn,xn,Pt,Rt,ut,_t,Mt,ze,Ue,bt,vt,Wh,Up,$p,Kp],styles:[".spacer[_ngcontent-%COMP%]{flex:1 1 auto}.login-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;min-height:calc(100vh - 56px);padding:24px;background:#f5f5f5}.login-card[_ngcontent-%COMP%]{width:100%;max-width:400px}.login-header[_ngcontent-%COMP%]{text-align:center;margin-bottom:24px}.login-header[_ngcontent-%COMP%] .login-icon[_ngcontent-%COMP%]{font-size:48px;width:48px;height:48px;line-height:48px;background:#e3f2fd;border-radius:50%;padding:8px;color:#1976d2}.login-header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:16px 0 4px;font-size:22px;font-weight:500}.login-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px}.login-error[_ngcontent-%COMP%]{color:#d32f2f;font-size:14px;text-align:center;padding:8px;background:#ffebee;border-radius:4px}.login-btn[_ngcontent-%COMP%]{width:100%;margin-top:8px}.full-width[_ngcontent-%COMP%]{width:100%}.layout[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;overflow:hidden}.layout.dragging[_ngcontent-%COMP%]{user-select:none;-webkit-user-select:none}.main-content[_ngcontent-%COMP%]{flex:1;min-width:0;min-height:0;overflow:hidden;display:flex;flex-direction:column;padding:24px;max-width:100%}.top-row-horizontal[_ngcontent-%COMP%]{display:flex;flex-direction:row;flex:1;min-height:0}.gpu-col[_ngcontent-%COMP%]{flex-shrink:0;overflow:hidden;display:flex;flex-direction:column}.gpu-col[_ngcontent-%COMP%] app-system-bar[_ngcontent-%COMP%]{flex:0 0 auto}.gpu-col[_ngcontent-%COMP%] app-gpu-table[_ngcontent-%COMP%]{flex:1 1 auto;min-height:0;display:flex;flex-direction:column}.gpu-col[_ngcontent-%COMP%] .empty-card[_ngcontent-%COMP%]{flex-shrink:0}.services-col[_ngcontent-%COMP%]{flex:1;min-width:0;overflow:hidden;display:flex;flex-direction:column}.services-col[_ngcontent-%COMP%] app-services[_ngcontent-%COMP%]{flex:1 1 auto;min-height:0;display:flex;flex-direction:column;margin-top:0}.splitter[_ngcontent-%COMP%]{width:8px;flex-shrink:0;cursor:col-resize;margin:0 8px;display:flex;align-items:center;justify-content:center;background:transparent;transition:background .15s}.splitter[_ngcontent-%COMP%]:hover{background:#0000000a}.splitter[_ngcontent-%COMP%] .splitter-line[_ngcontent-%COMP%]{width:2px;height:32px;border-radius:1px;background:#bdbdbd;transition:background .15s,width .15s}.splitter[_ngcontent-%COMP%]:hover .splitter-line[_ngcontent-%COMP%]{background:#757575;width:3px}.splitter-h[_ngcontent-%COMP%]{width:100%;height:8px;flex-shrink:0;cursor:row-resize;margin:8px 0;display:flex;align-items:center;justify-content:center;background:transparent;transition:background .15s}.splitter-h[_ngcontent-%COMP%]:hover{background:#0000000a}.splitter-h[_ngcontent-%COMP%] .splitter-line[_ngcontent-%COMP%]{width:32px;height:2px;border-radius:1px;background:#bdbdbd;transition:background .15s,height .15s}.splitter-h[_ngcontent-%COMP%]:hover .splitter-line[_ngcontent-%COMP%]{background:#757575;height:3px}.journal-bottom[_ngcontent-%COMP%]{flex-shrink:0;overflow-y:auto}.error-card[_ngcontent-%COMP%], .empty-card[_ngcontent-%COMP%]{margin-top:32px;max-width:600px;margin-left:auto;margin-right:auto}[_nghost-%COMP%] mat-card-content{padding-top:10px!important;padding-bottom:10px!important}app-services[_ngcontent-%COMP%]{display:block;margin-top:24px}"]})}}return i})();Il(Jp,Fm).catch(i=>console.error(i));