@duplicati/ngclient 0.0.134 → 0.0.136

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (133) hide show
  1. package/assets/spk.woff2 +0 -0
  2. package/{chunk-FC45TEB6.js → chunk-2BX65XJQ.js} +1 -1
  3. package/{chunk-5MMV45NA.js → chunk-2G6TVFPZ.js} +1 -1
  4. package/chunk-2W6BEUGU.js +1 -0
  5. package/{chunk-U44OBOIE.js → chunk-32366MQR.js} +1 -1
  6. package/chunk-3B3CD5KI.js +1 -0
  7. package/{chunk-D3OE4S5N.js → chunk-42LUYQ5S.js} +1 -1
  8. package/{chunk-EQS67O4J.js → chunk-43A44MVC.js} +1 -1
  9. package/chunk-4NAIBN6Y.js +1 -0
  10. package/chunk-4WF2SEOM.js +1 -0
  11. package/chunk-6ABAW3RM.js +1 -0
  12. package/chunk-6JDDO2JR.js +1 -0
  13. package/chunk-6JQM2X3B.js +1 -0
  14. package/chunk-6NTCVCCY.js +1 -0
  15. package/{chunk-Y7OD7PZG.js → chunk-7HKUM56D.js} +1 -1
  16. package/{chunk-HMK6M2N7.js → chunk-7MV7VPDB.js} +1 -1
  17. package/chunk-7N3LIJV6.js +1 -0
  18. package/{chunk-EW3XN62R.js → chunk-AFLQOHXV.js} +1 -1
  19. package/{chunk-5RPDEEQ3.js → chunk-B26UYXA3.js} +1 -1
  20. package/{chunk-ZUXVEXBA.js → chunk-B5ABLFSQ.js} +1 -1
  21. package/{chunk-ZIJ7ZEHR.js → chunk-BCHZRC5K.js} +1 -1
  22. package/chunk-BTMXQPBB.js +7 -0
  23. package/chunk-CWLTHXVS.js +1 -0
  24. package/chunk-D7KAEUGB.js +1 -0
  25. package/{chunk-O4HSW7GI.js → chunk-DBD6FOQL.js} +1 -1
  26. package/{chunk-XD6MBGQY.js → chunk-DNJOKPEL.js} +1 -1
  27. package/{chunk-5CUMYXCI.js → chunk-EKP3ML6M.js} +1 -1
  28. package/{chunk-IVP5ZHDB.js → chunk-ELFZD53L.js} +1 -1
  29. package/chunk-FCCV5HAI.js +6 -0
  30. package/chunk-FHZLYBIT.js +1 -0
  31. package/chunk-FUEIZLWH.js +1 -0
  32. package/{chunk-B6DE3TTE.js → chunk-FUZLIOUQ.js} +1 -1
  33. package/{chunk-OQHMS5HM.js → chunk-FZG6OXT3.js} +1 -1
  34. package/{chunk-PSPK4OPB.js → chunk-HDV3QKLN.js} +1 -1
  35. package/chunk-HLYFP2CB.js +1 -0
  36. package/chunk-HU5PJ35D.js +1 -0
  37. package/chunk-IQHBPLHL.js +1 -0
  38. package/{chunk-VVJBMGZR.js → chunk-J6SAG7QN.js} +1 -1
  39. package/chunk-JFOXV66M.js +1 -0
  40. package/chunk-JM7VAPIC.js +1 -0
  41. package/{chunk-BKHSNMGE.js → chunk-JOUBVX7V.js} +1 -1
  42. package/chunk-K6ISVHYD.js +1 -0
  43. package/{chunk-PL2MNRTA.js → chunk-L5Y36SCW.js} +1 -1
  44. package/chunk-LDIHJZUP.js +1 -0
  45. package/chunk-LDIZ5E5Z.js +1 -0
  46. package/chunk-LFMC622O.js +1 -0
  47. package/{chunk-JDCGGJ7O.js → chunk-LKJ2SBQA.js} +1 -1
  48. package/chunk-M3URTEVE.js +2 -0
  49. package/chunk-MQTQESMQ.js +1 -0
  50. package/chunk-MVUGI7Y7.js +1 -0
  51. package/chunk-NSIELNIY.js +1 -0
  52. package/chunk-OHMTS3T7.js +1 -0
  53. package/chunk-P3AZ3DXZ.js +1 -0
  54. package/chunk-P4KFR7NY.js +1 -0
  55. package/chunk-P4KOC4NP.js +1 -0
  56. package/{chunk-TTFJPAWM.js → chunk-POGTGPHE.js} +1 -1
  57. package/chunk-PVLT4ZGI.js +1 -0
  58. package/{chunk-MDO4PWV6.js → chunk-QBJGIKPM.js} +1 -1
  59. package/chunk-QECYPB3W.js +1 -0
  60. package/{chunk-CRALFIWB.js → chunk-QVEGV6V6.js} +1 -1
  61. package/{chunk-NZD6UMYZ.js → chunk-ROOTIQEO.js} +1 -1
  62. package/{chunk-WBYTRHI7.js → chunk-SLJD5T2G.js} +1 -1
  63. package/chunk-SMQWGV7N.js +1 -0
  64. package/chunk-T5KDR4TA.js +1 -0
  65. package/{chunk-4VPA3END.js → chunk-UFP4XKZF.js} +1 -1
  66. package/{chunk-XZWXLEK2.js → chunk-UFQWL2QF.js} +1 -1
  67. package/{chunk-PEPDXQBY.js → chunk-VPTK3JCV.js} +1 -1
  68. package/{chunk-UZTRBMWL.js → chunk-VRE6C66C.js} +1 -1
  69. package/{chunk-QNWYJ7OR.js → chunk-WF6EAWTW.js} +1 -1
  70. package/{chunk-J64ETWKB.js → chunk-WRWIBPXL.js} +1 -1
  71. package/{chunk-3Q5JEF3K.js → chunk-WXARH2SG.js} +1 -1
  72. package/chunk-WXAZWUCA.js +1 -0
  73. package/chunk-X3RII7G2.js +1 -0
  74. package/{chunk-L6BZ6TEU.js → chunk-X7SFNRJF.js} +1 -1
  75. package/{chunk-TIPHYMRQ.js → chunk-XBJRRUMO.js} +1 -1
  76. package/chunk-XIIFTZ5G.js +1 -0
  77. package/{chunk-CFESUDFC.js → chunk-XLKQSWFD.js} +1 -1
  78. package/chunk-Y5IRBMLB.js +1 -0
  79. package/chunk-Y5UKX3VC.js +1 -0
  80. package/chunk-YZYJP5XH.js +1 -0
  81. package/{chunk-VG6LA5R3.js → chunk-ZFCSCXTC.js} +1 -1
  82. package/chunk-ZFONU33Q.js +1 -0
  83. package/index.html +2 -2
  84. package/locale/messages.de.json +1 -1
  85. package/locale/messages.it.json +2 -2
  86. package/locale/messages.nl_NL.json +2 -2
  87. package/{main-RQTAFLAT.js → main-HYB6MFRZ.js} +1 -1
  88. package/package.json +1 -1
  89. package/styles-IH5IS4WG.css +1 -0
  90. package/chunk-3UUTPGTW.js +0 -1
  91. package/chunk-4WUC2NLU.js +0 -1
  92. package/chunk-5XSYLFRW.js +0 -1
  93. package/chunk-62DY5NTG.js +0 -1
  94. package/chunk-67XQIEG5.js +0 -1
  95. package/chunk-67YRCRMI.js +0 -7
  96. package/chunk-6HFJTYBK.js +0 -1
  97. package/chunk-7J7GUBLS.js +0 -1
  98. package/chunk-BC3MLJH3.js +0 -1
  99. package/chunk-BHSG643V.js +0 -1
  100. package/chunk-BSRYIN2F.js +0 -1
  101. package/chunk-DE64A2ZS.js +0 -1
  102. package/chunk-DNBOZ26J.js +0 -1
  103. package/chunk-DQM3ATT4.js +0 -1
  104. package/chunk-EVINCUTE.js +0 -1
  105. package/chunk-EWZGGCZ7.js +0 -1
  106. package/chunk-FATQ7BT6.js +0 -1
  107. package/chunk-FZTQVXG4.js +0 -1
  108. package/chunk-G6LCHQJE.js +0 -1
  109. package/chunk-GORQL5YP.js +0 -1
  110. package/chunk-GP2W7XZF.js +0 -1
  111. package/chunk-HD37ILAE.js +0 -6
  112. package/chunk-HE5L47WR.js +0 -1
  113. package/chunk-HJQBTK5I.js +0 -1
  114. package/chunk-HLBBIEIQ.js +0 -1
  115. package/chunk-HWUEL5ZO.js +0 -1
  116. package/chunk-IDAED3OA.js +0 -1
  117. package/chunk-IPC6G72N.js +0 -1
  118. package/chunk-JHVU3HSL.js +0 -1
  119. package/chunk-O3JEFNCL.js +0 -1
  120. package/chunk-OHEFY2D6.js +0 -1
  121. package/chunk-OTM4ZTG4.js +0 -1
  122. package/chunk-SAISKISU.js +0 -1
  123. package/chunk-SMNWIGMY.js +0 -1
  124. package/chunk-SSMDFXE3.js +0 -1
  125. package/chunk-UWF5JLY2.js +0 -1
  126. package/chunk-V6WRFB7W.js +0 -1
  127. package/chunk-VFVXE2DC.js +0 -1
  128. package/chunk-WESN3ZUC.js +0 -1
  129. package/chunk-Y4IRFRVB.js +0 -1
  130. package/chunk-YW7YXFSC.js +0 -1
  131. package/chunk-ZCT7SRIM.js +0 -1
  132. package/chunk-ZQYPQTU3.js +0 -2
  133. package/styles-4QA7NM7N.css +0 -1
@@ -0,0 +1,6 @@
1
+ import{a as et}from"./chunk-X7SFNRJF.js";import{a as Je,b as Ye}from"./chunk-2G6TVFPZ.js";import{a as J,b as je,c as We}from"./chunk-ZFONU33Q.js";import{h as Ze}from"./chunk-FUEIZLWH.js";import{a as Qe}from"./chunk-XIIFTZ5G.js";import{a as P}from"./chunk-2BX65XJQ.js";import{a as B}from"./chunk-6JQM2X3B.js";import{a as Xe,c as ce,e as de,i as pe,k as He,s as me,t as qe}from"./chunk-NSIELNIY.js";import{A as Ke,C as ze,a as se,e as Le,g as _e,l as Pe,o as be,p as Ge,t as Re,z as Be}from"./chunk-Y5IRBMLB.js";import{h as Ue}from"./chunk-DNJOKPEL.js";import{ea as $e}from"./chunk-CWLTHXVS.js";import{$b as G,Ab as q,Ac as Q,Bb as ge,Cb as Te,Db as ie,Eb as D,Hc as L,Ic as R,Kb as j,Lb as W,Nb as Ee,Nc as Z,Ob as Ne,Pb as De,Qa as l,Qb as E,Qc as ve,Rb as s,Sb as he,Tb as Ie,U as te,Vb as ye,Wb as we,Xb as Ae,Z as k,ab as ne,bc as oe,da as T,ea as S,ec as p,f as ee,fb as v,gc as O,ha as Fe,hc as ae,jc as Oe,kc as ke,lc as Ve,mc as $,na as b,nc as w,oc as d,rc as Me,sb as C,tb as f,tc as re,ub as U,vb as X,vc as le,wb as H,xb as m,yb as _,zb as c}from"./chunk-BTMXQPBB.js";import{a as y}from"./chunk-EUDKD2JW.js";var tt=class n{#t=k(Ue);#e=k(Le);#n=k(B);testDestination(t,e,o,i){return this.#n.hasV2TestOperations()?this.testDestinationv2(t,e,o,i):this.testDestinationv1(t,e,o,i)}testDestinationv2(t,e,o,i){return new ee(a=>{this.#t.postApiV2DestinationTest({requestBody:{DestinationUrl:t,AutoCreate:!1,Options:null}}).subscribe({next:r=>{if(r.Success){this.emitSuccessV2(a,t,e,r);return}this.handleGenericError(a,t,e,r.Error??"Unknown error",i)},error:r=>{let u=r?.error?.body;if(u?.Data?.FolderExists===!1||u?.StatusCode==="missing-folder"){o?this.handleMissingFolder(a,t,e):this.handleGenericError(a,t,e,$localize`The remote destination folder does not exist.`,i);return}if(u?.Data?.HostCertificate){this.handleMissingCertificate(a,t,e,u.Data?.HostCertificate);return}if(u?.Data?.ReportedHostKey){this.handleIncorrectKey(a,t,e,u.Data.ReportedHostKey,u.Data.AcceptedHostKey??null);return}this.handleGenericError(a,t,e,r?.message??"Unknown error",i)}})})}testDestinationv1(t,e,o,i){return new ee(a=>{this.#t.postApiV1RemoteoperationTest({requestBody:{path:t}}).subscribe({next:r=>{a.next({action:"success",targetUrl:t,testAgain:!1,destinationIndex:e}),a.complete()},error:r=>{this.handleDestinationErrorv1(r.message,t,e,o,i).subscribe(u=>{a.next(u)})}})})}handleMissingFolder(t,e,o){this.#e.open(P,{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.#n.hasV2TestOperations()?this.#t.postApiV2DestinationTest({requestBody:{DestinationUrl:e,AutoCreate:!0,Options:null}}).subscribe({next:a=>{if(a.Success){this.emitSuccessV2(t,e,o,a);return}else this.handleFolderCreateFailure(t,e,o,a.Error??$localize`Unknown error`)},error:a=>{this.handleFolderCreateFailure(t,e,o,a.message??$localize`Unknown error`)}}):this.#t.postApiV1RemoteoperationCreate({requestBody:{path:e}}).subscribe({next:()=>{this.handleFolderCreated(t,e,o)},error:a=>{this.handleFolderCreateFailure(t,e,o,a.message??$localize`Unknown error`)}}))}})}handleFolderCreateFailure(t,e,o,i){this.#e.open(P,{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:o}),t.complete()}})}emitSuccessV2(t,e,o,i){t.next({action:"success",targetUrl:e,testAgain:!1,destinationIndex:o,anyFilesFound:!i.Data?.FolderIsEmpty,containsBackup:i.Data?.FolderContainsBackupFiles??void 0,containsEncryptedBackupFiles:i.Data?.FolderContainsEncryptedBackupFiles??void 0}),t.complete()}handleFolderCreated(t,e,o){this.#e.open(P,{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:o}),t.complete()}})}reportNoAction(t,e,o){t.next({action:"generic-error",targetUrl:e,testAgain:!1,destinationIndex:o}),t.complete()}handleMissingCertificate(t,e,o,i){this.#e.open(P,{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,o);return}t.next({action:"trust-cert",targetUrl:e,testAgain:!0,certData:i,destinationIndex:o}),t.complete()}})}handleIncorrectKey(t,e,o,i,a){a?this.#e.open(P,{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:r=>{if(!r){this.reportNoAction(t,e,o);return}t.next({action:"approve-host-key",targetUrl:e,testAgain:!0,reportedHostKey:i,destinationIndex:o}),t.complete()}}):this.#e.open(P,{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:r=>{if(!r){this.reportNoAction(t,e,o);return}t.next({action:"approve-host-key",targetUrl:e,testAgain:!0,reportedHostKey:i,destinationIndex:o}),t.complete()}})}handleGenericError(t,e,o,i,a){function r(){t.next({action:"generic-error",targetUrl:e,testAgain:!1,destinationIndex:o,errorMessage:i}),t.complete()}if(a){r();return}this.#e.open(P,{maxWidth:"500px",data:{title:$localize`Test connection failed`,message:i,cancelText:$localize`OK`},closed:u=>r()})}handleDestinationErrorv1(t,e,o,i,a){return new ee(r=>{if(t==="missing-folder"){i?this.handleMissingFolder(r,e,o):this.handleGenericError(r,e,o,$localize`The remote destination folder does not exist.`,a);return}if(t.startsWith("incorrect-cert:")){let u=t.split("incorrect-cert:")[1];this.handleMissingCertificate(r,e,o,u);return}if(t.startsWith("incorrect-host-key:")){let u=t.split('incorrect-host-key:"')[1].split('",')[0],F=t.split('accepted-host-key:"')[1].split('",')[0];this.handleIncorrectKey(r,e,o,u,F);return}this.handleGenericError(r,e,o,t,a)})}static \u0275fac=function(e){return new(e||n)};static \u0275prov=te({token:n,factory:n.\u0275fac,providedIn:"root"})};var ue=class n{#t=k(B);supportedDestinationTypes=L(()=>this.#t.backendModules().map(t=>t.Key).filter(t=>t).map(t=>J(t)));destinationTypeOptions=L(()=>this.supportedDestinationTypes().map(t=>({key:t.customKey??t.key,customKey:t.customKey??null,displayName:t.displayName,description:t.description})));backendModules=L(()=>this.#t.backendModules()??[]);static \u0275fac=function(e){return new(e||n)};static \u0275prov=te({token:n,factory:n.\u0275fac,providedIn:"root"})};var at=["fileInput"],rt=[[["label"]]],lt=["label"],Ce=class n{customId=Z();content=b("");readonly=b(!1);placeholder=Z("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=R(()=>{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||n)};static \u0275cmp=ne({type:n,selectors:[["app-file-drop-textarea"]],viewQuery:function(e,o){if(e&1&&ye(at,5),e&2){let i;we(i=Ae())&&(o.fileInputRef=i.first)}},inputs:{customId:[1,"customId"],placeholder:[1,"placeholder"]},features:[Me([{provide:Xe,useExisting:n,multi:!0}])],ngContentSelectors:lt,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,o){if(e&1){let i=D();he(rt),Ie(0,0,["ngProjectAs","label",5,["label"]]),_(1,"div",2)(2,"button",3),E("click",function(){return T(i),S(o.triggerBrowse())}),j(3,1),q(4,"spk-icon"),W(),c()(),_(5,"div",4),E("drop",function(r){return T(i),S(o.onFileDrop(r))})("dragover",function(r){return T(i),S(o.onDragOver(r))}),_(6,"textarea",5),Ve("ngModelChange",function(r){return T(i),ke(o.content,r)||(o.content=r),S(r)}),c()(),_(7,"input",6,0),E("change",function(r){return T(i),S(o.onFileSelected(r))}),c()}e&2&&(l(6),m("placeholder",o.placeholder()),Oe("ngModel",o.content),m("disabled",o.readonly()))},dependencies:[me,ce,de,pe,se,_e],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 st=(n,t,e,o)=>({index:n,fieldGroup:"custom",formView:t,destinationType:e,oauthField:o}),xe=n=>({$implicit:n}),_t=(n,t,e,o)=>({index:n,fieldGroup:"dynamic",formView:t,destinationType:e,oauthField:o}),ct=(n,t,e,o)=>({index:n,formView:t,fieldGroup:"advanced",destinationType:e,oauthField:o});function dt(n,t){n&1&&ie(0)}function pt(n,t){if(n&1&&v(0,dt,1,0,"ng-container",12),n&2){let e=t.$implicit,o=t.$index;s();let i=G(17);s();let a=d(0),r=d(1);m("ngTemplateOutlet",i)("ngTemplateOutletContext",re(7,xe,le(2,st,o,e,a,r.oauthField)))}}function mt(n,t){n&1&&ie(0)}function ut(n,t){if(n&1&&v(0,mt,1,0,"ng-container",12),n&2){let e=t.$implicit,o=t.$index;s();let i=G(17);s();let a=d(0),r=d(1);m("ngTemplateOutlet",i)("ngTemplateOutletContext",re(7,xe,le(2,_t,o,e,a,r.oauthField)))}}function Ct(n,t){if(n&1){let e=D();j(0,5,1),_(1,"button",13,1),E("click",function(){let i=T(e).$implicit,a=s(2);return S(a.addAdvancedOption(i))}),c(),W()}if(n&2){let e=t.$implicit;l(),Ee(e.name),Ne(0)}}function ft(n,t){n&1&&ie(0)}function gt(n,t){if(n&1&&v(0,ft,1,0,"ng-container",12),n&2){let e=t.$implicit,o=t.$index;s();let i=G(17),a=s(),r=d(0),u=d(1),F=a.getFormView("advanced",e)??a.getDefaultFormView(e);m("ngTemplateOutlet",i)("ngTemplateOutletContext",re(7,xe,le(2,ct,o,F,r,u.oauthField)))}}function Tt(n,t){n&1&&(_(0,"sup",22),p(1,"*"),c())}function St(n,t){if(n&1&&(_(0,"spk-icon",23),p(1,"question"),c()),n&2){let e=s(2).$implicit;m("spkTooltip",e.formView.longDescription)}}function xt(n,t){if(n&1){let e=D();_(0,"app-file-tree",15)(1,"label",21),C(2,Tt,2,0,"sup",22),p(3),C(4,St,2,1,"spk-icon",23),c(),_(5,"input",24),E("ngModelChange",function(i){T(e);let a=s().$implicit,r=s(2);return S(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),c()()}if(n&2){let e=s().$implicit,o=d(1),i=d(2),a=d(3),r=d(4),u=d(5);m("startingPath",a)("accepts",e.formView.accepts)("showFiles",!0)("hideShortcuts",!0)("showHiddenNodes",!0)("selectFiles",!0),l(),m("for",u),l(),f(e.formView.isMandatory&&r?2:-1),l(),O(" ",o," "),l(),f(e.formView.longDescription?4:-1),l(),m("id",u)("ngModel",i)}}function Ft(n,t){n&1&&(_(0,"sup",25),p(1,"*"),c())}function Et(n,t){if(n&1&&(_(0,"spk-icon",23),p(1,"question"),c()),n&2){let e=s(2).$implicit;m("spkTooltip",e.formView.longDescription)}}function Nt(n,t){if(n&1){let e=D();_(0,"app-file-tree",16)(1,"label",21),C(2,Ft,2,0,"sup",25),p(3),C(4,Et,2,1,"spk-icon",23),c(),_(5,"input",24),E("ngModelChange",function(i){T(e);let a=s().$implicit,r=s(2);return S(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),c()()}if(n&2){let e=s().$implicit,o=d(1),i=d(2),a=d(3),r=d(4),u=d(5);m("hideShortcuts",!0)("startingPath",a),l(),m("for",u),l(),f(e.formView.isMandatory&&r?2:-1),l(),O(" ",o," "),l(),f(e.formView.longDescription?4:-1),l(),m("id",u)("ngModel",i)}}function Dt(n,t){n&1&&(_(0,"sup",26),p(1,"*"),c())}function ht(n,t){if(n&1&&(_(0,"spk-icon",23),p(1,"question"),c()),n&2){let e=s(2).$implicit;m("spkTooltip",e.formView.longDescription)}}function It(n,t){n&1&&(_(0,"spk-icon",27),p(1," warning "),c())}function yt(n,t){n&1&&(_(0,"spk-icon",28),p(1,"x-circle"),c())}function wt(n,t){n&1&&(_(0,"spk-icon",29),p(1,"warning"),c())}function At(n,t){if(n&1&&(_(0,"spk-icon",33),p(1," link "),c()),n&2){s();let e=d(9),o=d(10);oe("error",e&&o==="error")("warn",e&&o==="warning"),m("spkTooltip",e)}}function Ot(n,t){n&1&&(_(0,"spk-icon",32),p(1,"envelope"),c())}function kt(n,t){n&1&&(_(0,"spk-icon",32),p(1,"hard-drives"),c())}function Vt(n,t){n&1&&(_(0,"spk-icon",32),p(1,"jar"),c())}function Mt(n,t){n&1&&(_(0,"spk-icon",32),p(1,"textbox"),c())}function vt(n,t){if(n&1){let e=D();_(0,"spk-form-field")(1,"label",21),C(2,Dt,2,0,"sup",26),p(3),C(4,ht,2,1,"spk-icon",23),C(5,It,2,0,"spk-icon",27),C(6,yt,2,0,"spk-icon",28),C(7,wt,2,0,"spk-icon",29),c(),_(8,"input",30),E("keydown",function(i){T(e);let a=s().$implicit,r=s(2);return S(r.onKeyDown(a.fieldGroup,a.formView.name,a.formView.type,i))})("ngModelChange",function(i){T(e);let a=s().$implicit,r=s(2);return S(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),c(),$(9)(10),C(11,At,2,5,"spk-icon",31)(12,Ot,2,0,"spk-icon",32)(13,kt,2,0,"spk-icon",32)(14,Vt,2,0,"spk-icon",32)(15,Mt,2,0,"spk-icon",32),c()}if(n&2){let e=s().$implicit,o=d(1),i=d(2),a=d(3),r=d(4),u=d(5),F=s(2);l(),m("for",u),l(),f(e.formView.isMandatory&&r?2:-1),l(),O(" ",o," "),l(),f(e.formView.longDescription?4:-1),l(),f(r&&e.formView.type==="Path"?5:-1),l(),f(e.formView.type=="Hostname"&&!r&&!F.isValidHostname(a)?6:-1),l(),f(e.formView.type=="Bucketname"&&!r&&!F.isValidBucketname(a)?7:-1),l(),m("type",e.formView.type==="Email"?"email":"text")("id",u)("ngModel",i);let M=a,I=F.hasLeadingSlash(M??"");l(),w(I&&(e.formView.doubleSlash==null?null:e.formView.doubleSlash.message)),l(),w(e.formView.doubleSlash==null?null:e.formView.doubleSlash.type),l(),f(e.formView.type==="Path"?11:e.formView.type==="Email"?12:e.formView.type==="Hostname"?13:e.formView.type==="Bucketname"?14:15)}}function $t(n,t){n&1&&(_(0,"sup",34),p(1,"*"),c())}function Lt(n,t){if(n&1&&(_(0,"spk-icon",23),p(1,"question"),c()),n&2){let e=s(2).$implicit;m("spkTooltip",e.formView.longDescription)}}function Pt(n,t){if(n&1){let e=D();_(0,"span",38),E("click",function(){T(e);let i=s(2).$implicit,a=s(2);return S(a.oauthStartTokenCreation(i.destinationType,i.fieldGroup,i.formView.name,i.formView.oauthVersion))}),p(1," AuthID "),c()}}function bt(n,t){n&1&&(_(0,"spk-icon",32),p(1,"password"),c())}function Gt(n,t){if(n&1){let e=D();_(0,"spk-icon",39),E("click",function(){T(e);let i=s(2).$implicit;return S(i.formView.showPassword=!i.formView.showPassword)}),p(1," eye "),c()}}function Rt(n,t){if(n&1){let e=D();_(0,"spk-icon",39),E("click",function(){T(e);let i=s(2).$implicit;return S(i.formView.showPassword=!i.formView.showPassword)}),p(1," eye-slash "),c()}}function Bt(n,t){if(n&1){let e=D();_(0,"spk-form-field")(1,"label",21),C(2,$t,2,0,"sup",34),p(3),C(4,Lt,2,1,"spk-icon",23),c(),_(5,"input",35),E("ngModelChange",function(i){T(e);let a=s().$implicit,r=s(2);return S(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),c(),C(6,Pt,2,0,"span",36)(7,bt,2,0,"spk-icon",32),C(8,Gt,2,0,"spk-icon",37)(9,Rt,2,0,"spk-icon",37),c()}if(n&2){let e=s().$implicit,o=d(1),i=d(2),a=d(4),r=d(5);l(),m("for",r),l(),f(e.formView.isMandatory&&a?2:-1),l(),O(" ",o," "),l(),f(e.formView.longDescription?4:-1),l(),m("type",e.formView.showPassword?"text":"password")("id",r)("ngModel",i),l(),f(e.oauthField===e.formView.name?6:7),l(2),f(e.formView.showPassword?8:9)}}function Kt(n,t){n&1&&(_(0,"sup",41),p(1,"*"),c())}function zt(n,t){if(n&1&&(_(0,"spk-icon",23),p(1,"question"),c()),n&2){let e=s(3).$implicit;m("spkTooltip",e.formView.longDescription)}}function Ut(n,t){if(n&1&&p(0),n&2){let e=t.$implicit;ae(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ")}}function Xt(n,t){if(n&1){let e=D();_(0,"spk-select",40)(1,"label",21),C(2,Kt,2,0,"sup",41),p(3),C(4,zt,2,1,"spk-icon",23),c(),_(5,"input",24),E("ngModelChange",function(i){T(e);let a=s(2).$implicit,r=s(2);return S(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),c()(),v(6,Ut,1,2,"ng-template",null,2,Q)}if(n&2){let e=G(7);s();let o=d(0),i=s().$implicit,a=d(1),r=d(2),u=d(4),F=d(5);m("options",o)("isClearable",!1)("optionTemplate",e),l(),m("for",F),l(),f(i.formView.isMandatory&&u?2:-1),l(),O(" ",a," "),l(),f(i.formView.longDescription?4:-1),l(),m("id",F)("ngModel",r)}}function Ht(n,t){if(n&1&&($(0),C(1,Xt,8,9)),n&2){let e=s().$implicit,o=w(s(2).mapOptions(e.formView));l(),f(o?1:-1)}}function qt(n,t){n&1&&(_(0,"sup",44),p(1,"*"),c())}function jt(n,t){if(n&1&&(_(0,"spk-icon",23),p(1,"question"),c()),n&2){let e=s(3).$implicit;m("spkTooltip",e.formView.longDescription)}}function Wt(n,t){if(n&1&&p(0),n&2){let e=t.$implicit;ae(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ")}}function Qt(n,t){if(n&1){let e=D();_(0,"spk-select",43)(1,"label",21),C(2,qt,2,0,"sup",44),p(3),C(4,jt,2,1,"spk-icon",23),c(),_(5,"input",24),E("ngModelChange",function(i){T(e);let a=s(2).$implicit,r=s(2);return S(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),c()(),v(6,Wt,1,2,"ng-template",null,3,Q)}if(n&2){let e=G(7);s();let o=d(0),i=s().$implicit,a=d(1),r=d(2),u=d(4),F=d(5);m("options",o)("asFreeText",!0)("inlineSearch",!0)("optionTemplate",e),l(),m("for",F),l(),f(i.formView.isMandatory&&u?2:-1),l(),O(" ",a," "),l(),f(i.formView.longDescription?4:-1),l(),m("id",F)("ngModel",r)}}function Zt(n,t){n&1&&q(0,"spk-progress-bar",42)}function Jt(n,t){if(n&1&&($(0),C(1,Qt,8,10)(2,Zt,1,0,"spk-progress-bar",42)),n&2){let e=s().$implicit,o=w(s(2).mapOptions(e.formView));l(),f(o?1:2)}}function Yt(n,t){n&1&&(_(0,"sup",46),p(1,"*"),c())}function en(n,t){if(n&1&&(_(0,"spk-icon",23),p(1,"question"),c()),n&2){let e=s(2).$implicit;m("spkTooltip",e.formView.longDescription)}}function tn(n,t){if(n&1){let e=D();_(0,"app-size",45),E("ngModelChange",function(i){T(e);let a=s().$implicit,r=s(2);return S(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),_(1,"label",21),C(2,Yt,2,0,"sup",46),p(3),C(4,en,2,1,"spk-icon",23),c()()}if(n&2){let e=s().$implicit,o=d(1),i=d(2),a=d(4),r=d(5);m("inputType",e.Name)("ngModel",i)("customId",r),l(),m("for",r),l(),f(e.formView.isMandatory&&a?2:-1),l(),O(" ",o," "),l(),f(e.formView.longDescription?4:-1)}}function nn(n,t){n&1&&(_(0,"sup",47),p(1,"*"),c())}function on(n,t){if(n&1&&(_(0,"spk-icon",23),p(1,"question"),c()),n&2){let e=s(2).$implicit;m("spkTooltip",e.formView.longDescription)}}function an(n,t){if(n&1){let e=D();_(0,"spk-form-field")(1,"label",21),C(2,nn,2,0,"sup",47),p(3),C(4,on,2,1,"spk-icon",23),c(),_(5,"input",48),E("ngModelChange",function(i){T(e);let a=s().$implicit,r=s(2);return S(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),c(),_(6,"spk-icon",32),p(7,"numpad"),c()()}if(n&2){let e=s().$implicit,o=d(1),i=d(2),a=d(4),r=d(5);l(),m("for",r),l(),f(e.formView.isMandatory&&a?2:-1),l(),O(" ",o," "),l(),f(e.formView.longDescription?4:-1),l(),m("id",r)("ngModel",i)}}function rn(n,t){if(n&1&&(_(0,"spk-icon",23),p(1,"question"),c()),n&2){let e=s(2).$implicit;m("spkTooltip",e.formView.longDescription)}}function ln(n,t){if(n&1){let e=D();_(0,"spk-toggle",49),E("click",function(){T(e);let i=s().$implicit,a=d(2),r=s(2);return S(r.updateFieldValue(i.fieldGroup,i.formView.name,a==="true"?"false":"true"))}),_(1,"label",21),p(2),C(3,rn,2,1,"spk-icon",23),c()()}if(n&2){let e=s().$implicit,o=d(1),i=d(2),a=d(5);oe("active",i==="true"),l(),m("for",a),l(),O(" ",o," "),l(),f(e.formView.longDescription?3:-1)}}function sn(n,t){n&1&&(_(0,"sup",51),p(1,"*"),c())}function _n(n,t){if(n&1&&(_(0,"spk-icon",23),p(1,"question"),c()),n&2){let e=s(3).$implicit;m("spkTooltip",e.formView.longDescription)}}function cn(n,t){if(n&1&&p(0),n&2){let e=t.$implicit;ae(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ")}}function dn(n,t){if(n&1){let e=D();_(0,"spk-select",50)(1,"label",21),C(2,sn,2,0,"sup",51),p(3),C(4,_n,2,1,"spk-icon",23),c(),_(5,"input",52),E("ngModelChange",function(i){T(e);let a=s(2).$implicit,r=s(2);return S(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),c()(),v(6,cn,1,2,"ng-template",null,4,Q)}if(n&2){let e=G(7);s();let o=d(0),i=s().$implicit,a=d(1),r=d(2),u=d(4),F=d(5);m("options",o)("selectMultiple",!0)("optionTemplate",e),l(),m("for",F),l(),f(i.formView.isMandatory&&u?2:-1),l(),O(" ",a," "),l(),f(i.formView.longDescription?4:-1),l(),m("ngModel",r)}}function pn(n,t){if(n&1&&($(0),C(1,dn,8,8)),n&2){let e=s().$implicit,o=w(s(2).mapOptions(e.formView));l(),f(o?1:-1)}}function mn(n,t){n&1&&(_(0,"sup",53),p(1,"*"),c())}function un(n,t){if(n&1&&(_(0,"spk-icon",23),p(1,"question"),c()),n&2){let e=s(2).$implicit;m("spkTooltip",e.formView.longDescription)}}function Cn(n,t){if(n&1){let e=D();_(0,"app-timespan",45),E("ngModelChange",function(i){T(e);let a=s().$implicit,r=s(2);return S(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),_(1,"label",21),C(2,mn,2,0,"sup",53),p(3),C(4,un,2,1,"spk-icon",23),c()()}if(n&2){let e=s().$implicit,o=d(1),i=d(2),a=d(4),r=d(5);m("inputType",e.formView.name)("ngModel",i)("customId",r),l(),m("for",r),l(),f(e.formView.isMandatory&&a?2:-1),l(),O(" ",o," "),l(),f(e.formView.longDescription?4:-1)}}function fn(n,t){n&1&&(_(0,"sup",55),p(1,"*"),c())}function gn(n,t){if(n&1&&(_(0,"spk-icon",23),p(1,"question"),c()),n&2){let e=s(2).$implicit;m("spkTooltip",e.formView.longDescription)}}function Tn(n,t){if(n&1){let e=D();_(0,"app-file-drop-textarea",54),E("ngModelChange",function(i){T(e);let a=s().$implicit,r=s(2);return S(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),_(1,"label"),C(2,fn,2,0,"sup",55),p(3),C(4,gn,2,1,"spk-icon",23),c()()}if(n&2){let e=s().$implicit,o=d(2),i=d(4),a=d(5);m("ngModel",o)("customId",a)("placeholder",e.formView.longDescription),l(2),f(e.formView.isMandatory&&i?2:-1),l(),O(" ",e.formView.shortDescription??e.formView.name," "),l(),f(e.formView.longDescription?4:-1)}}function Sn(n,t){if(n&1){let e=D();_(0,"button",56),E("click",function(){T(e);let i=s().$implicit,a=s(2);return S(a.removeAdvancedOption(i.formView.name))}),_(1,"spk-icon"),p(2,"x-circle"),c()()}}function xn(n,t){if(n&1&&(_(0,"div",14),$(1)(2)(3)(4)(5),C(6,xt,6,12,"app-file-tree",15)(7,Nt,6,8,"app-file-tree",16)(8,vt,16,13,"spk-form-field")(9,Bt,10,9,"spk-form-field")(10,Ht,2,2)(11,Jt,3,2)(12,tn,5,7,"app-size",17)(13,an,8,6,"spk-form-field")(14,ln,4,5,"spk-toggle",18)(15,pn,2,2)(16,Cn,5,7,"app-timespan",17)(17,Tn,5,6,"app-file-drop-textarea",19),C(18,Sn,3,0,"button",20),c()),n&2){let e=t.$implicit;s();let o=d(0),i=s();oe("single-field",e.fieldGroup!=="advanced"),l(),w(e.formView.shortDescription??e.formView.name),l(),w(i.getFieldGroup(o,e.fieldGroup)[e.formView.name]),l();let a=w(i.getFieldValue(e.fieldGroup,e.formView.name));l(),w((a??"").toString().trim()===""),l(),w("destination-"+e.fieldGroup+"-"+e.index+"-"+(e.asHttpOptions?"http":"other")),l(),f(e.formView.type==="FileTree"?6:e.formView.type==="FolderTree"?7:e.formView.type==="String"||e.formView.type==="Path"||e.formView.type==="Email"||e.formView.type==="Hostname"||e.formView.type==="Bucketname"?8:e.formView.type==="Password"?9:e.formView.type==="Enumeration"?10:e.formView.type==="NonValidatedSelectableString"?11:e.formView.type==="Size"?12:e.formView.type==="Integer"?13:e.formView.type==="Boolean"?14:e.formView.type==="Flags"?15:e.formView.type==="Timespan"||e.formView.type==="DateTime"?16:e.formView.type==="FreeText"?17:-1),l(12),f(e.fieldGroup==="advanced"?18:-1)}}function Fn(n,t){if(n&1&&($(0),X(1,pt,1,9,"ng-container",null,U),X(3,ut,1,9,"ng-container",null,U),_(5,"spk-toggle-card",6),ge(6,7),j(7,5),_(8,"spk-menu",8)(9,"button",9),q(10,"spk-icon"),c(),ge(11,10),X(12,Ct,3,1,"button",11,U),Te(),c(),W(),Te(),X(14,gt,1,9,"ng-container",null,U),c(),v(16,xn,19,9,"ng-template",null,0,Q)),n&2){let e=s(),o=d(1);w(e.destinationForm()),l(),H(o.custom),l(2),H(o.dynamic),l(2),m("disallowToggle",!0);let i=e.nonSelectedAdvancedFormViews();l(3),m("searchable",!0),l(),m("disabled",i.length===0),l(3),H(i),l(2),H(e.advancedFormFieldNames())}}var nt=class n{#t=k(Ze);#e=k(B);#n=k(et);#a=k(ue);injector=k(Fe);targetUrl=ve.required();useBackupState=Z(!1);#i=null;destinationType=L(()=>{let t=this.targetUrl();if(!t)return null;let e=t.split("://")[0];return this.#i=e,e});destinationForm=b({custom:{},dynamic:{},advanced:{}});advancedFormFieldNames=L(()=>Object.keys(this.destinationForm().advanced));destinationFormConfig=b(null);nonSelectedAdvancedFormViews=L(()=>{let t=this.destinationFormConfig();if(!t)return[];let e=this.advancedFormFieldNames();return t.advanced.filter(o=>e.findIndex(i=>i===o.name)===-1)});destinationTypeEffect=R(()=>{let t=this.destinationType()??"",e=J(t),o=e?.key,i=this.#a.backendModules().find(h=>h.Key===o)??{Key:t,DisplayName:t,Description:J(t).description,Options:[]};if(!i||!i.Options||!t)return;let a=e&&e.oauthField?e.oauthField:null,r=e&&e.customFields?e.customFields:{},u=e&&e.dynamicFields?e.dynamicFields:[],F=e&&e.advancedFields?e.advancedFields:[],M=e&&e.ignoredAdvancedFields?e.ignoredAdvancedFields:[],I={destinationType:t,oauthField:a,custom:[],dynamic:[],advanced:[]};r&&Object.entries(r).forEach(([h,g],A)=>{I.custom.push(y({order:900+A},g))});for(let h=0;h<i.Options.length;h++){let g=i.Options[h];if(g.Deprecated)continue;let A=u.find(N=>N===g.Name||g.Aliases?.includes(N.name)||N.name===g.Name);if(A){let N=g.Aliases?.indexOf(A.name)??-1,V=g.Aliases&&N>-1?g.Aliases[N]:g.Name,x=A&&typeof A!="string",K=x?A?.defaultValue??g.DefaultValue:g.DefaultValue,z={name:V,type:g.Type,shortDescription:g.ShortDescription??void 0,longDescription:g.LongDescription??void 0,options:g.ValidValues,order:900+h},fe=x?y(y({},z),A):z;I.dynamic.push(fe)}else{let N=g.Name;if(M.find(Y=>Y===N))continue;let x=F.find(Y=>Y===N||Y.name===N),K=x&&typeof x!="string",z={name:N,type:g.Type,shortDescription:g.ShortDescription??void 0,longDescription:g.LongDescription??void 0,options:g.ValidValues,defaultValue:g.DefaultValue,order:900+h},fe=K?y(y({},z),x):z;I.advanced.push(fe)}}I.custom.sort((h,g)=>h.order-g.order),I.dynamic.sort((h,g)=>h.order-g.order),I.advanced.sort((h,g)=>h.order-g.order),this.destinationFormConfig.set(I)});targetUrlEffect=R(()=>{if(!this.destinationFormConfig())return;let e=this.targetUrl();if(!e)return;let o=We(e);if(!o)return;let i={custom:o.custom,dynamic:o.dynamic,advanced:o.advanced};this.destinationForm.update(a=>(a.custom=y(y({},a.custom),i.custom),a.dynamic=y(y({},a.dynamic),i.dynamic),a.advanced=y(y({},a.advanced),i.advanced),a))});destinationFormEffect=R(()=>{let t=this.#i,e=this.destinationForm();if(!e||!t)return;let o=je({destinationType:t,custom:e.custom,dynamic:e.dynamic,advanced:e.advanced});o&&this.targetUrl.set(o)});getFieldValue(t,e){let i=this.destinationForm()[t][e];return i||null}getFormView(t,e){let i=this.destinationFormConfig()?.[t].find(a=>a.name===e);return i||null}getDefaultFormView(t){return{name:t,type:"String",shortDescription:t,longDescription:$localize`This is an undocumented option.`}}getFieldGroup(t,e){return t[e]}hasLeadingSlash(t){return t?.startsWith("/")??!1}addAdvancedOption(t){let e=this.destinationForm();e.advanced[t.name]=t.defaultValue,this.destinationForm.set(y({},e))}isValidBucketname(t){if(!t)return!1;let e=t.length;return!(e<3||e>63||!/^[a-z0-9.-]+$/.test(t)||!/^[a-z0-9]/.test(t)||!/[a-z0-9]$/.test(t)||/^\d{1,3}(\.\d{1,3}){3}$/.test(t)||/(\.\.)|(\.-)|(-\.)/.test(t))}isValidHostname(t){if(!t||t.length>253)return!1;let e=t.split(".");for(let o of e)if(!o||o.length>63||!/^[a-zA-Z0-9]([-a-zA-Z0-9]*[a-zA-Z0-9])?$/.test(o))return!1;return!0}onKeyDown(t,e,o,i){if(o==="Hostname"||o==="Bucketname"){if(["Backspace","Delete","ArrowLeft","ArrowRight","Tab","Home","End"].includes(i.key))return;if(i.key=="/"||i.key=="\\"||i.key==":"){i.preventDefault();return}}}updateFieldValue(t,e,o){let i=this.destinationForm();i[t][e]=o,this.destinationForm.set(y({},i))}removeAdvancedOption(t){let e=this.destinationForm();delete e.advanced[t],this.destinationForm.set(y({},e))}mapOptions(t){let e=t.loadOptions;if(e)return e(this.injector)();let o=t.options;return o?o.map(i=>({key:i,value:i})):null}#o=b(!1);oauthStartTokenCreation(t,e,o,i){this.#o.set(!0);let a=(i??1)==2?this.#e.defaultOAuthUrlV2():this.#e.defaultOAuthUrl(),r=this.#n.serverSettings()?.["--oauth-url"];if(r&&r.length>0&&(a=r),this.useBackupState()){let N=this.#t.mapFormsToSettings().find(V=>V.Name==="--oauth-url")?.Value;N&&N.length>0&&(a=N)}let u=this.destinationForm().advanced["oauth-url"];u&&u.length>0&&(a=u);let F=`${a}?type=${t}`,M=450,I=600,h=screen.width/2-M/2,g=screen.height/2-I/2,A=window.open(F,"_blank","height="+I+",width="+M+",menubar=0,status=0,titlebar=0,toolbar=0,left="+h+",top="+g);return window.addEventListener("message",N=>{let V=N.data.startsWith("authid:"),x=V?N.data.replace("authid:",""):null;V&&(this.destinationForm.update(K=>(K[e][o]=x,K)),this.#o.set(!1),A?.close())}),!1}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=ne({type:n,selectors:[["app-single-destination"]],inputs:{targetUrl:[1,"targetUrl"],useBackupState:[1,"useBackupState"]},outputs:{targetUrl:"targetUrlChange"},decls:3,vars:3,consts:()=>{let t;t=$localize` Advanced options ${"\uFFFD#8\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#9\uFFFD"}:START_TAG_BUTTON: Add advanced option ${"\uFFFD#10\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#9\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#11\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD*13:1\uFFFD"}:START_BLOCK_FOR:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON_1: ${"\uFFFD0:1\uFFFD"}:INTERPOLATION: ${"[\uFFFD/#9\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/*13:1\uFFFD"}:CLOSE_BLOCK_FOR:${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_SPK_MENU:`,t=De(t);let e;e=$localize`This field is mandatory`;let o;o=$localize`This field is mandatory`;let i;i=$localize`This field is mandatory`;let a;a=$localize`An empty path means storing data in the initial or root folder, which is not recommended`;let r;r=$localize`Hostname is invalid`;let u;u=$localize`Bucket name is invalid`;let F;F=$localize`This field is mandatory`;let M;M=$localize`This field is mandatory`;let I;I=$localize`This field is mandatory`;let h;h=$localize`This field is mandatory`;let g;g=$localize`This field is mandatory`;let A;A=$localize`This field is mandatory`;let N;N=$localize`This field is mandatory`;let V;return V=$localize`This field is mandatory`,[["fieldTemplate",""],["option",""],["enumOptionTemplate",""],["nonValidatedOptionTemplate",""],["optionTemplate",""],t,[1,"advanced-options",3,"disallowToggle"],["title",""],[3,"searchable"],["spk-button","","type","button",1,"outlined","small",3,"disabled"],["menu",""],["type","button"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["type","button",3,"click"],[1,"field-row"],[3,"startingPath","accepts","showFiles","hideShortcuts","showHiddenNodes","selectFiles"],[3,"hideShortcuts","startingPath"],[3,"inputType","ngModel","customId"],[1,"primary","raised",3,"active"],[3,"ngModel","customId","placeholder"],["spk-button","","type","button",1,"outlined"],[3,"for"],["spkTooltip",e],[1,"primary",3,"spkTooltip"],["type","text",3,"ngModelChange","id","ngModel"],["spkTooltip",o],["spkTooltip",i],["spkTooltip",a,1,"warn"],["spkTooltip",r,1,"error"],["spkTooltip",u,1,"warn"],[3,"keydown","ngModelChange","type","id","ngModel"],["prefix","",3,"error","warn","spkTooltip"],["prefix",""],["prefix","",3,"spkTooltip"],["spkTooltip",F],["autocomplete","off",3,"ngModelChange","type","id","ngModel"],["prefix","",1,"link"],["suffix","",1,"clickable"],["prefix","",1,"link",3,"click"],["suffix","",1,"clickable",3,"click"],["label","key","value","value",3,"options","isClearable","optionTemplate"],["spkTooltip",M],[1,"indeterminate","primary"],["label","key","value","value",3,"options","asFreeText","inlineSearch","optionTemplate"],["spkTooltip",I],[3,"ngModelChange","inputType","ngModel","customId"],["spkTooltip",h],["spkTooltip",g],["type","number",3,"ngModelChange","id","ngModel"],[1,"primary","raised",3,"click"],["key","key","value","value",1,"primary","raised",3,"options","selectMultiple","optionTemplate"],["spkTooltip",A],["type","text","id","text",3,"ngModelChange","ngModel"],["spkTooltip",N],[3,"ngModelChange","ngModel","customId","placeholder"],["spkTooltip",V],["spk-button","","type","button",1,"outlined",3,"click"]]},template:function(e,o){if(e&1&&($(0)(1),C(2,Fn,18,4)),e&2){let i=w(o.destinationType());l();let a=w(o.destinationFormConfig());l(),f(i&&a?2:-1)}},dependencies:[qe,ce,He,de,me,pe,$e,Qe,Je,Ye,Ce,Pe,_e,se,Be,be,Re,ze,Ke,Ge],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.advanced-options[_ngcontent-%COMP%]{position:relative;z-index:1}textarea[_ngcontent-%COMP%] ~ grammarly-extension[_ngcontent-%COMP%]{display:none}spk-select[_ngcontent-%COMP%]{--miw: p2r(120)}[prefix].link[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline;color:var(--primary-500)}.clickable[_ngcontent-%COMP%]{cursor:pointer;color:var(--primary-500)}label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}label[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:1rem}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.field-row.single-field[_ngcontent-%COMP%]{display:block}"],changeDetection:0})};export{tt as a,ue as b,nt as c};
@@ -0,0 +1 @@
1
+ import{a as v}from"./chunk-XLKQSWFD.js";import{h as T}from"./chunk-FUEIZLWH.js";import"./chunk-XIIFTZ5G.js";import"./chunk-BCHZRC5K.js";import"./chunk-B26UYXA3.js";import{b as m}from"./chunk-LDIZ5E5Z.js";import"./chunk-ROOTIQEO.js";import{a as L}from"./chunk-FUZLIOUQ.js";import"./chunk-JM7VAPIC.js";import"./chunk-2BX65XJQ.js";import"./chunk-RHW5QVAY.js";import"./chunk-6JQM2X3B.js";import"./chunk-WXARH2SG.js";import"./chunk-NSIELNIY.js";import"./chunk-FZG6OXT3.js";import{b as E,c as B,e as b,f as M}from"./chunk-2W6BEUGU.js";import"./chunk-JFOXV66M.js";import{p as $,q as N,v as I}from"./chunk-Y5IRBMLB.js";import{h as K}from"./chunk-DNJOKPEL.js";import"./chunk-UFP4XKZF.js";import"./chunk-CWLTHXVS.js";import"./chunk-WIDMAJIO.js";import"./chunk-LKJ2SBQA.js";import{Ab as r,F as C,Ic as O,Kb as d,Lb as c,Qa as n,Rb as R,Z as l,ab as D,ec as A,gc as P,rc as h,sb as k,tb as g,uc as _,xb as u,yb as p,zb as s}from"./chunk-BTMXQPBB.js";import"./chunk-EUDKD2JW.js";var G=(a,e)=>[a,e,"general"],y=(a,e)=>[a,e,"destination"],U=(a,e)=>[a,e,"source-data"],w=(a,e)=>[a,e,"schedule"],X=(a,e)=>[a,e,"options"];function x(a,e){if(a&1&&(p(0,"p"),A(1),s()),a&2){let t=R();n(),P("Editing: ",t.backupName())}}function z(a,e){a&1&&r(0,"spk-progress-bar",6)}function j(a,e){a&1&&(p(0,"section"),r(1,"router-outlet"),s())}var f=class a{#t=l(E);#e=l(T);#a=l(L);#i=l(K);isDraft=this.#e.isDraft;isNew=this.#e.isNew;backupId=this.#e.backupId;backupName=this.#e.backupName;finishedLoading=this.#e.finishedLoading;#o=m(this.#t.params);#n=m(this.#t.url);paramsChanged=O(()=>{let e=this.#o()?.id,t=!!this.#n()?.find(i=>i.path==="backup-draft");this.#e.backupId.set(e),e!=="new"?this.getBackup(e,t):this.getDefaults()});getDefaults(){this.#i.getApiV1Backupdefaults().pipe(C(1)).subscribe({next:e=>{let t=e.Backup;t.Settings=[...t.Settings],this.#e.mapGeneralToForm(t),this.#e.mapDestinationToForm(t),this.#e.mapSourceDataToForm(t),this.#e.mapScheduleToForm(e.Schedule),this.#e.mapOptionsToForms(t),this.#e.applicationOptions.set(e.ApplicationOptions),this.#e.backupDefaults.set(e),this.#e.finishedLoading.set(!0)}})}getBackup(e,t=!1){let i=o=>{this.#e.mapScheduleToForm(o.Schedule??null),o.Backup&&(this.#e.mapGeneralToForm(o.Backup),this.#e.mapDestinationToForm(o.Backup),this.#e.mapSourceDataToForm(o.Backup),this.#e.mapOptionsToForms(o.Backup),this.#e.storeMetadata(o.Backup,t)),this.#e.finishedLoading.set(!0)};if(t){this.isDraft.set(t);let o=this.#a.draftBackups().find(F=>F.id===e);if(!o){alert("Backup not found");return}i(o.data)}else this.#i.getApiV1BackupById({id:e}).subscribe({next:i})}static \u0275fac=function(t){return new(t||a)};static \u0275cmp=D({type:a,selectors:[["app-backup"]],features:[h([T])],decls:21,vars:22,consts:()=>{let e;e=$localize`${"\uFFFD#6\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SPK_RADIO: General `;let t;t=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_RADIO: Destination `;let i;i=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_RADIO: Source Data `;let o;o=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SPK_RADIO: Schedule `;let F;return F=$localize`${"\uFFFD#18\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SPK_RADIO: Options `,[e,t,i,o,F,["step","","routerLinkActive","active",3,"routerLink"],[1,"indeterminate","primary"]]},template:function(t,i){t&1&&(r(0,"app-status-bar"),p(1,"header"),k(2,x,2,1,"p"),p(3,"spk-stepper")(4,"div",5),d(5,0),r(6,"spk-radio"),c(),s(),p(7,"div",5),d(8,1),r(9,"spk-radio"),c(),s(),p(10,"div",5),d(11,2),r(12,"spk-radio"),c(),s(),p(13,"div",5),d(14,3),r(15,"spk-radio"),c(),s(),p(16,"div",5),d(17,4),r(18,"spk-radio"),c(),s()()(),k(19,z,1,0,"spk-progress-bar",6)(20,j,2,0,"section")),t&2&&(n(2),g(i.isNew()?-1:2),n(2),u("routerLink",_(7,G,i.isDraft()?"/backup-draft":"/backup",i.backupId())),n(3),u("routerLink",_(10,y,i.isDraft()?"/backup-draft":"/backup",i.backupId())),n(3),u("routerLink",_(13,U,i.isDraft()?"/backup-draft":"/backup",i.backupId())),n(3),u("routerLink",_(16,w,i.isDraft()?"/backup-draft":"/backup",i.backupId())),n(3),u("routerLink",_(19,X,i.isDraft()?"/backup-draft":"/backup",i.backupId())),n(3),g(i.finishedLoading()?20:19))},dependencies:[B,b,M,v,N,I,$],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%}header[_ngcontent-%COMP%]{padding:1rem 1.5rem;border-bottom:1px solid var(--base-4)}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin-bottom:.5rem}header[_ngcontent-%COMP%] spk-stepper[_ngcontent-%COMP%]{width:100%}section[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:center;flex:1 0;overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:auto}"],changeDetection:0})};export{f as default};
@@ -0,0 +1 @@
1
+ import{a as ut}from"./chunk-XIIFTZ5G.js";import{a as Oe}from"./chunk-BCHZRC5K.js";import{a as rt,b as Ke,c as _t}from"./chunk-B26UYXA3.js";import{b as re}from"./chunk-LDIZ5E5Z.js";import{a as ot}from"./chunk-2BX65XJQ.js";import{a as Te}from"./chunk-6JQM2X3B.js";import{b as fe,c as Q,d as Ae,e as Z,f as he,h as st,i as le,j as Pe,k as Ne,n as lt,o as De,p as at,q as Me,r as ye,s as ae,t as Re}from"./chunk-NSIELNIY.js";import{b as oe,d as H}from"./chunk-2W6BEUGU.js";import{A as Ee,C as nt,a as j,b as Je,e as et,g as se,l as q,p as tt,t as Y}from"./chunk-Y5IRBMLB.js";import{h as it}from"./chunk-DNJOKPEL.js";import{$b as xe,Ab as g,Bb as B,Cb as v,Eb as x,H as ke,Hc as I,Ic as ie,Kb as C,Lb as m,Mb as f,Mc as ve,Nc as Ve,Oc as Se,Pb as Ge,Qa as _,Qb as E,Rb as u,U as ge,Z as M,Zb as Ce,_b as me,ab as z,bc as Fe,da as c,ea as p,ec as U,fb as Ye,fc as be,gc as Ze,jc as $,kc as w,lc as k,na as d,rb as Qe,sb as y,sc as Be,tb as R,ub as Ie,vb as Le,wb as Ue,xb as T,yb as l,zb as a}from"./chunk-BTMXQPBB.js";import{a as G,b as W}from"./chunk-EUDKD2JW.js";var $e=class s{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||s)};static \u0275prov=ge({token:s,factory:s.\u0275fac,providedIn:"root"})};function Ct(s,t){if(s&1){let e=x();l(0,"div",24)(1,"spk-form-field")(2,"label",25),f(3,7),a(),l(4,"input",26,0),k("ngModelChange",function(i){c(e);let o=u();return w(o.scheduleFields.nextTime().time,i)||(o.scheduleFields.nextTime().time=i),p(i)}),E("focus",function(){c(e);let i=xe(5);return p(i.showPicker())}),a(),l(6,"spk-icon",27),U(7,"clock"),a()(),l(8,"spk-form-field"),g(9,"label",28),l(10,"input",29,1),k("ngModelChange",function(i){c(e);let o=u();return w(o.scheduleFields.nextTime().date,i)||(o.scheduleFields.nextTime().date=i),p(i)}),E("focus",function(){c(e);let i=xe(11);return p(i.showPicker())}),a(),l(12,"spk-icon",27),U(13,"calendar"),a()()(),l(14,"div",24)(15,"spk-form-field")(16,"label",30),f(17,8),a(),l(18,"input",31),k("ngModelChange",function(i){c(e);let o=u();return w(o.scheduleFields.runAgain().repeatValue,i)||(o.scheduleFields.runAgain().repeatValue=i),p(i)}),a()(),l(19,"spk-select",32)(20,"input",33),k("ngModelChange",function(i){c(e);let o=u();return w(o.scheduleFields.runAgain().repeatUnit,i)||(o.scheduleFields.runAgain().repeatUnit=i),p(i)}),a()()(),l(21,"app-toggle-card",34),B(22,35),f(23,9),v(),l(24,"div",36)(25,"spk-toggle",19),C(26,10),l(27,"input",20),k("ngModelChange",function(i){c(e);let o=u();return w(o.scheduleFields.runAgain().allowedDays.mon,i)||(o.scheduleFields.runAgain().allowedDays.mon=i),p(i)}),a(),m(),a(),l(28,"spk-toggle",19),C(29,11),l(30,"input",20),k("ngModelChange",function(i){c(e);let o=u();return w(o.scheduleFields.runAgain().allowedDays.tue,i)||(o.scheduleFields.runAgain().allowedDays.tue=i),p(i)}),a(),m(),a(),l(31,"spk-toggle",19),C(32,12),l(33,"input",20),k("ngModelChange",function(i){c(e);let o=u();return w(o.scheduleFields.runAgain().allowedDays.wed,i)||(o.scheduleFields.runAgain().allowedDays.wed=i),p(i)}),a(),m(),a(),l(34,"spk-toggle",19),C(35,13),l(36,"input",20),k("ngModelChange",function(i){c(e);let o=u();return w(o.scheduleFields.runAgain().allowedDays.thu,i)||(o.scheduleFields.runAgain().allowedDays.thu=i),p(i)}),a(),m(),a(),l(37,"spk-toggle",19),C(38,14),l(39,"input",20),k("ngModelChange",function(i){c(e);let o=u();return w(o.scheduleFields.runAgain().allowedDays.fri,i)||(o.scheduleFields.runAgain().allowedDays.fri=i),p(i)}),a(),m(),a(),l(40,"spk-toggle",19),C(41,15),l(42,"input",20),k("ngModelChange",function(i){c(e);let o=u();return w(o.scheduleFields.runAgain().allowedDays.sat,i)||(o.scheduleFields.runAgain().allowedDays.sat=i),p(i)}),a(),m(),a(),l(43,"spk-toggle",19),C(44,16),l(45,"input",20),k("ngModelChange",function(i){c(e);let o=u();return w(o.scheduleFields.runAgain().allowedDays.sun,i)||(o.scheduleFields.runAgain().allowedDays.sun=i),p(i)}),a(),m(),a()()()}if(s&2){let e=u();_(4),$("ngModel",e.scheduleFields.nextTime().time),_(6),$("ngModel",e.scheduleFields.nextTime().date),_(8),$("ngModel",e.scheduleFields.runAgain().repeatValue),_(),T("options",e.unitOptions)("isClearable",!1),_(),$("ngModel",e.scheduleFields.runAgain().repeatUnit),_(),T("disallowToggle",!0),_(6),$("ngModel",e.scheduleFields.runAgain().allowedDays.mon),_(3),$("ngModel",e.scheduleFields.runAgain().allowedDays.tue),_(3),$("ngModel",e.scheduleFields.runAgain().allowedDays.wed),_(3),$("ngModel",e.scheduleFields.runAgain().allowedDays.thu),_(3),$("ngModel",e.scheduleFields.runAgain().allowedDays.fri),_(3),$("ngModel",e.scheduleFields.runAgain().allowedDays.sat),_(3),$("ngModel",e.scheduleFields.runAgain().allowedDays.sun)}}var mt=[{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`}],te={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}}},Xe=class s{#e=M(J);#t=M(H);#i=M(oe);unitOptions=mt;scheduleFields=this.#e.scheduleFields;goBack(){this.#t.navigate(["source-data"],{relativeTo:this.#i.parent})}next(){this.#e.isNew()||this.#e.submit(!0),this.#t.navigate(["options"],{relativeTo:this.#i.parent})}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=z({type:s,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 o;o=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let r;r=$localize`Next time`;let F;F=$localize`Run again every`;let A;A=$localize`Allowed days`;let S;S=$localize` Monday ${"\uFFFD#27\uFFFD\uFFFD/#27\uFFFD"}:TAG_INPUT:`;let O;O=$localize` Tuesday ${"\uFFFD#30\uFFFD\uFFFD/#30\uFFFD"}:TAG_INPUT:`;let P;P=$localize` Wednesday ${"\uFFFD#33\uFFFD\uFFFD/#33\uFFFD"}:TAG_INPUT:`;let L;L=$localize` Thursday ${"\uFFFD#36\uFFFD\uFFFD/#36\uFFFD"}:TAG_INPUT:`;let K;K=$localize` Friday ${"\uFFFD#39\uFFFD\uFFFD/#39\uFFFD"}:TAG_INPUT:`;let b;b=$localize` Saturday ${"\uFFFD#42\uFFFD\uFFFD/#42\uFFFD"}:TAG_INPUT:`;let X;return X=$localize` Sunday ${"\uFFFD#45\uFFFD\uFFFD/#45\uFFFD"}:TAG_INPUT:`,[["timeRef",""],["dateRef",""],t,e,n,i,o,r,F,A,S,O,P,L,K,b,X,[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&&(l(0,"h3",17),f(1,2),a(),l(2,"div",18)(3,"spk-toggle",19),C(4,3),l(5,"input",20),k("ngModelChange",function(o){return w(n.scheduleFields.autoRun,o)||(n.scheduleFields.autoRun=o),o}),a(),m(),a(),l(6,"p"),f(7,4),a()(),y(8,Ct,46,14),l(9,"div",21)(10,"button",22),E("click",function(){return n.goBack()}),C(11,5),g(12,"spk-icon"),m(),a(),l(13,"button",23),E("click",function(){return n.next()}),C(14,6),g(15,"spk-icon"),m(),a()()),e&2&&(_(5),$("ngModel",n.scheduleFields.autoRun),_(3),R(n.scheduleFields.autoRun()?8:-1))},dependencies:[ae,Q,Ne,fe,Z,le,q,Ee,j,se,Y,Oe],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 Ft(s,t){if(s&1&&(B(0,4),U(1),v()),s&2){let e,n=u();_(),be((e=n.currentExpressionOption())==null?null:e.startsWith)}}function St(s,t){if(s&1&&(B(0,5),U(1),v()),s&2){let e,n=u();_(),be((e=n.currentExpressionOption())==null?null:e.endsWith)}}var Et=[{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"}],we=class s{path=Ve.required();osType=Ve();pathChange=ve();remove=ve();internalPath=d("");pathType=d("-Expression");currentExpressionOption=I(()=>{let t=this.pathType();return this.expressionOptions().find(e=>e.value===t)});expressionOptions=I(()=>{let e=this.osType()==="Windows"?"\\":"/";return Et.map(n=>n.value==="-Folder"||n.value==="+Folder"?W(G({},n),{startsWith:"",endsWith:""}):n.value==="-FolderName"||n.value==="+FolderName"?W(G({},n),{startsWith:"*",endsWith:`*${e}`}):n.value==="-FileName"||n.value==="+FileName"?W(G({},n),{startsWith:"[.*",endsWith:`[^\\${e}]*]`}):n.value==="-FileGroup"||n.value==="+FileGroup"?W(G({},n),{startsWith:"{",endsWith:"}"}):n.value==="-Regex"||n.value==="+Regex"?W(G({},n),{startsWith:"[",endsWith:"]"}):n.value==="-Extension"||n.value==="+Extension"?W(G({},n),{startsWith:"*.",endsWith:""}):W(G({},n),{startsWith:"",endsWith:""}))});pathEffect=ie(()=>{let t=this.path(),e=t.slice(1),n=t.startsWith("-")?"-":"+",i=this.osType()==="Windows",o=i?"\\":"/";e.startsWith("%")&&e.endsWith(o)||i&&e.slice(2).startsWith(o)&&e.endsWith(o)||e.startsWith(o)&&e.endsWith(o)?(this.pathType.set(`${n}Folder`),this.internalPath.set(e)):e.startsWith("*")&&e.endsWith(`*${o}`)?(this.pathType.set(`${n}FolderName`),this.internalPath.set(e.slice(1,-2))):e.startsWith("[.*")&&e.endsWith(`[^\\${o}]*]`)?(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||s)};static \u0275cmp=z({type:s,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&&(l(0,"spk-select",0)(1,"input",1),k("ngModelChange",function(o){return w(n.pathType,o)||(n.pathType=o),o}),E("ngModelChange",function(){return n.updateFilter()}),a()(),l(2,"spk-form-field",2)(3,"input",3),k("ngModelChange",function(o){return w(n.internalPath,o)||(n.internalPath=o),o}),E("ngModelChange",function(){return n.updateFilter()}),a(),y(4,Ft,2,1,"ng-container",4),y(5,St,2,1,"ng-container",5),a(),l(6,"div",6),E("click",function(){return n.removeFilter()}),l(7,"spk-icon",7),U(8,"x-circle"),a()()),e&2){let i,o;T("options",n.expressionOptions())("isClearable",!1),_(),$("ngModel",n.pathType),_(2),$("ngModel",n.internalPath),_(),R(!((i=n.currentExpressionOption())==null||i.startsWith==null)&&i.startsWith.length?4:-1),_(),R(!((o=n.currentExpressionOption())==null||o.endsWith==null)&&o.endsWith.length?5:-1)}},dependencies:[ae,Q,Z,le,Y,q,j],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 Tt=["formRef"],ct=()=>({standalone:!0});function ft(s,t){if(s&1){let e=x();l(0,"spk-form-field",42)(1,"input",43),k("ngModelChange",function(i){c(e);let o=u(2);return w(o.editingPath,i)||(o.editingPath=i),p(i)}),a()(),l(2,"button",44),E("click",function(){c(e);let i=u(2);return p(i.updatePath())}),l(3,"spk-icon"),U(4,"floppy-disk"),a()(),l(5,"button",44),E("click",function(){c(e);let i=u(2);return p(i.cancelEditPath())}),l(6,"spk-icon"),U(7,"x-bold"),a()()}if(s&2){let e=u(2);_(),$("ngModel",e.editingPath),T("ngModelOptions",Be(2,ct))}}function At(s,t){if(s&1){let e=x();l(0,"spk-form-field",42),g(1,"input",45),a(),l(2,"button",44),E("click",function(){c(e);let i=u().$implicit,o=u();return p(o.editPath(i))}),l(3,"spk-icon"),U(4,"pen"),a()(),l(5,"button",44),E("click",function(){c(e);let i=u().$implicit,o=u();return p(o.removePath(i))}),l(6,"spk-icon"),U(7,"trash-simple"),a()()}if(s&2){let e=u().$implicit;Qe("readonly",!0),_(),T("ngModel",e)("ngModelOptions",Be(3,ct))}}function ht(s,t){if(s&1&&(l(0,"div",30),y(1,ft,8,3)(2,At,8,4),a()),s&2){let e=t.$implicit,n=u();_(),R(n.oldPath()===e?1:2)}}function Pt(s,t){if(s&1){let e=x();l(0,"app-new-filter",47),E("pathChange",function(i){let o=c(e).$index,r=u(2);return p(r.patchPathAt(i,o))})("remove",function(){let i=c(e).$index,o=u(2);return p(o.removePathAt(i))}),a()}if(s&2){let e=t.$implicit,n=u(2);T("path",e)("osType",n.osType()??"")}}function Nt(s,t){if(s&1&&Le(0,Pt,1,2,"app-new-filter",46,Ie),s&2){let e=u();Ue(e.pathArray())}}function Dt(s,t){if(s&1&&(l(0,"div",41)(1,"spk-form-field"),g(2,"input",48),a(),l(3,"spk-select",49),g(4,"input",50),a()()),s&2){let e=u();_(3),T("options",e.sizeOptions())("isClearable",!1)}}var V=new ye,Mt=["Bytes","KB","MB","GB","TB","PB"],pt=(s={path:"",filters:[],excludes:{hidden:!1,system:!1,temporary:!1,filesLargerThan:null}})=>V.group({path:V.control(s.path),excludes:V.group({hidden:V.control(s.excludes.hidden),system:V.control(s.excludes.system),temporary:V.control(s.excludes.temporary),filesLargerThan:V.group({size:V.control(null),unit:V.control(null)})})}),He=class s{#e=M(J);#t=M(H);#i=M(oe);formRef=Se.required("formRef");sourceDataForm=this.#e.sourceDataForm;sourceDataFormSignal=this.#e.sourceDataFormSignal;newPathCtrl=new st("");filesLargerThan=I(()=>this.sourceDataFormSignal()?.excludes?.filesLargerThan?.size!==null);sizeOptions=d(Mt);osType=this.#e.osType;pathSignal=re(this.sourceDataForm.controls.path.valueChanges);pathArray=I(()=>this.pathSignal()?.split("\0").filter(t=>t.startsWith("-")||t.startsWith("+")||t==="___none___")??[]);nonFilterPaths=I(()=>this.pathSignal()?.split("\0").filter(t=>!t.startsWith("-")&&!t.startsWith("+")&&t!==""));oldPath=d(null);editingPath=d(null);addingNewPath=d(!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,o=e.replace(i,"");this.sourceDataForm.controls.path.setValue(o)}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(r=>!r.startsWith("-")&&!r.startsWith("+")).join("\0"),o=this.pathArray().map((r,F)=>F===e?`${t}`:`${r}`).join("\0");this.sourceDataForm.controls.path.setValue(`${i}\0${o}`)}removePathAt(t){let n=this.sourceDataForm.controls.path.value.split("\0").filter(o=>!o.startsWith("-")&&!o.startsWith("+")).join("\0"),i=this.pathArray().filter((o,r)=>r!==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.#i.parent})}next(){this.#e.isNew()||this.#e.submit(!0),this.#t.navigate(["schedule"],{relativeTo:this.#i.parent})}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=z({type:s,selectors:[["app-source-data"]],viewQuery:function(e,n){e&1&&Ce(n.formRef,Tt,5),e&2&&me()},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 o;o=$localize`Temporary files`;let r;r=$localize`Source Data`;let F;F=$localize`Folder path`;let A;A=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let S;S=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let O;O=$localize`Paths`;let P;P=$localize`Add a path directly from your machine.`;let L;L=$localize`Filters`;let K;K=$localize`Customize your filters.`;let b;b=$localize`Add filter`;let X;X=$localize`Exclude`;let D;D=$localize`Choose if there’s any files you want to exclude.`;let ee;ee=$localize` Hidden files ${"\uFFFD#46\uFFFD\uFFFD/#46\uFFFD"}:TAG_INPUT:`;let _e;_e=$localize` System files ${"\uFFFD#49\uFFFD\uFFFD/#49\uFFFD"}:TAG_INPUT:`;let ue;ue=$localize` Temporary files ${"\uFFFD#52\uFFFD\uFFFD/#52\uFFFD"}:TAG_INPUT:`;let ce;ce=$localize` Files larger than `;let h;h=$localize`Edit path`;let qe;return qe=$localize`Select an option...`,[["formRef",""],r,F,A,S,O,P,L,K,b,X,D,ee,_e,ue,ce,[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",o,"formControlName","temporary"],[1,"raised","primary",3,"click"],["formGroupName","filesLargerThan",1,"row-inputs"],[1,"small"],["type","text","placeholder",h,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",qe]]},template:function(e,n){if(e&1){let i=x();l(0,"form",16,0),E("submit",function(){return c(i),p(n.next())}),l(2,"div",17)(3,"h3",18),f(4,1),a(),l(5,"app-file-tree",19)(6,"label",20),f(7,2),a(),g(8,"input",21),a(),l(9,"div",22)(10,"button",23),E("click",function(){return c(i),p(n.goBack())}),C(11,3),g(12,"spk-icon"),m(),a(),l(13,"button",24),C(14,4),g(15,"spk-icon"),m(),a()()(),l(16,"div",25)(17,"app-toggle-card",26),B(18,27),f(19,5),v(),l(20,"p",28),f(21,6),a(),l(22,"div",29),Le(23,ht,3,1,"div",30,Ie),l(25,"div",31)(26,"spk-form-field"),g(27,"input",32),a(),l(28,"button",33),E("click",function(){return c(i),p(n.addNewPath())}),l(29,"spk-icon"),U(30,"plus"),a()()()()(),l(31,"app-toggle-card",26),B(32,27),f(33,7),v(),l(34,"p",28),f(35,8),a(),l(36,"button",34),E("click",function(){return c(i),p(n.addFilter())}),f(37,9),a(),y(38,Nt,2,0),a(),l(39,"app-toggle-card",35),B(40,27),f(41,10),v(),l(42,"p",28),f(43,11),a(),l(44,"spk-toggle",36),C(45,12),g(46,"input",37),m(),a(),l(47,"spk-toggle",36),C(48,13),g(49,"input",38),m(),a(),l(50,"spk-toggle",36),C(51,14),g(52,"input",39),m(),a(),l(53,"spk-toggle",40),E("click",function(){return c(i),p(n.toggleFilesLargerThan())}),f(54,15),a(),y(55,Dt,5,2,"div",41),a()()()}if(e&2){let i;T("formGroup",n.sourceDataForm),_(5),T("multiSelect",!0)("startingPath",n.getPath())("showFiles",!0),_(12),T("disallowToggle",!0),_(6),Ue(n.nonFilterPaths()),_(4),T("formControl",n.newPathCtrl),_(4),T("disallowToggle",!0),_(7),R((i=n.pathSignal())!=null&&i.length?38:-1),_(),T("disallowToggle",!0),_(14),Fe("active",n.filesLargerThan()),_(2),R(n.filesLargerThan()?55:-1)}},dependencies:[ae,Pe,Q,Ne,fe,Z,he,le,Re,lt,De,Me,at,q,j,se,Ee,Y,we,ut,Oe],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 dt="1W:1D,4W:1W,12M:1M",J=class s{#e=M(H);#t=M(Te);#i=M(et);#n=M(it);#s=M($e);generalForm=gt();sourceDataForm=pt();scheduleFields={autoRun:d(te.autoRun),nextTime:d(te.nextTime),runAgain:d(te.runAgain)};settings=d([]);optionsFields={remoteVolumeSize:d("50MB"),backupRetention:d("all"),backupRetentionTime:d(""),backupRetentionVersions:d(0),backupRetentionCustom:d("")};targetUrlModel=d(null);backupMetadata=d(null);isDraft=d(!1);backupId=d(null);backupName=I(()=>this.generalFormSignal()?.name??"");isSubmitting=d(!1);finishedLoading=d(!1);backupDefaults=d(null);applicationOptions=d(null);isNew=I(()=>this.backupId()==="new");osType=I(()=>this.#t.systemInfo()?.OSType);selectedOptions=d([]);sourceDataFormSignal=re(this.sourceDataForm.valueChanges);generalFormSignal=re(this.generalForm.valueChanges);encryptionFieldSignal=re(this.generalForm.controls.encryption.valueChanges);advancedOptions=I(()=>this.#t.systemInfo()?.Options?.map(this.#_)??[]);#o=d("");#l=d(null);#a=null;testSignal=this.#o.asReadonly();testErrorMessage=this.#l.asReadonly();#p=ie(()=>{let t=this.targetUrlModel(),e=this.#o(),n=this.#a;this.#a=t,!(e==="testing"||n===null||n===t)&&(this.#o.set(""),this.#l.set(null))});setTestState(t,e){this.#o.set(t),this.#l.set(e??null)}#_(t){return{name:t.Name,type:t.Type,shortDescription:t.ShortDescription??void 0,longDescription:t.LongDescription??void 0,options:t.ValidValues}}encryptionOptions=I(()=>{let t=this.#t.systemInfo()?.EncryptionModules??[];return[de,...t]});nonSelectedOptions=I(()=>this.advancedOptions().sort((t,e)=>t?.name&&e?.name?t?.name.localeCompare(e?.name):0).filter(t=>this.selectedOptions()?.findIndex(e=>e.name===t.name)===-1));submit(t=!1){this.isSubmitting.set(!0);let e=this.#u(),n=this.backupId();this.isDraft()&&e.Backup&&(e.Backup.Metadata=this.backupMetadata()),n==="new"||!n||this.isDraft()?this.#n.postApiV1Backups({requestBody:e}).pipe(ke(()=>this.isSubmitting.set(!1))).subscribe({next:i=>{t||this.exit(!1)},error:i=>{}}):this.#n.putApiV1BackupById({id:n,requestBody:e}).pipe(ke(()=>this.isSubmitting.set(!1))).subscribe({next:i=>{t||this.exit(!1)},error:i=>{}})}exit(t){if(!t){this.#r(),this.#e.navigate(["/"]);return}this.#i.open(ot,{data:{title:$localize`Confirm exit?`,message:$localize`Are you sure you want to exit?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:e=>{e&&(this.#r(),this.#e.navigate(["/"]))}})}mapSourceDataToForm(t){let e=t.Sources??"",n=t.Filters?.map(F=>`${F.Include?"":"-"}${F.Expression}`)??[],i=t.Settings?.find(F=>F.Name==="--exclude-files-attributes")?.Value??"",o=t.Settings?.find(F=>F.Name==="--skip-files-larger-than")??null,r={path:[...e,...n].join("\0"),excludes:{hiddenFiles:i.includes("hidden"),systemFiles:i.includes("system"),tempFiles:i.includes("temporary"),filesLargerThan:o?.Value?.toUpperCase()??null}};this.sourceDataForm.patchValue(r)}mapDestinationToForm(t){this.targetUrlModel.set(t.TargetURL??"")}mapGeneralToForm(t){let e=t.Name??"",n=t.Description??"",i=t.Settings?.find(S=>S.Name==="encryption-module"),o=t.Settings?.find(S=>S.Name==="passphrase")?.Value??"",r=i?.Value&&i.Value.length?i.Value:"",F=t.Settings?.find(S=>S.Name==="compression-module")?.Value??"",A={name:t.Name??"",description:t.Description??""};e&&e!==""&&(A.name=e),n&&n!==""&&(A.description=n),r&&r!==""&&(A.encryption=r),o&&o!==""&&(A.password=o,A.repeatPassword=o),F&&F!==""&&(A.compression=F),this.generalForm.patchValue(A)}mapScheduleToForm(t){if(!t){this.scheduleFields.autoRun.set(!1);return}let e=this.#s.fromString(t.Repeat)??null,n=this.#c(t.Time);this.scheduleFields.autoRun.set(!0),this.scheduleFields.nextTime.update(i=>G(G({},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(r=>!e.includes(r.Name)),i=t.Settings?.filter(r=>e.includes(r.Name));this.settings.set(n??[]),n?.forEach(r=>{if(r.Name==="encryption-module"&&this.isNew())return this.generalForm.controls.encryption.setValue(r.Value??"")});var o="all";i?.forEach(r=>{if(r.Name==="dblock-size"&&this.optionsFields.remoteVolumeSize.set(r.Value??"50MB"),r.Name==="keep-time"&&(r.Value??"")!=="")return o="time",this.optionsFields.backupRetentionTime.set(r.Value??"");if(r.Name==="keep-versions"&&(r.Value??"")!=="")return o="versions",this.optionsFields.backupRetentionVersions.set(r.Value?parseInt(r.Value):null);if(r.Name==="retention-policy"&&(r.Value??"")!=="")if(r.Value===dt)o="smart";else return o="custom",this.optionsFields.backupRetentionCustom.set(r.Value??"")}),this.optionsFields.backupRetention.set(o)}storeMetadata(t,e){this.backupMetadata.set(e?t.Metadata??null:null)}getScheduleFormValue(){return{autoRun:this.scheduleFields.autoRun(),nextTime:this.scheduleFields.nextTime(),runAgain:this.scheduleFields.runAgain()}}#u(){let t=this.generalForm.value,e=this.getScheduleFormValue(),n=this.sourceDataForm.value,i=this.targetUrlModel(),o=null;e.runAgain?.repeatUnit&&e.runAgain?.repeatValue&&(o=this.#s.toString(e.runAgain.repeatValue,e.runAgain.repeatUnit));let r=e.runAgain?.allowedDays?Object.entries(e.runAgain?.allowedDays).filter(([P,L])=>L).map(([P,L])=>P):[],F=n.path?.split("\0")??[],A=this.mapFormsToSettings(),S=Object.entries(n.excludes??{}).filter(([P,L])=>L&&P!=="filesLargerThan").map(([P])=>P),O=n.excludes?.filesLargerThan;return S.length&&A.push({Name:"--exclude-files-attributes",Value:S.join(",")}),O&&O.size!==null&&O.unit!==null&&A.push({Name:"--skip-files-larger-than",Value:`${O.size}${O.unit}`}),{Backup:{Name:t.name,Description:t.description,TargetURL:i??null,Sources:F.filter(P=>!P.startsWith("-")),Settings:A,Filters:F.filter(P=>P.startsWith("-")).map((P,L)=>({Order:L,Include:!1,Expression:P.slice(1)}))},Schedule:e.autoRun?{Repeat:o,Time:e.nextTime?.date?new Date(`${e.nextTime.date}T${e.nextTime?.time||"00:00:00"}`).toISOString():null,AllowedDays:r}: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","compression-module"],i=[{Name:"--no-encryption",Value:"True"}];e.encryption!==""&&e.encryption!==de.Key&&(i=[{Name:"encryption-module",Value:e.encryption??null},{Name:"passphrase",Value:e.password??null}]);let o=[{Name:"compression-module",Value:e.compression}];e.compression===""&&(o=[]);let r=[{Name:"dblock-size",Value:this.optionsFields.remoteVolumeSize()}];switch(this.optionsFields.backupRetention()){case"time":r.push({Name:"keep-time",Value:this.optionsFields.backupRetentionTime()});break;case"versions":r.push({Name:"keep-versions",Value:this.optionsFields.backupRetentionVersions()?.toString()??""});break;case"custom":r.push({Name:"retention-policy",Value:this.optionsFields.backupRetentionCustom()});break;case"smart":r.push({Name:"retention-policy",Value:dt});break}let F=[...t,...n],A=this.settings().filter(S=>!F.includes(S.Name)).map(S=>{let O=S.Value;return typeof S.Value=="number"&&(O=S.Value.toString()),typeof S.Value=="boolean"&&(O=S.Value?"True":"False"),{Name:S.Name?.startsWith("--")?S.Name:`--${S.Name}`,Value:O}});return[...i,...o,...r,...A]}#c(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]}}setTargetUrl(t){this.targetUrlModel.set(t)}#r(){this.generalForm.reset(),this.sourceDataForm.reset(),this.scheduleFields.autoRun.set(te.autoRun),this.scheduleFields.nextTime.set(te.nextTime),this.scheduleFields.runAgain.set(te.runAgain),this.optionsFields.remoteVolumeSize.set("50MB"),this.optionsFields.backupRetention.set("all"),this.settings.set([]),this.targetUrlModel.set(null)}static \u0275fac=function(e){return new(e||s)};static \u0275prov=ge({token:s,factory:s.\u0275fac,providedIn:"root"})};var yt=["formRef"];function Rt(s,t){s&1&&(l(0,"spk-alert",17),C(1,5),g(2,"spk-icon",26),m(),a())}function Ot(s,t){if(s&1&&U(0),s&2){let e=t.$implicit;Ze(" ",e.DisplayName," ")}}function $t(s,t){if(s&1&&g(0,"spk-progress-bar",40),s&2){let e=u(3);Fe("error",e.calculatePasswordStrength()===1)("warn",e.calculatePasswordStrength()===2)("primary",e.calculatePasswordStrength()===4)("success",e.calculatePasswordStrength()===5),T("value",e.calculatePasswordStrength()*(100/5))}}function wt(s,t){s&1&&(l(0,"span",35),f(1,10),a())}function kt(s,t){s&1&&(C(0,8,1),g(1,"spk-icon"),m())}function It(s,t){s&1&&(C(0,8,2),g(1,"spk-icon"),m())}function Lt(s,t){s&1&&(C(0,11,1),g(1,"spk-icon",42),m())}function Ut(s,t){s&1&&(C(0,11,2),g(1,"spk-icon"),m())}function Gt(s,t){if(s&1){let e=x();l(0,"button",41),E("click",function(){c(e);let i=u(3);return p(i.copyPassword())}),C(1,11),y(2,Lt,2,0)(3,Ut,2,0),m(),a()}if(s&2){let e=u(3);_(2),R(e.copiedPassword()?2:3)}}function xt(s,t){s&1&&(l(0,"spk-alert",39),f(1,12),a())}function bt(s,t){if(s&1){let e=x();l(0,"div",30)(1,"spk-form-field")(2,"label",31),C(3,7),g(4,"sup"),m(),a(),g(5,"input",32),a(),y(6,$t,1,9,"spk-progress-bar",33),l(7,"spk-form-field"),g(8,"input",34),y(9,wt,2,0,"span",35),a(),l(10,"div",36)(11,"button",37),E("click",function(){c(e);let i=u(2);return p(i.showPassword.set(!i.showPassword()))}),C(12,8),y(13,kt,2,0)(14,It,2,0),m(),a(),l(15,"button",37),E("click",function(){c(e);let i=u(2);return p(i.generatePassword())}),C(16,9),g(17,"spk-icon"),m(),a(),y(18,Gt,4,1,"button",38),a(),y(19,xt,2,0,"spk-alert",39),a()}if(s&2){let e=u(2);_(5),T("type",e.showPassword()?"text":"password"),_(),R(e.generalForm.value.password?6:-1),_(2),T("type",e.showPassword()?"text":"password"),_(),R(e.generalForm.value.repeatPassword&&e.generalForm.value.repeatPassword!==e.generalForm.value.password?9:-1),_(4),R(e.showPassword()?13:14),_(5),R(e.showCopyPassword()?18:-1),_(),R(e.generalForm.value.password&&e.generalForm.value.password===e.generalForm.value.repeatPassword?19:-1)}}function Bt(s,t){if(s&1&&(l(0,"spk-select",27)(1,"label",28),f(2,6),a(),g(3,"input",29),Ye(4,Ot,1,1,"ng-template"),a(),y(5,bt,20,7,"div",30)),s&2){let e=u();T("options",e.encryptionOptions())("isClearable",!1),_(5),R(e.encryptionFieldSignal()!==e.noneOptionKey?5:-1)}}function vt(s,t){if(s&1&&(l(0,"button",24),C(1,13),g(2,"spk-icon"),m(),a()),s&2){let e=u();T("disabled",e.nameAndDescriptionValid()===!1)}}function Vt(s,t){if(s&1&&(l(0,"button",25),C(1,14),g(2,"spk-icon"),m(),a()),s&2){let e=u();T("disabled",e.generalForm.invalid||e.showCopyPassword()&&!e.copiedPassword())}}var ne=new ye,gt=(s={name:"",description:"",encryption:"",password:"",repeatPassword:"",compression:""})=>ne.group({name:ne.control(s.name,[Ae.required]),description:ne.control(s.description),encryption:ne.control(s.encryption,[_t()]),password:ne.control(s.password,[Ke(t=>t?.value.encryption!=="",[Ae.required])]),repeatPassword:ne.control(s.repeatPassword,[Ke(t=>t?.value.encryption!=="",[Ae.required])]),compression:ne.control(s.compression)}),de={Key:"-",DisplayName:"None"},je=class s{#e=M(H);#t=M(oe);#i=M(rt);#n=M(J);#s=M(Te);formRef=Se.required("formRef");generalForm=this.#n.generalForm;generalFormSignal=this.#n.generalFormSignal;encryptionFieldSignal=this.#n.encryptionFieldSignal;encryptionOptions=this.#n.encryptionOptions;isNew=this.#n.isNew;showPassword=d(!1);copiedPassword=d(!1);showCopyPassword=d(!1);noneOptionKey=de.Key;encryptionEffect=ie(()=>{this.encryptionFieldSignal()===de.Key&&(this.copiedPassword.set(!1),this.showCopyPassword.set(!1))});nameAndDescriptionValid=I(()=>{let t=this.generalFormSignal(),e=this.generalForm.controls;return e?.name&&e.name.valid&&e?.description&&e.description.valid});calculatePasswordStrength=I(()=>{let e=this.generalFormSignal()?.password??"";return this.#i.calculatePasswordStrength(e)});ngOnInit(){this.formRef().nativeElement.focus()}exit(){this.#n.exit(!0)}async copyPassword(){let t=this.generalForm.controls.password.value;await this.#o(t??""),this.copiedPassword.set(!0)}async#o(t){try{await navigator.clipboard.writeText(t)}catch{try{let n=document.createElement("textarea");n.value=t,document.body.appendChild(n),n.select(),document.execCommand("copy"),document.body.removeChild(n)}catch(n){console.error("Failed to copy text: ",n)}}}generatePassword(){this.copiedPassword.set(!1);let t=this.#i.generate(16);this.generalForm.controls.password.setValue(t),this.generalForm.controls.repeatPassword.setValue(t),this.showCopyPassword.set(!0)}next(){this.#n.isNew()||this.#n.submit(!0),this.#e.navigate(["destination"],{relativeTo:this.#t.parent})}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=z({type:s,selectors:[["app-general"]],viewQuery:function(e,n){e&1&&Ce(n.formRef,yt,5),e&2&&me()},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 o;o=$localize` Backup name ${"\uFFFD#8\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#8\uFFFD"}:CLOSE_SUPERSCRIPT:`;let r;r=$localize`Backup description`;let F;F=$localize`${"\uFFFD#18\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SPK_ICON: Exit `;let A;A=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:lock${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON: Encrypted backup `;let S;S=$localize`Encryption`;let O;O=$localize`Encryption`;let P;P=$localize`Password`;let L;L=$localize`Repeat password`;let K;K=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let b;b=$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:`,b=Ge(b);let X;X=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:password${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: Generate password `;let D;D=$localize`Passwords do not match`;let ee;ee=$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:`,ee=Ge(ee);let _e;_e=$localize` Tip: Be sure to save your password. If you lose it, you will lose access to your backups. `;let ue;ue=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let ce;return ce=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["formRef",""],i,o,r,F,A,O,K,b,X,D,ee,_e,ue,ce,["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",S,"formControlName","encryption"],[1,"passwords"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",P,"formControlName","password",3,"type"],[1,"raised",3,"error","warn","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",L,"formControlName","repeatPassword",3,"type"],["error",""],[1,"password-actions"],["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=x();l(0,"form",15,0),E("submit",function(){return c(i),p(n.next())}),l(2,"h3",16),f(3,1),a(),y(4,Rt,3,0,"spk-alert",17),l(5,"spk-form-field")(6,"label",18),C(7,2),g(8,"sup"),m(),a(),g(9,"input",19),a(),l(10,"spk-form-field")(11,"label",20),f(12,3),a(),g(13,"textarea",21),a(),y(14,Bt,6,3),l(15,"div",22)(16,"button",23),E("click",function(){return c(i),p(n.exit())}),C(17,4),g(18,"spk-icon"),m(),a(),y(19,vt,3,1,"button",24)(20,Vt,3,1,"button",25),a()()}if(e&2){let i;T("formGroup",n.generalForm),_(4),R(!n.isNew()&&((i=n.generalFormSignal())==null?null:i.encryption)!==""?4:-1),_(10),R(n.isNew()?14:-1),_(5),R(n.encryptionFieldSignal()===n.noneOptionKey||!n.isNew()?19:20)}},dependencies:[Re,Pe,Q,Z,he,De,Me,q,Y,se,j,tt,Je,nt],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding-bottom:1.5rem}sup[_ngcontent-%COMP%]{padding:0 .125rem;color:var(--error-8)}.passwords[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.password-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.copy[_ngcontent-%COMP%] spk-icon.spk-success[_ngcontent-%COMP%]{color:var(--success-8)}"],changeDetection:0})};export{gt as a,de as b,je as c,te as d,Xe as e,pt as f,He as g,J as h};
@@ -1 +1 @@
1
- import{a as B}from"./chunk-VFVXE2DC.js";import{a as b}from"./chunk-RHW5QVAY.js";import{a as h}from"./chunk-BHSG643V.js";import{a as d}from"./chunk-OQHMS5HM.js";import{h as k}from"./chunk-XD6MBGQY.js";import{E as s,F as n,Fc as p,Gc as o,P as u,S as c,X as i,la as a}from"./chunk-67YRCRMI.js";var m="backupListOrderBy",f="backupListShowActualTimes",S=[{value:"id",label:$localize`Backup ID`},{value:"name",label:$localize`Backup name`},{value:"lastrun",label:$localize`Last run time`},{value:"nextrun",label:$localize`Next run time`},{value:"schedule",label:$localize`Is scheduled`},{value:"backend",label:$localize`Destination type`},{value:"sourcesize",label:$localize`Source size`},{value:"destinationsize",label:$localize`Destination size`},{value:"duration",label:$localize`Duration`},{value:"-id",label:$localize`Backup ID (decending)`},{value:"-name",label:$localize`Backup name (decending)`},{value:"-lastrun",label:$localize`Last run time (decending)`},{value:"-nextrun",label:$localize`Next run time (decending)`},{value:"-schedule",label:$localize`Is scheduled (decending)`},{value:"-backend",label:$localize`Destination type (decending)`},{value:"-sourcesize",label:$localize`Source size (decending)`},{value:"-destinationsize",label:$localize`Destination size (decending)`},{value:"-duration",label:$localize`Duration (decending)`}],y=class l{#i=i(d);#l=i(k);#o=i(h);#e=i(B);#u=null;#t=a([]);#a=a([]);#r=a(!1);#n=a(null);#d=a(null);#c=a(this.#i.getItemParsed(f,!0)??"relative");#s=a(this.#i.getItemParsed(m,!0)??"id");orderByOptions=a(S);orderBy=this.#s.asReadonly();backups=this.#a.asReadonly();timeType=this.#c.asReadonly();backupsLoading=this.#r.asReadonly();startingBackup=this.#n.asReadonly();deletingBackup=this.#d.asReadonly();draftBackups=this.#t.asReadonly();#p=p(()=>this.#o.hasBackupListSubscribeOption()&&this.#e.getConnectionMethod()==="websocket");#k=o(()=>{let e=this.#e.backupListState();e&&this.#a.set(e)});addDraftBackup(e){let t=b();return this.#t.set([...this.#t(),{id:t,data:e}]),t}setOrderBy(e){this.#i.setItemParsed(m,e,!0),this.#s.set(e),this.#e.isConnectionMethodSet()&&(this.#p()?this.#e.subscribe("backuplist",e):this.getBackups(!0))}setTimeType(e){this.#i.setItemParsed(f,e,!0),this.#c.set(e)}removeDraftBackupById(e){this.#t.set(this.#t().filter(t=>t.id!==e))}getBackupById(e){return this.#a().find(t=>t.Backup?.ID===e)??null}getBackups(e=!1){if(!this.#e.isConnectionMethodSet())return;if(this.#p()){this.#e.subscribe("backuplist",this.#s());return}let t=this.#u,r=Date.now(),g=t&&r-t<15*60*1e3;t&&r-t<100||!e&&g&&this.#a().length||(this.#u=r,this.#r.set(!0),this.#l.getApiV1Backups({orderBy:this.#s()}).pipe(s(1),u(v=>this.#a.set(v)),n(()=>this.#r.set(!1))).subscribe())}startBackup(e){this.#n.set(e),this.#l.postApiV1BackupByIdStart({id:e}).pipe(s(1),u(()=>this.getBackups(!0)),n(()=>this.#n.set(null))).subscribe()}deleteBackup(e){return this.#l.deleteApiV1BackupById(e).pipe(s(1))}static \u0275fac=function(t){return new(t||l)};static \u0275prov=c({token:l,factory:l.\u0275fac,providedIn:"root"})};export{y as a};
1
+ import{a as B}from"./chunk-JM7VAPIC.js";import{a as b}from"./chunk-RHW5QVAY.js";import{a as h}from"./chunk-6JQM2X3B.js";import{a as d}from"./chunk-FZG6OXT3.js";import{h as k}from"./chunk-DNJOKPEL.js";import{F as s,H as n,Hc as p,Ic as o,R as u,U as c,Z as i,na as a}from"./chunk-BTMXQPBB.js";var m="backupListOrderBy",f="backupListShowActualTimes",S=[{value:"id",label:$localize`Backup ID`},{value:"name",label:$localize`Backup name`},{value:"lastrun",label:$localize`Last run time`},{value:"nextrun",label:$localize`Next run time`},{value:"schedule",label:$localize`Is scheduled`},{value:"backend",label:$localize`Destination type`},{value:"sourcesize",label:$localize`Source size`},{value:"destinationsize",label:$localize`Destination size`},{value:"duration",label:$localize`Duration`},{value:"-id",label:$localize`Backup ID (decending)`},{value:"-name",label:$localize`Backup name (decending)`},{value:"-lastrun",label:$localize`Last run time (decending)`},{value:"-nextrun",label:$localize`Next run time (decending)`},{value:"-schedule",label:$localize`Is scheduled (decending)`},{value:"-backend",label:$localize`Destination type (decending)`},{value:"-sourcesize",label:$localize`Source size (decending)`},{value:"-destinationsize",label:$localize`Destination size (decending)`},{value:"-duration",label:$localize`Duration (decending)`}],y=class l{#i=i(d);#l=i(k);#o=i(h);#e=i(B);#u=null;#t=a([]);#a=a([]);#r=a(!1);#n=a(null);#d=a(null);#c=a(this.#i.getItemParsed(f,!0)??"relative");#s=a(this.#i.getItemParsed(m,!0)??"id");orderByOptions=a(S);orderBy=this.#s.asReadonly();backups=this.#a.asReadonly();timeType=this.#c.asReadonly();backupsLoading=this.#r.asReadonly();startingBackup=this.#n.asReadonly();deletingBackup=this.#d.asReadonly();draftBackups=this.#t.asReadonly();#p=p(()=>this.#o.hasBackupListSubscribeOption()&&this.#e.getConnectionMethod()==="websocket");#k=o(()=>{let e=this.#e.backupListState();e&&this.#a.set(e)});addDraftBackup(e){let t=b();return this.#t.set([...this.#t(),{id:t,data:e}]),t}setOrderBy(e){this.#i.setItemParsed(m,e,!0),this.#s.set(e),this.#e.isConnectionMethodSet()&&(this.#p()?this.#e.subscribe("backuplist",e):this.getBackups(!0))}setTimeType(e){this.#i.setItemParsed(f,e,!0),this.#c.set(e)}removeDraftBackupById(e){this.#t.set(this.#t().filter(t=>t.id!==e))}getBackupById(e){return this.#a().find(t=>t.Backup?.ID===e)??null}getBackups(e=!1){if(!this.#e.isConnectionMethodSet())return;if(this.#p()){this.#e.subscribe("backuplist",this.#s());return}let t=this.#u,r=Date.now(),g=t&&r-t<15*60*1e3;t&&r-t<100||!e&&g&&this.#a().length||(this.#u=r,this.#r.set(!0),this.#l.getApiV1Backups({orderBy:this.#s()}).pipe(s(1),u(v=>this.#a.set(v)),n(()=>this.#r.set(!1))).subscribe())}startBackup(e){this.#n.set(e),this.#l.postApiV1BackupByIdStart({id:e}).pipe(s(1),u(()=>this.getBackups(!0)),n(()=>this.#n.set(null))).subscribe()}deleteBackup(e){return this.#l.deleteApiV1BackupById(e).pipe(s(1))}static \u0275fac=function(t){return new(t||l)};static \u0275prov=c({token:l,factory:l.\u0275fac,providedIn:"root"})};export{y as a};
@@ -1 +1 @@
1
- import{d as O}from"./chunk-DQM3ATT4.js";import{a as R,c as y,h as P}from"./chunk-XD6MBGQY.js";import{d as v,e as i}from"./chunk-WIDMAJIO.js";import{B as A,E as l,F as S,P as p,S as a,X as s,f as g,k as m,la as o,n as d,r as I,va as E}from"./chunk-67YRCRMI.js";var c=class r{platformId=s(E);STORAGE_VERSION="v1";APP_NAME="duplicati";getItemParsed(t,e=!1){return i(this.platformId)?null:JSON.parse(localStorage.getItem(`${this.STORAGE_VERSION}:${e?"presist-duplicati":this.APP_NAME}:${t}`)??"null")}setItemParsed(t,e,n=!1){if(!i(this.platformId))return localStorage.setItem(`${this.STORAGE_VERSION}:${n?"presist-duplicati":this.APP_NAME}:${t}`,JSON.stringify(e))}get length(){return v(this.platformId)?localStorage.length:0}getItem(t){return i(this.platformId)?null:localStorage.getItem(`${this.STORAGE_VERSION}:${this.APP_NAME}:${t}`)??null}setItem(t,e){if(!i(this.platformId))return localStorage.setItem(`${this.STORAGE_VERSION}:${this.APP_NAME}:${t}`,e)}removeItem(t){i(this.platformId)||localStorage.removeItem(`${this.STORAGE_VERSION}:${this.APP_NAME}:${t}`)}clearAllNotCurrentVersion(){if(!i(this.platformId))for(var t in localStorage)!t.startsWith(this.STORAGE_VERSION)&&t.includes(this.APP_NAME)&&localStorage.removeItem(t)}clearAll(){i(this.platformId)||localStorage.clear()}clear(){if(!i(this.platformId))for(var t in localStorage)t.includes(this.APP_NAME)&&!t.includes(`presist-${this.APP_NAME}`)&&localStorage.removeItem(t)}key(t){return i(this.platformId)?null:localStorage.key(t)}static \u0275fac=function(e){return new(e||r)};static \u0275prov=a({token:r,factory:r.\u0275fac})};var f=class r{#n=s(c);#i=o(null);#e=window.self!==window.top;#r=o(this.#e);relayIsEnabled=this.#r.asReadonly();config=this.#i.asReadonly();configLoaded=this.#e?new m:null;isLoading=o(this.#e);parentIframeListner=null;parentOrigin="*";fetchConfig(){this.#s(),this.#e&&(this.#r.set(!0),this.parentIframeListner=new AbortController,this.#t("connected"),window.addEventListener("message",t=>{if(t.data.startsWith("access:")){let e=t.data.replace("access:",""),n=JSON.parse(e);if(!n?.accessToken||!n?.clientId){this.#t("error:invalid-config"),this.#r.set(!1);return}if(typeof n.clientId!="string"){this.#t("error:invalid-config"),this.#r.set(!1);return}if(typeof n.accessToken!="string"){this.#t("error:invalid-config"),this.#r.set(!1);return}let w=this.#n.getItem("locale")??"en-US",h=n.locale??"en-US";w!==h&&(this.#n.setItem("locale",h),window.location.reload()),this.#i.set(n),this.configLoaded?.next(!0),this.isLoading.set(!1),this.#t("handshake-complete")}},{signal:this.parentIframeListner.signal}))}#t(t){window.parent.postMessage(t,"*")}#s(){this.parentIframeListner&&(this.parentIframeListner.abort(),this.parentIframeListner=null)}setConfig(t){this.#i.set(t)}clearConfig(){this.#i.set(null)}static \u0275fac=function(e){return new(e||r)};static \u0275prov=a({token:r,factory:r.\u0275fac,providedIn:"root"})};var u="PROXY_AUTHED_FAKE_TOKEN",k=class r{#n=s(O);#i=s(y);#e=s(P);#r=s(f);#t=o(null);#s=o(!1);token=this.#t.asReadonly();isLoggingOut=this.#s.asReadonly();login(t){return this.#e.postApiV1AuthLogin({requestBody:{Password:t,RememberMe:!0}}).pipe(l(1),p(e=>e.AccessToken&&this.#t.set(e.AccessToken)))}refreshToken(){return this.#r.relayIsEnabled()?(this.#t.set(u),new g(t=>{t.next({AccessToken:u}),t.complete()})):this.#e.postApiV1AuthRefresh().pipe(l(1),p(t=>t.AccessToken&&this.#t.set(t.AccessToken)))}checkProxyAuthed(){let t=new R({"custom-proxy-check":"true"});return this.#i.get("/api/v1/systeminfo",{headers:t}).pipe(I(()=>(this.#t.set(u),!0)),A(()=>d(!1)))}logout(){this.#s.set(!0),this.#e.postApiV1AuthRefreshLogout().pipe(l(1),S(()=>{this.#s.set(!1),this.#t.set(null),this.#n.navigate(["/login"])})).subscribe()}static \u0275fac=function(e){return new(e||r)};static \u0275prov=a({token:r,factory:r.\u0275fac,providedIn:"root"})};export{c as a,f as b,u as c,k as d};
1
+ import{d as O}from"./chunk-2W6BEUGU.js";import{a as R,c as y,h as P}from"./chunk-DNJOKPEL.js";import{d as v,e as i}from"./chunk-WIDMAJIO.js";import{B as A,F as l,H as S,R as p,U as a,Z as s,f as g,k as m,n as d,na as o,r as I,xa as E}from"./chunk-BTMXQPBB.js";var c=class r{platformId=s(E);STORAGE_VERSION="v1";APP_NAME="duplicati";getItemParsed(t,e=!1){return i(this.platformId)?null:JSON.parse(localStorage.getItem(`${this.STORAGE_VERSION}:${e?"presist-duplicati":this.APP_NAME}:${t}`)??"null")}setItemParsed(t,e,n=!1){if(!i(this.platformId))return localStorage.setItem(`${this.STORAGE_VERSION}:${n?"presist-duplicati":this.APP_NAME}:${t}`,JSON.stringify(e))}get length(){return v(this.platformId)?localStorage.length:0}getItem(t){return i(this.platformId)?null:localStorage.getItem(`${this.STORAGE_VERSION}:${this.APP_NAME}:${t}`)??null}setItem(t,e){if(!i(this.platformId))return localStorage.setItem(`${this.STORAGE_VERSION}:${this.APP_NAME}:${t}`,e)}removeItem(t){i(this.platformId)||localStorage.removeItem(`${this.STORAGE_VERSION}:${this.APP_NAME}:${t}`)}clearAllNotCurrentVersion(){if(!i(this.platformId))for(var t in localStorage)!t.startsWith(this.STORAGE_VERSION)&&t.includes(this.APP_NAME)&&localStorage.removeItem(t)}clearAll(){i(this.platformId)||localStorage.clear()}clear(){if(!i(this.platformId))for(var t in localStorage)t.includes(this.APP_NAME)&&!t.includes(`presist-${this.APP_NAME}`)&&localStorage.removeItem(t)}key(t){return i(this.platformId)?null:localStorage.key(t)}static \u0275fac=function(e){return new(e||r)};static \u0275prov=a({token:r,factory:r.\u0275fac})};var f=class r{#n=s(c);#i=o(null);#e=window.self!==window.top;#r=o(this.#e);relayIsEnabled=this.#r.asReadonly();config=this.#i.asReadonly();configLoaded=this.#e?new m:null;isLoading=o(this.#e);parentIframeListner=null;parentOrigin="*";fetchConfig(){this.#s(),this.#e&&(this.#r.set(!0),this.parentIframeListner=new AbortController,this.#t("connected"),window.addEventListener("message",t=>{if(t.data.startsWith("access:")){let e=t.data.replace("access:",""),n=JSON.parse(e);if(!n?.accessToken||!n?.clientId){this.#t("error:invalid-config"),this.#r.set(!1);return}if(typeof n.clientId!="string"){this.#t("error:invalid-config"),this.#r.set(!1);return}if(typeof n.accessToken!="string"){this.#t("error:invalid-config"),this.#r.set(!1);return}let w=this.#n.getItem("locale")??"en-US",h=n.locale??"en-US";w!==h&&(this.#n.setItem("locale",h),window.location.reload()),this.#i.set(n),this.configLoaded?.next(!0),this.isLoading.set(!1),this.#t("handshake-complete")}},{signal:this.parentIframeListner.signal}))}#t(t){window.parent.postMessage(t,"*")}#s(){this.parentIframeListner&&(this.parentIframeListner.abort(),this.parentIframeListner=null)}setConfig(t){this.#i.set(t)}clearConfig(){this.#i.set(null)}static \u0275fac=function(e){return new(e||r)};static \u0275prov=a({token:r,factory:r.\u0275fac,providedIn:"root"})};var u="PROXY_AUTHED_FAKE_TOKEN",k=class r{#n=s(O);#i=s(y);#e=s(P);#r=s(f);#t=o(null);#s=o(!1);token=this.#t.asReadonly();isLoggingOut=this.#s.asReadonly();login(t){return this.#e.postApiV1AuthLogin({requestBody:{Password:t,RememberMe:!0}}).pipe(l(1),p(e=>e.AccessToken&&this.#t.set(e.AccessToken)))}refreshToken(){return this.#r.relayIsEnabled()?(this.#t.set(u),new g(t=>{t.next({AccessToken:u}),t.complete()})):this.#e.postApiV1AuthRefresh().pipe(l(1),p(t=>t.AccessToken&&this.#t.set(t.AccessToken)))}checkProxyAuthed(){let t=new R({"custom-proxy-check":"true"});return this.#i.get("/api/v1/systeminfo",{headers:t}).pipe(I(()=>(this.#t.set(u),!0)),A(()=>d(!1)))}logout(){this.#s.set(!0),this.#e.postApiV1AuthRefreshLogout().pipe(l(1),S(()=>{this.#s.set(!1),this.#t.set(null),this.#n.navigate(["/login"])})).subscribe()}static \u0275fac=function(e){return new(e||r)};static \u0275prov=a({token:r,factory:r.\u0275fac,providedIn:"root"})};export{c as a,f as b,u as c,k as d};
@@ -1 +1 @@
1
- import{a as m}from"./chunk-JDCGGJ7O.js";import{X as p,bb as a}from"./chunk-67YRCRMI.js";var u=class e{#t=p(m);transform(t,n=!1,...f){if(!t)return"";let r=t.split(".")[0],s=parseInt(r.split(":")[0])??0,i=parseInt(r.split(":")[1])??0,o=parseInt(r.split(":")[2])??0;return n?`${s}h ${i}m ${o}s`:this.#t.duration({hours:s,minutes:i,seconds:o}).humanize()}static \u0275fac=function(n){return new(n||e)};static \u0275pipe=a({name:"durationFormat",type:e,pure:!0})};export{u as a};
1
+ import{a as m}from"./chunk-LKJ2SBQA.js";import{Z as p,db as a}from"./chunk-BTMXQPBB.js";var u=class e{#t=p(m);transform(t,n=!1,...f){if(!t)return"";let r=t.split(".")[0],s=parseInt(r.split(":")[0])??0,i=parseInt(r.split(":")[1])??0,o=parseInt(r.split(":")[2])??0;return n?`${s}h ${i}m ${o}s`:this.#t.duration({hours:s,minutes:i,seconds:o}).humanize()}static \u0275fac=function(n){return new(n||e)};static \u0275pipe=a({name:"durationFormat",type:e,pure:!0})};export{u as a};
@@ -0,0 +1 @@
1
+ import{a}from"./chunk-WXARH2SG.js";import"./chunk-CWLTHXVS.js";import"./chunk-WIDMAJIO.js";import"./chunk-BTMXQPBB.js";import"./chunk-EUDKD2JW.js";export{a as BytesPipe};
@@ -0,0 +1 @@
1
+ import{d as a,e as b}from"./chunk-FUEIZLWH.js";import"./chunk-XIIFTZ5G.js";import"./chunk-BCHZRC5K.js";import"./chunk-B26UYXA3.js";import"./chunk-LDIZ5E5Z.js";import"./chunk-2BX65XJQ.js";import"./chunk-RHW5QVAY.js";import"./chunk-6JQM2X3B.js";import"./chunk-NSIELNIY.js";import"./chunk-2W6BEUGU.js";import"./chunk-JFOXV66M.js";import"./chunk-Y5IRBMLB.js";import"./chunk-DNJOKPEL.js";import"./chunk-CWLTHXVS.js";import"./chunk-WIDMAJIO.js";import"./chunk-BTMXQPBB.js";import"./chunk-EUDKD2JW.js";export{a as SCHEDULE_FIELD_DEFAULTS,b as default};
@@ -0,0 +1 @@
1
+ import{a}from"./chunk-UFP4XKZF.js";import"./chunk-CWLTHXVS.js";import"./chunk-WIDMAJIO.js";import"./chunk-LKJ2SBQA.js";import"./chunk-BTMXQPBB.js";import"./chunk-EUDKD2JW.js";export{a as RelativeTimePipe};
@@ -1 +1 @@
1
- import{a as S}from"./chunk-CFESUDFC.js";import"./chunk-NZD6UMYZ.js";import"./chunk-B6DE3TTE.js";import"./chunk-VFVXE2DC.js";import"./chunk-FC45TEB6.js";import"./chunk-RHW5QVAY.js";import"./chunk-BHSG643V.js";import"./chunk-3Q5JEF3K.js";import"./chunk-ZCT7SRIM.js";import"./chunk-OQHMS5HM.js";import{c as O,e as C,f as d}from"./chunk-DQM3ATT4.js";import"./chunk-BSRYIN2F.js";import{y as M}from"./chunk-DNBOZ26J.js";import"./chunk-XD6MBGQY.js";import"./chunk-4VPA3END.js";import"./chunk-GP2W7XZF.js";import"./chunk-WIDMAJIO.js";import"./chunk-JDCGGJ7O.js";import{Jb as n,_a as A,vb as e,wb as t,xb as l}from"./chunk-67YRCRMI.js";import"./chunk-EUDKD2JW.js";var s=class a{static \u0275fac=function(o){return new(o||a)};static \u0275cmp=A({type:a,selectors:[["app-about"]],decls:19,vars:0,consts:()=>{let _;_=$localize`General`;let o;o=$localize`Changelog`;let r;r=$localize`Libraries`;let g;g=$localize`System info`;let u;u=$localize`Server settings`;let T;T=$localize`Logs`;let c;return c=$localize`Crash log`,[_,o,r,g,u,T,c,[1,"content"],[1,"primary"],["tab","","routerLink","/about/general","routerLinkActive","active"],["tab","","routerLink","/about/changelog","routerLinkActive","active"],["tab","","routerLink","/about/libraries","routerLinkActive","active"],["tab","","routerLink","/about/system-info","routerLinkActive","active"],["tab","","routerLink","/about/server-settings","routerLinkActive","active"],["tab","","routerLink","/about/logs","routerLinkActive","active"],["tab","","routerLink","/about/crashlogs","routerLinkActive","active"]]},template:function(o,r){o&1&&(l(0,"app-status-bar"),e(1,"div",7)(2,"spk-tabs",8)(3,"button",9),n(4,0),t(),e(5,"button",10),n(6,1),t(),e(7,"button",11),n(8,2),t(),e(9,"button",12),n(10,3),t(),e(11,"button",13),n(12,4),t(),e(13,"button",14),n(14,5),t(),e(15,"button",15),n(16,6),t()(),e(17,"section"),l(18,"router-outlet"),t()())},dependencies:[S,M,O,C,d],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:0}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:1rem 0}.content[_ngcontent-%COMP%] spk-tabs[_ngcontent-%COMP%]{margin:0 2rem}.content[_ngcontent-%COMP%] section[_ngcontent-%COMP%]{padding-left:2rem}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:2rem}"],changeDetection:0})};export{s as default};
1
+ import{a as S}from"./chunk-XLKQSWFD.js";import"./chunk-ROOTIQEO.js";import"./chunk-FUZLIOUQ.js";import"./chunk-JM7VAPIC.js";import"./chunk-2BX65XJQ.js";import"./chunk-RHW5QVAY.js";import"./chunk-6JQM2X3B.js";import"./chunk-WXARH2SG.js";import"./chunk-NSIELNIY.js";import"./chunk-FZG6OXT3.js";import{c as O,e as C,f as d}from"./chunk-2W6BEUGU.js";import"./chunk-JFOXV66M.js";import{y as M}from"./chunk-Y5IRBMLB.js";import"./chunk-DNJOKPEL.js";import"./chunk-UFP4XKZF.js";import"./chunk-CWLTHXVS.js";import"./chunk-WIDMAJIO.js";import"./chunk-LKJ2SBQA.js";import{Ab as l,Mb as n,ab as A,yb as e,zb as t}from"./chunk-BTMXQPBB.js";import"./chunk-EUDKD2JW.js";var s=class a{static \u0275fac=function(o){return new(o||a)};static \u0275cmp=A({type:a,selectors:[["app-about"]],decls:19,vars:0,consts:()=>{let _;_=$localize`General`;let o;o=$localize`Changelog`;let r;r=$localize`Libraries`;let g;g=$localize`System info`;let u;u=$localize`Server settings`;let T;T=$localize`Logs`;let c;return c=$localize`Crash log`,[_,o,r,g,u,T,c,[1,"content"],[1,"primary"],["tab","","routerLink","/about/general","routerLinkActive","active"],["tab","","routerLink","/about/changelog","routerLinkActive","active"],["tab","","routerLink","/about/libraries","routerLinkActive","active"],["tab","","routerLink","/about/system-info","routerLinkActive","active"],["tab","","routerLink","/about/server-settings","routerLinkActive","active"],["tab","","routerLink","/about/logs","routerLinkActive","active"],["tab","","routerLink","/about/crashlogs","routerLinkActive","active"]]},template:function(o,r){o&1&&(l(0,"app-status-bar"),e(1,"div",7)(2,"spk-tabs",8)(3,"button",9),n(4,0),t(),e(5,"button",10),n(6,1),t(),e(7,"button",11),n(8,2),t(),e(9,"button",12),n(10,3),t(),e(11,"button",13),n(12,4),t(),e(13,"button",14),n(14,5),t(),e(15,"button",15),n(16,6),t()(),e(17,"section"),l(18,"router-outlet"),t()())},dependencies:[S,M,O,C,d],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:0}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:1rem 0}.content[_ngcontent-%COMP%] spk-tabs[_ngcontent-%COMP%]{margin:0 2rem}.content[_ngcontent-%COMP%] section[_ngcontent-%COMP%]{padding-left:2rem}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:2rem}"],changeDetection:0})};export{s as default};
@@ -0,0 +1 @@
1
+ import{a as D,b as se,c as ie}from"./chunk-CWLTHXVS.js";import{a as ae,b as ce,e as le,f as de}from"./chunk-WIDMAJIO.js";import{$ as Z,Ba as U,Ca as E,Da as S,Ea as K,Fa as W,Ga as q,Ha as J,Ia as Q,Ja as ee,Ka as te,La as v,Ra as T,S as h,Ta as ne,U as f,Vc as oe,X as w,Y as a,gb as re,ia as p,ib as _,ka as P,ua as Y,va as k,wa as X,xa as M,ya as j}from"./chunk-BTMXQPBB.js";import{a as H}from"./chunk-EUDKD2JW.js";var L=new w(""),V=(()=>{class r{_zone;_plugins;_eventNameToPlugin=new Map;constructor(e,t){this._zone=t,e.forEach(o=>{o.manager=this}),this._plugins=e.slice().reverse()}addEventListener(e,t,o,s){return this._findPluginFor(t).addEventListener(e,t,o,s)}getZone(){return this._zone}_findPluginFor(e){let t=this._eventNameToPlugin.get(e);if(t)return t;if(t=this._plugins.find(s=>s.supports(e)),!t)throw new h(5101,!1);return this._eventNameToPlugin.set(e,t),t}static \u0275fac=function(t){return new(t||r)(a(L),a(_))};static \u0275prov=f({token:r,factory:r.\u0275fac})}return r})(),R=class{_doc;constructor(n){this._doc=n}manager},A="ng-app-id";function ue(r){for(let n of r)n.remove()}function fe(r,n){let e=n.createElement("style");return e.textContent=r,e}function Se(r,n,e,t){let o=r.head?.querySelectorAll(`style[${A}="${n}"],link[${A}="${n}"]`);if(o)for(let s of o)s.removeAttribute(A),s instanceof HTMLLinkElement?t.set(s.href.slice(s.href.lastIndexOf("/")+1),{usage:0,elements:[s]}):s.textContent&&e.set(s.textContent,{usage:0,elements:[s]})}function B(r,n){let e=n.createElement("link");return e.setAttribute("rel","stylesheet"),e.setAttribute("href",r),e}var z=(()=>{class r{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;isServer;constructor(e,t,o,s={}){this.doc=e,this.appId=t,this.nonce=o,this.isServer=le(s),Se(e,t,this.inline,this.external),this.hosts.add(e.head)}addStyles(e,t){for(let o of e)this.addUsage(o,this.inline,fe);t?.forEach(o=>this.addUsage(o,this.external,B))}removeStyles(e,t){for(let o of e)this.removeUsage(o,this.inline);t?.forEach(o=>this.removeUsage(o,this.external))}addUsage(e,t,o){let s=t.get(e);s?s.usage++:t.set(e,{usage:1,elements:[...this.hosts].map(i=>this.addElement(i,o(e,this.doc)))})}removeUsage(e,t){let o=t.get(e);o&&(o.usage--,o.usage<=0&&(ue(o.elements),t.delete(e)))}ngOnDestroy(){for(let[,{elements:e}]of[...this.inline,...this.external])ue(e);this.hosts.clear()}addHost(e){this.hosts.add(e);for(let[t,{elements:o}]of this.inline)o.push(this.addElement(e,fe(t,this.doc)));for(let[t,{elements:o}]of this.external)o.push(this.addElement(e,B(t,this.doc)))}removeHost(e){this.hosts.delete(e)}addElement(e,t){return this.nonce&&t.setAttribute("nonce",this.nonce),this.isServer&&t.setAttribute(A,this.appId),e.appendChild(t)}static \u0275fac=function(t){return new(t||r)(a(p),a(k),a(j,8),a(M))};static \u0275prov=f({token:r,factory:r.\u0275fac})}return r})(),x={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/Math/MathML"},$=/%COMP%/g;var me="%COMP%",we=`_nghost-${me}`,Me=`_ngcontent-${me}`,Te=!0,_e=new w("",{providedIn:"root",factory:()=>Te});function De(r){return Me.replace($,r)}function Re(r){return we.replace($,r)}function ge(r,n){return n.map(e=>e.replace($,r))}var G=(()=>{class r{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;platformId;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;platformIsServer;constructor(e,t,o,s,i,c,d,u=null,l=null){this.eventManager=e,this.sharedStylesHost=t,this.appId=o,this.removeStylesOnCompDestroy=s,this.doc=i,this.platformId=c,this.ngZone=d,this.nonce=u,this.tracingService=l,this.platformIsServer=!1,this.defaultRenderer=new C(e,i,d,this.platformIsServer,this.tracingService)}createRenderer(e,t){if(!e||!t)return this.defaultRenderer;let o=this.getOrCreateRenderer(e,t);return o instanceof I?o.applyToHost(e):o instanceof b&&o.applyStyles(),o}getOrCreateRenderer(e,t){let o=this.rendererByCompId,s=o.get(t.id);if(!s){let i=this.doc,c=this.ngZone,d=this.eventManager,u=this.sharedStylesHost,l=this.removeStylesOnCompDestroy,g=this.platformIsServer,m=this.tracingService;switch(t.encapsulation){case U.Emulated:s=new I(d,u,t,this.appId,l,i,c,g,m);break;case U.ShadowDom:return new F(d,u,e,t,i,c,this.nonce,g,m);default:s=new b(d,u,t,l,i,c,g,m);break}o.set(t.id,s)}return s}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(e){this.rendererByCompId.delete(e)}static \u0275fac=function(t){return new(t||r)(a(V),a(z),a(k),a(_e),a(p),a(M),a(_),a(j),a(re,8))};static \u0275prov=f({token:r,factory:r.\u0275fac})}return r})(),C=class{eventManager;doc;ngZone;platformIsServer;tracingService;data=Object.create(null);throwOnSyntheticProps=!0;constructor(n,e,t,o,s){this.eventManager=n,this.doc=e,this.ngZone=t,this.platformIsServer=o,this.tracingService=s}destroy(){}destroyNode=null;createElement(n,e){return e?this.doc.createElementNS(x[e]||e,n):this.doc.createElement(n)}createComment(n){return this.doc.createComment(n)}createText(n){return this.doc.createTextNode(n)}appendChild(n,e){(pe(n)?n.content:n).appendChild(e)}insertBefore(n,e,t){n&&(pe(n)?n.content:n).insertBefore(e,t)}removeChild(n,e){e.remove()}selectRootElement(n,e){let t=typeof n=="string"?this.doc.querySelector(n):n;if(!t)throw new h(-5104,!1);return e||(t.textContent=""),t}parentNode(n){return n.parentNode}nextSibling(n){return n.nextSibling}setAttribute(n,e,t,o){if(o){e=o+":"+e;let s=x[o];s?n.setAttributeNS(s,e,t):n.setAttribute(e,t)}else n.setAttribute(e,t)}removeAttribute(n,e,t){if(t){let o=x[t];o?n.removeAttributeNS(o,e):n.removeAttribute(`${t}:${e}`)}else n.removeAttribute(e)}addClass(n,e){n.classList.add(e)}removeClass(n,e){n.classList.remove(e)}setStyle(n,e,t,o){o&(T.DashCase|T.Important)?n.style.setProperty(e,t,o&T.Important?"important":""):n.style[e]=t}removeStyle(n,e,t){t&T.DashCase?n.style.removeProperty(e):n.style[e]=""}setProperty(n,e,t){n!=null&&(n[e]=t)}setValue(n,e){n.nodeValue=e}listen(n,e,t,o){if(typeof n=="string"&&(n=D().getGlobalEventTarget(this.doc,n),!n))throw new h(5102,!1);let s=this.decoratePreventDefault(t);return this.tracingService?.wrapEventListener&&(s=this.tracingService.wrapEventListener(n,e,s)),this.eventManager.addEventListener(n,e,s,o)}decoratePreventDefault(n){return e=>{if(e==="__ngUnwrap__")return n;n(e)===!1&&e.preventDefault()}}};function pe(r){return r.tagName==="TEMPLATE"&&r.content!==void 0}var F=class extends C{sharedStylesHost;hostEl;shadowRoot;constructor(n,e,t,o,s,i,c,d,u){super(n,s,i,d,u),this.sharedStylesHost=e,this.hostEl=t,this.shadowRoot=t.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let l=o.styles;l=ge(o.id,l);for(let m of l){let y=document.createElement("style");c&&y.setAttribute("nonce",c),y.textContent=m,this.shadowRoot.appendChild(y)}let g=o.getExternalStyles?.();if(g)for(let m of g){let y=B(m,s);c&&y.setAttribute("nonce",c),this.shadowRoot.appendChild(y)}}nodeOrShadowRoot(n){return n===this.hostEl?this.shadowRoot:n}appendChild(n,e){return super.appendChild(this.nodeOrShadowRoot(n),e)}insertBefore(n,e,t){return super.insertBefore(this.nodeOrShadowRoot(n),e,t)}removeChild(n,e){return super.removeChild(null,e)}parentNode(n){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(n)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},b=class extends C{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(n,e,t,o,s,i,c,d,u){super(n,s,i,c,d),this.sharedStylesHost=e,this.removeStylesOnCompDestroy=o;let l=t.styles;this.styles=u?ge(u,l):l,this.styleUrls=t.getExternalStyles?.(u)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},I=class extends b{contentAttr;hostAttr;constructor(n,e,t,o,s,i,c,d,u){let l=o+"-"+t.id;super(n,e,t,s,i,c,d,u,l),this.contentAttr=De(l),this.hostAttr=Re(l)}applyToHost(n){this.applyStyles(),this.setAttribute(n,this.hostAttr,"")}createElement(n,e){let t=super.createElement(n,e);return super.setAttribute(t,this.contentAttr,""),t}};var N=class r extends ie{supportsDOMEvents=!0;static makeCurrent(){se(new r)}onAndCancel(n,e,t,o){return n.addEventListener(e,t,o),()=>{n.removeEventListener(e,t,o)}}dispatchEvent(n,e){n.dispatchEvent(e)}remove(n){n.remove()}createElement(n,e){return e=e||this.getDefaultDocument(),e.createElement(n)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(n){return n.nodeType===Node.ELEMENT_NODE}isShadowRoot(n){return n instanceof DocumentFragment}getGlobalEventTarget(n,e){return e==="window"?window:e==="document"?n:e==="body"?n.body:null}getBaseHref(n){let e=Ae();return e==null?null:Ie(e)}resetBaseElement(){O=null}getUserAgent(){return window.navigator.userAgent}getCookie(n){return ae(document.cookie,n)}},O=null;function Ae(){return O=O||document.head.querySelector("base"),O?O.getAttribute("href"):null}function Ie(r){return new URL(r,document.baseURI).pathname}var Le=(()=>{class r{build(){return new XMLHttpRequest}static \u0275fac=function(t){return new(t||r)};static \u0275prov=f({token:r,factory:r.\u0275fac})}return r})(),ye=(()=>{class r extends R{constructor(e){super(e)}supports(e){return!0}addEventListener(e,t,o,s){return e.addEventListener(t,o,s),()=>this.removeEventListener(e,t,o,s)}removeEventListener(e,t,o,s){return e.removeEventListener(t,o,s)}static \u0275fac=function(t){return new(t||r)(a(p))};static \u0275prov=f({token:r,factory:r.\u0275fac})}return r})(),ve=["alt","control","meta","shift"],Ne={"\b":"Backspace"," ":"Tab","\x7F":"Delete","\x1B":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},He={alt:r=>r.altKey,control:r=>r.ctrlKey,meta:r=>r.metaKey,shift:r=>r.shiftKey},Ee=(()=>{class r extends R{constructor(e){super(e)}supports(e){return r.parseEventName(e)!=null}addEventListener(e,t,o,s){let i=r.parseEventName(t),c=r.eventCallback(i.fullKey,o,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>D().onAndCancel(e,i.domEventName,c,s))}static parseEventName(e){let t=e.toLowerCase().split("."),o=t.shift();if(t.length===0||!(o==="keydown"||o==="keyup"))return null;let s=r._normalizeKey(t.pop()),i="",c=t.indexOf("code");if(c>-1&&(t.splice(c,1),i="code."),ve.forEach(u=>{let l=t.indexOf(u);l>-1&&(t.splice(l,1),i+=u+".")}),i+=s,t.length!=0||s.length===0)return null;let d={};return d.domEventName=o,d.fullKey=i,d}static matchEventFullKeyCode(e,t){let o=Ne[e.key]||e.key,s="";return t.indexOf("code.")>-1&&(o=e.code,s="code."),o==null||!o?!1:(o=o.toLowerCase(),o===" "?o="space":o==="."&&(o="dot"),ve.forEach(i=>{if(i!==o){let c=He[i];c(e)&&(s+=i+".")}}),s+=o,s===t)}static eventCallback(e,t,o){return s=>{r.matchEventFullKeyCode(s,e)&&o.runGuarded(()=>t(s))}}static _normalizeKey(e){return e==="esc"?"escape":e}static \u0275fac=function(t){return new(t||r)(a(p))};static \u0275prov=f({token:r,factory:r.\u0275fac})}return r})();function Pe(r,n){return oe(H({rootComponent:r},ke(n)))}function ke(r){return{appProviders:[...Fe,...r?.providers??[]],platformProviders:Be}}function je(){N.makeCurrent()}function Ue(){return new P}function xe(){return Y(document),document}var Be=[{provide:M,useValue:ce},{provide:X,useValue:je,multi:!0},{provide:p,useFactory:xe}];var Fe=[{provide:Z,useValue:"root"},{provide:P,useFactory:Ue},{provide:L,useClass:ye,multi:!0,deps:[p]},{provide:L,useClass:Ee,multi:!0,deps:[p]},G,z,V,{provide:ne,useExisting:G},{provide:de,useClass:Le},[]];var Ft=(()=>{class r{_doc;constructor(e){this._doc=e}getTitle(){return this._doc.title}setTitle(e){this._doc.title=e||""}static \u0275fac=function(t){return new(t||r)(a(p))};static \u0275prov=f({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var ze=(()=>{class r{static \u0275fac=function(t){return new(t||r)};static \u0275prov=f({token:r,factory:function(t){let o=null;return t?o=new(t||r):o=a($e),o},providedIn:"root"})}return r})(),$e=(()=>{class r extends ze{_doc;constructor(e){super(),this._doc=e}sanitize(e,t){if(t==null)return null;switch(e){case v.NONE:return t;case v.HTML:return S(t,"HTML")?E(t):te(this._doc,String(t)).toString();case v.STYLE:return S(t,"Style")?E(t):t;case v.SCRIPT:if(S(t,"Script"))return E(t);throw new h(5200,!1);case v.URL:return S(t,"URL")?E(t):ee(String(t));case v.RESOURCE_URL:if(S(t,"ResourceURL"))return E(t);throw new h(5201,!1);default:throw new h(5202,!1)}}bypassSecurityTrustHtml(e){return K(e)}bypassSecurityTrustStyle(e){return W(e)}bypassSecurityTrustScript(e){return q(e)}bypassSecurityTrustUrl(e){return J(e)}bypassSecurityTrustResourceUrl(e){return Q(e)}static \u0275fac=function(t){return new(t||r)(a(p))};static \u0275prov=f({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();export{Pe as a,Ft as b,ze as c};
@@ -0,0 +1 @@
1
+ import{a as D}from"./chunk-6JQM2X3B.js";import{b as L,d as j}from"./chunk-FZG6OXT3.js";import{e as m}from"./chunk-Y5IRBMLB.js";import{h as b}from"./chunk-DNJOKPEL.js";import{qa as $}from"./chunk-CWLTHXVS.js";import{Ab as I,Hc as d,Ic as G,Kb as _,Lb as w,Mb as A,Nb as F,Ob as M,Q as O,Qa as R,U as p,Z as c,ab as N,f as g,i as k,na as n,wc as P,yb as y,yc as W,zb as C}from"./chunk-BTMXQPBB.js";var S=class i{reconnectTimer=n(15e3);countdown=n(0);connectTimerEffect=G(()=>{let e=this.reconnectTimer();this.countdown.set(e/1e3)});interval=setInterval(()=>{if(this.countdown()<=1){this.countdown.set(this.reconnectTimer()/1e3);return}this.countdown.set(this.countdown()-1)},1e3);ngOnDestroy(){clearInterval(this.interval)}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=N({type:i,selectors:[["app-disconnected-dialog"]],decls:8,vars:4,consts:()=>{let e;e=$localize`Reconnecting...`;let t;return t=$localize` The connection to the server is lost, attempting again in ${"\uFFFD#6\uFFFD"}:START_TAG_STRONG:0:${"\uFFFD0\uFFFD"}:INTERPOLATION:${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_STRONG:`,[e,t,["header",""],["content",""]]},template:function(t,s){t&1&&(y(0,"header",2)(1,"h3"),A(2,0),C()(),y(3,"div",3)(4,"p"),_(5,1),I(6,"strong"),P(7,"number"),w(),C()()),t&2&&(R(7),F(W(7,1,s.countdown(),"2.0-0")),M(5))},dependencies:[$],styles:["[_nghost-%COMP%]{display:block;padding:1rem}"],changeDetection:0})};var v=class i{dialog=c(m);#t=c(b);#i=n("disconnected");#s=n(null);#e=n(-1);#r=n(0);#l=n(!1);#u=new k;connectionStatus=this.#i.asReadonly();serverState=this.#s.asReadonly();#n=void 0;duration=c(L).relayIsEnabled()?"94s":"299s";start(){this.#l.set(!0),this.#u=new k,this.#o()}stop(){this.#u.next(),this.#u.complete(),this.#l.set(!1)}reconnect(){this.stop(),this.start()}reconnectIfNeeded(){this.#l()||this.reconnect()}#o(){this.#i.set("connecting"),this.#t.getApiV1Serverstate({lastEventId:this.#e(),longpoll:this.#e()>=0,duration:this.duration}).pipe(O(this.#u)).subscribe({next:e=>{e&&this.#c(e),this.#a()},error:e=>{let s=this.#r()+1,a=Math.min(5e3*s,3e4);this.#r.set(s),s>3&&this.#i.set("disconnected"),this.#n||(this.#n=this.dialog.open(S,{closeOnButton:!1,closeOnEsc:!1,closeOnOutsideClick:!1})),this.#n.component.reconnectTimer.set(a),setTimeout(()=>{this.#o()},a)}})}#c(e){this.#i.set("connected"),this.#s.set(e),this.#e.set(e.LastEventID??-1),this.#r.set(0)}#a(){this.#l()&&this.#o()}static \u0275fac=function(t){return new(t||i)};static \u0275prov=p({token:i,factory:i.\u0275fac,providedIn:"root"})};var u=!1,T=class i{#t=c(j);#i=c(D);dialog=c(m);#s=null;#e=n("disconnected");#r=n(null);#l=n(null);#u=n(null);#n=n(null);#o=void 0;#c=n({legacystatus:!0});shouldConnect=n(!0);connectionStatus=this.#e.asReadonly();serverState=this.#r.asReadonly();serverProgress=this.#l.asReadonly();subscriptions=this.#c.asReadonly();serverTaskQueue=this.#u.asReadonly();backupListState=this.#n.asReadonly();#a=null;taskCompleted=new g(e=>{this.#a=e});#p=0;start(){this.#h(),this.shouldConnect.set(!0)}#h(){let e=this.#t.token();if(!e){console.error("No access token available");return}let t=window.location.protocol==="https:"?"wss:":"ws:",s=window.location.port?`:${window.location.port}`:"";window.location.port==="4200"&&(s=":8200");let a=window.location.hostname,f=this.#i.hasWebSocketAuth()?`${t}//${a}${s}/notifications`:`${t}//${a}${s}/notifications?token=${e}`;this.#e.set("connecting"),this.#s=new WebSocket(f),this.#s.onopen=()=>{u&&console.log("WebSocket connection established"),this.#i.hasWebSocketAuth()?(this.#e.set("authenticating"),this.#s?.send(JSON.stringify({Version:1,Token:e}))):this.#d()},this.#s.onmessage=h=>{if(this.#e()==="authenticating")try{let o=JSON.parse(h.data);o.Success?(u&&console.log("WebSocket authentication successful"),this.#d()):(console.error("WebSocket authentication failed:",o.Message),this.#e.set("disconnected"));return}catch(o){console.error("Error parsing WebSocket authentication reply",o),this.#e.set("disconnected");return}try{let o=JSON.parse(h.data),l=o?.Type;if(l==="legacystatus"||l==null)u&&console.log("Received legacy status update:",o),this.#r.set(o);else if(l==="reply"){let r=o;r.Success||console.error("WebSocket reply error:",r.Message)}else if(l==="progress"){let r=o;u&&console.log("Received progress update:",r.Data),this.#l.set(r.Data)}else if(l==="taskqueue"){let r=o;u&&console.log("Received task update:",r.Data),this.#u.set(r.Data)}else if(l==="taskcompleted"){let r=o;u&&console.log("Received task completed:",r.Data),this.#a?.next(r.Data)}else if(l==="backuplist"){let r=o;u&&console.log("Received backup list update:",r.Data),this.#n.set(r.Data)}else console.warn("Unknown WebSocket message type:",l)}catch(o){console.error("Error parsing WebSocket message",o)}},this.#s.onclose=h=>{u&&console.log("WebSocket connection closed",h),this.#e.set("disconnected"),this.shouldConnect()&&(this.#o||(this.#o=this.dialog.open(S,{closeOnButton:!1,closeOnEsc:!1,closeOnOutsideClick:!1}),this.#o.component.reconnectTimer.set(15e3)),setTimeout(()=>this.#h(),5e3))},this.#s.onerror=h=>{console.error("WebSocket error",h),this.#e.set("disconnected")}}#d(){this.#e.set("connected");let e=this.#c();Object.keys(e).length>0&&Object.entries(e).forEach(([t,s])=>{s!=null&&this.sendSubscribeRequest(t,s)}),this.#o&&this.#o.close()}stop(){this.shouldConnect.set(!1),this.#s?.close()}reconnect(){this.#s?.close(),this.start()}reconnectIfNeeded(){this.#s?.readyState!==WebSocket.OPEN&&this.reconnect()}sendSubscribeRequest(e,t){this.#s?.send(JSON.stringify({Version:1,Id:`req-${++this.#p}`,Action:"sub",Service:e,Data:t||null}))}subscribe(e,t=void 0){let s=this.#c(),a=s[e];(!a||JSON.stringify(a)!==JSON.stringify(t||!0))&&(s[e]=t||!0,this.#c.set(s),this.#e()=="connected"&&this.sendSubscribeRequest(e,t))}unsubscribe(e){let t=this.#c();t[e]&&(delete t[e],this.#c.set(t),this.#e()=="connected"&&this.#s?.send(JSON.stringify({Version:1,Id:`req-${++this.#p}`,Action:"unsub",Service:e})))}static \u0275fac=function(t){return new(t||i)};static \u0275prov=p({token:i,factory:i.\u0275fac,providedIn:"root"})};var x=10,q=class i{#t=c(T);#i=c(v);#s=c(b);#e=c(D);#r=n("longpoll");#l=n(!1);#u=d(()=>this.#e.hasTaskCompletedOption()&&this.#r()==="websocket");#n={};#o=null;#c=!1;#a=[];constructor(){this.#t.subscribe("taskcompleted"),this.#t.taskCompleted.subscribe(e=>{if(this.#a.unshift(e),this.#a.length>x&&this.#a.pop(),!e.ID)return;let t=this.#n[e.ID];t&&(t.forEach(s=>{s.next(e),s.complete()}),delete this.#n[e.ID])})}connectionStatus=d(()=>this.#r()==="websocket"?this.#t.connectionStatus():this.#i.connectionStatus());isConnectionMethodSet=this.#l.asReadonly();serverState=d(()=>this.#r()==="websocket"?this.#t.serverState():this.#i.serverState());progressState=this.#t.serverProgress;taskQueueState=this.#t.serverTaskQueue;activeTaskQueueState=d(()=>this.#r()==="websocket"?this.#t.serverTaskQueue()?.map(t=>t.ID).filter(t=>t)??[]:(this.#i.serverState()?.SchedulerQueueIds??[]).map(t=>t.Item1).filter(t=>t));backupListState=d(()=>this.#t.backupListState());setConnectionMethod(e){e==="websocket"?(this.#t.reconnectIfNeeded(),this.#i.stop()):(this.#i.reconnectIfNeeded(),this.#t.stop()),this.#r.set(e),this.#l.set(!0)}getConnectionMethod(){return this.#r()}subscribe(e,t=null){this.#t.subscribe(e,t)}unsubscribe(e){this.#t.unsubscribe(e)}waitForTaskToComplete(e){return new g(t=>{let s=this.#a.find(a=>a.ID===e);if(s){t.next(s),t.complete();return}this.#n[e]=this.#n[e]||[],this.#n[e].push(t),this.#p()})}#p(){this.#c||this.#u()||(this.#c=!0,this.#h())}#h(){let e=Object.keys(this.#n).map(s=>parseInt(s,10));if(e.length===0){this.#d();return}let t=Math.min(...e);this.#s.getApiV1TaskByTaskid({taskid:t}).subscribe({next:s=>{s.TaskFinished!=null&&(this.#a.unshift(s),this.#a.length>x&&this.#a.pop(),this.#n[t].forEach(f=>{f.next(s),f.complete()}),delete this.#n[t])},complete:()=>{this.#o=window.setTimeout(()=>{this.#h()},1e3)},error:s=>{this.#o=window.setTimeout(()=>{this.#h()},3e3)}})}#d(){this.#o!==null&&(clearTimeout(this.#o),this.#o=null),this.#c=!1}static \u0275fac=function(t){return new(t||i)};static \u0275prov=p({token:i,factory:i.\u0275fac,providedIn:"root"})};export{q as a};
@@ -1 +1 @@
1
- import{a as z}from"./chunk-U44OBOIE.js";import{a as x,c as w,d as B,e as U,f as X}from"./chunk-DQM3ATT4.js";import"./chunk-BSRYIN2F.js";import{a as K,f as V,o as h}from"./chunk-DNBOZ26J.js";import"./chunk-XD6MBGQY.js";import"./chunk-GP2W7XZF.js";import"./chunk-WIDMAJIO.js";import{Bb as R,Hb as l,Ib as s,Jb as b,Kb as y,Lb as v,Nb as u,Oa as p,Ob as c,X as T,_a as D,ba as a,ca as S,la as $,pb as P,qb as N,ub as G,vb as i,wb as t,xb as _,yb as M,zb as f}from"./chunk-67YRCRMI.js";import"./chunk-EUDKD2JW.js";function W(g,F){if(g&1){let n=R();i(0,"spk-menu",15)(1,"button",16),b(2,2),t(),M(3,17),i(4,"button",18),u("click",function(){a(n);let e=c();return S(e.updateLogLevel("Disabled"))}),l(5,3),_(6,"spk-icon"),s(),t(),i(7,"button",18),u("click",function(){a(n);let e=c();return S(e.updateLogLevel("Verbose"))}),l(8,4),_(9,"spk-icon"),s(),t(),i(10,"button",18),u("click",function(){a(n);let e=c();return S(e.updateLogLevel("ExplicitOnly"))}),l(11,5),_(12,"spk-icon"),s(),t(),i(13,"button",18),u("click",function(){a(n);let e=c();return S(e.updateLogLevel("Profiling"))}),l(14,6),_(15,"spk-icon"),s(),t(),i(16,"button",18),u("click",function(){a(n);let e=c();return S(e.updateLogLevel("Retry"))}),l(17,7),_(18,"spk-icon"),s(),t(),i(19,"button",18),u("click",function(){a(n);let e=c();return S(e.updateLogLevel("Information"))}),l(20,8),_(21,"spk-icon"),s(),t(),i(22,"button",18),u("click",function(){a(n);let e=c();return S(e.updateLogLevel("DryRun"))}),l(23,9),_(24,"spk-icon"),s(),t(),i(25,"button",18),u("click",function(){a(n);let e=c();return S(e.updateLogLevel("Warning"))}),l(26,10),_(27,"spk-icon"),s(),t(),i(28,"button",18),u("click",function(){a(n);let e=c();return S(e.updateLogLevel("Error"))}),l(29,11),_(30,"spk-icon"),s(),t(),f(),t()}if(g&2){let n=c();G("openIndicator",!0),p(2),y(n.logLevelByLabel()),v(2)}}var O=class g{#n=T(B);#e=T(z);logLevel=this.#e.logLevel;logLevelByLabel=this.#e.logLevelByLabel;currentUrl=$(this.#n.url);constructor(){this.#n.events.subscribe(F=>{F instanceof x&&this.currentUrl.set(F.urlAfterRedirects)})}updateLogLevel(F){this.#e.isPolling.set(!0),this.#e.updateLogLevel(F)}static \u0275fac=function(n){return new(n||g)};static \u0275cmp=D({type:g,selectors:[["app-logs"]],decls:10,vars:1,consts:()=>{let F;F=$localize`${"\uFFFD#4\uFFFD"}:START_TAG_SPK_ICON:archive${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SPK_ICON: Stored `;let n;n=$localize`${"\uFFFD#7\uFFFD"}:START_TAG_SPK_ICON:play${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SPK_ICON: Live `;let o;o=$localize`Log level: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let e;e=$localize`${"\uFFFD#6\uFFFD"}:START_TAG_SPK_ICON:bell-simple-slash${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SPK_ICON: Disabled `;let C;C=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SPK_ICON:megaphone-simple${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_ICON: Verbose `;let L;L=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:flow-arrow${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Explicit only `;let d;d=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SPK_ICON:speedometer${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SPK_ICON: Profiling `;let k;k=$localize`${"\uFFFD#18\uFFFD"}:START_TAG_SPK_ICON:arrow-arc-left${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SPK_ICON: Retry `;let I;I=$localize`${"\uFFFD#21\uFFFD"}:START_TAG_SPK_ICON:info${"\uFFFD/#21\uFFFD"}:CLOSE_TAG_SPK_ICON: Information `;let E;E=$localize`${"\uFFFD#24\uFFFD"}:START_TAG_SPK_ICON:person-simple-run${"\uFFFD/#24\uFFFD"}:CLOSE_TAG_SPK_ICON: Dry run `;let A;A=$localize`${"\uFFFD#27\uFFFD"}:START_TAG_SPK_ICON:warning${"\uFFFD/#27\uFFFD"}:CLOSE_TAG_SPK_ICON: Warning `;let m;return m=$localize`${"\uFFFD#30\uFFFD"}:START_TAG_SPK_ICON:warning-octagon${"\uFFFD/#30\uFFFD"}:CLOSE_TAG_SPK_ICON: Error `,[F,n,o,e,C,L,d,k,I,E,A,m,[1,"filters"],["type","button","routerLink","/about/logs/stored","routerLinkActive","active"],["type","button","routerLink","/about/logs/live","routerLinkActive","active"],[3,"openIndicator"],["spk-button","","type","button"],["menu",""],["spk-button","","type","button",1,"small",3,"click"]]},template:function(n,o){n&1&&(i(0,"div",12)(1,"spk-button-group")(2,"button",13),l(3,0),_(4,"spk-icon"),s(),t(),i(5,"button",14),l(6,1),_(7,"spk-icon"),s(),t()(),P(8,W,31,2,"spk-menu",15),t(),_(9,"router-outlet")),n&2&&(p(8),N(o.currentUrl().startsWith("/about/logs/live")?8:-1))},dependencies:[V,K,h,w,X,U],styles:["[_nghost-%COMP%]{display:block}.filters[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;padding:0 2rem;margin-bottom:1.25rem}"],changeDetection:0})};export{O as default};
1
+ import{a as z}from"./chunk-32366MQR.js";import{a as x,c as w,d as B,e as U,f as X}from"./chunk-2W6BEUGU.js";import"./chunk-JFOXV66M.js";import{a as K,f as V,o as h}from"./chunk-Y5IRBMLB.js";import"./chunk-DNJOKPEL.js";import"./chunk-CWLTHXVS.js";import"./chunk-WIDMAJIO.js";import{Ab as _,Bb as M,Cb as f,Eb as R,Kb as l,Lb as s,Mb as b,Nb as y,Ob as v,Qa as p,Qb as u,Rb as c,Z as T,ab as D,da as a,ea as S,na as $,sb as P,tb as N,xb as G,yb as i,zb as t}from"./chunk-BTMXQPBB.js";import"./chunk-EUDKD2JW.js";function W(g,F){if(g&1){let n=R();i(0,"spk-menu",15)(1,"button",16),b(2,2),t(),M(3,17),i(4,"button",18),u("click",function(){a(n);let e=c();return S(e.updateLogLevel("Disabled"))}),l(5,3),_(6,"spk-icon"),s(),t(),i(7,"button",18),u("click",function(){a(n);let e=c();return S(e.updateLogLevel("Verbose"))}),l(8,4),_(9,"spk-icon"),s(),t(),i(10,"button",18),u("click",function(){a(n);let e=c();return S(e.updateLogLevel("ExplicitOnly"))}),l(11,5),_(12,"spk-icon"),s(),t(),i(13,"button",18),u("click",function(){a(n);let e=c();return S(e.updateLogLevel("Profiling"))}),l(14,6),_(15,"spk-icon"),s(),t(),i(16,"button",18),u("click",function(){a(n);let e=c();return S(e.updateLogLevel("Retry"))}),l(17,7),_(18,"spk-icon"),s(),t(),i(19,"button",18),u("click",function(){a(n);let e=c();return S(e.updateLogLevel("Information"))}),l(20,8),_(21,"spk-icon"),s(),t(),i(22,"button",18),u("click",function(){a(n);let e=c();return S(e.updateLogLevel("DryRun"))}),l(23,9),_(24,"spk-icon"),s(),t(),i(25,"button",18),u("click",function(){a(n);let e=c();return S(e.updateLogLevel("Warning"))}),l(26,10),_(27,"spk-icon"),s(),t(),i(28,"button",18),u("click",function(){a(n);let e=c();return S(e.updateLogLevel("Error"))}),l(29,11),_(30,"spk-icon"),s(),t(),f(),t()}if(g&2){let n=c();G("openIndicator",!0),p(2),y(n.logLevelByLabel()),v(2)}}var O=class g{#n=T(B);#e=T(z);logLevel=this.#e.logLevel;logLevelByLabel=this.#e.logLevelByLabel;currentUrl=$(this.#n.url);constructor(){this.#n.events.subscribe(F=>{F instanceof x&&this.currentUrl.set(F.urlAfterRedirects)})}updateLogLevel(F){this.#e.isPolling.set(!0),this.#e.updateLogLevel(F)}static \u0275fac=function(n){return new(n||g)};static \u0275cmp=D({type:g,selectors:[["app-logs"]],decls:10,vars:1,consts:()=>{let F;F=$localize`${"\uFFFD#4\uFFFD"}:START_TAG_SPK_ICON:archive${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SPK_ICON: Stored `;let n;n=$localize`${"\uFFFD#7\uFFFD"}:START_TAG_SPK_ICON:play${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SPK_ICON: Live `;let o;o=$localize`Log level: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let e;e=$localize`${"\uFFFD#6\uFFFD"}:START_TAG_SPK_ICON:bell-simple-slash${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SPK_ICON: Disabled `;let C;C=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SPK_ICON:megaphone-simple${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_ICON: Verbose `;let L;L=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:flow-arrow${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Explicit only `;let d;d=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SPK_ICON:speedometer${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SPK_ICON: Profiling `;let k;k=$localize`${"\uFFFD#18\uFFFD"}:START_TAG_SPK_ICON:arrow-arc-left${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SPK_ICON: Retry `;let I;I=$localize`${"\uFFFD#21\uFFFD"}:START_TAG_SPK_ICON:info${"\uFFFD/#21\uFFFD"}:CLOSE_TAG_SPK_ICON: Information `;let E;E=$localize`${"\uFFFD#24\uFFFD"}:START_TAG_SPK_ICON:person-simple-run${"\uFFFD/#24\uFFFD"}:CLOSE_TAG_SPK_ICON: Dry run `;let A;A=$localize`${"\uFFFD#27\uFFFD"}:START_TAG_SPK_ICON:warning${"\uFFFD/#27\uFFFD"}:CLOSE_TAG_SPK_ICON: Warning `;let m;return m=$localize`${"\uFFFD#30\uFFFD"}:START_TAG_SPK_ICON:warning-octagon${"\uFFFD/#30\uFFFD"}:CLOSE_TAG_SPK_ICON: Error `,[F,n,o,e,C,L,d,k,I,E,A,m,[1,"filters"],["type","button","routerLink","/about/logs/stored","routerLinkActive","active"],["type","button","routerLink","/about/logs/live","routerLinkActive","active"],[3,"openIndicator"],["spk-button","","type","button"],["menu",""],["spk-button","","type","button",1,"small",3,"click"]]},template:function(n,o){n&1&&(i(0,"div",12)(1,"spk-button-group")(2,"button",13),l(3,0),_(4,"spk-icon"),s(),t(),i(5,"button",14),l(6,1),_(7,"spk-icon"),s(),t()(),P(8,W,31,2,"spk-menu",15),t(),_(9,"router-outlet")),n&2&&(p(8),N(o.currentUrl().startsWith("/about/logs/live")?8:-1))},dependencies:[V,K,h,w,X,U],styles:["[_nghost-%COMP%]{display:block}.filters[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;padding:0 2rem;margin-bottom:1.25rem}"],changeDetection:0})};export{O as default};
@@ -0,0 +1 @@
1
+ import{a as $}from"./chunk-FUZLIOUQ.js";import"./chunk-JM7VAPIC.js";import"./chunk-RHW5QVAY.js";import"./chunk-6JQM2X3B.js";import{b as v,c as G,e as L,f as w,j as U,o as x,q as K,r as j,t as X}from"./chunk-NSIELNIY.js";import"./chunk-FZG6OXT3.js";import{d as A,e as O}from"./chunk-2W6BEUGU.js";import"./chunk-JFOXV66M.js";import{A as B,a as y,c as b,g as h,l as N,m as R}from"./chunk-Y5IRBMLB.js";import{h as E}from"./chunk-DNJOKPEL.js";import"./chunk-CWLTHXVS.js";import"./chunk-WIDMAJIO.js";import{Ab as l,H as g,Kb as D,Lb as P,Mb as _,Pb as I,Qa as s,Qb as d,Z as F,ab as T,bc as k,na as m,sb as S,sc as M,tb as C,xb as u,yb as a,zb as n}from"./chunk-BTMXQPBB.js";import"./chunk-EUDKD2JW.js";var V=()=>["/"];function z(c,o){c&1&&(a(0,"spk-form-field")(1,"label",14),_(2,3),n(),l(3,"input",15),n())}var p=new j,f=class c{#e=F(b);#o=F(E);#n=F($);#t=F(A);isImporting=m(!1);isSecureFile=m(!1);importForm=p.group({config:p.control(""),cmdline:p.control(!1),import_metadata:p.control(!1),direct:p.control(!1),passphrase:p.control("")});selectedFile=m([]);onFileDropped(o){let e=o[0];if(e){let t=new FileReader;this.isSecureFile.set(e.type!=="application/json"),t.onload=this.#i.bind(this),t.readAsArrayBuffer(e)}}#i(o){let e=o.target?.result;this.isSecureFile.set(this.#r(e)!=="json"),this.importForm.patchValue({config:this.#a(e)})}#r(o){let e=new Uint8Array(o);if(e.length>=5&&e[0]===65&&e[1]===69&&e[2]===83&&e[4]===0)return"aes";try{let t=new TextDecoder().decode(o),i=JSON.parse(t);if(typeof i=="object"&&i!==null)return"json"}catch{}return"unknown"}#a(o){let e=new Uint8Array(o),t=e.byteLength,i="";for(let r=0;r<t;r++)i+=String.fromCharCode(e[r]);return btoa(i)}submit(){this.isImporting.set(!0);let o=this.importForm.value.direct??!1;this.#o.postApiV1BackupsImport({requestBody:this.importForm.value}).pipe(g(()=>this.isImporting.set(!1))).subscribe({next:e=>{if(o){this.#e.success("Backup imported successfully."),this.#t.navigate(["/"]);return}let t=this.#n.addDraftBackup(e.data);this.#t.navigate(["/backup-draft",t])},error:e=>{this.#e.error(e.message)}})}static \u0275fac=function(e){return new(e||c)};static \u0275cmp=T({type:c,selectors:[["app-import"]],decls:19,vars:8,consts:()=>{let o;o=$localize` Import backup configuration ${"\uFFFD#3\uFFFD"}:START_TAG_DIV:${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SPK_ICON:arrow-left${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SPK_ICON: Back ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#6\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SPK_ICON:download-simple${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SPK_ICON: Import ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_DIV:`,o=I(o);let e;e=$localize`Import Metadata`;let t;t=$localize`Save now`;let i;return i=$localize`Passphrase`,[o,e,t,i,[1,"actions"],["spk-button","","type","button",1,"outlined",3,"routerLink"],["spk-button","","type","submit",1,"raised","primary",3,"click","disabled"],["autocomplete","off",3,"formGroup"],["accept",".json,.aes",3,"filesChange","files"],[1,"primary","raised"],["for","importMetadata"],["type","checkbox","formControlName","import_metadata"],["for","direct"],["type","checkbox","formControlName","direct"],["for","passphrase"],["type","password","formControlName","passphrase"]]},template:function(e,t){e&1&&(a(0,"header")(1,"h3"),D(2,0),a(3,"div",4)(4,"button",5),l(5,"spk-icon"),n(),a(6,"button",6),d("click",function(){return t.submit()}),l(7,"spk-icon"),n()(),P(),n()(),a(8,"form",7)(9,"spk-file-upload",8),d("filesChange",function(r){return t.onFileDropped(r)}),n(),S(10,z,4,0,"spk-form-field"),a(11,"spk-toggle",9)(12,"label",10),_(13,1),n(),l(14,"input",11),n(),a(15,"spk-toggle",9)(16,"label",12),_(17,2),n(),l(18,"input",13),n()()),e&2&&(s(4),u("routerLink",M(7,V)),s(2),k("loader",t.isImporting()),u("disabled",t.isImporting()),s(2),u("formGroup",t.importForm),s(),u("files",t.selectedFile()),s(),C(t.isSecureFile()?10:-1))},dependencies:[X,U,G,v,L,w,x,K,O,N,y,h,B,R],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:3rem}h3[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;justify-content:space-between}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;max-width:31.25rem}spk-file-upload[_ngcontent-%COMP%]{width:100%}"],changeDetection:0})};export{f as default};
@@ -1 +1 @@
1
- import{a}from"./chunk-OQHMS5HM.js";import{Gc as r,S as s,X as i,la as e}from"./chunk-67YRCRMI.js";var o=class t{#t=i(a);#a=this.#t.getItemParsed("darkTheme",!0);#e=e(!1);#s=e(window?.innerWidth<=768);#i=e(!1);isDarkMode=this.#e.asReadonly();isMobile=this.#s.asReadonly();isNavOpen=this.#i.asReadonly();constructor(){window.matchMedia("(prefers-color-scheme:dark)").matches&&this.#a&&this.setDarkMode(),r(()=>{this.#e()?document.body.classList.add("dark"):document.body.classList.remove("dark")})}ngOnInit(){window.addEventListener("resize",this.#r)}toggleNav(){this.#i.set(!this.isNavOpen())}toggleBodyClass(){this.#t.setItemParsed("darkTheme",!this.isDarkMode(),!0),this.#e.set(!this.isDarkMode())}setDarkMode(){this.#t.setItemParsed("darkTheme",!0,!0),this.#e.set(!0)}setLightMode(){this.#t.setItemParsed("darkTheme",!1,!0),this.#e.set(!1)}#r(){this.#s.set(window.innerWidth<=768)}ngOnDestroy(){window.removeEventListener("resize",this.#r)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=s({token:t,factory:t.\u0275fac,providedIn:"root"})};export{o as a};
1
+ import{a}from"./chunk-FZG6OXT3.js";import{Ic as r,U as s,Z as i,na as e}from"./chunk-BTMXQPBB.js";var o=class t{#t=i(a);#a=this.#t.getItemParsed("darkTheme",!0);#e=e(!1);#s=e(window?.innerWidth<=768);#i=e(!1);isDarkMode=this.#e.asReadonly();isMobile=this.#s.asReadonly();isNavOpen=this.#i.asReadonly();constructor(){window.matchMedia("(prefers-color-scheme:dark)").matches&&this.#a&&this.setDarkMode(),r(()=>{this.#e()?document.body.classList.add("dark"):document.body.classList.remove("dark")})}ngOnInit(){window.addEventListener("resize",this.#r)}toggleNav(){this.#i.set(!this.isNavOpen())}toggleBodyClass(){this.#t.setItemParsed("darkTheme",!this.isDarkMode(),!0),this.#e.set(!this.isDarkMode())}setDarkMode(){this.#t.setItemParsed("darkTheme",!0,!0),this.#e.set(!0)}setLightMode(){this.#t.setItemParsed("darkTheme",!1,!0),this.#e.set(!1)}#r(){this.#s.set(window.innerWidth<=768)}ngOnDestroy(){window.removeEventListener("resize",this.#r)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=s({token:t,factory:t.\u0275fac,providedIn:"root"})};export{o as a};
@@ -0,0 +1 @@
1
+ import"./chunk-EUDKD2JW.js";var o=[{path:"",loadComponent:()=>import("./chunk-JOUBVX7V.js"),children:[{path:"",redirectTo:"stored",pathMatch:"full"},{path:"stored",loadComponent:()=>import("./chunk-SLJD5T2G.js")},{path:"live",loadComponent:()=>import("./chunk-MQTQESMQ.js")}]}],t=o;export{t as default};
@@ -0,0 +1 @@
1
+ import{Gc as f,Hc as D,Ic as w,Jc as h,Kc as x,S as d,Z as v,ha as y,ja as l,k as m,na as b}from"./chunk-BTMXQPBB.js";import{a as p,b as g}from"./chunk-EUDKD2JW.js";function E(o,e){let s=e?.injector??v(y),n=new m(1),i=w(()=>{let t;try{t=o()}catch(c){f(()=>n.error(c));return}f(()=>n.next(t))},{injector:s,manualCleanup:!0});return s.get(l).onDestroy(()=>{i.destroy(),n.complete()}),n.asObservable()}function U(o,e){let n=!e?.manualCleanup?e?.injector?.get(l)??v(l):null,i=k(e?.equal),t;e?.requireSync?t=b({kind:0},{equal:i}):t=b({kind:1,value:e?.initialValue},{equal:i});let c,a=o.subscribe({next:r=>t.set({kind:1,value:r}),error:r=>{t.set({kind:2,error:r})},complete:()=>{c?.()}});if(e?.requireSync&&t().kind===0)throw new d(601,!1);return c=n?.onDestroy(a.unsubscribe.bind(a)),D(()=>{let r=t();switch(r.kind){case 1:return r.value;case 2:throw r.error;case 0:throw new d(601,!1)}},{equal:e?.equal})}function k(o=Object.is){return(e,s)=>e.kind===1&&s.kind===1&&o(e.value,s.value)}function T(o){return h(g(p({},o),{loader:void 0,stream:e=>{let s,n=()=>s.unsubscribe();e.abortSignal.addEventListener("abort",n);let i=b({value:void 0}),t,c=new Promise(u=>t=u);function a(u){i.set(u),t?.(i),t=void 0}let r=o.stream??o.loader;if(r===void 0)throw new d(990,!1);return s=r(e).subscribe({next:u=>a({value:u}),error:u=>{a({error:x(u)}),e.abortSignal.removeEventListener("abort",n)},complete:()=>{t&&a({error:new d(991,!1)}),e.abortSignal.removeEventListener("abort",n)}}),c}}))}export{E as a,U as b,T as c};
@@ -0,0 +1 @@
1
+ import{f as a,g as b}from"./chunk-FUEIZLWH.js";import"./chunk-XIIFTZ5G.js";import"./chunk-BCHZRC5K.js";import"./chunk-B26UYXA3.js";import"./chunk-LDIZ5E5Z.js";import"./chunk-2BX65XJQ.js";import"./chunk-RHW5QVAY.js";import"./chunk-6JQM2X3B.js";import"./chunk-NSIELNIY.js";import"./chunk-2W6BEUGU.js";import"./chunk-JFOXV66M.js";import"./chunk-Y5IRBMLB.js";import"./chunk-DNJOKPEL.js";import"./chunk-CWLTHXVS.js";import"./chunk-WIDMAJIO.js";import"./chunk-BTMXQPBB.js";import"./chunk-EUDKD2JW.js";export{a as createSourceDataForm,b as default};