@duplicati/ngclient 0.0.232 → 0.0.234

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 (129) hide show
  1. package/assets/sh.woff2 +0 -0
  2. package/{chunk-DJJ8GbYi.js → chunk-0lYdrxte.js} +1 -1
  3. package/{chunk-C80zvTbO.js → chunk-1-oPQ4n-.js} +1 -1
  4. package/{chunk-ihUnHtR7.js → chunk-5EFCeqK3.js} +1 -1
  5. package/{chunk-Cg09iQR5.js → chunk-5kQsbzck.js} +1 -1
  6. package/{chunk-vnqcxg-9.js → chunk-AHhgJqe4.js} +1 -1
  7. package/{chunk-CAwTsBqQ.js → chunk-B-T54LAJ.js} +1 -1
  8. package/{chunk-CgyaUJSI.js → chunk-B-c3Zv6R.js} +1 -1
  9. package/{chunk-DvyGZpE4.js → chunk-B0ETfgeR.js} +2 -2
  10. package/chunk-B1dNb-QT.js +1 -0
  11. package/{chunk-CwKy8pxa.js → chunk-B8PnvglY.js} +1 -1
  12. package/{chunk-CTm37hI-.js → chunk-BAmgFjXY.js} +1 -1
  13. package/chunk-BDhLEYas.js +1 -0
  14. package/{chunk-BYWmNy-_.js → chunk-BFVhQEGw.js} +1 -1
  15. package/{chunk-aOMoAKYY.js → chunk-BFquKzMb.js} +1 -1
  16. package/{chunk-CX26gEKv.js → chunk-BGcVKmjp.js} +1 -1
  17. package/{chunk-vPGrgL1U.js → chunk-BHrABvoK.js} +1 -1
  18. package/chunk-BNG7N21y.js +1 -0
  19. package/{chunk-DoQHDPZg.js → chunk-BQapkAzp.js} +1 -1
  20. package/chunk-BRqx-u9-.js +2 -0
  21. package/{chunk-Dn8nZWLd.js → chunk-BaNH2nfC.js} +1 -1
  22. package/{chunk-Brvxo-yI.js → chunk-BaR3Dslz.js} +1 -1
  23. package/{chunk-DqIU7ViF.js → chunk-BaknLOqq.js} +1 -1
  24. package/{chunk-DKZlKdfB.js → chunk-Bg98dUtr.js} +1 -1
  25. package/{chunk-CkrxdjhU.js → chunk-BiSIt2zb.js} +2 -2
  26. package/chunk-BkLND74M.js +1 -0
  27. package/{chunk-B8uF0dom.js → chunk-BnFO-7ok.js} +1 -1
  28. package/{chunk-CVQPUpDQ.js → chunk-BqbJuWHd.js} +2 -2
  29. package/chunk-C4zj812G.js +1 -0
  30. package/chunk-C5G4RPpS.js +1 -0
  31. package/{chunk-D5tms-6w.js → chunk-CA-0mTsq.js} +1 -1
  32. package/chunk-CAEYxmzQ.js +1 -0
  33. package/chunk-CGnsbLNG.js +1 -0
  34. package/chunk-CPjYiawK.js +1 -0
  35. package/chunk-CQHKuUqk.js +2 -0
  36. package/{chunk-Saq2s7Ep.js → chunk-CSYDDxaa.js} +1 -1
  37. package/{chunk-Bja52qI7.js → chunk-CTH9uShX.js} +1 -1
  38. package/{chunk-Dum38U6w.js → chunk-CUNe6D-d.js} +2 -2
  39. package/chunk-CUaDFQyH.js +1 -0
  40. package/chunk-CnyuuWJ3.js +1 -0
  41. package/{chunk-BVEyeg9y.js → chunk-CsgB8OpN.js} +1 -1
  42. package/chunk-CspKioFm.js +4 -0
  43. package/{chunk-BTgf5lfZ.js → chunk-Cv4o9u3S.js} +1 -1
  44. package/chunk-CxOam2tf.js +1 -0
  45. package/{chunk-Cu2bh6aQ.js → chunk-CxUx2RFx.js} +1 -1
  46. package/{chunk-CIcBoEH1.js → chunk-D0qGkLVr.js} +1 -1
  47. package/{chunk-Bt_Ie-F3.js → chunk-D4S_1RMU.js} +1 -1
  48. package/{chunk-B53Wj4F9.js → chunk-D5zSyubd.js} +1 -1
  49. package/chunk-D6WUhpxO.js +14 -0
  50. package/{chunk-BEhUV7oX.js → chunk-D7C8xyJI.js} +1 -1
  51. package/{chunk-BlTnmRGU.js → chunk-D9dEfxn4.js} +1 -1
  52. package/{chunk-ivwxSoND.js → chunk-DB1KeglF.js} +1 -1
  53. package/{chunk-Box6Lckh.js → chunk-DCsYP4vf.js} +1 -1
  54. package/chunk-DGO0_pkA.js +2 -0
  55. package/chunk-DKOaWS_j.js +2 -0
  56. package/{chunk-DzmZd524.js → chunk-DP2sLJDC.js} +1 -1
  57. package/chunk-DXh9g32e.js +1 -0
  58. package/{chunk-CartdZy-.js → chunk-DYfv4gJW.js} +1 -1
  59. package/chunk-DZMTCfoN.js +1 -0
  60. package/chunk-DcU0yXkQ.js +1 -0
  61. package/chunk-Dg-uYwbp.js +2 -0
  62. package/{chunk-Cz0KuBHB.js → chunk-DmwtL4h3.js} +2 -2
  63. package/chunk-DnTA-m4k.js +2 -0
  64. package/{chunk-B9maI7Xa.js → chunk-DqoYKCmi.js} +3 -3
  65. package/{chunk-CUaRQ2FJ.js → chunk-Du0Hd0t6.js} +1 -1
  66. package/{chunk-BpRWdcC8.js → chunk-Dyq6iPbF.js} +1 -1
  67. package/chunk-DzYR8wiz.js +2 -0
  68. package/{chunk-DUYvFN8m.js → chunk-FZcbbWYC.js} +1 -1
  69. package/{chunk-Bb6BmVO4.js → chunk-GKdOPH_4.js} +2 -2
  70. package/{chunk-DmDqcC4A.js → chunk-KNmRQWOM.js} +1 -1
  71. package/{chunk-BBsBaTWO.js → chunk-OIDsf_Aq.js} +1 -1
  72. package/{chunk-Bo1yB-fQ.js → chunk-S-sgDIKw.js} +1 -1
  73. package/{chunk-DI7suso2.js → chunk-UCY_7-Of.js} +1 -1
  74. package/{chunk-CKnRcyHZ.js → chunk-UUMQmD5I.js} +2 -2
  75. package/{chunk-BkIXk6uR.js → chunk-X3dwwJIr.js} +2 -2
  76. package/chunk-_J1lTnCH.js +1 -0
  77. package/{chunk-C4GeR7BF.js → chunk-i6kMmbhY.js} +1 -1
  78. package/chunk-oobMnyEm.js +3 -0
  79. package/{chunk-CHzwXmsn.js → chunk-pxcB56N0.js} +1 -1
  80. package/{chunk-umW-K0Ca.js → chunk-sgM_r5NM.js} +1 -1
  81. package/{chunk-Rp7-yjlz.js → chunk-umUQn7LQ.js} +1 -1
  82. package/{chunk-B52v_pjw.js → chunk-xwdrpTfz.js} +2 -2
  83. package/index.html +1 -1
  84. package/locale/messages.de.json +69 -9
  85. package/locale/messages.de_CH.json +68 -8
  86. package/locale/messages.de_DE.json +68 -8
  87. package/locale/messages.en.json +32 -8
  88. package/locale/messages.fr.json +77 -13
  89. package/locale/messages.fr_CA.json +72 -8
  90. package/locale/messages.fr_FR.json +72 -8
  91. package/locale/messages.it.json +76 -12
  92. package/locale/messages.it_IT.json +72 -8
  93. package/locale/messages.json +32 -8
  94. package/locale/messages.ko.json +8 -15
  95. package/locale/messages.nl_BE.json +72 -8
  96. package/locale/messages.nl_NL.json +72 -8
  97. package/locale/messages.tr.json +7 -9
  98. package/locale/messages.zh-Hans.json +159 -16
  99. package/locale/messages.zh-Hant.json +159 -16
  100. package/locale/messages.zh.json +159 -16
  101. package/locale/messages.zh_CN.json +159 -16
  102. package/locale/messages.zh_HK.json +7 -8
  103. package/locale/messages.zh_TW.json +159 -16
  104. package/{main-VVQP2YE7.js → main-XKLDSNLY.js} +13 -13
  105. package/package.json +1 -1
  106. package/chunk-B73LRsqH.js +0 -1
  107. package/chunk-BBU0vswn.js +0 -1
  108. package/chunk-BI14DMeb.js +0 -1
  109. package/chunk-BO2GlieG.js +0 -1
  110. package/chunk-BS8PXjJJ.js +0 -1
  111. package/chunk-BaxM-kGV.js +0 -2
  112. package/chunk-BkUa7yBI.js +0 -1
  113. package/chunk-BqN36tfl.js +0 -1
  114. package/chunk-BvGGBIy7.js +0 -1
  115. package/chunk-CGArETYn.js +0 -1
  116. package/chunk-CTRzgLM9.js +0 -2
  117. package/chunk-CTwO6j97.js +0 -1
  118. package/chunk-CUuyy9Er.js +0 -1
  119. package/chunk-CZoVeRAG.js +0 -2
  120. package/chunk-Cjb79u3p.js +0 -2
  121. package/chunk-CtEMAj2d.js +0 -2
  122. package/chunk-Cu4siB3B.js +0 -4
  123. package/chunk-DTu0ZYnR.js +0 -1
  124. package/chunk-DY3nK3tu.js +0 -2
  125. package/chunk-DYnVzNxt.js +0 -1
  126. package/chunk-DZm4l28A.js +0 -3
  127. package/chunk-Da_-7L7P.js +0 -2
  128. package/chunk-kU0H989B.js +0 -14
  129. package/chunk-mby7fvmj.js +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@duplicati/ngclient",
3
- "version": "0.0.232",
3
+ "version": "0.0.234",
4
4
  "license": "MIT",
5
5
  "contributors": [
6
6
  "sp90",
package/chunk-B73LRsqH.js DELETED
@@ -1 +0,0 @@
1
- var o=[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",loadComponent:()=>import('./chunk-kU0H989B.js').then(function(n){return n.c})},{path:"destination",loadComponent:()=>import('./chunk-BaxM-kGV.js')},{path:"source-data",loadComponent:()=>import('./chunk-kU0H989B.js').then(function(n){return n.a})},{path:"schedule",loadComponent:()=>import('./chunk-kU0H989B.js').then(function(n){return n.b})},{path:"options",loadComponent:()=>import('./chunk-BI14DMeb.js')}];export{o as default};
package/chunk-BBU0vswn.js DELETED
@@ -1 +0,0 @@
1
- import {w as w$1}from'./chunk-CgyaUJSI.js';import {e as ee}from'./chunk-C4GeR7BF.js';import'./chunk-CUaRQ2FJ.js';import'./chunk-aOMoAKYY.js';import'./chunk-BEhUV7oX.js';import {k as ke}from'./chunk-kU0H989B.js';import'./chunk-C80zvTbO.js';import'./chunk-Cjb79u3p.js';import'./chunk-DJJ8GbYi.js';import'./chunk-DUYvFN8m.js';import'./chunk-BpRWdcC8.js';import'./chunk-ihUnHtR7.js';import'./chunk-Bb6BmVO4.js';import'./chunk-DmDqcC4A.js';import'./chunk-CAwTsBqQ.js';import'./chunk-B53Wj4F9.js';import'./chunk-BTgf5lfZ.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-VVQP2YE7.js';import'./chunk-Bja52qI7.js';import {d}from'./chunk-B8uF0dom.js';import'./chunk-B9maI7Xa.js';import'./chunk-BO2GlieG.js';import'./chunk-CKnRcyHZ.js';import'./chunk-CwKy8pxa.js';import'./chunk-BVEyeg9y.js';import {L}from'./chunk-Box6Lckh.js';import'./chunk-DqIU7ViF.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};
package/chunk-BI14DMeb.js DELETED
@@ -1 +0,0 @@
1
- import {OptionsListComponent as Oe}from'./chunk-CZoVeRAG.js';import {k as ke}from'./chunk-kU0H989B.js';import'./chunk-C80zvTbO.js';import {M as Mt}from'./chunk-Cjb79u3p.js';import'./chunk-DJJ8GbYi.js';import'./chunk-DUYvFN8m.js';import'./chunk-BpRWdcC8.js';import'./chunk-ihUnHtR7.js';import {N as Nt}from'./chunk-Bb6BmVO4.js';import'./chunk-DmDqcC4A.js';import'./chunk-CAwTsBqQ.js';import'./chunk-B53Wj4F9.js';import'./chunk-BTgf5lfZ.js';import {T,e as ee,aw as W,E as D1,G as Ge,h as hw,v,d as N,Q as Qi,n as nC,$ as $l,f as aT,p as cm,V as Vg,L as Lg,j as vg,F as Fg,C as CE,i as cT,x as am,A as yg,a3 as KC,Y as Yg,W as Wg,K as fC,U as UC,l as vT,r as kd,k as iC,O as Od,s as CD,y as _D}from'./main-VVQP2YE7.js';import'./chunk-Bja52qI7.js';import'./chunk-B8uF0dom.js';import {F as Fe}from'./chunk-B9maI7Xa.js';import {B as Bn,Z as Ze,e as en,R as Rn,J as Jt}from'./chunk-BO2GlieG.js';import'./chunk-CKnRcyHZ.js';import'./chunk-CwKy8pxa.js';import'./chunk-BVEyeg9y.js';import'./chunk-DqIU7ViF.js';import'./chunk-Box6Lckh.js';var oe=["formRef"],ae=()=>["--skip-files-larger-than","encryption-module","no-encryption","--no-encryption","--dbpath","keep-time","keep-versions","retention-policy"];function se(o,_){o&1&&(Qi(0,"p"),nC(1,4),$l());}function _e(o,_){if(o&1){let e=vT();Qi(0,"p"),nC(1,5),$l(),Qi(2,"app-timespan",21),cm("ngModelChange",function(n){kd(e);let a=iC(2);return UC(a.optionsFields.backupRetentionTime,n)||(a.optionsFields.backupRetentionTime=n),Od(n)}),Qi(3,"label",22),nC(4,6),$l()(),CD();}if(o&2){let e=iC(2);CE(2),yg("customId","backupRetentionTime"),am("ngModel",e.optionsFields.backupRetentionTime),_D();}}function le(o,_){if(o&1){let e=vT();Qi(0,"p"),nC(1,7),$l(),Qi(2,"sh-form-field")(3,"label",23),nC(4,8),$l(),Qi(5,"input",24),cm("ngModelChange",function(n){kd(e);let a=iC(2);return UC(a.optionsFields.backupRetentionVersions,n)||(a.optionsFields.backupRetentionVersions=n),Od(n)}),$l(),CD(),$l();}if(o&2){let e=iC(2);CE(5),am("ngModel",e.optionsFields.backupRetentionVersions),_D();}}function re(o,_){o&1&&(Qi(0,"p"),nC(1,9),$l());}function ce(o,_){if(o&1){let e=vT();Qi(0,"p"),nC(1,10),$l(),Qi(2,"sh-form-field")(3,"p"),nC(4,11),$l(),Qi(5,"label",25),nC(6,12),$l(),Qi(7,"input",26),cm("ngModelChange",function(n){kd(e);let a=iC(2);return UC(a.optionsFields.backupRetentionCustom,n)||(a.optionsFields.backupRetentionCustom=n),Od(n)}),$l(),CD(),$l();}if(o&2){let e=iC(2);CE(7),am("ngModel",e.optionsFields.backupRetentionCustom),_D();}}function pe(o,_){if(o&1){let e=vT();Qi(0,"sh-select",18)(1,"label",19),nC(2,3),$l(),Qi(3,"input",20),cm("ngModelChange",function(n){kd(e);let a=iC();return UC(a.optionsFields.backupRetention,n)||(a.optionsFields.backupRetention=n),Od(n)}),$l(),CD(),$l(),aT(4,se,2,0,"p")(5,_e,5,2)(6,le,6,1)(7,re,2,0,"p")(8,ce,8,1);}if(o&2){let e=iC();yg("options",e.retentionOptions())("inlineSearch",true)("isClearable",false),CE(3),am("ngModel",e.optionsFields.backupRetention),_D(),CE(),cT(e.optionsFields.backupRetention()==="all"?4:e.optionsFields.backupRetention()==="time"?5:e.optionsFields.backupRetention()==="versions"?6:e.optionsFields.backupRetention()==="smart"?7:e.optionsFields.backupRetention()==="custom"?8:-1);}}var de=[{value:"all",name:$localize`Keep all backups`},{value:"time",name:$localize`Delete backups that are older than`},{value:"versions",name:$localize`Keep a specific number of backups`},{value:"smart",name:$localize`Smart backup retention`},{value:"custom",name:$localize`Custom backup retention`}],y=class o{#e=T(ke);#n=T(ee);#t=T(W);formRef=D1.required("formRef");isSubmitting=this.#e.isSubmitting;settings=this.#e.settings;optionsFields=this.#e.optionsFields;applicationOptions=this.#e.applicationOptions;isSyncMode=this.#e.isSyncMode;retentionOptions=Ge(de);goBack(){this.#n.navigate(["schedule"],{relativeTo:this.#t.parent});}submit(){switch(this.#e.validateBeforeSubmit()){case "general":this.#n.navigate(["general"],{relativeTo:this.#t.parent});return;case "destination":this.#n.navigate(["destination"],{relativeTo:this.#t.parent});return;case "source":this.#n.navigate(["source-data"],{relativeTo:this.#t.parent});return}this.#e.submit();}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=hw({type:o,selectors:[["app-advanced-options-settings"]],viewQuery:function(e,s){e&1&&Wg(s.formRef,oe,5),e&2&&fC();},decls:12,vars:8,consts:()=>{let _;_=$localize`Options`;let e;e=$localize`${"\uFFFD#8\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let s;s=$localize`${"\uFFFD#11\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SH_ICON: Submit `;let n;n=$localize`Backup retention`;let a;a=$localize`Nothing will be deleted. The backup size will grow with each change.`;let b;b=$localize`If at least one newer backup is found, all backups older than this date are deleted.`;let A;A=$localize`Time to keep versions`;let k;k=$localize`Once there are more backups than the specified number, the oldest backups are deleted.`;let F;F=$localize`Number of versions`;let w;w=$localize` Over time backups will be deleted automatically. There will remain one backup for each of the last 7 days, each of the last 4 weeks, each of the last 12 months. There will always be at least one remaining backup. `;let $;$=$localize` Enter a retention strategy manually. Placeholders are D/W/Y for days/weeks/years and U for unlimited. The syntax is: 7D:1D,4W:1W,36M:1M. This example keeps one backup for each of the next 7 days, one for each of the next 4 weeks, and one for each of the next 36 months. This can also be written as 1W:1D,1M:1W,3Y:1M. `;let L;L=$localize`Once there are more backups than the specified number, the oldest backups are deleted.`;let G;return G=$localize`Retention expression`,[_,e,s,n,a,b,A,k,F,w,$,L,G,[1,"title-30"],[3,"optionsChange","options","applicationOptions","hasFreeTextSettings","hiddenOptions"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","",1,"raised","primary",3,"click"],["value","value","label","name",3,"options","inlineSearch","isClearable"],["for","size"],["type","text",3,"ngModelChange","ngModel"],[3,"ngModelChange","customId","ngModel"],["for","backupRetentionTime"],["for","backupRetentionVersions"],["type","number","id","backupRetentionVersions",3,"ngModelChange","ngModel"],["for","backupRetentionCustom"],["type","text","id","backupRetentionCustom",3,"ngModelChange","ngModel"]]},template:function(e,s){e&1&&(Qi(0,"section")(1,"h3",13),nC(2,0),$l(),aT(3,pe,9,5),Qi(4,"app-options-list",14),cm("optionsChange",function(a){return UC(s.settings,a)||(s.settings=a),a}),$l(),Qi(5,"div",15)(6,"button",16),Vg("click",function(){return s.goBack()}),Lg(7,1),vg(8,"sh-icon"),Fg(),$l(),Qi(9,"button",17),Vg("click",function(){return s.submit()}),Lg(10,2),vg(11,"sh-icon"),Fg(),$l()()()),e&2&&(CE(3),cT(s.isSyncMode()?-1:3),CE(),am("options",s.settings),yg("applicationOptions",s.applicationOptions())("hasFreeTextSettings",true)("hiddenOptions",KC(7,ae)),CE(5),Yg("loading",s.isSubmitting()));},dependencies:[Bn,Ze,en,Rn,Jt,Oe,Mt,v,N,Nt,Fe],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:37.5rem;padding:2.5rem}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding-bottom:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.form-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 2.5rem;gap:.5rem;align-items:flex-end}.remote-volume-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.remote-volume-wrap[_ngcontent-%COMP%] p.warning[_ngcontent-%COMP%]{color:#7d7d00}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.advanced-option[_ngcontent-%COMP%]{display:grid;gap:.5rem;grid-template-columns:1fr 1fr 2.5rem;align-items:flex-end}sh-select[_ngcontent-%COMP%]{--miw: p2r(120)}"]})};export{y as default};
package/chunk-BO2GlieG.js DELETED
@@ -1 +0,0 @@
1
- import {ai as m$1,aj as l,by as Xr,bs as x$1,bz as mw,bA as dd,b6 as Iw,bB as so,bC as ED,ae as eo,ba as ig,aD as YC,V as Vg,bD as Gv,Y as Yg,bE as et$1,bF as ve$1,bG as Mv,bH as ww,bI as b1,c as me$1,N as Nt$1,G as Ge$1,T,bJ as fe,bK as Dy,aG as pt$1,bL as s,q as qe$1,bM as Z,z as za,bN as M1,bO as Jo,bP as D$1,bQ as Fl,bR as Re,aC as mg}from'./main-VVQP2YE7.js';var ze=(()=>{class n{_renderer;_elementRef;onChange=e=>{};onTouched=()=>{};constructor(e,i){this._renderer=e,this._elementRef=i;}setProperty(e,i){this._renderer.setProperty(this._elementRef.nativeElement,e,i);}registerOnTouched(e){this.onTouched=e;}registerOnChange(e){this.onChange=e;}setDisabledState(e){this.setProperty("disabled",e);}static \u0275fac=function(i){return new(i||n)(so(ED),so(eo))};static \u0275dir=Iw({type:n})}return n})(),W=(()=>{class n extends ze{static \u0275fac=(()=>{let e;return function(r){return (e||(e=Gv(n)))(r||n)}})();static \u0275dir=Iw({type:n,features:[ig]})}return n})(),D=new x$1(""),_t={provide:D,useExisting:Jo(()=>yt),multi:true},yt=(()=>{class n extends W{writeValue(e){this.setProperty("checked",e);}static \u0275fac=(()=>{let e;return function(r){return (e||(e=Gv(n)))(r||n)}})();static \u0275dir=Iw({type:n,selectors:[["input","type","checkbox","formControlName","",3,"ngNoCva",""],["input","type","checkbox","formControl","",3,"ngNoCva",""],["input","type","checkbox","ngModel","",3,"ngNoCva",""]],hostBindings:function(i,r){i&1&&Vg("change",function(a){return r.onChange(a.target.checked)})("blur",function(){return r.onTouched()});},standalone:false,features:[YC([_t]),ig]})}return n})(),Ct={provide:D,useExisting:Jo(()=>Ze),multi:true};function Vt(){let n=s()?s().getUserAgent():"";return /android (\d+)/.test(n.toLowerCase())}var Dt=new x$1(""),Ze=(()=>{class n extends ze{_compositionMode;_composing=false;constructor(e,i,r){super(e,i),this._compositionMode=r,this._compositionMode==null&&(this._compositionMode=!Vt());}writeValue(e){let i=e??"";this.setProperty("value",i);}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e);}_compositionStart(){this._composing=true;}_compositionEnd(e){this._composing=false,this._compositionMode&&this.onChange(e);}static \u0275fac=function(i){return new(i||n)(so(ED),so(eo),so(Dt,8))};static \u0275dir=Iw({type:n,selectors:[["input","formControlName","",3,"type","checkbox",3,"ngNoCva",""],["textarea","formControlName","",3,"ngNoCva",""],["input","formControl","",3,"type","checkbox",3,"ngNoCva",""],["textarea","formControl","",3,"ngNoCva",""],["input","ngModel","",3,"type","checkbox",3,"ngNoCva",""],["textarea","ngModel","",3,"ngNoCva",""],["","ngDefaultControl",""]],hostBindings:function(i,r){i&1&&Vg("input",function(a){return r._handleInput(a.target.value)})("blur",function(){return r.onTouched()})("compositionstart",function(){return r._compositionStart()})("compositionend",function(a){return r._compositionEnd(a.target.value)});},standalone:false,features:[YC([Ct]),ig]})}return n})();function Ve(n){return n==null||De(n)===0}function De(n){return n==null?null:Array.isArray(n)||typeof n=="string"?n.length:n instanceof Set?n.size:null}var b=new x$1(""),w=new x$1(""),bt=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,me=class{static min(t){return At(t)}static max(t){return Mt(t)}static required(t){return Xe(t)}static requiredTrue(t){return Et(t)}static email(t){return Ft(t)}static minLength(t){return wt(t)}static maxLength(t){return Nt(t)}static pattern(t){return St(t)}static nullValidator(t){return J()}static compose(t){return tt(t)}static composeAsync(t){return nt(t)}};function At(n){return t=>{if(t.value==null||n==null)return null;let e=parseFloat(t.value);return !isNaN(e)&&e<n?{min:{min:n,actual:t.value}}:null}}function Mt(n){return t=>{if(t.value==null||n==null)return null;let e=parseFloat(t.value);return !isNaN(e)&&e>n?{max:{max:n,actual:t.value}}:null}}function Xe(n){return Ve(n.value)?{required:true}:null}function Et(n){return n.value===true?null:{required:true}}function Ft(n){return Ve(n.value)||bt.test(n.value)?null:{email:true}}function wt(n){return t=>{let e=t.value?.length??De(t.value);return e===null||e===0?null:e<n?{minlength:{requiredLength:n,actualLength:e}}:null}}function Nt(n){return t=>{let e=t.value?.length??De(t.value);return e!==null&&e>n?{maxlength:{requiredLength:n,actualLength:e}}:null}}function St(n){if(!n)return J;let t,e;return typeof n=="string"?(e="",n.charAt(0)!=="^"&&(e+="^"),e+=n,n.charAt(n.length-1)!=="$"&&(e+="$"),t=new RegExp(e)):(e=n.toString(),t=n),i=>{if(Ve(i.value))return null;let r=i.value;return t.test(r)?null:{pattern:{requiredPattern:e,actualValue:r}}}}function J(n){return null}function Ye(n){return n!=null}function Ke(n){return Fl(n)?Re(n):n}function Je(n){let t={};return n.forEach(e=>{t=e!=null?l(l({},t),e):t;}),Object.keys(t).length===0?null:t}function Qe(n,t){return t.map(e=>e(n))}function It(n){return !n.validate}function et(n){return n.map(t=>It(t)?t:e=>t.validate(e))}function tt(n){if(!n)return null;let t=n.filter(Ye);return t.length==0?null:function(e){return Je(Qe(e,t))}}function be(n){return n!=null?tt(et(n)):null}function nt(n){if(!n)return null;let t=n.filter(Ye);return t.length==0?null:function(e){let i=Qe(e,t).map(Ke);return Dy(i).pipe(pt$1(Je))}}function Ae(n){return n!=null?nt(et(n)):null}function Ge(n,t){return n===null?[t]:Array.isArray(n)?[...n,t]:[n,t]}function it(n){return n._rawValidators}function rt(n){return n._rawAsyncValidators}function ve(n){return n?Array.isArray(n)?n:[n]:[]}function Q(n,t){return Array.isArray(n)?n.includes(t):n===t}function Ue(n,t){let e=ve(t);return ve(n).forEach(r=>{Q(e,r)||e.push(r);}),e}function He(n,t){return ve(t).filter(e=>!Q(n,e))}var ee=class{get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators=[];_rawAsyncValidators=[];_setValidators(t){this._rawValidators=t||[],this._composedValidatorFn=be(this._rawValidators);}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=Ae(this._rawAsyncValidators);}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(t){this._onDestroyCallbacks.push(t);}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(t=>t()),this._onDestroyCallbacks=[];}reset(t=void 0){this.control?.reset(t);}hasError(t,e){return this.control?this.control.hasError(t,e):false}getError(t,e){return this.control?this.control.getError(t,e):null}},d=class extends ee{name;get formDirective(){return null}get path(){return null}};var j="VALID",K="INVALID",I="PENDING",B="DISABLED",V=class{},te=class extends V{value;source;constructor(t,e){super(),this.value=t,this.source=e;}},U=class extends V{pristine;source;constructor(t,e){super(),this.pristine=t,this.source=e;}},H=class extends V{touched;source;constructor(t,e){super(),this.touched=t,this.source=e;}},O=class extends V{status;source;constructor(t,e){super(),this.status=t,this.source=e;}},ne=class extends V{source;constructor(t){super(),this.source=t;}},F=class extends V{source;constructor(t){super(),this.source=t;}};function Me(n){return (le(n)?n.validators:n)||null}function Ot(n){return Array.isArray(n)?be(n):n||null}function Ee(n,t){return (le(t)?t.asyncValidators:n)||null}function xt(n){return Array.isArray(n)?Ae(n):n||null}function le(n){return n!=null&&!Array.isArray(n)&&typeof n=="object"}function st(n,t,e){let i=n.controls;if(!(t?Object.keys(i):i).length)throw new D$1(1e3,"");if(!at(i,e))throw new D$1(1001,"")}function ot(n,t,e){n._forEachChild((i,r)=>{if(e[r]===void 0)throw new D$1(-1002,"")});}var x=class{_pendingDirty=false;_hasOwnPendingAsyncValidator=null;_pendingTouched=false;_onCollectionChange=()=>{};_updateOn;_hasRequired=Ge$1(false);_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(t,e){this._assignValidators(t),this._assignAsyncValidators(e);}get validator(){return this._composedValidatorFn}set validator(t){this._rawValidators=this._composedValidatorFn=t,this._updateHasRequiredValidator();}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(t){this._rawAsyncValidators=this._composedAsyncValidatorFn=t;}get parent(){return this._parent}get status(){return me$1(this.statusReactive)}set status(t){me$1(()=>this.statusReactive.set(t));}_status=Nt$1(()=>this.statusReactive());statusReactive=Ge$1(void 0);get valid(){return this.status===j}get invalid(){return this.status===K}get pending(){return this.status===I}get disabled(){return this.status===B}get enabled(){return this.status!==B}errors;get pristine(){return me$1(this.pristineReactive)}set pristine(t){me$1(()=>this.pristineReactive.set(t));}_pristine=Nt$1(()=>this.pristineReactive());pristineReactive=Ge$1(true);get dirty(){return !this.pristine}get touched(){return me$1(this.touchedReactive)}set touched(t){me$1(()=>this.touchedReactive.set(t));}_touched=Nt$1(()=>this.touchedReactive());touchedReactive=Ge$1(false);get untouched(){return !this.touched}_events=new fe;events=this._events.asObservable();valueChanges;statusChanges;get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(t){this._assignValidators(t);}setAsyncValidators(t){this._assignAsyncValidators(t);}addValidators(t){this.setValidators(Ue(t,this._rawValidators));}addAsyncValidators(t){this.setAsyncValidators(Ue(t,this._rawAsyncValidators));}removeValidators(t){this.setValidators(He(t,this._rawValidators));}removeAsyncValidators(t){this.setAsyncValidators(He(t,this._rawAsyncValidators));}hasValidator(t){return Q(this._rawValidators,t)}hasAsyncValidator(t){return Q(this._rawAsyncValidators,t)}clearValidators(){this.validator=null;}clearAsyncValidators(){this.asyncValidator=null;}markAsTouched(t={}){let e=this.touched===false;this.touched=true;let i=t.sourceControl??this;t.onlySelf||this._parent?.markAsTouched(m$1(l({},t),{sourceControl:i})),e&&t.emitEvent!==false&&this._events.next(new H(true,i));}markAllAsDirty(t={}){this.markAsDirty({onlySelf:true,emitEvent:t.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsDirty(t));}markAllAsTouched(t={}){this.markAsTouched({onlySelf:true,emitEvent:t.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsTouched(t));}markAsUntouched(t={}){let e=this.touched===true;this.touched=false,this._pendingTouched=false;let i=t.sourceControl??this;this._forEachChild(r=>{r.markAsUntouched({onlySelf:true,emitEvent:t.emitEvent,sourceControl:i});}),t.onlySelf||this._parent?._updateTouched(t,i),e&&t.emitEvent!==false&&this._events.next(new H(false,i));}markAsDirty(t={}){let e=this.pristine===true;this.pristine=false;let i=t.sourceControl??this;t.onlySelf||this._parent?.markAsDirty(m$1(l({},t),{sourceControl:i})),e&&t.emitEvent!==false&&this._events.next(new U(false,i));}markAsPristine(t={}){let e=this.pristine===false;this.pristine=true,this._pendingDirty=false;let i=t.sourceControl??this;this._forEachChild(r=>{r.markAsPristine({onlySelf:true,emitEvent:t.emitEvent});}),t.onlySelf||this._parent?._updatePristine(t,i),e&&t.emitEvent!==false&&this._events.next(new U(true,i));}markAsPending(t={}){this.status=I;let e=t.sourceControl??this;t.emitEvent!==false&&(this._events.next(new O(this.status,e)),this.statusChanges.emit(this.status)),t.onlySelf||this._parent?.markAsPending(m$1(l({},t),{sourceControl:e}));}disable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=B,this.errors=null,this._forEachChild(r=>{r.disable(m$1(l({},t),{onlySelf:true}));}),this._updateValue();let i=t.sourceControl??this;t.emitEvent!==false&&(this._events.next(new te(this.value,i)),this._events.next(new O(this.status,i)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(m$1(l({},t),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(r=>r(true));}enable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=j,this._forEachChild(i=>{i.enable(m$1(l({},t),{onlySelf:true}));}),this.updateValueAndValidity({onlySelf:true,emitEvent:t.emitEvent}),this._updateAncestors(m$1(l({},t),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(i=>i(false));}_updateAncestors(t,e){t.onlySelf||(this._parent?.updateValueAndValidity(t),t.skipPristineCheck||this._parent?._updatePristine({},e),this._parent?._updateTouched({},e));}setParent(t){this._parent=t;}getRawValue(){return this.value}updateValueAndValidity(t={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let i=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===j||this.status===I)&&this._runAsyncValidator(i,t.emitEvent);}let e=t.sourceControl??this;t.emitEvent!==false&&(this._events.next(new te(this.value,e)),this._events.next(new O(this.status,e)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),t.onlySelf||this._parent?.updateValueAndValidity(m$1(l({},t),{sourceControl:e}));}_updateTreeValidity(t={emitEvent:true}){this._forEachChild(e=>e._updateTreeValidity(t)),this.updateValueAndValidity({onlySelf:true,emitEvent:t.emitEvent});}_setInitialStatus(){this.status=this._allControlsDisabled()?B:j;}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t,e){if(this.asyncValidator){this.status=I,this._hasOwnPendingAsyncValidator={emitEvent:e!==false,shouldHaveEmitted:t!==false};let i=Ke(this.asyncValidator(this));this._asyncValidationSubscription=i.subscribe(r=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(r,{emitEvent:e,shouldHaveEmitted:t});});}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let t=(this._hasOwnPendingAsyncValidator?.emitEvent||this._hasOwnPendingAsyncValidator?.shouldHaveEmitted)??false;return this._hasOwnPendingAsyncValidator=null,t}return false}setErrors(t,e={}){this.errors=t,this._updateControlsErrors(e.emitEvent!==false,this,e.shouldHaveEmitted);}get(t){let e=t;return e==null||(Array.isArray(e)||(e=e.split(".")),e.length===0)?null:e.reduce((i,r)=>i&&i._find(r),this)}getError(t,e){let i=e?this.get(e):this;return i?.errors?i.errors[t]:null}hasError(t,e){return !!this.getError(t,e)}get root(){let t=this;for(;t._parent;)t=t._parent;return t}_updateControlsErrors(t,e,i){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),(t||i)&&this._events.next(new O(this.status,e)),this._parent&&this._parent._updateControlsErrors(t,e,i);}_initObservables(){this.valueChanges=new et$1,this.statusChanges=new et$1;}_calculateStatus(){return this._allControlsDisabled()?B:this.errors?K:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(I)?I:this._anyControlsHaveStatus(K)?K:j}_anyControlsHaveStatus(t){return this._anyControls(e=>e.status===t)}_anyControlsDirty(){return this._anyControls(t=>t.dirty)}_anyControlsTouched(){return this._anyControls(t=>t.touched)}_updatePristine(t,e){let i=!this._anyControlsDirty(),r=this.pristine!==i;this.pristine=i,t.onlySelf||this._parent?._updatePristine(t,e),r&&this._events.next(new U(this.pristine,e));}_updateTouched(t={},e){this.touched=this._anyControlsTouched(),this._events.next(new H(this.touched,e)),t.onlySelf||this._parent?._updateTouched(t,e);}_onDisabledChange=[];_registerOnCollectionChange(t){this._onCollectionChange=t;}_setUpdateStrategy(t){le(t)&&t.updateOn!=null&&(this._updateOn=t.updateOn);}_parentMarkedDirty(t){return !t&&!!this._parent?.dirty&&!this._parent._anyControlsDirty()}_find(t){return null}_assignValidators(t){this._rawValidators=Array.isArray(t)?t.slice():t,this._composedValidatorFn=Ot(this._rawValidators),this._updateHasRequiredValidator();}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=xt(this._rawAsyncValidators);}_updateHasRequiredValidator(){me$1(()=>this._hasRequired.set(this.hasValidator(me.required)));}};function at(n,t){return Object.hasOwn(n,t)}function Rt(n){return n.tagName==="INPUT"||n.tagName==="SELECT"||n.tagName==="TEXTAREA"}function Pt(n,t,e,i){switch(e){case "name":n.setAttribute(t,e,i);break;case "disabled":case "readonly":case "required":i?n.setAttribute(t,e,""):n.removeAttribute(t,e);break;case "max":case "min":case "minLength":case "maxLength":i!==void 0?n.setAttribute(t,e,i.toString()):n.removeAttribute(t,e);break}}var _e=class{kind;context;control;message;constructor({kind:t,context:e,control:i}){this.kind=t,this.context=e,this.control=i;}};var kt=(()=>{class n{_validator=J;_onChange;_enabled;ngOnChanges(e){if(this.inputName in e){let i=this.normalizeInput(e[this.inputName].currentValue);this._enabled=this.enabled(i),this._validator=this._enabled?this.createValidator(i):J,this._onChange?.();}}validate(e){return this._validator(e)}registerOnValidatorChange(e){this._onChange=e;}enabled(e){return e!=null}static \u0275fac=function(i){return new(i||n)};static \u0275dir=Iw({type:n,features:[Mv]})}return n})();var Tt={provide:b,useExisting:Jo(()=>lt),multi:true};var lt=(()=>{class n extends kt{required;inputName="required";normalizeInput=M1;createValidator=e=>Xe;enabled(e){return e}static \u0275fac=(()=>{let e;return function(r){return (e||(e=Gv(n)))(r||n)}})();static \u0275dir=Iw({type:n,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(i,r){i&2&&mg("required",r._enabled?"":null);},inputs:{required:"required"},standalone:false,features:[YC([Tt]),ig]})}return n})();var jt=new x$1(""),N=new x$1("",{factory:()=>q}),q="always";function ue(n,t){return [...t.path,n]}function ie(n,t,e=q){Fe(n,t),t.valueAccessor.writeValue(n.value),(n.disabled||e==="always")&&t.valueAccessor.setDisabledState?.(n.disabled),Gt(n,t),Ht(n,t),Ut(n,t),Bt(n,t);}function re(n,t,e=true){let i=()=>{};t?.valueAccessor?.registerOnChange(i),t?.valueAccessor?.registerOnTouched(i),oe(n,t),n&&(t._invokeOnDestroyCallbacks(),n._registerOnCollectionChange(()=>{}));}function se(n,t){n.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(t);});}function Bt(n,t){if(t.valueAccessor.setDisabledState){let e=i=>{t.valueAccessor.setDisabledState(i);};n.registerOnDisabledChange(e),t._registerOnDestroy(()=>{n._unregisterOnDisabledChange(e);});}}function Fe(n,t){let e=it(n);t.validator!==null?n.setValidators(Ge(e,t.validator)):typeof e=="function"&&n.setValidators([e]);let i=rt(n);t.asyncValidator!==null?n.setAsyncValidators(Ge(i,t.asyncValidator)):typeof i=="function"&&n.setAsyncValidators([i]);let r=()=>n.updateValueAndValidity();se(t._rawValidators,r),se(t._rawAsyncValidators,r);}function oe(n,t){let e=false;if(n!==null){if(t.validator!==null){let r=it(n);if(Array.isArray(r)&&r.length>0){let s=r.filter(a=>a!==t.validator);s.length!==r.length&&(e=true,n.setValidators(s));}}if(t.asyncValidator!==null){let r=rt(n);if(Array.isArray(r)&&r.length>0){let s=r.filter(a=>a!==t.asyncValidator);s.length!==r.length&&(e=true,n.setAsyncValidators(s));}}}let i=()=>{};return se(t._rawValidators,i),se(t._rawAsyncValidators,i),e}function Gt(n,t){t.valueAccessor.registerOnChange(e=>{n._pendingValue=e,n._pendingChange=true,n._pendingDirty=true,n.updateOn==="change"&&ut(n,t);});}function Ut(n,t){t.valueAccessor.registerOnTouched(()=>{n._pendingTouched=true,n.updateOn==="blur"&&n._pendingChange&&ut(n,t),n.updateOn!=="submit"&&n.markAsTouched();});}function ut(n,t){n._pendingDirty&&n.markAsDirty(),n.setValue(n._pendingValue,{emitModelToViewChange:false}),t.viewToModelUpdate(n._pendingValue),n._pendingChange=false;}function Ht(n,t){let e=(i,r)=>{t.valueAccessor.writeValue(i),r&&t.viewToModelUpdate(i);};n.registerOnChange(e),t._registerOnDestroy(()=>{n._unregisterOnChange(e);});}function dt(n,t){Fe(n,t);}function Lt(n,t){return oe(n,t)}function we(n,t){if(!n.hasOwnProperty("model"))return false;let e=n.model;return e.isFirstChange()?true:!Object.is(t,e.currentValue)}function Wt(n){return Object.getPrototypeOf(n.constructor)===W}function ct(n,t){n._syncPendingControls(),t.forEach(e=>{let i=e.control;i.updateOn==="submit"&&i._pendingChange&&(e.viewToModelUpdate(i._pendingValue),i._pendingChange=false);});}function qt(n,t){if(!t)return null;let e,i,r;return t.forEach(s=>{s.constructor===Ze?e=s:Wt(s)?i=s:r=s;}),r||i||e||null}function $t(n,t){let e=n.indexOf(t);e>-1&&n.splice(e,1);}var Ne={provide:jt,useFactory:()=>{let n=T(m,{self:true});return {setParseErrors:t=>{n.setParseErrorSource(t);},set onReset(t){n.onReset=t;}}}},m=class extends ee{_parent=null;name=null;valueAccessor=null;isCustomControlBased=false;userOnReset;resetSubscription;set onReset(t){this.userOnReset=t,this.resetSubscription?.unsubscribe(),this.resetSubscription=void 0,this.control&&(this.resetSubscription=this.control.events.subscribe(e=>{e instanceof F&&this.control&&this.userOnReset?.(this.control.value);}),this.subscription?.add(this.resetSubscription));}isNativeFormElement=false;rawValueAccessors;_selectedValueAccessor=null;get selectedValueAccessor(){return this._selectedValueAccessor??=qt(this,this.rawValueAccessors)}parseErrorsValidator=null;renderer;injector;requiredValidatorViaDi;subscription;customControlBindings=null;constructor(t,e,i){super(),this.injector=t,this.renderer=e,this.rawValueAccessors=i,this.injector?.get(qe$1)?.onDestroy(()=>{this.removeParseErrorsValidator(this.control),this.subscription?.unsubscribe();});}setupCustomControl(){this.subscription?.unsubscribe();let t=this.injector?.get(b1);if(!this.control||!t)return;let e=t.markForCheck.bind(t);this.subscription=new Z,this.subscription.add(this.control.valueChanges.subscribe(e)),this.subscription.add(this.control.statusChanges.subscribe(e)),this.resetSubscription?.unsubscribe(),this.resetSubscription=void 0,this.userOnReset&&(this.resetSubscription=this.control.events.subscribe(i=>{i instanceof F&&this.control&&this.userOnReset?.(this.control.value);}),this.subscription.add(this.resetSubscription)),this.parseErrorsValidator&&this.control.addValidators(this.parseErrorsValidator);}ngControlCreate(t){!t.nativeElement.hasAttribute?.("ngNoCva")&&(this.rawValueAccessors&&this.rawValueAccessors.length>0||this.valueAccessor!==null)||!t.customControl||(this.isCustomControlBased=true,t.listenToCustomControlModel(r=>{this.control?.setValue(r,{emitModelToViewChange:false}),this.control?.markAsDirty(),this.viewToModelUpdate(r);}),t.listenToCustomControlOutput("touch",()=>{this.control?.markAsTouched();}),this.customControlBindings={},this.isNativeFormElement=Rt(t.nativeElement),this.requiredValidatorViaDi=this._rawValidators.find(r=>r instanceof lt));}ngControlUpdate(t,e){if(!this.isCustomControlBased)return;let i=this.control,r=this.customControlBindings;Object.is(r.value,i.value)||(r.value=i.value,t.setCustomControlModelInput(i.value)),this.bindControlProperty(t,r,"touched",i.touched),this.bindControlProperty(t,r,"dirty",i.dirty),this.bindControlProperty(t,r,"valid",i.valid),this.bindControlProperty(t,r,"invalid",i.invalid),this.bindControlProperty(t,r,"pending",i.pending),this.bindControlProperty(t,r,"disabled",i.disabled),this.shouldBindRequired&&this.bindControlProperty(t,r,"required",this.isRequired);let s=i.errors;if(r.errors!==s){r.errors=s;let a=this._convertErrors(s);t.setInputOnDirectives("errors",a);}}get isRequired(){return (this.requiredValidatorViaDi?._enabled||this.control?._hasRequired())??false}get shouldBindRequired(){return true}bindControlProperty(t,e,i,r){if(e[i]===r)return;e[i]=r;let s=t.setInputOnDirectives(i,r);this.isNativeFormElement&&!s&&(i==="disabled"||i==="required")&&this.renderer&&Pt(this.renderer,t.nativeElement,i,r);}_convertErrors(t){if(t===null)return [];let e=this.control;return Object.entries(t).map(([i,r])=>new _e({context:r,kind:i,control:e}))}setParseErrorSource(t){if(t===void 0)return;let e=null,i=Nt$1(()=>{let r=t();return r.length===0?null:r.reduce((s,a)=>(s[a.kind]=a,s),{})});this.parseErrorsValidator=(()=>e).bind(this),za(()=>{e=i(),this.control?.updateValueAndValidity({emitEvent:false});},{injector:this.injector});}removeParseErrorsValidator(t){this.parseErrorsValidator&&(t?.removeValidators(this.parseErrorsValidator),t?.updateValueAndValidity({emitEvent:false}));}},ae=class{_cd;constructor(t){this._cd=t;}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return !!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return !!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return !!this._cd?.control?.invalid}get isPending(){return !!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}};var Rn=(()=>{class n extends ae{constructor(e){super(e);}static \u0275fac=function(i){return new(i||n)(so(m,2))};static \u0275dir=Iw({type:n,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(i,r){i&2&&Yg("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending);},standalone:false,features:[ig]})}return n})(),Pn=(()=>{class n extends ae{constructor(e){super(e);}static \u0275fac=function(i){return new(i||n)(so(d,10))};static \u0275dir=Iw({type:n,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["","formArray",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(i,r){i&2&&Yg("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)("ng-submitted",r.isSubmitted);},standalone:false,features:[ig]})}return n})(),R=class extends x{constructor(t,e,i){super(Me(e),Ee(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:true,emitEvent:!!this.asyncValidator});}controls;registerControl(t,e){let i=this._find(t);return i||(this.controls[t]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(t,e,i={}){this.registerControl(t,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange();}removeControl(t,e={}){let i=this._find(t);i&&i._registerOnCollectionChange(()=>{}),delete this.controls[t],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange();}setControl(t,e,i={}){let r=this._find(t);r&&r._registerOnCollectionChange(()=>{}),delete this.controls[t],e&&this.registerControl(t,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange();}contains(t){return this._find(t)?.enabled===true}setValue(t,e={}){me$1(()=>{ot(this,true,t),Object.keys(t).forEach(i=>{st(this,true,i),this.controls[i].setValue(t[i],{onlySelf:true,emitEvent:e.emitEvent});}),this.updateValueAndValidity(e);});}patchValue(t,e={}){t!=null&&(Object.keys(t).forEach(i=>{let r=this._find(i);r&&r.patchValue(t[i],{onlySelf:true,emitEvent:e.emitEvent});}),this.updateValueAndValidity(e));}reset(t={},e={}){this._forEachChild((i,r)=>{i.reset(t?t[r]:null,m$1(l({},e),{onlySelf:true}));}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e),e?.emitEvent!==false&&this._events.next(new F(this));}getRawValue(){return this._reduceChildren({},(t,e,i)=>(t[i]=e.getRawValue(),t))}_syncPendingControls(){let t=this._reduceChildren(false,(e,i)=>i._syncPendingControls()?true:e);return t&&this.updateValueAndValidity({onlySelf:true}),t}_forEachChild(t){Object.keys(this.controls).forEach(e=>{let i=this.controls[e];i&&t(i,e);});}_setUpControls(){this._forEachChild(t=>{t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange);});}_updateValue(){this.value=this._reduceValue();}_anyControls(t){for(let[e,i]of Object.entries(this.controls))if(this.contains(e)&&t(i))return true;return false}_reduceValue(){let t={};return this._reduceChildren(t,(e,i,r)=>((i.enabled||this.disabled)&&(e[r]=i.value),e))}_reduceChildren(t,e){let i=t;return this._forEachChild((r,s)=>{i=e(i,r,s);}),i}_allControlsDisabled(){for(let t of Object.keys(this.controls))if(this.controls[t].enabled)return false;return Object.keys(this.controls).length>0||this.disabled}_find(t){return at(this.controls,t)?this.controls[t]:null}};var ye=class extends R{};var zt={provide:d,useExisting:Jo(()=>Zt)},G=Promise.resolve(),Zt=(()=>{class n extends d{callSetDisabledState;get submitted(){return me$1(this.submittedReactive)}_submitted=Nt$1(()=>this.submittedReactive());submittedReactive=Ge$1(false);_directives=new Set;form;ngSubmit=new et$1;options;constructor(e,i,r){super(),this.callSetDisabledState=r,this.form=new R({},be(e),Ae(i));}ngAfterViewInit(){this._setUpdateStrategy();}get formDirective(){return this}get control(){return this.form}get path(){return []}get controls(){return this.form.controls}addControl(e){G.then(()=>{let i=this._findContainer(e.path);e.control=i.registerControl(e.name,e.control),e._setupWithForm(this.callSetDisabledState),e.control.updateValueAndValidity({emitEvent:false}),this._directives.add(e);});}getControl(e){return this.form.get(e.path)}removeControl(e){G.then(()=>{this._findContainer(e.path)?.removeControl(e.name),this._directives.delete(e);});}addFormGroup(e){G.then(()=>{let i=this._findContainer(e.path),r=new R({});dt(r,e),i.registerControl(e.name,r),r.updateValueAndValidity({emitEvent:false});});}removeFormGroup(e){G.then(()=>{this._findContainer(e.path)?.removeControl?.(e.name);});}getFormGroup(e){return this.form.get(e.path)}updateModel(e,i){G.then(()=>{this.form.get(e.path).setValue(i);});}setValue(e){this.control.setValue(e);}onSubmit(e){return this.submittedReactive.set(true),ct(this.form,this._directives),this.ngSubmit.emit(e),this.form._events.next(new ne(this.control)),e?.target?.method==="dialog"}onReset(){this.resetForm();}resetForm(e=void 0){this.form.reset(e),this.submittedReactive.set(false);}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.form._updateOn=this.options.updateOn);}_findContainer(e){return e.pop(),e.length?this.form.get(e):this.form}static \u0275fac=function(i){return new(i||n)(so(b,10),so(w,10),so(N,8))};static \u0275dir=Iw({type:n,selectors:[["form",3,"ngNoForm","",3,"formGroup","",3,"formArray",""],["ng-form"],["","ngForm",""]],hostBindings:function(i,r){i&1&&Vg("submit",function(a){return r.onSubmit(a)})("reset",function(){return r.onReset()});},inputs:{options:[0,"ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:false,features:[YC([zt]),ig]})}return n})();function Le(n,t){let e=n.indexOf(t);e>-1&&n.splice(e,1);}function We(n){return typeof n=="object"&&n!==null&&Object.keys(n).length===2&&"value"in n&&"disabled"in n}var L=class extends x{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=false;constructor(t=null,e,i){super(Me(e),Ee(i,e)),this._applyFormState(t),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:true,emitEvent:!!this.asyncValidator}),le(e)&&(e.nonNullable||e.initialValueIsDefault)&&(We(t)?this.defaultValue=t.value:this.defaultValue=t);}setValue(t,e={}){me$1(()=>{this.value=this._pendingValue=t,this._onChange.length&&e.emitModelToViewChange!==false&&this._onChange.forEach(i=>i(this.value,e.emitViewToModelChange!==false)),this.updateValueAndValidity(e);});}patchValue(t,e={}){this.setValue(t,e);}reset(t=this.defaultValue,e={}){this._applyFormState(t),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),e.overwriteDefaultValue&&(this.defaultValue=this.value),this._pendingChange=false,e?.emitEvent!==false&&this._events.next(new F(this));}_updateValue(){}_anyControls(t){return false}_allControlsDisabled(){return this.disabled}registerOnChange(t){this._onChange.push(t);}_unregisterOnChange(t){Le(this._onChange,t);}registerOnDisabledChange(t){this._onDisabledChange.push(t);}_unregisterOnDisabledChange(t){Le(this._onDisabledChange,t);}_forEachChild(t){}_syncPendingControls(){return this.updateOn==="submit"&&(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),this._pendingChange)?(this.setValue(this._pendingValue,{onlySelf:true,emitModelToViewChange:false}),true):false}_applyFormState(t){We(t)?(this.value=this._pendingValue=t.value,t.disabled?this.disable({onlySelf:true,emitEvent:false}):this.enable({onlySelf:true,emitEvent:false})):this.value=this._pendingValue=t;}};var Xt=n=>n instanceof L,Yt=(()=>{class n extends d{_parent;ngOnInit(){this._checkParentType(),this.formDirective.addFormGroup(this);}ngOnDestroy(){this.formDirective?.removeFormGroup(this);}get control(){return this.formDirective.getFormGroup(this)}get path(){return ue(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}static \u0275fac=(()=>{let e;return function(r){return (e||(e=Gv(n)))(r||n)}})();static \u0275dir=Iw({type:n,standalone:false,features:[ig]})}return n})();var Kt={provide:m,useExisting:Jo(()=>Jt)},qe=Promise.resolve(),Jt=(()=>{class n extends m{_changeDetectorRef;callSetDisabledState;control=new L;static ngAcceptInputType_isDisabled;_registered=false;viewModel;name="";isDisabled;model;options;update=new et$1;constructor(e,i,r,s,a,P,k,vt){super(k,vt,s),this._changeDetectorRef=a,this.callSetDisabledState=P,this._parent=e,this._setValidators(i),this._setAsyncValidators(r);}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){let i=e.name.previousValue;this.formDirective.removeControl({name:i,path:this._getPath(i)});}this._setUpControl();}"isDisabled"in e&&this._updateDisabled(e),we(e,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model);}ngOnDestroy(){this.formDirective?.removeControl(this);}\u0275ngControlCreate(e){super.ngControlCreate(e);}\u0275ngControlUpdate(e){super.ngControlUpdate(e,false);}get shouldBindRequired(){return false}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e);}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=true;}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.control._updateOn=this.options.updateOn);}_isStandalone(){return !this._parent||!!(this.options&&this.options.standalone)}_setUpStandalone(){this.isCustomControlBased?this.setupCustomControl():(this.valueAccessor??=this.selectedValueAccessor,ie(this.control,this,this.callSetDisabledState)),this.control.updateValueAndValidity({emitEvent:false});}_setupWithForm(e){this.isCustomControlBased?this.setupCustomControl():(this.valueAccessor??=this.selectedValueAccessor,ie(this.control,this,e));}_checkForErrors(){this._checkName();}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name;}_updateValue(e){qe.then(()=>{this.control.setValue(e,{emitViewToModelChange:false}),this._changeDetectorRef?.markForCheck();});}_updateDisabled(e){let i=e.isDisabled.currentValue,r=i!==0&&M1(i);qe.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck();});}_getPath(e){return this._parent?ue(e,this._parent):[e]}static \u0275fac=function(i){return new(i||n)(so(d,9),so(b,10),so(w,10),so(D,10),so(b1,8),so(N,8),so(ve$1,8),so(ED,8))};static \u0275dir=Iw({type:n,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"],options:[0,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],standalone:false,features:[YC([Kt,Ne]),ig,Mv,ww(null)]})}return n})();var Tn=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275dir=Iw({type:n,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""],standalone:false})}return n})(),Qt={provide:D,useExisting:Jo(()=>en),multi:true},en=(()=>{class n extends W{writeValue(e){let i=e??"";this.setProperty("value",i);}registerOnChange(e){this.onChange=i=>{e(i==""?null:parseFloat(i));};}static \u0275fac=(()=>{let e;return function(r){return (e||(e=Gv(n)))(r||n)}})();static \u0275dir=Iw({type:n,selectors:[["input","type","number","formControlName","",3,"ngNoCva",""],["input","type","number","formControl","",3,"ngNoCva",""],["input","type","number","ngModel","",3,"ngNoCva",""]],hostBindings:function(i,r){i&1&&Vg("input",function(a){return r.onChange(a.target.value)})("blur",function(){return r.onTouched()});},standalone:false,features:[YC([Qt]),ig]})}return n})(),tn={provide:D,useExisting:Jo(()=>rn),multi:true};var nn=(()=>{class n{_accessors=[];add(e,i){this._accessors.push([e,i]);}remove(e){for(let i=this._accessors.length-1;i>=0;--i)if(this._accessors[i][1]===e){this._accessors.splice(i,1);return}}select(e){this._accessors.forEach(i=>{this._isSameGroup(i,e)&&i[1]!==e&&i[1].fireUncheck(e.value);});}_isSameGroup(e,i){return e[0].control?e[0]._parent===i._control._parent&&e[1].name===i.name:false}static \u0275fac=function(i){return new(i||n)};static \u0275prov=Xr({token:n,factory:n.\u0275fac})}return n})(),rn=(()=>{class n extends W{_registry;_injector;_state;_control;_fn;setDisabledStateFired=false;onChange=()=>{};name;formControlName;value;callSetDisabledState=T(N,{optional:true})??q;constructor(e,i,r,s){super(e,i),this._registry=r,this._injector=s;}ngOnInit(){this._control=this._injector.get(m),this._checkName(),this._registry.add(this._control,this);}ngOnDestroy(){this._registry.remove(this);}writeValue(e){this._state=e===this.value,this.setProperty("checked",this._state);}registerOnChange(e){this._fn=e,this.onChange=()=>{e(this.value),this._registry.select(this);};}setDisabledState(e){(this.setDisabledStateFired||e||this.callSetDisabledState==="whenDisabledForLegacyCode")&&this.setProperty("disabled",e),this.setDisabledStateFired=true;}fireUncheck(e){this.writeValue(e);}_checkName(){this.name&&this.formControlName&&(this.name,this.formControlName),!this.name&&this.formControlName&&(this.name=this.formControlName);}static \u0275fac=function(i){return new(i||n)(so(ED),so(eo),so(nn),so(ve$1))};static \u0275dir=Iw({type:n,selectors:[["input","type","radio","formControlName","",3,"ngNoCva",""],["input","type","radio","formControl","",3,"ngNoCva",""],["input","type","radio","ngModel","",3,"ngNoCva",""]],hostBindings:function(i,r){i&1&&Vg("change",function(){return r.onChange()})("blur",function(){return r.onTouched()});},inputs:{name:"name",formControlName:"formControlName",value:"value"},standalone:false,features:[YC([tn]),ig]})}return n})(),sn={provide:D,useExisting:Jo(()=>on),multi:true},on=(()=>{class n extends W{writeValue(e){this.setProperty("value",parseFloat(e));}registerOnChange(e){this.onChange=i=>{e(i==""?null:parseFloat(i));};}static \u0275fac=(()=>{let e;return function(r){return (e||(e=Gv(n)))(r||n)}})();static \u0275dir=Iw({type:n,selectors:[["input","type","range","formControlName","",3,"ngNoCva",""],["input","type","range","formControl","",3,"ngNoCva",""],["input","type","range","ngModel","",3,"ngNoCva",""]],hostBindings:function(i,r){i&1&&Vg("change",function(a){return r.onChange(a.target.value)})("input",function(a){return r.onChange(a.target.value)})("blur",function(){return r.onTouched()});},standalone:false,features:[YC([sn]),ig]})}return n})(),Ce=class extends x{constructor(t,e,i){super(Me(e),Ee(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:true,emitEvent:!!this.asyncValidator});}controls;at(t){return this.controls[this._adjustIndex(t)]}push(t,e={}){Array.isArray(t)?t.forEach(i=>{this.controls.push(i),this._registerControl(i);}):(this.controls.push(t),this._registerControl(t)),this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange();}insert(t,e,i={}){this.controls.splice(t,0,e),this._registerControl(e),this.updateValueAndValidity({emitEvent:i.emitEvent});}removeAt(t,e={}){let i=this._adjustIndex(t);i<0&&(i=0),this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),this.controls.splice(i,1),this.updateValueAndValidity({emitEvent:e.emitEvent});}setControl(t,e,i={}){let r=this._adjustIndex(t);r<0&&(r=0),this.controls[r]&&this.controls[r]._registerOnCollectionChange(()=>{}),this.controls.splice(r,1),e&&(this.controls.splice(r,0,e),this._registerControl(e)),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange();}get length(){return this.controls.length}setValue(t,e={}){me$1(()=>{ot(this,false,t),t.forEach((i,r)=>{st(this,false,r),this.at(r).setValue(i,{onlySelf:true,emitEvent:e.emitEvent});}),this.updateValueAndValidity(e);});}patchValue(t,e={}){t!=null&&(t.forEach((i,r)=>{this.at(r)&&this.at(r).patchValue(i,{onlySelf:true,emitEvent:e.emitEvent});}),this.updateValueAndValidity(e));}reset(t=[],e={}){this._forEachChild((i,r)=>{i.reset(t[r],m$1(l({},e),{onlySelf:true}));}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e),e?.emitEvent!==false&&this._events.next(new F(this));}getRawValue(){return this.controls.map(t=>t.getRawValue())}clear(t={}){this.controls.length<1||(this._forEachChild(e=>e._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:t.emitEvent}));}_adjustIndex(t){return t<0?t+this.length:t}_syncPendingControls(){let t=this.controls.reduce((e,i)=>i._syncPendingControls()?true:e,false);return t&&this.updateValueAndValidity({onlySelf:true}),t}_forEachChild(t){this.controls.forEach((e,i)=>{t(e,i);});}_updateValue(){this.value=this.controls.filter(t=>t.enabled||this.disabled).map(t=>t.value);}_anyControls(t){return this.controls.some(e=>e.enabled&&t(e))}_setUpControls(){this._forEachChild(t=>this._registerControl(t));}_allControlsDisabled(){for(let t of this.controls)if(t.enabled)return false;return this.controls.length>0||this.disabled}_registerControl(t){t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange);}_find(t){return this.at(t)??null}};var ht=(()=>{class n extends d{callSetDisabledState;get submitted(){return me$1(this._submittedReactive)}set submitted(e){this._submittedReactive.set(e);}_submitted=Nt$1(()=>this._submittedReactive());_submittedReactive=Ge$1(false);_oldForm;_onCollectionChange=()=>this._updateDomValue();directives=[];constructor(e,i,r){super(),this.callSetDisabledState=r,this._setValidators(e),this._setAsyncValidators(i);}ngOnChanges(e){this.onChanges(e);}ngOnDestroy(){this.onDestroy();}onChanges(e){this._checkFormPresent(),e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form);}onDestroy(){this.form&&(oe(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}));}get formDirective(){return this}get path(){return []}addControl(e){let i=this.form.get(e.path);return e._setupWithForm(i,this.callSetDisabledState),i.updateValueAndValidity({emitEvent:false}),this.directives.push(e),i}getControl(e){return this.form.get(e.path)}removeControl(e){re(e.control||null,e,false),$t(this.directives,e);}addFormGroup(e){this._setUpFormContainer(e);}removeFormGroup(e){this._cleanUpFormContainer(e);}getFormGroup(e){return this.form.get(e.path)}getFormArray(e){return this.form.get(e.path)}addFormArray(e){this._setUpFormContainer(e);}removeFormArray(e){this._cleanUpFormContainer(e);}updateModel(e,i){this.form.get(e.path).setValue(i);}onReset(){this.resetForm();}resetForm(e=void 0,i={}){this.form.reset(e,i),this._submittedReactive.set(false);}onSubmit(e){return this.submitted=true,ct(this.form,this.directives),this.ngSubmit.emit(e),this.form._events.next(new ne(this.control)),e?.target?.method==="dialog"}_updateDomValue(){this.directives.forEach(e=>{let i=e.control,r=this.form.get(e.path);i!==r&&(re(i||null,e),Xt(r)&&e._setupWithForm(r,this.callSetDisabledState));}),this.form._updateTreeValidity({emitEvent:false});}_setUpFormContainer(e){let i=this.form.get(e.path);dt(i,e),i.updateValueAndValidity({emitEvent:false});}_cleanUpFormContainer(e){let i=this.form?.get(e.path);i&&Lt(i,e)&&i.updateValueAndValidity({emitEvent:false});}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm?._registerOnCollectionChange(()=>{});}_updateValidators(){Fe(this.form,this),this._oldForm&&oe(this._oldForm,this);}_checkFormPresent(){this.form;}static \u0275fac=function(i){return new(i||n)(so(b,10),so(w,10),so(N,8))};static \u0275dir=Iw({type:n,features:[ig,Mv]})}return n})();var Se=new x$1(""),an={provide:m,useExisting:Jo(()=>ln)},ln=(()=>{class n extends m{_ngModelWarningConfig;callSetDisabledState;viewModel;form;set isDisabled(e){}model;update=new et$1;static _ngModelWarningSentOnce=false;_ngModelWarningSent=false;constructor(e,i,r,s,a,P,k){super(k,P,r),this._ngModelWarningConfig=s,this.callSetDisabledState=a,this._setValidators(e),this._setAsyncValidators(i);}ngOnChanges(e){if(this._isControlChanged(e)){let i=e.form.previousValue;i&&(re(i,this,false),this.removeParseErrorsValidator(i)),this.isCustomControlBased?this.setupCustomControl():(this.valueAccessor??=this.selectedValueAccessor,ie(this.form,this,this.callSetDisabledState)),this.form.updateValueAndValidity({emitEvent:false});}we(e,this.viewModel)&&(this.form.setValue(this.model),this.viewModel=this.model);}ngOnDestroy(){this.form&&re(this.form,this,false);}get path(){return []}get control(){return this.form}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e);}_isControlChanged(e){return e.hasOwnProperty("form")}\u0275ngControlCreate(e){super.ngControlCreate(e);}\u0275ngControlUpdate(e){super.ngControlUpdate(e,true);}static \u0275fac=function(i){return new(i||n)(so(b,10),so(w,10),so(D,10),so(Se,8),so(N,8),so(ED,8),so(ve$1,8))};static \u0275dir=Iw({type:n,selectors:[["","formControl",""]],inputs:{form:[0,"formControl","form"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},exportAs:["ngForm"],standalone:false,features:[YC([an,Ne]),ig,Mv,ww(null)]})}return n})(),un={provide:d,useExisting:Jo(()=>ft)},ft=(()=>{class n extends Yt{name=null;constructor(e,i,r){super(),this._parent=e,this._setValidators(i),this._setAsyncValidators(r);}_checkParentType(){pt(this._parent);}static \u0275fac=function(i){return new(i||n)(so(d,13),so(b,10),so(w,10))};static \u0275dir=Iw({type:n,selectors:[["","formGroupName",""]],inputs:{name:[0,"formGroupName","name"]},standalone:false,features:[YC([un]),ig]})}return n})(),dn={provide:d,useExisting:Jo(()=>gt)},gt=(()=>{class n extends d{_parent;name=null;constructor(e,i,r){super(),this._parent=e,this._setValidators(i),this._setAsyncValidators(r);}ngOnInit(){pt(this._parent),this.formDirective.addFormArray(this);}ngOnDestroy(){this.formDirective?.removeFormArray(this);}get control(){return this.formDirective.getFormArray(this)}get formDirective(){return this._parent?this._parent.formDirective:null}get path(){return ue(this.name==null?this.name:this.name.toString(),this._parent)}static \u0275fac=function(i){return new(i||n)(so(d,13),so(b,10),so(w,10))};static \u0275dir=Iw({type:n,selectors:[["","formArrayName",""]],inputs:{name:[0,"formArrayName","name"]},standalone:false,features:[YC([dn]),ig]})}return n})();function pt(n){return !(n instanceof ft)&&!(n instanceof ht)&&!(n instanceof gt)}var cn={provide:m,useExisting:Jo(()=>hn)},hn=(()=>{class n extends m{_ngModelWarningConfig;_added=false;viewModel;control;name=null;set isDisabled(e){}model;update=new et$1;static _ngModelWarningSentOnce=false;_ngModelWarningSent=false;constructor(e,i,r,s,a,P,k){super(k,P,s),this._ngModelWarningConfig=a,this._parent=e,this._setValidators(i),this._setAsyncValidators(r);}_setupWithForm(e,i){this.control=e,this.isCustomControlBased?this.setupCustomControl():(this.valueAccessor??=this.selectedValueAccessor,ie(e,this,i));}ngOnChanges(e){this._added||this._setUpControl(),we(e,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model));}ngOnDestroy(){this.formDirective?.removeControl(this);}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e);}get path(){return ue(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_setUpControl(){this.control=this.formDirective.addControl(this),this._added=true;}\u0275ngControlCreate(e){super.ngControlCreate(e);}\u0275ngControlUpdate(e){this.isCustomControlBased&&(this._added||this._setUpControl(),super.ngControlUpdate(e,true));}static \u0275fac=function(i){return new(i||n)(so(d,13),so(b,10),so(w,10),so(D,10),so(Se,8),so(ED,8),so(ve$1,8))};static \u0275dir=Iw({type:n,selectors:[["","formControlName",""]],inputs:{name:[0,"formControlName","name"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},standalone:false,features:[YC([cn,Ne]),ig,Mv,ww(null)]})}return n})();var fn={provide:d,useExisting:Jo(()=>gn)},gn=(()=>{class n extends ht{form=null;ngSubmit=new et$1;get control(){return this.form}static \u0275fac=(()=>{let e;return function(r){return (e||(e=Gv(n)))(r||n)}})();static \u0275dir=Iw({type:n,selectors:[["","formGroup",""]],hostBindings:function(i,r){i&1&&Vg("submit",function(a){return r.onSubmit(a)})("reset",function(){return r.onReset()});},inputs:{form:[0,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:false,features:[YC([fn]),ig]})}return n})();var mt=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=mw({type:n});static \u0275inj=dd({})}return n})();function $e(n){return !!n&&(n.asyncValidators!==void 0||n.validators!==void 0||n.updateOn!==void 0)}var jn=(()=>{class n{useNonNullable=false;get nonNullable(){let e=new n;return e.useNonNullable=true,e}group(e,i=null){let r=this._reduceControls(e),s={};return $e(i)?s=i:i!==null&&(s.validators=i.validator,s.asyncValidators=i.asyncValidator),new R(r,s)}record(e,i=null){let r=this._reduceControls(e);return new ye(r,i)}control(e,i,r){let s={};return this.useNonNullable?($e(i)?s=i:(s.validators=i,s.asyncValidators=r),new L(e,m$1(l({},s),{nonNullable:true}))):new L(e,i,r)}array(e,i,r){let s=e.map(a=>this._createControl(a));return new Ce(s,i,r)}_reduceControls(e){let i={};return Object.keys(e).forEach(r=>{i[r]=this._createControl(e[r]);}),i}_createControl(e){if(e instanceof L)return e;if(e instanceof x)return e;if(Array.isArray(e)){let i=e[0],r=e.length>1?e[1]:null,s=e.length>2?e[2]:null;return this.control(i,r,s)}else return this.control(e)}static \u0275fac=function(i){return new(i||n)};static \u0275prov=Xr({token:n,factory:n.\u0275fac})}return n})();var Bn=(()=>{class n{static withConfig(e){return {ngModule:n,providers:[{provide:N,useValue:e.callSetDisabledState??q}]}}static \u0275fac=function(i){return new(i||n)};static \u0275mod=mw({type:n});static \u0275inj=dd({imports:[mt]})}return n})(),Gn=(()=>{class n{static withConfig(e){return {ngModule:n,providers:[{provide:Se,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:N,useValue:e.callSetDisabledState??q}]}}static \u0275fac=function(i){return new(i||n)};static \u0275mod=mw({type:n});static \u0275inj=dd({imports:[mt]})}return n})();export{Bn as B,D,Gn as G,Jt as J,L,Pn as P,Rn as R,Tn as T,Ze as Z,Zt as a,m as b,en as e,ft as f,gn as g,hn as h,jn as j,ln as l,me as m,on as o,rn as r,yt as y};
package/chunk-BS8PXjJJ.js DELETED
@@ -1 +0,0 @@
1
- import {OptionsListComponent as Oe}from'./chunk-CZoVeRAG.js';import {I}from'./chunk-DJJ8GbYi.js';import {F as Fe}from'./chunk-B9maI7Xa.js';import {j as jn,G as Gn,T as Tn,Z as Ze,R as Rn,P as Pn,g as gn,h as hn}from'./chunk-BO2GlieG.js';import {L}from'./chunk-Box6Lckh.js';import {T,ab as C,e as ee$1,aw as W,G as Ge,N as Nt,H as qu,h as hw,d as N,v,Q as Qi,V as Vg,f as aT,aP as ql,n as nC,aQ as Gl,p as cm,$ as $l,L as Lg,j as vg,F as Fg,A as yg,C as CE,i as cT,x as am,a6 as be,at as h,aZ as ee$2,U as UC,s as CD,y as _D}from'./main-VVQP2YE7.js';import'./chunk-Cjb79u3p.js';import'./chunk-DUYvFN8m.js';import'./chunk-BpRWdcC8.js';import'./chunk-ihUnHtR7.js';import'./chunk-Bb6BmVO4.js';import'./chunk-DmDqcC4A.js';import'./chunk-CAwTsBqQ.js';import'./chunk-B53Wj4F9.js';import'./chunk-BTgf5lfZ.js';import'./chunk-B8uF0dom.js';import'./chunk-CKnRcyHZ.js';import'./chunk-DqIU7ViF.js';var d=class r{#t=T(be);destinationTargetUrl=Ge(null);destinationTestSignal=Ge(null);encryptionForm=Z();temporaryBackupId=Ge(null);updateTargetUrl(e){this.destinationTargetUrl.set(e);}showErrorDialog(e){this.#t.open(h,{data:{title:$localize`Error occured`,message:e,confirmText:$localize`OK`,cancelText:void 0},closed:n=>{}});}static \u0275fac=function(n){return new(n||r)};static \u0275prov=ee$2({token:r,factory:r.\u0275fac,providedIn:"root"})};function ne(r,e){r&1&&(Qi(0,"p"),nC(1,3),$l());}function oe(r,e){r&1&&(Qi(0,"sh-form-field")(1,"label",11),nC(2,4),$l(),vg(3,"input",12),CD(),$l()),r&2&&(CE(3),_D());}var ee=new jn,Z=()=>ee.group({passphrase:ee.control("")}),f=class r{#t=T(C);#e=T(d);#n=T(ee$1);#o=T(W);encryptionForm=this.#e.encryptionForm;creatingTemporaryBackup=Ge(false);settings=Ge([]);hasEncryptedBackup=Nt(()=>{let e=this.#e.destinationTestSignal();return e==="testing"||typeof e=="string"?true:e?.containsEncryptedBackupFiles??true});passphraseSignal=L(this.encryptionForm.controls.passphrase.valueChanges);showEncryptionField=Ge(false);isValidConfig=Nt(()=>{if(!this.#e.destinationTargetUrl())return false;let n=this.#e.destinationTestSignal();return !(typeof n!="string"&&(n?.containsEncryptedBackupFiles??false)&&!this.passphraseSignal())});next(){let e=this.#e.destinationTargetUrl();if(!e)throw new Error("No target URL");this.creatingTemporaryBackup.set(true);let n=this.encryptionForm.value?.passphrase??null,t=[];n?t.push({Name:"--passphrase",Value:n}):t.push({Name:"--no-encryption",Value:"true"}),this.settings().forEach(i=>{let o=i.Name?.trim();o&&o!=="--"&&(o.startsWith("--")||(o=`--${o}`),t.push({Name:o,Value:i.Value??""}));}),this.#t.postApiV1Backups({requestBody:{Backup:{TargetURL:e,Settings:t}},temporary:true}).pipe(qu(()=>this.creatingTemporaryBackup.set(false))).subscribe({next:i=>{let o=i.ID;this.#e.temporaryBackupId.set(o),this.#n.navigate(["../select-config"],{relativeTo:this.#o});},error:i=>{console.error(i);}});}back(){this.#n.navigate(["../destination"],{relativeTo:this.#o});}static \u0275fac=function(n){return new(n||r)};static \u0275cmp=hw({type:r,selectors:[["app-import-destination-encryption"]],decls:14,vars:6,consts:()=>{let e;e=$localize`Advanced options`;let n;n=$localize`${"\uFFFD#10\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let t;t=$localize`${"\uFFFD#13\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let i;i=$localize`The backup does not contain encrypted files.`;let o;o=$localize`Enter backup passphrase if defined.`;let P;return P=$localize`Password`,[e,n,t,i,P,[3,"submit","formGroup"],["title",""],[3,"optionsChange","options","hasFreeTextSettings"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary",3,"disabled"],["for","password"],["type","password","id","password","autocomplete","disabled","placeholder",o,"formControlName","passphrase"]]},template:function(n,t){n&1&&(Qi(0,"form",5),Vg("submit",function(){return t.next()}),aT(1,ne,2,0,"p"),aT(2,oe,4,0,"sh-form-field"),Qi(3,"sh-toggle-card"),ql(4,6),nC(5,0),Gl(),Qi(6,"app-options-list",7),cm("optionsChange",function(o){return UC(t.settings,o)||(t.settings=o),o}),$l()(),Qi(7,"div",8)(8,"button",9),Vg("click",function(){return t.back()}),Lg(9,1),vg(10,"sh-icon"),Fg(),$l(),Qi(11,"button",10),Lg(12,2),vg(13,"sh-icon"),Fg(),$l()()()),n&2&&(yg("formGroup",t.encryptionForm),CE(),cT(t.hasEncryptedBackup()?-1:1),CE(),cT(t.hasEncryptedBackup()||t.showEncryptionField()?2:-1),CE(4),am("options",t.settings),yg("hasFreeTextSettings",true),CE(5),yg("disabled",!t.isValidConfig()));},dependencies:[Gn,Tn,Ze,Rn,Pn,gn,hn,Fe,N,v,I,Oe],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"]})};var chunkJYTGU2ZY=/*#__PURE__*/Object.freeze({__proto__:null,createEncryptionForm:Z,default:f});export{chunkJYTGU2ZY as c,d};
package/chunk-BaxM-kGV.js DELETED
@@ -1,2 +0,0 @@
1
- import {k as ke$1,s as st,t as tn,Q as Qt$1,l as lt,o as on}from'./chunk-kU0H989B.js';import'./chunk-C80zvTbO.js';import'./chunk-Cjb79u3p.js';import {I}from'./chunk-DJJ8GbYi.js';import {J}from'./chunk-DUYvFN8m.js';import'./chunk-BpRWdcC8.js';import {V,h,G}from'./chunk-ihUnHtR7.js';import'./chunk-Bb6BmVO4.js';import {v as ve$1}from'./chunk-DmDqcC4A.js';import'./chunk-CAwTsBqQ.js';import {c}from'./chunk-B53Wj4F9.js';import'./chunk-BTgf5lfZ.js';import {T,e as ee$1,aw as W,bF as ve,c7 as w1,G as Ge,N as Nt,z as za,h as hw,v,d as N,a0 as de$1,u as ue,ak as um,Q as Qi,V as Vg,j as vg,$ as $l,f as aT,L as Lg,F as Fg,al as WC,C as CE,i as cT,Y as Yg,A as yg,W as Wg,K as fC,a1 as dT,k as iC,ao as qC,a2 as fT,l as vT,r as kd,O as Od,w as jC,p as cm,U as UC,n as nC,s as CD,x as am,a3 as KC,y as _D,ap as lT,aP as ql,aQ as Gl,J as om}from'./main-VVQP2YE7.js';import {f}from'./chunk-Bja52qI7.js';import {d}from'./chunk-B8uF0dom.js';import {F as Fe}from'./chunk-B9maI7Xa.js';import {j as jn,B as Bn,T as Tn,Z as Ze,R as Rn,P as Pn,J as Jt$1,a as Zt$1}from'./chunk-BO2GlieG.js';import'./chunk-CKnRcyHZ.js';import'./chunk-CwKy8pxa.js';import'./chunk-BVEyeg9y.js';import'./chunk-DqIU7ViF.js';import'./chunk-Box6Lckh.js';var kt=["testUrl"],Bt=()=>({maxWidth:"700px",width:"100%"});function Vt(o,n){if(o&1){let t=vT();Qi(0,"sh-card",30)(1,"div",32)(2,"h3"),nC(3,4),$l(),Qi(4,"button",33),Vg("click",function(){kd(t);let i=iC(3);return Od(i.closeCustomList())}),jC(5," Cancel "),Qi(6,"sh-icon"),jC(7,"x-bold"),$l()()(),Qi(8,"app-destination-list",34),Vg("setDestination",function(i){kd(t);let _=iC(3);return Od(_.setDestination(i))}),$l()();}}function Kt(o,n){if(o&1){let t=vT();Qi(0,"div",40)(1,"sh-toggle",43),cm("checkedChange",function(i){kd(t);let _=iC(2).$implicit;return UC(_.save,i)||(_.save=i),Od(i)}),Qi(2,"span",44),nC(3,8),$l()()();}if(o&2){let t=iC(2).$implicit;CE(),yg("color","primary")("variant","raised"),am("checked",t.save);}}function Jt(o,n){if(o&1){let t=vT();Qi(0,"sh-toggle-card",31),ql(1,35),Qi(2,"app-destination-list-item",36)(3,"button",33),Vg("click",function(){kd(t);let i=iC().$index,_=iC(2);return Od(_.changeDestination(i))}),jC(4,"Change"),$l(),Qi(5,"sh-menu",37),Vg("click",function(i){return i.stopPropagation()}),Qi(6,"button",38)(7,"sh-icon"),jC(8,"dots-three-vertical"),$l()(),ql(9,39),Qi(10,"button",33),Vg("click",function(){kd(t);let i=iC().$index,_=iC(2);return Od(_.openTargetUrlDialog(i))}),Lg(11,5),vg(12,"sh-icon"),Fg(),$l(),Qi(13,"button",33),Vg("click",function(){kd(t);let i=iC().$index,_=iC(2);return Od(_.copyTargetUrl(i))}),Lg(14,6),vg(15,"sh-icon"),Fg(),$l(),Qi(16,"button",33),Vg("click",function(){kd(t);let i=iC().$index,_=iC(2);return Od(_.removeDestination(i))}),Lg(17,7),vg(18,"sh-icon"),Fg(),$l(),Gl(),$l()(),Gl(),aT(19,Kt,4,3,"div",40),Qi(20,"app-test-url",41,1),Vg("targetUrlChange",function(i){kd(t);let _=iC().$index,T=iC(2);return Od(T.updateTargetUrl(_,i))})("testSignalChange",function(i){kd(t);let _=iC().$index,T=iC(2);return Od(T.updateTestState(_,i))}),$l(),Qi(22,"app-single-destination",42),Vg("targetUrlChange",function(i){kd(t);let _=iC().$index,T=iC(2);return Od(T.updateTargetUrl(_,i))}),$l()();}if(o&2){let t=iC(),e=t.$implicit,i=t.$index,_=iC(2);yg("disableToggle",true)("isActive",true),CE(2),yg("targetUrl",e.url)("connectionStringId",e.connectionStringId),CE(17),cT(e.connectionStringId?-1:19),CE(),yg("targetUrl",e.url)("testSignal",_.testStates()[i]||null)("backupId",_.backupId())("connectionStringId",e.connectionStringId)("sourcePrefix",null)("suppressErrorDialogs",false)("askToCreate",true)("readOnlyTest",false)("testExpectation",_.isNew()?"destinationEmpty":"any")("moduleType","Backend"),CE(2),yg("targetUrl",e.url)("useBackupState",true);}}function Xt(o,n){if(o&1&&aT(0,Vt,9,0,"sh-card",30)(1,Jt,23,17,"sh-toggle-card",31),o&2){let t=n.$index,e=iC(2);cT(e.showCustomList()&&e.currentEditingIndex()===t?0:1);}}function zt(o,n){if(o&1&&dT(0,Xt,2,1,null,null,lT),o&2){iC();let t=qC(0);fT(t);}}function Ht(o,n){o&1&&(Qi(0,"div",45),vg(1,"sh-progress-bar",46),Qi(2,"div",47)(3,"h3"),nC(4,9),$l()()());}function Wt(o,n){o&1&&(Qi(0,"sh-divider"),nC(1,12),$l());}function jt(o,n){if(o&1&&(Qi(0,"p",52),jC(1),$l()),o&2){let t=iC().$implicit;CE(),om(t.Description);}}function Qt(o,n){if(o&1&&(Qi(0,"p",52),jC(1),$l()),o&2){let t=iC().$implicit,e=iC(4);CE(),om(e.getSimplePath(t.BaseUrl));}}function qt(o,n){if(o&1){let t=vT();Qi(0,"app-destination-list-item",50),Vg("click",function(){let i=kd(t).$implicit,_=iC(4);return Od(_.selectSavedDestination(i))})("keydown.enter",function(i){return i.target.click()})("keydown.space",function(i){return i.target.click()}),Qi(1,"h3",51),jC(2),$l(),aT(3,jt,2,1,"p",52)(4,Qt,2,1,"p",52),$l();}if(o&2){let t=n.$implicit;yg("targetUrl",t.BaseUrl),CE(2),om(t.Name||t.BaseUrl),CE(),cT(t.Description?3:4);}}function Yt(o,n){if(o&1){let t=vT();Qi(0,"sh-card",48),Vg("click",function(){kd(t);let i=iC(3);return Od(i.toggleCustomList())})("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",47)(4,"h3"),nC(5,10),$l(),Qi(6,"p"),nC(7,11),$l()()(),aT(8,Wt,2,0,"sh-divider"),dT(9,qt,5,3,"app-destination-list-item",49,lT);}if(o&2){let t=iC(3);CE(8),cT(t.destinations().length>0?8:-1),CE(),fT(t.destinations());}}function Zt(o,n){if(o&1&&aT(0,Ht,5,0,"div",45)(1,Yt,11,1),o&2){let t=iC(2);cT(t.isLoadingDestinations()?0:1);}}function te(o,n){o&1&&(Qi(0,"sh-divider"),nC(1,15),$l());}function ee(o,n){if(o&1&&(Qi(0,"p",52),jC(1),$l()),o&2){let t=iC().$implicit;CE(),om(t.Description);}}function ne(o,n){if(o&1&&(Qi(0,"p",52),jC(1),$l()),o&2){let t=iC().$implicit,e=iC(3);CE(),om(e.getSimplePath(t.BaseUrl));}}function ie(o,n){if(o&1){let t=vT();Qi(0,"app-destination-list-item",57),Vg("click",function(){let i=kd(t).$implicit,_=iC(3);return Od(_.selectSavedDestination(i))}),Qi(1,"h3",51),jC(2),$l(),aT(3,ee,2,1,"p",52)(4,ne,2,1,"p",52),$l();}if(o&2){let t=n.$implicit;yg("targetUrl",t.BaseUrl),CE(2),om(t.Name||t.BaseUrl),CE(),cT(t.Description?3:4);}}function oe(o,n){if(o&1){let t=vT();Qi(0,"div",53)(1,"button",54),Vg("click",function(){kd(t);let i=iC(2);return Od(i.closeCustomList())}),Qi(2,"sh-icon"),jC(3,"arrow-left"),$l(),jC(4," Back "),$l()(),Qi(5,"sh-card",55),Vg("click",function(){kd(t);let i=iC(2);return Od(i.toggleCustomList())}),Qi(6,"sh-icon"),jC(7,"plus-circle"),$l(),Qi(8,"div",47)(9,"h3"),nC(10,13),$l(),Qi(11,"p"),nC(12,14),$l()()(),aT(13,te,2,0,"sh-divider"),dT(14,ie,5,3,"app-destination-list-item",56,lT);}if(o&2){let t=iC(2);CE(13),cT(t.destinations().length>0?13:-1),CE(),fT(t.destinations());}}function ae(o,n){if(o&1){let t=vT();Qi(0,"div",53)(1,"button",54),Vg("click",function(){kd(t);let i=iC(3);return Od(i.closeCustomList())}),Qi(2,"sh-icon"),jC(3,"arrow-left"),$l()(),Qi(4,"h3"),nC(5,16),$l()();}}function re(o,n){if(o&1){let t=vT();aT(0,ae,6,0,"div",53),Qi(1,"app-destination-list",34),Vg("setDestination",function(i){kd(t);let _=iC(2);return Od(_.setDestination(i))}),$l();}if(o&2){let t=iC(2),e=qC(0);cT(t.destinations().length>0||e.length>0?0:-1);}}function se(o,n){if(o&1&&aT(0,Zt,2,1)(1,oe,16,1)(2,re,2,1),o&2){let t=iC(),e=qC(1);cT(!t.showCustomList()&&!e&&!t.isAddingNew()?0:t.isAddingNew()&&!t.showCustomList()?1:2);}}function _e(o,n){if(o&1){let t=vT();Qi(0,"div",25)(1,"button",58),Vg("click",function(){kd(t);let i=iC();return Od(i.startAddingNew())}),Qi(2,"sh-icon"),jC(3,"plus"),$l(),jC(4," Add another destination "),$l()();}}function le(o,n){o&1&&(Qi(0,"h2"),nC(1,19),$l());}function ce(o,n){o&1&&(Qi(0,"h2"),nC(1,20),$l());}function de(o,n){if(o&1){let t=vT();Qi(0,"sh-dialog",59),cm("isOpenChange",function(i){kd(t);let _=iC();return UC(_.targetUrlDialogOpen,i)||(_.targetUrlDialogOpen=i),Od(i)}),Qi(1,"header",60)(2,"div",61),aT(3,le,2,0,"h2")(4,ce,2,0,"h2"),Qi(5,"sh-alert",62),nC(6,17),$l()()(),Qi(7,"div",63)(8,"sh-form-field")(9,"textarea",64),cm("ngModelChange",function(i){kd(t);let _=iC();return UC(_.targetUrlCtrl,i)||(_.targetUrlCtrl=i),Od(i)}),$l(),CD(),$l()(),Qi(10,"footer",65)(11,"button",27),Vg("click",function(){kd(t);let i=iC();return Od(i.closeTargetUrlDialog(false))}),jC(12,"Cancel"),$l(),Qi(13,"button",66),Vg("click",function(){kd(t);let i=iC();return Od(i.closeTargetUrlDialog(true))}),Lg(14,18),vg(15,"sh-icon"),Fg(),$l()()();}if(o&2){let t=iC(),e=qC(1);am("isOpen",t.targetUrlDialogOpen),yg("options",KC(4,Bt)),CE(3),cT(e?4:3),CE(6),am("ngModel",t.targetUrlCtrl),_D();}}var b=new jn,ke=(o={destinations:[]})=>b.group({destinations:b.array(o.destinations)}),Be=({key:o,customGroup:n,dynamicGroup:t,advancedGroup:e})=>b.group({destinationType:b.control(o),custom:n,dynamic:t,advanced:e}),B=class o{#n=T(ee$1);#i=T(W);#t=T(ke$1);#e=T(st);injector=T(ve);testUrlComponents=w1();testStates=Ge([]);targetUrls=this.#t.targetUrls;targetUrlModel=Nt(()=>this.targetUrls()[0]?.url??null);targetUrlCtrl=Ge(null);targetUrlInitial=Ge(null);currentEditingIndex=Ge(null);targetUrlDialogOpen=Ge(false);showCustomList=Ge(false);isConnectionStringSaved=this.#t.isConnectionStringSaved;destinations=this.#e.destinations;isLoadingDestinations=this.#e.resourceDestinations.isLoading;isNew=this.#t.isNew;backupId=this.#t.backupId;selectedDestinationType=Nt(()=>{let n=this.targetUrlModel();return n?V(n)??null:null});isLoadingDestinationEffect=za(()=>{let n=this.isLoadingDestinations(),t=this.destinations(),e=this.targetUrls();!n&&t.length==0&&e.length==0&&this.toggleCustomList();});selectedDestinationTypeOption=Nt(()=>{let n=this.selectedDestinationType();return n?{key:n.customKey??n.key,customKey:n.customKey??null,displayName:n.displayName,description:n.description,sourceDescription:n.sourceDescription??null,icon:n.icon}:null});getConnectionString(n){let t=this.#e.destinations().find(e=>e.ID===n);return console.log("connection",t),t}getSimplePath(n){return n?h(n):""}copyTargetUrl(n=0){let t=this.targetUrls()[n]?.url;t&&navigator.clipboard.writeText(t);}openTargetUrlDialog(n=0){let t=this.targetUrls()[n]?.url??null;this.targetUrlCtrl.set(t),this.targetUrlInitial.set(t),this.currentEditingIndex.set(n),this.targetUrlDialogOpen.set(true);}closeTargetUrlDialog(n=false){this.targetUrlDialogOpen.set(false);let t=this.targetUrlCtrl(),e=this.targetUrlInitial();if(!n||t===e||!t)return;let i=this.currentEditingIndex();if(i!==null){let _=this.targetUrls()[i]?.connectionStringId??null,T=this.targetUrls()[i]?.urlKey??null;this.#t.updateTargetUrl(i,t,_,T);}else this.#t.setTargetUrl(t);this.currentEditingIndex.set(null);}setDestination(n){let t=G(n??"");if(!t)return;let e=t.mapper.default?t.mapper.default(this.#t.backupName()??""):`${n}://`;if(this.currentEditingIndex()!==null){this.#t.updateTargetUrl(this.currentEditingIndex(),e,null,null),this.updateTestState(this.currentEditingIndex(),null),this.currentEditingIndex.set(null),this.showCustomList.set(false);return}this.showCustomList()?(this.#t.addTargetUrl(e,null,null),this.showCustomList.set(false),this.isAddingNew.set(false)):(this.#t.addTargetUrl(e,null,null),this.showCustomList.set(false),this.isAddingNew.set(false));}targetUrlsEffect=za(()=>{let n=this.targetUrls();this.testStates.update(t=>{if(t.length===n.length)return t;let e=[...t];if(e.length<n.length)for(let i=e.length;i<n.length;i++)e.push(null);else e.length=n.length;return e});});selectSavedDestination(n){n.BaseUrl&&n.BaseUrl&&(this.targetUrls().length===0?this.#t.setTargetUrl(n.BaseUrl,true,n.ID,null):(this.#t.addTargetUrl(n.BaseUrl,n.ID,null),this.showCustomList.set(false),this.isAddingNew.set(false)));}toggleCustomList(){this.currentEditingIndex.set(null),this.showCustomList.set(true);}isAddingNew=Ge(false);startAddingNew(){this.isAddingNew.set(true),this.destinations().length===0&&this.showCustomList.set(true);}changeDestination(n){this.currentEditingIndex.set(n),this.showCustomList.set(true);}closeCustomList(){this.showCustomList.set(false),this.currentEditingIndex.set(null),this.isAddingNew.set(false);}removeDestination(n){this.#t.removeTargetUrl(n);}updateTargetUrl(n,t){if(!t)return;let e=this.targetUrls()[n]?.connectionStringId??null,i=this.targetUrls()[n]?.urlKey??null;this.#t.updateTargetUrl(n,t,e,i),this.updateTestState(n,null);}updateTestState(n,t){this.testStates.update(e=>{let i=[...e];return i[n]=t,i});}toggleSave(n){this.#t.toggleSaveConnectionString(n);}goBack(){this.#n.navigate(["general"],{relativeTo:this.#i.parent});}async next(){if(!this.#t.isNew()){this.#o();return}let t=this.testUrlComponents();this.testStates();for(let i=0;i<t.length;i++){let _=t[i],T=this.testStates()[i];if(T&&typeof T!="string"&&T.action==="success")continue;if((await _.testDestination(false))?.action!=="success")return}this.#o();}#o(){this.#t.shouldAutoSave()&&this.#t.submit(true),this.#n.navigate(["source-data"],{relativeTo:this.#i.parent});}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=hw({type:o,selectors:[["app-destination"]],viewQuery:function(t,e){t&1&&Wg(e.testUrlComponents,kt,5),t&2&&fC();},decls:19,vars:9,consts:()=>{let n;n=$localize`${"\uFFFD#14\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let t;t=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let e;e=$localize`Change destination type`;let i;i=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON: Edit target URL `;let _;_=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:copy${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON: Copy URL to clipboard `;let T;T=$localize`${"\uFFFD#18\uFFFD"}:START_TAG_SH_ICON:trash${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SH_ICON: Remove `;let L;L=$localize`Save as connection string`;let V;V=$localize`Loading destinations...`;let K;K=$localize`Configure a new destination`;let J;J=$localize`Configure a one-off or new storage location.`;let X;X=$localize`Or select a saved destination`;let z;z=$localize`Configure a new destination`;let H;H=$localize`Configure a one-off or new storage location.`;let W;W=$localize`Or select a saved destination`;let j;j=$localize`Select storage type`;let Q;Q=$localize`Be careful, this will overwrite everything you have in your destination.`;let q;q=$localize` Override target URL ${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:swap${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON:`;let Y;Y=$localize`Set target URL`;let Z;return Z=$localize`Edit target URL`,[["formRef",""],["testUrl",""],n,t,e,i,_,T,L,V,K,J,X,z,H,W,j,Q,q,Y,Z,["autocomplete","off",3,"submit"],[2,"position","absolute","left","-9999px","width","1px","height","1px","overflow","hidden"],["type","text","name","fake_email","tabindex","-1"],["type","password","name","fake_password","tabindex","-1"],[1,"add-destination-container"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary",3,"disabled"],[3,"isOpen","options"],[1,"destination-card","type-c","editing"],[1,"destination-card","type-a",3,"disableToggle","isActive"],[1,"editing-header"],["shButton","","type","button",1,"small",3,"click"],[3,"setDestination"],["title",""],[3,"targetUrl","connectionStringId"],[1,"actions",3,"click"],["shButton","","type","button",1,"small","icon-only"],["menu",""],[1,"options-row",2,"margin","0 1rem 1rem 1rem"],[3,"targetUrlChange","testSignalChange","targetUrl","testSignal","backupId","connectionStringId","sourcePrefix","suppressErrorDialogs","askToCreate","readOnlyTest","testExpectation","moduleType"],[3,"targetUrlChange","targetUrl","useBackupState"],[3,"checkedChange","color","variant","checked"],["label",""],[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","tabindex","0",1,"actionable",3,"targetUrl"],["variant","type-a","tabindex","0",1,"actionable",3,"click","keydown.enter","keydown.space","targetUrl"],["displayName",""],["description",""],[1,"custom-list-header"],["shButton","","iconOnly","","type","button",1,"ghost",3,"click"],[1,"type-a","actionable","add-new",3,"click"],["variant","type-a",1,"actionable",3,"targetUrl"],["variant","type-a",1,"actionable",3,"click","targetUrl"],["shButton","","type","button",1,"secondary",3,"click"],[3,"isOpenChange","isOpen","options"],["header",""],[1,"target-dialog-header"],[1,"warn"],["content",""],["id","targetUrl","autocomplete","off",3,"ngModelChange","ngModel"],["footer",""],["shButton","","type","submit",1,"raised","primary",3,"click"]]},template:function(t,e){if(t&1&&(um(0)(1),Qi(2,"form",21,0),Vg("submit",function(){return e.next()}),Qi(4,"div",22),vg(5,"input",23)(6,"input",24),$l(),Qi(7,"header"),aT(8,zt,2,0),$l(),aT(9,se,3,1),aT(10,_e,5,0,"div",25),Qi(11,"div",26)(12,"button",27),Vg("click",function(){return e.goBack()}),Lg(13,2),vg(14,"sh-icon"),Fg(),$l(),Qi(15,"button",28),Lg(16,3),vg(17,"sh-icon"),Fg(),$l()()(),aT(18,de,16,5,"sh-dialog",29)),t&2){let i=WC(e.targetUrls());CE();let _=WC(i.length>0);CE(7),cT(e.currentEditingIndex()!==null||!e.showCustomList()&&!e.isAddingNew()?8:-1),CE(),cT((!_||e.showCustomList()||e.isAddingNew())&&e.currentEditingIndex()===null?9:-1),CE(),cT(_&&!e.showCustomList()&&!e.isAddingNew()?10:-1),CE(5),Yg("loading",e.isNew()&&e.testStates().length>0&&e.testStates()[0]==="testing"),yg("disabled",!_),CE(3),cT(e.targetUrlDialogOpen()?18:-1);}},dependencies:[tn,Qt$1,lt,on,Bn,Tn,Ze,Rn,Pn,Jt$1,Zt$1,v,Fe,ve$1,N,de$1,ue,f,c,d,I,J],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:40rem;padding:2.5rem 2.5rem 0}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], header[_ngcontent-%COMP%] sh-alert[_ngcontent-%COMP%]{width:100%}header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:.5rem}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;height:100%;padding:0 0 2.5rem}.current-destination[_ngcontent-%COMP%]{margin:1rem 0 0}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between;padding-bottom:1.5rem}.most-common-destinations[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10);background-color:var(--base-2);cursor:pointer}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-10);margin:0}.target-dialog-header[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:.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}.add-new[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1.5rem;background:var(--base-1);color:var(--primary-8);cursor:pointer}.add-new[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:2.5rem;opacity:.8}.actionable[_ngcontent-%COMP%]{cursor:pointer}.actionable[_ngcontent-%COMP%]:hover{--card-shp: 0}.custom-list-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;margin-bottom:.5rem}.save-connection-string[_ngcontent-%COMP%]{margin:1rem 0}sh-card.destination-card[_ngcontent-%COMP%]{padding:1.5rem}.destination-card[_ngcontent-%COMP%]{position:relative;overflow:visible}.destination-card[_ngcontent-%COMP%] app-destination-list-item[_ngcontent-%COMP%]{width:100%}.destination-card[_ngcontent-%COMP%] .card-header-content[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%}.destination-card[_ngcontent-%COMP%] .card-header-content[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0}.destination-card[_ngcontent-%COMP%] .card-header-content[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{position:static;transform:none}.destination-card[_ngcontent-%COMP%] .editing-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-bottom:1rem}.destination-card[_ngcontent-%COMP%] .editing-header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-10);margin:0}.destination-card[_ngcontent-%COMP%] sh-toggle-card[_ngcontent-%COMP%] .header{width:100%}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"]})};
2
- export{ke as createDestinationForm,Be as createDestinationFormGroup,B as default};
package/chunk-BkUa7yBI.js DELETED
@@ -1 +0,0 @@
1
- import {G}from'./chunk-CTRzgLM9.js';import v from'./chunk-Cz0KuBHB.js';import'./chunk-CIcBoEH1.js';import'./chunk-CZoVeRAG.js';import {i as ie$1}from'./chunk-vnqcxg-9.js';import'./chunk-B52v_pjw.js';import'./chunk-aOMoAKYY.js';import'./chunk-kU0H989B.js';import'./chunk-C80zvTbO.js';import'./chunk-Cjb79u3p.js';import'./chunk-DJJ8GbYi.js';import'./chunk-DUYvFN8m.js';import'./chunk-BpRWdcC8.js';import'./chunk-ihUnHtR7.js';import {m}from'./chunk-Bb6BmVO4.js';import'./chunk-DmDqcC4A.js';import'./chunk-CAwTsBqQ.js';import'./chunk-B53Wj4F9.js';import'./chunk-BTgf5lfZ.js';import {T,ab as C,bh as Q$1,aX as y,aw as W,G as Ge,N as Nt,h as hw,d as N,aH as m$1,bf as pi,Q as Qi,f as aT,n as nC,$ as $l,j as vg,C as CE,i as cT,A as yg,aP as ql,aQ as Gl,k as iC,L as Lg,F as Fg,au as jg,av as rC,as as Wd,bi as qd,w as jC,aM as ob,aB as im,aR as sb}from'./main-VVQP2YE7.js';import {f as f$1}from'./chunk-Bja52qI7.js';import {d}from'./chunk-B8uF0dom.js';import'./chunk-B9maI7Xa.js';import'./chunk-BO2GlieG.js';import'./chunk-CKnRcyHZ.js';import'./chunk-CwKy8pxa.js';import'./chunk-BVEyeg9y.js';import'./chunk-DqIU7ViF.js';import'./chunk-Box6Lckh.js';function Q(n,t){n&1&&(Qi(0,"div",17),Wd(),Qi(1,"svg",19),vg(2,"circle",20),$l(),qd(),Qi(3,"sh-icon",21),nC(4,3),$l()());}function U(n,t){n&1&&(Qi(0,"div",18),Wd(),Qi(1,"svg",19),vg(2,"circle",20),$l(),qd(),Qi(3,"sh-icon",22),nC(4,4),$l()());}function Y(n,t){if(n&1&&(Qi(0,"sh-card",10),ql(1,16),nC(2,2),Gl(),aT(3,Q,5,0,"div",17)(4,U,5,0,"div",18),$l()),n&2){let e=iC();CE(3),cT(e.restoreResult()=="success"?3:4);}}function ee(n,t){if(n&1&&(jC(0),ob(1,"number"),ob(2,"number")),n&2){let e=iC(2);im(" ",sb(1,2,e.statusData()?.ProcessedFileCount)," of ",sb(2,4,e.statusData()?.TotalFileCount)," ");}}function te(n,t){n&1&&(ql(0),nC(1,8),Gl());}function ne(n,t){if(n&1&&(jC(0),ob(1,"bytes"),ob(2,"bytes")),n&2){let e=iC(2);im(" ",sb(1,2,e.statusData()?.ProcessedFileSize)," of ",sb(2,4,e.statusData()?.TotalFileSize)," ");}}function oe(n,t){n&1&&(ql(0),nC(1,9),Gl());}function ie(n,t){if(n&1&&(Qi(0,"sh-card",10)(1,"h3"),Lg(2,5),vg(3,"sh-spinner",23),Fg(),$l(),Qi(4,"div",24),vg(5,"sh-progress-bar",25),Qi(6,"p")(7,"span"),nC(8,6),$l(),aT(9,ee,3,6)(10,te,2,0,"ng-container"),$l(),Qi(11,"p")(12,"span"),nC(13,7),$l(),aT(14,ne,3,6)(15,oe,2,0,"ng-container"),$l()()()),n&2){let e=iC();CE(3),jg(e.statusData()?.statusText),rC(2),CE(2),yg("value",e.statusData()?.OverallProgress),CE(4),cT(e.statusData()?.ProcessedFileCount?9:10),CE(5),cT(e.statusData()?.ProcessedFileSize?14:15);}}var f=class n{#i=T(C);#r=T(Q$1);#t=T(y);#n=T(G);#s=T(W);statusData=this.#t.statusData;backupId=this.#n.backupId;restoreResult=Ge("");#e=null;lastRestoreStarted=Nt(()=>{if(this.#e)return this.#e;let t=this.#t.statusData()?.backup?.Backup?.Metadata?.LastRestoreStarted??null;if(!t)return null;let e=this.fixDate(t);return this.#e=e,e});notificationFilterPredicate=()=>{let t=this.lastRestoreStarted();return {predicate:e=>(e.BackupID===this.#n.backupId()&&t&&t.getTime()<=new Date(e.Timestamp).getTime())??false}};ngOnInit(){let t=this.#s.snapshot.params.taskid?.toString()??"";this.#i.getApiV1TaskByTaskid({taskid:t}).subscribe({next:e=>{if(e.TaskStarted&&(this.#e=new Date(e.TaskStarted)),!e.TaskFinished&&e.ID){this.#_(e.ID);return}this.#o(e);},error:e=>{console.error("Error fetching task:",e),this.restoreResult.set("error"),alert("Failed to fetch task details. Please try again later.");}});}#_(t){this.#r.waitForTaskToComplete(t).subscribe(e=>{this.#o(e);});}#o(t){t.TaskFinished!=null&&this.restoreResult.set(t.Status==="Completed"&&t.ErrorMessage==null?"success":"error");}fixDate(t){return new Date(`${t.slice(0,4)}-${t.slice(4,6)}-${t.slice(6,8)}T${t.slice(9,11)}:${t.slice(11,13)}:${t.slice(13,15)}Z`)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=hw({type:n,selectors:[["app-restore-progress"]],decls:12,vars:5,consts:()=>{let t;t=$localize`Notifications`;let e;e=$localize`Logs`;let a;a=$localize`Restore completed`;let M;M=$localize`check-bold`;let N;N=$localize`warning-octagon`;let G;G=$localize` Restore progress: ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#3\uFFFD"}:START_TAG_SH_SPINNER:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SH_SPINNER:`;let h;h=$localize`Files processed:`;let F;F=$localize`Size processed:`;let L;L=$localize`N/A`;let y;return y=$localize`N/A`,[t,e,a,M,N,G,h,F,L,y,[1,"progress","type-a"],[1,"notifications","type-a"],[1,"notification-list"],[3,"notificationFilterPredicate"],[1,"logs","type-a"],[3,"polling","whenFilter","backupIdFilter"],["title",""],[1,"complete-success"],[1,"complete-failure"],[1,"border-svg"],["cx","50","cy","50","r","45",1,"border-circle"],[1,"success"],[1,"error"],[1,"primary"],[1,"progress-content"],[3,"value"]]},template:function(e,a){e&1&&(Qi(0,"section"),aT(1,Y,5,1,"sh-card",10)(2,ie,16,4,"sh-card",10),Qi(3,"sh-card",11)(4,"h3"),nC(5,0),$l(),Qi(6,"div",12),vg(7,"app-notifications",13),$l()(),Qi(8,"sh-card",14)(9,"h3"),nC(10,1),$l(),vg(11,"app-logs-live",15),$l()()),e&2&&(CE(),cT(a.restoreResult()!=""?1:2),CE(6),yg("notificationFilterPredicate",a.notificationFilterPredicate()),CE(4),yg("polling",a.restoreResult()=="")("whenFilter",a.lastRestoreStarted()?.getTime())("backupIdFilter",a.backupId()));},dependencies:[v,d,m,N,f$1,ie$1,m$1,pi],styles:['[_nghost-%COMP%]{display:block;padding:0 1.25rem;margin-top:32px}section[_ngcontent-%COMP%]{display:grid;gap:1.25rem;grid-template-columns:2fr 1fr;grid-template-areas:"progress notifications" "logs logs"}section[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin-bottom:1rem}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%]{grid-area:progress}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%]:has(.complete-check){display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1.25rem}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%] sh-spinner[_ngcontent-%COMP%]{--spinner-size: 1.25rem;--spinner-thickness: .1875rem}section[_ngcontent-%COMP%] .notifications[_ngcontent-%COMP%]{grid-area:notifications}section[_ngcontent-%COMP%] .logs[_ngcontent-%COMP%]{grid-area:logs}section[_ngcontent-%COMP%] .logs[_ngcontent-%COMP%] app-logs-live[_ngcontent-%COMP%]{max-height:50rem;overflow:auto}.notification-list[_ngcontent-%COMP%]{max-height:15rem;overflow:auto}.complete-success[_ngcontent-%COMP%]{position:relative;width:6.25rem;height:6.25rem;display:flex;justify-content:center;align-items:center;color:var(--success-8)}.complete-success[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:2.5rem;opacity:0;animation:_ngcontent-%COMP%_reveal-icon .2s linear forwards;animation-delay:1s}.complete-success[_ngcontent-%COMP%] .border-circle[_ngcontent-%COMP%]{fill:none;stroke:var(--success-8)}.complete-failure[_ngcontent-%COMP%]{position:relative;width:6.25rem;height:6.25rem;display:flex;justify-content:center;align-items:center;color:var(--error-8)}.complete-failure[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:2.5rem;opacity:0;animation:_ngcontent-%COMP%_reveal-icon .2s linear forwards;animation-delay:1s}.complete-failure[_ngcontent-%COMP%] .border-circle[_ngcontent-%COMP%]{fill:none;stroke:var(--error-8)}.border-svg[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%}.border-circle[_ngcontent-%COMP%]{fill:none;stroke-width:.3125rem;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}}.progress-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.progress-content[_ngcontent-%COMP%] sh-progress-bar[_ngcontent-%COMP%]{margin-bottom:.75rem}.progress-content[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{margin-right:.25rem}']})};export{f as default};
package/chunk-BqN36tfl.js DELETED
@@ -1 +0,0 @@
1
- import {G}from'./chunk-CTRzgLM9.js';import {w as w$1}from'./chunk-CgyaUJSI.js';import'./chunk-CZoVeRAG.js';import {e as ee$1}from'./chunk-C4GeR7BF.js';import'./chunk-CUaRQ2FJ.js';import'./chunk-aOMoAKYY.js';import'./chunk-BEhUV7oX.js';import {k as ke}from'./chunk-kU0H989B.js';import'./chunk-C80zvTbO.js';import'./chunk-Cjb79u3p.js';import'./chunk-DJJ8GbYi.js';import'./chunk-DUYvFN8m.js';import'./chunk-BpRWdcC8.js';import'./chunk-ihUnHtR7.js';import'./chunk-Bb6BmVO4.js';import'./chunk-DmDqcC4A.js';import'./chunk-CAwTsBqQ.js';import'./chunk-B53Wj4F9.js';import'./chunk-BTgf5lfZ.js';import {T,aw as W,e as ee,G as Ge,z as za,b7 as k$1,h as hw,Z as lr,_ as _t,a8 as To,j as vg,f as aT,Q as Qi,$ as $l,C as CE,i as cT,aD as YC,Y as Yg,k as iC,n as nC,A as yg,a3 as KC,a$ as JC}from'./main-VVQP2YE7.js';import'./chunk-Bja52qI7.js';import'./chunk-B8uF0dom.js';import'./chunk-B9maI7Xa.js';import'./chunk-BO2GlieG.js';import'./chunk-CKnRcyHZ.js';import'./chunk-CwKy8pxa.js';import'./chunk-BVEyeg9y.js';import {L}from'./chunk-Box6Lckh.js';import'./chunk-DqIU7ViF.js';var w=()=>["/restore-from-files/destination"],k=()=>["/restore-from-files/encryption"],x=()=>["/restore-from-files/select-files"],J=()=>["/restore-from-files/options"],X=t=>["/restore",t,"select-files"],D=t=>["/restore",t,"options"];function z(t,n){t&1&&(Qi(0,"div",7),nC(1,0),$l(),Qi(2,"div",7),nC(3,1),$l(),Qi(4,"div",8),nC(5,2),$l(),Qi(6,"div",8),nC(7,3),$l()),t&2&&(yg("routerLink",KC(4,w)),CE(2),yg("routerLink",KC(5,k)),CE(2),yg("routerLink",KC(6,x)),CE(2),yg("routerLink",KC(7,J)));}function B(t,n){if(t&1&&(Qi(0,"div",7),nC(1,4),$l(),Qi(2,"div",7),nC(3,5),$l()),t&2){let e=iC(2);yg("routerLink",JC(2,X,e.backupId())),CE(2),yg("routerLink",JC(4,D,e.backupId()));}}function U(t,n){if(t&1&&(Qi(0,"sh-stepper",6),aT(1,z,8,8)(2,B,4,6),$l()),t&2){let e=iC();CE(),cT(e.isFileRestore()?1:2);}}var f=class t{#e=T(W);#n=T(ee);#t=T(G);#i=L(this.#e.params);#o=L(this.#e.url);#r=L(this.#e.children[0].url);backupId=this.#t.backupId;isFileRestore=this.#t.isFileRestore;isFullWidthPage=Ge(false);paramsChanged=za(()=>{let n=this.#r(),e=this.#i()?.id,r=!!this.#o()?.find(s=>s.path==="restore-from-files"),d=!!n?.find(s=>s.path==="select-files"),R=!!n?.find(s=>s.path==="progress");this.isFullWidthPage.set(R||d),this.#t.init(e,r);});ngOnInit(){this.#n.events.subscribe(n=>{if(n instanceof k$1){let e=n.urlAfterRedirects;this.isFullWidthPage.set(e.includes("progress")||e.includes("select-files"));}});}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=hw({type:t,selectors:[["app-restore-flow"]],hostVars:2,hostBindings:function(e,r){e&2&&Yg("full-width",r.isFullWidthPage());},features:[YC([G,ke])],decls:4,vars:1,consts:()=>{let n;n=$localize` Destination `;let e;e=$localize` Encryption `;let r;r=$localize` Select files `;let d;d=$localize` Options `;let R;R=$localize` Select files `;let s;return s=$localize`Options`,[n,e,r,d,R,s,[1,"primary"],["tabindex","-1","routerLinkActive","active",3,"routerLink"],["tabindex","-1","routerLinkActive","active",1,"inactive",3,"routerLink"]]},template:function(e,r){e&1&&(vg(0,"app-status-bar"),aT(1,U,3,1,"sh-stepper",6),Qi(2,"section"),vg(3,"router-outlet"),$l()),e&2&&(CE(),cT(r.isFullWidthPage()?-1:1));},dependencies:[w$1,ee$1,lr,_t,To],styles:["[_nghost-%COMP%]{display:block}.full-width[_nghost-%COMP%] section[_ngcontent-%COMP%]{max-width:62.5rem}sh-stepper[_ngcontent-%COMP%]{margin:2.5rem 2rem;width:calc(100% - 4rem)}section[_ngcontent-%COMP%]{max-width:31.25rem;margin:0 auto 2.5rem}@media only screen and (max-width:768px){section[_ngcontent-%COMP%]{padding:0 2rem}}.inactive[_ngcontent-%COMP%]{pointer-events:none;opacity:.5}"]})};export{f as default};
package/chunk-BvGGBIy7.js DELETED
@@ -1 +0,0 @@
1
- var t=[{path:"",redirectTo:"destination",pathMatch:"full"},{path:"destination",loadComponent:()=>import('./chunk-Da_-7L7P.js')},{path:"encryption",loadComponent:()=>import('./chunk-BS8PXjJJ.js').then(function(n){return n.c})},{path:"select-config",loadComponent:()=>import('./chunk-CUuyy9Er.js')}],o=t;export{o as default};
package/chunk-CGArETYn.js DELETED
@@ -1 +0,0 @@
1
- var o=[{path:"",loadComponent:()=>import('./chunk-D5tms-6w.js'),children:[{path:"",redirectTo:"stored",pathMatch:"full"},{path:"stored",loadComponent:()=>import('./chunk-CkrxdjhU.js')},{path:"live",loadComponent:()=>import('./chunk-Cz0KuBHB.js')}]}],t=o;export{t as default};
package/chunk-CTRzgLM9.js DELETED
@@ -1,2 +0,0 @@
1
- import {OptionsListComponent as Oe$1}from'./chunk-CZoVeRAG.js';import {O}from'./chunk-aOMoAKYY.js';import {T as Tt$1,Z as Ze$1}from'./chunk-kU0H989B.js';import'./chunk-C80zvTbO.js';import {N as Ne$1}from'./chunk-Cjb79u3p.js';import {I}from'./chunk-DJJ8GbYi.js';import {J}from'./chunk-DUYvFN8m.js';import'./chunk-BpRWdcC8.js';import'./chunk-ihUnHtR7.js';import {N as Nt$2}from'./chunk-Bb6BmVO4.js';import'./chunk-DmDqcC4A.js';import'./chunk-CAwTsBqQ.js';import'./chunk-B53Wj4F9.js';import'./chunk-BTgf5lfZ.js';import {T,ab as C,e as ee,aw as W,G as Ge,N as Nt$1,H as qu,h as hw,d as N,v,Q as Qi,V as Vg,f as aT,aP as ql,n as nC,aQ as Gl,p as cm,$ as $l,L as Lg,j as vg,F as Fg,A as yg,C as CE,i as cT,x as am,bh as Q,m,aJ as ci,z as za,cl as zu,aE as jo,bJ as fe,aH as m$1,au as jg,av as rC,aD as YC,a6 as be,at as h,Y as Yg,b0 as Hs,cm as cy,c5 as $s,ay as Gu,bK as Dy,cn as Sy,aZ as ee$1,U as UC,s as CD,y as _D,l as vT,r as kd,k as iC,O as Od,bg as ag,a3 as KC,w as jC,aM as ob,aB as im,aN as ab,aa as Ql,aR as sb}from'./main-VVQP2YE7.js';import'./chunk-Bja52qI7.js';import {d}from'./chunk-B8uF0dom.js';import {F as Fe}from'./chunk-B9maI7Xa.js';import {j as jn,G as Gn,T as Tn,Z as Ze,R as Rn,P as Pn,g as gn,h as hn,B as Bn,J as Jt,y as yt$1,r as rn}from'./chunk-BO2GlieG.js';import'./chunk-CKnRcyHZ.js';import'./chunk-CwKy8pxa.js';import {O as O$1}from'./chunk-BVEyeg9y.js';import'./chunk-DqIU7ViF.js';import {L}from'./chunk-Box6Lckh.js';var _e={handleExisting:"saveTimestamp",permissions:false,includeMetadata:true},gt=new Set(["true","1","yes","on"]),Ce=i=>(i??"").trim().replace(/^--/,"").toLowerCase(),lt=i=>gt.has((i??"").trim().toLowerCase()),_t=(i,t,e,o)=>{let n=Ce(i),r=t.find(c=>Ce(c.Name)===n);if(r)return lt(r.Value);let l=Object.keys(e).find(c=>Ce(c)===n);return l?lt(e[l]):o},ct=(i,t)=>{let e=i??[],o=_t("restore-permissions",e,t,_e.permissions),n=_t("skip-metadata",e,t,false);return {permissions:o,includeMetadata:!n}};function Ft(i,t){i&1&&(Qi(0,"p"),nC(1,3),$l());}function Ct(i,t){i&1&&(Qi(0,"sh-form-field")(1,"label",11),nC(2,4),$l(),vg(3,"input",12),CD(),$l()),i&2&&(CE(3),_D());}var ut=new jn,mt=()=>ut.group({passphrase:ut.control("")}),Oe=class i{#e=T(C);#t=T(G);#i=T(ee);#n=T(W);encryptionForm=this.#t.encryptionForm;creatingTemporaryBackup=Ge(false);settings=Ge([]);hasEncryptedBackup=Nt$1(()=>{let t=this.#t.destinationTestSignal();return t==="testing"||typeof t=="string"?true:t?.containsEncryptedBackupFiles??true});showEncryptionField=Ge(false);next(){let t=this.#t.destinationTargetUrl();if(!t)throw new Error("No target URL");this.creatingTemporaryBackup.set(true);let e=this.encryptionForm.value?.passphrase??null,o=[];e?o.push({Name:"--passphrase",Value:e}):o.push({Name:"--no-encryption",Value:"true"}),this.settings().forEach(n=>{let r=n.Name?.trim();r&&r!=="--"&&(r.startsWith("--")||(r=`--${r}`),o.push({Name:r,Value:n.Value??""}));}),this.#e.postApiV1Backups({requestBody:{Backup:{TargetURL:t,Settings:o}},temporary:true}).pipe(qu(()=>this.creatingTemporaryBackup.set(false))).subscribe({next:n=>{let r=n.ID;this.#i.navigate([`/restore-draft/${r}`]);},error:n=>{console.error(n);}});}back(){this.#t.isFileRestore()?this.#i.navigate(["destination"],{relativeTo:this.#n.parent}):this.#t.exit();}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=hw({type:i,selectors:[["app-restore-encryption"]],decls:14,vars:5,consts:()=>{let t;t=$localize`Advanced options`;let e;e=$localize`${"\uFFFD#10\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let o;o=$localize`${"\uFFFD#13\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let n;n=$localize`The backup does not contain encrypted files.`;let r;r=$localize`Enter backup passphrase if defined.`;let l;return l=$localize`Password`,[t,e,o,n,l,[3,"submit","formGroup"],["title",""],[3,"optionsChange","options","hasFreeTextSettings"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary"],["for","password"],["type","password","id","password","autocomplete","disabled","placeholder",r,"formControlName","passphrase"]]},template:function(e,o){e&1&&(Qi(0,"form",5),Vg("submit",function(){return o.next()}),aT(1,Ft,2,0,"p"),aT(2,Ct,4,0,"sh-form-field"),Qi(3,"sh-toggle-card"),ql(4,6),nC(5,0),Gl(),Qi(6,"app-options-list",7),cm("optionsChange",function(r){return UC(o.settings,r)||(o.settings=r),r}),$l()(),Qi(7,"div",8)(8,"button",9),Vg("click",function(){return o.back()}),Lg(9,1),vg(10,"sh-icon"),Fg(),$l(),Qi(11,"button",10),Lg(12,2),vg(13,"sh-icon"),Fg(),$l()()()),e&2&&(yg("formGroup",o.encryptionForm),CE(),cT(o.hasEncryptedBackup()?-1:1),CE(),cT(o.hasEncryptedBackup()||o.showEncryptionField()?2:-1),CE(4),am("options",o.settings),yg("hasFreeTextSettings",true));},dependencies:[Gn,Tn,Ze,Rn,Pn,gn,hn,Fe,N,v,I,Oe$1],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"]})};var St=()=>({standalone:true});function Ot(i,t){i&1&&vg(0,"sh-progress-bar",13);}function ft(i,t){if(i&1&&(jC(0),ob(1,"bytes")),i&2){let e=iC().$implicit;Ql(" (",sb(1,1,e.FileSizes),") ");}}function Nt(i,t){i&1&&(Qi(0,"span",20),nC(1,4),$l());}function ht(i,t){if(i&1&&(Qi(0,"div",19),jC(1),ob(2,"date"),aT(3,ft,2,3),aT(4,Nt,2,0,"span",20),$l()),i&2){let e=t.$implicit;CE(),im(" ",e.Version,": ",ab(2,4,e.Time,"medium")," "),CE(2),cT(e.FileSizes?3:-1),CE(),cT(e.IsFullBackup===false?4:-1);}}function Rt(i,t){i&1&&vg(0,"sh-progress-bar",13);}function Pt(i,t){i&1&&(Qi(0,"sh-icon",28),jC(1,"spinner"),$l());}function It(i,t){i&1&&(Qi(0,"sh-icon"),jC(1,"magnifying-glass"),$l());}function Mt(i,t){if(i&1){let e=vT();Qi(0,"button",31),Vg("click",function(){kd(e);let n=iC(4);return Od(n.clearSearch())}),Qi(1,"sh-icon"),jC(2,"x-circle"),$l(),Qi(3,"span"),nC(4,8),$l()();}}function Lt(i,t){i&1&&(Qi(0,"span"),nC(1,9),$l());}function yt(i,t){if(i&1&&(Qi(0,"span"),nC(1,10),$l()),i&2){let e=iC(5);CE(),jg(e.searchResults().length),rC(1);}}function Dt(i,t){if(i&1&&(Qi(0,"div",30),aT(1,Lt,2,0,"span")(2,yt,2,1,"span"),$l()),i&2){let e=iC(4);CE(),cT(e.searchResults().length===0?1:2);}}function $t(i,t){if(i&1){let e=vT();Qi(0,"div",24)(1,"sh-form-field")(2,"label",25),nC(3,6),$l(),Qi(4,"input",26),cm("ngModelChange",function(n){kd(e);let r=iC(3);return UC(r.searchQuery,n)||(r.searchQuery=n),Od(n)}),Vg("keydown.enter",function(n){kd(e);let r=iC(3);return n.preventDefault(),Od(r.performSearch())}),$l(),CD(),$l(),Qi(5,"button",27),Vg("click",function(){kd(e);let n=iC(3);return Od(n.performSearch())}),aT(6,Pt,2,0,"sh-icon",28)(7,It,2,0,"sh-icon"),Qi(8,"span"),nC(9,7),$l()(),aT(10,Mt,5,0,"button",29),$l(),aT(11,Dt,3,1,"div",30);}if(i&2){let e=iC(3);CE(4),am("ngModel",e.searchQuery),yg("ngModelOptions",KC(6,St)),_D(),CE(),yg("disabled",e.isSearching()||!e.searchQuery().trim()),CE(),cT(e.isSearching()?6:7),CE(4),cT(e.isSearchMode()?10:-1),CE(),cT(e.isSearchMode()&&!e.isSearching()?11:-1);}}function bt(i,t){if(i&1){let e=vT();aT(0,$t,12,7),Qi(1,"app-file-tree",21),Vg("hasExtendedData",function(n){kd(e);let r=iC(2);return Od(r.extendedDataType.set(n))}),Qi(2,"label",22),nC(3,5),$l(),vg(4,"input",23),CD(),$l();}if(i&2){let e=iC(2);cT(e.canSearch()?0:-1),CE(),yg("rootPaths",e.rootPaths())("initialNodes",e.initialNodes())("backupSettings",e.backupSettings())("multiSelect",true)("showFiles",true)("loadExtendedData",true)("searchMode",e.isSearchMode())("searchResults",e.searchResults()),CE(3),_D();}}function vt(i,t){if(i&1){let e=vT();Qi(0,"sh-select",17),Vg("cleared",function(){kd(e);let n=iC();return Od(n.abortLoading())}),Qi(1,"input",18),cm("ngModelChange",function(n){kd(e);let r=iC();return UC(r.selectOption,n)||(r.selectOption=n),Od(n)}),$l(),CD(),ag(2,ht,5,7,"ng-template"),$l(),aT(3,Rt,1,0,"sh-progress-bar",13),aT(4,bt,5,9);}if(i&2){let e=iC();yg("options",e.versionOptions())("isClearable",false),CE(),am("ngModel",e.selectOption),yg("ngModelOptions",KC(6,St)),_D(),CE(2),cT(e.isRepairing()||e.versionOptionsLoading()||e.loadingRootPath()?3:-1),CE(),cT(e.showFileTree()?4:-1);}}var Ne=new jn,Et=()=>Ne.group({filesToRestore:Ne.control(""),passphrase:Ne.control(null)}),he=class i{#e=T(C);#t=T(G);#i=T(Q);#n=T(m);#o=T(ee);#a=T(W);#l=T(ci);#_=null;#r=null;#s=Ge([]);selectFilesForm=this.#t.selectFilesForm;selectFilesFormSignal=this.#t.selectFilesFormSignal;selectOption=this.#t.selectOption;backupId=this.#t.backupId;versionOptionsLoading=this.#t.versionOptionsLoading;versionOptions=this.#t.versionOptions;isFileRestore=this.#t.isFileRestore;extendedDataType=this.#t.extendedDataType;needsDatabaseRepair=Nt$1(()=>this.#t.backup()?.Backup?.IsTemporary??true);showFileTree=Ge(false);backupSettings=Ge(null);rootPaths=Ge([]);initialNodes=Ge([]);loadingRootPath=Ge(false);isRepairing=Nt$1(()=>this.#s().length>0);loadedVersions=Ge({});canSearch=Nt$1(()=>this.#n.hasV2ListOperations());searchQuery=Ge("");isSearching=Ge(false);searchResults=Ge([]);hasSearched=Ge(false);isSearchMode=Nt$1(()=>this.searchQuery().length>0&&this.hasSearched());loadingEffect=za(()=>{if(this.versionOptionsLoading())return;let e=this.versionOptions();if(e&&e?.length>0){let o=e[0].Version;this.selectOption.set(o.toString());}});backupSettingsEffect=za(()=>{let t=this.backupId(),e=this.selectOption(),o=this.isRepairing(),n=this.loadedVersions();if(!e||!t)return;let l=this.versionOptions()?.find(w=>w.Version===parseInt(e))?.Time??null;if(!l)return;let c=`${t}+${l}`,I=n[c];if(this.needsDatabaseRepair()&&(!I||o))return;let D={id:t+"",time:l};this.backupSettings.set(D),this.getRootPath(D);});repairEffect=za(()=>{if(!this.needsDatabaseRepair())return;let t=this.selectOption(),e=this.versionOptions();if(t){let o=e.find(l=>l.Version===parseInt(t));if(o===void 0)return;let n=this.backupId(),r=`${n}+${o.Time}`;if(this.#r===r||(this.#r=r,this.#s().includes(r)))return;this.#s.update(l=>[...l,r]),this.#e.postApiV1BackupByIdRepairupdate({id:n,requestBody:{only_paths:true,time:o.Time}}).pipe(zu(this.abortLoading$),qu(()=>{this.#r=null;})).subscribe(l=>{let c=l.ID;this.#i.waitForTaskToComplete(c).pipe(jo(1)).subscribe(()=>{this.#s.update(I=>I.filter(D=>D!==r)),this.loadedVersions.update(I=>(I[r]=true,I));});});}});getRootPath(t){let e={id:t.id+"",time:t.time,prefixOnly:true,folderContents:false},o=t.id+"";this.isRepairing()||this.#_===o||(this.#_=o,this.loadingRootPath.set(true),this.showFileTree.set(false),this.#n.hasV2ListOperations()?this.#e.postApiV2BackupListFolder({requestBody:{BackupId:t.id,Time:t.time,Paths:null,PageSize:0,Page:0,ReturnExtended:true}}).pipe(zu(this.abortLoading$),qu(()=>{this.showFileTree.set(true),this.loadingRootPath.set(false),this.#_=null;})).subscribe({next:n=>{let r=(n.Data??[]).find(c=>c.Metadata&&c.Metadata.ExtType&&c.Metadata.ExtType.length>0);r&&this.extendedDataType.set(r.Metadata.ExtType);let l=(n.Data??[]).map(c=>c.Path??"");l.length>0?(this.initialNodes.set([]),this.rootPaths.set(l)):(this.initialNodes.set([]),this.rootPaths.set(["/"]));}}):this.#e.getApiV1BackupByIdFiles(e).pipe(zu(this.abortLoading$),qu(()=>{this.showFileTree.set(true),this.loadingRootPath.set(false);})).subscribe({next:n=>{let r=n.Files.map(l=>l.Path??"");r.length>0?(this.initialNodes.set([]),this.rootPaths.set(r)):(this.initialNodes.set([]),this.rootPaths.set(["/"]));}}));}abortLoading$=new fe;abortLoading(){this.showFileTree.set(false),this.loadingRootPath.set(false),this.abortLoading$.next(true);}displayFn(){let t=this.versionOptions();return e=>{if(!e)return "";let o=t?.find(n=>typeof n.Version=="number"&&n.Version.toString()===e);return o?`${o.Version}: ${this.#l.transform(o.Time,"medium")}`:""}}next(){this.#o.navigate(["options"],{relativeTo:this.#a.parent});}back(){this.#t.isFileRestore()?this.#o.navigate(["encryption"],{relativeTo:this.#a.parent}):this.#t.exit();}performSearch(){let t=this.searchQuery().trim(),e=this.backupSettings(),o=(this.#t.extendedDataType()??"").length>0;if(!t||!e)return;let r=this.versionOptions()?.find(l=>l.Version===parseInt(this.selectOption()??""))?.Version;r!=null&&(this.isSearching.set(true),this.searchResults.set([]),this.hasSearched.set(true),this.#e.postApiV2BackupSearch({requestBody:{BackupId:e.id,Time:null,Version:[r],Filters:[t],Paths:null,PageSize:1e3,Page:0,ReturnExtended:o,SearchMetadata:o}}).pipe(zu(this.abortLoading$),qu(()=>this.isSearching.set(false))).subscribe({next:l=>{this.searchResults.set(l.Data??[]);},error:()=>{this.searchResults.set([]);}}));}clearSearch(){this.searchQuery.set(""),this.searchResults.set([]),this.hasSearched.set(false);}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=hw({type:i,selectors:[["app-select-files"]],features:[YC([ci])],decls:13,vars:3,consts:()=>{let t;t=$localize`Select files`;let e;e=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SH_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let o;o=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let n;n=$localize`Select an option...`;let r;r=$localize`(partial)`;let l;l=$localize`Path`;let c;c=$localize`Enter search term...`;let I;I=$localize`Search files`;let D;D=$localize`Search`;let w;w=$localize`Clear`;let oe;oe=$localize`0 results found`;let ne;return ne=$localize`Found ${"\uFFFD0\uFFFD"}:INTERPOLATION: result(s)`,[["formRef",""],t,e,o,r,l,I,D,w,oe,ne,[3,"submit","formGroup"],[1,"title-30"],[1,"indeterminate","primary"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary"],["value","Version",3,"cleared","options","isClearable"],["type","text","placeholder",n,3,"ngModelChange","ngModel","ngModelOptions"],[1,"custom-option"],[1,"partial"],[3,"hasExtendedData","rootPaths","initialNodes","backupSettings","multiSelect","showFiles","loadExtendedData","searchMode","searchResults"],["for","path"],["type","text","id","path","formControlName","filesToRestore"],[1,"search-container"],["for","search"],["type","text","id","search","placeholder",c,3,"ngModelChange","keydown.enter","ngModel","ngModelOptions"],["shButton","","type","button",1,"small",3,"click","disabled"],[1,"spinner"],["shButton","","type","button",1,"small","secondary"],[1,"search-results-info"],["shButton","","type","button",1,"small","secondary",3,"click"]]},template:function(e,o){e&1&&(Qi(0,"form",11,0),Vg("submit",function(){return o.next()}),Qi(2,"h3",12),nC(3,1),$l(),aT(4,Ot,1,0,"sh-progress-bar",13)(5,vt,5,7),Qi(6,"div",14)(7,"button",15),Vg("click",function(){return o.back()}),Lg(8,2),vg(9,"sh-icon"),Fg(),$l(),Qi(10,"button",16),Lg(11,3),vg(12,"sh-icon"),Fg(),$l()()()),e&2&&(yg("formGroup",o.selectFilesForm),CE(4),cT(o.versionOptionsLoading()?4:5),CE(5),jg(o.isFileRestore()?"Back":"Exit"),rC(8));},dependencies:[Bn,Tn,Ze,Rn,Pn,Jt,Gn,gn,hn,Ne$1,v,Fe,N,Nt$2,d,ci,m$1],styles:["[_nghost-%COMP%]{display:block;margin-top:2.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.partial[_ngcontent-%COMP%]{color:var(--base-9);font-style:italic}.search-container[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.search-container[_ngcontent-%COMP%] sh-form-field[_ngcontent-%COMP%]{flex:1}.search-results-info[_ngcontent-%COMP%]{color:var(--base-8);font-size:var(--small)}"]})};var G=class i{#e=T(ee);#t=T(W);#i=T(m);#n=T(be);#o=T(C);#a=T(O$1);#l=null;backupId=Ge(null);backup=Ge(null);destinationTargetUrl=Ge(null);destinationTestSignal=Ge(null);selectFilesForm=Et();optionsForm=Tt();encryptionForm=mt();optionsFormSignal=L(this.optionsForm.valueChanges);selectFilesFormSignal=L(this.selectFilesForm.valueChanges);selectOption=Ge(null);versionOptionsLoading=Ge(false);versionOptions=Ge([]);isSubmitting=Ge(false);isFileRestore=Ge(false);isFullWidthPage=Ge(false);extendedDataType=Ge(null);alternateRestorePath=Ge(null);alternateRestorePathSourcePrefix=Ge(null);#_=za(()=>{let t=this.backupId(),e=this.backup()?.Backup,o=this.#a.serverSettings();!t||!e||o===void 0||e.ID!==null&&e.ID!==t||this.#l!==t&&(this.#l=t,this.optionsForm.patchValue(ct(e.Settings,o)));});init(t,e=false){this.backupId.set(t),this.isFileRestore.set(e),this.alternateRestorePath.set(null),this.extendedDataType.set(null),e&&this.#e.navigate(["/restore-from-files/destination"]),e||this.getBackup();}updateTargetUrl(t){this.destinationTargetUrl.set(t);}setAlternateRestorePath(t,e){this.alternateRestorePath.set(t),this.alternateRestorePathSourcePrefix.set(e);}submit(){this.isSubmitting.set(true);let t=this.backupId();this.backup()?.Backup?.IsTemporary??false?this.#o.postApiV1BackupByIdCopytotemp({id:this.backupId()??""}).subscribe({next:o=>{this.#r(o.ID??"");},error:o=>this.showErrorDialog($localize`An error occurred while copying the backup to a temporary location: ${o.message}`)}):this.#r(t??"");}showErrorDialog(t){this.#n.open(h,{data:{title:$localize`Error occured`,message:t,confirmText:$localize`OK`,cancelText:void 0},closed:e=>{}});}#r(t){let e=this.optionsForm.value,o=this.selectFilesForm.value,n=this.selectOption(),r=this.versionOptions()?.find(l=>l.Version===(n&&parseInt(n)));this.#o.postApiV1BackupByIdRestore({id:t??"",requestBody:{paths:o.filesToRestore?.split("\0").map(l=>l.endsWith("/")||l.endsWith("\\")?`${l}*`:l)??[],passphrase:o.passphrase??null,time:r?.Time,restore_path:this.alternateRestorePath()??e.restoreFromPath,overwrite:e.handleExisting==="overwrite",permissions:e.permissions,skip_metadata:!e.includeMetadata,source_prefix:this.alternateRestorePathSourcePrefix(),connection_string_id:null}}).pipe(qu(()=>this.isSubmitting.set(false))).subscribe({next:l=>{this.#e.navigate([`./${l.ID}`,"progress"],{relativeTo:this.#t});},error:l=>{console.error("restore error",l);}});}exit(){this.#n.open(h,{data:{title:$localize`Confirm exit?`,message:$localize`Are you sure you want to exit?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:t=>{t&&(this.#s(),this.#e.navigate(["/"]));}});}getVersionOptions(){this.versionOptions();}loadFilesetsWithRetryv2(t,e=2){return this.#o.postApiV2BackupListFilesets({requestBody:{BackupId:t}}).pipe(Hs(o=>{let n=o?.error?.body?.StatusCode??o?.error?.requestBody?.StatusCode;return n==="EncryptedStorageNoPassphrase"||n==="FolderMissing"||n==="EmptyRemoteFolder"||e===0?cy(()=>o):$s(1e3).pipe(Gu(()=>this.loadFilesetsWithRetryv2(t,e-1)))}))}getBackup(){let t=this.backupId();this.versionOptionsLoading.set(true),this.#i.hasV2ListOperations()?Dy([this.#o.getApiV1BackupById({id:t}),this.loadFilesetsWithRetryv2(t)]).pipe(jo(1),qu(()=>this.versionOptionsLoading.set(false))).subscribe({next:([e,o])=>{if(o.Error)throw new Error(o.Error);if(!(e.Backup?.IsTemporary??true)&&e?.Backup?.DBPathExists===false){this.#n.open(h,{data:{title:$localize`Missing Local Database`,message:$localize`The local database for this backup is missing. Please repair or recreate the local database before restoring.`,confirmText:$localize`OK`,cancelText:void 0},closed:r=>{this.#e.navigate(["/backup",t,"database"]);}});return}this.versionOptions.set((o.Data??[]).map(r=>({Version:r.Version??-1,IsFullBackup:r.IsFullBackup??void 0,Time:r.Time??"<missing>",FileCount:r.FileCount??void 0,FileSizes:r.FileSizes??void 0}))),this.backup.set(e);},error:e=>{let o=e?.error?.body?.StatusCode??e?.error?.requestBody?.StatusCode,n=o==="EncryptedStorageNoPassphrase",r=o==="FolderMissing",l=o==="EmptyRemoteFolder",c=$localize`An error occurred while loading the backup filesets: ${e.message}`;n&&(c=$localize`The remote storage is encrypted. Please enter the passphrase to access the backup.`),r&&(c=$localize`The backup storage folder was not found.`),l&&(c=$localize`The backup storage folder does not contain any filesets.`),this.#n.open(h,{data:{title:$localize`Failed to load backup filesets`,message:c,confirmText:$localize`OK`,cancelText:void 0},closed:I=>{this.#e.navigate([n?"/restore-from-files/encryption":"/restore-from-files/destination"]);}});}}):Dy([this.#o.getApiV1BackupById({id:t}),this.#o.getApiV1BackupByIdFilesets({id:t}).pipe(Sy(3))]).pipe(jo(1),qu(()=>this.versionOptionsLoading.set(false))).subscribe({next:([e,o])=>{this.versionOptions.set(o.map(n=>({Version:n.Version??-1,IsFullBackup:(n.IsFullBackup??1)==1,Time:n.Time??"<missing>",FileCount:n.FileCount??void 0,FileSizes:n.FileSizes??void 0}))),this.backup.set(e);}});}#s(){this.selectFilesForm.reset(),this.optionsForm.reset();}static \u0275fac=function(e){return new(e||i)};static \u0275prov=ee$1({token:i,factory:i.\u0275fac,providedIn:"root"})};function At(i,t){if(i&1){let e=vT();Qi(0,"sh-radio",28),Lg(1,6),vg(2,"input",32),CD(),Fg(),$l(),Qi(3,"sh-radio",28),Lg(4,7),Qi(5,"input",33),Vg("click",function(){kd(e);let n=iC(2);return Od(n.chooseCustomRemoteDestination())}),$l(),CD(),Fg(),$l();}i&2&&(CE(2),_D(),CE(3),_D());}function xt(i,t){if(i&1){let e=vT();Qi(0,"sh-radio",28),Lg(1,8),vg(2,"input",32),CD(),Fg(),$l(),Qi(3,"sh-radio",28),Lg(4,9),Qi(5,"input",33),Vg("click",function(){kd(e);let n=iC(2);return Od(n.chooseCustomRemoteDestination())}),$l(),CD(),Fg(),$l();}i&2&&(CE(2),_D(),CE(3),_D());}function kt(i,t){if(i&1){let e=vT();Qi(0,"sh-radio",28),Lg(1,10),Qi(2,"input",34),Vg("click",function(){kd(e);let n=iC(2);return Od(n.chooseDiskDestination())}),$l(),CD(),Fg(),$l();}i&2&&(CE(2),_D());}function Gt(i,t){if(i&1&&(Qi(0,"app-file-tree",30)(1,"label",35),jC(2,"Path"),$l(),vg(3,"input",36),CD(),$l()),i&2){let e=iC(2);yg("disabled",e.optionsFormSignal()?.restoreFrom!=="pickLocation")("enableCreateFolder",true)("resolvePaths",true),CE(3),_D();}}function wt(i,t){if(i&1&&(Qi(0,"app-file-tree",31)(1,"label",35),jC(2,"Path"),$l(),vg(3,"input",36),CD(),$l()),i&2){let e=iC(2);yg("customRemoteMode",e.extendedDataType())("backupId",e.backupId())("sourcePrefix",e.remoteCustomSourcePrefix())("destinationUrl",e.customDestinationUrl()),CE(3),_D();}}function Wt(i,t){if(i&1&&(aT(0,At,6,0)(1,xt,6,0)(2,kt,3,0,"sh-radio",28),Qi(3,"sh-radio",28),Lg(4,5),vg(5,"input",29),CD(),Fg(),$l(),aT(6,Gt,4,3,"app-file-tree",30),aT(7,wt,4,4,"app-file-tree",31)),i&2){let e=iC();cT(e.extendedDataType()==="o365"?0:e.extendedDataType()==="gsuite"?1:e.extendedDataType()==="diskimage"?2:-1),CE(5),_D(),CE(),cT(e.optionsFormSignal()?.restoreFrom==="pickLocation"?6:-1),CE(),cT(e.showCustomRemoteRestoreTree()?7:-1);}}function Vt(i,t){if(i&1&&(Qi(0,"sh-radio",28),Lg(1,11),vg(2,"input",37),CD(),Fg(),$l(),Qi(3,"sh-radio",28),Lg(4,12),vg(5,"input",29),CD(),Fg(),$l(),Qi(6,"app-file-tree",30)(7,"label",35),jC(8,"Path"),$l(),vg(9,"input",36),CD(),$l()),i&2){let e=iC();CE(2),_D(),CE(3),_D(),CE(),yg("disabled",e.optionsFormSignal()?.restoreFrom!=="pickLocation")("enableCreateFolder",true)("resolvePaths",true),CE(3),_D();}}function Bt(i,t){i&1&&(Qi(0,"app-toggle-card",23),ql(1,24),nC(2,13),Gl(),Qi(3,"sh-toggle",28),Lg(4,14),vg(5,"input",38),CD(),Fg(),$l()()),i&2&&(yg("disableToggle",true),CE(5),_D());}function zt(i,t){i&1&&(Qi(0,"app-toggle-card",23),ql(1,24),nC(2,15),Gl(),Qi(3,"sh-radio",28),Lg(4,16),vg(5,"input",39),CD(),Fg(),$l(),Qi(6,"sh-radio",28),Lg(7,17),vg(8,"input",40),CD(),Fg(),$l()(),Qi(9,"app-toggle-card"),ql(10,24),nC(11,18),Gl(),Qi(12,"sh-toggle",41),Lg(13,19),vg(14,"input",42),CD(),Fg(),$l(),Qi(15,"sh-toggle",41),Lg(16,20),vg(17,"input",43),CD(),Fg(),$l()()),i&2&&(yg("disableToggle",true),CE(5),_D(),CE(3),_D(),CE(6),_D(),CE(3),_D());}var B=new jn,Tt=()=>B.group({restoreFrom:B.control("original"),restoreFromPath:B.control(""),handleExisting:B.control(_e.handleExisting),permissions:B.control(_e.permissions),includeMetadata:B.control(_e.includeMetadata),customRemoteIgnoreExisting:B.control(false)}),Re=class i{#e=T(G);#t=T(ee);#i=T(W);#n=T(m);#o=T(be);optionsForm=this.#e.optionsForm;optionsFormSignal=this.#e.optionsFormSignal;isSubmitting=this.#e.isSubmitting;extendedData=this.#e.extendedDataType;remoteCustomTargetUrl=Ge(null);backupId=Nt$1(()=>this.#e.backup()?.Backup?.ID??null);extendedDataType=Nt$1(()=>{let t=this.#e.extendedDataType();return t==="o365"?"o365":t==="gsuite"?"gsuite":t==="diskimage"?"diskimage":null});remoteCustomSourceEntry=Nt$1(()=>this.#e.backup()?.Backup?.Sources?.filter(t=>t.startsWith("@")&&(t.includes("|office365://")||t.includes("|googleworkspace://")))[0]??null);remoteCustomSourceUrl=Nt$1(()=>this.remoteCustomSourceEntry()?.split("|")[1]??null);remoteCustomSourcePrefix=Nt$1(()=>this.remoteCustomSourceEntry()?.split("|")[0]??null);customDestinationUrl=Nt$1(()=>{let t=this.optionsFormSignal()?.restoreFrom,e=this.extendedDataType()!==null;return t==="same-custom"&&e?this.remoteCustomSourceUrl():t==="other-custom"&&e?this.remoteCustomTargetUrl():t==="diskimage"?"diskimage://":null});showCustomRemoteRestoreTree=Nt$1(()=>!!(this.optionsFormSignal()?.restoreFrom==="same-custom"&&this.customDestinationUrl()&&this.backupId()||this.optionsFormSignal()?.restoreFrom==="other-custom"&&this.customDestinationUrl()||this.optionsFormSignal()?.restoreFrom==="diskimage"));isCustomRemoteRestore=Nt$1(()=>{let t=this.optionsFormSignal()?.restoreFrom;return t==="same-custom"||t==="other-custom"});chooseCustomRemoteDestination(){let t=this.extendedDataType()==="o365"?"office365://":"googleworkspace://";return this.#o.open(Tt$1,{maxWidth:"700px",maxHeight:"80vh",width:"100%",closeOnOutsideClick:false,data:{targetUrlModel:this.remoteCustomTargetUrl()||this.remoteCustomSourceUrl()||t,moduleType:"RestoreDestinationProvider",askToCreate:true,expectedResult:"any",suppressErrorDialogs:true,backupId:this.backupId(),sourcePrefix:this.remoteCustomSourcePrefix()}}).closed.subscribe(o=>{o&&(this.remoteCustomTargetUrl.set(o),this.optionsForm.controls.restoreFrom.setValue("other-custom"));}),false}chooseDiskDestination(){return true}#a=za(()=>{let t=this.optionsFormSignal()?.restoreFrom;this.extendedDataType()!=null&&(t==="original"||t===void 0)&&(this.optionsForm.controls.restoreFrom.setValue("pickLocation"),this.optionsForm.controls.handleExisting.setValue("overwrite")),this.extendedDataType()==null&&(t==="same-custom"||t==="other-custom")&&(this.optionsForm.controls.restoreFrom.setValue("original"),this.optionsForm.controls.handleExisting.setValue("saveTimestamp"));});goBack(){this.#t.navigate(["select-files"],{relativeTo:this.#i.parent});}submit(){let t=this.#e.selectFilesFormSignal()?.filesToRestore??[];if(t.length>0&&this.optionsFormSignal()?.restoreFrom=="original"&&(t[0].includes("/")?"/":"\\")!==this.#n.systemInfo()?.DirectorySeparator){this.#o.open(h,{data:{title:$localize`Confirm target folder`,message:$localize`This backup was created on another operating system. Restoring files without specifying a destination folder can cause files to be restored in unexpected places. Are you sure you want to continue without choosing a destination folder?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:r=>{r&&this.#e.submit();}});return}let e=this.optionsFormSignal()?.restoreFrom==="same-custom"||this.optionsFormSignal()?.restoreFrom==="other-custom",o=this.optionsFormSignal()?.restoreFrom==="diskimage";if(e){let n=this.optionsFormSignal()?.restoreFromPath;if(n&&n.startsWith("/")&&(n=n.substring(1)),!n||n.trim()===""){this.#o.open(h,{data:{title:$localize`No path specified`,message:this.extendedDataType()==="gsuite"?$localize`Please choose a path to restore to in the Google Workspace account.`:$localize`Please choose a path to restore to in the Microsoft 365 tenant.`,confirmText:$localize`OK`,cancelText:void 0}});return}let r=this.optionsFormSignal()?.customRemoteIgnoreExisting,l=this.customDestinationUrl()?.substring(this.customDestinationUrl().indexOf("?")),c=this.extendedDataType()==="gsuite"?`@googleworkspace://${encodeURIComponent(n)}${l}&google-ignore-existing=${r?"true":"false"}`:`@office365://${encodeURIComponent(n)}${l}&office365-ignore-existing=${r?"true":"false"}`;this.#e.setAlternateRestorePath(c,this.remoteCustomSourcePrefix()),this.optionsForm.controls.includeMetadata.setValue(true),this.optionsForm.controls.permissions.setValue(true);}else if(o){let n=this.optionsFormSignal()?.restoreFromPath;if(!n||n.trim()===""){this.#o.open(h,{data:{title:$localize`No path specified`,message:$localize`Please choose a target disk to restore to.`,confirmText:$localize`OK`,cancelText:void 0}});return}n.startsWith("@diskimage://")||(n=`@diskimage://${n}`),this.#e.setAlternateRestorePath(n,null),this.optionsForm.controls.includeMetadata.setValue(true),this.optionsForm.controls.permissions.setValue(true);}else this.#e.setAlternateRestorePath(null,null);this.#e.submit();}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=hw({type:i,selectors:[["app-advanced-options-settings"]],decls:18,vars:6,consts:()=>{let t;t=$localize`Restore options`;let e;e=$localize`Where do you want to restore files to?`;let o;o=$localize`${"\uFFFD#14\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let n;n=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SH_ICON: Submit `;let r;r=$localize` Local file system ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let l;l=$localize` Same Microsoft 365 Tenant ${"\uFFFD#2\uFFFD\uFFFD/#2\uFFFD"}:TAG_INPUT:`;let c;c=$localize` Different Microsoft 365 Tenant ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let I;I=$localize` Same Google Workspace Account ${"\uFFFD#2\uFFFD\uFFFD/#2\uFFFD"}:TAG_INPUT:`;let D;D=$localize` Different Google Workspace Account ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let w;w=$localize` Target disk ${"\uFFFD#2\uFFFD\uFFFD/#2\uFFFD"}:TAG_INPUT:`;let oe;oe=$localize` Original location ${"\uFFFD#2\uFFFD\uFFFD/#2\uFFFD"}:TAG_INPUT:`;let ne;ne=$localize` Pick location ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let P;P=$localize`Restore settings`;let Pe;Pe=$localize` Ignore existing resources in the destination ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let Ie;Ie=$localize`How do you want to handle existing files?`;let Me;Me=$localize` Overwrite ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let Le;Le=$localize` Save different versions with timestamp in file name ${"\uFFFD#8\uFFFD\uFFFD/#8\uFFFD"}:TAG_INPUT:`;let ye;ye=$localize`Metadata settings`;let De;De=$localize` Restore file metadata ${"\uFFFD#14\uFFFD\uFFFD/#14\uFFFD"}:TAG_INPUT:`;let $e;return $e=$localize` Restore read/write permissions ${"\uFFFD#17\uFFFD\uFFFD/#17\uFFFD"}:TAG_INPUT:`,[["formRef",""],t,e,o,n,r,l,c,I,D,w,oe,ne,P,Pe,Ie,Me,Le,ye,De,$e,[3,"submit","formGroup"],[1,"title-30"],[3,"disableToggle"],["title",""],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary"],[1,"raised","primary"],["type","radio","name","restoreFrom","value","pickLocation","formControlName","restoreFrom"],[3,"disabled","enableCreateFolder","resolvePaths"],[3,"customRemoteMode","backupId","sourcePrefix","destinationUrl"],["type","radio","name","restoreFrom","value","same-custom","formControlName","restoreFrom"],["type","radio","name","restoreFrom","value","other-custom","formControlName","restoreFrom",3,"click"],["type","radio","name","restoreFrom","value","diskimage","formControlName","restoreFrom",3,"click"],["for","path"],["type","text","id","path","formControlName","restoreFromPath"],["type","radio","name","restoreFrom","value","original","formControlName","restoreFrom"],["type","checkbox","formControlName","customRemoteIgnoreExisting"],["type","radio","name","handleExisting","value","overwrite","formControlName","handleExisting"],["type","radio","name","handleExisting","value","saveTimestamp","formControlName","handleExisting"],[1,"primary","raised"],["type","checkbox","formControlName","includeMetadata"],["type","checkbox","formControlName","permissions"]]},template:function(e,o){e&1&&(Qi(0,"form",21,0),Vg("submit",function(){return o.submit()}),Qi(2,"h3",22),nC(3,1),$l(),Qi(4,"app-toggle-card",23),ql(5,24),nC(6,2),Gl(),aT(7,Wt,8,3)(8,Vt,10,3),$l(),aT(9,Bt,6,1,"app-toggle-card",23)(10,zt,18,1),Qi(11,"div",25)(12,"button",26),Vg("click",function(){return o.goBack()}),Lg(13,3),vg(14,"sh-icon"),Fg(),$l(),Qi(15,"button",27),Lg(16,4),vg(17,"sh-icon"),Fg(),$l()()()),e&2&&(yg("formGroup",o.optionsForm),CE(4),yg("disableToggle",true),CE(3),cT(o.extendedDataType()!==null?7:8),CE(2),cT(o.isCustomRemoteRestore()&&o.optionsFormSignal()?.restoreFrom!=="diskimage"?9:o.optionsFormSignal()?.restoreFrom!=="diskimage"?10:-1),CE(6),Yg("loading",o.isSubmitting()));},dependencies:[Gn,Tn,Ze,yt$1,rn,Rn,Pn,gn,hn,Ze$1,Ne$1,J,O,v,N],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"]})};
2
- var chunk3ZPV5XW7=/*#__PURE__*/Object.freeze({__proto__:null,createEncryptionForm:mt,default:Oe});var chunk2Z6G3TRC=/*#__PURE__*/Object.freeze({__proto__:null,createRestoreSelectFilesForm:Et,default:he});var chunkW2TUY3B6=/*#__PURE__*/Object.freeze({__proto__:null,createRestoreOptionsForm:Tt,default:Re});export{G,chunk2Z6G3TRC as a,chunkW2TUY3B6 as b,chunk3ZPV5XW7 as c};
package/chunk-CTwO6j97.js DELETED
@@ -1 +0,0 @@
1
- import {e as ee,W}from'./chunk-C4GeR7BF.js';import {k}from'./chunk-CUaRQ2FJ.js';import'./chunk-aOMoAKYY.js';import'./chunk-BEhUV7oX.js';import {N as Ne,E as Ee}from'./chunk-ihUnHtR7.js';import'./chunk-Bb6BmVO4.js';import {v as ve}from'./chunk-DmDqcC4A.js';import {x}from'./chunk-CAwTsBqQ.js';import {c}from'./chunk-B53Wj4F9.js';import {D}from'./chunk-BTgf5lfZ.js';import {T,ab as C,aX as y,a5 as g,bh as Q,a6 as be,m,N as Nt$1,G as Ge,D as A,z as za,H as qu,h as hw,_ as _t$1,v,d as N,j as vg,Q as Qi,V as Vg,n as nC,$ as $l,L as Lg,F as Fg,aP as ql,aQ as Gl,f as aT,b3 as cg,b4 as oT,bg as ag,c6 as lb,C as CE,A as yg,a3 as KC,i as cT,b5 as iT,o as oC,l as vT,p as cm,r as kd,k as iC,U as UC,O as Od,x as am,w as jC,au as jg,av as rC,a1 as dT,ap as lT,a2 as fT,Y as Yg,c4 as pC,a$ as JC,b$ as Dg,ak as um,aa as Ql,ar as Qp,al as WC,aM as ob,aN as ab,ao as qC,aR as sb,b_ as ei$1,co as ce,cp as y$1,bc as Fi,cq as tn,cr as en,ad as Mr,aJ as ci,bf as pi,cs as A$1,ct as I,cu as fv,cv as Je,aL as hi,cw as Ne$1,cx as U,bd as Jt$1,cy as Ce,be as Kn$1,cz as ye,cA as qt$1,cB as Ee$1,cC as Qt$1,cD as Ze,cE as ne,cF as m$1,cG as de,cH as g$1,cI as nn,cJ as j,cK as d$1,cL as Rt$1,cM as Zt$1,cN as Gt$1,cO as Kt$1,cP as Yt$1,cQ as zt$1,cR as q,cS as Q$1,cT as Bt$1,cU as Pt$1,cV as kt$1,cW as Ut$1,cX as jt$1,cY as Ot$1,cZ as Nt$2,c_ as Fe,c$ as M,d0 as xt$1,d1 as J,d2 as Vt$1,bq as Rr,d3 as Or,d4 as Tr,d5 as f$1,d6 as wi,d7 as Ai,bL as s,d8 as L,d9 as k$1,da as _,aI as c$1,aH as m$2,b2 as m$3}from'./main-VVQP2YE7.js';import {f}from'./chunk-Bja52qI7.js';import {d}from'./chunk-B8uF0dom.js';import'./chunk-B9maI7Xa.js';import'./chunk-BO2GlieG.js';import {a as at$1}from'./chunk-CKnRcyHZ.js';import {C as C$1}from'./chunk-CwKy8pxa.js';import'./chunk-BVEyeg9y.js';import'./chunk-DqIU7ViF.js';import'./chunk-Box6Lckh.js';var Dn=()=>[_t$1,Promise.resolve().then(function(){return chunkXA5RWQQ5}).then(e=>e.NgTemplateOutlet),v,N,Promise.resolve().then(function(){return chunkBEVA4HT2}).then(e=>e.ShipChip),import('./chunk-B52v_pjw.js').then(e=>e.ShipTable),import('./chunk-B52v_pjw.js').then(e=>e.ShipSort),at$1,Promise.resolve().then(function(){return chunkQICO34G3}).then(e=>e.BackupProgressComponent),Promise.resolve().then(function(){return chunkCORTKH64}).then(e=>e.DurationFormatPipe),Promise.resolve().then(function(){return chunkCHQM3PCJ}).then(e=>e.BytesPipe),Promise.resolve().then(function(){return chunkKDVMMWQR}).then(e=>e.RelativeTimePipe)],fn=()=>["/add-backup"],hn=()=>["/restore"],Pn=e=>({$implicit:e}),$n=()=>["/backup/new"],Rn=e=>["/restore",e],yn=e=>["/backup",e,"export"],An=e=>["/backup",e,"delete"],xn=e=>["/backup",e,"database"],Hn=e=>["/backup",e,"commandline"],Ln=e=>["/backup",e,"log"],kn=e=>["/backup",e],Gn=e=>["/backup",e,"delete-versions"],bn=e=>["/backup",e,"broken-files"];function Bn(e,t){e&1&&nC(0,11,1);}function vn(e,t){e&1&&nC(0,11,2);}function Jn(e,t){if(e&1&&nC(0,11,3),e&2){let n=iC(2);jg(n.timeType()),rC(0);}}function Xn(e,t){if(e&1){let n=vT();Qi(0,"button",70),Vg("click",function(){let c=kd(n).$implicit,C=iC(3);return Od(C.sortByColumn.set(c.value))}),nC(1,15),$l();}if(e&2){let n=t.$implicit,_=iC(3);Yg("active",_.orderBy()===n.value),CE(),jg(n.label),rC(1);}}function wn(e,t){if(e&1&&(Qi(0,"sh-menu",67)(1,"button",68),Lg(2,14),vg(3,"strong")(4,"sh-icon"),Fg(),$l(),ql(5,69),dT(6,Xn,2,3,"button",71,lT),Gl(),$l()),e&2){let n=iC(2);CE(4),jg(n.orderBy()),rC(2),CE(2),fT(n.sortOrderOptions());}}function zn(e,t){if(e&1){let n=vT();Qi(0,"div",63)(1,"sh-button-group",64),cm("valueChange",function(c){kd(n);let C=iC();return UC(C.viewMode,c)||(C.viewMode=c),Od(c)}),Qi(2,"button",65),Lg(3,9),vg(4,"sh-icon"),Fg(),$l(),Qi(5,"button",66),Lg(6,10),vg(7,"sh-icon"),Fg(),$l()(),Qi(8,"sh-menu",67)(9,"button",68),Lg(10,11),Qi(11,"strong"),aT(12,Bn,1,0)(13,vn,1,0)(14,Jn,1,1),$l(),vg(15,"sh-icon"),Fg(),$l(),ql(16,69),Qi(17,"button",70),Vg("click",function(){kd(n);let c=iC();return Od(c.setTimeType("relative"))}),nC(18,12),$l(),Qi(19,"button",70),Vg("click",function(){kd(n);let c=iC();return Od(c.setTimeType("actual"))}),nC(20,13),$l(),Gl(),$l(),aT(21,wn,8,1,"sh-menu",67),$l();}if(e&2){let n=iC();CE(),am("value",n.viewMode),CE(11),cT(n.timeType()=="relative"?12:n.timeType()=="actual"?13:14),CE(9),cT(n.viewMode()==="list"?21:-1);}}function Vn(e,t){e&1&&(Qi(0,"sh-chip",78),Lg(1,19),vg(2,"sh-icon"),Fg(),$l()),e&2&&yg("shTooltip","Synchronization job");}function Un(e,t){if(e&1){let n=vT();Qi(0,"div",76)(1,"div",59)(2,"h3"),jC(3),aT(4,Vn,3,1,"sh-chip",78),Qi(5,"sh-chip"),vg(6,"img",79),jC(7),$l()()(),Qi(8,"div",80)(9,"sh-chip",81),nC(10,16),$l()(),Qi(11,"div",63)(12,"button",82),Vg("click",function(){kd(n);let c=iC().$implicit,C=iC(4);return Od(C.startBackup(c.Backup.ID))}),Lg(13,17),vg(14,"sh-icon"),Fg(),$l(),Qi(15,"button",83),Vg("click",function(){kd(n);let c=iC().$implicit,C=iC(4);return Od(C.openInConsole(c))}),Lg(16,18),vg(17,"sh-icon"),Fg(),$l()(),vg(18,"app-backup-progress",84),$l();}if(e&2){let n=iC().$implicit,_=iC(4);CE(3),Ql(" ",n.Backup.Name??_.MISSING_BACKUP_NAME," "),CE(),cT(n.Backup.OperationType==="Sync"?4:-1),CE(2),yg("src",_.getBackendIcon(n.Backup.TargetURL),Qp),CE(),Ql(" ",_.getBackendType(n.Backup.TargetURL)," "),CE(5),Yg("loading",_.startingBackup()===n.Backup.ID),CE(6),yg("backupId",n.Backup.ID);}}function Kn(e,t){e&1&&(Qi(0,"sh-chip",78),Lg(1,21),vg(2,"sh-icon"),Fg(),$l()),e&2&&yg("shTooltip","Synchronization job");}function jn(e,t){if(e&1&&(Qi(0,"sh-chip"),vg(1,"img",79),jC(2),$l()),e&2){let n=t.$implicit,_=iC(7);CE(),yg("src",_.getBackendIcon(n.TargetUrl),Qp),CE(),Ql(" ",_.getBackendType(n.TargetUrl)," ");}}function Wn(e,t){if(e&1&&dT(0,jn,3,2,"sh-chip",null,lT),e&2){let n=iC(2).$implicit;fT(n.Backup.AdditionalTargetURLs);}}function qn(e,t){if(e&1&&(Qi(0,"p")(1,"span"),nC(2,26),$l(),jC(3),ob(4,"relativeTime"),$l()),e&2){iC();let n=qC(5),_=iC(6);CE(3),Ql(" ",ab(4,1,n,_.timeType()==="actual")," ");}}function Qn(e,t){if(e&1&&(jC(0),ob(1,"durationFormat")),e&2){let n=iC(3).$implicit,_=iC(4);Ql(" ",ab(1,1,n.Backup.Metadata?.LastBackupDuration,_.timeType()==="actual")," ");}}function Yn(e,t){e&1&&(ql(0),jC(1,"-"),Gl());}function Zn(e,t){if(e&1&&(jC(0),ob(1,"bytes")),e&2){let n=iC(3).$implicit;Ql(" ",sb(1,1,n.Backup.Metadata?.SourceFilesSize)," ");}}function et(e,t){e&1&&(ql(0),jC(1,"-"),Gl());}function nt(e,t){if(e&1&&(jC(0),ob(1,"bytes")),e&2){let n=iC(3).$implicit;Ql(" ",sb(1,1,n.Backup.Metadata?.TargetFilesSize)," ");}}function tt(e,t){e&1&&(ql(0),jC(1,"-"),Gl());}function it(e,t){if(e&1&&(Qi(0,"p")(1,"span"),nC(2,22),$l(),jC(3),ob(4,"relativeTime"),$l(),um(5),aT(6,qn,5,4,"p"),Qi(7,"p")(8,"span"),nC(9,23),$l(),aT(10,Qn,2,4)(11,Yn,2,0,"ng-container"),$l(),Qi(12,"p")(13,"span"),nC(14,24),$l(),aT(15,Zn,2,3)(16,et,2,0,"ng-container"),$l(),Qi(17,"p")(18,"span"),nC(19,25),$l(),aT(20,nt,2,3)(21,tt,2,0,"ng-container"),$l()),e&2){let n=iC(2).$implicit,_=iC(4);CE(3),Ql(" ",ab(4,5,n.Backup.Metadata?.LastBackupFinished,_.timeType()==="actual")," "),CE(2);let c=WC(_.scheduledTimes()[n.Backup.ID??""]);CE(),cT(c?6:-1),CE(4),cT(n.Backup.Metadata?.LastBackupDuration?10:11),CE(5),cT(n.Backup.Metadata?.SourceFilesSize?15:16),CE(5),cT(n.Backup.Metadata?.TargetFilesSize?20:21);}}function ot(e,t){if(e&1&&vg(0,"app-backup-progress",84),e&2){let n=iC(2).$implicit;yg("backupId",n.Backup.ID);}}function _t(e,t){e&1&&(Qi(0,"sh-chip",81),nC(1,27),$l());}function at(e,t){e&1&&Dg(0);}function lt(e,t){if(e&1&&(Qi(0,"div",77)(1,"div",59)(2,"h3"),jC(3),aT(4,Kn,3,1,"sh-chip",78),Qi(5,"sh-chip"),vg(6,"img",79),jC(7),$l(),aT(8,Wn,2,0),$l(),aT(9,it,22,9)(10,ot,1,1,"app-backup-progress",84),$l(),Qi(11,"div",80)(12,"sh-chip",85),nC(13,20),$l(),aT(14,_t,2,0,"sh-chip",81),$l(),Qi(15,"div",63),ag(16,at,1,0,"ng-container",86),$l()()),e&2){let n=iC().$implicit,_=iC(4),c=pC(33);CE(3),Ql(" ",n.Backup.Name??_.MISSING_BACKUP_NAME," "),CE(),cT(n.Backup.OperationType==="Sync"?4:-1),CE(2),yg("src",_.getBackendIcon(n.Backup.TargetURL),Qp),CE(),Ql(" ",_.getBackendType(n.Backup.TargetURL)," "),CE(),cT(n.Backup.AdditionalTargetURLs?.length?8:-1),CE(),cT(_.runningBackupId()!==n.Backup.ID?9:10);let C=_.getBackupVersionCount(n);CE(4),jg(C)(C),rC(13),CE(),cT(n.Backup.ExternalID?14:-1),CE(2),yg("ngTemplateOutlet",c)("ngTemplateOutletContext",JC(11,Pn,n));}}function rt(e,t){if(e&1&&aT(0,Un,19,7,"div",76)(1,lt,17,13,"div",77),e&2){let n=t.$implicit;cT(n.Backup.ExternalID?0:1);}}function ct(e,t){if(e&1&&dT(0,rt,2,1,null,null,lT),e&2){let n=iC(3);fT(n.backups());}}function st(e,t){e&1&&(Qi(0,"div",75),Lg(1,28),Qi(2,"button",87),vg(3,"sh-icon"),$l(),Fg(),$l()),e&2&&(CE(2),yg("routerLink",KC(1,$n)));}function ut(e,t){if(e&1&&(Qi(0,"div",74),aT(1,ct,2,0)(2,st,4,2,"div",75),$l()),e&2){let n=iC(2);Yg("fallback",n.backups().length===0),CE(),cT(n.backups().length?1:2);}}function Ft(e,t){e&1&&(Lg(0,29,1),Dg(1),Fg());}function Ct(e,t){e&1&&(Lg(0,30,1),Dg(1),Fg());}function Tt(e,t){e&1&&(Lg(0,31,1),Dg(1),Fg());}function dt(e,t){e&1&&(Lg(0,32,1),Dg(1),Fg());}function Et(e,t){e&1&&(Lg(0,33,1),Dg(1),Fg());}function pt(e,t){e&1&&(Lg(0,34,1),Dg(1),Fg());}function gt(e,t){e&1&&(Lg(0,35,1),Dg(1),Fg());}function St(e,t){e&1&&(Qi(0,"sh-chip",98),Lg(1,39),vg(2,"sh-icon"),Fg(),$l()),e&2&&yg("shTooltip","Synchronization job");}function mt(e,t){if(e&1&&(Qi(0,"sh-chip"),vg(1,"img",79),jC(2),$l()),e&2){let n=t.$implicit,_=iC(5);CE(),yg("src",_.getBackendIcon(n.TargetUrl),Qp),CE(),Ql(" ",_.getBackendType(n.TargetUrl)," ");}}function Ot(e,t){if(e&1&&dT(0,mt,3,2,"sh-chip",null,lT),e&2){let n=iC().$implicit;fT(n.Backup.AdditionalTargetURLs);}}function Nt(e,t){if(e&1&&(jC(0),ob(1,"relativeTime")),e&2){let n=iC().$implicit,_=iC(3);Ql(" ",ab(1,1,n.Backup.Metadata?.LastBackupFinished,_.timeType()==="actual")," ");}}function Mt(e,t){e&1&&(ql(0),jC(1,"-"),Gl());}function It(e,t){if(e&1&&(jC(0),ob(1,"relativeTime")),e&2){iC();let n=qC(13),_=iC(3);Ql(" ",ab(1,1,n,_.timeType()==="actual")," ");}}function Pt(e,t){e&1&&(ql(0),jC(1,"-"),Gl());}function Dt(e,t){if(e&1&&(jC(0),ob(1,"durationFormat")),e&2){let n=iC().$implicit,_=iC(3);Ql(" ",ab(1,1,n.Backup.Metadata?.LastBackupDuration,_.timeType()==="actual")," ");}}function ft(e,t){e&1&&(ql(0),jC(1,"-"),Gl());}function ht(e,t){if(e&1&&(jC(0),ob(1,"bytes")),e&2){let n=iC().$implicit;Ql(" ",sb(1,1,n.Backup.Metadata?.SourceFilesSize)," ");}}function $t(e,t){e&1&&(ql(0),jC(1,"-"),Gl());}function Rt(e,t){if(e&1&&(jC(0),ob(1,"bytes")),e&2){let n=iC().$implicit;Ql(" ",sb(1,1,n.Backup.Metadata?.TargetFilesSize)," ");}}function yt(e,t){e&1&&(ql(0),jC(1,"-"),Gl());}function At(e,t){e&1&&Dg(0);}function xt(e,t){if(e&1&&(Qi(0,"tr")(1,"td"),jC(2),aT(3,St,3,1,"sh-chip",98),$l(),Qi(4,"td")(5,"sh-chip",99),vg(6,"img",79),jC(7),$l(),aT(8,Ot,2,0),$l(),Qi(9,"td"),aT(10,Nt,2,4)(11,Mt,2,0,"ng-container"),$l(),Qi(12,"td"),um(13),aT(14,It,2,4)(15,Pt,2,0,"ng-container"),$l(),Qi(16,"td"),aT(17,Dt,2,4)(18,ft,2,0,"ng-container"),$l(),Qi(19,"td"),aT(20,ht,2,3)(21,$t,2,0,"ng-container"),$l(),Qi(22,"td"),aT(23,Rt,2,3)(24,yt,2,0,"ng-container"),$l(),Qi(25,"td")(26,"span"),nC(27,38),$l()(),Qi(28,"td"),ag(29,At,1,0,"ng-container",86),$l()()),e&2){let n=t.$implicit,_=iC(3),c=pC(33);CE(2),Ql(" ",n.Backup.Name??_.MISSING_BACKUP_NAME," "),CE(),cT(n.Backup.OperationType==="Sync"?3:-1),CE(3),yg("src",_.getBackendIcon(n.Backup.TargetURL),Qp),CE(),Ql(" ",_.getBackendType(n.Backup.TargetURL)," "),CE(),cT(n.Backup.AdditionalTargetURLs?.length?8:-1),CE(2),cT(n.Backup.Metadata?.LastBackupFinished?10:11),CE(3);let C=WC(_.scheduledTimes()[n.Backup.ID??""]);CE(),cT(C?14:15),CE(3),cT(n.Backup.Metadata?.LastBackupDuration?17:18),CE(3),cT(n.Backup.Metadata?.SourceFilesSize?20:21),CE(3),cT(n.Backup.Metadata?.TargetFilesSize?23:24);let y=_.getBackupVersionCount(n);CE(4),jg(y)(y),rC(27),CE(2),yg("ngTemplateOutlet",c)("ngTemplateOutletContext",JC(15,Pn,n));}}function Ht(e,t){if(e&1){let n=vT();Qi(0,"sh-table",88),cm("sortByColumnChange",function(c){kd(n);let C=iC(2);return UC(C.sortByColumn,c)||(C.sortByColumn=c),Od(c)}),Qi(1,"tr",89)(2,"th",90),Lg(3,29),ag(4,Ft,2,0,"ng-container",91),Fg(),$l(),Qi(5,"th",92),Lg(6,30),ag(7,Ct,2,0,"ng-container",91),Fg(),$l(),Qi(8,"th",93),Lg(9,31),ag(10,Tt,2,0,"ng-container",91),Fg(),$l(),Qi(11,"th",94),Lg(12,32),ag(13,dt,2,0,"ng-container",91),Fg(),$l(),Qi(14,"th",95),Lg(15,33),ag(16,Et,2,0,"ng-container",91),Fg(),$l(),Qi(17,"th",96),Lg(18,34),ag(19,pt,2,0,"ng-container",91),Fg(),$l(),Qi(20,"th",97),Lg(21,35),ag(22,gt,2,0,"ng-container",91),Fg(),$l(),Qi(23,"th"),nC(24,36),$l(),Qi(25,"th"),nC(26,37),$l()(),dT(27,xt,30,17,"tr",null,lT),$l();}if(e&2){let n=iC(2),_=pC(35);yg("data",n.backups())("loading",n.backupsLoading()),am("sortByColumn",n.sortByColumn),CE(4),yg("ngTemplateOutlet",_),CE(3),yg("ngTemplateOutlet",_),CE(3),yg("ngTemplateOutlet",_),CE(3),yg("ngTemplateOutlet",_),CE(3),yg("ngTemplateOutlet",_),CE(3),yg("ngTemplateOutlet",_),CE(3),yg("ngTemplateOutlet",_),CE(5),fT(n.backups());}}function Lt(e,t){if(e&1&&aT(0,ut,3,3,"div",72)(1,Ht,29,10,"sh-table",73),e&2){let n=iC();cT(n.viewMode()==="list"?0:n.viewMode()==="details"?1:-1);}}function kt(e,t){e&1&&(Qi(0,"div",100),vg(1,"sh-progress-bar",101),Qi(2,"div",59)(3,"h3"),nC(4,40),$l()()());}function Gt(e,t){if(e&1){let n=vT();Qi(0,"button",82),Vg("click",function(){kd(n);let c=iC(3);return Od(c.abort())}),Lg(1,42),vg(2,"sh-icon"),Fg(),$l();}if(e&2){let n=iC(3);Yg("small",n.viewMode()==="details");}}function bt(e,t){if(e&1){let n=vT();Qi(0,"button",82),Vg("click",function(){kd(n);let c=iC(3);return Od(c.stop())}),Lg(1,43),vg(2,"sh-icon"),Fg(),$l();}if(e&2){let n=iC(3);Yg("small",n.viewMode()==="details");}}function Bt(e,t){e&1&&(Lg(0,41,1),vg(1,"sh-icon"),Fg());}function vt(e,t){e&1&&(Lg(0,41,2),vg(1,"sh-icon"),Fg());}function Jt(e,t){if(e&1){let n=vT();aT(0,Gt,3,2,"button",102)(1,bt,3,2,"button",102),Qi(2,"button",82),Vg("click",function(){kd(n);let c=iC(2);return Od(c.pauseResume())}),Lg(3,41),aT(4,Bt,2,0)(5,vt,2,0),Fg(),$l();}if(e&2){let n=iC(2);cT(n.isStopping()?0:1),CE(2),Yg("small",n.viewMode()==="details")("loading",n.isResuming()),CE(2),cT(n.clientIsRunning()?4:5);}}function Xt(e,t){e&1&&nC(0,44,1);}function wt(e,t){e&1&&(Qi(0,"button",103)(1,"sh-icon"),jC(2,"pencil-simple"),$l()()),e&2&&yg("shTooltip","Externally managed")("disabled",true);}function zt(e,t){if(e&1&&(Qi(0,"button",104)(1,"sh-icon"),jC(2,"pencil-simple"),$l()()),e&2){let n=iC(2).$implicit;yg("routerLink",JC(1,kn,n.Backup.ID));}}function Vt(e,t){e&1&&(Qi(0,"button",103)(1,"sh-icon"),jC(2,"dots-three-vertical"),$l()()),e&2&&yg("shTooltip","Externally managed")("disabled",true);}function Ut(e,t){e&1&&(Qi(0,"sh-icon"),jC(1,"check"),$l());}function Kt(e,t){e&1&&(Qi(0,"sh-icon"),jC(1,"dots-three-vertical"),$l());}function jt(e,t){if(e&1&&(Qi(0,"button",108),aT(1,Ut,2,0,"sh-icon")(2,Kt,2,0,"sh-icon"),$l()),e&2){let n=iC(2).$implicit,_=iC();Yg("loading",_.loadingId()===n.Backup.ID)("success",_.successId()===n.Backup.ID),CE(),cT(_.successId()===n.Backup.ID?1:2);}}function Wt(e,t){if(e&1&&(Qi(0,"button",107),Lg(1,55),vg(2,"sh-icon"),Fg(),$l()),e&2){let n=iC(3).$implicit;yg("routerLink",JC(1,Gn,n.Backup.ID));}}function qt(e,t){if(e&1&&(Qi(0,"button",107),Lg(1,56),vg(2,"sh-icon"),Fg(),$l()),e&2){let n=iC(3).$implicit;yg("routerLink",JC(1,bn,n.Backup.ID));}}function Qt(e,t){if(e&1&&(vg(0,"sh-divider"),Qi(1,"h3",106),nC(2,54),$l(),aT(3,Wt,3,3,"button",107),aT(4,qt,3,3,"button",107)),e&2){let n=iC(3);CE(3),cT(n.hasDeleteVersions()?3:-1),CE(),cT(n.hasBrokenFiles()?4:-1);}}function Yt(e,t){if(e&1){let n=vT();Qi(0,"button",82),Vg("click",function(){kd(n);let c=iC().$implicit,C=iC();return Od(C.startBackup(c.Backup.ID))}),Lg(1,44),vg(2,"sh-icon"),aT(3,Xt,1,0),Fg(),$l(),aT(4,wt,3,2,"button",103)(5,zt,3,3,"button",104),Qi(6,"sh-menu"),aT(7,Vt,3,2,"button",103)(8,jt,3,5,"button",105),ql(9,69),Qi(10,"h3",106),jC(11,"Operations"),$l(),Qi(12,"button",107),Lg(13,45),vg(14,"sh-icon"),Fg(),$l(),Qi(15,"button",107),Lg(16,46),vg(17,"sh-icon"),Fg(),$l(),Qi(18,"button",107),Lg(19,47),vg(20,"sh-icon"),Fg(),$l(),vg(21,"sh-divider"),Qi(22,"h3",106),nC(23,48),$l(),Qi(24,"button",107),Lg(25,49),vg(26,"sh-icon"),Fg(),$l(),Qi(27,"button",70),Vg("click",function(){kd(n);let c=iC().$implicit,C=iC();return Od(C.verifyFiles(c.Backup.ID))}),Lg(28,50),vg(29,"sh-icon"),Fg(),$l(),Qi(30,"button",107),Lg(31,51),vg(32,"sh-icon"),Fg(),$l(),aT(33,Qt,5,2),vg(34,"sh-divider"),Qi(35,"h3",106),nC(36,52),$l(),Qi(37,"button",107),Lg(38,53),vg(39,"sh-icon"),Fg(),$l(),Gl(),$l();}if(e&2){let n=iC().$implicit,_=iC();Yg("loading",_.startingBackup()===n.Backup.ID),CE(3),cT(_.viewMode()==="list"?3:-1),CE(),cT(n.Backup.ExternalID?4:5),CE(3),cT(n.Backup.ExternalID?7:8),CE(5),yg("routerLink",JC(12,Rn,n.Backup.ID)),CE(3),yg("routerLink",JC(14,yn,n.Backup.ID)),CE(3),yg("routerLink",JC(16,An,n.Backup.ID)),CE(6),yg("routerLink",JC(18,xn,n.Backup.ID)),CE(6),yg("routerLink",JC(20,Hn,n.Backup.ID)),CE(3),cT(_.hasDeleteVersions()||_.hasBrokenFiles()?33:-1),CE(4),yg("routerLink",JC(22,Ln,n.Backup.ID));}}function Zt(e,t){if(e&1&&aT(0,Jt,6,6)(1,Yt,40,24),e&2){let n=t.$implicit,_=iC();cT(_.runningBackupId()===n.Backup.ID?0:1);}}function ei(e,t){e&1&&(Qi(0,"sh-icon",109),jC(1,"funnel-simple"),$l(),Qi(2,"sh-icon",110),jC(3,"sort-ascending"),$l(),Qi(4,"sh-icon",111),jC(5,"sort-descending"),$l());}var le=class e{#t=T(C);#n=T(y);#e=T(g);#_=T(C$1);#a=T(Q);#l=T(be);#i=T(m);hasDeleteVersions=this.#i.hasV2DeleteVersions;hasBrokenFiles=this.#i.hasV2BrokenFiles;MISSING_BACKUP_NAME=$localize`Backup name missing`;sortOrderOptions=this.#e.orderByOptions;orderBy=this.#e.orderBy;backups=this.#e.backups;backupsLoading=this.#e.backupsLoading;startingBackup=this.#e.startingBackup;deletingBackup=this.#e.deletingBackup;runningBackupId=this.#n.runningBackupId;getBackendType=Ne;getBackendIcon=Ee;timeType=this.#e.timeType;clientIsRunning=this.#n.clientIsRunning;isResuming=this.#n.isResuming;runningTask=Nt$1(()=>this.#n.serverState()?.ActiveTask?.Item1);isStopping=Nt$1(()=>this.runningTask()==this.#o());scheduledTimes=Nt$1(()=>{let t=this.#a.serverState()?.ProposedSchedule??[],n=this.#e.backups(),_={};return n.forEach(c=>{let C=c.Backup?.ID;if(C){var y=t.find(X=>X.Item1==C);y?.Item2?_[C]=y.Item2:c.Schedule?.Time&&(_[C]=c.Schedule.Time);}}),_});#o=Ge(-1);viewMode=A("viewMode","list");sortByColumn=Ge(this.#e.orderBy());loadingId=Ge(null);successId=Ge(null);sortEffect=za(()=>this.#e.setOrderBy(this.sortByColumn()));ngOnInit(){this.#e.getBackups(true);}openInConsole(t){let n=t.Backup.ExternalID?.split(":")[1];if(!n){console.error("Backup does not have an external ID");return}this.#_.openConsole("/app/machines/configurations/"+n);}setOrderBy(t){this.#e.setOrderBy(t);}setTimeType(t){this.#e.setTimeType(t);}startBackup(t){this.#n.resumeDialogCheck(()=>this.#e.startBackup(t));}openPauseDialog(){this.#l.open(k,{maxWidth:"550px",width:"100%"});}pauseResume(){if(this.clientIsRunning()){this.openPauseDialog();return}this.#n.pauseResume().subscribe();}stop(){let t=this.runningTask();t&&(this.#o.set(t),this.#t.postApiV1TaskByTaskidStop({taskid:t}).subscribe());}abort(){let t=this.runningTask();t&&this.#t.postApiV1TaskByTaskidAbort({taskid:t}).subscribe();}getBackupVersionCount(t){return parseInt(t?.Backup?.Metadata?.BackupListCount??"",10)||0}verifyFiles(t){this.loadingId.set(t),this.#t.postApiV1BackupByIdVerify({id:t}).pipe(qu(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(t),setTimeout(()=>this.successId.set(null),2e3);}});}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=hw({type:e,selectors:[["app-home"]],decls:36,vars:6,consts:()=>{let t;t=$localize`Backups`;let n;n=$localize`Keep your data safe at your chosen destination.`;let _;_=$localize` Create ${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON:`;let c;c=$localize`Restores`;let C;C=$localize`Recover your files from any backup set.`;let y;y=$localize` Start ${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON:`;let X;X=$localize`My backups`;let re;re=$localize`${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:rows${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON: List `;let ce;ce=$localize`${"\uFFFD#7\uFFFD"}:START_TAG_SH_ICON:list${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SH_ICON: Details `;let se;se=$localize` Time: ${"\uFFFD#11\uFFFD"}:START_TAG_STRONG:${"\uFFFD*12:1\uFFFD"}:START_BLOCK_IF: Relative ${"\uFFFD/*12:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*13:2\uFFFD"}:START_BLOCK_ELSE_IF: Actual ${"\uFFFD/*13:2\uFFFD"}:CLOSE_BLOCK_ELSE_IF:${"\uFFFD*14:3\uFFFD"}:START_BLOCK_ELSE: ${"\uFFFD0:3\uFFFD"}:INTERPOLATION: ${"\uFFFD/*14:3\uFFFD"}:CLOSE_BLOCK_ELSE:${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:clock${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON:`;let ue;ue=$localize`Relative time`;let Fe;Fe=$localize`Actual time`;let Ce;Ce=$localize` Order by: ${"\uFFFD#3\uFFFD"}:START_TAG_STRONG:${"\uFFFD0\uFFFD"}:INTERPOLATION:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:arrows-down-up${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON:`;let Te;Te=$localize` ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let de;de=$localize`Externally managed`;let Ee;Ee=$localize`${"\uFFFD#14\uFFFD"}:START_TAG_SH_ICON:play-circle${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SH_ICON: Start `;let pe;pe=$localize` Edit in console ${"\uFFFD#17\uFFFD"}:START_TAG_SH_ICON:arrow-up-right${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SH_ICON:`;let ge;ge=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:arrows-left-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let w;w=$localize`{VAR_PLURAL, plural, =0 {No version yet} =1 {1 Version} other {{INTERPOLATION} Versions}}`,w=oC(w,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let Se;Se=$localize` ${w}:ICU@@6502601490918455200: `;let me;me=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:arrows-left-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let Oe;Oe=$localize`Last successful backup:`;let Ne;Ne=$localize`Duration:`;let Me;Me=$localize`Source:`;let Ie;Ie=$localize`Destination:`;let Pe;Pe=$localize`Next scheduled run:`;let De;De=$localize`Externally managed`;let fe;fe=$localize` No backups found ${"\uFFFD#2\uFFFD"}:START_TAG_BUTTON: Click to create one now ${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_BUTTON:`;let he;he=$localize` Backup ${"\uFFFD*4:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*4:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let $e;$e=$localize` Type ${"\uFFFD*7:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*7:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Re;Re=$localize` Last backup ${"\uFFFD*10:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*10:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let ye;ye=$localize` Next run ${"\uFFFD*13:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*13:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Ae;Ae=$localize` Duration ${"\uFFFD*16:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*16:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let xe;xe=$localize` Source ${"\uFFFD*19:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*19:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let He;He=$localize` Destination ${"\uFFFD*22:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*22:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Le;Le=$localize`Version`;let ke;ke=$localize`Actions`;let z;z=$localize`{VAR_PLURAL, plural, =0 {No versions} =1 {1 Version} other {{INTERPOLATION} Versions}}`,z=oC(z,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let Ge;Ge=$localize` ${z}:ICU@@3521773141017690117: `;let be;be=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:arrows-left-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let Be;Be=$localize`Loading backups...`;let V;V=$localize`${"\uFFFD*4:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:pause${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Pause ${"\uFFFD/*4:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*5:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:play${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Resume ${"\uFFFD/*5:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,V=oC(V);let ve;ve=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:skull${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Abort `;let Je;Je=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:stop${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Stop `;let Xe;Xe=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:play-circle${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD*3:1\uFFFD"}:START_BLOCK_IF: Start ${"\uFFFD/*3:1\uFFFD"}:CLOSE_BLOCK_IF:`;let we;we=$localize`${"\uFFFD#14\uFFFD"}:START_TAG_SH_ICON:clock-counter-clockwise${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SH_ICON: Restore `;let ze;ze=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SH_ICON:export${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SH_ICON: Export `;let Ve;Ve=$localize`${"\uFFFD#20\uFFFD"}:START_TAG_SH_ICON:x-circle${"\uFFFD/#20\uFFFD"}:CLOSE_TAG_SH_ICON: Delete `;let Ue;Ue=$localize`Advanced`;let Ke;Ke=$localize`${"\uFFFD#26\uFFFD"}:START_TAG_SH_ICON:database${"\uFFFD/#26\uFFFD"}:CLOSE_TAG_SH_ICON: Database `;let je;je=$localize`${"\uFFFD#29\uFFFD"}:START_TAG_SH_ICON:check-square-offset${"\uFFFD/#29\uFFFD"}:CLOSE_TAG_SH_ICON: Verify files `;let We;We=$localize`${"\uFFFD#32\uFFFD"}:START_TAG_SH_ICON:terminal-window${"\uFFFD/#32\uFFFD"}:CLOSE_TAG_SH_ICON: Commandline `;let qe;qe=$localize`Reporting`;let Qe;Qe=$localize`${"\uFFFD#39\uFFFD"}:START_TAG_SH_ICON:notepad${"\uFFFD/#39\uFFFD"}:CLOSE_TAG_SH_ICON: Log `;let Ye;Ye=$localize`Cleanup`;let Ze;Ze=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:trash${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Delete versions `;let en;return en=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:file-x${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Purge broken files `,[["actions",""],["sortIcons",""],t,n,_,c,C,y,X,re,ce,se,ue,Fe,Ce,Te,de,Ee,pe,ge,Se,me,Oe,Ne,Me,Ie,Pe,De,fe,he,$e,Re,ye,Ae,xe,He,Le,ke,Ge,be,Be,V,ve,Je,Xe,we,ze,Ve,Ue,Ke,je,We,qe,Qe,Ye,Ze,en,[1,"type-a","actionable",3,"keydown.enter","keydown.space","routerLink"],["src","assets/images/backup.png","alt","","width","48px"],[1,"text"],["type","button","tabindex","-1","shButton",""],["src","assets/images/restore.png","alt","","width","48px"],[1,"content"],[1,"actions"],[1,"small","type-b",3,"valueChange","value"],["value","list"],["value","details"],[1,"table-overview"],["type","button","shButton","",1,"small"],["menu",""],["type","button",3,"click"],["type","button",3,"active"],[1,"backups",3,"fallback"],[1,"type-b",3,"data","loading","sortByColumn"],[1,"backups"],[1,"no-backups"],[1,"backup","externaly-managed"],[1,"backup"],[1,"simple","accent",3,"shTooltip"],["alt","",1,"provider-icon",3,"src"],[1,"tags"],[1,"simple","primary"],["shButton","",3,"click"],["type","button","shButton","",3,"click"],[3,"backupId"],[1,"simple","success"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["shButton","",1,"primary","raised",3,"routerLink"],[1,"type-b",3,"sortByColumnChange","data","loading","sortByColumn"],["thead",""],["shSort","name"],[4,"ngTemplateOutlet"],["shSort","type"],["shSort","lastrun"],["shSort","nextrun"],["shSort","duration"],["shSort","sourcesize"],["shSort","destinationsize"],[1,"small","accent",3,"shTooltip"],[1,"small"],[1,"loading-list"],[1,"indeterminate","primary"],["shButton","",3,"small"],["type","button","shButton","",3,"shTooltip","disabled"],["type","button","shButton","",3,"routerLink"],["type","button","shButton","",3,"loading","success"],["title",""],["type","button",3,"routerLink"],["type","button","shButton",""],[1,"filter"],[1,"asc"],[1,"desc"]]},template:function(n,_){n&1&&(vg(0,"app-status-bar"),Qi(1,"section")(2,"header")(3,"sh-card",57),Vg("keydown.enter",function(C){return C.target.click()})("keydown.space",function(C){return C.target.click()}),vg(4,"img",58),Qi(5,"div",59)(6,"h3"),nC(7,2),$l(),Qi(8,"p"),nC(9,3),$l()(),Qi(10,"button",60),Lg(11,4),vg(12,"sh-icon"),Fg(),$l()(),Qi(13,"sh-card",57),Vg("keydown.enter",function(C){return C.target.click()})("keydown.space",function(C){return C.target.click()}),vg(14,"img",61),Qi(15,"div",59)(16,"h3"),nC(17,5),$l(),Qi(18,"p"),nC(19,6),$l()(),Qi(20,"button",60),Lg(21,7),vg(22,"sh-icon"),Fg(),$l()()(),Qi(23,"div",62)(24,"h2"),ql(25),nC(26,8),Gl(),aT(27,zn,22,3,"div",63),$l(),cg(28,Lt,2,1)(29,kt,5,0),oT(30,28,Dn,null,29),$l()(),ag(32,Zt,2,1,"ng-template",null,0,lb)(34,ei,6,0,"ng-template",null,1,lb)),n&2&&(CE(3),yg("routerLink",KC(4,fn)),CE(10),yg("routerLink",KC(5,hn)),CE(14),cT(_.backups().length>0?27:-1),CE(3),iT(!_.backupsLoading()));},dependencies:[_t$1,ee,f,v,N,c,ve,d,x,at$1],styles:["[_nghost-%COMP%]{display:block}h2[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:2rem 0}header[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;padding:0 2rem;gap:1rem}@media only screen and (max-width:768px){header[_ngcontent-%COMP%]{grid-template-columns:1fr}}sh-card[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem}sh-card[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:.25rem}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.content[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{padding:0 2rem}@media only screen and (max-width:768px){.content[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:.5rem}}sh-menu[_ngcontent-%COMP%]{color:red}.backups[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 2rem;gap:.5rem}.backups.fallback[_ngcontent-%COMP%]{justify-content:center;align-items:center;padding:4rem;border:1px solid var(--base-4);background:var(--base-2);border-radius:var(--shape-2);width:calc(100% - 4rem);margin:0 auto}.no-backups[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;align-items:center}.backup[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem;gap:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10)}@media only screen and (max-width:768px){.backup[_ngcontent-%COMP%]{flex-direction:column;align-items:flex-start}}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;width:100%;max-width:40%}@media only screen and (max-width:768px){.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{max-width:initial}}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{color:var(--base-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--base-12)}.backup[_ngcontent-%COMP%] .tags[_ngcontent-%COMP%]{display:flex;align-items:center;flex-direction:column;gap:.5rem}.provider-icon[_ngcontent-%COMP%]{width:1.25rem;height:1.25rem}.actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.sortable[_ngcontent-%COMP%]{-webkit-user-select:none;user-select:none}.sortable[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{margin-left:.5rem;font-size:1rem;justify-self:flex-end;display:none}.sortable[_ngcontent-%COMP%]:not(.sort-asc):not(.sort-desc) sh-icon.filter[_ngcontent-%COMP%]{display:block}.sortable.sort-asc[_ngcontent-%COMP%] sh-icon.asc[_ngcontent-%COMP%]{display:block;color:var(--base-12)}.sortable.sort-desc[_ngcontent-%COMP%] sh-icon.desc[_ngcontent-%COMP%]{display:block;color:var(--base-12)}.actionable[_ngcontent-%COMP%]{cursor:pointer}.actionable[_ngcontent-%COMP%]:after{transition:inset .1s linear}.actionable[_ngcontent-%COMP%]:hover{--card-shp: 0}"]})};var chunkXA5RWQQ5=/*#__PURE__*/Object.freeze({__proto__:null,APP_BASE_HREF:ce,BrowserPlatformLocation:y$1,CommonModule:Fi,DATE_PIPE_DEFAULT_OPTIONS:tn,DATE_PIPE_DEFAULT_TIMEZONE:en,DOCUMENT:Mr,DatePipe:ci,DecimalPipe:pi,FormStyle:A$1,FormatWidth:I,IMAGE_CONFIG:fv,IMAGE_LOADER:Je,JsonPipe:hi,Location:Ne$1,LocationStrategy:U,NgFor:Jt$1,NgForOf:Jt$1,NgForOfContext:Ce,NgIf:Kn$1,NgIfContext:ye,NgLocaleLocalization:qt$1,NgLocalization:Ee$1,NgPlural:Qt$1,NgSwitch:Ze,NgTemplateOutlet:ei$1,NumberFormatStyle:ne,NumberSymbol:m$1,PathLocationStrategy:de,PlatformLocation:g$1,PlatformNavigation:nn,Plural:j,TranslationWidth:d$1,WeekDay:Rt$1,formatCurrency:Zt$1,formatDate:Gt$1,formatNumber:Kt$1,formatPercent:Yt$1,getCurrencySymbol:zt$1,getLocaleDateFormat:q,getLocaleDateTimeFormat:Q$1,getLocaleDayNames:Bt$1,getLocaleDayPeriods:Pt$1,getLocaleEraNames:kt$1,getLocaleExtraDayPeriodRules:Ut$1,getLocaleExtraDayPeriods:jt$1,getLocaleId:Ot$1,getLocaleMonthNames:Nt$2,getLocaleNumberFormat:Fe,getLocaleNumberSymbol:M,getLocalePluralCase:xt$1,getLocaleTimeFormat:J,getNumberOfCurrencyDigits:Vt$1,isPlatformBrowser:Rr,isPlatformServer:Or,registerLocaleData:Tr,ɵDomAdapter:f$1,ɵPLATFORM_BROWSER_ID:wi,ɵPLATFORM_SERVER_ID:Ai,ɵgetDOM:s,ɵnormalizeQueryParams:L,ɵparseCookieValue:k$1,ɵsetRootDomAdapter:_});var chunkBEVA4HT2=/*#__PURE__*/Object.freeze({__proto__:null,ShipChip:D});var chunkQICO34G3=/*#__PURE__*/Object.freeze({__proto__:null,BackupProgressComponent:W});var chunkCORTKH64=/*#__PURE__*/Object.freeze({__proto__:null,DurationFormatPipe:c$1});var chunkCHQM3PCJ=/*#__PURE__*/Object.freeze({__proto__:null,BytesPipe:m$2});var chunkKDVMMWQR=/*#__PURE__*/Object.freeze({__proto__:null,RelativeTimePipe:m$3});export{le as default};
package/chunk-CUuyy9Er.js DELETED
@@ -1 +0,0 @@
1
- import {d}from'./chunk-BS8PXjJJ.js';import'./chunk-CZoVeRAG.js';import'./chunk-Cjb79u3p.js';import'./chunk-DJJ8GbYi.js';import {J}from'./chunk-DUYvFN8m.js';import'./chunk-BpRWdcC8.js';import {N as Ne,E as Ee}from'./chunk-ihUnHtR7.js';import'./chunk-Bb6BmVO4.js';import'./chunk-DmDqcC4A.js';import'./chunk-CAwTsBqQ.js';import'./chunk-B53Wj4F9.js';import {D}from'./chunk-BTgf5lfZ.js';import {T,ab as C,e as ee,ah as fe,a5 as g,G as Ge$1,N as Nt,ai as m,aj as l,H as qu,h as hw,v,d as N,aH as m$1,b2 as m$2,Q as Qi,n as nC,$ as $l,f as aT,V as Vg,j as vg,L as Lg,F as Fg,C as CE,i as cT,A as yg,l as vT,a1 as dT,p as cm,r as kd,k as iC,U as UC,O as Od,a2 as fT,x as am,s as CD,w as jC,y as _D,Y as Yg,aa as Ql,ar as Qp,aM as ob,au as jg,aR as sb,av as rC,aN as ab}from'./main-VVQP2YE7.js';import {f}from'./chunk-Bja52qI7.js';import {d as d$1}from'./chunk-B8uF0dom.js';import {F as Fe$1}from'./chunk-B9maI7Xa.js';import {B as Bn,Z as Ze,R as Rn,J as Jt}from'./chunk-BO2GlieG.js';import {a as at}from'./chunk-CKnRcyHZ.js';import {U}from'./chunk-DqIU7ViF.js';import'./chunk-Box6Lckh.js';var Oe=(n,t)=>t.BackupId;function Fe(n,t){n&1&&(Qi(0,"div",14),vg(1,"sh-progress-bar",20),Qi(2,"p"),nC(3,3),$l()());}function Pe(n,t){n&1&&(Qi(0,"div",15)(1,"p"),nC(2,4),$l()());}function Me(n,t){if(n&1){let e=vT();Qi(0,"sh-icon",33),Vg("click",function(){kd(e);let o=iC(3);return Od(o.searchTerm.set(""))}),jC(1,"x-circle"),$l();}}function he(n,t){if(n&1){let e=vT();Qi(0,"div",27)(1,"sh-form-field")(2,"input",28),cm("ngModelChange",function(o){kd(e);let c=iC(2);return UC(c.searchTerm,o)||(c.searchTerm=o),Od(o)}),$l(),CD(),Qi(3,"sh-icon",29),jC(4,"magnifying-glass"),$l(),aT(5,Me,2,0,"sh-icon",30),$l()(),Qi(6,"div",31)(7,"button",32),Vg("click",function(){kd(e);let o=iC(2);return Od(o.selectAll())}),nC(8,6),$l(),Qi(9,"button",32),Vg("click",function(){kd(e);let o=iC(2);return Od(o.selectNone())}),nC(10,7),$l()();}if(n&2){let e=iC(2);CE(2),am("ngModel",e.searchTerm),_D(),CE(3),cT(e.searchTerm()?5:-1),CE(2),yg("disabled",e.allSelected()),CE(2),yg("disabled",e.noneSelected());}}function Le(n,t){if(n&1&&(Qi(0,"div"),nC(1,8),ob(2,"bytes"),$l()),n&2){let e=iC().$implicit;CE(2),jg(sb(2,1,e.Metadata?.SourceFilesSize)),rC(1);}}function ye(n,t){if(n&1&&(Qi(0,"div"),nC(1,9),ob(2,"bytes"),$l()),n&2){let e=iC().$implicit;CE(2),jg(sb(2,1,e.Metadata?.TargetFilesSize)),rC(1);}}function Ae(n,t){if(n&1&&(Qi(0,"div"),nC(1,10),ob(2,"relativeTime"),$l()),n&2){let e=iC().$implicit;CE(2),jg(ab(2,1,e.Metadata?.LastBackupFinished,false)),rC(1);}}function Re(n,t){if(n&1){let e=vT();Qi(0,"sh-card",34),Vg("click",function(){let o=kd(e).$implicit,c=iC(2);return Od(c.toggleSelected(o.BackupId))}),Qi(1,"sh-checkbox",35),cm("checkedChange",function(o){let c=kd(e).$implicit;return UC(c.Selected,o)||(c.Selected=o),Od(o)}),Qi(2,"h3"),jC(3),Qi(4,"sh-chip",36),vg(5,"img",37),jC(6),$l()()(),Qi(7,"div",38),aT(8,Le,3,3,"div"),aT(9,ye,3,3,"div"),aT(10,Ae,3,4,"div"),$l()();}if(n&2){let e=t.$implicit,i=iC(2);Yg("unmatched",e.Match===false),CE(),am("checked",e.Selected),CE(2),Ql(" ",e.Name," "),CE(2),yg("src",i.getBackendIcon(e.TargetURLDisplay),Qp),CE(),Ql(" ",i.getBackendType(e.TargetURLDisplay)," "),CE(2),cT(e.Metadata?.SourceFilesSize?8:-1),CE(),cT(e.Metadata?.TargetFilesSize?9:-1),CE(),cT(e.Metadata?.LastBackupFinished?10:-1);}}function Ge(n,t){if(n&1){let e=vT();Qi(0,"sh-toggle",26),cm("checkedChange",function(o){kd(e);let c=iC(2);return UC(c.saveNow,o)||(c.saveNow=o),Od(o)}),Lg(1,11),vg(2,"sh-icon",39),Fg(),$l();}if(n&2){let e=iC(2);yg("color","primary"),am("checked",e.saveNow),CE(2),yg("shTooltip","Save backups without editing the configuration");}}function De(n,t){n&1&&(Qi(0,"sh-toggle",25),Lg(1,12),vg(2,"sh-icon",39),Fg(),$l()),n&2&&(yg("color","primary")("checked",true)("disabled",true),CE(2),yg("shTooltip","Save now can only be disabled when importing a single backup"));}function ke(n,t){if(n&1){let e=vT();aT(0,he,11,4),Qi(1,"div",21),dT(2,Re,11,9,"sh-card",22,Oe),$l(),Qi(4,"div",23),aT(5,Ge,3,3,"sh-toggle",24)(6,De,3,4,"sh-toggle",25),Qi(7,"sh-toggle",26),cm("checkedChange",function(o){kd(e);let c=iC();return UC(c.importMetadata,o)||(c.importMetadata=o),Od(o)}),nC(8,5),$l()();}if(n&2){let e=iC();cT(e.configs().length>1?0:-1),CE(2),fT(e.configsSorted()),CE(3),cT(e.selectedItems().length<=1?5:6),CE(2),yg("color","primary"),am("checked",e.importMetadata);}}function $e(n,t){n&1&&nC(0,2,1);}function be(n,t){n&1&&nC(0,2,2);}var w=class n{#t=T(d);#n=T(C);#e=T(ee);#i=T(fe);#o=T(g);getBackendType=Ne;getBackendIcon=Ee;isLoading=Ge$1(true);isImporting=Ge$1(false);configs=Ge$1([]);saveNow=Ge$1(false);importMetadata=Ge$1(false);searchTerm=Ge$1("");allSelected=Nt(()=>this.selectedItems().length===this.configs().length);noneSelected=Nt(()=>this.selectedItems().length===0);configsSorted=Nt(()=>{let t=this.searchTerm().toLowerCase();return this.configs().map(e=>m(l({},e),{Match:t?e.Name?.toLowerCase().includes(t):null})).sort((e,i)=>(e.Name??"").localeCompare(i.Name??"")).sort((e,i)=>e.Match===i.Match?0:e.Match?-1:1)});ngOnInit(){let t=this.#t.temporaryBackupId();if(!t){this.#e.navigate(["/backup/import-destination/destination"]);return}this.#n.postApiV1BackupByIdRestoreTaskConfig({id:t}).pipe(qu(()=>this.isLoading.set(false))).subscribe({next:e=>{let i=e.sort((o,c)=>(o.Name??"").localeCompare(c.Name??"")).map(o=>m(l({},o),{Selected:e.length===1}));this.configs.set(i);},error:e=>{this.#t.showErrorDialog(e.message||"Failed to fetch configurations");}});}toggleSelected(t){this.configs.update(e=>e.map(i=>i.BackupId===t?m(l({},i),{Selected:!i.Selected}):i));}selectAll(){this.configs.update(t=>t.map(e=>m(l({},e),{Selected:true})));}selectNone(){this.configs.update(t=>t.map(e=>m(l({},e),{Selected:false})));}selectedItems=Nt(()=>this.configs().filter(t=>t.Selected));import(){let t=this.selectedItems();if(t.length===0)return;let e=this.importMetadata(),i=this.saveNow()||t.length!==1;this.isImporting.set(true);let o=c=>{if(c>=t.length){this.isImporting.set(false),this.#i.success($localize`Successfully imported ${t.length} backup(s)`),this.#e.navigate(["/"]);return}let N=t[c];this.#n.postApiV1BackupByIdImportfromtemp({requestBody:{BackupId:N.BackupId,ImportMetadata:e,Direct:i}}).subscribe({next:u=>{if(i)this.configs.update(I=>I.filter(G=>G.BackupId!==N.BackupId)),o(c+1);else {this.isImporting.set(false);let I=this.#o.addDraftBackup(u.data);this.#e.navigate(["/backup-draft",I]);}},error:u=>{this.isImporting.set(false),this.#t.showErrorDialog(`Failed to import ${N.Name}: ${u.message}`);}});};o(0);}back(){this.#e.navigate(["/backup/import-destination/encryption"]);}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=hw({type:n,selectors:[["app-import-destination-select-config"]],decls:14,vars:4,consts:()=>{let t;t=$localize`Select configurations to import`;let e;e=$localize`Back`;let i;i=$localize`${"\uFFFD*12:1\uFFFD"}:START_BLOCK_IF: Importing... ${"\uFFFD/*12:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*13:2\uFFFD"}:START_BLOCK_ELSE: Import selected ${"\uFFFD/*13:2\uFFFD"}:CLOSE_BLOCK_ELSE:`;let o;o=$localize`Fetching backup configurations from destination...`;let c;c=$localize`No backup configurations found at this destination.`;let N;N=$localize`Import metadata`;let u;u=$localize`Search for destination...`;let I;I=$localize`Select all`;let G;G=$localize`Select none`;let K;K=$localize` Source size: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let U;U=$localize` Target size: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let J;J=$localize` Last backup: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let X;X=$localize` Save now ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:info${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let z;return z=$localize` Save now ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON: info ${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`,[t,e,i,o,c,N,I,G,K,U,J,X,z,[1,"content-wrapper"],[1,"loading-state"],[1,"empty-state"],[1,"actions"],["shButton","",3,"click","disabled"],[1,"spacer"],["shButton","",1,"primary","raised",3,"click","disabled"],[1,"primary","indeterminate"],[1,"config-list"],[1,"type-a","actionable","full-width",3,"unmatched"],[1,"options"],[3,"color","checked"],[3,"color","checked","disabled"],[3,"checkedChange","color","checked"],[1,"search-area"],["type","text","placeholder",u,3,"ngModelChange","ngModel"],["prefix",""],["suffix","",1,"clear-search"],[1,"list-actions"],["shButton","",1,"small",3,"click","disabled"],["suffix","",1,"clear-search",3,"click"],[1,"type-a","actionable","full-width",3,"click"],[1,"primary","raised",3,"checkedChange","checked"],[1,"small","provider"],["alt","",1,"provider-icon",3,"src"],[1,"metadata"],[1,"small",3,"shTooltip"]]},template:function(e,i){e&1&&(Qi(0,"div",13)(1,"h2"),nC(2,0),$l(),aT(3,Fe,4,0,"div",14)(4,Pe,3,0,"div",15)(5,ke,9,4),Qi(6,"div",16)(7,"button",17),Vg("click",function(){return i.back()}),nC(8,1),$l(),vg(9,"div",18),Qi(10,"button",19),Vg("click",function(){return i.import()}),Lg(11,2),aT(12,$e,1,0)(13,be,1,0),Fg(),$l()()()),e&2&&(CE(3),cT(i.isLoading()?3:i.configs().length===0?4:5),CE(4),yg("disabled",i.isImporting()),CE(3),yg("disabled",i.isImporting()||i.selectedItems().length===0||i.isLoading()),CE(2),cT(i.isImporting()?12:13));},dependencies:[v,f,J,U,Bn,Ze,Rn,Jt,d$1,at,N,D,Fe$1,m$1,m$2],styles:["[_nghost-%COMP%]{display:block;padding:2rem;max-width:50rem;margin:0 auto}.loading-state[_ngcontent-%COMP%], .empty-state[_ngcontent-%COMP%]{text-align:center;padding:4rem 2rem}.loading-state[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .empty-state[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin-top:1rem;color:var(--color-on-surface-variant)}h2[_ngcontent-%COMP%]{margin-bottom:2rem}.search-area[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:1rem;margin-bottom:2rem}.list-actions[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:.5rem;margin-bottom:.5rem;justify-content:flex-end}.clear-search[_ngcontent-%COMP%]{opacity:.6;cursor:pointer}.config-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;margin-bottom:2rem}.config-list[_ngcontent-%COMP%] sh-card[_ngcontent-%COMP%]{padding:1rem;cursor:pointer;display:flex;flex-direction:column;gap:.5rem}.config-list[_ngcontent-%COMP%] sh-card.unmatched[_ngcontent-%COMP%]{opacity:.4}.config-list[_ngcontent-%COMP%] sh-card[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:.5rem;flex-grow:1}.config-list[_ngcontent-%COMP%] sh-card[_ngcontent-%COMP%] .provider[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.config-list[_ngcontent-%COMP%] sh-card[_ngcontent-%COMP%] .metadata[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;margin-left:1.75rem}.provider-icon[_ngcontent-%COMP%]{width:1.25rem;height:1.25rem}.options[_ngcontent-%COMP%]{margin-bottom:2rem;display:flex;flex-direction:column;gap:1rem}.actions[_ngcontent-%COMP%]{display:flex;align-items:center;margin-top:2rem}.actions[_ngcontent-%COMP%] .spacer[_ngcontent-%COMP%]{flex:1}"]})};export{w as default};