@duplicati/ngclient 0.0.103 → 0.0.104
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.
- package/chunk-4Q6ODNBP.js +1 -0
- package/{chunk-S6C4DHJH.js → chunk-4ZN3WNN5.js} +1 -1
- package/chunk-A6D4U7WJ.js +1 -0
- package/chunk-A7ZTKXJV.js +1 -0
- package/chunk-BUACSH3J.js +1 -0
- package/{chunk-K7E5BKU4.js → chunk-CAPSN3YW.js} +1 -1
- package/{chunk-POO6N4RH.js → chunk-D6ZBSPNI.js} +1 -1
- package/chunk-F76OHZKQ.js +1 -0
- package/chunk-HEPECSOH.js +1 -0
- package/chunk-JKUJP6AX.js +1 -0
- package/{chunk-ZJWHMCU4.js → chunk-K75H4GPN.js} +1 -1
- package/chunk-MIQEG35Y.js +1 -0
- package/chunk-N3QUTR5R.js +1 -0
- package/chunk-NN546V2N.js +1 -0
- package/chunk-ON2SWJPL.js +1 -0
- package/chunk-PE5C74CV.js +1 -0
- package/chunk-TRWFWG6W.js +1 -0
- package/chunk-TXZZ7EQH.js +1 -0
- package/{chunk-6OYKPS4F.js → chunk-UKJSH5XP.js} +1 -1
- package/chunk-VWN3PAXR.js +1 -0
- package/chunk-YLYHFDOS.js +1 -0
- package/index.html +1 -1
- package/main-PBNHUSE5.js +1 -0
- package/package.json +1 -1
- package/chunk-2PAPG5UW.js +0 -1
- package/chunk-4YRHMBJK.js +0 -1
- package/chunk-5242ZMFS.js +0 -1
- package/chunk-56BIOJTU.js +0 -1
- package/chunk-5BO226DZ.js +0 -1
- package/chunk-5EOQSHY6.js +0 -1
- package/chunk-5XWXETE2.js +0 -1
- package/chunk-EQ74YCX7.js +0 -1
- package/chunk-GON7FNZR.js +0 -1
- package/chunk-IPNKLO2C.js +0 -1
- package/chunk-LOR4VCVG.js +0 -1
- package/chunk-MYXDJGSR.js +0 -1
- package/chunk-OQNO5JCJ.js +0 -1
- package/chunk-PXG6UWRT.js +0 -1
- package/chunk-S2EID4MC.js +0 -1
- package/chunk-WX5636KE.js +0 -1
- package/chunk-XYENMXJU.js +0 -1
- package/main-DQ77DZR6.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as a,d as b}from"./chunk-K75H4GPN.js";import"./chunk-4B4SNBSE.js";import"./chunk-YRQ33MKD.js";import"./chunk-NYZVIDDD.js";import"./chunk-OELZQ6RK.js";import"./chunk-ON2SWJPL.js";import"./chunk-KEHATBLP.js";import"./chunk-RHW5QVAY.js";import"./chunk-ZVBVR6H4.js";import"./chunk-QTTYDT3P.js";import"./chunk-C4IFBLYB.js";import"./chunk-PX25CWH6.js";import"./chunk-7WCKE7GY.js";import"./chunk-BIHIR35J.js";import"./chunk-6WLXFV43.js";import"./chunk-DYCJPQSE.js";import"./chunk-TKVTCBLW.js";import"./chunk-2IDHF5MN.js";import"./chunk-GM25ACCR.js";import"./chunk-7CGTOI24.js";export{a as createEncryptionForm,b as default};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as fe}from"./chunk-N35UIMLP.js";import{m as P}from"./chunk-2EOGI5U4.js";import"./chunk-Y5T3G6PP.js";import"./chunk-4B4SNBSE.js";import{a as Ne}from"./chunk-YRQ33MKD.js";import"./chunk-UO57IKTF.js";import{a as T}from"./chunk-NYZVIDDD.js";import"./chunk-OELZQ6RK.js";import"./chunk-ARQ6YMHX.js";import{a as Me}from"./chunk-
|
|
1
|
+
import{a as fe}from"./chunk-N35UIMLP.js";import{m as P}from"./chunk-2EOGI5U4.js";import"./chunk-Y5T3G6PP.js";import"./chunk-4B4SNBSE.js";import{a as Ne}from"./chunk-YRQ33MKD.js";import"./chunk-UO57IKTF.js";import{a as T}from"./chunk-NYZVIDDD.js";import"./chunk-OELZQ6RK.js";import"./chunk-ARQ6YMHX.js";import{a as Me}from"./chunk-UKJSH5XP.js";import"./chunk-ON2SWJPL.js";import"./chunk-KEHATBLP.js";import"./chunk-RHW5QVAY.js";import"./chunk-ZVBVR6H4.js";import{c as re,e as le,f as se,i as me,m as de,n as pe,o as _e,q as ce,r as ue,s as Ce,t as ge}from"./chunk-QTTYDT3P.js";import"./chunk-C4IFBLYB.js";import"./chunk-PX25CWH6.js";import{b as q,d as Z,e as J}from"./chunk-7WCKE7GY.js";import"./chunk-BIHIR35J.js";import{a as ee,g as te,k as ne,l as oe,p as ie,t as ae}from"./chunk-6WLXFV43.js";import{a as Q,b as Y}from"./chunk-DYCJPQSE.js";import"./chunk-TKVTCBLW.js";import"./chunk-FQMZSQUI.js";import"./chunk-2IDHF5MN.js";import"./chunk-OD5LGCQE.js";import{Ab as G,Eb as M,Fb as N,Gb as _,Hb as x,Ib as U,Kb as K,Lb as f,Oa as m,Pb as w,X as C,_a as $,ca as S,cc as X,da as E,db as h,dc as z,ec as V,ic as W,jc as j,lb as u,nb as b,qb as B,rb as R,sa as F,sb as y,tb as v,ub as r,vb as o,wb as l,xb as A,yb as O,zc as H}from"./chunk-GM25ACCR.js";import"./chunk-7CGTOI24.js";var Se=()=>[];function Ee(s,t){s&1&&l(0,"spk-progress-bar",12)}function Fe(s,t){if(s&1&&(r(0,"spk-form-field"),l(1,"input",32),o()),s&2){let e=t.$implicit,i=t.$index;m(),w("id","filter-",i,""),u("formControl",e)}}function Ae(s,t){if(s&1){let e=G();r(0,"form",13)(1,"spk-select",14)(2,"label",15),_(3,1),o(),l(4,"input",16),o(),r(5,"spk-form-field")(6,"label",17),_(7,2),o(),l(8,"textarea",18),o(),r(9,"spk-form-field")(10,"label",19),_(11,3),o(),l(12,"textarea",20),o()(),r(13,"spk-divider"),_(14,4),o(),r(15,"form",13)(16,"spk-form-field")(17,"label",21),_(18,5),o(),l(19,"input",22),o(),r(20,"spk-form-field")(21,"label",23),_(22,6),o(),l(23,"input",24),o(),r(24,"app-toggle-card",25),A(25,26),_(26,7),O(),A(27,27),y(28,Fe,2,3,"spk-form-field",null,R),O(),o()(),r(30,"p"),M(31,8),l(32,"a",28),N(),o(),r(33,"app-options-list",29),V("optionsChange",function(a){S(e);let c=f();return z(c.settings,a)||(c.settings=a),E(a)}),o(),r(34,"div",30)(35,"button",31),K("click",function(){S(e);let a=f();return E(a.submit())}),M(36,9),l(37,"spk-icon"),N(),o()()}if(s&2){let e,i=f();u("formGroup",i.baseCmdForm),m(),u("options",(e=i.commandOptions())!==null&&e!==void 0?e:j(10,Se))("inlineSearch",!0),m(14),u("formGroup",i.standardFields),m(9),u("disallowToggle",!0),m(4),v(i.standardFields.controls.filters.controls),m(5),X("options",i.settings),u("hasFreeTextSettings",!0),m(2),b("loader",i.isSubmitting()),m(2),x(i.baseCmdForm.value.command),U(36)}}var d=new ue,Oe=["Bytes","KB","MB","GB","TB","PB"],I=class s{#e=C(P);#t=C(Y);#n=C(Z);#o=C(q);#i=C(Q);#a=T(this.#o.params);commandOptions=T(this.#i.getApiV1Commandline());sizeOptions=F(Oe);isSubmitting=F(!1);optionsFields=this.#e.optionsFields;standardFields=d.group({"backup-id":d.control(""),"backup-name":d.control(""),dbpath:d.control(""),filters:d.array([])});baseCmdForm=d.group({command:d.control("backup"),targetUrl:d.control(""),arguments:d.control("")});finishedLoading=this.#e.finishedLoading;backupId=this.#e.backupId;settings=this.#e.settings;#r=H(()=>{let t=this.#a()?.id;this.#e.backupId.set(t),this.getBackup(t)});getBackup(t){this.#t.getApiV1BackupById({id:t}).subscribe({next:e=>{this.#e.mapScheduleToForm(e.Schedule??null),e.Backup&&(this.mapStandardFieldsToForm(e.Backup),this.mapBaseCmdToForm(e.Backup),this.#e.mapOptionsToForms(e.Backup)),this.#e.finishedLoading.set(!0)}})}mapStandardFieldsToForm(t){this.standardFields.patchValue({dbpath:t.DBPath,"backup-id":t.ID,"backup-name":t.Name}),t.Filters&&t.Filters.length&&t.Filters.map(e=>{this.standardFields.controls.filters.push(d.control(`${e.Include?"":"-"}${e.Expression}`))})}submit(){this.isSubmitting.set(!0);let t=this.baseCmdForm.value,e=t.targetUrl??"",i=t.arguments?.split(`
|
|
2
2
|
`).filter(n=>n.length>0)??[],a=this.standardFields.value,c=a.filters??[],g=[t.command,e,...i,`--backup-name=${a["backup-name"]}`,`--dbpath=${a.dbpath}`,`--backup-id=${a["backup-id"]}`,...c.filter(n=>n).map(n=>n.startsWith("-")?`--exclude=${n?.slice(1)}`:`--include=${n}`),...this.#e.mapFormsToSettings(["backup-id","backup-name","dbpath"]).map(n=>n.Name.startsWith("--")?`${n.Name}=${n.Value}`:`--${n.Name}=${n.Value}`),"--disable-module=console-password-input"];this.#t.postApiV1Commandline({requestBody:g}).subscribe(n=>{n.Status==="OK"&&this.#n.navigate(["backup",this.backupId(),"commandline",n.ID])})}mapBaseCmdToForm(t){let e=t.TargetURL??null;e&&this.baseCmdForm.patchValue({targetUrl:e??"",arguments:t.Sources?.join(`
|
|
3
3
|
`)??""})}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=$({type:s,selectors:[["app-commandline"]],features:[W([P])],decls:8,vars:1,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let e;e=$localize`Command`;let i;i=$localize`TargetUrl`;let a;a=$localize`Commandline Arguments`;let c;c=$localize`Advanced options`;let g;g=$localize`Backup ID`;let n;n=$localize`Backup Name`;let k;k=$localize`Filters`;let D;D=$localize` The backups will be split up into multiple files called volumes. Here you can set the maximum size of the individual volume files. ${"\uFFFD#32\uFFFD"}:START_LINK:Read more${"\uFFFD/#32\uFFFD"}:CLOSE_LINK:`;let L;return L=$localize`${"\uFFFD#37\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#37\uFFFD"}:CLOSE_TAG_SPK_ICON: Run "${"\uFFFD0\uFFFD"}:INTERPOLATION:" command now `,[t,e,i,a,c,g,n,k,D,L,[1,"back"],["type","button","spk-button","","routerLink","/",1,"small"],[1,"indeterminate","primary"],[3,"formGroup"],["placeholder","Select a command...",3,"options","inlineSearch"],["for","command"],["type","text","id","command","formControlName","command"],["for","targetUrl"],["id","targetUrl","autocomplete","off","formControlName","targetUrl"],["for","arguments"],["id","arguments","autocomplete","off","formControlName","arguments"],["for","backup-id"],["id","backup-id","formControlName","backup-id"],["for","backup-name"],["id","backup-name","formControlName","backup-name"],[3,"disallowToggle"],["title",""],["content","","formGroupName","filters"],["href","#",1,"spk-primary"],[3,"optionsChange","options","hasFreeTextSettings"],[1,"form-actions"],["spk-button","",1,"raised","primary",3,"click"],[3,"id","formControl"]]},template:function(e,i){e&1&&(l(0,"app-status-bar"),r(1,"section")(2,"div",10)(3,"button",11),M(4,0),l(5,"spk-icon"),N(),o()(),h(6,Ee,1,0,"spk-progress-bar",12)(7,Ae,38,11),o()),e&2&&(m(6),B(i.finishedLoading()?7:6))},dependencies:[Ce,me,re,le,se,Me,fe,Ne,ge,de,pe,ce,_e,J,oe,te,ne,ae,ie,ee],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;max-width:40rem;padding:2.5rem;gap:1.25rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.form-column[_ngcontent-%COMP%]{display:flex;flex-direction:column}.form-column[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.form-column[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:1rem}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:3fr 1fr;gap:.5rem;align-items:flex-end}"],changeDetection:0})};export{I as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as Ke}from"./chunk-YRQ33MKD.js";import{a as he,b as se}from"./chunk-NYZVIDDD.js";import{a as pe}from"./chunk-U34D3G4S.js";import{a as be}from"./chunk-UKJSH5XP.js";import"./chunk-ON2SWJPL.js";import{a as Be}from"./chunk-KEHATBLP.js";import"./chunk-RHW5QVAY.js";import{a as le}from"./chunk-ZVBVR6H4.js";import"./chunk-QTTYDT3P.js";import"./chunk-C4IFBLYB.js";import"./chunk-PX25CWH6.js";import{b as Ie,e as ke}from"./chunk-7WCKE7GY.js";import"./chunk-BIHIR35J.js";import{a as z,g as _e,j as ve,k as ye,p as re,x as xe}from"./chunk-6WLXFV43.js";import{b as ae}from"./chunk-DYCJPQSE.js";import"./chunk-TKVTCBLW.js";import"./chunk-FQMZSQUI.js";import{j as w,k as oe}from"./chunk-2IDHF5MN.js";import"./chunk-OD5LGCQE.js";import{$b as S,Ab as K,Eb as N,Fb as M,Gb as _,Hb as s,Ib as d,Jb as U,Kb as y,Lb as m,Oa as o,X as R,Zb as F,_a as b,_b as x,bc as Re,ca as D,da as $,db as C,fc as De,gc as $e,hc as X,lb as h,nb as f,nc as u,oc as g,pa as ie,pc as T,qb as E,r as B,rb as I,sa as G,sb as k,tb as v,ub as i,vb as t,wb as c,xb as A,yb as P,yc as fe}from"./chunk-GM25ACCR.js";import{a as te}from"./chunk-7CGTOI24.js";function we(n,a){n&1&&c(0,"spk-progress-bar",31)}function ze(n,a){n&1&&c(0,"div",34)}function Ve(n,a){n&1&&c(0,"div",35)}function We(n,a){n&1&&c(0,"div",36)}function je(n,a){if(n&1&&F(0),n&2){let e=m().$implicit;S(" (",e.data==null?null:e.data.WarningsActualLength," warnings) ")}}function qe(n,a){if(n&1&&(i(0,"details",45)(1,"summary"),N(2,15),c(3,"spk-icon"),i(4,"div",46),c(5,"spk-icon",39),t(),M(),t(),i(6,"div",47)(7,"p"),_(8,16),u(9,"date"),t(),i(10,"p"),_(11,17),u(12,"date"),t(),i(13,"p"),_(14,18),u(15,"durationFormat"),t(),i(16,"p"),_(17,19),t(),c(18,"spk-divider"),i(19,"p"),_(20,20),t(),i(21,"p"),_(22,21),t()()(),i(23,"details",45)(24,"summary")(25,"spk-icon"),F(26,"file-archive"),t(),F(27," Compression phase "),i(28,"div",46)(29,"spk-icon",39),F(30,"caret-down"),t()()(),i(31,"div",47)(32,"p"),_(33,22),u(34,"date"),t(),i(35,"p"),_(36,23),u(37,"date"),t(),i(38,"p"),_(39,24),u(40,"durationFormat"),t(),c(41,"spk-divider"),i(42,"p"),_(43,25),u(44,"bytes"),t(),i(45,"p"),_(46,26),u(47,"bytes"),t(),i(48,"p"),_(49,27),u(50,"bytes"),t(),c(51,"spk-divider"),i(52,"p"),_(53,28),t(),i(54,"p"),_(55,29),t()()()),n&2){let e=m(2).$implicit;o(9),s(T(9,17,e.data==null||e.data.TestResults==null?null:e.data.TestResults.BeginTime,"medium")),d(8),o(3),s(T(12,20,e.data==null||e.data.TestResults==null?null:e.data.TestResults.EndTime,"medium")),d(11),o(3),s(g(15,23,e.data==null||e.data.TestResults==null?null:e.data.TestResults.Duration)),d(14),o(2),s(e.data==null||e.data.TestResults==null?null:e.data.TestResults.VerificationsActualLength),d(17),o(3),s(e.data==null||e.data.TestResults==null?null:e.data.TestResults.WarningsActualLength),d(20),o(2),s(e.data==null||e.data.TestResults==null?null:e.data.TestResults.ErrorsActualLength),d(22),o(12),s(T(34,25,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.BeginTime,"medium")),d(33),o(3),s(T(37,28,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.EndTime,"medium")),d(36),o(3),s(g(40,31,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.Duration)),d(39),o(4),s(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DeletedFileCount)(g(44,33,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DeletedFileSize)),d(43),o(3),s(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DownloadedFileCount)(g(47,35,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DownloadedFileSize)),d(46),o(3),s(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.UploadedFileCount)(g(50,37,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.UploadedFileSize)),d(49),o(3),s(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.WarningsActualLength),d(53),o(2),s(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.ErrorsActualLength),d(55)}}function Je(n,a){if(n&1&&(i(0,"code"),F(1),u(2,"json"),t()),n&2){let e=a.$implicit;o(),x(g(2,1,e))}}function He(n,a){if(n&1&&(i(0,"details",45)(1,"summary"),N(2,30),c(3,"spk-icon"),i(4,"div",46),c(5,"spk-icon",39),t(),M(),t(),i(6,"div",47),k(7,Je,3,3,"code",null,I),t()()),n&2){let e=m(2).$implicit;o(5),s(e.data.VerificationsActualLength),d(2),o(2),v(e.data.Verifications)}}function Qe(n,a){if(n&1&&(i(0,"code"),F(1),u(2,"json"),t()),n&2){let e=a.$implicit;o(),x(g(2,1,e))}}function Ye(n,a){n&1&&(i(0,"p"),F(1,"No errors"),t())}function Ze(n,a){if(n&1&&(i(0,"code"),F(1),u(2,"json"),t()),n&2){let e=a.$implicit;o(),x(g(2,1,e))}}function en(n,a){if(n&1&&(i(0,"section",40)(1,"app-toggle-card",41),A(2,42),i(3,"h3"),_(4,0),t(),P(),A(5,43),i(6,"p"),_(7,1),u(8,"date"),t(),i(9,"p"),_(10,2),u(11,"date"),t(),i(12,"p"),_(13,3),u(14,"durationFormat"),t(),P(),t(),i(15,"app-toggle-card",41),A(16,42),i(17,"h3"),_(18,4),t(),P(),A(19,43),i(20,"p"),_(21,5),u(22,"bytes"),t(),i(23,"p"),_(24,6),u(25,"bytes"),t(),i(26,"p"),_(27,7),u(28,"bytes"),t(),i(29,"p"),_(30,8),u(31,"bytes"),t(),i(32,"p"),_(33,9),t(),i(34,"p"),_(35,10),t(),i(36,"p"),_(37,11),t(),P(),t(),i(38,"div",44),c(39,"spk-divider"),C(40,qe,56,39)(41,He,9,1,"details",45),i(42,"details",45)(43,"summary"),N(44,12),c(45,"spk-icon"),i(46,"div",46),c(47,"spk-icon",39),t(),M(),t(),i(48,"div",47),k(49,Qe,3,3,"code",null,I),t()(),i(51,"details",45)(52,"summary"),N(53,13),c(54,"spk-icon"),i(55,"div",46),c(56,"spk-icon",39),t(),M(),t(),i(57,"div",47),C(58,Ye,2,0,"p"),k(59,Ze,3,3,"code",null,I),t()(),c(61,"spk-divider"),i(62,"details")(63,"summary"),N(64,14),c(65,"spk-icon"),i(66,"div",46),c(67,"spk-icon",39),t(),M(),t(),i(68,"code")(69,"button",48),F(70,"Copy"),t(),F(71),u(72,"json"),t()()()()),n&2){let e=m().$implicit;o(),h("disallowToggle",!0),o(7),s(T(8,22,e.data==null?null:e.data.BeginTime,"medium")),d(7),o(3),s(T(11,25,e.data==null?null:e.data.EndTime,"medium")),d(10),o(3),s(g(14,28,e.data==null?null:e.data.Duration)),d(13),o(),h("disallowToggle",!0),o(7),s(e.data==null?null:e.data.ExaminedFiles)(g(22,30,e.data==null?null:e.data.SizeOfExaminedFiles)),d(21),o(3),s(e.data==null?null:e.data.OpenedFiles)(g(25,32,e.data==null?null:e.data.SizeOfOpenedFiles)),d(24),o(3),s(e.data==null?null:e.data.AddedFiles)(g(28,34,e.data==null?null:e.data.SizeOfAddedFiles)),d(27),o(3),s(e.data==null?null:e.data.ModifiedFiles)(g(31,36,e.data==null?null:e.data.SizeOfModifiedFiles)),d(30),o(2),s(e.data==null?null:e.data.DeletedFiles),d(33),o(2),s(e.data==null?null:e.data.TooLargeFiles),d(35),o(2),s(e.data==null?null:e.data.FilesWithError),d(37),o(3),E((e.data==null?null:e.data.MainOperation)==="Backup"?40:-1),o(),E((e.data==null?null:e.data.MainOperation)==="Test"?41:-1),o(6),s(e.data==null?null:e.data.WarningsActualLength),d(44),o(2),v(e.data==null?null:e.data.Warnings),o(7),s(e.data==null?null:e.data.ErrorsActualLength),d(53),o(2),E((e.data==null||e.data.Errors==null?null:e.data.Errors.length)===0?58:-1),o(),v(e.data==null?null:e.data.Errors),o(12),S(" ",g(72,38,e.data)," ")}}function nn(n,a){if(n&1){let e=K();i(0,"article",32)(1,"header",33),y("click",function(){let r=D(e).$implicit,L=m();return $(L.toggleOpenEntry(r.id))}),C(2,ze,1,0,"div",34)(3,Ve,1,0,"div",35)(4,We,1,0,"div",36),i(5,"h3"),F(6),u(7,"date"),t(),i(8,"p"),F(9),C(10,je,1,1),t(),c(11,"div",37),i(12,"div",38)(13,"spk-icon",39),F(14,"caret-down"),t()()(),C(15,en,73,40,"section",40),t()}if(n&2){let e=a.$implicit,l=m();o(2),E(e.data!=null&&e.data.ErrorsActualLength&&(e.data==null?null:e.data.ErrorsActualLength)>0?2:e.data!=null&&e.data.WarningsActualLength&&(e.data==null?null:e.data.WarningsActualLength)>0?3:4),o(4),x(T(7,7,e.timestamp,"medium")),o(3),S(" ",e.data==null?null:e.data.MainOperation," "),o(),E(e.data!=null&&e.data.WarningsActualLength&&(e.data==null?null:e.data.WarningsActualLength)>0?10:-1),o(3),f("open",e.id===l.openEntry()),o(2),E(e.id===l.openEntry()?15:-1)}}var de=class n{#e=R(ae);backupId=ie.required();openEntry=G(null);pagination=G({offset:0,pagesize:100});resource=se({request:()=>te({id:this.backupId()},this.pagination()),loader:({request:a})=>this.#e.getApiV1BackupByIdLog({id:a.id,pagesize:100}).pipe(B(e=>e.map(l=>({id:l.ID,operationId:l.OperationID,timestamp:l.Timestamp*1e3,type:l.Type,data:JSON.parse(l.Message),exception:JSON.stringify(l.Exception)==="{}"?null:l.Exception}))))});toggleOpenEntry(a){if(this.openEntry()===a){this.openEntry.set(null);return}this.openEntry.set(a)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=b({type:n,selectors:[["app-general-log"]],inputs:{backupId:[1,"backupId"]},decls:3,vars:1,consts:()=>{let a;a=$localize`Time`;let e;e=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let l;l=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let r;r=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let L;L=$localize`Source files`;let V;V=$localize`Evaluated: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:)`;let W;W=$localize`Opened: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:)`;let j;j=$localize`Added: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:)`;let q;q=$localize`Modified: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:)`;let J;J=$localize`Deleted: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let H;H=$localize`Too large: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Q;Q=$localize`Files with error: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let O;O=$localize`${"\uFFFD#45\uFFFD"}:START_TAG_SPK_ICON:warning-circle${"[\uFFFD/#45\uFFFD|\uFFFD/#47\uFFFD]"}:CLOSE_TAG_SPK_ICON: Warnings ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#46\uFFFD"}:START_TAG_DIV:${"\uFFFD#47\uFFFD"}:START_TAG_SPK_ICON_1:caret-down${"[\uFFFD/#45\uFFFD|\uFFFD/#47\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#46\uFFFD"}:CLOSE_TAG_DIV:`,O=U(O);let Y;Y=$localize`${"\uFFFD#54\uFFFD"}:START_TAG_SPK_ICON:warning${"[\uFFFD/#54\uFFFD|\uFFFD/#56\uFFFD]"}:CLOSE_TAG_SPK_ICON: Errors ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#55\uFFFD"}:START_TAG_DIV:${"\uFFFD#56\uFFFD"}:START_TAG_SPK_ICON_1:caret-down${"[\uFFFD/#54\uFFFD|\uFFFD/#56\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#55\uFFFD"}:CLOSE_TAG_DIV:`,Y=U(Y);let Z;Z=$localize`${"\uFFFD#65\uFFFD"}:START_TAG_SPK_ICON:notepad${"[\uFFFD/#65\uFFFD|\uFFFD/#67\uFFFD]"}:CLOSE_TAG_SPK_ICON: Complete log ${"\uFFFD#66\uFFFD"}:START_TAG_DIV:${"\uFFFD#67\uFFFD"}:START_TAG_SPK_ICON_1:caret-down${"[\uFFFD/#65\uFFFD|\uFFFD/#67\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#66\uFFFD"}:CLOSE_TAG_DIV:`,Z=U(Z);let ee;ee=$localize`${"\uFFFD#3\uFFFD"}:START_TAG_SPK_ICON:circle-half-tilt${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SPK_ICON: Test phase ${"\uFFFD#4\uFFFD"}:START_TAG_DIV:${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON_1:caret-down${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_DIV:`,ee=U(ee);let Fe;Fe=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let ge;ge=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Ee;Ee=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let me;me=$localize`Verifications: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Ce;Ce=$localize`Warnings: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Oe;Oe=$localize`Errors: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Le;Le=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Te;Te=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Ae;Ae=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Pe;Pe=$localize` Deleted files: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let Se;Se=$localize` Downloaded files: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let Ge;Ge=$localize` Uploaded files: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let Ne;Ne=$localize`Warnings: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Me;Me=$localize`Errors: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let ne;return ne=$localize`${"\uFFFD#3\uFFFD"}:START_TAG_SPK_ICON:warning-circle${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SPK_ICON: Verifications ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#4\uFFFD"}:START_TAG_DIV:${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON_1:caret-down${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_DIV:`,ne=U(ne),[a,e,l,r,L,V,W,j,q,J,H,Q,O,Y,Z,ee,Fe,ge,Ee,me,Ce,Oe,Le,Te,Ae,Pe,Se,Ge,Ne,Me,ne,[1,"indeterminate","primary"],[1,"log-entry"],[3,"click"],[1,"status","error"],[1,"status","warn"],[1,"status"],[1,"spacer"],[1,"action"],[1,"toggle-indicator"],[1,"log-content"],[3,"disallowToggle"],["title",""],["content",""],[1,"extra-info"],["name","details"],[1,"actions"],[1,"content"],["spk-button","",1,"small"]]},template:function(e,l){e&1&&(C(0,we,1,0,"spk-progress-bar",31),k(1,nn,16,10,"article",32,I)),e&2&&(E(l.resource.isLoading()?0:-1),o(),v(l.resource.value()))},dependencies:[Ke,ye,re,_e,z,le,w,pe,oe],styles:["[_nghost-%COMP%]{display:block}.log-entry[_ngcontent-%COMP%]{display:flex;flex-direction:column;cursor:pointer}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:1rem;border-bottom:1px solid var(--base-level-40);background-color:var(--base-level-10);cursor:pointer}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]:hover{background-color:var(--base-level-20)}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-30);margin:0}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-level-60)}.toggle-indicator[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;height:1.25rem;transition:transform 125ms linear}.toggle-indicator.open[_ngcontent-%COMP%]{transform:rotate(180deg)}details[_ngcontent-%COMP%]{display:flex;flex-direction:column}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;gap:.5rem;padding:.75rem;border-radius:var(--shape-2);background-color:var(--base-level-20)}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]:focus{outline:none}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]:hover{background-color:var(--base-level-30)}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]::marker{font-size:0}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;flex:1 0;gap:.5rem;-webkit-user-select:none;user-select:none}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;height:2rem;transition:transform 125ms linear}details[open][_ngcontent-%COMP%] summary[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{transform:rotate(180deg)}details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{padding:.75rem 1rem 0;display:flex;flex-direction:column;gap:.75rem}details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0}details[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{margin-top:.75rem;position:relative}details[_ngcontent-%COMP%] code[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{position:absolute;top:.75rem;right:.75rem}.extra-info[_ngcontent-%COMP%]{grid-column:1/-1;display:flex;flex-direction:column;gap:1rem}.extra-info[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;margin-bottom:.75rem}.extra-info[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{white-space:pre-wrap;padding:1rem;display:block;border-radius:var(--shape-2);background-color:var(--base-level-20)}.log-content[_ngcontent-%COMP%]{padding:1rem;display:grid;grid-template-columns:1fr 1fr;gap:1rem}.status[_ngcontent-%COMP%]{display:block;width:1rem;height:1rem;background-color:var(--success-500);border-radius:50%}.status.error[_ngcontent-%COMP%]{background-color:var(--error-500)}.status.warn[_ngcontent-%COMP%]{background-color:var(--warn-500)}"],changeDetection:0})};function tn(n,a){n&1&&c(0,"spk-progress-bar",0)}function on(n,a){if(n&1&&(i(0,"section",5)(1,"code"),F(2),u(3,"json"),t()()),n&2){let e=m().$implicit;o(2),x(g(3,1,e.data))}}function an(n,a){if(n&1){let e=K();i(0,"article",1)(1,"header",2),y("click",function(){let r=D(e).$implicit,L=m();return $(L.toggleOpenEntry(r.id))}),i(2,"h3"),F(3),u(4,"date"),t(),i(5,"div",3)(6,"spk-icon",4),F(7,"caret-down"),t()()(),C(8,on,4,3,"section",5),t()}if(n&2){let e=a.$implicit,l=m();o(3),Re("",T(4,6,e.timestamp,"medium"),": ",e.operation," ",e.path,""),o(3),f("open",e.id===l.openEntry()),o(2),E(e.id===l.openEntry()?8:-1)}}var ue=class n{#e=R(ae);backupId=ie.required();openEntry=G(null);pagination=G({offset:0,pagesize:100});resource=se({request:()=>te({id:this.backupId()},this.pagination()),loader:({request:a})=>this.#e.getApiV1BackupByIdRemotelog({id:a.id,pagesize:100}).pipe(B(e=>e.map((l,r)=>({id:l.ID,operationId:l.OperationID,timestamp:l.Timestamp*1e3,operation:l.Operation,path:l.Path,data:typeof l.Data=="string"?JSON.parse(l.Data):null}))))});toggleOpenEntry(a){if(this.openEntry()===a){this.openEntry.set(null);return}this.openEntry.set(a)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=b({type:n,selectors:[["app-remote-log"]],inputs:{backupId:[1,"backupId"]},decls:3,vars:1,consts:[[1,"indeterminate","primary"],[1,"log-entry"],[3,"click"],[1,"actions"],[1,"toggle-indicator"],[1,"log-content"]],template:function(e,l){e&1&&(C(0,tn,1,0,"spk-progress-bar",0),k(1,an,9,9,"article",1,I)),e&2&&(E(l.resource.isLoading()?0:-1),o(),v(l.resource.value()))},dependencies:[oe,re,z,w],styles:["[_nghost-%COMP%]{display:block}.log-entry[_ngcontent-%COMP%]{display:flex;flex-direction:column}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:1rem;border-bottom:1px solid var(--base-level-40);background-color:var(--base-level-10);cursor:pointer}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]:hover{background-color:var(--base-level-20)}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-30);margin:0;-webkit-user-select:none;user-select:none}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-level-60)}.toggle-indicator[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;height:1.25rem;transition:transform 125ms linear}.toggle-indicator.open[_ngcontent-%COMP%]{transform:rotate(180deg)}.log-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:1rem}code[_ngcontent-%COMP%]{white-space:pre-wrap;padding:1rem;display:block;border-radius:var(--shape-2);background-color:var(--base-level-20)}"],changeDetection:0})};function ln(n,a){if(n&1&&(F(0," - "),A(1),_(2,6),P(),F(3),u(4,"durationFormat")),n&2){m(2);let e=X(6);o(3),S(" ",g(4,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.LastBackupDuration)," ")}}function _n(n,a){n&1&&(A(0),_(1,7),P())}function rn(n,a){if(n&1&&(F(0),u(1,"bytes")),n&2){m(2);let e=X(6);S(" ",g(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.SourceFilesSize)," ")}}function pn(n,a){n&1&&(A(0),_(1,8),P())}function sn(n,a){if(n&1&&(F(0),u(1,"bytes")),n&2){m(2);let e=X(6);S(" ",g(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.TargetFilesSize)," ")}}function dn(n,a){n&1&&(A(0),_(1,9),P())}function un(n,a){if(n&1&&(i(0,"spk-chip",19),_(1,10),t()),n&2){m(2);let e=X(6);o(),s(e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.BackupListCount),d(1)}}function cn(n,a){n&1&&(i(0,"spk-chip",20),_(1,11),t())}function Fn(n,a){if(n&1&&(i(0,"div",14)(1,"div",18)(2,"h3"),F(3),i(4,"spk-icon"),F(5,"database"),t()(),i(6,"p")(7,"span"),_(8,3),t(),F(9),u(10,"date"),C(11,ln,5,3)(12,_n,2,0,"ng-container"),t(),i(13,"p")(14,"span"),_(15,4),t(),C(16,rn,2,3)(17,pn,2,0,"ng-container"),t(),i(18,"p")(19,"span"),_(20,5),t(),C(21,sn,2,3)(22,dn,2,0,"ng-container"),t()(),C(23,un,2,1,"spk-chip",19)(24,cn,2,0,"spk-chip",20),t()),n&2){let e,l=m(),r=X(6);o(3),S(" ",(e=r.Backup==null?null:r.Backup.Name)!==null&&e!==void 0?e:l.MISSING_BACKUP_NAME," "),o(6),S(" ",T(10,6,r.Backup==null||r.Backup.Metadata==null?null:r.Backup.Metadata.LastBackupDate,"short")," "),o(2),E(!(r.Backup==null||r.Backup.Metadata==null)&&r.Backup.Metadata.LastBackupDuration?11:12),o(5),E(!(r.Backup==null||r.Backup.Metadata==null)&&r.Backup.Metadata.SourceFilesSize?16:17),o(5),E(!(r.Backup==null||r.Backup.Metadata==null)&&r.Backup.Metadata.TargetFilesSize?21:22),o(2),E(!(r.Backup==null||r.Backup.Metadata==null)&&r.Backup.Metadata.BackupListCount?23:24)}}function gn(n,a){if(n&1&&c(0,"app-general-log",17),n&2){let e=m();h("backupId",e.backupId())}}function En(n,a){if(n&1&&c(0,"app-remote-log",17),n&2){let e=m();h("backupId",e.backupId())}}var ce=class n{#e=R(Ie);#n=R(Be);MISSING_BACKUP_NAME=$localize`Backup name missing`;activeTab=G("general");backupId=he(this.#e.params.pipe(B(a=>a.id)));backup=fe(()=>{let a=this.backupId();return a?this.#n.getBackupById(a):null});static \u0275fac=function(e){return new(e||n)};static \u0275cmp=b({type:n,selectors:[["app-log"]],decls:15,vars:8,consts:()=>{let a;a=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let e;e=$localize`General`;let l;l=$localize` Destination `;let r;r=$localize`Last successful backup:`;let L;L=$localize`Source:`;let V;V=$localize`Destination:`;let W;W=$localize`took`;let j;j=$localize`N/A`;let q;q=$localize`N/A`;let J;J=$localize`N/A`;let H;H=$localize`${"\uFFFD0\uFFFD"}:INTERPOLATION: Version`;let Q;return Q=$localize`No version yet`,[a,e,l,r,L,V,W,j,q,J,H,Q,[1,"back"],["type","button","spk-button","","routerLink","/",1,"small"],[1,"backup"],[1,"primary"],["tab","",3,"click"],[3,"backupId"],[1,"text"],[1,"simple","success"],[1,"simple"]]},template:function(e,l){if(e&1){let r=K();c(0,"app-status-bar"),i(1,"section")(2,"div",12)(3,"button",13),N(4,0),c(5,"spk-icon"),M(),t()(),De(6),C(7,Fn,25,9,"div",14),i(8,"spk-tabs",15)(9,"button",16),y("click",function(){return D(r),$(l.activeTab.set("general"))}),_(10,1),t(),i(11,"button",16),y("click",function(){return D(r),$(l.activeTab.set("destination"))}),_(12,2),t()(),C(13,gn,1,1,"app-general-log",17)(14,En,1,1,"app-remote-log",17),t()}if(e&2){o(6);let r=$e(l.backup());o(),E(r?7:-1),o(2),f("active",l.activeTab()==="general"),o(2),f("active",l.activeTab()==="destination"),o(2),E(l.activeTab()==="general"?13:-1),o(),E(l.activeTab()==="destination"?14:-1)}},dependencies:[xe,de,ue,ke,le,pe,w,be,z,_e,ve],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:1rem 1.5rem;gap:1rem}spk-tabs[_ngcontent-%COMP%]{margin-bottom:1rem}.backup[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem;gap:1rem;border:1px solid var(--base-level-40);border-radius:var(--shape-3);box-shadow:var(--shadow-1)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;width:100%;max-width:40%}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{color:var(--base-level-60)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-level-60)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--base-level-70)}"],changeDetection:0})};export{ce as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{m as g}from"./chunk-2EOGI5U4.js";import"./chunk-Y5T3G6PP.js";import"./chunk-4B4SNBSE.js";import"./chunk-YRQ33MKD.js";import"./chunk-UO57IKTF.js";import{a as k}from"./chunk-NYZVIDDD.js";import"./chunk-OELZQ6RK.js";import"./chunk-ARQ6YMHX.js";import{a as I}from"./chunk-UKJSH5XP.js";import"./chunk-ON2SWJPL.js";import{a as N}from"./chunk-KEHATBLP.js";import"./chunk-RHW5QVAY.js";import"./chunk-ZVBVR6H4.js";import"./chunk-QTTYDT3P.js";import"./chunk-C4IFBLYB.js";import"./chunk-PX25CWH6.js";import{b as P,c as h,e as E,f as B}from"./chunk-7WCKE7GY.js";import"./chunk-BIHIR35J.js";import{p as $,q as M,v as b}from"./chunk-6WLXFV43.js";import{b as O}from"./chunk-DYCJPQSE.js";import"./chunk-TKVTCBLW.js";import"./chunk-FQMZSQUI.js";import"./chunk-2IDHF5MN.js";import"./chunk-OD5LGCQE.js";import{D as m,Eb as d,Fb as c,Oa as r,X as l,_a as f,db as C,ic as R,lb as u,lc as _,qb as D,ub as s,vb as p,wb as n,zc as A}from"./chunk-GM25ACCR.js";import"./chunk-7CGTOI24.js";var K=(i,e)=>[i,e,"general"],L=(i,e)=>[i,e,"destination"],v=(i,e)=>[i,e,"source-data"],G=(i,e)=>[i,e,"schedule"],y=(i,e)=>[i,e,"options"];function U(i,e){i&1&&n(0,"spk-progress-bar",6)}function X(i,e){i&1&&(s(0,"section"),n(1,"router-outlet"),p())}var T=class i{#t=l(P);#e=l(g);#a=l(N);#i=l(O);isDraft=this.#e.isDraft;backupId=this.#e.backupId;finishedLoading=this.#e.finishedLoading;#o=k(this.#t.params);#n=k(this.#t.url);paramsChanged=A(()=>{let e=this.#o()?.id,a=!!this.#n()?.find(t=>t.path==="backup-draft");this.#e.backupId.set(e),e!=="new"?this.getBackup(e,a):this.getDefaults()});getDefaults(){this.#i.getApiV1Backupdefaults().pipe(m(1)).subscribe({next:e=>{this.#e.mapScheduleToForm(e.Schedule),this.#e.mapOptionsToForms(e.Backup),this.#e.backupDefaults.set(e),this.#e.finishedLoading.set(!0)}})}getBackup(e,a=!1){let t=o=>{this.#e.mapScheduleToForm(o.Schedule??null),o.Backup&&(this.#e.mapGeneralToForm(o.Backup),this.#e.mapDestinationToForm(o.Backup),this.#e.mapSourceDataToForm(o.Backup),this.#e.mapOptionsToForms(o.Backup)),this.#e.finishedLoading.set(!0)};if(a){this.isDraft.set(a);let o=this.#a.draftBackups().find(F=>F.id===e);if(!o){alert("Backup not found");return}t(o.data)}else this.#i.getApiV1BackupById({id:e}).subscribe({next:t})}static \u0275fac=function(a){return new(a||i)};static \u0275cmp=f({type:i,selectors:[["app-backup"]],features:[R([g])],decls:20,vars:21,consts:()=>{let e;e=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_RADIO: General `;let a;a=$localize`${"\uFFFD#8\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_SPK_RADIO: Destination `;let t;t=$localize`${"\uFFFD#11\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SPK_RADIO: Source Data `;let o;o=$localize`${"\uFFFD#14\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SPK_RADIO: Schedule `;let F;return F=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_RADIO: Options `,[e,a,t,o,F,["step","","routerLinkActive","active",3,"routerLink"],[1,"indeterminate","primary"]]},template:function(a,t){a&1&&(n(0,"app-status-bar"),s(1,"header")(2,"spk-stepper")(3,"div",5),d(4,0),n(5,"spk-radio"),c(),p(),s(6,"div",5),d(7,1),n(8,"spk-radio"),c(),p(),s(9,"div",5),d(10,2),n(11,"spk-radio"),c(),p(),s(12,"div",5),d(13,3),n(14,"spk-radio"),c(),p(),s(15,"div",5),d(16,4),n(17,"spk-radio"),c(),p()()(),C(18,U,1,0,"spk-progress-bar",6)(19,X,2,0,"section")),a&2&&(r(3),u("routerLink",_(6,K,t.isDraft()?"/backup-draft":"/backup",t.backupId())),r(3),u("routerLink",_(9,L,t.isDraft()?"/backup-draft":"/backup",t.backupId())),r(3),u("routerLink",_(12,v,t.isDraft()?"/backup-draft":"/backup",t.backupId())),r(3),u("routerLink",_(15,G,t.isDraft()?"/backup-draft":"/backup",t.backupId())),r(3),u("routerLink",_(18,y,t.isDraft()?"/backup-draft":"/backup",t.backupId())),r(3),D(t.finishedLoading()?19:18))},dependencies:[h,E,B,I,M,b,$],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%}header[_ngcontent-%COMP%]{padding:1rem 1.5rem;border-bottom:1px solid var(--base-level-40)}header[_ngcontent-%COMP%] spk-stepper[_ngcontent-%COMP%]{width:100%}section[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:center;flex:1 0;overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:auto}"],changeDetection:0})};export{T as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e as a,f as b}from"./chunk-K75H4GPN.js";import"./chunk-4B4SNBSE.js";import"./chunk-YRQ33MKD.js";import"./chunk-NYZVIDDD.js";import"./chunk-OELZQ6RK.js";import"./chunk-ON2SWJPL.js";import"./chunk-KEHATBLP.js";import"./chunk-RHW5QVAY.js";import"./chunk-ZVBVR6H4.js";import"./chunk-QTTYDT3P.js";import"./chunk-C4IFBLYB.js";import"./chunk-PX25CWH6.js";import"./chunk-7WCKE7GY.js";import"./chunk-BIHIR35J.js";import"./chunk-6WLXFV43.js";import"./chunk-DYCJPQSE.js";import"./chunk-TKVTCBLW.js";import"./chunk-2IDHF5MN.js";import"./chunk-GM25ACCR.js";import"./chunk-7CGTOI24.js";export{a as createRestoreSelectFilesForm,b as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as Yt}from"./chunk-ZJWHMCU4.js";import{a as Qt,b as Jt,m as tt}from"./chunk-2EOGI5U4.js";import{a as Xt,b as qt}from"./chunk-Y5T3G6PP.js";import{a as Wt}from"./chunk-4B4SNBSE.js";import{a as jt}from"./chunk-YRQ33MKD.js";import"./chunk-UO57IKTF.js";import"./chunk-NYZVIDDD.js";import"./chunk-OELZQ6RK.js";import{a as b}from"./chunk-ARQ6YMHX.js";import"./chunk-5242ZMFS.js";import"./chunk-ZVBVR6H4.js";import"./chunk-OQNO5JCJ.js";import"./chunk-KEHATBLP.js";import"./chunk-RHW5QVAY.js";import{b as wt,c as At,e as vt,f as Pt,g as Vt,i as bt,j as Mt,m as Gt,n as Bt,o as Lt,p as Ut,q as Ht,r as Kt,t as zt}from"./chunk-QTTYDT3P.js";import"./chunk-C4IFBLYB.js";import"./chunk-PX25CWH6.js";import{b as ft,d as Dt}from"./chunk-7WCKE7GY.js";import"./chunk-BIHIR35J.js";import{A as $t,a as Et,b as Ot,d as xt,e as kt,l as Rt,o as Nt,p as ht,t as yt,z as It}from"./chunk-6WLXFV43.js";import{b as St}from"./chunk-DYCJPQSE.js";import{c as gt}from"./chunk-TKVTCBLW.js";import{i as Ct}from"./chunk-2IDHF5MN.js";import{$b as D,Ab as S,E as it,Eb as O,Fb as x,Gb as G,Hb as q,Ib as j,Jb as H,Kb as f,Lb as p,Oa as o,Ob as N,Qb as lt,Rb as T,Va as at,Wb as st,X as y,Xb as pt,Yb as P,Zb as c,_a as rt,_b as Q,ac as ct,ca as C,cc as _t,da as g,db as m,dc as mt,ec as Ft,fc as J,gc as Y,ha as ot,hc as Z,ic as ut,jc as dt,kc as B,lb as _,mc as L,nb as X,qb as u,qc as U,rb as I,sa as R,sb as $,tb as w,ub as s,vb as r,wb as d,xb as A,yb as v,yc as K,zb as M,zc as Tt}from"./chunk-GM25ACCR.js";import"./chunk-7CGTOI24.js";var Zt=["formRef"],te=(n,i,t,e)=>({index:n,formView:i,formGroupName:"custom",destinationType:t,oauthField:e}),W=n=>({$implicit:n}),ee=(n,i,t,e)=>({index:n,formView:i,formGroupName:"dynamic",destinationType:t,oauthField:e}),ne=(n,i,t,e)=>({index:n,formView:i,formGroupName:"advanced",destinationType:t,oauthField:e}),ie=(n,i,t,e)=>({index:n,formView:i,formGroupName:"advanced",asHttpOptions:!0,destinationType:t,oauthField:e}),oe=()=>({maxWidth:"700px",width:"100%"});function ae(n,i){n&1&&(O(0,5,2),d(1,"spk-icon"),x())}function re(n,i){n&1&&G(0,5,3)}function le(n,i){if(n&1){let t=S();O(0,5,1),s(1,"button",21),f("click",function(){C(t);let a=p();return g(a.testDestination())}),m(2,ae,2,0)(3,re,1,0),r(),x()}if(n&2){let t=p();o(),X("success",t.successfulTest()),o(),u(t.successfulTest()?2:3)}}function se(n,i){if(n&1){let t=S();s(0,"p",27),f("click",function(){C(t);let a=p();return g(a.removeDestinationFormGroup(a.destinationCount()-1))}),O(1,8),d(2,"span",28),x(),r()}}function pe(n,i){if(n&1){let t=S();s(0,"div",34),f("click",function(){let a=C(t).$implicit,l=p(2);return g(l.addDestinationFormGroup(a.key))}),s(1,"h3"),c(2),r(),s(3,"p"),c(4),r()()}if(n&2){let t=i.$implicit;o(2),Q(t.displayName),o(2),Q(t.description)}}function ce(n,i){if(n&1){let t=S();s(0,"button",35,1),f("click",function(){let a=C(t).$implicit,l=p(2);return g(l.addDestinationFormGroup(a.key))}),c(2),r()}if(n&2){let t=i.$implicit;o(2),D(" ",t.displayName," ")}}function _e(n,i){if(n&1&&(s(0,"div",29),$(1,pe,5,2,"div",30,I),r(),s(3,"spk-menu",31)(4,"button",32),G(5,9),r(),A(6,20),$(7,ce,3,1,"button",33,I),v(),r()),n&2){let t=p();o(),w(t.destinationTypeOptionsFocused()),o(2),_("searchable",!0),o(4),w(t.destinationTypeOptionsNotFocused())}}function me(n,i){n&1&&M(0)}function Fe(n,i){if(n&1&&m(0,me,1,0,"ng-container",40),n&2){let t,e=i.$implicit,a=i.$index;p();let l=P(29),F=p();_("ngTemplateOutlet",l)("ngTemplateOutletContext",B(7,W,L(2,te,a,e,(t=F.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,F.destinationFormPair().oauthField)))}}function ue(n,i){n&1&&M(0)}function de(n,i){if(n&1&&m(0,ue,1,0,"ng-container",40),n&2){let t,e=i.$implicit,a=i.$index;p();let l=P(29),F=p();_("ngTemplateOutlet",l)("ngTemplateOutletContext",B(7,W,L(2,ee,a,e,(t=F.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,F.destinationFormPair().oauthField)))}}function Te(n,i){if(n&1){let t=S();O(0,10,1),s(1,"button",35,1),f("click",function(){let a=C(t).$implicit,l=p(2);return g(l.addAdvancedFormPair(a,0))}),r(),x()}if(n&2){let t=i.$implicit;o(),q(t.name),j(0)}}function Ce(n,i){n&1&&M(0)}function ge(n,i){if(n&1&&m(0,Ce,1,0,"ng-container",40),n&2){let t,e=i.$implicit,a=i.$index;p();let l=P(29),F=p();_("ngTemplateOutlet",l)("ngTemplateOutletContext",B(7,W,L(2,ne,a,e,(t=F.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,F.destinationFormPair().oauthField)))}}function fe(n,i){if(n&1){let t=S();O(0,11,1),s(1,"button",35,1),f("click",function(){let a=C(t).$implicit,l=p(2);return g(l.addHttpOption(a,0))}),r(),x()}if(n&2){let t=i.$implicit;o(),q(t.name),j(0)}}function De(n,i){n&1&&M(0)}function Se(n,i){if(n&1&&m(0,De,1,0,"ng-container",40),n&2){let t,e=i.$implicit,a=i.$index;p();let l=P(29),F=p();_("ngTemplateOutlet",l)("ngTemplateOutletContext",B(7,W,L(2,ie,a,e,(t=F.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,F.destinationFormPair().oauthField)))}}function Ee(n,i){if(n&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),c(2,"question"),r()()),n&2){let t=p(2).$implicit;_("message",t.formView.longDescription)}}function Oe(n,i){if(n&1&&(s(0,"app-file-tree",43)(1,"label",47),c(2),m(3,Ee,3,1,"spk-tooltip",48),r(),d(4,"input",49),r()),n&2){let t,e=p().$implicit,a=p(2);_("startingPath",a.getFormFieldValue(0,e.formGroupName,e.formView.name))("accepts",e.formView.accepts)("showFiles",!0)("hideShortcuts",!0)("showHiddenNodes",!0)("selectFiles",!0),o(),T("for","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),o(),D(" ",(t=e.formView.shortDescription)!==null&&t!==void 0?t:e.formView.name," "),o(),u(e.formView.longDescription?3:-1),o(),T("id","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),N("formControlName",e.formView.name)}}function xe(n,i){if(n&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),c(2,"question"),r()()),n&2){let t=p(2).$implicit;_("message",t.formView.longDescription)}}function ke(n,i){if(n&1&&(s(0,"app-file-tree",44)(1,"label",47),c(2),m(3,xe,3,1,"spk-tooltip",48),r(),d(4,"input",49),r()),n&2){let t,e=p().$implicit,a=p(2);_("hideShortcuts",!0)("startingPath",a.getFormFieldValue(0,e.formGroupName,e.formView.name)),o(),T("for","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),o(),D(" ",(t=e.formView.shortDescription)!==null&&t!==void 0?t:e.formView.name," "),o(),u(e.formView.longDescription?3:-1),o(),T("id","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),N("formControlName",e.formView.name)}}function Re(n,i){if(n&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),c(2,"question"),r()()),n&2){let t=p(2).$implicit;_("message",t.formView.longDescription)}}function Ne(n,i){n&1&&(s(0,"spk-icon",51),c(1,"link"),r())}function he(n,i){n&1&&(s(0,"spk-icon",51),c(1,"envelope"),r())}function ye(n,i){n&1&&(s(0,"spk-icon",51),c(1,"textbox"),r())}function Ie(n,i){if(n&1&&(s(0,"spk-form-field")(1,"label",47),c(2),m(3,Re,3,1,"spk-tooltip",48),r(),d(4,"input",50),m(5,Ne,2,0,"spk-icon",51)(6,he,2,0,"spk-icon",51)(7,ye,2,0,"spk-icon",51),r()),n&2){let t,e=p().$implicit;o(),T("for","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),o(),D(" ",(t=e.formView.shortDescription)!==null&&t!==void 0?t:e.formView.name," "),o(),u(e.formView.longDescription?3:-1),o(),T("id","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),N("formControlName",e.formView.name),_("type",e.formView.type==="Email"?"email":"text"),o(),u(e.formView.type==="Path"?5:e.formView.type==="Email"?6:7)}}function $e(n,i){if(n&1){let t=S();s(0,"span",55),f("click",function(){C(t);let a=p(2).$implicit,l=p(2);return g(l.oauthStartTokenCreation(a.destinationType))}),c(1,"AuthID"),r()}}function we(n,i){n&1&&(s(0,"spk-icon",51),c(1,"password"),r())}function Ae(n,i){if(n&1){let t=S();s(0,"spk-icon",56),f("click",function(){C(t);let a=p(2).$implicit;return g(a.formView.showPassword=!a.formView.showPassword)}),c(1," eye "),r()}}function ve(n,i){if(n&1){let t=S();s(0,"spk-icon",56),f("click",function(){C(t);let a=p(2).$implicit;return g(a.formView.showPassword=!a.formView.showPassword)}),c(1," eye-slash "),r()}}function Pe(n,i){if(n&1&&(s(0,"spk-form-field")(1,"label",47),c(2),r(),d(3,"input",52),m(4,$e,2,0,"span",53)(5,we,2,0,"spk-icon",51)(6,Ae,2,0,"spk-icon",54)(7,ve,2,0,"spk-icon",54),r()),n&2){let t,e=p().$implicit;o(),T("for","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),o(),D(" ",(t=e.formView.shortDescription)!==null&&t!==void 0?t:e.formView.name," "),o(),T("id","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),N("formControlName",e.formView.name),_("type",e.formView.showPassword?"text":"password"),o(),u(e.oauthField===e.formView.name?4:5),o(2),u(e.formView.showPassword?6:7)}}function Ve(n,i){if(n&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),c(2,"question"),r()()),n&2){let t=p(3).$implicit;_("message",t.formView.longDescription)}}function be(n,i){if(n&1&&c(0),n&2){let t=i.$implicit;D(" ",t," ")}}function Me(n,i){if(n&1&&(s(0,"spk-select",57)(1,"label",47),c(2),m(3,Ve,3,1,"spk-tooltip",48),r(),d(4,"input",49),r(),m(5,be,1,1,"ng-template",null,3,U)),n&2){let t,e=P(6);p();let a=Z(0),l=p().$implicit;_("options",a)("isClearable",!1)("optionTemplate",e),o(),T("for","destination-",l.formGroupName,"-",l.index,"-",l.asHttpOptions?"http":"other",""),o(),D(" ",(t=l.formView.shortDescription)!==null&&t!==void 0?t:l.formView.name," "),o(),u(l.formView.longDescription?3:-1),o(),T("id","destination-",l.formGroupName,"-",l.index,"-",l.asHttpOptions?"http":"other",""),N("formControlName",l.formView.name)}}function Ge(n,i){if(n&1&&(J(0),m(1,Me,7,14)),n&2){let t=p().$implicit,e=Y(t.formView.loadOptions?t.formView.loadOptions(p(2).injector)():t.formView.options);o(),u(e?1:-1)}}function Be(n,i){if(n&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),c(2,"question"),r()()),n&2){let t=p(3).$implicit;_("message",t.formView.longDescription)}}function Le(n,i){if(n&1&&c(0),n&2){let t=i.$implicit;ct(" ",t.key," ",t.value?"("+t.value+")":""," ")}}function Ue(n,i){if(n&1&&(s(0,"spk-select",59)(1,"label",47),c(2),m(3,Be,3,1,"spk-tooltip",48),r(),d(4,"input",49),r(),m(5,Le,1,2,"ng-template",null,4,U)),n&2){let t,e=P(6);p();let a=Z(0),l=p().$implicit;_("options",a)("asFreeText",!0)("inlineSearch",!0)("optionTemplate",e),o(),T("for","destination-",l.formGroupName,"-",l.index,"-",l.asHttpOptions?"http":"other",""),o(),D(" ",(t=l.formView.shortDescription)!==null&&t!==void 0?t:l.formView.name," "),o(),u(l.formView.longDescription?3:-1),o(),T("id","destination-",l.formGroupName,"-",l.index,"-",l.asHttpOptions?"http":"other",""),N("formControlName",l.formView.name)}}function He(n,i){n&1&&d(0,"spk-progress-bar",58)}function Ke(n,i){if(n&1&&(J(0),m(1,Ue,7,15)(2,He,1,0,"spk-progress-bar",58)),n&2){let t=p().$implicit,e=Y(t.formView.loadOptions?t.formView.loadOptions(p(2).injector)():t.formView.options);o(),u(e?1:2)}}function ze(n,i){if(n&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),c(2,"question"),r()()),n&2){let t=p(2).$implicit;_("message",t.formView.longDescription)}}function We(n,i){if(n&1&&(s(0,"app-size",45)(1,"label",47),c(2),m(3,ze,3,1,"spk-tooltip",48),r()()),n&2){let t,e=p().$implicit;_("inputType",e.Name)("formControlName",e.formView.name)("customId",`destination-{{ item.formGroupName }}-{{ item.index }}-{{
|
|
1
|
+
import{g as Yt}from"./chunk-K75H4GPN.js";import{a as Qt,b as Jt,m as tt}from"./chunk-2EOGI5U4.js";import{a as Xt,b as qt}from"./chunk-Y5T3G6PP.js";import{a as Wt}from"./chunk-4B4SNBSE.js";import{a as jt}from"./chunk-YRQ33MKD.js";import"./chunk-UO57IKTF.js";import"./chunk-NYZVIDDD.js";import"./chunk-OELZQ6RK.js";import{a as b}from"./chunk-ARQ6YMHX.js";import"./chunk-ON2SWJPL.js";import"./chunk-KEHATBLP.js";import"./chunk-RHW5QVAY.js";import"./chunk-ZVBVR6H4.js";import{b as wt,c as At,e as vt,f as Pt,g as Vt,i as bt,j as Mt,m as Gt,n as Bt,o as Lt,p as Ut,q as Ht,r as Kt,t as zt}from"./chunk-QTTYDT3P.js";import"./chunk-C4IFBLYB.js";import"./chunk-PX25CWH6.js";import{b as ft,d as Dt}from"./chunk-7WCKE7GY.js";import"./chunk-BIHIR35J.js";import{A as $t,a as Et,b as Ot,d as xt,e as kt,l as Rt,o as Nt,p as ht,t as yt,z as It}from"./chunk-6WLXFV43.js";import{b as St}from"./chunk-DYCJPQSE.js";import{c as gt}from"./chunk-TKVTCBLW.js";import{i as Ct}from"./chunk-2IDHF5MN.js";import{$b as D,Ab as S,E as it,Eb as O,Fb as x,Gb as G,Hb as q,Ib as j,Jb as H,Kb as f,Lb as p,Oa as o,Ob as N,Qb as lt,Rb as T,Va as at,Wb as st,X as y,Xb as pt,Yb as P,Zb as c,_a as rt,_b as Q,ac as ct,ca as C,cc as _t,da as g,db as m,dc as mt,ec as Ft,fc as J,gc as Y,ha as ot,hc as Z,ic as ut,jc as dt,kc as B,lb as _,mc as L,nb as X,qb as u,qc as U,rb as I,sa as R,sb as $,tb as w,ub as s,vb as r,wb as d,xb as A,yb as v,yc as K,zb as M,zc as Tt}from"./chunk-GM25ACCR.js";import"./chunk-7CGTOI24.js";var Zt=["formRef"],te=(n,i,t,e)=>({index:n,formView:i,formGroupName:"custom",destinationType:t,oauthField:e}),W=n=>({$implicit:n}),ee=(n,i,t,e)=>({index:n,formView:i,formGroupName:"dynamic",destinationType:t,oauthField:e}),ne=(n,i,t,e)=>({index:n,formView:i,formGroupName:"advanced",destinationType:t,oauthField:e}),ie=(n,i,t,e)=>({index:n,formView:i,formGroupName:"advanced",asHttpOptions:!0,destinationType:t,oauthField:e}),oe=()=>({maxWidth:"700px",width:"100%"});function ae(n,i){n&1&&(O(0,5,2),d(1,"spk-icon"),x())}function re(n,i){n&1&&G(0,5,3)}function le(n,i){if(n&1){let t=S();O(0,5,1),s(1,"button",21),f("click",function(){C(t);let a=p();return g(a.testDestination())}),m(2,ae,2,0)(3,re,1,0),r(),x()}if(n&2){let t=p();o(),X("success",t.successfulTest()),o(),u(t.successfulTest()?2:3)}}function se(n,i){if(n&1){let t=S();s(0,"p",27),f("click",function(){C(t);let a=p();return g(a.removeDestinationFormGroup(a.destinationCount()-1))}),O(1,8),d(2,"span",28),x(),r()}}function pe(n,i){if(n&1){let t=S();s(0,"div",34),f("click",function(){let a=C(t).$implicit,l=p(2);return g(l.addDestinationFormGroup(a.key))}),s(1,"h3"),c(2),r(),s(3,"p"),c(4),r()()}if(n&2){let t=i.$implicit;o(2),Q(t.displayName),o(2),Q(t.description)}}function ce(n,i){if(n&1){let t=S();s(0,"button",35,1),f("click",function(){let a=C(t).$implicit,l=p(2);return g(l.addDestinationFormGroup(a.key))}),c(2),r()}if(n&2){let t=i.$implicit;o(2),D(" ",t.displayName," ")}}function _e(n,i){if(n&1&&(s(0,"div",29),$(1,pe,5,2,"div",30,I),r(),s(3,"spk-menu",31)(4,"button",32),G(5,9),r(),A(6,20),$(7,ce,3,1,"button",33,I),v(),r()),n&2){let t=p();o(),w(t.destinationTypeOptionsFocused()),o(2),_("searchable",!0),o(4),w(t.destinationTypeOptionsNotFocused())}}function me(n,i){n&1&&M(0)}function Fe(n,i){if(n&1&&m(0,me,1,0,"ng-container",40),n&2){let t,e=i.$implicit,a=i.$index;p();let l=P(29),F=p();_("ngTemplateOutlet",l)("ngTemplateOutletContext",B(7,W,L(2,te,a,e,(t=F.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,F.destinationFormPair().oauthField)))}}function ue(n,i){n&1&&M(0)}function de(n,i){if(n&1&&m(0,ue,1,0,"ng-container",40),n&2){let t,e=i.$implicit,a=i.$index;p();let l=P(29),F=p();_("ngTemplateOutlet",l)("ngTemplateOutletContext",B(7,W,L(2,ee,a,e,(t=F.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,F.destinationFormPair().oauthField)))}}function Te(n,i){if(n&1){let t=S();O(0,10,1),s(1,"button",35,1),f("click",function(){let a=C(t).$implicit,l=p(2);return g(l.addAdvancedFormPair(a,0))}),r(),x()}if(n&2){let t=i.$implicit;o(),q(t.name),j(0)}}function Ce(n,i){n&1&&M(0)}function ge(n,i){if(n&1&&m(0,Ce,1,0,"ng-container",40),n&2){let t,e=i.$implicit,a=i.$index;p();let l=P(29),F=p();_("ngTemplateOutlet",l)("ngTemplateOutletContext",B(7,W,L(2,ne,a,e,(t=F.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,F.destinationFormPair().oauthField)))}}function fe(n,i){if(n&1){let t=S();O(0,11,1),s(1,"button",35,1),f("click",function(){let a=C(t).$implicit,l=p(2);return g(l.addHttpOption(a,0))}),r(),x()}if(n&2){let t=i.$implicit;o(),q(t.name),j(0)}}function De(n,i){n&1&&M(0)}function Se(n,i){if(n&1&&m(0,De,1,0,"ng-container",40),n&2){let t,e=i.$implicit,a=i.$index;p();let l=P(29),F=p();_("ngTemplateOutlet",l)("ngTemplateOutletContext",B(7,W,L(2,ie,a,e,(t=F.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,F.destinationFormPair().oauthField)))}}function Ee(n,i){if(n&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),c(2,"question"),r()()),n&2){let t=p(2).$implicit;_("message",t.formView.longDescription)}}function Oe(n,i){if(n&1&&(s(0,"app-file-tree",43)(1,"label",47),c(2),m(3,Ee,3,1,"spk-tooltip",48),r(),d(4,"input",49),r()),n&2){let t,e=p().$implicit,a=p(2);_("startingPath",a.getFormFieldValue(0,e.formGroupName,e.formView.name))("accepts",e.formView.accepts)("showFiles",!0)("hideShortcuts",!0)("showHiddenNodes",!0)("selectFiles",!0),o(),T("for","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),o(),D(" ",(t=e.formView.shortDescription)!==null&&t!==void 0?t:e.formView.name," "),o(),u(e.formView.longDescription?3:-1),o(),T("id","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),N("formControlName",e.formView.name)}}function xe(n,i){if(n&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),c(2,"question"),r()()),n&2){let t=p(2).$implicit;_("message",t.formView.longDescription)}}function ke(n,i){if(n&1&&(s(0,"app-file-tree",44)(1,"label",47),c(2),m(3,xe,3,1,"spk-tooltip",48),r(),d(4,"input",49),r()),n&2){let t,e=p().$implicit,a=p(2);_("hideShortcuts",!0)("startingPath",a.getFormFieldValue(0,e.formGroupName,e.formView.name)),o(),T("for","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),o(),D(" ",(t=e.formView.shortDescription)!==null&&t!==void 0?t:e.formView.name," "),o(),u(e.formView.longDescription?3:-1),o(),T("id","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),N("formControlName",e.formView.name)}}function Re(n,i){if(n&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),c(2,"question"),r()()),n&2){let t=p(2).$implicit;_("message",t.formView.longDescription)}}function Ne(n,i){n&1&&(s(0,"spk-icon",51),c(1,"link"),r())}function he(n,i){n&1&&(s(0,"spk-icon",51),c(1,"envelope"),r())}function ye(n,i){n&1&&(s(0,"spk-icon",51),c(1,"textbox"),r())}function Ie(n,i){if(n&1&&(s(0,"spk-form-field")(1,"label",47),c(2),m(3,Re,3,1,"spk-tooltip",48),r(),d(4,"input",50),m(5,Ne,2,0,"spk-icon",51)(6,he,2,0,"spk-icon",51)(7,ye,2,0,"spk-icon",51),r()),n&2){let t,e=p().$implicit;o(),T("for","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),o(),D(" ",(t=e.formView.shortDescription)!==null&&t!==void 0?t:e.formView.name," "),o(),u(e.formView.longDescription?3:-1),o(),T("id","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),N("formControlName",e.formView.name),_("type",e.formView.type==="Email"?"email":"text"),o(),u(e.formView.type==="Path"?5:e.formView.type==="Email"?6:7)}}function $e(n,i){if(n&1){let t=S();s(0,"span",55),f("click",function(){C(t);let a=p(2).$implicit,l=p(2);return g(l.oauthStartTokenCreation(a.destinationType))}),c(1,"AuthID"),r()}}function we(n,i){n&1&&(s(0,"spk-icon",51),c(1,"password"),r())}function Ae(n,i){if(n&1){let t=S();s(0,"spk-icon",56),f("click",function(){C(t);let a=p(2).$implicit;return g(a.formView.showPassword=!a.formView.showPassword)}),c(1," eye "),r()}}function ve(n,i){if(n&1){let t=S();s(0,"spk-icon",56),f("click",function(){C(t);let a=p(2).$implicit;return g(a.formView.showPassword=!a.formView.showPassword)}),c(1," eye-slash "),r()}}function Pe(n,i){if(n&1&&(s(0,"spk-form-field")(1,"label",47),c(2),r(),d(3,"input",52),m(4,$e,2,0,"span",53)(5,we,2,0,"spk-icon",51)(6,Ae,2,0,"spk-icon",54)(7,ve,2,0,"spk-icon",54),r()),n&2){let t,e=p().$implicit;o(),T("for","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),o(),D(" ",(t=e.formView.shortDescription)!==null&&t!==void 0?t:e.formView.name," "),o(),T("id","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),N("formControlName",e.formView.name),_("type",e.formView.showPassword?"text":"password"),o(),u(e.oauthField===e.formView.name?4:5),o(2),u(e.formView.showPassword?6:7)}}function Ve(n,i){if(n&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),c(2,"question"),r()()),n&2){let t=p(3).$implicit;_("message",t.formView.longDescription)}}function be(n,i){if(n&1&&c(0),n&2){let t=i.$implicit;D(" ",t," ")}}function Me(n,i){if(n&1&&(s(0,"spk-select",57)(1,"label",47),c(2),m(3,Ve,3,1,"spk-tooltip",48),r(),d(4,"input",49),r(),m(5,be,1,1,"ng-template",null,3,U)),n&2){let t,e=P(6);p();let a=Z(0),l=p().$implicit;_("options",a)("isClearable",!1)("optionTemplate",e),o(),T("for","destination-",l.formGroupName,"-",l.index,"-",l.asHttpOptions?"http":"other",""),o(),D(" ",(t=l.formView.shortDescription)!==null&&t!==void 0?t:l.formView.name," "),o(),u(l.formView.longDescription?3:-1),o(),T("id","destination-",l.formGroupName,"-",l.index,"-",l.asHttpOptions?"http":"other",""),N("formControlName",l.formView.name)}}function Ge(n,i){if(n&1&&(J(0),m(1,Me,7,14)),n&2){let t=p().$implicit,e=Y(t.formView.loadOptions?t.formView.loadOptions(p(2).injector)():t.formView.options);o(),u(e?1:-1)}}function Be(n,i){if(n&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),c(2,"question"),r()()),n&2){let t=p(3).$implicit;_("message",t.formView.longDescription)}}function Le(n,i){if(n&1&&c(0),n&2){let t=i.$implicit;ct(" ",t.key," ",t.value?"("+t.value+")":""," ")}}function Ue(n,i){if(n&1&&(s(0,"spk-select",59)(1,"label",47),c(2),m(3,Be,3,1,"spk-tooltip",48),r(),d(4,"input",49),r(),m(5,Le,1,2,"ng-template",null,4,U)),n&2){let t,e=P(6);p();let a=Z(0),l=p().$implicit;_("options",a)("asFreeText",!0)("inlineSearch",!0)("optionTemplate",e),o(),T("for","destination-",l.formGroupName,"-",l.index,"-",l.asHttpOptions?"http":"other",""),o(),D(" ",(t=l.formView.shortDescription)!==null&&t!==void 0?t:l.formView.name," "),o(),u(l.formView.longDescription?3:-1),o(),T("id","destination-",l.formGroupName,"-",l.index,"-",l.asHttpOptions?"http":"other",""),N("formControlName",l.formView.name)}}function He(n,i){n&1&&d(0,"spk-progress-bar",58)}function Ke(n,i){if(n&1&&(J(0),m(1,Ue,7,15)(2,He,1,0,"spk-progress-bar",58)),n&2){let t=p().$implicit,e=Y(t.formView.loadOptions?t.formView.loadOptions(p(2).injector)():t.formView.options);o(),u(e?1:2)}}function ze(n,i){if(n&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),c(2,"question"),r()()),n&2){let t=p(2).$implicit;_("message",t.formView.longDescription)}}function We(n,i){if(n&1&&(s(0,"app-size",45)(1,"label",47),c(2),m(3,ze,3,1,"spk-tooltip",48),r()()),n&2){let t,e=p().$implicit;_("inputType",e.Name)("formControlName",e.formView.name)("customId",`destination-{{ item.formGroupName }}-{{ item.index }}-{{
|
|
2
2
|
item.asHttpOptions ? 'http' : 'other'
|
|
3
3
|
}}`),o(),T("for","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),o(),D(" ",(t=e.formView.shortDescription)!==null&&t!==void 0?t:e.formView.name," "),o(),u(e.formView.longDescription?3:-1)}}function Xe(n,i){if(n&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),c(2,"question"),r()()),n&2){let t=p(2).$implicit;_("message",t.formView.longDescription)}}function qe(n,i){if(n&1&&(s(0,"spk-form-field")(1,"label",47),c(2),m(3,Xe,3,1,"spk-tooltip",48),r(),d(4,"input",60),s(5,"spk-icon",51),c(6,"numpad"),r()()),n&2){let t,e=p().$implicit;o(),T("for","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),o(),D(" ",(t=e.formView.shortDescription)!==null&&t!==void 0?t:e.formView.name," "),o(),u(e.formView.longDescription?3:-1),o(),T("id","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),N("formControlName",e.formView.name)}}function je(n,i){if(n&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),c(2,"question"),r()()),n&2){let t=p(2).$implicit;_("message",t.formView.longDescription)}}function Qe(n,i){if(n&1&&(s(0,"spk-toggle",46)(1,"label",47),c(2),m(3,je,3,1,"spk-tooltip",48),r(),d(4,"input",61),r()),n&2){let t,e=p().$implicit;o(),T("for","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),o(),D(" ",(t=e.formView.shortDescription)!==null&&t!==void 0?t:e.formView.name," "),o(),u(e.formView.longDescription?3:-1),o(),T("id","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),N("formControlName",e.formView.name)}}function Je(n,i){if(n&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),c(2,"question"),r()()),n&2){let t=p(2).$implicit;_("message",t.formView.longDescription)}}function Ye(n,i){if(n&1&&c(0),n&2){let t=i.$implicit;D(" ",t," ")}}function Ze(n,i){if(n&1&&(s(0,"spk-select",62)(1,"label",47),c(2),m(3,Je,3,1,"spk-tooltip",48),r(),d(4,"input",63),r(),m(5,Ye,1,1,"ng-template",null,4,U)),n&2){let t,e=P(6),a=p().$implicit;_("options",a.formView.options)("selectMultiple",!0)("optionTemplate",e),o(),lt("for","destination-",a.formGroupName,"-",a.index,""),o(),D(" ",(t=a.formView.shortDescription)!==null&&t!==void 0?t:a.formView.name," "),o(),u(a.formView.longDescription?3:-1),o(),N("formControlName",a.formView.name)}}function tn(n,i){if(n&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),c(2,"question"),r()()),n&2){let t=p(2).$implicit;_("message",t.formView.longDescription)}}function en(n,i){if(n&1&&(s(0,"app-timespan",45)(1,"label",47),c(2),m(3,tn,3,1,"spk-tooltip",48),r()()),n&2){let t,e=p().$implicit;_("inputType",e.formView.name)("formControlName",e.formView.name)("customId","destination-"+e.formGroupName+"-"+e.index+"-"+(e.asHttpOptions?"http":"other")),o(),T("for","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),o(),D(" ",(t=e.formView.shortDescription)!==null&&t!==void 0?t:e.formView.name," "),o(),u(e.formView.longDescription?3:-1)}}function nn(n,i){if(n&1){let t=S();s(0,"button",64),f("click",function(){C(t);let a=p().$implicit,l=p(2);return g(l.removeFormView(a.formView,0))}),s(1,"spk-icon"),c(2,"x-circle"),r()()}}function on(n,i){if(n&1&&(s(0,"div",41),A(1,42),m(2,Oe,5,17,"app-file-tree",43)(3,ke,5,13,"app-file-tree",44)(4,Ie,8,13,"spk-form-field")(5,Pe,8,13,"spk-form-field")(6,Ge,2,2)(7,Ke,3,2)(8,We,4,9,"app-size",45)(9,qe,7,11,"spk-form-field")(10,Qe,5,11,"spk-toggle",46)(11,Ze,7,9)(12,en,4,9,"app-timespan",45),v(),m(13,nn,3,0,"button",32),r()),n&2){let t=i.$implicit;X("single-field",t.formGroupName!=="advanced"),o(),_("formGroupName",t.formGroupName),o(),u(t.formView.type==="FileTree"?2:t.formView.type==="FolderTree"?3:t.formView.type==="String"||t.formView.type==="Path"||t.formView.type==="Email"?4:t.formView.type==="Password"?5:t.formView.type==="Enumeration"?6:t.formView.type==="NonValidatedSelectableString"?7:t.formView.type==="Size"?8:t.formView.type==="Integer"?9:t.formView.type==="Boolean"?10:t.formView.type==="Flags"?11:t.formView.type==="Timespan"||t.formView.type==="DateTime"?12:-1),o(11),u(t.formGroupName==="advanced"?13:-1)}}function an(n,i){if(n&1&&(A(0,22)(1,36),$(2,Fe,1,9,"ng-container",null,I),$(4,de,1,9,"ng-container",null,I),s(6,"app-toggle-card",37),A(7,38),O(8,10),s(9,"spk-menu",31)(10,"button",39),d(11,"spk-icon"),r(),A(12,20),$(13,Te,3,1,"button",33,I),v(),r(),x(),v(),$(15,ge,1,9,"ng-container",null,I),r(),s(17,"app-toggle-card",37),A(18,38),O(19,11),s(20,"spk-menu",31)(21,"button",39),d(22,"spk-icon"),r(),A(23,20),$(24,fe,3,1,"button",33,I),v(),r(),x(),v(),$(26,Se,1,9,"ng-container",null,I),r(),m(28,on,14,5,"ng-template",null,2,U),v()()),n&2){let t=p();o(2),w(t.destinationFormPair().custom),o(2),w(t.destinationFormPair().dynamic),o(2),_("disallowToggle",!0),o(3),_("searchable",!0),o(),_("disabled",t.notSelectedAdvancedFormPair().length===0),o(3),w(t.notSelectedAdvancedFormPair()),o(2),w(t.selectedAdvancedFormPair()),o(2),_("disallowToggle",!0),o(3),_("searchable",!0),o(),_("disabled",t.notSelectedHttpOptions().length===0),o(3),w(t.notSelectedHttpOptions()),o(2),w(t.selectedHttpOptions())}}function rn(n,i){if(n&1){let t=S();s(0,"spk-dialog",65),Ft("isOpenChange",function(a){C(t);let l=p();return mt(l.targetUrlDialogOpen,a)||(l.targetUrlDialogOpen=a),g(a)}),s(1,"header",66)(2,"h2"),G(3,12),r(),s(4,"spk-alert",67),G(5,13),r()(),s(6,"div",68)(7,"spk-form-field"),d(8,"textarea",69),r()(),s(9,"footer",70)(10,"button",24),f("click",function(){C(t);let a=p();return g(a.closeTargetUrlDialog(!1))}),c(11,"Cancel"),r(),s(12,"button",71),f("click",function(){C(t);let a=p();return g(a.closeTargetUrlDialog(!0))}),O(13,14),d(14,"spk-icon"),x(),r()()()}if(n&2){let t=p();_t("isOpen",t.targetUrlDialogOpen),_("options",dt(3,oe)),o(8),_("formControl",t.targetUrlCtrl)}}var z=new Kt,An=(n={destinations:[]})=>z.group({destinations:z.array(n.destinations)}),vn=({key:n,customGroup:i,dynamicGroup:t,advancedGroup:e})=>z.group({destinationType:z.control(n),custom:i,dynamic:t,advanced:e}),et=class n{#l=y(Dt);#s=y(ft);#p=y(gt);#t=y(tt);#i=y(St);#e=y(kt);#n=y(Yt);injector=y(ot);formRef=at.required("formRef");destinationForm=this.#t.destinationForm;destinationFormPair=this.#t.destinationFormPair;selectedAdvancedFormPair=this.#t.selectedAdvancedFormPair;notSelectedAdvancedFormPair=this.#t.notSelectedAdvancedFormPair;selectedHttpOptions=this.#t.selectedHttpOptions;notSelectedHttpOptions=this.#t.notSelectedHttpOptions;destinationOptions=this.#t.destinationOptions;destinationFormSignal=this.#t.destinationFormSignal;destinationCount=K(()=>this.destinationFormSignal()?.destinations?.length??0);successfulTest=R(!1);destinationTypeOptionsInFocus=R(["file","ssh","s3","gcs","googledrive","azure"]);destinationTypeOptions=R(Jt.map(i=>({key:i.customKey??i.key,customKey:i.customKey??null,displayName:i.displayName,description:i.description})));destinationTypeOptionsFocused=K(()=>{let i=this.destinationTypeOptionsInFocus(),t=this.destinationTypeOptions();return i.map(e=>t.find(a=>a.key===e))});destinationTypeOptionsNotFocused=K(()=>{let i=this.destinationTypeOptionsInFocus();return this.destinationTypeOptions().filter(e=>!i.includes(e.key))});targetUrlEffect=Tt(()=>{if(this.destinationFormSignal(),this.destinationForm.valid){let i=this.#t.getCurrentTargetUrl();this.#n.updateTargetUrl(i[0])}else this.#n.updateTargetUrl(null)});ngOnInit(){let i=this.#n.destinationTargetUrl();i&&this.#t.updateFieldsFromTargetUrl(i)}getFormFieldValue(i,t,e){return((this.destinationForm.controls.destinations.controls?.[i]).controls?.[t]).controls[e].value}addDestinationFormGroup(i){this.#t.addDestinationFormGroup(i)}addAdvancedFormPair(i,t){this.#t.addAdvancedFormPair(i,t)}removeFormView(i,t){this.#t.removeAdvancedFormPair(i,t)}addHttpOption(i,t){this.#t.addHttpOption(i,t)}targetUrlCtrl=new Vt;targetUrlInitial=R(null);targetUrlDialogOpen=R(!1);openTargetUrlDialog(){let t=this.#t.getCurrentTargetUrl()[0];this.targetUrlCtrl.setValue(t),this.targetUrlInitial.set(t),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(i=!1){this.targetUrlDialogOpen.set(!1);let t=this.targetUrlCtrl.value,e=this.targetUrlInitial();!i||t===e||this.#t.updateFieldsFromTargetUrl(this.targetUrlCtrl.value)}testDestination(i=0){let e=this.#t.getCurrentTargetUrl()[i];e&&this.#i.postApiV1RemoteoperationTest({requestBody:{path:e}}).subscribe({next:()=>{this.successfulTest.set(!0),setTimeout(()=>{this.successfulTest.set(!1)},3e3)},error:a=>{let l=a.error.error.Error;if(l==="missing-folder"&&this.#e.open(b,{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:F=>{F&&this.#i.postApiV1RemoteoperationCreate({requestBody:{path:e}}).subscribe({next:()=>{this.#e.open(b,{data:{title:$localize`Folder created`,message:$localize`The remote destination folder was created successfully.`,confirmText:$localize`OK`,cancelText:null},closed:()=>{this.testDestination(i)}})}})}}),l.startsWith("incorrect-cert:")){let F=l.split("incorrect-cert:")[1];this.#e.open(b,{maxWidth:"500px",data:{title:$localize`Trust the certificate`,message:$localize`The server is using a certificate that is not trusted.
|
|
4
4
|
If this is a self-signed certificate, you can choose to trust this certificate.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as ke,c as Re,d as B}from"./chunk-UO57IKTF.js";import{a as Oe}from"./chunk-NYZVIDDD.js";import{a as ue}from"./chunk-KEHATBLP.js";import"./chunk-RHW5QVAY.js";import{b as de,c as Pe,d as S,e as Te,f as Ce,i as me,n as Ee,q as Se,r as ge,t as fe}from"./chunk-QTTYDT3P.js";import"./chunk-PX25CWH6.js";import{b as oe,d as te,e as ne}from"./chunk-7WCKE7GY.js";import"./chunk-BIHIR35J.js";import{A as Fe,a as re,b as se,f as ae,g as le,l as pe,p as _e,z as ce}from"./chunk-6WLXFV43.js";import{b as ie}from"./chunk-DYCJPQSE.js";import{c as ee}from"./chunk-TKVTCBLW.js";import"./chunk-2IDHF5MN.js";import{Ab as M,E as I,Eb as _,Fb as c,Gb as m,Hb as y,Ib as h,Jb as X,Kb as E,Lb as u,M as H,Oa as s,X as T,Zb as A,_a as J,_b as Q,ac as W,ca as x,da as D,db as d,jc as Y,lb as P,nb as f,qb as F,sa as C,ub as a,vb as r,wb as p,yc as N,zc as Z}from"./chunk-GM25ACCR.js";import"./chunk-7CGTOI24.js";var we=()=>["/"];function $e(t,o){t&1&&(a(0,"spk-toggle",24),_(1,5),p(2,"input",27),c(),r())}function xe(t,o){t&1&&(a(0,"span",30),m(1,9),r())}function De(t,o){if(t&1&&(a(0,"span",30),m(1,10),r()),t&2){let e=u(2);s(),y(e.exportForm.controls.password.errors==null?null:e.exportForm.controls.password.errors.minlength.requiredLength),h(1)}}function Ae(t,o){if(t&1&&p(0,"spk-progress-bar",37),t&2){let e=u(2);f("error",e.calculatePasswordStrength()===1)("warn",e.calculatePasswordStrength()===2)("primary",e.calculatePasswordStrength()===4)("success",e.calculatePasswordStrength()===5),P("value",e.calculatePasswordStrength()*(100/5))}}function Ne(t,o){t&1&&(a(0,"span",30),m(1,11),r())}function Ie(t,o){t&1&&(a(0,"span",30),m(1,12),r())}function Me(t,o){if(t&1&&(a(0,"span",30),m(1,13),r()),t&2){let e=u(2);s(),y(e.exportForm.controls.repeatPassword.errors==null?null:e.exportForm.controls.repeatPassword.errors.minlength.requiredLength),h(1)}}function ye(t,o){t&1&&(_(0,7,1),p(1,"spk-icon"),c())}function he(t,o){t&1&&(_(0,7,2),p(1,"spk-icon"),c())}function Xe(t,o){t&1&&(_(0,14,1),p(1,"spk-icon",39),c())}function Be(t,o){t&1&&(_(0,14,2),p(1,"spk-icon"),c())}function Le(t,o){if(t&1){let e=M();a(0,"button",38),E("click",function(){x(e);let i=u(2);return D(i.copyPassword())}),_(1,14),d(2,Xe,2,0)(3,Be,2,0),c(),r()}if(t&2){let e=u(2);s(2),F(e.copiedPassword()?2:3)}}function be(t,o){t&1&&(a(0,"spk-alert",36),m(1,15),r())}function ve(t,o){if(t&1){let e=M();a(0,"div",25)(1,"spk-form-field")(2,"label",28),_(3,6),p(4,"sup"),c(),r(),p(5,"input",29),d(6,xe,2,0,"span",30)(7,De,2,1,"span",30),r(),d(8,Ae,1,9,"spk-progress-bar",31),a(9,"spk-form-field"),p(10,"input",32),d(11,Ne,2,0,"span",30)(12,Ie,2,0,"span",30)(13,Me,2,1,"span",30),r(),a(14,"div",33)(15,"button",34),E("click",function(){x(e);let i=u();return D(i.showPassword.set(!i.showPassword()))}),_(16,7),d(17,ye,2,0)(18,he,2,0),c(),r(),a(19,"button",34),E("click",function(){x(e);let i=u();return D(i.generatePassword())}),_(20,8),p(21,"spk-icon"),c(),r(),d(22,Le,4,1,"button",35),r(),d(23,be,2,0,"spk-alert",36),r()}if(t&2){let e=u();s(5),P("type",e.showPassword()?"text":"password"),s(),F(e.exportForm.controls.password.errors!=null&&e.exportForm.controls.password.errors.required?6:e.exportForm.controls.password.errors!=null&&e.exportForm.controls.password.errors.minlength?7:-1),s(2),F(e.exportForm.value.password?8:-1),s(2),P("type",e.showPassword()?"text":"password"),s(),F(e.exportForm.value.repeatPassword&&e.exportForm.value.repeatPassword!==e.exportForm.value.password?11:e.exportForm.controls.repeatPassword.errors!=null&&e.exportForm.controls.repeatPassword.errors.required?12:e.exportForm.controls.repeatPassword.errors!=null&&e.exportForm.controls.repeatPassword.errors.minlength?13:-1),s(6),F(e.showPassword()?17:18),s(5),F(e.showCopyPassword()?22:-1),s(),F(e.exportForm.value.password&&e.exportForm.value.password===e.exportForm.value.repeatPassword?23:-1)}}function Ge(t,o){if(t&1&&(a(0,"div",26)(1,"code"),A(2),r()()),t&2){let e=u();s(2),Q(e.exportedCmd())}}var O=new ge,L=class t{#o=T(ke);#t=T(ie);#e=T(oe);#n=T(te);#i=T(ee);#r=T(ue);isExporting=C(!1);exportType=C("file");exportedCmd=C(null);exportForm=O.group({exportPasswords:O.control(!0),encryption:O.control(!1,[S.required,Re()]),password:O.control("",[B("encryption",!0,[S.required,S.minLength(3)])]),repeatPassword:O.control("",[B("encryption",!0,[S.required,S.minLength(3)])])});exportFormSignal=Oe(this.exportForm.valueChanges);encryptionFieldSignal=N(()=>this.exportFormSignal()?.encryption??!1);activeBackup=N(()=>this.#r.backups().find(o=>o.Backup?.ID===this.#e.snapshot.params.id));showPassword=C(!1);copiedPassword=C(!1);showCopyPassword=C(!1);calculatePasswordStrength=N(()=>{let e=this.exportFormSignal()?.password??"";return this.#o.calculatePasswordStrength(e)});showPasswordEffect=Z(()=>{this.showPassword()&&this.exportForm.updateValueAndValidity()});submit(){this.isExporting.set(!0),this.exportType()==="file"?this.#t.postApiV1AuthIssuetokenByOperation({operation:"export"}).pipe(H(o=>{let e=i=>{let g=Object.entries(i);return g?"?"+g.map(([k,R])=>`${k}=${R}`).join("&"):""},n=this.exportFormSignal()?.password?.length?this.exportFormSignal()?.password:void 0;return this.#i.get(`/api/v1/backup/${this.#e.snapshot.params.id}/export${e({"export-passwords":this.exportFormSignal()?.exportPasswords??void 0,passphrase:n,token:o.Token})}`,{responseType:"blob"})}),I(()=>this.isExporting.set(!1))).subscribe({next:o=>{let n=this.activeBackup()?.Backup?.Name??"Backup",i=this.exportFormSignal()?.encryption?"aes":"json";this.downloadFile(o,`${n}-duplicati-config.${i}`),this.#n.navigate(["/"])},error:o=>{}}):this.#t.getApiV1BackupByIdExportCmdline({id:this.#e.snapshot.params.id,exportPasswords:this.exportFormSignal()?.exportPasswords??void 0,passphrase:this.exportFormSignal()?.password??void 0}).pipe(I(()=>this.isExporting.set(!1))).subscribe({next:o=>{this.exportedCmd.set(o.Command??null)},error:o=>{}})}downloadFile(o,e){let n=window.URL.createObjectURL(o),i=document.createElement("a");i.href=n,i.download=e,i.click(),window.URL.revokeObjectURL(n)}async copyPassword(){let o=this.exportForm.controls.password.value;await this.#s(o??""),this.copiedPassword.set(!0)}async#s(o){try{await navigator.clipboard.writeText(o)}catch{try{let n=document.createElement("textarea");n.value=o,document.body.appendChild(n),n.select(),document.execCommand("copy"),document.body.removeChild(n)}catch(n){console.error("Failed to copy text: ",n)}}}generatePassword(){this.copiedPassword.set(!1);let o=this.#o.generate(16);this.exportForm.controls.password.setValue(o),this.exportForm.controls.repeatPassword.setValue(o),this.showCopyPassword.set(!0)}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=J({type:t,selectors:[["app-export"]],decls:27,vars:16,consts:()=>{let o;o=$localize`${"\uFFFD#6\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let e;e=$localize`${"\uFFFD#10\uFFFD"}:START_TAG_SPK_ICON:export${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_SPK_ICON: Export `;let n;n=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:terminal-window${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: As command line `;let i;i=$localize`${"\uFFFD#20\uFFFD"}:START_TAG_SPK_ICON:file${"\uFFFD/#20\uFFFD"}:CLOSE_TAG_SPK_ICON: To file `;let g;g=$localize` Export passwords ${"\uFFFD#23\uFFFD\uFFFD/#23\uFFFD"}:TAG_INPUT:`;let k;k=$localize` Encrypt file ${"\uFFFD#2\uFFFD\uFFFD/#2\uFFFD"}:TAG_INPUT:`;let R;R=$localize`Password`;let b;b=$localize`Repeat password`;let v;v=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let w;w=$localize`${"\uFFFD*17:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:eye-slash${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: hide ${"\uFFFD/*17:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*18:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:eye${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: show ${"\uFFFD/*18:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,w=X(w);let G;G=$localize`${"\uFFFD#21\uFFFD"}:START_TAG_SPK_ICON:password${"\uFFFD/#21\uFFFD"}:CLOSE_TAG_SPK_ICON: Generate password `;let K;K=$localize`Passwords are required`;let U;U=$localize` Passwords must be at least ${"\uFFFD0\uFFFD"}:INTERPOLATION: characters long `;let z;z=$localize`Passwords do not match`;let V;V=$localize`Passwords are required`;let q;q=$localize` Passwords must be at least ${"\uFFFD0\uFFFD"}:INTERPOLATION: characters long `;let $;$=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SPK_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Copied password ${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SPK_ICON_1:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Copy password ${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,$=X($);let j;return j=$localize` Tip: Be sure to save your password. If you loose it you will lose access to your backups. `,[o,e,n,i,g,k,v,w,G,K,U,z,V,q,$,j,[1,"actions"],["spk-button","",1,"outlined",3,"routerLink"],["message","Remember to copy the password",1,"primary",3,"disabled"],["spk-button","",1,"raised","primary",3,"click","disabled"],["autocomplete","off",3,"formGroup"],["type","button",3,"click"],[1,"raised","primary"],["type","checkbox","formControlName","exportPasswords"],[1,"primary","raised"],[1,"passwords"],[1,"cmd-output"],["type","checkbox","formControlName","encryption"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",R,"formControlName","password",3,"type"],["error",""],[1,"raised",3,"error","warn","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",b,"formControlName","repeatPassword",3,"type"],[1,"password-actions"],["spk-button","","type","button",1,"small",3,"click"],["spk-button","","type","button",1,"small","copy"],[1,"primary"],[1,"raised",3,"value"],["spk-button","","type","button",1,"small","copy",3,"click"],[1,"spk-success"]]},template:function(e,n){if(e&1&&(a(0,"header")(1,"h3"),A(2," Export backup configuration "),a(3,"div",16)(4,"button",17),_(5,0),p(6,"spk-icon"),c(),r(),a(7,"spk-tooltip",18)(8,"button",19),E("click",function(){return n.submit()}),_(9,1),p(10,"spk-icon"),c(),r()()()(),a(11,"p"),A(12),r()(),a(13,"form",20)(14,"spk-button-group")(15,"button",21),E("click",function(){return n.exportType.set("cmd")}),_(16,2),p(17,"spk-icon"),c(),r(),a(18,"button",21),E("click",function(){return n.exportType.set("file")}),_(19,3),p(20,"spk-icon"),c(),r()(),a(21,"spk-toggle",22),_(22,4),p(23,"input",23),c(),r(),d(24,$e,3,0,"spk-toggle",24)(25,ve,24,8,"div",25)(26,Ge,3,1,"div",26),r()),e&2){let i;s(4),P("routerLink",Y(15,we)),s(3),f("loading",n.isExporting()),P("disabled",!(n.showCopyPassword()&&!n.copiedPassword())),s(),P("disabled",n.exportForm.invalid||n.showCopyPassword()&&!n.copiedPassword()),s(4),W("#",(i=n.activeBackup())==null||i.Backup==null?null:i.Backup.ID,": ",(i=n.activeBackup())==null||i.Backup==null?null:i.Backup.Name,""),s(),P("formGroup",n.exportForm),s(2),f("active",n.exportType()==="cmd"),s(3),f("active",n.exportType()==="file"),s(6),F(n.exportType()==="file"?24:-1),s(),F(n.encryptionFieldSignal()?25:-1),s(),F(n.exportedCmd()?26:-1)}},dependencies:[fe,me,Pe,de,Te,Ce,Ee,Se,ne,ae,ce,re,pe,le,se,_e,Fe],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:3rem}h3[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;justify-content:space-between}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;max-width:31.25rem}.passwords[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.password-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}.copy[_ngcontent-%COMP%] spk-icon.spk-success[_ngcontent-%COMP%]{color:var(--success-500)}.hide[_ngcontent-%COMP%]{display:none}"],changeDetection:0})};export{L as default};
|
|
1
|
+
import{a as ke,c as Re,d as B}from"./chunk-UO57IKTF.js";import{a as Oe}from"./chunk-NYZVIDDD.js";import{a as ue}from"./chunk-KEHATBLP.js";import"./chunk-RHW5QVAY.js";import{b as de,c as Pe,d as S,e as Te,f as Ce,i as me,n as Ee,q as Se,r as ge,t as fe}from"./chunk-QTTYDT3P.js";import"./chunk-PX25CWH6.js";import{b as oe,d as te,e as ne}from"./chunk-7WCKE7GY.js";import"./chunk-BIHIR35J.js";import{A as Fe,a as re,b as se,f as ae,g as le,l as pe,p as _e,z as ce}from"./chunk-6WLXFV43.js";import{b as ie}from"./chunk-DYCJPQSE.js";import{c as ee}from"./chunk-TKVTCBLW.js";import"./chunk-2IDHF5MN.js";import{Ab as M,E as I,Eb as _,Fb as c,Gb as m,Hb as y,Ib as h,Jb as X,Kb as E,Lb as u,M as H,Oa as s,X as T,Zb as A,_a as Q,_b as J,ac as W,ca as x,da as D,db as d,jc as Y,lb as P,nb as f,qb as F,sa as C,ub as a,vb as r,wb as p,yc as N,zc as Z}from"./chunk-GM25ACCR.js";import"./chunk-7CGTOI24.js";var we=()=>["/"];function $e(t,o){t&1&&(a(0,"spk-toggle",24),_(1,5),p(2,"input",27),c(),r())}function xe(t,o){t&1&&(a(0,"span",30),m(1,9),r())}function De(t,o){if(t&1&&(a(0,"span",30),m(1,10),r()),t&2){let e=u(2);s(),y(e.exportForm.controls.password.errors==null?null:e.exportForm.controls.password.errors.minlength.requiredLength),h(1)}}function Ae(t,o){if(t&1&&p(0,"spk-progress-bar",37),t&2){let e=u(2);f("error",e.calculatePasswordStrength()===1)("warn",e.calculatePasswordStrength()===2)("primary",e.calculatePasswordStrength()===4)("success",e.calculatePasswordStrength()===5),P("value",e.calculatePasswordStrength()*(100/5))}}function Ne(t,o){t&1&&(a(0,"span",30),m(1,11),r())}function Ie(t,o){t&1&&(a(0,"span",30),m(1,12),r())}function Me(t,o){if(t&1&&(a(0,"span",30),m(1,13),r()),t&2){let e=u(2);s(),y(e.exportForm.controls.repeatPassword.errors==null?null:e.exportForm.controls.repeatPassword.errors.minlength.requiredLength),h(1)}}function ye(t,o){t&1&&(_(0,7,1),p(1,"spk-icon"),c())}function he(t,o){t&1&&(_(0,7,2),p(1,"spk-icon"),c())}function Xe(t,o){t&1&&(_(0,14,1),p(1,"spk-icon",39),c())}function Be(t,o){t&1&&(_(0,14,2),p(1,"spk-icon"),c())}function Le(t,o){if(t&1){let e=M();a(0,"button",38),E("click",function(){x(e);let i=u(2);return D(i.copyPassword())}),_(1,14),d(2,Xe,2,0)(3,Be,2,0),c(),r()}if(t&2){let e=u(2);s(2),F(e.copiedPassword()?2:3)}}function be(t,o){t&1&&(a(0,"spk-alert",36),m(1,15),r())}function ve(t,o){if(t&1){let e=M();a(0,"div",25)(1,"spk-form-field")(2,"label",28),_(3,6),p(4,"sup"),c(),r(),p(5,"input",29),d(6,xe,2,0,"span",30)(7,De,2,1,"span",30),r(),d(8,Ae,1,9,"spk-progress-bar",31),a(9,"spk-form-field"),p(10,"input",32),d(11,Ne,2,0,"span",30)(12,Ie,2,0,"span",30)(13,Me,2,1,"span",30),r(),a(14,"div",33)(15,"button",34),E("click",function(){x(e);let i=u();return D(i.showPassword.set(!i.showPassword()))}),_(16,7),d(17,ye,2,0)(18,he,2,0),c(),r(),a(19,"button",34),E("click",function(){x(e);let i=u();return D(i.generatePassword())}),_(20,8),p(21,"spk-icon"),c(),r(),d(22,Le,4,1,"button",35),r(),d(23,be,2,0,"spk-alert",36),r()}if(t&2){let e=u();s(5),P("type",e.showPassword()?"text":"password"),s(),F(e.exportForm.controls.password.errors!=null&&e.exportForm.controls.password.errors.required?6:e.exportForm.controls.password.errors!=null&&e.exportForm.controls.password.errors.minlength?7:-1),s(2),F(e.exportForm.value.password?8:-1),s(2),P("type",e.showPassword()?"text":"password"),s(),F(e.exportForm.value.repeatPassword&&e.exportForm.value.repeatPassword!==e.exportForm.value.password?11:e.exportForm.controls.repeatPassword.errors!=null&&e.exportForm.controls.repeatPassword.errors.required?12:e.exportForm.controls.repeatPassword.errors!=null&&e.exportForm.controls.repeatPassword.errors.minlength?13:-1),s(6),F(e.showPassword()?17:18),s(5),F(e.showCopyPassword()?22:-1),s(),F(e.exportForm.value.password&&e.exportForm.value.password===e.exportForm.value.repeatPassword?23:-1)}}function Ge(t,o){if(t&1&&(a(0,"div",26)(1,"code"),A(2),r()()),t&2){let e=u();s(2),J(e.exportedCmd())}}var O=new ge,L=class t{#o=T(ke);#t=T(ie);#e=T(oe);#n=T(te);#i=T(ee);#r=T(ue);isExporting=C(!1);exportType=C("file");exportedCmd=C(null);exportForm=O.group({exportPasswords:O.control(!0),encryption:O.control(!1,[S.required,Re()]),password:O.control("",[B("encryption",!0,[S.required,S.minLength(3)])]),repeatPassword:O.control("",[B("encryption",!0,[S.required,S.minLength(3)])])});exportFormSignal=Oe(this.exportForm.valueChanges);encryptionFieldSignal=N(()=>this.exportFormSignal()?.encryption??!1);activeBackup=N(()=>this.#r.backups().find(o=>o.Backup?.ID===this.#e.snapshot.params.id));showPassword=C(!1);copiedPassword=C(!1);showCopyPassword=C(!1);calculatePasswordStrength=N(()=>{let e=this.exportFormSignal()?.password??"";return this.#o.calculatePasswordStrength(e)});showPasswordEffect=Z(()=>{this.showPassword()&&this.exportForm.updateValueAndValidity()});submit(){this.isExporting.set(!0),this.exportType()==="file"?this.#t.postApiV1AuthIssuetokenByOperation({operation:"export"}).pipe(H(o=>{let e=i=>{let g=Object.entries(i);return g?"?"+g.map(([k,R])=>`${k}=${R}`).join("&"):""},n=this.exportFormSignal()?.password?.length?this.exportFormSignal()?.password:void 0;return this.#i.get(`/api/v1/backup/${this.#e.snapshot.params.id}/export${e({"export-passwords":this.exportFormSignal()?.exportPasswords??void 0,passphrase:n,token:o.Token})}`,{responseType:"blob"})}),I(()=>this.isExporting.set(!1))).subscribe({next:o=>{let n=this.activeBackup()?.Backup?.Name??"Backup",i=this.exportFormSignal()?.encryption?"aes":"json";this.downloadFile(o,`${n}-duplicati-config.${i}`),this.#n.navigate(["/"])},error:o=>{}}):this.#t.getApiV1BackupByIdExportCmdline({id:this.#e.snapshot.params.id,exportPasswords:this.exportFormSignal()?.exportPasswords??void 0,passphrase:this.exportFormSignal()?.password??void 0}).pipe(I(()=>this.isExporting.set(!1))).subscribe({next:o=>{this.exportedCmd.set(o.Command??null)},error:o=>{}})}downloadFile(o,e){let n=window.URL.createObjectURL(o),i=document.createElement("a");i.href=n,i.download=e,i.click(),window.URL.revokeObjectURL(n)}async copyPassword(){let o=this.exportForm.controls.password.value;await this.#s(o??""),this.copiedPassword.set(!0)}async#s(o){try{await navigator.clipboard.writeText(o)}catch{try{let n=document.createElement("textarea");n.value=o,document.body.appendChild(n),n.select(),document.execCommand("copy"),document.body.removeChild(n)}catch(n){console.error("Failed to copy text: ",n)}}}generatePassword(){this.copiedPassword.set(!1);let o=this.#o.generate(16);this.exportForm.controls.password.setValue(o),this.exportForm.controls.repeatPassword.setValue(o),this.showCopyPassword.set(!0)}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=Q({type:t,selectors:[["app-export"]],decls:27,vars:16,consts:()=>{let o;o=$localize`${"\uFFFD#6\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let e;e=$localize`${"\uFFFD#10\uFFFD"}:START_TAG_SPK_ICON:export${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_SPK_ICON: Export `;let n;n=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:terminal-window${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: As command line `;let i;i=$localize`${"\uFFFD#20\uFFFD"}:START_TAG_SPK_ICON:file${"\uFFFD/#20\uFFFD"}:CLOSE_TAG_SPK_ICON: To file `;let g;g=$localize` Export passwords ${"\uFFFD#23\uFFFD\uFFFD/#23\uFFFD"}:TAG_INPUT:`;let k;k=$localize` Encrypt file ${"\uFFFD#2\uFFFD\uFFFD/#2\uFFFD"}:TAG_INPUT:`;let R;R=$localize`Password`;let b;b=$localize`Repeat password`;let v;v=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let w;w=$localize`${"\uFFFD*17:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:eye-slash${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: hide ${"\uFFFD/*17:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*18:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:eye${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: show ${"\uFFFD/*18:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,w=X(w);let G;G=$localize`${"\uFFFD#21\uFFFD"}:START_TAG_SPK_ICON:password${"\uFFFD/#21\uFFFD"}:CLOSE_TAG_SPK_ICON: Generate password `;let K;K=$localize`Passwords are required`;let U;U=$localize` Passwords must be at least ${"\uFFFD0\uFFFD"}:INTERPOLATION: characters long `;let z;z=$localize`Passwords do not match`;let V;V=$localize`Passwords are required`;let q;q=$localize` Passwords must be at least ${"\uFFFD0\uFFFD"}:INTERPOLATION: characters long `;let $;$=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SPK_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Copied password ${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SPK_ICON_1:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Copy password ${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,$=X($);let j;return j=$localize` Tip: Be sure to save your password. If you loose it you will lose access to your backups. `,[o,e,n,i,g,k,v,w,G,K,U,z,V,q,$,j,[1,"actions"],["spk-button","",1,"outlined",3,"routerLink"],["message","Remember to copy the password",1,"primary",3,"disabled"],["spk-button","",1,"raised","primary",3,"click","disabled"],["autocomplete","off",3,"formGroup"],["type","button",3,"click"],[1,"raised","primary"],["type","checkbox","formControlName","exportPasswords"],[1,"primary","raised"],[1,"passwords"],[1,"cmd-output"],["type","checkbox","formControlName","encryption"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",R,"formControlName","password",3,"type"],["error",""],[1,"raised",3,"error","warn","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",b,"formControlName","repeatPassword",3,"type"],[1,"password-actions"],["spk-button","","type","button",1,"small",3,"click"],["spk-button","","type","button",1,"small","copy"],[1,"primary"],[1,"raised",3,"value"],["spk-button","","type","button",1,"small","copy",3,"click"],[1,"spk-success"]]},template:function(e,n){if(e&1&&(a(0,"header")(1,"h3"),A(2," Export backup configuration "),a(3,"div",16)(4,"button",17),_(5,0),p(6,"spk-icon"),c(),r(),a(7,"spk-tooltip",18)(8,"button",19),E("click",function(){return n.submit()}),_(9,1),p(10,"spk-icon"),c(),r()()()(),a(11,"p"),A(12),r()(),a(13,"form",20)(14,"spk-button-group")(15,"button",21),E("click",function(){return n.exportType.set("cmd")}),_(16,2),p(17,"spk-icon"),c(),r(),a(18,"button",21),E("click",function(){return n.exportType.set("file")}),_(19,3),p(20,"spk-icon"),c(),r()(),a(21,"spk-toggle",22),_(22,4),p(23,"input",23),c(),r(),d(24,$e,3,0,"spk-toggle",24)(25,ve,24,8,"div",25)(26,Ge,3,1,"div",26),r()),e&2){let i;s(4),P("routerLink",Y(15,we)),s(3),f("loading",n.isExporting()),P("disabled",!(n.showCopyPassword()&&!n.copiedPassword())),s(),P("disabled",n.exportForm.invalid||n.showCopyPassword()&&!n.copiedPassword()),s(4),W("#",(i=n.activeBackup())==null||i.Backup==null?null:i.Backup.ID,": ",(i=n.activeBackup())==null||i.Backup==null?null:i.Backup.Name,""),s(),P("formGroup",n.exportForm),s(2),f("active",n.exportType()==="cmd"),s(3),f("active",n.exportType()==="file"),s(6),F(n.exportType()==="file"?24:-1),s(),F(n.encryptionFieldSignal()?25:-1),s(),F(n.exportedCmd()?26:-1)}},dependencies:[fe,me,Pe,de,Te,Ce,Ee,Se,ne,ae,ce,re,pe,le,se,_e,Fe],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:3rem}h3[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;justify-content:space-between}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;max-width:31.25rem}.passwords[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.password-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}.copy[_ngcontent-%COMP%] spk-icon.spk-success[_ngcontent-%COMP%]{color:var(--success-500)}.hide[_ngcontent-%COMP%]{display:none}"],changeDetection:0})};export{L as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-7CGTOI24.js";var t=[{path:"",redirectTo:"select-files",pathMatch:"full"},{path:"destination",loadComponent:()=>import("./chunk-CAPSN3YW.js")},{path:"encryption",loadComponent:()=>import("./chunk-4Q6ODNBP.js")},{path:"select-files",loadComponent:()=>import("./chunk-BUACSH3J.js")},{path:"options",loadComponent:()=>import("./chunk-TRWFWG6W.js")}],o=t;export{o as default};
|