@duplicati/ngclient 0.0.122 → 0.0.124

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- import{g as k}from"./chunk-V7XW25LT.js";import{a as X}from"./chunk-C5B4MW2I.js";import{l as x}from"./chunk-VPTXHYYV.js";import"./chunk-43BIRTPL.js";import"./chunk-FP6LM56A.js";import"./chunk-M5RL4LRX.js";import"./chunk-HIW2CN45.js";import"./chunk-4V45XF67.js";import{a as g}from"./chunk-UEYPJIJG.js";import"./chunk-2CXHZS6X.js";import"./chunk-XHPURHO2.js";import"./chunk-7V4TPS4B.js";import"./chunk-T5WAKBP3.js";import"./chunk-LUKUBN2Z.js";import"./chunk-RHW5QVAY.js";import"./chunk-DLJSVAM2.js";import"./chunk-ABANCAM5.js";import"./chunk-FSKPPAVO.js";import"./chunk-FQ55IACT.js";import{a as I,b as G,c as W,d as h,e as y,f as v}from"./chunk-WRKRV6RQ.js";import"./chunk-DYTQQHMA.js";import{q as w,v as K}from"./chunk-ESAGJOZZ.js";import"./chunk-N5FH4YAX.js";import"./chunk-GQGMGFDX.js";import"./chunk-EBXJGPRA.js";import"./chunk-QUOBR5MG.js";import{Db as i,Eb as n,Fb as a,Pb as _,Qb as F,Rc as N,Ua as d,Wb as E,Z as c,gb as A,lb as $,ub as r,uc as M,va as C,vc as T,wb as L,wc as R,zb as O}from"./chunk-4KE2I7OA.js";import"./chunk-7CGTOI24.js";var b=()=>["/restore-from-files/destination"],z=()=>["/restore-from-files/encryption"],B=()=>["/restore-from-files/select-files"],U=()=>["/restore-from-files/options"],j=e=>["/restore-draft",e,"select-files"],H=e=>["/restore-draft",e,"options"],V=e=>["/restore",e,"select-files"],q=e=>["/restore",e,"options"],J=e=>["/restore",e,"progress"];function Q(e,o){e&1&&(i(0,"div",9),_(1,0),a(2,"spk-radio"),F(),n(),i(3,"div",9),_(4,1),a(5,"spk-radio"),F(),n(),i(6,"div",9),_(7,2),a(8,"spk-radio"),F(),n(),i(9,"div",9),_(10,3),a(11,"spk-radio"),F(),n()),e&2&&(r("routerLink",T(4,b)),d(3),r("routerLink",T(5,z)),d(3),r("routerLink",T(6,B)),d(3),r("routerLink",T(7,U)))}function Y(e,o){if(e&1&&(i(0,"div",9),_(1,4),a(2,"spk-radio"),F(),n(),i(3,"div",9),_(4,5),a(5,"spk-radio"),F(),n()),e&2){let t=E();r("routerLink",R(2,j,t.backupId())),d(3),r("routerLink",R(4,H,t.backupId()))}}function Z(e,o){if(e&1&&(i(0,"div",9),_(1,6),a(2,"spk-radio"),F(),n(),i(3,"div",9),_(4,7),a(5,"spk-radio"),F(),n()),e&2){let t=E();r("routerLink",R(2,V,t.backupId())),d(3),r("routerLink",R(4,q,t.backupId()))}}function ee(e,o){if(e&1&&(i(0,"div",9),_(1,8),a(2,"spk-radio"),F(),n()),e&2){let t=E();r("routerLink",R(1,J,t.backupId()))}}var D=class e{#t=c(G);#i=c(h);#e=c(k);#n=g(this.#t.params);#o=g(this.#t.url);#a=g(this.#t.children[0].url);backupId=this.#e.backupId;isDraft=this.#e.isDraft;isFileRestore=this.#e.isFileRestore;isProgressPage=C(!1);paramsChanged=N(()=>{let o=this.#a(),t=this.#n()?.id,s=!!this.#o()?.find(S=>S.path==="restore-draft"),p=!!this.#o()?.find(S=>S.path==="restore-from-files"),u=!!o?.find(S=>S.path==="progress");this.isProgressPage.set(u),this.#e.init(t,p,p||s)});ngOnInit(){this.#i.events.subscribe(o=>{if(o instanceof I){let t=o.urlAfterRedirects;this.isProgressPage.set(t.includes("progress"))}})}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=A({type:e,selectors:[["app-restore-flow"]],hostVars:2,hostBindings:function(t,s){t&2&&L("full-width",s.isProgressPage())},features:[M([k,x])],decls:8,vars:2,consts:()=>{let o;o=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_RADIO: Destination `;let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_RADIO: Encryption `;let s;s=$localize`${"\uFFFD#8\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_SPK_RADIO: Select files `;let p;p=$localize`${"\uFFFD#11\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SPK_RADIO: Options `;let u;u=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_RADIO: Select files `;let S;S=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_RADIO: Options `;let f;f=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_RADIO: Select files `;let P;P=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_RADIO: Options `;let m;return m=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_RADIO: Progress `,[o,t,s,p,u,S,f,P,m,["step","","routerLinkActive","active",3,"routerLink"]]},template:function(t,s){t&1&&(a(0,"app-status-bar"),i(1,"spk-stepper"),$(2,Q,12,8)(3,Y,6,6)(4,Z,6,6)(5,ee,3,3,"div",9),n(),i(6,"section"),a(7,"router-outlet"),n()),t&2&&(d(2),O(s.isFileRestore()?2:s.isDraft()?3:4),d(3),O(s.isProgressPage()?5:-1))},dependencies:[K,w,X,W,y,v],styles:["[_nghost-%COMP%]{display:block}.full-width[_nghost-%COMP%] section[_ngcontent-%COMP%]{max-width:62.5rem}spk-stepper[_ngcontent-%COMP%]{max-width:31.25rem;margin:2.5rem auto}section[_ngcontent-%COMP%]{max-width:31.25rem;margin:0 auto 2.5rem}"],changeDetection:0})};export{D as default};
1
+ import{g as k}from"./chunk-V7XW25LT.js";import{a as X}from"./chunk-6V7W7EKR.js";import{l as x}from"./chunk-VPTXHYYV.js";import"./chunk-43BIRTPL.js";import"./chunk-FP6LM56A.js";import"./chunk-M5RL4LRX.js";import"./chunk-HIW2CN45.js";import"./chunk-4V45XF67.js";import{a as g}from"./chunk-UEYPJIJG.js";import"./chunk-2CXHZS6X.js";import"./chunk-XHPURHO2.js";import"./chunk-7V4TPS4B.js";import"./chunk-T5WAKBP3.js";import"./chunk-LUKUBN2Z.js";import"./chunk-RHW5QVAY.js";import"./chunk-DLJSVAM2.js";import"./chunk-ABANCAM5.js";import"./chunk-FSKPPAVO.js";import"./chunk-FQ55IACT.js";import{a as I,b as G,c as W,d as h,e as y,f as v}from"./chunk-WRKRV6RQ.js";import"./chunk-DYTQQHMA.js";import{q as w,v as K}from"./chunk-ESAGJOZZ.js";import"./chunk-N5FH4YAX.js";import"./chunk-GQGMGFDX.js";import"./chunk-EBXJGPRA.js";import"./chunk-QUOBR5MG.js";import{Db as i,Eb as n,Fb as a,Pb as _,Qb as F,Rc as N,Ua as d,Wb as E,Z as c,gb as A,lb as $,ub as r,uc as M,va as C,vc as T,wb as L,wc as R,zb as O}from"./chunk-4KE2I7OA.js";import"./chunk-7CGTOI24.js";var b=()=>["/restore-from-files/destination"],z=()=>["/restore-from-files/encryption"],B=()=>["/restore-from-files/select-files"],U=()=>["/restore-from-files/options"],j=e=>["/restore-draft",e,"select-files"],H=e=>["/restore-draft",e,"options"],V=e=>["/restore",e,"select-files"],q=e=>["/restore",e,"options"],J=e=>["/restore",e,"progress"];function Q(e,o){e&1&&(i(0,"div",9),_(1,0),a(2,"spk-radio"),F(),n(),i(3,"div",9),_(4,1),a(5,"spk-radio"),F(),n(),i(6,"div",9),_(7,2),a(8,"spk-radio"),F(),n(),i(9,"div",9),_(10,3),a(11,"spk-radio"),F(),n()),e&2&&(r("routerLink",T(4,b)),d(3),r("routerLink",T(5,z)),d(3),r("routerLink",T(6,B)),d(3),r("routerLink",T(7,U)))}function Y(e,o){if(e&1&&(i(0,"div",9),_(1,4),a(2,"spk-radio"),F(),n(),i(3,"div",9),_(4,5),a(5,"spk-radio"),F(),n()),e&2){let t=E();r("routerLink",R(2,j,t.backupId())),d(3),r("routerLink",R(4,H,t.backupId()))}}function Z(e,o){if(e&1&&(i(0,"div",9),_(1,6),a(2,"spk-radio"),F(),n(),i(3,"div",9),_(4,7),a(5,"spk-radio"),F(),n()),e&2){let t=E();r("routerLink",R(2,V,t.backupId())),d(3),r("routerLink",R(4,q,t.backupId()))}}function ee(e,o){if(e&1&&(i(0,"div",9),_(1,8),a(2,"spk-radio"),F(),n()),e&2){let t=E();r("routerLink",R(1,J,t.backupId()))}}var D=class e{#t=c(G);#i=c(h);#e=c(k);#n=g(this.#t.params);#o=g(this.#t.url);#a=g(this.#t.children[0].url);backupId=this.#e.backupId;isDraft=this.#e.isDraft;isFileRestore=this.#e.isFileRestore;isProgressPage=C(!1);paramsChanged=N(()=>{let o=this.#a(),t=this.#n()?.id,s=!!this.#o()?.find(S=>S.path==="restore-draft"),p=!!this.#o()?.find(S=>S.path==="restore-from-files"),u=!!o?.find(S=>S.path==="progress");this.isProgressPage.set(u),this.#e.init(t,p,p||s)});ngOnInit(){this.#i.events.subscribe(o=>{if(o instanceof I){let t=o.urlAfterRedirects;this.isProgressPage.set(t.includes("progress"))}})}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=A({type:e,selectors:[["app-restore-flow"]],hostVars:2,hostBindings:function(t,s){t&2&&L("full-width",s.isProgressPage())},features:[M([k,x])],decls:8,vars:2,consts:()=>{let o;o=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_RADIO: Destination `;let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_RADIO: Encryption `;let s;s=$localize`${"\uFFFD#8\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_SPK_RADIO: Select files `;let p;p=$localize`${"\uFFFD#11\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SPK_RADIO: Options `;let u;u=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_RADIO: Select files `;let S;S=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_RADIO: Options `;let f;f=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_RADIO: Select files `;let P;P=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_RADIO: Options `;let m;return m=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_RADIO: Progress `,[o,t,s,p,u,S,f,P,m,["step","","routerLinkActive","active",3,"routerLink"]]},template:function(t,s){t&1&&(a(0,"app-status-bar"),i(1,"spk-stepper"),$(2,Q,12,8)(3,Y,6,6)(4,Z,6,6)(5,ee,3,3,"div",9),n(),i(6,"section"),a(7,"router-outlet"),n()),t&2&&(d(2),O(s.isFileRestore()?2:s.isDraft()?3:4),d(3),O(s.isProgressPage()?5:-1))},dependencies:[K,w,X,W,y,v],styles:["[_nghost-%COMP%]{display:block}.full-width[_nghost-%COMP%] section[_ngcontent-%COMP%]{max-width:62.5rem}spk-stepper[_ngcontent-%COMP%]{max-width:31.25rem;margin:2.5rem auto}section[_ngcontent-%COMP%]{max-width:31.25rem;margin:0 auto 2.5rem}"],changeDetection:0})};export{D as default};
@@ -1 +1 @@
1
- import{a as $}from"./chunk-C5B4MW2I.js";import{a as R}from"./chunk-UEYPJIJG.js";import"./chunk-XHPURHO2.js";import"./chunk-7V4TPS4B.js";import"./chunk-T5WAKBP3.js";import"./chunk-LUKUBN2Z.js";import"./chunk-RHW5QVAY.js";import"./chunk-DLJSVAM2.js";import"./chunk-ABANCAM5.js";import"./chunk-FSKPPAVO.js";import"./chunk-FQ55IACT.js";import{b as A,e as N}from"./chunk-WRKRV6RQ.js";import"./chunk-DYTQQHMA.js";import{a as k,g as B}from"./chunk-ESAGJOZZ.js";import{h as O}from"./chunk-N5FH4YAX.js";import"./chunk-GQGMGFDX.js";import"./chunk-EBXJGPRA.js";import"./chunk-QUOBR5MG.js";import{Ab as f,Bb as S,Cb as T,Db as F,Eb as a,Fb as r,Pb as _,Qb as c,Qc as M,Rb as u,Ua as i,Ub as g,Vb as I,Z as m,gb as C,jc as E,lb as p,lc as L,va as l,zb as s}from"./chunk-4KE2I7OA.js";import"./chunk-7CGTOI24.js";function b(e,t){e&1&&u(0,2,1)}function P(e,t){e&1&&u(0,2,2)}function h(e,t){e&1&&u(0,2,3)}function v(e,t){e&1&&u(0,2,4)}function U(e,t){if(e&1&&(E(0),r(1,"br")),e&2){let n=t.$implicit;L(" ",n," ")}}var D=class e{#t=m(O);#e=m(A);#n=R(this.#e.params);runId=M(()=>this.#n()?.runId);offset=l(0);status=l("starting");messageLog=l([]);interval=setInterval(()=>{this.#t.getApiV1CommandlineByRunid({runid:this.runId(),offset:this.offset(),pagesize:100}).subscribe(t=>{this.offset.set(t.Count),this.evalStatus(t),this.messageLog.update(n=>[...n,...t.Items])})},1e3);evalStatus(t){t.Started===!0&&t.Finished===!0&&(this.status.set("finished"),clearInterval(this.interval)),t.Started===!0&&t.Finished===!1&&this.status.set("started")}abort(){this.#t.postApiV1CommandlineByRunidAbort({runid:this.runId()}).subscribe({next:t=>{this.status.set("aborted"),clearInterval(this.interval)}})}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=C({type:e,selectors:[["app-commandline-result"]],decls:18,vars:4,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let n;n=$localize` Running commandline task... ${"\uFFFD#8\uFFFD"}:START_TAG_BUTTON:Abort${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_BUTTON:`;let o;return o=$localize`${"\uFFFD*11:1\uFFFD"}:START_BLOCK_IF: Starting... ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*12:2\uFFFD"}:START_BLOCK_IF_1: Started! ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*13:3\uFFFD"}:START_BLOCK_IF_2: Finished! ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*14:4\uFFFD"}:START_BLOCK_IF_3: Aborted! ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:`,o=g(o),[t,n,o,[1,"back"],["type","button","spk-button","","routerLink","../",1,"small"],["type","button","spk-button","",1,"small",3,"click"],[1,"status"]]},template:function(n,o){n&1&&(r(0,"app-status-bar"),F(1,"section")(2,"div",3)(3,"button",4),_(4,0),r(5,"spk-icon"),c(),a()(),F(6,"h3"),_(7,1),F(8,"button",5),I("click",function(){return o.abort()}),a(),c(),a(),F(9,"div",6),_(10,2),p(11,b,1,0)(12,P,1,0)(13,h,1,0)(14,v,1,0),c(),a(),F(15,"code"),S(16,U,2,1,null,null,f),a()()),n&2&&(i(11),s(o.status()==="starting"?11:-1),i(),s(o.status()==="started"?12:-1),i(),s(o.status()==="finished"?13:-1),i(),s(o.status()==="aborted"?14:-1),i(2),T(o.messageLog()))},dependencies:[$,k,B,N],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;padding:2.5rem;gap:1.25rem}code[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--base-8),#000 70%);color:#fff;padding:2.5rem 2.5rem 2.5rem 1.5rem;border-radius:var(--shape-3);overflow:auto;white-space:pre}"],changeDetection:0})};export{D as default};
1
+ import{a as $}from"./chunk-6V7W7EKR.js";import{a as R}from"./chunk-UEYPJIJG.js";import"./chunk-XHPURHO2.js";import"./chunk-7V4TPS4B.js";import"./chunk-T5WAKBP3.js";import"./chunk-LUKUBN2Z.js";import"./chunk-RHW5QVAY.js";import"./chunk-DLJSVAM2.js";import"./chunk-ABANCAM5.js";import"./chunk-FSKPPAVO.js";import"./chunk-FQ55IACT.js";import{b as A,e as N}from"./chunk-WRKRV6RQ.js";import"./chunk-DYTQQHMA.js";import{a as k,g as B}from"./chunk-ESAGJOZZ.js";import{h as O}from"./chunk-N5FH4YAX.js";import"./chunk-GQGMGFDX.js";import"./chunk-EBXJGPRA.js";import"./chunk-QUOBR5MG.js";import{Ab as f,Bb as S,Cb as T,Db as F,Eb as a,Fb as r,Pb as _,Qb as c,Qc as M,Rb as u,Ua as i,Ub as g,Vb as I,Z as m,gb as C,jc as E,lb as p,lc as L,va as l,zb as s}from"./chunk-4KE2I7OA.js";import"./chunk-7CGTOI24.js";function b(e,t){e&1&&u(0,2,1)}function P(e,t){e&1&&u(0,2,2)}function h(e,t){e&1&&u(0,2,3)}function v(e,t){e&1&&u(0,2,4)}function U(e,t){if(e&1&&(E(0),r(1,"br")),e&2){let n=t.$implicit;L(" ",n," ")}}var D=class e{#t=m(O);#e=m(A);#n=R(this.#e.params);runId=M(()=>this.#n()?.runId);offset=l(0);status=l("starting");messageLog=l([]);interval=setInterval(()=>{this.#t.getApiV1CommandlineByRunid({runid:this.runId(),offset:this.offset(),pagesize:100}).subscribe(t=>{this.offset.set(t.Count),this.evalStatus(t),this.messageLog.update(n=>[...n,...t.Items])})},1e3);evalStatus(t){t.Started===!0&&t.Finished===!0&&(this.status.set("finished"),clearInterval(this.interval)),t.Started===!0&&t.Finished===!1&&this.status.set("started")}abort(){this.#t.postApiV1CommandlineByRunidAbort({runid:this.runId()}).subscribe({next:t=>{this.status.set("aborted"),clearInterval(this.interval)}})}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=C({type:e,selectors:[["app-commandline-result"]],decls:18,vars:4,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let n;n=$localize` Running commandline task... ${"\uFFFD#8\uFFFD"}:START_TAG_BUTTON:Abort${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_BUTTON:`;let o;return o=$localize`${"\uFFFD*11:1\uFFFD"}:START_BLOCK_IF: Starting... ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*12:2\uFFFD"}:START_BLOCK_IF_1: Started! ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*13:3\uFFFD"}:START_BLOCK_IF_2: Finished! ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*14:4\uFFFD"}:START_BLOCK_IF_3: Aborted! ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:`,o=g(o),[t,n,o,[1,"back"],["type","button","spk-button","","routerLink","../",1,"small"],["type","button","spk-button","",1,"small",3,"click"],[1,"status"]]},template:function(n,o){n&1&&(r(0,"app-status-bar"),F(1,"section")(2,"div",3)(3,"button",4),_(4,0),r(5,"spk-icon"),c(),a()(),F(6,"h3"),_(7,1),F(8,"button",5),I("click",function(){return o.abort()}),a(),c(),a(),F(9,"div",6),_(10,2),p(11,b,1,0)(12,P,1,0)(13,h,1,0)(14,v,1,0),c(),a(),F(15,"code"),S(16,U,2,1,null,null,f),a()()),n&2&&(i(11),s(o.status()==="starting"?11:-1),i(),s(o.status()==="started"?12:-1),i(),s(o.status()==="finished"?13:-1),i(),s(o.status()==="aborted"?14:-1),i(2),T(o.messageLog()))},dependencies:[$,k,B,N],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;padding:2.5rem;gap:1.25rem}code[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--base-8),#000 70%);color:#fff;padding:2.5rem 2.5rem 2.5rem 1.5rem;border-radius:var(--shape-3);overflow:auto;white-space:pre}"],changeDetection:0})};export{D as default};
@@ -0,0 +1 @@
1
+ import{a as de}from"./chunk-XHPURHO2.js";import{c as Se,e as me,h as Te,j as ge,s as R}from"./chunk-ABANCAM5.js";import{a as ie}from"./chunk-FSKPPAVO.js";import{a as oe,b as ae,e as se,g as le,i as I,l as re,p as _e,q as pe,s as ue,t as ce}from"./chunk-ESAGJOZZ.js";import{h as b}from"./chunk-N5FH4YAX.js";import{a as fe}from"./chunk-GQGMGFDX.js";import{pa as ne}from"./chunk-EBXJGPRA.js";import{Ab as Y,Ac as Q,Bb as j,Bc as ee,Cb as Z,Db as a,Eb as s,F as N,Fb as E,Jb as q,Pb as A,Qb as P,Qc as te,Rb as u,Ua as r,Ub as J,Vb as _,Wb as f,Z as m,ea as H,fa as W,gb as g,jc as c,lb as v,lc as k,mc as x,oc as O,pc as D,qc as F,ra as h,ub as T,va as p,vb as V,wb as S,zb as U,zc as L}from"./chunk-4KE2I7OA.js";function Fe(l,i){if(l&1){let n=q();a(0,"spk-radio",10),_("click",function(){let t=H(n).$implicit,o=f();return W(o.pauseOption.set(t.value))}),c(1),s()}if(l&2){let n=i.$implicit,e=f();S("active",e.pauseOption()===n.value),r(),k(" ",n.label," ")}}var Me=[{label:$localize`5 minutes`,value:"5m"},{label:$localize`10 minutes`,value:"10m"},{label:$localize`15 minutes`,value:"15m"},{label:$localize`30 minutes`,value:"30m"},{label:$localize`1 hour`,value:"1h"},{label:$localize`4 hours`,value:"4h"},{label:$localize`8 hours`,value:"8h"},{label:$localize`24 hours`,value:"24h"},{label:$localize`Until resumed`,value:void 0}],y=class l{#e=m(b);pauseOptions=p(Me);closed=h();isSubmitting=p(!1);pauseTransfers=p(!1);pauseOption=p(void 0);submit(){this.isSubmitting.set(!0);let i=this.pauseTransfers()||null,n=this.pauseOption();this.#e.postApiV1ServerstatePause({duration:n,pauseTransfers:i}).pipe(N(()=>this.isSubmitting.set(!1))).subscribe({next:e=>{this.closed.emit()}})}static \u0275fac=function(n){return new(n||l)};static \u0275cmp=g({type:l,selectors:[["app-pause-dialog"]],outputs:{closed:"closed"},decls:17,vars:4,consts:()=>{let i;i=$localize`Pause settings`;let n;n=$localize` Also pause transfers `;let e;e=$localize`If you pause transfers they could time out and cause retries or failures.`;let t;t=$localize`Cancel`;let o;return o=$localize` Update settings `,[i,n,e,t,o,["header",""],["content",""],[1,"radios"],[1,"primary","raised",3,"active"],[1,"check-wrap"],[1,"primary","raised",3,"click"],["type","warning"],["footer",""],["spk-button","",3,"click"],["spk-button","",1,"raised","primary",3,"click"]]},template:function(n,e){n&1&&(a(0,"header",5)(1,"h3"),u(2,0),s()(),a(3,"div",6)(4,"div",7),j(5,Fe,2,3,"spk-radio",8,Y),s(),a(7,"div",9)(8,"spk-checkbox",10),_("click",function(){return e.pauseTransfers.set(!e.pauseTransfers())}),u(9,1),s(),a(10,"spk-alert",11),u(11,2),s()()(),a(12,"footer",12)(13,"button",13),_("click",function(){return e.closed.emit()}),u(14,3),s(),a(15,"button",14),_("click",function(){return e.submit()}),u(16,4),s()()),n&2&&(r(5),Z(e.pauseOptions()),r(3),S("active",e.pauseTransfers()),r(7),S("loader",e.isSubmitting()))},dependencies:[R,pe,I,ae],styles:["[_nghost-%COMP%]{--dialog-p: 1.5rem;display:block}h3[_ngcontent-%COMP%]{font:var(--title-30)}.radios[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.check-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:2rem 0 0}"],changeDetection:0})};var Ae={Byte:"B",KByte:"KB",MByte:"MB",GByte:"GB",TByte:"TB",PByte:"PB"},Ne=["mbps","gbps"],Pe=8,w=1024,B=w*1024,z=B*1024,X=z*1024,Oe=X*1024,he={B:1,KB:w,MB:B,GB:z,TB:X,PB:Oe},ke=1e3,$=ke*1e3,G=$*1e3,Ie=[{threshold:Oe,unitPrefix:"PByte"},{threshold:X,unitPrefix:"TByte"},{threshold:z,unitPrefix:"GByte"},{threshold:B,unitPrefix:"MByte"},{threshold:w,unitPrefix:"KByte"},{threshold:1,unitPrefix:"Byte"}],M=class l{#e=m(b);closed=h();isSubmitting=p(!1);sizeOptions=p([...Ne]);maxUploadActive=p(!1);maxDownloadActive=p(!1);maxUpload=p(0);maxDownload=p(0);maxUploadUnit=p("mbps");maxDownloadUnit=p("mbps");ngOnInit(){this.init()}convertToBitsPerSecondUnits(i,n){let t=i*(he[n.toUpperCase()]||B)*Pe;return t===0?{value:0,unit:"mbps"}:t>=G?{value:parseFloat((t/G).toFixed(2)),unit:"gbps"}:{value:parseFloat((t/$).toFixed(2)),unit:"mbps"}}convertFromBitsPerSecondUnits(i,n){let e=0;switch(n){case"gbps":e=i*G;break;case"mbps":e=i*$;break}let t=e/Pe;if(t===0)return{valueForApi:0,unitPrefixForApi:"Byte"};for(let{threshold:o,unitPrefix:d}of Ie)if(t>=o)return{valueForApi:Math.round(t/o),unitPrefixForApi:d};return{valueForApi:Math.round(t),unitPrefixForApi:"Byte"}}init(){this.#e.getApiV1Serversettings().subscribe({next:i=>{let n=i?.["max-upload-speed"],e=i?.["max-download-speed"];if(n&&n!==""){this.maxUploadActive.set(!0);let t=n.match(/^(\d+(?:\.\d+)?)([A-Za-z]+)$/);if(t){let o=parseFloat(t[1]),d=t[2],C=this.convertToBitsPerSecondUnits(o,d);this.maxUpload.set(C.value),this.maxUploadUnit.set(C.unit)}else console.warn("Unexpected max-upload-speed format from API:",n),this.resetUpload()}else this.resetUpload();if(e&&e!==""){this.maxDownloadActive.set(!0);let t=e.match(/^(\d+(?:\.\d+)?)([A-Za-z]+)$/);if(t){let o=parseFloat(t[1]),d=t[2],C=this.convertToBitsPerSecondUnits(o,d);this.maxDownload.set(C.value),this.maxDownloadUnit.set(C.unit)}else console.warn("Unexpected max-download-speed format from API:",e),this.resetDownload()}else this.resetDownload()},error:i=>{console.error("Failed to get server settings:",i),this.resetDownload(),this.resetUpload()}})}resetDownload(){this.maxDownloadActive.set(!1),this.maxDownload.set(0),this.maxDownloadUnit.set("mbps")}resetUpload(){this.maxUploadActive.set(!1),this.maxUpload.set(0),this.maxUploadUnit.set("mbps")}blockDecimalKeys(i){if([".",","].includes(i.key))return i.preventDefault()}cleanupInputAfterPasting(i){i.preventDefault();let n=i.clipboardData?.getData("text/plain");if(!n)return;let e=n.replaceAll(/[\.,]/g,"");i.target.value=e}submit(){this.isSubmitting.set(!0);let i="",n="";if(this.maxUploadActive()){let{valueForApi:e,unitPrefixForApi:t}=this.convertFromBitsPerSecondUnits(this.maxUpload(),this.maxUploadUnit()),o=Ae[t];o?i=`${e}${o}`:console.error(`Invalid unit prefix for API submission (upload): ${t}. Defaulting to empty string.`)}if(this.maxDownloadActive()){let{valueForApi:e,unitPrefixForApi:t}=this.convertFromBitsPerSecondUnits(this.maxDownload(),this.maxDownloadUnit()),o=Ae[t];o?n=`${e}${o}`:console.error(`Invalid unit prefix for API submission (download): ${t}. Defaulting to empty string.`)}this.#e.patchApiV1Serversettings({requestBody:{"max-upload-speed":i,"max-download-speed":n}}).pipe(N(()=>this.isSubmitting.set(!1))).subscribe({next:()=>{this.closed.emit(!0)},error:e=>{console.error("Failed to submit throttle settings:",e)}})}static \u0275fac=function(n){return new(n||l)};static \u0275cmp=g({type:l,selectors:[["app-throttle-settings-dialog"]],outputs:{closed:"closed"},decls:28,vars:16,consts:()=>{let i;i=$localize`Throttle network speed`;let n;n=$localize`We will round bits to the nearest byte value.`;let e;e=$localize`Cancel`;let t;return t=$localize` Update settings `,[i,n,e,t,["content",""],[1,"column"],[1,"field-row"],[1,"primary","raised",3,"click"],["type","number",3,"paste","keydown","ngModelChange","ngModel","disabled"],[3,"isClearable","options"],["type","text",3,"ngModelChange","ngModel"],["footer",""],["spk-button","",3,"click"],["spk-button","",1,"raised","primary",3,"click"]]},template:function(n,e){n&1&&(a(0,"header")(1,"h3"),u(2,0),s(),a(3,"p"),u(4,1),s()(),a(5,"div",4)(6,"div",5)(7,"div",6)(8,"label"),c(9,"Max upload speed"),s(),a(10,"spk-checkbox",7),_("click",function(){return e.maxUploadActive.set(!e.maxUploadActive())}),s(),a(11,"spk-form-field")(12,"input",8),_("paste",function(o){return e.cleanupInputAfterPasting(o)})("keydown",function(o){return e.blockDecimalKeys(o)}),F("ngModelChange",function(o){return D(e.maxUpload,o)||(e.maxUpload=o),o}),s()(),a(13,"spk-select",9)(14,"input",10),F("ngModelChange",function(o){return D(e.maxUploadUnit,o)||(e.maxUploadUnit=o),o}),s()()(),a(15,"div",6)(16,"label"),c(17,"Max download speed"),s(),a(18,"spk-checkbox",7),_("click",function(){return e.maxDownloadActive.set(!e.maxDownloadActive())}),s(),a(19,"spk-form-field")(20,"input",8),_("paste",function(o){return e.cleanupInputAfterPasting(o)})("keydown",function(o){return e.blockDecimalKeys(o)}),F("ngModelChange",function(o){return D(e.maxDownload,o)||(e.maxDownload=o),o}),s()(),a(21,"spk-select",9)(22,"input",10),F("ngModelChange",function(o){return D(e.maxDownloadUnit,o)||(e.maxDownloadUnit=o),o}),s()()()()(),a(23,"footer",11)(24,"button",12),_("click",function(){return e.closed.emit(!1)}),u(25,2),s(),a(26,"button",13),_("click",function(){return e.submit()}),u(27,3),s()()),n&2&&(r(10),S("active",e.maxUploadActive()),r(2),O("ngModel",e.maxUpload),T("disabled",!e.maxUploadActive()),r(),T("isClearable",!1)("options",e.sizeOptions()),r(),O("ngModel",e.maxUploadUnit),r(4),S("active",e.maxDownloadActive()),r(2),O("ngModel",e.maxDownload),T("disabled",!e.maxDownloadActive()),r(),T("isClearable",!1)("options",e.sizeOptions()),r(),O("ngModel",e.maxDownloadUnit),r(4),S("loader",e.isSubmitting()))},dependencies:[R,Se,ge,me,Te,re,I,ce],styles:['[_nghost-%COMP%]{display:block}h3[_ngcontent-%COMP%]{font:var(--title-30)}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;padding:1rem;gap:.5rem;margin-bottom:1rem}.column[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.field-row[_ngcontent-%COMP%]{display:grid;grid-template-areas:"label label label" "checkbox input select";grid-template-columns:auto 1fr auto;align-items:center;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{grid-area:label}.field-row[_ngcontent-%COMP%] spk-form-field[_ngcontent-%COMP%]{grid-area:input}.field-row[_ngcontent-%COMP%] spk-select[_ngcontent-%COMP%]{grid-area:select}'],changeDetection:0})};function be(l,i){if(l&1&&(a(0,"div"),c(1),s(),E(2,"spk-progress-bar",9)),l&2){let n=f();r(),x("",n.statusData().actionText," - ",n.statusData().statusText,""),r(),T("value",n.statusData().progress*100)}}function Re(l,i){if(l&1&&(a(0,"div",5),c(1),a(2,"spk-icon"),c(3,"clock"),s(),c(4),L(5,"relativeTime"),L(6,"date"),s()),l&2){let n,e=f();r(),k(" ",(n=e.nextBackup().backup)==null||n.Backup==null?null:n.Backup.Name," - "),r(3),x(" ",Q(5,3,e.nextBackup().time)," at ",ee(6,5,e.nextBackup().time,"shortTime")," ")}}function ye(l,i){l&1&&(a(0,"div",5),u(1,1),s())}function Be(l,i){l&1&&(a(0,"div",6),A(1,2),E(2,"spk-spinner"),P(),s()),l&2&&(r(2),V("--spinner-size","12px")("--spinner-thickness","2px"))}function ve(l,i){l&1&&(A(0,0,1),E(1,"spk-icon"),P())}function Ue(l,i){l&1&&(A(0,0,2),E(1,"spk-icon"),P())}var De=new Date,K=class l{#e=m(de);#t=m(se);#n=m(ie);minsAgo=De.setMinutes(De.getMinutes()-1);statusData=this.#e.statusData;serverState=this.#e.serverState;clientIsRunning=this.#e.clientIsRunning;isResuming=this.#e.isResuming;nextBackup=te(()=>({backup:this.serverState()?.ProposedSchedule?.[0]?.backup,time:this.serverState()?.ProposedSchedule?.[0]?.Item2}));openThrottleSettingsDialog(){this.#t.open(M,{maxWidth:"550px",width:"100%"})}openPauseDialog(){this.#t.open(y,{maxWidth:"550px",width:"100%"})}pauseResume(){if(this.clientIsRunning()){this.openPauseDialog();return}this.#e.pauseResume().subscribe()}ngAfterViewInit(){let i=this.#n.relayIsEnabled()?"longpoll":"websocket";this.#e.setConnectionMethod(i)}static \u0275fac=function(n){return new(n||l)};static \u0275cmp=g({type:l,selectors:[["app-status-bar"]],decls:14,vars:4,consts:()=>{let i;i=$localize`${"\uFFFD*9:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:pause${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Pause ${"\uFFFD/*9:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*10:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:play${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Start ${"\uFFFD/*10:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,i=J(i);let n;n=$localize`No scheduled tasks`;let e;return e=$localize` Loading ${"\uFFFD#2\uFFFD"}:START_TAG_SPK_SPINNER:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_SPINNER:`,[i,n,e,[1,"current-backup"],[1,"current-backup-progress"],[1,"label"],[1,"label","label-loading"],[1,"current-backup-actions"],["spk-button","",3,"click"],[1,"raised","primary",3,"value"]]},template:function(n,e){if(n&1&&(a(0,"div",3)(1,"div",4),v(2,be,3,3)(3,Re,7,8,"div",5)(4,ye,2,0,"div",5)(5,Be,3,4,"div",6),s(),a(6,"div",7)(7,"button",8),_("click",function(){return e.pauseResume()}),A(8,0),v(9,ve,2,0)(10,Ue,2,0),P(),s(),a(11,"button",8),_("click",function(){return e.openThrottleSettingsDialog()}),a(12,"spk-icon"),c(13,"speedometer"),s()()()()),n&2){let t;r(2),U((t=e.serverState())!=null&&t.ActiveTask&&(!((t=e.statusData())==null||t.task==null)&&t.task.Status)&&((t=e.statusData())==null||t.task==null?null:t.task.Status)!=="Completed"?2:e.nextBackup().backup||e.nextBackup().time?3:(t=e.serverState())!=null&&t.ActiveTask?5:4),r(5),S("loader",e.isResuming()),r(2),U(e.clientIsRunning()?9:10)}},dependencies:[_e,fe,ne,oe,le,ue],styles:["[_nghost-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:1rem;min-height:3.875rem;border-bottom:1px solid var(--base-4)}.current-backup[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%;gap:.5rem}.current-backup-progress[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;min-width:18.75rem}.current-backup-progress[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.current-backup-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}.label-loading[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.25rem}"],changeDetection:0})};export{K as a};
@@ -1 +1 @@
1
- import{a as ae}from"./chunk-C5B4MW2I.js";import{a as te}from"./chunk-UEYPJIJG.js";import"./chunk-XHPURHO2.js";import"./chunk-7V4TPS4B.js";import{a as Q}from"./chunk-T5WAKBP3.js";import"./chunk-LUKUBN2Z.js";import"./chunk-RHW5QVAY.js";import"./chunk-DLJSVAM2.js";import{c as Y,e as Z,h as x,s as ee}from"./chunk-ABANCAM5.js";import"./chunk-FSKPPAVO.js";import"./chunk-FQ55IACT.js";import{b as z,e as q}from"./chunk-WRKRV6RQ.js";import"./chunk-DYTQQHMA.js";import{a as H,g as W,l as j}from"./chunk-ESAGJOZZ.js";import{h as J}from"./chunk-N5FH4YAX.js";import"./chunk-GQGMGFDX.js";import"./chunk-EBXJGPRA.js";import"./chunk-QUOBR5MG.js";import{Db as i,E as g,Eb as a,F as d,Fb as l,N as E,Pb as p,Qb as r,Qc as k,Rb as F,Rc as h,Sb as L,Tb as U,Ua as s,Vb as u,Z as D,gb as y,jc as C,lb as v,oc as w,pc as X,qc as V,r as O,ub as A,va as c,wb as P,yb as G,zb as K}from"./chunk-4KE2I7OA.js";import"./chunk-7CGTOI24.js";function ie(S,t){S&1&&(i(0,"spk-icon",18),C(1,"check"),a())}function ne(S,t){S&1&&(i(0,"spk-icon",18),C(1,"warning"),a())}var m=class S{#a=D(z);#i=D(Q);#e=D(J);#t="";backupId=te(this.#a.params.pipe(O(t=>t.id)));activeBackup=k(()=>{let t=this.#i.backups().find(_=>_.Backup?.ID===this.backupId());return this.#t=t?.Backup?.DBPath??"",t});backupFilePath=c("");lastValidatedPath=c("");isValidatedPath=k(()=>this.lastValidatedPath()===this.backupFilePath());pathHasChanged=k(()=>this.backupFilePath()!==this.#t);backupFilePathEffect=h(()=>{let t=this.backupFilePath();t!==""&&this.#e.postApiV1FilesystemValidate({requestBody:{path:t}}).subscribe({next:()=>this.lastValidatedPath.set(t)})});isRestoring=c(!1);isRepairing=c(!1);isDeleting=c(!1);isSavingDbPath=c(!1);isSavingAndRepairing=c(!1);isMovingDb=c(!1);activeBackupEffect=h(()=>{let t=this.activeBackup();if(!t)return;let _=t.Backup?.DBPath??"";this.backupFilePath.set(_)});repairDatabase(){this.isRepairing.set(!0),this.#e.postApiV1BackupByIdRepair({id:this.backupId()}).pipe(g(1),d(()=>this.isRepairing.set(!1))).subscribe()}deleteDatabase(){this.isDeleting.set(!0),this.#e.postApiV1BackupByIdDeletedb({id:this.backupId()}).pipe(g(1),d(()=>this.isDeleting.set(!1))).subscribe()}restoreDatabase(){this.isRestoring.set(!0),this.#e.postApiV1BackupByIdDeletedb({id:this.backupId()}).pipe(g(1),E(()=>this.#e.postApiV1BackupByIdRepair({id:this.backupId()})),d(()=>this.isRestoring.set(!1))).subscribe()}resetDatabasePath(){this.backupFilePath.set(this.#t)}saveDatabasePath(){this.isSavingDbPath.set(!0),this.#e.postApiV1BackupByIdUpdatedb({id:this.backupId(),requestBody:{path:this.backupFilePath()}}).pipe(d(()=>this.isSavingDbPath.set(!1))).subscribe()}saveAndRepairDatabasePath(){this.isSavingAndRepairing.set(!0),this.#e.postApiV1BackupByIdUpdatedb({id:this.backupId(),requestBody:{path:this.backupFilePath()}}).pipe(E(()=>this.#e.postApiV1BackupByIdRepair({id:this.backupId()})),d(()=>this.isSavingAndRepairing.set(!1)))}moveDatabasePath(){this.isMovingDb.set(!0),this.#e.postApiV1BackupByIdMovedb({id:this.backupId(),requestBody:{path:this.backupFilePath()}}).pipe(d(()=>this.isMovingDb.set(!1))).subscribe()}static \u0275fac=function(_){return new(_||S)};static \u0275cmp=y({type:S,selectors:[["app-database"]],decls:46,vars:18,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let _;_=$localize`Local database for ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let e;e=$localize` Each backup has a local database associated with it, which stores information about the remote backup on the local machine. This makes it faster to perform many operations, and reduces the amount of data that needs to be downloaded for each operation. `;let n;n=$localize`Maintenance`;let T;T=$localize` If the backup and the remote storage is out of sync, Duplicati will require that you perform a repair operation to synchronize the database. If the repair is unsuccessful, you can delete the local database and re-generate. `;let b;b=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:wrench${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: Repair `;let f;f=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:trash${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON: Delete `;let B;B=$localize`${"\uFFFD#25\uFFFD"}:START_TAG_SPK_ICON:clock-counter-clockwise${"\uFFFD/#25\uFFFD"}:CLOSE_TAG_SPK_ICON: Restore (delete and repair) `;let I;I=$localize`Placement`;let M;M=$localize`${"\uFFFD#36\uFFFD"}:START_TAG_SPK_ICON:backspace${"\uFFFD/#36\uFFFD"}:CLOSE_TAG_SPK_ICON: Reset `;let N;N=$localize`${"\uFFFD#39\uFFFD"}:START_TAG_SPK_ICON:floppy-disk${"\uFFFD/#39\uFFFD"}:CLOSE_TAG_SPK_ICON: Save `;let $;$=$localize`${"\uFFFD#42\uFFFD"}:START_TAG_SPK_ICON:wrench${"\uFFFD/#42\uFFFD"}:CLOSE_TAG_SPK_ICON: Save & Repair `;let R;return R=$localize`${"\uFFFD#45\uFFFD"}:START_TAG_SPK_ICON:flow-arrow${"\uFFFD/#45\uFFFD"}:CLOSE_TAG_SPK_ICON: Move existing database `,[t,_,e,n,T,b,f,B,I,M,N,$,R,[1,"back"],["type","button","spk-button","","routerLink","/",1,"small"],[1,"actions","maintenance"],["spk-button","",3,"click","disabled"],["type","text",3,"ngModelChange","ngModel"],["prefix",""],[1,"actions","placement"]]},template:function(_,e){if(_&1&&(l(0,"app-status-bar"),i(1,"section")(2,"div",13)(3,"button",14),p(4,0),l(5,"spk-icon"),r(),a()(),i(6,"article")(7,"h1"),F(8,1),a(),i(9,"p"),F(10,2),a()(),i(11,"article")(12,"h2"),F(13,3),a(),i(14,"p"),F(15,4),a(),i(16,"div",15)(17,"button",16),u("click",function(){return e.repairDatabase()}),p(18,5),l(19,"spk-icon"),r(),a(),i(20,"button",16),u("click",function(){return e.deleteDatabase()}),p(21,6),l(22,"spk-icon"),r(),a(),i(23,"button",16),u("click",function(){return e.restoreDatabase()}),p(24,7),l(25,"spk-icon"),r(),a()()(),i(26,"article")(27,"h2"),F(28,8),a(),i(29,"spk-form-field")(30,"input",17),V("ngModelChange",function(T){return X(e.backupFilePath,T)||(e.backupFilePath=T),T}),a(),v(31,ie,2,0,"spk-icon",18)(32,ne,2,0,"spk-icon",18),a(),i(33,"div",19)(34,"button",16),u("click",function(){return e.resetDatabasePath()}),p(35,9),l(36,"spk-icon"),r(),a(),i(37,"button",16),u("click",function(){return e.saveDatabasePath()}),p(38,10),l(39,"spk-icon"),r(),a(),i(40,"button",16),u("click",function(){return e.saveAndRepairDatabasePath()}),p(41,11),l(42,"spk-icon"),r(),a(),i(43,"button",16),u("click",function(){return e.moveDatabasePath()}),p(44,12),l(45,"spk-icon"),r(),a()()()()),_&2){let n;s(8),L((n=e.activeBackup())==null||n.Backup==null?null:n.Backup.Name),U(8),s(9),P("loader",e.isRepairing()),A("disabled",!e.isValidatedPath()),s(3),P("loader",e.isDeleting()),A("disabled",!e.isValidatedPath()),s(3),P("loader",e.isRestoring()),A("disabled",e.pathHasChanged()),s(6),G(e.isValidatedPath()?"success":"error"),s(),w("ngModel",e.backupFilePath),s(),K(e.isValidatedPath()?31:32),s(3),A("disabled",!e.pathHasChanged()),s(3),A("disabled",!e.pathHasChanged()),s(3),A("disabled",!e.pathHasChanged()),s(3),A("disabled",!e.pathHasChanged())}},dependencies:[ee,Y,Z,x,ae,W,j,H,q],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:2rem}article[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}h1[_ngcontent-%COMP%]{font:var(--title-20)}h2[_ngcontent-%COMP%]{font:var(--title-30)}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"],changeDetection:0})};export{m as default};
1
+ import{a as ae}from"./chunk-6V7W7EKR.js";import{a as te}from"./chunk-UEYPJIJG.js";import"./chunk-XHPURHO2.js";import"./chunk-7V4TPS4B.js";import{a as Q}from"./chunk-T5WAKBP3.js";import"./chunk-LUKUBN2Z.js";import"./chunk-RHW5QVAY.js";import"./chunk-DLJSVAM2.js";import{c as Y,e as Z,h as x,s as ee}from"./chunk-ABANCAM5.js";import"./chunk-FSKPPAVO.js";import"./chunk-FQ55IACT.js";import{b as z,e as q}from"./chunk-WRKRV6RQ.js";import"./chunk-DYTQQHMA.js";import{a as H,g as W,l as j}from"./chunk-ESAGJOZZ.js";import{h as J}from"./chunk-N5FH4YAX.js";import"./chunk-GQGMGFDX.js";import"./chunk-EBXJGPRA.js";import"./chunk-QUOBR5MG.js";import{Db as i,E as g,Eb as a,F as d,Fb as l,N as E,Pb as p,Qb as r,Qc as k,Rb as F,Rc as h,Sb as L,Tb as U,Ua as s,Vb as u,Z as D,gb as y,jc as C,lb as v,oc as w,pc as X,qc as V,r as O,ub as A,va as c,wb as P,yb as G,zb as K}from"./chunk-4KE2I7OA.js";import"./chunk-7CGTOI24.js";function ie(S,t){S&1&&(i(0,"spk-icon",18),C(1,"check"),a())}function ne(S,t){S&1&&(i(0,"spk-icon",18),C(1,"warning"),a())}var m=class S{#a=D(z);#i=D(Q);#e=D(J);#t="";backupId=te(this.#a.params.pipe(O(t=>t.id)));activeBackup=k(()=>{let t=this.#i.backups().find(_=>_.Backup?.ID===this.backupId());return this.#t=t?.Backup?.DBPath??"",t});backupFilePath=c("");lastValidatedPath=c("");isValidatedPath=k(()=>this.lastValidatedPath()===this.backupFilePath());pathHasChanged=k(()=>this.backupFilePath()!==this.#t);backupFilePathEffect=h(()=>{let t=this.backupFilePath();t!==""&&this.#e.postApiV1FilesystemValidate({requestBody:{path:t}}).subscribe({next:()=>this.lastValidatedPath.set(t)})});isRestoring=c(!1);isRepairing=c(!1);isDeleting=c(!1);isSavingDbPath=c(!1);isSavingAndRepairing=c(!1);isMovingDb=c(!1);activeBackupEffect=h(()=>{let t=this.activeBackup();if(!t)return;let _=t.Backup?.DBPath??"";this.backupFilePath.set(_)});repairDatabase(){this.isRepairing.set(!0),this.#e.postApiV1BackupByIdRepair({id:this.backupId()}).pipe(g(1),d(()=>this.isRepairing.set(!1))).subscribe()}deleteDatabase(){this.isDeleting.set(!0),this.#e.postApiV1BackupByIdDeletedb({id:this.backupId()}).pipe(g(1),d(()=>this.isDeleting.set(!1))).subscribe()}restoreDatabase(){this.isRestoring.set(!0),this.#e.postApiV1BackupByIdDeletedb({id:this.backupId()}).pipe(g(1),E(()=>this.#e.postApiV1BackupByIdRepair({id:this.backupId()})),d(()=>this.isRestoring.set(!1))).subscribe()}resetDatabasePath(){this.backupFilePath.set(this.#t)}saveDatabasePath(){this.isSavingDbPath.set(!0),this.#e.postApiV1BackupByIdUpdatedb({id:this.backupId(),requestBody:{path:this.backupFilePath()}}).pipe(d(()=>this.isSavingDbPath.set(!1))).subscribe()}saveAndRepairDatabasePath(){this.isSavingAndRepairing.set(!0),this.#e.postApiV1BackupByIdUpdatedb({id:this.backupId(),requestBody:{path:this.backupFilePath()}}).pipe(E(()=>this.#e.postApiV1BackupByIdRepair({id:this.backupId()})),d(()=>this.isSavingAndRepairing.set(!1)))}moveDatabasePath(){this.isMovingDb.set(!0),this.#e.postApiV1BackupByIdMovedb({id:this.backupId(),requestBody:{path:this.backupFilePath()}}).pipe(d(()=>this.isMovingDb.set(!1))).subscribe()}static \u0275fac=function(_){return new(_||S)};static \u0275cmp=y({type:S,selectors:[["app-database"]],decls:46,vars:18,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let _;_=$localize`Local database for ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let e;e=$localize` Each backup has a local database associated with it, which stores information about the remote backup on the local machine. This makes it faster to perform many operations, and reduces the amount of data that needs to be downloaded for each operation. `;let n;n=$localize`Maintenance`;let T;T=$localize` If the backup and the remote storage is out of sync, Duplicati will require that you perform a repair operation to synchronize the database. If the repair is unsuccessful, you can delete the local database and re-generate. `;let b;b=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:wrench${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: Repair `;let f;f=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:trash${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON: Delete `;let B;B=$localize`${"\uFFFD#25\uFFFD"}:START_TAG_SPK_ICON:clock-counter-clockwise${"\uFFFD/#25\uFFFD"}:CLOSE_TAG_SPK_ICON: Restore (delete and repair) `;let I;I=$localize`Placement`;let M;M=$localize`${"\uFFFD#36\uFFFD"}:START_TAG_SPK_ICON:backspace${"\uFFFD/#36\uFFFD"}:CLOSE_TAG_SPK_ICON: Reset `;let N;N=$localize`${"\uFFFD#39\uFFFD"}:START_TAG_SPK_ICON:floppy-disk${"\uFFFD/#39\uFFFD"}:CLOSE_TAG_SPK_ICON: Save `;let $;$=$localize`${"\uFFFD#42\uFFFD"}:START_TAG_SPK_ICON:wrench${"\uFFFD/#42\uFFFD"}:CLOSE_TAG_SPK_ICON: Save & Repair `;let R;return R=$localize`${"\uFFFD#45\uFFFD"}:START_TAG_SPK_ICON:flow-arrow${"\uFFFD/#45\uFFFD"}:CLOSE_TAG_SPK_ICON: Move existing database `,[t,_,e,n,T,b,f,B,I,M,N,$,R,[1,"back"],["type","button","spk-button","","routerLink","/",1,"small"],[1,"actions","maintenance"],["spk-button","",3,"click","disabled"],["type","text",3,"ngModelChange","ngModel"],["prefix",""],[1,"actions","placement"]]},template:function(_,e){if(_&1&&(l(0,"app-status-bar"),i(1,"section")(2,"div",13)(3,"button",14),p(4,0),l(5,"spk-icon"),r(),a()(),i(6,"article")(7,"h1"),F(8,1),a(),i(9,"p"),F(10,2),a()(),i(11,"article")(12,"h2"),F(13,3),a(),i(14,"p"),F(15,4),a(),i(16,"div",15)(17,"button",16),u("click",function(){return e.repairDatabase()}),p(18,5),l(19,"spk-icon"),r(),a(),i(20,"button",16),u("click",function(){return e.deleteDatabase()}),p(21,6),l(22,"spk-icon"),r(),a(),i(23,"button",16),u("click",function(){return e.restoreDatabase()}),p(24,7),l(25,"spk-icon"),r(),a()()(),i(26,"article")(27,"h2"),F(28,8),a(),i(29,"spk-form-field")(30,"input",17),V("ngModelChange",function(T){return X(e.backupFilePath,T)||(e.backupFilePath=T),T}),a(),v(31,ie,2,0,"spk-icon",18)(32,ne,2,0,"spk-icon",18),a(),i(33,"div",19)(34,"button",16),u("click",function(){return e.resetDatabasePath()}),p(35,9),l(36,"spk-icon"),r(),a(),i(37,"button",16),u("click",function(){return e.saveDatabasePath()}),p(38,10),l(39,"spk-icon"),r(),a(),i(40,"button",16),u("click",function(){return e.saveAndRepairDatabasePath()}),p(41,11),l(42,"spk-icon"),r(),a(),i(43,"button",16),u("click",function(){return e.moveDatabasePath()}),p(44,12),l(45,"spk-icon"),r(),a()()()()),_&2){let n;s(8),L((n=e.activeBackup())==null||n.Backup==null?null:n.Backup.Name),U(8),s(9),P("loader",e.isRepairing()),A("disabled",!e.isValidatedPath()),s(3),P("loader",e.isDeleting()),A("disabled",!e.isValidatedPath()),s(3),P("loader",e.isRestoring()),A("disabled",e.pathHasChanged()),s(6),G(e.isValidatedPath()?"success":"error"),s(),w("ngModel",e.backupFilePath),s(),K(e.isValidatedPath()?31:32),s(3),A("disabled",!e.pathHasChanged()),s(3),A("disabled",!e.pathHasChanged()),s(3),A("disabled",!e.pathHasChanged()),s(3),A("disabled",!e.pathHasChanged())}},dependencies:[ee,Y,Z,x,ae,W,j,H,q],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:2rem}article[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}h1[_ngcontent-%COMP%]{font:var(--title-20)}h2[_ngcontent-%COMP%]{font:var(--title-30)}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"],changeDetection:0})};export{m as default};
@@ -1 +1 @@
1
- import{a as v}from"./chunk-C5B4MW2I.js";import{l as T}from"./chunk-VPTXHYYV.js";import"./chunk-43BIRTPL.js";import"./chunk-FP6LM56A.js";import"./chunk-M5RL4LRX.js";import"./chunk-HIW2CN45.js";import"./chunk-4V45XF67.js";import{a as m}from"./chunk-UEYPJIJG.js";import"./chunk-2CXHZS6X.js";import"./chunk-XHPURHO2.js";import"./chunk-7V4TPS4B.js";import{a as L}from"./chunk-T5WAKBP3.js";import"./chunk-LUKUBN2Z.js";import"./chunk-RHW5QVAY.js";import"./chunk-DLJSVAM2.js";import"./chunk-ABANCAM5.js";import"./chunk-FSKPPAVO.js";import"./chunk-FQ55IACT.js";import{b as E,c as B,e as b,f as $}from"./chunk-WRKRV6RQ.js";import"./chunk-DYTQQHMA.js";import{p as M,q as N,v as I}from"./chunk-ESAGJOZZ.js";import{h as K}from"./chunk-N5FH4YAX.js";import"./chunk-GQGMGFDX.js";import"./chunk-EBXJGPRA.js";import"./chunk-QUOBR5MG.js";import{Db as p,E as C,Eb as r,Fb as s,Pb as d,Qb as c,Rc as O,Ua as n,Wb as R,Z as l,gb as D,jc as A,lb as k,lc as P,ub as u,uc as h,xc as _,zb as g}from"./chunk-4KE2I7OA.js";import"./chunk-7CGTOI24.js";var G=(i,e)=>[i,e,"general"],y=(i,e)=>[i,e,"destination"],U=(i,e)=>[i,e,"source-data"],w=(i,e)=>[i,e,"schedule"],X=(i,e)=>[i,e,"options"];function x(i,e){if(i&1&&(p(0,"p"),A(1),r()),i&2){let a=R();n(),P("Editing: ",a.backupName(),"")}}function z(i,e){i&1&&s(0,"spk-progress-bar",6)}function j(i,e){i&1&&(p(0,"section"),s(1,"router-outlet"),r())}var f=class i{#t=l(E);#e=l(T);#a=l(L);#i=l(K);isDraft=this.#e.isDraft;isNew=this.#e.isNew;backupId=this.#e.backupId;backupName=this.#e.backupName;finishedLoading=this.#e.finishedLoading;#o=m(this.#t.params);#n=m(this.#t.url);paramsChanged=O(()=>{let e=this.#o()?.id,a=!!this.#n()?.find(t=>t.path==="backup-draft");this.#e.backupId.set(e),e!=="new"?this.getBackup(e,a):this.getDefaults()});getDefaults(){this.#i.getApiV1Backupdefaults().pipe(C(1)).subscribe({next:e=>{let a=e.Backup;a.Settings=[...a.Settings],this.#e.mapScheduleToForm(e.Schedule),this.#e.mapOptionsToForms(a),this.#e.applicationOptions.set(e.ApplicationOptions),this.#e.backupDefaults.set(e),this.#e.finishedLoading.set(!0)}})}getBackup(e,a=!1){let t=o=>{this.#e.mapScheduleToForm(o.Schedule??null),o.Backup&&(this.#e.mapGeneralToForm(o.Backup),this.#e.mapDestinationToForm(o.Backup),this.#e.mapSourceDataToForm(o.Backup),this.#e.mapOptionsToForms(o.Backup)),this.#e.finishedLoading.set(!0)};if(a){this.isDraft.set(a);let o=this.#a.draftBackups().find(F=>F.id===e);if(!o){alert("Backup not found");return}t(o.data)}else this.#i.getApiV1BackupById({id:e}).subscribe({next:t})}static \u0275fac=function(a){return new(a||i)};static \u0275cmp=D({type:i,selectors:[["app-backup"]],features:[h([T])],decls:21,vars:22,consts:()=>{let e;e=$localize`${"\uFFFD#6\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SPK_RADIO: General `;let a;a=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_RADIO: Destination `;let t;t=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_RADIO: Source Data `;let o;o=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SPK_RADIO: Schedule `;let F;return F=$localize`${"\uFFFD#18\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SPK_RADIO: Options `,[e,a,t,o,F,["step","","routerLinkActive","active",3,"routerLink"],[1,"indeterminate","primary"]]},template:function(a,t){a&1&&(s(0,"app-status-bar"),p(1,"header"),k(2,x,2,1,"p"),p(3,"spk-stepper")(4,"div",5),d(5,0),s(6,"spk-radio"),c(),r(),p(7,"div",5),d(8,1),s(9,"spk-radio"),c(),r(),p(10,"div",5),d(11,2),s(12,"spk-radio"),c(),r(),p(13,"div",5),d(14,3),s(15,"spk-radio"),c(),r(),p(16,"div",5),d(17,4),s(18,"spk-radio"),c(),r()()(),k(19,z,1,0,"spk-progress-bar",6)(20,j,2,0,"section")),a&2&&(n(2),g(t.isNew()?-1:2),n(2),u("routerLink",_(7,G,t.isDraft()?"/backup-draft":"/backup",t.backupId())),n(3),u("routerLink",_(10,y,t.isDraft()?"/backup-draft":"/backup",t.backupId())),n(3),u("routerLink",_(13,U,t.isDraft()?"/backup-draft":"/backup",t.backupId())),n(3),u("routerLink",_(16,w,t.isDraft()?"/backup-draft":"/backup",t.backupId())),n(3),u("routerLink",_(19,X,t.isDraft()?"/backup-draft":"/backup",t.backupId())),n(3),g(t.finishedLoading()?20:19))},dependencies:[B,b,$,v,N,I,M],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%}header[_ngcontent-%COMP%]{padding:1rem 1.5rem;border-bottom:1px solid var(--base-4)}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin-bottom:.5rem}header[_ngcontent-%COMP%] spk-stepper[_ngcontent-%COMP%]{width:100%}section[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:center;flex:1 0;overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:auto}"],changeDetection:0})};export{f as default};
1
+ import{a as v}from"./chunk-6V7W7EKR.js";import{l as T}from"./chunk-VPTXHYYV.js";import"./chunk-43BIRTPL.js";import"./chunk-FP6LM56A.js";import"./chunk-M5RL4LRX.js";import"./chunk-HIW2CN45.js";import"./chunk-4V45XF67.js";import{a as m}from"./chunk-UEYPJIJG.js";import"./chunk-2CXHZS6X.js";import"./chunk-XHPURHO2.js";import"./chunk-7V4TPS4B.js";import{a as L}from"./chunk-T5WAKBP3.js";import"./chunk-LUKUBN2Z.js";import"./chunk-RHW5QVAY.js";import"./chunk-DLJSVAM2.js";import"./chunk-ABANCAM5.js";import"./chunk-FSKPPAVO.js";import"./chunk-FQ55IACT.js";import{b as E,c as B,e as b,f as $}from"./chunk-WRKRV6RQ.js";import"./chunk-DYTQQHMA.js";import{p as M,q as N,v as I}from"./chunk-ESAGJOZZ.js";import{h as K}from"./chunk-N5FH4YAX.js";import"./chunk-GQGMGFDX.js";import"./chunk-EBXJGPRA.js";import"./chunk-QUOBR5MG.js";import{Db as p,E as C,Eb as r,Fb as s,Pb as d,Qb as c,Rc as O,Ua as n,Wb as R,Z as l,gb as D,jc as A,lb as k,lc as P,ub as u,uc as h,xc as _,zb as g}from"./chunk-4KE2I7OA.js";import"./chunk-7CGTOI24.js";var G=(i,e)=>[i,e,"general"],y=(i,e)=>[i,e,"destination"],U=(i,e)=>[i,e,"source-data"],w=(i,e)=>[i,e,"schedule"],X=(i,e)=>[i,e,"options"];function x(i,e){if(i&1&&(p(0,"p"),A(1),r()),i&2){let a=R();n(),P("Editing: ",a.backupName(),"")}}function z(i,e){i&1&&s(0,"spk-progress-bar",6)}function j(i,e){i&1&&(p(0,"section"),s(1,"router-outlet"),r())}var f=class i{#t=l(E);#e=l(T);#a=l(L);#i=l(K);isDraft=this.#e.isDraft;isNew=this.#e.isNew;backupId=this.#e.backupId;backupName=this.#e.backupName;finishedLoading=this.#e.finishedLoading;#o=m(this.#t.params);#n=m(this.#t.url);paramsChanged=O(()=>{let e=this.#o()?.id,a=!!this.#n()?.find(t=>t.path==="backup-draft");this.#e.backupId.set(e),e!=="new"?this.getBackup(e,a):this.getDefaults()});getDefaults(){this.#i.getApiV1Backupdefaults().pipe(C(1)).subscribe({next:e=>{let a=e.Backup;a.Settings=[...a.Settings],this.#e.mapScheduleToForm(e.Schedule),this.#e.mapOptionsToForms(a),this.#e.applicationOptions.set(e.ApplicationOptions),this.#e.backupDefaults.set(e),this.#e.finishedLoading.set(!0)}})}getBackup(e,a=!1){let t=o=>{this.#e.mapScheduleToForm(o.Schedule??null),o.Backup&&(this.#e.mapGeneralToForm(o.Backup),this.#e.mapDestinationToForm(o.Backup),this.#e.mapSourceDataToForm(o.Backup),this.#e.mapOptionsToForms(o.Backup)),this.#e.finishedLoading.set(!0)};if(a){this.isDraft.set(a);let o=this.#a.draftBackups().find(F=>F.id===e);if(!o){alert("Backup not found");return}t(o.data)}else this.#i.getApiV1BackupById({id:e}).subscribe({next:t})}static \u0275fac=function(a){return new(a||i)};static \u0275cmp=D({type:i,selectors:[["app-backup"]],features:[h([T])],decls:21,vars:22,consts:()=>{let e;e=$localize`${"\uFFFD#6\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SPK_RADIO: General `;let a;a=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_RADIO: Destination `;let t;t=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_RADIO: Source Data `;let o;o=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SPK_RADIO: Schedule `;let F;return F=$localize`${"\uFFFD#18\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SPK_RADIO: Options `,[e,a,t,o,F,["step","","routerLinkActive","active",3,"routerLink"],[1,"indeterminate","primary"]]},template:function(a,t){a&1&&(s(0,"app-status-bar"),p(1,"header"),k(2,x,2,1,"p"),p(3,"spk-stepper")(4,"div",5),d(5,0),s(6,"spk-radio"),c(),r(),p(7,"div",5),d(8,1),s(9,"spk-radio"),c(),r(),p(10,"div",5),d(11,2),s(12,"spk-radio"),c(),r(),p(13,"div",5),d(14,3),s(15,"spk-radio"),c(),r(),p(16,"div",5),d(17,4),s(18,"spk-radio"),c(),r()()(),k(19,z,1,0,"spk-progress-bar",6)(20,j,2,0,"section")),a&2&&(n(2),g(t.isNew()?-1:2),n(2),u("routerLink",_(7,G,t.isDraft()?"/backup-draft":"/backup",t.backupId())),n(3),u("routerLink",_(10,y,t.isDraft()?"/backup-draft":"/backup",t.backupId())),n(3),u("routerLink",_(13,U,t.isDraft()?"/backup-draft":"/backup",t.backupId())),n(3),u("routerLink",_(16,w,t.isDraft()?"/backup-draft":"/backup",t.backupId())),n(3),u("routerLink",_(19,X,t.isDraft()?"/backup-draft":"/backup",t.backupId())),n(3),g(t.finishedLoading()?20:19))},dependencies:[B,b,$,v,N,I,M],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%}header[_ngcontent-%COMP%]{padding:1rem 1.5rem;border-bottom:1px solid var(--base-4)}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin-bottom:.5rem}header[_ngcontent-%COMP%] spk-stepper[_ngcontent-%COMP%]{width:100%}section[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:center;flex:1 0;overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:auto}"],changeDetection:0})};export{f as default};
@@ -1 +1 @@
1
- import{a as M}from"./chunk-C5B4MW2I.js";import"./chunk-XHPURHO2.js";import"./chunk-7V4TPS4B.js";import"./chunk-T5WAKBP3.js";import"./chunk-LUKUBN2Z.js";import"./chunk-RHW5QVAY.js";import"./chunk-DLJSVAM2.js";import"./chunk-ABANCAM5.js";import"./chunk-FSKPPAVO.js";import"./chunk-FQ55IACT.js";import{c as O,e as C,f as S}from"./chunk-WRKRV6RQ.js";import"./chunk-DYTQQHMA.js";import{y as d}from"./chunk-ESAGJOZZ.js";import"./chunk-N5FH4YAX.js";import"./chunk-GQGMGFDX.js";import"./chunk-EBXJGPRA.js";import"./chunk-QUOBR5MG.js";import{Db as e,Eb as t,Fb as l,Rb as n,gb as c}from"./chunk-4KE2I7OA.js";import"./chunk-7CGTOI24.js";var s=class a{static \u0275fac=function(o){return new(o||a)};static \u0275cmp=c({type:a,selectors:[["app-about"]],decls:19,vars:0,consts:()=>{let _;_=$localize`General`;let o;o=$localize`Changelog`;let r;r=$localize`Libraries`;let u;u=$localize`System info`;let T;T=$localize`Server settings`;let g;g=$localize`Logs`;let A;return A=$localize`Crash log`,[_,o,r,u,T,g,A,[1,"content"],[1,"primary"],["tab","","routerLink","/about/general","routerLinkActive","active"],["tab","","routerLink","/about/changelog","routerLinkActive","active"],["tab","","routerLink","/about/libraries","routerLinkActive","active"],["tab","","routerLink","/about/system-info","routerLinkActive","active"],["tab","","routerLink","/about/server-settings","routerLinkActive","active"],["tab","","routerLink","/about/logs","routerLinkActive","active"],["tab","","routerLink","/about/crashlogs","routerLinkActive","active"]]},template:function(o,r){o&1&&(l(0,"app-status-bar"),e(1,"div",7)(2,"spk-tabs",8)(3,"button",9),n(4,0),t(),e(5,"button",10),n(6,1),t(),e(7,"button",11),n(8,2),t(),e(9,"button",12),n(10,3),t(),e(11,"button",13),n(12,4),t(),e(13,"button",14),n(14,5),t(),e(15,"button",15),n(16,6),t()(),e(17,"section"),l(18,"router-outlet"),t()())},dependencies:[M,d,O,C,S],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:0}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:1rem 2rem}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:2rem 0}"],changeDetection:0})};export{s as default};
1
+ import{a as M}from"./chunk-6V7W7EKR.js";import"./chunk-XHPURHO2.js";import"./chunk-7V4TPS4B.js";import"./chunk-T5WAKBP3.js";import"./chunk-LUKUBN2Z.js";import"./chunk-RHW5QVAY.js";import"./chunk-DLJSVAM2.js";import"./chunk-ABANCAM5.js";import"./chunk-FSKPPAVO.js";import"./chunk-FQ55IACT.js";import{c as O,e as C,f as S}from"./chunk-WRKRV6RQ.js";import"./chunk-DYTQQHMA.js";import{y as d}from"./chunk-ESAGJOZZ.js";import"./chunk-N5FH4YAX.js";import"./chunk-GQGMGFDX.js";import"./chunk-EBXJGPRA.js";import"./chunk-QUOBR5MG.js";import{Db as e,Eb as t,Fb as l,Rb as n,gb as c}from"./chunk-4KE2I7OA.js";import"./chunk-7CGTOI24.js";var s=class a{static \u0275fac=function(o){return new(o||a)};static \u0275cmp=c({type:a,selectors:[["app-about"]],decls:19,vars:0,consts:()=>{let _;_=$localize`General`;let o;o=$localize`Changelog`;let r;r=$localize`Libraries`;let u;u=$localize`System info`;let T;T=$localize`Server settings`;let g;g=$localize`Logs`;let A;return A=$localize`Crash log`,[_,o,r,u,T,g,A,[1,"content"],[1,"primary"],["tab","","routerLink","/about/general","routerLinkActive","active"],["tab","","routerLink","/about/changelog","routerLinkActive","active"],["tab","","routerLink","/about/libraries","routerLinkActive","active"],["tab","","routerLink","/about/system-info","routerLinkActive","active"],["tab","","routerLink","/about/server-settings","routerLinkActive","active"],["tab","","routerLink","/about/logs","routerLinkActive","active"],["tab","","routerLink","/about/crashlogs","routerLinkActive","active"]]},template:function(o,r){o&1&&(l(0,"app-status-bar"),e(1,"div",7)(2,"spk-tabs",8)(3,"button",9),n(4,0),t(),e(5,"button",10),n(6,1),t(),e(7,"button",11),n(8,2),t(),e(9,"button",12),n(10,3),t(),e(11,"button",13),n(12,4),t(),e(13,"button",14),n(14,5),t(),e(15,"button",15),n(16,6),t()(),e(17,"section"),l(18,"router-outlet"),t()())},dependencies:[M,d,O,C,S],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:0}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:1rem 2rem}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:2rem 0}"],changeDetection:0})};export{s as default};
@@ -1 +1 @@
1
- import{a as te}from"./chunk-KPH4ZAFT.js";import{a as gt}from"./chunk-C5B4MW2I.js";import{l as ae}from"./chunk-VPTXHYYV.js";import"./chunk-43BIRTPL.js";import"./chunk-FP6LM56A.js";import"./chunk-M5RL4LRX.js";import"./chunk-HIW2CN45.js";import"./chunk-4V45XF67.js";import"./chunk-UEYPJIJG.js";import{a as Tt}from"./chunk-T7QZL5YJ.js";import{a as K}from"./chunk-2CXHZS6X.js";import{a as St}from"./chunk-VZBWK3XF.js";import"./chunk-XHPURHO2.js";import"./chunk-7V4TPS4B.js";import"./chunk-T5WAKBP3.js";import{a as ct}from"./chunk-LUKUBN2Z.js";import"./chunk-RHW5QVAY.js";import"./chunk-DLJSVAM2.js";import{c as Q,e as Z,h as J,l as pt,s as Y,t as ee}from"./chunk-ABANCAM5.js";import"./chunk-FSKPPAVO.js";import{a as nt}from"./chunk-FQ55IACT.js";import"./chunk-WRKRV6RQ.js";import"./chunk-DYTQQHMA.js";import{A as _t,C as dt,a as W,b as H,e as it,g as q,k as ot,l as j,p as st,q as at,r as lt,t as rt}from"./chunk-ESAGJOZZ.js";import{h as k}from"./chunk-N5FH4YAX.js";import"./chunk-GQGMGFDX.js";import"./chunk-EBXJGPRA.js";import"./chunk-QUOBR5MG.js";import{$a as je,B as b,Db as i,Eb as o,F as R,Fb as I,Jb as P,Pb as X,Qb as V,Qc as F,Ra as qe,Rb as l,Rc as $,Sb as oe,T as He,Tb as se,Ua as r,Ub as Ze,Vb as S,Wb as p,Z as E,Zb as Je,a as Ue,b as Be,c as We,ea as u,fa as m,gb as w,gc as Ye,hc as et,jc as O,kc as z,lb as f,lc as U,n as v,oc as y,pc as G,qc as A,rb as Ke,sb as Qe,ub as h,uc as tt,va as c,vc as B,wb as N,zb as C}from"./chunk-4KE2I7OA.js";import"./chunk-7CGTOI24.js";var Ct=["formRef"],Et=()=>[import("./chunk-W66AXGSW.js").then(s=>s.OptionsListComponent)];function ft(s,e){s&1&&(i(0,"spk-alert",3),l(1,1),o())}function Nt(s,e){if(s&1){let t=P();i(0,"app-options-list",5),A("optionsChange",function(a){u(t);let _=p();return G(_.settings,a)||(_.settings=a),m(a)}),o()}if(s&2){let t=p();y("options",t.settings),h("hasFreeTextSettings",!0)}}var Mt=["Bytes","KB","MB","GB","TB","PB"],x=class s{#e=E(ae);#t=E(te);#i=E(k);formRef=je.required("formRef");settings=this.#e.settings;isSubmitting=c(!1);isLoadingOptions=c(!0);saved=c(!1);sizeOptions=c(Mt);lastRecievedServerSettings=c({});serverSettingsEffect=$(()=>{let e=this.#t.serverSettings();if(e===void 0)return;this.lastRecievedServerSettings.set(e),this.isLoadingOptions.set(!0);let t=Object.entries(e);t.forEach(([n,a],_)=>{if(n.startsWith("--")){let T=n.replace("--","");this.settings.update(g=>(g.some(M=>M.Name===T)||g.push({Name:T,Value:a}),g))}_===t.length-1&&this.isLoadingOptions.set(!1)})});submit(){this.isSubmitting.set(!0);let e=this.settings(),t=this.lastRecievedServerSettings(),n=e.map(g=>g.Name),_=Object.keys(t).filter(g=>!n.includes(g.replace("--",""))),T=e.reduce((g,M)=>(g[`--${M.Name}`]=M.Value,g),{});_.forEach(g=>{T[g]=null}),this.#i.patchApiV1Serversettings({requestBody:T}).pipe(R(()=>this.isSubmitting.set(!1))).subscribe({next:()=>{this.#t.refreshServerSettings(),this.saved.set(!0),setTimeout(()=>{this.saved.set(!1)},3e3)}})}static \u0275fac=function(t){return new(t||s)};static \u0275cmp=w({type:s,selectors:[["app-advanced-options-settings"]],viewQuery:function(t,n){t&1&&Ye(n.formRef,Ct,5),t&2&&et()},features:[tt([ae])],decls:8,vars:4,consts:()=>{let e;e=$localize`${"\uFFFD#4\uFFFD"}:START_TAG_SPK_ICON:floppy-disk${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SPK_ICON: Save settings `;let t;return t=$localize`Settings saved`,[e,t,[1,"actions"],[1,"success"],["spk-button","","type","button",1,"raised","primary",3,"click"],[3,"optionsChange","options","hasFreeTextSettings"]]},template:function(t,n){t&1&&(i(0,"div",2),f(1,ft,2,0,"spk-alert",3),i(2,"button",4),S("click",function(){return n.submit()}),X(3,0),I(4,"spk-icon"),V(),o()(),f(5,Nt,1,2),Ke(6,5,Et)),t&2&&(r(),C(n.saved()?1:-1),r(),N("loader",n.isSubmitting()),r(4),Qe(!n.isLoadingOptions()))},dependencies:[ee,q,W,H],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:40.625rem;justify-self:flex-end}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;justify-content:flex-end;margin-bottom:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-column[_ngcontent-%COMP%]{display:flex;flex-direction:column}.form-column[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.form-column[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:1rem}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:3fr 1fr;gap:.5rem;align-items:flex-end}.form-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 2.5rem;gap:.5rem;align-items:flex-end}.remote-volume-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.remote-volume-wrap[_ngcontent-%COMP%] p.warning[_ngcontent-%COMP%]{color:#7d7d00}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.advanced-option[_ngcontent-%COMP%]{display:grid;gap:.5rem;grid-template-columns:1fr 1fr 2.5rem;align-items:flex-end}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};var L=class s{#e=E(it);#t=E(k);#i=E(K);repeatRegisterTimer=null;state=c("unknown");claimUrl=c(null);registerUrl=c("");status=F(()=>{let e=this.state();return e==="enabled"?"Remote control is enabled but not connected":e==="connected"?"Remote control is connected":e==="registering"?"Registering machine...":e==="registeringfaulted"?"Registration failed":e==="registered"?"Registered, waiting for accept":e==="disabled"?"Remote control is configured but not enabled":e==="unknown"?"...loading...":"Remote control is not set up"});sysInfoEffect=$(()=>{let e=this.#i.systemInfo();e&&this.registerUrl.set(e.RemoteControlRegistrationUrl??"")});#n(e){e.RegistrationUrl&&this.claimUrl.set(e.RegistrationUrl),e.IsConnected?this.state.set("connected"):e.IsEnabled?this.state.set("enabled"):e.CanEnable?this.state.set("disabled"):e.IsRegisteringFaulted?this.state.set("registeringfaulted"):e.IsRegistering?e.RegistrationUrl!=null&&e.RegistrationUrl.trim().length>0?this.state.set("registered"):this.state.set("registering"):this.state.set("inactive");let t=this.state();this.repeatRegisterTimer!==null&&(clearTimeout(this.repeatRegisterTimer),this.repeatRegisterTimer=null),t==="registering"&&(this.repeatRegisterTimer=setTimeout(()=>{this.#t.postApiV1RemotecontrolRegister({requestBody:{RegistrationUrl:""}}).subscribe({next:n=>this.#n(n),error:n=>this.#o(n)})},5e3)),(t==="enabled"||t==="registered")&&(this.repeatRegisterTimer=setTimeout(()=>{this.#t.getApiV1RemotecontrolStatus().subscribe({next:n=>this.#n(n),error:n=>this.#o(n)})},5e3)),e.IsRegistering&&e.CanEnable&&this.#t.deleteApiV1RemotecontrolRegister().subscribe({next:n=>this.#n(n)})}#o(e){this.#t.getApiV1RemotecontrolStatus().subscribe({next:t=>this.#n(t)})}refreshRemoteControlStatus(){this.#t.getApiV1RemotecontrolStatus().subscribe({next:e=>this.#n(e),error:e=>this.#o(e)})}beginRemoteRegistration(){this.state.set("registering"),this.#t.postApiV1RemotecontrolRegister({requestBody:{RegistrationUrl:this.registerUrl()}}).subscribe({next:e=>this.#n(e),error:e=>this.#o(e)})}cancelRemoteRegistration(){this.#t.deleteApiV1RemotecontrolRegister().subscribe({next:e=>this.#n(e),error:e=>this.#o(e)})}enableRemoteControl(){this.#t.postApiV1RemotecontrolEnable().subscribe({next:e=>this.#n(e),error:e=>this.#o(e)})}disableRemoteControl(){this.#t.postApiV1RemotecontrolDisable().subscribe({next:e=>this.#n(e),error:e=>this.#o(e)})}deleteRemoteControl(){let e=this;this.#e.open(ct,{data:{title:$localize`Confirm delete`,message:$localize`Are you sure you want to delete the remote control registration?`,confirmText:$localize`Delete registration`,cancelText:$localize`Cancel`},closed:t=>{t&&e.#t.deleteApiV1RemotecontrolRegistration().subscribe({next:n=>e.#n(n),error:n=>e.#o(n)})}})}static \u0275fac=function(t){return new(t||s)};static \u0275prov=He({token:s,factory:s.\u0275fac,providedIn:"root"})};function Pt(s,e){if(s&1){let t=P();i(0,"spk-form-field",10)(1,"input",11),A("ngModelChange",function(a){u(t);let _=p(2);return G(_.registerUrl,a)||(_.registerUrl=a),m(a)}),o()(),i(2,"button",12),S("click",function(){u(t);let a=p(2);return m(a.register())}),l(3,0),o()}if(s&2){let t=p(2);r(),y("ngModel",t.registerUrl)}}function Ot(s,e){if(s&1&&(i(0,"div",8)(1,"label"),l(2,1),o(),i(3,"a",13),O(4),o()()),s&2){let t=p(2);r(3),Je("href",t.claimUrl(),qe),r(),z(t.claimUrl())}}function Rt(s,e){s&1&&(i(0,"div",8)(1,"label"),l(2,2),o()())}function It(s,e){if(s&1){let t=P();i(0,"button",12),S("click",function(){u(t);let a=p(2);return m(a.cancel())}),l(1,3),o()}}function yt(s,e){if(s&1){let t=P();i(0,"button",12),S("click",function(){u(t);let a=p(2);return m(a.disable())}),l(1,4),o()}}function Gt(s,e){if(s&1){let t=P();i(0,"button",12),S("click",function(){u(t);let a=p(2);return m(a.enable())}),l(1,5),o(),i(2,"button",14),S("click",function(){u(t);let a=p(2);return m(a.delete())}),l(3,6),o()}}function At(s,e){if(s&1&&(i(0,"div",7),f(1,Pt,4,1)(2,Ot,5,2,"div",8)(3,Rt,3,0,"div",8)(4,It,2,0,"button",9)(5,yt,2,0,"button",9)(6,Gt,4,0),o()),s&2){let t=p();r(),C(t.state()==="inactive"?1:-1),r(),C(t.state()==="registered"?2:-1),r(),C(t.state()==="registering"?3:-1),r(),C(t.state()==="registering"||t.state()==="registeringfaulted"||t.state()==="registered"?4:-1),r(),C(t.state()==="connected"||t.state()==="enabled"?5:-1),r(),C(t.state()==="disabled"?6:-1)}}var ne=class s{#e=E(L);state=this.#e.state;claimUrl=this.#e.claimUrl;registerUrl=this.#e.registerUrl;ngOnInit(){this.#e.refreshRemoteControlStatus()}cancel(){this.#e.cancelRemoteRegistration()}register(){this.#e.beginRemoteRegistration()}disable(){this.#e.disableRemoteControl()}enable(){this.#e.enableRemoteControl()}delete(){this.#e.deleteRemoteControl()}static \u0275fac=function(t){return new(t||s)};static \u0275cmp=w({type:s,selectors:[["app-remote-control"]],decls:1,vars:1,consts:()=>{let e;e=$localize`Register for remote control`;let t;t=$localize`Machine is now registered, open this link to add it to your account:`;let n;n=$localize`Registering, please wait...`;let a;a=$localize`Cancel registration`;let _;_=$localize`Disable remote control`;let T;T=$localize`Enable remote control`;let g;return g=$localize`Delete remote control setup`,[e,t,n,a,_,T,g,[1,"field-row"],[1,"field-col"],["type","button","spk-button","",1,"raised"],["label","Registration URL","for","remoteControlRegisterUrl"],["type","text","spk-input","","id","remoteControlRegisterUrl","name","remoteControlRegisterUrl",3,"ngModelChange","ngModel"],["type","button","spk-button","",1,"raised",3,"click"],["target","_blank",3,"href"],["type","button","spk-button","",1,"raised","error",3,"click"]]},template:function(t,n){t&1&&f(0,At,7,6,"div",7),t&2&&C(n.state()!=="unknown"?0:-1)},dependencies:[Y,Q,Z,J,j],styles:["[_nghost-%COMP%]{display:block}[_nghost-%COMP%] button[_ngcontent-%COMP%]{white-space:nowrap}.field-row[_ngcontent-%COMP%]{display:flex;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] spk-form-field[_ngcontent-%COMP%], .field-row[_ngcontent-%COMP%] spk-select[_ngcontent-%COMP%]{flex:1 0}"],changeDetection:0})};function mt(...s){let e=c(...s);return Object.defineProperty(e,"value",{get:e.asReadonly(),set:e.set.bind(e)})}var re=()=>({standalone:!0});function $t(s,e){s&1&&(i(0,"spk-icon",69),O(1,"check"),o())}function vt(s,e){s&1&&(i(0,"spk-icon",70),O(1,"prohibit"),o())}function bt(s,e){if(s&1){let t=P();i(0,"button",74),S("click",function(){u(t);let a=p(2);return m(a.updatePassphrase())}),l(1,34),o()}if(s&2){let t=p(2);N("loader",t.isUpdating())}}function wt(s,e){if(s&1){let t=P();i(0,"button",75),S("click",function(){u(t);let a=p(2);return m(a.updatePassphrase())}),l(1,35),o()}if(s&2){let t=p(2);N("loader",t.isUpdating()),h("disabled",!0)}}function kt(s,e){if(s&1){let t=P();i(0,"spk-form-field")(1,"label",65),l(2,31),o(),i(3,"input",66),A("ngModelChange",function(a){u(t);let _=p();return G(_.passphrase,a)||(_.passphrase=a),m(a)}),o()(),i(4,"spk-form-field")(5,"label",67),l(6,32),o(),i(7,"input",68),A("ngModelChange",function(a){u(t);let _=p();return G(_.repeatPassphrase,a)||(_.repeatPassphrase=a),m(a)}),o(),f(8,$t,2,0,"spk-icon",69)(9,vt,2,0,"spk-icon",70),o(),i(10,"div",48)(11,"button",71),S("click",function(){u(t);let a=p();return m(a.cancelPasswordChange())}),l(12,33),o(),f(13,bt,2,2,"button",72)(14,wt,2,3,"button",73),o()}if(s&2){let t=p();r(3),y("ngModel",t.passphrase),r(4),h("disabled",t.passphrase().length===0),y("ngModel",t.repeatPassphrase),r(),C(t.passphrase().length!==0&&t.passphrase()===t.repeatPassphrase()?8:9),r(3),N("loader",t.isUpdating()),r(2),C(t.passphrase().length!==0&&t.passphrase()===t.repeatPassphrase()?13:14)}}function Lt(s,e){s&1&&(i(0,"spk-icon",76),O(1,"check"),o())}function Ft(s,e){if(s&1){let t=P();i(0,"div",48)(1,"button",71),S("click",function(){u(t);let a=p();return m(a.openPassphraseForm())}),l(2,36),o(),f(3,Lt,2,0,"spk-icon",76),o()}if(s&2){let t=p();r(3),C(t.passwordUpdated()?3:-1)}}function xt(s,e){if(s&1){let t=P();i(0,"spk-form-field")(1,"label",77),l(2,37),o(),i(3,"textarea",78),A("ngModelChange",function(a){u(t);let _=p();return G(_.allowedHostnames,a)||(_.allowedHostnames=a),m(a)}),o()(),i(4,"spk-alert",79),l(5,38),o(),i(6,"button",74),S("click",function(){u(t);let a=p();return m(a.updateAllowedHostnames())}),l(7,39),o()}if(s&2){let t=p();r(3),y("ngModel",t.allowedHostnames),r(3),N("loader",t.updatingAllowedHosts())}}function Dt(s,e){if(s&1&&O(0),s&2){let t,n=p();U(" ",(t=n.sysinfo())==null?null:t.ServerVersion," ")}}function Xt(s,e){s&1&&I(0,"spk-progress-bar",53)}function Vt(s,e){if(s&1&&O(0),s&2){let t=e.$implicit;U(" ",t.label," ")}}function zt(s,e){if(s&1&&O(0),s&2){let t=e.$implicit;U(" ",t.label," ")}}function Ut(s,e,t){let n=mt(s),a=n[Ue];t?.equal&&(a.equal=t.equal);let _;return n.set=T=>{clearTimeout(_),_=setTimeout(()=>Be(a,T),e)},n.update=T=>{clearTimeout(_),_=setTimeout(()=>We(a,T),e)},n}var Bt=[{value:"none",label:$localize`None`},{value:"s",label:$localize`Seconds`},{value:"m",label:$localize`Minutes`},{value:"h",label:$localize`Hours`}],Wt=[{value:"none",label:$localize`System default (information)`},{value:"information",label:$localize`Usage statistics, warnings, errors, and crashes`},{value:"warning",label:$localize`Warnings, errors and crashes`},{value:"error",label:$localize`Errors and crashes`},{value:"crash",label:$localize`Crashes only`},{value:"none",label:$localize`None / disabled`}],_e=class s{#e=E(St);#t=E(K);#i=E(k);#n=E(te);#o=E(L);#s=E(nt);#a=this.#s.getItem("locale")??"en-US";sysinfo=this.#t.systemInfo;isDarkMode=this.#e.isDarkMode;editAs=c("list");previousLang=this.#a;langCtrl=c(this.#a);usageStatistics=c("");updatingUsageStatistics=c(!1);remoteControlStatus=this.#o.status;updatingChannel=c(!1);updateChannel=c("");setNewChannel(e){let t=this.updateChannel();this.updateChannel.set(e),this.#i.patchApiV1Serversettings({requestBody:{"update-channel":e}}).pipe(R(()=>this.updatingChannel.set(!1)),b(()=>(this.updateChannel.set(t),v(null)))).subscribe()}allowRemoteAccess=c(!1);allowedHostnames=c("");loadedAllowedHostnames=c("");updatingRemoteAccess=c(!1);updatingAllowedHosts=c(!1);updateRemoteAccess(){let e=this.allowRemoteAccess(),t=!e;this.allowRemoteAccess.set(t),this.#i.patchApiV1Serversettings({requestBody:{"server-listen-interface":t?"any":"loopback"}}).pipe(R(()=>this.updatingRemoteAccess.set(!1)),b(()=>(this.allowRemoteAccess.set(e),v(null)))).subscribe()}updateAllowedHostnames(){let e=this.loadedAllowedHostnames(),t=this.allowedHostnames();this.updatingAllowedHosts.set(!0),this.#i.patchApiV1Serversettings({requestBody:{"server-listen-interface":"any","allowed-hostnames":t}}).pipe(R(()=>this.updatingAllowedHosts.set(!1)),b(()=>(this.allowedHostnames.set(e),v(null)))).subscribe()}updatingDisableTrayIconLogin=c(!1);disableTrayIconLogin=c(!1);saveDisableTrayIconLogin(){let e=this.disableTrayIconLogin(),t=!e;this.updatingDisableTrayIconLogin.set(!0),this.disableTrayIconLogin.set(t),this.#i.patchApiV1Serversettings({requestBody:{"disable-tray-icon-login":t?"True":"False"}}).pipe(R(()=>this.updatingDisableTrayIconLogin.set(!1)),b(()=>(this.disableTrayIconLogin.set(e),v(null)))).subscribe()}showPassphraseForm=c(!1);isUpdating=c(!1);passphrase=c("");repeatPassphrase=c("");passwordUpdated=c(!1);updatePassphrase(){this.passphrase()===this.repeatPassphrase()&&(this.isUpdating.set(!0),this.#i.patchApiV1Serversettings({requestBody:{"server-passphrase":this.passphrase()}}).pipe(R(()=>this.isUpdating.set(!1))).subscribe({next:()=>{this.showPassphraseForm.set(!1),this.passwordUpdated.set(!0),setTimeout(()=>{this.passwordUpdated.set(!1)},3e3)}}))}openPassphraseForm(){this.showPassphraseForm.set(!0)}cancelPasswordChange(){this.showPassphraseForm.set(!1)}languageOptions=c(Tt);usageStatisticsOptions=c(Wt);timeTypeOptions=c(Bt);timeType=c("none");timeValue=Ut(0,300);timeRange=F(()=>this.timeType()==="h"?[0,24]:[0,60]);timeValueEffect=$(()=>{let e=this.timeValue();this.updateStartupDelay()});updateLocale(e){!e||e===""||e===this.previousLang||(this.#s.setItem("locale",e),window.location.reload())}updateStartupDelay(){let e=this.timeValue(),t=this.timeType(),n="";t!=="none"&&e!==0&&(n=`${e}${t}`),this.#i.patchApiV1Serversettings({requestBody:{"startup-delay":n}}).subscribe()}updateTimeType(e){this.timeType()==="none"&&this.timeValue.set(0),this.timeType.set(e)}updateUsageStatistics(e){let t=this.usageStatistics();!e||e===""||e===t||(this.usageStatistics.set(e),this.updatingUsageStatistics.set(!0),this.#i.patchApiV1Serversettings({requestBody:{"usage-reporter-level":this.usageStatistics()==="none"?"":this.usageStatistics()}}).pipe(R(()=>this.updatingUsageStatistics.set(!1)),b(()=>(this.usageStatistics.set(t),v(null)))).subscribe())}serverSettingsEffect=$(()=>{let e=this.#n.serverSettings();if(e===void 0)return;let t=e["startup-delay"],n=t.slice(-1),a=t.slice(0,-1),_=["s","m","h"];this.disableTrayIconLogin.set(e["disable-tray-icon-login"]!=="False"),this.updateChannel.set(e["update-channel"]),this.allowRemoteAccess.set(e["server-listen-interface"]==="any"),this.allowedHostnames.set(e["allowed-hostnames"]),this.loadedAllowedHostnames.set(e["allowed-hostnames"]),this.usageStatistics.set(e["usage-reporter-level"]===""?"none":e["usage-reporter-level"]),this.timeType.set(t==""?"none":_.includes(n)?n:"none"),this.timeValue.set(t==""?0:parseInt(a))});setDarkMode(){this.#e.setDarkMode()}setLightMode(){this.#e.setLightMode()}static \u0275fac=function(t){return new(t||s)};static \u0275cmp=w({type:s,selectors:[["app-settings"]],decls:132,vars:46,consts:()=>{let e;e=$localize`Settings`;let t;t=$localize`Configure your backup settings.`;let n;n=$localize`Remote access control`;let a;a=$localize`Color theme`;let _;_=$localize`Customize your application theme`;let T;T=$localize`Passwords`;let g;g=$localize`Change server passphrase`;let M;M=$localize`Language`;let de;de=$localize`Select a language for the platform`;let ce;ce=$localize`Allow remote access (requires restart)`;let pe;pe=$localize` By allowing remote access, the server listens to requests from any machine on your network. If you enable this option, make sure you are always using the computer on a secure firewall protected network. `;let Se;Se=$localize`Allow remote access`;let ge;ge=$localize`Prevent tray icon automatic log-in`;let Te;Te=$localize` By default, the tray icon will open the user interface with a token that unlocks the user interface. This ensures that you can access the user interface from the tray icon, while requiring others to enter a password. If you prefer having to type in the password, even when accessing the user interface from the tray icon, enable this option. `;let ue;ue=$localize`Prevent tray icon automatic log-in`;let me;me=$localize`Update channel`;let Ce;Ce=$localize` Default (${"\uFFFD0\uFFFD"}:INTERPOLATION:) `;let Ee;Ee=$localize`Same as the base install version: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let fe;fe=$localize`Stable`;let Ne;Ne=$localize`Official releases`;let Me;Me=$localize`Beta`;let he;he=$localize` Try out the new features that we are working on. Currently the most stable version available. Test Restore data before using this in production environments. `;let Pe;Pe=$localize` Experimental `;let Oe;Oe=$localize`Specific builds for developers only. Not for use with important data.`;let Re;Re=$localize`Canary`;let Ie;Ie=$localize`Individual builds for developers only. Not for use with important data.`;let ye;ye=$localize`Pause after startup or hibernation`;let Ge;Ge=$localize` Duplicati will run when started, but will remain in paused state for the duration. Duplicati will occupy minimal system resources and no backups will be run. `;let Ae;Ae=$localize`Usage statistics`;let D;D=$localize` Usage reports help us improve the user experience and evaluate impact of new features. We use them to generate ${"\uFFFD#119\uFFFD"}:START_LINK:public usage statistics.${"\uFFFD/#119\uFFFD"}:CLOSE_LINK:${"[\uFFFD#120\uFFFD\uFFFD/#120\uFFFD|\uFFFD#121\uFFFD\uFFFD/#121\uFFFD]"}:LINE_BREAK:${"[\uFFFD#120\uFFFD\uFFFD/#120\uFFFD|\uFFFD#121\uFFFD\uFFFD/#121\uFFFD]"}:LINE_BREAK: All usage reports are sent anonymously and do not contain any personal information. They contain information about hardware and operating system, the type of backend, backup duration, overall size of source data and similar data. They do not contain paths, filenames, usernames, passwords or similar sensitive information. `,D=Ze(D);let $e;$e=$localize`Advanced options`;let ve;ve=$localize`Enter new password`;let be;be=$localize`Repeat password`;let ie;ie=$localize`Password have to be filled and have to match`;let we;we=$localize`Passphrase`;let ke;ke=$localize`Repeat passphrase`;let Le;Le=$localize`Cancel`;let Fe;Fe=$localize` Update passphrase `;let xe;xe=$localize` Update passphrase `;let De;De=$localize`Change password`;let Xe;Xe=$localize`Allowed hostnames`;let Ve;Ve=$localize` To prevent various DNS based attacks, Duplicati limits the allowed hostnames to the ones listed here. Direct IP access and localhost is always allowed. Multiple hostnames can be supplied with a semicolon separator. If any of the allowed hostnames is an asterisk (*), all hostnames are allowed and this feature is disabled. If the field is empty, only IP address and localhost access is allowed. `;let ze;return ze=$localize` Update allowed hostnames `,[e,t,n,a,_,T,g,M,de,ce,pe,Se,ge,Te,ue,me,Ce,Ee,fe,Ne,Me,he,Pe,Oe,Re,Ie,ye,Ge,Ae,D,$e,we,ke,Le,Fe,xe,De,Xe,Ve,ze,[1,"content"],[1,"title"],[1,"left"],[1,"right"],[1,"themes"],["src","assets/images/light-theme.png","alt","light theme",3,"click"],["src","assets/images/dark-theme.png","alt","dark theme",3,"click"],[1,"right","passphrase-form"],[1,"actions"],["value","value","label","label",3,"options","isClearable","inlineSearch"],["type","text",3,"ngModelChange","ngModel","ngModelOptions"],[1,"right","remote-access-form"],[1,"primary","raised",3,"click"],[1,"indeterminate","primary"],[1,"right","radios"],[1,"radio-option",3,"click"],[1,"primary","raised"],[1,"field-row"],[1,"raised","primary",3,"unit"],["type","range",3,"ngModelChange","min","max","disabled","ngModel","ngModelOptions"],["label","label","value","value",3,"options","isClearable"],["type","text",3,"ngModelChange","ngModel"],["href","#"],["label","label","value","value",3,"options","isLoading"],[1,"advanced-settings"],["for","password"],["type","password","name","password","autocomplete","disabled","placeholder",ve,"tabindex","1",3,"ngModelChange","ngModel"],["for","repeatPassword"],["type","password","name","repeatPassword","autocomplete","disabled","placeholder",be,"tabindex","2",3,"ngModelChange","disabled","ngModel"],["suffix","",1,"spk-success"],["suffix",""],["spk-button","",3,"click"],["spk-button","",1,"raised","primary",3,"loader"],["spk-button","","spkTooltip",ie,1,"raised","primary",3,"loader","disabled"],["spk-button","",1,"raised","primary",3,"click"],["spk-button","","spkTooltip",ie,1,"raised","primary",3,"click","disabled"],[1,"spk-success"],["for","allowedHostnames"],["type","text","id","allowedHostnames",3,"ngModelChange","ngModel"],["type","primary"]]},template:function(t,n){if(t&1&&(I(0,"app-status-bar"),i(1,"div",40)(2,"header")(3,"div",41)(4,"h2"),l(5,0),o(),i(6,"p"),l(7,1),o()()(),i(8,"section")(9,"div",42)(10,"h3"),l(11,2),o(),i(12,"p"),O(13),o()(),i(14,"div",43),I(15,"app-remote-control"),o()(),i(16,"section")(17,"div",42)(18,"h3"),l(19,3),o(),i(20,"p"),l(21,4),o()(),i(22,"div",43)(23,"div",44)(24,"img",45),S("click",function(){return n.setLightMode()}),o(),i(25,"img",46),S("click",function(){return n.setDarkMode()}),o()()()(),i(26,"section")(27,"div",42)(28,"h3"),l(29,5),o(),i(30,"p"),l(31,6),o()(),i(32,"div",47),f(33,kt,15,7)(34,Ft,4,1,"div",48),o()(),i(35,"section")(36,"div",42)(37,"h3"),l(38,7),o(),i(39,"p"),l(40,8),o()(),i(41,"div",43)(42,"spk-select",49)(43,"input",50),S("ngModelChange",function(_){return n.updateLocale(_)}),o()()()(),i(44,"section")(45,"div",42)(46,"h3"),l(47,9),o(),i(48,"p"),l(49,10),o()(),i(50,"div",51)(51,"spk-toggle",52),S("click",function(){return n.updateRemoteAccess()}),i(52,"label"),l(53,11),o()(),f(54,xt,8,3),o()(),i(55,"section")(56,"div",42)(57,"h3"),l(58,12),o(),i(59,"p"),l(60,13),o()(),i(61,"div",43)(62,"spk-toggle",52),S("click",function(){return n.saveDisableTrayIconLogin()}),i(63,"label"),l(64,14),o()()()(),i(65,"section")(66,"div",42)(67,"h3"),l(68,15),o(),i(69,"p"),f(70,Dt,1,1),o(),f(71,Xt,1,0,"spk-progress-bar",53),o(),i(72,"div",54)(73,"div",55),S("click",function(){return n.setNewChannel("")}),i(74,"spk-radio",56),l(75,16),o(),i(76,"p"),l(77,17),o()(),i(78,"div",55),S("click",function(){return n.setNewChannel("stable")}),i(79,"spk-radio",56),l(80,18),o(),i(81,"p"),l(82,19),o()(),i(83,"div",55),S("click",function(){return n.setNewChannel("beta")}),i(84,"spk-radio",56),l(85,20),o(),i(86,"p"),l(87,21),o()(),i(88,"div",55),S("click",function(){return n.setNewChannel("experimental")}),i(89,"spk-radio",56),l(90,22),o(),i(91,"p"),l(92,23),o()(),i(93,"div",55),S("click",function(){return n.setNewChannel("canary")}),i(94,"spk-radio",56),l(95,24),o(),i(96,"p"),l(97,25),o()()()()(),I(98,"spk-divider"),i(99,"div",40)(100,"section")(101,"div",42)(102,"h3"),l(103,26),o(),i(104,"p"),l(105,27),o()(),i(106,"div",43)(107,"div",57)(108,"spk-range-slider",58)(109,"input",59),A("ngModelChange",function(_){return G(n.timeValue,_)||(n.timeValue=_),_}),o()(),i(110,"spk-select",60)(111,"input",61),S("ngModelChange",function(_){return n.updateTimeType(_)}),o(),f(112,Vt,1,1,"ng-template"),o()()()(),i(113,"section")(114,"div",42)(115,"h3"),l(116,28),o(),i(117,"p"),X(118,29),I(119,"a",62)(120,"br")(121,"br"),V(),o()(),i(122,"div",43)(123,"spk-select",63)(124,"input",50),S("ngModelChange",function(_){return n.updateUsageStatistics(_)}),o(),f(125,zt,1,1,"ng-template"),o()()()(),i(126,"div",40)(127,"section")(128,"div",64)(129,"h3"),l(130,30),o(),I(131,"app-advanced-options-settings"),o()()()),t&2){let a,_,T;r(13),z(n.remoteControlStatus()),r(11),N("active",!n.isDarkMode()),r(),N("active",n.isDarkMode()),r(8),C(n.showPassphraseForm()?33:34),r(9),h("options",n.languageOptions())("isClearable",!1)("inlineSearch",!0),r(),h("ngModel",n.langCtrl())("ngModelOptions",B(43,re)),r(8),N("active",n.allowRemoteAccess()),r(3),C(n.allowRemoteAccess()?54:-1),r(8),N("active",n.disableTrayIconLogin()),r(8),C(n.updateChannel()!==""&&((a=n.sysinfo())!=null&&a.ServerVersion)?70:-1),r(),C(n.updatingChannel()?71:-1),r(3),N("active",n.updateChannel()===""),r(),oe((_=n.sysinfo())==null?null:_.DefaultUpdateChannel),se(75),r(2),oe((T=n.sysinfo())==null?null:T.ServerVersionType),se(77),r(2),N("active",n.updateChannel()==="stable"),r(5),N("active",n.updateChannel()==="beta"),r(5),N("active",n.updateChannel()==="experimental"),r(5),N("active",n.updateChannel()==="canary"),r(14),h("unit",n.timeType()==="none"?"s":n.timeType()),r(),h("min",n.timeRange()[0])("max",n.timeRange()[1])("disabled",n.timeType()==="none"),y("ngModel",n.timeValue),h("ngModelOptions",B(44,re)),r(),h("options",n.timeTypeOptions())("isClearable",!1),r(),h("ngModel",n.timeType()),r(12),h("options",n.usageStatisticsOptions())("isLoading",n.updatingUsageStatistics()),r(),h("ngModel",n.usageStatistics())("ngModelOptions",B(45,re))}},dependencies:[Y,Q,pt,Z,J,ee,gt,ne,x,q,at,lt,st,_t,dt,j,W,ot,H,rt],styles:["[_nghost-%COMP%]{display:block}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 2rem 2rem}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem 0;position:sticky;top:0;background:var(--base-1);z-index:1000;border-bottom:1px solid var(--base-4)}header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}section[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem;padding:2rem 0;border-top:1px solid var(--base-4)}section[_ngcontent-%COMP%]:first-of-type{border-top:0}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;align-items:flex-start}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%] spk-button-group[_ngcontent-%COMP%]{margin-top:.25rem}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;width:50%}.passphrase-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:1rem}.passphrase-form[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.remote-access-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.themes[_ngcontent-%COMP%]{display:flex;gap:.5rem}.themes[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:15rem;border-radius:var(--shape-3);cursor:pointer}.themes[_ngcontent-%COMP%] img.active[_ngcontent-%COMP%]{border:2px solid var(--primary-500)}.radios[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.radio-option[_ngcontent-%COMP%]{cursor:pointer}.radio-option[_ngcontent-%COMP%] spk-radio[_ngcontent-%COMP%]{color:var(--base-8);margin-bottom:.25rem}.radio-option[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;color:var(--base-9)}.field-col[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.field-row[_ngcontent-%COMP%]{display:flex;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] spk-form-field[_ngcontent-%COMP%], .field-row[_ngcontent-%COMP%] spk-select[_ngcontent-%COMP%]{flex:1 0}.advanced-settings[_ngcontent-%COMP%]{grid-column:1/-1;display:grid;grid-template-columns:auto 1fr;gap:1rem}"],changeDetection:0})};export{Ut as debounceSignal,_e as default};
1
+ import{a as te}from"./chunk-KPH4ZAFT.js";import{a as gt}from"./chunk-6V7W7EKR.js";import{l as ae}from"./chunk-VPTXHYYV.js";import"./chunk-43BIRTPL.js";import"./chunk-FP6LM56A.js";import"./chunk-M5RL4LRX.js";import"./chunk-HIW2CN45.js";import"./chunk-4V45XF67.js";import"./chunk-UEYPJIJG.js";import{a as Tt}from"./chunk-T7QZL5YJ.js";import{a as K}from"./chunk-2CXHZS6X.js";import{a as St}from"./chunk-VZBWK3XF.js";import"./chunk-XHPURHO2.js";import"./chunk-7V4TPS4B.js";import"./chunk-T5WAKBP3.js";import{a as ct}from"./chunk-LUKUBN2Z.js";import"./chunk-RHW5QVAY.js";import"./chunk-DLJSVAM2.js";import{c as Q,e as Z,h as J,l as pt,s as Y,t as ee}from"./chunk-ABANCAM5.js";import"./chunk-FSKPPAVO.js";import{a as nt}from"./chunk-FQ55IACT.js";import"./chunk-WRKRV6RQ.js";import"./chunk-DYTQQHMA.js";import{A as _t,C as dt,a as W,b as H,e as it,g as q,k as ot,l as j,p as st,q as at,r as lt,t as rt}from"./chunk-ESAGJOZZ.js";import{h as k}from"./chunk-N5FH4YAX.js";import"./chunk-GQGMGFDX.js";import"./chunk-EBXJGPRA.js";import"./chunk-QUOBR5MG.js";import{$a as je,B as b,Db as i,Eb as o,F as R,Fb as I,Jb as P,Pb as X,Qb as V,Qc as F,Ra as qe,Rb as l,Rc as $,Sb as oe,T as He,Tb as se,Ua as r,Ub as Ze,Vb as S,Wb as p,Z as E,Zb as Je,a as Ue,b as Be,c as We,ea as u,fa as m,gb as w,gc as Ye,hc as et,jc as O,kc as z,lb as f,lc as U,n as v,oc as y,pc as G,qc as A,rb as Ke,sb as Qe,ub as h,uc as tt,va as c,vc as B,wb as N,zb as C}from"./chunk-4KE2I7OA.js";import"./chunk-7CGTOI24.js";var Ct=["formRef"],Et=()=>[import("./chunk-W66AXGSW.js").then(s=>s.OptionsListComponent)];function ft(s,e){s&1&&(i(0,"spk-alert",3),l(1,1),o())}function Nt(s,e){if(s&1){let t=P();i(0,"app-options-list",5),A("optionsChange",function(a){u(t);let _=p();return G(_.settings,a)||(_.settings=a),m(a)}),o()}if(s&2){let t=p();y("options",t.settings),h("hasFreeTextSettings",!0)}}var Mt=["Bytes","KB","MB","GB","TB","PB"],x=class s{#e=E(ae);#t=E(te);#i=E(k);formRef=je.required("formRef");settings=this.#e.settings;isSubmitting=c(!1);isLoadingOptions=c(!0);saved=c(!1);sizeOptions=c(Mt);lastRecievedServerSettings=c({});serverSettingsEffect=$(()=>{let e=this.#t.serverSettings();if(e===void 0)return;this.lastRecievedServerSettings.set(e),this.isLoadingOptions.set(!0);let t=Object.entries(e);t.forEach(([n,a],_)=>{if(n.startsWith("--")){let T=n.replace("--","");this.settings.update(g=>(g.some(M=>M.Name===T)||g.push({Name:T,Value:a}),g))}_===t.length-1&&this.isLoadingOptions.set(!1)})});submit(){this.isSubmitting.set(!0);let e=this.settings(),t=this.lastRecievedServerSettings(),n=e.map(g=>g.Name),_=Object.keys(t).filter(g=>!n.includes(g.replace("--",""))),T=e.reduce((g,M)=>(g[`--${M.Name}`]=M.Value,g),{});_.forEach(g=>{T[g]=null}),this.#i.patchApiV1Serversettings({requestBody:T}).pipe(R(()=>this.isSubmitting.set(!1))).subscribe({next:()=>{this.#t.refreshServerSettings(),this.saved.set(!0),setTimeout(()=>{this.saved.set(!1)},3e3)}})}static \u0275fac=function(t){return new(t||s)};static \u0275cmp=w({type:s,selectors:[["app-advanced-options-settings"]],viewQuery:function(t,n){t&1&&Ye(n.formRef,Ct,5),t&2&&et()},features:[tt([ae])],decls:8,vars:4,consts:()=>{let e;e=$localize`${"\uFFFD#4\uFFFD"}:START_TAG_SPK_ICON:floppy-disk${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SPK_ICON: Save settings `;let t;return t=$localize`Settings saved`,[e,t,[1,"actions"],[1,"success"],["spk-button","","type","button",1,"raised","primary",3,"click"],[3,"optionsChange","options","hasFreeTextSettings"]]},template:function(t,n){t&1&&(i(0,"div",2),f(1,ft,2,0,"spk-alert",3),i(2,"button",4),S("click",function(){return n.submit()}),X(3,0),I(4,"spk-icon"),V(),o()(),f(5,Nt,1,2),Ke(6,5,Et)),t&2&&(r(),C(n.saved()?1:-1),r(),N("loader",n.isSubmitting()),r(4),Qe(!n.isLoadingOptions()))},dependencies:[ee,q,W,H],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:40.625rem;justify-self:flex-end}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;justify-content:flex-end;margin-bottom:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-column[_ngcontent-%COMP%]{display:flex;flex-direction:column}.form-column[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.form-column[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:1rem}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:3fr 1fr;gap:.5rem;align-items:flex-end}.form-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 2.5rem;gap:.5rem;align-items:flex-end}.remote-volume-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.remote-volume-wrap[_ngcontent-%COMP%] p.warning[_ngcontent-%COMP%]{color:#7d7d00}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.advanced-option[_ngcontent-%COMP%]{display:grid;gap:.5rem;grid-template-columns:1fr 1fr 2.5rem;align-items:flex-end}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};var L=class s{#e=E(it);#t=E(k);#i=E(K);repeatRegisterTimer=null;state=c("unknown");claimUrl=c(null);registerUrl=c("");status=F(()=>{let e=this.state();return e==="enabled"?"Remote control is enabled but not connected":e==="connected"?"Remote control is connected":e==="registering"?"Registering machine...":e==="registeringfaulted"?"Registration failed":e==="registered"?"Registered, waiting for accept":e==="disabled"?"Remote control is configured but not enabled":e==="unknown"?"...loading...":"Remote control is not set up"});sysInfoEffect=$(()=>{let e=this.#i.systemInfo();e&&this.registerUrl.set(e.RemoteControlRegistrationUrl??"")});#n(e){e.RegistrationUrl&&this.claimUrl.set(e.RegistrationUrl),e.IsConnected?this.state.set("connected"):e.IsEnabled?this.state.set("enabled"):e.CanEnable?this.state.set("disabled"):e.IsRegisteringFaulted?this.state.set("registeringfaulted"):e.IsRegistering?e.RegistrationUrl!=null&&e.RegistrationUrl.trim().length>0?this.state.set("registered"):this.state.set("registering"):this.state.set("inactive");let t=this.state();this.repeatRegisterTimer!==null&&(clearTimeout(this.repeatRegisterTimer),this.repeatRegisterTimer=null),t==="registering"&&(this.repeatRegisterTimer=setTimeout(()=>{this.#t.postApiV1RemotecontrolRegister({requestBody:{RegistrationUrl:""}}).subscribe({next:n=>this.#n(n),error:n=>this.#o(n)})},5e3)),(t==="enabled"||t==="registered")&&(this.repeatRegisterTimer=setTimeout(()=>{this.#t.getApiV1RemotecontrolStatus().subscribe({next:n=>this.#n(n),error:n=>this.#o(n)})},5e3)),e.IsRegistering&&e.CanEnable&&this.#t.deleteApiV1RemotecontrolRegister().subscribe({next:n=>this.#n(n)})}#o(e){this.#t.getApiV1RemotecontrolStatus().subscribe({next:t=>this.#n(t)})}refreshRemoteControlStatus(){this.#t.getApiV1RemotecontrolStatus().subscribe({next:e=>this.#n(e),error:e=>this.#o(e)})}beginRemoteRegistration(){this.state.set("registering"),this.#t.postApiV1RemotecontrolRegister({requestBody:{RegistrationUrl:this.registerUrl()}}).subscribe({next:e=>this.#n(e),error:e=>this.#o(e)})}cancelRemoteRegistration(){this.#t.deleteApiV1RemotecontrolRegister().subscribe({next:e=>this.#n(e),error:e=>this.#o(e)})}enableRemoteControl(){this.#t.postApiV1RemotecontrolEnable().subscribe({next:e=>this.#n(e),error:e=>this.#o(e)})}disableRemoteControl(){this.#t.postApiV1RemotecontrolDisable().subscribe({next:e=>this.#n(e),error:e=>this.#o(e)})}deleteRemoteControl(){let e=this;this.#e.open(ct,{data:{title:$localize`Confirm delete`,message:$localize`Are you sure you want to delete the remote control registration?`,confirmText:$localize`Delete registration`,cancelText:$localize`Cancel`},closed:t=>{t&&e.#t.deleteApiV1RemotecontrolRegistration().subscribe({next:n=>e.#n(n),error:n=>e.#o(n)})}})}static \u0275fac=function(t){return new(t||s)};static \u0275prov=He({token:s,factory:s.\u0275fac,providedIn:"root"})};function Pt(s,e){if(s&1){let t=P();i(0,"spk-form-field",10)(1,"input",11),A("ngModelChange",function(a){u(t);let _=p(2);return G(_.registerUrl,a)||(_.registerUrl=a),m(a)}),o()(),i(2,"button",12),S("click",function(){u(t);let a=p(2);return m(a.register())}),l(3,0),o()}if(s&2){let t=p(2);r(),y("ngModel",t.registerUrl)}}function Ot(s,e){if(s&1&&(i(0,"div",8)(1,"label"),l(2,1),o(),i(3,"a",13),O(4),o()()),s&2){let t=p(2);r(3),Je("href",t.claimUrl(),qe),r(),z(t.claimUrl())}}function Rt(s,e){s&1&&(i(0,"div",8)(1,"label"),l(2,2),o()())}function It(s,e){if(s&1){let t=P();i(0,"button",12),S("click",function(){u(t);let a=p(2);return m(a.cancel())}),l(1,3),o()}}function yt(s,e){if(s&1){let t=P();i(0,"button",12),S("click",function(){u(t);let a=p(2);return m(a.disable())}),l(1,4),o()}}function Gt(s,e){if(s&1){let t=P();i(0,"button",12),S("click",function(){u(t);let a=p(2);return m(a.enable())}),l(1,5),o(),i(2,"button",14),S("click",function(){u(t);let a=p(2);return m(a.delete())}),l(3,6),o()}}function At(s,e){if(s&1&&(i(0,"div",7),f(1,Pt,4,1)(2,Ot,5,2,"div",8)(3,Rt,3,0,"div",8)(4,It,2,0,"button",9)(5,yt,2,0,"button",9)(6,Gt,4,0),o()),s&2){let t=p();r(),C(t.state()==="inactive"?1:-1),r(),C(t.state()==="registered"?2:-1),r(),C(t.state()==="registering"?3:-1),r(),C(t.state()==="registering"||t.state()==="registeringfaulted"||t.state()==="registered"?4:-1),r(),C(t.state()==="connected"||t.state()==="enabled"?5:-1),r(),C(t.state()==="disabled"?6:-1)}}var ne=class s{#e=E(L);state=this.#e.state;claimUrl=this.#e.claimUrl;registerUrl=this.#e.registerUrl;ngOnInit(){this.#e.refreshRemoteControlStatus()}cancel(){this.#e.cancelRemoteRegistration()}register(){this.#e.beginRemoteRegistration()}disable(){this.#e.disableRemoteControl()}enable(){this.#e.enableRemoteControl()}delete(){this.#e.deleteRemoteControl()}static \u0275fac=function(t){return new(t||s)};static \u0275cmp=w({type:s,selectors:[["app-remote-control"]],decls:1,vars:1,consts:()=>{let e;e=$localize`Register for remote control`;let t;t=$localize`Machine is now registered, open this link to add it to your account:`;let n;n=$localize`Registering, please wait...`;let a;a=$localize`Cancel registration`;let _;_=$localize`Disable remote control`;let T;T=$localize`Enable remote control`;let g;return g=$localize`Delete remote control setup`,[e,t,n,a,_,T,g,[1,"field-row"],[1,"field-col"],["type","button","spk-button","",1,"raised"],["label","Registration URL","for","remoteControlRegisterUrl"],["type","text","spk-input","","id","remoteControlRegisterUrl","name","remoteControlRegisterUrl",3,"ngModelChange","ngModel"],["type","button","spk-button","",1,"raised",3,"click"],["target","_blank",3,"href"],["type","button","spk-button","",1,"raised","error",3,"click"]]},template:function(t,n){t&1&&f(0,At,7,6,"div",7),t&2&&C(n.state()!=="unknown"?0:-1)},dependencies:[Y,Q,Z,J,j],styles:["[_nghost-%COMP%]{display:block}[_nghost-%COMP%] button[_ngcontent-%COMP%]{white-space:nowrap}.field-row[_ngcontent-%COMP%]{display:flex;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] spk-form-field[_ngcontent-%COMP%], .field-row[_ngcontent-%COMP%] spk-select[_ngcontent-%COMP%]{flex:1 0}"],changeDetection:0})};function mt(...s){let e=c(...s);return Object.defineProperty(e,"value",{get:e.asReadonly(),set:e.set.bind(e)})}var re=()=>({standalone:!0});function $t(s,e){s&1&&(i(0,"spk-icon",69),O(1,"check"),o())}function vt(s,e){s&1&&(i(0,"spk-icon",70),O(1,"prohibit"),o())}function bt(s,e){if(s&1){let t=P();i(0,"button",74),S("click",function(){u(t);let a=p(2);return m(a.updatePassphrase())}),l(1,34),o()}if(s&2){let t=p(2);N("loader",t.isUpdating())}}function wt(s,e){if(s&1){let t=P();i(0,"button",75),S("click",function(){u(t);let a=p(2);return m(a.updatePassphrase())}),l(1,35),o()}if(s&2){let t=p(2);N("loader",t.isUpdating()),h("disabled",!0)}}function kt(s,e){if(s&1){let t=P();i(0,"spk-form-field")(1,"label",65),l(2,31),o(),i(3,"input",66),A("ngModelChange",function(a){u(t);let _=p();return G(_.passphrase,a)||(_.passphrase=a),m(a)}),o()(),i(4,"spk-form-field")(5,"label",67),l(6,32),o(),i(7,"input",68),A("ngModelChange",function(a){u(t);let _=p();return G(_.repeatPassphrase,a)||(_.repeatPassphrase=a),m(a)}),o(),f(8,$t,2,0,"spk-icon",69)(9,vt,2,0,"spk-icon",70),o(),i(10,"div",48)(11,"button",71),S("click",function(){u(t);let a=p();return m(a.cancelPasswordChange())}),l(12,33),o(),f(13,bt,2,2,"button",72)(14,wt,2,3,"button",73),o()}if(s&2){let t=p();r(3),y("ngModel",t.passphrase),r(4),h("disabled",t.passphrase().length===0),y("ngModel",t.repeatPassphrase),r(),C(t.passphrase().length!==0&&t.passphrase()===t.repeatPassphrase()?8:9),r(3),N("loader",t.isUpdating()),r(2),C(t.passphrase().length!==0&&t.passphrase()===t.repeatPassphrase()?13:14)}}function Lt(s,e){s&1&&(i(0,"spk-icon",76),O(1,"check"),o())}function Ft(s,e){if(s&1){let t=P();i(0,"div",48)(1,"button",71),S("click",function(){u(t);let a=p();return m(a.openPassphraseForm())}),l(2,36),o(),f(3,Lt,2,0,"spk-icon",76),o()}if(s&2){let t=p();r(3),C(t.passwordUpdated()?3:-1)}}function xt(s,e){if(s&1){let t=P();i(0,"spk-form-field")(1,"label",77),l(2,37),o(),i(3,"textarea",78),A("ngModelChange",function(a){u(t);let _=p();return G(_.allowedHostnames,a)||(_.allowedHostnames=a),m(a)}),o()(),i(4,"spk-alert",79),l(5,38),o(),i(6,"button",74),S("click",function(){u(t);let a=p();return m(a.updateAllowedHostnames())}),l(7,39),o()}if(s&2){let t=p();r(3),y("ngModel",t.allowedHostnames),r(3),N("loader",t.updatingAllowedHosts())}}function Dt(s,e){if(s&1&&O(0),s&2){let t,n=p();U(" ",(t=n.sysinfo())==null?null:t.ServerVersion," ")}}function Xt(s,e){s&1&&I(0,"spk-progress-bar",53)}function Vt(s,e){if(s&1&&O(0),s&2){let t=e.$implicit;U(" ",t.label," ")}}function zt(s,e){if(s&1&&O(0),s&2){let t=e.$implicit;U(" ",t.label," ")}}function Ut(s,e,t){let n=mt(s),a=n[Ue];t?.equal&&(a.equal=t.equal);let _;return n.set=T=>{clearTimeout(_),_=setTimeout(()=>Be(a,T),e)},n.update=T=>{clearTimeout(_),_=setTimeout(()=>We(a,T),e)},n}var Bt=[{value:"none",label:$localize`None`},{value:"s",label:$localize`Seconds`},{value:"m",label:$localize`Minutes`},{value:"h",label:$localize`Hours`}],Wt=[{value:"none",label:$localize`System default (information)`},{value:"information",label:$localize`Usage statistics, warnings, errors, and crashes`},{value:"warning",label:$localize`Warnings, errors and crashes`},{value:"error",label:$localize`Errors and crashes`},{value:"crash",label:$localize`Crashes only`},{value:"none",label:$localize`None / disabled`}],_e=class s{#e=E(St);#t=E(K);#i=E(k);#n=E(te);#o=E(L);#s=E(nt);#a=this.#s.getItem("locale")??"en-US";sysinfo=this.#t.systemInfo;isDarkMode=this.#e.isDarkMode;editAs=c("list");previousLang=this.#a;langCtrl=c(this.#a);usageStatistics=c("");updatingUsageStatistics=c(!1);remoteControlStatus=this.#o.status;updatingChannel=c(!1);updateChannel=c("");setNewChannel(e){let t=this.updateChannel();this.updateChannel.set(e),this.#i.patchApiV1Serversettings({requestBody:{"update-channel":e}}).pipe(R(()=>this.updatingChannel.set(!1)),b(()=>(this.updateChannel.set(t),v(null)))).subscribe()}allowRemoteAccess=c(!1);allowedHostnames=c("");loadedAllowedHostnames=c("");updatingRemoteAccess=c(!1);updatingAllowedHosts=c(!1);updateRemoteAccess(){let e=this.allowRemoteAccess(),t=!e;this.allowRemoteAccess.set(t),this.#i.patchApiV1Serversettings({requestBody:{"server-listen-interface":t?"any":"loopback"}}).pipe(R(()=>this.updatingRemoteAccess.set(!1)),b(()=>(this.allowRemoteAccess.set(e),v(null)))).subscribe()}updateAllowedHostnames(){let e=this.loadedAllowedHostnames(),t=this.allowedHostnames();this.updatingAllowedHosts.set(!0),this.#i.patchApiV1Serversettings({requestBody:{"server-listen-interface":"any","allowed-hostnames":t}}).pipe(R(()=>this.updatingAllowedHosts.set(!1)),b(()=>(this.allowedHostnames.set(e),v(null)))).subscribe()}updatingDisableTrayIconLogin=c(!1);disableTrayIconLogin=c(!1);saveDisableTrayIconLogin(){let e=this.disableTrayIconLogin(),t=!e;this.updatingDisableTrayIconLogin.set(!0),this.disableTrayIconLogin.set(t),this.#i.patchApiV1Serversettings({requestBody:{"disable-tray-icon-login":t?"True":"False"}}).pipe(R(()=>this.updatingDisableTrayIconLogin.set(!1)),b(()=>(this.disableTrayIconLogin.set(e),v(null)))).subscribe()}showPassphraseForm=c(!1);isUpdating=c(!1);passphrase=c("");repeatPassphrase=c("");passwordUpdated=c(!1);updatePassphrase(){this.passphrase()===this.repeatPassphrase()&&(this.isUpdating.set(!0),this.#i.patchApiV1Serversettings({requestBody:{"server-passphrase":this.passphrase()}}).pipe(R(()=>this.isUpdating.set(!1))).subscribe({next:()=>{this.showPassphraseForm.set(!1),this.passwordUpdated.set(!0),setTimeout(()=>{this.passwordUpdated.set(!1)},3e3)}}))}openPassphraseForm(){this.showPassphraseForm.set(!0)}cancelPasswordChange(){this.showPassphraseForm.set(!1)}languageOptions=c(Tt);usageStatisticsOptions=c(Wt);timeTypeOptions=c(Bt);timeType=c("none");timeValue=Ut(0,300);timeRange=F(()=>this.timeType()==="h"?[0,24]:[0,60]);timeValueEffect=$(()=>{let e=this.timeValue();this.updateStartupDelay()});updateLocale(e){!e||e===""||e===this.previousLang||(this.#s.setItem("locale",e),window.location.reload())}updateStartupDelay(){let e=this.timeValue(),t=this.timeType(),n="";t!=="none"&&e!==0&&(n=`${e}${t}`),this.#i.patchApiV1Serversettings({requestBody:{"startup-delay":n}}).subscribe()}updateTimeType(e){this.timeType()==="none"&&this.timeValue.set(0),this.timeType.set(e)}updateUsageStatistics(e){let t=this.usageStatistics();!e||e===""||e===t||(this.usageStatistics.set(e),this.updatingUsageStatistics.set(!0),this.#i.patchApiV1Serversettings({requestBody:{"usage-reporter-level":this.usageStatistics()==="none"?"":this.usageStatistics()}}).pipe(R(()=>this.updatingUsageStatistics.set(!1)),b(()=>(this.usageStatistics.set(t),v(null)))).subscribe())}serverSettingsEffect=$(()=>{let e=this.#n.serverSettings();if(e===void 0)return;let t=e["startup-delay"],n=t.slice(-1),a=t.slice(0,-1),_=["s","m","h"];this.disableTrayIconLogin.set(e["disable-tray-icon-login"]!=="False"),this.updateChannel.set(e["update-channel"]),this.allowRemoteAccess.set(e["server-listen-interface"]==="any"),this.allowedHostnames.set(e["allowed-hostnames"]),this.loadedAllowedHostnames.set(e["allowed-hostnames"]),this.usageStatistics.set(e["usage-reporter-level"]===""?"none":e["usage-reporter-level"]),this.timeType.set(t==""?"none":_.includes(n)?n:"none"),this.timeValue.set(t==""?0:parseInt(a))});setDarkMode(){this.#e.setDarkMode()}setLightMode(){this.#e.setLightMode()}static \u0275fac=function(t){return new(t||s)};static \u0275cmp=w({type:s,selectors:[["app-settings"]],decls:132,vars:46,consts:()=>{let e;e=$localize`Settings`;let t;t=$localize`Configure your backup settings.`;let n;n=$localize`Remote access control`;let a;a=$localize`Color theme`;let _;_=$localize`Customize your application theme`;let T;T=$localize`Passwords`;let g;g=$localize`Change server passphrase`;let M;M=$localize`Language`;let de;de=$localize`Select a language for the platform`;let ce;ce=$localize`Allow remote access (requires restart)`;let pe;pe=$localize` By allowing remote access, the server listens to requests from any machine on your network. If you enable this option, make sure you are always using the computer on a secure firewall protected network. `;let Se;Se=$localize`Allow remote access`;let ge;ge=$localize`Prevent tray icon automatic log-in`;let Te;Te=$localize` By default, the tray icon will open the user interface with a token that unlocks the user interface. This ensures that you can access the user interface from the tray icon, while requiring others to enter a password. If you prefer having to type in the password, even when accessing the user interface from the tray icon, enable this option. `;let ue;ue=$localize`Prevent tray icon automatic log-in`;let me;me=$localize`Update channel`;let Ce;Ce=$localize` Default (${"\uFFFD0\uFFFD"}:INTERPOLATION:) `;let Ee;Ee=$localize`Same as the base install version: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let fe;fe=$localize`Stable`;let Ne;Ne=$localize`Official releases`;let Me;Me=$localize`Beta`;let he;he=$localize` Try out the new features that we are working on. Currently the most stable version available. Test Restore data before using this in production environments. `;let Pe;Pe=$localize` Experimental `;let Oe;Oe=$localize`Specific builds for developers only. Not for use with important data.`;let Re;Re=$localize`Canary`;let Ie;Ie=$localize`Individual builds for developers only. Not for use with important data.`;let ye;ye=$localize`Pause after startup or hibernation`;let Ge;Ge=$localize` Duplicati will run when started, but will remain in paused state for the duration. Duplicati will occupy minimal system resources and no backups will be run. `;let Ae;Ae=$localize`Usage statistics`;let D;D=$localize` Usage reports help us improve the user experience and evaluate impact of new features. We use them to generate ${"\uFFFD#119\uFFFD"}:START_LINK:public usage statistics.${"\uFFFD/#119\uFFFD"}:CLOSE_LINK:${"[\uFFFD#120\uFFFD\uFFFD/#120\uFFFD|\uFFFD#121\uFFFD\uFFFD/#121\uFFFD]"}:LINE_BREAK:${"[\uFFFD#120\uFFFD\uFFFD/#120\uFFFD|\uFFFD#121\uFFFD\uFFFD/#121\uFFFD]"}:LINE_BREAK: All usage reports are sent anonymously and do not contain any personal information. They contain information about hardware and operating system, the type of backend, backup duration, overall size of source data and similar data. They do not contain paths, filenames, usernames, passwords or similar sensitive information. `,D=Ze(D);let $e;$e=$localize`Advanced options`;let ve;ve=$localize`Enter new password`;let be;be=$localize`Repeat password`;let ie;ie=$localize`Password have to be filled and have to match`;let we;we=$localize`Passphrase`;let ke;ke=$localize`Repeat passphrase`;let Le;Le=$localize`Cancel`;let Fe;Fe=$localize` Update passphrase `;let xe;xe=$localize` Update passphrase `;let De;De=$localize`Change password`;let Xe;Xe=$localize`Allowed hostnames`;let Ve;Ve=$localize` To prevent various DNS based attacks, Duplicati limits the allowed hostnames to the ones listed here. Direct IP access and localhost is always allowed. Multiple hostnames can be supplied with a semicolon separator. If any of the allowed hostnames is an asterisk (*), all hostnames are allowed and this feature is disabled. If the field is empty, only IP address and localhost access is allowed. `;let ze;return ze=$localize` Update allowed hostnames `,[e,t,n,a,_,T,g,M,de,ce,pe,Se,ge,Te,ue,me,Ce,Ee,fe,Ne,Me,he,Pe,Oe,Re,Ie,ye,Ge,Ae,D,$e,we,ke,Le,Fe,xe,De,Xe,Ve,ze,[1,"content"],[1,"title"],[1,"left"],[1,"right"],[1,"themes"],["src","assets/images/light-theme.png","alt","light theme",3,"click"],["src","assets/images/dark-theme.png","alt","dark theme",3,"click"],[1,"right","passphrase-form"],[1,"actions"],["value","value","label","label",3,"options","isClearable","inlineSearch"],["type","text",3,"ngModelChange","ngModel","ngModelOptions"],[1,"right","remote-access-form"],[1,"primary","raised",3,"click"],[1,"indeterminate","primary"],[1,"right","radios"],[1,"radio-option",3,"click"],[1,"primary","raised"],[1,"field-row"],[1,"raised","primary",3,"unit"],["type","range",3,"ngModelChange","min","max","disabled","ngModel","ngModelOptions"],["label","label","value","value",3,"options","isClearable"],["type","text",3,"ngModelChange","ngModel"],["href","#"],["label","label","value","value",3,"options","isLoading"],[1,"advanced-settings"],["for","password"],["type","password","name","password","autocomplete","disabled","placeholder",ve,"tabindex","1",3,"ngModelChange","ngModel"],["for","repeatPassword"],["type","password","name","repeatPassword","autocomplete","disabled","placeholder",be,"tabindex","2",3,"ngModelChange","disabled","ngModel"],["suffix","",1,"spk-success"],["suffix",""],["spk-button","",3,"click"],["spk-button","",1,"raised","primary",3,"loader"],["spk-button","","spkTooltip",ie,1,"raised","primary",3,"loader","disabled"],["spk-button","",1,"raised","primary",3,"click"],["spk-button","","spkTooltip",ie,1,"raised","primary",3,"click","disabled"],[1,"spk-success"],["for","allowedHostnames"],["type","text","id","allowedHostnames",3,"ngModelChange","ngModel"],["type","primary"]]},template:function(t,n){if(t&1&&(I(0,"app-status-bar"),i(1,"div",40)(2,"header")(3,"div",41)(4,"h2"),l(5,0),o(),i(6,"p"),l(7,1),o()()(),i(8,"section")(9,"div",42)(10,"h3"),l(11,2),o(),i(12,"p"),O(13),o()(),i(14,"div",43),I(15,"app-remote-control"),o()(),i(16,"section")(17,"div",42)(18,"h3"),l(19,3),o(),i(20,"p"),l(21,4),o()(),i(22,"div",43)(23,"div",44)(24,"img",45),S("click",function(){return n.setLightMode()}),o(),i(25,"img",46),S("click",function(){return n.setDarkMode()}),o()()()(),i(26,"section")(27,"div",42)(28,"h3"),l(29,5),o(),i(30,"p"),l(31,6),o()(),i(32,"div",47),f(33,kt,15,7)(34,Ft,4,1,"div",48),o()(),i(35,"section")(36,"div",42)(37,"h3"),l(38,7),o(),i(39,"p"),l(40,8),o()(),i(41,"div",43)(42,"spk-select",49)(43,"input",50),S("ngModelChange",function(_){return n.updateLocale(_)}),o()()()(),i(44,"section")(45,"div",42)(46,"h3"),l(47,9),o(),i(48,"p"),l(49,10),o()(),i(50,"div",51)(51,"spk-toggle",52),S("click",function(){return n.updateRemoteAccess()}),i(52,"label"),l(53,11),o()(),f(54,xt,8,3),o()(),i(55,"section")(56,"div",42)(57,"h3"),l(58,12),o(),i(59,"p"),l(60,13),o()(),i(61,"div",43)(62,"spk-toggle",52),S("click",function(){return n.saveDisableTrayIconLogin()}),i(63,"label"),l(64,14),o()()()(),i(65,"section")(66,"div",42)(67,"h3"),l(68,15),o(),i(69,"p"),f(70,Dt,1,1),o(),f(71,Xt,1,0,"spk-progress-bar",53),o(),i(72,"div",54)(73,"div",55),S("click",function(){return n.setNewChannel("")}),i(74,"spk-radio",56),l(75,16),o(),i(76,"p"),l(77,17),o()(),i(78,"div",55),S("click",function(){return n.setNewChannel("stable")}),i(79,"spk-radio",56),l(80,18),o(),i(81,"p"),l(82,19),o()(),i(83,"div",55),S("click",function(){return n.setNewChannel("beta")}),i(84,"spk-radio",56),l(85,20),o(),i(86,"p"),l(87,21),o()(),i(88,"div",55),S("click",function(){return n.setNewChannel("experimental")}),i(89,"spk-radio",56),l(90,22),o(),i(91,"p"),l(92,23),o()(),i(93,"div",55),S("click",function(){return n.setNewChannel("canary")}),i(94,"spk-radio",56),l(95,24),o(),i(96,"p"),l(97,25),o()()()()(),I(98,"spk-divider"),i(99,"div",40)(100,"section")(101,"div",42)(102,"h3"),l(103,26),o(),i(104,"p"),l(105,27),o()(),i(106,"div",43)(107,"div",57)(108,"spk-range-slider",58)(109,"input",59),A("ngModelChange",function(_){return G(n.timeValue,_)||(n.timeValue=_),_}),o()(),i(110,"spk-select",60)(111,"input",61),S("ngModelChange",function(_){return n.updateTimeType(_)}),o(),f(112,Vt,1,1,"ng-template"),o()()()(),i(113,"section")(114,"div",42)(115,"h3"),l(116,28),o(),i(117,"p"),X(118,29),I(119,"a",62)(120,"br")(121,"br"),V(),o()(),i(122,"div",43)(123,"spk-select",63)(124,"input",50),S("ngModelChange",function(_){return n.updateUsageStatistics(_)}),o(),f(125,zt,1,1,"ng-template"),o()()()(),i(126,"div",40)(127,"section")(128,"div",64)(129,"h3"),l(130,30),o(),I(131,"app-advanced-options-settings"),o()()()),t&2){let a,_,T;r(13),z(n.remoteControlStatus()),r(11),N("active",!n.isDarkMode()),r(),N("active",n.isDarkMode()),r(8),C(n.showPassphraseForm()?33:34),r(9),h("options",n.languageOptions())("isClearable",!1)("inlineSearch",!0),r(),h("ngModel",n.langCtrl())("ngModelOptions",B(43,re)),r(8),N("active",n.allowRemoteAccess()),r(3),C(n.allowRemoteAccess()?54:-1),r(8),N("active",n.disableTrayIconLogin()),r(8),C(n.updateChannel()!==""&&((a=n.sysinfo())!=null&&a.ServerVersion)?70:-1),r(),C(n.updatingChannel()?71:-1),r(3),N("active",n.updateChannel()===""),r(),oe((_=n.sysinfo())==null?null:_.DefaultUpdateChannel),se(75),r(2),oe((T=n.sysinfo())==null?null:T.ServerVersionType),se(77),r(2),N("active",n.updateChannel()==="stable"),r(5),N("active",n.updateChannel()==="beta"),r(5),N("active",n.updateChannel()==="experimental"),r(5),N("active",n.updateChannel()==="canary"),r(14),h("unit",n.timeType()==="none"?"s":n.timeType()),r(),h("min",n.timeRange()[0])("max",n.timeRange()[1])("disabled",n.timeType()==="none"),y("ngModel",n.timeValue),h("ngModelOptions",B(44,re)),r(),h("options",n.timeTypeOptions())("isClearable",!1),r(),h("ngModel",n.timeType()),r(12),h("options",n.usageStatisticsOptions())("isLoading",n.updatingUsageStatistics()),r(),h("ngModel",n.usageStatistics())("ngModelOptions",B(45,re))}},dependencies:[Y,Q,pt,Z,J,ee,gt,ne,x,q,at,lt,st,_t,dt,j,W,ot,H,rt],styles:["[_nghost-%COMP%]{display:block}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 2rem 2rem}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem 0;position:sticky;top:0;background:var(--base-1);z-index:1000;border-bottom:1px solid var(--base-4)}header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}section[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem;padding:2rem 0;border-top:1px solid var(--base-4)}section[_ngcontent-%COMP%]:first-of-type{border-top:0}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;align-items:flex-start}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%] spk-button-group[_ngcontent-%COMP%]{margin-top:.25rem}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;width:50%}.passphrase-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:1rem}.passphrase-form[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.remote-access-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.themes[_ngcontent-%COMP%]{display:flex;gap:.5rem}.themes[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:15rem;border-radius:var(--shape-3);cursor:pointer}.themes[_ngcontent-%COMP%] img.active[_ngcontent-%COMP%]{border:2px solid var(--primary-500)}.radios[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.radio-option[_ngcontent-%COMP%]{cursor:pointer}.radio-option[_ngcontent-%COMP%] spk-radio[_ngcontent-%COMP%]{color:var(--base-8);margin-bottom:.25rem}.radio-option[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;color:var(--base-9)}.field-col[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.field-row[_ngcontent-%COMP%]{display:flex;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] spk-form-field[_ngcontent-%COMP%], .field-row[_ngcontent-%COMP%] spk-select[_ngcontent-%COMP%]{flex:1 0}.advanced-settings[_ngcontent-%COMP%]{grid-column:1/-1;display:grid;grid-template-columns:auto 1fr;gap:1rem}"],changeDetection:0})};export{Ut as debounceSignal,_e as default};
@@ -1 +1 @@
1
- import{a as z}from"./chunk-C5B4MW2I.js";import"./chunk-XHPURHO2.js";import"./chunk-7V4TPS4B.js";import{a as X}from"./chunk-T5WAKBP3.js";import"./chunk-LUKUBN2Z.js";import"./chunk-RHW5QVAY.js";import"./chunk-DLJSVAM2.js";import"./chunk-ABANCAM5.js";import"./chunk-FSKPPAVO.js";import"./chunk-FQ55IACT.js";import{e as E}from"./chunk-WRKRV6RQ.js";import"./chunk-DYTQQHMA.js";import{a as R,g as f,h as k,k as v,p as G}from"./chunk-ESAGJOZZ.js";import{h as w}from"./chunk-N5FH4YAX.js";import"./chunk-GQGMGFDX.js";import"./chunk-EBXJGPRA.js";import"./chunk-QUOBR5MG.js";import{Ab as N,Bb as x,Cb as $,Db as e,Eb as i,Fb as s,Gb as D,Hb as b,Pb as h,Qb as y,Rb as c,Sb as A,Tb as I,Ua as p,Wb as S,Z as d,gb as O,jc as l,lb as m,mc as B,rb as M,sb as P,ub as u,vc as g,wc as L,zb as F}from"./chunk-4KE2I7OA.js";import"./chunk-7CGTOI24.js";var W=()=>[k,f,R,E],j=()=>["/restore-from-files"],K=()=>["/restore/from-config"],q=t=>["/restore",t];function V(t,r){if(t&1&&(e(0,"spk-card",5),s(1,"img",10),e(2,"div",7)(3,"h3"),c(4,1),i(),e(5,"p"),l(6),i()(),e(7,"button",8),h(8,2),s(9,"spk-icon"),y(),i()()),t&2){let n,a,o=r.$implicit;p(4),A((n=o.Backup==null?null:o.Backup.Name)!==null&&n!==void 0?n:"Backup name missing"),I(4),p(2),B(" ",(a=o.Backup==null||o.Backup.Metadata==null?null:o.Backup.Metadata.SourceSizeString)!==null&&a!==void 0?a:"-"," / ",(a=o.Backup==null||o.Backup.Metadata==null?null:o.Backup.Metadata.BackupListCount)!==null&&a!==void 0?a:"-"," "),p(),u("routerLink",L(4,q,o.Backup==null?null:o.Backup.ID))}}function H(t,r){if(t&1&&x(0,V,10,6,"spk-card",5,N),t&2){let n=S(2);$(n.backups())}}function J(t,r){t&1&&(D(0),c(1,3),b())}function Q(t,r){if(t&1&&m(0,H,2,0)(1,J,2,0,"ng-container"),t&2){let n=S();F(n.backups().length?0:1)}}function U(t,r){t&1&&(e(0,"div",11),s(1,"spk-progress-bar",12),e(2,"div",7)(3,"h3"),c(4,4),i()()())}var C=class t{#e=d(X);#t=d(w);backups=this.#e.backups;backupsLoading=this.#e.backupsLoading;ngOnInit(){this.#e.getBackups(!0)}restoreNow(r){this.#t.postApiV1BackupByIdRestore({id:r.Backup?.ID,requestBody:{}})}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=O({type:t,selectors:[["app-restore"]],decls:32,vars:5,consts:()=>{let r;r=$localize`Where do you want to restore from?`;let n;n=$localize`Restore ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let a;a=$localize` Restore ${"\uFFFD#9\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let o;o=$localize`No backups founds`;let T;return T=$localize`Loading backups...`,[r,n,a,o,T,[1,"type-a"],["src","assets/images/backup.png","alt","","width","48px"],[1,"text"],["spk-button","",3,"routerLink"],["src","assets/images/restore.png","alt","","width","48px"],["src","assets/images/folder.png","alt","","width","48px"],[1,"loading-list"],[1,"indeterminate","primary"]]},template:function(n,a){n&1&&(s(0,"app-status-bar"),e(1,"section")(2,"h2"),c(3,0),i(),e(4,"spk-card",5),s(5,"img",6),e(6,"div",7)(7,"h3"),l(8,"Direct restore from backup files"),i(),e(9,"p"),l(10,"Point to your backup files and restore from there."),i()(),e(11,"button",8),l(12," Start "),e(13,"spk-icon"),l(14,"play-circle"),i()()(),e(15,"spk-card",5),s(16,"img",9),e(17,"div",7)(18,"h3"),l(19,"Restore from configuration"),i(),e(20,"p"),l(21,"Load destination from an exported job or a storage provider"),i()(),e(22,"button",8),l(23," Start "),e(24,"spk-icon"),l(25,"play-circle"),i()()(),e(26,"spk-divider"),l(27,"Or existing"),i(),m(28,Q,2,1)(29,U,5,0),M(30,28,W,null,29),i()),n&2&&(p(11),u("routerLink",g(3,j)),p(11),u("routerLink",g(4,K)),p(8),P(!a.backupsLoading()))},dependencies:[z,k,f,v,R,G,E],styles:["[_nghost-%COMP%]{display:block}h2[_ngcontent-%COMP%]{font:var(--title-30);text-align:center;padding:2rem}section[_ngcontent-%COMP%]{max-width:43.75rem;margin:0 auto;padding:2rem 1rem;display:flex;flex-direction:column;gap:1rem}spk-divider[_ngcontent-%COMP%]{color:var(--base-8)}spk-card[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;--card-padding: 2rem}spk-card[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:.25rem}"],changeDetection:0})};export{C as default};
1
+ import{a as z}from"./chunk-6V7W7EKR.js";import"./chunk-XHPURHO2.js";import"./chunk-7V4TPS4B.js";import{a as X}from"./chunk-T5WAKBP3.js";import"./chunk-LUKUBN2Z.js";import"./chunk-RHW5QVAY.js";import"./chunk-DLJSVAM2.js";import"./chunk-ABANCAM5.js";import"./chunk-FSKPPAVO.js";import"./chunk-FQ55IACT.js";import{e as E}from"./chunk-WRKRV6RQ.js";import"./chunk-DYTQQHMA.js";import{a as R,g as f,h as k,k as v,p as G}from"./chunk-ESAGJOZZ.js";import{h as w}from"./chunk-N5FH4YAX.js";import"./chunk-GQGMGFDX.js";import"./chunk-EBXJGPRA.js";import"./chunk-QUOBR5MG.js";import{Ab as N,Bb as x,Cb as $,Db as e,Eb as i,Fb as s,Gb as D,Hb as b,Pb as h,Qb as y,Rb as c,Sb as A,Tb as I,Ua as p,Wb as S,Z as d,gb as O,jc as l,lb as m,mc as B,rb as M,sb as P,ub as u,vc as g,wc as L,zb as F}from"./chunk-4KE2I7OA.js";import"./chunk-7CGTOI24.js";var W=()=>[k,f,R,E],j=()=>["/restore-from-files"],K=()=>["/restore/from-config"],q=t=>["/restore",t];function V(t,r){if(t&1&&(e(0,"spk-card",5),s(1,"img",10),e(2,"div",7)(3,"h3"),c(4,1),i(),e(5,"p"),l(6),i()(),e(7,"button",8),h(8,2),s(9,"spk-icon"),y(),i()()),t&2){let n,a,o=r.$implicit;p(4),A((n=o.Backup==null?null:o.Backup.Name)!==null&&n!==void 0?n:"Backup name missing"),I(4),p(2),B(" ",(a=o.Backup==null||o.Backup.Metadata==null?null:o.Backup.Metadata.SourceSizeString)!==null&&a!==void 0?a:"-"," / ",(a=o.Backup==null||o.Backup.Metadata==null?null:o.Backup.Metadata.BackupListCount)!==null&&a!==void 0?a:"-"," "),p(),u("routerLink",L(4,q,o.Backup==null?null:o.Backup.ID))}}function H(t,r){if(t&1&&x(0,V,10,6,"spk-card",5,N),t&2){let n=S(2);$(n.backups())}}function J(t,r){t&1&&(D(0),c(1,3),b())}function Q(t,r){if(t&1&&m(0,H,2,0)(1,J,2,0,"ng-container"),t&2){let n=S();F(n.backups().length?0:1)}}function U(t,r){t&1&&(e(0,"div",11),s(1,"spk-progress-bar",12),e(2,"div",7)(3,"h3"),c(4,4),i()()())}var C=class t{#e=d(X);#t=d(w);backups=this.#e.backups;backupsLoading=this.#e.backupsLoading;ngOnInit(){this.#e.getBackups(!0)}restoreNow(r){this.#t.postApiV1BackupByIdRestore({id:r.Backup?.ID,requestBody:{}})}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=O({type:t,selectors:[["app-restore"]],decls:32,vars:5,consts:()=>{let r;r=$localize`Where do you want to restore from?`;let n;n=$localize`Restore ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let a;a=$localize` Restore ${"\uFFFD#9\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let o;o=$localize`No backups founds`;let T;return T=$localize`Loading backups...`,[r,n,a,o,T,[1,"type-a"],["src","assets/images/backup.png","alt","","width","48px"],[1,"text"],["spk-button","",3,"routerLink"],["src","assets/images/restore.png","alt","","width","48px"],["src","assets/images/folder.png","alt","","width","48px"],[1,"loading-list"],[1,"indeterminate","primary"]]},template:function(n,a){n&1&&(s(0,"app-status-bar"),e(1,"section")(2,"h2"),c(3,0),i(),e(4,"spk-card",5),s(5,"img",6),e(6,"div",7)(7,"h3"),l(8,"Direct restore from backup files"),i(),e(9,"p"),l(10,"Point to your backup files and restore from there."),i()(),e(11,"button",8),l(12," Start "),e(13,"spk-icon"),l(14,"play-circle"),i()()(),e(15,"spk-card",5),s(16,"img",9),e(17,"div",7)(18,"h3"),l(19,"Restore from configuration"),i(),e(20,"p"),l(21,"Load destination from an exported job or a storage provider"),i()(),e(22,"button",8),l(23," Start "),e(24,"spk-icon"),l(25,"play-circle"),i()()(),e(26,"spk-divider"),l(27,"Or existing"),i(),m(28,Q,2,1)(29,U,5,0),M(30,28,W,null,29),i()),n&2&&(p(11),u("routerLink",g(3,j)),p(11),u("routerLink",g(4,K)),p(8),P(!a.backupsLoading()))},dependencies:[z,k,f,v,R,G,E],styles:["[_nghost-%COMP%]{display:block}h2[_ngcontent-%COMP%]{font:var(--title-30);text-align:center;padding:2rem}section[_ngcontent-%COMP%]{max-width:43.75rem;margin:0 auto;padding:2rem 1rem;display:flex;flex-direction:column;gap:1rem}spk-divider[_ngcontent-%COMP%]{color:var(--base-8)}spk-card[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;--card-padding: 2rem}spk-card[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:.25rem}"],changeDetection:0})};export{C as default};
@@ -1 +1 @@
1
- import{a as he}from"./chunk-C5B4MW2I.js";import{a as Ke}from"./chunk-M5RL4LRX.js";import{a as be,b as pe}from"./chunk-UEYPJIJG.js";import"./chunk-XHPURHO2.js";import"./chunk-7V4TPS4B.js";import{a as Be}from"./chunk-T5WAKBP3.js";import"./chunk-LUKUBN2Z.js";import"./chunk-RHW5QVAY.js";import{a as re}from"./chunk-DLJSVAM2.js";import"./chunk-ABANCAM5.js";import"./chunk-FSKPPAVO.js";import"./chunk-FQ55IACT.js";import{b as Ie,e as ke}from"./chunk-WRKRV6RQ.js";import"./chunk-DYTQQHMA.js";import{a as z,g as ae,j as ve,k as ye,p as le,y as xe}from"./chunk-ESAGJOZZ.js";import{h as _e}from"./chunk-N5FH4YAX.js";import"./chunk-GQGMGFDX.js";import{pa as w,sa as oe}from"./chunk-EBXJGPRA.js";import{a as se}from"./chunk-OQPUBCLB.js";import"./chunk-QUOBR5MG.js";import{Ab as I,Ac as g,Bb as k,Bc as T,Cb as v,Db as i,Eb as t,Fb as c,Gb as A,Hb as P,Jb as K,Pb as N,Qb as M,Qc as fe,Rb as _,Sb as s,Tb as d,Ua as o,Ub as U,Vb as y,Wb as m,Z as R,ea as D,fa as $,gb as b,jc as F,kc as x,lb as C,lc as S,nc as Re,r as B,rc as De,sa as ie,sc as $e,tc as X,ub as h,va as G,wb as f,zb as E,zc as u}from"./chunk-4KE2I7OA.js";import{a as te}from"./chunk-7CGTOI24.js";function we(n,a){n&1&&c(0,"spk-progress-bar",31)}function ze(n,a){n&1&&c(0,"div",34)}function Ve(n,a){n&1&&c(0,"div",35)}function We(n,a){n&1&&c(0,"div",36)}function je(n,a){if(n&1&&F(0),n&2){let e=m().$implicit;S(" (",e.data==null?null:e.data.WarningsActualLength," warnings) ")}}function qe(n,a){if(n&1&&(i(0,"details",45)(1,"summary"),N(2,15),c(3,"spk-icon"),i(4,"div",46),c(5,"spk-icon",39),t(),M(),t(),i(6,"div",47)(7,"p"),_(8,16),u(9,"date"),t(),i(10,"p"),_(11,17),u(12,"date"),t(),i(13,"p"),_(14,18),u(15,"durationFormat"),t(),i(16,"p"),_(17,19),t(),c(18,"spk-divider"),i(19,"p"),_(20,20),t(),i(21,"p"),_(22,21),t()()(),i(23,"details",45)(24,"summary")(25,"spk-icon"),F(26,"file-archive"),t(),F(27," Compression phase "),i(28,"div",46)(29,"spk-icon",39),F(30,"caret-down"),t()()(),i(31,"div",47)(32,"p"),_(33,22),u(34,"date"),t(),i(35,"p"),_(36,23),u(37,"date"),t(),i(38,"p"),_(39,24),u(40,"durationFormat"),t(),c(41,"spk-divider"),i(42,"p"),_(43,25),u(44,"bytes"),t(),i(45,"p"),_(46,26),u(47,"bytes"),t(),i(48,"p"),_(49,27),u(50,"bytes"),t(),c(51,"spk-divider"),i(52,"p"),_(53,28),t(),i(54,"p"),_(55,29),t()()()),n&2){let e=m(2).$implicit;o(9),s(T(9,17,e.data==null||e.data.TestResults==null?null:e.data.TestResults.BeginTime,"medium")),d(8),o(3),s(T(12,20,e.data==null||e.data.TestResults==null?null:e.data.TestResults.EndTime,"medium")),d(11),o(3),s(g(15,23,e.data==null||e.data.TestResults==null?null:e.data.TestResults.Duration)),d(14),o(2),s(e.data==null||e.data.TestResults==null?null:e.data.TestResults.VerificationsActualLength),d(17),o(3),s(e.data==null||e.data.TestResults==null?null:e.data.TestResults.WarningsActualLength),d(20),o(2),s(e.data==null||e.data.TestResults==null?null:e.data.TestResults.ErrorsActualLength),d(22),o(12),s(T(34,25,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.BeginTime,"medium")),d(33),o(3),s(T(37,28,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.EndTime,"medium")),d(36),o(3),s(g(40,31,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.Duration)),d(39),o(4),s(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DeletedFileCount)(g(44,33,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DeletedFileSize)),d(43),o(3),s(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DownloadedFileCount)(g(47,35,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DownloadedFileSize)),d(46),o(3),s(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.UploadedFileCount)(g(50,37,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.UploadedFileSize)),d(49),o(3),s(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.WarningsActualLength),d(53),o(2),s(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.ErrorsActualLength),d(55)}}function Je(n,a){if(n&1&&(i(0,"code"),F(1),u(2,"json"),t()),n&2){let e=a.$implicit;o(),x(g(2,1,e))}}function He(n,a){if(n&1&&(i(0,"details",45)(1,"summary"),N(2,30),c(3,"spk-icon"),i(4,"div",46),c(5,"spk-icon",39),t(),M(),t(),i(6,"div",47),k(7,Je,3,3,"code",null,I),t()()),n&2){let e=m(2).$implicit;o(5),s(e.data.VerificationsActualLength),d(2),o(2),v(e.data.Verifications)}}function Qe(n,a){if(n&1&&(i(0,"code"),F(1),u(2,"json"),t()),n&2){let e=a.$implicit;o(),x(g(2,1,e))}}function Ye(n,a){n&1&&(i(0,"p"),F(1,"No errors"),t())}function Ze(n,a){if(n&1&&(i(0,"code"),F(1),u(2,"json"),t()),n&2){let e=a.$implicit;o(),x(g(2,1,e))}}function en(n,a){if(n&1&&(i(0,"section",40)(1,"app-toggle-card",41),A(2,42),i(3,"h3"),_(4,0),t(),P(),A(5,43),i(6,"p"),_(7,1),u(8,"date"),t(),i(9,"p"),_(10,2),u(11,"date"),t(),i(12,"p"),_(13,3),u(14,"durationFormat"),t(),P(),t(),i(15,"app-toggle-card",41),A(16,42),i(17,"h3"),_(18,4),t(),P(),A(19,43),i(20,"p"),_(21,5),u(22,"bytes"),t(),i(23,"p"),_(24,6),u(25,"bytes"),t(),i(26,"p"),_(27,7),u(28,"bytes"),t(),i(29,"p"),_(30,8),u(31,"bytes"),t(),i(32,"p"),_(33,9),t(),i(34,"p"),_(35,10),t(),i(36,"p"),_(37,11),t(),P(),t(),i(38,"div",44),c(39,"spk-divider"),C(40,qe,56,39)(41,He,9,1,"details",45),i(42,"details",45)(43,"summary"),N(44,12),c(45,"spk-icon"),i(46,"div",46),c(47,"spk-icon",39),t(),M(),t(),i(48,"div",47),k(49,Qe,3,3,"code",null,I),t()(),i(51,"details",45)(52,"summary"),N(53,13),c(54,"spk-icon"),i(55,"div",46),c(56,"spk-icon",39),t(),M(),t(),i(57,"div",47),C(58,Ye,2,0,"p"),k(59,Ze,3,3,"code",null,I),t()(),c(61,"spk-divider"),i(62,"details")(63,"summary"),N(64,14),c(65,"spk-icon"),i(66,"div",46),c(67,"spk-icon",39),t(),M(),t(),i(68,"code")(69,"button",48),F(70,"Copy"),t(),F(71),u(72,"json"),t()()()()),n&2){let e=m().$implicit;o(),h("disallowToggle",!0),o(7),s(T(8,22,e.data==null?null:e.data.BeginTime,"medium")),d(7),o(3),s(T(11,25,e.data==null?null:e.data.EndTime,"medium")),d(10),o(3),s(g(14,28,e.data==null?null:e.data.Duration)),d(13),o(),h("disallowToggle",!0),o(7),s(e.data==null?null:e.data.ExaminedFiles)(g(22,30,e.data==null?null:e.data.SizeOfExaminedFiles)),d(21),o(3),s(e.data==null?null:e.data.OpenedFiles)(g(25,32,e.data==null?null:e.data.SizeOfOpenedFiles)),d(24),o(3),s(e.data==null?null:e.data.AddedFiles)(g(28,34,e.data==null?null:e.data.SizeOfAddedFiles)),d(27),o(3),s(e.data==null?null:e.data.ModifiedFiles)(g(31,36,e.data==null?null:e.data.SizeOfModifiedFiles)),d(30),o(2),s(e.data==null?null:e.data.DeletedFiles),d(33),o(2),s(e.data==null?null:e.data.TooLargeFiles),d(35),o(2),s(e.data==null?null:e.data.FilesWithError),d(37),o(3),E((e.data==null?null:e.data.MainOperation)==="Backup"?40:-1),o(),E((e.data==null?null:e.data.MainOperation)==="Test"?41:-1),o(6),s(e.data==null?null:e.data.WarningsActualLength),d(44),o(2),v(e.data==null?null:e.data.Warnings),o(7),s(e.data==null?null:e.data.ErrorsActualLength),d(53),o(2),E((e.data==null||e.data.Errors==null?null:e.data.Errors.length)===0?58:-1),o(),v(e.data==null?null:e.data.Errors),o(12),S(" ",g(72,38,e.data)," ")}}function nn(n,a){if(n&1){let e=K();i(0,"article",32)(1,"header",33),y("click",function(){let r=D(e).$implicit,L=m();return $(L.toggleOpenEntry(r.id))}),C(2,ze,1,0,"div",34)(3,Ve,1,0,"div",35)(4,We,1,0,"div",36),i(5,"h3"),F(6),u(7,"date"),t(),i(8,"p"),F(9),C(10,je,1,1),t(),c(11,"div",37),i(12,"div",38)(13,"spk-icon",39),F(14,"caret-down"),t()()(),C(15,en,73,40,"section",40),t()}if(n&2){let e=a.$implicit,l=m();o(2),E(e.data!=null&&e.data.ErrorsActualLength&&(e.data==null?null:e.data.ErrorsActualLength)>0?2:e.data!=null&&e.data.WarningsActualLength&&(e.data==null?null:e.data.WarningsActualLength)>0?3:4),o(4),x(T(7,7,e.timestamp,"medium")),o(3),S(" ",e.data==null?null:e.data.MainOperation," "),o(),E(e.data!=null&&e.data.WarningsActualLength&&(e.data==null?null:e.data.WarningsActualLength)>0?10:-1),o(3),f("open",e.id===l.openEntry()),o(2),E(e.id===l.openEntry()?15:-1)}}var de=class n{#e=R(_e);backupId=ie.required();openEntry=G(null);pagination=G({offset:0,pagesize:100});resource=pe({request:()=>te({id:this.backupId()},this.pagination()),loader:({request:a})=>this.#e.getApiV1BackupByIdLog({id:a.id,pagesize:100}).pipe(B(e=>e.map(l=>({id:l.ID,operationId:l.OperationID,timestamp:l.Timestamp*1e3,type:l.Type,data:JSON.parse(l.Message),exception:JSON.stringify(l.Exception)==="{}"?null:l.Exception}))))});toggleOpenEntry(a){if(this.openEntry()===a){this.openEntry.set(null);return}this.openEntry.set(a)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=b({type:n,selectors:[["app-general-log"]],inputs:{backupId:[1,"backupId"]},decls:3,vars:1,consts:()=>{let a;a=$localize`Time`;let e;e=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let l;l=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let r;r=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let L;L=$localize`Source files`;let V;V=$localize`Evaluated: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:)`;let W;W=$localize`Opened: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:)`;let j;j=$localize`Added: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:)`;let q;q=$localize`Modified: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:)`;let J;J=$localize`Deleted: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let H;H=$localize`Too large: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Q;Q=$localize`Files with error: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let O;O=$localize`${"\uFFFD#45\uFFFD"}:START_TAG_SPK_ICON:warning-circle${"[\uFFFD/#45\uFFFD|\uFFFD/#47\uFFFD]"}:CLOSE_TAG_SPK_ICON: Warnings ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#46\uFFFD"}:START_TAG_DIV:${"\uFFFD#47\uFFFD"}:START_TAG_SPK_ICON_1:caret-down${"[\uFFFD/#45\uFFFD|\uFFFD/#47\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#46\uFFFD"}:CLOSE_TAG_DIV:`,O=U(O);let Y;Y=$localize`${"\uFFFD#54\uFFFD"}:START_TAG_SPK_ICON:warning${"[\uFFFD/#54\uFFFD|\uFFFD/#56\uFFFD]"}:CLOSE_TAG_SPK_ICON: Errors ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#55\uFFFD"}:START_TAG_DIV:${"\uFFFD#56\uFFFD"}:START_TAG_SPK_ICON_1:caret-down${"[\uFFFD/#54\uFFFD|\uFFFD/#56\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#55\uFFFD"}:CLOSE_TAG_DIV:`,Y=U(Y);let Z;Z=$localize`${"\uFFFD#65\uFFFD"}:START_TAG_SPK_ICON:notepad${"[\uFFFD/#65\uFFFD|\uFFFD/#67\uFFFD]"}:CLOSE_TAG_SPK_ICON: Complete log ${"\uFFFD#66\uFFFD"}:START_TAG_DIV:${"\uFFFD#67\uFFFD"}:START_TAG_SPK_ICON_1:caret-down${"[\uFFFD/#65\uFFFD|\uFFFD/#67\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#66\uFFFD"}:CLOSE_TAG_DIV:`,Z=U(Z);let ee;ee=$localize`${"\uFFFD#3\uFFFD"}:START_TAG_SPK_ICON:circle-half-tilt${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SPK_ICON: Test phase ${"\uFFFD#4\uFFFD"}:START_TAG_DIV:${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON_1:caret-down${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_DIV:`,ee=U(ee);let Fe;Fe=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let ge;ge=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Ee;Ee=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let me;me=$localize`Verifications: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Ce;Ce=$localize`Warnings: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Oe;Oe=$localize`Errors: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Le;Le=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Te;Te=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Ae;Ae=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Pe;Pe=$localize` Deleted files: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let Se;Se=$localize` Downloaded files: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let Ge;Ge=$localize` Uploaded files: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let Ne;Ne=$localize`Warnings: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Me;Me=$localize`Errors: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let ne;return ne=$localize`${"\uFFFD#3\uFFFD"}:START_TAG_SPK_ICON:warning-circle${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SPK_ICON: Verifications ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#4\uFFFD"}:START_TAG_DIV:${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON_1:caret-down${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_DIV:`,ne=U(ne),[a,e,l,r,L,V,W,j,q,J,H,Q,O,Y,Z,ee,Fe,ge,Ee,me,Ce,Oe,Le,Te,Ae,Pe,Se,Ge,Ne,Me,ne,[1,"indeterminate","primary"],[1,"log-entry"],[3,"click"],[1,"status","error"],[1,"status","warn"],[1,"status"],[1,"spacer"],[1,"action"],[1,"toggle-indicator"],[1,"log-content"],[3,"disallowToggle"],["title",""],["content",""],[1,"extra-info"],["name","details"],[1,"actions"],[1,"content"],["spk-button","",1,"small"]]},template:function(e,l){e&1&&(C(0,we,1,0,"spk-progress-bar",31),k(1,nn,16,10,"article",32,I)),e&2&&(E(l.resource.isLoading()?0:-1),o(),v(l.resource.value()))},dependencies:[Ke,ye,le,ae,z,re,w,se,oe],styles:["[_nghost-%COMP%]{display:block}.log-entry[_ngcontent-%COMP%]{display:flex;flex-direction:column;cursor:pointer}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:1rem;border-bottom:1px solid var(--base-4);background-color:var(--base-1);cursor:pointer}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]:hover{background-color:var(--base-2)}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-30);margin:0}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-8)}.toggle-indicator[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;height:1.25rem;transition:transform 125ms linear}.toggle-indicator.open[_ngcontent-%COMP%]{transform:rotate(180deg)}details[_ngcontent-%COMP%]{display:flex;flex-direction:column}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;gap:.5rem;padding:.75rem;border-radius:var(--shape-2);background-color:var(--base-2)}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]:focus{outline:none}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]:hover{background-color:var(--base-3)}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]::marker{font-size:0}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;flex:1 0;gap:.5rem;-webkit-user-select:none;user-select:none}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;height:2rem;transition:transform 125ms linear}details[open][_ngcontent-%COMP%] summary[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{transform:rotate(180deg)}details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{padding:.75rem 1rem 0;display:flex;flex-direction:column;gap:.75rem}details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0}details[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{margin-top:.75rem;position:relative}details[_ngcontent-%COMP%] code[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{position:absolute;top:.75rem;right:.75rem}.extra-info[_ngcontent-%COMP%]{grid-column:1/-1;display:flex;flex-direction:column;gap:1rem}.extra-info[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;margin-bottom:.75rem}.extra-info[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{white-space:pre-wrap;padding:1rem;display:block;border-radius:var(--shape-2);background-color:var(--base-2)}.log-content[_ngcontent-%COMP%]{padding:1rem;display:grid;grid-template-columns:1fr 1fr;gap:1rem}.status[_ngcontent-%COMP%]{display:block;width:1rem;height:1rem;background-color:var(--success-500);border-radius:50%}.status.error[_ngcontent-%COMP%]{background-color:var(--error-500)}.status.warn[_ngcontent-%COMP%]{background-color:var(--warn-500)}"],changeDetection:0})};function tn(n,a){n&1&&c(0,"spk-progress-bar",0)}function on(n,a){if(n&1&&(i(0,"section",5)(1,"code"),F(2),u(3,"json"),t()()),n&2){let e=m().$implicit;o(2),x(g(3,1,e.data))}}function an(n,a){if(n&1){let e=K();i(0,"article",1)(1,"header",2),y("click",function(){let r=D(e).$implicit,L=m();return $(L.toggleOpenEntry(r.id))}),i(2,"h3"),F(3),u(4,"date"),t(),i(5,"div",3)(6,"spk-icon",4),F(7,"caret-down"),t()()(),C(8,on,4,3,"section",5),t()}if(n&2){let e=a.$implicit,l=m();o(3),Re("",T(4,6,e.timestamp,"medium"),": ",e.operation," ",e.path,""),o(3),f("open",e.id===l.openEntry()),o(2),E(e.id===l.openEntry()?8:-1)}}var ue=class n{#e=R(_e);backupId=ie.required();openEntry=G(null);pagination=G({offset:0,pagesize:100});resource=pe({request:()=>te({id:this.backupId()},this.pagination()),loader:({request:a})=>this.#e.getApiV1BackupByIdRemotelog({id:a.id,pagesize:100}).pipe(B(e=>e.map((l,r)=>({id:l.ID,operationId:l.OperationID,timestamp:l.Timestamp*1e3,operation:l.Operation,path:l.Path,data:typeof l.Data=="string"?JSON.parse(l.Data):null}))))});toggleOpenEntry(a){if(this.openEntry()===a){this.openEntry.set(null);return}this.openEntry.set(a)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=b({type:n,selectors:[["app-remote-log"]],inputs:{backupId:[1,"backupId"]},decls:3,vars:1,consts:[[1,"indeterminate","primary"],[1,"log-entry"],[3,"click"],[1,"actions"],[1,"toggle-indicator"],[1,"log-content"]],template:function(e,l){e&1&&(C(0,tn,1,0,"spk-progress-bar",0),k(1,an,9,9,"article",1,I)),e&2&&(E(l.resource.isLoading()?0:-1),o(),v(l.resource.value()))},dependencies:[oe,le,z,w],styles:["[_nghost-%COMP%]{display:block}.log-entry[_ngcontent-%COMP%]{display:flex;flex-direction:column}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:1rem;border-bottom:1px solid var(--base-4);background-color:var(--base-1);cursor:pointer}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]:hover{background-color:var(--base-2)}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-30);margin:0;-webkit-user-select:none;user-select:none}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-8)}.toggle-indicator[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;height:1.25rem;transition:transform 125ms linear}.toggle-indicator.open[_ngcontent-%COMP%]{transform:rotate(180deg)}.log-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:1rem}code[_ngcontent-%COMP%]{white-space:pre-wrap;padding:1rem;display:block;border-radius:var(--shape-2);background-color:var(--base-2)}"],changeDetection:0})};function ln(n,a){if(n&1&&(F(0," - "),A(1),_(2,6),P(),F(3),u(4,"durationFormat")),n&2){m(2);let e=X(6);o(3),S(" ",g(4,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.LastBackupDuration)," ")}}function _n(n,a){n&1&&(A(0),_(1,7),P())}function rn(n,a){if(n&1&&(F(0),u(1,"bytes")),n&2){m(2);let e=X(6);S(" ",g(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.SourceFilesSize)," ")}}function pn(n,a){n&1&&(A(0),_(1,8),P())}function sn(n,a){if(n&1&&(F(0),u(1,"bytes")),n&2){m(2);let e=X(6);S(" ",g(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.TargetFilesSize)," ")}}function dn(n,a){n&1&&(A(0),_(1,9),P())}function un(n,a){if(n&1&&(i(0,"spk-chip",19),_(1,10),t()),n&2){m(2);let e=X(6);o(),s(e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.BackupListCount),d(1)}}function cn(n,a){n&1&&(i(0,"spk-chip",20),_(1,11),t())}function Fn(n,a){if(n&1&&(i(0,"div",14)(1,"div",18)(2,"h3"),F(3),i(4,"spk-icon"),F(5,"database"),t()(),i(6,"p")(7,"span"),_(8,3),t(),F(9),u(10,"date"),C(11,ln,5,3)(12,_n,2,0,"ng-container"),t(),i(13,"p")(14,"span"),_(15,4),t(),C(16,rn,2,3)(17,pn,2,0,"ng-container"),t(),i(18,"p")(19,"span"),_(20,5),t(),C(21,sn,2,3)(22,dn,2,0,"ng-container"),t()(),C(23,un,2,1,"spk-chip",19)(24,cn,2,0,"spk-chip",20),t()),n&2){let e,l=m(),r=X(6);o(3),S(" ",(e=r.Backup==null?null:r.Backup.Name)!==null&&e!==void 0?e:l.MISSING_BACKUP_NAME," "),o(6),S(" ",T(10,6,r.Backup==null||r.Backup.Metadata==null?null:r.Backup.Metadata.LastBackupDate,"short")," "),o(2),E(!(r.Backup==null||r.Backup.Metadata==null)&&r.Backup.Metadata.LastBackupDuration?11:12),o(5),E(!(r.Backup==null||r.Backup.Metadata==null)&&r.Backup.Metadata.SourceFilesSize?16:17),o(5),E(!(r.Backup==null||r.Backup.Metadata==null)&&r.Backup.Metadata.TargetFilesSize?21:22),o(2),E(!(r.Backup==null||r.Backup.Metadata==null)&&r.Backup.Metadata.BackupListCount?23:24)}}function gn(n,a){if(n&1&&c(0,"app-general-log",17),n&2){let e=m();h("backupId",e.backupId())}}function En(n,a){if(n&1&&c(0,"app-remote-log",17),n&2){let e=m();h("backupId",e.backupId())}}var ce=class n{#e=R(Ie);#n=R(Be);MISSING_BACKUP_NAME=$localize`Backup name missing`;activeTab=G("general");backupId=be(this.#e.params.pipe(B(a=>a.id)));backup=fe(()=>{let a=this.backupId();return a?this.#n.getBackupById(a):null});static \u0275fac=function(e){return new(e||n)};static \u0275cmp=b({type:n,selectors:[["app-log"]],decls:15,vars:8,consts:()=>{let a;a=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let e;e=$localize`General`;let l;l=$localize` Destination `;let r;r=$localize`Last successful backup:`;let L;L=$localize`Source:`;let V;V=$localize`Destination:`;let W;W=$localize`took`;let j;j=$localize`N/A`;let q;q=$localize`N/A`;let J;J=$localize`N/A`;let H;H=$localize`${"\uFFFD0\uFFFD"}:INTERPOLATION: Version`;let Q;return Q=$localize`No version yet`,[a,e,l,r,L,V,W,j,q,J,H,Q,[1,"back"],["type","button","spk-button","","routerLink","/",1,"small"],[1,"backup"],[1,"primary"],["tab","",3,"click"],[3,"backupId"],[1,"text"],[1,"simple","success"],[1,"simple"]]},template:function(e,l){if(e&1){let r=K();c(0,"app-status-bar"),i(1,"section")(2,"div",12)(3,"button",13),N(4,0),c(5,"spk-icon"),M(),t()(),De(6),C(7,Fn,25,9,"div",14),i(8,"spk-tabs",15)(9,"button",16),y("click",function(){return D(r),$(l.activeTab.set("general"))}),_(10,1),t(),i(11,"button",16),y("click",function(){return D(r),$(l.activeTab.set("destination"))}),_(12,2),t()(),C(13,gn,1,1,"app-general-log",17)(14,En,1,1,"app-remote-log",17),t()}if(e&2){o(6);let r=$e(l.backup());o(),E(r?7:-1),o(2),f("active",l.activeTab()==="general"),o(2),f("active",l.activeTab()==="destination"),o(2),E(l.activeTab()==="general"?13:-1),o(),E(l.activeTab()==="destination"?14:-1)}},dependencies:[xe,de,ue,ke,re,se,w,he,z,ae,ve],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:1rem 1.5rem;gap:1rem}spk-tabs[_ngcontent-%COMP%]{margin-bottom:1rem}.backup[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem;gap:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;width:100%;max-width:40%}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{color:var(--base-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--base-12)}"],changeDetection:0})};export{ce as default};
1
+ import{a as he}from"./chunk-6V7W7EKR.js";import{a as Ke}from"./chunk-M5RL4LRX.js";import{a as be,b as pe}from"./chunk-UEYPJIJG.js";import"./chunk-XHPURHO2.js";import"./chunk-7V4TPS4B.js";import{a as Be}from"./chunk-T5WAKBP3.js";import"./chunk-LUKUBN2Z.js";import"./chunk-RHW5QVAY.js";import{a as re}from"./chunk-DLJSVAM2.js";import"./chunk-ABANCAM5.js";import"./chunk-FSKPPAVO.js";import"./chunk-FQ55IACT.js";import{b as Ie,e as ke}from"./chunk-WRKRV6RQ.js";import"./chunk-DYTQQHMA.js";import{a as z,g as ae,j as ve,k as ye,p as le,y as xe}from"./chunk-ESAGJOZZ.js";import{h as _e}from"./chunk-N5FH4YAX.js";import"./chunk-GQGMGFDX.js";import{pa as w,sa as oe}from"./chunk-EBXJGPRA.js";import{a as se}from"./chunk-OQPUBCLB.js";import"./chunk-QUOBR5MG.js";import{Ab as I,Ac as g,Bb as k,Bc as T,Cb as v,Db as i,Eb as t,Fb as c,Gb as A,Hb as P,Jb as K,Pb as N,Qb as M,Qc as fe,Rb as _,Sb as s,Tb as d,Ua as o,Ub as U,Vb as y,Wb as m,Z as R,ea as D,fa as $,gb as b,jc as F,kc as x,lb as C,lc as S,nc as Re,r as B,rc as De,sa as ie,sc as $e,tc as X,ub as h,va as G,wb as f,zb as E,zc as u}from"./chunk-4KE2I7OA.js";import{a as te}from"./chunk-7CGTOI24.js";function we(n,a){n&1&&c(0,"spk-progress-bar",31)}function ze(n,a){n&1&&c(0,"div",34)}function Ve(n,a){n&1&&c(0,"div",35)}function We(n,a){n&1&&c(0,"div",36)}function je(n,a){if(n&1&&F(0),n&2){let e=m().$implicit;S(" (",e.data==null?null:e.data.WarningsActualLength," warnings) ")}}function qe(n,a){if(n&1&&(i(0,"details",45)(1,"summary"),N(2,15),c(3,"spk-icon"),i(4,"div",46),c(5,"spk-icon",39),t(),M(),t(),i(6,"div",47)(7,"p"),_(8,16),u(9,"date"),t(),i(10,"p"),_(11,17),u(12,"date"),t(),i(13,"p"),_(14,18),u(15,"durationFormat"),t(),i(16,"p"),_(17,19),t(),c(18,"spk-divider"),i(19,"p"),_(20,20),t(),i(21,"p"),_(22,21),t()()(),i(23,"details",45)(24,"summary")(25,"spk-icon"),F(26,"file-archive"),t(),F(27," Compression phase "),i(28,"div",46)(29,"spk-icon",39),F(30,"caret-down"),t()()(),i(31,"div",47)(32,"p"),_(33,22),u(34,"date"),t(),i(35,"p"),_(36,23),u(37,"date"),t(),i(38,"p"),_(39,24),u(40,"durationFormat"),t(),c(41,"spk-divider"),i(42,"p"),_(43,25),u(44,"bytes"),t(),i(45,"p"),_(46,26),u(47,"bytes"),t(),i(48,"p"),_(49,27),u(50,"bytes"),t(),c(51,"spk-divider"),i(52,"p"),_(53,28),t(),i(54,"p"),_(55,29),t()()()),n&2){let e=m(2).$implicit;o(9),s(T(9,17,e.data==null||e.data.TestResults==null?null:e.data.TestResults.BeginTime,"medium")),d(8),o(3),s(T(12,20,e.data==null||e.data.TestResults==null?null:e.data.TestResults.EndTime,"medium")),d(11),o(3),s(g(15,23,e.data==null||e.data.TestResults==null?null:e.data.TestResults.Duration)),d(14),o(2),s(e.data==null||e.data.TestResults==null?null:e.data.TestResults.VerificationsActualLength),d(17),o(3),s(e.data==null||e.data.TestResults==null?null:e.data.TestResults.WarningsActualLength),d(20),o(2),s(e.data==null||e.data.TestResults==null?null:e.data.TestResults.ErrorsActualLength),d(22),o(12),s(T(34,25,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.BeginTime,"medium")),d(33),o(3),s(T(37,28,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.EndTime,"medium")),d(36),o(3),s(g(40,31,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.Duration)),d(39),o(4),s(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DeletedFileCount)(g(44,33,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DeletedFileSize)),d(43),o(3),s(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DownloadedFileCount)(g(47,35,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DownloadedFileSize)),d(46),o(3),s(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.UploadedFileCount)(g(50,37,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.UploadedFileSize)),d(49),o(3),s(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.WarningsActualLength),d(53),o(2),s(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.ErrorsActualLength),d(55)}}function Je(n,a){if(n&1&&(i(0,"code"),F(1),u(2,"json"),t()),n&2){let e=a.$implicit;o(),x(g(2,1,e))}}function He(n,a){if(n&1&&(i(0,"details",45)(1,"summary"),N(2,30),c(3,"spk-icon"),i(4,"div",46),c(5,"spk-icon",39),t(),M(),t(),i(6,"div",47),k(7,Je,3,3,"code",null,I),t()()),n&2){let e=m(2).$implicit;o(5),s(e.data.VerificationsActualLength),d(2),o(2),v(e.data.Verifications)}}function Qe(n,a){if(n&1&&(i(0,"code"),F(1),u(2,"json"),t()),n&2){let e=a.$implicit;o(),x(g(2,1,e))}}function Ye(n,a){n&1&&(i(0,"p"),F(1,"No errors"),t())}function Ze(n,a){if(n&1&&(i(0,"code"),F(1),u(2,"json"),t()),n&2){let e=a.$implicit;o(),x(g(2,1,e))}}function en(n,a){if(n&1&&(i(0,"section",40)(1,"app-toggle-card",41),A(2,42),i(3,"h3"),_(4,0),t(),P(),A(5,43),i(6,"p"),_(7,1),u(8,"date"),t(),i(9,"p"),_(10,2),u(11,"date"),t(),i(12,"p"),_(13,3),u(14,"durationFormat"),t(),P(),t(),i(15,"app-toggle-card",41),A(16,42),i(17,"h3"),_(18,4),t(),P(),A(19,43),i(20,"p"),_(21,5),u(22,"bytes"),t(),i(23,"p"),_(24,6),u(25,"bytes"),t(),i(26,"p"),_(27,7),u(28,"bytes"),t(),i(29,"p"),_(30,8),u(31,"bytes"),t(),i(32,"p"),_(33,9),t(),i(34,"p"),_(35,10),t(),i(36,"p"),_(37,11),t(),P(),t(),i(38,"div",44),c(39,"spk-divider"),C(40,qe,56,39)(41,He,9,1,"details",45),i(42,"details",45)(43,"summary"),N(44,12),c(45,"spk-icon"),i(46,"div",46),c(47,"spk-icon",39),t(),M(),t(),i(48,"div",47),k(49,Qe,3,3,"code",null,I),t()(),i(51,"details",45)(52,"summary"),N(53,13),c(54,"spk-icon"),i(55,"div",46),c(56,"spk-icon",39),t(),M(),t(),i(57,"div",47),C(58,Ye,2,0,"p"),k(59,Ze,3,3,"code",null,I),t()(),c(61,"spk-divider"),i(62,"details")(63,"summary"),N(64,14),c(65,"spk-icon"),i(66,"div",46),c(67,"spk-icon",39),t(),M(),t(),i(68,"code")(69,"button",48),F(70,"Copy"),t(),F(71),u(72,"json"),t()()()()),n&2){let e=m().$implicit;o(),h("disallowToggle",!0),o(7),s(T(8,22,e.data==null?null:e.data.BeginTime,"medium")),d(7),o(3),s(T(11,25,e.data==null?null:e.data.EndTime,"medium")),d(10),o(3),s(g(14,28,e.data==null?null:e.data.Duration)),d(13),o(),h("disallowToggle",!0),o(7),s(e.data==null?null:e.data.ExaminedFiles)(g(22,30,e.data==null?null:e.data.SizeOfExaminedFiles)),d(21),o(3),s(e.data==null?null:e.data.OpenedFiles)(g(25,32,e.data==null?null:e.data.SizeOfOpenedFiles)),d(24),o(3),s(e.data==null?null:e.data.AddedFiles)(g(28,34,e.data==null?null:e.data.SizeOfAddedFiles)),d(27),o(3),s(e.data==null?null:e.data.ModifiedFiles)(g(31,36,e.data==null?null:e.data.SizeOfModifiedFiles)),d(30),o(2),s(e.data==null?null:e.data.DeletedFiles),d(33),o(2),s(e.data==null?null:e.data.TooLargeFiles),d(35),o(2),s(e.data==null?null:e.data.FilesWithError),d(37),o(3),E((e.data==null?null:e.data.MainOperation)==="Backup"?40:-1),o(),E((e.data==null?null:e.data.MainOperation)==="Test"?41:-1),o(6),s(e.data==null?null:e.data.WarningsActualLength),d(44),o(2),v(e.data==null?null:e.data.Warnings),o(7),s(e.data==null?null:e.data.ErrorsActualLength),d(53),o(2),E((e.data==null||e.data.Errors==null?null:e.data.Errors.length)===0?58:-1),o(),v(e.data==null?null:e.data.Errors),o(12),S(" ",g(72,38,e.data)," ")}}function nn(n,a){if(n&1){let e=K();i(0,"article",32)(1,"header",33),y("click",function(){let r=D(e).$implicit,L=m();return $(L.toggleOpenEntry(r.id))}),C(2,ze,1,0,"div",34)(3,Ve,1,0,"div",35)(4,We,1,0,"div",36),i(5,"h3"),F(6),u(7,"date"),t(),i(8,"p"),F(9),C(10,je,1,1),t(),c(11,"div",37),i(12,"div",38)(13,"spk-icon",39),F(14,"caret-down"),t()()(),C(15,en,73,40,"section",40),t()}if(n&2){let e=a.$implicit,l=m();o(2),E(e.data!=null&&e.data.ErrorsActualLength&&(e.data==null?null:e.data.ErrorsActualLength)>0?2:e.data!=null&&e.data.WarningsActualLength&&(e.data==null?null:e.data.WarningsActualLength)>0?3:4),o(4),x(T(7,7,e.timestamp,"medium")),o(3),S(" ",e.data==null?null:e.data.MainOperation," "),o(),E(e.data!=null&&e.data.WarningsActualLength&&(e.data==null?null:e.data.WarningsActualLength)>0?10:-1),o(3),f("open",e.id===l.openEntry()),o(2),E(e.id===l.openEntry()?15:-1)}}var de=class n{#e=R(_e);backupId=ie.required();openEntry=G(null);pagination=G({offset:0,pagesize:100});resource=pe({request:()=>te({id:this.backupId()},this.pagination()),loader:({request:a})=>this.#e.getApiV1BackupByIdLog({id:a.id,pagesize:100}).pipe(B(e=>e.map(l=>({id:l.ID,operationId:l.OperationID,timestamp:l.Timestamp*1e3,type:l.Type,data:JSON.parse(l.Message),exception:JSON.stringify(l.Exception)==="{}"?null:l.Exception}))))});toggleOpenEntry(a){if(this.openEntry()===a){this.openEntry.set(null);return}this.openEntry.set(a)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=b({type:n,selectors:[["app-general-log"]],inputs:{backupId:[1,"backupId"]},decls:3,vars:1,consts:()=>{let a;a=$localize`Time`;let e;e=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let l;l=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let r;r=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let L;L=$localize`Source files`;let V;V=$localize`Evaluated: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:)`;let W;W=$localize`Opened: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:)`;let j;j=$localize`Added: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:)`;let q;q=$localize`Modified: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:)`;let J;J=$localize`Deleted: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let H;H=$localize`Too large: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Q;Q=$localize`Files with error: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let O;O=$localize`${"\uFFFD#45\uFFFD"}:START_TAG_SPK_ICON:warning-circle${"[\uFFFD/#45\uFFFD|\uFFFD/#47\uFFFD]"}:CLOSE_TAG_SPK_ICON: Warnings ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#46\uFFFD"}:START_TAG_DIV:${"\uFFFD#47\uFFFD"}:START_TAG_SPK_ICON_1:caret-down${"[\uFFFD/#45\uFFFD|\uFFFD/#47\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#46\uFFFD"}:CLOSE_TAG_DIV:`,O=U(O);let Y;Y=$localize`${"\uFFFD#54\uFFFD"}:START_TAG_SPK_ICON:warning${"[\uFFFD/#54\uFFFD|\uFFFD/#56\uFFFD]"}:CLOSE_TAG_SPK_ICON: Errors ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#55\uFFFD"}:START_TAG_DIV:${"\uFFFD#56\uFFFD"}:START_TAG_SPK_ICON_1:caret-down${"[\uFFFD/#54\uFFFD|\uFFFD/#56\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#55\uFFFD"}:CLOSE_TAG_DIV:`,Y=U(Y);let Z;Z=$localize`${"\uFFFD#65\uFFFD"}:START_TAG_SPK_ICON:notepad${"[\uFFFD/#65\uFFFD|\uFFFD/#67\uFFFD]"}:CLOSE_TAG_SPK_ICON: Complete log ${"\uFFFD#66\uFFFD"}:START_TAG_DIV:${"\uFFFD#67\uFFFD"}:START_TAG_SPK_ICON_1:caret-down${"[\uFFFD/#65\uFFFD|\uFFFD/#67\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#66\uFFFD"}:CLOSE_TAG_DIV:`,Z=U(Z);let ee;ee=$localize`${"\uFFFD#3\uFFFD"}:START_TAG_SPK_ICON:circle-half-tilt${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SPK_ICON: Test phase ${"\uFFFD#4\uFFFD"}:START_TAG_DIV:${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON_1:caret-down${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_DIV:`,ee=U(ee);let Fe;Fe=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let ge;ge=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Ee;Ee=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let me;me=$localize`Verifications: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Ce;Ce=$localize`Warnings: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Oe;Oe=$localize`Errors: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Le;Le=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Te;Te=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Ae;Ae=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Pe;Pe=$localize` Deleted files: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let Se;Se=$localize` Downloaded files: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let Ge;Ge=$localize` Uploaded files: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let Ne;Ne=$localize`Warnings: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Me;Me=$localize`Errors: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let ne;return ne=$localize`${"\uFFFD#3\uFFFD"}:START_TAG_SPK_ICON:warning-circle${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SPK_ICON: Verifications ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#4\uFFFD"}:START_TAG_DIV:${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON_1:caret-down${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_DIV:`,ne=U(ne),[a,e,l,r,L,V,W,j,q,J,H,Q,O,Y,Z,ee,Fe,ge,Ee,me,Ce,Oe,Le,Te,Ae,Pe,Se,Ge,Ne,Me,ne,[1,"indeterminate","primary"],[1,"log-entry"],[3,"click"],[1,"status","error"],[1,"status","warn"],[1,"status"],[1,"spacer"],[1,"action"],[1,"toggle-indicator"],[1,"log-content"],[3,"disallowToggle"],["title",""],["content",""],[1,"extra-info"],["name","details"],[1,"actions"],[1,"content"],["spk-button","",1,"small"]]},template:function(e,l){e&1&&(C(0,we,1,0,"spk-progress-bar",31),k(1,nn,16,10,"article",32,I)),e&2&&(E(l.resource.isLoading()?0:-1),o(),v(l.resource.value()))},dependencies:[Ke,ye,le,ae,z,re,w,se,oe],styles:["[_nghost-%COMP%]{display:block}.log-entry[_ngcontent-%COMP%]{display:flex;flex-direction:column;cursor:pointer}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:1rem;border-bottom:1px solid var(--base-4);background-color:var(--base-1);cursor:pointer}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]:hover{background-color:var(--base-2)}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-30);margin:0}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-8)}.toggle-indicator[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;height:1.25rem;transition:transform 125ms linear}.toggle-indicator.open[_ngcontent-%COMP%]{transform:rotate(180deg)}details[_ngcontent-%COMP%]{display:flex;flex-direction:column}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;gap:.5rem;padding:.75rem;border-radius:var(--shape-2);background-color:var(--base-2)}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]:focus{outline:none}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]:hover{background-color:var(--base-3)}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]::marker{font-size:0}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;flex:1 0;gap:.5rem;-webkit-user-select:none;user-select:none}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;height:2rem;transition:transform 125ms linear}details[open][_ngcontent-%COMP%] summary[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{transform:rotate(180deg)}details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{padding:.75rem 1rem 0;display:flex;flex-direction:column;gap:.75rem}details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0}details[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{margin-top:.75rem;position:relative}details[_ngcontent-%COMP%] code[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{position:absolute;top:.75rem;right:.75rem}.extra-info[_ngcontent-%COMP%]{grid-column:1/-1;display:flex;flex-direction:column;gap:1rem}.extra-info[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;margin-bottom:.75rem}.extra-info[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{white-space:pre-wrap;padding:1rem;display:block;border-radius:var(--shape-2);background-color:var(--base-2)}.log-content[_ngcontent-%COMP%]{padding:1rem;display:grid;grid-template-columns:1fr 1fr;gap:1rem}.status[_ngcontent-%COMP%]{display:block;width:1rem;height:1rem;background-color:var(--success-500);border-radius:50%}.status.error[_ngcontent-%COMP%]{background-color:var(--error-500)}.status.warn[_ngcontent-%COMP%]{background-color:var(--warn-500)}"],changeDetection:0})};function tn(n,a){n&1&&c(0,"spk-progress-bar",0)}function on(n,a){if(n&1&&(i(0,"section",5)(1,"code"),F(2),u(3,"json"),t()()),n&2){let e=m().$implicit;o(2),x(g(3,1,e.data))}}function an(n,a){if(n&1){let e=K();i(0,"article",1)(1,"header",2),y("click",function(){let r=D(e).$implicit,L=m();return $(L.toggleOpenEntry(r.id))}),i(2,"h3"),F(3),u(4,"date"),t(),i(5,"div",3)(6,"spk-icon",4),F(7,"caret-down"),t()()(),C(8,on,4,3,"section",5),t()}if(n&2){let e=a.$implicit,l=m();o(3),Re("",T(4,6,e.timestamp,"medium"),": ",e.operation," ",e.path,""),o(3),f("open",e.id===l.openEntry()),o(2),E(e.id===l.openEntry()?8:-1)}}var ue=class n{#e=R(_e);backupId=ie.required();openEntry=G(null);pagination=G({offset:0,pagesize:100});resource=pe({request:()=>te({id:this.backupId()},this.pagination()),loader:({request:a})=>this.#e.getApiV1BackupByIdRemotelog({id:a.id,pagesize:100}).pipe(B(e=>e.map((l,r)=>({id:l.ID,operationId:l.OperationID,timestamp:l.Timestamp*1e3,operation:l.Operation,path:l.Path,data:typeof l.Data=="string"?JSON.parse(l.Data):null}))))});toggleOpenEntry(a){if(this.openEntry()===a){this.openEntry.set(null);return}this.openEntry.set(a)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=b({type:n,selectors:[["app-remote-log"]],inputs:{backupId:[1,"backupId"]},decls:3,vars:1,consts:[[1,"indeterminate","primary"],[1,"log-entry"],[3,"click"],[1,"actions"],[1,"toggle-indicator"],[1,"log-content"]],template:function(e,l){e&1&&(C(0,tn,1,0,"spk-progress-bar",0),k(1,an,9,9,"article",1,I)),e&2&&(E(l.resource.isLoading()?0:-1),o(),v(l.resource.value()))},dependencies:[oe,le,z,w],styles:["[_nghost-%COMP%]{display:block}.log-entry[_ngcontent-%COMP%]{display:flex;flex-direction:column}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:1rem;border-bottom:1px solid var(--base-4);background-color:var(--base-1);cursor:pointer}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]:hover{background-color:var(--base-2)}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-30);margin:0;-webkit-user-select:none;user-select:none}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-8)}.toggle-indicator[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;height:1.25rem;transition:transform 125ms linear}.toggle-indicator.open[_ngcontent-%COMP%]{transform:rotate(180deg)}.log-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:1rem}code[_ngcontent-%COMP%]{white-space:pre-wrap;padding:1rem;display:block;border-radius:var(--shape-2);background-color:var(--base-2)}"],changeDetection:0})};function ln(n,a){if(n&1&&(F(0," - "),A(1),_(2,6),P(),F(3),u(4,"durationFormat")),n&2){m(2);let e=X(6);o(3),S(" ",g(4,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.LastBackupDuration)," ")}}function _n(n,a){n&1&&(A(0),_(1,7),P())}function rn(n,a){if(n&1&&(F(0),u(1,"bytes")),n&2){m(2);let e=X(6);S(" ",g(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.SourceFilesSize)," ")}}function pn(n,a){n&1&&(A(0),_(1,8),P())}function sn(n,a){if(n&1&&(F(0),u(1,"bytes")),n&2){m(2);let e=X(6);S(" ",g(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.TargetFilesSize)," ")}}function dn(n,a){n&1&&(A(0),_(1,9),P())}function un(n,a){if(n&1&&(i(0,"spk-chip",19),_(1,10),t()),n&2){m(2);let e=X(6);o(),s(e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.BackupListCount),d(1)}}function cn(n,a){n&1&&(i(0,"spk-chip",20),_(1,11),t())}function Fn(n,a){if(n&1&&(i(0,"div",14)(1,"div",18)(2,"h3"),F(3),i(4,"spk-icon"),F(5,"database"),t()(),i(6,"p")(7,"span"),_(8,3),t(),F(9),u(10,"date"),C(11,ln,5,3)(12,_n,2,0,"ng-container"),t(),i(13,"p")(14,"span"),_(15,4),t(),C(16,rn,2,3)(17,pn,2,0,"ng-container"),t(),i(18,"p")(19,"span"),_(20,5),t(),C(21,sn,2,3)(22,dn,2,0,"ng-container"),t()(),C(23,un,2,1,"spk-chip",19)(24,cn,2,0,"spk-chip",20),t()),n&2){let e,l=m(),r=X(6);o(3),S(" ",(e=r.Backup==null?null:r.Backup.Name)!==null&&e!==void 0?e:l.MISSING_BACKUP_NAME," "),o(6),S(" ",T(10,6,r.Backup==null||r.Backup.Metadata==null?null:r.Backup.Metadata.LastBackupDate,"short")," "),o(2),E(!(r.Backup==null||r.Backup.Metadata==null)&&r.Backup.Metadata.LastBackupDuration?11:12),o(5),E(!(r.Backup==null||r.Backup.Metadata==null)&&r.Backup.Metadata.SourceFilesSize?16:17),o(5),E(!(r.Backup==null||r.Backup.Metadata==null)&&r.Backup.Metadata.TargetFilesSize?21:22),o(2),E(!(r.Backup==null||r.Backup.Metadata==null)&&r.Backup.Metadata.BackupListCount?23:24)}}function gn(n,a){if(n&1&&c(0,"app-general-log",17),n&2){let e=m();h("backupId",e.backupId())}}function En(n,a){if(n&1&&c(0,"app-remote-log",17),n&2){let e=m();h("backupId",e.backupId())}}var ce=class n{#e=R(Ie);#n=R(Be);MISSING_BACKUP_NAME=$localize`Backup name missing`;activeTab=G("general");backupId=be(this.#e.params.pipe(B(a=>a.id)));backup=fe(()=>{let a=this.backupId();return a?this.#n.getBackupById(a):null});static \u0275fac=function(e){return new(e||n)};static \u0275cmp=b({type:n,selectors:[["app-log"]],decls:15,vars:8,consts:()=>{let a;a=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let e;e=$localize`General`;let l;l=$localize` Destination `;let r;r=$localize`Last successful backup:`;let L;L=$localize`Source:`;let V;V=$localize`Destination:`;let W;W=$localize`took`;let j;j=$localize`N/A`;let q;q=$localize`N/A`;let J;J=$localize`N/A`;let H;H=$localize`${"\uFFFD0\uFFFD"}:INTERPOLATION: Version`;let Q;return Q=$localize`No version yet`,[a,e,l,r,L,V,W,j,q,J,H,Q,[1,"back"],["type","button","spk-button","","routerLink","/",1,"small"],[1,"backup"],[1,"primary"],["tab","",3,"click"],[3,"backupId"],[1,"text"],[1,"simple","success"],[1,"simple"]]},template:function(e,l){if(e&1){let r=K();c(0,"app-status-bar"),i(1,"section")(2,"div",12)(3,"button",13),N(4,0),c(5,"spk-icon"),M(),t()(),De(6),C(7,Fn,25,9,"div",14),i(8,"spk-tabs",15)(9,"button",16),y("click",function(){return D(r),$(l.activeTab.set("general"))}),_(10,1),t(),i(11,"button",16),y("click",function(){return D(r),$(l.activeTab.set("destination"))}),_(12,2),t()(),C(13,gn,1,1,"app-general-log",17)(14,En,1,1,"app-remote-log",17),t()}if(e&2){o(6);let r=$e(l.backup());o(),E(r?7:-1),o(2),f("active",l.activeTab()==="general"),o(2),f("active",l.activeTab()==="destination"),o(2),E(l.activeTab()==="general"?13:-1),o(),E(l.activeTab()==="destination"?14:-1)}},dependencies:[xe,de,ue,ke,re,se,w,he,z,ae,ve],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:1rem 1.5rem;gap:1rem}spk-tabs[_ngcontent-%COMP%]{margin-bottom:1rem}.backup[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem;gap:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;width:100%;max-width:40%}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{color:var(--base-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--base-12)}"],changeDetection:0})};export{ce as default};
@@ -1 +1 @@
1
- import{a as Le,b as Re}from"./chunk-SPAJFGWZ.js";import{a as $e}from"./chunk-VZBWK3XF.js";import{a as x}from"./chunk-6EWRKJSC.js";import"./chunk-XHPURHO2.js";import"./chunk-7V4TPS4B.js";import{a as fe}from"./chunk-T5WAKBP3.js";import"./chunk-LUKUBN2Z.js";import"./chunk-RHW5QVAY.js";import"./chunk-DLJSVAM2.js";import{a as Ie}from"./chunk-S75WBVE3.js";import{c as Pe,d as Oe,e as he,h as De,r as ke,s as Ne,t as Me}from"./chunk-ABANCAM5.js";import{a as de,c as Ee}from"./chunk-FSKPPAVO.js";import"./chunk-FQ55IACT.js";import{c as ce,e as pe,f as ue}from"./chunk-WRKRV6RQ.js";import"./chunk-DYTQQHMA.js";import{C as Te,a as M,b as G,c as Se,e as ge,g as w,k as Fe,l as Ae,n as me,u as Ce}from"./chunk-ESAGJOZZ.js";import{h as H}from"./chunk-N5FH4YAX.js";import"./chunk-EBXJGPRA.js";import{$a as ee,Ab as te,Bb as ne,Cb as oe,Db as s,Eb as i,F as X,Fb as l,Jb as f,Pb as p,Qb as u,Qc as _e,Rb as O,Rc as Q,Ua as r,Ub as $,Vb as S,Wb as c,Z as F,bb as V,ea as A,fa as m,gb as N,gc as ie,hc as se,jc as g,kc as K,lb as C,lc as z,oc as W,pc as q,qc as j,ra as Z,rc as ae,sc as re,tc as y,ub as h,va as E,vc as le,wb as v,yb as R,zb as d}from"./chunk-4KE2I7OA.js";import{a as Y,b as B}from"./chunk-7CGTOI24.js";var Ge=["scroller"];function we(n,o){n&1&&(s(0,"spk-icon"),g(1,"bell-ringing"),i())}function He(n,o){n&1&&(s(0,"spk-icon"),g(1,"bell"),i())}function xe(n,o){if(n&1&&l(0,"app-notification",8),n&2){c(2);let e=y(6);h("index",0)("notification",e.content)}}function Ue(n,o){if(n&1&&(s(0,"div",11),g(1),i()),n&2){c(3);let e=y(6);r(),z(" ",e.content.content," ")}}function Ye(n,o){if(n&1&&(s(0,"spk-alert")(1,"div",10),g(2),i(),C(3,Ue,2,1,"div",11),i()),n&2){c(2);let e=y(6);R(e.content.type||"error"),r(2),K(e.content.title),r(),d(e.content.content?3:-1)}}function Be(n,o){if(n&1&&(s(0,"div",6),C(1,xe,1,2,"app-notification",8)(2,Ye,4,4,"spk-alert",9),i()),n&2){c();let e=y(6);r(),d(e.type==="notification"?1:2)}}function Xe(n,o){if(n&1){let e=f();s(0,"div",7)(1,"div",12)(2,"h6",13),p(3,2),s(4,"button",5),S("click",function(){A(e);let a=c();return m(a.toggleNotifications())}),l(5,"spk-icon"),i(),u(),i(),s(6,"div",14,0)(8,"div",15),l(9,"app-notifications"),i()()()()}}function Ve(n,o){if(n&1&&(s(0,"div",20),g(1),i()),n&2){let e=c().$implicit;r(),z(" ",e.content," ")}}function Ke(n,o){if(n&1){let e=f();s(0,"spk-alert",18,1),S("click",function(){let a=A(e).$implicit,_=c(2);return m(_.deleteAlertByIndex(a.id))}),s(2,"div",19),g(3),i(),C(4,Ve,2,1,"div",20),i()}if(n&2){let e=o.$implicit;R(e.type),h("id",e.id),r(3),K(e.title),r(),d(e.content?4:-1)}}function ze(n,o){n&1&&(s(0,"p",17),O(1,4),i())}function We(n,o){if(n&1){let e=f();s(0,"div",7)(1,"div",12)(2,"h6",13),p(3,3),s(4,"button",5),S("click",function(){A(e);let a=c();return m(a.toggleAlerts())}),l(5,"spk-icon"),i(),u(),i(),s(6,"div",14,0)(8,"div",15),ne(9,Ke,5,5,"spk-alert",16,te,!1,ze,2,0,"p",17),i()()()()}if(n&2){let e=c();r(9),oe(e.alertHistory())}}var ye=new ke,b=class n{#e=F(Se);#t=F(x);isSubmitting=E(!1);messageSent=E(!1);form=ye.group({message:ye.control("",[Oe.required])});notifications=this.#t.notifications;shownMessage=E(null);shownMessageInterval=null;alertHistory=this.#e.alertHistory;alertHistoryIsOpen=this.#e.alertHistoryIsOpen;alertHistoryIsHidden=this.#e.alertHistoryIsHidden;numberOfOpenAlerts=_e(()=>this.alertHistory().filter(o=>o.isOpen).length);scroller=ee("scroller");isAlertsOpen=V(!1);isNotificationsOpen=V(!1);previousHistoryCount=E(null);previousNotificationsCount=E(null);constructor(){Q(()=>{let o=this.alertHistory(),e=this.notifications();e.length&&this.previousHistoryCount()!==o.length&&!this.isNotificationsOpen()?(this.shownMessage.set({content:e[0],countDown:3,type:"notification"}),this.previousHistoryCount.set(o.length),this.shownMessageInterval=setInterval(()=>{let t=this.shownMessage();if(t?.countDown===0){this.shownMessage.set(null),this.shownMessageInterval=null;return}t!==null&&this.shownMessage.update(a=>B(Y({},a),{countDown:a.countDown-1}))},1e3)):o.length&&this.previousHistoryCount()!==o.length&&!this.isAlertsOpen()&&(this.shownMessage.set({content:o[0],countDown:3,type:"alert"}),this.previousHistoryCount.set(o.length),this.shownMessageInterval=setInterval(()=>{let t=this.shownMessage();if(t?.countDown===0){this.shownMessage.set(null),this.shownMessageInterval=null;return}t!==null&&this.shownMessage.update(a=>B(Y({},a),{countDown:a.countDown-1}))},1e3))}),Q(()=>{this.alertHistoryIsOpen(),this.scrollToBottom()})}resetPreviewMessage(){this.shownMessage.set(null),this.shownMessageInterval=null}toggleAlerts(){this.isAlertsOpen()?this.isAlertsOpen.set(!1):(this.isAlertsOpen.set(!0),this.isNotificationsOpen.set(!1),this.resetPreviewMessage())}toggleNotifications(){this.isNotificationsOpen.set(!this.isNotificationsOpen()),this.isAlertsOpen()&&this.isAlertsOpen.set(!1)}deleteAlertByIndex(o){this.#e.removeAlert(o)}scrollToBottom(){this.scroller()&&this.scroller()?.nativeElement&&this.scroller().nativeElement.scrollTo(0,this.scroller().nativeElement.scrollHeight)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=N({type:n,selectors:[["app-service-hub"]],viewQuery:function(e,t){e&1&&ie(t.scroller,Ge,5),e&2&&se()},inputs:{isAlertsOpen:[1,"isAlertsOpen"],isNotificationsOpen:[1,"isNotificationsOpen"]},outputs:{isAlertsOpen:"isAlertsOpenChange",isNotificationsOpen:"isNotificationsOpenChange"},decls:10,vars:9,consts:()=>{let o;o=$localize` Notifications ${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON:x-circle${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_BUTTON:`;let e;e=$localize` Alerts ${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON:x-circle${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_BUTTON:`;let t;return t=$localize`No alerts yet`,[["scroller",""],["alerts",""],o,e,t,["spk-button","",3,"click"],[1,"preview-alert-wrap"],[1,"alert-stream-modal"],[3,"index","notification"],[3,"class"],["sparkle-alert-title",""],["sparkle-alert-content",""],[1,"alert-stream-modal-content"],[1,"paragraph-20"],[1,"alert-stream-modal-list-scroller"],[1,"alert-stream-modal-list"],[3,"class","id"],[1,"no-alerts"],[3,"click","id"],["title",""],["content",""]]},template:function(e,t){if(e&1){let a=f();s(0,"button",5),S("click",function(){return A(a),m(t.toggleAlerts())}),s(1,"spk-icon"),g(2,"info"),i()(),s(3,"button",5),S("click",function(){return A(a),m(t.toggleNotifications())}),C(4,we,2,0,"spk-icon")(5,He,2,0,"spk-icon"),i(),ae(6),C(7,Be,3,1,"div",6)(8,Xe,10,0,"div",7)(9,We,12,1,"div",7)}if(e&2){R(t.alertHistory().length?"error":""),r(3),R(t.notifications().length?"error":""),r(),d(t.notifications().length?4:5),r(2);let a=re(t.shownMessage());r(),d(a?7:-1),r(),d(t.isNotificationsOpen()?8:-1),r(),d(t.isAlertsOpen()?9:-1)}},dependencies:[Me,G,M,w,Re,Le],styles:["[_nghost-%COMP%]{display:flex;position:fixed;gap:.5rem;bottom:1.5rem;right:1.5rem;z-index:5000}@media only screen and (max-width: 768px){[_nghost-%COMP%]{bottom:1rem;right:1rem}}[_nghost-%COMP%] h6[_ngcontent-%COMP%]{margin:0}.preview-alert-wrap[_ngcontent-%COMP%]{position:absolute;bottom:2.6875rem;right:0;display:flex;flex-direction:column;min-width:15.625rem}.helpdesk-modal[_ngcontent-%COMP%]{position:absolute;bottom:2.6875rem;right:0;display:flex;flex-direction:column}@media only screen and (max-width: 768px){.helpdesk-modal[_ngcontent-%COMP%]{bottom:2.6875rem}}.helpdesk-modal-content[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;gap:1rem;min-width:20rem;border:1px solid var(--base-4);background-color:var(--base-1);border-radius:var(--shape-2)}.helpdesk-modal-content[_ngcontent-%COMP%] .message-sent[_ngcontent-%COMP%]{padding:0 1rem 1rem;text-wrap:pretty}.helpdesk-modal-content[_ngcontent-%COMP%] h6[_ngcontent-%COMP%]{padding:1rem;border-bottom:1px solid var(--base-4);display:flex;align-items:center;justify-content:space-between}.helpdesk-modal-content[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{padding:0 1rem 1rem;display:flex;flex-direction:column;align-items:flex-end;gap:1rem}.helpdesk-modal-content[_ngcontent-%COMP%] form[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{width:100%;text-wrap:pretty}.helpdesk-modal-content[_ngcontent-%COMP%] form[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{width:100%}.alert-stream-modal[_ngcontent-%COMP%]{position:absolute;bottom:2.6875rem;right:0;display:flex;flex-direction:column}@media only screen and (max-width: 768px){.alert-stream-modal[_ngcontent-%COMP%]{bottom:2.6875rem}}.alert-stream-modal-list-scroller[_ngcontent-%COMP%]{overflow-y:auto;max-height:18.75rem}.alert-stream-modal-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;padding:1rem;border-radius:var(--shape-2)}.alert-stream-modal-content[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;min-width:20rem;border:1px solid var(--base-4);background-color:var(--base-1);border-radius:var(--shape-2)}.alert-stream-modal-content[_ngcontent-%COMP%] h6[_ngcontent-%COMP%]{padding:1rem;border-bottom:1px solid var(--base-4);display:flex;align-items:center;justify-content:space-between}.no-alerts[_ngcontent-%COMP%]{padding:1rem;display:flex;flex-direction:column;gap:1rem;text-align:center}"],changeDetection:0})};function qe(n,o){n&1&&(s(0,"spk-icon",14),g(1,"check"),i())}function je(n,o){n&1&&(s(0,"spk-icon",15),g(1,"prohibit"),i())}function Qe(n,o){if(n&1){let e=f();s(0,"button",20),S("click",function(){A(e);let a=c();return m(a.updatePassphrase())}),O(1,5),i()}if(n&2){let e=c();v("loader",e.isUpdating())}}function Je(n,o){if(n&1){let e=f();s(0,"button",21),S("click",function(){A(e);let a=c();return m(a.updatePassphrase())}),O(1,6),i()}if(n&2){let e=c();v("loader",e.isUpdating()),h("disabled",!0)}}var U=class n{#e=F(H);closed=Z();isUpdating=E(!1);passphrase=E("");repeatPassphrase=E("");updatePassphrase(){this.passphrase()===this.repeatPassphrase()&&(this.isUpdating.set(!0),this.#e.patchApiV1Serversettings({requestBody:{"server-passphrase":this.passphrase()}}).pipe(X(()=>this.isUpdating.set(!1))).subscribe({next:()=>this.closed.emit()}))}cancel(){this.isUpdating.set(!0),this.#e.patchApiV1Serversettings({requestBody:{"has-asked-for-password-change":"True"}}).pipe(X(()=>this.isUpdating.set(!1))).subscribe({next:()=>this.closed.emit()})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=N({type:n,selectors:[["app-change-passphrase-alert-dialog"]],outputs:{closed:"closed"},decls:23,vars:7,consts:()=>{let o;o=$localize`Enter new password`;let e;e=$localize`Repeat password`;let t;t=$localize`Password have to be filled and have to match`;let a;a=$localize`Change passphrase`;let _;_=$localize` Duplicati needs to be secured with a passphrase and a random passphrase has been generated for you. ${"[\uFFFD#6\uFFFD\uFFFD/#6\uFFFD|\uFFFD#7\uFFFD\uFFFD/#7\uFFFD]"}:LINE_BREAK:${"[\uFFFD#6\uFFFD\uFFFD/#6\uFFFD|\uFFFD#7\uFFFD\uFFFD/#7\uFFFD]"}:LINE_BREAK: If you open Duplicati from the tray icon, you do not need a passphrase, but if you plan to open it from another location you need to set a passphrase you know. Do you want to set a passphrase now? `,_=$(_);let D;D=$localize`Passphrase`;let k;k=$localize`Repeat passphrase`;let I;I=$localize`Not now thanks`;let L;L=$localize` Yes, update passphrase now `;let T;return T=$localize` Yes, update passphrase now `,[a,_,D,k,I,L,T,["header",""],["content",""],["type","warning"],["for","password"],["type","password","name","password","autocomplete","disabled","placeholder",o,"tabindex","1",3,"ngModelChange","ngModel"],["for","repeatPassword"],["type","password","name","repeatPassword","autocomplete","disabled","placeholder",e,"tabindex","2",3,"ngModelChange","disabled","ngModel"],["suffix","",1,"spk-success"],["suffix",""],["footer",""],["spk-button","",3,"click"],["spk-button","",1,"raised","primary",3,"loader"],["spk-button","","spkTooltip",t,1,"raised","primary",3,"loader","disabled"],["spk-button","",1,"raised","primary",3,"click"],["spk-button","","spkTooltip",t,1,"raised","primary",3,"click","disabled"]]},template:function(e,t){e&1&&(s(0,"header",7)(1,"h3"),O(2,0),i()(),s(3,"div",8)(4,"spk-alert",9),p(5,1),l(6,"br")(7,"br"),u(),i(),s(8,"spk-form-field")(9,"label",10),O(10,2),i(),s(11,"input",11),j("ngModelChange",function(_){return q(t.passphrase,_)||(t.passphrase=_),_}),i()(),s(12,"spk-form-field")(13,"label",12),O(14,3),i(),s(15,"input",13),j("ngModelChange",function(_){return q(t.repeatPassphrase,_)||(t.repeatPassphrase=_),_}),i(),C(16,qe,2,0,"spk-icon",14)(17,je,2,0,"spk-icon",15),i()(),s(18,"footer",16)(19,"button",17),S("click",function(){return t.cancel()}),O(20,4),i(),C(21,Qe,2,2,"button",18)(22,Je,2,3,"button",19),i()),e&2&&(r(11),W("ngModel",t.passphrase),r(4),h("disabled",t.passphrase().length===0),W("ngModel",t.repeatPassphrase),r(),d(t.passphrase().length!==0&&t.passphrase()===t.repeatPassphrase()?16:17),r(3),v("loader",t.isUpdating()),r(2),d(t.passphrase().length!==0&&t.passphrase()===t.repeatPassphrase()?21:22))},dependencies:[Ne,Pe,he,De,G,Ae,M,Te],styles:["[_nghost-%COMP%]{display:block;--dialog-p: 1.5rem}[content][_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}"],changeDetection:0})};var Ze=()=>({exact:!0});function et(n,o){n&1&&(s(0,"spk-icon"),g(1,"sun"),i())}function tt(n,o){n&1&&(s(0,"spk-icon"),g(1,"moon"),i())}function nt(n,o){if(n&1){let e=f();s(0,"button",22),S("click",function(){A(e);let a=c();return m(a.changeDefaultClientTo("ngax"))}),p(1,7),l(2,"spk-icon"),u(),i(),s(3,"button",22),S("click",function(){A(e);let a=c();return m(a.logout())}),p(4,8),l(5,"spk-icon"),u(),i()}}var J=class n{#e=F($e);#t=F(H);#n=F(fe);#o=F(de);#i=F(ge);#s=F(x);#a=F(Ee);relayIsEnabled=this.#o.relayIsEnabled;isDarkMode=this.#e.isDarkMode;ngOnInit(){return this.#s.init(),this.#n.getBackups(!0),this.#t.getApiV1Serversettings().subscribe({next:o=>{let e=o["autogenerated-passphrase"]==="True",t=o["has-asked-for-password-change"]==="True";e&&!t&&this.#i.open(U,{maxWidth:"500px"})}})}toggleBodyClass(){this.#e.toggleBodyClass()}changeDefaultClientTo(o){this.#r(o),window.location.replace(`/${o}`)}logout(){this.#a.logout()}#r(o){var e=new Date;e.setTime(e.getTime()+90*24*60*60*1e3),document.cookie="default-client="+o+"; expires="+e.toUTCString()+"; path=/"}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=N({type:n,selectors:[["app-layout"]],decls:37,vars:4,consts:()=>{let o;o=$localize`${"\uFFFD#10\uFFFD"}:START_TAG_SPK_ICON:house${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_SPK_ICON: Home `;let e;e=$localize`${"\uFFFD#13\uFFFD"}:START_TAG_SPK_ICON:database${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SPK_ICON: Add backup `;let t;t=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SPK_ICON:clock-counter-clockwise${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SPK_ICON: Restore `;let a;a=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:gear${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: Settings `;let _;_=$localize`${"\uFFFD#26\uFFFD"}:START_TAG_SPK_ICON:info${"\uFFFD/#26\uFFFD"}:CLOSE_TAG_SPK_ICON: About Duplicati `;let D;D=$localize`${"\uFFFD#29\uFFFD"}:START_TAG_SPK_ICON:files${"[\uFFFD/#29\uFFFD|\uFFFD/#30\uFFFD]"}:CLOSE_TAG_SPK_ICON: Documentation ${"\uFFFD#30\uFFFD"}:START_TAG_SPK_ICON_1:arrow-square-out${"[\uFFFD/#29\uFFFD|\uFFFD/#30\uFFFD]"}:CLOSE_TAG_SPK_ICON:`,D=$(D);let k;k=$localize`${"\uFFFD#33\uFFFD"}:START_TAG_SPK_ICON:chats-circle${"[\uFFFD/#33\uFFFD|\uFFFD/#34\uFFFD]"}:CLOSE_TAG_SPK_ICON: Visit forum ${"\uFFFD#34\uFFFD"}:START_TAG_SPK_ICON_1:arrow-square-out${"[\uFFFD/#33\uFFFD|\uFFFD/#34\uFFFD]"}:CLOSE_TAG_SPK_ICON:`,k=$(k);let I;I=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:skip-back${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON: Revert to NGAX client `;let L;return L=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON:sign-out${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_ICON: Log out `,[o,e,t,a,_,D,k,I,L,["sidenav",""],["spk-button","",1,"icon","small",3,"click"],[1,"base-1","primary"],["action","","routerLink","/","routerLinkActive","active",3,"routerLinkActiveOptions"],["action","","routerLink","/add-backup","routerLinkActive","active"],["action","","routerLink","/restore","routerLinkActive","active"],["action","","routerLink","/settings","routerLinkActive","active"],[1,"spacer"],[1,"base-1l","primary"],["action","","routerLink","/about","routerLinkActive","active"],["href","https://docs.duplicati.com","target","_blank","action",""],["suffix",""],["href","https://forum.duplicati.com","target","_blank","action",""],["action","",3,"click"]]},template:function(e,t){e&1&&(s(0,"spk-sidenav")(1,"div",9)(2,"header"),l(3,"app-logo"),s(4,"button",10),S("click",function(){return t.toggleBodyClass()}),C(5,et,2,0,"spk-icon")(6,tt,2,0,"spk-icon"),i()(),s(7,"spk-list",11)(8,"button",12),p(9,0),l(10,"spk-icon"),u(),i(),s(11,"button",13),p(12,1),l(13,"spk-icon"),u(),i(),s(14,"button",14),p(15,2),l(16,"spk-icon"),u(),i(),s(17,"button",15),p(18,3),l(19,"spk-icon"),u(),i()(),l(20,"div",16),s(21,"spk-list",17),C(22,nt,6,0),l(23,"spk-divider"),s(24,"button",18),p(25,4),l(26,"spk-icon"),u(),i(),s(27,"a",19),p(28,5),l(29,"spk-icon")(30,"spk-icon",20),u(),i(),s(31,"a",21),p(32,6),l(33,"spk-icon")(34,"spk-icon",20),u(),i()()(),l(35,"router-outlet")(36,"app-service-hub"),i()),e&2&&(r(5),d(t.isDarkMode()?5:6),r(3),h("routerLinkActiveOptions",le(3,Ze)),r(14),d(t.relayIsEnabled()?-1:22))},dependencies:[ce,pe,ue,Ce,M,me,w,Fe,b,Ie],styles:["[_nghost-%COMP%]{height:100vh;width:100%;overflow:hidden}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:1.25rem;gap:.75rem}h3[title][_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}div[sidenav][_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100vh}"],changeDetection:0})};export{J as default};
1
+ import{a as Le,b as Re}from"./chunk-SPAJFGWZ.js";import{a as $e}from"./chunk-VZBWK3XF.js";import{a as x}from"./chunk-6EWRKJSC.js";import"./chunk-XHPURHO2.js";import"./chunk-7V4TPS4B.js";import{a as fe}from"./chunk-T5WAKBP3.js";import"./chunk-LUKUBN2Z.js";import"./chunk-RHW5QVAY.js";import"./chunk-DLJSVAM2.js";import{a as Ie}from"./chunk-S75WBVE3.js";import{c as Pe,d as Oe,e as he,h as De,r as ke,s as Ne,t as Me}from"./chunk-ABANCAM5.js";import{a as de,c as Ee}from"./chunk-FSKPPAVO.js";import"./chunk-FQ55IACT.js";import{c as ce,e as pe,f as ue}from"./chunk-WRKRV6RQ.js";import"./chunk-DYTQQHMA.js";import{C as Te,a as M,b as G,c as Se,e as ge,g as w,k as Fe,l as Ae,n as me,u as Ce}from"./chunk-ESAGJOZZ.js";import{h as H}from"./chunk-N5FH4YAX.js";import"./chunk-EBXJGPRA.js";import{$a as ee,Ab as te,Bb as ne,Cb as oe,Db as s,Eb as i,F as V,Fb as l,Jb as f,Pb as p,Qb as u,Qc as _e,Rb as O,Rc as Q,Ua as r,Ub as $,Vb as S,Wb as c,Z as F,bb as X,ea as A,fa as m,gb as N,gc as ie,hc as se,jc as g,kc as K,lb as C,lc as z,oc as W,pc as q,qc as j,ra as Z,rc as ae,sc as re,tc as y,ub as h,va as E,vc as le,wb as v,yb as R,zb as d}from"./chunk-4KE2I7OA.js";import{a as Y,b as B}from"./chunk-7CGTOI24.js";var Ge=["scroller"];function we(n,o){n&1&&(s(0,"spk-icon"),g(1,"bell-ringing"),i())}function He(n,o){n&1&&(s(0,"spk-icon"),g(1,"bell"),i())}function xe(n,o){if(n&1&&l(0,"app-notification",8),n&2){c(2);let e=y(6);h("index",0)("notification",e.content)}}function Ue(n,o){if(n&1&&(s(0,"div",11),g(1),i()),n&2){c(3);let e=y(6);r(),z(" ",e.content.content," ")}}function Ye(n,o){if(n&1&&(s(0,"spk-alert")(1,"div",10),g(2),i(),C(3,Ue,2,1,"div",11),i()),n&2){c(2);let e=y(6);R(e.content.type||"error"),r(2),K(e.content.title),r(),d(e.content.content?3:-1)}}function Be(n,o){if(n&1&&(s(0,"div",6),C(1,xe,1,2,"app-notification",8)(2,Ye,4,4,"spk-alert",9),i()),n&2){c();let e=y(6);r(),d(e.type==="notification"?1:2)}}function Ve(n,o){if(n&1){let e=f();s(0,"div",7)(1,"div",12)(2,"h6",13),p(3,2),s(4,"button",5),S("click",function(){A(e);let a=c();return m(a.toggleNotifications())}),l(5,"spk-icon"),i(),u(),i(),s(6,"div",14,0)(8,"div",15),l(9,"app-notifications"),i()()()()}}function Xe(n,o){if(n&1&&(s(0,"div",20),g(1),i()),n&2){let e=c().$implicit;r(),z(" ",e.content," ")}}function Ke(n,o){if(n&1){let e=f();s(0,"spk-alert",18,1),S("click",function(){let a=A(e).$implicit,_=c(2);return m(_.deleteAlertByIndex(a.id))}),s(2,"div",19),g(3),i(),C(4,Xe,2,1,"div",20),i()}if(n&2){let e=o.$implicit;R(e.type),h("id",e.id),r(3),K(e.title),r(),d(e.content?4:-1)}}function ze(n,o){n&1&&(s(0,"p",17),O(1,4),i())}function We(n,o){if(n&1){let e=f();s(0,"div",7)(1,"div",12)(2,"h6",13),p(3,3),s(4,"button",5),S("click",function(){A(e);let a=c();return m(a.toggleAlerts())}),l(5,"spk-icon"),i(),u(),i(),s(6,"div",14,0)(8,"div",15),ne(9,Ke,5,5,"spk-alert",16,te,!1,ze,2,0,"p",17),i()()()()}if(n&2){let e=c();r(9),oe(e.alertHistory())}}var ye=new ke,b=class n{#e=F(Se);#t=F(x);isSubmitting=E(!1);messageSent=E(!1);form=ye.group({message:ye.control("",[Oe.required])});notifications=this.#t.notifications;shownMessage=E(null);shownMessageInterval=null;alertHistory=this.#e.alertHistory;alertHistoryIsOpen=this.#e.alertHistoryIsOpen;alertHistoryIsHidden=this.#e.alertHistoryIsHidden;numberOfOpenAlerts=_e(()=>this.alertHistory().filter(o=>o.isOpen).length);scroller=ee("scroller");isAlertsOpen=X(!1);isNotificationsOpen=X(!1);previousHistoryCount=E(null);previousNotificationsCount=E(null);constructor(){Q(()=>{let o=this.alertHistory(),e=this.notifications();e.length&&this.previousHistoryCount()!==o.length&&!this.isNotificationsOpen()?(this.shownMessage.set({content:e[0],countDown:3,type:"notification"}),this.previousHistoryCount.set(o.length),this.shownMessageInterval=setInterval(()=>{let t=this.shownMessage();if(t?.countDown===0){this.shownMessage.set(null),this.shownMessageInterval=null;return}t!==null&&this.shownMessage.update(a=>B(Y({},a),{countDown:a.countDown-1}))},1e3)):o.length&&this.previousHistoryCount()!==o.length&&!this.isAlertsOpen()&&(this.shownMessage.set({content:o[0],countDown:3,type:"alert"}),this.previousHistoryCount.set(o.length),this.shownMessageInterval=setInterval(()=>{let t=this.shownMessage();if(t?.countDown===0){this.shownMessage.set(null),this.shownMessageInterval=null;return}t!==null&&this.shownMessage.update(a=>B(Y({},a),{countDown:a.countDown-1}))},1e3))}),Q(()=>{this.alertHistoryIsOpen(),this.scrollToBottom()})}resetPreviewMessage(){this.shownMessage.set(null),this.shownMessageInterval=null}toggleAlerts(){this.isAlertsOpen()?this.isAlertsOpen.set(!1):(this.isAlertsOpen.set(!0),this.isNotificationsOpen.set(!1),this.resetPreviewMessage())}toggleNotifications(){this.isNotificationsOpen.set(!this.isNotificationsOpen()),this.isAlertsOpen()&&this.isAlertsOpen.set(!1)}deleteAlertByIndex(o){this.#e.removeAlert(o)}scrollToBottom(){this.scroller()&&this.scroller()?.nativeElement&&this.scroller().nativeElement.scrollTo(0,this.scroller().nativeElement.scrollHeight)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=N({type:n,selectors:[["app-service-hub"]],viewQuery:function(e,t){e&1&&ie(t.scroller,Ge,5),e&2&&se()},inputs:{isAlertsOpen:[1,"isAlertsOpen"],isNotificationsOpen:[1,"isNotificationsOpen"]},outputs:{isAlertsOpen:"isAlertsOpenChange",isNotificationsOpen:"isNotificationsOpenChange"},decls:10,vars:9,consts:()=>{let o;o=$localize` Notifications ${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON:x-circle${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_BUTTON:`;let e;e=$localize` Alerts ${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON:x-circle${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_BUTTON:`;let t;return t=$localize`No alerts yet`,[["scroller",""],["alerts",""],o,e,t,["spk-button","",3,"click"],[1,"preview-alert-wrap"],[1,"alert-stream-modal"],[3,"index","notification"],[3,"class"],["sparkle-alert-title",""],["sparkle-alert-content",""],[1,"alert-stream-modal-content"],[1,"paragraph-20"],[1,"alert-stream-modal-list-scroller"],[1,"alert-stream-modal-list"],[3,"class","id"],[1,"no-alerts"],[3,"click","id"],["title",""],["content",""]]},template:function(e,t){if(e&1){let a=f();s(0,"button",5),S("click",function(){return A(a),m(t.toggleAlerts())}),s(1,"spk-icon"),g(2,"info"),i()(),s(3,"button",5),S("click",function(){return A(a),m(t.toggleNotifications())}),C(4,we,2,0,"spk-icon")(5,He,2,0,"spk-icon"),i(),ae(6),C(7,Be,3,1,"div",6)(8,Ve,10,0,"div",7)(9,We,12,1,"div",7)}if(e&2){R(t.alertHistory().length?"error":""),r(3),R(t.notifications().length?"error":""),r(),d(t.notifications().length?4:5),r(2);let a=re(t.shownMessage());r(),d(a?7:-1),r(),d(t.isNotificationsOpen()?8:-1),r(),d(t.isAlertsOpen()?9:-1)}},dependencies:[Me,G,M,w,Re,Le],styles:["[_nghost-%COMP%]{display:flex;position:fixed;gap:.5rem;bottom:1.5rem;right:1.5rem;z-index:5000}@media only screen and (max-width: 768px){[_nghost-%COMP%]{bottom:1rem;right:1rem}}[_nghost-%COMP%] h6[_ngcontent-%COMP%]{margin:0}.preview-alert-wrap[_ngcontent-%COMP%]{position:absolute;bottom:2.6875rem;right:0;display:flex;flex-direction:column;min-width:15.625rem}.helpdesk-modal[_ngcontent-%COMP%]{position:absolute;bottom:2.6875rem;right:0;display:flex;flex-direction:column}@media only screen and (max-width: 768px){.helpdesk-modal[_ngcontent-%COMP%]{bottom:2.6875rem}}.helpdesk-modal-content[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;gap:1rem;min-width:20rem;border:1px solid var(--base-4);background-color:var(--base-1);border-radius:var(--shape-2)}.helpdesk-modal-content[_ngcontent-%COMP%] .message-sent[_ngcontent-%COMP%]{padding:0 1rem 1rem;text-wrap:pretty}.helpdesk-modal-content[_ngcontent-%COMP%] h6[_ngcontent-%COMP%]{padding:1rem;border-bottom:1px solid var(--base-4);display:flex;align-items:center;justify-content:space-between}.helpdesk-modal-content[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{padding:0 1rem 1rem;display:flex;flex-direction:column;align-items:flex-end;gap:1rem}.helpdesk-modal-content[_ngcontent-%COMP%] form[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{width:100%;text-wrap:pretty}.helpdesk-modal-content[_ngcontent-%COMP%] form[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{width:100%}.alert-stream-modal[_ngcontent-%COMP%]{position:absolute;bottom:2.6875rem;right:0;display:flex;flex-direction:column}@media only screen and (max-width: 768px){.alert-stream-modal[_ngcontent-%COMP%]{bottom:2.6875rem}}.alert-stream-modal-list-scroller[_ngcontent-%COMP%]{overflow-y:auto;max-height:18.75rem}.alert-stream-modal-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;padding:1rem;border-radius:var(--shape-2)}.alert-stream-modal-content[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;min-width:20rem;border:1px solid var(--base-4);background-color:var(--base-1);border-radius:var(--shape-2)}.alert-stream-modal-content[_ngcontent-%COMP%] h6[_ngcontent-%COMP%]{padding:1rem;border-bottom:1px solid var(--base-4);display:flex;align-items:center;justify-content:space-between}.no-alerts[_ngcontent-%COMP%]{padding:1rem;display:flex;flex-direction:column;gap:1rem;text-align:center}"],changeDetection:0})};function qe(n,o){n&1&&(s(0,"spk-icon",14),g(1,"check"),i())}function je(n,o){n&1&&(s(0,"spk-icon",15),g(1,"prohibit"),i())}function Qe(n,o){if(n&1){let e=f();s(0,"button",20),S("click",function(){A(e);let a=c();return m(a.updatePassphrase())}),O(1,5),i()}if(n&2){let e=c();v("loader",e.isUpdating())}}function Je(n,o){if(n&1){let e=f();s(0,"button",21),S("click",function(){A(e);let a=c();return m(a.updatePassphrase())}),O(1,6),i()}if(n&2){let e=c();v("loader",e.isUpdating()),h("disabled",!0)}}var U=class n{#e=F(H);closed=Z();isUpdating=E(!1);passphrase=E("");repeatPassphrase=E("");updatePassphrase(){this.passphrase()===this.repeatPassphrase()&&(this.isUpdating.set(!0),this.#e.patchApiV1Serversettings({requestBody:{"server-passphrase":this.passphrase()}}).pipe(V(()=>this.isUpdating.set(!1))).subscribe({next:()=>this.closed.emit()}))}cancel(){this.isUpdating.set(!0),this.#e.patchApiV1Serversettings({requestBody:{"has-asked-for-password-change":"True"}}).pipe(V(()=>this.isUpdating.set(!1))).subscribe({next:()=>this.closed.emit()})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=N({type:n,selectors:[["app-change-passphrase-alert-dialog"]],outputs:{closed:"closed"},decls:23,vars:7,consts:()=>{let o;o=$localize`Enter new password`;let e;e=$localize`Repeat password`;let t;t=$localize`Password have to be filled and have to match`;let a;a=$localize`Change passphrase`;let _;_=$localize` Duplicati needs to be secured with a passphrase and a random passphrase has been generated for you. ${"[\uFFFD#6\uFFFD\uFFFD/#6\uFFFD|\uFFFD#7\uFFFD\uFFFD/#7\uFFFD]"}:LINE_BREAK:${"[\uFFFD#6\uFFFD\uFFFD/#6\uFFFD|\uFFFD#7\uFFFD\uFFFD/#7\uFFFD]"}:LINE_BREAK: If you open Duplicati from the tray icon, you do not need a passphrase, but if you plan to open it from another location you need to set a passphrase you know. Do you want to set a passphrase now? `,_=$(_);let D;D=$localize`Passphrase`;let k;k=$localize`Repeat passphrase`;let I;I=$localize`Not now thanks`;let L;L=$localize` Yes, update passphrase now `;let T;return T=$localize` Yes, update passphrase now `,[a,_,D,k,I,L,T,["header",""],["content",""],["type","warning"],["for","password"],["type","password","name","password","autocomplete","disabled","placeholder",o,"tabindex","1",3,"ngModelChange","ngModel"],["for","repeatPassword"],["type","password","name","repeatPassword","autocomplete","disabled","placeholder",e,"tabindex","2",3,"ngModelChange","disabled","ngModel"],["suffix","",1,"spk-success"],["suffix",""],["footer",""],["spk-button","",3,"click"],["spk-button","",1,"raised","primary",3,"loader"],["spk-button","","spkTooltip",t,1,"raised","primary",3,"loader","disabled"],["spk-button","",1,"raised","primary",3,"click"],["spk-button","","spkTooltip",t,1,"raised","primary",3,"click","disabled"]]},template:function(e,t){e&1&&(s(0,"header",7)(1,"h3"),O(2,0),i()(),s(3,"div",8)(4,"spk-alert",9),p(5,1),l(6,"br")(7,"br"),u(),i(),s(8,"spk-form-field")(9,"label",10),O(10,2),i(),s(11,"input",11),j("ngModelChange",function(_){return q(t.passphrase,_)||(t.passphrase=_),_}),i()(),s(12,"spk-form-field")(13,"label",12),O(14,3),i(),s(15,"input",13),j("ngModelChange",function(_){return q(t.repeatPassphrase,_)||(t.repeatPassphrase=_),_}),i(),C(16,qe,2,0,"spk-icon",14)(17,je,2,0,"spk-icon",15),i()(),s(18,"footer",16)(19,"button",17),S("click",function(){return t.cancel()}),O(20,4),i(),C(21,Qe,2,2,"button",18)(22,Je,2,3,"button",19),i()),e&2&&(r(11),W("ngModel",t.passphrase),r(4),h("disabled",t.passphrase().length===0),W("ngModel",t.repeatPassphrase),r(),d(t.passphrase().length!==0&&t.passphrase()===t.repeatPassphrase()?16:17),r(3),v("loader",t.isUpdating()),r(2),d(t.passphrase().length!==0&&t.passphrase()===t.repeatPassphrase()?21:22))},dependencies:[Ne,Pe,he,De,G,Ae,M,Te],styles:["[_nghost-%COMP%]{display:block;--dialog-p: 1.5rem}[content][_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}"],changeDetection:0})};var Ze=()=>({exact:!0});function et(n,o){n&1&&(s(0,"spk-icon"),g(1,"sun"),i())}function tt(n,o){n&1&&(s(0,"spk-icon"),g(1,"moon"),i())}function nt(n,o){if(n&1){let e=f();s(0,"button",22),S("click",function(){A(e);let a=c();return m(a.changeDefaultClientTo("ngax"))}),p(1,7),l(2,"spk-icon"),u(),i(),s(3,"button",22),S("click",function(){A(e);let a=c();return m(a.logout())}),p(4,8),l(5,"spk-icon"),u(),i()}}var J=class n{#e=F($e);#t=F(H);#n=F(fe);#o=F(de);#i=F(ge);#s=F(x);#a=F(Ee);relayIsEnabled=this.#o.relayIsEnabled;isDarkMode=this.#e.isDarkMode;ngOnInit(){return this.#s.init(),this.#n.getBackups(!0),this.#t.getApiV1Serversettings().subscribe({next:o=>{let e=o["autogenerated-passphrase"]==="True",t=o["has-asked-for-password-change"]==="True";e&&!t&&this.#i.open(U,{maxWidth:"500px"})}})}toggleBodyClass(){this.#e.toggleBodyClass()}changeDefaultClientTo(o){this.#r(o),window.location.replace(`/${o}`)}logout(){this.#a.logout()}#r(o){var e=new Date;e.setTime(e.getTime()+90*24*60*60*1e3),document.cookie="default-client="+o+"; expires="+e.toUTCString()+"; path=/"}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=N({type:n,selectors:[["app-layout"]],decls:37,vars:4,consts:()=>{let o;o=$localize`${"\uFFFD#10\uFFFD"}:START_TAG_SPK_ICON:house${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_SPK_ICON: Home `;let e;e=$localize`${"\uFFFD#13\uFFFD"}:START_TAG_SPK_ICON:database${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SPK_ICON: Add backup `;let t;t=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SPK_ICON:clock-counter-clockwise${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SPK_ICON: Restore `;let a;a=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:gear${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: Settings `;let _;_=$localize`${"\uFFFD#26\uFFFD"}:START_TAG_SPK_ICON:info${"\uFFFD/#26\uFFFD"}:CLOSE_TAG_SPK_ICON: About Duplicati `;let D;D=$localize`${"\uFFFD#29\uFFFD"}:START_TAG_SPK_ICON:files${"[\uFFFD/#29\uFFFD|\uFFFD/#30\uFFFD]"}:CLOSE_TAG_SPK_ICON: Documentation ${"\uFFFD#30\uFFFD"}:START_TAG_SPK_ICON_1:arrow-square-out${"[\uFFFD/#29\uFFFD|\uFFFD/#30\uFFFD]"}:CLOSE_TAG_SPK_ICON:`,D=$(D);let k;k=$localize`${"\uFFFD#33\uFFFD"}:START_TAG_SPK_ICON:chats-circle${"[\uFFFD/#33\uFFFD|\uFFFD/#34\uFFFD]"}:CLOSE_TAG_SPK_ICON: Visit forum ${"\uFFFD#34\uFFFD"}:START_TAG_SPK_ICON_1:arrow-square-out${"[\uFFFD/#33\uFFFD|\uFFFD/#34\uFFFD]"}:CLOSE_TAG_SPK_ICON:`,k=$(k);let I;I=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:skip-back${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON: Use old UI `;let L;return L=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON:sign-out${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_ICON: Log out `,[o,e,t,a,_,D,k,I,L,["sidenav",""],["spk-button","",1,"icon","small",3,"click"],[1,"base-1","primary"],["action","","routerLink","/","routerLinkActive","active",3,"routerLinkActiveOptions"],["action","","routerLink","/add-backup","routerLinkActive","active"],["action","","routerLink","/restore","routerLinkActive","active"],["action","","routerLink","/settings","routerLinkActive","active"],[1,"spacer"],[1,"base-1l","primary"],["action","","routerLink","/about","routerLinkActive","active"],["href","https://docs.duplicati.com","target","_blank","action",""],["suffix",""],["href","https://forum.duplicati.com","target","_blank","action",""],["action","",3,"click"]]},template:function(e,t){e&1&&(s(0,"spk-sidenav")(1,"div",9)(2,"header"),l(3,"app-logo"),s(4,"button",10),S("click",function(){return t.toggleBodyClass()}),C(5,et,2,0,"spk-icon")(6,tt,2,0,"spk-icon"),i()(),s(7,"spk-list",11)(8,"button",12),p(9,0),l(10,"spk-icon"),u(),i(),s(11,"button",13),p(12,1),l(13,"spk-icon"),u(),i(),s(14,"button",14),p(15,2),l(16,"spk-icon"),u(),i(),s(17,"button",15),p(18,3),l(19,"spk-icon"),u(),i()(),l(20,"div",16),s(21,"spk-list",17),C(22,nt,6,0),l(23,"spk-divider"),s(24,"button",18),p(25,4),l(26,"spk-icon"),u(),i(),s(27,"a",19),p(28,5),l(29,"spk-icon")(30,"spk-icon",20),u(),i(),s(31,"a",21),p(32,6),l(33,"spk-icon")(34,"spk-icon",20),u(),i()()(),l(35,"router-outlet")(36,"app-service-hub"),i()),e&2&&(r(5),d(t.isDarkMode()?5:6),r(3),h("routerLinkActiveOptions",le(3,Ze)),r(14),d(t.relayIsEnabled()?-1:22))},dependencies:[ce,pe,ue,Ce,M,me,w,Fe,b,Ie],styles:["[_nghost-%COMP%]{height:100vh;width:100%;overflow:hidden}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:1.25rem;gap:.75rem}h3[title][_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}div[sidenav][_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100vh}"],changeDetection:0})};export{J as default};
@@ -1 +1 @@
1
- import{a as k}from"./chunk-C5B4MW2I.js";import"./chunk-XHPURHO2.js";import"./chunk-7V4TPS4B.js";import"./chunk-T5WAKBP3.js";import"./chunk-LUKUBN2Z.js";import"./chunk-RHW5QVAY.js";import"./chunk-DLJSVAM2.js";import"./chunk-ABANCAM5.js";import"./chunk-FSKPPAVO.js";import"./chunk-FQ55IACT.js";import{e as S}from"./chunk-WRKRV6RQ.js";import"./chunk-DYTQQHMA.js";import{a as T,g as M,h as f}from"./chunk-ESAGJOZZ.js";import"./chunk-N5FH4YAX.js";import"./chunk-GQGMGFDX.js";import"./chunk-EBXJGPRA.js";import"./chunk-QUOBR5MG.js";import{Db as e,Eb as n,Fb as _,Pb as s,Qb as l,Rb as i,Ua as r,gb as D,ub as c,vc as d}from"./chunk-4KE2I7OA.js";import"./chunk-7CGTOI24.js";var E=()=>["/backup/new"],F=()=>["/backup/import"],u=class C{static \u0275fac=function(t){return new(t||C)};static \u0275cmp=D({type:C,selectors:[["app-add-backup"]],decls:23,vars:4,consts:()=>{let a;a=$localize`Add a new backup`;let t;t=$localize`New backup`;let p;p=$localize`Configure a new backup. Choose your destination, source data and schedule.`;let A;A=$localize` Add a new backup ${"\uFFFD#13\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let g;g=$localize`Import from file`;let m;m=$localize`Import backup configuration from a file. During import you can adjust the setings.`;let P;return P=$localize` Import from file ${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:upload-simple${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[a,t,p,A,g,m,P,[1,"backup-types"],[1,"type-a"],["src","assets/images/new-backup.png"],["spk-button","",1,"raised","primary",3,"routerLink"]]},template:function(t,p){t&1&&(_(0,"app-status-bar"),e(1,"section")(2,"h2"),i(3,0),n(),e(4,"div",7)(5,"spk-card",8),_(6,"img",9),e(7,"h3"),i(8,1),n(),e(9,"p"),i(10,2),n(),e(11,"button",10),s(12,3),_(13,"spk-icon"),l(),n()(),e(14,"spk-card",8),_(15,"img",9),e(16,"h3"),i(17,4),n(),e(18,"p"),i(19,5),n(),e(20,"button",10),s(21,6),_(22,"spk-icon"),l(),n()()()()),t&2&&(r(11),c("routerLink",d(2,E)),r(9),c("routerLink",d(3,F)))},dependencies:[k,M,f,T,S],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;align-items:center;flex-direction:column;gap:2rem;padding:2rem 0}div.backup-types[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem;max-width:43.75rem}spk-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:1rem;padding-bottom:3rem}spk-card[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:18.75rem}spk-card[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;text-align:center;width:75%}"],changeDetection:0})};export{u as default};
1
+ import{a as k}from"./chunk-6V7W7EKR.js";import"./chunk-XHPURHO2.js";import"./chunk-7V4TPS4B.js";import"./chunk-T5WAKBP3.js";import"./chunk-LUKUBN2Z.js";import"./chunk-RHW5QVAY.js";import"./chunk-DLJSVAM2.js";import"./chunk-ABANCAM5.js";import"./chunk-FSKPPAVO.js";import"./chunk-FQ55IACT.js";import{e as S}from"./chunk-WRKRV6RQ.js";import"./chunk-DYTQQHMA.js";import{a as T,g as M,h as f}from"./chunk-ESAGJOZZ.js";import"./chunk-N5FH4YAX.js";import"./chunk-GQGMGFDX.js";import"./chunk-EBXJGPRA.js";import"./chunk-QUOBR5MG.js";import{Db as e,Eb as n,Fb as _,Pb as s,Qb as l,Rb as i,Ua as r,gb as D,ub as c,vc as d}from"./chunk-4KE2I7OA.js";import"./chunk-7CGTOI24.js";var E=()=>["/backup/new"],F=()=>["/backup/import"],u=class C{static \u0275fac=function(t){return new(t||C)};static \u0275cmp=D({type:C,selectors:[["app-add-backup"]],decls:23,vars:4,consts:()=>{let a;a=$localize`Add a new backup`;let t;t=$localize`New backup`;let p;p=$localize`Configure a new backup. Choose your destination, source data and schedule.`;let A;A=$localize` Add a new backup ${"\uFFFD#13\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let g;g=$localize`Import from file`;let m;m=$localize`Import backup configuration from a file. During import you can adjust the setings.`;let P;return P=$localize` Import from file ${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:upload-simple${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[a,t,p,A,g,m,P,[1,"backup-types"],[1,"type-a"],["src","assets/images/new-backup.png"],["spk-button","",1,"raised","primary",3,"routerLink"]]},template:function(t,p){t&1&&(_(0,"app-status-bar"),e(1,"section")(2,"h2"),i(3,0),n(),e(4,"div",7)(5,"spk-card",8),_(6,"img",9),e(7,"h3"),i(8,1),n(),e(9,"p"),i(10,2),n(),e(11,"button",10),s(12,3),_(13,"spk-icon"),l(),n()(),e(14,"spk-card",8),_(15,"img",9),e(16,"h3"),i(17,4),n(),e(18,"p"),i(19,5),n(),e(20,"button",10),s(21,6),_(22,"spk-icon"),l(),n()()()()),t&2&&(r(11),c("routerLink",d(2,E)),r(9),c("routerLink",d(3,F)))},dependencies:[k,M,f,T,S],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;align-items:center;flex-direction:column;gap:2rem;padding:2rem 0}div.backup-types[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem;max-width:43.75rem}spk-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:1rem;padding-bottom:3rem}spk-card[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:18.75rem}spk-card[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;text-align:center;width:75%}"],changeDetection:0})};export{u as default};
@@ -1 +1 @@
1
- import{a as cn}from"./chunk-C5B4MW2I.js";import{c as Z,d as rn}from"./chunk-HIW2CN45.js";import"./chunk-UEYPJIJG.js";import{a as ln}from"./chunk-XHPURHO2.js";import"./chunk-7V4TPS4B.js";import{a as an}from"./chunk-T5WAKBP3.js";import"./chunk-LUKUBN2Z.js";import"./chunk-RHW5QVAY.js";import"./chunk-DLJSVAM2.js";import"./chunk-ABANCAM5.js";import"./chunk-FSKPPAVO.js";import"./chunk-FQ55IACT.js";import{e as je}from"./chunk-WRKRV6RQ.js";import"./chunk-DYTQQHMA.js";import{a as Y,f as qe,g as Je,h as Qe,j as Ye,k as Ze,o as en,p as nn,w as tn,x as on}from"./chunk-ESAGJOZZ.js";import{h as _n}from"./chunk-N5FH4YAX.js";import"./chunk-GQGMGFDX.js";import"./chunk-EBXJGPRA.js";import"./chunk-QUOBR5MG.js";import{Ab as z,Ac as B,Bb as V,Bc as G,Cb as K,Db as _,Dc as Q,Eb as o,F as X,Fb as d,Gb as M,Hb as m,Ib as D,Jb as x,Pb as s,Qb as u,Rb as p,Rc as We,Sb as y,Tb as L,Ua as r,Ub as j,Vb as f,Wb as F,Z as w,a as ve,b as W,ea as k,fa as P,gb as he,ic as U,jc as T,kc as ze,lb as g,lc as O,oc as Ve,pc as Ke,qc as Ue,rb as Xe,rc as q,sb as we,ub as S,va as R,vc as J,wb as H,wc as $,zb as E,zc as I}from"./chunk-4KE2I7OA.js";import"./chunk-7CGTOI24.js";function sn(...e){let i=R(...e);return Object.defineProperty(i,"value",{get:i.asReadonly(),set:i.set.bind(i)})}function un(e,i,n){let t=localStorage.getItem(i);t!=null&&(e=JSON.parse(t));let l=sn(e),c=l[ve];n?.equal&&(c.equal=n.equal);function N(C){C==null?localStorage.removeItem(i):localStorage.setItem(i,JSON.stringify(C))}return l.set=C=>{N(C),W(c,C)},l.update=C=>{let A=C(l());N(A),W(c,A)},l}var gn=()=>[import("./chunk-QMFHJSCY.js").then(e=>e.NgTemplateOutlet),Y,Ye,on,tn,import("./chunk-GUKBMCIX.js").then(e=>e.DurationFormatPipe),import("./chunk-6LCXRM3A.js").then(e=>e.BytesPipe),import("./chunk-U7YVVKGQ.js").then(e=>e.RelativeTimePipe)],dn=()=>["/add-backup"],Tn=()=>["/restore"],Fn=e=>({$implicit:e}),Sn=e=>["/backup",e],Cn=e=>["/restore",e],En=e=>["/backup",e,"export"],Mn=e=>["/backup",e,"delete"],mn=e=>["/backup",e,"database"],On=e=>["/backup",e,"commandline"],Nn=e=>["/backup",e,"log"];function kn(e,i){if(e&1){let n=x();_(0,"button",57),f("click",function(){let l=k(n).$implicit,c=F(2);return P(c.sortByColumn.set(l.value))}),p(1,15),o()}if(e&2){let n=i.$implicit,t=F(2);H("active",t.orderBy()===n.value),r(),y(n.label),L(1)}}function Pn(e,i){if(e&1&&(_(0,"spk-menu",58)(1,"button",59),s(2,14),d(3,"strong")(4,"spk-icon"),u(),o(),M(5,60),V(6,kn,2,3,"button",61,z),m(),o()),e&2){let n=F();r(4),y(n.orderBy()),L(2),r(2),K(n.sortOrderOptions())}}function fn(e,i){if(e&1&&(T(0),I(1,"durationFormat")),e&2){let n=F().$implicit,t=F(4);O(" ",G(1,1,n.Backup==null||n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDuration,t.timeType()==="actual")," ")}}function $n(e,i){e&1&&(M(0),p(1,21),m())}function Dn(e,i){if(e&1&&(T(0),I(1,"bytes")),e&2){let n=F().$implicit;O(" ",B(1,1,n.Backup==null||n.Backup.Metadata==null?null:n.Backup.Metadata.SourceFilesSize)," ")}}function In(e,i){e&1&&(M(0),p(1,22),m())}function An(e,i){if(e&1&&(T(0),I(1,"bytes")),e&2){let n=F().$implicit;O(" ",B(1,1,n.Backup==null||n.Backup.Metadata==null?null:n.Backup.Metadata.TargetFilesSize)," ")}}function Rn(e,i){e&1&&(M(0),p(1,23),m())}function Hn(e,i){e&1&&D(0)}function yn(e,i){if(e&1&&(_(0,"div",64)(1,"div",51)(2,"h3"),T(3),_(4,"spk-chip")(5,"spk-icon"),T(6),o(),T(7),o()(),_(8,"p")(9,"span"),p(10,16),o(),T(11),I(12,"relativeTime"),o(),_(13,"p")(14,"span"),p(15,17),o(),g(16,fn,2,4)(17,$n,2,0,"ng-container"),o(),_(18,"p")(19,"span"),p(20,18),o(),g(21,Dn,2,3)(22,In,2,0,"ng-container"),o(),_(23,"p")(24,"span"),p(25,19),o(),g(26,An,2,3)(27,Rn,2,0,"ng-container"),o()(),q(28),_(29,"spk-chip",65),p(30,20),o(),_(31,"div",55),g(32,Hn,1,0,"ng-container",66),o()()),e&2){let n,t=i.$implicit,l=F(4),c=U(51);r(3),O(" ",(n=t.Backup==null?null:t.Backup.Name)!==null&&n!==void 0?n:l.MISSING_BACKUP_NAME," "),r(3),ze(l.getBackendIcon(t.Backup==null?null:t.Backup.TargetURL)),r(),O(" ",l.getBackendType(t.Backup==null?null:t.Backup.TargetURL)," "),r(4),O(" ",G(12,11,t.Backup==null||t.Backup.Metadata==null?null:t.Backup.Metadata.LastBackupDate,l.timeType()==="actual")," "),r(5),E(!(t.Backup==null||t.Backup.Metadata==null)&&t.Backup.Metadata.LastBackupDuration?16:17),r(5),E(!(t.Backup==null||t.Backup.Metadata==null)&&t.Backup.Metadata.SourceFilesSize?21:22),r(5),E(!(t.Backup==null||t.Backup.Metadata==null)&&t.Backup.Metadata.TargetFilesSize?26:27);let N=l.getBackupVersionCount(t);r(4),y(N)(N),L(30),r(2),S("ngTemplateOutlet",c)("ngTemplateOutletContext",$(14,Fn,t))}}function Ln(e,i){if(e&1&&V(0,yn,33,16,"div",64,z),e&2){let n=F(3);K(n.backups())}}function xn(e,i){e&1&&(M(0),p(1,24),m())}function Bn(e,i){if(e&1&&(_(0,"div",62),g(1,Ln,2,0)(2,xn,2,0,"ng-container"),o()),e&2){let n=F(2);r(),E(n.backups().length?1:2)}}function Gn(e,i){e&1&&(s(0,25,1),D(1),u())}function bn(e,i){e&1&&(s(0,26,1),D(1),u())}function vn(e,i){e&1&&(s(0,27,1),D(1),u())}function hn(e,i){e&1&&(s(0,28,1),D(1),u())}function Xn(e,i){e&1&&(s(0,29,1),D(1),u())}function wn(e,i){e&1&&(s(0,30,1),D(1),u())}function zn(e,i){if(e&1&&(T(0),I(1,"relativeTime")),e&2){let n=F().$implicit,t=F(3);O(" ",G(1,1,n.Backup==null||n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDate,t.timeType()==="actual")," ")}}function Vn(e,i){e&1&&(M(0),p(1,34),m())}function Kn(e,i){if(e&1&&(T(0),I(1,"durationFormat")),e&2){let n=F().$implicit,t=F(3);O(" ",G(1,1,n.Backup==null||n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDuration,t.timeType()==="actual")," ")}}function Un(e,i){e&1&&(M(0),p(1,35),m())}function Wn(e,i){if(e&1&&(T(0),I(1,"bytes")),e&2){let n=F().$implicit;O(" ",B(1,1,n.Backup==null||n.Backup.Metadata==null?null:n.Backup.Metadata.SourceFilesSize)," ")}}function jn(e,i){e&1&&(M(0),p(1,36),m())}function qn(e,i){if(e&1&&(T(0),I(1,"bytes")),e&2){let n=F().$implicit;O(" ",B(1,1,n.Backup==null||n.Backup.Metadata==null?null:n.Backup.Metadata.TargetFilesSize)," ")}}function Jn(e,i){e&1&&(M(0),p(1,37),m())}function Qn(e,i){e&1&&D(0)}function Yn(e,i){if(e&1&&(_(0,"tr")(1,"td"),T(2),o(),_(3,"td"),T(4),o(),_(5,"td"),g(6,zn,2,4)(7,Vn,2,0,"ng-container"),o(),_(8,"td"),g(9,Kn,2,4)(10,Un,2,0,"ng-container"),o(),_(11,"td"),g(12,Wn,2,3)(13,jn,2,0,"ng-container"),o(),_(14,"td"),g(15,qn,2,3)(16,Jn,2,0,"ng-container"),o(),_(17,"td"),q(18),_(19,"span"),p(20,33),o()(),_(21,"td"),g(22,Qn,1,0,"ng-container",66),o()()),e&2){let n,t=i.$implicit,l=F(3),c=U(51);r(2),O(" ",(n=t.Backup==null?null:t.Backup.Name)!==null&&n!==void 0?n:l.MISSING_BACKUP_NAME," "),r(2),O(" ",l.getBackendType(t.Backup==null?null:t.Backup.TargetURL)," "),r(2),E(!(t.Backup==null||t.Backup.Metadata==null)&&t.Backup.Metadata.LastBackupDate?6:7),r(3),E(!(t.Backup==null||t.Backup.Metadata==null)&&t.Backup.Metadata.LastBackupDuration?9:10),r(3),E(!(t.Backup==null||t.Backup.Metadata==null)&&t.Backup.Metadata.SourceFilesSize?12:13),r(3),E(!(t.Backup==null||t.Backup.Metadata==null)&&t.Backup.Metadata.TargetFilesSize?15:16);let N=l.getBackupVersionCount(t);r(5),y(N)(N),L(20),r(2),S("ngTemplateOutlet",c)("ngTemplateOutletContext",$(10,Fn,t))}}function Zn(e,i){if(e&1){let n=x();_(0,"spk-table",67),Ue("sortByColumnChange",function(l){k(n);let c=F(2);return Ke(c.sortByColumn,l)||(c.sortByColumn=l),P(l)}),_(1,"tr",68)(2,"th",69),s(3,25),g(4,Gn,2,0,"ng-container",70),u(),o(),_(5,"th",71),s(6,26),g(7,bn,2,0,"ng-container",70),u(),o(),_(8,"th",72),s(9,27),g(10,vn,2,0,"ng-container",70),u(),o(),_(11,"th",73),s(12,28),g(13,hn,2,0,"ng-container",70),u(),o(),_(14,"th",74),s(15,29),g(16,Xn,2,0,"ng-container",70),u(),o(),_(17,"th",75),s(18,30),g(19,wn,2,0,"ng-container",70),u(),o(),_(20,"th"),p(21,31),o(),_(22,"th"),p(23,32),o()(),V(24,Yn,23,12,"tr",null,z),o()}if(e&2){let n=F(2),t=U(53);S("data",n.backups())("loading",n.backupsLoading()),Ve("sortByColumn",n.sortByColumn),r(4),S("ngTemplateOutlet",t),r(3),S("ngTemplateOutlet",t),r(3),S("ngTemplateOutlet",t),r(3),S("ngTemplateOutlet",t),r(3),S("ngTemplateOutlet",t),r(3),S("ngTemplateOutlet",t),r(5),K(n.backups())}}function et(e,i){if(e&1&&g(0,Bn,3,1,"div",62)(1,Zn,26,9,"spk-table",63),e&2){let n=F();E(n.viewMode()==="list"?0:n.viewMode()==="details"?1:-1)}}function nt(e,i){e&1&&(_(0,"div",76),d(1,"spk-progress-bar",77),_(2,"div",51)(3,"h3"),p(4,38),o()()())}function tt(e,i){e&1&&p(0,39,1)}function it(e,i){e&1&&(_(0,"spk-icon"),T(1,"check"),o())}function ot(e,i){e&1&&(_(0,"spk-icon"),T(1,"dots-three-vertical"),o())}function _t(e,i){if(e&1){let n=x();_(0,"button",78),f("click",function(){let l=k(n).$implicit,c=F();return P(c.startBackup(l.Backup==null?null:l.Backup.ID))}),s(1,39),d(2,"spk-icon"),g(3,tt,1,0),u(),o(),_(4,"button",79)(5,"spk-icon"),T(6,"pencil-simple"),o()(),_(7,"spk-menu",80)(8,"button",52),g(9,it,2,0,"spk-icon")(10,ot,2,0,"spk-icon"),o(),M(11,60),_(12,"h3",81),T(13,"Operations"),o(),_(14,"button",82),s(15,40),d(16,"spk-icon"),u(),o(),_(17,"button",82),s(18,41),d(19,"spk-icon"),u(),o(),_(20,"button",82),s(21,42),d(22,"spk-icon"),u(),o(),d(23,"spk-divider"),_(24,"h3",81),T(25,"Advanced"),o(),_(26,"button",82),s(27,43),d(28,"spk-icon"),u(),o(),_(29,"button",57),f("click",function(){let l=k(n).$implicit,c=F();return P(c.verifyFiles(l.Backup==null?null:l.Backup.ID))}),s(30,44),d(31,"spk-icon"),u(),o(),_(32,"button",57),f("click",function(){let l=k(n).$implicit,c=F();return P(c.compressBackup(l.Backup==null?null:l.Backup.ID))}),s(33,45),d(34,"spk-icon"),u(),o(),_(35,"button",82),s(36,46),d(37,"spk-icon"),u(),o(),d(38,"spk-divider"),_(39,"h3",81),T(40,"Reporting"),o(),_(41,"button",82),s(42,47),d(43,"spk-icon"),u(),o(),_(44,"button",57),f("click",function(){let l=k(n).$implicit,c=F();return P(c.createErrorReport(l.Backup==null?null:l.Backup.ID))}),s(45,48),d(46,"spk-icon"),u(),o(),m(),o()}if(e&2){let n=i.$implicit,t=F();H("loader",t.startingBackup()===(n.Backup==null?null:n.Backup.ID)),r(3),E(t.viewMode()==="list"?3:-1),r(),S("routerLink",$(16,Sn,n.Backup==null?null:n.Backup.ID)),r(3),S("right",!0),r(),H("loader",t.loadingId()===(n.Backup==null?null:n.Backup.ID))("success",t.successId()===(n.Backup==null?null:n.Backup.ID)),r(),E(t.successId()===(n.Backup==null?null:n.Backup.ID)?9:10),r(5),S("routerLink",$(18,Cn,n.Backup==null?null:n.Backup.ID)),r(3),S("routerLink",$(20,En,n.Backup==null?null:n.Backup.ID)),r(3),S("routerLink",$(22,Mn,n.Backup==null?null:n.Backup.ID)),r(6),S("routerLink",$(24,mn,n.Backup==null?null:n.Backup.ID)),r(9),S("routerLink",$(26,On,n.Backup==null?null:n.Backup.ID)),r(6),S("routerLink",$(28,Nn,n.Backup==null?null:n.Backup.ID))}}function at(e,i){e&1&&(_(0,"spk-icon",83),T(1,"funnel-simple"),o(),_(2,"spk-icon",84),T(3,"sort-ascending"),o(),_(4,"spk-icon",85),T(5,"sort-descending"),o())}var pn={file:{Display:$localize`Local`,Icon:null}},ee=class e{#n=w(_n);#t=w(ln);#e=w(an);MISSING_BACKUP_NAME=$localize`Backup name missing`;sortOrderOptions=this.#e.orderByOptions;orderBy=this.#e.orderBy;backups=this.#e.backups;backupsLoading=this.#e.backupsLoading;startingBackup=this.#e.startingBackup;deletingBackup=this.#e.deletingBackup;timeType=this.#e.timeType;viewMode=un("list","viewMode");sortByColumn=R("name");loadingId=R(null);successId=R(null);sortEffect=We(()=>this.#e.setOrderBy(this.sortByColumn()));ngOnInit(){this.#e.getBackups(!0)}setOrderBy(i){this.#e.setOrderBy(i)}setTimeType(i){this.#e.setTimeType(i)}startBackup(i){this.#t.resumeDialogCheck(()=>this.#e.startBackup(i))}getBackendIcon(i){if(!i)return"";let n=i.split("://")[0],t=Z.find(c=>c.key===n);if(!t)return"database";let l=pn[t.key];return l?.Icon?l.Icon:"database"}getBackendType(i){if(!i)return"";let n=i.split("://")[0],t=Z.find(c=>c.key===n);if(!t)return"";let l=pn[t.key];if(l?.Display)return l.Display;if(t.key==="s3"){let c="http://null?"+i.split("?")[1],C=new URL(c).searchParams.get("s3-server-name")?.toLowerCase()??"";for(let[A,b]of Object.entries(rn))if(C.endsWith(A))return b}return t.displayName}getBackupVersionCount(i){return parseInt(i?.Backup?.Metadata?.BackupListCount??"",10)||0}verifyFiles(i){this.loadingId.set(i),this.#n.postApiV1BackupByIdVerify({id:i}).pipe(X(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(i),setTimeout(()=>this.successId.set(null),2e3)}})}compressBackup(i){this.loadingId.set(i),this.#n.postApiV1BackupByIdCompact({id:i}).pipe(X(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(i),setTimeout(()=>this.successId.set(null),2e3)}})}createErrorReport(i){this.loadingId.set(i),this.#n.postApiV1BackupByIdCreatereport({id:i}).pipe(X(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(i),setTimeout(()=>this.successId.set(null),2e3)}})}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=he({type:e,selectors:[["app-home"]],decls:54,vars:11,consts:()=>{let i;i=$localize`Backups`;let n;n=$localize`Backups are stored in the cloud and can be restored at any time.`;let t;t=$localize` Add ${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let l;l=$localize`Restores`;let c;c=$localize`Restores allow you to restore your data from the cloud.`;let N;N=$localize` Start ${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let C;C=$localize`My backups`;let A;A=$localize`${"\uFFFD#31\uFFFD"}:START_TAG_SPK_ICON:rows${"\uFFFD/#31\uFFFD"}:CLOSE_TAG_SPK_ICON: List `;let b;b=$localize`${"\uFFFD#34\uFFFD"}:START_TAG_SPK_ICON:list${"\uFFFD/#34\uFFFD"}:CLOSE_TAG_SPK_ICON: Details `;let ne;ne=$localize` Time: ${"\uFFFD#38\uFFFD"}:START_TAG_STRONG:${"\uFFFD0\uFFFD"}:INTERPOLATION:${"\uFFFD/#38\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#39\uFFFD"}:START_TAG_SPK_ICON:clock${"\uFFFD/#39\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let te;te=$localize`Relative time`;let ie;ie=$localize`Actual time`;let oe;oe=$localize` Order by: ${"\uFFFD#3\uFFFD"}:START_TAG_STRONG:${"\uFFFD0\uFFFD"}:INTERPOLATION:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#4\uFFFD"}:START_TAG_SPK_ICON:arrows-down-up${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let _e;_e=$localize` ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let ae;ae=$localize`Last successful backup:`;let le;le=$localize`Duration:`;let re;re=$localize`Source:`;let ce;ce=$localize`Destination:`;let v;v=$localize`{VAR_PLURAL, plural, =0 {No version yet} =1 {1 Version} other {{INTERPOLATION} Versions}}`,v=j(v,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let se;se=$localize` ${v}:ICU@@6502601490918455200: `;let ue;ue=$localize`N/A`;let pe;pe=$localize`N/A`;let Fe;Fe=$localize`N/A`;let ge;ge=$localize`No backups founds`;let de;de=$localize` Backup ${"\uFFFD*4:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*4:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Te;Te=$localize` Type ${"\uFFFD*7:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*7:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Se;Se=$localize` Last successful backup ${"\uFFFD*10:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*10:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Ce;Ce=$localize` Duration ${"\uFFFD*13:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*13:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Ee;Ee=$localize` Source ${"\uFFFD*16:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*16:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Me;Me=$localize` Destination ${"\uFFFD*19:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*19:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let me;me=$localize`Version`;let Oe;Oe=$localize`Actions`;let h;h=$localize`{VAR_PLURAL, plural, =0 {No version yet} =1 {1 Version} other {{INTERPOLATION} Versions}}`,h=j(h,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let Ne;Ne=$localize` ${h}:ICU@@6502601490918455200: `;let ke;ke=$localize`N/A`;let Pe;Pe=$localize`N/A`;let fe;fe=$localize`N/A`;let $e;$e=$localize`N/A`;let De;De=$localize`Loading backups...`;let Ie;Ie=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:play-circle${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON:${"\uFFFD*3:1\uFFFD"}:START_BLOCK_IF: Start ${"\uFFFD/*3:1\uFFFD"}:CLOSE_BLOCK_IF:`;let Ae;Ae=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SPK_ICON:clock-counter-clockwise${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SPK_ICON: Restore `;let Re;Re=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:export${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: Export `;let He;He=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:x-circle${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON: Delete `;let ye;ye=$localize`${"\uFFFD#28\uFFFD"}:START_TAG_SPK_ICON:database${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SPK_ICON: Database `;let Le;Le=$localize`${"\uFFFD#31\uFFFD"}:START_TAG_SPK_ICON:check-square-offset${"\uFFFD/#31\uFFFD"}:CLOSE_TAG_SPK_ICON: Verify files `;let xe;xe=$localize`${"\uFFFD#34\uFFFD"}:START_TAG_SPK_ICON:file-archive${"\uFFFD/#34\uFFFD"}:CLOSE_TAG_SPK_ICON: Compress now `;let Be;Be=$localize`${"\uFFFD#37\uFFFD"}:START_TAG_SPK_ICON:terminal-window${"\uFFFD/#37\uFFFD"}:CLOSE_TAG_SPK_ICON: Commandline `;let Ge;Ge=$localize`${"\uFFFD#43\uFFFD"}:START_TAG_SPK_ICON:notepad${"\uFFFD/#43\uFFFD"}:CLOSE_TAG_SPK_ICON: Log `;let be;return be=$localize`${"\uFFFD#46\uFFFD"}:START_TAG_SPK_ICON:file-plus${"\uFFFD/#46\uFFFD"}:CLOSE_TAG_SPK_ICON: Create error report `,[["actions",""],["sortIcons",""],i,n,t,l,c,N,C,A,b,ne,te,ie,oe,_e,ae,le,re,ce,se,ue,pe,Fe,ge,de,Te,Se,Ce,Ee,Me,me,Oe,Ne,ke,Pe,fe,$e,De,Ie,Ae,Re,He,ye,Le,xe,Be,Ge,be,[1,"type-a",3,"routerLink"],["src","assets/images/backup.png","alt","","width","48px"],[1,"text"],["type","button","spk-button",""],["src","assets/images/restore.png","alt","","width","48px"],[1,"content"],[1,"actions"],[1,"small"],["type","button",3,"click"],[1,"table-overview"],["type","button","spk-button","",1,"small"],["menu",""],["type","button",3,"active"],[1,"backups"],[1,"type-b",3,"data","loading","sortByColumn"],[1,"backup"],[1,"simple","success"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"type-b",3,"sortByColumnChange","data","loading","sortByColumn"],["table-header",""],["spkSort","name"],[4,"ngTemplateOutlet"],["spkSort","type"],["spkSort","lastrun"],["spkSort","duration"],["spkSort","sourcesize"],["spkSort","destinationsize"],[1,"loading-list"],[1,"indeterminate","primary"],["spk-button","",3,"click"],["type","button","spk-button","",3,"routerLink"],[3,"right"],["title",""],["type","button",3,"routerLink"],[1,"filter"],[1,"asc"],[1,"desc"]]},template:function(n,t){if(n&1){let l=x();d(0,"app-status-bar"),_(1,"section")(2,"header")(3,"spk-card",49),d(4,"img",50),_(5,"div",51)(6,"h3"),p(7,2),o(),_(8,"p"),p(9,3),o()(),_(10,"button",52),s(11,4),d(12,"spk-icon"),u(),o()(),_(13,"spk-card",49),d(14,"img",53),_(15,"div",51)(16,"h3"),p(17,5),o(),_(18,"p"),p(19,6),o()(),_(20,"button",52),s(21,7),d(22,"spk-icon"),u(),o()()(),_(23,"div",54)(24,"h2"),M(25),p(26,8),m(),_(27,"div",55)(28,"spk-button-group",56)(29,"button",57),f("click",function(){return k(l),P(t.viewMode.set("list"))}),s(30,9),d(31,"spk-icon"),u(),o(),_(32,"button",57),f("click",function(){return k(l),P(t.viewMode.set("details"))}),s(33,10),d(34,"spk-icon"),u(),o()(),_(35,"spk-menu",58)(36,"button",59),s(37,11),d(38,"strong")(39,"spk-icon"),u(),o(),M(40,60),_(41,"button",57),f("click",function(){return k(l),P(t.setTimeType("relative"))}),p(42,12),o(),_(43,"button",57),f("click",function(){return k(l),P(t.setTimeType("actual"))}),p(44,13),o(),m(),o(),g(45,Pn,8,1,"spk-menu",58),o()(),g(46,et,2,1)(47,nt,5,0),Xe(48,46,gn,null,47),o()(),g(50,_t,47,30,"ng-template",null,0,Q)(52,at,6,0,"ng-template",null,1,Q)}n&2&&(r(3),S("routerLink",J(9,dn)),r(10),S("routerLink",J(10,Tn)),r(16),H("active",t.viewMode()==="list"),r(3),H("active",t.viewMode()==="details"),r(7),y(t.timeType()),L(37),r(6),E(t.viewMode()==="list"?45:-1),r(3),we(!t.backupsLoading()))},dependencies:[je,cn,Qe,Je,Y,Ze,en,nn,qe],styles:["[_nghost-%COMP%]{display:block}h2[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:2rem 0}header[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;padding:0 2rem;gap:1rem}spk-card[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem}spk-card[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:.25rem}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.content[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{padding:0 2rem}.backups[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 2rem;gap:.5rem}.backup[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem;gap:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;width:100%;max-width:40%}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{color:var(--base-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--base-12)}.actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.sortable[_ngcontent-%COMP%]{-webkit-user-select:none;user-select:none}.sortable[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{margin-left:.5rem;font-size:1rem;justify-self:flex-end;display:none}.sortable[_ngcontent-%COMP%]:not(.sort-asc):not(.sort-desc) spk-icon.filter[_ngcontent-%COMP%]{display:block}.sortable.sort-asc[_ngcontent-%COMP%] spk-icon.asc[_ngcontent-%COMP%]{display:block;color:var(--base-12)}.sortable.sort-desc[_ngcontent-%COMP%] spk-icon.desc[_ngcontent-%COMP%]{display:block;color:var(--base-12)}"],changeDetection:0})};export{ee as default};
1
+ import{a as cn}from"./chunk-6V7W7EKR.js";import{c as Z,d as rn}from"./chunk-HIW2CN45.js";import"./chunk-UEYPJIJG.js";import{a as ln}from"./chunk-XHPURHO2.js";import"./chunk-7V4TPS4B.js";import{a as an}from"./chunk-T5WAKBP3.js";import"./chunk-LUKUBN2Z.js";import"./chunk-RHW5QVAY.js";import"./chunk-DLJSVAM2.js";import"./chunk-ABANCAM5.js";import"./chunk-FSKPPAVO.js";import"./chunk-FQ55IACT.js";import{e as je}from"./chunk-WRKRV6RQ.js";import"./chunk-DYTQQHMA.js";import{a as Y,f as qe,g as Je,h as Qe,j as Ye,k as Ze,o as en,p as nn,w as tn,x as on}from"./chunk-ESAGJOZZ.js";import{h as _n}from"./chunk-N5FH4YAX.js";import"./chunk-GQGMGFDX.js";import"./chunk-EBXJGPRA.js";import"./chunk-QUOBR5MG.js";import{Ab as z,Ac as B,Bb as V,Bc as G,Cb as K,Db as _,Dc as Q,Eb as o,F as X,Fb as d,Gb as M,Hb as m,Ib as D,Jb as x,Pb as s,Qb as u,Rb as p,Rc as We,Sb as y,Tb as L,Ua as r,Ub as j,Vb as f,Wb as F,Z as w,a as ve,b as W,ea as k,fa as P,gb as he,ic as U,jc as T,kc as ze,lb as g,lc as O,oc as Ve,pc as Ke,qc as Ue,rb as Xe,rc as q,sb as we,ub as S,va as R,vc as J,wb as H,wc as $,zb as E,zc as I}from"./chunk-4KE2I7OA.js";import"./chunk-7CGTOI24.js";function sn(...e){let i=R(...e);return Object.defineProperty(i,"value",{get:i.asReadonly(),set:i.set.bind(i)})}function un(e,i,n){let t=localStorage.getItem(i);t!=null&&(e=JSON.parse(t));let l=sn(e),c=l[ve];n?.equal&&(c.equal=n.equal);function N(C){C==null?localStorage.removeItem(i):localStorage.setItem(i,JSON.stringify(C))}return l.set=C=>{N(C),W(c,C)},l.update=C=>{let A=C(l());N(A),W(c,A)},l}var gn=()=>[import("./chunk-QMFHJSCY.js").then(e=>e.NgTemplateOutlet),Y,Ye,on,tn,import("./chunk-GUKBMCIX.js").then(e=>e.DurationFormatPipe),import("./chunk-6LCXRM3A.js").then(e=>e.BytesPipe),import("./chunk-U7YVVKGQ.js").then(e=>e.RelativeTimePipe)],dn=()=>["/add-backup"],Tn=()=>["/restore"],Fn=e=>({$implicit:e}),Sn=e=>["/backup",e],Cn=e=>["/restore",e],En=e=>["/backup",e,"export"],Mn=e=>["/backup",e,"delete"],mn=e=>["/backup",e,"database"],On=e=>["/backup",e,"commandline"],Nn=e=>["/backup",e,"log"];function kn(e,i){if(e&1){let n=x();_(0,"button",57),f("click",function(){let l=k(n).$implicit,c=F(2);return P(c.sortByColumn.set(l.value))}),p(1,15),o()}if(e&2){let n=i.$implicit,t=F(2);H("active",t.orderBy()===n.value),r(),y(n.label),L(1)}}function Pn(e,i){if(e&1&&(_(0,"spk-menu",58)(1,"button",59),s(2,14),d(3,"strong")(4,"spk-icon"),u(),o(),M(5,60),V(6,kn,2,3,"button",61,z),m(),o()),e&2){let n=F();r(4),y(n.orderBy()),L(2),r(2),K(n.sortOrderOptions())}}function fn(e,i){if(e&1&&(T(0),I(1,"durationFormat")),e&2){let n=F().$implicit,t=F(4);O(" ",G(1,1,n.Backup==null||n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDuration,t.timeType()==="actual")," ")}}function $n(e,i){e&1&&(M(0),p(1,21),m())}function Dn(e,i){if(e&1&&(T(0),I(1,"bytes")),e&2){let n=F().$implicit;O(" ",B(1,1,n.Backup==null||n.Backup.Metadata==null?null:n.Backup.Metadata.SourceFilesSize)," ")}}function In(e,i){e&1&&(M(0),p(1,22),m())}function An(e,i){if(e&1&&(T(0),I(1,"bytes")),e&2){let n=F().$implicit;O(" ",B(1,1,n.Backup==null||n.Backup.Metadata==null?null:n.Backup.Metadata.TargetFilesSize)," ")}}function Rn(e,i){e&1&&(M(0),p(1,23),m())}function Hn(e,i){e&1&&D(0)}function yn(e,i){if(e&1&&(_(0,"div",64)(1,"div",51)(2,"h3"),T(3),_(4,"spk-chip")(5,"spk-icon"),T(6),o(),T(7),o()(),_(8,"p")(9,"span"),p(10,16),o(),T(11),I(12,"relativeTime"),o(),_(13,"p")(14,"span"),p(15,17),o(),g(16,fn,2,4)(17,$n,2,0,"ng-container"),o(),_(18,"p")(19,"span"),p(20,18),o(),g(21,Dn,2,3)(22,In,2,0,"ng-container"),o(),_(23,"p")(24,"span"),p(25,19),o(),g(26,An,2,3)(27,Rn,2,0,"ng-container"),o()(),q(28),_(29,"spk-chip",65),p(30,20),o(),_(31,"div",55),g(32,Hn,1,0,"ng-container",66),o()()),e&2){let n,t=i.$implicit,l=F(4),c=U(51);r(3),O(" ",(n=t.Backup==null?null:t.Backup.Name)!==null&&n!==void 0?n:l.MISSING_BACKUP_NAME," "),r(3),ze(l.getBackendIcon(t.Backup==null?null:t.Backup.TargetURL)),r(),O(" ",l.getBackendType(t.Backup==null?null:t.Backup.TargetURL)," "),r(4),O(" ",G(12,11,t.Backup==null||t.Backup.Metadata==null?null:t.Backup.Metadata.LastBackupDate,l.timeType()==="actual")," "),r(5),E(!(t.Backup==null||t.Backup.Metadata==null)&&t.Backup.Metadata.LastBackupDuration?16:17),r(5),E(!(t.Backup==null||t.Backup.Metadata==null)&&t.Backup.Metadata.SourceFilesSize?21:22),r(5),E(!(t.Backup==null||t.Backup.Metadata==null)&&t.Backup.Metadata.TargetFilesSize?26:27);let N=l.getBackupVersionCount(t);r(4),y(N)(N),L(30),r(2),S("ngTemplateOutlet",c)("ngTemplateOutletContext",$(14,Fn,t))}}function Ln(e,i){if(e&1&&V(0,yn,33,16,"div",64,z),e&2){let n=F(3);K(n.backups())}}function xn(e,i){e&1&&(M(0),p(1,24),m())}function Bn(e,i){if(e&1&&(_(0,"div",62),g(1,Ln,2,0)(2,xn,2,0,"ng-container"),o()),e&2){let n=F(2);r(),E(n.backups().length?1:2)}}function Gn(e,i){e&1&&(s(0,25,1),D(1),u())}function bn(e,i){e&1&&(s(0,26,1),D(1),u())}function vn(e,i){e&1&&(s(0,27,1),D(1),u())}function hn(e,i){e&1&&(s(0,28,1),D(1),u())}function Xn(e,i){e&1&&(s(0,29,1),D(1),u())}function wn(e,i){e&1&&(s(0,30,1),D(1),u())}function zn(e,i){if(e&1&&(T(0),I(1,"relativeTime")),e&2){let n=F().$implicit,t=F(3);O(" ",G(1,1,n.Backup==null||n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDate,t.timeType()==="actual")," ")}}function Vn(e,i){e&1&&(M(0),p(1,34),m())}function Kn(e,i){if(e&1&&(T(0),I(1,"durationFormat")),e&2){let n=F().$implicit,t=F(3);O(" ",G(1,1,n.Backup==null||n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDuration,t.timeType()==="actual")," ")}}function Un(e,i){e&1&&(M(0),p(1,35),m())}function Wn(e,i){if(e&1&&(T(0),I(1,"bytes")),e&2){let n=F().$implicit;O(" ",B(1,1,n.Backup==null||n.Backup.Metadata==null?null:n.Backup.Metadata.SourceFilesSize)," ")}}function jn(e,i){e&1&&(M(0),p(1,36),m())}function qn(e,i){if(e&1&&(T(0),I(1,"bytes")),e&2){let n=F().$implicit;O(" ",B(1,1,n.Backup==null||n.Backup.Metadata==null?null:n.Backup.Metadata.TargetFilesSize)," ")}}function Jn(e,i){e&1&&(M(0),p(1,37),m())}function Qn(e,i){e&1&&D(0)}function Yn(e,i){if(e&1&&(_(0,"tr")(1,"td"),T(2),o(),_(3,"td"),T(4),o(),_(5,"td"),g(6,zn,2,4)(7,Vn,2,0,"ng-container"),o(),_(8,"td"),g(9,Kn,2,4)(10,Un,2,0,"ng-container"),o(),_(11,"td"),g(12,Wn,2,3)(13,jn,2,0,"ng-container"),o(),_(14,"td"),g(15,qn,2,3)(16,Jn,2,0,"ng-container"),o(),_(17,"td"),q(18),_(19,"span"),p(20,33),o()(),_(21,"td"),g(22,Qn,1,0,"ng-container",66),o()()),e&2){let n,t=i.$implicit,l=F(3),c=U(51);r(2),O(" ",(n=t.Backup==null?null:t.Backup.Name)!==null&&n!==void 0?n:l.MISSING_BACKUP_NAME," "),r(2),O(" ",l.getBackendType(t.Backup==null?null:t.Backup.TargetURL)," "),r(2),E(!(t.Backup==null||t.Backup.Metadata==null)&&t.Backup.Metadata.LastBackupDate?6:7),r(3),E(!(t.Backup==null||t.Backup.Metadata==null)&&t.Backup.Metadata.LastBackupDuration?9:10),r(3),E(!(t.Backup==null||t.Backup.Metadata==null)&&t.Backup.Metadata.SourceFilesSize?12:13),r(3),E(!(t.Backup==null||t.Backup.Metadata==null)&&t.Backup.Metadata.TargetFilesSize?15:16);let N=l.getBackupVersionCount(t);r(5),y(N)(N),L(20),r(2),S("ngTemplateOutlet",c)("ngTemplateOutletContext",$(10,Fn,t))}}function Zn(e,i){if(e&1){let n=x();_(0,"spk-table",67),Ue("sortByColumnChange",function(l){k(n);let c=F(2);return Ke(c.sortByColumn,l)||(c.sortByColumn=l),P(l)}),_(1,"tr",68)(2,"th",69),s(3,25),g(4,Gn,2,0,"ng-container",70),u(),o(),_(5,"th",71),s(6,26),g(7,bn,2,0,"ng-container",70),u(),o(),_(8,"th",72),s(9,27),g(10,vn,2,0,"ng-container",70),u(),o(),_(11,"th",73),s(12,28),g(13,hn,2,0,"ng-container",70),u(),o(),_(14,"th",74),s(15,29),g(16,Xn,2,0,"ng-container",70),u(),o(),_(17,"th",75),s(18,30),g(19,wn,2,0,"ng-container",70),u(),o(),_(20,"th"),p(21,31),o(),_(22,"th"),p(23,32),o()(),V(24,Yn,23,12,"tr",null,z),o()}if(e&2){let n=F(2),t=U(53);S("data",n.backups())("loading",n.backupsLoading()),Ve("sortByColumn",n.sortByColumn),r(4),S("ngTemplateOutlet",t),r(3),S("ngTemplateOutlet",t),r(3),S("ngTemplateOutlet",t),r(3),S("ngTemplateOutlet",t),r(3),S("ngTemplateOutlet",t),r(3),S("ngTemplateOutlet",t),r(5),K(n.backups())}}function et(e,i){if(e&1&&g(0,Bn,3,1,"div",62)(1,Zn,26,9,"spk-table",63),e&2){let n=F();E(n.viewMode()==="list"?0:n.viewMode()==="details"?1:-1)}}function nt(e,i){e&1&&(_(0,"div",76),d(1,"spk-progress-bar",77),_(2,"div",51)(3,"h3"),p(4,38),o()()())}function tt(e,i){e&1&&p(0,39,1)}function it(e,i){e&1&&(_(0,"spk-icon"),T(1,"check"),o())}function ot(e,i){e&1&&(_(0,"spk-icon"),T(1,"dots-three-vertical"),o())}function _t(e,i){if(e&1){let n=x();_(0,"button",78),f("click",function(){let l=k(n).$implicit,c=F();return P(c.startBackup(l.Backup==null?null:l.Backup.ID))}),s(1,39),d(2,"spk-icon"),g(3,tt,1,0),u(),o(),_(4,"button",79)(5,"spk-icon"),T(6,"pencil-simple"),o()(),_(7,"spk-menu",80)(8,"button",52),g(9,it,2,0,"spk-icon")(10,ot,2,0,"spk-icon"),o(),M(11,60),_(12,"h3",81),T(13,"Operations"),o(),_(14,"button",82),s(15,40),d(16,"spk-icon"),u(),o(),_(17,"button",82),s(18,41),d(19,"spk-icon"),u(),o(),_(20,"button",82),s(21,42),d(22,"spk-icon"),u(),o(),d(23,"spk-divider"),_(24,"h3",81),T(25,"Advanced"),o(),_(26,"button",82),s(27,43),d(28,"spk-icon"),u(),o(),_(29,"button",57),f("click",function(){let l=k(n).$implicit,c=F();return P(c.verifyFiles(l.Backup==null?null:l.Backup.ID))}),s(30,44),d(31,"spk-icon"),u(),o(),_(32,"button",57),f("click",function(){let l=k(n).$implicit,c=F();return P(c.compressBackup(l.Backup==null?null:l.Backup.ID))}),s(33,45),d(34,"spk-icon"),u(),o(),_(35,"button",82),s(36,46),d(37,"spk-icon"),u(),o(),d(38,"spk-divider"),_(39,"h3",81),T(40,"Reporting"),o(),_(41,"button",82),s(42,47),d(43,"spk-icon"),u(),o(),_(44,"button",57),f("click",function(){let l=k(n).$implicit,c=F();return P(c.createErrorReport(l.Backup==null?null:l.Backup.ID))}),s(45,48),d(46,"spk-icon"),u(),o(),m(),o()}if(e&2){let n=i.$implicit,t=F();H("loader",t.startingBackup()===(n.Backup==null?null:n.Backup.ID)),r(3),E(t.viewMode()==="list"?3:-1),r(),S("routerLink",$(16,Sn,n.Backup==null?null:n.Backup.ID)),r(3),S("right",!0),r(),H("loader",t.loadingId()===(n.Backup==null?null:n.Backup.ID))("success",t.successId()===(n.Backup==null?null:n.Backup.ID)),r(),E(t.successId()===(n.Backup==null?null:n.Backup.ID)?9:10),r(5),S("routerLink",$(18,Cn,n.Backup==null?null:n.Backup.ID)),r(3),S("routerLink",$(20,En,n.Backup==null?null:n.Backup.ID)),r(3),S("routerLink",$(22,Mn,n.Backup==null?null:n.Backup.ID)),r(6),S("routerLink",$(24,mn,n.Backup==null?null:n.Backup.ID)),r(9),S("routerLink",$(26,On,n.Backup==null?null:n.Backup.ID)),r(6),S("routerLink",$(28,Nn,n.Backup==null?null:n.Backup.ID))}}function at(e,i){e&1&&(_(0,"spk-icon",83),T(1,"funnel-simple"),o(),_(2,"spk-icon",84),T(3,"sort-ascending"),o(),_(4,"spk-icon",85),T(5,"sort-descending"),o())}var pn={file:{Display:$localize`Local`,Icon:null}},ee=class e{#n=w(_n);#t=w(ln);#e=w(an);MISSING_BACKUP_NAME=$localize`Backup name missing`;sortOrderOptions=this.#e.orderByOptions;orderBy=this.#e.orderBy;backups=this.#e.backups;backupsLoading=this.#e.backupsLoading;startingBackup=this.#e.startingBackup;deletingBackup=this.#e.deletingBackup;timeType=this.#e.timeType;viewMode=un("list","viewMode");sortByColumn=R("name");loadingId=R(null);successId=R(null);sortEffect=We(()=>this.#e.setOrderBy(this.sortByColumn()));ngOnInit(){this.#e.getBackups(!0)}setOrderBy(i){this.#e.setOrderBy(i)}setTimeType(i){this.#e.setTimeType(i)}startBackup(i){this.#t.resumeDialogCheck(()=>this.#e.startBackup(i))}getBackendIcon(i){if(!i)return"";let n=i.split("://")[0],t=Z.find(c=>c.key===n);if(!t)return"database";let l=pn[t.key];return l?.Icon?l.Icon:"database"}getBackendType(i){if(!i)return"";let n=i.split("://")[0],t=Z.find(c=>c.key===n);if(!t)return"";let l=pn[t.key];if(l?.Display)return l.Display;if(t.key==="s3"){let c="http://null?"+i.split("?")[1],C=new URL(c).searchParams.get("s3-server-name")?.toLowerCase()??"";for(let[A,b]of Object.entries(rn))if(C.endsWith(A))return b}return t.displayName}getBackupVersionCount(i){return parseInt(i?.Backup?.Metadata?.BackupListCount??"",10)||0}verifyFiles(i){this.loadingId.set(i),this.#n.postApiV1BackupByIdVerify({id:i}).pipe(X(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(i),setTimeout(()=>this.successId.set(null),2e3)}})}compressBackup(i){this.loadingId.set(i),this.#n.postApiV1BackupByIdCompact({id:i}).pipe(X(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(i),setTimeout(()=>this.successId.set(null),2e3)}})}createErrorReport(i){this.loadingId.set(i),this.#n.postApiV1BackupByIdCreatereport({id:i}).pipe(X(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(i),setTimeout(()=>this.successId.set(null),2e3)}})}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=he({type:e,selectors:[["app-home"]],decls:54,vars:11,consts:()=>{let i;i=$localize`Backups`;let n;n=$localize`Backups are stored in the cloud and can be restored at any time.`;let t;t=$localize` Add ${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let l;l=$localize`Restores`;let c;c=$localize`Restores allow you to restore your data from the cloud.`;let N;N=$localize` Start ${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let C;C=$localize`My backups`;let A;A=$localize`${"\uFFFD#31\uFFFD"}:START_TAG_SPK_ICON:rows${"\uFFFD/#31\uFFFD"}:CLOSE_TAG_SPK_ICON: List `;let b;b=$localize`${"\uFFFD#34\uFFFD"}:START_TAG_SPK_ICON:list${"\uFFFD/#34\uFFFD"}:CLOSE_TAG_SPK_ICON: Details `;let ne;ne=$localize` Time: ${"\uFFFD#38\uFFFD"}:START_TAG_STRONG:${"\uFFFD0\uFFFD"}:INTERPOLATION:${"\uFFFD/#38\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#39\uFFFD"}:START_TAG_SPK_ICON:clock${"\uFFFD/#39\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let te;te=$localize`Relative time`;let ie;ie=$localize`Actual time`;let oe;oe=$localize` Order by: ${"\uFFFD#3\uFFFD"}:START_TAG_STRONG:${"\uFFFD0\uFFFD"}:INTERPOLATION:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#4\uFFFD"}:START_TAG_SPK_ICON:arrows-down-up${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let _e;_e=$localize` ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let ae;ae=$localize`Last successful backup:`;let le;le=$localize`Duration:`;let re;re=$localize`Source:`;let ce;ce=$localize`Destination:`;let v;v=$localize`{VAR_PLURAL, plural, =0 {No version yet} =1 {1 Version} other {{INTERPOLATION} Versions}}`,v=j(v,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let se;se=$localize` ${v}:ICU@@6502601490918455200: `;let ue;ue=$localize`N/A`;let pe;pe=$localize`N/A`;let Fe;Fe=$localize`N/A`;let ge;ge=$localize`No backups founds`;let de;de=$localize` Backup ${"\uFFFD*4:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*4:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Te;Te=$localize` Type ${"\uFFFD*7:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*7:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Se;Se=$localize` Last successful backup ${"\uFFFD*10:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*10:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Ce;Ce=$localize` Duration ${"\uFFFD*13:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*13:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Ee;Ee=$localize` Source ${"\uFFFD*16:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*16:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Me;Me=$localize` Destination ${"\uFFFD*19:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*19:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let me;me=$localize`Version`;let Oe;Oe=$localize`Actions`;let h;h=$localize`{VAR_PLURAL, plural, =0 {No version yet} =1 {1 Version} other {{INTERPOLATION} Versions}}`,h=j(h,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let Ne;Ne=$localize` ${h}:ICU@@6502601490918455200: `;let ke;ke=$localize`N/A`;let Pe;Pe=$localize`N/A`;let fe;fe=$localize`N/A`;let $e;$e=$localize`N/A`;let De;De=$localize`Loading backups...`;let Ie;Ie=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:play-circle${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON:${"\uFFFD*3:1\uFFFD"}:START_BLOCK_IF: Start ${"\uFFFD/*3:1\uFFFD"}:CLOSE_BLOCK_IF:`;let Ae;Ae=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SPK_ICON:clock-counter-clockwise${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SPK_ICON: Restore `;let Re;Re=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:export${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: Export `;let He;He=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:x-circle${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON: Delete `;let ye;ye=$localize`${"\uFFFD#28\uFFFD"}:START_TAG_SPK_ICON:database${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SPK_ICON: Database `;let Le;Le=$localize`${"\uFFFD#31\uFFFD"}:START_TAG_SPK_ICON:check-square-offset${"\uFFFD/#31\uFFFD"}:CLOSE_TAG_SPK_ICON: Verify files `;let xe;xe=$localize`${"\uFFFD#34\uFFFD"}:START_TAG_SPK_ICON:file-archive${"\uFFFD/#34\uFFFD"}:CLOSE_TAG_SPK_ICON: Compress now `;let Be;Be=$localize`${"\uFFFD#37\uFFFD"}:START_TAG_SPK_ICON:terminal-window${"\uFFFD/#37\uFFFD"}:CLOSE_TAG_SPK_ICON: Commandline `;let Ge;Ge=$localize`${"\uFFFD#43\uFFFD"}:START_TAG_SPK_ICON:notepad${"\uFFFD/#43\uFFFD"}:CLOSE_TAG_SPK_ICON: Log `;let be;return be=$localize`${"\uFFFD#46\uFFFD"}:START_TAG_SPK_ICON:file-plus${"\uFFFD/#46\uFFFD"}:CLOSE_TAG_SPK_ICON: Create error report `,[["actions",""],["sortIcons",""],i,n,t,l,c,N,C,A,b,ne,te,ie,oe,_e,ae,le,re,ce,se,ue,pe,Fe,ge,de,Te,Se,Ce,Ee,Me,me,Oe,Ne,ke,Pe,fe,$e,De,Ie,Ae,Re,He,ye,Le,xe,Be,Ge,be,[1,"type-a",3,"routerLink"],["src","assets/images/backup.png","alt","","width","48px"],[1,"text"],["type","button","spk-button",""],["src","assets/images/restore.png","alt","","width","48px"],[1,"content"],[1,"actions"],[1,"small"],["type","button",3,"click"],[1,"table-overview"],["type","button","spk-button","",1,"small"],["menu",""],["type","button",3,"active"],[1,"backups"],[1,"type-b",3,"data","loading","sortByColumn"],[1,"backup"],[1,"simple","success"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"type-b",3,"sortByColumnChange","data","loading","sortByColumn"],["table-header",""],["spkSort","name"],[4,"ngTemplateOutlet"],["spkSort","type"],["spkSort","lastrun"],["spkSort","duration"],["spkSort","sourcesize"],["spkSort","destinationsize"],[1,"loading-list"],[1,"indeterminate","primary"],["spk-button","",3,"click"],["type","button","spk-button","",3,"routerLink"],[3,"right"],["title",""],["type","button",3,"routerLink"],[1,"filter"],[1,"asc"],[1,"desc"]]},template:function(n,t){if(n&1){let l=x();d(0,"app-status-bar"),_(1,"section")(2,"header")(3,"spk-card",49),d(4,"img",50),_(5,"div",51)(6,"h3"),p(7,2),o(),_(8,"p"),p(9,3),o()(),_(10,"button",52),s(11,4),d(12,"spk-icon"),u(),o()(),_(13,"spk-card",49),d(14,"img",53),_(15,"div",51)(16,"h3"),p(17,5),o(),_(18,"p"),p(19,6),o()(),_(20,"button",52),s(21,7),d(22,"spk-icon"),u(),o()()(),_(23,"div",54)(24,"h2"),M(25),p(26,8),m(),_(27,"div",55)(28,"spk-button-group",56)(29,"button",57),f("click",function(){return k(l),P(t.viewMode.set("list"))}),s(30,9),d(31,"spk-icon"),u(),o(),_(32,"button",57),f("click",function(){return k(l),P(t.viewMode.set("details"))}),s(33,10),d(34,"spk-icon"),u(),o()(),_(35,"spk-menu",58)(36,"button",59),s(37,11),d(38,"strong")(39,"spk-icon"),u(),o(),M(40,60),_(41,"button",57),f("click",function(){return k(l),P(t.setTimeType("relative"))}),p(42,12),o(),_(43,"button",57),f("click",function(){return k(l),P(t.setTimeType("actual"))}),p(44,13),o(),m(),o(),g(45,Pn,8,1,"spk-menu",58),o()(),g(46,et,2,1)(47,nt,5,0),Xe(48,46,gn,null,47),o()(),g(50,_t,47,30,"ng-template",null,0,Q)(52,at,6,0,"ng-template",null,1,Q)}n&2&&(r(3),S("routerLink",J(9,dn)),r(10),S("routerLink",J(10,Tn)),r(16),H("active",t.viewMode()==="list"),r(3),H("active",t.viewMode()==="details"),r(7),y(t.timeType()),L(37),r(6),E(t.viewMode()==="list"?45:-1),r(3),we(!t.backupsLoading()))},dependencies:[je,cn,Qe,Je,Y,Ze,en,nn,qe],styles:["[_nghost-%COMP%]{display:block}h2[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:2rem 0}header[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;padding:0 2rem;gap:1rem}spk-card[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem}spk-card[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:.25rem}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.content[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{padding:0 2rem}.backups[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 2rem;gap:.5rem}.backup[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem;gap:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;width:100%;max-width:40%}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{color:var(--base-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--base-12)}.actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.sortable[_ngcontent-%COMP%]{-webkit-user-select:none;user-select:none}.sortable[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{margin-left:.5rem;font-size:1rem;justify-self:flex-end;display:none}.sortable[_ngcontent-%COMP%]:not(.sort-asc):not(.sort-desc) spk-icon.filter[_ngcontent-%COMP%]{display:block}.sortable.sort-asc[_ngcontent-%COMP%] spk-icon.asc[_ngcontent-%COMP%]{display:block;color:var(--base-12)}.sortable.sort-desc[_ngcontent-%COMP%] spk-icon.desc[_ngcontent-%COMP%]{display:block;color:var(--base-12)}"],changeDetection:0})};export{ee as default};
@@ -1,3 +1,3 @@
1
- import{a as Ee}from"./chunk-SX2OA5DO.js";import{a as fe}from"./chunk-C5B4MW2I.js";import{l as P}from"./chunk-VPTXHYYV.js";import"./chunk-43BIRTPL.js";import"./chunk-FP6LM56A.js";import{a as Se}from"./chunk-M5RL4LRX.js";import"./chunk-HIW2CN45.js";import"./chunk-4V45XF67.js";import{a as T}from"./chunk-UEYPJIJG.js";import"./chunk-2CXHZS6X.js";import{a as le}from"./chunk-XHPURHO2.js";import"./chunk-7V4TPS4B.js";import"./chunk-T5WAKBP3.js";import"./chunk-LUKUBN2Z.js";import"./chunk-RHW5QVAY.js";import"./chunk-DLJSVAM2.js";import{c as se,e as me,f as de,i as pe,m as _e,n as ce,o as ue,q as Ce,r as ge,s as Me,t as Ne}from"./chunk-ABANCAM5.js";import"./chunk-FSKPPAVO.js";import"./chunk-FQ55IACT.js";import{b as q,d as Z,e as J}from"./chunk-WRKRV6RQ.js";import"./chunk-DYTQQHMA.js";import{a as Q,e as Y,g as ee,k as te,l as ne,p as oe,t as ie}from"./chunk-ESAGJOZZ.js";import{g as ae,h as re}from"./chunk-N5FH4YAX.js";import"./chunk-GQGMGFDX.js";import"./chunk-EBXJGPRA.js";import"./chunk-QUOBR5MG.js";import{Ab as R,Bb as y,Cb as v,Db as r,Eb as o,Fb as l,Gb as A,Hb as O,Jb as G,Pb as M,Qb as N,Rb as c,Rc as H,Sb as x,Tb as U,Ua as m,Vb as K,Wb as f,Z as _,_b as w,ea as S,fa as E,gb as $,lb as h,oc as X,pc as z,qc as V,ub as C,uc as W,va as F,vc as j,wb as b,zb as B}from"./chunk-4KE2I7OA.js";import"./chunk-7CGTOI24.js";var Fe=()=>[];function Ae(s,t){s&1&&l(0,"spk-progress-bar",12)}function Oe(s,t){if(s&1&&(r(0,"spk-form-field"),l(1,"input",32),o()),s&2){let e=t.$implicit,i=t.$index;m(),w("id","filter-",i,""),C("formControl",e)}}function Te(s,t){if(s&1){let e=G();r(0,"form",13)(1,"spk-select",14)(2,"label",15),c(3,1),o(),l(4,"input",16),o(),r(5,"spk-form-field")(6,"label",17),c(7,2),o(),l(8,"textarea",18),o(),r(9,"spk-form-field")(10,"label",19),c(11,3),o(),l(12,"textarea",20),o()(),r(13,"spk-divider"),c(14,4),o(),r(15,"form",13)(16,"spk-form-field")(17,"label",21),c(18,5),o(),l(19,"input",22),o(),r(20,"spk-form-field")(21,"label",23),c(22,6),o(),l(23,"input",24),o(),r(24,"app-toggle-card",25),A(25,26),c(26,7),O(),A(27,27),y(28,Oe,2,3,"spk-form-field",null,R),O(),o()(),r(30,"p"),M(31,8),l(32,"a",28),N(),o(),r(33,"app-options-list",29),V("optionsChange",function(a){S(e);let u=f();return z(u.settings,a)||(u.settings=a),E(a)}),o(),r(34,"div",30)(35,"button",31),K("click",function(){S(e);let a=f();return E(a.submit())}),M(36,9),l(37,"spk-icon"),N(),o()()}if(s&2){let e,i=f();C("formGroup",i.baseCmdForm),m(),C("options",(e=i.commandOptions())!==null&&e!==void 0?e:j(10,Fe))("inlineSearch",!0),m(14),C("formGroup",i.standardFields),m(9),C("disallowToggle",!0),m(4),v(i.standardFields.controls.filters.controls),m(5),X("options",i.settings),C("hasFreeTextSettings",!0),m(2),b("loader",i.isSubmitting()),m(2),x(i.baseCmdForm.value.command),U(36)}}var d=new ge,Pe=["Bytes","KB","MB","GB","TB","PB"],I=class s{#e=_(P);#t=_(re);#n=_(Z);#o=_(q);#i=_(ae);#a=_(le);#s=_(Y);#r=T(this.#o.params);commandOptions=T(this.#i.getApiV1Commandline());sizeOptions=F(Pe);isSubmitting=F(!1);optionsFields=this.#e.optionsFields;standardFields=d.group({"backup-id":d.control(""),"backup-name":d.control(""),dbpath:d.control(""),filters:d.array([])});baseCmdForm=d.group({command:d.control("backup"),targetUrl:d.control(""),arguments:d.control("")});finishedLoading=this.#e.finishedLoading;backupId=this.#e.backupId;settings=this.#e.settings;#m=H(()=>{let t=this.#r()?.id;this.#e.backupId.set(t),this.getBackup(t)});getBackup(t){this.#t.getApiV1BackupById({id:t}).subscribe({next:e=>{this.#e.mapScheduleToForm(e.Schedule??null),e.Backup&&(this.mapStandardFieldsToForm(e.Backup),this.mapBaseCmdToForm(e.Backup),this.#e.mapOptionsToForms(e.Backup)),this.#e.finishedLoading.set(!0)}})}mapStandardFieldsToForm(t){this.standardFields.patchValue({dbpath:t.DBPath,"backup-id":t.ID,"backup-name":t.Name}),t.Filters&&t.Filters.length&&t.Filters.map(e=>{this.standardFields.controls.filters.push(d.control(`${e.Include?"":"-"}${e.Expression}`))})}submit(){this.#a.resumeDialogCheck(()=>this.#l())}#l(){this.isSubmitting.set(!0);let t=this.baseCmdForm.value,e=t.targetUrl??"",i=t.arguments?.split(`
1
+ import{a as Ee}from"./chunk-SX2OA5DO.js";import{a as fe}from"./chunk-6V7W7EKR.js";import{l as P}from"./chunk-VPTXHYYV.js";import"./chunk-43BIRTPL.js";import"./chunk-FP6LM56A.js";import{a as Se}from"./chunk-M5RL4LRX.js";import"./chunk-HIW2CN45.js";import"./chunk-4V45XF67.js";import{a as T}from"./chunk-UEYPJIJG.js";import"./chunk-2CXHZS6X.js";import{a as le}from"./chunk-XHPURHO2.js";import"./chunk-7V4TPS4B.js";import"./chunk-T5WAKBP3.js";import"./chunk-LUKUBN2Z.js";import"./chunk-RHW5QVAY.js";import"./chunk-DLJSVAM2.js";import{c as se,e as me,f as de,i as pe,m as _e,n as ce,o as ue,q as Ce,r as ge,s as Me,t as Ne}from"./chunk-ABANCAM5.js";import"./chunk-FSKPPAVO.js";import"./chunk-FQ55IACT.js";import{b as q,d as Z,e as J}from"./chunk-WRKRV6RQ.js";import"./chunk-DYTQQHMA.js";import{a as Q,e as Y,g as ee,k as te,l as ne,p as oe,t as ie}from"./chunk-ESAGJOZZ.js";import{g as ae,h as re}from"./chunk-N5FH4YAX.js";import"./chunk-GQGMGFDX.js";import"./chunk-EBXJGPRA.js";import"./chunk-QUOBR5MG.js";import{Ab as R,Bb as y,Cb as v,Db as r,Eb as o,Fb as l,Gb as A,Hb as O,Jb as G,Pb as M,Qb as N,Rb as c,Rc as H,Sb as x,Tb as U,Ua as m,Vb as K,Wb as f,Z as _,_b as w,ea as S,fa as E,gb as $,lb as h,oc as X,pc as z,qc as V,ub as C,uc as W,va as F,vc as j,wb as b,zb as B}from"./chunk-4KE2I7OA.js";import"./chunk-7CGTOI24.js";var Fe=()=>[];function Ae(s,t){s&1&&l(0,"spk-progress-bar",12)}function Oe(s,t){if(s&1&&(r(0,"spk-form-field"),l(1,"input",32),o()),s&2){let e=t.$implicit,i=t.$index;m(),w("id","filter-",i,""),C("formControl",e)}}function Te(s,t){if(s&1){let e=G();r(0,"form",13)(1,"spk-select",14)(2,"label",15),c(3,1),o(),l(4,"input",16),o(),r(5,"spk-form-field")(6,"label",17),c(7,2),o(),l(8,"textarea",18),o(),r(9,"spk-form-field")(10,"label",19),c(11,3),o(),l(12,"textarea",20),o()(),r(13,"spk-divider"),c(14,4),o(),r(15,"form",13)(16,"spk-form-field")(17,"label",21),c(18,5),o(),l(19,"input",22),o(),r(20,"spk-form-field")(21,"label",23),c(22,6),o(),l(23,"input",24),o(),r(24,"app-toggle-card",25),A(25,26),c(26,7),O(),A(27,27),y(28,Oe,2,3,"spk-form-field",null,R),O(),o()(),r(30,"p"),M(31,8),l(32,"a",28),N(),o(),r(33,"app-options-list",29),V("optionsChange",function(a){S(e);let u=f();return z(u.settings,a)||(u.settings=a),E(a)}),o(),r(34,"div",30)(35,"button",31),K("click",function(){S(e);let a=f();return E(a.submit())}),M(36,9),l(37,"spk-icon"),N(),o()()}if(s&2){let e,i=f();C("formGroup",i.baseCmdForm),m(),C("options",(e=i.commandOptions())!==null&&e!==void 0?e:j(10,Fe))("inlineSearch",!0),m(14),C("formGroup",i.standardFields),m(9),C("disallowToggle",!0),m(4),v(i.standardFields.controls.filters.controls),m(5),X("options",i.settings),C("hasFreeTextSettings",!0),m(2),b("loader",i.isSubmitting()),m(2),x(i.baseCmdForm.value.command),U(36)}}var d=new ge,Pe=["Bytes","KB","MB","GB","TB","PB"],I=class s{#e=_(P);#t=_(re);#n=_(Z);#o=_(q);#i=_(ae);#a=_(le);#s=_(Y);#r=T(this.#o.params);commandOptions=T(this.#i.getApiV1Commandline());sizeOptions=F(Pe);isSubmitting=F(!1);optionsFields=this.#e.optionsFields;standardFields=d.group({"backup-id":d.control(""),"backup-name":d.control(""),dbpath:d.control(""),filters:d.array([])});baseCmdForm=d.group({command:d.control("backup"),targetUrl:d.control(""),arguments:d.control("")});finishedLoading=this.#e.finishedLoading;backupId=this.#e.backupId;settings=this.#e.settings;#m=H(()=>{let t=this.#r()?.id;this.#e.backupId.set(t),this.getBackup(t)});getBackup(t){this.#t.getApiV1BackupById({id:t}).subscribe({next:e=>{this.#e.mapScheduleToForm(e.Schedule??null),e.Backup&&(this.mapStandardFieldsToForm(e.Backup),this.mapBaseCmdToForm(e.Backup),this.#e.mapOptionsToForms(e.Backup)),this.#e.finishedLoading.set(!0)}})}mapStandardFieldsToForm(t){this.standardFields.patchValue({dbpath:t.DBPath,"backup-id":t.ID,"backup-name":t.Name}),t.Filters&&t.Filters.length&&t.Filters.map(e=>{this.standardFields.controls.filters.push(d.control(`${e.Include?"":"-"}${e.Expression}`))})}submit(){this.#a.resumeDialogCheck(()=>this.#l())}#l(){this.isSubmitting.set(!0);let t=this.baseCmdForm.value,e=t.targetUrl??"",i=t.arguments?.split(`
2
2
  `).filter(n=>n.length>0)??[],a=this.standardFields.value,u=a.filters??[],g=[t.command,e,...i,`--backup-name=${a["backup-name"]}`,`--dbpath=${a.dbpath}`,`--backup-id=${a["backup-id"]}`,...u.filter(n=>n).map(n=>n.startsWith("-")?`--exclude=${n?.slice(1)}`:`--include=${n}`),...this.#e.mapFormsToSettings(["backup-id","backup-name","dbpath"]).map(n=>n.Name.startsWith("--")?`${n.Name}=${n.Value}`:`--${n.Name}=${n.Value}`),"--disable-module=console-password-input"];this.#t.postApiV1Commandline({requestBody:g}).subscribe(n=>{n.Status==="OK"&&this.#n.navigate(["backup",this.backupId(),"commandline",n.ID])})}mapBaseCmdToForm(t){let e=t.TargetURL??null;e&&this.baseCmdForm.patchValue({targetUrl:e??"",arguments:t.Sources?.join(`
3
3
  `)??""})}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=$({type:s,selectors:[["app-commandline"]],features:[W([P])],decls:8,vars:1,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let e;e=$localize`Command`;let i;i=$localize`TargetUrl`;let a;a=$localize`Commandline Arguments`;let u;u=$localize`Advanced options`;let g;g=$localize`Backup ID`;let n;n=$localize`Backup Name`;let k;k=$localize`Filters`;let D;D=$localize` The backups will be split up into multiple files called volumes. Here you can set the maximum size of the individual volume files. ${"\uFFFD#32\uFFFD"}:START_LINK:Read more${"\uFFFD/#32\uFFFD"}:CLOSE_LINK:`;let L;return L=$localize`${"\uFFFD#37\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#37\uFFFD"}:CLOSE_TAG_SPK_ICON: Run "${"\uFFFD0\uFFFD"}:INTERPOLATION:" command now `,[t,e,i,a,u,g,n,k,D,L,[1,"back"],["type","button","spk-button","","routerLink","/",1,"small"],[1,"indeterminate","primary"],[3,"formGroup"],["placeholder","Select a command...",3,"options","inlineSearch"],["for","command"],["type","text","id","command","formControlName","command"],["for","targetUrl"],["id","targetUrl","autocomplete","off","formControlName","targetUrl"],["for","arguments"],["id","arguments","autocomplete","off","formControlName","arguments"],["for","backup-id"],["id","backup-id","formControlName","backup-id"],["for","backup-name"],["id","backup-name","formControlName","backup-name"],[3,"disallowToggle"],["title",""],["content","","formGroupName","filters"],["href","#",1,"spk-primary"],[3,"optionsChange","options","hasFreeTextSettings"],[1,"form-actions"],["spk-button","",1,"raised","primary",3,"click"],[3,"id","formControl"]]},template:function(e,i){e&1&&(l(0,"app-status-bar"),r(1,"section")(2,"div",10)(3,"button",11),M(4,0),l(5,"spk-icon"),N(),o()(),h(6,Ae,1,0,"spk-progress-bar",12)(7,Te,38,11),o()),e&2&&(m(6),B(i.finishedLoading()?7:6))},dependencies:[Me,pe,se,me,de,fe,Ee,Se,Ne,_e,ce,Ce,ue,J,ne,ee,te,ie,oe,Q],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;max-width:40rem;padding:2.5rem;gap:1.25rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.form-column[_ngcontent-%COMP%]{display:flex;flex-direction:column}.form-column[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.form-column[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:1rem}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:3fr 1fr;gap:.5rem;align-items:flex-end}"],changeDetection:0})};export{I as default};
package/index.html CHANGED
@@ -63,5 +63,5 @@
63
63
  <body>
64
64
  <app-root></app-root>
65
65
  <div class="loading">Connecting ...</div>
66
- <link rel="modulepreload" href="chunk-T7QZL5YJ.js"><link rel="modulepreload" href="chunk-2CXHZS6X.js"><link rel="modulepreload" href="chunk-6EWRKJSC.js"><link rel="modulepreload" href="chunk-XHPURHO2.js"><link rel="modulepreload" href="chunk-7V4TPS4B.js"><link rel="modulepreload" href="chunk-T5WAKBP3.js"><link rel="modulepreload" href="chunk-LUKUBN2Z.js"><link rel="modulepreload" href="chunk-RHW5QVAY.js"><link rel="modulepreload" href="chunk-DLJSVAM2.js"><link rel="modulepreload" href="chunk-FSKPPAVO.js"><script src="polyfills-6QHLTIIN.js" type="module"></script><script src="main-QE5ABE73.js" type="module"></script></body>
66
+ <link rel="modulepreload" href="chunk-T7QZL5YJ.js"><link rel="modulepreload" href="chunk-2CXHZS6X.js"><link rel="modulepreload" href="chunk-6EWRKJSC.js"><link rel="modulepreload" href="chunk-XHPURHO2.js"><link rel="modulepreload" href="chunk-7V4TPS4B.js"><link rel="modulepreload" href="chunk-T5WAKBP3.js"><link rel="modulepreload" href="chunk-LUKUBN2Z.js"><link rel="modulepreload" href="chunk-RHW5QVAY.js"><link rel="modulepreload" href="chunk-DLJSVAM2.js"><link rel="modulepreload" href="chunk-FSKPPAVO.js"><script src="polyfills-6QHLTIIN.js" type="module"></script><script src="main-JBXUJPKQ.js" type="module"></script></body>
67
67
  </html>
@@ -1 +1 @@
1
- import{b as ye,c as be}from"./chunk-T7QZL5YJ.js";import{a as L}from"./chunk-2CXHZS6X.js";import{a as ue}from"./chunk-6EWRKJSC.js";import{a as I}from"./chunk-XHPURHO2.js";import"./chunk-7V4TPS4B.js";import"./chunk-T5WAKBP3.js";import"./chunk-LUKUBN2Z.js";import{a as x}from"./chunk-RHW5QVAY.js";import{a as me}from"./chunk-DLJSVAM2.js";import{a as v,b as de,c as E}from"./chunk-FSKPPAVO.js";import{a as C}from"./chunk-FQ55IACT.js";import{c as se,d as ie,g as ae,h as pe}from"./chunk-WRKRV6RQ.js";import{a as re}from"./chunk-DYTQQHMA.js";import{c as ce}from"./chunk-ESAGJOZZ.js";import{a as Z,b as ee,d as te,e as oe,f as ne,i as le}from"./chunk-N5FH4YAX.js";import{a as fe}from"./chunk-GQGMGFDX.js";import{pa as Q,ua as Y}from"./chunk-EBXJGPRA.js";import{a as ge}from"./chunk-OQPUBCLB.js";import{b as he}from"./chunk-QUOBR5MG.js";import{A as N,B as F,F as w,Fb as _,Gc as z,Hc as q,L as G,N as T,P as J,Rc as X,T as k,W as B,Z as s,f as W,gb as K,i as j,ka as $,n as D,o as U,r as R,va as d}from"./chunk-4KE2I7OA.js";import"./chunk-7CGTOI24.js";var M=class t{#o=s(C);#s=s(v);ngOnInit(){this.#s.fetchConfig(),this.#o.clearAllNotCurrentVersion()}static \u0275fac=function(o){return new(o||t)};static \u0275cmp=K({type:t,selectors:[["app-root"]],decls:1,vars:0,template:function(o,n){o&1&&_(0,"router-outlet")},dependencies:[se],encapsulation:2})};var ve={production:!0,baseUrl:"/api",machineServerUrl:"${WS_URL}",defaultTimeout:3e4};var h=new B("ENVIRONMENT");var A=class t{#o=s(le);isLoaded=d(!1);webmodules=d(null);preload(e=!1){let o=this.#o.getApiV1Webmodules().pipe(J(n=>this.webmodules.set(n)),w(()=>this.isLoaded.set(!0)));if(e)return o;o.subscribe()}static \u0275fac=function(o){return new(o||t)};static \u0275prov=k({token:t,factory:t.\u0275fac,providedIn:"root"})};var Ie=()=>{let t=s(E);return t.token()?!0:t.checkProxyAuthed().pipe(T(e=>e?D(!0):t.refreshToken().pipe(R(()=>!0))))},Me=()=>{let t=s(v),e=s(I),o=s($),n=t.relayIsEnabled()?"longpoll":"websocket",i=[o.get(L).preload(!0),o.get(L).preloadFilterGroups(!0),o.get(A).preload(!0)];return t.configLoaded===null?N(i).pipe(R(()=>n)):t.configLoaded?.pipe(T(()=>N(i)))},Se=[{path:"",children:[{path:"login",canActivate:[],loadComponent:()=>import("./chunk-ED7PHXLX.js")},{path:"logout",loadComponent:()=>import("./chunk-U4XTHU5I.js")},{path:"",canActivate:[Ie],children:[{path:"",canActivate:[Me],loadComponent:()=>import("./chunk-7DNC2MPD.js"),children:[{path:"",loadComponent:()=>import("./chunk-PYKAUWVA.js")},{path:"add-backup",loadComponent:()=>import("./chunk-FAXMPPD5.js")},{path:"backup/:id/export",loadComponent:()=>import("./chunk-KAFLAM3J.js")},{path:"backup/import",loadComponent:()=>import("./chunk-O7TLFEOP.js")},{path:"backup-draft/:id",loadComponent:()=>import("./chunk-AAPLGK5W.js"),loadChildren:()=>import("./chunk-OAWADV5X.js")},{path:"backup/:id",loadComponent:()=>import("./chunk-AAPLGK5W.js"),loadChildren:()=>import("./chunk-OAWADV5X.js")},{path:"backup/:id/log",loadComponent:()=>import("./chunk-X7I3BNYM.js")},{path:"backup/:id/database",loadComponent:()=>import("./chunk-XLAU73DD.js")},{path:"backup/:id/commandline",loadComponent:()=>import("./chunk-BR3WVWMZ.js")},{path:"backup/:id/commandline/:runId",loadComponent:()=>import("./chunk-QIYTIX6W.js")},{path:"backup/:id/delete",loadComponent:()=>import("./chunk-XATCN7MB.js")},{path:"restore",children:[{path:"",loadComponent:()=>import("./chunk-Z6GXCZHO.js")},{path:"from-config",loadComponent:()=>import("./chunk-PSVKQSIF.js")}]},{path:"restore-from-files",loadComponent:()=>import("./chunk-T5M5DZZO.js"),loadChildren:()=>import("./chunk-VYAA7G37.js")},{path:"restore-draft/:id",loadComponent:()=>import("./chunk-T5M5DZZO.js"),loadChildren:()=>import("./chunk-VYAA7G37.js")},{path:"restore/:id",loadComponent:()=>import("./chunk-T5M5DZZO.js"),loadChildren:()=>import("./chunk-VYAA7G37.js")},{path:"settings",loadComponent:()=>import("./chunk-AKTDB7ZB.js")},{path:"about",loadComponent:()=>import("./chunk-VY3XNJKG.js"),children:[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",loadComponent:()=>import("./chunk-SIHNMW2E.js")},{path:"changelog",loadComponent:()=>import("./chunk-IVGY6D4N.js")},{path:"libraries",loadComponent:()=>import("./chunk-4DR45FFH.js")},{path:"system-info",loadComponent:()=>import("./chunk-URJQR7VG.js")},{path:"server-settings",loadComponent:()=>import("./chunk-BLKMQJR5.js")},{path:"logs",loadChildren:()=>import("./chunk-YUZKJZ22.js")},{path:"crashlogs",loadComponent:()=>import("./chunk-TCEYGZ6D.js")}]}]}]}]}];var P=null,Re=(t,e)=>{let o=s(E),n=s(ie),i=s(C),l=s(h),r=i.getItem("locale"),u=s(ce),a=ye(r),p=t.url==="/api/v1/auth/login",m=t.url==="/api/v1/auth/refresh",S=t.url==="/api/v1/progressstate",g=t.url==="/api/v1/remoteoperation/test",y=t.url.startsWith("/api/v2/"),b=o.token(),H=t,V=t.headers.has("custom-proxy-check")||b===de;if(b&&t.url.startsWith(l.baseUrl)&&!V){let c=t.headers.set("Authorization",`Bearer ${b}`);r&&r!=="en-US"&&(c=c.set("X-Ui-Language",a)),H=t.clone({headers:c})}return e(H).pipe(R(c=>{if(c.type===4&&c.status===200&&y){let f=c.body;if(f?.Success===!1)throw{status:200,message:f?.Error??"Unknown error",error:{Error:f?.Error??"Unknown error"},body:f}}return c}),F(c=>{let f=c.error?.Error||`Error Code: ${c.status}, Message: ${c.message}`;return!V&&(S&&c.status===404||g||u.error(f),m&&c.status===401&&(o.logout(),n.navigate(["/logout"])),!p&&!m&&c.status===401)?(P??=o.refreshToken().pipe(G()),P.pipe(T(()=>e(t.clone({headers:t.headers.set("Authorization",`Bearer ${o.token()}`)}))),w(()=>P=null))):U(()=>({error:c,message:f}))}))};var Ae="1.0.0",Te=`portal-proxy-client-${x()}`,Oe=1,O=class t{#o=1e3;#s=s(h);#t=d("disconnected");#l=d(this.#o);#i=d(!1);#n=d(!1);#a=d(null);isConnectedToMachineServer=this.#n.asReadonly();wsState=this.#t.asReadonly();#p=[];#r={};#e=null;#m=new TextDecoder("utf-8");#c=null;#d=X(()=>{let e=this.#i(),o=this.#l(),n=this.#a();if(!n||!e||!o||o<this.#o){this.#c&&window.clearInterval(this.#c);return}this.#c=window.setInterval(()=>{this.connectToMachineServer(n)},o)});utf8Atob(e){let o=Uint8Array.from(atob(e),i=>i.charCodeAt(0)),n=this.#m.decode(o);return n?JSON.parse(n):null}connectToMachineServer(e,o){let n=o?.reconnect??!1,i=this.wsState();(i==="disconnected"||i==="error"||n)&&(this.#e?.close(),this.#e=null),!this.#e&&(this.#e=new WebSocket(this.#s.machineServerUrl),this.#t.set("connecting"),this.#e.onopen=()=>{this.#t.set("connect"),this.#n.set(!0),this.#i.set(!1),this.#a.set(null)},this.#e.onclose=()=>{this.#t.set("disconnected"),this.#n.set(!1),this.#a.set(e),this.#i.set(!0)},this.#e.onerror=()=>{this.#t.set("error")},this.#e.onmessage=l=>{let r=JSON.parse(l.data);if(this.wsState()==="connect"){if(r.type!=="welcome"){this.disconnectFromMachineServer(`Unexpected message type, expected 'welcome' but got '${r.type}'`);return}let a={token:e,publicKey:"",clientVersion:Ae,protocolVersion:Oe},p=this.createResponse(r,"authportal",a);this.#t.set("welcome"),this.#e?.send(p)}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.#n.set(!0);this.#p.length>0;){let a=this.#p.pop();a&&this.#r[a.messageId]&&this.activateCommand(a)}}else if(this.wsState()==="authenticated"){if(r.type!=="command"){console.warn(`Unexpected message type, expected 'command' but got '${r.type}'`);return}let a=this.#r[r.messageId];if(a){if(r.errorMessage){a.reject(r.errorMessage);return}else{let p=JSON.parse(r.payload??"");p.body=p?.body==null?null:this.utf8Atob(p.body),a.resolve(p)}delete this.#r[r.messageId],window.clearTimeout(a.timer)}}})}disconnectFromMachineServer(e=null){e&&console.error(e),this.#e?.close(),this.#e=null,this.#t.set("disconnected"),this.#n.set(!1)}createResponse(e,o,n){let i={from:Te,to:e.from,type:o,messageId:e.messageId,payload:JSON.stringify(n)};return JSON.stringify(i)}sendCommand(e,o,n,i,l,r,u=5e3){return(this.wsState()==="disconnected"||this.wsState()==="error")&&this.connectToMachineServer(e),new Promise((a,p)=>{let m=x(),g={from:Te,to:o,type:"command",messageId:m,payload:JSON.stringify({method:n,path:i,body:l,headers:r})},y={resolve:a,reject:p,timer:window.setTimeout(()=>{let b=this.#r[m];b&&(delete this.#r[m],b.reject("Timeout"))},u)};this.#r[m]=y,this.#n()?this.activateCommand(g):this.#p.push(g)})}activateCommand(e){this.#e?.send(JSON.stringify(e))}static \u0275fac=function(o){return new(o||t)};static \u0275prov=k({token:t,factory:t.\u0275fac,providedIn:"root"})};function Ne(t){if(typeof t!="string")return null;let o=new TextEncoder().encode(t);return window.btoa(String.fromCharCode(...o))}function we(t,e,o){let n=t.relayconfigState.config();if(n===null)return o(e);let i=Ne(e.body),l={};e.headers.keys().forEach(p=>{l[p]=e.headers.get(p)??""});let r=e.headers.get("timeout"),u=r!==null?parseInt(r):t.defaultTimeout;e.url.startsWith("/api/v1/serverstate")&&e.url.includes("longpoll=true")&&(u=1e3*99);let a=t.relayWebsocket.sendCommand(n.accessToken,n.clientId,e.method,e.url,i,l,u);return new W(p=>{a.then(m=>{let S=new Z;l!=null&&Object.keys(l).forEach(y=>{S.set(y,l[y])});let g=new ee({body:m.body,status:m.code,statusText:"OK",headers:S});p.next(g),p.complete()})})}var ke=(t,e)=>{let o={relayconfigState:s(v),defaultTimeout:s(h).defaultTimeout,relayWebsocket:s(O)},n=o.relayconfigState.config();if(o.relayconfigState.configLoaded!==null&&n===null){let i=new j;return o.relayconfigState.configLoaded.subscribe(l=>{l&&we(o,t,e).subscribe(i)}),i}return we(o,t,e)};var Ee={providers:[z(),ae(Se,pe()),te(ne(),oe([ke,Re])),C,{provide:h,useValue:ve},{provide:q,useValue:be()},ue,I,he,Y,me,Q,fe,ge]};re(M,Ee);
1
+ import{b as ye,c as be}from"./chunk-T7QZL5YJ.js";import{a as L}from"./chunk-2CXHZS6X.js";import{a as ue}from"./chunk-6EWRKJSC.js";import{a as I}from"./chunk-XHPURHO2.js";import"./chunk-7V4TPS4B.js";import"./chunk-T5WAKBP3.js";import"./chunk-LUKUBN2Z.js";import{a as x}from"./chunk-RHW5QVAY.js";import{a as me}from"./chunk-DLJSVAM2.js";import{a as v,b as de,c as E}from"./chunk-FSKPPAVO.js";import{a as C}from"./chunk-FQ55IACT.js";import{c as se,d as ie,g as ae,h as pe}from"./chunk-WRKRV6RQ.js";import{a as re}from"./chunk-DYTQQHMA.js";import{c as ce}from"./chunk-ESAGJOZZ.js";import{a as Z,b as ee,d as te,e as oe,f as ne,i as le}from"./chunk-N5FH4YAX.js";import{a as fe}from"./chunk-GQGMGFDX.js";import{pa as Q,ua as Y}from"./chunk-EBXJGPRA.js";import{a as ge}from"./chunk-OQPUBCLB.js";import{b as he}from"./chunk-QUOBR5MG.js";import{A as N,B as F,F as w,Fb as _,Gc as z,Hc as q,L as G,N as T,P as J,Rc as X,T as k,W as B,Z as s,f as W,gb as K,i as j,ka as $,n as D,o as U,r as R,va as d}from"./chunk-4KE2I7OA.js";import"./chunk-7CGTOI24.js";var M=class t{#o=s(C);#s=s(v);ngOnInit(){this.#s.fetchConfig(),this.#o.clearAllNotCurrentVersion()}static \u0275fac=function(o){return new(o||t)};static \u0275cmp=K({type:t,selectors:[["app-root"]],decls:1,vars:0,template:function(o,n){o&1&&_(0,"router-outlet")},dependencies:[se],encapsulation:2})};var ve={production:!0,baseUrl:"/api",machineServerUrl:"${WS_URL}",defaultTimeout:3e4};var h=new B("ENVIRONMENT");var A=class t{#o=s(le);isLoaded=d(!1);webmodules=d(null);preload(e=!1){let o=this.#o.getApiV1Webmodules().pipe(J(n=>this.webmodules.set(n)),w(()=>this.isLoaded.set(!0)));if(e)return o;o.subscribe()}static \u0275fac=function(o){return new(o||t)};static \u0275prov=k({token:t,factory:t.\u0275fac,providedIn:"root"})};var Ie=()=>{let t=s(E);return t.token()?!0:t.checkProxyAuthed().pipe(T(e=>e?D(!0):t.refreshToken().pipe(R(()=>!0))))},Me=()=>{let t=s(v),e=s(I),o=s($),n=t.relayIsEnabled()?"longpoll":"websocket",i=[o.get(L).preload(!0),o.get(L).preloadFilterGroups(!0),o.get(A).preload(!0)];return t.configLoaded===null?N(i).pipe(R(()=>n)):t.configLoaded?.pipe(T(()=>N(i)))},Se=[{path:"",children:[{path:"login",canActivate:[],loadComponent:()=>import("./chunk-ED7PHXLX.js")},{path:"logout",loadComponent:()=>import("./chunk-U4XTHU5I.js")},{path:"",canActivate:[Ie],children:[{path:"",canActivate:[Me],loadComponent:()=>import("./chunk-S5G6POQS.js"),children:[{path:"",loadComponent:()=>import("./chunk-Z2TE5POZ.js")},{path:"add-backup",loadComponent:()=>import("./chunk-TH7CWIA2.js")},{path:"backup/:id/export",loadComponent:()=>import("./chunk-KAFLAM3J.js")},{path:"backup/import",loadComponent:()=>import("./chunk-O7TLFEOP.js")},{path:"backup-draft/:id",loadComponent:()=>import("./chunk-BTZEFBCF.js"),loadChildren:()=>import("./chunk-OAWADV5X.js")},{path:"backup/:id",loadComponent:()=>import("./chunk-BTZEFBCF.js"),loadChildren:()=>import("./chunk-OAWADV5X.js")},{path:"backup/:id/log",loadComponent:()=>import("./chunk-RODUXVVT.js")},{path:"backup/:id/database",loadComponent:()=>import("./chunk-7733YRW4.js")},{path:"backup/:id/commandline",loadComponent:()=>import("./chunk-ZMLGDPCK.js")},{path:"backup/:id/commandline/:runId",loadComponent:()=>import("./chunk-65ZYAFPI.js")},{path:"backup/:id/delete",loadComponent:()=>import("./chunk-XATCN7MB.js")},{path:"restore",children:[{path:"",loadComponent:()=>import("./chunk-ONV552SH.js")},{path:"from-config",loadComponent:()=>import("./chunk-PSVKQSIF.js")}]},{path:"restore-from-files",loadComponent:()=>import("./chunk-25II37TZ.js"),loadChildren:()=>import("./chunk-VYAA7G37.js")},{path:"restore-draft/:id",loadComponent:()=>import("./chunk-25II37TZ.js"),loadChildren:()=>import("./chunk-VYAA7G37.js")},{path:"restore/:id",loadComponent:()=>import("./chunk-25II37TZ.js"),loadChildren:()=>import("./chunk-VYAA7G37.js")},{path:"settings",loadComponent:()=>import("./chunk-J52HAQJB.js")},{path:"about",loadComponent:()=>import("./chunk-EPDVUHOD.js"),children:[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",loadComponent:()=>import("./chunk-SIHNMW2E.js")},{path:"changelog",loadComponent:()=>import("./chunk-IVGY6D4N.js")},{path:"libraries",loadComponent:()=>import("./chunk-4DR45FFH.js")},{path:"system-info",loadComponent:()=>import("./chunk-URJQR7VG.js")},{path:"server-settings",loadComponent:()=>import("./chunk-BLKMQJR5.js")},{path:"logs",loadChildren:()=>import("./chunk-YUZKJZ22.js")},{path:"crashlogs",loadComponent:()=>import("./chunk-TCEYGZ6D.js")}]}]}]}]}];var P=null,Re=(t,e)=>{let o=s(E),n=s(ie),i=s(C),l=s(h),r=i.getItem("locale"),u=s(ce),a=ye(r),p=t.url==="/api/v1/auth/login",m=t.url==="/api/v1/auth/refresh",S=t.url==="/api/v1/progressstate",g=t.url==="/api/v1/remoteoperation/test",y=t.url.startsWith("/api/v2/"),b=o.token(),H=t,V=t.headers.has("custom-proxy-check")||b===de;if(b&&t.url.startsWith(l.baseUrl)&&!V){let c=t.headers.set("Authorization",`Bearer ${b}`);r&&r!=="en-US"&&(c=c.set("X-Ui-Language",a)),H=t.clone({headers:c})}return e(H).pipe(R(c=>{if(c.type===4&&c.status===200&&y){let f=c.body;if(f?.Success===!1)throw{status:200,message:f?.Error??"Unknown error",error:{Error:f?.Error??"Unknown error"},body:f}}return c}),F(c=>{let f=c.error?.Error||`Error Code: ${c.status}, Message: ${c.message}`;return!V&&(S&&c.status===404||g||u.error(f),m&&c.status===401&&(o.logout(),n.navigate(["/logout"])),!p&&!m&&c.status===401)?(P??=o.refreshToken().pipe(G()),P.pipe(T(()=>e(t.clone({headers:t.headers.set("Authorization",`Bearer ${o.token()}`)}))),w(()=>P=null))):U(()=>({error:c,message:f}))}))};var Ae="1.0.0",Te=`portal-proxy-client-${x()}`,Oe=1,O=class t{#o=1e3;#s=s(h);#t=d("disconnected");#l=d(this.#o);#i=d(!1);#n=d(!1);#a=d(null);isConnectedToMachineServer=this.#n.asReadonly();wsState=this.#t.asReadonly();#p=[];#r={};#e=null;#m=new TextDecoder("utf-8");#c=null;#d=X(()=>{let e=this.#i(),o=this.#l(),n=this.#a();if(!n||!e||!o||o<this.#o){this.#c&&window.clearInterval(this.#c);return}this.#c=window.setInterval(()=>{this.connectToMachineServer(n)},o)});utf8Atob(e){let o=Uint8Array.from(atob(e),i=>i.charCodeAt(0)),n=this.#m.decode(o);return n?JSON.parse(n):null}connectToMachineServer(e,o){let n=o?.reconnect??!1,i=this.wsState();(i==="disconnected"||i==="error"||n)&&(this.#e?.close(),this.#e=null),!this.#e&&(this.#e=new WebSocket(this.#s.machineServerUrl),this.#t.set("connecting"),this.#e.onopen=()=>{this.#t.set("connect"),this.#n.set(!0),this.#i.set(!1),this.#a.set(null)},this.#e.onclose=()=>{this.#t.set("disconnected"),this.#n.set(!1),this.#a.set(e),this.#i.set(!0)},this.#e.onerror=()=>{this.#t.set("error")},this.#e.onmessage=l=>{let r=JSON.parse(l.data);if(this.wsState()==="connect"){if(r.type!=="welcome"){this.disconnectFromMachineServer(`Unexpected message type, expected 'welcome' but got '${r.type}'`);return}let a={token:e,publicKey:"",clientVersion:Ae,protocolVersion:Oe},p=this.createResponse(r,"authportal",a);this.#t.set("welcome"),this.#e?.send(p)}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.#n.set(!0);this.#p.length>0;){let a=this.#p.pop();a&&this.#r[a.messageId]&&this.activateCommand(a)}}else if(this.wsState()==="authenticated"){if(r.type!=="command"){console.warn(`Unexpected message type, expected 'command' but got '${r.type}'`);return}let a=this.#r[r.messageId];if(a){if(r.errorMessage){a.reject(r.errorMessage);return}else{let p=JSON.parse(r.payload??"");p.body=p?.body==null?null:this.utf8Atob(p.body),a.resolve(p)}delete this.#r[r.messageId],window.clearTimeout(a.timer)}}})}disconnectFromMachineServer(e=null){e&&console.error(e),this.#e?.close(),this.#e=null,this.#t.set("disconnected"),this.#n.set(!1)}createResponse(e,o,n){let i={from:Te,to:e.from,type:o,messageId:e.messageId,payload:JSON.stringify(n)};return JSON.stringify(i)}sendCommand(e,o,n,i,l,r,u=5e3){return(this.wsState()==="disconnected"||this.wsState()==="error")&&this.connectToMachineServer(e),new Promise((a,p)=>{let m=x(),g={from:Te,to:o,type:"command",messageId:m,payload:JSON.stringify({method:n,path:i,body:l,headers:r})},y={resolve:a,reject:p,timer:window.setTimeout(()=>{let b=this.#r[m];b&&(delete this.#r[m],b.reject("Timeout"))},u)};this.#r[m]=y,this.#n()?this.activateCommand(g):this.#p.push(g)})}activateCommand(e){this.#e?.send(JSON.stringify(e))}static \u0275fac=function(o){return new(o||t)};static \u0275prov=k({token:t,factory:t.\u0275fac,providedIn:"root"})};function Ne(t){if(typeof t!="string")return null;let o=new TextEncoder().encode(t);return window.btoa(String.fromCharCode(...o))}function we(t,e,o){let n=t.relayconfigState.config();if(n===null)return o(e);let i=Ne(e.body),l={};e.headers.keys().forEach(p=>{l[p]=e.headers.get(p)??""});let r=e.headers.get("timeout"),u=r!==null?parseInt(r):t.defaultTimeout;e.url.startsWith("/api/v1/serverstate")&&e.url.includes("longpoll=true")&&(u=1e3*99);let a=t.relayWebsocket.sendCommand(n.accessToken,n.clientId,e.method,e.url,i,l,u);return new W(p=>{a.then(m=>{let S=new Z;l!=null&&Object.keys(l).forEach(y=>{S.set(y,l[y])});let g=new ee({body:m.body,status:m.code,statusText:"OK",headers:S});p.next(g),p.complete()})})}var ke=(t,e)=>{let o={relayconfigState:s(v),defaultTimeout:s(h).defaultTimeout,relayWebsocket:s(O)},n=o.relayconfigState.config();if(o.relayconfigState.configLoaded!==null&&n===null){let i=new j;return o.relayconfigState.configLoaded.subscribe(l=>{l&&we(o,t,e).subscribe(i)}),i}return we(o,t,e)};var Ee={providers:[z(),ae(Se,pe()),te(ne(),oe([ke,Re])),C,{provide:h,useValue:ve},{provide:q,useValue:be()},ue,I,he,Y,me,Q,fe,ge]};re(M,Ee);
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.0.122",
2
+ "version": "0.0.124",
3
3
  "name": "@duplicati/ngclient",
4
4
  "license": "MIT",
5
5
  "contributors": [
package/chunk-C5B4MW2I.js DELETED
@@ -1 +0,0 @@
1
- import{a as Se}from"./chunk-XHPURHO2.js";import{c as me,e as Te,h as ge,j as fe,s as R}from"./chunk-ABANCAM5.js";import{a as oe}from"./chunk-FSKPPAVO.js";import{a as ae,b as se,e as le,g as re,i as b,l as _e,p as pe,q as ue,s as ce,t as de}from"./chunk-ESAGJOZZ.js";import{h as I}from"./chunk-N5FH4YAX.js";import{a as Ce}from"./chunk-GQGMGFDX.js";import{pa as ie}from"./chunk-EBXJGPRA.js";import{Ab as j,Ac as ee,Bb as Z,Bc as te,Cb as q,Db as a,Eb as s,F as N,Fb as E,Jb as J,Pb as A,Qb as P,Qc as ne,Rb as u,Ua as r,Ub as Q,Vb as _,Wb as f,Z as m,ea as W,fa as V,gb as g,jc as c,lb as U,lc as k,mc as L,oc as O,pc as D,qc as F,ra as h,ub as T,va as p,vb as Y,wb as S,zb as x,zc as G}from"./chunk-4KE2I7OA.js";function Me(l,i){if(l&1){let n=J();a(0,"spk-radio",10),_("click",function(){let t=W(n).$implicit,o=f();return V(o.pauseOption.set(t.value))}),c(1),s()}if(l&2){let n=i.$implicit,e=f();S("active",e.pauseOption()===n.value),r(),k(" ",n.label," ")}}var Ne=[{label:$localize`5 minutes`,value:"5m"},{label:$localize`10 minutes`,value:"10m"},{label:$localize`15 minutes`,value:"15m"},{label:$localize`30 minutes`,value:"30m"},{label:$localize`1 hour`,value:"1h"},{label:$localize`4 hours`,value:"4h"},{label:$localize`8 hours`,value:"8h"},{label:$localize`24 hours`,value:"24h"},{label:$localize`Until resumed`,value:void 0}],y=class l{#e=m(I);pauseOptions=p(Ne);closed=h();isSubmitting=p(!1);pauseTransfers=p(!1);pauseOption=p(void 0);submit(){this.isSubmitting.set(!0);let i=this.pauseTransfers()||null,n=this.pauseOption();this.#e.postApiV1ServerstatePause({duration:n,pauseTransfers:i}).pipe(N(()=>this.isSubmitting.set(!1))).subscribe({next:e=>{this.closed.emit()}})}static \u0275fac=function(n){return new(n||l)};static \u0275cmp=g({type:l,selectors:[["app-pause-dialog"]],outputs:{closed:"closed"},decls:17,vars:4,consts:()=>{let i;i=$localize`Pause settings`;let n;n=$localize` Also pause transfers `;let e;e=$localize`If you pause transfers they could time out and cause retries or failures.`;let t;t=$localize`Cancel`;let o;return o=$localize` Update settings `,[i,n,e,t,o,["header",""],["content",""],[1,"radios"],[1,"primary","raised",3,"active"],[1,"check-wrap"],[1,"primary","raised",3,"click"],["type","warning"],["footer",""],["spk-button","",3,"click"],["spk-button","",1,"raised","primary",3,"click"]]},template:function(n,e){n&1&&(a(0,"header",5)(1,"h3"),u(2,0),s()(),a(3,"div",6)(4,"div",7),Z(5,Me,2,3,"spk-radio",8,j),s(),a(7,"div",9)(8,"spk-checkbox",10),_("click",function(){return e.pauseTransfers.set(!e.pauseTransfers())}),u(9,1),s(),a(10,"spk-alert",11),u(11,2),s()()(),a(12,"footer",12)(13,"button",13),_("click",function(){return e.closed.emit()}),u(14,3),s(),a(15,"button",14),_("click",function(){return e.submit()}),u(16,4),s()()),n&2&&(r(5),q(e.pauseOptions()),r(3),S("active",e.pauseTransfers()),r(7),S("loader",e.isSubmitting()))},dependencies:[R,ue,b,se],styles:["[_nghost-%COMP%]{--dialog-p: 1.5rem;display:block}h3[_ngcontent-%COMP%]{font:var(--title-30)}.radios[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.check-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:2rem 0 0}"],changeDetection:0})};var Pe={Byte:"B",KByte:"KB",MByte:"MB",GByte:"GB",TByte:"TB",PByte:"PB"},he=["kbps","mbps","gbps"],Oe=8,z=1024,v=z*1024,X=v*1024,K=X*1024,De=K*1024,ke={B:1,KB:z,MB:v,GB:X,TB:K,PB:De},w=1e3,B=w*1e3,$=B*1e3,be=[{threshold:De,unitPrefix:"PByte"},{threshold:K,unitPrefix:"TByte"},{threshold:X,unitPrefix:"GByte"},{threshold:v,unitPrefix:"MByte"},{threshold:z,unitPrefix:"KByte"},{threshold:1,unitPrefix:"Byte"}],M=class l{#e=m(I);closed=h();isSubmitting=p(!1);sizeOptions=p([...he]);maxUploadActive=p(!1);maxDownloadActive=p(!1);maxUpload=p(0);maxDownload=p(0);maxUploadUnit=p("mbps");maxDownloadUnit=p("mbps");ngOnInit(){this.init()}convertToBitsPerSecondUnits(i,n){let t=i*(ke[n.toUpperCase()]||v)*Oe;return t===0?{value:0,unit:"mbps"}:t>=$?{value:parseFloat((t/$).toFixed(2)),unit:"gbps"}:t>=B?{value:parseFloat((t/B).toFixed(2)),unit:"mbps"}:{value:parseFloat((t/w).toFixed(2)),unit:"kbps"}}convertFromBitsPerSecondUnits(i,n){let e=0;switch(n){case"gbps":e=i*$;break;case"mbps":e=i*B;break;case"kbps":e=i*w;break}let t=e/Oe;if(t===0)return{valueForApi:0,unitPrefixForApi:"Byte"};for(let{threshold:o,unitPrefix:d}of be)if(t>=o)return{valueForApi:Math.round(t/o),unitPrefixForApi:d};return{valueForApi:Math.round(t),unitPrefixForApi:"Byte"}}init(){this.#e.getApiV1Serversettings().subscribe({next:i=>{let n=i?.["max-upload-speed"],e=i?.["max-download-speed"];if(n&&n!==""){this.maxUploadActive.set(!0);let t=n.match(/^(\d+(?:\.\d+)?)([A-Za-z]+)$/);if(t){let o=parseFloat(t[1]),d=t[2],C=this.convertToBitsPerSecondUnits(o,d);this.maxUpload.set(C.value),this.maxUploadUnit.set(C.unit)}else console.warn("Unexpected max-upload-speed format from API:",n),this.resetUpload()}else this.resetUpload();if(e&&e!==""){this.maxDownloadActive.set(!0);let t=e.match(/^(\d+(?:\.\d+)?)([A-Za-z]+)$/);if(t){let o=parseFloat(t[1]),d=t[2],C=this.convertToBitsPerSecondUnits(o,d);this.maxDownload.set(C.value),this.maxDownloadUnit.set(C.unit)}else console.warn("Unexpected max-download-speed format from API:",e),this.resetDownload()}else this.resetDownload()},error:i=>{console.error("Failed to get server settings:",i),this.resetDownload(),this.resetUpload()}})}resetDownload(){this.maxDownloadActive.set(!1),this.maxDownload.set(0),this.maxDownloadUnit.set("mbps")}resetUpload(){this.maxUploadActive.set(!1),this.maxUpload.set(0),this.maxUploadUnit.set("mbps")}blockDecimalKeys(i){if([".",","].includes(i.key))return i.preventDefault()}cleanupInputAfterPasting(i){i.preventDefault();let n=i.clipboardData?.getData("text/plain");if(!n)return;let e=n.replaceAll(/[\.,]/g,"");i.target.value=e}submit(){this.isSubmitting.set(!0);let i="",n="";if(this.maxUploadActive()){let{valueForApi:e,unitPrefixForApi:t}=this.convertFromBitsPerSecondUnits(this.maxUpload(),this.maxUploadUnit()),o=Pe[t];o?i=`${e}${o}`:console.error(`Invalid unit prefix for API submission (upload): ${t}. Defaulting to empty string.`)}if(this.maxDownloadActive()){let{valueForApi:e,unitPrefixForApi:t}=this.convertFromBitsPerSecondUnits(this.maxDownload(),this.maxDownloadUnit()),o=Pe[t];o?n=`${e}${o}`:console.error(`Invalid unit prefix for API submission (download): ${t}. Defaulting to empty string.`)}this.#e.patchApiV1Serversettings({requestBody:{"max-upload-speed":i,"max-download-speed":n}}).pipe(N(()=>this.isSubmitting.set(!1))).subscribe({next:()=>{this.closed.emit(!0)},error:e=>{console.error("Failed to submit throttle settings:",e)}})}static \u0275fac=function(n){return new(n||l)};static \u0275cmp=g({type:l,selectors:[["app-throttle-settings-dialog"]],outputs:{closed:"closed"},decls:28,vars:16,consts:()=>{let i;i=$localize`Throttle network speed`;let n;n=$localize`We will round bits to the nearest byte value.`;let e;e=$localize`Cancel`;let t;return t=$localize` Update settings `,[i,n,e,t,["content",""],[1,"column"],[1,"field-row"],[1,"primary","raised",3,"click"],["type","number",3,"paste","keydown","ngModelChange","ngModel","disabled"],[3,"isClearable","options"],["type","text",3,"ngModelChange","ngModel"],["footer",""],["spk-button","",3,"click"],["spk-button","",1,"raised","primary",3,"click"]]},template:function(n,e){n&1&&(a(0,"header")(1,"h3"),u(2,0),s(),a(3,"p"),u(4,1),s()(),a(5,"div",4)(6,"div",5)(7,"div",6)(8,"label"),c(9,"Max upload speed"),s(),a(10,"spk-checkbox",7),_("click",function(){return e.maxUploadActive.set(!e.maxUploadActive())}),s(),a(11,"spk-form-field")(12,"input",8),_("paste",function(o){return e.cleanupInputAfterPasting(o)})("keydown",function(o){return e.blockDecimalKeys(o)}),F("ngModelChange",function(o){return D(e.maxUpload,o)||(e.maxUpload=o),o}),s()(),a(13,"spk-select",9)(14,"input",10),F("ngModelChange",function(o){return D(e.maxUploadUnit,o)||(e.maxUploadUnit=o),o}),s()()(),a(15,"div",6)(16,"label"),c(17,"Max download speed"),s(),a(18,"spk-checkbox",7),_("click",function(){return e.maxDownloadActive.set(!e.maxDownloadActive())}),s(),a(19,"spk-form-field")(20,"input",8),_("paste",function(o){return e.cleanupInputAfterPasting(o)})("keydown",function(o){return e.blockDecimalKeys(o)}),F("ngModelChange",function(o){return D(e.maxDownload,o)||(e.maxDownload=o),o}),s()(),a(21,"spk-select",9)(22,"input",10),F("ngModelChange",function(o){return D(e.maxDownloadUnit,o)||(e.maxDownloadUnit=o),o}),s()()()()(),a(23,"footer",11)(24,"button",12),_("click",function(){return e.closed.emit(!1)}),u(25,2),s(),a(26,"button",13),_("click",function(){return e.submit()}),u(27,3),s()()),n&2&&(r(10),S("active",e.maxUploadActive()),r(2),O("ngModel",e.maxUpload),T("disabled",!e.maxUploadActive()),r(),T("isClearable",!1)("options",e.sizeOptions()),r(),O("ngModel",e.maxUploadUnit),r(4),S("active",e.maxDownloadActive()),r(2),O("ngModel",e.maxDownload),T("disabled",!e.maxDownloadActive()),r(),T("isClearable",!1)("options",e.sizeOptions()),r(),O("ngModel",e.maxDownloadUnit),r(4),S("loader",e.isSubmitting()))},dependencies:[R,me,fe,Te,ge,_e,b,de],styles:['[_nghost-%COMP%]{display:block}h3[_ngcontent-%COMP%]{font:var(--title-30)}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;padding:1rem;gap:.5rem;margin-bottom:1rem}.column[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.field-row[_ngcontent-%COMP%]{display:grid;grid-template-areas:"label label label" "checkbox input select";grid-template-columns:auto 1fr auto;align-items:center;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{grid-area:label}.field-row[_ngcontent-%COMP%] spk-form-field[_ngcontent-%COMP%]{grid-area:input}.field-row[_ngcontent-%COMP%] spk-select[_ngcontent-%COMP%]{grid-area:select}'],changeDetection:0})};function Ie(l,i){if(l&1&&(a(0,"div"),c(1),s(),E(2,"spk-progress-bar",9)),l&2){let n=f();r(),L("",n.statusData().actionText," - ",n.statusData().statusText,""),r(),T("value",n.statusData().progress*100)}}function Re(l,i){if(l&1&&(a(0,"div",5),c(1),a(2,"spk-icon"),c(3,"clock"),s(),c(4),G(5,"relativeTime"),G(6,"date"),s()),l&2){let n,e=f();r(),k(" ",(n=e.nextBackup().backup)==null||n.Backup==null?null:n.Backup.Name," - "),r(3),L(" ",ee(5,3,e.nextBackup().time)," at ",te(6,5,e.nextBackup().time,"shortTime")," ")}}function ye(l,i){l&1&&(a(0,"div",5),u(1,1),s())}function Be(l,i){l&1&&(a(0,"div",6),A(1,2),E(2,"spk-spinner"),P(),s()),l&2&&(r(2),Y("--spinner-size","12px")("--spinner-thickness","2px"))}function ve(l,i){l&1&&(A(0,0,1),E(1,"spk-icon"),P())}function Ue(l,i){l&1&&(A(0,0,2),E(1,"spk-icon"),P())}var Fe=new Date,H=class l{#e=m(Se);#t=m(le);#n=m(oe);minsAgo=Fe.setMinutes(Fe.getMinutes()-1);statusData=this.#e.statusData;serverState=this.#e.serverState;clientIsRunning=this.#e.clientIsRunning;isResuming=this.#e.isResuming;nextBackup=ne(()=>({backup:this.serverState()?.ProposedSchedule?.[0]?.backup,time:this.serverState()?.ProposedSchedule?.[0]?.Item2}));openThrottleSettingsDialog(){this.#t.open(M,{maxWidth:"550px",width:"100%"})}openPauseDialog(){this.#t.open(y,{maxWidth:"550px",width:"100%"})}pauseResume(){if(this.clientIsRunning()){this.openPauseDialog();return}this.#e.pauseResume().subscribe()}ngAfterViewInit(){let i=this.#n.relayIsEnabled()?"longpoll":"websocket";this.#e.setConnectionMethod(i)}static \u0275fac=function(n){return new(n||l)};static \u0275cmp=g({type:l,selectors:[["app-status-bar"]],decls:14,vars:4,consts:()=>{let i;i=$localize`${"\uFFFD*9:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:pause${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Pause ${"\uFFFD/*9:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*10:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:play${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Start ${"\uFFFD/*10:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,i=Q(i);let n;n=$localize`No scheduled tasks`;let e;return e=$localize` Loading ${"\uFFFD#2\uFFFD"}:START_TAG_SPK_SPINNER:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_SPINNER:`,[i,n,e,[1,"current-backup"],[1,"current-backup-progress"],[1,"label"],[1,"label","label-loading"],[1,"current-backup-actions"],["spk-button","",3,"click"],[1,"raised","primary",3,"value"]]},template:function(n,e){if(n&1&&(a(0,"div",3)(1,"div",4),U(2,Ie,3,3)(3,Re,7,8,"div",5)(4,ye,2,0,"div",5)(5,Be,3,4,"div",6),s(),a(6,"div",7)(7,"button",8),_("click",function(){return e.pauseResume()}),A(8,0),U(9,ve,2,0)(10,Ue,2,0),P(),s(),a(11,"button",8),_("click",function(){return e.openThrottleSettingsDialog()}),a(12,"spk-icon"),c(13,"speedometer"),s()()()()),n&2){let t;r(2),x((t=e.serverState())!=null&&t.ActiveTask&&(!((t=e.statusData())==null||t.task==null)&&t.task.Status)&&((t=e.statusData())==null||t.task==null?null:t.task.Status)!=="Completed"?2:e.nextBackup().backup||e.nextBackup().time?3:(t=e.serverState())!=null&&t.ActiveTask?5:4),r(5),S("loader",e.isResuming()),r(2),x(e.clientIsRunning()?9:10)}},dependencies:[pe,Ce,ie,ae,re,ce],styles:["[_nghost-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:1rem;min-height:3.875rem;border-bottom:1px solid var(--base-4)}.current-backup[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%;gap:.5rem}.current-backup-progress[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;min-width:18.75rem}.current-backup-progress[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.current-backup-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}.label-loading[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.25rem}"],changeDetection:0})};export{H as a};