homebridge-config-ui-x 5.2.1-beta.8 → 5.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -9
- package/config.schema.json +0 -32
- package/dist/bin/standalone.d.ts +2 -0
- package/dist/bin/standalone.js +58 -0
- package/dist/bin/standalone.js.map +1 -0
- package/dist/core/auth/auth.controller.d.ts +0 -5
- package/dist/core/config/config.service.d.ts +0 -10
- package/dist/core/config/config.service.js +0 -5
- package/dist/core/config/config.service.js.map +1 -1
- package/dist/globalDefaults.js +0 -3
- package/dist/globalDefaults.js.map +1 -1
- package/dist/modules/config-editor/config-editor.controller.d.ts +0 -1
- package/dist/modules/config-editor/config-editor.controller.js +0 -13
- package/dist/modules/config-editor/config-editor.controller.js.map +1 -1
- package/dist/modules/config-editor/config-editor.service.d.ts +0 -1
- package/dist/modules/config-editor/config-editor.service.js +0 -7
- package/dist/modules/config-editor/config-editor.service.js.map +1 -1
- package/dist/modules/platform-tools/terminal/terminal.gateway.d.ts +0 -2
- package/dist/modules/platform-tools/terminal/terminal.gateway.js +0 -18
- package/dist/modules/platform-tools/terminal/terminal.gateway.js.map +1 -1
- package/dist/modules/platform-tools/terminal/terminal.module.js +0 -4
- package/dist/modules/platform-tools/terminal/terminal.module.js.map +1 -1
- package/dist/modules/platform-tools/terminal/terminal.service.d.ts +0 -10
- package/dist/modules/platform-tools/terminal/terminal.service.js +6 -167
- package/dist/modules/platform-tools/terminal/terminal.service.js.map +1 -1
- package/package.json +6 -6
- package/public/3rdpartylicenses.txt +58 -58
- package/public/chunk-2V74YNKO.js +20 -0
- package/public/chunk-3AKLELGT.js +1 -0
- package/public/{chunk-2KOR6LRK.js → chunk-4TP3IKT3.js} +1 -1
- package/public/{chunk-QRQBCPWO.js → chunk-4XLPIGSD.js} +1 -1
- package/public/chunk-55DKEZRT.js +4 -0
- package/public/{chunk-A5MWQCGQ.js → chunk-65R3WGJK.js} +1 -1
- package/public/{chunk-NEMQW5FW.js → chunk-6ICMDOE6.js} +1 -1
- package/public/{chunk-2PP2VDL6.js → chunk-6QCBKKQ7.js} +1 -1
- package/public/{chunk-2LSH3KMC.js → chunk-6U2B3ZIB.js} +1 -1
- package/public/{chunk-CQAWPDW3.js → chunk-7L7OF6NJ.js} +1 -1
- package/public/chunk-7LC5ILOZ.js +8 -0
- package/public/{chunk-RABTAB22.js → chunk-7NRDWLRV.js} +1 -1
- package/public/{chunk-GBJM2RI4.js → chunk-A5YPMEVZ.js} +1 -1
- package/public/{chunk-IZBB7SRV.js → chunk-AOQFASDR.js} +1 -1
- package/public/{chunk-IKNF2DEX.js → chunk-BCQ7O7GT.js} +1 -1
- package/public/{chunk-NCB3IL32.js → chunk-BSFL67L2.js} +1 -1
- package/public/{chunk-EXI6FL7A.js → chunk-BUFCBMS4.js} +1 -1
- package/public/{chunk-IU5EKYXQ.js → chunk-CIFVKKCL.js} +1 -1
- package/public/{chunk-HHU6FT77.js → chunk-CN6AIV2G.js} +1 -1
- package/public/{chunk-S3TEEEYY.js → chunk-EJUHSQJT.js} +1 -1
- package/public/{chunk-6BLWRML2.js → chunk-EY4TL7MQ.js} +1 -1
- package/public/chunk-FBKZG6NW.js +5 -0
- package/public/{chunk-NSTN7R3D.js → chunk-HCLPERDW.js} +1 -1
- package/public/{chunk-LGEE7SWW.js → chunk-HPDPYCCU.js} +1 -1
- package/public/chunk-J647HPEO.js +1 -0
- package/public/chunk-JOWPFOJ6.js +1 -0
- package/public/{chunk-GRCWZ7OU.js → chunk-JWNACTNS.js} +1 -1
- package/public/{chunk-A7SXZCLG.js → chunk-KTVSDY3J.js} +1 -1
- package/public/chunk-L5YI32XL.js +1 -0
- package/public/chunk-MM4VXTF7.js +1 -0
- package/public/{chunk-ERUJZRID.js → chunk-MQDZYQ4P.js} +1 -1
- package/public/{chunk-ZXXBIF5D.js → chunk-NXD65TQY.js} +1 -1
- package/public/chunk-P3YJZITV.js +1 -0
- package/public/{chunk-RZG4H7FG.js → chunk-PYA727PD.js} +1 -1
- package/public/{chunk-BLJ3CFZV.js → chunk-QMWOYMP2.js} +1 -1
- package/public/chunk-QOU7SWHO.js +1 -0
- package/public/{chunk-LKEDVYVC.js → chunk-RKLVJKRV.js} +1 -1
- package/public/{chunk-GPMC6ZMO.js → chunk-RM73XLPO.js} +1 -1
- package/public/{chunk-DUY46UE5.js → chunk-RS2XIQ2D.js} +1 -1
- package/public/chunk-SNMQAZT2.js +1 -0
- package/public/{chunk-VCWRZM6U.js → chunk-SS2BB5BR.js} +1 -1
- package/public/{chunk-UCRZ7BF5.js → chunk-T33UVRIX.js} +1 -1
- package/public/chunk-TDCLTQMH.js +1 -0
- package/public/chunk-TNHTCUOR.js +1 -0
- package/public/{chunk-D7PVXFSB.js → chunk-UEO5SW2H.js} +1 -1
- package/public/{chunk-7TWHYDPQ.js → chunk-UJT6ID6R.js} +1 -1
- package/public/{chunk-A2NEEDZO.js → chunk-ULBODTVI.js} +1 -1
- package/public/chunk-WU2LDFGK.js +2 -0
- package/public/chunk-X7V7CXS5.js +14 -0
- package/public/chunk-Y5LCR2EO.js +28 -0
- package/public/{chunk-YFZSQHUV.js → chunk-ZZMY2IKC.js} +1 -1
- package/public/index.html +2 -2
- package/public/main-5SJ6EOYL.js +1 -0
- package/public/media/fa-brands-400-WVWUIHCX.woff2 +0 -0
- package/public/media/fa-regular-400-I5DJMINO.woff2 +0 -0
- package/public/media/fa-solid-900-C5F6UWGT.woff2 +0 -0
- package/public/styles-QT7KIM52.css +1 -0
- package/dist/modules/platform-tools/terminal/terminal.controller.d.ts +0 -11
- package/dist/modules/platform-tools/terminal/terminal.controller.js +0 -46
- package/dist/modules/platform-tools/terminal/terminal.controller.js.map +0 -1
- package/public/chunk-42RLCU53.js +0 -1
- package/public/chunk-5MLTGVMM.js +0 -1
- package/public/chunk-6BFSUFRQ.js +0 -8
- package/public/chunk-6LWEFB5T.js +0 -14
- package/public/chunk-EBQHWKQC.js +0 -4
- package/public/chunk-JBKS3BI7.js +0 -28
- package/public/chunk-K7QEGT3E.js +0 -2
- package/public/chunk-NGBI2CLV.js +0 -20
- package/public/chunk-P2X74Q5E.js +0 -1
- package/public/chunk-PKUXB6QF.js +0 -1
- package/public/chunk-Q2SY7ITC.js +0 -1
- package/public/chunk-QJZIEGHX.js +0 -1
- package/public/chunk-SH42QPYC.js +0 -1
- package/public/chunk-SUJJIFP4.js +0 -5
- package/public/chunk-TFTVFLPX.js +0 -1
- package/public/chunk-W6RS6NBX.js +0 -1
- package/public/chunk-XTDDD6WY.js +0 -1
- package/public/chunk-XWQ7NZSB.js +0 -1
- package/public/chunk-YFQVSUDS.js +0 -1
- package/public/chunk-Z43SQI6H.js +0 -1
- package/public/main-76WAOLPU.js +0 -1
- package/public/media/fa-brands-400-Q3XCMWHQ.woff2 +0 -0
- package/public/media/fa-brands-400-R2XQZCET.ttf +0 -0
- package/public/media/fa-regular-400-QSNYFYRT.woff2 +0 -0
- package/public/media/fa-regular-400-XUOPSR7E.ttf +0 -0
- package/public/media/fa-solid-900-5ZUYHGA7.woff2 +0 -0
- package/public/media/fa-solid-900-PJNKLK6W.ttf +0 -0
- package/public/styles-IOQZHT3N.css +0 -1
package/public/chunk-K7QEGT3E.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{$ as Je,$c as ft,Ab as oe,Ba as qe,Bb as se,Cb as Oe,Ga as Qe,H as $e,Ha as be,Ia as et,Ja as J,L as Xe,La as _e,Ma as De,Na as L,Oa as U,Pa as tt,Qa as nt,Ra as rt,S as Ge,Sa as ot,Ta as st,Ua as it,Va as at,Vc as ut,Wa as k,Wc as ht,_c as j,a as x,ad as pt,bb as Y,da as v,ea as O,eb as ct,ga as g,h as Ee,ha as ne,ja as w,k as Te,ka as h,la as M,ma as Re,nb as re,oa as Ye,pa as Ze,qa as We,r as we,rd as mt,sd as ie,tb as dt,td as ae,va as R,vb as S,vd as yt,wa as Ke,x as G,xa as Me,zb as lt}from"./chunk-V7SOQAC5.js";var B=class{},z=class{},_=class r{headers;normalizedNames=new Map;lazyInit;lazyUpdate=null;constructor(t){t?typeof t=="string"?this.lazyInit=()=>{this.headers=new Map,t.split(`
|
|
2
|
-
`).forEach(e=>{let n=e.indexOf(":");if(n>0){let o=e.slice(0,n),s=e.slice(n+1).trim();this.addHeaderEntry(o,s)}})}:typeof Headers<"u"&&t instanceof Headers?(this.headers=new Map,t.forEach((e,n)=>{this.addHeaderEntry(n,e)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(t).forEach(([e,n])=>{this.setHeaderEntries(e,n)})}:this.headers=new Map}has(t){return this.init(),this.headers.has(t.toLowerCase())}get(t){this.init();let e=this.headers.get(t.toLowerCase());return e&&e.length>0?e[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(t){return this.init(),this.headers.get(t.toLowerCase())||null}append(t,e){return this.clone({name:t,value:e,op:"a"})}set(t,e){return this.clone({name:t,value:e,op:"s"})}delete(t,e){return this.clone({name:t,value:e,op:"d"})}maybeSetNormalizedName(t,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,t)}init(){this.lazyInit&&(this.lazyInit instanceof r?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(t=>this.applyUpdate(t)),this.lazyUpdate=null))}copyFrom(t){t.init(),Array.from(t.headers.keys()).forEach(e=>{this.headers.set(e,t.headers.get(e)),this.normalizedNames.set(e,t.normalizedNames.get(e))})}clone(t){let e=new r;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof r?this.lazyInit:this,e.lazyUpdate=(this.lazyUpdate||[]).concat([t]),e}applyUpdate(t){let e=t.name.toLowerCase();switch(t.op){case"a":case"s":let n=t.value;if(typeof n=="string"&&(n=[n]),n.length===0)return;this.maybeSetNormalizedName(t.name,e);let o=(t.op==="a"?this.headers.get(e):void 0)||[];o.push(...n),this.headers.set(e,o);break;case"d":let s=t.value;if(!s)this.headers.delete(e),this.normalizedNames.delete(e);else{let i=this.headers.get(e);if(!i)return;i=i.filter(c=>s.indexOf(c)===-1),i.length===0?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,i)}break}}addHeaderEntry(t,e){let n=t.toLowerCase();this.maybeSetNormalizedName(t,n),this.headers.has(n)?this.headers.get(n).push(e):this.headers.set(n,[e])}setHeaderEntries(t,e){let n=(Array.isArray(e)?e:[e]).map(s=>s.toString()),o=t.toLowerCase();this.headers.set(o,n),this.maybeSetNormalizedName(t,o)}forEach(t){this.init(),Array.from(this.normalizedNames.keys()).forEach(e=>t(this.normalizedNames.get(e),this.headers.get(e)))}};var le=class{encodeKey(t){return gt(t)}encodeValue(t){return gt(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}};function Ht(r,t){let e=new Map;return r.length>0&&r.replace(/^\?/,"").split("&").forEach(o=>{let s=o.indexOf("="),[i,c]=s==-1?[t.decodeKey(o),""]:[t.decodeKey(o.slice(0,s)),t.decodeValue(o.slice(s+1))],a=e.get(i)||[];a.push(c),e.set(i,a)}),e}var Vt=/%(\d[a-f0-9])/gi,$t={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function gt(r){return encodeURIComponent(r).replace(Vt,(t,e)=>$t[e]??t)}function ce(r){return`${r}`}var A=class r{map;encoder;updates=null;cloneFrom=null;constructor(t={}){if(this.encoder=t.encoder||new le,t.fromString){if(t.fromObject)throw new v(2805,!1);this.map=Ht(t.fromString,this.encoder)}else t.fromObject?(this.map=new Map,Object.keys(t.fromObject).forEach(e=>{let n=t.fromObject[e],o=Array.isArray(n)?n.map(ce):[ce(n)];this.map.set(e,o)})):this.map=null}has(t){return this.init(),this.map.has(t)}get(t){this.init();let e=this.map.get(t);return e?e[0]:null}getAll(t){return this.init(),this.map.get(t)||null}keys(){return this.init(),Array.from(this.map.keys())}append(t,e){return this.clone({param:t,value:e,op:"a"})}appendAll(t){let e=[];return Object.keys(t).forEach(n=>{let o=t[n];Array.isArray(o)?o.forEach(s=>{e.push({param:n,value:s,op:"a"})}):e.push({param:n,value:o,op:"a"})}),this.clone(e)}set(t,e){return this.clone({param:t,value:e,op:"s"})}delete(t,e){return this.clone({param:t,value:e,op:"d"})}toString(){return this.init(),this.keys().map(t=>{let e=this.encoder.encodeKey(t);return this.map.get(t).map(n=>e+"="+this.encoder.encodeValue(n)).join("&")}).filter(t=>t!=="").join("&")}clone(t){let e=new r({encoder:this.encoder});return e.cloneFrom=this.cloneFrom||this,e.updates=(this.updates||[]).concat(t),e}init(){this.map===null&&(this.map=new Map),this.cloneFrom!==null&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(t=>this.map.set(t,this.cloneFrom.map.get(t))),this.updates.forEach(t=>{switch(t.op){case"a":case"s":let e=(t.op==="a"?this.map.get(t.param):void 0)||[];e.push(ce(t.value)),this.map.set(t.param,e);break;case"d":if(t.value!==void 0){let n=this.map.get(t.param)||[],o=n.indexOf(ce(t.value));o!==-1&&n.splice(o,1),n.length>0?this.map.set(t.param,n):this.map.delete(t.param)}else{this.map.delete(t.param);break}}}),this.cloneFrom=this.updates=null)}};var ue=class{map=new Map;set(t,e){return this.map.set(t,e),this}get(t){return this.map.has(t)||this.map.set(t,t.defaultValue()),this.map.get(t)}delete(t){return this.map.delete(t),this}has(t){return this.map.has(t)}keys(){return this.map.keys()}};function Xt(r){switch(r){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function vt(r){return typeof ArrayBuffer<"u"&&r instanceof ArrayBuffer}function Et(r){return typeof Blob<"u"&&r instanceof Blob}function Tt(r){return typeof FormData<"u"&&r instanceof FormData}function Gt(r){return typeof URLSearchParams<"u"&&r instanceof URLSearchParams}var Z="Content-Type",he="Accept",Ce="X-Request-URL",Rt="text/plain",Mt="application/json",bt=`${Mt}, ${Rt}, */*`,F=class r{url;body=null;headers;context;reportProgress=!1;withCredentials=!1;credentials;keepalive=!1;cache;priority;mode;redirect;responseType="json";method;params;urlWithParams;transferCache;timeout;constructor(t,e,n,o){this.url=e,this.method=t.toUpperCase();let s;if(Xt(this.method)||o?(this.body=n!==void 0?n:null,s=o):s=n,s){if(this.reportProgress=!!s.reportProgress,this.withCredentials=!!s.withCredentials,this.keepalive=!!s.keepalive,s.responseType&&(this.responseType=s.responseType),s.headers&&(this.headers=s.headers),s.context&&(this.context=s.context),s.params&&(this.params=s.params),s.priority&&(this.priority=s.priority),s.cache&&(this.cache=s.cache),s.credentials&&(this.credentials=s.credentials),typeof s.timeout=="number"){if(s.timeout<1||!Number.isInteger(s.timeout))throw new Error("");this.timeout=s.timeout}s.mode&&(this.mode=s.mode),s.redirect&&(this.redirect=s.redirect),this.transferCache=s.transferCache}if(this.headers??=new _,this.context??=new ue,!this.params)this.params=new A,this.urlWithParams=e;else{let i=this.params.toString();if(i.length===0)this.urlWithParams=e;else{let c=e.indexOf("?"),a=c===-1?"?":c<e.length-1?"&":"";this.urlWithParams=e+a+i}}}serializeBody(){return this.body===null?null:typeof this.body=="string"||vt(this.body)||Et(this.body)||Tt(this.body)||Gt(this.body)?this.body:this.body instanceof A?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||Tt(this.body)?null:Et(this.body)?this.body.type||null:vt(this.body)?null:typeof this.body=="string"?Rt:this.body instanceof A?"application/x-www-form-urlencoded;charset=UTF-8":typeof this.body=="object"||typeof this.body=="number"||typeof this.body=="boolean"?Mt:null}clone(t={}){let e=t.method||this.method,n=t.url||this.url,o=t.responseType||this.responseType,s=t.keepalive??this.keepalive,i=t.priority||this.priority,c=t.cache||this.cache,a=t.mode||this.mode,d=t.redirect||this.redirect,l=t.credentials||this.credentials,y=t.transferCache??this.transferCache,E=t.timeout??this.timeout,m=t.body!==void 0?t.body:this.body,P=t.withCredentials??this.withCredentials,N=t.reportProgress??this.reportProgress,u=t.headers||this.headers,f=t.params||this.params,T=t.context??this.context;return t.setHeaders!==void 0&&(u=Object.keys(t.setHeaders).reduce((D,p)=>D.set(p,t.setHeaders[p]),u)),t.setParams&&(f=Object.keys(t.setParams).reduce((D,p)=>D.set(p,t.setParams[p]),f)),new r(e,n,m,{params:f,headers:u,context:T,reportProgress:N,responseType:o,withCredentials:P,transferCache:y,keepalive:s,cache:c,priority:i,timeout:E,mode:a,redirect:d,credentials:l})}},I=function(r){return r[r.Sent=0]="Sent",r[r.UploadProgress=1]="UploadProgress",r[r.ResponseHeader=2]="ResponseHeader",r[r.DownloadProgress=3]="DownloadProgress",r[r.Response=4]="Response",r[r.User=5]="User",r}(I||{}),H=class{headers;status;statusText;url;ok;type;constructor(t,e=200,n="OK"){this.headers=t.headers||new _,this.status=t.status!==void 0?t.status:e,this.statusText=t.statusText||n,this.url=t.url||null,this.ok=this.status>=200&&this.status<300}},W=class r extends H{constructor(t={}){super(t)}type=I.ResponseHeader;clone(t={}){return new r({headers:t.headers||this.headers,status:t.status!==void 0?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}},V=class r extends H{body;constructor(t={}){super(t),this.body=t.body!==void 0?t.body:null}type=I.Response;clone(t={}){return new r({body:t.body!==void 0?t.body:this.body,headers:t.headers||this.headers,status:t.status!==void 0?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}},b=class extends H{name="HttpErrorResponse";message;error;ok=!1;constructor(t){super(t,0,"Unknown Error"),this.status>=200&&this.status<300?this.message=`Http failure during parsing for ${t.url||"(unknown url)"}`:this.message=`Http failure response for ${t.url||"(unknown url)"}: ${t.status} ${t.statusText}`,this.error=t.error||null}},_t=200,Jt=204;function Se(r,t){return{body:t,headers:r.headers,context:r.context,observe:r.observe,params:r.params,reportProgress:r.reportProgress,responseType:r.responseType,withCredentials:r.withCredentials,transferCache:r.transferCache,keepalive:r.keepalive,priority:r.priority,cache:r.cache,mode:r.mode,redirect:r.redirect}}var Dt=(()=>{class r{handler;constructor(e){this.handler=e}request(e,n,o={}){let s;if(e instanceof F)s=e;else{let a;o.headers instanceof _?a=o.headers:a=new _(o.headers);let d;o.params&&(o.params instanceof A?d=o.params:d=new A({fromObject:o.params})),s=new F(e,n,o.body!==void 0?o.body:null,{headers:a,context:o.context,params:d,reportProgress:o.reportProgress,responseType:o.responseType||"json",withCredentials:o.withCredentials,transferCache:o.transferCache,keepalive:o.keepalive,priority:o.priority,cache:o.cache,mode:o.mode,redirect:o.redirect,credentials:o.credentials})}let i=we(s).pipe(Xe(a=>this.handler.handle(a)));if(e instanceof F||o.observe==="events")return i;let c=i.pipe($e(a=>a instanceof V));switch(o.observe||"body"){case"body":switch(s.responseType){case"arraybuffer":return c.pipe(G(a=>{if(a.body!==null&&!(a.body instanceof ArrayBuffer))throw new v(2806,!1);return a.body}));case"blob":return c.pipe(G(a=>{if(a.body!==null&&!(a.body instanceof Blob))throw new v(2807,!1);return a.body}));case"text":return c.pipe(G(a=>{if(a.body!==null&&typeof a.body!="string")throw new v(2808,!1);return a.body}));case"json":default:return c.pipe(G(a=>a.body))}case"response":return c;default:throw new v(2809,!1)}}delete(e,n={}){return this.request("DELETE",e,n)}get(e,n={}){return this.request("GET",e,n)}head(e,n={}){return this.request("HEAD",e,n)}jsonp(e,n){return this.request("JSONP",e,{params:new A().append(n,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(e,n={}){return this.request("OPTIONS",e,n)}patch(e,n,o={}){return this.request("PATCH",e,Se(o,n))}post(e,n,o={}){return this.request("POST",e,Se(o,n))}put(e,n,o={}){return this.request("PUT",e,Se(o,n))}static \u0275fac=function(n){return new(n||r)(h(B))};static \u0275prov=g({token:r,factory:r.\u0275fac})}return r})(),Yt=/^\)\]\}',?\n/;function wt(r){if(r.url)return r.url;let t=Ce.toLocaleLowerCase();return r.headers.get(t)}var Ot=new w(""),de=(()=>{class r{fetchImpl=M(Ae,{optional:!0})?.fetch??((...e)=>globalThis.fetch(...e));ngZone=M(S);destroyRef=M(Ke);destroyed=!1;constructor(){this.destroyRef.onDestroy(()=>{this.destroyed=!0})}handle(e){return new Te(n=>{let o=new AbortController;this.doRequest(e,o.signal,n).then(Ie,i=>n.error(new b({error:i})));let s;return e.timeout&&(s=this.ngZone.runOutsideAngular(()=>setTimeout(()=>{o.signal.aborted||o.abort(new DOMException("signal timed out","TimeoutError"))},e.timeout))),()=>{s!==void 0&&clearTimeout(s),o.abort()}})}doRequest(e,n,o){return Ee(this,null,function*(){let s=this.createRequestInit(e),i;try{let m=this.ngZone.runOutsideAngular(()=>this.fetchImpl(e.urlWithParams,x({signal:n},s)));Zt(m),o.next({type:I.Sent}),i=yield m}catch(m){o.error(new b({error:m,status:m.status??0,statusText:m.statusText,url:e.urlWithParams,headers:m.headers}));return}let c=new _(i.headers),a=i.statusText,d=wt(i)??e.urlWithParams,l=i.status,y=null;if(e.reportProgress&&o.next(new W({headers:c,status:l,statusText:a,url:d})),i.body){let m=i.headers.get("content-length"),P=[],N=i.body.getReader(),u=0,f,T,D=typeof Zone<"u"&&Zone.current,p=!1;if(yield this.ngZone.runOutsideAngular(()=>Ee(this,null,function*(){for(;;){if(this.destroyed){yield N.cancel(),p=!0;break}let{done:C,value:X}=yield N.read();if(C)break;if(P.push(X),u+=X.length,e.reportProgress){T=e.responseType==="text"?(T??"")+(f??=new TextDecoder).decode(X,{stream:!0}):void 0;let Ve=()=>o.next({type:I.DownloadProgress,total:m?+m:void 0,loaded:u,partialText:T});D?D.run(Ve):Ve()}}})),p){o.complete();return}let $=this.concatChunks(P,u);try{let C=i.headers.get(Z)??"";y=this.parseBody(e,$,C)}catch(C){o.error(new b({error:C,headers:new _(i.headers),status:i.status,statusText:i.statusText,url:wt(i)??e.urlWithParams}));return}}l===0&&(l=y?_t:0),l>=200&&l<300?(o.next(new V({body:y,headers:c,status:l,statusText:a,url:d})),o.complete()):o.error(new b({error:y,headers:c,status:l,statusText:a,url:d}))})}parseBody(e,n,o){switch(e.responseType){case"json":let s=new TextDecoder().decode(n).replace(Yt,"");return s===""?null:JSON.parse(s);case"text":return new TextDecoder().decode(n);case"blob":return new Blob([n],{type:o});case"arraybuffer":return n.buffer}}createRequestInit(e){let n={},o;if(o=e.credentials,e.withCredentials&&(o="include"),e.headers.forEach((s,i)=>n[s]=i.join(",")),e.headers.has(he)||(n[he]=bt),!e.headers.has(Z)){let s=e.detectContentTypeHeader();s!==null&&(n[Z]=s)}return{body:e.serializeBody(),method:e.method,headers:n,credentials:o,keepalive:e.keepalive,cache:e.cache,priority:e.priority,mode:e.mode,redirect:e.redirect}}concatChunks(e,n){let o=new Uint8Array(n),s=0;for(let i of e)o.set(i,s),s+=i.length;return o}static \u0275fac=function(n){return new(n||r)};static \u0275prov=g({token:r,factory:r.\u0275fac})}return r})(),Ae=class{};function Ie(){}function Zt(r){r.then(Ie,Ie)}function Wt(r,t){return t(r)}function Kt(r,t,e){return(n,o)=>We(e,()=>t(n,s=>r(s,o)))}var qt=new w(""),ke=new w(""),St=new w(""),At=new w("",{providedIn:"root",factory:()=>!0});var fe=(()=>{class r extends B{backend;injector;chain=null;pendingTasks=M(qe);contributeToStability=M(At);constructor(e,n){super(),this.backend=e,this.injector=n}handle(e){if(this.chain===null){let n=Array.from(new Set([...this.injector.get(ke),...this.injector.get(St,[])]));this.chain=n.reduceRight((o,s)=>Kt(o,s,this.injector),Wt)}if(this.contributeToStability){let n=this.pendingTasks.add();return this.chain(e,o=>this.backend.handle(o)).pipe(Ge(n))}else return this.chain(e,n=>this.backend.handle(n))}static \u0275fac=function(n){return new(n||r)(h(z),h(Ze))};static \u0275prov=g({token:r,factory:r.\u0275fac})}return r})();var Qt=/^\)\]\}',?\n/,en=RegExp(`^${Ce}:`,"m");function tn(r){return"responseURL"in r&&r.responseURL?r.responseURL:en.test(r.getAllResponseHeaders())?r.getResponseHeader(Ce):null}var Pe=(()=>{class r{xhrFactory;constructor(e){this.xhrFactory=e}handle(e){if(e.method==="JSONP")throw new v(-2800,!1);let n=this.xhrFactory;return we(null).pipe(Je(()=>new Te(s=>{let i=n.build();if(i.open(e.method,e.urlWithParams),e.withCredentials&&(i.withCredentials=!0),e.headers.forEach((u,f)=>i.setRequestHeader(u,f.join(","))),e.headers.has(he)||i.setRequestHeader(he,bt),!e.headers.has(Z)){let u=e.detectContentTypeHeader();u!==null&&i.setRequestHeader(Z,u)}if(e.timeout&&(i.timeout=e.timeout),e.responseType){let u=e.responseType.toLowerCase();i.responseType=u!=="json"?u:"text"}let c=e.serializeBody(),a=null,d=()=>{if(a!==null)return a;let u=i.statusText||"OK",f=new _(i.getAllResponseHeaders()),T=tn(i)||e.url;return a=new W({headers:f,status:i.status,statusText:u,url:T}),a},l=()=>{let{headers:u,status:f,statusText:T,url:D}=d(),p=null;f!==Jt&&(p=typeof i.response>"u"?i.responseText:i.response),f===0&&(f=p?_t:0);let $=f>=200&&f<300;if(e.responseType==="json"&&typeof p=="string"){let C=p;p=p.replace(Qt,"");try{p=p!==""?JSON.parse(p):null}catch(X){p=C,$&&($=!1,p={error:X,text:p})}}$?(s.next(new V({body:p,headers:u,status:f,statusText:T,url:D||void 0})),s.complete()):s.error(new b({error:p,headers:u,status:f,statusText:T,url:D||void 0}))},y=u=>{let{url:f}=d(),T=new b({error:u,status:i.status||0,statusText:i.statusText||"Unknown Error",url:f||void 0});s.error(T)},E=y;e.timeout&&(E=u=>{let{url:f}=d(),T=new b({error:new DOMException("Request timed out","TimeoutError"),status:i.status||0,statusText:i.statusText||"Request timeout",url:f||void 0});s.error(T)});let m=!1,P=u=>{m||(s.next(d()),m=!0);let f={type:I.DownloadProgress,loaded:u.loaded};u.lengthComputable&&(f.total=u.total),e.responseType==="text"&&i.responseText&&(f.partialText=i.responseText),s.next(f)},N=u=>{let f={type:I.UploadProgress,loaded:u.loaded};u.lengthComputable&&(f.total=u.total),s.next(f)};return i.addEventListener("load",l),i.addEventListener("error",y),i.addEventListener("timeout",E),i.addEventListener("abort",y),e.reportProgress&&(i.addEventListener("progress",P),c!==null&&i.upload&&i.upload.addEventListener("progress",N)),i.send(c),s.next({type:I.Sent}),()=>{i.removeEventListener("error",y),i.removeEventListener("abort",y),i.removeEventListener("load",l),i.removeEventListener("timeout",E),e.reportProgress&&(i.removeEventListener("progress",P),c!==null&&i.upload&&i.upload.removeEventListener("progress",N)),i.readyState!==i.DONE&&i.abort()}})))}static \u0275fac=function(n){return new(n||r)(h(ae))};static \u0275prov=g({token:r,factory:r.\u0275fac})}return r})(),It=new w(""),nn="XSRF-TOKEN",rn=new w("",{providedIn:"root",factory:()=>nn}),on="X-XSRF-TOKEN",sn=new w("",{providedIn:"root",factory:()=>on}),K=class{},an=(()=>{class r{doc;cookieName;lastCookieString="";lastToken=null;parseCount=0;constructor(e,n){this.doc=e,this.cookieName=n}getToken(){let e=this.doc.cookie||"";return e!==this.lastCookieString&&(this.parseCount++,this.lastToken=ie(e,this.cookieName),this.lastCookieString=e),this.lastToken}static \u0275fac=function(n){return new(n||r)(h(R),h(rn))};static \u0275prov=g({token:r,factory:r.\u0275fac})}return r})();function cn(r,t){let e=r.url.toLowerCase();if(!M(It)||r.method==="GET"||r.method==="HEAD"||e.startsWith("http://")||e.startsWith("https://"))return t(r);let n=M(K).getToken(),o=M(sn);return n!=null&&!r.headers.has(o)&&(r=r.clone({headers:r.headers.set(o,n)})),t(r)}var pe=function(r){return r[r.Interceptors=0]="Interceptors",r[r.LegacyInterceptors=1]="LegacyInterceptors",r[r.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",r[r.NoXsrfProtection=3]="NoXsrfProtection",r[r.JsonpSupport=4]="JsonpSupport",r[r.RequestsMadeViaParent=5]="RequestsMadeViaParent",r[r.Fetch=6]="Fetch",r}(pe||{});function Pt(r,t){return{\u0275kind:r,\u0275providers:t}}function dn(...r){let t=[Dt,Pe,fe,{provide:B,useExisting:fe},{provide:z,useFactory:()=>M(Ot,{optional:!0})??M(Pe)},{provide:ke,useValue:cn,multi:!0},{provide:It,useValue:!0},{provide:K,useClass:an}];for(let e of r)t.push(...e.\u0275providers);return Re(t)}function ln(r){return Pt(pe.Interceptors,r.map(t=>({provide:ke,useValue:t,multi:!0})))}function un(){return Pt(pe.Fetch,[de,{provide:Ot,useExisting:de},{provide:z,useExisting:de}])}var ye=new w(""),Fe=(()=>{class r{_zone;_plugins;_eventNameToPlugin=new Map;constructor(e,n){this._zone=n,e.forEach(o=>{o.manager=this}),this._plugins=e.slice().reverse()}addEventListener(e,n,o,s){return this._findPluginFor(n).addEventListener(e,n,o,s)}getZone(){return this._zone}_findPluginFor(e){let n=this._eventNameToPlugin.get(e);if(n)return n;if(n=this._plugins.find(s=>s.supports(e)),!n)throw new v(5101,!1);return this._eventNameToPlugin.set(e,n),n}static \u0275fac=function(n){return new(n||r)(h(ye),h(S))};static \u0275prov=g({token:r,factory:r.\u0275fac})}return r})(),q=class{_doc;constructor(t){this._doc=t}manager},xe="ng-app-id";function Nt(r){for(let t of r)t.remove()}function Ct(r,t){let e=t.createElement("style");return e.textContent=r,e}function hn(r,t,e,n){let o=r.head?.querySelectorAll(`style[${xe}="${t}"],link[${xe}="${t}"]`);if(o)for(let s of o)s.removeAttribute(xe),s instanceof HTMLLinkElement?n.set(s.href.slice(s.href.lastIndexOf("/")+1),{usage:0,elements:[s]}):s.textContent&&e.set(s.textContent,{usage:0,elements:[s]})}function Ue(r,t){let e=t.createElement("link");return e.setAttribute("rel","stylesheet"),e.setAttribute("href",r),e}var Be=(()=>{class r{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;constructor(e,n,o,s={}){this.doc=e,this.appId=n,this.nonce=o,hn(e,n,this.inline,this.external),this.hosts.add(e.head)}addStyles(e,n){for(let o of e)this.addUsage(o,this.inline,Ct);n?.forEach(o=>this.addUsage(o,this.external,Ue))}removeStyles(e,n){for(let o of e)this.removeUsage(o,this.inline);n?.forEach(o=>this.removeUsage(o,this.external))}addUsage(e,n,o){let s=n.get(e);s?s.usage++:n.set(e,{usage:1,elements:[...this.hosts].map(i=>this.addElement(i,o(e,this.doc)))})}removeUsage(e,n){let o=n.get(e);o&&(o.usage--,o.usage<=0&&(Nt(o.elements),n.delete(e)))}ngOnDestroy(){for(let[,{elements:e}]of[...this.inline,...this.external])Nt(e);this.hosts.clear()}addHost(e){this.hosts.add(e);for(let[n,{elements:o}]of this.inline)o.push(this.addElement(e,Ct(n,this.doc)));for(let[n,{elements:o}]of this.external)o.push(this.addElement(e,Ue(n,this.doc)))}removeHost(e){this.hosts.delete(e)}addElement(e,n){return this.nonce&&n.setAttribute("nonce",this.nonce),e.appendChild(n)}static \u0275fac=function(n){return new(n||r)(h(R),h(be),h(_e,8),h(J))};static \u0275prov=g({token:r,factory:r.\u0275fac})}return r})(),Le={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"},ze=/%COMP%/g;var xt="%COMP%",fn=`_nghost-${xt}`,pn=`_ngcontent-${xt}`,mn=!0,yn=new w("",{providedIn:"root",factory:()=>mn});function gn(r){return pn.replace(ze,r)}function vn(r){return fn.replace(ze,r)}function Lt(r,t){return t.map(e=>e.replace(ze,r))}var He=(()=>{class r{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;platformId;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;platformIsServer;constructor(e,n,o,s,i,c,a,d=null,l=null){this.eventManager=e,this.sharedStylesHost=n,this.appId=o,this.removeStylesOnCompDestroy=s,this.doc=i,this.platformId=c,this.ngZone=a,this.nonce=d,this.tracingService=l,this.platformIsServer=!1,this.defaultRenderer=new Q(e,i,a,this.platformIsServer,this.tracingService)}createRenderer(e,n){if(!e||!n)return this.defaultRenderer;let o=this.getOrCreateRenderer(e,n);return o instanceof me?o.applyToHost(e):o instanceof ee&&o.applyStyles(),o}getOrCreateRenderer(e,n){let o=this.rendererByCompId,s=o.get(n.id);if(!s){let i=this.doc,c=this.ngZone,a=this.eventManager,d=this.sharedStylesHost,l=this.removeStylesOnCompDestroy,y=this.platformIsServer,E=this.tracingService;switch(n.encapsulation){case De.Emulated:s=new me(a,d,n,this.appId,l,i,c,y,E);break;case De.ShadowDom:return new je(a,d,e,n,i,c,this.nonce,y,E);default:s=new ee(a,d,n,l,i,c,y,E);break}o.set(n.id,s)}return s}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(e){this.rendererByCompId.delete(e)}static \u0275fac=function(n){return new(n||r)(h(Fe),h(Be),h(be),h(yn),h(R),h(J),h(S),h(_e),h(dt,8))};static \u0275prov=g({token:r,factory:r.\u0275fac})}return r})(),Q=class{eventManager;doc;ngZone;platformIsServer;tracingService;data=Object.create(null);throwOnSyntheticProps=!0;constructor(t,e,n,o,s){this.eventManager=t,this.doc=e,this.ngZone=n,this.platformIsServer=o,this.tracingService=s}destroy(){}destroyNode=null;createElement(t,e){return e?this.doc.createElementNS(Le[e]||e,t):this.doc.createElement(t)}createComment(t){return this.doc.createComment(t)}createText(t){return this.doc.createTextNode(t)}appendChild(t,e){(kt(t)?t.content:t).appendChild(e)}insertBefore(t,e,n){t&&(kt(t)?t.content:t).insertBefore(e,n)}removeChild(t,e){e.remove()}selectRootElement(t,e){let n=typeof t=="string"?this.doc.querySelector(t):t;if(!n)throw new v(-5104,!1);return e||(n.textContent=""),n}parentNode(t){return t.parentNode}nextSibling(t){return t.nextSibling}setAttribute(t,e,n,o){if(o){e=o+":"+e;let s=Le[o];s?t.setAttributeNS(s,e,n):t.setAttribute(e,n)}else t.setAttribute(e,n)}removeAttribute(t,e,n){if(n){let o=Le[n];o?t.removeAttributeNS(o,e):t.removeAttribute(`${n}:${e}`)}else t.removeAttribute(e)}addClass(t,e){t.classList.add(e)}removeClass(t,e){t.classList.remove(e)}setStyle(t,e,n,o){o&(Y.DashCase|Y.Important)?t.style.setProperty(e,n,o&Y.Important?"important":""):t.style[e]=n}removeStyle(t,e,n){n&Y.DashCase?t.style.removeProperty(e):t.style[e]=""}setProperty(t,e,n){t!=null&&(t[e]=n)}setValue(t,e){t.nodeValue=e}listen(t,e,n,o){if(typeof t=="string"&&(t=j().getGlobalEventTarget(this.doc,t),!t))throw new v(5102,!1);let s=this.decoratePreventDefault(n);return this.tracingService?.wrapEventListener&&(s=this.tracingService.wrapEventListener(t,e,s)),this.eventManager.addEventListener(t,e,s,o)}decoratePreventDefault(t){return e=>{if(e==="__ngUnwrap__")return t;t(e)===!1&&e.preventDefault()}}};function kt(r){return r.tagName==="TEMPLATE"&&r.content!==void 0}var je=class extends Q{sharedStylesHost;hostEl;shadowRoot;constructor(t,e,n,o,s,i,c,a,d){super(t,s,i,a,d),this.sharedStylesHost=e,this.hostEl=n,this.shadowRoot=n.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let l=o.styles;l=Lt(o.id,l);for(let E of l){let m=document.createElement("style");c&&m.setAttribute("nonce",c),m.textContent=E,this.shadowRoot.appendChild(m)}let y=o.getExternalStyles?.();if(y)for(let E of y){let m=Ue(E,s);c&&m.setAttribute("nonce",c),this.shadowRoot.appendChild(m)}}nodeOrShadowRoot(t){return t===this.hostEl?this.shadowRoot:t}appendChild(t,e){return super.appendChild(this.nodeOrShadowRoot(t),e)}insertBefore(t,e,n){return super.insertBefore(this.nodeOrShadowRoot(t),e,n)}removeChild(t,e){return super.removeChild(null,e)}parentNode(t){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(t)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},ee=class extends Q{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(t,e,n,o,s,i,c,a,d){super(t,s,i,c,a),this.sharedStylesHost=e,this.removeStylesOnCompDestroy=o;let l=n.styles;this.styles=d?Lt(d,l):l,this.styleUrls=n.getExternalStyles?.(d)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},me=class extends ee{contentAttr;hostAttr;constructor(t,e,n,o,s,i,c,a,d){let l=o+"-"+n.id;super(t,e,n,s,i,c,a,d,l),this.contentAttr=gn(l),this.hostAttr=vn(l)}applyToHost(t){this.applyStyles(),this.setAttribute(t,this.hostAttr,"")}createElement(t,e){let n=super.createElement(t,e);return super.setAttribute(n,this.contentAttr,""),n}};var ge=class r extends pt{supportsDOMEvents=!0;static makeCurrent(){ft(new r)}onAndCancel(t,e,n,o){return t.addEventListener(e,n,o),()=>{t.removeEventListener(e,n,o)}}dispatchEvent(t,e){t.dispatchEvent(e)}remove(t){t.remove()}createElement(t,e){return e=e||this.getDefaultDocument(),e.createElement(t)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(t){return t.nodeType===Node.ELEMENT_NODE}isShadowRoot(t){return t instanceof DocumentFragment}getGlobalEventTarget(t,e){return e==="window"?window:e==="document"?t:e==="body"?t.body:null}getBaseHref(t){let e=En();return e==null?null:Tn(e)}resetBaseElement(){te=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return ie(document.cookie,t)}},te=null;function En(){return te=te||document.head.querySelector("base"),te?te.getAttribute("href"):null}function Tn(r){return new URL(r,document.baseURI).pathname}var ve=class{addToWindow(t){O.getAngularTestability=(n,o=!0)=>{let s=t.findTestabilityInTree(n,o);if(s==null)throw new v(5103,!1);return s},O.getAllAngularTestabilities=()=>t.getAllTestabilities(),O.getAllAngularRootElements=()=>t.getAllRootElements();let e=n=>{let o=O.getAllAngularTestabilities(),s=o.length,i=function(){s--,s==0&&n()};o.forEach(c=>{c.whenStable(i)})};O.frameworkStabilizers||(O.frameworkStabilizers=[]),O.frameworkStabilizers.push(e)}findTestabilityInTree(t,e,n){if(e==null)return null;let o=t.getTestability(e);return o??(n?j().isShadowRoot(e)?this.findTestabilityInTree(t,e.host,!0):this.findTestabilityInTree(t,e.parentElement,!0):null)}},wn=(()=>{class r{build(){return new XMLHttpRequest}static \u0275fac=function(n){return new(n||r)};static \u0275prov=g({token:r,factory:r.\u0275fac})}return r})(),jt=(()=>{class r extends q{constructor(e){super(e)}supports(e){return!0}addEventListener(e,n,o,s){return e.addEventListener(n,o,s),()=>this.removeEventListener(e,n,o,s)}removeEventListener(e,n,o,s){return e.removeEventListener(n,o,s)}static \u0275fac=function(n){return new(n||r)(h(R))};static \u0275prov=g({token:r,factory:r.\u0275fac})}return r})(),Ut=["alt","control","meta","shift"],Rn={"\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"},Mn={alt:r=>r.altKey,control:r=>r.ctrlKey,meta:r=>r.metaKey,shift:r=>r.shiftKey},Ft=(()=>{class r extends q{constructor(e){super(e)}supports(e){return r.parseEventName(e)!=null}addEventListener(e,n,o,s){let i=r.parseEventName(n),c=r.eventCallback(i.fullKey,o,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>j().onAndCancel(e,i.domEventName,c,s))}static parseEventName(e){let n=e.toLowerCase().split("."),o=n.shift();if(n.length===0||!(o==="keydown"||o==="keyup"))return null;let s=r._normalizeKey(n.pop()),i="",c=n.indexOf("code");if(c>-1&&(n.splice(c,1),i="code."),Ut.forEach(d=>{let l=n.indexOf(d);l>-1&&(n.splice(l,1),i+=d+".")}),i+=s,n.length!=0||s.length===0)return null;let a={};return a.domEventName=o,a.fullKey=i,a}static matchEventFullKeyCode(e,n){let o=Rn[e.key]||e.key,s="";return n.indexOf("code.")>-1&&(o=e.code,s="code."),o==null||!o?!1:(o=o.toLowerCase(),o===" "?o="space":o==="."&&(o="dot"),Ut.forEach(i=>{if(i!==o){let c=Mn[i];c(e)&&(s+=i+".")}}),s+=o,s===n)}static eventCallback(e,n,o){return s=>{r.matchEventFullKeyCode(s,e)&&o.runGuarded(()=>n(s))}}static _normalizeKey(e){return e==="esc"?"escape":e}static \u0275fac=function(n){return new(n||r)(h(R))};static \u0275prov=g({token:r,factory:r.\u0275fac})}return r})();function bn(r,t){return ht(x({rootComponent:r},_n(t)))}function _n(r){return{appProviders:[...Bt,...r?.providers??[]],platformProviders:An}}function Dn(){ge.makeCurrent()}function On(){return new Me}function Sn(){return Qe(document),document}var An=[{provide:J,useValue:yt},{provide:et,useValue:Dn,multi:!0},{provide:R,useFactory:Sn}];var In=[{provide:oe,useClass:ve},{provide:lt,useClass:se,deps:[S,Oe,oe]},{provide:se,useClass:se,deps:[S,Oe,oe]}],Bt=[{provide:Ye,useValue:"root"},{provide:Me,useFactory:On},{provide:ye,useClass:jt,multi:!0,deps:[R]},{provide:ye,useClass:Ft,multi:!0,deps:[R]},He,Be,Fe,{provide:ct,useExisting:He},{provide:ae,useClass:wn},[]],Pn=(()=>{class r{constructor(){}static \u0275fac=function(n){return new(n||r)};static \u0275mod=re({type:r});static \u0275inj=ne({providers:[...Bt,...In],imports:[mt,ut]})}return r})();var Yr=(()=>{class r{_doc;constructor(e){this._doc=e}getTitle(){return this._doc.title}setTitle(e){this._doc.title=e||""}static \u0275fac=function(n){return new(n||r)(h(R))};static \u0275prov=g({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var Cn=(()=>{class r{static \u0275fac=function(n){return new(n||r)};static \u0275prov=g({token:r,factory:function(n){let o=null;return n?o=new(n||r):o=h(kn),o},providedIn:"root"})}return r})(),kn=(()=>{class r extends Cn{_doc;constructor(e){super(),this._doc=e}sanitize(e,n){if(n==null)return null;switch(e){case k.NONE:return n;case k.HTML:return U(n,"HTML")?L(n):at(this._doc,String(n)).toString();case k.STYLE:return U(n,"Style")?L(n):n;case k.SCRIPT:if(U(n,"Script"))return L(n);throw new v(5200,!1);case k.URL:return U(n,"URL")?L(n):it(String(n));case k.RESOURCE_URL:if(U(n,"ResourceURL"))return L(n);throw new v(5201,!1);default:throw new v(5202,!1)}}bypassSecurityTrustHtml(e){return tt(e)}bypassSecurityTrustStyle(e){return nt(e)}bypassSecurityTrustScript(e){return rt(e)}bypassSecurityTrustUrl(e){return ot(e)}bypassSecurityTrustResourceUrl(e){return st(e)}static \u0275fac=function(n){return new(n||r)(h(R))};static \u0275prov=g({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();export{z as a,A as b,I as c,V as d,Dt as e,qt as f,dn as g,ln as h,un as i,He as j,bn as k,Pn as l,Yr as m,Cn as n};
|
package/public/chunk-NGBI2CLV.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import{a as we}from"./chunk-WAEIH452.js";import{a as ve}from"./chunk-QLQG37MU.js";import{b as B,e as ye,f as Ce,g as Ie}from"./chunk-6LWEFB5T.js";import{a as ge,b as ue}from"./chunk-ZT56WXIZ.js";import{a as _e}from"./chunk-P3TP4J62.js";import{a as je}from"./chunk-YFQVSUDS.js";import{m as R,n as fe,t as P}from"./chunk-PSSVCFFV.js";import{A as pe,c as le,e as de,l as ce,z as me}from"./chunk-K2NEWUWG.js";import{b as he,d as H}from"./chunk-QRQBCPWO.js";import{b as be}from"./chunk-GBJM2RI4.js";import{k as I,n as O}from"./chunk-P2X74Q5E.js";import{a as j,b as V}from"./chunk-ZG3HINDJ.js";import"./chunk-K7QEGT3E.js";import{Ec as K,Hb as _,Hc as l,Ib as v,Ic as d,Jb as w,Jc as U,Lb as ee,Mb as te,Nb as ie,Ob as y,Pb as r,Qb as a,Rb as m,_b as x,ab as s,bc as g,d as Q,dc as p,fb as Z,g as X,h as E,id as ae,la as f,mb as A,pd as se,qc as u,ra as h,rc as k,sa as b,sc as T,w as $,xc as oe,yc as ne,zc as re}from"./chunk-V7SOQAC5.js";var Te=X(Ie(),1);var xe=(()=>{class o{$activeModal=f(R);dismissModal(){this.$activeModal.dismiss("Dismiss")}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=A({type:o,selectors:[["ng-component"]],decls:19,vars:9,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fa","fa-fw","fa-question-circle-o","primary-text",2,"font-size","75px"],[1,"modal-footer","justify-content-between"],[1,"text-start"],[1,"text-center"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-end"]],template:function(t,i){t&1&&(r(0,"div",0)(1,"form")(2,"div",1)(3,"h5",2),u(4),l(5,"translate"),a(),r(6,"button",3),l(7,"translate"),g("click",function(){return i.dismissModal()}),a()(),r(8,"div",4)(9,"div",5),m(10,"i",6),a(),m(11,"app-support-banner"),a(),r(12,"div",7),m(13,"div",8),r(14,"div",9)(15,"button",10),g("click",function(){return i.dismissModal()}),u(16),l(17,"translate"),a()(),m(18,"div",11),a()()()),t&2&&(s(4),k(d(5,3,"support.title")),s(2),_("aria-label",d(7,5,"form.button_close")),s(10),T(" ",d(17,7,"form.button_close")," "))},dependencies:[ve,V],encapsulation:2})}return o})();var ke=X(je(),1);var $e=(o,C)=>({"fa-trash":o,"fa-cog fa-spin":C});function He(o,C){o&1&&(r(0,"div",13),m(1,"i",20),a())}function Oe(o,C){if(o&1){let e=x();r(0,"li",9)(1,"span"),u(2),l(3,"date"),m(4,"br"),r(5,"span",21),u(6),l(7,"date"),a()(),r(8,"span",22)(9,"button",25),l(10,"translate"),l(11,"translate"),g("click",function(){let i=h(e).$implicit,n=p(2);return b(n.restore(i.id))}),m(12,"i",26),a(),r(13,"button",27),l(14,"translate"),l(15,"translate"),g("click",function(){let i=h(e).$implicit,n=p(2);return b(n.download(i.id))}),m(16,"i",28),a(),r(17,"button",23),l(18,"translate"),l(19,"translate"),g("click",function(){let i=h(e).$implicit,n=p(2);return b(n.delete(i.id))}),m(20,"i",24),a()()()}if(o&2){let e=C.$implicit,t=p(2);s(2),T(" ",U(3,12,e.timestamp,"mediumDate")),s(4),k(U(7,15,e.timestamp,"shortTime")),s(3),y("disabled",t.clicked||t.deleting)("ngbTooltip",d(10,18,"form.button_restore")),_("aria-label",d(11,20,"config.restore.copy_to_editor")),s(4),y("disabled",t.clicked||t.deleting)("ngbTooltip",d(14,22,"form.button_download")),_("aria-label",d(15,24,"form.button_download")),s(4),y("disabled",t.clicked||t.deleting)("ngbTooltip",d(18,26,"form.button_delete")),_("aria-label",d(19,28,"form.button_delete")),s(3),y("ngClass",K(30,$e,e.id!==t.deleting,e.id===t.deleting))}}function Ne(o,C){if(o&1){let e=x();r(0,"ul",14),te(1,Oe,21,33,"li",9,ee),r(3,"li",9)(4,"span"),u(5),l(6,"translate"),m(7,"br"),r(8,"span",21),u(9),l(10,"translate"),a()(),r(11,"span",22)(12,"button",23),l(13,"translate"),l(14,"translate"),g("click",function(){h(e);let i=p();return b(i.deleteAllBackups())}),m(15,"i",24),a()()()()}if(o&2){let e=p();s(),ie(e.backupList),s(4),T(" ",d(6,6,"form.button_delete_all")),s(4),T(" ",d(10,8,"common.labels.no_confirmation")," "),s(3),y("disabled",e.clicked||e.deleting)("ngbTooltip",d(13,10,"form.button_delete")),_("aria-label",d(14,12,"form.button_delete")),s(3),y("ngClass",K(14,$e,e.deleting!=="all",e.deleting==="all"))}}var Se=(()=>{class o{$activeModal=f(R);$api=f(O);$router=f(H);$toastr=f(I);$translate=f(j);currentConfig;fromSettings=!1;loading=!0;backupList=[];clicked=!1;deleting=null;ngOnInit(){this.getConfigBackups()}getConfigBackups(){return E(this,null,function*(){try{let e=yield $(this.$api.get("/config-editor/backups"));this.loading=!1,this.backupList=e}catch(e){this.loading=!1,console.error(e),this.$toastr.error(e.error?.message||e.message,this.$translate.instant("toast.title_error")),this.dismissModal()}})}restore(e){return this.$activeModal.close(e)}download(e){return E(this,null,function*(){this.clicked=!0;try{let t=yield $(this.$api.get(`/config-editor/backups/${e}`)),i=JSON.stringify(t,null,4),n=new Blob([i],{type:"application/json"}),S=`config-backup-${e}.json`;(0,ke.saveAs)(n,S),this.clicked=!1}catch(t){this.clicked=!1,this.$toastr.error(t.error?.message||t.message,this.$translate.instant("toast.title_error")),console.error(t)}})}downloadCurrentConfig(){let e=`data:text/json;charset=utf-8,${encodeURIComponent(this.currentConfig)}`,t=document.createElement("a");t.setAttribute("href",e),t.setAttribute("download","config.json"),document.body.appendChild(t),t.click(),t.remove()}delete(e){return E(this,null,function*(){this.deleting=e;try{yield $(this.$api.delete(`/config-editor/backups/${e}`)),yield this.getConfigBackups(),this.deleting=null}catch(t){this.deleting=null,this.$toastr.error(t.error?.message||t.message,this.$translate.instant("toast.title_error")),console.error(t)}})}deleteAllBackups(){return E(this,null,function*(){this.deleting="all";try{yield $(this.$api.delete("/config-editor/backups")),this.$toastr.success(this.$translate.instant("config.restore.toast_backups_deleted"),this.$translate.instant("toast.title_success")),this.backupList=[]}catch(e){this.$toastr.error(e.error?.message||e.message,this.$translate.instant("toast.title_error")),console.error(e)}})}dismissModal(){this.fromSettings&&this.$router.navigate(["/settings"]),this.$activeModal.dismiss("Dismiss")}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=A({type:o,selectors:[["ng-component"]],inputs:{currentConfig:"currentConfig",fromSettings:"fromSettings"},decls:38,vars:24,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click","disabled"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fas","fa-fw","fa-history","primary-text",2,"font-size","75px"],[1,"mb-3"],[1,"list-group","list-group-box","mb-0"],[1,"list-group-item","d-flex","justify-content-between","align-items-center"],[1,"grey-text"],[1,"btn","btn-primary","m-0","ms-3",3,"click","disabled"],[1,"fas","fa-fw","fa-arrow-right"],[1,"text-center","primary-text"],[1,"list-group","list-group-box","mt-3"],[1,"modal-footer","justify-content-between"],[1,"text-start"],[1,"text-center"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-end"],[1,"fa","fa-fw","fa-cog","fa-spin","mt-3",2,"font-size","75px"],[1,"grey-text","small"],[2,"display","flex","flex-wrap","nowrap"],["placement","bottom","container","modal","openDelay","150","triggers","hover",1,"btn","btn-danger","m-0","ms-2",3,"click","disabled","ngbTooltip"],[1,"fas","fa-fw",3,"ngClass"],["placement","bottom","container","modal","openDelay","150","triggers","hover",1,"btn","btn-primary","m-0","ms-3",3,"click","disabled","ngbTooltip"],[1,"fas","fa-fw","fa-history"],["placement","bottom","container","modal","openDelay","150","triggers","hover",1,"btn","btn-primary","m-0","ms-2",3,"click","disabled","ngbTooltip"],[1,"fas","fa-fw","fa-download"]],template:function(t,i){t&1&&(r(0,"div",0)(1,"div",1)(2,"h5",2),u(3),l(4,"translate"),a(),r(5,"button",3),l(6,"translate"),g("click",function(){return i.dismissModal()}),a()(),r(7,"div",4)(8,"div",5),m(9,"i",6),a(),r(10,"ul",7)(11,"li"),u(12),l(13,"translate"),a(),r(14,"li"),u(15),l(16,"translate"),a()(),r(17,"ul",8)(18,"li",9)(19,"div")(20,"span"),u(21,"Download"),a(),m(22,"br"),r(23,"small",10),u(24," Download your current configuration as a JSON file. "),a()(),r(25,"button",11),l(26,"translate"),g("click",function(){return i.downloadCurrentConfig()}),m(27,"i",12),a()()(),v(28,He,2,0,"div",13)(29,Ne,16,17,"ul",14),a(),r(30,"div",15),m(31,"div",16),r(32,"div",17)(33,"button",18),l(34,"translate"),g("click",function(){return i.dismissModal()}),u(35),l(36,"translate"),a()(),m(37,"div",19),a()()),t&2&&(s(3),k(d(4,10,"config.restore.title")),s(2),y("disabled",i.clicked||i.deleting),_("aria-label",d(6,12,"form.button_close")),s(7),k(d(13,14,"config.restore.help_1")),s(3),k(d(16,16,"config.restore.help_2")),s(10),y("disabled",i.clicked||i.deleting),_("aria-label",d(26,18,"backup.backup_now")),s(3),w(i.loading?28:29),s(5),_("aria-label",d(34,20,"form.button_close")),s(2),T(" ",d(36,22,"form.button_close")," "))},dependencies:[P,ae,pe,se,V],encapsulation:2})}return o})();function qe(o,C){if(o&1){let e=x();r(0,"button",15),l(1,"translate"),l(2,"translate"),g("click",function(){h(e);let i=p();return b(i.onCancelRestore())}),m(3,"i",16),a()}if(o&2){let e=p();y("disabled",e.saveInProgress)("ngbTooltip",d(1,3,"form.button_cancel")),_("aria-label",d(2,5,"form.button_cancel"))}}function Fe(o,C){if(o&1){let e=x();r(0,"button",17),l(1,"translate"),l(2,"translate"),g("click",function(){h(e);let i=p();return b(i.onRestore())}),m(3,"i",18),a()}o&2&&(y("ngbTooltip",d(1,2,"form.button_restore")),_("aria-label",d(2,4,"form.button_restore")))}function Je(o,C){o&1&&m(0,"i",8)}function Le(o,C){o&1&&m(0,"i",9)}function ze(o,C){if(o&1){let e=x();r(0,"ngx-monaco-editor",19),g("onInit",function(i){h(e);let n=p();return b(n.onEditorInit(i))})("keydown.control.s",function(i){h(e);let n=p();return i.preventDefault(),b(n.onSave())})("keydown.meta.s",function(i){h(e);let n=p();return i.preventDefault(),b(n.onSave())}),a()}if(o&2){let e=p();y("options",e.editorOptions)("model",e.monacoEditorModel)}}function Ke(o,C){if(o&1){let e=x();r(0,"ngx-monaco-diff-editor",20),g("onInit",function(i){h(e);let n=p();return b(n.onInitDiffEditor(i))})("keydown.control.s",function(i){h(e);let n=p();return i.preventDefault(),b(n.onSave())})("keydown.meta.s",function(i){h(e);let n=p();return i.preventDefault(),b(n.onSave())}),a()}if(o&2){let e=p();y("options",e.editorOptions)("originalModel",e.monacoEditorModel)("modifiedModel",e.monacoEditorModel)}}function Ue(o,C){if(o&1){let e=x();r(0,"textarea",21),re("ngModelChange",function(i){h(e);let n=p();return ne(n.homebridgeConfig,i)||(n.homebridgeConfig=i),b(i)}),u(1," "),a()}if(o&2){let e=p();oe("ngModel",e.homebridgeConfig)}}var Dt=(()=>{class o{$api=f(O);$md=f(_e);$modal=f(fe);$monacoEditor=f(we);$route=f(he);$renderer=f(Z);$router=f(H);$settings=f(be);$toastr=f(I);$translate=f(j);editorDecorations=[];lastHeight;visualViewPortEventCallback;latestSavedConfig;childBridgesToRestart=[];hbPendingRestart=!1;homebridgeConfig;originalConfig;saveInProgress;isMobile=!1;monacoEditor;editorOptions;monacoEditorModel;constructor(){this.isMobile=this.$md.detect.mobile()}ngOnInit(){this.editorOptions={language:"json",theme:this.$settings.actualLightingMode==="dark"?"vs-dark":"vs-light",automaticLayout:!0};let e=document.querySelector(".content");this.$renderer.setStyle(e,"height","100%"),this.visualViewPortEventCallback=()=>this.visualViewPortChanged(),this.lastHeight=window.innerHeight,window.visualViewport&&!this.isMobile&&(window.visualViewport.addEventListener("resize",this.visualViewPortEventCallback,!0),this.$md.disableTouchMove()),this.visualViewPortEventCallback=()=>this.visualViewPortChanged(),this.lastHeight=window.innerHeight,window.visualViewport&&!this.isMobile&&(window.visualViewport.addEventListener("resize",this.visualViewPortEventCallback,!0),this.$md.disableTouchMove()),this.$route.data.subscribe(i=>{this.homebridgeConfig=i.config,this.latestSavedConfig=JSON.parse(i.config)}),this.monacoEditorModel={value:"{}",language:"json",uri:window.monaco?window.monaco.Uri.parse("a://homebridge/config.json"):void 0},window.monaco?this.setMonacoEditorModel():this.$monacoEditor.readyEvent.subscribe({next:()=>{this.setMonacoEditorModel()}});let{action:t}=this.$router.parseUrl(this.$router.url).queryParams;if(t){switch(t){case"restore":{this.onRestore(!0);break}}this.$router.navigate([],{queryParams:{},replaceUrl:!0,queryParamsHandling:""})}}onEditorInit(e){window.editor=e,this.monacoEditor=e,this.monacoEditor.getModel().setValue(this.homebridgeConfig)}onInitDiffEditor(e){this.monacoEditor=e.modifiedEditor,e.getModel().original.setValue(this.originalConfig),e.getModel().modified.setValue(this.homebridgeConfig),window.editor=e}onSave(){return E(this,null,function*(){if(!this.saveInProgress){this.monacoEditor&&(this.editorDecorations=this.monacoEditor.deltaDecorations(this.editorDecorations,[])),this.saveInProgress=!0;try{if(!this.isMobile){yield this.monacoEditor.getAction("editor.action.formatDocument").run();let t=window.monaco.editor.getModelMarkers({owner:"json"});for(let i of t)if(i.message==="Duplicate object key"){this.saveInProgress=!1,this.$toastr.error(this.$translate.instant("config.config_invalid_json"),this.$translate.instant("toast.title_error"));return}this.homebridgeConfig=this.monacoEditor.getModel().getValue()}let e=this.parseConfigFromEditor();this.homebridgeConfig=JSON.stringify(e,null,4),typeof e.bridge!="object"?this.$toastr.error(this.$translate.instant("config.config_bridge_missing"),this.$translate.instant("toast.title_error")):/^(?:[0-9A-F]{2}:){5}[0-9A-F]{2}$/i.test(e.bridge.username)?e.accessories&&!Array.isArray(e.accessories)?this.$toastr.error(this.$translate.instant("config.config_accessory_must_be_array"),this.$translate.instant("toast.title_error")):e.platforms&&!Array.isArray(e.platforms)?this.$toastr.error(this.$translate.instant("config.config_platform_must_be_array"),this.$translate.instant("toast.title_error")):e.platforms&&Array.isArray(e.platforms)&&!this.validateSection(e.platforms,"platform")||e.accessories&&Array.isArray(e.accessories)&&!this.validateSection(e.accessories,"accessory")||e.plugins&&Array.isArray(e.plugins)&&!this.validatePlugins(e.plugins,"plugins")||e.disabledPlugins&&Array.isArray(e.disabledPlugins)&&!this.validatePlugins(e.disabledPlugins,"disabledPlugins")||(yield this.saveConfig(e),this.originalConfig=""):this.$toastr.error(this.$translate.instant("config.config_username_error"),this.$translate.instant("toast.title_error"))}catch(e){console.error(e),this.$toastr.error(this.$translate.instant("config.config_invalid_json"),this.$translate.instant("toast.title_error"))}this.saveInProgress=!1}})}onRestore(e=!1){let t=this.$modal.open(Se,{size:"lg",backdrop:"static"});t.componentInstance.currentConfig=this.homebridgeConfig,t.componentInstance.fromSettings=e,t.result.then(i=>{this.originalConfig||(this.originalConfig=this.homebridgeConfig),this.$api.get(`/config-editor/backups/${i}`).subscribe({next:n=>{this.$toastr.info(this.$translate.instant("config.restore.confirm"),this.$translate.instant("config.title_backup_loaded")),this.homebridgeConfig=JSON.stringify(n,null,4),this.monacoEditor&&window.editor.modifiedEditor&&(this.editorDecorations=this.monacoEditor.deltaDecorations(this.editorDecorations,[]),this.monacoEditor.executeEdits("beautifier",[{identifier:"delete",range:new monaco.Range(1,1,this.monacoEditor.getModel().getLineCount()+10,1),text:"",forceMoveMarkers:!0}]),this.monacoEditor.executeEdits("beautifier",[{identifier:"insert",range:new monaco.Range(1,1,1,1),text:this.homebridgeConfig,forceMoveMarkers:!0}]))},error:n=>{console.error(n),this.$toastr.error(n.error?.message||this.$translate.instant("backup.load_error"),this.$translate.instant("toast.title_error"))}})}).catch(()=>{})}onCancelRestore(){this.homebridgeConfig=this.originalConfig,this.originalConfig="",this.onRestore()}openSupport(){this.$modal.open(xe,{size:"lg",backdrop:"static"})}ngOnDestroy(){let e=document.querySelector(".content");this.$renderer.removeStyle(e,"height"),window.visualViewport&&(window.visualViewport.removeEventListener("resize",this.visualViewPortEventCallback,!0),this.$md.enableTouchMove()),this.monacoEditor&&this.monacoEditor.dispose()}validateSection(e,t){for(let i of e){if(typeof i!="object"||Array.isArray(i))return this.$toastr.error(this.$translate.instant("config.error_blocks_objects",{type:t}),this.$translate.instant("toast.title_error")),this.highlightOffendingArrayItem(i),!1;if(!i[t])return this.$toastr.error(this.$translate.instant("config.error_blocks_type",{type:t}),this.$translate.instant("toast.title_error")),this.highlightOffendingArrayItem(i),!1;if(typeof i[t]!="string")return this.$toastr.error(this.$translate.instant("config.error_string_type",{type:t}),this.$translate.instant("toast.title_error")),this.highlightOffendingArrayItem(i),!1}return!0}validatePlugins(e,t){for(let i of e)if(typeof i!="string")return this.$toastr.error(this.$translate.instant("config.error_string_array",{key:t}),this.$translate.instant("toast.title_error")),!1;return!0}highlightOffendingArrayItem(e){this.monacoEditor&&(e=JSON.stringify(e,null,4).split(`
|
|
2
|
-
`).map(t=>` ${t}`).join(`
|
|
3
|
-
`),setTimeout(()=>{let t=this.monacoEditor.getModel().findMatches(e);if(t.length){let i=t[0].range,n=new monaco.Range(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn);this.editorDecorations=this.monacoEditor.deltaDecorations(this.editorDecorations,[{range:n,options:{isWholeLine:!0,linesDecorationsClassName:"hb-monaco-editor-line-error"}}])}},200))}setMonacoEditorModel(){if(window.monaco.languages.json.jsonDefaults.diagnosticsOptions.schemas.some(t=>t.uri==="http://homebridge/config.json"))return;let e=monaco.Uri.parse("a://homebridge/config.json");window.monaco.languages.json.jsonDefaults.setDiagnosticsOptions({allowComments:!1,validate:!0,schemas:[{uri:"http://homebridge/config.json",fileMatch:[e.toString()],schema:{type:"object",required:["bridge"],properties:{bridge:{type:"object",required:["name","username","port","pin"],properties:{name:{type:"string",description:`The Homebridge instance name.
|
|
4
|
-
This should be unique if you are running multiple instances of Homebridge.`,default:"Homebridge"},username:{type:"string",description:`Homebridge username must be 6 pairs of colon-separated hexadecimal characters (A-F 0-9).
|
|
5
|
-
You should change this pin if you need to re-pair your instance with HomeKit.
|
|
6
|
-
Example: 0E:89:49:64:91:86`,default:"0E:89:49:64:91:86",pattern:"^([A-Fa-f0-9]{2}:){5}[A-Fa-f0-9]{2}$"},port:{type:"number",description:`The port Homebridge listens on.
|
|
7
|
-
If running more than one instance of Homebridge on the same server make sure each instance is given a unique port.`,default:51173,minimum:1025,maximum:65534},pin:{type:"string",description:`The Homebridge instance pin.
|
|
8
|
-
This is used when pairing Homebridge to HomeKit.
|
|
9
|
-
Example: 630-27-655`,default:"630-27-655",pattern:"^([0-9]{3}-[0-9]{2}-[0-9]{3})$"},manufacturer:{type:"string",description:"The bridge manufacturer to be displayed in HomeKit"},firmwareRevision:{type:"string",description:"The bridge firmware version to be displayed in HomeKit"},model:{type:"string",description:"The bridge model to be displayed in HomeKit"},bind:{description:`A string or an array of strings with the name(s) of the network interface(s) Homebridge should bind to.
|
|
10
|
-
|
|
11
|
-
Requires Homebridge v1.3 or later.`,type:["string","array"],items:{type:"string",description:"Network Interface name that Homebridge should bind to."}}},default:{name:"Homebridge",username:"0E:89:49:64:91:86",port:51173,pin:"6302-7655"}},mdns:{type:"object",properties:{interface:{type:"string",description:`The interface or IP address of the interface you want Homebridge to listen on. This is useful if your server has multiple interfaces.
|
|
12
|
-
|
|
13
|
-
Deprecated as of Homebridge v1.3.0 - use bridge.bind instead.`},legacyAdvertiser:{type:"boolean",description:"Set to `false` to use the new mdns library, ciao."}},default:{legacyAdvertiser:!1}},plugins:{type:"array",description:"An array of plugins that should be selectively enabled. Remove this array to enable all plugins.",items:{type:"string",description:`The full plugin npm package name.
|
|
14
|
-
Example: homebridge-dummy`},default:["homebridge-config-ui-x"]},disabledPlugins:{type:"array",description:`An array of plugins that should be disabled.
|
|
15
|
-
|
|
16
|
-
Requires Homebridge v1.3 or later.`,items:{type:"string",description:`The full plugin npm package name.
|
|
17
|
-
Example: homebridge-dummy`},default:[]},ports:{type:"object",description:"The range of ports that should be used for certain accessories like cameras and TVs",required:["start","end"],properties:{start:{type:"number",default:52100,minimum:1025,maximum:65534},end:{type:"number",default:52150,minimum:1025,maximum:65534}},default:{start:52100,end:52150}},platforms:{type:"array",description:`Any plugin that exposes a platform should have its config entered in this array.
|
|
18
|
-
Separate each plugin config block using a comma.`,items:{type:"object",required:["platform"],anyOf:[{type:"object",required:["platform"],properties:{platform:{type:"string",description:"This is used by Homebridge to identify which plugin this platform belongs to.",not:{enum:["config"]}},name:{type:"string",description:"The name of the platform."}}},{type:"object",properties:{platform:{type:"string",description:`Homebridge UI platform name must be set to "config".
|
|
19
|
-
Do Not Change!`,oneOf:[{enum:"config"}]},name:{type:"string",description:"The name used in the Homebridge log."}}}]}},accessories:{type:"array",description:`Any plugin that exposes an accessory should have its config entered in this array.
|
|
20
|
-
Separate each plugin config block using a comma.`,items:{type:"object",required:["accessory","name"],properties:{accessory:{type:"string",description:"This is used by Homebridge to identify which plugin this accessory belongs to."},name:{type:"string",description:"The name of the accessory."}}}}}}}]}),this.monacoEditorModel.uri=monaco.Uri.parse("a://homebridge/config.json")}visualViewPortChanged(){this.lastHeight<window.visualViewport.height&&document.activeElement.blur(),window.visualViewport.height<window.innerHeight?(this.$md.enableTouchMove(),this.lastHeight=window.visualViewport.height):window.visualViewport.height===window.innerHeight&&(this.$md.disableTouchMove(),this.lastHeight=window.visualViewport.height)}saveConfig(e){return E(this,null,function*(){try{let t=yield $(this.$api.post("/config-editor",e));this.homebridgeConfig=JSON.stringify(t,null,4),yield this.detectSavesChangesForRestart()}catch(t){console.error(t),this.$toastr.error(this.$translate.instant("config.failed_to_save_config"),this.$translate.instant("toast.title_error"))}})}validateArraysEqual(e,t){if(e.length!==t.length)return!1;let i=[...e].sort(),n=[...t].sort();return i.every((S,N)=>S===n[N])}removePlatformsAndAccessories(e){let S=e,{accessories:t,platforms:i}=S;return Q(S,["accessories","platforms"])}removeEmptyBridges(e){return e.filter(t=>t._bridge&&Object.keys(t._bridge).length>0).map(t=>t._bridge)}validateBridgesEqual(e,t){return e.length!==t.length?!1:e.every(i=>t.some(n=>B(i,n)))}detectSavesChangesForRestart(){return E(this,null,function*(){try{if(this.hbPendingRestart)throw new Error("homebridge already pending a restart");let e=this.latestSavedConfig,t=JSON.stringify(e,null,4),i=JSON.parse(this.homebridgeConfig),n=this.homebridgeConfig;if(t===n&&!this.childBridgesToRestart.length)this.$toastr.info(this.$translate.instant("config.no_restart"),this.$translate.instant("config.config_saved"));else{if(!this.validateArraysEqual(Object.keys(e),Object.keys(i)))throw new Error("top level keys have changed");if([...i.platforms||[],...i.accessories||[]].every(c=>!c._bridge||!Object.keys(c._bridge).length))throw new Error("All platforms and accessories are missing a valid _bridge property.");let N=this.removePlatformsAndAccessories(e),Me=this.removePlatformsAndAccessories(i);if(!B(N,Me))throw new Error("top level properties have changed (except accessories and platforms)");let q=e.platforms||[],F=i.platforms||[],Ae=q.map(c=>c.platform),Ve=F.map(c=>c.platform);if(!this.validateArraysEqual(Ae,Ve))throw new Error("platform keys have changed");let J=e.accessories||[],L=i.accessories||[],Be=J.map(c=>c.accessory),De=L.map(c=>c.accessory);if(!this.validateArraysEqual(Be,De))throw new Error("accessory keys have changed");if(!this.validateBridgesEqual(this.removeEmptyBridges(q),this.removeEmptyBridges(F)))throw new Error("platform bridges have changed");if(!this.validateBridgesEqual(this.removeEmptyBridges(J),this.removeEmptyBridges(L)))throw new Error("accessory bridges have changed");let W=q.filter(c=>!B(c,F.find(M=>M.platform===c.platform))),Re=J.filter(c=>!B(c,L.find(M=>M.accessory===c.accessory))),Y=[...W,...Re];if(W.some(c=>c.platform==="config"))throw new Error("homebridge ui config has changed");if(Y.some(c=>c.platform==="config"?!1:!c._bridge||Object.keys(c._bridge).length===0))throw new Error("some changed entry does not have a _bridge key");let Pe=yield $(this.$api.get("/status/homebridge/child-bridges"));Y.forEach(c=>{let M=c._bridge.username.toUpperCase(),D=Pe.find(({username:z})=>z===M);if(D)this.childBridgesToRestart.some(z=>z.username===D.username)||this.childBridgesToRestart.push({name:D.name,username:D.username});else throw new Error(`no child bridge found for username: ${M}`)});let G=this.$modal.open(ye,{size:"lg",backdrop:"static"});G.componentInstance.bridges=this.childBridgesToRestart;try{yield G.result,this.childBridgesToRestart=[]}catch{}}}catch(e){console.error(e);let t=this.$modal.open(Ce,{size:"lg",backdrop:"static"});try{yield t.result,this.hbPendingRestart=!1,this.childBridgesToRestart=[]}catch{this.hbPendingRestart=!0}}finally{this.latestSavedConfig=JSON.parse(this.homebridgeConfig)}})}parseConfigFromEditor(){try{return JSON.parse(this.homebridgeConfig)}catch{let t=Te.default.parse(this.homebridgeConfig);return this.homebridgeConfig=JSON.stringify(t,null,4),this.monacoEditor&&this.monacoEditor.getModel().setValue(this.homebridgeConfig),t}}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=A({type:o,selectors:[["ng-component"]],decls:20,vars:20,consts:[[1,"flex-column","d-flex","align-items-stretch","h-100"],[1,"row"],[1,"col-6"],[1,"primary-text","m-0"],[1,"col-6","text-end"],["container","body","placement","bottom","openDelay","150","triggers","hover",1,"btn","btn-danger","waves-effect","my-0","me-2",3,"disabled","ngbTooltip"],["container","body","placement","bottom","openDelay","150","triggers","hover",1,"btn","btn-elegant","waves-effect","my-0","me-2",3,"ngbTooltip"],["container","body","placement","bottom","openDelay","150","triggers","hover",1,"btn","btn-elegant","waves-effect","my-0","me-2",3,"click","disabled","ngbTooltip"],[1,"fas","fa-fw","fa-floppy-disk"],[1,"fas","fa-fw","fa-spinner","fa-pulse"],["type","button",1,"btn","btn-elegant","my-0","me-0",3,"click"],[1,"fa","fa-fw","fa-question-circle-o"],[1,"flex-grow-1","h-100","w-100","mt-3","mb-0",3,"options","model"],[1,"flex-grow-1","h-100","w-100","mt-3","mb-0",3,"options","originalModel","modifiedModel"],["wrap","off","autocomplete","off","autocorrect","off","autocapitalize","off","spellcheck","false",1,"hb-plain-text-editor","align-self-end","h-100","w-100","my-3",3,"ngModel"],["container","body","placement","bottom","openDelay","150","triggers","hover",1,"btn","btn-danger","waves-effect","my-0","me-2",3,"click","disabled","ngbTooltip"],[1,"fas","fa-fw","fa-times"],["container","body","placement","bottom","openDelay","150","triggers","hover",1,"btn","btn-elegant","waves-effect","my-0","me-2",3,"click","ngbTooltip"],[1,"fas","fa-fw","fa-history"],[1,"flex-grow-1","h-100","w-100","mt-3","mb-0",3,"onInit","keydown.control.s","keydown.meta.s","options","model"],[1,"flex-grow-1","h-100","w-100","mt-3","mb-0",3,"onInit","keydown.control.s","keydown.meta.s","options","originalModel","modifiedModel"],["wrap","off","autocomplete","off","autocorrect","off","autocapitalize","off","spellcheck","false",1,"hb-plain-text-editor","align-self-end","h-100","w-100","my-3",3,"ngModelChange","ngModel"]],template:function(t,i){t&1&&(r(0,"div",0)(1,"div",1)(2,"div",2)(3,"h3",3),u(4),l(5,"translate"),a()(),r(6,"div",4),v(7,qe,4,7,"button",5),v(8,Fe,4,6,"button",6),r(9,"button",7),l(10,"translate"),l(11,"translate"),g("click",function(){return i.onSave()}),v(12,Je,1,0,"i",8),v(13,Le,1,0,"i",9),a(),r(14,"button",10),l(15,"translate"),g("click",function(){return i.openSupport()}),m(16,"i",11),a()()(),v(17,ze,1,2,"ngx-monaco-editor",12),v(18,Ke,1,3,"ngx-monaco-diff-editor",13),v(19,Ue,2,1,"textarea",14),a()),t&2&&(s(4),k(d(5,12,"menu.config_json_editor")),s(3),w(i.originalConfig?7:-1),s(),w(i.originalConfig?-1:8),s(),y("disabled",i.saveInProgress)("ngbTooltip",d(10,14,"form.button_save")),_("aria-label",d(11,16,"form.button_save")),s(3),w(i.saveInProgress?-1:12),s(),w(i.saveInProgress?13:-1),s(),_("aria-label",d(15,18,"support.title")),s(3),w(!i.isMobile&&!i.originalConfig?17:-1),s(),w(!i.isMobile&&i.originalConfig?18:-1),s(),w(i.isMobile?19:-1))},dependencies:[P,ge,ue,me,le,de,ce,V],encapsulation:2})}return o})();export{Dt as ConfigEditorComponent};
|
package/public/chunk-P2X74Q5E.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e as ft,n as gt}from"./chunk-K7QEGT3E.js";import{Gb as M,Hb as E,Ob as l,Pb as h,Qb as p,Rb as F,Vb as Y,Wa as ht,Wb as K,Xa as q,_b as Q,a as u,ab as r,ac as mt,b as T,bc as j,db as dt,dc as c,e as It,ga as C,gb as y,ha as lt,ja as ct,ka as w,kd as J,la as _,ma as ut,mb as G,n as g,nb as pt,nc as A,pc as m,qc as f,ra as V,sa as z,sb as S,sc as b,ua as N,va as Z,vb as U,za as O}from"./chunk-V7SOQAC5.js";var Tt=It((De,Ut)=>{Ut.exports={name:"homebridge-config-ui-x",displayName:"Homebridge UI",version:"5.2.1-beta.8",description:"A web based management, configuration and control platform for Homebridge.",author:"oznu <dev@oz.nu>",license:"MIT",funding:[{type:"github",url:"https://github.com/sponsors/oznu"},{type:"paypal",url:"https://paypal.me/oznu"}],repository:{type:"git",url:"git+https://github.com/homebridge/homebridge-config-ui-x.git"},bugs:{url:"https://github.com/homebridge/homebridge-config-ui-x/issues"},keywords:["homebridge-plugin","ui","gui","web","homebridge","homebridge-config-ui-x","ui-x","config-ui-x","homebridge-x","homebridge server","homebridge ui","homebridge-ui","homebridge gui","homebridge-gui","web interface","config ui","management","config editor","linux","macOS","osx","windows","raspberry pi","accessory control","smart home","hb-service"],main:"./dist/index.js",bin:{"hb-service":"dist/bin/hb-service.js"},engines:{node:"^20.19.0 || ^22.12.0 || ^24.0.0",homebridge:"^1.8.0 || ^2.0.0-beta.0"},scripts:{build:"npm run build:server && npm run build:ui","build:server":"rimraf dist && tsc -p tsconfig.build.json","build:ui":"npm run build --prefix ui",check:"npm run check:server && npm run check:ui","check:server":"npm install && npm outdated","check:ui":"npm install --prefix ui && npm outdated --prefix ui","lang-sync":"ts-node scripts/lang-sync.ts",lint:"eslint . --max-warnings=0","lint:fix":"npm run lint -- --fix",prepublishOnly:"npm i --package-lock-only && npm run lint && npm run build",start:"ts-node -r tsconfig-paths/register src/main.ts",test:"vitest run","test-coverage":"npm run test -- --coverage","upgrade-install":"./scripts/upgrade-install.sh",watch:'concurrently "npm run watch:ui" "npm run watch:server"',"watch:server":"nodemon","watch:ui":"npm run start --prefix ui"},dependencies:{"@fastify/helmet":"13.0.1","@fastify/multipart":"9.0.3","@fastify/static":"8.2.0","@homebridge/hap-client":"3.1.0","@homebridge/node-pty-prebuilt-multiarch":"0.14.1-beta.1","@nestjs/axios":"4.0.1","@nestjs/common":"11.1.5","@nestjs/core":"11.1.5","@nestjs/jwt":"11.0.0","@nestjs/passport":"11.0.5","@nestjs/platform-fastify":"11.1.5","@nestjs/platform-socket.io":"11.1.5","@nestjs/swagger":"11.2.0","@nestjs/websockets":"11.1.5",axios:"1.10.0","bash-color":"0.0.4","class-transformer":"0.5.1","class-validator":"0.14.2",commander:"14.0.0",dayjs:"1.11.13",fastify:"5.4.0","fs-extra":"11.3.0",jsonwebtoken:"9.0.2",lodash:"4.17.21","node-cache":"5.1.2","node-schedule":"2.1.1",ora:"8.2.0",otplib:"12.0.1","p-limit":"6.2.0",passport:"0.7.0","passport-jwt":"4.0.1","reflect-metadata":"0.2.2",rxjs:"7.8.2",semver:"7.7.2",systeminformation:"5.27.7",tail:"2.2.6",tar:"7.4.3","tcp-port-used":"1.0.2",unzipper:"0.12.3"},devDependencies:{"@antfu/eslint-config":"^4.17.0","@nestjs/testing":"^11.1.5","@prettier/plugin-xml":"^3.4.2","@types/fs-extra":"^11.0.4","@types/lodash":"^4.17.20","@types/node":"^24.0.15","@types/node-schedule":"^2.1.8","@types/passport-jwt":"^4.0.1","@types/semver":"^7.7.0","@types/tail":"^2.2.3","@types/tcp-port-used":"^1.0.4","@types/unzipper":"^0.10.11","@vitest/coverage-v8":"^3.2.4",concurrently:"^9.2.0","eslint-plugin-format":"^1.0.1","form-data":"^4.0.4",nodemon:"^3.1.10",rimraf:"^6.0.1","ts-loader":"^9.5.2","ts-node":"^10.9.2","tsconfig-paths":"^4.2.0",typescript:"^5.8.3","unplugin-swc":"^1.5.5",vitest:"^3.2.4"},maintainers:[{email:"bwp91@icloud.com",name:"bwp91"},{email:"dev@oz.nu",name:"oznu"},{email:"northern.man1@gmail.com",name:"northernman"},{email:"mail@anderl-bauer.de",name:"supereg"},{email:"khaos.tian@gmail.com",name:"khaost"},{email:"erik.baauw@xs4all.nl",name:"ebaauw"},{email:"donavan.becker@icloud.com",name:"donavanbecker"},{email:"dustin.greif@gmail.com",name:"dustin.greif"},{email:"nfarina@gmail.com",name:"nfarina"}],scarfSettings:{enabled:!1}}});var v=function(i){return i[i.State=0]="State",i[i.Transition=1]="Transition",i[i.Sequence=2]="Sequence",i[i.Group=3]="Group",i[i.Animate=4]="Animate",i[i.Keyframes=5]="Keyframes",i[i.Style=6]="Style",i[i.Trigger=7]="Trigger",i[i.Reference=8]="Reference",i[i.AnimateChild=9]="AnimateChild",i[i.AnimateRef=10]="AnimateRef",i[i.Query=11]="Query",i[i.Stagger=12]="Stagger",i}(v||{}),xt="*";function tt(i,s){return{type:v.Trigger,name:i,definitions:s,options:{}}}function P(i,s=null){return{type:v.Animate,styles:s,timings:i}}function Yt(i,s=null){return{type:v.Sequence,steps:i,options:s}}function R(i){return{type:v.Style,styles:i,offset:null}}function H(i,s,t){return{type:v.State,name:i,styles:s,options:t}}function B(i,s,t=null){return{type:v.Transition,expr:i,animation:s,options:t}}var W=class{_onDoneFns=[];_onStartFns=[];_onDestroyFns=[];_originalOnDoneFns=[];_originalOnStartFns=[];_started=!1;_destroyed=!1;_finished=!1;_position=0;parentPlayer=null;totalTime;constructor(s=0,t=0){this.totalTime=s+t}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(s=>s()),this._onDoneFns=[])}onStart(s){this._originalOnStartFns.push(s),this._onStartFns.push(s)}onDone(s){this._originalOnDoneFns.push(s),this._onDoneFns.push(s)}onDestroy(s){this._onDestroyFns.push(s)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){queueMicrotask(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(s=>s()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(s=>s()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(s){this._position=this.totalTime?s*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(s){let t=s=="start"?this._onStartFns:this._onDoneFns;t.forEach(e=>e()),t.length=0}},X=class{_onDoneFns=[];_onStartFns=[];_finished=!1;_started=!1;_destroyed=!1;_onDestroyFns=[];parentPlayer=null;totalTime=0;players;constructor(s){this.players=s;let t=0,e=0,n=0,o=this.players.length;o==0?queueMicrotask(()=>this._onFinish()):this.players.forEach(a=>{a.onDone(()=>{++t==o&&this._onFinish()}),a.onDestroy(()=>{++e==o&&this._onDestroy()}),a.onStart(()=>{++n==o&&this._onStart()})}),this.totalTime=this.players.reduce((a,d)=>Math.max(a,d.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(s=>s()),this._onDoneFns=[])}init(){this.players.forEach(s=>s.init())}onStart(s){this._onStartFns.push(s)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(s=>s()),this._onStartFns=[])}onDone(s){this._onDoneFns.push(s)}onDestroy(s){this._onDestroyFns.push(s)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(s=>s.play())}pause(){this.players.forEach(s=>s.pause())}restart(){this.players.forEach(s=>s.restart())}finish(){this._onFinish(),this.players.forEach(s=>s.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(s=>s.destroy()),this._onDestroyFns.forEach(s=>s()),this._onDestroyFns=[])}reset(){this.players.forEach(s=>s.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(s){let t=s*this.totalTime;this.players.forEach(e=>{let n=e.totalTime?Math.min(1,t/e.totalTime):1;e.setPosition(n)})}getPosition(){let s=this.players.reduce((t,e)=>t===null||e.totalTime>t.totalTime?e:t,null);return s!=null?s.getPosition():0}beforeDestroy(){this.players.forEach(s=>{s.beforeDestroy&&s.beforeDestroy()})}triggerCallback(s){let t=s=="start"?this._onStartFns:this._onDoneFns;t.forEach(e=>e()),t.length=0}},Ot="!";var _t=["toast-component",""];function Et(i,s){if(i&1){let t=Q();h(0,"button",5),j("click",function(){V(t);let n=c();return z(n.remove())}),h(1,"span",6),f(2,"\xD7"),p()()}}function Ft(i,s){if(i&1&&(Y(0),f(1),K()),i&2){let t=c(2);r(),b("[",t.duplicatesCount+1,"]")}}function jt(i,s){if(i&1&&(h(0,"div"),f(1),S(2,Ft,2,1,"ng-container",4),p()),i&2){let t=c();m(t.options.titleClass),E("aria-label",t.title),r(),b(" ",t.title," "),r(),l("ngIf",t.duplicatesCount)}}function At(i,s){if(i&1&&F(0,"div",7),i&2){let t=c();m(t.options.messageClass),l("innerHTML",t.message,q)}}function Rt(i,s){if(i&1&&(h(0,"div",8),f(1),p()),i&2){let t=c();m(t.options.messageClass),E("aria-label",t.message),r(),b(" ",t.message," ")}}function Ht(i,s){if(i&1&&(h(0,"div"),F(1,"div",9),p()),i&2){let t=c();r(),A("width",t.width()+"%")}}function kt(i,s){if(i&1){let t=Q();h(0,"button",5),j("click",function(){V(t);let n=c();return z(n.remove())}),h(1,"span",6),f(2,"\xD7"),p()()}}function Nt(i,s){if(i&1&&(Y(0),f(1),K()),i&2){let t=c(2);r(),b("[",t.duplicatesCount+1,"]")}}function Mt(i,s){if(i&1&&(h(0,"div"),f(1),S(2,Nt,2,1,"ng-container",4),p()),i&2){let t=c();m(t.options.titleClass),E("aria-label",t.title),r(),b(" ",t.title," "),r(),l("ngIf",t.duplicatesCount)}}function Pt(i,s){if(i&1&&F(0,"div",7),i&2){let t=c();m(t.options.messageClass),l("innerHTML",t.message,q)}}function Bt(i,s){if(i&1&&(h(0,"div",8),f(1),p()),i&2){let t=c();m(t.options.messageClass),E("aria-label",t.message),r(),b(" ",t.message," ")}}function $t(i,s){if(i&1&&(h(0,"div"),F(1,"div",9),p()),i&2){let t=c();r(),A("width",t.width()+"%")}}var et=class{_attachedHost;component;viewContainerRef;injector;constructor(s,t){this.component=s,this.injector=t}attach(s,t){return this._attachedHost=s,s.attach(this,t)}detach(){let s=this._attachedHost;if(s)return this._attachedHost=void 0,s.detach()}get isAttached(){return this._attachedHost!=null}setAttachedHost(s){this._attachedHost=s}},it=class{_attachedPortal;_disposeFn;attach(s,t){return this._attachedPortal=s,this.attachComponentPortal(s,t)}detach(){this._attachedPortal&&this._attachedPortal.setAttachedHost(),this._attachedPortal=void 0,this._disposeFn&&(this._disposeFn(),this._disposeFn=void 0)}setDisposeFn(s){this._disposeFn=s}},st=class{_overlayRef;componentInstance;duplicatesCount=0;_afterClosed=new g;_activate=new g;_manualClose=new g;_resetTimeout=new g;_countDuplicate=new g;constructor(s){this._overlayRef=s}manualClose(){this._manualClose.next(),this._manualClose.complete()}manualClosed(){return this._manualClose.asObservable()}timeoutReset(){return this._resetTimeout.asObservable()}countDuplicate(){return this._countDuplicate.asObservable()}close(){this._overlayRef.detach(),this._afterClosed.next(),this._manualClose.next(),this._afterClosed.complete(),this._manualClose.complete(),this._activate.complete(),this._resetTimeout.complete(),this._countDuplicate.complete()}afterClosed(){return this._afterClosed.asObservable()}isInactive(){return this._activate.isStopped}activate(){this._activate.next(),this._activate.complete()}afterActivate(){return this._activate.asObservable()}onDuplicate(s,t){s&&this._resetTimeout.next(),t&&this._countDuplicate.next(++this.duplicatesCount)}},D=class{toastId;config;message;title;toastType;toastRef;_onTap=new g;_onAction=new g;constructor(s,t,e,n,o,a){this.toastId=s,this.config=t,this.message=e,this.title=n,this.toastType=o,this.toastRef=a,this.toastRef.afterClosed().subscribe(()=>{this._onAction.complete(),this._onTap.complete()})}triggerTap(){this._onTap.next(),this.config.tapToDismiss&&this._onTap.complete()}onTap(){return this._onTap.asObservable()}triggerAction(s){this._onAction.next(s)}onAction(){return this._onAction.asObservable()}},vt={maxOpened:0,autoDismiss:!1,newestOnTop:!0,preventDuplicates:!1,countDuplicates:!1,resetTimeoutOnDuplicate:!1,includeTitleDuplicates:!1,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},closeButton:!1,disableTimeOut:!1,timeOut:5e3,extendedTimeOut:1e3,enableHtml:!1,progressBar:!1,toastClass:"ngx-toastr",positionClass:"toast-top-right",titleClass:"toast-title",messageClass:"toast-message",easing:"ease-in",easeTime:300,tapToDismiss:!0,onActivateTick:!1,progressAnimation:"decreasing"},yt=new ct("ToastConfig"),nt=class extends it{_hostDomElement;_componentFactoryResolver;_appRef;constructor(s,t,e){super(),this._hostDomElement=s,this._componentFactoryResolver=t,this._appRef=e}attachComponentPortal(s,t){let e=this._componentFactoryResolver.resolveComponentFactory(s.component),n;return n=e.create(s.injector),this._appRef.attachView(n.hostView),this.setDisposeFn(()=>{this._appRef.detachView(n.hostView),n.destroy()}),t?this._hostDomElement.insertBefore(this._getComponentRootNode(n),this._hostDomElement.firstChild):this._hostDomElement.appendChild(this._getComponentRootNode(n)),n}_getComponentRootNode(s){return s.hostView.rootNodes[0]}},Lt=(()=>{class i{_document=_(Z);_containerElement;ngOnDestroy(){this._containerElement&&this._containerElement.parentNode&&this._containerElement.parentNode.removeChild(this._containerElement)}getContainerElement(){return this._containerElement||this._createContainer(),this._containerElement}_createContainer(){let t=this._document.createElement("div");t.classList.add("overlay-container"),t.setAttribute("aria-live","polite"),this._document.body.appendChild(t),this._containerElement=t}static \u0275fac=function(e){return new(e||i)};static \u0275prov=C({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),ot=class{_portalHost;constructor(s){this._portalHost=s}attach(s,t=!0){return this._portalHost.attach(s,t)}detach(){return this._portalHost.detach()}},Vt=(()=>{class i{_overlayContainer=_(Lt);_componentFactoryResolver=_(dt);_appRef=_(M);_document=_(Z);_paneElements=new Map;create(t,e){return this._createOverlayRef(this.getPaneElement(t,e))}getPaneElement(t="",e){return this._paneElements.get(e)||this._paneElements.set(e,{}),this._paneElements.get(e)[t]||(this._paneElements.get(e)[t]=this._createPaneElement(t,e)),this._paneElements.get(e)[t]}_createPaneElement(t,e){let n=this._document.createElement("div");return n.id="toast-container",n.classList.add(t),n.classList.add("toast-container"),e?e.getContainerElement().appendChild(n):this._overlayContainer.getContainerElement().appendChild(n),n}_createPortalHost(t){return new nt(t,this._componentFactoryResolver,this._appRef)}_createOverlayRef(t){return new ot(this._createPortalHost(t))}static \u0275fac=function(e){return new(e||i)};static \u0275prov=C({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),bt=(()=>{class i{overlay;_injector;sanitizer;ngZone;toastrConfig;currentlyActive=0;toasts=[];overlayContainer;previousToastMessage;index=0;constructor(t,e,n,o,a){this.overlay=e,this._injector=n,this.sanitizer=o,this.ngZone=a,this.toastrConfig=u(u({},t.default),t.config),t.config.iconClasses&&(this.toastrConfig.iconClasses=u(u({},t.default.iconClasses),t.config.iconClasses))}show(t,e,n={},o=""){return this._preBuildNotification(o,t,e,this.applyConfig(n))}success(t,e,n={}){let o=this.toastrConfig.iconClasses.success||"";return this._preBuildNotification(o,t,e,this.applyConfig(n))}error(t,e,n={}){let o=this.toastrConfig.iconClasses.error||"";return this._preBuildNotification(o,t,e,this.applyConfig(n))}info(t,e,n={}){let o=this.toastrConfig.iconClasses.info||"";return this._preBuildNotification(o,t,e,this.applyConfig(n))}warning(t,e,n={}){let o=this.toastrConfig.iconClasses.warning||"";return this._preBuildNotification(o,t,e,this.applyConfig(n))}clear(t){for(let e of this.toasts)if(t!==void 0){if(e.toastId===t){e.toastRef.manualClose();return}}else e.toastRef.manualClose()}remove(t){let e=this._findToast(t);if(!e||(e.activeToast.toastRef.close(),this.toasts.splice(e.index,1),this.currentlyActive=this.currentlyActive-1,!this.toastrConfig.maxOpened||!this.toasts.length))return!1;if(this.currentlyActive<this.toastrConfig.maxOpened&&this.toasts[this.currentlyActive]){let n=this.toasts[this.currentlyActive].toastRef;n.isInactive()||(this.currentlyActive=this.currentlyActive+1,n.activate())}return!0}findDuplicate(t="",e="",n,o){let{includeTitleDuplicates:a}=this.toastrConfig;for(let d of this.toasts){let k=a&&d.title===t;if((!a||k)&&d.message===e)return d.toastRef.onDuplicate(n,o),d}return null}applyConfig(t={}){return u(u({},this.toastrConfig),t)}_findToast(t){for(let e=0;e<this.toasts.length;e++)if(this.toasts[e].toastId===t)return{index:e,activeToast:this.toasts[e]};return null}_preBuildNotification(t,e,n,o){return o.onActivateTick?this.ngZone.run(()=>this._buildNotification(t,e,n,o)):this._buildNotification(t,e,n,o)}_buildNotification(t,e,n,o){if(!o.toastComponent)throw new Error("toastComponent required");let a=this.findDuplicate(n,e,this.toastrConfig.resetTimeoutOnDuplicate&&o.timeOut>0,this.toastrConfig.countDuplicates);if((this.toastrConfig.includeTitleDuplicates&&n||e)&&this.toastrConfig.preventDuplicates&&a!==null)return a;this.previousToastMessage=e;let d=!1;this.toastrConfig.maxOpened&&this.currentlyActive>=this.toastrConfig.maxOpened&&(d=!0,this.toastrConfig.autoDismiss&&this.clear(this.toasts[0].toastId));let k=this.overlay.create(o.positionClass,this.overlayContainer);this.index=this.index+1;let rt=e;e&&o.enableHtml&&(rt=this.sanitizer.sanitize(ht.HTML,e));let x=new st(k),$=new D(this.index,o,rt,n,t,x),Ct=[{provide:D,useValue:$}],wt=N.create({providers:Ct,parent:this._injector}),Dt=new et(o.toastComponent,wt),at=k.attach(Dt,o.newestOnTop);x.componentInstance=at.instance;let L={toastId:this.index,title:n||"",message:e||"",toastRef:x,onShown:x.afterActivate(),onHidden:x.afterClosed(),onTap:$.onTap(),onAction:$.onAction(),portal:at};return d||(this.currentlyActive=this.currentlyActive+1,setTimeout(()=>{L.toastRef.activate()})),this.toasts.push(L),L}static \u0275fac=function(e){return new(e||i)(w(yt),w(Vt),w(N),w(gt),w(U))};static \u0275prov=C({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),zt=(()=>{class i{toastrService;toastPackage;ngZone;message;title;options;duplicatesCount;originalTimeout;width=O(-1);toastClasses="";state;get _state(){return this.state()}get displayStyle(){if(this.state().value==="inactive")return"none"}timeout;intervalId;hideTime;sub;sub1;sub2;sub3;constructor(t,e,n){this.toastrService=t,this.toastPackage=e,this.ngZone=n,this.message=e.message,this.title=e.title,this.options=e.config,this.originalTimeout=e.config.timeOut,this.toastClasses=`${e.toastType} ${e.config.toastClass}`,this.sub=e.toastRef.afterActivate().subscribe(()=>{this.activateToast()}),this.sub1=e.toastRef.manualClosed().subscribe(()=>{this.remove()}),this.sub2=e.toastRef.timeoutReset().subscribe(()=>{this.resetTimeout()}),this.sub3=e.toastRef.countDuplicate().subscribe(o=>{this.duplicatesCount=o}),this.state=O({value:"inactive",params:{easeTime:this.toastPackage.config.easeTime,easing:"ease-in"}})}ngOnDestroy(){this.sub.unsubscribe(),this.sub1.unsubscribe(),this.sub2.unsubscribe(),this.sub3.unsubscribe(),clearInterval(this.intervalId),clearTimeout(this.timeout)}activateToast(){this.state.update(t=>T(u({},t),{value:"active"})),!(this.options.disableTimeOut===!0||this.options.disableTimeOut==="timeOut")&&this.options.timeOut&&(this.outsideTimeout(()=>this.remove(),this.options.timeOut),this.hideTime=new Date().getTime()+this.options.timeOut,this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10))}updateProgress(){if(this.width()===0||this.width()===100||!this.options.timeOut)return;let t=new Date().getTime(),e=this.hideTime-t;this.width.set(e/this.options.timeOut*100),this.options.progressAnimation==="increasing"&&this.width.update(n=>100-n),this.width()<=0&&this.width.set(0),this.width()>=100&&this.width.set(100)}resetTimeout(){clearTimeout(this.timeout),clearInterval(this.intervalId),this.state.update(t=>T(u({},t),{value:"active"})),this.outsideTimeout(()=>this.remove(),this.originalTimeout),this.options.timeOut=this.originalTimeout,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width.set(-1),this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10)}remove(){this.state().value!=="removed"&&(clearTimeout(this.timeout),this.state.update(t=>T(u({},t),{value:"removed"})),this.outsideTimeout(()=>this.toastrService.remove(this.toastPackage.toastId),+this.toastPackage.config.easeTime))}tapToast(){this.state().value!=="removed"&&(this.toastPackage.triggerTap(),this.options.tapToDismiss&&this.remove())}stickAround(){this.state().value!=="removed"&&this.options.disableTimeOut!=="extendedTimeOut"&&(clearTimeout(this.timeout),this.options.timeOut=0,this.hideTime=0,clearInterval(this.intervalId),this.width.set(0))}delayedHideToast(){this.options.disableTimeOut===!0||this.options.disableTimeOut==="extendedTimeOut"||this.options.extendedTimeOut===0||this.state().value==="removed"||(this.outsideTimeout(()=>this.remove(),this.options.extendedTimeOut),this.options.timeOut=this.options.extendedTimeOut,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width.set(-1),this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10))}outsideTimeout(t,e){this.ngZone?this.ngZone.runOutsideAngular(()=>this.timeout=setTimeout(()=>this.runInsideAngular(t),e)):this.timeout=setTimeout(()=>t(),e)}outsideInterval(t,e){this.ngZone?this.ngZone.runOutsideAngular(()=>this.intervalId=setInterval(()=>this.runInsideAngular(t),e)):this.intervalId=setInterval(()=>t(),e)}runInsideAngular(t){this.ngZone?this.ngZone.run(()=>t()):t()}static \u0275fac=function(e){return new(e||i)(y(bt),y(D),y(U))};static \u0275cmp=G({type:i,selectors:[["","toast-component",""]],hostVars:5,hostBindings:function(e,n){e&1&&j("click",function(){return n.tapToast()})("mouseenter",function(){return n.stickAround()})("mouseleave",function(){return n.delayedHideToast()}),e&2&&(mt("@flyInOut",n._state),m(n.toastClasses),A("display",n.displayStyle))},attrs:_t,decls:5,vars:5,consts:[["type","button","class","toast-close-button","aria-label","Close",3,"click",4,"ngIf"],[3,"class",4,"ngIf"],["role","alert",3,"class","innerHTML",4,"ngIf"],["role","alert",3,"class",4,"ngIf"],[4,"ngIf"],["type","button","aria-label","Close",1,"toast-close-button",3,"click"],["aria-hidden","true"],["role","alert",3,"innerHTML"],["role","alert"],[1,"toast-progress"]],template:function(e,n){e&1&&S(0,Et,3,0,"button",0)(1,jt,3,5,"div",1)(2,At,1,3,"div",2)(3,Rt,2,4,"div",3)(4,Ht,2,2,"div",4),e&2&&(l("ngIf",n.options.closeButton),r(),l("ngIf",n.title),r(),l("ngIf",n.message&&n.options.enableHtml),r(),l("ngIf",n.message&&!n.options.enableHtml),r(),l("ngIf",n.options.progressBar))},dependencies:[J],encapsulation:2,data:{animation:[tt("flyInOut",[H("inactive",R({opacity:0})),H("active",R({opacity:1})),H("removed",R({opacity:0})),B("inactive => active",P("{{ easeTime }}ms {{ easing }}")),B("active => removed",P("{{ easeTime }}ms {{ easing }}"))])]},changeDetection:0})}return i})(),Zt=T(u({},vt),{toastComponent:zt}),qt=(i={})=>ut([{provide:yt,useValue:{default:Zt,config:i}}]),be=(()=>{class i{static forRoot(t={}){return{ngModule:i,providers:[qt(t)]}}static \u0275fac=function(e){return new(e||i)};static \u0275mod=pt({type:i});static \u0275inj=lt({})}return i})();var Gt=(()=>{class i{toastrService;toastPackage;appRef;message;title;options;duplicatesCount;originalTimeout;width=O(-1);toastClasses="";get displayStyle(){return this.state()==="inactive"?"none":null}state=O("inactive");timeout;intervalId;hideTime;sub;sub1;sub2;sub3;constructor(t,e,n){this.toastrService=t,this.toastPackage=e,this.appRef=n,this.message=e.message,this.title=e.title,this.options=e.config,this.originalTimeout=e.config.timeOut,this.toastClasses=`${e.toastType} ${e.config.toastClass}`,this.sub=e.toastRef.afterActivate().subscribe(()=>{this.activateToast()}),this.sub1=e.toastRef.manualClosed().subscribe(()=>{this.remove()}),this.sub2=e.toastRef.timeoutReset().subscribe(()=>{this.resetTimeout()}),this.sub3=e.toastRef.countDuplicate().subscribe(o=>{this.duplicatesCount=o})}ngOnDestroy(){this.sub.unsubscribe(),this.sub1.unsubscribe(),this.sub2.unsubscribe(),this.sub3.unsubscribe(),clearInterval(this.intervalId),clearTimeout(this.timeout)}activateToast(){this.state.set("active"),!(this.options.disableTimeOut===!0||this.options.disableTimeOut==="timeOut")&&this.options.timeOut&&(this.timeout=setTimeout(()=>{this.remove()},this.options.timeOut),this.hideTime=new Date().getTime()+this.options.timeOut,this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10))),this.options.onActivateTick&&this.appRef.tick()}updateProgress(){if(this.width()===0||this.width()===100||!this.options.timeOut)return;let t=new Date().getTime(),e=this.hideTime-t;this.width.set(e/this.options.timeOut*100),this.options.progressAnimation==="increasing"&&this.width.update(n=>100-n),this.width()<=0&&this.width.set(0),this.width()>=100&&this.width.set(100)}resetTimeout(){clearTimeout(this.timeout),clearInterval(this.intervalId),this.state.set("active"),this.options.timeOut=this.originalTimeout,this.timeout=setTimeout(()=>this.remove(),this.originalTimeout),this.hideTime=new Date().getTime()+(this.originalTimeout||0),this.width.set(-1),this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10))}remove(){this.state()!=="removed"&&(clearTimeout(this.timeout),this.state.set("removed"),this.timeout=setTimeout(()=>this.toastrService.remove(this.toastPackage.toastId)))}tapToast(){this.state()!=="removed"&&(this.toastPackage.triggerTap(),this.options.tapToDismiss&&this.remove())}stickAround(){this.state()!=="removed"&&(clearTimeout(this.timeout),this.options.timeOut=0,this.hideTime=0,clearInterval(this.intervalId),this.width.set(0))}delayedHideToast(){this.options.disableTimeOut===!0||this.options.disableTimeOut==="extendedTimeOut"||this.options.extendedTimeOut===0||this.state()==="removed"||(this.timeout=setTimeout(()=>this.remove(),this.options.extendedTimeOut),this.options.timeOut=this.options.extendedTimeOut,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width.set(-1),this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10)))}static \u0275fac=function(e){return new(e||i)(y(bt),y(D),y(M))};static \u0275cmp=G({type:i,selectors:[["","toast-component",""]],hostVars:4,hostBindings:function(e,n){e&1&&j("click",function(){return n.tapToast()})("mouseenter",function(){return n.stickAround()})("mouseleave",function(){return n.delayedHideToast()}),e&2&&(m(n.toastClasses),A("display",n.displayStyle))},attrs:_t,decls:5,vars:5,consts:[["type","button","class","toast-close-button","aria-label","Close",3,"click",4,"ngIf"],[3,"class",4,"ngIf"],["role","alert",3,"class","innerHTML",4,"ngIf"],["role","alert",3,"class",4,"ngIf"],[4,"ngIf"],["type","button","aria-label","Close",1,"toast-close-button",3,"click"],["aria-hidden","true"],["role","alert",3,"innerHTML"],["role","alert"],[1,"toast-progress"]],template:function(e,n){e&1&&S(0,kt,3,0,"button",0)(1,Mt,3,5,"div",1)(2,Pt,1,3,"div",2)(3,Bt,2,4,"div",3)(4,$t,2,2,"div",4),e&2&&(l("ngIf",n.options.closeButton),r(),l("ngIf",n.title),r(),l("ngIf",n.message&&n.options.enableHtml),r(),l("ngIf",n.message&&!n.options.enableHtml),r(),l("ngIf",n.options.progressBar))},dependencies:[J],encapsulation:2,changeDetection:0})}return i})(),Te=T(u({},vt),{toastComponent:Gt});var I={serverTarget:Tt().version,production:!0,socket:"",api:{base:"/api",socket:`${window.location.protocol==="http:"?"ws://":"wss://"}${window.location.host}`,origin:window.location.origin},jwt:{tokenKey:"access_token",allowedDomains:[document.location.host],disallowedRoutes:[`${window.location.protocol}//${document.location.host}/api/auth/login`]},apiHttpOptions:{},owm:{appid:"fec67b55f7f74deaa28df89ba6a60821"}};var Fe=(()=>{class i{$http=_(ft);get(t,e){return this.$http.get(`${I.api.base}${t}`,e)}post(t,e,n){return this.$http.post(`${I.api.base}${t}`,e,n)}put(t,e,n){return this.$http.put(`${I.api.base}${t}`,e,n)}patch(t,e,n){return this.$http.patch(`${I.api.base}${t}`,e,n)}delete(t,e){return this.$http.delete(`${I.api.base}${t}`,e)}static \u0275fac=function(e){return new(e||i)};static \u0275prov=C({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();export{v as a,xt as b,tt as c,P as d,Yt as e,R as f,B as g,W as h,X as i,Ot as j,bt as k,be as l,I as m,Fe as n};
|