@duplicati/ngclient 0.0.119 → 0.0.121
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{chunk-WZRSQ7XL.js → chunk-2CXHZS6X.js} +1 -1
- package/{chunk-3KUVV3SB.js → chunk-2XYBW2LY.js} +1 -1
- package/{chunk-GYUN7KFJ.js → chunk-3UPH6V5C.js} +1 -1
- package/{chunk-KHGD372Q.js → chunk-43BIRTPL.js} +1 -1
- package/{chunk-NPZU4SBS.js → chunk-45N5IP3N.js} +1 -1
- package/{chunk-2GE6FFGI.js → chunk-4DR45FFH.js} +1 -1
- package/{chunk-4RIDBZOK.js → chunk-4HPQY7IN.js} +1 -1
- package/chunk-4KE2I7OA.js +7 -0
- package/{chunk-NF3MS2YP.js → chunk-4V45XF67.js} +1 -1
- package/{chunk-CH7FSO4Y.js → chunk-5C7A7QU6.js} +1 -1
- package/{chunk-XWF632WO.js → chunk-65U4B3NQ.js} +1 -1
- package/{chunk-4FUHLIJW.js → chunk-6B67AJC3.js} +1 -1
- package/{chunk-A6XWHATE.js → chunk-6DNRCK5D.js} +1 -1
- package/{chunk-HTX2RSBS.js → chunk-6EWRKJSC.js} +1 -1
- package/chunk-6LCXRM3A.js +1 -0
- package/chunk-7BATQNXR.js +1 -0
- package/chunk-7DNC2MPD.js +1 -0
- package/chunk-7GXTLCJB.js +1 -0
- package/{chunk-65UN5LE6.js → chunk-7V4TPS4B.js} +1 -1
- package/{chunk-5ENRUF35.js → chunk-ABANCAM5.js} +1 -1
- package/{chunk-WU3ALGNP.js → chunk-BLKMQJR5.js} +1 -1
- package/{chunk-7NBGN46A.js → chunk-C5X6HJ3T.js} +1 -1
- package/chunk-CZDE5P4F.js +1 -0
- package/chunk-DLJSVAM2.js +1 -0
- package/{chunk-HFNFJ7G2.js → chunk-DYTQQHMA.js} +1 -1
- package/{chunk-M3WT5B3C.js → chunk-EBXJGPRA.js} +1 -1
- package/{chunk-UXUVYBYP.js → chunk-ED7PHXLX.js} +1 -1
- package/{chunk-CZUGA62N.js → chunk-ERHGJIOQ.js} +1 -1
- package/{chunk-AL5KGNEF.js → chunk-ESAGJOZZ.js} +1 -1
- package/{chunk-LDJVMU7P.js → chunk-FP6LM56A.js} +1 -1
- package/{chunk-3XVU2YA6.js → chunk-FQ55IACT.js} +1 -1
- package/{chunk-ZQSBINUM.js → chunk-FSKPPAVO.js} +1 -1
- package/chunk-FWQNZX5S.js +1 -0
- package/chunk-FY7G24UA.js +1 -0
- package/{chunk-RHII5WE3.js → chunk-GQGMGFDX.js} +1 -1
- package/chunk-GUKBMCIX.js +1 -0
- package/chunk-HIW2CN45.js +1 -0
- package/{chunk-2SQBD7LN.js → chunk-IVGY6D4N.js} +1 -1
- package/{chunk-K5C3JCVH.js → chunk-KAFLAM3J.js} +1 -1
- package/{chunk-T6KX6ACI.js → chunk-KPH4ZAFT.js} +1 -1
- package/{chunk-3AIKVVWP.js → chunk-LUKUBN2Z.js} +1 -1
- package/{chunk-LJDOQTEF.js → chunk-M5RL4LRX.js} +1 -1
- package/{chunk-CPTR6AJI.js → chunk-MO2LFPIR.js} +1 -1
- package/{chunk-DX6BDDDV.js → chunk-MOSJ6KI7.js} +1 -1
- package/{chunk-FRSQ5NDX.js → chunk-N5FH4YAX.js} +1 -1
- package/{chunk-4YUBZYBH.js → chunk-O7TLFEOP.js} +1 -1
- package/chunk-OAWADV5X.js +1 -0
- package/{chunk-2P3DXYGR.js → chunk-OQPUBCLB.js} +1 -1
- package/chunk-PDODLSPH.js +1 -0
- package/{chunk-AACJQG7X.js → chunk-PSVKQSIF.js} +1 -1
- package/{chunk-RLUT4FSI.js → chunk-QMFHJSCY.js} +1 -1
- package/{chunk-TCDECRYI.js → chunk-QUOBR5MG.js} +1 -1
- package/chunk-QXUYK52Y.js +1 -0
- package/{chunk-X6PSFVBL.js → chunk-S75WBVE3.js} +1 -1
- package/{chunk-BAX2AJJJ.js → chunk-SFV445TF.js} +1 -1
- package/{chunk-6KSS7VQS.js → chunk-SIHNMW2E.js} +1 -1
- package/chunk-SPAJFGWZ.js +1 -0
- package/{chunk-4LLC3Q7O.js → chunk-SX2OA5DO.js} +1 -1
- package/chunk-T5WAKBP3.js +1 -0
- package/{chunk-OEIF7NQ5.js → chunk-T7QZL5YJ.js} +1 -1
- package/{chunk-SSJ4VQB4.js → chunk-TCEYGZ6D.js} +1 -1
- package/chunk-U4XTHU5I.js +1 -0
- package/chunk-U7YVVKGQ.js +1 -0
- package/{chunk-XR4SRVOQ.js → chunk-UEYPJIJG.js} +1 -1
- package/chunk-UI4M5G5W.js +1 -0
- package/{chunk-ELZWH543.js → chunk-URJQR7VG.js} +1 -1
- package/{chunk-YY3JAYQZ.js → chunk-UTNP2VHH.js} +1 -1
- package/{chunk-Q6M5VRZV.js → chunk-V7XW25LT.js} +1 -1
- package/chunk-VPTXHYYV.js +6 -0
- package/chunk-VTTBYFSH.js +1 -0
- package/chunk-VYAA7G37.js +1 -0
- package/{chunk-TJJORMQV.js → chunk-VZBWK3XF.js} +1 -1
- package/chunk-W66AXGSW.js +1 -0
- package/{chunk-YW5R7NEG.js → chunk-WOTGLW6Y.js} +1 -1
- package/{chunk-5LKXKKAK.js → chunk-WRKRV6RQ.js} +1 -1
- package/chunk-XATCN7MB.js +1 -0
- package/{chunk-OHZGASM5.js → chunk-XHPURHO2.js} +1 -1
- package/{chunk-VGAQB3OD.js → chunk-XUPWJEL7.js} +1 -1
- package/{chunk-B3WLZK7W.js → chunk-XWYNCG3P.js} +1 -1
- package/chunk-YUZKJZ22.js +1 -0
- package/chunk-YZDNOP4R.js +1 -0
- package/index.html +1 -1
- package/main-DG325IZ3.js +1 -0
- package/package.json +1 -1
- package/chunk-3GGSYR5J.js +0 -1
- package/chunk-6WZGDK7U.js +0 -1
- package/chunk-ADO3ABTT.js +0 -1
- package/chunk-AHUC7M75.js +0 -7
- package/chunk-B64M2BXZ.js +0 -1
- package/chunk-CRJHIWSF.js +0 -1
- package/chunk-DCYB2NQH.js +0 -1
- package/chunk-G5CT45UH.js +0 -1
- package/chunk-HHSMSBNM.js +0 -1
- package/chunk-HXN7IX3Q.js +0 -1
- package/chunk-JRZGF4BZ.js +0 -1
- package/chunk-KBJGYXKV.js +0 -1
- package/chunk-KYQWUXYN.js +0 -1
- package/chunk-MUBWT5H2.js +0 -1
- package/chunk-PHIZVVHX.js +0 -1
- package/chunk-PKRMVTCU.js +0 -1
- package/chunk-QVNFX6ZC.js +0 -1
- package/chunk-RKAIZDDW.js +0 -1
- package/chunk-RSZISHXB.js +0 -1
- package/chunk-RXHYUPYG.js +0 -6
- package/chunk-UABJ67OY.js +0 -1
- package/chunk-W4RKRM2O.js +0 -1
- package/chunk-WFM6YWRN.js +0 -1
- package/chunk-Z45ZPMZS.js +0 -1
- package/chunk-ZHMYBX5F.js +0 -1
- package/main-PDJMO4FF.js +0 -1
package/chunk-HXN7IX3Q.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as Ne}from"./chunk-6WZGDK7U.js";import{a as Ie}from"./chunk-TJJORMQV.js";import{a as w}from"./chunk-HTX2RSBS.js";import"./chunk-OHZGASM5.js";import"./chunk-65UN5LE6.js";import{a as me}from"./chunk-WFM6YWRN.js";import"./chunk-3AIKVVWP.js";import"./chunk-RHW5QVAY.js";import"./chunk-RSZISHXB.js";import{a as De}from"./chunk-X6PSFVBL.js";import{c as Ce,d as Ee,e as Pe,h as Oe,r as fe,s as he,t as ke}from"./chunk-5ENRUF35.js";import{a as ce,c as Te}from"./chunk-ZQSBINUM.js";import"./chunk-3XVU2YA6.js";import{c as re,e as le,f as _e}from"./chunk-5LKXKKAK.js";import"./chunk-HFNFJ7G2.js";import{C as Ae,a as I,b as y,c as pe,e as ue,g as v,k as de,l as Se,n as ge,u as Fe}from"./chunk-AL5KGNEF.js";import{h as H}from"./chunk-FRSQ5NDX.js";import"./chunk-M3WT5B3C.js";import{$a as Z,Ab as ee,Bb as te,Cb as ne,Db as s,Eb as i,F as B,Fb as _,Jb as O,Pb as p,Pc as ae,Qb as u,Qc as j,Rb as f,Ua as r,Ub as $,Vb as d,Wb as c,Z as g,bb as X,ea as m,fa as C,gb as N,gc as oe,hc as ie,jc as S,kc as V,lb as T,lc as K,oc as z,pc as W,qc as q,ra as J,ub as D,va as P,vc as se,wb as G,yb as R,zb as F}from"./chunk-AHUC7M75.js";import{a as U,b as Y}from"./chunk-7CGTOI24.js";var $e=["scroller"];function be(o,n){o&1&&(s(0,"spk-icon"),S(1,"bell-ringing"),i())}function Ge(o,n){o&1&&(s(0,"spk-icon"),S(1,"bell"),i())}function ye(o,n){if(o&1&&(s(0,"div",9),S(1),i()),o&2){let e,t=c(2);r(),K(" ",(e=t.shownMessage())==null?null:e.content," ")}}function ve(o,n){if(o&1&&(s(0,"div",6)(1,"spk-alert")(2,"div",8),S(3),i(),T(4,ye,2,1,"div",9),i()()),o&2){let e,t,a,l=c();r(),R((e=(e=l.shownMessage())==null?null:e.type)!==null&&e!==void 0?e:"error"),r(2),V((t=l.shownMessage())==null?null:t.title),r(),F((a=l.shownMessage())!=null&&a.content?4:-1)}}function He(o,n){if(o&1){let e=O();s(0,"div",7)(1,"div",10)(2,"h6",11),p(3,2),s(4,"button",5),d("click",function(){m(e);let a=c();return C(a.toggleNotifications())}),_(5,"spk-icon"),i(),u(),i(),s(6,"div",12,0)(8,"div",13),_(9,"app-notifications"),i()()()()}}function we(o,n){if(o&1&&(s(0,"div",17),S(1),i()),o&2){let e=c().$implicit;r(),K(" ",e.content," ")}}function xe(o,n){if(o&1){let e=O();s(0,"spk-alert",15,1),d("click",function(){let a=m(e).$implicit,l=c(2);return C(l.deleteAlertByIndex(a.id))}),s(2,"div",16),S(3),i(),T(4,we,2,1,"div",17),i()}if(o&2){let e=n.$implicit;R(e.type),D("id",e.id),r(3),V(e.title),r(),F(e.content?4:-1)}}function Ue(o,n){o&1&&(s(0,"p"),f(1,4),i())}function Ye(o,n){if(o&1){let e=O();s(0,"div",7)(1,"div",10)(2,"h6",11),p(3,3),s(4,"button",5),d("click",function(){m(e);let a=c();return C(a.toggleAlerts())}),_(5,"spk-icon"),i(),u(),i(),s(6,"div",12,0)(8,"div",13),te(9,xe,5,5,"spk-alert",14,ee,!1,Ue,2,0,"p"),i()()()()}if(o&2){let e=c();r(9),ne(e.alertHistory())}}var Me=new fe,b=class o{#e=g(pe);#t=g(w);isSubmitting=P(!1);messageSent=P(!1);form=Me.group({message:Me.control("",[Ee.required])});notifications=this.#t.notifications;shownMessage=P(null);shownMessageInterval=null;alertHistory=this.#e.alertHistory;alertHistoryIsOpen=this.#e.alertHistoryIsOpen;alertHistoryIsHidden=this.#e.alertHistoryIsHidden;numberOfOpenAlerts=ae(()=>this.alertHistory().filter(n=>n.isOpen).length);scroller=Z("scroller");isAlertsOpen=X(!1);isNotificationsOpen=X(!1);previousHistoryCount=P(null);constructor(){j(()=>{let n=this.alertHistory();n.length&&this.previousHistoryCount()!==n.length&&!this.isAlertsOpen()&&(this.shownMessage.set(Y(U({},n[0]),{countDown:3})),this.previousHistoryCount.set(n.length),this.shownMessageInterval=setInterval(()=>{let e=this.shownMessage();if(e?.countDown===0){this.shownMessage.set(null),this.shownMessageInterval=null;return}e!==null&&this.shownMessage.update(t=>Y(U({},t),{countDown:t.countDown-1}))},1e3))}),j(()=>{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||o)};static \u0275cmp=N({type:o,selectors:[["app-service-hub"]],viewQuery:function(e,t){e&1&&oe(t.scroller,$e,5),e&2&&ie()},inputs:{isAlertsOpen:[1,"isAlertsOpen"],isNotificationsOpen:[1,"isNotificationsOpen"]},outputs:{isAlertsOpen:"isAlertsOpenChange",isNotificationsOpen:"isNotificationsOpenChange"},decls:9,vars:8,consts:()=>{let n;n=$localize` Notifications ${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON:x-circle${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_BUTTON:`;let e;e=$localize` Alerts ${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON:x-circle${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_BUTTON:`;let t;return t=$localize`No alerts yet`,[["scroller",""],["alerts",""],n,e,t,["spk-button","",3,"click"],[1,"preview-alert-wrap"],[1,"alert-stream-modal"],["sparkle-alert-title",""],["sparkle-alert-content",""],[1,"alert-stream-modal-content"],[1,"paragraph-20"],[1,"alert-stream-modal-list-scroller"],[1,"alert-stream-modal-list"],[3,"class","id"],[3,"click","id"],["title",""],["content",""]]},template:function(e,t){e&1&&(s(0,"button",5),d("click",function(){return t.toggleAlerts()}),s(1,"spk-icon"),S(2,"info"),i()(),s(3,"button",5),d("click",function(){return t.toggleNotifications()}),T(4,be,2,0,"spk-icon")(5,Ge,2,0,"spk-icon"),i(),T(6,ve,5,4,"div",6)(7,He,10,0,"div",7)(8,Ye,12,1,"div",7)),e&2&&(R(t.alertHistory().length?"error":""),r(3),R(t.notifications().length?"error":""),r(),F(t.notifications().length?4:5),r(2),F(t.shownMessage()?6:-1),r(),F(t.isNotificationsOpen()?7:-1),r(),F(t.isAlertsOpen()?8:-1))},dependencies:[ke,y,I,v,Ne],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:250px}.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}"],changeDetection:0})};function Be(o,n){o&1&&(s(0,"spk-icon",14),S(1,"check"),i())}function Xe(o,n){o&1&&(s(0,"spk-icon",15),S(1,"prohibit"),i())}function Ve(o,n){if(o&1){let e=O();s(0,"button",20),d("click",function(){m(e);let a=c();return C(a.updatePassphrase())}),f(1,5),i()}if(o&2){let e=c();G("loader",e.isUpdating())}}function Ke(o,n){if(o&1){let e=O();s(0,"button",21),d("click",function(){m(e);let a=c();return C(a.updatePassphrase())}),f(1,6),i()}if(o&2){let e=c();G("loader",e.isUpdating()),D("disabled",!0)}}var x=class o{#e=g(H);closed=J();isUpdating=P(!1);passphrase=P("");repeatPassphrase=P("");updatePassphrase(){this.passphrase()===this.repeatPassphrase()&&(this.isUpdating.set(!0),this.#e.patchApiV1Serversettings({requestBody:{"server-passphrase":this.passphrase()}}).pipe(B(()=>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(B(()=>this.isUpdating.set(!1))).subscribe({next:()=>this.closed.emit()})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=N({type:o,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 a;a=$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=$(l);let h;h=$localize`Passphrase`;let k;k=$localize`Repeat passphrase`;let M;M=$localize`Not now thanks`;let L;L=$localize` Yes, update passphrase now `;let A;return A=$localize` Yes, update passphrase now `,[a,l,h,k,M,L,A,["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,"spk-success"],["suffix",""],["footer",""],["spk-button","",3,"click"],["spk-button","",1,"raised","primary",3,"loader"],["spk-button","","spkTooltip",t,1,"raised","primary",3,"loader","disabled"],["spk-button","",1,"raised","primary",3,"click"],["spk-button","","spkTooltip",t,1,"raised","primary",3,"click","disabled"]]},template:function(e,t){e&1&&(s(0,"header",7)(1,"h3"),f(2,0),i()(),s(3,"div",8)(4,"spk-alert",9),p(5,1),_(6,"br")(7,"br"),u(),i(),s(8,"spk-form-field")(9,"label",10),f(10,2),i(),s(11,"input",11),q("ngModelChange",function(l){return W(t.passphrase,l)||(t.passphrase=l),l}),i()(),s(12,"spk-form-field")(13,"label",12),f(14,3),i(),s(15,"input",13),q("ngModelChange",function(l){return W(t.repeatPassphrase,l)||(t.repeatPassphrase=l),l}),i(),T(16,Be,2,0,"spk-icon",14)(17,Xe,2,0,"spk-icon",15),i()(),s(18,"footer",16)(19,"button",17),d("click",function(){return t.cancel()}),f(20,4),i(),T(21,Ve,2,2,"button",18)(22,Ke,2,3,"button",19),i()),e&2&&(r(11),z("ngModel",t.passphrase),r(4),D("disabled",t.passphrase().length===0),z("ngModel",t.repeatPassphrase),r(),F(t.passphrase().length!==0&&t.passphrase()===t.repeatPassphrase()?16:17),r(3),G("loader",t.isUpdating()),r(2),F(t.passphrase().length!==0&&t.passphrase()===t.repeatPassphrase()?21:22))},dependencies:[he,Ce,Pe,Oe,y,Se,I,Ae],styles:["[_nghost-%COMP%]{display:block;--dialog-p: 1.5rem}[content][_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}"],changeDetection:0})};var ze=()=>({exact:!0});function We(o,n){o&1&&(s(0,"spk-icon"),S(1,"sun"),i())}function qe(o,n){o&1&&(s(0,"spk-icon"),S(1,"moon"),i())}function je(o,n){if(o&1){let e=O();s(0,"button",22),d("click",function(){m(e);let a=c();return C(a.changeDefaultClientTo("ngax"))}),p(1,7),_(2,"spk-icon"),u(),i(),s(3,"button",22),d("click",function(){m(e);let a=c();return C(a.logout())}),p(4,8),_(5,"spk-icon"),u(),i()}}var Q=class o{#e=g(Ie);#t=g(H);#n=g(me);#o=g(ce);#i=g(ue);#s=g(w);#a=g(Te);relayIsEnabled=this.#o.relayIsEnabled;isDarkMode=this.#e.isDarkMode;ngOnInit(){return this.#s.init(),this.#n.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.#i.open(x,{maxWidth:"500px"})}})}toggleBodyClass(){this.#e.toggleBodyClass()}changeDefaultClientTo(n){this.#r(n),window.location.replace(`/${n}`)}logout(){this.#a.logout()}#r(n){var e=new Date;e.setTime(e.getTime()+90*24*60*60*1e3),document.cookie="default-client="+n+"; expires="+e.toUTCString()+"; path=/"}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=N({type:o,selectors:[["app-layout"]],decls:37,vars:4,consts:()=>{let n;n=$localize`${"\uFFFD#10\uFFFD"}:START_TAG_SPK_ICON:house${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_SPK_ICON: Home `;let e;e=$localize`${"\uFFFD#13\uFFFD"}:START_TAG_SPK_ICON:database${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SPK_ICON: Add backup `;let t;t=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SPK_ICON:clock-counter-clockwise${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SPK_ICON: Restore `;let a;a=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:gear${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: Settings `;let l;l=$localize`${"\uFFFD#26\uFFFD"}:START_TAG_SPK_ICON:info${"\uFFFD/#26\uFFFD"}:CLOSE_TAG_SPK_ICON: About Duplicati `;let h;h=$localize`${"\uFFFD#29\uFFFD"}:START_TAG_SPK_ICON:files${"[\uFFFD/#29\uFFFD|\uFFFD/#30\uFFFD]"}:CLOSE_TAG_SPK_ICON: Documentation ${"\uFFFD#30\uFFFD"}:START_TAG_SPK_ICON_1:arrow-square-out${"[\uFFFD/#29\uFFFD|\uFFFD/#30\uFFFD]"}:CLOSE_TAG_SPK_ICON:`,h=$(h);let k;k=$localize`${"\uFFFD#33\uFFFD"}:START_TAG_SPK_ICON:chats-circle${"[\uFFFD/#33\uFFFD|\uFFFD/#34\uFFFD]"}:CLOSE_TAG_SPK_ICON: Visit forum ${"\uFFFD#34\uFFFD"}:START_TAG_SPK_ICON_1:arrow-square-out${"[\uFFFD/#33\uFFFD|\uFFFD/#34\uFFFD]"}:CLOSE_TAG_SPK_ICON:`,k=$(k);let M;M=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:skip-back${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON: Revert to NGAX client `;let L;return L=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON:sign-out${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_ICON: Log out `,[n,e,t,a,l,h,k,M,L,["sidenav",""],["spk-button","",1,"icon","small",3,"click"],[1,"base-1","primary"],["action","","routerLink","/","routerLinkActive","active",3,"routerLinkActiveOptions"],["action","","routerLink","/add-backup","routerLinkActive","active"],["action","","routerLink","/restore","routerLinkActive","active"],["action","","routerLink","/settings","routerLinkActive","active"],[1,"spacer"],[1,"base-1l","primary"],["action","","routerLink","/about","routerLinkActive","active"],["href","https://docs.duplicati.com","target","_blank","action",""],["suffix",""],["href","https://forum.duplicati.com","target","_blank","action",""],["action","",3,"click"]]},template:function(e,t){e&1&&(s(0,"spk-sidenav")(1,"div",9)(2,"header"),_(3,"app-logo"),s(4,"button",10),d("click",function(){return t.toggleBodyClass()}),T(5,We,2,0,"spk-icon")(6,qe,2,0,"spk-icon"),i()(),s(7,"spk-list",11)(8,"button",12),p(9,0),_(10,"spk-icon"),u(),i(),s(11,"button",13),p(12,1),_(13,"spk-icon"),u(),i(),s(14,"button",14),p(15,2),_(16,"spk-icon"),u(),i(),s(17,"button",15),p(18,3),_(19,"spk-icon"),u(),i()(),_(20,"div",16),s(21,"spk-list",17),T(22,je,6,0),_(23,"spk-divider"),s(24,"button",18),p(25,4),_(26,"spk-icon"),u(),i(),s(27,"a",19),p(28,5),_(29,"spk-icon")(30,"spk-icon",20),u(),i(),s(31,"a",21),p(32,6),_(33,"spk-icon")(34,"spk-icon",20),u(),i()()(),_(35,"router-outlet")(36,"app-service-hub"),i()),e&2&&(r(5),F(t.isDarkMode()?5:6),r(3),D("routerLinkActiveOptions",se(3,ze)),r(14),F(t.relayIsEnabled()?-1:22))},dependencies:[re,le,_e,Fe,I,ge,v,de,b,De],styles:["[_nghost-%COMP%]{height:100vh;width:100%;overflow:hidden}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:20px;gap:12px}h3[title][_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}div[sidenav][_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100vh}"],changeDetection:0})};export{Q as default};
|
package/chunk-JRZGF4BZ.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e as a,f as b,g as c}from"./chunk-RXHYUPYG.js";import"./chunk-KHGD372Q.js";import"./chunk-LDJVMU7P.js";import"./chunk-LJDOQTEF.js";import"./chunk-B64M2BXZ.js";import"./chunk-NF3MS2YP.js";import"./chunk-XR4SRVOQ.js";import"./chunk-WZRSQ7XL.js";import"./chunk-3AIKVVWP.js";import"./chunk-RHW5QVAY.js";import"./chunk-5ENRUF35.js";import"./chunk-5LKXKKAK.js";import"./chunk-HFNFJ7G2.js";import"./chunk-AL5KGNEF.js";import"./chunk-FRSQ5NDX.js";import"./chunk-M3WT5B3C.js";import"./chunk-AHUC7M75.js";import"./chunk-7CGTOI24.js";export{b as NONE_OPTION,a as createGeneralForm,c as default};
|
package/chunk-KBJGYXKV.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e as a,f as b}from"./chunk-Q6M5VRZV.js";import"./chunk-LDJVMU7P.js";import"./chunk-LJDOQTEF.js";import"./chunk-XR4SRVOQ.js";import"./chunk-WZRSQ7XL.js";import"./chunk-3AIKVVWP.js";import"./chunk-5ENRUF35.js";import"./chunk-5LKXKKAK.js";import"./chunk-HFNFJ7G2.js";import"./chunk-AL5KGNEF.js";import"./chunk-FRSQ5NDX.js";import"./chunk-M3WT5B3C.js";import"./chunk-AHUC7M75.js";import"./chunk-7CGTOI24.js";export{a as createRestoreSelectFilesForm,b as default};
|
package/chunk-KYQWUXYN.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a}from"./chunk-4LLC3Q7O.js";import"./chunk-KHGD372Q.js";import"./chunk-LDJVMU7P.js";import"./chunk-WZRSQ7XL.js";import"./chunk-5ENRUF35.js";import"./chunk-AL5KGNEF.js";import"./chunk-FRSQ5NDX.js";import"./chunk-M3WT5B3C.js";import"./chunk-AHUC7M75.js";import"./chunk-7CGTOI24.js";export{a as OptionsListComponent};
|
package/chunk-MUBWT5H2.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as un}from"./chunk-B3WLZK7W.js";import{c as Z,d as sn}from"./chunk-B64M2BXZ.js";import"./chunk-XR4SRVOQ.js";import{a as cn}from"./chunk-OHZGASM5.js";import"./chunk-65UN5LE6.js";import{a as ln}from"./chunk-WFM6YWRN.js";import{a as rn}from"./chunk-3AIKVVWP.js";import"./chunk-RHW5QVAY.js";import"./chunk-RSZISHXB.js";import"./chunk-5ENRUF35.js";import"./chunk-ZQSBINUM.js";import"./chunk-3XVU2YA6.js";import{e as je}from"./chunk-5LKXKKAK.js";import"./chunk-HFNFJ7G2.js";import{a as Y,e as qe,f as Je,g as Qe,h as Ye,j as Ze,k as en,o as nn,p as tn,w as on,x as an}from"./chunk-AL5KGNEF.js";import{h as _n}from"./chunk-FRSQ5NDX.js";import"./chunk-RHII5WE3.js";import"./chunk-M3WT5B3C.js";import"./chunk-TCDECRYI.js";import{Ab as z,Ac as b,Bb as V,Bc as G,Cb as K,Cc as Q,Db as a,Eb as o,F as w,Fb as d,Gb as M,Hb as m,Ib as $,Jb as B,Pb as s,Qb as u,Qc as We,Rb as p,Sb as y,Tb as x,Ua as r,Ub as j,Vb as f,Wb as F,Z as L,a as ve,b as W,ea as k,fa as P,gb as he,ic as U,jc as T,kc as ze,lb as g,lc as O,oc as Ve,pc as Ke,qc as Ue,rb as Xe,rc as q,sb as we,ub as S,va as H,vc as J,wb as R,wc as D,zb as E,zc as I}from"./chunk-AHUC7M75.js";import"./chunk-7CGTOI24.js";function pn(...e){let i=H(...e);return Object.defineProperty(i,"value",{get:i.asReadonly(),set:i.set.bind(i)})}function Fn(e,i,n){let t=localStorage.getItem(i);t!=null&&(e=JSON.parse(t));let _=pn(e),c=_[ve];n?.equal&&(c.equal=n.equal);function N(C){C==null?localStorage.removeItem(i):localStorage.setItem(i,JSON.stringify(C))}return _.set=C=>{N(C),W(c,C)},_.update=C=>{let A=C(_());N(A),W(c,A)},_}var Tn=()=>[import("./chunk-RLUT4FSI.js").then(e=>e.NgTemplateOutlet),Y,Ze,an,on,import("./chunk-RKAIZDDW.js").then(e=>e.DurationFormatPipe),import("./chunk-CRJHIWSF.js").then(e=>e.BytesPipe),import("./chunk-G5CT45UH.js").then(e=>e.RelativeTimePipe)],Sn=()=>["/add-backup"],Cn=()=>["/restore"],dn=e=>({$implicit:e}),En=e=>["/backup",e],Mn=e=>["/restore",e],mn=e=>["/backup",e,"export"],On=e=>["/backup",e,"database"],Nn=e=>["/backup",e,"commandline"],kn=e=>["/backup",e,"log"];function Pn(e,i){if(e&1){let n=B();a(0,"button",57),f("click",function(){let _=k(n).$implicit,c=F(2);return P(c.sortByColumn.set(_.value))}),p(1,15),o()}if(e&2){let n=i.$implicit,t=F(2);R("active",t.orderBy()===n.value),r(),y(n.label),x(1)}}function fn(e,i){if(e&1&&(a(0,"spk-menu",58)(1,"button",59),s(2,14),d(3,"strong")(4,"spk-icon"),u(),o(),M(5,60),V(6,Pn,2,3,"button",61,z),m(),o()),e&2){let n=F();r(4),y(n.orderBy()),x(2),r(2),K(n.sortOrderOptions())}}function $n(e,i){if(e&1&&(T(0),I(1,"durationFormat")),e&2){let n=F().$implicit,t=F(4);O(" ",G(1,1,n.Backup==null||n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDuration,t.timeType()==="actual")," ")}}function Dn(e,i){e&1&&(M(0),p(1,21),m())}function In(e,i){if(e&1&&(T(0),I(1,"bytes")),e&2){let n=F().$implicit;O(" ",b(1,1,n.Backup==null||n.Backup.Metadata==null?null:n.Backup.Metadata.SourceFilesSize)," ")}}function An(e,i){e&1&&(M(0),p(1,22),m())}function Rn(e,i){if(e&1&&(T(0),I(1,"bytes")),e&2){let n=F().$implicit;O(" ",b(1,1,n.Backup==null||n.Backup.Metadata==null?null:n.Backup.Metadata.TargetFilesSize)," ")}}function Hn(e,i){e&1&&(M(0),p(1,23),m())}function yn(e,i){e&1&&$(0)}function xn(e,i){if(e&1&&(a(0,"div",64)(1,"div",51)(2,"h3"),T(3),a(4,"spk-chip")(5,"spk-icon"),T(6),o(),T(7),o()(),a(8,"p")(9,"span"),p(10,16),o(),T(11),I(12,"relativeTime"),o(),a(13,"p")(14,"span"),p(15,17),o(),g(16,$n,2,4)(17,Dn,2,0,"ng-container"),o(),a(18,"p")(19,"span"),p(20,18),o(),g(21,In,2,3)(22,An,2,0,"ng-container"),o(),a(23,"p")(24,"span"),p(25,19),o(),g(26,Rn,2,3)(27,Hn,2,0,"ng-container"),o()(),q(28),a(29,"spk-chip",65),p(30,20),o(),a(31,"div",55),g(32,yn,1,0,"ng-container",66),o()()),e&2){let n,t=i.$implicit,_=F(4),c=U(51);r(3),O(" ",(n=t.Backup==null?null:t.Backup.Name)!==null&&n!==void 0?n:_.MISSING_BACKUP_NAME," "),r(3),ze(_.getBackendIcon(t.Backup==null?null:t.Backup.TargetURL)),r(),O(" ",_.getBackendType(t.Backup==null?null:t.Backup.TargetURL)," "),r(4),O(" ",G(12,11,t.Backup==null||t.Backup.Metadata==null?null:t.Backup.Metadata.LastBackupDate,_.timeType()==="actual")," "),r(5),E(!(t.Backup==null||t.Backup.Metadata==null)&&t.Backup.Metadata.LastBackupDuration?16:17),r(5),E(!(t.Backup==null||t.Backup.Metadata==null)&&t.Backup.Metadata.SourceFilesSize?21:22),r(5),E(!(t.Backup==null||t.Backup.Metadata==null)&&t.Backup.Metadata.TargetFilesSize?26:27);let N=_.getBackupVersionCount(t);r(4),y(N)(N),x(30),r(2),S("ngTemplateOutlet",c)("ngTemplateOutletContext",D(14,dn,t))}}function Ln(e,i){if(e&1&&V(0,xn,33,16,"div",64,z),e&2){let n=F(3);K(n.backups())}}function Bn(e,i){e&1&&(M(0),p(1,24),m())}function bn(e,i){if(e&1&&(a(0,"div",62),g(1,Ln,2,0)(2,Bn,2,0,"ng-container"),o()),e&2){let n=F(2);r(),E(n.backups().length?1:2)}}function Gn(e,i){e&1&&(s(0,25,1),$(1),u())}function vn(e,i){e&1&&(s(0,26,1),$(1),u())}function hn(e,i){e&1&&(s(0,27,1),$(1),u())}function Xn(e,i){e&1&&(s(0,28,1),$(1),u())}function wn(e,i){e&1&&(s(0,29,1),$(1),u())}function zn(e,i){e&1&&(s(0,30,1),$(1),u())}function Vn(e,i){if(e&1&&(T(0),I(1,"relativeTime")),e&2){let n=F().$implicit,t=F(3);O(" ",G(1,1,n.Backup==null||n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDate,t.timeType()==="actual")," ")}}function Kn(e,i){e&1&&(M(0),p(1,34),m())}function Un(e,i){if(e&1&&(T(0),I(1,"durationFormat")),e&2){let n=F().$implicit,t=F(3);O(" ",G(1,1,n.Backup==null||n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDuration,t.timeType()==="actual")," ")}}function Wn(e,i){e&1&&(M(0),p(1,35),m())}function jn(e,i){if(e&1&&(T(0),I(1,"bytes")),e&2){let n=F().$implicit;O(" ",b(1,1,n.Backup==null||n.Backup.Metadata==null?null:n.Backup.Metadata.SourceFilesSize)," ")}}function qn(e,i){e&1&&(M(0),p(1,36),m())}function Jn(e,i){if(e&1&&(T(0),I(1,"bytes")),e&2){let n=F().$implicit;O(" ",b(1,1,n.Backup==null||n.Backup.Metadata==null?null:n.Backup.Metadata.TargetFilesSize)," ")}}function Qn(e,i){e&1&&(M(0),p(1,37),m())}function Yn(e,i){e&1&&$(0)}function Zn(e,i){if(e&1&&(a(0,"tr")(1,"td"),T(2),o(),a(3,"td"),T(4),o(),a(5,"td"),g(6,Vn,2,4)(7,Kn,2,0,"ng-container"),o(),a(8,"td"),g(9,Un,2,4)(10,Wn,2,0,"ng-container"),o(),a(11,"td"),g(12,jn,2,3)(13,qn,2,0,"ng-container"),o(),a(14,"td"),g(15,Jn,2,3)(16,Qn,2,0,"ng-container"),o(),a(17,"td"),q(18),a(19,"span"),p(20,33),o()(),a(21,"td"),g(22,Yn,1,0,"ng-container",66),o()()),e&2){let n,t=i.$implicit,_=F(3),c=U(51);r(2),O(" ",(n=t.Backup==null?null:t.Backup.Name)!==null&&n!==void 0?n:_.MISSING_BACKUP_NAME," "),r(2),O(" ",_.getBackendType(t.Backup==null?null:t.Backup.TargetURL)," "),r(2),E(!(t.Backup==null||t.Backup.Metadata==null)&&t.Backup.Metadata.LastBackupDate?6:7),r(3),E(!(t.Backup==null||t.Backup.Metadata==null)&&t.Backup.Metadata.LastBackupDuration?9:10),r(3),E(!(t.Backup==null||t.Backup.Metadata==null)&&t.Backup.Metadata.SourceFilesSize?12:13),r(3),E(!(t.Backup==null||t.Backup.Metadata==null)&&t.Backup.Metadata.TargetFilesSize?15:16);let N=_.getBackupVersionCount(t);r(5),y(N)(N),x(20),r(2),S("ngTemplateOutlet",c)("ngTemplateOutletContext",D(10,dn,t))}}function et(e,i){if(e&1){let n=B();a(0,"spk-table",67),Ue("sortByColumnChange",function(_){k(n);let c=F(2);return Ke(c.sortByColumn,_)||(c.sortByColumn=_),P(_)}),a(1,"tr",68)(2,"th",69),s(3,25),g(4,Gn,2,0,"ng-container",70),u(),o(),a(5,"th",71),s(6,26),g(7,vn,2,0,"ng-container",70),u(),o(),a(8,"th",72),s(9,27),g(10,hn,2,0,"ng-container",70),u(),o(),a(11,"th",73),s(12,28),g(13,Xn,2,0,"ng-container",70),u(),o(),a(14,"th",74),s(15,29),g(16,wn,2,0,"ng-container",70),u(),o(),a(17,"th",75),s(18,30),g(19,zn,2,0,"ng-container",70),u(),o(),a(20,"th"),p(21,31),o(),a(22,"th"),p(23,32),o()(),V(24,Zn,23,12,"tr",null,z),o()}if(e&2){let n=F(2),t=U(53);S("data",n.backups())("loading",n.backupsLoading()),Ve("sortByColumn",n.sortByColumn),r(4),S("ngTemplateOutlet",t),r(3),S("ngTemplateOutlet",t),r(3),S("ngTemplateOutlet",t),r(3),S("ngTemplateOutlet",t),r(3),S("ngTemplateOutlet",t),r(3),S("ngTemplateOutlet",t),r(5),K(n.backups())}}function nt(e,i){if(e&1&&g(0,bn,3,1,"div",62)(1,et,26,9,"spk-table",63),e&2){let n=F();E(n.viewMode()==="list"?0:n.viewMode()==="details"?1:-1)}}function tt(e,i){e&1&&(a(0,"div",76),d(1,"spk-progress-bar",77),a(2,"div",51)(3,"h3"),p(4,38),o()()())}function it(e,i){e&1&&p(0,39,1)}function ot(e,i){e&1&&(a(0,"spk-icon"),T(1,"check"),o())}function at(e,i){e&1&&(a(0,"spk-icon"),T(1,"dots-three-vertical"),o())}function _t(e,i){if(e&1){let n=B();a(0,"button",78),f("click",function(){let _=k(n).$implicit,c=F();return P(c.startBackup(_.Backup==null?null:_.Backup.ID))}),s(1,39),d(2,"spk-icon"),g(3,it,1,0),u(),o(),a(4,"button",79)(5,"spk-icon"),T(6,"pencil-simple"),o()(),a(7,"spk-menu",80)(8,"button",52),g(9,ot,2,0,"spk-icon")(10,at,2,0,"spk-icon"),o(),M(11,60),a(12,"h3",81),T(13,"Operations"),o(),a(14,"button",82),s(15,40),d(16,"spk-icon"),u(),o(),a(17,"button",82),s(18,41),d(19,"spk-icon"),u(),o(),a(20,"button",83),f("click",function(){let _=k(n).$implicit,c=F();return P(c.deleteBackup(_.Backup==null?null:_.Backup.ID))}),s(21,42),d(22,"spk-icon"),u(),o(),d(23,"spk-divider"),a(24,"h3",81),T(25,"Advanced"),o(),a(26,"button",82),s(27,43),d(28,"spk-icon"),u(),o(),a(29,"button",57),f("click",function(){let _=k(n).$implicit,c=F();return P(c.verifyFiles(_.Backup==null?null:_.Backup.ID))}),s(30,44),d(31,"spk-icon"),u(),o(),a(32,"button",57),f("click",function(){let _=k(n).$implicit,c=F();return P(c.compressBackup(_.Backup==null?null:_.Backup.ID))}),s(33,45),d(34,"spk-icon"),u(),o(),a(35,"button",82),s(36,46),d(37,"spk-icon"),u(),o(),d(38,"spk-divider"),a(39,"h3",81),T(40,"Reporting"),o(),a(41,"button",82),s(42,47),d(43,"spk-icon"),u(),o(),a(44,"button",57),f("click",function(){let _=k(n).$implicit,c=F();return P(c.createErrorReport(_.Backup==null?null:_.Backup.ID))}),s(45,48),d(46,"spk-icon"),u(),o(),m(),o()}if(e&2){let n=i.$implicit,t=F();R("loader",t.startingBackup()===(n.Backup==null?null:n.Backup.ID)),r(3),E(t.viewMode()==="list"?3:-1),r(),S("routerLink",D(17,En,n.Backup==null?null:n.Backup.ID)),r(3),S("right",!0),r(),R("loader",t.loadingId()===(n.Backup==null?null:n.Backup.ID))("success",t.successId()===(n.Backup==null?null:n.Backup.ID)),r(),E(t.successId()===(n.Backup==null?null:n.Backup.ID)?9:10),r(5),S("routerLink",D(19,Mn,n.Backup==null?null:n.Backup.ID)),r(3),S("routerLink",D(21,mn,n.Backup==null?null:n.Backup.ID)),r(3),R("loader",t.deletingBackup()===(n.Backup==null?null:n.Backup.ID)),r(6),S("routerLink",D(23,On,n.Backup==null?null:n.Backup.ID)),r(9),S("routerLink",D(25,Nn,n.Backup==null?null:n.Backup.ID)),r(6),S("routerLink",D(27,kn,n.Backup==null?null:n.Backup.ID))}}function lt(e,i){e&1&&(a(0,"spk-icon",84),T(1,"funnel-simple"),o(),a(2,"spk-icon",85),T(3,"sort-ascending"),o(),a(4,"spk-icon",86),T(5,"sort-descending"),o())}var gn={file:{Display:$localize`Local`,Icon:null}},ee=class e{#e=L(ln);#t=L(qe);#n=L(_n);#i=L(cn);MISSING_BACKUP_NAME=$localize`Backup name missing`;sortOrderOptions=this.#e.orderByOptions;orderBy=this.#e.orderBy;backups=this.#e.backups;backupsLoading=this.#e.backupsLoading;startingBackup=this.#e.startingBackup;deletingBackup=this.#e.deletingBackup;timeType=this.#e.timeType;viewMode=Fn("list","viewMode");sortByColumn=H("name");loadingId=H(null);successId=H(null);sortEffect=We(()=>this.#e.setOrderBy(this.sortByColumn()));ngOnInit(){this.#e.getBackups(!0)}setOrderBy(i){this.#e.setOrderBy(i)}setTimeType(i){this.#e.setTimeType(i)}startBackup(i){this.#i.resumeDialogCheck(()=>this.#e.startBackup(i))}getBackendIcon(i){if(!i)return"";let n=i.split("://")[0],t=Z.find(c=>c.key===n);if(!t)return"database";let _=gn[t.key];return _?.Icon?_.Icon:"database"}getBackendType(i){if(!i)return"";let n=i.split("://")[0],t=Z.find(c=>c.key===n);if(!t)return"";let _=gn[t.key];if(_?.Display)return _.Display;if(t.key==="s3"){let c="http://null?"+i.split("?")[1],C=new URL(c).searchParams.get("s3-server-name")?.toLowerCase()??"";for(let[A,v]of Object.entries(sn))if(C.endsWith(A))return v}return t.displayName}getBackupVersionCount(i){return parseInt(i?.Backup?.Metadata?.BackupListCount??"",10)||0}deleteBackup(i){this.loadingId.set(i),this.#t.open(rn,{data:{title:$localize`Confirm delete`,message:$localize`Are you sure you want to delete this backup?`,confirmText:$localize`Delete backup`,cancelText:$localize`Cancel`},closed:n=>{n&&this.#e.deleteBackup(i)}})}verifyFiles(i){this.loadingId.set(i),this.#n.postApiV1BackupByIdVerify({id:i}).pipe(w(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(i),setTimeout(()=>this.successId.set(null),2e3)}})}compressBackup(i){this.loadingId.set(i),this.#n.postApiV1BackupByIdCompact({id:i}).pipe(w(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(i),setTimeout(()=>this.successId.set(null),2e3)}})}createErrorReport(i){this.loadingId.set(i),this.#n.postApiV1BackupByIdCreatereport({id:i}).pipe(w(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(i),setTimeout(()=>this.successId.set(null),2e3)}})}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=he({type:e,selectors:[["app-home"]],decls:54,vars:11,consts:()=>{let i;i=$localize`Backups`;let n;n=$localize`Backups are stored in the cloud and can be restored at any time.`;let t;t=$localize` Add ${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let _;_=$localize`Restores`;let c;c=$localize`Restores allow you to restore your data from the cloud.`;let N;N=$localize` Start ${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let C;C=$localize`My backups`;let A;A=$localize`${"\uFFFD#31\uFFFD"}:START_TAG_SPK_ICON:rows${"\uFFFD/#31\uFFFD"}:CLOSE_TAG_SPK_ICON: List `;let v;v=$localize`${"\uFFFD#34\uFFFD"}:START_TAG_SPK_ICON:list${"\uFFFD/#34\uFFFD"}:CLOSE_TAG_SPK_ICON: Details `;let ne;ne=$localize` Time: ${"\uFFFD#38\uFFFD"}:START_TAG_STRONG:${"\uFFFD0\uFFFD"}:INTERPOLATION:${"\uFFFD/#38\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#39\uFFFD"}:START_TAG_SPK_ICON:clock${"\uFFFD/#39\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let te;te=$localize`Relative time`;let ie;ie=$localize`Actual time`;let oe;oe=$localize` Order by: ${"\uFFFD#3\uFFFD"}:START_TAG_STRONG:${"\uFFFD0\uFFFD"}:INTERPOLATION:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#4\uFFFD"}:START_TAG_SPK_ICON:arrows-down-up${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let ae;ae=$localize` ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let _e;_e=$localize`Last successful backup:`;let le;le=$localize`Duration:`;let re;re=$localize`Source:`;let ce;ce=$localize`Destination:`;let h;h=$localize`{VAR_PLURAL, plural, =0 {No version yet} =1 {1 Version} other {{INTERPOLATION} Versions}}`,h=j(h,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let se;se=$localize` ${h}:ICU@@6502601490918455200: `;let ue;ue=$localize`N/A`;let pe;pe=$localize`N/A`;let Fe;Fe=$localize`N/A`;let ge;ge=$localize`No backups founds`;let de;de=$localize` Backup ${"\uFFFD*4:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*4:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Te;Te=$localize` Type ${"\uFFFD*7:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*7:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Se;Se=$localize` Last successful backup ${"\uFFFD*10:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*10:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Ce;Ce=$localize` Duration ${"\uFFFD*13:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*13:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Ee;Ee=$localize` Source ${"\uFFFD*16:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*16:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Me;Me=$localize` Destination ${"\uFFFD*19:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*19:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let me;me=$localize`Version`;let Oe;Oe=$localize`Actions`;let X;X=$localize`{VAR_PLURAL, plural, =0 {No version yet} =1 {1 Version} other {{INTERPOLATION} Versions}}`,X=j(X,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let Ne;Ne=$localize` ${X}:ICU@@6502601490918455200: `;let ke;ke=$localize`N/A`;let Pe;Pe=$localize`N/A`;let fe;fe=$localize`N/A`;let $e;$e=$localize`N/A`;let De;De=$localize`Loading backups...`;let Ie;Ie=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:play-circle${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON:${"\uFFFD*3:1\uFFFD"}:START_BLOCK_IF: Start ${"\uFFFD/*3:1\uFFFD"}:CLOSE_BLOCK_IF:`;let Ae;Ae=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SPK_ICON:clock-counter-clockwise${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SPK_ICON: Restore `;let Re;Re=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:export${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: Export `;let He;He=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:x-circle${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON: Delete `;let ye;ye=$localize`${"\uFFFD#28\uFFFD"}:START_TAG_SPK_ICON:database${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SPK_ICON: Database `;let xe;xe=$localize`${"\uFFFD#31\uFFFD"}:START_TAG_SPK_ICON:check-square-offset${"\uFFFD/#31\uFFFD"}:CLOSE_TAG_SPK_ICON: Verify files `;let Le;Le=$localize`${"\uFFFD#34\uFFFD"}:START_TAG_SPK_ICON:file-archive${"\uFFFD/#34\uFFFD"}:CLOSE_TAG_SPK_ICON: Compress now `;let Be;Be=$localize`${"\uFFFD#37\uFFFD"}:START_TAG_SPK_ICON:terminal-window${"\uFFFD/#37\uFFFD"}:CLOSE_TAG_SPK_ICON: Commandline `;let be;be=$localize`${"\uFFFD#43\uFFFD"}:START_TAG_SPK_ICON:notepad${"\uFFFD/#43\uFFFD"}:CLOSE_TAG_SPK_ICON: Log `;let Ge;return Ge=$localize`${"\uFFFD#46\uFFFD"}:START_TAG_SPK_ICON:file-plus${"\uFFFD/#46\uFFFD"}:CLOSE_TAG_SPK_ICON: Create error report `,[["actions",""],["sortIcons",""],i,n,t,_,c,N,C,A,v,ne,te,ie,oe,ae,_e,le,re,ce,se,ue,pe,Fe,ge,de,Te,Se,Ce,Ee,Me,me,Oe,Ne,ke,Pe,fe,$e,De,Ie,Ae,Re,He,ye,xe,Le,Be,be,Ge,[1,"type-a",3,"routerLink"],["src","assets/images/backup.png","alt","","width","48px"],[1,"text"],["type","button","spk-button",""],["src","assets/images/restore.png","alt","","width","48px"],[1,"content"],[1,"actions"],[1,"small"],["type","button",3,"click"],[1,"table-overview"],["type","button","spk-button","",1,"small","table-buttons"],["menu",""],["type","button",3,"active"],[1,"backups"],[1,"type-b",3,"data","loading","sortByColumn"],[1,"backup"],[1,"simple","success"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"type-b",3,"sortByColumnChange","data","loading","sortByColumn"],["table-header",""],["spkSort","name"],[4,"ngTemplateOutlet"],["spkSort","type"],["spkSort","lastrun"],["spkSort","duration"],["spkSort","sourcesize"],["spkSort","destinationsize"],[1,"loading-list"],[1,"indeterminate","primary"],["spk-button","",3,"click"],["type","button","spk-button","",3,"routerLink"],[3,"right"],["title",""],["type","button",3,"routerLink"],[3,"click"],[1,"filter"],[1,"asc"],[1,"desc"]]},template:function(n,t){if(n&1){let _=B();d(0,"app-status-bar"),a(1,"section")(2,"header")(3,"spk-card",49),d(4,"img",50),a(5,"div",51)(6,"h3"),p(7,2),o(),a(8,"p"),p(9,3),o()(),a(10,"button",52),s(11,4),d(12,"spk-icon"),u(),o()(),a(13,"spk-card",49),d(14,"img",53),a(15,"div",51)(16,"h3"),p(17,5),o(),a(18,"p"),p(19,6),o()(),a(20,"button",52),s(21,7),d(22,"spk-icon"),u(),o()()(),a(23,"div",54)(24,"h2"),M(25),p(26,8),m(),a(27,"div",55)(28,"spk-button-group",56)(29,"button",57),f("click",function(){return k(_),P(t.viewMode.set("list"))}),s(30,9),d(31,"spk-icon"),u(),o(),a(32,"button",57),f("click",function(){return k(_),P(t.viewMode.set("details"))}),s(33,10),d(34,"spk-icon"),u(),o()(),a(35,"spk-menu",58)(36,"button",59),s(37,11),d(38,"strong")(39,"spk-icon"),u(),o(),M(40,60),a(41,"button",57),f("click",function(){return k(_),P(t.setTimeType("relative"))}),p(42,12),o(),a(43,"button",57),f("click",function(){return k(_),P(t.setTimeType("actual"))}),p(44,13),o(),m(),o(),g(45,fn,8,1,"spk-menu",58),o()(),g(46,nt,2,1)(47,tt,5,0),Xe(48,46,Tn,null,47),o()(),g(50,_t,47,29,"ng-template",null,0,Q)(52,lt,6,0,"ng-template",null,1,Q)}n&2&&(r(3),S("routerLink",J(9,Sn)),r(10),S("routerLink",J(10,Cn)),r(16),R("active",t.viewMode()==="list"),r(3),R("active",t.viewMode()==="details"),r(7),y(t.timeType()),x(37),r(6),E(t.viewMode()==="list"?45:-1),r(3),we(!t.backupsLoading()))},dependencies:[je,un,Ye,Qe,Y,en,nn,tn,Je],styles:["[_nghost-%COMP%]{display:block}h2[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:2rem 0}header[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;padding:0 2rem;gap:1rem}spk-card[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem}spk-card[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:.25rem}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.content[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{padding:0 2rem}.content[_ngcontent-%COMP%] .table-buttons[_ngcontent-%COMP%]{min-height:40px}.backups[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 2rem;gap:.5rem}.backup[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem;gap:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;width:100%;max-width:40%}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{color:var(--base-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--base-12)}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}.sortable[_ngcontent-%COMP%]{-webkit-user-select:none;user-select:none}.sortable[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{margin-left:.5rem;font-size:1rem;justify-self:flex-end;display:none}.sortable[_ngcontent-%COMP%]:not(.sort-asc):not(.sort-desc) spk-icon.filter[_ngcontent-%COMP%]{display:block}.sortable.sort-asc[_ngcontent-%COMP%] spk-icon.asc[_ngcontent-%COMP%]{display:block;color:var(--base-12)}.sortable.sort-desc[_ngcontent-%COMP%] spk-icon.desc[_ngcontent-%COMP%]{display:block;color:var(--base-12)}"],changeDetection:0})};export{ee as default};
|
package/chunk-PHIZVVHX.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as te}from"./chunk-T6KX6ACI.js";import{a as gt}from"./chunk-B3WLZK7W.js";import{l as ae}from"./chunk-RXHYUPYG.js";import"./chunk-KHGD372Q.js";import"./chunk-LDJVMU7P.js";import"./chunk-LJDOQTEF.js";import"./chunk-B64M2BXZ.js";import"./chunk-NF3MS2YP.js";import"./chunk-XR4SRVOQ.js";import{a as Tt}from"./chunk-OEIF7NQ5.js";import{a as K}from"./chunk-WZRSQ7XL.js";import{a as St}from"./chunk-TJJORMQV.js";import"./chunk-OHZGASM5.js";import"./chunk-65UN5LE6.js";import"./chunk-WFM6YWRN.js";import{a as ct}from"./chunk-3AIKVVWP.js";import"./chunk-RHW5QVAY.js";import"./chunk-RSZISHXB.js";import{c as Q,e as Z,h as J,l as pt,s as Y,t as ee}from"./chunk-5ENRUF35.js";import"./chunk-ZQSBINUM.js";import{a as nt}from"./chunk-3XVU2YA6.js";import"./chunk-5LKXKKAK.js";import"./chunk-HFNFJ7G2.js";import{A as _t,C as dt,a as W,b as H,e as it,g as q,k as ot,l as j,p as st,q as at,r as lt,t as rt}from"./chunk-AL5KGNEF.js";import{h as k}from"./chunk-FRSQ5NDX.js";import"./chunk-RHII5WE3.js";import"./chunk-M3WT5B3C.js";import"./chunk-TCDECRYI.js";import{$a as je,B as b,Db as i,Eb as o,F as R,Fb as I,Jb as P,Pb as X,Pc as F,Qb as V,Qc as $,Ra as qe,Rb as l,Sb as oe,T as He,Tb as se,Ua as r,Ub as Ze,Vb as S,Wb as p,Z as E,Zb as Je,a as Ue,b as Be,c as We,ea as u,fa as m,gb as w,gc as Ye,hc as et,jc as O,kc as z,lb as f,lc as U,n as v,oc as y,pc as G,qc as A,rb as Ke,sb as Qe,ub as h,uc as tt,va as c,vc as B,wb as N,zb as C}from"./chunk-AHUC7M75.js";import"./chunk-7CGTOI24.js";var Ct=["formRef"],Et=()=>[import("./chunk-KYQWUXYN.js").then(s=>s.OptionsListComponent)];function ft(s,e){s&1&&(i(0,"spk-alert",3),l(1,1),o())}function Nt(s,e){if(s&1){let t=P();i(0,"app-options-list",5),A("optionsChange",function(a){u(t);let _=p();return G(_.settings,a)||(_.settings=a),m(a)}),o()}if(s&2){let t=p();y("options",t.settings),h("hasFreeTextSettings",!0)}}var Mt=["Bytes","KB","MB","GB","TB","PB"],x=class s{#e=E(ae);#t=E(te);#i=E(k);formRef=je.required("formRef");settings=this.#e.settings;isSubmitting=c(!1);isLoadingOptions=c(!0);saved=c(!1);sizeOptions=c(Mt);lastRecievedServerSettings=c({});serverSettingsEffect=$(()=>{let e=this.#t.serverSettings();if(e===void 0)return;this.lastRecievedServerSettings.set(e),this.isLoadingOptions.set(!0);let t=Object.entries(e);t.forEach(([n,a],_)=>{if(n.startsWith("--")){let T=n.replace("--","");this.settings.update(g=>(g.some(M=>M.Name===T)||g.push({Name:T,Value:a}),g))}_===t.length-1&&this.isLoadingOptions.set(!1)})});submit(){this.isSubmitting.set(!0);let e=this.settings(),t=this.lastRecievedServerSettings(),n=e.map(g=>g.Name),_=Object.keys(t).filter(g=>!n.includes(g.replace("--",""))),T=e.reduce((g,M)=>(g[`--${M.Name}`]=M.Value,g),{});_.forEach(g=>{T[g]=null}),this.#i.patchApiV1Serversettings({requestBody:T}).pipe(R(()=>this.isSubmitting.set(!1))).subscribe({next:()=>{this.#t.refreshServerSettings(),this.saved.set(!0),setTimeout(()=>{this.saved.set(!1)},3e3)}})}static \u0275fac=function(t){return new(t||s)};static \u0275cmp=w({type:s,selectors:[["app-advanced-options-settings"]],viewQuery:function(t,n){t&1&&Ye(n.formRef,Ct,5),t&2&&et()},features:[tt([ae])],decls:8,vars:4,consts:()=>{let e;e=$localize`${"\uFFFD#4\uFFFD"}:START_TAG_SPK_ICON:floppy-disk${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SPK_ICON: Save settings `;let t;return t=$localize`Settings saved`,[e,t,[1,"actions"],[1,"success"],["spk-button","","type","button",1,"raised","primary",3,"click"],[3,"optionsChange","options","hasFreeTextSettings"]]},template:function(t,n){t&1&&(i(0,"div",2),f(1,ft,2,0,"spk-alert",3),i(2,"button",4),S("click",function(){return n.submit()}),X(3,0),I(4,"spk-icon"),V(),o()(),f(5,Nt,1,2),Ke(6,5,Et)),t&2&&(r(),C(n.saved()?1:-1),r(),N("loader",n.isSubmitting()),r(4),Qe(!n.isLoadingOptions()))},dependencies:[ee,q,W,H],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:40.625rem;justify-self:flex-end}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;justify-content:flex-end;margin-bottom:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-column[_ngcontent-%COMP%]{display:flex;flex-direction:column}.form-column[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.form-column[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:1rem}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:3fr 1fr;gap:.5rem;align-items:flex-end}.form-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 2.5rem;gap:.5rem;align-items:flex-end}.remote-volume-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.remote-volume-wrap[_ngcontent-%COMP%] p.warning[_ngcontent-%COMP%]{color:#7d7d00}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.advanced-option[_ngcontent-%COMP%]{display:grid;gap:.5rem;grid-template-columns:1fr 1fr 40px;align-items:flex-end}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};var L=class s{#e=E(it);#t=E(k);#i=E(K);repeatRegisterTimer=null;state=c("unknown");claimUrl=c(null);registerUrl=c("");status=F(()=>{let e=this.state();return e==="enabled"?"Remote control is enabled but not connected":e==="connected"?"Remote control is connected":e==="registering"?"Registering machine...":e==="registeringfaulted"?"Registration failed":e==="registered"?"Registered, waiting for accept":e==="disabled"?"Remote control is configured but not enabled":e==="unknown"?"...loading...":"Remote control is not set up"});sysInfoEffect=$(()=>{let e=this.#i.systemInfo();e&&this.registerUrl.set(e.RemoteControlRegistrationUrl??"")});#n(e){e.RegistrationUrl&&this.claimUrl.set(e.RegistrationUrl),e.IsConnected?this.state.set("connected"):e.IsEnabled?this.state.set("enabled"):e.CanEnable?this.state.set("disabled"):e.IsRegisteringFaulted?this.state.set("registeringfaulted"):e.IsRegistering?e.RegistrationUrl!=null&&e.RegistrationUrl.trim().length>0?this.state.set("registered"):this.state.set("registering"):this.state.set("inactive");let t=this.state();this.repeatRegisterTimer!==null&&(clearTimeout(this.repeatRegisterTimer),this.repeatRegisterTimer=null),t==="registering"&&(this.repeatRegisterTimer=setTimeout(()=>{this.#t.postApiV1RemotecontrolRegister({requestBody:{RegistrationUrl:""}}).subscribe({next:n=>this.#n(n),error:n=>this.#o(n)})},5e3)),(t==="enabled"||t==="registered")&&(this.repeatRegisterTimer=setTimeout(()=>{this.#t.getApiV1RemotecontrolStatus().subscribe({next:n=>this.#n(n),error:n=>this.#o(n)})},5e3)),e.IsRegistering&&e.CanEnable&&this.#t.deleteApiV1RemotecontrolRegister().subscribe({next:n=>this.#n(n)})}#o(e){this.#t.getApiV1RemotecontrolStatus().subscribe({next:t=>this.#n(t)})}refreshRemoteControlStatus(){this.#t.getApiV1RemotecontrolStatus().subscribe({next:e=>this.#n(e),error:e=>this.#o(e)})}beginRemoteRegistration(){this.state.set("registering"),this.#t.postApiV1RemotecontrolRegister({requestBody:{RegistrationUrl:this.registerUrl()}}).subscribe({next:e=>this.#n(e),error:e=>this.#o(e)})}cancelRemoteRegistration(){this.#t.deleteApiV1RemotecontrolRegister().subscribe({next:e=>this.#n(e),error:e=>this.#o(e)})}enableRemoteControl(){this.#t.postApiV1RemotecontrolEnable().subscribe({next:e=>this.#n(e),error:e=>this.#o(e)})}disableRemoteControl(){this.#t.postApiV1RemotecontrolDisable().subscribe({next:e=>this.#n(e),error:e=>this.#o(e)})}deleteRemoteControl(){let e=this;this.#e.open(ct,{data:{title:$localize`Confirm delete`,message:$localize`Are you sure you want to delete the remote control registration?`,confirmText:$localize`Delete registration`,cancelText:$localize`Cancel`},closed:t=>{t&&e.#t.deleteApiV1RemotecontrolRegistration().subscribe({next:n=>e.#n(n),error:n=>e.#o(n)})}})}static \u0275fac=function(t){return new(t||s)};static \u0275prov=He({token:s,factory:s.\u0275fac,providedIn:"root"})};function Pt(s,e){if(s&1){let t=P();i(0,"spk-form-field",10)(1,"input",11),A("ngModelChange",function(a){u(t);let _=p(2);return G(_.registerUrl,a)||(_.registerUrl=a),m(a)}),o()(),i(2,"button",12),S("click",function(){u(t);let a=p(2);return m(a.register())}),l(3,0),o()}if(s&2){let t=p(2);r(),y("ngModel",t.registerUrl)}}function Ot(s,e){if(s&1&&(i(0,"div",8)(1,"label"),l(2,1),o(),i(3,"a",13),O(4),o()()),s&2){let t=p(2);r(3),Je("href",t.claimUrl(),qe),r(),z(t.claimUrl())}}function Rt(s,e){s&1&&(i(0,"div",8)(1,"label"),l(2,2),o()())}function It(s,e){if(s&1){let t=P();i(0,"button",12),S("click",function(){u(t);let a=p(2);return m(a.cancel())}),l(1,3),o()}}function yt(s,e){if(s&1){let t=P();i(0,"button",12),S("click",function(){u(t);let a=p(2);return m(a.disable())}),l(1,4),o()}}function Gt(s,e){if(s&1){let t=P();i(0,"button",12),S("click",function(){u(t);let a=p(2);return m(a.enable())}),l(1,5),o(),i(2,"button",14),S("click",function(){u(t);let a=p(2);return m(a.delete())}),l(3,6),o()}}function At(s,e){if(s&1&&(i(0,"div",7),f(1,Pt,4,1)(2,Ot,5,2,"div",8)(3,Rt,3,0,"div",8)(4,It,2,0,"button",9)(5,yt,2,0,"button",9)(6,Gt,4,0),o()),s&2){let t=p();r(),C(t.state()==="inactive"?1:-1),r(),C(t.state()==="registered"?2:-1),r(),C(t.state()==="registering"?3:-1),r(),C(t.state()==="registering"||t.state()==="registeringfaulted"||t.state()==="registered"?4:-1),r(),C(t.state()==="connected"||t.state()==="enabled"?5:-1),r(),C(t.state()==="disabled"?6:-1)}}var ne=class s{#e=E(L);state=this.#e.state;claimUrl=this.#e.claimUrl;registerUrl=this.#e.registerUrl;ngOnInit(){this.#e.refreshRemoteControlStatus()}cancel(){this.#e.cancelRemoteRegistration()}register(){this.#e.beginRemoteRegistration()}disable(){this.#e.disableRemoteControl()}enable(){this.#e.enableRemoteControl()}delete(){this.#e.deleteRemoteControl()}static \u0275fac=function(t){return new(t||s)};static \u0275cmp=w({type:s,selectors:[["app-remote-control"]],decls:1,vars:1,consts:()=>{let e;e=$localize`Register for remote control`;let t;t=$localize`Machine is now registered, open this link to add it to your account:`;let n;n=$localize`Registering, please wait...`;let a;a=$localize`Cancel registration`;let _;_=$localize`Disable remote control`;let T;T=$localize`Enable remote control`;let g;return g=$localize`Delete remote control setup`,[e,t,n,a,_,T,g,[1,"field-row"],[1,"field-col"],["type","button","spk-button","",1,"raised"],["label","Registration URL","for","remoteControlRegisterUrl"],["type","text","spk-input","","id","remoteControlRegisterUrl","name","remoteControlRegisterUrl",3,"ngModelChange","ngModel"],["type","button","spk-button","",1,"raised",3,"click"],["target","_blank",3,"href"],["type","button","spk-button","",1,"raised","error",3,"click"]]},template:function(t,n){t&1&&f(0,At,7,6,"div",7),t&2&&C(n.state()!=="unknown"?0:-1)},dependencies:[Y,Q,Z,J,j],styles:["[_nghost-%COMP%]{display:block}[_nghost-%COMP%] button[_ngcontent-%COMP%]{white-space:nowrap}.field-row[_ngcontent-%COMP%]{display:flex;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] spk-form-field[_ngcontent-%COMP%], .field-row[_ngcontent-%COMP%] spk-select[_ngcontent-%COMP%]{flex:1 0}"],changeDetection:0})};function mt(...s){let e=c(...s);return Object.defineProperty(e,"value",{get:e.asReadonly(),set:e.set.bind(e)})}var re=()=>({standalone:!0});function $t(s,e){s&1&&(i(0,"spk-icon",69),O(1,"check"),o())}function vt(s,e){s&1&&(i(0,"spk-icon",70),O(1,"prohibit"),o())}function bt(s,e){if(s&1){let t=P();i(0,"button",74),S("click",function(){u(t);let a=p(2);return m(a.updatePassphrase())}),l(1,34),o()}if(s&2){let t=p(2);N("loader",t.isUpdating())}}function wt(s,e){if(s&1){let t=P();i(0,"button",75),S("click",function(){u(t);let a=p(2);return m(a.updatePassphrase())}),l(1,35),o()}if(s&2){let t=p(2);N("loader",t.isUpdating()),h("disabled",!0)}}function kt(s,e){if(s&1){let t=P();i(0,"spk-form-field")(1,"label",65),l(2,31),o(),i(3,"input",66),A("ngModelChange",function(a){u(t);let _=p();return G(_.passphrase,a)||(_.passphrase=a),m(a)}),o()(),i(4,"spk-form-field")(5,"label",67),l(6,32),o(),i(7,"input",68),A("ngModelChange",function(a){u(t);let _=p();return G(_.repeatPassphrase,a)||(_.repeatPassphrase=a),m(a)}),o(),f(8,$t,2,0,"spk-icon",69)(9,vt,2,0,"spk-icon",70),o(),i(10,"div",48)(11,"button",71),S("click",function(){u(t);let a=p();return m(a.cancelPasswordChange())}),l(12,33),o(),f(13,bt,2,2,"button",72)(14,wt,2,3,"button",73),o()}if(s&2){let t=p();r(3),y("ngModel",t.passphrase),r(4),h("disabled",t.passphrase().length===0),y("ngModel",t.repeatPassphrase),r(),C(t.passphrase().length!==0&&t.passphrase()===t.repeatPassphrase()?8:9),r(3),N("loader",t.isUpdating()),r(2),C(t.passphrase().length!==0&&t.passphrase()===t.repeatPassphrase()?13:14)}}function Lt(s,e){s&1&&(i(0,"spk-icon",76),O(1,"check"),o())}function Ft(s,e){if(s&1){let t=P();i(0,"div",48)(1,"button",71),S("click",function(){u(t);let a=p();return m(a.openPassphraseForm())}),l(2,36),o(),f(3,Lt,2,0,"spk-icon",76),o()}if(s&2){let t=p();r(3),C(t.passwordUpdated()?3:-1)}}function xt(s,e){if(s&1){let t=P();i(0,"spk-form-field")(1,"label",77),l(2,37),o(),i(3,"textarea",78),A("ngModelChange",function(a){u(t);let _=p();return G(_.allowedHostnames,a)||(_.allowedHostnames=a),m(a)}),o()(),i(4,"spk-alert",79),l(5,38),o(),i(6,"button",74),S("click",function(){u(t);let a=p();return m(a.updateAllowedHostnames())}),l(7,39),o()}if(s&2){let t=p();r(3),y("ngModel",t.allowedHostnames),r(3),N("loader",t.updatingAllowedHosts())}}function Dt(s,e){if(s&1&&O(0),s&2){let t,n=p();U(" ",(t=n.sysinfo())==null?null:t.ServerVersion," ")}}function Xt(s,e){s&1&&I(0,"spk-progress-bar",53)}function Vt(s,e){if(s&1&&O(0),s&2){let t=e.$implicit;U(" ",t.label," ")}}function zt(s,e){if(s&1&&O(0),s&2){let t=e.$implicit;U(" ",t.label," ")}}function Ut(s,e,t){let n=mt(s),a=n[Ue];t?.equal&&(a.equal=t.equal);let _;return n.set=T=>{clearTimeout(_),_=setTimeout(()=>Be(a,T),e)},n.update=T=>{clearTimeout(_),_=setTimeout(()=>We(a,T),e)},n}var Bt=[{value:"none",label:$localize`None`},{value:"s",label:$localize`Seconds`},{value:"m",label:$localize`Minutes`},{value:"h",label:$localize`Hours`}],Wt=[{value:"none",label:$localize`System default (information)`},{value:"information",label:$localize`Usage statistics, warnings, errors, and crashes`},{value:"warning",label:$localize`Warnings, errors and crashes`},{value:"error",label:$localize`Errors and crashes`},{value:"crash",label:$localize`Crashes only`},{value:"none",label:$localize`None / disabled`}],_e=class s{#e=E(St);#t=E(K);#i=E(k);#n=E(te);#o=E(L);#s=E(nt);#a=this.#s.getItem("locale")??"en-US";sysinfo=this.#t.systemInfo;isDarkMode=this.#e.isDarkMode;editAs=c("list");previousLang=this.#a;langCtrl=c(this.#a);usageStatistics=c("");updatingUsageStatistics=c(!1);remoteControlStatus=this.#o.status;updatingChannel=c(!1);updateChannel=c("");setNewChannel(e){let t=this.updateChannel();this.updateChannel.set(e),this.#i.patchApiV1Serversettings({requestBody:{"update-channel":e}}).pipe(R(()=>this.updatingChannel.set(!1)),b(()=>(this.updateChannel.set(t),v(null)))).subscribe()}allowRemoteAccess=c(!1);allowedHostnames=c("");loadedAllowedHostnames=c("");updatingRemoteAccess=c(!1);updatingAllowedHosts=c(!1);updateRemoteAccess(){let e=this.allowRemoteAccess(),t=!e;this.allowRemoteAccess.set(t),this.#i.patchApiV1Serversettings({requestBody:{"server-listen-interface":t?"any":"loopback"}}).pipe(R(()=>this.updatingRemoteAccess.set(!1)),b(()=>(this.allowRemoteAccess.set(e),v(null)))).subscribe()}updateAllowedHostnames(){let e=this.loadedAllowedHostnames(),t=this.allowedHostnames();this.updatingAllowedHosts.set(!0),this.#i.patchApiV1Serversettings({requestBody:{"server-listen-interface":"any","allowed-hostnames":t}}).pipe(R(()=>this.updatingAllowedHosts.set(!1)),b(()=>(this.allowedHostnames.set(e),v(null)))).subscribe()}updatingDisableTrayIconLogin=c(!1);disableTrayIconLogin=c(!1);saveDisableTrayIconLogin(){let e=this.disableTrayIconLogin(),t=!e;this.updatingDisableTrayIconLogin.set(!0),this.disableTrayIconLogin.set(t),this.#i.patchApiV1Serversettings({requestBody:{"disable-tray-icon-login":t?"True":"False"}}).pipe(R(()=>this.updatingDisableTrayIconLogin.set(!1)),b(()=>(this.disableTrayIconLogin.set(e),v(null)))).subscribe()}showPassphraseForm=c(!1);isUpdating=c(!1);passphrase=c("");repeatPassphrase=c("");passwordUpdated=c(!1);updatePassphrase(){this.passphrase()===this.repeatPassphrase()&&(this.isUpdating.set(!0),this.#i.patchApiV1Serversettings({requestBody:{"server-passphrase":this.passphrase()}}).pipe(R(()=>this.isUpdating.set(!1))).subscribe({next:()=>{this.showPassphraseForm.set(!1),this.passwordUpdated.set(!0),setTimeout(()=>{this.passwordUpdated.set(!1)},3e3)}}))}openPassphraseForm(){this.showPassphraseForm.set(!0)}cancelPasswordChange(){this.showPassphraseForm.set(!1)}languageOptions=c(Tt);usageStatisticsOptions=c(Wt);timeTypeOptions=c(Bt);timeType=c("none");timeValue=Ut(0,300);timeRange=F(()=>this.timeType()==="h"?[0,24]:[0,60]);timeValueEffect=$(()=>{let e=this.timeValue();this.updateStartupDelay()});updateLocale(e){!e||e===""||e===this.previousLang||(this.#s.setItem("locale",e),window.location.reload())}updateStartupDelay(){let e=this.timeValue(),t=this.timeType(),n="";t!=="none"&&e!==0&&(n=`${e}${t}`),this.#i.patchApiV1Serversettings({requestBody:{"startup-delay":n}}).subscribe()}updateTimeType(e){this.timeType()==="none"&&this.timeValue.set(0),this.timeType.set(e)}updateUsageStatistics(e){let t=this.usageStatistics();!e||e===""||e===t||(this.usageStatistics.set(e),this.updatingUsageStatistics.set(!0),this.#i.patchApiV1Serversettings({requestBody:{"usage-reporter-level":this.usageStatistics()==="none"?"":this.usageStatistics()}}).pipe(R(()=>this.updatingUsageStatistics.set(!1)),b(()=>(this.usageStatistics.set(t),v(null)))).subscribe())}serverSettingsEffect=$(()=>{let e=this.#n.serverSettings();if(e===void 0)return;let t=e["startup-delay"],n=t.slice(-1),a=t.slice(0,-1),_=["s","m","h"];this.disableTrayIconLogin.set(e["disable-tray-icon-login"]!=="False"),this.updateChannel.set(e["update-channel"]),this.allowRemoteAccess.set(e["server-listen-interface"]==="any"),this.allowedHostnames.set(e["allowed-hostnames"]),this.loadedAllowedHostnames.set(e["allowed-hostnames"]),this.usageStatistics.set(e["usage-reporter-level"]===""?"none":e["usage-reporter-level"]),this.timeType.set(t==""?"none":_.includes(n)?n:"none"),this.timeValue.set(t==""?0:parseInt(a))});setDarkMode(){this.#e.setDarkMode()}setLightMode(){this.#e.setLightMode()}static \u0275fac=function(t){return new(t||s)};static \u0275cmp=w({type:s,selectors:[["app-settings"]],decls:132,vars:46,consts:()=>{let e;e=$localize`Settings`;let t;t=$localize`Configure your backup settings.`;let n;n=$localize`Remote access control`;let a;a=$localize`Color theme`;let _;_=$localize`Customize your application theme`;let T;T=$localize`Passwords`;let g;g=$localize`Change server passphrase`;let M;M=$localize`Language`;let de;de=$localize`Select a language for the platform`;let ce;ce=$localize`Allow remote access (requires restart)`;let pe;pe=$localize` By allowing remote access, the server listens to requests from any machine on your network. If you enable this option, make sure you are always using the computer on a secure firewall protected network. `;let Se;Se=$localize`Allow remote access`;let ge;ge=$localize`Prevent tray icon automatic log-in`;let Te;Te=$localize` By default, the tray icon will open the user interface with a token that unlocks the user interface. This ensures that you can access the user interface from the tray icon, while requiring others to enter a password. If you prefer having to type in the password, even when accessing the user interface from the tray icon, enable this option. `;let ue;ue=$localize`Prevent tray icon automatic log-in`;let me;me=$localize`Update channel`;let Ce;Ce=$localize` Default (${"\uFFFD0\uFFFD"}:INTERPOLATION:) `;let Ee;Ee=$localize`Same as the base install version: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let fe;fe=$localize`Stable`;let Ne;Ne=$localize`Official releases`;let Me;Me=$localize`Beta`;let he;he=$localize` Try out the new features that we are working on. Currently the most stable version available. Test Restore data before using this in production environments. `;let Pe;Pe=$localize` Experimental `;let Oe;Oe=$localize`Specific builds for developers only. Not for use with important data.`;let Re;Re=$localize`Canary`;let Ie;Ie=$localize`Individual builds for developers only. Not for use with important data.`;let ye;ye=$localize`Pause after startup or hibernation`;let Ge;Ge=$localize` Duplicati will run when started, but will remain in paused state for the duration. Duplicati will occupy minimal system resources and no backups will be run. `;let Ae;Ae=$localize`Usage statistics`;let D;D=$localize` Usage reports help us improve the user experience and evaluate impact of new features. We use them to generate ${"\uFFFD#119\uFFFD"}:START_LINK:public usage statistics.${"\uFFFD/#119\uFFFD"}:CLOSE_LINK:${"[\uFFFD#120\uFFFD\uFFFD/#120\uFFFD|\uFFFD#121\uFFFD\uFFFD/#121\uFFFD]"}:LINE_BREAK:${"[\uFFFD#120\uFFFD\uFFFD/#120\uFFFD|\uFFFD#121\uFFFD\uFFFD/#121\uFFFD]"}:LINE_BREAK: All usage reports are sent anonymously and do not contain any personal information. They contain information about hardware and operating system, the type of backend, backup duration, overall size of source data and similar data. They do not contain paths, filenames, usernames, passwords or similar sensitive information. `,D=Ze(D);let $e;$e=$localize`Advanced options`;let ve;ve=$localize`Enter new password`;let be;be=$localize`Repeat password`;let ie;ie=$localize`Password have to be filled and have to match`;let we;we=$localize`Passphrase`;let ke;ke=$localize`Repeat passphrase`;let Le;Le=$localize`Cancel`;let Fe;Fe=$localize` Update passphrase `;let xe;xe=$localize` Update passphrase `;let De;De=$localize`Change password`;let Xe;Xe=$localize`Allowed hostnames`;let Ve;Ve=$localize` To prevent various DNS based attacks, Duplicati limits the allowed hostnames to the ones listed here. Direct IP access and localhost is always allowed. Multiple hostnames can be supplied with a semicolon separator. If any of the allowed hostnames is an asterisk (*), all hostnames are allowed and this feature is disabled. If the field is empty, only IP address and localhost access is allowed. `;let ze;return ze=$localize` Update allowed hostnames `,[e,t,n,a,_,T,g,M,de,ce,pe,Se,ge,Te,ue,me,Ce,Ee,fe,Ne,Me,he,Pe,Oe,Re,Ie,ye,Ge,Ae,D,$e,we,ke,Le,Fe,xe,De,Xe,Ve,ze,[1,"content"],[1,"title"],[1,"left"],[1,"right"],[1,"themes"],["src","assets/images/light-theme.png","alt","light theme",3,"click"],["src","assets/images/dark-theme.png","alt","dark theme",3,"click"],[1,"right","passphrase-form"],[1,"actions"],["value","value","label","label",3,"options","isClearable","inlineSearch"],["type","text",3,"ngModelChange","ngModel","ngModelOptions"],[1,"right","remote-access-form"],[1,"primary","raised",3,"click"],[1,"indeterminate","primary"],[1,"right","radios"],[1,"radio-option",3,"click"],[1,"primary","raised"],[1,"field-row"],[1,"raised","primary",3,"unit"],["type","range",3,"ngModelChange","min","max","disabled","ngModel","ngModelOptions"],["label","label","value","value",3,"options","isClearable"],["type","text",3,"ngModelChange","ngModel"],["href","#"],["label","label","value","value",3,"options","isLoading"],[1,"advanced-settings"],["for","password"],["type","password","name","password","autocomplete","disabled","placeholder",ve,"tabindex","1",3,"ngModelChange","ngModel"],["for","repeatPassword"],["type","password","name","repeatPassword","autocomplete","disabled","placeholder",be,"tabindex","2",3,"ngModelChange","disabled","ngModel"],["suffix","",1,"spk-success"],["suffix",""],["spk-button","",3,"click"],["spk-button","",1,"raised","primary",3,"loader"],["spk-button","","spkTooltip",ie,1,"raised","primary",3,"loader","disabled"],["spk-button","",1,"raised","primary",3,"click"],["spk-button","","spkTooltip",ie,1,"raised","primary",3,"click","disabled"],[1,"spk-success"],["for","allowedHostnames"],["type","text","id","allowedHostnames",3,"ngModelChange","ngModel"],["type","primary"]]},template:function(t,n){if(t&1&&(I(0,"app-status-bar"),i(1,"div",40)(2,"header")(3,"div",41)(4,"h2"),l(5,0),o(),i(6,"p"),l(7,1),o()()(),i(8,"section")(9,"div",42)(10,"h3"),l(11,2),o(),i(12,"p"),O(13),o()(),i(14,"div",43),I(15,"app-remote-control"),o()(),i(16,"section")(17,"div",42)(18,"h3"),l(19,3),o(),i(20,"p"),l(21,4),o()(),i(22,"div",43)(23,"div",44)(24,"img",45),S("click",function(){return n.setLightMode()}),o(),i(25,"img",46),S("click",function(){return n.setDarkMode()}),o()()()(),i(26,"section")(27,"div",42)(28,"h3"),l(29,5),o(),i(30,"p"),l(31,6),o()(),i(32,"div",47),f(33,kt,15,7)(34,Ft,4,1,"div",48),o()(),i(35,"section")(36,"div",42)(37,"h3"),l(38,7),o(),i(39,"p"),l(40,8),o()(),i(41,"div",43)(42,"spk-select",49)(43,"input",50),S("ngModelChange",function(_){return n.updateLocale(_)}),o()()()(),i(44,"section")(45,"div",42)(46,"h3"),l(47,9),o(),i(48,"p"),l(49,10),o()(),i(50,"div",51)(51,"spk-toggle",52),S("click",function(){return n.updateRemoteAccess()}),i(52,"label"),l(53,11),o()(),f(54,xt,8,3),o()(),i(55,"section")(56,"div",42)(57,"h3"),l(58,12),o(),i(59,"p"),l(60,13),o()(),i(61,"div",43)(62,"spk-toggle",52),S("click",function(){return n.saveDisableTrayIconLogin()}),i(63,"label"),l(64,14),o()()()(),i(65,"section")(66,"div",42)(67,"h3"),l(68,15),o(),i(69,"p"),f(70,Dt,1,1),o(),f(71,Xt,1,0,"spk-progress-bar",53),o(),i(72,"div",54)(73,"div",55),S("click",function(){return n.setNewChannel("")}),i(74,"spk-radio",56),l(75,16),o(),i(76,"p"),l(77,17),o()(),i(78,"div",55),S("click",function(){return n.setNewChannel("stable")}),i(79,"spk-radio",56),l(80,18),o(),i(81,"p"),l(82,19),o()(),i(83,"div",55),S("click",function(){return n.setNewChannel("beta")}),i(84,"spk-radio",56),l(85,20),o(),i(86,"p"),l(87,21),o()(),i(88,"div",55),S("click",function(){return n.setNewChannel("experimental")}),i(89,"spk-radio",56),l(90,22),o(),i(91,"p"),l(92,23),o()(),i(93,"div",55),S("click",function(){return n.setNewChannel("canary")}),i(94,"spk-radio",56),l(95,24),o(),i(96,"p"),l(97,25),o()()()()(),I(98,"spk-divider"),i(99,"div",40)(100,"section")(101,"div",42)(102,"h3"),l(103,26),o(),i(104,"p"),l(105,27),o()(),i(106,"div",43)(107,"div",57)(108,"spk-range-slider",58)(109,"input",59),A("ngModelChange",function(_){return G(n.timeValue,_)||(n.timeValue=_),_}),o()(),i(110,"spk-select",60)(111,"input",61),S("ngModelChange",function(_){return n.updateTimeType(_)}),o(),f(112,Vt,1,1,"ng-template"),o()()()(),i(113,"section")(114,"div",42)(115,"h3"),l(116,28),o(),i(117,"p"),X(118,29),I(119,"a",62)(120,"br")(121,"br"),V(),o()(),i(122,"div",43)(123,"spk-select",63)(124,"input",50),S("ngModelChange",function(_){return n.updateUsageStatistics(_)}),o(),f(125,zt,1,1,"ng-template"),o()()()(),i(126,"div",40)(127,"section")(128,"div",64)(129,"h3"),l(130,30),o(),I(131,"app-advanced-options-settings"),o()()()),t&2){let a,_,T;r(13),z(n.remoteControlStatus()),r(11),N("active",!n.isDarkMode()),r(),N("active",n.isDarkMode()),r(8),C(n.showPassphraseForm()?33:34),r(9),h("options",n.languageOptions())("isClearable",!1)("inlineSearch",!0),r(),h("ngModel",n.langCtrl())("ngModelOptions",B(43,re)),r(8),N("active",n.allowRemoteAccess()),r(3),C(n.allowRemoteAccess()?54:-1),r(8),N("active",n.disableTrayIconLogin()),r(8),C(n.updateChannel()!==""&&((a=n.sysinfo())!=null&&a.ServerVersion)?70:-1),r(),C(n.updatingChannel()?71:-1),r(3),N("active",n.updateChannel()===""),r(),oe((_=n.sysinfo())==null?null:_.DefaultUpdateChannel),se(75),r(2),oe((T=n.sysinfo())==null?null:T.ServerVersionType),se(77),r(2),N("active",n.updateChannel()==="stable"),r(5),N("active",n.updateChannel()==="beta"),r(5),N("active",n.updateChannel()==="experimental"),r(5),N("active",n.updateChannel()==="canary"),r(14),h("unit",n.timeType()==="none"?"s":n.timeType()),r(),h("min",n.timeRange()[0])("max",n.timeRange()[1])("disabled",n.timeType()==="none"),y("ngModel",n.timeValue),h("ngModelOptions",B(44,re)),r(),h("options",n.timeTypeOptions())("isClearable",!1),r(),h("ngModel",n.timeType()),r(12),h("options",n.usageStatisticsOptions())("isLoading",n.updatingUsageStatistics()),r(),h("ngModel",n.usageStatistics())("ngModelOptions",B(45,re))}},dependencies:[Y,Q,pt,Z,J,ee,gt,ne,x,q,at,lt,st,_t,dt,j,W,ot,H,rt],styles:["[_nghost-%COMP%]{display:block}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 2rem 2rem}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem 0;position:sticky;top:0;background:var(--base-1);z-index:1000;border-bottom:1px solid var(--base-4)}header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}section[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem;padding:2rem 0;border-top:1px solid var(--base-4)}section[_ngcontent-%COMP%]:first-of-type{border-top:0}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;align-items:flex-start}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%] spk-button-group[_ngcontent-%COMP%]{margin-top:.25rem}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;width:50%}.passphrase-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:1rem}.passphrase-form[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.remote-access-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.themes[_ngcontent-%COMP%]{display:flex;gap:.5rem}.themes[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:240px;border-radius:var(--shape-3);cursor:pointer}.themes[_ngcontent-%COMP%] img.active[_ngcontent-%COMP%]{border:2px solid var(--primary-500)}.radios[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.radio-option[_ngcontent-%COMP%]{cursor:pointer}.radio-option[_ngcontent-%COMP%] spk-radio[_ngcontent-%COMP%]{color:var(--base-8);margin-bottom:.25rem}.radio-option[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;color:var(--base-9)}.field-col[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.field-row[_ngcontent-%COMP%]{display:flex;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] spk-form-field[_ngcontent-%COMP%], .field-row[_ngcontent-%COMP%] spk-select[_ngcontent-%COMP%]{flex:1 0}.advanced-settings[_ngcontent-%COMP%]{grid-column:1/-1;display:grid;grid-template-columns:auto 1fr;gap:1rem}"],changeDetection:0})};export{Ut as debounceSignal,_e as default};
|
package/chunk-PKRMVTCU.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as a,k as b}from"./chunk-RXHYUPYG.js";import"./chunk-KHGD372Q.js";import"./chunk-LDJVMU7P.js";import"./chunk-LJDOQTEF.js";import"./chunk-B64M2BXZ.js";import"./chunk-NF3MS2YP.js";import"./chunk-XR4SRVOQ.js";import"./chunk-WZRSQ7XL.js";import"./chunk-3AIKVVWP.js";import"./chunk-RHW5QVAY.js";import"./chunk-5ENRUF35.js";import"./chunk-5LKXKKAK.js";import"./chunk-HFNFJ7G2.js";import"./chunk-AL5KGNEF.js";import"./chunk-FRSQ5NDX.js";import"./chunk-M3WT5B3C.js";import"./chunk-AHUC7M75.js";import"./chunk-7CGTOI24.js";export{a as createSourceDataForm,b as default};
|
package/chunk-QVNFX6ZC.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-7CGTOI24.js";var o=[{path:"",loadComponent:()=>import("./chunk-CH7FSO4Y.js"),children:[{path:"",redirectTo:"stored",pathMatch:"full"},{path:"stored",loadComponent:()=>import("./chunk-XWF632WO.js")},{path:"live",loadComponent:()=>import("./chunk-3GGSYR5J.js")}]}],t=o;export{t as default};
|
package/chunk-RKAIZDDW.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a}from"./chunk-2P3DXYGR.js";import"./chunk-TCDECRYI.js";import"./chunk-AHUC7M75.js";import"./chunk-7CGTOI24.js";export{a as DurationFormatPipe};
|
package/chunk-RSZISHXB.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{ua as m}from"./chunk-M3WT5B3C.js";import{Z as s,jb as p}from"./chunk-AHUC7M75.js";var f=class a{decimalPipe=s(m);transform(t,e=!1){if(!t||t===0||(typeof t=="string"&&(t=parseInt(t)),isNaN(t)))return"";let r=this.#t(),n=r?["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"]:["Bytes","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],i=Math.floor(Math.log(t)/Math.log(r?1e3:1024));i=Math.min(i,n.length-1);let l=t/Math.pow(r?1e3:1024,i),o=this.decimalPipe.transform(l,"1.0-2");return o?`${o} ${e?n[i]:n[i].replace("Bytes","B")}`:""}#t(){if(navigator.userAgentData?.platform.toLowerCase().includes("mac"))return!0;let t=["mac","macintosh","os x","apple"],e=((navigator.userAgent||navigator.platform||navigator.vendor)??"").toLowerCase();return e?t.some(r=>e.includes(r)):!1}static \u0275fac=function(e){return new(e||a)};static \u0275pipe=p({name:"bytes",type:a,pure:!0})};export{f as a};
|
package/chunk-RXHYUPYG.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{a as jt,b as qt}from"./chunk-KHGD372Q.js";import{a as mt}from"./chunk-LDJVMU7P.js";import{a as Ke}from"./chunk-LJDOQTEF.js";import{a as dt,b as ht,c as ut}from"./chunk-B64M2BXZ.js";import{a as Wt,b as At,c as Ht}from"./chunk-NF3MS2YP.js";import{a as he}from"./chunk-XR4SRVOQ.js";import{a as Re}from"./chunk-WZRSQ7XL.js";import{a as q}from"./chunk-3AIKVVWP.js";import{a as zt,b as Ie,c as ie,d as ve,e as oe,f as Le,g as ct,h as ge,i as be,j as Ge,m as _t,n as Ue,o as pt,p as Xt,q as Ve,r as Ce,s as Te,t as Be}from"./chunk-5ENRUF35.js";import{b as me,d as se}from"./chunk-5LKXKKAK.js";import{A as we,C as st,a as ne,b as at,d as Bt,e as $e,g as Fe,l as le,o as Kt,p as rt,t as ce}from"./chunk-AL5KGNEF.js";import{h as lt}from"./chunk-FRSQ5NDX.js";import{ia as Vt}from"./chunk-M3WT5B3C.js";import{$a as ye,$b as vt,Ab as J,Bb as ee,Cb as te,Cc as Ze,Db as s,Eb as r,F as We,Fb as m,Gb as B,Hb as K,Ib as He,Jb as R,Pb as E,Pc as $,Qb as D,Qc as xe,Rb as O,Sb as it,T as Pe,Tb as ot,Ua as l,Ub as Ee,Vb as S,Wb as _,Xb as Rt,Yb as It,Z as P,cc as Lt,dc as bt,ea as d,ec as Gt,f as nt,fa as u,gb as Z,gc as Oe,hc as ke,ic as ae,jc as F,ka as $t,kc as Me,lb as g,lc as z,mc as Dt,oc as L,pc as b,qc as G,ra as Et,rc as je,sa as Ne,sc as De,tb as wt,tc as x,ub as p,uc as Ut,va as T,vc as qe,wb as ue,wc as Qe,yc as Ye,zb as f}from"./chunk-AHUC7M75.js";import{a as H,b as de,c as xt}from"./chunk-7CGTOI24.js";var nn=["fileInput"],on=[[["label"]]],an=["label"],Ft=class o{customId=Ne();content=T("");readonly=T(!1);placeholder=Ne("Drop a file here or use the browse button");fileInputRef;onFileSelected(t){let e=t.target;e.files&&e.files.length>0&&this.readFile(e.files[0])}onFileDrop(t){t.preventDefault(),t.dataTransfer?.files&&t.dataTransfer.files.length>0&&this.readFile(t.dataTransfer.files[0])}onDragOver(t){t.preventDefault()}readFile(t){let e=new FileReader;e.onload=()=>{this.content.set(e.result)},e.readAsText(t)}triggerBrowse(){return this.fileInputRef.nativeElement.click(),!1}onChange=()=>{};onTouched=()=>{};onChangeEffect=xe(()=>{this.onChange(this.content())});writeValue(t){this.content.set(t)}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.readonly.set(t)}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=Z({type:o,selectors:[["app-file-drop-textarea"]],viewQuery:function(e,n){if(e&1&&Lt(nn,5),e&2){let i;bt(i=Gt())&&(n.fileInputRef=i.first)}},inputs:{customId:[1,"customId"],placeholder:[1,"placeholder"]},features:[Ut([{provide:zt,useExisting:o,multi:!0}])],ngContentSelectors:an,decls:9,vars:3,consts:()=>{let t;return t=$localize`${"\uFFFD#4\uFFFD"}:START_TAG_SPK_ICON:upload${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["fileInput",""],t,[1,"browse-btn"],["spk-button","","type","button",1,"small","outlined",3,"click"],[1,"textarea-container","textarea-wrap",3,"drop","dragover"],["rows","10",3,"ngModelChange","placeholder","ngModel","disabled"],["type","file",1,"hidden",3,"change"]]},template:function(e,n){if(e&1){let i=R();Rt(on),It(0,0,["ngProjectAs","label",5,["label"]]),s(1,"div",2)(2,"button",3),S("click",function(){return d(i),u(n.triggerBrowse())}),E(3,1),m(4,"spk-icon"),D(),r()(),s(5,"div",4),S("drop",function(c){return d(i),u(n.onFileDrop(c))})("dragover",function(c){return d(i),u(n.onDragOver(c))}),s(6,"textarea",5),G("ngModelChange",function(c){return d(i),b(n.content,c)||(n.content=c),u(c)}),r()(),s(7,"input",6,0),S("change",function(c){return d(i),u(n.onFileSelected(c))}),r()}e&2&&(l(6),p("placeholder",n.placeholder()),L("ngModel",n.content),p("disabled",n.readonly()))},dependencies:[Te,ie,oe,ge,ne,Fe],styles:['[_nghost-%COMP%]{display:grid;grid-template-areas:"label browsebtn" "input input";grid-template-columns:8fr 1fr;gap:.5rem;align-items:flex-end}[_nghost-%COMP%] .browse-btn[_ngcontent-%COMP%]{grid-area:browsebtn}[_nghost-%COMP%] .label[_ngcontent-%COMP%]{grid-area:label;grid-column:1/-1}[_nghost-%COMP%] .textarea-wrap[_ngcontent-%COMP%]{grid-area:input;width:100%;border:none;font:var(--code-20)}[_nghost-%COMP%] .textarea-wrap[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:100%;color:var(--base-8);background-color:var(--base-1);border:1px solid var(--base-4);border-radius:var(--shape-3);padding:.5rem;resize:vertical;box-shadow:var(--box-shadow-10)}[_nghost-%COMP%] .textarea-wrap[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%] .dark[_ngcontent-%COMP%]{background-color:var(--base-2)}[_nghost-%COMP%] .hidden[_ngcontent-%COMP%]{display:none}'],changeDetection:0})};var gt=class o{#n=P(lt);#t=P($e);#e=P(Re);testDestination(t,e,n){return this.#e.hasV2TestOperations()?this.testDestinationv2(t,e,n):this.testDestinationv1(t,e,n)}testDestinationv2(t,e,n){return new nt(i=>{this.#n.postApiV2DestinationTest({requestBody:{DestinationUrl:t,AutoCreate:!1,Options:null}}).subscribe({next:a=>{if(a.Success){i.next({action:"success",targetUrl:t,testAgain:!1,destinationIndex:e,anyFilesFound:!a.Data?.FolderIsEmpty,containsBackup:a.Data?.FolderContainsBackupFiles??void 0,containsEncryptedBackupFiles:a.Data?.FolderContainsEncryptedBackupFiles??void 0}),i.complete();return}this.handleGenericError(i,t,e,a.Error??"Unknown error")},error:a=>{let c=a?.error?.body;if(c?.Data?.FolderExists===!1||c?.StatusCode==="missing-folder"){n?this.handleMissingFolder(i,t,e):this.handleGenericError(i,t,e,$localize`The remote destination folder does not exist.`);return}if(c?.Data?.HostCertificate){this.handleMissingCertificate(i,t,e,c.Data?.HostCertificate);return}if(c?.Data?.ReportedHostKey){this.handleIncorrectKey(i,t,e,c.Data.ReportedHostKey,c.Data.AcceptedHostKey??null);return}this.handleGenericError(i,t,e,a?.message??"Unknown error")}})})}testDestinationv1(t,e,n){return new nt(i=>{this.#n.postApiV1RemoteoperationTest({requestBody:{path:t}}).subscribe({next:a=>{i.next({action:"success",targetUrl:t,testAgain:!1,destinationIndex:e}),i.complete()},error:a=>{this.handleDestinationErrorv1(a.message,t,e,n).subscribe(c=>{i.next(c)})}})})}handleMissingFolder(t,e,n){this.#t.open(q,{data:{title:$localize`Create folder`,message:$localize`The remote destination folder does not exist, do you want to create it?`,confirmText:$localize`Create folder`,cancelText:$localize`Cancel`},closed:i=>{i&&(this.#e.hasV2TestOperations()?this.#n.postApiV2DestinationTest({requestBody:{DestinationUrl:e,AutoCreate:!0,Options:null}}).subscribe({next:a=>{a.Success?this.handleFolderCreated(t,e,n):this.handleFolderCreateFailure(t,e,n,a.Error??$localize`Unknown error`)},error:a=>{this.handleFolderCreateFailure(t,e,n,a.message??$localize`Unknown error`)}}):this.#n.postApiV1RemoteoperationCreate({requestBody:{path:e}}).subscribe({next:()=>{this.handleFolderCreated(t,e,n)},error:a=>{this.handleFolderCreateFailure(t,e,n,a.message??$localize`Unknown error`)}}))}})}handleFolderCreateFailure(t,e,n,i){this.#t.open(q,{data:{title:$localize`Error creating folder`,message:$localize`The remote destination folder could not be created. ${i}`,confirmText:$localize`OK`,cancelText:null},closed:()=>{t.next({action:"generic-error",targetUrl:e,testAgain:!1,destinationIndex:n}),t.complete()}})}handleFolderCreated(t,e,n){this.#t.open(q,{data:{title:$localize`Folder created`,message:$localize`The remote destination folder was created successfully.`,confirmText:$localize`OK`,cancelText:null},closed:()=>{t.next({action:"test-again",targetUrl:e,testAgain:!0,destinationIndex:n}),t.complete()}})}reportNoAction(t,e,n){t.next({action:"generic-error",targetUrl:e,testAgain:!1,destinationIndex:n}),t.complete()}handleMissingCertificate(t,e,n,i){this.#t.open(q,{maxWidth:"500px",data:{title:$localize`Trust the certificate`,message:$localize`The server is using a certificate that is not trusted.
|
|
2
|
-
If this is a self-signed certificate, you can choose to trust this certificate.
|
|
3
|
-
The server reported the certificate hash: ${i}`,confirmText:$localize`Trust the certificate`,cancelText:$localize`Cancel`},closed:a=>{if(!a){this.reportNoAction(t,e,n);return}t.next({action:"trust-cert",targetUrl:e,testAgain:!0,certData:i,destinationIndex:n}),t.complete()}})}handleIncorrectKey(t,e,n,i,a){a?this.#t.open(q,{maxWidth:"500px",data:{title:$localize`The host key has changed`,message:$localize`The host key has changed, please check with the server administrator if this is correct,
|
|
4
|
-
otherwise you could be the victim of a MAN-IN-THE-MIDDLE attack.
|
|
5
|
-
Do you want to REPLACE your CURRENT host key ${a}
|
|
6
|
-
with the REPORTED host key: ${i}?`,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:c=>{if(!c){this.reportNoAction(t,e,n);return}t.next({action:"approve-host-key",targetUrl:e,testAgain:!0,reportedHostKey:i,destinationIndex:n}),t.complete()}}):this.#t.open(q,{maxWidth:"500px",data:{title:$localize`Approve host key?`,message:$localize`No certificate was specified, please verify that the reported host key is correct: ${i}`,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:c=>{if(!c){this.reportNoAction(t,e,n);return}t.next({action:"approve-host-key",targetUrl:e,testAgain:!0,reportedHostKey:i,destinationIndex:n}),t.complete()}})}handleGenericError(t,e,n,i){this.#t.open(q,{maxWidth:"500px",data:{title:$localize`Test connection failed`,message:i,cancelText:$localize`OK`},closed:a=>{t.next({action:"generic-error",targetUrl:e,testAgain:!1,destinationIndex:n}),t.complete()}})}handleDestinationErrorv1(t,e,n,i){return new nt(a=>{if(t==="missing-folder"){i?this.handleMissingFolder(a,e,n):this.handleGenericError(a,e,n,$localize`The remote destination folder does not exist.`);return}if(t.startsWith("incorrect-cert:")){let c=t.split("incorrect-cert:")[1];this.handleMissingCertificate(a,e,n,c);return}if(t.startsWith("incorrect-host-key:")){let c=t.split('incorrect-host-key:"')[1].split('",')[0],A=t.split('accepted-host-key:"')[1].split('",')[0];this.handleIncorrectKey(a,e,n,c,A);return}this.handleGenericError(a,e,n,t)})}static \u0275fac=function(e){return new(e||o)};static \u0275prov=Pe({token:o,factory:o.\u0275fac,providedIn:"root"})};var Ct=class o{fromString(t){if(!t)return null;let e=t.match(/(\d+)([smhDWMY])/);return e&&{value:parseInt(e[1]),unit:e[2]}}toString(t,e){return`${t}${e}`}static \u0275fac=function(e){return new(e||o)};static \u0275prov=Pe({token:o,factory:o.\u0275fac,providedIn:"root"})};var rn=["formRef"];function sn(o,t){o&1&&(s(0,"spk-alert",17),E(1,5),m(2,"spk-icon",26),D(),r())}function ln(o,t){if(o&1&&F(0),o&2){let e=t.$implicit;z(" ",e.DisplayName," ")}}function cn(o,t){if(o&1&&m(0,"spk-progress-bar",40),o&2){let e=_(3);ue("error",e.calculatePasswordStrength()===1)("warn",e.calculatePasswordStrength()===2)("primary",e.calculatePasswordStrength()===4)("success",e.calculatePasswordStrength()===5),p("value",e.calculatePasswordStrength()*(100/5))}}function _n(o,t){o&1&&(s(0,"span",35),O(1,10),r())}function pn(o,t){o&1&&(E(0,8,1),m(1,"spk-icon"),D())}function dn(o,t){o&1&&(E(0,8,2),m(1,"spk-icon"),D())}function un(o,t){o&1&&(E(0,11,1),m(1,"spk-icon",42),D())}function mn(o,t){o&1&&(E(0,11,2),m(1,"spk-icon"),D())}function Fn(o,t){if(o&1){let e=R();s(0,"button",41),S("click",function(){d(e);let i=_(3);return u(i.copyPassword())}),E(1,11),g(2,un,2,0)(3,mn,2,0),D(),r()}if(o&2){let e=_(3);l(2),f(e.copiedPassword()?2:3)}}function gn(o,t){o&1&&(s(0,"spk-alert",39),O(1,12),r())}function Cn(o,t){if(o&1){let e=R();s(0,"div",30)(1,"spk-form-field")(2,"label",31),E(3,7),m(4,"sup"),D(),r(),m(5,"input",32),r(),g(6,cn,1,9,"spk-progress-bar",33),s(7,"spk-form-field"),m(8,"input",34),g(9,_n,2,0,"span",35),r(),s(10,"div",36)(11,"button",37),S("click",function(){d(e);let i=_(2);return u(i.showPassword.set(!i.showPassword()))}),E(12,8),g(13,pn,2,0)(14,dn,2,0),D(),r(),s(15,"button",37),S("click",function(){d(e);let i=_(2);return u(i.generatePassword())}),E(16,9),m(17,"spk-icon"),D(),r(),g(18,Fn,4,1,"button",38),r(),g(19,gn,2,0,"spk-alert",39),r()}if(o&2){let e=_(2);l(5),p("type",e.showPassword()?"text":"password"),l(),f(e.generalForm.value.password?6:-1),l(2),p("type",e.showPassword()?"text":"password"),l(),f(e.generalForm.value.repeatPassword&&e.generalForm.value.repeatPassword!==e.generalForm.value.password?9:-1),l(4),f(e.showPassword()?13:14),l(5),f(e.showCopyPassword()?18:-1),l(),f(e.generalForm.value.password&&e.generalForm.value.password===e.generalForm.value.repeatPassword?19:-1)}}function Tn(o,t){if(o&1&&(s(0,"spk-select",27)(1,"label",28),O(2,6),r(),m(3,"input",29),g(4,ln,1,1,"ng-template"),r(),g(5,Cn,20,7,"div",30)),o&2){let e=_();p("options",e.encryptionOptions())("isClearable",!1),l(5),f(e.encryptionFieldSignal()!==""?5:-1)}}function fn(o,t){if(o&1&&(s(0,"button",24),E(1,13),m(2,"spk-icon"),D(),r()),o&2){let e=_();p("disabled",e.nameAndDescriptionValid()===!1)}}function Sn(o,t){if(o&1&&(s(0,"button",25),E(1,14),m(2,"spk-icon"),D(),r()),o&2){let e=_();p("disabled",e.generalForm.invalid||e.showCopyPassword()&&!e.copiedPassword())}}var ze=new Ce,Qt=(o={name:"",description:"",encryption:"",password:"",repeatPassword:""})=>ze.group({name:ze.control(o.name,[ve.required]),description:ze.control(o.description),encryption:ze.control(o.encryption,[Ht()]),password:ze.control(o.password,[At(t=>t?.value.encryption!=="",[ve.required])]),repeatPassword:ze.control(o.repeatPassword,[At(t=>t?.value.encryption!=="",[ve.required])])}),Nt={Key:"",DisplayName:"None"},Pt=class o{#n=P(se);#t=P(me);#e=P(Wt);#i=P(_e);#o=P(Re);formRef=ye.required("formRef");generalForm=this.#i.generalForm;generalFormSignal=this.#i.generalFormSignal;encryptionFieldSignal=this.#i.encryptionFieldSignal;encryptionOptions=this.#i.encryptionOptions;isNew=this.#i.isNew;showPassword=T(!1);copiedPassword=T(!1);showCopyPassword=T(!1);encryptionEffect=xe(()=>{this.encryptionFieldSignal()===""&&(this.copiedPassword.set(!1),this.showCopyPassword.set(!1))});nameAndDescriptionValid=$(()=>{let t=this.generalFormSignal(),e=this.generalForm.controls;return e?.name&&e.name.valid&&e?.description&&e.description.valid});calculatePasswordStrength=$(()=>{let e=this.generalFormSignal()?.password??"";return this.#e.calculatePasswordStrength(e)});ngOnInit(){this.formRef().nativeElement.focus()}exit(){this.#i.exit(!0)}async copyPassword(){let t=this.generalForm.controls.password.value;await this.#a(t??""),this.copiedPassword.set(!0)}async#a(t){try{await navigator.clipboard.writeText(t)}catch{try{let n=document.createElement("textarea");n.value=t,document.body.appendChild(n),n.select(),document.execCommand("copy"),document.body.removeChild(n)}catch(n){console.error("Failed to copy text: ",n)}}}displayFn(){let t=this.#o.systemInfo()?.EncryptionModules??[];return e=>{let n=[Nt,...t].find(i=>i.Key===e);return n?`${n.DisplayName}`:""}}generatePassword(){this.copiedPassword.set(!1);let t=this.#e.generate(16);this.generalForm.controls.password.setValue(t),this.generalForm.controls.repeatPassword.setValue(t),this.showCopyPassword.set(!0)}next(){this.#n.navigate(["destination"],{relativeTo:this.#t.parent})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=Z({type:o,selectors:[["app-general"]],viewQuery:function(e,n){e&1&&Oe(n.formRef,rn,5),e&2&&ke()},decls:21,vars:4,consts:()=>{let t;t=$localize`Your backup name`;let e;e=$localize`Your backup description`;let n;n=$localize`Remember to copy the password`;let i;i=$localize`General backup settings`;let a;a=$localize` Backup name ${"\uFFFD#8\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#8\uFFFD"}:CLOSE_SUPERSCRIPT:`;let c;c=$localize`Backup description`;let A;A=$localize`${"\uFFFD#18\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SPK_ICON: Exit `;let k;k=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:lock${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON: Encrypted backup `;let I;I=$localize`Encryption`;let V;V=$localize`Encryption`;let N;N=$localize`Password`;let w;w=$localize`Repeat password`;let U;U=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let j;j=$localize`${"\uFFFD*13:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:eye-slash${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: hide ${"\uFFFD/*13:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*14:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:eye${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: show ${"\uFFFD/*14:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,j=Ee(j);let Q;Q=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:password${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: Generate password `;let h;h=$localize`Passwords do not match`;let C;C=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SPK_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Copied password ${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SPK_ICON_1:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Copy password ${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,C=Ee(C);let v;v=$localize` Tip: Be sure to save your password. If you loose it you will lose access to your backups. `;let X;X=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let W;return W=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["formRef",""],i,a,c,A,k,V,U,j,Q,h,C,v,X,W,["autocomplete","off",3,"submit","formGroup"],[1,"title-30"],[1,"primary"],["for","backupName"],["type","text","tabindex","1","placeholder",t,"formControlName","name"],["for","backupDescription"],["id","backupDescription","tabindex","2","placeholder",e,"formControlName","description"],[1,"form-actions"],["type","button","spk-button","",3,"click"],["spk-button","","type","submit",1,"raised","primary",3,"disabled"],["spk-button","","type","submit","spkTooltip",n,1,"raised","primary",3,"disabled"],["icon",""],["value","Key","label","DisplayName",3,"options","isClearable"],["for","encryption"],["type","text","id","encryption","tabindex","3","placeholder",I,"formControlName","encryption"],[1,"passwords"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",N,"formControlName","password",3,"type"],[1,"raised",3,"error","warn","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",w,"formControlName","repeatPassword",3,"type"],["error",""],[1,"password-actions"],["spk-button","","type","button",1,"small",3,"click"],["spk-button","","type","button",1,"small","copy"],["type","primary"],[1,"raised",3,"value"],["spk-button","","type","button",1,"small","copy",3,"click"],[1,"spk-success"]]},template:function(e,n){if(e&1){let i=R();s(0,"form",15,0),S("submit",function(){return d(i),u(n.next())}),s(2,"h3",16),O(3,1),r(),g(4,sn,3,0,"spk-alert",17),s(5,"spk-form-field")(6,"label",18),E(7,2),m(8,"sup"),D(),r(),m(9,"input",19),r(),s(10,"spk-form-field")(11,"label",20),O(12,3),r(),m(13,"textarea",21),r(),g(14,Tn,6,3),s(15,"div",22)(16,"button",23),S("click",function(){return d(i),u(n.exit())}),E(17,4),m(18,"spk-icon"),D(),r(),g(19,fn,3,1,"button",24)(20,Sn,3,1,"button",25),r()()}if(e&2){let i;p("formGroup",n.generalForm),l(4),f(!n.isNew()&&((i=n.generalFormSignal())==null?null:i.encryption)!==""?4:-1),l(10),f(n.isNew()?14:-1),l(5),f(n.encryptionFieldSignal()===""||!n.isNew()?19:20)}},dependencies:[Be,be,ie,oe,Le,Ue,Ve,le,ce,Fe,ne,rt,at,st],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding-bottom:1.5rem}sup[_ngcontent-%COMP%]{padding:0 .125rem;color:var(--error-500)}.passwords[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.password-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.copy[_ngcontent-%COMP%] spk-icon.spk-success[_ngcontent-%COMP%]{color:var(--success-500)}"],changeDetection:0})};function En(o,t){if(o&1){let e=R();s(0,"div",24)(1,"spk-form-field")(2,"label",25),O(3,7),r(),s(4,"input",26,0),G("ngModelChange",function(i){d(e);let a=_();return b(a.scheduleFields.nextTime().time,i)||(a.scheduleFields.nextTime().time=i),u(i)}),S("focus",function(){d(e);let i=ae(5);return u(i.showPicker())}),r(),s(6,"spk-icon",27),F(7,"clock"),r()(),s(8,"spk-form-field"),m(9,"label",28),s(10,"input",29,1),G("ngModelChange",function(i){d(e);let a=_();return b(a.scheduleFields.nextTime().date,i)||(a.scheduleFields.nextTime().date=i),u(i)}),S("focus",function(){d(e);let i=ae(11);return u(i.showPicker())}),r(),s(12,"spk-icon",27),F(13,"calendar"),r()()(),s(14,"div",24)(15,"spk-form-field")(16,"label",30),O(17,8),r(),s(18,"input",31),G("ngModelChange",function(i){d(e);let a=_();return b(a.scheduleFields.runAgain().repeatValue,i)||(a.scheduleFields.runAgain().repeatValue=i),u(i)}),r()(),s(19,"spk-select",32)(20,"input",33),G("ngModelChange",function(i){d(e);let a=_();return b(a.scheduleFields.runAgain().repeatUnit,i)||(a.scheduleFields.runAgain().repeatUnit=i),u(i)}),r()()(),s(21,"app-toggle-card",34),B(22,35),O(23,9),K(),s(24,"div",36)(25,"spk-toggle",19),E(26,10),s(27,"input",20),G("ngModelChange",function(i){d(e);let a=_();return b(a.scheduleFields.runAgain().allowedDays.mon,i)||(a.scheduleFields.runAgain().allowedDays.mon=i),u(i)}),r(),D(),r(),s(28,"spk-toggle",19),E(29,11),s(30,"input",20),G("ngModelChange",function(i){d(e);let a=_();return b(a.scheduleFields.runAgain().allowedDays.tue,i)||(a.scheduleFields.runAgain().allowedDays.tue=i),u(i)}),r(),D(),r(),s(31,"spk-toggle",19),E(32,12),s(33,"input",20),G("ngModelChange",function(i){d(e);let a=_();return b(a.scheduleFields.runAgain().allowedDays.wed,i)||(a.scheduleFields.runAgain().allowedDays.wed=i),u(i)}),r(),D(),r(),s(34,"spk-toggle",19),E(35,13),s(36,"input",20),G("ngModelChange",function(i){d(e);let a=_();return b(a.scheduleFields.runAgain().allowedDays.thu,i)||(a.scheduleFields.runAgain().allowedDays.thu=i),u(i)}),r(),D(),r(),s(37,"spk-toggle",19),E(38,14),s(39,"input",20),G("ngModelChange",function(i){d(e);let a=_();return b(a.scheduleFields.runAgain().allowedDays.fri,i)||(a.scheduleFields.runAgain().allowedDays.fri=i),u(i)}),r(),D(),r(),s(40,"spk-toggle",19),E(41,15),s(42,"input",20),G("ngModelChange",function(i){d(e);let a=_();return b(a.scheduleFields.runAgain().allowedDays.sat,i)||(a.scheduleFields.runAgain().allowedDays.sat=i),u(i)}),r(),D(),r(),s(43,"spk-toggle",19),E(44,16),s(45,"input",20),G("ngModelChange",function(i){d(e);let a=_();return b(a.scheduleFields.runAgain().allowedDays.sun,i)||(a.scheduleFields.runAgain().allowedDays.sun=i),u(i)}),r(),D(),r()()()}if(o&2){let e=_();l(4),L("ngModel",e.scheduleFields.nextTime().time),l(6),L("ngModel",e.scheduleFields.nextTime().date),l(8),L("ngModel",e.scheduleFields.runAgain().repeatValue),l(),p("options",e.unitOptions)("isClearable",!1),l(),L("ngModel",e.scheduleFields.runAgain().repeatUnit),l(),p("disallowToggle",!0),l(6),L("ngModel",e.scheduleFields.runAgain().allowedDays.mon),l(3),L("ngModel",e.scheduleFields.runAgain().allowedDays.tue),l(3),L("ngModel",e.scheduleFields.runAgain().allowedDays.wed),l(3),L("ngModel",e.scheduleFields.runAgain().allowedDays.thu),l(3),L("ngModel",e.scheduleFields.runAgain().allowedDays.fri),l(3),L("ngModel",e.scheduleFields.runAgain().allowedDays.sat),l(3),L("ngModel",e.scheduleFields.runAgain().allowedDays.sun)}}var Dn=[{key:"s",label:$localize`Seconds`},{key:"m",label:$localize`Minutes`},{key:"h",label:$localize`Hours`},{key:"D",label:$localize`Days`},{key:"W",label:$localize`Weeks`},{key:"M",label:$localize`Months`},{key:"Y",label:$localize`Years`}],Ae={autoRun:!0,nextTime:{time:"13:00",date:new Date().toISOString().split("T")[0]},runAgain:{repeatValue:1,repeatUnit:"D",allowedDays:{mon:!1,tue:!1,wed:!1,thu:!1,fri:!1,sat:!1,sun:!1}}},yt=class o{#n=P(_e);#t=P(se);#e=P(me);unitOptions=Dn;scheduleFields=this.#n.scheduleFields;goBack(){this.#t.navigate(["source-data"],{relativeTo:this.#e.parent})}next(){this.#t.navigate(["options"],{relativeTo:this.#e.parent})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=Z({type:o,selectors:[["app-schedule"]],decls:16,vars:2,consts:()=>{let t;t=$localize`Schedule`;let e;e=$localize` Automatically run backups ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let n;n=$localize`If a date was missed, the job will run as soon as possible.`;let i;i=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let a;a=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let c;c=$localize`Next time`;let A;A=$localize`Run again every`;let k;k=$localize`Allowed days`;let I;I=$localize` Monday ${"\uFFFD#27\uFFFD\uFFFD/#27\uFFFD"}:TAG_INPUT:`;let V;V=$localize` Tuesday ${"\uFFFD#30\uFFFD\uFFFD/#30\uFFFD"}:TAG_INPUT:`;let N;N=$localize` Wednesday ${"\uFFFD#33\uFFFD\uFFFD/#33\uFFFD"}:TAG_INPUT:`;let w;w=$localize` Thursday ${"\uFFFD#36\uFFFD\uFFFD/#36\uFFFD"}:TAG_INPUT:`;let U;U=$localize` Friday ${"\uFFFD#39\uFFFD\uFFFD/#39\uFFFD"}:TAG_INPUT:`;let j;j=$localize` Saturday ${"\uFFFD#42\uFFFD\uFFFD/#42\uFFFD"}:TAG_INPUT:`;let Q;return Q=$localize` Sunday ${"\uFFFD#45\uFFFD\uFFFD/#45\uFFFD"}:TAG_INPUT:`,[["timeRef",""],["dateRef",""],t,e,n,i,a,c,A,k,I,V,N,w,U,j,Q,[1,"title-30"],[1,"toggle-wrap"],[1,"raised","primary"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","",1,"raised","primary",3,"click"],[1,"row-inputs"],["for","time"],["type","time","id","time",3,"ngModelChange","focus","ngModel"],["suffix",""],["for","date"],["type","date","id","date",3,"ngModelChange","focus","ngModel"],["for","repeatValue"],["type","number","id","repeatValue",3,"ngModelChange","ngModel"],["value","key","label","label",3,"options","isClearable"],["type","text","id","repeatUnit",3,"ngModelChange","ngModel"],[3,"disallowToggle"],["title",""],[1,"days-wrap"]]},template:function(e,n){e&1&&(s(0,"h3",17),O(1,2),r(),s(2,"div",18)(3,"spk-toggle",19),E(4,3),s(5,"input",20),G("ngModelChange",function(a){return b(n.scheduleFields.autoRun,a)||(n.scheduleFields.autoRun=a),a}),r(),D(),r(),s(6,"p"),O(7,4),r()(),g(8,En,46,14),s(9,"div",21)(10,"button",22),S("click",function(){return n.goBack()}),E(11,5),m(12,"spk-icon"),D(),r(),s(13,"button",23),S("click",function(){return n.next()}),E(14,6),m(15,"spk-icon"),D(),r()()),e&2&&(l(5),L("ngModel",n.scheduleFields.autoRun),l(3),f(n.scheduleFields.autoRun()?8:-1))},dependencies:[Te,ie,Ge,Ie,oe,ge,le,we,ne,Fe,ce,Ke],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem 2.5rem 1.5rem;display:flex;flex-direction:column;gap:1.5rem}.toggle-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.days-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};function hn(o,t){if(o&1&&(B(0,4),F(1),K()),o&2){let e,n=_();l(),Me((e=n.currentExpressionOption())==null?null:e.startsWith)}}function An(o,t){if(o&1&&(B(0,5),F(1),K()),o&2){let e,n=_();l(),Me((e=n.currentExpressionOption())==null?null:e.endsWith)}}var Pn=[{key:"Excludes folders where name contains",value:"-FolderName"},{key:"Excludes folder",value:"-Folder"},{key:"Excludes files where name contains",value:"-FileName"},{key:"Excludes file extension",value:"-Extension"},{key:"Excludes files where name matches regex",value:"-Regex"},{key:"Includes files where name matches regex",value:"+Regex"},{key:"Excludes file group",value:"-FileGroup"},{key:"Includes expression",value:"+Expression"},{key:"Excludes expression",value:"-Expression"},{key:"None",value:"-Unknown"}],Tt=class o{path=Ne.required();osType=Ne();pathChange=Et();remove=Et();internalPath=T("");pathType=T("-Expression");currentExpressionOption=$(()=>{let t=this.pathType();return this.expressionOptions().find(e=>e.value===t)});expressionOptions=$(()=>{let e=this.osType()==="Windows"?"\\":"/";return Pn.map(n=>n.value==="-Folder"||n.value==="+Folder"?de(H({},n),{startsWith:"",endsWith:""}):n.value==="-FolderName"||n.value==="+FolderName"?de(H({},n),{startsWith:"*",endsWith:`*${e}`}):n.value==="-FileName"||n.value==="+FileName"?de(H({},n),{startsWith:"[.*",endsWith:`[^\\${e}]*]`}):n.value==="-FileGroup"||n.value==="+FileGroup"?de(H({},n),{startsWith:"{",endsWith:"}"}):n.value==="-Regex"||n.value==="+Regex"?de(H({},n),{startsWith:"[",endsWith:"]"}):n.value==="-Extension"||n.value==="+Extension"?de(H({},n),{startsWith:"*.",endsWith:""}):de(H({},n),{startsWith:"",endsWith:""}))});pathEffect=xe(()=>{let t=this.path(),e=t.slice(1),n=t.startsWith("-")?"-":"+",i=this.osType()==="Windows",a=i?"\\":"/";e.startsWith("%")&&e.endsWith(a)||i&&e.slice(2).startsWith(a)&&e.endsWith(a)||e.startsWith(a)&&e.endsWith(a)?(this.pathType.set(`${n}Folder`),this.internalPath.set(e)):e.startsWith("*")&&e.endsWith(`*${a}`)?(this.pathType.set(`${n}FolderName`),this.internalPath.set(e.slice(1,-2))):e.startsWith("[.*")&&e.endsWith(`[^\\${a}]*]`)?(this.pathType.set(`${n}FileName`),this.internalPath.set(e.slice(3,-7))):e.startsWith("{")&&e.endsWith("}")?(this.pathType.set(`${n}FileGroup`),this.internalPath.set(e.slice(1,-1))):e.startsWith("[")&&e.endsWith("]")?(this.pathType.set(`${n}Regex`),this.internalPath.set(e.slice(1,-1))):e.startsWith("*.")?(this.pathType.set(`${n}Extension`),this.internalPath.set(e.slice(2))):(this.pathType.set(`${n}Expression`),this.internalPath.set(e))});updateFilter(){let t=this.internalPath(),e=this.currentExpressionOption();t!==""&&this.pathChange.emit(`${e?.value.slice(0,1)}${e?.startsWith??""}${t}${e?.endsWith??""}`)}removeFilter(){this.remove.emit()}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=Z({type:o,selectors:[["app-new-filter"]],inputs:{path:[1,"path"],osType:[1,"osType"]},outputs:{pathChange:"pathChange",remove:"remove"},decls:9,vars:6,consts:()=>{let t;return t=$localize`Select an option...`,[["value","value","label","key",3,"options","isClearable"],["type","text","placeholder",t,3,"ngModelChange","ngModel"],[1,"expression-input"],["type","text",3,"ngModelChange","ngModel"],["prefix",""],["suffix",""],[1,"filter-removal",3,"click"],[1,"spk-primary"]]},template:function(e,n){if(e&1&&(s(0,"spk-select",0)(1,"input",1),G("ngModelChange",function(a){return b(n.pathType,a)||(n.pathType=a),a}),S("ngModelChange",function(){return n.updateFilter()}),r()(),s(2,"spk-form-field",2)(3,"input",3),G("ngModelChange",function(a){return b(n.internalPath,a)||(n.internalPath=a),a}),S("ngModelChange",function(){return n.updateFilter()}),r(),g(4,hn,2,1,"ng-container",4)(5,An,2,1,"ng-container",5),r(),s(6,"div",6),S("click",function(){return n.removeFilter()}),s(7,"spk-icon",7),F(8,"x-circle"),r()()),e&2){let i,a;p("options",n.expressionOptions())("isClearable",!1),l(),L("ngModel",n.pathType),l(2),L("ngModel",n.internalPath),l(),f(!((i=n.currentExpressionOption())==null||i.startsWith==null)&&i.startsWith.length?4:-1),l(),f(!((a=n.currentExpressionOption())==null||a.endsWith==null)&&a.endsWith.length?5:-1)}},dependencies:[Te,ie,oe,ge,ce,le,ne],styles:["[_nghost-%COMP%]{display:grid;grid-template-columns:13.125rem 1fr 1.875rem;gap:.5rem;align-items:flex-end}.expression-input[_ngcontent-%COMP%]{--ff-suffix-bg: var(--base-2)}.filter-removal[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;justify-content:center;height:2.5rem;flex:0 0}"],changeDetection:0})};var Nn=["formRef"],Yt=()=>({standalone:!0});function yn(o,t){if(o&1){let e=R();s(0,"spk-form-field",42)(1,"input",43),G("ngModelChange",function(i){d(e);let a=_(2);return b(a.editingPath,i)||(a.editingPath=i),u(i)}),r()(),s(2,"button",44),S("click",function(){d(e);let i=_(2);return u(i.updatePath())}),s(3,"spk-icon"),F(4,"floppy-disk"),r()(),s(5,"button",44),S("click",function(){d(e);let i=_(2);return u(i.cancelEditPath())}),s(6,"spk-icon"),F(7,"x-bold"),r()()}if(o&2){let e=_(2);l(),L("ngModel",e.editingPath),p("ngModelOptions",qe(2,Yt))}}function On(o,t){if(o&1){let e=R();s(0,"spk-form-field",42),m(1,"input",45),r(),s(2,"button",44),S("click",function(){d(e);let i=_().$implicit,a=_();return u(a.editPath(i))}),s(3,"spk-icon"),F(4,"pen"),r()(),s(5,"button",44),S("click",function(){d(e);let i=_().$implicit,a=_();return u(a.removePath(i))}),s(6,"spk-icon"),F(7,"trash-simple"),r()()}if(o&2){let e=_().$implicit;wt("readonly",!0),l(),p("ngModel",e)("ngModelOptions",qe(3,Yt))}}function kn(o,t){if(o&1&&(s(0,"div",30),g(1,yn,8,3)(2,On,8,4),r()),o&2){let e=t.$implicit,n=_();l(),f(n.oldPath()===e?1:2)}}function Mn(o,t){if(o&1){let e=R();s(0,"app-new-filter",47),S("pathChange",function(i){let a=d(e).$index,c=_(2);return u(c.patchPathAt(i,a))})("remove",function(){let i=d(e).$index,a=_(2);return u(a.removePathAt(i))}),r()}if(o&2){let e,n=t.$implicit,i=_(2);p("path",n)("osType",(e=i.osType())!==null&&e!==void 0?e:"")}}function xn(o,t){if(o&1&&ee(0,Mn,1,2,"app-new-filter",46,J),o&2){let e=_();te(e.pathArray())}}function $n(o,t){if(o&1&&(s(0,"div",41)(1,"spk-form-field"),m(2,"input",48),r(),s(3,"spk-select",49),m(4,"input",50),r()()),o&2){let e=_();l(3),p("options",e.sizeOptions())("isClearable",!1)}}var pe=new Ce,wn=["Bytes","KB","MB","GB","TB","PB"],Zt=(o={path:"",filters:[],excludes:{hidden:!1,system:!1,temporary:!1,filesLargerThan:null}})=>pe.group({path:pe.control(o.path),excludes:pe.group({hidden:pe.control(o.excludes.hidden),system:pe.control(o.excludes.system),temporary:pe.control(o.excludes.temporary),filesLargerThan:pe.group({size:pe.control(null),unit:pe.control(null)})})}),Ot=class o{#n=P(_e);#t=P(se);#e=P(me);formRef=ye.required("formRef");sourceDataForm=this.#n.sourceDataForm;sourceDataFormSignal=this.#n.sourceDataFormSignal;newPathCtrl=new ct("");filesLargerThan=$(()=>this.sourceDataFormSignal()?.excludes?.filesLargerThan?.size!==null);sizeOptions=T(wn);osType=this.#n.osType;pathSignal=he(this.sourceDataForm.controls.path.valueChanges);pathArray=$(()=>this.pathSignal()?.split("\0").filter(t=>t.startsWith("-")||t.startsWith("+")||t==="___none___")??[]);nonFilterPaths=$(()=>this.pathSignal()?.split("\0").filter(t=>!t.startsWith("-")&&!t.startsWith("+")&&t!==""));oldPath=T(null);editingPath=T(null);addingNewPath=T(!1);editPath(t){this.oldPath.set(t),this.editingPath.set(t)}updatePath(){let t=this.oldPath(),e=this.editingPath();if(!t||!e||e===t){this.oldPath.set(null),this.editingPath.set(null);return}let n=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(n?.replace(t,e)??""),this.oldPath.set(null),this.editingPath.set(null)}cancelEditPath(){this.oldPath.set(null),this.editingPath.set(null)}removePath(t){let e=this.sourceDataForm.controls.path.value??"",n=e.indexOf(t);if(n===-1)return;let i=n===0?t:"\0"+t,a=e.replace(i,"");this.sourceDataForm.controls.path.setValue(a)}addFilter(t="-*"){let e=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(`${e}\0${t}`)}patchPathAt(t,e){let i=this.sourceDataForm.controls.path.value.split("\0").filter(c=>!c.startsWith("-")&&!c.startsWith("+")).join("\0"),a=this.pathArray().map((c,A)=>A===e?`${t}`:`${c}`).join("\0");this.sourceDataForm.controls.path.setValue(`${i}\0${a}`)}removePathAt(t){let n=this.sourceDataForm.controls.path.value.split("\0").filter(a=>!a.startsWith("-")&&!a.startsWith("+")).join("\0"),i=this.pathArray().filter((a,c)=>c!==t).join("\0");this.sourceDataForm.controls.path.setValue(`${n}\0${i}`)}getPath(){return this.sourceDataForm.value.path??null}toggleFilesLargerThan(){this.sourceDataForm.controls.excludes.value.filesLargerThan?.size===null?this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:50,unit:"MB"}):this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:null,unit:null})}addNewPath(){let t=this.sourceDataForm.controls.path.value,e=this.newPathCtrl.value;this.sourceDataForm.controls.path.setValue(`${t}\0${e}`),this.newPathCtrl.setValue("")}goBack(){this.#t.navigate(["destination"],{relativeTo:this.#e.parent})}next(){this.#t.navigate(["schedule"],{relativeTo:this.#e.parent})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=Z({type:o,selectors:[["app-source-data"]],viewQuery:function(e,n){e&1&&Oe(n.formRef,Nn,5),e&2&&ke()},decls:56,vars:12,consts:()=>{let t;t=$localize`Path`;let e;e=$localize`Add a direct path`;let n;n=$localize`Hidden files`;let i;i=$localize`System files`;let a;a=$localize`Temporary files`;let c;c=$localize`Source Data`;let A;A=$localize`Folder path`;let k;k=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let I;I=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let V;V=$localize`Paths`;let N;N=$localize`Add a path directly from your machine.`;let w;w=$localize`Filters`;let U;U=$localize`Customize your filters.`;let j;j=$localize`Add filter`;let Q;Q=$localize`Exclude`;let h;h=$localize`Choose if there’s any files you want to exclude.`;let C;C=$localize` Hidden files ${"\uFFFD#46\uFFFD\uFFFD/#46\uFFFD"}:TAG_INPUT:`;let v;v=$localize` System files ${"\uFFFD#49\uFFFD\uFFFD/#49\uFFFD"}:TAG_INPUT:`;let X;X=$localize` Temporary files ${"\uFFFD#52\uFFFD\uFFFD/#52\uFFFD"}:TAG_INPUT:`;let W;W=$localize` Files larger than `;let y;y=$localize`Edit path`;let re;return re=$localize`Select an option...`,[["formRef",""],c,A,k,I,V,N,w,U,j,Q,h,C,v,X,W,[3,"submit","formGroup"],[1,"left"],[1,"title-30"],[1,"fill",3,"multiSelect","startingPath","showFiles"],["for","path"],["type","text","id","path","tabindex","4","placeholder",t,"formControlName","path"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],[1,"right"],[3,"disallowToggle"],["title",""],["description",""],[1,"paths"],[1,"path"],[1,"row-inputs"],["type","text","placeholder",e,3,"formControl"],["spk-button","","type","button",1,"raised","primary",3,"click"],["type","button","spk-button","","action","",3,"click"],["formGroupName","excludes",3,"disallowToggle"],[1,"raised","primary"],["type","checkbox","placeholder",n,"formControlName","hidden"],["type","checkbox","placeholder",i,"formControlName","system"],["type","checkbox","placeholder",a,"formControlName","temporary"],[1,"raised","primary",3,"click"],["formGroupName","filesLargerThan",1,"row-inputs"],[1,"small"],["type","text","placeholder",y,3,"ngModelChange","ngModel","ngModelOptions"],["spk-button","","type","button",1,"small",3,"click"],["type","text",3,"ngModel","ngModelOptions"],[3,"path","osType"],[3,"pathChange","remove","path","osType"],["type","number","formControlName","size"],[3,"options","isClearable"],["type","text","formControlName","unit","placeholder",re]]},template:function(e,n){if(e&1){let i=R();s(0,"form",16,0),S("submit",function(){return d(i),u(n.next())}),s(2,"div",17)(3,"h3",18),O(4,1),r(),s(5,"app-file-tree",19)(6,"label",20),O(7,2),r(),m(8,"input",21),r(),s(9,"div",22)(10,"button",23),S("click",function(){return d(i),u(n.goBack())}),E(11,3),m(12,"spk-icon"),D(),r(),s(13,"button",24),E(14,4),m(15,"spk-icon"),D(),r()()(),s(16,"div",25)(17,"app-toggle-card",26),B(18,27),O(19,5),K(),s(20,"p",28),O(21,6),r(),s(22,"div",29),ee(23,kn,3,1,"div",30,J),s(25,"div",31)(26,"spk-form-field"),m(27,"input",32),r(),s(28,"button",33),S("click",function(){return d(i),u(n.addNewPath())}),s(29,"spk-icon"),F(30,"plus"),r()()()()(),s(31,"app-toggle-card",26),B(32,27),O(33,7),K(),s(34,"p",28),O(35,8),r(),s(36,"button",34),S("click",function(){return d(i),u(n.addFilter())}),O(37,9),r(),g(38,xn,2,0),r(),s(39,"app-toggle-card",35),B(40,27),O(41,10),K(),s(42,"p",28),O(43,11),r(),s(44,"spk-toggle",36),E(45,12),m(46,"input",37),D(),r(),s(47,"spk-toggle",36),E(48,13),m(49,"input",38),D(),r(),s(50,"spk-toggle",36),E(51,14),m(52,"input",39),D(),r(),s(53,"spk-toggle",40),S("click",function(){return d(i),u(n.toggleFilesLargerThan())}),O(54,15),r(),g(55,$n,5,2,"div",41),r()()()}if(e&2){let i;p("formGroup",n.sourceDataForm),l(5),p("multiSelect",!0)("startingPath",n.getPath())("showFiles",!0),l(12),p("disallowToggle",!0),l(6),te(n.nonFilterPaths()),l(4),p("formControl",n.newPathCtrl),l(4),p("disallowToggle",!0),l(7),f((i=n.pathSignal())!=null&&i.length?38:-1),l(),p("disallowToggle",!0),l(14),ue("active",n.filesLargerThan()),l(2),f(n.filesLargerThan()?55:-1)}},dependencies:[Te,be,ie,Ge,Ie,oe,Le,ge,Be,_t,Ue,Ve,pt,le,ne,Fe,we,ce,Tt,mt,Ke],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;width:100%;flex:1 0;overflow:hidden}form[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;flex:1 0;overflow:hidden}.right[_ngcontent-%COMP%], .left[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:1.5rem}.left[_ngcontent-%COMP%]{padding:2.5rem;overflow:hidden;border-right:1px solid var(--base-4)}.right[_ngcontent-%COMP%]{padding:2.5rem 1.5rem;overflow:auto}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}spk-divider[_ngcontent-%COMP%]{margin:.75rem 0}.row-inputs[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr min-content;gap:.25rem}.paths[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.path[_ngcontent-%COMP%]{display:grid;align-items:center;grid-template-columns:1fr min-content min-content;gap:.25rem}"],changeDetection:0})};var Jt="1W:1D,4W:1W,12M:1M",Se=new Ce,_e=class o{#n=P(se);#t=P(Re);#e=P($e);#i=P(lt);#o=P(Ct);generalForm=Qt();sourceDataForm=Zt();scheduleFields={autoRun:T(Ae.autoRun),nextTime:T(Ae.nextTime),runAgain:T(Ae.runAgain)};destinationForm=en();settings=T([]);optionsFields={remoteVolumeSize:T("50MB"),backupRetention:T("all"),backupRetentionTime:T(""),backupRetentionVersions:T(0),backupRetentionCustom:T("")};isDraft=T(!1);backupId=T(null);backupName=$(()=>this.generalFormSignal()?.name??"");isSubmitting=T(!1);finishedLoading=T(!1);backupDefaults=T(null);applicationOptions=T(null);isNew=$(()=>this.backupId()==="new");osType=$(()=>this.#t.systemInfo()?.OSType);selectedOptions=T([]);selectedAdvancedFormPair=T([]);destinationFormPair=T({oauthField:null,custom:[],dynamic:[],advanced:[]});notSelectedAdvancedFormPair=$(()=>{let t=this.destinationFormPair()?.advanced??[],e=this.selectedAdvancedFormPair()??[];return t.filter(n=>e.findIndex(i=>i.name===n.name)===-1)});selectedHttpOptions=T([]);notSelectedHttpOptions=$(()=>{let t=this.httpOptions(),e=this.selectedHttpOptions()??[];return t.filter(n=>e.findIndex(i=>i.name===n.name)===-1)});sourceDataFormSignal=he(this.sourceDataForm.valueChanges);destinationFormSignal=he(this.destinationForm.valueChanges);generalFormSignal=he(this.generalForm.valueChanges);encryptionFieldSignal=he(this.generalForm.controls.encryption.valueChanges);destinationOptions=$(()=>this.#t.backendModules()??[]);httpOptions=$(()=>this.#t.systemInfo()?.GenericModules?.find(t=>t.Key==="http-options")?.Options?.map(this.#a)??[]);advancedOptions=$(()=>this.#t.systemInfo()?.Options?.map(this.#a)??[]);#a(t){return{name:t.Name,type:t.Type,shortDescription:t.ShortDescription??void 0,longDescription:t.LongDescription??void 0,options:t.ValidValues}}encryptionOptions=$(()=>{let t=this.#t.systemInfo()?.EncryptionModules??[];return[Nt,...t]});nonSelectedOptions=$(()=>this.advancedOptions().sort((t,e)=>t?.name&&e?.name?t?.name.localeCompare(e?.name):0).filter(t=>this.selectedOptions()?.findIndex(e=>e.name===t.name)===-1));addOrUpdateAdvancedFormPairByName(t,e,n){let i=this.selectedAdvancedFormPair().find(a=>a.name===t);if(i)this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced.controls[i.name].setValue(n);else{let a=this.notSelectedAdvancedFormPair().find(c=>c.name===t);if(!a)return;this.addAdvancedFormPair(a,e,n)}}addAdvancedFormPairByName(t,e,n){let i=this.notSelectedAdvancedFormPair().find(a=>a.name===t);i&&this.addAdvancedFormPair(i,e,n)}addHttpOptionByName(t,e,n){let i=this.notSelectedHttpOptions().find(a=>a.name===t);i&&this.addHttpOption(i,e,n)}addAdvancedFormPair(t,e,n){let i=this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced,a=n??t.defaultValue;this.createFormField(i,t,a),this.selectedAdvancedFormPair.set([...this.selectedAdvancedFormPair(),t])}addHttpOption(t,e,n){let i=this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced,a=n??t.defaultValue;this.createFormField(i,t,a),this.selectedHttpOptions.set([...this.selectedHttpOptions(),t])}removeAdvancedFormPair(t,e){this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced.removeControl(t.name),this.selectedAdvancedFormPair().findIndex(i=>i.name===t.name)!==-1?this.selectedAdvancedFormPair.update(i=>(i=i.filter(a=>a.name!==t.name),i)):this.selectedHttpOptions.update(i=>(i=i.filter(a=>a.name!==t.name),i))}removeHttpOption(t,e){this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced.removeControl(t.name),this.selectedHttpOptions.update(n=>(n=n.filter(i=>i.name!==t.name),n))}submit(){this.isSubmitting.set(!0);let t=this.#l(),e=this.backupId();e==="new"||!e||this.isDraft()?this.#i.postApiV1Backups({requestBody:t}).pipe(We(()=>this.isSubmitting.set(!1))).subscribe({next:n=>{this.exit(!1)},error:n=>{}}):this.#i.putApiV1BackupById({id:e,requestBody:t}).pipe(We(()=>this.isSubmitting.set(!1))).subscribe({next:n=>{this.exit(!1)},error:n=>{}})}exit(t){if(!t){this.#_(),this.#n.navigate(["/"]);return}this.#e.open(q,{data:{title:$localize`Confirm exit?`,message:$localize`Are you sure you want to exit?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:e=>{e&&(this.#_(),this.#n.navigate(["/"]))}})}updateFieldsFromTargetUrl(t){this.#s(),setTimeout(()=>{this.#r(t)})}#s(){this.destinationFormPair.set({oauthField:null,custom:[],dynamic:[],advanced:[]}),this.selectedAdvancedFormPair.set([]),this.selectedHttpOptions.set([]),this.destinationForm.controls.destinations.clear(),this.destinationForm.reset()}mapSourceDataToForm(t){let e=t.Sources??"",n=t.Filters?.map(A=>`${A.Include?"":"-"}${A.Expression}`)??[],i=t.Settings?.find(A=>A.Name==="--exclude-files-attributes")?.Value??"",a=t.Settings?.find(A=>A.Name==="--skip-files-larger-than")??null,c={path:[...e,...n].join("\0"),excludes:{hiddenFiles:i.includes("hidden"),systemFiles:i.includes("system"),tempFiles:i.includes("temporary"),filesLargerThan:a?.Value?.toUpperCase()??null}};this.sourceDataForm.patchValue(c)}mapDestinationToForm(t){let e=t.TargetURL?ht(t.TargetURL):null;e&&this.addDestinationFormGroup(e.destinationType,{custom:e.custom,dynamic:e.dynamic,advanced:e.advanced},!0)}#r(t){let e=ht(t);e&&this.addDestinationFormGroup(e.destinationType,{custom:e.custom,dynamic:e.dynamic,advanced:e.advanced},!0)}mapGeneralToForm(t){let e=t.Settings?.find(c=>c.Name==="encryption-module"),n=t.Settings?.find(c=>c.Name==="passphrase")?.Value??"",i=e?.Value&&e.Value.length?e.Value:"",a={name:t.Name??"",description:t.Description??""};i&&i!==""&&(a.encryption=i),n&&n!==""&&(a.password=n,a.repeatPassword=n),this.generalForm.patchValue(a)}mapScheduleToForm(t){if(!t){this.scheduleFields.autoRun.set(!1);return}let e=this.#o.fromString(t.Repeat)??null,n=this.#p(t.Time);this.scheduleFields.autoRun.set(!0),this.scheduleFields.nextTime.update(i=>H(H({},i),n)),this.scheduleFields.runAgain.set({repeatValue:e?.value??1,repeatUnit:e?.unit??"D",allowedDays:{mon:t.AllowedDays?.includes("mon")??!1,tue:t.AllowedDays?.includes("tue")??!1,wed:t.AllowedDays?.includes("wed")??!1,thu:t.AllowedDays?.includes("thu")??!1,fri:t.AllowedDays?.includes("fri")??!1,sat:t.AllowedDays?.includes("sat")??!1,sun:t.AllowedDays?.includes("sun")??!1}})}mapOptionsToForms(t){let e=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than","dblock-size","passphrase","keep-time","keep-versions","retention-policy"],n=t.Settings?.filter(c=>!e.includes(c.Name)),i=t.Settings?.filter(c=>e.includes(c.Name));this.settings.set(n??[]),n?.forEach(c=>{if(c.Name==="encryption-module"&&this.isNew())return this.generalForm.controls.encryption.setValue(c.Value??"")});var a="all";i?.forEach(c=>{if(c.Name==="dblock-size"&&this.optionsFields.remoteVolumeSize.set(c.Value??"50MB"),c.Name==="keep-time"&&(c.Value??"")!=="")return a="time",this.optionsFields.backupRetentionTime.set(c.Value??"");if(c.Name==="keep-versions"&&(c.Value??"")!=="")return a="versions",this.optionsFields.backupRetentionVersions.set(c.Value?parseInt(c.Value):null);if(c.Name==="retention-policy"&&(c.Value??"")!=="")if(c.Value===Jt)a="smart";else return a="custom",this.optionsFields.backupRetentionCustom.set(c.Value??"")}),this.optionsFields.backupRetention.set(a)}getCurrentTargetUrl(){return this.#c(this.destinationForm.controls.destinations)}getScheduleFormValue(){return{autoRun:this.scheduleFields.autoRun(),nextTime:this.scheduleFields.nextTime(),runAgain:this.scheduleFields.runAgain()}}#l(){let t=this.generalForm.value,e=this.getScheduleFormValue(),n=this.sourceDataForm.value,a=this.destinationForm.value.destinations?.length?this.#c(this.destinationForm.controls.destinations):[],c=null;e.runAgain?.repeatUnit&&e.runAgain?.repeatValue&&(c=this.#o.toString(e.runAgain.repeatValue,e.runAgain.repeatUnit));let A=e.runAgain?.allowedDays?Object.entries(e.runAgain?.allowedDays).filter(([w,U])=>U).map(([w,U])=>w):[],k=n.path?.split("\0")??[],I=this.mapFormsToSettings(),V=Object.entries(n.excludes??{}).filter(([w,U])=>U&&w!=="filesLargerThan").map(([w])=>w),N=n.excludes?.filesLargerThan;return V.length&&I.push({Name:"--exclude-files-attributes",Value:V.join(",")}),N&&N.size!==null&&N.unit!==null&&I.push({Name:"--skip-files-larger-than",Value:`${N.size}${N.unit}`}),{Backup:{Name:t.name,Description:t.description,TargetURL:a[0]??null,Sources:k.filter(w=>!w.startsWith("-")),Settings:I,Filters:k.filter(w=>w.startsWith("-")).map((w,U)=>({Order:U,Include:!1,Expression:w.slice(1)}))},Schedule:e.autoRun?{Repeat:c,Time:e.nextTime?.date?new Date(`${e.nextTime.date}T${e.nextTime?.time||"00:00:00"}`).toISOString():null,AllowedDays:A}:null}}mapFormsToSettings(t=[]){let e=this.generalForm.value,n=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than","encryption-module","passphrase","keep-time","keep-versions","retention-policy","dblock-size"],i=[{Name:"--no-encryption",Value:"True"}];e.encryption!==""&&(i=[{Name:"encryption-module",Value:e.encryption??null},{Name:"passphrase",Value:e.password??null}]);let a=[{Name:"dblock-size",Value:this.optionsFields.remoteVolumeSize()}];switch(this.optionsFields.backupRetention()){case"time":a.push({Name:"keep-time",Value:this.optionsFields.backupRetentionTime()});break;case"versions":a.push({Name:"keep-versions",Value:this.optionsFields.backupRetentionVersions()?.toString()??""});break;case"custom":a.push({Name:"retention-policy",Value:this.optionsFields.backupRetentionCustom()});break;case"smart":a.push({Name:"retention-policy",Value:Jt});break}let c=[...t,...n],A=this.settings().filter(k=>!c.includes(k.Name)).map(k=>{let I=k.Value;return typeof k.Value=="number"&&(I=k.Value.toString()),typeof k.Value=="boolean"&&(I=k.Value?"True":"False"),{Name:k.Name,Value:I}});return[...i,...a,...A]}#c(t){return t.controls.map(e=>dt(e.value))}#p(t){if(!t||t?.indexOf("T")===-1)return{time:t??"13:00"};let e=new Date(t);return{time:`${(""+e.getHours()).padStart(2,"0")}:${(""+e.getMinutes()).padStart(2,"0")}`,date:e.toISOString().split("T")[0]}}createFormField(t,e,n){if(e.type==="Integer"){t.addControl(e.name,Se.control(n?parseInt(n):0));return}if(e.type==="Boolean"){t.addControl(e.name,Se.control(n==="true"||n==="True"));return}if(e.type==="Flags"){t.addControl(e.name,Se.control(n??""));return}if(e.type==="Timespan"||e.type==="DateTime"){t.addControl(e.name,Se.control(n,[ve.pattern(/([-+]?\d{1,3}[smhDWMY])+/)]));return}t.addControl(e.name,Se.control(n))}addDestinationFormGroup(t,e,n=!1){let i=ut.find(h=>h.customKey===t||h.key===t),a=i?.key,c=this.destinationOptions().find(h=>h.Key===a),A=this.httpOptions();if(!c||!c.Options)return;let k=i&&i.oauthField?i.oauthField:null,I=i&&i.customFields?i.customFields:{},V=i&&i.dynamicFields?i.dynamicFields:[],N=i&&i.advancedFields?i.advancedFields:[],w=i&&i.ignoredAdvancedFields?i.ignoredAdvancedFields:[];this.destinationFormPair.set({oauthField:k,custom:[],dynamic:[],advanced:[]});let U=Se.group({}),j=Se.group({}),Q=Se.group({});I&&Object.entries(I).forEach(([h,C],v)=>{let y=C,{formElement:X}=y,W=xt(y,["formElement"]);U.addControl(h,X(e?.custom[h])),this.destinationFormPair.update(re=>(re.custom.push(H({order:900+v},W)),re))});for(let h=0;h<c.Options.length;h++){let C=c.Options[h];if(C.Deprecated)continue;let v=V.find(X=>X===C.Name||C.Aliases?.includes(X.name)||X.name===C.Name);if(v){let X=C.Aliases?.indexOf(v.name)??-1,W=C.Aliases&&X>-1?C.Aliases[X]:C.Name,y=v&&typeof v!="string",re=y?v?.defaultValue??C.DefaultValue:C.DefaultValue,M={name:W,type:C.Type,shortDescription:C.ShortDescription??void 0,longDescription:C.LongDescription??void 0,options:C.ValidValues,order:900+h},Xe=y?H(H({},M),v):M,Y=e?.dynamic[W]??re??C.DefaultValue;this.createFormField(j,Xe,Y),this.destinationFormPair.update(Mt=>(Mt.dynamic.push(Xe),Mt))}else{if(w.find(Y=>Y===C.Name))continue;let W=N.find(Y=>Y===C.Name||Y.name===C.Name),y=W&&typeof W!="string",re=e?.advanced[C.Name],M=re??C.DefaultValue,Xe={name:C.Name,type:C.Type,shortDescription:C.ShortDescription??void 0,longDescription:C.LongDescription??void 0,options:C.ValidValues,defaultValue:M,order:900+h},tt=y?H(H({},Xe),W):Xe;n&&re&&(this.createFormField(Q,tt,M),this.selectedAdvancedFormPair.update(Y=>(Y.push(tt),Y))),this.destinationFormPair.update(Y=>(Y.advanced.push(tt),Y))}}for(let h=0;h<A.length;h++){let C=A[h],v=e?.advanced[C.name],X=v??C.defaultValue;n&&v&&(this.createFormField(Q,C,X),this.selectedHttpOptions.update(W=>(W.push(C),W)))}this.destinationFormPair.update(h=>({oauthField:h.oauthField,custom:h.custom.sort((C,v)=>C.order-v.order),dynamic:h.dynamic.sort((C,v)=>C.order-v.order),advanced:h.advanced.sort((C,v)=>C.order-v.order)})),this.destinationForm.controls.destinations.push(tn({key:i?.customKey??t,customGroup:U,dynamicGroup:j,advancedGroup:Q}))}#_(){this.generalForm.reset(),this.destinationForm.controls.destinations.clear(),this.destinationForm.reset(),this.sourceDataForm.reset(),this.scheduleFields.autoRun.set(Ae.autoRun),this.scheduleFields.nextTime.set(Ae.nextTime),this.scheduleFields.runAgain.set(Ae.runAgain),this.optionsFields.remoteVolumeSize.set("50MB"),this.optionsFields.backupRetention.set("all"),this.settings.set([])}static \u0275fac=function(e){return new(e||o)};static \u0275prov=Pe({token:o,factory:o.\u0275fac,providedIn:"root"})};var Rn=["formRef"],In=(o,t,e,n)=>({index:o,formView:t,formGroupName:"custom",destinationType:e,oauthField:n}),St=o=>({$implicit:o}),vn=(o,t,e,n)=>({index:o,formView:t,formGroupName:"dynamic",destinationType:e,oauthField:n}),Ln=(o,t,e,n)=>({index:o,formView:t,formGroupName:"advanced",destinationType:e,oauthField:n}),bn=(o,t,e,n)=>({index:o,formView:t,formGroupName:"advanced",asHttpOptions:!0,destinationType:e,oauthField:n}),Gn=()=>({maxWidth:"700px",width:"100%"});function Un(o,t){o&1&&(E(0,5,2),m(1,"spk-icon"),D())}function Vn(o,t){o&1&&O(0,5,3)}function Bn(o,t){if(o&1){let e=R();E(0,5,1),s(1,"button",21),S("click",function(){d(e);let i=_();return u(i.testDestination())}),g(2,Un,2,0)(3,Vn,1,0),r(),D()}if(o&2){let e=_();l(),ue("loader",e.testLoading())("success",e.successfulTest()),l(),f(e.successfulTest()?2:3)}}function Kn(o,t){if(o&1){let e=R();s(0,"p",27),S("click",function(){d(e);let i=_();return u(i.removeDestinationFormGroup(i.destinationCount()-1))}),E(1,8),m(2,"strong")(3,"br")(4,"span",28),D(),r()}if(o&2){let e,n=_();l(4),it((e=n.selectedDestinationType())==null?null:e.displayName),ot(1)}}function zn(o,t){if(o&1){let e=R();s(0,"div",34),S("click",function(){let i=d(e).$implicit,a=_(2);return u(a.addDestinationFormGroup(i.key))}),s(1,"h3"),F(2),r(),s(3,"p"),F(4),r()()}if(o&2){let e=t.$implicit;l(2),Me(e.displayName),l(2),Me(e.description)}}function Xn(o,t){if(o&1){let e=R();s(0,"button",35,1),S("click",function(){let i=d(e).$implicit,a=_(2);return u(a.addDestinationFormGroup(i.key))}),F(2),r()}if(o&2){let e=t.$implicit;l(2),z(" ",e.displayName," ")}}function Wn(o,t){if(o&1&&(s(0,"div",29),ee(1,zn,5,2,"div",30,J),r(),s(3,"spk-menu",31)(4,"button",32),O(5,9),r(),B(6,20),ee(7,Xn,3,1,"button",33,J),K(),r()),o&2){let e=_();l(),te(e.destinationTypeOptionsFocused()),l(2),p("searchable",!0),l(4),te(e.destinationTypeOptionsNotFocused())}}function Hn(o,t){o&1&&He(0)}function jn(o,t){if(o&1&&g(0,Hn,1,0,"ng-container",40),o&2){let e,n=t.$implicit,i=t.$index;_();let a=ae(29),c=_();p("ngTemplateOutlet",a)("ngTemplateOutletContext",Qe(7,St,Ye(2,In,i,n,(e=c.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,c.destinationFormPair().oauthField)))}}function qn(o,t){o&1&&He(0)}function Qn(o,t){if(o&1&&g(0,qn,1,0,"ng-container",40),o&2){let e,n=t.$implicit,i=t.$index;_();let a=ae(29),c=_();p("ngTemplateOutlet",a)("ngTemplateOutletContext",Qe(7,St,Ye(2,vn,i,n,(e=c.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,c.destinationFormPair().oauthField)))}}function Yn(o,t){if(o&1){let e=R();E(0,10,1),s(1,"button",35,1),S("click",function(){let i=d(e).$implicit,a=_(2);return u(a.addAdvancedFormPair(i,0))}),r(),D()}if(o&2){let e=t.$implicit;l(),it(e.name),ot(0)}}function Zn(o,t){o&1&&He(0)}function Jn(o,t){if(o&1&&g(0,Zn,1,0,"ng-container",40),o&2){let e,n=t.$implicit,i=t.$index;_();let a=ae(29),c=_();p("ngTemplateOutlet",a)("ngTemplateOutletContext",Qe(7,St,Ye(2,Ln,i,n,(e=c.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,c.destinationFormPair().oauthField)))}}function ei(o,t){if(o&1){let e=R();E(0,11,1),s(1,"button",35,1),S("click",function(){let i=d(e).$implicit,a=_(2);return u(a.addHttpOption(i,0))}),r(),D()}if(o&2){let e=t.$implicit;l(),it(e.name),ot(0)}}function ti(o,t){o&1&&He(0)}function ni(o,t){if(o&1&&g(0,ti,1,0,"ng-container",40),o&2){let e,n=t.$implicit,i=t.$index;_();let a=ae(29),c=_();p("ngTemplateOutlet",a)("ngTemplateOutletContext",Qe(7,St,Ye(2,bn,i,n,(e=c.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,c.destinationFormPair().oauthField)))}}function ii(o,t){if(o&1&&(s(0,"spk-icon",49),F(1,"question"),r()),o&2){let e=_(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function oi(o,t){if(o&1&&(s(0,"app-file-tree",43)(1,"label",48),F(2),g(3,ii,2,1,"spk-icon",49),r(),m(4,"input",50),r()),o&2){let e=_().$implicit,n=x(2),i=x(3),a=_(2);p("startingPath",a.getFormFieldValue(0,e.formGroupName,e.formView.name))("accepts",e.formView.accepts)("showFiles",!0)("hideShortcuts",!0)("showHiddenNodes",!0)("selectFiles",!0),l(),p("for",i),l(),z(" ",n," "),l(),f(e.formView.longDescription?3:-1),l(),p("id",i)("formControlName",e.formView.name)}}function ai(o,t){if(o&1&&(s(0,"spk-icon",49),F(1,"question"),r()),o&2){let e=_(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function ri(o,t){if(o&1&&(s(0,"app-file-tree",44)(1,"label",48),F(2),g(3,ai,2,1,"spk-icon",49),r(),m(4,"input",50),r()),o&2){let e=_().$implicit,n=x(2),i=x(3),a=_(2);p("hideShortcuts",!0)("startingPath",a.getFormFieldValue(0,e.formGroupName,e.formView.name)),l(),p("for",i),l(),z(" ",n," "),l(),f(e.formView.longDescription?3:-1),l(),p("id",i)("formControlName",e.formView.name)}}function si(o,t){if(o&1&&(s(0,"spk-icon",49),F(1,"question"),r()),o&2){let e=_(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function li(o,t){if(o&1&&(s(0,"spk-icon",54),F(1," link "),r()),o&2){_();let e=x(7),n=x(8);ue("error",e&&n==="error")("warn",e&&n==="warning"),p("spkTooltip",e)}}function ci(o,t){o&1&&(s(0,"spk-icon",53),F(1,"envelope"),r())}function _i(o,t){o&1&&(s(0,"spk-icon",53),F(1,"textbox"),r())}function pi(o,t){if(o&1&&(s(0,"spk-form-field")(1,"label",48),F(2),g(3,si,2,1,"spk-icon",49),r(),m(4,"input",51),je(5)(6)(7)(8),g(9,li,2,5,"spk-icon",52)(10,ci,2,0,"spk-icon",53)(11,_i,2,0,"spk-icon",53),r()),o&2){let e=_().$implicit,n=x(2),i=x(3),a=_(2);l(),p("for",i),l(),z(" ",n," "),l(),f(e.formView.longDescription?3:-1),l(),p("type",e.formView.type==="Email"?"email":"text")("id",i)("formControlName",e.formView.name);let c=a.getFormFieldValue(0,e.formGroupName,e.formView.name),A=a.hasDoubleLeadingSlashes(c);l(3),De(A&&(e.formView.doubleSlash==null?null:e.formView.doubleSlash.message)),l(),De(e.formView.doubleSlash==null?null:e.formView.doubleSlash.type),l(),f(e.formView.type==="Path"?9:e.formView.type==="Email"?10:11)}}function di(o,t){if(o&1){let e=R();s(0,"span",58),S("click",function(){d(e);let i=_(2).$implicit,a=_(2);return u(a.oauthStartTokenCreation(i.destinationType,i))}),F(1," AuthID "),r()}}function ui(o,t){o&1&&(s(0,"spk-icon",53),F(1,"password"),r())}function mi(o,t){if(o&1){let e=R();s(0,"spk-icon",59),S("click",function(){d(e);let i=_(2).$implicit;return u(i.formView.showPassword=!i.formView.showPassword)}),F(1," eye "),r()}}function Fi(o,t){if(o&1){let e=R();s(0,"spk-icon",59),S("click",function(){d(e);let i=_(2).$implicit;return u(i.formView.showPassword=!i.formView.showPassword)}),F(1," eye-slash "),r()}}function gi(o,t){if(o&1&&(s(0,"spk-form-field")(1,"label",48),F(2),r(),m(3,"input",55),g(4,di,2,0,"span",56)(5,ui,2,0,"spk-icon",53)(6,mi,2,0,"spk-icon",57)(7,Fi,2,0,"spk-icon",57),r()),o&2){let e=_().$implicit,n=x(2),i=x(3);l(),p("for",i),l(),z(" ",n," "),l(),p("type",e.formView.showPassword?"text":"password")("id",i)("formControlName",e.formView.name),l(),f(e.oauthField===e.formView.name?4:5),l(2),f(e.formView.showPassword?6:7)}}function Ci(o,t){if(o&1&&(s(0,"spk-icon",49),F(1,"question"),r()),o&2){let e=_(3).$implicit;p("spkTooltip",e.formView.longDescription)}}function Ti(o,t){if(o&1&&F(0),o&2){let e=_().$implicit;Dt(" ",e==null?null:e.key," (",e==null?null:e.value,") ")}}function fi(o,t){if(o&1&&F(0),o&2){let e=_().$implicit;z(" ",e," ")}}function Si(o,t){if(o&1&&g(0,Ti,1,2)(1,fi,1,1),o&2){let e=_(3).$implicit;f(e.formView.loadOptions?0:1)}}function Ei(o,t){if(o&1&&(s(0,"spk-select",60)(1,"label",48),F(2),g(3,Ci,2,1,"spk-icon",49),r(),m(4,"input",50),r(),g(5,Si,2,1,"ng-template",null,3,Ze)),o&2){let e=ae(6);_();let n=x(0),i=_().$implicit,a=x(2),c=x(3);p("options",n)("isClearable",!1)("optionTemplate",e),l(),p("for",c),l(),z(" ",a," "),l(),f(i.formView.longDescription?3:-1),l(),p("id",c)("formControlName",i.formView.name)}}function Di(o,t){if(o&1&&(je(0),g(1,Ei,7,8)),o&2){let e=_().$implicit,n=De(e.formView.loadOptions?e.formView.loadOptions(_(2).injector)():e.formView.options);l(),f(n?1:-1)}}function hi(o,t){if(o&1&&(s(0,"spk-icon",49),F(1,"question"),r()),o&2){let e=_(3).$implicit;p("spkTooltip",e.formView.longDescription)}}function Ai(o,t){if(o&1&&F(0),o&2){let e=t.$implicit;Dt(" ",e.key," ",e.value?"("+e.value+")":""," ")}}function Pi(o,t){if(o&1&&(s(0,"spk-select",62)(1,"label",48),F(2),g(3,hi,2,1,"spk-icon",49),r(),m(4,"input",50),r(),g(5,Ai,1,2,"ng-template",null,4,Ze)),o&2){let e=ae(6);_();let n=x(0),i=_().$implicit,a=x(2),c=x(3);p("options",n)("asFreeText",!0)("inlineSearch",!0)("optionTemplate",e),l(),p("for",c),l(),z(" ",a," "),l(),f(i.formView.longDescription?3:-1),l(),p("id",c)("formControlName",i.formView.name)}}function Ni(o,t){o&1&&m(0,"spk-progress-bar",61)}function yi(o,t){if(o&1&&(je(0),g(1,Pi,7,9)(2,Ni,1,0,"spk-progress-bar",61)),o&2){let e=_().$implicit,n=De(e.formView.loadOptions?e.formView.loadOptions(_(2).injector)():e.formView.options);l(),f(n?1:2)}}function Oi(o,t){if(o&1&&(s(0,"spk-icon",49),F(1,"question"),r()),o&2){let e=_(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function ki(o,t){if(o&1&&(s(0,"app-size",45)(1,"label",48),F(2),g(3,Oi,2,1,"spk-icon",49),r()()),o&2){let e=_().$implicit,n=x(2),i=x(3);p("inputType",e.Name)("formControlName",e.formView.name)("customId",i),l(),p("for",i),l(),z(" ",n," "),l(),f(e.formView.longDescription?3:-1)}}function Mi(o,t){if(o&1&&(s(0,"spk-icon",49),F(1,"question"),r()),o&2){let e=_(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function xi(o,t){if(o&1&&(s(0,"spk-form-field")(1,"label",48),F(2),g(3,Mi,2,1,"spk-icon",49),r(),m(4,"input",63),s(5,"spk-icon",53),F(6,"numpad"),r()()),o&2){let e=_().$implicit,n=x(2),i=x(3);l(),p("for",i),l(),z(" ",n," "),l(),f(e.formView.longDescription?3:-1),l(),p("id",i)("formControlName",e.formView.name)}}function $i(o,t){if(o&1&&(s(0,"spk-icon",49),F(1,"question"),r()),o&2){let e=_(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function wi(o,t){if(o&1&&(s(0,"spk-toggle",46)(1,"label",48),F(2),g(3,$i,2,1,"spk-icon",49),r(),m(4,"input",64),r()),o&2){let e=_().$implicit,n=x(2),i=x(3);l(),p("for",i),l(),z(" ",n," "),l(),f(e.formView.longDescription?3:-1),l(),p("id",i)("formControlName",e.formView.name)}}function Ri(o,t){if(o&1&&(s(0,"spk-icon",49),F(1,"question"),r()),o&2){let e=_(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function Ii(o,t){if(o&1&&F(0),o&2){let e=t.$implicit;z(" ",e," ")}}function vi(o,t){if(o&1&&(s(0,"spk-select",65)(1,"label",48),F(2),g(3,Ri,2,1,"spk-icon",49),r(),m(4,"input",66),r(),g(5,Ii,1,1,"ng-template",null,4,Ze)),o&2){let e=ae(6),n=_().$implicit,i=x(2);p("options",n.formView.options)("selectMultiple",!0)("optionTemplate",e),l(),vt("for","destination-",n.formGroupName,"-",n.index,""),l(),z(" ",i," "),l(),f(n.formView.longDescription?3:-1),l(),p("formControlName",n.formView.name)}}function Li(o,t){if(o&1&&(s(0,"spk-icon",49),F(1,"question"),r()),o&2){let e=_(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function bi(o,t){if(o&1&&(s(0,"app-timespan",45)(1,"label",48),F(2),g(3,Li,2,1,"spk-icon",49),r()()),o&2){let e=_().$implicit,n=x(2),i=x(3);p("inputType",e.formView.name)("formControlName",e.formView.name)("customId",i),l(),p("for",i),l(),z(" ",n," "),l(),f(e.formView.longDescription?3:-1)}}function Gi(o,t){if(o&1&&(s(0,"spk-icon",49),F(1,"question"),r()),o&2){let e=_(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function Ui(o,t){if(o&1&&(s(0,"app-file-drop-textarea",47)(1,"label"),F(2),g(3,Gi,2,1,"spk-icon",49),r()()),o&2){let e,n=_().$implicit,i=x(3);p("formControlName",n.formView.name)("customId",i)("placeholder",n.formView.longDescription),l(2),z(" ",(e=n.formView.shortDescription)!==null&&e!==void 0?e:n.formView.name," "),l(),f(n.formView.longDescription?3:-1)}}function Vi(o,t){if(o&1){let e=R();s(0,"button",67),S("click",function(){d(e);let i=_().$implicit,a=_(2);return u(a.removeFormView(i.formView,0))}),s(1,"spk-icon"),F(2,"x-circle"),r()()}}function Bi(o,t){if(o&1&&(s(0,"div",41),B(1,42),je(2)(3),g(4,oi,5,11,"app-file-tree",43)(5,ri,5,7,"app-file-tree",44)(6,pi,12,9,"spk-form-field")(7,gi,8,7,"spk-form-field")(8,Di,2,2)(9,yi,3,2)(10,ki,4,6,"app-size",45)(11,xi,7,5,"spk-form-field")(12,wi,5,5,"spk-toggle",46)(13,vi,7,9)(14,bi,4,6,"app-timespan",45)(15,Ui,4,5,"app-file-drop-textarea",47),K(),g(16,Vi,3,0,"button",32),r()),o&2){let e,n=t.$implicit;ue("single-field",n.formGroupName!=="advanced"),l(),p("formGroupName",n.formGroupName),l(),De((e=n.formView.shortDescription)!==null&&e!==void 0?e:n.formView.name),l(),De("destination-"+n.formGroupName+"-"+n.index+"-"+(n.asHttpOptions?"http":"other")),l(),f(n.formView.type==="FileTree"?4:n.formView.type==="FolderTree"?5:n.formView.type==="String"||n.formView.type==="Path"||n.formView.type==="Email"?6:n.formView.type==="Password"?7:n.formView.type==="Enumeration"?8:n.formView.type==="NonValidatedSelectableString"?9:n.formView.type==="Size"?10:n.formView.type==="Integer"?11:n.formView.type==="Boolean"?12:n.formView.type==="Flags"?13:n.formView.type==="Timespan"||n.formView.type==="DateTime"?14:n.formView.type==="FreeText"?15:-1),l(12),f(n.formGroupName==="advanced"?16:-1)}}function Ki(o,t){if(o&1&&(B(0,22)(1,36),ee(2,jn,1,9,"ng-container",null,J),ee(4,Qn,1,9,"ng-container",null,J),s(6,"app-toggle-card",37),B(7,38),E(8,10),s(9,"spk-menu",31)(10,"button",39),m(11,"spk-icon"),r(),B(12,20),ee(13,Yn,3,1,"button",33,J),K(),r(),D(),K(),ee(15,Jn,1,9,"ng-container",null,J),r(),s(17,"app-toggle-card",37),B(18,38),E(19,11),s(20,"spk-menu",31)(21,"button",39),m(22,"spk-icon"),r(),B(23,20),ee(24,ei,3,1,"button",33,J),K(),r(),D(),K(),ee(26,ni,1,9,"ng-container",null,J),r(),g(28,Bi,17,7,"ng-template",null,2,Ze),K()()),o&2){let e=_();l(2),te(e.destinationFormPair().custom),l(2),te(e.destinationFormPair().dynamic),l(2),p("disallowToggle",!0),l(3),p("searchable",!0),l(),p("disabled",e.notSelectedAdvancedFormPair().length===0),l(3),te(e.notSelectedAdvancedFormPair()),l(2),te(e.selectedAdvancedFormPair()),l(2),p("disallowToggle",!0),l(3),p("searchable",!0),l(),p("disabled",e.notSelectedHttpOptions().length===0),l(3),te(e.notSelectedHttpOptions()),l(2),te(e.selectedHttpOptions())}}function zi(o,t){if(o&1){let e=R();s(0,"spk-dialog",68),G("isOpenChange",function(i){d(e);let a=_();return b(a.targetUrlDialogOpen,i)||(a.targetUrlDialogOpen=i),u(i)}),s(1,"header",69)(2,"h2"),O(3,12),r(),s(4,"spk-alert",70),O(5,13),r()(),s(6,"div",71)(7,"spk-form-field"),m(8,"textarea",72),r()(),s(9,"footer",73)(10,"button",24),S("click",function(){d(e);let i=_();return u(i.closeTargetUrlDialog(!1))}),F(11,"Cancel"),r(),s(12,"button",74),S("click",function(){d(e);let i=_();return u(i.closeTargetUrlDialog(!0))}),E(13,14),m(14,"spk-icon"),D(),r()()()}if(o&2){let e=_();L("isOpen",e.targetUrlDialogOpen),p("options",qe(3,Gn)),l(8),p("formControl",e.targetUrlCtrl)}}var ft=new Ce,en=(o={destinations:[]})=>ft.group({destinations:ft.array(o.destinations)}),tn=({key:o,customGroup:t,dynamicGroup:e,advancedGroup:n})=>ft.group({destinationType:ft.control(o),custom:t,dynamic:e,advanced:n}),kt=class o{#n=P(se);#t=P(me);#e=P(_e);#i=P($e);#o=P(gt);injector=P($t);formRef=ye.required("formRef");destinationForm=this.#e.destinationForm;destinationFormPair=this.#e.destinationFormPair;selectedAdvancedFormPair=this.#e.selectedAdvancedFormPair;notSelectedAdvancedFormPair=this.#e.notSelectedAdvancedFormPair;selectedHttpOptions=this.#e.selectedHttpOptions;notSelectedHttpOptions=this.#e.notSelectedHttpOptions;destinationOptions=this.#e.destinationOptions;destinationFormSignal=this.#e.destinationFormSignal;destinationCount=$(()=>this.destinationFormSignal()?.destinations?.length??0);successfulTest=T(!1);testLoading=T(!1);destinationTypeOptionsInFocus=T(["file","ssh","s3","gcs","googledrive","azure"]);destinationTypeOptions=T(ut.map(t=>({key:t.customKey??t.key,customKey:t.customKey??null,displayName:t.displayName,description:t.description})));destinationTypeOptionsFocused=$(()=>{let t=this.destinationTypeOptionsInFocus(),e=this.destinationTypeOptions();return t.map(n=>e.find(i=>i.key===n))});selectedDestinationType=$(()=>{let t=this.destinationFormSignal();return this.destinationTypeOptions().find(n=>t?.destinations?.[0]?.destinationType===n.key)});destinationTypeOptionsNotFocused=$(()=>{let t=this.destinationTypeOptionsInFocus();return this.destinationTypeOptions().filter(n=>!t.includes(n.key))});getFormFieldValue(t,e,n){return((this.destinationForm.controls.destinations.controls?.[t]).controls?.[e]).controls[n].value}hasDoubleLeadingSlashes(t){return t.startsWith("//")}getFormControl(t,e,n){return((this.destinationForm.controls.destinations.controls?.[t]).controls?.[e]).controls[n]}addDestinationFormGroup(t){this.#e.addDestinationFormGroup(t)}addAdvancedFormPair(t,e){this.#e.addAdvancedFormPair(t,e)}removeFormView(t,e){this.#e.removeAdvancedFormPair(t,e)}addHttpOption(t,e){this.#e.addHttpOption(t,e)}targetUrl=$(()=>this.#e.getCurrentTargetUrl()[0]);targetUrlCtrl=new ct;targetUrlInitial=T(null);targetUrlDialogOpen=T(!1);openTargetUrlDialog(){let e=this.#e.getCurrentTargetUrl()[0];this.targetUrlCtrl.setValue(e),this.targetUrlInitial.set(e),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(t=!1){this.targetUrlDialogOpen.set(!1);let e=this.targetUrlCtrl.value,n=this.targetUrlInitial();!t||e===n||this.#e.updateFieldsFromTargetUrl(this.targetUrlCtrl.value)}testDestination(t=0){let n=this.#e.getCurrentTargetUrl()[t];n&&(this.testLoading.set(!0),this.#o.testDestination(n,t,!0).pipe(We(()=>this.testLoading.set(!1))).subscribe({next:i=>{if(i.action==="success"){this.#e.isNew()&&(i.containsBackup===!0?this.#i.open(q,{data:{title:$localize`Folder contains backup`,message:$localize`The remote destination already contains a backup. You must use a different folder for each backup.`,confirmText:$localize`OK`,cancelText:void 0}}):i.anyFilesFound===!0&&this.#i.open(q,{data:{title:$localize`Folder is not empty`,message:$localize`The remote destination is not empty. It is recommended to use an empty folder for the backup.`,confirmText:$localize`OK`,cancelText:void 0}})),this.successfulTest.set(!0),setTimeout(()=>{this.successfulTest.set(!1)},3e3);return}if(i.action==="generic-error"){this.successfulTest.set(!1);return}i.action==="trust-cert"&&this.#e.addHttpOptionByName("accept-specified-ssl-hash",i.destinationIndex,i.certData),i.action==="approve-host-key"&&this.#e.addOrUpdateAdvancedFormPairByName("ssh-fingerprint",i.destinationIndex,i.reportedHostKey),i.testAgain&&this.testDestination(i.destinationIndex)}}))}mapToTargetUrl(t){return dt(t.value)}removeDestinationFormGroup(t){this.destinationForm.controls.destinations.removeAt(t)}displayFn(t){let e=this.destinationOptions().find(n=>n.Key===t);return e?`${e.DisplayName}`:""}goBack(){this.#n.navigate(["general"],{relativeTo:this.#t.parent})}next(){this.#n.navigate(["source-data"],{relativeTo:this.#t.parent})}#a=T("https://duplicati-oauth-handler.appspot.com/").asReadonly();#s=T(Math.random().toString(36).substring(2)+Math.random().toString(36).substring(2)).asReadonly();#r=T(!1);#l=T(null);keyCreation(){}oauthStartTokenCreation(t,e){let n=this.getFormControl(e.index,e.formGroupName,e.formView.name);this.#r.set(!0);let i=this.#s(),a=450,c=600,A=this.#a()+"?type="+t+"&token="+i,k=screen.width/2-a/2,I=screen.height/2-c/2,V=window.open(A,"_blank","height="+c+",width="+a+",menubar=0,status=0,titlebar=0,toolbar=0,left="+k+",top="+I);return window.addEventListener("message",N=>{let w=N.data.startsWith("authid:"),U=w?N.data.replace("authid:",""):null;console.log("event",N),w&&(n.setValue(U),this.#r.set(!1),V?.close())}),!1}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=Z({type:o,selectors:[["app-destination"]],viewQuery:function(e,n){e&1&&Oe(n.formRef,Rn,5),e&2&&ke()},decls:24,vars:6,consts:()=>{let t;t=$localize` Backup destination ${"\uFFFD#5\uFFFD"}:START_TAG_DIV:${"\uFFFD*6:1\uFFFD"}:START_BLOCK_IF_1:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON:${"\uFFFD*2:2\uFFFD"}:START_BLOCK_IF: Connected ${"[\uFFFD#1:2\uFFFD|\uFFFD#9\uFFFD|\uFFFD#12\uFFFD]"}:START_TAG_SPK_ICON:check${"[\uFFFD/#1:2\uFFFD|\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/*2:2\uFFFD|\uFFFD/*6:1\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*3:3\uFFFD"}:START_BLOCK_ELSE: Test destination ${"\uFFFD/*3:3\uFFFD"}:CLOSE_BLOCK_ELSE:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD]"}:CLOSE_TAG_BUTTON:${"[\uFFFD/*2:2\uFFFD|\uFFFD/*6:1\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD#7\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#8\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#1:2\uFFFD|\uFFFD#9\uFFFD|\uFFFD#12\uFFFD]"}:START_TAG_SPK_ICON:dots-three-vertical${"[\uFFFD/#1:2\uFFFD|\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#10\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD#11\uFFFD"}:START_TAG_BUTTON_2:${"[\uFFFD#1:2\uFFFD|\uFFFD#9\uFFFD|\uFFFD#12\uFFFD]"}:START_TAG_SPK_ICON:link${"[\uFFFD/#1:2\uFFFD|\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD]"}:CLOSE_TAG_SPK_ICON: Edit target URL ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SPK_MENU:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_DIV:`,t=Ee(t);let e;e=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let n;n=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let i;i=$localize` Current destination type ${"\uFFFD#2\uFFFD"}:START_TAG_STRONG:${"\uFFFD0\uFFFD"}:INTERPOLATION:.${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#3\uFFFD\uFFFD/#3\uFFFD"}:LINE_BREAK: Want to select another? ${"\uFFFD#4\uFFFD"}:START_TAG_SPAN:Click here${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SPAN:`;let a;a=$localize`Other destinations`;let c;c=$localize` Advanced options ${"\uFFFD#9\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#10\uFFFD"}:START_TAG_BUTTON: Add advanced option ${"\uFFFD#11\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#10\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#12\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD*14:1\uFFFD"}:START_BLOCK_FOR:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON_1: ${"\uFFFD0:1\uFFFD"}:INTERPOLATION: ${"[\uFFFD/#10\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/*14:1\uFFFD"}:CLOSE_BLOCK_FOR:${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_MENU:`,c=Ee(c);let A;A=$localize` Http options ${"\uFFFD#20\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#21\uFFFD"}:START_TAG_BUTTON: Add http option ${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#21\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#23\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD*25:1\uFFFD"}:START_BLOCK_FOR:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON_1: ${"\uFFFD0:1\uFFFD"}:INTERPOLATION: ${"[\uFFFD/#21\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/*25:1\uFFFD"}:CLOSE_BLOCK_FOR:${"\uFFFD/#23\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#20\uFFFD"}:CLOSE_TAG_SPK_MENU:`,A=Ee(A);let k;k=$localize`Edit target URL`;let I;I=$localize` Be careful, this will overwrite everything you have in your destination. `;let V;return V=$localize` Override target URL ${"\uFFFD#14\uFFFD"}:START_TAG_SPK_ICON:swap${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["formRef",""],["option",""],["fieldTemplate",""],["enumOptionTemplate",""],["optionTemplate",""],t,e,n,i,a,c,A,k,I,V,[3,"submit","formGroup"],[1,"title-30"],[1,"actions"],["spk-button","","type","button",1,"small",3,"loader","success"],["spk-button","","type","button",1,"small"],["menu",""],["spk-button","","type","button",1,"small",3,"click"],["formArrayName","destinations"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],[3,"isOpen","options"],[3,"click"],[1,"spk-primary"],[1,"most-common-destinations"],[1,"tile"],[3,"searchable"],["spk-button","","type","button",1,"outlined"],["type","button"],[1,"tile",3,"click"],["type","button",3,"click"],["formGroupName","0"],[3,"disallowToggle"],["title",""],["spk-button","","type","button",1,"outlined","small",3,"disabled"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"field-row"],[3,"formGroupName"],[3,"startingPath","accepts","showFiles","hideShortcuts","showHiddenNodes","selectFiles"],[3,"hideShortcuts","startingPath"],[3,"inputType","formControlName","customId"],[1,"primary","raised"],[3,"formControlName","customId","placeholder"],[3,"for"],[1,"primary",3,"spkTooltip"],["type","text",3,"id","formControlName"],[3,"type","id","formControlName"],["prefix","",3,"error","warn","spkTooltip"],["prefix",""],["prefix","",3,"spkTooltip"],["autocomplete","off",3,"type","id","formControlName"],["prefix","",1,"link"],["suffix","",1,"clickable"],["prefix","",1,"link",3,"click"],["suffix","",1,"clickable",3,"click"],[3,"options","isClearable","optionTemplate"],[1,"indeterminate","primary"],["label","key","value","value",3,"options","asFreeText","inlineSearch","optionTemplate"],["type","number",3,"id","formControlName"],["type","checkbox",3,"id","formControlName"],[1,"primary","raised",3,"options","selectMultiple","optionTemplate"],["type","text","id","text",3,"formControlName"],["spk-button","","type","button",1,"outlined",3,"click"],[3,"isOpenChange","isOpen","options"],["header",""],[1,"warning"],["content",""],["id","targetUrl","autocomplete","off",3,"formControl"],["footer",""],["spk-button","","type","submit",1,"raised","primary",3,"click"]]},template:function(e,n){if(e&1){let i=R();s(0,"form",15,0),S("submit",function(){return d(i),u(n.next())}),s(2,"header")(3,"h3",16),E(4,5),s(5,"div",17),g(6,Bn,4,5,"button",18),s(7,"spk-menu")(8,"button",19),m(9,"spk-icon"),r(),B(10,20),s(11,"button",21),S("click",function(){return d(i),u(n.openTargetUrlDialog())}),m(12,"spk-icon"),r(),K(),r()(),D(),r(),g(13,Kn,5,1,"p"),r(),g(14,Wn,9,1)(15,Ki,30,6,"ng-container",22),s(16,"div",23)(17,"button",24),S("click",function(){return d(i),u(n.goBack())}),E(18,6),m(19,"spk-icon"),D(),r(),s(20,"button",25),E(21,7),m(22,"spk-icon"),D(),r()()(),g(23,zi,15,4,"spk-dialog",26)}if(e&2){let i;p("formGroup",n.destinationForm),l(6),f(n.destinationCount()>0?6:-1),l(7),f(n.destinationCount()>0?13:-1),l(),f(n.destinationCount()===0?14:-1),l(),f(!((i=n.destinationFormSignal())==null||i.destinations==null)&&i.destinations.length?15:-1),l(8),f(n.targetUrlDialogOpen()?23:-1)}},dependencies:[Be,be,ie,Ge,Ie,oe,Le,_t,Ue,Ve,pt,Xt,Vt,le,Kt,ne,we,Bt,at,ce,st,rt,qt,Ke,mt,Ft,jt],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], header[_ngcontent-%COMP%] spk-alert[_ngcontent-%COMP%]{width:100%}header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:.5rem}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}pre[_ngcontent-%COMP%]{white-space:pre-wrap}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.field-row.single-field[_ngcontent-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding-bottom:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.form-column[_ngcontent-%COMP%]{display:flex;flex-direction:column}.form-column[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.form-column[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:1rem}label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}label[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:1rem}.form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 1fr;gap:.5rem;align-items:flex-end}.clickable[_ngcontent-%COMP%]{cursor:pointer;color:var(--primary-500)}.most-common-destinations[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10);background-color:var(--base-2);cursor:pointer}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-10);margin:0}[prefix].link[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline;color:var(--primary-500)}textarea[_ngcontent-%COMP%] ~ grammarly-extension[_ngcontent-%COMP%]{display:none}spk-select[_ngcontent-%COMP%]{--miw: p2r(120)}"],changeDetection:0})};export{gt as a,en as b,tn as c,kt as d,Qt as e,Nt as f,Pt as g,Ae as h,yt as i,Zt as j,Ot as k,_e as l};
|
package/chunk-UABJ67OY.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as M}from"./chunk-ZQSBINUM.js";import"./chunk-3XVU2YA6.js";import"./chunk-5LKXKKAK.js";import"./chunk-HFNFJ7G2.js";import{g as h}from"./chunk-AL5KGNEF.js";import"./chunk-FRSQ5NDX.js";import"./chunk-M3WT5B3C.js";import{Db as t,Eb as i,Fb as g,Rb as c,Ua as u,Xb as C,Yb as l,Z as m,gb as s,jc as O,lb as _,zb as f}from"./chunk-AHUC7M75.js";import"./chunk-7CGTOI24.js";var v=["*",[["","footer",""]]],T=["*","[footer]"],r=class n{static \u0275fac=function(e){return new(e||n)};static \u0275cmp=s({type:n,selectors:[["app-custom-card"]],ngContentSelectors:T,decls:11,vars:0,consts:[[1,"card"],["src","/assets/noise/auth-noise.svg",1,"noise"],[1,"header-title"],["src","/assets/duplicati/duplicati.svg","alt",""],[1,"bg"]],template:function(e,a){e&1&&(C(v),t(0,"div",0),g(1,"img",1),t(2,"header")(3,"div",2),g(4,"img",3),O(5," Duplicati "),i()(),t(6,"main"),l(7),t(8,"footer"),l(9,1),i()()(),g(10,"div",4))},styles:['[_nghost-%COMP%]{height:100vh;width:100vw;display:flex;align-items:center;justify-content:center;background-color:var(--base-2)}body.dark [_nghost-%COMP%] .card[_ngcontent-%COMP%]:before{background:radial-gradient(rgba(var(--primary-rgb-900),1),#0000 60%)}.card[_ngcontent-%COMP%]{max-width:480px;width:100%;position:relative;z-index:100;background-color:var(--base-1);border-radius:var(--shape-5);box-shadow:var(--box-shadow-40);border:1px solid var(--base-3);overflow:hidden}.card[_ngcontent-%COMP%]:before{content:"";position:absolute;height:480px;transform:translateY(-285px);left:0;right:0;z-index:-2;background:radial-gradient(rgba(var(--primary-rgb-100),1),#0000 60%)}.card[_ngcontent-%COMP%] img.noise[_ngcontent-%COMP%]{position:absolute;height:480px;width:100%;transform:translateY(-285px);left:0;right:0;z-index:-1;mask-image:radial-gradient(#000,#0000 60%)}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding:2rem 2rem 0;gap:12px;position:relative;z-index:10}.header-title[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;gap:10px}.header-title[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:28px;filter:drop-shadow(0 2px 3px rgba(0,0,0,.3))}main[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;padding:2rem;gap:2.5rem;position:relative;z-index:10}main[_ngcontent-%COMP%] footer[_ngcontent-%COMP%]{font:var(--paragraph-40);color:var(--base-9);text-align:center;text-wrap:balance}.bg[_ngcontent-%COMP%]{position:fixed;inset:0;width:100vw;height:100vh;background-image:url(/assets/backgrounds/base-bg.svg);background-size:cover;background-position:center;background-repeat:no-repeat}body.dark[_ngcontent-%COMP%] .bg[_ngcontent-%COMP%]{opacity:1}footer[_ngcontent-%COMP%]:empty{display:none}'],changeDetection:0})};function x(n,o){n&1&&(t(0,"h3"),c(1,0),i())}function y(n,o){n&1&&(t(0,"h3"),c(1,1),i(),t(2,"button",3),c(3,2),i())}var d=class n{#e=m(M);isLoggingOut=this.#e.isLoggingOut;ngOnInit(){this.#e.logout()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=s({type:n,selectors:[["app-logout"]],decls:3,vars:1,consts:()=>{let o;o=$localize`Logging out...`;let e;e=$localize`You have successfully logged out your being redirected to login page.`;let a;return a=$localize`Go to login page`,[o,e,a,["spk-button","","routerLink","/",1,"raised","primary"]]},template:function(e,a){e&1&&(t(0,"app-custom-card"),_(1,x,2,0,"h3")(2,y,4,0),i()),e&2&&(u(),f(a.isLoggingOut()?1:2))},dependencies:[r,h],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})};export{d as default};
|
package/chunk-W4RKRM2O.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-7CGTOI24.js";var o=[{path:"",redirectTo:"select-files",pathMatch:"full"},{path:"destination",loadComponent:()=>import("./chunk-YW5R7NEG.js")},{path:"encryption",loadComponent:()=>import("./chunk-ZHMYBX5F.js")},{path:"select-files",loadComponent:()=>import("./chunk-KBJGYXKV.js")},{path:"options",loadComponent:()=>import("./chunk-Z45ZPMZS.js")},{path:"progress",loadComponent:()=>import("./chunk-A6XWHATE.js")}],t=o;export{t as default};
|
package/chunk-WFM6YWRN.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as d}from"./chunk-RHW5QVAY.js";import{a as p}from"./chunk-3XVU2YA6.js";import{h as o}from"./chunk-FRSQ5NDX.js";import{E as i,F as s,P as n,T as c,Z as u,va as a}from"./chunk-AHUC7M75.js";var B="backupListOrderBy",k="backupListShowActualTimes",y=[{value:"id",label:$localize`Backup ID`},{value:"name",label:$localize`Backup name`},{value:"lastrun",label:$localize`Last run time`},{value:"nextrun",label:$localize`Next run time`},{value:"schedule",label:$localize`Is scheduled`},{value:"backend",label:$localize`Destination type`},{value:"sourcesize",label:$localize`Source size`},{value:"destinationsize",label:$localize`Destination size`},{value:"duration",label:$localize`Duration`},{value:"-id",label:$localize`Backup ID (decending)`},{value:"-name",label:$localize`Backup name (decending)`},{value:"-lastrun",label:$localize`Last run time (decending)`},{value:"-nextrun",label:$localize`Next run time (decending)`},{value:"-schedule",label:$localize`Is scheduled (decending)`},{value:"-backend",label:$localize`Destination type (decending)`},{value:"-sourcesize",label:$localize`Source size (decending)`},{value:"-destinationsize",label:$localize`Destination size (decending)`},{value:"-duration",label:$localize`Duration (decending)`}],m=class l{#t=u(p);#i=u(o);#u=null;#e=a([]);#a=a([]);#s=a(!1);#l=a(null);#r=a(null);#c=a(this.#t.getItemParsed(k,!0)??"relative");#n=a(this.#t.getItemParsed(B,!0)??"id");orderByOptions=a(y);orderBy=this.#n.asReadonly();backups=this.#a.asReadonly();timeType=this.#c.asReadonly();backupsLoading=this.#s.asReadonly();startingBackup=this.#l.asReadonly();deletingBackup=this.#r.asReadonly();draftBackups=this.#e.asReadonly();addDraftBackup(e){let t=d();return this.#e.set([...this.#e(),{id:t,data:e}]),t}setOrderBy(e){this.#t.setItemParsed(B,e,!0),this.#n.set(e),this.getBackups(!0)}setTimeType(e){this.#t.setItemParsed(k,e,!0),this.#c.set(e)}removeDraftBackupById(e){this.#e.set(this.#e().filter(t=>t.id!==e))}getBackupById(e){return this.#a().find(t=>t.Backup?.ID===e)??null}getBackups(e=!1){let t=this.#u,r=Date.now(),h=t&&r-t<15*60*1e3;t&&r-t<100||!e&&h&&this.#a().length||(this.#u=r,this.#s.set(!0),this.#i.getApiV1Backups({orderBy:this.#n()}).pipe(i(1),n(b=>this.#a.set(b)),s(()=>this.#s.set(!1))).subscribe())}startBackup(e){this.#l.set(e),this.#i.postApiV1BackupByIdStart({id:e}).pipe(i(1),n(()=>this.getBackups(!0)),s(()=>this.#l.set(null))).subscribe()}deleteBackup(e){this.#r.set(e),this.#i.deleteApiV1BackupById({id:e}).pipe(i(1),s(()=>this.#r.set(null))).subscribe({next:()=>this.getBackups(!0)})}static \u0275fac=function(t){return new(t||l)};static \u0275prov=c({token:l,factory:l.\u0275fac,providedIn:"root"})};export{m as a};
|
package/chunk-Z45ZPMZS.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a,b}from"./chunk-Q6M5VRZV.js";import"./chunk-LDJVMU7P.js";import"./chunk-LJDOQTEF.js";import"./chunk-XR4SRVOQ.js";import"./chunk-WZRSQ7XL.js";import"./chunk-3AIKVVWP.js";import"./chunk-5ENRUF35.js";import"./chunk-5LKXKKAK.js";import"./chunk-HFNFJ7G2.js";import"./chunk-AL5KGNEF.js";import"./chunk-FRSQ5NDX.js";import"./chunk-M3WT5B3C.js";import"./chunk-AHUC7M75.js";import"./chunk-7CGTOI24.js";export{a as createRestoreOptionsForm,b as default};
|
package/chunk-ZHMYBX5F.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as a,d as b}from"./chunk-Q6M5VRZV.js";import"./chunk-LDJVMU7P.js";import"./chunk-LJDOQTEF.js";import"./chunk-XR4SRVOQ.js";import"./chunk-WZRSQ7XL.js";import"./chunk-3AIKVVWP.js";import"./chunk-5ENRUF35.js";import"./chunk-5LKXKKAK.js";import"./chunk-HFNFJ7G2.js";import"./chunk-AL5KGNEF.js";import"./chunk-FRSQ5NDX.js";import"./chunk-M3WT5B3C.js";import"./chunk-AHUC7M75.js";import"./chunk-7CGTOI24.js";export{a as createEncryptionForm,b as default};
|
package/main-PDJMO4FF.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as ye,c as be}from"./chunk-OEIF7NQ5.js";import{a as L}from"./chunk-WZRSQ7XL.js";import{a as ue}from"./chunk-HTX2RSBS.js";import{a as I}from"./chunk-OHZGASM5.js";import"./chunk-65UN5LE6.js";import"./chunk-WFM6YWRN.js";import"./chunk-3AIKVVWP.js";import{a as x}from"./chunk-RHW5QVAY.js";import{a as me}from"./chunk-RSZISHXB.js";import{a as v,b as de,c as E}from"./chunk-ZQSBINUM.js";import{a as C}from"./chunk-3XVU2YA6.js";import{c as se,d as ie,g as ae,h as pe}from"./chunk-5LKXKKAK.js";import{a as re}from"./chunk-HFNFJ7G2.js";import{c as ce}from"./chunk-AL5KGNEF.js";import{a as Z,b as ee,d as te,e as oe,f as ne,i as le}from"./chunk-FRSQ5NDX.js";import{a as fe}from"./chunk-RHII5WE3.js";import{pa as Q,ua as Y}from"./chunk-M3WT5B3C.js";import{a as ge}from"./chunk-2P3DXYGR.js";import{b as he}from"./chunk-TCDECRYI.js";import{A as N,B as F,F as w,Fb as _,Fc as z,Gc as q,L as G,N as T,P as J,Qc as X,T as k,W as B,Z as s,f as W,gb as K,i as j,ka as $,n as D,o as U,r as R,va as d}from"./chunk-AHUC7M75.js";import"./chunk-7CGTOI24.js";var M=class t{#o=s(C);#s=s(v);ngOnInit(){this.#s.fetchConfig(),this.#o.clearAllNotCurrentVersion()}static \u0275fac=function(o){return new(o||t)};static \u0275cmp=K({type:t,selectors:[["app-root"]],decls:1,vars:0,template:function(o,n){o&1&&_(0,"router-outlet")},dependencies:[se],encapsulation:2})};var ve={production:!0,baseUrl:"/api",machineServerUrl:"${WS_URL}",defaultTimeout:3e4};var h=new B("ENVIRONMENT");var A=class t{#o=s(le);isLoaded=d(!1);webmodules=d(null);preload(e=!1){let o=this.#o.getApiV1Webmodules().pipe(J(n=>this.webmodules.set(n)),w(()=>this.isLoaded.set(!0)));if(e)return o;o.subscribe()}static \u0275fac=function(o){return new(o||t)};static \u0275prov=k({token:t,factory:t.\u0275fac,providedIn:"root"})};var Ie=()=>{let t=s(E);return t.token()?!0:t.checkProxyAuthed().pipe(T(e=>e?D(!0):t.refreshToken().pipe(R(()=>!0))))},Me=()=>{let t=s(v),e=s(I),o=s($),n=t.relayIsEnabled()?"longpoll":"websocket",i=[o.get(L).preload(!0),o.get(L).preloadFilterGroups(!0),o.get(A).preload(!0)];return t.configLoaded===null?N(i).pipe(R(()=>n)):t.configLoaded?.pipe(T(()=>N(i)))},Se=[{path:"",children:[{path:"login",canActivate:[],loadComponent:()=>import("./chunk-UXUVYBYP.js")},{path:"logout",loadComponent:()=>import("./chunk-UABJ67OY.js")},{path:"",canActivate:[Ie],children:[{path:"",canActivate:[Me],loadComponent:()=>import("./chunk-HXN7IX3Q.js"),children:[{path:"",loadComponent:()=>import("./chunk-MUBWT5H2.js")},{path:"add-backup",loadComponent:()=>import("./chunk-BAX2AJJJ.js")},{path:"backup/:id/export",loadComponent:()=>import("./chunk-K5C3JCVH.js")},{path:"backup/import",loadComponent:()=>import("./chunk-4YUBZYBH.js")},{path:"backup-draft/:id",loadComponent:()=>import("./chunk-4FUHLIJW.js"),loadChildren:()=>import("./chunk-ADO3ABTT.js")},{path:"backup/:id",loadComponent:()=>import("./chunk-4FUHLIJW.js"),loadChildren:()=>import("./chunk-ADO3ABTT.js")},{path:"backup/:id/log",loadComponent:()=>import("./chunk-DX6BDDDV.js")},{path:"backup/:id/database",loadComponent:()=>import("./chunk-YY3JAYQZ.js")},{path:"backup/:id/commandline",loadComponent:()=>import("./chunk-4RIDBZOK.js")},{path:"backup/:id/commandline/:runId",loadComponent:()=>import("./chunk-CPTR6AJI.js")},{path:"restore",children:[{path:"",loadComponent:()=>import("./chunk-3KUVV3SB.js")},{path:"from-config",loadComponent:()=>import("./chunk-AACJQG7X.js")}]},{path:"restore-from-files",loadComponent:()=>import("./chunk-7NBGN46A.js"),loadChildren:()=>import("./chunk-W4RKRM2O.js")},{path:"restore-draft/:id",loadComponent:()=>import("./chunk-7NBGN46A.js"),loadChildren:()=>import("./chunk-W4RKRM2O.js")},{path:"restore/:id",loadComponent:()=>import("./chunk-7NBGN46A.js"),loadChildren:()=>import("./chunk-W4RKRM2O.js")},{path:"settings",loadComponent:()=>import("./chunk-PHIZVVHX.js")},{path:"about",loadComponent:()=>import("./chunk-NPZU4SBS.js"),children:[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",loadComponent:()=>import("./chunk-6KSS7VQS.js")},{path:"changelog",loadComponent:()=>import("./chunk-2SQBD7LN.js")},{path:"libraries",loadComponent:()=>import("./chunk-2GE6FFGI.js")},{path:"system-info",loadComponent:()=>import("./chunk-ELZWH543.js")},{path:"server-settings",loadComponent:()=>import("./chunk-WU3ALGNP.js")},{path:"logs",loadChildren:()=>import("./chunk-QVNFX6ZC.js")},{path:"crashlogs",loadComponent:()=>import("./chunk-SSJ4VQB4.js")}]}]}]}]}];var P=null,Re=(t,e)=>{let o=s(E),n=s(ie),i=s(C),l=s(h),r=i.getItem("locale"),u=s(ce),a=ye(r),p=t.url==="/api/v1/auth/login",m=t.url==="/api/v1/auth/refresh",S=t.url==="/api/v1/progressstate",g=t.url==="/api/v1/remoteoperation/test",y=t.url.startsWith("/api/v2/"),b=o.token(),H=t,V=t.headers.has("custom-proxy-check")||b===de;if(b&&t.url.startsWith(l.baseUrl)&&!V){let c=t.headers.set("Authorization",`Bearer ${b}`);r&&r!=="en-US"&&(c=c.set("X-Ui-Language",a)),H=t.clone({headers:c})}return e(H).pipe(R(c=>{if(c.type===4&&c.status===200&&y){let f=c.body;if(f?.Success===!1)throw{status:200,message:f?.Error??"Unknown error",error:{Error:f?.Error??"Unknown error"},body:f}}return c}),F(c=>{let f=c.error?.Error||`Error Code: ${c.status}, Message: ${c.message}`;return!V&&(S&&c.status===404||g||u.error(f),m&&c.status===401&&(o.logout(),n.navigate(["/logout"])),!p&&!m&&c.status===401)?(P??=o.refreshToken().pipe(G()),P.pipe(T(()=>e(t.clone({headers:t.headers.set("Authorization",`Bearer ${o.token()}`)}))),w(()=>P=null))):U(()=>({error:c,message:f}))}))};var Ae="1.0.0",Te=`portal-proxy-client-${x()}`,Oe=1,O=class t{#o=1e3;#s=s(h);#t=d("disconnected");#l=d(this.#o);#i=d(!1);#n=d(!1);#a=d(null);isConnectedToMachineServer=this.#n.asReadonly();wsState=this.#t.asReadonly();#p=[];#r={};#e=null;#m=new TextDecoder("utf-8");#c=null;#d=X(()=>{let e=this.#i(),o=this.#l(),n=this.#a();if(!n||!e||!o||o<this.#o){this.#c&&window.clearInterval(this.#c);return}this.#c=window.setInterval(()=>{this.connectToMachineServer(n)},o)});utf8Atob(e){let o=Uint8Array.from(atob(e),i=>i.charCodeAt(0)),n=this.#m.decode(o);return n?JSON.parse(n):null}connectToMachineServer(e,o){let n=o?.reconnect??!1,i=this.wsState();(i==="disconnected"||i==="error"||n)&&(this.#e?.close(),this.#e=null),!this.#e&&(this.#e=new WebSocket(this.#s.machineServerUrl),this.#t.set("connecting"),this.#e.onopen=()=>{this.#t.set("connect"),this.#n.set(!0),this.#i.set(!1),this.#a.set(null)},this.#e.onclose=()=>{this.#t.set("disconnected"),this.#n.set(!1),this.#a.set(e),this.#i.set(!0)},this.#e.onerror=()=>{this.#t.set("error")},this.#e.onmessage=l=>{let r=JSON.parse(l.data);if(this.wsState()==="connect"){if(r.type!=="welcome"){this.disconnectFromMachineServer(`Unexpected message type, expected 'welcome' but got '${r.type}'`);return}let a={token:e,publicKey:"",clientVersion:Ae,protocolVersion:Oe},p=this.createResponse(r,"authportal",a);this.#t.set("welcome"),this.#e?.send(p)}else if(this.wsState()==="welcome"){if(r.type!=="authportal"){this.disconnectFromMachineServer(`Unexpected message type, expected 'authportal' but got '${r.type}'`);return}var u=JSON.parse(r.payload??"");if(u.accepted===!1){this.disconnectFromMachineServer("Authentication failed");return}for(this.#t.set("authenticated"),this.#n.set(!0);this.#p.length>0;){let a=this.#p.pop();a&&this.#r[a.messageId]&&this.activateCommand(a)}}else if(this.wsState()==="authenticated"){if(r.type!=="command"){console.warn(`Unexpected message type, expected 'command' but got '${r.type}'`);return}let a=this.#r[r.messageId];if(a){if(r.errorMessage){a.reject(r.errorMessage);return}else{let p=JSON.parse(r.payload??"");p.body=p?.body==null?null:this.utf8Atob(p.body),a.resolve(p)}delete this.#r[r.messageId],window.clearTimeout(a.timer)}}})}disconnectFromMachineServer(e=null){e&&console.error(e),this.#e?.close(),this.#e=null,this.#t.set("disconnected"),this.#n.set(!1)}createResponse(e,o,n){let i={from:Te,to:e.from,type:o,messageId:e.messageId,payload:JSON.stringify(n)};return JSON.stringify(i)}sendCommand(e,o,n,i,l,r,u=5e3){return(this.wsState()==="disconnected"||this.wsState()==="error")&&this.connectToMachineServer(e),new Promise((a,p)=>{let m=x(),g={from:Te,to:o,type:"command",messageId:m,payload:JSON.stringify({method:n,path:i,body:l,headers:r})},y={resolve:a,reject:p,timer:window.setTimeout(()=>{let b=this.#r[m];b&&(delete this.#r[m],b.reject("Timeout"))},u)};this.#r[m]=y,this.#n()?this.activateCommand(g):this.#p.push(g)})}activateCommand(e){this.#e?.send(JSON.stringify(e))}static \u0275fac=function(o){return new(o||t)};static \u0275prov=k({token:t,factory:t.\u0275fac,providedIn:"root"})};function Ne(t){if(typeof t!="string")return null;let o=new TextEncoder().encode(t);return window.btoa(String.fromCharCode(...o))}function we(t,e,o){let n=t.relayconfigState.config();if(n===null)return o(e);let i=Ne(e.body),l={};e.headers.keys().forEach(p=>{l[p]=e.headers.get(p)??""});let r=e.headers.get("timeout"),u=r!==null?parseInt(r):t.defaultTimeout;e.url.startsWith("/api/v1/serverstate")&&e.url.includes("longpoll=true")&&(u=1e3*99);let a=t.relayWebsocket.sendCommand(n.accessToken,n.clientId,e.method,e.url,i,l,u);return new W(p=>{a.then(m=>{let S=new Z;l!=null&&Object.keys(l).forEach(y=>{S.set(y,l[y])});let g=new ee({body:m.body,status:m.code,statusText:"OK",headers:S});p.next(g),p.complete()})})}var ke=(t,e)=>{let o={relayconfigState:s(v),defaultTimeout:s(h).defaultTimeout,relayWebsocket:s(O)},n=o.relayconfigState.config();if(o.relayconfigState.configLoaded!==null&&n===null){let i=new j;return o.relayconfigState.configLoaded.subscribe(l=>{l&&we(o,t,e).subscribe(i)}),i}return we(o,t,e)};var Ee={providers:[z(),ae(Se,pe()),te(ne(),oe([ke,Re])),C,{provide:h,useValue:ve},{provide:q,useValue:be()},ue,I,he,Y,me,Q,fe,ge]};re(M,Ee);
|