@duplicati/ngclient 0.0.210 → 0.0.211
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/{chunk-DJJ3VITJ.js → chunk-2TGB7FK7.js} +1 -1
- package/{chunk-AQWULDGL.js → chunk-36J3WTHV.js} +1 -1
- package/{chunk-JIJGVYNW.js → chunk-3DFXRSFL.js} +1 -1
- package/{chunk-V43VAZTT.js → chunk-5MOLXRIQ.js} +1 -1
- package/{chunk-TDEVA3XM.js → chunk-5N2VOOTZ.js} +1 -1
- package/{chunk-LSIAE7ZL.js → chunk-64W3VKAP.js} +1 -1
- package/{chunk-NYX7YT7G.js → chunk-6FBNKISB.js} +1 -1
- package/{chunk-KXBEW3N2.js → chunk-7HXPIZN6.js} +1 -1
- package/{chunk-PRBKV7LX.js → chunk-A7BE7GAK.js} +1 -1
- package/{chunk-FG4GOBKA.js → chunk-ANLSBAWJ.js} +1 -1
- package/{chunk-IGEX5B3E.js → chunk-AXBVBB2B.js} +1 -1
- package/{chunk-PUBEHQ4W.js → chunk-BKEVAAWN.js} +1 -1
- package/{chunk-M3JOG5RD.js → chunk-CCUGG5E4.js} +1 -1
- package/{chunk-GVXQIOKE.js → chunk-COT66FJB.js} +1 -1
- package/chunk-CVTB53TL.js +1 -0
- package/{chunk-I2BAH6NC.js → chunk-DGPSGSEP.js} +1 -1
- package/{chunk-76USHURS.js → chunk-DV7RWC4G.js} +1 -1
- package/{chunk-I7U3XXJD.js → chunk-EGJL4XXZ.js} +1 -1
- package/chunk-FCVVFGU2.js +1 -0
- package/{chunk-DJAQY2GM.js → chunk-FXZ3K2FU.js} +1 -1
- package/{chunk-LP2DMTA7.js → chunk-GCFBX62M.js} +1 -1
- package/{chunk-XHUQYWAM.js → chunk-GSDHTV3P.js} +1 -1
- package/{chunk-LTVI3WYF.js → chunk-HDJL2F2F.js} +1 -1
- package/{chunk-DWFQAX4H.js → chunk-HUJGWHH6.js} +1 -1
- package/chunk-I7HI454U.js +1 -0
- package/chunk-IHB6NRMQ.js +1 -0
- package/chunk-IV3M3Q6B.js +1 -0
- package/{chunk-YE7IXREK.js → chunk-JTO22TJU.js} +1 -1
- package/{chunk-M7QNSQM2.js → chunk-KAZ3YMHR.js} +1 -1
- package/chunk-KEHA3UWS.js +1 -0
- package/{chunk-ZVTMKBV5.js → chunk-KQZRDX7C.js} +1 -1
- package/{chunk-UQLHXE6V.js → chunk-LIDIFLHF.js} +1 -1
- package/{chunk-IUJGDYFS.js → chunk-MI32HHLT.js} +1 -1
- package/{chunk-CKVJ36E5.js → chunk-MNK3XRJD.js} +1 -1
- package/{chunk-DMMZWQEZ.js → chunk-N35VE3MO.js} +1 -1
- package/{chunk-3ULPLOSF.js → chunk-NQIZGFSO.js} +1 -1
- package/{chunk-T3YMO3FB.js → chunk-PSRISEFO.js} +1 -1
- package/{chunk-BDC5JQVQ.js → chunk-SA6PEMWL.js} +1 -1
- package/{chunk-INI4AJEU.js → chunk-SP3KG7FO.js} +1 -1
- package/{chunk-VOJGEOOO.js → chunk-SSUCTZ3H.js} +1 -1
- package/{chunk-FKYRYVJD.js → chunk-UY2WEUKC.js} +1 -1
- package/{chunk-YF6ULZXZ.js → chunk-WBTDGQME.js} +1 -1
- package/{chunk-2FD4SR65.js → chunk-WSFAOFM3.js} +1 -1
- package/chunk-XE42CXGY.js +1 -0
- package/{chunk-23BFPX3M.js → chunk-XRSDTFDU.js} +1 -1
- package/{chunk-EVMEYZB7.js → chunk-YIKPWYEP.js} +1 -1
- package/{chunk-JFUWTLM7.js → chunk-YIM56S4M.js} +1 -1
- package/{chunk-S2F2BNOG.js → chunk-Z772CHAB.js} +1 -1
- package/{chunk-KNB7LCAL.js → chunk-ZVWTSTR6.js} +1 -1
- package/{chunk-FZQEPDIF.js → chunk-ZY64T3CX.js} +1 -1
- package/index.html +1 -1
- package/main-4RMOPKNF.js +1 -0
- package/package.json +1 -1
- package/chunk-562BU33Q.js +0 -1
- package/chunk-DKA7IP53.js +0 -1
- package/chunk-F3TYSZ53.js +0 -1
- package/chunk-I6Y22V2Q.js +0 -1
- package/chunk-MYHC4Y56.js +0 -1
- package/chunk-VUABEJRL.js +0 -1
- package/chunk-ZOOFKMMI.js +0 -1
- package/main-IO5OKXBW.js +0 -1
package/main-4RMOPKNF.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as Ie,c as ke}from"./chunk-LGILJ5LY.js";import{a as we}from"./chunk-Z772CHAB.js";import{a as Ee}from"./chunk-3ZCJK7PY.js";import{b as I}from"./chunk-GSDHTV3P.js";import"./chunk-WBTDGQME.js";import{a as Me}from"./chunk-SLS3DCJP.js";import{b as Te}from"./chunk-SUY5AQLW.js";import{a as V}from"./chunk-6Q6SSTBK.js";import{a as Se}from"./chunk-I4XRVBRQ.js";import"./chunk-RFB5A3B7.js";import"./chunk-HUJGWHH6.js";import"./chunk-HDJL2F2F.js";import{a as H}from"./chunk-BEXYTIOL.js";import{a as h,b as ye,c as v,d as Re,e as E}from"./chunk-I7HI454U.js";import{u as be,x as Ce}from"./chunk-YCLTQEU6.js";import{a as ge,e as ve}from"./chunk-2LSZ2I43.js";import{c as le,d as me,g as de,h as ue,i as he,j as fe}from"./chunk-BMWZYMK6.js";import{a as ne}from"./chunk-7FYL7MVA.js";import{a as re,b as se,c as ie,e as ae,f as pe,g as ce}from"./chunk-NBTTYKXH.js";import{ha as te,ma as oe}from"./chunk-OQ6BKP5N.js";import"./chunk-VAQ435AR.js";import{Db as Y,E as J,K as T,Kc as Z,Lc as ee,M as K,U as C,X as _,Z as s,eb as Q,f as F,g as W,ga as q,ha as z,l as $,m as G,oa as d,p as w,qa as X,y as P,z as B}from"./chunk-ERITO7WM.js";import"./chunk-7CGTOI24.js";var k=class e{#e=s(h);#d=s(v);ngOnInit(){ye(),this.#d.fetchConfig(),this.#e.clearAllNotCurrentVersion()}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=Q({type:e,selectors:[["app-root"]],decls:1,vars:0,template:function(t,n){t&1&&Y(0,"router-outlet")},dependencies:[le],encapsulation:2})};var Ae={production:!0,baseUrl:"/api",machineServerUrl:"${WS_URL}",defaultTimeout:3e4};var f=new _("ENVIRONMENT");var A=class e{#e=s(ve);isLoaded=d(!1);webmodules=d(null);preload(o=!1){let t=this.#e.getApiV1Webmodules().pipe(K(n=>this.webmodules.set(n)),J(()=>this.isLoaded.set(!0)));if(o)return t;t.subscribe()}static \u0275fac=function(t){return new(t||e)};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})};var Ue=()=>{let e=s(E);return e.token()?!0:e.checkProxyAuthed().pipe(T(o=>o?$(!0):e.refreshToken().pipe(w(()=>!0))))},je=()=>{let e=s(v),o=s(I),t=s(q),n=e.relayIsEnabled()?"longpoll":"websocket",i=[t.get(H).preload(!0),t.get(H).preloadFilterGroups(!0),t.get(A).preload(!0)];return e.configLoaded===null?P(i).pipe(w(()=>n)):e.configLoaded?.pipe(T(()=>P(i)))},Fe=()=>!0,Ne={path:"connect/:typeParam",loadComponent:()=>import("./chunk-N35VE3MO.js")},We=()=>{let e=s(h);return!e.getItem("locale")&&navigator.language&&e.setItem("locale",navigator.language),!0},Oe=[{path:"",children:[{path:"login",canActivate:[],loadComponent:()=>import("./chunk-KQZRDX7C.js")},{path:"logout",loadComponent:()=>import("./chunk-36J3WTHV.js")},{path:"",canActivate:[Ue],children:[{path:"",canActivate:[je,Fe,We],children:[{path:"welcome",loadComponent:()=>import("./chunk-VTFVTC7O.js"),children:[{path:"",redirectTo:"select",pathMatch:"full"},{path:"select",loadComponent:()=>import("./chunk-DV7RWC4G.js")},Ne]},{path:"",loadComponent:()=>import("./chunk-LIDIFLHF.js"),children:[{path:"",loadComponent:()=>import("./chunk-2TGB7FK7.js")},Ne,{path:"destinations",loadComponent:()=>import("./chunk-SSUCTZ3H.js")},{path:"add-backup",loadComponent:()=>import("./chunk-ZY64T3CX.js")},{path:"backup/:id/export",loadComponent:()=>import("./chunk-WSFAOFM3.js")},{path:"backup/import",loadComponent:()=>import("./chunk-64W3VKAP.js")},{path:"backup-draft/:id",loadComponent:()=>import("./chunk-SP3KG7FO.js"),loadChildren:()=>import("./chunk-FCVVFGU2.js")},{path:"backup/:id",loadComponent:()=>import("./chunk-SP3KG7FO.js"),loadChildren:()=>import("./chunk-FCVVFGU2.js")},{path:"backup/:id/log",loadComponent:()=>import("./chunk-5MOLXRIQ.js")},{path:"backup/:id/database",loadComponent:()=>import("./chunk-KAZ3YMHR.js")},{path:"backup/:id/commandline",loadComponent:()=>import("./chunk-SA6PEMWL.js")},{path:"backup/:id/commandline/:runId",loadComponent:()=>import("./chunk-7HXPIZN6.js")},{path:"backup/:id/delete",loadComponent:()=>import("./chunk-DGPSGSEP.js")},{path:"restore",children:[{path:"",loadComponent:()=>import("./chunk-FXZ3K2FU.js")},{path:"from-config",loadComponent:()=>import("./chunk-C6RVYQ4M.js")}]},{path:"restore-from-files",loadComponent:()=>import("./chunk-ANLSBAWJ.js"),loadChildren:()=>import("./chunk-IV3M3Q6B.js")},{path:"restore-draft/:id",loadComponent:()=>import("./chunk-ANLSBAWJ.js"),loadChildren:()=>import("./chunk-IV3M3Q6B.js")},{path:"restore/:id",loadComponent:()=>import("./chunk-ANLSBAWJ.js"),loadChildren:()=>import("./chunk-IV3M3Q6B.js")},{path:"status",loadComponent:()=>import("./chunk-AXBVBB2B.js")},{path:"settings",loadComponent:()=>import("./chunk-XRSDTFDU.js")},{path:"about",loadComponent:()=>import("./chunk-CCUGG5E4.js"),children:[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",loadComponent:()=>import("./chunk-3DFXRSFL.js")},{path:"changelog",loadComponent:()=>import("./chunk-IZCDGVXJ.js")},{path:"libraries",loadComponent:()=>import("./chunk-3KMV4PTJ.js")},{path:"system-info",loadComponent:()=>import("./chunk-U3SGWHNI.js")},{path:"server-settings",loadComponent:()=>import("./chunk-YIKPWYEP.js")},{path:"logs",loadChildren:()=>import("./chunk-NDLPNBGE.js")},{path:"crashlogs",loadComponent:()=>import("./chunk-BKQA64HZ.js")}]}]}]}]}]}];var xe=(e,o)=>{let t=s(E),n=s(me),i=s(h),p=s(f),m=i.getItem("locale"),a=s(Ce),g=Ie(m),r=ge.BASE||"",c=e.url===`${r}/api/v1/auth/login`,u=e.url===`${r}/api/v1/auth/logout`,S=e.url===`${r}/api/v1/auth/refresh`,y=e.url===`${r}/api/v1/progressstate`,x=e.url===`${r}/api/v1/remoteoperation/test`,M=e.url===`${r}/api/v1/filesystem/validate`,De=e.url.startsWith(`${r}/api/v2/`),L=t.token(),U=e,j=e.headers.has("custom-proxy-check")||L===Re;if(L&&e.url.startsWith(r+p.baseUrl)&&!j){let l=e.headers.set("Authorization",`Bearer ${L}`);m&&m!=="en-US"&&(l=l.set("X-Ui-Language",g)),U=e.clone({headers:l})}return o(U).pipe(w(l=>{if(l.type===4&&l.status===200&&De){let b=l.body;if(b?.Success===!1)throw{status:200,message:b?.Error??"Unknown error",error:{Error:b?.Error??"Unknown error"},requestBody:b}}return l}),B(l=>{let b=l.error?.Error||`Error Code: ${l.status}, Message: ${l.message}`;if(!j){let R=!0;if((y&&l.status===404||x||M)&&(R=!1),S&&l.status===401&&(R=!1,t.logout(),n.navigate(["/logout"])),!c&&!S&&!u&&l.status===401)return R=!1,t.refreshToken().pipe(T(()=>o(e.clone({headers:e.headers.set("Authorization",`Bearer ${t.token()}`)}))));R&&a.error(b)}return G(()=>({error:l,message:b}))}))};var N=class e{#e=s(z);showError(o){let t=this.#e.querySelector("body > .loading");if(!t)return;t.classList.add("has-error"),t.innerHTML="";let n=this.#e.createElement("div");n.classList.add("loading-title"),n.textContent="Unable to connect";let i=this.#e.createElement("div");i.classList.add("loading-error"),i.textContent=o||"Unknown error";let p=this.#e.createElement("button");p.type="button",p.classList.add("retry-button"),p.textContent="Retry",p.addEventListener("click",()=>{this.#e.defaultView?.location.reload()}),t.append(n,i,p)}static \u0275fac=function(t){return new(t||e)};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})};var $e="1.0.0",Le=`portal-proxy-client-${V()}`,Ge=1,O=class e{#e=1e3;#d=s(f);#u=s(N);#o=d("disconnected");#h=d(this.#e);#a=d(!1);#n=d(!1);#p=d(null);#c=d(null);#s=!1;isConnectedToMachineServer=this.#n.asReadonly();wsState=this.#o.asReadonly();#l=[];#r={};#t=null;#f=new TextDecoder("utf-8");#m=null;#y=X(()=>{let o=this.#a(),t=this.#h(),n=this.#p(),i=this.#c();if(!n||!i||!o||!t||t<this.#e){this.#m&&window.clearInterval(this.#m);return}this.#m=window.setInterval(()=>{this.connectToMachineServer(n,i)},t)});#i(o){this.#s||(this.#s=!0,this.#u.showError(o||"Unable to connect to the server."))}#g(){this.#s||(this.#s=!0)}utf8Atob(o){let t=Uint8Array.from(atob(o),i=>i.charCodeAt(0)),n=this.#f.decode(t);return n?JSON.parse(n):null}connectToMachineServer(o,t,n){let i=n?.reconnect??!1,p=this.wsState();(p==="disconnected"||p==="error"||i)&&(this.#t?.close(),this.#t=null),!this.#t&&(this.#s=!1,this.#t=new WebSocket(t),this.#o.set("connecting"),this.#t.onopen=()=>{this.#o.set("connect"),this.#n.set(!0),this.#a.set(!1),this.#p.set(null),this.#c.set(null)},this.#t.onclose=()=>{this.#o.set("disconnected"),this.#n.set(!1),this.#p.set(o),this.#c.set(t),this.#a.set(!0)},this.#t.onerror=()=>{this.#o.set("error")},this.#t.onmessage=m=>{let a=JSON.parse(m.data);if(this.wsState()==="connect"){if(a.type!=="welcome"){this.disconnectFromMachineServer(`Unexpected message type, expected 'welcome' but got '${a.type}'`);return}let r={token:o,publicKey:"",clientVersion:$e,protocolVersion:Ge},c=this.createResponse(a,"authportal",r);this.#o.set("welcome"),this.#t?.send(c)}else if(this.wsState()==="welcome"){if(a.type!=="authportal"){this.disconnectFromMachineServer(`Unexpected message type, expected 'authportal' but got '${a.type}'`);return}var g=JSON.parse(a.payload??"");if(g.accepted===!1){this.#i("Authentication failed"),this.disconnectFromMachineServer("Authentication failed");return}for(this.#o.set("authenticated"),this.#n.set(!0);this.#l.length>0;){let r=this.#l.pop();r&&this.#r[r.messageId]&&this.activateCommand(r)}}else if(this.wsState()==="authenticated"){if(a.type!=="command"){console.warn(`Unexpected message type, expected 'command' but got '${a.type}'`);return}let r=this.#r[a.messageId];if(r){if(a.errorMessage)this.#i(a.errorMessage),r.reject(a.errorMessage);else{let c=JSON.parse(a.payload??"");c.statusCode>=400?this.#i(c.body||`Initial request failed with status code ${c.statusCode}`):this.#g(),c.body=c?.body==null?null:this.utf8Atob(c.body),r.resolve(c)}delete this.#r[a.messageId],window.clearTimeout(r.timer)}}})}disconnectFromMachineServer(o=null){o&&console.error(o),this.#t?.close(),this.#t=null,this.#o.set("disconnected"),this.#n.set(!1)}createResponse(o,t,n){let i={from:Le,to:o.from,type:t,messageId:o.messageId,payload:JSON.stringify(n)};return JSON.stringify(i)}sendCommand(o,t,n,i,p,m,a,g=5e3){return(this.wsState()==="disconnected"||this.wsState()==="error")&&this.connectToMachineServer(o,n),new Promise((r,c)=>{let u=V(),y={from:Le,to:t,type:"command",messageId:u,payload:JSON.stringify({method:i,path:p,body:m,headers:a})},x={resolve:r,reject:c,timer:window.setTimeout(()=>{let M=this.#r[u];M&&(delete this.#r[u],this.#i("The request timed out before receiving a response."),M.reject("Timeout"))},g)};this.#r[u]=x,this.#n()?this.activateCommand(y):this.#l.push(y)})}activateCommand(o){this.#t?.send(JSON.stringify(o))}static \u0275fac=function(t){return new(t||e)};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})};function Be(e){if(typeof e!="string")return null;let t=new TextEncoder().encode(e);return window.btoa(String.fromCharCode(...t))}function Pe(e,o,t){let n=e.relayconfigState.config();if(n===null)return t(o);let i=Be(o.body),p={};o.headers.keys().forEach(r=>{p[r]=o.headers.get(r)??""});let m=o.headers.get("timeout"),a=m!==null?parseInt(m):e.defaultTimeout;o.url.startsWith("/api/v1/serverstate")&&o.url.includes("longpoll=true")&&(a=1e3*99);let g=e.relayWebsocket.sendCommand(n.accessToken,n.clientId,n.machineServerUrl,o.method,o.url,i,p,a);return new F(r=>{g.then(c=>{let u=new re;p!=null&&Object.keys(p).forEach(y=>{u.set(y,p[y])});let S=new se({body:c.body,status:c.statusCode,statusText:"OK",headers:u});r.next(S),r.complete()}).catch(c=>{r.error(new ie({error:c??"Unknown error",status:0,statusText:c??"Unknown error"}))})})}var He=(e,o)=>{let t={relayconfigState:s(v),defaultTimeout:s(f).defaultTimeout,relayWebsocket:s(O)},n=t.relayconfigState.config();if(t.relayconfigState.configLoaded!==null&&n===null){let i=new W;return t.relayconfigState.configLoaded.subscribe(p=>{p&&Pe(t,e,o).subscribe(i)}),i}return Pe(t,e,o)};var Ve={providers:[Z(),ue(Oe,fe(),he(de)),ae(ce(),pe([He,xe])),h,{provide:f,useValue:Ae},{provide:ee,useValue:ke()},{provide:be,useValue:{alertVariant:"simple"}},we,I,Te,oe,Se,te,Me,Ee]};ne(k,Ve);
|
package/package.json
CHANGED
package/chunk-562BU33Q.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as a,d as b}from"./chunk-YE7IXREK.js";import"./chunk-NBPZDFGF.js";import"./chunk-TDEVA3XM.js";import"./chunk-ITA7DTN3.js";import"./chunk-Q72Y55NB.js";import"./chunk-NXF5BMPG.js";import"./chunk-6Q6SSTBK.js";import"./chunk-I4XRVBRQ.js";import"./chunk-IUJGDYFS.js";import"./chunk-X64LSE6Y.js";import"./chunk-RFB5A3B7.js";import"./chunk-FKYRYVJD.js";import"./chunk-AYOFR344.js";import"./chunk-LTVI3WYF.js";import"./chunk-BEXYTIOL.js";import"./chunk-DKA7IP53.js";import"./chunk-YCLTQEU6.js";import"./chunk-2LSZ2I43.js";import"./chunk-BMWZYMK6.js";import"./chunk-7FYL7MVA.js";import"./chunk-NBTTYKXH.js";import"./chunk-OQ6BKP5N.js";import"./chunk-VAQ435AR.js";import"./chunk-ERITO7WM.js";import"./chunk-7CGTOI24.js";export{a as createEncryptionForm,b as default};
|
package/chunk-DKA7IP53.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as l,d as w}from"./chunk-2LSZ2I43.js";import{d as k}from"./chunk-BMWZYMK6.js";import{a as b,d as O}from"./chunk-NBTTYKXH.js";import{xa as v,ya as s}from"./chunk-OQ6BKP5N.js";import{C as u,E as p,I as P,M as f,U as c,Z as i,f as R,i as E,l as y,oa as a,p as m,ya as T,z as N}from"./chunk-ERITO7WM.js";import{a as A}from"./chunk-7CGTOI24.js";var g=class r{platformId=i(T);STORAGE_VERSION="v1";APP_NAME="duplicati";PERSISTED_PREFIX="persist:";getItemParsed(e,t=!1){return s(this.platformId)?null:JSON.parse(localStorage.getItem(`${this.STORAGE_VERSION}:${t?this.PERSISTED_PREFIX:""}${this.APP_NAME}:${e}`)??"null")}setItemParsed(e,t,o=!1){if(!s(this.platformId))return localStorage.setItem(`${this.STORAGE_VERSION}:${o?this.PERSISTED_PREFIX:""}${this.APP_NAME}:${e}`,JSON.stringify(t))}get length(){return v(this.platformId)?localStorage.length:0}getItem(e){return s(this.platformId)?null:localStorage.getItem(`${this.STORAGE_VERSION}:${this.APP_NAME}:${e}`)??null}setItem(e,t){if(!s(this.platformId))return localStorage.setItem(`${this.STORAGE_VERSION}:${this.APP_NAME}:${e}`,t)}removeItem(e){s(this.platformId)||(localStorage.removeItem(`${this.STORAGE_VERSION}:${this.APP_NAME}:${e}`),localStorage.removeItem(`${this.STORAGE_VERSION}:${this.PERSISTED_PREFIX}${this.APP_NAME}:${e}`))}clearAllNotCurrentVersion(){if(!s(this.platformId))for(var e in localStorage)!e.startsWith(this.STORAGE_VERSION)&&e.includes(this.APP_NAME)&&localStorage.removeItem(e)}clearAll(){s(this.platformId)||localStorage.clear()}clear(){if(!s(this.platformId))for(var e in localStorage)e.includes(this.APP_NAME)&&!e.includes(this.PERSISTED_PREFIX)&&localStorage.removeItem(e)}key(e){return s(this.platformId)?null:localStorage.key(e)}static \u0275fac=function(t){return new(t||r)};static \u0275prov=c({token:r,factory:r.\u0275fac})};function V(){try{let r=document.querySelector('meta[name="duplicati-proxy-config"]');if(r){let e=(r.getAttribute("content")||"").trim();if(e&&e.startsWith("/"))return e}}catch(r){console.warn("Failed to read proxy configuration from meta tag:",r)}return null}function L(){try{let r=document.querySelector('meta[name="duplicati-enable-iframe-hosting"]');if(r){let e=(r.getAttribute("content")||"").trim();if(e&&e.length>0)return e.toLowerCase()!=="true"}}catch(r){console.warn("Failed to read disable relay support configuration from meta tag:",r)}return!0}function $(){try{let r=document.querySelector('meta[name="duplicati-xsrf-config"]');if(r){let e=(r.getAttribute("data-header-name")||"").trim(),t=(r.getAttribute("data-query-name")||"").trim();if(e&&t&&e.length>0&&t.length>0){let n=new URLSearchParams(window.location.search).get(t);if(n)return{headerName:e,queryName:t,headerValue:n}}}}catch(r){console.warn("Failed to read XSRF configuration from meta tags:",r)}return null}function x(){let r=$();return r?`${r.queryName}=${encodeURIComponent(r.headerValue)}`:null}function X(){let r=V();if(r&&r.length>0){let t=r;t.startsWith("/")||(t=`/${t}`),t.endsWith("/")&&(t=t.slice(0,-1)),l.BASE=t}else l.BASE="";let e=$();e&&(l.HEADERS={[e.headerName]:e.headerValue})}var h=class r{#i=i(g);#o=a(null);#t=window.self!==window.top&&L();#r=a(this.#t);relayIsEnabled=this.#r.asReadonly();config=this.#o.asReadonly();configLoaded=this.#t?new E:null;isLoading=a(this.#t);parentIframeListner=null;parentOrigin="*";fetchConfig(){this.#s(),this.#t&&(this.#r.set(!0),this.parentIframeListner=new AbortController,this.#e("connected"),window.addEventListener("message",e=>{if(e.data.startsWith("access:")){let t=e.data.replace("access:",""),o=JSON.parse(t);if(!o?.accessToken||!o?.clientId){this.#e("error:invalid-config"),this.#r.set(!1);return}if(typeof o.clientId!="string"){this.#e("error:invalid-config"),this.#r.set(!1);return}if(typeof o.accessToken!="string"){this.#e("error:invalid-config"),this.#r.set(!1);return}let n=this.#i.getItem("locale")??"en-US",I=o.locale??"en-US";n!==I&&(this.#i.setItem("locale",I),window.location.reload()),this.#o.set(o),this.configLoaded?.next(!0),this.isLoading.set(!1),this.#e("handshake-complete")}},{signal:this.parentIframeListner.signal}))}#e(e){window.parent.postMessage(e,"*")}#s(){this.parentIframeListner&&(this.parentIframeListner.abort(),this.parentIframeListner=null)}setConfig(e){this.#o.set(e)}clearConfig(){this.#o.set(null)}static \u0275fac=function(t){return new(t||r)};static \u0275prov=c({token:r,factory:r.\u0275fac,providedIn:"root"})};var D="PROXY_AUTHED_FAKE_TOKEN",d="refreshNonce",S="v1:persist:duplicati:refreshNonce",M=class r{#i=i(k);#o=i(O);#t=i(w);#r=i(h);#e=a(null);#s=a(!1);#a=a(!1);#l=a(x());xsrfQueryParam=this.#l.asReadonly();token=this.#e.asReadonly();isLoggingOut=this.#s.asReadonly();setRefreshNonce(e,t){if(!e){sessionStorage.removeItem(d);return}t?localStorage.setItem(S,e||""):sessionStorage.setItem(d,e||"")}getRefreshNonceBody(){let e=sessionStorage.getItem(d),t=localStorage.getItem(S),o=e||t;return{requestBody:o?{requestBody:{Nonce:o}}:void 0,local:o===t}}login(e,t){return this.#t.postApiV1AuthLogin({requestBody:{Password:e,RememberMe:t}}).pipe(u(1),f(o=>{o.AccessToken?(this.#e.set(o.AccessToken),this.setRefreshNonce(o.RefreshNonce,t)):this.#e.set(null)}))}#n=null;refreshToken(){if(this.#r.relayIsEnabled())return this.#e.set(D),new R(o=>{o.next({AccessToken:D}),o.complete()});if(this.#a())return this.#t.postApiV1AuthIssuetokenByOperation({operation:"websocket"}).pipe(u(1),f(o=>{o.Token&&this.#e.set(o.Token)}),m(o=>({AccessToken:o.Token})));if(this.#n)return this.#n;let{requestBody:e,local:t}=this.getRefreshNonceBody();return this.#n=this.#t.postApiV1AuthRefresh(e).pipe(u(1),f(o=>{o.AccessToken&&(this.#e.set(o.AccessToken),this.setRefreshNonce(o.RefreshNonce,t))}),p(()=>{this.#n=null}),P(1)),this.#n}checkProxyAuthed(){let e=new b(A({"custom-proxy-check":"true"},l.HEADERS??{})),t=l.BASE||"";return this.#o.post(`${t}/api/v1/auth/status`,null,{headers:e}).pipe(m(o=>{let n=o;return n?.authorized&&n?.socketToken?(this.#e.set(n.socketToken),this.#a.set(!0),!0):!1}),N(()=>y(!1)))}logout(){this.#s.set(!0);let{requestBody:e,local:t}=this.getRefreshNonceBody();sessionStorage.removeItem(d),t&&localStorage.removeItem(S),this.#t.postApiV1AuthRefreshLogout(e).pipe(u(1),p(()=>{this.#s.set(!1),this.#e.set(null),this.#i.navigate(["/login"])})).subscribe()}static \u0275fac=function(t){return new(t||r)};static \u0275prov=c({token:r,factory:r.\u0275fac,providedIn:"root"})};export{g as a,X as b,h as c,D as d,M as e};
|
package/chunk-F3TYSZ53.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-7CGTOI24.js";var o=[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",loadComponent:()=>import("./chunk-PRBKV7LX.js")},{path:"destination",loadComponent:()=>import("./chunk-KNB7LCAL.js")},{path:"source-data",loadComponent:()=>import("./chunk-I7U3XXJD.js")},{path:"schedule",loadComponent:()=>import("./chunk-ZOOFKMMI.js")},{path:"options",loadComponent:()=>import("./chunk-T3YMO3FB.js")}];export{o as default};
|
package/chunk-I6Y22V2Q.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-7CGTOI24.js";var o=[{path:"",redirectTo:"select-files",pathMatch:"full"},{path:"destination",loadComponent:()=>import("./chunk-NYX7YT7G.js")},{path:"encryption",loadComponent:()=>import("./chunk-562BU33Q.js")},{path:"select-files",loadComponent:()=>import("./chunk-3ULPLOSF.js")},{path:"options",loadComponent:()=>import("./chunk-VUABEJRL.js")},{path:":taskid/progress",loadComponent:()=>import("./chunk-PUBEHQ4W.js")}],t=o;export{t as default};
|
package/chunk-MYHC4Y56.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a}from"./chunk-CKVJ36E5.js";import"./chunk-XHUQYWAM.js";import"./chunk-YF6ULZXZ.js";import"./chunk-SLS3DCJP.js";import"./chunk-SUY5AQLW.js";import"./chunk-6Q6SSTBK.js";import"./chunk-I4XRVBRQ.js";import"./chunk-RFB5A3B7.js";import"./chunk-DWFQAX4H.js";import"./chunk-LTVI3WYF.js";import"./chunk-BEXYTIOL.js";import"./chunk-DKA7IP53.js";import"./chunk-YCLTQEU6.js";import"./chunk-2LSZ2I43.js";import"./chunk-BMWZYMK6.js";import"./chunk-7FYL7MVA.js";import"./chunk-NBTTYKXH.js";import"./chunk-OQ6BKP5N.js";import"./chunk-VAQ435AR.js";import"./chunk-ERITO7WM.js";import"./chunk-7CGTOI24.js";export{a as BackupProgressComponent};
|
package/chunk-VUABEJRL.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a,b}from"./chunk-YE7IXREK.js";import"./chunk-NBPZDFGF.js";import"./chunk-TDEVA3XM.js";import"./chunk-ITA7DTN3.js";import"./chunk-Q72Y55NB.js";import"./chunk-NXF5BMPG.js";import"./chunk-6Q6SSTBK.js";import"./chunk-I4XRVBRQ.js";import"./chunk-IUJGDYFS.js";import"./chunk-X64LSE6Y.js";import"./chunk-RFB5A3B7.js";import"./chunk-FKYRYVJD.js";import"./chunk-AYOFR344.js";import"./chunk-LTVI3WYF.js";import"./chunk-BEXYTIOL.js";import"./chunk-DKA7IP53.js";import"./chunk-YCLTQEU6.js";import"./chunk-2LSZ2I43.js";import"./chunk-BMWZYMK6.js";import"./chunk-7FYL7MVA.js";import"./chunk-NBTTYKXH.js";import"./chunk-OQ6BKP5N.js";import"./chunk-VAQ435AR.js";import"./chunk-ERITO7WM.js";import"./chunk-7CGTOI24.js";export{a as createRestoreOptionsForm,b as default};
|
package/chunk-ZOOFKMMI.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as a,h as b,i as c,j as d}from"./chunk-TDEVA3XM.js";import"./chunk-ITA7DTN3.js";import"./chunk-Q72Y55NB.js";import"./chunk-NXF5BMPG.js";import"./chunk-6Q6SSTBK.js";import"./chunk-IUJGDYFS.js";import"./chunk-X64LSE6Y.js";import"./chunk-RFB5A3B7.js";import"./chunk-FKYRYVJD.js";import"./chunk-AYOFR344.js";import"./chunk-LTVI3WYF.js";import"./chunk-BEXYTIOL.js";import"./chunk-DKA7IP53.js";import"./chunk-YCLTQEU6.js";import"./chunk-2LSZ2I43.js";import"./chunk-BMWZYMK6.js";import"./chunk-7FYL7MVA.js";import"./chunk-NBTTYKXH.js";import"./chunk-OQ6BKP5N.js";import"./chunk-VAQ435AR.js";import"./chunk-ERITO7WM.js";import"./chunk-7CGTOI24.js";export{a as SCHEDULE_DEFAULT_OPTIONS,c as SCHEDULE_FIELD_DEFAULTS,d as default,b as scheduleOptionToSchedule};
|
package/main-IO5OKXBW.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as Me,c as Ie}from"./chunk-LGILJ5LY.js";import{a as Re}from"./chunk-S2F2BNOG.js";import{a as Ee}from"./chunk-3ZCJK7PY.js";import{b as I}from"./chunk-XHUQYWAM.js";import"./chunk-YF6ULZXZ.js";import{a as Te}from"./chunk-SLS3DCJP.js";import{b as we}from"./chunk-SUY5AQLW.js";import{a as H}from"./chunk-6Q6SSTBK.js";import{a as ve}from"./chunk-I4XRVBRQ.js";import"./chunk-RFB5A3B7.js";import"./chunk-DWFQAX4H.js";import"./chunk-LTVI3WYF.js";import{a as P}from"./chunk-BEXYTIOL.js";import{a as h,b as ge,c as v,d as Se,e as M}from"./chunk-DKA7IP53.js";import{u as ye,x as be}from"./chunk-YCLTQEU6.js";import{a as fe,e as Ce}from"./chunk-2LSZ2I43.js";import{c as ce,d as le,g as me,h as de,i as ue,j as he}from"./chunk-BMWZYMK6.js";import{a as oe}from"./chunk-7FYL7MVA.js";import{a as ne,b as re,c as se,e as ie,f as ae,g as pe}from"./chunk-NBTTYKXH.js";import{ha as ee,ma as te}from"./chunk-OQ6BKP5N.js";import"./chunk-VAQ435AR.js";import{Db as Q,E as B,K as T,Kc as Y,Lc as Z,M as J,U as C,X as K,Z as s,eb as X,f as j,g as F,ga as _,ha as q,l as W,m as $,oa as d,p as w,qa as z,y as L,z as G}from"./chunk-ERITO7WM.js";import"./chunk-7CGTOI24.js";var k=class e{#e=s(h);#a=s(v);ngOnInit(){ge(),this.#a.fetchConfig(),this.#e.clearAllNotCurrentVersion()}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=X({type:e,selectors:[["app-root"]],decls:1,vars:0,template:function(o,n){o&1&&Q(0,"router-outlet")},dependencies:[ce],encapsulation:2})};var ke={production:!0,baseUrl:"/api",machineServerUrl:"${WS_URL}",defaultTimeout:3e4};var f=new K("ENVIRONMENT");var A=class e{#e=s(Ce);isLoaded=d(!1);webmodules=d(null);preload(t=!1){let o=this.#e.getApiV1Webmodules().pipe(J(n=>this.webmodules.set(n)),B(()=>this.isLoaded.set(!0)));if(t)return o;o.subscribe()}static \u0275fac=function(o){return new(o||e)};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})};var Ue=()=>{let e=s(M);return e.token()?!0:e.checkProxyAuthed().pipe(T(t=>t?W(!0):e.refreshToken().pipe(w(()=>!0))))},je=()=>{let e=s(v),t=s(I),o=s(_),n=e.relayIsEnabled()?"longpoll":"websocket",a=[o.get(P).preload(!0),o.get(P).preloadFilterGroups(!0),o.get(A).preload(!0)];return e.configLoaded===null?L(a).pipe(w(()=>n)):e.configLoaded?.pipe(T(()=>L(a)))},Fe=()=>!0,Ae={path:"connect/:typeParam",loadComponent:()=>import("./chunk-DMMZWQEZ.js")},We=()=>{let e=s(h);return!e.getItem("locale")&&navigator.language&&e.setItem("locale",navigator.language),!0},Ne=[{path:"",children:[{path:"login",canActivate:[],loadComponent:()=>import("./chunk-ZVTMKBV5.js")},{path:"logout",loadComponent:()=>import("./chunk-AQWULDGL.js")},{path:"",canActivate:[Ue],children:[{path:"",canActivate:[je,Fe,We],children:[{path:"welcome",loadComponent:()=>import("./chunk-VTFVTC7O.js"),children:[{path:"",redirectTo:"select",pathMatch:"full"},{path:"select",loadComponent:()=>import("./chunk-76USHURS.js")},Ae]},{path:"",loadComponent:()=>import("./chunk-UQLHXE6V.js"),children:[{path:"",loadComponent:()=>import("./chunk-DJJ3VITJ.js")},Ae,{path:"destinations",loadComponent:()=>import("./chunk-VOJGEOOO.js")},{path:"add-backup",loadComponent:()=>import("./chunk-FZQEPDIF.js")},{path:"backup/:id/export",loadComponent:()=>import("./chunk-2FD4SR65.js")},{path:"backup/import",loadComponent:()=>import("./chunk-LSIAE7ZL.js")},{path:"backup-draft/:id",loadComponent:()=>import("./chunk-INI4AJEU.js"),loadChildren:()=>import("./chunk-F3TYSZ53.js")},{path:"backup/:id",loadComponent:()=>import("./chunk-INI4AJEU.js"),loadChildren:()=>import("./chunk-F3TYSZ53.js")},{path:"backup/:id/log",loadComponent:()=>import("./chunk-V43VAZTT.js")},{path:"backup/:id/database",loadComponent:()=>import("./chunk-M7QNSQM2.js")},{path:"backup/:id/commandline",loadComponent:()=>import("./chunk-BDC5JQVQ.js")},{path:"backup/:id/commandline/:runId",loadComponent:()=>import("./chunk-KXBEW3N2.js")},{path:"backup/:id/delete",loadComponent:()=>import("./chunk-I2BAH6NC.js")},{path:"restore",children:[{path:"",loadComponent:()=>import("./chunk-DJAQY2GM.js")},{path:"from-config",loadComponent:()=>import("./chunk-C6RVYQ4M.js")}]},{path:"restore-from-files",loadComponent:()=>import("./chunk-FG4GOBKA.js"),loadChildren:()=>import("./chunk-I6Y22V2Q.js")},{path:"restore-draft/:id",loadComponent:()=>import("./chunk-FG4GOBKA.js"),loadChildren:()=>import("./chunk-I6Y22V2Q.js")},{path:"restore/:id",loadComponent:()=>import("./chunk-FG4GOBKA.js"),loadChildren:()=>import("./chunk-I6Y22V2Q.js")},{path:"status",loadComponent:()=>import("./chunk-IGEX5B3E.js")},{path:"settings",loadComponent:()=>import("./chunk-23BFPX3M.js")},{path:"about",loadComponent:()=>import("./chunk-M3JOG5RD.js"),children:[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",loadComponent:()=>import("./chunk-JIJGVYNW.js")},{path:"changelog",loadComponent:()=>import("./chunk-IZCDGVXJ.js")},{path:"libraries",loadComponent:()=>import("./chunk-3KMV4PTJ.js")},{path:"system-info",loadComponent:()=>import("./chunk-U3SGWHNI.js")},{path:"server-settings",loadComponent:()=>import("./chunk-EVMEYZB7.js")},{path:"logs",loadChildren:()=>import("./chunk-NDLPNBGE.js")},{path:"crashlogs",loadComponent:()=>import("./chunk-BKQA64HZ.js")}]}]}]}]}]}];var Oe=(e,t)=>{let o=s(M),n=s(le),a=s(h),p=s(f),i=a.getItem("locale"),u=s(be),c=Me(i),r=fe.BASE||"",m=e.url===`${r}/api/v1/auth/login`,S=e.url===`${r}/api/v1/auth/logout`,g=e.url===`${r}/api/v1/auth/refresh`,b=e.url===`${r}/api/v1/progressstate`,E=e.url===`${r}/api/v1/remoteoperation/test`,Ve=e.url===`${r}/api/v1/filesystem/validate`,De=e.url.startsWith(`${r}/api/v2/`),x=o.token(),D=e,U=e.headers.has("custom-proxy-check")||x===Se;if(x&&e.url.startsWith(r+p.baseUrl)&&!U){let l=e.headers.set("Authorization",`Bearer ${x}`);i&&i!=="en-US"&&(l=l.set("X-Ui-Language",c)),D=e.clone({headers:l})}return t(D).pipe(w(l=>{if(l.type===4&&l.status===200&&De){let y=l.body;if(y?.Success===!1)throw{status:200,message:y?.Error??"Unknown error",error:{Error:y?.Error??"Unknown error"},requestBody:y}}return l}),G(l=>{let y=l.error?.Error||`Error Code: ${l.status}, Message: ${l.message}`;if(!U){let R=!0;if((b&&l.status===404||E||Ve)&&(R=!1),g&&l.status===401&&(R=!1,o.logout(),n.navigate(["/logout"])),!m&&!g&&!S&&l.status===401)return R=!1,o.refreshToken().pipe(T(()=>t(e.clone({headers:e.headers.set("Authorization",`Bearer ${o.token()}`)}))));R&&u.error(y)}return $(()=>({error:l,message:y}))}))};var N=class e{#e=s(q);showError(t){let o=this.#e.querySelector("body > .loading");if(!o)return;o.classList.add("has-error"),o.innerHTML="";let n=this.#e.createElement("div");n.classList.add("loading-title"),n.textContent="Unable to connect";let a=this.#e.createElement("div");a.classList.add("loading-error"),a.textContent=t||"Unknown error";let p=this.#e.createElement("button");p.type="button",p.classList.add("retry-button"),p.textContent="Retry",p.addEventListener("click",()=>{this.#e.defaultView?.location.reload()}),o.append(n,a,p)}static \u0275fac=function(o){return new(o||e)};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})};var $e="1.0.0",xe=`portal-proxy-client-${H()}`,Ge=1,O=class e{#e=1e3;#a=s(f);#d=s(N);#o=d("disconnected");#u=d(this.#e);#p=d(!1);#n=d(!1);#c=d(null);#s=!1;isConnectedToMachineServer=this.#n.asReadonly();wsState=this.#o.asReadonly();#l=[];#r={};#t=null;#h=new TextDecoder("utf-8");#m=null;#g=z(()=>{let t=this.#p(),o=this.#u(),n=this.#c();if(!n||!t||!o||o<this.#e){this.#m&&window.clearInterval(this.#m);return}this.#m=window.setInterval(()=>{this.connectToMachineServer(n)},o)});#i(t){this.#s||(this.#s=!0,this.#d.showError(t||"Unable to connect to the server."))}#f(){this.#s||(this.#s=!0)}utf8Atob(t){let o=Uint8Array.from(atob(t),a=>a.charCodeAt(0)),n=this.#h.decode(o);return n?JSON.parse(n):null}connectToMachineServer(t,o){let n=o?.reconnect??!1,a=this.wsState();(a==="disconnected"||a==="error"||n)&&(this.#t?.close(),this.#t=null),!this.#t&&(this.#s=!1,this.#t=new WebSocket(this.#a.machineServerUrl),this.#o.set("connecting"),this.#t.onopen=()=>{this.#o.set("connect"),this.#n.set(!0),this.#p.set(!1),this.#c.set(null)},this.#t.onclose=()=>{this.#o.set("disconnected"),this.#n.set(!1),this.#c.set(t),this.#p.set(!0)},this.#t.onerror=()=>{this.#o.set("error")},this.#t.onmessage=p=>{let i=JSON.parse(p.data);if(this.wsState()==="connect"){if(i.type!=="welcome"){this.disconnectFromMachineServer(`Unexpected message type, expected 'welcome' but got '${i.type}'`);return}let c={token:t,publicKey:"",clientVersion:$e,protocolVersion:Ge},r=this.createResponse(i,"authportal",c);this.#o.set("welcome"),this.#t?.send(r)}else if(this.wsState()==="welcome"){if(i.type!=="authportal"){this.disconnectFromMachineServer(`Unexpected message type, expected 'authportal' but got '${i.type}'`);return}var u=JSON.parse(i.payload??"");if(u.accepted===!1){this.#i("Authentication failed"),this.disconnectFromMachineServer("Authentication failed");return}for(this.#o.set("authenticated"),this.#n.set(!0);this.#l.length>0;){let c=this.#l.pop();c&&this.#r[c.messageId]&&this.activateCommand(c)}}else if(this.wsState()==="authenticated"){if(i.type!=="command"){console.warn(`Unexpected message type, expected 'command' but got '${i.type}'`);return}let c=this.#r[i.messageId];if(c){if(i.errorMessage)this.#i(i.errorMessage),c.reject(i.errorMessage);else{let r=JSON.parse(i.payload??"");r.statusCode>=400?this.#i(r.body||`Initial request failed with status code ${r.statusCode}`):this.#f(),r.body=r?.body==null?null:this.utf8Atob(r.body),c.resolve(r)}delete this.#r[i.messageId],window.clearTimeout(c.timer)}}})}disconnectFromMachineServer(t=null){t&&console.error(t),this.#t?.close(),this.#t=null,this.#o.set("disconnected"),this.#n.set(!1)}createResponse(t,o,n){let a={from:xe,to:t.from,type:o,messageId:t.messageId,payload:JSON.stringify(n)};return JSON.stringify(a)}sendCommand(t,o,n,a,p,i,u=5e3){return(this.wsState()==="disconnected"||this.wsState()==="error")&&this.connectToMachineServer(t),new Promise((c,r)=>{let m=H(),g={from:xe,to:o,type:"command",messageId:m,payload:JSON.stringify({method:n,path:a,body:p,headers:i})},b={resolve:c,reject:r,timer:window.setTimeout(()=>{let E=this.#r[m];E&&(delete this.#r[m],this.#i("The request timed out before receiving a response."),E.reject("Timeout"))},u)};this.#r[m]=b,this.#n()?this.activateCommand(g):this.#l.push(g)})}activateCommand(t){this.#t?.send(JSON.stringify(t))}static \u0275fac=function(o){return new(o||e)};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})};function Be(e){if(typeof e!="string")return null;let o=new TextEncoder().encode(e);return window.btoa(String.fromCharCode(...o))}function Le(e,t,o){let n=e.relayconfigState.config();if(n===null)return o(t);let a=Be(t.body),p={};t.headers.keys().forEach(r=>{p[r]=t.headers.get(r)??""});let i=t.headers.get("timeout"),u=i!==null?parseInt(i):e.defaultTimeout;t.url.startsWith("/api/v1/serverstate")&&t.url.includes("longpoll=true")&&(u=1e3*99);let c=e.relayWebsocket.sendCommand(n.accessToken,n.clientId,t.method,t.url,a,p,u);return new j(r=>{c.then(m=>{let S=new ne;p!=null&&Object.keys(p).forEach(b=>{S.set(b,p[b])});let g=new re({body:m.body,status:m.statusCode,statusText:"OK",headers:S});r.next(g),r.complete()}).catch(m=>{r.error(new se({error:m??"Unknown error",status:0,statusText:m??"Unknown error"}))})})}var Pe=(e,t)=>{let o={relayconfigState:s(v),defaultTimeout:s(f).defaultTimeout,relayWebsocket:s(O)},n=o.relayconfigState.config();if(o.relayconfigState.configLoaded!==null&&n===null){let a=new F;return o.relayconfigState.configLoaded.subscribe(p=>{p&&Le(o,e,t).subscribe(a)}),a}return Le(o,e,t)};var He={providers:[Y(),de(Ne,he(),ue(me)),ie(pe(),ae([Pe,Oe])),h,{provide:f,useValue:ke},{provide:Z,useValue:Ie()},{provide:ye,useValue:{alertVariant:"simple"}},Re,I,we,te,ve,ee,Te,Ee]};oe(k,He);
|