@duplicati/ngclient 0.0.221 → 0.0.225

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.
Files changed (140) hide show
  1. package/chunk-2EX5HS5X.js +1 -0
  2. package/{chunk-IQL3REGJ.js → chunk-2KD757N6.js} +1 -1
  3. package/{chunk-OPHQNXYO.js → chunk-2YUSBRXY.js} +1 -1
  4. package/{chunk-F2ZC26DC.js → chunk-35FMFK4I.js} +1 -1
  5. package/{chunk-IG7XUEED.js → chunk-3DHD6GQL.js} +1 -1
  6. package/{chunk-IRT2UBDI.js → chunk-3HYQMG65.js} +1 -1
  7. package/{chunk-3L3SRTPU.js → chunk-3PARK7B7.js} +1 -1
  8. package/chunk-3V25RAVK.js +1 -0
  9. package/{chunk-ELCA5MKF.js → chunk-4ISFDBI3.js} +1 -1
  10. package/chunk-5FQ7HESA.js +1 -0
  11. package/chunk-5QGFYH2A.js +3 -0
  12. package/chunk-5UJN5SN4.js +2 -0
  13. package/{chunk-BLSV7CNZ.js → chunk-6DX35WDO.js} +1 -1
  14. package/{chunk-77IXQ4GU.js → chunk-6WX2UOAN.js} +1 -1
  15. package/{chunk-N2GI5QYJ.js → chunk-7VQ67PEZ.js} +1 -1
  16. package/{chunk-XBAZKJ47.js → chunk-A23UTI46.js} +1 -1
  17. package/chunk-AR5SEBWX.js +1 -0
  18. package/{chunk-EKVZKEQJ.js → chunk-B4QFOJXL.js} +1 -1
  19. package/{chunk-TCXCC5BM.js → chunk-BPHX6VXP.js} +1 -1
  20. package/{chunk-VKQQDCUN.js → chunk-CJKZ27FM.js} +1 -1
  21. package/{chunk-YCJYEQF7.js → chunk-COEGVUM3.js} +1 -1
  22. package/chunk-CQJRBQ6I.js +1 -0
  23. package/{chunk-736PM4LG.js → chunk-E4CYVUYG.js} +1 -1
  24. package/chunk-EBKOJDCT.js +1 -0
  25. package/chunk-EVEI25GQ.js +2 -0
  26. package/{chunk-TVFRVP7K.js → chunk-EXAZ4QZR.js} +1 -1
  27. package/chunk-G7TNRWOU.js +1 -0
  28. package/{chunk-23SRH7FI.js → chunk-GA3CAVSK.js} +1 -1
  29. package/chunk-GKAMSAN5.js +1 -0
  30. package/{chunk-JPCUISZG.js → chunk-GNKCBZMS.js} +1 -1
  31. package/{chunk-N2AU7VKX.js → chunk-HDDAGHHE.js} +1 -1
  32. package/chunk-HLHUPBCV.js +1 -0
  33. package/chunk-HPXIWKIK.js +1 -0
  34. package/chunk-HS3UDQIJ.js +1 -0
  35. package/chunk-HWOUAWOE.js +1 -0
  36. package/chunk-IDJ52K34.js +1 -0
  37. package/chunk-ITN4L52Q.js +1 -0
  38. package/chunk-J7GH3G72.js +1 -0
  39. package/chunk-JBX7YYME.js +1 -0
  40. package/chunk-JCXT6U5P.js +1 -0
  41. package/{chunk-JP2Z2HMH.js → chunk-JNZJE3GC.js} +1 -1
  42. package/chunk-K5XGRFWJ.js +4 -0
  43. package/chunk-KGK4RY3J.js +1 -0
  44. package/{chunk-DSYNIXJF.js → chunk-KNSQLQC6.js} +1 -1
  45. package/chunk-KUNX5APQ.js +1 -0
  46. package/chunk-KX3UP3HV.js +1 -0
  47. package/chunk-KZYRTI62.js +1 -0
  48. package/chunk-LXTSZI4K.js +1 -0
  49. package/chunk-MKI54WTC.js +1 -0
  50. package/chunk-MSIH2OJ5.js +1 -0
  51. package/{chunk-FDYBIC4O.js → chunk-N5XYG3QW.js} +1 -1
  52. package/{chunk-LE24LKH7.js → chunk-NE255HQN.js} +1 -1
  53. package/chunk-NQAD2FBX.js +1 -0
  54. package/chunk-NUV5LHQV.js +1 -0
  55. package/{chunk-RGFJ5UMA.js → chunk-O2HQIEE4.js} +1 -1
  56. package/chunk-O2L2FRYE.js +11 -0
  57. package/chunk-OP7MDR2B.js +1 -0
  58. package/chunk-OSGHJCUU.js +1 -0
  59. package/chunk-OYU6OBKA.js +1 -0
  60. package/{chunk-5KJPC3V5.js → chunk-P2EIEVFT.js} +1 -1
  61. package/{chunk-6JS7B4FW.js → chunk-PDZNQW6F.js} +1 -1
  62. package/{chunk-IMQUTGIK.js → chunk-PEOYNJJM.js} +1 -1
  63. package/chunk-PMF4FTBF.js +1 -0
  64. package/{chunk-CAQ3XMFP.js → chunk-PNQ5BDQN.js} +1 -1
  65. package/{chunk-ACTJSKQZ.js → chunk-PNRFCYAE.js} +1 -1
  66. package/{chunk-GW34KK5A.js → chunk-POVWDK74.js} +1 -1
  67. package/chunk-QW23XWNE.js +1 -0
  68. package/{chunk-PIGMTUUT.js → chunk-SKLSR5GH.js} +1 -1
  69. package/chunk-T7RMSUHE.js +1 -0
  70. package/chunk-TSVSMVY4.js +1 -0
  71. package/chunk-TV7OB7Y4.js +1 -0
  72. package/{chunk-QDDVZ4CR.js → chunk-TWWAK5M6.js} +1 -1
  73. package/{chunk-BKEJZADV.js → chunk-TXCVGOPN.js} +1 -1
  74. package/{chunk-F3JYPWPK.js → chunk-UIVZWXBK.js} +1 -1
  75. package/chunk-UNQKMTFM.js +1 -0
  76. package/{chunk-KZTFESBJ.js → chunk-V2M5YF4E.js} +1 -1
  77. package/{chunk-O2SMJYPC.js → chunk-V2UO7ES2.js} +1 -1
  78. package/{chunk-OLWLWDXZ.js → chunk-VOXTAZLZ.js} +1 -1
  79. package/{chunk-FD5CKX3J.js → chunk-VQLI7RDY.js} +1 -1
  80. package/chunk-VTOEFKZG.js +1 -0
  81. package/chunk-VZNLMGYP.js +2 -0
  82. package/chunk-XUCXLLB4.js +1 -0
  83. package/{chunk-GKGMP6VF.js → chunk-XWML36YQ.js} +1 -1
  84. package/chunk-Y47NRSCA.js +1 -0
  85. package/{chunk-ZC23RK4J.js → chunk-YF6JHIN5.js} +1 -1
  86. package/{chunk-ANSV4G2K.js → chunk-YS4B2B5N.js} +1 -1
  87. package/{chunk-FBU3EBFO.js → chunk-ZGQ2WCM2.js} +1 -1
  88. package/chunk-ZSAEIKEB.js +1 -0
  89. package/chunk-ZXBKGNJU.js +1 -0
  90. package/index.html +1 -1
  91. package/main-S64CL44W.js +1 -0
  92. package/package.json +1 -1
  93. package/chunk-43WATFQS.js +0 -11
  94. package/chunk-4E7D5F6K.js +0 -1
  95. package/chunk-4J6L5OV3.js +0 -1
  96. package/chunk-5JGSXUKD.js +0 -1
  97. package/chunk-5YE4H57F.js +0 -1
  98. package/chunk-5ZRRLJA4.js +0 -1
  99. package/chunk-6NVCDJR6.js +0 -1
  100. package/chunk-ACTATISC.js +0 -1
  101. package/chunk-APSPCDGV.js +0 -1
  102. package/chunk-AXQQEOTT.js +0 -1
  103. package/chunk-BMACDVWX.js +0 -1
  104. package/chunk-COI6UMB5.js +0 -1
  105. package/chunk-CZVTBPNE.js +0 -1
  106. package/chunk-DE4JIJWO.js +0 -1
  107. package/chunk-DHFLXFWF.js +0 -1
  108. package/chunk-E4NQOMJX.js +0 -1
  109. package/chunk-ESLC5LVP.js +0 -1
  110. package/chunk-F3ETZKLK.js +0 -1
  111. package/chunk-FR5RTIOE.js +0 -1
  112. package/chunk-G2BDKU26.js +0 -2
  113. package/chunk-I5DD3Q6J.js +0 -1
  114. package/chunk-JPMKWWZP.js +0 -1
  115. package/chunk-JSZIISFS.js +0 -1
  116. package/chunk-MTL3FBSM.js +0 -1
  117. package/chunk-NPFPMA4P.js +0 -1
  118. package/chunk-O56QUSSI.js +0 -2
  119. package/chunk-OCUE5GMT.js +0 -1
  120. package/chunk-OJVUCHRP.js +0 -1
  121. package/chunk-OL7ADIFI.js +0 -1
  122. package/chunk-PPSQGUOL.js +0 -3
  123. package/chunk-QQWV3FEH.js +0 -1
  124. package/chunk-RDLRXAJU.js +0 -1
  125. package/chunk-SACQFUJE.js +0 -1
  126. package/chunk-TISQKN7N.js +0 -1
  127. package/chunk-TQTOIWBK.js +0 -4
  128. package/chunk-TWAHUXIN.js +0 -1
  129. package/chunk-TZ7MW3NZ.js +0 -2
  130. package/chunk-UTXZPAY6.js +0 -1
  131. package/chunk-UZ4POLDC.js +0 -1
  132. package/chunk-WJBMMY2Y.js +0 -1
  133. package/chunk-XPVATEBM.js +0 -1
  134. package/chunk-XWTB7XRI.js +0 -1
  135. package/chunk-YMFI2Q2X.js +0 -1
  136. package/chunk-YPNN5FBK.js +0 -1
  137. package/chunk-YWBZLU6M.js +0 -1
  138. package/chunk-YYD2JU6T.js +0 -1
  139. package/chunk-ZNYN6ES6.js +0 -1
  140. package/main-IUT3IXX4.js +0 -1
@@ -0,0 +1 @@
1
+ import{g as pe}from"./chunk-6WX2UOAN.js";import"./chunk-VZNLMGYP.js";import{b as ue,c as de,m as Se,q as Ee,r as Ce}from"./chunk-O2L2FRYE.js";import"./chunk-PNQ5BDQN.js";import"./chunk-2EX5HS5X.js";import{c as Te,d as ge}from"./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{a as M}from"./chunk-PEOYNJJM.js";import"./chunk-NUV5LHQV.js";import"./chunk-PDZNQW6F.js";import{B as le,H as _e,K as ce,c as Q,e as Y,f as Z,g as ee,i as te,j as ne,s as ie,v as oe,w as re,y as ae,z as se}from"./chunk-CJKZ27FM.js";import"./chunk-KNSQLQC6.js";import{b as j,d as q}from"./chunk-CQJRBQ6I.js";import"./chunk-V2UO7ES2.js";import"./chunk-HDDAGHHE.js";import"./chunk-YF6JHIN5.js";import"./chunk-2YUSBRXY.js";import{$ as m,Ac as H,Bc as K,Db as D,Eb as r,Fb as a,Gb as O,Kb as V,Lb as W,Nb as S,Rc as $,Ta as T,Ub as E,Vb as C,Wb as I,Yc as w,Zb as z,_b as u,ac as l,ea as _,fa as c,hb as B,hc as J,ia as v,ic as X,oc as y,qa as N,tc as f,uc as R,vc as h,wc as P,xb as p,xc as A,yb as F,yc as L}from"./chunk-K5XGRFWJ.js";import"./chunk-7CGTOI24.js";var Fe=["formRef"],Oe=["testUrl"],me=()=>({maxWidth:"700px",width:"100%"});function Re(o,i){if(o&1){let e=S();r(0,"button",24),u("click",function(){_(e);let t=l();return c(t.openTargetUrlDialog())}),E(1,5),O(2,"sh-icon"),C(),a()}}function Ne(o,i){if(o&1){let e=S();r(0,"button",24),u("click",function(){_(e);let t=l(2);return c(t.copyTargetUrl())}),E(1,7),O(2,"sh-icon"),C(),a()}}function De(o,i){if(o&1){let e=S();r(0,"sh-menu")(1,"button",15)(2,"sh-icon"),y(3,"dots-three-vertical"),a()(),V(4,25),r(5,"button",24),u("click",function(){_(e);let t=l();return c(t.openTargetUrlDialog())}),E(6,6),O(7,"sh-icon"),C(),a(),p(8,Ne,3,0,"button",15),W(),a()}if(o&2){l();let e=L(0);T(8),F(e?8:-1)}}function Ie(o,i){if(o&1){let e=S();r(0,"app-destination-list-item",17)(1,"button",20),u("click",function(){_(e);let t=l();return c(t.removeDestination())}),I(2,8),a()()}if(o&2){l();let e=L(12);D("destination",e)}}function fe(o,i){if(o&1){let e=S();r(0,"app-destination-list",26),u("setDestination",function(t){_(e);let s=l();return c(s.setDestination(t))}),a()}}function he(o,i){if(o&1){let e=S();r(0,"app-single-destination",27),h("targetUrlChange",function(t){_(e);let s=l();return R(s.targetUrlModel,t)||(s.targetUrlModel=t),c(t)}),a()}if(o&2){let e=l();f("targetUrl",e.targetUrlModel)}}function Me(o,i){o&1&&(E(0,4,1),O(1,"sh-icon",22),C())}function ye(o,i){o&1&&(E(0,4,2),O(1,"sh-icon"),C())}function Pe(o,i){if(o&1){let e=S();r(0,"sh-dialog",28),h("isOpenChange",function(t){_(e);let s=l();return R(s.targetUrlDialogOpen,t)||(s.targetUrlDialogOpen=t),c(t)}),r(1,"header",29)(2,"div",30)(3,"h2"),I(4,9),a(),r(5,"sh-alert",31),I(6,10),a()()(),r(7,"div",32)(8,"sh-form-field")(9,"textarea",33),h("ngModelChange",function(t){_(e);let s=l();return R(s.targetUrlCtrl,t)||(s.targetUrlCtrl=t),c(t)}),a()()(),r(10,"footer",34)(11,"button",20),u("click",function(){_(e);let t=l();return c(t.closeTargetUrlDialog(!1))}),y(12,"Cancel"),a(),r(13,"button",35),u("click",function(){_(e);let t=l();return c(t.closeTargetUrlDialog(!0))}),E(14,11),O(15,"sh-icon"),C(),a()()()}if(o&2){let e=l();f("isOpen",e.targetUrlDialogOpen),D("options",K(3,me)),T(9),f("ngModel",e.targetUrlCtrl)}}var x=class o{#i=m(q);#o=m(j);#n=m(se);injector=m(v);#e=m(pe);formRef=w.required("formRef");testUrlComponent=w.required("testUrl");testSignal=this.#e.destinationTestSignal;targetUrlModel=this.#e.destinationTargetUrl;targetUrlCtrl=N(null);targetUrlInitial=N(null);targetUrlDialogOpen=N(!1);toggleNewDestination=N(!0);selectedDestinationType=$(()=>{let i=this.#e.destinationTargetUrl();return i?Te(i):null});selectedDestinationTypeOption=$(()=>{let i=this.selectedDestinationType();return i?{key:i.customKey??i.key,customKey:i.customKey??null,displayName:i.displayName,description:i.description,icon:i.icon}:null});copyTargetUrl(){navigator.clipboard.writeText(this.#e.destinationTargetUrl()??"")}openTargetUrlDialog(){let i=this.#e.destinationTargetUrl();this.targetUrlCtrl.set(i),this.targetUrlInitial.set(i),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(i=!1){this.targetUrlDialogOpen.set(!1);let e=this.targetUrlCtrl(),n=this.targetUrlInitial();!i||e===n||!e||this.#e.updateTargetUrl(e)}setDestination(i){let e=ge(i??"");if(e){if(e.mapper.default){let n=e.mapper.default("");this.#e.updateTargetUrl(n);return}this.#e.updateTargetUrl(`${i}://`)}}removeDestination(){this.#e.updateTargetUrl(null)}goBack(){this.#i.navigate(["general"],{relativeTo:this.#o.parent})}next(){let i=this.testSignal();if(i===null){this.#n.open(M,{data:{title:$localize`Test destination`,message:$localize`You have not tested the destination yet. Do you want to test it now?`,confirmText:$localize`Test now`,cancelText:$localize`Skip test and continue`},closed:n=>{n?this.testUrlComponent()?.testDestination(!1)?.then(t=>{t.action==="success"&&t.containsBackup?this.#t():this.#n.open(M,{data:{title:$localize`Test did not succeed`,message:t.errorMessage??$localize`Failed to test the destination.`,confirmText:$localize`OK`,cancelText:void 0}})}):this.#t()}});return}let e=typeof i=="string"?null:i;if(e?.action!=="success"||!e.containsBackup){this.#n.open(M,{data:{title:$localize`Test destination`,message:$localize`The destination has not been tested successfully. Are you sure you want to continue?`,confirmText:$localize`Edit destination`,cancelText:$localize`Yes, continue`},closed:n=>{n||this.#t()}});return}this.#t()}#t(){this.#i.navigate(["encryption"],{relativeTo:this.#o.parent})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=B({type:o,selectors:[["app-restore-destination"]],viewQuery:function(e,n){e&1&&J(n.formRef,Fe,5)(n.testUrlComponent,Oe,5),e&2&&X(2)},features:[H([Ee])],decls:25,vars:18,consts:()=>{let i;i=$localize`Backup destination`;let e;e=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let n;n=$localize`${"\uFFFD*22:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SH_ICON:spinner${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*22:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*23:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SH_ICON_1:arrow-right${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*23:2\uFFFD"}:CLOSE_BLOCK_ELSE: Continue `,n=z(n);let t;t=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Set target URL `;let s;s=$localize`${"\uFFFD#7\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SH_ICON: Edit target URL `;let g;g=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:copy${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Copy URL to clipboard `;let U;U=$localize`Change`;let b;b=$localize`Edit target URL`;let G;G=$localize`Be careful, this will overwrite everything you have in your destination.`;let k;return k=$localize` Override target URL ${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:swap${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON:`,[["formRef",""],["testUrl",""],i,e,n,t,s,g,U,b,G,k,[3,"submit"],[1,"title-30"],[1,"actions"],["shButton","","type","button",1,"small"],[3,"targetUrlChange","testSignalChange","targetUrl","testSignal","backupId","sourcePrefix","suppressErrorDialogs","askToCreate","testExpectation","readOnlyTest","moduleType"],[1,"current-destination",3,"destination"],[3,"targetUrl"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary",3,"disabled"],[1,"loader"],[3,"isOpen","options"],["shButton","","type","button",1,"small",3,"click"],["menu",""],[3,"setDestination"],[3,"targetUrlChange","targetUrl"],[3,"isOpenChange","isOpen","options"],["header",""],[1,"target-dialog-header"],[1,"warn"],["content",""],["id","targetUrl","autocomplete","off",3,"ngModelChange","ngModel"],["footer",""],["shButton","","type","submit",1,"raised","primary",3,"click"]]},template:function(e,n){if(e&1){let t=S();P(0),r(1,"form",12,0),u("submit",function(){return n.next()}),r(3,"header")(4,"h3",13)(5,"span"),I(6,2),a(),r(7,"div",14),p(8,Re,3,0,"button",15)(9,De,9,1,"sh-menu"),a()(),r(10,"app-test-url",16,1),h("targetUrlChange",function(g){return _(t),R(n.targetUrlModel,g)||(n.targetUrlModel=g),c(g)})("testSignalChange",function(g){return _(t),R(n.testSignal,g)||(n.testSignal=g),c(g)}),a(),P(12),p(13,Ie,3,1,"app-destination-list-item",17),a(),p(14,fe,1,0,"app-destination-list"),p(15,he,1,1,"app-single-destination",18),r(16,"div",19)(17,"button",20),u("click",function(){return n.goBack()}),E(18,3),O(19,"sh-icon"),C(),a(),r(20,"button",21),E(21,4),p(22,Me,2,0,"sh-icon",22)(23,ye,2,0,"sh-icon"),C(),a()()(),p(24,Pe,16,4,"sh-dialog",23)}if(e&2){let t=A(!!n.targetUrlModel());T(8),F(t?9:8),T(2),f("targetUrl",n.targetUrlModel)("testSignal",n.testSignal),D("backupId",null)("sourcePrefix",null)("suppressErrorDialogs",!1)("askToCreate",!1)("testExpectation","containsBackup")("readOnlyTest",!0)("moduleType","Backend"),T(2);let s=A(n.selectedDestinationTypeOption());T(),F(s?13:-1),T(),F(t?-1:14),T(),F(t?15:-1),T(5),D("disabled",n.testSignal()=="testing"||!t),T(2),F(n.testSignal()=="testing"?22:23),T(2),F(n.targetUrlDialogOpen()?24:-1)}},dependencies:[Ce,de,ue,ie,ne,Q,Y,Z,te,ee,le,_e,ce,oe,ae,re,Se],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:40rem}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], header[_ngcontent-%COMP%] sh-alert[_ngcontent-%COMP%]{width:100%}header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:.5rem}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}pre[_ngcontent-%COMP%]{white-space:pre-wrap}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.field-row.single-field[_ngcontent-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.clickable[_ngcontent-%COMP%]{cursor:pointer;color:var(--primary-8)}.most-common-destinations[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10);background-color:var(--base-2);cursor:pointer}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-10);margin:0}[prefix].link[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline;color:var(--primary-8)}textarea[_ngcontent-%COMP%] ~ grammarly-extension[_ngcontent-%COMP%]{display:none}.target-dialog-header[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:.5rem}"],changeDetection:0})};export{x as default};
@@ -0,0 +1 @@
1
+ import{a as $e,b as He}from"./chunk-3PARK7B7.js";import{a as we}from"./chunk-6DX35WDO.js";import{a as X}from"./chunk-NE255HQN.js";import"./chunk-UIVZWXBK.js";import{a as ye}from"./chunk-E4CYVUYG.js";import"./chunk-6Q6SSTBK.js";import"./chunk-COEGVUM3.js";import{a as ve}from"./chunk-SKLSR5GH.js";import"./chunk-YS4B2B5N.js";import{b as be}from"./chunk-KZYRTI62.js";import{a as Ge}from"./chunk-TSVSMVY4.js";import"./chunk-2KD757N6.js";import"./chunk-OP7MDR2B.js";import"./chunk-PEOYNJJM.js";import{a as Me}from"./chunk-NUV5LHQV.js";import{c as Se,e as Re}from"./chunk-PDZNQW6F.js";import{B as R,G as Ne,H as fe,J as Pe,Q as Ie,Y as De,c as ge,d as Ce,e as Te,i as me,r as he,s as Fe,t as Ee,v as M,w as J,x as Ae,z as Oe}from"./chunk-CJKZ27FM.js";import{d as Le}from"./chunk-KNSQLQC6.js";import{c as ce,d as ue,e as de,f as pe}from"./chunk-CQJRBQ6I.js";import"./chunk-V2UO7ES2.js";import"./chunk-HDDAGHHE.js";import"./chunk-YF6JHIN5.js";import"./chunk-2YUSBRXY.js";import{$ as u,$c as Q,Bb as ee,Bc as re,Cb as te,Db as F,Eb as a,Fb as o,G as j,Gb as _,Nb as N,Rc as Y,Ta as r,Ub as p,Vb as S,Wb as f,Wc as le,Yc as _e,Zb as v,_b as T,ac as c,ea as A,fa as O,hb as L,hc as ne,ic as ie,lc as B,nc as D,oc as d,pc as q,qa as h,qc as $,sa as b,tc as H,uc as w,vc as x,wc as oe,xb as g,xc as ae,yb as C,yc as k,zb as Z,zc as se}from"./chunk-K5XGRFWJ.js";import{a as z,b as W}from"./chunk-7CGTOI24.js";var Be=["scroller"];function Ye(i,t){i&1&&(a(0,"sh-icon"),d(1,"bell-ringing"),o())}function Je(i,t){i&1&&(a(0,"sh-icon"),d(1,"bell"),o())}function Xe(i,t){if(i&1&&_(0,"app-notification",8),i&2){c(2);let e=k(6);F("index",0)("notification",e.content)}}function Ve(i,t){if(i&1&&(a(0,"div",11),d(1),o()),i&2){c(3);let e=k(6);r(),$(" ",e.content.content," ")}}function ze(i,t){if(i&1&&(a(0,"sh-alert")(1,"div",10),d(2),o(),g(3,Ve,2,1,"div",11),o()),i&2){c(2);let e=k(6);D(e.content.type||"error"),r(2),q(e.content.title),r(),C(e.content.content?3:-1)}}function We(i,t){if(i&1&&(a(0,"div",6),g(1,Xe,1,2,"app-notification",8)(2,ze,4,4,"sh-alert",9),o()),i&2){c();let e=k(6);r(),C(e.type==="notification"?1:2)}}function je(i,t){if(i&1){let e=N();a(0,"div",7)(1,"div",12)(2,"h6",13),p(3,2),a(4,"button",5),T("click",function(){A(e);let s=c();return O(s.toggleNotifications())}),_(5,"sh-icon"),o(),S(),o(),a(6,"div",14,0)(8,"div",15),_(9,"app-notifications"),o()()()()}}function qe(i,t){if(i&1&&(a(0,"div",20),d(1),o()),i&2){let e=c().$implicit;r(),$(" ",e.content," ")}}function Qe(i,t){if(i&1){let e=N();a(0,"sh-alert",18,1),T("click",function(){let s=A(e).$implicit,l=c(2);return O(l.deleteAlertByIndex(s.id))}),a(2,"div",19),d(3),o(),g(4,qe,2,1,"div",20),o()}if(i&2){let e=t.$implicit;D(e.type),F("id",e.id),r(3),q(e.title),r(),C(e.content?4:-1)}}function Ke(i,t){i&1&&(a(0,"p",17),f(1,4),o())}function Ze(i,t){if(i&1){let e=N();a(0,"div",7)(1,"div",12)(2,"h6",13),p(3,3),a(4,"button",5),T("click",function(){A(e);let s=c();return O(s.toggleAlerts())}),_(5,"sh-icon"),o(),S(),o(),a(6,"div",14,0)(8,"div",15),ee(9,Qe,5,5,"sh-alert",16,Z,!1,Ke,2,0,"p",17),o()()()()}if(i&2){let e=c();r(9),te(e.alertHistory())}}var xe=new he,U=class i{#e=u(Ae);#n=u(X);isSubmitting=h(!1);messageSent=h(!1);form=xe.group({message:xe.control("",[Ce.required])});notifications=this.#n.notifications;shownMessage=h(null);shownMessageInterval=null;alertHistory=this.#e.alertHistory;alertHistoryIsOpen=this.#e.alertHistoryIsOpen;alertHistoryIsHidden=this.#e.alertHistoryIsHidden;numberOfOpenAlerts=Y(()=>this.alertHistory().filter(t=>t.isOpen).length);scroller=_e("scroller");isAlertsOpen=Q(!1);isNotificationsOpen=Q(!1);previousHistoryCount=h(null);previousNotificationsCount=h(null);constructor(){b(()=>{let t=this.alertHistory(),e=this.notifications();if(e.length===0){this.shownMessage.set(null);return}e.length&&this.previousHistoryCount()!==t.length&&!this.isNotificationsOpen()?(this.shownMessage.set({content:e[0],countDown:3,type:"notification"}),this.previousHistoryCount.set(t.length),this.shownMessageInterval=setInterval(()=>{let n=this.shownMessage();if(n?.countDown===0){this.shownMessage.set(null),this.shownMessageInterval=null;return}n!==null&&this.shownMessage.update(s=>W(z({},s),{countDown:s.countDown-1}))},1e3)):t.length&&this.previousHistoryCount()!==t.length&&!this.isAlertsOpen()&&(this.shownMessage.set({content:t[0],countDown:3,type:"alert"}),this.previousHistoryCount.set(t.length),this.shownMessageInterval=setInterval(()=>{let n=this.shownMessage();if(n?.countDown===0){this.shownMessage.set(null),this.shownMessageInterval=null;return}n!==null&&this.shownMessage.update(s=>W(z({},s),{countDown:s.countDown-1}))},1e3))}),b(()=>{this.alertHistoryIsOpen(),this.scrollToBottom()})}resetPreviewMessage(){this.shownMessage.set(null),this.shownMessageInterval=null}toggleAlerts(){this.isAlertsOpen()?this.isAlertsOpen.set(!1):(this.isAlertsOpen.set(!0),this.isNotificationsOpen.set(!1),this.resetPreviewMessage())}toggleNotifications(){this.isNotificationsOpen.set(!this.isNotificationsOpen()),this.isAlertsOpen()&&this.isAlertsOpen.set(!1)}deleteAlertByIndex(t){this.#e.removeAlert(t)}scrollToBottom(){this.scroller()&&this.scroller()?.nativeElement&&this.scroller().nativeElement.scrollTo(0,this.scroller().nativeElement.scrollHeight)}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=L({type:i,selectors:[["app-service-hub"]],viewQuery:function(e,n){e&1&&ne(n.scroller,Be,5),e&2&&ie()},inputs:{isAlertsOpen:[1,"isAlertsOpen"],isNotificationsOpen:[1,"isNotificationsOpen"]},outputs:{isAlertsOpen:"isAlertsOpenChange",isNotificationsOpen:"isNotificationsOpenChange"},decls:10,vars:9,consts:()=>{let t;t=$localize` Notifications ${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:x-circle${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_BUTTON:`;let e;e=$localize` Alerts ${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:x-circle${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_BUTTON:`;let n;return n=$localize`No alerts yet`,[["scroller",""],["alerts",""],t,e,n,["shButton","",3,"click"],[1,"preview-alert-wrap"],[1,"alert-stream-modal"],[3,"index","notification"],[3,"class"],["ship-alert-title",""],["ship-alert-content",""],[1,"alert-stream-modal-content"],[1,"paragraph-20"],[1,"alert-stream-modal-list-scroller"],[1,"alert-stream-modal-list"],[3,"class","id"],[1,"no-alerts"],[3,"click","id"],["title",""],["content",""]]},template:function(e,n){if(e&1&&(a(0,"button",5),T("click",function(){return n.toggleAlerts()}),a(1,"sh-icon"),d(2,"info"),o()(),a(3,"button",5),T("click",function(){return n.toggleNotifications()}),g(4,Ye,2,0,"sh-icon")(5,Je,2,0,"sh-icon"),o(),oe(6),g(7,We,3,1,"div",6),g(8,je,10,0,"div",7),g(9,Ze,12,1,"div",7)),e&2){D(n.alertHistory().length?"error":""),r(3),D(n.notifications().length?"error":""),r(),C(n.notifications().length?4:5),r(2);let s=ae(n.shownMessage());r(),C(s?7:-1),r(),C(n.isNotificationsOpen()?8:-1),r(),C(n.isAlertsOpen()?9:-1)}},dependencies:[Ee,J,M,R,He,$e],styles:["[_nghost-%COMP%]{display:flex;position:fixed;gap:.5rem;bottom:1.5rem;right:1.5rem;z-index:5000}@media only screen and (max-width:768px){[_nghost-%COMP%]{bottom:1rem;right:1rem}}[_nghost-%COMP%] h6[_ngcontent-%COMP%]{margin:0}.preview-alert-wrap[_ngcontent-%COMP%]{position:absolute;bottom:2.6875rem;right:0;display:flex;flex-direction:column;min-width:15.625rem}.helpdesk-modal[_ngcontent-%COMP%]{position:absolute;bottom:2.6875rem;right:0;display:flex;flex-direction:column}@media only screen and (max-width:768px){.helpdesk-modal[_ngcontent-%COMP%]{bottom:2.6875rem}}.helpdesk-modal-content[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;gap:1rem;min-width:20rem;border:1px solid var(--base-4);background-color:var(--base-1);border-radius:var(--shape-2)}.helpdesk-modal-content[_ngcontent-%COMP%] .message-sent[_ngcontent-%COMP%]{padding:0 1rem 1rem;text-wrap:pretty}.helpdesk-modal-content[_ngcontent-%COMP%] h6[_ngcontent-%COMP%]{padding:1rem;border-bottom:1px solid var(--base-4);display:flex;align-items:center;justify-content:space-between}.helpdesk-modal-content[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{padding:0 1rem 1rem;display:flex;flex-direction:column;align-items:flex-end;gap:1rem}.helpdesk-modal-content[_ngcontent-%COMP%] form[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{width:100%;text-wrap:pretty}.helpdesk-modal-content[_ngcontent-%COMP%] form[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{width:100%}.alert-stream-modal[_ngcontent-%COMP%]{position:absolute;bottom:2.6875rem;right:0;display:flex;flex-direction:column}@media only screen and (max-width:768px){.alert-stream-modal[_ngcontent-%COMP%]{bottom:2.6875rem}}.alert-stream-modal-list-scroller[_ngcontent-%COMP%]{overflow-y:auto;max-height:18.75rem}.alert-stream-modal-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;padding:1rem;border-radius:var(--shape-2)}.alert-stream-modal-content[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;min-width:20rem;border:1px solid var(--base-4);background-color:var(--base-1);border-radius:var(--shape-2)}.alert-stream-modal-content[_ngcontent-%COMP%] h6[_ngcontent-%COMP%]{padding:1rem;border-bottom:1px solid var(--base-4);display:flex;align-items:center;justify-content:space-between}.no-alerts[_ngcontent-%COMP%]{padding:1rem;display:flex;flex-direction:column;gap:1rem;text-align:center}"],changeDetection:0})};function et(i,t){i&1&&(a(0,"sh-icon",14),d(1,"check"),o())}function tt(i,t){i&1&&(a(0,"sh-icon",15),d(1,"prohibit"),o())}function nt(i,t){if(i&1){let e=N();a(0,"button",20),T("click",function(){A(e);let s=c();return O(s.updatePassphrase())}),f(1,5),o()}if(i&2){let e=c();B("loading",e.isUpdating())}}function it(i,t){if(i&1){let e=N();a(0,"button",21),T("click",function(){A(e);let s=c();return O(s.updatePassphrase())}),f(1,6),o()}if(i&2){let e=c();B("loading",e.isUpdating()),F("disabled",!0)}}var V=class i{#e=u(Le);closed=le();isUpdating=h(!1);passphrase=h("");repeatPassphrase=h("");updatePassphrase(){this.passphrase()===this.repeatPassphrase()&&(this.isUpdating.set(!0),this.#e.patchApiV1Serversettings({requestBody:{"server-passphrase":this.passphrase()}}).pipe(j(()=>this.isUpdating.set(!1))).subscribe({next:()=>this.closed.emit()}))}cancel(){this.isUpdating.set(!0),this.#e.patchApiV1Serversettings({requestBody:{"has-asked-for-password-change":"True"}}).pipe(j(()=>this.isUpdating.set(!1))).subscribe({next:()=>this.closed.emit()})}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=L({type:i,selectors:[["app-change-passphrase-alert-dialog"]],outputs:{closed:"closed"},decls:23,vars:7,consts:()=>{let t;t=$localize`Enter new password`;let e;e=$localize`Repeat password`;let n;n=$localize`Password have to be filled and have to match`;let s;s=$localize`Change passphrase`;let l;l=$localize` Duplicati needs to be secured with a passphrase and a random passphrase has been generated for you. ${"[\uFFFD#6\uFFFD\uFFFD/#6\uFFFD|\uFFFD#7\uFFFD\uFFFD/#7\uFFFD]"}:LINE_BREAK:${"[\uFFFD#6\uFFFD\uFFFD/#6\uFFFD|\uFFFD#7\uFFFD\uFFFD/#7\uFFFD]"}:LINE_BREAK: If you open Duplicati from the tray icon, you do not need a passphrase, but if you plan to open it from another location you need to set a passphrase you know. Do you want to set a passphrase now? `,l=v(l);let y;y=$localize`Passphrase`;let P;P=$localize`Repeat passphrase`;let I;I=$localize`Not now thanks`;let G;G=$localize` Yes, update passphrase now `;let m;return m=$localize` Yes, update passphrase now `,[s,l,y,P,I,G,m,["header",""],["content",""],["type","warning"],["for","password"],["type","password","name","password","autocomplete","disabled","placeholder",t,"tabindex","1",3,"ngModelChange","ngModel"],["for","repeatPassword"],["type","password","name","repeatPassword","autocomplete","disabled","placeholder",e,"tabindex","2",3,"ngModelChange","disabled","ngModel"],["suffix","",1,"sh-success"],["suffix",""],["footer",""],["shButton","",3,"click"],["shButton","",1,"raised","primary",3,"loading"],["shButton","","shTooltip",n,1,"raised","primary",3,"loading","disabled"],["shButton","",1,"raised","primary",3,"click"],["shButton","","shTooltip",n,1,"raised","primary",3,"click","disabled"]]},template:function(e,n){e&1&&(a(0,"header",7)(1,"h3"),f(2,0),o()(),a(3,"div",8)(4,"sh-alert",9),p(5,1),_(6,"br")(7,"br"),S(),o(),a(8,"sh-form-field")(9,"label",10),f(10,2),o(),a(11,"input",11),x("ngModelChange",function(l){return w(n.passphrase,l)||(n.passphrase=l),l}),o()(),a(12,"sh-form-field")(13,"label",12),f(14,3),o(),a(15,"input",13),x("ngModelChange",function(l){return w(n.repeatPassphrase,l)||(n.repeatPassphrase=l),l}),o(),g(16,et,2,0,"sh-icon",14)(17,tt,2,0,"sh-icon",15),o()(),a(18,"footer",16)(19,"button",17),T("click",function(){return n.cancel()}),f(20,4),o(),g(21,nt,2,2,"button",18)(22,it,2,3,"button",19),o()),e&2&&(r(11),H("ngModel",n.passphrase),r(4),F("disabled",n.passphrase().length===0),H("ngModel",n.repeatPassphrase),r(),C(n.passphrase().length!==0&&n.passphrase()===n.repeatPassphrase()?16:17),r(3),B("loading",n.isUpdating()),r(2),C(n.passphrase().length!==0&&n.passphrase()===n.repeatPassphrase()?21:22))},dependencies:[Fe,ge,Te,me,J,fe,M,De,R],styles:["[_nghost-%COMP%]{display:block;--dialog-p: 1.5rem}[content][_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}"],changeDetection:0})};var ot=()=>({exact:!0});function at(i,t){i&1&&(a(0,"sh-icon"),d(1,"sun"),o())}function st(i,t){i&1&&(a(0,"sh-icon"),d(1,"moon"),o())}function rt(i,t){if(i&1){let e=N();a(0,"button",26),T("click",function(){A(e);let s=c();return O(s.logout())}),p(1,8),_(2,"sh-icon"),S(),o()}}var K=class i{#e=u(we);#n=u(ye);#o=u(Se);#a=u(Oe);#s=u(X);#r=u(Re);#t=u(Ge);#i=u(Me);#l=u(ue);#_=u(be);relayIsEnabled=this.#o.relayIsEnabled;isDarkMode=this.#e.isDarkMode;isNavOpen=this.#e.isNavOpen;sidenavType=this.#e.sidenavType;hasShownPasswordDialog=!1;machineName=Y(()=>{let t=this.#t.serverSettings();if(t&&t["--machine-name"])return t["--machine-name"];if(t&&t["machine-name"])return t["machine-name"];let e=this.#i.allOptions().find(n=>n.name==="machine-name");return e&&e.defaultValue?e.defaultValue:this.#i.systemInfo()?.MachineName??"Unknown"});ngOnInit(){this.#s.init(),this.#n.getBackups(!0)}serverSettingsEffect=b(()=>{if(!this.hasShownPasswordDialog&&(this.#t.askForInitialPasswordConfig()&&(this.hasShownPasswordDialog=!0,this.#a.open(V,{maxWidth:"500px"})),this.#t.showWelcomePage())){let t=this.#_.state();t=="inactive"?this.#l.navigate(["/welcome"]):t!="unknown"&&this.#t.setShownWelcomePage()}});toggleBodyClass(){this.#e.toggleBodyClass()}changeDefaultClientTo(t){this.#c(t),window.location.replace(`/${t}`)}logout(){this.#r.logout()}#c(t){var e=new Date;e.setTime(e.getTime()+2160*60*60*1e3),document.cookie="default-client="+t+"; expires="+e.toUTCString()+"; path=/"}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=L({type:i,selectors:[["app-layout"]],decls:44,vars:11,consts:()=>{let t;t=$localize`${"\uFFFD#10\uFFFD"}:START_TAG_SH_ICON:house${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_SH_ICON: Home `;let e;e=$localize`${"\uFFFD#13\uFFFD"}:START_TAG_SH_ICON:database${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SH_ICON: Add backup `;let n;n=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SH_ICON:clock-counter-clockwise${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SH_ICON: Restore `;let s;s=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:link-simple${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Destinations `;let l;l=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:gear${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON: Settings `;let y;y=$localize`${"\uFFFD#32\uFFFD"}:START_TAG_SH_ICON:info${"\uFFFD/#32\uFFFD"}:CLOSE_TAG_SH_ICON: About Duplicati `;let P;P=$localize`${"\uFFFD#35\uFFFD"}:START_TAG_SH_ICON:files${"[\uFFFD/#35\uFFFD|\uFFFD/#36\uFFFD]"}:CLOSE_TAG_SH_ICON: Documentation ${"\uFFFD#36\uFFFD"}:START_TAG_SH_ICON_1:arrow-square-out${"[\uFFFD/#35\uFFFD|\uFFFD/#36\uFFFD]"}:CLOSE_TAG_SH_ICON:`,P=v(P);let I;I=$localize`${"\uFFFD#39\uFFFD"}:START_TAG_SH_ICON:chats-circle${"[\uFFFD/#39\uFFFD|\uFFFD/#40\uFFFD]"}:CLOSE_TAG_SH_ICON: Visit forum ${"\uFFFD#40\uFFFD"}:START_TAG_SH_ICON_1:arrow-square-out${"[\uFFFD/#39\uFFFD|\uFFFD/#40\uFFFD]"}:CLOSE_TAG_SH_ICON:`,I=v(I);let G;return G=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:sign-out${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Log out `,[t,e,n,s,l,y,P,I,G,[3,"isOpenChange","isOpen","disableDrag"],["sidenav",""],["shButton","",1,"icon","small",3,"click"],[1,"base-1","primary"],["action","","routerLink","/","routerLinkActive","active",3,"routerLinkActiveOptions"],["action","","routerLink","/add-backup","routerLinkActive","active"],["action","","routerLink","/restore","routerLinkActive","active"],["action","","routerLink","/destinations","routerLinkActive","active"],["action","","routerLink","/settings","routerLinkActive","active"],[1,"spacer"],[1,"base-1l","primary"],["action","",1,"machine-name",3,"title"],["action","","routerLink","/about","routerLinkActive","active"],["href","https://docs.duplicati.com","target","_blank","action",""],["suffix",""],["href","https://forum.duplicati.com","target","_blank","action",""],["action",""],["action","",3,"click"]]},template:function(e,n){e&1&&(a(0,"sh-sidenav",9),x("isOpenChange",function(l){return w(n.isNavOpen,l)||(n.isNavOpen=l),l}),a(1,"div",10)(2,"header"),_(3,"app-logo"),a(4,"button",11),T("click",function(){return n.toggleBodyClass()}),g(5,at,2,0,"sh-icon")(6,st,2,0,"sh-icon"),o()(),a(7,"sh-list",12)(8,"button",13),p(9,0),_(10,"sh-icon"),S(),o(),a(11,"button",14),p(12,1),_(13,"sh-icon"),S(),o(),a(14,"button",15),p(15,2),_(16,"sh-icon"),S(),o(),a(17,"button",16),p(18,3),_(19,"sh-icon"),S(),o(),a(20,"button",17),p(21,4),_(22,"sh-icon"),S(),o()(),_(23,"div",18),a(24,"sh-list",19)(25,"div",20)(26,"sh-icon"),d(27,"desktop"),o(),d(28),o(),_(29,"sh-divider"),a(30,"button",21),p(31,5),_(32,"sh-icon"),S(),o(),a(33,"a",22),p(34,6),_(35,"sh-icon")(36,"sh-icon",23),S(),o(),a(37,"a",24),p(38,7),_(39,"sh-icon")(40,"sh-icon",23),S(),o(),g(41,rt,3,0,"button",25),o()(),_(42,"router-outlet")(43,"app-service-hub"),o()),e&2&&(D(n.sidenavType()),H("isOpen",n.isNavOpen),F("disableDrag",!0),r(5),C(n.isDarkMode()?5:6),r(3),F("routerLinkActiveOptions",re(10,ot)),r(17),F("title",se(n.machineName())),r(3),$(" ",n.machineName()," "),r(13),C(n.relayIsEnabled()?-1:41))},dependencies:[ce,de,pe,Ie,M,Pe,R,Ne,U,ve],styles:["[_nghost-%COMP%]{height:100vh;width:100%;overflow:hidden}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:1.25rem;gap:.75rem}h3[title][_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}div[sidenav][_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100vh}.machine-name[_ngcontent-%COMP%]{margin:0;cursor:default}"],changeDetection:0})};export{K as default};
package/index.html CHANGED
@@ -124,5 +124,5 @@
124
124
  <body>
125
125
  <app-root></app-root>
126
126
  <div class="loading">Connecting ...</div>
127
- <link rel="modulepreload" href="chunk-23SRH7FI.js"><link rel="modulepreload" href="chunk-LE24LKH7.js"><link rel="modulepreload" href="chunk-EKVZKEQJ.js"><link rel="modulepreload" href="chunk-F3JYPWPK.js"><link rel="modulepreload" href="chunk-736PM4LG.js"><link rel="modulepreload" href="chunk-TCXCC5BM.js"><link rel="modulepreload" href="chunk-GKGMP6VF.js"><link rel="modulepreload" href="chunk-6Q6SSTBK.js"><link rel="modulepreload" href="chunk-YCJYEQF7.js"><link rel="modulepreload" href="chunk-IMQUTGIK.js"><script src="polyfills-7RKI4BGK.js" type="module"></script><script src="main-IUT3IXX4.js" type="module"></script></body>
127
+ <link rel="modulepreload" href="chunk-GA3CAVSK.js"><link rel="modulepreload" href="chunk-NE255HQN.js"><link rel="modulepreload" href="chunk-B4QFOJXL.js"><link rel="modulepreload" href="chunk-UIVZWXBK.js"><link rel="modulepreload" href="chunk-E4CYVUYG.js"><link rel="modulepreload" href="chunk-BPHX6VXP.js"><link rel="modulepreload" href="chunk-XWML36YQ.js"><link rel="modulepreload" href="chunk-6Q6SSTBK.js"><link rel="modulepreload" href="chunk-COEGVUM3.js"><link rel="modulepreload" href="chunk-YS4B2B5N.js"><script src="polyfills-7RKI4BGK.js" type="module"></script><script src="main-S64CL44W.js" type="module"></script></body>
128
128
  </html>
@@ -0,0 +1 @@
1
+ import{b as Ie,c as ke}from"./chunk-GA3CAVSK.js";import{a as we}from"./chunk-NE255HQN.js";import{a as Ee}from"./chunk-B4QFOJXL.js";import{b as I}from"./chunk-UIVZWXBK.js";import"./chunk-E4CYVUYG.js";import{a as Me}from"./chunk-BPHX6VXP.js";import{b as Te}from"./chunk-XWML36YQ.js";import{a as V}from"./chunk-6Q6SSTBK.js";import{a as Se}from"./chunk-COEGVUM3.js";import"./chunk-YS4B2B5N.js";import"./chunk-OP7MDR2B.js";import"./chunk-PEOYNJJM.js";import{a as H}from"./chunk-NUV5LHQV.js";import{a as h,b as ye,c as v,d as Re,e as E}from"./chunk-PDZNQW6F.js";import{u as be,x as Ce}from"./chunk-CJKZ27FM.js";import{a as ge,e as ve}from"./chunk-KNSQLQC6.js";import{c as le,d as me,g as de,h as ue,i as he,j as fe}from"./chunk-CQJRBQ6I.js";import{a as ne}from"./chunk-V2UO7ES2.js";import{a as re,b as se,c as ie,e as ae,f as pe,g as ce}from"./chunk-HDDAGHHE.js";import{ha as te,ma as oe}from"./chunk-YF6JHIN5.js";import"./chunk-2YUSBRXY.js";import{$ as s,A as P,B,G as J,Gb as Y,M as T,Mc as Z,Nc as ee,O as K,W as C,Z as _,f as F,g as W,hb as Q,ia as q,ja as z,l as $,m as G,q as w,qa as d,sa as X}from"./chunk-K5XGRFWJ.js";import"./chunk-7CGTOI24.js";var k=class e{#e=s(h);#d=s(v);ngOnInit(){ye(),this.#d.fetchConfig(),this.#e.clearAllNotCurrentVersion()}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=Q({type:e,selectors:[["app-root"]],decls:1,vars:0,template:function(t,n){t&1&&Y(0,"router-outlet")},dependencies:[le],encapsulation:2})};var Ae={production:!0,baseUrl:"/api",machineServerUrl:"${WS_URL}",defaultTimeout:3e4};var f=new _("ENVIRONMENT");var A=class e{#e=s(ve);isLoaded=d(!1);webmodules=d(null);preload(o=!1){let t=this.#e.getApiV1Webmodules().pipe(K(n=>this.webmodules.set(n)),J(()=>this.isLoaded.set(!0)));if(o)return t;t.subscribe()}static \u0275fac=function(t){return new(t||e)};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})};var Ue=()=>{let e=s(E);return e.token()?!0:e.checkProxyAuthed().pipe(T(o=>o?$(!0):e.refreshToken().pipe(w(()=>!0))))},je=()=>{let e=s(v),o=s(I),t=s(q),n=e.relayIsEnabled()?"longpoll":"websocket",i=[t.get(H).preload(!0),t.get(H).preloadFilterGroups(!0),t.get(A).preload(!0)];return e.configLoaded===null?P(i).pipe(w(()=>n)):e.configLoaded?.pipe(T(()=>P(i)))},Fe=()=>!0,Ne={path:"connect/:typeParam",loadComponent:()=>import("./chunk-MSIH2OJ5.js")},We=()=>{let e=s(h);return!e.getItem("locale")&&navigator.language&&e.setItem("locale",navigator.language),!0},Oe=[{path:"",children:[{path:"login",canActivate:[],loadComponent:()=>import("./chunk-PMF4FTBF.js")},{path:"logout",loadComponent:()=>import("./chunk-ZGQ2WCM2.js")},{path:"",canActivate:[Ue],children:[{path:"",canActivate:[je,Fe,We],children:[{path:"welcome",loadComponent:()=>import("./chunk-GNKCBZMS.js"),children:[{path:"",redirectTo:"select",pathMatch:"full"},{path:"select",loadComponent:()=>import("./chunk-AR5SEBWX.js")},Ne]},{path:"",loadComponent:()=>import("./chunk-ZXBKGNJU.js"),children:[{path:"",loadComponent:()=>import("./chunk-TV7OB7Y4.js")},Ne,{path:"destinations",loadComponent:()=>import("./chunk-T7RMSUHE.js")},{path:"add-backup",loadComponent:()=>import("./chunk-J7GH3G72.js")},{path:"backup/:id/export",loadComponent:()=>import("./chunk-VTOEFKZG.js")},{path:"backup/import",loadComponent:()=>import("./chunk-A23UTI46.js")},{path:"backup-draft/:id",loadComponent:()=>import("./chunk-3V25RAVK.js"),loadChildren:()=>import("./chunk-MKI54WTC.js")},{path:"backup/:id",loadComponent:()=>import("./chunk-3V25RAVK.js"),loadChildren:()=>import("./chunk-MKI54WTC.js")},{path:"backup/:id/log",loadComponent:()=>import("./chunk-EBKOJDCT.js")},{path:"backup/:id/database",loadComponent:()=>import("./chunk-JCXT6U5P.js")},{path:"backup/:id/commandline",loadComponent:()=>import("./chunk-5QGFYH2A.js")},{path:"backup/:id/commandline/:runId",loadComponent:()=>import("./chunk-KX3UP3HV.js")},{path:"backup/:id/delete",loadComponent:()=>import("./chunk-POVWDK74.js")},{path:"restore",children:[{path:"",loadComponent:()=>import("./chunk-XUCXLLB4.js")},{path:"from-config",loadComponent:()=>import("./chunk-3DHD6GQL.js")}]},{path:"restore-from-files",loadComponent:()=>import("./chunk-QW23XWNE.js"),loadChildren:()=>import("./chunk-HS3UDQIJ.js")},{path:"restore-draft/:id",loadComponent:()=>import("./chunk-QW23XWNE.js"),loadChildren:()=>import("./chunk-HS3UDQIJ.js")},{path:"restore/:id",loadComponent:()=>import("./chunk-QW23XWNE.js"),loadChildren:()=>import("./chunk-HS3UDQIJ.js")},{path:"status",loadComponent:()=>import("./chunk-N5XYG3QW.js")},{path:"settings",loadComponent:()=>import("./chunk-5UJN5SN4.js")},{path:"about",loadComponent:()=>import("./chunk-NQAD2FBX.js"),children:[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",loadComponent:()=>import("./chunk-VOXTAZLZ.js")},{path:"changelog",loadComponent:()=>import("./chunk-VQLI7RDY.js")},{path:"libraries",loadComponent:()=>import("./chunk-PNRFCYAE.js")},{path:"system-info",loadComponent:()=>import("./chunk-7VQ67PEZ.js")},{path:"server-settings",loadComponent:()=>import("./chunk-JNZJE3GC.js")},{path:"logs",loadChildren:()=>import("./chunk-UNQKMTFM.js")},{path:"crashlogs",loadComponent:()=>import("./chunk-TXCVGOPN.js")}]}]}]}]}]}];var xe=(e,o)=>{let t=s(E),n=s(me),i=s(h),p=s(f),m=i.getItem("locale"),a=s(Ce),g=Ie(m),r=ge.BASE||"",c=e.url===`${r}/api/v1/auth/login`,u=e.url===`${r}/api/v1/auth/logout`,S=e.url===`${r}/api/v1/auth/refresh`,y=e.url===`${r}/api/v1/progressstate`,x=e.url===`${r}/api/v1/remoteoperation/test`,M=e.url===`${r}/api/v1/filesystem/validate`,De=e.url.startsWith(`${r}/api/v2/`),L=t.token(),U=e,j=e.headers.has("custom-proxy-check")||L===Re;if(L&&e.url.startsWith(r+p.baseUrl)&&!j){let l=e.headers.set("Authorization",`Bearer ${L}`);m&&m!=="en-US"&&(l=l.set("X-Ui-Language",g)),U=e.clone({headers:l})}return o(U).pipe(w(l=>{if(l.type===4&&l.status===200&&De){let b=l.body;if(b?.Success===!1)throw{status:200,message:b?.Error??"Unknown error",error:{Error:b?.Error??"Unknown error"},requestBody:b}}return l}),B(l=>{let b=l.error?.Error||`Error Code: ${l.status}, Message: ${l.message}`;if(!j){let R=!0;if((y&&l.status===404||x||M)&&(R=!1),S&&l.status===401&&(R=!1,t.logout(),n.navigate(["/logout"])),!c&&!S&&!u&&l.status===401)return R=!1,t.refreshToken().pipe(T(()=>o(e.clone({headers:e.headers.set("Authorization",`Bearer ${t.token()}`)}))));R&&a.error(b)}return G(()=>({error:l,message:b}))}))};var N=class e{#e=s(z);showError(o){let t=this.#e.querySelector("body > .loading");if(!t)return;t.classList.add("has-error"),t.innerHTML="";let n=this.#e.createElement("div");n.classList.add("loading-title"),n.textContent="Unable to connect";let i=this.#e.createElement("div");i.classList.add("loading-error"),i.textContent=o||"Unknown error";let p=this.#e.createElement("button");p.type="button",p.classList.add("retry-button"),p.textContent="Retry",p.addEventListener("click",()=>{this.#e.defaultView?.location.reload()}),t.append(n,i,p)}static \u0275fac=function(t){return new(t||e)};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})};var $e="1.0.0",Le=`portal-proxy-client-${V()}`,Ge=1,O=class e{#e=1e3;#d=s(f);#u=s(N);#o=d("disconnected");#h=d(this.#e);#a=d(!1);#n=d(!1);#p=d(null);#c=d(null);#s=!1;isConnectedToMachineServer=this.#n.asReadonly();wsState=this.#o.asReadonly();#l=[];#r={};#t=null;#f=new TextDecoder("utf-8");#m=null;#y=X(()=>{let o=this.#a(),t=this.#h(),n=this.#p(),i=this.#c();if(!n||!i||!o||!t||t<this.#e){this.#m&&window.clearInterval(this.#m);return}this.#m=window.setInterval(()=>{this.connectToMachineServer(n,i)},t)});#i(o){this.#s||(this.#s=!0,this.#u.showError(o||"Unable to connect to the server."))}#g(){this.#s||(this.#s=!0)}utf8Atob(o){let t=Uint8Array.from(atob(o),i=>i.charCodeAt(0)),n=this.#f.decode(t);return n?JSON.parse(n):null}connectToMachineServer(o,t,n){let i=n?.reconnect??!1,p=this.wsState();(p==="disconnected"||p==="error"||i)&&(this.#t?.close(),this.#t=null),!this.#t&&(this.#s=!1,this.#t=new WebSocket(t),this.#o.set("connecting"),this.#t.onopen=()=>{this.#o.set("connect"),this.#n.set(!0),this.#a.set(!1),this.#p.set(null),this.#c.set(null)},this.#t.onclose=()=>{this.#o.set("disconnected"),this.#n.set(!1),this.#p.set(o),this.#c.set(t),this.#a.set(!0)},this.#t.onerror=()=>{this.#o.set("error")},this.#t.onmessage=m=>{let a=JSON.parse(m.data);if(this.wsState()==="connect"){if(a.type!=="welcome"){this.disconnectFromMachineServer(`Unexpected message type, expected 'welcome' but got '${a.type}'`);return}let r={token:o,publicKey:"",clientVersion:$e,protocolVersion:Ge},c=this.createResponse(a,"authportal",r);this.#o.set("welcome"),this.#t?.send(c)}else if(this.wsState()==="welcome"){if(a.type!=="authportal"){this.disconnectFromMachineServer(`Unexpected message type, expected 'authportal' but got '${a.type}'`);return}var g=JSON.parse(a.payload??"");if(g.accepted===!1){this.#i("Authentication failed"),this.disconnectFromMachineServer("Authentication failed");return}for(this.#o.set("authenticated"),this.#n.set(!0);this.#l.length>0;){let r=this.#l.pop();r&&this.#r[r.messageId]&&this.activateCommand(r)}}else if(this.wsState()==="authenticated"){if(a.type!=="command"){console.warn(`Unexpected message type, expected 'command' but got '${a.type}'`);return}let r=this.#r[a.messageId];if(r){if(a.errorMessage)this.#i(a.errorMessage),r.reject(a.errorMessage);else{let c=JSON.parse(a.payload??"");c.statusCode>=400?this.#i(c.body||`Initial request failed with status code ${c.statusCode}`):this.#g(),c.body=c?.body==null?null:this.utf8Atob(c.body),r.resolve(c)}delete this.#r[a.messageId],window.clearTimeout(r.timer)}}})}disconnectFromMachineServer(o=null){o&&console.error(o),this.#t?.close(),this.#t=null,this.#o.set("disconnected"),this.#n.set(!1)}createResponse(o,t,n){let i={from:Le,to:o.from,type:t,messageId:o.messageId,payload:JSON.stringify(n)};return JSON.stringify(i)}sendCommand(o,t,n,i,p,m,a,g=5e3){return(this.wsState()==="disconnected"||this.wsState()==="error")&&this.connectToMachineServer(o,n),new Promise((r,c)=>{let u=V(),y={from:Le,to:t,type:"command",messageId:u,payload:JSON.stringify({method:i,path:p,body:m,headers:a})},x={resolve:r,reject:c,timer:window.setTimeout(()=>{let M=this.#r[u];M&&(delete this.#r[u],this.#i("The request timed out before receiving a response."),M.reject("Timeout"))},g)};this.#r[u]=x,this.#n()?this.activateCommand(y):this.#l.push(y)})}activateCommand(o){this.#t?.send(JSON.stringify(o))}static \u0275fac=function(t){return new(t||e)};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})};function Be(e){if(typeof e!="string")return null;let t=new TextEncoder().encode(e);return window.btoa(String.fromCharCode(...t))}function Pe(e,o,t){let n=e.relayconfigState.config();if(n===null)return t(o);let i=Be(o.body),p={};o.headers.keys().forEach(r=>{p[r]=o.headers.get(r)??""});let m=o.headers.get("timeout"),a=m!==null?parseInt(m):e.defaultTimeout;o.url.startsWith("/api/v1/serverstate")&&o.url.includes("longpoll=true")&&(a=1e3*99);let g=e.relayWebsocket.sendCommand(n.accessToken,n.clientId,n.machineServerUrl,o.method,o.url,i,p,a);return new F(r=>{g.then(c=>{let u=new re;p!=null&&Object.keys(p).forEach(y=>{u.set(y,p[y])});let S=new se({body:c.body,status:c.statusCode,statusText:"OK",headers:u});r.next(S),r.complete()}).catch(c=>{r.error(new ie({error:c??"Unknown error",status:0,statusText:c??"Unknown error"}))})})}var He=(e,o)=>{let t={relayconfigState:s(v),defaultTimeout:s(f).defaultTimeout,relayWebsocket:s(O)},n=t.relayconfigState.config();if(t.relayconfigState.configLoaded!==null&&n===null){let i=new W;return t.relayconfigState.configLoaded.subscribe(p=>{p&&Pe(t,e,o).subscribe(i)}),i}return Pe(t,e,o)};var Ve={providers:[Z(),ue(Oe,fe(),he(de)),ae(ce(),pe([He,xe])),h,{provide:f,useValue:Ae},{provide:ee,useValue:ke()},{provide:be,useValue:{alertVariant:"simple"}},we,I,Te,oe,Se,te,Me,Ee]};ne(k,Ve);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@duplicati/ngclient",
3
- "version": "0.0.221",
3
+ "version": "0.0.225",
4
4
  "license": "MIT",
5
5
  "contributors": [
6
6
  "sp90",
package/chunk-43WATFQS.js DELETED
@@ -1,11 +0,0 @@
1
- import{a as bn,b as qt,c as wn}from"./chunk-CAQ3XMFP.js";import{a as tt,b as vt,c as Ut,d as Ln}from"./chunk-UZ4POLDC.js";import{a as An,b as In,c as Le,d as $t,e as Pn,f as On,g as Gt,i as Mn,j as xn,k as Rn}from"./chunk-O56QUSSI.js";import{a as yn}from"./chunk-AXQQEOTT.js";import{a as ie}from"./chunk-IMQUTGIK.js";import{a as wt}from"./chunk-F3ETZKLK.js";import{a as Nn,b as Ve,c as Dn}from"./chunk-IQL3REGJ.js";import{a as Re}from"./chunk-YYD2JU6T.js";import{B as Z,C as En,E as Ot,F as hn,H as pe,K as Ze,L as Mt,O as xt,P as ke,V as Rt,W as et,Y as Lt,a as Cn,b as Et,c as te,d as ht,e as ne,f as Ft,h as Tn,i as re,j as Nt,k as Dt,n as Sn,o as fn,p as yt,q as At,r as It,s as se,t as Ye,v as Y,w as Pt,z as Ue}from"./chunk-VKQQDCUN.js";import{c as Fn,d as bt}from"./chunk-DSYNIXJF.js";import{b as Qe,d as ve,e as gn}from"./chunk-NPFPMA4P.js";import{aa as mn}from"./chunk-ZC23RK4J.js";import{$b as s,Ab as Fe,Ac as Me,Bb as Ne,Bc as le,Cb as d,Cc as ge,Db as l,Dc as ft,E as _n,Eb as r,F as Ke,Fb as I,Jb as me,Jc as Xe,Kb as de,L as ut,Lb as ae,Mb as y,N as pt,O as cn,P as mt,Pa as gt,Q as dn,Qc as x,Sa as _,Tb as O,Ub as M,V as Ie,Vb as A,Vc as we,Wc as b,Xa as Ct,Xc as xe,Yb as Je,Zb as T,_ as R,_c as $e,a as rn,ac as qe,bc as De,da as f,ea as E,f as ct,gb as X,gc as Pe,ha as je,hc as Oe,ic as ee,jc as St,kc as ye,l as He,lb as W,nc as p,ob as un,oc as jt,pa as F,pc as V,q as dt,qc as at,ra as Q,sc as v,tc as G,uc as U,vb as Tt,vc as ue,w as sn,wb as g,wc as q,xb as C,xc as S,yb as he,zc as pn}from"./chunk-TQTOIWBK.js";import{a as j,b as ce}from"./chunk-7CGTOI24.js";var kt=class n{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||n)};static \u0275prov=Ie({token:n,factory:n.\u0275fac,providedIn:"root"})};function lt(n){if(un(n))return n();if(Array.isArray(n))return n.map(t=>lt(t));if(typeof n=="object"&&n!==null){let t={};for(let e in n)n.hasOwnProperty(e)&&(t[e]=lt(n[e]));return t}return n}var Vn=n=>n;function $n(n,t){let e=cn(n,Vn,t?.equal),i=e[rn],o=e;return o.set=a=>{let c=e();return mt(i,a),()=>{mt(i,c)}},o.update=a=>{let c=e();return dn(i,a),()=>{mt(i,c)}},e}var nt=class n{#e=R(Fn);isSaving=F(!1);resourceDestinations=Dn({stream:()=>this.#e.getApiV2ConnectionStrings()});destinations=$n(()=>{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(Ke(()=>{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||n)};static \u0275prov=Ie({token:n,factory:n.\u0275fac,providedIn:"root"})};function Bn(n,t){if(n&1){let e=y();l(0,"div",26)(1,"sh-form-field")(2,"label",27),A(3,7),r(),l(4,"input",28,0),U("ngModelChange",function(o){f(e);let a=s(2);return G(a.scheduleFields.nextTime.time,o)||(a.scheduleFields.nextTime.time=o),E(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),U("ngModelChange",function(o){f(e);let a=s(2);return G(a.scheduleFields.nextTime.date,o)||(a.scheduleFields.nextTime.date=o),E(o)}),r(),l(13,"sh-icon",29),p(14,"calendar"),r()()(),l(15,"div",26)(16,"sh-form-field")(17,"label",33),A(18,8),r(),l(19,"input",34),U("ngModelChange",function(o){f(e);let a=s(2);return G(a.scheduleFields.runAgain.repeatValue,o)||(a.scheduleFields.runAgain.repeatValue=o),E(o)}),r()(),l(20,"sh-select",35)(21,"input",36),U("ngModelChange",function(o){f(e);let a=s(2);return G(a.scheduleFields.runAgain.repeatUnit,o)||(a.scheduleFields.runAgain.repeatUnit=o),E(o)}),r()()(),l(22,"sh-toggle-card",37),me(23,38),A(24,9),de(),l(25,"div",39)(26,"sh-toggle",24),O(27,10),l(28,"input",25),U("ngModelChange",function(o){f(e);let a=s(2);return G(a.scheduleFields.runAgain.allowedDays.mon,o)||(a.scheduleFields.runAgain.allowedDays.mon=o),E(o)}),r(),M(),r(),l(29,"sh-toggle",24),O(30,11),l(31,"input",25),U("ngModelChange",function(o){f(e);let a=s(2);return G(a.scheduleFields.runAgain.allowedDays.tue,o)||(a.scheduleFields.runAgain.allowedDays.tue=o),E(o)}),r(),M(),r(),l(32,"sh-toggle",24),O(33,12),l(34,"input",25),U("ngModelChange",function(o){f(e);let a=s(2);return G(a.scheduleFields.runAgain.allowedDays.wed,o)||(a.scheduleFields.runAgain.allowedDays.wed=o),E(o)}),r(),M(),r(),l(35,"sh-toggle",24),O(36,13),l(37,"input",25),U("ngModelChange",function(o){f(e);let a=s(2);return G(a.scheduleFields.runAgain.allowedDays.thu,o)||(a.scheduleFields.runAgain.allowedDays.thu=o),E(o)}),r(),M(),r(),l(38,"sh-toggle",24),O(39,14),l(40,"input",25),U("ngModelChange",function(o){f(e);let a=s(2);return G(a.scheduleFields.runAgain.allowedDays.fri,o)||(a.scheduleFields.runAgain.allowedDays.fri=o),E(o)}),r(),M(),r(),l(41,"sh-toggle",24),O(42,15),l(43,"input",25),U("ngModelChange",function(o){f(e);let a=s(2);return G(a.scheduleFields.runAgain.allowedDays.sat,o)||(a.scheduleFields.runAgain.allowedDays.sat=o),E(o)}),r(),M(),r(),l(44,"sh-toggle",24),O(45,16),l(46,"input",25),U("ngModelChange",function(o){f(e);let a=s(2);return G(a.scheduleFields.runAgain.allowedDays.sun,o)||(a.scheduleFields.runAgain.allowedDays.sun=o),E(o)}),r(),M(),r()()()}if(n&2){let e=s(2);_(4),v("ngModel",e.scheduleFields.nextTime.time),_(7),v("ngModel",e.scheduleFields.nextTime.date),_(8),v("ngModel",e.scheduleFields.runAgain.repeatValue),_(),d("options",e.unitOptions)("isClearable",!1),_(),v("ngModel",e.scheduleFields.runAgain.repeatUnit),_(),d("disableToggle",!0),_(6),v("ngModel",e.scheduleFields.runAgain.allowedDays.mon),_(3),v("ngModel",e.scheduleFields.runAgain.allowedDays.tue),_(3),v("ngModel",e.scheduleFields.runAgain.allowedDays.wed),_(3),v("ngModel",e.scheduleFields.runAgain.allowedDays.thu),_(3),v("ngModel",e.scheduleFields.runAgain.allowedDays.fri),_(3),v("ngModel",e.scheduleFields.runAgain.allowedDays.sat),_(3),v("ngModel",e.scheduleFields.runAgain.allowedDays.sun)}}function Kn(n,t){if(n&1){let e=y();l(0,"div",23)(1,"sh-toggle",24),O(2,5),l(3,"input",25),U("ngModelChange",function(o){f(e);let a=s();return G(a.scheduleFields.autoRun,o)||(a.scheduleFields.autoRun=o),E(o)}),r(),M(),r(),l(4,"p"),A(5,6),r()(),g(6,Bn,47,14)}if(n&2){let e=s();_(3),v("ngModel",e.scheduleFields.autoRun),_(3),C(e.scheduleFields.autoRun()?6:-1)}}var Jn=[{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:Xn().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 Gn(n){if(!n.autoRun)return null;let t=[n.runAgain.allowedDays.mon?"Monday":null,n.runAgain.allowedDays.tue?"Tuesday":null,n.runAgain.allowedDays.wed?"Wednesday":null,n.runAgain.allowedDays.thu?"Thursday":null,n.runAgain.allowedDays.fri?"Friday":null,n.runAgain.allowedDays.sat?"Saturday":null,n.runAgain.allowedDays.sun?"Sunday":null].filter(c=>c!==null),e=n.nextTime.time.split(":"),i=new Date(n.nextTime.date);i.setHours(parseInt(e[0])),i.setMinutes(parseInt(e[1]));let o=n.runAgain.repeatValue,a=n.runAgain.repeatUnit;return{Time:i.toISOString(),Repeat:`${o}${a}`,AllowedDays:t}}function Xn(){let n=new Date,t=n.getDay(),e=t===1?7:(8-t)%7;return n.setDate(n.getDate()+e),n.setHours(12,0,0,0),n}var Yt=()=>({autoRun:F(!0),nextTime:{time:F("13:00"),date:F(new Date().toISOString().split("T")[0])},runAgain:{repeatValue:F(1),repeatUnit:F("D"),allowedDays:{mon:F(!0),tue:F(!0),wed:F(!0),thu:F(!0),fri:F(!0),sat:F(!0),sun:F(!0)}}}),Qt=class n{#e=R(be);#t=R(ve);#n=R(Qe);unitOptions=Jn;scheduleFields=this.#e.scheduleFields;scheduleType=this.#e.scheduleType;scheduleOptions=Vt;updateScheduleType(t){let e=Vt.find(i=>i.value===t);if(e&&e?.value!=="custom"){this.scheduleType.set(e.value);let i=e.data;this.scheduleFields.autoRun.set(i.autoRun??!1),this.scheduleFields.nextTime.time.set(i.nextTime?.time??"13:00"),this.scheduleFields.nextTime.date.set(i.nextTime?.date??new Date().toISOString().split("T")[0]),this.scheduleFields.runAgain.repeatValue.set(i.runAgain?.repeatValue??1),this.scheduleFields.runAgain.repeatUnit.set(i.runAgain?.repeatUnit??"D"),this.scheduleFields.runAgain.allowedDays.mon.set(i.runAgain?.allowedDays?.mon??!0),this.scheduleFields.runAgain.allowedDays.tue.set(i.runAgain?.allowedDays?.tue??!0),this.scheduleFields.runAgain.allowedDays.wed.set(i.runAgain?.allowedDays?.wed??!0),this.scheduleFields.runAgain.allowedDays.thu.set(i.runAgain?.allowedDays?.thu??!0),this.scheduleFields.runAgain.allowedDays.fri.set(i.runAgain?.allowedDays?.fri??!0),this.scheduleFields.runAgain.allowedDays.sat.set(i.runAgain?.allowedDays?.sat??!0),this.scheduleFields.runAgain.allowedDays.sun.set(i.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||n)};static \u0275cmp=X({type:n,selectors:[["app-schedule"]],decls:12,vars:4,consts:()=>{let t;t=$localize`Select an option...`;let e;e=$localize`Schedule`;let i;i=$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 c;c=$localize`If a date was missed, the job will run as soon as possible.`;let u;u=$localize`Next time`;let m;m=$localize`Run again every`;let h;h=$localize`Allowed days`;let D;D=$localize` Monday ${"\uFFFD#28\uFFFD\uFFFD/#28\uFFFD"}:TAG_INPUT:`;let P;P=$localize` Tuesday ${"\uFFFD#31\uFFFD\uFFFD/#31\uFFFD"}:TAG_INPUT:`;let w;w=$localize` Wednesday ${"\uFFFD#34\uFFFD\uFFFD/#34\uFFFD"}:TAG_INPUT:`;let $;$=$localize` Thursday ${"\uFFFD#37\uFFFD\uFFFD/#37\uFFFD"}:TAG_INPUT:`;let N;N=$localize` Friday ${"\uFFFD#40\uFFFD\uFFFD/#40\uFFFD"}:TAG_INPUT:`;let B;B=$localize` Saturday ${"\uFFFD#43\uFFFD\uFFFD/#43\uFFFD"}:TAG_INPUT:`;let K;return K=$localize` Sunday ${"\uFFFD#46\uFFFD\uFFFD/#46\uFFFD"}:TAG_INPUT:`,[["timeRef",""],["dateRef",""],e,i,o,a,c,u,m,h,D,P,w,$,N,B,K,[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,i){e&1&&(l(0,"h3",17),A(1,2),r(),l(2,"sh-select",18)(3,"input",19),T("ngModelChange",function(a){return i.updateScheduleType(a)}),r()(),g(4,Kn,7,2),l(5,"div",20)(6,"button",21),T("click",function(){return i.goBack()}),O(7,3),I(8,"sh-icon"),M(),r(),l(9,"button",22),T("click",function(){return i.next()}),O(10,4),I(11,"sh-icon"),M(),r()()),e&2&&(_(2),d("isClearable",!1)("options",i.scheduleOptions),_(),d("ngModel",i.scheduleType()),_(),C(i.scheduleType()==="custom"?4:-1))},dependencies:[se,te,Dt,Et,ne,re,pe,et,Y,Z,ke,Rt,hn],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 zn=[[["","title",""]],[["","description",""]],[["","action",""]],"*"],Wn=["[title]","[description]","[action]","*"];function Hn(n,t){n&1&&p(0,"Title")}function jn(n,t){n&1&&(l(0,"sh-icon"),p(1,"caret-down"),r())}var ze=class n{isActive=$e(!1);disableToggle=b(!1);ngOnInit(){this.disableToggle()&&this.isActive.set(!0)}toggle(){this.isActive.set(!this.isActive())}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=X({type:n,selectors:[["app-toggle-card"]],hostVars:2,hostBindings:function(e,i){e&2&&ye("active",i.isActive())},inputs:{isActive:[1,"isActive"],disableToggle:[1,"disableToggle"]},outputs:{isActive:"isActiveChange"},ngContentSelectors:Wn,decls:11,vars:1,consts:[[1,"title"],[3,"click"],[1,"actions"],[1,"content"]],template:function(e,i){e&1&&(qe(zn),l(0,"header")(1,"div",0)(2,"h3",1),T("click",function(){return i.disableToggle()||i.toggle()}),De(3,0,null,Hn,1,0),g(5,jn,2,0,"sh-icon"),r(),De(6,1),r(),l(7,"div",2),De(8,2),r()(),l(9,"div",3),De(10,3),r()),e&2&&(_(5),C(i.disableToggle()?-1:5))},dependencies:[Y],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;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 qn=["textInput"];function Qn(n,t){if(n&1){let e=y();l(0,"sh-select",3)(1,"input",7),U("ngModelChange",function(o){f(e);let a=s();return G(a.internalPath,o)||(a.internalPath=o),E(o)}),T("ngModelChange",function(){f(e);let o=s();return E(o.updateFilter())}),r()()}if(n&2){let e=s();d("options",e.fileGroupOptions())("isClearable",!1)("selectMultiple",!0),_(),v("ngModel",e.internalPath)}}function Yn(n,t){if(n&1&&(l(0,"div",8),p(1),r()),n&2){let e,i=s(2);_(),jt((e=i.currentExpressionOption())==null?null:e.startsWith)}}function Zn(n,t){if(n&1&&(l(0,"div",9),p(1),r()),n&2){let e,i=s(2);_(),jt((e=i.currentExpressionOption())==null?null:e.endsWith)}}function ei(n,t){if(n&1){let e=y();l(0,"sh-form-field",4)(1,"input",7,0),U("ngModelChange",function(o){f(e);let a=s();return G(a.internalPath,o)||(a.internalPath=o),E(o)}),T("ngModelChange",function(){f(e);let o=s();return E(o.updateFilter())}),r(),g(3,Yn,2,1,"div",8),g(4,Zn,2,1,"div",9),r()}if(n&2){let e,i,o=s();_(),v("ngModel",o.internalPath),_(2),C(!((e=o.currentExpressionOption())==null||e.startsWith==null)&&e.startsWith.length?3:-1),_(),C(!((i=o.currentExpressionOption())==null||i.endsWith==null)&&i.endsWith.length?4:-1)}}var ti=[{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"}],ni=[{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"}],Bt=class n{#e=R(je);path=b.required();osType=b();isNew=b(!1);pathChange=we();remove=we();internalPath=F("");pathType=F("-Expression");textInput=xe("textInput");currentExpressionOption=x(()=>{let t=this.pathType();return this.expressionOptions().find(e=>e.value===t)});fileGroupOptions=F(ti);expressionOptions=x(()=>{let e=this.osType()==="Windows"?"\\":"/";return ni.map(i=>i.value==="-Folder"||i.value==="+Folder"?ce(j({},i),{startsWith:"",endsWith:""}):i.value==="-FolderName"||i.value==="+FolderName"?ce(j({},i),{startsWith:"*",endsWith:`*${e}`}):i.value==="-FileName"||i.value==="+FileName"?ce(j({},i),{startsWith:"[.*",endsWith:`[^\\${e}]*]`}):i.value==="-FileGroup"||i.value==="+FileGroup"?ce(j({},i),{startsWith:"{",endsWith:"}"}):i.value==="-Regex"||i.value==="+Regex"?ce(j({},i),{startsWith:"[",endsWith:"]"}):i.value==="-Extension"||i.value==="+Extension"?ce(j({},i),{startsWith:"*.",endsWith:""}):ce(j({},i),{startsWith:"",endsWith:""}))});pathEffect=Q(()=>{let t=this.path(),e=t.slice(1),i=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(`${i}Folder`),this.internalPath.set(e)):e.startsWith("*")&&e.endsWith(`*${a}`)?(this.pathType.set(`${i}FolderName`),this.internalPath.set(e.slice(1,-2))):e.startsWith("[.*")&&e.endsWith(`[^\\${a}]*]`)?(this.pathType.set(`${i}FileName`),this.internalPath.set(e.slice(3,-7))):e.startsWith("{")&&e.endsWith("}")?(this.pathType.set(`${i}FileGroup`),this.internalPath.set(e.slice(1,-1))):e.startsWith("[")&&e.endsWith("]")?(this.pathType.set(`${i}Regex`),this.internalPath.set(e.slice(1,-1))):e.startsWith("*.")?(this.pathType.set(`${i}Extension`),this.internalPath.set(e.slice(2))):(this.pathType.set(`${i}Expression`),this.internalPath.set(e)),this.isNew()&&Ct(()=>{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||n)};static \u0275cmp=X({type:n,selectors:[["app-new-filter"]],viewQuery:function(e,i){e&1&&Pe(i.textInput,qn,5),e&2&&Oe()},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,i){if(e&1&&(l(0,"sh-select",1)(1,"input",2),U("ngModelChange",function(a){return G(i.pathType,a)||(i.pathType=a),a}),T("ngModelChange",function(){return i.updateFilter()}),r()(),g(2,Qn,2,4,"sh-select",3)(3,ei,5,3,"sh-form-field",4),l(4,"div",5),T("click",function(){return i.removeFilter()}),l(5,"sh-icon",6),p(6,"x-circle"),r()()),e&2){let o;d("options",i.expressionOptions())("isClearable",!1),_(),v("ngModel",i.pathType),_(),C(((o=i.currentExpressionOption())==null?null:o.value)=="-FileGroup"||((o=i.currentExpressionOption())==null?null:o.value)=="+FileGroup"?2:3)}},dependencies:[se,te,ne,re,ke,pe,Y],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 ii=["filtersContainer"],oi=()=>({updateOn:"blur",standalone:!0});function ai(n,t){if(n&1){let e=y();l(0,"button",15),T("click",function(){f(e);let o=s();return E(o.addFilter())}),O(1,3),I(2,"sh-icon"),M(),r()}}function li(n,t){n&1&&A(0,2,1)}function ri(n,t){n&1&&A(0,2,2)}function si(n,t){n&1&&(l(0,"p",13),A(1,4),r())}function _i(n,t){n&1&&(l(0,"p",13),A(1,5),r())}function ci(n,t){if(n&1){let e=y();l(0,"sh-form-field")(1,"textarea",16),U("ngModelChange",function(o){f(e);let a=s();return G(a.bulkFilters,o)||(a.bulkFilters=o),E(o)}),T("ngModelChange",function(){f(e);let o=s();return E(o.saveBulkFilterEdit())}),r()()}if(n&2){let e=s();_(),v("ngModel",e.bulkFilters),d("ngModelOptions",Me(2,oi))}}function di(n,t){if(n&1){let e=y();l(0,"app-new-filter",18),T("pathChange",function(o){let a=f(e).$index,c=s(2);return E(c.updateFilterAt(o,a))})("remove",function(){let o=f(e).$index,a=s(2);return E(a.removeFilterAt(o))}),r()}if(n&2){let e=t.$implicit,i=t.$index,o=s(2);d("path",e)("osType",o.osType())("isNew",o.lastAddedIndex()===i)}}function ui(n,t){if(n&1&&(l(0,"div",14,0),Fe(2,di,1,3,"app-new-filter",17,he),r()),n&2){let e=s();_(2),Ne(e.filters())}}var Kt=class n{#e=R(je);filters=$e.required();osType=b("");disableToggle=b(!0);bulkFilterEditMode=F(!1);bulkFilters=F("");lastAddedIndex=F(null);filtersContainer=xe.required("filtersContainer");hasFilters=x(()=>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(i=>i.trim()).filter(i=>i!==""&&(i.startsWith("-")||i.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),Ct(()=>{this.scrollToFilter(e)},{injector:this.#e})}scrollToFilter(t){let e=this.filtersContainer()?.nativeElement;if(!e)return;let i=e.querySelectorAll("app-new-filter");i[t]&&i[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 i=this.filters().filter((o,a)=>a!==t);this.filters.set(i),this.lastAddedIndex.set(null)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=X({type:n,selectors:[["app-filters"]],viewQuery:function(e,i){e&1&&Pe(i.filtersContainer,ii,5),e&2&&Oe()},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 i;i=$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,i,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,i){e&1&&(l(0,"app-toggle-card",6),me(1,7),l(2,"span"),A(3,1),r(),I(4,"div",8),g(5,ai,3,0,"button",9),l(6,"sh-menu")(7,"button",10)(8,"sh-icon"),p(9,"dots-three-vertical"),r()(),me(10,11),l(11,"button",12),T("click",function(){return i.toggleBulkFilterEdit()}),O(12,2),I(13,"sh-icon"),g(14,li,1,0)(15,ri,1,0),M(),r(),de(),r(),de(),g(16,si,2,0,"p",13)(17,_i,2,0,"p",13),g(18,ci,2,3,"sh-form-field")(19,ui,4,0,"div",14),r()),e&2&&(d("disableToggle",i.disableToggle()),_(5),C(i.bulkFilterEditMode()?-1:5),_(9),C(i.bulkFilterEditMode()?14:15),_(2),C(i.bulkFilterEditMode()?17:16),_(2),C(i.bulkFilterEditMode()?18:19))},dependencies:[se,te,ne,re,Z,Y,Ze,pe,ze,Bt],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}sh-menu[_ngcontent-%COMP%]{margin-left:.25rem}"],changeDetection:0})};var rt=class n{data=b();closed=we();path=F("");isValid=x(()=>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||n)};static \u0275cmp=X({type:n,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 i;i=$localize`Folder path`;let o;o=$localize`Cancel`;let a;return a=$localize` Use this source `,[e,i,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,i){e&1&&(l(0,"header")(1,"h3",4),A(2,0),r()(),l(3,"section",5)(4,"app-file-tree",6)(5,"label",7),A(6,1),r(),l(7,"input",8),U("ngModelChange",function(a){return G(i.path,a)||(i.path=a),a}),r()()(),l(8,"footer",9)(9,"button",10),T("click",function(){return i.closed.emit(null)}),A(10,2),r(),l(11,"button",11),T("click",function(){return i.submit()}),A(12,3),r()()),e&2&&(_(4),d("customRemoteMode","diskimage"),_(3),v("ngModel",i.path),_(4),d("disabled",!i.isValid()))},dependencies:[Z,tt,se,te,ne,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 pi=[[["","displayName",""]],[["","description",""]],"*"],mi=["[displayName]","[description]","*"];function gi(n,t){if(n&1&&p(0),n&2){s(2);let e=S(1);V(" ",e.Name," ")}}function Ci(n,t){if(n&1&&p(0),n&2){s(2);let e=S(0);V(" ",e.displayName," ")}}function Ti(n,t){n&1&&(l(0,"sh-chip",6),p(1,"Special"),r())}function Si(n,t){n&1&&(l(0,"sh-chip",7),p(1,"Deprecated"),r())}function fi(n,t){if(n&1&&p(0),n&2){s();let e=S(15);V(" ",e," ")}}function Ei(n,t){if(n&1&&p(0),n&2){s(2);let e=S(0);V(" ",e.description," ")}}function hi(n,t){if(n&1&&(l(0,"sh-card",0)(1,"div",1),I(2,"img",2),r(),l(3,"div",3)(4,"div",4),De(5),r(),l(6,"div",5),g(7,gi,1,1)(8,Ci,1,1),r(),g(9,Ti,2,0,"sh-chip",6)(10,Si,2,0,"sh-chip",7),r(),l(11,"div",8)(12,"div",4),De(13,1),r(),l(14,"div",5),ue(15),g(16,fi,1,1)(17,Ei,1,1),r()(),l(18,"div",9),De(19,2),r()()),n&2){let e=s(),i=S(0),o=S(1);d("variant",e.variant()),_(2),d("src",i.icon,gt),Tt("alt",i.displayName),_(5),C(o&&o.Name?7:8),_(2),C((i.sortOrder??0)==-2?9:(i.sortOrder??0)<0?10:-1),_(6);let a=q(e.getSimplePath(o==null?null:o.BaseUrl));_(),C(a&&a.length>0?16:17)}}var it=class n{destination=b();targetUrl=b();variant=b("type-b");connectionStringId=b();#e=R(nt);connectionString=x(()=>{let t=this.connectionStringId();return t==null?null:this.#e.destinations().find(e=>e.ID===t)});selectedDestinationType=x(()=>{let t=this.targetUrl();return t?Le(t)??null:null});destinationFromTargetUrl=x(()=>{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=x(()=>{let t=this.destination(),e=this.destinationFromTargetUrl();return t||e||null});getSimplePath(t){return t?In(t):""}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=X({type:n,selectors:[["app-destination-list-item"]],inputs:{destination:[1,"destination"],targetUrl:[1,"targetUrl"],variant:[1,"variant"],connectionStringId:[1,"connectionStringId"]},ngContentSelectors:mi,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,i){if(e&1&&(qe(pi),ue(0)(1),g(2,hi,20,7,"sh-card",0)),e&2){let o=q(i.destinationItem());_(),q(i.connectionString()),_(),C(o?2:-1)}},dependencies:[En,Ot],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 ot=class n{#e=R(Re);#t(t){return t.flatMap(e=>{if(!e?.Key)return null;let i=Pn(e.Key);if(i.length<=1){let o=$t(e.Key);return o.isDefaultEntry===!0?[ce(j({},o),{displayName:e.DisplayName||o.displayName||e.Key,description:e.Description||o.description||""})]:o}else return i}).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=x(()=>{let t=this.#e.backendModules(),e=this.#t(t);return this.#n(e)});sourceProviderOptions=x(()=>{let t=this.#e.sourceProviderModules(),e=this.#t(t.length?t:this.#e.backendModules());return this.#n(e)});restoreDestinationOptions=x(()=>{let t=this.#e.restoreDestinationProviderModules(),e=this.#t(t.length?t:this.#e.backendModules());return this.#n(e)});destinationTypeOptions=this.backendDestinationOptions;allModules=x(()=>[...this.#e.backendModules(),...this.#e.sourceProviderModules(),...this.#e.restoreDestinationProviderModules()].reduce((t,e)=>(t.find(i=>i.Key===e.Key)||t.push(e),t),[]));static \u0275fac=function(e){return new(e||n)};static \u0275prov=Ie({token:n,factory:n.\u0275fac,providedIn:"root"})};function Fi(n,t){if(n&1){let e=y();l(0,"app-destination-list-item",4),T("click",function(){let o=f(e).$implicit,a=s();return E(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",5),O(2,0),I(3,"sh-icon"),M(),r()()}if(n&2){let e=t.$implicit;d("destination",e)}}var Jt=class n{#e=R(ot);showAsSources=b(!1);moduleType=b("Backend");setDestination=we();destinationSearchTerm=F("");destinationTypeOptions=x(()=>{switch(this.moduleType()){case"SourceProvider":return this.#e.sourceProviderOptions();case"RestoreDestinationProvider":return this.#e.restoreDestinationOptions();default:return this.#e.backendDestinationOptions()}});destinationTypeOptionsFocused=x(()=>{let t=this.destinationTypeOptions(),e=this.destinationSearchTerm().toLowerCase(),i=[...t].sort((o,a)=>{let c=o.sortOrder??0,u=a.sortOrder??0;return c!==u?u-c:o.displayName.localeCompare(a.displayName)}).filter(o=>{let a=o.sortOrder??0;return a<0&&e?.length&&(o.key.toLocaleLowerCase()===e.toLocaleLowerCase()||o.customKey?.toLocaleLowerCase()===e.toLocaleLowerCase())?!0:a>=0});return e?i.filter(o=>o.searchTerms.toLowerCase().includes(e)):i});static \u0275fac=function(e){return new(e||n)};static \u0275cmp=X({type:n,selectors:[["app-destination-list"]],inputs:{showAsSources:[1,"showAsSources"],moduleType:[1,"moduleType"]},outputs:{setDestination:"setDestination"},decls:5,vars:1,consts:()=>{let t;t=$localize`Search for destination...`;let e;return e=$localize` Choose ${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SH_ICON:`,[e,["type","text","placeholder",t,3,"ngModelChange","ngModel"],[1,"list"],["tabindex","0",3,"destination"],["tabindex","0",3,"click","keydown.enter","keydown.space","destination"],["shButton","","tabindex","-1","type","button"]]},template:function(e,i){e&1&&(l(0,"sh-form-field")(1,"input",1),U("ngModelChange",function(a){return G(i.destinationSearchTerm,a)||(i.destinationSearchTerm=a),a}),r()(),l(2,"div",2),Fe(3,Fi,4,1,"app-destination-list-item",3,he),r()),e&2&&(_(),v("ngModel",i.destinationSearchTerm),_(2),Ne(i.destinationTypeOptionsFocused()))},dependencies:[it,se,te,ne,re,pe,Z,Y],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:1rem;height:100%;overflow:hidden;padding:.25rem}.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)}"],changeDetection:0})};var Ni=["fileInput"],Di=[[["label"]]],yi=["label"],Xt=class n{customId=b();content=F("");readonly=F(!1);placeholder=b($localize`Drop a file here or use the browse button`);fileInputRef=xe("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||n)};static \u0275cmp=X({type:n,selectors:[["app-file-drop-textarea"]],viewQuery:function(e,i){e&1&&Pe(i.fileInputRef,Ni,5),e&2&&Oe()},inputs:{customId:[1,"customId"],placeholder:[1,"placeholder"]},features:[pn([{provide:Cn,useExisting:n,multi:!0}])],ngContentSelectors:yi,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,i){if(e&1){let o=y();qe(Di),De(0,0,["ngProjectAs","label",5,["label"]]),l(1,"div",1)(2,"button",2),T("click",function(){return i.triggerBrowse()}),l(3,"sh-icon"),p(4,"upload"),r()()(),l(5,"div",3),T("drop",function(c){return i.onFileDrop(c)})("dragover",function(c){return i.onDragOver(c)}),l(6,"textarea",4),U("ngModelChange",function(c){return f(o),G(i.content,c)||(i.content=c),E(c)}),r()(),l(7,"input",5,0),T("change",function(c){return i.onFileSelected(c)}),r()}e&2&&(_(6),d("placeholder",i.placeholder()),v("ngModel",i.content),d("disabled",i.readonly()))},dependencies:[se,te,ne,re,Y,Z],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 Ai=(n,t,e,i)=>({index:n,fieldGroup:"custom",formView:t,destinationType:e,oauthField:i}),_e=n=>({$implicit:n}),Ii=(n,t,e,i)=>({index:n,fieldGroup:"dynamic",formView:t,destinationType:e,oauthField:i}),Pi=()=>({updateOn:"blur"}),Oi=(n,t,e,i)=>({index:n,formView:t,fieldGroup:"advanced",destinationType:e,oauthField:i}),fe=(n,t)=>({fieldGroup:n,formView:t}),Mi=()=>["/connect/logon"];function xi(n,t){n&1&&ae(0)}function Ri(n,t){if(n&1&&W(0,xi,1,0,"ng-container",24),n&2){let e=t.$implicit,i=t.$index;s();let o=ee(15);s();let a=S(0),c=S(1);d("ngTemplateOutlet",o)("ngTemplateOutletContext",le(7,_e,ft(2,Ai,i,e,a,c.oauthField)))}}function Li(n,t){n&1&&ae(0)}function bi(n,t){if(n&1&&W(0,Li,1,0,"ng-container",24),n&2){let e=t.$implicit,i=t.$index;s();let o=ee(15);s();let a=S(0),c=S(1);d("ngTemplateOutlet",o)("ngTemplateOutletContext",le(7,_e,ft(2,Ii,i,e,a,c.oauthField)))}}function wi(n,t){if(n&1){let e=y();l(0,"button",25),T("click",function(){f(e);let o=s(2);return E(o.showTextArea.set(!1))}),O(1,8),I(2,"sh-icon"),M(),r()}}function $i(n,t){if(n&1){let e=y();l(0,"button",32,2),T("click",function(){let o=f(e).$implicit,a=s(3);return E(a.addAdvancedOption(o))}),p(2),r()}if(n&2){let e=t.$implicit;_(2),V(" ",e.name," ")}}function Gi(n,t){if(n&1){let e=y();l(0,"div",22)(1,"sh-menu",26)(2,"button",27),O(3,9),I(4,"sh-icon"),M(),r(),me(5,28),Fe(6,$i,3,1,"button",29,he),de(),r(),l(8,"sh-menu")(9,"button",30)(10,"sh-icon"),p(11,"dots-three-vertical"),r()(),me(12,28),l(13,"button",31),T("click",function(){f(e);let o=s(2);return E(o.showTextArea.set(!0))}),l(14,"sh-icon"),p(15,"link"),r(),p(16," Edit contents as text "),r(),de(),r()()}if(n&2){s();let e=S(9);_(),d("searchable",!0),_(),d("disabled",e.length===0),_(4),Ne(e)}}function vi(n,t){if(n&1){let e=y();l(0,"textarea",33),T("ngModelChange",function(o){f(e);let a=s(2);return E(a.updateSettingsFromText(o))}),r()}if(n&2){let e=s(2);d("ngModel",e.settingsAsText())("ngModelOptions",Me(2,Pi))}}function Ui(n,t){n&1&&ae(0)}function ki(n,t){if(n&1&&W(0,Ui,1,0,"ng-container",24),n&2){let e=t.$implicit,i=t.$index;s(2);let o=ee(15),a=s(),c=S(0),u=S(1),m=a.getFormView("advanced",e)??a.getDefaultFormView(e);d("ngTemplateOutlet",o)("ngTemplateOutletContext",le(7,_e,ft(2,Oi,i,m,c,u.oauthField)))}}function Vi(n,t){if(n&1&&Fe(0,ki,1,9,"ng-container",null,he),n&2){let e=s(2);Ne(e.advancedFormFieldNames())}}function Bi(n,t){n&1&&(l(0,"sup",42),p(1,"*"),r())}function Ki(n,t){if(n&1&&(l(0,"sh-icon",43),p(1,"question"),r()),n&2){let e=s(2).$implicit;d("shTooltip",e.formView.longDescription)}}function Ji(n,t){if(n&1){let e=y();l(0,"app-file-tree",35)(1,"label",41),g(2,Bi,2,0,"sup",42),p(3),g(4,Ki,2,1,"sh-icon",43),r(),l(5,"input",44),T("ngModelChange",function(o){f(e);let a=s().$implicit,c=s(2);return E(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r()()}if(n&2){let e=s().$implicit,i=S(1),o=S(2),a=S(3),c=S(4),u=S(5);d("startingPath",a)("accepts",e.formView.accepts)("showFiles",!0)("hideShortcuts",!0)("showHiddenNodes",!0)("selectFiles",!0),_(),d("for",u),_(),C(e.formView.isMandatory&&c?2:-1),_(),V(" ",i," "),_(),C(e.formView.longDescription?4:-1),_(),d("id",u)("ngModel",o)}}function Xi(n,t){n&1&&(l(0,"sup",45),p(1,"*"),r())}function zi(n,t){if(n&1&&(l(0,"sh-icon",43),p(1,"question"),r()),n&2){let e=s(2).$implicit;d("shTooltip",e.formView.longDescription)}}function Wi(n,t){if(n&1){let e=y();l(0,"app-file-tree",36)(1,"label",41),g(2,Xi,2,0,"sup",45),p(3),g(4,zi,2,1,"sh-icon",43),r(),l(5,"input",44),T("ngModelChange",function(o){f(e);let a=s().$implicit,c=s(2);return E(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r()()}if(n&2){let e=s().$implicit,i=S(1),o=S(2),a=S(3),c=S(4),u=S(5);d("hideShortcuts",!0)("enableCreateFolder",!0)("startingPath",a),_(),d("for",u),_(),C(e.formView.isMandatory&&c?2:-1),_(),V(" ",i," "),_(),C(e.formView.longDescription?4:-1),_(),d("id",u)("ngModel",o)}}function Hi(n,t){n&1&&(l(0,"sup",46),p(1,"*"),r())}function ji(n,t){if(n&1&&(l(0,"sh-icon",43),p(1,"question"),r()),n&2){let e=s(2).$implicit;d("shTooltip",e.formView.longDescription)}}function qi(n,t){n&1&&(l(0,"sh-icon",47),p(1," warning "),r())}function Qi(n,t){n&1&&ae(0)}function Yi(n,t){if(n&1&&(l(0,"sh-icon",51),p(1," link "),r()),n&2){s();let e=S(8),i=S(9);ye("error",e&&i==="error")("warn",e&&i==="warning"),d("shTooltip",e)}}function Zi(n,t){n&1&&(l(0,"sh-icon",50),p(1,"envelope"),r())}function eo(n,t){n&1&&(l(0,"sh-icon",50),p(1,"hard-drives"),r())}function to(n,t){n&1&&(l(0,"sh-icon",50),p(1,"jar"),r())}function no(n,t){n&1&&(l(0,"sh-icon",50),p(1,"textbox"),r())}function io(n,t){if(n&1){let e=y();l(0,"sh-form-field")(1,"label",41),g(2,Hi,2,0,"sup",46),p(3),g(4,ji,2,1,"sh-icon",43),g(5,qi,2,0,"sh-icon",47),W(6,Qi,1,0,"ng-container",24),r(),l(7,"input",48),T("keydown",function(o){f(e);let a=s().$implicit,c=s(2);return E(c.onKeyDown(a.fieldGroup,a.formView.name,a.formView.type,o))})("ngModelChange",function(o){f(e);let a=s().$implicit,c=s(2);return E(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r(),ue(8)(9),g(10,Yi,2,5,"sh-icon",49)(11,Zi,2,0,"sh-icon",50)(12,eo,2,0,"sh-icon",50)(13,to,2,0,"sh-icon",50)(14,no,2,0,"sh-icon",50),r()}if(n&2){let e=s().$implicit,i=S(1),o=S(2),a=S(3),c=S(4),u=S(5);s();let m=ee(17);_(),d("for",u),_(),C(e.formView.isMandatory&&c?2:-1),_(),V(" ",i," "),_(),C(e.formView.longDescription?4:-1),_(),C(c&&e.formView.type==="Path"?5:-1),_(),d("ngTemplateOutlet",m)("ngTemplateOutletContext",le(16,_e,ge(13,fe,e.fieldGroup,e.formView))),_(),d("type",e.formView.type==="Email"?"email":"text")("id",u)("ngModel",o);let h=a,D=s().hasLeadingSlash(h??"");_(),q(D&&(e.formView.doubleSlash==null?null:e.formView.doubleSlash.message)),_(),q(e.formView.doubleSlash==null?null:e.formView.doubleSlash.type),_(),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 oo(n,t){n&1&&(l(0,"sup",52),p(1,"*"),r())}function ao(n,t){if(n&1&&(l(0,"sh-icon",43),p(1,"question"),r()),n&2){let e=s(2).$implicit;d("shTooltip",e.formView.longDescription)}}function lo(n,t){n&1&&ae(0)}function ro(n,t){if(n&1){let e=y();l(0,"span",56),T("click",function(){f(e);let o=s(2).$implicit,a=s(2);return E(a.oauthStartTokenCreation(o.destinationType,o.fieldGroup,o.formView.name,o.formView.oauthVersion))}),p(1," AuthID "),r()}}function so(n,t){n&1&&(l(0,"sh-icon",50),p(1,"password"),r())}function _o(n,t){if(n&1){let e=y();l(0,"sh-icon",57),T("click",function(){f(e);let o=s(2).$implicit;return E(o.formView.showPassword=!o.formView.showPassword)}),p(1," eye "),r()}}function co(n,t){if(n&1){let e=y();l(0,"sh-icon",57),T("click",function(){f(e);let o=s(2).$implicit;return E(o.formView.showPassword=!o.formView.showPassword)}),p(1," eye-slash "),r()}}function uo(n,t){if(n&1){let e=y();l(0,"sh-form-field")(1,"label",41),g(2,oo,2,0,"sup",52),p(3),g(4,ao,2,1,"sh-icon",43),W(5,lo,1,0,"ng-container",24),r(),l(6,"input",53),T("ngModelChange",function(o){f(e);let a=s().$implicit,c=s(2);return E(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r(),g(7,ro,2,0,"span",54)(8,so,2,0,"sh-icon",50),g(9,_o,2,0,"sh-icon",55)(10,co,2,0,"sh-icon",55),r()}if(n&2){let e=s().$implicit,i=S(1),o=S(2),a=S(4),c=S(5);s();let u=ee(17);_(),d("for",c),_(),C(e.formView.isMandatory&&a?2:-1),_(),V(" ",i," "),_(),C(e.formView.longDescription?4:-1),_(),d("ngTemplateOutlet",u)("ngTemplateOutletContext",le(14,_e,ge(11,fe,e.fieldGroup,e.formView))),_(),d("type",e.formView.showPassword?"text":"password")("id",c)("ngModel",o),_(),C(e.oauthField===e.formView.name?7:8),_(2),C(e.formView.showPassword?9:10)}}function po(n,t){n&1&&(l(0,"sup",59),p(1,"*"),r())}function mo(n,t){if(n&1&&(l(0,"sh-icon",43),p(1,"question"),r()),n&2){let e=s(3).$implicit;d("shTooltip",e.formView.longDescription)}}function go(n,t){n&1&&ae(0)}function Co(n,t){if(n&1&&p(0),n&2){let e=t.$implicit;at(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ")}}function To(n,t){if(n&1){let e=y();l(0,"sh-select",58)(1,"label",41),g(2,po,2,0,"sup",59),p(3),g(4,mo,2,1,"sh-icon",43),W(5,go,1,0,"ng-container",24),r(),l(6,"input",44),T("ngModelChange",function(o){f(e);let a=s(2).$implicit,c=s(2);return E(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r()(),W(7,Co,1,2,"ng-template",null,3,Xe)}if(n&2){let e=ee(8);s();let i=S(0),o=s().$implicit,a=S(1),c=S(2),u=S(4),m=S(5);s();let h=ee(17);d("options",i)("isClearable",!1)("optionTemplate",e),_(),d("for",m),_(),C(o.formView.isMandatory&&u?2:-1),_(),V(" ",a," "),_(),C(o.formView.longDescription?4:-1),_(),d("ngTemplateOutlet",h)("ngTemplateOutletContext",le(14,_e,ge(11,fe,o.fieldGroup,o.formView))),_(),d("id",m)("ngModel",c)}}function So(n,t){if(n&1&&(ue(0),g(1,To,9,16)),n&2){let e=s().$implicit,i=q(s(2).mapOptions(e.formView));_(),C(i?1:-1)}}function fo(n,t){n&1&&(l(0,"sup",62),p(1,"*"),r())}function Eo(n,t){if(n&1&&(l(0,"sh-icon",43),p(1,"question"),r()),n&2){let e=s(3).$implicit;d("shTooltip",e.formView.longDescription)}}function ho(n,t){n&1&&ae(0)}function Fo(n,t){if(n&1&&p(0),n&2){let e=t.$implicit;at(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ")}}function No(n,t){if(n&1){let e=y();l(0,"sh-select",61)(1,"label",41),g(2,fo,2,0,"sup",62),p(3),g(4,Eo,2,1,"sh-icon",43),W(5,ho,1,0,"ng-container",24),r(),l(6,"input",44),T("ngModelChange",function(o){f(e);let a=s(2).$implicit,c=s(2);return E(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r()(),W(7,Fo,1,2,"ng-template",null,4,Xe)}if(n&2){let e=ee(8);s();let i=S(0),o=s().$implicit,a=S(1),c=S(2),u=S(4),m=S(5);s();let h=ee(17);d("options",i)("asFreeText",!0)("inlineSearch",!0)("optionTemplate",e),_(),d("for",m),_(),C(o.formView.isMandatory&&u?2:-1),_(),V(" ",a," "),_(),C(o.formView.longDescription?4:-1),_(),d("ngTemplateOutlet",h)("ngTemplateOutletContext",le(15,_e,ge(12,fe,o.fieldGroup,o.formView))),_(),d("id",m)("ngModel",c)}}function Do(n,t){n&1&&I(0,"sh-progress-bar",60)}function yo(n,t){if(n&1&&(ue(0),g(1,No,9,17)(2,Do,1,0,"sh-progress-bar",60)),n&2){let e=s().$implicit,i=S(2),o=q(s(2).mapOptionsWithFreeText(e.formView,i));_(),C(o?1:2)}}function Ao(n,t){n&1&&(l(0,"sup",64),p(1,"*"),r())}function Io(n,t){if(n&1&&(l(0,"sh-icon",43),p(1,"question"),r()),n&2){let e=s(2).$implicit;d("shTooltip",e.formView.longDescription)}}function Po(n,t){n&1&&ae(0)}function Oo(n,t){if(n&1){let e=y();l(0,"app-size",63),T("ngModelChange",function(o){f(e);let a=s().$implicit,c=s(2);return E(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),l(1,"label",41),g(2,Ao,2,0,"sup",64),p(3),g(4,Io,2,1,"sh-icon",43),W(5,Po,1,0,"ng-container",24),r()()}if(n&2){let e=s().$implicit,i=S(1),o=S(2),a=S(4),c=S(5);s();let u=ee(17);d("inputType",e.Name)("ngModel",o)("customId",c),_(),d("for",c),_(),C(e.formView.isMandatory&&a?2:-1),_(),V(" ",i," "),_(),C(e.formView.longDescription?4:-1),_(),d("ngTemplateOutlet",u)("ngTemplateOutletContext",le(12,_e,ge(9,fe,e.fieldGroup,e.formView)))}}function Mo(n,t){n&1&&(l(0,"sup",65),p(1,"*"),r())}function xo(n,t){if(n&1&&(l(0,"sh-icon",43),p(1,"question"),r()),n&2){let e=s(2).$implicit;d("shTooltip",e.formView.longDescription)}}function Ro(n,t){n&1&&ae(0)}function Lo(n,t){if(n&1){let e=y();l(0,"sh-form-field")(1,"label",41),g(2,Mo,2,0,"sup",65),p(3),g(4,xo,2,1,"sh-icon",43),W(5,Ro,1,0,"ng-container",24),r(),l(6,"input",66),T("ngModelChange",function(o){f(e);let a=s().$implicit,c=s(2);return E(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r(),l(7,"sh-icon",50),p(8,"numpad"),r()()}if(n&2){let e=s().$implicit,i=S(1),o=S(2),a=S(4),c=S(5);s();let u=ee(17);_(),d("for",c),_(),C(e.formView.isMandatory&&a?2:-1),_(),V(" ",i," "),_(),C(e.formView.longDescription?4:-1),_(),d("ngTemplateOutlet",u)("ngTemplateOutletContext",le(11,_e,ge(8,fe,e.fieldGroup,e.formView))),_(),d("id",c)("ngModel",o)}}function bo(n,t){if(n&1&&(l(0,"sh-icon",43),p(1,"question"),r()),n&2){let e=s(2).$implicit;d("shTooltip",e.formView.longDescription)}}function wo(n,t){n&1&&ae(0)}function $o(n,t){if(n&1){let e=y();l(0,"sh-toggle",38)(1,"label",41),p(2),g(3,bo,2,1,"sh-icon",43),W(4,wo,1,0,"ng-container",24),r(),l(5,"input",67),T("change",function(o){f(e);let a=s().$implicit,c=s(2);return E(c.updateFieldValue(a.fieldGroup,a.formView.name,o.target.checked?"true":"false"))}),r()()}if(n&2){let e=s().$implicit,i=S(1),o=S(2),a=S(5);s();let c=ee(17),u=s();_(),d("for",a),_(),V(" ",i," "),_(),C(e.formView.longDescription?3:-1),_(),d("ngTemplateOutlet",c)("ngTemplateOutletContext",le(9,_e,ge(6,fe,e.fieldGroup,e.formView))),_(),d("checked",u.isTrue(o))}}function Go(n,t){n&1&&(l(0,"sup",69),p(1,"*"),r())}function vo(n,t){if(n&1&&(l(0,"sh-icon",43),p(1,"question"),r()),n&2){let e=s(3).$implicit;d("shTooltip",e.formView.longDescription)}}function Uo(n,t){n&1&&ae(0)}function ko(n,t){if(n&1&&p(0),n&2){let e=t.$implicit;at(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ")}}function Vo(n,t){if(n&1){let e=y();l(0,"sh-select",68)(1,"label",41),g(2,Go,2,0,"sup",69),p(3),g(4,vo,2,1,"sh-icon",43),W(5,Uo,1,0,"ng-container",24),r(),l(6,"input",70),T("ngModelChange",function(o){f(e);let a=s(2).$implicit,c=s(2);return E(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r()(),W(7,ko,1,2,"ng-template",null,5,Xe)}if(n&2){let e=ee(8);s();let i=S(0),o=s().$implicit,a=S(1),c=S(2),u=S(4),m=S(5);s();let h=ee(17);d("options",i)("selectMultiple",!0)("optionTemplate",e),_(),d("for",m),_(),C(o.formView.isMandatory&&u?2:-1),_(),V(" ",a," "),_(),C(o.formView.longDescription?4:-1),_(),d("ngTemplateOutlet",h)("ngTemplateOutletContext",le(13,_e,ge(10,fe,o.fieldGroup,o.formView))),_(),d("ngModel",c)}}function Bo(n,t){if(n&1&&(ue(0),g(1,Vo,9,15)),n&2){let e=s().$implicit,i=q(s(2).mapOptions(e.formView));_(),C(i?1:-1)}}function Ko(n,t){n&1&&(l(0,"sup",71),p(1,"*"),r())}function Jo(n,t){if(n&1&&(l(0,"sh-icon",43),p(1,"question"),r()),n&2){let e=s(2).$implicit;d("shTooltip",e.formView.longDescription)}}function Xo(n,t){n&1&&ae(0)}function zo(n,t){if(n&1){let e=y();l(0,"app-timespan",63),T("ngModelChange",function(o){f(e);let a=s().$implicit,c=s(2);return E(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),l(1,"label",41),g(2,Ko,2,0,"sup",71),p(3),g(4,Jo,2,1,"sh-icon",43),W(5,Xo,1,0,"ng-container",24),r()()}if(n&2){let e=s().$implicit,i=S(1),o=S(2),a=S(4),c=S(5);s();let u=ee(17);d("inputType",e.formView.name)("ngModel",o)("customId",c),_(),d("for",c),_(),C(e.formView.isMandatory&&a?2:-1),_(),V(" ",i," "),_(),C(e.formView.longDescription?4:-1),_(),d("ngTemplateOutlet",u)("ngTemplateOutletContext",le(12,_e,ge(9,fe,e.fieldGroup,e.formView)))}}function Wo(n,t){n&1&&(l(0,"sup",73),p(1,"*"),r())}function Ho(n,t){if(n&1&&(l(0,"sh-icon",43),p(1,"question"),r()),n&2){let e=s(2).$implicit;d("shTooltip",e.formView.longDescription)}}function jo(n,t){n&1&&ae(0)}function qo(n,t){if(n&1){let e=y();l(0,"app-file-drop-textarea",72),T("ngModelChange",function(o){f(e);let a=s().$implicit,c=s(2);return E(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),l(1,"label"),g(2,Wo,2,0,"sup",73),p(3),g(4,Ho,2,1,"sh-icon",43),W(5,jo,1,0,"ng-container",24),r()()}if(n&2){let e=s().$implicit,i=S(2),o=S(4),a=S(5);s();let c=ee(17);d("ngModel",i)("customId",a)("placeholder",e.formView.longDescription),_(2),C(e.formView.isMandatory&&o?2:-1),_(),V(" ",e.formView.shortDescription??e.formView.name," "),_(),C(e.formView.longDescription?4:-1),_(),d("ngTemplateOutlet",c)("ngTemplateOutletContext",le(11,_e,ge(8,fe,e.fieldGroup,e.formView)))}}function Qo(n,t){n&1&&(I(0,"sh-spinner"),l(1,"span"),A(2,10),r()),n&2&&St("--spinner-size","16px")("--spinner-thickness","2px")}function Yo(n,t){n&1&&(l(0,"div",76),A(1,11),r())}function Zo(n,t){if(n&1&&p(0),n&2){let e=t.$implicit;at(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ")}}function ea(n,t){if(n&1){let e=y();l(0,"sh-select",77)(1,"label",41)(2,"sup",78),p(3,"*"),r(),l(4,"span"),A(5,12),r()(),l(6,"input",44),T("ngModelChange",function(o){f(e);let a=s(4).$implicit,c=s(2);return E(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r()(),W(7,Zo,1,2,"ng-template",null,6,Xe)}if(n&2){s(4);let e=S(2),i=S(5),o=s(2);d("options",o.restoreBackupIdOptions())("isClearable",!1),_(),d("for",i),_(5),d("id",i)("ngModel",e)}}function ta(n,t){if(n&1&&g(0,Qo,3,4)(1,Yo,2,0,"div",76)(2,ea,9,5),n&2){let e=s(5);C(e.isLoadingRestoreBackupIdOptions()?0:e.restoreBackupIdOptions().length==0?1:2)}}function na(n,t){n&1&&(l(0,"sup",79),p(1,"*"),r())}function ia(n,t){if(n&1&&(l(0,"sh-icon",43),p(1,"question"),r()),n&2){let e=s(4).$implicit;d("shTooltip",e.formView.longDescription)}}function oa(n,t){n&1&&ae(0)}function aa(n,t){if(n&1){let e=y();l(0,"button",81),T("click",function(){f(e),s(4);let o=S(5),a=s(2);return E(a.toggleDisabled(o))}),O(1,13),I(2,"sh-icon"),M(),r()}}function la(n,t){if(n&1){let e=y();l(0,"sh-form-field")(1,"label",41),g(2,na,2,0,"sup",79),p(3),g(4,ia,2,1,"sh-icon",43),W(5,oa,1,0,"ng-container",24),r(),l(6,"input",80),T("ngModelChange",function(o){f(e);let a=s(3).$implicit,c=s(2);return E(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r(),l(7,"sh-icon",50),p(8,"textbox"),r()(),g(9,aa,3,0,"button",40)}if(n&2){let e=s(3).$implicit,i=S(1),o=S(2),a=S(4),c=S(5);s();let u=ee(17),m=s();_(),d("for",c),_(),C(e.formView.isMandatory&&a?2:-1),_(),V(" ",i," "),_(),C(e.formView.longDescription?4:-1),_(),d("ngTemplateOutlet",u)("ngTemplateOutletContext",le(15,_e,ge(12,fe,e.fieldGroup,e.formView))),_(),d("type","text")("id",c)("ngModel",o)("placeholder",e.formView.longDescription)("disabled",!0),_(3),C(m.getIsDisabled(c)?9:-1)}}function ra(n,t){if(n&1&&(l(0,"div",74),g(1,ta,3,1)(2,la,10,17),r()),n&2){let e=s(4);_(),C(e.isRestoreFlow()?1:2)}}function sa(n,t){if(n&1){let e=y();l(0,"div",82),O(1,14),I(2,"div")(3,"div"),M(),r(),l(4,"button",81),T("click",function(){f(e);let o=s(5);return E(o.openConsole())}),O(5,15),I(6,"sh-icon"),M(),r()}}function _a(n,t){n&1&&(l(0,"div",82),A(1,16),r(),l(2,"button",83),O(3,17),I(4,"sh-icon"),M(),r()),n&2&&(_(2),d("routerLink",Me(1,Mi)))}function ca(n,t){if(n&1&&(l(0,"div",75),g(1,sa,7,0)(2,_a,5,2),r()),n&2){let e=s(4);_(),C(e.isConnectedToConsole()?1:2)}}function da(n,t){if(n&1&&g(0,ra,3,1,"div",74)(1,ca,3,1,"div",75),n&2){let e=s(3);C(e.isConnectedToConsole()&&e.hasStorageApiKey()?0:1)}}function ua(n,t){n&1&&(l(0,"sup",85),p(1,"*"),r())}function pa(n,t){if(n&1&&(l(0,"sh-icon",43),p(1,"question"),r()),n&2){let e=s(3).$implicit;d("shTooltip",e.formView.longDescription)}}function ma(n,t){n&1&&ae(0)}function ga(n,t){if(n&1){let e=y();l(0,"div",84)(1,"sh-form-field")(2,"label",41),g(3,ua,2,0,"sup",85),p(4),g(5,pa,2,1,"sh-icon",43),W(6,ma,1,0,"ng-container",24),r(),l(7,"input",86),T("ngModelChange",function(o){f(e);let a=s(2).$implicit,c=s(2);return E(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r(),l(8,"sh-icon",50),p(9,"textbox"),r()(),l(10,"button",87),T("click",function(){f(e);let o=s(4);return E(o.authenticateFilen())}),O(11,18),I(12,"sh-icon"),M(),r()()}if(n&2){let e=s(2).$implicit,i=S(1),o=S(2),a=S(4),c=S(5);s();let u=ee(17),m=s();_(2),d("for",c),_(),C(e.formView.isMandatory&&a?3:-1),_(),V(" ",i," "),_(),C(e.formView.longDescription?5:-1),_(),d("ngTemplateOutlet",u)("ngTemplateOutletContext",le(12,_e,ge(9,fe,e.fieldGroup,e.formView))),_(),d("id",c)("ngModel",o),_(3),d("disabled",m.isAuthenticatingFilen())}}function Ca(n,t){if(n&1&&g(0,ga,13,14,"div",84),n&2){let e=s(3);C(e.hasFilenApiKey()?-1:0)}}function Ta(n,t){if(n&1){let e=y();l(0,"button",81),T("click",function(){f(e);let o=s().$implicit,a=s(2);return E(a.removeAdvancedOption(o.formView.name))}),l(1,"sh-icon"),p(2,"x-circle"),r()()}}function Sa(n,t){if(n&1&&(l(0,"div",34),ue(1)(2)(3)(4)(5),g(6,Ji,6,12,"app-file-tree",35)(7,Wi,6,9,"app-file-tree",36)(8,io,15,18,"sh-form-field")(9,uo,11,16,"sh-form-field")(10,So,2,2)(11,yo,3,2)(12,Oo,6,14,"app-size",37)(13,Lo,9,13,"sh-form-field")(14,$o,6,11,"sh-toggle",38)(15,Bo,2,2)(16,zo,6,14,"app-timespan",37)(17,qo,6,13,"app-file-drop-textarea",39)(18,da,2,1)(19,Ca,1,1),g(20,Ta,3,0,"button",40),r()),n&2){let e=t.$implicit;s();let i=S(0),o=s();ye("single-field",e.fieldGroup!=="advanced"),_(),q(e.formView.shortDescription??e.formView.name),_(),q(o.getFieldGroup(i,e.fieldGroup)[e.formView.name]),_();let a=q(o.getFieldValue(e.fieldGroup,e.formView.name));_(),q((a??"").toString().trim()===""),_(),q("destination-"+e.fieldGroup+"-"+e.index+"-"+(e.asHttpOptions?"http":"other")),_(),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),_(14),C(e.fieldGroup==="advanced"?20:-1)}}function fa(n,t){if(n&1&&(l(0,"sh-icon",88),p(1,"x-circle"),r()),n&2){s();let e=S(0);d("shTooltip",(e==null?null:e.message)??"Invalid value")}}function Ea(n,t){if(n&1&&(l(0,"sh-icon",89),p(1,"warning"),r()),n&2){s();let e=S(0);d("shTooltip",(e==null?null:e.message)??"Invalid value")}}function ha(n,t){if(n&1&&(ue(0),g(1,fa,2,1,"sh-icon",88)(2,Ea,2,1,"sh-icon",89)),n&2){let e=s().$implicit,i=S(0),o=q(e.formView.validate(i));_(),C((o==null?null:o.type)==="error"?1:(o==null?null:o.type)==="warning"?2:-1)}}function Fa(n,t){if(n&1&&(ue(0),g(1,ha,3,2)),n&2){let e=t.$implicit,o=(q(s(2).getFieldValue(e.fieldGroup,e.formView.name))??"").toString().trim()==="";_(),C(!o&&e.formView.validate?1:-1)}}function Na(n,t){if(n&1&&(ue(0),Fe(1,Ri,1,9,"ng-container",null,he),Fe(3,bi,1,9,"ng-container",null,he),l(5,"sh-toggle-card",19),me(6,20)(7),A(8,7),de(),ue(9),g(10,wi,3,0,"button",21)(11,Gi,17,2,"div",22),de(),g(12,vi,1,3,"textarea",23)(13,Vi,2,0),r(),W(14,Sa,21,9,"ng-template",null,0,Xe)(16,Fa,2,2,"ng-template",null,1,Xe)),n&2){let e=s(),i=S(1);q(e.destinationForm()),_(),Ne(i.custom),_(2),Ne(i.dynamic),_(2),d("disableToggle",!0),_(4),q(e.nonSelectedAdvancedFormViews()),_(),C(e.showTextArea()?10:11),_(2),C(e.showTextArea()?12:13)}}var zt=class n{#e=R(be);#t=R(Re);#n=R(wt);#i=R(ot);#o=R(yn);#s=R(An);#a=R(Ue);injector=R(je);targetUrl=$e.required();useBackupState=b(!1);#l=null;destinationType=x(()=>{let t=this.targetUrl();if(!t)return null;let e=Le(t);return this.#l=e?.customKey??e?.key,this.#l});refreshView=F(!1);destinationForm=F({custom:{},dynamic:{},advanced:{}});advancedFormFieldNames=x(()=>Object.keys(this.destinationForm().advanced??{}));destinationFormConfig=F(null);showTextArea=F(!1);isLoadingRestoreBackupIdOptions=F(!1);isRestoreFlow=x(()=>!this.useBackupState());restoreBackupIdOptions=Ve(Nn(this.targetUrl).pipe(dt(t=>{if(!t)return{authKey:null,url:null,isRestore:this.isRestoreFlow(),hasKey:this.hasStorageApiKey()};let e=t.indexOf("?"),i=e>=0?t.substring(e+1):"",o=new URLSearchParams(i),a=o.get("duplicati-auth-apiid")??"",c=o.get("duplicati-auth-apikey")??"";return{authKey:`${a}|${c}`,url:t}}),_n((t,e)=>t.authKey===e.authKey),pt(({url:t})=>{this.lastRestoreAuthQueryUrl=t}),ut(({url:t})=>t&&t.startsWith("duplicati://")&&this.hasStorageApiKey()&&this.isRestoreFlow()?(this.isLoadingRestoreBackupIdOptions.set(!0),this.#s.getDuplicatiStorageBackups(t).pipe(Ke(()=>this.isLoadingRestoreBackupIdOptions.set(!1)))):He([]))),{initialValue:[]});isConnectedToConsole=x(()=>this.#o.state()==="connected");hasStorageApiKey=x(()=>(this.#n.serverSettings()?.["remote-control-storage-api-id"]??"").length>0);isAuthenticatingFilen=F(!1);hasFilenApiKey=x(()=>{let e=this.destinationForm().advanced["api-key"];return e&&e.length>0});nonSelectedAdvancedFormViews=x(()=>{let t=this.destinationFormConfig();if(!t)return[];let e=this.advancedFormFieldNames();return t.advanced.filter(i=>e.findIndex(o=>o===i.name)===-1)});destinationTypeEffect=Q(()=>{let t=this.targetUrl(),e=Le(t??""),i=e.key,o=e.customKey??i,a=this.#i.allModules().find($=>$.Key===i)??{Key:i,DisplayName:e.displayName,Description:e.description,Options:[]};if(!a||!a.Options||!i)return;let c=e&&e.oauthField?e.oauthField:null,u=e&&e.customFields?e.customFields:{},m=e&&e.dynamicFields?e.dynamicFields:[],h=e&&e.advancedFields?e.advancedFields:[],D=e&&e.ignoredAdvancedFields?e.ignoredAdvancedFields:[],P={destinationType:o,oauthField:c,custom:[],dynamic:[],advanced:[]};u&&Object.entries(u).forEach(([$,N],B)=>{let K=N.order??B,L=N.validate;!L&&N.type==="Bucketname"&&(L=H=>xn(H)?null:{type:"error",message:$localize`Invalid bucket name.`}),L&&N.type==="Hostname"&&(L=H=>Rn(H)?null:{type:"error",message:$localize`Invalid hostname.`}),P.custom.push(j({order:900+K,validate:L},N))});for(let $=0;$<a.Options.length;$++){let N=a.Options[$];if(N.Deprecated)continue;let B=m.find(K=>K===N.Name||N.Aliases?.includes(K.name)||K.name===N.Name);if(B){let K=N.Aliases?.indexOf(B.name)??-1,L=N.Aliases&&K>-1?N.Aliases[K]:N.Name,H=B&&typeof B!="string",Ce=H?B?.defaultValue??N.DefaultValue:N.DefaultValue,Te=H&&B?.order!==void 0?B.order:$,k={name:L,type:N.Type,shortDescription:N.ShortDescription??void 0,longDescription:N.LongDescription??void 0,options:N.ValidValues,order:900+Te},Ee=H?j(j({},k),B):k;P.dynamic.push(Ee)}else{let K=N.Name;if(D.find(Ae=>Ae===K))continue;let H=h.find(Ae=>Ae===K||Ae.name===K),Ce=H&&typeof H!="string",Te=Ce&&H?.order!==void 0?H.order:$,k={name:K,type:N.Type,shortDescription:N.ShortDescription??void 0,longDescription:N.LongDescription??void 0,options:N.ValidValues,defaultValue:N.DefaultValue,order:900+Te},Ee=Ce?j(j({},k),H):k;P.advanced.push(Ee)}}if(P.custom.sort(($,N)=>$.order-N.order),P.dynamic.sort(($,N)=>$.order-N.order),P.advanced.sort(($,N)=>$.order-N.order),this.destinationFormConfig.set(P),!t)return;let w=Gt(t);w&&this.destinationForm.set({custom:w.custom,dynamic:w.dynamic,advanced:w.advanced})});destinationFormEffect=Q(()=>{let t=this.#l,e=this.destinationForm(),i=this.refreshView();if(!e||!t)return;let o=On({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(j({},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,i,o){if(i==="Hostname"||i==="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,i){let o=this.destinationForm();o[t][e]=i,this.destinationForm.set(j({},o))}removeAdvancedOption(t){let e=this.destinationForm();delete e.advanced[t],this.destinationForm.set(j({},e))}mapOptions(t){let e=t.loadOptions;if(e)return e(this.injector)();let i=t.options;return i?i.map(o=>({key:o,value:o})):null}mapOptionsWithFreeText(t,e){let i=this.mapOptions(t);return i?(e&&e.length>0&&(i.find(a=>a.value===e)||i.push({key:e,value:e})),i):null}#r=F(!1);oauthStartTokenCreation(t,e,i,o){this.#r.set(!0);let a=(o??1)==2?this.#t.defaultOAuthUrlV2():this.#t.defaultOAuthUrl(),c=this.#n.serverSettings()?.["--oauth-url"];if(c&&c.length>0&&(a=c),this.useBackupState()){let N=this.#e.mapFormsToSettings().find(B=>B.Name==="--oauth-url")?.Value;N&&N.length>0&&(a=N)}let u=this.destinationForm().advanced["oauth-url"];u&&u.length>0&&(a=u);let m=`${a}?type=${t}`,h=450,D=600,P=screen.width/2-h/2,w=screen.height/2-D/2,$=window.open(m,"_blank","height="+D+",width="+h+",menubar=0,status=0,titlebar=0,toolbar=0,left="+P+",top="+w);return window.addEventListener("message",N=>{let B=N.data.startsWith("authid:"),K=B?N.data.replace("authid:",""):null;B&&(this.destinationForm.update(L=>(L[e][i]=K,L)),this.#r.set(!1),this.refreshView.set(!this.refreshView()),$?.close())}),!1}settingsAsText=x(()=>{let t=this.destinationForm().advanced;return Object.entries(t).map(([e,i])=>{let o=e??"",a="";return typeof i=="boolean"?a=this.isTrue(i)?"True":"False":(typeof i=="number"||i!=null)&&(a=i.toString()),`${o}=${a}`}).join(`
4
- `)});updateSettingsFromText(t){if(typeof t!="string")return;let e=Mn(t);this.destinationForm.update(i=>ce(j({},i),{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(Ke(()=>this.isAuthenticatingFilen.set(!1))).subscribe({next:i=>{if(i.length===0){this.#a.open(ie,{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"]=i,o.dynamic["two-factor-code"]=null,o)),this.refreshView.set(!this.refreshView())},error:i=>{console.error("Error authenticating Filen",i),this.#a.open(ie,{data:{title:$localize`Authentication failed`,message:$localize`An error occurred while requesting the Filen API key: ${i.message}`,confirmText:$localize`OK`}})}})}authenticateFilen(){let t=this.targetUrl();if(!t)return;let i=this.destinationForm().advanced["api-key"];if(i&&i.length>0){this.#a.open(ie,{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||n)};static \u0275cmp=X({type:n,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 i;i=$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 c;c=$localize`This field is mandatory`;let u;u=$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 h;h=$localize`This field is mandatory`;let D;D=$localize`This field is mandatory`;let P;P=$localize`This field is mandatory`;let w;w=$localize`This field is mandatory`;let $;$=$localize`This field is mandatory`;let N;N=$localize`This field is mandatory`;let B;B=$localize`This field is mandatory`;let K;K=$localize`Loading available backups...`;let L;L=$localize`No backups found from this machine, contact support`;let H;H=$localize`This field is mandatory`;let Ce;Ce=$localize`Pick the backup to restore from`;let Te;Te=$localize`This field is mandatory`;let k;k=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:pencil${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let Ee;Ee=$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:`,Ee=Je(Ee);let Ae;Ae=$localize` Visit console ${"\uFFFD#6\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SH_ICON:`;let z;z=$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,i,K,L,Ce,k,Ee,Ae,z,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"],[3,"hideShortcuts","enableCreateFolder","startingPath"],[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",c],["shTooltip",u,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",h],[1,"indeterminate","primary"],["label","key","value","value",3,"options","asFreeText","inlineSearch","optionTemplate"],["shTooltip",D],[3,"ngModelChange","inputType","ngModel","customId"],["shTooltip",P],["shTooltip",w],["type","number",3,"ngModelChange","id","ngModel"],["type","checkbox",3,"change","checked"],["key","key","value","value",1,"primary","raised",3,"options","selectMultiple","optionTemplate"],["shTooltip",$],["type","text","id","text",3,"ngModelChange","ngModel"],["shTooltip",N],[3,"ngModelChange","ngModel","customId","placeholder"],["shTooltip",B],[1,"duplicati-backup-id"],[1,"duplicati-backup-id-console"],[1,"no-backups-found"],[3,"options","isClearable"],["shTooltip",H],["shTooltip",Te],["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,i){if(e&1&&(ue(0)(1),g(2,Na,18,5)),e&2){let o=q(i.destinationType());_();let a=q(i.destinationFormConfig());_(),C(o&&a?2:-1)}},dependencies:[Ye,te,Dt,ne,se,re,mn,gn,tt,Ut,Ln,Xt,pe,Z,Y,Rt,Ze,ke,Lt,et,Mt,xt],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}"],changeDetection:0})};var Wt=class n{#e=R(bt);#t=R(Ue);#n=R(Re);testDestination(t,e,i,o,a,c,u,m){return this.#n.hasV2TestOperations()?this.testDestinationv2(t,e,i,o,a,c,u,m):this.testDestinationv1(t,e,i,o,a,c,u,m)}testDestinationv2(t,e,i,o,a,c,u,m){return new ct(h=>{this.#e.postApiV2DestinationTest({requestBody:{DestinationUrl:t,ConnectionStringId:i??null,BackupId:e=="new"?null:e,AutoCreate:m==="create",Options:null,DestinationType:c,SourcePrefix:e=="new"?null:o}}).subscribe({next:D=>{if(D.Success){this.emitSuccessV2(h,t,a,D);return}this.handleGenericError(h,t,a,D.Error??"Unknown error",u)},error:D=>{let P=D?.error?.body??D?.error?.requestBody;if(P?.Data?.FolderExists===!1||P?.StatusCode==="missing-folder"){this.handleMissingFolder(h,t,e,i,a,u,m);return}if(P?.Data?.HostCertificate){this.handleMissingCertificate(h,t,a,P.Data?.HostCertificate,u);return}if(P?.Data?.ReportedHostKey){this.handleIncorrectKey(h,t,a,P.Data.ReportedHostKey,P.Data.AcceptedHostKey??null,u);return}this.handleGenericError(h,t,a,D?.message??"Unknown error",u)}})})}testDestinationv1(t,e,i,o,a,c,u,m){return new ct(h=>{this.#e.postApiV1RemoteoperationTest({requestBody:{path:t,backupId:e=="new"?null:e,connectionStringId:i??null,sourcePrefix:e=="new"?null:o},type:c}).subscribe({next:D=>{h.next({action:"success",targetUrl:t,testAgain:!1,destinationIndex:a}),h.complete()},error:D=>{this.handleDestinationErrorv1(D.message,t,e,i,a,u,m).subscribe(P=>{h.next(P)})}})})}handleMissingFolder(t,e,i,o,a,c,u){function m(){t.next({action:"missing-folder",targetUrl:e,testAgain:!1,destinationIndex:a,errorMessage:$localize`The remote destination folder does not exist.`}),t.complete()}if(c||u==="error"){m();return}this.#t.open(ie,{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:h=>{if(!h){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,Options:null,BackupId:i=="new"?null:i}}).subscribe({next:D=>{if(D.Success){this.emitSuccessV2(t,e,a,D);return}else this.handleFolderCreateFailure(t,e,a,D.Error??$localize`Unknown error`)},error:D=>{this.handleFolderCreateFailure(t,e,a,D.message??$localize`Unknown error`)}}):this.#e.postApiV1RemoteoperationCreate({requestBody:{path:e,backupId:i=="new"?null:i}}).subscribe({next:()=>{this.handleFolderCreated(t,e,a)},error:D=>{this.handleFolderCreateFailure(t,e,a,D.message??$localize`Unknown error`)}})}})}handleFolderCreateFailure(t,e,i,o){this.#t.open(ie,{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:i}),t.complete()}})}emitSuccessV2(t,e,i,o){t.next({action:"success",targetUrl:e,testAgain:!1,destinationIndex:i,anyFilesFound:!o.Data?.FolderIsEmpty,containsBackup:o.Data?.FolderContainsBackupFiles??void 0,containsEncryptedBackupFiles:o.Data?.FolderContainsEncryptedBackupFiles??void 0}),t.complete()}handleFolderCreated(t,e,i){this.#t.open(ie,{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:i}),t.complete()}})}reportNoAction(t,e,i,o){t.next({action:"generic-error",targetUrl:e,errorMessage:o,testAgain:!1,destinationIndex:i}),t.complete()}handleMissingCertificate(t,e,i,o,a){let c=$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}`,u=e.includes("?");function m(){t.next({action:"trust-cert",targetUrl:e,suggestedUrl:e+`${u?"&":"?"}accept-specified-ssl-hash=${o}`,testAgain:!0,certData:o,errorMessage:c,destinationIndex:i}),t.complete()}if(a){m();return}this.#t.open(ie,{maxWidth:"500px",data:{title:$localize`Trust the certificate`,message:c,confirmText:$localize`Trust the certificate`,cancelText:$localize`Cancel`},closed:h=>{if(!h){this.reportNoAction(t,e,i,$localize`The server certificate is not trusted.`);return}m()}})}handleIncorrectKey(t,e,i,o,a,c){if(a){let D=function(){t.next({action:"approve-host-key",targetUrl:e,suggestedUrl:h,testAgain:!0,reportedHostKey:o,errorMessage:m,destinationIndex:i}),t.complete()};var u=D;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}?`,h=e;try{let w=new URL(e);w.searchParams.set("ssh-fingerprint",o),h=w.toString()}catch{let w=e.replace(/([?&])ssh-fingerprint=[^&]*/,""),$=w.includes("?");h=w+`${$?"&":"?"}ssh-fingerprint=${o}`}if(c){D();return}this.#t.open(ie,{maxWidth:"500px",data:{title:$localize`The host key has changed`,message:m,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:w=>{if(!w){this.reportNoAction(t,e,i,$localize`The host key was not approved.`);return}D()}})}else{let D=function(){t.next({action:"approve-host-key",targetUrl:e,suggestedUrl:e+`${h?"&":"?"}ssh-fingerprint=${o}`,testAgain:!0,reportedHostKey:o,errorMessage:m,destinationIndex:i}),t.complete()};var u=D;let m=$localize`No certificate was specified, please verify that the reported host key is correct: ${o}`,h=e.includes("?");if(c){D();return}this.#t.open(ie,{maxWidth:"500px",data:{title:$localize`Approve host key?`,message:m,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:P=>{if(!P){this.reportNoAction(t,e,i,$localize`The host key was not approved.`);return}D()}})}}handleGenericError(t,e,i,o,a){function c(){t.next({action:"generic-error",targetUrl:e,testAgain:!1,destinationIndex:i,errorMessage:o}),t.complete()}if(a){c();return}this.#t.open(ie,{maxWidth:"500px",data:{title:$localize`Test connection failed`,message:o,cancelText:$localize`OK`},closed:u=>c()})}handleDestinationErrorv1(t,e,i,o,a,c,u){return new ct(m=>{if(t==="missing-folder"){this.handleMissingFolder(m,e,i,o,a,c,u);return}if(t.startsWith("incorrect-cert:")){let h=t.split("incorrect-cert:")[1];this.handleMissingCertificate(m,e,a,h,c);return}if(t.startsWith("incorrect-host-key:")){let h=t.split('incorrect-host-key:"')[1].split('",')[0],D=t.split('accepted-host-key:"')[1].split('",')[0];this.handleIncorrectKey(m,e,a,h,D,c);return}this.handleGenericError(m,e,a,t,c)})}static \u0275fac=function(e){return new(e||n)};static \u0275prov=Ie({token:n,factory:n.\u0275fac,providedIn:"root"})};function Da(n,t){if(n&1){let e=y();l(0,"sh-alert",13),O(1,0),l(2,"button",14),T("click",function(){f(e);let o=s(2);return E(o.testDestinationClick())}),r(),M(),r()}}function ya(n,t){n&1&&(l(0,"sh-alert",13),O(1,1),I(2,"sh-icon"),l(3,"div",15),I(4,"sh-spinner"),r(),M(),r()),n&2&&(_(4),St("--spinner-size","16px")("--spinner-thickness","2px"))}function Aa(n,t){n&1&&(l(0,"sh-alert",17),A(1,2),r())}function Ia(n,t){n&1&&(l(0,"sh-alert",16),A(1,3),r())}function Pa(n,t){if(n&1&&g(0,Aa,2,0,"sh-alert",17)(1,Ia,2,0,"sh-alert",16),n&2){let e,i=s(4);C((e=i.testResponse())!=null&&e.containsBackup?0:1)}}function Oa(n,t){n&1&&(l(0,"sh-alert",18),A(1,4),r())}function Ma(n,t){n&1&&(l(0,"sh-alert",16),A(1,5),r())}function xa(n,t){n&1&&(l(0,"sh-alert",17),A(1,6),r())}function Ra(n,t){if(n&1&&g(0,Oa,2,0,"sh-alert",18)(1,Ma,2,0,"sh-alert",16)(2,xa,2,0,"sh-alert",17),n&2){let e,i=s(4);C((e=i.testResponse())!=null&&e.containsBackup?0:(e=i.testResponse())!=null&&e.anyFilesFound?1:2)}}function La(n,t){n&1&&(l(0,"sh-alert",17),A(1,7),r())}function ba(n,t){n&1&&(l(0,"sh-alert",16),A(1,8),r())}function wa(n,t){if(n&1&&g(0,La,2,0,"sh-alert",17)(1,ba,2,0,"sh-alert",16),n&2){let e,i=s(4);C((e=i.testResponse())!=null&&e.anyFilesFound?0:1)}}function $a(n,t){n&1&&(l(0,"sh-alert",17),A(1,9),r())}function Ga(n,t){n&1&&(l(0,"sh-alert",17),A(1,10),r())}function va(n,t){n&1&&(l(0,"sh-alert",17),A(1,11),r())}function Ua(n,t){if(n&1&&g(0,$a,2,0,"sh-alert",17)(1,Ga,2,0,"sh-alert",17)(2,va,2,0,"sh-alert",17),n&2){let e,i=s(4);C((e=i.testResponse())!=null&&e.containsBackup?0:(e=i.testResponse())!=null&&e.anyFilesFound?1:2)}}function ka(n,t){if(n&1&&g(0,Pa,2,1)(1,Ra,3,1)(2,wa,2,1)(3,Ua,3,1),n&2){let e=s(3);C(e.testExpectation()==="containsBackup"?0:e.testExpectation()==="destinationEmpty"?1:e.testExpectation()==="destinationNotEmpty"?2:3)}}function Va(n,t){if(n&1){let e=y();O(0,12,1),l(1,"button",14),T("click",function(){f(e);let o=s(4);return E(o.createFolder())}),r(),M()}}function Ba(n,t){if(n&1&&(l(0,"sh-alert",16),O(1,12),g(2,Va,2,0,"button",19),M(),r()),n&2){let e=s(3);_(2),C(e.askToCreate()?2:-1)}}function Ka(n,t){if(n&1){let e=y();l(0,"sh-alert",16),p(1),l(2,"button",14),T("click",function(){f(e);let o=s(3);return E(o.useSuggestedUrl())}),p(3,"Approve"),r()()}if(n&2){let e,i=s(3);_(),V(" ",(e=i.testResponse())==null?null:e.errorMessage," ")}}function Ja(n,t){if(n&1){let e=y();l(0,"sh-alert",16),p(1),l(2,"button",14),T("click",function(){f(e);let o=s(3);return E(o.useSuggestedUrl())}),p(3,"Approve"),r()()}if(n&2){let e,i=s(3);_(),V(" ",(e=i.testResponse())==null?null:e.errorMessage," ")}}function Xa(n,t){if(n&1){let e=y();l(0,"sh-alert",16),p(1),l(2,"button",14),T("click",function(){f(e);let o=s(3);return E(o.testDestinationClick())}),p(3,"Test again"),r()()}if(n&2){let e,i=s(3);_(),V(" ",(e=i.testResponse())==null?null:e.errorMessage," ")}}function za(n,t){if(n&1&&g(0,ka,4,1)(1,Ba,3,1,"sh-alert",16)(2,Ka,4,1,"sh-alert",16)(3,Ja,4,1,"sh-alert",16)(4,Xa,4,1,"sh-alert",16),n&2){let e,i=s(2);C(((e=i.testResponse())==null?null:e.action)==="success"?0:((e=i.testResponse())==null?null:e.action)==="missing-folder"?1:((e=i.testResponse())==null?null:e.action)==="trust-cert"?2:((e=i.testResponse())==null?null:e.action)==="approve-host-key"?3:((e=i.testResponse())==null?null:e.action)==="generic-error"?4:-1)}}function Wa(n,t){if(n&1&&g(0,Da,3,0,"sh-alert",13)(1,ya,5,4,"sh-alert",13)(2,za,5,1),n&2){let e=s();C(e.testSignal()===null?0:e.testSignal()==="testing"?1:2)}}var Ht=class n{#e=R(Wt);targetUrl=$e.required();testSignal=$e.required();connectionStringId=b(null);backupId=b.required();sourcePrefix=b.required();suppressErrorDialogs=b.required();askToCreate=b.required();testExpectation=b.required();moduleType=b.required();testResponse=x(()=>{let t=this.testSignal();return t&&typeof t!="string"?t:null});isExpectedValidTargetUrl=x(()=>{let t=this.targetUrl();return!(!t||!Gt(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(),i=e&&typeof e!="string"?e?.targetUrl:null,o=e&&typeof e!="string"?e?.suggestedUrl:null;return!t||!o||i!==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 i=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(),i)?.subscribe({next:a=>{if(!this.suppressErrorDialogs()&&a.testAgain){let c=a.suggestedUrl;c&&this.targetUrl.set(c),this.testSignal.set("testing"),this.#e.testDestination(c??e,this.backupId(),this.connectionStringId(),this.sourcePrefix(),0,this.moduleType(),this.suppressErrorDialogs(),i)?.subscribe({next:u=>{this.testSignal.set(u),o(u)}})}else this.testSignal.set(a),o(a)}})})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=X({type:n,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"],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 i;i=$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 c;c=$localize` The remote destination is not empty. It is recommended to use an empty folder for the backup. `;let u;u=$localize`Success! Test completed, destination is empty.`;let m;m=$localize`Success! Test completed, destination contains files.`;let h;h=$localize`The remote destination is empty.`;let D;D=$localize`Success! Test completed, backup found.`;let P;P=$localize`Success! Test completed, destination contains files.`;let w;w=$localize`Success! Test completed, destination is empty.`;let $;return $=$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,i,o,a,c,u,m,h,D,P,w,$,[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,i){e&1&&g(0,Wa,3,1),e&2&&C(i.isExpectedValidTargetUrl()?0:-1)},dependencies:[Pt,Z,Y,xt],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 Ha(n,t){if(n&1){let e=y();l(0,"app-destination-list",10),T("setDestination",function(o){f(e);let a=s();return E(a.setDestination(o))}),r()}if(n&2){let e=s();d("showAsSources",!0)("moduleType",e.moduleType())}}function ja(n,t){if(n&1){let e=y();l(0,"app-destination-list-item",11)(1,"button",8),T("click",function(){f(e);let o=s();return E(o.removeDestination())}),A(2,3),r()(),l(3,"app-test-url",12),U("targetUrlChange",function(o){f(e);let a=s();return G(a.targetUrlModel,o)||(a.targetUrlModel=o),E(o)})("testSignalChange",function(o){f(e);let a=s();return G(a.testSignal,o)||(a.testSignal=o),E(o)}),r(),l(4,"app-single-destination",13),U("targetUrlChange",function(o){f(e);let a=s();return G(a.targetUrlModel,o)||(a.targetUrlModel=o),E(o)}),r()}if(n&2){let e=s();d("targetUrl",e.targetUrlModel()),_(3),v("targetUrl",e.targetUrlModel)("testSignal",e.testSignal),d("backupId",e.backupId())("sourcePrefix",e.sourcePrefix())("suppressErrorDialogs",e.suppressErrorDialogs())("askToCreate",e.askToCreate())("testExpectation",e.expectedResult())("moduleType",e.moduleType()),_(),v("targetUrl",e.targetUrlModel)}}function qa(n,t){n&1&&A(0,2,1)}function Qa(n,t){n&1&&A(0,2,2)}function Ya(n,t){n&1&&A(0,2,3)}function Za(n,t){n&1&&A(0,2,4)}var st=class n{data=b();closed=we();targetUrlModel=F(null);moduleType=F("Backend");askToCreate=F(!1);expectedResult=F("any");suppressErrorDialogs=F(!1);backupId=F(null);sourcePrefix=F(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=F(null);setTargetUrl(t,e=!1){this.targetUrlModel.set(t)}setDestination(t){let e=$t(t??"");if(e){if(e.mapper.default){let i=e.mapper.default("");this.setTargetUrl(i,!0);return}this.setTargetUrl(`${t}://`,!0)}}submit(){this.closed.emit(this.targetUrlModel())}removeDestination(){this.setTargetUrl(null,!0)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=X({type:n,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 i;i=$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:`,i=Je(i);let o;return o=$localize`Change`,[t,e,i,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","moduleType"],[3,"targetUrlChange","targetUrl"]]},template:function(e,i){if(e&1&&(l(0,"header")(1,"h3",4),A(2,0),r()(),l(3,"section",5),g(4,Ha,1,2,"app-destination-list",6),g(5,ja,5,10),r(),l(6,"footer",7)(7,"button",8),T("click",function(){return i.closed.emit(null)}),A(8,1),r(),l(9,"button",9),T("click",function(){return i.submit()}),O(10,2),g(11,qa,1,0)(12,Qa,1,0)(13,Ya,1,0)(14,Za,1,0),M(),r()()),e&2){let o=!!i.targetUrlModel();_(4),C(o?-1:4),_(),C(o?5:-1),_(4),ye("loading",i.testSignal()==="testing"),d("disabled",!o||i.testSignal()===null||i.testSignal()==="testing"),_(2),C(i.moduleType()==="Backend"?11:i.moduleType()==="SourceProvider"?12:i.moduleType()==="RestoreDestinationProvider"?13:14)}},dependencies:[zt,Jt,it,Z,Ht],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 el=["formRef"],tl=()=>({updateOn:"blur",standalone:!0}),en=()=>({standalone:!0});function nl(n,t){if(n&1){let e=y();l(0,"button",48),T("click",function(){f(e);let o=s(2);return E(o.openLocalDiskDialog())}),O(1,15),I(2,"sh-icon"),M(),r()}}function il(n,t){if(n&1){let e=y();g(0,nl,3,0,"button",47),l(1,"button",48),T("click",function(){f(e);let o=s();return E(o.openRemoteDestinationDialog())}),O(2,14),I(3,"sh-icon"),M(),r()}if(n&2){let e=s();C(e.isLocalDiskSupported()?0:-1)}}function ol(n,t){n&1&&A(0,7,1)}function al(n,t){n&1&&A(0,7,2)}function ll(n,t){n&1&&(l(0,"p",37),A(1,16),r())}function rl(n,t){n&1&&(l(0,"p",37),A(1,17),r())}function sl(n,t){if(n&1){let e=y();l(0,"sh-form-field")(1,"textarea",49),U("ngModelChange",function(o){f(e);let a=s();return G(a.bulkPaths,o)||(a.bulkPaths=o),E(o)}),T("ngModelChange",function(){f(e);let o=s();return E(o.savePathBulkEdit())}),r()()}if(n&2){let e=s();_(),v("ngModel",e.bulkPaths),d("ngModelOptions",Me(2,tl))}}function _l(n,t){if(n&1){let e=y();l(0,"sh-form-field",53)(1,"input",54),U("ngModelChange",function(o){f(e);let a=s(3);return G(a.editingPath,o)||(a.editingPath=o),E(o)}),r()(),l(2,"button",27),T("click",function(){f(e);let o=s(3);return E(o.updatePath())}),l(3,"sh-icon"),p(4,"floppy-disk"),r()(),l(5,"button",27),T("click",function(){f(e);let o=s(3);return E(o.cancelEditPath())}),l(6,"sh-icon"),p(7,"x-bold"),r()()}if(n&2){let e=s(3);_(),v("ngModel",e.editingPath),d("ngModelOptions",Me(2,en))}}function cl(n,t){if(n&1&&(l(0,"sh-chip"),I(1,"img",55),p(2),r()),n&2){let e=s(2).$implicit,i=s(2);_(),d("src",i.getBackendIcon(e),gt),_(),V(" ",i.getRemotePathDisplayName(e)," ")}}function dl(n,t){if(n&1&&(l(0,"sh-form-field",53),I(1,"input",56),r()),n&2){let e=s(2).$implicit;Tt("readonly",!0),_(),d("ngModel",e)("ngModelOptions",Me(3,en))}}function ul(n,t){if(n&1){let e=y();g(0,cl,3,2,"sh-chip")(1,dl,2,4,"sh-form-field",53),l(2,"button",27),T("click",function(){f(e);let o=s().$implicit,a=s(2);return E(a.editPath(o))}),l(3,"sh-icon"),p(4,"pen"),r()(),l(5,"button",27),T("click",function(){f(e);let o=s().$implicit,a=s(2);return E(a.removePath(o))}),l(6,"sh-icon"),p(7,"trash-simple"),r()()}if(n&2){let e=s().$implicit;C(e.startsWith("@")?0:1)}}function pl(n,t){if(n&1&&(l(0,"div",50),g(1,_l,8,3)(2,ul,8,1),r()),n&2){let e=t.$implicit,i=s(2);_(),C(i.oldPath()===e?1:2)}}function ml(n,t){if(n&1){let e=y();Fe(0,pl,3,1,"div",50,he),l(2,"div",46)(3,"sh-form-field"),I(4,"input",51),r(),l(5,"button",52),T("click",function(){f(e);let o=s();return E(o.addNewPath())}),l(6,"sh-icon"),p(7,"plus"),r()()()}if(n&2){let e=s();Ne(e.nonFilterPaths()),_(4),d("formControl",e.newPathCtrl)}}function gl(n,t){if(n&1){let e=y();l(0,"div",46)(1,"app-size",57),T("ngModelChange",function(o){f(e);let a=s();return E(a.updateFilesLargerThan(o))}),r()()}if(n&2){let e=s();_(),d("ngModel",e.filesLargerThan())("ngModelOptions",Me(2,en))}}var Ge=new It,vn=(n={path:"",filters:[],excludes:{hidden:!1,system:!1,temporary:!1,filesLargerThan:null}})=>Ge.group({path:Ge.control(n.path),excludes:Ge.group({hidden:Ge.control(n.excludes.hidden),system:Ge.control(n.excludes.system),temporary:Ge.control(n.excludes.temporary),filesLargerThan:Ge.group({size:Ge.control(null),unit:Ge.control(null)})})}),Zt=class n{#e=R(be);#t=R(Ue);#n=R(ve);#i=R(Qe);#o=R(Re);formRef=xe.required("formRef");sourceDataForm=this.#e.sourceDataForm;sourceDataFormSignal=this.#e.sourceDataFormSignal;newPathCtrl=new Tn("");filesLargerThan=x(()=>{let t=this.sourceDataFormSignal()?.excludes?.filesLargerThan??{};return t.size!==null&&t.unit!==null?`${t.size}${t.unit}`:null});osType=this.#e.osType;pathSignal=Ve(this.sourceDataForm.controls.path.valueChanges);pathArray=x(()=>this.pathSignal()?.split("\0").filter(t=>t.startsWith("-")||t.startsWith("+")||t==="___none___")??[]);nonFilterPaths=x(()=>this.pathSignal()?.split("\0").filter(t=>!t.startsWith("-")&&!t.startsWith("+")&&t!==""));oldPath=F(null);editingPath=F(null);addingNewPath=F(!1);bulkPathEditMode=F(!1);bulkPaths=F("");mobileMenuOpen=F(!1);isLocalDiskSupported=x(()=>this.#o.systemInfo()?.SourceProviderModules?.find(t=>t.Key=="diskimage"));filters=F([]);#s=Q(()=>{let e=this.pathSignal()?.split("\0").filter(i=>i!=="___none___"&&(i.startsWith("-")||i.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 i=Math.random().toString(36).substring(2,10),o=e.split("://")[0],c=`@${this.#o.systemInfo()?.DirectorySeparator==="\\"?"X:\\":"/"}dupl-${o}-${i}|${e}`;this.addPath(c)})}openLocalDiskDialog(){this.#t.open(rt,{maxWidth:"700px",maxHeight:"80vh",width:"100%",closeOnOutsideClick:!1,data:{initialPath:null}}).closed.subscribe(e=>{if(!e)return;let i=Math.random().toString(36).substring(2,10),a=`@${this.#o.systemInfo()?.DirectorySeparator==="\\"?"X:\\":"/"}dupl-disk-${i}|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(),i=[...t,...e],o=[...new Set(i)].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,i){this.#t.open(rt,{maxWidth:"700px",maxHeight:"80vh",width:"100%",closeOnOutsideClick:!1,data:{initialPath:i}}).closed.subscribe(a=>{if(!a)return;let c=`${e}|diskimage://${a}`,u=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(u?.replace(t,c)??"")})}editTargetUrlPath(t,e,i){this.#t.open(st,{maxWidth:"700px",maxHeight:"80vh",width:"100%",closeOnOutsideClick:!1,data:{targetUrlModel:i,moduleType:"SourceProvider",askToCreate:!1,expectedResult:"destinationNotEmpty",suppressErrorDialogs:!0,backupId:this.#e.backupId(),sourcePrefix:e}}).closed.subscribe(a=>{if(!a)return;let c=`${e}|${a}`,u=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(u?.replace(t,c)??"")})}updateFilesLargerThan(t){let{size:e,unit:i}=vt(t);this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:e,unit:i})}updatePath(){let t=this.oldPath(),e=this.editingPath();if(!t||!e||e===t){this.oldPath.set(null),this.editingPath.set(null);return}let i=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(i?.replace(t,e)??""),this.oldPath.set(null),this.editingPath.set(null)}cancelEditPath(){this.oldPath.set(null),this.editingPath.set(null)}removePath(t){let i=(this.sourceDataForm.controls.path.value??"").split("\0"),o=i.indexOf(t);if(o===-1)return;i.splice(o,1);let a=i.filter(c=>c&&c!=="").join("\0");this.sourceDataForm.controls.path.setValue(a)}addPath(t){let i=[this.sourceDataForm.controls.path.value,t].filter(o=>o&&o!=="").join("\0");this.sourceDataForm.controls.path.setValue(i)}updateFilters(t){let i=[...this.nonFilterPaths()??[],...t].filter(o=>o&&o!=="").join("\0");this.sourceDataForm.controls.path.setValue(i)}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":Le(e).icon??"database"}getRemotePathDisplayName(t){if(!t)return"";let e=t.split("|")[1];if(e.startsWith("diskimage:"))return $localize`Local disk`;let i=Le(e);return i?i.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,i=t?.split("\0")||[];e&&!i.includes(e)&&i.push(e);let o=i.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||n)};static \u0275cmp=X({type:n,selectors:[["app-source-data"]],viewQuery:function(e,i){e&1&&Pe(i.formRef,el,5),e&2&&Oe()},decls:66,vars:16,consts:()=>{let t;t=$localize`Path`;let e;e=$localize`Hidden files`;let i;i=$localize`System files`;let o;o=$localize`Temporary files`;let a;a=$localize`Source Data`;let c;c=$localize`Folder path`;let u;u=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let m;m=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let h;h=$localize`Options`;let D;D=$localize`Paths`;let P;P=$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 w;w=$localize`Exclude`;let $;$=$localize`Choose if there’s any files you want to exclude.`;let N;N=$localize` Files with the Hidden attribute ${"\uFFFD#56\uFFFD\uFFFD/#56\uFFFD"}:TAG_INPUT:`;let B;B=$localize` Files with the System attribute ${"\uFFFD#59\uFFFD\uFFFD/#59\uFFFD"}:TAG_INPUT:`;let K;K=$localize` Files with the Temporary attribute ${"\uFFFD#62\uFFFD\uFFFD/#62\uFFFD"}:TAG_INPUT:`;let L;L=$localize` Files larger than `;let H;H=$localize`${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:cloud-arrow-down${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SH_ICON: Add remote path `;let Ce;Ce=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:hard-drive${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Add local disk `;let Te;Te=$localize`Manually add a path.`;let k;k=$localize`Edit paths as text, one per line.`;let Ee;Ee=$localize`Add a direct path`;let Ae;return Ae=$localize`Edit path`,[["formRef",""],a,c,u,m,h,D,P,w,$,N,B,K,L,H,Ce,Te,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"],["type","checkbox","placeholder",e,"formControlName","hidden"],["type","checkbox","placeholder",i,"formControlName","system"],["type","checkbox","placeholder",o,"formControlName","temporary"],[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",Ee,3,"formControl"],["shButton","","type","button",1,"raised","primary",3,"click"],[1,"small"],["type","text","placeholder",Ae,3,"ngModelChange","ngModel","ngModelOptions"],["alt","",1,"provider-icon",3,"src"],["type","text",3,"ngModel","ngModelOptions"],[3,"ngModelChange","ngModel","ngModelOptions"]]},template:function(e,i){if(e&1){let o=y();l(0,"form",18,0),T("submit",function(){return i.next()}),l(2,"div",19)(3,"div",20)(4,"h3",21),A(5,1),r(),l(6,"button",22),T("click",function(){return i.mobileMenuOpen.set(!0)}),l(7,"sh-icon"),p(8,"sliders"),r()()(),l(9,"app-file-tree",23)(10,"label",24),A(11,2),r(),I(12,"input",25),r(),l(13,"div",26)(14,"button",27),T("click",function(){return i.goBack()}),O(15,3),I(16,"sh-icon"),M(),r(),l(17,"button",28),O(18,4),I(19,"sh-icon"),M(),r()()(),l(20,"div",29)(21,"div",30)(22,"span",21),A(23,5),r(),l(24,"button",31),T("click",function(){return i.mobileMenuOpen.set(!1)}),l(25,"sh-icon"),p(26,"x-bold"),r()()(),l(27,"app-toggle-card",32),me(28,33),l(29,"span"),A(30,6),r(),I(31,"div",34),g(32,il,4,1),l(33,"sh-menu")(34,"button",35)(35,"sh-icon"),p(36,"dots-three-vertical"),r()(),me(37,36),l(38,"button",27),T("click",function(){return i.togglePathBulkEdit()}),O(39,7),I(40,"sh-icon"),g(41,ol,1,0)(42,al,1,0),M(),r(),de(),r(),de(),g(43,ll,2,0,"p",37)(44,rl,2,0,"p",37),l(45,"div",38),g(46,sl,2,3,"sh-form-field")(47,ml,8,1),r()(),l(48,"app-filters",39),U("filtersChange",function(c){return f(o),G(i.filters,c)||(i.filters=c),E(c)}),T("filtersChange",function(c){return i.updateFilters(c)}),r(),l(49,"app-toggle-card",40),me(50,33),A(51,8),de(),l(52,"p",37),A(53,9),r(),l(54,"sh-toggle",41),O(55,10),I(56,"input",42),M(),r(),l(57,"sh-toggle",41),O(58,11),I(59,"input",43),M(),r(),l(60,"sh-toggle",41),O(61,12),I(62,"input",44),M(),r(),l(63,"sh-toggle",45),T("checkedChange",function(c){return i.toggleFilesLargerThan(c)}),A(64,13),r(),g(65,gl,2,3,"div",46),r()()()}e&2&&(d("formGroup",i.sourceDataForm),_(9),d("multiSelect",!0)("startingPath",i.getPath())("showFiles",!0),_(11),ye("open",i.mobileMenuOpen()),_(7),d("disableToggle",!0),_(5),C(i.bulkPathEditMode()?-1:32),_(9),C(i.bulkPathEditMode()?41:42),_(2),C(i.bulkPathEditMode()?44:43),_(3),C(i.bulkPathEditMode()?46:47),_(2),v("filters",i.filters),d("osType",i.osType()??""),_(),d("disableToggle",!0),_(14),d("checked",i.filesLargerThan()!==null),_(2),C(i.filesLargerThan()?65:-1))},dependencies:[se,Nt,te,Et,ne,Ft,re,Ye,Sn,At,yt,fn,pe,Y,Z,et,Ze,Kt,tt,ze,Ut,Ot],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}.rowbutton[_ngcontent-%COMP%]{margin-left:.25rem}"],changeDetection:0})};var Un="1W:1D,4W:1W,12M:1M",tn=!1,be=class n{#e=R(ve);#t=R(Re);#n=R(Ue);#i=R(bt);#o=R(wt);#s=R(kt);#a=R(nt);generalForm=kn();sourceDataForm=vn();scheduleFields=Yt();scheduleType=F("daily");settings=F([]);optionsFields={backupRetention:F("all"),backupRetentionTime:F(""),backupRetentionVersions:F(0),backupRetentionCustom:F("")};targetUrls=F([]);targetUrlModel=x(()=>this.targetUrls()[0]?.url??null);connectionStringId=x(()=>this.targetUrls()[0]?.connectionStringId??null);targetUrlTestSignal=F(null);backupMetadata=F(null);isDraft=F(!1);backupId=F(null);backupName=x(()=>this.generalFormSignal()?.name??"");isSubmitting=F(!1);finishedLoading=F(!1);backupDefaults=F(null);applicationOptions=F(null);isNew=x(()=>this.backupId()==="new");shouldAutoSave=x(()=>!this.isDraft()&&!this.isNew());osType=x(()=>this.#t.systemInfo()?.OSType);isConnectionStringSaved=x(()=>{let t=this.targetUrlModel();return t?this.#a.destinations().some(e=>e.BaseUrl===t):!1});selectedOptions=F([]);sourceDataFormSignal=Ve(this.sourceDataForm.valueChanges);generalFormSignal=Ve(this.generalForm.valueChanges);encryptionFieldSignal=Ve(this.generalForm.controls.encryption.valueChanges);advancedOptions=x(()=>this.#t.systemInfo()?.Options?.map(this.#u)??[]);#l=F(null);#r=null;testSignal=this.#l.asReadonly();#_=Q(()=>{let t=this.targetUrlModel(),e=this.#l(),i=this.#r;this.#r=t,!(e==="testing"||i===null||i===t)&&this.#l.set(null)});#g=Q(()=>{let t=this.targetUrlModel(),e=this.connectionStringId();if(e){let i=this.#a.destinations();if(i.length===0)return;let o=i.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=x(()=>{let t=this.#t.systemInfo()?.EncryptionModules??[];return[_t,...t]});nonSelectedOptions=x(()=>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(ut(e=>{let i=this.#c(),o=this.backupId(),a=i;if(a.Backup){e.length>0&&e[0]!==null?i.Backup.ConnectionStringID=e[0]:e.length>0&&e[0]===null&&(i.Backup.ConnectionStringID=void 0);let u=this.targetUrls().slice(1).map((m,h)=>{let D=e[h+1];return{TargetUrl:m.url,ConnectionStringID:D??void 0,UrlKey:m.urlKey}});u.length>0&&(a.Backup.AdditionalTargetURLs=u)}return this.isDraft()&&i.Backup&&(i.Backup.Metadata=this.backupMetadata()),o==="new"||!o||this.isDraft()?this.#i.postApiV1Backups({requestBody:i}):this.#i.putApiV1BackupById({id:o,requestBody:i})}),Ke(()=>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(ie,{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(ie,{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 u=(t.Backup.Sources??[]).filter(m=>m.trim()!=="").length>0;return!u||!this.sourceDataForm.valid?(this.#n.open(ie,{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(ie,{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??"",i=t.Filters?.map(u=>`${u.Include?"+":"-"}${u.Expression}`)??[],o=t.Settings?.find(u=>u.Name==="--exclude-files-attributes")?.Value?.toLowerCase()?.split(",")??[],a=t.Settings?.find(u=>u.Name==="--skip-files-larger-than")?.Value?.toUpperCase()??null,c={path:[...e,...i].join("\0"),excludes:{hidden:o.includes("hidden"),system:o.includes("system"),temporary:o.includes("temporary"),filesLargerThan:a===null?void 0:vt(a)}};this.sourceDataForm.patchValue(c)}mapDestinationToForm(t){let e=t,i=t.TargetURL??"",o=(t.ConnectionStringID===-1?null:t.ConnectionStringID)??null,a=i?[{url:i,connectionStringId:o,urlKey:null,save:!!o}]:[],c=e.AdditionalTargetURLs?.map(u=>({url:u.TargetUrl,urlKey:u.UrlKey,connectionStringId:u.ConnectionStringID??null,save:!!u.ConnectionStringID}))??[];this.targetUrls.set([...a,...c])}mapGeneralToForm(t){let e=t.Name??"",i=t.Description??"",o=t.Settings?.find(h=>h.Name==="encryption-module"),a=t.Settings?.find(h=>h.Name==="passphrase")?.Value??"",c=o?.Value&&o.Value.length?o.Value:"",u=t.Settings?.find(h=>h.Name==="compression-module")?.Value??"",m={name:t.Name??"",description:t.Description??""};e&&e!==""&&(m.name=e),i&&i!==""&&(m.description=i),c&&c!==""&&(m.encryption=c),a&&a!==""&&(m.password=a,m.repeatPassword=a),u&&u!==""&&(m.compression=u),this.generalForm.patchValue(m)}mapScheduleToForm(t){if(!t){this.scheduleType.set("disabled"),this.scheduleFields.autoRun.set(!1);return}let e=this.#s.fromString(t.Repeat)??null,i=this.#m(t.Time);this.scheduleFields.autoRun.set(!0),i.date&&this.scheduleFields.nextTime.date.set(i.date),this.scheduleFields.nextTime.time.set(i.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(c=>JSON.stringify(c.data)===JSON.stringify(o));a?this.scheduleType.set(a.value):this.scheduleType.set("custom")}mapOptionsToForms(t,e=!1){let i=["--no-encryption","--exclude-files-attributes","--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(h=>h.startsWith("--")).forEach(h=>{o.find(P=>P.Name===h)||o.push({Name:h,Value:m[h],Filter:null})})}let a=o.filter(m=>!i.includes(m.Name)),c=o.filter(m=>i.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 u="all";c?.forEach(m=>{if(m.Name==="keep-time"&&(m.Value??"")!=="")return u="time",this.optionsFields.backupRetentionTime.set(m.Value??"");if(m.Name==="keep-versions"&&(m.Value??"")!=="")return u="versions",this.optionsFields.backupRetentionVersions.set(m.Value?parseInt(m.Value):null);if(m.Name==="retention-policy"&&(m.Value??"")!=="")if(m.Value===Un)u="smart";else return u="custom",this.optionsFields.backupRetentionCustom.set(m.Value??"")}),this.optionsFields.backupRetention.set(u)}storeMetadata(t,e){this.backupMetadata.set(e?t.Metadata??null:null)}getScheduleFormValue(){let t=lt(this.scheduleFields);return Gn(t)}#c(){let t=this.generalForm.value,e=this.getScheduleFormValue(),i=this.sourceDataForm.value,a=this.targetUrls()[0],c=a?.url??null,u=i.path?.split("\0")??[],m=this.mapFormsToSettings(),h=Object.entries(i.excludes??{}).filter(([P,w])=>w&&P!=="filesLargerThan").map(([P])=>P),D=i.excludes?.filesLargerThan;return h.length&&m.push({Name:"--exclude-files-attributes",Value:h.join(",")}),D&&D.size!==null&&D.unit!==null&&m.push({Name:"--skip-files-larger-than",Value:`${D.size}${D.unit}`}),{Backup:{Name:t.name,Description:t.description,TargetURL:c??null,ConnectionStringID:a?.connectionStringId??null,Sources:u.filter(P=>!(P.startsWith("-")||P.startsWith("+"))),Settings:m,Filters:u.filter(P=>P.startsWith("-")||P.startsWith("+")).map((P,w)=>({Order:w,Include:P.startsWith("+"),Expression:P.slice(1)}))},Schedule:e}}mapFormsToSettings(t=[]){let e=this.generalForm.value,i=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than","encryption-module","passphrase","keep-time","keep-versions","retention-policy","compression-module"],o=[{Name:"--no-encryption",Value:"True"}];e.encryption!==""&&e.encryption!==_t.Key&&(o=[{Name:"encryption-module",Value:e.encryption??null},{Name:"passphrase",Value:e.password??null}]);let a=[{Name:"compression-module",Value:e.compression}];e.compression===""&&(a=[]);let c=[];switch(this.optionsFields.backupRetention()){case"time":c.push({Name:"keep-time",Value:this.optionsFields.backupRetentionTime()});break;case"versions":c.push({Name:"keep-versions",Value:this.optionsFields.backupRetentionVersions()?.toString()??""});break;case"custom":c.push({Name:"retention-policy",Value:this.optionsFields.backupRetentionCustom()});break;case"smart":c.push({Name:"retention-policy",Value:Un});break}let u=[...t,...i],m=this.settings().filter(h=>!u.includes(h.Name)).map(h=>{let D=h.Value;return typeof h.Value=="number"&&(D=h.Value.toString()),typeof h.Value=="boolean"&&(D=h.Value?"True":"False"),{Name:h.Name?.startsWith("--")?h.Name:`--${h.Name}`,Value:D}});return[...o,...a,...c,...m]}#p(){let t=this.targetUrls();if(t.length===0)return He([]);let e=t.map(i=>{if(i.connectionStringId)return He(i.connectionStringId);if(!i.save)return He(null);let o=i.url,c=Le(o)?.displayName??"Destination",m=this.#a.destinations().filter(P=>P.Name?.startsWith(c)).length,D={Name:`${c} ${new Date().toISOString()}`,Description:null,BaseUrl:o};return this.#a.save("new",D).pipe(dt(P=>P.Data?.ID??null))});return sn(e).pipe(pt(i=>{let o=this.targetUrls();i.forEach((a,c)=>{if(a&&c<o.length&&(this.#a.reload(),o[c].connectionStringId!==a)){let u=o[c].urlKey;this.updateTargetUrl(c,o[c].url,a,u)}})}))}#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,i=null,o=null){if(e&&(this.#r=null),t===null){this.targetUrls.set([]);return}this.targetUrls.update(a=>{let c=[...a];return c.length===0?c.push({url:t,urlKey:o,connectionStringId:i,save:i?!0:tn}):c[0]={url:t,urlKey:o,connectionStringId:i,save:i?!0:tn},c})}addTargetUrl(t,e,i){this.targetUrls.update(o=>[...o,{url:t,connectionStringId:e,urlKey:i,save:e?!0:tn}])}updateTargetUrl(t,e,i,o){this.targetUrls.update(a=>{if(t<0||t>=a.length)return a;let c=[...a],u=c[t].save;return c[t]={url:e,connectionStringId:i,urlKey:o,save:i?!0:u},c})}toggleSaveConnectionString(t){this.targetUrls.update(e=>{if(t<0||t>=e.length)return e;let i=[...e];return i[t]=ce(j({},i[t]),{save:!i[t].save}),i})}removeTargetUrl(t){this.targetUrls.update(e=>e.filter((i,o)=>o!==t))}#d(){this.generalForm.reset(),this.sourceDataForm.reset(),this.scheduleFields=Yt(),this.optionsFields.backupRetention.set("all"),this.settings.set([]),this.targetUrls.set([])}static \u0275fac=function(e){return new(e||n)};static \u0275prov=Ie({token:n,factory:n.\u0275fac,providedIn:"root"})};var Cl=["formRef"];function Tl(n,t){n&1&&(l(0,"sh-alert",17),O(1,5),I(2,"sh-icon",26),M(),r())}function Sl(n,t){if(n&1&&p(0),n&2){let e=t.$implicit;V(" ",e.DisplayName," ")}}function fl(n,t){if(n&1&&I(0,"sh-progress-bar",40),n&2){let e=s(3);ye("error",e.calculatePasswordStrength()===1)("warn",e.calculatePasswordStrength()===2)("primary",e.calculatePasswordStrength()===4)("success",e.calculatePasswordStrength()===5),d("value",e.calculatePasswordStrength()*(100/5))}}function El(n,t){n&1&&(l(0,"span",35),A(1,10),r())}function hl(n,t){n&1&&(O(0,8,1),I(1,"sh-icon"),M())}function Fl(n,t){n&1&&(O(0,8,2),I(1,"sh-icon"),M())}function Nl(n,t){n&1&&(O(0,11,1),I(1,"sh-icon",42),M())}function Dl(n,t){n&1&&(O(0,11,2),I(1,"sh-icon"),M())}function yl(n,t){if(n&1){let e=y();l(0,"button",41),T("click",function(){f(e);let o=s(3);return E(o.copyPassword())}),O(1,11),g(2,Nl,2,0)(3,Dl,2,0),M(),r()}if(n&2){let e=s(3);_(2),C(e.copiedPassword()?2:3)}}function Al(n,t){n&1&&(l(0,"sh-alert",39),A(1,12),r())}function Il(n,t){if(n&1){let e=y();l(0,"div",30)(1,"sh-form-field")(2,"label",31),O(3,7),I(4,"sup"),M(),r(),I(5,"input",32),r(),g(6,fl,1,9,"sh-progress-bar",33),l(7,"sh-form-field"),I(8,"input",34),g(9,El,2,0,"span",35),r(),l(10,"div",36)(11,"button",37),T("click",function(){f(e);let o=s(2);return E(o.showPassword.set(!o.showPassword()))}),O(12,8),g(13,hl,2,0)(14,Fl,2,0),M(),r(),l(15,"button",37),T("click",function(){f(e);let o=s(2);return E(o.generatePassword())}),O(16,9),I(17,"sh-icon"),M(),r(),g(18,yl,4,1,"button",38),r(),g(19,Al,2,0,"sh-alert",39),r()}if(n&2){let e=s(2);_(5),d("type",e.showPassword()?"text":"password"),_(),C(e.generalForm.value.password?6:-1),_(2),d("type",e.showPassword()?"text":"password"),_(),C(e.generalForm.value.repeatPassword&&e.generalForm.value.repeatPassword!==e.generalForm.value.password?9:-1),_(4),C(e.showPassword()?13:14),_(5),C(e.showCopyPassword()?18:-1),_(),C(e.generalForm.value.password&&e.generalForm.value.password===e.generalForm.value.repeatPassword?19:-1)}}function Pl(n,t){if(n&1&&(l(0,"sh-select",27)(1,"label",28),A(2,6),r(),I(3,"input",29),W(4,Sl,1,1,"ng-template"),r(),g(5,Il,20,7,"div",30)),n&2){let e=s();d("options",e.encryptionOptions())("isClearable",!1),_(5),C(e.encryptionFieldSignal()!==e.noneOptionKey?5:-1)}}function Ol(n,t){if(n&1&&(l(0,"button",24),O(1,13),I(2,"sh-icon"),M(),r()),n&2){let e=s();d("disabled",e.nameAndDescriptionValid()===!1)}}function Ml(n,t){if(n&1&&(l(0,"button",25),O(1,14),I(2,"sh-icon"),M(),r()),n&2){let e=s();d("disabled",e.generalForm.invalid||e.showCopyPassword()&&!e.copiedPassword())}}var We=new It,kn=(n={name:"",description:"",encryption:"",password:"",repeatPassword:"",compression:""})=>We.group({name:We.control(n.name,[ht.required]),description:We.control(n.description),encryption:We.control(n.encryption,[wn()]),password:We.control(n.password,[qt(t=>t?.value.encryption!=="-",[ht.required])]),repeatPassword:We.control(n.repeatPassword,[qt(t=>t?.value.encryption!=="-",[ht.required])]),compression:We.control(n.compression)}),_t={Key:"-",DisplayName:"None"},nn=class n{#e=R(ve);#t=R(Qe);#n=R(bn);#i=R(be);formRef=xe.required("formRef");generalForm=this.#i.generalForm;generalFormSignal=this.#i.generalFormSignal;encryptionFieldSignal=this.#i.encryptionFieldSignal;encryptionOptions=this.#i.encryptionOptions;isNew=this.#i.isNew;showPassword=F(!1);copiedPassword=F(!1);showCopyPassword=F(!1);noneOptionKey=_t.Key;encryptionEffect=Q(()=>{this.encryptionFieldSignal()===_t.Key&&(this.copiedPassword.set(!1),this.showCopyPassword.set(!1))});nameAndDescriptionValid=x(()=>{let t=this.generalFormSignal(),e=this.generalForm.controls;return e?.name&&e.name.valid&&e?.description&&e.description.valid});calculatePasswordStrength=x(()=>{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 i=document.createElement("textarea");i.value=t,document.body.appendChild(i),i.select(),document.execCommand("copy"),document.body.removeChild(i)}catch(i){console.error("Failed to copy text: ",i)}}}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||n)};static \u0275cmp=X({type:n,selectors:[["app-general"]],viewQuery:function(e,i){e&1&&Pe(i.formRef,Cl,5),e&2&&Oe()},decls:21,vars:4,consts:()=>{let t;t=$localize`Your backup name`;let e;e=$localize`Your backup description`;let i;i=$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 c;c=$localize`Backup description`;let u;u=$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 h;h=$localize`Encryption`;let D;D=$localize`Encryption`;let P;P=$localize`Password`;let w;w=$localize`Repeat password`;let $;$=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let N;N=$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:`,N=Je(N);let B;B=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SH_ICON:password${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SH_ICON: Generate password `;let K;K=$localize`Passwords do not match`;let L;L=$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:`,L=Je(L);let H;H=$localize` Tip: Be sure to save your password. If you lose it, you will lose access to your backups. `;let Ce;Ce=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let Te;return Te=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`,[["formRef",""],o,a,c,u,m,D,$,N,B,K,L,H,Ce,Te,["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",i,1,"raised","primary",3,"disabled"],["icon",""],["value","Key","label","DisplayName",3,"options","isClearable"],["for","encryption"],["type","text","id","encryption","tabindex","3","placeholder",h,"formControlName","encryption"],[1,"passwords"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",P,"formControlName","password",3,"type"],[1,"raised",3,"error","warn","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",w,"formControlName","repeatPassword",3,"type"],["error",""],[1,"password-actions"],["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,i){if(e&1&&(l(0,"form",15,0),T("submit",function(){return i.next()}),l(2,"h3",16),A(3,1),r(),g(4,Tl,3,0,"sh-alert",17),l(5,"sh-form-field")(6,"label",18),O(7,2),I(8,"sup"),M(),r(),I(9,"input",19),r(),l(10,"sh-form-field")(11,"label",20),A(12,3),r(),I(13,"textarea",21),r(),g(14,Pl,6,3),l(15,"div",22)(16,"button",23),T("click",function(){return i.exit()}),O(17,4),I(18,"sh-icon"),M(),r(),g(19,Ol,3,1,"button",24)(20,Ml,3,1,"button",25),r()()),e&2){let o;d("formGroup",i.generalForm),_(4),C(!i.isNew()&&((o=i.generalFormSignal())==null?null:o.encryption)!==""?4:-1),_(10),C(i.isNew()?14:-1),_(5),C(i.encryptionFieldSignal()===i.noneOptionKey||!i.isNew()?19:20)}},dependencies:[Ye,Nt,te,ne,Ft,At,yt,pe,ke,Z,Y,Mt,Pt,Lt],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{nt as a,it as b,Jt as c,kn as d,_t as e,nn as f,Vt as g,Gn as h,Yt as i,Qt as j,ze as k,Kt as l,Ht as m,st as n,vn as o,Zt as p,be as q,zt as r};
package/chunk-4E7D5F6K.js DELETED
@@ -1 +0,0 @@
1
- import{a as Q}from"./chunk-PIGMTUUT.js";import{a as B}from"./chunk-ANSV4G2K.js";import{e as j}from"./chunk-6JS7B4FW.js";import{B as H,D as K,H as V,b as D,c as y,d as R,e as $,f as A,j as v,p as k,q as x,r as J,t as X,v as q,w as z}from"./chunk-VKQQDCUN.js";import"./chunk-DSYNIXJF.js";import{d as G}from"./chunk-NPFPMA4P.js";import"./chunk-O2SMJYPC.js";import"./chunk-N2AU7VKX.js";import"./chunk-ZC23RK4J.js";import"./chunk-OPHQNXYO.js";import{Cb as _,Db as t,Eb as i,F as C,Fb as r,Sa as a,Tb as g,Ub as u,Vb as I,Xc as w,Zb as p,_ as d,gb as S,gc as E,hc as M,kc as O,nc as P,oc as b,pa as s,ra as N,wb as T,xb as L}from"./chunk-TQTOIWBK.js";import"./chunk-7CGTOI24.js";var U=["passwordInput"];function W(l,n){l&1&&(t(0,"sh-alert",6),I(1,4),i())}var F=new J,f=class l{#e=d(G);#n=d(j);rememberMe=B("rememberMe",!1,!0);failedLogin=s(!1);successLogin=s(!1);isLoading=s(!1);loginForm=F.group({pass:F.control("",R.required),rememberMe:F.control(this.rememberMe())});showPassword=s(!1);passwordInput=w("passwordInput");passwordEffect=N(()=>{this.failedLogin()&&queueMicrotask(()=>this.passwordInput()?.nativeElement?.focus())});ngOnInit(){this.loginForm.controls.rememberMe.valueChanges.subscribe(n=>this.rememberMe.set(n??!1)),queueMicrotask(()=>this.passwordInput()?.nativeElement?.focus())}submit(){let n=this.loginForm.value.pass;this.rememberMe.set(this.loginForm.value.rememberMe??!1),n&&(this.isLoading.set(!0),this.#n.login(n,this.rememberMe()).pipe(C(()=>{this.isLoading.set(!1),this.failedLogin.set(!0)})).subscribe({next:()=>{this.successLogin.set(!0),this.#e.navigate(["/"])}}))}static \u0275fac=function(o){return new(o||l)};static \u0275cmp=S({type:l,selectors:[["app-login"]],viewQuery:function(o,e){o&1&&E(e.passwordInput,U,5),o&2&&M()},decls:23,vars:6,consts:()=>{let n;n=$localize`Enter your password`;let o;o=$localize` Password ${"\uFFFD#9\uFFFD"}:START_LINK:${"\uFFFD#10\uFFFD"}:START_TAG_SH_ICON:question${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#9\uFFFD"}:CLOSE_LINK:`;let e;e=$localize` Login ${"\uFFFD#17\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SH_ICON:`;let m;m=$localize` Keep me logged in ${"\uFFFD#20\uFFFD\uFFFD/#20\uFFFD"}:TAG_INPUT:`;let h;return h=$localize` Remember to enter a password, if you can't remember the password open the duplicati client on the machine in question and make sure you open it through the tray icon then go into settings to change the password. `,[["passwordInput",""],o,e,m,h,[3,"submit","formGroup"],["type","warning"],[1,"logo-login"],[1,"inner"],[1,"login-row"],["for","password"],["href","https://docs.duplicati.com/detailed-descriptions/duplicati-access-password","target","_blank","rel","noopener noreferrer"],["name","password","autocomplete","current-password","placeholder",n,"tabindex","1","formControlName","pass",3,"type"],["suffix","",3,"click"],["shButton","","type","submit",1,"raised","primary","login-button"],[1,"raised","primary"],["type","checkbox","id","rememberMe","tabindex","2","formControlName","rememberMe"],[1,"login-row","checkbox"],["for","rememberMe",1,"remember-me"]]},template:function(o,e){o&1&&(t(0,"form",5),p("submit",function(){return e.submit()}),T(1,W,2,0,"sh-alert",6),t(2,"div",7),r(3,"app-logo"),i(),t(4,"div",8)(5,"div",9)(6,"sh-form-field")(7,"label",10),g(8,1),t(9,"a",11),r(10,"sh-icon"),i(),u(),i(),r(11,"input",12,0),t(13,"sh-icon",13),p("click",function(){return e.showPassword.set(!e.showPassword())}),P(14),i()(),t(15,"button",14),g(16,2),r(17,"sh-icon"),u(),i()(),t(18,"sh-checkbox",15),g(19,3),r(20,"input",16),u(),i(),t(21,"div",17),r(22,"label",18),i()()()),o&2&&(_("formGroup",e.loginForm),a(),L(e.failedLogin()&&!e.successLogin()?1:-1),a(10),_("type",e.showPassword()?"text":"password"),a(3),b(e.showPassword()?"eye":"eye-slash"),a(),O("loading",e.isLoading()))},dependencies:[X,v,y,D,$,A,x,k,Q,V,q,H,z,K],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{width:100vw;min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.75rem}form[_ngcontent-%COMP%] .inner[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:1rem}form[_ngcontent-%COMP%] .inner[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]{align-self:flex-start}sh-alert[_ngcontent-%COMP%]{max-width:20rem;margin:0 auto}h3[_ngcontent-%COMP%]{font:var(--title-30)}.login-row[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.logo-login[_ngcontent-%COMP%]{top:0;left:0;padding:1.25rem;position:fixed}.login-button[_ngcontent-%COMP%]{padding-left:1.5rem;padding-right:1.5rem}"],changeDetection:0})};export{f as default};
package/chunk-4J6L5OV3.js DELETED
@@ -1 +0,0 @@
1
- import{a}from"./chunk-IRT2UBDI.js";import"./chunk-RGFJ5UMA.js";import"./chunk-VKQQDCUN.js";import"./chunk-DSYNIXJF.js";import"./chunk-N2AU7VKX.js";import"./chunk-ZC23RK4J.js";import"./chunk-OPHQNXYO.js";import"./chunk-TQTOIWBK.js";import"./chunk-7CGTOI24.js";export{a as default};
package/chunk-5JGSXUKD.js DELETED
@@ -1 +0,0 @@
1
- import"./chunk-7CGTOI24.js";var o=[{path:"",redirectTo:"select-files",pathMatch:"full"},{path:"destination",loadComponent:()=>import("./chunk-TISQKN7N.js")},{path:"encryption",loadComponent:()=>import("./chunk-YPNN5FBK.js")},{path:"select-files",loadComponent:()=>import("./chunk-5ZRRLJA4.js")},{path:"options",loadComponent:()=>import("./chunk-OL7ADIFI.js")},{path:":taskid/progress",loadComponent:()=>import("./chunk-6NVCDJR6.js")}],t=o;export{t as default};
package/chunk-5YE4H57F.js DELETED
@@ -1 +0,0 @@
1
- import"./chunk-7CGTOI24.js";var o=[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",loadComponent:()=>import("./chunk-ESLC5LVP.js")},{path:"destination",loadComponent:()=>import("./chunk-BMACDVWX.js")},{path:"source-data",loadComponent:()=>import("./chunk-QQWV3FEH.js")},{path:"schedule",loadComponent:()=>import("./chunk-TWAHUXIN.js")},{path:"options",loadComponent:()=>import("./chunk-SACQFUJE.js")}];export{o as default};
package/chunk-5ZRRLJA4.js DELETED
@@ -1 +0,0 @@
1
- import{e as a,f as b}from"./chunk-77IXQ4GU.js";import"./chunk-TZ7MW3NZ.js";import"./chunk-43WATFQS.js";import"./chunk-CAQ3XMFP.js";import"./chunk-UZ4POLDC.js";import"./chunk-O56QUSSI.js";import"./chunk-6Q6SSTBK.js";import"./chunk-YCJYEQF7.js";import"./chunk-AXQQEOTT.js";import"./chunk-UTXZPAY6.js";import"./chunk-IMQUTGIK.js";import"./chunk-F3ETZKLK.js";import"./chunk-IQL3REGJ.js";import"./chunk-E4NQOMJX.js";import"./chunk-YYD2JU6T.js";import"./chunk-6JS7B4FW.js";import"./chunk-VKQQDCUN.js";import"./chunk-DSYNIXJF.js";import"./chunk-NPFPMA4P.js";import"./chunk-O2SMJYPC.js";import"./chunk-N2AU7VKX.js";import"./chunk-ZC23RK4J.js";import"./chunk-OPHQNXYO.js";import"./chunk-TQTOIWBK.js";import"./chunk-7CGTOI24.js";export{a as createRestoreSelectFilesForm,b as default};