@duplicati/ngclient 0.0.181 → 0.0.183

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 (48) hide show
  1. package/{chunk-PCFTQ4BE.js → chunk-4GDXGM4L.js} +1 -1
  2. package/{chunk-3U36LG4E.js → chunk-5Y3YA4IZ.js} +1 -1
  3. package/chunk-6K3PRIYO.js +1 -0
  4. package/{chunk-JGQOVZKK.js → chunk-AESH2EML.js} +1 -1
  5. package/{chunk-YEYDDZIG.js → chunk-AEVJZNUY.js} +1 -1
  6. package/{chunk-H4TNKM4Y.js → chunk-APZXLYUU.js} +1 -1
  7. package/{chunk-NDPFWL4Y.js → chunk-BNQSW4G5.js} +1 -1
  8. package/{chunk-SBWCJMHH.js → chunk-BXWAVFI6.js} +1 -1
  9. package/{chunk-KSMDO4WE.js → chunk-CRIAZIHV.js} +1 -1
  10. package/{chunk-XADL5RYU.js → chunk-CU5GQUSX.js} +1 -1
  11. package/{chunk-TT4FAVLM.js → chunk-D3VVL4NK.js} +1 -1
  12. package/{chunk-6AJQBDVV.js → chunk-DH6M7Y7C.js} +1 -1
  13. package/{chunk-XKHIN6T2.js → chunk-DNHCL3D4.js} +1 -1
  14. package/{chunk-5YSRDRTE.js → chunk-EYIHDNRT.js} +1 -1
  15. package/{chunk-LMCAVLBO.js → chunk-FNIOBDFO.js} +1 -1
  16. package/{chunk-LDLSFKM4.js → chunk-FPKRDCQ6.js} +1 -1
  17. package/chunk-FRN7G2XC.js +1 -0
  18. package/{chunk-4NN5ZM73.js → chunk-FVZOIWTT.js} +1 -1
  19. package/{chunk-JJJ5UALU.js → chunk-G4BVOKDI.js} +1 -1
  20. package/{chunk-FQYMMYS4.js → chunk-G4PJG5YL.js} +1 -1
  21. package/{chunk-3BGJPVDV.js → chunk-GCL5YZGN.js} +1 -1
  22. package/{chunk-LX37357J.js → chunk-GG3FXQPK.js} +1 -1
  23. package/{chunk-JW4235US.js → chunk-GXYICCA6.js} +1 -1
  24. package/{chunk-6ALGXRIS.js → chunk-KTLT4LKY.js} +1 -1
  25. package/{chunk-PAMKTLG5.js → chunk-LWJ6FCGJ.js} +1 -1
  26. package/{chunk-ZHTPSBYJ.js → chunk-MLTHWDBE.js} +1 -1
  27. package/{chunk-LFISHZZP.js → chunk-ODTXKOWN.js} +1 -1
  28. package/{chunk-MXH4QJKB.js → chunk-OQ3SKNS2.js} +1 -1
  29. package/{chunk-PUV7YKEQ.js → chunk-QGD6TGTI.js} +1 -1
  30. package/{chunk-YV32N6PE.js → chunk-QQOFLIJG.js} +1 -1
  31. package/{chunk-ETAHWUMY.js → chunk-TAFKX5F2.js} +1 -1
  32. package/{chunk-4N3AWKEK.js → chunk-U7ABTEOS.js} +1 -1
  33. package/chunk-UGATCU55.js +1 -0
  34. package/{chunk-QG566HCB.js → chunk-VLHMURFN.js} +1 -1
  35. package/{chunk-4BAHV6VO.js → chunk-WHT6WK7V.js} +1 -1
  36. package/{chunk-EBQRGLJL.js → chunk-WUK4ABE5.js} +1 -1
  37. package/{chunk-5QAV2WXY.js → chunk-XFKT7HQ4.js} +1 -1
  38. package/{chunk-2JD6CIZ4.js → chunk-XFTFZ5UD.js} +1 -1
  39. package/{chunk-RXVG6AZW.js → chunk-YFWXKCXL.js} +1 -1
  40. package/{chunk-QHQQ5BDV.js → chunk-Z6QCNSVI.js} +1 -1
  41. package/{chunk-TEGY2W63.js → chunk-ZCSLL22M.js} +1 -1
  42. package/{chunk-DI73L7JI.js → chunk-ZTXNJMNP.js} +1 -1
  43. package/index.html +1 -2
  44. package/{main-RYFYCW3E.js → main-DLNJU5L6.js} +1 -1
  45. package/package.json +1 -1
  46. package/chunk-4QGMMHYT.js +0 -1
  47. package/chunk-AABUGLWU.js +0 -1
  48. package/chunk-VW35MTSI.js +0 -1
@@ -1 +1 @@
1
- import{d as a,e as b,f as c,g as d}from"./chunk-XADL5RYU.js";import"./chunk-O4OTZE5N.js";import"./chunk-WIVARGP6.js";import"./chunk-MHRECQ5Y.js";import"./chunk-6Q6SSTBK.js";import"./chunk-5DJAX2HH.js";import"./chunk-6ALGXRIS.js";import"./chunk-DW332N2S.js";import"./chunk-AABUGLWU.js";import"./chunk-TELPJYLN.js";import"./chunk-5QZIKR6A.js";import"./chunk-HPNLQHW6.js";import"./chunk-BGTK25UG.js";import"./chunk-A4LPGPDU.js";import"./chunk-PKPBSTZA.js";import"./chunk-QPTSKQZ2.js";import"./chunk-OTPG7USH.js";import"./chunk-TT3S63BX.js";import"./chunk-T2WO6CVD.js";import"./chunk-7CGTOI24.js";export{a as SCHEDULE_DEFAULT_OPTIONS,c as SCHEDULE_FIELD_DEFAULTS,d as default,b as scheduleOptionToSchedule};
1
+ import{d as a,e as b,f as c,g as d}from"./chunk-CU5GQUSX.js";import"./chunk-O4OTZE5N.js";import"./chunk-WIVARGP6.js";import"./chunk-MHRECQ5Y.js";import"./chunk-6Q6SSTBK.js";import"./chunk-5DJAX2HH.js";import"./chunk-KTLT4LKY.js";import"./chunk-DW332N2S.js";import"./chunk-6K3PRIYO.js";import"./chunk-TELPJYLN.js";import"./chunk-5QZIKR6A.js";import"./chunk-HPNLQHW6.js";import"./chunk-BGTK25UG.js";import"./chunk-A4LPGPDU.js";import"./chunk-PKPBSTZA.js";import"./chunk-QPTSKQZ2.js";import"./chunk-OTPG7USH.js";import"./chunk-TT3S63BX.js";import"./chunk-T2WO6CVD.js";import"./chunk-7CGTOI24.js";export{a as SCHEDULE_DEFAULT_OPTIONS,c as SCHEDULE_FIELD_DEFAULTS,d as default,b as scheduleOptionToSchedule};
@@ -1 +1 @@
1
- import{a as De,b as he,d as Oe,e as fe}from"./chunk-5YSRDRTE.js";import"./chunk-AS6Z56AD.js";import{b as Ee,c as Ie}from"./chunk-IW4RDAIN.js";import{j as me}from"./chunk-XADL5RYU.js";import"./chunk-O4OTZE5N.js";import"./chunk-WIVARGP6.js";import"./chunk-MHRECQ5Y.js";import"./chunk-6Q6SSTBK.js";import"./chunk-LFISHZZP.js";import"./chunk-ME77WZZI.js";import{a as D}from"./chunk-5DJAX2HH.js";import"./chunk-6ALGXRIS.js";import"./chunk-DW332N2S.js";import"./chunk-AABUGLWU.js";import"./chunk-TELPJYLN.js";import"./chunk-5QZIKR6A.js";import{B as Se,H as Ne,K as pe,c as ae,e as se,f as re,g as le,i as _e,j as ce,r as Te,s as ue,u as ge,w as de,y as Fe,z as Ce}from"./chunk-HPNLQHW6.js";import"./chunk-BGTK25UG.js";import{b as ie,d as oe}from"./chunk-A4LPGPDU.js";import"./chunk-PKPBSTZA.js";import"./chunk-QPTSKQZ2.js";import"./chunk-OTPG7USH.js";import"./chunk-TT3S63BX.js";import{$ as T,Ab as r,Bb as F,Fb as Q,Gb as Y,Ib as p,Mc as U,Pa as _,Pb as g,Qb as d,Rb as E,Sb as R,Sc as ne,Tb as y,Ub as q,Vb as N,W as I,Xb as l,aa as u,cb as j,cc as Z,da as W,dc as ee,jc as L,la as O,oc as f,pc as A,qc as P,rc as x,sb as C,sc as G,tb as S,tc as M,xc as te,yb as m,zb as s}from"./chunk-T2WO6CVD.js";import"./chunk-7CGTOI24.js";var Ae=["formRef"],Pe=()=>({maxWidth:"700px",width:"100%"});function Me(t,n){t&1&&E(0,4,1)}function $e(t,n){t&1&&E(0,4,2)}function Re(t,n){if(t&1){let e=p();s(0,"button",35),N("click",function(){T(e);let o=l();return u(o.testDestination(0,!0))}),g(1,4),C(2,Me,1,0)(3,$e,1,0),d(),r()}if(t&2){let e=l();m("disabled",e.testSignal()=="testing"),_(2),S(e.testSignal()=="testing"?2:3)}}function ye(t,n){if(t&1){let e=p();s(0,"button",36),N("click",function(){T(e);let o=l();return u(o.openTargetUrlDialog())}),g(1,5),F(2,"sh-icon"),d(),r()}}function Le(t,n){if(t&1){let e=p();s(0,"button",36),N("click",function(){T(e);let o=l(2);return u(o.copyTargetUrl())}),g(1,7),F(2,"sh-icon"),d(),r()}}function xe(t,n){if(t&1){let e=p();s(0,"sh-menu")(1,"button",24)(2,"sh-icon"),L(3,"dots-three-vertical"),r()(),Q(4,37),s(5,"button",36),N("click",function(){T(e);let o=l();return u(o.openTargetUrlDialog())}),g(6,6),F(7,"sh-icon"),d(),r(),C(8,Le,3,0,"button",24),Y(),r()}if(t&2){l();let e=M(0);_(8),S(e?8:-1)}}function Ge(t,n){t&1&&(s(0,"sh-alert"),g(1,8),F(2,"sh-icon",38),d(),r())}function Ue(t,n){t&1&&(s(0,"sh-alert",25),g(1,9),F(2,"sh-icon",38),d(),r())}function we(t,n){if(t&1&&(s(0,"sh-alert",26),g(1,10),F(2,"sh-icon",38),d(),r()),t&2){let e=l();_(2),R(e.testErrorMessage()),y(1)}}function Be(t,n){if(t&1&&(s(0,"sh-alert",27),g(1,11),F(2,"sh-icon",38),d(),r()),t&2){let e=l();_(2),R(e.testErrorMessage()),y(1)}}function be(t,n){if(t&1){let e=p();s(0,"app-destination-list-item",28)(1,"button",31),N("click",function(){T(e);let o=l();return u(o.removeDestination())}),E(2,12),r()()}if(t&2){l();let e=M(18);m("destination",e)}}function ke(t,n){if(t&1){let e=p();s(0,"app-destination-list",39),N("setDestination",function(o){T(e);let a=l();return u(a.setDestination(o))}),r()}}function ve(t,n){if(t&1){let e=p();s(0,"app-single-destination",40),P("targetUrlChange",function(o){T(e);let a=l();return A(a.targetUrlModel,o)||(a.targetUrlModel=o),u(o)}),r()}if(t&2){let e=l();f("targetUrl",e.targetUrlModel),m("useBackupState",!0)}}function Ke(t,n){t&1&&(g(0,3,1),F(1,"sh-icon",33),d())}function Ve(t,n){t&1&&(g(0,3,2),F(1,"sh-icon"),d())}function ze(t,n){t&1&&(s(0,"h2"),E(1,15),r())}function Je(t,n){t&1&&(s(0,"h2"),E(1,16),r())}function Xe(t,n){if(t&1){let e=p();s(0,"sh-dialog",41),P("isOpenChange",function(o){T(e);let a=l();return A(a.targetUrlDialogOpen,o)||(a.targetUrlDialogOpen=o),u(o)}),s(1,"header",42)(2,"div",43),C(3,ze,2,0,"h2")(4,Je,2,0,"h2"),s(5,"sh-alert",26),E(6,13),r()()(),s(7,"div",44)(8,"sh-form-field")(9,"textarea",45),P("ngModelChange",function(o){T(e);let a=l();return A(a.targetUrlCtrl,o)||(a.targetUrlCtrl=o),u(o)}),r()()(),s(10,"footer",46)(11,"button",31),N("click",function(){T(e);let o=l();return u(o.closeTargetUrlDialog(!1))}),L(12,"Cancel"),r(),s(13,"button",47),N("click",function(){T(e);let o=l();return u(o.closeTargetUrlDialog(!0))}),g(14,14),F(15,"sh-icon"),d(),r()()()}if(t&2){let e=l(),i=M(0);f("isOpen",e.targetUrlDialogOpen),m("options",te(4,Pe)),_(3),S(i?4:3),_(6),f("ngModel",e.targetUrlCtrl)}}var $=new Te,Tt=(t={destinations:[]})=>$.group({destinations:$.array(t.destinations)}),ut=({key:t,customGroup:n,dynamicGroup:e,advancedGroup:i})=>$.group({destinationType:$.control(t),custom:n,dynamic:e,advanced:i}),w=class t{#i=I(oe);#o=I(ie);#e=I(me);#t=I(Ce);#a=I(De);injector=I(W);formRef=ne.required("formRef");targetUrlModel=this.#e.targetUrlModel;targetUrlCtrl=O(null);targetUrlInitial=O(null);targetUrlDialogOpen=O(!1);toggleNewDestination=O(!0);testSignal=this.#e.testSignal;testErrorMessage=this.#e.testErrorMessage;selectedDestinationType=U(()=>{let n=this.targetUrlModel();return n?Ee(n)??null:null});selectedDestinationTypeOption=U(()=>{let n=this.selectedDestinationType();return n?{key:n.customKey??n.key,customKey:n.customKey??null,displayName:n.displayName,description:n.description,icon:n.icon}:null});copyTargetUrl(){navigator.clipboard.writeText(this.targetUrlModel()??"")}openTargetUrlDialog(){let n=this.targetUrlModel();this.targetUrlCtrl.set(n),this.targetUrlInitial.set(n),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(n=!1){this.targetUrlDialogOpen.set(!1);let e=this.targetUrlCtrl(),i=this.targetUrlInitial();!n||e===i||!e||this.#e.setTargetUrl(e)}testDestination(n,e,i){let o=this.targetUrlModel();o&&(this.#e.setTestState("testing"),this.#a.testDestination(o,this.#e.backupId(),n,!0,!0).subscribe({next:a=>{if(a.action==="success"){this.#e.setTestState("success"),this.#e.isNew()&&(a.containsBackup===!0?(this.#e.setTestState("warning",$localize`The remote destination already contains a backup. Please use a different folder for each backup.`),e||this.#t.open(D,{data:{title:$localize`Folder contains backup`,message:$localize`The remote destination already contains a backup. You must use a different folder for each backup.`,confirmText:$localize`OK`,cancelText:void 0}})):a.anyFilesFound===!0&&(this.#e.setTestState("warning",$localize`The remote destination contains unknown files.`),e||this.#t.open(D,{data:{title:$localize`Folder is not empty`,message:$localize`The remote destination is not empty. It is recommended to use an empty folder for the backup.`,confirmText:$localize`OK`,cancelText:void 0}}))),i?.();return}if(this.#e.setTestState("error",a.errorMessage??$localize`An error occurred while testing the destination.`),a.action==="generic-error"){i?.();return}let h=o.includes("?");a.action==="trust-cert"&&this.#e.setTargetUrl(o+`${h?"&":"?"}accept-specified-ssl-hash=${a.certData}`),a.action==="approve-host-key"&&this.#e.setTargetUrl(o+`${h?"&":"?"}ssh-fingerprint=${a.reportedHostKey}`),a.testAgain?this.testDestination(a.destinationIndex,e):i?.()}}))}setDestination(n){let e=Ie(n??"");if(e){if(e.mapper.default){let i=e.mapper.default(this.#e.backupName()??"");this.#e.setTargetUrl(i,!0);return}this.#e.setTargetUrl(`${n}://`,!0)}}removeDestination(){this.#e.setTargetUrl(null,!0)}goBack(){this.#i.navigate(["general"],{relativeTo:this.#o.parent})}next(){let n=this.#e.isNew(),e=this.testSignal();if(!n){this.#n();return}if(e===""){this.#t.open(D,{data:{title:$localize`Test destination`,message:$localize`You have not tested the destination yet. Do you want to test it now?`,confirmText:$localize`Test now`,cancelText:$localize`Skip test and continue`},closed:i=>{i?this.testDestination(0,!1,()=>{this.testSignal()==="success"?this.#n():this.#t.open(D,{data:{title:$localize`Test did not succeed`,message:this.testErrorMessage()??$localize`Failed to test the destination.`,confirmText:$localize`OK`,cancelText:void 0}})}):this.#n()}});return}if(e!=="success"){this.#t.open(D,{data:{title:$localize`Test destination`,message:$localize`The destination has not been tested successfully. Are you sure you want to continue?`,confirmText:$localize`Yes, continue`,cancelText:$localize`Cancel`},closed:i=>{i&&this.#n()}});return}this.#n()}#n(){this.#e.isNew()||this.#e.submit(!0),this.#i.navigate(["source-data"],{relativeTo:this.#o.parent})}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=j({type:t,selectors:[["app-destination"]],viewQuery:function(e,i){e&1&&Z(i.formRef,Ae,5),e&2&&ee()},decls:31,vars:11,consts:()=>{let n;n=$localize`Backup destination`;let e;e=$localize`${"\uFFFD#25\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#25\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let i;i=$localize`${"\uFFFD*28:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SH_ICON:spinner${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*28:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*29:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SH_ICON_1:arrow-right${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*29:2\uFFFD"}:CLOSE_BLOCK_ELSE: Continue `,i=q(i);let o;o=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF: Testing... ${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE: Test destination ${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`;let a;a=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Set target URL `;let h;h=$localize`${"\uFFFD#7\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SH_ICON: Edit target URL `;let B;B=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:copy${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Copy URL to clipboard `;let b;b=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:spinner${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Testing connection... `;let k;k=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:check${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Connection tested successfully. `;let v;v=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:warning${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let K;K=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:warning${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let V;V=$localize`Change`;let z;z=$localize`Be careful, this will overwrite everything you have in your destination.`;let J;J=$localize` Override target URL ${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:swap${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON:`;let X;X=$localize`Set target URL`;let H;return H=$localize`Edit target URL`,[["formRef",""],n,e,i,o,a,h,B,b,k,v,K,V,z,J,X,H,["autocomplete","off",3,"submit"],[2,"position","absolute","left","-9999px","width","1px","height","1px","overflow","hidden"],["type","text","name","fake_email","tabindex","-1"],["type","password","name","fake_password","tabindex","-1"],[1,"title-30"],[1,"actions"],["shButton","","type","button",1,"small",3,"disabled"],["shButton","","type","button",1,"small"],[1,"success"],[1,"warn"],[1,"error"],[1,"current-destination",3,"destination"],[3,"targetUrl","useBackupState"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary",3,"disabled"],[1,"loader"],[3,"isOpen","options"],["shButton","","type","button",1,"small",3,"click","disabled"],["shButton","","type","button",1,"small",3,"click"],["menu",""],["icon",""],[3,"setDestination"],[3,"targetUrlChange","targetUrl","useBackupState"],[3,"isOpenChange","isOpen","options"],["header",""],[1,"target-dialog-header"],["content",""],["id","targetUrl","autocomplete","off",3,"ngModelChange","ngModel"],["footer",""],["shButton","","type","submit",1,"raised","primary",3,"click"]]},template:function(e,i){if(e&1){let o=p();x(0),s(1,"form",17,0),N("submit",function(){return T(o),u(i.next())}),s(3,"div",18),F(4,"input",19)(5,"input",20),r(),s(6,"header")(7,"h3",21)(8,"span"),E(9,1),r(),s(10,"div",22),C(11,Re,4,2,"button",23),C(12,ye,3,0,"button",24)(13,xe,9,1,"sh-menu"),r()(),C(14,Ge,3,0,"sh-alert")(15,Ue,3,0,"sh-alert",25)(16,we,3,1,"sh-alert",26)(17,Be,3,1,"sh-alert",27),x(18),C(19,be,3,1,"app-destination-list-item",28),r(),C(20,ke,1,0,"app-destination-list"),C(21,ve,1,2,"app-single-destination",29),s(22,"div",30)(23,"button",31),N("click",function(){return T(o),u(i.goBack())}),g(24,2),F(25,"sh-icon"),d(),r(),s(26,"button",32),g(27,3),C(28,Ke,2,0,"sh-icon",33)(29,Ve,2,0,"sh-icon"),d(),r()()(),C(30,Xe,16,5,"sh-dialog",34)}if(e&2){let o=G(!!i.targetUrlModel());_(11),S(o?11:-1),_(),S(o?13:12),_(2),S(i.testSignal()=="testing"?14:i.testSignal()=="success"?15:i.testSignal()=="warning"?16:i.testSignal()=="error"?17:-1),_(4);let a=G(i.selectedDestinationTypeOption());_(),S(a?19:-1),_(),S(o?-1:20),_(),S(o?21:-1),_(5),m("disabled",i.testSignal()=="testing"||!o),_(2),S(i.testSignal()=="testing"?28:29),_(2),S(i.targetUrlDialogOpen()?30:-1)}},dependencies:[fe,Oe,he,ue,ce,ae,se,re,_e,le,Se,Ne,pe,ge,Fe,de],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:40rem;padding:2.5rem 2.5rem 0}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], header[_ngcontent-%COMP%] sh-alert[_ngcontent-%COMP%]{width:100%}header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:.5rem}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;height:100%;padding:0 0 2.5rem}.current-destination[_ngcontent-%COMP%]{margin:1rem 0 0}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.most-common-destinations[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10);background-color:var(--base-2);cursor:pointer}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-10);margin:0}.target-dialog-header[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:.5rem}"],changeDetection:0})};export{Tt as createDestinationForm,ut as createDestinationFormGroup,w as default};
1
+ import{a as De,b as he,d as Oe,e as fe}from"./chunk-EYIHDNRT.js";import"./chunk-AS6Z56AD.js";import{b as Ee,c as Ie}from"./chunk-IW4RDAIN.js";import{j as me}from"./chunk-CU5GQUSX.js";import"./chunk-O4OTZE5N.js";import"./chunk-WIVARGP6.js";import"./chunk-MHRECQ5Y.js";import"./chunk-6Q6SSTBK.js";import"./chunk-ODTXKOWN.js";import"./chunk-ME77WZZI.js";import{a as D}from"./chunk-5DJAX2HH.js";import"./chunk-KTLT4LKY.js";import"./chunk-DW332N2S.js";import"./chunk-6K3PRIYO.js";import"./chunk-TELPJYLN.js";import"./chunk-5QZIKR6A.js";import{B as Se,H as Ne,K as pe,c as ae,e as se,f as re,g as le,i as _e,j as ce,r as Te,s as ue,u as ge,w as de,y as Fe,z as Ce}from"./chunk-HPNLQHW6.js";import"./chunk-BGTK25UG.js";import{b as ie,d as oe}from"./chunk-A4LPGPDU.js";import"./chunk-PKPBSTZA.js";import"./chunk-QPTSKQZ2.js";import"./chunk-OTPG7USH.js";import"./chunk-TT3S63BX.js";import{$ as T,Ab as r,Bb as F,Fb as Q,Gb as Y,Ib as p,Mc as U,Pa as _,Pb as g,Qb as d,Rb as E,Sb as R,Sc as ne,Tb as y,Ub as q,Vb as N,W as I,Xb as l,aa as u,cb as j,cc as Z,da as W,dc as ee,jc as L,la as O,oc as f,pc as A,qc as P,rc as x,sb as C,sc as G,tb as S,tc as M,xc as te,yb as m,zb as s}from"./chunk-T2WO6CVD.js";import"./chunk-7CGTOI24.js";var Ae=["formRef"],Pe=()=>({maxWidth:"700px",width:"100%"});function Me(t,n){t&1&&E(0,4,1)}function $e(t,n){t&1&&E(0,4,2)}function Re(t,n){if(t&1){let e=p();s(0,"button",35),N("click",function(){T(e);let o=l();return u(o.testDestination(0,!0))}),g(1,4),C(2,Me,1,0)(3,$e,1,0),d(),r()}if(t&2){let e=l();m("disabled",e.testSignal()=="testing"),_(2),S(e.testSignal()=="testing"?2:3)}}function ye(t,n){if(t&1){let e=p();s(0,"button",36),N("click",function(){T(e);let o=l();return u(o.openTargetUrlDialog())}),g(1,5),F(2,"sh-icon"),d(),r()}}function Le(t,n){if(t&1){let e=p();s(0,"button",36),N("click",function(){T(e);let o=l(2);return u(o.copyTargetUrl())}),g(1,7),F(2,"sh-icon"),d(),r()}}function xe(t,n){if(t&1){let e=p();s(0,"sh-menu")(1,"button",24)(2,"sh-icon"),L(3,"dots-three-vertical"),r()(),Q(4,37),s(5,"button",36),N("click",function(){T(e);let o=l();return u(o.openTargetUrlDialog())}),g(6,6),F(7,"sh-icon"),d(),r(),C(8,Le,3,0,"button",24),Y(),r()}if(t&2){l();let e=M(0);_(8),S(e?8:-1)}}function Ge(t,n){t&1&&(s(0,"sh-alert"),g(1,8),F(2,"sh-icon",38),d(),r())}function Ue(t,n){t&1&&(s(0,"sh-alert",25),g(1,9),F(2,"sh-icon",38),d(),r())}function we(t,n){if(t&1&&(s(0,"sh-alert",26),g(1,10),F(2,"sh-icon",38),d(),r()),t&2){let e=l();_(2),R(e.testErrorMessage()),y(1)}}function Be(t,n){if(t&1&&(s(0,"sh-alert",27),g(1,11),F(2,"sh-icon",38),d(),r()),t&2){let e=l();_(2),R(e.testErrorMessage()),y(1)}}function be(t,n){if(t&1){let e=p();s(0,"app-destination-list-item",28)(1,"button",31),N("click",function(){T(e);let o=l();return u(o.removeDestination())}),E(2,12),r()()}if(t&2){l();let e=M(18);m("destination",e)}}function ke(t,n){if(t&1){let e=p();s(0,"app-destination-list",39),N("setDestination",function(o){T(e);let a=l();return u(a.setDestination(o))}),r()}}function ve(t,n){if(t&1){let e=p();s(0,"app-single-destination",40),P("targetUrlChange",function(o){T(e);let a=l();return A(a.targetUrlModel,o)||(a.targetUrlModel=o),u(o)}),r()}if(t&2){let e=l();f("targetUrl",e.targetUrlModel),m("useBackupState",!0)}}function Ke(t,n){t&1&&(g(0,3,1),F(1,"sh-icon",33),d())}function Ve(t,n){t&1&&(g(0,3,2),F(1,"sh-icon"),d())}function ze(t,n){t&1&&(s(0,"h2"),E(1,15),r())}function Je(t,n){t&1&&(s(0,"h2"),E(1,16),r())}function Xe(t,n){if(t&1){let e=p();s(0,"sh-dialog",41),P("isOpenChange",function(o){T(e);let a=l();return A(a.targetUrlDialogOpen,o)||(a.targetUrlDialogOpen=o),u(o)}),s(1,"header",42)(2,"div",43),C(3,ze,2,0,"h2")(4,Je,2,0,"h2"),s(5,"sh-alert",26),E(6,13),r()()(),s(7,"div",44)(8,"sh-form-field")(9,"textarea",45),P("ngModelChange",function(o){T(e);let a=l();return A(a.targetUrlCtrl,o)||(a.targetUrlCtrl=o),u(o)}),r()()(),s(10,"footer",46)(11,"button",31),N("click",function(){T(e);let o=l();return u(o.closeTargetUrlDialog(!1))}),L(12,"Cancel"),r(),s(13,"button",47),N("click",function(){T(e);let o=l();return u(o.closeTargetUrlDialog(!0))}),g(14,14),F(15,"sh-icon"),d(),r()()()}if(t&2){let e=l(),i=M(0);f("isOpen",e.targetUrlDialogOpen),m("options",te(4,Pe)),_(3),S(i?4:3),_(6),f("ngModel",e.targetUrlCtrl)}}var $=new Te,Tt=(t={destinations:[]})=>$.group({destinations:$.array(t.destinations)}),ut=({key:t,customGroup:n,dynamicGroup:e,advancedGroup:i})=>$.group({destinationType:$.control(t),custom:n,dynamic:e,advanced:i}),w=class t{#i=I(oe);#o=I(ie);#e=I(me);#t=I(Ce);#a=I(De);injector=I(W);formRef=ne.required("formRef");targetUrlModel=this.#e.targetUrlModel;targetUrlCtrl=O(null);targetUrlInitial=O(null);targetUrlDialogOpen=O(!1);toggleNewDestination=O(!0);testSignal=this.#e.testSignal;testErrorMessage=this.#e.testErrorMessage;selectedDestinationType=U(()=>{let n=this.targetUrlModel();return n?Ee(n)??null:null});selectedDestinationTypeOption=U(()=>{let n=this.selectedDestinationType();return n?{key:n.customKey??n.key,customKey:n.customKey??null,displayName:n.displayName,description:n.description,icon:n.icon}:null});copyTargetUrl(){navigator.clipboard.writeText(this.targetUrlModel()??"")}openTargetUrlDialog(){let n=this.targetUrlModel();this.targetUrlCtrl.set(n),this.targetUrlInitial.set(n),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(n=!1){this.targetUrlDialogOpen.set(!1);let e=this.targetUrlCtrl(),i=this.targetUrlInitial();!n||e===i||!e||this.#e.setTargetUrl(e)}testDestination(n,e,i){let o=this.targetUrlModel();o&&(this.#e.setTestState("testing"),this.#a.testDestination(o,this.#e.backupId(),n,!0,!0).subscribe({next:a=>{if(a.action==="success"){this.#e.setTestState("success"),this.#e.isNew()&&(a.containsBackup===!0?(this.#e.setTestState("warning",$localize`The remote destination already contains a backup. Please use a different folder for each backup.`),e||this.#t.open(D,{data:{title:$localize`Folder contains backup`,message:$localize`The remote destination already contains a backup. You must use a different folder for each backup.`,confirmText:$localize`OK`,cancelText:void 0}})):a.anyFilesFound===!0&&(this.#e.setTestState("warning",$localize`The remote destination contains unknown files.`),e||this.#t.open(D,{data:{title:$localize`Folder is not empty`,message:$localize`The remote destination is not empty. It is recommended to use an empty folder for the backup.`,confirmText:$localize`OK`,cancelText:void 0}}))),i?.();return}if(this.#e.setTestState("error",a.errorMessage??$localize`An error occurred while testing the destination.`),a.action==="generic-error"){i?.();return}let h=o.includes("?");a.action==="trust-cert"&&this.#e.setTargetUrl(o+`${h?"&":"?"}accept-specified-ssl-hash=${a.certData}`),a.action==="approve-host-key"&&this.#e.setTargetUrl(o+`${h?"&":"?"}ssh-fingerprint=${a.reportedHostKey}`),a.testAgain?this.testDestination(a.destinationIndex,e):i?.()}}))}setDestination(n){let e=Ie(n??"");if(e){if(e.mapper.default){let i=e.mapper.default(this.#e.backupName()??"");this.#e.setTargetUrl(i,!0);return}this.#e.setTargetUrl(`${n}://`,!0)}}removeDestination(){this.#e.setTargetUrl(null,!0)}goBack(){this.#i.navigate(["general"],{relativeTo:this.#o.parent})}next(){let n=this.#e.isNew(),e=this.testSignal();if(!n){this.#n();return}if(e===""){this.#t.open(D,{data:{title:$localize`Test destination`,message:$localize`You have not tested the destination yet. Do you want to test it now?`,confirmText:$localize`Test now`,cancelText:$localize`Skip test and continue`},closed:i=>{i?this.testDestination(0,!1,()=>{this.testSignal()==="success"?this.#n():this.#t.open(D,{data:{title:$localize`Test did not succeed`,message:this.testErrorMessage()??$localize`Failed to test the destination.`,confirmText:$localize`OK`,cancelText:void 0}})}):this.#n()}});return}if(e!=="success"){this.#t.open(D,{data:{title:$localize`Test destination`,message:$localize`The destination has not been tested successfully. Are you sure you want to continue?`,confirmText:$localize`Yes, continue`,cancelText:$localize`Cancel`},closed:i=>{i&&this.#n()}});return}this.#n()}#n(){this.#e.isNew()||this.#e.submit(!0),this.#i.navigate(["source-data"],{relativeTo:this.#o.parent})}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=j({type:t,selectors:[["app-destination"]],viewQuery:function(e,i){e&1&&Z(i.formRef,Ae,5),e&2&&ee()},decls:31,vars:11,consts:()=>{let n;n=$localize`Backup destination`;let e;e=$localize`${"\uFFFD#25\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#25\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let i;i=$localize`${"\uFFFD*28:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SH_ICON:spinner${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*28:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*29:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SH_ICON_1:arrow-right${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*29:2\uFFFD"}:CLOSE_BLOCK_ELSE: Continue `,i=q(i);let o;o=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF: Testing... ${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE: Test destination ${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`;let a;a=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Set target URL `;let h;h=$localize`${"\uFFFD#7\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SH_ICON: Edit target URL `;let B;B=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:copy${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Copy URL to clipboard `;let b;b=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:spinner${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Testing connection... `;let k;k=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:check${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Connection tested successfully. `;let v;v=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:warning${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let K;K=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:warning${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let V;V=$localize`Change`;let z;z=$localize`Be careful, this will overwrite everything you have in your destination.`;let J;J=$localize` Override target URL ${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:swap${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON:`;let X;X=$localize`Set target URL`;let H;return H=$localize`Edit target URL`,[["formRef",""],n,e,i,o,a,h,B,b,k,v,K,V,z,J,X,H,["autocomplete","off",3,"submit"],[2,"position","absolute","left","-9999px","width","1px","height","1px","overflow","hidden"],["type","text","name","fake_email","tabindex","-1"],["type","password","name","fake_password","tabindex","-1"],[1,"title-30"],[1,"actions"],["shButton","","type","button",1,"small",3,"disabled"],["shButton","","type","button",1,"small"],[1,"success"],[1,"warn"],[1,"error"],[1,"current-destination",3,"destination"],[3,"targetUrl","useBackupState"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary",3,"disabled"],[1,"loader"],[3,"isOpen","options"],["shButton","","type","button",1,"small",3,"click","disabled"],["shButton","","type","button",1,"small",3,"click"],["menu",""],["icon",""],[3,"setDestination"],[3,"targetUrlChange","targetUrl","useBackupState"],[3,"isOpenChange","isOpen","options"],["header",""],[1,"target-dialog-header"],["content",""],["id","targetUrl","autocomplete","off",3,"ngModelChange","ngModel"],["footer",""],["shButton","","type","submit",1,"raised","primary",3,"click"]]},template:function(e,i){if(e&1){let o=p();x(0),s(1,"form",17,0),N("submit",function(){return T(o),u(i.next())}),s(3,"div",18),F(4,"input",19)(5,"input",20),r(),s(6,"header")(7,"h3",21)(8,"span"),E(9,1),r(),s(10,"div",22),C(11,Re,4,2,"button",23),C(12,ye,3,0,"button",24)(13,xe,9,1,"sh-menu"),r()(),C(14,Ge,3,0,"sh-alert")(15,Ue,3,0,"sh-alert",25)(16,we,3,1,"sh-alert",26)(17,Be,3,1,"sh-alert",27),x(18),C(19,be,3,1,"app-destination-list-item",28),r(),C(20,ke,1,0,"app-destination-list"),C(21,ve,1,2,"app-single-destination",29),s(22,"div",30)(23,"button",31),N("click",function(){return T(o),u(i.goBack())}),g(24,2),F(25,"sh-icon"),d(),r(),s(26,"button",32),g(27,3),C(28,Ke,2,0,"sh-icon",33)(29,Ve,2,0,"sh-icon"),d(),r()()(),C(30,Xe,16,5,"sh-dialog",34)}if(e&2){let o=G(!!i.targetUrlModel());_(11),S(o?11:-1),_(),S(o?13:12),_(2),S(i.testSignal()=="testing"?14:i.testSignal()=="success"?15:i.testSignal()=="warning"?16:i.testSignal()=="error"?17:-1),_(4);let a=G(i.selectedDestinationTypeOption());_(),S(a?19:-1),_(),S(o?-1:20),_(),S(o?21:-1),_(5),m("disabled",i.testSignal()=="testing"||!o),_(2),S(i.testSignal()=="testing"?28:29),_(2),S(i.targetUrlDialogOpen()?30:-1)}},dependencies:[fe,Oe,he,ue,ce,ae,se,re,_e,le,Se,Ne,pe,ge,Fe,de],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:40rem;padding:2.5rem 2.5rem 0}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], header[_ngcontent-%COMP%] sh-alert[_ngcontent-%COMP%]{width:100%}header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:.5rem}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;height:100%;padding:0 0 2.5rem}.current-destination[_ngcontent-%COMP%]{margin:1rem 0 0}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.most-common-destinations[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10);background-color:var(--base-2);cursor:pointer}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-10);margin:0}.target-dialog-header[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:.5rem}"],changeDetection:0})};export{Tt as createDestinationForm,ut as createDestinationFormGroup,w as default};
@@ -0,0 +1 @@
1
+ import{a as v}from"./chunk-TELPJYLN.js";import{b as $,d as x}from"./chunk-5QZIKR6A.js";import{z as f}from"./chunk-HPNLQHW6.js";import{a as j,c as b}from"./chunk-BGTK25UG.js";import{ka as L}from"./chunk-OTPG7USH.js";import{Cb as N,Cc as G,Db as y,Eb as I,Ec as W,L as E,Mc as h,Pa as R,Pb as _,Qb as A,R as p,Rb as w,Sb as P,Tb as F,W as c,cb as M,f as m,g as k,la as n,na as O}from"./chunk-T2WO6CVD.js";var S=class r{reconnectTimer=n(15e3);countdown=n(0);connectTimerEffect=O(()=>{let e=this.reconnectTimer();this.countdown.set(e/1e3)});interval=setInterval(()=>{if(this.countdown()<=1){this.countdown.set(this.reconnectTimer()/1e3);return}this.countdown.set(this.countdown()-1)},1e3);ngOnDestroy(){clearInterval(this.interval)}static \u0275fac=function(t){return new(t||r)};static \u0275cmp=M({type:r,selectors:[["app-disconnected-dialog"]],decls:8,vars:4,consts:()=>{let e;e=$localize`Reconnecting...`;let t;return t=$localize` The connection to the server is lost, attempting again in ${"\uFFFD#6\uFFFD"}:START_TAG_STRONG:0:${"\uFFFD0\uFFFD"}:INTERPOLATION:${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_STRONG:`,[e,t,["header",""],["content",""]]},template:function(t,s){t&1&&(N(0,"header",2)(1,"h3"),w(2,0),y()(),N(3,"div",3)(4,"p"),_(5,1),I(6,"strong"),G(7,"number"),A(),y()()),t&2&&(R(7),P(W(7,1,s.countdown(),"2.0-0")),F(5))},dependencies:[L],styles:["[_nghost-%COMP%]{display:block;padding:1rem}"],changeDetection:0})};var D=class r{dialog=c(f);#t=c(b);#i=n("disconnected");#s=n(null);#e=n(-1);#r=n(0);#l=n(!1);#u=new k;connectionStatus=this.#i.asReadonly();serverState=this.#s.asReadonly();#o=void 0;duration=c($).relayIsEnabled()?"94s":"299s";start(){this.#l.set(!0),this.#u=new k,this.#c()}stop(){this.#u.next(),this.#u.complete(),this.#l.set(!1)}reconnect(){this.stop(),this.start()}reconnectIfNeeded(){this.#l()||this.reconnect()}#c(){this.#i.set("connecting"),this.#t.getApiV1Serverstate({lastEventId:this.#e(),longpoll:this.#e()>=0,duration:this.duration}).pipe(E(this.#u)).subscribe({next:e=>{e&&this.#a(e),this.#n()},error:e=>{let s=this.#r()+1,a=Math.min(5e3*s,3e4);this.#r.set(s),s>3&&this.#i.set("disconnected"),this.#o||(this.#o=this.dialog.open(S,{closeOnButton:!1,closeOnEsc:!1,closeOnOutsideClick:!1})),this.#o.component.reconnectTimer.set(a),setTimeout(()=>{this.#c()},a)}})}#a(e){this.#i.set("connected"),this.#s.set(e),this.#e.set(e.LastEventID??-1),this.#r.set(0)}#n(){this.#l()&&this.#c()}static \u0275fac=function(t){return new(t||r)};static \u0275prov=p({token:r,factory:r.\u0275fac,providedIn:"root"})};var u=!1,T=class r{#t=c(x);#i=c(v);dialog=c(f);#s=null;#e=n("disconnected");#r=n(null);#l=n(null);#u=n(null);#o=n(null);#c=n(null);#a=void 0;#n=n({legacystatus:!0});shouldConnect=n(!0);connectionStatus=this.#e.asReadonly();serverState=this.#r.asReadonly();serverProgress=this.#l.asReadonly();serverSettings=this.#u.asReadonly();subscriptions=this.#n.asReadonly();serverTaskQueue=this.#o.asReadonly();backupListState=this.#c.asReadonly();#p=null;taskCompleted=new m(e=>{this.#p=e});#d=0;start(){this.#h(),this.shouldConnect.set(!0)}#h(){let e=this.#t.token();if(!e){console.error("No access token available");return}let t=window.location.protocol==="https:"?"wss:":"ws:",s=window.location.port?`:${window.location.port}`:"";window.location.port==="4200"&&(s=":8200");let a=window.location.hostname,g=j.BASE||"",J=this.#i.hasWebSocketAuth()?`${t}//${a}${s}${g}/notifications`:`${t}//${a}${s}${g}/notifications?token=${e}`;this.#e.set("connecting"),this.#s=new WebSocket(J),this.#s.onopen=()=>{u&&console.log("WebSocket connection established"),this.#i.hasWebSocketAuth()?(this.#e.set("authenticating"),this.#s?.send(JSON.stringify({Version:1,Token:e}))):this.#S()},this.#s.onmessage=d=>{if(this.#e()==="authenticating")try{let i=JSON.parse(d.data);i.Success?(u&&console.log("WebSocket authentication successful"),this.#S()):(console.error("WebSocket authentication failed:",i.Message),this.#e.set("disconnected"));return}catch(i){console.error("Error parsing WebSocket authentication reply",i),this.#e.set("disconnected");return}try{let i=JSON.parse(d.data),l=i?.Type;if(l==="legacystatus"||l==null)u&&console.log("Received legacy status update:",i),this.#r.set(i);else if(l==="reply"){let o=i;o.Success||console.error("WebSocket reply error:",o.Message)}else if(l==="progress"){let o=i;u&&console.log("Received progress update:",o.Data),this.#l.set(o.Data)}else if(l==="serversettings"){let o=i;u&&console.log("Received server settings update:",o.Data),this.#u.set(o.Data)}else if(l==="taskqueue"){let o=i;u&&console.log("Received task update:",o.Data),this.#o.set(o.Data)}else if(l==="taskcompleted"){let o=i;u&&console.log("Received task completed:",o.Data),this.#p?.next(o.Data)}else if(l==="backuplist"){let o=i;u&&console.log("Received backup list update:",o.Data),this.#c.set(o.Data)}else console.warn("Unknown WebSocket message type:",l)}catch(i){console.error("Error parsing WebSocket message",i)}},this.#s.onclose=d=>{u&&console.log("WebSocket connection closed",d),this.#e.set("disconnected"),this.shouldConnect()&&(this.#a||(this.#a=this.dialog.open(S,{closeOnButton:!1,closeOnEsc:!1,closeOnOutsideClick:!1}),this.#a.component.reconnectTimer.set(15e3)),setTimeout(()=>this.#h(),5e3))},this.#s.onerror=d=>{console.error("WebSocket error",d),this.#e.set("disconnected")}}#S(){this.#e.set("connected");let e=this.#n();Object.keys(e).length>0&&Object.entries(e).forEach(([t,s])=>{s!=null&&this.sendSubscribeRequest(t,s)}),this.#a&&this.#a.close()}stop(){this.shouldConnect.set(!1),this.#s?.close()}reconnect(){this.#s?.close(),this.start()}reconnectIfNeeded(){this.#s?.readyState!==WebSocket.OPEN&&this.reconnect()}sendSubscribeRequest(e,t){this.#s?.send(JSON.stringify({Version:1,Id:`req-${++this.#d}`,Action:"sub",Service:e,Data:t||null}))}subscribe(e,t=void 0){let s=this.#n(),a=s[e];(!a||JSON.stringify(a)!==JSON.stringify(t||!0))&&(s[e]=t||!0,this.#n.set(s),this.#e()=="connected"&&this.sendSubscribeRequest(e,t))}unsubscribe(e){let t=this.#n();t[e]&&(delete t[e],this.#n.set(t),this.#e()=="connected"&&this.#s?.send(JSON.stringify({Version:1,Id:`req-${++this.#d}`,Action:"unsub",Service:e})))}static \u0275fac=function(t){return new(t||r)};static \u0275prov=p({token:r,factory:r.\u0275fac,providedIn:"root"})};var q=10,V=class r{#t=c(T);#i=c(D);#s=c(b);#e=c(v);#r=n("longpoll");#l=n(!1);#u=h(()=>this.#e.hasTaskCompletedOption()&&this.#r()==="websocket");#o={};#c=null;#a=!1;#n=[];constructor(){this.#t.subscribe("taskcompleted"),this.#t.taskCompleted.subscribe(e=>{if(this.#n.unshift(e),this.#n.length>q&&this.#n.pop(),!e.ID)return;let t=this.#o[e.ID];t&&(t.forEach(s=>{s.next(e),s.complete()}),delete this.#o[e.ID])})}connectionStatus=h(()=>this.#r()==="websocket"?this.#t.connectionStatus():this.#i.connectionStatus());isConnectionMethodSet=this.#l.asReadonly();serverState=h(()=>this.#r()==="websocket"?this.#t.serverState():this.#i.serverState());progressState=this.#t.serverProgress;taskQueueState=this.#t.serverTaskQueue;activeTaskQueueState=h(()=>this.#r()==="websocket"?this.#t.serverTaskQueue()?.map(t=>t.ID).filter(t=>t)??[]:(this.#i.serverState()?.SchedulerQueueIds??[]).map(t=>t.Item1).filter(t=>t));backupListState=h(()=>this.#t.backupListState());setConnectionMethod(e){e==="websocket"?(this.#t.reconnectIfNeeded(),this.#i.stop()):(this.#i.reconnectIfNeeded(),this.#t.stop()),this.#r.set(e),this.#l.set(!0)}getConnectionMethod(){return this.#r()}subscribe(e,t=null){this.#t.subscribe(e,t)}unsubscribe(e){this.#t.unsubscribe(e)}waitForTaskToComplete(e){return new m(t=>{let s=this.#n.find(a=>a.ID===e);if(s){t.next(s),t.complete();return}this.#o[e]=this.#o[e]||[],this.#o[e].push(t),this.#p()})}#p(){this.#a||this.#u()||(this.#a=!0,this.#d())}#d(){let e=Object.keys(this.#o).map(s=>parseInt(s,10));if(e.length===0){this.#h();return}let t=Math.min(...e);this.#s.getApiV1TaskByTaskid({taskid:t}).subscribe({next:s=>{s.TaskFinished!=null&&(this.#n.unshift(s),this.#n.length>q&&this.#n.pop(),this.#o[t].forEach(g=>{g.next(s),g.complete()}),delete this.#o[t])},complete:()=>{this.#c=window.setTimeout(()=>{this.#d()},1e3)},error:s=>{this.#c=window.setTimeout(()=>{this.#d()},3e3)}})}#h(){this.#c!==null&&(clearTimeout(this.#c),this.#c=null),this.#a=!1}static \u0275fac=function(t){return new(t||r)};static \u0275prov=p({token:r,factory:r.\u0275fac,providedIn:"root"})};export{T as a,V as b};
@@ -1 +1 @@
1
- import{a as Xe}from"./chunk-YV32N6PE.js";import{a as ee}from"./chunk-KRXQDBGB.js";import"./chunk-PAMKTLG5.js";import"./chunk-FOQJA6X2.js";import"./chunk-VHOAXFIJ.js";import{a as Ke}from"./chunk-4NN5ZM73.js";import"./chunk-6Q6SSTBK.js";import{a as Z}from"./chunk-FK7JFD5B.js";import"./chunk-LFISHZZP.js";import"./chunk-ME77WZZI.js";import"./chunk-5DJAX2HH.js";import"./chunk-QZRRXR3V.js";import"./chunk-6ALGXRIS.js";import{b as Je,c as ce}from"./chunk-DW332N2S.js";import"./chunk-AABUGLWU.js";import"./chunk-TELPJYLN.js";import"./chunk-5QZIKR6A.js";import{B as se,E as Be,G as be,L as Fe,U as ke,V as Ue,u as H}from"./chunk-HPNLQHW6.js";import{c as de}from"./chunk-BGTK25UG.js";import{b as ye,e as xe}from"./chunk-A4LPGPDU.js";import"./chunk-PKPBSTZA.js";import"./chunk-QPTSKQZ2.js";import{fa as V,ia as re}from"./chunk-OTPG7USH.js";import"./chunk-TT3S63BX.js";import{$ as D,Ab as i,Bb as s,Cc as u,Dc as L,Ec as S,Fb as G,Fc as h,Gb as P,Ib as U,Mc as ve,Pa as a,Pb as N,Qb as m,Rb as l,Rc as le,Sb as d,Tb as c,Ub as R,Vb as I,W as x,Xb as C,aa as M,cb as X,gc as $,jc as E,kc as K,la as A,lc as f,mc as Ie,nc as $e,p as J,rc as fe,sb as g,sc as he,tb as T,tc as w,ub as B,wb as b,xb as k,yb as z,zb as o}from"./chunk-T2WO6CVD.js";import{a as _e}from"./chunk-7CGTOI24.js";function Ve(n,t){n&1&&s(0,"sh-progress-bar",32)}function He(n,t){n&1&&s(0,"div",35)}function je(n,t){n&1&&s(0,"div",35)}function We(n,t){n&1&&s(0,"div",36)}function qe(n,t){n&1&&s(0,"div",37)}function Qe(n,t){if(n&1&&(o(0,"details",46)(1,"summary"),N(2,15),s(3,"sh-icon"),o(4,"div",47),s(5,"sh-icon",40),i(),m(),i(),o(6,"div",48)(7,"p"),l(8,16),u(9,"date"),i(),o(10,"p"),l(11,17),u(12,"date"),i(),o(13,"p"),l(14,18),u(15,"durationFormat"),i(),o(16,"p"),l(17,19),i(),s(18,"sh-divider"),o(19,"p"),l(20,20),i(),o(21,"p"),l(22,21),i()()(),o(23,"details",46)(24,"summary"),N(25,22),s(26,"sh-icon"),o(27,"div",47),s(28,"sh-icon",40),i(),m(),i(),o(29,"div",48)(30,"p"),l(31,23),u(32,"date"),i(),o(33,"p"),l(34,24),u(35,"date"),i(),o(36,"p"),l(37,25),u(38,"durationFormat"),i(),s(39,"sh-divider"),o(40,"p"),l(41,26),u(42,"bytes"),i(),o(43,"p"),l(44,27),u(45,"bytes"),i(),o(46,"p"),l(47,28),u(48,"bytes"),i(),s(49,"sh-divider"),o(50,"p"),l(51,29),i(),o(52,"p"),l(53,30),i()()()),n&2){let e=C(2).$implicit;a(9),d(S(9,17,e.data==null||e.data.TestResults==null?null:e.data.TestResults.BeginTime,"medium")),c(8),a(3),d(S(12,20,e.data==null||e.data.TestResults==null?null:e.data.TestResults.EndTime,"medium")),c(11),a(3),d(L(15,23,e.data==null||e.data.TestResults==null?null:e.data.TestResults.Duration)),c(14),a(2),d(e.data==null||e.data.TestResults==null?null:e.data.TestResults.VerificationsActualLength),c(17),a(3),d(e.data==null||e.data.TestResults==null?null:e.data.TestResults.WarningsActualLength),c(20),a(2),d(e.data==null||e.data.TestResults==null?null:e.data.TestResults.ErrorsActualLength),c(22),a(10),d(S(32,25,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.BeginTime,"medium")),c(31),a(3),d(S(35,28,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.EndTime,"medium")),c(34),a(3),d(L(38,31,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.Duration)),c(37),a(4),d(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DeletedFileCount)(h(42,33,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DeletedFileSize,!0,!0)),c(41),a(3),d(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DownloadedFileCount)(h(45,37,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DownloadedFileSize,!0,!0)),c(44),a(3),d(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.UploadedFileCount)(h(48,41,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.UploadedFileSize,!0,!0)),c(47),a(3),d(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.WarningsActualLength),c(51),a(2),d(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.ErrorsActualLength),c(53)}}function Ye(n,t){if(n&1&&(o(0,"code"),E(1),u(2,"json"),i()),n&2){let e=t.$implicit;a(),K(L(2,1,e))}}function Ze(n,t){if(n&1&&(o(0,"details",46)(1,"summary"),N(2,31),s(3,"sh-icon"),o(4,"div",47),s(5,"sh-icon",40),i(),m(),i(),o(6,"div",48),b(7,Ye,3,3,"code",null,B),i()()),n&2){let e=C(2).$implicit;a(5),d(e.data.VerificationsActualLength),c(2),a(2),k(e.data.Verifications)}}function en(n,t){if(n&1&&(o(0,"code"),E(1),u(2,"json"),i()),n&2){let e=t.$implicit;a(),K(L(2,1,e))}}function nn(n,t){n&1&&(o(0,"p"),E(1,"No errors"),i())}function tn(n,t){if(n&1&&(o(0,"code"),E(1),u(2,"json"),i()),n&2){let e=t.$implicit;a(),K(L(2,1,e))}}function on(n,t){if(n&1&&(o(0,"section",41)(1,"sh-toggle-card",42),G(2,43),o(3,"h3"),l(4,0),i(),P(),G(5,44),o(6,"p"),l(7,1),u(8,"date"),i(),o(9,"p"),l(10,2),u(11,"date"),i(),o(12,"p"),l(13,3),u(14,"durationFormat"),i(),P(),i(),o(15,"sh-toggle-card",42),G(16,43),o(17,"h3"),l(18,4),i(),P(),G(19,44),o(20,"p"),l(21,5),u(22,"bytes"),i(),o(23,"p"),l(24,6),u(25,"bytes"),i(),o(26,"p"),l(27,7),u(28,"bytes"),i(),o(29,"p"),l(30,8),u(31,"bytes"),i(),o(32,"p"),l(33,9),i(),o(34,"p"),l(35,10),i(),o(36,"p"),l(37,11),i(),P(),i(),o(38,"div",45),s(39,"sh-divider"),g(40,Qe,54,45),g(41,Ze,9,1,"details",46),o(42,"details",46)(43,"summary"),N(44,12),s(45,"sh-icon"),o(46,"div",47),s(47,"sh-icon",40),i(),m(),i(),o(48,"div",48),b(49,en,3,3,"code",null,B),i()(),o(51,"details",46)(52,"summary"),N(53,13),s(54,"sh-icon"),o(55,"div",47),s(56,"sh-icon",40),i(),m(),i(),o(57,"div",48),g(58,nn,2,0,"p"),b(59,tn,3,3,"code",null,B),i()(),s(61,"sh-divider"),o(62,"details")(63,"summary"),N(64,14),s(65,"sh-icon"),o(66,"div",47),s(67,"sh-icon",40),i(),m(),i(),o(68,"code")(69,"button",49),E(70,"Copy"),i(),E(71),u(72,"json"),i()()()()),n&2){let e=C().$implicit;a(),z("disallowToggle",!0),a(7),d(S(8,22,e.data==null?null:e.data.BeginTime,"medium")),c(7),a(3),d(S(11,25,e.data==null?null:e.data.EndTime,"medium")),c(10),a(3),d(L(14,28,e.data==null?null:e.data.Duration)),c(13),a(),z("disallowToggle",!0),a(7),d(e.data==null?null:e.data.ExaminedFiles)(h(22,30,e.data==null?null:e.data.SizeOfExaminedFiles,!0,!0)),c(21),a(3),d(e.data==null?null:e.data.OpenedFiles)(h(25,34,e.data==null?null:e.data.SizeOfOpenedFiles,!0,!0)),c(24),a(3),d(e.data==null?null:e.data.AddedFiles)(h(28,38,e.data==null?null:e.data.SizeOfAddedFiles,!0,!0)),c(27),a(3),d(e.data==null?null:e.data.ModifiedFiles)(h(31,42,e.data==null?null:e.data.SizeOfModifiedFiles,!0,!0)),c(30),a(2),d(e.data==null?null:e.data.DeletedFiles),c(33),a(2),d(e.data==null?null:e.data.TooLargeFiles),c(35),a(2),d(e.data==null?null:e.data.FilesWithError),c(37),a(3),T(e.data!=null&&e.data.TestResults?40:-1),a(),T((e.data==null?null:e.data.MainOperation)==="Test"?41:-1),a(6),d(e.data==null?null:e.data.WarningsActualLength),c(44),a(2),k(e.data==null?null:e.data.Warnings),a(7),d(e.data==null?null:e.data.ErrorsActualLength),c(53),a(2),T((e.data==null||e.data.Errors==null?null:e.data.Errors.length)===0?58:-1),a(),k(e.data==null?null:e.data.Errors),a(12),f(" ",L(72,46,e.data)," ")}}function an(n,t){if(n&1){let e=U();o(0,"article",33)(1,"header",34),I("click",function(){let r=D(e).$implicit,p=C();return M(p.toggleOpenEntry(r.id))}),g(2,He,1,0,"div",35)(3,je,1,0,"div",35)(4,We,1,0,"div",36)(5,qe,1,0,"div",37),o(6,"h3"),E(7),u(8,"date"),i(),o(9,"p"),E(10),i(),s(11,"div",38),o(12,"div",39)(13,"sh-icon",40),E(14,"caret-down"),i()()(),g(15,on,73,48,"section",41),i()}if(n&2){let e=t.$implicit,_=C(),r=(e.data==null?null:e.data.ParsedResult)||"Unknown";a(2),T(r=="Fatal"?2:r=="Error"?3:r=="Warning"?4:5),a(5),K(S(8,7,e.timestamp,"medium")),a(3),Ie(" ",e.data==null?null:e.data.MainOperation," ",_.getLocalizedSummary(e)," "),a(3),$("open",e.id===_.openEntry()),a(2),T(e.id===_.openEntry()?15:-1)}}var ue=class n{#e=x(de);#n=new Z;#t=new ee;backupId=le.required();openEntry=A(null);pagination=A({offset:0,pagesize:100});resource=ce({params:()=>_e({id:this.backupId()},this.pagination()),stream:({params:t})=>this.#e.getApiV1BackupByIdLog({id:t.id,pagesize:100}).pipe(J(e=>e.map(_=>({id:_.ID,operationId:_.OperationID,timestamp:_.Timestamp*1e3,type:_.Type,data:JSON.parse(_.Message),exception:JSON.stringify(_.Exception)==="{}"?null:_.Exception}))))});getLocalizedSummary(t){let e=t.data?.ErrorsActualLength??0,_=t.data?.WarningsActualLength??0,r=[];if(t.data?.MainOperation=="Backup"){if(t.data?.Duration){let p=this.#t.transform(t.data?.Duration,!0);p.startsWith("0h ")&&(p=p.slice(3)),p.startsWith("0m ")&&(p=p.slice(3)),r.push($localize`took ${p}`)}t.data?.BackendStatistics?.BytesUploaded&&r.push($localize`uploaded ${this.#n.transform(t.data?.BackendStatistics?.BytesUploaded)}`),t.data?.BackendStatistics?.KnownFileSize&&r.push($localize`backup size ${this.#n.transform(t.data?.BackendStatistics?.KnownFileSize)}`)}return e!==0&&r.push($localize`:@@errorCount:${e} error${e===1?"":"s"}`),_!==0&&r.push($localize`:@@warningCount:${_} warning${_===1?"":"s"}`),r.length===0?"":`(${r.join(", ")})`}toggleOpenEntry(t){if(this.openEntry()===t){this.openEntry.set(null);return}this.openEntry.set(t)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=X({type:n,selectors:[["app-general-log"]],inputs:{backupId:[1,"backupId"]},decls:3,vars:1,consts:()=>{let t;t=$localize`Time`;let e;e=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let _;_=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let r;r=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let p;p=$localize`Source files`;let v;v=$localize` Evaluated: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let y;y=$localize`Opened: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:)`;let j;j=$localize`Added: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:)`;let W;W=$localize` Modified: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let q;q=$localize`Deleted: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Q;Q=$localize`Too large: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Y;Y=$localize`Files with error: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let O;O=$localize`${"\uFFFD#45\uFFFD"}:START_TAG_SH_ICON:warning-circle${"[\uFFFD/#45\uFFFD|\uFFFD/#47\uFFFD]"}:CLOSE_TAG_SH_ICON: Warnings ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#46\uFFFD"}:START_TAG_DIV:${"\uFFFD#47\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#45\uFFFD|\uFFFD/#47\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#46\uFFFD"}:CLOSE_TAG_DIV:`,O=R(O);let ne;ne=$localize`${"\uFFFD#54\uFFFD"}:START_TAG_SH_ICON:warning${"[\uFFFD/#54\uFFFD|\uFFFD/#56\uFFFD]"}:CLOSE_TAG_SH_ICON: Errors ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#55\uFFFD"}:START_TAG_DIV:${"\uFFFD#56\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#54\uFFFD|\uFFFD/#56\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#55\uFFFD"}:CLOSE_TAG_DIV:`,ne=R(ne);let te;te=$localize`${"\uFFFD#65\uFFFD"}:START_TAG_SH_ICON:notepad${"[\uFFFD/#65\uFFFD|\uFFFD/#67\uFFFD]"}:CLOSE_TAG_SH_ICON: Complete log ${"\uFFFD#66\uFFFD"}:START_TAG_DIV:${"\uFFFD#67\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#65\uFFFD|\uFFFD/#67\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#66\uFFFD"}:CLOSE_TAG_DIV:`,te=R(te);let ie;ie=$localize`${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:circle-half-tilt${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SH_ICON: Test phase ${"\uFFFD#4\uFFFD"}:START_TAG_DIV:${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_DIV:`,ie=R(ie);let Ce;Ce=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let ge;ge=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Te;Te=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Oe;Oe=$localize`Verifications: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Le;Le=$localize`Warnings: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Ne;Ne=$localize`Errors: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let oe;oe=$localize`${"\uFFFD#26\uFFFD"}:START_TAG_SH_ICON:file-archive${"[\uFFFD/#26\uFFFD|\uFFFD/#28\uFFFD]"}:CLOSE_TAG_SH_ICON: Compact phase ${"\uFFFD#27\uFFFD"}:START_TAG_DIV:${"\uFFFD#28\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#26\uFFFD|\uFFFD/#28\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#27\uFFFD"}:CLOSE_TAG_DIV:`,oe=R(oe);let me;me=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Se;Se=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Ge;Ge=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Pe;Pe=$localize` Deleted files: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let Ae;Ae=$localize` Downloaded files: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let Re;Re=$localize` Uploaded files: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let De;De=$localize`Warnings: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Me;Me=$localize`Errors: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let ae;return ae=$localize`${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:warning-circle${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SH_ICON: Verifications ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#4\uFFFD"}:START_TAG_DIV:${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_DIV:`,ae=R(ae),[t,e,_,r,p,v,y,j,W,q,Q,Y,O,ne,te,ie,Ce,ge,Te,Oe,Le,Ne,oe,me,Se,Ge,Pe,Ae,Re,De,Me,ae,[1,"indeterminate","primary"],[1,"log-entry"],[3,"click"],[1,"status","error"],[1,"status","warn"],[1,"status"],[1,"spacer"],[1,"action"],[1,"toggle-indicator"],[1,"log-content"],[3,"disallowToggle"],["title",""],["content",""],[1,"extra-info"],["name","details"],[1,"actions"],[1,"content"],["shButton","",1,"small"]]},template:function(e,_){e&1&&(g(0,Ve,1,0,"sh-progress-bar",32),b(1,an,16,10,"article",33,B)),e&2&&(T(_.resource.isLoading()?0:-1),a(),k(_.resource.value()))},dependencies:[Ue,be,Fe,se,H,Z,V,ee,re],styles:["[_nghost-%COMP%]{display:block}.log-entry[_ngcontent-%COMP%]{display:flex;flex-direction:column;cursor:pointer}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:1rem;border-bottom:1px solid var(--base-4);background-color:var(--base-1);cursor:pointer}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]:hover{background-color:var(--base-2)}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-30);margin:0}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-8)}.toggle-indicator[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;height:1.25rem;transition:transform 125ms linear}.toggle-indicator.open[_ngcontent-%COMP%]{transform:rotate(180deg)}details[_ngcontent-%COMP%]{display:flex;flex-direction:column}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;gap:.5rem;padding:.75rem;border-radius:var(--shape-2);background-color:var(--base-2)}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]:focus{outline:none}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]:hover{background-color:var(--base-3)}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]::marker{font-size:0}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;flex:1 0;gap:.5rem;-webkit-user-select:none;user-select:none}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;height:2rem;transition:transform 125ms linear}details[open][_ngcontent-%COMP%] summary[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{transform:rotate(180deg)}details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{padding:.75rem 1rem 0;display:flex;flex-direction:column;gap:.75rem}details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0}details[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{margin-top:.75rem;position:relative}details[_ngcontent-%COMP%] code[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{position:absolute;top:.75rem;right:.75rem}.extra-info[_ngcontent-%COMP%]{grid-column:1/-1;display:flex;flex-direction:column;gap:1rem}.extra-info[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;margin-bottom:.75rem}.extra-info[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{white-space:pre-wrap;padding:1rem;display:block;border-radius:var(--shape-2);background-color:var(--base-2)}.log-content[_ngcontent-%COMP%]{padding:1rem;display:grid;grid-template-columns:1fr 1fr;gap:1rem}.status[_ngcontent-%COMP%]{display:block;width:1rem;height:1rem;background-color:var(--success-8);border-radius:50%}.status.error[_ngcontent-%COMP%]{background-color:var(--error-8)}.status.warn[_ngcontent-%COMP%]{background-color:var(--warn-8)}"],changeDetection:0})};function _n(n,t){n&1&&s(0,"sh-progress-bar",1)}function ln(n,t){n&1&&(N(0,0,1),s(1,"sh-icon"),m())}function rn(n,t){n&1&&(N(0,0,2),s(1,"sh-icon"),m())}function sn(n,t){if(n&1){let e=U();o(0,"section",6)(1,"button",7),I("click",function(){D(e);let r=C(),p=r.$implicit,v=r.$index,y=C();return M(y.copyToClipboard(p.data,v))}),N(2,0),g(3,ln,2,0)(4,rn,2,0),m(),i(),o(5,"code"),E(6),u(7,"json"),i()()}if(n&2){let e=C(),_=e.$implicit,r=e.$index,p=C();a(),$("success",p.copiedFromIndex()===r),a(2),T(p.copiedFromIndex()===r?3:4),a(3),K(L(7,4,_.data))}}function Fn(n,t){if(n&1){let e=U();o(0,"article",2)(1,"header",3),I("click",function(){let r=D(e).$implicit,p=C();return M(p.toggleOpenEntry(r.id))}),o(2,"h3"),E(3),u(4,"date"),i(),o(5,"div",4)(6,"sh-icon",5),E(7,"caret-down"),i()()(),g(8,sn,8,6,"section",6),i()}if(n&2){let e=t.$implicit,_=C();a(3),$e("",S(4,6,e.timestamp,"medium"),": ",e.operation," ",e.path),a(3),$("open",e.id===_.openEntry()),a(2),T(e.id===_.openEntry()?8:-1)}}var pe=class n{#e=x(de);backupId=le.required();openEntry=A(null);pagination=A({offset:0,pagesize:100});copiedFromIndex=A(null);resource=ce({params:()=>_e({id:this.backupId()},this.pagination()),stream:({params:t})=>this.#e.getApiV1BackupByIdRemotelog({id:t.id,pagesize:100}).pipe(J(e=>e.map((_,r)=>({id:_.ID,operationId:_.OperationID,timestamp:_.Timestamp*1e3,operation:_.Operation,path:_.Path,data:typeof _.Data=="string"?JSON.parse(_.Data):null}))))});toggleOpenEntry(t){if(this.openEntry()===t){this.openEntry.set(null);return}this.openEntry.set(t)}copyToClipboard(t,e){let _=JSON.stringify(t,null,2);navigator.clipboard.writeText(_),this.copiedFromIndex.set(e),setTimeout(()=>{this.copiedFromIndex.set(null)},3e3)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=X({type:n,selectors:[["app-remote-log"]],inputs:{backupId:[1,"backupId"]},decls:3,vars:1,consts:()=>{let t;return t=$localize`${"\uFFFD*3:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Copied ${"\uFFFD/*3:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*4:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Copy to clipboard ${"\uFFFD/*4:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,t=R(t),[t,[1,"indeterminate","primary"],[1,"log-entry"],[3,"click"],[1,"actions"],[1,"toggle-indicator"],[1,"log-content"],["shButton","",1,"small",3,"click"]]},template:function(e,_){e&1&&(g(0,_n,1,0,"sh-progress-bar",1),b(1,Fn,9,9,"article",2,B)),e&2&&(T(_.resource.isLoading()?0:-1),a(),k(_.resource.value()))},dependencies:[Fe,H,re,V],styles:["[_nghost-%COMP%]{display:block}.log-entry[_ngcontent-%COMP%]{display:flex;flex-direction:column}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:1rem;border-bottom:1px solid var(--base-4);background-color:var(--base-1);cursor:pointer}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]:hover{background-color:var(--base-2)}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-30);margin:0;-webkit-user-select:none;user-select:none}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-8)}.toggle-indicator[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;height:1.25rem;transition:transform 125ms linear}.toggle-indicator.open[_ngcontent-%COMP%]{transform:rotate(180deg)}.log-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:1rem;position:relative}.log-content[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{position:absolute;top:2rem;right:2rem;background:transparent}code[_ngcontent-%COMP%]{white-space:pre-wrap;padding:1rem;display:block;border-radius:var(--shape-2);background-color:var(--base-2)}"],changeDetection:0})};function dn(n,t){if(n&1&&(E(0," - "),G(1),l(2,6),P(),E(3),u(4,"durationFormat")),n&2){C(2);let e=w(6);a(3),f(" ",L(4,1,e.Backup.Metadata==null?null:e.Backup.Metadata.LastBackupDuration)," ")}}function cn(n,t){n&1&&(G(0),l(1,7),P())}function un(n,t){if(n&1&&(E(0),u(1,"bytes")),n&2){C(2);let e=w(6);f(" ",L(1,1,e.Backup.Metadata==null?null:e.Backup.Metadata.SourceFilesSize)," ")}}function pn(n,t){n&1&&(G(0),l(1,8),P())}function En(n,t){if(n&1&&(E(0),u(1,"bytes")),n&2){C(2);let e=w(6);f(" ",L(1,1,e.Backup.Metadata==null?null:e.Backup.Metadata.TargetFilesSize)," ")}}function Cn(n,t){n&1&&(G(0),l(1,9),P())}function gn(n,t){if(n&1&&(o(0,"sh-chip",19),l(1,10),i()),n&2){C(2);let e=w(6);a(),d(e.Backup.Metadata==null?null:e.Backup.Metadata.BackupListCount),c(1)}}function Tn(n,t){n&1&&(o(0,"sh-chip",20),l(1,11),i())}function On(n,t){if(n&1&&(o(0,"div",14)(1,"div",18)(2,"h3"),E(3),o(4,"sh-icon"),E(5,"database"),i()(),o(6,"p")(7,"span"),l(8,3),i(),E(9),u(10,"date"),g(11,dn,5,3)(12,cn,2,0,"ng-container"),i(),o(13,"p")(14,"span"),l(15,4),i(),g(16,un,2,3)(17,pn,2,0,"ng-container"),i(),o(18,"p")(19,"span"),l(20,5),i(),g(21,En,2,3)(22,Cn,2,0,"ng-container"),i()(),g(23,gn,2,1,"sh-chip",19)(24,Tn,2,0,"sh-chip",20),i()),n&2){let e=C(),_=w(6);a(3),f(" ",_.Backup.Name??e.MISSING_BACKUP_NAME," "),a(6),f(" ",S(10,6,_.Backup.Metadata==null?null:_.Backup.Metadata.LastBackupDate,"short")," "),a(2),T(_.Backup.Metadata!=null&&_.Backup.Metadata.LastBackupDuration?11:12),a(5),T(_.Backup.Metadata!=null&&_.Backup.Metadata.SourceFilesSize?16:17),a(5),T(_.Backup.Metadata!=null&&_.Backup.Metadata.TargetFilesSize?21:22),a(2),T(_.Backup.Metadata!=null&&_.Backup.Metadata.BackupListCount?23:24)}}function Ln(n,t){if(n&1&&s(0,"app-general-log",17),n&2){let e=C();z("backupId",e.backupId())}}function Nn(n,t){if(n&1&&s(0,"app-remote-log",17),n&2){let e=C();z("backupId",e.backupId())}}var Ee=class n{#e=x(ye);#n=x(Ke);MISSING_BACKUP_NAME=$localize`Backup name missing`;activeTab=A("general");backupId=Je(this.#e.params.pipe(J(t=>t.id)));backup=ve(()=>{let t=this.backupId();return t?this.#n.getBackupById(t):null});static \u0275fac=function(e){return new(e||n)};static \u0275cmp=X({type:n,selectors:[["app-log"]],decls:15,vars:8,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let e;e=$localize`General`;let _;_=$localize` Destination `;let r;r=$localize`Last successful backup:`;let p;p=$localize`Source:`;let v;v=$localize`Destination:`;let y;y=$localize`took`;let j;j=$localize`N/A`;let W;W=$localize`N/A`;let q;q=$localize`N/A`;let Q;Q=$localize`${"\uFFFD0\uFFFD"}:INTERPOLATION: Version`;let Y;return Y=$localize`No version yet`,[t,e,_,r,p,v,y,j,W,q,Q,Y,[1,"back"],["type","button","shButton","","routerLink","/",1,"small"],[1,"backup"],[1,"primary"],["tab","",3,"click"],[3,"backupId"],[1,"text"],[1,"simple","success"],[1,"simple"]]},template:function(e,_){if(e&1){let r=U();s(0,"app-status-bar"),o(1,"section")(2,"div",12)(3,"button",13),N(4,0),s(5,"sh-icon"),m(),i()(),fe(6),g(7,On,25,9,"div",14),o(8,"sh-tabs",15)(9,"button",16),I("click",function(){return D(r),M(_.activeTab.set("general"))}),l(10,1),i(),o(11,"button",16),I("click",function(){return D(r),M(_.activeTab.set("destination"))}),l(12,2),i()(),g(13,Ln,1,1,"app-general-log",17),g(14,Nn,1,1,"app-remote-log",17),i()}if(e&2){a(6);let r=he(_.backup());a(),T(r?7:-1),a(2),$("active",_.activeTab()==="general"),a(2),$("active",_.activeTab()==="destination"),a(2),T(_.activeTab()==="general"?13:-1),a(),T(_.activeTab()==="destination"?14:-1)}},dependencies:[ke,ue,pe,xe,Xe,H,se,Be,Z,ee,V],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:1rem 1.5rem;gap:1rem}sh-tabs[_ngcontent-%COMP%]{margin-bottom:1rem}.backup[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem;gap:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;width:100%;max-width:40%}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{color:var(--base-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--base-12)}"],changeDetection:0})};export{Ee as default};
1
+ import{a as Xe}from"./chunk-QQOFLIJG.js";import{a as ee}from"./chunk-KRXQDBGB.js";import"./chunk-LWJ6FCGJ.js";import"./chunk-FOQJA6X2.js";import"./chunk-VHOAXFIJ.js";import{a as Ke}from"./chunk-FVZOIWTT.js";import"./chunk-6Q6SSTBK.js";import{a as Z}from"./chunk-FK7JFD5B.js";import"./chunk-ODTXKOWN.js";import"./chunk-ME77WZZI.js";import"./chunk-5DJAX2HH.js";import"./chunk-QZRRXR3V.js";import"./chunk-KTLT4LKY.js";import{b as Je,c as ce}from"./chunk-DW332N2S.js";import"./chunk-6K3PRIYO.js";import"./chunk-TELPJYLN.js";import"./chunk-5QZIKR6A.js";import{B as se,E as Be,G as be,L as Fe,U as ke,V as Ue,u as H}from"./chunk-HPNLQHW6.js";import{c as de}from"./chunk-BGTK25UG.js";import{b as ye,e as xe}from"./chunk-A4LPGPDU.js";import"./chunk-PKPBSTZA.js";import"./chunk-QPTSKQZ2.js";import{fa as V,ia as re}from"./chunk-OTPG7USH.js";import"./chunk-TT3S63BX.js";import{$ as D,Ab as i,Bb as s,Cc as u,Dc as L,Ec as S,Fb as G,Fc as h,Gb as P,Ib as U,Mc as ve,Pa as a,Pb as N,Qb as m,Rb as l,Rc as le,Sb as d,Tb as c,Ub as R,Vb as I,W as x,Xb as C,aa as M,cb as X,gc as $,jc as E,kc as K,la as A,lc as f,mc as Ie,nc as $e,p as J,rc as fe,sb as g,sc as he,tb as T,tc as w,ub as B,wb as b,xb as k,yb as z,zb as o}from"./chunk-T2WO6CVD.js";import{a as _e}from"./chunk-7CGTOI24.js";function Ve(n,t){n&1&&s(0,"sh-progress-bar",32)}function He(n,t){n&1&&s(0,"div",35)}function je(n,t){n&1&&s(0,"div",35)}function We(n,t){n&1&&s(0,"div",36)}function qe(n,t){n&1&&s(0,"div",37)}function Qe(n,t){if(n&1&&(o(0,"details",46)(1,"summary"),N(2,15),s(3,"sh-icon"),o(4,"div",47),s(5,"sh-icon",40),i(),m(),i(),o(6,"div",48)(7,"p"),l(8,16),u(9,"date"),i(),o(10,"p"),l(11,17),u(12,"date"),i(),o(13,"p"),l(14,18),u(15,"durationFormat"),i(),o(16,"p"),l(17,19),i(),s(18,"sh-divider"),o(19,"p"),l(20,20),i(),o(21,"p"),l(22,21),i()()(),o(23,"details",46)(24,"summary"),N(25,22),s(26,"sh-icon"),o(27,"div",47),s(28,"sh-icon",40),i(),m(),i(),o(29,"div",48)(30,"p"),l(31,23),u(32,"date"),i(),o(33,"p"),l(34,24),u(35,"date"),i(),o(36,"p"),l(37,25),u(38,"durationFormat"),i(),s(39,"sh-divider"),o(40,"p"),l(41,26),u(42,"bytes"),i(),o(43,"p"),l(44,27),u(45,"bytes"),i(),o(46,"p"),l(47,28),u(48,"bytes"),i(),s(49,"sh-divider"),o(50,"p"),l(51,29),i(),o(52,"p"),l(53,30),i()()()),n&2){let e=C(2).$implicit;a(9),d(S(9,17,e.data==null||e.data.TestResults==null?null:e.data.TestResults.BeginTime,"medium")),c(8),a(3),d(S(12,20,e.data==null||e.data.TestResults==null?null:e.data.TestResults.EndTime,"medium")),c(11),a(3),d(L(15,23,e.data==null||e.data.TestResults==null?null:e.data.TestResults.Duration)),c(14),a(2),d(e.data==null||e.data.TestResults==null?null:e.data.TestResults.VerificationsActualLength),c(17),a(3),d(e.data==null||e.data.TestResults==null?null:e.data.TestResults.WarningsActualLength),c(20),a(2),d(e.data==null||e.data.TestResults==null?null:e.data.TestResults.ErrorsActualLength),c(22),a(10),d(S(32,25,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.BeginTime,"medium")),c(31),a(3),d(S(35,28,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.EndTime,"medium")),c(34),a(3),d(L(38,31,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.Duration)),c(37),a(4),d(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DeletedFileCount)(h(42,33,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DeletedFileSize,!0,!0)),c(41),a(3),d(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DownloadedFileCount)(h(45,37,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DownloadedFileSize,!0,!0)),c(44),a(3),d(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.UploadedFileCount)(h(48,41,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.UploadedFileSize,!0,!0)),c(47),a(3),d(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.WarningsActualLength),c(51),a(2),d(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.ErrorsActualLength),c(53)}}function Ye(n,t){if(n&1&&(o(0,"code"),E(1),u(2,"json"),i()),n&2){let e=t.$implicit;a(),K(L(2,1,e))}}function Ze(n,t){if(n&1&&(o(0,"details",46)(1,"summary"),N(2,31),s(3,"sh-icon"),o(4,"div",47),s(5,"sh-icon",40),i(),m(),i(),o(6,"div",48),b(7,Ye,3,3,"code",null,B),i()()),n&2){let e=C(2).$implicit;a(5),d(e.data.VerificationsActualLength),c(2),a(2),k(e.data.Verifications)}}function en(n,t){if(n&1&&(o(0,"code"),E(1),u(2,"json"),i()),n&2){let e=t.$implicit;a(),K(L(2,1,e))}}function nn(n,t){n&1&&(o(0,"p"),E(1,"No errors"),i())}function tn(n,t){if(n&1&&(o(0,"code"),E(1),u(2,"json"),i()),n&2){let e=t.$implicit;a(),K(L(2,1,e))}}function on(n,t){if(n&1&&(o(0,"section",41)(1,"sh-toggle-card",42),G(2,43),o(3,"h3"),l(4,0),i(),P(),G(5,44),o(6,"p"),l(7,1),u(8,"date"),i(),o(9,"p"),l(10,2),u(11,"date"),i(),o(12,"p"),l(13,3),u(14,"durationFormat"),i(),P(),i(),o(15,"sh-toggle-card",42),G(16,43),o(17,"h3"),l(18,4),i(),P(),G(19,44),o(20,"p"),l(21,5),u(22,"bytes"),i(),o(23,"p"),l(24,6),u(25,"bytes"),i(),o(26,"p"),l(27,7),u(28,"bytes"),i(),o(29,"p"),l(30,8),u(31,"bytes"),i(),o(32,"p"),l(33,9),i(),o(34,"p"),l(35,10),i(),o(36,"p"),l(37,11),i(),P(),i(),o(38,"div",45),s(39,"sh-divider"),g(40,Qe,54,45),g(41,Ze,9,1,"details",46),o(42,"details",46)(43,"summary"),N(44,12),s(45,"sh-icon"),o(46,"div",47),s(47,"sh-icon",40),i(),m(),i(),o(48,"div",48),b(49,en,3,3,"code",null,B),i()(),o(51,"details",46)(52,"summary"),N(53,13),s(54,"sh-icon"),o(55,"div",47),s(56,"sh-icon",40),i(),m(),i(),o(57,"div",48),g(58,nn,2,0,"p"),b(59,tn,3,3,"code",null,B),i()(),s(61,"sh-divider"),o(62,"details")(63,"summary"),N(64,14),s(65,"sh-icon"),o(66,"div",47),s(67,"sh-icon",40),i(),m(),i(),o(68,"code")(69,"button",49),E(70,"Copy"),i(),E(71),u(72,"json"),i()()()()),n&2){let e=C().$implicit;a(),z("disallowToggle",!0),a(7),d(S(8,22,e.data==null?null:e.data.BeginTime,"medium")),c(7),a(3),d(S(11,25,e.data==null?null:e.data.EndTime,"medium")),c(10),a(3),d(L(14,28,e.data==null?null:e.data.Duration)),c(13),a(),z("disallowToggle",!0),a(7),d(e.data==null?null:e.data.ExaminedFiles)(h(22,30,e.data==null?null:e.data.SizeOfExaminedFiles,!0,!0)),c(21),a(3),d(e.data==null?null:e.data.OpenedFiles)(h(25,34,e.data==null?null:e.data.SizeOfOpenedFiles,!0,!0)),c(24),a(3),d(e.data==null?null:e.data.AddedFiles)(h(28,38,e.data==null?null:e.data.SizeOfAddedFiles,!0,!0)),c(27),a(3),d(e.data==null?null:e.data.ModifiedFiles)(h(31,42,e.data==null?null:e.data.SizeOfModifiedFiles,!0,!0)),c(30),a(2),d(e.data==null?null:e.data.DeletedFiles),c(33),a(2),d(e.data==null?null:e.data.TooLargeFiles),c(35),a(2),d(e.data==null?null:e.data.FilesWithError),c(37),a(3),T(e.data!=null&&e.data.TestResults?40:-1),a(),T((e.data==null?null:e.data.MainOperation)==="Test"?41:-1),a(6),d(e.data==null?null:e.data.WarningsActualLength),c(44),a(2),k(e.data==null?null:e.data.Warnings),a(7),d(e.data==null?null:e.data.ErrorsActualLength),c(53),a(2),T((e.data==null||e.data.Errors==null?null:e.data.Errors.length)===0?58:-1),a(),k(e.data==null?null:e.data.Errors),a(12),f(" ",L(72,46,e.data)," ")}}function an(n,t){if(n&1){let e=U();o(0,"article",33)(1,"header",34),I("click",function(){let r=D(e).$implicit,p=C();return M(p.toggleOpenEntry(r.id))}),g(2,He,1,0,"div",35)(3,je,1,0,"div",35)(4,We,1,0,"div",36)(5,qe,1,0,"div",37),o(6,"h3"),E(7),u(8,"date"),i(),o(9,"p"),E(10),i(),s(11,"div",38),o(12,"div",39)(13,"sh-icon",40),E(14,"caret-down"),i()()(),g(15,on,73,48,"section",41),i()}if(n&2){let e=t.$implicit,_=C(),r=(e.data==null?null:e.data.ParsedResult)||"Unknown";a(2),T(r=="Fatal"?2:r=="Error"?3:r=="Warning"?4:5),a(5),K(S(8,7,e.timestamp,"medium")),a(3),Ie(" ",e.data==null?null:e.data.MainOperation," ",_.getLocalizedSummary(e)," "),a(3),$("open",e.id===_.openEntry()),a(2),T(e.id===_.openEntry()?15:-1)}}var ue=class n{#e=x(de);#n=new Z;#t=new ee;backupId=le.required();openEntry=A(null);pagination=A({offset:0,pagesize:100});resource=ce({params:()=>_e({id:this.backupId()},this.pagination()),stream:({params:t})=>this.#e.getApiV1BackupByIdLog({id:t.id,pagesize:100}).pipe(J(e=>e.map(_=>({id:_.ID,operationId:_.OperationID,timestamp:_.Timestamp*1e3,type:_.Type,data:JSON.parse(_.Message),exception:JSON.stringify(_.Exception)==="{}"?null:_.Exception}))))});getLocalizedSummary(t){let e=t.data?.ErrorsActualLength??0,_=t.data?.WarningsActualLength??0,r=[];if(t.data?.MainOperation=="Backup"){if(t.data?.Duration){let p=this.#t.transform(t.data?.Duration,!0);p.startsWith("0h ")&&(p=p.slice(3)),p.startsWith("0m ")&&(p=p.slice(3)),r.push($localize`took ${p}`)}t.data?.BackendStatistics?.BytesUploaded&&r.push($localize`uploaded ${this.#n.transform(t.data?.BackendStatistics?.BytesUploaded)}`),t.data?.BackendStatistics?.KnownFileSize&&r.push($localize`backup size ${this.#n.transform(t.data?.BackendStatistics?.KnownFileSize)}`)}return e!==0&&r.push($localize`:@@errorCount:${e} error${e===1?"":"s"}`),_!==0&&r.push($localize`:@@warningCount:${_} warning${_===1?"":"s"}`),r.length===0?"":`(${r.join(", ")})`}toggleOpenEntry(t){if(this.openEntry()===t){this.openEntry.set(null);return}this.openEntry.set(t)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=X({type:n,selectors:[["app-general-log"]],inputs:{backupId:[1,"backupId"]},decls:3,vars:1,consts:()=>{let t;t=$localize`Time`;let e;e=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let _;_=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let r;r=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let p;p=$localize`Source files`;let v;v=$localize` Evaluated: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let y;y=$localize`Opened: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:)`;let j;j=$localize`Added: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:)`;let W;W=$localize` Modified: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let q;q=$localize`Deleted: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Q;Q=$localize`Too large: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Y;Y=$localize`Files with error: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let O;O=$localize`${"\uFFFD#45\uFFFD"}:START_TAG_SH_ICON:warning-circle${"[\uFFFD/#45\uFFFD|\uFFFD/#47\uFFFD]"}:CLOSE_TAG_SH_ICON: Warnings ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#46\uFFFD"}:START_TAG_DIV:${"\uFFFD#47\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#45\uFFFD|\uFFFD/#47\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#46\uFFFD"}:CLOSE_TAG_DIV:`,O=R(O);let ne;ne=$localize`${"\uFFFD#54\uFFFD"}:START_TAG_SH_ICON:warning${"[\uFFFD/#54\uFFFD|\uFFFD/#56\uFFFD]"}:CLOSE_TAG_SH_ICON: Errors ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#55\uFFFD"}:START_TAG_DIV:${"\uFFFD#56\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#54\uFFFD|\uFFFD/#56\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#55\uFFFD"}:CLOSE_TAG_DIV:`,ne=R(ne);let te;te=$localize`${"\uFFFD#65\uFFFD"}:START_TAG_SH_ICON:notepad${"[\uFFFD/#65\uFFFD|\uFFFD/#67\uFFFD]"}:CLOSE_TAG_SH_ICON: Complete log ${"\uFFFD#66\uFFFD"}:START_TAG_DIV:${"\uFFFD#67\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#65\uFFFD|\uFFFD/#67\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#66\uFFFD"}:CLOSE_TAG_DIV:`,te=R(te);let ie;ie=$localize`${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:circle-half-tilt${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SH_ICON: Test phase ${"\uFFFD#4\uFFFD"}:START_TAG_DIV:${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_DIV:`,ie=R(ie);let Ce;Ce=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let ge;ge=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Te;Te=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Oe;Oe=$localize`Verifications: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Le;Le=$localize`Warnings: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Ne;Ne=$localize`Errors: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let oe;oe=$localize`${"\uFFFD#26\uFFFD"}:START_TAG_SH_ICON:file-archive${"[\uFFFD/#26\uFFFD|\uFFFD/#28\uFFFD]"}:CLOSE_TAG_SH_ICON: Compact phase ${"\uFFFD#27\uFFFD"}:START_TAG_DIV:${"\uFFFD#28\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#26\uFFFD|\uFFFD/#28\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#27\uFFFD"}:CLOSE_TAG_DIV:`,oe=R(oe);let me;me=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Se;Se=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Ge;Ge=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Pe;Pe=$localize` Deleted files: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let Ae;Ae=$localize` Downloaded files: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let Re;Re=$localize` Uploaded files: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let De;De=$localize`Warnings: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Me;Me=$localize`Errors: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let ae;return ae=$localize`${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:warning-circle${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SH_ICON: Verifications ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#4\uFFFD"}:START_TAG_DIV:${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_DIV:`,ae=R(ae),[t,e,_,r,p,v,y,j,W,q,Q,Y,O,ne,te,ie,Ce,ge,Te,Oe,Le,Ne,oe,me,Se,Ge,Pe,Ae,Re,De,Me,ae,[1,"indeterminate","primary"],[1,"log-entry"],[3,"click"],[1,"status","error"],[1,"status","warn"],[1,"status"],[1,"spacer"],[1,"action"],[1,"toggle-indicator"],[1,"log-content"],[3,"disallowToggle"],["title",""],["content",""],[1,"extra-info"],["name","details"],[1,"actions"],[1,"content"],["shButton","",1,"small"]]},template:function(e,_){e&1&&(g(0,Ve,1,0,"sh-progress-bar",32),b(1,an,16,10,"article",33,B)),e&2&&(T(_.resource.isLoading()?0:-1),a(),k(_.resource.value()))},dependencies:[Ue,be,Fe,se,H,Z,V,ee,re],styles:["[_nghost-%COMP%]{display:block}.log-entry[_ngcontent-%COMP%]{display:flex;flex-direction:column;cursor:pointer}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:1rem;border-bottom:1px solid var(--base-4);background-color:var(--base-1);cursor:pointer}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]:hover{background-color:var(--base-2)}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-30);margin:0}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-8)}.toggle-indicator[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;height:1.25rem;transition:transform 125ms linear}.toggle-indicator.open[_ngcontent-%COMP%]{transform:rotate(180deg)}details[_ngcontent-%COMP%]{display:flex;flex-direction:column}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;gap:.5rem;padding:.75rem;border-radius:var(--shape-2);background-color:var(--base-2)}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]:focus{outline:none}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]:hover{background-color:var(--base-3)}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]::marker{font-size:0}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;flex:1 0;gap:.5rem;-webkit-user-select:none;user-select:none}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;height:2rem;transition:transform 125ms linear}details[open][_ngcontent-%COMP%] summary[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{transform:rotate(180deg)}details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{padding:.75rem 1rem 0;display:flex;flex-direction:column;gap:.75rem}details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0}details[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{margin-top:.75rem;position:relative}details[_ngcontent-%COMP%] code[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{position:absolute;top:.75rem;right:.75rem}.extra-info[_ngcontent-%COMP%]{grid-column:1/-1;display:flex;flex-direction:column;gap:1rem}.extra-info[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;margin-bottom:.75rem}.extra-info[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{white-space:pre-wrap;padding:1rem;display:block;border-radius:var(--shape-2);background-color:var(--base-2)}.log-content[_ngcontent-%COMP%]{padding:1rem;display:grid;grid-template-columns:1fr 1fr;gap:1rem}.status[_ngcontent-%COMP%]{display:block;width:1rem;height:1rem;background-color:var(--success-8);border-radius:50%}.status.error[_ngcontent-%COMP%]{background-color:var(--error-8)}.status.warn[_ngcontent-%COMP%]{background-color:var(--warn-8)}"],changeDetection:0})};function _n(n,t){n&1&&s(0,"sh-progress-bar",1)}function ln(n,t){n&1&&(N(0,0,1),s(1,"sh-icon"),m())}function rn(n,t){n&1&&(N(0,0,2),s(1,"sh-icon"),m())}function sn(n,t){if(n&1){let e=U();o(0,"section",6)(1,"button",7),I("click",function(){D(e);let r=C(),p=r.$implicit,v=r.$index,y=C();return M(y.copyToClipboard(p.data,v))}),N(2,0),g(3,ln,2,0)(4,rn,2,0),m(),i(),o(5,"code"),E(6),u(7,"json"),i()()}if(n&2){let e=C(),_=e.$implicit,r=e.$index,p=C();a(),$("success",p.copiedFromIndex()===r),a(2),T(p.copiedFromIndex()===r?3:4),a(3),K(L(7,4,_.data))}}function Fn(n,t){if(n&1){let e=U();o(0,"article",2)(1,"header",3),I("click",function(){let r=D(e).$implicit,p=C();return M(p.toggleOpenEntry(r.id))}),o(2,"h3"),E(3),u(4,"date"),i(),o(5,"div",4)(6,"sh-icon",5),E(7,"caret-down"),i()()(),g(8,sn,8,6,"section",6),i()}if(n&2){let e=t.$implicit,_=C();a(3),$e("",S(4,6,e.timestamp,"medium"),": ",e.operation," ",e.path),a(3),$("open",e.id===_.openEntry()),a(2),T(e.id===_.openEntry()?8:-1)}}var pe=class n{#e=x(de);backupId=le.required();openEntry=A(null);pagination=A({offset:0,pagesize:100});copiedFromIndex=A(null);resource=ce({params:()=>_e({id:this.backupId()},this.pagination()),stream:({params:t})=>this.#e.getApiV1BackupByIdRemotelog({id:t.id,pagesize:100}).pipe(J(e=>e.map((_,r)=>({id:_.ID,operationId:_.OperationID,timestamp:_.Timestamp*1e3,operation:_.Operation,path:_.Path,data:typeof _.Data=="string"?JSON.parse(_.Data):null}))))});toggleOpenEntry(t){if(this.openEntry()===t){this.openEntry.set(null);return}this.openEntry.set(t)}copyToClipboard(t,e){let _=JSON.stringify(t,null,2);navigator.clipboard.writeText(_),this.copiedFromIndex.set(e),setTimeout(()=>{this.copiedFromIndex.set(null)},3e3)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=X({type:n,selectors:[["app-remote-log"]],inputs:{backupId:[1,"backupId"]},decls:3,vars:1,consts:()=>{let t;return t=$localize`${"\uFFFD*3:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Copied ${"\uFFFD/*3:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*4:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Copy to clipboard ${"\uFFFD/*4:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,t=R(t),[t,[1,"indeterminate","primary"],[1,"log-entry"],[3,"click"],[1,"actions"],[1,"toggle-indicator"],[1,"log-content"],["shButton","",1,"small",3,"click"]]},template:function(e,_){e&1&&(g(0,_n,1,0,"sh-progress-bar",1),b(1,Fn,9,9,"article",2,B)),e&2&&(T(_.resource.isLoading()?0:-1),a(),k(_.resource.value()))},dependencies:[Fe,H,re,V],styles:["[_nghost-%COMP%]{display:block}.log-entry[_ngcontent-%COMP%]{display:flex;flex-direction:column}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:1rem;border-bottom:1px solid var(--base-4);background-color:var(--base-1);cursor:pointer}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]:hover{background-color:var(--base-2)}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-30);margin:0;-webkit-user-select:none;user-select:none}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-8)}.toggle-indicator[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;height:1.25rem;transition:transform 125ms linear}.toggle-indicator.open[_ngcontent-%COMP%]{transform:rotate(180deg)}.log-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:1rem;position:relative}.log-content[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{position:absolute;top:2rem;right:2rem;background:transparent}code[_ngcontent-%COMP%]{white-space:pre-wrap;padding:1rem;display:block;border-radius:var(--shape-2);background-color:var(--base-2)}"],changeDetection:0})};function dn(n,t){if(n&1&&(E(0," - "),G(1),l(2,6),P(),E(3),u(4,"durationFormat")),n&2){C(2);let e=w(6);a(3),f(" ",L(4,1,e.Backup.Metadata==null?null:e.Backup.Metadata.LastBackupDuration)," ")}}function cn(n,t){n&1&&(G(0),l(1,7),P())}function un(n,t){if(n&1&&(E(0),u(1,"bytes")),n&2){C(2);let e=w(6);f(" ",L(1,1,e.Backup.Metadata==null?null:e.Backup.Metadata.SourceFilesSize)," ")}}function pn(n,t){n&1&&(G(0),l(1,8),P())}function En(n,t){if(n&1&&(E(0),u(1,"bytes")),n&2){C(2);let e=w(6);f(" ",L(1,1,e.Backup.Metadata==null?null:e.Backup.Metadata.TargetFilesSize)," ")}}function Cn(n,t){n&1&&(G(0),l(1,9),P())}function gn(n,t){if(n&1&&(o(0,"sh-chip",19),l(1,10),i()),n&2){C(2);let e=w(6);a(),d(e.Backup.Metadata==null?null:e.Backup.Metadata.BackupListCount),c(1)}}function Tn(n,t){n&1&&(o(0,"sh-chip",20),l(1,11),i())}function On(n,t){if(n&1&&(o(0,"div",14)(1,"div",18)(2,"h3"),E(3),o(4,"sh-icon"),E(5,"database"),i()(),o(6,"p")(7,"span"),l(8,3),i(),E(9),u(10,"date"),g(11,dn,5,3)(12,cn,2,0,"ng-container"),i(),o(13,"p")(14,"span"),l(15,4),i(),g(16,un,2,3)(17,pn,2,0,"ng-container"),i(),o(18,"p")(19,"span"),l(20,5),i(),g(21,En,2,3)(22,Cn,2,0,"ng-container"),i()(),g(23,gn,2,1,"sh-chip",19)(24,Tn,2,0,"sh-chip",20),i()),n&2){let e=C(),_=w(6);a(3),f(" ",_.Backup.Name??e.MISSING_BACKUP_NAME," "),a(6),f(" ",S(10,6,_.Backup.Metadata==null?null:_.Backup.Metadata.LastBackupDate,"short")," "),a(2),T(_.Backup.Metadata!=null&&_.Backup.Metadata.LastBackupDuration?11:12),a(5),T(_.Backup.Metadata!=null&&_.Backup.Metadata.SourceFilesSize?16:17),a(5),T(_.Backup.Metadata!=null&&_.Backup.Metadata.TargetFilesSize?21:22),a(2),T(_.Backup.Metadata!=null&&_.Backup.Metadata.BackupListCount?23:24)}}function Ln(n,t){if(n&1&&s(0,"app-general-log",17),n&2){let e=C();z("backupId",e.backupId())}}function Nn(n,t){if(n&1&&s(0,"app-remote-log",17),n&2){let e=C();z("backupId",e.backupId())}}var Ee=class n{#e=x(ye);#n=x(Ke);MISSING_BACKUP_NAME=$localize`Backup name missing`;activeTab=A("general");backupId=Je(this.#e.params.pipe(J(t=>t.id)));backup=ve(()=>{let t=this.backupId();return t?this.#n.getBackupById(t):null});static \u0275fac=function(e){return new(e||n)};static \u0275cmp=X({type:n,selectors:[["app-log"]],decls:15,vars:8,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let e;e=$localize`General`;let _;_=$localize` Destination `;let r;r=$localize`Last successful backup:`;let p;p=$localize`Source:`;let v;v=$localize`Destination:`;let y;y=$localize`took`;let j;j=$localize`N/A`;let W;W=$localize`N/A`;let q;q=$localize`N/A`;let Q;Q=$localize`${"\uFFFD0\uFFFD"}:INTERPOLATION: Version`;let Y;return Y=$localize`No version yet`,[t,e,_,r,p,v,y,j,W,q,Q,Y,[1,"back"],["type","button","shButton","","routerLink","/",1,"small"],[1,"backup"],[1,"primary"],["tab","",3,"click"],[3,"backupId"],[1,"text"],[1,"simple","success"],[1,"simple"]]},template:function(e,_){if(e&1){let r=U();s(0,"app-status-bar"),o(1,"section")(2,"div",12)(3,"button",13),N(4,0),s(5,"sh-icon"),m(),i()(),fe(6),g(7,On,25,9,"div",14),o(8,"sh-tabs",15)(9,"button",16),I("click",function(){return D(r),M(_.activeTab.set("general"))}),l(10,1),i(),o(11,"button",16),I("click",function(){return D(r),M(_.activeTab.set("destination"))}),l(12,2),i()(),g(13,Ln,1,1,"app-general-log",17),g(14,Nn,1,1,"app-remote-log",17),i()}if(e&2){a(6);let r=he(_.backup());a(),T(r?7:-1),a(2),$("active",_.activeTab()==="general"),a(2),$("active",_.activeTab()==="destination"),a(2),T(_.activeTab()==="general"?13:-1),a(),T(_.activeTab()==="destination"?14:-1)}},dependencies:[ke,ue,pe,xe,Xe,H,se,Be,Z,ee,V],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:1rem 1.5rem;gap:1rem}sh-tabs[_ngcontent-%COMP%]{margin-bottom:1rem}.backup[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem;gap:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;width:100%;max-width:40%}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{color:var(--base-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--base-12)}"],changeDetection:0})};export{Ee as default};
@@ -1 +1 @@
1
- import{a as fe,c as Re,d as b}from"./chunk-MHRECQ5Y.js";import{a as Ne}from"./chunk-4NN5ZM73.js";import"./chunk-6Q6SSTBK.js";import"./chunk-QZRRXR3V.js";import{b as he}from"./chunk-DW332N2S.js";import"./chunk-AABUGLWU.js";import"./chunk-TELPJYLN.js";import"./chunk-5QZIKR6A.js";import{A as Ce,B as Ee,H as Pe,L as Se,W as me,Y as ge,b as re,c as se,d as g,e as ae,f as le,j as _e,p as ce,q as pe,r as Fe,t as de,u as ue,w as Te}from"./chunk-HPNLQHW6.js";import{a as ie,c as Oe}from"./chunk-BGTK25UG.js";import{b as oe,d as te,e as ne}from"./chunk-A4LPGPDU.js";import"./chunk-PKPBSTZA.js";import{d as ee}from"./chunk-QPTSKQZ2.js";import"./chunk-OTPG7USH.js";import"./chunk-TT3S63BX.js";import{$ as D,Ab as r,Bb as _,E as M,Ib as L,K as j,Mc as A,Pa as s,Pb as c,Qb as p,Rb as S,Sb as X,Tb as G,Ub as B,Vb as m,W as C,Xb as u,aa as x,cb as Q,gc as h,jc as $,kc as W,la as E,mc as Y,na as y,sb as F,tb as d,xc as Z,yb as P,zb as a}from"./chunk-T2WO6CVD.js";import"./chunk-7CGTOI24.js";var Ie=()=>["/"];function we(n,o){n&1&&(a(0,"sh-toggle",23),c(1,5),_(2,"input",26),p(),r())}function De(n,o){n&1&&(a(0,"span",29),S(1,9),r())}function xe(n,o){if(n&1&&(a(0,"span",29),S(1,10),r()),n&2){let e=u(2);s(),X(e.exportForm.controls.password.errors==null?null:e.exportForm.controls.password.errors.minlength.requiredLength),G(1)}}function $e(n,o){if(n&1&&_(0,"sh-progress-bar",36),n&2){let e=u(2);h("error",e.calculatePasswordStrength()===1)("warn",e.calculatePasswordStrength()===2)("primary",e.calculatePasswordStrength()===4)("success",e.calculatePasswordStrength()===5),P("value",e.calculatePasswordStrength()*(100/5))}}function Ae(n,o){n&1&&(a(0,"span",29),S(1,11),r())}function Me(n,o){n&1&&(a(0,"span",29),S(1,12),r())}function ye(n,o){if(n&1&&(a(0,"span",29),S(1,13),r()),n&2){let e=u(2);s(),X(e.exportForm.controls.repeatPassword.errors==null?null:e.exportForm.controls.repeatPassword.errors.minlength.requiredLength),G(1)}}function Le(n,o){n&1&&(c(0,7,1),_(1,"sh-icon"),p())}function Xe(n,o){n&1&&(c(0,7,2),_(1,"sh-icon"),p())}function Ge(n,o){n&1&&(c(0,14,1),_(1,"sh-icon",38),p())}function Be(n,o){n&1&&(c(0,14,2),_(1,"sh-icon"),p())}function be(n,o){if(n&1){let e=L();a(0,"button",37),m("click",function(){D(e);let i=u(2);return x(i.copyPassword())}),c(1,14),F(2,Ge,2,0)(3,Be,2,0),p(),r()}if(n&2){let e=u(2);s(2),d(e.copiedPassword()?2:3)}}function ve(n,o){n&1&&(a(0,"sh-alert",35),S(1,15),r())}function ke(n,o){if(n&1){let e=L();a(0,"div",24)(1,"sh-form-field")(2,"label",27),c(3,6),_(4,"sup"),p(),r(),_(5,"input",28),F(6,De,2,0,"span",29)(7,xe,2,1,"span",29),r(),F(8,$e,1,9,"sh-progress-bar",30),a(9,"sh-form-field"),_(10,"input",31),F(11,Ae,2,0,"span",29)(12,Me,2,0,"span",29)(13,ye,2,1,"span",29),r(),a(14,"div",32)(15,"button",33),m("click",function(){D(e);let i=u();return x(i.showPassword.set(!i.showPassword()))}),c(16,7),F(17,Le,2,0)(18,Xe,2,0),p(),r(),a(19,"button",33),m("click",function(){D(e);let i=u();return x(i.generatePassword())}),c(20,8),_(21,"sh-icon"),p(),r(),F(22,be,4,1,"button",34),r(),F(23,ve,2,0,"sh-alert",35),r()}if(n&2){let e=u();s(5),P("type",e.showPassword()?"text":"password"),s(),d(e.exportForm.controls.password.errors!=null&&e.exportForm.controls.password.errors.required?6:e.exportForm.controls.password.errors!=null&&e.exportForm.controls.password.errors.minlength?7:-1),s(2),d(e.exportForm.value.password?8:-1),s(2),P("type",e.showPassword()?"text":"password"),s(),d(e.exportForm.value.repeatPassword&&e.exportForm.value.repeatPassword!==e.exportForm.value.password?11:e.exportForm.controls.repeatPassword.errors!=null&&e.exportForm.controls.repeatPassword.errors.required?12:e.exportForm.controls.repeatPassword.errors!=null&&e.exportForm.controls.repeatPassword.errors.minlength?13:-1),s(6),d(e.showPassword()?17:18),s(5),d(e.showCopyPassword()?22:-1),s(),d(e.exportForm.value.password&&e.exportForm.value.password===e.exportForm.value.repeatPassword?23:-1)}}function Ue(n,o){if(n&1&&(a(0,"div",25)(1,"code"),$(2),r()()),n&2){let e=u();s(2),W(e.exportedCmd())}}var f=new Fe,v=class n{#o=C(fe);#t=C(Oe);#e=C(oe);#n=C(te);#i=C(ee);#r=C(Ne);isExporting=E(!1);exportType=E("file");exportedCmd=E(null);exportForm=f.group({exportPasswords:f.control(!0),encryption:f.control(!1,[g.required,Re()]),password:f.control("",[b("encryption",!0,[g.required,g.minLength(3)])]),repeatPassword:f.control("",[b("encryption",!0,[g.required,g.minLength(3)])])});exportFormSignal=he(this.exportForm.valueChanges);encryptionFieldSignal=A(()=>(this.exportFormSignal()?.encryption??!1)&&this.exportType()==="file");activeBackup=A(()=>this.#r.backups().find(o=>o.Backup?.ID===this.#e.snapshot.params.id));showPassword=E(!1);copiedPassword=E(!1);showCopyPassword=E(!1);calculatePasswordStrength=A(()=>{let e=this.exportFormSignal()?.password??"";return this.#o.calculatePasswordStrength(e)});showPasswordEffect=y(()=>{this.showPassword()&&this.exportForm.updateValueAndValidity()});disablePasswordForCommandLine=y(()=>{this.exportType()==="cmd"&&this.exportForm.controls.encryption.setValue(!1)});submit(){this.isExporting.set(!0),this.exportType()==="file"?this.#t.postApiV1AuthIssuetokenByOperation({operation:"export"}).pipe(j(o=>{let e=R=>{let O=Object.entries(R);return O?"?"+O.filter(([N,T])=>T!=null).map(([N,T])=>`${encodeURIComponent(N)}=${encodeURIComponent(T)}`).join("&"):""},t=this.exportFormSignal()?.password?.length?this.exportFormSignal()?.password:void 0,i=ie.BASE||"";return this.#i.get(`${i}/api/v1/backup/${this.#e.snapshot.params.id}/export${e({"export-passwords":this.exportFormSignal()?.exportPasswords??void 0,passphrase:t,token:o.Token})}`,{responseType:"blob"})}),M(()=>this.isExporting.set(!1))).subscribe({next:o=>{let t=this.activeBackup()?.Backup?.Name??"Backup",i=this.exportFormSignal()?.encryption?"aes":"json";this.downloadFile(o,`${t}-duplicati-config.${i}`),this.#n.navigate(["/"])},error:o=>{}}):this.#t.getApiV1BackupByIdExportCmdline({id:this.#e.snapshot.params.id,exportPasswords:this.exportFormSignal()?.exportPasswords??void 0,passphrase:this.exportFormSignal()?.password??void 0}).pipe(M(()=>this.isExporting.set(!1))).subscribe({next:o=>{this.exportedCmd.set(o.Command??null)},error:o=>{}})}downloadFile(o,e){let t=window.URL.createObjectURL(o),i=document.createElement("a");i.href=t,i.download=e,i.click(),window.URL.revokeObjectURL(t)}async copyPassword(){let o=this.exportForm.controls.password.value;await this.#s(o??""),this.copiedPassword.set(!0)}async#s(o){try{await navigator.clipboard.writeText(o)}catch{try{let t=document.createElement("textarea");t.value=o,document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}catch(t){console.error("Failed to copy text: ",t)}}}generatePassword(){this.copiedPassword.set(!1);let o=this.#o.generate(16);this.exportForm.controls.password.setValue(o),this.exportForm.controls.repeatPassword.setValue(o),this.showCopyPassword.set(!0)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=Q({type:n,selectors:[["app-export"]],decls:26,vars:16,consts:()=>{let o;o=$localize`${"\uFFFD#6\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let e;e=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SH_ICON:export${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SH_ICON: Export `;let t;t=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SH_ICON:terminal-window${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SH_ICON: As command line `;let i;i=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:file${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: To file `;let R;R=$localize` Export passwords ${"\uFFFD#22\uFFFD\uFFFD/#22\uFFFD"}:TAG_INPUT:`;let O;O=$localize` Encrypt file ${"\uFFFD#2\uFFFD\uFFFD/#2\uFFFD"}:TAG_INPUT:`;let N;N=$localize`Password`;let T;T=$localize`Repeat password`;let k;k=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let I;I=$localize`${"\uFFFD*17: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/*17:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*18: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/*18:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,I=B(I);let U;U=$localize`${"\uFFFD#21\uFFFD"}:START_TAG_SH_ICON:password${"\uFFFD/#21\uFFFD"}:CLOSE_TAG_SH_ICON: Generate password `;let K;K=$localize`Passwords are required`;let J;J=$localize` Passwords must be at least ${"\uFFFD0\uFFFD"}:INTERPOLATION: characters long `;let H;H=$localize`Passwords do not match`;let z;z=$localize`Passwords are required`;let V;V=$localize` Passwords must be at least ${"\uFFFD0\uFFFD"}:INTERPOLATION: characters long `;let w;w=$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:`,w=B(w);let q;return q=$localize` Tip: Be sure to save your password. If you lose it, you will not be able to import the configuration. `,[o,e,t,i,R,O,k,I,U,K,J,H,z,V,w,q,[1,"actions"],["shButton","",1,"outlined",3,"routerLink"],["shButton","",1,"raised","primary",3,"click","shTooltip","disabled"],["autocomplete","off",3,"formGroup"],["type","button",3,"click"],[1,"raised","primary"],["type","checkbox","formControlName","exportPasswords"],[1,"primary","raised"],[1,"passwords"],[1,"cmd-output"],["type","checkbox","formControlName","encryption"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",N,"formControlName","password",3,"type"],["error",""],[1,"raised",3,"error","warn","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",T,"formControlName","repeatPassword",3,"type"],[1,"password-actions"],["shButton","","type","button",1,"small",3,"click"],["shButton","","type","button",1,"small","copy"],[1,"primary"],[1,"raised",3,"value"],["shButton","","type","button",1,"small","copy",3,"click"],[1,"sh-success"]]},template:function(e,t){if(e&1&&(a(0,"header")(1,"h3"),$(2," Export backup configuration "),a(3,"div",16)(4,"button",17),c(5,0),_(6,"sh-icon"),p(),r(),a(7,"button",18),m("click",function(){return t.submit()}),c(8,1),_(9,"sh-icon"),p(),r()()(),a(10,"p"),$(11),r()(),a(12,"form",19)(13,"sh-button-group")(14,"button",20),m("click",function(){return t.exportType.set("cmd")}),c(15,2),_(16,"sh-icon"),p(),r(),a(17,"button",20),m("click",function(){return t.exportType.set("file")}),c(18,3),_(19,"sh-icon"),p(),r()(),a(20,"sh-toggle",21),c(21,4),_(22,"input",22),p(),r(),F(23,we,3,0,"sh-toggle",23),F(24,ke,24,8,"div",24),F(25,Ue,3,1,"div",25),r()),e&2){let i;s(4),P("routerLink",Z(15,Ie)),s(3),h("loading",t.isExporting()),P("shTooltip",t.encryptionFieldSignal()?"Remember to copy the password":"")("disabled",t.exportForm.invalid||t.showCopyPassword()&&!t.copiedPassword()||t.encryptionFieldSignal()&&t.exportForm.value.repeatPassword!==t.exportForm.value.password),s(4),Y("#",(i=t.activeBackup())==null||i.Backup==null?null:i.Backup.ID,": ",(i=t.activeBackup())==null||i.Backup==null?null:i.Backup.Name),s(),P("formGroup",t.exportForm),s(2),h("active",t.exportType()==="cmd"),s(3),h("active",t.exportType()==="file"),s(6),d(t.exportType()==="file"?23:-1),s(),d(t.encryptionFieldSignal()?24:-1),s(),d(t.exportedCmd()?25:-1)}},dependencies:[de,_e,se,re,ae,le,pe,ce,ne,Ce,me,ue,Pe,Ee,Te,Se,ge],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:3rem}h3[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;justify-content:space-between}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;max-width:31.25rem}.passwords[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.password-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}.copy[_ngcontent-%COMP%] sh-icon.sh-success[_ngcontent-%COMP%]{color:var(--success-8)}.hide[_ngcontent-%COMP%]{display:none}"],changeDetection:0})};export{v as default};
1
+ import{a as fe,c as Re,d as b}from"./chunk-MHRECQ5Y.js";import{a as Ne}from"./chunk-FVZOIWTT.js";import"./chunk-6Q6SSTBK.js";import"./chunk-QZRRXR3V.js";import{b as he}from"./chunk-DW332N2S.js";import"./chunk-6K3PRIYO.js";import"./chunk-TELPJYLN.js";import"./chunk-5QZIKR6A.js";import{A as Ce,B as Ee,H as Pe,L as Se,W as me,Y as ge,b as re,c as se,d as g,e as ae,f as le,j as _e,p as ce,q as pe,r as Fe,t as de,u as ue,w as Te}from"./chunk-HPNLQHW6.js";import{a as ie,c as Oe}from"./chunk-BGTK25UG.js";import{b as oe,d as te,e as ne}from"./chunk-A4LPGPDU.js";import"./chunk-PKPBSTZA.js";import{d as ee}from"./chunk-QPTSKQZ2.js";import"./chunk-OTPG7USH.js";import"./chunk-TT3S63BX.js";import{$ as D,Ab as r,Bb as _,E as M,Ib as L,K as j,Mc as A,Pa as s,Pb as c,Qb as p,Rb as S,Sb as X,Tb as G,Ub as B,Vb as m,W as C,Xb as u,aa as x,cb as Q,gc as h,jc as $,kc as W,la as E,mc as Y,na as y,sb as F,tb as d,xc as Z,yb as P,zb as a}from"./chunk-T2WO6CVD.js";import"./chunk-7CGTOI24.js";var Ie=()=>["/"];function we(n,o){n&1&&(a(0,"sh-toggle",23),c(1,5),_(2,"input",26),p(),r())}function De(n,o){n&1&&(a(0,"span",29),S(1,9),r())}function xe(n,o){if(n&1&&(a(0,"span",29),S(1,10),r()),n&2){let e=u(2);s(),X(e.exportForm.controls.password.errors==null?null:e.exportForm.controls.password.errors.minlength.requiredLength),G(1)}}function $e(n,o){if(n&1&&_(0,"sh-progress-bar",36),n&2){let e=u(2);h("error",e.calculatePasswordStrength()===1)("warn",e.calculatePasswordStrength()===2)("primary",e.calculatePasswordStrength()===4)("success",e.calculatePasswordStrength()===5),P("value",e.calculatePasswordStrength()*(100/5))}}function Ae(n,o){n&1&&(a(0,"span",29),S(1,11),r())}function Me(n,o){n&1&&(a(0,"span",29),S(1,12),r())}function ye(n,o){if(n&1&&(a(0,"span",29),S(1,13),r()),n&2){let e=u(2);s(),X(e.exportForm.controls.repeatPassword.errors==null?null:e.exportForm.controls.repeatPassword.errors.minlength.requiredLength),G(1)}}function Le(n,o){n&1&&(c(0,7,1),_(1,"sh-icon"),p())}function Xe(n,o){n&1&&(c(0,7,2),_(1,"sh-icon"),p())}function Ge(n,o){n&1&&(c(0,14,1),_(1,"sh-icon",38),p())}function Be(n,o){n&1&&(c(0,14,2),_(1,"sh-icon"),p())}function be(n,o){if(n&1){let e=L();a(0,"button",37),m("click",function(){D(e);let i=u(2);return x(i.copyPassword())}),c(1,14),F(2,Ge,2,0)(3,Be,2,0),p(),r()}if(n&2){let e=u(2);s(2),d(e.copiedPassword()?2:3)}}function ve(n,o){n&1&&(a(0,"sh-alert",35),S(1,15),r())}function ke(n,o){if(n&1){let e=L();a(0,"div",24)(1,"sh-form-field")(2,"label",27),c(3,6),_(4,"sup"),p(),r(),_(5,"input",28),F(6,De,2,0,"span",29)(7,xe,2,1,"span",29),r(),F(8,$e,1,9,"sh-progress-bar",30),a(9,"sh-form-field"),_(10,"input",31),F(11,Ae,2,0,"span",29)(12,Me,2,0,"span",29)(13,ye,2,1,"span",29),r(),a(14,"div",32)(15,"button",33),m("click",function(){D(e);let i=u();return x(i.showPassword.set(!i.showPassword()))}),c(16,7),F(17,Le,2,0)(18,Xe,2,0),p(),r(),a(19,"button",33),m("click",function(){D(e);let i=u();return x(i.generatePassword())}),c(20,8),_(21,"sh-icon"),p(),r(),F(22,be,4,1,"button",34),r(),F(23,ve,2,0,"sh-alert",35),r()}if(n&2){let e=u();s(5),P("type",e.showPassword()?"text":"password"),s(),d(e.exportForm.controls.password.errors!=null&&e.exportForm.controls.password.errors.required?6:e.exportForm.controls.password.errors!=null&&e.exportForm.controls.password.errors.minlength?7:-1),s(2),d(e.exportForm.value.password?8:-1),s(2),P("type",e.showPassword()?"text":"password"),s(),d(e.exportForm.value.repeatPassword&&e.exportForm.value.repeatPassword!==e.exportForm.value.password?11:e.exportForm.controls.repeatPassword.errors!=null&&e.exportForm.controls.repeatPassword.errors.required?12:e.exportForm.controls.repeatPassword.errors!=null&&e.exportForm.controls.repeatPassword.errors.minlength?13:-1),s(6),d(e.showPassword()?17:18),s(5),d(e.showCopyPassword()?22:-1),s(),d(e.exportForm.value.password&&e.exportForm.value.password===e.exportForm.value.repeatPassword?23:-1)}}function Ue(n,o){if(n&1&&(a(0,"div",25)(1,"code"),$(2),r()()),n&2){let e=u();s(2),W(e.exportedCmd())}}var f=new Fe,v=class n{#o=C(fe);#t=C(Oe);#e=C(oe);#n=C(te);#i=C(ee);#r=C(Ne);isExporting=E(!1);exportType=E("file");exportedCmd=E(null);exportForm=f.group({exportPasswords:f.control(!0),encryption:f.control(!1,[g.required,Re()]),password:f.control("",[b("encryption",!0,[g.required,g.minLength(3)])]),repeatPassword:f.control("",[b("encryption",!0,[g.required,g.minLength(3)])])});exportFormSignal=he(this.exportForm.valueChanges);encryptionFieldSignal=A(()=>(this.exportFormSignal()?.encryption??!1)&&this.exportType()==="file");activeBackup=A(()=>this.#r.backups().find(o=>o.Backup?.ID===this.#e.snapshot.params.id));showPassword=E(!1);copiedPassword=E(!1);showCopyPassword=E(!1);calculatePasswordStrength=A(()=>{let e=this.exportFormSignal()?.password??"";return this.#o.calculatePasswordStrength(e)});showPasswordEffect=y(()=>{this.showPassword()&&this.exportForm.updateValueAndValidity()});disablePasswordForCommandLine=y(()=>{this.exportType()==="cmd"&&this.exportForm.controls.encryption.setValue(!1)});submit(){this.isExporting.set(!0),this.exportType()==="file"?this.#t.postApiV1AuthIssuetokenByOperation({operation:"export"}).pipe(j(o=>{let e=R=>{let O=Object.entries(R);return O?"?"+O.filter(([N,T])=>T!=null).map(([N,T])=>`${encodeURIComponent(N)}=${encodeURIComponent(T)}`).join("&"):""},t=this.exportFormSignal()?.password?.length?this.exportFormSignal()?.password:void 0,i=ie.BASE||"";return this.#i.get(`${i}/api/v1/backup/${this.#e.snapshot.params.id}/export${e({"export-passwords":this.exportFormSignal()?.exportPasswords??void 0,passphrase:t,token:o.Token})}`,{responseType:"blob"})}),M(()=>this.isExporting.set(!1))).subscribe({next:o=>{let t=this.activeBackup()?.Backup?.Name??"Backup",i=this.exportFormSignal()?.encryption?"aes":"json";this.downloadFile(o,`${t}-duplicati-config.${i}`),this.#n.navigate(["/"])},error:o=>{}}):this.#t.getApiV1BackupByIdExportCmdline({id:this.#e.snapshot.params.id,exportPasswords:this.exportFormSignal()?.exportPasswords??void 0,passphrase:this.exportFormSignal()?.password??void 0}).pipe(M(()=>this.isExporting.set(!1))).subscribe({next:o=>{this.exportedCmd.set(o.Command??null)},error:o=>{}})}downloadFile(o,e){let t=window.URL.createObjectURL(o),i=document.createElement("a");i.href=t,i.download=e,i.click(),window.URL.revokeObjectURL(t)}async copyPassword(){let o=this.exportForm.controls.password.value;await this.#s(o??""),this.copiedPassword.set(!0)}async#s(o){try{await navigator.clipboard.writeText(o)}catch{try{let t=document.createElement("textarea");t.value=o,document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}catch(t){console.error("Failed to copy text: ",t)}}}generatePassword(){this.copiedPassword.set(!1);let o=this.#o.generate(16);this.exportForm.controls.password.setValue(o),this.exportForm.controls.repeatPassword.setValue(o),this.showCopyPassword.set(!0)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=Q({type:n,selectors:[["app-export"]],decls:26,vars:16,consts:()=>{let o;o=$localize`${"\uFFFD#6\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let e;e=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SH_ICON:export${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SH_ICON: Export `;let t;t=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SH_ICON:terminal-window${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SH_ICON: As command line `;let i;i=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:file${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: To file `;let R;R=$localize` Export passwords ${"\uFFFD#22\uFFFD\uFFFD/#22\uFFFD"}:TAG_INPUT:`;let O;O=$localize` Encrypt file ${"\uFFFD#2\uFFFD\uFFFD/#2\uFFFD"}:TAG_INPUT:`;let N;N=$localize`Password`;let T;T=$localize`Repeat password`;let k;k=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let I;I=$localize`${"\uFFFD*17: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/*17:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*18: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/*18:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,I=B(I);let U;U=$localize`${"\uFFFD#21\uFFFD"}:START_TAG_SH_ICON:password${"\uFFFD/#21\uFFFD"}:CLOSE_TAG_SH_ICON: Generate password `;let K;K=$localize`Passwords are required`;let J;J=$localize` Passwords must be at least ${"\uFFFD0\uFFFD"}:INTERPOLATION: characters long `;let H;H=$localize`Passwords do not match`;let z;z=$localize`Passwords are required`;let V;V=$localize` Passwords must be at least ${"\uFFFD0\uFFFD"}:INTERPOLATION: characters long `;let w;w=$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:`,w=B(w);let q;return q=$localize` Tip: Be sure to save your password. If you lose it, you will not be able to import the configuration. `,[o,e,t,i,R,O,k,I,U,K,J,H,z,V,w,q,[1,"actions"],["shButton","",1,"outlined",3,"routerLink"],["shButton","",1,"raised","primary",3,"click","shTooltip","disabled"],["autocomplete","off",3,"formGroup"],["type","button",3,"click"],[1,"raised","primary"],["type","checkbox","formControlName","exportPasswords"],[1,"primary","raised"],[1,"passwords"],[1,"cmd-output"],["type","checkbox","formControlName","encryption"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",N,"formControlName","password",3,"type"],["error",""],[1,"raised",3,"error","warn","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",T,"formControlName","repeatPassword",3,"type"],[1,"password-actions"],["shButton","","type","button",1,"small",3,"click"],["shButton","","type","button",1,"small","copy"],[1,"primary"],[1,"raised",3,"value"],["shButton","","type","button",1,"small","copy",3,"click"],[1,"sh-success"]]},template:function(e,t){if(e&1&&(a(0,"header")(1,"h3"),$(2," Export backup configuration "),a(3,"div",16)(4,"button",17),c(5,0),_(6,"sh-icon"),p(),r(),a(7,"button",18),m("click",function(){return t.submit()}),c(8,1),_(9,"sh-icon"),p(),r()()(),a(10,"p"),$(11),r()(),a(12,"form",19)(13,"sh-button-group")(14,"button",20),m("click",function(){return t.exportType.set("cmd")}),c(15,2),_(16,"sh-icon"),p(),r(),a(17,"button",20),m("click",function(){return t.exportType.set("file")}),c(18,3),_(19,"sh-icon"),p(),r()(),a(20,"sh-toggle",21),c(21,4),_(22,"input",22),p(),r(),F(23,we,3,0,"sh-toggle",23),F(24,ke,24,8,"div",24),F(25,Ue,3,1,"div",25),r()),e&2){let i;s(4),P("routerLink",Z(15,Ie)),s(3),h("loading",t.isExporting()),P("shTooltip",t.encryptionFieldSignal()?"Remember to copy the password":"")("disabled",t.exportForm.invalid||t.showCopyPassword()&&!t.copiedPassword()||t.encryptionFieldSignal()&&t.exportForm.value.repeatPassword!==t.exportForm.value.password),s(4),Y("#",(i=t.activeBackup())==null||i.Backup==null?null:i.Backup.ID,": ",(i=t.activeBackup())==null||i.Backup==null?null:i.Backup.Name),s(),P("formGroup",t.exportForm),s(2),h("active",t.exportType()==="cmd"),s(3),h("active",t.exportType()==="file"),s(6),d(t.exportType()==="file"?23:-1),s(),d(t.encryptionFieldSignal()?24:-1),s(),d(t.exportedCmd()?25:-1)}},dependencies:[de,_e,se,re,ae,le,pe,ce,ne,Ce,me,ue,Pe,Ee,Te,Se,ge],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:3rem}h3[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;justify-content:space-between}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;max-width:31.25rem}.passwords[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.password-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}.copy[_ngcontent-%COMP%] sh-icon.sh-success[_ngcontent-%COMP%]{color:var(--success-8)}.hide[_ngcontent-%COMP%]{display:none}"],changeDetection:0})};export{v as default};
@@ -1 +1 @@
1
- import{a as F}from"./chunk-ETAHWUMY.js";import{a as ee}from"./chunk-5DJAX2HH.js";import{B as Y,L as Q,w as K,x as W,z as q}from"./chunk-HPNLQHW6.js";import{a as H,c as Z}from"./chunk-BGTK25UG.js";import{b as U,d as j}from"./chunk-A4LPGPDU.js";import{$ as p,Ab as c,Bb as m,Fb as y,Gb as D,Ib as f,Ma as M,Mc as P,Pa as r,Pb as G,Qb as V,Rb as _,Rc as S,Vb as u,W as T,Xb as s,aa as I,cb as E,ic as z,jc as A,kc as x,la as v,lc as J,rc as X,sb as d,sc as B,tb as N,tc as g,wb as b,xb as k,yb as O,zb as a}from"./chunk-T2WO6CVD.js";function oe(n,t){if(n&1&&(a(0,"div",11),A(1),c()),n&2){s();let e=g(0);r(),J(" ",e.Message," ")}}function ae(n,t){if(n&1&&(a(0,"div"),G(1,1),m(2,"a",15),V(),c()),n&2){let e=s();r(2),O("href",e.downloadLink(),M)}}function re(n,t){if(n&1){let e=f();a(0,"button",14),u("click",function(){p(e);let i=s(),l=g(0);return I(i.doRepair(l.BackupID))}),_(1,2),c()}}function le(n,t){if(n&1){let e=f();a(0,"button",14),u("click",function(){p(e);let i=s(),l=g(0);return I(i.doDownloadBugreport(l))}),_(1,3),c()}}function ce(n,t){if(n&1&&m(0,"sh-progress-bar",17),n&2){let e,o=s(2);O("value",(e=o.serverState())==null?null:e.UpdateDownloadProgress)}}function _e(n,t){if(n&1){let e=f();a(0,"div",11),y(1),_(2,4),D(),a(3,"a",16),A(4),c(),d(5,ce,1,1,"sh-progress-bar",17),a(6,"button",14),u("click",function(){p(e);let i=s();return I(i.doShowUpdate())}),_(7,5),c()()}if(n&2){let e,o,i=s(),l=g(0);r(3),O("href",(e=i.serverState())==null?null:e.UpdateDownloadLink,M),r(),x(l.Message),r(),N(((o=i.serverState())==null?null:o.UpdaterState)==="Downloading"?5:-1)}}function se(n,t){if(n&1){let e=f();a(0,"button",14),u("click",function(){p(e);let i=s(),l=g(0);return I(i.doShowLog(l.BackupID))}),_(1,6),c()}}function de(n,t){if(n&1){let e=f();a(0,"button",14),u("click",function(){p(e);let i=s();return I(i.doShowLink("https://docs.duplicati.com/detailed-descriptions/the-server-database"))}),_(1,7),c()}}function Ne(n,t){if(n&1){let e=f();a(0,"button",14),u("click",function(){p(e);let i=s();return I(i.doShowLink("https://docs.duplicati.com/detailed-descriptions/the-server-database"))}),_(1,8),c()}}var Te={Error:"error",Warning:"warn",Information:"primary"},h=class n{#e=T(j);#a=T(U);#r=T(q);#t=T(W);#i=T(F);#n=T(Z);#o=v(null);serverState=this.#i.serverState;index=S.required();notification=S.required();downloadLink=P(()=>this.#o()||this.notification().DownloadLink||"");deleteNotificationByIndex(){this.#i.deleteNotification(this.index())}deleteAllNotifications(){this.#i.deleteAllNotifications()}getAlertType(t){return t&&Te[t]||"primary"}doShowLog(t){this.#n.getApiV1BackupByIdIsactive({id:t}).subscribe({next:e=>{this.#e.navigate(["/backup/"+t+"/log"])},error:e=>{if(e.status===404){let o={title:$localize`Error`,message:$localize`The backup is missing, has it been deleted?`,confirmText:$localize`OK`,cancelText:null};parseInt(t)+""!=t&&(o={title:$localize`Error`,message:$localize`The backup was temporary and does not exist anymore, so the log data is lost`,confirmText:$localize`OK`,cancelText:null}),this.#r.open(ee,{maxWidth:"550px",width:"100%",data:o})}else this.#t.error($localize`Failed to find backup: `+e.message)}})}doRepair(t){this.#n.postApiV1BackupByIdRepair({id:t}).subscribe({next:()=>{this.#t.success($localize`Backup repaired`),this.#e.navigate(["./"],{onSameUrlNavigation:"reload",relativeTo:this.#a})},error:e=>{this.#t.error($localize`Failed to repair backup: `+e.message)}})}doShowUpdate(){this.#e.navigate(["/about/changelog"])}doShowLink(t){window.open(t,"_blank")}doDownloadBugreport(t){let e=t.Action.slice(19);this.#n.postApiV1AuthIssuetokenByOperation({operation:"bugreport"}).subscribe({next:o=>{if(!o.Token){this.#t.error("Failed to get bug report URL: No token generated");return}let i=H.BASE||"",l=`${location.origin}${i}/api/v1/bugreport/${e}?token=${o.Token}`;t.DownloadLink=l,this.#o.set(l),this.triggerDownload(l)},error:o=>{this.#t.error(`Failed to get bug report URL: ${o.message}`)}})}triggerDownload(t){let e=document.createElement("a");e.href=t,e.download="",e.style.display="none",document.body.appendChild(e);try{e.click()}catch{}document.body.removeChild(e)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=E({type:n,selectors:[["app-notification"]],inputs:{index:[1,"index"],notification:[1,"notification"]},decls:16,vars:12,consts:()=>{let t;t=$localize`Dismiss`;let e;e=$localize` If the backup file was not downloaded automatically, ${"\uFFFD#2\uFFFD"}:START_LINK:right click and choose "Save as …"${"\uFFFD/#2\uFFFD"}:CLOSE_LINK:`;let o;o=$localize`Repair`;let i;i=$localize`Download`;let l;l=$localize`New update found:`;let L;L=$localize`Show Update`;let w;w=$localize`Show Log`;let R;R=$localize` Show Help `;let $;return $=$localize` Show Help `,[t,e,o,i,l,L,w,R,$,["ship-alert-title",""],["ship-alert-content","",1,"content"],[1,"message"],[1,"actions"],["shButton","",1,"small","outlined"],["shButton","",1,"small","outlined",3,"click"],["target","_blank",3,"href"],[3,"href"],[3,"value"]]},template:function(e,o){if(e&1){let i=f();X(0),a(1,"sh-alert")(2,"div",9),A(3),c(),a(4,"div",10),d(5,oe,2,1,"div",11),d(6,ae,3,1,"div"),a(7,"div",12),d(8,re,2,0,"button",13),d(9,le,2,0,"button",13),d(10,_e,8,3,"div",11),d(11,se,2,0,"button",13),d(12,de,2,0,"button",13),d(13,Ne,2,0,"button",13),a(14,"button",14),u("click",function(){return p(i),I(o.deleteNotificationByIndex())}),_(15,0),c()()()()}if(e&2){let i=B(o.notification());r(),z(o.getAlertType(i.Type)),r(2),x(i.Title),r(2),N(i.Action!=="update:new"&&i.Action!=="update:manual"?5:-1),r(),N(o.downloadLink()?6:-1),r(2),N(i.Message!=null&&i.Message.includes("please run repair")?8:-1),r(),N(i.Action!=null&&i.Action.startsWith("bug-report:created:")&&!o.downloadLink()?9:-1),r(),N(i.Action==="update:new"?10:-1),r(),N(i.Action==="backup:show-log"?11:-1),r(),N(i.Action==="config:issue:unencrypted-database"?12:-1),r(),N(i.Action==="config:issue:windows-folder-used"?13:-1)}},dependencies:[Q,Y,K],styles:["[_nghost-%COMP%]{display:block}.content[_ngcontent-%COMP%]{margin-top:.5rem;display:flex;flex-direction:column;gap:.5rem}.message[_ngcontent-%COMP%]{max-height:12.5rem;overflow:auto}"],changeDetection:0})};var Ce=(n,t)=>t.ID;function pe(n,t){if(n&1&&m(0,"app-notification",1),n&2){let e=t.$implicit,o=t.$index;O("index",o)("notification",e)}}function Ie(n,t){n&1&&(a(0,"div",2)(1,"p"),_(2,0),c()())}var te=class n{#e=T(F);notificationFilterPredicate=S();notifications=P(()=>{let t=this.notificationFilterPredicate()?.predicate,e=this.#e.notifications();return typeof t!="function"?e:e.filter(t)});static \u0275fac=function(e){return new(e||n)};static \u0275cmp=E({type:n,selectors:[["app-notifications"]],inputs:{notificationFilterPredicate:[1,"notificationFilterPredicate"]},decls:3,vars:1,consts:()=>{let t;return t=$localize`No more notifications`,[t,[3,"index","notification"],[1,"notification-list"]]},template:function(e,o){e&1&&b(0,pe,1,2,"app-notification",1,Ce,!1,Ie,3,0,"div",2),e&2&&k(o.notifications())},dependencies:[h],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.actions[_ngcontent-%COMP%]{display:flex;gap:.25rem;justify-content:flex-end}.notification-list[_ngcontent-%COMP%]{padding:1rem;display:flex;flex-direction:column;gap:1rem;text-align:center}"],changeDetection:0})};export{h as a,te as b};
1
+ import{a as F}from"./chunk-TAFKX5F2.js";import{a as ee}from"./chunk-5DJAX2HH.js";import{B as Y,L as Q,w as K,x as W,z as q}from"./chunk-HPNLQHW6.js";import{a as H,c as Z}from"./chunk-BGTK25UG.js";import{b as U,d as j}from"./chunk-A4LPGPDU.js";import{$ as p,Ab as c,Bb as m,Fb as y,Gb as D,Ib as f,Ma as M,Mc as P,Pa as r,Pb as G,Qb as V,Rb as _,Rc as S,Vb as u,W as T,Xb as s,aa as I,cb as E,ic as z,jc as A,kc as x,la as v,lc as J,rc as X,sb as d,sc as B,tb as N,tc as g,wb as b,xb as k,yb as O,zb as a}from"./chunk-T2WO6CVD.js";function oe(n,t){if(n&1&&(a(0,"div",11),A(1),c()),n&2){s();let e=g(0);r(),J(" ",e.Message," ")}}function ae(n,t){if(n&1&&(a(0,"div"),G(1,1),m(2,"a",15),V(),c()),n&2){let e=s();r(2),O("href",e.downloadLink(),M)}}function re(n,t){if(n&1){let e=f();a(0,"button",14),u("click",function(){p(e);let i=s(),l=g(0);return I(i.doRepair(l.BackupID))}),_(1,2),c()}}function le(n,t){if(n&1){let e=f();a(0,"button",14),u("click",function(){p(e);let i=s(),l=g(0);return I(i.doDownloadBugreport(l))}),_(1,3),c()}}function ce(n,t){if(n&1&&m(0,"sh-progress-bar",17),n&2){let e,o=s(2);O("value",(e=o.serverState())==null?null:e.UpdateDownloadProgress)}}function _e(n,t){if(n&1){let e=f();a(0,"div",11),y(1),_(2,4),D(),a(3,"a",16),A(4),c(),d(5,ce,1,1,"sh-progress-bar",17),a(6,"button",14),u("click",function(){p(e);let i=s();return I(i.doShowUpdate())}),_(7,5),c()()}if(n&2){let e,o,i=s(),l=g(0);r(3),O("href",(e=i.serverState())==null?null:e.UpdateDownloadLink,M),r(),x(l.Message),r(),N(((o=i.serverState())==null?null:o.UpdaterState)==="Downloading"?5:-1)}}function se(n,t){if(n&1){let e=f();a(0,"button",14),u("click",function(){p(e);let i=s(),l=g(0);return I(i.doShowLog(l.BackupID))}),_(1,6),c()}}function de(n,t){if(n&1){let e=f();a(0,"button",14),u("click",function(){p(e);let i=s();return I(i.doShowLink("https://docs.duplicati.com/detailed-descriptions/the-server-database"))}),_(1,7),c()}}function Ne(n,t){if(n&1){let e=f();a(0,"button",14),u("click",function(){p(e);let i=s();return I(i.doShowLink("https://docs.duplicati.com/detailed-descriptions/the-server-database"))}),_(1,8),c()}}var Te={Error:"error",Warning:"warn",Information:"primary"},h=class n{#e=T(j);#a=T(U);#r=T(q);#t=T(W);#i=T(F);#n=T(Z);#o=v(null);serverState=this.#i.serverState;index=S.required();notification=S.required();downloadLink=P(()=>this.#o()||this.notification().DownloadLink||"");deleteNotificationByIndex(){this.#i.deleteNotification(this.index())}deleteAllNotifications(){this.#i.deleteAllNotifications()}getAlertType(t){return t&&Te[t]||"primary"}doShowLog(t){this.#n.getApiV1BackupByIdIsactive({id:t}).subscribe({next:e=>{this.#e.navigate(["/backup/"+t+"/log"])},error:e=>{if(e.status===404){let o={title:$localize`Error`,message:$localize`The backup is missing, has it been deleted?`,confirmText:$localize`OK`,cancelText:null};parseInt(t)+""!=t&&(o={title:$localize`Error`,message:$localize`The backup was temporary and does not exist anymore, so the log data is lost`,confirmText:$localize`OK`,cancelText:null}),this.#r.open(ee,{maxWidth:"550px",width:"100%",data:o})}else this.#t.error($localize`Failed to find backup: `+e.message)}})}doRepair(t){this.#n.postApiV1BackupByIdRepair({id:t}).subscribe({next:()=>{this.#t.success($localize`Backup repaired`),this.#e.navigate(["./"],{onSameUrlNavigation:"reload",relativeTo:this.#a})},error:e=>{this.#t.error($localize`Failed to repair backup: `+e.message)}})}doShowUpdate(){this.#e.navigate(["/about/changelog"])}doShowLink(t){window.open(t,"_blank")}doDownloadBugreport(t){let e=t.Action.slice(19);this.#n.postApiV1AuthIssuetokenByOperation({operation:"bugreport"}).subscribe({next:o=>{if(!o.Token){this.#t.error("Failed to get bug report URL: No token generated");return}let i=H.BASE||"",l=`${location.origin}${i}/api/v1/bugreport/${e}?token=${o.Token}`;t.DownloadLink=l,this.#o.set(l),this.triggerDownload(l)},error:o=>{this.#t.error(`Failed to get bug report URL: ${o.message}`)}})}triggerDownload(t){let e=document.createElement("a");e.href=t,e.download="",e.style.display="none",document.body.appendChild(e);try{e.click()}catch{}document.body.removeChild(e)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=E({type:n,selectors:[["app-notification"]],inputs:{index:[1,"index"],notification:[1,"notification"]},decls:16,vars:12,consts:()=>{let t;t=$localize`Dismiss`;let e;e=$localize` If the backup file was not downloaded automatically, ${"\uFFFD#2\uFFFD"}:START_LINK:right click and choose "Save as …"${"\uFFFD/#2\uFFFD"}:CLOSE_LINK:`;let o;o=$localize`Repair`;let i;i=$localize`Download`;let l;l=$localize`New update found:`;let L;L=$localize`Show Update`;let w;w=$localize`Show Log`;let R;R=$localize` Show Help `;let $;return $=$localize` Show Help `,[t,e,o,i,l,L,w,R,$,["ship-alert-title",""],["ship-alert-content","",1,"content"],[1,"message"],[1,"actions"],["shButton","",1,"small","outlined"],["shButton","",1,"small","outlined",3,"click"],["target","_blank",3,"href"],[3,"href"],[3,"value"]]},template:function(e,o){if(e&1){let i=f();X(0),a(1,"sh-alert")(2,"div",9),A(3),c(),a(4,"div",10),d(5,oe,2,1,"div",11),d(6,ae,3,1,"div"),a(7,"div",12),d(8,re,2,0,"button",13),d(9,le,2,0,"button",13),d(10,_e,8,3,"div",11),d(11,se,2,0,"button",13),d(12,de,2,0,"button",13),d(13,Ne,2,0,"button",13),a(14,"button",14),u("click",function(){return p(i),I(o.deleteNotificationByIndex())}),_(15,0),c()()()()}if(e&2){let i=B(o.notification());r(),z(o.getAlertType(i.Type)),r(2),x(i.Title),r(2),N(i.Action!=="update:new"&&i.Action!=="update:manual"?5:-1),r(),N(o.downloadLink()?6:-1),r(2),N(i.Message!=null&&i.Message.includes("please run repair")?8:-1),r(),N(i.Action!=null&&i.Action.startsWith("bug-report:created:")&&!o.downloadLink()?9:-1),r(),N(i.Action==="update:new"?10:-1),r(),N(i.Action==="backup:show-log"?11:-1),r(),N(i.Action==="config:issue:unencrypted-database"?12:-1),r(),N(i.Action==="config:issue:windows-folder-used"?13:-1)}},dependencies:[Q,Y,K],styles:["[_nghost-%COMP%]{display:block}.content[_ngcontent-%COMP%]{margin-top:.5rem;display:flex;flex-direction:column;gap:.5rem}.message[_ngcontent-%COMP%]{max-height:12.5rem;overflow:auto}"],changeDetection:0})};var Ce=(n,t)=>t.ID;function pe(n,t){if(n&1&&m(0,"app-notification",1),n&2){let e=t.$implicit,o=t.$index;O("index",o)("notification",e)}}function Ie(n,t){n&1&&(a(0,"div",2)(1,"p"),_(2,0),c()())}var te=class n{#e=T(F);notificationFilterPredicate=S();notifications=P(()=>{let t=this.notificationFilterPredicate()?.predicate,e=this.#e.notifications();return typeof t!="function"?e:e.filter(t)});static \u0275fac=function(e){return new(e||n)};static \u0275cmp=E({type:n,selectors:[["app-notifications"]],inputs:{notificationFilterPredicate:[1,"notificationFilterPredicate"]},decls:3,vars:1,consts:()=>{let t;return t=$localize`No more notifications`,[t,[3,"index","notification"],[1,"notification-list"]]},template:function(e,o){e&1&&b(0,pe,1,2,"app-notification",1,Ce,!1,Ie,3,0,"div",2),e&2&&k(o.notifications())},dependencies:[h],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.actions[_ngcontent-%COMP%]{display:flex;gap:.25rem;justify-content:flex-end}.notification-list[_ngcontent-%COMP%]{padding:1rem;display:flex;flex-direction:column;gap:1rem;text-align:center}"],changeDetection:0})};export{h as a,te as b};
@@ -1 +1 @@
1
- import{a as v}from"./chunk-YV32N6PE.js";import{j as C}from"./chunk-XADL5RYU.js";import"./chunk-O4OTZE5N.js";import"./chunk-WIVARGP6.js";import"./chunk-MHRECQ5Y.js";import"./chunk-PAMKTLG5.js";import"./chunk-FOQJA6X2.js";import"./chunk-VHOAXFIJ.js";import{a as G}from"./chunk-4NN5ZM73.js";import"./chunk-6Q6SSTBK.js";import"./chunk-FK7JFD5B.js";import"./chunk-LFISHZZP.js";import"./chunk-ME77WZZI.js";import"./chunk-5DJAX2HH.js";import"./chunk-QZRRXR3V.js";import"./chunk-6ALGXRIS.js";import{b as h}from"./chunk-DW332N2S.js";import"./chunk-AABUGLWU.js";import"./chunk-TELPJYLN.js";import"./chunk-5QZIKR6A.js";import{L as M,M as $,R as I}from"./chunk-HPNLQHW6.js";import{c as L}from"./chunk-BGTK25UG.js";import{b as N,c as O,e as B,f as b}from"./chunk-A4LPGPDU.js";import"./chunk-PKPBSTZA.js";import"./chunk-QPTSKQZ2.js";import"./chunk-OTPG7USH.js";import"./chunk-TT3S63BX.js";import{Ab as u,Bb as r,C as f,Pa as n,Pb as c,Qb as _,W as l,Xb as A,cb as D,jc as P,lc as E,na as R,sb as T,tb as g,wc as k,yb as d,zb as s,zc as p}from"./chunk-T2WO6CVD.js";import"./chunk-7CGTOI24.js";var y=(a,e)=>[a,e,"general"],U=(a,e)=>[a,e,"destination"],K=(a,e)=>[a,e,"source-data"],w=(a,e)=>[a,e,"schedule"],H=(a,e)=>[a,e,"options"];function J(a,e){if(a&1&&(s(0,"p"),P(1),u()),a&2){let t=A();n(),E("Editing: ",t.backupName())}}function X(a,e){a&1&&r(0,"sh-progress-bar",7)}function x(a,e){a&1&&(s(0,"section"),r(1,"router-outlet"),u())}var m=class a{#t=l(N);#e=l(C);#a=l(G);#i=l(L);isDraft=this.#e.isDraft;isNew=this.#e.isNew;backupId=this.#e.backupId;backupName=this.#e.backupName;finishedLoading=this.#e.finishedLoading;#o=h(this.#t.params);#n=h(this.#t.url);paramsChanged=R(()=>{let e=this.#o()?.id,t=!!this.#n()?.find(i=>i.path==="backup-draft");this.#e.backupId.set(e),e!=="new"?this.getBackup(e,t):this.getDefaults()});getDefaults(){this.#i.getApiV1Backupdefaults().pipe(f(1)).subscribe({next:e=>{let t=e.Backup;t.Settings=[...t.Settings],this.#e.mapGeneralToForm(t),this.#e.mapDestinationToForm(t),this.#e.mapSourceDataToForm(t),this.#e.mapScheduleToForm(e.Schedule),this.#e.mapOptionsToForms(t),this.#e.applicationOptions.set(e.ApplicationOptions),this.#e.backupDefaults.set(e),this.#e.finishedLoading.set(!0)}})}getBackup(e,t=!1){let i=o=>{this.#e.mapScheduleToForm(o.Schedule??null),o.Backup&&(this.#e.mapGeneralToForm(o.Backup),this.#e.mapDestinationToForm(o.Backup),this.#e.mapSourceDataToForm(o.Backup),this.#e.mapOptionsToForms(o.Backup),this.#e.storeMetadata(o.Backup,t)),this.#e.finishedLoading.set(!0)};if(t){this.isDraft.set(t);let o=this.#a.draftBackups().find(F=>F.id===e);if(!o){alert("Backup not found");return}i(o.data)}else this.#i.getApiV1BackupById({id:e}).subscribe({next:i})}static \u0275fac=function(t){return new(t||a)};static \u0275cmp=D({type:a,selectors:[["app-backup"]],features:[k([C])],decls:21,vars:22,consts:()=>{let e;e=$localize`${"\uFFFD#6\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SH_RADIO: General `;let t;t=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SH_RADIO: Destination `;let i;i=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_RADIO: Source Data `;let o;o=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_RADIO: Schedule `;let F;return F=$localize`${"\uFFFD#18\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SH_RADIO: Options `,[e,t,i,o,F,[1,"primary"],["step","","routerLinkActive","active",3,"routerLink"],[1,"indeterminate","primary"]]},template:function(t,i){t&1&&(r(0,"app-status-bar"),s(1,"header"),T(2,J,2,1,"p"),s(3,"sh-stepper",5)(4,"div",6),c(5,0),r(6,"sh-radio"),_(),u(),s(7,"div",6),c(8,1),r(9,"sh-radio"),_(),u(),s(10,"div",6),c(11,2),r(12,"sh-radio"),_(),u(),s(13,"div",6),c(14,3),r(15,"sh-radio"),_(),u(),s(16,"div",6),c(17,4),r(18,"sh-radio"),_(),u()()(),T(19,X,1,0,"sh-progress-bar",7)(20,x,2,0,"section")),t&2&&(n(2),g(i.isNew()?-1:2),n(2),d("routerLink",p(7,y,i.isDraft()?"/backup-draft":"/backup",i.backupId())),n(3),d("routerLink",p(10,U,i.isDraft()?"/backup-draft":"/backup",i.backupId())),n(3),d("routerLink",p(13,K,i.isDraft()?"/backup-draft":"/backup",i.backupId())),n(3),d("routerLink",p(16,w,i.isDraft()?"/backup-draft":"/backup",i.backupId())),n(3),d("routerLink",p(19,H,i.isDraft()?"/backup-draft":"/backup",i.backupId())),n(3),g(i.finishedLoading()?20:19))},dependencies:[O,B,b,v,$,I,M],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%}header[_ngcontent-%COMP%]{padding:1rem 1.5rem;border-bottom:1px solid var(--base-4)}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin-bottom:.5rem}header[_ngcontent-%COMP%] sh-stepper[_ngcontent-%COMP%]{width:100%}section[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:center;flex:1 0;overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:auto}"],changeDetection:0})};export{m as default};
1
+ import{a as v}from"./chunk-QQOFLIJG.js";import{j as C}from"./chunk-CU5GQUSX.js";import"./chunk-O4OTZE5N.js";import"./chunk-WIVARGP6.js";import"./chunk-MHRECQ5Y.js";import"./chunk-LWJ6FCGJ.js";import"./chunk-FOQJA6X2.js";import"./chunk-VHOAXFIJ.js";import{a as G}from"./chunk-FVZOIWTT.js";import"./chunk-6Q6SSTBK.js";import"./chunk-FK7JFD5B.js";import"./chunk-ODTXKOWN.js";import"./chunk-ME77WZZI.js";import"./chunk-5DJAX2HH.js";import"./chunk-QZRRXR3V.js";import"./chunk-KTLT4LKY.js";import{b as h}from"./chunk-DW332N2S.js";import"./chunk-6K3PRIYO.js";import"./chunk-TELPJYLN.js";import"./chunk-5QZIKR6A.js";import{L as M,M as $,R as I}from"./chunk-HPNLQHW6.js";import{c as L}from"./chunk-BGTK25UG.js";import{b as N,c as O,e as B,f as b}from"./chunk-A4LPGPDU.js";import"./chunk-PKPBSTZA.js";import"./chunk-QPTSKQZ2.js";import"./chunk-OTPG7USH.js";import"./chunk-TT3S63BX.js";import{Ab as u,Bb as r,C as f,Pa as n,Pb as c,Qb as _,W as l,Xb as A,cb as D,jc as P,lc as E,na as R,sb as T,tb as g,wc as k,yb as d,zb as s,zc as p}from"./chunk-T2WO6CVD.js";import"./chunk-7CGTOI24.js";var y=(a,e)=>[a,e,"general"],U=(a,e)=>[a,e,"destination"],K=(a,e)=>[a,e,"source-data"],w=(a,e)=>[a,e,"schedule"],H=(a,e)=>[a,e,"options"];function J(a,e){if(a&1&&(s(0,"p"),P(1),u()),a&2){let t=A();n(),E("Editing: ",t.backupName())}}function X(a,e){a&1&&r(0,"sh-progress-bar",7)}function x(a,e){a&1&&(s(0,"section"),r(1,"router-outlet"),u())}var m=class a{#t=l(N);#e=l(C);#a=l(G);#i=l(L);isDraft=this.#e.isDraft;isNew=this.#e.isNew;backupId=this.#e.backupId;backupName=this.#e.backupName;finishedLoading=this.#e.finishedLoading;#o=h(this.#t.params);#n=h(this.#t.url);paramsChanged=R(()=>{let e=this.#o()?.id,t=!!this.#n()?.find(i=>i.path==="backup-draft");this.#e.backupId.set(e),e!=="new"?this.getBackup(e,t):this.getDefaults()});getDefaults(){this.#i.getApiV1Backupdefaults().pipe(f(1)).subscribe({next:e=>{let t=e.Backup;t.Settings=[...t.Settings],this.#e.mapGeneralToForm(t),this.#e.mapDestinationToForm(t),this.#e.mapSourceDataToForm(t),this.#e.mapScheduleToForm(e.Schedule),this.#e.mapOptionsToForms(t),this.#e.applicationOptions.set(e.ApplicationOptions),this.#e.backupDefaults.set(e),this.#e.finishedLoading.set(!0)}})}getBackup(e,t=!1){let i=o=>{this.#e.mapScheduleToForm(o.Schedule??null),o.Backup&&(this.#e.mapGeneralToForm(o.Backup),this.#e.mapDestinationToForm(o.Backup),this.#e.mapSourceDataToForm(o.Backup),this.#e.mapOptionsToForms(o.Backup),this.#e.storeMetadata(o.Backup,t)),this.#e.finishedLoading.set(!0)};if(t){this.isDraft.set(t);let o=this.#a.draftBackups().find(F=>F.id===e);if(!o){alert("Backup not found");return}i(o.data)}else this.#i.getApiV1BackupById({id:e}).subscribe({next:i})}static \u0275fac=function(t){return new(t||a)};static \u0275cmp=D({type:a,selectors:[["app-backup"]],features:[k([C])],decls:21,vars:22,consts:()=>{let e;e=$localize`${"\uFFFD#6\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SH_RADIO: General `;let t;t=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SH_RADIO: Destination `;let i;i=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_RADIO: Source Data `;let o;o=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_RADIO: Schedule `;let F;return F=$localize`${"\uFFFD#18\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SH_RADIO: Options `,[e,t,i,o,F,[1,"primary"],["step","","routerLinkActive","active",3,"routerLink"],[1,"indeterminate","primary"]]},template:function(t,i){t&1&&(r(0,"app-status-bar"),s(1,"header"),T(2,J,2,1,"p"),s(3,"sh-stepper",5)(4,"div",6),c(5,0),r(6,"sh-radio"),_(),u(),s(7,"div",6),c(8,1),r(9,"sh-radio"),_(),u(),s(10,"div",6),c(11,2),r(12,"sh-radio"),_(),u(),s(13,"div",6),c(14,3),r(15,"sh-radio"),_(),u(),s(16,"div",6),c(17,4),r(18,"sh-radio"),_(),u()()(),T(19,X,1,0,"sh-progress-bar",7)(20,x,2,0,"section")),t&2&&(n(2),g(i.isNew()?-1:2),n(2),d("routerLink",p(7,y,i.isDraft()?"/backup-draft":"/backup",i.backupId())),n(3),d("routerLink",p(10,U,i.isDraft()?"/backup-draft":"/backup",i.backupId())),n(3),d("routerLink",p(13,K,i.isDraft()?"/backup-draft":"/backup",i.backupId())),n(3),d("routerLink",p(16,w,i.isDraft()?"/backup-draft":"/backup",i.backupId())),n(3),d("routerLink",p(19,H,i.isDraft()?"/backup-draft":"/backup",i.backupId())),n(3),g(i.finishedLoading()?20:19))},dependencies:[O,B,b,v,$,I,M],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%}header[_ngcontent-%COMP%]{padding:1rem 1.5rem;border-bottom:1px solid var(--base-4)}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin-bottom:.5rem}header[_ngcontent-%COMP%] sh-stepper[_ngcontent-%COMP%]{width:100%}section[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:center;flex:1 0;overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:auto}"],changeDetection:0})};export{m as default};
@@ -1 +1 @@
1
- import{e as a,f as b}from"./chunk-4N3AWKEK.js";import"./chunk-4VEFX5WQ.js";import"./chunk-AS6Z56AD.js";import"./chunk-IW4RDAIN.js";import"./chunk-O4OTZE5N.js";import"./chunk-WIVARGP6.js";import"./chunk-FK7JFD5B.js";import"./chunk-5DJAX2HH.js";import"./chunk-DW332N2S.js";import"./chunk-AABUGLWU.js";import"./chunk-TELPJYLN.js";import"./chunk-5QZIKR6A.js";import"./chunk-HPNLQHW6.js";import"./chunk-BGTK25UG.js";import"./chunk-A4LPGPDU.js";import"./chunk-PKPBSTZA.js";import"./chunk-QPTSKQZ2.js";import"./chunk-OTPG7USH.js";import"./chunk-TT3S63BX.js";import"./chunk-T2WO6CVD.js";import"./chunk-7CGTOI24.js";export{a as createRestoreSelectFilesForm,b as default};
1
+ import{e as a,f as b}from"./chunk-U7ABTEOS.js";import"./chunk-4VEFX5WQ.js";import"./chunk-AS6Z56AD.js";import"./chunk-IW4RDAIN.js";import"./chunk-O4OTZE5N.js";import"./chunk-WIVARGP6.js";import"./chunk-FK7JFD5B.js";import"./chunk-5DJAX2HH.js";import"./chunk-DW332N2S.js";import"./chunk-6K3PRIYO.js";import"./chunk-TELPJYLN.js";import"./chunk-5QZIKR6A.js";import"./chunk-HPNLQHW6.js";import"./chunk-BGTK25UG.js";import"./chunk-A4LPGPDU.js";import"./chunk-PKPBSTZA.js";import"./chunk-QPTSKQZ2.js";import"./chunk-OTPG7USH.js";import"./chunk-TT3S63BX.js";import"./chunk-T2WO6CVD.js";import"./chunk-7CGTOI24.js";export{a as createRestoreSelectFilesForm,b as default};
@@ -1 +1 @@
1
- import{a as Q}from"./chunk-LFISHZZP.js";import{a as H}from"./chunk-ME77WZZI.js";import"./chunk-5DJAX2HH.js";import{a as q}from"./chunk-6ALGXRIS.js";import"./chunk-DW332N2S.js";import"./chunk-AABUGLWU.js";import"./chunk-TELPJYLN.js";import"./chunk-5QZIKR6A.js";import{B as X,C as z,H as K,L as j,c as B,e as U,i as G,s as W,u as V,w as J}from"./chunk-HPNLQHW6.js";import"./chunk-BGTK25UG.js";import{d as A,e as I}from"./chunk-A4LPGPDU.js";import"./chunk-PKPBSTZA.js";import"./chunk-QPTSKQZ2.js";import"./chunk-OTPG7USH.js";import"./chunk-TT3S63BX.js";import{$ as m,Ab as l,Bb as T,Bc as $,Ib as f,Mc as O,Pa as a,Pb as S,Qb as P,Rb as p,Rc as v,Ub as D,Vb as h,W as E,Xb as s,aa as F,cb as b,ic as x,jc as d,la as N,na as M,oc as w,pc as L,qc as k,sb as c,tb as _,yb as y,zb as r}from"./chunk-T2WO6CVD.js";import"./chunk-7CGTOI24.js";var Y=(t,n,e,i,o)=>({"loading-state":t,"ready-to-add-link":n,"is-connected":e,"failed-to-connect":i,"is-registered":o});function Z(t,n){t&1&&p(0,0,1)}function ee(t,n){t&1&&p(0,0,2)}function te(t,n){if(t&1){let e=f();r(0,"button",10),h("click",function(){m(e);let o=s(2);return F(o.cancel())}),d(1,"Cancel registration"),l()}}function ne(t,n){if(t&1&&(r(0,"div",7)(1,"p"),S(2,0),c(3,Z,1,0)(4,ee,1,0),P(),l(),T(5,"sh-progress-bar",8),c(6,te,2,0,"button",9),l()),t&2){let e=s();a(3),_(e.state()==="unknown"?3:4),a(3),_((e.registeringCounter()??0)>=5&&e.state()==="registering"?6:-1)}}function ie(t,n){if(t&1){let e=f();r(0,"sh-form-field")(1,"label",11),p(2,1),l(),r(3,"input",12),k("ngModelChange",function(o){m(e);let C=s();return L(C.customRegisterUrl,o)||(C.customRegisterUrl=o),F(o)}),l()(),r(4,"div",13)(5,"button",14),d(6,"Go back"),l(),r(7,"button",15),h("click",function(){m(e);let o=s();return F(o.registerViaCustomUrl())}),p(8,2),l()()}if(t&2){let e=s();a(3),w("ngModel",e.customRegisterUrl),a(4),y("disabled",!e.customRegisterUrlValid())}}function oe(t,n){if(t&1){let e=f();r(0,"p"),p(1,3),l(),T(2,"sh-progress-bar",8),r(3,"button",10),h("click",function(){m(e);let o=s(2);return F(o.retryWhenFaulted())}),d(4,"Cancel"),l()}}function re(t,n){if(t&1){let e=f();r(0,"p"),p(1,4),l(),r(2,"button",10),h("click",function(){m(e);let o=s(2);return F(o.retryWhenFaulted())}),d(3,"Retry"),l()}}function le(t,n){if(t&1&&c(0,oe,5,0)(1,re,4,0),t&2){let e=s();_(e.claimUrl()!==null?0:1)}}function ae(t,n){t&1&&(S(0,5,1),T(1,"p"),P())}function se(t,n){t&1&&(S(0,5,2),T(1,"p"),P())}function ce(t,n){if(t&1){let e=f();r(0,"sh-alert",16),S(1,5),c(2,ae,2,0,"p")(3,se,2,0,"p"),P(),l(),r(4,"button",10),h("click",function(){m(e);let o=s();return F(o.retryWhenFaulted())}),d(5," Retry "),r(6,"sh-icon"),d(7,"arrow-arc-left"),l()()}if(t&2){let e=s();a(2),_(e.typeParam()==="link"?2:3)}}function _e(t,n){t&1&&(r(0,"h3"),d(1,"Successfully connected"),l(),r(2,"p"),d(3,"We're going to redirect you to the home page"),l())}var R=class t{#t=E(A);#i=E(H);#e=E(Q);#n=E(q);isOldOpen=N(!1);typeParam=v.required();state=this.#e.state;claimUrl=this.#e.claimUrl;registerUrl=this.#e.registerUrl;customRegisterUrl=this.#e.customRegisterUrl;additionalReportingUrl=O(()=>{let n=this.#n.serverSettings();return this.#e.state()==="inactive"?"":n&&n["additional-report-url"]||""});copiedReportingUrl=N(!1);customRegisterUrlValid=O(()=>{let n=this.customRegisterUrl(),e=/^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\(\)\*\+,;=.]+$/;return!(n.length===0||!e.test(n))});registeringCounter=N(null);didTry=!1;triedFinishConnection=!1;stateEffect=M(()=>{let n=this.#e.registerUrl(),e=this.state(),i=this.typeParam(),o=this.registeringCounter();e==="inactive"&&i==="logon"&&n!==""&&(this.didTry||(this.#e.beginRemoteRegistration(),this.didTry=!0)),e==="registered"&&this.claimUrl()!==null&&(this.triedFinishConnection||(this.triedFinishConnection=!0,this.#o())),e==="registering"?(o===null&&this.registeringCounter.set(0),setTimeout(()=>{this.registeringCounter.set((o??0)+1)},1e3)):this.registeringCounter.set(null),(e==="connected"||e==="disabled"||e==="connecting")&&this.#n.setShownWelcomePage().subscribe(()=>{this.#t.navigate([""])})});ngOnInit(){this.#e.refreshRemoteControlStatus()}#o(){let n=this.#e.claimUrl();this.#i.open(`${n}?closeAfterConnection=true`,"_blank")}registerViaCustomUrl(){this.#e.beginRemoteRegistration(!0)}retryWhenFaulted(){this.#e.cancelRemoteRegistration(),this.customRegisterUrl.set(""),this.didTry=!1,this.triedFinishConnection=!1,this.typeParam()==="logon"&&this.#t.navigate(["/welcome/select"])}cancel(){this.#e.cancelRemoteRegistration()}register(){this.#e.beginRemoteRegistration()}disable(){this.#e.disableRemoteControl()}enable(){this.#e.enableRemoteControl()}delete(){this.#e.deleteRemoteControl()}copyReportingUrl(){let n=this.additionalReportingUrl();n&&(this.copiedReportingUrl.set(!0),setTimeout(()=>this.copiedReportingUrl.set(!1),2e3),navigator.clipboard.writeText(n))}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=b({type:t,selectors:[["app-connect"]],inputs:{typeParam:[1,"typeParam"]},decls:6,vars:13,consts:()=>{let n;n=$localize`${"\uFFFD*3:1\uFFFD"}:START_BLOCK_IF: Loading... ${"\uFFFD/*3:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*4:2\uFFFD"}:START_BLOCK_ELSE: Connecting to console ${"\uFFFD/*4:2\uFFFD"}:CLOSE_BLOCK_ELSE:`;let e;e=$localize`Paste registration URL here`;let i;i=$localize` Connect machine to console `;let o;o=$localize`We're now connecting you to the console`;let C;C=$localize`Something failed during registration we're missing claimUrl, please try again`;let u;return u=$localize` Failed to register ${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_PARAGRAPH: Check if the connection link are correct, alternatively it could be your internet connection or the service might be down ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_PARAGRAPH:${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_PARAGRAPH: There might be a problem with your internet connection or the service might be down, please try again later ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_PARAGRAPH:${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,u=D(u),[n,e,i,o,C,u,[1,"main-card","type-b"],[1,"loader-content"],[1,"primary","indeterminate"],["shButton",""],["shButton","",3,"click"],["for","remoteControlRegisterUrl"],["type","text","id","remoteControlRegisterUrl","name","remoteControlRegisterUrl",3,"ngModelChange","ngModel"],[1,"nav-buttons"],["type","button","shButton","","routerLink","/welcome",1,"raised"],["type","button","shButton","",1,"raised","primary",3,"click","disabled"],[1,"error"]]},template:function(e,i){if(e&1&&(r(0,"sh-card",6),c(1,ne,7,2,"div",7),c(2,ie,9,2),c(3,le,2,1),c(4,ce,8,1),c(5,_e,4,0),l()),e&2){let o=i.state()==="unknown"||i.typeParam()!=="link"&&i.state()==="inactive"||i.state()==="registering",C=i.typeParam()==="link"&&i.state()==="inactive",u=i.state()==="connected"||i.state()==="disabled"||i.state()==="connecting",g=i.state()==="registeringfaulted";x($(7,Y,o,C,u,g,i.state()==="registered")),a(),_(o?1:-1),a(),_(C?2:-1),a(),_(i.state()==="registered"?3:-1),a(),_(g?4:-1),a(),_(u?5:-1)}},dependencies:[I,W,B,U,G,K,X,j,z,J,V],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;min-height:100%;width:100%;flex:1 0;overflow:hidden;padding:2rem}@media only screen and (max-width:768px){[_nghost-%COMP%]{padding:1rem}}.main-card[_ngcontent-%COMP%]{width:100%;height:100%;max-width:31.25rem;max-height:min-content;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:1rem;padding:2rem}.main-card.failed-to-connect[_ngcontent-%COMP%] sh-alert[_ngcontent-%COMP%]{width:100%}.main-card.failed-to-connect[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:100%}.main-card.is-registered[_ngcontent-%COMP%], .main-card.is-connected[_ngcontent-%COMP%]{align-items:center}.loader-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.5rem;width:100%}.loader-content[_ngcontent-%COMP%] sh-progress-bar[_ngcontent-%COMP%]{--pb-b: var(--base-3);border:1px solid var(--pb-b)}.field-row[_ngcontent-%COMP%]{display:flex;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] sh-form-field[_ngcontent-%COMP%], .field-row[_ngcontent-%COMP%] sh-select[_ngcontent-%COMP%]{flex:1 0}.reporting-url[_ngcontent-%COMP%]{cursor:pointer;-webkit-user-select:none;user-select:none;margin-top:.25rem}.state[_ngcontent-%COMP%]{position:fixed;top:1rem;right:1rem;margin:0;color:var(--base-7);font-size:.75rem}.old[_ngcontent-%COMP%]{display:flex;flex-direction:column;position:relative;gap:.5rem;padding:1rem;border:1px solid var(--base-4);background:var(--base-1);position:fixed;top:0;right:0;bottom:0;width:35rem;transform:translate(100%)}.old.open[_ngcontent-%COMP%]{transform:translate(0)}.old[_ngcontent-%COMP%] .toggle[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;gap:.5rem;cursor:pointer;position:absolute;background-color:var(--base-1);border:1px solid var(--base-4);border-width:.0625rem 0 .0625rem .0625rem;width:2rem;height:2.5rem;border-radius:var(--shape-2) 0 0 var(--shape-2);top:3.75rem;left:-2rem;-webkit-user-select:none;user-select:none}.old[_ngcontent-%COMP%] .toggle[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:1rem}.nav-buttons[_ngcontent-%COMP%]{display:flex;gap:.5rem;flex-direction:row}"],changeDetection:0})};export{R as default};
1
+ import{a as Q}from"./chunk-ODTXKOWN.js";import{a as H}from"./chunk-ME77WZZI.js";import"./chunk-5DJAX2HH.js";import{a as q}from"./chunk-KTLT4LKY.js";import"./chunk-DW332N2S.js";import"./chunk-6K3PRIYO.js";import"./chunk-TELPJYLN.js";import"./chunk-5QZIKR6A.js";import{B as X,C as z,H as K,L as j,c as B,e as U,i as G,s as W,u as V,w as J}from"./chunk-HPNLQHW6.js";import"./chunk-BGTK25UG.js";import{d as A,e as I}from"./chunk-A4LPGPDU.js";import"./chunk-PKPBSTZA.js";import"./chunk-QPTSKQZ2.js";import"./chunk-OTPG7USH.js";import"./chunk-TT3S63BX.js";import{$ as m,Ab as l,Bb as T,Bc as $,Ib as f,Mc as O,Pa as a,Pb as S,Qb as P,Rb as p,Rc as v,Ub as D,Vb as h,W as E,Xb as s,aa as F,cb as b,ic as x,jc as d,la as N,na as M,oc as w,pc as L,qc as k,sb as c,tb as _,yb as y,zb as r}from"./chunk-T2WO6CVD.js";import"./chunk-7CGTOI24.js";var Y=(t,n,e,i,o)=>({"loading-state":t,"ready-to-add-link":n,"is-connected":e,"failed-to-connect":i,"is-registered":o});function Z(t,n){t&1&&p(0,0,1)}function ee(t,n){t&1&&p(0,0,2)}function te(t,n){if(t&1){let e=f();r(0,"button",10),h("click",function(){m(e);let o=s(2);return F(o.cancel())}),d(1,"Cancel registration"),l()}}function ne(t,n){if(t&1&&(r(0,"div",7)(1,"p"),S(2,0),c(3,Z,1,0)(4,ee,1,0),P(),l(),T(5,"sh-progress-bar",8),c(6,te,2,0,"button",9),l()),t&2){let e=s();a(3),_(e.state()==="unknown"?3:4),a(3),_((e.registeringCounter()??0)>=5&&e.state()==="registering"?6:-1)}}function ie(t,n){if(t&1){let e=f();r(0,"sh-form-field")(1,"label",11),p(2,1),l(),r(3,"input",12),k("ngModelChange",function(o){m(e);let C=s();return L(C.customRegisterUrl,o)||(C.customRegisterUrl=o),F(o)}),l()(),r(4,"div",13)(5,"button",14),d(6,"Go back"),l(),r(7,"button",15),h("click",function(){m(e);let o=s();return F(o.registerViaCustomUrl())}),p(8,2),l()()}if(t&2){let e=s();a(3),w("ngModel",e.customRegisterUrl),a(4),y("disabled",!e.customRegisterUrlValid())}}function oe(t,n){if(t&1){let e=f();r(0,"p"),p(1,3),l(),T(2,"sh-progress-bar",8),r(3,"button",10),h("click",function(){m(e);let o=s(2);return F(o.retryWhenFaulted())}),d(4,"Cancel"),l()}}function re(t,n){if(t&1){let e=f();r(0,"p"),p(1,4),l(),r(2,"button",10),h("click",function(){m(e);let o=s(2);return F(o.retryWhenFaulted())}),d(3,"Retry"),l()}}function le(t,n){if(t&1&&c(0,oe,5,0)(1,re,4,0),t&2){let e=s();_(e.claimUrl()!==null?0:1)}}function ae(t,n){t&1&&(S(0,5,1),T(1,"p"),P())}function se(t,n){t&1&&(S(0,5,2),T(1,"p"),P())}function ce(t,n){if(t&1){let e=f();r(0,"sh-alert",16),S(1,5),c(2,ae,2,0,"p")(3,se,2,0,"p"),P(),l(),r(4,"button",10),h("click",function(){m(e);let o=s();return F(o.retryWhenFaulted())}),d(5," Retry "),r(6,"sh-icon"),d(7,"arrow-arc-left"),l()()}if(t&2){let e=s();a(2),_(e.typeParam()==="link"?2:3)}}function _e(t,n){t&1&&(r(0,"h3"),d(1,"Successfully connected"),l(),r(2,"p"),d(3,"We're going to redirect you to the home page"),l())}var R=class t{#t=E(A);#i=E(H);#e=E(Q);#n=E(q);isOldOpen=N(!1);typeParam=v.required();state=this.#e.state;claimUrl=this.#e.claimUrl;registerUrl=this.#e.registerUrl;customRegisterUrl=this.#e.customRegisterUrl;additionalReportingUrl=O(()=>{let n=this.#n.serverSettings();return this.#e.state()==="inactive"?"":n&&n["additional-report-url"]||""});copiedReportingUrl=N(!1);customRegisterUrlValid=O(()=>{let n=this.customRegisterUrl(),e=/^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\(\)\*\+,;=.]+$/;return!(n.length===0||!e.test(n))});registeringCounter=N(null);didTry=!1;triedFinishConnection=!1;stateEffect=M(()=>{let n=this.#e.registerUrl(),e=this.state(),i=this.typeParam(),o=this.registeringCounter();e==="inactive"&&i==="logon"&&n!==""&&(this.didTry||(this.#e.beginRemoteRegistration(),this.didTry=!0)),e==="registered"&&this.claimUrl()!==null&&(this.triedFinishConnection||(this.triedFinishConnection=!0,this.#o())),e==="registering"?(o===null&&this.registeringCounter.set(0),setTimeout(()=>{this.registeringCounter.set((o??0)+1)},1e3)):this.registeringCounter.set(null),(e==="connected"||e==="disabled"||e==="connecting")&&this.#n.setShownWelcomePage().subscribe(()=>{this.#t.navigate([""])})});ngOnInit(){this.#e.refreshRemoteControlStatus()}#o(){let n=this.#e.claimUrl();this.#i.open(`${n}?closeAfterConnection=true`,"_blank")}registerViaCustomUrl(){this.#e.beginRemoteRegistration(!0)}retryWhenFaulted(){this.#e.cancelRemoteRegistration(),this.customRegisterUrl.set(""),this.didTry=!1,this.triedFinishConnection=!1,this.typeParam()==="logon"&&this.#t.navigate(["/welcome/select"])}cancel(){this.#e.cancelRemoteRegistration()}register(){this.#e.beginRemoteRegistration()}disable(){this.#e.disableRemoteControl()}enable(){this.#e.enableRemoteControl()}delete(){this.#e.deleteRemoteControl()}copyReportingUrl(){let n=this.additionalReportingUrl();n&&(this.copiedReportingUrl.set(!0),setTimeout(()=>this.copiedReportingUrl.set(!1),2e3),navigator.clipboard.writeText(n))}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=b({type:t,selectors:[["app-connect"]],inputs:{typeParam:[1,"typeParam"]},decls:6,vars:13,consts:()=>{let n;n=$localize`${"\uFFFD*3:1\uFFFD"}:START_BLOCK_IF: Loading... ${"\uFFFD/*3:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*4:2\uFFFD"}:START_BLOCK_ELSE: Connecting to console ${"\uFFFD/*4:2\uFFFD"}:CLOSE_BLOCK_ELSE:`;let e;e=$localize`Paste registration URL here`;let i;i=$localize` Connect machine to console `;let o;o=$localize`We're now connecting you to the console`;let C;C=$localize`Something failed during registration we're missing claimUrl, please try again`;let u;return u=$localize` Failed to register ${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_PARAGRAPH: Check if the connection link are correct, alternatively it could be your internet connection or the service might be down ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_PARAGRAPH:${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_PARAGRAPH: There might be a problem with your internet connection or the service might be down, please try again later ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_PARAGRAPH:${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,u=D(u),[n,e,i,o,C,u,[1,"main-card","type-b"],[1,"loader-content"],[1,"primary","indeterminate"],["shButton",""],["shButton","",3,"click"],["for","remoteControlRegisterUrl"],["type","text","id","remoteControlRegisterUrl","name","remoteControlRegisterUrl",3,"ngModelChange","ngModel"],[1,"nav-buttons"],["type","button","shButton","","routerLink","/welcome",1,"raised"],["type","button","shButton","",1,"raised","primary",3,"click","disabled"],[1,"error"]]},template:function(e,i){if(e&1&&(r(0,"sh-card",6),c(1,ne,7,2,"div",7),c(2,ie,9,2),c(3,le,2,1),c(4,ce,8,1),c(5,_e,4,0),l()),e&2){let o=i.state()==="unknown"||i.typeParam()!=="link"&&i.state()==="inactive"||i.state()==="registering",C=i.typeParam()==="link"&&i.state()==="inactive",u=i.state()==="connected"||i.state()==="disabled"||i.state()==="connecting",g=i.state()==="registeringfaulted";x($(7,Y,o,C,u,g,i.state()==="registered")),a(),_(o?1:-1),a(),_(C?2:-1),a(),_(i.state()==="registered"?3:-1),a(),_(g?4:-1),a(),_(u?5:-1)}},dependencies:[I,W,B,U,G,K,X,j,z,J,V],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;min-height:100%;width:100%;flex:1 0;overflow:hidden;padding:2rem}@media only screen and (max-width:768px){[_nghost-%COMP%]{padding:1rem}}.main-card[_ngcontent-%COMP%]{width:100%;height:100%;max-width:31.25rem;max-height:min-content;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:1rem;padding:2rem}.main-card.failed-to-connect[_ngcontent-%COMP%] sh-alert[_ngcontent-%COMP%]{width:100%}.main-card.failed-to-connect[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:100%}.main-card.is-registered[_ngcontent-%COMP%], .main-card.is-connected[_ngcontent-%COMP%]{align-items:center}.loader-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.5rem;width:100%}.loader-content[_ngcontent-%COMP%] sh-progress-bar[_ngcontent-%COMP%]{--pb-b: var(--base-3);border:1px solid var(--pb-b)}.field-row[_ngcontent-%COMP%]{display:flex;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] sh-form-field[_ngcontent-%COMP%], .field-row[_ngcontent-%COMP%] sh-select[_ngcontent-%COMP%]{flex:1 0}.reporting-url[_ngcontent-%COMP%]{cursor:pointer;-webkit-user-select:none;user-select:none;margin-top:.25rem}.state[_ngcontent-%COMP%]{position:fixed;top:1rem;right:1rem;margin:0;color:var(--base-7);font-size:.75rem}.old[_ngcontent-%COMP%]{display:flex;flex-direction:column;position:relative;gap:.5rem;padding:1rem;border:1px solid var(--base-4);background:var(--base-1);position:fixed;top:0;right:0;bottom:0;width:35rem;transform:translate(100%)}.old.open[_ngcontent-%COMP%]{transform:translate(0)}.old[_ngcontent-%COMP%] .toggle[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;gap:.5rem;cursor:pointer;position:absolute;background-color:var(--base-1);border:1px solid var(--base-4);border-width:.0625rem 0 .0625rem .0625rem;width:2rem;height:2.5rem;border-radius:var(--shape-2) 0 0 var(--shape-2);top:3.75rem;left:-2rem;-webkit-user-select:none;user-select:none}.old[_ngcontent-%COMP%] .toggle[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:1rem}.nav-buttons[_ngcontent-%COMP%]{display:flex;gap:.5rem;flex-direction:row}"],changeDetection:0})};export{R as default};