@duplicati/ngclient 0.0.230 → 0.0.231

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 (137) hide show
  1. package/assets/dest-icons/googleworkspace.png +0 -0
  2. package/assets/sh.woff2 +0 -0
  3. package/chunk--kVw-BwM.js +1 -0
  4. package/chunk-5Ay2I6OJ.js +2 -0
  5. package/chunk-6bHATzM2.js +1 -0
  6. package/{chunk-DtA6Mvdt.js → chunk-7qu0Yols.js} +1 -1
  7. package/{chunk-DmKJmG9z.js → chunk-B1FMMTzB.js} +1 -1
  8. package/{chunk-BjAIXsAS.js → chunk-B6VmpM-T.js} +1 -1
  9. package/chunk-B7vxwDBG.js +1 -0
  10. package/chunk-BAVJD-p4.js +1 -0
  11. package/chunk-BC2-YuwH.js +14 -0
  12. package/{chunk-C4kBXz3C.js → chunk-BFfFD-XE.js} +1 -1
  13. package/chunk-BHERv_y8.js +1 -0
  14. package/chunk-BIAFFPb6.js +1 -0
  15. package/{chunk-C6QX7znk.js → chunk-BRJ93eei.js} +1 -1
  16. package/{chunk-C-NgIZiF.js → chunk-BYJ0fSUP.js} +1 -1
  17. package/chunk-B_iekvt6.js +1 -0
  18. package/chunk-Baizh2Dx.js +1 -0
  19. package/{chunk-Ca1C9pJ0.js → chunk-Bcxzhjj8.js} +1 -1
  20. package/{chunk-D2g5mSLr.js → chunk-Bfak-Gjv.js} +1 -1
  21. package/{chunk-DD_QfWih.js → chunk-Bgx4dtaL.js} +1 -1
  22. package/chunk-BhGD1_v8.js +2 -0
  23. package/{chunk-Dj3xknEh.js → chunk-BhPCHFyT.js} +1 -1
  24. package/{chunk-B728v9oc.js → chunk-Bj1ToKwz.js} +2 -2
  25. package/{chunk-BIOMsSHI.js → chunk-BjSSXg5V.js} +1 -1
  26. package/chunk-BlfsmSZO.js +4 -0
  27. package/chunk-Bnu5Zyue.js +1 -0
  28. package/{chunk-OFYkgZA1.js → chunk-C1BwGQgo.js} +2 -2
  29. package/{chunk-D2g44FyO.js → chunk-C2H72Zk8.js} +2 -2
  30. package/{chunk-DPNAj9Vc.js → chunk-C3KPTLNN.js} +1 -1
  31. package/{chunk-B2TXzbpy.js → chunk-C5p3bQwH.js} +1 -1
  32. package/{chunk-C1kucB1O.js → chunk-C6beMvkJ.js} +2 -2
  33. package/chunk-CAgfvBGI.js +2 -0
  34. package/{chunk-BD9-OWSe.js → chunk-CDEvMQA2.js} +1 -1
  35. package/{chunk-OLi7f6y7.js → chunk-CI8lsvKT.js} +1 -1
  36. package/chunk-CP3edE1P.js +1 -0
  37. package/{chunk-wyNyzSXi.js → chunk-CQv4eyEK.js} +1 -1
  38. package/chunk-CTwvkMrj.js +2 -0
  39. package/chunk-CmexLvf7.js +2 -0
  40. package/chunk-Cng2PWKw.js +2 -0
  41. package/chunk-CqwyTVd3.js +1 -0
  42. package/{chunk-Fw6nFDZK.js → chunk-Crs56mDy.js} +2 -2
  43. package/{chunk-BYJA6sbi.js → chunk-CwKxis_6.js} +1 -1
  44. package/{chunk-DWkdK0Ib.js → chunk-CxjTj8X0.js} +1 -1
  45. package/chunk-CzJ3-6Pu.js +1 -0
  46. package/chunk-D2MSuPzM.js +2 -0
  47. package/{chunk-PVmXLw9b.js → chunk-D2aWqPl_.js} +1 -1
  48. package/{chunk-DuIUmwWN.js → chunk-D3SUPUQT.js} +3 -3
  49. package/{chunk-C7pjkqKB.js → chunk-D3d-eReU.js} +1 -1
  50. package/chunk-D5031IDL.js +3 -0
  51. package/{chunk-khm9J_G0.js → chunk-D7AP6g7S.js} +1 -1
  52. package/chunk-D9O-afXN.js +1 -0
  53. package/chunk-DA5X-TzJ.js +1 -0
  54. package/chunk-DAM-4k69.js +2 -0
  55. package/{chunk-Cgbi9MZq.js → chunk-DH6L3nQP.js} +1 -1
  56. package/chunk-DH6iiZWc.js +3 -0
  57. package/{chunk-D5lj-fQk.js → chunk-DKacf9Tj.js} +1 -1
  58. package/{chunk-BzIY4AaX.js → chunk-DKwqdnLJ.js} +1 -1
  59. package/{chunk-CJ0GoaW1.js → chunk-DNUCXG8E.js} +1 -1
  60. package/chunk-DPpQ_8VM.js +1 -0
  61. package/chunk-Da2vs6ff.js +1 -0
  62. package/chunk-DfcHtA-G.js +1 -0
  63. package/chunk-DlTsXgG2.js +2 -0
  64. package/{chunk-DaGzYsVs.js → chunk-DlqfMbsZ.js} +1 -1
  65. package/chunk-DoYGADYB.js +1 -0
  66. package/{chunk-RQ_MoiOh.js → chunk-DuHXCtrV.js} +1 -1
  67. package/{chunk-CT9ziigM.js → chunk-DuTbfCdT.js} +2 -2
  68. package/{chunk-dmyIQdVx.js → chunk-EwTTC1EW.js} +1 -1
  69. package/{chunk-I0R6Ty-p.js → chunk-JMkz2RrF.js} +1 -1
  70. package/chunk-PGDvGDW-.js +1 -0
  71. package/{chunk-CRAg6SRo.js → chunk-PONAC1Ya.js} +1 -1
  72. package/chunk-RqvNv7T_.js +2 -0
  73. package/{chunk-DFEb6rgg.js → chunk-SycSMD-r.js} +2 -2
  74. package/chunk-U0VOUPLl.js +1 -0
  75. package/chunk-Z5fN6CGR.js +1 -0
  76. package/chunk-d4cdVCUg.js +2 -0
  77. package/{chunk-DN6f5jXR.js → chunk-dCFVYHva.js} +1 -1
  78. package/{chunk-D6aNT_wo.js → chunk-gaP3Sx_C.js} +1 -1
  79. package/chunk-mnaJWx8D.js +1 -0
  80. package/chunk-oTpkLrqH.js +1 -0
  81. package/chunk-tpJJunhQ.js +1 -0
  82. package/index.html +1 -1
  83. package/locale/messages.de.json +1 -1
  84. package/locale/messages.de_CH.json +1 -1
  85. package/locale/messages.de_DE.json +1 -1
  86. package/locale/messages.en.json +65 -1
  87. package/locale/messages.fr.json +1 -1
  88. package/locale/messages.fr_CA.json +1 -1
  89. package/locale/messages.fr_FR.json +1 -1
  90. package/locale/messages.it.json +95 -2
  91. package/locale/messages.it_IT.json +94 -1
  92. package/locale/messages.json +65 -1
  93. package/locale/messages.nl_BE.json +1 -1
  94. package/locale/messages.nl_NL.json +1 -1
  95. package/locale/messages.zh_HK.json +152 -8
  96. package/main-QLXVXD6E.js +16 -0
  97. package/package.json +1 -1
  98. package/chunk-3RXp81pP.js +0 -1
  99. package/chunk-B0RBkC1E.js +0 -1
  100. package/chunk-BB1pOOUx.js +0 -1
  101. package/chunk-BIL3nR4_.js +0 -2
  102. package/chunk-BOOAIFTC.js +0 -1
  103. package/chunk-BaGYaLxZ.js +0 -2
  104. package/chunk-Bceym75m.js +0 -1
  105. package/chunk-BfZh4DNq.js +0 -2
  106. package/chunk-BlSN71kd.js +0 -1
  107. package/chunk-Bq7wRTmy.js +0 -2
  108. package/chunk-ByhuT4BS.js +0 -14
  109. package/chunk-CBgNjPex.js +0 -1
  110. package/chunk-CEyp0Xmg.js +0 -1
  111. package/chunk-CFne6FXR.js +0 -1
  112. package/chunk-CGn_EA_5.js +0 -2
  113. package/chunk-CJ1mxauG.js +0 -2
  114. package/chunk-CMJCX33P.js +0 -1
  115. package/chunk-CWAvlP_u.js +0 -1
  116. package/chunk-CYQJGwsB.js +0 -1
  117. package/chunk-Ca-HIRNP.js +0 -1
  118. package/chunk-CegwkGVu.js +0 -3
  119. package/chunk-CgcnOoRq.js +0 -2
  120. package/chunk-Ck9c9Juw.js +0 -1
  121. package/chunk-CnRCpl-v.js +0 -2
  122. package/chunk-CrgyDps4.js +0 -1
  123. package/chunk-DDBflo2l.js +0 -4
  124. package/chunk-Df7q8ewK.js +0 -1
  125. package/chunk-Dgns65Zu.js +0 -2
  126. package/chunk-Dh6x3lXP.js +0 -2
  127. package/chunk-DipTNkHN.js +0 -1
  128. package/chunk-DkdGEw1e.js +0 -1
  129. package/chunk-DtdFhFa9.js +0 -1
  130. package/chunk-DwKPz2Gn.js +0 -3
  131. package/chunk-DwMhABnQ.js +0 -2
  132. package/chunk-HWQc1Hoa.js +0 -1
  133. package/chunk-LL0IHZns.js +0 -1
  134. package/chunk-Zo-grJt3.js +0 -1
  135. package/chunk-glhLCQrb.js +0 -1
  136. package/chunk-yF6CJHRg.js +0 -1
  137. package/main-KFKZO6SJ.js +0 -16
@@ -1,2 +1,2 @@
1
- import {e as ee}from'./chunk-B0RBkC1E.js';import'./chunk-BB1pOOUx.js';import'./chunk-DN6f5jXR.js';import'./chunk-3RXp81pP.js';import {r as rt,n as nn,s as st,Y as Yt,e as en}from'./chunk-ByhuT4BS.js';import'./chunk-C4kBXz3C.js';import'./chunk-Dh6x3lXP.js';import'./chunk-DD_QfWih.js';import'./chunk-khm9J_G0.js';import'./chunk-wyNyzSXi.js';import {h,G,V}from'./chunk-CegwkGVu.js';import'./chunk-CT9ziigM.js';import'./chunk-D5lj-fQk.js';import'./chunk-D6aNT_wo.js';import {c}from'./chunk-OLi7f6y7.js';import'./chunk-B2TXzbpy.js';import {T,a5 as g,a6 as be$1,B as y1,U as Ue$1,N as Nt,G as Ga,at as h$1,d as dw,v,f as N,j as mg,Q as Qi,o as oT,H as Hl,D as DE,i as iT,t as tC,$ as $g,K as lC,X as XT,n as nC,k as gT,F as Fg,S as Sd,x as xd,q as PC,O as Og,P as Pg,au as Lg,av as eC,I as Qg,z as gg,a1 as cT,ap as sT,a2 as lT,s as sm,l as HC,p as DD,w as im,y as TD,E as nm}from'./main-KFKZO6SJ.js';import {f}from'./chunk-DPNAj9Vc.js';import {d}from'./chunk-CRAg6SRo.js';import {F as Fe$1}from'./chunk-DuIUmwWN.js';import {B as Bn,Z as Ze,R as Rn,J as Jt}from'./chunk-DipTNkHN.js';import'./chunk-Fw6nFDZK.js';import'./chunk-Ca1C9pJ0.js';import'./chunk-C-NgIZiF.js';import'./chunk-PVmXLw9b.js';import'./chunk-C7pjkqKB.js';function Ee(n,t){n&1&&(Qi(0,"div",13),mg(1,"sh-progress-bar",14),Qi(2,"div",15)(3,"h3"),XT(4,2),Hl()()());}function Fe(n,t){n&1&&(Qi(0,"sh-divider"),XT(1,5),Hl());}function Ie(n,t){if(n&1&&(Qi(0,"p",20),PC(1),Hl()),n&2){let e=nC().$implicit;DE(),nm(e.Description);}}function Ne(n,t){if(n&1&&(Qi(0,"p",20),PC(1),Hl()),n&2){let e=nC().$implicit,o=nC(3);DE(),nm(o.getSimplePath(e.BaseUrl));}}function ye(n,t){if(n&1){let e=gT();Qi(0,"button",25),Fg("click",function(i){Sd(e);let r=nC().$implicit,f=nC(3);return xd(f.updateBackupsSync(r,i))}),PC(1," Update backups "),Hl();}if(n&2){let e=nC(4);gg("disabled",e.isSaving());}}function he(n,t){if(n&1){let e=gT();Qi(0,"app-destination-list-item",18),Fg("click",function(){let i=Sd(e).$implicit,r=nC(3);return xd(r.selectDestination(i))}),Qi(1,"h3",19),PC(2),Hl(),oT(3,Ie,2,1,"p",20)(4,Ne,2,1,"p",20),Qi(5,"div",21),oT(6,ye,2,1,"button",22),Qi(7,"button",23),Fg("click",function(i){let r=Sd(e).$implicit,f=nC(3);return xd(f.deleteDestination(r.ID,i))}),Qi(8,"sh-icon"),PC(9,"trash"),Hl()(),Qi(10,"button",24),Og(11,6),mg(12,"sh-icon"),Pg(),Hl()()();}if(n&2){let e=t.$implicit,o=nC(3);gg("targetUrl",e.BaseUrl),DE(2),nm(e.Name||e.BaseUrl),DE(),iT(e.Description?3:4),DE(3),iT(o.isOutOfSync(e)?6:-1);}}function Oe(n,t){if(n&1){let e=gT();Qi(0,"sh-card",16),Fg("click",function(){Sd(e);let i=nC(2);return xd(i.selectDestination("new"))})("keydown.enter",function(i){return i.target.click()})("keydown.space",function(i){return i.target.click()}),Qi(1,"sh-icon"),PC(2,"plus-circle"),Hl(),Qi(3,"div",15)(4,"h3"),XT(5,3),Hl(),Qi(6,"p"),XT(7,4),Hl()()(),oT(8,Fe,2,0,"sh-divider"),cT(9,he,13,4,"app-destination-list-item",17,sT);}if(n&2){let e=nC(2);DE(8),iT(e.destinations().length>0?8:-1),DE(),lT(e.destinations());}}function xe(n,t){if(n&1&&(Qi(0,"h2"),XT(1,1),Hl(),oT(2,Ee,5,0,"div",13)(3,Oe,11,1)),n&2){let e=nC();DE(2),iT(e.isLoading()?2:3);}}function Be(n,t){n&1&&XT(0,10,1);}function Pe(n,t){n&1&&XT(0,10,2);}function Ae(n,t){n&1&&XT(0,10,3);}function Me(n,t){if(n&1){let e=gT();Qi(0,"button",37),Fg("click",function(){Sd(e);let i=nC(2);return xd(i.testDestination())}),Og(1,10),oT(2,Be,1,0)(3,Pe,1,0)(4,Ae,1,0),Pg(),Hl();}if(n&2){let e=nC(2);gg("disabled",e.testSignal()=="testing"),DE(2),iT(e.testSignal()=="testing"?2:e.testResponse()?.action==="success"?3:4);}}function be(n,t){if(n&1){let e=gT();Qi(0,"div",32)(1,"sh-form-field")(2,"label"),XT(3,11),Hl(),Qi(4,"input",38),sm("ngModelChange",function(i){Sd(e);let r=nC(2);return HC(r.editName,i)||(r.editName=i),xd(i)}),Hl(),DD(),Hl()();}if(n&2){let e=nC(2);DE(4),im("ngModel",e.editName),TD();}}function $e(n,t){if(n&1){let e=gT();Qi(0,"app-test-url",39,0),sm("targetUrlChange",function(i){Sd(e);let r=nC(2);return HC(r.editBaseUrl,i)||(r.editBaseUrl=i),xd(i)})("testSignalChange",function(i){Sd(e);let r=nC(2);return HC(r.testSignal,i)||(r.testSignal=i),xd(i)}),Hl();}if(n&2){let e=nC(2);im("targetUrl",e.editBaseUrl)("testSignal",e.testSignal),gg("connectionStringId",e.selectedDestinationId())("backupId",null)("sourcePrefix",null)("suppressErrorDialogs",true)("askToCreate",true)("testExpectation","any")("readOnlyTest",false)("moduleType","Backend");}}function ke(n,t){if(n&1){let e=gT();Qi(0,"app-destination-list-item",40)(1,"button",41),Fg("click",function(){Sd(e);let i=nC(2);return xd(i.removeDestination())}),XT(2,12),Hl()(),Qi(3,"app-single-destination",42),sm("targetUrlChange",function(i){Sd(e);let r=nC(2);return HC(r.editBaseUrl,i)||(r.editBaseUrl=i),xd(i)}),Hl();}if(n&2){let e=nC(2);gg("targetUrl",e.editBaseUrl()),DE(3),im("targetUrl",e.editBaseUrl);}}function Re(n,t){if(n&1){let e=gT();Qi(0,"app-destination-list",43),Fg("setDestination",function(i){Sd(e);let r=nC(2);return xd(r.setDestination(i))}),Hl();}}function Le(n,t){n&1&&XT(0,9,1);}function we(n,t){n&1&&XT(0,9,2);}function Ue(n,t){n&1&&XT(0,9,3);}function ve(n,t){n&1&&XT(0,9,4);}function Ge(n,t){if(n&1){let e=gT();Qi(0,"header",26)(1,"button",23),Fg("click",function(){Sd(e);let i=nC();return xd(i.cancelEdit())}),Qi(2,"sh-icon"),PC(3,"arrow-left"),Hl()()(),Qi(4,"div",27)(5,"sh-card",28)(6,"header",29)(7,"h3"),XT(8,7),Hl(),Qi(9,"div",30),oT(10,Me,5,2,"button",31),Hl()(),oT(11,be,5,1,"div",32),oT(12,$e,2,10,"app-test-url",33),oT(13,ke,4,2)(14,Re,1,0,"app-destination-list"),Hl(),Qi(15,"div",34)(16,"button",35),Fg("click",function(){Sd(e);let i=nC();return xd(i.cancelEdit())}),XT(17,8),Hl(),Qi(18,"button",36),Fg("click",function(){Sd(e);let i=nC();return xd(i.testResponse()?.action==="success"||i.testResponse()?.action==="missing-folder"||!i.isUrlChanged()?i.save():i.testDestination())}),Og(19,9),oT(20,Le,1,0)(21,we,1,0)(22,Ue,1,0)(23,ve,1,0),Pg(),Hl()()();}if(n&2){let e=nC();DE(8),Lg(e.selectedDestination()==="new"?"New Destination":"Edit Destination"),eC(8),DE(2),iT(e.editBaseUrl()?10:-1),DE(),iT(e.selectedDestination()!=="new"?11:-1),DE(),iT(e.editBaseUrl()?12:-1),DE(),iT(e.editBaseUrl()?13:14),DE(5),Qg("primary",e.testResponse()?.action==="success"||!e.isUrlChanged())("warn",e.isUrlChanged()&&e.testSignal()===null||e.testSignal()==="testing"||e.testResponse()?.action==="missing-folder")("error",e.testResponse()&&e.testResponse()?.action!=="success"&&e.testResponse()?.action!=="missing-folder"),gg("disabled",!e.editBaseUrl()||e.isSaving()||e.testSignal()==="testing"),DE(2),iT(e.isSaving()?20:e.testSignal()==="testing"?21:e.testResponse()?.action==="success"||e.testResponse()?.action==="missing-folder"||!e.isUrlChanged()?22:23);}}var R=class n{#e=T(rt);#t=T(g);#n=T(be$1);getSimplePath=h;backups=this.#t.backups;constructor(){this.#t.getBackups();}isSaving=this.#e.isSaving;destinations=this.#e.destinations;isLoading=this.#e.resourceDestinations.isLoading;testUrl=y1(nn);selectedDestination=Ue$1(null);selectedDestinationId=Nt(()=>this.selectedDestination()!=="new"?this.selectedDestination().ID:null);editName=Ue$1(null);editDescription=Ue$1(null);editBaseUrl=Ue$1(null);initialBaseUrl=Ue$1(null);isUrlChanged=Nt(()=>{let t=this.editBaseUrl(),e=this.initialBaseUrl();return this.selectedDestination()==="new"?true:t!==e});testSignal=Ue$1(null);testResponse=Nt(()=>{let t=this.testSignal();return t&&typeof t!="string"?t:null});getOutOfSyncBackupIds(t){if(!t.Backups)return [];let e=new Map(this.backups().map(o=>[o.Backup?.ID,o.Backup]));return t.Backups.filter(o=>{let i=e.get(o.ID);return i&&i.TargetURL!==t.BaseUrl}).map(o=>o.ID).filter(o=>!!o)}isOutOfSync(t){return this.getOutOfSyncBackupIds(t).length>0}#i=Ga(()=>{this.editBaseUrl(),this.testSignal.set(null);});selectDestination(t){this.selectedDestination.set(t),this.testSignal.set(null),t==="new"?(this.editName.set(null),this.editDescription.set(null),this.editBaseUrl.set(null),this.initialBaseUrl.set(null)):(this.editName.set(t.Name),this.editDescription.set(t.Description),this.editBaseUrl.set(t.BaseUrl),this.initialBaseUrl.set(t.BaseUrl),this.#e.getById(t.ID).subscribe(e=>{e.Data&&(this.editName.set(e.Data.Name),this.editDescription.set(e.Data.Description),this.editBaseUrl.set(e.Data.BaseUrl??null),this.initialBaseUrl.set(e.Data.BaseUrl??null));}));}cancelEdit(){this.selectedDestination.set(null);}setDestination(t){let e=G(t??"");if(e){if(e.mapper.default){let o=e.mapper.default("");this.editBaseUrl.set(o);return}this.editBaseUrl.set(`${t}://`);}}removeDestination(){this.editBaseUrl.set(null);}async testDestination(){(await this.testUrl()?.testDestination(false))?.action==="missing-folder"&&this.promptCreateFolder();}promptCreateFolder(){this.#n.open(h$1,{data:{title:$localize`Folder missing`,message:$localize`The specified folder does not exist. Would you like to create it now?`,confirmText:$localize`Create Folder`,cancelText:$localize`Dismiss`},closed:t=>{t&&this.testUrl()?.createFolder();}});}save(){let t=this.selectedDestination();t&&this.performSave(t);}performSave(t){let e=this.editName(),o=this.editDescription(),i=this.editBaseUrl();if(t==="new"){let I=V(i??"")?.displayName??"Destination",y=this.destinations().filter(F=>F.Name?.startsWith(I)).length;e=`${I} #${y+1}`,o=null;}let r={Name:e,Description:o,BaseUrl:i};this.#e.save(t,r).subscribe(()=>{this.selectedDestination.set(null),this.#e.reload(),this.#t.getBackups(true);});}updateBackupsSync(t,e){e.stopPropagation();let o=this.getOutOfSyncBackupIds(t);this.#n.open(h$1,{data:{title:$localize`Update backups`,message:$localize`Are you sure you want to update ${o.length} backup(s) to use the current connection string?`,confirmText:$localize`Update`,cancelText:$localize`Cancel`},closed:i=>{i&&this.#e.updateBackups(t.ID,o).subscribe(()=>{this.#e.reload(),this.#t.getBackups(true);});}});}deleteDestination(t,e){e.stopPropagation(),this.#n.open(h$1,{data:{title:$localize`Delete destination`,message:$localize`Are you sure you want to delete this destination?`,confirmText:$localize`Delete`,confirmVariant:"error",cancelText:$localize`Cancel`},closed:o=>{o&&this.#e.delete(t).subscribe(()=>{this.#e.reload();});}});}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=dw({type:n,selectors:[["app-destinations"]],viewQuery:function(e,o){e&1&&$g(o.testUrl,nn,5),e&2&&lC();},decls:4,vars:1,consts:()=>{let t;t=$localize`Destinations`;let e;e=$localize`Loading destinations...`;let o;o=$localize`Add new destination`;let i;i=$localize`Configure a new storage location.`;let r;r=$localize`Or manage your saved destinations`;let f;f=$localize` Manage ${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON:`;let I;I=$localize`${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let y;y=$localize`Cancel`;let F;F=$localize`${"\uFFFD*20:1\uFFFD"}:START_BLOCK_IF: Saving... ${"\uFFFD/*20:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*21:2\uFFFD"}:START_BLOCK_ELSE_IF: Testing... ${"[\uFFFD/*21:2\uFFFD|\uFFFD/*22:3\uFFFD]"}:CLOSE_BLOCK_ELSE_IF:${"\uFFFD*22:3\uFFFD"}:START_BLOCK_ELSE_IF_1: Save Destination ${"[\uFFFD/*21:2\uFFFD|\uFFFD/*22:3\uFFFD]"}:CLOSE_BLOCK_ELSE_IF:${"\uFFFD*23:4\uFFFD"}:START_BLOCK_ELSE: Test & Save ${"\uFFFD/*23:4\uFFFD"}:CLOSE_BLOCK_ELSE:`,F=tC(F);let L;L=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF: Testing... ${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE_IF: Retry test ${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE_IF:${"\uFFFD*4:3\uFFFD"}:START_BLOCK_ELSE: Test destination ${"\uFFFD/*4:3\uFFFD"}:CLOSE_BLOCK_ELSE:`;let w;w=$localize`Name`;let U;U=$localize`Name`;let v;return v=$localize`Change`,[["testUrl",""],t,e,o,i,r,f,I,y,F,L,U,v,[1,"loading-list"],[1,"indeterminate","primary"],[1,"text"],["tabindex","0",1,"type-a","actionable","add-new",3,"click","keydown.enter","keydown.space"],["variant","type-a",1,"actionable",3,"targetUrl"],["variant","type-a",1,"actionable",3,"click","targetUrl"],["displayName",""],["description",""],[1,"manage-actions"],["shButton","","type","button",1,"small","raised","primary",3,"disabled"],["shButton","","iconOnly","","type","button",1,"ghost",3,"click"],["shButton","","type","button",1,"manage-btn"],["shButton","","type","button",1,"small","raised","primary",3,"click","disabled"],[1,"edit-header"],[1,"edit-form"],[1,"config-section","type-c"],[1,"dest-config-header"],[1,"actions"],["shButton","","type","button",1,"small","ghost",3,"disabled"],[1,"form-row"],[3,"targetUrl","testSignal","connectionStringId","backupId","sourcePrefix","suppressErrorDialogs","askToCreate","testExpectation","readOnlyTest","moduleType"],[1,"form-footer"],["shButton","","type","button",3,"click"],["shButton","","type","button",1,"raised",3,"click","disabled"],["shButton","","type","button",1,"small","ghost",3,"click","disabled"],["placeholder",w,3,"ngModelChange","ngModel"],[3,"targetUrlChange","testSignalChange","targetUrl","testSignal","connectionStringId","backupId","sourcePrefix","suppressErrorDialogs","askToCreate","testExpectation","readOnlyTest","moduleType"],[1,"selected-backend",3,"targetUrl"],["shButton","","type","button",1,"ghost",3,"click"],[3,"targetUrlChange","targetUrl"],[3,"setDestination"]]},template:function(e,o){e&1&&(mg(0,"app-status-bar"),Qi(1,"section"),oT(2,xe,4,1)(3,Ge,24,13),Hl()),e&2&&(DE(2),iT(o.selectedDestination()===null?2:3));},dependencies:[st,Yt,en,ee,d,v,N,f,Fe$1,c,nn,Bn,Ze,Rn,Jt],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{max-width:43.75rem;margin:0 auto;padding:2rem 1rem;display:flex;flex-direction:column;gap:1rem}h2[_ngcontent-%COMP%]{font:var(--title-30);text-align:center;padding:2rem}h3[_ngcontent-%COMP%]{font:var(--paragraph-10)}.actionable[_ngcontent-%COMP%]{cursor:pointer}.actionable[_ngcontent-%COMP%]:after{transition:inset .1s linear}.actionable[_ngcontent-%COMP%]:hover{--card-shp: 0}.custom-info[_ngcontent-%COMP%]{flex:1}.custom-info[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--body-10);color:var(--base-7);margin:.25rem 0 0}.manage-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}@media(max-width:600px){.manage-actions[_ngcontent-%COMP%] .manage-btn[_ngcontent-%COMP%]{display:none}}.add-new[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1.5rem;padding:1.5rem;background:var(--base-1);color:var(--primary-8)}.add-new[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:2.5rem;opacity:.8}.edit-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;margin-bottom:.5rem}.edit-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.edit-form[_ngcontent-%COMP%] .form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr;gap:1rem;margin-bottom:1.5rem}@media(max-width:600px){.edit-form[_ngcontent-%COMP%] .form-row[_ngcontent-%COMP%]{grid-template-columns:1fr}}.edit-form[_ngcontent-%COMP%] .config-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding:1.5rem}.edit-form[_ngcontent-%COMP%] .config-section[_ngcontent-%COMP%] .dest-config-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.edit-form[_ngcontent-%COMP%] .form-footer[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:1rem;margin-top:1rem;padding-top:1.5rem;border-top:1px solid var(--base-3)}.selected-backend[_ngcontent-%COMP%]{margin-bottom:.5rem}.loading-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;align-items:center;padding:4rem}.loading-list[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{text-align:center}"]})};
1
+ import {e as ee}from'./chunk-CzJ3-6Pu.js';import'./chunk-oTpkLrqH.js';import'./chunk-dCFVYHva.js';import'./chunk--kVw-BwM.js';import {s as st,o as on,l as lt,Q as Qt,t as tn}from'./chunk-BC2-YuwH.js';import'./chunk-BFfFD-XE.js';import'./chunk-CmexLvf7.js';import'./chunk-Bgx4dtaL.js';import'./chunk-D7AP6g7S.js';import'./chunk-CQv4eyEK.js';import {h,G,V}from'./chunk-DH6iiZWc.js';import'./chunk-DuTbfCdT.js';import'./chunk-DKacf9Tj.js';import'./chunk-gaP3Sx_C.js';import {c}from'./chunk-CI8lsvKT.js';import'./chunk-C5p3bQwH.js';import {T,a5 as g,a6 as be$1,E as D1,G as Ge$1,N as Nt,z as za,at as h$1,h as hw,v,d as N,j as vg,Q as Qi,f as aT,$ as $l,C as CE,i as cT,o as oC,W as Wg,K as fC,n as nC,k as iC,l as vT,V as Vg,r as kd,O as Od,w as jC,L as Lg,F as Fg,au as jg,av as rC,Y as Yg,A as yg,a1 as dT,ap as lT,a2 as fT,p as cm,U as UC,s as CD,x as am,y as _D,J as om}from'./main-QLXVXD6E.js';import {f}from'./chunk-C3KPTLNN.js';import {d}from'./chunk-PONAC1Ya.js';import {F as Fe$1}from'./chunk-D3SUPUQT.js';import {B as Bn,Z as Ze,R as Rn,J as Jt}from'./chunk-DoYGADYB.js';import'./chunk-Crs56mDy.js';import'./chunk-Bcxzhjj8.js';import'./chunk-BYJ0fSUP.js';import'./chunk-D2aWqPl_.js';import'./chunk-D3d-eReU.js';function Ee(n,t){n&1&&(Qi(0,"div",13),vg(1,"sh-progress-bar",14),Qi(2,"div",15)(3,"h3"),nC(4,2),$l()()());}function Fe(n,t){n&1&&(Qi(0,"sh-divider"),nC(1,5),$l());}function Ie(n,t){if(n&1&&(Qi(0,"p",20),jC(1),$l()),n&2){let e=iC().$implicit;CE(),om(e.Description);}}function Ne(n,t){if(n&1&&(Qi(0,"p",20),jC(1),$l()),n&2){let e=iC().$implicit,o=iC(3);CE(),om(o.getSimplePath(e.BaseUrl));}}function ye(n,t){if(n&1){let e=vT();Qi(0,"button",25),Vg("click",function(i){kd(e);let r=iC().$implicit,f=iC(3);return Od(f.updateBackupsSync(r,i))}),jC(1," Update backups "),$l();}if(n&2){let e=iC(4);yg("disabled",e.isSaving());}}function he(n,t){if(n&1){let e=vT();Qi(0,"app-destination-list-item",18),Vg("click",function(){let i=kd(e).$implicit,r=iC(3);return Od(r.selectDestination(i))}),Qi(1,"h3",19),jC(2),$l(),aT(3,Ie,2,1,"p",20)(4,Ne,2,1,"p",20),Qi(5,"div",21),aT(6,ye,2,1,"button",22),Qi(7,"button",23),Vg("click",function(i){let r=kd(e).$implicit,f=iC(3);return Od(f.deleteDestination(r.ID,i))}),Qi(8,"sh-icon"),jC(9,"trash"),$l()(),Qi(10,"button",24),Lg(11,6),vg(12,"sh-icon"),Fg(),$l()()();}if(n&2){let e=t.$implicit,o=iC(3);yg("targetUrl",e.BaseUrl),CE(2),om(e.Name||e.BaseUrl),CE(),cT(e.Description?3:4),CE(3),cT(o.isOutOfSync(e)?6:-1);}}function Oe(n,t){if(n&1){let e=vT();Qi(0,"sh-card",16),Vg("click",function(){kd(e);let i=iC(2);return Od(i.selectDestination("new"))})("keydown.enter",function(i){return i.target.click()})("keydown.space",function(i){return i.target.click()}),Qi(1,"sh-icon"),jC(2,"plus-circle"),$l(),Qi(3,"div",15)(4,"h3"),nC(5,3),$l(),Qi(6,"p"),nC(7,4),$l()()(),aT(8,Fe,2,0,"sh-divider"),dT(9,he,13,4,"app-destination-list-item",17,lT);}if(n&2){let e=iC(2);CE(8),cT(e.destinations().length>0?8:-1),CE(),fT(e.destinations());}}function xe(n,t){if(n&1&&(Qi(0,"h2"),nC(1,1),$l(),aT(2,Ee,5,0,"div",13)(3,Oe,11,1)),n&2){let e=iC();CE(2),cT(e.isLoading()?2:3);}}function Be(n,t){n&1&&nC(0,10,1);}function Pe(n,t){n&1&&nC(0,10,2);}function Ae(n,t){n&1&&nC(0,10,3);}function Me(n,t){if(n&1){let e=vT();Qi(0,"button",37),Vg("click",function(){kd(e);let i=iC(2);return Od(i.testDestination())}),Lg(1,10),aT(2,Be,1,0)(3,Pe,1,0)(4,Ae,1,0),Fg(),$l();}if(n&2){let e=iC(2);yg("disabled",e.testSignal()=="testing"),CE(2),cT(e.testSignal()=="testing"?2:e.testResponse()?.action==="success"?3:4);}}function be(n,t){if(n&1){let e=vT();Qi(0,"div",32)(1,"sh-form-field")(2,"label"),nC(3,11),$l(),Qi(4,"input",38),cm("ngModelChange",function(i){kd(e);let r=iC(2);return UC(r.editName,i)||(r.editName=i),Od(i)}),$l(),CD(),$l()();}if(n&2){let e=iC(2);CE(4),am("ngModel",e.editName),_D();}}function $e(n,t){if(n&1){let e=vT();Qi(0,"app-test-url",39,0),cm("targetUrlChange",function(i){kd(e);let r=iC(2);return UC(r.editBaseUrl,i)||(r.editBaseUrl=i),Od(i)})("testSignalChange",function(i){kd(e);let r=iC(2);return UC(r.testSignal,i)||(r.testSignal=i),Od(i)}),$l();}if(n&2){let e=iC(2);am("targetUrl",e.editBaseUrl)("testSignal",e.testSignal),yg("connectionStringId",e.selectedDestinationId())("backupId",null)("sourcePrefix",null)("suppressErrorDialogs",true)("askToCreate",true)("testExpectation","any")("readOnlyTest",false)("moduleType","Backend");}}function ke(n,t){if(n&1){let e=vT();Qi(0,"app-destination-list-item",40)(1,"button",41),Vg("click",function(){kd(e);let i=iC(2);return Od(i.removeDestination())}),nC(2,12),$l()(),Qi(3,"app-single-destination",42),cm("targetUrlChange",function(i){kd(e);let r=iC(2);return UC(r.editBaseUrl,i)||(r.editBaseUrl=i),Od(i)}),$l();}if(n&2){let e=iC(2);yg("targetUrl",e.editBaseUrl()),CE(3),am("targetUrl",e.editBaseUrl);}}function Re(n,t){if(n&1){let e=vT();Qi(0,"app-destination-list",43),Vg("setDestination",function(i){kd(e);let r=iC(2);return Od(r.setDestination(i))}),$l();}}function Le(n,t){n&1&&nC(0,9,1);}function we(n,t){n&1&&nC(0,9,2);}function Ue(n,t){n&1&&nC(0,9,3);}function ve(n,t){n&1&&nC(0,9,4);}function Ge(n,t){if(n&1){let e=vT();Qi(0,"header",26)(1,"button",23),Vg("click",function(){kd(e);let i=iC();return Od(i.cancelEdit())}),Qi(2,"sh-icon"),jC(3,"arrow-left"),$l()()(),Qi(4,"div",27)(5,"sh-card",28)(6,"header",29)(7,"h3"),nC(8,7),$l(),Qi(9,"div",30),aT(10,Me,5,2,"button",31),$l()(),aT(11,be,5,1,"div",32),aT(12,$e,2,10,"app-test-url",33),aT(13,ke,4,2)(14,Re,1,0,"app-destination-list"),$l(),Qi(15,"div",34)(16,"button",35),Vg("click",function(){kd(e);let i=iC();return Od(i.cancelEdit())}),nC(17,8),$l(),Qi(18,"button",36),Vg("click",function(){kd(e);let i=iC();return Od(i.testResponse()?.action==="success"||i.testResponse()?.action==="missing-folder"||!i.isUrlChanged()?i.save():i.testDestination())}),Lg(19,9),aT(20,Le,1,0)(21,we,1,0)(22,Ue,1,0)(23,ve,1,0),Fg(),$l()()();}if(n&2){let e=iC();CE(8),jg(e.selectedDestination()==="new"?"New Destination":"Edit Destination"),rC(8),CE(2),cT(e.editBaseUrl()?10:-1),CE(),cT(e.selectedDestination()!=="new"?11:-1),CE(),cT(e.editBaseUrl()?12:-1),CE(),cT(e.editBaseUrl()?13:14),CE(5),Yg("primary",e.testResponse()?.action==="success"||!e.isUrlChanged())("warn",e.isUrlChanged()&&e.testSignal()===null||e.testSignal()==="testing"||e.testResponse()?.action==="missing-folder")("error",e.testResponse()&&e.testResponse()?.action!=="success"&&e.testResponse()?.action!=="missing-folder"),yg("disabled",!e.editBaseUrl()||e.isSaving()||e.testSignal()==="testing"),CE(2),cT(e.isSaving()?20:e.testSignal()==="testing"?21:e.testResponse()?.action==="success"||e.testResponse()?.action==="missing-folder"||!e.isUrlChanged()?22:23);}}var R=class n{#e=T(st);#t=T(g);#n=T(be$1);getSimplePath=h;backups=this.#t.backups;constructor(){this.#t.getBackups();}isSaving=this.#e.isSaving;destinations=this.#e.destinations;isLoading=this.#e.resourceDestinations.isLoading;testUrl=D1(on);selectedDestination=Ge$1(null);selectedDestinationId=Nt(()=>this.selectedDestination()!=="new"?this.selectedDestination().ID:null);editName=Ge$1(null);editDescription=Ge$1(null);editBaseUrl=Ge$1(null);initialBaseUrl=Ge$1(null);isUrlChanged=Nt(()=>{let t=this.editBaseUrl(),e=this.initialBaseUrl();return this.selectedDestination()==="new"?true:t!==e});testSignal=Ge$1(null);testResponse=Nt(()=>{let t=this.testSignal();return t&&typeof t!="string"?t:null});getOutOfSyncBackupIds(t){if(!t.Backups)return [];let e=new Map(this.backups().map(o=>[o.Backup?.ID,o.Backup]));return t.Backups.filter(o=>{let i=e.get(o.ID);return i&&i.TargetURL!==t.BaseUrl}).map(o=>o.ID).filter(o=>!!o)}isOutOfSync(t){return this.getOutOfSyncBackupIds(t).length>0}#i=za(()=>{this.editBaseUrl(),this.testSignal.set(null);});selectDestination(t){this.selectedDestination.set(t),this.testSignal.set(null),t==="new"?(this.editName.set(null),this.editDescription.set(null),this.editBaseUrl.set(null),this.initialBaseUrl.set(null)):(this.editName.set(t.Name),this.editDescription.set(t.Description),this.editBaseUrl.set(t.BaseUrl),this.initialBaseUrl.set(t.BaseUrl),this.#e.getById(t.ID).subscribe(e=>{e.Data&&(this.editName.set(e.Data.Name),this.editDescription.set(e.Data.Description),this.editBaseUrl.set(e.Data.BaseUrl??null),this.initialBaseUrl.set(e.Data.BaseUrl??null));}));}cancelEdit(){this.selectedDestination.set(null);}setDestination(t){let e=G(t??"");if(e){if(e.mapper.default){let o=e.mapper.default("");this.editBaseUrl.set(o);return}this.editBaseUrl.set(`${t}://`);}}removeDestination(){this.editBaseUrl.set(null);}async testDestination(){(await this.testUrl()?.testDestination(false))?.action==="missing-folder"&&this.promptCreateFolder();}promptCreateFolder(){this.#n.open(h$1,{data:{title:$localize`Folder missing`,message:$localize`The specified folder does not exist. Would you like to create it now?`,confirmText:$localize`Create Folder`,cancelText:$localize`Dismiss`},closed:t=>{t&&this.testUrl()?.createFolder();}});}save(){let t=this.selectedDestination();t&&this.performSave(t);}performSave(t){let e=this.editName(),o=this.editDescription(),i=this.editBaseUrl();if(t==="new"){let I=V(i??"")?.displayName??"Destination",y=this.destinations().filter(F=>F.Name?.startsWith(I)).length;e=`${I} #${y+1}`,o=null;}let r={Name:e,Description:o,BaseUrl:i};this.#e.save(t,r).subscribe(()=>{this.selectedDestination.set(null),this.#e.reload(),this.#t.getBackups(true);});}updateBackupsSync(t,e){e.stopPropagation();let o=this.getOutOfSyncBackupIds(t);this.#n.open(h$1,{data:{title:$localize`Update backups`,message:$localize`Are you sure you want to update ${o.length} backup(s) to use the current connection string?`,confirmText:$localize`Update`,cancelText:$localize`Cancel`},closed:i=>{i&&this.#e.updateBackups(t.ID,o).subscribe(()=>{this.#e.reload(),this.#t.getBackups(true);});}});}deleteDestination(t,e){e.stopPropagation(),this.#n.open(h$1,{data:{title:$localize`Delete destination`,message:$localize`Are you sure you want to delete this destination?`,confirmText:$localize`Delete`,confirmVariant:"error",cancelText:$localize`Cancel`},closed:o=>{o&&this.#e.delete(t).subscribe(()=>{this.#e.reload();});}});}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=hw({type:n,selectors:[["app-destinations"]],viewQuery:function(e,o){e&1&&Wg(o.testUrl,on,5),e&2&&fC();},decls:4,vars:1,consts:()=>{let t;t=$localize`Destinations`;let e;e=$localize`Loading destinations...`;let o;o=$localize`Add new destination`;let i;i=$localize`Configure a new storage location.`;let r;r=$localize`Or manage your saved destinations`;let f;f=$localize` Manage ${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON:`;let I;I=$localize`${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let y;y=$localize`Cancel`;let F;F=$localize`${"\uFFFD*20:1\uFFFD"}:START_BLOCK_IF: Saving... ${"\uFFFD/*20:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*21:2\uFFFD"}:START_BLOCK_ELSE_IF: Testing... ${"[\uFFFD/*21:2\uFFFD|\uFFFD/*22:3\uFFFD]"}:CLOSE_BLOCK_ELSE_IF:${"\uFFFD*22:3\uFFFD"}:START_BLOCK_ELSE_IF_1: Save Destination ${"[\uFFFD/*21:2\uFFFD|\uFFFD/*22:3\uFFFD]"}:CLOSE_BLOCK_ELSE_IF:${"\uFFFD*23:4\uFFFD"}:START_BLOCK_ELSE: Test & Save ${"\uFFFD/*23:4\uFFFD"}:CLOSE_BLOCK_ELSE:`,F=oC(F);let L;L=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF: Testing... ${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE_IF: Retry test ${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE_IF:${"\uFFFD*4:3\uFFFD"}:START_BLOCK_ELSE: Test destination ${"\uFFFD/*4:3\uFFFD"}:CLOSE_BLOCK_ELSE:`;let w;w=$localize`Name`;let U;U=$localize`Name`;let v;return v=$localize`Change`,[["testUrl",""],t,e,o,i,r,f,I,y,F,L,U,v,[1,"loading-list"],[1,"indeterminate","primary"],[1,"text"],["tabindex","0",1,"type-a","actionable","add-new",3,"click","keydown.enter","keydown.space"],["variant","type-a",1,"actionable",3,"targetUrl"],["variant","type-a",1,"actionable",3,"click","targetUrl"],["displayName",""],["description",""],[1,"manage-actions"],["shButton","","type","button",1,"small","raised","primary",3,"disabled"],["shButton","","iconOnly","","type","button",1,"ghost",3,"click"],["shButton","","type","button",1,"manage-btn"],["shButton","","type","button",1,"small","raised","primary",3,"click","disabled"],[1,"edit-header"],[1,"edit-form"],[1,"config-section","type-c"],[1,"dest-config-header"],[1,"actions"],["shButton","","type","button",1,"small","ghost",3,"disabled"],[1,"form-row"],[3,"targetUrl","testSignal","connectionStringId","backupId","sourcePrefix","suppressErrorDialogs","askToCreate","testExpectation","readOnlyTest","moduleType"],[1,"form-footer"],["shButton","","type","button",3,"click"],["shButton","","type","button",1,"raised",3,"click","disabled"],["shButton","","type","button",1,"small","ghost",3,"click","disabled"],["placeholder",w,3,"ngModelChange","ngModel"],[3,"targetUrlChange","testSignalChange","targetUrl","testSignal","connectionStringId","backupId","sourcePrefix","suppressErrorDialogs","askToCreate","testExpectation","readOnlyTest","moduleType"],[1,"selected-backend",3,"targetUrl"],["shButton","","type","button",1,"ghost",3,"click"],[3,"targetUrlChange","targetUrl"],[3,"setDestination"]]},template:function(e,o){e&1&&(vg(0,"app-status-bar"),Qi(1,"section"),aT(2,xe,4,1)(3,Ge,24,13),$l()),e&2&&(CE(2),cT(o.selectedDestination()===null?2:3));},dependencies:[lt,Qt,tn,ee,d,v,N,f,Fe$1,c,on,Bn,Ze,Rn,Jt],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{max-width:43.75rem;margin:0 auto;padding:2rem 1rem;display:flex;flex-direction:column;gap:1rem}h2[_ngcontent-%COMP%]{font:var(--title-30);text-align:center;padding:2rem}h3[_ngcontent-%COMP%]{font:var(--paragraph-10)}.actionable[_ngcontent-%COMP%]{cursor:pointer}.actionable[_ngcontent-%COMP%]:after{transition:inset .1s linear}.actionable[_ngcontent-%COMP%]:hover{--card-shp: 0}.custom-info[_ngcontent-%COMP%]{flex:1}.custom-info[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--body-10);color:var(--base-7);margin:.25rem 0 0}.manage-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}@media(max-width:600px){.manage-actions[_ngcontent-%COMP%] .manage-btn[_ngcontent-%COMP%]{display:none}}.add-new[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1.5rem;padding:1.5rem;background:var(--base-1);color:var(--primary-8)}.add-new[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:2.5rem;opacity:.8}.edit-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;margin-bottom:.5rem}.edit-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.edit-form[_ngcontent-%COMP%] .form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr;gap:1rem;margin-bottom:1.5rem}@media(max-width:600px){.edit-form[_ngcontent-%COMP%] .form-row[_ngcontent-%COMP%]{grid-template-columns:1fr}}.edit-form[_ngcontent-%COMP%] .config-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding:1.5rem}.edit-form[_ngcontent-%COMP%] .config-section[_ngcontent-%COMP%] .dest-config-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.edit-form[_ngcontent-%COMP%] .form-footer[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:1rem;margin-top:1rem;padding-top:1.5rem;border-top:1px solid var(--base-3)}.selected-backend[_ngcontent-%COMP%]{margin-bottom:.5rem}.loading-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;align-items:center;padding:4rem}.loading-list[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{text-align:center}"]})};
2
2
  export{R as default};
@@ -0,0 +1,3 @@
1
+ import {j as jn,m as me}from'./chunk-DoYGADYB.js';import {aj as l$1,T,ab as C,ax as De,I,N as Nt,aG as pt,az as t,aZ as ee$1,G as Ge,ai as m$1,H as qu,c0 as n$1}from'./main-QLXVXD6E.js';var y=class{constructor(t){this.loader=t;}loader;_data=Ge(void 0);_isLoading=false;_loaded=false;load(){return !this._loaded&&!this._isLoading&&(this._isLoading=true,this.loader().pipe(qu(()=>this._isLoading=false)).subscribe(t=>{this._data.set(t),this._loaded=true;})),this._data.asReadonly()}value(){return this._data.asReadonly()}isLoading(){return this._isLoading}isLoaded(){return this._loaded}reset(){this._data.set(void 0),this._loaded=false;}};function K(e){return !("personalLicensedUser"in e)}function q(e){if(K(e))return m$1(l$1({},e),{personal:e.personal,personalLicensedUser:null,personalUnlicensedUser:null});let s=e,{personalLicensedUser:t,personalUnlicensedUser:o}=s,r=n$1(s,["personalLicensedUser","personalUnlicensedUser"]);return m$1(l$1({},r),{personal:t+o,personalLicensedUser:t,personalUnlicensedUser:o})}var d=class e{#e=T(C);#s=T(De);#n=T(I);#o=new y(()=>this.getS3Config("Providers"));#i=new y(()=>this.getS3Config("Regions"));#r=new y(()=>this.getS3Config("RegionHosts"));#a=new y(()=>this.getS3Config("StorageClasses"));#l=Nt(()=>{let t=this.#o.value()(),o=this.#r.value()(),r=[...t??[],...o?.map(s=>({key:`Amazon ${s.key}`,value:s.value}))??[]];return Array.from(new Map(r.map(s=>[s.value,s])).values())});#c=new y(()=>this.getStorjConfig("Satellites"));#u=new y(()=>this.getStorjConfig("AuthenticationMethods"));#p=new y(()=>this.getOpenstackConfig("Providers"));#m=new y(()=>this.getOpenstackConfig("Versions"));#d=new y(()=>this.getGcsConfig("Locations"));#g=new y(()=>this.getGcsConfig("StorageClasses"));getS3AllProviders(){return this.#o.load(),this.#r.load(),this.#l}getS3ProvidersFiltered(t){return Nt(()=>this.getS3AllProviders()().filter(t))}getS3Providers(){return this.#o.load()}getS3Regions(){return this.#i.load()}getS3RegionHosts(){return this.#r.load()}getS3StorageClasses(){return this.#a.load()}getStorjSatellites(){return this.#c.load()}getStorjAuthenticationMethods(){return this.#u.load()}getOpenstackProviders(){return this.#p.load()}getOpenstackVersions(){return this.#m.load()}getGcsLocations(){return this.#d.load()}getGcsStorageClasses(){return this.#g.load()}getS3Config(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-getconfig",requestBody:{"s3-config":t}}).pipe(pt(o=>this.#t(o)))}createS3IamUser(t,o){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"CanCreateUser","s3-username":t,"s3-password":o}})}createS3PolicyIAM(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"GetPolicyDoc",path:t}})}getStorjConfig(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"storj-getconfig",requestBody:{"storj-config":t}}).pipe(pt(o=>this.#t(o)))}getOpenstackConfig(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"openstack-getconfig",requestBody:{"openstack-config":t}}).pipe(pt(o=>this.#t(o)))}getGcsConfig(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"gcs-getconfig",requestBody:{"gcs-config":t}}).pipe(pt(o=>this.#t(o)))}#t(t){return (t.Result&&typeof t.Result=="object"&&Object.entries(t.Result).map(([o,r])=>({key:o,value:r})))??[]}getDuplicatiStorageBackups(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"duplicati-list-backups",requestBody:{action:"ListBackups",url:t}}).pipe(pt(o=>this.#t(o)),pt(o=>o.find(r=>r.key==="folders")?.value),pt(o=>JSON.parse(o)))}getFilenApiKey(t,o){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"filen-get-api-key",requestBody:{"filen-operation":"GetApiKey","backup-id":o??"",url:t}}).pipe(pt(r=>this.#t(r)),pt(r=>r.find(s=>s.key==="api-key")?.value))}getOffice365Counts(t$1,o,r){let s={"Content-Type":"application/json"};return this.#n.relayIsEnabled()&&(s.timeout=`${300*1e3}`),this.#s.post(`${t.BASE}/api/v1/webmodule/office365`,JSON.stringify({"backup-id":r??"","source-prefix":o,operation:"CountItems",url:t$1}),{headers:s}).pipe(pt(i=>this.#t(i)),pt(i=>i.find(u=>u.key==="counts")?.value),pt(i=>{let u=JSON.parse(i);return {users:u.users,groups:u.groups,sites:q(u.sites)}}))}static \u0275fac=function(o){return new(o||e)};static \u0275prov=ee$1({token:e,factory:e.\u0275fac,providedIn:"root"})};var n=new jn,p={type:"error",message:$localize`Using a leading slash is most likely wrong, and will result in objects being created with a leading slash in the name.`},L={description:$localize`Unknown destination type`,sourceDescription:null,icon:"assets/dest-icons/file-system.png",isDefaultEntry:true,customFields:{path:{type:"String",name:"path",doubleSlash:p,shortDescription:$localize`Path`,formElement:e=>n.control(e??"")}},mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>{let s=o.startsWith(`${e}:///`)?o.split(`${e}:///`)[1]:o.split(`${e}://`)[1];return l$1({destinationType:e,custom:{path:s.split("?")[0]}},l(e,t))}}},F={key:"s3",displayName:$localize`S3 Compatible`,description:$localize`Store backups in any S3 compatible bucket.`,sourceDescription:$localize`Use files from any S3 compatible bucket as a remote source.`,icon:"assets/dest-icons/s3compat.png",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>n.control(e??""),isMandatory:true},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"s3-server-name",order:1,shortDescription:$localize`Server`,longDescription:$localize`The hostname of the S3 compatible server to connect to`,type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3AllProviders(),isMandatory:true,formElement:e=>n.control(e??"")},{name:"auth-username",isMandatory:true},{name:"auth-password",isMandatory:true},{name:"use-ssl"}],advancedFields:[{name:"s3-client",type:"Enumeration",loadOptions:()=>Ge([{key:"AWS Library",value:"aws"},{key:"MinIO Library",value:"minio"}]),validate:e=>({type:"warning",message:$localize`Invalid client selected`})}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:s}=m(t);return l$1({destinationType:e,custom:{path:s,bucket:r}},l(e,t))}}},P=[{key:"file",displayName:$localize`File system`,description:$localize`Store backups on your local file system.`,sourceDescription:$localize`Use files from your local file system as a remote source.`,icon:"assets/dest-icons/file-system.png",searchTerms:"local disk harddrive localdisk filesystem unc server share drive",sortOrder:110,customFields:{path:{type:"FolderTree",name:"path",doubleSlash:p,shortDescription:$localize`File path`,longDescription:$localize`The path to store the backup`,formElement:e=>n.control(e??""),isMandatory:true}},mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>{let r=o.startsWith("file:///"),s=decodeURIComponent(r?o.split("file:///")[1]:o.split("file://")[1]),u=s.slice(1).startsWith(":\\")||s.slice(1).startsWith(":/")||s.startsWith("\\\\")?s:"/"+s;return l$1({destinationType:e,custom:{path:u.split("?")[0]}},l(e,t))}}},{key:"duplicati",displayName:$localize`Duplicati Storage`,description:$localize`Store backups with Duplicati Storage.`,sourceDescription:$localize`Use files from Duplicati Storage as a remote source.`,icon:"assets/dest-icons/duplicati.png",searchTerms:"duplicati internal built-in",sortOrder:100,dynamicFields:[{name:"duplicati-backup-id",type:"DuplicatiBackupId",isMandatory:true,shortDescription:$localize`Unique Backup ID`,longDescription:$localize`A unique identifier for the backup job. It is recommended to not change this value.`}],mapper:{to:e=>c(e,null,null,null),from:(e,t,o)=>l$1({destinationType:e},l(e,t)),default:e=>e&&e.length>0?`duplicati://?duplicati-backup-id=${encodeURIComponent(e)}`:"duplicati://"}},{key:"ssh",displayName:$localize`SFTP (SSH)`,description:$localize`Store backups with SFTP (SSH).`,sourceDescription:$localize`Use files from SFTP (SSH) as a remote source.`,icon:"assets/dest-icons/ssh.png",searchTerms:"sftp scp secure shell",sortOrder:80,customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`The server to connect to`,formElement:e=>n.control(e??""),isMandatory:true},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`The port to connect to`,formElement:e=>n.control(e??"",[me.required,me.max(65535)])},path:{type:"Path",name:"path",shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,doubleSlash:{type:"warning",message:$localize`Using a leading slash makes the path absolute, pointing to the root of the filesystem.`},formElement:e=>n.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,longDescription:$localize`Username`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Password`,longDescription:$localize`Password`}],advancedFields:[{type:"FileTree",name:"ssh-keyfile",accepts:".key,",shortDescription:$localize`This is a path to a private key file locally on the machine`,longDescription:$localize`This is a path to a private key file locally on the machine`},{type:"FreeText",name:"ssh-key",shortDescription:$localize`SSH private key`,longDescription:$localize`An SSH private key. Supported formats are OpenSSL, OpenSSH, PuTTY, and PEM.`}],mapper:{to:e=>{let{server:t,port:o,path:r}=e.custom;return c(e,t,o,r)},from:(e,t,o)=>{let{server:r,port:s,path:i}=m(t);return l$1({destinationType:e,custom:{server:r,port:s,path:i}},l(e,t))}}},{key:"s3",displayName:$localize`S3 Compatible`,description:$localize`Store backups in any S3 compatible bucket.`,sourceDescription:$localize`Use files from any S3 compatible bucket as a remote source.`,icon:"assets/dest-icons/s3compat.png",searchTerms:"spaces cloud digitalocean cloudian minio linode bunnycdn oracle cloudflare alibaba huawei tencent baidu jd ucloud qiniu aliyun tcloud tencent ",sortOrder:90,customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>n.control(e??""),isMandatory:true},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"s3-server-name",order:1,shortDescription:$localize`Server`,longDescription:$localize`The hostname of the S3 compatible server to connect to`,type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3AllProviders(),isMandatory:true,formElement:e=>n.control(e??"")},{name:"use-ssl",order:2},{name:"auth-username",isMandatory:true},{name:"auth-password",isMandatory:true}],advancedFields:[{name:"s3-client",type:"Enumeration",loadOptions:()=>Ge([{key:"AWS Library",value:"aws"},{key:"MinIO Library",value:"minio"}])},{name:"s3-storage-class",type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3StorageClasses()},{name:"s3-location-constraint",type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3Regions()}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:s}=m(t);return l$1({destinationType:e,custom:{path:s,bucket:r}},l(e,t))}}},{key:"s3",customKey:"s3-aws",displayName:$localize`Amazon S3`,description:$localize`Store backups in Amazon S3.`,sourceDescription:$localize`Use files from Amazon S3 as a remote source.`,icon:"assets/dest-icons/aws.png",searchTerms:"amazon aws",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>n.control(e??""),isMandatory:true},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"s3-server-name",order:1,shortDescription:$localize`Server`,longDescription:$localize`The hostname of the S3 compatible server to connect to`,type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3ProvidersFiltered(t=>t.value.endsWith(".amazonaws.com")),isMandatory:true,formElement:e=>n.control(e??"")},{name:"use-ssl",order:2},{name:"auth-username",isMandatory:true},{name:"auth-password",isMandatory:true}],advancedFields:[{name:"s3-client",type:"Enumeration",loadOptions:()=>Ge([{key:"AWS Library",value:"aws"},{key:"MinIO Library",value:"minio"}])},{name:"s3-storage-class",type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3StorageClasses()},{name:"s3-location-constraint",type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3Regions()}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return e.dynamic["s3-server-name"]?.endsWith(".amazonaws.com")&&(e.destinationType="s3"),c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:s}=m(t);return l$1({destinationType:e,custom:{path:s,bucket:r}},l(e,t))},default:e=>"s3-aws://?use-ssl=true",intercept:e=>e.searchParams.get("s3-server-name")?.endsWith(".amazonaws.com")??false}},{key:"gcs",displayName:$localize`Google Cloud Storage`,description:$localize`Store backups in Google Cloud Storage.`,sourceDescription:$localize`Use files from Google Cloud Storage as a remote source.`,icon:"assets/dest-icons/google-cloud.png",oauthField:"authid",searchTerms:"gcp googlecloud",sortOrder:70,customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>n.control(e??""),isMandatory:true},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:true,longDescription:$localize`An OAuth token with access to the Google Cloud Storage. Not required if service account JSON is provided.`}],advancedFields:[{name:"gcs-location",type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getGcsLocations()},{name:"gcs-storage-class",type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getGcsStorageClasses()},{name:"gcs-service-account-file",type:"FileTree",accepts:".json,",shortDescription:$localize`Service account JSON file`,longDescription:$localize`Pick the path to a file with service account JSON.`},{name:"gcs-service-account-json",type:"FreeText",shortDescription:$localize`Service account JSON`,longDescription:$localize`Paste the service account JSON here.`}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:s}=m(t);return l$1({destinationType:e,custom:{path:s,bucket:r}},l(e,t))}}},{key:"googledrive",displayName:$localize`Google Drive`,description:$localize`Store backups in Google Drive.`,sourceDescription:$localize`Use files from Google Drive as a remote source.`,icon:"assets/dest-icons/google-drive.png",oauthField:"authid",searchTerms:"gdrive",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"authid",type:"Password",isMandatory:true}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>l$1({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"pcloud",displayName:$localize`pCloud`,description:$localize`Store backups in pCloud.`,sourceDescription:$localize`Use files from pCloud as a remote source.`,icon:"assets/dest-icons/pcloud.png",oauthField:"authid",customFields:{server:{type:"Enumeration",name:"server",loadOptions:()=>Ge([{key:"pCloud Global",value:"api.pcloud.com"},{key:"pCloud Europe",value:"eapi.pcloud.com"}]),shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>n.control(e??""),isMandatory:true},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"authid",type:"Password",oauthVersion:2,isMandatory:true}],mapper:{to:e=>{let{server:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{server:r,path:s}=m(t);return l$1({destinationType:e,custom:{server:r,path:s}},l(e,t))}}},{key:"azure",displayName:$localize`Azure Blob Storage`,description:$localize`Store backups in Azure Blob Storage.`,sourceDescription:$localize`Use files from Azure Blob Storage as a remote source.`,icon:"assets/dest-icons/azure.png",searchTerms:"microsoft ms",sortOrder:60,customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Container name`,longDescription:$localize`Container name`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Account name`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Access key`,isMandatory:true}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>l$1({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"onedrivev2",displayName:$localize`OneDrive`,description:$localize`Store backups in OneDrive.`,sourceDescription:$localize`Use files from OneDrive as a remote source.`,icon:"assets/dest-icons/one-drive.png",oauthField:"authid",searchTerms:"micorsoft ms",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:true}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>l$1({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"od4b",displayName:$localize`OneDrive Business (deprecated)`,description:$localize`Store backups in OneDrive Business. Deprecated, use Sharepoint instead.`,sourceDescription:$localize`Use files from OneDrive Business as a remote source. Deprecated, use SharePoint instead.`,icon:"assets/dest-icons/one-drive.png",searchTerms:"microsoft ms",sortOrder:-1,customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>n.control(e??""),isMandatory:true},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>n.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Account name`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Access key`,isMandatory:true}],mapper:{to:e=>{let{port:t,server:o,path:r}=e.custom;return c(e,o,t,r)},from:(e,t,o)=>{let{server:r,port:s,path:i}=m(t);return l$1({destinationType:e,custom:{server:r,port:s,path:i}},l(e,t))}}},{key:"mssp",displayName:$localize`Microsoft SharePoint (deprecated)`,description:$localize`Store backups in Microsoft SharePoint using legacy API.`,sourceDescription:$localize`Use files from Microsoft SharePoint as a remote source using the legacy API.`,icon:"assets/dest-icons/sharepoint.png",searchTerms:"microsoft ms",sortOrder:-1,customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>n.control(e??""),isMandatory:true},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>n.control(e??"")},path:{type:"String",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Account name`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Access key`,isMandatory:true}],mapper:{to:e=>{let{port:t,server:o,path:r}=e.custom;return c(e,o,t,r)},from:(e,t,o)=>{let{server:r,port:s,path:i}=m(t);return l$1({destinationType:e,custom:{server:r,port:s,path:i}},l(e,t))}}},{key:"sharepoint",displayName:$localize`Microsoft SharePoint`,description:$localize`Store backups in Microsoft SharePoint.`,sourceDescription:$localize`Use files from Microsoft SharePoint as a remote source.`,icon:"assets/dest-icons/sharepoint.png",oauthField:"authid",searchTerms:"microsoft ms",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"site-id",isMandatory:true},{name:"authid",isMandatory:true}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>l$1({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"dropbox",displayName:$localize`Dropbox`,description:$localize`Store backups in Dropbox.`,sourceDescription:$localize`Use files from Dropbox as a remote source.`,icon:"assets/dest-icons/dropbox.png",oauthField:"authid",searchTerms:"dbx",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:true}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>l$1({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"box",displayName:$localize`Box.com`,description:$localize`Store backups in Box.com.`,sourceDescription:$localize`Use files from Box.com as a remote source.`,icon:"assets/dest-icons/box-com.png",oauthField:"authid",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:true}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>l$1({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"jottacloud",displayName:$localize`Jottacloud`,description:$localize`Store backups in Jottacloud.`,sourceDescription:$localize`Use files from Jottacloud as a remote source.`,icon:"assets/dest-icons/jottacloud.png",oauthField:"authid",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:true}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>l$1({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"b2",displayName:$localize`B2 Cloud Storage`,description:$localize`Store backups in B2 Cloud Storage.`,sourceDescription:$localize`Use files from B2 Cloud Storage as a remote source.`,icon:"assets/dest-icons/backblaze.png",searchTerms:"backblaze",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>n.control(e??""),isMandatory:true,validate:e=>{function t(o){if(!o)return false;let r=o.length;return !(r<6||r>63||!/^[a-zA-Z0-9.-]+$/.test(o)||!/^[a-zA-Z0-9]/.test(o)||!/[a-zA-Z0-9]$/.test(o)||/^\d{1,3}(\.\d{1,3}){3}$/.test(o)||/(\.\.)|(\.-)|(-\.)/.test(o)||o.toLowerCase().startsWith("b2-"))}return t(e)?null:{type:"error",message:$localize`Invalid bucket name.`}}},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path in the bucket`,longDescription:$localize`Path in the bucket`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Application ID`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Application Key`,isMandatory:true}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:s}=m(t);return l$1({destinationType:e,custom:{path:s,bucket:r}},l(e,t))}}},{key:"e2",displayName:$localize`IDrive e2`,description:$localize`Store backups in IDrive e2.`,sourceDescription:$localize`Use files from IDrive e2 as a remote source.`,icon:"assets/dest-icons/idrive-e2.png",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>n.control(e??""),isMandatory:true},path:{type:"String",name:"path",doubleSlash:p,shortDescription:$localize`Path in the bucket`,longDescription:$localize`Path in the bucket`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Access ID`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Access Secret`,isMandatory:true}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:s}=m(t);return l$1({destinationType:e,custom:{bucket:r,path:s}},l(e,t))}}},{key:"mega",displayName:$localize`Mega.nz`,description:$localize`Store backups in Mega.nz.`,sourceDescription:$localize`Use files from Mega.nz as a remote source.`,icon:"assets/dest-icons/mega-nz.png",sortOrder:-1,customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:true}],mapper:{to:e=>{let t=e.custom.path;return c(e,null,null,t)},from:(e,t,o)=>l$1({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"msgroup",displayName:$localize`Microsoft Office 365 Group`,description:$localize`Store backups in Microsoft Office 365 Group.`,sourceDescription:$localize`Use files from Microsoft Office 365 Group as a remote source.`,icon:"assets/dest-icons/office-365.png",oauthField:"authid",searchTerms:"ms",customFields:{groupEmail:{type:"Email",name:"groupEmail",shortDescription:$localize`Group email`,longDescription:$localize`Group email`,formElement:e=>n.control(e??"",[me.email]),isMandatory:true},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:true}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>l$1({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"cloudfiles",displayName:$localize`Rackspace CloudFiles`,description:$localize`Store backups in Rackspace CloudFiles.`,sourceDescription:$localize`Use files from Rackspace CloudFiles as a remote source.`,icon:"assets/dest-icons/rackspace.png",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>n.control(e??""),isMandatory:true},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>n.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:true}],mapper:{to:e=>{let{port:t,server:o,path:r}=e.custom;return c(e,o,t,r)},from:(e,t,o)=>{let{server:r,port:s,path:i}=m(t);return l$1({destinationType:e,custom:{server:r,port:s,path:i}},l(e,t))}}},{key:"rclone",displayName:$localize`Rclone`,description:$localize`Store backups in Rclone.`,sourceDescription:$localize`Use files from Rclone as a remote source.`,icon:"assets/dest-icons/rclone.png",searchTerms:"rcl",dynamicFields:[{name:"rclone-local-repository",shortDescription:$localize`Local repository`,defaultValue:""},{name:"rclone-remote-repository",shortDescription:$localize`Remote repository`,defaultValue:""},{name:"rclone-remote-path",type:"Path",shortDescription:$localize`Path on remote repository`,defaultValue:""}],mapper:{to:e=>{let t=e.dynamic["rclone-remote-repository"],o=e.dynamic["rclone-remote-path"],r=Object.entries(e.dynamic).filter(([s])=>!["rclone-remote-repository","rclone-remote-path"].includes(s));return U(e.destinationType??"rclone",t,null,o,[...Object.entries(e.advanced??{}),...r])},from:(e,t,o)=>{let{advanced:r,dynamic:s}=l(e,t),{bucket:i,path:u}=m(t);return {destinationType:e,dynamic:l$1({"rclone-remote-repository":i,"rclone-remote-path":u},s),advanced:l$1({},r)}}}},{key:"openstack",displayName:$localize`OpenStack Object Storage`,description:$localize`Store backups in OpenStack Object Storage.`,sourceDescription:$localize`Use files from OpenStack Object Storage as a remote source.`,icon:"assets/dest-icons/open-stack.png",searchTerms:"swift",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket`,longDescription:$localize`Bucket`,formElement:e=>n.control(e??""),isMandatory:true}},dynamicFields:[{name:"openstack-authuri",shortDescription:$localize`Auth URI`,type:"Enumeration",loadOptions:e=>e.get(d).getOpenstackProviders(),isMandatory:true},{name:"openstack-version",shortDescription:$localize`Version`,type:"Enumeration",loadOptions:e=>e.get(d).getOpenstackVersions()},{name:"openstack-domain-name",type:"Hostname",shortDescription:$localize`Domain name`},{name:"openstack-tenant-name",shortDescription:$localize`Tenant name`},{name:"openstack-region",shortDescription:$localize`Region`}],mapper:{to:e=>{let{bucket:t}=e.custom;return c(e,t,null,null)},from:(e,t,o)=>{let{bucket:r,path:s}=m(t);return l$1({destinationType:e,custom:{path:s,bucket:r}},l(e,t))}}},{key:"webdav",displayName:$localize`WebDAV`,description:$localize`Store backups in WebDAV.`,sourceDescription:$localize`Use files from WebDAV as a remote source.`,icon:"assets/dest-icons/webdav.png",searchTerms:"web dav",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>n.control(e??""),isMandatory:true},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>n.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"use-ssl",shortDescription:$localize`Use SSL`},{name:"auth-username",shortDescription:$localize`Username`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:true}],advancedFields:[{type:"FileTree",name:"debug-propfind-file",accepts:".txt,.log"}],mapper:{to:e=>{let{server:t,port:o,path:r}=e.custom;return c(e,t,o,r)},from:(e,t,o)=>{let{server:r,port:s,path:i}=m(t);return l$1({destinationType:e,custom:{server:r,port:s,path:i}},l(e,t))}}},{key:"aftp",displayName:$localize`Alternative FTP`,description:$localize`Store backups in FTP.`,sourceDescription:$localize`Use files from FTP as a remote source.`,icon:"assets/dest-icons/ftp.png",searchTerms:"alt file transfer protocol ftps",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>n.control(e??""),isMandatory:true},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>n.control(e??"")},path:{type:"Path",name:"path",shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,doubleSlash:{type:"warning",message:$localize`Using a leading slash makes the path absolute, pointing to the root of the filesystem.`},formElement:e=>n.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:true}],mapper:{to:e=>{let{server:t,port:o,path:r}=e.custom;return c(e,t,o,r)},from:(e,t,o)=>{let{server:r,port:s,path:i}=m(t);return l$1({destinationType:e,custom:{server:r,port:s,path:i}},l(e,t))}}},{key:"ftp",displayName:$localize`FTP`,description:$localize`Store backups in FTP.`,sourceDescription:$localize`Use files from FTP as a remote source.`,icon:"assets/dest-icons/ftp.png",searchTerms:"file transfer protocol ftps",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>n.control(e??""),isMandatory:true},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>n.control(e??"")},path:{type:"Path",name:"path",shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,doubleSlash:{type:"warning",message:$localize`Using a leading slash makes the path absolute, pointing to the root of the filesystem.`},formElement:e=>n.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:true}],mapper:{to:e=>{let{port:t,server:o,path:r}=e.custom;return c(e,o,t,r)},from:(e,t,o)=>{let{server:r,port:s,path:i}=m(t);return l$1({destinationType:e,custom:{server:r,port:s,path:i}},l(e,t))}}},{key:"sia",displayName:$localize`Sia Decentrilized Cloud`,description:$localize`Store backups in Sia Decentrilized Cloud.`,sourceDescription:$localize`Use files from Sia Decentralized Cloud as a remote source.`,icon:"assets/dest-icons/sia-cloud.png",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>n.control(e??""),isMandatory:true}},dynamicFields:["sia-targetpath","sia-password","sia-redundancy"],mapper:{to:e=>{let t=e.custom.server,o=e.dynamic["sia-targetpath"],r=[...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([s])=>s!=="sia-targetpath")];return U(e.destinationType??"sia",t,null,o,r)},from:(e,t,o)=>l$1({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"cos",displayName:$localize`Tencent COS`,description:$localize`Store backups in Tencent COS.`,sourceDescription:$localize`Use files from Tencent COS as a remote source.`,icon:"assets/dest-icons/tencent-cloud.png",customFields:{bucket:{name:"bucket",type:"Bucketname",shortDescription:$localize`Bucket`,isMandatory:true,formElement:e=>n.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"cos-region",shortDescription:$localize`Region`},{name:"cos-app-id",shortDescription:$localize`COS App Id`,isMandatory:true},{name:"cos-secret-id",shortDescription:$localize`COS Secret Id`,isMandatory:true},{name:"cos-secret-key",shortDescription:$localize`COS Secret Key`,isMandatory:true}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom,r=m$1(l$1({},e),{advanced:m$1(l$1({},e.advanced),{"cos-bucket":t})});return c(r,null,null,o)},from:(e,t,o)=>{let r=l(e,t),s=r.advanced["cos-bucket"];return delete r.advanced["cos-bucket"],l$1({destinationType:e,custom:{path:h(t),bucket:s}},r)}}},{key:"tahoe",displayName:$localize`Tahoe LAFS`,description:$localize`Store backups in Tahoe LAFS.`,sourceDescription:$localize`Use files from Tahoe LAFS as a remote source.`,icon:"assets/dest-icons/tahoelafs.png",searchTerms:"least authority file system",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>n.control(e??""),isMandatory:true},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>n.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"use-ssl",shortDescription:$localize`Use SSL`}],mapper:{to:e=>{let{server:t,port:o,path:r}=e.custom;return c(e,t,o,r)},from:(e,t,o)=>{let{server:r,port:s,path:i}=m(t);return l$1({destinationType:e,custom:{server:r,port:s,path:i}},l(e,t))}}},{key:"smb",displayName:$localize`Windows Share (SMB)`,description:$localize`Store backups on SMB storage.`,sourceDescription:$localize`Use files from SMB storage as a remote source.`,icon:"assets/dest-icons/smb.png",searchTerms:"cifs samba",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>n.control(e??""),isMandatory:true},share:{type:"Hostname",name:"share",shortDescription:$localize`Share Name`,longDescription:$localize`Share Name`,formElement:e=>n.control(e??""),isMandatory:true},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>n.control(e??"")}},dynamicFields:["transport",{name:"auth-username",isMandatory:true},{name:"auth-password",isMandatory:true},"auth-domain"],mapper:{to:e=>{let{share:t,server:o,path:r}=e.custom;return c(e,o,null,N(t,r))},from:(e,t,o)=>{let{server:r,path:s}=m(t),i=s.split("/")[0],u=s.split("/").slice(1).join("/");return l$1({destinationType:e,custom:{server:r,share:i,path:u}},l(e,t))}}},{key:"cifs",displayName:$localize`CIFS (deprecated)`,description:$localize`Same as SMB backend, but with a different name. Use SMB instead.`,sourceDescription:$localize`Use files from CIFS storage as a remote source. Deprecated, use SMB instead.`,icon:"assets/dest-icons/smb.png",sortOrder:-1,mapper:L.mapper},{key:"filen",displayName:$localize`Filen.io`,description:$localize`Store backups in Filen.io.`,sourceDescription:$localize`Use files from Filen.io as a remote source.`,icon:"assets/dest-icons/filen.png",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on Filen`,longDescription:$localize`Path on Filen`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"auth-username",isMandatory:true},{name:"auth-password",isMandatory:true},{name:"two-factor-code",type:"Filen2FACode"}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>l$1({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"filejump",displayName:$localize`Filejump`,description:$localize`Store backups in Filejump.`,sourceDescription:$localize`Use files from Filejump as a remote source.`,icon:"assets/dest-icons/file-jump.png",sortOrder:-1,customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on Filejump`,longDescription:$localize`Path on Filejump`,formElement:e=>n.control(e??"")}},dynamicFields:[{type:"Password",name:"api-token",shortDescription:$localize`API Token`,longDescription:$localize`Filejump API Token`,formElement:e=>n.control(e??""),isMandatory:true}],mapper:{to:e=>{let{path:t}=e.custom;return c(e,null,null,t)},from:(e,t,o)=>l$1({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"storj",customKey:"storjAccessGrant",displayName:$localize`Storj Access Grant`,description:$localize`Store backups in Storj Access Grant.`,sourceDescription:$localize`Use files from Storj with an access grant as a remote source.`,icon:"assets/dest-icons/storj.png",dynamicFields:[{name:"storj-shared-access",shortDescription:$localize`Access Grant`,isMandatory:true},{name:"storj-bucket",type:"Bucketname",shortDescription:$localize`Bucket`,isMandatory:true},{name:"storj-folder",type:"Path",shortDescription:$localize`Path on server`,doubleSlash:p},{name:"storj-satellite",shortDescription:$localize`Satellite`,type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getStorjSatellites(),isMandatory:true}],mapper:{to:e=>{let t={"storj-auth-method":"Acccess grant"};return `storj://storj.io/config${b([...Object.entries(e.advanced),...Object.entries(e.dynamic),...Object.entries(t)])}`},from:(e,t,o)=>{let r=l(e,t);return delete r.advanced["storj-auth-method"],l$1({destinationType:e},r)},intercept:e=>e.protocol!=="storj:"?false:!!(e.searchParams.get("storj-shared-access")||e.searchParams.get("storj-auth-method")==="Acccess grant"),default:()=>"storj://?storj-shared-access=&storj-auth-method=Acccess+grant"}},{key:"storj",customKey:"storjApiKey",displayName:$localize`Storj API Key`,description:$localize`Store backups in Storj API Key.`,sourceDescription:$localize`Use files from Storj with an API key as a remote source.`,icon:"assets/dest-icons/storj.png",dynamicFields:[{name:"storj-satellite",shortDescription:$localize`Satellite`,type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getStorjSatellites(),isMandatory:true},{name:"storj-api-key",shortDescription:$localize`API Key`,isMandatory:true},{name:"storj-secret",shortDescription:$localize`Secret`,isMandatory:true},{name:"storj-bucket",type:"Bucketname",shortDescription:$localize`Bucket`,isMandatory:true},{name:"storj-folder",type:"Path",shortDescription:$localize`Path on server`,doubleSlash:p}],mapper:{to:e=>{let t={"storj-auth-method":"API key"};return `storj://storj.io/config${b([...Object.entries(e.advanced),...Object.entries(e.dynamic),...Object.entries(t)])}`},from:(e,t,o)=>{let r=l("storjApiKey",t);return delete r.advanced["storj-auth-method"],l$1({destinationType:e},r)},intercept:e=>e.protocol!=="storj:"?false:!!(e.searchParams.get("storj-api-key")||e.searchParams.get("storj-secret")||e.searchParams.get("storj-auth-method")==="API key"),default:()=>"storj://?storj-api-key=&storj-secret=&storj-auth-method=API+key"}},{key:"aliyunoss",displayName:$localize`Aliyun OSS`,description:$localize`Store backups in Aliyun OSS`,sourceDescription:$localize`Use files from Aliyun OSS as a remote source.`,icon:"assets/dest-icons/aliyun.png",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,formElement:e=>n.control(e??""),isMandatory:true},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path in bucket`,longDescription:$localize`Path in bucket`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"oss-endpoint",isMandatory:true},{name:"oss-access-key-id",isMandatory:true},{name:"oss-access-key-secret",isMandatory:true}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom,r=m$1(l$1({},e),{advanced:m$1(l$1({},e.advanced),{"oss-bucket-name":t})});return c(r,null,null,o)},from:(e,t,o)=>{let r=l(e,t),s=r.advanced["oss-bucket-name"];return delete r.advanced["oss-bucket-name"],l$1({destinationType:e,custom:{path:h(t),bucket:s}},r)}}},{key:"office365",displayName:$localize`Microsoft 365`,description:$localize`Create backups of Microsoft 365 data.`,sourceDescription:$localize`Use Microsoft 365 data as a remote source.`,searchTerms:"office o365 office365 m365 ms365",icon:"assets/dest-icons/office365.png",isNonFree:true,dynamicFields:[{name:"auth-username",shortDescription:$localize`Client ID`,longDescription:$localize`Application (client) ID from your Azure AD app registration.`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Client Secret`,longDescription:$localize`Client Secret from your Azure AD app registration.`,isMandatory:true},{name:"office365-tenant-id",shortDescription:$localize`Tenant ID`,isMandatory:true}],advancedFields:[{name:"office365-certificate-path",type:"FileTree"}],mapper:{to:e=>`office365://${b([...Object.entries(e.advanced),...Object.entries(e.dynamic)])}`,from:(e,t,o)=>{let{advanced:r,dynamic:s}=l(e,t);return {destinationType:e,advanced:l$1({},r),dynamic:l$1({},s)}}}},{key:"googleworkspace",displayName:$localize`Google Workspace`,description:$localize`Create backups of Google Workspace data.`,sourceDescription:$localize`Use Google Workspace data as a remote source.`,icon:"assets/dest-icons/googleworkspace.png",isNonFree:true,dynamicFields:[{name:"google-admin-email",type:"Email",shortDescription:$localize`Admin Email`,longDescription:$localize`Email address of the Google Workspace admin user.`,isMandatory:true},{name:"google-service-account-json",type:"FreeText",shortDescription:$localize`Service account JSON`,longDescription:$localize`Paste the service account JSON here.`,isMandatory:true}],advancedFields:[{name:"google-service-account-file",type:"FileTree",accepts:".json,",shortDescription:$localize`Service account JSON file`,longDescription:$localize`Pick the path to a file with service account JSON.`}],mapper:{to:e=>`googleworkspace://${b([...Object.entries(e.advanced),...Object.entries(e.dynamic)])}`,from:(e,t,o)=>{let{advanced:r,dynamic:s}=l(e,t);return {destinationType:e,advanced:l$1({},r),dynamic:l$1({},s)}}}},{key:"drimecloud",displayName:$localize`Drime Cloud`,description:$localize`Store backups in Drime Cloud.`,sourceDescription:$localize`Use files from Drime Cloud as a remote source.`,icon:"assets/dest-icons/drime.png",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path in Drime Cloud`,longDescription:$localize`Path in Drime Cloud`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"api-token",isMandatory:true}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>l$1({destinationType:e,custom:{path:h(t)}},l(e,t))}},g("rabata","Rabata.io",null,"assets/dest-icons/rabata.png",[".rabata.io"]),g("wasabi","Wasabi Hot Storage",null,"assets/dest-icons/wasabi.png",[".wasabisys.com"]),g("impossiblecloud","Impossible Cloud",null,"assets/dest-icons/impossiblecloud.png",[".impossibleapi.net"]),g("scaleway","Scaleway",null,"assets/dest-icons/scaleway.png",[".scw.cloud"]),g("hosteurope","Hosteurope",null,"assets/dest-icons/hosteurope.png",[".hosteurope.de"]),g("dunkel","Dunkel",null,"assets/dest-icons/dunkel.png",[".dunkel.de"]),g("dreamhost","DreamHost",null,"assets/dest-icons/dreamhost.png",[".dreamhost.com"]),g("dincloud","dinCloud",null,"assets/dest-icons/dincloud.png",[".dincloud.com"]),g("polisystems","Poli Systems",null,"assets/dest-icons/polisystems.png",[".polisystems.ch"]),g("ibmcos","IBM COS",null,"assets/dest-icons/ibmcos.png",[".softlayer.net"]),g("storadera","Storadera",null,"assets/dest-icons/storadera.png",[".storadera.com"]),g("infomaniak","Infomaniak",null,"assets/dest-icons/infomaniak.png",[".infomaniak.com",".infomaniak.cloud"]),g("sakuracloud","\u3055\u304F\u3089\u306E\u30AF\u30E9\u30A6\u30C9",null,"assets/dest-icons/sakuracloud.png",[".sakurastorage.jp"]),g("seagatelyve","Seagate Lyve",null,"assets/dest-icons/seagatelyve.png",[".lyvecloud.seagate.com"]),g("internxt","Internxt",null,"assets/dest-icons/internxt.png",[".internxt.com"]),g("selectel","Selectel",null,"assets/dest-icons/selectel.png",[".storage.selcloud.ru",".srvstorage.uz",".srvstorage.kz"])],H={".amazonaws.com":"Amazon S3",".impossibleapi.net":"Impossible Cloud S3",".scw.cloud":"Scaleway S3",".hosteurope.de":"Hosteurope S3",".dunkel.de":"Dunkel S3",".dreamhost.com":"DreamHost S3",".dincloud.com":"dinCloud S3",".polisystems.ch":"Poli Systems S3",".softlayer.net":"IBM COS (S3)",".storadera.com":"Storadera S3",".wasabisys.com":"Wasabi S3",".infomaniak.com":"Infomaniak S3",".infomaniak.cloud":"Infomaniak S3",".sakurastorage.jp":"\u3055\u304F\u3089\u306E\u30AF\u30E9\u30A6\u30C9 S3",".lyvecloud.seagate.com":"Seagate Lyve S3",".digitaloceanspaces.com":"DigitalOcean S3",".backblazeb2.com":"Backblaze B2 S3",".cloudian.com":"Cloudian S3",".min.io":"MinIO S3",".linodeobjects.com":"Linode S3",".bunnycdn.com":"BunnyCDN S3",".azure.com":"Microsoft Azure S3",".googleapis.com":"Google Cloud Storage S3",".ibm.com":"IBM Cloud S3",".oracle.com":"Oracle Cloud S3",".cloudflare.com":"Cloudflare S3",".alibaba.com":"Alibaba Cloud S3",".huawei.com":"Huawei Cloud S3",".tencent.com":"Tencent Cloud S3",".baidu.com":"Baidu Cloud S3",".jd.com":"JD Cloud S3",".ucloud.cn":"UCloud S3",".qiniu.com":"Qiniu Cloud S3",".aliyuncs.com":"Aliyun S3",".tcloud.com":"TCloud S3",".tencentcloudapi.com":"Tencent Cloud S3",".rabata.io":"Rabata S3",".internxt.com":"Internxt S3",".storage.selcloud.ru":"Selectel S3",".srvstorage.uz":"Selectel S3",".srvstorage.kz":"Selectel S3"};var J=new jn,v=class{host;hostname;exactHostname;pathname;port;protocol;search;username;password;searchParams;originalUrl;constructor(t){let o=new URL(t);this.originalUrl=t,this.host=o.host,this.hostname=o.hostname,this.exactHostname=this.extractExactHostname(t),this.pathname=o.pathname,this.port=o.port,this.protocol=o.protocol,this.search=o.search,this.username=o.username,this.password=o.password,this.searchParams=o.searchParams;}extractExactHostname(t){let o=t.match(/^[a-zA-Z][a-zA-Z0-9+.-]*:\/\/(?:[^@\/?#]*@)?(\[[a-fA-F0-9:.]+\]|[^:\/?#]+)/);return o?o[1]:""}};function c(e,t,o,r){return U(e.destinationType??"file",t,o,r,[...Object.entries(e.advanced),...Object.entries(e.dynamic)])}function U(e,t,o,r,s){let i=b(s),u=encodeURIComponent(X(t)),S=u==""?"":u+Y(o),k=r??"",w=k.slice(1).startsWith(":\\")&&e=="file"?"file:///":`${e}://`,$=N(S,Q(k));return `${w}${$}${i}`}function Z(e){return e==null||e===""?"":e.startsWith("/")?e.substring(1):e}function N(...e){if(e.length===0)return "";if(e.length===1)return e[0]??"";let t="";for(let o of e)o==null||o===""||(t+=t.endsWith("/")||t==""?o:"/"+o);return t}function Q(e){return e.split("/").map(encodeURIComponent).join("/")}function h(e){if(e==null||e==="")return "";if(typeof e=="string")try{e=new v(e);}catch{return ""}return decodeURIComponent(e.exactHostname??"")+decodeURIComponent(e.pathname=="/"?"":e.pathname??"")}function X(e){return e==null||e===""?"":e.endsWith("/")?e.substring(0,e.length-1):e}function Y(e){return e==null||e===""?"":":"+e.toString()}function Ee(e){return e?e.startsWith("diskimage:")?"assets/dest-icons/external-harddrive.png":V(e).icon:""}function Le(e){if(!e)return "";if(e.startsWith("diskimage:"))return $localize`Local disk`;let t=V(e);return t?t.displayName:"Unknown"}function V(e){try{let o=new v(e),r=P.find(s=>s.mapper.intercept?.(o));if(r)return r}catch{}let t=e.split("://")[0];return G(t)}var ee={file:{Display:$localize`Local`,Icon:null}};function Ne(e){if(!e)return "";let t=V(e);if(!t)return "";let o=ee[t.key];if(o?.Display)return o.Display;if(t.key==="s3"){let r="http://null?"+e.split("?")[1],i=new URL(r).searchParams.get("s3-server-name")?.toLowerCase()??"";for(let[u,S]of Object.entries(H))if(i.endsWith(u))return S}return t.displayName}function G(e){return P.find(o=>o.key===e||o.customKey===e)??P.find(o=>`${o.key}s`===e)??null??l$1({key:e,displayName:e},L)}function Ie(e){return P.filter(t=>t.key===e||t.customKey===e)}function m(e){return {bucket:decodeURIComponent(e.exactHostname),server:decodeURIComponent(e.exactHostname||e.hostname),port:e.port,path:Z(decodeURIComponent(e.pathname))}}function l(e,t){let o={},r={},s=G(e);return t.searchParams.forEach((i,u)=>{s?.dynamicFields?.some(k=>k===u||k?.name===u)?r[u]=decodeURIComponent(i):o[u]=decodeURIComponent(i);}),{advanced:o,dynamic:r}}function b(e,t=false){let o=e.map(([s,i])=>`${s}=${i?encodeURIComponent(i.toString()):""}`).join("&");return o?(t?"":"?")+o:""}function Be(e){let t=e.destinationType??"";return G(t)?.mapper.to(e)??""}function xe(e){let t=e.split("://")[0],o=e.split("://")[1],r=t==="file"?"http://dummy":o==""||o.startsWith("?")?`${t}://`+o:"http://"+o;if(!o)return null;let s=V(e),i="";if(`${s.key}s`===t&&(i+=r.indexOf("?")===-1?"?":"&",i+="use-ssl=true",e=s.key+e.substring(t.length)),t==="file"&&o.indexOf("?")!==-1&&(i+=i.indexOf("?")===-1?"?":"&",i+=o.split("?")[1]??""),t==="file"&&o.startsWith("%")&&!o.startsWith("%5C"))return G(t).mapper.from(t,new v("http://localhost"+i),e);try{let u=new v(r+i);if(u.host==="undefined")return null;let S=o.split("?")[0].split("/")[0],k=u.host!=""&&!isNaN(Number(u.host.replaceAll(".",""))),A=S.split("."),w=A.length===4&&A.every($=>$.length&&$.length<=3&&!isNaN(Number($))&&parseInt($)<=255);return k&&!w?null:s.mapper.from(s.key,u,e)}catch(u){return console.error("Error while parsing target path",e,r+i,u),null}}function _(e){return typeof e!="string"||!e.trim()?[]:e.split(`
2
+ `).map(t=>t.trim()).filter(t=>t).map(t=>{let[o,...r]=t.split("="),s=r.join("=").trim();return o.trim()?[o.trim(),s]:null}).filter(t=>t!==null)}function je(e){return _(e).map(([t,o])=>({Name:t,Value:o}))}function Te(e){return Object.fromEntries(_(e))}function Re(e){if(!e)return false;let t=e.length;return !(t<3||t>63||!/^[a-z0-9.-]+$/.test(e)||!/^[a-z0-9]/.test(e)||!/[a-z0-9]$/.test(e)||/^\d{1,3}(\.\d{1,3}){3}$/.test(e)||/(\.\.)|(\.-)|(-\.)/.test(e))}function We(e){if(!e||e.length>253)return false;let t=e.split(".");for(let o of t)if(!o||o.length>63||!/^[a-zA-Z0-9]([-a-zA-Z0-9]*[a-zA-Z0-9])?$/.test(o))return false;return true}function g(e,t,o,r,s){return m$1(l$1({},F),{customKey:`s3-${e}`,icon:r??F.icon,displayName:$localize`${t} (S3)`,description:$localize`Store backups in ${t} storage.`,dynamicFields:[...(F.dynamicFields??[]).filter(i=>i?.name!=="s3-server-name"),{name:"s3-server-name",order:1,shortDescription:$localize`Server`,longDescription:$localize`The hostname of the ${t} endpoint`,type:"NonValidatedSelectableString",loadOptions:i=>i.get(d).getS3ProvidersFiltered(u=>s.some(S=>u.value.endsWith(S))),isMandatory:true,formElement:i=>J.control(i??"")}],mapper:m$1(l$1({},F.mapper),{to:i=>{let{bucket:u,path:S}=i.custom;return s.some(k=>i.dynamic["s3-server-name"]?.endsWith(k))&&(i.destinationType="s3"),c(i,u,null,S)},default:i=>`s3-${e}://?use-ssl=true`,intercept:i=>s.some(u=>i.searchParams.get("s3-server-name")?.endsWith(u))??false})})}
3
+ export{Be as B,Ee as E,G,Ie as I,Le as L,Ne as N,Re as R,Te as T,V,We as W,d,h,je as j,xe as x};
@@ -1,2 +1,2 @@
1
- import {o as oe$1,F as Fe}from'./chunk-DuIUmwWN.js';import {T,ad as br,bB as yD,bu as N,N as Nt,b as g1,af as m1,ac as h1,U as Ue,B as y1,G as Ga,b$ as oe,c0 as ae,bv as le,d as dw,f as N$1,k as gT,L as oC,Q as Qi,s as sm,S as Sd,l as HC,x as xd,F as Fg,Y as iC,o as oT,H as Hl,j as mg,w as im,z as gg,a3 as QC,D as DE,I as Qg,aC as hg,i as iT,$ as $g,K as lC,q as PC}from'./main-KFKZO6SJ.js';var X=["inputRef"],Z=["optionsRef"],ee=["*",[["","menu",""]]],te=["*","[menu]"],ie=()=>({closeOnButton:false,closeOnEsc:true});function ne(a,J){a&1&&(Qi(0,"sh-icon",5),PC(1,"caret-down"),Hl());}function se(a,J){a&1&&(Qi(0,"sh-icon",6),PC(1,"caret-right"),Hl());}var m=[],ve=(()=>{class a{constructor(){this.#i=T(br),this.#t=T(yD),this.#e=T(N),this.parentMenu=T(a,{optional:true,skipSelf:true}),this.isSubmenu=Nt(()=>this.parentMenu!==null),this.asMultiLayer=g1(false),this.openIndicator=g1(false),this.disabled=g1(false),this.customOptionElementSelectors=g1(["button"]),this.keepClickedOptionActive=g1(false),this.closeOnClick=g1(true),this.isOpen=m1(false),this.closed=h1(),this.searchable=g1(false),this.activeOptionIndex=Ue(-1),this.inputRef=y1("inputRef"),this.optionsRef=y1("optionsRef"),this.openMenusEffect=Ga(t=>{this.isOpen()&&m.push(this),t(()=>{let i=m.indexOf(this);i>-1&&m.splice(i,1);});}),this.options=oe(this.optionsRef,this.customOptionElementSelectors),this.optionsEl=Nt(()=>{let t=this.optionsRef()?.nativeElement;return t?this.options.signal().filter(i=>i.disabled?false:i.closest(".options")===t):[]}),this.inputValue=ae(this.inputRef),this.optionsId=le(),this.activeOptionId=Ue(void 0),this.abortController=null,this.optionsEffect=Ga(t=>{if(this.abortController!==null&&(this.abortController.abort(),this.abortController=null),!this.isOpen())return;if(this.searchable()&&this.#e.pause(),t(()=>{this.searchable()&&this.#e.resume();}),this.abortController=new AbortController,!this.searchable())this.#i.documentElement.addEventListener("keydown",this.keyDownEventListener,{signal:this.abortController.signal});else {let n=this.inputRef()?.nativeElement;n&&n.addEventListener("keydown",this.keyDownEventListener,{signal:this.abortController.signal});}let e=this.inputRef()?.nativeElement;e&&(queueMicrotask(()=>e.focus()),this.closeOnClick()||this.optionsRef()?.nativeElement?.addEventListener("click",s=>{let o=s.target,r=this.activeElements();if(!r.length){let c=this.optionsEl();this.activeElements.set(c),r=c;}let p=r.findIndex(c=>c===o);p>-1&&(this.activeOptionIndex.set(p),e.focus());}));}),this.keyDownEventListener=t=>{if(m.at(-1)!==this)return;let i=this.activeOptionIndex(),e=this.searchable();if(this.#e.matches(t,"menu.next"))t.preventDefault(),this.activeOptionIndex.set(this.nextActiveIndex(i));else if(this.#e.matches(t,"menu.prev"))t.preventDefault(),this.activeOptionIndex.set(this.prevActiveIndex(i));else if(this.#e.matches(t,"menu.open-submenu")){if(!e&&i>-1){let n=this.activeElements()[i];if(n.parentElement?.hasAttribute("trigger")){t.preventDefault();let o=new CustomEvent("ship-menu-open",{bubbles:true,cancelable:true,detail:{keyboard:true}});n.dispatchEvent(o);}}}else if(this.#e.matches(t,"menu.close-submenu"))!e&&this.isSubmenu()&&(t.preventDefault(),this.close("closed"));else if(this.#e.matches(t,"menu.select")){let n=t.key==="Enter",s=t.key===" "||t.key==="Spacebar";if((n||s&&!e)&&(t.preventDefault(),i>-1)){let o=this.activeElements()[i];if(o.parentElement?.hasAttribute("trigger")){let p=new CustomEvent("ship-menu-open",{bubbles:true,cancelable:true,detail:{keyboard:true}});o.dispatchEvent(p);}else o.click(),o.querySelector("sh-checkbox")||queueMicrotask(()=>this.close("active"));}}else if(t.key==="Tab"){let n=this.activeElements();if(!n.length){let s=this.optionsEl();this.activeElements.set(s),n=s;}t.shiftKey?i<=0?(t.preventDefault(),this.close("closed")):(t.preventDefault(),this.activeOptionIndex.set(this.prevActiveIndex(i))):i>=n.length-1?(t.preventDefault(),this.close("closed")):(t.preventDefault(),this.activeOptionIndex.set(this.nextActiveIndex(i)));}},this._lastElementList=[],this.activeElements=Ue([]),this.lastInputValue="",this.inputValueEffect=Ga(()=>{if(!this.searchable()){this.activeElements.set(this.optionsEl());return}let i=(this.inputValue()??"").toLowerCase();if(this.#n(),!i||i===""){let n=this.optionsEl();this.activeElements.set(n),this._lastElementList=n;for(let s=0;s<n.length;s++)this.#t.removeStyle(n[s],"order"),n[s].id||(n[s].id=`${this.optionsId}-option-${s}`),n[s].setAttribute("role","option");return}if(!i||i==="")return;let e=this._lastElementList.length&&i.length>this.lastInputValue.length?this._lastElementList:this.optionsEl();this.lastInputValue=i;for(let n=0;n<e.length;n++){let s=e[n],o=s.textContent?.toLowerCase()||"",r=this.#s(o,i);s.value=r;}e=e.filter(n=>n.value>0).sort((n,s)=>s.value-n.value);for(let n=0;n<e.length;n++)this.#t.setStyle(e[n],"order",n);this.activeElements.set(e),this._lastElementList=e;for(let n=0;n<e.length;n++)e[n].id||(e[n].id=`${this.optionsId}-option-${n}`),e[n].setAttribute("role","option");}),this.activeOptionIndexEffect=Ga(()=>{let t=this.activeElements(),i=this.activeOptionIndex();for(let e=0;e<t.length;e++)t[e].classList.remove("active"),t[e].removeAttribute("aria-selected");if(i>-1){let e=t[i];e.scrollIntoView({block:"center"}),e.classList.add("active"),e.setAttribute("aria-selected","true"),this.activeOptionId.set(e.id);}else this.activeOptionId.set(void 0);});}#i;#t;#e;toggleIsOpen(t){t.preventDefault(),t.stopPropagation(),!this.disabled()&&(this.isOpen()?this.close("fromPopover"):this.open());}open(){this.disabled()||(this.isOpen.set(true),this.searchable()&&setTimeout(()=>this.inputRef()?.nativeElement.focus()));}onShipMenuOpen(t){t.preventDefault(),t.stopPropagation(),this.open(),t.detail?.keyboard&&setTimeout(()=>{this.activeOptionIndex.set(0);},50);}#s(t,i){if(!i)return 0;let e=0,n=-1,s=0,o=true;for(let r=0;r<i.length;r++){let p=i[r];if(t.length>n+1&&t[n+1]===p)e+=r===0?100:150,n++,s++;else {let c=t.indexOf(p,n+1);if(r>0&&(o=false),c===-1)return 0;e+=100,n=c,s++;}}return o&&i.length===s&&(e+=1e3),e+=s*20,e}nextActiveIndex(t){let i=this.activeElements();if(!i.length){let n=this.optionsEl();this.activeElements.set(n),i=n;}if(t===-1||t===i.length-1)return 0;let e=t+1;return i[e].disabled?this.nextActiveIndex(e):e}prevActiveIndex(t){let i=this.activeElements();if(!i.length){let n=this.optionsEl();this.activeElements.set(n),i=n;}if(t===0||t===-1)return i.length-1;let e=t-1;return i[e].disabled?this.prevActiveIndex(e):e}close(t="closed",i){this.inputValue.set("");let e=this.inputRef()?.nativeElement;if(e&&(e.value=""),this.closeOnClick()&&((!this.keepClickedOptionActive()||t==="closed")&&this.#n(),this.isOpen.set(false),this.closed.emit(t==="active"),this.isSubmenu())){let n=this.parentMenu?.inputRef()?.nativeElement;n&&queueMicrotask(()=>n.focus());}}#n(){this.activeOptionIndex.set(-1);let t=this.optionsEl();for(let i=0;i<t.length;i++)t[i].classList.remove("active"),t[i].removeAttribute("aria-selected");}ngOnDestroy(){this.abortController&&(this.abortController.abort(),this.abortController=null);let t=m.indexOf(this);t>-1&&m.splice(t,1);}static{this.\u0275fac=function(i){return new(i||a)};}static{this.\u0275cmp=dw({type:a,selectors:[["sh-menu"]],viewQuery:function(i,e){i&1&&$g(e.inputRef,X,5)(e.optionsRef,Z,5),i&2&&lC(2);},hostVars:6,hostBindings:function(i,e){i&1&&Fg("ship-menu-open",function(s){return e.onShipMenuOpen(s)}),i&2&&Qg("disabled",e.disabled())("has-search",e.searchable())("multi-layer",e.asMultiLayer());},inputs:{asMultiLayer:[1,"asMultiLayer"],openIndicator:[1,"openIndicator"],disabled:[1,"disabled"],customOptionElementSelectors:[1,"customOptionElementSelectors"],keepClickedOptionActive:[1,"keepClickedOptionActive"],closeOnClick:[1,"closeOnClick"],isOpen:[1,"isOpen"],searchable:[1,"searchable"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:te,decls:13,vars:21,consts:[["formFieldWrapper",""],["inputRef",""],["optionsRef",""],[3,"isOpenChange","closed","isOpen","disableOpenByClick","asMultiLayer","options"],["trigger","","role","combobox","aria-haspopup","listbox",3,"click"],[1,"open-indicator"],[1,"submenu-indicator"],[1,"form-field-wrap"],[1,"small","stretch"],["type","text","placeholder","Search","role","combobox","aria-autocomplete","list"],["role","listbox",1,"options",3,"click","id"]],template:function(i,e){if(i&1){let n=gT();oC(ee),Qi(0,"sh-popover",3,0),sm("isOpenChange",function(o){return Sd(n),HC(e.isOpen,o)||(e.isOpen=o),xd(o)}),Fg("closed",function(){return e.close("fromPopover")}),Qi(2,"div",4),Fg("click",function(o){return e.toggleIsOpen(o)}),iC(3),oT(4,ne,2,0,"sh-icon",5),oT(5,se,2,0,"sh-icon",6),Hl(),Qi(6,"div",7)(7,"sh-form-field",8),mg(8,"input",9,1),Hl()(),Qi(10,"div",10,2),Fg("click",function(){return e.close("active")}),iC(12,1),Hl()();}i&2&&(im("isOpen",e.isOpen),gg("disableOpenByClick",true)("asMultiLayer",e.asMultiLayer())("options",QC(20,ie)),DE(2),Qg("is-open",e.isOpen()),hg("aria-expanded",e.isOpen())("aria-controls",e.optionsId)("aria-activedescendant",e.activeOptionId()),DE(2),iT(e.openIndicator()?4:-1),DE(),iT(e.isSubmenu()?5:-1),DE(2),Qg("hidden",e.searchable()===false),DE(),hg("aria-expanded",e.isOpen())("aria-controls",e.optionsId)("aria-activedescendant",e.activeOptionId()),DE(2),Qg("searching",e.searchable()&&e.inputValue()!==""),gg("id",e.optionsId),hg("aria-activedescendant",e.activeOptionId()));},dependencies:[oe$1,Fe,N$1],styles:[`sh-menu{--menu-mh: 20rem;display:inline-flex;position:relative}sh-menu.disabled{opacity:.5;pointer-events:none}sh-menu.stretch{width:100%}sh-menu.stretch [trigger]>*{width:100%}sh-menu.has-search sh-popover .options [title]{position:sticky;border-bottom:var(--border-10)}sh-menu.has-search .form-field-wrap{margin:.5rem .5rem 0}sh-menu.has-search .options{margin:.25rem 0 0}sh-menu.multi-layer [trigger]:has(sh-icon.open-indicator).is-open .open-indicator{transform:translateY(-50%) rotate(-90deg)}sh-menu.multi-layer [trigger]:has(sh-icon.open-indicator){display:flex}sh-menu.multi-layer [trigger]:has(sh-icon.open-indicator) .open-indicator{right:1rem}sh-menu.multi-layer [trigger] button:first-child{margin-top:0}sh-menu [trigger]:has(sh-icon.open-indicator){position:relative}sh-menu [trigger]:has(sh-icon.open-indicator)>:first-child{padding-right:2rem}sh-menu [trigger]:has(sh-icon.open-indicator) .open-indicator{position:absolute;right:.5rem;top:50%;transform:translateY(-50%);color:var(--base-8);font-size:1rem;font-weight:inherit;pointer-events:none;transition:transform 75ms ease-in-out}sh-menu [trigger]:has(sh-icon.open-indicator).is-open .open-indicator{transform:translateY(-50%) rotate(-180deg)}sh-menu [trigger]:has(sh-icon.submenu-indicator){position:relative}sh-menu [trigger]:has(sh-icon.submenu-indicator)>:first-child{padding-right:2rem!important}sh-menu [trigger]:has(sh-icon.submenu-indicator) .submenu-indicator{position:absolute;right:1rem;top:50%;transform:translateY(-50%);color:var(--base-8);font-size:1rem;font-weight:inherit;pointer-events:none;transition:transform 75ms ease-in-out}sh-menu [trigger]:has(sh-icon.submenu-indicator).is-open .submenu-indicator{transform:translateY(-50%) rotate(90deg)}sh-menu sh-popover{flex:1 0}sh-menu sh-popover .popover{padding:0}sh-menu sh-popover .popover-content{overflow:hidden}sh-menu sh-popover .form-field-wrap sh-form-field{z-index:10;background-color:var(--base-1)}sh-menu sh-popover .form-field-wrap sh-form-field.hidden{opacity:0;height:0;width:0;min-width:0;min-height:0;margin:0}sh-menu sh-popover .options{z-index:2;position:relative;display:flex;flex-direction:column;gap:.25rem;padding:0;margin:0;max-height:var(--menu-mh);overflow:auto}sh-menu sh-popover .options sh-menu:first-child,sh-menu sh-popover .options button:first-child{margin-top:.5rem}sh-menu sh-popover .options.searching button[disabled]{display:none}sh-menu sh-popover .options.searching button[value="0"]{display:none}sh-menu sh-popover .options.searching>*:not(button){display:none}sh-menu sh-popover .options:after{content:"";display:block;width:100%;min-height:.25rem;order:9999999}sh-menu sh-popover .options [title]{font:var(--paragraph-30);color:var(--base-8);padding:.5rem .75rem;margin:0;-webkit-user-select:none;user-select:none;position:relative;top:0;z-index:10;background-color:var(--base-1)}sh-menu sh-popover .options button{display:flex;justify-content:flex-start;align-items:center;text-align:left;height:auto;margin:0 .5rem;padding:.25rem .5rem;gap:0 .5rem;width:calc(100% - 1rem);border-radius:var(--shape-2);appearance:none;background-color:transparent;border:0;cursor:pointer;color:var(--base-12);transition:transform 125ms linear;transform:scale(1)}sh-menu sh-popover .options button:before{content:"";min-height:1.5rem;display:inline-block;width:0;margin-right:-.5rem}sh-menu sh-popover .options button:active{transform:scale(.98)}sh-menu sh-popover .options button[disabled]{opacity:.3;cursor:initial}sh-menu sh-popover .options button[disabled]:hover{background-color:transparent}sh-menu sh-popover .options button [suffix]{order:999;color:var(--base-8);font:var(--paragraph-30);justify-self:flex-end;display:inline-flex;flex:1 0;justify-content:flex-end}sh-menu sh-popover .options button sh-icon{font-size:1rem}sh-menu sh-popover .options button.active,sh-menu sh-popover .options button:hover{background-color:var(--base-2);color:var(--base-12)}sh-menu sh-popover .options button.focused{background-color:var(--primary-2);color:var(--base-12)}sh-menu sh-popover .options button.focused:hover{background-color:var(--primary-3)}
1
+ import {o as oe$1,F as Fe}from'./chunk-D3SUPUQT.js';import {T,ad as Mr,bC as ED,bv as N,N as Nt,b as I1,af as E1,ac as v1,G as Ge,E as D1,z as za,c1 as oe,c2 as ae,bw as le,h as hw,d as N$1,l as vT,M as aC,Q as Qi,p as cm,r as kd,U as UC,O as Od,V as Vg,X as cC,f as aT,$ as $l,j as vg,x as am,A as yg,a3 as KC,C as CE,Y as Yg,aC as mg,i as cT,W as Wg,K as fC,w as jC}from'./main-QLXVXD6E.js';var X=["inputRef"],Z=["optionsRef"],ee=["*",[["","menu",""]]],te=["*","[menu]"],ie=()=>({closeOnButton:false,closeOnEsc:true});function ne(a,J){a&1&&(Qi(0,"sh-icon",5),jC(1,"caret-down"),$l());}function se(a,J){a&1&&(Qi(0,"sh-icon",6),jC(1,"caret-right"),$l());}var m=[],ve=(()=>{class a{constructor(){this.#i=T(Mr),this.#t=T(ED),this.#e=T(N),this.parentMenu=T(a,{optional:true,skipSelf:true}),this.isSubmenu=Nt(()=>this.parentMenu!==null),this.asMultiLayer=I1(false),this.openIndicator=I1(false),this.disabled=I1(false),this.customOptionElementSelectors=I1(["button"]),this.keepClickedOptionActive=I1(false),this.closeOnClick=I1(true),this.isOpen=E1(false),this.closed=v1(),this.searchable=I1(false),this.activeOptionIndex=Ge(-1),this.inputRef=D1("inputRef"),this.optionsRef=D1("optionsRef"),this.openMenusEffect=za(t=>{this.isOpen()&&m.push(this),t(()=>{let i=m.indexOf(this);i>-1&&m.splice(i,1);});}),this.options=oe(this.optionsRef,this.customOptionElementSelectors),this.optionsEl=Nt(()=>{let t=this.optionsRef()?.nativeElement;return t?this.options.signal().filter(i=>i.disabled?false:i.closest(".options")===t):[]}),this.inputValue=ae(this.inputRef),this.optionsId=le(),this.activeOptionId=Ge(void 0),this.abortController=null,this.optionsEffect=za(t=>{if(this.abortController!==null&&(this.abortController.abort(),this.abortController=null),!this.isOpen())return;if(this.searchable()&&this.#e.pause(),t(()=>{this.searchable()&&this.#e.resume();}),this.abortController=new AbortController,!this.searchable())this.#i.documentElement.addEventListener("keydown",this.keyDownEventListener,{signal:this.abortController.signal});else {let n=this.inputRef()?.nativeElement;n&&n.addEventListener("keydown",this.keyDownEventListener,{signal:this.abortController.signal});}let e=this.inputRef()?.nativeElement;e&&(queueMicrotask(()=>e.focus()),this.closeOnClick()||this.optionsRef()?.nativeElement?.addEventListener("click",s=>{let o=s.target,r=this.activeElements();if(!r.length){let c=this.optionsEl();this.activeElements.set(c),r=c;}let p=r.findIndex(c=>c===o);p>-1&&(this.activeOptionIndex.set(p),e.focus());}));}),this.keyDownEventListener=t=>{if(m.at(-1)!==this)return;let i=this.activeOptionIndex(),e=this.searchable();if(this.#e.matches(t,"menu.next"))t.preventDefault(),this.activeOptionIndex.set(this.nextActiveIndex(i));else if(this.#e.matches(t,"menu.prev"))t.preventDefault(),this.activeOptionIndex.set(this.prevActiveIndex(i));else if(this.#e.matches(t,"menu.open-submenu")){if(!e&&i>-1){let n=this.activeElements()[i];if(n.parentElement?.hasAttribute("trigger")){t.preventDefault();let o=new CustomEvent("ship-menu-open",{bubbles:true,cancelable:true,detail:{keyboard:true}});n.dispatchEvent(o);}}}else if(this.#e.matches(t,"menu.close-submenu"))!e&&this.isSubmenu()&&(t.preventDefault(),this.close("closed"));else if(this.#e.matches(t,"menu.select")){let n=t.key==="Enter",s=t.key===" "||t.key==="Spacebar";if((n||s&&!e)&&(t.preventDefault(),i>-1)){let o=this.activeElements()[i];if(o.parentElement?.hasAttribute("trigger")){let p=new CustomEvent("ship-menu-open",{bubbles:true,cancelable:true,detail:{keyboard:true}});o.dispatchEvent(p);}else o.click(),o.querySelector("sh-checkbox")||queueMicrotask(()=>this.close("active"));}}else if(t.key==="Tab"){let n=this.activeElements();if(!n.length){let s=this.optionsEl();this.activeElements.set(s),n=s;}t.shiftKey?i<=0?(t.preventDefault(),this.close("closed")):(t.preventDefault(),this.activeOptionIndex.set(this.prevActiveIndex(i))):i>=n.length-1?(t.preventDefault(),this.close("closed")):(t.preventDefault(),this.activeOptionIndex.set(this.nextActiveIndex(i)));}},this._lastElementList=[],this.activeElements=Ge([]),this.lastInputValue="",this.inputValueEffect=za(()=>{if(!this.searchable()){this.activeElements.set(this.optionsEl());return}let i=(this.inputValue()??"").toLowerCase();if(this.#n(),!i||i===""){let n=this.optionsEl();this.activeElements.set(n),this._lastElementList=n;for(let s=0;s<n.length;s++)this.#t.removeStyle(n[s],"order"),n[s].id||(n[s].id=`${this.optionsId}-option-${s}`),n[s].setAttribute("role","option");return}if(!i||i==="")return;let e=this._lastElementList.length&&i.length>this.lastInputValue.length?this._lastElementList:this.optionsEl();this.lastInputValue=i;for(let n=0;n<e.length;n++){let s=e[n],o=s.textContent?.toLowerCase()||"",r=this.#s(o,i);s.value=r;}e=e.filter(n=>n.value>0).sort((n,s)=>s.value-n.value);for(let n=0;n<e.length;n++)this.#t.setStyle(e[n],"order",n);this.activeElements.set(e),this._lastElementList=e;for(let n=0;n<e.length;n++)e[n].id||(e[n].id=`${this.optionsId}-option-${n}`),e[n].setAttribute("role","option");}),this.activeOptionIndexEffect=za(()=>{let t=this.activeElements(),i=this.activeOptionIndex();for(let e=0;e<t.length;e++)t[e].classList.remove("active"),t[e].removeAttribute("aria-selected");if(i>-1){let e=t[i];e.scrollIntoView({block:"center"}),e.classList.add("active"),e.setAttribute("aria-selected","true"),this.activeOptionId.set(e.id);}else this.activeOptionId.set(void 0);});}#i;#t;#e;toggleIsOpen(t){t.preventDefault(),t.stopPropagation(),!this.disabled()&&(this.isOpen()?this.close("fromPopover"):this.open());}open(){this.disabled()||(this.isOpen.set(true),this.searchable()&&setTimeout(()=>this.inputRef()?.nativeElement.focus()));}onShipMenuOpen(t){t.preventDefault(),t.stopPropagation(),this.open(),t.detail?.keyboard&&setTimeout(()=>{this.activeOptionIndex.set(0);},50);}#s(t,i){if(!i)return 0;let e=0,n=-1,s=0,o=true;for(let r=0;r<i.length;r++){let p=i[r];if(t.length>n+1&&t[n+1]===p)e+=r===0?100:150,n++,s++;else {let c=t.indexOf(p,n+1);if(r>0&&(o=false),c===-1)return 0;e+=100,n=c,s++;}}return o&&i.length===s&&(e+=1e3),e+=s*20,e}nextActiveIndex(t){let i=this.activeElements();if(!i.length){let n=this.optionsEl();this.activeElements.set(n),i=n;}if(t===-1||t===i.length-1)return 0;let e=t+1;return i[e].disabled?this.nextActiveIndex(e):e}prevActiveIndex(t){let i=this.activeElements();if(!i.length){let n=this.optionsEl();this.activeElements.set(n),i=n;}if(t===0||t===-1)return i.length-1;let e=t-1;return i[e].disabled?this.prevActiveIndex(e):e}close(t="closed",i){this.inputValue.set("");let e=this.inputRef()?.nativeElement;if(e&&(e.value=""),this.closeOnClick()&&((!this.keepClickedOptionActive()||t==="closed")&&this.#n(),this.isOpen.set(false),this.closed.emit(t==="active"),this.isSubmenu())){let n=this.parentMenu?.inputRef()?.nativeElement;n&&queueMicrotask(()=>n.focus());}}#n(){this.activeOptionIndex.set(-1);let t=this.optionsEl();for(let i=0;i<t.length;i++)t[i].classList.remove("active"),t[i].removeAttribute("aria-selected");}ngOnDestroy(){this.abortController&&(this.abortController.abort(),this.abortController=null);let t=m.indexOf(this);t>-1&&m.splice(t,1);}static{this.\u0275fac=function(i){return new(i||a)};}static{this.\u0275cmp=hw({type:a,selectors:[["sh-menu"]],viewQuery:function(i,e){i&1&&Wg(e.inputRef,X,5)(e.optionsRef,Z,5),i&2&&fC(2);},hostVars:6,hostBindings:function(i,e){i&1&&Vg("ship-menu-open",function(s){return e.onShipMenuOpen(s)}),i&2&&Yg("disabled",e.disabled())("has-search",e.searchable())("multi-layer",e.asMultiLayer());},inputs:{asMultiLayer:[1,"asMultiLayer"],openIndicator:[1,"openIndicator"],disabled:[1,"disabled"],customOptionElementSelectors:[1,"customOptionElementSelectors"],keepClickedOptionActive:[1,"keepClickedOptionActive"],closeOnClick:[1,"closeOnClick"],isOpen:[1,"isOpen"],searchable:[1,"searchable"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:te,decls:13,vars:21,consts:[["formFieldWrapper",""],["inputRef",""],["optionsRef",""],[3,"isOpenChange","closed","isOpen","disableOpenByClick","asMultiLayer","options"],["trigger","","role","combobox","aria-haspopup","listbox",3,"click"],[1,"open-indicator"],[1,"submenu-indicator"],[1,"form-field-wrap"],[1,"small","stretch"],["type","text","placeholder","Search","role","combobox","aria-autocomplete","list"],["role","listbox",1,"options",3,"click","id"]],template:function(i,e){if(i&1){let n=vT();aC(ee),Qi(0,"sh-popover",3,0),cm("isOpenChange",function(o){return kd(n),UC(e.isOpen,o)||(e.isOpen=o),Od(o)}),Vg("closed",function(){return e.close("fromPopover")}),Qi(2,"div",4),Vg("click",function(o){return e.toggleIsOpen(o)}),cC(3),aT(4,ne,2,0,"sh-icon",5),aT(5,se,2,0,"sh-icon",6),$l(),Qi(6,"div",7)(7,"sh-form-field",8),vg(8,"input",9,1),$l()(),Qi(10,"div",10,2),Vg("click",function(){return e.close("active")}),cC(12,1),$l()();}i&2&&(am("isOpen",e.isOpen),yg("disableOpenByClick",true)("asMultiLayer",e.asMultiLayer())("options",KC(20,ie)),CE(2),Yg("is-open",e.isOpen()),mg("aria-expanded",e.isOpen())("aria-controls",e.optionsId)("aria-activedescendant",e.activeOptionId()),CE(2),cT(e.openIndicator()?4:-1),CE(),cT(e.isSubmenu()?5:-1),CE(2),Yg("hidden",e.searchable()===false),CE(),mg("aria-expanded",e.isOpen())("aria-controls",e.optionsId)("aria-activedescendant",e.activeOptionId()),CE(2),Yg("searching",e.searchable()&&e.inputValue()!==""),yg("id",e.optionsId),mg("aria-activedescendant",e.activeOptionId()));},dependencies:[oe$1,Fe,N$1],styles:[`sh-menu{--menu-mh: 20rem;display:inline-flex;position:relative}sh-menu.disabled{opacity:.5;pointer-events:none}sh-menu.stretch{width:100%}sh-menu.stretch [trigger]>*{width:100%}sh-menu.has-search sh-popover .options [title]{position:sticky;border-bottom:var(--border-10)}sh-menu.has-search .form-field-wrap{margin:.5rem .5rem 0}sh-menu.has-search .options{margin:.25rem 0 0}sh-menu.multi-layer [trigger]:has(sh-icon.open-indicator).is-open .open-indicator{transform:translateY(-50%) rotate(-90deg)}sh-menu.multi-layer [trigger]:has(sh-icon.open-indicator){display:flex}sh-menu.multi-layer [trigger]:has(sh-icon.open-indicator) .open-indicator{right:1rem}sh-menu.multi-layer [trigger] button:first-child{margin-top:0}sh-menu [trigger]:has(sh-icon.open-indicator){position:relative}sh-menu [trigger]:has(sh-icon.open-indicator)>:first-child{padding-right:2rem}sh-menu [trigger]:has(sh-icon.open-indicator) .open-indicator{position:absolute;right:.5rem;top:50%;transform:translateY(-50%);color:var(--base-8);font-size:1rem;font-weight:inherit;pointer-events:none;transition:transform 75ms ease-in-out}sh-menu [trigger]:has(sh-icon.open-indicator).is-open .open-indicator{transform:translateY(-50%) rotate(-180deg)}sh-menu [trigger]:has(sh-icon.submenu-indicator){position:relative}sh-menu [trigger]:has(sh-icon.submenu-indicator)>:first-child{padding-right:2rem!important}sh-menu [trigger]:has(sh-icon.submenu-indicator) .submenu-indicator{position:absolute;right:1rem;top:50%;transform:translateY(-50%);color:var(--base-8);font-size:1rem;font-weight:inherit;pointer-events:none;transition:transform 75ms ease-in-out}sh-menu [trigger]:has(sh-icon.submenu-indicator).is-open .submenu-indicator{transform:translateY(-50%) rotate(90deg)}sh-menu sh-popover{flex:1 0}sh-menu sh-popover .popover{padding:0}sh-menu sh-popover .popover-content{overflow:hidden}sh-menu sh-popover .form-field-wrap sh-form-field{z-index:10;background-color:var(--base-1)}sh-menu sh-popover .form-field-wrap sh-form-field.hidden{opacity:0;height:0;width:0;min-width:0;min-height:0;margin:0}sh-menu sh-popover .options{z-index:2;position:relative;display:flex;flex-direction:column;gap:.25rem;padding:0;margin:0;max-height:var(--menu-mh);overflow:auto}sh-menu sh-popover .options sh-menu:first-child,sh-menu sh-popover .options button:first-child{margin-top:.5rem}sh-menu sh-popover .options.searching button[disabled]{display:none}sh-menu sh-popover .options.searching button[value="0"]{display:none}sh-menu sh-popover .options.searching>*:not(button){display:none}sh-menu sh-popover .options:after{content:"";display:block;width:100%;min-height:.25rem;order:9999999}sh-menu sh-popover .options [title]{font:var(--paragraph-30);color:var(--base-8);padding:.5rem .75rem;margin:0;-webkit-user-select:none;user-select:none;position:relative;top:0;z-index:10;background-color:var(--base-1)}sh-menu sh-popover .options button{display:flex;justify-content:flex-start;align-items:center;text-align:left;height:auto;margin:0 .5rem;padding:.25rem .5rem;gap:0 .5rem;width:calc(100% - 1rem);border-radius:var(--shape-2);appearance:none;background-color:transparent;border:0;cursor:pointer;color:var(--base-12);transition:transform 125ms linear;transform:scale(1)}sh-menu sh-popover .options button:before{content:"";min-height:1.5rem;display:inline-block;width:0;margin-right:-.5rem}sh-menu sh-popover .options button:active{transform:scale(.98)}sh-menu sh-popover .options button[disabled]{opacity:.3;cursor:initial}sh-menu sh-popover .options button[disabled]:hover{background-color:transparent}sh-menu sh-popover .options button [suffix]{order:999;color:var(--base-8);font:var(--paragraph-30);justify-self:flex-end;display:inline-flex;flex:1 0;justify-content:flex-end}sh-menu sh-popover .options button sh-icon{font-size:1rem}sh-menu sh-popover .options button.active,sh-menu sh-popover .options button:hover{background-color:var(--base-2);color:var(--base-12)}sh-menu sh-popover .options button.focused{background-color:var(--primary-2);color:var(--base-12)}sh-menu sh-popover .options button.focused:hover{background-color:var(--primary-3)}
2
2
  `],encapsulation:2});}}return a})();export{ve as v};
@@ -1 +1 @@
1
- import {e as ee}from'./chunk-B0RBkC1E.js';import'./chunk-BB1pOOUx.js';import'./chunk-DN6f5jXR.js';import'./chunk-3RXp81pP.js';import'./chunk-CT9ziigM.js';import'./chunk-D5lj-fQk.js';import'./chunk-OLi7f6y7.js';import'./chunk-B2TXzbpy.js';import {T,m,d as dw,v,f as N,_ as _t,j as mg,Q as Qi,X as XT,H as Hl,O as Og,P as Pg,o as oT,D as DE,I as Qg,z as gg,a3 as QC,i as iT}from'./main-KFKZO6SJ.js';import {f}from'./chunk-DPNAj9Vc.js';import'./chunk-CRAg6SRo.js';import'./chunk-DuIUmwWN.js';import'./chunk-DipTNkHN.js';import'./chunk-Fw6nFDZK.js';import'./chunk-Ca1C9pJ0.js';import'./chunk-C-NgIZiF.js';import'./chunk-PVmXLw9b.js';import'./chunk-C7pjkqKB.js';var B=()=>["/backup/new"],G=()=>["/backup/import"],K=()=>["/backup/import-destination"];function U(r,s){r&1&&(Qi(0,"sh-card",11),mg(1,"img",15),Qi(2,"h3"),XT(3,7),Hl(),Qi(4,"p"),XT(5,8),Hl(),Qi(6,"button",13),Og(7,9),mg(8,"sh-icon"),Pg(),Hl()()),r&2&&(DE(6),gg("routerLink",QC(1,K)));}var p=class r{hasRestoreControlFilesOperation=T(m).hasRestoreControlFilesOperation;static \u0275fac=function(i){return new(i||r)};static \u0275cmp=dw({type:r,selectors:[["app-add-backup"]],decls:24,vars:7,consts:()=>{let s;s=$localize`Add a new backup`;let i;i=$localize`New backup`;let C;C=$localize`Configure a new backup. Choose your destination, source data and schedule.`;let m;m=$localize` Add a new backup ${"\uFFFD#13\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SH_ICON:`;let A;A=$localize`Import from file`;let S;S=$localize`Import backup configuration from a file. During import, you can adjust the settings.`;let P;P=$localize` Import from file ${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:upload-simple${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON:`;let T;T=$localize`Import from destination`;let g;g=$localize`Import one or more backup configurations from a remote destination.`;let E;return E=$localize` Import from destination ${"\uFFFD#8\uFFFD"}:START_TAG_SH_ICON:download-simple${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_SH_ICON:`,[s,i,C,m,A,S,P,T,g,E,[1,"backup-types"],[1,"type-a"],["src","assets/images/new-backup.png"],["shButton","",1,"raised","primary",3,"routerLink"],["src","assets/images/backup-from-config.png"],["src","assets/images/backup-from-remote.png"]]},template:function(i,C){i&1&&(mg(0,"app-status-bar"),Qi(1,"section")(2,"h2"),XT(3,0),Hl(),Qi(4,"div",10)(5,"sh-card",11),mg(6,"img",12),Qi(7,"h3"),XT(8,1),Hl(),Qi(9,"p"),XT(10,2),Hl(),Qi(11,"button",13),Og(12,3),mg(13,"sh-icon"),Pg(),Hl()(),Qi(14,"sh-card",11),mg(15,"img",14),Qi(16,"h3"),XT(17,4),Hl(),Qi(18,"p"),XT(19,5),Hl(),Qi(20,"button",13),Og(21,6),mg(22,"sh-icon"),Pg(),Hl()(),oT(23,U,9,2,"sh-card",11),Hl()()),i&2&&(DE(4),Qg("three-column",C.hasRestoreControlFilesOperation()),DE(7),gg("routerLink",QC(5,B)),DE(9),gg("routerLink",QC(6,G)),DE(3),iT(C.hasRestoreControlFilesOperation()?23:-1));},dependencies:[ee,v,f,N,_t],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;align-items:center;flex-direction:column;gap:2rem;padding:2rem 0}div.backup-types[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem;max-width:43.75rem;padding:0 2rem}div.backup-types.three-column[_ngcontent-%COMP%]{grid-template-columns:1fr 1fr 1fr;max-width:65.625rem}@media only screen and (max-width:768px){div.backup-types[_ngcontent-%COMP%]{grid-template-columns:1fr}}sh-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:1rem;padding-bottom:3rem}sh-card[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:18.75rem}sh-card[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;text-align:center;width:75%}"]})};export{p as default};
1
+ import {e as ee}from'./chunk-CzJ3-6Pu.js';import'./chunk-oTpkLrqH.js';import'./chunk-dCFVYHva.js';import'./chunk--kVw-BwM.js';import'./chunk-DuTbfCdT.js';import'./chunk-DKacf9Tj.js';import'./chunk-CI8lsvKT.js';import'./chunk-C5p3bQwH.js';import {T,m,h as hw,v,d as N,_ as _t,j as vg,Q as Qi,n as nC,$ as $l,L as Lg,F as Fg,f as aT,C as CE,Y as Yg,A as yg,a3 as KC,i as cT}from'./main-QLXVXD6E.js';import {f}from'./chunk-C3KPTLNN.js';import'./chunk-PONAC1Ya.js';import'./chunk-D3SUPUQT.js';import'./chunk-DoYGADYB.js';import'./chunk-Crs56mDy.js';import'./chunk-Bcxzhjj8.js';import'./chunk-BYJ0fSUP.js';import'./chunk-D2aWqPl_.js';import'./chunk-D3d-eReU.js';var B=()=>["/backup/new"],G=()=>["/backup/import"],K=()=>["/backup/import-destination"];function U(r,s){r&1&&(Qi(0,"sh-card",11),vg(1,"img",15),Qi(2,"h3"),nC(3,7),$l(),Qi(4,"p"),nC(5,8),$l(),Qi(6,"button",13),Lg(7,9),vg(8,"sh-icon"),Fg(),$l()()),r&2&&(CE(6),yg("routerLink",KC(1,K)));}var p=class r{hasRestoreControlFilesOperation=T(m).hasRestoreControlFilesOperation;static \u0275fac=function(i){return new(i||r)};static \u0275cmp=hw({type:r,selectors:[["app-add-backup"]],decls:24,vars:7,consts:()=>{let s;s=$localize`Add a new backup`;let i;i=$localize`New backup`;let C;C=$localize`Configure a new backup. Choose your destination, source data and schedule.`;let m;m=$localize` Add a new backup ${"\uFFFD#13\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SH_ICON:`;let A;A=$localize`Import from file`;let S;S=$localize`Import backup configuration from a file. During import, you can adjust the settings.`;let P;P=$localize` Import from file ${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:upload-simple${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON:`;let T;T=$localize`Import from destination`;let g;g=$localize`Import one or more backup configurations from a remote destination.`;let E;return E=$localize` Import from destination ${"\uFFFD#8\uFFFD"}:START_TAG_SH_ICON:download-simple${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_SH_ICON:`,[s,i,C,m,A,S,P,T,g,E,[1,"backup-types"],[1,"type-a"],["src","assets/images/new-backup.png"],["shButton","",1,"raised","primary",3,"routerLink"],["src","assets/images/backup-from-config.png"],["src","assets/images/backup-from-remote.png"]]},template:function(i,C){i&1&&(vg(0,"app-status-bar"),Qi(1,"section")(2,"h2"),nC(3,0),$l(),Qi(4,"div",10)(5,"sh-card",11),vg(6,"img",12),Qi(7,"h3"),nC(8,1),$l(),Qi(9,"p"),nC(10,2),$l(),Qi(11,"button",13),Lg(12,3),vg(13,"sh-icon"),Fg(),$l()(),Qi(14,"sh-card",11),vg(15,"img",14),Qi(16,"h3"),nC(17,4),$l(),Qi(18,"p"),nC(19,5),$l(),Qi(20,"button",13),Lg(21,6),vg(22,"sh-icon"),Fg(),$l()(),aT(23,U,9,2,"sh-card",11),$l()()),i&2&&(CE(4),Yg("three-column",C.hasRestoreControlFilesOperation()),CE(7),yg("routerLink",KC(5,B)),CE(9),yg("routerLink",KC(6,G)),CE(3),cT(C.hasRestoreControlFilesOperation()?23:-1));},dependencies:[ee,v,f,N,_t],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;align-items:center;flex-direction:column;gap:2rem;padding:2rem 0}div.backup-types[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem;max-width:43.75rem;padding:0 2rem}div.backup-types.three-column[_ngcontent-%COMP%]{grid-template-columns:1fr 1fr 1fr;max-width:65.625rem}@media only screen and (max-width:768px){div.backup-types[_ngcontent-%COMP%]{grid-template-columns:1fr}}sh-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:1rem;padding-bottom:3rem}sh-card[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:18.75rem}sh-card[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;text-align:center;width:75%}"]})};export{p as default};
@@ -1 +1 @@
1
- import v$1 from'./chunk-CgcnOoRq.js';import'./chunk-C6QX7znk.js';import'./chunk-DFEb6rgg.js';import {k}from'./chunk-BB1pOOUx.js';import'./chunk-DN6f5jXR.js';import {c}from'./chunk-wyNyzSXi.js';import'./chunk-B2TXzbpy.js';import {T,aX as y,ab as C,a6 as be$1,U as Ue,N as Nt,ba as h,d as dw,bb as Fi,bc as Jt,bd as Kn,v,f as N,be as pi,aJ as ci,aH as m,b1 as m$1,Q as Qi,o as oT,bf as ig,q as PC,H as Hl,X as XT,j as mg,F as Fg,I as Qg,D as DE,i as iT,z as gg,E as nm,aa as Gl,bg as Q,G as Ga,aZ as ee,k as gT,aM as tb,a1 as cT,S as Sd,n as nC,x as xd,aN as ob,aB as rm,aR as rb,a2 as lT,as as Hd,bh as Bd,aP as Ul,aQ as Wl,ap as sT}from'./main-KFKZO6SJ.js';import {f}from'./chunk-DPNAj9Vc.js';import {d}from'./chunk-CRAg6SRo.js';import'./chunk-DipTNkHN.js';import'./chunk-PVmXLw9b.js';var U=class r{#e=T(y);#n=T(Q);#i=Ue([]);recentFiles=this.#i.asReadonly();#r=5;#s=Ue(null);etaData=this.#s.asReadonly();#a=null;#t=null;#o=null;recentFileEffect=Ga(()=>{let i=this.#e.statusData();i&&i.CurrentFilename&&i.CurrentFilesize!==void 0&&this.#c(i.CurrentFilename,i.CurrentFilesize);});#c(i,e){let s=new Date;this.#i.update(c=>c.length>0&&c[0].filename===i?c:[{filename:i,filesize:e,timestamp:s},...c].slice(0,this.#r));}activateView(){this.#a=new Date;let i=this.#e.statusData();i&&i.ProcessedFileCount!==void 0&&i.ProcessedFileSize!==void 0&&(this.#t={files:i.ProcessedFileCount,bytes:i.ProcessedFileSize}),this.#o=setInterval(()=>{this.#l();},1e3);}deactivateView(){this.#a=null,this.#t=null,this.#o&&(clearInterval(this.#o),this.#o=null);}#l(){if(!this.#a||!this.#t)return;let i=this.#e.statusData();if(!i)return;let e=new Date,s=(e.getTime()-this.#a.getTime())/1e3;if(s<5)return;let c=i.ProcessedFileCount||0,P=i.ProcessedFileSize||0,I=c-this.#t.files,k=P-this.#t.bytes,x=I/s,M=k/s,A=(i.TotalFileCount||0)-c,u=(i.TotalFileSize||0)-P,O=null,T=null;x>0&&(O=A/x),M>0&&(T=u/M);let R=null,w="bytes";if(O!==null&&T!==null){let Se=Math.max(O,T);R=new Date(e.getTime()+Se*1e3),w=O>T?"files":"bytes";}else O!==null?(R=new Date(e.getTime()+O*1e3),w="files"):T!==null&&(R=new Date(e.getTime()+T*1e3),w="bytes");this.#s.set({startTime:this.#a,filesProcessedAtStart:this.#t.files,bytesProcessedAtStart:this.#t.bytes,currentFilesPerSecond:x,currentBytesPerSecond:M,estimatedCompletion:R,metric:w});}static \u0275fac=function(e){return new(e||r)};static \u0275prov=ee({token:r,factory:r.\u0275fac,providedIn:"root"})};function xe(r,i){if(r&1&&(Qi(0,"div",42)(1,"span",20),PC(2,"Processing"),Hl(),Qi(3,"sh-list",43)(4,"div",44)(5,"sh-icon"),PC(6,"file"),Hl(),Qi(7,"div",45)(8,"span",46),PC(9),Hl(),Qi(10,"span",47),PC(11),tb(12,"bytes"),Hl()()()()()),r&2){let e=nC(2);DE(8),gg("title",e.statusData()?.CurrentFilename),DE(),Gl(" ",e.statusData()?.CurrentFilename," "),DE(2),nm(rb(12,3,e.statusData()?.CurrentFilesize));}}function Me(r,i){if(r&1&&(Qi(0,"div",35)(1,"span",46),PC(2),Hl(),Qi(3,"span",47),PC(4),tb(5,"bytes"),Hl()()),r&2){let e=i.$implicit;DE(),gg("title",e.filename),DE(),nm(e.filename),DE(2),nm(rb(5,3,e.filesize));}}function Oe(r,i){r&1&&(Qi(0,"div",36),XT(1,2),Hl());}function Te(r,i){if(r&1&&(Qi(0,"sh-list")(1,"div",48)(2,"span",20),PC(3,"ETA"),Hl(),Qi(4,"span",21),PC(5),tb(6,"date"),Qi(7,"span",49),PC(8),tb(9,"relativeTime"),Hl()()(),Qi(10,"div",50)(11,"span",20),PC(12,"Files/s"),Hl(),Qi(13,"span",21),PC(14),tb(15,"number"),Hl()(),Qi(16,"div",50)(17,"span",20),PC(18,"Upload Speed"),Hl(),Qi(19,"span",21),PC(20),tb(21,"bytes"),Hl()()()),r&2){let e=nC(2);DE(5),Gl(" ",ob(6,4,e.etaData()?.estimatedCompletion,"mediumTime")," "),DE(3),Gl(" (",rb(9,7,e.etaData()?.estimatedCompletion),") "),DE(6),Gl(" ",ob(15,9,e.etaData()?.currentFilesPerSecond,"1.1-1")," "),DE(6),Gl("",rb(21,12,e.etaData()?.currentBytesPerSecond),"/s");}}function ve(r,i){if(r&1&&(Qi(0,"div",53)(1,"div",54)(2,"span",55),PC(3),Hl(),Qi(4,"span",56),PC(5),tb(6,"bytes"),Hl()(),mg(7,"sh-progress-bar",57),Hl()),r&2){let e=i.$implicit;DE(2),gg("title",e.BackendPath),DE(),nm(e.BackendPath),DE(2),Gl("",rb(6,4,e.BackendSpeed),"/s"),DE(2),gg("value",(e.BackendFileProgress||0)/(e.BackendFileSize||1)*100);}}function he(r,i){if(r&1&&(Qi(0,"div",51)(1,"sh-list"),ig(2,ve,8,6,"div",52),Hl()()),r&2){let e=nC(2);DE(2),gg("ngForOf",e.statusData()?.ActiveTransfers);}}function ye(r,i){if(r&1){let e=gT();Qi(0,"sh-card")(1,"div",13)(2,"div",14)(3,"sh-icon",15),PC(4,"clock"),Hl(),Qi(5,"h2"),PC(6),Hl()()(),Qi(7,"div",26)(8,"div",27)(9,"span",28),PC(10),tb(11,"number"),Hl()(),mg(12,"sh-progress-bar",29),Qi(13,"sh-list")(14,"div",30)(15,"span",20),PC(16,"Files"),Hl(),Qi(17,"span",21),PC(18),Hl()(),Qi(19,"div",30)(20,"span",20),PC(21,"Size"),Hl(),Qi(22,"span",21),PC(23),tb(24,"bytes"),tb(25,"bytes"),Hl()()()()(),Qi(26,"sh-card")(27,"div",13)(28,"div",14)(29,"sh-icon",15),PC(30,"file"),Hl(),Qi(31,"h3"),PC(32,"Activity"),Hl()()(),Qi(33,"div",31),ig(34,xe,13,5,"div",32),Qi(35,"div",33)(36,"span",20),XT(37,1),Hl(),Qi(38,"sh-list",34),cT(39,Me,6,5,"div",35,sT),oT(41,Oe,2,0,"div",36),Hl()()()(),Qi(42,"sh-card")(43,"div",13)(44,"div",14)(45,"sh-icon",15),PC(46,"gauge"),Hl(),Qi(47,"h3"),PC(48,"Performance"),Hl()(),Qi(49,"div",37),PC(50),tb(51,"bytes"),Hl()(),Qi(52,"div",38),ig(53,Te,22,14,"sh-list",25),Qi(54,"div",39)(55,"button",40),Fg("click",function(){Sd(e);let c=nC();return xd(c.toggleTransfers())}),PC(56),Hl(),ig(57,he,3,1,"div",41),Hl()()();}if(r&2){let e=nC();DE(6),nm(e.statusText()),DE(4),Gl("",ob(11,13,e.progress(),"1.0-0"),"%"),DE(2),gg("value",e.progress()),DE(6),rm("",e.statusData()?.ProcessedFileCount," / ",e.statusData()?.TotalFileCount),DE(5),rm(" ",rb(24,16,e.statusData()?.ProcessedFileSize)," / ",rb(25,18,e.statusData()?.TotalFileSize)," "),DE(11),gg("ngIf",e.statusData()?.CurrentFilename),DE(5),lT(e.recentFiles()),DE(2),iT(e.recentFiles().length===0?41:-1),DE(9),Gl("",rb(51,20,e.statusData()?.BackendSpeed),"/s"),DE(3),gg("ngIf",e.etaData()),DE(3),Gl(" ",e.transfersExpanded()?"Hide Details":"Show Details"," "),DE(),gg("ngIf",e.transfersExpanded());}}function Ee(r,i){if(r&1&&(Qi(0,"sh-card",75)(1,"div",13)(2,"div",14)(3,"sh-icon",15),PC(4,"calendar"),Hl(),Qi(5,"h3"),XT(6,7),Hl()()(),Qi(7,"div",76)(8,"div",77)(9,"span",78),PC(10),Hl(),Qi(11,"div",79)(12,"span",80),PC(13),tb(14,"date"),Hl(),Qi(15,"span",81),PC(16),tb(17,"relativeTime"),Hl()()(),Qi(18,"sh-icon",82),PC(19,"caret-right"),Hl()()()),r&2){let e=nC(2);DE(10),nm(e.nextBackup().backup?.Name),DE(3),nm(ob(14,3,e.nextBackup().time,"medium")),DE(3),Gl("(",rb(17,6,e.nextBackup().time),")");}}function be(r,i){r&1&&(Qi(0,"span",74),XT(1,8),Hl());}function Ne(r,i){if(r&1){let e=gT();Qi(0,"sh-card",58)(1,"div",59)(2,"div",60)(3,"div",61),Hd(),Qi(4,"svg",62),mg(5,"circle",63),Hl(),Bd(),Qi(6,"sh-icon",64),XT(7,3),Hl()()(),Qi(8,"div",65)(9,"h2"),XT(10,4),Hl(),Qi(11,"p",66),XT(12,5),Hl()(),Qi(13,"div",67)(14,"button",68),Fg("click",function(){Sd(e);let c=nC();return xd(c.pauseResume())}),Qi(15,"sh-icon"),PC(16),Hl(),PC(17),Hl()()()(),ig(18,Ee,20,8,"sh-card",69),Qi(19,"sh-card",70)(20,"div",71)(21,"span",20),XT(22,6),Hl(),Qi(23,"div",72)(24,"span",73),PC(25),Hl(),oT(26,be,2,0,"span",74),Hl()()();}if(r&2){let e=nC();DE(14),gg("color",e.clientIsRunning()?"primary":"accent"),DE(2),nm(e.clientIsRunning()?"pause":"play"),DE(),Gl(" ",e.clientIsRunning()?"Pause Execution":"Resume Execution"," "),DE(),gg("ngIf",e.nextBackup()),DE(6),Qg("running",e.clientIsRunning()),DE(),nm(e.serverState()?.ProgramState),DE(),iT(e.clientIsRunning()?-1:26);}}function Ie(r,i){if(r&1&&(Qi(0,"div",35)(1,"span",46),PC(2),Hl(),Qi(3,"span",47),PC(4),tb(5,"bytes"),Hl()()),r&2){let e=i.$implicit;DE(),gg("title",e.filename),DE(),nm(e.filename),DE(2),nm(rb(5,3,e.filesize));}}function ke(r,i){if(r&1&&(Qi(0,"sh-card",83)(1,"div",13)(2,"div",14)(3,"sh-icon",15),PC(4,"clock-counter-clockwise"),Hl(),Qi(5,"h3"),XT(6,9),Hl()()(),Qi(7,"sh-list"),ig(8,Ie,6,5,"div",84),Hl()()),r&2){let e=nC();DE(8),gg("ngForOf",e.recentFiles());}}function Ae(r,i){if(r&1&&(Qi(0,"div",19)(1,"span",20),PC(2,"Next Task:"),Hl(),Qi(3,"div",21)(4,"div"),PC(5),Hl(),Qi(6,"div",49),PC(7),tb(8,"date"),tb(9,"relativeTime"),Hl()()()),r&2){let e=nC();DE(5),nm(e.nextBackup().backup?.Name),DE(2),rm(" ",ob(8,3,e.nextBackup().time,"medium")," (",rb(9,6,e.nextBackup().time),") ");}}function Re(r,i){if(r&1){let e=gT();Ul(0),Qi(1,"button",85),Fg("click",function(){Sd(e);let c=nC();return xd(c.stop())}),Qi(2,"sh-icon"),PC(3,"stop"),Hl(),PC(4," Stop "),Hl(),Qi(5,"button",85),Fg("click",function(){Sd(e);let c=nC();return xd(c.abort())}),Qi(6,"sh-icon"),PC(7,"x-circle"),Hl(),PC(8," Abort "),Hl(),Wl();}}var J=class r{#e=T(y);#n=T(U);#i=T(C);#r=T(be$1);statusData=this.#e.statusData;serverState=this.#e.serverState;recentFiles=this.#n.recentFiles;etaData=this.#n.etaData;transfersExpanded=Ue(false);clientIsRunning=this.#e.clientIsRunning;statusText=Nt(()=>{let i=this.statusData()?.Phase;return i?h[i]||i:""});progress=Nt(()=>{let i=this.statusData();return i?(i.OverallProgress||0)*100:0});nextBackup=Nt(()=>({backup:this.serverState()?.ProposedSchedule?.[0]?.backup,time:this.serverState()?.ProposedSchedule?.[0]?.Item2}));ngOnInit(){this.#n.activateView();}ngOnDestroy(){this.#n.deactivateView();}toggleTransfers(){this.transfersExpanded.update(i=>!i);}isTaskRunning(){return !!this.statusData()?.TaskID}taskStartTime(){return this.etaData()?.startTime}currentBackupId(){return this.statusData()?.BackupID}pauseResume(){if(this.clientIsRunning()){this.#r.open(k,{maxWidth:"550px",width:"100%"});return}this.#e.pauseResume().subscribe();}stop(){let i=this.statusData()?.TaskID;i&&this.#i.postApiV1TaskByTaskidStop({taskid:i}).subscribe();}abort(){let i=this.statusData()?.TaskID;i&&this.#i.postApiV1TaskByTaskidAbort({taskid:i}).subscribe();}static \u0275fac=function(e){return new(e||r)};static \u0275cmp=dw({type:r,selectors:[["app-status"]],decls:29,vars:12,consts:()=>{let i;i=$localize`Live Logs`;let e;e=$localize`Recently Processed`;let s;s=$localize`No recent files`;let c;c=$localize`check-bold`;let P;P=$localize`System Ready`;let I;I=$localize`Waiting for the next scheduled backup task.`;let k;k=$localize`Server State`;let x;x=$localize`Next Scheduled Task`;let M;M=$localize`Backups are currently paused`;let A;return A=$localize`Recent Activity`,[i,e,s,c,P,I,k,x,M,A,[1,"status-page"],["class","activity-card",4,"ngIf"],[1,"logs-card"],[1,"card-header"],[1,"header-titl-group"],[1,"header-icon"],[1,"logs-content"],[3,"polling","whenFilter","backupIdFilter"],[1,"server-status-section"],[1,"status-row"],[1,"label"],[1,"value"],["class","status-row",4,"ngIf"],[1,"actions"],["shButton","",3,"click"],[4,"ngIf"],[1,"progress-content"],[1,"percentage-display"],[1,"percentage-value"],[3,"value"],["item","",1,"stat-item"],[1,"files-content"],["class","current-file-section",4,"ngIf"],[1,"recent-files-section"],[1,"recent-files-list"],["item","",1,"file-item"],["item","",1,"empty-state"],[1,"aggregate-speed"],[1,"performance-content"],[1,"transfers-section"],["shButton","","size","small",1,"toggle-btn","ghost",3,"click"],["class","transfer-details",4,"ngIf"],[1,"current-file-section"],[1,"current-file-list"],["item","",1,"file-item","current"],[1,"file-details"],[1,"filename",3,"title"],[1,"filesize"],["item","",1,"eta-item"],[1,"sub-text"],["item","",1,"metric-item"],[1,"transfer-details"],["class","transfer-item","item","",4,"ngFor","ngForOf"],["item","",1,"transfer-item"],[1,"transfer-header"],[1,"path",3,"title"],[1,"speed"],[1,"mini-progress",3,"value"],[1,"idle-hero-card"],[1,"idle-content"],[1,"status-visual"],[1,"complete-status"],[1,"border-svg"],["cx","50","cy","50","r","45",1,"border-circle"],[1,"status-icon"],[1,"status-info"],[1,"status-description"],[1,"idle-actions"],["shButton","",3,"click","color"],["class","next-task-hero",4,"ngIf"],[1,"server-state-card"],[1,"state-content"],[1,"state-line"],[1,"status-badge"],[1,"warning-text"],[1,"next-task-hero"],[1,"next-task-content"],[1,"task-main"],[1,"task-name"],[1,"task-time-group"],[1,"task-time"],[1,"task-relative"],[1,"chevron"],[1,"activity-card"],["class","file-item","item","",4,"ngFor","ngForOf"],["shButton","","color","warn",3,"click"]]},template:function(e,s){e&1&&(Qi(0,"div",10),oT(1,ye,58,22)(2,Ne,27,8),ig(3,ke,9,1,"sh-card",11),Qi(4,"sh-card",12)(5,"div",13)(6,"div",14)(7,"sh-icon",15),PC(8,"list"),Hl(),Qi(9,"h3"),XT(10,0),Hl()()(),Qi(11,"div",16),mg(12,"app-logs-live",17),Hl()(),Qi(13,"sh-card")(14,"div",18)(15,"h3"),PC(16,"Server Status"),Hl(),Qi(17,"div",19)(18,"span",20),PC(19,"State:"),Hl(),Qi(20,"span",21),PC(21),Hl()(),ig(22,Ae,10,8,"div",22),Qi(23,"div",23)(24,"button",24),Fg("click",function(){return s.pauseResume()}),Qi(25,"sh-icon"),PC(26),Hl(),PC(27),Hl(),ig(28,Re,9,0,"ng-container",25),Hl()()()()),e&2&&(Qg("idle",!s.isTaskRunning()),DE(),iT(s.isTaskRunning()?1:2),DE(2),gg("ngIf",!s.isTaskRunning()&&s.recentFiles().length>0),DE(9),gg("polling",s.isTaskRunning())("whenFilter",s.taskStartTime()?.getTime())("backupIdFilter",s.currentBackupId()),DE(9),nm(s.serverState()?.ProgramState),DE(),gg("ngIf",s.nextBackup()),DE(4),nm(s.clientIsRunning()?"pause":"play_arrow"),DE(),Gl(" ",s.clientIsRunning()?"Pause":"Resume"," "),DE(),gg("ngIf",s.isTaskRunning()));},dependencies:[Fi,Jt,Kn,f,d,v,N,v$1,c,pi,ci,m,m$1],styles:["[_nghost-%COMP%]{display:block;padding:24px;max-width:1400px;margin:0 auto}.status-page[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr;gap:24px}@media(min-width:768px){.status-page[_ngcontent-%COMP%]{grid-template-columns:repeat(2,1fr)}}@media(min-width:1200px){.status-page[_ngcontent-%COMP%]{grid-template-columns:repeat(3,1fr)}}@media(min-width:1200px){.status-page[_ngcontent-%COMP%] .logs-card[_ngcontent-%COMP%], .status-page.idle[_ngcontent-%COMP%] .idle-hero-card[_ngcontent-%COMP%]{grid-column:span 2}.status-page.idle[_ngcontent-%COMP%] .next-task-hero[_ngcontent-%COMP%], .status-page.idle[_ngcontent-%COMP%] .server-state-card[_ngcontent-%COMP%]{grid-column:3}.status-page.idle[_ngcontent-%COMP%] .activity-card[_ngcontent-%COMP%], .status-page.idle[_ngcontent-%COMP%] .logs-card[_ngcontent-%COMP%]{grid-column:1/-1}}sh-card[_ngcontent-%COMP%]{height:100%;display:flex;flex-direction:column;--sh-card-padding: 24px}.card-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}.card-header[_ngcontent-%COMP%] .header-titl-group[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px}.card-header[_ngcontent-%COMP%] .header-titl-group[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{color:var(--primary-color);font-size:24px}.card-header[_ngcontent-%COMP%] .header-titl-group[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], .card-header[_ngcontent-%COMP%] .header-titl-group[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0;font-size:1.1rem;font-weight:600;color:var(--text-primary)}.progress-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:20px}.progress-content[_ngcontent-%COMP%] .percentage-display[_ngcontent-%COMP%]{text-align:center}.progress-content[_ngcontent-%COMP%] .percentage-display[_ngcontent-%COMP%] .percentage-value[_ngcontent-%COMP%]{font-size:3rem;font-weight:800;color:var(--primary-color);line-height:1}.progress-content[_ngcontent-%COMP%] sh-progress-bar[_ngcontent-%COMP%]{height:8px;border-radius:4px;--sh-progress-bar-track-color: var(--bg-secondary)}.progress-content[_ngcontent-%COMP%] .stat-item[_ngcontent-%COMP%]{display:flex;justify-content:space-between;width:100%}.progress-content[_ngcontent-%COMP%] .stat-item[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{color:var(--text-secondary);font-size:.9rem}.progress-content[_ngcontent-%COMP%] .stat-item[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-weight:600}.files-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px}.files-content[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{font-size:.75rem;text-transform:uppercase;color:var(--text-secondary);font-weight:600;margin-bottom:4px;display:block;padding-left:12px}.files-content[_ngcontent-%COMP%] .file-item[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%}.files-content[_ngcontent-%COMP%] .file-item.current[_ngcontent-%COMP%]{gap:12px;justify-content:flex-start}.files-content[_ngcontent-%COMP%] .file-item.current[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{color:var(--primary-color)}.files-content[_ngcontent-%COMP%] .file-item.current[_ngcontent-%COMP%] .file-details[_ngcontent-%COMP%]{display:flex;flex-direction:column;overflow:hidden}.files-content[_ngcontent-%COMP%] .file-item[_ngcontent-%COMP%] .filename[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-right:12px;font-size:.9rem;font-weight:500;flex:1}.files-content[_ngcontent-%COMP%] .file-item[_ngcontent-%COMP%] .filesize[_ngcontent-%COMP%]{color:var(--text-secondary);font-size:.85rem;font-variant-numeric:tabular-nums;white-space:nowrap}.files-content[_ngcontent-%COMP%] .empty-state[_ngcontent-%COMP%]{color:var(--text-secondary);font-style:italic;text-align:center;width:100%}.performance-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px}.performance-content[_ngcontent-%COMP%] .aggregate-speed[_ngcontent-%COMP%]{font-size:1.2rem;font-weight:700;color:var(--text-primary);font-variant-numeric:tabular-nums}.performance-content[_ngcontent-%COMP%] .eta-item[_ngcontent-%COMP%], .performance-content[_ngcontent-%COMP%] .metric-item[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%}.performance-content[_ngcontent-%COMP%] .eta-item[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .performance-content[_ngcontent-%COMP%] .metric-item[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{color:var(--text-secondary);font-size:.9rem}.performance-content[_ngcontent-%COMP%] .eta-item[_ngcontent-%COMP%] .value[_ngcontent-%COMP%], .performance-content[_ngcontent-%COMP%] .metric-item[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-weight:600;font-variant-numeric:tabular-nums}.performance-content[_ngcontent-%COMP%] .eta-item[_ngcontent-%COMP%] .value[_ngcontent-%COMP%] .sub-text[_ngcontent-%COMP%], .performance-content[_ngcontent-%COMP%] .metric-item[_ngcontent-%COMP%] .value[_ngcontent-%COMP%] .sub-text[_ngcontent-%COMP%]{color:var(--text-secondary);font-weight:400;font-size:.85rem;margin-left:4px}.performance-content[_ngcontent-%COMP%] .transfers-section[_ngcontent-%COMP%] .toggle-btn[_ngcontent-%COMP%]{width:100%;margin-bottom:12px}.performance-content[_ngcontent-%COMP%] .transfers-section[_ngcontent-%COMP%] .transfer-item[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;gap:4px}.performance-content[_ngcontent-%COMP%] .transfers-section[_ngcontent-%COMP%] .transfer-item[_ngcontent-%COMP%] .transfer-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;font-size:.85rem}.performance-content[_ngcontent-%COMP%] .transfers-section[_ngcontent-%COMP%] .transfer-item[_ngcontent-%COMP%] .transfer-header[_ngcontent-%COMP%] .path[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-right:12px}.performance-content[_ngcontent-%COMP%] .transfers-section[_ngcontent-%COMP%] .transfer-item[_ngcontent-%COMP%] .transfer-header[_ngcontent-%COMP%] .speed[_ngcontent-%COMP%]{color:var(--text-secondary);font-variant-numeric:tabular-nums}.performance-content[_ngcontent-%COMP%] .transfers-section[_ngcontent-%COMP%] .transfer-item[_ngcontent-%COMP%] .mini-progress[_ngcontent-%COMP%]{height:4px}.logs-content[_ngcontent-%COMP%] app-logs-live[_ngcontent-%COMP%]{height:350px;display:block}.status-badge[_ngcontent-%COMP%]{padding:4px 12px;border-radius:12px;background:var(--bg-secondary);color:var(--text-secondary);font-size:.8rem;font-weight:500;text-transform:uppercase}.status-badge.running[_ngcontent-%COMP%]{background:rgba(var(--primary-rgb),.1);color:var(--primary-color)}.actions-grid[_ngcontent-%COMP%]{margin-top:auto;display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:12px}.actions-grid[_ngcontent-%COMP%] .action-btn[_ngcontent-%COMP%]{width:100%;justify-content:center}.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:32px 0;gap:32px}@media(min-width:768px){.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%]{flex-direction:row;text-align:left;justify-content:space-around;padding:48px 0}}.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%] .status-visual[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%] .status-info[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:2rem;font-weight:700;margin-bottom:8px;color:var(--text-primary)}.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%] .status-info[_ngcontent-%COMP%] .status-description[_ngcontent-%COMP%]{color:var(--text-secondary);font-size:1.1rem;max-width:300px}.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%] .idle-actions[_ngcontent-%COMP%]{display:flex;align-items:center}.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%] .idle-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding-left:32px;padding-right:32px}.complete-status[_ngcontent-%COMP%]{position:relative;width:120px;height:120px;display:flex;justify-content:center;align-items:center;color:var(--primary-color)}.complete-status[_ngcontent-%COMP%] .status-icon[_ngcontent-%COMP%]{font-size:48px;opacity:0;animation:_ngcontent-%COMP%_reveal-icon .2s linear forwards;animation-delay:1s}.border-svg[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%}.border-circle[_ngcontent-%COMP%]{fill:none;stroke:var(--primary-color);stroke-width:5px;stroke-dasharray:282.74;stroke-dashoffset:282.74;animation:_ngcontent-%COMP%_draw-border 1.2s linear forwards}@keyframes _ngcontent-%COMP%_draw-border{to{stroke-dashoffset:0}}@keyframes _ngcontent-%COMP%_reveal-icon{to{opacity:1}}.next-task-hero[_ngcontent-%COMP%] .next-task-content[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;padding:12px 0}.next-task-hero[_ngcontent-%COMP%] .next-task-content[_ngcontent-%COMP%] .task-main[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px}.next-task-hero[_ngcontent-%COMP%] .next-task-content[_ngcontent-%COMP%] .task-main[_ngcontent-%COMP%] .task-name[_ngcontent-%COMP%]{font-size:1.2rem;font-weight:700;color:var(--primary-color)}.next-task-hero[_ngcontent-%COMP%] .next-task-content[_ngcontent-%COMP%] .task-main[_ngcontent-%COMP%] .task-time-group[_ngcontent-%COMP%]{display:flex;flex-direction:column;color:var(--text-secondary);font-size:.95rem}.next-task-hero[_ngcontent-%COMP%] .next-task-content[_ngcontent-%COMP%] .chevron[_ngcontent-%COMP%]{color:var(--text-secondary);opacity:.5}.server-state-card[_ngcontent-%COMP%] .state-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px}.server-state-card[_ngcontent-%COMP%] .state-content[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{font-size:.75rem;text-transform:uppercase;color:var(--text-secondary);font-weight:600}.server-state-card[_ngcontent-%COMP%] .state-content[_ngcontent-%COMP%] .state-line[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px}.server-state-card[_ngcontent-%COMP%] .state-content[_ngcontent-%COMP%] .state-line[_ngcontent-%COMP%] .warning-text[_ngcontent-%COMP%]{font-size:.85rem;color:var(--error-color);font-weight:500}"]})};export{J as default};
1
+ import v$1 from'./chunk-Cng2PWKw.js';import'./chunk-BRJ93eei.js';import'./chunk-SycSMD-r.js';import {k}from'./chunk-oTpkLrqH.js';import'./chunk-dCFVYHva.js';import {c}from'./chunk-CQv4eyEK.js';import'./chunk-C5p3bQwH.js';import {T,aX as y,ab as C,a6 as be$1,G as Ge,N as Nt,bb as h,h as hw,bc as Fi,bd as Jt,be as Kn,v,d as N,bf as pi,aJ as ci,aH as m,b2 as m$1,Q as Qi,f as aT,bg as ag,w as jC,$ as $l,n as nC,j as vg,V as Vg,Y as Yg,C as CE,i as cT,A as yg,J as om,aa as Ql,bh as Q,z as za,aZ as ee,l as vT,aM as ob,a1 as dT,r as kd,k as iC,O as Od,aN as ab,aB as im,aR as sb,a2 as fT,as as Wd,bi as qd,aP as ql,aQ as Gl,ap as lT}from'./main-QLXVXD6E.js';import {f}from'./chunk-C3KPTLNN.js';import {d}from'./chunk-PONAC1Ya.js';import'./chunk-DoYGADYB.js';import'./chunk-D2aWqPl_.js';var U=class r{#e=T(y);#n=T(Q);#i=Ge([]);recentFiles=this.#i.asReadonly();#r=5;#s=Ge(null);etaData=this.#s.asReadonly();#a=null;#t=null;#o=null;recentFileEffect=za(()=>{let i=this.#e.statusData();i&&i.CurrentFilename&&i.CurrentFilesize!==void 0&&this.#c(i.CurrentFilename,i.CurrentFilesize);});#c(i,e){let s=new Date;this.#i.update(c=>c.length>0&&c[0].filename===i?c:[{filename:i,filesize:e,timestamp:s},...c].slice(0,this.#r));}activateView(){this.#a=new Date;let i=this.#e.statusData();i&&i.ProcessedFileCount!==void 0&&i.ProcessedFileSize!==void 0&&(this.#t={files:i.ProcessedFileCount,bytes:i.ProcessedFileSize}),this.#o=setInterval(()=>{this.#l();},1e3);}deactivateView(){this.#a=null,this.#t=null,this.#o&&(clearInterval(this.#o),this.#o=null);}#l(){if(!this.#a||!this.#t)return;let i=this.#e.statusData();if(!i)return;let e=new Date,s=(e.getTime()-this.#a.getTime())/1e3;if(s<5)return;let c=i.ProcessedFileCount||0,P=i.ProcessedFileSize||0,I=c-this.#t.files,k=P-this.#t.bytes,x=I/s,M=k/s,A=(i.TotalFileCount||0)-c,u=(i.TotalFileSize||0)-P,O=null,T=null;x>0&&(O=A/x),M>0&&(T=u/M);let R=null,w="bytes";if(O!==null&&T!==null){let Se=Math.max(O,T);R=new Date(e.getTime()+Se*1e3),w=O>T?"files":"bytes";}else O!==null?(R=new Date(e.getTime()+O*1e3),w="files"):T!==null&&(R=new Date(e.getTime()+T*1e3),w="bytes");this.#s.set({startTime:this.#a,filesProcessedAtStart:this.#t.files,bytesProcessedAtStart:this.#t.bytes,currentFilesPerSecond:x,currentBytesPerSecond:M,estimatedCompletion:R,metric:w});}static \u0275fac=function(e){return new(e||r)};static \u0275prov=ee({token:r,factory:r.\u0275fac,providedIn:"root"})};function xe(r,i){if(r&1&&(Qi(0,"div",42)(1,"span",20),jC(2,"Processing"),$l(),Qi(3,"sh-list",43)(4,"div",44)(5,"sh-icon"),jC(6,"file"),$l(),Qi(7,"div",45)(8,"span",46),jC(9),$l(),Qi(10,"span",47),jC(11),ob(12,"bytes"),$l()()()()()),r&2){let e=iC(2);CE(8),yg("title",e.statusData()?.CurrentFilename),CE(),Ql(" ",e.statusData()?.CurrentFilename," "),CE(2),om(sb(12,3,e.statusData()?.CurrentFilesize));}}function Me(r,i){if(r&1&&(Qi(0,"div",35)(1,"span",46),jC(2),$l(),Qi(3,"span",47),jC(4),ob(5,"bytes"),$l()()),r&2){let e=i.$implicit;CE(),yg("title",e.filename),CE(),om(e.filename),CE(2),om(sb(5,3,e.filesize));}}function Oe(r,i){r&1&&(Qi(0,"div",36),nC(1,2),$l());}function Te(r,i){if(r&1&&(Qi(0,"sh-list")(1,"div",48)(2,"span",20),jC(3,"ETA"),$l(),Qi(4,"span",21),jC(5),ob(6,"date"),Qi(7,"span",49),jC(8),ob(9,"relativeTime"),$l()()(),Qi(10,"div",50)(11,"span",20),jC(12,"Files/s"),$l(),Qi(13,"span",21),jC(14),ob(15,"number"),$l()(),Qi(16,"div",50)(17,"span",20),jC(18,"Upload Speed"),$l(),Qi(19,"span",21),jC(20),ob(21,"bytes"),$l()()()),r&2){let e=iC(2);CE(5),Ql(" ",ab(6,4,e.etaData()?.estimatedCompletion,"mediumTime")," "),CE(3),Ql(" (",sb(9,7,e.etaData()?.estimatedCompletion),") "),CE(6),Ql(" ",ab(15,9,e.etaData()?.currentFilesPerSecond,"1.1-1")," "),CE(6),Ql("",sb(21,12,e.etaData()?.currentBytesPerSecond),"/s");}}function ve(r,i){if(r&1&&(Qi(0,"div",53)(1,"div",54)(2,"span",55),jC(3),$l(),Qi(4,"span",56),jC(5),ob(6,"bytes"),$l()(),vg(7,"sh-progress-bar",57),$l()),r&2){let e=i.$implicit;CE(2),yg("title",e.BackendPath),CE(),om(e.BackendPath),CE(2),Ql("",sb(6,4,e.BackendSpeed),"/s"),CE(2),yg("value",(e.BackendFileProgress||0)/(e.BackendFileSize||1)*100);}}function he(r,i){if(r&1&&(Qi(0,"div",51)(1,"sh-list"),ag(2,ve,8,6,"div",52),$l()()),r&2){let e=iC(2);CE(2),yg("ngForOf",e.statusData()?.ActiveTransfers);}}function ye(r,i){if(r&1){let e=vT();Qi(0,"sh-card")(1,"div",13)(2,"div",14)(3,"sh-icon",15),jC(4,"clock"),$l(),Qi(5,"h2"),jC(6),$l()()(),Qi(7,"div",26)(8,"div",27)(9,"span",28),jC(10),ob(11,"number"),$l()(),vg(12,"sh-progress-bar",29),Qi(13,"sh-list")(14,"div",30)(15,"span",20),jC(16,"Files"),$l(),Qi(17,"span",21),jC(18),$l()(),Qi(19,"div",30)(20,"span",20),jC(21,"Size"),$l(),Qi(22,"span",21),jC(23),ob(24,"bytes"),ob(25,"bytes"),$l()()()()(),Qi(26,"sh-card")(27,"div",13)(28,"div",14)(29,"sh-icon",15),jC(30,"file"),$l(),Qi(31,"h3"),jC(32,"Activity"),$l()()(),Qi(33,"div",31),ag(34,xe,13,5,"div",32),Qi(35,"div",33)(36,"span",20),nC(37,1),$l(),Qi(38,"sh-list",34),dT(39,Me,6,5,"div",35,lT),aT(41,Oe,2,0,"div",36),$l()()()(),Qi(42,"sh-card")(43,"div",13)(44,"div",14)(45,"sh-icon",15),jC(46,"gauge"),$l(),Qi(47,"h3"),jC(48,"Performance"),$l()(),Qi(49,"div",37),jC(50),ob(51,"bytes"),$l()(),Qi(52,"div",38),ag(53,Te,22,14,"sh-list",25),Qi(54,"div",39)(55,"button",40),Vg("click",function(){kd(e);let c=iC();return Od(c.toggleTransfers())}),jC(56),$l(),ag(57,he,3,1,"div",41),$l()()();}if(r&2){let e=iC();CE(6),om(e.statusText()),CE(4),Ql("",ab(11,13,e.progress(),"1.0-0"),"%"),CE(2),yg("value",e.progress()),CE(6),im("",e.statusData()?.ProcessedFileCount," / ",e.statusData()?.TotalFileCount),CE(5),im(" ",sb(24,16,e.statusData()?.ProcessedFileSize)," / ",sb(25,18,e.statusData()?.TotalFileSize)," "),CE(11),yg("ngIf",e.statusData()?.CurrentFilename),CE(5),fT(e.recentFiles()),CE(2),cT(e.recentFiles().length===0?41:-1),CE(9),Ql("",sb(51,20,e.statusData()?.BackendSpeed),"/s"),CE(3),yg("ngIf",e.etaData()),CE(3),Ql(" ",e.transfersExpanded()?"Hide Details":"Show Details"," "),CE(),yg("ngIf",e.transfersExpanded());}}function Ee(r,i){if(r&1&&(Qi(0,"sh-card",75)(1,"div",13)(2,"div",14)(3,"sh-icon",15),jC(4,"calendar"),$l(),Qi(5,"h3"),nC(6,7),$l()()(),Qi(7,"div",76)(8,"div",77)(9,"span",78),jC(10),$l(),Qi(11,"div",79)(12,"span",80),jC(13),ob(14,"date"),$l(),Qi(15,"span",81),jC(16),ob(17,"relativeTime"),$l()()(),Qi(18,"sh-icon",82),jC(19,"caret-right"),$l()()()),r&2){let e=iC(2);CE(10),om(e.nextBackup().backup?.Name),CE(3),om(ab(14,3,e.nextBackup().time,"medium")),CE(3),Ql("(",sb(17,6,e.nextBackup().time),")");}}function be(r,i){r&1&&(Qi(0,"span",74),nC(1,8),$l());}function Ne(r,i){if(r&1){let e=vT();Qi(0,"sh-card",58)(1,"div",59)(2,"div",60)(3,"div",61),Wd(),Qi(4,"svg",62),vg(5,"circle",63),$l(),qd(),Qi(6,"sh-icon",64),nC(7,3),$l()()(),Qi(8,"div",65)(9,"h2"),nC(10,4),$l(),Qi(11,"p",66),nC(12,5),$l()(),Qi(13,"div",67)(14,"button",68),Vg("click",function(){kd(e);let c=iC();return Od(c.pauseResume())}),Qi(15,"sh-icon"),jC(16),$l(),jC(17),$l()()()(),ag(18,Ee,20,8,"sh-card",69),Qi(19,"sh-card",70)(20,"div",71)(21,"span",20),nC(22,6),$l(),Qi(23,"div",72)(24,"span",73),jC(25),$l(),aT(26,be,2,0,"span",74),$l()()();}if(r&2){let e=iC();CE(14),yg("color",e.clientIsRunning()?"primary":"accent"),CE(2),om(e.clientIsRunning()?"pause":"play"),CE(),Ql(" ",e.clientIsRunning()?"Pause Execution":"Resume Execution"," "),CE(),yg("ngIf",e.nextBackup()),CE(6),Yg("running",e.clientIsRunning()),CE(),om(e.serverState()?.ProgramState),CE(),cT(e.clientIsRunning()?-1:26);}}function Ie(r,i){if(r&1&&(Qi(0,"div",35)(1,"span",46),jC(2),$l(),Qi(3,"span",47),jC(4),ob(5,"bytes"),$l()()),r&2){let e=i.$implicit;CE(),yg("title",e.filename),CE(),om(e.filename),CE(2),om(sb(5,3,e.filesize));}}function ke(r,i){if(r&1&&(Qi(0,"sh-card",83)(1,"div",13)(2,"div",14)(3,"sh-icon",15),jC(4,"clock-counter-clockwise"),$l(),Qi(5,"h3"),nC(6,9),$l()()(),Qi(7,"sh-list"),ag(8,Ie,6,5,"div",84),$l()()),r&2){let e=iC();CE(8),yg("ngForOf",e.recentFiles());}}function Ae(r,i){if(r&1&&(Qi(0,"div",19)(1,"span",20),jC(2,"Next Task:"),$l(),Qi(3,"div",21)(4,"div"),jC(5),$l(),Qi(6,"div",49),jC(7),ob(8,"date"),ob(9,"relativeTime"),$l()()()),r&2){let e=iC();CE(5),om(e.nextBackup().backup?.Name),CE(2),im(" ",ab(8,3,e.nextBackup().time,"medium")," (",sb(9,6,e.nextBackup().time),") ");}}function Re(r,i){if(r&1){let e=vT();ql(0),Qi(1,"button",85),Vg("click",function(){kd(e);let c=iC();return Od(c.stop())}),Qi(2,"sh-icon"),jC(3,"stop"),$l(),jC(4," Stop "),$l(),Qi(5,"button",85),Vg("click",function(){kd(e);let c=iC();return Od(c.abort())}),Qi(6,"sh-icon"),jC(7,"x-circle"),$l(),jC(8," Abort "),$l(),Gl();}}var J=class r{#e=T(y);#n=T(U);#i=T(C);#r=T(be$1);statusData=this.#e.statusData;serverState=this.#e.serverState;recentFiles=this.#n.recentFiles;etaData=this.#n.etaData;transfersExpanded=Ge(false);clientIsRunning=this.#e.clientIsRunning;statusText=Nt(()=>{let i=this.statusData()?.Phase;return i?h[i]||i:""});progress=Nt(()=>{let i=this.statusData();return i?(i.OverallProgress||0)*100:0});nextBackup=Nt(()=>({backup:this.serverState()?.ProposedSchedule?.[0]?.backup,time:this.serverState()?.ProposedSchedule?.[0]?.Item2}));ngOnInit(){this.#n.activateView();}ngOnDestroy(){this.#n.deactivateView();}toggleTransfers(){this.transfersExpanded.update(i=>!i);}isTaskRunning(){return !!this.statusData()?.TaskID}taskStartTime(){return this.etaData()?.startTime}currentBackupId(){return this.statusData()?.BackupID}pauseResume(){if(this.clientIsRunning()){this.#r.open(k,{maxWidth:"550px",width:"100%"});return}this.#e.pauseResume().subscribe();}stop(){let i=this.statusData()?.TaskID;i&&this.#i.postApiV1TaskByTaskidStop({taskid:i}).subscribe();}abort(){let i=this.statusData()?.TaskID;i&&this.#i.postApiV1TaskByTaskidAbort({taskid:i}).subscribe();}static \u0275fac=function(e){return new(e||r)};static \u0275cmp=hw({type:r,selectors:[["app-status"]],decls:29,vars:12,consts:()=>{let i;i=$localize`Live Logs`;let e;e=$localize`Recently Processed`;let s;s=$localize`No recent files`;let c;c=$localize`check-bold`;let P;P=$localize`System Ready`;let I;I=$localize`Waiting for the next scheduled backup task.`;let k;k=$localize`Server State`;let x;x=$localize`Next Scheduled Task`;let M;M=$localize`Backups are currently paused`;let A;return A=$localize`Recent Activity`,[i,e,s,c,P,I,k,x,M,A,[1,"status-page"],["class","activity-card",4,"ngIf"],[1,"logs-card"],[1,"card-header"],[1,"header-titl-group"],[1,"header-icon"],[1,"logs-content"],[3,"polling","whenFilter","backupIdFilter"],[1,"server-status-section"],[1,"status-row"],[1,"label"],[1,"value"],["class","status-row",4,"ngIf"],[1,"actions"],["shButton","",3,"click"],[4,"ngIf"],[1,"progress-content"],[1,"percentage-display"],[1,"percentage-value"],[3,"value"],["item","",1,"stat-item"],[1,"files-content"],["class","current-file-section",4,"ngIf"],[1,"recent-files-section"],[1,"recent-files-list"],["item","",1,"file-item"],["item","",1,"empty-state"],[1,"aggregate-speed"],[1,"performance-content"],[1,"transfers-section"],["shButton","","size","small",1,"toggle-btn","ghost",3,"click"],["class","transfer-details",4,"ngIf"],[1,"current-file-section"],[1,"current-file-list"],["item","",1,"file-item","current"],[1,"file-details"],[1,"filename",3,"title"],[1,"filesize"],["item","",1,"eta-item"],[1,"sub-text"],["item","",1,"metric-item"],[1,"transfer-details"],["class","transfer-item","item","",4,"ngFor","ngForOf"],["item","",1,"transfer-item"],[1,"transfer-header"],[1,"path",3,"title"],[1,"speed"],[1,"mini-progress",3,"value"],[1,"idle-hero-card"],[1,"idle-content"],[1,"status-visual"],[1,"complete-status"],[1,"border-svg"],["cx","50","cy","50","r","45",1,"border-circle"],[1,"status-icon"],[1,"status-info"],[1,"status-description"],[1,"idle-actions"],["shButton","",3,"click","color"],["class","next-task-hero",4,"ngIf"],[1,"server-state-card"],[1,"state-content"],[1,"state-line"],[1,"status-badge"],[1,"warning-text"],[1,"next-task-hero"],[1,"next-task-content"],[1,"task-main"],[1,"task-name"],[1,"task-time-group"],[1,"task-time"],[1,"task-relative"],[1,"chevron"],[1,"activity-card"],["class","file-item","item","",4,"ngFor","ngForOf"],["shButton","","color","warn",3,"click"]]},template:function(e,s){e&1&&(Qi(0,"div",10),aT(1,ye,58,22)(2,Ne,27,8),ag(3,ke,9,1,"sh-card",11),Qi(4,"sh-card",12)(5,"div",13)(6,"div",14)(7,"sh-icon",15),jC(8,"list"),$l(),Qi(9,"h3"),nC(10,0),$l()()(),Qi(11,"div",16),vg(12,"app-logs-live",17),$l()(),Qi(13,"sh-card")(14,"div",18)(15,"h3"),jC(16,"Server Status"),$l(),Qi(17,"div",19)(18,"span",20),jC(19,"State:"),$l(),Qi(20,"span",21),jC(21),$l()(),ag(22,Ae,10,8,"div",22),Qi(23,"div",23)(24,"button",24),Vg("click",function(){return s.pauseResume()}),Qi(25,"sh-icon"),jC(26),$l(),jC(27),$l(),ag(28,Re,9,0,"ng-container",25),$l()()()()),e&2&&(Yg("idle",!s.isTaskRunning()),CE(),cT(s.isTaskRunning()?1:2),CE(2),yg("ngIf",!s.isTaskRunning()&&s.recentFiles().length>0),CE(9),yg("polling",s.isTaskRunning())("whenFilter",s.taskStartTime()?.getTime())("backupIdFilter",s.currentBackupId()),CE(9),om(s.serverState()?.ProgramState),CE(),yg("ngIf",s.nextBackup()),CE(4),om(s.clientIsRunning()?"pause":"play_arrow"),CE(),Ql(" ",s.clientIsRunning()?"Pause":"Resume"," "),CE(),yg("ngIf",s.isTaskRunning()));},dependencies:[Fi,Jt,Kn,f,d,v,N,v$1,c,pi,ci,m,m$1],styles:["[_nghost-%COMP%]{display:block;padding:24px;max-width:1400px;margin:0 auto}.status-page[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr;gap:24px}@media(min-width:768px){.status-page[_ngcontent-%COMP%]{grid-template-columns:repeat(2,1fr)}}@media(min-width:1200px){.status-page[_ngcontent-%COMP%]{grid-template-columns:repeat(3,1fr)}}@media(min-width:1200px){.status-page[_ngcontent-%COMP%] .logs-card[_ngcontent-%COMP%], .status-page.idle[_ngcontent-%COMP%] .idle-hero-card[_ngcontent-%COMP%]{grid-column:span 2}.status-page.idle[_ngcontent-%COMP%] .next-task-hero[_ngcontent-%COMP%], .status-page.idle[_ngcontent-%COMP%] .server-state-card[_ngcontent-%COMP%]{grid-column:3}.status-page.idle[_ngcontent-%COMP%] .activity-card[_ngcontent-%COMP%], .status-page.idle[_ngcontent-%COMP%] .logs-card[_ngcontent-%COMP%]{grid-column:1/-1}}sh-card[_ngcontent-%COMP%]{height:100%;display:flex;flex-direction:column;--sh-card-padding: 24px}.card-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}.card-header[_ngcontent-%COMP%] .header-titl-group[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px}.card-header[_ngcontent-%COMP%] .header-titl-group[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{color:var(--primary-color);font-size:24px}.card-header[_ngcontent-%COMP%] .header-titl-group[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], .card-header[_ngcontent-%COMP%] .header-titl-group[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0;font-size:1.1rem;font-weight:600;color:var(--text-primary)}.progress-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:20px}.progress-content[_ngcontent-%COMP%] .percentage-display[_ngcontent-%COMP%]{text-align:center}.progress-content[_ngcontent-%COMP%] .percentage-display[_ngcontent-%COMP%] .percentage-value[_ngcontent-%COMP%]{font-size:3rem;font-weight:800;color:var(--primary-color);line-height:1}.progress-content[_ngcontent-%COMP%] sh-progress-bar[_ngcontent-%COMP%]{height:8px;border-radius:4px;--sh-progress-bar-track-color: var(--bg-secondary)}.progress-content[_ngcontent-%COMP%] .stat-item[_ngcontent-%COMP%]{display:flex;justify-content:space-between;width:100%}.progress-content[_ngcontent-%COMP%] .stat-item[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{color:var(--text-secondary);font-size:.9rem}.progress-content[_ngcontent-%COMP%] .stat-item[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-weight:600}.files-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px}.files-content[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{font-size:.75rem;text-transform:uppercase;color:var(--text-secondary);font-weight:600;margin-bottom:4px;display:block;padding-left:12px}.files-content[_ngcontent-%COMP%] .file-item[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%}.files-content[_ngcontent-%COMP%] .file-item.current[_ngcontent-%COMP%]{gap:12px;justify-content:flex-start}.files-content[_ngcontent-%COMP%] .file-item.current[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{color:var(--primary-color)}.files-content[_ngcontent-%COMP%] .file-item.current[_ngcontent-%COMP%] .file-details[_ngcontent-%COMP%]{display:flex;flex-direction:column;overflow:hidden}.files-content[_ngcontent-%COMP%] .file-item[_ngcontent-%COMP%] .filename[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-right:12px;font-size:.9rem;font-weight:500;flex:1}.files-content[_ngcontent-%COMP%] .file-item[_ngcontent-%COMP%] .filesize[_ngcontent-%COMP%]{color:var(--text-secondary);font-size:.85rem;font-variant-numeric:tabular-nums;white-space:nowrap}.files-content[_ngcontent-%COMP%] .empty-state[_ngcontent-%COMP%]{color:var(--text-secondary);font-style:italic;text-align:center;width:100%}.performance-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px}.performance-content[_ngcontent-%COMP%] .aggregate-speed[_ngcontent-%COMP%]{font-size:1.2rem;font-weight:700;color:var(--text-primary);font-variant-numeric:tabular-nums}.performance-content[_ngcontent-%COMP%] .eta-item[_ngcontent-%COMP%], .performance-content[_ngcontent-%COMP%] .metric-item[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%}.performance-content[_ngcontent-%COMP%] .eta-item[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .performance-content[_ngcontent-%COMP%] .metric-item[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{color:var(--text-secondary);font-size:.9rem}.performance-content[_ngcontent-%COMP%] .eta-item[_ngcontent-%COMP%] .value[_ngcontent-%COMP%], .performance-content[_ngcontent-%COMP%] .metric-item[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-weight:600;font-variant-numeric:tabular-nums}.performance-content[_ngcontent-%COMP%] .eta-item[_ngcontent-%COMP%] .value[_ngcontent-%COMP%] .sub-text[_ngcontent-%COMP%], .performance-content[_ngcontent-%COMP%] .metric-item[_ngcontent-%COMP%] .value[_ngcontent-%COMP%] .sub-text[_ngcontent-%COMP%]{color:var(--text-secondary);font-weight:400;font-size:.85rem;margin-left:4px}.performance-content[_ngcontent-%COMP%] .transfers-section[_ngcontent-%COMP%] .toggle-btn[_ngcontent-%COMP%]{width:100%;margin-bottom:12px}.performance-content[_ngcontent-%COMP%] .transfers-section[_ngcontent-%COMP%] .transfer-item[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;gap:4px}.performance-content[_ngcontent-%COMP%] .transfers-section[_ngcontent-%COMP%] .transfer-item[_ngcontent-%COMP%] .transfer-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;font-size:.85rem}.performance-content[_ngcontent-%COMP%] .transfers-section[_ngcontent-%COMP%] .transfer-item[_ngcontent-%COMP%] .transfer-header[_ngcontent-%COMP%] .path[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-right:12px}.performance-content[_ngcontent-%COMP%] .transfers-section[_ngcontent-%COMP%] .transfer-item[_ngcontent-%COMP%] .transfer-header[_ngcontent-%COMP%] .speed[_ngcontent-%COMP%]{color:var(--text-secondary);font-variant-numeric:tabular-nums}.performance-content[_ngcontent-%COMP%] .transfers-section[_ngcontent-%COMP%] .transfer-item[_ngcontent-%COMP%] .mini-progress[_ngcontent-%COMP%]{height:4px}.logs-content[_ngcontent-%COMP%] app-logs-live[_ngcontent-%COMP%]{height:350px;display:block}.status-badge[_ngcontent-%COMP%]{padding:4px 12px;border-radius:12px;background:var(--bg-secondary);color:var(--text-secondary);font-size:.8rem;font-weight:500;text-transform:uppercase}.status-badge.running[_ngcontent-%COMP%]{background:rgba(var(--primary-rgb),.1);color:var(--primary-color)}.actions-grid[_ngcontent-%COMP%]{margin-top:auto;display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:12px}.actions-grid[_ngcontent-%COMP%] .action-btn[_ngcontent-%COMP%]{width:100%;justify-content:center}.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:32px 0;gap:32px}@media(min-width:768px){.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%]{flex-direction:row;text-align:left;justify-content:space-around;padding:48px 0}}.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%] .status-visual[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%] .status-info[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:2rem;font-weight:700;margin-bottom:8px;color:var(--text-primary)}.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%] .status-info[_ngcontent-%COMP%] .status-description[_ngcontent-%COMP%]{color:var(--text-secondary);font-size:1.1rem;max-width:300px}.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%] .idle-actions[_ngcontent-%COMP%]{display:flex;align-items:center}.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%] .idle-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding-left:32px;padding-right:32px}.complete-status[_ngcontent-%COMP%]{position:relative;width:120px;height:120px;display:flex;justify-content:center;align-items:center;color:var(--primary-color)}.complete-status[_ngcontent-%COMP%] .status-icon[_ngcontent-%COMP%]{font-size:48px;opacity:0;animation:_ngcontent-%COMP%_reveal-icon .2s linear forwards;animation-delay:1s}.border-svg[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%}.border-circle[_ngcontent-%COMP%]{fill:none;stroke:var(--primary-color);stroke-width:5px;stroke-dasharray:282.74;stroke-dashoffset:282.74;animation:_ngcontent-%COMP%_draw-border 1.2s linear forwards}@keyframes _ngcontent-%COMP%_draw-border{to{stroke-dashoffset:0}}@keyframes _ngcontent-%COMP%_reveal-icon{to{opacity:1}}.next-task-hero[_ngcontent-%COMP%] .next-task-content[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;padding:12px 0}.next-task-hero[_ngcontent-%COMP%] .next-task-content[_ngcontent-%COMP%] .task-main[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px}.next-task-hero[_ngcontent-%COMP%] .next-task-content[_ngcontent-%COMP%] .task-main[_ngcontent-%COMP%] .task-name[_ngcontent-%COMP%]{font-size:1.2rem;font-weight:700;color:var(--primary-color)}.next-task-hero[_ngcontent-%COMP%] .next-task-content[_ngcontent-%COMP%] .task-main[_ngcontent-%COMP%] .task-time-group[_ngcontent-%COMP%]{display:flex;flex-direction:column;color:var(--text-secondary);font-size:.95rem}.next-task-hero[_ngcontent-%COMP%] .next-task-content[_ngcontent-%COMP%] .chevron[_ngcontent-%COMP%]{color:var(--text-secondary);opacity:.5}.server-state-card[_ngcontent-%COMP%] .state-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px}.server-state-card[_ngcontent-%COMP%] .state-content[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{font-size:.75rem;text-transform:uppercase;color:var(--text-secondary);font-weight:600}.server-state-card[_ngcontent-%COMP%] .state-content[_ngcontent-%COMP%] .state-line[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px}.server-state-card[_ngcontent-%COMP%] .state-content[_ngcontent-%COMP%] .state-line[_ngcontent-%COMP%] .warning-text[_ngcontent-%COMP%]{font-size:.85rem;color:var(--error-color);font-weight:500}"]})};export{J as default};
@@ -0,0 +1 @@
1
+ import {d}from'./chunk-PONAC1Ya.js';import {L}from'./chunk-D3d-eReU.js';import {T,ab as C,bh as Q,m,G as Ge,N as Nt,aG as pt,H as qu,h as hw,v,d as N,f as aT,Q as Qi,n as nC,$ as $l,w as jC,i as cT,C as CE,au as jg,av as rC,J as om,j as vg,l as vT,V as Vg,r as kd,k as iC,O as Od,Y as Yg,L as Lg,F as Fg,A as yg,ar as Qp}from'./main-QLXVXD6E.js';function w(n,t){n&1&&vg(0,"sh-progress-bar",3);}function V(n,t){if(n&1&&(Qi(0,"a",7),Lg(1,2),vg(2,"sh-icon"),Fg(),$l()),n&2){let e=iC(2);yg("href",e.serverState()?.UpdateDownloadLink,Qp),CE(2),jg(e.serverState()?.UpdatedVersion),rC(1);}}function B(n,t){if(n&1){let e=vT();Qi(0,"button",6),Vg("click",function(){kd(e);let s=iC();return Od(s.checkForUpdates())}),jC(1,"Check for updates"),$l(),aT(2,V,3,2,"a",7);}if(n&2){let e=iC();Yg("loading",e.checkingForUpdates()),CE(2),cT(e.serverState()?.UpdateDownloadLink?2:-1);}}function J(n,t){if(n&1){let e=vT();Qi(0,"button",6),Vg("click",function(){kd(e);let s=iC();return Od(s.checkForUpdates())}),jC(1,"Checking for updates \u2026"),$l();}}function X(n,t){n&1&&vg(0,"sh-progress-bar",3);}var h=class n{#e=T(C);#n=T(Q);#t=T(m);isLoading=Ge(true);checkingForUpdates=Ge(false);serverState=this.#n.serverState;duplicatiVersion=Nt(()=>this.#t.systemInfo()?.ServerVersionName??"Unknown");generalInfo=L(this.#e.getApiV1Acknowledgements().pipe(pt(t=>t.Acknowledgements),qu(()=>this.isLoading.set(false))));checkForUpdates(){this.checkingForUpdates.set(true),this.#e.postApiV1UpdatesCheck().pipe(qu(()=>this.checkingForUpdates.set(false))).subscribe();}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=hw({type:n,selectors:[["app-general"]],decls:12,vars:5,consts:()=>{let t;t=$localize`General`;let e;e=$localize`You're running Duplicati with - ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let i;return i=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:download${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Download update - ${"\uFFFD0\uFFFD"}:INTERPOLATION: `,[t,e,i,[1,"indeterminate","primary"],[1,"actions"],["shButton",""],["shButton","",3,"click"],["shButton","","target","_blank",1,"primary","raised",3,"href"]]},template:function(e,i){e&1&&(aT(0,w,1,0,"sh-progress-bar",3),Qi(1,"section")(2,"h3"),nC(3,0),$l(),Qi(4,"p"),nC(5,1),$l(),Qi(6,"div",4),aT(7,B,3,3)(8,J,2,0,"button",5),aT(9,X,1,0,"sh-progress-bar",3),$l(),Qi(10,"div"),jC(11),$l()()),e&2&&(cT(i.isLoading()?0:-1),CE(5),jg(i.duplicatiVersion()),rC(5),CE(2),cT(i.serverState()?.UpdaterState==="Waiting"?7:i.serverState()?.UpdaterState==="Checking"?8:-1),CE(2),cT(i.serverState()?.UpdaterState==="Downloading"?9:-1),CE(2),om(i.generalInfo()));},dependencies:[d,v,N],styles:["[_nghost-%COMP%]{display:block;position:relative;padding:0 2.5rem}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}section[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{white-space:pre-wrap}sh-progress-bar[_ngcontent-%COMP%]{position:absolute;top:0;left:0;right:0}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"]})};export{h as default};
@@ -0,0 +1 @@
1
+ var o=[{path:"",loadComponent:()=>import('./chunk-DA5X-TzJ.js'),children:[{path:"",redirectTo:"stored",pathMatch:"full"},{path:"stored",loadComponent:()=>import('./chunk-CTwvkMrj.js')},{path:"live",loadComponent:()=>import('./chunk-Cng2PWKw.js')}]}],t=o;export{t as default};
@@ -0,0 +1 @@
1
+ import {w as w$1}from'./chunk-CDEvMQA2.js';import {e as ee}from'./chunk-CzJ3-6Pu.js';import'./chunk-oTpkLrqH.js';import'./chunk-dCFVYHva.js';import'./chunk--kVw-BwM.js';import {k as ke}from'./chunk-BC2-YuwH.js';import'./chunk-BFfFD-XE.js';import'./chunk-CmexLvf7.js';import'./chunk-Bgx4dtaL.js';import'./chunk-D7AP6g7S.js';import'./chunk-CQv4eyEK.js';import'./chunk-DH6iiZWc.js';import'./chunk-DuTbfCdT.js';import'./chunk-DKacf9Tj.js';import'./chunk-gaP3Sx_C.js';import'./chunk-CI8lsvKT.js';import'./chunk-C5p3bQwH.js';import {T,aw as W,a5 as g,ab as C,z as za,aE as jo,h as hw,Z as lr,_ as _t,a8 as To,j as vg,Q as Qi,f as aT,n as nC,$ as $l,C as CE,i as cT,A as yg,aF as XC,aD as YC,w as jC,k as iC,aa as Ql}from'./main-QLXVXD6E.js';import'./chunk-C3KPTLNN.js';import {d}from'./chunk-PONAC1Ya.js';import'./chunk-D3SUPUQT.js';import'./chunk-DoYGADYB.js';import'./chunk-Crs56mDy.js';import'./chunk-Bcxzhjj8.js';import'./chunk-BYJ0fSUP.js';import {L}from'./chunk-D3d-eReU.js';import'./chunk-D2aWqPl_.js';var G=(i,e)=>[i,e,"general"],$=(i,e)=>[i,e,"destination"],U=(i,e)=>[i,e,"source-data"],K=(i,e)=>[i,e,"schedule"],F=(i,e)=>[i,e,"options"];function w(i,e){if(i&1&&(Qi(0,"p"),jC(1),$l()),i&2){let t=iC();CE(),Ql("Editing: ",t.backupName());}}function J(i,e){i&1&&vg(0,"sh-progress-bar",7);}function X(i,e){i&1&&(Qi(0,"section"),vg(1,"router-outlet"),$l());}var P=class i{#t=T(W);#e=T(ke);#i=T(g);#n=T(C);isDraft=this.#e.isDraft;isNew=this.#e.isNew;backupId=this.#e.backupId;backupName=this.#e.backupName;finishedLoading=this.#e.finishedLoading;#a=L(this.#t.params);#o=L(this.#t.url);paramsChanged=za(()=>{let e=this.#a()?.id,t=!!this.#o()?.find(n=>n.path==="backup-draft");e!=this.#e.backupId()&&(this.#e.backupId.set(e),e!=="new"?this.getBackup(e,t):this.getDefaults());});getDefaults(){this.#n.getApiV1Backupdefaults().pipe(jo(1)).subscribe({next:e=>{let t=e.Backup;t.Settings=[...t.Settings],this.#e.mapGeneralToForm(t),this.#e.mapDestinationToForm(t),this.#e.mapSourceDataToForm(t),this.#e.mapScheduleToForm(e.Schedule),this.#e.mapOptionsToForms(t),this.#e.applicationOptions.set(e.ApplicationOptions),this.#e.backupDefaults.set(e),this.#e.finishedLoading.set(true);}});}getBackup(e,t=false){let n=a=>{this.#e.mapScheduleToForm(a.Schedule??null),a.Backup&&(this.#e.mapGeneralToForm(a.Backup),this.#e.mapDestinationToForm(a.Backup),this.#e.mapSourceDataToForm(a.Backup),this.#e.mapOptionsToForms(a.Backup),this.#e.storeMetadata(a.Backup,t)),this.#e.finishedLoading.set(true);};if(t){this.isDraft.set(t);let a=this.#i.draftBackups().find(d=>d.id===e);if(!a){alert("Backup not found");return}n(a.data);}else this.#n.getApiV1BackupById({id:e}).subscribe({next:n});}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=hw({type:i,selectors:[["app-backup"]],features:[YC([ke])],decls:16,vars:22,consts:()=>{let e;e=$localize` General `;let t;t=$localize` Destination `;let n;n=$localize` Source Data `;let a;a=$localize` Schedule `;let d;return d=$localize` Options `,[e,t,n,a,d,[1,"primary"],["tabindex","-1","routerLinkActive","active",3,"routerLink"],[1,"indeterminate","primary"]]},template:function(t,n){t&1&&(vg(0,"app-status-bar"),Qi(1,"header"),aT(2,w,2,1,"p"),Qi(3,"sh-stepper",5)(4,"div",6),nC(5,0),$l(),Qi(6,"div",6),nC(7,1),$l(),Qi(8,"div",6),nC(9,2),$l(),Qi(10,"div",6),nC(11,3),$l(),Qi(12,"div",6),nC(13,4),$l()()(),aT(14,J,1,0,"sh-progress-bar",7)(15,X,2,0,"section")),t&2&&(CE(2),cT(n.isNew()?-1:2),CE(2),yg("routerLink",XC(7,G,n.isDraft()?"/backup-draft":"/backup",n.backupId())),CE(2),yg("routerLink",XC(10,$,n.isDraft()?"/backup-draft":"/backup",n.backupId())),CE(2),yg("routerLink",XC(13,U,n.isDraft()?"/backup-draft":"/backup",n.backupId())),CE(2),yg("routerLink",XC(16,K,n.isDraft()?"/backup-draft":"/backup",n.backupId())),CE(2),yg("routerLink",XC(19,F,n.isDraft()?"/backup-draft":"/backup",n.backupId())),CE(2),cT(n.finishedLoading()?15:14));},dependencies:[lr,_t,To,ee,w$1,d],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%}header[_ngcontent-%COMP%]{padding:1rem 1.5rem;border-bottom:1px solid var(--base-4)}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin-bottom:.5rem}header[_ngcontent-%COMP%] sh-stepper[_ngcontent-%COMP%]{width:100%}section[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:center;flex:1 0;overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:auto}"]})};export{P as default};