@duplicati/ngclient 0.0.219 → 0.0.221
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/assets/dest-icons/drime.png +0 -0
- package/{chunk-7C2YZVSQ.js → chunk-3L3SRTPU.js} +1 -1
- package/{chunk-DJXLNIMV.js → chunk-43WATFQS.js} +6 -6
- package/chunk-5JGSXUKD.js +1 -0
- package/chunk-5YE4H57F.js +1 -0
- package/{chunk-PG4G4RLP.js → chunk-5ZRRLJA4.js} +1 -1
- package/{chunk-XDBSTUYC.js → chunk-6NVCDJR6.js} +1 -1
- package/{chunk-WOKYULBU.js → chunk-736PM4LG.js} +1 -1
- package/{chunk-XXVDL5TR.js → chunk-77IXQ4GU.js} +1 -1
- package/chunk-APSPCDGV.js +1 -0
- package/chunk-AXQQEOTT.js +1 -0
- package/{chunk-EADZVBRA.js → chunk-BMACDVWX.js} +1 -1
- package/{chunk-3RCF6UT4.js → chunk-COI6UMB5.js} +1 -1
- package/{chunk-RLWICOKH.js → chunk-CZVTBPNE.js} +1 -1
- package/{chunk-GN7AO4B6.js → chunk-DE4JIJWO.js} +1 -1
- package/{chunk-ZHQI6LYB.js → chunk-DHFLXFWF.js} +1 -1
- package/chunk-E4NQOMJX.js +1 -0
- package/chunk-ESLC5LVP.js +1 -0
- package/{chunk-I6MIXWIT.js → chunk-F2ZC26DC.js} +1 -1
- package/{chunk-BACKG7KA.js → chunk-F3ETZKLK.js} +1 -1
- package/{chunk-RJ2JM7C7.js → chunk-F3JYPWPK.js} +1 -1
- package/{chunk-4OJPTRZJ.js → chunk-FDYBIC4O.js} +1 -1
- package/{chunk-PXI3UZ4R.js → chunk-FR5RTIOE.js} +1 -1
- package/{chunk-NKUA7I47.js → chunk-G2BDKU26.js} +1 -1
- package/{chunk-2J2554EV.js → chunk-GW34KK5A.js} +1 -1
- package/{chunk-22AR7ES3.js → chunk-I5DD3Q6J.js} +1 -1
- package/{chunk-NHS6CQO2.js → chunk-JP2Z2HMH.js} +1 -1
- package/{chunk-EDLHTWBA.js → chunk-JPMKWWZP.js} +1 -1
- package/{chunk-ZP3QZ43W.js → chunk-JSZIISFS.js} +1 -1
- package/chunk-LE24LKH7.js +1 -0
- package/{chunk-X276XFCH.js → chunk-MTL3FBSM.js} +1 -1
- package/{chunk-37ODVJFS.js → chunk-N2GI5QYJ.js} +1 -1
- package/chunk-O56QUSSI.js +2 -0
- package/{chunk-RRDLQLTM.js → chunk-OCUE5GMT.js} +1 -1
- package/{chunk-BZXBH4CN.js → chunk-OJVUCHRP.js} +1 -1
- package/chunk-OL7ADIFI.js +1 -0
- package/{chunk-P4R3ERID.js → chunk-OLWLWDXZ.js} +1 -1
- package/chunk-PPSQGUOL.js +3 -0
- package/{chunk-XEG3CP74.js → chunk-QQWV3FEH.js} +1 -1
- package/{chunk-ZYRB2TUK.js → chunk-RDLRXAJU.js} +1 -1
- package/{chunk-ZNYRWXQR.js → chunk-SACQFUJE.js} +1 -1
- package/{chunk-M3PW6DLD.js → chunk-TISQKN7N.js} +1 -1
- package/{chunk-IFSZJSGH.js → chunk-TVFRVP7K.js} +1 -1
- package/chunk-TWAHUXIN.js +1 -0
- package/{chunk-GRE6GKVP.js → chunk-TZ7MW3NZ.js} +1 -1
- package/{chunk-VC55KFAX.js → chunk-UZ4POLDC.js} +1 -1
- package/{chunk-KDV2OE64.js → chunk-WJBMMY2Y.js} +1 -1
- package/{chunk-NX35OQ3V.js → chunk-XBAZKJ47.js} +1 -1
- package/chunk-XPVATEBM.js +1 -0
- package/{chunk-5RNU5BNO.js → chunk-YMFI2Q2X.js} +1 -1
- package/chunk-YPNN5FBK.js +1 -0
- package/{chunk-C6PICAXB.js → chunk-YYD2JU6T.js} +1 -1
- package/index.html +1 -1
- package/{main-JR6IVB6K.js → main-IUT3IXX4.js} +1 -1
- package/package.json +1 -1
- package/chunk-4OA2FFS5.js +0 -1
- package/chunk-AIAUP7OE.js +0 -1
- package/chunk-C3PQFWVO.js +0 -1
- package/chunk-DSZ644JT.js +0 -1
- package/chunk-EPIYGHPM.js +0 -1
- package/chunk-EXMYBMGI.js +0 -1
- package/chunk-N3NJW75G.js +0 -1
- package/chunk-OHYENIPP.js +0 -1
- package/chunk-QOWXL7ZL.js +0 -1
- package/chunk-QZQS7M3D.js +0 -1
- package/chunk-X4BDJA6L.js +0 -3
- package/chunk-YWUUX3S6.js +0 -1
- package/chunk-ZEFSBETQ.js +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as xe,c as Ae,d as v}from"./chunk-CAQ3XMFP.js";import{a as we}from"./chunk-WOKYULBU.js";import"./chunk-6Q6SSTBK.js";import"./chunk-ANSV4G2K.js";import{b as De}from"./chunk-IQL3REGJ.js";import"./chunk-AIAUP7OE.js";import"./chunk-C6PICAXB.js";import"./chunk-6JS7B4FW.js";import{A as ge,B as Oe,H as Ne,L as he,W as fe,Y as Re,b as ce,c as pe,d as g,e as Fe,f as de,j as ue,p as Te,q as Ce,r as Ee,t as Pe,v as Se,w as me}from"./chunk-VKQQDCUN.js";import{a as b,d as Ie}from"./chunk-DSYNIXJF.js";import{b as ae,d as le,e as _e}from"./chunk-NPFPMA4P.js";import"./chunk-O2SMJYPC.js";import{a as re,d as se}from"./chunk-N2AU7VKX.js";import"./chunk-ZC23RK4J.js";import"./chunk-OPHQNXYO.js";import{$b as u,Ac as ie,Cb as S,Db as s,Eb as r,F as $,Fb as _,L as Q,Mb as y,Qc as A,Sa as a,Tb as c,Ub as p,Vb as m,Wb as L,Xb as X,Yb as G,Zb as h,_ as E,da as w,ea as D,gb as Y,kc as B,nc as x,oc as Z,pa as P,qc as ee,ra as M,sc as oe,tc as te,uc as ne,wb as F,xb as d}from"./chunk-TQTOIWBK.js";import{a as W}from"./chunk-7CGTOI24.js";var $e=()=>["/"];function Me(t,o){t&1&&(s(0,"sh-toggle",25),c(1,5),_(2,"input",28),p(),r())}function ye(t,o){t&1&&(s(0,"span",31),m(1,9),r())}function Le(t,o){if(t&1&&(s(0,"span",31),m(1,10),r()),t&2){let e=u(2);a(),L(e.exportForm.controls.password.errors==null?null:e.exportForm.controls.password.errors.minlength.requiredLength),X(1)}}function Xe(t,o){if(t&1&&_(0,"sh-progress-bar",38),t&2){let e=u(2);B("error",e.calculatePasswordStrength()===1)("warn",e.calculatePasswordStrength()===2)("primary",e.calculatePasswordStrength()===4)("success",e.calculatePasswordStrength()===5),S("value",e.calculatePasswordStrength()*(100/5))}}function Ge(t,o){t&1&&(s(0,"span",31),m(1,11),r())}function Be(t,o){t&1&&(s(0,"span",31),m(1,12),r())}function be(t,o){if(t&1&&(s(0,"span",31),m(1,13),r()),t&2){let e=u(2);a(),L(e.exportForm.controls.repeatPassword.errors==null?null:e.exportForm.controls.repeatPassword.errors.minlength.requiredLength),X(1)}}function ve(t,o){t&1&&(c(0,7,1),_(1,"sh-icon"),p())}function ke(t,o){t&1&&(c(0,7,2),_(1,"sh-icon"),p())}function Ue(t,o){t&1&&(c(0,14,1),_(1,"sh-icon",40),p())}function Ke(t,o){t&1&&(c(0,14,2),_(1,"sh-icon"),p())}function Je(t,o){if(t&1){let e=y();s(0,"button",39),h("click",function(){w(e);let i=u(2);return D(i.copyPassword())}),c(1,14),F(2,Ue,2,0)(3,Ke,2,0),p(),r()}if(t&2){let e=u(2);a(2),d(e.copiedPassword()?2:3)}}function He(t,o){t&1&&(s(0,"sh-alert",37),m(1,15),r())}function ze(t,o){if(t&1){let e=y();s(0,"div",26)(1,"sh-form-field")(2,"label",29),c(3,6),_(4,"sup"),p(),r(),_(5,"input",30),F(6,ye,2,0,"span",31)(7,Le,2,1,"span",31),r(),F(8,Xe,1,9,"sh-progress-bar",32),s(9,"sh-form-field"),_(10,"input",33),F(11,Ge,2,0,"span",31)(12,Be,2,0,"span",31)(13,be,2,1,"span",31),r(),s(14,"div",34)(15,"button",35),h("click",function(){w(e);let i=u();return D(i.showPassword.set(!i.showPassword()))}),c(16,7),F(17,ve,2,0)(18,ke,2,0),p(),r(),s(19,"button",35),h("click",function(){w(e);let i=u();return D(i.generatePassword())}),c(20,8),_(21,"sh-icon"),p(),r(),F(22,Je,4,1,"button",36),r(),F(23,He,2,0,"sh-alert",37),r()}if(t&2){let e=u();a(5),S("type",e.showPassword()?"text":"password"),a(),d(e.exportForm.controls.password.errors!=null&&e.exportForm.controls.password.errors.required?6:e.exportForm.controls.password.errors!=null&&e.exportForm.controls.password.errors.minlength?7:-1),a(2),d(e.exportForm.value.password?8:-1),a(2),S("type",e.showPassword()?"text":"password"),a(),d(e.exportForm.value.repeatPassword&&e.exportForm.value.repeatPassword!==e.exportForm.value.password?11:e.exportForm.controls.repeatPassword.errors!=null&&e.exportForm.controls.repeatPassword.errors.required?12:e.exportForm.controls.repeatPassword.errors!=null&&e.exportForm.controls.repeatPassword.errors.minlength?13:-1),a(6),d(e.showPassword()?17:18),a(5),d(e.showCopyPassword()?22:-1),a(),d(e.exportForm.value.password&&e.exportForm.value.password===e.exportForm.value.repeatPassword?23:-1)}}function Ve(t,o){if(t&1&&(s(0,"div",27)(1,"code"),x(2),r()()),t&2){let e=u();a(2),Z(e.exportedCmd())}}var f=new Ee,k=class t{#o=E(xe);#t=E(Ie);#e=E(ae);#n=E(le);#i=E(se);#r=E(we);isExporting=P(!1);exportType=P("file");exportedCmd=P(null);exportForm=f.group({exportPasswords:f.control(!0),encryption:f.control(!1,[g.required,Ae()]),password:f.control("",[v("encryption",!0,[g.required,g.minLength(3)])]),repeatPassword:f.control("",[v("encryption",!0,[g.required,g.minLength(3)])])});exportFormSignal=De(this.exportForm.valueChanges);encryptionFieldSignal=A(()=>(this.exportFormSignal()?.encryption??!1)&&this.exportType()==="file");activeBackup=A(()=>this.#r.backups().find(o=>o.Backup?.ID===this.#e.snapshot.params.id));showPassword=P(!1);copiedPassword=P(!1);showCopyPassword=P(!1);calculatePasswordStrength=A(()=>{let e=this.exportFormSignal()?.password??"";return this.#o.calculatePasswordStrength(e)});showPasswordEffect=M(()=>{this.showPassword()&&this.exportForm.updateValueAndValidity()});disablePasswordForCommandLine=M(()=>{this.exportType()==="cmd"&&this.exportForm.controls.encryption.setValue(!1)});submit(){this.isExporting.set(!0),this.exportType()==="file"?this.#t.postApiV1AuthIssuetokenByOperation({operation:"export"}).pipe(Q(o=>{let e=T=>{let O=Object.entries(T);return O?"?"+O.filter(([N,C])=>C!=null).map(([N,C])=>`${encodeURIComponent(N)}=${encodeURIComponent(C)}`).join("&"):""},n=this.exportFormSignal()?.password?.length?this.exportFormSignal()?.password:void 0,i=b.BASE||"";return this.#i.get(`${i}/api/v1/backup/${this.#e.snapshot.params.id}/export${e({"export-passwords":this.exportFormSignal()?.exportPasswords??void 0,passphrase:n,token:o.Token})}`,{responseType:"blob",headers:new re(W({},b.HEADERS??{}))})}),$(()=>this.isExporting.set(!1))).subscribe({next:o=>{let n=this.activeBackup()?.Backup?.Name??"Backup",i=this.exportFormSignal()?.encryption?"aes":"json";this.downloadFile(o,`${n}-duplicati-config.${i}`),this.#n.navigate(["/"])},error:o=>{}}):this.#t.getApiV1BackupByIdExportCmdline({id:this.#e.snapshot.params.id,exportPasswords:this.exportFormSignal()?.exportPasswords??void 0,passphrase:this.exportFormSignal()?.password??void 0}).pipe($(()=>this.isExporting.set(!1))).subscribe({next:o=>{this.exportedCmd.set(o.Command??null)},error:o=>{}})}downloadFile(o,e){let n=window.URL.createObjectURL(o),i=document.createElement("a");i.href=n,i.download=e,i.click(),window.URL.revokeObjectURL(n)}async copyPassword(){let o=this.exportForm.controls.password.value;await this.#s(o??""),this.copiedPassword.set(!0)}async#s(o){try{await navigator.clipboard.writeText(o)}catch{try{let n=document.createElement("textarea");n.value=o,document.body.appendChild(n),n.select(),document.execCommand("copy"),document.body.removeChild(n)}catch(n){console.error("Failed to copy text: ",n)}}}generatePassword(){this.copiedPassword.set(!1);let o=this.#o.generate(16);this.exportForm.controls.password.setValue(o),this.exportForm.controls.repeatPassword.setValue(o),this.showCopyPassword.set(!0)}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=Y({type:t,selectors:[["app-export"]],decls:26,vars:13,consts:()=>{let o;o=$localize`${"\uFFFD#6\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let e;e=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SH_ICON:export${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SH_ICON: Export `;let n;n=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SH_ICON:terminal-window${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SH_ICON: As command line `;let i;i=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:file${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: To file `;let T;T=$localize` Export passwords ${"\uFFFD#22\uFFFD\uFFFD/#22\uFFFD"}:TAG_INPUT:`;let O;O=$localize` Encrypt file ${"\uFFFD#2\uFFFD\uFFFD/#2\uFFFD"}:TAG_INPUT:`;let N;N=$localize`Password`;let C;C=$localize`Repeat password`;let U;U=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let R;R=$localize`${"\uFFFD*17:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:eye-slash${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Hide ${"\uFFFD/*17:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*18:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:eye${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Show ${"\uFFFD/*18:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,R=G(R);let K;K=$localize`${"\uFFFD#21\uFFFD"}:START_TAG_SH_ICON:password${"\uFFFD/#21\uFFFD"}:CLOSE_TAG_SH_ICON: Generate password `;let J;J=$localize`Passwords are required`;let H;H=$localize` Passwords must be at least ${"\uFFFD0\uFFFD"}:INTERPOLATION: characters long `;let z;z=$localize`Passwords do not match`;let V;V=$localize`Passwords are required`;let q;q=$localize` Passwords must be at least ${"\uFFFD0\uFFFD"}:INTERPOLATION: characters long `;let I;I=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SH_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Copied password ${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SH_ICON_1:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Copy password ${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,I=G(I);let j;return j=$localize` Tip: Be sure to save your password. If you lose it, you will not be able to import the configuration. `,[o,e,n,i,T,O,U,R,K,J,H,z,V,q,I,j,[1,"actions"],["shButton","",1,"outlined",3,"routerLink"],["shButton","",1,"raised","primary",3,"click","shTooltip","disabled"],["autocomplete","off",3,"formGroup"],[1,"type-b",3,"valueChange","value"],["value","cmd"],["value","file"],[1,"raised","primary"],["type","checkbox","formControlName","exportPasswords"],[1,"primary","raised"],[1,"passwords"],[1,"cmd-output"],["type","checkbox","formControlName","encryption"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",N,"formControlName","password",3,"type"],["error",""],[1,"raised",3,"error","warn","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",C,"formControlName","repeatPassword",3,"type"],[1,"password-actions"],["shButton","","type","button",1,"small",3,"click"],["shButton","","type","button",1,"small","copy"],[1,"primary"],[1,"raised",3,"value"],["shButton","","type","button",1,"small","copy",3,"click"],[1,"sh-success"]]},template:function(e,n){if(e&1&&(s(0,"header")(1,"h3"),x(2," Export backup configuration "),s(3,"div",16)(4,"button",17),c(5,0),_(6,"sh-icon"),p(),r(),s(7,"button",18),h("click",function(){return n.submit()}),c(8,1),_(9,"sh-icon"),p(),r()()(),s(10,"p"),x(11),r()(),s(12,"form",19)(13,"sh-button-group",20),ne("valueChange",function(T){return te(n.exportType,T)||(n.exportType=T),T}),s(14,"button",21),c(15,2),_(16,"sh-icon"),p(),r(),s(17,"button",22),c(18,3),_(19,"sh-icon"),p(),r()(),s(20,"sh-toggle",23),c(21,4),_(22,"input",24),p(),r(),F(23,Me,3,0,"sh-toggle",25),F(24,ze,24,8,"div",26),F(25,Ve,3,1,"div",27),r()),e&2){let i;a(4),S("routerLink",ie(12,$e)),a(3),B("loading",n.isExporting()),S("shTooltip",n.encryptionFieldSignal()?"Remember to copy the password":"")("disabled",n.exportForm.invalid||n.showCopyPassword()&&!n.copiedPassword()||n.encryptionFieldSignal()&&n.exportForm.value.repeatPassword!==n.exportForm.value.password),a(4),ee("#",(i=n.activeBackup())==null||i.Backup==null?null:i.Backup.ID,": ",(i=n.activeBackup())==null||i.Backup==null?null:i.Backup.Name),a(),S("formGroup",n.exportForm),a(),oe("value",n.exportType),a(10),d(n.exportType()==="file"?23:-1),a(),d(n.encryptionFieldSignal()?24:-1),a(),d(n.exportedCmd()?25:-1)}},dependencies:[Pe,ue,pe,ce,Fe,de,Ce,Te,_e,ge,fe,Se,Ne,Oe,me,he,Re],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:3rem}h3[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;justify-content:space-between}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;max-width:31.25rem}.passwords[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.password-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}.copy[_ngcontent-%COMP%] sh-icon.sh-success[_ngcontent-%COMP%]{color:var(--success-8)}.hide[_ngcontent-%COMP%]{display:none}"],changeDetection:0})};export{k as default};
|
|
1
|
+
import{a as xe,c as Ae,d as v}from"./chunk-CAQ3XMFP.js";import{a as we}from"./chunk-736PM4LG.js";import"./chunk-6Q6SSTBK.js";import"./chunk-ANSV4G2K.js";import{b as De}from"./chunk-IQL3REGJ.js";import"./chunk-E4NQOMJX.js";import"./chunk-YYD2JU6T.js";import"./chunk-6JS7B4FW.js";import{A as ge,B as Oe,H as Ne,L as he,W as fe,Y as Re,b as ce,c as pe,d as g,e as Fe,f as de,j as ue,p as Te,q as Ce,r as Ee,t as Pe,v as Se,w as me}from"./chunk-VKQQDCUN.js";import{a as b,d as Ie}from"./chunk-DSYNIXJF.js";import{b as ae,d as le,e as _e}from"./chunk-NPFPMA4P.js";import"./chunk-O2SMJYPC.js";import{a as re,d as se}from"./chunk-N2AU7VKX.js";import"./chunk-ZC23RK4J.js";import"./chunk-OPHQNXYO.js";import{$b as u,Ac as ie,Cb as S,Db as s,Eb as r,F as $,Fb as _,L as Q,Mb as y,Qc as A,Sa as a,Tb as c,Ub as p,Vb as m,Wb as L,Xb as X,Yb as G,Zb as h,_ as E,da as w,ea as D,gb as Y,kc as B,nc as x,oc as Z,pa as P,qc as ee,ra as M,sc as oe,tc as te,uc as ne,wb as F,xb as d}from"./chunk-TQTOIWBK.js";import{a as W}from"./chunk-7CGTOI24.js";var $e=()=>["/"];function Me(t,o){t&1&&(s(0,"sh-toggle",25),c(1,5),_(2,"input",28),p(),r())}function ye(t,o){t&1&&(s(0,"span",31),m(1,9),r())}function Le(t,o){if(t&1&&(s(0,"span",31),m(1,10),r()),t&2){let e=u(2);a(),L(e.exportForm.controls.password.errors==null?null:e.exportForm.controls.password.errors.minlength.requiredLength),X(1)}}function Xe(t,o){if(t&1&&_(0,"sh-progress-bar",38),t&2){let e=u(2);B("error",e.calculatePasswordStrength()===1)("warn",e.calculatePasswordStrength()===2)("primary",e.calculatePasswordStrength()===4)("success",e.calculatePasswordStrength()===5),S("value",e.calculatePasswordStrength()*(100/5))}}function Ge(t,o){t&1&&(s(0,"span",31),m(1,11),r())}function Be(t,o){t&1&&(s(0,"span",31),m(1,12),r())}function be(t,o){if(t&1&&(s(0,"span",31),m(1,13),r()),t&2){let e=u(2);a(),L(e.exportForm.controls.repeatPassword.errors==null?null:e.exportForm.controls.repeatPassword.errors.minlength.requiredLength),X(1)}}function ve(t,o){t&1&&(c(0,7,1),_(1,"sh-icon"),p())}function ke(t,o){t&1&&(c(0,7,2),_(1,"sh-icon"),p())}function Ue(t,o){t&1&&(c(0,14,1),_(1,"sh-icon",40),p())}function Ke(t,o){t&1&&(c(0,14,2),_(1,"sh-icon"),p())}function Je(t,o){if(t&1){let e=y();s(0,"button",39),h("click",function(){w(e);let i=u(2);return D(i.copyPassword())}),c(1,14),F(2,Ue,2,0)(3,Ke,2,0),p(),r()}if(t&2){let e=u(2);a(2),d(e.copiedPassword()?2:3)}}function He(t,o){t&1&&(s(0,"sh-alert",37),m(1,15),r())}function ze(t,o){if(t&1){let e=y();s(0,"div",26)(1,"sh-form-field")(2,"label",29),c(3,6),_(4,"sup"),p(),r(),_(5,"input",30),F(6,ye,2,0,"span",31)(7,Le,2,1,"span",31),r(),F(8,Xe,1,9,"sh-progress-bar",32),s(9,"sh-form-field"),_(10,"input",33),F(11,Ge,2,0,"span",31)(12,Be,2,0,"span",31)(13,be,2,1,"span",31),r(),s(14,"div",34)(15,"button",35),h("click",function(){w(e);let i=u();return D(i.showPassword.set(!i.showPassword()))}),c(16,7),F(17,ve,2,0)(18,ke,2,0),p(),r(),s(19,"button",35),h("click",function(){w(e);let i=u();return D(i.generatePassword())}),c(20,8),_(21,"sh-icon"),p(),r(),F(22,Je,4,1,"button",36),r(),F(23,He,2,0,"sh-alert",37),r()}if(t&2){let e=u();a(5),S("type",e.showPassword()?"text":"password"),a(),d(e.exportForm.controls.password.errors!=null&&e.exportForm.controls.password.errors.required?6:e.exportForm.controls.password.errors!=null&&e.exportForm.controls.password.errors.minlength?7:-1),a(2),d(e.exportForm.value.password?8:-1),a(2),S("type",e.showPassword()?"text":"password"),a(),d(e.exportForm.value.repeatPassword&&e.exportForm.value.repeatPassword!==e.exportForm.value.password?11:e.exportForm.controls.repeatPassword.errors!=null&&e.exportForm.controls.repeatPassword.errors.required?12:e.exportForm.controls.repeatPassword.errors!=null&&e.exportForm.controls.repeatPassword.errors.minlength?13:-1),a(6),d(e.showPassword()?17:18),a(5),d(e.showCopyPassword()?22:-1),a(),d(e.exportForm.value.password&&e.exportForm.value.password===e.exportForm.value.repeatPassword?23:-1)}}function Ve(t,o){if(t&1&&(s(0,"div",27)(1,"code"),x(2),r()()),t&2){let e=u();a(2),Z(e.exportedCmd())}}var f=new Ee,k=class t{#o=E(xe);#t=E(Ie);#e=E(ae);#n=E(le);#i=E(se);#r=E(we);isExporting=P(!1);exportType=P("file");exportedCmd=P(null);exportForm=f.group({exportPasswords:f.control(!0),encryption:f.control(!1,[g.required,Ae()]),password:f.control("",[v("encryption",!0,[g.required,g.minLength(3)])]),repeatPassword:f.control("",[v("encryption",!0,[g.required,g.minLength(3)])])});exportFormSignal=De(this.exportForm.valueChanges);encryptionFieldSignal=A(()=>(this.exportFormSignal()?.encryption??!1)&&this.exportType()==="file");activeBackup=A(()=>this.#r.backups().find(o=>o.Backup?.ID===this.#e.snapshot.params.id));showPassword=P(!1);copiedPassword=P(!1);showCopyPassword=P(!1);calculatePasswordStrength=A(()=>{let e=this.exportFormSignal()?.password??"";return this.#o.calculatePasswordStrength(e)});showPasswordEffect=M(()=>{this.showPassword()&&this.exportForm.updateValueAndValidity()});disablePasswordForCommandLine=M(()=>{this.exportType()==="cmd"&&this.exportForm.controls.encryption.setValue(!1)});submit(){this.isExporting.set(!0),this.exportType()==="file"?this.#t.postApiV1AuthIssuetokenByOperation({operation:"export"}).pipe(Q(o=>{let e=T=>{let O=Object.entries(T);return O?"?"+O.filter(([N,C])=>C!=null).map(([N,C])=>`${encodeURIComponent(N)}=${encodeURIComponent(C)}`).join("&"):""},n=this.exportFormSignal()?.password?.length?this.exportFormSignal()?.password:void 0,i=b.BASE||"";return this.#i.get(`${i}/api/v1/backup/${this.#e.snapshot.params.id}/export${e({"export-passwords":this.exportFormSignal()?.exportPasswords??void 0,passphrase:n,token:o.Token})}`,{responseType:"blob",headers:new re(W({},b.HEADERS??{}))})}),$(()=>this.isExporting.set(!1))).subscribe({next:o=>{let n=this.activeBackup()?.Backup?.Name??"Backup",i=this.exportFormSignal()?.encryption?"aes":"json";this.downloadFile(o,`${n}-duplicati-config.${i}`),this.#n.navigate(["/"])},error:o=>{}}):this.#t.getApiV1BackupByIdExportCmdline({id:this.#e.snapshot.params.id,exportPasswords:this.exportFormSignal()?.exportPasswords??void 0,passphrase:this.exportFormSignal()?.password??void 0}).pipe($(()=>this.isExporting.set(!1))).subscribe({next:o=>{this.exportedCmd.set(o.Command??null)},error:o=>{}})}downloadFile(o,e){let n=window.URL.createObjectURL(o),i=document.createElement("a");i.href=n,i.download=e,i.click(),window.URL.revokeObjectURL(n)}async copyPassword(){let o=this.exportForm.controls.password.value;await this.#s(o??""),this.copiedPassword.set(!0)}async#s(o){try{await navigator.clipboard.writeText(o)}catch{try{let n=document.createElement("textarea");n.value=o,document.body.appendChild(n),n.select(),document.execCommand("copy"),document.body.removeChild(n)}catch(n){console.error("Failed to copy text: ",n)}}}generatePassword(){this.copiedPassword.set(!1);let o=this.#o.generate(16);this.exportForm.controls.password.setValue(o),this.exportForm.controls.repeatPassword.setValue(o),this.showCopyPassword.set(!0)}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=Y({type:t,selectors:[["app-export"]],decls:26,vars:13,consts:()=>{let o;o=$localize`${"\uFFFD#6\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let e;e=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SH_ICON:export${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SH_ICON: Export `;let n;n=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SH_ICON:terminal-window${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SH_ICON: As command line `;let i;i=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:file${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: To file `;let T;T=$localize` Export passwords ${"\uFFFD#22\uFFFD\uFFFD/#22\uFFFD"}:TAG_INPUT:`;let O;O=$localize` Encrypt file ${"\uFFFD#2\uFFFD\uFFFD/#2\uFFFD"}:TAG_INPUT:`;let N;N=$localize`Password`;let C;C=$localize`Repeat password`;let U;U=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let R;R=$localize`${"\uFFFD*17:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:eye-slash${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Hide ${"\uFFFD/*17:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*18:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:eye${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Show ${"\uFFFD/*18:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,R=G(R);let K;K=$localize`${"\uFFFD#21\uFFFD"}:START_TAG_SH_ICON:password${"\uFFFD/#21\uFFFD"}:CLOSE_TAG_SH_ICON: Generate password `;let J;J=$localize`Passwords are required`;let H;H=$localize` Passwords must be at least ${"\uFFFD0\uFFFD"}:INTERPOLATION: characters long `;let z;z=$localize`Passwords do not match`;let V;V=$localize`Passwords are required`;let q;q=$localize` Passwords must be at least ${"\uFFFD0\uFFFD"}:INTERPOLATION: characters long `;let I;I=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SH_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Copied password ${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SH_ICON_1:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Copy password ${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,I=G(I);let j;return j=$localize` Tip: Be sure to save your password. If you lose it, you will not be able to import the configuration. `,[o,e,n,i,T,O,U,R,K,J,H,z,V,q,I,j,[1,"actions"],["shButton","",1,"outlined",3,"routerLink"],["shButton","",1,"raised","primary",3,"click","shTooltip","disabled"],["autocomplete","off",3,"formGroup"],[1,"type-b",3,"valueChange","value"],["value","cmd"],["value","file"],[1,"raised","primary"],["type","checkbox","formControlName","exportPasswords"],[1,"primary","raised"],[1,"passwords"],[1,"cmd-output"],["type","checkbox","formControlName","encryption"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",N,"formControlName","password",3,"type"],["error",""],[1,"raised",3,"error","warn","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",C,"formControlName","repeatPassword",3,"type"],[1,"password-actions"],["shButton","","type","button",1,"small",3,"click"],["shButton","","type","button",1,"small","copy"],[1,"primary"],[1,"raised",3,"value"],["shButton","","type","button",1,"small","copy",3,"click"],[1,"sh-success"]]},template:function(e,n){if(e&1&&(s(0,"header")(1,"h3"),x(2," Export backup configuration "),s(3,"div",16)(4,"button",17),c(5,0),_(6,"sh-icon"),p(),r(),s(7,"button",18),h("click",function(){return n.submit()}),c(8,1),_(9,"sh-icon"),p(),r()()(),s(10,"p"),x(11),r()(),s(12,"form",19)(13,"sh-button-group",20),ne("valueChange",function(T){return te(n.exportType,T)||(n.exportType=T),T}),s(14,"button",21),c(15,2),_(16,"sh-icon"),p(),r(),s(17,"button",22),c(18,3),_(19,"sh-icon"),p(),r()(),s(20,"sh-toggle",23),c(21,4),_(22,"input",24),p(),r(),F(23,Me,3,0,"sh-toggle",25),F(24,ze,24,8,"div",26),F(25,Ve,3,1,"div",27),r()),e&2){let i;a(4),S("routerLink",ie(12,$e)),a(3),B("loading",n.isExporting()),S("shTooltip",n.encryptionFieldSignal()?"Remember to copy the password":"")("disabled",n.exportForm.invalid||n.showCopyPassword()&&!n.copiedPassword()||n.encryptionFieldSignal()&&n.exportForm.value.repeatPassword!==n.exportForm.value.password),a(4),ee("#",(i=n.activeBackup())==null||i.Backup==null?null:i.Backup.ID,": ",(i=n.activeBackup())==null||i.Backup==null?null:i.Backup.Name),a(),S("formGroup",n.exportForm),a(),oe("value",n.exportType),a(10),d(n.exportType()==="file"?23:-1),a(),d(n.encryptionFieldSignal()?24:-1),a(),d(n.exportedCmd()?25:-1)}},dependencies:[Pe,ue,pe,ce,Fe,de,Ce,Te,_e,ge,fe,Se,Ne,Oe,me,he,Re],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:3rem}h3[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;justify-content:space-between}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;max-width:31.25rem}.passwords[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.password-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}.copy[_ngcontent-%COMP%] sh-icon.sh-success[_ngcontent-%COMP%]{color:var(--success-8)}.hide[_ngcontent-%COMP%]{display:none}"],changeDetection:0})};export{k as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as K}from"./chunk-
|
|
1
|
+
import{a as K}from"./chunk-736PM4LG.js";import"./chunk-6Q6SSTBK.js";import{a as z}from"./chunk-IMQUTGIK.js";import"./chunk-ANSV4G2K.js";import"./chunk-E4NQOMJX.js";import"./chunk-YYD2JU6T.js";import"./chunk-6JS7B4FW.js";import{B as U,H as x,I as V,W as j,b as E,c as A,e as y,f as R,j as b,p as B,q as $,r as v,t as G,v as k,x as L,z as w}from"./chunk-VKQQDCUN.js";import{d as J}from"./chunk-DSYNIXJF.js";import{d as O,e as M}from"./chunk-NPFPMA4P.js";import"./chunk-O2SMJYPC.js";import"./chunk-N2AU7VKX.js";import"./chunk-ZC23RK4J.js";import"./chunk-OPHQNXYO.js";import{Ac as N,Cb as p,Db as a,Eb as i,F as T,Fb as u,Sa as l,Tb as D,Ub as h,Vb as _,Yb as I,Zb as d,_ as s,gb as f,kc as P,pa as c,wb as C,xb as S}from"./chunk-TQTOIWBK.js";import"./chunk-7CGTOI24.js";var X=()=>["/"];function H(m,o){m&1&&(a(0,"sh-form-field")(1,"label",14),_(2,3),i(),u(3,"input",15),i())}var F=new v,g=class m{#t=s(L);#o=s(w);#i=s(J);#n=s(K);#e=s(O);isImporting=c(!1);isSecureFile=c(!1);isValid=c(!1);importForm=F.group({config:F.control(""),cmdline:F.control(!1),import_metadata:F.control(!1),direct:F.control(!1),passphrase:F.control("")});selectedFile=c([]);onFileDropped(o){let e=o[0];if(e){let t=new FileReader;this.isSecureFile.set(e.type!=="application/json"),t.onload=this.#r.bind(this),t.readAsArrayBuffer(e)}}#r(o){let e=o.target?.result;this.isSecureFile.set(this.#a(e)!=="json"),this.importForm.patchValue({config:this.#s(e)}),this.isValid.set(this.importForm.value.config!=="")}#a(o){let e=new Uint8Array(o);if(e.length>=5&&e[0]===65&&e[1]===69&&e[2]===83&&e[4]===0)return"aes";try{let t=new TextDecoder().decode(o),n=JSON.parse(t);if(typeof n=="object"&&n!==null)return"json"}catch{}return"unknown"}#s(o){let e=new Uint8Array(o),t=e.byteLength,n="";for(let r=0;r<t;r++)n+=String.fromCharCode(e[r]);return btoa(n)}submit(){this.isImporting.set(!0);let o=this.importForm.value.direct??!1;this.#i.postApiV1BackupsImport({requestBody:this.importForm.value}).pipe(T(()=>this.isImporting.set(!1))).subscribe({next:e=>{if(o){this.#t.success("Backup imported successfully."),this.#e.navigate(["/"]);return}let t=this.#n.addDraftBackup(e.data);this.#e.navigate(["/backup-draft",t])},error:e=>{let t=e.message||$localize`Unknown error`;this.#o.open(z,{data:{title:$localize`Failed to import backup`,message:t,confirmText:$localize`OK`,cancelText:void 0}})}})}static \u0275fac=function(e){return new(e||m)};static \u0275cmp=f({type:m,selectors:[["app-import"]],decls:19,vars:8,consts:()=>{let o;o=$localize` Import backup configuration ${"\uFFFD#3\uFFFD"}:START_TAG_DIV:${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SH_ICON:arrow-left${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SH_ICON: Back ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#6\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SH_ICON:download-simple${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SH_ICON: Import ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_DIV:`,o=I(o);let e;e=$localize`Import Metadata`;let t;t=$localize`Save now`;let n;return n=$localize`Passphrase`,[o,e,t,n,[1,"actions"],["shButton","","type","button",1,"outlined",3,"routerLink"],["shButton","","type","submit",1,"raised","primary",3,"click","disabled"],["autocomplete","off",3,"formGroup"],["accept",".json,.aes",3,"filesChange","files"],[1,"primary","raised"],["for","importMetadata"],["type","checkbox","formControlName","import_metadata"],["for","direct"],["type","checkbox","formControlName","direct"],["for","passphrase"],["type","password","autocomplete","disabled","formControlName","passphrase"]]},template:function(e,t){e&1&&(a(0,"header")(1,"h3"),D(2,0),a(3,"div",4)(4,"button",5),u(5,"sh-icon"),i(),a(6,"button",6),d("click",function(){return t.submit()}),u(7,"sh-icon"),i()(),h(),i()(),a(8,"form",7)(9,"sh-file-upload",8),d("filesChange",function(r){return t.onFileDropped(r)}),i(),C(10,H,4,0,"sh-form-field"),a(11,"sh-toggle",9)(12,"label",10),_(13,1),i(),u(14,"input",11),i(),a(15,"sh-toggle",9)(16,"label",12),_(17,2),i(),u(18,"input",13),i()()),e&2&&(l(4),p("routerLink",N(7,X)),l(2),P("loading",t.isImporting()),p("disabled",t.isImporting()||!t.isValid()),l(2),p("formGroup",t.importForm),l(),p("files",t.selectedFile()),l(),S(t.isSecureFile()?10:-1))},dependencies:[G,b,A,E,y,R,$,B,M,x,k,U,j,V],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:3rem}h3[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;justify-content:space-between}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;max-width:31.25rem}sh-file-upload[_ngcontent-%COMP%]{width:100%}"],changeDetection:0})};export{g as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as v}from"./chunk-TVFRVP7K.js";import"./chunk-QDDVZ4CR.js";import"./chunk-BLSV7CNZ.js";import"./chunk-F2ZC26DC.js";import{q as S}from"./chunk-43WATFQS.js";import"./chunk-CAQ3XMFP.js";import"./chunk-UZ4POLDC.js";import"./chunk-O56QUSSI.js";import"./chunk-F3JYPWPK.js";import{a as D}from"./chunk-736PM4LG.js";import"./chunk-TCXCC5BM.js";import"./chunk-GKGMP6VF.js";import"./chunk-6Q6SSTBK.js";import"./chunk-YCJYEQF7.js";import"./chunk-AXQQEOTT.js";import"./chunk-UTXZPAY6.js";import"./chunk-IMQUTGIK.js";import"./chunk-ANSV4G2K.js";import"./chunk-F3ETZKLK.js";import{b as g}from"./chunk-IQL3REGJ.js";import"./chunk-E4NQOMJX.js";import"./chunk-YYD2JU6T.js";import"./chunk-6JS7B4FW.js";import{L as R,R as L}from"./chunk-VKQQDCUN.js";import{d as I}from"./chunk-DSYNIXJF.js";import{b as A,c as M,e as O,f as y}from"./chunk-NPFPMA4P.js";import"./chunk-O2SMJYPC.js";import"./chunk-N2AU7VKX.js";import"./chunk-ZC23RK4J.js";import"./chunk-OPHQNXYO.js";import{$b as N,Cb as p,Cc as u,D as k,Db as r,Eb as s,Fb as m,Sa as o,Vb as c,_,gb as T,nc as E,pc as b,ra as h,wb as C,xb as f,zc as B}from"./chunk-TQTOIWBK.js";import"./chunk-7CGTOI24.js";var G=(i,e)=>[i,e,"general"],$=(i,e)=>[i,e,"destination"],U=(i,e)=>[i,e,"source-data"],K=(i,e)=>[i,e,"schedule"],F=(i,e)=>[i,e,"options"];function w(i,e){if(i&1&&(r(0,"p"),E(1),s()),i&2){let t=N();o(),b("Editing: ",t.backupName())}}function J(i,e){i&1&&m(0,"sh-progress-bar",7)}function X(i,e){i&1&&(r(0,"section"),m(1,"router-outlet"),s())}var P=class i{#t=_(A);#e=_(S);#i=_(D);#n=_(I);isDraft=this.#e.isDraft;isNew=this.#e.isNew;backupId=this.#e.backupId;backupName=this.#e.backupName;finishedLoading=this.#e.finishedLoading;#a=g(this.#t.params);#o=g(this.#t.url);paramsChanged=h(()=>{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(){this.#n.getApiV1Backupdefaults().pipe(k(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(!0)}})}getBackup(e,t=!1){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(!0)};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 this.#n.getApiV1BackupById({id:e}).subscribe({next:n})}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=T({type:i,selectors:[["app-backup"]],features:[B([S])],decls:16,vars:22,consts:()=>{let e;e=$localize` General `;let t;t=$localize` Destination `;let n;n=$localize` Source Data `;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&&(m(0,"app-status-bar"),r(1,"header"),C(2,w,2,1,"p"),r(3,"sh-stepper",5)(4,"div",6),c(5,0),s(),r(6,"div",6),c(7,1),s(),r(8,"div",6),c(9,2),s(),r(10,"div",6),c(11,3),s(),r(12,"div",6),c(13,4),s()()(),C(14,J,1,0,"sh-progress-bar",7)(15,X,2,0,"section")),t&2&&(o(2),f(n.isNew()?-1:2),o(2),p("routerLink",u(7,G,n.isDraft()?"/backup-draft":"/backup",n.backupId())),o(2),p("routerLink",u(10,$,n.isDraft()?"/backup-draft":"/backup",n.backupId())),o(2),p("routerLink",u(13,U,n.isDraft()?"/backup-draft":"/backup",n.backupId())),o(2),p("routerLink",u(16,K,n.isDraft()?"/backup-draft":"/backup",n.backupId())),o(2),p("routerLink",u(19,F,n.isDraft()?"/backup-draft":"/backup",n.backupId())),o(2),f(n.finishedLoading()?15:14))},dependencies:[M,O,y,v,L,R],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}"],changeDetection:0})};export{P as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as be,b as ve}from"./chunk-7C2YZVSQ.js";import{a as $e}from"./chunk-BLSV7CNZ.js";import{a as X}from"./chunk-EXMYBMGI.js";import"./chunk-RJ2JM7C7.js";import{a as Re}from"./chunk-WOKYULBU.js";import"./chunk-6Q6SSTBK.js";import"./chunk-YCJYEQF7.js";import"./chunk-UTXZPAY6.js";import"./chunk-IMQUTGIK.js";import{a as Ge}from"./chunk-PIGMTUUT.js";import"./chunk-ANSV4G2K.js";import{a as ye}from"./chunk-BACKG7KA.js";import"./chunk-IQL3REGJ.js";import"./chunk-AIAUP7OE.js";import{a as De}from"./chunk-C6PICAXB.js";import{c as Se,e as Me}from"./chunk-6JS7B4FW.js";import{B as R,G as Ne,H as fe,J as Pe,Q as Ie,Y as Le,c as ge,d as Ce,e as Te,i as me,r as he,s as Fe,t as Ee,v as M,w as Y,x as Ae,z as Oe}from"./chunk-VKQQDCUN.js";import{d as J}from"./chunk-DSYNIXJF.js";import{c as ue,e as de,f as pe}from"./chunk-NPFPMA4P.js";import"./chunk-O2SMJYPC.js";import"./chunk-N2AU7VKX.js";import"./chunk-ZC23RK4J.js";import"./chunk-OPHQNXYO.js";import{$b as c,Ab as te,Ac as le,Bb as ne,Cb as F,Db as a,Eb as o,F as j,Fb as _,Mb as N,Qc as B,Sa as r,Tb as p,Ub as S,Vb as f,Vc as _e,Xc as ce,Yb as b,Zb as T,_ as d,_c as K,da as A,ea as O,gb as D,gc as ie,hc as oe,kc as U,mc as L,nc as u,oc as Q,pa as h,pc as v,ra as q,sc as $,tc as H,uc as w,vc as ae,wb as g,wc as se,xb as C,xc as x,yb as ee,yc as re}from"./chunk-TQTOIWBK.js";import{a as z,b as W}from"./chunk-7CGTOI24.js";var ke=["scroller"];function Ue(i,n){i&1&&(a(0,"sh-icon"),u(1,"bell-ringing"),o())}function Be(i,n){i&1&&(a(0,"sh-icon"),u(1,"bell"),o())}function Ye(i,n){if(i&1&&_(0,"app-notification",8),i&2){c(2);let e=x(6);F("index",0)("notification",e.content)}}function Je(i,n){if(i&1&&(a(0,"div",11),u(1),o()),i&2){c(3);let e=x(6);r(),v(" ",e.content.content," ")}}function Xe(i,n){if(i&1&&(a(0,"sh-alert")(1,"div",10),u(2),o(),g(3,Je,2,1,"div",11),o()),i&2){c(2);let e=x(6);L(e.content.type||"error"),r(2),Q(e.content.title),r(),C(e.content.content?3:-1)}}function Ve(i,n){if(i&1&&(a(0,"div",6),g(1,Ye,1,2,"app-notification",8)(2,Xe,4,4,"sh-alert",9),o()),i&2){c();let e=x(6);r(),C(e.type==="notification"?1:2)}}function ze(i,n){if(i&1){let e=N();a(0,"div",7)(1,"div",12)(2,"h6",13),p(3,2),a(4,"button",5),T("click",function(){A(e);let s=c();return O(s.toggleNotifications())}),_(5,"sh-icon"),o(),S(),o(),a(6,"div",14,0)(8,"div",15),_(9,"app-notifications"),o()()()()}}function We(i,n){if(i&1&&(a(0,"div",20),u(1),o()),i&2){let e=c().$implicit;r(),v(" ",e.content," ")}}function je(i,n){if(i&1){let e=N();a(0,"sh-alert",18,1),T("click",function(){let s=A(e).$implicit,l=c(2);return O(l.deleteAlertByIndex(s.id))}),a(2,"div",19),u(3),o(),g(4,We,2,1,"div",20),o()}if(i&2){let e=n.$implicit;L(e.type),F("id",e.id),r(3),Q(e.title),r(),C(e.content?4:-1)}}function qe(i,n){i&1&&(a(0,"p",17),f(1,4),o())}function Qe(i,n){if(i&1){let e=N();a(0,"div",7)(1,"div",12)(2,"h6",13),p(3,3),a(4,"button",5),T("click",function(){A(e);let s=c();return O(s.toggleAlerts())}),_(5,"sh-icon"),o(),S(),o(),a(6,"div",14,0)(8,"div",15),te(9,je,5,5,"sh-alert",16,ee,!1,qe,2,0,"p",17),o()()()()}if(i&2){let e=c();r(9),ne(e.alertHistory())}}var He=new he,k=class i{#e=d(Ae);#t=d(X);isSubmitting=h(!1);messageSent=h(!1);form=He.group({message:He.control("",[Ce.required])});notifications=this.#t.notifications;shownMessage=h(null);shownMessageInterval=null;alertHistory=this.#e.alertHistory;alertHistoryIsOpen=this.#e.alertHistoryIsOpen;alertHistoryIsHidden=this.#e.alertHistoryIsHidden;numberOfOpenAlerts=B(()=>this.alertHistory().filter(n=>n.isOpen).length);scroller=ce("scroller");isAlertsOpen=K(!1);isNotificationsOpen=K(!1);previousHistoryCount=h(null);previousNotificationsCount=h(null);constructor(){q(()=>{let n=this.alertHistory(),e=this.notifications();if(e.length===0){this.shownMessage.set(null);return}e.length&&this.previousHistoryCount()!==n.length&&!this.isNotificationsOpen()?(this.shownMessage.set({content:e[0],countDown:3,type:"notification"}),this.previousHistoryCount.set(n.length),this.shownMessageInterval=setInterval(()=>{let t=this.shownMessage();if(t?.countDown===0){this.shownMessage.set(null),this.shownMessageInterval=null;return}t!==null&&this.shownMessage.update(s=>W(z({},s),{countDown:s.countDown-1}))},1e3)):n.length&&this.previousHistoryCount()!==n.length&&!this.isAlertsOpen()&&(this.shownMessage.set({content:n[0],countDown:3,type:"alert"}),this.previousHistoryCount.set(n.length),this.shownMessageInterval=setInterval(()=>{let t=this.shownMessage();if(t?.countDown===0){this.shownMessage.set(null),this.shownMessageInterval=null;return}t!==null&&this.shownMessage.update(s=>W(z({},s),{countDown:s.countDown-1}))},1e3))}),q(()=>{this.alertHistoryIsOpen(),this.scrollToBottom()})}resetPreviewMessage(){this.shownMessage.set(null),this.shownMessageInterval=null}toggleAlerts(){this.isAlertsOpen()?this.isAlertsOpen.set(!1):(this.isAlertsOpen.set(!0),this.isNotificationsOpen.set(!1),this.resetPreviewMessage())}toggleNotifications(){this.isNotificationsOpen.set(!this.isNotificationsOpen()),this.isAlertsOpen()&&this.isAlertsOpen.set(!1)}deleteAlertByIndex(n){this.#e.removeAlert(n)}scrollToBottom(){this.scroller()&&this.scroller()?.nativeElement&&this.scroller().nativeElement.scrollTo(0,this.scroller().nativeElement.scrollHeight)}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=D({type:i,selectors:[["app-service-hub"]],viewQuery:function(e,t){e&1&&ie(t.scroller,ke,5),e&2&&oe()},inputs:{isAlertsOpen:[1,"isAlertsOpen"],isNotificationsOpen:[1,"isNotificationsOpen"]},outputs:{isAlertsOpen:"isAlertsOpenChange",isNotificationsOpen:"isNotificationsOpenChange"},decls:10,vars:9,consts:()=>{let n;n=$localize` Notifications ${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:x-circle${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_BUTTON:`;let e;e=$localize` Alerts ${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:x-circle${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_BUTTON:`;let t;return t=$localize`No alerts yet`,[["scroller",""],["alerts",""],n,e,t,["shButton","",3,"click"],[1,"preview-alert-wrap"],[1,"alert-stream-modal"],[3,"index","notification"],[3,"class"],["ship-alert-title",""],["ship-alert-content",""],[1,"alert-stream-modal-content"],[1,"paragraph-20"],[1,"alert-stream-modal-list-scroller"],[1,"alert-stream-modal-list"],[3,"class","id"],[1,"no-alerts"],[3,"click","id"],["title",""],["content",""]]},template:function(e,t){if(e&1&&(a(0,"button",5),T("click",function(){return t.toggleAlerts()}),a(1,"sh-icon"),u(2,"info"),o()(),a(3,"button",5),T("click",function(){return t.toggleNotifications()}),g(4,Ue,2,0,"sh-icon")(5,Be,2,0,"sh-icon"),o(),ae(6),g(7,Ve,3,1,"div",6),g(8,ze,10,0,"div",7),g(9,Qe,12,1,"div",7)),e&2){L(t.alertHistory().length?"error":""),r(3),L(t.notifications().length?"error":""),r(),C(t.notifications().length?4:5),r(2);let s=se(t.shownMessage());r(),C(s?7:-1),r(),C(t.isNotificationsOpen()?8:-1),r(),C(t.isAlertsOpen()?9:-1)}},dependencies:[Ee,Y,M,R,ve,be],styles:["[_nghost-%COMP%]{display:flex;position:fixed;gap:.5rem;bottom:1.5rem;right:1.5rem;z-index:5000}@media only screen and (max-width:768px){[_nghost-%COMP%]{bottom:1rem;right:1rem}}[_nghost-%COMP%] h6[_ngcontent-%COMP%]{margin:0}.preview-alert-wrap[_ngcontent-%COMP%]{position:absolute;bottom:2.6875rem;right:0;display:flex;flex-direction:column;min-width:15.625rem}.helpdesk-modal[_ngcontent-%COMP%]{position:absolute;bottom:2.6875rem;right:0;display:flex;flex-direction:column}@media only screen and (max-width:768px){.helpdesk-modal[_ngcontent-%COMP%]{bottom:2.6875rem}}.helpdesk-modal-content[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;gap:1rem;min-width:20rem;border:1px solid var(--base-4);background-color:var(--base-1);border-radius:var(--shape-2)}.helpdesk-modal-content[_ngcontent-%COMP%] .message-sent[_ngcontent-%COMP%]{padding:0 1rem 1rem;text-wrap:pretty}.helpdesk-modal-content[_ngcontent-%COMP%] h6[_ngcontent-%COMP%]{padding:1rem;border-bottom:1px solid var(--base-4);display:flex;align-items:center;justify-content:space-between}.helpdesk-modal-content[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{padding:0 1rem 1rem;display:flex;flex-direction:column;align-items:flex-end;gap:1rem}.helpdesk-modal-content[_ngcontent-%COMP%] form[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{width:100%;text-wrap:pretty}.helpdesk-modal-content[_ngcontent-%COMP%] form[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{width:100%}.alert-stream-modal[_ngcontent-%COMP%]{position:absolute;bottom:2.6875rem;right:0;display:flex;flex-direction:column}@media only screen and (max-width:768px){.alert-stream-modal[_ngcontent-%COMP%]{bottom:2.6875rem}}.alert-stream-modal-list-scroller[_ngcontent-%COMP%]{overflow-y:auto;max-height:18.75rem}.alert-stream-modal-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;padding:1rem;border-radius:var(--shape-2)}.alert-stream-modal-content[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;min-width:20rem;border:1px solid var(--base-4);background-color:var(--base-1);border-radius:var(--shape-2)}.alert-stream-modal-content[_ngcontent-%COMP%] h6[_ngcontent-%COMP%]{padding:1rem;border-bottom:1px solid var(--base-4);display:flex;align-items:center;justify-content:space-between}.no-alerts[_ngcontent-%COMP%]{padding:1rem;display:flex;flex-direction:column;gap:1rem;text-align:center}"],changeDetection:0})};function Ke(i,n){i&1&&(a(0,"sh-icon",14),u(1,"check"),o())}function Ze(i,n){i&1&&(a(0,"sh-icon",15),u(1,"prohibit"),o())}function et(i,n){if(i&1){let e=N();a(0,"button",20),T("click",function(){A(e);let s=c();return O(s.updatePassphrase())}),f(1,5),o()}if(i&2){let e=c();U("loading",e.isUpdating())}}function tt(i,n){if(i&1){let e=N();a(0,"button",21),T("click",function(){A(e);let s=c();return O(s.updatePassphrase())}),f(1,6),o()}if(i&2){let e=c();U("loading",e.isUpdating()),F("disabled",!0)}}var V=class i{#e=d(J);closed=_e();isUpdating=h(!1);passphrase=h("");repeatPassphrase=h("");updatePassphrase(){this.passphrase()===this.repeatPassphrase()&&(this.isUpdating.set(!0),this.#e.patchApiV1Serversettings({requestBody:{"server-passphrase":this.passphrase()}}).pipe(j(()=>this.isUpdating.set(!1))).subscribe({next:()=>this.closed.emit()}))}cancel(){this.isUpdating.set(!0),this.#e.patchApiV1Serversettings({requestBody:{"has-asked-for-password-change":"True"}}).pipe(j(()=>this.isUpdating.set(!1))).subscribe({next:()=>this.closed.emit()})}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=D({type:i,selectors:[["app-change-passphrase-alert-dialog"]],outputs:{closed:"closed"},decls:23,vars:7,consts:()=>{let n;n=$localize`Enter new password`;let e;e=$localize`Repeat password`;let t;t=$localize`Password have to be filled and have to match`;let s;s=$localize`Change passphrase`;let l;l=$localize` Duplicati needs to be secured with a passphrase and a random passphrase has been generated for you. ${"[\uFFFD#6\uFFFD\uFFFD/#6\uFFFD|\uFFFD#7\uFFFD\uFFFD/#7\uFFFD]"}:LINE_BREAK:${"[\uFFFD#6\uFFFD\uFFFD/#6\uFFFD|\uFFFD#7\uFFFD\uFFFD/#7\uFFFD]"}:LINE_BREAK: If you open Duplicati from the tray icon, you do not need a passphrase, but if you plan to open it from another location you need to set a passphrase you know. Do you want to set a passphrase now? `,l=b(l);let y;y=$localize`Passphrase`;let P;P=$localize`Repeat passphrase`;let I;I=$localize`Not now thanks`;let G;G=$localize` Yes, update passphrase now `;let m;return m=$localize` Yes, update passphrase now `,[s,l,y,P,I,G,m,["header",""],["content",""],["type","warning"],["for","password"],["type","password","name","password","autocomplete","disabled","placeholder",n,"tabindex","1",3,"ngModelChange","ngModel"],["for","repeatPassword"],["type","password","name","repeatPassword","autocomplete","disabled","placeholder",e,"tabindex","2",3,"ngModelChange","disabled","ngModel"],["suffix","",1,"sh-success"],["suffix",""],["footer",""],["shButton","",3,"click"],["shButton","",1,"raised","primary",3,"loading"],["shButton","","shTooltip",t,1,"raised","primary",3,"loading","disabled"],["shButton","",1,"raised","primary",3,"click"],["shButton","","shTooltip",t,1,"raised","primary",3,"click","disabled"]]},template:function(e,t){e&1&&(a(0,"header",7)(1,"h3"),f(2,0),o()(),a(3,"div",8)(4,"sh-alert",9),p(5,1),_(6,"br")(7,"br"),S(),o(),a(8,"sh-form-field")(9,"label",10),f(10,2),o(),a(11,"input",11),w("ngModelChange",function(l){return H(t.passphrase,l)||(t.passphrase=l),l}),o()(),a(12,"sh-form-field")(13,"label",12),f(14,3),o(),a(15,"input",13),w("ngModelChange",function(l){return H(t.repeatPassphrase,l)||(t.repeatPassphrase=l),l}),o(),g(16,Ke,2,0,"sh-icon",14)(17,Ze,2,0,"sh-icon",15),o()(),a(18,"footer",16)(19,"button",17),T("click",function(){return t.cancel()}),f(20,4),o(),g(21,et,2,2,"button",18)(22,tt,2,3,"button",19),o()),e&2&&(r(11),$("ngModel",t.passphrase),r(4),F("disabled",t.passphrase().length===0),$("ngModel",t.repeatPassphrase),r(),C(t.passphrase().length!==0&&t.passphrase()===t.repeatPassphrase()?16:17),r(3),U("loading",t.isUpdating()),r(2),C(t.passphrase().length!==0&&t.passphrase()===t.repeatPassphrase()?21:22))},dependencies:[Fe,ge,Te,me,Y,fe,M,Le,R],styles:["[_nghost-%COMP%]{display:block;--dialog-p: 1.5rem}[content][_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}"],changeDetection:0})};var nt=()=>({exact:!0});function it(i,n){i&1&&(a(0,"sh-icon"),u(1,"sun"),o())}function ot(i,n){i&1&&(a(0,"sh-icon"),u(1,"moon"),o())}function at(i,n){if(i&1){let e=N();a(0,"button",26),T("click",function(){A(e);let s=c();return O(s.logout())}),p(1,8),_(2,"sh-icon"),S(),o()}}var Z=class i{#e=d($e);#t=d(J);#i=d(Re);#o=d(Se);#a=d(Oe);#s=d(X);#r=d(Me);#l=d(ye);#n=d(De);relayIsEnabled=this.#o.relayIsEnabled;isDarkMode=this.#e.isDarkMode;isNavOpen=this.#e.isNavOpen;sidenavType=this.#e.sidenavType;machineName=B(()=>{let n=this.#l.serverSettings();if(n&&n["--machine-name"])return n["--machine-name"];if(n&&n["machine-name"])return n["machine-name"];let e=this.#n.allOptions().find(t=>t.name==="machine-name");return e&&e.defaultValue?e.defaultValue:this.#n.systemInfo()?.MachineName??"Unknown"});ngOnInit(){return this.#s.init(),this.#i.getBackups(!0),this.#t.getApiV1Serversettings().subscribe({next:n=>{let e=n["autogenerated-passphrase"]==="True",t=n["has-asked-for-password-change"]==="True";e&&!t&&this.#a.open(V,{maxWidth:"500px"})}})}toggleBodyClass(){this.#e.toggleBodyClass()}changeDefaultClientTo(n){this.#_(n),window.location.replace(`/${n}`)}logout(){this.#r.logout()}#_(n){var e=new Date;e.setTime(e.getTime()+2160*60*60*1e3),document.cookie="default-client="+n+"; expires="+e.toUTCString()+"; path=/"}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=D({type:i,selectors:[["app-layout"]],decls:44,vars:11,consts:()=>{let n;n=$localize`${"\uFFFD#10\uFFFD"}:START_TAG_SH_ICON:house${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_SH_ICON: Home `;let e;e=$localize`${"\uFFFD#13\uFFFD"}:START_TAG_SH_ICON:database${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SH_ICON: Add backup `;let t;t=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SH_ICON:clock-counter-clockwise${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SH_ICON: Restore `;let s;s=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:link-simple${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Destinations `;let l;l=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:gear${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON: Settings `;let y;y=$localize`${"\uFFFD#32\uFFFD"}:START_TAG_SH_ICON:info${"\uFFFD/#32\uFFFD"}:CLOSE_TAG_SH_ICON: About Duplicati `;let P;P=$localize`${"\uFFFD#35\uFFFD"}:START_TAG_SH_ICON:files${"[\uFFFD/#35\uFFFD|\uFFFD/#36\uFFFD]"}:CLOSE_TAG_SH_ICON: Documentation ${"\uFFFD#36\uFFFD"}:START_TAG_SH_ICON_1:arrow-square-out${"[\uFFFD/#35\uFFFD|\uFFFD/#36\uFFFD]"}:CLOSE_TAG_SH_ICON:`,P=b(P);let I;I=$localize`${"\uFFFD#39\uFFFD"}:START_TAG_SH_ICON:chats-circle${"[\uFFFD/#39\uFFFD|\uFFFD/#40\uFFFD]"}:CLOSE_TAG_SH_ICON: Visit forum ${"\uFFFD#40\uFFFD"}:START_TAG_SH_ICON_1:arrow-square-out${"[\uFFFD/#39\uFFFD|\uFFFD/#40\uFFFD]"}:CLOSE_TAG_SH_ICON:`,I=b(I);let G;return G=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:sign-out${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Log out `,[n,e,t,s,l,y,P,I,G,[3,"isOpenChange","isOpen","disableDrag"],["sidenav",""],["shButton","",1,"icon","small",3,"click"],[1,"base-1","primary"],["action","","routerLink","/","routerLinkActive","active",3,"routerLinkActiveOptions"],["action","","routerLink","/add-backup","routerLinkActive","active"],["action","","routerLink","/restore","routerLinkActive","active"],["action","","routerLink","/destinations","routerLinkActive","active"],["action","","routerLink","/settings","routerLinkActive","active"],[1,"spacer"],[1,"base-1l","primary"],["action","",1,"machine-name",3,"title"],["action","","routerLink","/about","routerLinkActive","active"],["href","https://docs.duplicati.com","target","_blank","action",""],["suffix",""],["href","https://forum.duplicati.com","target","_blank","action",""],["action",""],["action","",3,"click"]]},template:function(e,t){e&1&&(a(0,"sh-sidenav",9),w("isOpenChange",function(l){return H(t.isNavOpen,l)||(t.isNavOpen=l),l}),a(1,"div",10)(2,"header"),_(3,"app-logo"),a(4,"button",11),T("click",function(){return t.toggleBodyClass()}),g(5,it,2,0,"sh-icon")(6,ot,2,0,"sh-icon"),o()(),a(7,"sh-list",12)(8,"button",13),p(9,0),_(10,"sh-icon"),S(),o(),a(11,"button",14),p(12,1),_(13,"sh-icon"),S(),o(),a(14,"button",15),p(15,2),_(16,"sh-icon"),S(),o(),a(17,"button",16),p(18,3),_(19,"sh-icon"),S(),o(),a(20,"button",17),p(21,4),_(22,"sh-icon"),S(),o()(),_(23,"div",18),a(24,"sh-list",19)(25,"div",20)(26,"sh-icon"),u(27,"desktop"),o(),u(28),o(),_(29,"sh-divider"),a(30,"button",21),p(31,5),_(32,"sh-icon"),S(),o(),a(33,"a",22),p(34,6),_(35,"sh-icon")(36,"sh-icon",23),S(),o(),a(37,"a",24),p(38,7),_(39,"sh-icon")(40,"sh-icon",23),S(),o(),g(41,at,3,0,"button",25),o()(),_(42,"router-outlet")(43,"app-service-hub"),o()),e&2&&(L(t.sidenavType()),$("isOpen",t.isNavOpen),F("disableDrag",!0),r(5),C(t.isDarkMode()?5:6),r(3),F("routerLinkActiveOptions",le(10,nt)),r(17),F("title",re(t.machineName())),r(3),v(" ",t.machineName()," "),r(13),C(t.relayIsEnabled()?-1:41))},dependencies:[ue,de,pe,Ie,M,Pe,R,Ne,k,Ge],styles:["[_nghost-%COMP%]{height:100vh;width:100%;overflow:hidden}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:1.25rem;gap:.75rem}h3[title][_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}div[sidenav][_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100vh}.machine-name[_ngcontent-%COMP%]{margin:0;cursor:default}"],changeDetection:0})};export{Z as default};
|
|
1
|
+
import{a as be,b as ve}from"./chunk-3L3SRTPU.js";import{a as $e}from"./chunk-BLSV7CNZ.js";import{a as V}from"./chunk-LE24LKH7.js";import"./chunk-F3JYPWPK.js";import{a as Re}from"./chunk-736PM4LG.js";import"./chunk-6Q6SSTBK.js";import"./chunk-YCJYEQF7.js";import"./chunk-UTXZPAY6.js";import"./chunk-IMQUTGIK.js";import{a as Ge}from"./chunk-PIGMTUUT.js";import"./chunk-ANSV4G2K.js";import{a as ye}from"./chunk-F3ETZKLK.js";import"./chunk-IQL3REGJ.js";import"./chunk-E4NQOMJX.js";import{a as Le}from"./chunk-YYD2JU6T.js";import{c as Se,e as Me}from"./chunk-6JS7B4FW.js";import{B as R,G as Ne,H as fe,J as Pe,Q as Ie,Y as De,c as ge,d as Ce,e as Te,i as me,r as he,s as Fe,t as Ee,v as M,w as J,x as Ae,z as Oe}from"./chunk-VKQQDCUN.js";import{d as X}from"./chunk-DSYNIXJF.js";import{c as ue,e as de,f as pe}from"./chunk-NPFPMA4P.js";import"./chunk-O2SMJYPC.js";import"./chunk-N2AU7VKX.js";import"./chunk-ZC23RK4J.js";import"./chunk-OPHQNXYO.js";import{$b as c,Ab as te,Ac as le,Bb as ne,Cb as F,Db as a,Eb as o,F as q,Fb as _,Mb as N,Qc as Y,Sa as r,Tb as p,Ub as S,Vb as f,Vc as _e,Xc as ce,Yb as v,Zb as T,_ as d,_c as K,da as A,ea as O,gb as L,gc as ie,hc as oe,kc as B,mc as D,nc as u,oc as Q,pa as h,pc as $,ra as b,sc as H,tc as w,uc as x,vc as ae,wb as g,wc as se,xb as C,xc as k,yb as ee,yc as re}from"./chunk-TQTOIWBK.js";import{a as W,b as j}from"./chunk-7CGTOI24.js";var ke=["scroller"];function Ue(i,n){i&1&&(a(0,"sh-icon"),u(1,"bell-ringing"),o())}function Be(i,n){i&1&&(a(0,"sh-icon"),u(1,"bell"),o())}function Ye(i,n){if(i&1&&_(0,"app-notification",8),i&2){c(2);let e=k(6);F("index",0)("notification",e.content)}}function Je(i,n){if(i&1&&(a(0,"div",11),u(1),o()),i&2){c(3);let e=k(6);r(),$(" ",e.content.content," ")}}function Xe(i,n){if(i&1&&(a(0,"sh-alert")(1,"div",10),u(2),o(),g(3,Je,2,1,"div",11),o()),i&2){c(2);let e=k(6);D(e.content.type||"error"),r(2),Q(e.content.title),r(),C(e.content.content?3:-1)}}function Ve(i,n){if(i&1&&(a(0,"div",6),g(1,Ye,1,2,"app-notification",8)(2,Xe,4,4,"sh-alert",9),o()),i&2){c();let e=k(6);r(),C(e.type==="notification"?1:2)}}function ze(i,n){if(i&1){let e=N();a(0,"div",7)(1,"div",12)(2,"h6",13),p(3,2),a(4,"button",5),T("click",function(){A(e);let s=c();return O(s.toggleNotifications())}),_(5,"sh-icon"),o(),S(),o(),a(6,"div",14,0)(8,"div",15),_(9,"app-notifications"),o()()()()}}function We(i,n){if(i&1&&(a(0,"div",20),u(1),o()),i&2){let e=c().$implicit;r(),$(" ",e.content," ")}}function je(i,n){if(i&1){let e=N();a(0,"sh-alert",18,1),T("click",function(){let s=A(e).$implicit,l=c(2);return O(l.deleteAlertByIndex(s.id))}),a(2,"div",19),u(3),o(),g(4,We,2,1,"div",20),o()}if(i&2){let e=n.$implicit;D(e.type),F("id",e.id),r(3),Q(e.title),r(),C(e.content?4:-1)}}function qe(i,n){i&1&&(a(0,"p",17),f(1,4),o())}function Qe(i,n){if(i&1){let e=N();a(0,"div",7)(1,"div",12)(2,"h6",13),p(3,3),a(4,"button",5),T("click",function(){A(e);let s=c();return O(s.toggleAlerts())}),_(5,"sh-icon"),o(),S(),o(),a(6,"div",14,0)(8,"div",15),te(9,je,5,5,"sh-alert",16,ee,!1,qe,2,0,"p",17),o()()()()}if(i&2){let e=c();r(9),ne(e.alertHistory())}}var He=new he,U=class i{#e=d(Ae);#t=d(V);isSubmitting=h(!1);messageSent=h(!1);form=He.group({message:He.control("",[Ce.required])});notifications=this.#t.notifications;shownMessage=h(null);shownMessageInterval=null;alertHistory=this.#e.alertHistory;alertHistoryIsOpen=this.#e.alertHistoryIsOpen;alertHistoryIsHidden=this.#e.alertHistoryIsHidden;numberOfOpenAlerts=Y(()=>this.alertHistory().filter(n=>n.isOpen).length);scroller=ce("scroller");isAlertsOpen=K(!1);isNotificationsOpen=K(!1);previousHistoryCount=h(null);previousNotificationsCount=h(null);constructor(){b(()=>{let n=this.alertHistory(),e=this.notifications();if(e.length===0){this.shownMessage.set(null);return}e.length&&this.previousHistoryCount()!==n.length&&!this.isNotificationsOpen()?(this.shownMessage.set({content:e[0],countDown:3,type:"notification"}),this.previousHistoryCount.set(n.length),this.shownMessageInterval=setInterval(()=>{let t=this.shownMessage();if(t?.countDown===0){this.shownMessage.set(null),this.shownMessageInterval=null;return}t!==null&&this.shownMessage.update(s=>j(W({},s),{countDown:s.countDown-1}))},1e3)):n.length&&this.previousHistoryCount()!==n.length&&!this.isAlertsOpen()&&(this.shownMessage.set({content:n[0],countDown:3,type:"alert"}),this.previousHistoryCount.set(n.length),this.shownMessageInterval=setInterval(()=>{let t=this.shownMessage();if(t?.countDown===0){this.shownMessage.set(null),this.shownMessageInterval=null;return}t!==null&&this.shownMessage.update(s=>j(W({},s),{countDown:s.countDown-1}))},1e3))}),b(()=>{this.alertHistoryIsOpen(),this.scrollToBottom()})}resetPreviewMessage(){this.shownMessage.set(null),this.shownMessageInterval=null}toggleAlerts(){this.isAlertsOpen()?this.isAlertsOpen.set(!1):(this.isAlertsOpen.set(!0),this.isNotificationsOpen.set(!1),this.resetPreviewMessage())}toggleNotifications(){this.isNotificationsOpen.set(!this.isNotificationsOpen()),this.isAlertsOpen()&&this.isAlertsOpen.set(!1)}deleteAlertByIndex(n){this.#e.removeAlert(n)}scrollToBottom(){this.scroller()&&this.scroller()?.nativeElement&&this.scroller().nativeElement.scrollTo(0,this.scroller().nativeElement.scrollHeight)}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=L({type:i,selectors:[["app-service-hub"]],viewQuery:function(e,t){e&1&&ie(t.scroller,ke,5),e&2&&oe()},inputs:{isAlertsOpen:[1,"isAlertsOpen"],isNotificationsOpen:[1,"isNotificationsOpen"]},outputs:{isAlertsOpen:"isAlertsOpenChange",isNotificationsOpen:"isNotificationsOpenChange"},decls:10,vars:9,consts:()=>{let n;n=$localize` Notifications ${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:x-circle${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_BUTTON:`;let e;e=$localize` Alerts ${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:x-circle${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_BUTTON:`;let t;return t=$localize`No alerts yet`,[["scroller",""],["alerts",""],n,e,t,["shButton","",3,"click"],[1,"preview-alert-wrap"],[1,"alert-stream-modal"],[3,"index","notification"],[3,"class"],["ship-alert-title",""],["ship-alert-content",""],[1,"alert-stream-modal-content"],[1,"paragraph-20"],[1,"alert-stream-modal-list-scroller"],[1,"alert-stream-modal-list"],[3,"class","id"],[1,"no-alerts"],[3,"click","id"],["title",""],["content",""]]},template:function(e,t){if(e&1&&(a(0,"button",5),T("click",function(){return t.toggleAlerts()}),a(1,"sh-icon"),u(2,"info"),o()(),a(3,"button",5),T("click",function(){return t.toggleNotifications()}),g(4,Ue,2,0,"sh-icon")(5,Be,2,0,"sh-icon"),o(),ae(6),g(7,Ve,3,1,"div",6),g(8,ze,10,0,"div",7),g(9,Qe,12,1,"div",7)),e&2){D(t.alertHistory().length?"error":""),r(3),D(t.notifications().length?"error":""),r(),C(t.notifications().length?4:5),r(2);let s=se(t.shownMessage());r(),C(s?7:-1),r(),C(t.isNotificationsOpen()?8:-1),r(),C(t.isAlertsOpen()?9:-1)}},dependencies:[Ee,J,M,R,ve,be],styles:["[_nghost-%COMP%]{display:flex;position:fixed;gap:.5rem;bottom:1.5rem;right:1.5rem;z-index:5000}@media only screen and (max-width:768px){[_nghost-%COMP%]{bottom:1rem;right:1rem}}[_nghost-%COMP%] h6[_ngcontent-%COMP%]{margin:0}.preview-alert-wrap[_ngcontent-%COMP%]{position:absolute;bottom:2.6875rem;right:0;display:flex;flex-direction:column;min-width:15.625rem}.helpdesk-modal[_ngcontent-%COMP%]{position:absolute;bottom:2.6875rem;right:0;display:flex;flex-direction:column}@media only screen and (max-width:768px){.helpdesk-modal[_ngcontent-%COMP%]{bottom:2.6875rem}}.helpdesk-modal-content[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;gap:1rem;min-width:20rem;border:1px solid var(--base-4);background-color:var(--base-1);border-radius:var(--shape-2)}.helpdesk-modal-content[_ngcontent-%COMP%] .message-sent[_ngcontent-%COMP%]{padding:0 1rem 1rem;text-wrap:pretty}.helpdesk-modal-content[_ngcontent-%COMP%] h6[_ngcontent-%COMP%]{padding:1rem;border-bottom:1px solid var(--base-4);display:flex;align-items:center;justify-content:space-between}.helpdesk-modal-content[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{padding:0 1rem 1rem;display:flex;flex-direction:column;align-items:flex-end;gap:1rem}.helpdesk-modal-content[_ngcontent-%COMP%] form[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{width:100%;text-wrap:pretty}.helpdesk-modal-content[_ngcontent-%COMP%] form[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{width:100%}.alert-stream-modal[_ngcontent-%COMP%]{position:absolute;bottom:2.6875rem;right:0;display:flex;flex-direction:column}@media only screen and (max-width:768px){.alert-stream-modal[_ngcontent-%COMP%]{bottom:2.6875rem}}.alert-stream-modal-list-scroller[_ngcontent-%COMP%]{overflow-y:auto;max-height:18.75rem}.alert-stream-modal-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;padding:1rem;border-radius:var(--shape-2)}.alert-stream-modal-content[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;min-width:20rem;border:1px solid var(--base-4);background-color:var(--base-1);border-radius:var(--shape-2)}.alert-stream-modal-content[_ngcontent-%COMP%] h6[_ngcontent-%COMP%]{padding:1rem;border-bottom:1px solid var(--base-4);display:flex;align-items:center;justify-content:space-between}.no-alerts[_ngcontent-%COMP%]{padding:1rem;display:flex;flex-direction:column;gap:1rem;text-align:center}"],changeDetection:0})};function Ke(i,n){i&1&&(a(0,"sh-icon",14),u(1,"check"),o())}function Ze(i,n){i&1&&(a(0,"sh-icon",15),u(1,"prohibit"),o())}function et(i,n){if(i&1){let e=N();a(0,"button",20),T("click",function(){A(e);let s=c();return O(s.updatePassphrase())}),f(1,5),o()}if(i&2){let e=c();B("loading",e.isUpdating())}}function tt(i,n){if(i&1){let e=N();a(0,"button",21),T("click",function(){A(e);let s=c();return O(s.updatePassphrase())}),f(1,6),o()}if(i&2){let e=c();B("loading",e.isUpdating()),F("disabled",!0)}}var z=class i{#e=d(X);closed=_e();isUpdating=h(!1);passphrase=h("");repeatPassphrase=h("");updatePassphrase(){this.passphrase()===this.repeatPassphrase()&&(this.isUpdating.set(!0),this.#e.patchApiV1Serversettings({requestBody:{"server-passphrase":this.passphrase()}}).pipe(q(()=>this.isUpdating.set(!1))).subscribe({next:()=>this.closed.emit()}))}cancel(){this.isUpdating.set(!0),this.#e.patchApiV1Serversettings({requestBody:{"has-asked-for-password-change":"True"}}).pipe(q(()=>this.isUpdating.set(!1))).subscribe({next:()=>this.closed.emit()})}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=L({type:i,selectors:[["app-change-passphrase-alert-dialog"]],outputs:{closed:"closed"},decls:23,vars:7,consts:()=>{let n;n=$localize`Enter new password`;let e;e=$localize`Repeat password`;let t;t=$localize`Password have to be filled and have to match`;let s;s=$localize`Change passphrase`;let l;l=$localize` Duplicati needs to be secured with a passphrase and a random passphrase has been generated for you. ${"[\uFFFD#6\uFFFD\uFFFD/#6\uFFFD|\uFFFD#7\uFFFD\uFFFD/#7\uFFFD]"}:LINE_BREAK:${"[\uFFFD#6\uFFFD\uFFFD/#6\uFFFD|\uFFFD#7\uFFFD\uFFFD/#7\uFFFD]"}:LINE_BREAK: If you open Duplicati from the tray icon, you do not need a passphrase, but if you plan to open it from another location you need to set a passphrase you know. Do you want to set a passphrase now? `,l=v(l);let y;y=$localize`Passphrase`;let P;P=$localize`Repeat passphrase`;let I;I=$localize`Not now thanks`;let G;G=$localize` Yes, update passphrase now `;let m;return m=$localize` Yes, update passphrase now `,[s,l,y,P,I,G,m,["header",""],["content",""],["type","warning"],["for","password"],["type","password","name","password","autocomplete","disabled","placeholder",n,"tabindex","1",3,"ngModelChange","ngModel"],["for","repeatPassword"],["type","password","name","repeatPassword","autocomplete","disabled","placeholder",e,"tabindex","2",3,"ngModelChange","disabled","ngModel"],["suffix","",1,"sh-success"],["suffix",""],["footer",""],["shButton","",3,"click"],["shButton","",1,"raised","primary",3,"loading"],["shButton","","shTooltip",t,1,"raised","primary",3,"loading","disabled"],["shButton","",1,"raised","primary",3,"click"],["shButton","","shTooltip",t,1,"raised","primary",3,"click","disabled"]]},template:function(e,t){e&1&&(a(0,"header",7)(1,"h3"),f(2,0),o()(),a(3,"div",8)(4,"sh-alert",9),p(5,1),_(6,"br")(7,"br"),S(),o(),a(8,"sh-form-field")(9,"label",10),f(10,2),o(),a(11,"input",11),x("ngModelChange",function(l){return w(t.passphrase,l)||(t.passphrase=l),l}),o()(),a(12,"sh-form-field")(13,"label",12),f(14,3),o(),a(15,"input",13),x("ngModelChange",function(l){return w(t.repeatPassphrase,l)||(t.repeatPassphrase=l),l}),o(),g(16,Ke,2,0,"sh-icon",14)(17,Ze,2,0,"sh-icon",15),o()(),a(18,"footer",16)(19,"button",17),T("click",function(){return t.cancel()}),f(20,4),o(),g(21,et,2,2,"button",18)(22,tt,2,3,"button",19),o()),e&2&&(r(11),H("ngModel",t.passphrase),r(4),F("disabled",t.passphrase().length===0),H("ngModel",t.repeatPassphrase),r(),C(t.passphrase().length!==0&&t.passphrase()===t.repeatPassphrase()?16:17),r(3),B("loading",t.isUpdating()),r(2),C(t.passphrase().length!==0&&t.passphrase()===t.repeatPassphrase()?21:22))},dependencies:[Fe,ge,Te,me,J,fe,M,De,R],styles:["[_nghost-%COMP%]{display:block;--dialog-p: 1.5rem}[content][_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}"],changeDetection:0})};var nt=()=>({exact:!0});function it(i,n){i&1&&(a(0,"sh-icon"),u(1,"sun"),o())}function ot(i,n){i&1&&(a(0,"sh-icon"),u(1,"moon"),o())}function at(i,n){if(i&1){let e=N();a(0,"button",26),T("click",function(){A(e);let s=c();return O(s.logout())}),p(1,8),_(2,"sh-icon"),S(),o()}}var Z=class i{#e=d($e);#t=d(X);#o=d(Re);#a=d(Se);#s=d(Oe);#r=d(V);#l=d(Me);#n=d(ye);#i=d(Le);relayIsEnabled=this.#a.relayIsEnabled;isDarkMode=this.#e.isDarkMode;isNavOpen=this.#e.isNavOpen;sidenavType=this.#e.sidenavType;hasShownPasswordDialog=!1;machineName=Y(()=>{let n=this.#n.serverSettings();if(n&&n["--machine-name"])return n["--machine-name"];if(n&&n["machine-name"])return n["machine-name"];let e=this.#i.allOptions().find(t=>t.name==="machine-name");return e&&e.defaultValue?e.defaultValue:this.#i.systemInfo()?.MachineName??"Unknown"});ngOnInit(){this.#r.init(),this.#o.getBackups(!0)}serverSettingsEffect=b(()=>{if(this.hasShownPasswordDialog)return;let n=this.#n.serverSettings();if(!n)return;let e=n["autogenerated-passphrase"]==="True",t=n["has-asked-for-password-change"]==="True";e&&!t&&(this.hasShownPasswordDialog=!0,this.#s.open(z,{maxWidth:"500px"}))});toggleBodyClass(){this.#e.toggleBodyClass()}changeDefaultClientTo(n){this.#_(n),window.location.replace(`/${n}`)}logout(){this.#l.logout()}#_(n){var e=new Date;e.setTime(e.getTime()+2160*60*60*1e3),document.cookie="default-client="+n+"; expires="+e.toUTCString()+"; path=/"}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=L({type:i,selectors:[["app-layout"]],decls:44,vars:11,consts:()=>{let n;n=$localize`${"\uFFFD#10\uFFFD"}:START_TAG_SH_ICON:house${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_SH_ICON: Home `;let e;e=$localize`${"\uFFFD#13\uFFFD"}:START_TAG_SH_ICON:database${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SH_ICON: Add backup `;let t;t=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SH_ICON:clock-counter-clockwise${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SH_ICON: Restore `;let s;s=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:link-simple${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Destinations `;let l;l=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:gear${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON: Settings `;let y;y=$localize`${"\uFFFD#32\uFFFD"}:START_TAG_SH_ICON:info${"\uFFFD/#32\uFFFD"}:CLOSE_TAG_SH_ICON: About Duplicati `;let P;P=$localize`${"\uFFFD#35\uFFFD"}:START_TAG_SH_ICON:files${"[\uFFFD/#35\uFFFD|\uFFFD/#36\uFFFD]"}:CLOSE_TAG_SH_ICON: Documentation ${"\uFFFD#36\uFFFD"}:START_TAG_SH_ICON_1:arrow-square-out${"[\uFFFD/#35\uFFFD|\uFFFD/#36\uFFFD]"}:CLOSE_TAG_SH_ICON:`,P=v(P);let I;I=$localize`${"\uFFFD#39\uFFFD"}:START_TAG_SH_ICON:chats-circle${"[\uFFFD/#39\uFFFD|\uFFFD/#40\uFFFD]"}:CLOSE_TAG_SH_ICON: Visit forum ${"\uFFFD#40\uFFFD"}:START_TAG_SH_ICON_1:arrow-square-out${"[\uFFFD/#39\uFFFD|\uFFFD/#40\uFFFD]"}:CLOSE_TAG_SH_ICON:`,I=v(I);let G;return G=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:sign-out${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Log out `,[n,e,t,s,l,y,P,I,G,[3,"isOpenChange","isOpen","disableDrag"],["sidenav",""],["shButton","",1,"icon","small",3,"click"],[1,"base-1","primary"],["action","","routerLink","/","routerLinkActive","active",3,"routerLinkActiveOptions"],["action","","routerLink","/add-backup","routerLinkActive","active"],["action","","routerLink","/restore","routerLinkActive","active"],["action","","routerLink","/destinations","routerLinkActive","active"],["action","","routerLink","/settings","routerLinkActive","active"],[1,"spacer"],[1,"base-1l","primary"],["action","",1,"machine-name",3,"title"],["action","","routerLink","/about","routerLinkActive","active"],["href","https://docs.duplicati.com","target","_blank","action",""],["suffix",""],["href","https://forum.duplicati.com","target","_blank","action",""],["action",""],["action","",3,"click"]]},template:function(e,t){e&1&&(a(0,"sh-sidenav",9),x("isOpenChange",function(l){return w(t.isNavOpen,l)||(t.isNavOpen=l),l}),a(1,"div",10)(2,"header"),_(3,"app-logo"),a(4,"button",11),T("click",function(){return t.toggleBodyClass()}),g(5,it,2,0,"sh-icon")(6,ot,2,0,"sh-icon"),o()(),a(7,"sh-list",12)(8,"button",13),p(9,0),_(10,"sh-icon"),S(),o(),a(11,"button",14),p(12,1),_(13,"sh-icon"),S(),o(),a(14,"button",15),p(15,2),_(16,"sh-icon"),S(),o(),a(17,"button",16),p(18,3),_(19,"sh-icon"),S(),o(),a(20,"button",17),p(21,4),_(22,"sh-icon"),S(),o()(),_(23,"div",18),a(24,"sh-list",19)(25,"div",20)(26,"sh-icon"),u(27,"desktop"),o(),u(28),o(),_(29,"sh-divider"),a(30,"button",21),p(31,5),_(32,"sh-icon"),S(),o(),a(33,"a",22),p(34,6),_(35,"sh-icon")(36,"sh-icon",23),S(),o(),a(37,"a",24),p(38,7),_(39,"sh-icon")(40,"sh-icon",23),S(),o(),g(41,at,3,0,"button",25),o()(),_(42,"router-outlet")(43,"app-service-hub"),o()),e&2&&(D(t.sidenavType()),H("isOpen",t.isNavOpen),F("disableDrag",!0),r(5),C(t.isDarkMode()?5:6),r(3),F("routerLinkActiveOptions",le(10,nt)),r(17),F("title",re(t.machineName())),r(3),$(" ",t.machineName()," "),r(13),C(t.relayIsEnabled()?-1:41))},dependencies:[ue,de,pe,Ie,M,Pe,R,Ne,U,Ge],styles:["[_nghost-%COMP%]{height:100vh;width:100%;overflow:hidden}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:1.25rem;gap:.75rem}h3[title][_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}div[sidenav][_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100vh}.machine-name[_ngcontent-%COMP%]{margin:0;cursor:default}"],changeDetection:0})};export{Z as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as a,d as b}from"./chunk-77IXQ4GU.js";import"./chunk-TZ7MW3NZ.js";import"./chunk-43WATFQS.js";import"./chunk-CAQ3XMFP.js";import"./chunk-UZ4POLDC.js";import"./chunk-O56QUSSI.js";import"./chunk-6Q6SSTBK.js";import"./chunk-YCJYEQF7.js";import"./chunk-AXQQEOTT.js";import"./chunk-UTXZPAY6.js";import"./chunk-IMQUTGIK.js";import"./chunk-F3ETZKLK.js";import"./chunk-IQL3REGJ.js";import"./chunk-E4NQOMJX.js";import"./chunk-YYD2JU6T.js";import"./chunk-6JS7B4FW.js";import"./chunk-VKQQDCUN.js";import"./chunk-DSYNIXJF.js";import"./chunk-NPFPMA4P.js";import"./chunk-O2SMJYPC.js";import"./chunk-N2AU7VKX.js";import"./chunk-ZC23RK4J.js";import"./chunk-OPHQNXYO.js";import"./chunk-TQTOIWBK.js";import"./chunk-7CGTOI24.js";export{a as createEncryptionForm,b as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as
|
|
1
|
+
import{d as c}from"./chunk-DSYNIXJF.js";import{F as u,N as d,Qc as s,V as p,_ as l,pa as i}from"./chunk-TQTOIWBK.js";var m=class r{#s=l(c);isLoaded=i(!1);systemInfo=i(null);filterGroups=i(null);backendModules=s(()=>this.systemInfo()?.BackendModules??[]);sourceProviderModules=s(()=>this.systemInfo()?.SourceProviderModules??[]);restoreDestinationProviderModules=s(()=>this.systemInfo()?.RestoreDestinationProviderModules??[]);allOptionsGrouped=s(()=>{let e={displayName:"Default",options:this.systemInfo()?.Options?.map(this.#e)??[]},t=this.systemInfo()?.GenericModules?.map(n=>({displayName:n.DisplayName??n.Key,options:n.Options?.map(this.#e)??[]}))??[],o=this.systemInfo()?.CompressionModules?.map(n=>({displayName:n.DisplayName??n.Key,options:n.Options?.map(this.#e)??[]}))??[],a=this.systemInfo()?.EncryptionModules?.map(n=>({displayName:n.DisplayName??n.Key,options:n.Options?.map(this.#e)??[]}))??[];return[e,...t,...o,...a]});allOptions=s(()=>this.allOptionsGrouped().reduce((e,t)=>[...e,...t.options],[]));hasWebSocket=s(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:websocket"));hasV2ListOperations=s(()=>{let e=this.systemInfo()?.APIExtensions??[];return e.includes("v2:backup:list-filesets")&&e.includes("v2:backup:list-folder")});hasV2TestOperations=s(()=>(this.systemInfo()?.APIExtensions??[]).includes("v2:destination:test"));hasProgressSubscribeOption=s(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:subscribe:progress"));hasTaskSubscribeOption=s(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:subscribe:taskqueue"));hasTaskCompletedOption=s(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:subscribe:taskcompleted"));hasBackupListSubscribeOption=s(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:subscribe:backuplist"));hasWebSocketAuth=s(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:websocket:authenticate"));hasWsRemoteControl=s(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:subscribe:remotecontrol"));hasWsNotifications=s(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:subscribe:notifications"));defaultOAuthUrl=s(()=>{let e=this.systemInfo()?.DefaultOAuthURL??"https://duplicati-oauth-handler.appspot.com/";return e.endsWith("/refresh")?e.slice(0,-8):e});defaultOAuthUrlV2=s(()=>{let e=this.systemInfo()?.DefaultOAuthURLv2??"https://oauth-service.duplicati.com/";return e.endsWith("/refresh")?e.slice(0,-8):e});resolveShorthandPath(e){if(!e.startsWith("%")||!e.endsWith("%"))return e;let t=this.systemInfo()?.SpecialFolders;return t?t.find(a=>a.ID?.startsWith(e))?.Path??e:e}preload(e=!1){let t=this.#s.getApiV1Systeminfo().pipe(d(o=>{this.systemInfo.set(o)}),u(()=>this.isLoaded.set(!0)));if(e)return t;t.subscribe()}preloadFilterGroups(e=!1){let t=this.#s.getApiV1SysteminfoFiltergroups().pipe(d(o=>{this.filterGroups.set(o)}),u(()=>this.isLoaded.set(!0)));if(e)return t;t.subscribe()}#e(e){return{name:e.Name,type:e.Type,shortDescription:e.ShortDescription??void 0,longDescription:e.LongDescription??void 0,deprecatedDescription:e.Deprecated??!1?e.DeprecationMessage??void 0:void 0,options:e.ValidValues,defaultValue:e.DefaultValue}}static \u0275fac=function(t){return new(t||r)};static \u0275prov=p({token:r,factory:r.\u0275fac,providedIn:"root"})};export{m as a};
|
package/index.html
CHANGED
|
@@ -124,5 +124,5 @@
|
|
|
124
124
|
<body>
|
|
125
125
|
<app-root></app-root>
|
|
126
126
|
<div class="loading">Connecting ...</div>
|
|
127
|
-
<link rel="modulepreload" href="chunk-23SRH7FI.js"><link rel="modulepreload" href="chunk-
|
|
127
|
+
<link rel="modulepreload" href="chunk-23SRH7FI.js"><link rel="modulepreload" href="chunk-LE24LKH7.js"><link rel="modulepreload" href="chunk-EKVZKEQJ.js"><link rel="modulepreload" href="chunk-F3JYPWPK.js"><link rel="modulepreload" href="chunk-736PM4LG.js"><link rel="modulepreload" href="chunk-TCXCC5BM.js"><link rel="modulepreload" href="chunk-GKGMP6VF.js"><link rel="modulepreload" href="chunk-6Q6SSTBK.js"><link rel="modulepreload" href="chunk-YCJYEQF7.js"><link rel="modulepreload" href="chunk-IMQUTGIK.js"><script src="polyfills-7RKI4BGK.js" type="module"></script><script src="main-IUT3IXX4.js" type="module"></script></body>
|
|
128
128
|
</html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as Ie,c as ke}from"./chunk-23SRH7FI.js";import{a as we}from"./chunk-EXMYBMGI.js";import{a as Ee}from"./chunk-EKVZKEQJ.js";import{b as I}from"./chunk-RJ2JM7C7.js";import"./chunk-WOKYULBU.js";import{a as Me}from"./chunk-TCXCC5BM.js";import{b as Te}from"./chunk-GKGMP6VF.js";import{a as V}from"./chunk-6Q6SSTBK.js";import{a as Se}from"./chunk-YCJYEQF7.js";import"./chunk-IMQUTGIK.js";import"./chunk-ANSV4G2K.js";import"./chunk-AIAUP7OE.js";import{a as H}from"./chunk-C6PICAXB.js";import{a as h,b as ye,c as v,d as Re,e as E}from"./chunk-6JS7B4FW.js";import{u as be,x as Ce}from"./chunk-VKQQDCUN.js";import{a as ge,e as ve}from"./chunk-DSYNIXJF.js";import{c as le,d as me,g as de,h as ue,i as he,j as fe}from"./chunk-NPFPMA4P.js";import{a as ne}from"./chunk-O2SMJYPC.js";import{a as re,b as se,c as ie,e as ae,f as pe,g as ce}from"./chunk-N2AU7VKX.js";import{ha as te,ma as oe}from"./chunk-ZC23RK4J.js";import"./chunk-OPHQNXYO.js";import{A as B,F as J,Fb as Y,L as T,Lc as Z,Mc as ee,N as K,V as C,Y as _,_ as s,f as F,g as W,gb as Q,ha as q,ia as z,l as $,m as G,pa as d,q as w,ra as X,z as P}from"./chunk-TQTOIWBK.js";import"./chunk-7CGTOI24.js";var k=class e{#e=s(h);#d=s(v);ngOnInit(){ye(),this.#d.fetchConfig(),this.#e.clearAllNotCurrentVersion()}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=Q({type:e,selectors:[["app-root"]],decls:1,vars:0,template:function(t,n){t&1&&Y(0,"router-outlet")},dependencies:[le],encapsulation:2})};var Ae={production:!0,baseUrl:"/api",machineServerUrl:"${WS_URL}",defaultTimeout:3e4};var f=new _("ENVIRONMENT");var A=class e{#e=s(ve);isLoaded=d(!1);webmodules=d(null);preload(o=!1){let t=this.#e.getApiV1Webmodules().pipe(K(n=>this.webmodules.set(n)),J(()=>this.isLoaded.set(!0)));if(o)return t;t.subscribe()}static \u0275fac=function(t){return new(t||e)};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})};var Ue=()=>{let e=s(E);return e.token()?!0:e.checkProxyAuthed().pipe(T(o=>o?$(!0):e.refreshToken().pipe(w(()=>!0))))},je=()=>{let e=s(v),o=s(I),t=s(q),n=e.relayIsEnabled()?"longpoll":"websocket",i=[t.get(H).preload(!0),t.get(H).preloadFilterGroups(!0),t.get(A).preload(!0)];return e.configLoaded===null?P(i).pipe(w(()=>n)):e.configLoaded?.pipe(T(()=>P(i)))},Fe=()=>!0,Ne={path:"connect/:typeParam",loadComponent:()=>import("./chunk-BZXBH4CN.js")},We=()=>{let e=s(h);return!e.getItem("locale")&&navigator.language&&e.setItem("locale",navigator.language),!0},Oe=[{path:"",children:[{path:"login",canActivate:[],loadComponent:()=>import("./chunk-4E7D5F6K.js")},{path:"logout",loadComponent:()=>import("./chunk-FBU3EBFO.js")},{path:"",canActivate:[Ue],children:[{path:"",canActivate:[je,Fe,We],children:[{path:"welcome",loadComponent:()=>import("./chunk-JPCUISZG.js"),children:[{path:"",redirectTo:"select",pathMatch:"full"},{path:"select",loadComponent:()=>import("./chunk-X276XFCH.js")},Ne]},{path:"",loadComponent:()=>import("./chunk-5RNU5BNO.js"),children:[{path:"",loadComponent:()=>import("./chunk-QOWXL7ZL.js")},Ne,{path:"destinations",loadComponent:()=>import("./chunk-RRDLQLTM.js")},{path:"add-backup",loadComponent:()=>import("./chunk-EDLHTWBA.js")},{path:"backup/:id/export",loadComponent:()=>import("./chunk-KDV2OE64.js")},{path:"backup/import",loadComponent:()=>import("./chunk-NX35OQ3V.js")},{path:"backup-draft/:id",loadComponent:()=>import("./chunk-EPIYGHPM.js"),loadChildren:()=>import("./chunk-DSZ644JT.js")},{path:"backup/:id",loadComponent:()=>import("./chunk-EPIYGHPM.js"),loadChildren:()=>import("./chunk-DSZ644JT.js")},{path:"backup/:id/log",loadComponent:()=>import("./chunk-ZP3QZ43W.js")},{path:"backup/:id/database",loadComponent:()=>import("./chunk-RLWICOKH.js")},{path:"backup/:id/commandline",loadComponent:()=>import("./chunk-X4BDJA6L.js")},{path:"backup/:id/commandline/:runId",loadComponent:()=>import("./chunk-ZYRB2TUK.js")},{path:"backup/:id/delete",loadComponent:()=>import("./chunk-2J2554EV.js")},{path:"restore",children:[{path:"",loadComponent:()=>import("./chunk-PXI3UZ4R.js")},{path:"from-config",loadComponent:()=>import("./chunk-IG7XUEED.js")}]},{path:"restore-from-files",loadComponent:()=>import("./chunk-GN7AO4B6.js"),loadChildren:()=>import("./chunk-N3NJW75G.js")},{path:"restore-draft/:id",loadComponent:()=>import("./chunk-GN7AO4B6.js"),loadChildren:()=>import("./chunk-N3NJW75G.js")},{path:"restore/:id",loadComponent:()=>import("./chunk-GN7AO4B6.js"),loadChildren:()=>import("./chunk-N3NJW75G.js")},{path:"status",loadComponent:()=>import("./chunk-4OJPTRZJ.js")},{path:"settings",loadComponent:()=>import("./chunk-NKUA7I47.js")},{path:"about",loadComponent:()=>import("./chunk-22AR7ES3.js"),children:[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",loadComponent:()=>import("./chunk-P4R3ERID.js")},{path:"changelog",loadComponent:()=>import("./chunk-FD5CKX3J.js")},{path:"libraries",loadComponent:()=>import("./chunk-ACTJSKQZ.js")},{path:"system-info",loadComponent:()=>import("./chunk-37ODVJFS.js")},{path:"server-settings",loadComponent:()=>import("./chunk-NHS6CQO2.js")},{path:"logs",loadChildren:()=>import("./chunk-YWBZLU6M.js")},{path:"crashlogs",loadComponent:()=>import("./chunk-BKEJZADV.js")}]}]}]}]}]}];var xe=(e,o)=>{let t=s(E),n=s(me),i=s(h),p=s(f),m=i.getItem("locale"),a=s(Ce),g=Ie(m),r=ge.BASE||"",c=e.url===`${r}/api/v1/auth/login`,u=e.url===`${r}/api/v1/auth/logout`,S=e.url===`${r}/api/v1/auth/refresh`,y=e.url===`${r}/api/v1/progressstate`,x=e.url===`${r}/api/v1/remoteoperation/test`,M=e.url===`${r}/api/v1/filesystem/validate`,De=e.url.startsWith(`${r}/api/v2/`),L=t.token(),U=e,j=e.headers.has("custom-proxy-check")||L===Re;if(L&&e.url.startsWith(r+p.baseUrl)&&!j){let l=e.headers.set("Authorization",`Bearer ${L}`);m&&m!=="en-US"&&(l=l.set("X-Ui-Language",g)),U=e.clone({headers:l})}return o(U).pipe(w(l=>{if(l.type===4&&l.status===200&&De){let b=l.body;if(b?.Success===!1)throw{status:200,message:b?.Error??"Unknown error",error:{Error:b?.Error??"Unknown error"},requestBody:b}}return l}),B(l=>{let b=l.error?.Error||`Error Code: ${l.status}, Message: ${l.message}`;if(!j){let R=!0;if((y&&l.status===404||x||M)&&(R=!1),S&&l.status===401&&(R=!1,t.logout(),n.navigate(["/logout"])),!c&&!S&&!u&&l.status===401)return R=!1,t.refreshToken().pipe(T(()=>o(e.clone({headers:e.headers.set("Authorization",`Bearer ${t.token()}`)}))));R&&a.error(b)}return G(()=>({error:l,message:b}))}))};var N=class e{#e=s(z);showError(o){let t=this.#e.querySelector("body > .loading");if(!t)return;t.classList.add("has-error"),t.innerHTML="";let n=this.#e.createElement("div");n.classList.add("loading-title"),n.textContent="Unable to connect";let i=this.#e.createElement("div");i.classList.add("loading-error"),i.textContent=o||"Unknown error";let p=this.#e.createElement("button");p.type="button",p.classList.add("retry-button"),p.textContent="Retry",p.addEventListener("click",()=>{this.#e.defaultView?.location.reload()}),t.append(n,i,p)}static \u0275fac=function(t){return new(t||e)};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})};var $e="1.0.0",Le=`portal-proxy-client-${V()}`,Ge=1,O=class e{#e=1e3;#d=s(f);#u=s(N);#o=d("disconnected");#h=d(this.#e);#a=d(!1);#n=d(!1);#p=d(null);#c=d(null);#s=!1;isConnectedToMachineServer=this.#n.asReadonly();wsState=this.#o.asReadonly();#l=[];#r={};#t=null;#f=new TextDecoder("utf-8");#m=null;#y=X(()=>{let o=this.#a(),t=this.#h(),n=this.#p(),i=this.#c();if(!n||!i||!o||!t||t<this.#e){this.#m&&window.clearInterval(this.#m);return}this.#m=window.setInterval(()=>{this.connectToMachineServer(n,i)},t)});#i(o){this.#s||(this.#s=!0,this.#u.showError(o||"Unable to connect to the server."))}#g(){this.#s||(this.#s=!0)}utf8Atob(o){let t=Uint8Array.from(atob(o),i=>i.charCodeAt(0)),n=this.#f.decode(t);return n?JSON.parse(n):null}connectToMachineServer(o,t,n){let i=n?.reconnect??!1,p=this.wsState();(p==="disconnected"||p==="error"||i)&&(this.#t?.close(),this.#t=null),!this.#t&&(this.#s=!1,this.#t=new WebSocket(t),this.#o.set("connecting"),this.#t.onopen=()=>{this.#o.set("connect"),this.#n.set(!0),this.#a.set(!1),this.#p.set(null),this.#c.set(null)},this.#t.onclose=()=>{this.#o.set("disconnected"),this.#n.set(!1),this.#p.set(o),this.#c.set(t),this.#a.set(!0)},this.#t.onerror=()=>{this.#o.set("error")},this.#t.onmessage=m=>{let a=JSON.parse(m.data);if(this.wsState()==="connect"){if(a.type!=="welcome"){this.disconnectFromMachineServer(`Unexpected message type, expected 'welcome' but got '${a.type}'`);return}let r={token:o,publicKey:"",clientVersion:$e,protocolVersion:Ge},c=this.createResponse(a,"authportal",r);this.#o.set("welcome"),this.#t?.send(c)}else if(this.wsState()==="welcome"){if(a.type!=="authportal"){this.disconnectFromMachineServer(`Unexpected message type, expected 'authportal' but got '${a.type}'`);return}var g=JSON.parse(a.payload??"");if(g.accepted===!1){this.#i("Authentication failed"),this.disconnectFromMachineServer("Authentication failed");return}for(this.#o.set("authenticated"),this.#n.set(!0);this.#l.length>0;){let r=this.#l.pop();r&&this.#r[r.messageId]&&this.activateCommand(r)}}else if(this.wsState()==="authenticated"){if(a.type!=="command"){console.warn(`Unexpected message type, expected 'command' but got '${a.type}'`);return}let r=this.#r[a.messageId];if(r){if(a.errorMessage)this.#i(a.errorMessage),r.reject(a.errorMessage);else{let c=JSON.parse(a.payload??"");c.statusCode>=400?this.#i(c.body||`Initial request failed with status code ${c.statusCode}`):this.#g(),c.body=c?.body==null?null:this.utf8Atob(c.body),r.resolve(c)}delete this.#r[a.messageId],window.clearTimeout(r.timer)}}})}disconnectFromMachineServer(o=null){o&&console.error(o),this.#t?.close(),this.#t=null,this.#o.set("disconnected"),this.#n.set(!1)}createResponse(o,t,n){let i={from:Le,to:o.from,type:t,messageId:o.messageId,payload:JSON.stringify(n)};return JSON.stringify(i)}sendCommand(o,t,n,i,p,m,a,g=5e3){return(this.wsState()==="disconnected"||this.wsState()==="error")&&this.connectToMachineServer(o,n),new Promise((r,c)=>{let u=V(),y={from:Le,to:t,type:"command",messageId:u,payload:JSON.stringify({method:i,path:p,body:m,headers:a})},x={resolve:r,reject:c,timer:window.setTimeout(()=>{let M=this.#r[u];M&&(delete this.#r[u],this.#i("The request timed out before receiving a response."),M.reject("Timeout"))},g)};this.#r[u]=x,this.#n()?this.activateCommand(y):this.#l.push(y)})}activateCommand(o){this.#t?.send(JSON.stringify(o))}static \u0275fac=function(t){return new(t||e)};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})};function Be(e){if(typeof e!="string")return null;let t=new TextEncoder().encode(e);return window.btoa(String.fromCharCode(...t))}function Pe(e,o,t){let n=e.relayconfigState.config();if(n===null)return t(o);let i=Be(o.body),p={};o.headers.keys().forEach(r=>{p[r]=o.headers.get(r)??""});let m=o.headers.get("timeout"),a=m!==null?parseInt(m):e.defaultTimeout;o.url.startsWith("/api/v1/serverstate")&&o.url.includes("longpoll=true")&&(a=1e3*99);let g=e.relayWebsocket.sendCommand(n.accessToken,n.clientId,n.machineServerUrl,o.method,o.url,i,p,a);return new F(r=>{g.then(c=>{let u=new re;p!=null&&Object.keys(p).forEach(y=>{u.set(y,p[y])});let S=new se({body:c.body,status:c.statusCode,statusText:"OK",headers:u});r.next(S),r.complete()}).catch(c=>{r.error(new ie({error:c??"Unknown error",status:0,statusText:c??"Unknown error"}))})})}var He=(e,o)=>{let t={relayconfigState:s(v),defaultTimeout:s(f).defaultTimeout,relayWebsocket:s(O)},n=t.relayconfigState.config();if(t.relayconfigState.configLoaded!==null&&n===null){let i=new W;return t.relayconfigState.configLoaded.subscribe(p=>{p&&Pe(t,e,o).subscribe(i)}),i}return Pe(t,e,o)};var Ve={providers:[Z(),ue(Oe,fe(),he(de)),ae(ce(),pe([He,xe])),h,{provide:f,useValue:Ae},{provide:ee,useValue:ke()},{provide:be,useValue:{alertVariant:"simple"}},we,I,Te,oe,Se,te,Me,Ee]};ne(k,Ve);
|
|
1
|
+
import{b as Ie,c as ke}from"./chunk-23SRH7FI.js";import{a as we}from"./chunk-LE24LKH7.js";import{a as Ee}from"./chunk-EKVZKEQJ.js";import{b as I}from"./chunk-F3JYPWPK.js";import"./chunk-736PM4LG.js";import{a as Me}from"./chunk-TCXCC5BM.js";import{b as Te}from"./chunk-GKGMP6VF.js";import{a as V}from"./chunk-6Q6SSTBK.js";import{a as Se}from"./chunk-YCJYEQF7.js";import"./chunk-IMQUTGIK.js";import"./chunk-ANSV4G2K.js";import"./chunk-E4NQOMJX.js";import{a as H}from"./chunk-YYD2JU6T.js";import{a as h,b as ye,c as v,d as Re,e as E}from"./chunk-6JS7B4FW.js";import{u as be,x as Ce}from"./chunk-VKQQDCUN.js";import{a as ge,e as ve}from"./chunk-DSYNIXJF.js";import{c as le,d as me,g as de,h as ue,i as he,j as fe}from"./chunk-NPFPMA4P.js";import{a as ne}from"./chunk-O2SMJYPC.js";import{a as re,b as se,c as ie,e as ae,f as pe,g as ce}from"./chunk-N2AU7VKX.js";import{ha as te,ma as oe}from"./chunk-ZC23RK4J.js";import"./chunk-OPHQNXYO.js";import{A as B,F as J,Fb as Y,L as T,Lc as Z,Mc as ee,N as K,V as C,Y as _,_ as s,f as F,g as W,gb as Q,ha as q,ia as z,l as $,m as G,pa as d,q as w,ra as X,z as P}from"./chunk-TQTOIWBK.js";import"./chunk-7CGTOI24.js";var k=class e{#e=s(h);#d=s(v);ngOnInit(){ye(),this.#d.fetchConfig(),this.#e.clearAllNotCurrentVersion()}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=Q({type:e,selectors:[["app-root"]],decls:1,vars:0,template:function(t,n){t&1&&Y(0,"router-outlet")},dependencies:[le],encapsulation:2})};var Ae={production:!0,baseUrl:"/api",machineServerUrl:"${WS_URL}",defaultTimeout:3e4};var f=new _("ENVIRONMENT");var A=class e{#e=s(ve);isLoaded=d(!1);webmodules=d(null);preload(o=!1){let t=this.#e.getApiV1Webmodules().pipe(K(n=>this.webmodules.set(n)),J(()=>this.isLoaded.set(!0)));if(o)return t;t.subscribe()}static \u0275fac=function(t){return new(t||e)};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})};var Ue=()=>{let e=s(E);return e.token()?!0:e.checkProxyAuthed().pipe(T(o=>o?$(!0):e.refreshToken().pipe(w(()=>!0))))},je=()=>{let e=s(v),o=s(I),t=s(q),n=e.relayIsEnabled()?"longpoll":"websocket",i=[t.get(H).preload(!0),t.get(H).preloadFilterGroups(!0),t.get(A).preload(!0)];return e.configLoaded===null?P(i).pipe(w(()=>n)):e.configLoaded?.pipe(T(()=>P(i)))},Fe=()=>!0,Ne={path:"connect/:typeParam",loadComponent:()=>import("./chunk-OJVUCHRP.js")},We=()=>{let e=s(h);return!e.getItem("locale")&&navigator.language&&e.setItem("locale",navigator.language),!0},Oe=[{path:"",children:[{path:"login",canActivate:[],loadComponent:()=>import("./chunk-4E7D5F6K.js")},{path:"logout",loadComponent:()=>import("./chunk-FBU3EBFO.js")},{path:"",canActivate:[Ue],children:[{path:"",canActivate:[je,Fe,We],children:[{path:"welcome",loadComponent:()=>import("./chunk-JPCUISZG.js"),children:[{path:"",redirectTo:"select",pathMatch:"full"},{path:"select",loadComponent:()=>import("./chunk-MTL3FBSM.js")},Ne]},{path:"",loadComponent:()=>import("./chunk-YMFI2Q2X.js"),children:[{path:"",loadComponent:()=>import("./chunk-APSPCDGV.js")},Ne,{path:"destinations",loadComponent:()=>import("./chunk-OCUE5GMT.js")},{path:"add-backup",loadComponent:()=>import("./chunk-JPMKWWZP.js")},{path:"backup/:id/export",loadComponent:()=>import("./chunk-WJBMMY2Y.js")},{path:"backup/import",loadComponent:()=>import("./chunk-XBAZKJ47.js")},{path:"backup-draft/:id",loadComponent:()=>import("./chunk-XPVATEBM.js"),loadChildren:()=>import("./chunk-5YE4H57F.js")},{path:"backup/:id",loadComponent:()=>import("./chunk-XPVATEBM.js"),loadChildren:()=>import("./chunk-5YE4H57F.js")},{path:"backup/:id/log",loadComponent:()=>import("./chunk-JSZIISFS.js")},{path:"backup/:id/database",loadComponent:()=>import("./chunk-CZVTBPNE.js")},{path:"backup/:id/commandline",loadComponent:()=>import("./chunk-PPSQGUOL.js")},{path:"backup/:id/commandline/:runId",loadComponent:()=>import("./chunk-RDLRXAJU.js")},{path:"backup/:id/delete",loadComponent:()=>import("./chunk-GW34KK5A.js")},{path:"restore",children:[{path:"",loadComponent:()=>import("./chunk-FR5RTIOE.js")},{path:"from-config",loadComponent:()=>import("./chunk-IG7XUEED.js")}]},{path:"restore-from-files",loadComponent:()=>import("./chunk-DE4JIJWO.js"),loadChildren:()=>import("./chunk-5JGSXUKD.js")},{path:"restore-draft/:id",loadComponent:()=>import("./chunk-DE4JIJWO.js"),loadChildren:()=>import("./chunk-5JGSXUKD.js")},{path:"restore/:id",loadComponent:()=>import("./chunk-DE4JIJWO.js"),loadChildren:()=>import("./chunk-5JGSXUKD.js")},{path:"status",loadComponent:()=>import("./chunk-FDYBIC4O.js")},{path:"settings",loadComponent:()=>import("./chunk-G2BDKU26.js")},{path:"about",loadComponent:()=>import("./chunk-I5DD3Q6J.js"),children:[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",loadComponent:()=>import("./chunk-OLWLWDXZ.js")},{path:"changelog",loadComponent:()=>import("./chunk-FD5CKX3J.js")},{path:"libraries",loadComponent:()=>import("./chunk-ACTJSKQZ.js")},{path:"system-info",loadComponent:()=>import("./chunk-N2GI5QYJ.js")},{path:"server-settings",loadComponent:()=>import("./chunk-JP2Z2HMH.js")},{path:"logs",loadChildren:()=>import("./chunk-YWBZLU6M.js")},{path:"crashlogs",loadComponent:()=>import("./chunk-BKEJZADV.js")}]}]}]}]}]}];var xe=(e,o)=>{let t=s(E),n=s(me),i=s(h),p=s(f),m=i.getItem("locale"),a=s(Ce),g=Ie(m),r=ge.BASE||"",c=e.url===`${r}/api/v1/auth/login`,u=e.url===`${r}/api/v1/auth/logout`,S=e.url===`${r}/api/v1/auth/refresh`,y=e.url===`${r}/api/v1/progressstate`,x=e.url===`${r}/api/v1/remoteoperation/test`,M=e.url===`${r}/api/v1/filesystem/validate`,De=e.url.startsWith(`${r}/api/v2/`),L=t.token(),U=e,j=e.headers.has("custom-proxy-check")||L===Re;if(L&&e.url.startsWith(r+p.baseUrl)&&!j){let l=e.headers.set("Authorization",`Bearer ${L}`);m&&m!=="en-US"&&(l=l.set("X-Ui-Language",g)),U=e.clone({headers:l})}return o(U).pipe(w(l=>{if(l.type===4&&l.status===200&&De){let b=l.body;if(b?.Success===!1)throw{status:200,message:b?.Error??"Unknown error",error:{Error:b?.Error??"Unknown error"},requestBody:b}}return l}),B(l=>{let b=l.error?.Error||`Error Code: ${l.status}, Message: ${l.message}`;if(!j){let R=!0;if((y&&l.status===404||x||M)&&(R=!1),S&&l.status===401&&(R=!1,t.logout(),n.navigate(["/logout"])),!c&&!S&&!u&&l.status===401)return R=!1,t.refreshToken().pipe(T(()=>o(e.clone({headers:e.headers.set("Authorization",`Bearer ${t.token()}`)}))));R&&a.error(b)}return G(()=>({error:l,message:b}))}))};var N=class e{#e=s(z);showError(o){let t=this.#e.querySelector("body > .loading");if(!t)return;t.classList.add("has-error"),t.innerHTML="";let n=this.#e.createElement("div");n.classList.add("loading-title"),n.textContent="Unable to connect";let i=this.#e.createElement("div");i.classList.add("loading-error"),i.textContent=o||"Unknown error";let p=this.#e.createElement("button");p.type="button",p.classList.add("retry-button"),p.textContent="Retry",p.addEventListener("click",()=>{this.#e.defaultView?.location.reload()}),t.append(n,i,p)}static \u0275fac=function(t){return new(t||e)};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})};var $e="1.0.0",Le=`portal-proxy-client-${V()}`,Ge=1,O=class e{#e=1e3;#d=s(f);#u=s(N);#o=d("disconnected");#h=d(this.#e);#a=d(!1);#n=d(!1);#p=d(null);#c=d(null);#s=!1;isConnectedToMachineServer=this.#n.asReadonly();wsState=this.#o.asReadonly();#l=[];#r={};#t=null;#f=new TextDecoder("utf-8");#m=null;#y=X(()=>{let o=this.#a(),t=this.#h(),n=this.#p(),i=this.#c();if(!n||!i||!o||!t||t<this.#e){this.#m&&window.clearInterval(this.#m);return}this.#m=window.setInterval(()=>{this.connectToMachineServer(n,i)},t)});#i(o){this.#s||(this.#s=!0,this.#u.showError(o||"Unable to connect to the server."))}#g(){this.#s||(this.#s=!0)}utf8Atob(o){let t=Uint8Array.from(atob(o),i=>i.charCodeAt(0)),n=this.#f.decode(t);return n?JSON.parse(n):null}connectToMachineServer(o,t,n){let i=n?.reconnect??!1,p=this.wsState();(p==="disconnected"||p==="error"||i)&&(this.#t?.close(),this.#t=null),!this.#t&&(this.#s=!1,this.#t=new WebSocket(t),this.#o.set("connecting"),this.#t.onopen=()=>{this.#o.set("connect"),this.#n.set(!0),this.#a.set(!1),this.#p.set(null),this.#c.set(null)},this.#t.onclose=()=>{this.#o.set("disconnected"),this.#n.set(!1),this.#p.set(o),this.#c.set(t),this.#a.set(!0)},this.#t.onerror=()=>{this.#o.set("error")},this.#t.onmessage=m=>{let a=JSON.parse(m.data);if(this.wsState()==="connect"){if(a.type!=="welcome"){this.disconnectFromMachineServer(`Unexpected message type, expected 'welcome' but got '${a.type}'`);return}let r={token:o,publicKey:"",clientVersion:$e,protocolVersion:Ge},c=this.createResponse(a,"authportal",r);this.#o.set("welcome"),this.#t?.send(c)}else if(this.wsState()==="welcome"){if(a.type!=="authportal"){this.disconnectFromMachineServer(`Unexpected message type, expected 'authportal' but got '${a.type}'`);return}var g=JSON.parse(a.payload??"");if(g.accepted===!1){this.#i("Authentication failed"),this.disconnectFromMachineServer("Authentication failed");return}for(this.#o.set("authenticated"),this.#n.set(!0);this.#l.length>0;){let r=this.#l.pop();r&&this.#r[r.messageId]&&this.activateCommand(r)}}else if(this.wsState()==="authenticated"){if(a.type!=="command"){console.warn(`Unexpected message type, expected 'command' but got '${a.type}'`);return}let r=this.#r[a.messageId];if(r){if(a.errorMessage)this.#i(a.errorMessage),r.reject(a.errorMessage);else{let c=JSON.parse(a.payload??"");c.statusCode>=400?this.#i(c.body||`Initial request failed with status code ${c.statusCode}`):this.#g(),c.body=c?.body==null?null:this.utf8Atob(c.body),r.resolve(c)}delete this.#r[a.messageId],window.clearTimeout(r.timer)}}})}disconnectFromMachineServer(o=null){o&&console.error(o),this.#t?.close(),this.#t=null,this.#o.set("disconnected"),this.#n.set(!1)}createResponse(o,t,n){let i={from:Le,to:o.from,type:t,messageId:o.messageId,payload:JSON.stringify(n)};return JSON.stringify(i)}sendCommand(o,t,n,i,p,m,a,g=5e3){return(this.wsState()==="disconnected"||this.wsState()==="error")&&this.connectToMachineServer(o,n),new Promise((r,c)=>{let u=V(),y={from:Le,to:t,type:"command",messageId:u,payload:JSON.stringify({method:i,path:p,body:m,headers:a})},x={resolve:r,reject:c,timer:window.setTimeout(()=>{let M=this.#r[u];M&&(delete this.#r[u],this.#i("The request timed out before receiving a response."),M.reject("Timeout"))},g)};this.#r[u]=x,this.#n()?this.activateCommand(y):this.#l.push(y)})}activateCommand(o){this.#t?.send(JSON.stringify(o))}static \u0275fac=function(t){return new(t||e)};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})};function Be(e){if(typeof e!="string")return null;let t=new TextEncoder().encode(e);return window.btoa(String.fromCharCode(...t))}function Pe(e,o,t){let n=e.relayconfigState.config();if(n===null)return t(o);let i=Be(o.body),p={};o.headers.keys().forEach(r=>{p[r]=o.headers.get(r)??""});let m=o.headers.get("timeout"),a=m!==null?parseInt(m):e.defaultTimeout;o.url.startsWith("/api/v1/serverstate")&&o.url.includes("longpoll=true")&&(a=1e3*99);let g=e.relayWebsocket.sendCommand(n.accessToken,n.clientId,n.machineServerUrl,o.method,o.url,i,p,a);return new F(r=>{g.then(c=>{let u=new re;p!=null&&Object.keys(p).forEach(y=>{u.set(y,p[y])});let S=new se({body:c.body,status:c.statusCode,statusText:"OK",headers:u});r.next(S),r.complete()}).catch(c=>{r.error(new ie({error:c??"Unknown error",status:0,statusText:c??"Unknown error"}))})})}var He=(e,o)=>{let t={relayconfigState:s(v),defaultTimeout:s(f).defaultTimeout,relayWebsocket:s(O)},n=t.relayconfigState.config();if(t.relayconfigState.configLoaded!==null&&n===null){let i=new W;return t.relayconfigState.configLoaded.subscribe(p=>{p&&Pe(t,e,o).subscribe(i)}),i}return Pe(t,e,o)};var Ve={providers:[Z(),ue(Oe,fe(),he(de)),ae(ce(),pe([He,xe])),h,{provide:f,useValue:Ae},{provide:ee,useValue:ke()},{provide:be,useValue:{alertVariant:"simple"}},we,I,Te,oe,Se,te,Me,Ee]};ne(k,Ve);
|
package/package.json
CHANGED
package/chunk-4OA2FFS5.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as a,h as b,i as c,j as d}from"./chunk-DJXLNIMV.js";import"./chunk-CAQ3XMFP.js";import"./chunk-VC55KFAX.js";import"./chunk-ZEFSBETQ.js";import"./chunk-6Q6SSTBK.js";import"./chunk-YCJYEQF7.js";import"./chunk-OHYENIPP.js";import"./chunk-UTXZPAY6.js";import"./chunk-IMQUTGIK.js";import"./chunk-BACKG7KA.js";import"./chunk-IQL3REGJ.js";import"./chunk-AIAUP7OE.js";import"./chunk-C6PICAXB.js";import"./chunk-6JS7B4FW.js";import"./chunk-VKQQDCUN.js";import"./chunk-DSYNIXJF.js";import"./chunk-NPFPMA4P.js";import"./chunk-O2SMJYPC.js";import"./chunk-N2AU7VKX.js";import"./chunk-ZC23RK4J.js";import"./chunk-OPHQNXYO.js";import"./chunk-TQTOIWBK.js";import"./chunk-7CGTOI24.js";export{a as SCHEDULE_DEFAULT_OPTIONS,c as SCHEDULE_FIELD_DEFAULTS,d as default,b as scheduleOptionToSchedule};
|
package/chunk-AIAUP7OE.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as D}from"./chunk-C6PICAXB.js";import{c as j,e as q}from"./chunk-6JS7B4FW.js";import{z as b}from"./chunk-VKQQDCUN.js";import{a as x,d as v}from"./chunk-DSYNIXJF.js";import{ma as L}from"./chunk-ZC23RK4J.js";import{Fc as G,Gb as N,Hb as C,Hc as $,Ib as _,M as O,Qc as p,Sa as M,Tb as A,Ub as w,V as h,Vb as P,Wb as F,Xb as W,_ as c,f as m,g as y,gb as I,pa as n,ra as R}from"./chunk-TQTOIWBK.js";var S=class r{reconnectTimer=n(15e3);countdown=n(0);connectTimerEffect=R(()=>{let e=this.reconnectTimer();this.countdown.set(e/1e3)});interval=setInterval(()=>{if(this.countdown()<=1){this.countdown.set(this.reconnectTimer()/1e3);return}this.countdown.set(this.countdown()-1)},1e3);ngOnDestroy(){clearInterval(this.interval)}static \u0275fac=function(t){return new(t||r)};static \u0275cmp=I({type:r,selectors:[["app-disconnected-dialog"]],decls:8,vars:4,consts:()=>{let e;e=$localize`Reconnecting...`;let t;return t=$localize` The connection to the server is lost, attempting again in ${"\uFFFD#6\uFFFD"}:START_TAG_STRONG:0:${"\uFFFD0\uFFFD"}:INTERPOLATION:${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_STRONG:`,[e,t,["header",""],["content",""]]},template:function(t,s){t&1&&(N(0,"header",2)(1,"h3"),P(2,0),C()(),N(3,"div",3)(4,"p"),A(5,1),_(6,"strong"),G(7,"number"),w(),C()()),t&2&&(M(7),F($(7,1,s.countdown(),"2.0-0")),W(5))},dependencies:[L],styles:["[_nghost-%COMP%]{display:block;padding:1rem}"],changeDetection:0})};var T=class r{dialog=c(b);#e=c(v);#i=n("disconnected");#s=n(null);#t=n(-1);#r=n(0);#l=n(!1);#u=new y;connectionStatus=this.#i.asReadonly();serverState=this.#s.asReadonly();#o=void 0;duration=c(j).relayIsEnabled()?"94s":"299s";start(){this.#l.set(!0),this.#u=new y,this.#c()}stop(){this.#u.next(),this.#u.complete(),this.#l.set(!1)}reconnect(){this.stop(),this.start()}reconnectIfNeeded(){this.#l()||this.reconnect()}#c(){this.#i.set("connecting"),this.#e.getApiV1Serverstate({lastEventId:this.#t(),longpoll:this.#t()>=0,duration:this.duration}).pipe(O(this.#u)).subscribe({next:e=>{e&&this.#a(e),this.#n()},error:e=>{let s=this.#r()+1,l=Math.min(5e3*s,3e4);this.#r.set(s),s>3&&this.#i.set("disconnected"),this.#o||(this.#o=this.dialog.open(S,{closeOnButton:!1,closeOnEsc:!1,closeOnOutsideClick:!1})),this.#o.component.reconnectTimer.set(l),setTimeout(()=>{this.#c()},l)}})}#a(e){this.#i.set("connected"),this.#s.set(e),this.#t.set(e.LastEventID??-1),this.#r.set(0)}#n(){this.#l()&&this.#c()}static \u0275fac=function(t){return new(t||r)};static \u0275prov=h({token:r,factory:r.\u0275fac,providedIn:"root"})};var u=!1,k=class r{#e=c(q);#i=c(D);dialog=c(b);#s=null;#t=n("disconnected");#r=n(null);#l=n(null);#u=n(null);#o=n(null);#c=n(null);#a=void 0;#n=n({legacystatus:!0});shouldConnect=n(!0);connectionStatus=this.#t.asReadonly();serverState=this.#r.asReadonly();serverProgress=this.#l.asReadonly();serverSettings=this.#u.asReadonly();subscriptions=this.#n.asReadonly();serverTaskQueue=this.#o.asReadonly();backupListState=this.#c.asReadonly();#p=null;taskCompleted=new m(e=>{this.#p=e});#h=0;#d=null;start(){this.shouldConnect.set(!0),this.#g()}#g(){this.#d&&(clearTimeout(this.#d),this.#d=null);let e=this.#e.token();if(!e){console.error("No access token available");return}let t=window.location.protocol==="https:"?"wss:":"ws:",s=window.location.port?`:${window.location.port}`:"";window.location.port==="4200"&&(s=":8200");let l=window.location.hostname,g=x.BASE||"",f=this.#e.xsrfQueryParam(),Q=this.#i.hasWebSocketAuth()?`${t}//${l}${s}${g}/notifications${f?`?${f}`:""}`:`${t}//${l}${s}${g}/notifications?token=${e}${f?`&${f}`:""}`;this.#t.set("connecting"),this.#s=new WebSocket(Q),this.#s.onopen=()=>{u&&console.log("WebSocket connection established"),this.#i.hasWebSocketAuth()?(this.#t.set("authenticating"),this.#s?.send(JSON.stringify({Version:1,Token:e,Action:"auth"}))):this.#S()},this.#s.onmessage=d=>{if(this.#t()==="authenticating")try{let o=JSON.parse(d.data);if(o.Success){u&&console.log("WebSocket authentication successful"),this.#S();return}else if(o?.Type==="legacystatus")u&&console.log("WebSocket authentication successful"),this.#S();else{console.error("WebSocket authentication failed:",o.Message),this.#t.set("disconnected"),this.#e.refreshToken().subscribe({next:()=>{this.reconnect()},error:i=>{console.error("Error refreshing token after WebSocket auth failed",i)}});return}}catch(o){console.error("Error parsing WebSocket authentication reply",o),this.#t.set("disconnected");return}try{let o=JSON.parse(d.data),a=o?.Type;if(a==="legacystatus"||a==null)u&&console.log("Received legacy status update:",o),this.#r.set(o);else if(a==="reply"){let i=o;i.Success||console.error("WebSocket reply error:",i.Message)}else if(a==="progress"){let i=o;u&&console.log("Received progress update:",i.Data),this.#l.set(i.Data)}else if(a==="serversettings"){let i=o;u&&console.log("Received server settings update:",i.Data),this.#u.set(i.Data)}else if(a==="taskqueue"){let i=o;u&&console.log("Received task update:",i.Data),this.#o.set(i.Data)}else if(a==="taskcompleted"){let i=o;u&&console.log("Received task completed:",i.Data),this.#p?.next(i.Data)}else if(a==="backuplist"){let i=o;u&&console.log("Received backup list update:",i.Data),this.#c.set(i.Data)}else console.warn("Unknown WebSocket message type:",a)}catch(o){console.error("Error parsing WebSocket message",o)}},this.#s.onclose=d=>{u&&console.log("WebSocket connection closed",d),this.#t.set("disconnected");var o=d.code===4401;o&&this.#e.refreshToken().subscribe({next:()=>{this.reconnect()},error:a=>{console.error("Error refreshing token",a)}}),this.shouldConnect()&&(this.#a||(this.#a=this.dialog.open(S,{closeOnButton:!1,closeOnEsc:!1,closeOnOutsideClick:!1}),this.#a.component.reconnectTimer.set(15e3)),this.#d&&clearTimeout(this.#d),this.#d=setTimeout(()=>this.#g(),5e3))},this.#s.onerror=d=>{console.error("WebSocket error",d),this.#t.set("disconnected")}}#S(){this.#t.set("connected");let e=this.#n();Object.keys(e).length>0&&Object.entries(e).forEach(([t,s])=>{s!=null&&this.sendSubscribeRequest(t,s)}),this.#a&&this.#a.close()}stop(){this.shouldConnect.set(!1),this.#s?.close()}reconnect(){this.#s?.close(),this.start()}reconnectIfNeeded(){this.#s?.readyState!==WebSocket.OPEN&&this.reconnect()}sendSubscribeRequest(e,t){this.#s?.send(JSON.stringify({Version:1,Id:`req-${++this.#h}`,Action:"sub",Service:e,Data:t||null}))}subscribe(e,t=void 0){let s=this.#n(),l=s[e];(!l||JSON.stringify(l)!==JSON.stringify(t||!0))&&(s[e]=t||!0,this.#n.set(s),this.#t()=="connected"&&this.sendSubscribeRequest(e,t))}unsubscribe(e){let t=this.#n();t[e]&&(delete t[e],this.#n.set(t),this.#t()=="connected"&&this.#s?.send(JSON.stringify({Version:1,Id:`req-${++this.#h}`,Action:"unsub",Service:e})))}static \u0275fac=function(t){return new(t||r)};static \u0275prov=h({token:r,factory:r.\u0275fac,providedIn:"root"})};var V=10,J=class r{#e=c(k);#i=c(T);#s=c(v);#t=c(D);#r=n("longpoll");#l=n(!1);#u=p(()=>this.#t.hasTaskCompletedOption()&&this.#r()==="websocket");#o={};#c=null;#a=!1;#n=[];constructor(){this.#e.subscribe("taskcompleted"),this.#e.taskCompleted.subscribe(e=>{if(this.#n.unshift(e),this.#n.length>V&&this.#n.pop(),!e.ID)return;let t=this.#o[e.ID];t&&(t.forEach(s=>{s.next(e),s.complete()}),delete this.#o[e.ID])})}connectionStatus=p(()=>this.#r()==="websocket"?this.#e.connectionStatus():this.#i.connectionStatus());isConnectionMethodSet=this.#l.asReadonly();serverState=p(()=>this.#r()==="websocket"?this.#e.serverState():this.#i.serverState());progressState=this.#e.serverProgress;taskQueueState=this.#e.serverTaskQueue;activeTaskQueueState=p(()=>this.#r()==="websocket"?this.#e.serverTaskQueue()?.map(t=>t.ID).filter(t=>t)??[]:(this.#i.serverState()?.SchedulerQueueIds??[]).map(t=>t.Item1).filter(t=>t));backupListState=p(()=>this.#e.backupListState());setConnectionMethod(e){e==="websocket"?(this.#e.reconnectIfNeeded(),this.#i.stop()):(this.#i.reconnectIfNeeded(),this.#e.stop()),this.#r.set(e),this.#l.set(!0)}getConnectionMethod(){return this.#r()}subscribe(e,t=null){this.#e.subscribe(e,t)}unsubscribe(e){this.#e.unsubscribe(e)}waitForTaskToComplete(e){return new m(t=>{let s=this.#n.find(l=>l.ID===e);if(s){t.next(s),t.complete();return}this.#o[e]=this.#o[e]||[],this.#o[e].push(t),this.#p()})}#p(){this.#a||this.#u()||(this.#a=!0,this.#h())}#h(){let e=Object.keys(this.#o).map(s=>parseInt(s,10));if(e.length===0){this.#d();return}let t=Math.min(...e);this.#s.getApiV1TaskByTaskid({taskid:t}).subscribe({next:s=>{s.TaskFinished!=null&&(this.#n.unshift(s),this.#n.length>V&&this.#n.pop(),this.#o[t].forEach(g=>{g.next(s),g.complete()}),delete this.#o[t])},complete:()=>{this.#c=window.setTimeout(()=>{this.#h()},1e3)},error:s=>{this.#c=window.setTimeout(()=>{this.#h()},3e3)}})}#d(){this.#c!==null&&(clearTimeout(this.#c),this.#c=null),this.#a=!1}static \u0275fac=function(t){return new(t||r)};static \u0275prov=h({token:r,factory:r.\u0275fac,providedIn:"root"})};export{k as a,J as b};
|
package/chunk-C3PQFWVO.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a,b}from"./chunk-XXVDL5TR.js";import"./chunk-GRE6GKVP.js";import"./chunk-DJXLNIMV.js";import"./chunk-CAQ3XMFP.js";import"./chunk-VC55KFAX.js";import"./chunk-ZEFSBETQ.js";import"./chunk-6Q6SSTBK.js";import"./chunk-YCJYEQF7.js";import"./chunk-OHYENIPP.js";import"./chunk-UTXZPAY6.js";import"./chunk-IMQUTGIK.js";import"./chunk-BACKG7KA.js";import"./chunk-IQL3REGJ.js";import"./chunk-AIAUP7OE.js";import"./chunk-C6PICAXB.js";import"./chunk-6JS7B4FW.js";import"./chunk-VKQQDCUN.js";import"./chunk-DSYNIXJF.js";import"./chunk-NPFPMA4P.js";import"./chunk-O2SMJYPC.js";import"./chunk-N2AU7VKX.js";import"./chunk-ZC23RK4J.js";import"./chunk-OPHQNXYO.js";import"./chunk-TQTOIWBK.js";import"./chunk-7CGTOI24.js";export{a as createRestoreOptionsForm,b as default};
|
package/chunk-DSZ644JT.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-7CGTOI24.js";var o=[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",loadComponent:()=>import("./chunk-YWUUX3S6.js")},{path:"destination",loadComponent:()=>import("./chunk-EADZVBRA.js")},{path:"source-data",loadComponent:()=>import("./chunk-XEG3CP74.js")},{path:"schedule",loadComponent:()=>import("./chunk-4OA2FFS5.js")},{path:"options",loadComponent:()=>import("./chunk-ZNYRWXQR.js")}];export{o as default};
|
package/chunk-EPIYGHPM.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as v}from"./chunk-IFSZJSGH.js";import"./chunk-QDDVZ4CR.js";import"./chunk-BLSV7CNZ.js";import"./chunk-I6MIXWIT.js";import{q as S}from"./chunk-DJXLNIMV.js";import"./chunk-CAQ3XMFP.js";import"./chunk-VC55KFAX.js";import"./chunk-ZEFSBETQ.js";import"./chunk-RJ2JM7C7.js";import{a as D}from"./chunk-WOKYULBU.js";import"./chunk-TCXCC5BM.js";import"./chunk-GKGMP6VF.js";import"./chunk-6Q6SSTBK.js";import"./chunk-YCJYEQF7.js";import"./chunk-OHYENIPP.js";import"./chunk-UTXZPAY6.js";import"./chunk-IMQUTGIK.js";import"./chunk-ANSV4G2K.js";import"./chunk-BACKG7KA.js";import{b as g}from"./chunk-IQL3REGJ.js";import"./chunk-AIAUP7OE.js";import"./chunk-C6PICAXB.js";import"./chunk-6JS7B4FW.js";import{L as R,R as L}from"./chunk-VKQQDCUN.js";import{d as I}from"./chunk-DSYNIXJF.js";import{b as A,c as M,e as O,f as y}from"./chunk-NPFPMA4P.js";import"./chunk-O2SMJYPC.js";import"./chunk-N2AU7VKX.js";import"./chunk-ZC23RK4J.js";import"./chunk-OPHQNXYO.js";import{$b as N,Cb as p,Cc as u,D as k,Db as r,Eb as s,Fb as m,Sa as o,Vb as c,_,gb as T,nc as E,pc as b,ra as h,wb as C,xb as f,zc as B}from"./chunk-TQTOIWBK.js";import"./chunk-7CGTOI24.js";var G=(i,e)=>[i,e,"general"],$=(i,e)=>[i,e,"destination"],U=(i,e)=>[i,e,"source-data"],K=(i,e)=>[i,e,"schedule"],F=(i,e)=>[i,e,"options"];function w(i,e){if(i&1&&(r(0,"p"),E(1),s()),i&2){let t=N();o(),b("Editing: ",t.backupName())}}function J(i,e){i&1&&m(0,"sh-progress-bar",7)}function X(i,e){i&1&&(r(0,"section"),m(1,"router-outlet"),s())}var P=class i{#t=_(A);#e=_(S);#i=_(D);#n=_(I);isDraft=this.#e.isDraft;isNew=this.#e.isNew;backupId=this.#e.backupId;backupName=this.#e.backupName;finishedLoading=this.#e.finishedLoading;#a=g(this.#t.params);#o=g(this.#t.url);paramsChanged=h(()=>{let e=this.#a()?.id,t=!!this.#o()?.find(n=>n.path==="backup-draft");this.#e.backupId.set(e),e!=="new"?this.getBackup(e,t):this.getDefaults()});getDefaults(){this.#n.getApiV1Backupdefaults().pipe(k(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(!0)}})}getBackup(e,t=!1){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(!0)};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 this.#n.getApiV1BackupById({id:e}).subscribe({next:n})}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=T({type:i,selectors:[["app-backup"]],features:[B([S])],decls:16,vars:22,consts:()=>{let e;e=$localize` General `;let t;t=$localize` Destination `;let n;n=$localize` Source Data `;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&&(m(0,"app-status-bar"),r(1,"header"),C(2,w,2,1,"p"),r(3,"sh-stepper",5)(4,"div",6),c(5,0),s(),r(6,"div",6),c(7,1),s(),r(8,"div",6),c(9,2),s(),r(10,"div",6),c(11,3),s(),r(12,"div",6),c(13,4),s()()(),C(14,J,1,0,"sh-progress-bar",7)(15,X,2,0,"section")),t&2&&(o(2),f(n.isNew()?-1:2),o(2),p("routerLink",u(7,G,n.isDraft()?"/backup-draft":"/backup",n.backupId())),o(2),p("routerLink",u(10,$,n.isDraft()?"/backup-draft":"/backup",n.backupId())),o(2),p("routerLink",u(13,U,n.isDraft()?"/backup-draft":"/backup",n.backupId())),o(2),p("routerLink",u(16,K,n.isDraft()?"/backup-draft":"/backup",n.backupId())),o(2),p("routerLink",u(19,F,n.isDraft()?"/backup-draft":"/backup",n.backupId())),o(2),f(n.finishedLoading()?15:14))},dependencies:[M,O,y,v,L,R],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}"],changeDetection:0})};export{P as default};
|
package/chunk-EXMYBMGI.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as u}from"./chunk-RJ2JM7C7.js";import{d as m}from"./chunk-DSYNIXJF.js";import{A as d,D as o,F as p,N as h,V as N,_ as r,l as c,pa as s,ra as l,w as f}from"./chunk-TQTOIWBK.js";var b=class a{#e=r(m);#o=r(u);serverState=this.#o.serverState;serverStateEffect=l(()=>{let t=this.#o.serverState();t?.LastNotificationUpdateID&&this.updateLastNotificationEventId(t?.LastNotificationUpdateID)});#s=-1;#a=s(!1);#t=s([]);#i=s([]);notifications=this.#t.asReadonly();init(){this.notifications().length===0&&this.getNotifications()}updateLastNotificationEventId(t){this.#s!==t&&(this.#s=t,this.getNotifications())}getNotifications(){this.#a.set(!0),this.#e.getApiV1Notifications().pipe(o(1),h(t=>this.#t.set(t)),p(()=>this.#a.set(!1))).subscribe()}getNofication(t){this.#e.getApiV1NotificationById({id:t}).pipe(o(1)).subscribe()}deleteNotification(t){let i=this.#t(),e=i[t];this.#i.set(i),i.splice(t,1),this.#t.set(i),this.#e.deleteApiV1NotificationById({id:e.ID}).pipe(o(1)).subscribe({error:()=>{this.#t.set(this.#i()),this.#i.set([])}})}deleteAllNotifications(){let t=this.#t();this.#i.set(t),this.#t.set([]);let i=t.map(e=>this.#e.deleteApiV1NotificationById({id:e.ID}).pipe(d(()=>c(e))));f(i).pipe(o(1)).subscribe({next:e=>{let g=e.filter(n=>n!=null&&"ID"in n);this.#t.set(g),this.#i.set([])},error:()=>{this.#t.set(this.#i()),this.#i.set([])}})}static \u0275fac=function(i){return new(i||a)};static \u0275prov=N({token:a,factory:a.\u0275fac,providedIn:"root"})};export{b as a};
|
package/chunk-N3NJW75G.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-7CGTOI24.js";var o=[{path:"",redirectTo:"select-files",pathMatch:"full"},{path:"destination",loadComponent:()=>import("./chunk-M3PW6DLD.js")},{path:"encryption",loadComponent:()=>import("./chunk-QZQS7M3D.js")},{path:"select-files",loadComponent:()=>import("./chunk-PG4G4RLP.js")},{path:"options",loadComponent:()=>import("./chunk-C3PQFWVO.js")},{path:":taskid/progress",loadComponent:()=>import("./chunk-XDBSTUYC.js")}],t=o;export{t as default};
|
package/chunk-OHYENIPP.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as d}from"./chunk-UTXZPAY6.js";import{a as f}from"./chunk-IMQUTGIK.js";import{a as R}from"./chunk-BACKG7KA.js";import{a as h}from"./chunk-C6PICAXB.js";import{z as u}from"./chunk-VKQQDCUN.js";import{d as m}from"./chunk-DSYNIXJF.js";import{Qc as g,V as a,_ as s,pa as o,ra as c}from"./chunk-TQTOIWBK.js";var p=class n{#n=s(d);#l=s(u);#e=s(m);#o=s(h);#a=s(R);repeatRegisterTimer=null;#r=null;#s=0;#c=5;#g=2e3;state=o("unknown");claimUrl=o(null);registerUrl=o("");customRegisterUrl=o("");status=g(()=>{let e=this.state();return e==="connecting"?$localize`Console connection is enabled but not connected`:e==="connected"?$localize`Connected to console`:e==="registering"?$localize`Registering machine...`:e==="registeringfaulted"?$localize`Registration failed`:e==="registered"?$localize`Registered, waiting for accept`:e==="disabled"?$localize`Console connection is configured but not enabled`:e==="unknown"?$localize`...loading...`:$localize`Console connection is not set up`});sysInfoEffect=c(()=>{let e=this.#o.systemInfo();e&&this.registerUrl.set(e.RemoteControlRegistrationUrl??"")});#t(e){this.#s=0,e.RegistrationUrl&&this.claimUrl.set(e.RegistrationUrl),e.IsConnected?this.state.set("connected"):e.IsEnabled?this.state.set("connecting"):e.CanEnable?this.state.set("disabled"):e.IsRegisteringFaulted?this.state.set("registeringfaulted"):e.IsRegistering?e.RegistrationUrl!=null&&e.RegistrationUrl.trim().length>0?this.state.set("registered"):this.state.set("registering"):this.state.set("inactive");let i=this.state();this.repeatRegisterTimer!==null&&(clearTimeout(this.repeatRegisterTimer),this.repeatRegisterTimer=null),i==="registering"&&(this.repeatRegisterTimer=setTimeout(()=>{this.#e.postApiV1RemotecontrolRegisterWait().subscribe({next:t=>this.#t(t),error:t=>this.#i(t)})},5e3)),(i==="connecting"||i==="registered")&&(this.repeatRegisterTimer=setTimeout(()=>{this.#e.getApiV1RemotecontrolStatus().subscribe({next:t=>this.#t(t),error:t=>this.#i(t)})},5e3)),e.IsRegistering&&e.CanEnable&&this.#e.deleteApiV1RemotecontrolRegister().subscribe({next:t=>this.#t(t)})}#i(e){if(this.#r!==null&&(clearTimeout(this.#r),this.#r=null),this.#s>=this.#c){this.state.set("registeringfaulted"),this.#s=0;return}let i=this.#g*Math.pow(2,this.#s);this.#s++,this.#r=setTimeout(()=>{this.#r=null,this.#e.getApiV1RemotecontrolStatus().subscribe({next:t=>this.#t(t),error:t=>this.#i(t)})},i)}refreshRemoteControlStatus(){this.#e.getApiV1RemotecontrolStatus().subscribe({next:e=>this.#t(e),error:e=>this.#i(e)})}beginRemoteRegistration(e=!1){this.state.set("registering"),this.#e.postApiV1RemotecontrolRegister({requestBody:{RegistrationUrl:e?this.customRegisterUrl():this.registerUrl()}}).subscribe({next:i=>this.#t(i),error:i=>this.#i(i)})}cancelRemoteRegistration(){this.#e.deleteApiV1RemotecontrolRegister().subscribe({next:e=>this.#t(e),error:e=>this.#i(e)})}enableRemoteControl(){this.#e.postApiV1RemotecontrolEnable().subscribe({next:e=>this.#t(e),error:e=>this.#i(e)})}disableRemoteControl(){this.#e.postApiV1RemotecontrolDisable().subscribe({next:e=>this.#t(e),error:e=>this.#i(e)})}deleteRemoteControl(){let e=this;this.#l.open(f,{data:{title:$localize`Confirm delete`,message:$localize`Are you sure you want to delete the console registration?`,confirmText:$localize`Delete registration`,cancelText:$localize`Cancel`},closed:i=>{i&&e.#e.deleteApiV1RemotecontrolRegistration().subscribe({next:t=>e.#t(t),error:t=>e.#i(t)})}})}openConsole(e="/app/machines",i){let t=this.#a.serverSettings(),b=this.#o.systemInfo(),r="https://app.duplicati.com",l=b?.RemoteControlDashboardUrl??"";if(l.length>0&&(r=l),t&&t["remote-control-dashboard-url"]&&(r=t["remote-control-dashboard-url"]),r=new URL(r).origin+e,i){let y=new URLSearchParams(i);r+=`?${y.toString()}`}this.#n.open(r,"_blank")}static \u0275fac=function(i){return new(i||n)};static \u0275prov=a({token:n,factory:n.\u0275fac,providedIn:"root"})};export{p as a};
|
package/chunk-QOWXL7ZL.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as dn}from"./chunk-IFSZJSGH.js";import{a as Tn}from"./chunk-QDDVZ4CR.js";import"./chunk-BLSV7CNZ.js";import"./chunk-I6MIXWIT.js";import{c as _e,l as Cn}from"./chunk-ZEFSBETQ.js";import{b as un}from"./chunk-RJ2JM7C7.js";import{a as sn}from"./chunk-WOKYULBU.js";import"./chunk-TCXCC5BM.js";import"./chunk-GKGMP6VF.js";import"./chunk-6Q6SSTBK.js";import"./chunk-YCJYEQF7.js";import{a as Fn}from"./chunk-OHYENIPP.js";import"./chunk-UTXZPAY6.js";import"./chunk-IMQUTGIK.js";import{a as cn}from"./chunk-ANSV4G2K.js";import"./chunk-BACKG7KA.js";import"./chunk-IQL3REGJ.js";import"./chunk-AIAUP7OE.js";import"./chunk-C6PICAXB.js";import"./chunk-6JS7B4FW.js";import{A as Ze,B as oe,C as en,E as nn,G as tn,K as on,L as _n,S as an,T as ln,v as ie,z as Ye}from"./chunk-VKQQDCUN.js";import{d as rn}from"./chunk-DSYNIXJF.js";import{e as te}from"./chunk-NPFPMA4P.js";import"./chunk-O2SMJYPC.js";import"./chunk-N2AU7VKX.js";import"./chunk-ZC23RK4J.js";import"./chunk-OPHQNXYO.js";import{$b as l,Ab as V,Ac as j,Bb as U,Bc as $,Cb as E,Db as o,Eb as i,F as q,Fb as C,Fc as D,Gc as k,Hc as A,Jb as N,Jc as ee,Kb as M,Lb as f,Mb as R,Pa as J,Qc as ne,Sa as a,Tb as s,Ub as u,Vb as d,Wb as x,Xb as y,Yb as K,Zb as I,_ as L,da as m,ea as O,gb as We,ic as W,kc as h,lb as P,mb as je,nc as T,pa as H,pc as S,ra as Ke,sc as Q,tb as qe,tc as Y,ub as Qe,uc as Z,wb as p,xb as g,yb as z}from"./chunk-TQTOIWBK.js";import"./chunk-7CGTOI24.js";var pn=()=>[te,import("./chunk-KZTFESBJ.js").then(e=>e.NgTemplateOutlet),oe,ie,nn,ln,an,import("./chunk-3RCF6UT4.js").then(e=>e.BackupProgressComponent),import("./chunk-XWTB7XRI.js").then(e=>e.DurationFormatPipe),import("./chunk-ZNYN6ES6.js").then(e=>e.BytesPipe),import("./chunk-ACTATISC.js").then(e=>e.RelativeTimePipe)],gn=()=>["/add-backup"],Sn=()=>["/restore"],En=e=>({$implicit:e}),mn=()=>["/backup/new"],On=e=>["/backup",e],Nn=e=>["/restore",e],Mn=e=>["/backup",e,"export"],In=e=>["/backup",e,"delete"],Pn=e=>["/backup",e,"database"],Dn=e=>["/backup",e,"commandline"],fn=e=>["/backup",e,"log"];function $n(e,t){e&1&&d(0,11,1)}function Rn(e,t){e&1&&d(0,11,2)}function hn(e,t){if(e&1&&d(0,11,3),e&2){let n=l(2);x(n.timeType()),y(0)}}function An(e,t){if(e&1){let n=R();o(0,"button",64),I("click",function(){let c=m(n).$implicit,F=l(3);return O(F.sortByColumn.set(c.value))}),d(1,15),i()}if(e&2){let n=t.$implicit,_=l(3);h("active",_.orderBy()===n.value),a(),x(n.label),y(1)}}function Ln(e,t){if(e&1&&(o(0,"sh-menu",61)(1,"button",62),s(2,14),C(3,"strong")(4,"sh-icon"),u(),i(),N(5,63),V(6,An,2,3,"button",65,z),M(),i()),e&2){let n=l(2);a(4),x(n.orderBy()),y(2),a(2),U(n.sortOrderOptions())}}function xn(e,t){if(e&1){let n=R();o(0,"div",57)(1,"sh-button-group",58),Z("valueChange",function(c){m(n);let F=l();return Y(F.viewMode,c)||(F.viewMode=c),O(c)}),o(2,"button",59),s(3,9),C(4,"sh-icon"),u(),i(),o(5,"button",60),s(6,10),C(7,"sh-icon"),u(),i()(),o(8,"sh-menu",61)(9,"button",62),s(10,11),o(11,"strong"),p(12,$n,1,0)(13,Rn,1,0)(14,hn,1,1),i(),C(15,"sh-icon"),u(),i(),N(16,63),o(17,"button",64),I("click",function(){m(n);let c=l();return O(c.setTimeType("relative"))}),d(18,12),i(),o(19,"button",64),I("click",function(){m(n);let c=l();return O(c.setTimeType("actual"))}),d(20,13),i(),M(),i(),p(21,Ln,8,1,"sh-menu",61),i()}if(e&2){let n=l();a(),Q("value",n.viewMode),a(11),g(n.timeType()=="relative"?12:n.timeType()=="actual"?13:14),a(9),g(n.viewMode()==="list"?21:-1)}}function yn(e,t){if(e&1){let n=R();o(0,"div",70)(1,"div",53)(2,"h3"),T(3),o(4,"sh-chip"),C(5,"img",72),T(6),i()()(),o(7,"div",73)(8,"sh-chip",74),d(9,16),i()(),o(10,"div",57)(11,"button",75),I("click",function(){m(n);let c=l().$implicit,F=l(4);return O(F.openInConsole(c))}),s(12,17),C(13,"sh-icon"),u(),i()(),C(14,"app-backup-progress",76),i()}if(e&2){let n=l().$implicit,_=l(4);a(3),S(" ",n.Backup.Name??_.MISSING_BACKUP_NAME," "),a(2),E("src",_.getBackendIcon(n.Backup.TargetURL),J),a(),S(" ",_.getBackendType(n.Backup.TargetURL)," "),a(8),E("backupId",n.Backup.ID)}}function Hn(e,t){if(e&1&&(o(0,"p")(1,"span"),d(2,23),i(),T(3),D(4,"relativeTime"),i()),e&2){let n=l(3).$implicit,_=l(4);a(3),S(" ",A(4,1,n.Schedule.Time,_.timeType()==="actual")," ")}}function kn(e,t){if(e&1&&(T(0),D(1,"durationFormat")),e&2){let n=l(3).$implicit,_=l(4);S(" ",A(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDuration,_.timeType()==="actual")," ")}}function Gn(e,t){e&1&&(N(0),T(1,"-"),M())}function bn(e,t){if(e&1&&(T(0),D(1,"bytes")),e&2){let n=l(3).$implicit;S(" ",k(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.SourceFilesSize)," ")}}function Bn(e,t){e&1&&(N(0),T(1,"-"),M())}function vn(e,t){if(e&1&&(T(0),D(1,"bytes")),e&2){let n=l(3).$implicit;S(" ",k(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.TargetFilesSize)," ")}}function wn(e,t){e&1&&(N(0),T(1,"-"),M())}function Xn(e,t){if(e&1&&(o(0,"p")(1,"span"),d(2,19),i(),T(3),D(4,"relativeTime"),i(),p(5,Hn,5,4,"p"),o(6,"p")(7,"span"),d(8,20),i(),p(9,kn,2,4)(10,Gn,2,0,"ng-container"),i(),o(11,"p")(12,"span"),d(13,21),i(),p(14,bn,2,3)(15,Bn,2,0,"ng-container"),i(),o(16,"p")(17,"span"),d(18,22),i(),p(19,vn,2,3)(20,wn,2,0,"ng-container"),i()),e&2){let n=l(2).$implicit,_=l(4);a(3),S(" ",A(4,5,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupFinished,_.timeType()==="actual")," "),a(2),g(!(n==null||n.Schedule==null)&&n.Schedule.Time?5:-1),a(4),g(n.Backup.Metadata!=null&&n.Backup.Metadata.LastBackupDuration?9:10),a(5),g(n.Backup.Metadata!=null&&n.Backup.Metadata.SourceFilesSize?14:15),a(5),g(n.Backup.Metadata!=null&&n.Backup.Metadata.TargetFilesSize?19:20)}}function Jn(e,t){if(e&1&&C(0,"app-backup-progress",76),e&2){let n=l(2).$implicit;E("backupId",n.Backup.ID)}}function zn(e,t){e&1&&(o(0,"sh-chip",74),d(1,24),i())}function Vn(e,t){e&1&&f(0)}function Un(e,t){if(e&1&&(o(0,"div",71)(1,"div",53)(2,"h3"),T(3),o(4,"sh-chip"),C(5,"img",72),T(6),i()(),p(7,Xn,21,8)(8,Jn,1,1,"app-backup-progress",76),i(),o(9,"div",73)(10,"sh-chip",77),d(11,18),i(),p(12,zn,2,0,"sh-chip",74),i(),o(13,"div",57),P(14,Vn,1,0,"ng-container",78),i()()),e&2){let n=l().$implicit,_=l(4),c=W(33);a(3),S(" ",n.Backup.Name??_.MISSING_BACKUP_NAME," "),a(2),E("src",_.getBackendIcon(n.Backup.TargetURL),J),a(),S(" ",_.getBackendType(n.Backup.TargetURL)," "),a(),g(_.runningBackupId()!==n.Backup.ID?7:8);let F=_.getBackupVersionCount(n);a(4),x(F)(F),y(11),a(),g(n.Backup.ExternalID?12:-1),a(2),E("ngTemplateOutlet",c)("ngTemplateOutletContext",$(9,En,n))}}function Kn(e,t){if(e&1&&p(0,yn,15,4,"div",70)(1,Un,15,11,"div",71),e&2){let n=t.$implicit;g(n.Backup.ExternalID?0:1)}}function Wn(e,t){if(e&1&&V(0,Kn,2,1,null,null,z),e&2){let n=l(3);U(n.backups())}}function jn(e,t){e&1&&(o(0,"div",69),s(1,25),o(2,"button",79),C(3,"sh-icon"),i(),u(),i()),e&2&&(a(2),E("routerLink",j(1,mn)))}function qn(e,t){if(e&1&&(o(0,"div",68),p(1,Wn,2,0)(2,jn,4,2,"div",69),i()),e&2){let n=l(2);h("fallback",n.backups().length===0),a(),g(n.backups().length?1:2)}}function Qn(e,t){e&1&&(s(0,26,1),f(1),u())}function Yn(e,t){e&1&&(s(0,27,1),f(1),u())}function Zn(e,t){e&1&&(s(0,28,1),f(1),u())}function et(e,t){e&1&&(s(0,29,1),f(1),u())}function nt(e,t){e&1&&(s(0,30,1),f(1),u())}function tt(e,t){e&1&&(s(0,31,1),f(1),u())}function it(e,t){e&1&&(s(0,32,1),f(1),u())}function ot(e,t){if(e&1&&(T(0),D(1,"relativeTime")),e&2){let n=l().$implicit,_=l(3);S(" ",A(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDate,_.timeType()==="actual")," ")}}function _t(e,t){e&1&&(N(0),T(1,"-"),M())}function at(e,t){if(e&1&&(T(0),D(1,"relativeTime")),e&2){let n=l().$implicit,_=l(3);S(" ",A(1,1,n.Schedule.Time,_.timeType()==="actual")," ")}}function lt(e,t){e&1&&(N(0),T(1,"-"),M())}function rt(e,t){if(e&1&&(T(0),D(1,"durationFormat")),e&2){let n=l().$implicit,_=l(3);S(" ",A(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDuration,_.timeType()==="actual")," ")}}function ct(e,t){e&1&&(N(0),T(1,"-"),M())}function st(e,t){if(e&1&&(T(0),D(1,"bytes")),e&2){let n=l().$implicit;S(" ",k(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.SourceFilesSize)," ")}}function ut(e,t){e&1&&(N(0),T(1,"-"),M())}function Ft(e,t){if(e&1&&(T(0),D(1,"bytes")),e&2){let n=l().$implicit;S(" ",k(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.TargetFilesSize)," ")}}function Ct(e,t){e&1&&(N(0),T(1,"-"),M())}function Tt(e,t){e&1&&f(0)}function dt(e,t){if(e&1&&(o(0,"tr")(1,"td"),T(2),i(),o(3,"td")(4,"sh-chip",90),C(5,"img",72),T(6),i()(),o(7,"td"),p(8,ot,2,4)(9,_t,2,0,"ng-container"),i(),o(10,"td"),p(11,at,2,4)(12,lt,2,0,"ng-container"),i(),o(13,"td"),p(14,rt,2,4)(15,ct,2,0,"ng-container"),i(),o(16,"td"),p(17,st,2,3)(18,ut,2,0,"ng-container"),i(),o(19,"td"),p(20,Ft,2,3)(21,Ct,2,0,"ng-container"),i(),o(22,"td")(23,"span"),d(24,35),i()(),o(25,"td"),P(26,Tt,1,0,"ng-container",78),i()()),e&2){let n=t.$implicit,_=l(3),c=W(33);a(2),S(" ",n.Backup.Name??_.MISSING_BACKUP_NAME," "),a(3),E("src",_.getBackendIcon(n.Backup.TargetURL),J),a(),S(" ",_.getBackendType(n.Backup.TargetURL)," "),a(2),g(n.Backup.Metadata!=null&&n.Backup.Metadata.LastBackupDate?8:9),a(3),g(!(n==null||n.Schedule==null)&&n.Schedule.Time?11:12),a(3),g(n.Backup.Metadata!=null&&n.Backup.Metadata.LastBackupDuration?14:15),a(3),g(n.Backup.Metadata!=null&&n.Backup.Metadata.SourceFilesSize?17:18),a(3),g(n.Backup.Metadata!=null&&n.Backup.Metadata.TargetFilesSize?20:21);let F=_.getBackupVersionCount(n);a(4),x(F)(F),y(24),a(2),E("ngTemplateOutlet",c)("ngTemplateOutletContext",$(12,En,n))}}function Et(e,t){if(e&1){let n=R();o(0,"sh-table",80),Z("sortByColumnChange",function(c){m(n);let F=l(2);return Y(F.sortByColumn,c)||(F.sortByColumn=c),O(c)}),o(1,"tr",81)(2,"th",82),s(3,26),P(4,Qn,2,0,"ng-container",83),u(),i(),o(5,"th",84),s(6,27),P(7,Yn,2,0,"ng-container",83),u(),i(),o(8,"th",85),s(9,28),P(10,Zn,2,0,"ng-container",83),u(),i(),o(11,"th",86),s(12,29),P(13,et,2,0,"ng-container",83),u(),i(),o(14,"th",87),s(15,30),P(16,nt,2,0,"ng-container",83),u(),i(),o(17,"th",88),s(18,31),P(19,tt,2,0,"ng-container",83),u(),i(),o(20,"th",89),s(21,32),P(22,it,2,0,"ng-container",83),u(),i(),o(23,"th"),d(24,33),i(),o(25,"th"),d(26,34),i()(),V(27,dt,27,14,"tr",null,z),i()}if(e&2){let n=l(2),_=W(35);E("data",n.backups())("loading",n.backupsLoading()),Q("sortByColumn",n.sortByColumn),a(4),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(5),U(n.backups())}}function pt(e,t){if(e&1&&p(0,qn,3,3,"div",66)(1,Et,29,10,"sh-table",67),e&2){let n=l();g(n.viewMode()==="list"?0:n.viewMode()==="details"?1:-1)}}function gt(e,t){e&1&&(o(0,"div",91),C(1,"sh-progress-bar",92),o(2,"div",53)(3,"h3"),d(4,36),i()()())}function St(e,t){if(e&1){let n=R();o(0,"button",94),I("click",function(){m(n);let c=l(3);return O(c.abort())}),s(1,38),C(2,"sh-icon"),u(),i()}if(e&2){let n=l(3);h("small",n.viewMode()==="details")}}function mt(e,t){if(e&1){let n=R();o(0,"button",94),I("click",function(){m(n);let c=l(3);return O(c.stop())}),s(1,39),C(2,"sh-icon"),u(),i()}if(e&2){let n=l(3);h("small",n.viewMode()==="details")}}function Ot(e,t){e&1&&(s(0,37,1),C(1,"sh-icon"),u())}function Nt(e,t){e&1&&(s(0,37,2),C(1,"sh-icon"),u())}function Mt(e,t){if(e&1){let n=R();p(0,St,3,2,"button",93)(1,mt,3,2,"button",93),o(2,"button",94),I("click",function(){m(n);let c=l(2);return O(c.pauseResume())}),s(3,37),p(4,Ot,2,0)(5,Nt,2,0),u(),i()}if(e&2){let n=l(2);g(n.isStopping()?0:1),a(2),h("small",n.viewMode()==="details")("loading",n.isResuming()),a(2),g(n.clientIsRunning()?4:5)}}function It(e,t){e&1&&d(0,40,1)}function Pt(e,t){e&1&&(o(0,"sh-icon"),T(1,"check"),i())}function Dt(e,t){e&1&&(o(0,"sh-icon"),T(1,"dots-three-vertical"),i())}function ft(e,t){if(e&1){let n=R();o(0,"button",94),I("click",function(){m(n);let c=l().$implicit,F=l();return O(F.startBackup(c.Backup.ID))}),s(1,40),C(2,"sh-icon"),p(3,It,1,0),u(),i(),o(4,"button",95)(5,"sh-icon"),T(6,"pencil-simple"),i()(),o(7,"sh-menu")(8,"button",96),p(9,Pt,2,0,"sh-icon")(10,Dt,2,0,"sh-icon"),i(),N(11,63),o(12,"h3",97),T(13,"Operations"),i(),o(14,"button",98),s(15,41),C(16,"sh-icon"),u(),i(),o(17,"button",98),s(18,42),C(19,"sh-icon"),u(),i(),o(20,"button",98),s(21,43),C(22,"sh-icon"),u(),i(),C(23,"sh-divider"),o(24,"h3",97),d(25,44),i(),o(26,"button",98),s(27,45),C(28,"sh-icon"),u(),i(),o(29,"button",64),I("click",function(){m(n);let c=l().$implicit,F=l();return O(F.verifyFiles(c.Backup.ID))}),s(30,46),C(31,"sh-icon"),u(),i(),o(32,"button",64),I("click",function(){m(n);let c=l().$implicit,F=l();return O(F.compressBackup(c.Backup.ID))}),s(33,47),C(34,"sh-icon"),u(),i(),o(35,"button",98),s(36,48),C(37,"sh-icon"),u(),i(),C(38,"sh-divider"),o(39,"h3",97),d(40,49),i(),o(41,"button",98),s(42,50),C(43,"sh-icon"),u(),i(),M(),i()}if(e&2){let n=l().$implicit,_=l();h("loading",_.startingBackup()===n.Backup.ID),a(3),g(_.viewMode()==="list"?3:-1),a(),E("routerLink",$(15,On,n.Backup.ID)),a(4),h("loading",_.loadingId()===n.Backup.ID)("success",_.successId()===n.Backup.ID),a(),g(_.successId()===n.Backup.ID?9:10),a(5),E("routerLink",$(17,Nn,n.Backup.ID)),a(3),E("routerLink",$(19,Mn,n.Backup.ID)),a(3),E("routerLink",$(21,In,n.Backup.ID)),a(6),E("routerLink",$(23,Pn,n.Backup.ID)),a(9),E("routerLink",$(25,Dn,n.Backup.ID)),a(6),E("routerLink",$(27,fn,n.Backup.ID))}}function $t(e,t){if(e&1&&p(0,Mt,6,6)(1,ft,44,29),e&2){let n=t.$implicit,_=l();g(_.runningBackupId()===n.Backup.ID?0:1)}}function Rt(e,t){e&1&&(o(0,"sh-icon",99),T(1,"funnel-simple"),i(),o(2,"sh-icon",100),T(3,"sort-ascending"),i(),o(4,"sh-icon",101),T(5,"sort-descending"),i())}var ht={file:{Display:$localize`Local`,Icon:null}},ae=class e{#t=L(rn);#n=L(un);#e=L(sn);#o=L(Fn);#_=L(Ye);MISSING_BACKUP_NAME=$localize`Backup name missing`;sortOrderOptions=this.#e.orderByOptions;orderBy=this.#e.orderBy;backups=this.#e.backups;backupsLoading=this.#e.backupsLoading;startingBackup=this.#e.startingBackup;deletingBackup=this.#e.deletingBackup;runningBackupId=this.#n.runningBackupId;timeType=this.#e.timeType;clientIsRunning=this.#n.clientIsRunning;isResuming=this.#n.isResuming;runningTask=ne(()=>this.#n.serverState()?.ActiveTask?.Item1);isStopping=ne(()=>this.runningTask()==this.#i());#i=H(-1);viewMode=cn("viewMode","list");sortByColumn=H(this.#e.orderBy());loadingId=H(null);successId=H(null);sortEffect=Ke(()=>this.#e.setOrderBy(this.sortByColumn()));ngOnInit(){this.#e.getBackups(!0)}openInConsole(t){let n=t.Backup.ExternalID?.split(":")[1];if(!n){console.error("Backup does not have an external ID");return}this.#o.openConsole("/app/machines/configurations/"+n)}setOrderBy(t){this.#e.setOrderBy(t)}setTimeType(t){this.#e.setTimeType(t)}startBackup(t){this.#n.resumeDialogCheck(()=>this.#e.startBackup(t))}openPauseDialog(){this.#_.open(Tn,{maxWidth:"550px",width:"100%"})}pauseResume(){if(this.clientIsRunning()){this.openPauseDialog();return}this.#n.pauseResume().subscribe()}stop(){let t=this.runningTask();t&&(this.#i.set(t),this.#t.postApiV1TaskByTaskidStop({taskid:t}).subscribe())}abort(){let t=this.runningTask();t&&this.#t.postApiV1TaskByTaskidAbort({taskid:t}).subscribe()}getBackendIcon(t){return t?_e(t).icon??"database":""}getBackendType(t){if(!t)return"";let n=_e(t);if(!n)return"";let _=ht[n.key];if(_?.Display)return _.Display;if(n.key==="s3"){let c="http://null?"+t.split("?")[1],G=new URL(c).searchParams.get("s3-server-name")?.toLowerCase()??"";for(let[b,B]of Object.entries(Cn))if(G.endsWith(b))return B}return n.displayName}getBackupVersionCount(t){return parseInt(t?.Backup?.Metadata?.BackupListCount??"",10)||0}verifyFiles(t){this.loadingId.set(t),this.#t.postApiV1BackupByIdVerify({id:t}).pipe(q(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(t),setTimeout(()=>this.successId.set(null),2e3)}})}compressBackup(t){this.loadingId.set(t),this.#t.postApiV1BackupByIdCompact({id:t}).pipe(q(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(t),setTimeout(()=>this.successId.set(null),2e3)}})}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=We({type:e,selectors:[["app-home"]],decls:36,vars:6,consts:()=>{let t;t=$localize`Backups`;let n;n=$localize`Keep your data safe at your chosen destination.`;let _;_=$localize` Create ${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON:`;let c;c=$localize`Restores`;let F;F=$localize`Recover your files from any backup set.`;let G;G=$localize` Start ${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON:`;let b;b=$localize`My backups`;let B;B=$localize`${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:rows${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON: List `;let le;le=$localize`${"\uFFFD#7\uFFFD"}:START_TAG_SH_ICON:list${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SH_ICON: Details `;let re;re=$localize` Time: ${"\uFFFD#11\uFFFD"}:START_TAG_STRONG:${"\uFFFD*12:1\uFFFD"}:START_BLOCK_IF: Relative ${"\uFFFD/*12:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*13:2\uFFFD"}:START_BLOCK_ELSE_IF: Actual ${"\uFFFD/*13:2\uFFFD"}:CLOSE_BLOCK_ELSE_IF:${"\uFFFD*14:3\uFFFD"}:START_BLOCK_ELSE: ${"\uFFFD0:3\uFFFD"}:INTERPOLATION: ${"\uFFFD/*14:3\uFFFD"}:CLOSE_BLOCK_ELSE:${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:clock${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON:`;let ce;ce=$localize`Relative time`;let se;se=$localize`Actual time`;let ue;ue=$localize` Order by: ${"\uFFFD#3\uFFFD"}:START_TAG_STRONG:${"\uFFFD0\uFFFD"}:INTERPOLATION:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:arrows-down-up${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON:`;let Fe;Fe=$localize` ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let Ce;Ce=$localize`Externally managed`;let Te;Te=$localize` Edit in console ${"\uFFFD#13\uFFFD"}:START_TAG_SH_ICON:arrow-up-right${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SH_ICON:`;let v;v=$localize`{VAR_PLURAL, plural, =0 {No version yet} =1 {1 Version} other {{INTERPOLATION} Versions}}`,v=K(v,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let de;de=$localize` ${v}:ICU@@6502601490918455200: `;let Ee;Ee=$localize`Last successful backup:`;let pe;pe=$localize`Duration:`;let ge;ge=$localize`Source:`;let Se;Se=$localize`Destination:`;let me;me=$localize`Next scheduled run:`;let Oe;Oe=$localize`Externally managed`;let Ne;Ne=$localize` No backups found ${"\uFFFD#2\uFFFD"}:START_TAG_BUTTON: Click to create one now ${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_BUTTON:`;let Me;Me=$localize` Backup ${"\uFFFD*4:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*4:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Ie;Ie=$localize` Type ${"\uFFFD*7:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*7:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Pe;Pe=$localize` Last backup ${"\uFFFD*10:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*10:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let De;De=$localize` Next run ${"\uFFFD*13:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*13:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let fe;fe=$localize` Duration ${"\uFFFD*16:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*16:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let $e;$e=$localize` Source ${"\uFFFD*19:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*19:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Re;Re=$localize` Destination ${"\uFFFD*22:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*22:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let he;he=$localize`Version`;let Ae;Ae=$localize`Actions`;let w;w=$localize`{VAR_PLURAL, plural, =0 {No versions} =1 {1 Version} other {{INTERPOLATION} Versions}}`,w=K(w,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let Le;Le=$localize` ${w}:ICU@@3521773141017690117: `;let xe;xe=$localize`Loading backups...`;let X;X=$localize`${"\uFFFD*4: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/*4:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*5: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/*5:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,X=K(X);let ye;ye=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:skull${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Abort `;let He;He=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:stop${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Stop `;let ke;ke=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:play-circle${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD*3:1\uFFFD"}:START_BLOCK_IF: Start ${"\uFFFD/*3:1\uFFFD"}:CLOSE_BLOCK_IF:`;let Ge;Ge=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SH_ICON:clock-counter-clockwise${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SH_ICON: Restore `;let be;be=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:export${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Export `;let Be;Be=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:x-circle${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON: Delete `;let ve;ve=$localize`Advanced`;let we;we=$localize`${"\uFFFD#28\uFFFD"}:START_TAG_SH_ICON:database${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SH_ICON: Database `;let Xe;Xe=$localize`${"\uFFFD#31\uFFFD"}:START_TAG_SH_ICON:check-square-offset${"\uFFFD/#31\uFFFD"}:CLOSE_TAG_SH_ICON: Verify files `;let Je;Je=$localize`${"\uFFFD#34\uFFFD"}:START_TAG_SH_ICON:file-archive${"\uFFFD/#34\uFFFD"}:CLOSE_TAG_SH_ICON: Compress now `;let ze;ze=$localize`${"\uFFFD#37\uFFFD"}:START_TAG_SH_ICON:terminal-window${"\uFFFD/#37\uFFFD"}:CLOSE_TAG_SH_ICON: Commandline `;let Ve;Ve=$localize`Reporting`;let Ue;return Ue=$localize`${"\uFFFD#43\uFFFD"}:START_TAG_SH_ICON:notepad${"\uFFFD/#43\uFFFD"}:CLOSE_TAG_SH_ICON: Log `,[["actions",""],["sortIcons",""],t,n,_,c,F,G,b,B,le,re,ce,se,ue,Fe,Ce,Te,de,Ee,pe,ge,Se,me,Oe,Ne,Me,Ie,Pe,De,fe,$e,Re,he,Ae,Le,xe,X,ye,He,ke,Ge,be,Be,ve,we,Xe,Je,ze,Ve,Ue,[1,"type-a","actionable",3,"keydown.enter","keydown.space","routerLink"],["src","assets/images/backup.png","alt","","width","48px"],[1,"text"],["type","button","tabindex","-1","shButton",""],["src","assets/images/restore.png","alt","","width","48px"],[1,"content"],[1,"actions"],[1,"small","type-b",3,"valueChange","value"],["value","list"],["value","details"],[1,"table-overview"],["type","button","shButton","",1,"small"],["menu",""],["type","button",3,"click"],["type","button",3,"active"],[1,"backups",3,"fallback"],[1,"type-b",3,"data","loading","sortByColumn"],[1,"backups"],[1,"no-backups"],[1,"backup","externaly-managed"],[1,"backup"],["alt","",1,"provider-icon",3,"src"],[1,"tags"],[1,"simple","primary"],["type","button","shButton","",3,"click"],[3,"backupId"],[1,"simple","success"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["shButton","",1,"primary","raised",3,"routerLink"],[1,"type-b",3,"sortByColumnChange","data","loading","sortByColumn"],["thead",""],["shSort","name"],[4,"ngTemplateOutlet"],["shSort","type"],["shSort","lastrun"],["shSort","nextrun"],["shSort","duration"],["shSort","sourcesize"],["shSort","destinationsize"],[1,"small"],[1,"loading-list"],[1,"indeterminate","primary"],["shButton","",3,"small"],["shButton","",3,"click"],["type","button","shButton","",3,"routerLink"],["type","button","shButton",""],["title",""],["type","button",3,"routerLink"],[1,"filter"],[1,"asc"],[1,"desc"]]},template:function(n,_){n&1&&(C(0,"app-status-bar"),o(1,"section")(2,"header")(3,"sh-card",51),I("keydown.enter",function(F){return F.target.click()})("keydown.space",function(F){return F.target.click()}),C(4,"img",52),o(5,"div",53)(6,"h3"),d(7,2),i(),o(8,"p"),d(9,3),i()(),o(10,"button",54),s(11,4),C(12,"sh-icon"),u(),i()(),o(13,"sh-card",51),I("keydown.enter",function(F){return F.target.click()})("keydown.space",function(F){return F.target.click()}),C(14,"img",55),o(15,"div",53)(16,"h3"),d(17,5),i(),o(18,"p"),d(19,6),i()(),o(20,"button",54),s(21,7),C(22,"sh-icon"),u(),i()()(),o(23,"div",56)(24,"h2"),N(25),d(26,8),M(),p(27,xn,22,3,"div",57),i(),je(28,pt,2,1)(29,gt,5,0),qe(30,28,pn,null,29),i()(),P(32,$t,2,1,"ng-template",null,0,ee)(34,Rt,6,0,"ng-template",null,1,ee)),n&2&&(a(3),E("routerLink",j(4,gn)),a(10),E("routerLink",j(5,Sn)),a(14),g(_.backups().length>0?27:-1),a(3),Qe(!_.backupsLoading()))},dependencies:[te,dn,en,oe,ie,tn,on,_n,Ze],styles:["[_nghost-%COMP%]{display:block}h2[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:2rem 0}header[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;padding:0 2rem;gap:1rem}@media only screen and (max-width:768px){header[_ngcontent-%COMP%]{grid-template-columns:1fr}}sh-card[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem}sh-card[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:.25rem}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.content[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{padding:0 2rem}@media only screen and (max-width:768px){.content[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:.5rem}}sh-menu[_ngcontent-%COMP%]{color:red}.backups[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 2rem;gap:.5rem}.backups.fallback[_ngcontent-%COMP%]{justify-content:center;align-items:center;padding:4rem;border:1px solid var(--base-4);background:var(--base-2);border-radius:var(--shape-2);width:calc(100% - 4rem);margin:0 auto}.no-backups[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;align-items:center}.backup[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem;gap:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10)}@media only screen and (max-width:768px){.backup[_ngcontent-%COMP%]{flex-direction:column;align-items:flex-start}}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;width:100%;max-width:40%}@media only screen and (max-width:768px){.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{max-width:initial}}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{color:var(--base-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--base-12)}.backup[_ngcontent-%COMP%] .tags[_ngcontent-%COMP%]{display:flex;align-items:center;flex-direction:column;gap:.5rem}.provider-icon[_ngcontent-%COMP%]{width:1.25rem;height:1.25rem}.actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.sortable[_ngcontent-%COMP%]{-webkit-user-select:none;user-select:none}.sortable[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{margin-left:.5rem;font-size:1rem;justify-self:flex-end;display:none}.sortable[_ngcontent-%COMP%]:not(.sort-asc):not(.sort-desc) sh-icon.filter[_ngcontent-%COMP%]{display:block}.sortable.sort-asc[_ngcontent-%COMP%] sh-icon.asc[_ngcontent-%COMP%]{display:block;color:var(--base-12)}.sortable.sort-desc[_ngcontent-%COMP%] sh-icon.desc[_ngcontent-%COMP%]{display:block;color:var(--base-12)}.actionable[_ngcontent-%COMP%]{cursor:pointer}.actionable[_ngcontent-%COMP%]:after{transition:inset .1s linear}.actionable[_ngcontent-%COMP%]:hover{--card-shp: 0}"],changeDetection:0})};export{ae as default};
|
package/chunk-QZQS7M3D.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as a,d as b}from"./chunk-XXVDL5TR.js";import"./chunk-GRE6GKVP.js";import"./chunk-DJXLNIMV.js";import"./chunk-CAQ3XMFP.js";import"./chunk-VC55KFAX.js";import"./chunk-ZEFSBETQ.js";import"./chunk-6Q6SSTBK.js";import"./chunk-YCJYEQF7.js";import"./chunk-OHYENIPP.js";import"./chunk-UTXZPAY6.js";import"./chunk-IMQUTGIK.js";import"./chunk-BACKG7KA.js";import"./chunk-IQL3REGJ.js";import"./chunk-AIAUP7OE.js";import"./chunk-C6PICAXB.js";import"./chunk-6JS7B4FW.js";import"./chunk-VKQQDCUN.js";import"./chunk-DSYNIXJF.js";import"./chunk-NPFPMA4P.js";import"./chunk-O2SMJYPC.js";import"./chunk-N2AU7VKX.js";import"./chunk-ZC23RK4J.js";import"./chunk-OPHQNXYO.js";import"./chunk-TQTOIWBK.js";import"./chunk-7CGTOI24.js";export{a as createEncryptionForm,b as default};
|
package/chunk-X4BDJA6L.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{a as ge}from"./chunk-GRE6GKVP.js";import{a as _e}from"./chunk-IFSZJSGH.js";import"./chunk-QDDVZ4CR.js";import"./chunk-BLSV7CNZ.js";import"./chunk-I6MIXWIT.js";import{l as pe,q as b}from"./chunk-DJXLNIMV.js";import"./chunk-CAQ3XMFP.js";import"./chunk-VC55KFAX.js";import"./chunk-ZEFSBETQ.js";import{b as de}from"./chunk-RJ2JM7C7.js";import"./chunk-WOKYULBU.js";import"./chunk-TCXCC5BM.js";import"./chunk-GKGMP6VF.js";import"./chunk-6Q6SSTBK.js";import"./chunk-YCJYEQF7.js";import"./chunk-OHYENIPP.js";import"./chunk-UTXZPAY6.js";import"./chunk-IMQUTGIK.js";import"./chunk-ANSV4G2K.js";import"./chunk-BACKG7KA.js";import{b as A}from"./chunk-IQL3REGJ.js";import"./chunk-AIAUP7OE.js";import{a as ue}from"./chunk-C6PICAXB.js";import"./chunk-6JS7B4FW.js";import{B as oe,G as ie,H as ae,L as se,P as re,Y as le,c as H,e as z,f as W,j,p as Q,q as Y,r as Z,s as ee,t as te,v as ne}from"./chunk-VKQQDCUN.js";import{b as ce,d as me}from"./chunk-DSYNIXJF.js";import{b as K,d as J,e as X}from"./chunk-NPFPMA4P.js";import"./chunk-O2SMJYPC.js";import"./chunk-N2AU7VKX.js";import"./chunk-ZC23RK4J.js";import"./chunk-OPHQNXYO.js";import{$b as F,Ac as V,Cb as C,Db as m,Eb as a,Fb as r,Mb as G,Qc as q,Sa as d,Tb as _,Ub as p,V as L,Vb as B,Wb as U,Xb as x,Zb as I,_ as u,da as h,ea as S,gb as y,kc as v,pa as E,ra as $,sc as M,tc as D,uc as O,wb as R,xb as k,zc as w}from"./chunk-TQTOIWBK.js";import"./chunk-7CGTOI24.js";var f=class c{#e=new Map;saveState(t){let e=crypto.randomUUID();return this.#e.set(e,t),e}getState(t){return this.#e.get(t)}static \u0275fac=function(e){return new(e||c)};static \u0275prov=L({token:c,factory:c.\u0275fac,providedIn:"root"})};var Fe=()=>["backup"];function he(c,t){c&1&&r(0,"sh-progress-bar",10)}function Se(c,t){if(c&1){let e=G();m(0,"form",11)(1,"sh-select",12)(2,"label",13),_(3,1),r(4,"sh-icon",14),p(),a(),r(5,"input",15),a(),m(6,"sh-form-field")(7,"label",16),_(8,2),r(9,"sh-icon",17),p(),a(),r(10,"textarea",18),a(),m(11,"sh-form-field")(12,"label",19),_(13,3),r(14,"sh-icon",20),p(),a(),r(15,"textarea",21),a()(),m(16,"sh-divider"),B(17,4),a(),m(18,"form",11)(19,"sh-form-field")(20,"label",22),_(21,5),r(22,"sh-icon",23),p(),a(),r(23,"input",24),a(),m(24,"sh-form-field")(25,"label",25),_(26,6),r(27,"sh-icon",26),p(),a(),r(28,"input",27),a(),m(29,"app-filters",28),O("filtersChange",function(i){h(e);let s=F();return D(s.filters,i)||(s.filters=i),S(i)}),I("filtersChange",function(i){h(e);let s=F();return S(s.updateFilters(i))}),a()(),m(30,"app-options-list",29),O("optionsChange",function(i){h(e);let s=F();return D(s.settings,i)||(s.settings=i),S(i)}),a(),m(31,"div",30)(32,"button",31),I("click",function(){h(e);let i=F();return S(i.submit())}),_(33,7),r(34,"sh-icon"),p(),a()()}if(c&2){let e=F();C("formGroup",e.baseCmdForm),d(),C("options",e.commandOptions()??V(11,Fe))("inlineSearch",!0),d(17),C("formGroup",e.standardFields),d(11),M("filters",e.filters),C("osType",e.osType()??""),d(),M("options",e.settings),C("hasFreeTextSettings",!0),d(2),v("loading",e.isSubmitting()),d(2),U(e.baseCmdForm.value.command),x(33)}}var l=new Z,P=class c{#e=u(b);#n=u(me);#o=u(J);#t=u(K);#a=u(ce);#s=u(de);#i=u(f);#r=u(ue);osType=q(()=>this.#r.systemInfo()?.OSType);#l=A(this.#t.params);commandOptions=A(this.#a.getApiV1Commandline());isSubmitting=E(!1);optionsFields=this.#e.optionsFields;standardFields=l.group({"backup-id":l.control(""),"backup-name":l.control(""),dbpath:l.control(""),filters:l.array([])});baseCmdForm=l.group({command:l.control("backup"),targetUrl:l.control(""),arguments:l.control("")});finishedLoading=this.#e.finishedLoading;backupId=this.#e.backupId;filters=E([]);settings=this.#e.settings;updateFilters(t){this.standardFields.controls.filters.clear(),t.forEach(e=>this.standardFields.controls.filters.push(l.control(e))),this.filters.set(t)}#m=$(()=>{let t=this.#l()?.id;this.#e.backupId.set(t),this.getBackup(t)});getBackup(t){this.#n.getApiV1BackupById({id:t}).subscribe({next:e=>{this.#e.mapScheduleToForm(e.Schedule??null),e.Backup&&(this.#e.mapGeneralToForm(e.Backup),this.mapStandardFieldsToForm(e.Backup),this.mapBaseCmdToForm(e.Backup),this.#e.mapOptionsToForms(e.Backup,!0)),this.applyStateFromUrl(),this.#e.finishedLoading.set(!0)}})}mapStandardFieldsToForm(t){if(this.standardFields.patchValue({dbpath:t.DBPath,"backup-id":t.ID,"backup-name":t.Name}),this.standardFields.controls.filters.clear(),t.Filters&&t.Filters.length){let e=t.Filters.map(n=>`${n.Include?"":"-"}${n.Expression}`);e.forEach(n=>{this.standardFields.controls.filters.push(l.control(n))}),this.filters.set(e)}else this.filters.set([])}submit(){this.#s.resumeDialogCheck(()=>this.#c())}#c(){this.isSubmitting.set(!0);let t=this.updateUrl(),e=this.baseCmdForm.value,n=e.targetUrl??"",i=(e.arguments??"").split(`
|
|
2
|
-
`)??[],s=[n,...i].filter(o=>o.length>0),g=this.standardFields.value,T=g.filters??[],N=[e.command,...s,`--backup-name=${g["backup-name"]}`,`--dbpath=${g.dbpath}`,`--backup-id=${g["backup-id"]}`,...T.filter(o=>o).map(o=>o.startsWith("-")?`--exclude=${o?.slice(1)}`:`--include=${o}`),...this.#e.mapFormsToSettings(["backup-id","backup-name","dbpath"]).map(o=>`${o.Name.startsWith("--")?"":"--"}${o.Name}=${o.Value}`),"--disable-module=console-password-input"];this.#n.postApiV1Commandline({requestBody:N}).subscribe({next:o=>{o.Status==="OK"&&this.#o.navigate(["backup",this.backupId(),"commandline",o.ID],{queryParams:{state:t}})},error:()=>{this.isSubmitting.set(!1)}})}mapBaseCmdToForm(t){let e=t.TargetURL??null;e&&this.baseCmdForm.patchValue({targetUrl:e??"",arguments:t.Sources?.join(`
|
|
3
|
-
`)??""})}updateUrl(){let t=this.baseCmdForm.value,e=this.standardFields.value,n=e.filters??[],i=this.settings(),s=this.#i.saveState({command:t.command,targetUrl:t.targetUrl,arguments:t.arguments,backupId:e["backup-id"],backupName:e["backup-name"],dbpath:e.dbpath,filters:n,options:i});return this.#o.navigate([],{relativeTo:this.#t,queryParams:{state:s},replaceUrl:!0}),s}applyStateFromUrl(){let e=this.#t.snapshot.queryParams.state;if(!e)return;let n=this.#i.getState(e);n&&(this.baseCmdForm.patchValue({command:n.command,targetUrl:n.targetUrl,arguments:n.arguments}),this.standardFields.patchValue({"backup-id":n.backupId,"backup-name":n.backupName,dbpath:n.dbpath}),n.filters&&(this.standardFields.controls.filters.clear(),n.filters.forEach(i=>{this.standardFields.controls.filters.push(l.control(i))}),this.filters.set(n.filters)),n.options&&n.options.length>0&&this.settings.set(n.options))}static \u0275fac=function(e){return new(e||c)};static \u0275cmp=y({type:c,selectors:[["app-commandline"]],features:[w([b])],decls:8,vars:1,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let e;e=$localize` Command ${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:question${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON:`;let n;n=$localize` TargetUrl ${"\uFFFD#9\uFFFD"}:START_TAG_SH_ICON:question${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SH_ICON:`;let i;i=$localize` Commandline Arguments ${"\uFFFD#14\uFFFD"}:START_TAG_SH_ICON:question${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SH_ICON:`;let s;s=$localize`Advanced options`;let g;g=$localize` Backup ID ${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:question${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON:`;let T;T=$localize` Backup Name ${"\uFFFD#27\uFFFD"}:START_TAG_SH_ICON:question${"\uFFFD/#27\uFFFD"}:CLOSE_TAG_SH_ICON:`;let N;return N=$localize`${"\uFFFD#34\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#34\uFFFD"}:CLOSE_TAG_SH_ICON: Run "${"\uFFFD0\uFFFD"}:INTERPOLATION:" command now `,[t,e,n,i,s,g,T,N,[1,"back"],["type","button","shButton","","routerLink","/",1,"small"],[1,"indeterminate","primary"],[3,"formGroup"],["placeholder","Select a command...",3,"options","inlineSearch"],["for","command"],["shTooltip","Choose the command to execute"],["type","text","id","command","formControlName","command"],["for","targetUrl"],["shTooltip","Enter the URL of the backup target"],["id","targetUrl","autocomplete","off","formControlName","targetUrl"],["for","arguments"],["shTooltip","Enter one argument per line without quotes (e.g., *.txt)"],["id","arguments","autocomplete","off","rows","5","formControlName","arguments","placeholder","Enter one argument per line without quotes (e.g., *.txt)",1,"arguments"],["for","backup-id"],["shTooltip","The ID of the backup configuration this run belongs to (can be empty)"],["id","backup-id","formControlName","backup-id"],["for","backup-name"],["shTooltip","The optional name of the backup"],["id","backup-name","formControlName","backup-name"],[3,"filtersChange","filters","osType"],[3,"optionsChange","options","hasFreeTextSettings"],[1,"form-actions"],["shButton","",1,"raised","primary",3,"click"]]},template:function(e,n){e&1&&(r(0,"app-status-bar"),m(1,"section")(2,"div",8)(3,"button",9),_(4,0),r(5,"sh-icon"),p(),a()(),R(6,he,1,0,"sh-progress-bar",10)(7,Se,35,12),a()),e&2&&(d(6),k(n.finishedLoading()?7:6))},dependencies:[ee,j,H,z,W,_e,ge,pe,te,Y,Q,X,ae,oe,ie,re,se,ne,le],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;max-width:40rem;padding:2.5rem;gap:1.25rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.arguments[_ngcontent-%COMP%]{min-height:6rem;white-space:pre}"],changeDetection:0})};export{P as default};
|
package/chunk-YWUUX3S6.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as a,e as b,f as c}from"./chunk-DJXLNIMV.js";import"./chunk-CAQ3XMFP.js";import"./chunk-VC55KFAX.js";import"./chunk-ZEFSBETQ.js";import"./chunk-6Q6SSTBK.js";import"./chunk-YCJYEQF7.js";import"./chunk-OHYENIPP.js";import"./chunk-UTXZPAY6.js";import"./chunk-IMQUTGIK.js";import"./chunk-BACKG7KA.js";import"./chunk-IQL3REGJ.js";import"./chunk-AIAUP7OE.js";import"./chunk-C6PICAXB.js";import"./chunk-6JS7B4FW.js";import"./chunk-VKQQDCUN.js";import"./chunk-DSYNIXJF.js";import"./chunk-NPFPMA4P.js";import"./chunk-O2SMJYPC.js";import"./chunk-N2AU7VKX.js";import"./chunk-ZC23RK4J.js";import"./chunk-OPHQNXYO.js";import"./chunk-TQTOIWBK.js";import"./chunk-7CGTOI24.js";export{b as NONE_OPTION,a as createGeneralForm,c as default};
|