@duplicati/ngclient 0.0.124 → 0.0.130
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/assets/spk.woff2 +0 -0
- package/{chunk-SIHNMW2E.js → chunk-4PFSFVY6.js} +1 -1
- package/{chunk-SPAJFGWZ.js → chunk-5FTLFTEB.js} +1 -1
- package/{chunk-ONV552SH.js → chunk-5LL2GNEZ.js} +1 -1
- package/{chunk-ERHGJIOQ.js → chunk-5S46PDX2.js} +1 -1
- package/chunk-74DADXEI.js +1 -0
- package/chunk-77O3NTSI.js +1 -0
- package/chunk-7XUQAQXF.js +1 -0
- package/chunk-A2ITER5E.js +1 -0
- package/{chunk-M5RL4LRX.js → chunk-A6RETV76.js} +1 -1
- package/chunk-AACOYUOE.js +1 -0
- package/chunk-AIKD43P2.js +1 -0
- package/chunk-AOXPIWSW.js +1 -0
- package/chunk-APVPH7MJ.js +1 -0
- package/chunk-B37C3RGG.js +1 -0
- package/{chunk-URJQR7VG.js → chunk-BI4O7WRG.js} +1 -1
- package/chunk-BMMOMXWX.js +6 -0
- package/chunk-BRR5YAJ3.js +1 -0
- package/chunk-BUZTB5NB.js +1 -0
- package/chunk-BZCM226U.js +1 -0
- package/chunk-C44Q3YIF.js +1 -0
- package/{chunk-PSVKQSIF.js → chunk-CTTB3CC2.js} +1 -1
- package/chunk-CZATLVNN.js +1 -0
- package/chunk-DSS4UZWD.js +1 -0
- package/chunk-DUQHFE6L.js +1 -0
- package/chunk-DWAT342U.js +1 -0
- package/chunk-FEYAUW6J.js +1 -0
- package/{chunk-43BIRTPL.js → chunk-GQCUCL25.js} +1 -1
- package/{chunk-ESAGJOZZ.js → chunk-H5MGVT7B.js} +1 -1
- package/{chunk-VZBWK3XF.js → chunk-HAATVFD4.js} +1 -1
- package/chunk-HBYWSSYK.js +1 -0
- package/{chunk-EPDVUHOD.js → chunk-HTTPTGMU.js} +1 -1
- package/chunk-HZQEM2P7.js +1 -0
- package/chunk-IQTQJ64J.js +2 -0
- package/{chunk-65ZYAFPI.js → chunk-JMQGVDAK.js} +1 -1
- package/chunk-LWIINXS7.js +1 -0
- package/chunk-LZXYGCPQ.js +1 -0
- package/{chunk-6EWRKJSC.js → chunk-M7A6IY7W.js} +1 -1
- package/chunk-MES3HY3J.js +1 -0
- package/{chunk-5C7A7QU6.js → chunk-MNE4XQ7S.js} +1 -1
- package/{chunk-V7XW25LT.js → chunk-MZZJNTYI.js} +1 -1
- package/chunk-NZXQIYE5.js +4 -0
- package/chunk-PFZ7N6QO.js +1 -0
- package/chunk-PG4O7JZ2.js +1 -0
- package/{chunk-S5G6POQS.js → chunk-QLHQ5NDE.js} +1 -1
- package/chunk-QNXSBZTY.js +1 -0
- package/chunk-QQAATZNB.js +1 -0
- package/chunk-SF5ML7OT.js +1 -0
- package/chunk-T3WJQ544.js +1 -0
- package/{chunk-4DR45FFH.js → chunk-VAR5LIG7.js} +1 -1
- package/chunk-VN4TP2ED.js +1 -0
- package/chunk-WBCTOQOO.js +1 -0
- package/chunk-X4XF46C3.js +1 -0
- package/chunk-ZQ4ACNVT.js +3 -0
- package/chunk-ZWC5VRTB.js +1 -0
- package/{chunk-TH7CWIA2.js → chunk-ZY4E4VC3.js} +1 -1
- package/index.html +2 -2
- package/locale/messages.cs.json +4 -2
- package/locale/messages.da.json +5 -2
- package/locale/messages.de.json +48 -8
- package/locale/messages.en_GB.json +4 -2
- package/locale/messages.es.json +4 -2
- package/locale/messages.fi.json +7 -2
- package/locale/messages.fr.json +7 -2
- package/locale/messages.hu.json +6 -2
- package/locale/messages.it.json +32 -21
- package/locale/messages.ja_JP.json +8 -2
- package/locale/messages.nl_NL.json +53 -21
- package/locale/messages.pl.json +9 -2
- package/locale/messages.pt.json +8 -2
- package/locale/messages.pt_BR.json +10 -3
- package/locale/messages.ru.json +8 -2
- package/locale/messages.sr_RS.json +9 -2
- package/locale/messages.sv_SE.json +9 -2
- package/locale/messages.zh_CN.json +376 -48
- package/locale/messages.zh_TW.json +9 -2
- package/main-WENCV2S5.js +1 -0
- package/package.json +1 -1
- package/{styles-P2AEFLUS.css → styles-6RBLRF5E.css} +1 -1
- package/chunk-25II37TZ.js +0 -1
- package/chunk-2CXHZS6X.js +0 -1
- package/chunk-3UPH6V5C.js +0 -1
- package/chunk-65U4B3NQ.js +0 -2
- package/chunk-6DNRCK5D.js +0 -1
- package/chunk-6V7W7EKR.js +0 -1
- package/chunk-7733YRW4.js +0 -1
- package/chunk-7BATQNXR.js +0 -1
- package/chunk-7V4TPS4B.js +0 -1
- package/chunk-BTZEFBCF.js +0 -1
- package/chunk-CZDE5P4F.js +0 -1
- package/chunk-ED7PHXLX.js +0 -1
- package/chunk-FP6LM56A.js +0 -1
- package/chunk-FQ55IACT.js +0 -1
- package/chunk-FSKPPAVO.js +0 -1
- package/chunk-FWQNZX5S.js +0 -1
- package/chunk-J52HAQJB.js +0 -1
- package/chunk-KAFLAM3J.js +0 -1
- package/chunk-O7TLFEOP.js +0 -1
- package/chunk-OAWADV5X.js +0 -1
- package/chunk-PDODLSPH.js +0 -1
- package/chunk-QXUYK52Y.js +0 -1
- package/chunk-RODUXVVT.js +0 -1
- package/chunk-SX2OA5DO.js +0 -1
- package/chunk-T5WAKBP3.js +0 -1
- package/chunk-U4XTHU5I.js +0 -1
- package/chunk-UI4M5G5W.js +0 -1
- package/chunk-VPTXHYYV.js +0 -6
- package/chunk-VTTBYFSH.js +0 -1
- package/chunk-VYAA7G37.js +0 -1
- package/chunk-W66AXGSW.js +0 -1
- package/chunk-WOTGLW6Y.js +0 -4
- package/chunk-XATCN7MB.js +0 -1
- package/chunk-XHPURHO2.js +0 -1
- package/chunk-YUZKJZ22.js +0 -1
- package/chunk-YZDNOP4R.js +0 -1
- package/chunk-Z2TE5POZ.js +0 -1
- package/chunk-ZMLGDPCK.js +0 -3
- package/main-JBXUJPKQ.js +0 -1
package/chunk-VPTXHYYV.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{a as jt,b as qt}from"./chunk-43BIRTPL.js";import{a as mt}from"./chunk-FP6LM56A.js";import{a as Ke}from"./chunk-M5RL4LRX.js";import{a as dt,b as ht,c as ut}from"./chunk-HIW2CN45.js";import{a as Wt,b as At,c as Ht}from"./chunk-4V45XF67.js";import{a as he}from"./chunk-UEYPJIJG.js";import{a as Re}from"./chunk-2CXHZS6X.js";import{a as q}from"./chunk-LUKUBN2Z.js";import{a as zt,b as Ie,c as ie,d as ve,e as oe,f as be,g as ct,h as ge,i as Le,j as Ge,m as _t,n as Ue,o as pt,p as Xt,q as Ve,r as Ce,s as Te,t as Be}from"./chunk-ABANCAM5.js";import{b as me,d as se}from"./chunk-WRKRV6RQ.js";import{A as we,C as st,a as ne,b as at,d as Bt,e as $e,g as Fe,l as le,o as Kt,p as rt,t as ce}from"./chunk-ESAGJOZZ.js";import{h as lt}from"./chunk-N5FH4YAX.js";import{ia as Vt}from"./chunk-EBXJGPRA.js";import{$a as ye,$b as vt,Ab as J,Bb as ee,Cb as te,Db as s,Dc as Ze,Eb as r,F as We,Fb as F,Gb as B,Hb as K,Ib as He,Jb as R,Pb as E,Qb as D,Qc as $,Rb as O,Rc as xe,Sb as it,T as Pe,Tb as ot,Ua as l,Ub as Ee,Vb as S,Wb as _,Xb as Rt,Yb as It,Z as P,cc as bt,dc as Lt,ea as u,ec as Gt,f as nt,fa as m,gb as Z,gc as Oe,hc as ke,ic as ae,jc as d,ka as $t,kc as Me,lb as g,lc as z,mc as Dt,oc as b,pc as L,qc as G,ra as Et,rc as je,sa as Ne,sc as De,tb as wt,tc as x,ub as p,uc as Ut,va as f,vc as qe,wb as ue,wc as Qe,yc as Ye,zb as C}from"./chunk-4KE2I7OA.js";import{a as H,b as de,c as xt}from"./chunk-7CGTOI24.js";var nn=["fileInput"],on=[[["label"]]],an=["label"],Ft=class o{customId=Ne();content=f("");readonly=f(!1);placeholder=Ne("Drop a file here or use the browse button");fileInputRef;onFileSelected(t){let e=t.target;e.files&&e.files.length>0&&this.readFile(e.files[0])}onFileDrop(t){t.preventDefault(),t.dataTransfer?.files&&t.dataTransfer.files.length>0&&this.readFile(t.dataTransfer.files[0])}onDragOver(t){t.preventDefault()}readFile(t){let e=new FileReader;e.onload=()=>{this.content.set(e.result)},e.readAsText(t)}triggerBrowse(){return this.fileInputRef.nativeElement.click(),!1}onChange=()=>{};onTouched=()=>{};onChangeEffect=xe(()=>{this.onChange(this.content())});writeValue(t){this.content.set(t)}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.readonly.set(t)}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=Z({type:o,selectors:[["app-file-drop-textarea"]],viewQuery:function(e,n){if(e&1&&bt(nn,5),e&2){let i;Lt(i=Gt())&&(n.fileInputRef=i.first)}},inputs:{customId:[1,"customId"],placeholder:[1,"placeholder"]},features:[Ut([{provide:zt,useExisting:o,multi:!0}])],ngContentSelectors:an,decls:9,vars:3,consts:()=>{let t;return t=$localize`${"\uFFFD#4\uFFFD"}:START_TAG_SPK_ICON:upload${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["fileInput",""],t,[1,"browse-btn"],["spk-button","","type","button",1,"small","outlined",3,"click"],[1,"textarea-container","textarea-wrap",3,"drop","dragover"],["rows","10",3,"ngModelChange","placeholder","ngModel","disabled"],["type","file",1,"hidden",3,"change"]]},template:function(e,n){if(e&1){let i=R();Rt(on),It(0,0,["ngProjectAs","label",5,["label"]]),s(1,"div",2)(2,"button",3),S("click",function(){return u(i),m(n.triggerBrowse())}),E(3,1),F(4,"spk-icon"),D(),r()(),s(5,"div",4),S("drop",function(c){return u(i),m(n.onFileDrop(c))})("dragover",function(c){return u(i),m(n.onDragOver(c))}),s(6,"textarea",5),G("ngModelChange",function(c){return u(i),L(n.content,c)||(n.content=c),m(c)}),r()(),s(7,"input",6,0),S("change",function(c){return u(i),m(n.onFileSelected(c))}),r()}e&2&&(l(6),p("placeholder",n.placeholder()),b("ngModel",n.content),p("disabled",n.readonly()))},dependencies:[Te,ie,oe,ge,ne,Fe],styles:['[_nghost-%COMP%]{display:grid;grid-template-areas:"label browsebtn" "input input";grid-template-columns:8fr 1fr;gap:.5rem;align-items:flex-end}[_nghost-%COMP%] .browse-btn[_ngcontent-%COMP%]{grid-area:browsebtn}[_nghost-%COMP%] .label[_ngcontent-%COMP%]{grid-area:label;grid-column:1/-1}[_nghost-%COMP%] .textarea-wrap[_ngcontent-%COMP%]{grid-area:input;width:100%;border:none;font:var(--code-20)}[_nghost-%COMP%] .textarea-wrap[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:100%;color:var(--base-8);background-color:var(--base-1);border:1px solid var(--base-4);border-radius:var(--shape-3);padding:.5rem;resize:vertical;box-shadow:var(--box-shadow-10)}[_nghost-%COMP%] .textarea-wrap[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%] .dark[_ngcontent-%COMP%]{background-color:var(--base-2)}[_nghost-%COMP%] .hidden[_ngcontent-%COMP%]{display:none}'],changeDetection:0})};var gt=class o{#n=P(lt);#t=P($e);#e=P(Re);testDestination(t,e,n){return this.#e.hasV2TestOperations()?this.testDestinationv2(t,e,n):this.testDestinationv1(t,e,n)}testDestinationv2(t,e,n){return new nt(i=>{this.#n.postApiV2DestinationTest({requestBody:{DestinationUrl:t,AutoCreate:!1,Options:null}}).subscribe({next:a=>{if(a.Success){i.next({action:"success",targetUrl:t,testAgain:!1,destinationIndex:e,anyFilesFound:!a.Data?.FolderIsEmpty,containsBackup:a.Data?.FolderContainsBackupFiles??void 0,containsEncryptedBackupFiles:a.Data?.FolderContainsEncryptedBackupFiles??void 0}),i.complete();return}this.handleGenericError(i,t,e,a.Error??"Unknown error")},error:a=>{let c=a?.error?.body;if(c?.Data?.FolderExists===!1||c?.StatusCode==="missing-folder"){n?this.handleMissingFolder(i,t,e):this.handleGenericError(i,t,e,$localize`The remote destination folder does not exist.`);return}if(c?.Data?.HostCertificate){this.handleMissingCertificate(i,t,e,c.Data?.HostCertificate);return}if(c?.Data?.ReportedHostKey){this.handleIncorrectKey(i,t,e,c.Data.ReportedHostKey,c.Data.AcceptedHostKey??null);return}this.handleGenericError(i,t,e,a?.message??"Unknown error")}})})}testDestinationv1(t,e,n){return new nt(i=>{this.#n.postApiV1RemoteoperationTest({requestBody:{path:t}}).subscribe({next:a=>{i.next({action:"success",targetUrl:t,testAgain:!1,destinationIndex:e}),i.complete()},error:a=>{this.handleDestinationErrorv1(a.message,t,e,n).subscribe(c=>{i.next(c)})}})})}handleMissingFolder(t,e,n){this.#t.open(q,{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:i=>{i&&(this.#e.hasV2TestOperations()?this.#n.postApiV2DestinationTest({requestBody:{DestinationUrl:e,AutoCreate:!0,Options:null}}).subscribe({next:a=>{a.Success?this.handleFolderCreated(t,e,n):this.handleFolderCreateFailure(t,e,n,a.Error??$localize`Unknown error`)},error:a=>{this.handleFolderCreateFailure(t,e,n,a.message??$localize`Unknown error`)}}):this.#n.postApiV1RemoteoperationCreate({requestBody:{path:e}}).subscribe({next:()=>{this.handleFolderCreated(t,e,n)},error:a=>{this.handleFolderCreateFailure(t,e,n,a.message??$localize`Unknown error`)}}))}})}handleFolderCreateFailure(t,e,n,i){this.#t.open(q,{data:{title:$localize`Error creating folder`,message:$localize`The remote destination folder could not be created. ${i}`,confirmText:$localize`OK`,cancelText:null},closed:()=>{t.next({action:"generic-error",targetUrl:e,testAgain:!1,destinationIndex:n}),t.complete()}})}handleFolderCreated(t,e,n){this.#t.open(q,{data:{title:$localize`Folder created`,message:$localize`The remote destination folder was created successfully.`,confirmText:$localize`OK`,cancelText:null},closed:()=>{t.next({action:"test-again",targetUrl:e,testAgain:!0,destinationIndex:n}),t.complete()}})}reportNoAction(t,e,n){t.next({action:"generic-error",targetUrl:e,testAgain:!1,destinationIndex:n}),t.complete()}handleMissingCertificate(t,e,n,i){this.#t.open(q,{maxWidth:"500px",data:{title:$localize`Trust the certificate`,message:$localize`The server is using a certificate that is not trusted.
|
|
2
|
-
If this is a self-signed certificate, you can choose to trust this certificate.
|
|
3
|
-
The server reported the certificate hash: ${i}`,confirmText:$localize`Trust the certificate`,cancelText:$localize`Cancel`},closed:a=>{if(!a){this.reportNoAction(t,e,n);return}t.next({action:"trust-cert",targetUrl:e,testAgain:!0,certData:i,destinationIndex:n}),t.complete()}})}handleIncorrectKey(t,e,n,i,a){a?this.#t.open(q,{maxWidth:"500px",data:{title:$localize`The host key has changed`,message:$localize`The host key has changed, please check with the server administrator if this is correct,
|
|
4
|
-
otherwise you could be the victim of a MAN-IN-THE-MIDDLE attack.
|
|
5
|
-
Do you want to REPLACE your CURRENT host key ${a}
|
|
6
|
-
with the REPORTED host key: ${i}?`,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:c=>{if(!c){this.reportNoAction(t,e,n);return}t.next({action:"approve-host-key",targetUrl:e,testAgain:!0,reportedHostKey:i,destinationIndex:n}),t.complete()}}):this.#t.open(q,{maxWidth:"500px",data:{title:$localize`Approve host key?`,message:$localize`No certificate was specified, please verify that the reported host key is correct: ${i}`,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:c=>{if(!c){this.reportNoAction(t,e,n);return}t.next({action:"approve-host-key",targetUrl:e,testAgain:!0,reportedHostKey:i,destinationIndex:n}),t.complete()}})}handleGenericError(t,e,n,i){this.#t.open(q,{maxWidth:"500px",data:{title:$localize`Test connection failed`,message:i,cancelText:$localize`OK`},closed:a=>{t.next({action:"generic-error",targetUrl:e,testAgain:!1,destinationIndex:n}),t.complete()}})}handleDestinationErrorv1(t,e,n,i){return new nt(a=>{if(t==="missing-folder"){i?this.handleMissingFolder(a,e,n):this.handleGenericError(a,e,n,$localize`The remote destination folder does not exist.`);return}if(t.startsWith("incorrect-cert:")){let c=t.split("incorrect-cert:")[1];this.handleMissingCertificate(a,e,n,c);return}if(t.startsWith("incorrect-host-key:")){let c=t.split('incorrect-host-key:"')[1].split('",')[0],A=t.split('accepted-host-key:"')[1].split('",')[0];this.handleIncorrectKey(a,e,n,c,A);return}this.handleGenericError(a,e,n,t)})}static \u0275fac=function(e){return new(e||o)};static \u0275prov=Pe({token:o,factory:o.\u0275fac,providedIn:"root"})};var Ct=class o{fromString(t){if(!t)return null;let e=t.match(/(\d+)([smhDWMY])/);return e&&{value:parseInt(e[1]),unit:e[2]}}toString(t,e){return`${t}${e}`}static \u0275fac=function(e){return new(e||o)};static \u0275prov=Pe({token:o,factory:o.\u0275fac,providedIn:"root"})};var rn=["formRef"];function sn(o,t){o&1&&(s(0,"spk-alert",17),E(1,5),F(2,"spk-icon",26),D(),r())}function ln(o,t){if(o&1&&d(0),o&2){let e=t.$implicit;z(" ",e.DisplayName," ")}}function cn(o,t){if(o&1&&F(0,"spk-progress-bar",40),o&2){let e=_(3);ue("error",e.calculatePasswordStrength()===1)("warn",e.calculatePasswordStrength()===2)("primary",e.calculatePasswordStrength()===4)("success",e.calculatePasswordStrength()===5),p("value",e.calculatePasswordStrength()*(100/5))}}function _n(o,t){o&1&&(s(0,"span",35),O(1,10),r())}function pn(o,t){o&1&&(E(0,8,1),F(1,"spk-icon"),D())}function dn(o,t){o&1&&(E(0,8,2),F(1,"spk-icon"),D())}function un(o,t){o&1&&(E(0,11,1),F(1,"spk-icon",42),D())}function mn(o,t){o&1&&(E(0,11,2),F(1,"spk-icon"),D())}function Fn(o,t){if(o&1){let e=R();s(0,"button",41),S("click",function(){u(e);let i=_(3);return m(i.copyPassword())}),E(1,11),g(2,un,2,0)(3,mn,2,0),D(),r()}if(o&2){let e=_(3);l(2),C(e.copiedPassword()?2:3)}}function gn(o,t){o&1&&(s(0,"spk-alert",39),O(1,12),r())}function Cn(o,t){if(o&1){let e=R();s(0,"div",30)(1,"spk-form-field")(2,"label",31),E(3,7),F(4,"sup"),D(),r(),F(5,"input",32),r(),g(6,cn,1,9,"spk-progress-bar",33),s(7,"spk-form-field"),F(8,"input",34),g(9,_n,2,0,"span",35),r(),s(10,"div",36)(11,"button",37),S("click",function(){u(e);let i=_(2);return m(i.showPassword.set(!i.showPassword()))}),E(12,8),g(13,pn,2,0)(14,dn,2,0),D(),r(),s(15,"button",37),S("click",function(){u(e);let i=_(2);return m(i.generatePassword())}),E(16,9),F(17,"spk-icon"),D(),r(),g(18,Fn,4,1,"button",38),r(),g(19,gn,2,0,"spk-alert",39),r()}if(o&2){let e=_(2);l(5),p("type",e.showPassword()?"text":"password"),l(),C(e.generalForm.value.password?6:-1),l(2),p("type",e.showPassword()?"text":"password"),l(),C(e.generalForm.value.repeatPassword&&e.generalForm.value.repeatPassword!==e.generalForm.value.password?9:-1),l(4),C(e.showPassword()?13:14),l(5),C(e.showCopyPassword()?18:-1),l(),C(e.generalForm.value.password&&e.generalForm.value.password===e.generalForm.value.repeatPassword?19:-1)}}function Tn(o,t){if(o&1&&(s(0,"spk-select",27)(1,"label",28),O(2,6),r(),F(3,"input",29),g(4,ln,1,1,"ng-template"),r(),g(5,Cn,20,7,"div",30)),o&2){let e=_();p("options",e.encryptionOptions())("isClearable",!1),l(5),C(e.encryptionFieldSignal()!==""?5:-1)}}function fn(o,t){if(o&1&&(s(0,"button",24),E(1,13),F(2,"spk-icon"),D(),r()),o&2){let e=_();p("disabled",e.nameAndDescriptionValid()===!1)}}function Sn(o,t){if(o&1&&(s(0,"button",25),E(1,14),F(2,"spk-icon"),D(),r()),o&2){let e=_();p("disabled",e.generalForm.invalid||e.showCopyPassword()&&!e.copiedPassword())}}var ze=new Ce,Qt=(o={name:"",description:"",encryption:"",password:"",repeatPassword:""})=>ze.group({name:ze.control(o.name,[ve.required]),description:ze.control(o.description),encryption:ze.control(o.encryption,[Ht()]),password:ze.control(o.password,[At(t=>t?.value.encryption!=="",[ve.required])]),repeatPassword:ze.control(o.repeatPassword,[At(t=>t?.value.encryption!=="",[ve.required])])}),Nt={Key:"",DisplayName:"None"},Pt=class o{#n=P(se);#t=P(me);#e=P(Wt);#i=P(_e);#o=P(Re);formRef=ye.required("formRef");generalForm=this.#i.generalForm;generalFormSignal=this.#i.generalFormSignal;encryptionFieldSignal=this.#i.encryptionFieldSignal;encryptionOptions=this.#i.encryptionOptions;isNew=this.#i.isNew;showPassword=f(!1);copiedPassword=f(!1);showCopyPassword=f(!1);encryptionEffect=xe(()=>{this.encryptionFieldSignal()===""&&(this.copiedPassword.set(!1),this.showCopyPassword.set(!1))});nameAndDescriptionValid=$(()=>{let t=this.generalFormSignal(),e=this.generalForm.controls;return e?.name&&e.name.valid&&e?.description&&e.description.valid});calculatePasswordStrength=$(()=>{let e=this.generalFormSignal()?.password??"";return this.#e.calculatePasswordStrength(e)});ngOnInit(){this.formRef().nativeElement.focus()}exit(){this.#i.exit(!0)}async copyPassword(){let t=this.generalForm.controls.password.value;await this.#a(t??""),this.copiedPassword.set(!0)}async#a(t){try{await navigator.clipboard.writeText(t)}catch{try{let n=document.createElement("textarea");n.value=t,document.body.appendChild(n),n.select(),document.execCommand("copy"),document.body.removeChild(n)}catch(n){console.error("Failed to copy text: ",n)}}}displayFn(){let t=this.#o.systemInfo()?.EncryptionModules??[];return e=>{let n=[Nt,...t].find(i=>i.Key===e);return n?`${n.DisplayName}`:""}}generatePassword(){this.copiedPassword.set(!1);let t=this.#e.generate(16);this.generalForm.controls.password.setValue(t),this.generalForm.controls.repeatPassword.setValue(t),this.showCopyPassword.set(!0)}next(){this.#i.isNew()||this.#i.submit(!0),this.#n.navigate(["destination"],{relativeTo:this.#t.parent})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=Z({type:o,selectors:[["app-general"]],viewQuery:function(e,n){e&1&&Oe(n.formRef,rn,5),e&2&&ke()},decls:21,vars:4,consts:()=>{let t;t=$localize`Your backup name`;let e;e=$localize`Your backup description`;let n;n=$localize`Remember to copy the password`;let i;i=$localize`General backup settings`;let a;a=$localize` Backup name ${"\uFFFD#8\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#8\uFFFD"}:CLOSE_SUPERSCRIPT:`;let c;c=$localize`Backup description`;let A;A=$localize`${"\uFFFD#18\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SPK_ICON: Exit `;let k;k=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:lock${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON: Encrypted backup `;let I;I=$localize`Encryption`;let V;V=$localize`Encryption`;let N;N=$localize`Password`;let w;w=$localize`Repeat password`;let U;U=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let j;j=$localize`${"\uFFFD*13: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/*13:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*14: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/*14:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,j=Ee(j);let Q;Q=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:password${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: Generate password `;let h;h=$localize`Passwords do not match`;let T;T=$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:`,T=Ee(T);let v;v=$localize` Tip: Be sure to save your password. If you loose it you will lose access to your backups. `;let X;X=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let W;return W=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["formRef",""],i,a,c,A,k,V,U,j,Q,h,T,v,X,W,["autocomplete","off",3,"submit","formGroup"],[1,"title-30"],[1,"primary"],["for","backupName"],["type","text","tabindex","1","placeholder",t,"formControlName","name"],["for","backupDescription"],["id","backupDescription","tabindex","2","placeholder",e,"formControlName","description"],[1,"form-actions"],["type","button","spk-button","",3,"click"],["spk-button","","type","submit",1,"raised","primary",3,"disabled"],["spk-button","","type","submit","spkTooltip",n,1,"raised","primary",3,"disabled"],["icon",""],["value","Key","label","DisplayName",3,"options","isClearable"],["for","encryption"],["type","text","id","encryption","tabindex","3","placeholder",I,"formControlName","encryption"],[1,"passwords"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",N,"formControlName","password",3,"type"],[1,"raised",3,"error","warn","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",w,"formControlName","repeatPassword",3,"type"],["error",""],[1,"password-actions"],["spk-button","","type","button",1,"small",3,"click"],["spk-button","","type","button",1,"small","copy"],["type","primary"],[1,"raised",3,"value"],["spk-button","","type","button",1,"small","copy",3,"click"],[1,"spk-success"]]},template:function(e,n){if(e&1){let i=R();s(0,"form",15,0),S("submit",function(){return u(i),m(n.next())}),s(2,"h3",16),O(3,1),r(),g(4,sn,3,0,"spk-alert",17),s(5,"spk-form-field")(6,"label",18),E(7,2),F(8,"sup"),D(),r(),F(9,"input",19),r(),s(10,"spk-form-field")(11,"label",20),O(12,3),r(),F(13,"textarea",21),r(),g(14,Tn,6,3),s(15,"div",22)(16,"button",23),S("click",function(){return u(i),m(n.exit())}),E(17,4),F(18,"spk-icon"),D(),r(),g(19,fn,3,1,"button",24)(20,Sn,3,1,"button",25),r()()}if(e&2){let i;p("formGroup",n.generalForm),l(4),C(!n.isNew()&&((i=n.generalFormSignal())==null?null:i.encryption)!==""?4:-1),l(10),C(n.isNew()?14:-1),l(5),C(n.encryptionFieldSignal()===""||!n.isNew()?19:20)}},dependencies:[Be,Le,ie,oe,be,Ue,Ve,le,ce,Fe,ne,rt,at,st],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding-bottom:1.5rem}sup[_ngcontent-%COMP%]{padding:0 .125rem;color:var(--error-500)}.passwords[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.password-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.copy[_ngcontent-%COMP%] spk-icon.spk-success[_ngcontent-%COMP%]{color:var(--success-500)}"],changeDetection:0})};function En(o,t){if(o&1){let e=R();s(0,"div",24)(1,"spk-form-field")(2,"label",25),O(3,7),r(),s(4,"input",26,0),G("ngModelChange",function(i){u(e);let a=_();return L(a.scheduleFields.nextTime().time,i)||(a.scheduleFields.nextTime().time=i),m(i)}),S("focus",function(){u(e);let i=ae(5);return m(i.showPicker())}),r(),s(6,"spk-icon",27),d(7,"clock"),r()(),s(8,"spk-form-field"),F(9,"label",28),s(10,"input",29,1),G("ngModelChange",function(i){u(e);let a=_();return L(a.scheduleFields.nextTime().date,i)||(a.scheduleFields.nextTime().date=i),m(i)}),S("focus",function(){u(e);let i=ae(11);return m(i.showPicker())}),r(),s(12,"spk-icon",27),d(13,"calendar"),r()()(),s(14,"div",24)(15,"spk-form-field")(16,"label",30),O(17,8),r(),s(18,"input",31),G("ngModelChange",function(i){u(e);let a=_();return L(a.scheduleFields.runAgain().repeatValue,i)||(a.scheduleFields.runAgain().repeatValue=i),m(i)}),r()(),s(19,"spk-select",32)(20,"input",33),G("ngModelChange",function(i){u(e);let a=_();return L(a.scheduleFields.runAgain().repeatUnit,i)||(a.scheduleFields.runAgain().repeatUnit=i),m(i)}),r()()(),s(21,"app-toggle-card",34),B(22,35),O(23,9),K(),s(24,"div",36)(25,"spk-toggle",19),E(26,10),s(27,"input",20),G("ngModelChange",function(i){u(e);let a=_();return L(a.scheduleFields.runAgain().allowedDays.mon,i)||(a.scheduleFields.runAgain().allowedDays.mon=i),m(i)}),r(),D(),r(),s(28,"spk-toggle",19),E(29,11),s(30,"input",20),G("ngModelChange",function(i){u(e);let a=_();return L(a.scheduleFields.runAgain().allowedDays.tue,i)||(a.scheduleFields.runAgain().allowedDays.tue=i),m(i)}),r(),D(),r(),s(31,"spk-toggle",19),E(32,12),s(33,"input",20),G("ngModelChange",function(i){u(e);let a=_();return L(a.scheduleFields.runAgain().allowedDays.wed,i)||(a.scheduleFields.runAgain().allowedDays.wed=i),m(i)}),r(),D(),r(),s(34,"spk-toggle",19),E(35,13),s(36,"input",20),G("ngModelChange",function(i){u(e);let a=_();return L(a.scheduleFields.runAgain().allowedDays.thu,i)||(a.scheduleFields.runAgain().allowedDays.thu=i),m(i)}),r(),D(),r(),s(37,"spk-toggle",19),E(38,14),s(39,"input",20),G("ngModelChange",function(i){u(e);let a=_();return L(a.scheduleFields.runAgain().allowedDays.fri,i)||(a.scheduleFields.runAgain().allowedDays.fri=i),m(i)}),r(),D(),r(),s(40,"spk-toggle",19),E(41,15),s(42,"input",20),G("ngModelChange",function(i){u(e);let a=_();return L(a.scheduleFields.runAgain().allowedDays.sat,i)||(a.scheduleFields.runAgain().allowedDays.sat=i),m(i)}),r(),D(),r(),s(43,"spk-toggle",19),E(44,16),s(45,"input",20),G("ngModelChange",function(i){u(e);let a=_();return L(a.scheduleFields.runAgain().allowedDays.sun,i)||(a.scheduleFields.runAgain().allowedDays.sun=i),m(i)}),r(),D(),r()()()}if(o&2){let e=_();l(4),b("ngModel",e.scheduleFields.nextTime().time),l(6),b("ngModel",e.scheduleFields.nextTime().date),l(8),b("ngModel",e.scheduleFields.runAgain().repeatValue),l(),p("options",e.unitOptions)("isClearable",!1),l(),b("ngModel",e.scheduleFields.runAgain().repeatUnit),l(),p("disallowToggle",!0),l(6),b("ngModel",e.scheduleFields.runAgain().allowedDays.mon),l(3),b("ngModel",e.scheduleFields.runAgain().allowedDays.tue),l(3),b("ngModel",e.scheduleFields.runAgain().allowedDays.wed),l(3),b("ngModel",e.scheduleFields.runAgain().allowedDays.thu),l(3),b("ngModel",e.scheduleFields.runAgain().allowedDays.fri),l(3),b("ngModel",e.scheduleFields.runAgain().allowedDays.sat),l(3),b("ngModel",e.scheduleFields.runAgain().allowedDays.sun)}}var Dn=[{key:"s",label:$localize`Seconds`},{key:"m",label:$localize`Minutes`},{key:"h",label:$localize`Hours`},{key:"D",label:$localize`Days`},{key:"W",label:$localize`Weeks`},{key:"M",label:$localize`Months`},{key:"Y",label:$localize`Years`}],Ae={autoRun:!0,nextTime:{time:"13:00",date:new Date().toISOString().split("T")[0]},runAgain:{repeatValue:1,repeatUnit:"D",allowedDays:{mon:!1,tue:!1,wed:!1,thu:!1,fri:!1,sat:!1,sun:!1}}},yt=class o{#n=P(_e);#t=P(se);#e=P(me);unitOptions=Dn;scheduleFields=this.#n.scheduleFields;goBack(){this.#t.navigate(["source-data"],{relativeTo:this.#e.parent})}next(){this.#n.isNew()||this.#n.submit(!0),this.#t.navigate(["options"],{relativeTo:this.#e.parent})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=Z({type:o,selectors:[["app-schedule"]],decls:16,vars:2,consts:()=>{let t;t=$localize`Schedule`;let e;e=$localize` Automatically run backups ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let n;n=$localize`If a date was missed, the job will run as soon as possible.`;let i;i=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let a;a=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let c;c=$localize`Next time`;let A;A=$localize`Run again every`;let k;k=$localize`Allowed days`;let I;I=$localize` Monday ${"\uFFFD#27\uFFFD\uFFFD/#27\uFFFD"}:TAG_INPUT:`;let V;V=$localize` Tuesday ${"\uFFFD#30\uFFFD\uFFFD/#30\uFFFD"}:TAG_INPUT:`;let N;N=$localize` Wednesday ${"\uFFFD#33\uFFFD\uFFFD/#33\uFFFD"}:TAG_INPUT:`;let w;w=$localize` Thursday ${"\uFFFD#36\uFFFD\uFFFD/#36\uFFFD"}:TAG_INPUT:`;let U;U=$localize` Friday ${"\uFFFD#39\uFFFD\uFFFD/#39\uFFFD"}:TAG_INPUT:`;let j;j=$localize` Saturday ${"\uFFFD#42\uFFFD\uFFFD/#42\uFFFD"}:TAG_INPUT:`;let Q;return Q=$localize` Sunday ${"\uFFFD#45\uFFFD\uFFFD/#45\uFFFD"}:TAG_INPUT:`,[["timeRef",""],["dateRef",""],t,e,n,i,a,c,A,k,I,V,N,w,U,j,Q,[1,"title-30"],[1,"toggle-wrap"],[1,"raised","primary"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","",1,"raised","primary",3,"click"],[1,"row-inputs"],["for","time"],["type","time","id","time",3,"ngModelChange","focus","ngModel"],["suffix",""],["for","date"],["type","date","id","date",3,"ngModelChange","focus","ngModel"],["for","repeatValue"],["type","number","id","repeatValue",3,"ngModelChange","ngModel"],["value","key","label","label",3,"options","isClearable"],["type","text","id","repeatUnit",3,"ngModelChange","ngModel"],[3,"disallowToggle"],["title",""],[1,"days-wrap"]]},template:function(e,n){e&1&&(s(0,"h3",17),O(1,2),r(),s(2,"div",18)(3,"spk-toggle",19),E(4,3),s(5,"input",20),G("ngModelChange",function(a){return L(n.scheduleFields.autoRun,a)||(n.scheduleFields.autoRun=a),a}),r(),D(),r(),s(6,"p"),O(7,4),r()(),g(8,En,46,14),s(9,"div",21)(10,"button",22),S("click",function(){return n.goBack()}),E(11,5),F(12,"spk-icon"),D(),r(),s(13,"button",23),S("click",function(){return n.next()}),E(14,6),F(15,"spk-icon"),D(),r()()),e&2&&(l(5),b("ngModel",n.scheduleFields.autoRun),l(3),C(n.scheduleFields.autoRun()?8:-1))},dependencies:[Te,ie,Ge,Ie,oe,ge,le,we,ne,Fe,ce,Ke],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem 2.5rem 1.5rem;display:flex;flex-direction:column;gap:1.5rem}.toggle-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.days-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};function hn(o,t){if(o&1&&(B(0,4),d(1),K()),o&2){let e,n=_();l(),Me((e=n.currentExpressionOption())==null?null:e.startsWith)}}function An(o,t){if(o&1&&(B(0,5),d(1),K()),o&2){let e,n=_();l(),Me((e=n.currentExpressionOption())==null?null:e.endsWith)}}var Pn=[{key:"Excludes folders where name contains",value:"-FolderName"},{key:"Excludes folder",value:"-Folder"},{key:"Excludes files where name contains",value:"-FileName"},{key:"Excludes file extension",value:"-Extension"},{key:"Excludes files where name matches regex",value:"-Regex"},{key:"Includes files where name matches regex",value:"+Regex"},{key:"Excludes file group",value:"-FileGroup"},{key:"Includes expression",value:"+Expression"},{key:"Excludes expression",value:"-Expression"},{key:"None",value:"-Unknown"}],Tt=class o{path=Ne.required();osType=Ne();pathChange=Et();remove=Et();internalPath=f("");pathType=f("-Expression");currentExpressionOption=$(()=>{let t=this.pathType();return this.expressionOptions().find(e=>e.value===t)});expressionOptions=$(()=>{let e=this.osType()==="Windows"?"\\":"/";return Pn.map(n=>n.value==="-Folder"||n.value==="+Folder"?de(H({},n),{startsWith:"",endsWith:""}):n.value==="-FolderName"||n.value==="+FolderName"?de(H({},n),{startsWith:"*",endsWith:`*${e}`}):n.value==="-FileName"||n.value==="+FileName"?de(H({},n),{startsWith:"[.*",endsWith:`[^\\${e}]*]`}):n.value==="-FileGroup"||n.value==="+FileGroup"?de(H({},n),{startsWith:"{",endsWith:"}"}):n.value==="-Regex"||n.value==="+Regex"?de(H({},n),{startsWith:"[",endsWith:"]"}):n.value==="-Extension"||n.value==="+Extension"?de(H({},n),{startsWith:"*.",endsWith:""}):de(H({},n),{startsWith:"",endsWith:""}))});pathEffect=xe(()=>{let t=this.path(),e=t.slice(1),n=t.startsWith("-")?"-":"+",i=this.osType()==="Windows",a=i?"\\":"/";e.startsWith("%")&&e.endsWith(a)||i&&e.slice(2).startsWith(a)&&e.endsWith(a)||e.startsWith(a)&&e.endsWith(a)?(this.pathType.set(`${n}Folder`),this.internalPath.set(e)):e.startsWith("*")&&e.endsWith(`*${a}`)?(this.pathType.set(`${n}FolderName`),this.internalPath.set(e.slice(1,-2))):e.startsWith("[.*")&&e.endsWith(`[^\\${a}]*]`)?(this.pathType.set(`${n}FileName`),this.internalPath.set(e.slice(3,-7))):e.startsWith("{")&&e.endsWith("}")?(this.pathType.set(`${n}FileGroup`),this.internalPath.set(e.slice(1,-1))):e.startsWith("[")&&e.endsWith("]")?(this.pathType.set(`${n}Regex`),this.internalPath.set(e.slice(1,-1))):e.startsWith("*.")?(this.pathType.set(`${n}Extension`),this.internalPath.set(e.slice(2))):(this.pathType.set(`${n}Expression`),this.internalPath.set(e))});updateFilter(){let t=this.internalPath(),e=this.currentExpressionOption();t!==""&&this.pathChange.emit(`${e?.value.slice(0,1)}${e?.startsWith??""}${t}${e?.endsWith??""}`)}removeFilter(){this.remove.emit()}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=Z({type:o,selectors:[["app-new-filter"]],inputs:{path:[1,"path"],osType:[1,"osType"]},outputs:{pathChange:"pathChange",remove:"remove"},decls:9,vars:6,consts:()=>{let t;return t=$localize`Select an option...`,[["value","value","label","key",3,"options","isClearable"],["type","text","placeholder",t,3,"ngModelChange","ngModel"],[1,"expression-input"],["type","text",3,"ngModelChange","ngModel"],["prefix",""],["suffix",""],[1,"filter-removal",3,"click"],[1,"spk-primary"]]},template:function(e,n){if(e&1&&(s(0,"spk-select",0)(1,"input",1),G("ngModelChange",function(a){return L(n.pathType,a)||(n.pathType=a),a}),S("ngModelChange",function(){return n.updateFilter()}),r()(),s(2,"spk-form-field",2)(3,"input",3),G("ngModelChange",function(a){return L(n.internalPath,a)||(n.internalPath=a),a}),S("ngModelChange",function(){return n.updateFilter()}),r(),g(4,hn,2,1,"ng-container",4)(5,An,2,1,"ng-container",5),r(),s(6,"div",6),S("click",function(){return n.removeFilter()}),s(7,"spk-icon",7),d(8,"x-circle"),r()()),e&2){let i,a;p("options",n.expressionOptions())("isClearable",!1),l(),b("ngModel",n.pathType),l(2),b("ngModel",n.internalPath),l(),C(!((i=n.currentExpressionOption())==null||i.startsWith==null)&&i.startsWith.length?4:-1),l(),C(!((a=n.currentExpressionOption())==null||a.endsWith==null)&&a.endsWith.length?5:-1)}},dependencies:[Te,ie,oe,ge,ce,le,ne],styles:["[_nghost-%COMP%]{display:grid;grid-template-columns:13.125rem 1fr 1.875rem;gap:.5rem;align-items:flex-end}.expression-input[_ngcontent-%COMP%]{--ff-suffix-bg: var(--base-2)}.filter-removal[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;justify-content:center;height:2.5rem;flex:0 0}"],changeDetection:0})};var Nn=["formRef"],Yt=()=>({standalone:!0});function yn(o,t){if(o&1){let e=R();s(0,"spk-form-field",42)(1,"input",43),G("ngModelChange",function(i){u(e);let a=_(2);return L(a.editingPath,i)||(a.editingPath=i),m(i)}),r()(),s(2,"button",44),S("click",function(){u(e);let i=_(2);return m(i.updatePath())}),s(3,"spk-icon"),d(4,"floppy-disk"),r()(),s(5,"button",44),S("click",function(){u(e);let i=_(2);return m(i.cancelEditPath())}),s(6,"spk-icon"),d(7,"x-bold"),r()()}if(o&2){let e=_(2);l(),b("ngModel",e.editingPath),p("ngModelOptions",qe(2,Yt))}}function On(o,t){if(o&1){let e=R();s(0,"spk-form-field",42),F(1,"input",45),r(),s(2,"button",44),S("click",function(){u(e);let i=_().$implicit,a=_();return m(a.editPath(i))}),s(3,"spk-icon"),d(4,"pen"),r()(),s(5,"button",44),S("click",function(){u(e);let i=_().$implicit,a=_();return m(a.removePath(i))}),s(6,"spk-icon"),d(7,"trash-simple"),r()()}if(o&2){let e=_().$implicit;wt("readonly",!0),l(),p("ngModel",e)("ngModelOptions",qe(3,Yt))}}function kn(o,t){if(o&1&&(s(0,"div",30),g(1,yn,8,3)(2,On,8,4),r()),o&2){let e=t.$implicit,n=_();l(),C(n.oldPath()===e?1:2)}}function Mn(o,t){if(o&1){let e=R();s(0,"app-new-filter",47),S("pathChange",function(i){let a=u(e).$index,c=_(2);return m(c.patchPathAt(i,a))})("remove",function(){let i=u(e).$index,a=_(2);return m(a.removePathAt(i))}),r()}if(o&2){let e,n=t.$implicit,i=_(2);p("path",n)("osType",(e=i.osType())!==null&&e!==void 0?e:"")}}function xn(o,t){if(o&1&&ee(0,Mn,1,2,"app-new-filter",46,J),o&2){let e=_();te(e.pathArray())}}function $n(o,t){if(o&1&&(s(0,"div",41)(1,"spk-form-field"),F(2,"input",48),r(),s(3,"spk-select",49),F(4,"input",50),r()()),o&2){let e=_();l(3),p("options",e.sizeOptions())("isClearable",!1)}}var pe=new Ce,wn=["Bytes","KB","MB","GB","TB","PB"],Zt=(o={path:"",filters:[],excludes:{hidden:!1,system:!1,temporary:!1,filesLargerThan:null}})=>pe.group({path:pe.control(o.path),excludes:pe.group({hidden:pe.control(o.excludes.hidden),system:pe.control(o.excludes.system),temporary:pe.control(o.excludes.temporary),filesLargerThan:pe.group({size:pe.control(null),unit:pe.control(null)})})}),Ot=class o{#n=P(_e);#t=P(se);#e=P(me);formRef=ye.required("formRef");sourceDataForm=this.#n.sourceDataForm;sourceDataFormSignal=this.#n.sourceDataFormSignal;newPathCtrl=new ct("");filesLargerThan=$(()=>this.sourceDataFormSignal()?.excludes?.filesLargerThan?.size!==null);sizeOptions=f(wn);osType=this.#n.osType;pathSignal=he(this.sourceDataForm.controls.path.valueChanges);pathArray=$(()=>this.pathSignal()?.split("\0").filter(t=>t.startsWith("-")||t.startsWith("+")||t==="___none___")??[]);nonFilterPaths=$(()=>this.pathSignal()?.split("\0").filter(t=>!t.startsWith("-")&&!t.startsWith("+")&&t!==""));oldPath=f(null);editingPath=f(null);addingNewPath=f(!1);editPath(t){this.oldPath.set(t),this.editingPath.set(t)}updatePath(){let t=this.oldPath(),e=this.editingPath();if(!t||!e||e===t){this.oldPath.set(null),this.editingPath.set(null);return}let n=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(n?.replace(t,e)??""),this.oldPath.set(null),this.editingPath.set(null)}cancelEditPath(){this.oldPath.set(null),this.editingPath.set(null)}removePath(t){let e=this.sourceDataForm.controls.path.value??"",n=e.indexOf(t);if(n===-1)return;let i=n===0?t:"\0"+t,a=e.replace(i,"");this.sourceDataForm.controls.path.setValue(a)}addFilter(t="-*"){let e=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(`${e}\0${t}`)}patchPathAt(t,e){let i=this.sourceDataForm.controls.path.value.split("\0").filter(c=>!c.startsWith("-")&&!c.startsWith("+")).join("\0"),a=this.pathArray().map((c,A)=>A===e?`${t}`:`${c}`).join("\0");this.sourceDataForm.controls.path.setValue(`${i}\0${a}`)}removePathAt(t){let n=this.sourceDataForm.controls.path.value.split("\0").filter(a=>!a.startsWith("-")&&!a.startsWith("+")).join("\0"),i=this.pathArray().filter((a,c)=>c!==t).join("\0");this.sourceDataForm.controls.path.setValue(`${n}\0${i}`)}getPath(){return this.sourceDataForm.value.path??null}toggleFilesLargerThan(){this.sourceDataForm.controls.excludes.value.filesLargerThan?.size===null?this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:50,unit:"MB"}):this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:null,unit:null})}addNewPath(){let t=this.sourceDataForm.controls.path.value,e=this.newPathCtrl.value;this.sourceDataForm.controls.path.setValue(`${t}\0${e}`),this.newPathCtrl.setValue("")}goBack(){this.#t.navigate(["destination"],{relativeTo:this.#e.parent})}next(){this.#n.isNew()||this.#n.submit(!0),this.#t.navigate(["schedule"],{relativeTo:this.#e.parent})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=Z({type:o,selectors:[["app-source-data"]],viewQuery:function(e,n){e&1&&Oe(n.formRef,Nn,5),e&2&&ke()},decls:56,vars:12,consts:()=>{let t;t=$localize`Path`;let e;e=$localize`Add a direct path`;let n;n=$localize`Hidden files`;let i;i=$localize`System files`;let a;a=$localize`Temporary files`;let c;c=$localize`Source Data`;let A;A=$localize`Folder path`;let k;k=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let I;I=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let V;V=$localize`Paths`;let N;N=$localize`Add a path directly from your machine.`;let w;w=$localize`Filters`;let U;U=$localize`Customize your filters.`;let j;j=$localize`Add filter`;let Q;Q=$localize`Exclude`;let h;h=$localize`Choose if there’s any files you want to exclude.`;let T;T=$localize` Hidden files ${"\uFFFD#46\uFFFD\uFFFD/#46\uFFFD"}:TAG_INPUT:`;let v;v=$localize` System files ${"\uFFFD#49\uFFFD\uFFFD/#49\uFFFD"}:TAG_INPUT:`;let X;X=$localize` Temporary files ${"\uFFFD#52\uFFFD\uFFFD/#52\uFFFD"}:TAG_INPUT:`;let W;W=$localize` Files larger than `;let y;y=$localize`Edit path`;let re;return re=$localize`Select an option...`,[["formRef",""],c,A,k,I,V,N,w,U,j,Q,h,T,v,X,W,[3,"submit","formGroup"],[1,"left"],[1,"title-30"],[1,"fill",3,"multiSelect","startingPath","showFiles"],["for","path"],["type","text","id","path","tabindex","4","placeholder",t,"formControlName","path"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],[1,"right"],[3,"disallowToggle"],["title",""],["description",""],[1,"paths"],[1,"path"],[1,"row-inputs"],["type","text","placeholder",e,3,"formControl"],["spk-button","","type","button",1,"raised","primary",3,"click"],["type","button","spk-button","","action","",3,"click"],["formGroupName","excludes",3,"disallowToggle"],[1,"raised","primary"],["type","checkbox","placeholder",n,"formControlName","hidden"],["type","checkbox","placeholder",i,"formControlName","system"],["type","checkbox","placeholder",a,"formControlName","temporary"],[1,"raised","primary",3,"click"],["formGroupName","filesLargerThan",1,"row-inputs"],[1,"small"],["type","text","placeholder",y,3,"ngModelChange","ngModel","ngModelOptions"],["spk-button","","type","button",1,"small",3,"click"],["type","text",3,"ngModel","ngModelOptions"],[3,"path","osType"],[3,"pathChange","remove","path","osType"],["type","number","formControlName","size"],[3,"options","isClearable"],["type","text","formControlName","unit","placeholder",re]]},template:function(e,n){if(e&1){let i=R();s(0,"form",16,0),S("submit",function(){return u(i),m(n.next())}),s(2,"div",17)(3,"h3",18),O(4,1),r(),s(5,"app-file-tree",19)(6,"label",20),O(7,2),r(),F(8,"input",21),r(),s(9,"div",22)(10,"button",23),S("click",function(){return u(i),m(n.goBack())}),E(11,3),F(12,"spk-icon"),D(),r(),s(13,"button",24),E(14,4),F(15,"spk-icon"),D(),r()()(),s(16,"div",25)(17,"app-toggle-card",26),B(18,27),O(19,5),K(),s(20,"p",28),O(21,6),r(),s(22,"div",29),ee(23,kn,3,1,"div",30,J),s(25,"div",31)(26,"spk-form-field"),F(27,"input",32),r(),s(28,"button",33),S("click",function(){return u(i),m(n.addNewPath())}),s(29,"spk-icon"),d(30,"plus"),r()()()()(),s(31,"app-toggle-card",26),B(32,27),O(33,7),K(),s(34,"p",28),O(35,8),r(),s(36,"button",34),S("click",function(){return u(i),m(n.addFilter())}),O(37,9),r(),g(38,xn,2,0),r(),s(39,"app-toggle-card",35),B(40,27),O(41,10),K(),s(42,"p",28),O(43,11),r(),s(44,"spk-toggle",36),E(45,12),F(46,"input",37),D(),r(),s(47,"spk-toggle",36),E(48,13),F(49,"input",38),D(),r(),s(50,"spk-toggle",36),E(51,14),F(52,"input",39),D(),r(),s(53,"spk-toggle",40),S("click",function(){return u(i),m(n.toggleFilesLargerThan())}),O(54,15),r(),g(55,$n,5,2,"div",41),r()()()}if(e&2){let i;p("formGroup",n.sourceDataForm),l(5),p("multiSelect",!0)("startingPath",n.getPath())("showFiles",!0),l(12),p("disallowToggle",!0),l(6),te(n.nonFilterPaths()),l(4),p("formControl",n.newPathCtrl),l(4),p("disallowToggle",!0),l(7),C((i=n.pathSignal())!=null&&i.length?38:-1),l(),p("disallowToggle",!0),l(14),ue("active",n.filesLargerThan()),l(2),C(n.filesLargerThan()?55:-1)}},dependencies:[Te,Le,ie,Ge,Ie,oe,be,ge,Be,_t,Ue,Ve,pt,le,ne,Fe,we,ce,Tt,mt,Ke],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;width:100%;flex:1 0;overflow:hidden}form[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;flex:1 0;overflow:hidden}.right[_ngcontent-%COMP%], .left[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:1.5rem}.left[_ngcontent-%COMP%]{padding:2.5rem;overflow:hidden;border-right:1px solid var(--base-4)}.right[_ngcontent-%COMP%]{padding:2.5rem 1.5rem;overflow:auto}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}spk-divider[_ngcontent-%COMP%]{margin:.75rem 0}.row-inputs[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr min-content;gap:.25rem}.paths[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.path[_ngcontent-%COMP%]{display:grid;align-items:center;grid-template-columns:1fr min-content min-content;gap:.25rem}"],changeDetection:0})};var Jt="1W:1D,4W:1W,12M:1M",Se=new Ce,_e=class o{#n=P(se);#t=P(Re);#e=P($e);#i=P(lt);#o=P(Ct);generalForm=Qt();sourceDataForm=Zt();scheduleFields={autoRun:f(Ae.autoRun),nextTime:f(Ae.nextTime),runAgain:f(Ae.runAgain)};destinationForm=en();settings=f([]);optionsFields={remoteVolumeSize:f("50MB"),backupRetention:f("all"),backupRetentionTime:f(""),backupRetentionVersions:f(0),backupRetentionCustom:f("")};isDraft=f(!1);backupId=f(null);backupName=$(()=>this.generalFormSignal()?.name??"");isSubmitting=f(!1);finishedLoading=f(!1);backupDefaults=f(null);applicationOptions=f(null);isNew=$(()=>this.backupId()==="new");osType=$(()=>this.#t.systemInfo()?.OSType);selectedOptions=f([]);selectedAdvancedFormPair=f([]);destinationFormPair=f({oauthField:null,custom:[],dynamic:[],advanced:[]});notSelectedAdvancedFormPair=$(()=>{let t=this.destinationFormPair()?.advanced??[],e=this.selectedAdvancedFormPair()??[];return t.filter(n=>e.findIndex(i=>i.name===n.name)===-1)});selectedHttpOptions=f([]);notSelectedHttpOptions=$(()=>{let t=this.httpOptions(),e=this.selectedHttpOptions()??[];return t.filter(n=>e.findIndex(i=>i.name===n.name)===-1)});sourceDataFormSignal=he(this.sourceDataForm.valueChanges);destinationFormSignal=he(this.destinationForm.valueChanges);generalFormSignal=he(this.generalForm.valueChanges);encryptionFieldSignal=he(this.generalForm.controls.encryption.valueChanges);destinationOptions=$(()=>this.#t.backendModules()??[]);httpOptions=$(()=>this.#t.systemInfo()?.GenericModules?.find(t=>t.Key==="http-options")?.Options?.map(this.#a)??[]);advancedOptions=$(()=>this.#t.systemInfo()?.Options?.map(this.#a)??[]);#a(t){return{name:t.Name,type:t.Type,shortDescription:t.ShortDescription??void 0,longDescription:t.LongDescription??void 0,options:t.ValidValues}}encryptionOptions=$(()=>{let t=this.#t.systemInfo()?.EncryptionModules??[];return[Nt,...t]});nonSelectedOptions=$(()=>this.advancedOptions().sort((t,e)=>t?.name&&e?.name?t?.name.localeCompare(e?.name):0).filter(t=>this.selectedOptions()?.findIndex(e=>e.name===t.name)===-1));addOrUpdateAdvancedFormPairByName(t,e,n){let i=this.selectedAdvancedFormPair().find(a=>a.name===t);if(i)this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced.controls[i.name].setValue(n);else{let a=this.notSelectedAdvancedFormPair().find(c=>c.name===t);if(!a)return;this.addAdvancedFormPair(a,e,n)}}addAdvancedFormPairByName(t,e,n){let i=this.notSelectedAdvancedFormPair().find(a=>a.name===t);i&&this.addAdvancedFormPair(i,e,n)}addHttpOptionByName(t,e,n){let i=this.notSelectedHttpOptions().find(a=>a.name===t);i&&this.addHttpOption(i,e,n)}addAdvancedFormPair(t,e,n){let i=this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced,a=n??t.defaultValue;this.createFormField(i,t,a),this.selectedAdvancedFormPair.set([...this.selectedAdvancedFormPair(),t])}addHttpOption(t,e,n){let i=this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced,a=n??t.defaultValue;this.createFormField(i,t,a),this.selectedHttpOptions.set([...this.selectedHttpOptions(),t])}removeAdvancedFormPair(t,e){this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced.removeControl(t.name),this.selectedAdvancedFormPair().findIndex(i=>i.name===t.name)!==-1?this.selectedAdvancedFormPair.update(i=>(i=i.filter(a=>a.name!==t.name),i)):this.selectedHttpOptions.update(i=>(i=i.filter(a=>a.name!==t.name),i))}removeHttpOption(t,e){this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced.removeControl(t.name),this.selectedHttpOptions.update(n=>(n=n.filter(i=>i.name!==t.name),n))}submit(t=!1){this.isSubmitting.set(!0);let e=this.#l(),n=this.backupId();n==="new"||!n||this.isDraft()?this.#i.postApiV1Backups({requestBody:e}).pipe(We(()=>this.isSubmitting.set(!1))).subscribe({next:i=>{t||this.exit(!1)},error:i=>{}}):this.#i.putApiV1BackupById({id:n,requestBody:e}).pipe(We(()=>this.isSubmitting.set(!1))).subscribe({next:i=>{t||this.exit(!1)},error:i=>{}})}exit(t){if(!t){this.#_(),this.#n.navigate(["/"]);return}this.#e.open(q,{data:{title:$localize`Confirm exit?`,message:$localize`Are you sure you want to exit?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:e=>{e&&(this.#_(),this.#n.navigate(["/"]))}})}updateFieldsFromTargetUrl(t){this.#s(),setTimeout(()=>{this.#r(t)})}#s(){this.destinationFormPair.set({oauthField:null,custom:[],dynamic:[],advanced:[]}),this.selectedAdvancedFormPair.set([]),this.selectedHttpOptions.set([]),this.destinationForm.controls.destinations.clear(),this.destinationForm.reset()}mapSourceDataToForm(t){let e=t.Sources??"",n=t.Filters?.map(A=>`${A.Include?"":"-"}${A.Expression}`)??[],i=t.Settings?.find(A=>A.Name==="--exclude-files-attributes")?.Value??"",a=t.Settings?.find(A=>A.Name==="--skip-files-larger-than")??null,c={path:[...e,...n].join("\0"),excludes:{hiddenFiles:i.includes("hidden"),systemFiles:i.includes("system"),tempFiles:i.includes("temporary"),filesLargerThan:a?.Value?.toUpperCase()??null}};this.sourceDataForm.patchValue(c)}mapDestinationToForm(t){let e=t.TargetURL?ht(t.TargetURL):null;e&&this.addDestinationFormGroup(e.destinationType,{custom:e.custom,dynamic:e.dynamic,advanced:e.advanced},!0)}#r(t){let e=ht(t);e&&this.addDestinationFormGroup(e.destinationType,{custom:e.custom,dynamic:e.dynamic,advanced:e.advanced},!0)}mapGeneralToForm(t){let e=t.Settings?.find(c=>c.Name==="encryption-module"),n=t.Settings?.find(c=>c.Name==="passphrase")?.Value??"",i=e?.Value&&e.Value.length?e.Value:"",a={name:t.Name??"",description:t.Description??""};i&&i!==""&&(a.encryption=i),n&&n!==""&&(a.password=n,a.repeatPassword=n),this.generalForm.patchValue(a)}mapScheduleToForm(t){if(!t){this.scheduleFields.autoRun.set(!1);return}let e=this.#o.fromString(t.Repeat)??null,n=this.#p(t.Time);this.scheduleFields.autoRun.set(!0),this.scheduleFields.nextTime.update(i=>H(H({},i),n)),this.scheduleFields.runAgain.set({repeatValue:e?.value??1,repeatUnit:e?.unit??"D",allowedDays:{mon:t.AllowedDays?.includes("mon")??!1,tue:t.AllowedDays?.includes("tue")??!1,wed:t.AllowedDays?.includes("wed")??!1,thu:t.AllowedDays?.includes("thu")??!1,fri:t.AllowedDays?.includes("fri")??!1,sat:t.AllowedDays?.includes("sat")??!1,sun:t.AllowedDays?.includes("sun")??!1}})}mapOptionsToForms(t){let e=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than","dblock-size","passphrase","keep-time","keep-versions","retention-policy"],n=t.Settings?.filter(c=>!e.includes(c.Name)),i=t.Settings?.filter(c=>e.includes(c.Name));this.settings.set(n??[]),n?.forEach(c=>{if(c.Name==="encryption-module"&&this.isNew())return this.generalForm.controls.encryption.setValue(c.Value??"")});var a="all";i?.forEach(c=>{if(c.Name==="dblock-size"&&this.optionsFields.remoteVolumeSize.set(c.Value??"50MB"),c.Name==="keep-time"&&(c.Value??"")!=="")return a="time",this.optionsFields.backupRetentionTime.set(c.Value??"");if(c.Name==="keep-versions"&&(c.Value??"")!=="")return a="versions",this.optionsFields.backupRetentionVersions.set(c.Value?parseInt(c.Value):null);if(c.Name==="retention-policy"&&(c.Value??"")!=="")if(c.Value===Jt)a="smart";else return a="custom",this.optionsFields.backupRetentionCustom.set(c.Value??"")}),this.optionsFields.backupRetention.set(a)}getCurrentTargetUrl(){return this.#c(this.destinationForm.controls.destinations)}getScheduleFormValue(){return{autoRun:this.scheduleFields.autoRun(),nextTime:this.scheduleFields.nextTime(),runAgain:this.scheduleFields.runAgain()}}#l(){let t=this.generalForm.value,e=this.getScheduleFormValue(),n=this.sourceDataForm.value,a=this.destinationForm.value.destinations?.length?this.#c(this.destinationForm.controls.destinations):[],c=null;e.runAgain?.repeatUnit&&e.runAgain?.repeatValue&&(c=this.#o.toString(e.runAgain.repeatValue,e.runAgain.repeatUnit));let A=e.runAgain?.allowedDays?Object.entries(e.runAgain?.allowedDays).filter(([w,U])=>U).map(([w,U])=>w):[],k=n.path?.split("\0")??[],I=this.mapFormsToSettings(),V=Object.entries(n.excludes??{}).filter(([w,U])=>U&&w!=="filesLargerThan").map(([w])=>w),N=n.excludes?.filesLargerThan;return V.length&&I.push({Name:"--exclude-files-attributes",Value:V.join(",")}),N&&N.size!==null&&N.unit!==null&&I.push({Name:"--skip-files-larger-than",Value:`${N.size}${N.unit}`}),{Backup:{Name:t.name,Description:t.description,TargetURL:a[0]??null,Sources:k.filter(w=>!w.startsWith("-")),Settings:I,Filters:k.filter(w=>w.startsWith("-")).map((w,U)=>({Order:U,Include:!1,Expression:w.slice(1)}))},Schedule:e.autoRun?{Repeat:c,Time:e.nextTime?.date?new Date(`${e.nextTime.date}T${e.nextTime?.time||"00:00:00"}`).toISOString():null,AllowedDays:A}:null}}mapFormsToSettings(t=[]){let e=this.generalForm.value,n=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than","encryption-module","passphrase","keep-time","keep-versions","retention-policy","dblock-size"],i=[{Name:"--no-encryption",Value:"True"}];e.encryption!==""&&(i=[{Name:"encryption-module",Value:e.encryption??null},{Name:"passphrase",Value:e.password??null}]);let a=[{Name:"dblock-size",Value:this.optionsFields.remoteVolumeSize()}];switch(this.optionsFields.backupRetention()){case"time":a.push({Name:"keep-time",Value:this.optionsFields.backupRetentionTime()});break;case"versions":a.push({Name:"keep-versions",Value:this.optionsFields.backupRetentionVersions()?.toString()??""});break;case"custom":a.push({Name:"retention-policy",Value:this.optionsFields.backupRetentionCustom()});break;case"smart":a.push({Name:"retention-policy",Value:Jt});break}let c=[...t,...n],A=this.settings().filter(k=>!c.includes(k.Name)).map(k=>{let I=k.Value;return typeof k.Value=="number"&&(I=k.Value.toString()),typeof k.Value=="boolean"&&(I=k.Value?"True":"False"),{Name:k.Name,Value:I}});return[...i,...a,...A]}#c(t){return t.controls.map(e=>dt(e.value))}#p(t){if(!t||t?.indexOf("T")===-1)return{time:t??"13:00"};let e=new Date(t);return{time:`${(""+e.getHours()).padStart(2,"0")}:${(""+e.getMinutes()).padStart(2,"0")}`,date:e.toISOString().split("T")[0]}}createFormField(t,e,n){if(e.type==="Integer"){t.addControl(e.name,Se.control(n?parseInt(n):0));return}if(e.type==="Boolean"){t.addControl(e.name,Se.control(n==="true"||n==="True"));return}if(e.type==="Flags"){t.addControl(e.name,Se.control(n??""));return}if(e.type==="Timespan"||e.type==="DateTime"){t.addControl(e.name,Se.control(n,[ve.pattern(/([-+]?\d{1,3}[smhDWMY])+/)]));return}t.addControl(e.name,Se.control(n))}addDestinationFormGroup(t,e,n=!1){let i=ut.find(h=>h.customKey===t||h.key===t),a=i?.key,c=this.destinationOptions().find(h=>h.Key===a),A=this.httpOptions();if(!c||!c.Options)return;let k=i&&i.oauthField?i.oauthField:null,I=i&&i.customFields?i.customFields:{},V=i&&i.dynamicFields?i.dynamicFields:[],N=i&&i.advancedFields?i.advancedFields:[],w=i&&i.ignoredAdvancedFields?i.ignoredAdvancedFields:[];this.destinationFormPair.set({oauthField:k,custom:[],dynamic:[],advanced:[]});let U=Se.group({}),j=Se.group({}),Q=Se.group({});I&&Object.entries(I).forEach(([h,T],v)=>{let y=T,{formElement:X}=y,W=xt(y,["formElement"]);U.addControl(h,X(e?.custom[h])),this.destinationFormPair.update(re=>(re.custom.push(H({order:900+v},W)),re))});for(let h=0;h<c.Options.length;h++){let T=c.Options[h];if(T.Deprecated)continue;let v=V.find(X=>X===T.Name||T.Aliases?.includes(X.name)||X.name===T.Name);if(v){let X=T.Aliases?.indexOf(v.name)??-1,W=T.Aliases&&X>-1?T.Aliases[X]:T.Name,y=v&&typeof v!="string",re=y?v?.defaultValue??T.DefaultValue:T.DefaultValue,M={name:W,type:T.Type,shortDescription:T.ShortDescription??void 0,longDescription:T.LongDescription??void 0,options:T.ValidValues,order:900+h},Xe=y?H(H({},M),v):M,Y=e?.dynamic[W]??re??T.DefaultValue;this.createFormField(j,Xe,Y),this.destinationFormPair.update(Mt=>(Mt.dynamic.push(Xe),Mt))}else{if(w.find(Y=>Y===T.Name))continue;let W=N.find(Y=>Y===T.Name||Y.name===T.Name),y=W&&typeof W!="string",re=e?.advanced[T.Name],M=re??T.DefaultValue,Xe={name:T.Name,type:T.Type,shortDescription:T.ShortDescription??void 0,longDescription:T.LongDescription??void 0,options:T.ValidValues,defaultValue:M,order:900+h},tt=y?H(H({},Xe),W):Xe;n&&re&&(this.createFormField(Q,tt,M),this.selectedAdvancedFormPair.update(Y=>(Y.push(tt),Y))),this.destinationFormPair.update(Y=>(Y.advanced.push(tt),Y))}}for(let h=0;h<A.length;h++){let T=A[h],v=e?.advanced[T.name],X=v??T.defaultValue;n&&v&&(this.createFormField(Q,T,X),this.selectedHttpOptions.update(W=>(W.push(T),W)))}this.destinationFormPair.update(h=>({oauthField:h.oauthField,custom:h.custom.sort((T,v)=>T.order-v.order),dynamic:h.dynamic.sort((T,v)=>T.order-v.order),advanced:h.advanced.sort((T,v)=>T.order-v.order)})),this.destinationForm.controls.destinations.push(tn({key:i?.customKey??t,customGroup:U,dynamicGroup:j,advancedGroup:Q}))}#_(){this.generalForm.reset(),this.destinationForm.controls.destinations.clear(),this.destinationForm.reset(),this.sourceDataForm.reset(),this.scheduleFields.autoRun.set(Ae.autoRun),this.scheduleFields.nextTime.set(Ae.nextTime),this.scheduleFields.runAgain.set(Ae.runAgain),this.optionsFields.remoteVolumeSize.set("50MB"),this.optionsFields.backupRetention.set("all"),this.settings.set([])}static \u0275fac=function(e){return new(e||o)};static \u0275prov=Pe({token:o,factory:o.\u0275fac,providedIn:"root"})};var Rn=["formRef"],In=(o,t,e,n)=>({index:o,formView:t,formGroupName:"custom",destinationType:e,oauthField:n}),St=o=>({$implicit:o}),vn=(o,t,e,n)=>({index:o,formView:t,formGroupName:"dynamic",destinationType:e,oauthField:n}),bn=(o,t,e,n)=>({index:o,formView:t,formGroupName:"advanced",destinationType:e,oauthField:n}),Ln=(o,t,e,n)=>({index:o,formView:t,formGroupName:"advanced",asHttpOptions:!0,destinationType:e,oauthField:n}),Gn=()=>({maxWidth:"700px",width:"100%"});function Un(o,t){o&1&&(E(0,5,2),F(1,"spk-icon"),D())}function Vn(o,t){o&1&&O(0,5,3)}function Bn(o,t){if(o&1){let e=R();E(0,5,1),s(1,"button",21),S("click",function(){u(e);let i=_();return m(i.testDestination())}),g(2,Un,2,0)(3,Vn,1,0),r(),D()}if(o&2){let e=_();l(),ue("loader",e.testLoading())("success",e.successfulTest()),l(),C(e.successfulTest()?2:3)}}function Kn(o,t){if(o&1){let e=R();s(0,"p",27),S("click",function(){u(e);let i=_();return m(i.removeDestinationFormGroup(i.destinationCount()-1))}),E(1,8),F(2,"strong")(3,"br")(4,"span",28),D(),r()}if(o&2){let e,n=_();l(4),it((e=n.selectedDestinationType())==null?null:e.displayName),ot(1)}}function zn(o,t){if(o&1){let e=R();s(0,"div",34),S("click",function(){let i=u(e).$implicit,a=_(2);return m(a.addDestinationFormGroup(i.key))}),s(1,"h3"),d(2),r(),s(3,"p"),d(4),r()()}if(o&2){let e=t.$implicit;l(2),Me(e.displayName),l(2),Me(e.description)}}function Xn(o,t){if(o&1){let e=R();s(0,"button",35,1),S("click",function(){let i=u(e).$implicit,a=_(2);return m(a.addDestinationFormGroup(i.key))}),d(2),r()}if(o&2){let e=t.$implicit;l(2),z(" ",e.displayName," ")}}function Wn(o,t){if(o&1&&(s(0,"div",29),ee(1,zn,5,2,"div",30,J),r(),s(3,"spk-menu",31)(4,"button",32),O(5,9),r(),B(6,20),ee(7,Xn,3,1,"button",33,J),K(),r()),o&2){let e=_();l(),te(e.destinationTypeOptionsFocused()),l(2),p("searchable",!0),l(4),te(e.destinationTypeOptionsNotFocused())}}function Hn(o,t){o&1&&He(0)}function jn(o,t){if(o&1&&g(0,Hn,1,0,"ng-container",40),o&2){let e,n=t.$implicit,i=t.$index;_();let a=ae(29),c=_();p("ngTemplateOutlet",a)("ngTemplateOutletContext",Qe(7,St,Ye(2,In,i,n,(e=c.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,c.destinationFormPair().oauthField)))}}function qn(o,t){o&1&&He(0)}function Qn(o,t){if(o&1&&g(0,qn,1,0,"ng-container",40),o&2){let e,n=t.$implicit,i=t.$index;_();let a=ae(29),c=_();p("ngTemplateOutlet",a)("ngTemplateOutletContext",Qe(7,St,Ye(2,vn,i,n,(e=c.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,c.destinationFormPair().oauthField)))}}function Yn(o,t){if(o&1){let e=R();E(0,10,1),s(1,"button",35,1),S("click",function(){let i=u(e).$implicit,a=_(2);return m(a.addAdvancedFormPair(i,0))}),r(),D()}if(o&2){let e=t.$implicit;l(),it(e.name),ot(0)}}function Zn(o,t){o&1&&He(0)}function Jn(o,t){if(o&1&&g(0,Zn,1,0,"ng-container",40),o&2){let e,n=t.$implicit,i=t.$index;_();let a=ae(29),c=_();p("ngTemplateOutlet",a)("ngTemplateOutletContext",Qe(7,St,Ye(2,bn,i,n,(e=c.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,c.destinationFormPair().oauthField)))}}function ei(o,t){if(o&1){let e=R();E(0,11,1),s(1,"button",35,1),S("click",function(){let i=u(e).$implicit,a=_(2);return m(a.addHttpOption(i,0))}),r(),D()}if(o&2){let e=t.$implicit;l(),it(e.name),ot(0)}}function ti(o,t){o&1&&He(0)}function ni(o,t){if(o&1&&g(0,ti,1,0,"ng-container",40),o&2){let e,n=t.$implicit,i=t.$index;_();let a=ae(29),c=_();p("ngTemplateOutlet",a)("ngTemplateOutletContext",Qe(7,St,Ye(2,Ln,i,n,(e=c.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,c.destinationFormPair().oauthField)))}}function ii(o,t){if(o&1&&(s(0,"spk-icon",49),d(1,"question"),r()),o&2){let e=_(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function oi(o,t){if(o&1&&(s(0,"app-file-tree",43)(1,"label",48),d(2),g(3,ii,2,1,"spk-icon",49),r(),F(4,"input",50),r()),o&2){let e=_().$implicit,n=x(2),i=x(3),a=_(2);p("startingPath",a.getFormFieldValue(0,e.formGroupName,e.formView.name))("accepts",e.formView.accepts)("showFiles",!0)("hideShortcuts",!0)("showHiddenNodes",!0)("selectFiles",!0),l(),p("for",i),l(),z(" ",n," "),l(),C(e.formView.longDescription?3:-1),l(),p("id",i)("formControlName",e.formView.name)}}function ai(o,t){if(o&1&&(s(0,"spk-icon",49),d(1,"question"),r()),o&2){let e=_(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function ri(o,t){if(o&1&&(s(0,"app-file-tree",44)(1,"label",48),d(2),g(3,ai,2,1,"spk-icon",49),r(),F(4,"input",50),r()),o&2){let e=_().$implicit,n=x(2),i=x(3),a=_(2);p("hideShortcuts",!0)("startingPath",a.getFormFieldValue(0,e.formGroupName,e.formView.name)),l(),p("for",i),l(),z(" ",n," "),l(),C(e.formView.longDescription?3:-1),l(),p("id",i)("formControlName",e.formView.name)}}function si(o,t){if(o&1&&(s(0,"spk-icon",49),d(1,"question"),r()),o&2){let e=_(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function li(o,t){if(o&1&&(s(0,"spk-icon",54),d(1," link "),r()),o&2){_();let e=x(7),n=x(8);ue("error",e&&n==="error")("warn",e&&n==="warning"),p("spkTooltip",e)}}function ci(o,t){o&1&&(s(0,"spk-icon",53),d(1,"envelope"),r())}function _i(o,t){o&1&&(s(0,"spk-icon",53),d(1,"textbox"),r())}function pi(o,t){if(o&1&&(s(0,"spk-form-field")(1,"label",48),d(2),g(3,si,2,1,"spk-icon",49),r(),F(4,"input",51),je(5)(6)(7)(8),g(9,li,2,5,"spk-icon",52)(10,ci,2,0,"spk-icon",53)(11,_i,2,0,"spk-icon",53),r()),o&2){let e=_().$implicit,n=x(2),i=x(3),a=_(2);l(),p("for",i),l(),z(" ",n," "),l(),C(e.formView.longDescription?3:-1),l(),p("type",e.formView.type==="Email"?"email":"text")("id",i)("formControlName",e.formView.name);let c=a.getFormFieldValue(0,e.formGroupName,e.formView.name),A=a.hasDoubleLeadingSlashes(c);l(3),De(A&&(e.formView.doubleSlash==null?null:e.formView.doubleSlash.message)),l(),De(e.formView.doubleSlash==null?null:e.formView.doubleSlash.type),l(),C(e.formView.type==="Path"?9:e.formView.type==="Email"?10:11)}}function di(o,t){if(o&1&&(s(0,"spk-icon",49),d(1,"question"),r()),o&2){let e=_(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function ui(o,t){if(o&1){let e=R();s(0,"span",58),S("click",function(){u(e);let i=_(2).$implicit,a=_(2);return m(a.oauthStartTokenCreation(i.destinationType,i))}),d(1," AuthID "),r()}}function mi(o,t){o&1&&(s(0,"spk-icon",53),d(1,"password"),r())}function Fi(o,t){if(o&1){let e=R();s(0,"spk-icon",59),S("click",function(){u(e);let i=_(2).$implicit;return m(i.formView.showPassword=!i.formView.showPassword)}),d(1," eye "),r()}}function gi(o,t){if(o&1){let e=R();s(0,"spk-icon",59),S("click",function(){u(e);let i=_(2).$implicit;return m(i.formView.showPassword=!i.formView.showPassword)}),d(1," eye-slash "),r()}}function Ci(o,t){if(o&1&&(s(0,"spk-form-field")(1,"label",48),d(2),g(3,di,2,1,"spk-icon",49),r(),F(4,"input",55),g(5,ui,2,0,"span",56)(6,mi,2,0,"spk-icon",53)(7,Fi,2,0,"spk-icon",57)(8,gi,2,0,"spk-icon",57),r()),o&2){let e=_().$implicit,n=x(2),i=x(3);l(),p("for",i),l(),z(" ",n," "),l(),C(e.formView.longDescription?3:-1),l(),p("type",e.formView.showPassword?"text":"password")("id",i)("formControlName",e.formView.name),l(),C(e.oauthField===e.formView.name?5:6),l(2),C(e.formView.showPassword?7:8)}}function Ti(o,t){if(o&1&&(s(0,"spk-icon",49),d(1,"question"),r()),o&2){let e=_(3).$implicit;p("spkTooltip",e.formView.longDescription)}}function fi(o,t){if(o&1&&d(0),o&2){let e=_().$implicit;Dt(" ",e==null?null:e.key," (",e==null?null:e.value,") ")}}function Si(o,t){if(o&1&&d(0),o&2){let e=_().$implicit;z(" ",e," ")}}function Ei(o,t){if(o&1&&g(0,fi,1,2)(1,Si,1,1),o&2){let e=_(3).$implicit;C(e.formView.loadOptions?0:1)}}function Di(o,t){if(o&1&&(s(0,"spk-select",60)(1,"label",48),d(2),g(3,Ti,2,1,"spk-icon",49),r(),F(4,"input",50),r(),g(5,Ei,2,1,"ng-template",null,3,Ze)),o&2){let e=ae(6);_();let n=x(0),i=_().$implicit,a=x(2),c=x(3);p("options",n)("isClearable",!1)("optionTemplate",e),l(),p("for",c),l(),z(" ",a," "),l(),C(i.formView.longDescription?3:-1),l(),p("id",c)("formControlName",i.formView.name)}}function hi(o,t){if(o&1&&(je(0),g(1,Di,7,8)),o&2){let e=_().$implicit,n=De(e.formView.loadOptions?e.formView.loadOptions(_(2).injector)():e.formView.options);l(),C(n?1:-1)}}function Ai(o,t){if(o&1&&(s(0,"spk-icon",49),d(1,"question"),r()),o&2){let e=_(3).$implicit;p("spkTooltip",e.formView.longDescription)}}function Pi(o,t){if(o&1&&d(0),o&2){let e=t.$implicit;Dt(" ",e.key," ",e.value?"("+e.value+")":""," ")}}function Ni(o,t){if(o&1&&(s(0,"spk-select",62)(1,"label",48),d(2),g(3,Ai,2,1,"spk-icon",49),r(),F(4,"input",50),r(),g(5,Pi,1,2,"ng-template",null,4,Ze)),o&2){let e=ae(6);_();let n=x(0),i=_().$implicit,a=x(2),c=x(3);p("options",n)("asFreeText",!0)("inlineSearch",!0)("optionTemplate",e),l(),p("for",c),l(),z(" ",a," "),l(),C(i.formView.longDescription?3:-1),l(),p("id",c)("formControlName",i.formView.name)}}function yi(o,t){o&1&&F(0,"spk-progress-bar",61)}function Oi(o,t){if(o&1&&(je(0),g(1,Ni,7,9)(2,yi,1,0,"spk-progress-bar",61)),o&2){let e=_().$implicit,n=De(e.formView.loadOptions?e.formView.loadOptions(_(2).injector)():e.formView.options);l(),C(n?1:2)}}function ki(o,t){if(o&1&&(s(0,"spk-icon",49),d(1,"question"),r()),o&2){let e=_(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function Mi(o,t){if(o&1&&(s(0,"app-size",45)(1,"label",48),d(2),g(3,ki,2,1,"spk-icon",49),r()()),o&2){let e=_().$implicit,n=x(2),i=x(3);p("inputType",e.Name)("formControlName",e.formView.name)("customId",i),l(),p("for",i),l(),z(" ",n," "),l(),C(e.formView.longDescription?3:-1)}}function xi(o,t){if(o&1&&(s(0,"spk-icon",49),d(1,"question"),r()),o&2){let e=_(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function $i(o,t){if(o&1&&(s(0,"spk-form-field")(1,"label",48),d(2),g(3,xi,2,1,"spk-icon",49),r(),F(4,"input",63),s(5,"spk-icon",53),d(6,"numpad"),r()()),o&2){let e=_().$implicit,n=x(2),i=x(3);l(),p("for",i),l(),z(" ",n," "),l(),C(e.formView.longDescription?3:-1),l(),p("id",i)("formControlName",e.formView.name)}}function wi(o,t){if(o&1&&(s(0,"spk-icon",49),d(1,"question"),r()),o&2){let e=_(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function Ri(o,t){if(o&1&&(s(0,"spk-toggle",46)(1,"label",48),d(2),g(3,wi,2,1,"spk-icon",49),r(),F(4,"input",64),r()),o&2){let e=_().$implicit,n=x(2),i=x(3);l(),p("for",i),l(),z(" ",n," "),l(),C(e.formView.longDescription?3:-1),l(),p("id",i)("formControlName",e.formView.name)}}function Ii(o,t){if(o&1&&(s(0,"spk-icon",49),d(1,"question"),r()),o&2){let e=_(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function vi(o,t){if(o&1&&d(0),o&2){let e=t.$implicit;z(" ",e," ")}}function bi(o,t){if(o&1&&(s(0,"spk-select",65)(1,"label",48),d(2),g(3,Ii,2,1,"spk-icon",49),r(),F(4,"input",66),r(),g(5,vi,1,1,"ng-template",null,4,Ze)),o&2){let e=ae(6),n=_().$implicit,i=x(2);p("options",n.formView.options)("selectMultiple",!0)("optionTemplate",e),l(),vt("for","destination-",n.formGroupName,"-",n.index,""),l(),z(" ",i," "),l(),C(n.formView.longDescription?3:-1),l(),p("formControlName",n.formView.name)}}function Li(o,t){if(o&1&&(s(0,"spk-icon",49),d(1,"question"),r()),o&2){let e=_(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function Gi(o,t){if(o&1&&(s(0,"app-timespan",45)(1,"label",48),d(2),g(3,Li,2,1,"spk-icon",49),r()()),o&2){let e=_().$implicit,n=x(2),i=x(3);p("inputType",e.formView.name)("formControlName",e.formView.name)("customId",i),l(),p("for",i),l(),z(" ",n," "),l(),C(e.formView.longDescription?3:-1)}}function Ui(o,t){if(o&1&&(s(0,"spk-icon",49),d(1,"question"),r()),o&2){let e=_(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function Vi(o,t){if(o&1&&(s(0,"app-file-drop-textarea",47)(1,"label"),d(2),g(3,Ui,2,1,"spk-icon",49),r()()),o&2){let e,n=_().$implicit,i=x(3);p("formControlName",n.formView.name)("customId",i)("placeholder",n.formView.longDescription),l(2),z(" ",(e=n.formView.shortDescription)!==null&&e!==void 0?e:n.formView.name," "),l(),C(n.formView.longDescription?3:-1)}}function Bi(o,t){if(o&1){let e=R();s(0,"button",67),S("click",function(){u(e);let i=_().$implicit,a=_(2);return m(a.removeFormView(i.formView,0))}),s(1,"spk-icon"),d(2,"x-circle"),r()()}}function Ki(o,t){if(o&1&&(s(0,"div",41),B(1,42),je(2)(3),g(4,oi,5,11,"app-file-tree",43)(5,ri,5,7,"app-file-tree",44)(6,pi,12,9,"spk-form-field")(7,Ci,9,8,"spk-form-field")(8,hi,2,2)(9,Oi,3,2)(10,Mi,4,6,"app-size",45)(11,$i,7,5,"spk-form-field")(12,Ri,5,5,"spk-toggle",46)(13,bi,7,9)(14,Gi,4,6,"app-timespan",45)(15,Vi,4,5,"app-file-drop-textarea",47),K(),g(16,Bi,3,0,"button",32),r()),o&2){let e,n=t.$implicit;ue("single-field",n.formGroupName!=="advanced"),l(),p("formGroupName",n.formGroupName),l(),De((e=n.formView.shortDescription)!==null&&e!==void 0?e:n.formView.name),l(),De("destination-"+n.formGroupName+"-"+n.index+"-"+(n.asHttpOptions?"http":"other")),l(),C(n.formView.type==="FileTree"?4:n.formView.type==="FolderTree"?5:n.formView.type==="String"||n.formView.type==="Path"||n.formView.type==="Email"?6:n.formView.type==="Password"?7:n.formView.type==="Enumeration"?8:n.formView.type==="NonValidatedSelectableString"?9:n.formView.type==="Size"?10:n.formView.type==="Integer"?11:n.formView.type==="Boolean"?12:n.formView.type==="Flags"?13:n.formView.type==="Timespan"||n.formView.type==="DateTime"?14:n.formView.type==="FreeText"?15:-1),l(12),C(n.formGroupName==="advanced"?16:-1)}}function zi(o,t){if(o&1&&(B(0,22)(1,36),ee(2,jn,1,9,"ng-container",null,J),ee(4,Qn,1,9,"ng-container",null,J),s(6,"app-toggle-card",37),B(7,38),E(8,10),s(9,"spk-menu",31)(10,"button",39),F(11,"spk-icon"),r(),B(12,20),ee(13,Yn,3,1,"button",33,J),K(),r(),D(),K(),ee(15,Jn,1,9,"ng-container",null,J),r(),s(17,"app-toggle-card",37),B(18,38),E(19,11),s(20,"spk-menu",31)(21,"button",39),F(22,"spk-icon"),r(),B(23,20),ee(24,ei,3,1,"button",33,J),K(),r(),D(),K(),ee(26,ni,1,9,"ng-container",null,J),r(),g(28,Ki,17,7,"ng-template",null,2,Ze),K()()),o&2){let e=_();l(2),te(e.destinationFormPair().custom),l(2),te(e.destinationFormPair().dynamic),l(2),p("disallowToggle",!0),l(3),p("searchable",!0),l(),p("disabled",e.notSelectedAdvancedFormPair().length===0),l(3),te(e.notSelectedAdvancedFormPair()),l(2),te(e.selectedAdvancedFormPair()),l(2),p("disallowToggle",!0),l(3),p("searchable",!0),l(),p("disabled",e.notSelectedHttpOptions().length===0),l(3),te(e.notSelectedHttpOptions()),l(2),te(e.selectedHttpOptions())}}function Xi(o,t){if(o&1){let e=R();s(0,"spk-dialog",68),G("isOpenChange",function(i){u(e);let a=_();return L(a.targetUrlDialogOpen,i)||(a.targetUrlDialogOpen=i),m(i)}),s(1,"header",69)(2,"h2"),O(3,12),r(),s(4,"spk-alert",70),O(5,13),r()(),s(6,"div",71)(7,"spk-form-field"),F(8,"textarea",72),r()(),s(9,"footer",73)(10,"button",24),S("click",function(){u(e);let i=_();return m(i.closeTargetUrlDialog(!1))}),d(11,"Cancel"),r(),s(12,"button",74),S("click",function(){u(e);let i=_();return m(i.closeTargetUrlDialog(!0))}),E(13,14),F(14,"spk-icon"),D(),r()()()}if(o&2){let e=_();b("isOpen",e.targetUrlDialogOpen),p("options",qe(3,Gn)),l(8),p("formControl",e.targetUrlCtrl)}}var ft=new Ce,en=(o={destinations:[]})=>ft.group({destinations:ft.array(o.destinations)}),tn=({key:o,customGroup:t,dynamicGroup:e,advancedGroup:n})=>ft.group({destinationType:ft.control(o),custom:t,dynamic:e,advanced:n}),kt=class o{#n=P(se);#t=P(me);#e=P(_e);#i=P($e);#o=P(gt);injector=P($t);formRef=ye.required("formRef");destinationForm=this.#e.destinationForm;destinationFormPair=this.#e.destinationFormPair;selectedAdvancedFormPair=this.#e.selectedAdvancedFormPair;notSelectedAdvancedFormPair=this.#e.notSelectedAdvancedFormPair;selectedHttpOptions=this.#e.selectedHttpOptions;notSelectedHttpOptions=this.#e.notSelectedHttpOptions;destinationOptions=this.#e.destinationOptions;destinationFormSignal=this.#e.destinationFormSignal;destinationCount=$(()=>this.destinationFormSignal()?.destinations?.length??0);successfulTest=f(!1);testLoading=f(!1);destinationTypeOptionsInFocus=f(["file","ssh","s3","gcs","googledrive","azure"]);destinationTypeOptions=f(ut.map(t=>({key:t.customKey??t.key,customKey:t.customKey??null,displayName:t.displayName,description:t.description})));destinationTypeOptionsFocused=$(()=>{let t=this.destinationTypeOptionsInFocus(),e=this.destinationTypeOptions();return t.map(n=>e.find(i=>i.key===n))});selectedDestinationType=$(()=>{let t=this.destinationFormSignal();return this.destinationTypeOptions().find(n=>t?.destinations?.[0]?.destinationType===n.key)});destinationTypeOptionsNotFocused=$(()=>{let t=this.destinationTypeOptionsInFocus();return this.destinationTypeOptions().filter(n=>!t.includes(n.key))});getFormFieldValue(t,e,n){return((this.destinationForm.controls.destinations.controls?.[t]).controls?.[e]).controls[n].value}hasDoubleLeadingSlashes(t){return t.startsWith("//")}getFormControl(t,e,n){return((this.destinationForm.controls.destinations.controls?.[t]).controls?.[e]).controls[n]}addDestinationFormGroup(t){this.#e.addDestinationFormGroup(t)}addAdvancedFormPair(t,e){this.#e.addAdvancedFormPair(t,e)}removeFormView(t,e){this.#e.removeAdvancedFormPair(t,e)}addHttpOption(t,e){this.#e.addHttpOption(t,e)}targetUrl=$(()=>this.#e.getCurrentTargetUrl()[0]);targetUrlCtrl=new ct;targetUrlInitial=f(null);targetUrlDialogOpen=f(!1);openTargetUrlDialog(){let e=this.#e.getCurrentTargetUrl()[0];this.targetUrlCtrl.setValue(e),this.targetUrlInitial.set(e),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(t=!1){this.targetUrlDialogOpen.set(!1);let e=this.targetUrlCtrl.value,n=this.targetUrlInitial();!t||e===n||this.#e.updateFieldsFromTargetUrl(this.targetUrlCtrl.value)}testDestination(t=0){let n=this.#e.getCurrentTargetUrl()[t];n&&(this.testLoading.set(!0),this.#o.testDestination(n,t,!0).pipe(We(()=>this.testLoading.set(!1))).subscribe({next:i=>{if(i.action==="success"){this.#e.isNew()&&(i.containsBackup===!0?this.#i.open(q,{data:{title:$localize`Folder contains backup`,message:$localize`The remote destination already contains a backup. You must use a different folder for each backup.`,confirmText:$localize`OK`,cancelText:void 0}}):i.anyFilesFound===!0&&this.#i.open(q,{data:{title:$localize`Folder is not empty`,message:$localize`The remote destination is not empty. It is recommended to use an empty folder for the backup.`,confirmText:$localize`OK`,cancelText:void 0}})),this.successfulTest.set(!0),setTimeout(()=>{this.successfulTest.set(!1)},3e3);return}if(i.action==="generic-error"){this.successfulTest.set(!1);return}i.action==="trust-cert"&&this.#e.addHttpOptionByName("accept-specified-ssl-hash",i.destinationIndex,i.certData),i.action==="approve-host-key"&&this.#e.addOrUpdateAdvancedFormPairByName("ssh-fingerprint",i.destinationIndex,i.reportedHostKey),i.testAgain&&this.testDestination(i.destinationIndex)}}))}mapToTargetUrl(t){return dt(t.value)}removeDestinationFormGroup(t){this.destinationForm.controls.destinations.removeAt(t)}displayFn(t){let e=this.destinationOptions().find(n=>n.Key===t);return e?`${e.DisplayName}`:""}goBack(){this.#n.navigate(["general"],{relativeTo:this.#t.parent})}next(){this.#e.isNew()||this.#e.submit(!0),this.#n.navigate(["source-data"],{relativeTo:this.#t.parent})}#a=f("https://duplicati-oauth-handler.appspot.com/").asReadonly();#s=f(Math.random().toString(36).substring(2)+Math.random().toString(36).substring(2)).asReadonly();#r=f(!1);#l=f(null);keyCreation(){}oauthStartTokenCreation(t,e){let n=this.getFormControl(e.index,e.formGroupName,e.formView.name);this.#r.set(!0);let i=this.#s(),a=450,c=600,A=this.#a()+"?type="+t+"&token="+i,k=screen.width/2-a/2,I=screen.height/2-c/2,V=window.open(A,"_blank","height="+c+",width="+a+",menubar=0,status=0,titlebar=0,toolbar=0,left="+k+",top="+I);return window.addEventListener("message",N=>{let w=N.data.startsWith("authid:"),U=w?N.data.replace("authid:",""):null;console.log("event",N),w&&(n.setValue(U),this.#r.set(!1),V?.close())}),!1}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=Z({type:o,selectors:[["app-destination"]],viewQuery:function(e,n){e&1&&Oe(n.formRef,Rn,5),e&2&&ke()},decls:24,vars:6,consts:()=>{let t;t=$localize` Backup destination ${"\uFFFD#5\uFFFD"}:START_TAG_DIV:${"\uFFFD*6:1\uFFFD"}:START_BLOCK_IF_1:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON:${"\uFFFD*2:2\uFFFD"}:START_BLOCK_IF: Connected ${"[\uFFFD#1:2\uFFFD|\uFFFD#9\uFFFD|\uFFFD#12\uFFFD]"}:START_TAG_SPK_ICON:check${"[\uFFFD/#1:2\uFFFD|\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/*2:2\uFFFD|\uFFFD/*6:1\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*3:3\uFFFD"}:START_BLOCK_ELSE: Test destination ${"\uFFFD/*3:3\uFFFD"}:CLOSE_BLOCK_ELSE:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD]"}:CLOSE_TAG_BUTTON:${"[\uFFFD/*2:2\uFFFD|\uFFFD/*6:1\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD#7\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#8\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#1:2\uFFFD|\uFFFD#9\uFFFD|\uFFFD#12\uFFFD]"}:START_TAG_SPK_ICON:dots-three-vertical${"[\uFFFD/#1:2\uFFFD|\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#10\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD#11\uFFFD"}:START_TAG_BUTTON_2:${"[\uFFFD#1:2\uFFFD|\uFFFD#9\uFFFD|\uFFFD#12\uFFFD]"}:START_TAG_SPK_ICON:link${"[\uFFFD/#1:2\uFFFD|\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD]"}:CLOSE_TAG_SPK_ICON: Edit target URL ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SPK_MENU:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_DIV:`,t=Ee(t);let e;e=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let n;n=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let i;i=$localize` Current destination type ${"\uFFFD#2\uFFFD"}:START_TAG_STRONG:${"\uFFFD0\uFFFD"}:INTERPOLATION:.${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#3\uFFFD\uFFFD/#3\uFFFD"}:LINE_BREAK: Want to select another? ${"\uFFFD#4\uFFFD"}:START_TAG_SPAN:Click here${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SPAN:`;let a;a=$localize`Other destinations`;let c;c=$localize` Advanced options ${"\uFFFD#9\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#10\uFFFD"}:START_TAG_BUTTON: Add advanced option ${"\uFFFD#11\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#10\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#12\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD*14:1\uFFFD"}:START_BLOCK_FOR:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON_1: ${"\uFFFD0:1\uFFFD"}:INTERPOLATION: ${"[\uFFFD/#10\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/*14:1\uFFFD"}:CLOSE_BLOCK_FOR:${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_MENU:`,c=Ee(c);let A;A=$localize` Http options ${"\uFFFD#20\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#21\uFFFD"}:START_TAG_BUTTON: Add http option ${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#21\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#23\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD*25:1\uFFFD"}:START_BLOCK_FOR:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON_1: ${"\uFFFD0:1\uFFFD"}:INTERPOLATION: ${"[\uFFFD/#21\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/*25:1\uFFFD"}:CLOSE_BLOCK_FOR:${"\uFFFD/#23\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#20\uFFFD"}:CLOSE_TAG_SPK_MENU:`,A=Ee(A);let k;k=$localize`Edit target URL`;let I;I=$localize` Be careful, this will overwrite everything you have in your destination. `;let V;return V=$localize` Override target URL ${"\uFFFD#14\uFFFD"}:START_TAG_SPK_ICON:swap${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["formRef",""],["option",""],["fieldTemplate",""],["enumOptionTemplate",""],["optionTemplate",""],t,e,n,i,a,c,A,k,I,V,[3,"submit","formGroup"],[1,"title-30"],[1,"actions"],["spk-button","","type","button",1,"small",3,"loader","success"],["spk-button","","type","button",1,"small"],["menu",""],["spk-button","","type","button",1,"small",3,"click"],["formArrayName","destinations"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],[3,"isOpen","options"],[3,"click"],[1,"spk-primary"],[1,"most-common-destinations"],[1,"tile"],[3,"searchable"],["spk-button","","type","button",1,"outlined"],["type","button"],[1,"tile",3,"click"],["type","button",3,"click"],["formGroupName","0"],[3,"disallowToggle"],["title",""],["spk-button","","type","button",1,"outlined","small",3,"disabled"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"field-row"],[3,"formGroupName"],[3,"startingPath","accepts","showFiles","hideShortcuts","showHiddenNodes","selectFiles"],[3,"hideShortcuts","startingPath"],[3,"inputType","formControlName","customId"],[1,"primary","raised"],[3,"formControlName","customId","placeholder"],[3,"for"],[1,"primary",3,"spkTooltip"],["type","text",3,"id","formControlName"],[3,"type","id","formControlName"],["prefix","",3,"error","warn","spkTooltip"],["prefix",""],["prefix","",3,"spkTooltip"],["autocomplete","off",3,"type","id","formControlName"],["prefix","",1,"link"],["suffix","",1,"clickable"],["prefix","",1,"link",3,"click"],["suffix","",1,"clickable",3,"click"],[3,"options","isClearable","optionTemplate"],[1,"indeterminate","primary"],["label","key","value","value",3,"options","asFreeText","inlineSearch","optionTemplate"],["type","number",3,"id","formControlName"],["type","checkbox",3,"id","formControlName"],[1,"primary","raised",3,"options","selectMultiple","optionTemplate"],["type","text","id","text",3,"formControlName"],["spk-button","","type","button",1,"outlined",3,"click"],[3,"isOpenChange","isOpen","options"],["header",""],[1,"warning"],["content",""],["id","targetUrl","autocomplete","off",3,"formControl"],["footer",""],["spk-button","","type","submit",1,"raised","primary",3,"click"]]},template:function(e,n){if(e&1){let i=R();s(0,"form",15,0),S("submit",function(){return u(i),m(n.next())}),s(2,"header")(3,"h3",16),E(4,5),s(5,"div",17),g(6,Bn,4,5,"button",18),s(7,"spk-menu")(8,"button",19),F(9,"spk-icon"),r(),B(10,20),s(11,"button",21),S("click",function(){return u(i),m(n.openTargetUrlDialog())}),F(12,"spk-icon"),r(),K(),r()(),D(),r(),g(13,Kn,5,1,"p"),r(),g(14,Wn,9,1)(15,zi,30,6,"ng-container",22),s(16,"div",23)(17,"button",24),S("click",function(){return u(i),m(n.goBack())}),E(18,6),F(19,"spk-icon"),D(),r(),s(20,"button",25),E(21,7),F(22,"spk-icon"),D(),r()()(),g(23,Xi,15,4,"spk-dialog",26)}if(e&2){let i;p("formGroup",n.destinationForm),l(6),C(n.destinationCount()>0?6:-1),l(7),C(n.destinationCount()>0?13:-1),l(),C(n.destinationCount()===0?14:-1),l(),C(!((i=n.destinationFormSignal())==null||i.destinations==null)&&i.destinations.length?15:-1),l(8),C(n.targetUrlDialogOpen()?23:-1)}},dependencies:[Be,Le,ie,Ge,Ie,oe,be,_t,Ue,Ve,pt,Xt,Vt,le,Kt,ne,we,Bt,at,ce,st,rt,qt,Ke,mt,Ft,jt],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], header[_ngcontent-%COMP%] spk-alert[_ngcontent-%COMP%]{width:100%}header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:.5rem}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}pre[_ngcontent-%COMP%]{white-space:pre-wrap}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.field-row.single-field[_ngcontent-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding-bottom:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.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}label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}label[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:1rem}.form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 1fr;gap:.5rem;align-items:flex-end}.clickable[_ngcontent-%COMP%]{cursor:pointer;color:var(--primary-500)}.most-common-destinations[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10);background-color:var(--base-2);cursor:pointer}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-10);margin:0}[prefix].link[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline;color:var(--primary-500)}textarea[_ngcontent-%COMP%] ~ grammarly-extension[_ngcontent-%COMP%]{display:none}spk-select[_ngcontent-%COMP%]{--miw: p2r(120)}"],changeDetection:0})};export{gt as a,en as b,tn as c,kt as d,Qt as e,Nt as f,Pt as g,Ae as h,yt as i,Zt as j,Ot as k,_e as l};
|
package/chunk-VTTBYFSH.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as a,d as b}from"./chunk-V7XW25LT.js";import"./chunk-FP6LM56A.js";import"./chunk-M5RL4LRX.js";import"./chunk-UEYPJIJG.js";import"./chunk-2CXHZS6X.js";import"./chunk-LUKUBN2Z.js";import"./chunk-ABANCAM5.js";import"./chunk-WRKRV6RQ.js";import"./chunk-DYTQQHMA.js";import"./chunk-ESAGJOZZ.js";import"./chunk-N5FH4YAX.js";import"./chunk-EBXJGPRA.js";import"./chunk-4KE2I7OA.js";import"./chunk-7CGTOI24.js";export{a as createEncryptionForm,b as default};
|
package/chunk-VYAA7G37.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-7CGTOI24.js";var o=[{path:"",redirectTo:"select-files",pathMatch:"full"},{path:"destination",loadComponent:()=>import("./chunk-WOTGLW6Y.js")},{path:"encryption",loadComponent:()=>import("./chunk-VTTBYFSH.js")},{path:"select-files",loadComponent:()=>import("./chunk-FWQNZX5S.js")},{path:"options",loadComponent:()=>import("./chunk-CZDE5P4F.js")},{path:"progress",loadComponent:()=>import("./chunk-6DNRCK5D.js")}],t=o;export{t as default};
|
package/chunk-W66AXGSW.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a}from"./chunk-SX2OA5DO.js";import"./chunk-43BIRTPL.js";import"./chunk-FP6LM56A.js";import"./chunk-2CXHZS6X.js";import"./chunk-ABANCAM5.js";import"./chunk-ESAGJOZZ.js";import"./chunk-N5FH4YAX.js";import"./chunk-EBXJGPRA.js";import"./chunk-4KE2I7OA.js";import"./chunk-7CGTOI24.js";export{a as OptionsListComponent};
|
package/chunk-WOTGLW6Y.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{g as Yt}from"./chunk-V7XW25LT.js";import{a as Jt,l as Z}from"./chunk-VPTXHYYV.js";import{a as qt,b as jt}from"./chunk-43BIRTPL.js";import{a as Xt}from"./chunk-FP6LM56A.js";import{a as Qt}from"./chunk-M5RL4LRX.js";import{a as Wt,c as zt}from"./chunk-HIW2CN45.js";import"./chunk-4V45XF67.js";import"./chunk-UEYPJIJG.js";import"./chunk-2CXHZS6X.js";import{a as ht}from"./chunk-LUKUBN2Z.js";import"./chunk-RHW5QVAY.js";import{b as $t,c as wt,e as At,f as vt,g as Pt,i as Vt,j as bt,m as Mt,n as Gt,o as Bt,p as Lt,q as Ut,r as Ht,t as Kt}from"./chunk-ABANCAM5.js";import{b as gt,d as ft}from"./chunk-WRKRV6RQ.js";import"./chunk-DYTQQHMA.js";import{A as It,C as yt,a as Dt,b as St,d as Et,e as Ot,l as xt,o as kt,p as Rt,t as Nt}from"./chunk-ESAGJOZZ.js";import{c as Ct}from"./chunk-N5FH4YAX.js";import{ia as Tt}from"./chunk-EBXJGPRA.js";import{$a as ot,$b as rt,Ab as I,Bb as y,Cb as h,Db as l,Dc as L,Eb as r,F as nt,Fb as u,Gb as $,Hb as w,Ib as b,Jb as S,Pb as E,Qb as O,Qc as H,Rb as M,Rc as dt,Sb as X,Tb as q,Ua as a,Ub as U,Vb as f,Wb as s,Z as N,Zb as k,ac as d,ea as C,fa as g,gb as at,gc as lt,hc as st,ic as A,jc as _,ka as it,kc as j,lb as m,lc as D,mc as pt,oc as _t,pc as ct,qc as mt,rc as Q,sc as J,tc as Y,ub as c,uc as Ft,va as x,vc as ut,wb as z,wc as G,yc as B,zb as F}from"./chunk-4KE2I7OA.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&&(E(0,5,2),u(1,"spk-icon"),O())}function re(n,i){n&1&&M(0,5,3)}function le(n,i){if(n&1){let t=S();E(0,5,1),l(1,"button",21),f("click",function(){C(t);let o=s();return g(o.testDestination())}),m(2,ae,2,0)(3,re,1,0),r(),O()}if(n&2){let t=s();a(),z("success",t.successfulTest()),a(),F(t.successfulTest()?2:3)}}function se(n,i){if(n&1){let t=S();l(0,"p",27),f("click",function(){C(t);let o=s();return g(o.removeDestinationFormGroup(o.destinationCount()-1))}),E(1,8),u(2,"span",28),O(),r()}}function pe(n,i){if(n&1){let t=S();l(0,"div",34),f("click",function(){let o=C(t).$implicit,p=s(2);return g(p.addDestinationFormGroup(o.key))}),l(1,"h3"),_(2),r(),l(3,"p"),_(4),r()()}if(n&2){let t=i.$implicit;a(2),j(t.displayName),a(2),j(t.description)}}function _e(n,i){if(n&1){let t=S();l(0,"button",35,1),f("click",function(){let o=C(t).$implicit,p=s(2);return g(p.addDestinationFormGroup(o.key))}),_(2),r()}if(n&2){let t=i.$implicit;a(2),D(" ",t.displayName," ")}}function ce(n,i){if(n&1&&(l(0,"div",29),y(1,pe,5,2,"div",30,I),r(),l(3,"spk-menu",31)(4,"button",32),M(5,9),r(),$(6,20),y(7,_e,3,1,"button",33,I),w(),r()),n&2){let t=s();a(),h(t.destinationTypeOptionsFocused()),a(2),c("searchable",!0),a(4),h(t.destinationTypeOptionsNotFocused())}}function me(n,i){n&1&&b(0)}function Fe(n,i){if(n&1&&m(0,me,1,0,"ng-container",40),n&2){let t,e=i.$implicit,o=i.$index;s();let p=A(29),T=s();c("ngTemplateOutlet",p)("ngTemplateOutletContext",G(7,W,B(2,te,o,e,(t=T.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,T.destinationFormPair().oauthField)))}}function ue(n,i){n&1&&b(0)}function de(n,i){if(n&1&&m(0,ue,1,0,"ng-container",40),n&2){let t,e=i.$implicit,o=i.$index;s();let p=A(29),T=s();c("ngTemplateOutlet",p)("ngTemplateOutletContext",G(7,W,B(2,ee,o,e,(t=T.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,T.destinationFormPair().oauthField)))}}function Te(n,i){if(n&1){let t=S();E(0,10,1),l(1,"button",35,1),f("click",function(){let o=C(t).$implicit,p=s(2);return g(p.addAdvancedFormPair(o,0))}),r(),O()}if(n&2){let t=i.$implicit;a(),X(t.name),q(0)}}function Ce(n,i){n&1&&b(0)}function ge(n,i){if(n&1&&m(0,Ce,1,0,"ng-container",40),n&2){let t,e=i.$implicit,o=i.$index;s();let p=A(29),T=s();c("ngTemplateOutlet",p)("ngTemplateOutletContext",G(7,W,B(2,ne,o,e,(t=T.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,T.destinationFormPair().oauthField)))}}function fe(n,i){if(n&1){let t=S();E(0,11,1),l(1,"button",35,1),f("click",function(){let o=C(t).$implicit,p=s(2);return g(p.addHttpOption(o,0))}),r(),O()}if(n&2){let t=i.$implicit;a(),X(t.name),q(0)}}function De(n,i){n&1&&b(0)}function Se(n,i){if(n&1&&m(0,De,1,0,"ng-container",40),n&2){let t,e=i.$implicit,o=i.$index;s();let p=A(29),T=s();c("ngTemplateOutlet",p)("ngTemplateOutletContext",G(7,W,B(2,ie,o,e,(t=T.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,T.destinationFormPair().oauthField)))}}function Ee(n,i){if(n&1&&(l(0,"spk-icon",48),_(1,"question"),r()),n&2){let t=s(2).$implicit;c("spkTooltip",t.formView.longDescription)}}function Oe(n,i){if(n&1&&(l(0,"app-file-tree",43)(1,"label",47),_(2),m(3,Ee,2,1,"spk-icon",48),r(),u(4,"input",49),r()),n&2){let t,e=s().$implicit,o=s(2);c("startingPath",o.getFormFieldValue(0,e.formGroupName,e.formView.name))("accepts",e.formView.accepts)("showFiles",!0)("hideShortcuts",!0)("showHiddenNodes",!0)("selectFiles",!0),a(),d("for","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),a(),D(" ",(t=e.formView.shortDescription)!==null&&t!==void 0?t:e.formView.name," "),a(),F(e.formView.longDescription?3:-1),a(),d("id","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),k("formControlName",e.formView.name)}}function xe(n,i){if(n&1&&(l(0,"spk-icon",48),_(1,"question"),r()),n&2){let t=s(2).$implicit;c("spkTooltip",t.formView.longDescription)}}function ke(n,i){if(n&1&&(l(0,"app-file-tree",44)(1,"label",47),_(2),m(3,xe,2,1,"spk-icon",48),r(),u(4,"input",49),r()),n&2){let t,e=s().$implicit,o=s(2);c("hideShortcuts",!0)("startingPath",o.getFormFieldValue(0,e.formGroupName,e.formView.name)),a(),d("for","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),a(),D(" ",(t=e.formView.shortDescription)!==null&&t!==void 0?t:e.formView.name," "),a(),F(e.formView.longDescription?3:-1),a(),d("id","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),k("formControlName",e.formView.name)}}function Re(n,i){if(n&1&&(l(0,"spk-icon",48),_(1,"question"),r()),n&2){let t=s(2).$implicit;c("spkTooltip",t.formView.longDescription)}}function Ne(n,i){n&1&&(l(0,"spk-icon",51),_(1,"link"),r())}function Ie(n,i){n&1&&(l(0,"spk-icon",51),_(1,"envelope"),r())}function ye(n,i){n&1&&(l(0,"spk-icon",51),_(1,"textbox"),r())}function he(n,i){if(n&1&&(l(0,"spk-form-field")(1,"label",47),_(2),m(3,Re,2,1,"spk-icon",48),r(),u(4,"input",50),m(5,Ne,2,0,"spk-icon",51)(6,Ie,2,0,"spk-icon",51)(7,ye,2,0,"spk-icon",51),r()),n&2){let t,e=s().$implicit;a(),d("for","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),a(),D(" ",(t=e.formView.shortDescription)!==null&&t!==void 0?t:e.formView.name," "),a(),F(e.formView.longDescription?3:-1),a(),d("id","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),k("formControlName",e.formView.name),c("type",e.formView.type==="Email"?"email":"text"),a(),F(e.formView.type==="Path"?5:e.formView.type==="Email"?6:7)}}function $e(n,i){if(n&1){let t=S();l(0,"span",55),f("click",function(){C(t);let o=s(2).$implicit,p=s(2);return g(p.oauthStartTokenCreation(o.destinationType))}),_(1,"AuthID"),r()}}function we(n,i){n&1&&(l(0,"spk-icon",51),_(1,"password"),r())}function Ae(n,i){if(n&1){let t=S();l(0,"spk-icon",56),f("click",function(){C(t);let o=s(2).$implicit;return g(o.formView.showPassword=!o.formView.showPassword)}),_(1," eye "),r()}}function ve(n,i){if(n&1){let t=S();l(0,"spk-icon",56),f("click",function(){C(t);let o=s(2).$implicit;return g(o.formView.showPassword=!o.formView.showPassword)}),_(1," eye-slash "),r()}}function Pe(n,i){if(n&1&&(l(0,"spk-form-field")(1,"label",47),_(2),r(),u(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=s().$implicit;a(),d("for","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),a(),D(" ",(t=e.formView.shortDescription)!==null&&t!==void 0?t:e.formView.name," "),a(),d("id","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),k("formControlName",e.formView.name),c("type",e.formView.showPassword?"text":"password"),a(),F(e.oauthField===e.formView.name?4:5),a(2),F(e.formView.showPassword?6:7)}}function Ve(n,i){if(n&1&&(l(0,"spk-icon",48),_(1,"question"),r()),n&2){let t=s(3).$implicit;c("spkTooltip",t.formView.longDescription)}}function be(n,i){if(n&1&&_(0),n&2){let t=i.$implicit;D(" ",t," ")}}function Me(n,i){if(n&1&&(l(0,"spk-select",57)(1,"label",47),_(2),m(3,Ve,2,1,"spk-icon",48),r(),u(4,"input",49),r(),m(5,be,1,1,"ng-template",null,3,L)),n&2){let t,e=A(6);s();let o=Y(0),p=s().$implicit;c("options",o)("isClearable",!1)("optionTemplate",e),a(),d("for","destination-",p.formGroupName,"-",p.index,"-",p.asHttpOptions?"http":"other",""),a(),D(" ",(t=p.formView.shortDescription)!==null&&t!==void 0?t:p.formView.name," "),a(),F(p.formView.longDescription?3:-1),a(),d("id","destination-",p.formGroupName,"-",p.index,"-",p.asHttpOptions?"http":"other",""),k("formControlName",p.formView.name)}}function Ge(n,i){if(n&1&&(Q(0),m(1,Me,7,14)),n&2){let t=s().$implicit,e=J(t.formView.loadOptions?t.formView.loadOptions(s(2).injector)():t.formView.options);a(),F(e?1:-1)}}function Be(n,i){if(n&1&&(l(0,"spk-icon",48),_(1,"question"),r()),n&2){let t=s(3).$implicit;c("spkTooltip",t.formView.longDescription)}}function Le(n,i){if(n&1&&_(0),n&2){let t=i.$implicit;pt(" ",t.key," ",t.value?"("+t.value+")":""," ")}}function Ue(n,i){if(n&1&&(l(0,"spk-select",59)(1,"label",47),_(2),m(3,Be,2,1,"spk-icon",48),r(),u(4,"input",49),r(),m(5,Le,1,2,"ng-template",null,4,L)),n&2){let t,e=A(6);s();let o=Y(0),p=s().$implicit;c("options",o)("asFreeText",!0)("inlineSearch",!0)("optionTemplate",e),a(),d("for","destination-",p.formGroupName,"-",p.index,"-",p.asHttpOptions?"http":"other",""),a(),D(" ",(t=p.formView.shortDescription)!==null&&t!==void 0?t:p.formView.name," "),a(),F(p.formView.longDescription?3:-1),a(),d("id","destination-",p.formGroupName,"-",p.index,"-",p.asHttpOptions?"http":"other",""),k("formControlName",p.formView.name)}}function He(n,i){n&1&&u(0,"spk-progress-bar",58)}function Ke(n,i){if(n&1&&(Q(0),m(1,Ue,7,15)(2,He,1,0,"spk-progress-bar",58)),n&2){let t=s().$implicit,e=J(t.formView.loadOptions?t.formView.loadOptions(s(2).injector)():t.formView.options);a(),F(e?1:2)}}function We(n,i){if(n&1&&(l(0,"spk-icon",48),_(1,"question"),r()),n&2){let t=s(2).$implicit;c("spkTooltip",t.formView.longDescription)}}function ze(n,i){if(n&1&&(l(0,"app-size",45)(1,"label",47),_(2),m(3,We,2,1,"spk-icon",48),r()()),n&2){let t,e=s().$implicit;c("inputType",e.Name)("formControlName",e.formView.name)("customId",`destination-{{ item.formGroupName }}-{{ item.index }}-{{
|
|
2
|
-
item.asHttpOptions ? 'http' : 'other'
|
|
3
|
-
}}`),a(),d("for","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),a(),D(" ",(t=e.formView.shortDescription)!==null&&t!==void 0?t:e.formView.name," "),a(),F(e.formView.longDescription?3:-1)}}function Xe(n,i){if(n&1&&(l(0,"spk-icon",48),_(1,"question"),r()),n&2){let t=s(2).$implicit;c("spkTooltip",t.formView.longDescription)}}function qe(n,i){if(n&1&&(l(0,"spk-form-field")(1,"label",47),_(2),m(3,Xe,2,1,"spk-icon",48),r(),u(4,"input",60),l(5,"spk-icon",51),_(6,"numpad"),r()()),n&2){let t,e=s().$implicit;a(),d("for","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),a(),D(" ",(t=e.formView.shortDescription)!==null&&t!==void 0?t:e.formView.name," "),a(),F(e.formView.longDescription?3:-1),a(),d("id","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),k("formControlName",e.formView.name)}}function je(n,i){if(n&1&&(l(0,"spk-icon",48),_(1,"question"),r()),n&2){let t=s(2).$implicit;c("spkTooltip",t.formView.longDescription)}}function Qe(n,i){if(n&1&&(l(0,"spk-toggle",46)(1,"label",47),_(2),m(3,je,2,1,"spk-icon",48),r(),u(4,"input",61),r()),n&2){let t,e=s().$implicit;a(),d("for","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),a(),D(" ",(t=e.formView.shortDescription)!==null&&t!==void 0?t:e.formView.name," "),a(),F(e.formView.longDescription?3:-1),a(),d("id","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),k("formControlName",e.formView.name)}}function Je(n,i){if(n&1&&(l(0,"spk-icon",48),_(1,"question"),r()),n&2){let t=s(2).$implicit;c("spkTooltip",t.formView.longDescription)}}function Ye(n,i){if(n&1&&_(0),n&2){let t=i.$implicit;D(" ",t," ")}}function Ze(n,i){if(n&1&&(l(0,"spk-select",62)(1,"label",47),_(2),m(3,Je,2,1,"spk-icon",48),r(),u(4,"input",63),r(),m(5,Ye,1,1,"ng-template",null,4,L)),n&2){let t,e=A(6),o=s().$implicit;c("options",o.formView.options)("selectMultiple",!0)("optionTemplate",e),a(),rt("for","destination-",o.formGroupName,"-",o.index,""),a(),D(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),a(),F(o.formView.longDescription?3:-1),a(),k("formControlName",o.formView.name)}}function tn(n,i){if(n&1&&(l(0,"spk-icon",48),_(1,"question"),r()),n&2){let t=s(2).$implicit;c("spkTooltip",t.formView.longDescription)}}function en(n,i){if(n&1&&(l(0,"app-timespan",45)(1,"label",47),_(2),m(3,tn,2,1,"spk-icon",48),r()()),n&2){let t,e=s().$implicit;c("inputType",e.formView.name)("formControlName",e.formView.name)("customId","destination-"+e.formGroupName+"-"+e.index+"-"+(e.asHttpOptions?"http":"other")),a(),d("for","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),a(),D(" ",(t=e.formView.shortDescription)!==null&&t!==void 0?t:e.formView.name," "),a(),F(e.formView.longDescription?3:-1)}}function nn(n,i){if(n&1){let t=S();l(0,"button",64),f("click",function(){C(t);let o=s().$implicit,p=s(2);return g(p.removeFormView(o.formView,0))}),l(1,"spk-icon"),_(2,"x-circle"),r()()}}function on(n,i){if(n&1&&(l(0,"div",41),$(1,42),m(2,Oe,5,17,"app-file-tree",43)(3,ke,5,13,"app-file-tree",44)(4,he,8,13,"spk-form-field")(5,Pe,8,13,"spk-form-field")(6,Ge,2,2)(7,Ke,3,2)(8,ze,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),w(),m(13,nn,3,0,"button",32),r()),n&2){let t=i.$implicit;z("single-field",t.formGroupName!=="advanced"),a(),c("formGroupName",t.formGroupName),a(),F(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),a(11),F(t.formGroupName==="advanced"?13:-1)}}function an(n,i){if(n&1&&($(0,22)(1,36),y(2,Fe,1,9,"ng-container",null,I),y(4,de,1,9,"ng-container",null,I),l(6,"app-toggle-card",37),$(7,38),E(8,10),l(9,"spk-menu",31)(10,"button",39),u(11,"spk-icon"),r(),$(12,20),y(13,Te,3,1,"button",33,I),w(),r(),O(),w(),y(15,ge,1,9,"ng-container",null,I),r(),l(17,"app-toggle-card",37),$(18,38),E(19,11),l(20,"spk-menu",31)(21,"button",39),u(22,"spk-icon"),r(),$(23,20),y(24,fe,3,1,"button",33,I),w(),r(),O(),w(),y(26,Se,1,9,"ng-container",null,I),r(),m(28,on,14,5,"ng-template",null,2,L),w()()),n&2){let t=s();a(2),h(t.destinationFormPair().custom),a(2),h(t.destinationFormPair().dynamic),a(2),c("disallowToggle",!0),a(3),c("searchable",!0),a(),c("disabled",t.notSelectedAdvancedFormPair().length===0),a(3),h(t.notSelectedAdvancedFormPair()),a(2),h(t.selectedAdvancedFormPair()),a(2),c("disallowToggle",!0),a(3),c("searchable",!0),a(),c("disabled",t.notSelectedHttpOptions().length===0),a(3),h(t.notSelectedHttpOptions()),a(2),h(t.selectedHttpOptions())}}function rn(n,i){if(n&1){let t=S();l(0,"spk-dialog",65),mt("isOpenChange",function(o){C(t);let p=s();return ct(p.targetUrlDialogOpen,o)||(p.targetUrlDialogOpen=o),g(o)}),l(1,"header",66)(2,"h2"),M(3,12),r(),l(4,"spk-alert",67),M(5,13),r()(),l(6,"div",68)(7,"spk-form-field"),u(8,"textarea",69),r()(),l(9,"footer",70)(10,"button",24),f("click",function(){C(t);let o=s();return g(o.closeTargetUrlDialog(!1))}),_(11,"Cancel"),r(),l(12,"button",71),f("click",function(){C(t);let o=s();return g(o.closeTargetUrlDialog(!0))}),E(13,14),u(14,"spk-icon"),O(),r()()()}if(n&2){let t=s();_t("isOpen",t.targetUrlDialogOpen),c("options",ut(3,oe)),a(8),c("formControl",t.targetUrlCtrl)}}var K=new Ht,wn=(n={destinations:[]})=>K.group({destinations:K.array(n.destinations)}),An=({key:n,customGroup:i,dynamicGroup:t,advancedGroup:e})=>K.group({destinationType:K.control(n),custom:i,dynamic:t,advanced:e}),tt=class n{#a=N(ft);#r=N(gt);#l=N(Ct);#t=N(Z);#s=N(Ot);#p=N(Jt);#e=N(Yt);injector=N(it);formRef=ot.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=H(()=>this.destinationFormSignal()?.destinations?.length??0);successfulTest=x(!1);destinationTypeOptionsInFocus=x(["file","ssh","s3","gcs","googledrive","azure"]);destinationTypeOptions=x(zt.map(i=>({key:i.customKey??i.key,customKey:i.customKey??null,displayName:i.displayName,description:i.description})));destinationTypeOptionsFocused=H(()=>{let i=this.destinationTypeOptionsInFocus(),t=this.destinationTypeOptions();return i.map(e=>t.find(o=>o.key===e))});destinationTypeOptionsNotFocused=H(()=>{let i=this.destinationTypeOptionsInFocus();return this.destinationTypeOptions().filter(e=>!i.includes(e.key))});targetUrlEffect=dt(()=>{if(this.destinationFormSignal(),this.destinationForm.valid){let i=this.#t.getCurrentTargetUrl();this.#e.updateTargetUrl(i[0])}else this.#e.updateTargetUrl(null)});ngOnInit(){let i=this.#e.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 Pt;targetUrlInitial=x(null);targetUrlDialogOpen=x(!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.#p.testDestination(e,i,!1).subscribe({next:o=>{if(o.action==="success"){o.anyFilesFound===!1&&this.#s.open(ht,{data:{title:$localize`Empty destination`,message:$localize`The remote destination does not contain any files.
|
|
4
|
-
Check that the details are correct and that the destination is not empty.`,confirmText:$localize`OK`,cancelText:void 0}}),this.successfulTest.set(!0),setTimeout(()=>{this.successfulTest.set(!1)},3e3);return}if(o.action==="generic-error"){this.successfulTest.set(!1);return}o.action==="trust-cert"&&this.#t.addHttpOptionByName("accept-specified-ssl-hash",o.destinationIndex,o.certData),o.action==="approve-host-key"&&this.#t.addOrUpdateAdvancedFormPairByName("ssh-fingerprint",o.destinationIndex,o.reportedHostKey),o.testAgain&&this.testDestination(o.destinationIndex)}})}mapToTargetUrl(i){return Wt(i.value)}removeDestinationFormGroup(i){this.destinationForm.controls.destinations.removeAt(i)}displayFn(i){let t=this.destinationOptions().find(e=>e.Key===i);return t?`${t.DisplayName}`:""}goBack(){this.#e.exit()}next(){this.#a.navigate(["encryption"],{relativeTo:this.#r.parent})}#n=x("https://duplicati-oauth-handler.appspot.com/").asReadonly();#i=x(Math.random().toString(36).substring(2)+Math.random().toString(36).substring(2)).asReadonly();#o=x(!1);#_=x(null);keyCreation(){}oauthStartTokenCreation(i){this.#o.set(!0);let t=450,e=600,o=this.#n()+"?type="+i+"&token="+this.#i(),p=screen.width/2-t/2,T=screen.height/2-e/2,v=window.open(o,"_blank","height="+e+",width="+t+",menubar=0,status=0,titlebar=0,toolbar=0,left="+p+",top="+T);v?.addEventListener("blur",P=>{console.log("event blur",P)}),v?.addEventListener("beforeunload",P=>{console.log("event beforeunload",P),this.#l.get(this.#n()+"fetch?callback=JSON_CALLBACK",{params:{token:this.#i()}}).pipe(nt(()=>this.#o.set(!1))).subscribe({next:V=>{console.log("res",V),V?.authid&&this.#_.set(V.authid)}})})}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=at({type:n,selectors:[["app-restore-destination"]],viewQuery:function(t,e){t&1&<(e.formRef,Zt,5),t&2&&st()},features:[Ft([Z])],decls:24,vars:6,consts:()=>{let i;i=$localize` Backup placement ${"\uFFFD#5\uFFFD"}:START_TAG_DIV:${"\uFFFD*6:1\uFFFD"}:START_BLOCK_IF_1:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON:${"\uFFFD*2:2\uFFFD"}:START_BLOCK_IF: Connected ${"[\uFFFD#1:2\uFFFD|\uFFFD#9\uFFFD|\uFFFD#12\uFFFD]"}:START_TAG_SPK_ICON:check${"[\uFFFD/#1:2\uFFFD|\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/*2:2\uFFFD|\uFFFD/*6:1\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*3:3\uFFFD"}:START_BLOCK_ELSE: Test destination ${"\uFFFD/*3:3\uFFFD"}:CLOSE_BLOCK_ELSE:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD]"}:CLOSE_TAG_BUTTON:${"[\uFFFD/*2:2\uFFFD|\uFFFD/*6:1\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD#7\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#8\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#1:2\uFFFD|\uFFFD#9\uFFFD|\uFFFD#12\uFFFD]"}:START_TAG_SPK_ICON:dots-three-vertical${"[\uFFFD/#1:2\uFFFD|\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#10\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD#11\uFFFD"}:START_TAG_BUTTON_2:${"[\uFFFD#1:2\uFFFD|\uFFFD#9\uFFFD|\uFFFD#12\uFFFD]"}:START_TAG_SPK_ICON:link${"[\uFFFD/#1:2\uFFFD|\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD]"}:CLOSE_TAG_SPK_ICON: Edit target URL ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SPK_MENU:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_DIV:`,i=U(i);let t;t=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: Exit `;let e;e=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let o;o=$localize` Want to select another destination? ${"\uFFFD#2\uFFFD"}:START_TAG_SPAN:Click here${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPAN:`;let p;p=$localize`Other destinations`;let T;T=$localize` Advanced options ${"\uFFFD#9\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#10\uFFFD"}:START_TAG_BUTTON: Add advanced option ${"\uFFFD#11\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#10\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#12\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD*14:1\uFFFD"}:START_BLOCK_FOR:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON_1: ${"\uFFFD0:1\uFFFD"}:INTERPOLATION: ${"[\uFFFD/#10\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/*14:1\uFFFD"}:CLOSE_BLOCK_FOR:${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_MENU:`,T=U(T);let v;v=$localize` Http options ${"\uFFFD#20\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#21\uFFFD"}:START_TAG_BUTTON: Add http option ${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#21\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#23\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD*25:1\uFFFD"}:START_BLOCK_FOR:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON_1: ${"\uFFFD0:1\uFFFD"}:INTERPOLATION: ${"[\uFFFD/#21\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/*25:1\uFFFD"}:CLOSE_BLOCK_FOR:${"\uFFFD/#23\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#20\uFFFD"}:CLOSE_TAG_SPK_MENU:`,v=U(v);let P;P=$localize`Edit target URL`;let V;V=$localize` Be careful, this will overwrite everything you have in your destination. `;let et;return et=$localize` Override target URL ${"\uFFFD#14\uFFFD"}:START_TAG_SPK_ICON:swap${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["formRef",""],["option",""],["fieldTemplate",""],["enumOptionTemplate",""],["optionTemplate",""],i,t,e,o,p,T,v,P,V,et,[3,"submit","formGroup"],[1,"title-30"],[1,"actions"],["spk-button","","type","button",1,"small",3,"success"],["spk-button","","type","button",1,"small"],["menu",""],["spk-button","","type","button",1,"small",3,"click"],["formArrayName","destinations"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],[3,"isOpen","options"],[3,"click"],[1,"spk-primary"],[1,"most-common-destinations"],[1,"tile"],[3,"searchable"],["spk-button","","type","button",1,"outlined"],["type","button"],[1,"tile",3,"click"],["type","button",3,"click"],["formGroupName","0"],[3,"disallowToggle"],["title",""],["spk-button","","type","button",1,"outlined","small",3,"disabled"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"field-row"],[3,"formGroupName"],[3,"startingPath","accepts","showFiles","hideShortcuts","showHiddenNodes","selectFiles"],[3,"hideShortcuts","startingPath"],[3,"inputType","formControlName","customId"],[1,"primary","raised"],[3,"for"],[1,"primary",3,"spkTooltip"],["type","text",3,"id","formControlName"],[3,"type","id","formControlName"],["prefix",""],["autocomplete","off",3,"type","id","formControlName"],["prefix","",1,"link"],["suffix","",1,"clickable"],["prefix","",1,"link",3,"click"],["suffix","",1,"clickable",3,"click"],[3,"options","isClearable","optionTemplate"],[1,"indeterminate","primary"],["label","key","value","value",3,"options","asFreeText","inlineSearch","optionTemplate"],["type","number",3,"id","formControlName"],["type","checkbox",3,"id","formControlName"],[1,"primary","raised",3,"options","selectMultiple","optionTemplate"],["type","text","id","text",3,"formControlName"],["spk-button","","type","button",1,"outlined",3,"click"],[3,"isOpenChange","isOpen","options"],["header",""],[1,"warning"],["content",""],["id","targetUrl","autocomplete","off",3,"formControl"],["footer",""],["spk-button","","type","submit",1,"raised","primary",3,"click"]]},template:function(t,e){if(t&1){let o=S();l(0,"form",15,0),f("submit",function(){return C(o),g(e.next())}),l(2,"header")(3,"h3",16),E(4,5),l(5,"div",17),m(6,le,4,3,"button",18),l(7,"spk-menu")(8,"button",19),u(9,"spk-icon"),r(),$(10,20),l(11,"button",21),f("click",function(){return C(o),g(e.openTargetUrlDialog())}),u(12,"spk-icon"),r(),w(),r()(),O(),r(),m(13,se,3,0,"p"),r(),m(14,ce,9,1)(15,an,30,6,"ng-container",22),l(16,"div",23)(17,"button",24),f("click",function(){return C(o),g(e.goBack())}),E(18,6),u(19,"spk-icon"),O(),r(),l(20,"button",25),E(21,7),u(22,"spk-icon"),O(),r()()(),m(23,rn,15,4,"spk-dialog",26)}if(t&2){let o;c("formGroup",e.destinationForm),a(6),F(e.destinationCount()>0?6:-1),a(7),F(e.destinationCount()>0?13:-1),a(),F(e.destinationCount()===0?14:-1),a(),F(!((o=e.destinationFormSignal())==null||o.destinations==null)&&o.destinations.length?15:-1),a(8),F(e.targetUrlDialogOpen()?23:-1)}},dependencies:[Kt,Vt,wt,bt,$t,At,vt,Mt,Gt,Ut,Bt,Lt,Tt,xt,kt,Dt,It,Et,St,Nt,Rt,yt,jt,qt,Qt,Xt],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], header[_ngcontent-%COMP%] spk-alert[_ngcontent-%COMP%]{width:100%}header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:.5rem}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}pre[_ngcontent-%COMP%]{white-space:pre-wrap}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.field-row.single-field[_ngcontent-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.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}.form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 1fr;gap:.5rem;align-items:flex-end}.clickable[_ngcontent-%COMP%]{cursor:pointer;color:var(--primary-500)}.most-common-destinations[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10);background-color:var(--base-2);cursor:pointer}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-10);margin:0}[prefix].link[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline;color:var(--primary-500)}textarea[_ngcontent-%COMP%] ~ grammarly-extension[_ngcontent-%COMP%]{display:none}"],changeDetection:0})};export{wn as createDestinationForm,An as createDestinationFormGroup,tt as default};
|
package/chunk-XATCN7MB.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as re}from"./chunk-UEYPJIJG.js";import{a as ne}from"./chunk-T5WAKBP3.js";import{a as ie}from"./chunk-LUKUBN2Z.js";import"./chunk-RHW5QVAY.js";import{a as te}from"./chunk-DLJSVAM2.js";import{b as oe,e as le,h as ae,s as _e}from"./chunk-ABANCAM5.js";import"./chunk-FQ55IACT.js";import{d as j,e as H}from"./chunk-WRKRV6RQ.js";import"./chunk-DYTQQHMA.js";import{a as J,e as Q,g as Y,i as Z}from"./chunk-ESAGJOZZ.js";import{h as ee}from"./chunk-N5FH4YAX.js";import"./chunk-EBXJGPRA.js";import{B as O,Cc as q,Db as n,Eb as l,F as $,Jb as g,Qc as b,Rb as c,Sb as D,Tb as S,Ua as r,Ub as w,Vb as G,Wb as p,Z as E,ea as C,fa as m,gb as x,jc as u,lb as f,n as K,oc as h,pc as L,qc as M,r as y,rc as B,sa as F,sc as X,tc as v,ub as T,va as P,vc as z,wb as I,wc as V,zb as A,zc as W}from"./chunk-4KE2I7OA.js";import"./chunk-7CGTOI24.js";var ce=a=>["/backup",a,"export"],se=()=>["/"];function ue(a,_){if(a&1){let t=g();n(0,"section")(1,"h4"),c(2,4),l(),n(3,"p"),c(4,5),l(),n(5,"spk-checkbox",11),u(6," Delete local database "),n(7,"input",12),M("ngModelChange",function(e){C(t);let o=p();return L(o.deleteLocalDb,e)||(o.deleteLocalDb=e),m(e)}),l()()()}if(a&2){let t=p();r(7),h("ngModel",t.deleteLocalDb)}}function Ee(a,_){if(a&1){let t=g();n(0,"section"),B(1),n(2,"h4"),c(3,6),l(),n(4,"p"),c(5,7),W(6,"bytes"),l(),n(7,"spk-checkbox",11),u(8," Delete remote files "),n(9,"input",12),M("ngModelChange",function(e){C(t);let o=p();return L(o.deleteRemoteFiles,e)||(o.deleteRemoteFiles=e),m(e)}),l()()()}if(a&2){let t,i=p(),e=v(0),o=(t=e==null||e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.TargetFileSize)!==null&&t!==void 0?t:0;r(6),D(i.fileCount())(i.fileCount())(q(6,4,o,!0,!0)),S(5),r(3),h("ngModel",i.deleteRemoteFiles)}}var k=class a{#t=E(ee);#n=E(Q);#e=E(ne);#i=E(j);id=F.required();backup=b(()=>this.#e.getBackupById(this.id()));noLocalDbResource=re({request:()=>({dbPath:this.backup()?.Backup?.DBPath}),loader:({request:_})=>this.#t.postApiV1FilesystemValidate({requestBody:{path:_.dbPath}}).pipe(y(()=>!0),O(()=>K(!1)))});fileCount=b(()=>parseInt(this.backup()?.Backup?.Metadata?.TargetFileCount??"0",10));deleteLocalDb=P(!1);deleteRemoteFiles=P(!1);isDeleting=P(!1);deleteBackup(){let _=this.id(),t=this.deleteLocalDb(),i=this.deleteRemoteFiles();this.isDeleting.set(!0),this.#n.open(ie,{data:{title:$localize`Confirm delete`,message:$localize`Are you sure you want to delete this backup?`,confirmText:$localize`Delete backup`,cancelText:$localize`Cancel`},closed:e=>{e&&this.#e.deleteBackup({id:_,deleteLocalDb:t,deleteRemoteFiles:i}).pipe($(()=>this.isDeleting.set(!1))).subscribe({next:()=>{this.#i.navigate(["/"])}})}})}static \u0275fac=function(t){return new(t||a)};static \u0275cmp=x({type:a,selectors:[["app-delete-backup"]],inputs:{id:[1,"id"]},decls:20,vars:11,consts:()=>{let _;_=$localize`Delete backup: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let t;t=$localize`Export configuration`;let i;i=$localize`If you want to use the backup later, you can export the configuration before deleting it.`;let e;e=$localize`Cancel`;let o;o=$localize`Delete local database`;let N;N=$localize` Each backup has a local database associated with it, which stores information about the remote backup on the local machine. When deleting a backup, you can also delete the local database without affecting the ability to restore the remote files. If you are using the local database for backups from the commandline, you should keep the database. `;let R;R=$localize`Delete remote files`;let d;d=$localize`{VAR_PLURAL, plural, =1 {1 file} other {{INTERPOLATION} files}}`,d=w(d,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let U;return U=$localize` Delete ${d}:ICU@@2159106180826349718: (${"\uFFFD2\uFFFD"}:INTERPOLATION_1:) from the remote storage? `,[_,t,i,e,o,N,R,U,["spk-button","",3,"routerLink"],[1,"actions"],["spk-button","",1,"raised","error",3,"click"],[1,"primary","raised"],["type","checkbox",3,"ngModelChange","ngModel"]]},template:function(t,i){if(t&1){let e=g();B(0)(1),n(2,"h3"),c(3,0),l(),f(4,ue,8,1,"section"),n(5,"section")(6,"h4"),c(7,1),l(),n(8,"p"),c(9,2),l(),n(10,"button",8),u(11," Export configuration "),n(12,"spk-icon"),u(13,"caret-right"),l()()(),f(14,Ee,10,8,"section"),n(15,"div",9)(16,"button",8),c(17,3),l(),n(18,"button",10),G("click",function(){return C(e),m(i.deleteBackup())}),u(19,"Delete backup"),l()()}if(t&2){let e=X(i.backup()),o=i.noLocalDbResource.value();r(3),D(e==null||e.Backup==null?null:e.Backup.Name),S(3),r(),A(o?4:-1),r(6),T("routerLink",V(8,ce,i.id())),r(4),A(o?14:-1),r(2),T("routerLink",z(10,se)),r(2),I("loader",i.isDeleting())}},dependencies:[Z,Y,J,te,_e,oe,le,ae,H],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;padding:2.5rem;max-width:43.75rem}section[_ngcontent-%COMP%]{padding:2rem 0;display:flex;align-items:flex-start;flex-direction:column}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0}h4[_ngcontent-%COMP%]{font:var(--paragraph-20);margin-bottom:.5rem}p[_ngcontent-%COMP%]{margin-bottom:1rem}.actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:.5rem;padding:2rem 0}"],changeDetection:0})};export{k as default};
|
package/chunk-XHPURHO2.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as R}from"./chunk-7V4TPS4B.js";import{a as z}from"./chunk-T5WAKBP3.js";import{a as B}from"./chunk-LUKUBN2Z.js";import{a as P}from"./chunk-DLJSVAM2.js";import{e as h}from"./chunk-ESAGJOZZ.js";import{h as S}from"./chunk-N5FH4YAX.js";import{F as n,N as d,Qc as c,Rc as p,T as m,Z as o,n as f,r as k,va as s}from"./chunk-4KE2I7OA.js";import{a as l,b as a}from"./chunk-7CGTOI24.js";var F={Backup_Begin:$localize`Starting backup …`,Backup_PreBackupVerify:$localize`Verifying backend data …`,Backup_PostBackupTest:$localize`Verifying remote data …`,Backup_PreviousBackupFinalize:$localize`Completing previous backup …`,Backup_ProcessingFiles:$localize`Processing files to backup …`,Backup_Finalize:$localize`Completing backup …`,Backup_WaitForUpload:$localize`Waiting for upload to finish …`,Backup_Delete:$localize`Deleting unwanted files …`,Backup_Compact:$localize`Compacting remote data …`,Backup_VerificationUpload:$localize`Uploading verification file …`,Backup_PostBackupVerify:$localize`Verifying backend data …`,Backup_Complete:$localize`Backup complete!`,Restore_Begin:$localize`Starting restore …`,Restore_RecreateDatabase:$localize`Rebuilding local database …`,Restore_PreRestoreVerify:$localize`Verifying remote data …`,Restore_CreateFileList:$localize`Building list of files to restore …`,Restore_CreateTargetFolders:$localize`Creating target folders …`,Restore_ScanForExistingFiles:$localize`Scanning existing files …`,Restore_ScanForLocalBlocks:$localize`Scanning for local blocks …`,Restore_PatchWithLocalBlocks:$localize`Patching files with local blocks …`,Restore_DownloadingRemoteFiles:$localize`Downloading files …`,Restore_PostRestoreVerify:$localize`Verifying restored files …`,Restore_Complete:$localize`Restore complete!`,Recreate_Running:$localize`Recreating database …`,Vacuum_Running:$localize`Vacuuming database …`,Repair_Running:$localize`Repairing database …`,Verify_Running:$localize`Verifying files …`,BugReport_Running:$localize`Creating bug report …`,Delete_Listing:$localize`Listing remote files …`,Delete_Deleting:$localize`Deleting remote files …`,"PurgeFiles_Begin,":$localize`Listing remote files for purge …`,"PurgeFiles_Process,":$localize`Purging files …`,"PurgeFiles_Compact,":$localize`Compacting remote data …`,"PurgeFiles_Complete,":$localize`Purging files complete!`,Error:$localize`Error!`},$=class r{#i=o(P);#t=o(S);#o=o(z);#e=o(R);#r=o(h);#l=s(!1);#a=s(null);statusData=this.#a.asReadonly();lastState=null;serverState=c(()=>{let e=this.#e.serverState();return e?(e.ProposedSchedule=e.ProposedSchedule?.map(i=>a(l({},i),{backup:i.Item1?this.#o.getBackupById(i.Item1):null})),this.lastState=e,e):this.lastState});clientIsRunning=c(()=>this.serverState()?.ProgramState==="Running");serverStateEffect=p(()=>{this.#e.serverState()?.ActiveTask||this.#o.getBackups(!0)});isResuming=s(!1);isFetching=this.#l.asReadonly();connectionStatus=this.#e.connectionStatus;pollingInterval;#p=p(()=>{let e=this.#e.serverState();e?.ActiveTask&&this.pollingInterval===void 0?this.startPollingProgress():e?.ActiveTask||this.stopPollingProgress()});setConnectionMethod(e){this.#e.setConnectionMethod(e)}startPollingProgress(){this.pollingInterval=setInterval(()=>{this.#s()},1e3)}stopPollingProgress(){clearInterval(this.pollingInterval)}fetchProgressState(){this.#s()}pauseResume(){return this.isResuming.set(!0),this.#t.postApiV1ServerstateResume().pipe(n(()=>this.isResuming.set(!1)))}resumeDialogCheck(e){if(!this.clientIsRunning()){this.#r.open(B,{data:{title:$localize`Server paused`,message:$localize`Server is currently paused. Do you want to resume now?`,confirmText:$localize`Resume`,cancelText:$localize`No, I'll resume later`},closed:i=>{i&&this.pauseResume().subscribe({next:()=>{e()}})}});return}e()}#s(){this.#l.set(!0),this.#t.getApiV1Progressstate().pipe(d(e=>{let i=e.TaskID??null;return i===null?f(e):this.#t.getApiV1TaskByTaskid({taskid:i}).pipe(k(t=>a(l({},e),{task:t??null})))}),n(()=>this.#l.set(!1))).subscribe({next:e=>{let i=e.TaskID??null,t=e.BackupID??null;i!==null&&t!==null&&(e.backup=this.#o.getBackupById(t)),this.#a.set(a(l({},e),{progress:this.#n(e),statusText:this.#c(e),actionText:e.backup?.Backup?.Name??$localize`Running task`})),e.task?.Status==="Completed"&&this.stopPollingProgress()},error:e=>{e.status===404&&this.stopPollingProgress()}})}#n(e){let i=-1;if(e.task&&e)if(e.Phase==="Backup_ProcessingFiles"||e.Phase==="Restore_DownloadingRemoteFiles")if(e.StillCounting)i=0;else{let t=e.CurrentFilecomplete?0:e.CurrentFileoffset,u=e.TotalFileCount-e.ProcessedFileCount,g=e.TotalFileSize-e.ProcessedFileSize-t;i=(e.ProcessedFileSize+t)/e.TotalFileSize,e.ProcessedFileCount===0?i=0:i>=.9&&(i=.9)}else e.Phase==="Backup_Finalize"||e.Phase==="Backup_WaitForUpload"?i=.9:e.Phase==="Backup_Delete"||e.Phase==="Backup_Compact"?i=.95:e.Phase==="Backup_VerificationUpload"||e.Phase==="Backup_PostBackupVerify"?i=.98:e.Phase==="Backup_Complete"||e.Phase==="Backup_WaitForUpload"?i=1:e.OverallProgress>0&&(i=e.OverallProgress);return i}#c(e){let i="Running \u2026";if(e.task&&e&&(i=e.Phase?F[e.Phase]:"Running \u2026",e.Phase==="Backup_ProcessingFiles"||e.Phase==="Restore_DownloadingRemoteFiles"))if(e.StillCounting)i=`Counting (${e.TotalFileCount} files found, ${this.#i.transform(e.TotalFileSize)})`;else{let t=e.CurrentFilecomplete?0:e.CurrentFileoffset,u=e.TotalFileCount-e.ProcessedFileCount,g=e.TotalFileSize-e.ProcessedFileSize-t,_=e.BackendSpeed<0?"":` at ${this.#i.transform(e.BackendSpeed)}/s`;i=`${e.Phase==="Restore_DownloadingRemoteFiles"?"Restoring: ":""}${u} files (${this.#i.transform(g)}) to go ${_}`}return i}static \u0275fac=function(i){return new(i||r)};static \u0275prov=m({token:r,factory:r.\u0275fac,providedIn:"root"})};export{$ as a};
|
package/chunk-YUZKJZ22.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-7CGTOI24.js";var o=[{path:"",loadComponent:()=>import("./chunk-5C7A7QU6.js"),children:[{path:"",redirectTo:"stored",pathMatch:"full"},{path:"stored",loadComponent:()=>import("./chunk-65U4B3NQ.js")},{path:"live",loadComponent:()=>import("./chunk-PDODLSPH.js")}]}],t=o;export{t as default};
|
package/chunk-YZDNOP4R.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as a,i as b}from"./chunk-VPTXHYYV.js";import"./chunk-43BIRTPL.js";import"./chunk-FP6LM56A.js";import"./chunk-M5RL4LRX.js";import"./chunk-HIW2CN45.js";import"./chunk-4V45XF67.js";import"./chunk-UEYPJIJG.js";import"./chunk-2CXHZS6X.js";import"./chunk-LUKUBN2Z.js";import"./chunk-RHW5QVAY.js";import"./chunk-ABANCAM5.js";import"./chunk-WRKRV6RQ.js";import"./chunk-DYTQQHMA.js";import"./chunk-ESAGJOZZ.js";import"./chunk-N5FH4YAX.js";import"./chunk-EBXJGPRA.js";import"./chunk-4KE2I7OA.js";import"./chunk-7CGTOI24.js";export{a as SCHEDULE_FIELD_DEFAULTS,b as default};
|
package/chunk-Z2TE5POZ.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as cn}from"./chunk-6V7W7EKR.js";import{c as Z,d as rn}from"./chunk-HIW2CN45.js";import"./chunk-UEYPJIJG.js";import{a as ln}from"./chunk-XHPURHO2.js";import"./chunk-7V4TPS4B.js";import{a as an}from"./chunk-T5WAKBP3.js";import"./chunk-LUKUBN2Z.js";import"./chunk-RHW5QVAY.js";import"./chunk-DLJSVAM2.js";import"./chunk-ABANCAM5.js";import"./chunk-FSKPPAVO.js";import"./chunk-FQ55IACT.js";import{e as je}from"./chunk-WRKRV6RQ.js";import"./chunk-DYTQQHMA.js";import{a as Y,f as qe,g as Je,h as Qe,j as Ye,k as Ze,o as en,p as nn,w as tn,x as on}from"./chunk-ESAGJOZZ.js";import{h as _n}from"./chunk-N5FH4YAX.js";import"./chunk-GQGMGFDX.js";import"./chunk-EBXJGPRA.js";import"./chunk-QUOBR5MG.js";import{Ab as z,Ac as B,Bb as V,Bc as G,Cb as K,Db as _,Dc as Q,Eb as o,F as X,Fb as d,Gb as M,Hb as m,Ib as D,Jb as x,Pb as s,Qb as u,Rb as p,Rc as We,Sb as y,Tb as L,Ua as r,Ub as j,Vb as f,Wb as F,Z as w,a as ve,b as W,ea as k,fa as P,gb as he,ic as U,jc as T,kc as ze,lb as g,lc as O,oc as Ve,pc as Ke,qc as Ue,rb as Xe,rc as q,sb as we,ub as S,va as R,vc as J,wb as H,wc as $,zb as E,zc as I}from"./chunk-4KE2I7OA.js";import"./chunk-7CGTOI24.js";function sn(...e){let i=R(...e);return Object.defineProperty(i,"value",{get:i.asReadonly(),set:i.set.bind(i)})}function un(e,i,n){let t=localStorage.getItem(i);t!=null&&(e=JSON.parse(t));let l=sn(e),c=l[ve];n?.equal&&(c.equal=n.equal);function N(C){C==null?localStorage.removeItem(i):localStorage.setItem(i,JSON.stringify(C))}return l.set=C=>{N(C),W(c,C)},l.update=C=>{let A=C(l());N(A),W(c,A)},l}var gn=()=>[import("./chunk-QMFHJSCY.js").then(e=>e.NgTemplateOutlet),Y,Ye,on,tn,import("./chunk-GUKBMCIX.js").then(e=>e.DurationFormatPipe),import("./chunk-6LCXRM3A.js").then(e=>e.BytesPipe),import("./chunk-U7YVVKGQ.js").then(e=>e.RelativeTimePipe)],dn=()=>["/add-backup"],Tn=()=>["/restore"],Fn=e=>({$implicit:e}),Sn=e=>["/backup",e],Cn=e=>["/restore",e],En=e=>["/backup",e,"export"],Mn=e=>["/backup",e,"delete"],mn=e=>["/backup",e,"database"],On=e=>["/backup",e,"commandline"],Nn=e=>["/backup",e,"log"];function kn(e,i){if(e&1){let n=x();_(0,"button",57),f("click",function(){let l=k(n).$implicit,c=F(2);return P(c.sortByColumn.set(l.value))}),p(1,15),o()}if(e&2){let n=i.$implicit,t=F(2);H("active",t.orderBy()===n.value),r(),y(n.label),L(1)}}function Pn(e,i){if(e&1&&(_(0,"spk-menu",58)(1,"button",59),s(2,14),d(3,"strong")(4,"spk-icon"),u(),o(),M(5,60),V(6,kn,2,3,"button",61,z),m(),o()),e&2){let n=F();r(4),y(n.orderBy()),L(2),r(2),K(n.sortOrderOptions())}}function fn(e,i){if(e&1&&(T(0),I(1,"durationFormat")),e&2){let n=F().$implicit,t=F(4);O(" ",G(1,1,n.Backup==null||n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDuration,t.timeType()==="actual")," ")}}function $n(e,i){e&1&&(M(0),p(1,21),m())}function Dn(e,i){if(e&1&&(T(0),I(1,"bytes")),e&2){let n=F().$implicit;O(" ",B(1,1,n.Backup==null||n.Backup.Metadata==null?null:n.Backup.Metadata.SourceFilesSize)," ")}}function In(e,i){e&1&&(M(0),p(1,22),m())}function An(e,i){if(e&1&&(T(0),I(1,"bytes")),e&2){let n=F().$implicit;O(" ",B(1,1,n.Backup==null||n.Backup.Metadata==null?null:n.Backup.Metadata.TargetFilesSize)," ")}}function Rn(e,i){e&1&&(M(0),p(1,23),m())}function Hn(e,i){e&1&&D(0)}function yn(e,i){if(e&1&&(_(0,"div",64)(1,"div",51)(2,"h3"),T(3),_(4,"spk-chip")(5,"spk-icon"),T(6),o(),T(7),o()(),_(8,"p")(9,"span"),p(10,16),o(),T(11),I(12,"relativeTime"),o(),_(13,"p")(14,"span"),p(15,17),o(),g(16,fn,2,4)(17,$n,2,0,"ng-container"),o(),_(18,"p")(19,"span"),p(20,18),o(),g(21,Dn,2,3)(22,In,2,0,"ng-container"),o(),_(23,"p")(24,"span"),p(25,19),o(),g(26,An,2,3)(27,Rn,2,0,"ng-container"),o()(),q(28),_(29,"spk-chip",65),p(30,20),o(),_(31,"div",55),g(32,Hn,1,0,"ng-container",66),o()()),e&2){let n,t=i.$implicit,l=F(4),c=U(51);r(3),O(" ",(n=t.Backup==null?null:t.Backup.Name)!==null&&n!==void 0?n:l.MISSING_BACKUP_NAME," "),r(3),ze(l.getBackendIcon(t.Backup==null?null:t.Backup.TargetURL)),r(),O(" ",l.getBackendType(t.Backup==null?null:t.Backup.TargetURL)," "),r(4),O(" ",G(12,11,t.Backup==null||t.Backup.Metadata==null?null:t.Backup.Metadata.LastBackupDate,l.timeType()==="actual")," "),r(5),E(!(t.Backup==null||t.Backup.Metadata==null)&&t.Backup.Metadata.LastBackupDuration?16:17),r(5),E(!(t.Backup==null||t.Backup.Metadata==null)&&t.Backup.Metadata.SourceFilesSize?21:22),r(5),E(!(t.Backup==null||t.Backup.Metadata==null)&&t.Backup.Metadata.TargetFilesSize?26:27);let N=l.getBackupVersionCount(t);r(4),y(N)(N),L(30),r(2),S("ngTemplateOutlet",c)("ngTemplateOutletContext",$(14,Fn,t))}}function Ln(e,i){if(e&1&&V(0,yn,33,16,"div",64,z),e&2){let n=F(3);K(n.backups())}}function xn(e,i){e&1&&(M(0),p(1,24),m())}function Bn(e,i){if(e&1&&(_(0,"div",62),g(1,Ln,2,0)(2,xn,2,0,"ng-container"),o()),e&2){let n=F(2);r(),E(n.backups().length?1:2)}}function Gn(e,i){e&1&&(s(0,25,1),D(1),u())}function bn(e,i){e&1&&(s(0,26,1),D(1),u())}function vn(e,i){e&1&&(s(0,27,1),D(1),u())}function hn(e,i){e&1&&(s(0,28,1),D(1),u())}function Xn(e,i){e&1&&(s(0,29,1),D(1),u())}function wn(e,i){e&1&&(s(0,30,1),D(1),u())}function zn(e,i){if(e&1&&(T(0),I(1,"relativeTime")),e&2){let n=F().$implicit,t=F(3);O(" ",G(1,1,n.Backup==null||n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDate,t.timeType()==="actual")," ")}}function Vn(e,i){e&1&&(M(0),p(1,34),m())}function Kn(e,i){if(e&1&&(T(0),I(1,"durationFormat")),e&2){let n=F().$implicit,t=F(3);O(" ",G(1,1,n.Backup==null||n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDuration,t.timeType()==="actual")," ")}}function Un(e,i){e&1&&(M(0),p(1,35),m())}function Wn(e,i){if(e&1&&(T(0),I(1,"bytes")),e&2){let n=F().$implicit;O(" ",B(1,1,n.Backup==null||n.Backup.Metadata==null?null:n.Backup.Metadata.SourceFilesSize)," ")}}function jn(e,i){e&1&&(M(0),p(1,36),m())}function qn(e,i){if(e&1&&(T(0),I(1,"bytes")),e&2){let n=F().$implicit;O(" ",B(1,1,n.Backup==null||n.Backup.Metadata==null?null:n.Backup.Metadata.TargetFilesSize)," ")}}function Jn(e,i){e&1&&(M(0),p(1,37),m())}function Qn(e,i){e&1&&D(0)}function Yn(e,i){if(e&1&&(_(0,"tr")(1,"td"),T(2),o(),_(3,"td"),T(4),o(),_(5,"td"),g(6,zn,2,4)(7,Vn,2,0,"ng-container"),o(),_(8,"td"),g(9,Kn,2,4)(10,Un,2,0,"ng-container"),o(),_(11,"td"),g(12,Wn,2,3)(13,jn,2,0,"ng-container"),o(),_(14,"td"),g(15,qn,2,3)(16,Jn,2,0,"ng-container"),o(),_(17,"td"),q(18),_(19,"span"),p(20,33),o()(),_(21,"td"),g(22,Qn,1,0,"ng-container",66),o()()),e&2){let n,t=i.$implicit,l=F(3),c=U(51);r(2),O(" ",(n=t.Backup==null?null:t.Backup.Name)!==null&&n!==void 0?n:l.MISSING_BACKUP_NAME," "),r(2),O(" ",l.getBackendType(t.Backup==null?null:t.Backup.TargetURL)," "),r(2),E(!(t.Backup==null||t.Backup.Metadata==null)&&t.Backup.Metadata.LastBackupDate?6:7),r(3),E(!(t.Backup==null||t.Backup.Metadata==null)&&t.Backup.Metadata.LastBackupDuration?9:10),r(3),E(!(t.Backup==null||t.Backup.Metadata==null)&&t.Backup.Metadata.SourceFilesSize?12:13),r(3),E(!(t.Backup==null||t.Backup.Metadata==null)&&t.Backup.Metadata.TargetFilesSize?15:16);let N=l.getBackupVersionCount(t);r(5),y(N)(N),L(20),r(2),S("ngTemplateOutlet",c)("ngTemplateOutletContext",$(10,Fn,t))}}function Zn(e,i){if(e&1){let n=x();_(0,"spk-table",67),Ue("sortByColumnChange",function(l){k(n);let c=F(2);return Ke(c.sortByColumn,l)||(c.sortByColumn=l),P(l)}),_(1,"tr",68)(2,"th",69),s(3,25),g(4,Gn,2,0,"ng-container",70),u(),o(),_(5,"th",71),s(6,26),g(7,bn,2,0,"ng-container",70),u(),o(),_(8,"th",72),s(9,27),g(10,vn,2,0,"ng-container",70),u(),o(),_(11,"th",73),s(12,28),g(13,hn,2,0,"ng-container",70),u(),o(),_(14,"th",74),s(15,29),g(16,Xn,2,0,"ng-container",70),u(),o(),_(17,"th",75),s(18,30),g(19,wn,2,0,"ng-container",70),u(),o(),_(20,"th"),p(21,31),o(),_(22,"th"),p(23,32),o()(),V(24,Yn,23,12,"tr",null,z),o()}if(e&2){let n=F(2),t=U(53);S("data",n.backups())("loading",n.backupsLoading()),Ve("sortByColumn",n.sortByColumn),r(4),S("ngTemplateOutlet",t),r(3),S("ngTemplateOutlet",t),r(3),S("ngTemplateOutlet",t),r(3),S("ngTemplateOutlet",t),r(3),S("ngTemplateOutlet",t),r(3),S("ngTemplateOutlet",t),r(5),K(n.backups())}}function et(e,i){if(e&1&&g(0,Bn,3,1,"div",62)(1,Zn,26,9,"spk-table",63),e&2){let n=F();E(n.viewMode()==="list"?0:n.viewMode()==="details"?1:-1)}}function nt(e,i){e&1&&(_(0,"div",76),d(1,"spk-progress-bar",77),_(2,"div",51)(3,"h3"),p(4,38),o()()())}function tt(e,i){e&1&&p(0,39,1)}function it(e,i){e&1&&(_(0,"spk-icon"),T(1,"check"),o())}function ot(e,i){e&1&&(_(0,"spk-icon"),T(1,"dots-three-vertical"),o())}function _t(e,i){if(e&1){let n=x();_(0,"button",78),f("click",function(){let l=k(n).$implicit,c=F();return P(c.startBackup(l.Backup==null?null:l.Backup.ID))}),s(1,39),d(2,"spk-icon"),g(3,tt,1,0),u(),o(),_(4,"button",79)(5,"spk-icon"),T(6,"pencil-simple"),o()(),_(7,"spk-menu",80)(8,"button",52),g(9,it,2,0,"spk-icon")(10,ot,2,0,"spk-icon"),o(),M(11,60),_(12,"h3",81),T(13,"Operations"),o(),_(14,"button",82),s(15,40),d(16,"spk-icon"),u(),o(),_(17,"button",82),s(18,41),d(19,"spk-icon"),u(),o(),_(20,"button",82),s(21,42),d(22,"spk-icon"),u(),o(),d(23,"spk-divider"),_(24,"h3",81),T(25,"Advanced"),o(),_(26,"button",82),s(27,43),d(28,"spk-icon"),u(),o(),_(29,"button",57),f("click",function(){let l=k(n).$implicit,c=F();return P(c.verifyFiles(l.Backup==null?null:l.Backup.ID))}),s(30,44),d(31,"spk-icon"),u(),o(),_(32,"button",57),f("click",function(){let l=k(n).$implicit,c=F();return P(c.compressBackup(l.Backup==null?null:l.Backup.ID))}),s(33,45),d(34,"spk-icon"),u(),o(),_(35,"button",82),s(36,46),d(37,"spk-icon"),u(),o(),d(38,"spk-divider"),_(39,"h3",81),T(40,"Reporting"),o(),_(41,"button",82),s(42,47),d(43,"spk-icon"),u(),o(),_(44,"button",57),f("click",function(){let l=k(n).$implicit,c=F();return P(c.createErrorReport(l.Backup==null?null:l.Backup.ID))}),s(45,48),d(46,"spk-icon"),u(),o(),m(),o()}if(e&2){let n=i.$implicit,t=F();H("loader",t.startingBackup()===(n.Backup==null?null:n.Backup.ID)),r(3),E(t.viewMode()==="list"?3:-1),r(),S("routerLink",$(16,Sn,n.Backup==null?null:n.Backup.ID)),r(3),S("right",!0),r(),H("loader",t.loadingId()===(n.Backup==null?null:n.Backup.ID))("success",t.successId()===(n.Backup==null?null:n.Backup.ID)),r(),E(t.successId()===(n.Backup==null?null:n.Backup.ID)?9:10),r(5),S("routerLink",$(18,Cn,n.Backup==null?null:n.Backup.ID)),r(3),S("routerLink",$(20,En,n.Backup==null?null:n.Backup.ID)),r(3),S("routerLink",$(22,Mn,n.Backup==null?null:n.Backup.ID)),r(6),S("routerLink",$(24,mn,n.Backup==null?null:n.Backup.ID)),r(9),S("routerLink",$(26,On,n.Backup==null?null:n.Backup.ID)),r(6),S("routerLink",$(28,Nn,n.Backup==null?null:n.Backup.ID))}}function at(e,i){e&1&&(_(0,"spk-icon",83),T(1,"funnel-simple"),o(),_(2,"spk-icon",84),T(3,"sort-ascending"),o(),_(4,"spk-icon",85),T(5,"sort-descending"),o())}var pn={file:{Display:$localize`Local`,Icon:null}},ee=class e{#n=w(_n);#t=w(ln);#e=w(an);MISSING_BACKUP_NAME=$localize`Backup name missing`;sortOrderOptions=this.#e.orderByOptions;orderBy=this.#e.orderBy;backups=this.#e.backups;backupsLoading=this.#e.backupsLoading;startingBackup=this.#e.startingBackup;deletingBackup=this.#e.deletingBackup;timeType=this.#e.timeType;viewMode=un("list","viewMode");sortByColumn=R("name");loadingId=R(null);successId=R(null);sortEffect=We(()=>this.#e.setOrderBy(this.sortByColumn()));ngOnInit(){this.#e.getBackups(!0)}setOrderBy(i){this.#e.setOrderBy(i)}setTimeType(i){this.#e.setTimeType(i)}startBackup(i){this.#t.resumeDialogCheck(()=>this.#e.startBackup(i))}getBackendIcon(i){if(!i)return"";let n=i.split("://")[0],t=Z.find(c=>c.key===n);if(!t)return"database";let l=pn[t.key];return l?.Icon?l.Icon:"database"}getBackendType(i){if(!i)return"";let n=i.split("://")[0],t=Z.find(c=>c.key===n);if(!t)return"";let l=pn[t.key];if(l?.Display)return l.Display;if(t.key==="s3"){let c="http://null?"+i.split("?")[1],C=new URL(c).searchParams.get("s3-server-name")?.toLowerCase()??"";for(let[A,b]of Object.entries(rn))if(C.endsWith(A))return b}return t.displayName}getBackupVersionCount(i){return parseInt(i?.Backup?.Metadata?.BackupListCount??"",10)||0}verifyFiles(i){this.loadingId.set(i),this.#n.postApiV1BackupByIdVerify({id:i}).pipe(X(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(i),setTimeout(()=>this.successId.set(null),2e3)}})}compressBackup(i){this.loadingId.set(i),this.#n.postApiV1BackupByIdCompact({id:i}).pipe(X(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(i),setTimeout(()=>this.successId.set(null),2e3)}})}createErrorReport(i){this.loadingId.set(i),this.#n.postApiV1BackupByIdCreatereport({id:i}).pipe(X(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(i),setTimeout(()=>this.successId.set(null),2e3)}})}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=he({type:e,selectors:[["app-home"]],decls:54,vars:11,consts:()=>{let i;i=$localize`Backups`;let n;n=$localize`Backups are stored in the cloud and can be restored at any time.`;let t;t=$localize` Add ${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let l;l=$localize`Restores`;let c;c=$localize`Restores allow you to restore your data from the cloud.`;let N;N=$localize` Start ${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let C;C=$localize`My backups`;let A;A=$localize`${"\uFFFD#31\uFFFD"}:START_TAG_SPK_ICON:rows${"\uFFFD/#31\uFFFD"}:CLOSE_TAG_SPK_ICON: List `;let b;b=$localize`${"\uFFFD#34\uFFFD"}:START_TAG_SPK_ICON:list${"\uFFFD/#34\uFFFD"}:CLOSE_TAG_SPK_ICON: Details `;let ne;ne=$localize` Time: ${"\uFFFD#38\uFFFD"}:START_TAG_STRONG:${"\uFFFD0\uFFFD"}:INTERPOLATION:${"\uFFFD/#38\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#39\uFFFD"}:START_TAG_SPK_ICON:clock${"\uFFFD/#39\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let te;te=$localize`Relative time`;let ie;ie=$localize`Actual time`;let oe;oe=$localize` Order by: ${"\uFFFD#3\uFFFD"}:START_TAG_STRONG:${"\uFFFD0\uFFFD"}:INTERPOLATION:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#4\uFFFD"}:START_TAG_SPK_ICON:arrows-down-up${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let _e;_e=$localize` ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let ae;ae=$localize`Last successful backup:`;let le;le=$localize`Duration:`;let re;re=$localize`Source:`;let ce;ce=$localize`Destination:`;let v;v=$localize`{VAR_PLURAL, plural, =0 {No version yet} =1 {1 Version} other {{INTERPOLATION} Versions}}`,v=j(v,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let se;se=$localize` ${v}:ICU@@6502601490918455200: `;let ue;ue=$localize`N/A`;let pe;pe=$localize`N/A`;let Fe;Fe=$localize`N/A`;let ge;ge=$localize`No backups founds`;let de;de=$localize` Backup ${"\uFFFD*4:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*4:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Te;Te=$localize` Type ${"\uFFFD*7:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*7:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Se;Se=$localize` Last successful backup ${"\uFFFD*10:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*10:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Ce;Ce=$localize` Duration ${"\uFFFD*13:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*13:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Ee;Ee=$localize` Source ${"\uFFFD*16:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*16:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Me;Me=$localize` Destination ${"\uFFFD*19:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*19:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let me;me=$localize`Version`;let Oe;Oe=$localize`Actions`;let h;h=$localize`{VAR_PLURAL, plural, =0 {No version yet} =1 {1 Version} other {{INTERPOLATION} Versions}}`,h=j(h,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let Ne;Ne=$localize` ${h}:ICU@@6502601490918455200: `;let ke;ke=$localize`N/A`;let Pe;Pe=$localize`N/A`;let fe;fe=$localize`N/A`;let $e;$e=$localize`N/A`;let De;De=$localize`Loading backups...`;let Ie;Ie=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:play-circle${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON:${"\uFFFD*3:1\uFFFD"}:START_BLOCK_IF: Start ${"\uFFFD/*3:1\uFFFD"}:CLOSE_BLOCK_IF:`;let Ae;Ae=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SPK_ICON:clock-counter-clockwise${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SPK_ICON: Restore `;let Re;Re=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:export${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: Export `;let He;He=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:x-circle${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON: Delete `;let ye;ye=$localize`${"\uFFFD#28\uFFFD"}:START_TAG_SPK_ICON:database${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SPK_ICON: Database `;let Le;Le=$localize`${"\uFFFD#31\uFFFD"}:START_TAG_SPK_ICON:check-square-offset${"\uFFFD/#31\uFFFD"}:CLOSE_TAG_SPK_ICON: Verify files `;let xe;xe=$localize`${"\uFFFD#34\uFFFD"}:START_TAG_SPK_ICON:file-archive${"\uFFFD/#34\uFFFD"}:CLOSE_TAG_SPK_ICON: Compress now `;let Be;Be=$localize`${"\uFFFD#37\uFFFD"}:START_TAG_SPK_ICON:terminal-window${"\uFFFD/#37\uFFFD"}:CLOSE_TAG_SPK_ICON: Commandline `;let Ge;Ge=$localize`${"\uFFFD#43\uFFFD"}:START_TAG_SPK_ICON:notepad${"\uFFFD/#43\uFFFD"}:CLOSE_TAG_SPK_ICON: Log `;let be;return be=$localize`${"\uFFFD#46\uFFFD"}:START_TAG_SPK_ICON:file-plus${"\uFFFD/#46\uFFFD"}:CLOSE_TAG_SPK_ICON: Create error report `,[["actions",""],["sortIcons",""],i,n,t,l,c,N,C,A,b,ne,te,ie,oe,_e,ae,le,re,ce,se,ue,pe,Fe,ge,de,Te,Se,Ce,Ee,Me,me,Oe,Ne,ke,Pe,fe,$e,De,Ie,Ae,Re,He,ye,Le,xe,Be,Ge,be,[1,"type-a",3,"routerLink"],["src","assets/images/backup.png","alt","","width","48px"],[1,"text"],["type","button","spk-button",""],["src","assets/images/restore.png","alt","","width","48px"],[1,"content"],[1,"actions"],[1,"small"],["type","button",3,"click"],[1,"table-overview"],["type","button","spk-button","",1,"small"],["menu",""],["type","button",3,"active"],[1,"backups"],[1,"type-b",3,"data","loading","sortByColumn"],[1,"backup"],[1,"simple","success"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"type-b",3,"sortByColumnChange","data","loading","sortByColumn"],["table-header",""],["spkSort","name"],[4,"ngTemplateOutlet"],["spkSort","type"],["spkSort","lastrun"],["spkSort","duration"],["spkSort","sourcesize"],["spkSort","destinationsize"],[1,"loading-list"],[1,"indeterminate","primary"],["spk-button","",3,"click"],["type","button","spk-button","",3,"routerLink"],[3,"right"],["title",""],["type","button",3,"routerLink"],[1,"filter"],[1,"asc"],[1,"desc"]]},template:function(n,t){if(n&1){let l=x();d(0,"app-status-bar"),_(1,"section")(2,"header")(3,"spk-card",49),d(4,"img",50),_(5,"div",51)(6,"h3"),p(7,2),o(),_(8,"p"),p(9,3),o()(),_(10,"button",52),s(11,4),d(12,"spk-icon"),u(),o()(),_(13,"spk-card",49),d(14,"img",53),_(15,"div",51)(16,"h3"),p(17,5),o(),_(18,"p"),p(19,6),o()(),_(20,"button",52),s(21,7),d(22,"spk-icon"),u(),o()()(),_(23,"div",54)(24,"h2"),M(25),p(26,8),m(),_(27,"div",55)(28,"spk-button-group",56)(29,"button",57),f("click",function(){return k(l),P(t.viewMode.set("list"))}),s(30,9),d(31,"spk-icon"),u(),o(),_(32,"button",57),f("click",function(){return k(l),P(t.viewMode.set("details"))}),s(33,10),d(34,"spk-icon"),u(),o()(),_(35,"spk-menu",58)(36,"button",59),s(37,11),d(38,"strong")(39,"spk-icon"),u(),o(),M(40,60),_(41,"button",57),f("click",function(){return k(l),P(t.setTimeType("relative"))}),p(42,12),o(),_(43,"button",57),f("click",function(){return k(l),P(t.setTimeType("actual"))}),p(44,13),o(),m(),o(),g(45,Pn,8,1,"spk-menu",58),o()(),g(46,et,2,1)(47,nt,5,0),Xe(48,46,gn,null,47),o()(),g(50,_t,47,30,"ng-template",null,0,Q)(52,at,6,0,"ng-template",null,1,Q)}n&2&&(r(3),S("routerLink",J(9,dn)),r(10),S("routerLink",J(10,Tn)),r(16),H("active",t.viewMode()==="list"),r(3),H("active",t.viewMode()==="details"),r(7),y(t.timeType()),L(37),r(6),E(t.viewMode()==="list"?45:-1),r(3),we(!t.backupsLoading()))},dependencies:[je,cn,Qe,Je,Y,Ze,en,nn,qe],styles:["[_nghost-%COMP%]{display:block}h2[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:2rem 0}header[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;padding:0 2rem;gap:1rem}spk-card[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem}spk-card[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:.25rem}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.content[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{padding:0 2rem}.backups[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 2rem;gap:.5rem}.backup[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem;gap:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;width:100%;max-width:40%}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{color:var(--base-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--base-12)}.actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.sortable[_ngcontent-%COMP%]{-webkit-user-select:none;user-select:none}.sortable[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{margin-left:.5rem;font-size:1rem;justify-self:flex-end;display:none}.sortable[_ngcontent-%COMP%]:not(.sort-asc):not(.sort-desc) spk-icon.filter[_ngcontent-%COMP%]{display:block}.sortable.sort-asc[_ngcontent-%COMP%] spk-icon.asc[_ngcontent-%COMP%]{display:block;color:var(--base-12)}.sortable.sort-desc[_ngcontent-%COMP%] spk-icon.desc[_ngcontent-%COMP%]{display:block;color:var(--base-12)}"],changeDetection:0})};export{ee as default};
|
package/chunk-ZMLGDPCK.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{a as Ee}from"./chunk-SX2OA5DO.js";import{a as fe}from"./chunk-6V7W7EKR.js";import{l as P}from"./chunk-VPTXHYYV.js";import"./chunk-43BIRTPL.js";import"./chunk-FP6LM56A.js";import{a as Se}from"./chunk-M5RL4LRX.js";import"./chunk-HIW2CN45.js";import"./chunk-4V45XF67.js";import{a as T}from"./chunk-UEYPJIJG.js";import"./chunk-2CXHZS6X.js";import{a as le}from"./chunk-XHPURHO2.js";import"./chunk-7V4TPS4B.js";import"./chunk-T5WAKBP3.js";import"./chunk-LUKUBN2Z.js";import"./chunk-RHW5QVAY.js";import"./chunk-DLJSVAM2.js";import{c as se,e as me,f as de,i as pe,m as _e,n as ce,o as ue,q as Ce,r as ge,s as Me,t as Ne}from"./chunk-ABANCAM5.js";import"./chunk-FSKPPAVO.js";import"./chunk-FQ55IACT.js";import{b as q,d as Z,e as J}from"./chunk-WRKRV6RQ.js";import"./chunk-DYTQQHMA.js";import{a as Q,e as Y,g as ee,k as te,l as ne,p as oe,t as ie}from"./chunk-ESAGJOZZ.js";import{g as ae,h as re}from"./chunk-N5FH4YAX.js";import"./chunk-GQGMGFDX.js";import"./chunk-EBXJGPRA.js";import"./chunk-QUOBR5MG.js";import{Ab as R,Bb as y,Cb as v,Db as r,Eb as o,Fb as l,Gb as A,Hb as O,Jb as G,Pb as M,Qb as N,Rb as c,Rc as H,Sb as x,Tb as U,Ua as m,Vb as K,Wb as f,Z as _,_b as w,ea as S,fa as E,gb as $,lb as h,oc as X,pc as z,qc as V,ub as C,uc as W,va as F,vc as j,wb as b,zb as B}from"./chunk-4KE2I7OA.js";import"./chunk-7CGTOI24.js";var Fe=()=>[];function Ae(s,t){s&1&&l(0,"spk-progress-bar",12)}function Oe(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,""),C("formControl",e)}}function Te(s,t){if(s&1){let e=G();r(0,"form",13)(1,"spk-select",14)(2,"label",15),c(3,1),o(),l(4,"input",16),o(),r(5,"spk-form-field")(6,"label",17),c(7,2),o(),l(8,"textarea",18),o(),r(9,"spk-form-field")(10,"label",19),c(11,3),o(),l(12,"textarea",20),o()(),r(13,"spk-divider"),c(14,4),o(),r(15,"form",13)(16,"spk-form-field")(17,"label",21),c(18,5),o(),l(19,"input",22),o(),r(20,"spk-form-field")(21,"label",23),c(22,6),o(),l(23,"input",24),o(),r(24,"app-toggle-card",25),A(25,26),c(26,7),O(),A(27,27),y(28,Oe,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 u=f();return z(u.settings,a)||(u.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();C("formGroup",i.baseCmdForm),m(),C("options",(e=i.commandOptions())!==null&&e!==void 0?e:j(10,Fe))("inlineSearch",!0),m(14),C("formGroup",i.standardFields),m(9),C("disallowToggle",!0),m(4),v(i.standardFields.controls.filters.controls),m(5),X("options",i.settings),C("hasFreeTextSettings",!0),m(2),b("loader",i.isSubmitting()),m(2),x(i.baseCmdForm.value.command),U(36)}}var d=new ge,Pe=["Bytes","KB","MB","GB","TB","PB"],I=class s{#e=_(P);#t=_(re);#n=_(Z);#o=_(q);#i=_(ae);#a=_(le);#s=_(Y);#r=T(this.#o.params);commandOptions=T(this.#i.getApiV1Commandline());sizeOptions=F(Pe);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;#m=H(()=>{let t=this.#r()?.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.#a.resumeDialogCheck(()=>this.#l())}#l(){this.isSubmitting.set(!0);let t=this.baseCmdForm.value,e=t.targetUrl??"",i=t.arguments?.split(`
|
|
2
|
-
`).filter(n=>n.length>0)??[],a=this.standardFields.value,u=a.filters??[],g=[t.command,e,...i,`--backup-name=${a["backup-name"]}`,`--dbpath=${a.dbpath}`,`--backup-id=${a["backup-id"]}`,...u.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
|
-
`)??""})}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 u;u=$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,u,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,Ae,1,0,"spk-progress-bar",12)(7,Te,38,11),o()),e&2&&(m(6),B(i.finishedLoading()?7:6))},dependencies:[Me,pe,se,me,de,fe,Ee,Se,Ne,_e,ce,Ce,ue,J,ne,ee,te,ie,oe,Q],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};
|
package/main-JBXUJPKQ.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as ye,c as be}from"./chunk-T7QZL5YJ.js";import{a as L}from"./chunk-2CXHZS6X.js";import{a as ue}from"./chunk-6EWRKJSC.js";import{a as I}from"./chunk-XHPURHO2.js";import"./chunk-7V4TPS4B.js";import"./chunk-T5WAKBP3.js";import"./chunk-LUKUBN2Z.js";import{a as x}from"./chunk-RHW5QVAY.js";import{a as me}from"./chunk-DLJSVAM2.js";import{a as v,b as de,c as E}from"./chunk-FSKPPAVO.js";import{a as C}from"./chunk-FQ55IACT.js";import{c as se,d as ie,g as ae,h as pe}from"./chunk-WRKRV6RQ.js";import{a as re}from"./chunk-DYTQQHMA.js";import{c as ce}from"./chunk-ESAGJOZZ.js";import{a as Z,b as ee,d as te,e as oe,f as ne,i as le}from"./chunk-N5FH4YAX.js";import{a as fe}from"./chunk-GQGMGFDX.js";import{pa as Q,ua as Y}from"./chunk-EBXJGPRA.js";import{a as ge}from"./chunk-OQPUBCLB.js";import{b as he}from"./chunk-QUOBR5MG.js";import{A as N,B as F,F as w,Fb as _,Gc as z,Hc as q,L as G,N as T,P as J,Rc as X,T as k,W as B,Z as s,f as W,gb as K,i as j,ka as $,n as D,o as U,r as R,va as d}from"./chunk-4KE2I7OA.js";import"./chunk-7CGTOI24.js";var M=class t{#o=s(C);#s=s(v);ngOnInit(){this.#s.fetchConfig(),this.#o.clearAllNotCurrentVersion()}static \u0275fac=function(o){return new(o||t)};static \u0275cmp=K({type:t,selectors:[["app-root"]],decls:1,vars:0,template:function(o,n){o&1&&_(0,"router-outlet")},dependencies:[se],encapsulation:2})};var ve={production:!0,baseUrl:"/api",machineServerUrl:"${WS_URL}",defaultTimeout:3e4};var h=new B("ENVIRONMENT");var A=class t{#o=s(le);isLoaded=d(!1);webmodules=d(null);preload(e=!1){let o=this.#o.getApiV1Webmodules().pipe(J(n=>this.webmodules.set(n)),w(()=>this.isLoaded.set(!0)));if(e)return o;o.subscribe()}static \u0275fac=function(o){return new(o||t)};static \u0275prov=k({token:t,factory:t.\u0275fac,providedIn:"root"})};var Ie=()=>{let t=s(E);return t.token()?!0:t.checkProxyAuthed().pipe(T(e=>e?D(!0):t.refreshToken().pipe(R(()=>!0))))},Me=()=>{let t=s(v),e=s(I),o=s($),n=t.relayIsEnabled()?"longpoll":"websocket",i=[o.get(L).preload(!0),o.get(L).preloadFilterGroups(!0),o.get(A).preload(!0)];return t.configLoaded===null?N(i).pipe(R(()=>n)):t.configLoaded?.pipe(T(()=>N(i)))},Se=[{path:"",children:[{path:"login",canActivate:[],loadComponent:()=>import("./chunk-ED7PHXLX.js")},{path:"logout",loadComponent:()=>import("./chunk-U4XTHU5I.js")},{path:"",canActivate:[Ie],children:[{path:"",canActivate:[Me],loadComponent:()=>import("./chunk-S5G6POQS.js"),children:[{path:"",loadComponent:()=>import("./chunk-Z2TE5POZ.js")},{path:"add-backup",loadComponent:()=>import("./chunk-TH7CWIA2.js")},{path:"backup/:id/export",loadComponent:()=>import("./chunk-KAFLAM3J.js")},{path:"backup/import",loadComponent:()=>import("./chunk-O7TLFEOP.js")},{path:"backup-draft/:id",loadComponent:()=>import("./chunk-BTZEFBCF.js"),loadChildren:()=>import("./chunk-OAWADV5X.js")},{path:"backup/:id",loadComponent:()=>import("./chunk-BTZEFBCF.js"),loadChildren:()=>import("./chunk-OAWADV5X.js")},{path:"backup/:id/log",loadComponent:()=>import("./chunk-RODUXVVT.js")},{path:"backup/:id/database",loadComponent:()=>import("./chunk-7733YRW4.js")},{path:"backup/:id/commandline",loadComponent:()=>import("./chunk-ZMLGDPCK.js")},{path:"backup/:id/commandline/:runId",loadComponent:()=>import("./chunk-65ZYAFPI.js")},{path:"backup/:id/delete",loadComponent:()=>import("./chunk-XATCN7MB.js")},{path:"restore",children:[{path:"",loadComponent:()=>import("./chunk-ONV552SH.js")},{path:"from-config",loadComponent:()=>import("./chunk-PSVKQSIF.js")}]},{path:"restore-from-files",loadComponent:()=>import("./chunk-25II37TZ.js"),loadChildren:()=>import("./chunk-VYAA7G37.js")},{path:"restore-draft/:id",loadComponent:()=>import("./chunk-25II37TZ.js"),loadChildren:()=>import("./chunk-VYAA7G37.js")},{path:"restore/:id",loadComponent:()=>import("./chunk-25II37TZ.js"),loadChildren:()=>import("./chunk-VYAA7G37.js")},{path:"settings",loadComponent:()=>import("./chunk-J52HAQJB.js")},{path:"about",loadComponent:()=>import("./chunk-EPDVUHOD.js"),children:[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",loadComponent:()=>import("./chunk-SIHNMW2E.js")},{path:"changelog",loadComponent:()=>import("./chunk-IVGY6D4N.js")},{path:"libraries",loadComponent:()=>import("./chunk-4DR45FFH.js")},{path:"system-info",loadComponent:()=>import("./chunk-URJQR7VG.js")},{path:"server-settings",loadComponent:()=>import("./chunk-BLKMQJR5.js")},{path:"logs",loadChildren:()=>import("./chunk-YUZKJZ22.js")},{path:"crashlogs",loadComponent:()=>import("./chunk-TCEYGZ6D.js")}]}]}]}]}];var P=null,Re=(t,e)=>{let o=s(E),n=s(ie),i=s(C),l=s(h),r=i.getItem("locale"),u=s(ce),a=ye(r),p=t.url==="/api/v1/auth/login",m=t.url==="/api/v1/auth/refresh",S=t.url==="/api/v1/progressstate",g=t.url==="/api/v1/remoteoperation/test",y=t.url.startsWith("/api/v2/"),b=o.token(),H=t,V=t.headers.has("custom-proxy-check")||b===de;if(b&&t.url.startsWith(l.baseUrl)&&!V){let c=t.headers.set("Authorization",`Bearer ${b}`);r&&r!=="en-US"&&(c=c.set("X-Ui-Language",a)),H=t.clone({headers:c})}return e(H).pipe(R(c=>{if(c.type===4&&c.status===200&&y){let f=c.body;if(f?.Success===!1)throw{status:200,message:f?.Error??"Unknown error",error:{Error:f?.Error??"Unknown error"},body:f}}return c}),F(c=>{let f=c.error?.Error||`Error Code: ${c.status}, Message: ${c.message}`;return!V&&(S&&c.status===404||g||u.error(f),m&&c.status===401&&(o.logout(),n.navigate(["/logout"])),!p&&!m&&c.status===401)?(P??=o.refreshToken().pipe(G()),P.pipe(T(()=>e(t.clone({headers:t.headers.set("Authorization",`Bearer ${o.token()}`)}))),w(()=>P=null))):U(()=>({error:c,message:f}))}))};var Ae="1.0.0",Te=`portal-proxy-client-${x()}`,Oe=1,O=class t{#o=1e3;#s=s(h);#t=d("disconnected");#l=d(this.#o);#i=d(!1);#n=d(!1);#a=d(null);isConnectedToMachineServer=this.#n.asReadonly();wsState=this.#t.asReadonly();#p=[];#r={};#e=null;#m=new TextDecoder("utf-8");#c=null;#d=X(()=>{let e=this.#i(),o=this.#l(),n=this.#a();if(!n||!e||!o||o<this.#o){this.#c&&window.clearInterval(this.#c);return}this.#c=window.setInterval(()=>{this.connectToMachineServer(n)},o)});utf8Atob(e){let o=Uint8Array.from(atob(e),i=>i.charCodeAt(0)),n=this.#m.decode(o);return n?JSON.parse(n):null}connectToMachineServer(e,o){let n=o?.reconnect??!1,i=this.wsState();(i==="disconnected"||i==="error"||n)&&(this.#e?.close(),this.#e=null),!this.#e&&(this.#e=new WebSocket(this.#s.machineServerUrl),this.#t.set("connecting"),this.#e.onopen=()=>{this.#t.set("connect"),this.#n.set(!0),this.#i.set(!1),this.#a.set(null)},this.#e.onclose=()=>{this.#t.set("disconnected"),this.#n.set(!1),this.#a.set(e),this.#i.set(!0)},this.#e.onerror=()=>{this.#t.set("error")},this.#e.onmessage=l=>{let r=JSON.parse(l.data);if(this.wsState()==="connect"){if(r.type!=="welcome"){this.disconnectFromMachineServer(`Unexpected message type, expected 'welcome' but got '${r.type}'`);return}let a={token:e,publicKey:"",clientVersion:Ae,protocolVersion:Oe},p=this.createResponse(r,"authportal",a);this.#t.set("welcome"),this.#e?.send(p)}else if(this.wsState()==="welcome"){if(r.type!=="authportal"){this.disconnectFromMachineServer(`Unexpected message type, expected 'authportal' but got '${r.type}'`);return}var u=JSON.parse(r.payload??"");if(u.accepted===!1){this.disconnectFromMachineServer("Authentication failed");return}for(this.#t.set("authenticated"),this.#n.set(!0);this.#p.length>0;){let a=this.#p.pop();a&&this.#r[a.messageId]&&this.activateCommand(a)}}else if(this.wsState()==="authenticated"){if(r.type!=="command"){console.warn(`Unexpected message type, expected 'command' but got '${r.type}'`);return}let a=this.#r[r.messageId];if(a){if(r.errorMessage){a.reject(r.errorMessage);return}else{let p=JSON.parse(r.payload??"");p.body=p?.body==null?null:this.utf8Atob(p.body),a.resolve(p)}delete this.#r[r.messageId],window.clearTimeout(a.timer)}}})}disconnectFromMachineServer(e=null){e&&console.error(e),this.#e?.close(),this.#e=null,this.#t.set("disconnected"),this.#n.set(!1)}createResponse(e,o,n){let i={from:Te,to:e.from,type:o,messageId:e.messageId,payload:JSON.stringify(n)};return JSON.stringify(i)}sendCommand(e,o,n,i,l,r,u=5e3){return(this.wsState()==="disconnected"||this.wsState()==="error")&&this.connectToMachineServer(e),new Promise((a,p)=>{let m=x(),g={from:Te,to:o,type:"command",messageId:m,payload:JSON.stringify({method:n,path:i,body:l,headers:r})},y={resolve:a,reject:p,timer:window.setTimeout(()=>{let b=this.#r[m];b&&(delete this.#r[m],b.reject("Timeout"))},u)};this.#r[m]=y,this.#n()?this.activateCommand(g):this.#p.push(g)})}activateCommand(e){this.#e?.send(JSON.stringify(e))}static \u0275fac=function(o){return new(o||t)};static \u0275prov=k({token:t,factory:t.\u0275fac,providedIn:"root"})};function Ne(t){if(typeof t!="string")return null;let o=new TextEncoder().encode(t);return window.btoa(String.fromCharCode(...o))}function we(t,e,o){let n=t.relayconfigState.config();if(n===null)return o(e);let i=Ne(e.body),l={};e.headers.keys().forEach(p=>{l[p]=e.headers.get(p)??""});let r=e.headers.get("timeout"),u=r!==null?parseInt(r):t.defaultTimeout;e.url.startsWith("/api/v1/serverstate")&&e.url.includes("longpoll=true")&&(u=1e3*99);let a=t.relayWebsocket.sendCommand(n.accessToken,n.clientId,e.method,e.url,i,l,u);return new W(p=>{a.then(m=>{let S=new Z;l!=null&&Object.keys(l).forEach(y=>{S.set(y,l[y])});let g=new ee({body:m.body,status:m.code,statusText:"OK",headers:S});p.next(g),p.complete()})})}var ke=(t,e)=>{let o={relayconfigState:s(v),defaultTimeout:s(h).defaultTimeout,relayWebsocket:s(O)},n=o.relayconfigState.config();if(o.relayconfigState.configLoaded!==null&&n===null){let i=new j;return o.relayconfigState.configLoaded.subscribe(l=>{l&&we(o,t,e).subscribe(i)}),i}return we(o,t,e)};var Ee={providers:[z(),ae(Se,pe()),te(ne(),oe([ke,Re])),C,{provide:h,useValue:ve},{provide:q,useValue:be()},ue,I,he,Y,me,Q,fe,ge]};re(M,Ee);
|