@duplicati/ngclient 0.0.172 → 0.0.173

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.
@@ -1 +1 @@
1
- import{g as he}from"./chunk-3L2HST7Q.js";import{a as Ie,b as me,c as De}from"./chunk-N6SGM2XM.js";import"./chunk-W2UO5LKI.js";import"./chunk-OLOFMEQN.js";import{a as pe}from"./chunk-4BGVLUYV.js";import{j as Ne}from"./chunk-ZOO7P75U.js";import"./chunk-GS5QK7LF.js";import"./chunk-VKR5DJQG.js";import"./chunk-BTVYI2KD.js";import"./chunk-PJAWWLYW.js";import"./chunk-6Q6SSTBK.js";import"./chunk-RECKKS2S.js";import"./chunk-LJQN4G2O.js";import"./chunk-I2RHQQ3J.js";import{a as m}from"./chunk-F2QQDU4N.js";import"./chunk-XE5OMGTJ.js";import"./chunk-TJ3WIU6Q.js";import"./chunk-KBGIIJMM.js";import{B as Oe,H as Ce,K as Re,c as se,e as _e,f as le,g as ce,i as Te,j as Se,s as Ee,u as Fe,w as ge,y as de,z as ue}from"./chunk-LFRGO2IP.js";import{b as ae,d as re}from"./chunk-LEZL7BSL.js";import"./chunk-4MEL5WTX.js";import"./chunk-5K64UNNB.js";import"./chunk-6DB3NZXR.js";import"./chunk-FPPZ4BUR.js";import{$b as l,Ab as L,Ac as ne,Bb as x,Bc as ie,Cb as h,Db as r,Eb as s,Fb as g,Jb as w,Kb as G,Mb as C,Ra as _,Rc as k,Tb as E,Ub as F,Vb as N,Wb as f,Xb as A,Yb as q,Yc as oe,Zb as d,_ as R,bb as Q,da as T,ea as S,gc as Y,hc as Z,ia as j,kc as ee,nc as I,oa as p,oc as b,pc as te,sc as M,tc as P,uc as $,wb as u,xb as O,yb as y}from"./chunk-FAM42SZT.js";import"./chunk-EUDKD2JW.js";var fe=["formRef"],Ae=()=>({maxWidth:"700px",width:"100%"});function Me(n,i){if(n&1){let e=C();r(0,"button",33),d("click",function(){T(e);let t=l();return S(t.testDestination(0,!0))}),N(1,6),s()}if(n&2){let e=l();ee("loader",e.testSignal()=="testing"),h("disabled",e.testSignal()=="testing")}}function Pe(n,i){if(n&1){let e=C();r(0,"button",23),d("click",function(){T(e);let t=l();return S(t.copyTargetUrl())}),E(1,7),g(2,"sh-icon"),F(),s()}}function $e(n,i){n&1&&(r(0,"sh-alert"),E(1,8),g(2,"sh-icon",34),F(),s())}function ye(n,i){n&1&&(r(0,"sh-alert",24),E(1,9),g(2,"sh-icon",34),F(),s())}function Le(n,i){if(n&1&&(r(0,"sh-alert",25),E(1,10),g(2,"sh-icon",34),F(),s()),n&2){let e=l();_(2),f(e.testErrorMessage()),A(1)}}function xe(n,i){if(n&1&&(r(0,"sh-alert",26),E(1,11),g(2,"sh-icon",34),F(),s()),n&2){let e=l();_(2),f(e.testErrorMessage()),A(1)}}function we(n,i){if(n&1){let e=C();r(0,"p",35),d("click",function(){T(e);let t=l();return S(t.removeDestination())}),E(1,12),g(2,"strong")(3,"br")(4,"span",36),F(),s()}if(n&2){let e,o=l();_(4),f((e=o.selectedDestinationType())==null?null:e.displayName),A(1)}}function Ge(n,i){if(n&1){let e=C();r(0,"div",42),d("click",function(){let t=T(e).$implicit,a=l(2);return S(a.setDestination(t.key))}),r(1,"h3"),I(2),s(),r(3,"p"),I(4),s()()}if(n&2){let e=i.$implicit;_(2),b(e.displayName),_(2),b(e.description)}}function be(n,i){if(n&1){let e=C();r(0,"button",43,1),d("click",function(){let t=T(e).$implicit,a=l(2);return S(a.setDestination(t.key))}),I(2),s()}if(n&2){let e=i.$implicit;_(2),te(" ",e.displayName," ")}}function ke(n,i){if(n&1&&(r(0,"div",37),L(1,Ge,5,2,"div",38,y),s(),r(3,"sh-menu",39)(4,"button",40),N(5,13),s(),w(6,22),L(7,be,3,1,"button",41,y),G(),s()),n&2){let e=l();_(),x(e.destinationTypeOptionsFocused()),_(2),h("searchable",!0),_(4),x(e.destinationTypeOptions())}}function ve(n,i){if(n&1){let e=C();r(0,"app-single-destination",44),$("targetUrlChange",function(t){T(e);let a=l();return P(a.targetUrlModel,t)||(a.targetUrlModel=t),S(t)}),s()}if(n&2){let e=l();M("targetUrl",e.targetUrlModel)}}function Ue(n,i){n&1&&(E(0,5,1),g(1,"sh-icon",31),F())}function Be(n,i){n&1&&(E(0,5,2),g(1,"sh-icon"),F())}function We(n,i){if(n&1){let e=C();r(0,"sh-dialog",45),$("isOpenChange",function(t){T(e);let a=l();return P(a.targetUrlDialogOpen,t)||(a.targetUrlDialogOpen=t),S(t)}),r(1,"header",46)(2,"div",47)(3,"h2"),N(4,14),s(),r(5,"sh-alert",25),N(6,15),s()()(),r(7,"div",48)(8,"sh-form-field")(9,"textarea",49),$("ngModelChange",function(t){T(e);let a=l();return P(a.targetUrlCtrl,t)||(a.targetUrlCtrl=t),S(t)}),s()()(),r(10,"footer",50)(11,"button",29),d("click",function(){T(e);let t=l();return S(t.closeTargetUrlDialog(!1))}),I(12,"Cancel"),s(),r(13,"button",51),d("click",function(){T(e);let t=l();return S(t.closeTargetUrlDialog(!0))}),E(14,16),g(15,"sh-icon"),F(),s()()()}if(n&2){let e=l();M("isOpen",e.targetUrlDialogOpen),h("options",ie(3,Ae)),_(9),M("ngModel",e.targetUrlCtrl)}}var v=class n{#i=R(re);#o=R(ae);#t=R(ue);#a=R(Ie);injector=R(j);#e=R(he);#r=R(me);formRef=oe.required("formRef");targetUrlModel=this.#e.destinationTargetUrl;targetUrlCtrl=p(null);targetUrlInitial=p(null);targetUrlDialogOpen=p(!1);toggleNewDestination=p(!0);testSignal=this.#e.testSignal;testErrorMessage=this.#e.testErrorMessage;destinationTypeOptionsInFocus=p(["file","ssh","s3","gcs","googledrive","azure"]);destinationTypeOptions=this.#r.destinationTypeOptions;destinationTypeOptionsFocused=k(()=>{let i=this.destinationTypeOptionsInFocus(),e=this.destinationTypeOptions();return i.map(o=>e.find(t=>t.key===o))});selectedDestinationType=k(()=>{let i=this.#e.destinationTargetUrl();if(!i)return null;let e=i.split("://")[0];return pe(e)});copyTargetUrl(){navigator.clipboard.writeText(this.#e.destinationTargetUrl()??"")}openTargetUrlDialog(){let i=this.#e.destinationTargetUrl();this.targetUrlCtrl.set(i),this.targetUrlInitial.set(i),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(i=!1){this.targetUrlDialogOpen.set(!1);let e=this.targetUrlCtrl(),o=this.targetUrlInitial();!i||e===o||!e||this.#e.updateTargetUrl(e)}testDestination(i,e,o){let t=this.#e.destinationTargetUrl();t&&(this.#e.setTestState("testing"),this.#a.testDestination(t,this.#e.backupId(),i,!0,e).subscribe({next:a=>{if(a.action==="success"){this.#e.setTestState("success"),a.containsBackup===!1?(this.#e.setTestState("warning",$localize`The remote destination does not contain any backups. Please check if the destination details are correct.`),e||this.#t.open(m,{data:{title:$localize`Folder contains no backup`,message:$localize`The remote destination does not contain any backups. Please check if the destination details are correct.`,confirmText:$localize`OK`,cancelText:void 0}})):a.anyFilesFound===!1&&(this.#e.setTestState("warning",$localize`The remote destination is empty. Please check if the destination details are correct.`),e||this.#t.open(m,{data:{title:$localize`Folder is empty`,message:$localize`The remote destination is empty. Please check if the destination details are correct.`,confirmText:$localize`OK`,cancelText:void 0}})),o?.();return}if(this.#e.setTestState("error",a.errorMessage??$localize`An error occurred while testing the destination.`),a.action==="generic-error"){o?.();return}let D=t.includes("?");a.action==="trust-cert"&&this.#e.updateTargetUrl(t+`${D?"&":"?"}accept-specified-ssl-hash=${a.certData}`),a.action==="approve-host-key"&&this.#e.updateTargetUrl(t+`${D?"&":"?"}ssh-fingerprint=${a.reportedHostKey}`),a.testAgain?this.testDestination(a.destinationIndex,e):o?.()}}))}setDestination(i){this.#e.updateTargetUrl(`${i}://`)}removeDestination(){this.#e.updateTargetUrl(null)}goBack(){this.#i.navigate(["general"],{relativeTo:this.#o.parent})}next(){let i=this.testSignal();if(i===""){this.#t.open(m,{data:{title:$localize`Test destination`,message:$localize`You have not tested the destination yet. Do you want to test it now?`,confirmText:$localize`Test now`,cancelText:$localize`Skip test and continue`},closed:e=>{e?this.testDestination(0,!1,()=>{this.testSignal()==="success"?this.#n():this.#t.open(m,{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(i!=="success"){this.#t.open(m,{data:{title:$localize`Test destination`,message:$localize`The destination has not been tested successfully. Are you sure you want to continue?`,confirmText:$localize`Yes, continue`,cancelText:$localize`Cancel`},closed:e=>{e&&this.#n()}});return}this.#n()}#n(){this.#i.navigate(["encryption"],{relativeTo:this.#o.parent})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=Q({type:n,selectors:[["app-restore-destination"]],viewQuery:function(e,o){e&1&&Y(o.formRef,fe,5),e&2&&Z()},features:[ne([Ne])],decls:33,vars:9,consts:()=>{let i;i=$localize`Backup destination`;let e;e=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON: Edit target URL `;let o;o=$localize`${"\uFFFD#27\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#27\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let t;t=$localize`${"\uFFFD*30: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/*30:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*31: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/*31:2\uFFFD"}:CLOSE_BLOCK_ELSE: Continue `,t=q(t);let a;a=$localize` Test destination `;let D;D=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:copy${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Copy URL to clipboard `;let U;U=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:spinner${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Testing connection... `;let B;B=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:check${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Connection tested successfully. `;let W;W=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:warning${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let V;V=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:warning${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let z;z=$localize` Current destination type ${"\uFFFD#2\uFFFD"}:START_TAG_STRONG:${"\uFFFD0\uFFFD"}:INTERPOLATION:.${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#3\uFFFD\uFFFD/#3\uFFFD"}:LINE_BREAK: Want to select another? ${"\uFFFD#4\uFFFD"}:START_TAG_SPAN:Click here${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SPAN:`;let J;J=$localize`All destinations`;let X;X=$localize`Edit target URL`;let H;H=$localize`Be careful, this will overwrite everything you have in your destination.`;let K;return K=$localize` Override target URL ${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:swap${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON:`,[["formRef",""],["option",""],i,e,o,t,a,D,U,B,W,V,z,J,X,H,K,[3,"submit"],[1,"title-30"],[1,"actions"],["shButton","","type","button",1,"small",3,"disabled","loader"],["shButton","","type","button",1,"small"],["menu",""],["shButton","","type","button",1,"small",3,"click"],[1,"success"],[1,"warn"],[1,"error"],[3,"targetUrl"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary",3,"disabled"],[1,"loader"],[3,"isOpen","options"],["shButton","","type","button",1,"small",3,"click","disabled"],["icon",""],[3,"click"],[1,"sh-primary"],[1,"most-common-destinations"],[1,"tile"],[3,"searchable"],["shButton","","type","button",1,"outlined"],["type","button"],[1,"tile",3,"click"],["type","button",3,"click"],[3,"targetUrlChange","targetUrl"],[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,o){if(e&1){let t=C();r(0,"form",17,0),d("submit",function(){return T(t),S(o.next())}),r(2,"header")(3,"h3",18)(4,"span"),N(5,2),s(),r(6,"div",19),u(7,Me,2,3,"button",20),r(8,"sh-menu")(9,"button",21)(10,"sh-icon"),I(11,"dots-three-vertical"),s()(),w(12,22),r(13,"button",23),d("click",function(){return T(t),S(o.openTargetUrlDialog())}),E(14,3),g(15,"sh-icon"),F(),s(),u(16,Pe,3,0,"button",21),G(),s()()(),u(17,$e,3,0,"sh-alert")(18,ye,3,0,"sh-alert",24)(19,Le,3,1,"sh-alert",25)(20,xe,3,1,"sh-alert",26),u(21,we,5,1,"p"),s(),u(22,ke,9,1),u(23,ve,1,1,"app-single-destination",27),r(24,"div",28)(25,"button",29),d("click",function(){return T(t),S(o.goBack())}),E(26,4),g(27,"sh-icon"),F(),s(),r(28,"button",30),E(29,5),u(30,Ue,2,0,"sh-icon",31)(31,Be,2,0,"sh-icon"),F(),s()()(),u(32,We,16,4,"sh-dialog",32)}if(e&2){let t=!!o.targetUrlModel();_(7),O(t?7:-1),_(9),O(t?16:-1),_(),O(o.testSignal()=="testing"?17:o.testSignal()=="success"?18:o.testSignal()=="warning"?19:o.testSignal()=="error"?20:-1),_(4),O(t?21:-1),_(),O(t?-1:22),_(),O(t?23:-1),_(5),h("disabled",o.testSignal()=="testing"||!t),_(2),O(o.testSignal()=="testing"?30:31),_(2),O(o.targetUrlDialogOpen()?32:-1)}},dependencies:[De,Ee,Se,se,_e,le,Te,ce,Oe,Ce,Re,Fe,de,ge],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], header[_ngcontent-%COMP%] sh-alert[_ngcontent-%COMP%]{width:100%}header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:.5rem}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}pre[_ngcontent-%COMP%]{white-space:pre-wrap}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.field-row.single-field[_ngcontent-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.clickable[_ngcontent-%COMP%]{cursor:pointer;color:var(--primary-8)}.most-common-destinations[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10);background-color:var(--base-2);cursor:pointer}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-10);margin:0}[prefix].link[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline;color:var(--primary-8)}textarea[_ngcontent-%COMP%] ~ grammarly-extension[_ngcontent-%COMP%]{display:none}.target-dialog-header[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:.5rem}"],changeDetection:0})};export{v as default};
1
+ import{g as he}from"./chunk-2B562XFN.js";import{a as Ie,b as me,c as De}from"./chunk-JVBEGJUJ.js";import"./chunk-C7RFWM7I.js";import"./chunk-OLOFMEQN.js";import{a as pe}from"./chunk-4BGVLUYV.js";import{j as Ne}from"./chunk-SIXGJYNI.js";import"./chunk-GS5QK7LF.js";import"./chunk-FUE2VIJ7.js";import"./chunk-BTVYI2KD.js";import"./chunk-PJAWWLYW.js";import"./chunk-6Q6SSTBK.js";import"./chunk-RECKKS2S.js";import"./chunk-LJQN4G2O.js";import"./chunk-I2RHQQ3J.js";import{a as m}from"./chunk-F2QQDU4N.js";import"./chunk-XE5OMGTJ.js";import"./chunk-TJ3WIU6Q.js";import"./chunk-KBGIIJMM.js";import{B as Oe,H as Ce,K as Re,c as se,e as _e,f as le,g as ce,i as Te,j as Se,s as Ee,u as Fe,w as ge,y as de,z as ue}from"./chunk-LFRGO2IP.js";import{b as ae,d as re}from"./chunk-LEZL7BSL.js";import"./chunk-4MEL5WTX.js";import"./chunk-5K64UNNB.js";import"./chunk-6DB3NZXR.js";import"./chunk-FPPZ4BUR.js";import{$b as l,Ab as L,Ac as ne,Bb as x,Bc as ie,Cb as h,Db as r,Eb as s,Fb as g,Jb as w,Kb as G,Mb as C,Ra as _,Rc as k,Tb as E,Ub as F,Vb as N,Wb as f,Xb as A,Yb as q,Yc as oe,Zb as d,_ as R,bb as Q,da as T,ea as S,gc as Y,hc as Z,ia as j,kc as ee,nc as I,oa as p,oc as b,pc as te,sc as M,tc as P,uc as $,wb as u,xb as O,yb as y}from"./chunk-FAM42SZT.js";import"./chunk-EUDKD2JW.js";var fe=["formRef"],Ae=()=>({maxWidth:"700px",width:"100%"});function Me(n,i){if(n&1){let e=C();r(0,"button",33),d("click",function(){T(e);let t=l();return S(t.testDestination(0,!0))}),N(1,6),s()}if(n&2){let e=l();ee("loader",e.testSignal()=="testing"),h("disabled",e.testSignal()=="testing")}}function Pe(n,i){if(n&1){let e=C();r(0,"button",23),d("click",function(){T(e);let t=l();return S(t.copyTargetUrl())}),E(1,7),g(2,"sh-icon"),F(),s()}}function $e(n,i){n&1&&(r(0,"sh-alert"),E(1,8),g(2,"sh-icon",34),F(),s())}function ye(n,i){n&1&&(r(0,"sh-alert",24),E(1,9),g(2,"sh-icon",34),F(),s())}function Le(n,i){if(n&1&&(r(0,"sh-alert",25),E(1,10),g(2,"sh-icon",34),F(),s()),n&2){let e=l();_(2),f(e.testErrorMessage()),A(1)}}function xe(n,i){if(n&1&&(r(0,"sh-alert",26),E(1,11),g(2,"sh-icon",34),F(),s()),n&2){let e=l();_(2),f(e.testErrorMessage()),A(1)}}function we(n,i){if(n&1){let e=C();r(0,"p",35),d("click",function(){T(e);let t=l();return S(t.removeDestination())}),E(1,12),g(2,"strong")(3,"br")(4,"span",36),F(),s()}if(n&2){let e,o=l();_(4),f((e=o.selectedDestinationType())==null?null:e.displayName),A(1)}}function Ge(n,i){if(n&1){let e=C();r(0,"div",42),d("click",function(){let t=T(e).$implicit,a=l(2);return S(a.setDestination(t.key))}),r(1,"h3"),I(2),s(),r(3,"p"),I(4),s()()}if(n&2){let e=i.$implicit;_(2),b(e.displayName),_(2),b(e.description)}}function be(n,i){if(n&1){let e=C();r(0,"button",43,1),d("click",function(){let t=T(e).$implicit,a=l(2);return S(a.setDestination(t.key))}),I(2),s()}if(n&2){let e=i.$implicit;_(2),te(" ",e.displayName," ")}}function ke(n,i){if(n&1&&(r(0,"div",37),L(1,Ge,5,2,"div",38,y),s(),r(3,"sh-menu",39)(4,"button",40),N(5,13),s(),w(6,22),L(7,be,3,1,"button",41,y),G(),s()),n&2){let e=l();_(),x(e.destinationTypeOptionsFocused()),_(2),h("searchable",!0),_(4),x(e.destinationTypeOptions())}}function ve(n,i){if(n&1){let e=C();r(0,"app-single-destination",44),$("targetUrlChange",function(t){T(e);let a=l();return P(a.targetUrlModel,t)||(a.targetUrlModel=t),S(t)}),s()}if(n&2){let e=l();M("targetUrl",e.targetUrlModel)}}function Ue(n,i){n&1&&(E(0,5,1),g(1,"sh-icon",31),F())}function Be(n,i){n&1&&(E(0,5,2),g(1,"sh-icon"),F())}function We(n,i){if(n&1){let e=C();r(0,"sh-dialog",45),$("isOpenChange",function(t){T(e);let a=l();return P(a.targetUrlDialogOpen,t)||(a.targetUrlDialogOpen=t),S(t)}),r(1,"header",46)(2,"div",47)(3,"h2"),N(4,14),s(),r(5,"sh-alert",25),N(6,15),s()()(),r(7,"div",48)(8,"sh-form-field")(9,"textarea",49),$("ngModelChange",function(t){T(e);let a=l();return P(a.targetUrlCtrl,t)||(a.targetUrlCtrl=t),S(t)}),s()()(),r(10,"footer",50)(11,"button",29),d("click",function(){T(e);let t=l();return S(t.closeTargetUrlDialog(!1))}),I(12,"Cancel"),s(),r(13,"button",51),d("click",function(){T(e);let t=l();return S(t.closeTargetUrlDialog(!0))}),E(14,16),g(15,"sh-icon"),F(),s()()()}if(n&2){let e=l();M("isOpen",e.targetUrlDialogOpen),h("options",ie(3,Ae)),_(9),M("ngModel",e.targetUrlCtrl)}}var v=class n{#i=R(re);#o=R(ae);#t=R(ue);#a=R(Ie);injector=R(j);#e=R(he);#r=R(me);formRef=oe.required("formRef");targetUrlModel=this.#e.destinationTargetUrl;targetUrlCtrl=p(null);targetUrlInitial=p(null);targetUrlDialogOpen=p(!1);toggleNewDestination=p(!0);testSignal=this.#e.testSignal;testErrorMessage=this.#e.testErrorMessage;destinationTypeOptionsInFocus=p(["file","ssh","s3","gcs","googledrive","azure"]);destinationTypeOptions=this.#r.destinationTypeOptions;destinationTypeOptionsFocused=k(()=>{let i=this.destinationTypeOptionsInFocus(),e=this.destinationTypeOptions();return i.map(o=>e.find(t=>t.key===o))});selectedDestinationType=k(()=>{let i=this.#e.destinationTargetUrl();if(!i)return null;let e=i.split("://")[0];return pe(e)});copyTargetUrl(){navigator.clipboard.writeText(this.#e.destinationTargetUrl()??"")}openTargetUrlDialog(){let i=this.#e.destinationTargetUrl();this.targetUrlCtrl.set(i),this.targetUrlInitial.set(i),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(i=!1){this.targetUrlDialogOpen.set(!1);let e=this.targetUrlCtrl(),o=this.targetUrlInitial();!i||e===o||!e||this.#e.updateTargetUrl(e)}testDestination(i,e,o){let t=this.#e.destinationTargetUrl();t&&(this.#e.setTestState("testing"),this.#a.testDestination(t,this.#e.backupId(),i,!0,e).subscribe({next:a=>{if(a.action==="success"){this.#e.setTestState("success"),a.containsBackup===!1?(this.#e.setTestState("warning",$localize`The remote destination does not contain any backups. Please check if the destination details are correct.`),e||this.#t.open(m,{data:{title:$localize`Folder contains no backup`,message:$localize`The remote destination does not contain any backups. Please check if the destination details are correct.`,confirmText:$localize`OK`,cancelText:void 0}})):a.anyFilesFound===!1&&(this.#e.setTestState("warning",$localize`The remote destination is empty. Please check if the destination details are correct.`),e||this.#t.open(m,{data:{title:$localize`Folder is empty`,message:$localize`The remote destination is empty. Please check if the destination details are correct.`,confirmText:$localize`OK`,cancelText:void 0}})),o?.();return}if(this.#e.setTestState("error",a.errorMessage??$localize`An error occurred while testing the destination.`),a.action==="generic-error"){o?.();return}let D=t.includes("?");a.action==="trust-cert"&&this.#e.updateTargetUrl(t+`${D?"&":"?"}accept-specified-ssl-hash=${a.certData}`),a.action==="approve-host-key"&&this.#e.updateTargetUrl(t+`${D?"&":"?"}ssh-fingerprint=${a.reportedHostKey}`),a.testAgain?this.testDestination(a.destinationIndex,e):o?.()}}))}setDestination(i){this.#e.updateTargetUrl(`${i}://`)}removeDestination(){this.#e.updateTargetUrl(null)}goBack(){this.#i.navigate(["general"],{relativeTo:this.#o.parent})}next(){let i=this.testSignal();if(i===""){this.#t.open(m,{data:{title:$localize`Test destination`,message:$localize`You have not tested the destination yet. Do you want to test it now?`,confirmText:$localize`Test now`,cancelText:$localize`Skip test and continue`},closed:e=>{e?this.testDestination(0,!1,()=>{this.testSignal()==="success"?this.#n():this.#t.open(m,{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(i!=="success"){this.#t.open(m,{data:{title:$localize`Test destination`,message:$localize`The destination has not been tested successfully. Are you sure you want to continue?`,confirmText:$localize`Yes, continue`,cancelText:$localize`Cancel`},closed:e=>{e&&this.#n()}});return}this.#n()}#n(){this.#i.navigate(["encryption"],{relativeTo:this.#o.parent})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=Q({type:n,selectors:[["app-restore-destination"]],viewQuery:function(e,o){e&1&&Y(o.formRef,fe,5),e&2&&Z()},features:[ne([Ne])],decls:33,vars:9,consts:()=>{let i;i=$localize`Backup destination`;let e;e=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON: Edit target URL `;let o;o=$localize`${"\uFFFD#27\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#27\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let t;t=$localize`${"\uFFFD*30: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/*30:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*31: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/*31:2\uFFFD"}:CLOSE_BLOCK_ELSE: Continue `,t=q(t);let a;a=$localize` Test destination `;let D;D=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:copy${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Copy URL to clipboard `;let U;U=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:spinner${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Testing connection... `;let B;B=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:check${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Connection tested successfully. `;let W;W=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:warning${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let V;V=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:warning${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let z;z=$localize` Current destination type ${"\uFFFD#2\uFFFD"}:START_TAG_STRONG:${"\uFFFD0\uFFFD"}:INTERPOLATION:.${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#3\uFFFD\uFFFD/#3\uFFFD"}:LINE_BREAK: Want to select another? ${"\uFFFD#4\uFFFD"}:START_TAG_SPAN:Click here${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SPAN:`;let J;J=$localize`All destinations`;let X;X=$localize`Edit target URL`;let H;H=$localize`Be careful, this will overwrite everything you have in your destination.`;let K;return K=$localize` Override target URL ${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:swap${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON:`,[["formRef",""],["option",""],i,e,o,t,a,D,U,B,W,V,z,J,X,H,K,[3,"submit"],[1,"title-30"],[1,"actions"],["shButton","","type","button",1,"small",3,"disabled","loader"],["shButton","","type","button",1,"small"],["menu",""],["shButton","","type","button",1,"small",3,"click"],[1,"success"],[1,"warn"],[1,"error"],[3,"targetUrl"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary",3,"disabled"],[1,"loader"],[3,"isOpen","options"],["shButton","","type","button",1,"small",3,"click","disabled"],["icon",""],[3,"click"],[1,"sh-primary"],[1,"most-common-destinations"],[1,"tile"],[3,"searchable"],["shButton","","type","button",1,"outlined"],["type","button"],[1,"tile",3,"click"],["type","button",3,"click"],[3,"targetUrlChange","targetUrl"],[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,o){if(e&1){let t=C();r(0,"form",17,0),d("submit",function(){return T(t),S(o.next())}),r(2,"header")(3,"h3",18)(4,"span"),N(5,2),s(),r(6,"div",19),u(7,Me,2,3,"button",20),r(8,"sh-menu")(9,"button",21)(10,"sh-icon"),I(11,"dots-three-vertical"),s()(),w(12,22),r(13,"button",23),d("click",function(){return T(t),S(o.openTargetUrlDialog())}),E(14,3),g(15,"sh-icon"),F(),s(),u(16,Pe,3,0,"button",21),G(),s()()(),u(17,$e,3,0,"sh-alert")(18,ye,3,0,"sh-alert",24)(19,Le,3,1,"sh-alert",25)(20,xe,3,1,"sh-alert",26),u(21,we,5,1,"p"),s(),u(22,ke,9,1),u(23,ve,1,1,"app-single-destination",27),r(24,"div",28)(25,"button",29),d("click",function(){return T(t),S(o.goBack())}),E(26,4),g(27,"sh-icon"),F(),s(),r(28,"button",30),E(29,5),u(30,Ue,2,0,"sh-icon",31)(31,Be,2,0,"sh-icon"),F(),s()()(),u(32,We,16,4,"sh-dialog",32)}if(e&2){let t=!!o.targetUrlModel();_(7),O(t?7:-1),_(9),O(t?16:-1),_(),O(o.testSignal()=="testing"?17:o.testSignal()=="success"?18:o.testSignal()=="warning"?19:o.testSignal()=="error"?20:-1),_(4),O(t?21:-1),_(),O(t?-1:22),_(),O(t?23:-1),_(5),h("disabled",o.testSignal()=="testing"||!t),_(2),O(o.testSignal()=="testing"?30:31),_(2),O(o.targetUrlDialogOpen()?32:-1)}},dependencies:[De,Ee,Se,se,_e,le,Te,ce,Oe,Ce,Re,Fe,de,ge],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], header[_ngcontent-%COMP%] sh-alert[_ngcontent-%COMP%]{width:100%}header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:.5rem}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}pre[_ngcontent-%COMP%]{white-space:pre-wrap}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.field-row.single-field[_ngcontent-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.clickable[_ngcontent-%COMP%]{cursor:pointer;color:var(--primary-8)}.most-common-destinations[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10);background-color:var(--base-2);cursor:pointer}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-10);margin:0}[prefix].link[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline;color:var(--primary-8)}textarea[_ngcontent-%COMP%] ~ grammarly-extension[_ngcontent-%COMP%]{display:none}.target-dialog-header[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:.5rem}"],changeDetection:0})};export{v as default};
@@ -1,4 +1,4 @@
1
- import{a as ot}from"./chunk-OLOFMEQN.js";import{a as K,b as Ze,c as Ye,e as et}from"./chunk-4BGVLUYV.js";import{j as it}from"./chunk-ZOO7P75U.js";import{c as tt,d as nt}from"./chunk-VKR5DJQG.js";import{a as Qe}from"./chunk-LJQN4G2O.js";import{a as R}from"./chunk-F2QQDU4N.js";import{a as z}from"./chunk-XE5OMGTJ.js";import{b as We}from"./chunk-KBGIIJMM.js";import{B as Ce,H as Ke,K as Ue,L as Je,P as Xe,V as He,W as je,Y as qe,a as Re,c as de,e as ce,i as pe,k as ke,s as me,t as Be,u as ue,z as ze}from"./chunk-LFRGO2IP.js";import{ea as Ge}from"./chunk-6DB3NZXR.js";import{$b as s,Ab as X,Ac as Le,Bb as H,Bc as Pe,Cb as m,Cc as se,Db as _,Eb as d,Ec as _e,Fb as ie,Jb as oe,Kb as j,Kc as q,Lb as ae,Mb as E,Ra as l,Rc as $,Sc as W,Tb as Ne,Ub as xe,V as te,Vb as De,Xc as Q,Yc as $e,Zb as x,_ as M,_c as be,ac as we,bb as ne,bc as Oe,da as S,ea as h,f as ee,gb as G,gc as Ae,hc as Ve,ia as ye,ic as B,kc as re,nc as p,oa as L,pc as A,qc as le,sc as Me,tc as Fe,uc as ve,vc as P,wb as f,wc as O,xb as g,xc as c,yb as J}from"./chunk-FAM42SZT.js";import{a as V,b as Y}from"./chunk-EUDKD2JW.js";var at=class n{#t=M(We);#e=M(ze);#n=M(z);testDestination(t,e,i,o,a){return this.#n.hasV2TestOperations()?this.testDestinationv2(t,e,i,o,a):this.testDestinationv1(t,e,i,o,a)}testDestinationv2(t,e,i,o,a){return new ee(r=>{this.#t.postApiV2DestinationTest({requestBody:{DestinationUrl:t,BackupId:e=="new"?null:e,AutoCreate:!1,Options:null}}).subscribe({next:u=>{if(u.Success){this.emitSuccessV2(r,t,i,u);return}this.handleGenericError(r,t,i,u.Error??"Unknown error",a)},error:u=>{let T=u?.error?.body??u?.error?.requestBody;if(T?.Data?.FolderExists===!1||T?.StatusCode==="missing-folder"){o?this.handleMissingFolder(r,t,i):this.handleGenericError(r,t,i,$localize`The remote destination folder does not exist.`,a);return}if(T?.Data?.HostCertificate){this.handleMissingCertificate(r,t,i,T.Data?.HostCertificate);return}if(T?.Data?.ReportedHostKey){this.handleIncorrectKey(r,t,i,T.Data.ReportedHostKey,T.Data.AcceptedHostKey??null);return}this.handleGenericError(r,t,i,u?.message??"Unknown error",a)}})})}testDestinationv1(t,e,i,o,a){return new ee(r=>{this.#t.postApiV1RemoteoperationTest({requestBody:{path:t,backupId:e=="new"?null:e}}).subscribe({next:u=>{r.next({action:"success",targetUrl:t,testAgain:!1,destinationIndex:i}),r.complete()},error:u=>{this.handleDestinationErrorv1(u.message,t,i,o,a).subscribe(T=>{r.next(T)})}})})}handleMissingFolder(t,e,i){this.#e.open(R,{data:{title:$localize`Create folder`,message:$localize`The remote destination folder does not exist, do you want to create it?`,confirmText:$localize`Create folder`,cancelText:$localize`Cancel`},closed:o=>{if(!o){this.reportNoAction(t,e,i,$localize`The remote folder does not exist.`);return}this.#n.hasV2TestOperations()?this.#t.postApiV2DestinationTest({requestBody:{DestinationUrl:e,AutoCreate:!0,Options:null}}).subscribe({next:a=>{if(a.Success){this.emitSuccessV2(t,e,i,a);return}else this.handleFolderCreateFailure(t,e,i,a.Error??$localize`Unknown error`)},error:a=>{this.handleFolderCreateFailure(t,e,i,a.message??$localize`Unknown error`)}}):this.#t.postApiV1RemoteoperationCreate({requestBody:{path:e}}).subscribe({next:()=>{this.handleFolderCreated(t,e,i)},error:a=>{this.handleFolderCreateFailure(t,e,i,a.message??$localize`Unknown error`)}})}})}handleFolderCreateFailure(t,e,i,o){this.#e.open(R,{data:{title:$localize`Error creating folder`,message:$localize`The remote destination folder could not be created. ${o}`,confirmText:$localize`OK`,cancelText:null},closed:()=>{t.next({action:"generic-error",targetUrl:e,testAgain:!1,destinationIndex:i}),t.complete()}})}emitSuccessV2(t,e,i,o){t.next({action:"success",targetUrl:e,testAgain:!1,destinationIndex:i,anyFilesFound:!o.Data?.FolderIsEmpty,containsBackup:o.Data?.FolderContainsBackupFiles??void 0,containsEncryptedBackupFiles:o.Data?.FolderContainsEncryptedBackupFiles??void 0}),t.complete()}handleFolderCreated(t,e,i){this.#e.open(R,{data:{title:$localize`Folder created`,message:$localize`The remote destination folder was created successfully.`,confirmText:$localize`OK`,cancelText:null},closed:()=>{t.next({action:"test-again",targetUrl:e,testAgain:!0,destinationIndex:i}),t.complete()}})}reportNoAction(t,e,i,o){t.next({action:"generic-error",targetUrl:e,errorMessage:o,testAgain:!1,destinationIndex:i}),t.complete()}handleMissingCertificate(t,e,i,o){this.#e.open(R,{maxWidth:"500px",data:{title:$localize`Trust the certificate`,message:$localize`The server is using a certificate that is not trusted.
1
+ import{a as ot}from"./chunk-OLOFMEQN.js";import{a as K,b as Ze,c as Ye,e as et}from"./chunk-4BGVLUYV.js";import{j as it}from"./chunk-SIXGJYNI.js";import{c as tt,d as nt}from"./chunk-FUE2VIJ7.js";import{a as Qe}from"./chunk-LJQN4G2O.js";import{a as R}from"./chunk-F2QQDU4N.js";import{a as z}from"./chunk-XE5OMGTJ.js";import{b as We}from"./chunk-KBGIIJMM.js";import{B as Ce,H as Ke,K as Ue,L as Je,P as Xe,V as He,W as je,Y as qe,a as Re,c as de,e as ce,i as pe,k as ke,s as me,t as Be,u as ue,z as ze}from"./chunk-LFRGO2IP.js";import{ea as Ge}from"./chunk-6DB3NZXR.js";import{$b as s,Ab as X,Ac as Le,Bb as H,Bc as Pe,Cb as m,Cc as se,Db as _,Eb as d,Ec as _e,Fb as ie,Jb as oe,Kb as j,Kc as q,Lb as ae,Mb as E,Ra as l,Rc as $,Sc as W,Tb as Ne,Ub as xe,V as te,Vb as De,Xc as Q,Yc as $e,Zb as x,_ as M,_c as be,ac as we,bb as ne,bc as Oe,da as S,ea as h,f as ee,gb as G,gc as Ae,hc as Ve,ia as ye,ic as B,kc as re,nc as p,oa as L,pc as A,qc as le,sc as Me,tc as Fe,uc as ve,vc as P,wb as f,wc as O,xb as g,xc as c,yb as J}from"./chunk-FAM42SZT.js";import{a as V,b as Y}from"./chunk-EUDKD2JW.js";var at=class n{#t=M(We);#e=M(ze);#n=M(z);testDestination(t,e,i,o,a){return this.#n.hasV2TestOperations()?this.testDestinationv2(t,e,i,o,a):this.testDestinationv1(t,e,i,o,a)}testDestinationv2(t,e,i,o,a){return new ee(r=>{this.#t.postApiV2DestinationTest({requestBody:{DestinationUrl:t,BackupId:e=="new"?null:e,AutoCreate:!1,Options:null}}).subscribe({next:u=>{if(u.Success){this.emitSuccessV2(r,t,i,u);return}this.handleGenericError(r,t,i,u.Error??"Unknown error",a)},error:u=>{let T=u?.error?.body??u?.error?.requestBody;if(T?.Data?.FolderExists===!1||T?.StatusCode==="missing-folder"){o?this.handleMissingFolder(r,t,i):this.handleGenericError(r,t,i,$localize`The remote destination folder does not exist.`,a);return}if(T?.Data?.HostCertificate){this.handleMissingCertificate(r,t,i,T.Data?.HostCertificate);return}if(T?.Data?.ReportedHostKey){this.handleIncorrectKey(r,t,i,T.Data.ReportedHostKey,T.Data.AcceptedHostKey??null);return}this.handleGenericError(r,t,i,u?.message??"Unknown error",a)}})})}testDestinationv1(t,e,i,o,a){return new ee(r=>{this.#t.postApiV1RemoteoperationTest({requestBody:{path:t,backupId:e=="new"?null:e}}).subscribe({next:u=>{r.next({action:"success",targetUrl:t,testAgain:!1,destinationIndex:i}),r.complete()},error:u=>{this.handleDestinationErrorv1(u.message,t,i,o,a).subscribe(T=>{r.next(T)})}})})}handleMissingFolder(t,e,i){this.#e.open(R,{data:{title:$localize`Create folder`,message:$localize`The remote destination folder does not exist, do you want to create it?`,confirmText:$localize`Create folder`,cancelText:$localize`Cancel`},closed:o=>{if(!o){this.reportNoAction(t,e,i,$localize`The remote folder does not exist.`);return}this.#n.hasV2TestOperations()?this.#t.postApiV2DestinationTest({requestBody:{DestinationUrl:e,AutoCreate:!0,Options:null}}).subscribe({next:a=>{if(a.Success){this.emitSuccessV2(t,e,i,a);return}else this.handleFolderCreateFailure(t,e,i,a.Error??$localize`Unknown error`)},error:a=>{this.handleFolderCreateFailure(t,e,i,a.message??$localize`Unknown error`)}}):this.#t.postApiV1RemoteoperationCreate({requestBody:{path:e}}).subscribe({next:()=>{this.handleFolderCreated(t,e,i)},error:a=>{this.handleFolderCreateFailure(t,e,i,a.message??$localize`Unknown error`)}})}})}handleFolderCreateFailure(t,e,i,o){this.#e.open(R,{data:{title:$localize`Error creating folder`,message:$localize`The remote destination folder could not be created. ${o}`,confirmText:$localize`OK`,cancelText:null},closed:()=>{t.next({action:"generic-error",targetUrl:e,testAgain:!1,destinationIndex:i}),t.complete()}})}emitSuccessV2(t,e,i,o){t.next({action:"success",targetUrl:e,testAgain:!1,destinationIndex:i,anyFilesFound:!o.Data?.FolderIsEmpty,containsBackup:o.Data?.FolderContainsBackupFiles??void 0,containsEncryptedBackupFiles:o.Data?.FolderContainsEncryptedBackupFiles??void 0}),t.complete()}handleFolderCreated(t,e,i){this.#e.open(R,{data:{title:$localize`Folder created`,message:$localize`The remote destination folder was created successfully.`,confirmText:$localize`OK`,cancelText:null},closed:()=>{t.next({action:"test-again",targetUrl:e,testAgain:!0,destinationIndex:i}),t.complete()}})}reportNoAction(t,e,i,o){t.next({action:"generic-error",targetUrl:e,errorMessage:o,testAgain:!1,destinationIndex:i}),t.complete()}handleMissingCertificate(t,e,i,o){this.#e.open(R,{maxWidth:"500px",data:{title:$localize`Trust the certificate`,message:$localize`The server is using a certificate that is not trusted.
2
2
  If this is a self-signed certificate, you can choose to trust this certificate.
3
3
  The server reported the certificate hash: ${o}`,confirmText:$localize`Trust the certificate`,cancelText:$localize`Cancel`},closed:a=>{if(!a){this.reportNoAction(t,e,i,$localize`The server certificate is not trusted.`);return}t.next({action:"trust-cert",targetUrl:e,testAgain:!0,certData:o,destinationIndex:i}),t.complete()}})}handleIncorrectKey(t,e,i,o,a){a?this.#e.open(R,{maxWidth:"500px",data:{title:$localize`The host key has changed`,message:$localize`The host key has changed, please check with the server administrator if this is correct,
4
4
  otherwise you could be the victim of a MAN-IN-THE-MIDDLE attack.
@@ -0,0 +1 @@
1
+ import"./chunk-EUDKD2JW.js";var o=[{path:"",redirectTo:"select-files",pathMatch:"full"},{path:"destination",loadComponent:()=>import("./chunk-IP3VCHOI.js")},{path:"encryption",loadComponent:()=>import("./chunk-NAHTVY74.js")},{path:"select-files",loadComponent:()=>import("./chunk-CF3WV6QL.js")},{path:"options",loadComponent:()=>import("./chunk-5KCNHCGX.js")},{path:":taskid/progress",loadComponent:()=>import("./chunk-OBXWEOQI.js")}],t=o;export{t as default};
@@ -1 +1 @@
1
- import{g as C}from"./chunk-3L2HST7Q.js";import"./chunk-W2UO5LKI.js";import"./chunk-OLOFMEQN.js";import"./chunk-4BGVLUYV.js";import{a as k}from"./chunk-XDECUOQ5.js";import{j as w}from"./chunk-ZOO7P75U.js";import"./chunk-GS5QK7LF.js";import"./chunk-VKR5DJQG.js";import"./chunk-BTVYI2KD.js";import"./chunk-DU5QSRYH.js";import"./chunk-D2DI6ZER.js";import"./chunk-M77IE672.js";import"./chunk-I5AKUAZF.js";import"./chunk-PJAWWLYW.js";import"./chunk-6Q6SSTBK.js";import"./chunk-RECKKS2S.js";import"./chunk-W4QCGFNO.js";import"./chunk-L4GZJLYK.js";import"./chunk-LJQN4G2O.js";import{b as u}from"./chunk-I2RHQQ3J.js";import"./chunk-F2QQDU4N.js";import"./chunk-XE5OMGTJ.js";import"./chunk-T6C2OUI5.js";import"./chunk-TJ3WIU6Q.js";import"./chunk-KBGIIJMM.js";import{M as W,R as y}from"./chunk-LFRGO2IP.js";import{a as A,b as $,c as M,d as I,e as G,f as v}from"./chunk-LEZL7BSL.js";import"./chunk-4MEL5WTX.js";import"./chunk-5K64UNNB.js";import"./chunk-6DB3NZXR.js";import"./chunk-FPPZ4BUR.js";import{$b as O,Ac as L,Bc as R,Cb as _,Cc as p,Db as o,Eb as n,Fb as s,Ra as r,Sc as N,Tb as F,Ub as l,_ as c,bb as P,kc as D,oa as f,wb as E,xb as g}from"./chunk-FAM42SZT.js";import"./chunk-EUDKD2JW.js";var b=()=>["/restore-from-files/destination"],x=()=>["/restore-from-files/encryption"],H=()=>["/restore-from-files/select-files"],J=()=>["/restore-from-files/options"],X=t=>["/restore",t,"select-files"],z=t=>["/restore",t,"options"];function B(t,i){t&1&&(o(0,"div",7),F(1,0),s(2,"sh-radio"),l(),n(),o(3,"div",7),F(4,1),s(5,"sh-radio"),l(),n(),o(6,"div",8),F(7,2),s(8,"sh-radio"),l(),n(),o(9,"div",8),F(10,3),s(11,"sh-radio"),l(),n()),t&2&&(_("routerLink",R(4,b)),r(3),_("routerLink",R(5,x)),r(3),_("routerLink",R(6,H)),r(3),_("routerLink",R(7,J)))}function U(t,i){if(t&1&&(o(0,"div",7),F(1,4),s(2,"sh-radio"),l(),n(),o(3,"div",7),F(4,5),s(5,"sh-radio"),l(),n()),t&2){let e=O(2);_("routerLink",p(2,X,e.backupId())),r(3),_("routerLink",p(4,z,e.backupId()))}}function j(t,i){if(t&1&&(o(0,"sh-stepper",6),E(1,B,12,8)(2,U,6,6),n()),t&2){let e=O();r(),g(e.isFileRestore()?1:2)}}var h=class t{#e=c($);#i=c(I);#t=c(C);#o=u(this.#e.params);#n=u(this.#e.url);#s=u(this.#e.children[0].url);backupId=this.#t.backupId;isFileRestore=this.#t.isFileRestore;isProgressPage=f(!1);paramsChanged=N(()=>{let i=this.#s(),e=this.#o()?.id,a=!!this.#n()?.find(S=>S.path==="restore-from-files"),T=!!i?.find(S=>S.path==="progress");this.isProgressPage.set(T),this.#t.init(e,a)});ngOnInit(){this.#i.events.subscribe(i=>{if(i instanceof A){let e=i.urlAfterRedirects;this.isProgressPage.set(e.includes("progress"))}})}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=P({type:t,selectors:[["app-restore-flow"]],hostVars:2,hostBindings:function(e,a){e&2&&D("full-width",a.isProgressPage())},features:[L([C,w])],decls:4,vars:1,consts:()=>{let i;i=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_RADIO: Destination `;let e;e=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_RADIO: Encryption `;let a;a=$localize`${"\uFFFD#8\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_SH_RADIO: Select files `;let T;T=$localize`${"\uFFFD#11\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SH_RADIO: Options `;let S;S=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_RADIO: Select files `;let m;return m=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_RADIO: Options `,[i,e,a,T,S,m,[1,"primary"],["step","","routerLinkActive","active",3,"routerLink"],["step","","routerLinkActive","active",1,"inactive",3,"routerLink"]]},template:function(e,a){e&1&&(s(0,"app-status-bar"),E(1,j,3,1,"sh-stepper",6),o(2,"section"),s(3,"router-outlet"),n()),e&2&&(r(),g(a.isProgressPage()?-1:1))},dependencies:[y,W,k,M,G,v],styles:["[_nghost-%COMP%]{display:block}.full-width[_nghost-%COMP%] section[_ngcontent-%COMP%]{max-width:62.5rem}sh-stepper[_ngcontent-%COMP%]{max-width:31.25rem;margin:2.5rem auto}section[_ngcontent-%COMP%]{max-width:31.25rem;margin:0 auto 2.5rem}.inactive[_ngcontent-%COMP%]{pointer-events:none;opacity:.5}"],changeDetection:0})};export{h as default};
1
+ import{g as C}from"./chunk-2B562XFN.js";import"./chunk-C7RFWM7I.js";import"./chunk-OLOFMEQN.js";import"./chunk-4BGVLUYV.js";import{a as k}from"./chunk-XDECUOQ5.js";import{j as w}from"./chunk-SIXGJYNI.js";import"./chunk-GS5QK7LF.js";import"./chunk-FUE2VIJ7.js";import"./chunk-BTVYI2KD.js";import"./chunk-DU5QSRYH.js";import"./chunk-D2DI6ZER.js";import"./chunk-M77IE672.js";import"./chunk-I5AKUAZF.js";import"./chunk-PJAWWLYW.js";import"./chunk-6Q6SSTBK.js";import"./chunk-RECKKS2S.js";import"./chunk-W4QCGFNO.js";import"./chunk-L4GZJLYK.js";import"./chunk-LJQN4G2O.js";import{b as u}from"./chunk-I2RHQQ3J.js";import"./chunk-F2QQDU4N.js";import"./chunk-XE5OMGTJ.js";import"./chunk-T6C2OUI5.js";import"./chunk-TJ3WIU6Q.js";import"./chunk-KBGIIJMM.js";import{M as W,R as y}from"./chunk-LFRGO2IP.js";import{a as A,b as $,c as M,d as I,e as G,f as v}from"./chunk-LEZL7BSL.js";import"./chunk-4MEL5WTX.js";import"./chunk-5K64UNNB.js";import"./chunk-6DB3NZXR.js";import"./chunk-FPPZ4BUR.js";import{$b as O,Ac as L,Bc as R,Cb as _,Cc as p,Db as o,Eb as n,Fb as s,Ra as r,Sc as N,Tb as F,Ub as l,_ as c,bb as P,kc as D,oa as f,wb as E,xb as g}from"./chunk-FAM42SZT.js";import"./chunk-EUDKD2JW.js";var b=()=>["/restore-from-files/destination"],x=()=>["/restore-from-files/encryption"],H=()=>["/restore-from-files/select-files"],J=()=>["/restore-from-files/options"],X=t=>["/restore",t,"select-files"],z=t=>["/restore",t,"options"];function B(t,i){t&1&&(o(0,"div",7),F(1,0),s(2,"sh-radio"),l(),n(),o(3,"div",7),F(4,1),s(5,"sh-radio"),l(),n(),o(6,"div",8),F(7,2),s(8,"sh-radio"),l(),n(),o(9,"div",8),F(10,3),s(11,"sh-radio"),l(),n()),t&2&&(_("routerLink",R(4,b)),r(3),_("routerLink",R(5,x)),r(3),_("routerLink",R(6,H)),r(3),_("routerLink",R(7,J)))}function U(t,i){if(t&1&&(o(0,"div",7),F(1,4),s(2,"sh-radio"),l(),n(),o(3,"div",7),F(4,5),s(5,"sh-radio"),l(),n()),t&2){let e=O(2);_("routerLink",p(2,X,e.backupId())),r(3),_("routerLink",p(4,z,e.backupId()))}}function j(t,i){if(t&1&&(o(0,"sh-stepper",6),E(1,B,12,8)(2,U,6,6),n()),t&2){let e=O();r(),g(e.isFileRestore()?1:2)}}var h=class t{#e=c($);#i=c(I);#t=c(C);#o=u(this.#e.params);#n=u(this.#e.url);#s=u(this.#e.children[0].url);backupId=this.#t.backupId;isFileRestore=this.#t.isFileRestore;isProgressPage=f(!1);paramsChanged=N(()=>{let i=this.#s(),e=this.#o()?.id,a=!!this.#n()?.find(S=>S.path==="restore-from-files"),T=!!i?.find(S=>S.path==="progress");this.isProgressPage.set(T),this.#t.init(e,a)});ngOnInit(){this.#i.events.subscribe(i=>{if(i instanceof A){let e=i.urlAfterRedirects;this.isProgressPage.set(e.includes("progress"))}})}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=P({type:t,selectors:[["app-restore-flow"]],hostVars:2,hostBindings:function(e,a){e&2&&D("full-width",a.isProgressPage())},features:[L([C,w])],decls:4,vars:1,consts:()=>{let i;i=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_RADIO: Destination `;let e;e=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_RADIO: Encryption `;let a;a=$localize`${"\uFFFD#8\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_SH_RADIO: Select files `;let T;T=$localize`${"\uFFFD#11\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SH_RADIO: Options `;let S;S=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_RADIO: Select files `;let m;return m=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_RADIO: Options `,[i,e,a,T,S,m,[1,"primary"],["step","","routerLinkActive","active",3,"routerLink"],["step","","routerLinkActive","active",1,"inactive",3,"routerLink"]]},template:function(e,a){e&1&&(s(0,"app-status-bar"),E(1,j,3,1,"sh-stepper",6),o(2,"section"),s(3,"router-outlet"),n()),e&2&&(r(),g(a.isProgressPage()?-1:1))},dependencies:[y,W,k,M,G,v],styles:["[_nghost-%COMP%]{display:block}.full-width[_nghost-%COMP%] section[_ngcontent-%COMP%]{max-width:62.5rem}sh-stepper[_ngcontent-%COMP%]{max-width:31.25rem;margin:2.5rem auto}section[_ngcontent-%COMP%]{max-width:31.25rem;margin:0 auto 2.5rem}.inactive[_ngcontent-%COMP%]{pointer-events:none;opacity:.5}"],changeDetection:0})};export{h as default};
@@ -1 +1 @@
1
- import{c as a,d as b}from"./chunk-3L2HST7Q.js";import"./chunk-W2UO5LKI.js";import"./chunk-OLOFMEQN.js";import"./chunk-4BGVLUYV.js";import"./chunk-GS5QK7LF.js";import"./chunk-VKR5DJQG.js";import"./chunk-PJAWWLYW.js";import"./chunk-RECKKS2S.js";import"./chunk-I2RHQQ3J.js";import"./chunk-F2QQDU4N.js";import"./chunk-XE5OMGTJ.js";import"./chunk-TJ3WIU6Q.js";import"./chunk-KBGIIJMM.js";import"./chunk-LFRGO2IP.js";import"./chunk-LEZL7BSL.js";import"./chunk-4MEL5WTX.js";import"./chunk-5K64UNNB.js";import"./chunk-6DB3NZXR.js";import"./chunk-FPPZ4BUR.js";import"./chunk-FAM42SZT.js";import"./chunk-EUDKD2JW.js";export{a as createEncryptionForm,b as default};
1
+ import{c as a,d as b}from"./chunk-2B562XFN.js";import"./chunk-C7RFWM7I.js";import"./chunk-OLOFMEQN.js";import"./chunk-4BGVLUYV.js";import"./chunk-GS5QK7LF.js";import"./chunk-FUE2VIJ7.js";import"./chunk-PJAWWLYW.js";import"./chunk-RECKKS2S.js";import"./chunk-I2RHQQ3J.js";import"./chunk-F2QQDU4N.js";import"./chunk-XE5OMGTJ.js";import"./chunk-TJ3WIU6Q.js";import"./chunk-KBGIIJMM.js";import"./chunk-LFRGO2IP.js";import"./chunk-LEZL7BSL.js";import"./chunk-4MEL5WTX.js";import"./chunk-5K64UNNB.js";import"./chunk-6DB3NZXR.js";import"./chunk-FPPZ4BUR.js";import"./chunk-FAM42SZT.js";import"./chunk-EUDKD2JW.js";export{a as createEncryptionForm,b as default};
@@ -1 +1 @@
1
- import{a as K}from"./chunk-UPGTBICK.js";import"./chunk-UTONS2P4.js";import{g as q}from"./chunk-3L2HST7Q.js";import"./chunk-W2UO5LKI.js";import"./chunk-OLOFMEQN.js";import{b as Z}from"./chunk-LFVCKT5O.js";import"./chunk-4BGVLUYV.js";import"./chunk-GS5QK7LF.js";import"./chunk-VKR5DJQG.js";import"./chunk-66KMXCBD.js";import{a as V}from"./chunk-DU5QSRYH.js";import"./chunk-I5AKUAZF.js";import{a as H}from"./chunk-PJAWWLYW.js";import"./chunk-6Q6SSTBK.js";import{a as j}from"./chunk-RECKKS2S.js";import"./chunk-I2RHQQ3J.js";import"./chunk-F2QQDU4N.js";import"./chunk-XE5OMGTJ.js";import"./chunk-T6C2OUI5.js";import"./chunk-TJ3WIU6Q.js";import{b as B}from"./chunk-KBGIIJMM.js";import{C as W,L as X,O as z,u as J}from"./chunk-LFRGO2IP.js";import{b as w}from"./chunk-LEZL7BSL.js";import"./chunk-4MEL5WTX.js";import"./chunk-5K64UNNB.js";import{qa as k}from"./chunk-6DB3NZXR.js";import"./chunk-FPPZ4BUR.js";import{$b as g,Cb as C,Db as o,Eb as s,Fb as R,Gc as T,Hc as d,Jb as P,Kb as m,Ra as a,Rc as b,Tb as y,Ub as D,Vb as r,Wb as v,Xb as x,_ as c,bb as A,fa as u,ga as f,nc as M,oa as I,qc as N,wb as O,xb as p}from"./chunk-FAM42SZT.js";import"./chunk-EUDKD2JW.js";function Q(n,t){n&1&&(o(0,"div",17),u(),o(1,"svg",19),R(2,"circle",20),s(),f(),o(3,"sh-icon",21),r(4,3),s()())}function U(n,t){n&1&&(o(0,"div",18),u(),o(1,"svg",19),R(2,"circle",20),s(),f(),o(3,"sh-icon",22),r(4,4),s()())}function Y(n,t){if(n&1&&(o(0,"sh-card",10),P(1,16),r(2,2),m(),O(3,Q,5,0,"div",17)(4,U,5,0,"div",18),s()),n&2){let e=g();a(3),p(e.restoreResult()=="success"?3:4)}}function ee(n,t){if(n&1&&(M(0),T(1,"number"),T(2,"number")),n&2){let e,i=g(2);N(" ",d(1,2,(e=i.statusData())==null?null:e.ProcessedFileCount)," of ",d(2,4,(e=i.statusData())==null?null:e.TotalFileCount)," ")}}function te(n,t){n&1&&(P(0),r(1,8),m())}function ne(n,t){if(n&1&&(M(0),T(1,"bytes"),T(2,"bytes")),n&2){let e,i=g(2);N(" ",d(1,2,(e=i.statusData())==null?null:e.ProcessedFileSize)," of ",d(2,4,(e=i.statusData())==null?null:e.TotalFileSize)," ")}}function ie(n,t){n&1&&(P(0),r(1,9),m())}function oe(n,t){if(n&1&&(o(0,"sh-card",10)(1,"h3"),y(2,5),R(3,"sh-spinner",23),D(),s(),o(4,"div",24),R(5,"sh-progress-bar",25),o(6,"p")(7,"span"),r(8,6),s(),O(9,ee,3,6)(10,te,2,0,"ng-container"),s(),o(11,"p")(12,"span"),r(13,7),s(),O(14,ne,3,6)(15,ie,2,0,"ng-container"),s()()()),n&2){let e,i,l,E,S=g();a(3),v((e=S.statusData())==null?null:e.statusText),x(2),a(2),C("value",(i=S.statusData())==null?null:i.OverallProgress),a(4),p((l=S.statusData())!=null&&l.ProcessedFileCount?9:10),a(5),p((E=S.statusData())!=null&&E.ProcessedFileSize?14:15)}}var G=class n{#o=c(B);#s=c(H);#t=c(V);#n=c(q);#r=c(w);statusData=this.#t.statusData;backupId=this.#n.backupId;restoreResult=I("");#e=null;lastRestoreStarted=b(()=>{if(this.#e)return this.#e;let t=this.#t.statusData()?.backup?.Backup?.Metadata?.LastRestoreStarted??null;if(!t)return null;let e=this.fixDate(t);return this.#e=e,e});notificationFilterPredicate=()=>{let t=this.lastRestoreStarted();return{predicate:e=>(e.BackupID===this.#n.backupId()&&t&&t.getTime()<=new Date(e.Timestamp).getTime())??!1}};ngOnInit(){let t=this.#r.snapshot.params.taskid?.toString()??"";this.#o.getApiV1TaskByTaskid({taskid:t}).subscribe({next:e=>{if(e.TaskStarted&&(this.#e=new Date(e.TaskStarted)),!e.TaskFinished&&e.ID){this.#_(e.ID);return}this.#i(e)},error:e=>{console.error("Error fetching task:",e),this.restoreResult.set("error"),alert("Failed to fetch task details. Please try again later.")}})}#_(t){this.#s.waitForTaskToComplete(t).subscribe(e=>{this.#i(e)})}#i(t){t.TaskFinished!=null&&this.restoreResult.set(t.Status==="Completed"&&t.ErrorMessage==null?"success":"error")}fixDate(t){return new Date(`${t.slice(0,4)}-${t.slice(4,6)}-${t.slice(6,8)}T${t.slice(9,11)}:${t.slice(11,13)}:${t.slice(13,15)}Z`)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=A({type:n,selectors:[["app-restore-progress"]],decls:12,vars:6,consts:()=>{let t;t=$localize`Notifications`;let e;e=$localize`Logs`;let i;i=$localize`Restore completed`;let l;l=$localize`check-bold`;let E;E=$localize`warning-octagon`;let S;S=$localize` Restore progress: ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#3\uFFFD"}:START_TAG_SH_SPINNER:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SH_SPINNER:`;let h;h=$localize`Files processed:`;let F;F=$localize`Size processed:`;let L;L=$localize`N/A`;let $;return $=$localize`N/A`,[t,e,i,l,E,S,h,F,L,$,[1,"progress","type-a"],[1,"notifications","type-a"],[1,"notification-list"],[3,"notificationFilterPredicate"],[1,"logs","type-a"],[3,"asSimpleList","polling","whenFilter","backupIdFilter"],["title",""],[1,"complete-success"],[1,"complete-failure"],[1,"border-svg"],["cx","50","cy","50","r","45",1,"border-circle"],[1,"success"],[1,"error"],[1,"primary"],[1,"progress-content"],[3,"value"]]},template:function(e,i){if(e&1&&(o(0,"section"),O(1,Y,5,1,"sh-card",10)(2,oe,16,4,"sh-card",10),o(3,"sh-card",11)(4,"h3"),r(5,0),s(),o(6,"div",12),R(7,"app-notifications",13),s()(),o(8,"sh-card",14)(9,"h3"),r(10,1),s(),R(11,"app-logs-live",15),s()()),e&2){let l;a(),p(i.restoreResult()!=""?1:2),a(6),C("notificationFilterPredicate",i.notificationFilterPredicate()),a(4),C("asSimpleList",!0)("polling",i.restoreResult()=="")("whenFilter",(l=i.lastRestoreStarted())==null?null:l.getTime())("backupIdFilter",i.backupId())}},dependencies:[K,X,z,J,W,Z,j,k],styles:['[_nghost-%COMP%]{display:block;padding:0 1.25rem;margin-top:32px}section[_ngcontent-%COMP%]{display:grid;gap:1.25rem;grid-template-columns:2fr 1fr;grid-template-areas:"progress notifications" "logs logs"}section[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin-bottom:1rem}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%]{grid-area:progress}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%]:has(.complete-check){display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1.25rem}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%] sh-spinner[_ngcontent-%COMP%]{--spinner-size: 1.25rem;--spinner-thickness: .1875rem}section[_ngcontent-%COMP%] .notifications[_ngcontent-%COMP%]{grid-area:notifications}section[_ngcontent-%COMP%] .logs[_ngcontent-%COMP%]{grid-area:logs}section[_ngcontent-%COMP%] .logs[_ngcontent-%COMP%] app-logs-live[_ngcontent-%COMP%]{max-height:50rem;overflow:auto}.notification-list[_ngcontent-%COMP%]{max-height:15rem;overflow:auto}.complete-success[_ngcontent-%COMP%]{position:relative;width:6.25rem;height:6.25rem;display:flex;justify-content:center;align-items:center;color:var(--success-8)}.complete-success[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:2.5rem;opacity:0;animation:_ngcontent-%COMP%_reveal-icon .2s linear forwards;animation-delay:1s}.complete-success[_ngcontent-%COMP%] .border-circle[_ngcontent-%COMP%]{fill:none;stroke:var(--success-8)}.complete-failure[_ngcontent-%COMP%]{position:relative;width:6.25rem;height:6.25rem;display:flex;justify-content:center;align-items:center;color:var(--error-8)}.complete-failure[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:2.5rem;opacity:0;animation:_ngcontent-%COMP%_reveal-icon .2s linear forwards;animation-delay:1s}.complete-failure[_ngcontent-%COMP%] .border-circle[_ngcontent-%COMP%]{fill:none;stroke:var(--error-8)}.border-svg[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%}.border-circle[_ngcontent-%COMP%]{fill:none;stroke-width:.3125rem;stroke-dasharray:282.74;stroke-dashoffset:282.74;animation:_ngcontent-%COMP%_draw-border 1.2s linear forwards}@keyframes _ngcontent-%COMP%_draw-border{to{stroke-dashoffset:0}}@keyframes _ngcontent-%COMP%_reveal-icon{to{opacity:1}}.progress-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.progress-content[_ngcontent-%COMP%] sh-progress-bar[_ngcontent-%COMP%]{margin-bottom:.75rem}.progress-content[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{margin-right:.25rem}'],changeDetection:0})};export{G as default};
1
+ import{a as K}from"./chunk-UPGTBICK.js";import"./chunk-UTONS2P4.js";import{g as q}from"./chunk-2B562XFN.js";import"./chunk-C7RFWM7I.js";import"./chunk-OLOFMEQN.js";import{b as Z}from"./chunk-LFVCKT5O.js";import"./chunk-4BGVLUYV.js";import"./chunk-GS5QK7LF.js";import"./chunk-FUE2VIJ7.js";import"./chunk-66KMXCBD.js";import{a as V}from"./chunk-DU5QSRYH.js";import"./chunk-I5AKUAZF.js";import{a as H}from"./chunk-PJAWWLYW.js";import"./chunk-6Q6SSTBK.js";import{a as j}from"./chunk-RECKKS2S.js";import"./chunk-I2RHQQ3J.js";import"./chunk-F2QQDU4N.js";import"./chunk-XE5OMGTJ.js";import"./chunk-T6C2OUI5.js";import"./chunk-TJ3WIU6Q.js";import{b as B}from"./chunk-KBGIIJMM.js";import{C as W,L as X,O as z,u as J}from"./chunk-LFRGO2IP.js";import{b as w}from"./chunk-LEZL7BSL.js";import"./chunk-4MEL5WTX.js";import"./chunk-5K64UNNB.js";import{qa as k}from"./chunk-6DB3NZXR.js";import"./chunk-FPPZ4BUR.js";import{$b as g,Cb as C,Db as o,Eb as s,Fb as R,Gc as T,Hc as d,Jb as P,Kb as m,Ra as a,Rc as b,Tb as y,Ub as D,Vb as r,Wb as v,Xb as x,_ as c,bb as A,fa as u,ga as f,nc as M,oa as I,qc as N,wb as O,xb as p}from"./chunk-FAM42SZT.js";import"./chunk-EUDKD2JW.js";function Q(n,t){n&1&&(o(0,"div",17),u(),o(1,"svg",19),R(2,"circle",20),s(),f(),o(3,"sh-icon",21),r(4,3),s()())}function U(n,t){n&1&&(o(0,"div",18),u(),o(1,"svg",19),R(2,"circle",20),s(),f(),o(3,"sh-icon",22),r(4,4),s()())}function Y(n,t){if(n&1&&(o(0,"sh-card",10),P(1,16),r(2,2),m(),O(3,Q,5,0,"div",17)(4,U,5,0,"div",18),s()),n&2){let e=g();a(3),p(e.restoreResult()=="success"?3:4)}}function ee(n,t){if(n&1&&(M(0),T(1,"number"),T(2,"number")),n&2){let e,i=g(2);N(" ",d(1,2,(e=i.statusData())==null?null:e.ProcessedFileCount)," of ",d(2,4,(e=i.statusData())==null?null:e.TotalFileCount)," ")}}function te(n,t){n&1&&(P(0),r(1,8),m())}function ne(n,t){if(n&1&&(M(0),T(1,"bytes"),T(2,"bytes")),n&2){let e,i=g(2);N(" ",d(1,2,(e=i.statusData())==null?null:e.ProcessedFileSize)," of ",d(2,4,(e=i.statusData())==null?null:e.TotalFileSize)," ")}}function ie(n,t){n&1&&(P(0),r(1,9),m())}function oe(n,t){if(n&1&&(o(0,"sh-card",10)(1,"h3"),y(2,5),R(3,"sh-spinner",23),D(),s(),o(4,"div",24),R(5,"sh-progress-bar",25),o(6,"p")(7,"span"),r(8,6),s(),O(9,ee,3,6)(10,te,2,0,"ng-container"),s(),o(11,"p")(12,"span"),r(13,7),s(),O(14,ne,3,6)(15,ie,2,0,"ng-container"),s()()()),n&2){let e,i,l,E,S=g();a(3),v((e=S.statusData())==null?null:e.statusText),x(2),a(2),C("value",(i=S.statusData())==null?null:i.OverallProgress),a(4),p((l=S.statusData())!=null&&l.ProcessedFileCount?9:10),a(5),p((E=S.statusData())!=null&&E.ProcessedFileSize?14:15)}}var G=class n{#o=c(B);#s=c(H);#t=c(V);#n=c(q);#r=c(w);statusData=this.#t.statusData;backupId=this.#n.backupId;restoreResult=I("");#e=null;lastRestoreStarted=b(()=>{if(this.#e)return this.#e;let t=this.#t.statusData()?.backup?.Backup?.Metadata?.LastRestoreStarted??null;if(!t)return null;let e=this.fixDate(t);return this.#e=e,e});notificationFilterPredicate=()=>{let t=this.lastRestoreStarted();return{predicate:e=>(e.BackupID===this.#n.backupId()&&t&&t.getTime()<=new Date(e.Timestamp).getTime())??!1}};ngOnInit(){let t=this.#r.snapshot.params.taskid?.toString()??"";this.#o.getApiV1TaskByTaskid({taskid:t}).subscribe({next:e=>{if(e.TaskStarted&&(this.#e=new Date(e.TaskStarted)),!e.TaskFinished&&e.ID){this.#_(e.ID);return}this.#i(e)},error:e=>{console.error("Error fetching task:",e),this.restoreResult.set("error"),alert("Failed to fetch task details. Please try again later.")}})}#_(t){this.#s.waitForTaskToComplete(t).subscribe(e=>{this.#i(e)})}#i(t){t.TaskFinished!=null&&this.restoreResult.set(t.Status==="Completed"&&t.ErrorMessage==null?"success":"error")}fixDate(t){return new Date(`${t.slice(0,4)}-${t.slice(4,6)}-${t.slice(6,8)}T${t.slice(9,11)}:${t.slice(11,13)}:${t.slice(13,15)}Z`)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=A({type:n,selectors:[["app-restore-progress"]],decls:12,vars:6,consts:()=>{let t;t=$localize`Notifications`;let e;e=$localize`Logs`;let i;i=$localize`Restore completed`;let l;l=$localize`check-bold`;let E;E=$localize`warning-octagon`;let S;S=$localize` Restore progress: ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#3\uFFFD"}:START_TAG_SH_SPINNER:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SH_SPINNER:`;let h;h=$localize`Files processed:`;let F;F=$localize`Size processed:`;let L;L=$localize`N/A`;let $;return $=$localize`N/A`,[t,e,i,l,E,S,h,F,L,$,[1,"progress","type-a"],[1,"notifications","type-a"],[1,"notification-list"],[3,"notificationFilterPredicate"],[1,"logs","type-a"],[3,"asSimpleList","polling","whenFilter","backupIdFilter"],["title",""],[1,"complete-success"],[1,"complete-failure"],[1,"border-svg"],["cx","50","cy","50","r","45",1,"border-circle"],[1,"success"],[1,"error"],[1,"primary"],[1,"progress-content"],[3,"value"]]},template:function(e,i){if(e&1&&(o(0,"section"),O(1,Y,5,1,"sh-card",10)(2,oe,16,4,"sh-card",10),o(3,"sh-card",11)(4,"h3"),r(5,0),s(),o(6,"div",12),R(7,"app-notifications",13),s()(),o(8,"sh-card",14)(9,"h3"),r(10,1),s(),R(11,"app-logs-live",15),s()()),e&2){let l;a(),p(i.restoreResult()!=""?1:2),a(6),C("notificationFilterPredicate",i.notificationFilterPredicate()),a(4),C("asSimpleList",!0)("polling",i.restoreResult()=="")("whenFilter",(l=i.lastRestoreStarted())==null?null:l.getTime())("backupIdFilter",i.backupId())}},dependencies:[K,X,z,J,W,Z,j,k],styles:['[_nghost-%COMP%]{display:block;padding:0 1.25rem;margin-top:32px}section[_ngcontent-%COMP%]{display:grid;gap:1.25rem;grid-template-columns:2fr 1fr;grid-template-areas:"progress notifications" "logs logs"}section[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin-bottom:1rem}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%]{grid-area:progress}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%]:has(.complete-check){display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1.25rem}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%] sh-spinner[_ngcontent-%COMP%]{--spinner-size: 1.25rem;--spinner-thickness: .1875rem}section[_ngcontent-%COMP%] .notifications[_ngcontent-%COMP%]{grid-area:notifications}section[_ngcontent-%COMP%] .logs[_ngcontent-%COMP%]{grid-area:logs}section[_ngcontent-%COMP%] .logs[_ngcontent-%COMP%] app-logs-live[_ngcontent-%COMP%]{max-height:50rem;overflow:auto}.notification-list[_ngcontent-%COMP%]{max-height:15rem;overflow:auto}.complete-success[_ngcontent-%COMP%]{position:relative;width:6.25rem;height:6.25rem;display:flex;justify-content:center;align-items:center;color:var(--success-8)}.complete-success[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:2.5rem;opacity:0;animation:_ngcontent-%COMP%_reveal-icon .2s linear forwards;animation-delay:1s}.complete-success[_ngcontent-%COMP%] .border-circle[_ngcontent-%COMP%]{fill:none;stroke:var(--success-8)}.complete-failure[_ngcontent-%COMP%]{position:relative;width:6.25rem;height:6.25rem;display:flex;justify-content:center;align-items:center;color:var(--error-8)}.complete-failure[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:2.5rem;opacity:0;animation:_ngcontent-%COMP%_reveal-icon .2s linear forwards;animation-delay:1s}.complete-failure[_ngcontent-%COMP%] .border-circle[_ngcontent-%COMP%]{fill:none;stroke:var(--error-8)}.border-svg[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%}.border-circle[_ngcontent-%COMP%]{fill:none;stroke-width:.3125rem;stroke-dasharray:282.74;stroke-dashoffset:282.74;animation:_ngcontent-%COMP%_draw-border 1.2s linear forwards}@keyframes _ngcontent-%COMP%_draw-border{to{stroke-dashoffset:0}}@keyframes _ngcontent-%COMP%_reveal-icon{to{opacity:1}}.progress-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.progress-content[_ngcontent-%COMP%] sh-progress-bar[_ngcontent-%COMP%]{margin-bottom:.75rem}.progress-content[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{margin-right:.25rem}'],changeDetection:0})};export{G as default};
@@ -1 +1 @@
1
- import{d as a,e as b,f as c,g as d}from"./chunk-ZOO7P75U.js";import"./chunk-GS5QK7LF.js";import"./chunk-VKR5DJQG.js";import"./chunk-BTVYI2KD.js";import"./chunk-6Q6SSTBK.js";import"./chunk-LJQN4G2O.js";import"./chunk-I2RHQQ3J.js";import"./chunk-F2QQDU4N.js";import"./chunk-XE5OMGTJ.js";import"./chunk-KBGIIJMM.js";import"./chunk-LFRGO2IP.js";import"./chunk-LEZL7BSL.js";import"./chunk-4MEL5WTX.js";import"./chunk-5K64UNNB.js";import"./chunk-6DB3NZXR.js";import"./chunk-FPPZ4BUR.js";import"./chunk-FAM42SZT.js";import"./chunk-EUDKD2JW.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-SIXGJYNI.js";import"./chunk-GS5QK7LF.js";import"./chunk-FUE2VIJ7.js";import"./chunk-BTVYI2KD.js";import"./chunk-6Q6SSTBK.js";import"./chunk-LJQN4G2O.js";import"./chunk-I2RHQQ3J.js";import"./chunk-F2QQDU4N.js";import"./chunk-XE5OMGTJ.js";import"./chunk-KBGIIJMM.js";import"./chunk-LFRGO2IP.js";import"./chunk-LEZL7BSL.js";import"./chunk-4MEL5WTX.js";import"./chunk-5K64UNNB.js";import"./chunk-6DB3NZXR.js";import"./chunk-FPPZ4BUR.js";import"./chunk-FAM42SZT.js";import"./chunk-EUDKD2JW.js";export{a as SCHEDULE_DEFAULT_OPTIONS,c as SCHEDULE_FIELD_DEFAULTS,d as default,b as scheduleOptionToSchedule};
@@ -1 +1 @@
1
- import{a as Pt}from"./chunk-MZMEFIHU.js";import{a as Ot}from"./chunk-XDECUOQ5.js";import{a as ht}from"./chunk-NOHHRZSK.js";import"./chunk-DU5QSRYH.js";import"./chunk-D2DI6ZER.js";import"./chunk-M77IE672.js";import"./chunk-I5AKUAZF.js";import"./chunk-PJAWWLYW.js";import"./chunk-6Q6SSTBK.js";import"./chunk-RECKKS2S.js";import{a as ie}from"./chunk-W4QCGFNO.js";import"./chunk-L4GZJLYK.js";import{a as X}from"./chunk-LJQN4G2O.js";import"./chunk-I2RHQQ3J.js";import{a as Mt}from"./chunk-F2QQDU4N.js";import{a as ft}from"./chunk-XE5OMGTJ.js";import"./chunk-T6C2OUI5.js";import{a as rt,b as Tt}from"./chunk-TJ3WIU6Q.js";import{b as ne}from"./chunk-KBGIIJMM.js";import{B as J,E as ct,G as gt,H as te,L as Ct,M as pt,N as Et,P as ut,W as Nt,Y as mt,c as j,e as K,i as Q,m as dt,s as Y,t as Z,u as k,w as ee,z as St}from"./chunk-LFRGO2IP.js";import"./chunk-LEZL7BSL.js";import"./chunk-4MEL5WTX.js";import"./chunk-5K64UNNB.js";import"./chunk-6DB3NZXR.js";import"./chunk-FPPZ4BUR.js";import{$b as d,B as b,Bc as V,Cb as m,Db as o,Eb as i,Fb as h,H as R,Mb as f,Oa as tt,Ra as _,Rc as w,Sc as x,Tb as G,Ub as y,Vb as l,Wb as B,Xb as H,Yb as W,Yc as _t,Zb as c,_ as P,a as Ye,b as Ze,bb as D,c as et,da as p,ea as E,gb as le,gc as st,hb as nt,hc as at,kc as M,n as F,nc as $,oa as S,oc as q,pc as _e,rb as it,sb as ot,sc as A,tc as v,uc as L,wb as g,xb as C,yc as lt}from"./chunk-FAM42SZT.js";import"./chunk-EUDKD2JW.js";var $t=["formRef"],At=()=>[import("./chunk-7KUVROHU.js").then(s=>s.OptionsListComponent)];function vt(s,t){s&1&&(o(0,"sh-alert",3),l(1,1),i())}function Lt(s,t){if(s&1){let e=f();o(0,"app-options-list",5),L("optionsChange",function(a){p(e);let T=d();return v(T.settings,a)||(T.settings=a),E(a)}),i()}if(s&2){let e=d();A("options",e.settings),m("hasFreeTextSettings",!0)}}var z=class s{#e=P(X);#n=P(ne);formRef=_t.required("formRef");settings=S([]);isSubmitting=S(!1);isLoadingOptions=S(!0);saved=S(!1);lastRecievedServerSettings=S({});serverSettingsEffect=x(()=>{let t=this.#e.serverSettings();if(t===void 0)return;this.lastRecievedServerSettings.set(t),this.isLoadingOptions.set(!0);let e=Object.entries(t);e.forEach(([n,a],T)=>{if(n.startsWith("--")){let N=n.substring(2);this.settings.update(u=>(u.some(O=>O.Name===N)||u.push({Name:N,Value:a}),u))}T===e.length-1&&this.isLoadingOptions.set(!1)})});submit(){this.isSubmitting.set(!0);let t=this.settings(),e=this.lastRecievedServerSettings(),n=t.map(u=>u.Name),T=Object.keys(e).filter(u=>u.startsWith("--")).filter(u=>!n.includes(u.replace("--",""))),N=t.reduce((u,O)=>{let I=O.Name?.startsWith("--")?O.Name:`--${O.Name}`;return u[I]=O.Value,u},{});T.forEach(u=>{N[u]=null}),this.#n.patchApiV1Serversettings({requestBody:N}).pipe(R(()=>this.isSubmitting.set(!1))).subscribe({next:()=>{this.#e.refreshServerSettings(),this.saved.set(!0),setTimeout(()=>{this.saved.set(!1)},3e3)}})}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=D({type:s,selectors:[["app-advanced-options-settings"]],viewQuery:function(e,n){e&1&&st(n.formRef,$t,5),e&2&&at()},decls:8,vars:4,consts:()=>{let t;t=$localize`${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:floppy-disk${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON: Save settings `;let e;return e=$localize`Settings saved`,[t,e,[1,"actions"],[1,"success"],["shButton","","type","button",1,"raised","primary",3,"click"],[3,"optionsChange","options","hasFreeTextSettings"]]},template:function(e,n){e&1&&(o(0,"div",2),g(1,vt,2,0,"sh-alert",3),o(2,"button",4),c("click",function(){return n.submit()}),G(3,0),h(4,"sh-icon"),y(),i()(),nt(5,Lt,1,2),it(6,5,At)),e&2&&(_(),C(n.saved()?1:-1),_(),M("loader",n.isSubmitting()),_(4),ot(!n.isLoadingOptions()))},dependencies:[Z,J,k,ee],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:40.625rem;justify-self:flex-end}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;justify-content:flex-end;margin-bottom:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 2.5rem;gap:.5rem;align-items:flex-end}.remote-volume-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.remote-volume-wrap[_ngcontent-%COMP%] p.warning[_ngcontent-%COMP%]{color:#7d7d00}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.advanced-option[_ngcontent-%COMP%]{display:grid;gap:.5rem;grid-template-columns:1fr 1fr 2.5rem;align-items:flex-end}"],changeDetection:0})};function bt(s,t){if(s&1){let e=f();o(0,"sh-form-field",12)(1,"input",13),L("ngModelChange",function(a){p(e);let T=d(2);return v(T.registerUrl,a)||(T.registerUrl=a),E(a)}),i()(),o(2,"button",14),c("click",function(){p(e);let a=d(2);return E(a.register())}),l(3,0),i()}if(s&2){let e=d(2);_(),A("ngModel",e.registerUrl)}}function wt(s,t){if(s&1&&(o(0,"div",9)(1,"label"),l(2,1),i(),o(3,"a",15),$(4),i()()),s&2){let e=d(2);_(3),m("href",lt(e.claimUrl()),tt),_(),q(e.claimUrl())}}function Dt(s,t){s&1&&(o(0,"div",9)(1,"label"),l(2,2),i()())}function xt(s,t){if(s&1){let e=f();o(0,"button",14),c("click",function(){p(e);let a=d(2);return E(a.cancel())}),l(1,3),i()}}function kt(s,t){if(s&1){let e=f();o(0,"button",14),c("click",function(){p(e);let a=d(2);return E(a.disable())}),l(1,4),i()}}function Jt(s,t){if(s&1){let e=f();o(0,"button",14),c("click",function(){p(e);let a=d(2);return E(a.enable())}),l(1,5),i(),o(2,"button",16),c("click",function(){p(e);let a=d(2);return E(a.delete())}),l(3,6),i()}}function Xt(s,t){s&1&&(G(0,7,1),h(1,"sh-icon"),y())}function Vt(s,t){s&1&&(G(0,7,2),h(1,"sh-icon"),y())}function zt(s,t){if(s&1){let e=f();o(0,"sh-chip",17),c("click",function(){p(e);let a=d(2);return E(a.copyReportingUrl())}),G(1,7),g(2,Xt,2,0,"sh-icon")(3,Vt,2,0,"sh-icon"),y(),i()}if(s&2){let e=d(2);_(2),C(e.copiedReportingUrl()===!0?2:3)}}function Ut(s,t){if(s&1&&(o(0,"div",8),g(1,bt,4,1),g(2,wt,5,3,"div",9),g(3,Dt,3,0,"div",9),g(4,xt,2,0,"button",10),g(5,kt,2,0,"button",10),g(6,Jt,4,0),g(7,zt,4,1,"sh-chip",11),i()),s&2){let e=d();_(),C(e.state()==="inactive"?1:-1),_(),C(e.state()==="registered"?2:-1),_(),C(e.state()==="registering"?3:-1),_(),C(e.state()==="registering"||e.state()==="registeringfaulted"||e.state()==="registered"?4:-1),_(),C(e.state()==="connected"||e.state()==="connecting"?5:-1),_(),C(e.state()==="disabled"?6:-1),_(),C(e.additionalReportingUrl()!==""?7:-1)}}var oe=class s{#e=P(ie);#n=P(X);state=this.#e.state;claimUrl=this.#e.claimUrl;registerUrl=this.#e.registerUrl;additionalReportingUrl=w(()=>{let t=this.#n.serverSettings();return this.#e.state()==="inactive"?"":t&&t["additional-report-url"]||""});copiedReportingUrl=S(!1);ngOnInit(){this.#e.refreshRemoteControlStatus()}cancel(){this.#e.cancelRemoteRegistration()}register(){this.#e.beginRemoteRegistration()}disable(){this.#e.disableRemoteControl()}enable(){this.#e.enableRemoteControl()}delete(){this.#e.deleteRemoteControl()}copyReportingUrl(){let t=this.additionalReportingUrl();t&&(this.copiedReportingUrl.set(!0),setTimeout(()=>this.copiedReportingUrl.set(!1),2e3),navigator.clipboard.writeText(t))}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=D({type:s,selectors:[["app-remote-control"]],decls:1,vars:1,consts:()=>{let t;t=$localize`Register on console`;let e;e=$localize`Machine is now registered, open this link to add it to your account:`;let n;n=$localize`Registering, please wait...`;let a;a=$localize`Cancel registration`;let T;T=$localize`Disable console connection`;let N;N=$localize`Enable console connection`;let u;u=$localize` Delete console connection setup `;let O;return O=$localize` Reporting configured by server ${"\uFFFD*2: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:${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3: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:${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,O=W(O),[t,e,n,a,T,N,u,O,[1,"field-row"],[1,"field-col"],["type","button","shButton","",1,"raised"],[1,"reporting-url","primary","simple"],["label","Registration URL","for","remoteControlRegisterUrl"],["type","text","sh-input","","id","remoteControlRegisterUrl","name","remoteControlRegisterUrl",3,"ngModelChange","ngModel"],["type","button","shButton","",1,"raised",3,"click"],["target","_blank",3,"href"],["type","button","shButton","",1,"raised","error",3,"click"],[1,"reporting-url","primary","simple",3,"click"]]},template:function(e,n){e&1&&g(0,Ut,8,7,"div",8),e&2&&C(n.state()!=="unknown"?0:-1)},dependencies:[Y,j,K,Q,te,J,ct,k],styles:["[_nghost-%COMP%]{display:block}[_nghost-%COMP%] button[_ngcontent-%COMP%]{white-space:nowrap}.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}"],changeDetection:0})};function Gt(...s){let t=S(...s);return Object.defineProperty(t,"value",{get:t.asReadonly(),set:t.set.bind(t)})}var se=()=>({standalone:!0});function Bt(s,t){s&1&&(o(0,"label"),l(1,34),i())}function Ht(s,t){s&1&&(o(0,"label"),l(1,35),i())}function Wt(s,t){if(s&1){let e=f();o(0,"section")(1,"div",52)(2,"h3"),l(3,32),i(),o(4,"p"),l(5,33),i()(),o(6,"div",53)(7,"sh-toggle",63),c("click",function(){p(e);let a=d(2);return E(a.toggleConsoleControl())}),g(8,Bt,2,0,"label")(9,Ht,2,0,"label"),i()()()}if(s&2){let e=d(2);_(7),M("active",!e.consoleControlDisabled()),_(),C(e.consoleControlDisabled()?8:9)}}function qt(s,t){if(s&1&&(o(0,"section")(1,"div",52)(2,"h3"),l(3,31),i(),o(4,"p"),$(5),i()(),o(6,"div",53),h(7,"app-remote-control"),i()(),g(8,Wt,10,3,"section")),s&2){let e=d();_(5),q(e.remoteControlStatus()),_(3),C(e.remoteControlState()!="inactive"?8:-1)}}function jt(s,t){s&1&&(o(0,"sh-icon",78),$(1,"check"),i())}function Kt(s,t){s&1&&(o(0,"sh-icon",79),$(1,"prohibit"),i())}function Qt(s,t){if(s&1){let e=f();o(0,"button",83),c("click",function(){p(e);let a=d(2);return E(a.updatePassphrase())}),l(1,39),i()}if(s&2){let e=d(2);M("loader",e.isUpdating())}}function Yt(s,t){if(s&1){let e=f();o(0,"button",84),c("click",function(){p(e);let a=d(2);return E(a.updatePassphrase())}),l(1,40),i()}if(s&2){let e=d(2);M("loader",e.isUpdating()),m("disabled",!0)}}function Zt(s,t){if(s&1){let e=f();o(0,"sh-form-field")(1,"label",74),l(2,36),i(),o(3,"input",75),L("ngModelChange",function(a){p(e);let T=d();return v(T.passphrase,a)||(T.passphrase=a),E(a)}),i()(),o(4,"sh-form-field")(5,"label",76),l(6,37),i(),o(7,"input",77),L("ngModelChange",function(a){p(e);let T=d();return v(T.repeatPassphrase,a)||(T.repeatPassphrase=a),E(a)}),i(),g(8,jt,2,0,"sh-icon",78)(9,Kt,2,0,"sh-icon",79),i(),o(10,"div",58)(11,"button",80),c("click",function(){p(e);let a=d();return E(a.cancelPasswordChange())}),l(12,38),i(),g(13,Qt,2,2,"button",81)(14,Yt,2,3,"button",82),i()}if(s&2){let e=d();_(3),A("ngModel",e.passphrase),_(4),m("disabled",e.passphrase().length===0),A("ngModel",e.repeatPassphrase),_(),C(e.passphrase().length!==0&&e.passphrase()===e.repeatPassphrase()?8:9),_(3),M("loader",e.isUpdating()),_(2),C(e.passphrase().length!==0&&e.passphrase()===e.repeatPassphrase()?13:14)}}function en(s,t){s&1&&(o(0,"sh-icon",85),$(1,"check"),i())}function tn(s,t){if(s&1){let e=f();o(0,"div",58)(1,"button",80),c("click",function(){p(e);let a=d();return E(a.openPassphraseForm())}),l(2,41),i(),g(3,en,2,0,"sh-icon",85),i()}if(s&2){let e=d();_(3),C(e.passwordUpdated()?3:-1)}}function nn(s,t){if(s&1){let e=f();o(0,"sh-form-field")(1,"label",86),l(2,42),i(),o(3,"textarea",87),L("ngModelChange",function(a){p(e);let T=d();return v(T.allowedHostnames,a)||(T.allowedHostnames=a),E(a)}),i()(),o(4,"sh-alert",88),l(5,43),i(),o(6,"button",83),c("click",function(){p(e);let a=d();return E(a.updateAllowedHostnames())}),l(7,44),i()}if(s&2){let e=d();_(3),A("ngModel",e.allowedHostnames),_(3),M("loader",e.updatingAllowedHosts())}}function on(s,t){if(s&1){let e=f();o(0,"section")(1,"div",52)(2,"h3"),l(3,45),i(),o(4,"p"),l(5,46),i()(),o(6,"div",53)(7,"sh-select",89)(8,"input",60),c("ngModelChange",function(a){p(e);let T=d();return E(T.updatePowerMode(a))}),i()()()()}if(s&2){let e=d();_(7),m("options",e.powerModeOptions())("isClearable",!1),_(),m("ngModel",e.powerModeCtrl())("ngModelOptions",V(4,se))}}function sn(s,t){if(s&1&&(o(0,"p"),l(1,47),i()),s&2){let e,n=d();_(),B((e=n.sysinfo())==null?null:e.ServerVersionName),H(1)}}function an(s,t){s&1&&h(0,"sh-progress-bar",64)}function ln(s,t){if(s&1&&$(0),s&2){let e=t.$implicit;_e(" ",e.label," ")}}function _n(s,t){if(s&1&&$(0),s&2){let e=t.$implicit;_e(" ",e.label," ")}}function rn(s,t){if(s&1){let e=f();o(0,"section")(1,"div",52)(2,"h3"),l(3,48),i(),o(4,"p"),G(5,49),h(6,"a",90)(7,"br")(8,"br"),y(),i()(),o(9,"div",53)(10,"sh-select",91)(11,"input",60),c("ngModelChange",function(a){p(e);let T=d();return E(T.updateUsageStatistics(a))}),i(),le(12,_n,1,1,"ng-template"),i()()()}if(s&2){let e=d();_(10),m("options",e.usageStatisticsOptions())("isLoading",e.updatingUsageStatistics()),_(),m("ngModel",e.usageStatistics())("ngModelOptions",V(4,se))}}function Tn(s,t,e){let n=Gt(s),a=n[Ye];e?.equal&&(a.equal=e.equal);let T;return n.set=N=>{clearTimeout(T),T=setTimeout(()=>Ze(a,N),t)},n.update=N=>{clearTimeout(T),T=setTimeout(()=>et(a,N),t)},n}var dn=[{value:"none",label:$localize`None`},{value:"s",label:$localize`Seconds`},{value:"m",label:$localize`Minutes`},{value:"h",label:$localize`Hours`}],yt=[{value:"none",label:$localize`System default ($value)`},{value:"information",label:$localize`Usage statistics, warnings, errors, and crashes`},{value:"warning",label:$localize`Warnings, errors and crashes`},{value:"error",label:$localize`Errors and crashes`},{value:"crash",label:$localize`Crashes only`},{value:"disabled",label:$localize`None / disabled`}],re=class s{#e=P(St);#n=P(Pt);#i=P(ft);#t=P(ne);#o=P(X);#s=P(ie);#_=P(Tt);#a=P(rt);#l=this.#a.getItem("locale")??"en-US";sysinfo=this.#i.systemInfo;isDarkMode=this.#n.isDarkMode;editAs=S("list");previousLang=this.#l;langCtrl=S(this.#l);powerModeCtrl=S("");usageStatistics=S("");updatingUsageStatistics=S(!1);remoteControlStatus=this.#s.status;remoteControlState=this.#s.state;updatingChannel=S(!1);updateChannel=S("");isUsingRelay=this.#_.relayIsEnabled;usageStatisticsDisabled=w(()=>(this.#i.systemInfo()?.DefaultUsageReportLevel??"").toLowerCase()==="disabled");#T=x(()=>{let t=this.#i.systemInfo()?.DefaultUsageReportLevel??"",e=yt;e[0].label=$localize`System default (${t})`,this.usageStatisticsOptions.set(e)});setNewChannel(t){let e=this.updateChannel();this.updateChannel.set(t),this.#t.patchApiV1Serversettings({requestBody:{"update-channel":t}}).pipe(R(()=>this.updatingChannel.set(!1)),b(()=>(this.updateChannel.set(e),F(null)))).subscribe()}allowRemoteAccess=S(!1);allowedHostnames=S("");loadedAllowedHostnames=S("");updatingRemoteAccess=S(!1);updatingAllowedHosts=S(!1);updatingConsoleControl=S(!1);consoleControlDisabled=S(!1);updateRemoteAccess(){let t=this.allowRemoteAccess(),e=!t;this.allowRemoteAccess.set(e),this.#t.patchApiV1Serversettings({requestBody:{"server-listen-interface":e?"any":"loopback"}}).pipe(R(()=>this.updatingRemoteAccess.set(!1)),b(()=>(this.allowRemoteAccess.set(t),F(null)))).subscribe()}updateAllowedHostnames(){let t=this.loadedAllowedHostnames(),e=this.allowedHostnames();this.updatingAllowedHosts.set(!0),this.#t.patchApiV1Serversettings({requestBody:{"server-listen-interface":"any","allowed-hostnames":e}}).pipe(R(()=>this.updatingAllowedHosts.set(!1)),b(()=>(this.allowedHostnames.set(t),F(null)))).subscribe()}toggleConsoleControl(){let t=this.consoleControlDisabled(),e=!t;this.updatingConsoleControl.set(!0),this.consoleControlDisabled.set(e),this.#t.patchApiV1Serversettings({requestBody:{"disable-console-control":e?"True":"False"}}).pipe(R(()=>this.updatingConsoleControl.set(!1)),b(()=>(this.consoleControlDisabled.set(t),F(null)))).subscribe()}updatingDisableTrayIconLogin=S(!1);disableTrayIconLogin=S(!1);saveDisableTrayIconLogin(){let t=this.disableTrayIconLogin(),e=!t;this.updatingDisableTrayIconLogin.set(!0),this.disableTrayIconLogin.set(e),this.#t.patchApiV1Serversettings({requestBody:{"disable-tray-icon-login":e?"True":"False"}}).pipe(R(()=>this.updatingDisableTrayIconLogin.set(!1)),b(()=>(this.disableTrayIconLogin.set(t),F(null)))).subscribe()}showPassphraseForm=S(!1);isUpdating=S(!1);passphrase=S("");repeatPassphrase=S("");passwordUpdated=S(!1);updatePassphrase(){this.passphrase()===this.repeatPassphrase()&&(this.isUpdating.set(!0),this.#t.patchApiV1Serversettings({requestBody:{"server-passphrase":this.passphrase()}}).pipe(R(()=>this.isUpdating.set(!1))).subscribe({next:()=>{this.showPassphraseForm.set(!1),this.passwordUpdated.set(!0),setTimeout(()=>{this.passwordUpdated.set(!1)},3e3)}}))}openPassphraseForm(){this.showPassphraseForm.set(!0)}cancelPasswordChange(){this.showPassphraseForm.set(!1)}languageOptions=S(ht);powerModeOptions=w(()=>{let t=this.#i.systemInfo();return!t?.PowerModeProviders||t.PowerModeProviders.filter(e=>e!==""&&e!=="None").length==0?[]:t.PowerModeProviders.map(e=>({value:e==""?"default":e,label:e===""?$localize`Default`:e}))});usageStatisticsOptions=S(yt);timeTypeOptions=S(dn);timeType=S("none");timeValue=Tn(0,300);timeRange=w(()=>this.timeType()==="h"?[0,24]:[0,60]);timeValueEffect=x(()=>{let t=this.timeValue(),e=this.#o.serverSettings();!e||e["startup-delay"]===""&&this.timeType()==="none"||this.updateStartupDelay()});updateLocale(t){!t||t===""||t===this.previousLang||(this.#a.setItem("locale",t),window.location.reload())}updateStartupDelay(){let t=this.timeValue(),e=this.timeType(),n="";e!=="none"&&t!==0&&(n=`${t}${e}`),this.#t.patchApiV1Serversettings({requestBody:{"startup-delay":n}}).subscribe()}updateTimeType(t){this.timeType()==="none"&&this.timeValue.set(0),this.timeType.set(t)}updateUsageStatistics(t){let e=this.usageStatistics();!t||t===""||t===e||(this.usageStatistics.set(t),this.updatingUsageStatistics.set(!0),this.#t.patchApiV1Serversettings({requestBody:{"usage-reporter-level":this.usageStatistics()==="none"?"":this.usageStatistics()}}).pipe(R(()=>this.updatingUsageStatistics.set(!1)),b(()=>(this.usageStatistics.set(e),F(null)))).subscribe())}updatePowerMode(t){let e=this.powerModeCtrl();e!==t&&(t==="default"&&(t=""),this.#t.patchApiV1Serversettings({requestBody:{"power-mode-provider":t||""}}).pipe(b(()=>(this.powerModeCtrl.set(e),F(null)))).subscribe())}serverSettingsEffect=x(()=>{let t=this.#o.serverSettings();if(t===void 0)return;let e=t["startup-delay"],n=e.slice(-1),a=e.slice(0,-1),T=["s","m","h"];this.disableTrayIconLogin.set(t["disable-tray-icon-login"]!=="False"),this.updateChannel.set(t["update-channel"]),this.allowRemoteAccess.set(t["server-listen-interface"]==="any"),this.allowedHostnames.set(t["allowed-hostnames"]),this.loadedAllowedHostnames.set(t["allowed-hostnames"]),this.consoleControlDisabled.set(t["disable-console-control"]==="True"),this.usageStatistics.set(t["usage-reporter-level"]===""?"none":t["usage-reporter-level"]),this.timeType.set(e==""?"none":T.includes(n)?n:"none"),this.timeValue.set(e==""?0:parseInt(a));let N=t["power-mode-provider"]===""||t["power-mode-provider"]==null?"default":t["power-mode-provider"];this.powerModeCtrl.set(N)});setDarkMode(){this.#n.setDarkMode()}setLightMode(){this.#n.setLightMode()}changeDefaultClientTo(t){this.#e.open(Mt,{data:{title:$localize`Use legacy UI`,message:$localize`Are you sure you want to use the legacy user interface, not recommended unless you have a specific reason?`,confirmText:$localize`Use legacy`,cancelText:$localize`Cancel`},closed:e=>{e&&(this.#r(t),window.location.replace(`/${t}`))}})}#r(t){var e=new Date;e.setTime(e.getTime()+2160*60*60*1e3),document.cookie="default-client="+t+"; expires="+e.toUTCString()+"; path=/"}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=D({type:s,selectors:[["app-settings"]],decls:123,vars:43,consts:()=>{let t;t=$localize`Settings`;let e;e=$localize`Configure your backup settings.`;let n;n=$localize`Color theme`;let a;a=$localize`Customize your application theme`;let T;T=$localize`Passwords`;let N;N=$localize`Change server passphrase`;let u;u=$localize`Language`;let O;O=$localize`Select a language for the platform`;let I;I=$localize`Use legacy interface`;let Te;Te=$localize`Use the old user interface, not recommended unless you have a specific reason.`;let de;de=$localize`${"\uFFFD#46\uFFFD"}:START_TAG_SH_ICON:swap${"\uFFFD/#46\uFFFD"}:CLOSE_TAG_SH_ICON: Use legacy UI `;let Se;Se=$localize`Allow remote access (requires restart)`;let ce;ce=$localize` By allowing remote access, the server listens to requests from any machine on your network. If you enable this option, make sure you are always using the computer on a secure firewall protected network. `;let ge;ge=$localize`Allow remote access`;let Ce;Ce=$localize`Prevent tray icon automatic log-in`;let pe;pe=$localize` By default, the tray icon will open the user interface with a token that unlocks the user interface. This ensures that you can access the user interface from the tray icon, while requiring others to enter a password. If you prefer having to type in the password, even when accessing the user interface from the tray icon, enable this option. `;let Ee;Ee=$localize`Prevent tray icon automatic log-in`;let ue;ue=$localize`Update channel`;let Ne;Ne=$localize` Default (${"\uFFFD0\uFFFD"}:INTERPOLATION:) `;let me;me=$localize`Same as the base install version: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let fe;fe=$localize`Stable`;let Me;Me=$localize`Official stable release.`;let Pe;Pe=$localize`Beta`;let Oe;Oe=$localize` Try out the new features that we are working on. Test a backup and restore before using this in production environments. `;let he;he=$localize` Experimental `;let Ie;Ie=$localize`Early previews of new features. Not for use with important data.`;let Re;Re=$localize`Canary`;let Ge;Ge=$localize`Builds for developers and testers only. Not for use with important data.`;let ye;ye=$localize`Pause after startup or hibernation`;let $e;$e=$localize` Duplicati will run when started, but will remain in paused state for the duration. Duplicati will occupy minimal system resources and no backups will be run. `;let Ae;Ae=$localize`Advanced options`;let ve;ve=$localize`Connect to console`;let Le;Le=$localize`Disable console control`;let Fe;Fe=$localize` Disabling console control will disable remote access to this machine from the console, but will keep the registration intact and allow pushing settings from the console. `;let be;be=$localize`Remote control disabled`;let we;we=$localize`Remote control enabled`;let De;De=$localize`Enter new password`;let xe;xe=$localize`Repeat password`;let ae;ae=$localize`Password have to be filled and have to match`;let ke;ke=$localize`Passphrase`;let Je;Je=$localize`Repeat passphrase`;let Xe;Xe=$localize`Cancel`;let Ve;Ve=$localize` Update passphrase `;let ze;ze=$localize` Update passphrase `;let Ue;Ue=$localize`Change password`;let Be;Be=$localize`Allowed hostnames`;let He;He=$localize` To prevent various DNS based attacks, Duplicati limits the allowed hostnames to the ones listed here. Direct IP access and localhost is always allowed. Multiple hostnames can be supplied with a semicolon separator. If any of the allowed hostnames is an asterisk (*), all hostnames are allowed and this feature is disabled. If the field is empty, only IP address and localhost access is allowed. `;let We;We=$localize` Update allowed hostnames `;let qe;qe=$localize`Power mode provider`;let je;je=$localize` The power mode provider monitors the system for when it enters a low power state and pauses Duplicati. When the system resumes, Duplicati will resume as well. Choosing the None option disables detection of low power states and Duplicati will run all the time. `;let Ke;Ke=$localize`Installed version: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Qe;Qe=$localize`Usage statistics`;let U;return U=$localize` Usage reports help us improve the user experience and evaluate impact of new features. We use them to generate ${"\uFFFD#6\uFFFD"}:START_LINK:public usage statistics.${"\uFFFD/#6\uFFFD"}:CLOSE_LINK:${"[\uFFFD#7\uFFFD\uFFFD/#7\uFFFD|\uFFFD#8\uFFFD\uFFFD/#8\uFFFD]"}:LINE_BREAK:${"[\uFFFD#7\uFFFD\uFFFD/#7\uFFFD|\uFFFD#8\uFFFD\uFFFD/#8\uFFFD]"}:LINE_BREAK: All usage reports are sent anonymously and do not contain any personal information. They contain information about hardware and operating system, the type of backend, backup duration, overall size of source data and similar data. They do not contain paths, filenames, usernames, passwords or similar sensitive information. `,U=W(U),[t,e,n,a,T,N,u,O,I,Te,de,Se,ce,ge,Ce,pe,Ee,ue,Ne,me,fe,Me,Pe,Oe,he,Ie,Re,Ge,ye,$e,Ae,ve,Le,Fe,be,we,ke,Je,Xe,Ve,ze,Ue,Be,He,We,qe,je,Ke,Qe,U,[1,"content"],[1,"title"],[1,"left"],[1,"right"],[1,"themes"],["src","assets/images/light-theme.png","alt","light theme",3,"click"],["src","assets/images/dark-theme.png","alt","dark theme",3,"click"],[1,"right","passphrase-form"],[1,"actions"],["value","value","label","label",3,"options","isClearable","inlineSearch"],["type","text",3,"ngModelChange","ngModel","ngModelOptions"],["shButton","",1,"primary",3,"click"],[1,"right","remote-access-form"],[1,"primary","raised",3,"click"],[1,"indeterminate","primary"],[1,"right","radios"],[1,"radio-option",3,"click"],[1,"primary","raised"],[1,"field-row"],[1,"raised","primary",3,"unit"],["type","range",3,"ngModelChange","min","max","disabled","ngModel","ngModelOptions"],["label","label","value","value",3,"options","isClearable"],["type","text",3,"ngModelChange","ngModel"],[1,"advanced-settings"],["for","password"],["type","password","name","password","autocomplete","disabled","placeholder",De,"tabindex","1",3,"ngModelChange","ngModel"],["for","repeatPassword"],["type","password","name","repeatPassword","autocomplete","disabled","placeholder",xe,"tabindex","2",3,"ngModelChange","disabled","ngModel"],["suffix","",1,"sh-success"],["suffix",""],["shButton","",3,"click"],["shButton","",1,"raised","primary",3,"loader"],["shButton","","shTooltip",ae,1,"raised","primary",3,"loader","disabled"],["shButton","",1,"raised","primary",3,"click"],["shButton","","shTooltip",ae,1,"raised","primary",3,"click","disabled"],[1,"sh-success"],["for","allowedHostnames"],["type","text","id","allowedHostnames",3,"ngModelChange","ngModel"],["type","primary"],["value","value","label","label",3,"options","isClearable"],["href","#"],["label","label","value","value",3,"options","isLoading"]]},template:function(e,n){if(e&1&&(h(0,"app-status-bar"),o(1,"div",50)(2,"header")(3,"div",51)(4,"h2"),l(5,0),i(),o(6,"p"),l(7,1),i()()(),g(8,qt,9,2),o(9,"section")(10,"div",52)(11,"h3"),l(12,2),i(),o(13,"p"),l(14,3),i()(),o(15,"div",53)(16,"div",54)(17,"img",55),c("click",function(){return n.setLightMode()}),i(),o(18,"img",56),c("click",function(){return n.setDarkMode()}),i()()()(),o(19,"section")(20,"div",52)(21,"h3"),l(22,4),i(),o(23,"p"),l(24,5),i()(),o(25,"div",57),g(26,Zt,15,7)(27,tn,4,1,"div",58),i()(),o(28,"section")(29,"div",52)(30,"h3"),l(31,6),i(),o(32,"p"),l(33,7),i()(),o(34,"div",53)(35,"sh-select",59)(36,"input",60),c("ngModelChange",function(T){return n.updateLocale(T)}),i()()()(),o(37,"section")(38,"div",52)(39,"h3"),l(40,8),i(),o(41,"p"),l(42,9),i()(),o(43,"div",53)(44,"button",61),c("click",function(){return n.changeDefaultClientTo("ngclient")}),G(45,10),h(46,"sh-icon"),y(),i()()(),o(47,"section")(48,"div",52)(49,"h3"),l(50,11),i(),o(51,"p"),l(52,12),i()(),o(53,"div",62)(54,"sh-toggle",63),c("click",function(){return n.updateRemoteAccess()}),o(55,"label"),l(56,13),i()(),g(57,nn,8,3),i()(),o(58,"section")(59,"div",52)(60,"h3"),l(61,14),i(),o(62,"p"),l(63,15),i()(),o(64,"div",53)(65,"sh-toggle",63),c("click",function(){return n.saveDisableTrayIconLogin()}),o(66,"label"),l(67,16),i()()()(),g(68,on,9,5,"section"),o(69,"section")(70,"div",52)(71,"h3"),l(72,17),i(),g(73,sn,2,1,"p"),g(74,an,1,0,"sh-progress-bar",64),i(),o(75,"div",65)(76,"div",66),c("click",function(){return n.setNewChannel("")}),o(77,"sh-radio",67),l(78,18),i(),o(79,"p"),l(80,19),i()(),o(81,"div",66),c("click",function(){return n.setNewChannel("stable")}),o(82,"sh-radio",67),l(83,20),i(),o(84,"p"),l(85,21),i()(),o(86,"div",66),c("click",function(){return n.setNewChannel("beta")}),o(87,"sh-radio",67),l(88,22),i(),o(89,"p"),l(90,23),i()(),o(91,"div",66),c("click",function(){return n.setNewChannel("experimental")}),o(92,"sh-radio",67),l(93,24),i(),o(94,"p"),l(95,25),i()(),o(96,"div",66),c("click",function(){return n.setNewChannel("canary")}),o(97,"sh-radio",67),l(98,26),i(),o(99,"p"),l(100,27),i()()()(),o(101,"section")(102,"div",52)(103,"h3"),l(104,28),i(),o(105,"p"),l(106,29),i()(),o(107,"div",53)(108,"div",68)(109,"sh-range-slider",69)(110,"input",70),L("ngModelChange",function(T){return v(n.timeValue,T)||(n.timeValue=T),T}),i()(),o(111,"sh-select",71)(112,"input",72),c("ngModelChange",function(T){return n.updateTimeType(T)}),i(),le(113,ln,1,1,"ng-template"),i()()()(),g(114,rn,13,5,"section"),i(),h(115,"sh-divider"),o(116,"div",50)(117,"section")(118,"div",73)(119,"h3"),l(120,30),i(),h(121,"app-advanced-options-settings"),i()()(),h(122,"sh-divider")),e&2){let a,T,N;_(8),C(n.isUsingRelay()?-1:8),_(9),M("active",!n.isDarkMode()),_(),M("active",n.isDarkMode()),_(8),C(n.showPassphraseForm()?26:27),_(9),m("options",n.languageOptions())("isClearable",!1)("inlineSearch",!0),_(),m("ngModel",n.langCtrl())("ngModelOptions",V(41,se)),_(18),M("active",n.allowRemoteAccess()),_(3),C(n.allowRemoteAccess()?57:-1),_(8),M("active",n.disableTrayIconLogin()),_(3),C(n.powerModeOptions().length>0?68:-1),_(5),C((a=n.sysinfo())!=null&&a.ServerVersion?73:-1),_(),C(n.updatingChannel()?74:-1),_(3),M("active",n.updateChannel()===""),_(),B((T=n.sysinfo())==null?null:T.DefaultUpdateChannel),H(78),_(2),B((N=n.sysinfo())==null?null:N.ServerVersionType),H(80),_(2),M("active",n.updateChannel()==="stable"),_(5),M("active",n.updateChannel()==="beta"),_(5),M("active",n.updateChannel()==="experimental"),_(5),M("active",n.updateChannel()==="canary"),_(12),m("unit",n.timeType()==="none"?"s":n.timeType()),_(),m("min",n.timeRange()[0])("max",n.timeRange()[1])("disabled",n.timeType()==="none"),A("ngModel",n.timeValue),m("ngModelOptions",V(42,se)),_(),m("options",n.timeTypeOptions())("isClearable",!1),_(),m("ngModel",n.timeType()),_(2),C(n.usageStatisticsDisabled()?-1:114)}},dependencies:[Y,j,dt,K,Q,Z,Ot,oe,z,J,pt,Et,Ct,Nt,mt,te,k,gt,ee,ut],styles:["[_nghost-%COMP%]{display:block}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 2rem 2rem}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem 0;background:var(--base-1);border-bottom:1px solid var(--base-4)}header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}section[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem;padding:2rem 0;border-top:1px solid var(--base-4)}section[_ngcontent-%COMP%]:first-of-type{border-top:0}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;align-items:flex-start}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%] sh-button-group[_ngcontent-%COMP%]{margin-top:.25rem}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;width:50%}.passphrase-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:1rem}.passphrase-form[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.remote-access-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.themes[_ngcontent-%COMP%]{display:flex;gap:.5rem}.themes[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:15rem;border-radius:var(--shape-3);cursor:pointer}.themes[_ngcontent-%COMP%] img.active[_ngcontent-%COMP%]{border:2px solid var(--primary-8)}.radios[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.radio-option[_ngcontent-%COMP%]{cursor:pointer}.radio-option[_ngcontent-%COMP%] sh-radio[_ngcontent-%COMP%]{color:var(--base-8);margin-bottom:.25rem}.radio-option[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;color:var(--base-9)}.field-col[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.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}.advanced-settings[_ngcontent-%COMP%]{grid-column:1/-1;display:grid;grid-template-columns:auto 1fr;gap:1rem}"],changeDetection:0})};export{Tn as debounceSignal,re as default};
1
+ import{a as Pt}from"./chunk-MZMEFIHU.js";import{a as Ot}from"./chunk-XDECUOQ5.js";import{a as ht}from"./chunk-NOHHRZSK.js";import"./chunk-DU5QSRYH.js";import"./chunk-D2DI6ZER.js";import"./chunk-M77IE672.js";import"./chunk-I5AKUAZF.js";import"./chunk-PJAWWLYW.js";import"./chunk-6Q6SSTBK.js";import"./chunk-RECKKS2S.js";import{a as ie}from"./chunk-W4QCGFNO.js";import"./chunk-L4GZJLYK.js";import{a as X}from"./chunk-LJQN4G2O.js";import"./chunk-I2RHQQ3J.js";import{a as Mt}from"./chunk-F2QQDU4N.js";import{a as ft}from"./chunk-XE5OMGTJ.js";import"./chunk-T6C2OUI5.js";import{a as rt,b as Tt}from"./chunk-TJ3WIU6Q.js";import{b as ne}from"./chunk-KBGIIJMM.js";import{B as J,E as ct,G as gt,H as te,L as Ct,M as pt,N as Et,P as ut,W as Nt,Y as mt,c as j,e as K,i as Q,m as dt,s as Y,t as Z,u as k,w as ee,z as St}from"./chunk-LFRGO2IP.js";import"./chunk-LEZL7BSL.js";import"./chunk-4MEL5WTX.js";import"./chunk-5K64UNNB.js";import"./chunk-6DB3NZXR.js";import"./chunk-FPPZ4BUR.js";import{$b as d,B as b,Bc as V,Cb as m,Db as o,Eb as i,Fb as h,H as R,Mb as f,Oa as tt,Ra as _,Rc as w,Sc as x,Tb as G,Ub as y,Vb as l,Wb as B,Xb as H,Yb as W,Yc as _t,Zb as c,_ as P,a as Ye,b as Ze,bb as D,c as et,da as p,ea as E,gb as le,gc as st,hb as nt,hc as at,kc as M,n as F,nc as $,oa as S,oc as q,pc as _e,rb as it,sb as ot,sc as A,tc as v,uc as L,wb as g,xb as C,yc as lt}from"./chunk-FAM42SZT.js";import"./chunk-EUDKD2JW.js";var $t=["formRef"],At=()=>[import("./chunk-V66WXJUI.js").then(s=>s.OptionsListComponent)];function vt(s,t){s&1&&(o(0,"sh-alert",3),l(1,1),i())}function Lt(s,t){if(s&1){let e=f();o(0,"app-options-list",5),L("optionsChange",function(a){p(e);let T=d();return v(T.settings,a)||(T.settings=a),E(a)}),i()}if(s&2){let e=d();A("options",e.settings),m("hasFreeTextSettings",!0)}}var z=class s{#e=P(X);#n=P(ne);formRef=_t.required("formRef");settings=S([]);isSubmitting=S(!1);isLoadingOptions=S(!0);saved=S(!1);lastRecievedServerSettings=S({});serverSettingsEffect=x(()=>{let t=this.#e.serverSettings();if(t===void 0)return;this.lastRecievedServerSettings.set(t),this.isLoadingOptions.set(!0);let e=Object.entries(t);e.forEach(([n,a],T)=>{if(n.startsWith("--")){let N=n.substring(2);this.settings.update(u=>(u.some(O=>O.Name===N)||u.push({Name:N,Value:a}),u))}T===e.length-1&&this.isLoadingOptions.set(!1)})});submit(){this.isSubmitting.set(!0);let t=this.settings(),e=this.lastRecievedServerSettings(),n=t.map(u=>u.Name),T=Object.keys(e).filter(u=>u.startsWith("--")).filter(u=>!n.includes(u.replace("--",""))),N=t.reduce((u,O)=>{let I=O.Name?.startsWith("--")?O.Name:`--${O.Name}`;return u[I]=O.Value,u},{});T.forEach(u=>{N[u]=null}),this.#n.patchApiV1Serversettings({requestBody:N}).pipe(R(()=>this.isSubmitting.set(!1))).subscribe({next:()=>{this.#e.refreshServerSettings(),this.saved.set(!0),setTimeout(()=>{this.saved.set(!1)},3e3)}})}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=D({type:s,selectors:[["app-advanced-options-settings"]],viewQuery:function(e,n){e&1&&st(n.formRef,$t,5),e&2&&at()},decls:8,vars:4,consts:()=>{let t;t=$localize`${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:floppy-disk${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON: Save settings `;let e;return e=$localize`Settings saved`,[t,e,[1,"actions"],[1,"success"],["shButton","","type","button",1,"raised","primary",3,"click"],[3,"optionsChange","options","hasFreeTextSettings"]]},template:function(e,n){e&1&&(o(0,"div",2),g(1,vt,2,0,"sh-alert",3),o(2,"button",4),c("click",function(){return n.submit()}),G(3,0),h(4,"sh-icon"),y(),i()(),nt(5,Lt,1,2),it(6,5,At)),e&2&&(_(),C(n.saved()?1:-1),_(),M("loader",n.isSubmitting()),_(4),ot(!n.isLoadingOptions()))},dependencies:[Z,J,k,ee],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:40.625rem;justify-self:flex-end}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;justify-content:flex-end;margin-bottom:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 2.5rem;gap:.5rem;align-items:flex-end}.remote-volume-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.remote-volume-wrap[_ngcontent-%COMP%] p.warning[_ngcontent-%COMP%]{color:#7d7d00}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.advanced-option[_ngcontent-%COMP%]{display:grid;gap:.5rem;grid-template-columns:1fr 1fr 2.5rem;align-items:flex-end}"],changeDetection:0})};function bt(s,t){if(s&1){let e=f();o(0,"sh-form-field",12)(1,"input",13),L("ngModelChange",function(a){p(e);let T=d(2);return v(T.registerUrl,a)||(T.registerUrl=a),E(a)}),i()(),o(2,"button",14),c("click",function(){p(e);let a=d(2);return E(a.register())}),l(3,0),i()}if(s&2){let e=d(2);_(),A("ngModel",e.registerUrl)}}function wt(s,t){if(s&1&&(o(0,"div",9)(1,"label"),l(2,1),i(),o(3,"a",15),$(4),i()()),s&2){let e=d(2);_(3),m("href",lt(e.claimUrl()),tt),_(),q(e.claimUrl())}}function Dt(s,t){s&1&&(o(0,"div",9)(1,"label"),l(2,2),i()())}function xt(s,t){if(s&1){let e=f();o(0,"button",14),c("click",function(){p(e);let a=d(2);return E(a.cancel())}),l(1,3),i()}}function kt(s,t){if(s&1){let e=f();o(0,"button",14),c("click",function(){p(e);let a=d(2);return E(a.disable())}),l(1,4),i()}}function Jt(s,t){if(s&1){let e=f();o(0,"button",14),c("click",function(){p(e);let a=d(2);return E(a.enable())}),l(1,5),i(),o(2,"button",16),c("click",function(){p(e);let a=d(2);return E(a.delete())}),l(3,6),i()}}function Xt(s,t){s&1&&(G(0,7,1),h(1,"sh-icon"),y())}function Vt(s,t){s&1&&(G(0,7,2),h(1,"sh-icon"),y())}function zt(s,t){if(s&1){let e=f();o(0,"sh-chip",17),c("click",function(){p(e);let a=d(2);return E(a.copyReportingUrl())}),G(1,7),g(2,Xt,2,0,"sh-icon")(3,Vt,2,0,"sh-icon"),y(),i()}if(s&2){let e=d(2);_(2),C(e.copiedReportingUrl()===!0?2:3)}}function Ut(s,t){if(s&1&&(o(0,"div",8),g(1,bt,4,1),g(2,wt,5,3,"div",9),g(3,Dt,3,0,"div",9),g(4,xt,2,0,"button",10),g(5,kt,2,0,"button",10),g(6,Jt,4,0),g(7,zt,4,1,"sh-chip",11),i()),s&2){let e=d();_(),C(e.state()==="inactive"?1:-1),_(),C(e.state()==="registered"?2:-1),_(),C(e.state()==="registering"?3:-1),_(),C(e.state()==="registering"||e.state()==="registeringfaulted"||e.state()==="registered"?4:-1),_(),C(e.state()==="connected"||e.state()==="connecting"?5:-1),_(),C(e.state()==="disabled"?6:-1),_(),C(e.additionalReportingUrl()!==""?7:-1)}}var oe=class s{#e=P(ie);#n=P(X);state=this.#e.state;claimUrl=this.#e.claimUrl;registerUrl=this.#e.registerUrl;additionalReportingUrl=w(()=>{let t=this.#n.serverSettings();return this.#e.state()==="inactive"?"":t&&t["additional-report-url"]||""});copiedReportingUrl=S(!1);ngOnInit(){this.#e.refreshRemoteControlStatus()}cancel(){this.#e.cancelRemoteRegistration()}register(){this.#e.beginRemoteRegistration()}disable(){this.#e.disableRemoteControl()}enable(){this.#e.enableRemoteControl()}delete(){this.#e.deleteRemoteControl()}copyReportingUrl(){let t=this.additionalReportingUrl();t&&(this.copiedReportingUrl.set(!0),setTimeout(()=>this.copiedReportingUrl.set(!1),2e3),navigator.clipboard.writeText(t))}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=D({type:s,selectors:[["app-remote-control"]],decls:1,vars:1,consts:()=>{let t;t=$localize`Register on console`;let e;e=$localize`Machine is now registered, open this link to add it to your account:`;let n;n=$localize`Registering, please wait...`;let a;a=$localize`Cancel registration`;let T;T=$localize`Disable console connection`;let N;N=$localize`Enable console connection`;let u;u=$localize` Delete console connection setup `;let O;return O=$localize` Reporting configured by server ${"\uFFFD*2: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:${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3: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:${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,O=W(O),[t,e,n,a,T,N,u,O,[1,"field-row"],[1,"field-col"],["type","button","shButton","",1,"raised"],[1,"reporting-url","primary","simple"],["label","Registration URL","for","remoteControlRegisterUrl"],["type","text","sh-input","","id","remoteControlRegisterUrl","name","remoteControlRegisterUrl",3,"ngModelChange","ngModel"],["type","button","shButton","",1,"raised",3,"click"],["target","_blank",3,"href"],["type","button","shButton","",1,"raised","error",3,"click"],[1,"reporting-url","primary","simple",3,"click"]]},template:function(e,n){e&1&&g(0,Ut,8,7,"div",8),e&2&&C(n.state()!=="unknown"?0:-1)},dependencies:[Y,j,K,Q,te,J,ct,k],styles:["[_nghost-%COMP%]{display:block}[_nghost-%COMP%] button[_ngcontent-%COMP%]{white-space:nowrap}.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}"],changeDetection:0})};function Gt(...s){let t=S(...s);return Object.defineProperty(t,"value",{get:t.asReadonly(),set:t.set.bind(t)})}var se=()=>({standalone:!0});function Bt(s,t){s&1&&(o(0,"label"),l(1,34),i())}function Ht(s,t){s&1&&(o(0,"label"),l(1,35),i())}function Wt(s,t){if(s&1){let e=f();o(0,"section")(1,"div",52)(2,"h3"),l(3,32),i(),o(4,"p"),l(5,33),i()(),o(6,"div",53)(7,"sh-toggle",63),c("click",function(){p(e);let a=d(2);return E(a.toggleConsoleControl())}),g(8,Bt,2,0,"label")(9,Ht,2,0,"label"),i()()()}if(s&2){let e=d(2);_(7),M("active",!e.consoleControlDisabled()),_(),C(e.consoleControlDisabled()?8:9)}}function qt(s,t){if(s&1&&(o(0,"section")(1,"div",52)(2,"h3"),l(3,31),i(),o(4,"p"),$(5),i()(),o(6,"div",53),h(7,"app-remote-control"),i()(),g(8,Wt,10,3,"section")),s&2){let e=d();_(5),q(e.remoteControlStatus()),_(3),C(e.remoteControlState()!="inactive"?8:-1)}}function jt(s,t){s&1&&(o(0,"sh-icon",78),$(1,"check"),i())}function Kt(s,t){s&1&&(o(0,"sh-icon",79),$(1,"prohibit"),i())}function Qt(s,t){if(s&1){let e=f();o(0,"button",83),c("click",function(){p(e);let a=d(2);return E(a.updatePassphrase())}),l(1,39),i()}if(s&2){let e=d(2);M("loader",e.isUpdating())}}function Yt(s,t){if(s&1){let e=f();o(0,"button",84),c("click",function(){p(e);let a=d(2);return E(a.updatePassphrase())}),l(1,40),i()}if(s&2){let e=d(2);M("loader",e.isUpdating()),m("disabled",!0)}}function Zt(s,t){if(s&1){let e=f();o(0,"sh-form-field")(1,"label",74),l(2,36),i(),o(3,"input",75),L("ngModelChange",function(a){p(e);let T=d();return v(T.passphrase,a)||(T.passphrase=a),E(a)}),i()(),o(4,"sh-form-field")(5,"label",76),l(6,37),i(),o(7,"input",77),L("ngModelChange",function(a){p(e);let T=d();return v(T.repeatPassphrase,a)||(T.repeatPassphrase=a),E(a)}),i(),g(8,jt,2,0,"sh-icon",78)(9,Kt,2,0,"sh-icon",79),i(),o(10,"div",58)(11,"button",80),c("click",function(){p(e);let a=d();return E(a.cancelPasswordChange())}),l(12,38),i(),g(13,Qt,2,2,"button",81)(14,Yt,2,3,"button",82),i()}if(s&2){let e=d();_(3),A("ngModel",e.passphrase),_(4),m("disabled",e.passphrase().length===0),A("ngModel",e.repeatPassphrase),_(),C(e.passphrase().length!==0&&e.passphrase()===e.repeatPassphrase()?8:9),_(3),M("loader",e.isUpdating()),_(2),C(e.passphrase().length!==0&&e.passphrase()===e.repeatPassphrase()?13:14)}}function en(s,t){s&1&&(o(0,"sh-icon",85),$(1,"check"),i())}function tn(s,t){if(s&1){let e=f();o(0,"div",58)(1,"button",80),c("click",function(){p(e);let a=d();return E(a.openPassphraseForm())}),l(2,41),i(),g(3,en,2,0,"sh-icon",85),i()}if(s&2){let e=d();_(3),C(e.passwordUpdated()?3:-1)}}function nn(s,t){if(s&1){let e=f();o(0,"sh-form-field")(1,"label",86),l(2,42),i(),o(3,"textarea",87),L("ngModelChange",function(a){p(e);let T=d();return v(T.allowedHostnames,a)||(T.allowedHostnames=a),E(a)}),i()(),o(4,"sh-alert",88),l(5,43),i(),o(6,"button",83),c("click",function(){p(e);let a=d();return E(a.updateAllowedHostnames())}),l(7,44),i()}if(s&2){let e=d();_(3),A("ngModel",e.allowedHostnames),_(3),M("loader",e.updatingAllowedHosts())}}function on(s,t){if(s&1){let e=f();o(0,"section")(1,"div",52)(2,"h3"),l(3,45),i(),o(4,"p"),l(5,46),i()(),o(6,"div",53)(7,"sh-select",89)(8,"input",60),c("ngModelChange",function(a){p(e);let T=d();return E(T.updatePowerMode(a))}),i()()()()}if(s&2){let e=d();_(7),m("options",e.powerModeOptions())("isClearable",!1),_(),m("ngModel",e.powerModeCtrl())("ngModelOptions",V(4,se))}}function sn(s,t){if(s&1&&(o(0,"p"),l(1,47),i()),s&2){let e,n=d();_(),B((e=n.sysinfo())==null?null:e.ServerVersionName),H(1)}}function an(s,t){s&1&&h(0,"sh-progress-bar",64)}function ln(s,t){if(s&1&&$(0),s&2){let e=t.$implicit;_e(" ",e.label," ")}}function _n(s,t){if(s&1&&$(0),s&2){let e=t.$implicit;_e(" ",e.label," ")}}function rn(s,t){if(s&1){let e=f();o(0,"section")(1,"div",52)(2,"h3"),l(3,48),i(),o(4,"p"),G(5,49),h(6,"a",90)(7,"br")(8,"br"),y(),i()(),o(9,"div",53)(10,"sh-select",91)(11,"input",60),c("ngModelChange",function(a){p(e);let T=d();return E(T.updateUsageStatistics(a))}),i(),le(12,_n,1,1,"ng-template"),i()()()}if(s&2){let e=d();_(10),m("options",e.usageStatisticsOptions())("isLoading",e.updatingUsageStatistics()),_(),m("ngModel",e.usageStatistics())("ngModelOptions",V(4,se))}}function Tn(s,t,e){let n=Gt(s),a=n[Ye];e?.equal&&(a.equal=e.equal);let T;return n.set=N=>{clearTimeout(T),T=setTimeout(()=>Ze(a,N),t)},n.update=N=>{clearTimeout(T),T=setTimeout(()=>et(a,N),t)},n}var dn=[{value:"none",label:$localize`None`},{value:"s",label:$localize`Seconds`},{value:"m",label:$localize`Minutes`},{value:"h",label:$localize`Hours`}],yt=[{value:"none",label:$localize`System default ($value)`},{value:"information",label:$localize`Usage statistics, warnings, errors, and crashes`},{value:"warning",label:$localize`Warnings, errors and crashes`},{value:"error",label:$localize`Errors and crashes`},{value:"crash",label:$localize`Crashes only`},{value:"disabled",label:$localize`None / disabled`}],re=class s{#e=P(St);#n=P(Pt);#i=P(ft);#t=P(ne);#o=P(X);#s=P(ie);#_=P(Tt);#a=P(rt);#l=this.#a.getItem("locale")??"en-US";sysinfo=this.#i.systemInfo;isDarkMode=this.#n.isDarkMode;editAs=S("list");previousLang=this.#l;langCtrl=S(this.#l);powerModeCtrl=S("");usageStatistics=S("");updatingUsageStatistics=S(!1);remoteControlStatus=this.#s.status;remoteControlState=this.#s.state;updatingChannel=S(!1);updateChannel=S("");isUsingRelay=this.#_.relayIsEnabled;usageStatisticsDisabled=w(()=>(this.#i.systemInfo()?.DefaultUsageReportLevel??"").toLowerCase()==="disabled");#T=x(()=>{let t=this.#i.systemInfo()?.DefaultUsageReportLevel??"",e=yt;e[0].label=$localize`System default (${t})`,this.usageStatisticsOptions.set(e)});setNewChannel(t){let e=this.updateChannel();this.updateChannel.set(t),this.#t.patchApiV1Serversettings({requestBody:{"update-channel":t}}).pipe(R(()=>this.updatingChannel.set(!1)),b(()=>(this.updateChannel.set(e),F(null)))).subscribe()}allowRemoteAccess=S(!1);allowedHostnames=S("");loadedAllowedHostnames=S("");updatingRemoteAccess=S(!1);updatingAllowedHosts=S(!1);updatingConsoleControl=S(!1);consoleControlDisabled=S(!1);updateRemoteAccess(){let t=this.allowRemoteAccess(),e=!t;this.allowRemoteAccess.set(e),this.#t.patchApiV1Serversettings({requestBody:{"server-listen-interface":e?"any":"loopback"}}).pipe(R(()=>this.updatingRemoteAccess.set(!1)),b(()=>(this.allowRemoteAccess.set(t),F(null)))).subscribe()}updateAllowedHostnames(){let t=this.loadedAllowedHostnames(),e=this.allowedHostnames();this.updatingAllowedHosts.set(!0),this.#t.patchApiV1Serversettings({requestBody:{"server-listen-interface":"any","allowed-hostnames":e}}).pipe(R(()=>this.updatingAllowedHosts.set(!1)),b(()=>(this.allowedHostnames.set(t),F(null)))).subscribe()}toggleConsoleControl(){let t=this.consoleControlDisabled(),e=!t;this.updatingConsoleControl.set(!0),this.consoleControlDisabled.set(e),this.#t.patchApiV1Serversettings({requestBody:{"disable-console-control":e?"True":"False"}}).pipe(R(()=>this.updatingConsoleControl.set(!1)),b(()=>(this.consoleControlDisabled.set(t),F(null)))).subscribe()}updatingDisableTrayIconLogin=S(!1);disableTrayIconLogin=S(!1);saveDisableTrayIconLogin(){let t=this.disableTrayIconLogin(),e=!t;this.updatingDisableTrayIconLogin.set(!0),this.disableTrayIconLogin.set(e),this.#t.patchApiV1Serversettings({requestBody:{"disable-tray-icon-login":e?"True":"False"}}).pipe(R(()=>this.updatingDisableTrayIconLogin.set(!1)),b(()=>(this.disableTrayIconLogin.set(t),F(null)))).subscribe()}showPassphraseForm=S(!1);isUpdating=S(!1);passphrase=S("");repeatPassphrase=S("");passwordUpdated=S(!1);updatePassphrase(){this.passphrase()===this.repeatPassphrase()&&(this.isUpdating.set(!0),this.#t.patchApiV1Serversettings({requestBody:{"server-passphrase":this.passphrase()}}).pipe(R(()=>this.isUpdating.set(!1))).subscribe({next:()=>{this.showPassphraseForm.set(!1),this.passwordUpdated.set(!0),setTimeout(()=>{this.passwordUpdated.set(!1)},3e3)}}))}openPassphraseForm(){this.showPassphraseForm.set(!0)}cancelPasswordChange(){this.showPassphraseForm.set(!1)}languageOptions=S(ht);powerModeOptions=w(()=>{let t=this.#i.systemInfo();return!t?.PowerModeProviders||t.PowerModeProviders.filter(e=>e!==""&&e!=="None").length==0?[]:t.PowerModeProviders.map(e=>({value:e==""?"default":e,label:e===""?$localize`Default`:e}))});usageStatisticsOptions=S(yt);timeTypeOptions=S(dn);timeType=S("none");timeValue=Tn(0,300);timeRange=w(()=>this.timeType()==="h"?[0,24]:[0,60]);timeValueEffect=x(()=>{let t=this.timeValue(),e=this.#o.serverSettings();!e||e["startup-delay"]===""&&this.timeType()==="none"||this.updateStartupDelay()});updateLocale(t){!t||t===""||t===this.previousLang||(this.#a.setItem("locale",t),window.location.reload())}updateStartupDelay(){let t=this.timeValue(),e=this.timeType(),n="";e!=="none"&&t!==0&&(n=`${t}${e}`),this.#t.patchApiV1Serversettings({requestBody:{"startup-delay":n}}).subscribe()}updateTimeType(t){this.timeType()==="none"&&this.timeValue.set(0),this.timeType.set(t)}updateUsageStatistics(t){let e=this.usageStatistics();!t||t===""||t===e||(this.usageStatistics.set(t),this.updatingUsageStatistics.set(!0),this.#t.patchApiV1Serversettings({requestBody:{"usage-reporter-level":this.usageStatistics()==="none"?"":this.usageStatistics()}}).pipe(R(()=>this.updatingUsageStatistics.set(!1)),b(()=>(this.usageStatistics.set(e),F(null)))).subscribe())}updatePowerMode(t){let e=this.powerModeCtrl();e!==t&&(t==="default"&&(t=""),this.#t.patchApiV1Serversettings({requestBody:{"power-mode-provider":t||""}}).pipe(b(()=>(this.powerModeCtrl.set(e),F(null)))).subscribe())}serverSettingsEffect=x(()=>{let t=this.#o.serverSettings();if(t===void 0)return;let e=t["startup-delay"],n=e.slice(-1),a=e.slice(0,-1),T=["s","m","h"];this.disableTrayIconLogin.set(t["disable-tray-icon-login"]!=="False"),this.updateChannel.set(t["update-channel"]),this.allowRemoteAccess.set(t["server-listen-interface"]==="any"),this.allowedHostnames.set(t["allowed-hostnames"]),this.loadedAllowedHostnames.set(t["allowed-hostnames"]),this.consoleControlDisabled.set(t["disable-console-control"]==="True"),this.usageStatistics.set(t["usage-reporter-level"]===""?"none":t["usage-reporter-level"]),this.timeType.set(e==""?"none":T.includes(n)?n:"none"),this.timeValue.set(e==""?0:parseInt(a));let N=t["power-mode-provider"]===""||t["power-mode-provider"]==null?"default":t["power-mode-provider"];this.powerModeCtrl.set(N)});setDarkMode(){this.#n.setDarkMode()}setLightMode(){this.#n.setLightMode()}changeDefaultClientTo(t){this.#e.open(Mt,{data:{title:$localize`Use legacy UI`,message:$localize`Are you sure you want to use the legacy user interface, not recommended unless you have a specific reason?`,confirmText:$localize`Use legacy`,cancelText:$localize`Cancel`},closed:e=>{e&&(this.#r(t),window.location.replace(`/${t}`))}})}#r(t){var e=new Date;e.setTime(e.getTime()+2160*60*60*1e3),document.cookie="default-client="+t+"; expires="+e.toUTCString()+"; path=/"}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=D({type:s,selectors:[["app-settings"]],decls:123,vars:43,consts:()=>{let t;t=$localize`Settings`;let e;e=$localize`Configure your backup settings.`;let n;n=$localize`Color theme`;let a;a=$localize`Customize your application theme`;let T;T=$localize`Passwords`;let N;N=$localize`Change server passphrase`;let u;u=$localize`Language`;let O;O=$localize`Select a language for the platform`;let I;I=$localize`Use legacy interface`;let Te;Te=$localize`Use the old user interface, not recommended unless you have a specific reason.`;let de;de=$localize`${"\uFFFD#46\uFFFD"}:START_TAG_SH_ICON:swap${"\uFFFD/#46\uFFFD"}:CLOSE_TAG_SH_ICON: Use legacy UI `;let Se;Se=$localize`Allow remote access (requires restart)`;let ce;ce=$localize` By allowing remote access, the server listens to requests from any machine on your network. If you enable this option, make sure you are always using the computer on a secure firewall protected network. `;let ge;ge=$localize`Allow remote access`;let Ce;Ce=$localize`Prevent tray icon automatic log-in`;let pe;pe=$localize` By default, the tray icon will open the user interface with a token that unlocks the user interface. This ensures that you can access the user interface from the tray icon, while requiring others to enter a password. If you prefer having to type in the password, even when accessing the user interface from the tray icon, enable this option. `;let Ee;Ee=$localize`Prevent tray icon automatic log-in`;let ue;ue=$localize`Update channel`;let Ne;Ne=$localize` Default (${"\uFFFD0\uFFFD"}:INTERPOLATION:) `;let me;me=$localize`Same as the base install version: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let fe;fe=$localize`Stable`;let Me;Me=$localize`Official stable release.`;let Pe;Pe=$localize`Beta`;let Oe;Oe=$localize` Try out the new features that we are working on. Test a backup and restore before using this in production environments. `;let he;he=$localize` Experimental `;let Ie;Ie=$localize`Early previews of new features. Not for use with important data.`;let Re;Re=$localize`Canary`;let Ge;Ge=$localize`Builds for developers and testers only. Not for use with important data.`;let ye;ye=$localize`Pause after startup or hibernation`;let $e;$e=$localize` Duplicati will run when started, but will remain in paused state for the duration. Duplicati will occupy minimal system resources and no backups will be run. `;let Ae;Ae=$localize`Advanced options`;let ve;ve=$localize`Connect to console`;let Le;Le=$localize`Disable console control`;let Fe;Fe=$localize` Disabling console control will disable remote access to this machine from the console, but will keep the registration intact and allow pushing settings from the console. `;let be;be=$localize`Remote control disabled`;let we;we=$localize`Remote control enabled`;let De;De=$localize`Enter new password`;let xe;xe=$localize`Repeat password`;let ae;ae=$localize`Password have to be filled and have to match`;let ke;ke=$localize`Passphrase`;let Je;Je=$localize`Repeat passphrase`;let Xe;Xe=$localize`Cancel`;let Ve;Ve=$localize` Update passphrase `;let ze;ze=$localize` Update passphrase `;let Ue;Ue=$localize`Change password`;let Be;Be=$localize`Allowed hostnames`;let He;He=$localize` To prevent various DNS based attacks, Duplicati limits the allowed hostnames to the ones listed here. Direct IP access and localhost is always allowed. Multiple hostnames can be supplied with a semicolon separator. If any of the allowed hostnames is an asterisk (*), all hostnames are allowed and this feature is disabled. If the field is empty, only IP address and localhost access is allowed. `;let We;We=$localize` Update allowed hostnames `;let qe;qe=$localize`Power mode provider`;let je;je=$localize` The power mode provider monitors the system for when it enters a low power state and pauses Duplicati. When the system resumes, Duplicati will resume as well. Choosing the None option disables detection of low power states and Duplicati will run all the time. `;let Ke;Ke=$localize`Installed version: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Qe;Qe=$localize`Usage statistics`;let U;return U=$localize` Usage reports help us improve the user experience and evaluate impact of new features. We use them to generate ${"\uFFFD#6\uFFFD"}:START_LINK:public usage statistics.${"\uFFFD/#6\uFFFD"}:CLOSE_LINK:${"[\uFFFD#7\uFFFD\uFFFD/#7\uFFFD|\uFFFD#8\uFFFD\uFFFD/#8\uFFFD]"}:LINE_BREAK:${"[\uFFFD#7\uFFFD\uFFFD/#7\uFFFD|\uFFFD#8\uFFFD\uFFFD/#8\uFFFD]"}:LINE_BREAK: All usage reports are sent anonymously and do not contain any personal information. They contain information about hardware and operating system, the type of backend, backup duration, overall size of source data and similar data. They do not contain paths, filenames, usernames, passwords or similar sensitive information. `,U=W(U),[t,e,n,a,T,N,u,O,I,Te,de,Se,ce,ge,Ce,pe,Ee,ue,Ne,me,fe,Me,Pe,Oe,he,Ie,Re,Ge,ye,$e,Ae,ve,Le,Fe,be,we,ke,Je,Xe,Ve,ze,Ue,Be,He,We,qe,je,Ke,Qe,U,[1,"content"],[1,"title"],[1,"left"],[1,"right"],[1,"themes"],["src","assets/images/light-theme.png","alt","light theme",3,"click"],["src","assets/images/dark-theme.png","alt","dark theme",3,"click"],[1,"right","passphrase-form"],[1,"actions"],["value","value","label","label",3,"options","isClearable","inlineSearch"],["type","text",3,"ngModelChange","ngModel","ngModelOptions"],["shButton","",1,"primary",3,"click"],[1,"right","remote-access-form"],[1,"primary","raised",3,"click"],[1,"indeterminate","primary"],[1,"right","radios"],[1,"radio-option",3,"click"],[1,"primary","raised"],[1,"field-row"],[1,"raised","primary",3,"unit"],["type","range",3,"ngModelChange","min","max","disabled","ngModel","ngModelOptions"],["label","label","value","value",3,"options","isClearable"],["type","text",3,"ngModelChange","ngModel"],[1,"advanced-settings"],["for","password"],["type","password","name","password","autocomplete","disabled","placeholder",De,"tabindex","1",3,"ngModelChange","ngModel"],["for","repeatPassword"],["type","password","name","repeatPassword","autocomplete","disabled","placeholder",xe,"tabindex","2",3,"ngModelChange","disabled","ngModel"],["suffix","",1,"sh-success"],["suffix",""],["shButton","",3,"click"],["shButton","",1,"raised","primary",3,"loader"],["shButton","","shTooltip",ae,1,"raised","primary",3,"loader","disabled"],["shButton","",1,"raised","primary",3,"click"],["shButton","","shTooltip",ae,1,"raised","primary",3,"click","disabled"],[1,"sh-success"],["for","allowedHostnames"],["type","text","id","allowedHostnames",3,"ngModelChange","ngModel"],["type","primary"],["value","value","label","label",3,"options","isClearable"],["href","#"],["label","label","value","value",3,"options","isLoading"]]},template:function(e,n){if(e&1&&(h(0,"app-status-bar"),o(1,"div",50)(2,"header")(3,"div",51)(4,"h2"),l(5,0),i(),o(6,"p"),l(7,1),i()()(),g(8,qt,9,2),o(9,"section")(10,"div",52)(11,"h3"),l(12,2),i(),o(13,"p"),l(14,3),i()(),o(15,"div",53)(16,"div",54)(17,"img",55),c("click",function(){return n.setLightMode()}),i(),o(18,"img",56),c("click",function(){return n.setDarkMode()}),i()()()(),o(19,"section")(20,"div",52)(21,"h3"),l(22,4),i(),o(23,"p"),l(24,5),i()(),o(25,"div",57),g(26,Zt,15,7)(27,tn,4,1,"div",58),i()(),o(28,"section")(29,"div",52)(30,"h3"),l(31,6),i(),o(32,"p"),l(33,7),i()(),o(34,"div",53)(35,"sh-select",59)(36,"input",60),c("ngModelChange",function(T){return n.updateLocale(T)}),i()()()(),o(37,"section")(38,"div",52)(39,"h3"),l(40,8),i(),o(41,"p"),l(42,9),i()(),o(43,"div",53)(44,"button",61),c("click",function(){return n.changeDefaultClientTo("ngclient")}),G(45,10),h(46,"sh-icon"),y(),i()()(),o(47,"section")(48,"div",52)(49,"h3"),l(50,11),i(),o(51,"p"),l(52,12),i()(),o(53,"div",62)(54,"sh-toggle",63),c("click",function(){return n.updateRemoteAccess()}),o(55,"label"),l(56,13),i()(),g(57,nn,8,3),i()(),o(58,"section")(59,"div",52)(60,"h3"),l(61,14),i(),o(62,"p"),l(63,15),i()(),o(64,"div",53)(65,"sh-toggle",63),c("click",function(){return n.saveDisableTrayIconLogin()}),o(66,"label"),l(67,16),i()()()(),g(68,on,9,5,"section"),o(69,"section")(70,"div",52)(71,"h3"),l(72,17),i(),g(73,sn,2,1,"p"),g(74,an,1,0,"sh-progress-bar",64),i(),o(75,"div",65)(76,"div",66),c("click",function(){return n.setNewChannel("")}),o(77,"sh-radio",67),l(78,18),i(),o(79,"p"),l(80,19),i()(),o(81,"div",66),c("click",function(){return n.setNewChannel("stable")}),o(82,"sh-radio",67),l(83,20),i(),o(84,"p"),l(85,21),i()(),o(86,"div",66),c("click",function(){return n.setNewChannel("beta")}),o(87,"sh-radio",67),l(88,22),i(),o(89,"p"),l(90,23),i()(),o(91,"div",66),c("click",function(){return n.setNewChannel("experimental")}),o(92,"sh-radio",67),l(93,24),i(),o(94,"p"),l(95,25),i()(),o(96,"div",66),c("click",function(){return n.setNewChannel("canary")}),o(97,"sh-radio",67),l(98,26),i(),o(99,"p"),l(100,27),i()()()(),o(101,"section")(102,"div",52)(103,"h3"),l(104,28),i(),o(105,"p"),l(106,29),i()(),o(107,"div",53)(108,"div",68)(109,"sh-range-slider",69)(110,"input",70),L("ngModelChange",function(T){return v(n.timeValue,T)||(n.timeValue=T),T}),i()(),o(111,"sh-select",71)(112,"input",72),c("ngModelChange",function(T){return n.updateTimeType(T)}),i(),le(113,ln,1,1,"ng-template"),i()()()(),g(114,rn,13,5,"section"),i(),h(115,"sh-divider"),o(116,"div",50)(117,"section")(118,"div",73)(119,"h3"),l(120,30),i(),h(121,"app-advanced-options-settings"),i()()(),h(122,"sh-divider")),e&2){let a,T,N;_(8),C(n.isUsingRelay()?-1:8),_(9),M("active",!n.isDarkMode()),_(),M("active",n.isDarkMode()),_(8),C(n.showPassphraseForm()?26:27),_(9),m("options",n.languageOptions())("isClearable",!1)("inlineSearch",!0),_(),m("ngModel",n.langCtrl())("ngModelOptions",V(41,se)),_(18),M("active",n.allowRemoteAccess()),_(3),C(n.allowRemoteAccess()?57:-1),_(8),M("active",n.disableTrayIconLogin()),_(3),C(n.powerModeOptions().length>0?68:-1),_(5),C((a=n.sysinfo())!=null&&a.ServerVersion?73:-1),_(),C(n.updatingChannel()?74:-1),_(3),M("active",n.updateChannel()===""),_(),B((T=n.sysinfo())==null?null:T.DefaultUpdateChannel),H(78),_(2),B((N=n.sysinfo())==null?null:N.ServerVersionType),H(80),_(2),M("active",n.updateChannel()==="stable"),_(5),M("active",n.updateChannel()==="beta"),_(5),M("active",n.updateChannel()==="experimental"),_(5),M("active",n.updateChannel()==="canary"),_(12),m("unit",n.timeType()==="none"?"s":n.timeType()),_(),m("min",n.timeRange()[0])("max",n.timeRange()[1])("disabled",n.timeType()==="none"),A("ngModel",n.timeValue),m("ngModelOptions",V(42,se)),_(),m("options",n.timeTypeOptions())("isClearable",!1),_(),m("ngModel",n.timeType()),_(2),C(n.usageStatisticsDisabled()?-1:114)}},dependencies:[Y,j,dt,K,Q,Z,Ot,oe,z,J,pt,Et,Ct,Nt,mt,te,k,gt,ee,ut],styles:["[_nghost-%COMP%]{display:block}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 2rem 2rem}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem 0;background:var(--base-1);border-bottom:1px solid var(--base-4)}header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}section[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem;padding:2rem 0;border-top:1px solid var(--base-4)}section[_ngcontent-%COMP%]:first-of-type{border-top:0}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;align-items:flex-start}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%] sh-button-group[_ngcontent-%COMP%]{margin-top:.25rem}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;width:50%}.passphrase-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:1rem}.passphrase-form[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.remote-access-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.themes[_ngcontent-%COMP%]{display:flex;gap:.5rem}.themes[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:15rem;border-radius:var(--shape-3);cursor:pointer}.themes[_ngcontent-%COMP%] img.active[_ngcontent-%COMP%]{border:2px solid var(--primary-8)}.radios[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.radio-option[_ngcontent-%COMP%]{cursor:pointer}.radio-option[_ngcontent-%COMP%] sh-radio[_ngcontent-%COMP%]{color:var(--base-8);margin-bottom:.25rem}.radio-option[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;color:var(--base-9)}.field-col[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.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}.advanced-settings[_ngcontent-%COMP%]{grid-column:1/-1;display:grid;grid-template-columns:auto 1fr;gap:1rem}"],changeDetection:0})};export{Tn as debounceSignal,re as default};