@duplicati/ngclient 0.0.31 → 0.0.33
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-AXWWWNYP.js → chunk-2X2NVYPD.js} +1 -1
- package/{chunk-ATKSFHUF.js → chunk-4TN5W4QO.js} +1 -1
- package/{chunk-LXIJTRVM.js → chunk-4UJICSQB.js} +1 -1
- package/{chunk-2J2FXCU7.js → chunk-5ILDMHKR.js} +1 -1
- package/{chunk-CH4OZJBV.js → chunk-5XX7BU4I.js} +1 -1
- package/{chunk-R5JN4Q6V.js → chunk-5ZK3D2RS.js} +1 -1
- package/{chunk-HSUOVCAK.js → chunk-6M3MNJ52.js} +1 -1
- package/{chunk-CL3S2VV2.js → chunk-7SJHYZC5.js} +1 -1
- package/{chunk-LMBPK5DA.js → chunk-B3MIBKC5.js} +1 -1
- package/chunk-BEZGDXHL.js +1 -0
- package/{chunk-FFVSEGEV.js → chunk-C3DDBRLN.js} +1 -1
- package/chunk-CFQQ4QBV.js +1 -0
- package/{chunk-VTXQPBKS.js → chunk-DGBBEZNN.js} +1 -1
- package/{chunk-XVGRR5A7.js → chunk-EHV3OZDB.js} +1 -1
- package/{chunk-FHAZ4KGN.js → chunk-EWJCAT5A.js} +1 -1
- package/chunk-FTAJFNK5.js +1 -0
- package/chunk-GIZ3WMHA.js +1 -0
- package/{chunk-T2VQYIXT.js → chunk-HEBDWN5N.js} +1 -1
- package/chunk-IBQ7EDD3.js +1 -0
- package/chunk-IEODBWAI.js +1 -0
- package/chunk-J2ZPRK4G.js +1 -0
- package/{chunk-YI6L4R7Z.js → chunk-J3H4BCHI.js} +1 -1
- package/{chunk-FGOEPQE2.js → chunk-K7H3KYW7.js} +1 -1
- package/{chunk-2ORXOP6M.js → chunk-KFGIVU27.js} +1 -1
- package/chunk-KZMJGNOW.js +1 -0
- package/{chunk-A6SZHWMW.js → chunk-LVYTERRJ.js} +1 -1
- package/chunk-MR4RE3IB.js +7 -0
- package/chunk-N35HGIXN.js +2 -0
- package/{chunk-DZ4NY6DH.js → chunk-NWRHNRPB.js} +1 -1
- package/chunk-OGOMCLP4.js +1 -0
- package/chunk-OHAFLXCH.js +1 -0
- package/{chunk-YR7K7QME.js → chunk-OVIL3KMN.js} +1 -1
- package/{chunk-P7G2XT2C.js → chunk-P6LV5I2K.js} +1 -1
- package/{chunk-GTFXUW4R.js → chunk-PIDBEXSZ.js} +1 -1
- package/chunk-PRXIWW64.js +1 -0
- package/{chunk-5S4GAK6A.js → chunk-QGSX2XOM.js} +1 -1
- package/{chunk-CXRDIX6X.js → chunk-QSMEC63O.js} +1 -1
- package/{chunk-TXYVWITT.js → chunk-QZCTOSPE.js} +1 -1
- package/chunk-RMO2MLB3.js +1 -0
- package/{chunk-RCJYQZCN.js → chunk-SSYD4I7W.js} +1 -1
- package/{chunk-XYW3WI3F.js → chunk-SW6FZ3TL.js} +1 -1
- package/{chunk-VKBAFWXR.js → chunk-UPHEPMGX.js} +1 -1
- package/{chunk-ZTDQQPKO.js → chunk-UUMKHH4F.js} +1 -1
- package/{chunk-OO5FPIA3.js → chunk-VOINBIWD.js} +1 -1
- package/chunk-W6WGCBBX.js +1 -0
- package/chunk-WCTCAT6N.js +1 -0
- package/chunk-WWDF3TQC.js +1 -0
- package/{chunk-SNVCSRVH.js → chunk-X25RPH22.js} +1 -1
- package/{chunk-IPFOWVKQ.js → chunk-ZI3FISVO.js} +1 -1
- package/index.html +1 -1
- package/main-KLER7HZN.js +1 -0
- package/package.json +1 -1
- package/chunk-3KFDFKWE.js +0 -1
- package/chunk-5Y3QZ4EI.js +0 -1
- package/chunk-7AEXF3KX.js +0 -8
- package/chunk-ADFXT75O.js +0 -1
- package/chunk-B7ZQVD4U.js +0 -1
- package/chunk-JDQIBNR4.js +0 -7
- package/chunk-LCQKPZDB.js +0 -1
- package/chunk-MTBPGXQX.js +0 -1
- package/chunk-PMUAVKEX.js +0 -1
- package/chunk-QSEDH5YS.js +0 -1
- package/chunk-R2O4OGXE.js +0 -1
- package/chunk-T7U2URJ4.js +0 -1
- package/chunk-TSRJXJX3.js +0 -1
- package/chunk-XA4PLKUY.js +0 -1
- package/chunk-XVBWFXPX.js +0 -1
- package/chunk-YBT47FIB.js +0 -1
- package/chunk-YVWTNA2V.js +0 -1
- package/main-ADPQFTWD.js +0 -2
package/main-ADPQFTWD.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as le}from"./chunk-ZTDQQPKO.js";import"./chunk-2ORXOP6M.js";import{a as w}from"./chunk-RCJYQZCN.js";import{a as b}from"./chunk-HSUOVCAK.js";import{d as ce}from"./chunk-GTFXUW4R.js";import{c as pe}from"./chunk-XVGRR5A7.js";import{H as ne,L as oe,X as A,ca as re,ma as se}from"./chunk-YI6L4R7Z.js";import{a as te}from"./chunk-P7G2XT2C.js";import{a as Y,b as X,d as Z,e as Q,f as ee}from"./chunk-CH4OZJBV.js";import{W as q}from"./chunk-R5JN4Q6V.js";import{a as ie,b as ae}from"./chunk-YR7K7QME.js";import{Cc as J,Dc as _,E as R,Gb as K,J as V,L as z,N as F,Nc as G,R as v,U as H,X as c,Za as f,d as B,fb as W,m as E,x as P,y as N}from"./chunk-JDQIBNR4.js";import"./chunk-C6Q5SG76.js";var T=class e{#n=f(null);config=this.#n.asReadonly();parentIframeListner=null;parentOrigin="*";fetchConfig(){this.#t(),this.parentIframeListner=new AbortController,this.#o("connected"),window.addEventListener("message",t=>{if(t.data.startsWith("access:")){let n=t.data.replace("access:",""),o=JSON.parse(n);if(!o?.accessToken||!o?.clientId){this.#o("error:invalid-config");return}if(typeof o.clientId!="string"){this.#o("error:invalid-config");return}if(typeof o.accessToken!="string"){this.#o("error:invalid-config");return}console.info("postMessage config set"),this.#n.set(o)}},{signal:this.parentIframeListner.signal})}#o(t){window.parent.postMessage(t,"*")}#t(){this.parentIframeListner&&(this.parentIframeListner.abort(),this.parentIframeListner=null)}setConfig(t){this.#n.set(t)}clearConfig(){this.#n.set(null)}static \u0275fac=function(n){return new(n||e)};static \u0275prov=v({token:e,factory:e.\u0275fac,providedIn:"root"})};var x=class e{#n=c(ie);#o=c(b);#t=c(ne);#i=c(T);sub=null;ngOnInit(){this.#i.fetchConfig(),this.sub=this.#t.queryParams.subscribe(({accessToken:t,clientId:n})=>{t?.length&&n?.length&&this.#i.setConfig({accessToken:t,clientId:n})}),this.#o.clearAllNotCurrentVersion()}ngOnDestroy(){this.sub?.unsubscribe()}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=W({type:e,selectors:[["app-root"]],decls:1,vars:0,template:function(n,o){n&1&&K(0,"router-outlet")},dependencies:[oe],encapsulation:2})};var ue={production:!0,baseUrl:"/api",machineServerUrl:"${WS_URL}",defaultTimeout:3e4};var g=new H("ENVIRONMENT");var $=class e{#n=c(ce);isLoaded=f(!1);webmodules=f(null);preload(t=!1){let n=this.#n.getApiV1Webmodules().pipe(F(o=>this.webmodules.set(o)),R(()=>this.isLoaded.set(!0)));if(t)return n;n.subscribe()}static \u0275fac=function(n){return new(n||e)};static \u0275prov=v({token:e,factory:e.\u0275fac,providedIn:"root"})};var me=[{path:"",children:[{path:"login",canActivate:[()=>c(w).token()!==null?c(A).navigate(["/"]):!0],loadComponent:()=>import("./chunk-FHAZ4KGN.js")},{path:"logout",loadComponent:()=>import("./chunk-A6SZHWMW.js")},{path:"",canActivate:[()=>P(c(le).preload(!0),c($).preload(!0))],loadComponent:()=>import("./chunk-AXWWWNYP.js"),children:[{path:"",loadComponent:()=>import("./chunk-3KFDFKWE.js")},{path:"add-backup",loadComponent:()=>import("./chunk-B7ZQVD4U.js")},{path:"backup/:id/export",loadComponent:()=>import("./chunk-LMBPK5DA.js")},{path:"backup/import",loadComponent:()=>import("./chunk-DZ4NY6DH.js")},{path:"backup-draft/:id",loadComponent:()=>import("./chunk-R2O4OGXE.js"),loadChildren:()=>import("./chunk-5Y3QZ4EI.js")},{path:"backup/:id",loadComponent:()=>import("./chunk-R2O4OGXE.js"),loadChildren:()=>import("./chunk-5Y3QZ4EI.js")},{path:"restore",loadComponent:()=>import("./chunk-TSRJXJX3.js")},{path:"restore-flow/:id",loadComponent:()=>import("./chunk-FFVSEGEV.js"),children:[{path:"",redirectTo:"select-files",pathMatch:"full"},{path:"select-files",loadComponent:()=>import("./chunk-T7U2URJ4.js")},{path:"options",loadComponent:()=>import("./chunk-PMUAVKEX.js")}]},{path:"settings",loadComponent:()=>import("./chunk-XVBWFXPX.js")},{path:"about",loadComponent:()=>import("./chunk-5S4GAK6A.js"),children:[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",loadComponent:()=>import("./chunk-VKBAFWXR.js")},{path:"changelog",loadComponent:()=>import("./chunk-IPFOWVKQ.js")},{path:"libraries",loadComponent:()=>import("./chunk-OO5FPIA3.js")},{path:"system-info",loadComponent:()=>import("./chunk-2J2FXCU7.js")},{path:"logs",loadComponent:()=>import("./chunk-SNVCSRVH.js")}]}]}]}];var U=":",Oe="|",Ie="@@",Ee="\u241F",de;function fe(e){de??=new TextEncoder;let t=de.encode(e),n=new DataView(t.buffer,t.byteOffset,t.byteLength),o=he(n,t.length,0),s=he(n,t.length,102072);return o==0&&(s==0||s==1)&&(o=o^319790063,s=s^-1801410264),BigInt.asUintN(32,BigInt(o))<<BigInt(32)|BigInt.asUintN(32,BigInt(s))}function Ne(e,t=""){let n=fe(e);return t&&(n=BigInt.asUintN(64,n<<BigInt(1))|n>>BigInt(63)&BigInt(1),n+=fe(t)),BigInt.asUintN(63,n).toString()}function he(e,t,n){let o=2654435769,s=2654435769,r=0,u=t-12;for(;r<=u;r+=12){o+=e.getUint32(r,!0),s+=e.getUint32(r+4,!0),n+=e.getUint32(r+8,!0);let a=ge(o,s,n);o=a[0],s=a[1],n=a[2]}let i=t-r;return n+=t,i>=4?(o+=e.getUint32(r,!0),r+=4,i>=8?(s+=e.getUint32(r,!0),r+=4,i>=9&&(n+=e.getUint8(r++)<<8),i>=10&&(n+=e.getUint8(r++)<<16),i===11&&(n+=e.getUint8(r++)<<24)):(i>=5&&(s+=e.getUint8(r++)),i>=6&&(s+=e.getUint8(r++)<<8),i===7&&(s+=e.getUint8(r++)<<16))):(i>=1&&(o+=e.getUint8(r++)),i>=2&&(o+=e.getUint8(r++)<<8),i===3&&(o+=e.getUint8(r++)<<16)),ge(o,s,n)[2]}function ge(e,t,n){return e-=t,e-=n,e^=n>>>13,t-=n,t-=e,t^=e<<8,n-=e,n-=t,n^=t>>>13,e-=t,e-=n,e^=n>>>12,t-=n,t-=e,t^=e<<16,n-=e,n-=t,n^=t>>>5,e-=t,e-=n,e^=n>>>3,t-=n,t-=e,t^=e<<10,n-=e,n-=t,n^=t>>>15,[e,t,n]}function ke(e,t,n,o,s=[]){let r={},u={},i={},a=Le(e[0],e.raw[0]),p=[a.text],l=[],d=a.text;for(let m=1;m<e.length;m++){let{messagePart:S,placeholderName:C=je(m),associatedMessageId:D}=Ue(e[m],e.raw[m]);d+=`{$${C}}${S}`,t!==void 0&&(r[C]=t[m-1],u[C]=s[m-1]),l.push(C),D!==void 0&&(i[C]=D),p.push(S)}let h=a.customId||Ne(d,a.meaning||""),I=a.legacyIds?a.legacyIds.filter(m=>m!==h):[];return{id:h,legacyIds:I,substitutions:r,substitutionLocations:u,text:d,customId:a.customId,meaning:a.meaning||"",description:a.description||"",messageParts:p,messagePartLocations:o,placeholderNames:l,associatedMessageIds:i,location:n}}function Le(e,t){let{text:n,block:o}=ve(e,t);if(o===void 0)return{text:n};{let[s,...r]=o.split(Ee),[u,i]=s.split(Ie,2),[a,p]=u.split(Oe,2);return p===void 0&&(p=a,a=void 0),p===""&&(p=void 0),{text:n,meaning:a,description:p,customId:i,legacyIds:r}}}function Ue(e,t){let{text:n,block:o}=ve(e,t);if(o===void 0)return{messagePart:n};{let[s,r]=o.split(Ie);return{messagePart:n,placeholderName:s,associatedMessageId:r}}}function ve(e,t){if(t.charAt(0)!==U)return{text:e};{let n=be(e,t);return{block:e.substring(1,n),text:e.substring(n+1)}}}function je(e){return e===1?"PH":`PH_${e-1}`}function be(e,t){for(let n=1,o=1;n<e.length;n++,o++)if(t[o]==="\\")o++;else if(e[n]===U)return n;throw new Error(`Unterminated $localize metadata block in "${t}".`)}var L=class extends Error{parsedMessage;type="MissingTranslationError";constructor(t){super(`No translation found for ${Te(t)}.`),this.parsedMessage=t}};function De(e,t,n){let o=ke(t,n),s=e[o.id];if(o.legacyIds!==void 0)for(let r=0;r<o.legacyIds.length&&s===void 0;r++)s=e[o.legacyIds[r]];if(s===void 0)throw new L(o);return[s.messageParts,s.placeholderNames.map(r=>{if(o.substitutions.hasOwnProperty(r))return o.substitutions[r];throw new Error(`There is a placeholder name mismatch with the translation provided for the message ${Te(o)}.
|
|
2
|
-
The translation contains a placeholder with name ${r}, which does not exist in the message.`)})]}function Be(e){let t=e.split(/{\$([^}]*)}/),n=[t[0]],o=[];for(let r=1;r<t.length-1;r+=2)o.push(t[r]),n.push(`${t[r+1]}`);let s=n.map(r=>r.charAt(0)===U?"\\"+r:r);return{text:e,messageParts:Pe(n,s),placeholderNames:o}}function Pe(e,t){return Object.defineProperty(e,"raw",{value:t}),e}function Te(e){let t=e.meaning&&` - "${e.meaning}"`,n=e.legacyIds&&e.legacyIds.length>0?` [${e.legacyIds.map(o=>`"${o}"`).join(", ")}]`:"";return`"${e.id}"${n} ("${e.text}"${t})`}function Se(e){$localize.translate||($localize.translate=Ve),$localize.TRANSLATIONS||($localize.TRANSLATIONS={}),Object.keys(e).forEach(t=>{$localize.TRANSLATIONS[t]=Be(e[t])})}function Ve(e,t){try{return De($localize.TRANSLATIONS,e,t)}catch(n){return console.warn(n.message),[e,t]}}var y=function(e,...t){if(y.translate){let o=y.translate(e,t);e=o[0],t=o[1]}let n=ye(e[0],e.raw[0]);for(let o=1;o<e.length;o++)n+=t[o-1]+ye(e[o],e.raw[o]);return n},ze=":";function ye(e,t){return t.charAt(0)===ze?e.substring(be(e,t)+1):e}globalThis.$localize=y;var j="en-US",Fe=["en-US","de-DE","fr-FR","da-DK"],Ce={"en-US":"en","da-DK":"da","de-DE":"de","fr-FR":"fr"};function Re(e){return e?Ce[e]??"en":"en"}function Ae(){let e=localStorage.getItem("v1:duplicati:locale")||j,t=Fe.find(o=>o===e)??j,n=Ce[t];return t===j||(import(`/locale/angular/${n}.mjs`).then(o=>q(o.default)),fetch(`/locale/messages.${t}.json`).then(o=>o.json()).then(o=>{Se(o.translations),y.locale=t})),t}var M=null,we=(e,t)=>{let n=c(w),o=c(A),s=c(b),r=c(g),u=c(pe),i=s.getItem("locale"),a=Re(i),p=e;if(n.token()&&e.url.startsWith(r.baseUrl)){let l=e.headers.set("Authorization",`Bearer ${n.token()}`);i&&i!=="en-US"&&(l=l.set("X-Ui-Language",a)),p=e.clone({headers:l})}return t(p).pipe(N(l=>{if(u.error(l.message),l.status===401&&!M&&(M=n.refreshToken().pipe(V())),l.status===401)return M.pipe(z(()=>t(e.clone({headers:e.headers.set("Authorization",`Bearer ${n.token()}`)}))),N(h=>(o.navigate(["/logout"]),E(()=>h))),R(()=>M=null));let d=`Error Code: ${l.status}, Message: ${l.message}`;return E(()=>({error:l,message:d}))}))};var He="1.0.0",xe="portal-proxy-client",We=1,O=class e{#n=1e3;#o=c(g);#t=f("disconnected");#i=f(this.#n);#a=f(!1);#r=f(!1);#c=f(null);isConnectedToMachineServer=this.#r.asReadonly();wsState=this.#t.asReadonly();#l=[];#s={};#e=null;#u=new TextDecoder("utf-8");#p=null;#m=G(()=>{let t=this.#a(),n=this.#i(),o=this.#c();if(!o||!t||!n||n<this.#n){this.#p&&window.clearInterval(this.#p);return}this.#p=window.setInterval(()=>{this.connectToMachineServer(o)},n)});utf8Atob(t){let n=Uint8Array.from(atob(t),s=>s.charCodeAt(0)),o=this.#u.decode(n);return o?JSON.parse(o):null}connectToMachineServer(t,n){let o=n?.reconnect??!1;this.#e&&this.wsState()==="authenticated"&&!o||(this.#e&&this.wsState()!=="authenticated"&&this.#e.close(),this.#e=new WebSocket(this.#o.machineServerUrl),this.#e.onopen=()=>{this.#t.set("connect"),this.#r.set(!0),this.#a.set(!1),this.#c.set(null)},this.#e.onclose=()=>{this.#t.set("disconnected"),this.#r.set(!1),this.#c.set(t),this.#a.set(!0)},this.#e.onerror=()=>{this.#t.set("error")},this.#e.onmessage=s=>{let r=JSON.parse(s.data);if(this.wsState()==="connect"){if(r.type!=="welcome"){this.disconnectFromMachineServer(`Unexpected message type, expected 'welcome' but got '${r.type}'`);return}let i={token:t,publicKey:"",clientVersion:He,protocolVersion:We},a=this.createResponse(r,"authportal",i);this.#t.set("welcome"),this.#e?.send(a)}else if(this.wsState()==="welcome"){if(r.type!=="authportal"){this.disconnectFromMachineServer(`Unexpected message type, expected 'authportal' but got '${r.type}'`);return}var u=JSON.parse(r.payload??"");if(u.accepted===!1){this.disconnectFromMachineServer("Authentication failed");return}for(this.#t.set("authenticated"),this.#r.set(!0);this.#l.length>0;){let i=this.#l.pop();i&&this.#s[i.messageId]&&this.activateCommand(i)}}else if(this.wsState()==="authenticated"){if(r.type!=="command"){console.warn(`Unexpected message type, expected 'command' but got '${r.type}'`);return}let i=this.#s[r.messageId];if(i){if(r.errorMessage){i.reject(r.errorMessage);return}else{let a=JSON.parse(r.payload??"");a.body=a?.body==null?null:this.utf8Atob(a.body),i.resolve(a)}delete this.#s[r.messageId],window.clearTimeout(i.timer)}}})}disconnectFromMachineServer(t=null){t&&console.error(t),this.#e?.close(),this.#e=null,this.#t.set("disconnected"),this.#r.set(!1)}createResponse(t,n,o){let s={from:xe,to:t.from,type:n,messageId:t.messageId,payload:JSON.stringify(o)};return JSON.stringify(s)}sendCommand(t,n,o,s,r,u,i=5e3){return(this.wsState()==="disconnected"||this.wsState()==="error")&&this.connectToMachineServer(t),new Promise((a,p)=>{let l=crypto.randomUUID(),h={from:xe,to:n,type:"command",messageId:l,payload:JSON.stringify({method:o,path:s,body:r,headers:u})},I={resolve:a,reject:p,timer:window.setTimeout(()=>{let m=this.#s[l];m&&(delete this.#s[l],m.reject("Timeout"))},i)};this.#s[l]=I,this.#r()?this.activateCommand(h):this.#l.push(h)})}activateCommand(t){this.#e?.send(JSON.stringify(t))}static \u0275fac=function(n){return new(n||e)};static \u0275prov=v({token:e,factory:e.\u0275fac,providedIn:"root"})};function Ke(e){if(typeof e!="string")return null;let n=new TextEncoder().encode(e);return window.btoa(String.fromCharCode(...n))}var $e=(e,t)=>{let o=c(T).config(),s=c(g);if(o===null)return t(e);let r=c(O),u=Ke(e.body),i={};e.headers.keys().forEach(d=>{i[d]=e.headers.get(d)??""});let a=e.headers.get("timeout"),p=a!==null?parseInt(a):s.defaultTimeout,l=r.sendCommand(o.accessToken,o.clientId,e.method,e.url,u,i,p);return new B(d=>{l.then(h=>{let I=new Y;i!=null&&Object.keys(i).forEach(S=>{I.set(S,i[S])});let m=new X({body:h.body,status:h.code,statusText:"OK",headers:I});d.next(m),d.complete()})})};var Me={providers:[J(),re(me,se()),Z(ee(),Q([$e,we])),b,{provide:g,useValue:ue},{provide:_,useValue:Ae()},ae]};te(x,Me);
|