@duplicati/ngclient 0.0.235 → 0.0.236
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{chunk-xD8qjoz4.js → chunk-0pQRcAhF.js} +1 -1
- package/{chunk-BEUeHgR9.js → chunk-1DRz_1dv.js} +1 -1
- package/{chunk-C185qUb-.js → chunk-2QKZNH3T.js} +1 -1
- package/{chunk-DWCofCiP.js → chunk-3iAIXnG6.js} +9 -9
- package/{chunk-fDWfSg6Y.js → chunk-5q0UK__c.js} +1 -1
- package/{chunk-6-sszNfh.js → chunk-644SEuYO.js} +1 -1
- package/{chunk-B_I_9Y7k.js → chunk-6oGy_iFC.js} +1 -1
- package/{chunk-CFgDqLU0.js → chunk-8A93BNds.js} +1 -1
- package/{chunk-D6y9RCQD.js → chunk-9Pc-waxi.js} +1 -1
- package/{chunk-iU19kwHx.js → chunk-B20GDhu-.js} +1 -1
- package/{chunk-C1py21yb.js → chunk-B5S2d_Pm.js} +1 -1
- package/{chunk-CsVpmA6t.js → chunk-BFsdrFDX.js} +1 -1
- package/{chunk-CSrYlKTK.js → chunk-BG8y51P2.js} +1 -1
- package/{chunk-BjqgOGb9.js → chunk-BIZHZ66x.js} +1 -1
- package/{chunk-7T5O8Syb.js → chunk-BM5sEnUl.js} +1 -1
- package/{chunk-DB0aGcRM.js → chunk-BO1Nqy2x.js} +1 -1
- package/{chunk-D04TnMUn.js → chunk-BSB0qCYy.js} +1 -1
- package/{chunk-DkVHfoYw.js → chunk-BSCOyYHH.js} +1 -1
- package/{chunk-NiMN4Rl6.js → chunk-BWDCVcaP.js} +1 -1
- package/{chunk-Btvi2S15.js → chunk-BZPh4AYw.js} +1 -1
- package/chunk-Bc_wPl6H.js +1 -0
- package/{chunk-Dbq-qyNL.js → chunk-Bdg6GNH8.js} +1 -1
- package/{chunk-DBkkb6OR.js → chunk-Be4WXTyA.js} +1 -1
- package/{chunk-iGzJokt-.js → chunk-Bfg1Kjif.js} +1 -1
- package/{chunk-CGnjVnmu.js → chunk-BmOgPfpY.js} +1 -1
- package/{chunk-CxbeRJcJ.js → chunk-BpG_gjhd.js} +1 -1
- package/{chunk-CdzKkYEw.js → chunk-BszFCrvn.js} +1 -1
- package/{chunk-D5V6OY_2.js → chunk-Bx7WLGmZ.js} +1 -1
- package/{chunk-DneBfCBh.js → chunk-BxBZMjtQ.js} +1 -1
- package/{chunk-Cj_yOpND.js → chunk-BxLcE6zQ.js} +1 -1
- package/{chunk-29_4gGIi.js → chunk-Bz49u_nH.js} +1 -1
- package/{chunk-DA7rrIf8.js → chunk-BzRnxKOJ.js} +1 -1
- package/{chunk-D6IQFx6m.js → chunk-C0w3mWOI.js} +1 -1
- package/{chunk-BWvawawS.js → chunk-C1PIQTOq.js} +1 -1
- package/{chunk-BGuvkLC9.js → chunk-C8Zr0vl3.js} +1 -1
- package/{chunk-BDJqKfxm.js → chunk-C9fglVxt.js} +1 -1
- package/{chunk-B891gwjc.js → chunk-CBaqwuDY.js} +1 -1
- package/{chunk-xI8Kkqgy.js → chunk-CC4z1keD.js} +1 -1
- package/{chunk-Dv_fBX0w.js → chunk-CH0tv6BB.js} +1 -1
- package/{chunk-_OzpLe0L.js → chunk-CMLjueVV.js} +1 -1
- package/{chunk-C1-31fA7.js → chunk-CNwmuSlJ.js} +1 -1
- package/{chunk-DFLxy15J.js → chunk-COhlvPYj.js} +1 -1
- package/{chunk-D38QrkIM.js → chunk-CRhQXQUC.js} +1 -1
- package/{chunk-DSeMtMg3.js → chunk-CSPT2xlQ.js} +1 -1
- package/{chunk-D7UddV5F.js → chunk-CUlaXyK0.js} +1 -1
- package/{chunk-CnZx831x.js → chunk-CUo9Jt8-.js} +1 -1
- package/chunk-CWCU9i20.js +1 -0
- package/{chunk-CQVPqpMp.js → chunk-CYA8bL3v.js} +1 -1
- package/{chunk-3YzyUT-a.js → chunk-CZu3210D.js} +1 -1
- package/{chunk-DuRr4rDS.js → chunk-CaQaYVo7.js} +1 -1
- package/{chunk-gId840Er.js → chunk-CgrVW_eL.js} +1 -1
- package/{chunk-DYV1Pbu1.js → chunk-Ci645E9t.js} +1 -1
- package/{chunk-DKRWta24.js → chunk-CpY-WOcD.js} +2 -2
- package/{chunk-C4Uv1C-T.js → chunk-CqNJ2t71.js} +1 -1
- package/chunk-D0owcdvy.js +1 -0
- package/{chunk-C0KXp4hd.js → chunk-D39Om4Mk.js} +1 -1
- package/{chunk-ClFp7JLZ.js → chunk-D72BQ7G7.js} +1 -1
- package/{chunk-C0XQD9NK.js → chunk-DCP61JTN.js} +1 -1
- package/{chunk-CKUlUN3q.js → chunk-DF2Ac802.js} +1 -1
- package/{chunk-m8vMm7S6.js → chunk-DLYD6dRM.js} +1 -1
- package/{chunk-Cm7JSdTO.js → chunk-DM-zhIVI.js} +1 -1
- package/{chunk-D2P9ER0I.js → chunk-DOUmqK2E.js} +1 -1
- package/{chunk-B61kkU_h.js → chunk-DQ3vKQCE.js} +1 -1
- package/{chunk-CzoH_Agx.js → chunk-DR-utttZ.js} +1 -1
- package/{chunk-ayE11Iz-.js → chunk-DWyjU7VC.js} +1 -1
- package/{chunk-Bgd5lu61.js → chunk-DgUP0uNQ.js} +1 -1
- package/{chunk-BEzhTDp8.js → chunk-Dgq3OqWW.js} +1 -1
- package/{chunk-IqMUABbN.js → chunk-Djpe9Lo0.js} +1 -1
- package/{chunk-OQ_HQ9EL.js → chunk-DkT-0-DS.js} +1 -1
- package/{chunk-D9jPw9Ov.js → chunk-Dn7TWCfq.js} +1 -1
- package/{chunk-Css7wqTG.js → chunk-DxIS2uYj.js} +1 -1
- package/{chunk-DXLQftDm.js → chunk-DyDoCZiX.js} +1 -1
- package/chunk-DzP0W6ua.js +1 -0
- package/{chunk-DmCJ7w-M.js → chunk-Ied7KwvV.js} +1 -1
- package/{chunk-BJOhC2d8.js → chunk-Mj9aFt3b.js} +1 -1
- package/{chunk-DaXXLSfy.js → chunk-OEmUbdHQ.js} +1 -1
- package/{chunk-zOY5leQB.js → chunk-OpdQrdKp.js} +1 -1
- package/{chunk-CLlZiOaO.js → chunk-VrjhL6gl.js} +1 -1
- package/{chunk-CzsiJ0k-.js → chunk-Z-8b6Hyr.js} +1 -1
- package/{chunk-W1dL7dqQ.js → chunk-bJwp1ogZ.js} +2 -2
- package/{chunk-Kq2ZFJSk.js → chunk-hTxREuXu.js} +1 -1
- package/{chunk-BWSg9cLt.js → chunk-mVyxhVwu.js} +1 -1
- package/{chunk-BOKNwzSl.js → chunk-oBjabFaf.js} +1 -1
- package/{chunk-Bq_vr6Q3.js → chunk-qUlwoHQn.js} +1 -1
- package/{chunk-Brfc2m61.js → chunk-vtWJkNZ_.js} +1 -1
- package/{chunk-DHkdQ4u3.js → chunk-zcgLq6FT.js} +1 -1
- package/index.html +1 -1
- package/{main-2ZYVV4C4.js → main-X6MUEPX4.js} +2 -2
- package/package.json +1 -1
- package/chunk-BSCc2xDv.js +0 -1
- package/chunk-D4g_OF7M.js +0 -1
- package/chunk-DE8p9-HP.js +0 -1
- package/chunk-NAAMYA7J.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import {OptionsListComponent as Oe}from'./chunk-
|
|
1
|
+
import {OptionsListComponent as Oe}from'./chunk-BG8y51P2.js';import {K as Ke}from'./chunk-3iAIXnG6.js';import'./chunk-644SEuYO.js';import {Z}from'./chunk-hTxREuXu.js';import'./chunk-OpdQrdKp.js';import'./chunk-Bz49u_nH.js';import'./chunk-1DRz_1dv.js';import'./chunk-BmOgPfpY.js';import'./chunk-Mj9aFt3b.js';import'./chunk-5q0UK__c.js';import'./chunk-CaQaYVo7.js';import {N as Nt}from'./chunk-B5S2d_Pm.js';import'./chunk-CRhQXQUC.js';import'./chunk-CZu3210D.js';import'./chunk-DF2Ac802.js';import {T,e as ee,ax as W,B as w1,G as Ge,g as gw,v,a as N,Z as Zi,o as oC,W as Wl,l as lT,n as lm,w as Hg,F as Fg,d as Ig,j as jg,b as bE,c as uT,y as cm,z as vg,a3 as XC,K as Kg,O as qg,R as hC,p as qC,i as ET,P as Pd,h as aC,L as Ld,t as bD,M as MD}from'./main-X6MUEPX4.js';import'./chunk-8A93BNds.js';import'./chunk-C8Zr0vl3.js';import {F as Fe}from'./chunk-Be4WXTyA.js';import {B as Bn,Z as Ze,e as en,R as Rn,J as Jt}from'./chunk-Bfg1Kjif.js';import'./chunk-BxBZMjtQ.js';import'./chunk-qUlwoHQn.js';import'./chunk-Dn7TWCfq.js';import'./chunk-CUo9Jt8-.js';import'./chunk-DM-zhIVI.js';var oe=["formRef"],ae=()=>["--skip-files-larger-than","encryption-module","no-encryption","--no-encryption","--dbpath","keep-time","keep-versions","retention-policy"];function se(o,_){o&1&&(Zi(0,"p"),oC(1,4),Wl());}function _e(o,_){if(o&1){let e=ET();Zi(0,"p"),oC(1,5),Wl(),Zi(2,"app-timespan",21),lm("ngModelChange",function(n){Pd(e);let a=aC(2);return qC(a.optionsFields.backupRetentionTime,n)||(a.optionsFields.backupRetentionTime=n),Ld(n)}),Zi(3,"label",22),oC(4,6),Wl()(),bD();}if(o&2){let e=aC(2);bE(2),vg("customId","backupRetentionTime"),cm("ngModel",e.optionsFields.backupRetentionTime),MD();}}function le(o,_){if(o&1){let e=ET();Zi(0,"p"),oC(1,7),Wl(),Zi(2,"sh-form-field")(3,"label",23),oC(4,8),Wl(),Zi(5,"input",24),lm("ngModelChange",function(n){Pd(e);let a=aC(2);return qC(a.optionsFields.backupRetentionVersions,n)||(a.optionsFields.backupRetentionVersions=n),Ld(n)}),Wl(),bD(),Wl();}if(o&2){let e=aC(2);bE(5),cm("ngModel",e.optionsFields.backupRetentionVersions),MD();}}function re(o,_){o&1&&(Zi(0,"p"),oC(1,9),Wl());}function ce(o,_){if(o&1){let e=ET();Zi(0,"p"),oC(1,10),Wl(),Zi(2,"sh-form-field")(3,"p"),oC(4,11),Wl(),Zi(5,"label",25),oC(6,12),Wl(),Zi(7,"input",26),lm("ngModelChange",function(n){Pd(e);let a=aC(2);return qC(a.optionsFields.backupRetentionCustom,n)||(a.optionsFields.backupRetentionCustom=n),Ld(n)}),Wl(),bD(),Wl();}if(o&2){let e=aC(2);bE(7),cm("ngModel",e.optionsFields.backupRetentionCustom),MD();}}function pe(o,_){if(o&1){let e=ET();Zi(0,"sh-select",18)(1,"label",19),oC(2,3),Wl(),Zi(3,"input",20),lm("ngModelChange",function(n){Pd(e);let a=aC();return qC(a.optionsFields.backupRetention,n)||(a.optionsFields.backupRetention=n),Ld(n)}),Wl(),bD(),Wl(),lT(4,se,2,0,"p")(5,_e,5,2)(6,le,6,1)(7,re,2,0,"p")(8,ce,8,1);}if(o&2){let e=aC();vg("options",e.retentionOptions())("inlineSearch",true)("isClearable",false),bE(3),cm("ngModel",e.optionsFields.backupRetention),MD(),bE(),uT(e.optionsFields.backupRetention()==="all"?4:e.optionsFields.backupRetention()==="time"?5:e.optionsFields.backupRetention()==="versions"?6:e.optionsFields.backupRetention()==="smart"?7:e.optionsFields.backupRetention()==="custom"?8:-1);}}var de=[{value:"all",name:$localize`Keep all backups`},{value:"time",name:$localize`Delete backups that are older than`},{value:"versions",name:$localize`Keep a specific number of backups`},{value:"smart",name:$localize`Smart backup retention`},{value:"custom",name:$localize`Custom backup retention`}],y=class o{#e=T(Ke);#n=T(ee);#t=T(W);formRef=w1.required("formRef");isSubmitting=this.#e.isSubmitting;settings=this.#e.settings;optionsFields=this.#e.optionsFields;applicationOptions=this.#e.applicationOptions;isSyncMode=this.#e.isSyncMode;retentionOptions=Ge(de);goBack(){this.#n.navigate(["schedule"],{relativeTo:this.#t.parent});}submit(){switch(this.#e.validateBeforeSubmit()){case "general":this.#n.navigate(["general"],{relativeTo:this.#t.parent});return;case "destination":this.#n.navigate(["destination"],{relativeTo:this.#t.parent});return;case "source":this.#n.navigate(["source-data"],{relativeTo:this.#t.parent});return}this.#e.submit();}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=gw({type:o,selectors:[["app-advanced-options-settings"]],viewQuery:function(e,s){e&1&&qg(s.formRef,oe,5),e&2&&hC();},decls:12,vars:8,consts:()=>{let _;_=$localize`Options`;let e;e=$localize`${"\uFFFD#8\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let s;s=$localize`${"\uFFFD#11\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SH_ICON: Submit `;let n;n=$localize`Backup retention`;let a;a=$localize`Nothing will be deleted. The backup size will grow with each change.`;let b;b=$localize`If at least one newer backup is found, all backups older than this date are deleted.`;let A;A=$localize`Time to keep versions`;let k;k=$localize`Once there are more backups than the specified number, the oldest backups are deleted.`;let F;F=$localize`Number of versions`;let w;w=$localize` Over time backups will be deleted automatically. There will remain one backup for each of the last 7 days, each of the last 4 weeks, each of the last 12 months. There will always be at least one remaining backup. `;let $;$=$localize` Enter a retention strategy manually. Placeholders are D/W/Y for days/weeks/years and U for unlimited. The syntax is: 7D:1D,4W:1W,36M:1M. This example keeps one backup for each of the next 7 days, one for each of the next 4 weeks, and one for each of the next 36 months. This can also be written as 1W:1D,1M:1W,3Y:1M. `;let L;L=$localize`Once there are more backups than the specified number, the oldest backups are deleted.`;let G;return G=$localize`Retention expression`,[_,e,s,n,a,b,A,k,F,w,$,L,G,[1,"title-30"],[3,"optionsChange","options","applicationOptions","hasFreeTextSettings","hiddenOptions"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","",1,"raised","primary",3,"click"],["value","value","label","name",3,"options","inlineSearch","isClearable"],["for","size"],["type","text",3,"ngModelChange","ngModel"],[3,"ngModelChange","customId","ngModel"],["for","backupRetentionTime"],["for","backupRetentionVersions"],["type","number","id","backupRetentionVersions",3,"ngModelChange","ngModel"],["for","backupRetentionCustom"],["type","text","id","backupRetentionCustom",3,"ngModelChange","ngModel"]]},template:function(e,s){e&1&&(Zi(0,"section")(1,"h3",13),oC(2,0),Wl(),lT(3,pe,9,5),Zi(4,"app-options-list",14),lm("optionsChange",function(a){return qC(s.settings,a)||(s.settings=a),a}),Wl(),Zi(5,"div",15)(6,"button",16),Hg("click",function(){return s.goBack()}),Fg(7,1),Ig(8,"sh-icon"),jg(),Wl(),Zi(9,"button",17),Hg("click",function(){return s.submit()}),Fg(10,2),Ig(11,"sh-icon"),jg(),Wl()()()),e&2&&(bE(3),uT(s.isSyncMode()?-1:3),bE(),cm("options",s.settings),vg("applicationOptions",s.applicationOptions())("hasFreeTextSettings",true)("hiddenOptions",XC(7,ae)),bE(5),Kg("loading",s.isSubmitting()));},dependencies:[Bn,Ze,en,Rn,Jt,Oe,Z,v,N,Nt,Fe],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:37.5rem;padding:2.5rem}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding-bottom:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.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}.advanced-option[_ngcontent-%COMP%]{display:grid;gap:.5rem;grid-template-columns:1fr 1fr 2.5rem;align-items:flex-end}sh-select[_ngcontent-%COMP%]{--miw: p2r(120)}"]})};export{y as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {w}from'./chunk-
|
|
1
|
+
import {w}from'./chunk-CpY-WOcD.js';import {w as w$1}from'./chunk-vtWJkNZ_.js';import'./chunk-BG8y51P2.js';import {t as te}from'./chunk-Ied7KwvV.js';import'./chunk-CNwmuSlJ.js';import'./chunk-B20GDhu-.js';import'./chunk-2QKZNH3T.js';import {K as Ke}from'./chunk-3iAIXnG6.js';import'./chunk-644SEuYO.js';import'./chunk-hTxREuXu.js';import'./chunk-OpdQrdKp.js';import'./chunk-Bz49u_nH.js';import'./chunk-1DRz_1dv.js';import'./chunk-BmOgPfpY.js';import'./chunk-Mj9aFt3b.js';import'./chunk-5q0UK__c.js';import'./chunk-CaQaYVo7.js';import'./chunk-B5S2d_Pm.js';import'./chunk-CRhQXQUC.js';import'./chunk-CZu3210D.js';import'./chunk-DF2Ac802.js';import {T,ax as W,e as ee,G as Ge,Q as Qa,bb as k$1,g as gw,$ as lr,_ as _t,a8 as To,d as Ig,l as lT,Z as Zi,W as Wl,b as bE,c as uT,aF as JC,K as Kg,h as aC,o as oC,z as vg,a3 as XC,b0 as eb}from'./main-X6MUEPX4.js';import'./chunk-8A93BNds.js';import'./chunk-C8Zr0vl3.js';import'./chunk-Be4WXTyA.js';import'./chunk-Bfg1Kjif.js';import'./chunk-BxBZMjtQ.js';import'./chunk-qUlwoHQn.js';import'./chunk-Dn7TWCfq.js';import {L}from'./chunk-DM-zhIVI.js';import'./chunk-CUo9Jt8-.js';var b=()=>["/restore-from-files/destination"],x=()=>["/restore-from-files/encryption"],k=()=>["/restore-from-files/select-files"],J=()=>["/restore-from-files/options"],X=t=>["/restore",t,"select-files"],D=t=>["/restore",t,"options"];function z(t,i){t&1&&(Zi(0,"div",7),oC(1,0),Wl(),Zi(2,"div",7),oC(3,1),Wl(),Zi(4,"div",8),oC(5,2),Wl(),Zi(6,"div",8),oC(7,3),Wl()),t&2&&(vg("routerLink",XC(4,b)),bE(2),vg("routerLink",XC(5,x)),bE(2),vg("routerLink",XC(6,k)),bE(2),vg("routerLink",XC(7,J)));}function B(t,i){if(t&1&&(Zi(0,"div",7),oC(1,4),Wl(),Zi(2,"div",7),oC(3,5),Wl()),t&2){let e=aC(2);vg("routerLink",eb(2,X,e.backupId())),bE(2),vg("routerLink",eb(4,D,e.backupId()));}}function U(t,i){if(t&1&&(Zi(0,"sh-stepper",6),lT(1,z,8,8)(2,B,4,6),Wl()),t&2){let e=aC();bE(),uT(e.isFileRestore()?1:2);}}var P=class t{#e=T(W);#i=T(ee);#t=T(w);#n=L(this.#e.params);#o=L(this.#e.url);#s=L(this.#e.children[0].url);backupId=this.#t.backupId;isFileRestore=this.#t.isFileRestore;isFullWidthPage=Ge(false);isSelectFilesPage=Ge(false);paramsChanged=Qa(()=>{let i=this.#s(),e=this.#n()?.id,n=!!this.#o()?.find(r=>r.path==="restore-from-files"),c=!!i?.find(r=>r.path==="select-files"),R=!!i?.find(r=>r.path==="progress");this.isSelectFilesPage.set(c),this.isFullWidthPage.set(R||c),this.#t.init(e,n);});ngOnInit(){this.#i.events.subscribe(i=>{if(i instanceof k$1){let e=i.urlAfterRedirects;this.isSelectFilesPage.set(e.includes("select-files")),this.isFullWidthPage.set(e.includes("progress")||e.includes("select-files"));}});}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=gw({type:t,selectors:[["app-restore-flow"]],hostVars:4,hostBindings:function(e,n){e&2&&Kg("full-width",n.isFullWidthPage())("fill-height",n.isSelectFilesPage());},features:[JC([w,Ke])],decls:4,vars:1,consts:()=>{let i;i=$localize` Destination `;let e;e=$localize` Encryption `;let n;n=$localize` Select files `;let c;c=$localize` Options `;let R;R=$localize` Select files `;let r;return r=$localize`Options`,[i,e,n,c,R,r,[1,"primary"],["tabindex","-1","routerLinkActive","active",3,"routerLink"],["tabindex","-1","routerLinkActive","active",1,"inactive",3,"routerLink"]]},template:function(e,n){e&1&&(Ig(0,"app-status-bar"),lT(1,U,3,1,"sh-stepper",6),Zi(2,"section"),Ig(3,"router-outlet"),Wl()),e&2&&(bE(),uT(n.isFullWidthPage()?-1:1));},dependencies:[w$1,te,lr,_t,To],styles:["[_nghost-%COMP%]{display:block}.full-width[_nghost-%COMP%] section[_ngcontent-%COMP%]{max-width:62.5rem}.fill-height[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%;overflow:hidden}.fill-height[_nghost-%COMP%] section[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1 0;overflow:hidden;width:100%}sh-stepper[_ngcontent-%COMP%]{margin:2.5rem 2rem;width:calc(100% - 4rem)}section[_ngcontent-%COMP%]{max-width:31.25rem;margin:0 auto 2.5rem}@media only screen and (max-width:768px){section[_ngcontent-%COMP%]{padding:0 2rem}}.inactive[_ngcontent-%COMP%]{pointer-events:none;opacity:.5}"]})};export{P as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as at}from'./chunk-
|
|
1
|
+
import {a as at}from'./chunk-BxBZMjtQ.js';import {v}from'./chunk-qUlwoHQn.js';import {R}from'./chunk-Dn7TWCfq.js';import {T as T$1,e as ee,G as Ge,Q as Qa,g as gw,v as v$1,a0 as de,a as N,Z as Zi,w as Hg,o as oC,W as Wl,a1 as pT,n as lm,H as HC,d as Ig,b as bE,a2 as hT,y as cm,z as vg,K as Kg,a3 as XC,a4 as fT,p as qC,J as im}from'./main-X6MUEPX4.js';import {U}from'./chunk-CUo9Jt8-.js';import'./chunk-DM-zhIVI.js';var D=()=>({maxWidth:"520px",width:"100%"});function z(r,i){if(r&1&&(Zi(0,"div",11)(1,"sh-icon",26),HC(2,"check-circle"),Wl(),Zi(3,"span"),HC(4),Wl()()),r&2){let o=i.$implicit;bE(4),im(o);}}function J(r,i){if(r&1&&(Zi(0,"div",11)(1,"sh-icon",26),HC(2,"check-circle"),Wl(),Zi(3,"span"),HC(4),Wl()()),r&2){let o=i.$implicit;bE(4),im(o);}}var T=class r{#n=T$1(R);#e=T$1(ee);#t=T$1(v);hoveringConnect=Ge(false);skipDialogOpen=Ge(false);hasConnectionLink=Ge(false);primaryBenefits=[$localize`Zero-configuration cloud storage`,$localize`Centralized backup reporting and monitoring`,$localize`Remote management from the dashboard`,$localize`Notifications if backups stop running`];secondaryBenefits=[$localize`Get notified if your backups stop working`,$localize`Access AI powered troubleshooting`,$localize`View all backups from one place`];#i=Qa(()=>{let i=this.#t.state();i=="unknown"||i=="inactive"||this.setWelcomeShown();});setWelcomeShown(){this.#n.setShownWelcomePage().subscribe(()=>{this.#e.navigate([""]);});}openSkipDialog(){this.skipDialogOpen.set(true);}connect(){let i=this.hasConnectionLink()?"/welcome/connect/link":"/welcome/connect/logon";this.#e.navigate([i]);}static \u0275fac=function(o){return new(o||r)};static \u0275cmp=gw({type:r,selectors:[["app-select"]],decls:36,vars:7,consts:()=>{let i;i=$localize`Proceed without connecting to console`;let o;o=$localize`Connect to console`;let n;n=$localize`Consolidate all your backup reports in one place.`;let l;l=$localize`I have a connection link`;let c;c=$localize`Are you sure?`;let O;O=$localize`Cancel`;let b;return b=$localize`Proceed without connecting`,[i,o,n,l,c,O,b,[1,"left"],[1,"actionables"],[1,"without-connecting",3,"click"],[1,"benefits"],[1,"benefit"],["shButton","",1,"connect","outlined","primary",3,"mouseenter","mouseleave","click"],[1,"action"],[1,"connection-link-label"],[1,"primary","raised","connection-link-check",3,"checkedChange","checked"],[3,"shTooltip"],[1,"right"],["src","assets/images/console.avif","alt",""],[3,"isOpenChange","isOpen","options"],["header",""],["content",""],[1,"dialog-benefits-header"],[1,"dialog-benefits"],["footer",""],["type","button","shButton","",1,"outlined",3,"click"],[1,"primary"]]},template:function(o,n){o&1&&(Zi(0,"section",7)(1,"div",8)(2,"div",9),Hg("click",function(){return n.openSkipDialog()}),oC(3,0),Wl(),Zi(4,"div",10),pT(5,z,5,1,"div",11,fT),Wl(),Zi(7,"button",12),Hg("mouseenter",function(){return n.hoveringConnect.set(true)})("mouseleave",function(){return n.hoveringConnect.set(false)})("click",function(){return n.connect()}),Zi(8,"div",13)(9,"h2"),oC(10,1),Wl(),Zi(11,"p"),oC(12,2),Wl()()(),Zi(13,"div",14)(14,"sh-checkbox",15),lm("checkedChange",function(c){return qC(n.hasConnectionLink,c)||(n.hasConnectionLink=c),c}),Wl(),Zi(15,"span"),oC(16,3),Wl(),Zi(17,"sh-icon",16),HC(18," information "),Wl()()()(),Zi(19,"section",17),Ig(20,"img",18),Wl(),Zi(21,"sh-dialog",19),lm("isOpenChange",function(c){return qC(n.skipDialogOpen,c)||(n.skipDialogOpen=c),c}),Zi(22,"header",20)(23,"h3"),oC(24,4),Wl()(),Zi(25,"div",21)(26,"h4",22),HC(27," You can use Duplicati without a Console connection, but connecting to the Console will expand the capabilities of Duplicati. "),Wl(),Zi(28,"div",23),pT(29,J,5,1,"div",11,fT),Wl()(),Zi(31,"footer",24)(32,"button",25),Hg("click",function(){return n.skipDialogOpen.set(false)}),oC(33,5),Wl(),Zi(34,"button",25),Hg("click",function(){return n.setWelcomeShown()}),oC(35,6),Wl()()()),o&2&&(bE(5),hT(n.primaryBenefits),bE(9),cm("checked",n.hasConnectionLink),bE(3),vg("shTooltip","Connection links are used for Enterprise and large-scale installations"),bE(2),Kg("hovering",n.hoveringConnect()),bE(2),cm("isOpen",n.skipDialogOpen),vg("options",XC(6,D)),bE(8),hT(n.secondaryBenefits));},dependencies:[v$1,U,de,N,at],styles:["[_nghost-%COMP%]{display:grid;grid-template-columns:1fr 2fr;grid-template-rows:1fr;height:100vh;overflow:hidden;padding:2rem}@media only screen and (max-width:768px){[_nghost-%COMP%]{display:flex;flex-direction:column-reverse;height:auto;padding:4rem 1rem;gap:2rem}}.left[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-end;justify-content:center}@media only screen and (max-width:768px){.left[_ngcontent-%COMP%]{align-items:flex-start}}.left[_ngcontent-%COMP%] .actionables[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:1rem}@media only screen and (max-width:768px){.left[_ngcontent-%COMP%] .actionables[_ngcontent-%COMP%]{width:100%}}.left[_ngcontent-%COMP%] .actionables[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:100%}.left[_ngcontent-%COMP%] .actionables[_ngcontent-%COMP%] sh-divider[_ngcontent-%COMP%]{width:100%}.left[_ngcontent-%COMP%] .actionables[_ngcontent-%COMP%] .benefits[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.75rem;padding:1.5rem 0}.left[_ngcontent-%COMP%] .actionables[_ngcontent-%COMP%] .benefits[_ngcontent-%COMP%] .benefit[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.75rem;color:var(--base-11)}.left[_ngcontent-%COMP%] .actionables[_ngcontent-%COMP%] .benefits[_ngcontent-%COMP%] .benefit[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:1.25rem;flex-shrink:0}.left[_ngcontent-%COMP%] .actionables[_ngcontent-%COMP%] .benefits[_ngcontent-%COMP%] .benefit[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:.875rem}.right[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding:2rem 2rem 2rem 0}.right.hovering[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{border-color:var(--primary-8)}.right[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:90%;max-height:90%;object-fit:contain;border:1px solid var(--base-3);border-radius:var(--shape-2);box-shadow:var(--box-shadow-20);transition:border-color .2s ease-in-out}.connect[_ngcontent-%COMP%]{height:auto;padding:2rem}.without-connecting[_ngcontent-%COMP%]{text-decoration:underline;cursor:pointer;margin:0}.without-connecting[_ngcontent-%COMP%]:hover{color:var(--primary-8)}.dialog-benefits-header[_ngcontent-%COMP%]{margin-bottom:1rem}.dialog-benefits[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;margin-bottom:2rem}.dialog-benefits[_ngcontent-%COMP%] .benefit[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:.5rem;color:var(--base-11)}.dialog-benefits[_ngcontent-%COMP%] .benefit[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:1.25rem;flex-shrink:0}.dialog-benefits[_ngcontent-%COMP%] .benefit[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:.875rem}.connection-link-label[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:.5rem}"]})};export{T as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {K as Ke,m as mt,u as un,_ as _n,C as Ct,a as mn}from'./chunk-DWCofCiP.js';import'./chunk-6-sszNfh.js';import'./chunk-Kq2ZFJSk.js';import {I}from'./chunk-zOY5leQB.js';import'./chunk-29_4gGIi.js';import'./chunk-BEUeHgR9.js';import {J}from'./chunk-CGnjVnmu.js';import'./chunk-BJOhC2d8.js';import {G,f,A}from'./chunk-fDWfSg6Y.js';import {v as ve$1}from'./chunk-DuRr4rDS.js';import'./chunk-C1py21yb.js';import'./chunk-D38QrkIM.js';import {c}from'./chunk-3YzyUT-a.js';import'./chunk-CKUlUN3q.js';import {T,e as ee$1,ax as W,by as ve,c9 as T1,G as Ge,N as Nt,Q as Qa,g as gw,v,a as N,a0 as de$1,u as ue,al as dm,Z as Zi,w as Hg,d as Ig,W as Wl,l as lT,F as Fg,j as jg,am as GC,b as bE,c as uT,K as Kg,z as vg,O as qg,R as hC,a1 as pT,h as aC,ap as zC,a2 as hT,i as ET,P as Pd,L as Ld,H as HC,n as lm,p as qC,o as oC,t as bD,y as cm,a3 as XC,M as MD,aq as dT,aR as zl,aS as Ql,J as im}from'./main-2ZYVV4C4.js';import {f as f$1}from'./chunk-CFgDqLU0.js';import {d}from'./chunk-BGuvkLC9.js';import {F as Fe}from'./chunk-DBkkb6OR.js';import {j as jn,B as Bn,T as Tn,Z as Ze,R as Rn,P as Pn,J as Jt$1,a as Zt$1}from'./chunk-iGzJokt-.js';import'./chunk-DneBfCBh.js';import'./chunk-Bq_vr6Q3.js';import'./chunk-D9jPw9Ov.js';import'./chunk-CnZx831x.js';import'./chunk-Cm7JSdTO.js';var kt=["testUrl"],Bt=()=>({maxWidth:"700px",width:"100%"}),Vt=(o,e)=>e.uiKey;function Kt(o,e){if(o&1){let t=ET();Zi(0,"sh-card",30)(1,"div",32)(2,"h3"),oC(3,4),Wl(),Zi(4,"button",33),Hg("click",function(){Pd(t);let i=aC(3);return Ld(i.closeCustomList())}),HC(5," Cancel "),Zi(6,"sh-icon"),HC(7,"x-bold"),Wl()()(),Zi(8,"app-destination-list",34),Hg("setDestination",function(i){Pd(t);let _=aC(3);return Ld(_.setDestination(i))}),Wl()();}}function Jt(o,e){if(o&1){let t=ET();Zi(0,"div",40)(1,"sh-toggle",43),lm("checkedChange",function(i){Pd(t);let _=aC(2).$implicit;return qC(_.save,i)||(_.save=i),Ld(i)}),Zi(2,"span",44),oC(3,8),Wl()()();}if(o&2){let t=aC(2).$implicit;bE(),vg("color","primary")("variant","raised"),cm("checked",t.save);}}function Xt(o,e){if(o&1){let t=ET();Zi(0,"sh-toggle-card",31),zl(1,35),Zi(2,"app-destination-list-item",36)(3,"button",33),Hg("click",function(){Pd(t);let i=aC().$index,_=aC(2);return Ld(_.changeDestination(i))}),HC(4,"Change"),Wl(),Zi(5,"sh-menu",37),Hg("click",function(i){return i.stopPropagation()}),Zi(6,"button",38)(7,"sh-icon"),HC(8,"dots-three-vertical"),Wl()(),zl(9,39),Zi(10,"button",33),Hg("click",function(){Pd(t);let i=aC().$index,_=aC(2);return Ld(_.openTargetUrlDialog(i))}),Fg(11,5),Ig(12,"sh-icon"),jg(),Wl(),Zi(13,"button",33),Hg("click",function(){Pd(t);let i=aC().$index,_=aC(2);return Ld(_.copyTargetUrl(i))}),Fg(14,6),Ig(15,"sh-icon"),jg(),Wl(),Zi(16,"button",33),Hg("click",function(){Pd(t);let i=aC().$index,_=aC(2);return Ld(_.removeDestination(i))}),Fg(17,7),Ig(18,"sh-icon"),jg(),Wl(),Ql(),Wl()(),Ql(),lT(19,Jt,4,3,"div",40),Zi(20,"app-test-url",41,1),Hg("targetUrlChange",function(i){Pd(t);let _=aC().$index,T=aC(2);return Ld(T.updateTargetUrl(_,i))})("testSignalChange",function(i){Pd(t);let _=aC().$index,T=aC(2);return Ld(T.updateTestState(_,i))}),Wl(),Zi(22,"app-single-destination",42),Hg("targetUrlChange",function(i){Pd(t);let _=aC().$index,T=aC(2);return Ld(T.updateTargetUrl(_,i))}),Wl()();}if(o&2){let t=aC(),n=t.$implicit,i=t.$index,_=aC(2);vg("disableToggle",true)("isActive",true),bE(2),vg("targetUrl",n.url)("connectionStringId",n.connectionStringId),bE(17),uT(n.connectionStringId?-1:19),bE(),vg("targetUrl",n.url)("testSignal",_.testStates()[i]||null)("backupId",_.backupId())("connectionStringId",n.connectionStringId)("sourcePrefix",null)("suppressErrorDialogs",false)("askToCreate",true)("readOnlyTest",false)("testExpectation",_.isNew()?"destinationEmpty":"any")("moduleType","Backend"),bE(2),vg("targetUrl",n.url)("useBackupState",true);}}function zt(o,e){if(o&1&&lT(0,Kt,9,0,"sh-card",30)(1,Xt,23,17,"sh-toggle-card",31),o&2){let t=e.$index,n=aC(2);uT(n.showCustomList()&&n.currentEditingIndex()===t?0:1);}}function Ht(o,e){if(o&1&&pT(0,zt,2,1,null,null,Vt),o&2){aC();let t=zC(0);hT(t);}}function Wt(o,e){o&1&&(Zi(0,"div",45),Ig(1,"sh-progress-bar",46),Zi(2,"div",47)(3,"h3"),oC(4,9),Wl()()());}function jt(o,e){o&1&&(Zi(0,"sh-divider"),oC(1,12),Wl());}function Qt(o,e){if(o&1&&(Zi(0,"p",52),HC(1),Wl()),o&2){let t=aC().$implicit;bE(),im(t.Description);}}function qt(o,e){if(o&1&&(Zi(0,"p",52),HC(1),Wl()),o&2){let t=aC().$implicit,n=aC(4);bE(),im(n.getSimplePath(t.BaseUrl));}}function Yt(o,e){if(o&1){let t=ET();Zi(0,"app-destination-list-item",50),Hg("click",function(){let i=Pd(t).$implicit,_=aC(4);return Ld(_.selectSavedDestination(i))})("keydown.enter",function(i){return i.target.click()})("keydown.space",function(i){return i.target.click()}),Zi(1,"h3",51),HC(2),Wl(),lT(3,Qt,2,1,"p",52)(4,qt,2,1,"p",52),Wl();}if(o&2){let t=e.$implicit;vg("targetUrl",t.BaseUrl),bE(2),im(t.Name||t.BaseUrl),bE(),uT(t.Description?3:4);}}function Zt(o,e){if(o&1){let t=ET();Zi(0,"sh-card",48),Hg("click",function(){Pd(t);let i=aC(3);return Ld(i.toggleCustomList())})("keydown.enter",function(i){return i.target.click()})("keydown.space",function(i){return i.target.click()}),Zi(1,"sh-icon"),HC(2,"plus-circle"),Wl(),Zi(3,"div",47)(4,"h3"),oC(5,10),Wl(),Zi(6,"p"),oC(7,11),Wl()()(),lT(8,jt,2,0,"sh-divider"),pT(9,Yt,5,3,"app-destination-list-item",49,dT);}if(o&2){let t=aC(3);bE(8),uT(t.destinations().length>0?8:-1),bE(),hT(t.destinations());}}function te(o,e){if(o&1&&lT(0,Wt,5,0,"div",45)(1,Zt,11,1),o&2){let t=aC(2);uT(t.isLoadingDestinations()?0:1);}}function ee(o,e){o&1&&(Zi(0,"sh-divider"),oC(1,15),Wl());}function ne(o,e){if(o&1&&(Zi(0,"p",52),HC(1),Wl()),o&2){let t=aC().$implicit;bE(),im(t.Description);}}function ie(o,e){if(o&1&&(Zi(0,"p",52),HC(1),Wl()),o&2){let t=aC().$implicit,n=aC(3);bE(),im(n.getSimplePath(t.BaseUrl));}}function oe(o,e){if(o&1){let t=ET();Zi(0,"app-destination-list-item",57),Hg("click",function(){let i=Pd(t).$implicit,_=aC(3);return Ld(_.selectSavedDestination(i))}),Zi(1,"h3",51),HC(2),Wl(),lT(3,ne,2,1,"p",52)(4,ie,2,1,"p",52),Wl();}if(o&2){let t=e.$implicit;vg("targetUrl",t.BaseUrl),bE(2),im(t.Name||t.BaseUrl),bE(),uT(t.Description?3:4);}}function ae(o,e){if(o&1){let t=ET();Zi(0,"div",53)(1,"button",54),Hg("click",function(){Pd(t);let i=aC(2);return Ld(i.closeCustomList())}),Zi(2,"sh-icon"),HC(3,"arrow-left"),Wl(),HC(4," Back "),Wl()(),Zi(5,"sh-card",55),Hg("click",function(){Pd(t);let i=aC(2);return Ld(i.toggleCustomList())}),Zi(6,"sh-icon"),HC(7,"plus-circle"),Wl(),Zi(8,"div",47)(9,"h3"),oC(10,13),Wl(),Zi(11,"p"),oC(12,14),Wl()()(),lT(13,ee,2,0,"sh-divider"),pT(14,oe,5,3,"app-destination-list-item",56,dT);}if(o&2){let t=aC(2);bE(13),uT(t.destinations().length>0?13:-1),bE(),hT(t.destinations());}}function re(o,e){if(o&1){let t=ET();Zi(0,"div",53)(1,"button",54),Hg("click",function(){Pd(t);let i=aC(3);return Ld(i.closeCustomList())}),Zi(2,"sh-icon"),HC(3,"arrow-left"),Wl()(),Zi(4,"h3"),oC(5,16),Wl()();}}function se(o,e){if(o&1){let t=ET();lT(0,re,6,0,"div",53),Zi(1,"app-destination-list",34),Hg("setDestination",function(i){Pd(t);let _=aC(2);return Ld(_.setDestination(i))}),Wl();}if(o&2){let t=aC(2),n=zC(0);uT(t.destinations().length>0||n.length>0?0:-1);}}function _e(o,e){if(o&1&&lT(0,te,2,1)(1,ae,16,1)(2,se,2,1),o&2){let t=aC(),n=zC(1);uT(!t.showCustomList()&&!n&&!t.isAddingNew()?0:t.isAddingNew()&&!t.showCustomList()?1:2);}}function le(o,e){if(o&1){let t=ET();Zi(0,"div",25)(1,"button",58),Hg("click",function(){Pd(t);let i=aC();return Ld(i.startAddingNew())}),Zi(2,"sh-icon"),HC(3,"plus"),Wl(),HC(4," Add another destination "),Wl()();}}function ce(o,e){o&1&&(Zi(0,"h2"),oC(1,19),Wl());}function de(o,e){o&1&&(Zi(0,"h2"),oC(1,20),Wl());}function Ce(o,e){if(o&1){let t=ET();Zi(0,"sh-dialog",59),lm("isOpenChange",function(i){Pd(t);let _=aC();return qC(_.targetUrlDialogOpen,i)||(_.targetUrlDialogOpen=i),Ld(i)}),Zi(1,"header",60)(2,"div",61),lT(3,ce,2,0,"h2")(4,de,2,0,"h2"),Zi(5,"sh-alert",62),oC(6,17),Wl()()(),Zi(7,"div",63)(8,"sh-form-field")(9,"textarea",64),lm("ngModelChange",function(i){Pd(t);let _=aC();return qC(_.targetUrlCtrl,i)||(_.targetUrlCtrl=i),Ld(i)}),Wl(),bD(),Wl()(),Zi(10,"footer",65)(11,"button",27),Hg("click",function(){Pd(t);let i=aC();return Ld(i.closeTargetUrlDialog(false))}),HC(12,"Cancel"),Wl(),Zi(13,"button",66),Hg("click",function(){Pd(t);let i=aC();return Ld(i.closeTargetUrlDialog(true))}),Fg(14,18),Ig(15,"sh-icon"),jg(),Wl()()();}if(o&2){let t=aC(),n=zC(1);cm("isOpen",t.targetUrlDialogOpen),vg("options",XC(4,Bt)),bE(3),uT(n?4:3),bE(6),cm("ngModel",t.targetUrlCtrl),MD();}}var $=new jn,Be=(o={destinations:[]})=>$.group({destinations:$.array(o.destinations)}),Ve=({key:o,customGroup:e,dynamicGroup:t,advancedGroup:n})=>$.group({destinationType:$.control(o),custom:e,dynamic:t,advanced:n}),B=class o{#n=T(ee$1);#i=T(W);#t=T(Ke);#e=T(mt);injector=T(ve);testUrlComponents=T1();testStates=Ge([]);targetUrls=this.#t.targetUrls;targetUrlModel=Nt(()=>this.targetUrls()[0]?.url??null);targetUrlCtrl=Ge(null);targetUrlInitial=Ge(null);currentEditingIndex=Ge(null);targetUrlDialogOpen=Ge(false);showCustomList=Ge(false);isConnectionStringSaved=this.#t.isConnectionStringSaved;destinations=this.#e.destinations;isLoadingDestinations=this.#e.resourceDestinations.isLoading;isNew=this.#t.isNew;backupId=this.#t.backupId;selectedDestinationType=Nt(()=>{let e=this.targetUrlModel();return e?G(e)??null:null});isLoadingDestinationEffect=Qa(()=>{let e=this.isLoadingDestinations(),t=this.destinations(),n=this.targetUrls();!e&&t.length==0&&n.length==0&&this.toggleCustomList();});selectedDestinationTypeOption=Nt(()=>{let e=this.selectedDestinationType();return e?{key:e.customKey??e.key,customKey:e.customKey??null,displayName:e.displayName,description:e.description,sourceDescription:e.sourceDescription??null,icon:e.icon}:null});getConnectionString(e){let t=this.#e.destinations().find(n=>n.ID===e);return console.log("connection",t),t}getSimplePath(e){return e?f(e):""}copyTargetUrl(e=0){let t=this.targetUrls()[e]?.url;t&&navigator.clipboard.writeText(t);}openTargetUrlDialog(e=0){let t=this.targetUrls()[e]?.url??null;this.targetUrlCtrl.set(t),this.targetUrlInitial.set(t),this.currentEditingIndex.set(e),this.targetUrlDialogOpen.set(true);}closeTargetUrlDialog(e=false){this.targetUrlDialogOpen.set(false);let t=this.targetUrlCtrl(),n=this.targetUrlInitial();if(!e||t===n||!t)return;let i=this.currentEditingIndex();if(i!==null){let _=this.targetUrls()[i]?.connectionStringId??null,T=this.targetUrls()[i]?.urlKey??null;this.#t.updateTargetUrl(i,t,_,T);}else this.#t.setTargetUrl(t);this.currentEditingIndex.set(null);}setDestination(e){let t=A(e??"");if(!t)return;let n=t.mapper.default?t.mapper.default(this.#t.backupName()??""):`${e}://`;if(this.currentEditingIndex()!==null){this.#t.updateTargetUrl(this.currentEditingIndex(),n,null,null),this.updateTestState(this.currentEditingIndex(),null),this.currentEditingIndex.set(null),this.showCustomList.set(false);return}this.showCustomList()?(this.#t.addTargetUrl(n,null,null),this.showCustomList.set(false),this.isAddingNew.set(false)):(this.#t.addTargetUrl(n,null,null),this.showCustomList.set(false),this.isAddingNew.set(false));}targetUrlsEffect=Qa(()=>{let e=this.targetUrls();this.testStates.update(t=>{if(t.length===e.length)return t;let n=[...t];if(n.length<e.length)for(let i=n.length;i<e.length;i++)n.push(null);else n.length=e.length;return n});});selectSavedDestination(e){e.BaseUrl&&e.BaseUrl&&(this.targetUrls().length===0?this.#t.setTargetUrl(e.BaseUrl,true,e.ID,null):(this.#t.addTargetUrl(e.BaseUrl,e.ID,null),this.showCustomList.set(false),this.isAddingNew.set(false)));}toggleCustomList(){this.currentEditingIndex.set(null),this.showCustomList.set(true);}isAddingNew=Ge(false);startAddingNew(){this.isAddingNew.set(true),this.destinations().length===0&&this.showCustomList.set(true);}changeDestination(e){this.currentEditingIndex.set(e),this.showCustomList.set(true);}closeCustomList(){this.showCustomList.set(false),this.currentEditingIndex.set(null),this.isAddingNew.set(false);}removeDestination(e){this.testStates.update(t=>t.filter((n,i)=>i!==e)),this.#t.removeTargetUrl(e);}updateTargetUrl(e,t){if(!t)return;let n=this.targetUrls()[e]?.connectionStringId??null,i=this.targetUrls()[e]?.urlKey??null;this.#t.updateTargetUrl(e,t,n,i),this.updateTestState(e,null);}updateTestState(e,t){this.testStates.update(n=>{let i=[...n];return i[e]=t,i});}toggleSave(e){this.#t.toggleSaveConnectionString(e);}goBack(){this.#n.navigate(["source-data"],{relativeTo:this.#i.parent});}async next(){if(!this.#t.isNew()){this.#o();return}let t=this.testUrlComponents();this.testStates();for(let i=0;i<t.length;i++){let _=t[i],T=this.testStates()[i];if(T&&typeof T!="string"&&T.action==="success")continue;if((await _.testDestination(false))?.action!=="success")return}this.#o();}#o(){this.#t.shouldAutoSave()&&this.#t.submit(true),this.#n.navigate(["schedule"],{relativeTo:this.#i.parent});}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=gw({type:o,selectors:[["app-destination"]],viewQuery:function(t,n){t&1&&qg(n.testUrlComponents,kt,5),t&2&&hC();},decls:19,vars:9,consts:()=>{let e;e=$localize`${"\uFFFD#14\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let t;t=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let n;n=$localize`Change destination type`;let i;i=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON: Edit target URL `;let _;_=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:copy${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON: Copy URL to clipboard `;let T;T=$localize`${"\uFFFD#18\uFFFD"}:START_TAG_SH_ICON:trash${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SH_ICON: Remove `;let b;b=$localize`Save as connection string`;let V;V=$localize`Loading destinations...`;let K;K=$localize`Configure a new destination`;let J;J=$localize`Configure a one-off or new storage location.`;let X;X=$localize`Or select a saved destination`;let z;z=$localize`Configure a new destination`;let H;H=$localize`Configure a one-off or new storage location.`;let W;W=$localize`Or select a saved destination`;let j;j=$localize`Select storage type`;let Q;Q=$localize`Be careful, this will overwrite everything you have in your destination.`;let q;q=$localize` Override target URL ${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:swap${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON:`;let Y;Y=$localize`Set target URL`;let Z;return Z=$localize`Edit target URL`,[["formRef",""],["testUrl",""],e,t,n,i,_,T,b,V,K,J,X,z,H,W,j,Q,q,Y,Z,["autocomplete","off",3,"submit"],[2,"position","absolute","left","-9999px","width","1px","height","1px","overflow","hidden"],["type","text","name","fake_email","tabindex","-1"],["type","password","name","fake_password","tabindex","-1"],[1,"add-destination-container"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary",3,"disabled"],[3,"isOpen","options"],[1,"destination-card","type-c","editing"],[1,"destination-card","type-a",3,"disableToggle","isActive"],[1,"editing-header"],["shButton","","type","button",1,"small",3,"click"],[3,"setDestination"],["title",""],[3,"targetUrl","connectionStringId"],[1,"actions",3,"click"],["shButton","","type","button",1,"small","icon-only"],["menu",""],[1,"options-row",2,"margin","0 1rem 1rem 1rem"],[3,"targetUrlChange","testSignalChange","targetUrl","testSignal","backupId","connectionStringId","sourcePrefix","suppressErrorDialogs","askToCreate","readOnlyTest","testExpectation","moduleType"],[3,"targetUrlChange","targetUrl","useBackupState"],[3,"checkedChange","color","variant","checked"],["label",""],[1,"loading-list"],[1,"indeterminate","primary"],[1,"text"],["tabindex","0",1,"type-a","actionable","add-new",3,"click","keydown.enter","keydown.space"],["variant","type-a","tabindex","0",1,"actionable",3,"targetUrl"],["variant","type-a","tabindex","0",1,"actionable",3,"click","keydown.enter","keydown.space","targetUrl"],["displayName",""],["description",""],[1,"custom-list-header"],["shButton","","iconOnly","","type","button",1,"ghost",3,"click"],[1,"type-a","actionable","add-new",3,"click"],["variant","type-a",1,"actionable",3,"targetUrl"],["variant","type-a",1,"actionable",3,"click","targetUrl"],["shButton","","type","button",1,"secondary",3,"click"],[3,"isOpenChange","isOpen","options"],["header",""],[1,"target-dialog-header"],[1,"warn"],["content",""],["id","targetUrl","autocomplete","off",3,"ngModelChange","ngModel"],["footer",""],["shButton","","type","submit",1,"raised","primary",3,"click"]]},template:function(t,n){if(t&1&&(dm(0)(1),Zi(2,"form",21,0),Hg("submit",function(){return n.next()}),Zi(4,"div",22),Ig(5,"input",23)(6,"input",24),Wl(),Zi(7,"header"),lT(8,Ht,2,0),Wl(),lT(9,_e,3,1),lT(10,le,5,0,"div",25),Zi(11,"div",26)(12,"button",27),Hg("click",function(){return n.goBack()}),Fg(13,2),Ig(14,"sh-icon"),jg(),Wl(),Zi(15,"button",28),Fg(16,3),Ig(17,"sh-icon"),jg(),Wl()()(),lT(18,Ce,16,5,"sh-dialog",29)),t&2){let i=GC(n.targetUrls());bE();let _=GC(i.length>0);bE(7),uT(n.currentEditingIndex()!==null||!n.showCustomList()&&!n.isAddingNew()?8:-1),bE(),uT((!_||n.showCustomList()||n.isAddingNew())&&n.currentEditingIndex()===null?9:-1),bE(),uT(_&&!n.showCustomList()&&!n.isAddingNew()?10:-1),bE(5),Kg("loading",n.isNew()&&n.testStates().length>0&&n.testStates()[0]==="testing"),vg("disabled",!_),bE(3),uT(n.targetUrlDialogOpen()?18:-1);}},dependencies:[un,_n,Ct,mn,Bn,Tn,Ze,Rn,Pn,Jt$1,Zt$1,v,Fe,ve$1,N,de$1,ue,f$1,c,d,I,J],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:40rem;padding:2.5rem 2.5rem 0}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], header[_ngcontent-%COMP%] sh-alert[_ngcontent-%COMP%]{width:100%}header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:.5rem}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;height:100%;padding:0 0 2.5rem}.current-destination[_ngcontent-%COMP%]{margin:1rem 0 0}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between;padding-bottom:1.5rem}.most-common-destinations[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10);background-color:var(--base-2);cursor:pointer}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-10);margin:0}.target-dialog-header[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:.5rem}.loading-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;align-items:center;padding:4rem}.loading-list[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{text-align:center}.add-new[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1.5rem;background:var(--base-1);color:var(--primary-8);cursor:pointer}.add-new[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:2.5rem;opacity:.8}.actionable[_ngcontent-%COMP%]{cursor:pointer}.actionable[_ngcontent-%COMP%]:hover{--card-shp: 0}.custom-list-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;margin-bottom:.5rem}.save-connection-string[_ngcontent-%COMP%]{margin:1rem 0}sh-card.destination-card[_ngcontent-%COMP%]{padding:1.5rem}.destination-card[_ngcontent-%COMP%]{position:relative;overflow:visible}.destination-card[_ngcontent-%COMP%] app-destination-list-item[_ngcontent-%COMP%]{width:100%}.destination-card[_ngcontent-%COMP%] .card-header-content[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%}.destination-card[_ngcontent-%COMP%] .card-header-content[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0}.destination-card[_ngcontent-%COMP%] .card-header-content[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{position:static;transform:none}.destination-card[_ngcontent-%COMP%] .editing-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-bottom:1rem}.destination-card[_ngcontent-%COMP%] .editing-header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-10);margin:0}.destination-card[_ngcontent-%COMP%] sh-toggle-card[_ngcontent-%COMP%] .header{width:100%}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"]})};
|
|
1
|
+
import {K as Ke,m as mt,u as un,_ as _n,C as Ct,a as mn}from'./chunk-3iAIXnG6.js';import'./chunk-644SEuYO.js';import'./chunk-hTxREuXu.js';import {I}from'./chunk-OpdQrdKp.js';import'./chunk-Bz49u_nH.js';import'./chunk-1DRz_1dv.js';import {J}from'./chunk-BmOgPfpY.js';import'./chunk-Mj9aFt3b.js';import {G,f,A}from'./chunk-5q0UK__c.js';import {v as ve$1}from'./chunk-CaQaYVo7.js';import'./chunk-B5S2d_Pm.js';import'./chunk-CRhQXQUC.js';import {c}from'./chunk-CZu3210D.js';import'./chunk-DF2Ac802.js';import {T,e as ee$1,ax as W,by as ve,c9 as T1,G as Ge,N as Nt,Q as Qa,g as gw,v,a as N,a0 as de$1,u as ue,al as dm,Z as Zi,w as Hg,d as Ig,W as Wl,l as lT,F as Fg,j as jg,am as GC,b as bE,c as uT,K as Kg,z as vg,O as qg,R as hC,a1 as pT,h as aC,ap as zC,a2 as hT,i as ET,P as Pd,L as Ld,H as HC,n as lm,p as qC,o as oC,t as bD,y as cm,a3 as XC,M as MD,aq as dT,aR as zl,aS as Ql,J as im}from'./main-X6MUEPX4.js';import {f as f$1}from'./chunk-8A93BNds.js';import {d}from'./chunk-C8Zr0vl3.js';import {F as Fe}from'./chunk-Be4WXTyA.js';import {j as jn,B as Bn,T as Tn,Z as Ze,R as Rn,P as Pn,J as Jt$1,a as Zt$1}from'./chunk-Bfg1Kjif.js';import'./chunk-BxBZMjtQ.js';import'./chunk-qUlwoHQn.js';import'./chunk-Dn7TWCfq.js';import'./chunk-CUo9Jt8-.js';import'./chunk-DM-zhIVI.js';var kt=["testUrl"],Bt=()=>({maxWidth:"700px",width:"100%"}),Vt=(o,e)=>e.uiKey;function Kt(o,e){if(o&1){let t=ET();Zi(0,"sh-card",30)(1,"div",32)(2,"h3"),oC(3,4),Wl(),Zi(4,"button",33),Hg("click",function(){Pd(t);let i=aC(3);return Ld(i.closeCustomList())}),HC(5," Cancel "),Zi(6,"sh-icon"),HC(7,"x-bold"),Wl()()(),Zi(8,"app-destination-list",34),Hg("setDestination",function(i){Pd(t);let _=aC(3);return Ld(_.setDestination(i))}),Wl()();}}function Jt(o,e){if(o&1){let t=ET();Zi(0,"div",40)(1,"sh-toggle",43),lm("checkedChange",function(i){Pd(t);let _=aC(2).$implicit;return qC(_.save,i)||(_.save=i),Ld(i)}),Zi(2,"span",44),oC(3,8),Wl()()();}if(o&2){let t=aC(2).$implicit;bE(),vg("color","primary")("variant","raised"),cm("checked",t.save);}}function Xt(o,e){if(o&1){let t=ET();Zi(0,"sh-toggle-card",31),zl(1,35),Zi(2,"app-destination-list-item",36)(3,"button",33),Hg("click",function(){Pd(t);let i=aC().$index,_=aC(2);return Ld(_.changeDestination(i))}),HC(4,"Change"),Wl(),Zi(5,"sh-menu",37),Hg("click",function(i){return i.stopPropagation()}),Zi(6,"button",38)(7,"sh-icon"),HC(8,"dots-three-vertical"),Wl()(),zl(9,39),Zi(10,"button",33),Hg("click",function(){Pd(t);let i=aC().$index,_=aC(2);return Ld(_.openTargetUrlDialog(i))}),Fg(11,5),Ig(12,"sh-icon"),jg(),Wl(),Zi(13,"button",33),Hg("click",function(){Pd(t);let i=aC().$index,_=aC(2);return Ld(_.copyTargetUrl(i))}),Fg(14,6),Ig(15,"sh-icon"),jg(),Wl(),Zi(16,"button",33),Hg("click",function(){Pd(t);let i=aC().$index,_=aC(2);return Ld(_.removeDestination(i))}),Fg(17,7),Ig(18,"sh-icon"),jg(),Wl(),Ql(),Wl()(),Ql(),lT(19,Jt,4,3,"div",40),Zi(20,"app-test-url",41,1),Hg("targetUrlChange",function(i){Pd(t);let _=aC().$index,T=aC(2);return Ld(T.updateTargetUrl(_,i))})("testSignalChange",function(i){Pd(t);let _=aC().$index,T=aC(2);return Ld(T.updateTestState(_,i))}),Wl(),Zi(22,"app-single-destination",42),Hg("targetUrlChange",function(i){Pd(t);let _=aC().$index,T=aC(2);return Ld(T.updateTargetUrl(_,i))}),Wl()();}if(o&2){let t=aC(),n=t.$implicit,i=t.$index,_=aC(2);vg("disableToggle",true)("isActive",true),bE(2),vg("targetUrl",n.url)("connectionStringId",n.connectionStringId),bE(17),uT(n.connectionStringId?-1:19),bE(),vg("targetUrl",n.url)("testSignal",_.testStates()[i]||null)("backupId",_.backupId())("connectionStringId",n.connectionStringId)("sourcePrefix",null)("suppressErrorDialogs",false)("askToCreate",true)("readOnlyTest",false)("testExpectation",_.isNew()?"destinationEmpty":"any")("moduleType","Backend"),bE(2),vg("targetUrl",n.url)("useBackupState",true);}}function zt(o,e){if(o&1&&lT(0,Kt,9,0,"sh-card",30)(1,Xt,23,17,"sh-toggle-card",31),o&2){let t=e.$index,n=aC(2);uT(n.showCustomList()&&n.currentEditingIndex()===t?0:1);}}function Ht(o,e){if(o&1&&pT(0,zt,2,1,null,null,Vt),o&2){aC();let t=zC(0);hT(t);}}function Wt(o,e){o&1&&(Zi(0,"div",45),Ig(1,"sh-progress-bar",46),Zi(2,"div",47)(3,"h3"),oC(4,9),Wl()()());}function jt(o,e){o&1&&(Zi(0,"sh-divider"),oC(1,12),Wl());}function Qt(o,e){if(o&1&&(Zi(0,"p",52),HC(1),Wl()),o&2){let t=aC().$implicit;bE(),im(t.Description);}}function qt(o,e){if(o&1&&(Zi(0,"p",52),HC(1),Wl()),o&2){let t=aC().$implicit,n=aC(4);bE(),im(n.getSimplePath(t.BaseUrl));}}function Yt(o,e){if(o&1){let t=ET();Zi(0,"app-destination-list-item",50),Hg("click",function(){let i=Pd(t).$implicit,_=aC(4);return Ld(_.selectSavedDestination(i))})("keydown.enter",function(i){return i.target.click()})("keydown.space",function(i){return i.target.click()}),Zi(1,"h3",51),HC(2),Wl(),lT(3,Qt,2,1,"p",52)(4,qt,2,1,"p",52),Wl();}if(o&2){let t=e.$implicit;vg("targetUrl",t.BaseUrl),bE(2),im(t.Name||t.BaseUrl),bE(),uT(t.Description?3:4);}}function Zt(o,e){if(o&1){let t=ET();Zi(0,"sh-card",48),Hg("click",function(){Pd(t);let i=aC(3);return Ld(i.toggleCustomList())})("keydown.enter",function(i){return i.target.click()})("keydown.space",function(i){return i.target.click()}),Zi(1,"sh-icon"),HC(2,"plus-circle"),Wl(),Zi(3,"div",47)(4,"h3"),oC(5,10),Wl(),Zi(6,"p"),oC(7,11),Wl()()(),lT(8,jt,2,0,"sh-divider"),pT(9,Yt,5,3,"app-destination-list-item",49,dT);}if(o&2){let t=aC(3);bE(8),uT(t.destinations().length>0?8:-1),bE(),hT(t.destinations());}}function te(o,e){if(o&1&&lT(0,Wt,5,0,"div",45)(1,Zt,11,1),o&2){let t=aC(2);uT(t.isLoadingDestinations()?0:1);}}function ee(o,e){o&1&&(Zi(0,"sh-divider"),oC(1,15),Wl());}function ne(o,e){if(o&1&&(Zi(0,"p",52),HC(1),Wl()),o&2){let t=aC().$implicit;bE(),im(t.Description);}}function ie(o,e){if(o&1&&(Zi(0,"p",52),HC(1),Wl()),o&2){let t=aC().$implicit,n=aC(3);bE(),im(n.getSimplePath(t.BaseUrl));}}function oe(o,e){if(o&1){let t=ET();Zi(0,"app-destination-list-item",57),Hg("click",function(){let i=Pd(t).$implicit,_=aC(3);return Ld(_.selectSavedDestination(i))}),Zi(1,"h3",51),HC(2),Wl(),lT(3,ne,2,1,"p",52)(4,ie,2,1,"p",52),Wl();}if(o&2){let t=e.$implicit;vg("targetUrl",t.BaseUrl),bE(2),im(t.Name||t.BaseUrl),bE(),uT(t.Description?3:4);}}function ae(o,e){if(o&1){let t=ET();Zi(0,"div",53)(1,"button",54),Hg("click",function(){Pd(t);let i=aC(2);return Ld(i.closeCustomList())}),Zi(2,"sh-icon"),HC(3,"arrow-left"),Wl(),HC(4," Back "),Wl()(),Zi(5,"sh-card",55),Hg("click",function(){Pd(t);let i=aC(2);return Ld(i.toggleCustomList())}),Zi(6,"sh-icon"),HC(7,"plus-circle"),Wl(),Zi(8,"div",47)(9,"h3"),oC(10,13),Wl(),Zi(11,"p"),oC(12,14),Wl()()(),lT(13,ee,2,0,"sh-divider"),pT(14,oe,5,3,"app-destination-list-item",56,dT);}if(o&2){let t=aC(2);bE(13),uT(t.destinations().length>0?13:-1),bE(),hT(t.destinations());}}function re(o,e){if(o&1){let t=ET();Zi(0,"div",53)(1,"button",54),Hg("click",function(){Pd(t);let i=aC(3);return Ld(i.closeCustomList())}),Zi(2,"sh-icon"),HC(3,"arrow-left"),Wl()(),Zi(4,"h3"),oC(5,16),Wl()();}}function se(o,e){if(o&1){let t=ET();lT(0,re,6,0,"div",53),Zi(1,"app-destination-list",34),Hg("setDestination",function(i){Pd(t);let _=aC(2);return Ld(_.setDestination(i))}),Wl();}if(o&2){let t=aC(2),n=zC(0);uT(t.destinations().length>0||n.length>0?0:-1);}}function _e(o,e){if(o&1&&lT(0,te,2,1)(1,ae,16,1)(2,se,2,1),o&2){let t=aC(),n=zC(1);uT(!t.showCustomList()&&!n&&!t.isAddingNew()?0:t.isAddingNew()&&!t.showCustomList()?1:2);}}function le(o,e){if(o&1){let t=ET();Zi(0,"div",25)(1,"button",58),Hg("click",function(){Pd(t);let i=aC();return Ld(i.startAddingNew())}),Zi(2,"sh-icon"),HC(3,"plus"),Wl(),HC(4," Add another destination "),Wl()();}}function ce(o,e){o&1&&(Zi(0,"h2"),oC(1,19),Wl());}function de(o,e){o&1&&(Zi(0,"h2"),oC(1,20),Wl());}function Ce(o,e){if(o&1){let t=ET();Zi(0,"sh-dialog",59),lm("isOpenChange",function(i){Pd(t);let _=aC();return qC(_.targetUrlDialogOpen,i)||(_.targetUrlDialogOpen=i),Ld(i)}),Zi(1,"header",60)(2,"div",61),lT(3,ce,2,0,"h2")(4,de,2,0,"h2"),Zi(5,"sh-alert",62),oC(6,17),Wl()()(),Zi(7,"div",63)(8,"sh-form-field")(9,"textarea",64),lm("ngModelChange",function(i){Pd(t);let _=aC();return qC(_.targetUrlCtrl,i)||(_.targetUrlCtrl=i),Ld(i)}),Wl(),bD(),Wl()(),Zi(10,"footer",65)(11,"button",27),Hg("click",function(){Pd(t);let i=aC();return Ld(i.closeTargetUrlDialog(false))}),HC(12,"Cancel"),Wl(),Zi(13,"button",66),Hg("click",function(){Pd(t);let i=aC();return Ld(i.closeTargetUrlDialog(true))}),Fg(14,18),Ig(15,"sh-icon"),jg(),Wl()()();}if(o&2){let t=aC(),n=zC(1);cm("isOpen",t.targetUrlDialogOpen),vg("options",XC(4,Bt)),bE(3),uT(n?4:3),bE(6),cm("ngModel",t.targetUrlCtrl),MD();}}var $=new jn,Be=(o={destinations:[]})=>$.group({destinations:$.array(o.destinations)}),Ve=({key:o,customGroup:e,dynamicGroup:t,advancedGroup:n})=>$.group({destinationType:$.control(o),custom:e,dynamic:t,advanced:n}),B=class o{#n=T(ee$1);#i=T(W);#t=T(Ke);#e=T(mt);injector=T(ve);testUrlComponents=T1();testStates=Ge([]);targetUrls=this.#t.targetUrls;targetUrlModel=Nt(()=>this.targetUrls()[0]?.url??null);targetUrlCtrl=Ge(null);targetUrlInitial=Ge(null);currentEditingIndex=Ge(null);targetUrlDialogOpen=Ge(false);showCustomList=Ge(false);isConnectionStringSaved=this.#t.isConnectionStringSaved;destinations=this.#e.destinations;isLoadingDestinations=this.#e.resourceDestinations.isLoading;isNew=this.#t.isNew;backupId=this.#t.backupId;selectedDestinationType=Nt(()=>{let e=this.targetUrlModel();return e?G(e)??null:null});isLoadingDestinationEffect=Qa(()=>{let e=this.isLoadingDestinations(),t=this.destinations(),n=this.targetUrls();!e&&t.length==0&&n.length==0&&this.toggleCustomList();});selectedDestinationTypeOption=Nt(()=>{let e=this.selectedDestinationType();return e?{key:e.customKey??e.key,customKey:e.customKey??null,displayName:e.displayName,description:e.description,sourceDescription:e.sourceDescription??null,icon:e.icon}:null});getConnectionString(e){let t=this.#e.destinations().find(n=>n.ID===e);return console.log("connection",t),t}getSimplePath(e){return e?f(e):""}copyTargetUrl(e=0){let t=this.targetUrls()[e]?.url;t&&navigator.clipboard.writeText(t);}openTargetUrlDialog(e=0){let t=this.targetUrls()[e]?.url??null;this.targetUrlCtrl.set(t),this.targetUrlInitial.set(t),this.currentEditingIndex.set(e),this.targetUrlDialogOpen.set(true);}closeTargetUrlDialog(e=false){this.targetUrlDialogOpen.set(false);let t=this.targetUrlCtrl(),n=this.targetUrlInitial();if(!e||t===n||!t)return;let i=this.currentEditingIndex();if(i!==null){let _=this.targetUrls()[i]?.connectionStringId??null,T=this.targetUrls()[i]?.urlKey??null;this.#t.updateTargetUrl(i,t,_,T);}else this.#t.setTargetUrl(t);this.currentEditingIndex.set(null);}setDestination(e){let t=A(e??"");if(!t)return;let n=t.mapper.default?t.mapper.default(this.#t.backupName()??""):`${e}://`;if(this.currentEditingIndex()!==null){this.#t.updateTargetUrl(this.currentEditingIndex(),n,null,null),this.updateTestState(this.currentEditingIndex(),null),this.currentEditingIndex.set(null),this.showCustomList.set(false);return}this.showCustomList()?(this.#t.addTargetUrl(n,null,null),this.showCustomList.set(false),this.isAddingNew.set(false)):(this.#t.addTargetUrl(n,null,null),this.showCustomList.set(false),this.isAddingNew.set(false));}targetUrlsEffect=Qa(()=>{let e=this.targetUrls();this.testStates.update(t=>{if(t.length===e.length)return t;let n=[...t];if(n.length<e.length)for(let i=n.length;i<e.length;i++)n.push(null);else n.length=e.length;return n});});selectSavedDestination(e){e.BaseUrl&&e.BaseUrl&&(this.targetUrls().length===0?this.#t.setTargetUrl(e.BaseUrl,true,e.ID,null):(this.#t.addTargetUrl(e.BaseUrl,e.ID,null),this.showCustomList.set(false),this.isAddingNew.set(false)));}toggleCustomList(){this.currentEditingIndex.set(null),this.showCustomList.set(true);}isAddingNew=Ge(false);startAddingNew(){this.isAddingNew.set(true),this.destinations().length===0&&this.showCustomList.set(true);}changeDestination(e){this.currentEditingIndex.set(e),this.showCustomList.set(true);}closeCustomList(){this.showCustomList.set(false),this.currentEditingIndex.set(null),this.isAddingNew.set(false);}removeDestination(e){this.testStates.update(t=>t.filter((n,i)=>i!==e)),this.#t.removeTargetUrl(e);}updateTargetUrl(e,t){if(!t)return;let n=this.targetUrls()[e]?.connectionStringId??null,i=this.targetUrls()[e]?.urlKey??null;this.#t.updateTargetUrl(e,t,n,i),this.updateTestState(e,null);}updateTestState(e,t){this.testStates.update(n=>{let i=[...n];return i[e]=t,i});}toggleSave(e){this.#t.toggleSaveConnectionString(e);}goBack(){this.#n.navigate(["source-data"],{relativeTo:this.#i.parent});}async next(){if(!this.#t.isNew()){this.#o();return}let t=this.testUrlComponents();this.testStates();for(let i=0;i<t.length;i++){let _=t[i],T=this.testStates()[i];if(T&&typeof T!="string"&&T.action==="success")continue;if((await _.testDestination(false))?.action!=="success")return}this.#o();}#o(){this.#t.shouldAutoSave()&&this.#t.submit(true),this.#n.navigate(["schedule"],{relativeTo:this.#i.parent});}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=gw({type:o,selectors:[["app-destination"]],viewQuery:function(t,n){t&1&&qg(n.testUrlComponents,kt,5),t&2&&hC();},decls:19,vars:9,consts:()=>{let e;e=$localize`${"\uFFFD#14\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let t;t=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let n;n=$localize`Change destination type`;let i;i=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON: Edit target URL `;let _;_=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:copy${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON: Copy URL to clipboard `;let T;T=$localize`${"\uFFFD#18\uFFFD"}:START_TAG_SH_ICON:trash${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SH_ICON: Remove `;let b;b=$localize`Save as connection string`;let V;V=$localize`Loading destinations...`;let K;K=$localize`Configure a new destination`;let J;J=$localize`Configure a one-off or new storage location.`;let X;X=$localize`Or select a saved destination`;let z;z=$localize`Configure a new destination`;let H;H=$localize`Configure a one-off or new storage location.`;let W;W=$localize`Or select a saved destination`;let j;j=$localize`Select storage type`;let Q;Q=$localize`Be careful, this will overwrite everything you have in your destination.`;let q;q=$localize` Override target URL ${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:swap${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON:`;let Y;Y=$localize`Set target URL`;let Z;return Z=$localize`Edit target URL`,[["formRef",""],["testUrl",""],e,t,n,i,_,T,b,V,K,J,X,z,H,W,j,Q,q,Y,Z,["autocomplete","off",3,"submit"],[2,"position","absolute","left","-9999px","width","1px","height","1px","overflow","hidden"],["type","text","name","fake_email","tabindex","-1"],["type","password","name","fake_password","tabindex","-1"],[1,"add-destination-container"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary",3,"disabled"],[3,"isOpen","options"],[1,"destination-card","type-c","editing"],[1,"destination-card","type-a",3,"disableToggle","isActive"],[1,"editing-header"],["shButton","","type","button",1,"small",3,"click"],[3,"setDestination"],["title",""],[3,"targetUrl","connectionStringId"],[1,"actions",3,"click"],["shButton","","type","button",1,"small","icon-only"],["menu",""],[1,"options-row",2,"margin","0 1rem 1rem 1rem"],[3,"targetUrlChange","testSignalChange","targetUrl","testSignal","backupId","connectionStringId","sourcePrefix","suppressErrorDialogs","askToCreate","readOnlyTest","testExpectation","moduleType"],[3,"targetUrlChange","targetUrl","useBackupState"],[3,"checkedChange","color","variant","checked"],["label",""],[1,"loading-list"],[1,"indeterminate","primary"],[1,"text"],["tabindex","0",1,"type-a","actionable","add-new",3,"click","keydown.enter","keydown.space"],["variant","type-a","tabindex","0",1,"actionable",3,"targetUrl"],["variant","type-a","tabindex","0",1,"actionable",3,"click","keydown.enter","keydown.space","targetUrl"],["displayName",""],["description",""],[1,"custom-list-header"],["shButton","","iconOnly","","type","button",1,"ghost",3,"click"],[1,"type-a","actionable","add-new",3,"click"],["variant","type-a",1,"actionable",3,"targetUrl"],["variant","type-a",1,"actionable",3,"click","targetUrl"],["shButton","","type","button",1,"secondary",3,"click"],[3,"isOpenChange","isOpen","options"],["header",""],[1,"target-dialog-header"],[1,"warn"],["content",""],["id","targetUrl","autocomplete","off",3,"ngModelChange","ngModel"],["footer",""],["shButton","","type","submit",1,"raised","primary",3,"click"]]},template:function(t,n){if(t&1&&(dm(0)(1),Zi(2,"form",21,0),Hg("submit",function(){return n.next()}),Zi(4,"div",22),Ig(5,"input",23)(6,"input",24),Wl(),Zi(7,"header"),lT(8,Ht,2,0),Wl(),lT(9,_e,3,1),lT(10,le,5,0,"div",25),Zi(11,"div",26)(12,"button",27),Hg("click",function(){return n.goBack()}),Fg(13,2),Ig(14,"sh-icon"),jg(),Wl(),Zi(15,"button",28),Fg(16,3),Ig(17,"sh-icon"),jg(),Wl()()(),lT(18,Ce,16,5,"sh-dialog",29)),t&2){let i=GC(n.targetUrls());bE();let _=GC(i.length>0);bE(7),uT(n.currentEditingIndex()!==null||!n.showCustomList()&&!n.isAddingNew()?8:-1),bE(),uT((!_||n.showCustomList()||n.isAddingNew())&&n.currentEditingIndex()===null?9:-1),bE(),uT(_&&!n.showCustomList()&&!n.isAddingNew()?10:-1),bE(5),Kg("loading",n.isNew()&&n.testStates().length>0&&n.testStates()[0]==="testing"),vg("disabled",!_),bE(3),uT(n.targetUrlDialogOpen()?18:-1);}},dependencies:[un,_n,Ct,mn,Bn,Tn,Ze,Rn,Pn,Jt$1,Zt$1,v,Fe,ve$1,N,de$1,ue,f$1,c,d,I,J],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:40rem;padding:2.5rem 2.5rem 0}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], header[_ngcontent-%COMP%] sh-alert[_ngcontent-%COMP%]{width:100%}header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:.5rem}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;height:100%;padding:0 0 2.5rem}.current-destination[_ngcontent-%COMP%]{margin:1rem 0 0}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between;padding-bottom:1.5rem}.most-common-destinations[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10);background-color:var(--base-2);cursor:pointer}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-10);margin:0}.target-dialog-header[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:.5rem}.loading-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;align-items:center;padding:4rem}.loading-list[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{text-align:center}.add-new[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1.5rem;background:var(--base-1);color:var(--primary-8);cursor:pointer}.add-new[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:2.5rem;opacity:.8}.actionable[_ngcontent-%COMP%]{cursor:pointer}.actionable[_ngcontent-%COMP%]:hover{--card-shp: 0}.custom-list-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;margin-bottom:.5rem}.save-connection-string[_ngcontent-%COMP%]{margin:1rem 0}sh-card.destination-card[_ngcontent-%COMP%]{padding:1.5rem}.destination-card[_ngcontent-%COMP%]{position:relative;overflow:visible}.destination-card[_ngcontent-%COMP%] app-destination-list-item[_ngcontent-%COMP%]{width:100%}.destination-card[_ngcontent-%COMP%] .card-header-content[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%}.destination-card[_ngcontent-%COMP%] .card-header-content[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0}.destination-card[_ngcontent-%COMP%] .card-header-content[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{position:static;transform:none}.destination-card[_ngcontent-%COMP%] .editing-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-bottom:1rem}.destination-card[_ngcontent-%COMP%] .editing-header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-10);margin:0}.destination-card[_ngcontent-%COMP%] sh-toggle-card[_ngcontent-%COMP%] .header{width:100%}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"]})};
|
|
2
2
|
export{Be as createDestinationForm,Ve as createDestinationFormGroup,B as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {t as te}from'./chunk-DmCJ7w-M.js';import'./chunk-C1-31fA7.js';import'./chunk-iU19kwHx.js';import'./chunk-C185qUb-.js';import'./chunk-DuRr4rDS.js';import'./chunk-C1py21yb.js';import'./chunk-3YzyUT-a.js';import'./chunk-CKUlUN3q.js';import {T,ax as W,a5 as m,ab as J,a6 as be,G as Ge,aI as pt,N as Nt,Q as Qa,ad as sy,aG as jo,C as Zu,au as h,g as gw,v,a as N,_ as _t,d as Ig,Z as Zi,F as Fg,j as jg,W as Wl,o as oC,w as Hg,n as lm,t as bD,l as lT,b as bE,av as Vg,aw as iC,K as Kg,z as vg,x as xC,y as cm,M as MD,c as uT,p as qC,aV as ay,aW as cy,H as HC}from'./main-2ZYVV4C4.js';import'./chunk-BGuvkLC9.js';import {F as Fe}from'./chunk-DBkkb6OR.js';import {B as Bn,Z as Ze,R as Rn,J as Jt}from'./chunk-iGzJokt-.js';import {a as at}from'./chunk-DneBfCBh.js';import'./chunk-Bq_vr6Q3.js';import'./chunk-D9jPw9Ov.js';import {L,F}from'./chunk-Cm7JSdTO.js';import'./chunk-CnZx831x.js';function pe(_,t){_&1&&(Zi(0,"sh-icon",20),HC(1,"spinner"),Wl());}function he(_,t){_&1&&(Zi(0,"sh-icon",21),HC(1,"check"),Wl());}function Te(_,t){_&1&&(Zi(0,"sh-icon",22),HC(1,"warning"),Wl()),_&2&&vg("shTooltip","File not found");}function Se(_,t){let a=F(_).pipe(ay(t),cy());return L(a,{initialValue:_()})}var f=class _{#o=T(W);#s=T(m);#e=T(J);#a=T(be);#t=Ge("");backupId=L(this.#o.params.pipe(pt(t=>t.id)));activeBackup=Nt(()=>this.#s.backups().find(t=>t.Backup?.ID===this.backupId()));backupFilePath=Ge("");lastValidatedPath=Ge("");isValidatedPath=Nt(()=>this.lastValidatedPath()===this.backupFilePath());pathHasChanged=Nt(()=>this.backupFilePath()!==this.#t());isValidatingPath=Ge(false);#i=Se(this.backupFilePath,500);#n=Ge(false);isWaitingForValidation=Nt(()=>this.#i()!=this.backupFilePath()||this.isValidatingPath());backupFilePathEffect=Qa(()=>{let t=this.#i();this.activeBackup();this.#n();t!==""&&(this.isValidatingPath.set(true),sy(()=>this.#e.postApiV1FilesystemValidate({body:{path:t}})).pipe(jo(1),Zu(()=>this.isValidatingPath.set(false))).subscribe(()=>this.lastValidatedPath.set(t)));});isRestoring=Ge(false);isRepairing=Ge(false);isDeleting=Ge(false);isSavingDbPath=Ge(false);isSavingAndRepairing=Ge(false);isMovingDb=Ge(false);isCreatingBugReport=Ge(false);createdReport=Ge(false);isCompacting=Ge(false);activeBackupEffect=Qa(()=>{let t=this.activeBackup();if(!t)return;let a=t.Backup?.DBPath??"";this.backupFilePath.set(a),this.#t.set(a);});repairDatabase(){this.isRepairing.set(true),sy(()=>this.#e.postApiV1BackupByIdRepair({path:{id:this.backupId()}})).pipe(jo(1),Zu(()=>this.isRepairing.set(false))).subscribe();}deleteDatabase(t=null){this.isValidatedPath()?this.#a.open(h,{data:{title:$localize`Confirm delete?`,message:$localize`Do you really want to delete the database for ${this.activeBackup()?.Backup?.Name}?`,confirmText:$localize`Delete database`,cancelText:$localize`Cancel`},closed:a=>{a&&this.doDeleteDatabase(t);}}):this.doDeleteDatabase(t);}doDeleteDatabase(t=null){this.isDeleting.set(true),sy(()=>this.#e.postApiV1BackupByIdDeletedb({path:{id:this.backupId()}})).pipe(jo(1),Zu(()=>this.isDeleting.set(false))).subscribe(()=>{this.lastValidatedPath.set(""),t?.();});}restoreDatabase(){this.isValidatedPath()?this.deleteDatabase(()=>{this.doRepairDatabase();}):this.doRepairDatabase();}doRepairDatabase(){this.isRestoring.set(true),sy(()=>this.#e.postApiV1BackupByIdRepair({path:{id:this.backupId()},body:{}})).pipe(jo(1),Zu(()=>this.isRestoring.set(false))).subscribe();}resetDatabasePath(){this.backupFilePath.set(this.#t());}saveDatabasePath(t=null){this.isValidatedPath()?this.#a.open(h,{data:{title:$localize`Confirm reassign?`,message:$localize`The target database path already exists and may belong to another backup. Are you sure you want to assign this backup to an existing database?`,confirmText:$localize`Assign existing database`,cancelText:$localize`Cancel`},closed:a=>{a&&this.doSaveDatabasePath(t);}}):this.doSaveDatabasePath(t);}doSaveDatabasePath(t=null){this.isSavingDbPath.set(true);let a=this.backupFilePath();sy(()=>this.#e.postApiV1BackupByIdUpdatedb({path:{id:this.backupId()},body:{path:a}})).pipe(Zu(()=>this.isSavingDbPath.set(false))).subscribe(()=>{this.#t.set(a),t?.();});}saveAndRepairDatabasePath(){this.saveDatabasePath(()=>(this.isSavingAndRepairing.set(true),sy(()=>this.#e.postApiV1BackupByIdRepair({path:{id:this.backupId()}})).pipe(jo(1),Zu(()=>this.isSavingAndRepairing.set(false))).subscribe()));}moveDatabasePath(){this.isMovingDb.set(true);let t=this.backupFilePath();sy(()=>this.#e.postApiV1BackupByIdMovedb({path:{id:this.backupId()},body:{path:t}})).pipe(Zu(()=>this.isMovingDb.set(false))).subscribe(()=>{this.#n.update(a=>!a),this.#t.set(t);});}createErrorReport(){this.isCreatingBugReport.set(true),sy(()=>this.#e.postApiV1BackupByIdCreatereport({path:{id:this.backupId()}})).pipe(Zu(()=>this.isCreatingBugReport.set(false))).subscribe({next:()=>{this.createdReport.set(true),window.setTimeout(()=>this.createdReport.set(false),3e3);}});}compactDatabase(){this.isCompacting.set(true),sy(()=>this.#e.postApiV1BackupByIdCompact({path:{id:this.backupId()}})).pipe(Zu(()=>this.isCompacting.set(false))).subscribe();}static \u0275fac=function(a){return new(a||_)};static \u0275cmp=gw({type:_,selectors:[["app-database"]],decls:53,vars:24,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let a;a=$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 r;r=$localize`Maintenance`;let g;g=$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. The bug report button can be used to create a copy of the database with path information removed. This should only be used if a developer requests to investigate an issue with your database. `;let I;I=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:wrench${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Repair `;let M;M=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:trash${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON: Delete `;let R;R=$localize`${"\uFFFD#25\uFFFD"}:START_TAG_SH_ICON:clock-counter-clockwise${"\uFFFD/#25\uFFFD"}:CLOSE_TAG_SH_ICON: Recreate (delete and repair) `;let B;B=$localize`${"\uFFFD#28\uFFFD"}:START_TAG_SH_ICON:file-plus${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SH_ICON: Create bug report database `;let O;O=$localize`${"\uFFFD#31\uFFFD"}:START_TAG_SH_ICON:file-archive${"\uFFFD/#31\uFFFD"}:CLOSE_TAG_SH_ICON: Compact `;let $;$=$localize`Placement`;let v;v=$localize`${"\uFFFD#43\uFFFD"}:START_TAG_SH_ICON:backspace${"\uFFFD/#43\uFFFD"}:CLOSE_TAG_SH_ICON: Reset `;let k;k=$localize`${"\uFFFD#46\uFFFD"}:START_TAG_SH_ICON:floppy-disk${"\uFFFD/#46\uFFFD"}:CLOSE_TAG_SH_ICON: Save `;let y;y=$localize`${"\uFFFD#49\uFFFD"}:START_TAG_SH_ICON:wrench${"\uFFFD/#49\uFFFD"}:CLOSE_TAG_SH_ICON: Save & Repair `;let G;return G=$localize`${"\uFFFD#52\uFFFD"}:START_TAG_SH_ICON:flow-arrow${"\uFFFD/#52\uFFFD"}:CLOSE_TAG_SH_ICON: Move existing database `,[t,a,e,r,g,I,M,R,B,O,$,v,k,y,G,[1,"back"],["type","button","shButton","","routerLink","/",1,"small"],[1,"actions","maintenance"],["shButton","",3,"click","disabled"],["type","text",3,"ngModelChange","ngModel"],["prefix","",1,"primary"],["prefix",""],["prefix","",3,"shTooltip"],[1,"actions","placement"]]},template:function(a,e){a&1&&(Ig(0,"app-status-bar"),Zi(1,"section")(2,"div",15)(3,"button",16),Fg(4,0),Ig(5,"sh-icon"),jg(),Wl()(),Zi(6,"article")(7,"h1"),oC(8,1),Wl(),Zi(9,"p"),oC(10,2),Wl()(),Zi(11,"article")(12,"h2"),oC(13,3),Wl(),Zi(14,"p"),oC(15,4),Wl(),Zi(16,"div",17)(17,"button",18),Hg("click",function(){return e.repairDatabase()}),Fg(18,5),Ig(19,"sh-icon"),jg(),Wl(),Zi(20,"button",18),Hg("click",function(){return e.deleteDatabase()}),Fg(21,6),Ig(22,"sh-icon"),jg(),Wl(),Zi(23,"button",18),Hg("click",function(){return e.restoreDatabase()}),Fg(24,7),Ig(25,"sh-icon"),jg(),Wl(),Zi(26,"button",18),Hg("click",function(){return e.createErrorReport()}),Fg(27,8),Ig(28,"sh-icon"),jg(),Wl(),Zi(29,"button",18),Hg("click",function(){return e.compactDatabase()}),Fg(30,9),Ig(31,"sh-icon"),jg(),Wl()()(),Zi(32,"article")(33,"h2"),oC(34,10),Wl(),Zi(35,"sh-form-field")(36,"input",19),lm("ngModelChange",function(g){return qC(e.backupFilePath,g)||(e.backupFilePath=g),g}),Wl(),bD(),lT(37,pe,2,0,"sh-icon",20)(38,he,2,0,"sh-icon",21)(39,Te,2,1,"sh-icon",22),Wl(),Zi(40,"div",23)(41,"button",18),Hg("click",function(){return e.resetDatabasePath()}),Fg(42,11),Ig(43,"sh-icon"),jg(),Wl(),Zi(44,"button",18),Hg("click",function(){return e.saveDatabasePath()}),Fg(45,12),Ig(46,"sh-icon"),jg(),Wl(),Zi(47,"button",18),Hg("click",function(){return e.saveAndRepairDatabasePath()}),Fg(48,13),Ig(49,"sh-icon"),jg(),Wl(),Zi(50,"button",18),Hg("click",function(){return e.moveDatabasePath()}),Fg(51,14),Ig(52,"sh-icon"),jg(),Wl()()()()),a&2&&(bE(8),Vg(e.activeBackup()?.Backup?.Name),iC(8),bE(9),Kg("loading",e.isRepairing()),vg("disabled",!e.isValidatedPath()||e.pathHasChanged()),bE(3),Kg("loading",e.isDeleting()),vg("disabled",!e.isValidatedPath()||e.pathHasChanged()),bE(3),Kg("loading",e.isRestoring()),vg("disabled",e.pathHasChanged()),bE(3),Kg("loading",e.isCreatingBugReport()),vg("disabled",e.isCreatingBugReport()||!e.isValidatedPath()||e.pathHasChanged()),bE(3),Kg("loading",e.isCompacting()),vg("disabled",e.isCompacting()||!e.isValidatedPath()||e.pathHasChanged()),bE(6),xC(e.isValidatedPath()?"success":"error"),bE(),cm("ngModel",e.backupFilePath),MD(),bE(),uT(e.isWaitingForValidation()?37:e.isValidatedPath()?38:39),bE(4),vg("disabled",!e.pathHasChanged()),bE(3),vg("disabled",!e.pathHasChanged()||e.isWaitingForValidation()),bE(3),vg("disabled",!e.pathHasChanged()||e.isWaitingForValidation()),bE(3),vg("disabled",!e.pathHasChanged()||e.isValidatedPath()||e.isWaitingForValidation()));},dependencies:[Bn,Ze,Rn,Jt,te,v,Fe,N,at,_t],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}"]})};export{f as default};
|
|
1
|
+
import {t as te}from'./chunk-Ied7KwvV.js';import'./chunk-CNwmuSlJ.js';import'./chunk-B20GDhu-.js';import'./chunk-2QKZNH3T.js';import'./chunk-CaQaYVo7.js';import'./chunk-B5S2d_Pm.js';import'./chunk-CZu3210D.js';import'./chunk-DF2Ac802.js';import {T,ax as W,a5 as m,ab as J,a6 as be,G as Ge,aI as pt,N as Nt,Q as Qa,ad as sy,aG as jo,C as Zu,au as h,g as gw,v,a as N,_ as _t,d as Ig,Z as Zi,F as Fg,j as jg,W as Wl,o as oC,w as Hg,n as lm,t as bD,l as lT,b as bE,av as Vg,aw as iC,K as Kg,z as vg,x as xC,y as cm,M as MD,c as uT,p as qC,aV as ay,aW as cy,H as HC}from'./main-X6MUEPX4.js';import'./chunk-C8Zr0vl3.js';import {F as Fe}from'./chunk-Be4WXTyA.js';import {B as Bn,Z as Ze,R as Rn,J as Jt}from'./chunk-Bfg1Kjif.js';import {a as at}from'./chunk-BxBZMjtQ.js';import'./chunk-qUlwoHQn.js';import'./chunk-Dn7TWCfq.js';import {L,F}from'./chunk-DM-zhIVI.js';import'./chunk-CUo9Jt8-.js';function pe(_,t){_&1&&(Zi(0,"sh-icon",20),HC(1,"spinner"),Wl());}function he(_,t){_&1&&(Zi(0,"sh-icon",21),HC(1,"check"),Wl());}function Te(_,t){_&1&&(Zi(0,"sh-icon",22),HC(1,"warning"),Wl()),_&2&&vg("shTooltip","File not found");}function Se(_,t){let a=F(_).pipe(ay(t),cy());return L(a,{initialValue:_()})}var f=class _{#o=T(W);#s=T(m);#e=T(J);#a=T(be);#t=Ge("");backupId=L(this.#o.params.pipe(pt(t=>t.id)));activeBackup=Nt(()=>this.#s.backups().find(t=>t.Backup?.ID===this.backupId()));backupFilePath=Ge("");lastValidatedPath=Ge("");isValidatedPath=Nt(()=>this.lastValidatedPath()===this.backupFilePath());pathHasChanged=Nt(()=>this.backupFilePath()!==this.#t());isValidatingPath=Ge(false);#i=Se(this.backupFilePath,500);#n=Ge(false);isWaitingForValidation=Nt(()=>this.#i()!=this.backupFilePath()||this.isValidatingPath());backupFilePathEffect=Qa(()=>{let t=this.#i();this.activeBackup();this.#n();t!==""&&(this.isValidatingPath.set(true),sy(()=>this.#e.postApiV1FilesystemValidate({body:{path:t}})).pipe(jo(1),Zu(()=>this.isValidatingPath.set(false))).subscribe(()=>this.lastValidatedPath.set(t)));});isRestoring=Ge(false);isRepairing=Ge(false);isDeleting=Ge(false);isSavingDbPath=Ge(false);isSavingAndRepairing=Ge(false);isMovingDb=Ge(false);isCreatingBugReport=Ge(false);createdReport=Ge(false);isCompacting=Ge(false);activeBackupEffect=Qa(()=>{let t=this.activeBackup();if(!t)return;let a=t.Backup?.DBPath??"";this.backupFilePath.set(a),this.#t.set(a);});repairDatabase(){this.isRepairing.set(true),sy(()=>this.#e.postApiV1BackupByIdRepair({path:{id:this.backupId()}})).pipe(jo(1),Zu(()=>this.isRepairing.set(false))).subscribe();}deleteDatabase(t=null){this.isValidatedPath()?this.#a.open(h,{data:{title:$localize`Confirm delete?`,message:$localize`Do you really want to delete the database for ${this.activeBackup()?.Backup?.Name}?`,confirmText:$localize`Delete database`,cancelText:$localize`Cancel`},closed:a=>{a&&this.doDeleteDatabase(t);}}):this.doDeleteDatabase(t);}doDeleteDatabase(t=null){this.isDeleting.set(true),sy(()=>this.#e.postApiV1BackupByIdDeletedb({path:{id:this.backupId()}})).pipe(jo(1),Zu(()=>this.isDeleting.set(false))).subscribe(()=>{this.lastValidatedPath.set(""),t?.();});}restoreDatabase(){this.isValidatedPath()?this.deleteDatabase(()=>{this.doRepairDatabase();}):this.doRepairDatabase();}doRepairDatabase(){this.isRestoring.set(true),sy(()=>this.#e.postApiV1BackupByIdRepair({path:{id:this.backupId()},body:{}})).pipe(jo(1),Zu(()=>this.isRestoring.set(false))).subscribe();}resetDatabasePath(){this.backupFilePath.set(this.#t());}saveDatabasePath(t=null){this.isValidatedPath()?this.#a.open(h,{data:{title:$localize`Confirm reassign?`,message:$localize`The target database path already exists and may belong to another backup. Are you sure you want to assign this backup to an existing database?`,confirmText:$localize`Assign existing database`,cancelText:$localize`Cancel`},closed:a=>{a&&this.doSaveDatabasePath(t);}}):this.doSaveDatabasePath(t);}doSaveDatabasePath(t=null){this.isSavingDbPath.set(true);let a=this.backupFilePath();sy(()=>this.#e.postApiV1BackupByIdUpdatedb({path:{id:this.backupId()},body:{path:a}})).pipe(Zu(()=>this.isSavingDbPath.set(false))).subscribe(()=>{this.#t.set(a),t?.();});}saveAndRepairDatabasePath(){this.saveDatabasePath(()=>(this.isSavingAndRepairing.set(true),sy(()=>this.#e.postApiV1BackupByIdRepair({path:{id:this.backupId()}})).pipe(jo(1),Zu(()=>this.isSavingAndRepairing.set(false))).subscribe()));}moveDatabasePath(){this.isMovingDb.set(true);let t=this.backupFilePath();sy(()=>this.#e.postApiV1BackupByIdMovedb({path:{id:this.backupId()},body:{path:t}})).pipe(Zu(()=>this.isMovingDb.set(false))).subscribe(()=>{this.#n.update(a=>!a),this.#t.set(t);});}createErrorReport(){this.isCreatingBugReport.set(true),sy(()=>this.#e.postApiV1BackupByIdCreatereport({path:{id:this.backupId()}})).pipe(Zu(()=>this.isCreatingBugReport.set(false))).subscribe({next:()=>{this.createdReport.set(true),window.setTimeout(()=>this.createdReport.set(false),3e3);}});}compactDatabase(){this.isCompacting.set(true),sy(()=>this.#e.postApiV1BackupByIdCompact({path:{id:this.backupId()}})).pipe(Zu(()=>this.isCompacting.set(false))).subscribe();}static \u0275fac=function(a){return new(a||_)};static \u0275cmp=gw({type:_,selectors:[["app-database"]],decls:53,vars:24,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let a;a=$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 r;r=$localize`Maintenance`;let g;g=$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. The bug report button can be used to create a copy of the database with path information removed. This should only be used if a developer requests to investigate an issue with your database. `;let I;I=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:wrench${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Repair `;let M;M=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:trash${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON: Delete `;let R;R=$localize`${"\uFFFD#25\uFFFD"}:START_TAG_SH_ICON:clock-counter-clockwise${"\uFFFD/#25\uFFFD"}:CLOSE_TAG_SH_ICON: Recreate (delete and repair) `;let B;B=$localize`${"\uFFFD#28\uFFFD"}:START_TAG_SH_ICON:file-plus${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SH_ICON: Create bug report database `;let O;O=$localize`${"\uFFFD#31\uFFFD"}:START_TAG_SH_ICON:file-archive${"\uFFFD/#31\uFFFD"}:CLOSE_TAG_SH_ICON: Compact `;let $;$=$localize`Placement`;let v;v=$localize`${"\uFFFD#43\uFFFD"}:START_TAG_SH_ICON:backspace${"\uFFFD/#43\uFFFD"}:CLOSE_TAG_SH_ICON: Reset `;let k;k=$localize`${"\uFFFD#46\uFFFD"}:START_TAG_SH_ICON:floppy-disk${"\uFFFD/#46\uFFFD"}:CLOSE_TAG_SH_ICON: Save `;let y;y=$localize`${"\uFFFD#49\uFFFD"}:START_TAG_SH_ICON:wrench${"\uFFFD/#49\uFFFD"}:CLOSE_TAG_SH_ICON: Save & Repair `;let G;return G=$localize`${"\uFFFD#52\uFFFD"}:START_TAG_SH_ICON:flow-arrow${"\uFFFD/#52\uFFFD"}:CLOSE_TAG_SH_ICON: Move existing database `,[t,a,e,r,g,I,M,R,B,O,$,v,k,y,G,[1,"back"],["type","button","shButton","","routerLink","/",1,"small"],[1,"actions","maintenance"],["shButton","",3,"click","disabled"],["type","text",3,"ngModelChange","ngModel"],["prefix","",1,"primary"],["prefix",""],["prefix","",3,"shTooltip"],[1,"actions","placement"]]},template:function(a,e){a&1&&(Ig(0,"app-status-bar"),Zi(1,"section")(2,"div",15)(3,"button",16),Fg(4,0),Ig(5,"sh-icon"),jg(),Wl()(),Zi(6,"article")(7,"h1"),oC(8,1),Wl(),Zi(9,"p"),oC(10,2),Wl()(),Zi(11,"article")(12,"h2"),oC(13,3),Wl(),Zi(14,"p"),oC(15,4),Wl(),Zi(16,"div",17)(17,"button",18),Hg("click",function(){return e.repairDatabase()}),Fg(18,5),Ig(19,"sh-icon"),jg(),Wl(),Zi(20,"button",18),Hg("click",function(){return e.deleteDatabase()}),Fg(21,6),Ig(22,"sh-icon"),jg(),Wl(),Zi(23,"button",18),Hg("click",function(){return e.restoreDatabase()}),Fg(24,7),Ig(25,"sh-icon"),jg(),Wl(),Zi(26,"button",18),Hg("click",function(){return e.createErrorReport()}),Fg(27,8),Ig(28,"sh-icon"),jg(),Wl(),Zi(29,"button",18),Hg("click",function(){return e.compactDatabase()}),Fg(30,9),Ig(31,"sh-icon"),jg(),Wl()()(),Zi(32,"article")(33,"h2"),oC(34,10),Wl(),Zi(35,"sh-form-field")(36,"input",19),lm("ngModelChange",function(g){return qC(e.backupFilePath,g)||(e.backupFilePath=g),g}),Wl(),bD(),lT(37,pe,2,0,"sh-icon",20)(38,he,2,0,"sh-icon",21)(39,Te,2,1,"sh-icon",22),Wl(),Zi(40,"div",23)(41,"button",18),Hg("click",function(){return e.resetDatabasePath()}),Fg(42,11),Ig(43,"sh-icon"),jg(),Wl(),Zi(44,"button",18),Hg("click",function(){return e.saveDatabasePath()}),Fg(45,12),Ig(46,"sh-icon"),jg(),Wl(),Zi(47,"button",18),Hg("click",function(){return e.saveAndRepairDatabasePath()}),Fg(48,13),Ig(49,"sh-icon"),jg(),Wl(),Zi(50,"button",18),Hg("click",function(){return e.moveDatabasePath()}),Fg(51,14),Ig(52,"sh-icon"),jg(),Wl()()()()),a&2&&(bE(8),Vg(e.activeBackup()?.Backup?.Name),iC(8),bE(9),Kg("loading",e.isRepairing()),vg("disabled",!e.isValidatedPath()||e.pathHasChanged()),bE(3),Kg("loading",e.isDeleting()),vg("disabled",!e.isValidatedPath()||e.pathHasChanged()),bE(3),Kg("loading",e.isRestoring()),vg("disabled",e.pathHasChanged()),bE(3),Kg("loading",e.isCreatingBugReport()),vg("disabled",e.isCreatingBugReport()||!e.isValidatedPath()||e.pathHasChanged()),bE(3),Kg("loading",e.isCompacting()),vg("disabled",e.isCompacting()||!e.isValidatedPath()||e.pathHasChanged()),bE(6),xC(e.isValidatedPath()?"success":"error"),bE(),cm("ngModel",e.backupFilePath),MD(),bE(),uT(e.isWaitingForValidation()?37:e.isValidatedPath()?38:39),bE(4),vg("disabled",!e.pathHasChanged()),bE(3),vg("disabled",!e.pathHasChanged()||e.isWaitingForValidation()),bE(3),vg("disabled",!e.pathHasChanged()||e.isWaitingForValidation()),bE(3),vg("disabled",!e.pathHasChanged()||e.isValidatedPath()||e.isWaitingForValidation()));},dependencies:[Bn,Ze,Rn,Jt,te,v,Fe,N,at,_t],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}"]})};export{f as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {c}from'./chunk-
|
|
1
|
+
import {c}from'./chunk-9Pc-waxi.js';import {v as ve}from'./chunk-CaQaYVo7.js';import {x}from'./chunk-CRhQXQUC.js';import'./chunk-Be4WXTyA.js';import {T,e as ee,G as Ge,bb as k,g as gw,v,a as N,$ as lr,a8 as To,_ as _t,Z as Zi,F as Fg,d as Ig,j as jg,W as Wl,l as lT,b as bE,c as uT,i as ET,o as oC,aR as zl,w as Hg,P as Pd,h as aC,L as Ld,aS as Ql,z as vg,av as Vg,aw as iC}from'./main-X6MUEPX4.js';function W(u,S){if(u&1){let n=ET();Zi(0,"sh-menu",16)(1,"button",17),oC(2,2),Wl(),zl(3,18),Zi(4,"button",19),Hg("click",function(){Pd(n);let e=aC();return Ld(e.updateLogLevel("Disabled"))}),Fg(5,3),Ig(6,"sh-icon"),jg(),Wl(),Zi(7,"button",19),Hg("click",function(){Pd(n);let e=aC();return Ld(e.updateLogLevel("Verbose"))}),Fg(8,4),Ig(9,"sh-icon"),jg(),Wl(),Zi(10,"button",19),Hg("click",function(){Pd(n);let e=aC();return Ld(e.updateLogLevel("ExplicitOnly"))}),Fg(11,5),Ig(12,"sh-icon"),jg(),Wl(),Zi(13,"button",19),Hg("click",function(){Pd(n);let e=aC();return Ld(e.updateLogLevel("Profiling"))}),Fg(14,6),Ig(15,"sh-icon"),jg(),Wl(),Zi(16,"button",19),Hg("click",function(){Pd(n);let e=aC();return Ld(e.updateLogLevel("Retry"))}),Fg(17,7),Ig(18,"sh-icon"),jg(),Wl(),Zi(19,"button",19),Hg("click",function(){Pd(n);let e=aC();return Ld(e.updateLogLevel("Information"))}),Fg(20,8),Ig(21,"sh-icon"),jg(),Wl(),Zi(22,"button",19),Hg("click",function(){Pd(n);let e=aC();return Ld(e.updateLogLevel("DryRun"))}),Fg(23,9),Ig(24,"sh-icon"),jg(),Wl(),Zi(25,"button",19),Hg("click",function(){Pd(n);let e=aC();return Ld(e.updateLogLevel("Warning"))}),Fg(26,10),Ig(27,"sh-icon"),jg(),Wl(),Zi(28,"button",19),Hg("click",function(){Pd(n);let e=aC();return Ld(e.updateLogLevel("Error"))}),Fg(29,11),Ig(30,"sh-icon"),jg(),Wl(),Ql(),Wl();}if(u&2){let n=aC();vg("openIndicator",true),bE(2),Vg(n.logLevelByLabel()),iC(2);}}var O=class u{#n=T(ee);#e=T(c);logLevel=this.#e.logLevel;logLevelByLabel=this.#e.logLevelByLabel;currentUrl=Ge(this.#n.url);constructor(){this.#n.events.subscribe(S=>{S instanceof k&&this.currentUrl.set(S.urlAfterRedirects);});}updateLogLevel(S){this.#e.isPolling.set(true),this.#e.updateLogLevel(S);}static \u0275fac=function(n){return new(n||u)};static \u0275cmp=gw({type:u,selectors:[["app-logs"]],decls:10,vars:1,consts:()=>{let S;S=$localize`${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:archive${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON: Stored `;let n;n=$localize`${"\uFFFD#7\uFFFD"}:START_TAG_SH_ICON:play${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SH_ICON: Live `;let o;o=$localize`Log level: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let e;e=$localize`${"\uFFFD#6\uFFFD"}:START_TAG_SH_ICON:bell-simple-slash${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SH_ICON: Disabled `;let E;E=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SH_ICON:megaphone-simple${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SH_ICON: Verbose `;let L;L=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:flow-arrow${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON: Explicit only `;let N;N=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:speedometer${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON: Profiling `;let I;I=$localize`${"\uFFFD#18\uFFFD"}:START_TAG_SH_ICON:arrow-arc-left${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SH_ICON: Retry `;let d;d=$localize`${"\uFFFD#21\uFFFD"}:START_TAG_SH_ICON:info${"\uFFFD/#21\uFFFD"}:CLOSE_TAG_SH_ICON: Information `;let h;h=$localize`${"\uFFFD#24\uFFFD"}:START_TAG_SH_ICON:person-simple-run${"\uFFFD/#24\uFFFD"}:CLOSE_TAG_SH_ICON: Dry run `;let G;G=$localize`${"\uFFFD#27\uFFFD"}:START_TAG_SH_ICON:warning${"\uFFFD/#27\uFFFD"}:CLOSE_TAG_SH_ICON: Warning `;let m;return m=$localize`${"\uFFFD#30\uFFFD"}:START_TAG_SH_ICON:warning-octagon${"\uFFFD/#30\uFFFD"}:CLOSE_TAG_SH_ICON: Error `,[S,n,o,e,E,L,N,I,d,h,G,m,[1,"filters"],[1,"type-b"],["type","button","routerLink","/about/logs/stored","routerLinkActive","active"],["type","button","routerLink","/about/logs/live","routerLinkActive","active"],[3,"openIndicator"],["shButton","","type","button"],["menu",""],["shButton","","type","button",1,"small",3,"click"]]},template:function(n,o){n&1&&(Zi(0,"div",12)(1,"sh-button-group",13)(2,"button",14),Fg(3,0),Ig(4,"sh-icon"),jg(),Wl(),Zi(5,"button",15),Fg(6,1),Ig(7,"sh-icon"),jg(),Wl()(),lT(8,W,31,2,"sh-menu",16),Wl(),Ig(9,"router-outlet")),n&2&&(bE(8),uT(o.currentUrl().startsWith("/about/logs/live")?8:-1));},dependencies:[v,x,N,ve,lr,To,_t],styles:["[_nghost-%COMP%]{display:block}.filters[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;padding:0 2rem;margin-bottom:1.25rem}"]})};export{O as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {L as L$1}from'./chunk-
|
|
1
|
+
import {L as L$1}from'./chunk-DM-zhIVI.js';import {T as T$1,ab as J,k,bk as B,f,G as Ge,N as Nt,Q as Qa,ad as sy,ak as l,b1 as Bs,a_ as ee}from'./main-X6MUEPX4.js';var m="shown-welcome-page-v1",A="hide-console-connection-status",C="use-out-of-process-controller",b="disable-console-control",T="disable-tray-icon-login",S="server-listen-interface",D="allowed-hostnames",N="server-passphrase",w="update-channel",y="startup-delay",P="usage-reporter-level",I="power-mode-provider",L="autogenerated-passphrase",O="has-asked-for-password-change",R=class a{#s=T$1(J);#r=T$1(k);#n=T$1(B);#i=T$1(f);#o=L$1(sy(()=>this.#s.getApiV1Serversettings()));#e=Ge(void 0);#t(e,t){if(!t)return false;let s=t[e];if((s??"").trim().length==0)return false;let r=s.trim().toLowerCase();return r==="true"||r==="1"||r==="yes"||r==="on"}serverSettings=Nt(()=>this.#e()||this.#o());askForInitialPasswordConfig=Nt(()=>{let e=(this.#i.systemInfo()?.StartedBy??"").trim().toLowerCase();if(e==="tray icon"||e=="trayicon")return false;let t=this.#e(),s=this.#t(L,t),r=this.#t(O,t);return s&&!r});showWelcomePage=Nt(()=>{let e=this.#e();if(!e)return false;let t=this.#t(O,e),s=this.#t(m,e);return !(t||s)});#c=Qa(()=>{let e=this.#r.serverSettings();e&&this.#e.set(e);});constructor(){this.#r.subscribe("serversettings");}isConsoleConnectionStatusHidden=Nt(()=>this.#t(A,this.serverSettings()));isControllerIpcEnabled=Nt(()=>this.#t(C,this.serverSettings()));refreshServerSettings(){this.#n.getConnectionMethod()!=="websocket"&&sy(()=>this.#s.getApiV1Serversettings()).subscribe({next:e=>{this.#e.set(e);}});}#a(e,t){var s=l({},e);for(let[r,g]of Object.entries(t))g===null?delete s[r]:s[r]=g;return s}patchServerSettings(e){let t=l({},this.serverSettings());return this.#e.set(this.#a(this.serverSettings()??{},e)),sy(()=>this.#s.patchApiV1Serversettings({body:e})).pipe(Bs(s=>{throw this.#e.set(t),s}))}patchServerSetting(e,t){let s={};return s[e]=t,this.patchServerSettings(s)}setShownWelcomePage(){return this.patchServerSetting(m,"true")}setHideConsoleConnectionStatus(e){return this.patchServerSetting(A,e?"True":"False")}setControllerIpcState(e){return this.patchServerSetting(C,e?"True":"False")}setDisableTrayIconLogin(e){return this.patchServerSetting(T,e?"True":"False")}setDisableConsoleControl(e){return this.patchServerSetting(b,e?"True":"False")}setRemoteAccessInterface(e){return this.patchServerSetting(S,e)}setRemoteAccessAllowedHostnames(e){var t={[D]:e};return this.serverSettings()?.[S]==="loopback"&&(t[S]="any"),this.patchServerSettings(t)}setRemoteAccessPassword(e){return this.patchServerSetting(N,e)}setUpdateChannel(e){return this.patchServerSetting(w,e)}setStartupDelay(e){return this.patchServerSetting(y,e)}setUsageReporterLevel(e){return this.patchServerSetting(P,e)}setPowerModeProvider(e){return this.patchServerSetting(I,e)}static \u0275fac=function(t){return new(t||a)};static \u0275prov=ee({token:a,factory:a.\u0275fac,providedIn:"root"})};export{R};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {L as L$1}from'./chunk-
|
|
1
|
+
import {L as L$1}from'./chunk-DM-zhIVI.js';import {T,ab as J,ad as sy,aI as pt,aj as m,ak as l,G as Ge,Q as Qa,g as gw,a as N,v,a0 as de,i as ET,Z as Zi,o as oC,W as Wl,a1 as pT,n as lm,H as HC,w as Hg,P as Pd,L as Ld,b as bE,a2 as hT,y as cm,z as vg,a3 as XC,J as im,aa as Yl,p as qC,l as lT,d as Ig,h as aC,F as Fg,j as jg,aD as sm,c as uT,as as Yp,a9 as QC,aq as dT}from'./main-X6MUEPX4.js';var H=()=>({maxWidth:"700px",width:"100%"});function K(s,i){if(s&1&&(Zi(0,"a",9)(1,"sh-icon"),HC(2,"link"),Wl()()),s&2){let e=aC().$implicit;vg("href",QC(e.Url),Yp);}}function Q(s,i){if(s&1){let e=ET();Zi(0,"div",2)(1,"h4"),HC(2),lT(3,K,3,2,"a",9),Wl(),Zi(4,"p"),HC(5),Ig(6,"br"),Zi(7,"i"),HC(8),Wl()(),Zi(9,"div",10)(10,"button",11),Hg("click",function(){let o=Pd(e).$implicit,p=aC();return Ld(p.openLicense(o))}),Fg(11,1),Ig(12,"sh-icon"),jg(),Wl()()();}if(s&2){let e=i.$implicit;bE(2),sm(" ",e.Title," - ",e.data?.license," "),bE(),uT(e.Url?3:-1),bE(2),Yl(" ",e.data?.description," "),bE(3),im(e.data?.notes);}}var L=class s{#e=T(J);licenses=L$1(sy(()=>this.#e.getApiV1Licenses()).pipe(pt(i=>i.map(e=>m(l({},e),{data:e.Jsondata?JSON.parse(e.Jsondata):null})))));dialogIsOpen=Ge(false);dialogLicense=Ge(null);#i=Qa(()=>{this.dialogLicense()&&this.dialogIsOpen.set(true);});openLicense(i){this.dialogLicense.set(i);}closeLicense(){this.dialogIsOpen.set(false),this.dialogLicense.set(null);}breakIntoLines(i){let e=i.split(`
|
|
2
2
|
`),n="";for(let o=0;o<e.length;o++)n+=`<li>${e[o]}</li>`;return n}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=gw({type:s,selectors:[["app-libraries"]],decls:14,vars:5,consts:()=>{let i;i=$localize`Libraries`;let e;return e=$localize` Details ${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:arrow-square-in${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON:`,[i,e,[1,"license"],[3,"isOpenChange","isOpen","options"],["header",""],["content",""],[1,"license-dialog"],["footer",""],["shButton","","type","button",3,"click"],[3,"href"],[1,"actions"],["shButton","",3,"click"]]},template:function(e,n){if(e&1){let o=ET();Zi(0,"h3"),oC(1,0),Wl(),pT(2,Q,13,5,"div",2,dT),Zi(4,"sh-dialog",3),lm("isOpenChange",function(_){return Pd(o),qC(n.dialogIsOpen,_)||(n.dialogIsOpen=_),Ld(_)}),Zi(5,"header",4)(6,"h3"),HC(7),Wl()(),Zi(8,"div",5)(9,"div",6),HC(10),Wl()(),Zi(11,"footer",7)(12,"button",8),Hg("click",function(){return Pd(o),n.dialogLicense.set(null),Ld(n.dialogIsOpen.set(false))}),HC(13,"Close"),Wl()()();}if(e&2){bE(2),hT(n.licenses()),bE(2),cm("isOpen",n.dialogIsOpen),vg("options",XC(4,H)),bE(3),im(n.dialogLicense()?.Title);let o=n.dialogLicense()?.License??"";bE(3),Yl(" ",o," ");}},dependencies:[N,v,de],styles:["[_nghost-%COMP%]{display:block;padding:0 2.5rem}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}h4[_ngcontent-%COMP%]{font:var(--paragraph-10)}a[_ngcontent-%COMP%]{text-decoration:none}.license[_ngcontent-%COMP%]{padding:1rem;border-bottom:1px solid var(--base-4);display:flex;flex-direction:column;align-items:flex-start;gap:.5rem}.license[_ngcontent-%COMP%]:first-of-type{border-top:1px solid var(--base-4)}.license[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.25rem;align-items:center}.license-dialog[_ngcontent-%COMP%]{background-color:var(--base-1);color:var(--base-12);padding:2.5rem 2.5rem 2.5rem 1.5rem;border-radius:var(--shape-3);overflow:auto;max-height:31.25rem;white-space:pre;border:1px solid var(--base-4)}"]})};export{L as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {w as w$1}from'./chunk-
|
|
1
|
+
import {w as w$1}from'./chunk-vtWJkNZ_.js';import {t as te}from'./chunk-Ied7KwvV.js';import'./chunk-CNwmuSlJ.js';import'./chunk-B20GDhu-.js';import'./chunk-2QKZNH3T.js';import {K as Ke}from'./chunk-3iAIXnG6.js';import'./chunk-644SEuYO.js';import'./chunk-hTxREuXu.js';import'./chunk-OpdQrdKp.js';import'./chunk-Bz49u_nH.js';import'./chunk-1DRz_1dv.js';import'./chunk-BmOgPfpY.js';import'./chunk-Mj9aFt3b.js';import'./chunk-5q0UK__c.js';import'./chunk-CaQaYVo7.js';import'./chunk-B5S2d_Pm.js';import'./chunk-CRhQXQUC.js';import'./chunk-CZu3210D.js';import'./chunk-DF2Ac802.js';import {T,ax as W,a5 as m,ab as J$1,Q as Qa,ad as sy,aG as jo,g as gw,$ as lr,_ as _t,a8 as To,d as Ig,Z as Zi,l as lT,o as oC,W as Wl,b as bE,c as uT,z as vg,aH as tb,aF as JC,H as HC,h as aC,aa as Yl}from'./main-X6MUEPX4.js';import'./chunk-8A93BNds.js';import {d}from'./chunk-C8Zr0vl3.js';import'./chunk-Be4WXTyA.js';import'./chunk-Bfg1Kjif.js';import'./chunk-BxBZMjtQ.js';import'./chunk-qUlwoHQn.js';import'./chunk-Dn7TWCfq.js';import {L}from'./chunk-DM-zhIVI.js';import'./chunk-CUo9Jt8-.js';var $=(i,e)=>[i,e,"general"],U=(i,e)=>[i,e,"source-data"],K=(i,e)=>[i,e,"destination"],F=(i,e)=>[i,e,"schedule"],w=(i,e)=>[i,e,"options"];function J(i,e){if(i&1&&(Zi(0,"p"),HC(1),Wl()),i&2){let t=aC();bE(),Yl("Editing: ",t.backupName());}}function X(i,e){i&1&&Ig(0,"sh-progress-bar",7);}function x(i,e){i&1&&(Zi(0,"section"),Ig(1,"router-outlet"),Wl());}var k=class i{#t=T(W);#e=T(Ke);#i=T(m);#n=T(J$1);isDraft=this.#e.isDraft;isNew=this.#e.isNew;backupId=this.#e.backupId;backupName=this.#e.backupName;finishedLoading=this.#e.finishedLoading;#a=L(this.#t.params);#o=L(this.#t.url);paramsChanged=Qa(()=>{let e=this.#a()?.id,t=!!this.#o()?.find(n=>n.path==="backup-draft");e!=this.#e.backupId()&&(this.#e.backupId.set(e),e!=="new"?this.getBackup(e,t):this.getDefaults());});getDefaults(){sy(()=>this.#n.getApiV1Backupdefaults()).pipe(jo(1)).subscribe({next:e=>{let t=e.Backup;t.Settings=[...t.Settings],this.#e.mapGeneralToForm(t),this.#e.mapDestinationToForm(t),this.#e.mapSourceDataToForm(t),this.#e.mapScheduleToForm(e.Schedule),this.#e.mapOptionsToForms(t),this.#e.applicationOptions.set(e.ApplicationOptions),this.#e.backupDefaults.set(e),this.#e.finishedLoading.set(true);}});}getBackup(e,t=false){let n=a=>{this.#e.mapScheduleToForm(a.Schedule??null),a.Backup&&(this.#e.mapGeneralToForm(a.Backup),this.#e.mapDestinationToForm(a.Backup),this.#e.mapSourceDataToForm(a.Backup),this.#e.mapOptionsToForms(a.Backup),this.#e.storeMetadata(a.Backup,t)),this.#e.finishedLoading.set(true);};if(t){this.isDraft.set(t);let a=this.#i.draftBackups().find(d=>d.id===e);if(!a){alert("Backup not found");return}n(a.data);}else sy(()=>this.#n.getApiV1BackupById({path:{id:e}})).subscribe({next:n});}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=gw({type:i,selectors:[["app-backup"]],features:[JC([Ke])],decls:16,vars:22,consts:()=>{let e;e=$localize` General `;let t;t=$localize` Source Data `;let n;n=$localize` Destination `;let a;a=$localize` Schedule `;let d;return d=$localize` Options `,[e,t,n,a,d,[1,"primary"],["tabindex","-1","routerLinkActive","active",3,"routerLink"],[1,"indeterminate","primary"]]},template:function(t,n){t&1&&(Ig(0,"app-status-bar"),Zi(1,"header"),lT(2,J,2,1,"p"),Zi(3,"sh-stepper",5)(4,"div",6),oC(5,0),Wl(),Zi(6,"div",6),oC(7,1),Wl(),Zi(8,"div",6),oC(9,2),Wl(),Zi(10,"div",6),oC(11,3),Wl(),Zi(12,"div",6),oC(13,4),Wl()()(),lT(14,X,1,0,"sh-progress-bar",7)(15,x,2,0,"section")),t&2&&(bE(2),uT(n.isNew()?-1:2),bE(2),vg("routerLink",tb(7,$,n.isDraft()?"/backup-draft":"/backup",n.backupId())),bE(2),vg("routerLink",tb(10,U,n.isDraft()?"/backup-draft":"/backup",n.backupId())),bE(2),vg("routerLink",tb(13,K,n.isDraft()?"/backup-draft":"/backup",n.backupId())),bE(2),vg("routerLink",tb(16,F,n.isDraft()?"/backup-draft":"/backup",n.backupId())),bE(2),vg("routerLink",tb(19,w,n.isDraft()?"/backup-draft":"/backup",n.backupId())),bE(2),uT(n.finishedLoading()?15:14));},dependencies:[lr,_t,To,te,w$1,d],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%] sh-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}"]})};export{k as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var o=[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",loadComponent:()=>import('./chunk-3iAIXnG6.js').then(function(n){return n.d})},{path:"source-data",loadComponent:()=>import('./chunk-3iAIXnG6.js').then(function(n){return n.e})},{path:"destination",loadComponent:()=>import('./chunk-Dgq3OqWW.js')},{path:"schedule",loadComponent:()=>import('./chunk-3iAIXnG6.js').then(function(n){return n.f})},{path:"options",loadComponent:()=>import('./chunk-DR-utttZ.js')}];export{o as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {z}from'./chunk-C1-31fA7.js';import {m as m$4}from'./chunk-C185qUb-.js';import {m as m$1,N as Nt$1}from'./chunk-C1py21yb.js';import {E as E1,T,aY as D,a5 as m,N as Nt,G as Ge$1,Q as Qa,g as gw,a as N,v,b3 as m$2,aL as ci,l as lT,c as uT,aF as JC,aJ as m$3,K as Kg,Z as Zi,W as Wl,h as aC,b as bE,H as HC,d as Ig,aa as Yl,z as vg,F as Fg,aO as sb,j as jg,av as Vg,aT as cb,aP as lb,aw as iC,o as oC,ah as Yg,b4 as cg,b_ as gC,i as ET,w as Hg,P as Pd,L as Ld,J as im,c0 as db,ab as J,a6 as be$1,bk as B,I,f,ad as sy,aR as zl,aS as Ql,s as sC,ac as I1,C as Zu,n as lm,p as qC,t as bD,y as cm,M as MD,_ as _t,a3 as XC}from'./main-2ZYVV4C4.js';import {d}from'./chunk-BGuvkLC9.js';import {a as at}from'./chunk-DneBfCBh.js';import {v as ve$1}from'./chunk-DuRr4rDS.js';import {F as Fe}from'./chunk-DBkkb6OR.js';import {B as Bn,Z as Ze$1,e as en,R as Rn,J as Jt}from'./chunk-iGzJokt-.js';import {v as v$1}from'./chunk-Bq_vr6Q3.js';import {R}from'./chunk-D9jPw9Ov.js';function Y(t,n){if(t&1&&HC(0),t&2){let e=aC(3);Yl(" ",e.statusData().actionText," - ");}}function Z$1(t,n){t&1&&(Zi(0,"sh-icon"),HC(1,"check"),Wl());}function ee$1(t,n){t&1&&(Zi(0,"sh-icon"),HC(1,"copy"),Wl());}function te$1(t,n){if(t&1){let e=ET();Zi(0,"div",9)(1,"button",10),Hg("click",function(u){Pd(e);let F=aC(4);return Ld(F.copyToClipboard(u,F.tooltipText()))}),lT(2,Z$1,2,0,"sh-icon")(3,ee$1,2,0,"sh-icon"),HC(4," Copy "),Wl(),Zi(5,"p",11),HC(6),Wl()();}if(t&2){let e=aC(4);bE(),vg("color",e.copied()?"success":null),bE(),uT(e.copied()===true?2:3),bE(4),im(e.tooltipText());}}function ne(t,n){if(t&1&&(Zi(0,"div",8),HC(1),Wl(),cg(2,te$1,7,3,"ng-template",null,0,db)),t&2){let e=gC(3),s=aC(3);vg("shTooltip",e),bE(),Yl(" ",s.statusData().fileStatusText," ");}}function ie(t,n){if(t&1&&(Zi(0,"div"),lT(1,Y,1,1),HC(2),Wl(),lT(3,ne,4,2),Ig(4,"sh-progress-bar",7)),t&2){let e=aC(2);bE(),uT(e.backupId()===null?1:-1),bE(),Yl(" ",e.statusData().statusText," "),bE(),uT(e.statusData()?.BackendFileSize?3:-1),bE(),vg("value",e.statusData().progress*100);}}function oe(t,n){if(t&1&&(Zi(0,"div",5),Fg(1,1),Ig(2,"sh-icon"),sb(3,"relativeTime"),sb(4,"date"),jg(),Wl()),t&2){let e=aC(2);bE(4),Vg(e.nextBackup().backup?.Backup?.Name)(cb(3,3,e.nextBackup().time))(lb(4,5,e.nextBackup().time,"shortTime")),iC(1);}}function ae(t,n){t&1&&(Zi(0,"div",5),oC(1,2),Wl());}function se(t,n){t&1&&(Zi(0,"div",6),Fg(1,3),Ig(2,"sh-spinner"),jg(),Wl()),t&2&&(bE(2),Yg("--spinner-size","12px")("--spinner-thickness","2px"));}function re(t,n){if(t&1&&(Zi(0,"div",4),lT(1,ie,5,4)(2,oe,5,8,"div",5)(3,ae,2,0,"div",5)(4,se,3,4,"div",6),Wl()),t&2){let e=aC();bE(),uT(e.isActive()?1:!e.backupId()&&(e.nextBackup().backup||e.nextBackup().time)?2:!e.backupId()&&!e.serverState()?.ActiveTask?3:e.backupId()?-1:4);}}var W=class t{backupId=E1(null);#e=T(D);#t=T(m);statusData=this.#e.statusData;serverState=this.#e.serverState;isActive=Nt(()=>this.#e.runningBackupId()!==null);isTargetRunningTask=Nt(()=>{let n=this.backupId();return n?String(this.#e.runningBackupId())===String(n):true});isVisible=Nt(()=>this.backupId()?this.isActive()?this.isTargetRunningTask():false:true);nextBackup=Nt(()=>{this.#t.backups();return {backup:this.serverState()?.ProposedSchedule?.[0]?.backup,time:this.serverState()?.ProposedSchedule?.[0]?.Item2}});tooltipText=Nt(()=>{let n=this.statusData();return n?.CurrentFilename?`${n.CurrentFilename}`:""});copied=Ge$1(false);copiedTimeout;copyToClipboard(n,e){n.stopPropagation(),navigator.clipboard.writeText(e),this.copied.set(true),this.copiedTimeout=setTimeout(()=>{this.copied.set(false);},2e3);}tooltipTrigger=Ge$1(true);tooltipTriggerEffect=Qa(()=>{this.tooltipText(),this.tooltipTrigger.update(n=>!n),this.copiedTimeout&&(clearTimeout(this.copiedTimeout),this.copiedTimeout=void 0,this.copied.set(false));});static \u0275fac=function(e){return new(e||t)};static \u0275cmp=gw({type:t,selectors:[["app-backup-progress"]],hostVars:2,hostBindings:function(e,s){e&2&&Kg("is-visible",s.isVisible());},inputs:{backupId:[1,"backupId"]},features:[JC([m$3])],decls:1,vars:1,consts:()=>{let n;n=$localize` ${"\uFFFD0\uFFFD"}:INTERPOLATION: - ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:clock${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: ${"\uFFFD1\uFFFD"}:INTERPOLATION_1: at ${"\uFFFD2\uFFFD"}:INTERPOLATION_2: `;let e;e=$localize`No scheduled tasks`;let s;return s=$localize` Loading ${"\uFFFD#2\uFFFD"}:START_TAG_SH_SPINNER:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_SPINNER:`,[["fileStatusTooltip",""],n,e,s,[1,"progress-section"],[1,"label"],[1,"label","label-loading"],[1,"raised","primary",3,"value"],[1,"file-status-text",3,"shTooltip"],[1,"tooltip-status-content"],["shButton","","size","small",3,"click","color"],[1,"tooltip-file-status-text"]]},template:function(e,s){e&1&&lT(0,re,5,1,"div",4),e&2&&uT(s.isVisible()?0:-1);},dependencies:[N,v,m$1,d,at,m$2,ci],styles:["[_nghost-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%;gap:.5rem}[_nghost-%COMP%]:not(.is-visible){display:none}.file-status-text[_ngcontent-%COMP%]{color:var(--base-8)}.file-status-text[_ngcontent-%COMP%]:empty{display:none}.tooltip-file-status-text[_ngcontent-%COMP%]{overflow-wrap:break-word;word-break:break-word;display:inline-block;margin-bottom:.25rem}.tooltip-status-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.progress-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:0;min-width:18.75rem;flex:1 0}.progress-section[_ngcontent-%COMP%] sh-progress-bar[_ngcontent-%COMP%]{margin-top:.25rem}app-status-bar[_nghost-%COMP%] sh-progress-bar[_ngcontent-%COMP%], app-status-bar [_nghost-%COMP%] sh-progress-bar[_ngcontent-%COMP%]{position:absolute;bottom:0;left:0;right:0;width:100%;max-width:initial;margin-top:0}.label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.label-loading[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.25rem}"]})};function ye(o,t){o&1&&(Zi(0,"sh-icon",2),HC(1,"x-bold"),Wl());}function be(o,t){o&1&&(Zi(0,"sh-icon",3),HC(1,"list-bold"),Wl());}function ve(o,t){if(o&1){let n=ET();Zi(0,"button",1),Hg("click",function(){Pd(n);let i=aC();return Ld(i.toggleNav())}),lT(1,ye,2,0,"sh-icon",2)(2,be,2,0,"sh-icon",3),Wl();}if(o&2){let n=aC();bE(),uT(n.isNavOpen()?1:2);}}var V=class o{#e=T(m$4);isNavOpen=this.#e.isNavOpen;isMobile=this.#e.isMobile;toggleNav(){this.#e.toggleNav();}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=gw({type:o,selectors:[["app-mobile-menu-toggle"]],decls:1,vars:1,consts:[["shButton","",1,"small","toggle-sidebar","ghost"],["shButton","",1,"small","toggle-sidebar","ghost",3,"click"],[1,"cross"],[1,"burger"]],template:function(n,e){n&1&&lT(0,ve,3,1,"button",0),n&2&&uT(e.isMobile()?0:-1);},dependencies:[v,N],styles:["[_nghost-%COMP%]{display:contents}.toggle-sidebar[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:center}.toggle-sidebar[_ngcontent-%COMP%] .cross[_ngcontent-%COMP%], .toggle-sidebar[_ngcontent-%COMP%] .burger[_ngcontent-%COMP%]{opacity:1;transition:opacity 124ms linear;margin:0}.toggle-sidebar[_ngcontent-%COMP%] .cross.hidden[_ngcontent-%COMP%], .toggle-sidebar[_ngcontent-%COMP%] .burger.hidden[_ngcontent-%COMP%]{opacity:0}"]})};var Re=()=>["/connect/logon"];function Be(o,t){o&1&&(Fg(0,0,1),Ig(1,"div",9),jg());}function ke(o,t){o&1&&(Fg(0,0,2),Ig(1,"div",10),jg());}function Le(o,t){if(o&1){let n=ET();Zi(0,"div",8),Hg("click",function(){Pd(n);let i=aC();return Ld(i.resetAndRetry())}),Fg(1,0),lT(2,Be,2,0)(3,ke,2,0),jg(),Wl();}if(o&2){let n=aC();bE(2),uT(n.resetting()?2:3);}}function Ge(o,t){o&1&&(Zi(0,"div",6),Fg(1,1),Ig(2,"div",11),jg(),Wl()),o&2&&vg("routerLink",XC(1,Re));}function xe(o,t){o&1&&(Zi(0,"div",6),Fg(1,2),Ig(2,"div",10),jg(),Wl()),o&2&&vg("routerLink",XC(1,Re));}function $e(o,t){if(o&1){let n=ET();Zi(0,"div",7),Fg(1,3),Zi(2,"sh-icon",12),Hg("click",function(){Pd(n);let i=aC();return Ld(i.cancel())}),Wl(),Zi(3,"div",13),Hg("click",function(){Pd(n);let i=aC();return Ld(i.claim())}),Wl(),Ig(4,"div",14),jg(),Wl();}}function Ue(o,t){if(o&1){let n=ET();Zi(0,"div",8),Hg("click",function(){Pd(n);let i=aC();return Ld(i.openConsole())}),Fg(1,4),Ig(2,"div",15),jg(),Wl();}}var x=class o{#e=T(v$1);state=this.#e.state;resetting=Ge$1(false);stateEffect=Qa(()=>{let t=this.#e.state(),n=this.resetting();t==="registered"&&n&&(this.resetting.set(false),this.#e.beginRemoteRegistration());});ngOnInit(){this.#e.refreshRemoteControlStatus();}claim(){let t=this.#e.claimUrl();t&&window.open(t,"_blank");}cancel(){this.#e.cancelRemoteRegistration();}resetAndRetry(){this.resetting.set(true),this.#e.cancelRemoteRegistration();}openConsole(){this.#e.openConsole();}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=gw({type:o,selectors:[["app-remote-connectivity-status"]],decls:5,vars:1,consts:()=>{let t;t=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF: Resetting ${"\uFFFD#1:1\uFFFD"}:START_TAG_DIV:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_DIV:${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE: Click to connect ${"\uFFFD#1:2\uFFFD"}:START_TAG_DIV_1:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_DIV:${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,t=sC(t);let n;n=$localize` Connecting ${"\uFFFD#2\uFFFD"}:START_TAG_DIV:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_DIV:`;let e;e=$localize` Click to register ${"\uFFFD#2\uFFFD"}:START_TAG_DIV:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_DIV:`;let i;i=$localize`Cancel registration`;let a;a=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:x-circle${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD#3\uFFFD"}:START_TAG_DIV:Click to claim${"[\uFFFD/#3\uFFFD|\uFFFD/#4\uFFFD]"}:CLOSE_TAG_DIV:${"\uFFFD#4\uFFFD"}:START_TAG_DIV_1:${"[\uFFFD/#3\uFFFD|\uFFFD/#4\uFFFD]"}:CLOSE_TAG_DIV:`,a=sC(a);let u;return u=$localize` Connected ${"\uFFFD#2\uFFFD"}:START_TAG_DIV:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_DIV:`,[t,n,e,a,u,[1,"connectivity-status"],[1,"connectivity-status",3,"routerLink"],[1,"connectivity-status","claim"],[1,"connectivity-status",3,"click"],[1,"status","blinking"],[1,"status"],[1,"status","warning","blinking"],["shTooltip",i,3,"click"],[1,"claim",3,"click"],[1,"status","success","blinking"],[1,"status","success"]]},template:function(n,e){if(n&1&&lT(0,Le,4,1,"div",5)(1,Ge,3,2,"div",6)(2,xe,3,2,"div",6)(3,$e,5,0,"div",7)(4,Ue,3,0,"div",5),n&2){let i=e.state()==="unknown"||e.state()==="inactive"||e.state()==="registeringfaulted",a=e.state()==="registeringfaulted",u=e.state()==="registering",r=e.state()==="registered",M=e.state()==="connected"||e.state()==="disabled"||e.state()==="connecting";uT(a?0:u?1:i?2:r?3:M?4:-1);}},dependencies:[_t,N,at],styles:["[_nghost-%COMP%]{display:flex;align-items:center;padding:0 .75rem}@media only screen and (max-width:768px){[_nghost-%COMP%]{padding:0}}.hide-text[_nghost-%COMP%]{font-size:0}.in-menu[_nghost-%COMP%]{padding:.75rem;border-bottom:1px solid var(--base-4)}.connectivity-status[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;cursor:pointer}.connectivity-status[_ngcontent-%COMP%]:hover{color:var(--primary-8)}.connectivity-status.claim[_ngcontent-%COMP%]{display:flex;gap:.5rem;cursor:pointer}.connectivity-status.claim[_ngcontent-%COMP%]:hover{color:inherit}.connectivity-status.claim[_ngcontent-%COMP%] .claim[_ngcontent-%COMP%]:hover{color:var(--primary-8)}.connectivity-status.claim[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]:hover{color:var(--error-8)}.status[_ngcontent-%COMP%]{width:.625rem;height:.625rem;border-radius:50%;background-color:var(--base-4)}.status.success[_ngcontent-%COMP%]{background-color:var(--success-8)}.status.warning[_ngcontent-%COMP%]{background-color:var(--warn-8)}.status.blinking[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_blinking 1s infinite}@keyframes _ngcontent-%COMP%_blinking{0%{opacity:.2}50%{opacity:1}to{opacity:.2}}"]})};var Pe={Byte:"B",KByte:"KB",MByte:"MB",GByte:"GB",TByte:"TB",PByte:"PB"},we=["mbps","gbps"],Ae=8,q=1024,H=q*1024,Q=H*1024,ee=Q*1024,he=ee*1024,Ve={B:1,KB:q,MB:H,GB:Q,TB:ee,PB:he},He=1e3,Z=He*1e3,j=Z*1e3,Ye=[{threshold:he,unitPrefix:"PByte"},{threshold:ee,unitPrefix:"TByte"},{threshold:Q,unitPrefix:"GByte"},{threshold:H,unitPrefix:"MByte"},{threshold:q,unitPrefix:"KByte"},{threshold:1,unitPrefix:"Byte"}],$=class o{#e=T(J);closed=I1();isSubmitting=Ge$1(false);sizeOptions=Ge$1([...we]);maxUpload=Ge$1(0);maxDownload=Ge$1(0);maxUploadUnit=Ge$1("mbps");maxDownloadUnit=Ge$1("mbps");ngOnInit(){this.init();}convertToBitsPerSecondUnits(t,n){let i=t*(Ve[n.toUpperCase()]||H)*Ae;return i===0?{value:0,unit:"mbps"}:i>=j?{value:parseFloat((i/j).toFixed(2)),unit:"gbps"}:{value:parseFloat((i/Z).toFixed(2)),unit:"mbps"}}convertFromBitsPerSecondUnits(t,n){let e=0;switch(n){case "gbps":e=t*j;break;case "mbps":e=t*Z;break}let i=e/Ae;if(i===0)return {valueForApi:0,unitPrefixForApi:"Byte"};for(let{threshold:a,unitPrefix:u}of Ye)if(i>=a)return {valueForApi:Math.round(i/a),unitPrefixForApi:u};return {valueForApi:Math.round(i),unitPrefixForApi:"Byte"}}init(){sy(()=>this.#e.getApiV1Serversettings()).subscribe({next:t=>{let n=t?.["max-upload-speed"],e=t?.["max-download-speed"];if(n&&n!==""){let i=n.match(/^(\d+(?:\.\d+)?)([A-Za-z]+)$/);if(i){let a=parseFloat(i[1]),u=i[2],r=this.convertToBitsPerSecondUnits(a,u);this.maxUpload.set(r.value),this.maxUploadUnit.set(r.unit);}else console.warn("Unexpected max-upload-speed format from API:",n),this.resetUpload();}else this.resetUpload();if(e&&e!==""){let i=e.match(/^(\d+(?:\.\d+)?)([A-Za-z]+)$/);if(i){let a=parseFloat(i[1]),u=i[2],r=this.convertToBitsPerSecondUnits(a,u);this.maxDownload.set(r.value),this.maxDownloadUnit.set(r.unit);}else console.warn("Unexpected max-download-speed format from API:",e),this.resetDownload();}else this.resetDownload();},error:t=>{console.error("Failed to get server settings:",t),this.resetDownload(),this.resetUpload();}});}resetDownload(){this.maxDownload.set(0),this.maxDownloadUnit.set("mbps");}resetUpload(){this.maxUpload.set(0),this.maxUploadUnit.set("mbps");}blockDecimalKeys(t){if([".",","].includes(t.key))return t.preventDefault()}cleanupInputAfterPasting(t){t.preventDefault();let n=t.clipboardData?.getData("text/plain");if(!n)return;let e=n.replaceAll(/[\.,]/g,"");t.target.value=e;}submit(){this.isSubmitting.set(true);let t="",n="",e=this.maxUpload()??0,i=this.maxUploadUnit(),a=this.maxDownload()??0,u=this.maxDownloadUnit();if(e>0){let{valueForApi:r,unitPrefixForApi:M}=this.convertFromBitsPerSecondUnits(e,i),y=Pe[M];y?t=`${r}${y}`:console.error(`Invalid unit prefix for API submission (upload): ${M}. Defaulting to empty string.`);}if(a){let{valueForApi:r,unitPrefixForApi:M}=this.convertFromBitsPerSecondUnits(a,u),y=Pe[M];y?n=`${r}${y}`:console.error(`Invalid unit prefix for API submission (download): ${M}. Defaulting to empty string.`);}sy(()=>this.#e.patchApiV1Serversettings({body:{"max-upload-speed":t,"max-download-speed":n}})).pipe(Zu(()=>this.isSubmitting.set(false))).subscribe({next:()=>{this.closed.emit(true);},error:r=>{console.error("Failed to submit throttle settings:",r);}});}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=gw({type:o,selectors:[["app-throttle-settings-dialog"]],outputs:{closed:"closed"},decls:26,vars:10,consts:()=>{let t;t=$localize`Throttle network speed`;let n;n=$localize`We will round bits to the nearest byte value.`;let e;e=$localize`Max upload speed`;let i;i=$localize`Max download speed`;let a;a=$localize`Cancel`;let u;return u=$localize` Update settings `,[t,n,e,i,a,u,["content",""],[1,"column"],[1,"field-row"],["type","number",3,"paste","keydown","ngModelChange","ngModel"],[3,"isClearable","options"],["type","text",3,"ngModelChange","ngModel"],["footer",""],["shButton","",3,"click"],["shButton","",1,"raised","primary",3,"click"]]},template:function(n,e){n&1&&(Zi(0,"header")(1,"h3"),oC(2,0),Wl(),Zi(3,"p"),oC(4,1),Wl()(),Zi(5,"div",6)(6,"div",7)(7,"div",8)(8,"label"),oC(9,2),Wl(),Zi(10,"sh-form-field")(11,"input",9),Hg("paste",function(a){return e.cleanupInputAfterPasting(a)})("keydown",function(a){return e.blockDecimalKeys(a)}),lm("ngModelChange",function(a){return qC(e.maxUpload,a)||(e.maxUpload=a),a}),Wl(),bD(),Wl(),Zi(12,"sh-select",10)(13,"input",11),lm("ngModelChange",function(a){return qC(e.maxUploadUnit,a)||(e.maxUploadUnit=a),a}),Wl(),bD(),Wl()(),Zi(14,"div",8)(15,"label"),oC(16,3),Wl(),Zi(17,"sh-form-field")(18,"input",9),Hg("paste",function(a){return e.cleanupInputAfterPasting(a)})("keydown",function(a){return e.blockDecimalKeys(a)}),lm("ngModelChange",function(a){return qC(e.maxDownload,a)||(e.maxDownload=a),a}),Wl(),bD(),Wl(),Zi(19,"sh-select",10)(20,"input",11),lm("ngModelChange",function(a){return qC(e.maxDownloadUnit,a)||(e.maxDownloadUnit=a),a}),Wl(),bD(),Wl()()()(),Zi(21,"footer",12)(22,"button",13),Hg("click",function(){return e.closed.emit(false)}),oC(23,4),Wl(),Zi(24,"button",14),Hg("click",function(){return e.submit()}),oC(25,5),Wl()()),n&2&&(bE(11),cm("ngModel",e.maxUpload),MD(),bE(),vg("isClearable",false)("options",e.sizeOptions()),bE(),cm("ngModel",e.maxUploadUnit),MD(),bE(5),cm("ngModel",e.maxDownload),MD(),bE(),vg("isClearable",false)("options",e.sizeOptions()),bE(),cm("ngModel",e.maxDownloadUnit),MD(),bE(4),Kg("loading",e.isSubmitting()));},dependencies:[Bn,Ze$1,en,Rn,Jt,Fe,Nt$1,v],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" "input select";grid-template-columns:1fr auto;align-items:center;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{grid-area:label}.field-row[_ngcontent-%COMP%] sh-form-field[_ngcontent-%COMP%]{grid-area:input}.field-row[_ngcontent-%COMP%] sh-select[_ngcontent-%COMP%]{grid-area:select}']})};function ze(o,t){o&1&&Ig(0,"app-remote-connectivity-status");}function Je(o,t){if(o&1){let n=ET();Zi(0,"button",7),Hg("click",function(){Pd(n);let i=aC(2);return Ld(i.abort())}),Fg(1,1),Ig(2,"sh-icon"),jg(),Wl();}}function Xe(o,t){if(o&1){let n=ET();Zi(0,"button",7),Hg("click",function(){Pd(n);let i=aC(2);return Ld(i.stop())}),Fg(1,2),Ig(2,"sh-icon"),jg(),Wl();}}function Ke(o,t){if(o&1&&lT(0,Je,3,0,"button",14)(1,Xe,3,0,"button",14),o&2){let n=aC();uT(n.isStopping()?0:1);}}function We(o,t){o&1&&(Fg(0,0,1),Ig(1,"sh-icon"),jg());}function je(o,t){o&1&&(Fg(0,0,2),Ig(1,"sh-icon"),jg());}function Ze(o,t){o&1&&Ig(0,"app-remote-connectivity-status",10);}function qe(o,t){o&1&&Ig(0,"app-remote-connectivity-status",12);}function Qe(o,t){if(o&1){let n=ET();Zi(0,"button",13),Hg("click",function(){Pd(n);let i=aC();return Ld(i.isStopping()?i.abort():i.stop())}),Zi(1,"sh-icon"),HC(2),Wl(),HC(3),Wl();}if(o&2){let n=aC();bE(2),im(n.isStopping()?"skull":"stop"),bE(),Yl(" ",n.isStopping()?"Abort":"Stop"," ");}}var te=class o{#e=T(J);#t=T(D);#n=T(be$1);#a=T(B);#i=T(I);#s=T(f);#l=T(R);clientIsRunning=this.#t.clientIsRunning;isResuming=this.#t.isResuming;runningTask=Nt(()=>this.#a.serverState()?.ActiveTask?.Item1);isStopping=Nt(()=>this.runningTask()==this.#o());#o=Ge$1(-1);isUsingRelay=this.#i.relayIsEnabled;hideConsoleConnectionStatus=this.#l.isConsoleConnectionStatusHidden;openThrottleSettingsDialog(){this.#n.open($,{maxWidth:"550px",width:"100%"});}openPauseDialog(){this.#n.open(z,{maxWidth:"550px",width:"100%"});}pauseResume(){if(this.clientIsRunning()){this.openPauseDialog();return}this.#t.pauseResume().subscribe();}stop(){let t=this.runningTask();t&&(this.#o.set(t),sy(()=>this.#e.postApiV1TaskByTaskidStop({path:{taskid:t}})).subscribe());}abort(){let t=this.runningTask();t&&sy(()=>this.#e.postApiV1TaskByTaskidAbort({path:{taskid:t}})).subscribe();}ngAfterViewInit(){let t=this.#i.relayIsEnabled()||!this.#s.hasWebSocket()?"longpoll":"websocket";this.#t.setConnectionMethod(t);}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=gw({type:o,selectors:[["app-status-bar"]],decls:31,vars:10,consts:()=>{let t;t=$localize`${"\uFFFD*9:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:pause${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_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_SH_ICON:play${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Resume ${"\uFFFD/*10:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,t=sC(t);let n;n=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:skull${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Abort `;let e;return e=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:stop${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Stop `,[t,n,e,[1,"current-backup"],[1,"global-progress"],[1,"current-backup-actions"],[1,"desktop-actions"],["shButton","",3,"click"],[1,"mobile-actions"],["shButton","",1,"small","menu-mobile-toggle"],[1,"hide-text"],["menu",""],[1,"in-menu"],[3,"click"],["shButton",""]]},template:function(n,e){n&1&&(Zi(0,"div",3),Ig(1,"app-mobile-menu-toggle")(2,"app-backup-progress",4),Zi(3,"div",5)(4,"div",6),lT(5,ze,1,0,"app-remote-connectivity-status"),lT(6,Ke,2,1),Zi(7,"button",7),Hg("click",function(){return e.pauseResume()}),Fg(8,0),lT(9,We,2,0)(10,je,2,0),jg(),Wl(),Zi(11,"button",7),Hg("click",function(){return e.openThrottleSettingsDialog()}),Zi(12,"sh-icon"),HC(13,"speedometer"),Wl()()(),Zi(14,"div",8)(15,"sh-menu")(16,"button",9),lT(17,Ze,1,0,"app-remote-connectivity-status",10),Zi(18,"sh-icon"),HC(19,"dots-three-vertical-bold"),Wl()(),zl(20,11),lT(21,qe,1,0,"app-remote-connectivity-status",12),lT(22,Qe,4,2,"button"),Zi(23,"button",13),Hg("click",function(){return e.pauseResume()}),Zi(24,"sh-icon"),HC(25),Wl(),HC(26),Wl(),Zi(27,"button",13),Hg("click",function(){return e.openThrottleSettingsDialog()}),Zi(28,"sh-icon"),HC(29,"speedometer"),Wl(),HC(30," Throttle Settings "),Wl(),Ql(),Wl()()()()),n&2&&(bE(5),uT(!e.isUsingRelay()&&!e.hideConsoleConnectionStatus()?5:-1),bE(),uT(e.runningTask()?6:-1),bE(),Kg("loading",e.isResuming()),bE(2),uT(e.clientIsRunning()?9:10),bE(8),uT(!e.isUsingRelay()&&!e.hideConsoleConnectionStatus()?17:-1),bE(4),uT(!e.isUsingRelay()&&!e.hideConsoleConnectionStatus()?21:-1),bE(),uT(e.runningTask()?22:-1),bE(3),im(e.clientIsRunning()?"pause":"play"),bE(),Yl(" ",e.clientIsRunning()?"Pause":"Resume"," "));},dependencies:[x,N,v,ve$1,V,W],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);position:sticky;top:0;z-index:2000;background:var(--base-1)}[_nghost-%COMP%]:has(sh-progress-bar){padding:1rem 1rem 1.5rem}.current-backup[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%;gap:.5rem}.global-progress[_ngcontent-%COMP%]{flex:1 0;min-width:18.75rem}.current-backup-actions[_ngcontent-%COMP%], .current-backup-actions[_ngcontent-%COMP%] .desktop-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}@media only screen and (max-width:768px){.current-backup-actions[_ngcontent-%COMP%] .desktop-actions[_ngcontent-%COMP%]{display:none}}.current-backup-actions[_ngcontent-%COMP%] .mobile-actions[_ngcontent-%COMP%]{display:none}@media only screen and (max-width:768px){.current-backup-actions[_ngcontent-%COMP%] .mobile-actions[_ngcontent-%COMP%]{display:flex}}.current-backup-actions[_ngcontent-%COMP%] .menu-mobile-toggle[_ngcontent-%COMP%]{position:relative}.current-backup-actions[_ngcontent-%COMP%] .menu-mobile-toggle[_ngcontent-%COMP%] app-remote-connectivity-status[_ngcontent-%COMP%]{position:absolute;top:-.25rem;right:-.25rem}.menu-status-item[_ngcontent-%COMP%]{padding:.5rem 1rem;display:flex;flex-direction:column;gap:.25rem;border-bottom:1px solid var(--base-4);margin-bottom:.25rem}.menu-status-item[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem;font-size:.875rem}"]})};export{W,te as t};
|
|
1
|
+
import {z}from'./chunk-CNwmuSlJ.js';import {m as m$4}from'./chunk-2QKZNH3T.js';import {m as m$1,N as Nt$1}from'./chunk-B5S2d_Pm.js';import {E as E1,T,aY as D,a5 as m,N as Nt,G as Ge$1,Q as Qa,g as gw,a as N,v,b3 as m$2,aL as ci,l as lT,c as uT,aF as JC,aJ as m$3,K as Kg,Z as Zi,W as Wl,h as aC,b as bE,H as HC,d as Ig,aa as Yl,z as vg,F as Fg,aO as sb,j as jg,av as Vg,aT as cb,aP as lb,aw as iC,o as oC,ah as Yg,b4 as cg,b_ as gC,i as ET,w as Hg,P as Pd,L as Ld,J as im,c0 as db,ab as J,a6 as be$1,bk as B,I,f,ad as sy,aR as zl,aS as Ql,s as sC,ac as I1,C as Zu,n as lm,p as qC,t as bD,y as cm,M as MD,_ as _t,a3 as XC}from'./main-X6MUEPX4.js';import {d}from'./chunk-C8Zr0vl3.js';import {a as at}from'./chunk-BxBZMjtQ.js';import {v as ve$1}from'./chunk-CaQaYVo7.js';import {F as Fe}from'./chunk-Be4WXTyA.js';import {B as Bn,Z as Ze$1,e as en,R as Rn,J as Jt}from'./chunk-Bfg1Kjif.js';import {v as v$1}from'./chunk-qUlwoHQn.js';import {R}from'./chunk-Dn7TWCfq.js';function Y(t,n){if(t&1&&HC(0),t&2){let e=aC(3);Yl(" ",e.statusData().actionText," - ");}}function Z$1(t,n){t&1&&(Zi(0,"sh-icon"),HC(1,"check"),Wl());}function ee$1(t,n){t&1&&(Zi(0,"sh-icon"),HC(1,"copy"),Wl());}function te$1(t,n){if(t&1){let e=ET();Zi(0,"div",9)(1,"button",10),Hg("click",function(u){Pd(e);let F=aC(4);return Ld(F.copyToClipboard(u,F.tooltipText()))}),lT(2,Z$1,2,0,"sh-icon")(3,ee$1,2,0,"sh-icon"),HC(4," Copy "),Wl(),Zi(5,"p",11),HC(6),Wl()();}if(t&2){let e=aC(4);bE(),vg("color",e.copied()?"success":null),bE(),uT(e.copied()===true?2:3),bE(4),im(e.tooltipText());}}function ne(t,n){if(t&1&&(Zi(0,"div",8),HC(1),Wl(),cg(2,te$1,7,3,"ng-template",null,0,db)),t&2){let e=gC(3),s=aC(3);vg("shTooltip",e),bE(),Yl(" ",s.statusData().fileStatusText," ");}}function ie(t,n){if(t&1&&(Zi(0,"div"),lT(1,Y,1,1),HC(2),Wl(),lT(3,ne,4,2),Ig(4,"sh-progress-bar",7)),t&2){let e=aC(2);bE(),uT(e.backupId()===null?1:-1),bE(),Yl(" ",e.statusData().statusText," "),bE(),uT(e.statusData()?.BackendFileSize?3:-1),bE(),vg("value",e.statusData().progress*100);}}function oe(t,n){if(t&1&&(Zi(0,"div",5),Fg(1,1),Ig(2,"sh-icon"),sb(3,"relativeTime"),sb(4,"date"),jg(),Wl()),t&2){let e=aC(2);bE(4),Vg(e.nextBackup().backup?.Backup?.Name)(cb(3,3,e.nextBackup().time))(lb(4,5,e.nextBackup().time,"shortTime")),iC(1);}}function ae(t,n){t&1&&(Zi(0,"div",5),oC(1,2),Wl());}function se(t,n){t&1&&(Zi(0,"div",6),Fg(1,3),Ig(2,"sh-spinner"),jg(),Wl()),t&2&&(bE(2),Yg("--spinner-size","12px")("--spinner-thickness","2px"));}function re(t,n){if(t&1&&(Zi(0,"div",4),lT(1,ie,5,4)(2,oe,5,8,"div",5)(3,ae,2,0,"div",5)(4,se,3,4,"div",6),Wl()),t&2){let e=aC();bE(),uT(e.isActive()?1:!e.backupId()&&(e.nextBackup().backup||e.nextBackup().time)?2:!e.backupId()&&!e.serverState()?.ActiveTask?3:e.backupId()?-1:4);}}var W=class t{backupId=E1(null);#e=T(D);#t=T(m);statusData=this.#e.statusData;serverState=this.#e.serverState;isActive=Nt(()=>this.#e.runningBackupId()!==null);isTargetRunningTask=Nt(()=>{let n=this.backupId();return n?String(this.#e.runningBackupId())===String(n):true});isVisible=Nt(()=>this.backupId()?this.isActive()?this.isTargetRunningTask():false:true);nextBackup=Nt(()=>{this.#t.backups();return {backup:this.serverState()?.ProposedSchedule?.[0]?.backup,time:this.serverState()?.ProposedSchedule?.[0]?.Item2}});tooltipText=Nt(()=>{let n=this.statusData();return n?.CurrentFilename?`${n.CurrentFilename}`:""});copied=Ge$1(false);copiedTimeout;copyToClipboard(n,e){n.stopPropagation(),navigator.clipboard.writeText(e),this.copied.set(true),this.copiedTimeout=setTimeout(()=>{this.copied.set(false);},2e3);}tooltipTrigger=Ge$1(true);tooltipTriggerEffect=Qa(()=>{this.tooltipText(),this.tooltipTrigger.update(n=>!n),this.copiedTimeout&&(clearTimeout(this.copiedTimeout),this.copiedTimeout=void 0,this.copied.set(false));});static \u0275fac=function(e){return new(e||t)};static \u0275cmp=gw({type:t,selectors:[["app-backup-progress"]],hostVars:2,hostBindings:function(e,s){e&2&&Kg("is-visible",s.isVisible());},inputs:{backupId:[1,"backupId"]},features:[JC([m$3])],decls:1,vars:1,consts:()=>{let n;n=$localize` ${"\uFFFD0\uFFFD"}:INTERPOLATION: - ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:clock${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: ${"\uFFFD1\uFFFD"}:INTERPOLATION_1: at ${"\uFFFD2\uFFFD"}:INTERPOLATION_2: `;let e;e=$localize`No scheduled tasks`;let s;return s=$localize` Loading ${"\uFFFD#2\uFFFD"}:START_TAG_SH_SPINNER:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_SPINNER:`,[["fileStatusTooltip",""],n,e,s,[1,"progress-section"],[1,"label"],[1,"label","label-loading"],[1,"raised","primary",3,"value"],[1,"file-status-text",3,"shTooltip"],[1,"tooltip-status-content"],["shButton","","size","small",3,"click","color"],[1,"tooltip-file-status-text"]]},template:function(e,s){e&1&&lT(0,re,5,1,"div",4),e&2&&uT(s.isVisible()?0:-1);},dependencies:[N,v,m$1,d,at,m$2,ci],styles:["[_nghost-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%;gap:.5rem}[_nghost-%COMP%]:not(.is-visible){display:none}.file-status-text[_ngcontent-%COMP%]{color:var(--base-8)}.file-status-text[_ngcontent-%COMP%]:empty{display:none}.tooltip-file-status-text[_ngcontent-%COMP%]{overflow-wrap:break-word;word-break:break-word;display:inline-block;margin-bottom:.25rem}.tooltip-status-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.progress-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:0;min-width:18.75rem;flex:1 0}.progress-section[_ngcontent-%COMP%] sh-progress-bar[_ngcontent-%COMP%]{margin-top:.25rem}app-status-bar[_nghost-%COMP%] sh-progress-bar[_ngcontent-%COMP%], app-status-bar [_nghost-%COMP%] sh-progress-bar[_ngcontent-%COMP%]{position:absolute;bottom:0;left:0;right:0;width:100%;max-width:initial;margin-top:0}.label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.label-loading[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.25rem}"]})};function ye(o,t){o&1&&(Zi(0,"sh-icon",2),HC(1,"x-bold"),Wl());}function be(o,t){o&1&&(Zi(0,"sh-icon",3),HC(1,"list-bold"),Wl());}function ve(o,t){if(o&1){let n=ET();Zi(0,"button",1),Hg("click",function(){Pd(n);let i=aC();return Ld(i.toggleNav())}),lT(1,ye,2,0,"sh-icon",2)(2,be,2,0,"sh-icon",3),Wl();}if(o&2){let n=aC();bE(),uT(n.isNavOpen()?1:2);}}var V=class o{#e=T(m$4);isNavOpen=this.#e.isNavOpen;isMobile=this.#e.isMobile;toggleNav(){this.#e.toggleNav();}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=gw({type:o,selectors:[["app-mobile-menu-toggle"]],decls:1,vars:1,consts:[["shButton","",1,"small","toggle-sidebar","ghost"],["shButton","",1,"small","toggle-sidebar","ghost",3,"click"],[1,"cross"],[1,"burger"]],template:function(n,e){n&1&&lT(0,ve,3,1,"button",0),n&2&&uT(e.isMobile()?0:-1);},dependencies:[v,N],styles:["[_nghost-%COMP%]{display:contents}.toggle-sidebar[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:center}.toggle-sidebar[_ngcontent-%COMP%] .cross[_ngcontent-%COMP%], .toggle-sidebar[_ngcontent-%COMP%] .burger[_ngcontent-%COMP%]{opacity:1;transition:opacity 124ms linear;margin:0}.toggle-sidebar[_ngcontent-%COMP%] .cross.hidden[_ngcontent-%COMP%], .toggle-sidebar[_ngcontent-%COMP%] .burger.hidden[_ngcontent-%COMP%]{opacity:0}"]})};var Re=()=>["/connect/logon"];function Be(o,t){o&1&&(Fg(0,0,1),Ig(1,"div",9),jg());}function ke(o,t){o&1&&(Fg(0,0,2),Ig(1,"div",10),jg());}function Le(o,t){if(o&1){let n=ET();Zi(0,"div",8),Hg("click",function(){Pd(n);let i=aC();return Ld(i.resetAndRetry())}),Fg(1,0),lT(2,Be,2,0)(3,ke,2,0),jg(),Wl();}if(o&2){let n=aC();bE(2),uT(n.resetting()?2:3);}}function Ge(o,t){o&1&&(Zi(0,"div",6),Fg(1,1),Ig(2,"div",11),jg(),Wl()),o&2&&vg("routerLink",XC(1,Re));}function xe(o,t){o&1&&(Zi(0,"div",6),Fg(1,2),Ig(2,"div",10),jg(),Wl()),o&2&&vg("routerLink",XC(1,Re));}function $e(o,t){if(o&1){let n=ET();Zi(0,"div",7),Fg(1,3),Zi(2,"sh-icon",12),Hg("click",function(){Pd(n);let i=aC();return Ld(i.cancel())}),Wl(),Zi(3,"div",13),Hg("click",function(){Pd(n);let i=aC();return Ld(i.claim())}),Wl(),Ig(4,"div",14),jg(),Wl();}}function Ue(o,t){if(o&1){let n=ET();Zi(0,"div",8),Hg("click",function(){Pd(n);let i=aC();return Ld(i.openConsole())}),Fg(1,4),Ig(2,"div",15),jg(),Wl();}}var x=class o{#e=T(v$1);state=this.#e.state;resetting=Ge$1(false);stateEffect=Qa(()=>{let t=this.#e.state(),n=this.resetting();t==="registered"&&n&&(this.resetting.set(false),this.#e.beginRemoteRegistration());});ngOnInit(){this.#e.refreshRemoteControlStatus();}claim(){let t=this.#e.claimUrl();t&&window.open(t,"_blank");}cancel(){this.#e.cancelRemoteRegistration();}resetAndRetry(){this.resetting.set(true),this.#e.cancelRemoteRegistration();}openConsole(){this.#e.openConsole();}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=gw({type:o,selectors:[["app-remote-connectivity-status"]],decls:5,vars:1,consts:()=>{let t;t=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF: Resetting ${"\uFFFD#1:1\uFFFD"}:START_TAG_DIV:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_DIV:${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE: Click to connect ${"\uFFFD#1:2\uFFFD"}:START_TAG_DIV_1:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_DIV:${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,t=sC(t);let n;n=$localize` Connecting ${"\uFFFD#2\uFFFD"}:START_TAG_DIV:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_DIV:`;let e;e=$localize` Click to register ${"\uFFFD#2\uFFFD"}:START_TAG_DIV:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_DIV:`;let i;i=$localize`Cancel registration`;let a;a=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:x-circle${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD#3\uFFFD"}:START_TAG_DIV:Click to claim${"[\uFFFD/#3\uFFFD|\uFFFD/#4\uFFFD]"}:CLOSE_TAG_DIV:${"\uFFFD#4\uFFFD"}:START_TAG_DIV_1:${"[\uFFFD/#3\uFFFD|\uFFFD/#4\uFFFD]"}:CLOSE_TAG_DIV:`,a=sC(a);let u;return u=$localize` Connected ${"\uFFFD#2\uFFFD"}:START_TAG_DIV:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_DIV:`,[t,n,e,a,u,[1,"connectivity-status"],[1,"connectivity-status",3,"routerLink"],[1,"connectivity-status","claim"],[1,"connectivity-status",3,"click"],[1,"status","blinking"],[1,"status"],[1,"status","warning","blinking"],["shTooltip",i,3,"click"],[1,"claim",3,"click"],[1,"status","success","blinking"],[1,"status","success"]]},template:function(n,e){if(n&1&&lT(0,Le,4,1,"div",5)(1,Ge,3,2,"div",6)(2,xe,3,2,"div",6)(3,$e,5,0,"div",7)(4,Ue,3,0,"div",5),n&2){let i=e.state()==="unknown"||e.state()==="inactive"||e.state()==="registeringfaulted",a=e.state()==="registeringfaulted",u=e.state()==="registering",r=e.state()==="registered",M=e.state()==="connected"||e.state()==="disabled"||e.state()==="connecting";uT(a?0:u?1:i?2:r?3:M?4:-1);}},dependencies:[_t,N,at],styles:["[_nghost-%COMP%]{display:flex;align-items:center;padding:0 .75rem}@media only screen and (max-width:768px){[_nghost-%COMP%]{padding:0}}.hide-text[_nghost-%COMP%]{font-size:0}.in-menu[_nghost-%COMP%]{padding:.75rem;border-bottom:1px solid var(--base-4)}.connectivity-status[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;cursor:pointer}.connectivity-status[_ngcontent-%COMP%]:hover{color:var(--primary-8)}.connectivity-status.claim[_ngcontent-%COMP%]{display:flex;gap:.5rem;cursor:pointer}.connectivity-status.claim[_ngcontent-%COMP%]:hover{color:inherit}.connectivity-status.claim[_ngcontent-%COMP%] .claim[_ngcontent-%COMP%]:hover{color:var(--primary-8)}.connectivity-status.claim[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]:hover{color:var(--error-8)}.status[_ngcontent-%COMP%]{width:.625rem;height:.625rem;border-radius:50%;background-color:var(--base-4)}.status.success[_ngcontent-%COMP%]{background-color:var(--success-8)}.status.warning[_ngcontent-%COMP%]{background-color:var(--warn-8)}.status.blinking[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_blinking 1s infinite}@keyframes _ngcontent-%COMP%_blinking{0%{opacity:.2}50%{opacity:1}to{opacity:.2}}"]})};var Pe={Byte:"B",KByte:"KB",MByte:"MB",GByte:"GB",TByte:"TB",PByte:"PB"},we=["mbps","gbps"],Ae=8,q=1024,H=q*1024,Q=H*1024,ee=Q*1024,he=ee*1024,Ve={B:1,KB:q,MB:H,GB:Q,TB:ee,PB:he},He=1e3,Z=He*1e3,j=Z*1e3,Ye=[{threshold:he,unitPrefix:"PByte"},{threshold:ee,unitPrefix:"TByte"},{threshold:Q,unitPrefix:"GByte"},{threshold:H,unitPrefix:"MByte"},{threshold:q,unitPrefix:"KByte"},{threshold:1,unitPrefix:"Byte"}],$=class o{#e=T(J);closed=I1();isSubmitting=Ge$1(false);sizeOptions=Ge$1([...we]);maxUpload=Ge$1(0);maxDownload=Ge$1(0);maxUploadUnit=Ge$1("mbps");maxDownloadUnit=Ge$1("mbps");ngOnInit(){this.init();}convertToBitsPerSecondUnits(t,n){let i=t*(Ve[n.toUpperCase()]||H)*Ae;return i===0?{value:0,unit:"mbps"}:i>=j?{value:parseFloat((i/j).toFixed(2)),unit:"gbps"}:{value:parseFloat((i/Z).toFixed(2)),unit:"mbps"}}convertFromBitsPerSecondUnits(t,n){let e=0;switch(n){case "gbps":e=t*j;break;case "mbps":e=t*Z;break}let i=e/Ae;if(i===0)return {valueForApi:0,unitPrefixForApi:"Byte"};for(let{threshold:a,unitPrefix:u}of Ye)if(i>=a)return {valueForApi:Math.round(i/a),unitPrefixForApi:u};return {valueForApi:Math.round(i),unitPrefixForApi:"Byte"}}init(){sy(()=>this.#e.getApiV1Serversettings()).subscribe({next:t=>{let n=t?.["max-upload-speed"],e=t?.["max-download-speed"];if(n&&n!==""){let i=n.match(/^(\d+(?:\.\d+)?)([A-Za-z]+)$/);if(i){let a=parseFloat(i[1]),u=i[2],r=this.convertToBitsPerSecondUnits(a,u);this.maxUpload.set(r.value),this.maxUploadUnit.set(r.unit);}else console.warn("Unexpected max-upload-speed format from API:",n),this.resetUpload();}else this.resetUpload();if(e&&e!==""){let i=e.match(/^(\d+(?:\.\d+)?)([A-Za-z]+)$/);if(i){let a=parseFloat(i[1]),u=i[2],r=this.convertToBitsPerSecondUnits(a,u);this.maxDownload.set(r.value),this.maxDownloadUnit.set(r.unit);}else console.warn("Unexpected max-download-speed format from API:",e),this.resetDownload();}else this.resetDownload();},error:t=>{console.error("Failed to get server settings:",t),this.resetDownload(),this.resetUpload();}});}resetDownload(){this.maxDownload.set(0),this.maxDownloadUnit.set("mbps");}resetUpload(){this.maxUpload.set(0),this.maxUploadUnit.set("mbps");}blockDecimalKeys(t){if([".",","].includes(t.key))return t.preventDefault()}cleanupInputAfterPasting(t){t.preventDefault();let n=t.clipboardData?.getData("text/plain");if(!n)return;let e=n.replaceAll(/[\.,]/g,"");t.target.value=e;}submit(){this.isSubmitting.set(true);let t="",n="",e=this.maxUpload()??0,i=this.maxUploadUnit(),a=this.maxDownload()??0,u=this.maxDownloadUnit();if(e>0){let{valueForApi:r,unitPrefixForApi:M}=this.convertFromBitsPerSecondUnits(e,i),y=Pe[M];y?t=`${r}${y}`:console.error(`Invalid unit prefix for API submission (upload): ${M}. Defaulting to empty string.`);}if(a){let{valueForApi:r,unitPrefixForApi:M}=this.convertFromBitsPerSecondUnits(a,u),y=Pe[M];y?n=`${r}${y}`:console.error(`Invalid unit prefix for API submission (download): ${M}. Defaulting to empty string.`);}sy(()=>this.#e.patchApiV1Serversettings({body:{"max-upload-speed":t,"max-download-speed":n}})).pipe(Zu(()=>this.isSubmitting.set(false))).subscribe({next:()=>{this.closed.emit(true);},error:r=>{console.error("Failed to submit throttle settings:",r);}});}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=gw({type:o,selectors:[["app-throttle-settings-dialog"]],outputs:{closed:"closed"},decls:26,vars:10,consts:()=>{let t;t=$localize`Throttle network speed`;let n;n=$localize`We will round bits to the nearest byte value.`;let e;e=$localize`Max upload speed`;let i;i=$localize`Max download speed`;let a;a=$localize`Cancel`;let u;return u=$localize` Update settings `,[t,n,e,i,a,u,["content",""],[1,"column"],[1,"field-row"],["type","number",3,"paste","keydown","ngModelChange","ngModel"],[3,"isClearable","options"],["type","text",3,"ngModelChange","ngModel"],["footer",""],["shButton","",3,"click"],["shButton","",1,"raised","primary",3,"click"]]},template:function(n,e){n&1&&(Zi(0,"header")(1,"h3"),oC(2,0),Wl(),Zi(3,"p"),oC(4,1),Wl()(),Zi(5,"div",6)(6,"div",7)(7,"div",8)(8,"label"),oC(9,2),Wl(),Zi(10,"sh-form-field")(11,"input",9),Hg("paste",function(a){return e.cleanupInputAfterPasting(a)})("keydown",function(a){return e.blockDecimalKeys(a)}),lm("ngModelChange",function(a){return qC(e.maxUpload,a)||(e.maxUpload=a),a}),Wl(),bD(),Wl(),Zi(12,"sh-select",10)(13,"input",11),lm("ngModelChange",function(a){return qC(e.maxUploadUnit,a)||(e.maxUploadUnit=a),a}),Wl(),bD(),Wl()(),Zi(14,"div",8)(15,"label"),oC(16,3),Wl(),Zi(17,"sh-form-field")(18,"input",9),Hg("paste",function(a){return e.cleanupInputAfterPasting(a)})("keydown",function(a){return e.blockDecimalKeys(a)}),lm("ngModelChange",function(a){return qC(e.maxDownload,a)||(e.maxDownload=a),a}),Wl(),bD(),Wl(),Zi(19,"sh-select",10)(20,"input",11),lm("ngModelChange",function(a){return qC(e.maxDownloadUnit,a)||(e.maxDownloadUnit=a),a}),Wl(),bD(),Wl()()()(),Zi(21,"footer",12)(22,"button",13),Hg("click",function(){return e.closed.emit(false)}),oC(23,4),Wl(),Zi(24,"button",14),Hg("click",function(){return e.submit()}),oC(25,5),Wl()()),n&2&&(bE(11),cm("ngModel",e.maxUpload),MD(),bE(),vg("isClearable",false)("options",e.sizeOptions()),bE(),cm("ngModel",e.maxUploadUnit),MD(),bE(5),cm("ngModel",e.maxDownload),MD(),bE(),vg("isClearable",false)("options",e.sizeOptions()),bE(),cm("ngModel",e.maxDownloadUnit),MD(),bE(4),Kg("loading",e.isSubmitting()));},dependencies:[Bn,Ze$1,en,Rn,Jt,Fe,Nt$1,v],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" "input select";grid-template-columns:1fr auto;align-items:center;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{grid-area:label}.field-row[_ngcontent-%COMP%] sh-form-field[_ngcontent-%COMP%]{grid-area:input}.field-row[_ngcontent-%COMP%] sh-select[_ngcontent-%COMP%]{grid-area:select}']})};function ze(o,t){o&1&&Ig(0,"app-remote-connectivity-status");}function Je(o,t){if(o&1){let n=ET();Zi(0,"button",7),Hg("click",function(){Pd(n);let i=aC(2);return Ld(i.abort())}),Fg(1,1),Ig(2,"sh-icon"),jg(),Wl();}}function Xe(o,t){if(o&1){let n=ET();Zi(0,"button",7),Hg("click",function(){Pd(n);let i=aC(2);return Ld(i.stop())}),Fg(1,2),Ig(2,"sh-icon"),jg(),Wl();}}function Ke(o,t){if(o&1&&lT(0,Je,3,0,"button",14)(1,Xe,3,0,"button",14),o&2){let n=aC();uT(n.isStopping()?0:1);}}function We(o,t){o&1&&(Fg(0,0,1),Ig(1,"sh-icon"),jg());}function je(o,t){o&1&&(Fg(0,0,2),Ig(1,"sh-icon"),jg());}function Ze(o,t){o&1&&Ig(0,"app-remote-connectivity-status",10);}function qe(o,t){o&1&&Ig(0,"app-remote-connectivity-status",12);}function Qe(o,t){if(o&1){let n=ET();Zi(0,"button",13),Hg("click",function(){Pd(n);let i=aC();return Ld(i.isStopping()?i.abort():i.stop())}),Zi(1,"sh-icon"),HC(2),Wl(),HC(3),Wl();}if(o&2){let n=aC();bE(2),im(n.isStopping()?"skull":"stop"),bE(),Yl(" ",n.isStopping()?"Abort":"Stop"," ");}}var te=class o{#e=T(J);#t=T(D);#n=T(be$1);#a=T(B);#i=T(I);#s=T(f);#l=T(R);clientIsRunning=this.#t.clientIsRunning;isResuming=this.#t.isResuming;runningTask=Nt(()=>this.#a.serverState()?.ActiveTask?.Item1);isStopping=Nt(()=>this.runningTask()==this.#o());#o=Ge$1(-1);isUsingRelay=this.#i.relayIsEnabled;hideConsoleConnectionStatus=this.#l.isConsoleConnectionStatusHidden;openThrottleSettingsDialog(){this.#n.open($,{maxWidth:"550px",width:"100%"});}openPauseDialog(){this.#n.open(z,{maxWidth:"550px",width:"100%"});}pauseResume(){if(this.clientIsRunning()){this.openPauseDialog();return}this.#t.pauseResume().subscribe();}stop(){let t=this.runningTask();t&&(this.#o.set(t),sy(()=>this.#e.postApiV1TaskByTaskidStop({path:{taskid:t}})).subscribe());}abort(){let t=this.runningTask();t&&sy(()=>this.#e.postApiV1TaskByTaskidAbort({path:{taskid:t}})).subscribe();}ngAfterViewInit(){let t=this.#i.relayIsEnabled()||!this.#s.hasWebSocket()?"longpoll":"websocket";this.#t.setConnectionMethod(t);}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=gw({type:o,selectors:[["app-status-bar"]],decls:31,vars:10,consts:()=>{let t;t=$localize`${"\uFFFD*9:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:pause${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_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_SH_ICON:play${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Resume ${"\uFFFD/*10:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,t=sC(t);let n;n=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:skull${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Abort `;let e;return e=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:stop${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Stop `,[t,n,e,[1,"current-backup"],[1,"global-progress"],[1,"current-backup-actions"],[1,"desktop-actions"],["shButton","",3,"click"],[1,"mobile-actions"],["shButton","",1,"small","menu-mobile-toggle"],[1,"hide-text"],["menu",""],[1,"in-menu"],[3,"click"],["shButton",""]]},template:function(n,e){n&1&&(Zi(0,"div",3),Ig(1,"app-mobile-menu-toggle")(2,"app-backup-progress",4),Zi(3,"div",5)(4,"div",6),lT(5,ze,1,0,"app-remote-connectivity-status"),lT(6,Ke,2,1),Zi(7,"button",7),Hg("click",function(){return e.pauseResume()}),Fg(8,0),lT(9,We,2,0)(10,je,2,0),jg(),Wl(),Zi(11,"button",7),Hg("click",function(){return e.openThrottleSettingsDialog()}),Zi(12,"sh-icon"),HC(13,"speedometer"),Wl()()(),Zi(14,"div",8)(15,"sh-menu")(16,"button",9),lT(17,Ze,1,0,"app-remote-connectivity-status",10),Zi(18,"sh-icon"),HC(19,"dots-three-vertical-bold"),Wl()(),zl(20,11),lT(21,qe,1,0,"app-remote-connectivity-status",12),lT(22,Qe,4,2,"button"),Zi(23,"button",13),Hg("click",function(){return e.pauseResume()}),Zi(24,"sh-icon"),HC(25),Wl(),HC(26),Wl(),Zi(27,"button",13),Hg("click",function(){return e.openThrottleSettingsDialog()}),Zi(28,"sh-icon"),HC(29,"speedometer"),Wl(),HC(30," Throttle Settings "),Wl(),Ql(),Wl()()()()),n&2&&(bE(5),uT(!e.isUsingRelay()&&!e.hideConsoleConnectionStatus()?5:-1),bE(),uT(e.runningTask()?6:-1),bE(),Kg("loading",e.isResuming()),bE(2),uT(e.clientIsRunning()?9:10),bE(8),uT(!e.isUsingRelay()&&!e.hideConsoleConnectionStatus()?17:-1),bE(4),uT(!e.isUsingRelay()&&!e.hideConsoleConnectionStatus()?21:-1),bE(),uT(e.runningTask()?22:-1),bE(3),im(e.clientIsRunning()?"pause":"play"),bE(),Yl(" ",e.clientIsRunning()?"Pause":"Resume"," "));},dependencies:[x,N,v,ve$1,V,W],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);position:sticky;top:0;z-index:2000;background:var(--base-1)}[_nghost-%COMP%]:has(sh-progress-bar){padding:1rem 1rem 1.5rem}.current-backup[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%;gap:.5rem}.global-progress[_ngcontent-%COMP%]{flex:1 0;min-width:18.75rem}.current-backup-actions[_ngcontent-%COMP%], .current-backup-actions[_ngcontent-%COMP%] .desktop-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}@media only screen and (max-width:768px){.current-backup-actions[_ngcontent-%COMP%] .desktop-actions[_ngcontent-%COMP%]{display:none}}.current-backup-actions[_ngcontent-%COMP%] .mobile-actions[_ngcontent-%COMP%]{display:none}@media only screen and (max-width:768px){.current-backup-actions[_ngcontent-%COMP%] .mobile-actions[_ngcontent-%COMP%]{display:flex}}.current-backup-actions[_ngcontent-%COMP%] .menu-mobile-toggle[_ngcontent-%COMP%]{position:relative}.current-backup-actions[_ngcontent-%COMP%] .menu-mobile-toggle[_ngcontent-%COMP%] app-remote-connectivity-status[_ngcontent-%COMP%]{position:absolute;top:-.25rem;right:-.25rem}.menu-status-item[_ngcontent-%COMP%]{padding:.5rem 1rem;display:flex;flex-direction:column;gap:.25rem;border-bottom:1px solid var(--base-4);margin-bottom:.25rem}.menu-status-item[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem;font-size:.875rem}"]})};export{W,te as t};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {g as gw,S as lC,Y as uC}from'./main-
|
|
1
|
+
import {g as gw,S as lC,Y as uC}from'./main-X6MUEPX4.js';var o=["*"],c=(()=>{class t{static{this.\u0275fac=function(e){return new(e||t)};}static{this.\u0275cmp=gw({type:t,selectors:[["sh-list"]],hostAttrs:["role","list"],ngContentSelectors:o,decls:1,vars:0,template:function(e,n){e&1&&(lC(),uC(0));},styles:[`.sh-sortable{position:relative}.sh-sortable.dragging [draggable],.sh-sortable.dragging .sortable-ghost{cursor:grabbing;transition:transform 40ms linear}.sh-sortable [draggable]{transform:translate(0);transition:none;z-index:2;-webkit-user-select:none;user-select:none}.sh-sortable:not(.sh-sortable-tree) [draggable]{background:var(--base-1)}.sh-sortable:not(.sh-sortable-tree) [draggable]:not(:has([sort-handle])){cursor:grab}.sh-sortable .sortable-ghost{opacity:.5;z-index:10}.sh-sortable.item-dragged-out .sortable-ghost{display:none}.sh-sortable [sort-handle]{cursor:grab}.sh-sortable.sh-sortable-tree [draggable]{transform:none!important;transition:none!important;z-index:auto}.sh-sortable.sh-sortable-tree .sortable-ghost{z-index:0!important}.sh-sortable.sh-sortable-tree .sortable-ghost.drop-before:before,.sh-sortable.sh-sortable-tree .sortable-ghost.drop-after:after{display:none!important}.sh-sortable.sh-sortable-tree .sortable-ghost.drop-inside{outline:none!important;background:inherit!important}.sh-sortable.sh-sortable-tree .drop-inside{background:var(--primary-3)!important;outline:2px solid var(--primary-8)!important;outline-offset:-.125rem;border-radius:var(--shape-1, 4px)}.sh-sortable.sh-sortable-tree .drop-inside .node-icon,.sh-sortable.sh-sortable-tree .drop-inside sh-tree-node .sh-tree-node-left sh-icon{color:var(--primary-8)!important}.sh-sortable.sh-sortable-tree .drop-before{position:relative;z-index:20}.sh-sortable.sh-sortable-tree .drop-before:before{content:"";position:absolute;top:-.1875rem;left:calc(var(--tree-padding-left, 12px) + var(--tree-depth, 0) * var(--tree-indent-step, 12px) + .375rem);right:var(--tree-padding-right, 6px);height:.375rem;background-image:radial-gradient(circle at 3px 3px,var(--primary-8) 3px,transparent 3px),linear-gradient(to right,var(--primary-8),var(--primary-8));background-repeat:no-repeat,no-repeat;background-position:left center,6px center;background-size:6px 6px,100% 2px;z-index:10;pointer-events:none}.sh-sortable.sh-sortable-tree .drop-after{position:relative;z-index:20}.sh-sortable.sh-sortable-tree .drop-after:after{content:"";position:absolute;bottom:-.1875rem;left:calc(var(--tree-padding-left, 12px) + var(--tree-depth, 0) * var(--tree-indent-step, 12px) + .375rem);right:var(--tree-padding-right, 6px);height:.375rem;background-image:radial-gradient(circle at 3px 3px,var(--primary-8) 3px,transparent 3px),linear-gradient(to right,var(--primary-8),var(--primary-8));background-repeat:no-repeat,no-repeat;background-position:left center,6px center;background-size:6px 6px,100% 2px;z-index:10;pointer-events:none}sh-list{--list-s: var(--shape-2);--list-active-bg: var(--base-1);--list-color: var(--base-9);--list-active-bs: none;--list-item-b: 1px solid transparent;--list-item-active-b: 1px solid --list-active-bg;--list-p: 1.25rem 1rem;--list-item-p: .5rem .75rem;--list-item-gap: .5rem;width:100%;padding:var(--list-p);gap:.5rem;display:flex;flex-direction:column}sh-list.base-1{--list-active-bg: var(--base-1);--list-active-bs: var(--box-shadow-20)}sh-list.outlined{--list-active-bg: transparent;--list-active-bs: none;--list-item-b: 1px solid transparent;--list-item-active-b: 1px solid var(--primary-8)}sh-list.type-b{--list-p: 0;--list-item-p: .625rem .75rem;--list-item-gap: .75rem;--list-s: var(--shape-2)}sh-list.type-b>[action],sh-list.type-b>[item]{color:var(--base-10)}sh-list.type-b>[action].active,sh-list.type-b>[action].selected,sh-list.type-b>[item].active,sh-list.type-b>[item].selected{background:rgb(from var(--base-3) r g b/90%);color:var(--base-12)}sh-list.type-b>[action].active sh-icon:first-child,sh-list.type-b>[action].selected sh-icon:first-child,sh-list.type-b>[item].active sh-icon:first-child,sh-list.type-b>[item].selected sh-icon:first-child{color:var(--primary-8)}sh-list.type-b>[action].active .description,sh-list.type-b>[action].selected .description,sh-list.type-b>[item].active .description,sh-list.type-b>[item].selected .description{color:var(--base-9)}sh-list.type-b>[action] sh-icon:first-child,sh-list.type-b>[item] sh-icon:first-child{font-size:1.125rem;color:var(--base-7);transition:color .15s ease}sh-list.type-b>[action] .text-group,sh-list.type-b>[item] .text-group{display:flex;flex-direction:column;flex:1}sh-list.type-b>[action] .label,sh-list.type-b>[item] .label{font:var(--paragraph-30B)}sh-list.type-b>[action] .description,sh-list.type-b>[item] .description{font:var(--paragraph-40);color:var(--base-7);transition:color .15s ease}sh-list.type-b>[action] .shortcut,sh-list.type-b>[item] .shortcut{display:flex;gap:.25rem}sh-list.type-b>[action] .shortcut kbd,sh-list.type-b>[item] .shortcut kbd{font-family:inherit;background:rgb(from var(--base-3) r g b/80%);border:1px solid rgb(from var(--base-4) r g b/60%);color:var(--base-8);border-radius:var(--shape-1);padding:.125rem .375rem;font-size:.6875rem;line-height:1;box-shadow:0 1px #0000001a}sh-list:empty{padding:0}sh-list>[title]{color:var(--base-8);margin:0 .75rem;font:var(--paragraph-30);line-height:1.5rem}sh-list[shsortable] [item]:active{transform:scale(1)}sh-list>[action],sh-list>[item]{border-radius:var(--list-s);padding:var(--list-item-p);font:var(--paragraph-30B);color:var(--list-color);border:var(--list-item-b);display:flex;align-items:center;gap:var(--list-item-gap);width:100%;-webkit-user-select:none;user-select:none;appearance:none;border:0;text-align:left;text-wrap:balance;background-color:transparent;text-decoration:none;transition:transform 125ms linear,box-shadow 125ms linear;transform:scale(1)}sh-list>[action]:active,sh-list>[item]:active{--list-active-bs: var(--box-shadow-10);transform:scale(.98)}sh-list>[action]:focus,sh-list>[item]:focus{outline:none}sh-list>[action]:focus-visible,sh-list>[item]:focus-visible{outline:2px solid var(--primary-8);outline-offset:2px}sh-list>[action] [suffix],sh-list>[item] [suffix]{margin-left:auto;color:var(--base-8)}sh-list :has(input),sh-list>[action]{cursor:pointer}sh-list>[item]:has(input:checked),sh-list>[action]:has(input:checked),sh-list>[action].active,sh-list>[action].selected{--list-color: var(--base-12);background-color:var(--list-active-bg);box-shadow:var(--list-active-bs);border:var(--list-item-active-b)}sh-list.primary>[item]:has(input:checked) sh-icon:first-child,sh-list.primary>[action]:has(input:checked) sh-icon:first-child,sh-list.primary>[action].active sh-icon:first-child,sh-list.primary>[action].selected sh-icon:first-child{color:var(--primary-8)}sh-list.accent>[item]:has(input:checked) sh-icon:first-child,sh-list.accent>[action]:has(input:checked) sh-icon:first-child,sh-list.accent>[action].active sh-icon:first-child,sh-list.accent>[action].selected sh-icon:first-child{color:var(--accent-8)}sh-list.warn>[item]:has(input:checked) sh-icon:first-child,sh-list.warn>[action]:has(input:checked) sh-icon:first-child,sh-list.warn>[action].active sh-icon:first-child,sh-list.warn>[action].selected sh-icon:first-child{color:var(--warn-8)}sh-list.error>[item]:has(input:checked) sh-icon:first-child,sh-list.error>[action]:has(input:checked) sh-icon:first-child,sh-list.error>[action].active sh-icon:first-child,sh-list.error>[action].selected sh-icon:first-child{color:var(--error-8)}sh-list.success>[item]:has(input:checked) sh-icon:first-child,sh-list.success>[action]:has(input:checked) sh-icon:first-child,sh-list.success>[action].active sh-icon:first-child,sh-list.success>[action].selected sh-icon:first-child{color:var(--success-8)}
|
|
2
2
|
`],encapsulation:2});}}return t})();export{c};
|