@duplicati/ngclient 0.0.226 → 0.0.228

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 (205) hide show
  1. package/assets/sh-bold.woff2 +0 -0
  2. package/assets/sh.woff2 +0 -0
  3. package/assets/ship.css +2 -0
  4. package/chunk--rqB0ojD.js +2 -0
  5. package/chunk-5zEiKCqR.js +1 -0
  6. package/chunk-B-ryE8KW.js +2 -0
  7. package/chunk-B6nCQM-G.js +1 -0
  8. package/chunk-B6ugJDDx.js +1 -0
  9. package/chunk-B7PRtY7v.js +1 -0
  10. package/chunk-B88MJ6Up.js +1 -0
  11. package/chunk-BAbAUjHY.js +2 -0
  12. package/chunk-BCT9ajP9.js +1 -0
  13. package/chunk-BKLJMYh2.js +1 -0
  14. package/chunk-BMGXb3gX.js +1 -0
  15. package/chunk-BNf0YAwH.js +2 -0
  16. package/chunk-BOII3Fdm.js +1 -0
  17. package/chunk-BPpheyQK.js +2 -0
  18. package/chunk-BS8yAz3P.js +2 -0
  19. package/chunk-BUF3tczf.js +14 -0
  20. package/chunk-BYoKu9PJ.js +1 -0
  21. package/chunk-BaWD8G-f.js +1 -0
  22. package/chunk-BeAI10wv.js +1 -0
  23. package/chunk-BffC_BAn.js +2 -0
  24. package/chunk-BjNuU0J_.js +2 -0
  25. package/chunk-BlIcwFlf.js +1 -0
  26. package/chunk-BqjWEFHw.js +1 -0
  27. package/chunk-BthLY9tf.js +1 -0
  28. package/chunk-BuyCr2eD.js +1 -0
  29. package/chunk-BxxX98wy.js +2 -0
  30. package/chunk-Bzp0ULy_.js +61 -0
  31. package/chunk-C-G3pKB4.js +2 -0
  32. package/chunk-C08PrcBX.js +1 -0
  33. package/chunk-C4pJCbq-.js +1 -0
  34. package/chunk-CDRHCSvU.js +2 -0
  35. package/chunk-CJRbWZfg.js +2 -0
  36. package/chunk-CM11IMzh.js +1 -0
  37. package/chunk-CMs999gl.js +2 -0
  38. package/chunk-CU-RYihf.js +2 -0
  39. package/chunk-CUxvfCTH.js +2 -0
  40. package/chunk-Cc1_FUvV.js +1 -0
  41. package/chunk-CdZVal1F.js +2 -0
  42. package/chunk-CeFh90sX.js +1 -0
  43. package/chunk-ChwFViRh.js +1 -0
  44. package/chunk-ClHWI9-i.js +2 -0
  45. package/chunk-ClfSJEUJ.js +1 -0
  46. package/chunk-CnAb3OKU.js +1 -0
  47. package/chunk-CtLFpDTP.js +3 -0
  48. package/chunk-CuU6b3lp.js +2 -0
  49. package/chunk-Cw8vFX0e.js +1 -0
  50. package/chunk-CxPG-KgI.js +3 -0
  51. package/chunk-Cz4OqhOZ.js +1 -0
  52. package/chunk-D-epCTmE.js +1 -0
  53. package/chunk-D0t-kgLy.js +2 -0
  54. package/chunk-DNJQ-AbV.js +3 -0
  55. package/chunk-DNSvQk_3.js +2 -0
  56. package/chunk-DWwNINBJ.js +2 -0
  57. package/chunk-DddAUzMY.js +1 -0
  58. package/chunk-DnD9XTM4.js +2 -0
  59. package/chunk-Do6_xsGi.js +4 -0
  60. package/chunk-DofVJ9gn.js +1 -0
  61. package/chunk-Dt8gZPT-.js +2 -0
  62. package/chunk-DtQIjLqL.js +1 -0
  63. package/chunk-DuO9_dH0.js +1 -0
  64. package/chunk-G-I5c1Dk.js +2 -0
  65. package/chunk-IEVZ0UN6.js +1 -0
  66. package/chunk-M5tldLvJ.js +1 -0
  67. package/chunk-N7vpDAsp.js +2 -0
  68. package/chunk-PA5BGFyW.js +1 -0
  69. package/chunk-QlYDF-EM.js +1 -0
  70. package/chunk-SWsliUUy.js +4 -0
  71. package/chunk-SgcWXTYZ.js +2 -0
  72. package/chunk-XMwSOila.js +1 -0
  73. package/chunk-ZVDEaGd0.js +1 -0
  74. package/chunk-birClroL.js +2 -0
  75. package/chunk-bx0aDvCZ.js +2 -0
  76. package/chunk-g_QJ3SVt.js +2 -0
  77. package/chunk-r4LfAQnM.js +3 -0
  78. package/chunk-wycXedbJ.js +2 -0
  79. package/chunk-ySdaWJYB.js +2 -0
  80. package/chunk-ya_5JcKA.js +1 -0
  81. package/index.html +2 -2
  82. package/locale/messages.da.json +11 -20
  83. package/locale/messages.de.json +110 -85
  84. package/locale/messages.de_CH.json +86 -61
  85. package/locale/messages.de_DE.json +160 -92
  86. package/locale/messages.en.json +173 -63
  87. package/locale/messages.en_US.json +922 -0
  88. package/locale/messages.fr.json +86 -61
  89. package/locale/messages.fr_CA.json +160 -92
  90. package/locale/messages.fr_FR.json +160 -92
  91. package/locale/messages.it.json +91 -66
  92. package/locale/messages.it_IT.json +160 -92
  93. package/locale/messages.json +173 -63
  94. package/locale/messages.nl_BE.json +160 -92
  95. package/locale/messages.nl_NL.json +177 -111
  96. package/locale/messages.pl.json +22 -45
  97. package/locale/messages.zh-Hans.json +222 -85
  98. package/locale/messages.zh-Hant.json +222 -85
  99. package/locale/messages.zh.json +222 -85
  100. package/locale/messages.zh_CN.json +225 -88
  101. package/locale/messages.zh_HK.json +222 -85
  102. package/locale/messages.zh_TW.json +643 -19
  103. package/main-TZVLLK67.js +16 -0
  104. package/package.json +1 -1
  105. package/ship-ui-assets/mcp/components.json +4369 -2788
  106. package/styles-WQUFQGYX.css +1 -0
  107. package/chunk-2KD757N6.js +0 -1
  108. package/chunk-2YUSBRXY.js +0 -1
  109. package/chunk-3GE3OWQF.js +0 -1
  110. package/chunk-47XLDVIW.js +0 -1
  111. package/chunk-4V3AE4ZE.js +0 -1
  112. package/chunk-5IK3XXXK.js +0 -1
  113. package/chunk-66KSIF26.js +0 -1
  114. package/chunk-6A42WZTO.js +0 -1
  115. package/chunk-6GUEHKCO.js +0 -1
  116. package/chunk-6JZ257HD.js +0 -1
  117. package/chunk-6LQMQH6Z.js +0 -1
  118. package/chunk-6Q6SSTBK.js +0 -1
  119. package/chunk-6RZVYDJF.js +0 -1
  120. package/chunk-75ULGSKP.js +0 -1
  121. package/chunk-7CGTOI24.js +0 -1
  122. package/chunk-A2BMFFEA.js +0 -1
  123. package/chunk-A6LVKRWD.js +0 -1
  124. package/chunk-AOPTGCDG.js +0 -2
  125. package/chunk-AU25JBCN.js +0 -11
  126. package/chunk-B4QFOJXL.js +0 -1
  127. package/chunk-BPHX6VXP.js +0 -1
  128. package/chunk-CJKZ27FM.js +0 -1
  129. package/chunk-COEGVUM3.js +0 -1
  130. package/chunk-CQJRBQ6I.js +0 -1
  131. package/chunk-DCBSWJWZ.js +0 -1
  132. package/chunk-DHJS5K3Y.js +0 -1
  133. package/chunk-DPQTEDTG.js +0 -2
  134. package/chunk-EY7DOUFA.js +0 -1
  135. package/chunk-FUF6MJKB.js +0 -2
  136. package/chunk-FXUIGUFS.js +0 -1
  137. package/chunk-G4QGXDP5.js +0 -1
  138. package/chunk-GA3CAVSK.js +0 -2
  139. package/chunk-GDKT3FJR.js +0 -1
  140. package/chunk-GNKCBZMS.js +0 -1
  141. package/chunk-GO52XH3L.js +0 -1
  142. package/chunk-GULHHZTR.js +0 -1
  143. package/chunk-HDDAGHHE.js +0 -2
  144. package/chunk-HLHUPBCV.js +0 -1
  145. package/chunk-HPXIWKIK.js +0 -1
  146. package/chunk-HWOUAWOE.js +0 -1
  147. package/chunk-HX3OONES.js +0 -1
  148. package/chunk-I5OT6RKO.js +0 -2
  149. package/chunk-JSPDZRZU.js +0 -60
  150. package/chunk-JUESTFR6.js +0 -2
  151. package/chunk-K3VYMXQM.js +0 -1
  152. package/chunk-K5XGRFWJ.js +0 -4
  153. package/chunk-KKD7OSBL.js +0 -1
  154. package/chunk-KKUFO6NZ.js +0 -1
  155. package/chunk-KMESPAAQ.js +0 -1
  156. package/chunk-KYWUJWBQ.js +0 -1
  157. package/chunk-LNE7WQZG.js +0 -1
  158. package/chunk-LP2FIVE3.js +0 -1
  159. package/chunk-LP3KCTXP.js +0 -1
  160. package/chunk-LZIQCSZ3.js +0 -1
  161. package/chunk-M3QHK4UT.js +0 -1
  162. package/chunk-MIJNCB2V.js +0 -1
  163. package/chunk-MOOFSJSE.js +0 -3
  164. package/chunk-MWQHWJOA.js +0 -1
  165. package/chunk-MWY7XFWW.js +0 -1
  166. package/chunk-N2ZEWG3V.js +0 -1
  167. package/chunk-NDEZRDHS.js +0 -1
  168. package/chunk-NNSH2MIZ.js +0 -1
  169. package/chunk-ONQFM5B7.js +0 -1
  170. package/chunk-OVNIENWW.js +0 -2
  171. package/chunk-PEOYNJJM.js +0 -1
  172. package/chunk-PKSSAQHV.js +0 -1
  173. package/chunk-PNQ5BDQN.js +0 -1
  174. package/chunk-PSEMHKPR.js +0 -1
  175. package/chunk-QAEOCCMO.js +0 -1
  176. package/chunk-QMZVKUXI.js +0 -1
  177. package/chunk-QODXELJ3.js +0 -1
  178. package/chunk-R2U3UIJI.js +0 -1
  179. package/chunk-S5IJ4C5T.js +0 -1
  180. package/chunk-SCDXVGMX.js +0 -1
  181. package/chunk-SCFUXVU4.js +0 -1
  182. package/chunk-SKLSR5GH.js +0 -1
  183. package/chunk-SY6UK74R.js +0 -1
  184. package/chunk-TGVKMKNV.js +0 -1
  185. package/chunk-U2QRNQWA.js +0 -1
  186. package/chunk-UHSRAJTA.js +0 -1
  187. package/chunk-UK6C6RS4.js +0 -1
  188. package/chunk-ULC7YKKF.js +0 -1
  189. package/chunk-UZ2BD6RF.js +0 -2
  190. package/chunk-V2M5YF4E.js +0 -1
  191. package/chunk-V2UO7ES2.js +0 -1
  192. package/chunk-VCDNIRPY.js +0 -1
  193. package/chunk-VJ3733O4.js +0 -1
  194. package/chunk-W7PQYY25.js +0 -1
  195. package/chunk-XAYQR66G.js +0 -1
  196. package/chunk-XCS545S6.js +0 -1
  197. package/chunk-XJUQUKBN.js +0 -1
  198. package/chunk-XKDNDQVK.js +0 -1
  199. package/chunk-XWML36YQ.js +0 -1
  200. package/chunk-YF6JHIN5.js +0 -1
  201. package/chunk-YQ5IJ3RD.js +0 -1
  202. package/chunk-ZFV3MK5Y.js +0 -1
  203. package/chunk-ZUMHFNEV.js +0 -1
  204. package/main-RCWMFMBQ.js +0 -1
  205. package/styles-S2CJL4OY.css +0 -1
package/chunk-AU25JBCN.js DELETED
@@ -1,11 +0,0 @@
1
- import{a as kn,b as jt,c as Vn}from"./chunk-PNQ5BDQN.js";import{a as ke,b as wt,c as Gt,d as Un}from"./chunk-DCBSWJWZ.js";import{a as Mn,b as xn,c as Rn,d as Ln,e as Xe,g as Lt,h as bn,i as wn,j as bt,l as Gn,m as $n,n as vn}from"./chunk-OVNIENWW.js";import{b as On}from"./chunk-3GE3OWQF.js";import{a as Rt}from"./chunk-S5IJ4C5T.js";import{a as Ht,b as Ue,c as Pn}from"./chunk-2KD757N6.js";import{a as ae}from"./chunk-PEOYNJJM.js";import{a as Ce}from"./chunk-MWQHWJOA.js";import{B as q,C as yn,E as At,F as An,H as ue,K as Ye,L as It,O as Pt,P as $e,V as Ot,W as ve,Y as Mt,a as En,b as hn,c as Y,d as St,e as Z,f as ft,h as Nn,i as ne,j as Et,k as ht,n as Fn,o as Dn,p as Nt,q as Ft,r as Dt,s as ie,t as Qe,v as ee,w as yt,z as Ge}from"./chunk-CJKZ27FM.js";import{c as In,d as xt}from"./chunk-4V3AE4ZE.js";import{b as qe,d as we,e as fn}from"./chunk-CQJRBQ6I.js";import{aa as Sn}from"./chunk-YF6JHIN5.js";import{$ as M,$c as Le,Ac as Tn,B as cn,Bb as fe,Bc as Ie,Cb as Ee,Cc as se,Db as u,Dc as me,Eb as l,Ec as Tt,F as un,Fb as r,G as Be,Gb as O,Kb as pe,Kc as Je,Lb as de,M as ct,Mb as re,Nb as I,O as pn,P as mn,Q as ut,Qa as pt,R as gn,Rc as P,Ta as _,Ub as x,Vb as R,W as De,Wb as D,Wc as Fe,Xc as w,Ya as mt,Yc as Pe,Zb as Ke,_b as T,a as sn,ac as s,bc as je,cc as he,ea as S,f as dt,fa as f,hb as K,hc as ye,ia as He,ic as Ae,jc as te,kc as Ct,l as Ve,lc as Ne,mb as H,oc as p,pb as Cn,pc as Wt,q as ot,qa as h,qc as V,rc as at,sa as j,tc as v,uc as $,vc as U,w as _n,wb as gt,wc as ce,xb as g,xc as Q,y as dn,yb as C,yc as E,zb as Se}from"./chunk-K5XGRFWJ.js";import{a as W,b as le}from"./chunk-7CGTOI24.js";var $t=class i{fromString(t){if(!t)return null;let e=t.match(/(\d+)([smhDWMY])/);return e&&{value:parseInt(e[1]),unit:e[2]}}toString(t,e){return`${t}${e}`}static \u0275fac=function(e){return new(e||i)};static \u0275prov=De({token:i,factory:i.\u0275fac,providedIn:"root"})};function lt(i){if(Cn(i))return i();if(Array.isArray(i))return i.map(t=>lt(t));if(typeof i=="object"&&i!==null){let t={};for(let e in i)i.hasOwnProperty(e)&&(t[e]=lt(i[e]));return t}return i}var Wn=i=>i;function Bn(i,t){let e=mn(i,Wn,t?.equal),n=e[sn],o=e;return o.set=a=>{let d=e();return ut(n,a),()=>{ut(n,d)}},o.update=a=>{let d=e();return gn(n,a),()=>{ut(n,d)}},e}var Ze=class i{#e=M(In);isSaving=h(!1);resourceDestinations=Pn({stream:()=>this.#e.getApiV2ConnectionStrings()});destinations=Bn(()=>{let t=this.resourceDestinations.value()?.Data;return t||[]});save(t,e){return this.isSaving.set(!0),e.Description="",(t==="new"?this.#e.postApiV2ConnectionStrings({requestBody:e}):this.#e.putApiV2ConnectionStringById({id:t.ID,requestBody:e})).pipe(Be(()=>{this.isSaving.set(!1)}))}getById(t){return this.#e.getApiV2ConnectionStringById({id:t})}delete(t){return this.#e.deleteApiV2ConnectionStringById({id:t})}reload(){this.resourceDestinations.reload()}updateBackups(t,e){return this.#e.postApiV2ConnectionStringByIdUpdateBackups({id:t,requestBody:{BackupIDs:e}})}static \u0275fac=function(e){return new(e||i)};static \u0275prov=De({token:i,factory:i.\u0275fac,providedIn:"root"})};function Hn(i,t){if(i&1){let e=I();l(0,"div",26)(1,"sh-form-field")(2,"label",27),D(3,7),r(),l(4,"input",28,0),U("ngModelChange",function(o){S(e);let a=s(2);return $(a.scheduleFields.nextTime.time,o)||(a.scheduleFields.nextTime.time=o),f(o)}),r(),l(6,"sh-icon",29),p(7,"clock"),r()(),l(8,"sh-datepicker-input",30)(9,"label",31),p(10,"\xA0"),r(),l(11,"input",32,1),U("ngModelChange",function(o){S(e);let a=s(2);return $(a.scheduleFields.nextTime.date,o)||(a.scheduleFields.nextTime.date=o),f(o)}),r(),l(13,"sh-icon",29),p(14,"calendar"),r()()(),l(15,"div",26)(16,"sh-form-field")(17,"label",33),D(18,8),r(),l(19,"input",34),U("ngModelChange",function(o){S(e);let a=s(2);return $(a.scheduleFields.runAgain.repeatValue,o)||(a.scheduleFields.runAgain.repeatValue=o),f(o)}),r()(),l(20,"sh-select",35)(21,"input",36),U("ngModelChange",function(o){S(e);let a=s(2);return $(a.scheduleFields.runAgain.repeatUnit,o)||(a.scheduleFields.runAgain.repeatUnit=o),f(o)}),r()()(),l(22,"sh-toggle-card",37),pe(23,38),D(24,9),de(),l(25,"div",39)(26,"sh-toggle",24),x(27,10),l(28,"input",25),U("ngModelChange",function(o){S(e);let a=s(2);return $(a.scheduleFields.runAgain.allowedDays.mon,o)||(a.scheduleFields.runAgain.allowedDays.mon=o),f(o)}),r(),R(),r(),l(29,"sh-toggle",24),x(30,11),l(31,"input",25),U("ngModelChange",function(o){S(e);let a=s(2);return $(a.scheduleFields.runAgain.allowedDays.tue,o)||(a.scheduleFields.runAgain.allowedDays.tue=o),f(o)}),r(),R(),r(),l(32,"sh-toggle",24),x(33,12),l(34,"input",25),U("ngModelChange",function(o){S(e);let a=s(2);return $(a.scheduleFields.runAgain.allowedDays.wed,o)||(a.scheduleFields.runAgain.allowedDays.wed=o),f(o)}),r(),R(),r(),l(35,"sh-toggle",24),x(36,13),l(37,"input",25),U("ngModelChange",function(o){S(e);let a=s(2);return $(a.scheduleFields.runAgain.allowedDays.thu,o)||(a.scheduleFields.runAgain.allowedDays.thu=o),f(o)}),r(),R(),r(),l(38,"sh-toggle",24),x(39,14),l(40,"input",25),U("ngModelChange",function(o){S(e);let a=s(2);return $(a.scheduleFields.runAgain.allowedDays.fri,o)||(a.scheduleFields.runAgain.allowedDays.fri=o),f(o)}),r(),R(),r(),l(41,"sh-toggle",24),x(42,15),l(43,"input",25),U("ngModelChange",function(o){S(e);let a=s(2);return $(a.scheduleFields.runAgain.allowedDays.sat,o)||(a.scheduleFields.runAgain.allowedDays.sat=o),f(o)}),r(),R(),r(),l(44,"sh-toggle",24),x(45,16),l(46,"input",25),U("ngModelChange",function(o){S(e);let a=s(2);return $(a.scheduleFields.runAgain.allowedDays.sun,o)||(a.scheduleFields.runAgain.allowedDays.sun=o),f(o)}),r(),R(),r()()()}if(i&2){let e=s(2);_(4),v("ngModel",e.scheduleFields.nextTime.time),_(7),v("ngModel",e.scheduleFields.nextTime.date),_(8),v("ngModel",e.scheduleFields.runAgain.repeatValue),_(),u("options",e.unitOptions)("isClearable",!1),_(),v("ngModel",e.scheduleFields.runAgain.repeatUnit),_(),u("disableToggle",!0),_(6),v("ngModel",e.scheduleFields.runAgain.allowedDays.mon),_(3),v("ngModel",e.scheduleFields.runAgain.allowedDays.tue),_(3),v("ngModel",e.scheduleFields.runAgain.allowedDays.wed),_(3),v("ngModel",e.scheduleFields.runAgain.allowedDays.thu),_(3),v("ngModel",e.scheduleFields.runAgain.allowedDays.fri),_(3),v("ngModel",e.scheduleFields.runAgain.allowedDays.sat),_(3),v("ngModel",e.scheduleFields.runAgain.allowedDays.sun)}}function jn(i,t){if(i&1){let e=I();l(0,"div",23)(1,"sh-toggle",24),x(2,5),l(3,"input",25),U("ngModelChange",function(o){S(e);let a=s();return $(a.scheduleFields.autoRun,o)||(a.scheduleFields.autoRun=o),f(o)}),r(),R(),r(),l(4,"p"),D(5,6),r()(),g(6,Hn,47,14)}if(i&2){let e=s();_(3),v("ngModel",e.scheduleFields.autoRun),_(3),C(e.scheduleFields.autoRun()?6:-1)}}var qn=[{key:"s",label:$localize`Seconds`},{key:"m",label:$localize`Minutes`},{key:"h",label:$localize`Hours`},{key:"D",label:$localize`Days`},{key:"W",label:$localize`Weeks`},{key:"M",label:$localize`Months`},{key:"Y",label:$localize`Years`}],vt=[{key:$localize`Daily 13:00`,value:"daily",data:{autoRun:!0,nextTime:{time:"13:00:00",date:new Date().toISOString().split("T")[0]},runAgain:{repeatValue:1,repeatUnit:"D",allowedDays:{mon:!0,tue:!0,wed:!0,thu:!0,fri:!0,sat:!0,sun:!0}}}},{key:$localize`Weekdays 13:00`,value:"weekdays",data:{autoRun:!0,nextTime:{time:"13:00:00",date:new Date().toISOString().split("T")[0]},runAgain:{repeatValue:1,repeatUnit:"D",allowedDays:{mon:!0,tue:!0,wed:!0,thu:!0,fri:!0,sat:!1,sun:!1}}}},{key:$localize`Weekly monday 13:00`,value:"weekly",data:{autoRun:!0,nextTime:{time:"13:00:00",date:Qn().toISOString().split("T")[0]},runAgain:{repeatValue:1,repeatUnit:"W",allowedDays:{mon:!0,tue:!1,wed:!1,thu:!1,fri:!1,sat:!1,sun:!1}}}},{key:$localize`Don't run automatically`,value:"disabled",data:{autoRun:!1,nextTime:{time:"13:00:00",date:new Date().toISOString().split("T")[0]},runAgain:{repeatValue:1,repeatUnit:"D",allowedDays:{mon:!0,tue:!0,wed:!0,thu:!0,fri:!0,sat:!0,sun:!0}}}},{key:$localize`Custom`,value:"custom",data:{autoRun:!0,nextTime:{time:"13:00:00",date:new Date().toISOString().split("T")[0]},runAgain:{repeatValue:1,repeatUnit:"D",allowedDays:{mon:!0,tue:!0,wed:!0,thu:!0,fri:!0,sat:!0,sun:!0}}}}];function Kn(i){if(!i.autoRun)return null;let t=[i.runAgain.allowedDays.mon?"Monday":null,i.runAgain.allowedDays.tue?"Tuesday":null,i.runAgain.allowedDays.wed?"Wednesday":null,i.runAgain.allowedDays.thu?"Thursday":null,i.runAgain.allowedDays.fri?"Friday":null,i.runAgain.allowedDays.sat?"Saturday":null,i.runAgain.allowedDays.sun?"Sunday":null].filter(d=>d!==null),e=i.nextTime.time.split(":"),n=new Date(i.nextTime.date);n.setHours(parseInt(e[0])),n.setMinutes(parseInt(e[1]));let o=i.runAgain.repeatValue,a=i.runAgain.repeatUnit;return{Time:n.toISOString(),Repeat:`${o}${a}`,AllowedDays:t}}function Qn(){let i=new Date,t=i.getDay(),e=t===1?7:(8-t)%7;return i.setDate(i.getDate()+e),i.setHours(12,0,0,0),i}var Qt=()=>({autoRun:h(!0),nextTime:{time:h("13:00"),date:h(new Date().toISOString().split("T")[0])},runAgain:{repeatValue:h(1),repeatUnit:h("D"),allowedDays:{mon:h(!0),tue:h(!0),wed:h(!0),thu:h(!0),fri:h(!0),sat:h(!0),sun:h(!0)}}}),qt=class i{#e=M(Oe);#t=M(we);#n=M(qe);unitOptions=qn;scheduleFields=this.#e.scheduleFields;scheduleType=this.#e.scheduleType;scheduleOptions=vt;updateScheduleType(t){let e=vt.find(n=>n.value===t);if(e&&e?.value!=="custom"){this.scheduleType.set(e.value);let n=e.data;this.scheduleFields.autoRun.set(n.autoRun??!1),this.scheduleFields.nextTime.time.set(n.nextTime?.time??"13:00"),this.scheduleFields.nextTime.date.set(n.nextTime?.date??new Date().toISOString().split("T")[0]),this.scheduleFields.runAgain.repeatValue.set(n.runAgain?.repeatValue??1),this.scheduleFields.runAgain.repeatUnit.set(n.runAgain?.repeatUnit??"D"),this.scheduleFields.runAgain.allowedDays.mon.set(n.runAgain?.allowedDays?.mon??!0),this.scheduleFields.runAgain.allowedDays.tue.set(n.runAgain?.allowedDays?.tue??!0),this.scheduleFields.runAgain.allowedDays.wed.set(n.runAgain?.allowedDays?.wed??!0),this.scheduleFields.runAgain.allowedDays.thu.set(n.runAgain?.allowedDays?.thu??!0),this.scheduleFields.runAgain.allowedDays.fri.set(n.runAgain?.allowedDays?.fri??!0),this.scheduleFields.runAgain.allowedDays.sat.set(n.runAgain?.allowedDays?.sat??!0),this.scheduleFields.runAgain.allowedDays.sun.set(n.runAgain?.allowedDays?.sun??!0)}else this.scheduleType.set("custom")}goBack(){this.#t.navigate(["source-data"],{relativeTo:this.#n.parent})}next(){this.#e.shouldAutoSave()&&this.#e.submit(!0),this.#t.navigate(["options"],{relativeTo:this.#n.parent})}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=K({type:i,selectors:[["app-schedule"]],decls:12,vars:4,consts:()=>{let t;t=$localize`Select an option...`;let e;e=$localize`Schedule`;let n;n=$localize`${"\uFFFD#8\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let o;o=$localize`${"\uFFFD#11\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let a;a=$localize` Automatically run backups ${"\uFFFD#3\uFFFD\uFFFD/#3\uFFFD"}:TAG_INPUT:`;let d;d=$localize`If a date was missed, the job will run as soon as possible.`;let c;c=$localize`Next time`;let m;m=$localize`Run again every`;let F;F=$localize`Allowed days`;let N;N=$localize` Monday ${"\uFFFD#28\uFFFD\uFFFD/#28\uFFFD"}:TAG_INPUT:`;let A;A=$localize` Tuesday ${"\uFFFD#31\uFFFD\uFFFD/#31\uFFFD"}:TAG_INPUT:`;let L;L=$localize` Wednesday ${"\uFFFD#34\uFFFD\uFFFD/#34\uFFFD"}:TAG_INPUT:`;let k;k=$localize` Thursday ${"\uFFFD#37\uFFFD\uFFFD/#37\uFFFD"}:TAG_INPUT:`;let y;y=$localize` Friday ${"\uFFFD#40\uFFFD\uFFFD/#40\uFFFD"}:TAG_INPUT:`;let J;J=$localize` Saturday ${"\uFFFD#43\uFFFD\uFFFD/#43\uFFFD"}:TAG_INPUT:`;let X;return X=$localize` Sunday ${"\uFFFD#46\uFFFD\uFFFD/#46\uFFFD"}:TAG_INPUT:`,[["timeRef",""],["dateRef",""],e,n,o,a,d,c,m,F,N,A,L,k,y,J,X,[1,"title-30"],["label","key","value","value",3,"isClearable","options"],["type","text","placeholder",t,3,"ngModelChange","ngModel"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","",1,"raised","primary",3,"click"],[1,"toggle-wrap"],[1,"raised","primary"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"row-inputs"],["for","time"],["type","time","id","time",3,"ngModelChange","ngModel"],["suffix",""],[1,"primary","sharp"],["for","date"],["type","text","id","date",3,"ngModelChange","ngModel"],["for","repeatValue"],["type","number","id","repeatValue",3,"ngModelChange","ngModel"],["value","key","label","label",3,"options","isClearable"],["type","text","id","repeatUnit",3,"ngModelChange","ngModel"],[3,"disableToggle"],["title",""],[1,"days-wrap"]]},template:function(e,n){e&1&&(l(0,"h3",17),D(1,2),r(),l(2,"sh-select",18)(3,"input",19),T("ngModelChange",function(a){return n.updateScheduleType(a)}),r()(),g(4,jn,7,2),l(5,"div",20)(6,"button",21),T("click",function(){return n.goBack()}),x(7,3),O(8,"sh-icon"),R(),r(),l(9,"button",22),T("click",function(){return n.next()}),x(10,4),O(11,"sh-icon"),R(),r()()),e&2&&(_(2),u("isClearable",!1)("options",n.scheduleOptions),_(),u("ngModel",n.scheduleType()),_(),C(n.scheduleType()==="custom"?4:-1))},dependencies:[ie,Y,ht,hn,Z,ne,ue,ve,ee,q,$e,Ot,An],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:40rem;padding:2.5rem 2.5rem 1.5rem;display:flex;flex-direction:column;gap:1.5rem}.toggle-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.days-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};var Yn=[[["","title",""]],[["","description",""]],[["","action",""]],"*"],Zn=["[title]","[description]","[action]","*"];function ei(i,t){i&1&&p(0,"Title")}function ti(i,t){i&1&&(l(0,"sh-icon"),p(1,"caret-down"),r())}var ze=class i{isActive=Le(!1);disableToggle=w(!1);ngOnInit(){this.disableToggle()&&this.isActive.set(!0)}toggle(){this.isActive.set(!this.isActive())}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=K({type:i,selectors:[["app-toggle-card"]],hostVars:2,hostBindings:function(e,n){e&2&&Ne("active",n.isActive())},inputs:{isActive:[1,"isActive"],disableToggle:[1,"disableToggle"]},outputs:{isActive:"isActiveChange"},ngContentSelectors:Zn,decls:11,vars:1,consts:[[1,"title"],[3,"click"],[1,"actions"],[1,"content"]],template:function(e,n){e&1&&(je(Yn),l(0,"header")(1,"div",0)(2,"h3",1),T("click",function(){return n.disableToggle()||n.toggle()}),he(3,0,null,ei,1,0),g(5,ti,2,0,"sh-icon"),r(),he(6,1),r(),l(7,"div",2),he(8,2),r()(),l(9,"div",3),he(10,3),r()),e&2&&(_(5),C(n.disableToggle()?-1:5))},dependencies:[ee],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;border-radius:var(--shape-3);background-color:var(--base-2)}.active[_nghost-%COMP%] .content[_ngcontent-%COMP%]{max-height:1000px;transition:max-height 1s linear;padding:0 1rem 1rem}.active[_nghost-%COMP%] sh-icon[_ngcontent-%COMP%]{transform:rotate(180deg)}[_nghost-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:.25rem;font:var(--paragraph-10);cursor:pointer;-webkit-user-select:none;user-select:none}[_nghost-%COMP%] sh-icon[_ngcontent-%COMP%]{transform:rotate(0);transform-origin:center;transition:transform .2s ease}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1rem}header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;flex:1 0}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]:empty{display:none}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;padding:0 1rem;overflow:hidden;max-height:0;transition:max-height .25s linear,padding .25s linear}.content[_ngcontent-%COMP%]:empty{display:none}"],changeDetection:0})};var ni=["textInput"];function ii(i,t){if(i&1){let e=I();l(0,"sh-select",3)(1,"input",7),U("ngModelChange",function(o){S(e);let a=s();return $(a.internalPath,o)||(a.internalPath=o),f(o)}),T("ngModelChange",function(){S(e);let o=s();return f(o.updateFilter())}),r()()}if(i&2){let e=s();u("options",e.fileGroupOptions())("isClearable",!1)("selectMultiple",!0),_(),v("ngModel",e.internalPath)}}function oi(i,t){if(i&1&&(l(0,"div",8),p(1),r()),i&2){let e,n=s(2);_(),Wt((e=n.currentExpressionOption())==null?null:e.startsWith)}}function ai(i,t){if(i&1&&(l(0,"div",9),p(1),r()),i&2){let e,n=s(2);_(),Wt((e=n.currentExpressionOption())==null?null:e.endsWith)}}function li(i,t){if(i&1){let e=I();l(0,"sh-form-field",4)(1,"input",7,0),U("ngModelChange",function(o){S(e);let a=s();return $(a.internalPath,o)||(a.internalPath=o),f(o)}),T("ngModelChange",function(){S(e);let o=s();return f(o.updateFilter())}),r(),g(3,oi,2,1,"div",8),g(4,ai,2,1,"div",9),r()}if(i&2){let e,n,o=s();_(),v("ngModel",o.internalPath),_(2),C(!((e=o.currentExpressionOption())==null||e.startsWith==null)&&e.startsWith.length?3:-1),_(),C(!((n=o.currentExpressionOption())==null||n.endsWith==null)&&n.endsWith.length?4:-1)}}var ri=[{key:"Applications",value:"Applications"},{key:"CacheFiles",value:"Cache Files"},{key:"TemporaryFiles",value:"Temporary Files"},{key:"OperatingSystem",value:"Operating System"},{key:"SystemFiles",value:"System Files"},{key:"DefaultExcludes",value:"Standard Excludes"}],si=[{key:"Excludes folders where name contains",value:"-FolderName"},{key:"Includes folders where name contains",value:"+FolderName"},{key:"Excludes folder",value:"-Folder"},{key:"Includes folder",value:"+Folder"},{key:"Excludes files where name contains",value:"-FileName"},{key:"Includes files where name contains",value:"+FileName"},{key:"Excludes file extension",value:"-Extension"},{key:"Include file extension",value:"+Extension"},{key:"Excludes files where name matches regex",value:"-Regex"},{key:"Includes files where name matches regex",value:"+Regex"},{key:"Exclude file groups",value:"-FileGroup"},{key:"Include file groups",value:"+FileGroup"},{key:"Includes expression",value:"+Expression"},{key:"Excludes expression",value:"-Expression"},{key:"None",value:"-Unknown"}],Ut=class i{#e=M(He);path=w.required();osType=w();isNew=w(!1);pathChange=Fe();remove=Fe();internalPath=h("");pathType=h("-Expression");textInput=Pe("textInput");currentExpressionOption=P(()=>{let t=this.pathType();return this.expressionOptions().find(e=>e.value===t)});fileGroupOptions=h(ri);expressionOptions=P(()=>{let e=this.osType()==="Windows"?"\\":"/";return si.map(n=>n.value==="-Folder"||n.value==="+Folder"?le(W({},n),{startsWith:"",endsWith:""}):n.value==="-FolderName"||n.value==="+FolderName"?le(W({},n),{startsWith:"*",endsWith:`*${e}`}):n.value==="-FileName"||n.value==="+FileName"?le(W({},n),{startsWith:"[.*",endsWith:`[^\\${e}]*]`}):n.value==="-FileGroup"||n.value==="+FileGroup"?le(W({},n),{startsWith:"{",endsWith:"}"}):n.value==="-Regex"||n.value==="+Regex"?le(W({},n),{startsWith:"[",endsWith:"]"}):n.value==="-Extension"||n.value==="+Extension"?le(W({},n),{startsWith:"*.",endsWith:""}):le(W({},n),{startsWith:"",endsWith:""}))});pathEffect=j(()=>{let t=this.path(),e=t.slice(1),n=t.startsWith("-")?"-":"+",o=this.osType()==="Windows",a=o?"\\":"/";e.startsWith("%")&&e.endsWith(a)||o&&e.slice(2).startsWith(a)&&e.endsWith(a)||e.startsWith(a)&&e.endsWith(a)?(this.pathType.set(`${n}Folder`),this.internalPath.set(e)):e.startsWith("*")&&e.endsWith(`*${a}`)?(this.pathType.set(`${n}FolderName`),this.internalPath.set(e.slice(1,-2))):e.startsWith("[.*")&&e.endsWith(`[^\\${a}]*]`)?(this.pathType.set(`${n}FileName`),this.internalPath.set(e.slice(3,-7))):e.startsWith("{")&&e.endsWith("}")?(this.pathType.set(`${n}FileGroup`),this.internalPath.set(e.slice(1,-1))):e.startsWith("[")&&e.endsWith("]")?(this.pathType.set(`${n}Regex`),this.internalPath.set(e.slice(1,-1))):e.startsWith("*.")?(this.pathType.set(`${n}Extension`),this.internalPath.set(e.slice(2))):(this.pathType.set(`${n}Expression`),this.internalPath.set(e)),this.isNew()&&mt(()=>{this.focusInput()},{injector:this.#e})});focusInput(){let t=this.textInput()?.nativeElement;t&&(t.focus(),t.select())}updateFilter(){let t=this.internalPath(),e=this.currentExpressionOption();t!==""&&(t==="*"&&(t=""),this.pathChange.emit(`${e?.value.slice(0,1)}${e?.startsWith??""}${t}${e?.endsWith??""}`))}removeFilter(){this.remove.emit()}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=K({type:i,selectors:[["app-new-filter"]],viewQuery:function(e,n){e&1&&ye(n.textInput,ni,5),e&2&&Ae()},inputs:{path:[1,"path"],osType:[1,"osType"],isNew:[1,"isNew"]},outputs:{pathChange:"pathChange",remove:"remove"},decls:7,vars:4,consts:()=>{let t;return t=$localize`Select an option...`,[["textInput",""],["value","value","label","key",3,"options","isClearable"],["type","text","placeholder",t,3,"ngModelChange","ngModel"],["value","key","label","value",1,"expression-input",3,"options","isClearable","selectMultiple"],[1,"expression-input"],[1,"filter-removal",3,"click"],[1,"sh-primary"],["type","text",3,"ngModelChange","ngModel"],["boxPrefix",""],["boxSuffix",""]]},template:function(e,n){if(e&1&&(l(0,"sh-select",1)(1,"input",2),U("ngModelChange",function(a){return $(n.pathType,a)||(n.pathType=a),a}),T("ngModelChange",function(){return n.updateFilter()}),r()(),g(2,ii,2,4,"sh-select",3)(3,li,5,3,"sh-form-field",4),l(4,"div",5),T("click",function(){return n.removeFilter()}),l(5,"sh-icon",6),p(6,"x-circle"),r()()),e&2){let o;u("options",n.expressionOptions())("isClearable",!1),_(),v("ngModel",n.pathType),_(),C(((o=n.currentExpressionOption())==null?null:o.value)=="-FileGroup"||((o=n.currentExpressionOption())==null?null:o.value)=="+FileGroup"?2:3)}},dependencies:[ie,Y,Z,ne,$e,ue,ee],styles:["[_nghost-%COMP%]{display:grid;grid-template-columns:13.125rem 1fr 1.875rem;gap:.5rem;align-items:flex-end}.expression-input[_ngcontent-%COMP%]{--ff-suffix-bg: var(--base-2)}.filter-removal[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;justify-content:center;height:2.5rem;flex:0 0}"],changeDetection:0})};var _i=["filtersContainer"],di=()=>({updateOn:"blur",standalone:!0});function ci(i,t){if(i&1){let e=I();l(0,"button",15),T("click",function(){S(e);let o=s();return f(o.addFilter())}),x(1,3),O(2,"sh-icon"),R(),r()}}function ui(i,t){i&1&&D(0,2,1)}function pi(i,t){i&1&&D(0,2,2)}function mi(i,t){i&1&&(l(0,"p",13),D(1,4),r())}function gi(i,t){i&1&&(l(0,"p",13),D(1,5),r())}function Ci(i,t){if(i&1){let e=I();l(0,"sh-form-field")(1,"textarea",16),U("ngModelChange",function(o){S(e);let a=s();return $(a.bulkFilters,o)||(a.bulkFilters=o),f(o)}),T("ngModelChange",function(){S(e);let o=s();return f(o.saveBulkFilterEdit())}),r()()}if(i&2){let e=s();_(),v("ngModel",e.bulkFilters),u("ngModelOptions",Ie(2,di))}}function Ti(i,t){if(i&1){let e=I();l(0,"app-new-filter",18),T("pathChange",function(o){let a=S(e).$index,d=s(2);return f(d.updateFilterAt(o,a))})("remove",function(){let o=S(e).$index,a=s(2);return f(a.removeFilterAt(o))}),r()}if(i&2){let e=t.$implicit,n=t.$index,o=s(2);u("path",e)("osType",o.osType())("isNew",o.lastAddedIndex()===n)}}function Si(i,t){if(i&1&&(l(0,"div",14,0),fe(2,Ti,1,3,"app-new-filter",17,Se),r()),i&2){let e=s();_(2),Ee(e.filters())}}var kt=class i{#e=M(He);filters=Le.required();osType=w("");disableToggle=w(!0);bulkFilterEditMode=h(!1);bulkFilters=h("");lastAddedIndex=h(null);filtersContainer=Pe.required("filtersContainer");hasFilters=P(()=>this.filters().length>0);toggleBulkFilterEdit(){this.bulkFilterEditMode()?this.bulkFilterEditMode.set(!1):(this.bulkFilters.set(this.filters().join(`
2
- `)),this.bulkFilterEditMode.set(!0))}saveBulkFilterEdit(){let t=this.bulkFilters().split(`
3
- `).map(n=>n.trim()).filter(n=>n!==""&&(n.startsWith("-")||n.startsWith("+"))),e=[...new Set(t)];this.filters.set(e),this.bulkFilterEditMode.set(!1)}addFilter(){let t=this.filters(),e=t.length;this.filters.set([...t,"-*"]),this.lastAddedIndex.set(e),mt(()=>{this.scrollToFilter(e)},{injector:this.#e})}scrollToFilter(t){let e=this.filtersContainer()?.nativeElement;if(!e)return;let n=e.querySelectorAll("app-new-filter");n[t]&&n[t].scrollIntoView({behavior:"smooth",block:"nearest"})}updateFilterAt(t,e){let o=[...this.filters()];o[e]=t,this.filters.set(o),this.lastAddedIndex.set(null)}removeFilterAt(t){let n=this.filters().filter((o,a)=>a!==t);this.filters.set(n),this.lastAddedIndex.set(null)}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=K({type:i,selectors:[["app-filters"]],viewQuery:function(e,n){e&1&&ye(n.filtersContainer,_i,5),e&2&&Ae()},inputs:{filters:[1,"filters"],osType:[1,"osType"],disableToggle:[1,"disableToggle"]},outputs:{filters:"filtersChange"},decls:20,vars:5,consts:()=>{let t;t=$localize`Filters`;let e;e=$localize`${"\uFFFD#13\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD*14:1\uFFFD"}:START_BLOCK_IF: Edit contents as list ${"\uFFFD/*14:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*15:2\uFFFD"}:START_BLOCK_ELSE: Edit contents as text ${"\uFFFD/*15:2\uFFFD"}:CLOSE_BLOCK_ELSE:`;let n;n=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Add filter `;let o;o=$localize`Customize your filters.`;let a;return a=$localize`Edit filters as text, one per line.`,[["filtersContainer",""],t,e,n,o,a,[3,"disableToggle"],["title",""],[1,"spacer"],["type","button","shButton","",1,"small"],["shButton","","type","button",1,"small"],["menu",""],["shButton","","type","button",1,"small",3,"click"],["description",""],[1,"filters"],["type","button","shButton","",1,"small",3,"click"],["wrap","off","rows","10",1,"bulk-textarea",3,"ngModelChange","ngModel","ngModelOptions"],[3,"path","osType","isNew"],[3,"pathChange","remove","path","osType","isNew"]]},template:function(e,n){e&1&&(l(0,"app-toggle-card",6),pe(1,7),l(2,"span"),D(3,1),r(),O(4,"div",8),g(5,ci,3,0,"button",9),l(6,"sh-menu")(7,"button",10)(8,"sh-icon"),p(9,"dots-three-vertical"),r()(),pe(10,11),l(11,"button",12),T("click",function(){return n.toggleBulkFilterEdit()}),x(12,2),O(13,"sh-icon"),g(14,ui,1,0)(15,pi,1,0),R(),r(),de(),r(),de(),g(16,mi,2,0,"p",13)(17,gi,2,0,"p",13),g(18,Ci,2,3,"sh-form-field")(19,Si,4,0,"div",14),r()),e&2&&(u("disableToggle",n.disableToggle()),_(5),C(n.bulkFilterEditMode()?-1:5),_(9),C(n.bulkFilterEditMode()?14:15),_(2),C(n.bulkFilterEditMode()?17:16),_(2),C(n.bulkFilterEditMode()?18:19))},dependencies:[ie,Y,Z,ne,q,ee,Ye,ue,ze,Ut],styles:["[_nghost-%COMP%]{display:block}.spacer[_ngcontent-%COMP%]{flex:1}.bulk-textarea[_ngcontent-%COMP%]{width:100%;font-family:monospace;min-height:12.5rem}.filters[_ngcontent-%COMP%]{max-height:200px;overflow-y:auto;display:flex;flex-direction:column;gap:.5rem}"],changeDetection:0})};var rt=class i{data=w();closed=Fe();path=h("");isValid=P(()=>this.path().length>0);dataEffect=j(()=>{let t=this.data();t?.initialPath&&this.path.set(t.initialPath)});submit(){this.closed.emit(this.path()||null)}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=K({type:i,selectors:[["app-target-disk-dialog"]],inputs:{data:[1,"data"]},outputs:{closed:"closed"},decls:11,vars:4,consts:()=>{let t;t=$localize`Path`;let e;e=$localize`Full disk source`;let n;n=$localize`Cancel`;let o;return o=$localize` Use this disk `,[e,n,o,[1,"title-30"],["content",""],[3,"customRemoteMode","destinationUrl"],["type","text","id","path","tabindex","4","placeholder",t,3,"ngModelChange","ngModel"],["footer","",1,"sticky"],["shButton","","type","button",3,"click"],["shButton","","type","button",1,"raised","primary",3,"click","disabled"]]},template:function(e,n){e&1&&(l(0,"header")(1,"h3",3),D(2,0),r()(),l(3,"section",4)(4,"app-file-tree",5)(5,"input",6),U("ngModelChange",function(a){return $(n.path,a)||(n.path=a),a}),r()()(),l(6,"footer",7)(7,"button",8),T("click",function(){return n.closed.emit(null)}),D(8,1),r(),l(9,"button",9),T("click",function(){return n.submit()}),D(10,2),r()()),e&2&&(_(4),u("customRemoteMode","diskimage")("destinationUrl","diskimage://"),_(),v("ngModel",n.path),_(4),u("disabled",!n.isValid()))},dependencies:[q,ke,ie,Y,Z,ne],styles:["[_nghost-%COMP%]{--dialog-p: 1.5rem;display:flex;flex-direction:column;gap:1rem}header[_ngcontent-%COMP%]{display:flex;padding:1.5rem 1.5rem 0}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}footer[_ngcontent-%COMP%]{z-index:1}"],changeDetection:0})};var fi=[[["","displayName",""]],[["","description",""]],"*"],Ei=["[displayName]","[description]","*"];function hi(i,t){if(i&1&&p(0),i&2){s(2);let e=E(1);V(" ",e.Name," ")}}function Ni(i,t){if(i&1&&p(0),i&2){s(2);let e=E(0);V(" ",e.displayName," ")}}function Fi(i,t){i&1&&(l(0,"sh-chip",6),p(1,"Untested"),r())}function Di(i,t){i&1&&(l(0,"sh-chip",6),p(1,"Special"),r())}function yi(i,t){i&1&&(l(0,"sh-chip",7),p(1,"Deprecated"),r())}function Ai(i,t){if(i&1&&p(0),i&2){s();let e=E(16);V(" ",e," ")}}function Ii(i,t){if(i&1&&p(0),i&2){s(2);let e=E(0);V(" ",e.description," ")}}function Pi(i,t){if(i&1&&(l(0,"sh-card",0)(1,"div",1),O(2,"img",2),r(),l(3,"div",3)(4,"div",4),he(5),r(),l(6,"div",5),g(7,hi,1,1)(8,Ni,1,1),g(9,Fi,2,0,"sh-chip",6)(10,Di,2,0,"sh-chip",6)(11,yi,2,0,"sh-chip",7),r()(),l(12,"div",8)(13,"div",4),he(14,1),r(),l(15,"div",5),ce(16),g(17,Ai,1,1)(18,Ii,1,1),r()(),l(19,"div",9),he(20,2),r()()),i&2){let e=s(),n=E(0),o=E(1);u("variant",e.variant()),_(2),u("src",n.icon,pt),gt("alt",n.displayName),_(5),C(o&&o.Name?7:8),_(2),C((n.sortOrder??0)==-3?9:(n.sortOrder??0)==-2?10:(n.sortOrder??0)<0?11:-1),_(7);let a=Q(e.getSimplePath(o==null?null:o.BaseUrl));_(),C(a&&a.length>0?17:18)}}var et=class i{destination=w();targetUrl=w();variant=w("type-b");connectionStringId=w();#e=M(Ze);connectionString=P(()=>{let t=this.connectionStringId();return t==null?null:this.#e.destinations().find(e=>e.ID===t)});selectedDestinationType=P(()=>{let t=this.targetUrl();return t?Xe(t)??null:null});destinationFromTargetUrl=P(()=>{let t=this.selectedDestinationType();return t?{key:t.customKey??t.key,customKey:t.customKey??null,displayName:t.displayName,description:t.description,icon:t.icon}:null});destinationItem=P(()=>{let t=this.destination(),e=this.destinationFromTargetUrl();return t||e||null});getSimplePath(t){return t?xn(t):""}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=K({type:i,selectors:[["app-destination-list-item"]],inputs:{destination:[1,"destination"],targetUrl:[1,"targetUrl"],variant:[1,"variant"],connectionStringId:[1,"connectionStringId"]},ngContentSelectors:Ei,decls:3,vars:3,consts:[[3,"variant"],[1,"icon"],[3,"src"],[1,"name"],[1,"projected"],[1,"default"],[1,"small","simple","primary"],[1,"small","simple","warn"],[1,"description"],[1,"actions"]],template:function(e,n){if(e&1&&(je(fi),ce(0)(1),g(2,Pi,21,7,"sh-card",0)),e&2){let o=Q(n.destinationItem());_(),Q(n.connectionString()),_(),C(o?2:-1)}},dependencies:[yn,At],styles:['[_nghost-%COMP%]{display:block;border-radius:var(--shape-3)}[_nghost-%COMP%]:focus-visible{outline:2px solid var(--primary-8);outline-offset:2px}sh-card[_ngcontent-%COMP%]{display:grid;align-items:center;grid-template-columns:3rem 1fr auto;grid-template-areas:"icon name actions" "icon description actions";gap:.25rem 1rem}sh-card[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{grid-area:icon;display:flex;align-items:center;justify-content:center;width:3rem;height:3rem;border-radius:var(--shape-2)}sh-card[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{object-fit:contain;width:100%;border-radius:var(--shape-2);overflow:hidden}sh-card[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{grid-area:name;font:var(--paragraph-10)}sh-card[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] .projected[_ngcontent-%COMP%]:empty{display:none}sh-card[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] .projected[_ngcontent-%COMP%]:not(:empty) + .default[_ngcontent-%COMP%]{display:none}sh-card[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{grid-area:description;color:var(--base-8)}sh-card[_ngcontent-%COMP%] .description[_ngcontent-%COMP%] .projected[_ngcontent-%COMP%]:empty{display:none}sh-card[_ngcontent-%COMP%] .description[_ngcontent-%COMP%] .projected[_ngcontent-%COMP%]:not(:empty) + .default[_ngcontent-%COMP%]{display:none}sh-card[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{grid-area:actions;display:flex;align-items:center;gap:.5rem}'],changeDetection:0})};var tt=class i{#e=M(Ce);#t(t){return t.flatMap(e=>{if(!e?.Key)return null;let n=bn(e.Key);if(n.length<=1){let o=Lt(e.Key);return o.isDefaultEntry===!0?[le(W({},o),{displayName:e.DisplayName||o.displayName||e.Key,description:e.Description||o.description||""})]:o}else return n}).filter(e=>e!==null)}#n(t){return t.map(e=>({key:e.customKey??e.key,customKey:e.customKey??null,displayName:e.displayName,description:e.description,icon:e.icon,searchTerms:[e.displayName,e.description,e.key,e.searchTerms??"",e.customKey??""].join(" "),sortOrder:e.sortOrder??0}))}backendDestinationOptions=P(()=>{let t=this.#e.backendModules(),e=this.#t(t);return this.#n(e)});sourceProviderOptions=P(()=>{let t=this.#e.sourceProviderModules(),e=this.#t(t.length?t:this.#e.backendModules());return this.#n(e)});restoreDestinationOptions=P(()=>{let t=this.#e.restoreDestinationProviderModules(),e=this.#t(t.length?t:this.#e.backendModules());return this.#n(e)});destinationTypeOptions=this.backendDestinationOptions;allModules=P(()=>[...this.#e.backendModules(),...this.#e.sourceProviderModules(),...this.#e.restoreDestinationProviderModules()].reduce((t,e)=>(t.find(n=>n.Key===e.Key)||t.push(e),t),[]));static \u0275fac=function(e){return new(e||i)};static \u0275prov=De({token:i,factory:i.\u0275fac,providedIn:"root"})};function Oi(i,t){if(i&1){let e=I();l(0,"app-destination-list-item",7),T("click",function(){let o=S(e).$implicit,a=s();return f(a.setDestination.emit(o.customKey??o.key))})("keydown.enter",function(o){return o.target.click()})("keydown.space",function(o){return o.target.click()}),l(1,"button",8),x(2,1),O(3,"sh-icon"),R(),r()()}if(i&2){let e=t.$implicit;u("destination",e)}}var Vt=class i{#e=M(tt);#t=M(Ce);showAsSources=w(!1);moduleType=w("Backend");setDestination=Fe();destinationSearchTerm=h("");showAllDestinations=h(!1);destinationTypeOptions=P(()=>{switch(this.moduleType()){case"SourceProvider":return this.#e.sourceProviderOptions();case"RestoreDestinationProvider":return this.#e.restoreDestinationOptions();default:return this.#e.backendDestinationOptions()}});destinationTypeOptionsFocused=P(()=>{let t=this.#t.backendModules(),e=this.destinationTypeOptions().map(d=>{let c=t.find(m=>m.Key==d.key);return c&&(d=le(W({},d),{sortOrder:c.IsDeprecated?-1:c.IsUntested?-3:d.sortOrder})),d}),n=this.destinationSearchTerm().toLowerCase(),o=this.showAllDestinations(),a=[...e].sort((d,c)=>{let m=d.sortOrder??0,F=c.sortOrder??0;return m!==F?F-m:d.displayName.localeCompare(c.displayName)}).filter(d=>{if(o)return!0;let c=d.sortOrder??0;return c<0&&n?.length&&(d.key.toLocaleLowerCase()===n.toLocaleLowerCase()||d.customKey?.toLocaleLowerCase()===n.toLocaleLowerCase())?!0:c>=0});return n?a.filter(d=>d.searchTerms.toLowerCase().includes(n)):a});static \u0275fac=function(e){return new(e||i)};static \u0275cmp=K({type:i,selectors:[["app-destination-list"]],inputs:{showAsSources:[1,"showAsSources"],moduleType:[1,"moduleType"]},outputs:{setDestination:"setDestination"},decls:8,vars:2,consts:()=>{let t;t=$localize`Search for destination...`;let e;e=$localize`Show all`;let n;return n=$localize` Choose ${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SH_ICON:`,[e,n,[1,"search-area"],["type","text","placeholder",t,3,"ngModelChange","ngModel"],[1,"raised","primary",3,"checkedChange","checked"],[1,"list"],["tabindex","0",3,"destination"],["tabindex","0",3,"click","keydown.enter","keydown.space","destination"],["shButton","","tabindex","-1","type","button"]]},template:function(e,n){e&1&&(l(0,"div",2)(1,"sh-form-field")(2,"input",3),U("ngModelChange",function(a){return $(n.destinationSearchTerm,a)||(n.destinationSearchTerm=a),a}),r()(),l(3,"sh-toggle",4),U("checkedChange",function(a){return $(n.showAllDestinations,a)||(n.showAllDestinations=a),a}),D(4,0),r()(),l(5,"div",5),fe(6,Oi,4,1,"app-destination-list-item",6,Se),r()),e&2&&(_(2),v("ngModel",n.destinationSearchTerm),_(),v("checked",n.showAllDestinations),_(3),Ee(n.destinationTypeOptionsFocused()))},dependencies:[et,ie,Y,Z,ne,ue,q,ee,ve],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:1rem;height:100%;overflow:hidden;padding:.25rem;min-height:250px}.list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;height:100%;overflow:auto;padding:.25rem .375rem 1rem;width:calc(100% + .5rem);margin-left:-.375rem;border-bottom:.0625rem solid var(--base-4)}.search-area[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:1rem}"],changeDetection:0})};var Mi=["fileInput"],xi=[[["label"]]],Ri=["label"],Bt=class i{customId=w();content=h("");readonly=h(!1);placeholder=w($localize`Drop a file here or use the browse button`);fileInputRef=Pe("fileInput");onFileSelected(t){let e=t.target;e.files&&e.files.length>0&&this.readFile(e.files[0])}onFileDrop(t){t.preventDefault(),t.dataTransfer?.files&&t.dataTransfer.files.length>0&&this.readFile(t.dataTransfer.files[0])}onDragOver(t){t.preventDefault()}readFile(t){let e=new FileReader;e.onload=()=>{this.content.set(e.result)},e.readAsText(t)}triggerBrowse(){return this.fileInputRef()?.nativeElement.click(),!1}onChange=()=>{};onTouched=()=>{};onChangeEffect=j(()=>{this.onChange(this.content())});writeValue(t){this.content.set(t??"")}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.readonly.set(t)}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=K({type:i,selectors:[["app-file-drop-textarea"]],viewQuery:function(e,n){e&1&&ye(n.fileInputRef,Mi,5),e&2&&Ae()},inputs:{customId:[1,"customId"],placeholder:[1,"placeholder"]},features:[Tn([{provide:En,useExisting:i,multi:!0}])],ngContentSelectors:Ri,decls:9,vars:3,consts:[["fileInput",""],[1,"browse-btn"],["shButton","","type","button",1,"small","outlined",3,"click"],[1,"textarea-container","textarea-wrap",3,"drop","dragover"],["rows","10",3,"ngModelChange","placeholder","ngModel","disabled"],["type","file",1,"hidden",3,"change"]],template:function(e,n){if(e&1){let o=I();je(xi),he(0,0,["ngProjectAs","label",5,["label"]]),l(1,"div",1)(2,"button",2),T("click",function(){return n.triggerBrowse()}),l(3,"sh-icon"),p(4,"upload"),r()()(),l(5,"div",3),T("drop",function(d){return n.onFileDrop(d)})("dragover",function(d){return n.onDragOver(d)}),l(6,"textarea",4),U("ngModelChange",function(d){return S(o),$(n.content,d)||(n.content=d),f(d)}),r()(),l(7,"input",5,0),T("change",function(d){return n.onFileSelected(d)}),r()}e&2&&(_(6),u("placeholder",n.placeholder()),v("ngModel",n.content),u("disabled",n.readonly()))},dependencies:[ie,Y,Z,ne,ee,q],styles:['[_nghost-%COMP%]{display:grid;grid-template-areas:"label browsebtn" "input input";grid-template-columns:8fr 1fr;gap:.5rem;align-items:flex-end}[_nghost-%COMP%] .browse-btn[_ngcontent-%COMP%]{grid-area:browsebtn}[_nghost-%COMP%] .label[_ngcontent-%COMP%]{grid-area:label;grid-column:1/-1}[_nghost-%COMP%] .textarea-wrap[_ngcontent-%COMP%]{grid-area:input;width:100%;border:none;font:var(--code-20)}[_nghost-%COMP%] .textarea-wrap[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:100%;color:var(--base-8);background-color:var(--base-1);border:1px solid var(--base-4);border-radius:var(--shape-3);padding:.5rem;resize:vertical;box-shadow:var(--box-shadow-10)}[_nghost-%COMP%] .textarea-wrap[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%] .dark[_ngcontent-%COMP%]{background-color:var(--base-2)}[_nghost-%COMP%] .hidden[_ngcontent-%COMP%]{display:none}'],changeDetection:0})};var Kt=class i{data=w();closed=Fe();path=h("");destinationUrl=h("");backupId=h("");connectionStringId=h(null);isValid=P(()=>this.path().length>0);dataEffect=j(()=>{let t=this.data();t?.destinationUrl&&this.destinationUrl.set(t.destinationUrl),t?.backupId&&this.backupId.set(t.backupId),t?.connectionStringId&&this.connectionStringId.set(t.connectionStringId)});submit(){this.closed.emit(this.path()||null)}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=K({type:i,selectors:[["app-browse-path-dialog"]],inputs:{data:[1,"data"]},outputs:{closed:"closed"},decls:11,vars:8,consts:()=>{let t;t=$localize`Path`;let e;e=$localize`Select destination folder`;let n;n=$localize`Cancel`;let o;return o=$localize` Use this folder `,[e,n,o,[1,"title-30"],["content",""],[3,"customRemoteMode","backupId","destinationUrl","connectionStringId","onlySelectFolder","selectFiles"],["type","text","id","path","tabindex","4","placeholder",t,3,"ngModelChange","ngModel"],["footer","",1,"sticky"],["shButton","","type","button",3,"click"],["shButton","","type","button",1,"raised","primary",3,"click","disabled"]]},template:function(e,n){e&1&&(l(0,"header")(1,"h3",3),D(2,0),r()(),l(3,"section",4)(4,"app-file-tree",5)(5,"input",6),U("ngModelChange",function(a){return $(n.path,a)||(n.path=a),a}),r()()(),l(6,"footer",7)(7,"button",8),T("click",function(){return n.closed.emit(null)}),D(8,1),r(),l(9,"button",9),T("click",function(){return n.submit()}),D(10,2),r()()),e&2&&(_(4),u("customRemoteMode","backend")("backupId",n.backupId())("destinationUrl",n.destinationUrl())("connectionStringId",n.connectionStringId())("onlySelectFolder",!0)("selectFiles",!1),_(),v("ngModel",n.path),_(4),u("disabled",!n.isValid()))},dependencies:[q,ke,ie,Y,Z,ne],styles:["[_nghost-%COMP%]{--dialog-p: 1.5rem;display:flex;flex-direction:column;gap:1rem}header[_ngcontent-%COMP%]{display:flex;padding:1.5rem 1.5rem 0}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}footer[_ngcontent-%COMP%]{z-index:1}"],changeDetection:0})};var Li=(i,t,e,n)=>({index:i,fieldGroup:"custom",formView:t,destinationType:e,oauthField:n}),_e=i=>({$implicit:i}),bi=(i,t,e,n)=>({index:i,fieldGroup:"dynamic",formView:t,destinationType:e,oauthField:n}),wi=()=>({updateOn:"blur"}),Gi=(i,t,e,n)=>({index:i,formView:t,fieldGroup:"advanced",destinationType:e,oauthField:n}),Te=(i,t)=>({fieldGroup:i,formView:t}),$i=()=>["/connect/logon"];function vi(i,t){i&1&&re(0)}function Ui(i,t){if(i&1&&H(0,vi,1,0,"ng-container",25),i&2){let e=t.$implicit,n=t.$index;s();let o=te(15);s();let a=E(0),d=E(1);u("ngTemplateOutlet",o)("ngTemplateOutletContext",se(7,_e,Tt(2,Li,n,e,a,d.oauthField)))}}function ki(i,t){i&1&&re(0)}function Vi(i,t){if(i&1&&H(0,ki,1,0,"ng-container",25),i&2){let e=t.$implicit,n=t.$index;s();let o=te(15);s();let a=E(0),d=E(1);u("ngTemplateOutlet",o)("ngTemplateOutletContext",se(7,_e,Tt(2,bi,n,e,a,d.oauthField)))}}function Bi(i,t){if(i&1){let e=I();l(0,"button",26),T("click",function(){S(e);let o=s(2);return f(o.showTextArea.set(!1))}),x(1,8),O(2,"sh-icon"),R(),r()}}function Ki(i,t){if(i&1){let e=I();l(0,"button",33,2),T("click",function(){let o=S(e).$implicit,a=s(3);return f(a.addAdvancedOption(o))}),p(2),r()}if(i&2){let e=t.$implicit;_(2),V(" ",e.name," ")}}function Ji(i,t){if(i&1){let e=I();l(0,"div",23)(1,"sh-menu",27)(2,"button",28),x(3,9),O(4,"sh-icon"),R(),r(),pe(5,29),fe(6,Ki,3,1,"button",30,Se),de(),r(),l(8,"sh-menu")(9,"button",31)(10,"sh-icon"),p(11,"dots-three-vertical"),r()(),pe(12,29),l(13,"button",32),T("click",function(){S(e);let o=s(2);return f(o.showTextArea.set(!0))}),l(14,"sh-icon"),p(15,"link"),r(),p(16," Edit contents as text "),r(),de(),r()()}if(i&2){s();let e=E(9);_(),u("searchable",!0),_(),u("disabled",e.length===0),_(4),Ee(e)}}function Xi(i,t){if(i&1){let e=I();l(0,"textarea",34),T("ngModelChange",function(o){S(e);let a=s(2);return f(a.updateSettingsFromText(o))}),r()}if(i&2){let e=s(2);u("ngModel",e.settingsAsText())("ngModelOptions",Ie(2,wi))}}function zi(i,t){i&1&&re(0)}function Wi(i,t){if(i&1&&H(0,zi,1,0,"ng-container",25),i&2){let e=t.$implicit,n=t.$index;s(2);let o=te(15),a=s(),d=E(0),c=E(1),m=a.getFormView("advanced",e)??a.getDefaultFormView(e);u("ngTemplateOutlet",o)("ngTemplateOutletContext",se(7,_e,Tt(2,Gi,n,m,d,c.oauthField)))}}function Hi(i,t){if(i&1&&fe(0,Wi,1,9,"ng-container",null,Se),i&2){let e=s(2);Ee(e.advancedFormFieldNames())}}function ji(i,t){i&1&&(l(0,"sup",43),p(1,"*"),r())}function qi(i,t){if(i&1&&(l(0,"sh-icon",44),p(1,"question"),r()),i&2){let e=s(2).$implicit;u("shTooltip",e.formView.longDescription)}}function Qi(i,t){if(i&1){let e=I();l(0,"app-file-tree",36)(1,"label",42),g(2,ji,2,0,"sup",43),p(3),g(4,qi,2,1,"sh-icon",44),r(),l(5,"input",45),T("ngModelChange",function(o){S(e);let a=s().$implicit,d=s(2);return f(d.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r()()}if(i&2){let e=s().$implicit,n=E(1),o=E(2),a=E(3),d=E(4),c=E(5);u("startingPath",a)("accepts",e.formView.accepts)("showFiles",!0)("hideShortcuts",!1)("showHiddenNodes",!0)("selectFiles",!0)("resolvePaths",!0),_(),u("for",c),_(),C(e.formView.isMandatory&&d?2:-1),_(),V(" ",n," "),_(),C(e.formView.longDescription?4:-1),_(),u("id",c)("ngModel",o)}}function Yi(i,t){i&1&&(l(0,"sup",46),p(1,"*"),r())}function Zi(i,t){if(i&1&&(l(0,"sh-icon",44),p(1,"question"),r()),i&2){let e=s(2).$implicit;u("shTooltip",e.formView.longDescription)}}function eo(i,t){if(i&1){let e=I();l(0,"app-file-tree",37)(1,"label",42),g(2,Yi,2,0,"sup",46),p(3),g(4,Zi,2,1,"sh-icon",44),r(),l(5,"input",45),T("ngModelChange",function(o){S(e);let a=s().$implicit,d=s(2);return f(d.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r()()}if(i&2){let e=s().$implicit,n=E(1),o=E(2),a=E(3),d=E(4),c=E(5);u("hideShortcuts",!1)("enableCreateFolder",!0)("startingPath",a)("resolvePaths",!0),_(),u("for",c),_(),C(e.formView.isMandatory&&d?2:-1),_(),V(" ",n," "),_(),C(e.formView.longDescription?4:-1),_(),u("id",c)("ngModel",o)}}function to(i,t){i&1&&(l(0,"sup",47),p(1,"*"),r())}function no(i,t){if(i&1&&(l(0,"sh-icon",44),p(1,"question"),r()),i&2){let e=s(2).$implicit;u("shTooltip",e.formView.longDescription)}}function io(i,t){i&1&&(l(0,"sh-icon",48),p(1," warning "),r())}function oo(i,t){i&1&&re(0)}function ao(i,t){if(i&1&&(l(0,"sh-icon",53),p(1," link "),r()),i&2){s();let e=E(8),n=E(9);Ne("error",e&&n==="error")("warn",e&&n==="warning"),u("shTooltip",e)}}function lo(i,t){i&1&&(l(0,"sh-icon",51),p(1,"envelope"),r())}function ro(i,t){i&1&&(l(0,"sh-icon",51),p(1,"hard-drives"),r())}function so(i,t){i&1&&(l(0,"sh-icon",51),p(1,"jar"),r())}function _o(i,t){i&1&&(l(0,"sh-icon",51),p(1,"textbox"),r())}function co(i,t){if(i&1){let e=I();l(0,"button",54),T("click",function(o){S(e);let a=s(2).$implicit,d=s(2);return f(d.browse(a.fieldGroup,a.formView.name,o))}),p(1," Browse ... "),r()}}function uo(i,t){if(i&1){let e=I();l(0,"sh-form-field")(1,"label",42),g(2,to,2,0,"sup",47),p(3),g(4,no,2,1,"sh-icon",44),g(5,io,2,0,"sh-icon",48),H(6,oo,1,0,"ng-container",25),r(),l(7,"input",49),T("keydown",function(o){S(e);let a=s().$implicit,d=s(2);return f(d.onKeyDown(a.fieldGroup,a.formView.name,a.formView.type,o))})("ngModelChange",function(o){S(e);let a=s().$implicit,d=s(2);return f(d.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r(),ce(8)(9),g(10,ao,2,5,"sh-icon",50)(11,lo,2,0,"sh-icon",51)(12,ro,2,0,"sh-icon",51)(13,so,2,0,"sh-icon",51)(14,_o,2,0,"sh-icon",51),g(15,co,2,0,"button",52),r()}if(i&2){let e=s().$implicit,n=E(1),o=E(2),a=E(3),d=E(4),c=E(5);s();let m=te(17),F=s();_(),u("for",c),_(),C(e.formView.isMandatory&&d?2:-1),_(),V(" ",n," "),_(),C(e.formView.longDescription?4:-1),_(),C(d&&e.formView.type==="Path"?5:-1),_(),u("ngTemplateOutlet",m)("ngTemplateOutletContext",se(17,_e,me(14,Te,e.fieldGroup,e.formView))),_(),u("type",e.formView.type==="Email"?"email":"text")("id",c)("ngModel",o);let N=a,A=F.hasLeadingSlash(N??"");_(),Q(A&&(e.formView.doubleSlash==null?null:e.formView.doubleSlash.message)),_(),Q(e.formView.doubleSlash==null?null:e.formView.doubleSlash.type),_(),C(e.formView.type==="Path"?10:e.formView.type==="Email"?11:e.formView.type==="Hostname"?12:e.formView.type==="Bucketname"||e.formView.type==="BucketnameB2"?13:14),_(5),C(e.formView.type==="Path"&&F.hasV2ListBackendOperations()?15:-1)}}function po(i,t){i&1&&(l(0,"sup",55),p(1,"*"),r())}function mo(i,t){if(i&1&&(l(0,"sh-icon",44),p(1,"question"),r()),i&2){let e=s(2).$implicit;u("shTooltip",e.formView.longDescription)}}function go(i,t){i&1&&re(0)}function Co(i,t){if(i&1){let e=I();l(0,"span",59),T("click",function(){S(e);let o=s(2).$implicit,a=s(2);return f(a.oauthStartTokenCreation(o.destinationType,o.fieldGroup,o.formView.name,o.formView.oauthVersion))}),p(1," AuthID "),r()}}function To(i,t){i&1&&(l(0,"sh-icon",51),p(1,"password"),r())}function So(i,t){if(i&1){let e=I();l(0,"sh-icon",60),T("click",function(){S(e);let o=s(2).$implicit;return f(o.formView.showPassword=!o.formView.showPassword)}),p(1," eye "),r()}}function fo(i,t){if(i&1){let e=I();l(0,"sh-icon",60),T("click",function(){S(e);let o=s(2).$implicit;return f(o.formView.showPassword=!o.formView.showPassword)}),p(1," eye-slash "),r()}}function Eo(i,t){if(i&1){let e=I();l(0,"sh-form-field")(1,"label",42),g(2,po,2,0,"sup",55),p(3),g(4,mo,2,1,"sh-icon",44),H(5,go,1,0,"ng-container",25),r(),l(6,"input",56),T("ngModelChange",function(o){S(e);let a=s().$implicit,d=s(2);return f(d.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r(),g(7,Co,2,0,"span",57)(8,To,2,0,"sh-icon",51),g(9,So,2,0,"sh-icon",58)(10,fo,2,0,"sh-icon",58),r()}if(i&2){let e=s().$implicit,n=E(1),o=E(2),a=E(4),d=E(5);s();let c=te(17);_(),u("for",d),_(),C(e.formView.isMandatory&&a?2:-1),_(),V(" ",n," "),_(),C(e.formView.longDescription?4:-1),_(),u("ngTemplateOutlet",c)("ngTemplateOutletContext",se(14,_e,me(11,Te,e.fieldGroup,e.formView))),_(),u("type",e.formView.showPassword?"text":"password")("id",d)("ngModel",o),_(),C(e.oauthField===e.formView.name?7:8),_(2),C(e.formView.showPassword?9:10)}}function ho(i,t){i&1&&(l(0,"sup",62),p(1,"*"),r())}function No(i,t){if(i&1&&(l(0,"sh-icon",44),p(1,"question"),r()),i&2){let e=s(3).$implicit;u("shTooltip",e.formView.longDescription)}}function Fo(i,t){i&1&&re(0)}function Do(i,t){if(i&1&&p(0),i&2){let e=t.$implicit;at(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ")}}function yo(i,t){if(i&1){let e=I();l(0,"sh-select",61)(1,"label",42),g(2,ho,2,0,"sup",62),p(3),g(4,No,2,1,"sh-icon",44),H(5,Fo,1,0,"ng-container",25),r(),l(6,"input",45),T("ngModelChange",function(o){S(e);let a=s(2).$implicit,d=s(2);return f(d.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r()(),H(7,Do,1,2,"ng-template",null,3,Je)}if(i&2){let e=te(8);s();let n=E(0),o=s().$implicit,a=E(1),d=E(2),c=E(4),m=E(5);s();let F=te(17);u("options",n)("isClearable",!1)("optionTemplate",e),_(),u("for",m),_(),C(o.formView.isMandatory&&c?2:-1),_(),V(" ",a," "),_(),C(o.formView.longDescription?4:-1),_(),u("ngTemplateOutlet",F)("ngTemplateOutletContext",se(14,_e,me(11,Te,o.fieldGroup,o.formView))),_(),u("id",m)("ngModel",d)}}function Ao(i,t){if(i&1&&(ce(0),g(1,yo,9,16)),i&2){let e=s().$implicit,n=Q(s(2).mapOptions(e.formView));_(),C(n?1:-1)}}function Io(i,t){i&1&&(l(0,"sup",65),p(1,"*"),r())}function Po(i,t){if(i&1&&(l(0,"sh-icon",44),p(1,"question"),r()),i&2){let e=s(3).$implicit;u("shTooltip",e.formView.longDescription)}}function Oo(i,t){i&1&&re(0)}function Mo(i,t){if(i&1&&p(0),i&2){let e=t.$implicit;at(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ")}}function xo(i,t){if(i&1){let e=I();l(0,"sh-select",64)(1,"label",42),g(2,Io,2,0,"sup",65),p(3),g(4,Po,2,1,"sh-icon",44),H(5,Oo,1,0,"ng-container",25),r(),l(6,"input",45),T("ngModelChange",function(o){S(e);let a=s(2).$implicit,d=s(2);return f(d.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r()(),H(7,Mo,1,2,"ng-template",null,4,Je)}if(i&2){let e=te(8);s();let n=E(0),o=s().$implicit,a=E(1),d=E(2),c=E(4),m=E(5);s();let F=te(17);u("options",n)("asFreeText",!0)("inlineSearch",!0)("optionTemplate",e),_(),u("for",m),_(),C(o.formView.isMandatory&&c?2:-1),_(),V(" ",a," "),_(),C(o.formView.longDescription?4:-1),_(),u("ngTemplateOutlet",F)("ngTemplateOutletContext",se(15,_e,me(12,Te,o.fieldGroup,o.formView))),_(),u("id",m)("ngModel",d)}}function Ro(i,t){i&1&&O(0,"sh-progress-bar",63)}function Lo(i,t){if(i&1&&(ce(0),g(1,xo,9,17)(2,Ro,1,0,"sh-progress-bar",63)),i&2){let e=s().$implicit,n=E(2),o=Q(s(2).mapOptionsWithFreeText(e.formView,n));_(),C(o?1:2)}}function bo(i,t){i&1&&(l(0,"sup",67),p(1,"*"),r())}function wo(i,t){if(i&1&&(l(0,"sh-icon",44),p(1,"question"),r()),i&2){let e=s(2).$implicit;u("shTooltip",e.formView.longDescription)}}function Go(i,t){i&1&&re(0)}function $o(i,t){if(i&1){let e=I();l(0,"app-size",66),T("ngModelChange",function(o){S(e);let a=s().$implicit,d=s(2);return f(d.updateFieldValue(a.fieldGroup,a.formView.name,o))}),l(1,"label",42),g(2,bo,2,0,"sup",67),p(3),g(4,wo,2,1,"sh-icon",44),H(5,Go,1,0,"ng-container",25),r()()}if(i&2){let e=s().$implicit,n=E(1),o=E(2),a=E(4),d=E(5);s();let c=te(17);u("inputType",e.Name)("ngModel",o)("customId",d),_(),u("for",d),_(),C(e.formView.isMandatory&&a?2:-1),_(),V(" ",n," "),_(),C(e.formView.longDescription?4:-1),_(),u("ngTemplateOutlet",c)("ngTemplateOutletContext",se(12,_e,me(9,Te,e.fieldGroup,e.formView)))}}function vo(i,t){i&1&&(l(0,"sup",68),p(1,"*"),r())}function Uo(i,t){if(i&1&&(l(0,"sh-icon",44),p(1,"question"),r()),i&2){let e=s(2).$implicit;u("shTooltip",e.formView.longDescription)}}function ko(i,t){i&1&&re(0)}function Vo(i,t){if(i&1){let e=I();l(0,"sh-form-field")(1,"label",42),g(2,vo,2,0,"sup",68),p(3),g(4,Uo,2,1,"sh-icon",44),H(5,ko,1,0,"ng-container",25),r(),l(6,"input",69),T("ngModelChange",function(o){S(e);let a=s().$implicit,d=s(2);return f(d.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r(),l(7,"sh-icon",51),p(8,"numpad"),r()()}if(i&2){let e=s().$implicit,n=E(1),o=E(2),a=E(4),d=E(5);s();let c=te(17);_(),u("for",d),_(),C(e.formView.isMandatory&&a?2:-1),_(),V(" ",n," "),_(),C(e.formView.longDescription?4:-1),_(),u("ngTemplateOutlet",c)("ngTemplateOutletContext",se(11,_e,me(8,Te,e.fieldGroup,e.formView))),_(),u("id",d)("ngModel",o)}}function Bo(i,t){if(i&1&&(l(0,"sh-icon",44),p(1,"question"),r()),i&2){let e=s(2).$implicit;u("shTooltip",e.formView.longDescription)}}function Ko(i,t){i&1&&re(0)}function Jo(i,t){if(i&1){let e=I();l(0,"sh-toggle",39)(1,"label",42),p(2),g(3,Bo,2,1,"sh-icon",44),H(4,Ko,1,0,"ng-container",25),r(),l(5,"input",70),T("change",function(o){S(e);let a=s().$implicit,d=s(2);return f(d.updateFieldValue(a.fieldGroup,a.formView.name,o.target.checked?"true":"false"))}),r()()}if(i&2){let e=s().$implicit,n=E(1),o=E(2),a=E(5);s();let d=te(17),c=s();_(),u("for",a),_(),V(" ",n," "),_(),C(e.formView.longDescription?3:-1),_(),u("ngTemplateOutlet",d)("ngTemplateOutletContext",se(9,_e,me(6,Te,e.fieldGroup,e.formView))),_(),u("checked",c.isTrue(o))}}function Xo(i,t){i&1&&(l(0,"sup",72),p(1,"*"),r())}function zo(i,t){if(i&1&&(l(0,"sh-icon",44),p(1,"question"),r()),i&2){let e=s(3).$implicit;u("shTooltip",e.formView.longDescription)}}function Wo(i,t){i&1&&re(0)}function Ho(i,t){if(i&1&&p(0),i&2){let e=t.$implicit;at(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ")}}function jo(i,t){if(i&1){let e=I();l(0,"sh-select",71)(1,"label",42),g(2,Xo,2,0,"sup",72),p(3),g(4,zo,2,1,"sh-icon",44),H(5,Wo,1,0,"ng-container",25),r(),l(6,"input",73),T("ngModelChange",function(o){S(e);let a=s(2).$implicit,d=s(2);return f(d.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r()(),H(7,Ho,1,2,"ng-template",null,5,Je)}if(i&2){let e=te(8);s();let n=E(0),o=s().$implicit,a=E(1),d=E(2),c=E(4),m=E(5);s();let F=te(17);u("options",n)("selectMultiple",!0)("optionTemplate",e),_(),u("for",m),_(),C(o.formView.isMandatory&&c?2:-1),_(),V(" ",a," "),_(),C(o.formView.longDescription?4:-1),_(),u("ngTemplateOutlet",F)("ngTemplateOutletContext",se(13,_e,me(10,Te,o.fieldGroup,o.formView))),_(),u("ngModel",d)}}function qo(i,t){if(i&1&&(ce(0),g(1,jo,9,15)),i&2){let e=s().$implicit,n=Q(s(2).mapOptions(e.formView));_(),C(n?1:-1)}}function Qo(i,t){i&1&&(l(0,"sup",74),p(1,"*"),r())}function Yo(i,t){if(i&1&&(l(0,"sh-icon",44),p(1,"question"),r()),i&2){let e=s(2).$implicit;u("shTooltip",e.formView.longDescription)}}function Zo(i,t){i&1&&re(0)}function ea(i,t){if(i&1){let e=I();l(0,"app-timespan",66),T("ngModelChange",function(o){S(e);let a=s().$implicit,d=s(2);return f(d.updateFieldValue(a.fieldGroup,a.formView.name,o))}),l(1,"label",42),g(2,Qo,2,0,"sup",74),p(3),g(4,Yo,2,1,"sh-icon",44),H(5,Zo,1,0,"ng-container",25),r()()}if(i&2){let e=s().$implicit,n=E(1),o=E(2),a=E(4),d=E(5);s();let c=te(17);u("inputType",e.formView.name)("ngModel",o)("customId",d),_(),u("for",d),_(),C(e.formView.isMandatory&&a?2:-1),_(),V(" ",n," "),_(),C(e.formView.longDescription?4:-1),_(),u("ngTemplateOutlet",c)("ngTemplateOutletContext",se(12,_e,me(9,Te,e.fieldGroup,e.formView)))}}function ta(i,t){i&1&&(l(0,"sup",76),p(1,"*"),r())}function na(i,t){if(i&1&&(l(0,"sh-icon",44),p(1,"question"),r()),i&2){let e=s(2).$implicit;u("shTooltip",e.formView.longDescription)}}function ia(i,t){i&1&&re(0)}function oa(i,t){if(i&1){let e=I();l(0,"app-file-drop-textarea",75),T("ngModelChange",function(o){S(e);let a=s().$implicit,d=s(2);return f(d.updateFieldValue(a.fieldGroup,a.formView.name,o))}),l(1,"label"),g(2,ta,2,0,"sup",76),p(3),g(4,na,2,1,"sh-icon",44),H(5,ia,1,0,"ng-container",25),r()()}if(i&2){let e=s().$implicit,n=E(2),o=E(4),a=E(5);s();let d=te(17);u("ngModel",n)("customId",a)("placeholder",e.formView.longDescription),_(2),C(e.formView.isMandatory&&o?2:-1),_(),V(" ",e.formView.shortDescription??e.formView.name," "),_(),C(e.formView.longDescription?4:-1),_(),u("ngTemplateOutlet",d)("ngTemplateOutletContext",se(11,_e,me(8,Te,e.fieldGroup,e.formView)))}}function aa(i,t){i&1&&(O(0,"sh-spinner"),l(1,"span"),D(2,10),r()),i&2&&Ct("--spinner-size","16px")("--spinner-thickness","2px")}function la(i,t){if(i&1){let e=I();l(0,"div",79)(1,"span"),D(2,11),r(),l(3,"button",32),T("click",function(){S(e);let o=s(6);return f(o.reloadTrigger.set(!o.reloadTrigger()))}),D(4,12),r()()}}function ra(i,t){if(i&1&&p(0),i&2){let e=t.$implicit;at(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ")}}function sa(i,t){if(i&1){let e=I();l(0,"sh-select",80)(1,"label",42)(2,"sup",81),p(3,"*"),r(),l(4,"span"),D(5,13),r()(),l(6,"input",45),T("ngModelChange",function(o){S(e);let a=s(4).$implicit,d=s(2);return f(d.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r()(),H(7,ra,1,2,"ng-template",null,6,Je)}if(i&2){s(4);let e=E(2),n=E(5),o=s(2);u("options",o.restoreBackupIdOptions())("isClearable",!1),_(),u("for",n),_(5),u("id",n)("ngModel",e)}}function _a(i,t){if(i&1&&g(0,aa,3,4)(1,la,5,0,"div",79)(2,sa,9,5),i&2){let e=s(5);C(e.isLoadingRestoreBackupIdOptions()?0:e.restoreBackupIdOptions().length==0?1:2)}}function da(i,t){i&1&&(l(0,"sup",82),p(1,"*"),r())}function ca(i,t){if(i&1&&(l(0,"sh-icon",44),p(1,"question"),r()),i&2){let e=s(4).$implicit;u("shTooltip",e.formView.longDescription)}}function ua(i,t){i&1&&re(0)}function pa(i,t){if(i&1){let e=I();l(0,"button",84),T("click",function(){S(e),s(4);let o=E(5),a=s(2);return f(a.toggleDisabled(o))}),x(1,14),O(2,"sh-icon"),R(),r()}}function ma(i,t){if(i&1){let e=I();l(0,"sh-form-field")(1,"label",42),g(2,da,2,0,"sup",82),p(3),g(4,ca,2,1,"sh-icon",44),H(5,ua,1,0,"ng-container",25),r(),l(6,"input",83),T("ngModelChange",function(o){S(e);let a=s(3).$implicit,d=s(2);return f(d.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r(),l(7,"sh-icon",51),p(8,"textbox"),r()(),g(9,pa,3,0,"button",41)}if(i&2){let e=s(3).$implicit,n=E(1),o=E(2),a=E(4),d=E(5);s();let c=te(17),m=s();_(),u("for",d),_(),C(e.formView.isMandatory&&a?2:-1),_(),V(" ",n," "),_(),C(e.formView.longDescription?4:-1),_(),u("ngTemplateOutlet",c)("ngTemplateOutletContext",se(15,_e,me(12,Te,e.fieldGroup,e.formView))),_(),u("type","text")("id",d)("ngModel",o)("placeholder",e.formView.longDescription)("disabled",!0),_(3),C(m.getIsDisabled(d)?9:-1)}}function ga(i,t){if(i&1&&(l(0,"div",77),g(1,_a,3,1)(2,ma,10,17),r()),i&2){let e=s(4);_(),C(e.isRestoreFlow()?1:2)}}function Ca(i,t){if(i&1){let e=I();l(0,"div",85),x(1,15),O(2,"div")(3,"div"),R(),r(),l(4,"button",84),T("click",function(){S(e);let o=s(5);return f(o.openConsole())}),x(5,16),O(6,"sh-icon"),R(),r()}}function Ta(i,t){i&1&&(l(0,"div",85),D(1,17),r(),l(2,"button",86),x(3,18),O(4,"sh-icon"),R(),r()),i&2&&(_(2),u("routerLink",Ie(1,$i)))}function Sa(i,t){if(i&1&&(l(0,"div",78),g(1,Ca,7,0)(2,Ta,5,2),r()),i&2){let e=s(4);_(),C(e.isConnectedToConsole()?1:2)}}function fa(i,t){if(i&1&&g(0,ga,3,1,"div",77)(1,Sa,3,1,"div",78),i&2){let e=s(3);C(e.isConnectedToConsole()&&e.hasStorageApiKey()?0:1)}}function Ea(i,t){i&1&&(l(0,"sup",87),p(1,"*"),r())}function ha(i,t){if(i&1&&(l(0,"sh-icon",44),p(1,"question"),r()),i&2){let e=s(3).$implicit;u("shTooltip",e.formView.longDescription)}}function Na(i,t){i&1&&re(0)}function Fa(i,t){if(i&1){let e=I();l(0,"sh-form-field")(1,"label",42),g(2,Ea,2,0,"sup",87),p(3),g(4,ha,2,1,"sh-icon",44),H(5,Na,1,0,"ng-container",25),r(),l(6,"input",88),T("ngModelChange",function(o){S(e);let a=s(2).$implicit,d=s(2);return f(d.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r(),l(7,"sh-icon",51),p(8,"textbox"),r(),l(9,"button",89),T("click",function(){S(e);let o=s(4);return f(o.authenticateFilen())}),D(10,19),r()()}if(i&2){let e=s(2).$implicit,n=E(1),o=E(2),a=E(4),d=E(5);s();let c=te(17),m=s();_(),u("for",d),_(),C(e.formView.isMandatory&&a?2:-1),_(),V(" ",n," "),_(),C(e.formView.longDescription?4:-1),_(),u("ngTemplateOutlet",c)("ngTemplateOutletContext",se(12,_e,me(9,Te,e.fieldGroup,e.formView))),_(),u("id",d)("ngModel",o),_(3),u("disabled",m.isAuthenticatingFilen())}}function Da(i,t){if(i&1&&g(0,Fa,11,14,"sh-form-field"),i&2){let e=s(3);C(e.hasFilenApiKey()?-1:0)}}function ya(i,t){if(i&1){let e=I();l(0,"button",84),T("click",function(){S(e);let o=s().$implicit,a=s(2);return f(a.removeAdvancedOption(o.formView.name))}),l(1,"sh-icon"),p(2,"x-circle"),r()()}}function Aa(i,t){if(i&1&&(l(0,"div",35),ce(1)(2)(3)(4)(5),g(6,Qi,6,13,"app-file-tree",36)(7,eo,6,10,"app-file-tree",37)(8,uo,16,19,"sh-form-field")(9,Eo,11,16,"sh-form-field")(10,Ao,2,2)(11,Lo,3,2)(12,$o,6,14,"app-size",38)(13,Vo,9,13,"sh-form-field")(14,Jo,6,11,"sh-toggle",39)(15,qo,2,2)(16,ea,6,14,"app-timespan",38)(17,oa,6,13,"app-file-drop-textarea",40)(18,fa,2,1)(19,Da,1,1),g(20,ya,3,0,"button",41),r()),i&2){let e=t.$implicit;s();let n=E(0),o=s();Ne("single-field",e.fieldGroup!=="advanced"),_(),Q(e.formView.shortDescription??e.formView.name),_(),Q(o.getFieldGroup(n,e.fieldGroup)[e.formView.name]),_();let a=Q(o.getFieldValue(e.fieldGroup,e.formView.name));_(),Q((a??"").toString().trim()===""),_(),Q("destination-"+e.fieldGroup+"-"+e.index+"-"+(e.asHttpOptions?"http":"other")),_(),C(e.formView.type==="FileTree"?6:e.formView.type==="FolderTree"?7:e.formView.type==="String"||e.formView.type==="Path"||e.formView.type==="Email"||e.formView.type==="Hostname"||e.formView.type==="Bucketname"||e.formView.type==="BucketnameB2"?8:e.formView.type==="Password"?9:e.formView.type==="Enumeration"?10:e.formView.type==="NonValidatedSelectableString"?11:e.formView.type==="Size"?12:e.formView.type==="Integer"?13:e.formView.type==="Boolean"?14:e.formView.type==="Flags"?15:e.formView.type==="Timespan"||e.formView.type==="DateTime"?16:e.formView.type==="FreeText"?17:e.formView.type==="DuplicatiBackupId"?18:e.formView.type==="Filen2FACode"?19:-1),_(14),C(e.fieldGroup==="advanced"?20:-1)}}function Ia(i,t){if(i&1&&(l(0,"sh-icon",90),p(1,"x-circle"),r()),i&2){s();let e=E(0);u("shTooltip",(e==null?null:e.message)??"Invalid value")}}function Pa(i,t){if(i&1&&(l(0,"sh-icon",91),p(1,"warning"),r()),i&2){s();let e=E(0);u("shTooltip",(e==null?null:e.message)??"Invalid value")}}function Oa(i,t){if(i&1&&(ce(0),g(1,Ia,2,1,"sh-icon",90)(2,Pa,2,1,"sh-icon",91)),i&2){let e=s().$implicit,n=E(0),o=Q(e.formView.validate(n));_(),C((o==null?null:o.type)==="error"?1:(o==null?null:o.type)==="warning"?2:-1)}}function Ma(i,t){if(i&1&&(ce(0),g(1,Oa,3,2)),i&2){let e=t.$implicit,o=(Q(s(2).getFieldValue(e.fieldGroup,e.formView.name))??"").toString().trim()==="";_(),C(!o&&e.formView.validate?1:-1)}}function xa(i,t){if(i&1&&(ce(0),fe(1,Ui,1,9,"ng-container",null,Se),fe(3,Vi,1,9,"ng-container",null,Se),l(5,"sh-toggle-card",20),pe(6,21)(7),D(8,7),de(),ce(9),g(10,Bi,3,0,"button",22)(11,Ji,17,2,"div",23),de(),g(12,Xi,1,3,"textarea",24)(13,Hi,2,0),r(),H(14,Aa,21,9,"ng-template",null,0,Je)(16,Ma,2,2,"ng-template",null,1,Je)),i&2){let e=s(),n=E(1);Q(e.destinationForm()),_(),Ee(n.custom),_(2),Ee(n.dynamic),_(2),u("disableToggle",!0),_(4),Q(e.nonSelectedAdvancedFormViews()),_(),C(e.showTextArea()?10:11),_(2),C(e.showTextArea()?12:13)}}var Jt=class i{#e=M(Oe);#t=M(Ce);#n=M(Rt);#i=M(tt);#o=M(On);#s=M(Mn);#a=M(Ge);injector=M(He);targetUrl=Le.required();useBackupState=w(!1);#l=null;destinationType=P(()=>{let t=this.targetUrl();if(!t)return null;let e=Xe(t);return this.#l=e?.customKey??e?.key,this.#l});refreshView=h(!1);destinationForm=h({custom:{},dynamic:{},advanced:{}});advancedFormFieldNames=P(()=>Object.keys(this.destinationForm().advanced??{}));destinationFormConfig=h(null);showTextArea=h(!1);hasV2ListBackendOperations=this.#t.hasV2ListBackendOperations;isLoadingRestoreBackupIdOptions=h(!1);isRestoreFlow=P(()=>!this.useBackupState());reloadTrigger=h(!1);hasLoadedBackupIdOptions=h(!1);restoreBackupIdOptions=Ue(dn(Ht(this.targetUrl).pipe(un(),ot(t=>({url:t,isReload:!1}))),Ht(this.reloadTrigger).pipe(ot(()=>({url:this.targetUrl(),isReload:!0})))).pipe(ct(({url:t,isReload:e})=>t&&t.startsWith("duplicati://")&&this.hasStorageApiKey()&&this.isRestoreFlow()&&(e||!this.hasLoadedBackupIdOptions())?(this.hasLoadedBackupIdOptions.set(!0),this.isLoadingRestoreBackupIdOptions.set(!0),this.#s.getDuplicatiStorageBackups(t).pipe(cn(a=>(console.error("Error loading Duplicati storage backups",a),Ve([]))),Be(()=>this.isLoadingRestoreBackupIdOptions.set(!1)))):Ve([]))),{initialValue:[]});isConnectedToConsole=P(()=>this.#o.state()==="connected");hasStorageApiKey=P(()=>{let t=this.destinationForm();return(this.#n.serverSettings()?.["remote-control-storage-api-id"]??"").length>0||t.advanced["duplicati-auth-apiid"]});isAuthenticatingFilen=h(!1);hasFilenApiKey=P(()=>{let e=this.destinationForm().advanced["api-key"];return e&&e.length>0});nonSelectedAdvancedFormViews=P(()=>{let t=this.destinationFormConfig();if(!t)return[];let e=this.advancedFormFieldNames();return t.advanced.filter(n=>e.findIndex(o=>o===n.name)===-1)});destinationTypeEffect=j(()=>{let t=this.targetUrl(),e=Xe(t??""),n=e.key,o=e.customKey??n,a=this.#i.allModules().find(k=>k.Key===n)??{Key:n,DisplayName:e.displayName,Description:e.description,Options:[]};if(!a||!a.Options||!n)return;let d=e&&e.oauthField?e.oauthField:null,c=e&&e.customFields?e.customFields:{},m=e&&e.dynamicFields?e.dynamicFields:[],F=e&&e.advancedFields?e.advancedFields:[],N=e&&e.ignoredAdvancedFields?e.ignoredAdvancedFields:[],A={destinationType:o,oauthField:d,custom:[],dynamic:[],advanced:[]};c&&Object.entries(c).forEach(([k,y],J)=>{let X=y.order??J,b=y.validate;!b&&y.type==="Bucketname"&&(b=G=>$n(G)?null:{type:"error",message:$localize`Invalid bucket name.`}),b&&y.type==="Hostname"&&(b=G=>vn(G)?null:{type:"error",message:$localize`Invalid hostname.`}),A.custom.push(W({order:900+X,validate:b},y))});for(let k=0;k<a.Options.length;k++){let y=a.Options[k];if(y.Deprecated)continue;let J=m.find(X=>X===y.Name||y.Aliases?.includes(X.name)||X.name===y.Name);if(J){let X=y.Aliases?.indexOf(J.name)??-1,b=y.Aliases&&X>-1?y.Aliases[X]:y.Name,G=J&&typeof J!="string",Me=G?J?.defaultValue??y.DefaultValue:y.DefaultValue,xe=G&&J?.order!==void 0?J.order:k,B={name:b,type:y.Type,shortDescription:y.ShortDescription??void 0,longDescription:y.LongDescription??void 0,options:y.ValidValues,order:900+xe},We=G?W(W({},B),J):B;A.dynamic.push(We)}else{let X=y.Name;if(N.find(Re=>Re===X))continue;let G=F.find(Re=>Re===X||Re.name===X),Me=G&&typeof G!="string",xe=Me&&G?.order!==void 0?G.order:k,B={name:X,type:y.Type,shortDescription:y.ShortDescription??void 0,longDescription:y.LongDescription??void 0,options:y.ValidValues,defaultValue:y.DefaultValue,order:900+xe},We=Me?W(W({},B),G):B;A.advanced.push(We)}}if(A.custom.sort((k,y)=>k.order-y.order),A.dynamic.sort((k,y)=>k.order-y.order),A.advanced.sort((k,y)=>k.order-y.order),this.destinationFormConfig.set(A),!t)return;let L=bt(t);L&&this.destinationForm.set({custom:L.custom,dynamic:L.dynamic,advanced:L.advanced})});destinationFormEffect=j(()=>{let t=this.#l,e=this.destinationForm(),n=this.refreshView();if(!e||!t)return;let o=wn({destinationType:t,custom:e.custom,dynamic:e.dynamic,advanced:e.advanced});o&&this.targetUrl.set(o)});getFieldValue(t,e){let o=this.destinationForm()[t][e];return o||null}getFormView(t,e){let o=this.destinationFormConfig()?.[t].find(a=>a.name===e);return o||null}getDefaultFormView(t){return{name:t,type:"String",shortDescription:t,longDescription:$localize`This is an undocumented option.`}}getFieldGroup(t,e){return t[e]}hasLeadingSlash(t){return t?.startsWith("/")??!1}addAdvancedOption(t){let e=this.destinationForm();e.advanced[t.name]=t.defaultValue,this.destinationForm.set(W({},e))}isTrue(t){if(typeof t=="boolean")return t;if(typeof t=="string"){let e=t.toLowerCase();return e==="true"||e==="1"||e==="yes"||e==="on"}return!1}onKeyDown(t,e,n,o){if(n==="Hostname"||n==="Bucketname"){if(["Backspace","Delete","ArrowLeft","ArrowRight","Tab","Home","End"].includes(o.key))return;if(o.key=="/"||o.key=="\\"||o.key==":"){o.preventDefault();return}}}updateFieldValue(t,e,n){let o=this.destinationForm();o[t][e]=n,this.destinationForm.set(W({},o))}removeAdvancedOption(t){let e=this.destinationForm();delete e.advanced[t],this.destinationForm.set(W({},e))}mapOptions(t){let e=t.loadOptions;if(e)return e(this.injector)();let n=t.options;return n?n.map(o=>({key:o,value:o})):null}mapOptionsWithFreeText(t,e){let n=this.mapOptions(t);return n?(e&&e.length>0&&(n.find(a=>a.value===e)||n.push({key:e,value:e})),n):null}#r=h(!1);browse(t,e,n){let o=this.useBackupState()?this.#e.backupId():null,a=this.useBackupState()?this.#e.connectionStringId():null;this.#a.open(Kt,{maxWidth:"700px",maxHeight:"80vh",width:"100%",closeOnOutsideClick:!1,data:{backupId:o,destinationUrl:this.targetUrl(),connectionStringId:a}}).closed.subscribe(c=>{c&&(c=c.replace(/^\/+/,""),this.destinationForm.update(m=>(m[t][e]=c,W({},m))))})}oauthStartTokenCreation(t,e,n,o){this.#r.set(!0);let a=(o??1)==2?this.#t.defaultOAuthUrlV2():this.#t.defaultOAuthUrl(),d=this.#n.serverSettings()?.["--oauth-url"];if(d&&d.length>0&&(a=d),this.useBackupState()){let y=this.#e.mapFormsToSettings().find(J=>J.Name==="--oauth-url")?.Value;y&&y.length>0&&(a=y)}let c=this.destinationForm().advanced["oauth-url"];c&&c.length>0&&(a=c);let m=`${a}?type=${t}`,F=450,N=600,A=screen.width/2-F/2,L=screen.height/2-N/2,k=window.open(m,"_blank","height="+N+",width="+F+",menubar=0,status=0,titlebar=0,toolbar=0,left="+A+",top="+L);return window.addEventListener("message",y=>{let J=y.data.startsWith("authid:"),X=J?y.data.replace("authid:",""):null;J&&(this.destinationForm.update(b=>(b[e][n]=X,W({},b))),this.#r.set(!1),this.refreshView.set(!this.refreshView()),k?.close())}),!1}settingsAsText=P(()=>{let t=this.destinationForm().advanced;return Object.entries(t).map(([e,n])=>{let o=e??"",a="";return typeof n=="boolean"?a=this.isTrue(n)?"True":"False":(typeof n=="number"||n!=null)&&(a=n.toString()),`${o}=${a}`}).join(`
4
- `)});updateSettingsFromText(t){if(typeof t!="string")return;let e=Gn(t);this.destinationForm.update(n=>le(W({},n),{advanced:e}))}getIsDisabled(t){return document.getElementById(t)?.disabled??!0}toggleDisabled(t){let e=document.getElementById(t);e&&(e.disabled=!e.disabled)}openConsole(){this.#o.openConsole()}#_(t){var e=this.useBackupState()?this.#e.backupId():null;this.isAuthenticatingFilen.set(!0),this.#s.getFilenApiKey(t,e).pipe(Be(()=>this.isAuthenticatingFilen.set(!1))).subscribe({next:n=>{if(n.length===0){this.#a.open(ae,{data:{title:$localize`Authentication failed`,message:$localize`No API key was returned from the Filen server.`,confirmText:$localize`OK`}});return}this.destinationForm.update(o=>(o.advanced["api-key"]=n,o.dynamic["two-factor-code"]=null,W({},o))),this.refreshView.set(!this.refreshView())},error:n=>{console.error("Error authenticating Filen",n),this.#a.open(ae,{data:{title:$localize`Authentication failed`,message:$localize`An error occurred while requesting the Filen API key: ${n.message}`,confirmText:$localize`OK`}})}})}authenticateFilen(){let t=this.targetUrl();if(!t)return;let n=this.destinationForm().advanced["api-key"];if(n&&n.length>0){this.#a.open(ae,{data:{title:$localize`Confirm re-authenticate?`,message:$localize`You already have an API key. Are you sure you want to re-authenticate?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:o=>{if(o){var a=new URL(t);a.searchParams.delete("api-key"),this.#_(a.toString())}}});return}this.#_(t)}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=K({type:i,selectors:[["app-single-destination"]],inputs:{targetUrl:[1,"targetUrl"],useBackupState:[1,"useBackupState"]},outputs:{targetUrl:"targetUrlChange"},decls:3,vars:3,consts:()=>{let t;t=$localize`Advanced options`;let e;e=$localize` Show editor ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let n;n=$localize` Add advanced option ${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON:`;let o;o=$localize`This field is mandatory`;let a;a=$localize`This field is mandatory`;let d;d=$localize`This field is mandatory`;let c;c=$localize`An empty path means storing data in the initial or root folder, which is not recommended`;let m;m=$localize`This field is mandatory`;let F;F=$localize`This field is mandatory`;let N;N=$localize`This field is mandatory`;let A;A=$localize`This field is mandatory`;let L;L=$localize`This field is mandatory`;let k;k=$localize`This field is mandatory`;let y;y=$localize`This field is mandatory`;let J;J=$localize`This field is mandatory`;let X;X=$localize`Loading available backups...`;let b;b=$localize`No backups found from this machine, contact support`;let G;G=$localize` Try again `;let Me;Me=$localize`This field is mandatory`;let xe;xe=$localize`Pick the backup to restore from`;let B;B=$localize`This field is mandatory`;let We;We=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:pencil${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let Re;Re=$localize`${"[\uFFFD#2\uFFFD|\uFFFD#3\uFFFD]"}:START_TAG_DIV:An API key with storage access is required to use Duplicati storage.${"[\uFFFD/#2\uFFFD|\uFFFD/#3\uFFFD]"}:CLOSE_TAG_DIV:${"[\uFFFD#2\uFFFD|\uFFFD#3\uFFFD]"}:START_TAG_DIV:Visit the console and assign an API key to this machine.${"[\uFFFD/#2\uFFFD|\uFFFD/#3\uFFFD]"}:CLOSE_TAG_DIV:`,Re=Ke(Re);let nn;nn=$localize` Visit console ${"\uFFFD#6\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SH_ICON:`;let on;on=$localize`Connect to the console to use Duplicati storage.`;let an;an=$localize` Connect now ${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON:`;let ln;ln=$localize`This field is mandatory`;let rn;return rn=$localize` Authenticate now `,[["fieldTemplate",""],["validateTemplate",""],["option",""],["enumOptionTemplate",""],["nonValidatedOptionTemplate",""],["optionTemplate",""],["backupIdOptionTemplate",""],t,e,n,X,b,G,xe,We,Re,nn,on,an,rn,[1,"advanced-options",3,"disableToggle"],["title",""],["shButton","","type","button",1,"outlined","small"],[1,"actions"],["wrap","off","placeholder","Paste advanced options here, one per line.",1,"raw-text-area",3,"ngModel","ngModelOptions"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["shButton","","type","button",1,"outlined","small",3,"click"],[3,"searchable"],["shButton","","type","button",1,"outlined","small",3,"disabled"],["menu",""],["type","button"],["shButton","","type","button",1,"small"],["shButton","","type","button",1,"small",3,"click"],["type","button",3,"click"],["wrap","off","placeholder","Paste advanced options here, one per line.",1,"raw-text-area",3,"ngModelChange","ngModel","ngModelOptions"],[1,"field-row"],[3,"startingPath","accepts","showFiles","hideShortcuts","showHiddenNodes","selectFiles","resolvePaths"],[3,"hideShortcuts","enableCreateFolder","startingPath","resolvePaths"],[3,"inputType","ngModel","customId"],[1,"primary","raised"],[3,"ngModel","customId","placeholder"],["shButton","","type","button",1,"outlined"],[3,"for"],["shTooltip",o],[1,"primary",3,"shTooltip"],["type","text",3,"ngModelChange","id","ngModel"],["shTooltip",a],["shTooltip",d],["shTooltip",c,1,"warn"],["autocomplete","off",3,"keydown","ngModelChange","type","id","ngModel"],["prefix","",3,"error","warn","shTooltip"],["prefix",""],["suffix","","shButton","","type","button",1,"outlined","small"],["prefix","",3,"shTooltip"],["suffix","","shButton","","type","button",1,"outlined","small",3,"click"],["shTooltip",m],["autocomplete","new-password",3,"ngModelChange","type","id","ngModel"],["prefix","",1,"link"],["suffix","",1,"clickable"],["prefix","",1,"link",3,"click"],["suffix","",1,"clickable",3,"click"],["label","key","value","value",3,"options","isClearable","optionTemplate"],["shTooltip",F],[1,"indeterminate","primary"],["label","key","value","value",3,"options","asFreeText","inlineSearch","optionTemplate"],["shTooltip",N],[3,"ngModelChange","inputType","ngModel","customId"],["shTooltip",A],["shTooltip",L],["type","number",3,"ngModelChange","id","ngModel"],["type","checkbox",3,"change","checked"],["key","key","value","value",1,"primary","raised",3,"options","selectMultiple","optionTemplate"],["shTooltip",k],["type","text","id","text",3,"ngModelChange","ngModel"],["shTooltip",y],[3,"ngModelChange","ngModel","customId","placeholder"],["shTooltip",J],[1,"duplicati-backup-id"],[1,"duplicati-backup-id-console"],[1,"no-backups-found"],[3,"options","isClearable"],["shTooltip",Me],["shTooltip",B],["autocomplete","off",3,"ngModelChange","type","id","ngModel","placeholder","disabled"],["shButton","","type","button",1,"outlined",3,"click"],[1,"info"],["shButton","","type","button",1,"outlined",3,"routerLink"],["shTooltip",ln],["type","text","autocomplete","off",3,"ngModelChange","id","ngModel"],["suffix","","shButton","","type","button",1,"outlined","small",3,"click","disabled"],[1,"error",3,"shTooltip"],[1,"warn",3,"shTooltip"]]},template:function(e,n){if(e&1&&(ce(0)(1),g(2,xa,18,5)),e&2){let o=Q(n.destinationType());_();let a=Q(n.destinationFormConfig());_(),C(o&&a?2:-1)}},dependencies:[Qe,Y,ht,Z,ie,ne,Sn,fn,ke,Gt,Un,Bt,ue,q,ee,Ot,Ye,$e,Mt,ve,It,Pt],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.advanced-options[_ngcontent-%COMP%]{position:relative;z-index:1}textarea[_ngcontent-%COMP%] ~ grammarly-extension[_ngcontent-%COMP%]{display:none}sh-select[_ngcontent-%COMP%]{--miw: p2r(120)}[prefix].link[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline;color:var(--primary-8)}.clickable[_ngcontent-%COMP%]{cursor:pointer;color:var(--primary-8)}label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}label[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:1rem}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.field-row.single-field[_ngcontent-%COMP%]{display:block}.actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.raw-text-area[_ngcontent-%COMP%]{min-height:12rem;white-space:pre}.duplicati-backup-id[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:8px;align-items:flex-end}.duplicati-backup-id[_ngcontent-%COMP%] sh-select[_ngcontent-%COMP%]{width:100%}.duplicati-backup-id-console[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:8px;align-items:center}.duplicati-backup-id-console[_ngcontent-%COMP%] .info[_ngcontent-%COMP%]{width:100%;display:flex;flex-direction:column;gap:4px}.no-backups-found[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin-left:4px;margin-right:4px}"],changeDetection:0})};var Xt=class i{#e=M(xt);#t=M(Ge);#n=M(Ce);testDestination(t,e,n,o,a,d,c,m,F){return this.#n.hasV2TestOperations()?this.testDestinationv2(t,e,n,o,a,d,c,m,F):this.testDestinationv1(t,e,n,o,a,d,c,m,F)}testDestinationv2(t,e,n,o,a,d,c,m,F){return new dt(N=>{this.#e.postApiV2DestinationTest({requestBody:{DestinationUrl:t,ConnectionStringId:n??null,BackupId:e=="new"?null:e,AutoCreate:m==="create",ReadOnlyTest:F,Options:null,DestinationType:d,SourcePrefix:e=="new"?null:o}}).subscribe({next:A=>{if(A.Success){this.emitSuccessV2(N,t,a,A);return}this.handleGenericError(N,t,a,A.Error??"Unknown error",c)},error:A=>{let L=A?.error?.body??A?.error?.requestBody;if(L?.Data?.FolderExists===!1||L?.StatusCode==="missing-folder"){this.handleMissingFolder(N,t,e,n,a,c,m,F);return}if(L?.Data?.HostCertificate){this.handleMissingCertificate(N,t,a,L.Data?.HostCertificate,c);return}if(L?.Data?.ReportedHostKey){this.handleIncorrectKey(N,t,a,L.Data.ReportedHostKey,L.Data.AcceptedHostKey??null,c);return}this.handleGenericError(N,t,a,A?.message??"Unknown error",c)}})})}testDestinationv1(t,e,n,o,a,d,c,m,F){return new dt(N=>{this.#e.postApiV1RemoteoperationTest({readOnlyTest:F,requestBody:{path:t,backupId:e=="new"?null:e,connectionStringId:n??null,sourcePrefix:e=="new"?null:o},type:d}).subscribe({next:A=>{N.next({action:"success",targetUrl:t,testAgain:!1,destinationIndex:a}),N.complete()},error:A=>{this.handleDestinationErrorv1(A.message,t,e,n,a,c,m,F).subscribe(L=>{N.next(L)})}})})}handleMissingFolder(t,e,n,o,a,d,c,m){function F(){t.next({action:"missing-folder",targetUrl:e,testAgain:!1,destinationIndex:a,errorMessage:$localize`The remote destination folder does not exist.`}),t.complete()}if(d||c==="error"){F();return}this.#t.open(ae,{data:{title:$localize`Create folder`,message:$localize`The remote destination folder does not exist, do you want to create it?`,confirmText:$localize`Create folder`,cancelText:$localize`Cancel`},closed:N=>{if(!N){this.reportNoAction(t,e,a,$localize`The remote folder does not exist.`);return}this.#n.hasV2TestOperations()?this.#e.postApiV2DestinationTest({requestBody:{DestinationUrl:e,ConnectionStringId:o,AutoCreate:!0,ReadOnlyTest:m,Options:null,BackupId:n=="new"?null:n}}).subscribe({next:A=>{if(A.Success){this.emitSuccessV2(t,e,a,A);return}else this.handleFolderCreateFailure(t,e,a,A.Error??$localize`Unknown error`)},error:A=>{this.handleFolderCreateFailure(t,e,a,A.message??$localize`Unknown error`)}}):this.#e.postApiV1RemoteoperationCreate({requestBody:{path:e,backupId:n=="new"?null:n}}).subscribe({next:()=>{this.handleFolderCreated(t,e,a)},error:A=>{this.handleFolderCreateFailure(t,e,a,A.message??$localize`Unknown error`)}})}})}handleFolderCreateFailure(t,e,n,o){this.#t.open(ae,{data:{title:$localize`Error creating folder`,message:$localize`The remote destination folder could not be created. ${o}`,confirmText:$localize`OK`,cancelText:null},closed:()=>{t.next({action:"generic-error",targetUrl:e,testAgain:!1,destinationIndex:n}),t.complete()}})}emitSuccessV2(t,e,n,o){t.next({action:"success",targetUrl:e,testAgain:!1,destinationIndex:n,anyFilesFound:!o.Data?.FolderIsEmpty,containsBackup:o.Data?.FolderContainsBackupFiles??void 0,containsEncryptedBackupFiles:o.Data?.FolderContainsEncryptedBackupFiles??void 0}),t.complete()}handleFolderCreated(t,e,n){this.#t.open(ae,{data:{title:$localize`Folder created`,message:$localize`The remote destination folder was created successfully.`,confirmText:$localize`OK`,cancelText:null},closed:()=>{t.next({action:"test-again",targetUrl:e,testAgain:!0,destinationIndex:n}),t.complete()}})}reportNoAction(t,e,n,o){t.next({action:"generic-error",targetUrl:e,errorMessage:o,testAgain:!1,destinationIndex:n}),t.complete()}handleMissingCertificate(t,e,n,o,a){let d=$localize`The server is using a certificate that is not trusted.
5
- If this is a self-signed certificate, you can choose to trust this certificate.
6
- The server reported the certificate hash: ${o}`,c=e.includes("?");function m(){t.next({action:"trust-cert",targetUrl:e,suggestedUrl:e+`${c?"&":"?"}accept-specified-ssl-hash=${o}`,testAgain:!0,certData:o,errorMessage:d,destinationIndex:n}),t.complete()}if(a){m();return}this.#t.open(ae,{maxWidth:"500px",data:{title:$localize`Trust the certificate`,message:d,confirmText:$localize`Trust the certificate`,cancelText:$localize`Cancel`},closed:F=>{if(!F){this.reportNoAction(t,e,n,$localize`The server certificate is not trusted.`);return}m()}})}handleIncorrectKey(t,e,n,o,a,d){if(a){let N=function(){t.next({action:"approve-host-key",targetUrl:e,suggestedUrl:F,testAgain:!0,reportedHostKey:o,errorMessage:m,destinationIndex:n}),t.complete()};var c=N;let m=$localize`The host key has changed, please check with the server administrator if this is correct,
7
- otherwise you could be the victim of a MAN-IN-THE-MIDDLE attack.
8
- Do you want to REPLACE your CURRENT host key ${a}
9
- with the REPORTED host key: ${o}?`,F=e;try{let L=new URL(e);L.searchParams.set("ssh-fingerprint",o),F=L.toString()}catch{let L=e.replace(/([?&])ssh-fingerprint=[^&]*/,""),k=L.includes("?");F=L+`${k?"&":"?"}ssh-fingerprint=${o}`}if(d){N();return}this.#t.open(ae,{maxWidth:"500px",data:{title:$localize`The host key has changed`,message:m,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:L=>{if(!L){this.reportNoAction(t,e,n,$localize`The host key was not approved.`);return}N()}})}else{let N=function(){t.next({action:"approve-host-key",targetUrl:e,suggestedUrl:e+`${F?"&":"?"}ssh-fingerprint=${o}`,testAgain:!0,reportedHostKey:o,errorMessage:m,destinationIndex:n}),t.complete()};var c=N;let m=$localize`No certificate was specified, please verify that the reported host key is correct: ${o}`,F=e.includes("?");if(d){N();return}this.#t.open(ae,{maxWidth:"500px",data:{title:$localize`Approve host key?`,message:m,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:A=>{if(!A){this.reportNoAction(t,e,n,$localize`The host key was not approved.`);return}N()}})}}handleGenericError(t,e,n,o,a){function d(){t.next({action:"generic-error",targetUrl:e,testAgain:!1,destinationIndex:n,errorMessage:o}),t.complete()}if(a){d();return}this.#t.open(ae,{maxWidth:"500px",data:{title:$localize`Test connection failed`,message:o,cancelText:$localize`OK`},closed:c=>d()})}handleDestinationErrorv1(t,e,n,o,a,d,c,m){return new dt(F=>{if(t==="missing-folder"){this.handleMissingFolder(F,e,n,o,a,d,c,m);return}if(t.startsWith("incorrect-cert:")){let N=t.split("incorrect-cert:")[1];this.handleMissingCertificate(F,e,a,N,d);return}if(t.startsWith("incorrect-host-key:")){let N=t.split('incorrect-host-key:"')[1].split('",')[0],A=t.split('accepted-host-key:"')[1].split('",')[0];this.handleIncorrectKey(F,e,a,N,A,d);return}this.handleGenericError(F,e,a,t,d)})}static \u0275fac=function(e){return new(e||i)};static \u0275prov=De({token:i,factory:i.\u0275fac,providedIn:"root"})};function Ra(i,t){if(i&1){let e=I();l(0,"sh-alert",13),x(1,0),l(2,"button",14),T("click",function(){S(e);let o=s(2);return f(o.testDestinationClick())}),r(),R(),r()}}function La(i,t){i&1&&(l(0,"sh-alert",13),x(1,1),O(2,"sh-icon"),l(3,"div",15),O(4,"sh-spinner"),r(),R(),r()),i&2&&(_(4),Ct("--spinner-size","16px")("--spinner-thickness","2px"))}function ba(i,t){i&1&&(l(0,"sh-alert",17),D(1,2),r())}function wa(i,t){i&1&&(l(0,"sh-alert",16),D(1,3),r())}function Ga(i,t){if(i&1&&g(0,ba,2,0,"sh-alert",17)(1,wa,2,0,"sh-alert",16),i&2){let e,n=s(4);C((e=n.testResponse())!=null&&e.containsBackup?0:1)}}function $a(i,t){i&1&&(l(0,"sh-alert",18),D(1,4),r())}function va(i,t){i&1&&(l(0,"sh-alert",16),D(1,5),r())}function Ua(i,t){i&1&&(l(0,"sh-alert",17),D(1,6),r())}function ka(i,t){if(i&1&&g(0,$a,2,0,"sh-alert",18)(1,va,2,0,"sh-alert",16)(2,Ua,2,0,"sh-alert",17),i&2){let e,n=s(4);C((e=n.testResponse())!=null&&e.containsBackup?0:(e=n.testResponse())!=null&&e.anyFilesFound?1:2)}}function Va(i,t){i&1&&(l(0,"sh-alert",17),D(1,7),r())}function Ba(i,t){i&1&&(l(0,"sh-alert",16),D(1,8),r())}function Ka(i,t){if(i&1&&g(0,Va,2,0,"sh-alert",17)(1,Ba,2,0,"sh-alert",16),i&2){let e,n=s(4);C((e=n.testResponse())!=null&&e.anyFilesFound?0:1)}}function Ja(i,t){i&1&&(l(0,"sh-alert",17),D(1,9),r())}function Xa(i,t){i&1&&(l(0,"sh-alert",17),D(1,10),r())}function za(i,t){i&1&&(l(0,"sh-alert",17),D(1,11),r())}function Wa(i,t){if(i&1&&g(0,Ja,2,0,"sh-alert",17)(1,Xa,2,0,"sh-alert",17)(2,za,2,0,"sh-alert",17),i&2){let e,n=s(4);C((e=n.testResponse())!=null&&e.containsBackup?0:(e=n.testResponse())!=null&&e.anyFilesFound?1:2)}}function Ha(i,t){if(i&1&&g(0,Ga,2,1)(1,ka,3,1)(2,Ka,2,1)(3,Wa,3,1),i&2){let e=s(3);C(e.testExpectation()==="containsBackup"?0:e.testExpectation()==="destinationEmpty"?1:e.testExpectation()==="destinationNotEmpty"?2:3)}}function ja(i,t){if(i&1){let e=I();x(0,12,1),l(1,"button",14),T("click",function(){S(e);let o=s(4);return f(o.createFolder())}),r(),R()}}function qa(i,t){if(i&1&&(l(0,"sh-alert",16),x(1,12),g(2,ja,2,0,"button",19),R(),r()),i&2){let e=s(3);_(2),C(e.askToCreate()?2:-1)}}function Qa(i,t){if(i&1){let e=I();l(0,"sh-alert",16),p(1),l(2,"button",14),T("click",function(){S(e);let o=s(3);return f(o.useSuggestedUrl())}),p(3,"Approve"),r()()}if(i&2){let e,n=s(3);_(),V(" ",(e=n.testResponse())==null?null:e.errorMessage," ")}}function Ya(i,t){if(i&1){let e=I();l(0,"sh-alert",16),p(1),l(2,"button",14),T("click",function(){S(e);let o=s(3);return f(o.useSuggestedUrl())}),p(3,"Approve"),r()()}if(i&2){let e,n=s(3);_(),V(" ",(e=n.testResponse())==null?null:e.errorMessage," ")}}function Za(i,t){if(i&1){let e=I();l(0,"sh-alert",16),p(1),l(2,"button",14),T("click",function(){S(e);let o=s(3);return f(o.testDestinationClick())}),p(3,"Test again"),r()()}if(i&2){let e,n=s(3);_(),V(" ",(e=n.testResponse())==null?null:e.errorMessage," ")}}function el(i,t){if(i&1&&g(0,Ha,4,1)(1,qa,3,1,"sh-alert",16)(2,Qa,4,1,"sh-alert",16)(3,Ya,4,1,"sh-alert",16)(4,Za,4,1,"sh-alert",16),i&2){let e,n=s(2);C(((e=n.testResponse())==null?null:e.action)==="success"?0:((e=n.testResponse())==null?null:e.action)==="missing-folder"?1:((e=n.testResponse())==null?null:e.action)==="trust-cert"?2:((e=n.testResponse())==null?null:e.action)==="approve-host-key"?3:((e=n.testResponse())==null?null:e.action)==="generic-error"?4:-1)}}function tl(i,t){if(i&1&&g(0,Ra,3,0,"sh-alert",13)(1,La,5,4,"sh-alert",13)(2,el,5,1),i&2){let e=s();C(e.testSignal()===null?0:e.testSignal()==="testing"?1:2)}}var zt=class i{#e=M(Xt);targetUrl=Le.required();testSignal=Le.required();connectionStringId=w(null);backupId=w.required();sourcePrefix=w.required();suppressErrorDialogs=w.required();askToCreate=w.required();readOnlyTest=w.required();testExpectation=w.required();moduleType=w.required();testResponse=P(()=>{let t=this.testSignal();return t&&typeof t!="string"?t:null});isExpectedValidTargetUrl=P(()=>{let t=this.targetUrl();return!(!t||!bt(t))});prevTargetUrl=null;targetUrlEffect=j(()=>{let t=this.targetUrl(),e=this.prevTargetUrl;t!==e&&(this.prevTargetUrl=t,this.testSignal()!=="testing"&&e!==null&&this.testSignal.set(null))});useSuggestedUrl(){let t=this.targetUrl(),e=this.testSignal(),n=e&&typeof e!="string"?e?.targetUrl:null,o=e&&typeof e!="string"?e?.suggestedUrl:null;return!t||!o||n!==t||(this.targetUrl.set(o),this.testDestinationClick()),!1}createFolder(){return this.testDestination(!0),!1}testDestinationClick(){return this.testDestination(!1),!1}testDestination(t){let e=this.targetUrl();if(!e)return;this.testSignal.set("testing");let n=t?"create":this.askToCreate()?"prompt":"error";return new Promise(o=>{this.#e.testDestination(e,this.backupId(),this.connectionStringId(),this.sourcePrefix(),0,this.moduleType(),this.suppressErrorDialogs(),n,this.readOnlyTest())?.subscribe({next:a=>{if(!this.suppressErrorDialogs()&&a.testAgain){let d=a.suggestedUrl;d&&this.targetUrl.set(d),this.testSignal.set("testing"),this.#e.testDestination(d??e,this.backupId(),this.connectionStringId(),this.sourcePrefix(),0,this.moduleType(),this.suppressErrorDialogs(),n,this.readOnlyTest())?.subscribe({next:c=>{this.testSignal.set(c),o(c)}})}else this.testSignal.set(a),o(a)}})})}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=K({type:i,selectors:[["app-test-url"]],inputs:{targetUrl:[1,"targetUrl"],testSignal:[1,"testSignal"],connectionStringId:[1,"connectionStringId"],backupId:[1,"backupId"],sourcePrefix:[1,"sourcePrefix"],suppressErrorDialogs:[1,"suppressErrorDialogs"],askToCreate:[1,"askToCreate"],readOnlyTest:[1,"readOnlyTest"],testExpectation:[1,"testExpectation"],moduleType:[1,"moduleType"]},outputs:{targetUrl:"targetUrlChange",testSignal:"testSignalChange"},decls:1,vars:1,consts:()=>{let t;t=$localize` Make sure to test the configuration ${"\uFFFD#2\uFFFD"}:START_TAG_BUTTON:Test now${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_BUTTON:`;let e;e=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:spinner${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD#3\uFFFD"}:START_TAG_DIV: Testing connection... ${"\uFFFD#4\uFFFD"}:START_TAG_SH_SPINNER:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_SPINNER:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_DIV:`;let n;n=$localize`Success! Test completed, backup found.`;let o;o=$localize`No backup found at the specified destination.`;let a;a=$localize` The remote destination already contains a backup. Please use a different folder for each backup. `;let d;d=$localize` The remote destination is not empty. It is recommended to use an empty folder for the backup. `;let c;c=$localize`Success! Test completed, destination is empty.`;let m;m=$localize`Success! Test completed, destination contains files.`;let F;F=$localize`The remote destination is empty.`;let N;N=$localize`Success! Test completed, backup found.`;let A;A=$localize`Success! Test completed, destination contains files.`;let L;L=$localize`Success! Test completed, destination is empty.`;let k;return k=$localize` The specified folder does not exist. ${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON:Create now${"\uFFFD/#1:1\uFFFD"}:CLOSE_TAG_BUTTON:${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:`,[t,e,n,o,a,d,c,m,F,N,A,L,k,[1,"simple","primary"],["shButton","",1,"primary","small",3,"click"],[1,"testing"],[1,"simple","warn"],[1,"simple","success"],[1,"simple","error"],["shButton","",1,"primary","small"]]},template:function(e,n){e&1&&g(0,tl,3,1),e&2&&C(n.isExpectedValidTargetUrl()?0:-1)},dependencies:[yt,q,ee,Pt],styles:["[_nghost-%COMP%]{display:block}.testing[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:8px;justify-content:space-between}"],changeDetection:0})};function nl(i,t){if(i&1){let e=I();l(0,"app-destination-list",10),T("setDestination",function(o){S(e);let a=s();return f(a.setDestination(o))}),r()}if(i&2){let e=s();u("showAsSources",!0)("moduleType",e.moduleType())}}function il(i,t){if(i&1){let e=I();l(0,"app-destination-list-item",11)(1,"button",8),T("click",function(){S(e);let o=s();return f(o.removeDestination())}),D(2,3),r()(),l(3,"app-test-url",12),U("targetUrlChange",function(o){S(e);let a=s();return $(a.targetUrlModel,o)||(a.targetUrlModel=o),f(o)})("testSignalChange",function(o){S(e);let a=s();return $(a.testSignal,o)||(a.testSignal=o),f(o)}),r(),l(4,"app-single-destination",13),U("targetUrlChange",function(o){S(e);let a=s();return $(a.targetUrlModel,o)||(a.targetUrlModel=o),f(o)}),r()}if(i&2){let e=s();u("targetUrl",e.targetUrlModel()),_(3),v("targetUrl",e.targetUrlModel)("testSignal",e.testSignal),u("backupId",e.backupId())("sourcePrefix",e.sourcePrefix())("suppressErrorDialogs",e.suppressErrorDialogs())("askToCreate",e.askToCreate())("testExpectation",e.expectedResult())("readOnlyTest",!0)("moduleType",e.moduleType()),_(),v("targetUrl",e.targetUrlModel)}}function ol(i,t){i&1&&D(0,2,1)}function al(i,t){i&1&&D(0,2,2)}function ll(i,t){i&1&&D(0,2,3)}function rl(i,t){i&1&&D(0,2,4)}var st=class i{data=w();closed=Fe();targetUrlModel=h(null);moduleType=h("Backend");askToCreate=h(!1);expectedResult=h("any");suppressErrorDialogs=h(!1);backupId=h(null);sourcePrefix=h(null);dataEffect=j(()=>{let t=this.data();t?.targetUrlModel&&this.targetUrlModel.set(t.targetUrlModel),t?.moduleType&&this.moduleType.set(t.moduleType),t?.askToCreate!==null&&t?.askToCreate!==void 0&&this.askToCreate.set(t.askToCreate),t?.expectedResult&&this.expectedResult.set(t.expectedResult),t?.suppressErrorDialogs!==null&&t?.suppressErrorDialogs!==void 0&&this.suppressErrorDialogs.set(t.suppressErrorDialogs),t?.backupId&&this.backupId.set(t.backupId),t?.sourcePrefix&&this.sourcePrefix.set(t.sourcePrefix)});testSignal=h(null);setTargetUrl(t,e=!1){this.targetUrlModel.set(t)}setDestination(t){let e=Lt(t??"");if(e){if(e.mapper.default){let n=e.mapper.default("");this.setTargetUrl(n,!0);return}this.setTargetUrl(`${t}://`,!0)}}submit(){this.closed.emit(this.targetUrlModel())}removeDestination(){this.setTargetUrl(null,!0)}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=K({type:i,selectors:[["app-target-url-dialog"]],inputs:{data:[1,"data"]},outputs:{closed:"closed"},decls:15,vars:6,consts:()=>{let t;t=$localize`Remote source`;let e;e=$localize`Cancel`;let n;n=$localize`${"\uFFFD*11:1\uFFFD"}:START_BLOCK_IF: Use storage destination ${"\uFFFD/*11:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*12:2\uFFFD"}:START_BLOCK_ELSE_IF: Use remote source ${"[\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD]"}:CLOSE_BLOCK_ELSE_IF:${"\uFFFD*13:3\uFFFD"}:START_BLOCK_ELSE_IF_1: Use remote destination ${"[\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD]"}:CLOSE_BLOCK_ELSE_IF:${"\uFFFD*14:4\uFFFD"}:START_BLOCK_ELSE: Use remote URL ${"\uFFFD/*14:4\uFFFD"}:CLOSE_BLOCK_ELSE:`,n=Ke(n);let o;return o=$localize`Change`,[t,e,n,o,[1,"title-30"],["content",""],[3,"showAsSources","moduleType"],["footer","",1,"sticky"],["shButton","","type","button",3,"click"],["shButton","","type","button",1,"raised","primary",3,"click","disabled"],[3,"setDestination","showAsSources","moduleType"],[1,"current-destination",3,"targetUrl"],[3,"targetUrlChange","testSignalChange","targetUrl","testSignal","backupId","sourcePrefix","suppressErrorDialogs","askToCreate","testExpectation","readOnlyTest","moduleType"],[3,"targetUrlChange","targetUrl"]]},template:function(e,n){if(e&1&&(l(0,"header")(1,"h3",4),D(2,0),r()(),l(3,"section",5),g(4,nl,1,2,"app-destination-list",6),g(5,il,5,11),r(),l(6,"footer",7)(7,"button",8),T("click",function(){return n.closed.emit(null)}),D(8,1),r(),l(9,"button",9),T("click",function(){return n.submit()}),x(10,2),g(11,ol,1,0)(12,al,1,0)(13,ll,1,0)(14,rl,1,0),R(),r()()),e&2){let o=!!n.targetUrlModel();_(4),C(o?-1:4),_(),C(o?5:-1),_(4),Ne("loading",n.testSignal()==="testing"),u("disabled",!o||n.testSignal()===null||n.testSignal()==="testing"),_(2),C(n.moduleType()==="Backend"?11:n.moduleType()==="SourceProvider"?12:n.moduleType()==="RestoreDestinationProvider"?13:14)}},dependencies:[Jt,Vt,et,q,zt],styles:["[_nghost-%COMP%]{--dialog-p: 1.5rem;display:flex;flex-direction:column;gap:1rem}header[_ngcontent-%COMP%]{display:flex;padding:1.5rem 1.5rem 0}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}footer[_ngcontent-%COMP%]{z-index:1}"],changeDetection:0})};var sl=["formRef"],_l=()=>({updateOn:"blur",standalone:!0}),Zt=()=>({standalone:!0});function dl(i,t){if(i&1){let e=I();l(0,"button",41),T("click",function(){S(e);let o=s(2);return f(o.openLocalDiskDialog())}),x(1,12),O(2,"sh-icon"),R(),r()}}function cl(i,t){if(i&1){let e=I();g(0,dl,3,0,"button",40),l(1,"button",41),T("click",function(){S(e);let o=s();return f(o.openRemoteDestinationDialog())}),x(2,11),O(3,"sh-icon"),R(),r()}if(i&2){let e=s();C(e.isLocalDiskSupported()?0:-1)}}function ul(i,t){i&1&&D(0,7,1)}function pl(i,t){i&1&&D(0,7,2)}function ml(i,t){i&1&&(l(0,"p",34),D(1,13),r())}function gl(i,t){i&1&&(l(0,"p",34),D(1,14),r())}function Cl(i,t){if(i&1){let e=I();l(0,"sh-form-field")(1,"textarea",42),U("ngModelChange",function(o){S(e);let a=s();return $(a.bulkPaths,o)||(a.bulkPaths=o),f(o)}),T("ngModelChange",function(){S(e);let o=s();return f(o.savePathBulkEdit())}),r()()}if(i&2){let e=s();_(),v("ngModel",e.bulkPaths),u("ngModelOptions",Ie(2,_l))}}function Tl(i,t){if(i&1){let e=I();l(0,"sh-form-field",46)(1,"input",47),U("ngModelChange",function(o){S(e);let a=s(3);return $(a.editingPath,o)||(a.editingPath=o),f(o)}),r()(),l(2,"button",24),T("click",function(){S(e);let o=s(3);return f(o.updatePath())}),l(3,"sh-icon"),p(4,"floppy-disk"),r()(),l(5,"button",24),T("click",function(){S(e);let o=s(3);return f(o.cancelEditPath())}),l(6,"sh-icon"),p(7,"x-bold"),r()()}if(i&2){let e=s(3);_(),v("ngModel",e.editingPath),u("ngModelOptions",Ie(2,Zt))}}function Sl(i,t){if(i&1&&(l(0,"sh-chip"),O(1,"img",48),p(2),r()),i&2){let e=s(2).$implicit,n=s(2);_(),u("src",n.getBackendIcon(e),pt),_(),V(" ",n.getRemotePathDisplayName(e)," ")}}function fl(i,t){if(i&1&&(l(0,"sh-form-field",46),O(1,"input",49),r()),i&2){let e=s(2).$implicit;gt("readonly",!0),_(),u("ngModel",e)("ngModelOptions",Ie(3,Zt))}}function El(i,t){if(i&1){let e=I();g(0,Sl,3,2,"sh-chip")(1,fl,2,4,"sh-form-field",46),l(2,"button",24),T("click",function(){S(e);let o=s().$implicit,a=s(2);return f(a.editPath(o))}),l(3,"sh-icon"),p(4,"pen"),r()(),l(5,"button",24),T("click",function(){S(e);let o=s().$implicit,a=s(2);return f(a.removePath(o))}),l(6,"sh-icon"),p(7,"trash-simple"),r()()}if(i&2){let e=s().$implicit;C(e.startsWith("@")?0:1)}}function hl(i,t){if(i&1&&(l(0,"div",43),g(1,Tl,8,3)(2,El,8,1),r()),i&2){let e=t.$implicit,n=s(2);_(),C(n.oldPath()===e?1:2)}}function Nl(i,t){if(i&1){let e=I();fe(0,hl,3,1,"div",43,Se),l(2,"div",39)(3,"sh-form-field"),O(4,"input",44),r(),l(5,"button",45),T("click",function(){S(e);let o=s();return f(o.addNewPath())}),l(6,"sh-icon"),p(7,"plus"),r()()()}if(i&2){let e=s();Ee(e.nonFilterPaths()),_(4),u("formControl",e.newPathCtrl)}}function Fl(i,t){if(i&1){let e=I();l(0,"div",39)(1,"app-size",50),T("ngModelChange",function(o){S(e);let a=s();return f(a.updateFilesLargerThan(o))}),r()()}if(i&2){let e=s();_(),u("ngModel",e.filesLargerThan())("ngModelOptions",Ie(2,Zt))}}var nt=new Dt,Jn=(i={path:"",filters:[],excludes:{filesLargerThan:null}})=>nt.group({path:nt.control(i.path),excludes:nt.group({filesLargerThan:nt.group({size:nt.control(null),unit:nt.control(null)})})}),Yt=class i{#e=M(Oe);#t=M(Ge);#n=M(we);#i=M(qe);#o=M(Ce);formRef=Pe.required("formRef");sourceDataForm=this.#e.sourceDataForm;sourceDataFormSignal=this.#e.sourceDataFormSignal;newPathCtrl=new Nn("");filesLargerThan=P(()=>{let t=this.sourceDataFormSignal()?.excludes?.filesLargerThan??{};return t.size!==null&&t.unit!==null?`${t.size}${t.unit}`:null});osType=this.#e.osType;pathSignal=Ue(this.sourceDataForm.controls.path.valueChanges);pathArray=P(()=>this.pathSignal()?.split("\0").filter(t=>t.startsWith("-")||t.startsWith("+")||t==="___none___")??[]);nonFilterPaths=P(()=>this.pathSignal()?.split("\0").filter(t=>!t.startsWith("-")&&!t.startsWith("+")&&t!==""));oldPath=h(null);editingPath=h(null);addingNewPath=h(!1);bulkPathEditMode=h(!1);bulkPaths=h("");mobileMenuOpen=h(!1);backupId=this.#e.backupId();isLocalDiskSupported=P(()=>this.#o.systemInfo()?.SourceProviderModules?.find(t=>t.Key=="diskimage"));filters=h([]);#s=j(()=>{let e=this.pathSignal()?.split("\0").filter(n=>n!=="___none___"&&(n.startsWith("-")||n.startsWith("+")))??[];this.filters.set(e)});openRemoteDestinationDialog(){this.#t.open(st,{maxWidth:"700px",maxHeight:"80vh",width:"100%",closeOnOutsideClick:!1,data:{targetUrlModel:null,moduleType:"SourceProvider",askToCreate:!1,expectedResult:"destinationNotEmpty",suppressErrorDialogs:!0,backupId:null,sourcePrefix:null}}).component.closed.subscribe(e=>{if(!e)return;let n=Math.random().toString(36).substring(2,10),o=e.split("://")[0],d=`@${this.#o.systemInfo()?.DirectorySeparator==="\\"?"X:\\":"/"}dupl-${o}-${n}|${e}`;this.addPath(d)})}openLocalDiskDialog(){this.#t.open(rt,{maxWidth:"700px",maxHeight:"80vh",width:"100%",closeOnOutsideClick:!1,data:{initialPath:null}}).closed.subscribe(e=>{if(!e)return;let n=Math.random().toString(36).substring(2,10),a=`@${this.#o.systemInfo()?.DirectorySeparator==="\\"?"X:\\":"/"}dupl-disk-${n}|diskimage://${e}`;this.addPath(a)})}togglePathBulkEdit(){if(this.bulkPathEditMode())this.bulkPathEditMode.set(!1);else{let t=this.nonFilterPaths()?.join(`
10
- `)??"";this.bulkPaths.set(t),this.bulkPathEditMode.set(!0)}}savePathBulkEdit(){let t=this.bulkPaths().split(`
11
- `).filter(a=>a.trim()!=="")??[],e=this.pathArray(),n=[...t,...e],o=[...new Set(n)].join("\0");this.sourceDataForm.controls.path.setValue(o)}editPath(t){if(t&&t.startsWith("@")){let e=t.split("|");if(e.length!==2)return;e[1].startsWith("diskimage://")?this.editLocalDiskSource(t,e[0],e[1].substring(12)):this.editTargetUrlPath(t,e[0],e[1]);return}this.oldPath.set(t),this.editingPath.set(t)}editLocalDiskSource(t,e,n){this.#t.open(rt,{maxWidth:"700px",maxHeight:"80vh",width:"100%",closeOnOutsideClick:!1,data:{initialPath:n}}).closed.subscribe(a=>{if(!a)return;let d=`${e}|diskimage://${a}`,c=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(c?.replace(t,d)??"")})}editTargetUrlPath(t,e,n){this.#t.open(st,{maxWidth:"700px",maxHeight:"80vh",width:"100%",closeOnOutsideClick:!1,data:{targetUrlModel:n,moduleType:"SourceProvider",askToCreate:!1,expectedResult:"destinationNotEmpty",suppressErrorDialogs:!0,backupId:this.#e.backupId(),sourcePrefix:e}}).closed.subscribe(a=>{if(!a)return;let d=`${e}|${a}`,c=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(c?.replace(t,d)??"")})}updateFilesLargerThan(t){let{size:e,unit:n}=wt(t);this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:e,unit:n})}updatePath(){let t=this.oldPath(),e=this.editingPath();if(!t||!e||e===t){this.oldPath.set(null),this.editingPath.set(null);return}let n=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(n?.replace(t,e)??""),this.oldPath.set(null),this.editingPath.set(null)}cancelEditPath(){this.oldPath.set(null),this.editingPath.set(null)}removePath(t){let n=(this.sourceDataForm.controls.path.value??"").split("\0"),o=n.indexOf(t);if(o===-1)return;n.splice(o,1);let a=n.filter(d=>d&&d!=="").join("\0");this.sourceDataForm.controls.path.setValue(a)}addPath(t){let n=[this.sourceDataForm.controls.path.value,t].filter(o=>o&&o!=="").join("\0");this.sourceDataForm.controls.path.setValue(n)}updateFilters(t){let n=[...this.nonFilterPaths()??[],...t].filter(o=>o&&o!=="").join("\0");this.sourceDataForm.controls.path.setValue(n)}getPath(){return this.sourceDataForm.value.path??null}getBackendIcon(t){if(!t)return"";let e=t.split("|")[1];return Rn(e)}getRemotePathDisplayName(t){if(!t)return"";let e=t.split("|")[1];return Ln(e)}toggleFilesLargerThan(t){t?this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:50,unit:"MB"}):this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:null,unit:null})}addNewPath(){let t=this.sourceDataForm.controls.path.value,e=this.newPathCtrl.value,n=t?.split("\0")||[];e&&!n.includes(e)&&n.push(e);let o=n.filter(a=>a&&a!=="").join("\0");this.sourceDataForm.controls.path.setValue(o),this.newPathCtrl.setValue("")}goBack(){this.#n.navigate(["destination"],{relativeTo:this.#i.parent})}next(){this.#e.shouldAutoSave()&&this.#e.submit(!0),this.#n.navigate(["schedule"],{relativeTo:this.#i.parent})}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=K({type:i,selectors:[["app-source-data"]],viewQuery:function(e,n){e&1&&ye(n.formRef,sl,5),e&2&&Ae()},decls:57,vars:18,consts:()=>{let t;t=$localize`Path`;let e;e=$localize`Source Data`;let n;n=$localize`Folder path`;let o;o=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let a;a=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let d;d=$localize`Options`;let c;c=$localize`Paths`;let m;m=$localize`${"\uFFFD#40\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#40\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD*41:1\uFFFD"}:START_BLOCK_IF: Edit contents as list ${"\uFFFD/*41:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*42:2\uFFFD"}:START_BLOCK_ELSE: Edit contents as text ${"\uFFFD/*42:2\uFFFD"}:CLOSE_BLOCK_ELSE:`;let F;F=$localize`Exclude`;let N;N=$localize`Choose if there’s any files you want to exclude.`;let A;A=$localize` Files larger than `;let L;L=$localize`${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:cloud-arrow-down${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SH_ICON: Add remote path `;let k;k=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:hard-drive${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Add local disk `;let y;y=$localize`Manually add a path.`;let J;J=$localize`Edit paths as text, one per line.`;let X;X=$localize`Add a direct path`;let b;return b=$localize`Edit path`,[["formRef",""],e,n,o,a,d,c,m,F,N,A,L,k,y,J,[3,"submit","formGroup"],[1,"left"],[1,"header-row"],[1,"title-30"],["shButton","","type","button",1,"small","ghost","mobile-menu-toggle",3,"click"],[1,"fill",3,"multiSelect","startingPath","showFiles","showUnrootedSources","backupId"],["for","path"],["type","text","id","path","tabindex","4","placeholder",t,"formControlName","path"],[1,"form-actions"],["shButton","","type","button",1,"small",3,"click"],["shButton","","type","submit",1,"raised","primary","small"],[1,"right"],[1,"mobile-header"],["shButton","","type","button",1,"small","ghost",3,"click"],[3,"disableToggle"],["title",""],[1,"spacer"],["shButton","","type","button",1,"small"],["menu",""],["description",""],[1,"paths"],[3,"filtersChange","filters","osType"],["formGroupName","excludes",3,"disableToggle"],[1,"raised","primary",3,"checkedChange","checked"],[1,"row-inputs"],["shButton","","type","button",1,"small","rowbutton"],["shButton","","type","button",1,"small","rowbutton",3,"click"],["wrap","off","rows","10",1,"bulk-textarea",3,"ngModelChange","ngModel","ngModelOptions"],[1,"path"],["type","text","placeholder",X,3,"formControl"],["shButton","","type","button",1,"raised","primary",3,"click"],[1,"small"],["type","text","placeholder",b,3,"ngModelChange","ngModel","ngModelOptions"],["alt","Provider icon",1,"provider-icon",3,"src"],["type","text",3,"ngModel","ngModelOptions"],[3,"ngModelChange","ngModel","ngModelOptions"]]},template:function(e,n){if(e&1){let o=I();l(0,"form",15,0),T("submit",function(){return n.next()}),l(2,"div",16)(3,"div",17)(4,"h3",18),D(5,1),r(),l(6,"button",19),T("click",function(){return n.mobileMenuOpen.set(!0)}),l(7,"sh-icon"),p(8,"sliders"),r()()(),l(9,"app-file-tree",20)(10,"label",21),D(11,2),r(),O(12,"input",22),r(),l(13,"div",23)(14,"button",24),T("click",function(){return n.goBack()}),x(15,3),O(16,"sh-icon"),R(),r(),l(17,"button",25),x(18,4),O(19,"sh-icon"),R(),r()()(),l(20,"div",26)(21,"div",27)(22,"span",18),D(23,5),r(),l(24,"button",28),T("click",function(){return n.mobileMenuOpen.set(!1)}),l(25,"sh-icon"),p(26,"x-bold"),r()()(),l(27,"app-toggle-card",29),pe(28,30),l(29,"span"),D(30,6),r(),O(31,"div",31),g(32,cl,4,1),l(33,"sh-menu")(34,"button",32)(35,"sh-icon"),p(36,"dots-three-vertical"),r()(),pe(37,33),l(38,"button",24),T("click",function(){return n.togglePathBulkEdit()}),x(39,7),O(40,"sh-icon"),g(41,ul,1,0)(42,pl,1,0),R(),r(),de(),r(),de(),g(43,ml,2,0,"p",34)(44,gl,2,0,"p",34),l(45,"div",35),g(46,Cl,2,3,"sh-form-field")(47,Nl,8,1),r()(),l(48,"app-filters",36),U("filtersChange",function(d){return S(o),$(n.filters,d)||(n.filters=d),f(d)}),T("filtersChange",function(d){return n.updateFilters(d)}),r(),l(49,"app-toggle-card",37),pe(50,30),D(51,8),de(),l(52,"p",34),D(53,9),r(),l(54,"sh-toggle",38),T("checkedChange",function(d){return n.toggleFilesLargerThan(d)}),D(55,10),r(),g(56,Fl,2,3,"div",39),r()()()}e&2&&(u("formGroup",n.sourceDataForm),_(9),u("multiSelect",!0)("startingPath",n.getPath())("showFiles",!0)("showUnrootedSources",!0)("backupId",n.backupId),_(11),Ne("open",n.mobileMenuOpen()),_(7),u("disableToggle",!0),_(5),C(n.bulkPathEditMode()?-1:32),_(9),C(n.bulkPathEditMode()?41:42),_(2),C(n.bulkPathEditMode()?44:43),_(3),C(n.bulkPathEditMode()?46:47),_(2),v("filters",n.filters),u("osType",n.osType()??""),_(),u("disableToggle",!0),_(5),u("checked",n.filesLargerThan()!==null),_(2),C(n.filesLargerThan()?56:-1))},dependencies:[ie,Et,Y,Z,ft,ne,Qe,Fn,Ft,Nt,Dn,ue,ee,q,ve,Ye,kt,ke,ze,Gt,At],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;width:100%;flex:1 0;overflow:hidden}form[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;flex:1 0;overflow:hidden}@media only screen and (max-width:768px){form[_ngcontent-%COMP%]{display:block;position:relative}}.right[_ngcontent-%COMP%], .left[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:1.5rem}.header-row[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.mobile-header[_ngcontent-%COMP%]{display:none}@media only screen and (max-width:768px){.mobile-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-bottom:1.5rem}}.mobile-menu-toggle[_ngcontent-%COMP%]{display:none}@media only screen and (max-width:768px){.mobile-menu-toggle[_ngcontent-%COMP%]{display:inline-flex}}.left[_ngcontent-%COMP%]{padding:2.5rem;overflow:hidden;border-right:1px solid var(--base-4)}@media only screen and (max-width:768px){.left[_ngcontent-%COMP%]{border-right:none;padding:1.5rem 1.5rem 4.5rem;height:100%;width:100%}}.right[_ngcontent-%COMP%]{padding:2.5rem 1.5rem;overflow:auto}@media only screen and (max-width:768px){.right[_ngcontent-%COMP%]{position:absolute;inset:0;z-index:10;background:var(--base-1);padding:1.5rem;transform:translate(100%);transition:transform .3s cubic-bezier(.4,0,.2,1)}.right.open[_ngcontent-%COMP%]{transform:translate(0)}}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}sh-divider[_ngcontent-%COMP%]{margin:.75rem 0}.row-inputs[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr min-content;gap:.25rem}.path[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr min-content min-content;gap:.25rem;align-items:center}.path[_ngcontent-%COMP%] sh-chip[_ngcontent-%COMP%]{width:100%}.path[_ngcontent-%COMP%] .provider-icon[_ngcontent-%COMP%]{width:1rem;height:1rem;margin-right:.5rem}.bulk-textarea[_ngcontent-%COMP%]{width:100%;font-family:monospace;min-height:12.5rem}.paths[_ngcontent-%COMP%]{max-height:200px;overflow-y:auto;display:flex;flex-direction:column;gap:.5rem}"],changeDetection:0})};var Xn="1W:1D,4W:1W,12M:1M",en=!1,Oe=class i{#e=M(we);#t=M(Ce);#n=M(Ge);#i=M(xt);#o=M(Rt);#s=M($t);#a=M(Ze);generalForm=zn();sourceDataForm=Jn();scheduleFields=Qt();scheduleType=h("daily");settings=h([]);optionsFields={backupRetention:h("all"),backupRetentionTime:h(""),backupRetentionVersions:h(0),backupRetentionCustom:h("")};targetUrls=h([]);targetUrlModel=P(()=>this.targetUrls()[0]?.url??null);connectionStringId=P(()=>this.targetUrls()[0]?.connectionStringId??null);targetUrlTestSignal=h(null);backupMetadata=h(null);isDraft=h(!1);backupId=h(null);backupName=P(()=>this.generalFormSignal()?.name??"");isSubmitting=h(!1);finishedLoading=h(!1);backupDefaults=h(null);applicationOptions=h(null);isNew=P(()=>this.backupId()==="new");shouldAutoSave=P(()=>!this.isDraft()&&!this.isNew());osType=P(()=>this.#t.systemInfo()?.OSType);isConnectionStringSaved=P(()=>{let t=this.targetUrlModel();return t?this.#a.destinations().some(e=>e.BaseUrl===t):!1});selectedOptions=h([]);sourceDataFormSignal=Ue(this.sourceDataForm.valueChanges);generalFormSignal=Ue(this.generalForm.valueChanges);encryptionFieldSignal=Ue(this.generalForm.controls.encryption.valueChanges);advancedOptions=P(()=>this.#t.systemInfo()?.Options?.map(this.#u)??[]);#l=h(null);#r=null;testSignal=this.#l.asReadonly();#_=j(()=>{let t=this.targetUrlModel(),e=this.#l(),n=this.#r;this.#r=t,!(e==="testing"||n===null||n===t)&&this.#l.set(null)});#g=j(()=>{let t=this.targetUrlModel(),e=this.connectionStringId();if(e){let n=this.#a.destinations();if(n.length===0)return;let o=n.find(a=>a.ID===e);!o||o.BaseUrl}});setTestState(t){this.#l.set(t)}#u(t){return{name:t.Name,type:t.Type,shortDescription:t.ShortDescription??void 0,longDescription:t.LongDescription??void 0,options:t.ValidValues}}encryptionOptions=P(()=>{let t=this.#t.systemInfo()?.EncryptionModules??[];return[_t,...t]});nonSelectedOptions=P(()=>this.advancedOptions().sort((t,e)=>t?.name&&e?.name?t?.name.localeCompare(e?.name):0).filter(t=>this.selectedOptions()?.findIndex(e=>e.name===t.name)===-1));submit(t=!1){this.isSubmitting.set(!0),this.#p().pipe(ct(e=>{let n=this.#d(),o=this.backupId(),a=n;if(a.Backup){e.length>0&&e[0]!==null?n.Backup.ConnectionStringID=e[0]:e.length>0&&e[0]===null&&(n.Backup.ConnectionStringID=void 0);let c=this.targetUrls().slice(1).map((m,F)=>{let N=e[F+1];return{TargetUrl:m.url,ConnectionStringID:N??void 0,UrlKey:m.urlKey}});c.length>0&&(a.Backup.AdditionalTargetURLs=c)}return this.isDraft()&&n.Backup&&(n.Backup.Metadata=this.backupMetadata()),o==="new"||!o||this.isDraft()?this.#i.postApiV1Backups({requestBody:n}):this.#i.putApiV1BackupById({id:o,requestBody:n})}),Be(()=>this.isSubmitting.set(!1))).subscribe({next:()=>{t||this.exit(!1)},error:()=>{}})}validateBeforeSubmit(){this.generalForm.markAllAsTouched(),this.sourceDataForm.markAllAsTouched();let t=this.#d(),e=(t.Backup.Name??"").trim()!=="",o=(this.generalForm.controls.encryption.value!==""&&this.generalForm.controls.encryption.value!=="-")===!1||this.generalForm.controls.password.value===this.generalForm.controls.repeatPassword.value&&this.generalForm.controls.password.value!=="";if(!e||!o)return this.#n.open(ae,{data:{title:$localize`Validation Error`,message:this.isNew()?$localize`Please fix the errors indicated before creating the backup.`:$localize`Please fix the errors indicated before saving.`,confirmText:$localize`OK`}}),"general";let a=this.targetUrls();if(!(a.length>0&&a.some(m=>m.url.trim()!=="")))return this.#n.open(ae,{data:{title:$localize`Destination required`,message:this.isNew()?$localize`You must setup a destination before creating the backup.`:$localize`Please setup a destination before saving.`,confirmText:$localize`OK`}}),"destination";var c=(t.Backup.Sources??[]).filter(m=>m.trim()!=="").length>0;return!c||!this.sourceDataForm.valid?(this.#n.open(ae,{data:{title:$localize`Source data required`,message:this.isNew()?$localize`You must setup source data before creating the backup.`:$localize`Please add at least one source path before saving.`,confirmText:$localize`OK`}}),"source"):""}exit(t){if(!t){this.#c(),this.#e.navigate(["/"]);return}this.#n.open(ae,{data:{title:$localize`Confirm exit?`,message:$localize`Are you sure you want to exit?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:e=>{e&&(this.#c(),this.#e.navigate(["/"]))}})}mapSourceDataToForm(t){let e=t.Sources??"",n=t.Filters?.map(d=>`${d.Include?"+":"-"}${d.Expression}`)??[],o=t.Settings?.find(d=>d.Name==="--skip-files-larger-than")?.Value?.toUpperCase()??null,a={path:[...e,...n].join("\0"),excludes:{filesLargerThan:o===null?void 0:wt(o)}};this.sourceDataForm.patchValue(a)}mapDestinationToForm(t){let e=t,n=t.TargetURL??"",o=(t.ConnectionStringID===-1?null:t.ConnectionStringID)??null,a=n?[{url:n,connectionStringId:o,urlKey:null,save:!!o}]:[],d=e.AdditionalTargetURLs?.map(c=>({url:c.TargetUrl,urlKey:c.UrlKey,connectionStringId:c.ConnectionStringID??null,save:!!c.ConnectionStringID}))??[];this.targetUrls.set([...a,...d])}mapGeneralToForm(t){let e=t.Name??"",n=t.Description??"",o=t.Settings?.find(m=>m.Name==="encryption-module"),a=t.Settings?.find(m=>m.Name==="passphrase")?.Value??"",d=o?.Value&&o.Value.length?o.Value:"",c={name:t.Name??"",description:t.Description??""};e&&e!==""&&(c.name=e),n&&n!==""&&(c.description=n),d&&d!==""&&(c.encryption=d),a&&a!==""&&(c.password=a,c.repeatPassword=a),this.generalForm.patchValue(c)}mapScheduleToForm(t){if(!t){this.scheduleType.set("disabled"),this.scheduleFields.autoRun.set(!1);return}let e=this.#s.fromString(t.Repeat)??null,n=this.#m(t.Time);this.scheduleFields.autoRun.set(!0),n.date&&this.scheduleFields.nextTime.date.set(n.date),this.scheduleFields.nextTime.time.set(n.time),this.scheduleFields.runAgain.repeatUnit.set(e?.unit??"D"),this.scheduleFields.runAgain.repeatValue.set(e?.value??1),this.scheduleFields.runAgain.allowedDays.mon.set(t.AllowedDays?.includes("mon")??!1),this.scheduleFields.runAgain.allowedDays.tue.set(t.AllowedDays?.includes("tue")??!1),this.scheduleFields.runAgain.allowedDays.wed.set(t.AllowedDays?.includes("wed")??!1),this.scheduleFields.runAgain.allowedDays.thu.set(t.AllowedDays?.includes("thu")??!1),this.scheduleFields.runAgain.allowedDays.fri.set(t.AllowedDays?.includes("fri")??!1),this.scheduleFields.runAgain.allowedDays.sat.set(t.AllowedDays?.includes("sat")??!1),this.scheduleFields.runAgain.allowedDays.sun.set(t.AllowedDays?.includes("sun")??!1);let o=lt(this.scheduleFields),a=vt.find(d=>JSON.stringify(d.data)===JSON.stringify(o));a?this.scheduleType.set(a.value):this.scheduleType.set("custom")}mapOptionsToForms(t,e=!1){let n=["--no-encryption","--skip-files-larger-than","passphrase","keep-time","keep-versions","retention-policy"],o=(t.Settings??[]).map(m=>m);if(e){let m=this.#o.serverSettings()??{};Object.keys(m).filter(F=>F.startsWith("--")).forEach(F=>{o.find(A=>A.Name===F)||o.push({Name:F,Value:m[F],Filter:null})})}let a=o.filter(m=>!n.includes(m.Name)),d=o.filter(m=>n.includes(m.Name));this.settings.set(a??[]),a?.forEach(m=>{if(m.Name==="encryption-module"&&this.isNew())return this.generalForm.controls.encryption.setValue(m.Value??"")});var c="all";d?.forEach(m=>{if(m.Name==="keep-time"&&(m.Value??"")!=="")return c="time",this.optionsFields.backupRetentionTime.set(m.Value??"");if(m.Name==="keep-versions"&&(m.Value??"")!=="")return c="versions",this.optionsFields.backupRetentionVersions.set(m.Value?parseInt(m.Value):null);if(m.Name==="retention-policy"&&(m.Value??"")!=="")if(m.Value===Xn)c="smart";else return c="custom",this.optionsFields.backupRetentionCustom.set(m.Value??"")}),this.optionsFields.backupRetention.set(c)}storeMetadata(t,e){this.backupMetadata.set(e?t.Metadata??null:null)}getScheduleFormValue(){let t=lt(this.scheduleFields);return Kn(t)}#d(){let t=this.generalForm.value,e=this.getScheduleFormValue(),n=this.sourceDataForm.value,a=this.targetUrls()[0],d=a?.url??null,c=n.path?.split("\0")??[],m=this.mapFormsToSettings(),F=n.excludes?.filesLargerThan;return F&&F.size!==null&&F.unit!==null&&m.push({Name:"--skip-files-larger-than",Value:`${F.size}${F.unit}`}),{Backup:{Name:t.name,Description:t.description,TargetURL:d??null,ConnectionStringID:a?.connectionStringId??null,Sources:c.filter(N=>!(N.startsWith("-")||N.startsWith("+"))),Settings:m,Filters:c.filter(N=>N.startsWith("-")||N.startsWith("+")).map((N,A)=>({Order:A,Include:N.startsWith("+"),Expression:N.slice(1)}))},Schedule:e}}mapFormsToSettings(t=[]){let e=this.generalForm.value,n=["dblock-size","compression-module"],o=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than","encryption-module","passphrase","keep-time","keep-versions","retention-policy",...n,...n.map(N=>`--${N}`)],a=[{Name:"--no-encryption",Value:"True"}];e.encryption!==""&&e.encryption!==_t.Key&&(a=[{Name:"encryption-module",Value:e.encryption??null},{Name:"passphrase",Value:e.password??null}]);let d=n.map(N=>{let A=this.settings().find(L=>L.Name===N||L.Name==="--"+N);return A?{Name:N,Value:A.Value}:null}).filter(N=>N!==null),c=[];switch(this.optionsFields.backupRetention()){case"time":c.push({Name:"keep-time",Value:this.optionsFields.backupRetentionTime()});break;case"versions":c.push({Name:"keep-versions",Value:this.optionsFields.backupRetentionVersions()?.toString()??""});break;case"custom":c.push({Name:"retention-policy",Value:this.optionsFields.backupRetentionCustom()});break;case"smart":c.push({Name:"retention-policy",Value:Xn});break}let m=[...t,...o],F=this.settings().filter(N=>!m.includes(N.Name)).map(N=>{let A=N.Value;return typeof N.Value=="number"&&(A=N.Value.toString()),typeof N.Value=="boolean"&&(A=N.Value?"True":"False"),{Name:N.Name?.startsWith("--")?N.Name:`--${N.Name}`,Value:A}});return[...a,...d,...c,...F]}#p(){let t=this.targetUrls();if(t.length===0)return Ve([]);let e=t.map(n=>{if(n.connectionStringId)return Ve(n.connectionStringId);if(!n.save)return Ve(null);let o=n.url,d=Xe(o)?.displayName??"Destination",m=this.#a.destinations().filter(A=>A.Name?.startsWith(d)).length,N={Name:`${d} ${new Date().toISOString()}`,Description:null,BaseUrl:o};return this.#a.save("new",N).pipe(ot(A=>A.Data?.ID??null))});return _n(e).pipe(pn(n=>{let o=this.targetUrls();n.forEach((a,d)=>{if(a&&d<o.length&&(this.#a.reload(),o[d].connectionStringId!==a)){let c=o[d].urlKey;this.updateTargetUrl(d,o[d].url,a,c)}})}))}#m(t){if(!t||t?.indexOf("T")===-1)return{time:t??"13:00"};let e=new Date(t);return{time:`${(""+e.getHours()).padStart(2,"0")}:${(""+e.getMinutes()).padStart(2,"0")}`,date:`${(""+e.getFullYear()).padStart(4,"0")}-${(""+(e.getMonth()+1)).padStart(2,"0")}-${(""+e.getDate()).padStart(2,"0")}`}}setTargetUrl(t,e=!1,n=null,o=null){if(e&&(this.#r=null),t===null){this.targetUrls.set([]);return}this.targetUrls.update(a=>{let d=[...a];return d.length===0?d.push({url:t,urlKey:o,connectionStringId:n,save:n?!0:en}):d[0]={url:t,urlKey:o,connectionStringId:n,save:n?!0:en},d})}addTargetUrl(t,e,n){this.targetUrls.update(o=>[...o,{url:t,connectionStringId:e,urlKey:n,save:e?!0:en}])}updateTargetUrl(t,e,n,o){this.targetUrls.update(a=>{if(t<0||t>=a.length)return a;let d=[...a],c=d[t].save;return d[t]={url:e,connectionStringId:n,urlKey:o,save:n?!0:c},d})}toggleSaveConnectionString(t){this.targetUrls.update(e=>{if(t<0||t>=e.length)return e;let n=[...e];return n[t]=le(W({},n[t]),{save:!n[t].save}),n})}removeTargetUrl(t){this.targetUrls.update(e=>e.filter((n,o)=>o!==t))}#c(){this.generalForm.reset(),this.sourceDataForm.reset(),this.scheduleFields=Qt(),this.optionsFields.backupRetention.set("all"),this.settings.set([]),this.targetUrls.set([])}static \u0275fac=function(e){return new(e||i)};static \u0275prov=De({token:i,factory:i.\u0275fac,providedIn:"root"})};var Dl=["formRef"];function yl(i,t){i&1&&(l(0,"sh-alert",17),x(1,5),O(2,"sh-icon",26),R(),r())}function Al(i,t){if(i&1&&p(0),i&2){let e=t.$implicit;V(" ",e.DisplayName," ")}}function Il(i,t){if(i&1&&O(0,"sh-progress-bar",40),i&2){let e=s(3);Ne("error",e.calculatePasswordStrength()===1)("warn",e.calculatePasswordStrength()===2)("primary",e.calculatePasswordStrength()===4)("success",e.calculatePasswordStrength()===5),u("value",e.calculatePasswordStrength()*(100/5))}}function Pl(i,t){i&1&&(l(0,"span",35),D(1,10),r())}function Ol(i,t){i&1&&(x(0,8,1),O(1,"sh-icon"),R())}function Ml(i,t){i&1&&(x(0,8,2),O(1,"sh-icon"),R())}function xl(i,t){i&1&&(x(0,11,1),O(1,"sh-icon",42),R())}function Rl(i,t){i&1&&(x(0,11,2),O(1,"sh-icon"),R())}function Ll(i,t){if(i&1){let e=I();l(0,"button",41),T("click",function(){S(e);let o=s(3);return f(o.copyPassword())}),x(1,11),g(2,xl,2,0)(3,Rl,2,0),R(),r()}if(i&2){let e=s(3);_(2),C(e.copiedPassword()?2:3)}}function bl(i,t){i&1&&(l(0,"sh-alert",39),D(1,12),r())}function wl(i,t){if(i&1){let e=I();l(0,"div",30)(1,"sh-form-field")(2,"label",31),x(3,7),O(4,"sup"),R(),r(),O(5,"input",32),r(),g(6,Il,1,9,"sh-progress-bar",33),l(7,"sh-form-field"),O(8,"input",34),g(9,Pl,2,0,"span",35),r(),l(10,"div",36)(11,"button",37),T("click",function(){S(e);let o=s(2);return f(o.showPassword.set(!o.showPassword()))}),x(12,8),g(13,Ol,2,0)(14,Ml,2,0),R(),r(),l(15,"button",37),T("click",function(){S(e);let o=s(2);return f(o.generatePassword())}),x(16,9),O(17,"sh-icon"),R(),r(),g(18,Ll,4,1,"button",38),r(),g(19,bl,2,0,"sh-alert",39),r()}if(i&2){let e=s(2);_(5),u("type",e.showPassword()?"text":"password"),_(),C(e.generalForm.value.password?6:-1),_(2),u("type",e.showPassword()?"text":"password"),_(),C(e.generalForm.value.repeatPassword&&e.generalForm.value.repeatPassword!==e.generalForm.value.password?9:-1),_(4),C(e.showPassword()?13:14),_(5),C(e.showCopyPassword()?18:-1),_(),C(e.generalForm.value.password&&e.generalForm.value.password===e.generalForm.value.repeatPassword?19:-1)}}function Gl(i,t){if(i&1&&(l(0,"sh-select",27)(1,"label",28),D(2,6),r(),O(3,"input",29),H(4,Al,1,1,"ng-template"),r(),g(5,wl,20,7,"div",30)),i&2){let e=s();u("options",e.encryptionOptions())("isClearable",!1),_(5),C(e.encryptionFieldSignal()!==e.noneOptionKey?5:-1)}}function $l(i,t){if(i&1&&(l(0,"button",24),x(1,13),O(2,"sh-icon"),R(),r()),i&2){let e=s();u("disabled",e.nameAndDescriptionValid()===!1)}}function vl(i,t){if(i&1&&(l(0,"button",25),x(1,14),O(2,"sh-icon"),R(),r()),i&2){let e=s();u("disabled",e.generalForm.invalid||e.showCopyPassword()&&!e.copiedPassword())}}var it=new Dt,zn=(i={name:"",description:"",encryption:"",password:"",repeatPassword:"",compression:""})=>it.group({name:it.control(i.name,[St.required]),description:it.control(i.description),encryption:it.control(i.encryption,[Vn()]),password:it.control(i.password,[jt(t=>t?.value.encryption!=="-",[St.required])]),repeatPassword:it.control(i.repeatPassword,[jt(t=>t?.value.encryption!=="-",[St.required])])}),_t={Key:"-",DisplayName:"None"},tn=class i{#e=M(we);#t=M(qe);#n=M(kn);#i=M(Oe);formRef=Pe.required("formRef");generalForm=this.#i.generalForm;generalFormSignal=this.#i.generalFormSignal;encryptionFieldSignal=this.#i.encryptionFieldSignal;encryptionOptions=this.#i.encryptionOptions;isNew=this.#i.isNew;showPassword=h(!1);copiedPassword=h(!1);showCopyPassword=h(!1);noneOptionKey=_t.Key;encryptionEffect=j(()=>{this.encryptionFieldSignal()===_t.Key&&(this.copiedPassword.set(!1),this.showCopyPassword.set(!1))});nameAndDescriptionValid=P(()=>{let t=this.generalFormSignal(),e=this.generalForm.controls;return e?.name&&e.name.valid&&e?.description&&e.description.valid});calculatePasswordStrength=P(()=>{let e=this.generalFormSignal()?.password??"";return this.#n.calculatePasswordStrength(e)});ngOnInit(){this.formRef().nativeElement.focus()}exit(){this.#i.exit(!0)}async copyPassword(){let t=this.generalForm.controls.password.value;await this.#o(t??""),this.copiedPassword.set(!0)}async#o(t){try{await navigator.clipboard.writeText(t)}catch{try{let n=document.createElement("textarea");n.value=t,document.body.appendChild(n),n.select(),document.execCommand("copy"),document.body.removeChild(n)}catch(n){console.error("Failed to copy text: ",n)}}}generatePassword(){this.copiedPassword.set(!1);let t=this.#n.generate(41);this.generalForm.controls.password.setValue(t),this.generalForm.controls.repeatPassword.setValue(t),this.showCopyPassword.set(!0)}next(){this.#i.shouldAutoSave()&&this.#i.submit(!0),this.#e.navigate(["destination"],{relativeTo:this.#t.parent})}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=K({type:i,selectors:[["app-general"]],viewQuery:function(e,n){e&1&&ye(n.formRef,Dl,5),e&2&&Ae()},decls:21,vars:4,consts:()=>{let t;t=$localize`Your backup name`;let e;e=$localize`Your backup description`;let n;n=$localize`Remember to copy the password`;let o;o=$localize`General backup settings`;let a;a=$localize` Backup name ${"\uFFFD#8\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#8\uFFFD"}:CLOSE_SUPERSCRIPT:`;let d;d=$localize`Backup description`;let c;c=$localize`${"\uFFFD#18\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SH_ICON: Exit `;let m;m=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:lock${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Encrypted backup `;let F;F=$localize`Encryption`;let N;N=$localize`Encryption`;let A;A=$localize`Password`;let L;L=$localize`Repeat password`;let k;k=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let y;y=$localize`${"\uFFFD*13:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:eye-slash${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Hide ${"\uFFFD/*13:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*14:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:eye${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Show ${"\uFFFD/*14:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,y=Ke(y);let J;J=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SH_ICON:password${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SH_ICON: Generate password `;let X;X=$localize`Passwords do not match`;let b;b=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SH_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Copied password ${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SH_ICON_1:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Copy password ${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,b=Ke(b);let G;G=$localize` Tip: Be sure to save your password. If you lose it, you will lose access to your backups. `;let Me;Me=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let xe;return xe=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`,[["formRef",""],o,a,d,c,m,N,k,y,J,X,b,G,Me,xe,["autocomplete","off",3,"submit","formGroup"],[1,"title-30"],[1,"primary"],["for","backupName"],["type","text","tabindex","1","placeholder",t,"formControlName","name"],["for","backupDescription"],["id","backupDescription","tabindex","2","placeholder",e,"formControlName","description"],[1,"form-actions"],["type","button","shButton","",3,"click"],["shButton","","type","submit",1,"raised","primary",3,"disabled"],["shButton","","type","submit","shTooltip",n,1,"raised","primary",3,"disabled"],["icon",""],["value","Key","label","DisplayName",3,"options","isClearable"],["for","encryption"],["type","text","id","encryption","tabindex","3","placeholder",F,"formControlName","encryption"],[1,"passwords"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",A,"formControlName","password",3,"type"],[1,"raised",3,"error","warn","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",L,"formControlName","repeatPassword",3,"type"],["error",""],[1,"password-actions"],["shButton","","type","button",1,"small",3,"click"],["shButton","","type","button",1,"small","copy"],["type","primary"],[1,"raised",3,"value"],["shButton","","type","button",1,"small","copy",3,"click"],[1,"sh-success"]]},template:function(e,n){if(e&1&&(l(0,"form",15,0),T("submit",function(){return n.next()}),l(2,"h3",16),D(3,1),r(),g(4,yl,3,0,"sh-alert",17),l(5,"sh-form-field")(6,"label",18),x(7,2),O(8,"sup"),R(),r(),O(9,"input",19),r(),l(10,"sh-form-field")(11,"label",20),D(12,3),r(),O(13,"textarea",21),r(),g(14,Gl,6,3),l(15,"div",22)(16,"button",23),T("click",function(){return n.exit()}),x(17,4),O(18,"sh-icon"),R(),r(),g(19,$l,3,1,"button",24)(20,vl,3,1,"button",25),r()()),e&2){let o;u("formGroup",n.generalForm),_(4),C(!n.isNew()&&((o=n.generalFormSignal())==null?null:o.encryption)!==""?4:-1),_(10),C(n.isNew()?14:-1),_(5),C(n.encryptionFieldSignal()===n.noneOptionKey||!n.isNew()?19:20)}},dependencies:[Qe,Et,Y,Z,ft,Ft,Nt,ue,$e,q,ee,It,yt,Mt],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding-bottom:1.5rem}sup[_ngcontent-%COMP%]{padding:0 .125rem;color:var(--error-8)}.passwords[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.password-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.copy[_ngcontent-%COMP%] sh-icon.sh-success[_ngcontent-%COMP%]{color:var(--success-8)}"],changeDetection:0})};export{Ze as a,et as b,Vt as c,zn as d,_t as e,tn as f,vt as g,Kn as h,Qt as i,qt as j,ze as k,kt as l,zt as m,st as n,Jn as o,Yt as p,Oe as q,Jt as r};
package/chunk-B4QFOJXL.js DELETED
@@ -1 +0,0 @@
1
- import{a as u}from"./chunk-XWML36YQ.js";import{$ as p,kb as m}from"./chunk-K5XGRFWJ.js";var c=class s{#n=p(u);transform(r,t=!1,...d){if(!r)return"";let n=/^\s*(?:(\d+)\.)?(\d{1,2}):(\d{2}):(\d{2})(?:\.\d+)?\s*$/.exec(r);if(!n)return"";let e=parseInt(n[1]??"0",10),i=parseInt(n[2],10),o=parseInt(n[3],10),a=parseInt(n[4],10);return t?`${e?`${e}d `:""}${i}h ${o}m ${a}s`:this.#n.duration({days:e,hours:i,minutes:o,seconds:a}).humanize()}static \u0275fac=function(t){return new(t||s)};static \u0275pipe=m({name:"durationFormat",type:s,pure:!0})};export{c as a};
package/chunk-BPHX6VXP.js DELETED
@@ -1 +0,0 @@
1
- import{a as s}from"./chunk-XWML36YQ.js";import{ha as o}from"./chunk-YF6JHIN5.js";import{$ as e,kb as i}from"./chunk-K5XGRFWJ.js";var m=class n{#t=e(s);#r=e(o);convertTimestamp(t){let r=/^(\d{4})(\d{2})(\d{2})T(\d{2})(\d{2})(\d{2})Z$/.exec(t);if(r){let[a,p,f,c,d,u,h]=r;return`${p}-${f}-${c}T${d}:${u}:${h}Z`}return t}transform(t,r=!1,...a){return t?r?this.#r.transform(t,"short"):(this.#t.locale(),typeof t=="string"&&(t=this.convertTimestamp(t)),this.#t(t).fromNow()):"N/A"}static \u0275fac=function(r){return new(r||n)};static \u0275pipe=i({name:"relativeTime",type:n,pure:!0})};export{m as a};