@duplicati/ngclient 0.0.225 → 0.0.227
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/images/backup-from-config.png +0 -0
- package/assets/images/backup-from-remote.png +0 -0
- package/assets/sh-bold.woff2 +0 -0
- package/assets/sh.woff2 +0 -0
- package/assets/ship.css +2 -0
- package/chunk--rqB0ojD.js +2 -0
- package/chunk-5zEiKCqR.js +1 -0
- package/chunk-B-ryE8KW.js +2 -0
- package/chunk-B6nCQM-G.js +1 -0
- package/chunk-B6ugJDDx.js +1 -0
- package/chunk-B7PRtY7v.js +1 -0
- package/chunk-B88MJ6Up.js +1 -0
- package/chunk-BAbAUjHY.js +2 -0
- package/chunk-BCT9ajP9.js +1 -0
- package/chunk-BKLJMYh2.js +1 -0
- package/chunk-BMGXb3gX.js +1 -0
- package/chunk-BNf0YAwH.js +2 -0
- package/chunk-BOII3Fdm.js +1 -0
- package/chunk-BPpheyQK.js +2 -0
- package/chunk-BS8yAz3P.js +2 -0
- package/chunk-BUF3tczf.js +14 -0
- package/chunk-BYoKu9PJ.js +1 -0
- package/chunk-BaWD8G-f.js +1 -0
- package/chunk-BeAI10wv.js +1 -0
- package/chunk-BffC_BAn.js +2 -0
- package/chunk-BjNuU0J_.js +2 -0
- package/chunk-BlIcwFlf.js +1 -0
- package/chunk-BqjWEFHw.js +1 -0
- package/chunk-BthLY9tf.js +1 -0
- package/chunk-BuyCr2eD.js +1 -0
- package/chunk-BxxX98wy.js +2 -0
- package/chunk-Bzp0ULy_.js +61 -0
- package/chunk-C-G3pKB4.js +2 -0
- package/chunk-C08PrcBX.js +1 -0
- package/chunk-C4pJCbq-.js +1 -0
- package/chunk-CDRHCSvU.js +2 -0
- package/chunk-CJRbWZfg.js +2 -0
- package/chunk-CM11IMzh.js +1 -0
- package/chunk-CMs999gl.js +2 -0
- package/chunk-CU-RYihf.js +2 -0
- package/chunk-CUxvfCTH.js +2 -0
- package/chunk-Cc1_FUvV.js +1 -0
- package/chunk-CdZVal1F.js +2 -0
- package/chunk-CeFh90sX.js +1 -0
- package/chunk-ChwFViRh.js +1 -0
- package/chunk-ClHWI9-i.js +2 -0
- package/chunk-ClfSJEUJ.js +1 -0
- package/chunk-CnAb3OKU.js +1 -0
- package/chunk-CtLFpDTP.js +3 -0
- package/chunk-CuU6b3lp.js +2 -0
- package/chunk-Cw8vFX0e.js +1 -0
- package/chunk-CxPG-KgI.js +3 -0
- package/chunk-Cz4OqhOZ.js +1 -0
- package/chunk-D-epCTmE.js +1 -0
- package/chunk-D0t-kgLy.js +2 -0
- package/chunk-DNJQ-AbV.js +3 -0
- package/chunk-DNSvQk_3.js +2 -0
- package/chunk-DWwNINBJ.js +2 -0
- package/chunk-DddAUzMY.js +1 -0
- package/chunk-DnD9XTM4.js +2 -0
- package/chunk-Do6_xsGi.js +4 -0
- package/chunk-DofVJ9gn.js +1 -0
- package/chunk-Dt8gZPT-.js +2 -0
- package/chunk-DtQIjLqL.js +1 -0
- package/chunk-DuO9_dH0.js +1 -0
- package/chunk-G-I5c1Dk.js +2 -0
- package/chunk-IEVZ0UN6.js +1 -0
- package/chunk-M5tldLvJ.js +1 -0
- package/chunk-N7vpDAsp.js +2 -0
- package/chunk-PA5BGFyW.js +1 -0
- package/chunk-QlYDF-EM.js +1 -0
- package/chunk-SWsliUUy.js +4 -0
- package/chunk-SgcWXTYZ.js +2 -0
- package/chunk-XMwSOila.js +1 -0
- package/chunk-ZVDEaGd0.js +1 -0
- package/chunk-birClroL.js +2 -0
- package/chunk-bx0aDvCZ.js +2 -0
- package/chunk-g_QJ3SVt.js +2 -0
- package/chunk-r4LfAQnM.js +3 -0
- package/chunk-wycXedbJ.js +2 -0
- package/chunk-ySdaWJYB.js +2 -0
- package/chunk-ya_5JcKA.js +1 -0
- package/index.html +2 -2
- package/locale/messages.da.json +11 -20
- package/locale/messages.de.json +110 -85
- package/locale/messages.de_CH.json +86 -61
- package/locale/messages.de_DE.json +160 -92
- package/locale/messages.en.json +173 -63
- package/locale/messages.en_US.json +922 -0
- package/locale/messages.fr.json +86 -61
- package/locale/messages.fr_CA.json +160 -92
- package/locale/messages.fr_FR.json +160 -92
- package/locale/messages.it.json +91 -66
- package/locale/messages.it_IT.json +160 -92
- package/locale/messages.json +173 -63
- package/locale/messages.nl_BE.json +160 -92
- package/locale/messages.nl_NL.json +177 -111
- package/locale/messages.pl.json +22 -45
- package/locale/messages.zh-Hans.json +222 -85
- package/locale/messages.zh-Hant.json +222 -85
- package/locale/messages.zh.json +222 -85
- package/locale/messages.zh_CN.json +225 -88
- package/locale/messages.zh_HK.json +222 -85
- package/locale/messages.zh_TW.json +643 -19
- package/main-TZVLLK67.js +16 -0
- package/package.json +1 -1
- package/ship-ui-assets/mcp/components.json +4369 -2788
- package/styles-WQUFQGYX.css +1 -0
- package/chunk-2EX5HS5X.js +0 -1
- package/chunk-2KD757N6.js +0 -1
- package/chunk-2YUSBRXY.js +0 -1
- package/chunk-35FMFK4I.js +0 -1
- package/chunk-3DHD6GQL.js +0 -1
- package/chunk-3HYQMG65.js +0 -2
- package/chunk-3PARK7B7.js +0 -1
- package/chunk-3V25RAVK.js +0 -1
- package/chunk-4ISFDBI3.js +0 -2
- package/chunk-5FQ7HESA.js +0 -1
- package/chunk-5QGFYH2A.js +0 -3
- package/chunk-5UJN5SN4.js +0 -2
- package/chunk-6DX35WDO.js +0 -1
- package/chunk-6Q6SSTBK.js +0 -1
- package/chunk-6WX2UOAN.js +0 -1
- package/chunk-7CGTOI24.js +0 -1
- package/chunk-7VQ67PEZ.js +0 -1
- package/chunk-A23UTI46.js +0 -1
- package/chunk-AR5SEBWX.js +0 -1
- package/chunk-B4QFOJXL.js +0 -1
- package/chunk-BPHX6VXP.js +0 -1
- package/chunk-CJKZ27FM.js +0 -1
- package/chunk-COEGVUM3.js +0 -1
- package/chunk-CQJRBQ6I.js +0 -1
- package/chunk-E4CYVUYG.js +0 -1
- package/chunk-EBKOJDCT.js +0 -1
- package/chunk-EVEI25GQ.js +0 -2
- package/chunk-EXAZ4QZR.js +0 -1
- package/chunk-G7TNRWOU.js +0 -1
- package/chunk-GA3CAVSK.js +0 -2
- package/chunk-GKAMSAN5.js +0 -1
- package/chunk-GNKCBZMS.js +0 -1
- package/chunk-HDDAGHHE.js +0 -2
- package/chunk-HLHUPBCV.js +0 -1
- package/chunk-HPXIWKIK.js +0 -1
- package/chunk-HS3UDQIJ.js +0 -1
- package/chunk-HWOUAWOE.js +0 -1
- package/chunk-IDJ52K34.js +0 -1
- package/chunk-ITN4L52Q.js +0 -1
- package/chunk-J7GH3G72.js +0 -1
- package/chunk-JBX7YYME.js +0 -1
- package/chunk-JCXT6U5P.js +0 -1
- package/chunk-JNZJE3GC.js +0 -1
- package/chunk-K5XGRFWJ.js +0 -4
- package/chunk-KGK4RY3J.js +0 -1
- package/chunk-KNSQLQC6.js +0 -1
- package/chunk-KUNX5APQ.js +0 -1
- package/chunk-KX3UP3HV.js +0 -1
- package/chunk-KZYRTI62.js +0 -1
- package/chunk-LXTSZI4K.js +0 -1
- package/chunk-MKI54WTC.js +0 -1
- package/chunk-MSIH2OJ5.js +0 -1
- package/chunk-N5XYG3QW.js +0 -1
- package/chunk-NE255HQN.js +0 -1
- package/chunk-NQAD2FBX.js +0 -1
- package/chunk-NUV5LHQV.js +0 -1
- package/chunk-O2HQIEE4.js +0 -1
- package/chunk-O2L2FRYE.js +0 -11
- package/chunk-OP7MDR2B.js +0 -1
- package/chunk-OSGHJCUU.js +0 -1
- package/chunk-OYU6OBKA.js +0 -1
- package/chunk-P2EIEVFT.js +0 -1
- package/chunk-PDZNQW6F.js +0 -1
- package/chunk-PEOYNJJM.js +0 -1
- package/chunk-PMF4FTBF.js +0 -1
- package/chunk-PNQ5BDQN.js +0 -1
- package/chunk-PNRFCYAE.js +0 -2
- package/chunk-POVWDK74.js +0 -1
- package/chunk-QW23XWNE.js +0 -1
- package/chunk-SKLSR5GH.js +0 -1
- package/chunk-T7RMSUHE.js +0 -1
- package/chunk-TSVSMVY4.js +0 -1
- package/chunk-TV7OB7Y4.js +0 -1
- package/chunk-TWWAK5M6.js +0 -1
- package/chunk-TXCVGOPN.js +0 -2
- package/chunk-UIVZWXBK.js +0 -1
- package/chunk-UNQKMTFM.js +0 -1
- package/chunk-V2M5YF4E.js +0 -1
- package/chunk-V2UO7ES2.js +0 -1
- package/chunk-VOXTAZLZ.js +0 -1
- package/chunk-VQLI7RDY.js +0 -60
- package/chunk-VTOEFKZG.js +0 -1
- package/chunk-VZNLMGYP.js +0 -2
- package/chunk-XUCXLLB4.js +0 -1
- package/chunk-XWML36YQ.js +0 -1
- package/chunk-Y47NRSCA.js +0 -1
- package/chunk-YF6JHIN5.js +0 -1
- package/chunk-YS4B2B5N.js +0 -1
- package/chunk-ZGQ2WCM2.js +0 -1
- package/chunk-ZSAEIKEB.js +0 -1
- package/chunk-ZXBKGNJU.js +0 -1
- package/main-S64CL44W.js +0 -1
- package/styles-S2CJL4OY.css +0 -1
package/chunk-MKI54WTC.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-7CGTOI24.js";var o=[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",loadComponent:()=>import("./chunk-KUNX5APQ.js")},{path:"destination",loadComponent:()=>import("./chunk-JBX7YYME.js")},{path:"source-data",loadComponent:()=>import("./chunk-Y47NRSCA.js")},{path:"schedule",loadComponent:()=>import("./chunk-ITN4L52Q.js")},{path:"options",loadComponent:()=>import("./chunk-OSGHJCUU.js")}];export{o as default};
|
package/chunk-MSIH2OJ5.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as ee,b as ne}from"./chunk-KZYRTI62.js";import{a as te}from"./chunk-TSVSMVY4.js";import"./chunk-2KD757N6.js";import{a as Z}from"./chunk-OP7MDR2B.js";import"./chunk-PEOYNJJM.js";import{a as Y}from"./chunk-NUV5LHQV.js";import{c as G}from"./chunk-PDZNQW6F.js";import{B as j,C as H,H as q,L as Q,c as W,e as V,i as J,s as X,v as z,w as K}from"./chunk-CJKZ27FM.js";import"./chunk-KNSQLQC6.js";import{d as B,e as U}from"./chunk-CQJRBQ6I.js";import"./chunk-V2UO7ES2.js";import"./chunk-HDDAGHHE.js";import"./chunk-YF6JHIN5.js";import"./chunk-2YUSBRXY.js";import{$ as _,Db as k,Eb as r,Fb as l,Fc as A,Gb as T,Nb as h,Qc as N,Rc as P,Ta as a,Ub as S,Vb as y,Wb as p,Xc as I,Zb as w,_b as E,ac as s,ea as F,fa as f,hb as D,ka as O,nc as x,oc as u,qa as b,sa as M,tc as L,uc as v,vc as $,xb as c,yb as d}from"./chunk-K5XGRFWJ.js";import"./chunk-7CGTOI24.js";var ie=(n,t,e,i,o)=>({"loading-state":n,"ready-to-add-link":t,"is-connected":e,"failed-to-connect":i,"is-registered":o});function oe(n,t){n&1&&p(0,0,1)}function re(n,t){n&1&&p(0,0,2)}function le(n,t){if(n&1){let e=h();r(0,"button",10),E("click",function(){F(e);let o=s(2);return f(o.cancel())}),u(1,"Cancel registration"),l()}}function ae(n,t){if(n&1&&(r(0,"div",7)(1,"p"),S(2,0),c(3,oe,1,0)(4,re,1,0),y(),l(),T(5,"sh-progress-bar",8),c(6,le,2,0,"button",9),l()),n&2){let e=s();a(3),d(e.state()==="unknown"?3:4),a(3),d((e.registeringCounter()??0)>=5&&e.state()==="registering"?6:-1)}}function se(n,t){if(n&1){let e=h();r(0,"sh-form-field")(1,"label",11),p(2,1),l(),r(3,"input",12),$("ngModelChange",function(o){F(e);let C=s();return v(C.customRegisterUrl,o)||(C.customRegisterUrl=o),f(o)}),l()(),r(4,"div",13)(5,"button",14),u(6,"Go back"),l(),r(7,"button",15),E("click",function(){F(e);let o=s();return f(o.registerViaCustomUrl())}),p(8,2),l()()}if(n&2){let e=s();a(3),L("ngModel",e.customRegisterUrl),a(4),k("disabled",!e.customRegisterUrlValid())}}function ce(n,t){if(n&1){let e=h();r(0,"p"),p(1,3),l(),T(2,"sh-progress-bar",8),r(3,"button",10),E("click",function(){F(e);let o=s(2);return f(o.retryWhenFaulted())}),u(4,"Cancel"),l()}}function de(n,t){if(n&1){let e=h();r(0,"p"),p(1,4),l(),r(2,"button",10),E("click",function(){F(e);let o=s(2);return f(o.retryWhenFaulted())}),u(3,"Retry"),l()}}function _e(n,t){if(n&1&&c(0,ce,5,0)(1,de,4,0),n&2){let e=s();d(e.claimUrl()!==null?0:1)}}function ue(n,t){n&1&&(S(0,5,1),T(1,"p"),y())}function Ce(n,t){n&1&&(S(0,5,2),T(1,"p"),y())}function ge(n,t){if(n&1){let e=h();r(0,"sh-alert",16),S(1,5),c(2,ue,2,0,"p")(3,Ce,2,0,"p"),y(),l(),r(4,"button",10),E("click",function(){F(e);let o=s();return f(o.retryWhenFaulted())}),u(5," Retry "),r(6,"sh-icon"),u(7,"arrow-arc-left"),l()()}if(n&2){let e=s();a(2),d(e.typeParam()==="link"?2:3)}}function me(n,t){n&1&&(r(0,"h3"),u(1,"Successfully connected"),l(),r(2,"p"),u(3,"We're going to redirect you to the home page"),l())}var R=class n{#n=_(B);#l=_(ee);#e=_(ne);#i=_(te);#a=_(G);#s=_(Y);#c=_(Z);isOldOpen=b(!1);typeParam=I.required();state=this.#e.state;claimUrl=this.#e.claimUrl;registerUrl=this.#e.registerUrl;customRegisterUrl=this.#e.customRegisterUrl;additionalReportingUrl=P(()=>{let t=this.#i.serverSettings();return this.#e.state()==="inactive"?"":t&&t["additional-report-url"]||""});copiedReportingUrl=b(!1);customRegisterUrlValid=P(()=>{let t=this.customRegisterUrl(),e=/^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\(\)\*\+,;=.]+$/;return!(t.length===0||!e.test(t))});registeringCounter=b(null);didTry=!1;triedFinishConnection=!1;#t=null;#d=_(O);constructor(){this.#d.onDestroy(()=>{this.#r()})}ngAfterViewInit(){(this.#a.relayIsEnabled()||!this.#s.hasWebSocket()?"longpoll":"websocket")==="websocket"&&this.#c.reconnectIfNeeded()}stateEffect=M(()=>{let t=this.#e.registerUrl(),e=this.state(),i=this.typeParam();e==="inactive"&&i==="logon"&&t!==""&&(this.didTry||(this.didTry=!0,queueMicrotask(()=>this.#e.beginRemoteRegistration()))),e==="registered"&&(this.triedFinishConnection||N(()=>this.claimUrl())!==null&&(this.triedFinishConnection=!0,this.#_())),e==="registering"?N(()=>{this.registeringCounter()===null&&this.registeringCounter.set(0),this.#o()}):(this.#r(),N(()=>this.registeringCounter.set(null))),(e==="connected"||e==="disabled"||e==="connecting")&&queueMicrotask(()=>{this.#i.setShownWelcomePage().subscribe(()=>{this.#n.navigate([""])})})});#o(){this.#t!==null&&clearTimeout(this.#t),this.#t=setTimeout(()=>{this.#t=null;let t=this.registeringCounter()??0;this.registeringCounter.set(t+1),this.state()==="registering"&&this.#o()},1e3)}#r(){this.#t!==null&&(clearTimeout(this.#t),this.#t=null)}ngOnInit(){this.#e.refreshRemoteControlStatus()}#_(){let t=this.#e.claimUrl();this.#l.open(`${t}?closeAfterConnection=true`,"_blank")}registerViaCustomUrl(){this.#e.beginRemoteRegistration(!0)}retryWhenFaulted(){this.#e.cancelRemoteRegistration(),this.customRegisterUrl.set(""),this.didTry=!1,this.triedFinishConnection=!1,this.typeParam()==="logon"&&this.#n.navigate(["/welcome/select"])}cancel(){this.#e.cancelRemoteRegistration()}register(){this.#e.beginRemoteRegistration()}disable(){this.#e.disableRemoteControl()}enable(){this.#e.enableRemoteControl()}delete(){this.#e.deleteRemoteControl()}copyReportingUrl(){let t=this.additionalReportingUrl();t&&(this.copiedReportingUrl.set(!0),setTimeout(()=>this.copiedReportingUrl.set(!1),2e3),navigator.clipboard.writeText(t))}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=D({type:n,selectors:[["app-connect"]],inputs:{typeParam:[1,"typeParam"]},decls:6,vars:13,consts:()=>{let t;t=$localize`${"\uFFFD*3:1\uFFFD"}:START_BLOCK_IF: Loading... ${"\uFFFD/*3:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*4:2\uFFFD"}:START_BLOCK_ELSE: Connecting to console ${"\uFFFD/*4:2\uFFFD"}:CLOSE_BLOCK_ELSE:`;let e;e=$localize`Paste registration URL here`;let i;i=$localize` Connect machine to console `;let o;o=$localize`We're now connecting you to the console`;let C;C=$localize`Something failed during registration we're missing claimUrl, please try again`;let m;return m=$localize` Failed to register ${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_PARAGRAPH: Check if the connection link are correct, alternatively it could be your internet connection or the service might be down ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_PARAGRAPH:${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_PARAGRAPH: There might be a problem with your internet connection or the service might be down, please try again later ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_PARAGRAPH:${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,m=w(m),[t,e,i,o,C,m,[1,"main-card","type-b"],[1,"loader-content"],[1,"primary","indeterminate"],["shButton",""],["shButton","",3,"click"],["for","remoteControlRegisterUrl"],["type","text","id","remoteControlRegisterUrl","name","remoteControlRegisterUrl",3,"ngModelChange","ngModel"],[1,"nav-buttons"],["type","button","shButton","","routerLink","/welcome",1,"raised"],["type","button","shButton","",1,"raised","primary",3,"click","disabled"],[1,"error"]]},template:function(e,i){if(e&1&&(r(0,"sh-card",6),c(1,ae,7,2,"div",7),c(2,se,9,2),c(3,_e,2,1),c(4,ge,8,1),c(5,me,4,0),l()),e&2){let o=i.state()==="unknown"||i.typeParam()!=="link"&&i.state()==="inactive"||i.state()==="registering",C=i.typeParam()==="link"&&i.state()==="inactive",m=i.state()==="connected"||i.state()==="disabled"||i.state()==="connecting",g=i.state()==="registeringfaulted";x(A(7,ie,o,C,m,g,i.state()==="registered")),a(),d(o?1:-1),a(),d(C?2:-1),a(),d(i.state()==="registered"?3:-1),a(),d(g?4:-1),a(),d(m?5:-1)}},dependencies:[U,X,W,V,J,q,j,Q,H,K,z],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;min-height:100%;width:100%;flex:1 0;overflow:hidden;padding:2rem}@media only screen and (max-width:768px){[_nghost-%COMP%]{padding:1rem}}.main-card[_ngcontent-%COMP%]{width:100%;height:100%;max-width:31.25rem;max-height:min-content;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:1rem;padding:2rem}.main-card.failed-to-connect[_ngcontent-%COMP%] sh-alert[_ngcontent-%COMP%]{width:100%}.main-card.failed-to-connect[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:100%}.main-card.is-registered[_ngcontent-%COMP%], .main-card.is-connected[_ngcontent-%COMP%]{align-items:center}.loader-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.5rem;width:100%}.loader-content[_ngcontent-%COMP%] sh-progress-bar[_ngcontent-%COMP%]{--pb-b: var(--base-3);border:1px solid var(--pb-b)}.field-row[_ngcontent-%COMP%]{display:flex;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] sh-form-field[_ngcontent-%COMP%], .field-row[_ngcontent-%COMP%] sh-select[_ngcontent-%COMP%]{flex:1 0}.reporting-url[_ngcontent-%COMP%]{cursor:pointer;-webkit-user-select:none;user-select:none;margin-top:.25rem}.state[_ngcontent-%COMP%]{position:fixed;top:1rem;right:1rem;margin:0;color:var(--base-7);font-size:.75rem}.old[_ngcontent-%COMP%]{display:flex;flex-direction:column;position:relative;gap:.5rem;padding:1rem;border:1px solid var(--base-4);background:var(--base-1);position:fixed;top:0;right:0;bottom:0;width:35rem;transform:translate(100%)}.old.open[_ngcontent-%COMP%]{transform:translate(0)}.old[_ngcontent-%COMP%] .toggle[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;gap:.5rem;cursor:pointer;position:absolute;background-color:var(--base-1);border:1px solid var(--base-4);border-width:.0625rem 0 .0625rem .0625rem;width:2rem;height:2.5rem;border-radius:var(--shape-2) 0 0 var(--shape-2);top:3.75rem;left:-2rem;-webkit-user-select:none;user-select:none}.old[_ngcontent-%COMP%] .toggle[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:1rem}.nav-buttons[_ngcontent-%COMP%]{display:flex;gap:.5rem;flex-direction:row}"],changeDetection:0})};export{R as default};
|
package/chunk-N5XYG3QW.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as fe}from"./chunk-3HYQMG65.js";import"./chunk-O2HQIEE4.js";import{a as ue}from"./chunk-TWWAK5M6.js";import{a as pe,b as z}from"./chunk-UIVZWXBK.js";import"./chunk-E4CYVUYG.js";import{a as Ce}from"./chunk-BPHX6VXP.js";import"./chunk-XWML36YQ.js";import"./chunk-6Q6SSTBK.js";import{a as me}from"./chunk-COEGVUM3.js";import"./chunk-YS4B2B5N.js";import{b as ge}from"./chunk-OP7MDR2B.js";import"./chunk-PEOYNJJM.js";import"./chunk-NUV5LHQV.js";import"./chunk-PDZNQW6F.js";import{B as se,C as le,J as ce,L as de,v as oe,z as re}from"./chunk-CJKZ27FM.js";import{d as _e}from"./chunk-KNSQLQC6.js";import"./chunk-CQJRBQ6I.js";import"./chunk-V2UO7ES2.js";import"./chunk-HDDAGHHE.js";import{T as ee,U as te,ha as ne,ma as ie,qa as ae}from"./chunk-YF6JHIN5.js";import"./chunk-2YUSBRXY.js";import{$ as x,Bb as K,Cb as Q,Db as p,Eb as e,Fb as t,Gb as I,Gc as _,Hc as C,Ic as E,Kb as Y,Lb as Z,Nb as B,Rc as L,Ta as r,W as X,Wb as S,_b as h,ac as g,ea as y,fa as b,ga as V,ha as j,hb as H,lc as G,mb as P,oc as o,pc as m,qa as N,qc as u,rc as $,sa as W,xb as D,yb as F,zb as q}from"./chunk-K5XGRFWJ.js";import"./chunk-7CGTOI24.js";var U=class s{#e=x(z);#n=x(ge);#i=N([]);recentFiles=this.#i.asReadonly();#r=5;#s=N(null);etaData=this.#s.asReadonly();#a=null;#t=null;#o=null;recentFileEffect=W(()=>{let i=this.#e.statusData();i&&i.CurrentFilename&&i.CurrentFilesize!==void 0&&this.#l(i.CurrentFilename,i.CurrentFilesize)});#l(i,n){let a=new Date;this.#i.update(l=>l.length>0&&l[0].filename===i?l:[{filename:i,filesize:n,timestamp:a},...l].slice(0,this.#r))}activateView(){this.#a=new Date;let i=this.#e.statusData();i&&i.ProcessedFileCount!==void 0&&i.ProcessedFileSize!==void 0&&(this.#t={files:i.ProcessedFileCount,bytes:i.ProcessedFileSize}),this.#o=setInterval(()=>{this.#c()},1e3)}deactivateView(){this.#a=null,this.#t=null,this.#o&&(clearInterval(this.#o),this.#o=null)}#c(){if(!this.#a||!this.#t)return;let i=this.#e.statusData();if(!i)return;let n=new Date,a=(n.getTime()-this.#a.getTime())/1e3;if(a<5)return;let l=i.ProcessedFileCount||0,d=i.ProcessedFileSize||0,c=l-this.#t.files,k=d-this.#t.bytes,M=c/a,O=k/a,A=(i.TotalFileCount||0)-l,f=(i.TotalFileSize||0)-d,T=null,v=null;M>0&&(T=A/M),O>0&&(v=f/O);let R=null,w="bytes";if(T!==null&&v!==null){let Se=Math.max(T,v);R=new Date(n.getTime()+Se*1e3),w=T>v?"files":"bytes"}else T!==null?(R=new Date(n.getTime()+T*1e3),w="files"):v!==null&&(R=new Date(n.getTime()+v*1e3),w="bytes");this.#s.set({startTime:this.#a,filesProcessedAtStart:this.#t.files,bytesProcessedAtStart:this.#t.bytes,currentFilesPerSecond:M,currentBytesPerSecond:O,estimatedCompletion:R,metric:w})}static \u0275fac=function(n){return new(n||s)};static \u0275prov=X({token:s,factory:s.\u0275fac,providedIn:"root"})};function xe(s,i){if(s&1&&(e(0,"div",42)(1,"span",20),o(2,"Processing"),t(),e(3,"sh-list",43)(4,"div",44)(5,"sh-icon"),o(6,"file"),t(),e(7,"div",45)(8,"span",46),o(9),t(),e(10,"span",47),o(11),_(12,"bytes"),t()()()()()),s&2){let n,a,l,d=g(2);r(8),p("title",(n=d.statusData())==null?null:n.CurrentFilename),r(),u(" ",(a=d.statusData())==null?null:a.CurrentFilename," "),r(2),m(C(12,3,(l=d.statusData())==null?null:l.CurrentFilesize))}}function Me(s,i){if(s&1&&(e(0,"div",35)(1,"span",46),o(2),t(),e(3,"span",47),o(4),_(5,"bytes"),t()()),s&2){let n=i.$implicit;r(),p("title",n.filename),r(),m(n.filename),r(2),m(C(5,3,n.filesize))}}function Oe(s,i){s&1&&(e(0,"div",36),S(1,2),t())}function Te(s,i){if(s&1&&(e(0,"sh-list")(1,"div",48)(2,"span",20),o(3,"ETA"),t(),e(4,"span",21),o(5),_(6,"date"),e(7,"span",49),o(8),_(9,"relativeTime"),t()()(),e(10,"div",50)(11,"span",20),o(12,"Files/s"),t(),e(13,"span",21),o(14),_(15,"number"),t()(),e(16,"div",50)(17,"span",20),o(18,"Upload Speed"),t(),e(19,"span",21),o(20),_(21,"bytes"),t()()()),s&2){let n,a,l,d,c=g(2);r(5),u(" ",E(6,4,(n=c.etaData())==null?null:n.estimatedCompletion,"mediumTime")," "),r(3),u("(",C(9,7,(a=c.etaData())==null?null:a.estimatedCompletion),")"),r(6),m(E(15,9,(l=c.etaData())==null?null:l.currentFilesPerSecond,"1.1-1")),r(6),u("",C(21,12,(d=c.etaData())==null?null:d.currentBytesPerSecond),"/s")}}function ve(s,i){if(s&1&&(e(0,"div",53)(1,"div",54)(2,"span",55),o(3),t(),e(4,"span",56),o(5),_(6,"bytes"),t()(),I(7,"sh-progress-bar",57),t()),s&2){let n=i.$implicit;r(2),p("title",n.BackendPath),r(),m(n.BackendPath),r(2),u("",C(6,4,n.BackendSpeed),"/s"),r(2),p("value",(n.BackendFileProgress||0)/(n.BackendFileSize||1)*100)}}function he(s,i){if(s&1&&(e(0,"div",51)(1,"sh-list"),P(2,ve,8,6,"div",52),t()()),s&2){let n,a=g(2);r(2),p("ngForOf",(n=a.statusData())==null?null:n.ActiveTransfers)}}function Ee(s,i){if(s&1){let n=B();e(0,"sh-card")(1,"div",13)(2,"div",14)(3,"sh-icon",15),o(4,"clock"),t(),e(5,"h2"),o(6),t()()(),e(7,"div",26)(8,"div",27)(9,"span",28),o(10),_(11,"number"),t()(),I(12,"sh-progress-bar",29),e(13,"sh-list")(14,"div",30)(15,"span",20),o(16,"Files"),t(),e(17,"span",21),o(18),t()(),e(19,"div",30)(20,"span",20),o(21,"Size"),t(),e(22,"span",21),o(23),_(24,"bytes"),_(25,"bytes"),t()()()()(),e(26,"sh-card")(27,"div",13)(28,"div",14)(29,"sh-icon",15),o(30,"file"),t(),e(31,"h3"),o(32,"Activity"),t()()(),e(33,"div",31),P(34,xe,13,5,"div",32),e(35,"div",33)(36,"span",20),S(37,1),t(),e(38,"sh-list",34),K(39,Me,6,5,"div",35,q),D(41,Oe,2,0,"div",36),t()()()(),e(42,"sh-card")(43,"div",13)(44,"div",14)(45,"sh-icon",15),o(46,"gauge"),t(),e(47,"h3"),o(48,"Performance"),t()(),e(49,"div",37),o(50),_(51,"bytes"),t()(),e(52,"div",38),P(53,Te,22,14,"sh-list",25),e(54,"div",39)(55,"button",40),h("click",function(){y(n);let l=g();return b(l.toggleTransfers())}),o(56),t(),P(57,he,3,1,"div",41),t()()()}if(s&2){let n,a,l,d,c=g();r(6),m(c.statusText()),r(4),u("",E(11,13,c.progress(),"1.0-0"),"%"),r(2),p("value",c.progress()),r(6),$("",(n=c.statusData())==null?null:n.ProcessedFileCount," / ",(n=c.statusData())==null?null:n.TotalFileCount),r(5),$(" ",C(24,16,(a=c.statusData())==null?null:a.ProcessedFileSize)," / ",C(25,18,(a=c.statusData())==null?null:a.TotalFileSize)," "),r(11),p("ngIf",(l=c.statusData())==null?null:l.CurrentFilename),r(5),Q(c.recentFiles()),r(2),F(c.recentFiles().length===0?41:-1),r(9),u("",C(51,20,(d=c.statusData())==null?null:d.BackendSpeed),"/s"),r(3),p("ngIf",c.etaData()),r(3),u(" ",c.transfersExpanded()?"Hide Details":"Show Details"," "),r(),p("ngIf",c.transfersExpanded())}}function ye(s,i){if(s&1&&(e(0,"sh-card",75)(1,"div",13)(2,"div",14)(3,"sh-icon",15),o(4,"calendar"),t(),e(5,"h3"),S(6,7),t()()(),e(7,"div",76)(8,"div",77)(9,"span",78),o(10),t(),e(11,"div",79)(12,"span",80),o(13),_(14,"date"),t(),e(15,"span",81),o(16),_(17,"relativeTime"),t()()(),e(18,"sh-icon",82),o(19,"caret-right"),t()()()),s&2){let n,a=g(2);r(10),m((n=a.nextBackup().backup)==null?null:n.Name),r(3),m(E(14,3,a.nextBackup().time,"medium")),r(3),u("(",C(17,6,a.nextBackup().time),")")}}function be(s,i){s&1&&(e(0,"span",74),S(1,8),t())}function Ne(s,i){if(s&1){let n=B();e(0,"sh-card",58)(1,"div",59)(2,"div",60)(3,"div",61),V(),e(4,"svg",62),I(5,"circle",63),t(),j(),e(6,"sh-icon",64),S(7,3),t()()(),e(8,"div",65)(9,"h2"),S(10,4),t(),e(11,"p",66),S(12,5),t()(),e(13,"div",67)(14,"button",68),h("click",function(){y(n);let l=g();return b(l.pauseResume())}),e(15,"sh-icon"),o(16),t(),o(17),t()()()(),P(18,ye,20,8,"sh-card",69),e(19,"sh-card",70)(20,"div",71)(21,"span",20),S(22,6),t(),e(23,"div",72)(24,"span",73),o(25),t(),D(26,be,2,0,"span",74),t()()()}if(s&2){let n,a=g();r(14),p("color",a.clientIsRunning()?"primary":"accent"),r(2),m(a.clientIsRunning()?"pause":"play"),r(),u(" ",a.clientIsRunning()?"Pause Execution":"Resume Execution"," "),r(),p("ngIf",a.nextBackup()),r(6),G("running",a.clientIsRunning()),r(),m((n=a.serverState())==null?null:n.ProgramState),r(),F(a.clientIsRunning()?-1:26)}}function Ie(s,i){if(s&1&&(e(0,"div",35)(1,"span",46),o(2),t(),e(3,"span",47),o(4),_(5,"bytes"),t()()),s&2){let n=i.$implicit;r(),p("title",n.filename),r(),m(n.filename),r(2),m(C(5,3,n.filesize))}}function ke(s,i){if(s&1&&(e(0,"sh-card",83)(1,"div",13)(2,"div",14)(3,"sh-icon",15),o(4,"clock-counter-clockwise"),t(),e(5,"h3"),S(6,9),t()()(),e(7,"sh-list"),P(8,Ie,6,5,"div",84),t()()),s&2){let n=g();r(8),p("ngForOf",n.recentFiles())}}function Ae(s,i){if(s&1&&(e(0,"div",19)(1,"span",20),o(2,"Next Task:"),t(),e(3,"div",21)(4,"div"),o(5),t(),e(6,"div",49),o(7),_(8,"date"),_(9,"relativeTime"),t()()()),s&2){let n,a=g();r(5),m((n=a.nextBackup().backup)==null?null:n.Name),r(2),$(" ",E(8,3,a.nextBackup().time,"medium")," (",C(9,6,a.nextBackup().time),") ")}}function Re(s,i){if(s&1){let n=B();Y(0),e(1,"button",85),h("click",function(){y(n);let l=g();return b(l.stop())}),e(2,"sh-icon"),o(3,"stop"),t(),o(4," Stop "),t(),e(5,"button",85),h("click",function(){y(n);let l=g();return b(l.abort())}),e(6,"sh-icon"),o(7,"x-circle"),t(),o(8," Abort "),t(),Z()}}var J=class s{#e=x(z);#n=x(U);#i=x(_e);#r=x(re);statusData=this.#e.statusData;serverState=this.#e.serverState;recentFiles=this.#n.recentFiles;etaData=this.#n.etaData;transfersExpanded=N(!1);clientIsRunning=this.#e.clientIsRunning;statusText=L(()=>{let i=this.statusData()?.Phase;return i?pe[i]||i:""});progress=L(()=>{let i=this.statusData();return i?(i.OverallProgress||0)*100:0});nextBackup=L(()=>({backup:this.serverState()?.ProposedSchedule?.[0]?.backup,time:this.serverState()?.ProposedSchedule?.[0]?.Item2}));ngOnInit(){this.#n.activateView()}ngOnDestroy(){this.#n.deactivateView()}toggleTransfers(){this.transfersExpanded.update(i=>!i)}isTaskRunning(){return!!this.statusData()?.TaskID}taskStartTime(){return this.etaData()?.startTime}currentBackupId(){return this.statusData()?.BackupID}pauseResume(){if(this.clientIsRunning()){this.#r.open(ue,{maxWidth:"550px",width:"100%"});return}this.#e.pauseResume().subscribe()}stop(){let i=this.statusData()?.TaskID;i&&this.#i.postApiV1TaskByTaskidStop({taskid:i}).subscribe()}abort(){let i=this.statusData()?.TaskID;i&&this.#i.postApiV1TaskByTaskidAbort({taskid:i}).subscribe()}static \u0275fac=function(n){return new(n||s)};static \u0275cmp=H({type:s,selectors:[["app-status"]],decls:29,vars:12,consts:()=>{let i;i=$localize`Live Logs`;let n;n=$localize`Recently Processed`;let a;a=$localize`No recent files`;let l;l=$localize`check-bold`;let d;d=$localize`System Ready`;let c;c=$localize`Waiting for the next scheduled backup task.`;let k;k=$localize`Server State`;let M;M=$localize`Next Scheduled Task`;let O;O=$localize`Backups are currently paused`;let A;return A=$localize`Recent Activity`,[i,n,a,l,d,c,k,M,O,A,[1,"status-page"],["class","activity-card",4,"ngIf"],[1,"logs-card"],[1,"card-header"],[1,"header-titl-group"],[1,"header-icon"],[1,"logs-content"],[3,"polling","whenFilter","backupIdFilter"],[1,"server-status-section"],[1,"status-row"],[1,"label"],[1,"value"],["class","status-row",4,"ngIf"],[1,"actions"],["shButton","",3,"click"],[4,"ngIf"],[1,"progress-content"],[1,"percentage-display"],[1,"percentage-value"],[3,"value"],["item","",1,"stat-item"],[1,"files-content"],["class","current-file-section",4,"ngIf"],[1,"recent-files-section"],[1,"recent-files-list"],["item","",1,"file-item"],["item","",1,"empty-state"],[1,"aggregate-speed"],[1,"performance-content"],[1,"transfers-section"],["shButton","","size","small",1,"toggle-btn","ghost",3,"click"],["class","transfer-details",4,"ngIf"],[1,"current-file-section"],[1,"current-file-list"],["item","",1,"file-item","current"],[1,"file-details"],[1,"filename",3,"title"],[1,"filesize"],["item","",1,"eta-item"],[1,"sub-text"],["item","",1,"metric-item"],[1,"transfer-details"],["class","transfer-item","item","",4,"ngFor","ngForOf"],["item","",1,"transfer-item"],[1,"transfer-header"],[1,"path",3,"title"],[1,"speed"],[1,"mini-progress",3,"value"],[1,"idle-hero-card"],[1,"idle-content"],[1,"status-visual"],[1,"complete-status"],[1,"border-svg"],["cx","50","cy","50","r","45",1,"border-circle"],[1,"status-icon"],[1,"status-info"],[1,"status-description"],[1,"idle-actions"],["shButton","",3,"click","color"],["class","next-task-hero",4,"ngIf"],[1,"server-state-card"],[1,"state-content"],[1,"state-line"],[1,"status-badge"],[1,"warning-text"],[1,"next-task-hero"],[1,"next-task-content"],[1,"task-main"],[1,"task-name"],[1,"task-time-group"],[1,"task-time"],[1,"task-relative"],[1,"chevron"],[1,"activity-card"],["class","file-item","item","",4,"ngFor","ngForOf"],["shButton","","color","warn",3,"click"]]},template:function(n,a){if(n&1&&(e(0,"div",10),D(1,Ee,58,22)(2,Ne,27,8),P(3,ke,9,1,"sh-card",11),e(4,"sh-card",12)(5,"div",13)(6,"div",14)(7,"sh-icon",15),o(8,"list"),t(),e(9,"h3"),S(10,0),t()()(),e(11,"div",16),I(12,"app-logs-live",17),t()(),e(13,"sh-card")(14,"div",18)(15,"h3"),o(16,"Server Status"),t(),e(17,"div",19)(18,"span",20),o(19,"State:"),t(),e(20,"span",21),o(21),t()(),P(22,Ae,10,8,"div",22),e(23,"div",23)(24,"button",24),h("click",function(){return a.pauseResume()}),e(25,"sh-icon"),o(26),t(),o(27),t(),P(28,Re,9,0,"ng-container",25),t()()()()),n&2){let l,d;G("idle",!a.isTaskRunning()),r(),F(a.isTaskRunning()?1:2),r(2),p("ngIf",!a.isTaskRunning()&&a.recentFiles().length>0),r(9),p("polling",a.isTaskRunning())("whenFilter",(l=a.taskStartTime())==null?null:l.getTime())("backupIdFilter",a.currentBackupId()),r(9),m((d=a.serverState())==null?null:d.ProgramState),r(),p("ngIf",a.nextBackup()),r(4),m(a.clientIsRunning()?"pause":"play_arrow"),r(),u(" ",a.clientIsRunning()?"Pause":"Resume"," "),r(),p("ngIf",a.isTaskRunning())}},dependencies:[ae,ee,te,le,de,se,oe,fe,ce,ie,ne,me,Ce],styles:["[_nghost-%COMP%]{display:block;padding:24px;max-width:1400px;margin:0 auto}.status-page[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr;gap:24px}@media(min-width:768px){.status-page[_ngcontent-%COMP%]{grid-template-columns:repeat(2,1fr)}}@media(min-width:1200px){.status-page[_ngcontent-%COMP%]{grid-template-columns:repeat(3,1fr)}}@media(min-width:1200px){.status-page[_ngcontent-%COMP%] .logs-card[_ngcontent-%COMP%], .status-page.idle[_ngcontent-%COMP%] .idle-hero-card[_ngcontent-%COMP%]{grid-column:span 2}.status-page.idle[_ngcontent-%COMP%] .next-task-hero[_ngcontent-%COMP%], .status-page.idle[_ngcontent-%COMP%] .server-state-card[_ngcontent-%COMP%]{grid-column:3}.status-page.idle[_ngcontent-%COMP%] .activity-card[_ngcontent-%COMP%], .status-page.idle[_ngcontent-%COMP%] .logs-card[_ngcontent-%COMP%]{grid-column:1/-1}}sh-card[_ngcontent-%COMP%]{height:100%;display:flex;flex-direction:column;--sh-card-padding: 24px}.card-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}.card-header[_ngcontent-%COMP%] .header-titl-group[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px}.card-header[_ngcontent-%COMP%] .header-titl-group[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{color:var(--primary-color);font-size:24px}.card-header[_ngcontent-%COMP%] .header-titl-group[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], .card-header[_ngcontent-%COMP%] .header-titl-group[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0;font-size:1.1rem;font-weight:600;color:var(--text-primary)}.progress-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:20px}.progress-content[_ngcontent-%COMP%] .percentage-display[_ngcontent-%COMP%]{text-align:center}.progress-content[_ngcontent-%COMP%] .percentage-display[_ngcontent-%COMP%] .percentage-value[_ngcontent-%COMP%]{font-size:3rem;font-weight:800;color:var(--primary-color);line-height:1}.progress-content[_ngcontent-%COMP%] sh-progress-bar[_ngcontent-%COMP%]{height:8px;border-radius:4px;--sh-progress-bar-track-color: var(--bg-secondary)}.progress-content[_ngcontent-%COMP%] .stat-item[_ngcontent-%COMP%]{display:flex;justify-content:space-between;width:100%}.progress-content[_ngcontent-%COMP%] .stat-item[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{color:var(--text-secondary);font-size:.9rem}.progress-content[_ngcontent-%COMP%] .stat-item[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-weight:600}.files-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px}.files-content[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{font-size:.75rem;text-transform:uppercase;color:var(--text-secondary);font-weight:600;margin-bottom:4px;display:block;padding-left:12px}.files-content[_ngcontent-%COMP%] .file-item[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%}.files-content[_ngcontent-%COMP%] .file-item.current[_ngcontent-%COMP%]{gap:12px;justify-content:flex-start}.files-content[_ngcontent-%COMP%] .file-item.current[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{color:var(--primary-color)}.files-content[_ngcontent-%COMP%] .file-item.current[_ngcontent-%COMP%] .file-details[_ngcontent-%COMP%]{display:flex;flex-direction:column;overflow:hidden}.files-content[_ngcontent-%COMP%] .file-item[_ngcontent-%COMP%] .filename[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-right:12px;font-size:.9rem;font-weight:500;flex:1}.files-content[_ngcontent-%COMP%] .file-item[_ngcontent-%COMP%] .filesize[_ngcontent-%COMP%]{color:var(--text-secondary);font-size:.85rem;font-variant-numeric:tabular-nums;white-space:nowrap}.files-content[_ngcontent-%COMP%] .empty-state[_ngcontent-%COMP%]{color:var(--text-secondary);font-style:italic;text-align:center;width:100%}.performance-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px}.performance-content[_ngcontent-%COMP%] .aggregate-speed[_ngcontent-%COMP%]{font-size:1.2rem;font-weight:700;color:var(--text-primary);font-variant-numeric:tabular-nums}.performance-content[_ngcontent-%COMP%] .eta-item[_ngcontent-%COMP%], .performance-content[_ngcontent-%COMP%] .metric-item[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%}.performance-content[_ngcontent-%COMP%] .eta-item[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .performance-content[_ngcontent-%COMP%] .metric-item[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{color:var(--text-secondary);font-size:.9rem}.performance-content[_ngcontent-%COMP%] .eta-item[_ngcontent-%COMP%] .value[_ngcontent-%COMP%], .performance-content[_ngcontent-%COMP%] .metric-item[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-weight:600;font-variant-numeric:tabular-nums}.performance-content[_ngcontent-%COMP%] .eta-item[_ngcontent-%COMP%] .value[_ngcontent-%COMP%] .sub-text[_ngcontent-%COMP%], .performance-content[_ngcontent-%COMP%] .metric-item[_ngcontent-%COMP%] .value[_ngcontent-%COMP%] .sub-text[_ngcontent-%COMP%]{color:var(--text-secondary);font-weight:400;font-size:.85rem;margin-left:4px}.performance-content[_ngcontent-%COMP%] .transfers-section[_ngcontent-%COMP%] .toggle-btn[_ngcontent-%COMP%]{width:100%;margin-bottom:12px}.performance-content[_ngcontent-%COMP%] .transfers-section[_ngcontent-%COMP%] .transfer-item[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;gap:4px}.performance-content[_ngcontent-%COMP%] .transfers-section[_ngcontent-%COMP%] .transfer-item[_ngcontent-%COMP%] .transfer-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;font-size:.85rem}.performance-content[_ngcontent-%COMP%] .transfers-section[_ngcontent-%COMP%] .transfer-item[_ngcontent-%COMP%] .transfer-header[_ngcontent-%COMP%] .path[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-right:12px}.performance-content[_ngcontent-%COMP%] .transfers-section[_ngcontent-%COMP%] .transfer-item[_ngcontent-%COMP%] .transfer-header[_ngcontent-%COMP%] .speed[_ngcontent-%COMP%]{color:var(--text-secondary);font-variant-numeric:tabular-nums}.performance-content[_ngcontent-%COMP%] .transfers-section[_ngcontent-%COMP%] .transfer-item[_ngcontent-%COMP%] .mini-progress[_ngcontent-%COMP%]{height:4px}.logs-content[_ngcontent-%COMP%] app-logs-live[_ngcontent-%COMP%]{height:350px;display:block}.status-badge[_ngcontent-%COMP%]{padding:4px 12px;border-radius:12px;background:var(--bg-secondary);color:var(--text-secondary);font-size:.8rem;font-weight:500;text-transform:uppercase}.status-badge.running[_ngcontent-%COMP%]{background:rgba(var(--primary-rgb),.1);color:var(--primary-color)}.actions-grid[_ngcontent-%COMP%]{margin-top:auto;display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:12px}.actions-grid[_ngcontent-%COMP%] .action-btn[_ngcontent-%COMP%]{width:100%;justify-content:center}.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:32px 0;gap:32px}@media(min-width:768px){.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%]{flex-direction:row;text-align:left;justify-content:space-around;padding:48px 0}}.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%] .status-visual[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%] .status-info[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:2rem;font-weight:700;margin-bottom:8px;color:var(--text-primary)}.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%] .status-info[_ngcontent-%COMP%] .status-description[_ngcontent-%COMP%]{color:var(--text-secondary);font-size:1.1rem;max-width:300px}.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%] .idle-actions[_ngcontent-%COMP%]{display:flex;align-items:center}.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%] .idle-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding-left:32px;padding-right:32px}.complete-status[_ngcontent-%COMP%]{position:relative;width:120px;height:120px;display:flex;justify-content:center;align-items:center;color:var(--primary-color)}.complete-status[_ngcontent-%COMP%] .status-icon[_ngcontent-%COMP%]{font-size:48px;opacity:0;animation:_ngcontent-%COMP%_reveal-icon .2s linear forwards;animation-delay:1s}.border-svg[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%}.border-circle[_ngcontent-%COMP%]{fill:none;stroke:var(--primary-color);stroke-width:5px;stroke-dasharray:282.74;stroke-dashoffset:282.74;animation:_ngcontent-%COMP%_draw-border 1.2s linear forwards}@keyframes _ngcontent-%COMP%_draw-border{to{stroke-dashoffset:0}}@keyframes _ngcontent-%COMP%_reveal-icon{to{opacity:1}}.next-task-hero[_ngcontent-%COMP%] .next-task-content[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;padding:12px 0}.next-task-hero[_ngcontent-%COMP%] .next-task-content[_ngcontent-%COMP%] .task-main[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px}.next-task-hero[_ngcontent-%COMP%] .next-task-content[_ngcontent-%COMP%] .task-main[_ngcontent-%COMP%] .task-name[_ngcontent-%COMP%]{font-size:1.2rem;font-weight:700;color:var(--primary-color)}.next-task-hero[_ngcontent-%COMP%] .next-task-content[_ngcontent-%COMP%] .task-main[_ngcontent-%COMP%] .task-time-group[_ngcontent-%COMP%]{display:flex;flex-direction:column;color:var(--text-secondary);font-size:.95rem}.next-task-hero[_ngcontent-%COMP%] .next-task-content[_ngcontent-%COMP%] .chevron[_ngcontent-%COMP%]{color:var(--text-secondary);opacity:.5}.server-state-card[_ngcontent-%COMP%] .state-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px}.server-state-card[_ngcontent-%COMP%] .state-content[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{font-size:.75rem;text-transform:uppercase;color:var(--text-secondary);font-weight:600}.server-state-card[_ngcontent-%COMP%] .state-content[_ngcontent-%COMP%] .state-line[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px}.server-state-card[_ngcontent-%COMP%] .state-content[_ngcontent-%COMP%] .state-line[_ngcontent-%COMP%] .warning-text[_ngcontent-%COMP%]{font-size:.85rem;color:var(--error-color);font-weight:500}"],changeDetection:0})};export{J as default};
|
package/chunk-NE255HQN.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as v}from"./chunk-UIVZWXBK.js";import{a as N,b}from"./chunk-OP7MDR2B.js";import{a as S}from"./chunk-NUV5LHQV.js";import{d as g}from"./chunk-KNSQLQC6.js";import{$ as s,B as d,E as o,O as p,Rc as m,W as u,l as f,qa as c,sa as n,w as h}from"./chunk-K5XGRFWJ.js";var l=class r{#e=s(g);#o=s(v);#s=s(b);#a=s(S);#n=s(N);serverState=this.#o.serverState;serverStateEffect=n(()=>{let t=this.#o.serverState();t?.LastNotificationUpdateID&&this.updateLastNotificationEventId(t?.LastNotificationUpdateID)});#r=-1;#t=c([]);#i=c([]);notifications=this.#t.asReadonly();pendingRefresh=!1;constructor(){this.#n.subscribe("notifications")}init(){this.notifications().length===0&&this.getNotifications()}notificationsEffect=n(()=>{let t=this.#n.notificationState();t&&this.#t.set(t)});pendingRefreshEffect=n(()=>{this.#s.isConnectionMethodSet()&&this.pendingRefresh&&(this.pendingRefresh=!1,this.getNotifications())});#c=m(()=>{let t=this.#s.getConnectionMethod()==="websocket",i=this.#a.hasWsRemoteControl();return t&&i});updateLastNotificationEventId(t){this.#r!==t&&(this.#r=t,this.getNotifications())}getNotifications(){if(!this.#c()){if(!this.#s.isConnectionMethodSet()){this.pendingRefresh=!0;return}this.#e.getApiV1Notifications().pipe(o(1),p(t=>this.#t.set(t))).subscribe()}}getNofication(t){this.#e.getApiV1NotificationById({id:t}).pipe(o(1)).subscribe()}deleteNotification(t){let i=this.#t(),e=i[t];this.#i.set(i),i.splice(t,1),this.#t.set(i),this.#e.deleteApiV1NotificationById({id:e.ID}).pipe(o(1)).subscribe({error:()=>{this.#t.set(this.#i()),this.#i.set([])}})}deleteAllNotifications(){let t=this.#t();this.#i.set(t),this.#t.set([]);let i=t.map(e=>this.#e.deleteApiV1NotificationById({id:e.ID}).pipe(d(()=>f(e))));h(i).pipe(o(1)).subscribe({next:e=>{let D=e.filter(a=>a!=null&&"ID"in a);this.#t.set(D),this.#i.set([])},error:()=>{this.#t.set(this.#i()),this.#i.set([])}})}static \u0275fac=function(i){return new(i||r)};static \u0275prov=u({token:r,factory:r.\u0275fac,providedIn:"root"})};export{l as a};
|
package/chunk-NQAD2FBX.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as A}from"./chunk-EXAZ4QZR.js";import"./chunk-TWWAK5M6.js";import"./chunk-6DX35WDO.js";import"./chunk-35FMFK4I.js";import"./chunk-UIVZWXBK.js";import"./chunk-E4CYVUYG.js";import"./chunk-BPHX6VXP.js";import"./chunk-XWML36YQ.js";import"./chunk-6Q6SSTBK.js";import"./chunk-COEGVUM3.js";import"./chunk-YS4B2B5N.js";import"./chunk-KZYRTI62.js";import"./chunk-TSVSMVY4.js";import"./chunk-2KD757N6.js";import"./chunk-OP7MDR2B.js";import"./chunk-PEOYNJJM.js";import"./chunk-NUV5LHQV.js";import"./chunk-PDZNQW6F.js";import{U as S}from"./chunk-CJKZ27FM.js";import"./chunk-KNSQLQC6.js";import{c as u,e as N,f as c}from"./chunk-CQJRBQ6I.js";import"./chunk-V2UO7ES2.js";import"./chunk-HDDAGHHE.js";import"./chunk-YF6JHIN5.js";import"./chunk-2YUSBRXY.js";import{Eb as e,Fb as t,Gb as T,Wb as n,hb as g}from"./chunk-K5XGRFWJ.js";import"./chunk-7CGTOI24.js";var l=class s{static \u0275fac=function(o){return new(o||s)};static \u0275cmp=g({type:s,selectors:[["app-about"]],decls:19,vars:0,consts:()=>{let i;i=$localize`General`;let o;o=$localize`Changelog`;let r;r=$localize`Libraries`;let a;a=$localize`System info`;let C;C=$localize`Server settings`;let E;E=$localize`Logs`;let O;return O=$localize`Crash log`,[i,o,r,a,C,E,O,[1,"content"],[1,"primary"],["tab","","routerLink","/about/general","routerLinkActive","active"],["tab","","routerLink","/about/changelog","routerLinkActive","active"],["tab","","routerLink","/about/libraries","routerLinkActive","active"],["tab","","routerLink","/about/system-info","routerLinkActive","active"],["tab","","routerLink","/about/server-settings","routerLinkActive","active"],["tab","","routerLink","/about/logs","routerLinkActive","active"],["tab","","routerLink","/about/crashlogs","routerLinkActive","active"]]},template:function(o,r){o&1&&(T(0,"app-status-bar"),e(1,"div",7)(2,"sh-tabs",8)(3,"button",9),n(4,0),t(),e(5,"button",10),n(6,1),t(),e(7,"button",11),n(8,2),t(),e(9,"button",12),n(10,3),t(),e(11,"button",13),n(12,4),t(),e(13,"button",14),n(14,5),t(),e(15,"button",15),n(16,6),t()(),e(17,"section"),T(18,"router-outlet"),t()())},dependencies:[A,S,u,N,c],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:0}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:1rem 0}.content[_ngcontent-%COMP%] sh-tabs[_ngcontent-%COMP%]{margin:0 2rem 2rem}.content[_ngcontent-%COMP%] section[_ngcontent-%COMP%]{padding:0}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:2rem}"],changeDetection:0})};export{l as default};
|
package/chunk-NUV5LHQV.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as m}from"./chunk-KNSQLQC6.js";import{$ as l,G as u,O as d,Rc as s,W as p,qa as r}from"./chunk-K5XGRFWJ.js";var c=class a{#s=l(m);isLoaded=r(!1);systemInfo=r(null);filterGroups=r(null);backendModules=s(()=>this.systemInfo()?.BackendModules??[]);sourceProviderModules=s(()=>this.systemInfo()?.SourceProviderModules??[]);restoreDestinationProviderModules=s(()=>this.systemInfo()?.RestoreDestinationProviderModules??[]);allOptionsGrouped=s(()=>{let e={displayName:"Default",options:this.systemInfo()?.Options?.map(i=>this.#t(i,this.systemInfo()))??[]},t=this.systemInfo()?.GenericModules?.map(i=>({displayName:i.DisplayName??i.Key,options:i.Options?.map(this.#e)??[]}))??[],o=this.systemInfo()?.CompressionModules?.map(i=>({displayName:i.DisplayName??i.Key,options:i.Options?.map(this.#e)??[]}))??[],n=this.systemInfo()?.EncryptionModules?.map(i=>({displayName:i.DisplayName??i.Key,options:i.Options?.map(this.#e)??[]}))??[];return[e,...t,...o,...n]});allOptions=s(()=>this.allOptionsGrouped().reduce((e,t)=>[...e,...t.options],[]));hasWebSocket=s(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:websocket"));hasV2ListOperations=s(()=>{let e=this.systemInfo()?.APIExtensions??[];return e.includes("v2:backup:list-filesets")&&e.includes("v2:backup:list-folder")});hasV2TestOperations=s(()=>(this.systemInfo()?.APIExtensions??[]).includes("v2:destination:test"));hasProgressSubscribeOption=s(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:subscribe:progress"));hasTaskSubscribeOption=s(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:subscribe:taskqueue"));hasTaskCompletedOption=s(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:subscribe:taskcompleted"));hasBackupListSubscribeOption=s(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:subscribe:backuplist"));hasWebSocketAuth=s(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:websocket:authenticate"));hasWsRemoteControl=s(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:subscribe:remotecontrol"));hasWsNotifications=s(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:subscribe:notifications"));hasIpcController=s(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:ipc:controller"));defaultOAuthUrl=s(()=>{let e=this.systemInfo()?.DefaultOAuthURL??"https://duplicati-oauth-handler.appspot.com/";return e.endsWith("/refresh")?e.slice(0,-8):e});defaultOAuthUrlV2=s(()=>{let e=this.systemInfo()?.DefaultOAuthURLv2??"https://oauth-service.duplicati.com/";return e.endsWith("/refresh")?e.slice(0,-8):e});resolveShorthandPath(e){if(!e.startsWith("%")||!e.endsWith("%"))return e;let t=this.systemInfo()?.SpecialFolders;return t?t.find(n=>n.ID?.startsWith(e))?.Path??e:e}preload(e=!1){let t=this.#s.getApiV1Systeminfo().pipe(d(o=>{this.systemInfo.set(o)}),u(()=>this.isLoaded.set(!0)));if(e)return t;t.subscribe()}preloadFilterGroups(e=!1){let t=this.#s.getApiV1SysteminfoFiltergroups().pipe(d(o=>{this.filterGroups.set(o)}),u(()=>this.isLoaded.set(!0)));if(e)return t;t.subscribe()}#t(e,t){if(e.Name==="encryption-module"){let o=t?.EncryptionModules?.map(n=>n.Key).filter(n=>n).map(n=>n);if(o&&o.length>0)return{name:e.Name,type:"Enumeration",shortDescription:e.ShortDescription??void 0,longDescription:e.LongDescription??void 0,deprecatedDescription:e.Deprecated??!1?e.DeprecationMessage??void 0:void 0,options:o,defaultValue:e.DefaultValue}}if(e.Name==="compression-module"){let o=t?.CompressionModules?.map(n=>n.Key).filter(n=>n).map(n=>n);if(o&&o.length>0)return{name:e.Name,type:"Enumeration",shortDescription:e.ShortDescription??void 0,longDescription:e.LongDescription??void 0,deprecatedDescription:e.Deprecated??!1?e.DeprecationMessage??void 0:void 0,options:o,defaultValue:e.DefaultValue}}return this.#e(e)}#e(e){return{name:e.Name,type:e.Type,shortDescription:e.ShortDescription??void 0,longDescription:e.LongDescription??void 0,deprecatedDescription:e.Deprecated??!1?e.DeprecationMessage??void 0:void 0,options:e.ValidValues,defaultValue:e.DefaultValue}}static \u0275fac=function(t){return new(t||a)};static \u0275prov=p({token:a,factory:a.\u0275fac,providedIn:"root"})};export{c as a};
|
package/chunk-O2HQIEE4.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d}from"./chunk-KNSQLQC6.js";import{$ as r,G as n,Rc as s,W as o,qa as l,sa as g}from"./chunk-K5XGRFWJ.js";var u=[{value:"Disabled",label:$localize`Disabled`},{value:"Verbose",label:$localize`Verbose`},{value:"ExplicitOnly",label:$localize`Explicit only`},{value:"Profiling",label:$localize`Profiling`},{value:"Retry",label:$localize`Retry`},{value:"Information",label:$localize`Information`},{value:"DryRun",label:$localize`Dry run`},{value:"Warning",label:$localize`Warning`},{value:"Error",label:$localize`Error`}],v=class a{#l=r(d);#e=l([]);LOG_LEVELS=u;logLevel=l("Disabled");logLevelByLabel=s(()=>u.find(e=>e.value===this.logLevel())?.label);whenFilter=l(null);backupIdFilter=l(null);id=l(0);logs=s(()=>this.whenFilter()&&this.backupIdFilter()?this.#e().filter(e=>e.BackupID===this.backupIdFilter()&&new Date(e.When).getTime()>=this.whenFilter()&&e.BackupID===this.backupIdFilter()):this.#e());timerInterval;logsLoading=l(!1);isPolling=l(!1);pagination=l({offset:0,pagesize:100});logLevelEffect=g(()=>{this.isPolling()?(this.#e.set([]),this.id.set(0),queueMicrotask(()=>this.loadLogs()),this.timerInterval&&clearInterval(this.timerInterval),this.timerInterval=setInterval(()=>{this.loadLogs()},3e3)):this.clearPolling()});setWhenFilter(e){this.whenFilter.set(e)}setBackupIdFilter(e){this.backupIdFilter.set(e)}loadLogs(){this.logsLoading.set(!0),this.#l.getApiV1LogdataPoll({id:this.id(),level:this.logLevel(),pagesize:this.pagination().pagesize}).pipe(n(()=>this.logsLoading.set(!1))).subscribe({next:e=>{let i=e.reverse(),t=this.#i(i);t>0&&this.id.set(t),this.#e.set([...i,...this.#e()])}})}updateLogLevel(e){this.logLevel.set(e),e==="Disabled"&&this.clearPolling()}#i(e){return e.reduce((i,t)=>Math.max(i,t.ID),0)}destroy(){this.logLevel.set("Disabled"),this.clearPolling()}clearPolling(){this.timerInterval&&clearInterval(this.timerInterval),this.timerInterval=void 0}static \u0275fac=function(i){return new(i||a)};static \u0275prov=o({token:a,factory:a.\u0275fac,providedIn:"root"})};export{v as a};
|
package/chunk-O2L2FRYE.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import{a as $n,b as Ht,c as vn}from"./chunk-PNQ5BDQN.js";import{a as Ye,b as wt,c as Gt,d as Gn}from"./chunk-2EX5HS5X.js";import{a as On,b as Mn,c as Pe,d as Lt,e as xn,f as Rn,g as bt,i as Ln,j as bn,k as wn}from"./chunk-EVEI25GQ.js";import{b as Pn}from"./chunk-KZYRTI62.js";import{a as Rt}from"./chunk-TSVSMVY4.js";import{a as Wt,b as Ue,c as In}from"./chunk-2KD757N6.js";import{a as ne}from"./chunk-PEOYNJJM.js";import{a as ge}from"./chunk-NUV5LHQV.js";import{B as Y,C as Dn,E as At,F as yn,H as ue,K as Qe,L as It,O as Pt,P as $e,V as Ot,W as ve,Y as Mt,a as fn,b as En,c as ee,d as St,e as te,f as ft,h as hn,i as re,j as Et,k as ht,n as Fn,o as Nn,p as Ft,q as Nt,r as Dt,s as se,t as qe,v as Q,w as yt,z as Ge}from"./chunk-CJKZ27FM.js";import{c as An,d as xt}from"./chunk-KNSQLQC6.js";import{b as je,d as we,e as Sn}from"./chunk-CQJRBQ6I.js";import{aa as Tn}from"./chunk-YF6JHIN5.js";import{$ as O,$c as be,Ac as Cn,B as cn,Bb as fe,Bc as Ae,Cb as Ee,Cc as le,Db as u,Dc as me,Eb as l,Ec as Tt,F as dn,Fb as r,G as Be,Gb as P,Kb as pe,Kc as Je,Lb as ce,M as dt,Mb as ae,Nb as I,O as un,P as pn,Q as ut,Qa as pt,R as mn,Rc as R,Ta as c,Ub as M,Vb as x,W as Ne,Wb as y,Wc as Le,Xc as G,Ya as mt,Yc as Ie,Zb as Ke,_b as T,a as rn,ac as s,bc as He,cc as he,ea as S,f as ct,fa as f,hb as z,hc as De,ia as We,ic as ye,jc as Z,kc as Ct,l as Ve,lc as Fe,mb as H,oc as p,pb as gn,pc as zt,q as ot,qa as h,qc as V,rc as at,sa as q,tc as U,uc as $,vc as k,w as sn,wb as gt,wc as de,xb as g,xc as j,y as _n,yb as C,yc as E,zb as Se}from"./chunk-K5XGRFWJ.js";import{a as W,b as oe}from"./chunk-7CGTOI24.js";var $t=class i{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||i)};static \u0275prov=Ne({token:i,factory:i.\u0275fac,providedIn:"root"})};function lt(i){if(gn(i))return i();if(Array.isArray(i))return i.map(t=>lt(t));if(typeof i=="object"&&i!==null){let t={};for(let e in i)i.hasOwnProperty(e)&&(t[e]=lt(i[e]));return t}return i}var Jn=i=>i;function Un(i,t){let e=pn(i,Jn,t?.equal),n=e[rn],o=e;return o.set=a=>{let _=e();return ut(n,a),()=>{ut(n,_)}},o.update=a=>{let _=e();return mn(n,a),()=>{ut(n,_)}},e}var Ze=class i{#e=O(An);isSaving=h(!1);resourceDestinations=In({stream:()=>this.#e.getApiV2ConnectionStrings()});destinations=Un(()=>{let t=this.resourceDestinations.value()?.Data;return t||[]});save(t,e){return this.isSaving.set(!0),e.Description="",(t==="new"?this.#e.postApiV2ConnectionStrings({requestBody:e}):this.#e.putApiV2ConnectionStringById({id:t.ID,requestBody:e})).pipe(Be(()=>{this.isSaving.set(!1)}))}getById(t){return this.#e.getApiV2ConnectionStringById({id:t})}delete(t){return this.#e.deleteApiV2ConnectionStringById({id:t})}reload(){this.resourceDestinations.reload()}updateBackups(t,e){return this.#e.postApiV2ConnectionStringByIdUpdateBackups({id:t,requestBody:{BackupIDs:e}})}static \u0275fac=function(e){return new(e||i)};static \u0275prov=Ne({token:i,factory:i.\u0275fac,providedIn:"root"})};function Xn(i,t){if(i&1){let e=I();l(0,"div",26)(1,"sh-form-field")(2,"label",27),y(3,7),r(),l(4,"input",28,0),k("ngModelChange",function(o){S(e);let a=s(2);return $(a.scheduleFields.nextTime.time,o)||(a.scheduleFields.nextTime.time=o),f(o)}),r(),l(6,"sh-icon",29),p(7,"clock"),r()(),l(8,"sh-datepicker-input",30)(9,"label",31),p(10,"\xA0"),r(),l(11,"input",32,1),k("ngModelChange",function(o){S(e);let a=s(2);return $(a.scheduleFields.nextTime.date,o)||(a.scheduleFields.nextTime.date=o),f(o)}),r(),l(13,"sh-icon",29),p(14,"calendar"),r()()(),l(15,"div",26)(16,"sh-form-field")(17,"label",33),y(18,8),r(),l(19,"input",34),k("ngModelChange",function(o){S(e);let a=s(2);return $(a.scheduleFields.runAgain.repeatValue,o)||(a.scheduleFields.runAgain.repeatValue=o),f(o)}),r()(),l(20,"sh-select",35)(21,"input",36),k("ngModelChange",function(o){S(e);let a=s(2);return $(a.scheduleFields.runAgain.repeatUnit,o)||(a.scheduleFields.runAgain.repeatUnit=o),f(o)}),r()()(),l(22,"sh-toggle-card",37),pe(23,38),y(24,9),ce(),l(25,"div",39)(26,"sh-toggle",24),M(27,10),l(28,"input",25),k("ngModelChange",function(o){S(e);let a=s(2);return $(a.scheduleFields.runAgain.allowedDays.mon,o)||(a.scheduleFields.runAgain.allowedDays.mon=o),f(o)}),r(),x(),r(),l(29,"sh-toggle",24),M(30,11),l(31,"input",25),k("ngModelChange",function(o){S(e);let a=s(2);return $(a.scheduleFields.runAgain.allowedDays.tue,o)||(a.scheduleFields.runAgain.allowedDays.tue=o),f(o)}),r(),x(),r(),l(32,"sh-toggle",24),M(33,12),l(34,"input",25),k("ngModelChange",function(o){S(e);let a=s(2);return $(a.scheduleFields.runAgain.allowedDays.wed,o)||(a.scheduleFields.runAgain.allowedDays.wed=o),f(o)}),r(),x(),r(),l(35,"sh-toggle",24),M(36,13),l(37,"input",25),k("ngModelChange",function(o){S(e);let a=s(2);return $(a.scheduleFields.runAgain.allowedDays.thu,o)||(a.scheduleFields.runAgain.allowedDays.thu=o),f(o)}),r(),x(),r(),l(38,"sh-toggle",24),M(39,14),l(40,"input",25),k("ngModelChange",function(o){S(e);let a=s(2);return $(a.scheduleFields.runAgain.allowedDays.fri,o)||(a.scheduleFields.runAgain.allowedDays.fri=o),f(o)}),r(),x(),r(),l(41,"sh-toggle",24),M(42,15),l(43,"input",25),k("ngModelChange",function(o){S(e);let a=s(2);return $(a.scheduleFields.runAgain.allowedDays.sat,o)||(a.scheduleFields.runAgain.allowedDays.sat=o),f(o)}),r(),x(),r(),l(44,"sh-toggle",24),M(45,16),l(46,"input",25),k("ngModelChange",function(o){S(e);let a=s(2);return $(a.scheduleFields.runAgain.allowedDays.sun,o)||(a.scheduleFields.runAgain.allowedDays.sun=o),f(o)}),r(),x(),r()()()}if(i&2){let e=s(2);c(4),U("ngModel",e.scheduleFields.nextTime.time),c(7),U("ngModel",e.scheduleFields.nextTime.date),c(8),U("ngModel",e.scheduleFields.runAgain.repeatValue),c(),u("options",e.unitOptions)("isClearable",!1),c(),U("ngModel",e.scheduleFields.runAgain.repeatUnit),c(),u("disableToggle",!0),c(6),U("ngModel",e.scheduleFields.runAgain.allowedDays.mon),c(3),U("ngModel",e.scheduleFields.runAgain.allowedDays.tue),c(3),U("ngModel",e.scheduleFields.runAgain.allowedDays.wed),c(3),U("ngModel",e.scheduleFields.runAgain.allowedDays.thu),c(3),U("ngModel",e.scheduleFields.runAgain.allowedDays.fri),c(3),U("ngModel",e.scheduleFields.runAgain.allowedDays.sat),c(3),U("ngModel",e.scheduleFields.runAgain.allowedDays.sun)}}function zn(i,t){if(i&1){let e=I();l(0,"div",23)(1,"sh-toggle",24),M(2,5),l(3,"input",25),k("ngModelChange",function(o){S(e);let a=s();return $(a.scheduleFields.autoRun,o)||(a.scheduleFields.autoRun=o),f(o)}),r(),x(),r(),l(4,"p"),y(5,6),r()(),g(6,Xn,47,14)}if(i&2){let e=s();c(3),U("ngModel",e.scheduleFields.autoRun),c(3),C(e.scheduleFields.autoRun()?6:-1)}}var Wn=[{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`}],vt=[{key:$localize`Daily 13:00`,value:"daily",data:{autoRun:!0,nextTime:{time:"13:00:00",date:new Date().toISOString().split("T")[0]},runAgain:{repeatValue:1,repeatUnit:"D",allowedDays:{mon:!0,tue:!0,wed:!0,thu:!0,fri:!0,sat:!0,sun:!0}}}},{key:$localize`Weekdays 13:00`,value:"weekdays",data:{autoRun:!0,nextTime:{time:"13:00:00",date:new Date().toISOString().split("T")[0]},runAgain:{repeatValue:1,repeatUnit:"D",allowedDays:{mon:!0,tue:!0,wed:!0,thu:!0,fri:!0,sat:!1,sun:!1}}}},{key:$localize`Weekly monday 13:00`,value:"weekly",data:{autoRun:!0,nextTime:{time:"13:00:00",date:Hn().toISOString().split("T")[0]},runAgain:{repeatValue:1,repeatUnit:"W",allowedDays:{mon:!0,tue:!1,wed:!1,thu:!1,fri:!1,sat:!1,sun:!1}}}},{key:$localize`Don't run automatically`,value:"disabled",data:{autoRun:!1,nextTime:{time:"13:00:00",date:new Date().toISOString().split("T")[0]},runAgain:{repeatValue:1,repeatUnit:"D",allowedDays:{mon:!0,tue:!0,wed:!0,thu:!0,fri:!0,sat:!0,sun:!0}}}},{key:$localize`Custom`,value:"custom",data:{autoRun:!0,nextTime:{time:"13:00:00",date:new Date().toISOString().split("T")[0]},runAgain:{repeatValue:1,repeatUnit:"D",allowedDays:{mon:!0,tue:!0,wed:!0,thu:!0,fri:!0,sat:!0,sun:!0}}}}];function kn(i){if(!i.autoRun)return null;let t=[i.runAgain.allowedDays.mon?"Monday":null,i.runAgain.allowedDays.tue?"Tuesday":null,i.runAgain.allowedDays.wed?"Wednesday":null,i.runAgain.allowedDays.thu?"Thursday":null,i.runAgain.allowedDays.fri?"Friday":null,i.runAgain.allowedDays.sat?"Saturday":null,i.runAgain.allowedDays.sun?"Sunday":null].filter(_=>_!==null),e=i.nextTime.time.split(":"),n=new Date(i.nextTime.date);n.setHours(parseInt(e[0])),n.setMinutes(parseInt(e[1]));let o=i.runAgain.repeatValue,a=i.runAgain.repeatUnit;return{Time:n.toISOString(),Repeat:`${o}${a}`,AllowedDays:t}}function Hn(){let i=new Date,t=i.getDay(),e=t===1?7:(8-t)%7;return i.setDate(i.getDate()+e),i.setHours(12,0,0,0),i}var qt=()=>({autoRun:h(!0),nextTime:{time:h("13:00"),date:h(new Date().toISOString().split("T")[0])},runAgain:{repeatValue:h(1),repeatUnit:h("D"),allowedDays:{mon:h(!0),tue:h(!0),wed:h(!0),thu:h(!0),fri:h(!0),sat:h(!0),sun:h(!0)}}}),jt=class i{#e=O(Oe);#t=O(we);#n=O(je);unitOptions=Wn;scheduleFields=this.#e.scheduleFields;scheduleType=this.#e.scheduleType;scheduleOptions=vt;updateScheduleType(t){let e=vt.find(n=>n.value===t);if(e&&e?.value!=="custom"){this.scheduleType.set(e.value);let n=e.data;this.scheduleFields.autoRun.set(n.autoRun??!1),this.scheduleFields.nextTime.time.set(n.nextTime?.time??"13:00"),this.scheduleFields.nextTime.date.set(n.nextTime?.date??new Date().toISOString().split("T")[0]),this.scheduleFields.runAgain.repeatValue.set(n.runAgain?.repeatValue??1),this.scheduleFields.runAgain.repeatUnit.set(n.runAgain?.repeatUnit??"D"),this.scheduleFields.runAgain.allowedDays.mon.set(n.runAgain?.allowedDays?.mon??!0),this.scheduleFields.runAgain.allowedDays.tue.set(n.runAgain?.allowedDays?.tue??!0),this.scheduleFields.runAgain.allowedDays.wed.set(n.runAgain?.allowedDays?.wed??!0),this.scheduleFields.runAgain.allowedDays.thu.set(n.runAgain?.allowedDays?.thu??!0),this.scheduleFields.runAgain.allowedDays.fri.set(n.runAgain?.allowedDays?.fri??!0),this.scheduleFields.runAgain.allowedDays.sat.set(n.runAgain?.allowedDays?.sat??!0),this.scheduleFields.runAgain.allowedDays.sun.set(n.runAgain?.allowedDays?.sun??!0)}else this.scheduleType.set("custom")}goBack(){this.#t.navigate(["source-data"],{relativeTo:this.#n.parent})}next(){this.#e.shouldAutoSave()&&this.#e.submit(!0),this.#t.navigate(["options"],{relativeTo:this.#n.parent})}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=z({type:i,selectors:[["app-schedule"]],decls:12,vars:4,consts:()=>{let t;t=$localize`Select an option...`;let e;e=$localize`Schedule`;let n;n=$localize`${"\uFFFD#8\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let o;o=$localize`${"\uFFFD#11\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let a;a=$localize` Automatically run backups ${"\uFFFD#3\uFFFD\uFFFD/#3\uFFFD"}:TAG_INPUT:`;let _;_=$localize`If a date was missed, the job will run as soon as possible.`;let d;d=$localize`Next time`;let m;m=$localize`Run again every`;let N;N=$localize`Allowed days`;let F;F=$localize` Monday ${"\uFFFD#28\uFFFD\uFFFD/#28\uFFFD"}:TAG_INPUT:`;let A;A=$localize` Tuesday ${"\uFFFD#31\uFFFD\uFFFD/#31\uFFFD"}:TAG_INPUT:`;let L;L=$localize` Wednesday ${"\uFFFD#34\uFFFD\uFFFD/#34\uFFFD"}:TAG_INPUT:`;let v;v=$localize` Thursday ${"\uFFFD#37\uFFFD\uFFFD/#37\uFFFD"}:TAG_INPUT:`;let D;D=$localize` Friday ${"\uFFFD#40\uFFFD\uFFFD/#40\uFFFD"}:TAG_INPUT:`;let K;K=$localize` Saturday ${"\uFFFD#43\uFFFD\uFFFD/#43\uFFFD"}:TAG_INPUT:`;let J;return J=$localize` Sunday ${"\uFFFD#46\uFFFD\uFFFD/#46\uFFFD"}:TAG_INPUT:`,[["timeRef",""],["dateRef",""],e,n,o,a,_,d,m,N,F,A,L,v,D,K,J,[1,"title-30"],["label","key","value","value",3,"isClearable","options"],["type","text","placeholder",t,3,"ngModelChange","ngModel"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","",1,"raised","primary",3,"click"],[1,"toggle-wrap"],[1,"raised","primary"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"row-inputs"],["for","time"],["type","time","id","time",3,"ngModelChange","ngModel"],["suffix",""],[1,"primary","sharp"],["for","date"],["type","text","id","date",3,"ngModelChange","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,"disableToggle"],["title",""],[1,"days-wrap"]]},template:function(e,n){e&1&&(l(0,"h3",17),y(1,2),r(),l(2,"sh-select",18)(3,"input",19),T("ngModelChange",function(a){return n.updateScheduleType(a)}),r()(),g(4,zn,7,2),l(5,"div",20)(6,"button",21),T("click",function(){return n.goBack()}),M(7,3),P(8,"sh-icon"),x(),r(),l(9,"button",22),T("click",function(){return n.next()}),M(10,4),P(11,"sh-icon"),x(),r()()),e&2&&(c(2),u("isClearable",!1)("options",n.scheduleOptions),c(),u("ngModel",n.scheduleType()),c(),C(n.scheduleType()==="custom"?4:-1))},dependencies:[se,ee,ht,En,te,re,ue,ve,Q,Y,$e,Ot,yn],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:40rem;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})};var jn=[[["","title",""]],[["","description",""]],[["","action",""]],"*"],qn=["[title]","[description]","[action]","*"];function Qn(i,t){i&1&&p(0,"Title")}function Yn(i,t){i&1&&(l(0,"sh-icon"),p(1,"caret-down"),r())}var Xe=class i{isActive=be(!1);disableToggle=G(!1);ngOnInit(){this.disableToggle()&&this.isActive.set(!0)}toggle(){this.isActive.set(!this.isActive())}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=z({type:i,selectors:[["app-toggle-card"]],hostVars:2,hostBindings:function(e,n){e&2&&Fe("active",n.isActive())},inputs:{isActive:[1,"isActive"],disableToggle:[1,"disableToggle"]},outputs:{isActive:"isActiveChange"},ngContentSelectors:qn,decls:11,vars:1,consts:[[1,"title"],[3,"click"],[1,"actions"],[1,"content"]],template:function(e,n){e&1&&(He(jn),l(0,"header")(1,"div",0)(2,"h3",1),T("click",function(){return n.disableToggle()||n.toggle()}),he(3,0,null,Qn,1,0),g(5,Yn,2,0,"sh-icon"),r(),he(6,1),r(),l(7,"div",2),he(8,2),r()(),l(9,"div",3),he(10,3),r()),e&2&&(c(5),C(n.disableToggle()?-1:5))},dependencies:[Q],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;border-radius:var(--shape-3);background-color:var(--base-2)}.active[_nghost-%COMP%] .content[_ngcontent-%COMP%]{max-height:1000px;transition:max-height 1s linear;padding:0 1rem 1rem}.active[_nghost-%COMP%] sh-icon[_ngcontent-%COMP%]{transform:rotate(180deg)}[_nghost-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:.25rem;font:var(--paragraph-10);cursor:pointer;-webkit-user-select:none;user-select:none}[_nghost-%COMP%] sh-icon[_ngcontent-%COMP%]{transform:rotate(0);transform-origin:center;transition:transform .2s ease}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1rem}header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;flex:1 0}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]:empty{display:none}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;padding:0 1rem;overflow:hidden;max-height:0;transition:max-height .25s linear,padding .25s linear}.content[_ngcontent-%COMP%]:empty{display:none}"],changeDetection:0})};var Zn=["textInput"];function ei(i,t){if(i&1){let e=I();l(0,"sh-select",3)(1,"input",7),k("ngModelChange",function(o){S(e);let a=s();return $(a.internalPath,o)||(a.internalPath=o),f(o)}),T("ngModelChange",function(){S(e);let o=s();return f(o.updateFilter())}),r()()}if(i&2){let e=s();u("options",e.fileGroupOptions())("isClearable",!1)("selectMultiple",!0),c(),U("ngModel",e.internalPath)}}function ti(i,t){if(i&1&&(l(0,"div",8),p(1),r()),i&2){let e,n=s(2);c(),zt((e=n.currentExpressionOption())==null?null:e.startsWith)}}function ni(i,t){if(i&1&&(l(0,"div",9),p(1),r()),i&2){let e,n=s(2);c(),zt((e=n.currentExpressionOption())==null?null:e.endsWith)}}function ii(i,t){if(i&1){let e=I();l(0,"sh-form-field",4)(1,"input",7,0),k("ngModelChange",function(o){S(e);let a=s();return $(a.internalPath,o)||(a.internalPath=o),f(o)}),T("ngModelChange",function(){S(e);let o=s();return f(o.updateFilter())}),r(),g(3,ti,2,1,"div",8),g(4,ni,2,1,"div",9),r()}if(i&2){let e,n,o=s();c(),U("ngModel",o.internalPath),c(2),C(!((e=o.currentExpressionOption())==null||e.startsWith==null)&&e.startsWith.length?3:-1),c(),C(!((n=o.currentExpressionOption())==null||n.endsWith==null)&&n.endsWith.length?4:-1)}}var oi=[{key:"Applications",value:"Applications"},{key:"CacheFiles",value:"Cache Files"},{key:"TemporaryFiles",value:"Temporary Files"},{key:"OperatingSystem",value:"Operating System"},{key:"SystemFiles",value:"System Files"},{key:"DefaultExcludes",value:"Standard Excludes"}],ai=[{key:"Excludes folders where name contains",value:"-FolderName"},{key:"Includes folders where name contains",value:"+FolderName"},{key:"Excludes folder",value:"-Folder"},{key:"Includes folder",value:"+Folder"},{key:"Excludes files where name contains",value:"-FileName"},{key:"Includes files where name contains",value:"+FileName"},{key:"Excludes file extension",value:"-Extension"},{key:"Include file extension",value:"+Extension"},{key:"Excludes files where name matches regex",value:"-Regex"},{key:"Includes files where name matches regex",value:"+Regex"},{key:"Exclude file groups",value:"-FileGroup"},{key:"Include file groups",value:"+FileGroup"},{key:"Includes expression",value:"+Expression"},{key:"Excludes expression",value:"-Expression"},{key:"None",value:"-Unknown"}],Ut=class i{#e=O(We);path=G.required();osType=G();isNew=G(!1);pathChange=Le();remove=Le();internalPath=h("");pathType=h("-Expression");textInput=Ie("textInput");currentExpressionOption=R(()=>{let t=this.pathType();return this.expressionOptions().find(e=>e.value===t)});fileGroupOptions=h(oi);expressionOptions=R(()=>{let e=this.osType()==="Windows"?"\\":"/";return ai.map(n=>n.value==="-Folder"||n.value==="+Folder"?oe(W({},n),{startsWith:"",endsWith:""}):n.value==="-FolderName"||n.value==="+FolderName"?oe(W({},n),{startsWith:"*",endsWith:`*${e}`}):n.value==="-FileName"||n.value==="+FileName"?oe(W({},n),{startsWith:"[.*",endsWith:`[^\\${e}]*]`}):n.value==="-FileGroup"||n.value==="+FileGroup"?oe(W({},n),{startsWith:"{",endsWith:"}"}):n.value==="-Regex"||n.value==="+Regex"?oe(W({},n),{startsWith:"[",endsWith:"]"}):n.value==="-Extension"||n.value==="+Extension"?oe(W({},n),{startsWith:"*.",endsWith:""}):oe(W({},n),{startsWith:"",endsWith:""}))});pathEffect=q(()=>{let t=this.path(),e=t.slice(1),n=t.startsWith("-")?"-":"+",o=this.osType()==="Windows",a=o?"\\":"/";e.startsWith("%")&&e.endsWith(a)||o&&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)),this.isNew()&&mt(()=>{this.focusInput()},{injector:this.#e})});focusInput(){let t=this.textInput()?.nativeElement;t&&(t.focus(),t.select())}updateFilter(){let t=this.internalPath(),e=this.currentExpressionOption();t!==""&&(t==="*"&&(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||i)};static \u0275cmp=z({type:i,selectors:[["app-new-filter"]],viewQuery:function(e,n){e&1&&De(n.textInput,Zn,5),e&2&&ye()},inputs:{path:[1,"path"],osType:[1,"osType"],isNew:[1,"isNew"]},outputs:{pathChange:"pathChange",remove:"remove"},decls:7,vars:4,consts:()=>{let t;return t=$localize`Select an option...`,[["textInput",""],["value","value","label","key",3,"options","isClearable"],["type","text","placeholder",t,3,"ngModelChange","ngModel"],["value","key","label","value",1,"expression-input",3,"options","isClearable","selectMultiple"],[1,"expression-input"],[1,"filter-removal",3,"click"],[1,"sh-primary"],["type","text",3,"ngModelChange","ngModel"],["boxPrefix",""],["boxSuffix",""]]},template:function(e,n){if(e&1&&(l(0,"sh-select",1)(1,"input",2),k("ngModelChange",function(a){return $(n.pathType,a)||(n.pathType=a),a}),T("ngModelChange",function(){return n.updateFilter()}),r()(),g(2,ei,2,4,"sh-select",3)(3,ii,5,3,"sh-form-field",4),l(4,"div",5),T("click",function(){return n.removeFilter()}),l(5,"sh-icon",6),p(6,"x-circle"),r()()),e&2){let o;u("options",n.expressionOptions())("isClearable",!1),c(),U("ngModel",n.pathType),c(),C(((o=n.currentExpressionOption())==null?null:o.value)=="-FileGroup"||((o=n.currentExpressionOption())==null?null:o.value)=="+FileGroup"?2:3)}},dependencies:[se,ee,te,re,$e,ue,Q],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 li=["filtersContainer"],ri=()=>({updateOn:"blur",standalone:!0});function si(i,t){if(i&1){let e=I();l(0,"button",15),T("click",function(){S(e);let o=s();return f(o.addFilter())}),M(1,3),P(2,"sh-icon"),x(),r()}}function _i(i,t){i&1&&y(0,2,1)}function ci(i,t){i&1&&y(0,2,2)}function di(i,t){i&1&&(l(0,"p",13),y(1,4),r())}function ui(i,t){i&1&&(l(0,"p",13),y(1,5),r())}function pi(i,t){if(i&1){let e=I();l(0,"sh-form-field")(1,"textarea",16),k("ngModelChange",function(o){S(e);let a=s();return $(a.bulkFilters,o)||(a.bulkFilters=o),f(o)}),T("ngModelChange",function(){S(e);let o=s();return f(o.saveBulkFilterEdit())}),r()()}if(i&2){let e=s();c(),U("ngModel",e.bulkFilters),u("ngModelOptions",Ae(2,ri))}}function mi(i,t){if(i&1){let e=I();l(0,"app-new-filter",18),T("pathChange",function(o){let a=S(e).$index,_=s(2);return f(_.updateFilterAt(o,a))})("remove",function(){let o=S(e).$index,a=s(2);return f(a.removeFilterAt(o))}),r()}if(i&2){let e=t.$implicit,n=t.$index,o=s(2);u("path",e)("osType",o.osType())("isNew",o.lastAddedIndex()===n)}}function gi(i,t){if(i&1&&(l(0,"div",14,0),fe(2,mi,1,3,"app-new-filter",17,Se),r()),i&2){let e=s();c(2),Ee(e.filters())}}var kt=class i{#e=O(We);filters=be.required();osType=G("");disableToggle=G(!0);bulkFilterEditMode=h(!1);bulkFilters=h("");lastAddedIndex=h(null);filtersContainer=Ie.required("filtersContainer");hasFilters=R(()=>this.filters().length>0);toggleBulkFilterEdit(){this.bulkFilterEditMode()?this.bulkFilterEditMode.set(!1):(this.bulkFilters.set(this.filters().join(`
|
|
2
|
-
`)),this.bulkFilterEditMode.set(!0))}saveBulkFilterEdit(){let t=this.bulkFilters().split(`
|
|
3
|
-
`).map(n=>n.trim()).filter(n=>n!==""&&(n.startsWith("-")||n.startsWith("+"))),e=[...new Set(t)];this.filters.set(e),this.bulkFilterEditMode.set(!1)}addFilter(){let t=this.filters(),e=t.length;this.filters.set([...t,"-*"]),this.lastAddedIndex.set(e),mt(()=>{this.scrollToFilter(e)},{injector:this.#e})}scrollToFilter(t){let e=this.filtersContainer()?.nativeElement;if(!e)return;let n=e.querySelectorAll("app-new-filter");n[t]&&n[t].scrollIntoView({behavior:"smooth",block:"nearest"})}updateFilterAt(t,e){let o=[...this.filters()];o[e]=t,this.filters.set(o),this.lastAddedIndex.set(null)}removeFilterAt(t){let n=this.filters().filter((o,a)=>a!==t);this.filters.set(n),this.lastAddedIndex.set(null)}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=z({type:i,selectors:[["app-filters"]],viewQuery:function(e,n){e&1&&De(n.filtersContainer,li,5),e&2&&ye()},inputs:{filters:[1,"filters"],osType:[1,"osType"],disableToggle:[1,"disableToggle"]},outputs:{filters:"filtersChange"},decls:20,vars:5,consts:()=>{let t;t=$localize`Filters`;let e;e=$localize`${"\uFFFD#13\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD*14:1\uFFFD"}:START_BLOCK_IF: Edit contents as list ${"\uFFFD/*14:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*15:2\uFFFD"}:START_BLOCK_ELSE: Edit contents as text ${"\uFFFD/*15:2\uFFFD"}:CLOSE_BLOCK_ELSE:`;let n;n=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Add filter `;let o;o=$localize`Customize your filters.`;let a;return a=$localize`Edit filters as text, one per line.`,[["filtersContainer",""],t,e,n,o,a,[3,"disableToggle"],["title",""],[1,"spacer"],["type","button","shButton","",1,"small"],["shButton","","type","button",1,"small"],["menu",""],["shButton","","type","button",1,"small",3,"click"],["description",""],[1,"filters"],["type","button","shButton","",1,"small",3,"click"],["wrap","off","rows","10",1,"bulk-textarea",3,"ngModelChange","ngModel","ngModelOptions"],[3,"path","osType","isNew"],[3,"pathChange","remove","path","osType","isNew"]]},template:function(e,n){e&1&&(l(0,"app-toggle-card",6),pe(1,7),l(2,"span"),y(3,1),r(),P(4,"div",8),g(5,si,3,0,"button",9),l(6,"sh-menu")(7,"button",10)(8,"sh-icon"),p(9,"dots-three-vertical"),r()(),pe(10,11),l(11,"button",12),T("click",function(){return n.toggleBulkFilterEdit()}),M(12,2),P(13,"sh-icon"),g(14,_i,1,0)(15,ci,1,0),x(),r(),ce(),r(),ce(),g(16,di,2,0,"p",13)(17,ui,2,0,"p",13),g(18,pi,2,3,"sh-form-field")(19,gi,4,0,"div",14),r()),e&2&&(u("disableToggle",n.disableToggle()),c(5),C(n.bulkFilterEditMode()?-1:5),c(9),C(n.bulkFilterEditMode()?14:15),c(2),C(n.bulkFilterEditMode()?17:16),c(2),C(n.bulkFilterEditMode()?18:19))},dependencies:[se,ee,te,re,Y,Q,Qe,ue,Xe,Ut],styles:["[_nghost-%COMP%]{display:block}.spacer[_ngcontent-%COMP%]{flex:1}.bulk-textarea[_ngcontent-%COMP%]{width:100%;font-family:monospace;min-height:12.5rem}.filters[_ngcontent-%COMP%]{max-height:200px;overflow-y:auto;display:flex;flex-direction:column;gap:.5rem}"],changeDetection:0})};var rt=class i{data=G();closed=Le();path=h("");isValid=R(()=>this.path().length>0);dataEffect=q(()=>{let t=this.data();t?.initialPath&&this.path.set(t.initialPath)});submit(){this.closed.emit(this.path()||null)}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=z({type:i,selectors:[["app-target-disk-dialog"]],inputs:{data:[1,"data"]},outputs:{closed:"closed"},decls:13,vars:3,consts:()=>{let t;t=$localize`Path`;let e;e=$localize`Local disk source`;let n;n=$localize`Folder path`;let o;o=$localize`Cancel`;let a;return a=$localize` Use this source `,[e,n,o,a,[1,"title-30"],["content",""],[3,"customRemoteMode"],["for","path"],["type","text","id","path","tabindex","4","placeholder",t,3,"ngModelChange","ngModel"],["footer","",1,"sticky"],["shButton","","type","button",3,"click"],["shButton","","type","button",1,"raised","primary",3,"click","disabled"]]},template:function(e,n){e&1&&(l(0,"header")(1,"h3",4),y(2,0),r()(),l(3,"section",5)(4,"app-file-tree",6)(5,"label",7),y(6,1),r(),l(7,"input",8),k("ngModelChange",function(a){return $(n.path,a)||(n.path=a),a}),r()()(),l(8,"footer",9)(9,"button",10),T("click",function(){return n.closed.emit(null)}),y(10,2),r(),l(11,"button",11),T("click",function(){return n.submit()}),y(12,3),r()()),e&2&&(c(4),u("customRemoteMode","diskimage"),c(3),U("ngModel",n.path),c(4),u("disabled",!n.isValid()))},dependencies:[Y,Ye,se,ee,te,re],styles:["[_nghost-%COMP%]{--dialog-p: 1.5rem;display:flex;flex-direction:column;gap:1rem}header[_ngcontent-%COMP%]{display:flex;padding:1.5rem 1.5rem 0}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}footer[_ngcontent-%COMP%]{z-index:1}"],changeDetection:0})};var Ci=[[["","displayName",""]],[["","description",""]],"*"],Ti=["[displayName]","[description]","*"];function Si(i,t){if(i&1&&p(0),i&2){s(2);let e=E(1);V(" ",e.Name," ")}}function fi(i,t){if(i&1&&p(0),i&2){s(2);let e=E(0);V(" ",e.displayName," ")}}function Ei(i,t){i&1&&(l(0,"sh-chip",6),p(1,"Untested"),r())}function hi(i,t){i&1&&(l(0,"sh-chip",6),p(1,"Special"),r())}function Fi(i,t){i&1&&(l(0,"sh-chip",7),p(1,"Deprecated"),r())}function Ni(i,t){if(i&1&&p(0),i&2){s();let e=E(16);V(" ",e," ")}}function Di(i,t){if(i&1&&p(0),i&2){s(2);let e=E(0);V(" ",e.description," ")}}function yi(i,t){if(i&1&&(l(0,"sh-card",0)(1,"div",1),P(2,"img",2),r(),l(3,"div",3)(4,"div",4),he(5),r(),l(6,"div",5),g(7,Si,1,1)(8,fi,1,1),g(9,Ei,2,0,"sh-chip",6)(10,hi,2,0,"sh-chip",6)(11,Fi,2,0,"sh-chip",7),r()(),l(12,"div",8)(13,"div",4),he(14,1),r(),l(15,"div",5),de(16),g(17,Ni,1,1)(18,Di,1,1),r()(),l(19,"div",9),he(20,2),r()()),i&2){let e=s(),n=E(0),o=E(1);u("variant",e.variant()),c(2),u("src",n.icon,pt),gt("alt",n.displayName),c(5),C(o&&o.Name?7:8),c(2),C((n.sortOrder??0)==-3?9:(n.sortOrder??0)==-2?10:(n.sortOrder??0)<0?11:-1),c(7);let a=j(e.getSimplePath(o==null?null:o.BaseUrl));c(),C(a&&a.length>0?17:18)}}var et=class i{destination=G();targetUrl=G();variant=G("type-b");connectionStringId=G();#e=O(Ze);connectionString=R(()=>{let t=this.connectionStringId();return t==null?null:this.#e.destinations().find(e=>e.ID===t)});selectedDestinationType=R(()=>{let t=this.targetUrl();return t?Pe(t)??null:null});destinationFromTargetUrl=R(()=>{let t=this.selectedDestinationType();return t?{key:t.customKey??t.key,customKey:t.customKey??null,displayName:t.displayName,description:t.description,icon:t.icon}:null});destinationItem=R(()=>{let t=this.destination(),e=this.destinationFromTargetUrl();return t||e||null});getSimplePath(t){return t?Mn(t):""}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=z({type:i,selectors:[["app-destination-list-item"]],inputs:{destination:[1,"destination"],targetUrl:[1,"targetUrl"],variant:[1,"variant"],connectionStringId:[1,"connectionStringId"]},ngContentSelectors:Ti,decls:3,vars:3,consts:[[3,"variant"],[1,"icon"],[3,"src"],[1,"name"],[1,"projected"],[1,"default"],[1,"small","simple","primary"],[1,"small","simple","warn"],[1,"description"],[1,"actions"]],template:function(e,n){if(e&1&&(He(Ci),de(0)(1),g(2,yi,21,7,"sh-card",0)),e&2){let o=j(n.destinationItem());c(),j(n.connectionString()),c(),C(o?2:-1)}},dependencies:[Dn,At],styles:['[_nghost-%COMP%]{display:block;border-radius:var(--shape-3)}[_nghost-%COMP%]:focus-visible{outline:2px solid var(--primary-8);outline-offset:2px}sh-card[_ngcontent-%COMP%]{display:grid;align-items:center;grid-template-columns:3rem 1fr auto;grid-template-areas:"icon name actions" "icon description actions";gap:.25rem 1rem}sh-card[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{grid-area:icon;display:flex;align-items:center;justify-content:center;width:3rem;height:3rem;border-radius:var(--shape-2)}sh-card[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{object-fit:contain;width:100%;border-radius:var(--shape-2);overflow:hidden}sh-card[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{grid-area:name;font:var(--paragraph-10)}sh-card[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] .projected[_ngcontent-%COMP%]:empty{display:none}sh-card[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] .projected[_ngcontent-%COMP%]:not(:empty) + .default[_ngcontent-%COMP%]{display:none}sh-card[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{grid-area:description;color:var(--base-8)}sh-card[_ngcontent-%COMP%] .description[_ngcontent-%COMP%] .projected[_ngcontent-%COMP%]:empty{display:none}sh-card[_ngcontent-%COMP%] .description[_ngcontent-%COMP%] .projected[_ngcontent-%COMP%]:not(:empty) + .default[_ngcontent-%COMP%]{display:none}sh-card[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{grid-area:actions;display:flex;align-items:center;gap:.5rem}'],changeDetection:0})};var tt=class i{#e=O(ge);#t(t){return t.flatMap(e=>{if(!e?.Key)return null;let n=xn(e.Key);if(n.length<=1){let o=Lt(e.Key);return o.isDefaultEntry===!0?[oe(W({},o),{displayName:e.DisplayName||o.displayName||e.Key,description:e.Description||o.description||""})]:o}else return n}).filter(e=>e!==null)}#n(t){return t.map(e=>({key:e.customKey??e.key,customKey:e.customKey??null,displayName:e.displayName,description:e.description,icon:e.icon,searchTerms:[e.displayName,e.description,e.key,e.searchTerms??"",e.customKey??""].join(" "),sortOrder:e.sortOrder??0}))}backendDestinationOptions=R(()=>{let t=this.#e.backendModules(),e=this.#t(t);return this.#n(e)});sourceProviderOptions=R(()=>{let t=this.#e.sourceProviderModules(),e=this.#t(t.length?t:this.#e.backendModules());return this.#n(e)});restoreDestinationOptions=R(()=>{let t=this.#e.restoreDestinationProviderModules(),e=this.#t(t.length?t:this.#e.backendModules());return this.#n(e)});destinationTypeOptions=this.backendDestinationOptions;allModules=R(()=>[...this.#e.backendModules(),...this.#e.sourceProviderModules(),...this.#e.restoreDestinationProviderModules()].reduce((t,e)=>(t.find(n=>n.Key===e.Key)||t.push(e),t),[]));static \u0275fac=function(e){return new(e||i)};static \u0275prov=Ne({token:i,factory:i.\u0275fac,providedIn:"root"})};function Ai(i,t){if(i&1){let e=I();l(0,"app-destination-list-item",7),T("click",function(){let o=S(e).$implicit,a=s();return f(a.setDestination.emit(o.customKey??o.key))})("keydown.enter",function(o){return o.target.click()})("keydown.space",function(o){return o.target.click()}),l(1,"button",8),M(2,1),P(3,"sh-icon"),x(),r()()}if(i&2){let e=t.$implicit;u("destination",e)}}var Vt=class i{#e=O(tt);#t=O(ge);showAsSources=G(!1);moduleType=G("Backend");setDestination=Le();destinationSearchTerm=h("");showAllDestinations=h(!1);destinationTypeOptions=R(()=>{switch(this.moduleType()){case"SourceProvider":return this.#e.sourceProviderOptions();case"RestoreDestinationProvider":return this.#e.restoreDestinationOptions();default:return this.#e.backendDestinationOptions()}});destinationTypeOptionsFocused=R(()=>{let t=this.#t.backendModules(),e=this.destinationTypeOptions().map(_=>{let d=t.find(m=>m.Key==_.key);return d&&(_=oe(W({},_),{sortOrder:d.IsDeprecated?-1:d.IsUntested?-3:_.sortOrder})),_}),n=this.destinationSearchTerm().toLowerCase(),o=this.showAllDestinations(),a=[...e].sort((_,d)=>{let m=_.sortOrder??0,N=d.sortOrder??0;return m!==N?N-m:_.displayName.localeCompare(d.displayName)}).filter(_=>{if(o)return!0;let d=_.sortOrder??0;return d<0&&n?.length&&(_.key.toLocaleLowerCase()===n.toLocaleLowerCase()||_.customKey?.toLocaleLowerCase()===n.toLocaleLowerCase())?!0:d>=0});return n?a.filter(_=>_.searchTerms.toLowerCase().includes(n)):a});static \u0275fac=function(e){return new(e||i)};static \u0275cmp=z({type:i,selectors:[["app-destination-list"]],inputs:{showAsSources:[1,"showAsSources"],moduleType:[1,"moduleType"]},outputs:{setDestination:"setDestination"},decls:8,vars:2,consts:()=>{let t;t=$localize`Search for destination...`;let e;e=$localize`Show all`;let n;return n=$localize` Choose ${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SH_ICON:`,[e,n,[1,"search-area"],["type","text","placeholder",t,3,"ngModelChange","ngModel"],[1,"raised","primary",3,"checkedChange","checked"],[1,"list"],["tabindex","0",3,"destination"],["tabindex","0",3,"click","keydown.enter","keydown.space","destination"],["shButton","","tabindex","-1","type","button"]]},template:function(e,n){e&1&&(l(0,"div",2)(1,"sh-form-field")(2,"input",3),k("ngModelChange",function(a){return $(n.destinationSearchTerm,a)||(n.destinationSearchTerm=a),a}),r()(),l(3,"sh-toggle",4),k("checkedChange",function(a){return $(n.showAllDestinations,a)||(n.showAllDestinations=a),a}),y(4,0),r()(),l(5,"div",5),fe(6,Ai,4,1,"app-destination-list-item",6,Se),r()),e&2&&(c(2),U("ngModel",n.destinationSearchTerm),c(),U("checked",n.showAllDestinations),c(3),Ee(n.destinationTypeOptionsFocused()))},dependencies:[et,se,ee,te,re,ue,Y,Q,ve],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:1rem;height:100%;overflow:hidden;padding:.25rem;min-height:250px}.list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;height:100%;overflow:auto;padding:.25rem .375rem 1rem;width:calc(100% + .5rem);margin-left:-.375rem;border-bottom:.0625rem solid var(--base-4)}.search-area[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:1rem}"],changeDetection:0})};var Ii=["fileInput"],Pi=[[["label"]]],Oi=["label"],Bt=class i{customId=G();content=h("");readonly=h(!1);placeholder=G($localize`Drop a file here or use the browse button`);fileInputRef=Ie("fileInput");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=q(()=>{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||i)};static \u0275cmp=z({type:i,selectors:[["app-file-drop-textarea"]],viewQuery:function(e,n){e&1&&De(n.fileInputRef,Ii,5),e&2&&ye()},inputs:{customId:[1,"customId"],placeholder:[1,"placeholder"]},features:[Cn([{provide:fn,useExisting:i,multi:!0}])],ngContentSelectors:Oi,decls:9,vars:3,consts:[["fileInput",""],[1,"browse-btn"],["shButton","","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 o=I();He(Pi),he(0,0,["ngProjectAs","label",5,["label"]]),l(1,"div",1)(2,"button",2),T("click",function(){return n.triggerBrowse()}),l(3,"sh-icon"),p(4,"upload"),r()()(),l(5,"div",3),T("drop",function(_){return n.onFileDrop(_)})("dragover",function(_){return n.onDragOver(_)}),l(6,"textarea",4),k("ngModelChange",function(_){return S(o),$(n.content,_)||(n.content=_),f(_)}),r()(),l(7,"input",5,0),T("change",function(_){return n.onFileSelected(_)}),r()}e&2&&(c(6),u("placeholder",n.placeholder()),U("ngModel",n.content),u("disabled",n.readonly()))},dependencies:[se,ee,te,re,Q,Y],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 Mi=(i,t,e,n)=>({index:i,fieldGroup:"custom",formView:t,destinationType:e,oauthField:n}),_e=i=>({$implicit:i}),xi=(i,t,e,n)=>({index:i,fieldGroup:"dynamic",formView:t,destinationType:e,oauthField:n}),Ri=()=>({updateOn:"blur"}),Li=(i,t,e,n)=>({index:i,formView:t,fieldGroup:"advanced",destinationType:e,oauthField:n}),Te=(i,t)=>({fieldGroup:i,formView:t}),bi=()=>["/connect/logon"];function wi(i,t){i&1&&ae(0)}function Gi(i,t){if(i&1&&H(0,wi,1,0,"ng-container",25),i&2){let e=t.$implicit,n=t.$index;s();let o=Z(15);s();let a=E(0),_=E(1);u("ngTemplateOutlet",o)("ngTemplateOutletContext",le(7,_e,Tt(2,Mi,n,e,a,_.oauthField)))}}function $i(i,t){i&1&&ae(0)}function vi(i,t){if(i&1&&H(0,$i,1,0,"ng-container",25),i&2){let e=t.$implicit,n=t.$index;s();let o=Z(15);s();let a=E(0),_=E(1);u("ngTemplateOutlet",o)("ngTemplateOutletContext",le(7,_e,Tt(2,xi,n,e,a,_.oauthField)))}}function Ui(i,t){if(i&1){let e=I();l(0,"button",26),T("click",function(){S(e);let o=s(2);return f(o.showTextArea.set(!1))}),M(1,8),P(2,"sh-icon"),x(),r()}}function ki(i,t){if(i&1){let e=I();l(0,"button",33,2),T("click",function(){let o=S(e).$implicit,a=s(3);return f(a.addAdvancedOption(o))}),p(2),r()}if(i&2){let e=t.$implicit;c(2),V(" ",e.name," ")}}function Vi(i,t){if(i&1){let e=I();l(0,"div",23)(1,"sh-menu",27)(2,"button",28),M(3,9),P(4,"sh-icon"),x(),r(),pe(5,29),fe(6,ki,3,1,"button",30,Se),ce(),r(),l(8,"sh-menu")(9,"button",31)(10,"sh-icon"),p(11,"dots-three-vertical"),r()(),pe(12,29),l(13,"button",32),T("click",function(){S(e);let o=s(2);return f(o.showTextArea.set(!0))}),l(14,"sh-icon"),p(15,"link"),r(),p(16," Edit contents as text "),r(),ce(),r()()}if(i&2){s();let e=E(9);c(),u("searchable",!0),c(),u("disabled",e.length===0),c(4),Ee(e)}}function Bi(i,t){if(i&1){let e=I();l(0,"textarea",34),T("ngModelChange",function(o){S(e);let a=s(2);return f(a.updateSettingsFromText(o))}),r()}if(i&2){let e=s(2);u("ngModel",e.settingsAsText())("ngModelOptions",Ae(2,Ri))}}function Ki(i,t){i&1&&ae(0)}function Ji(i,t){if(i&1&&H(0,Ki,1,0,"ng-container",25),i&2){let e=t.$implicit,n=t.$index;s(2);let o=Z(15),a=s(),_=E(0),d=E(1),m=a.getFormView("advanced",e)??a.getDefaultFormView(e);u("ngTemplateOutlet",o)("ngTemplateOutletContext",le(7,_e,Tt(2,Li,n,m,_,d.oauthField)))}}function Xi(i,t){if(i&1&&fe(0,Ji,1,9,"ng-container",null,Se),i&2){let e=s(2);Ee(e.advancedFormFieldNames())}}function zi(i,t){i&1&&(l(0,"sup",43),p(1,"*"),r())}function Wi(i,t){if(i&1&&(l(0,"sh-icon",44),p(1,"question"),r()),i&2){let e=s(2).$implicit;u("shTooltip",e.formView.longDescription)}}function Hi(i,t){if(i&1){let e=I();l(0,"app-file-tree",36)(1,"label",42),g(2,zi,2,0,"sup",43),p(3),g(4,Wi,2,1,"sh-icon",44),r(),l(5,"input",45),T("ngModelChange",function(o){S(e);let a=s().$implicit,_=s(2);return f(_.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r()()}if(i&2){let e=s().$implicit,n=E(1),o=E(2),a=E(3),_=E(4),d=E(5);u("startingPath",a)("accepts",e.formView.accepts)("showFiles",!0)("hideShortcuts",!0)("showHiddenNodes",!0)("selectFiles",!0)("resolvePaths",!0),c(),u("for",d),c(),C(e.formView.isMandatory&&_?2:-1),c(),V(" ",n," "),c(),C(e.formView.longDescription?4:-1),c(),u("id",d)("ngModel",o)}}function ji(i,t){i&1&&(l(0,"sup",46),p(1,"*"),r())}function qi(i,t){if(i&1&&(l(0,"sh-icon",44),p(1,"question"),r()),i&2){let e=s(2).$implicit;u("shTooltip",e.formView.longDescription)}}function Qi(i,t){if(i&1){let e=I();l(0,"app-file-tree",37)(1,"label",42),g(2,ji,2,0,"sup",46),p(3),g(4,qi,2,1,"sh-icon",44),r(),l(5,"input",45),T("ngModelChange",function(o){S(e);let a=s().$implicit,_=s(2);return f(_.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r()()}if(i&2){let e=s().$implicit,n=E(1),o=E(2),a=E(3),_=E(4),d=E(5);u("hideShortcuts",!0)("enableCreateFolder",!0)("startingPath",a)("resolvePaths",!0),c(),u("for",d),c(),C(e.formView.isMandatory&&_?2:-1),c(),V(" ",n," "),c(),C(e.formView.longDescription?4:-1),c(),u("id",d)("ngModel",o)}}function Yi(i,t){i&1&&(l(0,"sup",47),p(1,"*"),r())}function Zi(i,t){if(i&1&&(l(0,"sh-icon",44),p(1,"question"),r()),i&2){let e=s(2).$implicit;u("shTooltip",e.formView.longDescription)}}function eo(i,t){i&1&&(l(0,"sh-icon",48),p(1," warning "),r())}function to(i,t){i&1&&ae(0)}function no(i,t){if(i&1&&(l(0,"sh-icon",52),p(1," link "),r()),i&2){s();let e=E(8),n=E(9);Fe("error",e&&n==="error")("warn",e&&n==="warning"),u("shTooltip",e)}}function io(i,t){i&1&&(l(0,"sh-icon",51),p(1,"envelope"),r())}function oo(i,t){i&1&&(l(0,"sh-icon",51),p(1,"hard-drives"),r())}function ao(i,t){i&1&&(l(0,"sh-icon",51),p(1,"jar"),r())}function lo(i,t){i&1&&(l(0,"sh-icon",51),p(1,"textbox"),r())}function ro(i,t){if(i&1){let e=I();l(0,"sh-form-field")(1,"label",42),g(2,Yi,2,0,"sup",47),p(3),g(4,Zi,2,1,"sh-icon",44),g(5,eo,2,0,"sh-icon",48),H(6,to,1,0,"ng-container",25),r(),l(7,"input",49),T("keydown",function(o){S(e);let a=s().$implicit,_=s(2);return f(_.onKeyDown(a.fieldGroup,a.formView.name,a.formView.type,o))})("ngModelChange",function(o){S(e);let a=s().$implicit,_=s(2);return f(_.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r(),de(8)(9),g(10,no,2,5,"sh-icon",50)(11,io,2,0,"sh-icon",51)(12,oo,2,0,"sh-icon",51)(13,ao,2,0,"sh-icon",51)(14,lo,2,0,"sh-icon",51),r()}if(i&2){let e=s().$implicit,n=E(1),o=E(2),a=E(3),_=E(4),d=E(5);s();let m=Z(17);c(),u("for",d),c(),C(e.formView.isMandatory&&_?2:-1),c(),V(" ",n," "),c(),C(e.formView.longDescription?4:-1),c(),C(_&&e.formView.type==="Path"?5:-1),c(),u("ngTemplateOutlet",m)("ngTemplateOutletContext",le(16,_e,me(13,Te,e.fieldGroup,e.formView))),c(),u("type",e.formView.type==="Email"?"email":"text")("id",d)("ngModel",o);let N=a,F=s().hasLeadingSlash(N??"");c(),j(F&&(e.formView.doubleSlash==null?null:e.formView.doubleSlash.message)),c(),j(e.formView.doubleSlash==null?null:e.formView.doubleSlash.type),c(),C(e.formView.type==="Path"?10:e.formView.type==="Email"?11:e.formView.type==="Hostname"?12:e.formView.type==="Bucketname"||e.formView.type==="BucketnameB2"?13:14)}}function so(i,t){i&1&&(l(0,"sup",53),p(1,"*"),r())}function _o(i,t){if(i&1&&(l(0,"sh-icon",44),p(1,"question"),r()),i&2){let e=s(2).$implicit;u("shTooltip",e.formView.longDescription)}}function co(i,t){i&1&&ae(0)}function uo(i,t){if(i&1){let e=I();l(0,"span",57),T("click",function(){S(e);let o=s(2).$implicit,a=s(2);return f(a.oauthStartTokenCreation(o.destinationType,o.fieldGroup,o.formView.name,o.formView.oauthVersion))}),p(1," AuthID "),r()}}function po(i,t){i&1&&(l(0,"sh-icon",51),p(1,"password"),r())}function mo(i,t){if(i&1){let e=I();l(0,"sh-icon",58),T("click",function(){S(e);let o=s(2).$implicit;return f(o.formView.showPassword=!o.formView.showPassword)}),p(1," eye "),r()}}function go(i,t){if(i&1){let e=I();l(0,"sh-icon",58),T("click",function(){S(e);let o=s(2).$implicit;return f(o.formView.showPassword=!o.formView.showPassword)}),p(1," eye-slash "),r()}}function Co(i,t){if(i&1){let e=I();l(0,"sh-form-field")(1,"label",42),g(2,so,2,0,"sup",53),p(3),g(4,_o,2,1,"sh-icon",44),H(5,co,1,0,"ng-container",25),r(),l(6,"input",54),T("ngModelChange",function(o){S(e);let a=s().$implicit,_=s(2);return f(_.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r(),g(7,uo,2,0,"span",55)(8,po,2,0,"sh-icon",51),g(9,mo,2,0,"sh-icon",56)(10,go,2,0,"sh-icon",56),r()}if(i&2){let e=s().$implicit,n=E(1),o=E(2),a=E(4),_=E(5);s();let d=Z(17);c(),u("for",_),c(),C(e.formView.isMandatory&&a?2:-1),c(),V(" ",n," "),c(),C(e.formView.longDescription?4:-1),c(),u("ngTemplateOutlet",d)("ngTemplateOutletContext",le(14,_e,me(11,Te,e.fieldGroup,e.formView))),c(),u("type",e.formView.showPassword?"text":"password")("id",_)("ngModel",o),c(),C(e.oauthField===e.formView.name?7:8),c(2),C(e.formView.showPassword?9:10)}}function To(i,t){i&1&&(l(0,"sup",60),p(1,"*"),r())}function So(i,t){if(i&1&&(l(0,"sh-icon",44),p(1,"question"),r()),i&2){let e=s(3).$implicit;u("shTooltip",e.formView.longDescription)}}function fo(i,t){i&1&&ae(0)}function Eo(i,t){if(i&1&&p(0),i&2){let e=t.$implicit;at(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ")}}function ho(i,t){if(i&1){let e=I();l(0,"sh-select",59)(1,"label",42),g(2,To,2,0,"sup",60),p(3),g(4,So,2,1,"sh-icon",44),H(5,fo,1,0,"ng-container",25),r(),l(6,"input",45),T("ngModelChange",function(o){S(e);let a=s(2).$implicit,_=s(2);return f(_.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r()(),H(7,Eo,1,2,"ng-template",null,3,Je)}if(i&2){let e=Z(8);s();let n=E(0),o=s().$implicit,a=E(1),_=E(2),d=E(4),m=E(5);s();let N=Z(17);u("options",n)("isClearable",!1)("optionTemplate",e),c(),u("for",m),c(),C(o.formView.isMandatory&&d?2:-1),c(),V(" ",a," "),c(),C(o.formView.longDescription?4:-1),c(),u("ngTemplateOutlet",N)("ngTemplateOutletContext",le(14,_e,me(11,Te,o.fieldGroup,o.formView))),c(),u("id",m)("ngModel",_)}}function Fo(i,t){if(i&1&&(de(0),g(1,ho,9,16)),i&2){let e=s().$implicit,n=j(s(2).mapOptions(e.formView));c(),C(n?1:-1)}}function No(i,t){i&1&&(l(0,"sup",63),p(1,"*"),r())}function Do(i,t){if(i&1&&(l(0,"sh-icon",44),p(1,"question"),r()),i&2){let e=s(3).$implicit;u("shTooltip",e.formView.longDescription)}}function yo(i,t){i&1&&ae(0)}function Ao(i,t){if(i&1&&p(0),i&2){let e=t.$implicit;at(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ")}}function Io(i,t){if(i&1){let e=I();l(0,"sh-select",62)(1,"label",42),g(2,No,2,0,"sup",63),p(3),g(4,Do,2,1,"sh-icon",44),H(5,yo,1,0,"ng-container",25),r(),l(6,"input",45),T("ngModelChange",function(o){S(e);let a=s(2).$implicit,_=s(2);return f(_.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r()(),H(7,Ao,1,2,"ng-template",null,4,Je)}if(i&2){let e=Z(8);s();let n=E(0),o=s().$implicit,a=E(1),_=E(2),d=E(4),m=E(5);s();let N=Z(17);u("options",n)("asFreeText",!0)("inlineSearch",!0)("optionTemplate",e),c(),u("for",m),c(),C(o.formView.isMandatory&&d?2:-1),c(),V(" ",a," "),c(),C(o.formView.longDescription?4:-1),c(),u("ngTemplateOutlet",N)("ngTemplateOutletContext",le(15,_e,me(12,Te,o.fieldGroup,o.formView))),c(),u("id",m)("ngModel",_)}}function Po(i,t){i&1&&P(0,"sh-progress-bar",61)}function Oo(i,t){if(i&1&&(de(0),g(1,Io,9,17)(2,Po,1,0,"sh-progress-bar",61)),i&2){let e=s().$implicit,n=E(2),o=j(s(2).mapOptionsWithFreeText(e.formView,n));c(),C(o?1:2)}}function Mo(i,t){i&1&&(l(0,"sup",65),p(1,"*"),r())}function xo(i,t){if(i&1&&(l(0,"sh-icon",44),p(1,"question"),r()),i&2){let e=s(2).$implicit;u("shTooltip",e.formView.longDescription)}}function Ro(i,t){i&1&&ae(0)}function Lo(i,t){if(i&1){let e=I();l(0,"app-size",64),T("ngModelChange",function(o){S(e);let a=s().$implicit,_=s(2);return f(_.updateFieldValue(a.fieldGroup,a.formView.name,o))}),l(1,"label",42),g(2,Mo,2,0,"sup",65),p(3),g(4,xo,2,1,"sh-icon",44),H(5,Ro,1,0,"ng-container",25),r()()}if(i&2){let e=s().$implicit,n=E(1),o=E(2),a=E(4),_=E(5);s();let d=Z(17);u("inputType",e.Name)("ngModel",o)("customId",_),c(),u("for",_),c(),C(e.formView.isMandatory&&a?2:-1),c(),V(" ",n," "),c(),C(e.formView.longDescription?4:-1),c(),u("ngTemplateOutlet",d)("ngTemplateOutletContext",le(12,_e,me(9,Te,e.fieldGroup,e.formView)))}}function bo(i,t){i&1&&(l(0,"sup",66),p(1,"*"),r())}function wo(i,t){if(i&1&&(l(0,"sh-icon",44),p(1,"question"),r()),i&2){let e=s(2).$implicit;u("shTooltip",e.formView.longDescription)}}function Go(i,t){i&1&&ae(0)}function $o(i,t){if(i&1){let e=I();l(0,"sh-form-field")(1,"label",42),g(2,bo,2,0,"sup",66),p(3),g(4,wo,2,1,"sh-icon",44),H(5,Go,1,0,"ng-container",25),r(),l(6,"input",67),T("ngModelChange",function(o){S(e);let a=s().$implicit,_=s(2);return f(_.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r(),l(7,"sh-icon",51),p(8,"numpad"),r()()}if(i&2){let e=s().$implicit,n=E(1),o=E(2),a=E(4),_=E(5);s();let d=Z(17);c(),u("for",_),c(),C(e.formView.isMandatory&&a?2:-1),c(),V(" ",n," "),c(),C(e.formView.longDescription?4:-1),c(),u("ngTemplateOutlet",d)("ngTemplateOutletContext",le(11,_e,me(8,Te,e.fieldGroup,e.formView))),c(),u("id",_)("ngModel",o)}}function vo(i,t){if(i&1&&(l(0,"sh-icon",44),p(1,"question"),r()),i&2){let e=s(2).$implicit;u("shTooltip",e.formView.longDescription)}}function Uo(i,t){i&1&&ae(0)}function ko(i,t){if(i&1){let e=I();l(0,"sh-toggle",39)(1,"label",42),p(2),g(3,vo,2,1,"sh-icon",44),H(4,Uo,1,0,"ng-container",25),r(),l(5,"input",68),T("change",function(o){S(e);let a=s().$implicit,_=s(2);return f(_.updateFieldValue(a.fieldGroup,a.formView.name,o.target.checked?"true":"false"))}),r()()}if(i&2){let e=s().$implicit,n=E(1),o=E(2),a=E(5);s();let _=Z(17),d=s();c(),u("for",a),c(),V(" ",n," "),c(),C(e.formView.longDescription?3:-1),c(),u("ngTemplateOutlet",_)("ngTemplateOutletContext",le(9,_e,me(6,Te,e.fieldGroup,e.formView))),c(),u("checked",d.isTrue(o))}}function Vo(i,t){i&1&&(l(0,"sup",70),p(1,"*"),r())}function Bo(i,t){if(i&1&&(l(0,"sh-icon",44),p(1,"question"),r()),i&2){let e=s(3).$implicit;u("shTooltip",e.formView.longDescription)}}function Ko(i,t){i&1&&ae(0)}function Jo(i,t){if(i&1&&p(0),i&2){let e=t.$implicit;at(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ")}}function Xo(i,t){if(i&1){let e=I();l(0,"sh-select",69)(1,"label",42),g(2,Vo,2,0,"sup",70),p(3),g(4,Bo,2,1,"sh-icon",44),H(5,Ko,1,0,"ng-container",25),r(),l(6,"input",71),T("ngModelChange",function(o){S(e);let a=s(2).$implicit,_=s(2);return f(_.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r()(),H(7,Jo,1,2,"ng-template",null,5,Je)}if(i&2){let e=Z(8);s();let n=E(0),o=s().$implicit,a=E(1),_=E(2),d=E(4),m=E(5);s();let N=Z(17);u("options",n)("selectMultiple",!0)("optionTemplate",e),c(),u("for",m),c(),C(o.formView.isMandatory&&d?2:-1),c(),V(" ",a," "),c(),C(o.formView.longDescription?4:-1),c(),u("ngTemplateOutlet",N)("ngTemplateOutletContext",le(13,_e,me(10,Te,o.fieldGroup,o.formView))),c(),u("ngModel",_)}}function zo(i,t){if(i&1&&(de(0),g(1,Xo,9,15)),i&2){let e=s().$implicit,n=j(s(2).mapOptions(e.formView));c(),C(n?1:-1)}}function Wo(i,t){i&1&&(l(0,"sup",72),p(1,"*"),r())}function Ho(i,t){if(i&1&&(l(0,"sh-icon",44),p(1,"question"),r()),i&2){let e=s(2).$implicit;u("shTooltip",e.formView.longDescription)}}function jo(i,t){i&1&&ae(0)}function qo(i,t){if(i&1){let e=I();l(0,"app-timespan",64),T("ngModelChange",function(o){S(e);let a=s().$implicit,_=s(2);return f(_.updateFieldValue(a.fieldGroup,a.formView.name,o))}),l(1,"label",42),g(2,Wo,2,0,"sup",72),p(3),g(4,Ho,2,1,"sh-icon",44),H(5,jo,1,0,"ng-container",25),r()()}if(i&2){let e=s().$implicit,n=E(1),o=E(2),a=E(4),_=E(5);s();let d=Z(17);u("inputType",e.formView.name)("ngModel",o)("customId",_),c(),u("for",_),c(),C(e.formView.isMandatory&&a?2:-1),c(),V(" ",n," "),c(),C(e.formView.longDescription?4:-1),c(),u("ngTemplateOutlet",d)("ngTemplateOutletContext",le(12,_e,me(9,Te,e.fieldGroup,e.formView)))}}function Qo(i,t){i&1&&(l(0,"sup",74),p(1,"*"),r())}function Yo(i,t){if(i&1&&(l(0,"sh-icon",44),p(1,"question"),r()),i&2){let e=s(2).$implicit;u("shTooltip",e.formView.longDescription)}}function Zo(i,t){i&1&&ae(0)}function ea(i,t){if(i&1){let e=I();l(0,"app-file-drop-textarea",73),T("ngModelChange",function(o){S(e);let a=s().$implicit,_=s(2);return f(_.updateFieldValue(a.fieldGroup,a.formView.name,o))}),l(1,"label"),g(2,Qo,2,0,"sup",74),p(3),g(4,Yo,2,1,"sh-icon",44),H(5,Zo,1,0,"ng-container",25),r()()}if(i&2){let e=s().$implicit,n=E(2),o=E(4),a=E(5);s();let _=Z(17);u("ngModel",n)("customId",a)("placeholder",e.formView.longDescription),c(2),C(e.formView.isMandatory&&o?2:-1),c(),V(" ",e.formView.shortDescription??e.formView.name," "),c(),C(e.formView.longDescription?4:-1),c(),u("ngTemplateOutlet",_)("ngTemplateOutletContext",le(11,_e,me(8,Te,e.fieldGroup,e.formView)))}}function ta(i,t){i&1&&(P(0,"sh-spinner"),l(1,"span"),y(2,10),r()),i&2&&Ct("--spinner-size","16px")("--spinner-thickness","2px")}function na(i,t){if(i&1){let e=I();l(0,"div",77)(1,"span"),y(2,11),r(),l(3,"button",32),T("click",function(){S(e);let o=s(6);return f(o.reloadTrigger.set(!o.reloadTrigger()))}),y(4,12),r()()}}function ia(i,t){if(i&1&&p(0),i&2){let e=t.$implicit;at(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ")}}function oa(i,t){if(i&1){let e=I();l(0,"sh-select",78)(1,"label",42)(2,"sup",79),p(3,"*"),r(),l(4,"span"),y(5,13),r()(),l(6,"input",45),T("ngModelChange",function(o){S(e);let a=s(4).$implicit,_=s(2);return f(_.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r()(),H(7,ia,1,2,"ng-template",null,6,Je)}if(i&2){s(4);let e=E(2),n=E(5),o=s(2);u("options",o.restoreBackupIdOptions())("isClearable",!1),c(),u("for",n),c(5),u("id",n)("ngModel",e)}}function aa(i,t){if(i&1&&g(0,ta,3,4)(1,na,5,0,"div",77)(2,oa,9,5),i&2){let e=s(5);C(e.isLoadingRestoreBackupIdOptions()?0:e.restoreBackupIdOptions().length==0?1:2)}}function la(i,t){i&1&&(l(0,"sup",80),p(1,"*"),r())}function ra(i,t){if(i&1&&(l(0,"sh-icon",44),p(1,"question"),r()),i&2){let e=s(4).$implicit;u("shTooltip",e.formView.longDescription)}}function sa(i,t){i&1&&ae(0)}function _a(i,t){if(i&1){let e=I();l(0,"button",82),T("click",function(){S(e),s(4);let o=E(5),a=s(2);return f(a.toggleDisabled(o))}),M(1,14),P(2,"sh-icon"),x(),r()}}function ca(i,t){if(i&1){let e=I();l(0,"sh-form-field")(1,"label",42),g(2,la,2,0,"sup",80),p(3),g(4,ra,2,1,"sh-icon",44),H(5,sa,1,0,"ng-container",25),r(),l(6,"input",81),T("ngModelChange",function(o){S(e);let a=s(3).$implicit,_=s(2);return f(_.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r(),l(7,"sh-icon",51),p(8,"textbox"),r()(),g(9,_a,3,0,"button",41)}if(i&2){let e=s(3).$implicit,n=E(1),o=E(2),a=E(4),_=E(5);s();let d=Z(17),m=s();c(),u("for",_),c(),C(e.formView.isMandatory&&a?2:-1),c(),V(" ",n," "),c(),C(e.formView.longDescription?4:-1),c(),u("ngTemplateOutlet",d)("ngTemplateOutletContext",le(15,_e,me(12,Te,e.fieldGroup,e.formView))),c(),u("type","text")("id",_)("ngModel",o)("placeholder",e.formView.longDescription)("disabled",!0),c(3),C(m.getIsDisabled(_)?9:-1)}}function da(i,t){if(i&1&&(l(0,"div",75),g(1,aa,3,1)(2,ca,10,17),r()),i&2){let e=s(4);c(),C(e.isRestoreFlow()?1:2)}}function ua(i,t){if(i&1){let e=I();l(0,"div",83),M(1,15),P(2,"div")(3,"div"),x(),r(),l(4,"button",82),T("click",function(){S(e);let o=s(5);return f(o.openConsole())}),M(5,16),P(6,"sh-icon"),x(),r()}}function pa(i,t){i&1&&(l(0,"div",83),y(1,17),r(),l(2,"button",84),M(3,18),P(4,"sh-icon"),x(),r()),i&2&&(c(2),u("routerLink",Ae(1,bi)))}function ma(i,t){if(i&1&&(l(0,"div",76),g(1,ua,7,0)(2,pa,5,2),r()),i&2){let e=s(4);c(),C(e.isConnectedToConsole()?1:2)}}function ga(i,t){if(i&1&&g(0,da,3,1,"div",75)(1,ma,3,1,"div",76),i&2){let e=s(3);C(e.isConnectedToConsole()&&e.hasStorageApiKey()?0:1)}}function Ca(i,t){i&1&&(l(0,"sup",86),p(1,"*"),r())}function Ta(i,t){if(i&1&&(l(0,"sh-icon",44),p(1,"question"),r()),i&2){let e=s(3).$implicit;u("shTooltip",e.formView.longDescription)}}function Sa(i,t){i&1&&ae(0)}function fa(i,t){if(i&1){let e=I();l(0,"div",85)(1,"sh-form-field")(2,"label",42),g(3,Ca,2,0,"sup",86),p(4),g(5,Ta,2,1,"sh-icon",44),H(6,Sa,1,0,"ng-container",25),r(),l(7,"input",87),T("ngModelChange",function(o){S(e);let a=s(2).$implicit,_=s(2);return f(_.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r(),l(8,"sh-icon",51),p(9,"textbox"),r()(),l(10,"button",88),T("click",function(){S(e);let o=s(4);return f(o.authenticateFilen())}),M(11,19),P(12,"sh-icon"),x(),r()()}if(i&2){let e=s(2).$implicit,n=E(1),o=E(2),a=E(4),_=E(5);s();let d=Z(17),m=s();c(2),u("for",_),c(),C(e.formView.isMandatory&&a?3:-1),c(),V(" ",n," "),c(),C(e.formView.longDescription?5:-1),c(),u("ngTemplateOutlet",d)("ngTemplateOutletContext",le(12,_e,me(9,Te,e.fieldGroup,e.formView))),c(),u("id",_)("ngModel",o),c(3),u("disabled",m.isAuthenticatingFilen())}}function Ea(i,t){if(i&1&&g(0,fa,13,14,"div",85),i&2){let e=s(3);C(e.hasFilenApiKey()?-1:0)}}function ha(i,t){if(i&1){let e=I();l(0,"button",82),T("click",function(){S(e);let o=s().$implicit,a=s(2);return f(a.removeAdvancedOption(o.formView.name))}),l(1,"sh-icon"),p(2,"x-circle"),r()()}}function Fa(i,t){if(i&1&&(l(0,"div",35),de(1)(2)(3)(4)(5),g(6,Hi,6,13,"app-file-tree",36)(7,Qi,6,10,"app-file-tree",37)(8,ro,15,18,"sh-form-field")(9,Co,11,16,"sh-form-field")(10,Fo,2,2)(11,Oo,3,2)(12,Lo,6,14,"app-size",38)(13,$o,9,13,"sh-form-field")(14,ko,6,11,"sh-toggle",39)(15,zo,2,2)(16,qo,6,14,"app-timespan",38)(17,ea,6,13,"app-file-drop-textarea",40)(18,ga,2,1)(19,Ea,1,1),g(20,ha,3,0,"button",41),r()),i&2){let e=t.$implicit;s();let n=E(0),o=s();Fe("single-field",e.fieldGroup!=="advanced"),c(),j(e.formView.shortDescription??e.formView.name),c(),j(o.getFieldGroup(n,e.fieldGroup)[e.formView.name]),c();let a=j(o.getFieldValue(e.fieldGroup,e.formView.name));c(),j((a??"").toString().trim()===""),c(),j("destination-"+e.fieldGroup+"-"+e.index+"-"+(e.asHttpOptions?"http":"other")),c(),C(e.formView.type==="FileTree"?6:e.formView.type==="FolderTree"?7:e.formView.type==="String"||e.formView.type==="Path"||e.formView.type==="Email"||e.formView.type==="Hostname"||e.formView.type==="Bucketname"||e.formView.type==="BucketnameB2"?8:e.formView.type==="Password"?9:e.formView.type==="Enumeration"?10:e.formView.type==="NonValidatedSelectableString"?11:e.formView.type==="Size"?12:e.formView.type==="Integer"?13:e.formView.type==="Boolean"?14:e.formView.type==="Flags"?15:e.formView.type==="Timespan"||e.formView.type==="DateTime"?16:e.formView.type==="FreeText"?17:e.formView.type==="DuplicatiBackupId"?18:e.formView.type==="Filen2FACode"?19:-1),c(14),C(e.fieldGroup==="advanced"?20:-1)}}function Na(i,t){if(i&1&&(l(0,"sh-icon",89),p(1,"x-circle"),r()),i&2){s();let e=E(0);u("shTooltip",(e==null?null:e.message)??"Invalid value")}}function Da(i,t){if(i&1&&(l(0,"sh-icon",90),p(1,"warning"),r()),i&2){s();let e=E(0);u("shTooltip",(e==null?null:e.message)??"Invalid value")}}function ya(i,t){if(i&1&&(de(0),g(1,Na,2,1,"sh-icon",89)(2,Da,2,1,"sh-icon",90)),i&2){let e=s().$implicit,n=E(0),o=j(e.formView.validate(n));c(),C((o==null?null:o.type)==="error"?1:(o==null?null:o.type)==="warning"?2:-1)}}function Aa(i,t){if(i&1&&(de(0),g(1,ya,3,2)),i&2){let e=t.$implicit,o=(j(s(2).getFieldValue(e.fieldGroup,e.formView.name))??"").toString().trim()==="";c(),C(!o&&e.formView.validate?1:-1)}}function Ia(i,t){if(i&1&&(de(0),fe(1,Gi,1,9,"ng-container",null,Se),fe(3,vi,1,9,"ng-container",null,Se),l(5,"sh-toggle-card",20),pe(6,21)(7),y(8,7),ce(),de(9),g(10,Ui,3,0,"button",22)(11,Vi,17,2,"div",23),ce(),g(12,Bi,1,3,"textarea",24)(13,Xi,2,0),r(),H(14,Fa,21,9,"ng-template",null,0,Je)(16,Aa,2,2,"ng-template",null,1,Je)),i&2){let e=s(),n=E(1);j(e.destinationForm()),c(),Ee(n.custom),c(2),Ee(n.dynamic),c(2),u("disableToggle",!0),c(4),j(e.nonSelectedAdvancedFormViews()),c(),C(e.showTextArea()?10:11),c(2),C(e.showTextArea()?12:13)}}var Kt=class i{#e=O(Oe);#t=O(ge);#n=O(Rt);#i=O(tt);#o=O(Pn);#s=O(On);#a=O(Ge);injector=O(We);targetUrl=be.required();useBackupState=G(!1);#l=null;destinationType=R(()=>{let t=this.targetUrl();if(!t)return null;let e=Pe(t);return this.#l=e?.customKey??e?.key,this.#l});refreshView=h(!1);destinationForm=h({custom:{},dynamic:{},advanced:{}});advancedFormFieldNames=R(()=>Object.keys(this.destinationForm().advanced??{}));destinationFormConfig=h(null);showTextArea=h(!1);isLoadingRestoreBackupIdOptions=h(!1);isRestoreFlow=R(()=>!this.useBackupState());reloadTrigger=h(!1);hasLoadedBackupIdOptions=h(!1);restoreBackupIdOptions=Ue(_n(Wt(this.targetUrl).pipe(dn(),ot(t=>({url:t,isReload:!1}))),Wt(this.reloadTrigger).pipe(ot(()=>({url:this.targetUrl(),isReload:!0})))).pipe(dt(({url:t,isReload:e})=>t&&t.startsWith("duplicati://")&&this.hasStorageApiKey()&&this.isRestoreFlow()&&(e||!this.hasLoadedBackupIdOptions())?(this.hasLoadedBackupIdOptions.set(!0),this.isLoadingRestoreBackupIdOptions.set(!0),this.#s.getDuplicatiStorageBackups(t).pipe(cn(a=>(console.error("Error loading Duplicati storage backups",a),Ve([]))),Be(()=>this.isLoadingRestoreBackupIdOptions.set(!1)))):Ve([]))),{initialValue:[]});isConnectedToConsole=R(()=>this.#o.state()==="connected");hasStorageApiKey=R(()=>{let t=this.destinationForm();return(this.#n.serverSettings()?.["remote-control-storage-api-id"]??"").length>0||t.advanced["duplicati-auth-apiid"]});isAuthenticatingFilen=h(!1);hasFilenApiKey=R(()=>{let e=this.destinationForm().advanced["api-key"];return e&&e.length>0});nonSelectedAdvancedFormViews=R(()=>{let t=this.destinationFormConfig();if(!t)return[];let e=this.advancedFormFieldNames();return t.advanced.filter(n=>e.findIndex(o=>o===n.name)===-1)});destinationTypeEffect=q(()=>{let t=this.targetUrl(),e=Pe(t??""),n=e.key,o=e.customKey??n,a=this.#i.allModules().find(v=>v.Key===n)??{Key:n,DisplayName:e.displayName,Description:e.description,Options:[]};if(!a||!a.Options||!n)return;let _=e&&e.oauthField?e.oauthField:null,d=e&&e.customFields?e.customFields:{},m=e&&e.dynamicFields?e.dynamicFields:[],N=e&&e.advancedFields?e.advancedFields:[],F=e&&e.ignoredAdvancedFields?e.ignoredAdvancedFields:[],A={destinationType:o,oauthField:_,custom:[],dynamic:[],advanced:[]};d&&Object.entries(d).forEach(([v,D],K)=>{let J=D.order??K,b=D.validate;!b&&D.type==="Bucketname"&&(b=w=>bn(w)?null:{type:"error",message:$localize`Invalid bucket name.`}),b&&D.type==="Hostname"&&(b=w=>wn(w)?null:{type:"error",message:$localize`Invalid hostname.`}),A.custom.push(W({order:900+J,validate:b},D))});for(let v=0;v<a.Options.length;v++){let D=a.Options[v];if(D.Deprecated)continue;let K=m.find(J=>J===D.Name||D.Aliases?.includes(J.name)||J.name===D.Name);if(K){let J=D.Aliases?.indexOf(K.name)??-1,b=D.Aliases&&J>-1?D.Aliases[J]:D.Name,w=K&&typeof K!="string",Me=w?K?.defaultValue??D.DefaultValue:D.DefaultValue,xe=w&&K?.order!==void 0?K.order:v,B={name:b,type:D.Type,shortDescription:D.ShortDescription??void 0,longDescription:D.LongDescription??void 0,options:D.ValidValues,order:900+xe},ze=w?W(W({},B),K):B;A.dynamic.push(ze)}else{let J=D.Name;if(F.find(Re=>Re===J))continue;let w=N.find(Re=>Re===J||Re.name===J),Me=w&&typeof w!="string",xe=Me&&w?.order!==void 0?w.order:v,B={name:J,type:D.Type,shortDescription:D.ShortDescription??void 0,longDescription:D.LongDescription??void 0,options:D.ValidValues,defaultValue:D.DefaultValue,order:900+xe},ze=Me?W(W({},B),w):B;A.advanced.push(ze)}}if(A.custom.sort((v,D)=>v.order-D.order),A.dynamic.sort((v,D)=>v.order-D.order),A.advanced.sort((v,D)=>v.order-D.order),this.destinationFormConfig.set(A),!t)return;let L=bt(t);L&&this.destinationForm.set({custom:L.custom,dynamic:L.dynamic,advanced:L.advanced})});destinationFormEffect=q(()=>{let t=this.#l,e=this.destinationForm(),n=this.refreshView();if(!e||!t)return;let o=Rn({destinationType:t,custom:e.custom,dynamic:e.dynamic,advanced:e.advanced});o&&this.targetUrl.set(o)});getFieldValue(t,e){let o=this.destinationForm()[t][e];return o||null}getFormView(t,e){let o=this.destinationFormConfig()?.[t].find(a=>a.name===e);return o||null}getDefaultFormView(t){return{name:t,type:"String",shortDescription:t,longDescription:$localize`This is an undocumented option.`}}getFieldGroup(t,e){return t[e]}hasLeadingSlash(t){return t?.startsWith("/")??!1}addAdvancedOption(t){let e=this.destinationForm();e.advanced[t.name]=t.defaultValue,this.destinationForm.set(W({},e))}isTrue(t){if(typeof t=="boolean")return t;if(typeof t=="string"){let e=t.toLowerCase();return e==="true"||e==="1"||e==="yes"||e==="on"}return!1}onKeyDown(t,e,n,o){if(n==="Hostname"||n==="Bucketname"){if(["Backspace","Delete","ArrowLeft","ArrowRight","Tab","Home","End"].includes(o.key))return;if(o.key=="/"||o.key=="\\"||o.key==":"){o.preventDefault();return}}}updateFieldValue(t,e,n){let o=this.destinationForm();o[t][e]=n,this.destinationForm.set(W({},o))}removeAdvancedOption(t){let e=this.destinationForm();delete e.advanced[t],this.destinationForm.set(W({},e))}mapOptions(t){let e=t.loadOptions;if(e)return e(this.injector)();let n=t.options;return n?n.map(o=>({key:o,value:o})):null}mapOptionsWithFreeText(t,e){let n=this.mapOptions(t);return n?(e&&e.length>0&&(n.find(a=>a.value===e)||n.push({key:e,value:e})),n):null}#r=h(!1);oauthStartTokenCreation(t,e,n,o){this.#r.set(!0);let a=(o??1)==2?this.#t.defaultOAuthUrlV2():this.#t.defaultOAuthUrl(),_=this.#n.serverSettings()?.["--oauth-url"];if(_&&_.length>0&&(a=_),this.useBackupState()){let D=this.#e.mapFormsToSettings().find(K=>K.Name==="--oauth-url")?.Value;D&&D.length>0&&(a=D)}let d=this.destinationForm().advanced["oauth-url"];d&&d.length>0&&(a=d);let m=`${a}?type=${t}`,N=450,F=600,A=screen.width/2-N/2,L=screen.height/2-F/2,v=window.open(m,"_blank","height="+F+",width="+N+",menubar=0,status=0,titlebar=0,toolbar=0,left="+A+",top="+L);return window.addEventListener("message",D=>{let K=D.data.startsWith("authid:"),J=K?D.data.replace("authid:",""):null;K&&(this.destinationForm.update(b=>(b[e][n]=J,b)),this.#r.set(!1),this.refreshView.set(!this.refreshView()),v?.close())}),!1}settingsAsText=R(()=>{let t=this.destinationForm().advanced;return Object.entries(t).map(([e,n])=>{let o=e??"",a="";return typeof n=="boolean"?a=this.isTrue(n)?"True":"False":(typeof n=="number"||n!=null)&&(a=n.toString()),`${o}=${a}`}).join(`
|
|
4
|
-
`)});updateSettingsFromText(t){if(typeof t!="string")return;let e=Ln(t);this.destinationForm.update(n=>oe(W({},n),{advanced:e}))}getIsDisabled(t){return document.getElementById(t)?.disabled??!0}toggleDisabled(t){let e=document.getElementById(t);e&&(e.disabled=!e.disabled)}openConsole(){this.#o.openConsole()}#_(t){var e=this.useBackupState()?this.#e.backupId():null;this.isAuthenticatingFilen.set(!0),this.#s.getFilenApiKey(t,e).pipe(Be(()=>this.isAuthenticatingFilen.set(!1))).subscribe({next:n=>{if(n.length===0){this.#a.open(ne,{data:{title:$localize`Authentication failed`,message:$localize`No API key was returned from the Filen server.`,confirmText:$localize`OK`}});return}this.destinationForm.update(o=>(o.advanced["api-key"]=n,o.dynamic["two-factor-code"]=null,o)),this.refreshView.set(!this.refreshView())},error:n=>{console.error("Error authenticating Filen",n),this.#a.open(ne,{data:{title:$localize`Authentication failed`,message:$localize`An error occurred while requesting the Filen API key: ${n.message}`,confirmText:$localize`OK`}})}})}authenticateFilen(){let t=this.targetUrl();if(!t)return;let n=this.destinationForm().advanced["api-key"];if(n&&n.length>0){this.#a.open(ne,{data:{title:$localize`Confirm re-authenticate?`,message:$localize`You already have an API key. Are you sure you want to re-authenticate?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:o=>{if(o){var a=new URL(t);a.searchParams.delete("api-key"),this.#_(a.toString())}}});return}this.#_(t)}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=z({type:i,selectors:[["app-single-destination"]],inputs:{targetUrl:[1,"targetUrl"],useBackupState:[1,"useBackupState"]},outputs:{targetUrl:"targetUrlChange"},decls:3,vars:3,consts:()=>{let t;t=$localize`Advanced options`;let e;e=$localize` Show editor ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let n;n=$localize` Add advanced option ${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON:`;let o;o=$localize`This field is mandatory`;let a;a=$localize`This field is mandatory`;let _;_=$localize`This field is mandatory`;let d;d=$localize`An empty path means storing data in the initial or root folder, which is not recommended`;let m;m=$localize`This field is mandatory`;let N;N=$localize`This field is mandatory`;let F;F=$localize`This field is mandatory`;let A;A=$localize`This field is mandatory`;let L;L=$localize`This field is mandatory`;let v;v=$localize`This field is mandatory`;let D;D=$localize`This field is mandatory`;let K;K=$localize`This field is mandatory`;let J;J=$localize`Loading available backups...`;let b;b=$localize`No backups found from this machine, contact support`;let w;w=$localize` Try again `;let Me;Me=$localize`This field is mandatory`;let xe;xe=$localize`Pick the backup to restore from`;let B;B=$localize`This field is mandatory`;let ze;ze=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:pencil${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let Re;Re=$localize`${"[\uFFFD#2\uFFFD|\uFFFD#3\uFFFD]"}:START_TAG_DIV:An API key with storage access is required to use Duplicati storage.${"[\uFFFD/#2\uFFFD|\uFFFD/#3\uFFFD]"}:CLOSE_TAG_DIV:${"[\uFFFD#2\uFFFD|\uFFFD#3\uFFFD]"}:START_TAG_DIV:Visit the console and assign an API key to this machine.${"[\uFFFD/#2\uFFFD|\uFFFD/#3\uFFFD]"}:CLOSE_TAG_DIV:`,Re=Ke(Re);let tn;tn=$localize` Visit console ${"\uFFFD#6\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SH_ICON:`;let nn;nn=$localize`Connect to the console to use Duplicati storage.`;let on;on=$localize` Connect now ${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON:`;let an;an=$localize`This field is mandatory`;let ln;return ln=$localize` Authenticate now ${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON:`,[["fieldTemplate",""],["validateTemplate",""],["option",""],["enumOptionTemplate",""],["nonValidatedOptionTemplate",""],["optionTemplate",""],["backupIdOptionTemplate",""],t,e,n,J,b,w,xe,ze,Re,tn,nn,on,ln,[1,"advanced-options",3,"disableToggle"],["title",""],["shButton","","type","button",1,"outlined","small"],[1,"actions"],["wrap","off","placeholder","Paste advanced options here, one per line.",1,"raw-text-area",3,"ngModel","ngModelOptions"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["shButton","","type","button",1,"outlined","small",3,"click"],[3,"searchable"],["shButton","","type","button",1,"outlined","small",3,"disabled"],["menu",""],["type","button"],["shButton","","type","button",1,"small"],["shButton","","type","button",1,"small",3,"click"],["type","button",3,"click"],["wrap","off","placeholder","Paste advanced options here, one per line.",1,"raw-text-area",3,"ngModelChange","ngModel","ngModelOptions"],[1,"field-row"],[3,"startingPath","accepts","showFiles","hideShortcuts","showHiddenNodes","selectFiles","resolvePaths"],[3,"hideShortcuts","enableCreateFolder","startingPath","resolvePaths"],[3,"inputType","ngModel","customId"],[1,"primary","raised"],[3,"ngModel","customId","placeholder"],["shButton","","type","button",1,"outlined"],[3,"for"],["shTooltip",o],[1,"primary",3,"shTooltip"],["type","text",3,"ngModelChange","id","ngModel"],["shTooltip",a],["shTooltip",_],["shTooltip",d,1,"warn"],["autocomplete","off",3,"keydown","ngModelChange","type","id","ngModel"],["prefix","",3,"error","warn","shTooltip"],["prefix",""],["prefix","",3,"shTooltip"],["shTooltip",m],["autocomplete","new-password",3,"ngModelChange","type","id","ngModel"],["prefix","",1,"link"],["suffix","",1,"clickable"],["prefix","",1,"link",3,"click"],["suffix","",1,"clickable",3,"click"],["label","key","value","value",3,"options","isClearable","optionTemplate"],["shTooltip",N],[1,"indeterminate","primary"],["label","key","value","value",3,"options","asFreeText","inlineSearch","optionTemplate"],["shTooltip",F],[3,"ngModelChange","inputType","ngModel","customId"],["shTooltip",A],["shTooltip",L],["type","number",3,"ngModelChange","id","ngModel"],["type","checkbox",3,"change","checked"],["key","key","value","value",1,"primary","raised",3,"options","selectMultiple","optionTemplate"],["shTooltip",v],["type","text","id","text",3,"ngModelChange","ngModel"],["shTooltip",D],[3,"ngModelChange","ngModel","customId","placeholder"],["shTooltip",K],[1,"duplicati-backup-id"],[1,"duplicati-backup-id-console"],[1,"no-backups-found"],[3,"options","isClearable"],["shTooltip",Me],["shTooltip",B],["autocomplete","off",3,"ngModelChange","type","id","ngModel","placeholder","disabled"],["shButton","","type","button",1,"outlined",3,"click"],[1,"info"],["shButton","","type","button",1,"outlined",3,"routerLink"],[1,"filen-2fa-setup"],["shTooltip",an],["type","text","autocomplete","off",3,"ngModelChange","id","ngModel"],["shButton","","type","button",1,"outlined",3,"click","disabled"],[1,"error",3,"shTooltip"],[1,"warn",3,"shTooltip"]]},template:function(e,n){if(e&1&&(de(0)(1),g(2,Ia,18,5)),e&2){let o=j(n.destinationType());c();let a=j(n.destinationFormConfig());c(),C(o&&a?2:-1)}},dependencies:[qe,ee,ht,te,se,re,Tn,Sn,Ye,Gt,Gn,Bt,ue,Y,Q,Ot,Qe,$e,Mt,ve,It,Pt],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.advanced-options[_ngcontent-%COMP%]{position:relative;z-index:1}textarea[_ngcontent-%COMP%] ~ grammarly-extension[_ngcontent-%COMP%]{display:none}sh-select[_ngcontent-%COMP%]{--miw: p2r(120)}[prefix].link[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline;color:var(--primary-8)}.clickable[_ngcontent-%COMP%]{cursor:pointer;color:var(--primary-8)}label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}label[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:1rem}.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}.actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.raw-text-area[_ngcontent-%COMP%]{min-height:12rem;white-space:pre}.filen-2fa-setup[_ngcontent-%COMP%], .duplicati-backup-id[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:8px;align-items:flex-end}.duplicati-backup-id[_ngcontent-%COMP%] sh-select[_ngcontent-%COMP%]{width:100%}.duplicati-backup-id-console[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:8px;align-items:center}.duplicati-backup-id-console[_ngcontent-%COMP%] .info[_ngcontent-%COMP%]{width:100%;display:flex;flex-direction:column;gap:4px}.no-backups-found[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin-left:4px;margin-right:4px}"],changeDetection:0})};var Jt=class i{#e=O(xt);#t=O(Ge);#n=O(ge);testDestination(t,e,n,o,a,_,d,m,N){return this.#n.hasV2TestOperations()?this.testDestinationv2(t,e,n,o,a,_,d,m,N):this.testDestinationv1(t,e,n,o,a,_,d,m,N)}testDestinationv2(t,e,n,o,a,_,d,m,N){return new ct(F=>{this.#e.postApiV2DestinationTest({requestBody:{DestinationUrl:t,ConnectionStringId:n??null,BackupId:e=="new"?null:e,AutoCreate:m==="create",ReadOnlyTest:N,Options:null,DestinationType:_,SourcePrefix:e=="new"?null:o}}).subscribe({next:A=>{if(A.Success){this.emitSuccessV2(F,t,a,A);return}this.handleGenericError(F,t,a,A.Error??"Unknown error",d)},error:A=>{let L=A?.error?.body??A?.error?.requestBody;if(L?.Data?.FolderExists===!1||L?.StatusCode==="missing-folder"){this.handleMissingFolder(F,t,e,n,a,d,m,N);return}if(L?.Data?.HostCertificate){this.handleMissingCertificate(F,t,a,L.Data?.HostCertificate,d);return}if(L?.Data?.ReportedHostKey){this.handleIncorrectKey(F,t,a,L.Data.ReportedHostKey,L.Data.AcceptedHostKey??null,d);return}this.handleGenericError(F,t,a,A?.message??"Unknown error",d)}})})}testDestinationv1(t,e,n,o,a,_,d,m,N){return new ct(F=>{this.#e.postApiV1RemoteoperationTest({requestBody:{path:t,backupId:e=="new"?null:e,connectionStringId:n??null,sourcePrefix:e=="new"?null:o},type:_}).subscribe({next:A=>{F.next({action:"success",targetUrl:t,testAgain:!1,destinationIndex:a}),F.complete()},error:A=>{this.handleDestinationErrorv1(A.message,t,e,n,a,d,m,N).subscribe(L=>{F.next(L)})}})})}handleMissingFolder(t,e,n,o,a,_,d,m){function N(){t.next({action:"missing-folder",targetUrl:e,testAgain:!1,destinationIndex:a,errorMessage:$localize`The remote destination folder does not exist.`}),t.complete()}if(_||d==="error"){N();return}this.#t.open(ne,{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:F=>{if(!F){this.reportNoAction(t,e,a,$localize`The remote folder does not exist.`);return}this.#n.hasV2TestOperations()?this.#e.postApiV2DestinationTest({requestBody:{DestinationUrl:e,ConnectionStringId:o,AutoCreate:!0,ReadOnlyTest:m,Options:null,BackupId:n=="new"?null:n}}).subscribe({next:A=>{if(A.Success){this.emitSuccessV2(t,e,a,A);return}else this.handleFolderCreateFailure(t,e,a,A.Error??$localize`Unknown error`)},error:A=>{this.handleFolderCreateFailure(t,e,a,A.message??$localize`Unknown error`)}}):this.#e.postApiV1RemoteoperationCreate({requestBody:{path:e,backupId:n=="new"?null:n}}).subscribe({next:()=>{this.handleFolderCreated(t,e,a)},error:A=>{this.handleFolderCreateFailure(t,e,a,A.message??$localize`Unknown error`)}})}})}handleFolderCreateFailure(t,e,n,o){this.#t.open(ne,{data:{title:$localize`Error creating folder`,message:$localize`The remote destination folder could not be created. ${o}`,confirmText:$localize`OK`,cancelText:null},closed:()=>{t.next({action:"generic-error",targetUrl:e,testAgain:!1,destinationIndex:n}),t.complete()}})}emitSuccessV2(t,e,n,o){t.next({action:"success",targetUrl:e,testAgain:!1,destinationIndex:n,anyFilesFound:!o.Data?.FolderIsEmpty,containsBackup:o.Data?.FolderContainsBackupFiles??void 0,containsEncryptedBackupFiles:o.Data?.FolderContainsEncryptedBackupFiles??void 0}),t.complete()}handleFolderCreated(t,e,n){this.#t.open(ne,{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,o){t.next({action:"generic-error",targetUrl:e,errorMessage:o,testAgain:!1,destinationIndex:n}),t.complete()}handleMissingCertificate(t,e,n,o,a){let _=$localize`The server is using a certificate that is not trusted.
|
|
5
|
-
If this is a self-signed certificate, you can choose to trust this certificate.
|
|
6
|
-
The server reported the certificate hash: ${o}`,d=e.includes("?");function m(){t.next({action:"trust-cert",targetUrl:e,suggestedUrl:e+`${d?"&":"?"}accept-specified-ssl-hash=${o}`,testAgain:!0,certData:o,errorMessage:_,destinationIndex:n}),t.complete()}if(a){m();return}this.#t.open(ne,{maxWidth:"500px",data:{title:$localize`Trust the certificate`,message:_,confirmText:$localize`Trust the certificate`,cancelText:$localize`Cancel`},closed:N=>{if(!N){this.reportNoAction(t,e,n,$localize`The server certificate is not trusted.`);return}m()}})}handleIncorrectKey(t,e,n,o,a,_){if(a){let F=function(){t.next({action:"approve-host-key",targetUrl:e,suggestedUrl:N,testAgain:!0,reportedHostKey:o,errorMessage:m,destinationIndex:n}),t.complete()};var d=F;let m=$localize`The host key has changed, please check with the server administrator if this is correct,
|
|
7
|
-
otherwise you could be the victim of a MAN-IN-THE-MIDDLE attack.
|
|
8
|
-
Do you want to REPLACE your CURRENT host key ${a}
|
|
9
|
-
with the REPORTED host key: ${o}?`,N=e;try{let L=new URL(e);L.searchParams.set("ssh-fingerprint",o),N=L.toString()}catch{let L=e.replace(/([?&])ssh-fingerprint=[^&]*/,""),v=L.includes("?");N=L+`${v?"&":"?"}ssh-fingerprint=${o}`}if(_){F();return}this.#t.open(ne,{maxWidth:"500px",data:{title:$localize`The host key has changed`,message:m,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:L=>{if(!L){this.reportNoAction(t,e,n,$localize`The host key was not approved.`);return}F()}})}else{let F=function(){t.next({action:"approve-host-key",targetUrl:e,suggestedUrl:e+`${N?"&":"?"}ssh-fingerprint=${o}`,testAgain:!0,reportedHostKey:o,errorMessage:m,destinationIndex:n}),t.complete()};var d=F;let m=$localize`No certificate was specified, please verify that the reported host key is correct: ${o}`,N=e.includes("?");if(_){F();return}this.#t.open(ne,{maxWidth:"500px",data:{title:$localize`Approve host key?`,message:m,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:A=>{if(!A){this.reportNoAction(t,e,n,$localize`The host key was not approved.`);return}F()}})}}handleGenericError(t,e,n,o,a){function _(){t.next({action:"generic-error",targetUrl:e,testAgain:!1,destinationIndex:n,errorMessage:o}),t.complete()}if(a){_();return}this.#t.open(ne,{maxWidth:"500px",data:{title:$localize`Test connection failed`,message:o,cancelText:$localize`OK`},closed:d=>_()})}handleDestinationErrorv1(t,e,n,o,a,_,d,m){return new ct(N=>{if(t==="missing-folder"){this.handleMissingFolder(N,e,n,o,a,_,d,m);return}if(t.startsWith("incorrect-cert:")){let F=t.split("incorrect-cert:")[1];this.handleMissingCertificate(N,e,a,F,_);return}if(t.startsWith("incorrect-host-key:")){let F=t.split('incorrect-host-key:"')[1].split('",')[0],A=t.split('accepted-host-key:"')[1].split('",')[0];this.handleIncorrectKey(N,e,a,F,A,_);return}this.handleGenericError(N,e,a,t,_)})}static \u0275fac=function(e){return new(e||i)};static \u0275prov=Ne({token:i,factory:i.\u0275fac,providedIn:"root"})};function Pa(i,t){if(i&1){let e=I();l(0,"sh-alert",13),M(1,0),l(2,"button",14),T("click",function(){S(e);let o=s(2);return f(o.testDestinationClick())}),r(),x(),r()}}function Oa(i,t){i&1&&(l(0,"sh-alert",13),M(1,1),P(2,"sh-icon"),l(3,"div",15),P(4,"sh-spinner"),r(),x(),r()),i&2&&(c(4),Ct("--spinner-size","16px")("--spinner-thickness","2px"))}function Ma(i,t){i&1&&(l(0,"sh-alert",17),y(1,2),r())}function xa(i,t){i&1&&(l(0,"sh-alert",16),y(1,3),r())}function Ra(i,t){if(i&1&&g(0,Ma,2,0,"sh-alert",17)(1,xa,2,0,"sh-alert",16),i&2){let e,n=s(4);C((e=n.testResponse())!=null&&e.containsBackup?0:1)}}function La(i,t){i&1&&(l(0,"sh-alert",18),y(1,4),r())}function ba(i,t){i&1&&(l(0,"sh-alert",16),y(1,5),r())}function wa(i,t){i&1&&(l(0,"sh-alert",17),y(1,6),r())}function Ga(i,t){if(i&1&&g(0,La,2,0,"sh-alert",18)(1,ba,2,0,"sh-alert",16)(2,wa,2,0,"sh-alert",17),i&2){let e,n=s(4);C((e=n.testResponse())!=null&&e.containsBackup?0:(e=n.testResponse())!=null&&e.anyFilesFound?1:2)}}function $a(i,t){i&1&&(l(0,"sh-alert",17),y(1,7),r())}function va(i,t){i&1&&(l(0,"sh-alert",16),y(1,8),r())}function Ua(i,t){if(i&1&&g(0,$a,2,0,"sh-alert",17)(1,va,2,0,"sh-alert",16),i&2){let e,n=s(4);C((e=n.testResponse())!=null&&e.anyFilesFound?0:1)}}function ka(i,t){i&1&&(l(0,"sh-alert",17),y(1,9),r())}function Va(i,t){i&1&&(l(0,"sh-alert",17),y(1,10),r())}function Ba(i,t){i&1&&(l(0,"sh-alert",17),y(1,11),r())}function Ka(i,t){if(i&1&&g(0,ka,2,0,"sh-alert",17)(1,Va,2,0,"sh-alert",17)(2,Ba,2,0,"sh-alert",17),i&2){let e,n=s(4);C((e=n.testResponse())!=null&&e.containsBackup?0:(e=n.testResponse())!=null&&e.anyFilesFound?1:2)}}function Ja(i,t){if(i&1&&g(0,Ra,2,1)(1,Ga,3,1)(2,Ua,2,1)(3,Ka,3,1),i&2){let e=s(3);C(e.testExpectation()==="containsBackup"?0:e.testExpectation()==="destinationEmpty"?1:e.testExpectation()==="destinationNotEmpty"?2:3)}}function Xa(i,t){if(i&1){let e=I();M(0,12,1),l(1,"button",14),T("click",function(){S(e);let o=s(4);return f(o.createFolder())}),r(),x()}}function za(i,t){if(i&1&&(l(0,"sh-alert",16),M(1,12),g(2,Xa,2,0,"button",19),x(),r()),i&2){let e=s(3);c(2),C(e.askToCreate()?2:-1)}}function Wa(i,t){if(i&1){let e=I();l(0,"sh-alert",16),p(1),l(2,"button",14),T("click",function(){S(e);let o=s(3);return f(o.useSuggestedUrl())}),p(3,"Approve"),r()()}if(i&2){let e,n=s(3);c(),V(" ",(e=n.testResponse())==null?null:e.errorMessage," ")}}function Ha(i,t){if(i&1){let e=I();l(0,"sh-alert",16),p(1),l(2,"button",14),T("click",function(){S(e);let o=s(3);return f(o.useSuggestedUrl())}),p(3,"Approve"),r()()}if(i&2){let e,n=s(3);c(),V(" ",(e=n.testResponse())==null?null:e.errorMessage," ")}}function ja(i,t){if(i&1){let e=I();l(0,"sh-alert",16),p(1),l(2,"button",14),T("click",function(){S(e);let o=s(3);return f(o.testDestinationClick())}),p(3,"Test again"),r()()}if(i&2){let e,n=s(3);c(),V(" ",(e=n.testResponse())==null?null:e.errorMessage," ")}}function qa(i,t){if(i&1&&g(0,Ja,4,1)(1,za,3,1,"sh-alert",16)(2,Wa,4,1,"sh-alert",16)(3,Ha,4,1,"sh-alert",16)(4,ja,4,1,"sh-alert",16),i&2){let e,n=s(2);C(((e=n.testResponse())==null?null:e.action)==="success"?0:((e=n.testResponse())==null?null:e.action)==="missing-folder"?1:((e=n.testResponse())==null?null:e.action)==="trust-cert"?2:((e=n.testResponse())==null?null:e.action)==="approve-host-key"?3:((e=n.testResponse())==null?null:e.action)==="generic-error"?4:-1)}}function Qa(i,t){if(i&1&&g(0,Pa,3,0,"sh-alert",13)(1,Oa,5,4,"sh-alert",13)(2,qa,5,1),i&2){let e=s();C(e.testSignal()===null?0:e.testSignal()==="testing"?1:2)}}var Xt=class i{#e=O(Jt);targetUrl=be.required();testSignal=be.required();connectionStringId=G(null);backupId=G.required();sourcePrefix=G.required();suppressErrorDialogs=G.required();askToCreate=G.required();readOnlyTest=G.required();testExpectation=G.required();moduleType=G.required();testResponse=R(()=>{let t=this.testSignal();return t&&typeof t!="string"?t:null});isExpectedValidTargetUrl=R(()=>{let t=this.targetUrl();return!(!t||!bt(t))});prevTargetUrl=null;targetUrlEffect=q(()=>{let t=this.targetUrl(),e=this.prevTargetUrl;t!==e&&(this.prevTargetUrl=t,this.testSignal()!=="testing"&&e!==null&&this.testSignal.set(null))});useSuggestedUrl(){let t=this.targetUrl(),e=this.testSignal(),n=e&&typeof e!="string"?e?.targetUrl:null,o=e&&typeof e!="string"?e?.suggestedUrl:null;return!t||!o||n!==t||(this.targetUrl.set(o),this.testDestinationClick()),!1}createFolder(){return this.testDestination(!0),!1}testDestinationClick(){return this.testDestination(!1),!1}testDestination(t){let e=this.targetUrl();if(!e)return;this.testSignal.set("testing");let n=t?"create":this.askToCreate()?"prompt":"error";return new Promise(o=>{this.#e.testDestination(e,this.backupId(),this.connectionStringId(),this.sourcePrefix(),0,this.moduleType(),this.suppressErrorDialogs(),n,this.readOnlyTest())?.subscribe({next:a=>{if(!this.suppressErrorDialogs()&&a.testAgain){let _=a.suggestedUrl;_&&this.targetUrl.set(_),this.testSignal.set("testing"),this.#e.testDestination(_??e,this.backupId(),this.connectionStringId(),this.sourcePrefix(),0,this.moduleType(),this.suppressErrorDialogs(),n,this.readOnlyTest())?.subscribe({next:d=>{this.testSignal.set(d),o(d)}})}else this.testSignal.set(a),o(a)}})})}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=z({type:i,selectors:[["app-test-url"]],inputs:{targetUrl:[1,"targetUrl"],testSignal:[1,"testSignal"],connectionStringId:[1,"connectionStringId"],backupId:[1,"backupId"],sourcePrefix:[1,"sourcePrefix"],suppressErrorDialogs:[1,"suppressErrorDialogs"],askToCreate:[1,"askToCreate"],readOnlyTest:[1,"readOnlyTest"],testExpectation:[1,"testExpectation"],moduleType:[1,"moduleType"]},outputs:{targetUrl:"targetUrlChange",testSignal:"testSignalChange"},decls:1,vars:1,consts:()=>{let t;t=$localize` Make sure to test the configuration ${"\uFFFD#2\uFFFD"}:START_TAG_BUTTON:Test now${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_BUTTON:`;let e;e=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:spinner${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD#3\uFFFD"}:START_TAG_DIV: Testing connection... ${"\uFFFD#4\uFFFD"}:START_TAG_SH_SPINNER:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_SPINNER:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_DIV:`;let n;n=$localize`Success! Test completed, backup found.`;let o;o=$localize`No backup found at the specified destination.`;let a;a=$localize` The remote destination already contains a backup. Please use a different folder for each backup. `;let _;_=$localize` The remote destination is not empty. It is recommended to use an empty folder for the backup. `;let d;d=$localize`Success! Test completed, destination is empty.`;let m;m=$localize`Success! Test completed, destination contains files.`;let N;N=$localize`The remote destination is empty.`;let F;F=$localize`Success! Test completed, backup found.`;let A;A=$localize`Success! Test completed, destination contains files.`;let L;L=$localize`Success! Test completed, destination is empty.`;let v;return v=$localize` The specified folder does not exist. ${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON:Create now${"\uFFFD/#1:1\uFFFD"}:CLOSE_TAG_BUTTON:${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:`,[t,e,n,o,a,_,d,m,N,F,A,L,v,[1,"simple","primary"],["shButton","",1,"primary","small",3,"click"],[1,"testing"],[1,"simple","warn"],[1,"simple","success"],[1,"simple","error"],["shButton","",1,"primary","small"]]},template:function(e,n){e&1&&g(0,Qa,3,1),e&2&&C(n.isExpectedValidTargetUrl()?0:-1)},dependencies:[yt,Y,Q,Pt],styles:["[_nghost-%COMP%]{display:block}.testing[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:8px;justify-content:space-between}"],changeDetection:0})};function Ya(i,t){if(i&1){let e=I();l(0,"app-destination-list",10),T("setDestination",function(o){S(e);let a=s();return f(a.setDestination(o))}),r()}if(i&2){let e=s();u("showAsSources",!0)("moduleType",e.moduleType())}}function Za(i,t){if(i&1){let e=I();l(0,"app-destination-list-item",11)(1,"button",8),T("click",function(){S(e);let o=s();return f(o.removeDestination())}),y(2,3),r()(),l(3,"app-test-url",12),k("targetUrlChange",function(o){S(e);let a=s();return $(a.targetUrlModel,o)||(a.targetUrlModel=o),f(o)})("testSignalChange",function(o){S(e);let a=s();return $(a.testSignal,o)||(a.testSignal=o),f(o)}),r(),l(4,"app-single-destination",13),k("targetUrlChange",function(o){S(e);let a=s();return $(a.targetUrlModel,o)||(a.targetUrlModel=o),f(o)}),r()}if(i&2){let e=s();u("targetUrl",e.targetUrlModel()),c(3),U("targetUrl",e.targetUrlModel)("testSignal",e.testSignal),u("backupId",e.backupId())("sourcePrefix",e.sourcePrefix())("suppressErrorDialogs",e.suppressErrorDialogs())("askToCreate",e.askToCreate())("testExpectation",e.expectedResult())("readOnlyTest",!0)("moduleType",e.moduleType()),c(),U("targetUrl",e.targetUrlModel)}}function el(i,t){i&1&&y(0,2,1)}function tl(i,t){i&1&&y(0,2,2)}function nl(i,t){i&1&&y(0,2,3)}function il(i,t){i&1&&y(0,2,4)}var st=class i{data=G();closed=Le();targetUrlModel=h(null);moduleType=h("Backend");askToCreate=h(!1);expectedResult=h("any");suppressErrorDialogs=h(!1);backupId=h(null);sourcePrefix=h(null);dataEffect=q(()=>{let t=this.data();t?.targetUrlModel&&this.targetUrlModel.set(t.targetUrlModel),t?.moduleType&&this.moduleType.set(t.moduleType),t?.askToCreate!==null&&t?.askToCreate!==void 0&&this.askToCreate.set(t.askToCreate),t?.expectedResult&&this.expectedResult.set(t.expectedResult),t?.suppressErrorDialogs!==null&&t?.suppressErrorDialogs!==void 0&&this.suppressErrorDialogs.set(t.suppressErrorDialogs),t?.backupId&&this.backupId.set(t.backupId),t?.sourcePrefix&&this.sourcePrefix.set(t.sourcePrefix)});testSignal=h(null);setTargetUrl(t,e=!1){this.targetUrlModel.set(t)}setDestination(t){let e=Lt(t??"");if(e){if(e.mapper.default){let n=e.mapper.default("");this.setTargetUrl(n,!0);return}this.setTargetUrl(`${t}://`,!0)}}submit(){this.closed.emit(this.targetUrlModel())}removeDestination(){this.setTargetUrl(null,!0)}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=z({type:i,selectors:[["app-target-url-dialog"]],inputs:{data:[1,"data"]},outputs:{closed:"closed"},decls:15,vars:6,consts:()=>{let t;t=$localize`Remote source`;let e;e=$localize`Cancel`;let n;n=$localize`${"\uFFFD*11:1\uFFFD"}:START_BLOCK_IF: Use storage destination ${"\uFFFD/*11:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*12:2\uFFFD"}:START_BLOCK_ELSE_IF: Use remote source ${"[\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD]"}:CLOSE_BLOCK_ELSE_IF:${"\uFFFD*13:3\uFFFD"}:START_BLOCK_ELSE_IF_1: Use remote destination ${"[\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD]"}:CLOSE_BLOCK_ELSE_IF:${"\uFFFD*14:4\uFFFD"}:START_BLOCK_ELSE: Use remote URL ${"\uFFFD/*14:4\uFFFD"}:CLOSE_BLOCK_ELSE:`,n=Ke(n);let o;return o=$localize`Change`,[t,e,n,o,[1,"title-30"],["content",""],[3,"showAsSources","moduleType"],["footer","",1,"sticky"],["shButton","","type","button",3,"click"],["shButton","","type","button",1,"raised","primary",3,"click","disabled"],[3,"setDestination","showAsSources","moduleType"],[1,"current-destination",3,"targetUrl"],[3,"targetUrlChange","testSignalChange","targetUrl","testSignal","backupId","sourcePrefix","suppressErrorDialogs","askToCreate","testExpectation","readOnlyTest","moduleType"],[3,"targetUrlChange","targetUrl"]]},template:function(e,n){if(e&1&&(l(0,"header")(1,"h3",4),y(2,0),r()(),l(3,"section",5),g(4,Ya,1,2,"app-destination-list",6),g(5,Za,5,11),r(),l(6,"footer",7)(7,"button",8),T("click",function(){return n.closed.emit(null)}),y(8,1),r(),l(9,"button",9),T("click",function(){return n.submit()}),M(10,2),g(11,el,1,0)(12,tl,1,0)(13,nl,1,0)(14,il,1,0),x(),r()()),e&2){let o=!!n.targetUrlModel();c(4),C(o?-1:4),c(),C(o?5:-1),c(4),Fe("loading",n.testSignal()==="testing"),u("disabled",!o||n.testSignal()===null||n.testSignal()==="testing"),c(2),C(n.moduleType()==="Backend"?11:n.moduleType()==="SourceProvider"?12:n.moduleType()==="RestoreDestinationProvider"?13:14)}},dependencies:[Kt,Vt,et,Y,Xt],styles:["[_nghost-%COMP%]{--dialog-p: 1.5rem;display:flex;flex-direction:column;gap:1rem}header[_ngcontent-%COMP%]{display:flex;padding:1.5rem 1.5rem 0}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}footer[_ngcontent-%COMP%]{z-index:1}"],changeDetection:0})};var ol=["formRef"],al=()=>({updateOn:"blur",standalone:!0}),Yt=()=>({standalone:!0});function ll(i,t){if(i&1){let e=I();l(0,"button",41),T("click",function(){S(e);let o=s(2);return f(o.openLocalDiskDialog())}),M(1,12),P(2,"sh-icon"),x(),r()}}function rl(i,t){if(i&1){let e=I();g(0,ll,3,0,"button",40),l(1,"button",41),T("click",function(){S(e);let o=s();return f(o.openRemoteDestinationDialog())}),M(2,11),P(3,"sh-icon"),x(),r()}if(i&2){let e=s();C(e.isLocalDiskSupported()?0:-1)}}function sl(i,t){i&1&&y(0,7,1)}function _l(i,t){i&1&&y(0,7,2)}function cl(i,t){i&1&&(l(0,"p",34),y(1,13),r())}function dl(i,t){i&1&&(l(0,"p",34),y(1,14),r())}function ul(i,t){if(i&1){let e=I();l(0,"sh-form-field")(1,"textarea",42),k("ngModelChange",function(o){S(e);let a=s();return $(a.bulkPaths,o)||(a.bulkPaths=o),f(o)}),T("ngModelChange",function(){S(e);let o=s();return f(o.savePathBulkEdit())}),r()()}if(i&2){let e=s();c(),U("ngModel",e.bulkPaths),u("ngModelOptions",Ae(2,al))}}function pl(i,t){if(i&1){let e=I();l(0,"sh-form-field",46)(1,"input",47),k("ngModelChange",function(o){S(e);let a=s(3);return $(a.editingPath,o)||(a.editingPath=o),f(o)}),r()(),l(2,"button",24),T("click",function(){S(e);let o=s(3);return f(o.updatePath())}),l(3,"sh-icon"),p(4,"floppy-disk"),r()(),l(5,"button",24),T("click",function(){S(e);let o=s(3);return f(o.cancelEditPath())}),l(6,"sh-icon"),p(7,"x-bold"),r()()}if(i&2){let e=s(3);c(),U("ngModel",e.editingPath),u("ngModelOptions",Ae(2,Yt))}}function ml(i,t){if(i&1&&(l(0,"sh-chip"),P(1,"img",48),p(2),r()),i&2){let e=s(2).$implicit,n=s(2);c(),u("src",n.getBackendIcon(e),pt),c(),V(" ",n.getRemotePathDisplayName(e)," ")}}function gl(i,t){if(i&1&&(l(0,"sh-form-field",46),P(1,"input",49),r()),i&2){let e=s(2).$implicit;gt("readonly",!0),c(),u("ngModel",e)("ngModelOptions",Ae(3,Yt))}}function Cl(i,t){if(i&1){let e=I();g(0,ml,3,2,"sh-chip")(1,gl,2,4,"sh-form-field",46),l(2,"button",24),T("click",function(){S(e);let o=s().$implicit,a=s(2);return f(a.editPath(o))}),l(3,"sh-icon"),p(4,"pen"),r()(),l(5,"button",24),T("click",function(){S(e);let o=s().$implicit,a=s(2);return f(a.removePath(o))}),l(6,"sh-icon"),p(7,"trash-simple"),r()()}if(i&2){let e=s().$implicit;C(e.startsWith("@")?0:1)}}function Tl(i,t){if(i&1&&(l(0,"div",43),g(1,pl,8,3)(2,Cl,8,1),r()),i&2){let e=t.$implicit,n=s(2);c(),C(n.oldPath()===e?1:2)}}function Sl(i,t){if(i&1){let e=I();fe(0,Tl,3,1,"div",43,Se),l(2,"div",39)(3,"sh-form-field"),P(4,"input",44),r(),l(5,"button",45),T("click",function(){S(e);let o=s();return f(o.addNewPath())}),l(6,"sh-icon"),p(7,"plus"),r()()()}if(i&2){let e=s();Ee(e.nonFilterPaths()),c(4),u("formControl",e.newPathCtrl)}}function fl(i,t){if(i&1){let e=I();l(0,"div",39)(1,"app-size",50),T("ngModelChange",function(o){S(e);let a=s();return f(a.updateFilesLargerThan(o))}),r()()}if(i&2){let e=s();c(),u("ngModel",e.filesLargerThan())("ngModelOptions",Ae(2,Yt))}}var nt=new Dt,Vn=(i={path:"",filters:[],excludes:{filesLargerThan:null}})=>nt.group({path:nt.control(i.path),excludes:nt.group({filesLargerThan:nt.group({size:nt.control(null),unit:nt.control(null)})})}),Qt=class i{#e=O(Oe);#t=O(Ge);#n=O(we);#i=O(je);#o=O(ge);formRef=Ie.required("formRef");sourceDataForm=this.#e.sourceDataForm;sourceDataFormSignal=this.#e.sourceDataFormSignal;newPathCtrl=new hn("");filesLargerThan=R(()=>{let t=this.sourceDataFormSignal()?.excludes?.filesLargerThan??{};return t.size!==null&&t.unit!==null?`${t.size}${t.unit}`:null});osType=this.#e.osType;pathSignal=Ue(this.sourceDataForm.controls.path.valueChanges);pathArray=R(()=>this.pathSignal()?.split("\0").filter(t=>t.startsWith("-")||t.startsWith("+")||t==="___none___")??[]);nonFilterPaths=R(()=>this.pathSignal()?.split("\0").filter(t=>!t.startsWith("-")&&!t.startsWith("+")&&t!==""));oldPath=h(null);editingPath=h(null);addingNewPath=h(!1);bulkPathEditMode=h(!1);bulkPaths=h("");mobileMenuOpen=h(!1);isLocalDiskSupported=R(()=>this.#o.systemInfo()?.SourceProviderModules?.find(t=>t.Key=="diskimage"));filters=h([]);#s=q(()=>{let e=this.pathSignal()?.split("\0").filter(n=>n!=="___none___"&&(n.startsWith("-")||n.startsWith("+")))??[];this.filters.set(e)});openRemoteDestinationDialog(){this.#t.open(st,{maxWidth:"700px",maxHeight:"80vh",width:"100%",closeOnOutsideClick:!1,data:{targetUrlModel:null,moduleType:"SourceProvider",askToCreate:!1,expectedResult:"destinationNotEmpty",suppressErrorDialogs:!0,backupId:null,sourcePrefix:null}}).component.closed.subscribe(e=>{if(!e)return;let n=Math.random().toString(36).substring(2,10),o=e.split("://")[0],_=`@${this.#o.systemInfo()?.DirectorySeparator==="\\"?"X:\\":"/"}dupl-${o}-${n}|${e}`;this.addPath(_)})}openLocalDiskDialog(){this.#t.open(rt,{maxWidth:"700px",maxHeight:"80vh",width:"100%",closeOnOutsideClick:!1,data:{initialPath:null}}).closed.subscribe(e=>{if(!e)return;let n=Math.random().toString(36).substring(2,10),a=`@${this.#o.systemInfo()?.DirectorySeparator==="\\"?"X:\\":"/"}dupl-disk-${n}|diskimage://${e}`;this.addPath(a)})}togglePathBulkEdit(){if(this.bulkPathEditMode())this.bulkPathEditMode.set(!1);else{let t=this.nonFilterPaths()?.join(`
|
|
10
|
-
`)??"";this.bulkPaths.set(t),this.bulkPathEditMode.set(!0)}}savePathBulkEdit(){let t=this.bulkPaths().split(`
|
|
11
|
-
`).filter(a=>a.trim()!=="")??[],e=this.pathArray(),n=[...t,...e],o=[...new Set(n)].join("\0");this.sourceDataForm.controls.path.setValue(o)}editPath(t){if(t&&t.startsWith("@")){let e=t.split("|");if(e.length!==2)return;e[1].startsWith("diskimage://")?this.editLocalDiskSource(t,e[0],e[1].substring(12)):this.editTargetUrlPath(t,e[0],e[1]);return}this.oldPath.set(t),this.editingPath.set(t)}editLocalDiskSource(t,e,n){this.#t.open(rt,{maxWidth:"700px",maxHeight:"80vh",width:"100%",closeOnOutsideClick:!1,data:{initialPath:n}}).closed.subscribe(a=>{if(!a)return;let _=`${e}|diskimage://${a}`,d=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(d?.replace(t,_)??"")})}editTargetUrlPath(t,e,n){this.#t.open(st,{maxWidth:"700px",maxHeight:"80vh",width:"100%",closeOnOutsideClick:!1,data:{targetUrlModel:n,moduleType:"SourceProvider",askToCreate:!1,expectedResult:"destinationNotEmpty",suppressErrorDialogs:!0,backupId:this.#e.backupId(),sourcePrefix:e}}).closed.subscribe(a=>{if(!a)return;let _=`${e}|${a}`,d=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(d?.replace(t,_)??"")})}updateFilesLargerThan(t){let{size:e,unit:n}=wt(t);this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:e,unit:n})}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 n=(this.sourceDataForm.controls.path.value??"").split("\0"),o=n.indexOf(t);if(o===-1)return;n.splice(o,1);let a=n.filter(_=>_&&_!=="").join("\0");this.sourceDataForm.controls.path.setValue(a)}addPath(t){let n=[this.sourceDataForm.controls.path.value,t].filter(o=>o&&o!=="").join("\0");this.sourceDataForm.controls.path.setValue(n)}updateFilters(t){let n=[...this.nonFilterPaths()??[],...t].filter(o=>o&&o!=="").join("\0");this.sourceDataForm.controls.path.setValue(n)}getPath(){return this.sourceDataForm.value.path??null}getBackendIcon(t){if(!t)return"";let e=t.split("|")[1];return e.startsWith("diskimage:")?"assets/dest-icons/external-harddrive.png":Pe(e).icon??"database"}getRemotePathDisplayName(t){if(!t)return"";let e=t.split("|")[1];if(e.startsWith("diskimage:"))return $localize`Local disk`;let n=Pe(e);return n?n.displayName:"Unknown"}toggleFilesLargerThan(t){t?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,n=t?.split("\0")||[];e&&!n.includes(e)&&n.push(e);let o=n.filter(a=>a&&a!=="").join("\0");this.sourceDataForm.controls.path.setValue(o),this.newPathCtrl.setValue("")}goBack(){this.#n.navigate(["destination"],{relativeTo:this.#i.parent})}next(){this.#e.shouldAutoSave()&&this.#e.submit(!0),this.#n.navigate(["schedule"],{relativeTo:this.#i.parent})}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=z({type:i,selectors:[["app-source-data"]],viewQuery:function(e,n){e&1&&De(n.formRef,ol,5),e&2&&ye()},decls:57,vars:16,consts:()=>{let t;t=$localize`Path`;let e;e=$localize`Source Data`;let n;n=$localize`Folder path`;let o;o=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let a;a=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let _;_=$localize`Options`;let d;d=$localize`Paths`;let m;m=$localize`${"\uFFFD#40\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#40\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD*41:1\uFFFD"}:START_BLOCK_IF: Edit contents as list ${"\uFFFD/*41:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*42:2\uFFFD"}:START_BLOCK_ELSE: Edit contents as text ${"\uFFFD/*42:2\uFFFD"}:CLOSE_BLOCK_ELSE:`;let N;N=$localize`Exclude`;let F;F=$localize`Choose if there’s any files you want to exclude.`;let A;A=$localize` Files larger than `;let L;L=$localize`${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:cloud-arrow-down${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SH_ICON: Add remote path `;let v;v=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:hard-drive${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Add local disk `;let D;D=$localize`Manually add a path.`;let K;K=$localize`Edit paths as text, one per line.`;let J;J=$localize`Add a direct path`;let b;return b=$localize`Edit path`,[["formRef",""],e,n,o,a,_,d,m,N,F,A,L,v,D,K,[3,"submit","formGroup"],[1,"left"],[1,"header-row"],[1,"title-30"],["shButton","","type","button",1,"small","ghost","mobile-menu-toggle",3,"click"],[1,"fill",3,"multiSelect","startingPath","showFiles"],["for","path"],["type","text","id","path","tabindex","4","placeholder",t,"formControlName","path"],[1,"form-actions"],["shButton","","type","button",1,"small",3,"click"],["shButton","","type","submit",1,"raised","primary","small"],[1,"right"],[1,"mobile-header"],["shButton","","type","button",1,"small","ghost",3,"click"],[3,"disableToggle"],["title",""],[1,"spacer"],["shButton","","type","button",1,"small"],["menu",""],["description",""],[1,"paths"],[3,"filtersChange","filters","osType"],["formGroupName","excludes",3,"disableToggle"],[1,"raised","primary",3,"checkedChange","checked"],[1,"row-inputs"],["shButton","","type","button",1,"small","rowbutton"],["shButton","","type","button",1,"small","rowbutton",3,"click"],["wrap","off","rows","10",1,"bulk-textarea",3,"ngModelChange","ngModel","ngModelOptions"],[1,"path"],["type","text","placeholder",J,3,"formControl"],["shButton","","type","button",1,"raised","primary",3,"click"],[1,"small"],["type","text","placeholder",b,3,"ngModelChange","ngModel","ngModelOptions"],["alt","",1,"provider-icon",3,"src"],["type","text",3,"ngModel","ngModelOptions"],[3,"ngModelChange","ngModel","ngModelOptions"]]},template:function(e,n){if(e&1){let o=I();l(0,"form",15,0),T("submit",function(){return n.next()}),l(2,"div",16)(3,"div",17)(4,"h3",18),y(5,1),r(),l(6,"button",19),T("click",function(){return n.mobileMenuOpen.set(!0)}),l(7,"sh-icon"),p(8,"sliders"),r()()(),l(9,"app-file-tree",20)(10,"label",21),y(11,2),r(),P(12,"input",22),r(),l(13,"div",23)(14,"button",24),T("click",function(){return n.goBack()}),M(15,3),P(16,"sh-icon"),x(),r(),l(17,"button",25),M(18,4),P(19,"sh-icon"),x(),r()()(),l(20,"div",26)(21,"div",27)(22,"span",18),y(23,5),r(),l(24,"button",28),T("click",function(){return n.mobileMenuOpen.set(!1)}),l(25,"sh-icon"),p(26,"x-bold"),r()()(),l(27,"app-toggle-card",29),pe(28,30),l(29,"span"),y(30,6),r(),P(31,"div",31),g(32,rl,4,1),l(33,"sh-menu")(34,"button",32)(35,"sh-icon"),p(36,"dots-three-vertical"),r()(),pe(37,33),l(38,"button",24),T("click",function(){return n.togglePathBulkEdit()}),M(39,7),P(40,"sh-icon"),g(41,sl,1,0)(42,_l,1,0),x(),r(),ce(),r(),ce(),g(43,cl,2,0,"p",34)(44,dl,2,0,"p",34),l(45,"div",35),g(46,ul,2,3,"sh-form-field")(47,Sl,8,1),r()(),l(48,"app-filters",36),k("filtersChange",function(_){return S(o),$(n.filters,_)||(n.filters=_),f(_)}),T("filtersChange",function(_){return n.updateFilters(_)}),r(),l(49,"app-toggle-card",37),pe(50,30),y(51,8),ce(),l(52,"p",34),y(53,9),r(),l(54,"sh-toggle",38),T("checkedChange",function(_){return n.toggleFilesLargerThan(_)}),y(55,10),r(),g(56,fl,2,3,"div",39),r()()()}e&2&&(u("formGroup",n.sourceDataForm),c(9),u("multiSelect",!0)("startingPath",n.getPath())("showFiles",!0),c(11),Fe("open",n.mobileMenuOpen()),c(7),u("disableToggle",!0),c(5),C(n.bulkPathEditMode()?-1:32),c(9),C(n.bulkPathEditMode()?41:42),c(2),C(n.bulkPathEditMode()?44:43),c(3),C(n.bulkPathEditMode()?46:47),c(2),U("filters",n.filters),u("osType",n.osType()??""),c(),u("disableToggle",!0),c(5),u("checked",n.filesLargerThan()!==null),c(2),C(n.filesLargerThan()?56:-1))},dependencies:[se,Et,ee,te,ft,re,qe,Fn,Nt,Ft,Nn,ue,Q,Y,ve,Qe,kt,Ye,Xe,Gt,At],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}@media only screen and (max-width:768px){form[_ngcontent-%COMP%]{display:block;position:relative}}.right[_ngcontent-%COMP%], .left[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:1.5rem}.header-row[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.mobile-header[_ngcontent-%COMP%]{display:none}@media only screen and (max-width:768px){.mobile-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-bottom:1.5rem}}.mobile-menu-toggle[_ngcontent-%COMP%]{display:none}@media only screen and (max-width:768px){.mobile-menu-toggle[_ngcontent-%COMP%]{display:inline-flex}}.left[_ngcontent-%COMP%]{padding:2.5rem;overflow:hidden;border-right:1px solid var(--base-4)}@media only screen and (max-width:768px){.left[_ngcontent-%COMP%]{border-right:none;padding:1.5rem 1.5rem 4.5rem;height:100%;width:100%}}.right[_ngcontent-%COMP%]{padding:2.5rem 1.5rem;overflow:auto}@media only screen and (max-width:768px){.right[_ngcontent-%COMP%]{position:absolute;inset:0;z-index:10;background:var(--base-1);padding:1.5rem;transform:translate(100%);transition:transform .3s cubic-bezier(.4,0,.2,1)}.right.open[_ngcontent-%COMP%]{transform:translate(0)}}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}sh-divider[_ngcontent-%COMP%]{margin:.75rem 0}.row-inputs[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr min-content;gap:.25rem}.path[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr min-content min-content;gap:.25rem;align-items:center}.path[_ngcontent-%COMP%] sh-chip[_ngcontent-%COMP%]{width:100%}.path[_ngcontent-%COMP%] .provider-icon[_ngcontent-%COMP%]{width:1rem;height:1rem;margin-right:.5rem}.bulk-textarea[_ngcontent-%COMP%]{width:100%;font-family:monospace;min-height:12.5rem}.paths[_ngcontent-%COMP%]{max-height:200px;overflow-y:auto;display:flex;flex-direction:column;gap:.5rem}"],changeDetection:0})};var Bn="1W:1D,4W:1W,12M:1M",Zt=!1,Oe=class i{#e=O(we);#t=O(ge);#n=O(Ge);#i=O(xt);#o=O(Rt);#s=O($t);#a=O(Ze);generalForm=Kn();sourceDataForm=Vn();scheduleFields=qt();scheduleType=h("daily");settings=h([]);optionsFields={backupRetention:h("all"),backupRetentionTime:h(""),backupRetentionVersions:h(0),backupRetentionCustom:h("")};targetUrls=h([]);targetUrlModel=R(()=>this.targetUrls()[0]?.url??null);connectionStringId=R(()=>this.targetUrls()[0]?.connectionStringId??null);targetUrlTestSignal=h(null);backupMetadata=h(null);isDraft=h(!1);backupId=h(null);backupName=R(()=>this.generalFormSignal()?.name??"");isSubmitting=h(!1);finishedLoading=h(!1);backupDefaults=h(null);applicationOptions=h(null);isNew=R(()=>this.backupId()==="new");shouldAutoSave=R(()=>!this.isDraft()&&!this.isNew());osType=R(()=>this.#t.systemInfo()?.OSType);isConnectionStringSaved=R(()=>{let t=this.targetUrlModel();return t?this.#a.destinations().some(e=>e.BaseUrl===t):!1});selectedOptions=h([]);sourceDataFormSignal=Ue(this.sourceDataForm.valueChanges);generalFormSignal=Ue(this.generalForm.valueChanges);encryptionFieldSignal=Ue(this.generalForm.controls.encryption.valueChanges);advancedOptions=R(()=>this.#t.systemInfo()?.Options?.map(this.#u)??[]);#l=h(null);#r=null;testSignal=this.#l.asReadonly();#_=q(()=>{let t=this.targetUrlModel(),e=this.#l(),n=this.#r;this.#r=t,!(e==="testing"||n===null||n===t)&&this.#l.set(null)});#g=q(()=>{let t=this.targetUrlModel(),e=this.connectionStringId();if(e){let n=this.#a.destinations();if(n.length===0)return;let o=n.find(a=>a.ID===e);!o||o.BaseUrl}});setTestState(t){this.#l.set(t)}#u(t){return{name:t.Name,type:t.Type,shortDescription:t.ShortDescription??void 0,longDescription:t.LongDescription??void 0,options:t.ValidValues}}encryptionOptions=R(()=>{let t=this.#t.systemInfo()?.EncryptionModules??[];return[_t,...t]});nonSelectedOptions=R(()=>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));submit(t=!1){this.isSubmitting.set(!0),this.#p().pipe(dt(e=>{let n=this.#c(),o=this.backupId(),a=n;if(a.Backup){e.length>0&&e[0]!==null?n.Backup.ConnectionStringID=e[0]:e.length>0&&e[0]===null&&(n.Backup.ConnectionStringID=void 0);let d=this.targetUrls().slice(1).map((m,N)=>{let F=e[N+1];return{TargetUrl:m.url,ConnectionStringID:F??void 0,UrlKey:m.urlKey}});d.length>0&&(a.Backup.AdditionalTargetURLs=d)}return this.isDraft()&&n.Backup&&(n.Backup.Metadata=this.backupMetadata()),o==="new"||!o||this.isDraft()?this.#i.postApiV1Backups({requestBody:n}):this.#i.putApiV1BackupById({id:o,requestBody:n})}),Be(()=>this.isSubmitting.set(!1))).subscribe({next:()=>{t||this.exit(!1)},error:()=>{}})}validateBeforeSubmit(){this.generalForm.markAllAsTouched(),this.sourceDataForm.markAllAsTouched();let t=this.#c(),e=(t.Backup.Name??"").trim()!=="",o=(this.generalForm.controls.encryption.value!==""&&this.generalForm.controls.encryption.value!=="-")===!1||this.generalForm.controls.password.value===this.generalForm.controls.repeatPassword.value&&this.generalForm.controls.password.value!=="";if(!e||!o)return this.#n.open(ne,{data:{title:$localize`Validation Error`,message:this.isNew()?$localize`Please fix the errors indicated before creating the backup.`:$localize`Please fix the errors indicated before saving.`,confirmText:$localize`OK`}}),"general";let a=this.targetUrls();if(!(a.length>0&&a.some(m=>m.url.trim()!=="")))return this.#n.open(ne,{data:{title:$localize`Destination required`,message:this.isNew()?$localize`You must setup a destination before creating the backup.`:$localize`Please setup a destination before saving.`,confirmText:$localize`OK`}}),"destination";var d=(t.Backup.Sources??[]).filter(m=>m.trim()!=="").length>0;return!d||!this.sourceDataForm.valid?(this.#n.open(ne,{data:{title:$localize`Source data required`,message:this.isNew()?$localize`You must setup source data before creating the backup.`:$localize`Please add at least one source path before saving.`,confirmText:$localize`OK`}}),"source"):""}exit(t){if(!t){this.#d(),this.#e.navigate(["/"]);return}this.#n.open(ne,{data:{title:$localize`Confirm exit?`,message:$localize`Are you sure you want to exit?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:e=>{e&&(this.#d(),this.#e.navigate(["/"]))}})}mapSourceDataToForm(t){let e=t.Sources??"",n=t.Filters?.map(_=>`${_.Include?"+":"-"}${_.Expression}`)??[],o=t.Settings?.find(_=>_.Name==="--skip-files-larger-than")?.Value?.toUpperCase()??null,a={path:[...e,...n].join("\0"),excludes:{filesLargerThan:o===null?void 0:wt(o)}};this.sourceDataForm.patchValue(a)}mapDestinationToForm(t){let e=t,n=t.TargetURL??"",o=(t.ConnectionStringID===-1?null:t.ConnectionStringID)??null,a=n?[{url:n,connectionStringId:o,urlKey:null,save:!!o}]:[],_=e.AdditionalTargetURLs?.map(d=>({url:d.TargetUrl,urlKey:d.UrlKey,connectionStringId:d.ConnectionStringID??null,save:!!d.ConnectionStringID}))??[];this.targetUrls.set([...a,..._])}mapGeneralToForm(t){let e=t.Name??"",n=t.Description??"",o=t.Settings?.find(m=>m.Name==="encryption-module"),a=t.Settings?.find(m=>m.Name==="passphrase")?.Value??"",_=o?.Value&&o.Value.length?o.Value:"",d={name:t.Name??"",description:t.Description??""};e&&e!==""&&(d.name=e),n&&n!==""&&(d.description=n),_&&_!==""&&(d.encryption=_),a&&a!==""&&(d.password=a,d.repeatPassword=a),this.generalForm.patchValue(d)}mapScheduleToForm(t){if(!t){this.scheduleType.set("disabled"),this.scheduleFields.autoRun.set(!1);return}let e=this.#s.fromString(t.Repeat)??null,n=this.#m(t.Time);this.scheduleFields.autoRun.set(!0),n.date&&this.scheduleFields.nextTime.date.set(n.date),this.scheduleFields.nextTime.time.set(n.time),this.scheduleFields.runAgain.repeatUnit.set(e?.unit??"D"),this.scheduleFields.runAgain.repeatValue.set(e?.value??1),this.scheduleFields.runAgain.allowedDays.mon.set(t.AllowedDays?.includes("mon")??!1),this.scheduleFields.runAgain.allowedDays.tue.set(t.AllowedDays?.includes("tue")??!1),this.scheduleFields.runAgain.allowedDays.wed.set(t.AllowedDays?.includes("wed")??!1),this.scheduleFields.runAgain.allowedDays.thu.set(t.AllowedDays?.includes("thu")??!1),this.scheduleFields.runAgain.allowedDays.fri.set(t.AllowedDays?.includes("fri")??!1),this.scheduleFields.runAgain.allowedDays.sat.set(t.AllowedDays?.includes("sat")??!1),this.scheduleFields.runAgain.allowedDays.sun.set(t.AllowedDays?.includes("sun")??!1);let o=lt(this.scheduleFields),a=vt.find(_=>JSON.stringify(_.data)===JSON.stringify(o));a?this.scheduleType.set(a.value):this.scheduleType.set("custom")}mapOptionsToForms(t,e=!1){let n=["--no-encryption","--skip-files-larger-than","passphrase","keep-time","keep-versions","retention-policy"],o=(t.Settings??[]).map(m=>m);if(e){let m=this.#o.serverSettings()??{};Object.keys(m).filter(N=>N.startsWith("--")).forEach(N=>{o.find(A=>A.Name===N)||o.push({Name:N,Value:m[N],Filter:null})})}let a=o.filter(m=>!n.includes(m.Name)),_=o.filter(m=>n.includes(m.Name));this.settings.set(a??[]),a?.forEach(m=>{if(m.Name==="encryption-module"&&this.isNew())return this.generalForm.controls.encryption.setValue(m.Value??"")});var d="all";_?.forEach(m=>{if(m.Name==="keep-time"&&(m.Value??"")!=="")return d="time",this.optionsFields.backupRetentionTime.set(m.Value??"");if(m.Name==="keep-versions"&&(m.Value??"")!=="")return d="versions",this.optionsFields.backupRetentionVersions.set(m.Value?parseInt(m.Value):null);if(m.Name==="retention-policy"&&(m.Value??"")!=="")if(m.Value===Bn)d="smart";else return d="custom",this.optionsFields.backupRetentionCustom.set(m.Value??"")}),this.optionsFields.backupRetention.set(d)}storeMetadata(t,e){this.backupMetadata.set(e?t.Metadata??null:null)}getScheduleFormValue(){let t=lt(this.scheduleFields);return kn(t)}#c(){let t=this.generalForm.value,e=this.getScheduleFormValue(),n=this.sourceDataForm.value,a=this.targetUrls()[0],_=a?.url??null,d=n.path?.split("\0")??[],m=this.mapFormsToSettings(),N=n.excludes?.filesLargerThan;return N&&N.size!==null&&N.unit!==null&&m.push({Name:"--skip-files-larger-than",Value:`${N.size}${N.unit}`}),{Backup:{Name:t.name,Description:t.description,TargetURL:_??null,ConnectionStringID:a?.connectionStringId??null,Sources:d.filter(F=>!(F.startsWith("-")||F.startsWith("+"))),Settings:m,Filters:d.filter(F=>F.startsWith("-")||F.startsWith("+")).map((F,A)=>({Order:A,Include:F.startsWith("+"),Expression:F.slice(1)}))},Schedule:e}}mapFormsToSettings(t=[]){let e=this.generalForm.value,n=["dblock-size","compression-module"],o=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than","encryption-module","passphrase","keep-time","keep-versions","retention-policy",...n,...n.map(F=>`--${F}`)],a=[{Name:"--no-encryption",Value:"True"}];e.encryption!==""&&e.encryption!==_t.Key&&(a=[{Name:"encryption-module",Value:e.encryption??null},{Name:"passphrase",Value:e.password??null}]);let _=n.map(F=>{let A=this.settings().find(L=>L.Name===F||L.Name==="--"+F);return A?{Name:F,Value:A.Value}:null}).filter(F=>F!==null),d=[];switch(this.optionsFields.backupRetention()){case"time":d.push({Name:"keep-time",Value:this.optionsFields.backupRetentionTime()});break;case"versions":d.push({Name:"keep-versions",Value:this.optionsFields.backupRetentionVersions()?.toString()??""});break;case"custom":d.push({Name:"retention-policy",Value:this.optionsFields.backupRetentionCustom()});break;case"smart":d.push({Name:"retention-policy",Value:Bn});break}let m=[...t,...o],N=this.settings().filter(F=>!m.includes(F.Name)).map(F=>{let A=F.Value;return typeof F.Value=="number"&&(A=F.Value.toString()),typeof F.Value=="boolean"&&(A=F.Value?"True":"False"),{Name:F.Name?.startsWith("--")?F.Name:`--${F.Name}`,Value:A}});return[...a,..._,...d,...N]}#p(){let t=this.targetUrls();if(t.length===0)return Ve([]);let e=t.map(n=>{if(n.connectionStringId)return Ve(n.connectionStringId);if(!n.save)return Ve(null);let o=n.url,_=Pe(o)?.displayName??"Destination",m=this.#a.destinations().filter(A=>A.Name?.startsWith(_)).length,F={Name:`${_} ${new Date().toISOString()}`,Description:null,BaseUrl:o};return this.#a.save("new",F).pipe(ot(A=>A.Data?.ID??null))});return sn(e).pipe(un(n=>{let o=this.targetUrls();n.forEach((a,_)=>{if(a&&_<o.length&&(this.#a.reload(),o[_].connectionStringId!==a)){let d=o[_].urlKey;this.updateTargetUrl(_,o[_].url,a,d)}})}))}#m(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.getFullYear()).padStart(4,"0")}-${(""+(e.getMonth()+1)).padStart(2,"0")}-${(""+e.getDate()).padStart(2,"0")}`}}setTargetUrl(t,e=!1,n=null,o=null){if(e&&(this.#r=null),t===null){this.targetUrls.set([]);return}this.targetUrls.update(a=>{let _=[...a];return _.length===0?_.push({url:t,urlKey:o,connectionStringId:n,save:n?!0:Zt}):_[0]={url:t,urlKey:o,connectionStringId:n,save:n?!0:Zt},_})}addTargetUrl(t,e,n){this.targetUrls.update(o=>[...o,{url:t,connectionStringId:e,urlKey:n,save:e?!0:Zt}])}updateTargetUrl(t,e,n,o){this.targetUrls.update(a=>{if(t<0||t>=a.length)return a;let _=[...a],d=_[t].save;return _[t]={url:e,connectionStringId:n,urlKey:o,save:n?!0:d},_})}toggleSaveConnectionString(t){this.targetUrls.update(e=>{if(t<0||t>=e.length)return e;let n=[...e];return n[t]=oe(W({},n[t]),{save:!n[t].save}),n})}removeTargetUrl(t){this.targetUrls.update(e=>e.filter((n,o)=>o!==t))}#d(){this.generalForm.reset(),this.sourceDataForm.reset(),this.scheduleFields=qt(),this.optionsFields.backupRetention.set("all"),this.settings.set([]),this.targetUrls.set([])}static \u0275fac=function(e){return new(e||i)};static \u0275prov=Ne({token:i,factory:i.\u0275fac,providedIn:"root"})};var El=["formRef"];function hl(i,t){i&1&&(l(0,"sh-alert",17),M(1,5),P(2,"sh-icon",26),x(),r())}function Fl(i,t){if(i&1&&p(0),i&2){let e=t.$implicit;V(" ",e.DisplayName," ")}}function Nl(i,t){if(i&1&&P(0,"sh-progress-bar",40),i&2){let e=s(3);Fe("error",e.calculatePasswordStrength()===1)("warn",e.calculatePasswordStrength()===2)("primary",e.calculatePasswordStrength()===4)("success",e.calculatePasswordStrength()===5),u("value",e.calculatePasswordStrength()*(100/5))}}function Dl(i,t){i&1&&(l(0,"span",35),y(1,10),r())}function yl(i,t){i&1&&(M(0,8,1),P(1,"sh-icon"),x())}function Al(i,t){i&1&&(M(0,8,2),P(1,"sh-icon"),x())}function Il(i,t){i&1&&(M(0,11,1),P(1,"sh-icon",42),x())}function Pl(i,t){i&1&&(M(0,11,2),P(1,"sh-icon"),x())}function Ol(i,t){if(i&1){let e=I();l(0,"button",41),T("click",function(){S(e);let o=s(3);return f(o.copyPassword())}),M(1,11),g(2,Il,2,0)(3,Pl,2,0),x(),r()}if(i&2){let e=s(3);c(2),C(e.copiedPassword()?2:3)}}function Ml(i,t){i&1&&(l(0,"sh-alert",39),y(1,12),r())}function xl(i,t){if(i&1){let e=I();l(0,"div",30)(1,"sh-form-field")(2,"label",31),M(3,7),P(4,"sup"),x(),r(),P(5,"input",32),r(),g(6,Nl,1,9,"sh-progress-bar",33),l(7,"sh-form-field"),P(8,"input",34),g(9,Dl,2,0,"span",35),r(),l(10,"div",36)(11,"button",37),T("click",function(){S(e);let o=s(2);return f(o.showPassword.set(!o.showPassword()))}),M(12,8),g(13,yl,2,0)(14,Al,2,0),x(),r(),l(15,"button",37),T("click",function(){S(e);let o=s(2);return f(o.generatePassword())}),M(16,9),P(17,"sh-icon"),x(),r(),g(18,Ol,4,1,"button",38),r(),g(19,Ml,2,0,"sh-alert",39),r()}if(i&2){let e=s(2);c(5),u("type",e.showPassword()?"text":"password"),c(),C(e.generalForm.value.password?6:-1),c(2),u("type",e.showPassword()?"text":"password"),c(),C(e.generalForm.value.repeatPassword&&e.generalForm.value.repeatPassword!==e.generalForm.value.password?9:-1),c(4),C(e.showPassword()?13:14),c(5),C(e.showCopyPassword()?18:-1),c(),C(e.generalForm.value.password&&e.generalForm.value.password===e.generalForm.value.repeatPassword?19:-1)}}function Rl(i,t){if(i&1&&(l(0,"sh-select",27)(1,"label",28),y(2,6),r(),P(3,"input",29),H(4,Fl,1,1,"ng-template"),r(),g(5,xl,20,7,"div",30)),i&2){let e=s();u("options",e.encryptionOptions())("isClearable",!1),c(5),C(e.encryptionFieldSignal()!==e.noneOptionKey?5:-1)}}function Ll(i,t){if(i&1&&(l(0,"button",24),M(1,13),P(2,"sh-icon"),x(),r()),i&2){let e=s();u("disabled",e.nameAndDescriptionValid()===!1)}}function bl(i,t){if(i&1&&(l(0,"button",25),M(1,14),P(2,"sh-icon"),x(),r()),i&2){let e=s();u("disabled",e.generalForm.invalid||e.showCopyPassword()&&!e.copiedPassword())}}var it=new Dt,Kn=(i={name:"",description:"",encryption:"",password:"",repeatPassword:"",compression:""})=>it.group({name:it.control(i.name,[St.required]),description:it.control(i.description),encryption:it.control(i.encryption,[vn()]),password:it.control(i.password,[Ht(t=>t?.value.encryption!=="-",[St.required])]),repeatPassword:it.control(i.repeatPassword,[Ht(t=>t?.value.encryption!=="-",[St.required])])}),_t={Key:"-",DisplayName:"None"},en=class i{#e=O(we);#t=O(je);#n=O($n);#i=O(Oe);formRef=Ie.required("formRef");generalForm=this.#i.generalForm;generalFormSignal=this.#i.generalFormSignal;encryptionFieldSignal=this.#i.encryptionFieldSignal;encryptionOptions=this.#i.encryptionOptions;isNew=this.#i.isNew;showPassword=h(!1);copiedPassword=h(!1);showCopyPassword=h(!1);noneOptionKey=_t.Key;encryptionEffect=q(()=>{this.encryptionFieldSignal()===_t.Key&&(this.copiedPassword.set(!1),this.showCopyPassword.set(!1))});nameAndDescriptionValid=R(()=>{let t=this.generalFormSignal(),e=this.generalForm.controls;return e?.name&&e.name.valid&&e?.description&&e.description.valid});calculatePasswordStrength=R(()=>{let e=this.generalFormSignal()?.password??"";return this.#n.calculatePasswordStrength(e)});ngOnInit(){this.formRef().nativeElement.focus()}exit(){this.#i.exit(!0)}async copyPassword(){let t=this.generalForm.controls.password.value;await this.#o(t??""),this.copiedPassword.set(!0)}async#o(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)}}}generatePassword(){this.copiedPassword.set(!1);let t=this.#n.generate(41);this.generalForm.controls.password.setValue(t),this.generalForm.controls.repeatPassword.setValue(t),this.showCopyPassword.set(!0)}next(){this.#i.shouldAutoSave()&&this.#i.submit(!0),this.#e.navigate(["destination"],{relativeTo:this.#t.parent})}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=z({type:i,selectors:[["app-general"]],viewQuery:function(e,n){e&1&&De(n.formRef,El,5),e&2&&ye()},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 o;o=$localize`General backup settings`;let a;a=$localize` Backup name ${"\uFFFD#8\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#8\uFFFD"}:CLOSE_SUPERSCRIPT:`;let _;_=$localize`Backup description`;let d;d=$localize`${"\uFFFD#18\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SH_ICON: Exit `;let m;m=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:lock${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Encrypted backup `;let N;N=$localize`Encryption`;let F;F=$localize`Encryption`;let A;A=$localize`Password`;let L;L=$localize`Repeat password`;let v;v=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let D;D=$localize`${"\uFFFD*13:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:eye-slash${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Hide ${"\uFFFD/*13:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*14:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:eye${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Show ${"\uFFFD/*14:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,D=Ke(D);let K;K=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SH_ICON:password${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SH_ICON: Generate password `;let J;J=$localize`Passwords do not match`;let b;b=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SH_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Copied password ${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SH_ICON_1:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Copy password ${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,b=Ke(b);let w;w=$localize` Tip: Be sure to save your password. If you lose it, you will lose access to your backups. `;let Me;Me=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let xe;return xe=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`,[["formRef",""],o,a,_,d,m,F,v,D,K,J,b,w,Me,xe,["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","shButton","",3,"click"],["shButton","","type","submit",1,"raised","primary",3,"disabled"],["shButton","","type","submit","shTooltip",n,1,"raised","primary",3,"disabled"],["icon",""],["value","Key","label","DisplayName",3,"options","isClearable"],["for","encryption"],["type","text","id","encryption","tabindex","3","placeholder",N,"formControlName","encryption"],[1,"passwords"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",A,"formControlName","password",3,"type"],[1,"raised",3,"error","warn","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",L,"formControlName","repeatPassword",3,"type"],["error",""],[1,"password-actions"],["shButton","","type","button",1,"small",3,"click"],["shButton","","type","button",1,"small","copy"],["type","primary"],[1,"raised",3,"value"],["shButton","","type","button",1,"small","copy",3,"click"],[1,"sh-success"]]},template:function(e,n){if(e&1&&(l(0,"form",15,0),T("submit",function(){return n.next()}),l(2,"h3",16),y(3,1),r(),g(4,hl,3,0,"sh-alert",17),l(5,"sh-form-field")(6,"label",18),M(7,2),P(8,"sup"),x(),r(),P(9,"input",19),r(),l(10,"sh-form-field")(11,"label",20),y(12,3),r(),P(13,"textarea",21),r(),g(14,Rl,6,3),l(15,"div",22)(16,"button",23),T("click",function(){return n.exit()}),M(17,4),P(18,"sh-icon"),x(),r(),g(19,Ll,3,1,"button",24)(20,bl,3,1,"button",25),r()()),e&2){let o;u("formGroup",n.generalForm),c(4),C(!n.isNew()&&((o=n.generalFormSignal())==null?null:o.encryption)!==""?4:-1),c(10),C(n.isNew()?14:-1),c(5),C(n.encryptionFieldSignal()===n.noneOptionKey||!n.isNew()?19:20)}},dependencies:[qe,Et,ee,te,ft,Nt,Ft,ue,$e,Y,Q,It,yt,Mt],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-8)}.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%] sh-icon.sh-success[_ngcontent-%COMP%]{color:var(--success-8)}"],changeDetection:0})};export{Ze as a,et as b,Vt as c,Kn as d,_t as e,en as f,vt as g,kn as h,qt as i,jt as j,Xe as k,kt as l,Xt as m,st as n,Vn as o,Qt as p,Oe as q,Kt as r};
|
package/chunk-OP7MDR2B.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as D}from"./chunk-NUV5LHQV.js";import{c as j,e as V}from"./chunk-PDZNQW6F.js";import{z as b}from"./chunk-CJKZ27FM.js";import{a as x,d as v}from"./chunk-KNSQLQC6.js";import{ma as L}from"./chunk-YF6JHIN5.js";import{$ as a,Gc as W,Hb as N,Ib as C,Ic as $,Jb as _,N as R,Rc as p,Ta as M,Ub as A,Vb as w,W as h,Wb as P,Xb as F,Yb as G,f as m,g as y,hb as I,qa as n,sa as O}from"./chunk-K5XGRFWJ.js";var S=class r{reconnectTimer=n(15e3);countdown=n(0);connectTimerEffect=O(()=>{let e=this.reconnectTimer();this.countdown.set(e/1e3)});interval=setInterval(()=>{if(this.countdown()<=1){this.countdown.set(this.reconnectTimer()/1e3);return}this.countdown.set(this.countdown()-1)},1e3);ngOnDestroy(){clearInterval(this.interval)}static \u0275fac=function(t){return new(t||r)};static \u0275cmp=I({type:r,selectors:[["app-disconnected-dialog"]],decls:8,vars:4,consts:()=>{let e;e=$localize`Reconnecting...`;let t;return t=$localize` The connection to the server is lost, attempting again in ${"\uFFFD#6\uFFFD"}:START_TAG_STRONG:0:${"\uFFFD0\uFFFD"}:INTERPOLATION:${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_STRONG:`,[e,t,["header",""],["content",""]]},template:function(t,s){t&1&&(N(0,"header",2)(1,"h3"),P(2,0),C()(),N(3,"div",3)(4,"p"),A(5,1),_(6,"strong"),W(7,"number"),w(),C()()),t&2&&(M(7),F($(7,1,s.countdown(),"2.0-0")),G(5))},dependencies:[L],styles:["[_nghost-%COMP%]{display:block;padding:1rem}"],changeDetection:0})};var l=!1,T=class r{#e=a(V);#n=a(D);dialog=a(b);#s=null;#t=n("disconnected");#i=n(null);#a=n(null);#u=n(null);#o=n(null);#r=n(null);#d=n(null);#c=n(null);#h=void 0;#l=n({legacystatus:!0});shouldConnect=n(!0);connectionStatus=this.#t.asReadonly();serverState=this.#i.asReadonly();serverProgress=this.#a.asReadonly();serverSettings=this.#u.asReadonly();subscriptions=this.#l.asReadonly();serverTaskQueue=this.#o.asReadonly();backupListState=this.#r.asReadonly();notificationState=this.#d.asReadonly();remoteControlState=this.#c.asReadonly();#S=null;taskCompleted=new m(e=>{this.#S=e});#f=0;#p=null;start(){this.shouldConnect.set(!0),this.#m()}#m(){this.#p&&(clearTimeout(this.#p),this.#p=null);let e=this.#e.token();if(!e){console.error("No access token available");return}let t=window.location.protocol==="https:"?"wss:":"ws:",s=window.location.port?`:${window.location.port}`:"";window.location.port==="4200"&&(s=":8200");let u=window.location.hostname,g=x.BASE||"",f=this.#e.xsrfQueryParam(),Q=this.#n.hasWebSocketAuth()?`${t}//${u}${s}${g}/notifications${f?`?${f}`:""}`:`${t}//${u}${s}${g}/notifications?token=${e}${f?`&${f}`:""}`;this.#t.set("connecting"),this.#s=new WebSocket(Q),this.#s.onopen=()=>{l&&console.log("WebSocket connection established"),this.#n.hasWebSocketAuth()?(this.#t.set("authenticating"),this.#s?.send(JSON.stringify({Version:1,Token:e,Action:"auth"}))):this.#g()},this.#s.onmessage=d=>{if(this.#t()==="authenticating")try{let i=JSON.parse(d.data);if(i.Success){l&&console.log("WebSocket authentication successful"),this.#g();return}else if(i?.Type==="legacystatus")l&&console.log("WebSocket authentication successful"),this.#g();else{console.error("WebSocket authentication failed:",i.Message),this.#t.set("disconnected"),this.#e.refreshToken().subscribe({next:()=>{this.reconnect()},error:o=>{console.error("Error refreshing token after WebSocket auth failed",o)}});return}}catch(i){console.error("Error parsing WebSocket authentication reply",i),this.#t.set("disconnected");return}try{let i=JSON.parse(d.data),c=i?.Type;if(c==="legacystatus"||c==null)l&&console.log("Received legacy status update:",i),this.#i.set(i);else if(c==="reply"){let o=i;o.Success||console.error("WebSocket reply error:",o.Message)}else if(c==="progress"){let o=i;l&&console.log("Received progress update:",o.Data),this.#a.set(o.Data)}else if(c==="serversettings"){let o=i;l&&console.log("Received server settings update:",o.Data),this.#u.set(o.Data)}else if(c==="taskqueue"){let o=i;l&&console.log("Received task update:",o.Data),this.#o.set(o.Data)}else if(c==="taskcompleted"){let o=i;l&&console.log("Received task completed:",o.Data),this.#S?.next(o.Data)}else if(c==="backuplist"){let o=i;l&&console.log("Received backup list update:",o.Data),this.#r.set(o.Data)}else if(c==="notifications"){let o=i;l&&console.log("Received notification update:",o.Data),this.#d.set(o.Data)}else if(c==="remotecontrol"){let o=i;l&&console.log("Received remote control update:",o.Data),this.#c.set(o.Data)}else console.warn("Unknown WebSocket message type:",c)}catch(i){console.error("Error parsing WebSocket message",i)}},this.#s.onclose=d=>{l&&console.log("WebSocket connection closed",d),this.#t.set("disconnected");var i=d.code===4401;i&&this.#e.refreshToken().subscribe({next:()=>{this.reconnect()},error:c=>{console.error("Error refreshing token",c)}}),this.shouldConnect()&&(this.#h||(this.#h=this.dialog.open(S,{closeOnButton:!1,closeOnEsc:!1,closeOnOutsideClick:!1}),this.#h.component.reconnectTimer.set(15e3)),this.#p&&clearTimeout(this.#p),this.#p=setTimeout(()=>this.#m(),5e3))},this.#s.onerror=d=>{console.error("WebSocket error",d),this.#t.set("disconnected")}}#g(){this.#t.set("connected");let e=this.#l();Object.keys(e).length>0&&Object.entries(e).forEach(([t,s])=>{s!=null&&this.sendSubscribeRequest(t,s)}),this.#h&&this.#h.close()}stop(){this.shouldConnect.set(!1),this.#s?.close()}reconnect(){this.#s?.close(),this.start()}reconnectIfNeeded(){this.#s?.readyState!==WebSocket.OPEN&&this.reconnect()}sendSubscribeRequest(e,t){this.#s?.send(JSON.stringify({Version:1,Id:`req-${++this.#f}`,Action:"sub",Service:e,Data:t||null}))}subscribe(e,t=void 0){let s=this.#l(),u=s[e];(!u||JSON.stringify(u)!==JSON.stringify(t||!0))&&(s[e]=t||!0,this.#l.set(s),this.#t()=="connected"&&this.sendSubscribeRequest(e,t))}unsubscribe(e){let t=this.#l();t[e]&&(delete t[e],this.#l.set(t),this.#t()=="connected"&&this.#s?.send(JSON.stringify({Version:1,Id:`req-${++this.#f}`,Action:"unsub",Service:e})))}static \u0275fac=function(t){return new(t||r)};static \u0275prov=h({token:r,factory:r.\u0275fac,providedIn:"root"})};var k=class r{dialog=a(b);#e=a(v);#n=n("disconnected");#s=n(null);#t=n(-1);#i=n(0);#a=n(!1);#u=new y;connectionStatus=this.#n.asReadonly();serverState=this.#s.asReadonly();#o=void 0;duration=a(j).relayIsEnabled()?"94s":"299s";start(){this.#a.set(!0),this.#u=new y,this.#r()}stop(){this.#u.next(),this.#u.complete(),this.#a.set(!1)}reconnect(){this.stop(),this.start()}reconnectIfNeeded(){this.#a()||this.reconnect()}#r(){this.#n.set("connecting"),this.#e.getApiV1Serverstate({lastEventId:this.#t(),longpoll:this.#t()>=0,duration:this.duration}).pipe(R(this.#u)).subscribe({next:e=>{e&&this.#d(e),this.#c()},error:e=>{let s=this.#i()+1,u=Math.min(5e3*s,3e4);this.#i.set(s),s>3&&this.#n.set("disconnected"),this.#o||(this.#o=this.dialog.open(S,{closeOnButton:!1,closeOnEsc:!1,closeOnOutsideClick:!1})),this.#o.component.reconnectTimer.set(u),setTimeout(()=>{this.#r()},u)}})}#d(e){this.#n.set("connected"),this.#s.set(e),this.#t.set(e.LastEventID??-1),this.#i.set(0)}#c(){this.#a()&&this.#r()}static \u0275fac=function(t){return new(t||r)};static \u0275prov=h({token:r,factory:r.\u0275fac,providedIn:"root"})};var q=10,J=class r{#e=a(T);#n=a(k);#s=a(v);#t=a(D);#i=n("longpoll");#a=n(!1);#u=p(()=>this.#t.hasTaskCompletedOption()&&this.#i()==="websocket");#o={};#r=null;#d=!1;#c=[];constructor(){this.#e.subscribe("taskcompleted"),this.#e.taskCompleted.subscribe(e=>{if(this.#c.unshift(e),this.#c.length>q&&this.#c.pop(),!e.ID)return;let t=this.#o[e.ID];t&&(t.forEach(s=>{s.next(e),s.complete()}),delete this.#o[e.ID])})}connectionStatus=p(()=>this.#i()==="websocket"?this.#e.connectionStatus():this.#n.connectionStatus());isConnectionMethodSet=this.#a.asReadonly();serverState=p(()=>this.#i()==="websocket"?this.#e.serverState():this.#n.serverState());progressState=this.#e.serverProgress;taskQueueState=this.#e.serverTaskQueue;activeTaskQueueState=p(()=>this.#i()==="websocket"?this.#e.serverTaskQueue()?.map(t=>t.ID).filter(t=>t)??[]:(this.#n.serverState()?.SchedulerQueueIds??[]).map(t=>t.Item1).filter(t=>t));backupListState=p(()=>this.#e.backupListState());setConnectionMethod(e){e==="websocket"?(this.#e.reconnectIfNeeded(),this.#n.stop()):(this.#n.reconnectIfNeeded(),this.#e.stop()),this.#i.set(e),this.#a.set(!0)}getConnectionMethod(){return this.#i()}subscribe(e,t=null){this.#e.subscribe(e,t)}unsubscribe(e){this.#e.unsubscribe(e)}waitForTaskToComplete(e){return new m(t=>{let s=this.#c.find(u=>u.ID===e);if(s){t.next(s),t.complete();return}this.#o[e]=this.#o[e]||[],this.#o[e].push(t),this.#h()})}#h(){this.#d||this.#u()||(this.#d=!0,this.#l())}#l(){let e=Object.keys(this.#o).map(s=>parseInt(s,10));if(e.length===0){this.#S();return}let t=Math.min(...e);this.#s.getApiV1TaskByTaskid({taskid:t}).subscribe({next:s=>{s.TaskFinished!=null&&(this.#c.unshift(s),this.#c.length>q&&this.#c.pop(),this.#o[t].forEach(g=>{g.next(s),g.complete()}),delete this.#o[t])},complete:()=>{this.#r=window.setTimeout(()=>{this.#l()},1e3)},error:s=>{this.#r=window.setTimeout(()=>{this.#l()},3e3)}})}#S(){this.#r!==null&&(clearTimeout(this.#r),this.#r=null),this.#d=!1}static \u0275fac=function(t){return new(t||r)};static \u0275prov=h({token:r,factory:r.\u0275fac,providedIn:"root"})};export{T as a,J as b};
|
package/chunk-OSGHJCUU.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as ne}from"./chunk-VZNLMGYP.js";import{q as ee}from"./chunk-O2L2FRYE.js";import"./chunk-PNQ5BDQN.js";import{d as Z}from"./chunk-2EX5HS5X.js";import"./chunk-EVEI25GQ.js";import"./chunk-6Q6SSTBK.js";import"./chunk-COEGVUM3.js";import"./chunk-KZYRTI62.js";import"./chunk-TSVSMVY4.js";import"./chunk-2KD757N6.js";import"./chunk-OP7MDR2B.js";import"./chunk-PEOYNJJM.js";import"./chunk-NUV5LHQV.js";import"./chunk-PDZNQW6F.js";import{B as j,H as Q,P as q,c as X,e as W,i as z,k as V,s as H,v as Y}from"./chunk-CJKZ27FM.js";import"./chunk-KNSQLQC6.js";import{b as U,d as J}from"./chunk-CQJRBQ6I.js";import"./chunk-V2UO7ES2.js";import"./chunk-HDDAGHHE.js";import"./chunk-YF6JHIN5.js";import"./chunk-2YUSBRXY.js";import{$ as C,Bc as D,Db as m,Eb as i,Fb as a,Gb as P,Nb as g,Ta as p,Ub as N,Vb as E,Wb as l,Yc as K,_b as f,ac as c,ea as O,fa as S,hb as $,hc as v,ic as B,lc as x,qa as w,tc as d,uc as T,vc as u,xb as L,yb as G}from"./chunk-K5XGRFWJ.js";import"./chunk-7CGTOI24.js";var te=["formRef"],ie=()=>["--skip-files-larger-than","encryption-module","no-encryption","--no-encryption","--dbpath","keep-time","keep-versions","retention-policy"];function oe(s,r){s&1&&(i(0,"p"),l(1,4),a())}function ae(s,r){if(s&1){let n=g();i(0,"p"),l(1,5),a(),i(2,"app-timespan",21),u("ngModelChange",function(o){O(n);let t=c();return T(t.optionsFields.backupRetentionTime,o)||(t.optionsFields.backupRetentionTime=o),S(o)}),i(3,"label",22),l(4,6),a()()}if(s&2){let n=c();p(2),m("customId","backupRetentionTime"),d("ngModel",n.optionsFields.backupRetentionTime)}}function se(s,r){if(s&1){let n=g();i(0,"p"),l(1,7),a(),i(2,"sh-form-field")(3,"label",23),l(4,8),a(),i(5,"input",24),u("ngModelChange",function(o){O(n);let t=c();return T(t.optionsFields.backupRetentionVersions,o)||(t.optionsFields.backupRetentionVersions=o),S(o)}),a()()}if(s&2){let n=c();p(5),d("ngModel",n.optionsFields.backupRetentionVersions)}}function _e(s,r){s&1&&(i(0,"p"),l(1,9),a())}function le(s,r){if(s&1){let n=g();i(0,"p"),l(1,10),a(),i(2,"sh-form-field")(3,"p"),l(4,11),a(),i(5,"label",25),l(6,12),a(),i(7,"input",26),u("ngModelChange",function(o){O(n);let t=c();return T(t.optionsFields.backupRetentionCustom,o)||(t.optionsFields.backupRetentionCustom=o),S(o)}),a()()}if(s&2){let n=c();p(7),d("ngModel",n.optionsFields.backupRetentionCustom)}}var re=[{value:"all",name:$localize`Keep all backups`},{value:"time",name:$localize`Delete backups that are older than`},{value:"versions",name:$localize`Keep a specific number of backups`},{value:"smart",name:$localize`Smart backup retention`},{value:"custom",name:$localize`Custom backup retention`}],h=class s{#e=C(ee);#n=C(J);#t=C(U);formRef=K.required("formRef");isSubmitting=this.#e.isSubmitting;settings=this.#e.settings;optionsFields=this.#e.optionsFields;applicationOptions=this.#e.applicationOptions;retentionOptions=w(re);goBack(){this.#n.navigate(["schedule"],{relativeTo:this.#t.parent})}submit(){switch(this.#e.validateBeforeSubmit()){case"general":this.#n.navigate(["general"],{relativeTo:this.#t.parent});return;case"destination":this.#n.navigate(["destination"],{relativeTo:this.#t.parent});return;case"source":this.#n.navigate(["source-data"],{relativeTo:this.#t.parent});return}this.#e.submit()}static \u0275fac=function(n){return new(n||s)};static \u0275cmp=$({type:s,selectors:[["app-advanced-options-settings"]],viewQuery:function(n,e){n&1&&v(e.formRef,te,5),n&2&&B()},decls:20,vars:12,consts:()=>{let r;r=$localize`Options`;let n;n=$localize`Backup retention`;let e;e=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let o;o=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Submit `;let t;t=$localize`Nothing will be deleted. The backup size will grow with each change.`;let M;M=$localize`If at least one newer backup is found, all backups older than this date are deleted.`;let I;I=$localize`Time to keep versions`;let R;R=$localize`Once there are more backups than the specified number, the oldest backups are deleted.`;let b;b=$localize`Number of versions`;let y;y=$localize` Over time backups will be deleted automatically. There will remain one backup for each of the last 7 days, each of the last 4 weeks, each of the last 12 months. There will always be at least one remaining backup. `;let A;A=$localize` Enter a retention strategy manually. Placeholders are D/W/Y for days/weeks/years and U for unlimited. The syntax is: 7D:1D,4W:1W,36M:1M. This example keeps one backup for each of the next 7 days, one for each of the next 4 weeks, and one for each of the next 36 months. This can also be written as 1W:1D,1M:1W,3Y:1M. `;let k;k=$localize`Once there are more backups than the specified number, the oldest backups are deleted.`;let F;return F=$localize`Retention expression`,[r,n,e,o,t,M,I,R,b,y,A,k,F,[1,"title-30"],["value","value","label","name",3,"options","inlineSearch","isClearable"],["for","size"],["type","text",3,"ngModelChange","ngModel"],[3,"optionsChange","options","applicationOptions","hasFreeTextSettings","hiddenOptions"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","",1,"raised","primary",3,"click"],[3,"ngModelChange","customId","ngModel"],["for","backupRetentionTime"],["for","backupRetentionVersions"],["type","number","id","backupRetentionVersions",3,"ngModelChange","ngModel"],["for","backupRetentionCustom"],["type","text","id","backupRetentionCustom",3,"ngModelChange","ngModel"]]},template:function(n,e){n&1&&(i(0,"section")(1,"h3",13),l(2,0),a(),i(3,"sh-select",14)(4,"label",15),l(5,1),a(),i(6,"input",16),u("ngModelChange",function(t){return T(e.optionsFields.backupRetention,t)||(e.optionsFields.backupRetention=t),t}),a()(),L(7,oe,2,0,"p")(8,ae,5,2)(9,se,6,1)(10,_e,2,0,"p")(11,le,8,1),i(12,"app-options-list",17),u("optionsChange",function(t){return T(e.settings,t)||(e.settings=t),t}),a(),i(13,"div",18)(14,"button",19),f("click",function(){return e.goBack()}),N(15,2),P(16,"sh-icon"),E(),a(),i(17,"button",20),f("click",function(){return e.submit()}),N(18,3),P(19,"sh-icon"),E(),a()()()),n&2&&(p(3),m("options",e.retentionOptions())("inlineSearch",!0)("isClearable",!1),p(3),d("ngModel",e.optionsFields.backupRetention),p(),G(e.optionsFields.backupRetention()==="all"?7:e.optionsFields.backupRetention()==="time"?8:e.optionsFields.backupRetention()==="versions"?9:e.optionsFields.backupRetention()==="smart"?10:e.optionsFields.backupRetention()==="custom"?11:-1),p(5),d("options",e.settings),m("applicationOptions",e.applicationOptions())("hasFreeTextSettings",!0)("hiddenOptions",D(11,ie)),p(5),x("loading",e.isSubmitting()))},dependencies:[H,X,V,W,z,ne,Z,j,Y,q,Q],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:37.5rem;padding:2.5rem}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding-bottom:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.form-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 2.5rem;gap:.5rem;align-items:flex-end}.remote-volume-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.remote-volume-wrap[_ngcontent-%COMP%] p.warning[_ngcontent-%COMP%]{color:#7d7d00}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.advanced-option[_ngcontent-%COMP%]{display:grid;gap:.5rem;grid-template-columns:1fr 1fr 2.5rem;align-items:flex-end}sh-select[_ngcontent-%COMP%]{--miw: p2r(120)}"],changeDetection:0})};export{h as default};
|