@duplicati/ngclient 0.0.219 → 0.0.221

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 (68) hide show
  1. package/assets/dest-icons/drime.png +0 -0
  2. package/{chunk-7C2YZVSQ.js → chunk-3L3SRTPU.js} +1 -1
  3. package/{chunk-DJXLNIMV.js → chunk-43WATFQS.js} +6 -6
  4. package/chunk-5JGSXUKD.js +1 -0
  5. package/chunk-5YE4H57F.js +1 -0
  6. package/{chunk-PG4G4RLP.js → chunk-5ZRRLJA4.js} +1 -1
  7. package/{chunk-XDBSTUYC.js → chunk-6NVCDJR6.js} +1 -1
  8. package/{chunk-WOKYULBU.js → chunk-736PM4LG.js} +1 -1
  9. package/{chunk-XXVDL5TR.js → chunk-77IXQ4GU.js} +1 -1
  10. package/chunk-APSPCDGV.js +1 -0
  11. package/chunk-AXQQEOTT.js +1 -0
  12. package/{chunk-EADZVBRA.js → chunk-BMACDVWX.js} +1 -1
  13. package/{chunk-3RCF6UT4.js → chunk-COI6UMB5.js} +1 -1
  14. package/{chunk-RLWICOKH.js → chunk-CZVTBPNE.js} +1 -1
  15. package/{chunk-GN7AO4B6.js → chunk-DE4JIJWO.js} +1 -1
  16. package/{chunk-ZHQI6LYB.js → chunk-DHFLXFWF.js} +1 -1
  17. package/chunk-E4NQOMJX.js +1 -0
  18. package/chunk-ESLC5LVP.js +1 -0
  19. package/{chunk-I6MIXWIT.js → chunk-F2ZC26DC.js} +1 -1
  20. package/{chunk-BACKG7KA.js → chunk-F3ETZKLK.js} +1 -1
  21. package/{chunk-RJ2JM7C7.js → chunk-F3JYPWPK.js} +1 -1
  22. package/{chunk-4OJPTRZJ.js → chunk-FDYBIC4O.js} +1 -1
  23. package/{chunk-PXI3UZ4R.js → chunk-FR5RTIOE.js} +1 -1
  24. package/{chunk-NKUA7I47.js → chunk-G2BDKU26.js} +1 -1
  25. package/{chunk-2J2554EV.js → chunk-GW34KK5A.js} +1 -1
  26. package/{chunk-22AR7ES3.js → chunk-I5DD3Q6J.js} +1 -1
  27. package/{chunk-NHS6CQO2.js → chunk-JP2Z2HMH.js} +1 -1
  28. package/{chunk-EDLHTWBA.js → chunk-JPMKWWZP.js} +1 -1
  29. package/{chunk-ZP3QZ43W.js → chunk-JSZIISFS.js} +1 -1
  30. package/chunk-LE24LKH7.js +1 -0
  31. package/{chunk-X276XFCH.js → chunk-MTL3FBSM.js} +1 -1
  32. package/{chunk-37ODVJFS.js → chunk-N2GI5QYJ.js} +1 -1
  33. package/chunk-O56QUSSI.js +2 -0
  34. package/{chunk-RRDLQLTM.js → chunk-OCUE5GMT.js} +1 -1
  35. package/{chunk-BZXBH4CN.js → chunk-OJVUCHRP.js} +1 -1
  36. package/chunk-OL7ADIFI.js +1 -0
  37. package/{chunk-P4R3ERID.js → chunk-OLWLWDXZ.js} +1 -1
  38. package/chunk-PPSQGUOL.js +3 -0
  39. package/{chunk-XEG3CP74.js → chunk-QQWV3FEH.js} +1 -1
  40. package/{chunk-ZYRB2TUK.js → chunk-RDLRXAJU.js} +1 -1
  41. package/{chunk-ZNYRWXQR.js → chunk-SACQFUJE.js} +1 -1
  42. package/{chunk-M3PW6DLD.js → chunk-TISQKN7N.js} +1 -1
  43. package/{chunk-IFSZJSGH.js → chunk-TVFRVP7K.js} +1 -1
  44. package/chunk-TWAHUXIN.js +1 -0
  45. package/{chunk-GRE6GKVP.js → chunk-TZ7MW3NZ.js} +1 -1
  46. package/{chunk-VC55KFAX.js → chunk-UZ4POLDC.js} +1 -1
  47. package/{chunk-KDV2OE64.js → chunk-WJBMMY2Y.js} +1 -1
  48. package/{chunk-NX35OQ3V.js → chunk-XBAZKJ47.js} +1 -1
  49. package/chunk-XPVATEBM.js +1 -0
  50. package/{chunk-5RNU5BNO.js → chunk-YMFI2Q2X.js} +1 -1
  51. package/chunk-YPNN5FBK.js +1 -0
  52. package/{chunk-C6PICAXB.js → chunk-YYD2JU6T.js} +1 -1
  53. package/index.html +1 -1
  54. package/{main-JR6IVB6K.js → main-IUT3IXX4.js} +1 -1
  55. package/package.json +1 -1
  56. package/chunk-4OA2FFS5.js +0 -1
  57. package/chunk-AIAUP7OE.js +0 -1
  58. package/chunk-C3PQFWVO.js +0 -1
  59. package/chunk-DSZ644JT.js +0 -1
  60. package/chunk-EPIYGHPM.js +0 -1
  61. package/chunk-EXMYBMGI.js +0 -1
  62. package/chunk-N3NJW75G.js +0 -1
  63. package/chunk-OHYENIPP.js +0 -1
  64. package/chunk-QOWXL7ZL.js +0 -1
  65. package/chunk-QZQS7M3D.js +0 -1
  66. package/chunk-X4BDJA6L.js +0 -3
  67. package/chunk-YWUUX3S6.js +0 -1
  68. package/chunk-ZEFSBETQ.js +0 -2
@@ -0,0 +1,3 @@
1
+ import{a as Ce}from"./chunk-TZ7MW3NZ.js";import{a as pe}from"./chunk-TVFRVP7K.js";import"./chunk-QDDVZ4CR.js";import"./chunk-BLSV7CNZ.js";import"./chunk-F2ZC26DC.js";import{l as ge,q as b}from"./chunk-43WATFQS.js";import"./chunk-CAQ3XMFP.js";import"./chunk-UZ4POLDC.js";import"./chunk-O56QUSSI.js";import{b as _e}from"./chunk-F3JYPWPK.js";import"./chunk-736PM4LG.js";import"./chunk-TCXCC5BM.js";import"./chunk-GKGMP6VF.js";import{a as de}from"./chunk-6Q6SSTBK.js";import"./chunk-YCJYEQF7.js";import"./chunk-AXQQEOTT.js";import"./chunk-UTXZPAY6.js";import"./chunk-IMQUTGIK.js";import"./chunk-ANSV4G2K.js";import"./chunk-F3ETZKLK.js";import{b as A}from"./chunk-IQL3REGJ.js";import"./chunk-E4NQOMJX.js";import{a as ue}from"./chunk-YYD2JU6T.js";import"./chunk-6JS7B4FW.js";import{B as oe,G as ie,H as ae,L as se,P as re,Y as le,c as H,e as z,f as W,j,p as Q,q as Y,r as Z,s as ee,t as te,v as ne}from"./chunk-VKQQDCUN.js";import{b as ce,d as me}from"./chunk-DSYNIXJF.js";import{b as K,d as J,e as X}from"./chunk-NPFPMA4P.js";import"./chunk-O2SMJYPC.js";import"./chunk-N2AU7VKX.js";import"./chunk-ZC23RK4J.js";import"./chunk-OPHQNXYO.js";import{$b as F,Ac as V,Cb as C,Db as m,Eb as a,Fb as r,Mb as G,Qc as q,Sa as d,Tb as _,Ub as p,V as L,Vb as B,Wb as U,Xb as x,Zb as I,_ as u,da as h,ea as S,gb as R,kc as v,pa as E,ra as $,sc as M,tc as D,uc as O,wb as y,xb as k,zc as w}from"./chunk-TQTOIWBK.js";import"./chunk-7CGTOI24.js";var f=class c{#e=new Map;saveState(t){let e=de();return this.#e.set(e,t),e}getState(t){return this.#e.get(t)}static \u0275fac=function(e){return new(e||c)};static \u0275prov=L({token:c,factory:c.\u0275fac,providedIn:"root"})};var he=()=>["backup"];function Se(c,t){c&1&&r(0,"sh-progress-bar",10)}function Te(c,t){if(c&1){let e=G();m(0,"form",11)(1,"sh-select",12)(2,"label",13),_(3,1),r(4,"sh-icon",14),p(),a(),r(5,"input",15),a(),m(6,"sh-form-field")(7,"label",16),_(8,2),r(9,"sh-icon",17),p(),a(),r(10,"textarea",18),a(),m(11,"sh-form-field")(12,"label",19),_(13,3),r(14,"sh-icon",20),p(),a(),r(15,"textarea",21),a()(),m(16,"sh-divider"),B(17,4),a(),m(18,"form",11)(19,"sh-form-field")(20,"label",22),_(21,5),r(22,"sh-icon",23),p(),a(),r(23,"input",24),a(),m(24,"sh-form-field")(25,"label",25),_(26,6),r(27,"sh-icon",26),p(),a(),r(28,"input",27),a(),m(29,"app-filters",28),O("filtersChange",function(i){h(e);let s=F();return D(s.filters,i)||(s.filters=i),S(i)}),I("filtersChange",function(i){h(e);let s=F();return S(s.updateFilters(i))}),a()(),m(30,"app-options-list",29),O("optionsChange",function(i){h(e);let s=F();return D(s.settings,i)||(s.settings=i),S(i)}),a(),m(31,"div",30)(32,"button",31),I("click",function(){h(e);let i=F();return S(i.submit())}),_(33,7),r(34,"sh-icon"),p(),a()()}if(c&2){let e=F();C("formGroup",e.baseCmdForm),d(),C("options",e.commandOptions()??V(11,he))("inlineSearch",!0),d(17),C("formGroup",e.standardFields),d(11),M("filters",e.filters),C("osType",e.osType()??""),d(),M("options",e.settings),C("hasFreeTextSettings",!0),d(2),v("loading",e.isSubmitting()),d(2),U(e.baseCmdForm.value.command),x(33)}}var l=new Z,P=class c{#e=u(b);#n=u(me);#o=u(J);#t=u(K);#a=u(ce);#s=u(_e);#i=u(f);#r=u(ue);osType=q(()=>this.#r.systemInfo()?.OSType);#l=A(this.#t.params);commandOptions=A(this.#a.getApiV1Commandline());isSubmitting=E(!1);optionsFields=this.#e.optionsFields;standardFields=l.group({"backup-id":l.control(""),"backup-name":l.control(""),dbpath:l.control(""),filters:l.array([])});baseCmdForm=l.group({command:l.control("backup"),targetUrl:l.control(""),arguments:l.control("")});finishedLoading=this.#e.finishedLoading;backupId=this.#e.backupId;filters=E([]);settings=this.#e.settings;updateFilters(t){this.standardFields.controls.filters.clear(),t.forEach(e=>this.standardFields.controls.filters.push(l.control(e))),this.filters.set(t)}#m=$(()=>{let t=this.#l()?.id;this.#e.backupId.set(t),this.getBackup(t)});getBackup(t){this.#n.getApiV1BackupById({id:t}).subscribe({next:e=>{this.#e.mapScheduleToForm(e.Schedule??null),e.Backup&&(this.#e.mapGeneralToForm(e.Backup),this.mapStandardFieldsToForm(e.Backup),this.mapBaseCmdToForm(e.Backup),this.#e.mapOptionsToForms(e.Backup,!0)),this.applyStateFromUrl(),this.#e.finishedLoading.set(!0)}})}mapStandardFieldsToForm(t){if(this.standardFields.patchValue({dbpath:t.DBPath,"backup-id":t.ID,"backup-name":t.Name}),this.standardFields.controls.filters.clear(),t.Filters&&t.Filters.length){let e=t.Filters.map(n=>`${n.Include?"":"-"}${n.Expression}`);e.forEach(n=>{this.standardFields.controls.filters.push(l.control(n))}),this.filters.set(e)}else this.filters.set([])}submit(){this.#s.resumeDialogCheck(()=>this.#c())}#c(){this.isSubmitting.set(!0);let t=this.updateUrl(),e=this.baseCmdForm.value,n=e.targetUrl??"",i=(e.arguments??"").split(`
2
+ `)??[],s=[n,...i].filter(o=>o.length>0),g=this.standardFields.value,T=g.filters??[],N=[e.command,...s,`--backup-name=${g["backup-name"]}`,`--dbpath=${g.dbpath}`,`--backup-id=${g["backup-id"]}`,...T.filter(o=>o).map(o=>o.startsWith("-")?`--exclude=${o?.slice(1)}`:`--include=${o}`),...this.#e.mapFormsToSettings(["backup-id","backup-name","dbpath"]).map(o=>`${o.Name.startsWith("--")?"":"--"}${o.Name}=${o.Value}`),"--disable-module=console-password-input"];this.#n.postApiV1Commandline({requestBody:N}).subscribe({next:o=>{o.Status==="OK"&&this.#o.navigate(["backup",this.backupId(),"commandline",o.ID],{queryParams:{state:t}})},error:()=>{this.isSubmitting.set(!1)}})}mapBaseCmdToForm(t){let e=t.TargetURL??null;e&&this.baseCmdForm.patchValue({targetUrl:e??"",arguments:t.Sources?.join(`
3
+ `)??""})}updateUrl(){let t=this.baseCmdForm.value,e=this.standardFields.value,n=e.filters??[],i=this.settings(),s=this.#i.saveState({command:t.command,targetUrl:t.targetUrl,arguments:t.arguments,backupId:e["backup-id"],backupName:e["backup-name"],dbpath:e.dbpath,filters:n,options:i});return this.#o.navigate([],{relativeTo:this.#t,queryParams:{state:s},replaceUrl:!0}),s}applyStateFromUrl(){let e=this.#t.snapshot.queryParams.state;if(!e)return;let n=this.#i.getState(e);n&&(this.baseCmdForm.patchValue({command:n.command,targetUrl:n.targetUrl,arguments:n.arguments}),this.standardFields.patchValue({"backup-id":n.backupId,"backup-name":n.backupName,dbpath:n.dbpath}),n.filters&&(this.standardFields.controls.filters.clear(),n.filters.forEach(i=>{this.standardFields.controls.filters.push(l.control(i))}),this.filters.set(n.filters)),n.options&&n.options.length>0&&this.settings.set(n.options))}static \u0275fac=function(e){return new(e||c)};static \u0275cmp=R({type:c,selectors:[["app-commandline"]],features:[w([b])],decls:8,vars:1,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let e;e=$localize` Command ${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:question${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON:`;let n;n=$localize` TargetUrl ${"\uFFFD#9\uFFFD"}:START_TAG_SH_ICON:question${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SH_ICON:`;let i;i=$localize` Commandline Arguments ${"\uFFFD#14\uFFFD"}:START_TAG_SH_ICON:question${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SH_ICON:`;let s;s=$localize`Advanced options`;let g;g=$localize` Backup ID ${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:question${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON:`;let T;T=$localize` Backup Name ${"\uFFFD#27\uFFFD"}:START_TAG_SH_ICON:question${"\uFFFD/#27\uFFFD"}:CLOSE_TAG_SH_ICON:`;let N;return N=$localize`${"\uFFFD#34\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#34\uFFFD"}:CLOSE_TAG_SH_ICON: Run "${"\uFFFD0\uFFFD"}:INTERPOLATION:" command now `,[t,e,n,i,s,g,T,N,[1,"back"],["type","button","shButton","","routerLink","/",1,"small"],[1,"indeterminate","primary"],[3,"formGroup"],["placeholder","Select a command...",3,"options","inlineSearch"],["for","command"],["shTooltip","Choose the command to execute"],["type","text","id","command","formControlName","command"],["for","targetUrl"],["shTooltip","Enter the URL of the backup target"],["id","targetUrl","autocomplete","off","formControlName","targetUrl"],["for","arguments"],["shTooltip","Enter one argument per line without quotes (e.g., *.txt)"],["id","arguments","autocomplete","off","rows","5","formControlName","arguments","placeholder","Enter one argument per line without quotes (e.g., *.txt)",1,"arguments"],["for","backup-id"],["shTooltip","The ID of the backup configuration this run belongs to (can be empty)"],["id","backup-id","formControlName","backup-id"],["for","backup-name"],["shTooltip","The optional name of the backup"],["id","backup-name","formControlName","backup-name"],[3,"filtersChange","filters","osType"],[3,"optionsChange","options","hasFreeTextSettings"],[1,"form-actions"],["shButton","",1,"raised","primary",3,"click"]]},template:function(e,n){e&1&&(r(0,"app-status-bar"),m(1,"section")(2,"div",8)(3,"button",9),_(4,0),r(5,"sh-icon"),p(),a()(),y(6,Se,1,0,"sh-progress-bar",10)(7,Te,35,12),a()),e&2&&(d(6),k(n.finishedLoading()?7:6))},dependencies:[ee,j,H,z,W,pe,Ce,ge,te,Y,Q,X,ae,oe,ie,re,se,ne,le],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;max-width:40rem;padding:2.5rem;gap:1.25rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.arguments[_ngcontent-%COMP%]{min-height:6rem;white-space:pre}"],changeDetection:0})};export{P as default};
@@ -1 +1 @@
1
- import{o as a,p as b}from"./chunk-DJXLNIMV.js";import"./chunk-CAQ3XMFP.js";import"./chunk-VC55KFAX.js";import"./chunk-ZEFSBETQ.js";import"./chunk-6Q6SSTBK.js";import"./chunk-YCJYEQF7.js";import"./chunk-OHYENIPP.js";import"./chunk-UTXZPAY6.js";import"./chunk-IMQUTGIK.js";import"./chunk-BACKG7KA.js";import"./chunk-IQL3REGJ.js";import"./chunk-AIAUP7OE.js";import"./chunk-C6PICAXB.js";import"./chunk-6JS7B4FW.js";import"./chunk-VKQQDCUN.js";import"./chunk-DSYNIXJF.js";import"./chunk-NPFPMA4P.js";import"./chunk-O2SMJYPC.js";import"./chunk-N2AU7VKX.js";import"./chunk-ZC23RK4J.js";import"./chunk-OPHQNXYO.js";import"./chunk-TQTOIWBK.js";import"./chunk-7CGTOI24.js";export{a as createSourceDataForm,b as default};
1
+ import{o as a,p as b}from"./chunk-43WATFQS.js";import"./chunk-CAQ3XMFP.js";import"./chunk-UZ4POLDC.js";import"./chunk-O56QUSSI.js";import"./chunk-6Q6SSTBK.js";import"./chunk-YCJYEQF7.js";import"./chunk-AXQQEOTT.js";import"./chunk-UTXZPAY6.js";import"./chunk-IMQUTGIK.js";import"./chunk-F3ETZKLK.js";import"./chunk-IQL3REGJ.js";import"./chunk-E4NQOMJX.js";import"./chunk-YYD2JU6T.js";import"./chunk-6JS7B4FW.js";import"./chunk-VKQQDCUN.js";import"./chunk-DSYNIXJF.js";import"./chunk-NPFPMA4P.js";import"./chunk-O2SMJYPC.js";import"./chunk-N2AU7VKX.js";import"./chunk-ZC23RK4J.js";import"./chunk-OPHQNXYO.js";import"./chunk-TQTOIWBK.js";import"./chunk-7CGTOI24.js";export{a as createSourceDataForm,b as default};
@@ -1 +1 @@
1
- import{a as $}from"./chunk-IFSZJSGH.js";import"./chunk-QDDVZ4CR.js";import"./chunk-BLSV7CNZ.js";import"./chunk-I6MIXWIT.js";import"./chunk-RJ2JM7C7.js";import"./chunk-WOKYULBU.js";import"./chunk-TCXCC5BM.js";import"./chunk-GKGMP6VF.js";import"./chunk-6Q6SSTBK.js";import"./chunk-YCJYEQF7.js";import"./chunk-OHYENIPP.js";import"./chunk-UTXZPAY6.js";import"./chunk-IMQUTGIK.js";import"./chunk-ANSV4G2K.js";import"./chunk-BACKG7KA.js";import{b as f}from"./chunk-IQL3REGJ.js";import"./chunk-AIAUP7OE.js";import"./chunk-C6PICAXB.js";import"./chunk-6JS7B4FW.js";import{B as h,v as b}from"./chunk-VKQQDCUN.js";import{d as P}from"./chunk-DSYNIXJF.js";import{b as B,e as A}from"./chunk-NPFPMA4P.js";import"./chunk-O2SMJYPC.js";import"./chunk-N2AU7VKX.js";import"./chunk-ZC23RK4J.js";import"./chunk-OPHQNXYO.js";import{Ab as p,Bb as I,Bc as R,Cb as E,Db as a,Eb as F,Fb as _,Qc as D,Sa as i,Tb as c,Ub as d,Vb as r,Yb as N,Zb as L,_ as C,gb as S,nc as M,pa as l,pc as O,wb as s,xb as u,yb as T}from"./chunk-TQTOIWBK.js";import"./chunk-7CGTOI24.js";var k=e=>({state:e});function v(e,t){e&1&&r(0,2,1)}function y(e,t){e&1&&r(0,2,2)}function U(e,t){e&1&&r(0,2,3)}function G(e,t){e&1&&r(0,2,4)}function K(e,t){if(e&1&&(M(0),_(1,"br")),e&2){let o=t.$implicit;O(" ",o," ")}}var g=class e{#t=C(P);#e=C(B);#n=f(this.#e.params);#o=f(this.#e.queryParams);runId=D(()=>this.#n()?.runId);stateId=D(()=>this.#o()?.state);offset=l(0);status=l("starting");messageLog=l([]);interval=setInterval(()=>{this.#t.getApiV1CommandlineByRunid({runid:this.runId(),offset:this.offset(),pagesize:100}).subscribe(t=>{this.offset.set(t.Count),this.evalStatus(t),this.messageLog.update(o=>[...o,...t.Items])})},1e3);evalStatus(t){t.Started===!0&&t.Finished===!0&&(this.status.set("finished"),clearInterval(this.interval)),t.Started===!0&&t.Finished===!1&&this.status.set("started")}abort(){this.#t.postApiV1CommandlineByRunidAbort({runid:this.runId()}).subscribe({next:t=>{this.status.set("aborted"),clearInterval(this.interval)}})}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=S({type:e,selectors:[["app-commandline-result"]],decls:18,vars:7,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let o;o=$localize` Running commandline task... ${"\uFFFD#8\uFFFD"}:START_TAG_BUTTON:Abort${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_BUTTON:`;let n;return n=$localize`${"\uFFFD*11:1\uFFFD"}:START_BLOCK_IF: Starting... ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*12:2\uFFFD"}:START_BLOCK_IF_1: Started! ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*13:3\uFFFD"}:START_BLOCK_IF_2: Finished! ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*14:4\uFFFD"}:START_BLOCK_IF_3: Aborted! ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:`,n=N(n),[t,o,n,[1,"back"],["type","button","shButton","","routerLink","../",1,"small",3,"queryParams"],["type","button","shButton","",1,"small",3,"click"],[1,"status"]]},template:function(o,n){o&1&&(_(0,"app-status-bar"),a(1,"section")(2,"div",3)(3,"button",4),c(4,0),_(5,"sh-icon"),d(),F()(),a(6,"h3"),c(7,1),a(8,"button",5),L("click",function(){return n.abort()}),F(),d(),F(),a(9,"div",6),c(10,2),s(11,v,1,0),s(12,y,1,0),s(13,U,1,0),s(14,G,1,0),d(),F(),a(15,"code"),p(16,K,2,1,null,null,T),F()()),o&2&&(i(3),E("queryParams",R(5,k,n.stateId())),i(8),u(n.status()==="starting"?11:-1),i(),u(n.status()==="started"?12:-1),i(),u(n.status()==="finished"?13:-1),i(),u(n.status()==="aborted"?14:-1),i(2),I(n.messageLog()))},dependencies:[$,b,h,A],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;padding:2.5rem;gap:1.25rem}code[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--base-8),#000 70%);color:#fff;padding:2.5rem 2.5rem 2.5rem 1.5rem;border-radius:var(--shape-3);overflow:auto;white-space:pre}"],changeDetection:0})};export{g as default};
1
+ import{a as $}from"./chunk-TVFRVP7K.js";import"./chunk-QDDVZ4CR.js";import"./chunk-BLSV7CNZ.js";import"./chunk-F2ZC26DC.js";import"./chunk-F3JYPWPK.js";import"./chunk-736PM4LG.js";import"./chunk-TCXCC5BM.js";import"./chunk-GKGMP6VF.js";import"./chunk-6Q6SSTBK.js";import"./chunk-YCJYEQF7.js";import"./chunk-AXQQEOTT.js";import"./chunk-UTXZPAY6.js";import"./chunk-IMQUTGIK.js";import"./chunk-ANSV4G2K.js";import"./chunk-F3ETZKLK.js";import{b as f}from"./chunk-IQL3REGJ.js";import"./chunk-E4NQOMJX.js";import"./chunk-YYD2JU6T.js";import"./chunk-6JS7B4FW.js";import{B as h,v as b}from"./chunk-VKQQDCUN.js";import{d as P}from"./chunk-DSYNIXJF.js";import{b as B,e as A}from"./chunk-NPFPMA4P.js";import"./chunk-O2SMJYPC.js";import"./chunk-N2AU7VKX.js";import"./chunk-ZC23RK4J.js";import"./chunk-OPHQNXYO.js";import{Ab as p,Bb as I,Bc as R,Cb as E,Db as a,Eb as F,Fb as _,Qc as D,Sa as i,Tb as c,Ub as d,Vb as r,Yb as N,Zb as L,_ as C,gb as S,nc as M,pa as l,pc as O,wb as s,xb as u,yb as T}from"./chunk-TQTOIWBK.js";import"./chunk-7CGTOI24.js";var k=e=>({state:e});function v(e,t){e&1&&r(0,2,1)}function y(e,t){e&1&&r(0,2,2)}function U(e,t){e&1&&r(0,2,3)}function G(e,t){e&1&&r(0,2,4)}function K(e,t){if(e&1&&(M(0),_(1,"br")),e&2){let o=t.$implicit;O(" ",o," ")}}var g=class e{#t=C(P);#e=C(B);#n=f(this.#e.params);#o=f(this.#e.queryParams);runId=D(()=>this.#n()?.runId);stateId=D(()=>this.#o()?.state);offset=l(0);status=l("starting");messageLog=l([]);interval=setInterval(()=>{this.#t.getApiV1CommandlineByRunid({runid:this.runId(),offset:this.offset(),pagesize:100}).subscribe(t=>{this.offset.set(t.Count),this.evalStatus(t),this.messageLog.update(o=>[...o,...t.Items])})},1e3);evalStatus(t){t.Started===!0&&t.Finished===!0&&(this.status.set("finished"),clearInterval(this.interval)),t.Started===!0&&t.Finished===!1&&this.status.set("started")}abort(){this.#t.postApiV1CommandlineByRunidAbort({runid:this.runId()}).subscribe({next:t=>{this.status.set("aborted"),clearInterval(this.interval)}})}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=S({type:e,selectors:[["app-commandline-result"]],decls:18,vars:7,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let o;o=$localize` Running commandline task... ${"\uFFFD#8\uFFFD"}:START_TAG_BUTTON:Abort${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_BUTTON:`;let n;return n=$localize`${"\uFFFD*11:1\uFFFD"}:START_BLOCK_IF: Starting... ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*12:2\uFFFD"}:START_BLOCK_IF_1: Started! ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*13:3\uFFFD"}:START_BLOCK_IF_2: Finished! ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*14:4\uFFFD"}:START_BLOCK_IF_3: Aborted! ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:`,n=N(n),[t,o,n,[1,"back"],["type","button","shButton","","routerLink","../",1,"small",3,"queryParams"],["type","button","shButton","",1,"small",3,"click"],[1,"status"]]},template:function(o,n){o&1&&(_(0,"app-status-bar"),a(1,"section")(2,"div",3)(3,"button",4),c(4,0),_(5,"sh-icon"),d(),F()(),a(6,"h3"),c(7,1),a(8,"button",5),L("click",function(){return n.abort()}),F(),d(),F(),a(9,"div",6),c(10,2),s(11,v,1,0),s(12,y,1,0),s(13,U,1,0),s(14,G,1,0),d(),F(),a(15,"code"),p(16,K,2,1,null,null,T),F()()),o&2&&(i(3),E("queryParams",R(5,k,n.stateId())),i(8),u(n.status()==="starting"?11:-1),i(),u(n.status()==="started"?12:-1),i(),u(n.status()==="finished"?13:-1),i(),u(n.status()==="aborted"?14:-1),i(2),I(n.messageLog()))},dependencies:[$,b,h,A],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;padding:2.5rem;gap:1.25rem}code[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--base-8),#000 70%);color:#fff;padding:2.5rem 2.5rem 2.5rem 1.5rem;border-radius:var(--shape-3);overflow:auto;white-space:pre}"],changeDetection:0})};export{g as default};
@@ -1 +1 @@
1
- import{a as ne}from"./chunk-GRE6GKVP.js";import{q as ee}from"./chunk-DJXLNIMV.js";import"./chunk-CAQ3XMFP.js";import{d as Z}from"./chunk-VC55KFAX.js";import"./chunk-ZEFSBETQ.js";import"./chunk-6Q6SSTBK.js";import"./chunk-YCJYEQF7.js";import"./chunk-OHYENIPP.js";import"./chunk-UTXZPAY6.js";import"./chunk-IMQUTGIK.js";import"./chunk-BACKG7KA.js";import"./chunk-IQL3REGJ.js";import"./chunk-AIAUP7OE.js";import"./chunk-C6PICAXB.js";import"./chunk-6JS7B4FW.js";import{B as j,H as Q,P as q,c as X,e as W,i as z,k as V,s as H,v as Y}from"./chunk-VKQQDCUN.js";import"./chunk-DSYNIXJF.js";import{b as U,d as J}from"./chunk-NPFPMA4P.js";import"./chunk-O2SMJYPC.js";import"./chunk-N2AU7VKX.js";import"./chunk-ZC23RK4J.js";import"./chunk-OPHQNXYO.js";import{$b as c,Ac as D,Cb as m,Db as i,Eb as a,Fb as P,Mb as g,Sa as p,Tb as N,Ub as E,Vb as l,Xc as K,Zb as f,_ as C,da as O,ea as S,gb as $,gc as v,hc as B,kc as x,pa as w,sc as d,tc as T,uc as u,wb as L,xb as G}from"./chunk-TQTOIWBK.js";import"./chunk-7CGTOI24.js";var te=["formRef"],ie=()=>["--skip-files-larger-than","encryption-module","no-encryption","--no-encryption","compression-module","--exclude-files-attributes","keep-time","keep-versions","retention-policy"];function oe(s,r){s&1&&(i(0,"p"),l(1,4),a())}function ae(s,r){if(s&1){let n=g();i(0,"p"),l(1,5),a(),i(2,"app-timespan",21),u("ngModelChange",function(o){O(n);let t=c();return T(t.optionsFields.backupRetentionTime,o)||(t.optionsFields.backupRetentionTime=o),S(o)}),i(3,"label",22),l(4,6),a()()}if(s&2){let n=c();p(2),m("customId","backupRetentionTime"),d("ngModel",n.optionsFields.backupRetentionTime)}}function se(s,r){if(s&1){let n=g();i(0,"p"),l(1,7),a(),i(2,"sh-form-field")(3,"label",23),l(4,8),a(),i(5,"input",24),u("ngModelChange",function(o){O(n);let t=c();return T(t.optionsFields.backupRetentionVersions,o)||(t.optionsFields.backupRetentionVersions=o),S(o)}),a()()}if(s&2){let n=c();p(5),d("ngModel",n.optionsFields.backupRetentionVersions)}}function _e(s,r){s&1&&(i(0,"p"),l(1,9),a())}function le(s,r){if(s&1){let n=g();i(0,"p"),l(1,10),a(),i(2,"sh-form-field")(3,"p"),l(4,11),a(),i(5,"label",25),l(6,12),a(),i(7,"input",26),u("ngModelChange",function(o){O(n);let t=c();return T(t.optionsFields.backupRetentionCustom,o)||(t.optionsFields.backupRetentionCustom=o),S(o)}),a()()}if(s&2){let n=c();p(7),d("ngModel",n.optionsFields.backupRetentionCustom)}}var re=[{value:"all",name:$localize`Keep all backups`},{value:"time",name:$localize`Delete backups that are older than`},{value:"versions",name:$localize`Keep a specific number of backups`},{value:"smart",name:$localize`Smart backup retention`},{value:"custom",name:$localize`Custom backup retention`}],h=class s{#e=C(ee);#n=C(J);#t=C(U);formRef=K.required("formRef");isSubmitting=this.#e.isSubmitting;settings=this.#e.settings;optionsFields=this.#e.optionsFields;applicationOptions=this.#e.applicationOptions;retentionOptions=w(re);goBack(){this.#n.navigate(["schedule"],{relativeTo:this.#t.parent})}submit(){switch(this.#e.validateBeforeSubmit()){case"general":this.#n.navigate(["general"],{relativeTo:this.#t.parent});return;case"destination":this.#n.navigate(["destination"],{relativeTo:this.#t.parent});return;case"source":this.#n.navigate(["source-data"],{relativeTo:this.#t.parent});return}this.#e.submit()}static \u0275fac=function(n){return new(n||s)};static \u0275cmp=$({type:s,selectors:[["app-advanced-options-settings"]],viewQuery:function(n,e){n&1&&v(e.formRef,te,5),n&2&&B()},decls:20,vars:12,consts:()=>{let r;r=$localize`Options`;let n;n=$localize`Backup retention`;let e;e=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let o;o=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Submit `;let t;t=$localize`Nothing will be deleted. The backup size will grow with each change.`;let M;M=$localize`If at least one newer backup is found, all backups older than this date are deleted.`;let I;I=$localize`Time to keep versions`;let R;R=$localize`Once there are more backups than the specified number, the oldest backups are deleted.`;let b;b=$localize`Number of versions`;let y;y=$localize` Over time backups will be deleted automatically. There will remain one backup for each of the last 7 days, each of the last 4 weeks, each of the last 12 months. There will always be at least one remaining backup. `;let A;A=$localize` Enter a retention strategy manually. Placeholders are D/W/Y for days/weeks/years and U for unlimited. The syntax is: 7D:1D,4W:1W,36M:1M. This example keeps one backup for each of the next 7 days, one for each of the next 4 weeks, and one for each of the next 36 months. This can also be written as 1W:1D,1M:1W,3Y:1M. `;let k;k=$localize`Once there are more backups than the specified number, the oldest backups are deleted.`;let F;return F=$localize`Retention expression`,[r,n,e,o,t,M,I,R,b,y,A,k,F,[1,"title-30"],["value","value","label","name",3,"options","inlineSearch","isClearable"],["for","size"],["type","text",3,"ngModelChange","ngModel"],[3,"optionsChange","options","applicationOptions","hasFreeTextSettings","hiddenOptions"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","",1,"raised","primary",3,"click"],[3,"ngModelChange","customId","ngModel"],["for","backupRetentionTime"],["for","backupRetentionVersions"],["type","number","id","backupRetentionVersions",3,"ngModelChange","ngModel"],["for","backupRetentionCustom"],["type","text","id","backupRetentionCustom",3,"ngModelChange","ngModel"]]},template:function(n,e){n&1&&(i(0,"section")(1,"h3",13),l(2,0),a(),i(3,"sh-select",14)(4,"label",15),l(5,1),a(),i(6,"input",16),u("ngModelChange",function(t){return T(e.optionsFields.backupRetention,t)||(e.optionsFields.backupRetention=t),t}),a()(),L(7,oe,2,0,"p")(8,ae,5,2)(9,se,6,1)(10,_e,2,0,"p")(11,le,8,1),i(12,"app-options-list",17),u("optionsChange",function(t){return T(e.settings,t)||(e.settings=t),t}),a(),i(13,"div",18)(14,"button",19),f("click",function(){return e.goBack()}),N(15,2),P(16,"sh-icon"),E(),a(),i(17,"button",20),f("click",function(){return e.submit()}),N(18,3),P(19,"sh-icon"),E(),a()()()),n&2&&(p(3),m("options",e.retentionOptions())("inlineSearch",!0)("isClearable",!1),p(3),d("ngModel",e.optionsFields.backupRetention),p(),G(e.optionsFields.backupRetention()==="all"?7:e.optionsFields.backupRetention()==="time"?8:e.optionsFields.backupRetention()==="versions"?9:e.optionsFields.backupRetention()==="smart"?10:e.optionsFields.backupRetention()==="custom"?11:-1),p(5),d("options",e.settings),m("applicationOptions",e.applicationOptions())("hasFreeTextSettings",!0)("hiddenOptions",D(11,ie)),p(5),x("loading",e.isSubmitting()))},dependencies:[H,X,V,W,z,ne,Z,j,Y,q,Q],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:37.5rem;padding:2.5rem}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding-bottom:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.form-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 2.5rem;gap:.5rem;align-items:flex-end}.remote-volume-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.remote-volume-wrap[_ngcontent-%COMP%] p.warning[_ngcontent-%COMP%]{color:#7d7d00}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.advanced-option[_ngcontent-%COMP%]{display:grid;gap:.5rem;grid-template-columns:1fr 1fr 2.5rem;align-items:flex-end}sh-select[_ngcontent-%COMP%]{--miw: p2r(120)}"],changeDetection:0})};export{h as default};
1
+ import{a as ne}from"./chunk-TZ7MW3NZ.js";import{q as ee}from"./chunk-43WATFQS.js";import"./chunk-CAQ3XMFP.js";import{d as Z}from"./chunk-UZ4POLDC.js";import"./chunk-O56QUSSI.js";import"./chunk-6Q6SSTBK.js";import"./chunk-YCJYEQF7.js";import"./chunk-AXQQEOTT.js";import"./chunk-UTXZPAY6.js";import"./chunk-IMQUTGIK.js";import"./chunk-F3ETZKLK.js";import"./chunk-IQL3REGJ.js";import"./chunk-E4NQOMJX.js";import"./chunk-YYD2JU6T.js";import"./chunk-6JS7B4FW.js";import{B as j,H as Q,P as q,c as X,e as W,i as z,k as V,s as H,v as Y}from"./chunk-VKQQDCUN.js";import"./chunk-DSYNIXJF.js";import{b as U,d as J}from"./chunk-NPFPMA4P.js";import"./chunk-O2SMJYPC.js";import"./chunk-N2AU7VKX.js";import"./chunk-ZC23RK4J.js";import"./chunk-OPHQNXYO.js";import{$b as c,Ac as D,Cb as m,Db as i,Eb as a,Fb as P,Mb as g,Sa as p,Tb as N,Ub as E,Vb as l,Xc as K,Zb as f,_ as C,da as O,ea as S,gb as $,gc as v,hc as B,kc as x,pa as w,sc as d,tc as T,uc as u,wb as L,xb as G}from"./chunk-TQTOIWBK.js";import"./chunk-7CGTOI24.js";var te=["formRef"],ie=()=>["--skip-files-larger-than","encryption-module","no-encryption","--no-encryption","compression-module","--exclude-files-attributes","keep-time","keep-versions","retention-policy"];function oe(s,r){s&1&&(i(0,"p"),l(1,4),a())}function ae(s,r){if(s&1){let n=g();i(0,"p"),l(1,5),a(),i(2,"app-timespan",21),u("ngModelChange",function(o){O(n);let t=c();return T(t.optionsFields.backupRetentionTime,o)||(t.optionsFields.backupRetentionTime=o),S(o)}),i(3,"label",22),l(4,6),a()()}if(s&2){let n=c();p(2),m("customId","backupRetentionTime"),d("ngModel",n.optionsFields.backupRetentionTime)}}function se(s,r){if(s&1){let n=g();i(0,"p"),l(1,7),a(),i(2,"sh-form-field")(3,"label",23),l(4,8),a(),i(5,"input",24),u("ngModelChange",function(o){O(n);let t=c();return T(t.optionsFields.backupRetentionVersions,o)||(t.optionsFields.backupRetentionVersions=o),S(o)}),a()()}if(s&2){let n=c();p(5),d("ngModel",n.optionsFields.backupRetentionVersions)}}function _e(s,r){s&1&&(i(0,"p"),l(1,9),a())}function le(s,r){if(s&1){let n=g();i(0,"p"),l(1,10),a(),i(2,"sh-form-field")(3,"p"),l(4,11),a(),i(5,"label",25),l(6,12),a(),i(7,"input",26),u("ngModelChange",function(o){O(n);let t=c();return T(t.optionsFields.backupRetentionCustom,o)||(t.optionsFields.backupRetentionCustom=o),S(o)}),a()()}if(s&2){let n=c();p(7),d("ngModel",n.optionsFields.backupRetentionCustom)}}var re=[{value:"all",name:$localize`Keep all backups`},{value:"time",name:$localize`Delete backups that are older than`},{value:"versions",name:$localize`Keep a specific number of backups`},{value:"smart",name:$localize`Smart backup retention`},{value:"custom",name:$localize`Custom backup retention`}],h=class s{#e=C(ee);#n=C(J);#t=C(U);formRef=K.required("formRef");isSubmitting=this.#e.isSubmitting;settings=this.#e.settings;optionsFields=this.#e.optionsFields;applicationOptions=this.#e.applicationOptions;retentionOptions=w(re);goBack(){this.#n.navigate(["schedule"],{relativeTo:this.#t.parent})}submit(){switch(this.#e.validateBeforeSubmit()){case"general":this.#n.navigate(["general"],{relativeTo:this.#t.parent});return;case"destination":this.#n.navigate(["destination"],{relativeTo:this.#t.parent});return;case"source":this.#n.navigate(["source-data"],{relativeTo:this.#t.parent});return}this.#e.submit()}static \u0275fac=function(n){return new(n||s)};static \u0275cmp=$({type:s,selectors:[["app-advanced-options-settings"]],viewQuery:function(n,e){n&1&&v(e.formRef,te,5),n&2&&B()},decls:20,vars:12,consts:()=>{let r;r=$localize`Options`;let n;n=$localize`Backup retention`;let e;e=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let o;o=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Submit `;let t;t=$localize`Nothing will be deleted. The backup size will grow with each change.`;let M;M=$localize`If at least one newer backup is found, all backups older than this date are deleted.`;let I;I=$localize`Time to keep versions`;let R;R=$localize`Once there are more backups than the specified number, the oldest backups are deleted.`;let b;b=$localize`Number of versions`;let y;y=$localize` Over time backups will be deleted automatically. There will remain one backup for each of the last 7 days, each of the last 4 weeks, each of the last 12 months. There will always be at least one remaining backup. `;let A;A=$localize` Enter a retention strategy manually. Placeholders are D/W/Y for days/weeks/years and U for unlimited. The syntax is: 7D:1D,4W:1W,36M:1M. This example keeps one backup for each of the next 7 days, one for each of the next 4 weeks, and one for each of the next 36 months. This can also be written as 1W:1D,1M:1W,3Y:1M. `;let k;k=$localize`Once there are more backups than the specified number, the oldest backups are deleted.`;let F;return F=$localize`Retention expression`,[r,n,e,o,t,M,I,R,b,y,A,k,F,[1,"title-30"],["value","value","label","name",3,"options","inlineSearch","isClearable"],["for","size"],["type","text",3,"ngModelChange","ngModel"],[3,"optionsChange","options","applicationOptions","hasFreeTextSettings","hiddenOptions"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","",1,"raised","primary",3,"click"],[3,"ngModelChange","customId","ngModel"],["for","backupRetentionTime"],["for","backupRetentionVersions"],["type","number","id","backupRetentionVersions",3,"ngModelChange","ngModel"],["for","backupRetentionCustom"],["type","text","id","backupRetentionCustom",3,"ngModelChange","ngModel"]]},template:function(n,e){n&1&&(i(0,"section")(1,"h3",13),l(2,0),a(),i(3,"sh-select",14)(4,"label",15),l(5,1),a(),i(6,"input",16),u("ngModelChange",function(t){return T(e.optionsFields.backupRetention,t)||(e.optionsFields.backupRetention=t),t}),a()(),L(7,oe,2,0,"p")(8,ae,5,2)(9,se,6,1)(10,_e,2,0,"p")(11,le,8,1),i(12,"app-options-list",17),u("optionsChange",function(t){return T(e.settings,t)||(e.settings=t),t}),a(),i(13,"div",18)(14,"button",19),f("click",function(){return e.goBack()}),N(15,2),P(16,"sh-icon"),E(),a(),i(17,"button",20),f("click",function(){return e.submit()}),N(18,3),P(19,"sh-icon"),E(),a()()()),n&2&&(p(3),m("options",e.retentionOptions())("inlineSearch",!0)("isClearable",!1),p(3),d("ngModel",e.optionsFields.backupRetention),p(),G(e.optionsFields.backupRetention()==="all"?7:e.optionsFields.backupRetention()==="time"?8:e.optionsFields.backupRetention()==="versions"?9:e.optionsFields.backupRetention()==="smart"?10:e.optionsFields.backupRetention()==="custom"?11:-1),p(5),d("options",e.settings),m("applicationOptions",e.applicationOptions())("hasFreeTextSettings",!0)("hiddenOptions",D(11,ie)),p(5),x("loading",e.isSubmitting()))},dependencies:[H,X,V,W,z,ne,Z,j,Y,q,Q],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:37.5rem;padding:2.5rem}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding-bottom:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.form-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 2.5rem;gap:.5rem;align-items:flex-end}.remote-volume-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.remote-volume-wrap[_ngcontent-%COMP%] p.warning[_ngcontent-%COMP%]{color:#7d7d00}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.advanced-option[_ngcontent-%COMP%]{display:grid;gap:.5rem;grid-template-columns:1fr 1fr 2.5rem;align-items:flex-end}sh-select[_ngcontent-%COMP%]{--miw: p2r(120)}"],changeDetection:0})};export{h as default};
@@ -1 +1 @@
1
- import{g as pe}from"./chunk-XXVDL5TR.js";import"./chunk-GRE6GKVP.js";import{b as ue,c as de,m as Se,q as Ee,r as Ce}from"./chunk-DJXLNIMV.js";import"./chunk-CAQ3XMFP.js";import"./chunk-VC55KFAX.js";import{c as Te,d as ge}from"./chunk-ZEFSBETQ.js";import"./chunk-6Q6SSTBK.js";import"./chunk-YCJYEQF7.js";import"./chunk-OHYENIPP.js";import"./chunk-UTXZPAY6.js";import{a as M}from"./chunk-IMQUTGIK.js";import"./chunk-BACKG7KA.js";import"./chunk-IQL3REGJ.js";import"./chunk-AIAUP7OE.js";import"./chunk-C6PICAXB.js";import"./chunk-6JS7B4FW.js";import{B as le,H as _e,K as ce,c as Q,e as Y,f as Z,g as ee,i as te,j as ne,s as ie,v as oe,w as re,y as ae,z as se}from"./chunk-VKQQDCUN.js";import"./chunk-DSYNIXJF.js";import{b as j,d as q}from"./chunk-NPFPMA4P.js";import"./chunk-O2SMJYPC.js";import"./chunk-N2AU7VKX.js";import"./chunk-ZC23RK4J.js";import"./chunk-OPHQNXYO.js";import{$b as l,Ac as K,Cb as D,Db as r,Eb as a,Fb as O,Jb as V,Kb as W,Mb as S,Qc as $,Sa as T,Tb as E,Ub as C,Vb as I,Xc as w,Yb as z,Zb as u,_ as m,da as _,ea as c,gb as B,gc as J,ha as v,hc as X,nc as y,pa as N,sc as f,tc as R,uc as h,vc as P,wb as p,wc as A,xb as F,xc as L,zc as H}from"./chunk-TQTOIWBK.js";import"./chunk-7CGTOI24.js";var Fe=["formRef"],Oe=["testUrl"],me=()=>({maxWidth:"700px",width:"100%"});function Re(o,i){if(o&1){let e=S();r(0,"button",24),u("click",function(){_(e);let t=l();return c(t.openTargetUrlDialog())}),E(1,5),O(2,"sh-icon"),C(),a()}}function Ne(o,i){if(o&1){let e=S();r(0,"button",24),u("click",function(){_(e);let t=l(2);return c(t.copyTargetUrl())}),E(1,7),O(2,"sh-icon"),C(),a()}}function De(o,i){if(o&1){let e=S();r(0,"sh-menu")(1,"button",15)(2,"sh-icon"),y(3,"dots-three-vertical"),a()(),V(4,25),r(5,"button",24),u("click",function(){_(e);let t=l();return c(t.openTargetUrlDialog())}),E(6,6),O(7,"sh-icon"),C(),a(),p(8,Ne,3,0,"button",15),W(),a()}if(o&2){l();let e=L(0);T(8),F(e?8:-1)}}function Ie(o,i){if(o&1){let e=S();r(0,"app-destination-list-item",17)(1,"button",20),u("click",function(){_(e);let t=l();return c(t.removeDestination())}),I(2,8),a()()}if(o&2){l();let e=L(12);D("destination",e)}}function fe(o,i){if(o&1){let e=S();r(0,"app-destination-list",26),u("setDestination",function(t){_(e);let s=l();return c(s.setDestination(t))}),a()}}function he(o,i){if(o&1){let e=S();r(0,"app-single-destination",27),h("targetUrlChange",function(t){_(e);let s=l();return R(s.targetUrlModel,t)||(s.targetUrlModel=t),c(t)}),a()}if(o&2){let e=l();f("targetUrl",e.targetUrlModel)}}function Me(o,i){o&1&&(E(0,4,1),O(1,"sh-icon",22),C())}function ye(o,i){o&1&&(E(0,4,2),O(1,"sh-icon"),C())}function Pe(o,i){if(o&1){let e=S();r(0,"sh-dialog",28),h("isOpenChange",function(t){_(e);let s=l();return R(s.targetUrlDialogOpen,t)||(s.targetUrlDialogOpen=t),c(t)}),r(1,"header",29)(2,"div",30)(3,"h2"),I(4,9),a(),r(5,"sh-alert",31),I(6,10),a()()(),r(7,"div",32)(8,"sh-form-field")(9,"textarea",33),h("ngModelChange",function(t){_(e);let s=l();return R(s.targetUrlCtrl,t)||(s.targetUrlCtrl=t),c(t)}),a()()(),r(10,"footer",34)(11,"button",20),u("click",function(){_(e);let t=l();return c(t.closeTargetUrlDialog(!1))}),y(12,"Cancel"),a(),r(13,"button",35),u("click",function(){_(e);let t=l();return c(t.closeTargetUrlDialog(!0))}),E(14,11),O(15,"sh-icon"),C(),a()()()}if(o&2){let e=l();f("isOpen",e.targetUrlDialogOpen),D("options",K(3,me)),T(9),f("ngModel",e.targetUrlCtrl)}}var x=class o{#i=m(q);#o=m(j);#n=m(se);injector=m(v);#e=m(pe);formRef=w.required("formRef");testUrlComponent=w.required("testUrl");testSignal=this.#e.destinationTestSignal;targetUrlModel=this.#e.destinationTargetUrl;targetUrlCtrl=N(null);targetUrlInitial=N(null);targetUrlDialogOpen=N(!1);toggleNewDestination=N(!0);selectedDestinationType=$(()=>{let i=this.#e.destinationTargetUrl();return i?Te(i):null});selectedDestinationTypeOption=$(()=>{let i=this.selectedDestinationType();return i?{key:i.customKey??i.key,customKey:i.customKey??null,displayName:i.displayName,description:i.description,icon:i.icon}:null});copyTargetUrl(){navigator.clipboard.writeText(this.#e.destinationTargetUrl()??"")}openTargetUrlDialog(){let i=this.#e.destinationTargetUrl();this.targetUrlCtrl.set(i),this.targetUrlInitial.set(i),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(i=!1){this.targetUrlDialogOpen.set(!1);let e=this.targetUrlCtrl(),n=this.targetUrlInitial();!i||e===n||!e||this.#e.updateTargetUrl(e)}setDestination(i){let e=ge(i??"");if(e){if(e.mapper.default){let n=e.mapper.default("");this.#e.updateTargetUrl(n);return}this.#e.updateTargetUrl(`${i}://`)}}removeDestination(){this.#e.updateTargetUrl(null)}goBack(){this.#i.navigate(["general"],{relativeTo:this.#o.parent})}next(){let i=this.testSignal();if(i===null){this.#n.open(M,{data:{title:$localize`Test destination`,message:$localize`You have not tested the destination yet. Do you want to test it now?`,confirmText:$localize`Test now`,cancelText:$localize`Skip test and continue`},closed:n=>{n?this.testUrlComponent()?.testDestination(!1)?.then(t=>{t.action==="success"&&t.containsBackup?this.#t():this.#n.open(M,{data:{title:$localize`Test did not succeed`,message:t.errorMessage??$localize`Failed to test the destination.`,confirmText:$localize`OK`,cancelText:void 0}})}):this.#t()}});return}let e=typeof i=="string"?null:i;if(e?.action!=="success"||!e.containsBackup){this.#n.open(M,{data:{title:$localize`Test destination`,message:$localize`The destination has not been tested successfully. Are you sure you want to continue?`,confirmText:$localize`Edit destination`,cancelText:$localize`Yes, continue`},closed:n=>{n||this.#t()}});return}this.#t()}#t(){this.#i.navigate(["encryption"],{relativeTo:this.#o.parent})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=B({type:o,selectors:[["app-restore-destination"]],viewQuery:function(e,n){e&1&&J(n.formRef,Fe,5)(n.testUrlComponent,Oe,5),e&2&&X(2)},features:[H([Ee])],decls:25,vars:17,consts:()=>{let i;i=$localize`Backup destination`;let e;e=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let n;n=$localize`${"\uFFFD*22:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SH_ICON:spinner${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*22:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*23:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SH_ICON_1:arrow-right${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*23:2\uFFFD"}:CLOSE_BLOCK_ELSE: Continue `,n=z(n);let t;t=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Set target URL `;let s;s=$localize`${"\uFFFD#7\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SH_ICON: Edit target URL `;let g;g=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:copy${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Copy URL to clipboard `;let U;U=$localize`Change`;let b;b=$localize`Edit target URL`;let G;G=$localize`Be careful, this will overwrite everything you have in your destination.`;let k;return k=$localize` Override target URL ${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:swap${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON:`,[["formRef",""],["testUrl",""],i,e,n,t,s,g,U,b,G,k,[3,"submit"],[1,"title-30"],[1,"actions"],["shButton","","type","button",1,"small"],[3,"targetUrlChange","testSignalChange","targetUrl","testSignal","backupId","sourcePrefix","suppressErrorDialogs","askToCreate","testExpectation","moduleType"],[1,"current-destination",3,"destination"],[3,"targetUrl"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary",3,"disabled"],[1,"loader"],[3,"isOpen","options"],["shButton","","type","button",1,"small",3,"click"],["menu",""],[3,"setDestination"],[3,"targetUrlChange","targetUrl"],[3,"isOpenChange","isOpen","options"],["header",""],[1,"target-dialog-header"],[1,"warn"],["content",""],["id","targetUrl","autocomplete","off",3,"ngModelChange","ngModel"],["footer",""],["shButton","","type","submit",1,"raised","primary",3,"click"]]},template:function(e,n){if(e&1){let t=S();P(0),r(1,"form",12,0),u("submit",function(){return n.next()}),r(3,"header")(4,"h3",13)(5,"span"),I(6,2),a(),r(7,"div",14),p(8,Re,3,0,"button",15)(9,De,9,1,"sh-menu"),a()(),r(10,"app-test-url",16,1),h("targetUrlChange",function(g){return _(t),R(n.targetUrlModel,g)||(n.targetUrlModel=g),c(g)})("testSignalChange",function(g){return _(t),R(n.testSignal,g)||(n.testSignal=g),c(g)}),a(),P(12),p(13,Ie,3,1,"app-destination-list-item",17),a(),p(14,fe,1,0,"app-destination-list"),p(15,he,1,1,"app-single-destination",18),r(16,"div",19)(17,"button",20),u("click",function(){return n.goBack()}),E(18,3),O(19,"sh-icon"),C(),a(),r(20,"button",21),E(21,4),p(22,Me,2,0,"sh-icon",22)(23,ye,2,0,"sh-icon"),C(),a()()(),p(24,Pe,16,4,"sh-dialog",23)}if(e&2){let t=A(!!n.targetUrlModel());T(8),F(t?9:8),T(2),f("targetUrl",n.targetUrlModel)("testSignal",n.testSignal),D("backupId",null)("sourcePrefix",null)("suppressErrorDialogs",!1)("askToCreate",!1)("testExpectation","containsBackup")("moduleType","Backend"),T(2);let s=A(n.selectedDestinationTypeOption());T(),F(s?13:-1),T(),F(t?-1:14),T(),F(t?15:-1),T(5),D("disabled",n.testSignal()=="testing"||!t),T(2),F(n.testSignal()=="testing"?22:23),T(2),F(n.targetUrlDialogOpen()?24:-1)}},dependencies:[Ce,de,ue,ie,ne,Q,Y,Z,te,ee,le,_e,ce,oe,ae,re,Se],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:40rem}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], header[_ngcontent-%COMP%] sh-alert[_ngcontent-%COMP%]{width:100%}header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:.5rem}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}pre[_ngcontent-%COMP%]{white-space:pre-wrap}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.field-row.single-field[_ngcontent-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.clickable[_ngcontent-%COMP%]{cursor:pointer;color:var(--primary-8)}.most-common-destinations[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10);background-color:var(--base-2);cursor:pointer}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-10);margin:0}[prefix].link[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline;color:var(--primary-8)}textarea[_ngcontent-%COMP%] ~ grammarly-extension[_ngcontent-%COMP%]{display:none}.target-dialog-header[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:.5rem}"],changeDetection:0})};export{x as default};
1
+ import{g as pe}from"./chunk-77IXQ4GU.js";import"./chunk-TZ7MW3NZ.js";import{b as ue,c as de,m as Se,q as Ee,r as Ce}from"./chunk-43WATFQS.js";import"./chunk-CAQ3XMFP.js";import"./chunk-UZ4POLDC.js";import{c as Te,d as ge}from"./chunk-O56QUSSI.js";import"./chunk-6Q6SSTBK.js";import"./chunk-YCJYEQF7.js";import"./chunk-AXQQEOTT.js";import"./chunk-UTXZPAY6.js";import{a as M}from"./chunk-IMQUTGIK.js";import"./chunk-F3ETZKLK.js";import"./chunk-IQL3REGJ.js";import"./chunk-E4NQOMJX.js";import"./chunk-YYD2JU6T.js";import"./chunk-6JS7B4FW.js";import{B as le,H as _e,K as ce,c as Q,e as Y,f as Z,g as ee,i as te,j as ne,s as ie,v as oe,w as re,y as ae,z as se}from"./chunk-VKQQDCUN.js";import"./chunk-DSYNIXJF.js";import{b as j,d as q}from"./chunk-NPFPMA4P.js";import"./chunk-O2SMJYPC.js";import"./chunk-N2AU7VKX.js";import"./chunk-ZC23RK4J.js";import"./chunk-OPHQNXYO.js";import{$b as l,Ac as K,Cb as D,Db as r,Eb as a,Fb as O,Jb as V,Kb as W,Mb as S,Qc as $,Sa as T,Tb as E,Ub as C,Vb as I,Xc as w,Yb as z,Zb as u,_ as m,da as _,ea as c,gb as B,gc as J,ha as v,hc as X,nc as y,pa as N,sc as f,tc as R,uc as h,vc as P,wb as p,wc as A,xb as F,xc as L,zc as H}from"./chunk-TQTOIWBK.js";import"./chunk-7CGTOI24.js";var Fe=["formRef"],Oe=["testUrl"],me=()=>({maxWidth:"700px",width:"100%"});function Re(o,i){if(o&1){let e=S();r(0,"button",24),u("click",function(){_(e);let t=l();return c(t.openTargetUrlDialog())}),E(1,5),O(2,"sh-icon"),C(),a()}}function Ne(o,i){if(o&1){let e=S();r(0,"button",24),u("click",function(){_(e);let t=l(2);return c(t.copyTargetUrl())}),E(1,7),O(2,"sh-icon"),C(),a()}}function De(o,i){if(o&1){let e=S();r(0,"sh-menu")(1,"button",15)(2,"sh-icon"),y(3,"dots-three-vertical"),a()(),V(4,25),r(5,"button",24),u("click",function(){_(e);let t=l();return c(t.openTargetUrlDialog())}),E(6,6),O(7,"sh-icon"),C(),a(),p(8,Ne,3,0,"button",15),W(),a()}if(o&2){l();let e=L(0);T(8),F(e?8:-1)}}function Ie(o,i){if(o&1){let e=S();r(0,"app-destination-list-item",17)(1,"button",20),u("click",function(){_(e);let t=l();return c(t.removeDestination())}),I(2,8),a()()}if(o&2){l();let e=L(12);D("destination",e)}}function fe(o,i){if(o&1){let e=S();r(0,"app-destination-list",26),u("setDestination",function(t){_(e);let s=l();return c(s.setDestination(t))}),a()}}function he(o,i){if(o&1){let e=S();r(0,"app-single-destination",27),h("targetUrlChange",function(t){_(e);let s=l();return R(s.targetUrlModel,t)||(s.targetUrlModel=t),c(t)}),a()}if(o&2){let e=l();f("targetUrl",e.targetUrlModel)}}function Me(o,i){o&1&&(E(0,4,1),O(1,"sh-icon",22),C())}function ye(o,i){o&1&&(E(0,4,2),O(1,"sh-icon"),C())}function Pe(o,i){if(o&1){let e=S();r(0,"sh-dialog",28),h("isOpenChange",function(t){_(e);let s=l();return R(s.targetUrlDialogOpen,t)||(s.targetUrlDialogOpen=t),c(t)}),r(1,"header",29)(2,"div",30)(3,"h2"),I(4,9),a(),r(5,"sh-alert",31),I(6,10),a()()(),r(7,"div",32)(8,"sh-form-field")(9,"textarea",33),h("ngModelChange",function(t){_(e);let s=l();return R(s.targetUrlCtrl,t)||(s.targetUrlCtrl=t),c(t)}),a()()(),r(10,"footer",34)(11,"button",20),u("click",function(){_(e);let t=l();return c(t.closeTargetUrlDialog(!1))}),y(12,"Cancel"),a(),r(13,"button",35),u("click",function(){_(e);let t=l();return c(t.closeTargetUrlDialog(!0))}),E(14,11),O(15,"sh-icon"),C(),a()()()}if(o&2){let e=l();f("isOpen",e.targetUrlDialogOpen),D("options",K(3,me)),T(9),f("ngModel",e.targetUrlCtrl)}}var x=class o{#i=m(q);#o=m(j);#n=m(se);injector=m(v);#e=m(pe);formRef=w.required("formRef");testUrlComponent=w.required("testUrl");testSignal=this.#e.destinationTestSignal;targetUrlModel=this.#e.destinationTargetUrl;targetUrlCtrl=N(null);targetUrlInitial=N(null);targetUrlDialogOpen=N(!1);toggleNewDestination=N(!0);selectedDestinationType=$(()=>{let i=this.#e.destinationTargetUrl();return i?Te(i):null});selectedDestinationTypeOption=$(()=>{let i=this.selectedDestinationType();return i?{key:i.customKey??i.key,customKey:i.customKey??null,displayName:i.displayName,description:i.description,icon:i.icon}:null});copyTargetUrl(){navigator.clipboard.writeText(this.#e.destinationTargetUrl()??"")}openTargetUrlDialog(){let i=this.#e.destinationTargetUrl();this.targetUrlCtrl.set(i),this.targetUrlInitial.set(i),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(i=!1){this.targetUrlDialogOpen.set(!1);let e=this.targetUrlCtrl(),n=this.targetUrlInitial();!i||e===n||!e||this.#e.updateTargetUrl(e)}setDestination(i){let e=ge(i??"");if(e){if(e.mapper.default){let n=e.mapper.default("");this.#e.updateTargetUrl(n);return}this.#e.updateTargetUrl(`${i}://`)}}removeDestination(){this.#e.updateTargetUrl(null)}goBack(){this.#i.navigate(["general"],{relativeTo:this.#o.parent})}next(){let i=this.testSignal();if(i===null){this.#n.open(M,{data:{title:$localize`Test destination`,message:$localize`You have not tested the destination yet. Do you want to test it now?`,confirmText:$localize`Test now`,cancelText:$localize`Skip test and continue`},closed:n=>{n?this.testUrlComponent()?.testDestination(!1)?.then(t=>{t.action==="success"&&t.containsBackup?this.#t():this.#n.open(M,{data:{title:$localize`Test did not succeed`,message:t.errorMessage??$localize`Failed to test the destination.`,confirmText:$localize`OK`,cancelText:void 0}})}):this.#t()}});return}let e=typeof i=="string"?null:i;if(e?.action!=="success"||!e.containsBackup){this.#n.open(M,{data:{title:$localize`Test destination`,message:$localize`The destination has not been tested successfully. Are you sure you want to continue?`,confirmText:$localize`Edit destination`,cancelText:$localize`Yes, continue`},closed:n=>{n||this.#t()}});return}this.#t()}#t(){this.#i.navigate(["encryption"],{relativeTo:this.#o.parent})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=B({type:o,selectors:[["app-restore-destination"]],viewQuery:function(e,n){e&1&&J(n.formRef,Fe,5)(n.testUrlComponent,Oe,5),e&2&&X(2)},features:[H([Ee])],decls:25,vars:17,consts:()=>{let i;i=$localize`Backup destination`;let e;e=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let n;n=$localize`${"\uFFFD*22:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SH_ICON:spinner${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*22:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*23:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SH_ICON_1:arrow-right${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*23:2\uFFFD"}:CLOSE_BLOCK_ELSE: Continue `,n=z(n);let t;t=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Set target URL `;let s;s=$localize`${"\uFFFD#7\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SH_ICON: Edit target URL `;let g;g=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:copy${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Copy URL to clipboard `;let U;U=$localize`Change`;let b;b=$localize`Edit target URL`;let G;G=$localize`Be careful, this will overwrite everything you have in your destination.`;let k;return k=$localize` Override target URL ${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:swap${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON:`,[["formRef",""],["testUrl",""],i,e,n,t,s,g,U,b,G,k,[3,"submit"],[1,"title-30"],[1,"actions"],["shButton","","type","button",1,"small"],[3,"targetUrlChange","testSignalChange","targetUrl","testSignal","backupId","sourcePrefix","suppressErrorDialogs","askToCreate","testExpectation","moduleType"],[1,"current-destination",3,"destination"],[3,"targetUrl"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary",3,"disabled"],[1,"loader"],[3,"isOpen","options"],["shButton","","type","button",1,"small",3,"click"],["menu",""],[3,"setDestination"],[3,"targetUrlChange","targetUrl"],[3,"isOpenChange","isOpen","options"],["header",""],[1,"target-dialog-header"],[1,"warn"],["content",""],["id","targetUrl","autocomplete","off",3,"ngModelChange","ngModel"],["footer",""],["shButton","","type","submit",1,"raised","primary",3,"click"]]},template:function(e,n){if(e&1){let t=S();P(0),r(1,"form",12,0),u("submit",function(){return n.next()}),r(3,"header")(4,"h3",13)(5,"span"),I(6,2),a(),r(7,"div",14),p(8,Re,3,0,"button",15)(9,De,9,1,"sh-menu"),a()(),r(10,"app-test-url",16,1),h("targetUrlChange",function(g){return _(t),R(n.targetUrlModel,g)||(n.targetUrlModel=g),c(g)})("testSignalChange",function(g){return _(t),R(n.testSignal,g)||(n.testSignal=g),c(g)}),a(),P(12),p(13,Ie,3,1,"app-destination-list-item",17),a(),p(14,fe,1,0,"app-destination-list"),p(15,he,1,1,"app-single-destination",18),r(16,"div",19)(17,"button",20),u("click",function(){return n.goBack()}),E(18,3),O(19,"sh-icon"),C(),a(),r(20,"button",21),E(21,4),p(22,Me,2,0,"sh-icon",22)(23,ye,2,0,"sh-icon"),C(),a()()(),p(24,Pe,16,4,"sh-dialog",23)}if(e&2){let t=A(!!n.targetUrlModel());T(8),F(t?9:8),T(2),f("targetUrl",n.targetUrlModel)("testSignal",n.testSignal),D("backupId",null)("sourcePrefix",null)("suppressErrorDialogs",!1)("askToCreate",!1)("testExpectation","containsBackup")("moduleType","Backend"),T(2);let s=A(n.selectedDestinationTypeOption());T(),F(s?13:-1),T(),F(t?-1:14),T(),F(t?15:-1),T(5),D("disabled",n.testSignal()=="testing"||!t),T(2),F(n.testSignal()=="testing"?22:23),T(2),F(n.targetUrlDialogOpen()?24:-1)}},dependencies:[Ce,de,ue,ie,ne,Q,Y,Z,te,ee,le,_e,ce,oe,ae,re,Se],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:40rem}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], header[_ngcontent-%COMP%] sh-alert[_ngcontent-%COMP%]{width:100%}header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:.5rem}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}pre[_ngcontent-%COMP%]{white-space:pre-wrap}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.field-row.single-field[_ngcontent-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.clickable[_ngcontent-%COMP%]{cursor:pointer;color:var(--primary-8)}.most-common-destinations[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10);background-color:var(--base-2);cursor:pointer}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-10);margin:0}[prefix].link[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline;color:var(--primary-8)}textarea[_ngcontent-%COMP%] ~ grammarly-extension[_ngcontent-%COMP%]{display:none}.target-dialog-header[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:.5rem}"],changeDetection:0})};export{x as default};
@@ -1 +1 @@
1
- import{a as De}from"./chunk-QDDVZ4CR.js";import{a as Oe}from"./chunk-BLSV7CNZ.js";import{a as fe}from"./chunk-I6MIXWIT.js";import{b as Ce}from"./chunk-RJ2JM7C7.js";import{a as Ee}from"./chunk-OHYENIPP.js";import{a as Fe}from"./chunk-BACKG7KA.js";import{b as me}from"./chunk-AIAUP7OE.js";import{a as pe}from"./chunk-C6PICAXB.js";import{c as se}from"./chunk-6JS7B4FW.js";import{B as A,H as ue,K as Se,P as de,Y as ge,c as ae,e as le,i as re,k as _e,s as ce,v as P,z as Te}from"./chunk-VKQQDCUN.js";import{d as x}from"./chunk-DSYNIXJF.js";import{e as oe}from"./chunk-NPFPMA4P.js";import{$b as S,Ac as H,Cb as R,Db as a,Eb as l,F as Q,Fb as T,Jb as te,Kb as ne,Mb as D,Qc as Y,Sa as _,Tb as m,Ub as C,Vb as I,Vc as ie,Yb as b,Zb as c,_ as d,da as E,ea as O,gb as N,kc as G,nc as F,oc as w,pa as f,pc as V,ra as ee,sc as y,tc as v,uc as B,wb as g,xb as p}from"./chunk-TQTOIWBK.js";function Pe(o,t){o&1&&(a(0,"sh-icon",2),F(1,"x-bold"),l())}function Ae(o,t){o&1&&(a(0,"sh-icon",3),F(1,"list-bold"),l())}function he(o,t){if(o&1){let n=D();a(0,"button",1),c("click",function(){E(n);let i=S();return O(i.toggleNav())}),g(1,Pe,2,0,"sh-icon",2)(2,Ae,2,0,"sh-icon",3),l()}if(o&2){let n=S();_(),p(n.isNavOpen()?1:2)}}var $=class o{#e=d(Oe);isNavOpen=this.#e.isNavOpen;isMobile=this.#e.isMobile;toggleNav(){this.#e.toggleNav()}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=N({type:o,selectors:[["app-mobile-menu-toggle"]],decls:1,vars:1,consts:[["shButton","",1,"small","toggle-sidebar","ghost"],["shButton","",1,"small","toggle-sidebar","ghost",3,"click"],[1,"cross"],[1,"burger"]],template:function(n,e){n&1&&g(0,he,3,1,"button",0),n&2&&p(e.isMobile()?0:-1)},dependencies:[A,P],styles:["[_nghost-%COMP%]{display:contents}.toggle-sidebar[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:center}.toggle-sidebar[_ngcontent-%COMP%] .cross[_ngcontent-%COMP%], .toggle-sidebar[_ngcontent-%COMP%] .burger[_ngcontent-%COMP%]{opacity:1;transition:opacity 124ms linear;margin:0}.toggle-sidebar[_ngcontent-%COMP%] .cross.hidden[_ngcontent-%COMP%], .toggle-sidebar[_ngcontent-%COMP%] .burger.hidden[_ngcontent-%COMP%]{opacity:0}"],changeDetection:0})};var Ne=()=>["/connect/logon"];function be(o,t){o&1&&(m(0,0,1),T(1,"div",9),C())}function ye(o,t){o&1&&(m(0,0,2),T(1,"div",10),C())}function ve(o,t){if(o&1){let n=D();a(0,"div",8),c("click",function(){E(n);let i=S();return O(i.resetAndRetry())}),m(1,0),g(2,be,2,0)(3,ye,2,0),C(),l()}if(o&2){let n=S();_(2),p(n.resetting()?2:3)}}function Be(o,t){o&1&&(a(0,"div",6),m(1,1),T(2,"div",11),C(),l()),o&2&&R("routerLink",H(1,Ne))}function ke(o,t){o&1&&(a(0,"div",6),m(1,2),T(2,"div",10),C(),l()),o&2&&R("routerLink",H(1,Ne))}function Le(o,t){if(o&1){let n=D();a(0,"div",7),m(1,3),a(2,"sh-icon",12),c("click",function(){E(n);let i=S();return O(i.cancel())}),l(),a(3,"div",13),c("click",function(){E(n);let i=S();return O(i.claim())}),l(),T(4,"div",14),C(),l()}}function Ge(o,t){if(o&1){let n=D();a(0,"div",8),c("click",function(){E(n);let i=S();return O(i.openConsole())}),m(1,4),T(2,"div",15),C(),l()}}var k=class o{#e=d(Ee);state=this.#e.state;resetting=f(!1);stateEffect=ee(()=>{let t=this.#e.state(),n=this.resetting();t==="registered"&&n&&(this.resetting.set(!1),this.#e.beginRemoteRegistration())});ngOnInit(){this.#e.refreshRemoteControlStatus()}claim(){let t=this.#e.claimUrl();t&&window.open(t,"_blank")}cancel(){this.#e.cancelRemoteRegistration()}resetAndRetry(){this.resetting.set(!0),this.#e.cancelRemoteRegistration()}openConsole(){this.#e.openConsole()}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=N({type:o,selectors:[["app-remote-connectivity-status"]],decls:5,vars:1,consts:()=>{let t;t=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF: Resetting ${"\uFFFD#1:1\uFFFD"}:START_TAG_DIV:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_DIV:${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE: Click to connect ${"\uFFFD#1:2\uFFFD"}:START_TAG_DIV_1:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_DIV:${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,t=b(t);let n;n=$localize` Connecting ${"\uFFFD#2\uFFFD"}:START_TAG_DIV:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_DIV:`;let e;e=$localize` Click to register ${"\uFFFD#2\uFFFD"}:START_TAG_DIV:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_DIV:`;let i;i=$localize`Cancel registration`;let s;s=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:x-circle${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD#3\uFFFD"}:START_TAG_DIV:Click to claim${"[\uFFFD/#3\uFFFD|\uFFFD/#4\uFFFD]"}:CLOSE_TAG_DIV:${"\uFFFD#4\uFFFD"}:START_TAG_DIV_1:${"[\uFFFD/#3\uFFFD|\uFFFD/#4\uFFFD]"}:CLOSE_TAG_DIV:`,s=b(s);let u;return u=$localize` Connected ${"\uFFFD#2\uFFFD"}:START_TAG_DIV:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_DIV:`,[t,n,e,s,u,[1,"connectivity-status"],[1,"connectivity-status",3,"routerLink"],[1,"connectivity-status","claim"],[1,"connectivity-status",3,"click"],[1,"status","blinking"],[1,"status"],[1,"status","warning","blinking"],["shTooltip",i,3,"click"],[1,"claim",3,"click"],[1,"status","success","blinking"],[1,"status","success"]]},template:function(n,e){if(n&1&&g(0,ve,4,1,"div",5)(1,Be,3,2,"div",6)(2,ke,3,2,"div",6)(3,Le,5,0,"div",7)(4,Ge,3,0,"div",5),n&2){let i=e.state()==="unknown"||e.state()==="inactive"||e.state()==="registeringfaulted",s=e.state()==="registeringfaulted",u=e.state()==="registering",r=e.state()==="registered",M=e.state()==="connected"||e.state()==="disabled"||e.state()==="connecting";p(s?0:u?1:i?2:r?3:M?4:-1)}},dependencies:[oe,P,ge],styles:["[_nghost-%COMP%]{display:flex;align-items:center;padding:0 .75rem}@media only screen and (max-width:768px){[_nghost-%COMP%]{padding:0}}.hide-text[_nghost-%COMP%]{font-size:0}.in-menu[_nghost-%COMP%]{padding:.75rem;border-bottom:1px solid var(--base-4)}.connectivity-status[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;cursor:pointer}.connectivity-status[_ngcontent-%COMP%]:hover{color:var(--primary-8)}.connectivity-status.claim[_ngcontent-%COMP%]{display:flex;gap:.5rem;cursor:pointer}.connectivity-status.claim[_ngcontent-%COMP%]:hover{color:inherit}.connectivity-status.claim[_ngcontent-%COMP%] .claim[_ngcontent-%COMP%]:hover{color:var(--primary-8)}.connectivity-status.claim[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]:hover{color:var(--error-8)}.status[_ngcontent-%COMP%]{width:.625rem;height:.625rem;border-radius:50%;background-color:var(--base-4)}.status.success[_ngcontent-%COMP%]{background-color:var(--success-8)}.status.warning[_ngcontent-%COMP%]{background-color:var(--warn-8)}.status.blinking[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_blinking 1s infinite}@keyframes _ngcontent-%COMP%_blinking{0%{opacity:.2}50%{opacity:1}to{opacity:.2}}"],changeDetection:0})};var Me={Byte:"B",KByte:"KB",MByte:"MB",GByte:"GB",TByte:"TB",PByte:"PB"},xe=["mbps","gbps"],Ie=8,W=1024,U=W*1024,j=U*1024,Z=j*1024,Re=Z*1024,$e={B:1,KB:W,MB:U,GB:j,TB:Z,PB:Re},Ue=1e3,K=Ue*1e3,X=K*1e3,we=[{threshold:Re,unitPrefix:"PByte"},{threshold:Z,unitPrefix:"TByte"},{threshold:j,unitPrefix:"GByte"},{threshold:U,unitPrefix:"MByte"},{threshold:W,unitPrefix:"KByte"},{threshold:1,unitPrefix:"Byte"}],L=class o{#e=d(x);closed=ie();isSubmitting=f(!1);sizeOptions=f([...xe]);maxUpload=f(0);maxDownload=f(0);maxUploadUnit=f("mbps");maxDownloadUnit=f("mbps");ngOnInit(){this.init()}convertToBitsPerSecondUnits(t,n){let i=t*($e[n.toUpperCase()]||U)*Ie;return i===0?{value:0,unit:"mbps"}:i>=X?{value:parseFloat((i/X).toFixed(2)),unit:"gbps"}:{value:parseFloat((i/K).toFixed(2)),unit:"mbps"}}convertFromBitsPerSecondUnits(t,n){let e=0;switch(n){case"gbps":e=t*X;break;case"mbps":e=t*K;break}let i=e/Ie;if(i===0)return{valueForApi:0,unitPrefixForApi:"Byte"};for(let{threshold:s,unitPrefix:u}of we)if(i>=s)return{valueForApi:Math.round(i/s),unitPrefixForApi:u};return{valueForApi:Math.round(i),unitPrefixForApi:"Byte"}}init(){this.#e.getApiV1Serversettings().subscribe({next:t=>{let n=t?.["max-upload-speed"],e=t?.["max-download-speed"];if(n&&n!==""){let i=n.match(/^(\d+(?:\.\d+)?)([A-Za-z]+)$/);if(i){let s=parseFloat(i[1]),u=i[2],r=this.convertToBitsPerSecondUnits(s,u);this.maxUpload.set(r.value),this.maxUploadUnit.set(r.unit)}else console.warn("Unexpected max-upload-speed format from API:",n),this.resetUpload()}else this.resetUpload();if(e&&e!==""){let i=e.match(/^(\d+(?:\.\d+)?)([A-Za-z]+)$/);if(i){let s=parseFloat(i[1]),u=i[2],r=this.convertToBitsPerSecondUnits(s,u);this.maxDownload.set(r.value),this.maxDownloadUnit.set(r.unit)}else console.warn("Unexpected max-download-speed format from API:",e),this.resetDownload()}else this.resetDownload()},error:t=>{console.error("Failed to get server settings:",t),this.resetDownload(),this.resetUpload()}})}resetDownload(){this.maxDownload.set(0),this.maxDownloadUnit.set("mbps")}resetUpload(){this.maxUpload.set(0),this.maxUploadUnit.set("mbps")}blockDecimalKeys(t){if([".",","].includes(t.key))return t.preventDefault()}cleanupInputAfterPasting(t){t.preventDefault();let n=t.clipboardData?.getData("text/plain");if(!n)return;let e=n.replaceAll(/[\.,]/g,"");t.target.value=e}submit(){this.isSubmitting.set(!0);let t="",n="",e=this.maxUpload()??0,i=this.maxUploadUnit(),s=this.maxDownload()??0,u=this.maxDownloadUnit();if(e>0){let{valueForApi:r,unitPrefixForApi:M}=this.convertFromBitsPerSecondUnits(e,i),h=Me[M];h?t=`${r}${h}`:console.error(`Invalid unit prefix for API submission (upload): ${M}. Defaulting to empty string.`)}if(s){let{valueForApi:r,unitPrefixForApi:M}=this.convertFromBitsPerSecondUnits(s,u),h=Me[M];h?n=`${r}${h}`:console.error(`Invalid unit prefix for API submission (download): ${M}. Defaulting to empty string.`)}this.#e.patchApiV1Serversettings({requestBody:{"max-upload-speed":t,"max-download-speed":n}}).pipe(Q(()=>this.isSubmitting.set(!1))).subscribe({next:()=>{this.closed.emit(!0)},error:r=>{console.error("Failed to submit throttle settings:",r)}})}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=N({type:o,selectors:[["app-throttle-settings-dialog"]],outputs:{closed:"closed"},decls:26,vars:10,consts:()=>{let t;t=$localize`Throttle network speed`;let n;n=$localize`We will round bits to the nearest byte value.`;let e;e=$localize`Max upload speed`;let i;i=$localize`Max download speed`;let s;s=$localize`Cancel`;let u;return u=$localize` Update settings `,[t,n,e,i,s,u,["content",""],[1,"column"],[1,"field-row"],["type","number",3,"paste","keydown","ngModelChange","ngModel"],[3,"isClearable","options"],["type","text",3,"ngModelChange","ngModel"],["footer",""],["shButton","",3,"click"],["shButton","",1,"raised","primary",3,"click"]]},template:function(n,e){n&1&&(a(0,"header")(1,"h3"),I(2,0),l(),a(3,"p"),I(4,1),l()(),a(5,"div",6)(6,"div",7)(7,"div",8)(8,"label"),I(9,2),l(),a(10,"sh-form-field")(11,"input",9),c("paste",function(s){return e.cleanupInputAfterPasting(s)})("keydown",function(s){return e.blockDecimalKeys(s)}),B("ngModelChange",function(s){return v(e.maxUpload,s)||(e.maxUpload=s),s}),l()(),a(12,"sh-select",10)(13,"input",11),B("ngModelChange",function(s){return v(e.maxUploadUnit,s)||(e.maxUploadUnit=s),s}),l()()(),a(14,"div",8)(15,"label"),I(16,3),l(),a(17,"sh-form-field")(18,"input",9),c("paste",function(s){return e.cleanupInputAfterPasting(s)})("keydown",function(s){return e.blockDecimalKeys(s)}),B("ngModelChange",function(s){return v(e.maxDownload,s)||(e.maxDownload=s),s}),l()(),a(19,"sh-select",10)(20,"input",11),B("ngModelChange",function(s){return v(e.maxDownloadUnit,s)||(e.maxDownloadUnit=s),s}),l()()()()(),a(21,"footer",12)(22,"button",13),c("click",function(){return e.closed.emit(!1)}),I(23,4),l(),a(24,"button",14),c("click",function(){return e.submit()}),I(25,5),l()()),n&2&&(_(11),y("ngModel",e.maxUpload),_(),R("isClearable",!1)("options",e.sizeOptions()),_(),y("ngModel",e.maxUploadUnit),_(5),y("ngModel",e.maxDownload),_(),R("isClearable",!1)("options",e.sizeOptions()),_(),y("ngModel",e.maxDownloadUnit),_(4),G("loading",e.isSubmitting()))},dependencies:[ce,ae,_e,le,re,ue,de,A],styles:['[_nghost-%COMP%]{display:block}h3[_ngcontent-%COMP%]{font:var(--title-30)}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;padding:1rem;gap:.5rem;margin-bottom:1rem}.column[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.field-row[_ngcontent-%COMP%]{display:grid;grid-template-areas:"label label" "input select";grid-template-columns:1fr auto;align-items:center;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{grid-area:label}.field-row[_ngcontent-%COMP%] sh-form-field[_ngcontent-%COMP%]{grid-area:input}.field-row[_ngcontent-%COMP%] sh-select[_ngcontent-%COMP%]{grid-area:select}'],changeDetection:0})};function Ve(o,t){o&1&&T(0,"app-remote-connectivity-status")}function He(o,t){if(o&1){let n=D();a(0,"button",7),c("click",function(){E(n);let i=S(2);return O(i.abort())}),m(1,1),T(2,"sh-icon"),C(),l()}}function Ye(o,t){if(o&1){let n=D();a(0,"button",7),c("click",function(){E(n);let i=S(2);return O(i.stop())}),m(1,2),T(2,"sh-icon"),C(),l()}}function ze(o,t){if(o&1&&g(0,He,3,0,"button",14)(1,Ye,3,0,"button",14),o&2){let n=S();p(n.isStopping()?0:1)}}function Je(o,t){o&1&&(m(0,0,1),T(1,"sh-icon"),C())}function Xe(o,t){o&1&&(m(0,0,2),T(1,"sh-icon"),C())}function Ke(o,t){o&1&&T(0,"app-remote-connectivity-status",10)}function We(o,t){o&1&&T(0,"app-remote-connectivity-status",12)}function je(o,t){if(o&1){let n=D();a(0,"button",13),c("click",function(){E(n);let i=S();return O(i.isStopping()?i.abort():i.stop())}),a(1,"sh-icon"),F(2),l(),F(3),l()}if(o&2){let n=S();_(2),w(n.isStopping()?"skull":"stop"),_(),V(" ",n.isStopping()?"Abort":"Stop"," ")}}var q=class o{#e=d(x);#t=d(Ce);#n=d(Te);#s=d(me);#i=d(se);#a=d(pe);#l=d(Fe);clientIsRunning=this.#t.clientIsRunning;isResuming=this.#t.isResuming;runningTask=Y(()=>this.#s.serverState()?.ActiveTask?.Item1);isStopping=Y(()=>this.runningTask()==this.#o());#o=f(-1);isUsingRelay=this.#i.relayIsEnabled;hideConsoleConnectionStatus=this.#l.isConsoleConnectionStatusHidden;openThrottleSettingsDialog(){this.#n.open(L,{maxWidth:"550px",width:"100%"})}openPauseDialog(){this.#n.open(De,{maxWidth:"550px",width:"100%"})}pauseResume(){if(this.clientIsRunning()){this.openPauseDialog();return}this.#t.pauseResume().subscribe()}stop(){let t=this.runningTask();t&&(this.#o.set(t),this.#e.postApiV1TaskByTaskidStop({taskid:t}).subscribe())}abort(){let t=this.runningTask();t&&this.#e.postApiV1TaskByTaskidAbort({taskid:t}).subscribe()}ngAfterViewInit(){let t=this.#i.relayIsEnabled()||!this.#a.hasWebSocket()?"longpoll":"websocket";this.#t.setConnectionMethod(t)}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=N({type:o,selectors:[["app-status-bar"]],decls:31,vars:10,consts:()=>{let t;t=$localize`${"\uFFFD*9:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:pause${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Pause ${"\uFFFD/*9:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*10:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:play${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Resume ${"\uFFFD/*10:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,t=b(t);let n;n=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:skull${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Abort `;let e;return e=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:stop${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Stop `,[t,n,e,[1,"current-backup"],[1,"global-progress"],[1,"current-backup-actions"],[1,"desktop-actions"],["shButton","",3,"click"],[1,"mobile-actions"],["shButton","",1,"small","menu-mobile-toggle"],[1,"hide-text"],["menu",""],[1,"in-menu"],[3,"click"],["shButton",""]]},template:function(n,e){n&1&&(a(0,"div",3),T(1,"app-mobile-menu-toggle")(2,"app-backup-progress",4),a(3,"div",5)(4,"div",6),g(5,Ve,1,0,"app-remote-connectivity-status"),g(6,ze,2,1),a(7,"button",7),c("click",function(){return e.pauseResume()}),m(8,0),g(9,Je,2,0)(10,Xe,2,0),C(),l(),a(11,"button",7),c("click",function(){return e.openThrottleSettingsDialog()}),a(12,"sh-icon"),F(13,"speedometer"),l()()(),a(14,"div",8)(15,"sh-menu")(16,"button",9),g(17,Ke,1,0,"app-remote-connectivity-status",10),a(18,"sh-icon"),F(19,"dots-three-vertical-bold"),l()(),te(20,11),g(21,We,1,0,"app-remote-connectivity-status",12),g(22,je,4,2,"button"),a(23,"button",13),c("click",function(){return e.pauseResume()}),a(24,"sh-icon"),F(25),l(),F(26),l(),a(27,"button",13),c("click",function(){return e.openThrottleSettingsDialog()}),a(28,"sh-icon"),F(29,"speedometer"),l(),F(30," Throttle Settings "),l(),ne(),l()()()()),n&2&&(_(5),p(!e.isUsingRelay()&&!e.hideConsoleConnectionStatus()?5:-1),_(),p(e.runningTask()?6:-1),_(),G("loading",e.isResuming()),_(2),p(e.clientIsRunning()?9:10),_(8),p(!e.isUsingRelay()&&!e.hideConsoleConnectionStatus()?17:-1),_(4),p(!e.isUsingRelay()&&!e.hideConsoleConnectionStatus()?21:-1),_(),p(e.runningTask()?22:-1),_(3),w(e.clientIsRunning()?"pause":"play"),_(),V(" ",e.clientIsRunning()?"Pause":"Resume"," "))},dependencies:[k,P,A,Se,$,fe],styles:["[_nghost-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:1rem;min-height:3.875rem;border-bottom:1px solid var(--base-4);position:sticky;top:0;z-index:2000;background:var(--base-1)}[_nghost-%COMP%]:has(sh-progress-bar){padding:1rem 1rem 1.5rem}.current-backup[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%;gap:.5rem}.global-progress[_ngcontent-%COMP%]{flex:1 0;min-width:18.75rem}.current-backup-actions[_ngcontent-%COMP%], .current-backup-actions[_ngcontent-%COMP%] .desktop-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}@media only screen and (max-width:768px){.current-backup-actions[_ngcontent-%COMP%] .desktop-actions[_ngcontent-%COMP%]{display:none}}.current-backup-actions[_ngcontent-%COMP%] .mobile-actions[_ngcontent-%COMP%]{display:none}@media only screen and (max-width:768px){.current-backup-actions[_ngcontent-%COMP%] .mobile-actions[_ngcontent-%COMP%]{display:flex}}.current-backup-actions[_ngcontent-%COMP%] .menu-mobile-toggle[_ngcontent-%COMP%]{position:relative}.current-backup-actions[_ngcontent-%COMP%] .menu-mobile-toggle[_ngcontent-%COMP%] app-remote-connectivity-status[_ngcontent-%COMP%]{position:absolute;top:-.25rem;right:-.25rem}.menu-status-item[_ngcontent-%COMP%]{padding:.5rem 1rem;display:flex;flex-direction:column;gap:.25rem;border-bottom:1px solid var(--base-4);margin-bottom:.25rem}.menu-status-item[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem;font-size:.875rem}"],changeDetection:0})};export{q as a};
1
+ import{a as fe}from"./chunk-QDDVZ4CR.js";import{a as Oe}from"./chunk-BLSV7CNZ.js";import{a as De}from"./chunk-F2ZC26DC.js";import{b as Ce}from"./chunk-F3JYPWPK.js";import{a as Ee}from"./chunk-AXQQEOTT.js";import{a as Fe}from"./chunk-F3ETZKLK.js";import{b as me}from"./chunk-E4NQOMJX.js";import{a as pe}from"./chunk-YYD2JU6T.js";import{c as se}from"./chunk-6JS7B4FW.js";import{B as A,H as ue,K as Se,P as de,Y as ge,c as ae,e as le,i as re,k as _e,s as ce,v as P,z as Te}from"./chunk-VKQQDCUN.js";import{d as x}from"./chunk-DSYNIXJF.js";import{e as oe}from"./chunk-NPFPMA4P.js";import{$b as S,Ac as H,Cb as R,Db as a,Eb as l,F as Q,Fb as T,Jb as te,Kb as ne,Mb as D,Qc as Y,Sa as _,Tb as m,Ub as C,Vb as I,Vc as ie,Yb as b,Zb as c,_ as d,da as E,ea as O,gb as N,kc as G,nc as F,oc as w,pa as f,pc as V,ra as ee,sc as y,tc as v,uc as B,wb as g,xb as p}from"./chunk-TQTOIWBK.js";function Pe(o,t){o&1&&(a(0,"sh-icon",2),F(1,"x-bold"),l())}function Ae(o,t){o&1&&(a(0,"sh-icon",3),F(1,"list-bold"),l())}function he(o,t){if(o&1){let n=D();a(0,"button",1),c("click",function(){E(n);let i=S();return O(i.toggleNav())}),g(1,Pe,2,0,"sh-icon",2)(2,Ae,2,0,"sh-icon",3),l()}if(o&2){let n=S();_(),p(n.isNavOpen()?1:2)}}var $=class o{#e=d(Oe);isNavOpen=this.#e.isNavOpen;isMobile=this.#e.isMobile;toggleNav(){this.#e.toggleNav()}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=N({type:o,selectors:[["app-mobile-menu-toggle"]],decls:1,vars:1,consts:[["shButton","",1,"small","toggle-sidebar","ghost"],["shButton","",1,"small","toggle-sidebar","ghost",3,"click"],[1,"cross"],[1,"burger"]],template:function(n,e){n&1&&g(0,he,3,1,"button",0),n&2&&p(e.isMobile()?0:-1)},dependencies:[A,P],styles:["[_nghost-%COMP%]{display:contents}.toggle-sidebar[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:center}.toggle-sidebar[_ngcontent-%COMP%] .cross[_ngcontent-%COMP%], .toggle-sidebar[_ngcontent-%COMP%] .burger[_ngcontent-%COMP%]{opacity:1;transition:opacity 124ms linear;margin:0}.toggle-sidebar[_ngcontent-%COMP%] .cross.hidden[_ngcontent-%COMP%], .toggle-sidebar[_ngcontent-%COMP%] .burger.hidden[_ngcontent-%COMP%]{opacity:0}"],changeDetection:0})};var Ne=()=>["/connect/logon"];function be(o,t){o&1&&(m(0,0,1),T(1,"div",9),C())}function ye(o,t){o&1&&(m(0,0,2),T(1,"div",10),C())}function ve(o,t){if(o&1){let n=D();a(0,"div",8),c("click",function(){E(n);let i=S();return O(i.resetAndRetry())}),m(1,0),g(2,be,2,0)(3,ye,2,0),C(),l()}if(o&2){let n=S();_(2),p(n.resetting()?2:3)}}function Be(o,t){o&1&&(a(0,"div",6),m(1,1),T(2,"div",11),C(),l()),o&2&&R("routerLink",H(1,Ne))}function ke(o,t){o&1&&(a(0,"div",6),m(1,2),T(2,"div",10),C(),l()),o&2&&R("routerLink",H(1,Ne))}function Le(o,t){if(o&1){let n=D();a(0,"div",7),m(1,3),a(2,"sh-icon",12),c("click",function(){E(n);let i=S();return O(i.cancel())}),l(),a(3,"div",13),c("click",function(){E(n);let i=S();return O(i.claim())}),l(),T(4,"div",14),C(),l()}}function Ge(o,t){if(o&1){let n=D();a(0,"div",8),c("click",function(){E(n);let i=S();return O(i.openConsole())}),m(1,4),T(2,"div",15),C(),l()}}var k=class o{#e=d(Ee);state=this.#e.state;resetting=f(!1);stateEffect=ee(()=>{let t=this.#e.state(),n=this.resetting();t==="registered"&&n&&(this.resetting.set(!1),this.#e.beginRemoteRegistration())});ngOnInit(){this.#e.refreshRemoteControlStatus()}claim(){let t=this.#e.claimUrl();t&&window.open(t,"_blank")}cancel(){this.#e.cancelRemoteRegistration()}resetAndRetry(){this.resetting.set(!0),this.#e.cancelRemoteRegistration()}openConsole(){this.#e.openConsole()}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=N({type:o,selectors:[["app-remote-connectivity-status"]],decls:5,vars:1,consts:()=>{let t;t=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF: Resetting ${"\uFFFD#1:1\uFFFD"}:START_TAG_DIV:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_DIV:${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE: Click to connect ${"\uFFFD#1:2\uFFFD"}:START_TAG_DIV_1:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_DIV:${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,t=b(t);let n;n=$localize` Connecting ${"\uFFFD#2\uFFFD"}:START_TAG_DIV:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_DIV:`;let e;e=$localize` Click to register ${"\uFFFD#2\uFFFD"}:START_TAG_DIV:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_DIV:`;let i;i=$localize`Cancel registration`;let s;s=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:x-circle${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD#3\uFFFD"}:START_TAG_DIV:Click to claim${"[\uFFFD/#3\uFFFD|\uFFFD/#4\uFFFD]"}:CLOSE_TAG_DIV:${"\uFFFD#4\uFFFD"}:START_TAG_DIV_1:${"[\uFFFD/#3\uFFFD|\uFFFD/#4\uFFFD]"}:CLOSE_TAG_DIV:`,s=b(s);let u;return u=$localize` Connected ${"\uFFFD#2\uFFFD"}:START_TAG_DIV:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_DIV:`,[t,n,e,s,u,[1,"connectivity-status"],[1,"connectivity-status",3,"routerLink"],[1,"connectivity-status","claim"],[1,"connectivity-status",3,"click"],[1,"status","blinking"],[1,"status"],[1,"status","warning","blinking"],["shTooltip",i,3,"click"],[1,"claim",3,"click"],[1,"status","success","blinking"],[1,"status","success"]]},template:function(n,e){if(n&1&&g(0,ve,4,1,"div",5)(1,Be,3,2,"div",6)(2,ke,3,2,"div",6)(3,Le,5,0,"div",7)(4,Ge,3,0,"div",5),n&2){let i=e.state()==="unknown"||e.state()==="inactive"||e.state()==="registeringfaulted",s=e.state()==="registeringfaulted",u=e.state()==="registering",r=e.state()==="registered",M=e.state()==="connected"||e.state()==="disabled"||e.state()==="connecting";p(s?0:u?1:i?2:r?3:M?4:-1)}},dependencies:[oe,P,ge],styles:["[_nghost-%COMP%]{display:flex;align-items:center;padding:0 .75rem}@media only screen and (max-width:768px){[_nghost-%COMP%]{padding:0}}.hide-text[_nghost-%COMP%]{font-size:0}.in-menu[_nghost-%COMP%]{padding:.75rem;border-bottom:1px solid var(--base-4)}.connectivity-status[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;cursor:pointer}.connectivity-status[_ngcontent-%COMP%]:hover{color:var(--primary-8)}.connectivity-status.claim[_ngcontent-%COMP%]{display:flex;gap:.5rem;cursor:pointer}.connectivity-status.claim[_ngcontent-%COMP%]:hover{color:inherit}.connectivity-status.claim[_ngcontent-%COMP%] .claim[_ngcontent-%COMP%]:hover{color:var(--primary-8)}.connectivity-status.claim[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]:hover{color:var(--error-8)}.status[_ngcontent-%COMP%]{width:.625rem;height:.625rem;border-radius:50%;background-color:var(--base-4)}.status.success[_ngcontent-%COMP%]{background-color:var(--success-8)}.status.warning[_ngcontent-%COMP%]{background-color:var(--warn-8)}.status.blinking[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_blinking 1s infinite}@keyframes _ngcontent-%COMP%_blinking{0%{opacity:.2}50%{opacity:1}to{opacity:.2}}"],changeDetection:0})};var Me={Byte:"B",KByte:"KB",MByte:"MB",GByte:"GB",TByte:"TB",PByte:"PB"},xe=["mbps","gbps"],Ie=8,W=1024,U=W*1024,j=U*1024,Z=j*1024,Re=Z*1024,$e={B:1,KB:W,MB:U,GB:j,TB:Z,PB:Re},Ue=1e3,K=Ue*1e3,X=K*1e3,we=[{threshold:Re,unitPrefix:"PByte"},{threshold:Z,unitPrefix:"TByte"},{threshold:j,unitPrefix:"GByte"},{threshold:U,unitPrefix:"MByte"},{threshold:W,unitPrefix:"KByte"},{threshold:1,unitPrefix:"Byte"}],L=class o{#e=d(x);closed=ie();isSubmitting=f(!1);sizeOptions=f([...xe]);maxUpload=f(0);maxDownload=f(0);maxUploadUnit=f("mbps");maxDownloadUnit=f("mbps");ngOnInit(){this.init()}convertToBitsPerSecondUnits(t,n){let i=t*($e[n.toUpperCase()]||U)*Ie;return i===0?{value:0,unit:"mbps"}:i>=X?{value:parseFloat((i/X).toFixed(2)),unit:"gbps"}:{value:parseFloat((i/K).toFixed(2)),unit:"mbps"}}convertFromBitsPerSecondUnits(t,n){let e=0;switch(n){case"gbps":e=t*X;break;case"mbps":e=t*K;break}let i=e/Ie;if(i===0)return{valueForApi:0,unitPrefixForApi:"Byte"};for(let{threshold:s,unitPrefix:u}of we)if(i>=s)return{valueForApi:Math.round(i/s),unitPrefixForApi:u};return{valueForApi:Math.round(i),unitPrefixForApi:"Byte"}}init(){this.#e.getApiV1Serversettings().subscribe({next:t=>{let n=t?.["max-upload-speed"],e=t?.["max-download-speed"];if(n&&n!==""){let i=n.match(/^(\d+(?:\.\d+)?)([A-Za-z]+)$/);if(i){let s=parseFloat(i[1]),u=i[2],r=this.convertToBitsPerSecondUnits(s,u);this.maxUpload.set(r.value),this.maxUploadUnit.set(r.unit)}else console.warn("Unexpected max-upload-speed format from API:",n),this.resetUpload()}else this.resetUpload();if(e&&e!==""){let i=e.match(/^(\d+(?:\.\d+)?)([A-Za-z]+)$/);if(i){let s=parseFloat(i[1]),u=i[2],r=this.convertToBitsPerSecondUnits(s,u);this.maxDownload.set(r.value),this.maxDownloadUnit.set(r.unit)}else console.warn("Unexpected max-download-speed format from API:",e),this.resetDownload()}else this.resetDownload()},error:t=>{console.error("Failed to get server settings:",t),this.resetDownload(),this.resetUpload()}})}resetDownload(){this.maxDownload.set(0),this.maxDownloadUnit.set("mbps")}resetUpload(){this.maxUpload.set(0),this.maxUploadUnit.set("mbps")}blockDecimalKeys(t){if([".",","].includes(t.key))return t.preventDefault()}cleanupInputAfterPasting(t){t.preventDefault();let n=t.clipboardData?.getData("text/plain");if(!n)return;let e=n.replaceAll(/[\.,]/g,"");t.target.value=e}submit(){this.isSubmitting.set(!0);let t="",n="",e=this.maxUpload()??0,i=this.maxUploadUnit(),s=this.maxDownload()??0,u=this.maxDownloadUnit();if(e>0){let{valueForApi:r,unitPrefixForApi:M}=this.convertFromBitsPerSecondUnits(e,i),h=Me[M];h?t=`${r}${h}`:console.error(`Invalid unit prefix for API submission (upload): ${M}. Defaulting to empty string.`)}if(s){let{valueForApi:r,unitPrefixForApi:M}=this.convertFromBitsPerSecondUnits(s,u),h=Me[M];h?n=`${r}${h}`:console.error(`Invalid unit prefix for API submission (download): ${M}. Defaulting to empty string.`)}this.#e.patchApiV1Serversettings({requestBody:{"max-upload-speed":t,"max-download-speed":n}}).pipe(Q(()=>this.isSubmitting.set(!1))).subscribe({next:()=>{this.closed.emit(!0)},error:r=>{console.error("Failed to submit throttle settings:",r)}})}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=N({type:o,selectors:[["app-throttle-settings-dialog"]],outputs:{closed:"closed"},decls:26,vars:10,consts:()=>{let t;t=$localize`Throttle network speed`;let n;n=$localize`We will round bits to the nearest byte value.`;let e;e=$localize`Max upload speed`;let i;i=$localize`Max download speed`;let s;s=$localize`Cancel`;let u;return u=$localize` Update settings `,[t,n,e,i,s,u,["content",""],[1,"column"],[1,"field-row"],["type","number",3,"paste","keydown","ngModelChange","ngModel"],[3,"isClearable","options"],["type","text",3,"ngModelChange","ngModel"],["footer",""],["shButton","",3,"click"],["shButton","",1,"raised","primary",3,"click"]]},template:function(n,e){n&1&&(a(0,"header")(1,"h3"),I(2,0),l(),a(3,"p"),I(4,1),l()(),a(5,"div",6)(6,"div",7)(7,"div",8)(8,"label"),I(9,2),l(),a(10,"sh-form-field")(11,"input",9),c("paste",function(s){return e.cleanupInputAfterPasting(s)})("keydown",function(s){return e.blockDecimalKeys(s)}),B("ngModelChange",function(s){return v(e.maxUpload,s)||(e.maxUpload=s),s}),l()(),a(12,"sh-select",10)(13,"input",11),B("ngModelChange",function(s){return v(e.maxUploadUnit,s)||(e.maxUploadUnit=s),s}),l()()(),a(14,"div",8)(15,"label"),I(16,3),l(),a(17,"sh-form-field")(18,"input",9),c("paste",function(s){return e.cleanupInputAfterPasting(s)})("keydown",function(s){return e.blockDecimalKeys(s)}),B("ngModelChange",function(s){return v(e.maxDownload,s)||(e.maxDownload=s),s}),l()(),a(19,"sh-select",10)(20,"input",11),B("ngModelChange",function(s){return v(e.maxDownloadUnit,s)||(e.maxDownloadUnit=s),s}),l()()()()(),a(21,"footer",12)(22,"button",13),c("click",function(){return e.closed.emit(!1)}),I(23,4),l(),a(24,"button",14),c("click",function(){return e.submit()}),I(25,5),l()()),n&2&&(_(11),y("ngModel",e.maxUpload),_(),R("isClearable",!1)("options",e.sizeOptions()),_(),y("ngModel",e.maxUploadUnit),_(5),y("ngModel",e.maxDownload),_(),R("isClearable",!1)("options",e.sizeOptions()),_(),y("ngModel",e.maxDownloadUnit),_(4),G("loading",e.isSubmitting()))},dependencies:[ce,ae,_e,le,re,ue,de,A],styles:['[_nghost-%COMP%]{display:block}h3[_ngcontent-%COMP%]{font:var(--title-30)}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;padding:1rem;gap:.5rem;margin-bottom:1rem}.column[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.field-row[_ngcontent-%COMP%]{display:grid;grid-template-areas:"label label" "input select";grid-template-columns:1fr auto;align-items:center;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{grid-area:label}.field-row[_ngcontent-%COMP%] sh-form-field[_ngcontent-%COMP%]{grid-area:input}.field-row[_ngcontent-%COMP%] sh-select[_ngcontent-%COMP%]{grid-area:select}'],changeDetection:0})};function Ve(o,t){o&1&&T(0,"app-remote-connectivity-status")}function He(o,t){if(o&1){let n=D();a(0,"button",7),c("click",function(){E(n);let i=S(2);return O(i.abort())}),m(1,1),T(2,"sh-icon"),C(),l()}}function Ye(o,t){if(o&1){let n=D();a(0,"button",7),c("click",function(){E(n);let i=S(2);return O(i.stop())}),m(1,2),T(2,"sh-icon"),C(),l()}}function ze(o,t){if(o&1&&g(0,He,3,0,"button",14)(1,Ye,3,0,"button",14),o&2){let n=S();p(n.isStopping()?0:1)}}function Je(o,t){o&1&&(m(0,0,1),T(1,"sh-icon"),C())}function Xe(o,t){o&1&&(m(0,0,2),T(1,"sh-icon"),C())}function Ke(o,t){o&1&&T(0,"app-remote-connectivity-status",10)}function We(o,t){o&1&&T(0,"app-remote-connectivity-status",12)}function je(o,t){if(o&1){let n=D();a(0,"button",13),c("click",function(){E(n);let i=S();return O(i.isStopping()?i.abort():i.stop())}),a(1,"sh-icon"),F(2),l(),F(3),l()}if(o&2){let n=S();_(2),w(n.isStopping()?"skull":"stop"),_(),V(" ",n.isStopping()?"Abort":"Stop"," ")}}var q=class o{#e=d(x);#t=d(Ce);#n=d(Te);#s=d(me);#i=d(se);#a=d(pe);#l=d(Fe);clientIsRunning=this.#t.clientIsRunning;isResuming=this.#t.isResuming;runningTask=Y(()=>this.#s.serverState()?.ActiveTask?.Item1);isStopping=Y(()=>this.runningTask()==this.#o());#o=f(-1);isUsingRelay=this.#i.relayIsEnabled;hideConsoleConnectionStatus=this.#l.isConsoleConnectionStatusHidden;openThrottleSettingsDialog(){this.#n.open(L,{maxWidth:"550px",width:"100%"})}openPauseDialog(){this.#n.open(fe,{maxWidth:"550px",width:"100%"})}pauseResume(){if(this.clientIsRunning()){this.openPauseDialog();return}this.#t.pauseResume().subscribe()}stop(){let t=this.runningTask();t&&(this.#o.set(t),this.#e.postApiV1TaskByTaskidStop({taskid:t}).subscribe())}abort(){let t=this.runningTask();t&&this.#e.postApiV1TaskByTaskidAbort({taskid:t}).subscribe()}ngAfterViewInit(){let t=this.#i.relayIsEnabled()||!this.#a.hasWebSocket()?"longpoll":"websocket";this.#t.setConnectionMethod(t)}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=N({type:o,selectors:[["app-status-bar"]],decls:31,vars:10,consts:()=>{let t;t=$localize`${"\uFFFD*9:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:pause${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Pause ${"\uFFFD/*9:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*10:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:play${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Resume ${"\uFFFD/*10:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,t=b(t);let n;n=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:skull${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Abort `;let e;return e=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:stop${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Stop `,[t,n,e,[1,"current-backup"],[1,"global-progress"],[1,"current-backup-actions"],[1,"desktop-actions"],["shButton","",3,"click"],[1,"mobile-actions"],["shButton","",1,"small","menu-mobile-toggle"],[1,"hide-text"],["menu",""],[1,"in-menu"],[3,"click"],["shButton",""]]},template:function(n,e){n&1&&(a(0,"div",3),T(1,"app-mobile-menu-toggle")(2,"app-backup-progress",4),a(3,"div",5)(4,"div",6),g(5,Ve,1,0,"app-remote-connectivity-status"),g(6,ze,2,1),a(7,"button",7),c("click",function(){return e.pauseResume()}),m(8,0),g(9,Je,2,0)(10,Xe,2,0),C(),l(),a(11,"button",7),c("click",function(){return e.openThrottleSettingsDialog()}),a(12,"sh-icon"),F(13,"speedometer"),l()()(),a(14,"div",8)(15,"sh-menu")(16,"button",9),g(17,Ke,1,0,"app-remote-connectivity-status",10),a(18,"sh-icon"),F(19,"dots-three-vertical-bold"),l()(),te(20,11),g(21,We,1,0,"app-remote-connectivity-status",12),g(22,je,4,2,"button"),a(23,"button",13),c("click",function(){return e.pauseResume()}),a(24,"sh-icon"),F(25),l(),F(26),l(),a(27,"button",13),c("click",function(){return e.openThrottleSettingsDialog()}),a(28,"sh-icon"),F(29,"speedometer"),l(),F(30," Throttle Settings "),l(),ne(),l()()()()),n&2&&(_(5),p(!e.isUsingRelay()&&!e.hideConsoleConnectionStatus()?5:-1),_(),p(e.runningTask()?6:-1),_(),G("loading",e.isResuming()),_(2),p(e.clientIsRunning()?9:10),_(8),p(!e.isUsingRelay()&&!e.hideConsoleConnectionStatus()?17:-1),_(4),p(!e.isUsingRelay()&&!e.hideConsoleConnectionStatus()?21:-1),_(),p(e.runningTask()?22:-1),_(3),w(e.clientIsRunning()?"pause":"play"),_(),V(" ",e.clientIsRunning()?"Pause":"Resume"," "))},dependencies:[k,P,A,Se,$,De],styles:["[_nghost-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:1rem;min-height:3.875rem;border-bottom:1px solid var(--base-4);position:sticky;top:0;z-index:2000;background:var(--base-1)}[_nghost-%COMP%]:has(sh-progress-bar){padding:1rem 1rem 1.5rem}.current-backup[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%;gap:.5rem}.global-progress[_ngcontent-%COMP%]{flex:1 0;min-width:18.75rem}.current-backup-actions[_ngcontent-%COMP%], .current-backup-actions[_ngcontent-%COMP%] .desktop-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}@media only screen and (max-width:768px){.current-backup-actions[_ngcontent-%COMP%] .desktop-actions[_ngcontent-%COMP%]{display:none}}.current-backup-actions[_ngcontent-%COMP%] .mobile-actions[_ngcontent-%COMP%]{display:none}@media only screen and (max-width:768px){.current-backup-actions[_ngcontent-%COMP%] .mobile-actions[_ngcontent-%COMP%]{display:flex}}.current-backup-actions[_ngcontent-%COMP%] .menu-mobile-toggle[_ngcontent-%COMP%]{position:relative}.current-backup-actions[_ngcontent-%COMP%] .menu-mobile-toggle[_ngcontent-%COMP%] app-remote-connectivity-status[_ngcontent-%COMP%]{position:absolute;top:-.25rem;right:-.25rem}.menu-status-item[_ngcontent-%COMP%]{padding:.5rem 1rem;display:flex;flex-direction:column;gap:.25rem;border-bottom:1px solid var(--base-4);margin-bottom:.25rem}.menu-status-item[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem;font-size:.875rem}"],changeDetection:0})};export{q as a};
@@ -0,0 +1 @@
1
+ import{g as a,h as b,i as c,j as d}from"./chunk-43WATFQS.js";import"./chunk-CAQ3XMFP.js";import"./chunk-UZ4POLDC.js";import"./chunk-O56QUSSI.js";import"./chunk-6Q6SSTBK.js";import"./chunk-YCJYEQF7.js";import"./chunk-AXQQEOTT.js";import"./chunk-UTXZPAY6.js";import"./chunk-IMQUTGIK.js";import"./chunk-F3ETZKLK.js";import"./chunk-IQL3REGJ.js";import"./chunk-E4NQOMJX.js";import"./chunk-YYD2JU6T.js";import"./chunk-6JS7B4FW.js";import"./chunk-VKQQDCUN.js";import"./chunk-DSYNIXJF.js";import"./chunk-NPFPMA4P.js";import"./chunk-O2SMJYPC.js";import"./chunk-N2AU7VKX.js";import"./chunk-ZC23RK4J.js";import"./chunk-OPHQNXYO.js";import"./chunk-TQTOIWBK.js";import"./chunk-7CGTOI24.js";export{a as SCHEDULE_DEFAULT_OPTIONS,c as SCHEDULE_FIELD_DEFAULTS,d as default,b as scheduleOptionToSchedule};
@@ -1,2 +1,2 @@
1
- import{a as ge,c as fe,d as xe}from"./chunk-VC55KFAX.js";import{h as Ce}from"./chunk-ZEFSBETQ.js";import{a as ue}from"./chunk-C6PICAXB.js";import{B as le,H as _e,K as pe,P as se,V as me,W as ce,Y as de,b as ee,c as te,e as ne,i as ie,k as oe,s as ae,v as re}from"./chunk-VKQQDCUN.js";import{aa as Z}from"./chunk-ZC23RK4J.js";import{$b as r,Ab as A,Ac as W,Bb as D,Bc as T,Cb as s,Db as _,Eb as p,Fb as b,Jb as R,Jc as E,Kb as M,Lb as f,Mb as x,Qc as H,Sa as l,Tb as k,Ub as G,Vb as Q,Wc as J,Zb as C,_ as j,_c as Y,da as d,ea as u,gb as q,ic as g,kc as B,lb as S,nc as c,oc as z,pa as P,pc as U,vc as K,wb as F,wc as N,xb as h,xc as O,yb as $}from"./chunk-TQTOIWBK.js";import{a as L,b as v}from"./chunk-7CGTOI24.js";var Te=[{name:"send-mail-to",type:"Email"},{name:"send-mail-from",type:"Email"},{name:"log-file",type:"FileTree"},{name:"compression-extension-file",type:"FileTree"},{name:"dbpath",type:"FileTree"},{name:"restore-path",type:"FileTree"},{name:"gpg-program-path",type:"FileTree"}];var Fe=()=>({updateOn:"blur"}),y=t=>({formView:t}),w=t=>({$implicit:t});function he(t,i){if(t&1){let e=x();_(0,"button",14),C("click",function(){d(e);let n=r();return u(n.showTextArea.set(!1))}),k(1,6),b(2,"sh-icon"),G(),p()}}function ye(t,i){if(t&1){let e=x();_(0,"button",18,1),C("click",function(){let n=d(e).$implicit,a=r(3);return u(a.addSetting(n))}),_(2,"div",19),c(3),_(4,"p"),c(5),p()()()}if(t&2){let e=i.$implicit;B("deprecated",e.deprecatedDescription),l(3),U(" ",e.shortDescription," "),l(2),z(e.name)}}function we(t,i){if(t&1&&(_(0,"h3",10),c(1),p(),A(2,ye,6,4,"button",17,$)),t&2){let e=i.$implicit;l(),z(e.displayName),l(),D(e.options)}}function Ve(t,i){if(t&1){let e=x();_(0,"sh-menu")(1,"button",20)(2,"sh-icon"),c(3,"dots-three-vertical"),p()(),R(4,16),_(5,"button",14),C("click",function(){d(e);let n=r(2);return u(n.addFreeTextSetting())}),k(6,8),b(7,"sh-icon"),G(),p(),_(8,"button",21),C("click",function(){d(e);let n=r(2);return u(n.showTextArea.set(!0))}),_(9,"sh-icon"),c(10,"link"),p(),c(11," Edit contents as text "),p(),M(),p()}}function Le(t,i){if(t&1&&(_(0,"sh-menu",15)(1,"button",12),k(2,7),b(3,"sh-icon"),G(),p(),R(4,16),A(5,we,4,1,null,null,$),M(),p(),F(7,Ve,12,0,"sh-menu")),t&2){let e=r();s("searchable",!0),l(5),D(e.nonSelectedOptionsGrouped()),l(2),h(e.hasFreeTextSettings()?7:-1)}}function Ie(t,i){if(t&1){let e=x();_(0,"textarea",22),C("ngModelChange",function(n){d(e);let a=r();return u(a.updateSettingsFromText(n))}),p()}if(t&2){let e=r();s("ngModel",e.settingsAsText())("ngModelOptions",W(2,Fe))}}function be(t,i){t&1&&(_(0,"div",23),c(1,"Add a setting above to get started."),p())}function Me(t,i){t&1&&(_(0,"sh-icon",31),c(1," warning-octagon "),p())}function Ne(t,i){if(t&1&&(_(0,"sh-icon",32),c(1,"archive"),p()),t&2){let e=r(2).$implicit;s("shTooltip",e.FormView.deprecatedDescription)}}function Ee(t,i){if(t&1&&(_(0,"sh-icon",33),c(1,"question"),p()),t&2){let e=r(2).$implicit;s("shTooltip",e.FormView.longDescription)}}function ve(t,i){if(t&1&&(F(0,Me,2,0,"sh-icon",31),_(1,"span"),c(2),p(),F(3,Ne,2,1,"sh-icon",32)(4,Ee,2,1,"sh-icon",33)),t&2){let e=r().$implicit,o=O(1);h(o?0:-1),l(),B("deprecated",e.FormView.deprecatedDescription),l(),z(e.FormView.shortDescription),l(),h(e.FormView.deprecatedDescription?3:e.FormView.longDescription?4:-1)}}function Pe(t,i){t&1&&f(0)}function $e(t,i){if(t&1){let e=x();_(0,"div",25)(1,"label"),S(2,Pe,1,0,"ng-container",34),p(),_(3,"div")(4,"sh-form-field")(5,"input",35),C("ngModelChange",function(n){d(e);let a=r().$implicit,m=r(2);return u(m.updateFreeTextSettingName(a,n))}),p(),_(6,"sh-icon",36),c(7,"rectangle-dashed"),p()()(),_(8,"div")(9,"sh-form-field")(10,"input",35),C("ngModelChange",function(n){d(e);let a=r().$implicit,m=r(2);return u(m.updateSettingValue(a,n))}),p(),_(11,"sh-icon",36),c(12,"textbox"),p()()()()}if(t&2){let e=r().$implicit,o=g(3);l(2),s("ngTemplateOutlet",o),l(3),s("ngModel",e.Name),l(5),s("ngModel",e.Value())}}function Ae(t,i){t&1&&f(0)}function De(t,i){if(t&1){let e=x();_(0,"app-file-tree",26)(1,"label",37),S(2,Ae,1,0,"ng-container",34),p(),_(3,"input",38),C("ngModelChange",function(n){d(e);let a=r().$implicit,m=r(2);return u(m.updateSettingValue(a,n))}),p()()}if(t&2){let e=r().$implicit,o=g(3),n=O(0);s("startingPath",e.Value())("accepts",e.FormView.accepts)("showFiles",!0)("showHiddenNodes",!0)("selectFiles",!0),l(),s("for",n),l(),s("ngTemplateOutlet",o),l(),s("id",n)("ngModel",e.Value())}}function Re(t,i){if(t&1){let e=x();_(0,"app-file-tree",27),b(1,"label",37),_(2,"input",38),C("ngModelChange",function(n){d(e);let a=r().$implicit,m=r(2);return u(m.updateSettingValue(a,n))}),p()()}if(t&2){let e=r().$implicit,o=O(0);s("startingPath",e.Value()),l(),s("for",o),l(),s("id",o)("ngModel",e.Value())}}function ke(t,i){t&1&&f(0)}function Ge(t,i){t&1&&f(0)}function Be(t,i){t&1&&(_(0,"sh-icon",36),c(1,"link"),p())}function ze(t,i){t&1&&(_(0,"sh-icon",36),c(1,"hard-drives"),p())}function Ue(t,i){t&1&&(_(0,"sh-icon",36),c(1,"jar"),p())}function Ke(t,i){t&1&&(_(0,"sh-icon",36),c(1,"envelope"),p())}function He(t,i){t&1&&(_(0,"sh-icon",36),c(1,"textbox"),p())}function Je(t,i){if(t&1){let e=x();_(0,"sh-form-field")(1,"label",37),S(2,ke,1,0,"ng-container",34)(3,Ge,1,0,"ng-container",39),p(),_(4,"input",40),C("ngModelChange",function(n){d(e);let a=r().$implicit,m=r(2);return u(m.updateSettingValue(a,n))}),p(),F(5,Be,2,0,"sh-icon",36)(6,ze,2,0,"sh-icon",36)(7,Ue,2,0,"sh-icon",36)(8,Ke,2,0,"sh-icon",36)(9,He,2,0,"sh-icon",36),p()}if(t&2){let e=r().$implicit,o=g(3),n=O(0);r(2);let a=g(10);l(),s("for",n),l(),s("ngTemplateOutlet",o),l(),s("ngTemplateOutlet",a)("ngTemplateOutletContext",T(10,w,T(8,y,e.FormView))),l(),s("type",e.FormView.type==="Email"?"email":"text")("id",n)("ngModel",e.Value()),l(),h(e.FormView.type==="Path"?5:e.FormView.type==="Hostname"?6:e.FormView.type==="Bucketname"?7:e.FormView.type==="Email"?8:9)}}function Xe(t,i){t&1&&f(0)}function je(t,i){t&1&&f(0)}function qe(t,i){if(t&1){let e=x();_(0,"sh-icon",43),C("click",function(){d(e);let n=r(2).$implicit;return u(n.showPassword=!n.showPassword)}),c(1," eye "),p()}}function Qe(t,i){if(t&1){let e=x();_(0,"sh-icon",43),C("click",function(){d(e);let n=r(2).$implicit;return u(n.showPassword=!n.showPassword)}),c(1," eye-slash "),p()}}function We(t,i){if(t&1){let e=x();_(0,"sh-form-field")(1,"label",37),S(2,Xe,1,0,"ng-container",34)(3,je,1,0,"ng-container",39),p(),_(4,"input",41),C("ngModelChange",function(n){d(e);let a=r().$implicit,m=r(2);return u(m.updateSettingValue(a,n))}),p(),_(5,"sh-icon",36),c(6,"password"),p(),F(7,qe,2,0,"sh-icon",42)(8,Qe,2,0,"sh-icon",42),p()}if(t&2){let e=r().$implicit,o=g(3),n=O(0);r(2);let a=g(10);l(),s("for",n),l(),s("ngTemplateOutlet",o),l(),s("ngTemplateOutlet",a)("ngTemplateOutletContext",T(10,w,T(8,y,e.FormView))),l(),s("type",e.showPassword?"text":"password")("id",n)("ngModel",e.Value()),l(3),h(e.showPassword?7:8)}}function Ye(t,i){t&1&&f(0)}function Ze(t,i){t&1&&f(0)}function et(t,i){if(t&1&&c(0),t&2){let e=i.$implicit;U(" ",e," ")}}function tt(t,i){if(t&1){let e=x();_(0,"sh-select",44)(1,"label",37),S(2,Ye,1,0,"ng-container",34)(3,Ze,1,0,"ng-container",39),p(),_(4,"input",38),C("ngModelChange",function(n){d(e);let a=r().$implicit,m=r(2);return u(m.updateSettingValue(a,n))}),p()(),S(5,et,1,1,"ng-template",null,3,E)}if(t&2){let e=g(6),o=r().$implicit,n=g(3),a=O(0);r(2);let m=g(10);s("options",o.FormView.options)("isClearable",!1)("optionTemplate",e),l(),s("for",a),l(),s("ngTemplateOutlet",n),l(),s("ngTemplateOutlet",m)("ngTemplateOutletContext",T(11,w,T(9,y,o.FormView))),l(),s("id",a)("ngModel",o.Value())}}function nt(t,i){t&1&&f(0)}function it(t,i){t&1&&f(0)}function ot(t,i){if(t&1){let e=x();_(0,"app-size",45),C("ngModelChange",function(n){d(e);let a=r().$implicit,m=r(2);return u(m.updateSettingValue(a,n))}),_(1,"label",37),S(2,nt,1,0,"ng-container",34)(3,it,1,0,"ng-container",39),p()()}if(t&2){let e=r().$implicit,o=g(3),n=O(0);r(2);let a=g(10);s("inputType",e.Name)("ngModel",e.Value())("customId",n),l(),s("for",n),l(),s("ngTemplateOutlet",o),l(),s("ngTemplateOutlet",a)("ngTemplateOutletContext",T(9,w,T(7,y,e.FormView)))}}function at(t,i){t&1&&f(0)}function rt(t,i){t&1&&f(0)}function lt(t,i){if(t&1){let e=x();_(0,"sh-form-field")(1,"label",37),S(2,at,1,0,"ng-container",34)(3,rt,1,0,"ng-container",39),p(),_(4,"input",46),C("ngModelChange",function(n){d(e);let a=r().$implicit,m=r(2);return u(m.updateSettingValue(a,n))}),p(),_(5,"sh-icon",36),c(6,"numpad"),p()()}if(t&2){let e=r().$implicit,o=g(3),n=O(0);r(2);let a=g(10);l(),s("for",n),l(),s("ngTemplateOutlet",o),l(),s("ngTemplateOutlet",a)("ngTemplateOutletContext",T(8,w,T(6,y,e.FormView))),l(),s("id",n)("ngModel",e.Value())}}function _t(t,i){t&1&&f(0)}function pt(t,i){t&1&&f(0)}function st(t,i){if(t&1){let e=x();_(0,"sh-toggle",29)(1,"label",37),S(2,_t,1,0,"ng-container",34)(3,pt,1,0,"ng-container",39),p(),_(4,"input",47),C("ngModelChange",function(n){d(e);let a=r().$implicit,m=r(2);return u(m.updateSettingValue(a,n))}),p()()}if(t&2){let e=r().$implicit,o=g(3),n=O(0);r(2);let a=g(10);l(),s("for",n),l(),s("ngTemplateOutlet",o),l(),s("ngTemplateOutlet",a)("ngTemplateOutletContext",T(8,w,T(6,y,e.FormView))),l(),s("id",n)("ngModel",e.Value())}}function mt(t,i){t&1&&f(0)}function ct(t,i){t&1&&f(0)}function dt(t,i){if(t&1&&c(0),t&2){let e=i.$implicit;U(" ",e," ")}}function ut(t,i){if(t&1){let e=x();_(0,"sh-select",48)(1,"label",37),S(2,mt,1,0,"ng-container",34)(3,ct,1,0,"ng-container",39),p(),_(4,"input",49),C("ngModelChange",function(n){d(e);let a=r().$implicit,m=r(2);return u(m.updateSettingValue(a,n))}),p()(),S(5,dt,1,1,"ng-template",null,4,E)}if(t&2){let e=g(6),o=r().$implicit,n=g(3),a=O(0);r(2);let m=g(10);s("options",o.FormView.options)("selectMultiple",!0)("optionTemplate",e),l(),s("for",a),l(),s("ngTemplateOutlet",n),l(),s("ngTemplateOutlet",m)("ngTemplateOutletContext",T(10,w,T(8,y,o.FormView))),l(),s("ngModel",o.Value())}}function Ct(t,i){t&1&&f(0)}function gt(t,i){t&1&&f(0)}function ft(t,i){if(t&1){let e=x();_(0,"app-timespan",45),C("ngModelChange",function(n){d(e);let a=r().$implicit,m=r(2);return u(m.updateSettingValue(a,n))}),_(1,"label",37),S(2,Ct,1,0,"ng-container",34)(3,gt,1,0,"ng-container",39),p()()}if(t&2){let e=r().$implicit,o=g(3),n=O(0);r(2);let a=g(10);s("inputType",e.Name)("ngModel",e.Value())("customId",n),l(),s("for",n),l(),s("ngTemplateOutlet",o),l(),s("ngTemplateOutlet",a)("ngTemplateOutletContext",T(9,w,T(7,y,e.FormView)))}}function xt(t,i){if(t&1){let e=x();K(0)(1),S(2,ve,5,5,"ng-template",null,2,E),_(4,"div",24),F(5,$e,13,3,"div",25)(6,De,4,9,"app-file-tree",26)(7,Re,3,4,"app-file-tree",27)(8,Je,10,12,"sh-form-field")(9,We,9,12,"sh-form-field")(10,tt,7,13)(11,ot,4,11,"app-size",28)(12,lt,7,10,"sh-form-field")(13,st,5,10,"sh-toggle",29)(14,ut,7,12)(15,ft,4,11,"app-timespan",28),_(16,"button",30),C("click",function(){let n=d(e).$implicit,a=r(2);return u(a.removeSetting(n))}),_(17,"sh-icon"),c(18,"x-bold"),p()()()}if(t&2){let e=i.$implicit,o=i.$index,n=r(2);N("destination-"+e.Name+o),l(),N(n.inAppOptions(e.Name)),l(3),B("align-remove-start",e.FormView.type==="FolderTree"||e.FormView.type==="FileTree"||e.FormView.type==="Boolean"),l(),h(e.FormView.type==="FreeText"?5:e.FormView.type==="FileTree"?6:e.FormView.type==="FolderTree"?7:e.FormView.type==="String"||e.FormView.type==="Path"||e.FormView.type==="Decimal"||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==="Size"?11:e.FormView.type==="Integer"?12:e.FormView.type==="Boolean"?13:e.FormView.type==="Flags"?14:e.FormView.type==="Timespan"||e.FormView.type==="DateTime"?15:-1)}}function Tt(t,i){if(t&1&&(F(0,be,2,0,"div",23),A(1,xt,19,5,null,null,$)),t&2){let e=r();h(e.selectedSettings().length===0?0:-1),l(),D(e.selectedSettings())}}function St(t,i){if(t&1&&(_(0,"sh-icon",50),c(1,"x-circle"),p()),t&2){r();let e=O(0);s("shTooltip",(e==null?null:e.message)??"Invalid value")}}function Ot(t,i){if(t&1&&(_(0,"sh-icon",32),c(1,"warning"),p()),t&2){r();let e=O(0);s("shTooltip",(e==null?null:e.message)??"Invalid value")}}function Ft(t,i){if(t&1&&(K(0),F(1,St,2,1,"sh-icon",50)(2,Ot,2,1,"sh-icon",32)),t&2){r();let e=O(0),o=r().$implicit,n=N(o.formView.validate(e));l(),h((n==null?null:n.type)==="error"?1:(n==null?null:n.type)==="warning"?2:-1)}}function ht(t,i){if(t&1&&(K(0),F(1,Ft,3,2)),t&2){let e=r().$implicit,n=(N(e.Value())??"").toString().trim()==="";l(),h(!n&&e.formView.validate?1:-1)}}function yt(t,i){if(t&1&&F(0,ht,2,2),t&2){let e=i.$implicit;h(e.Value?0:-1)}}var Se=class t{#e=j(ue);options=Y.required();hiddenOptions=J([]);hasFreeTextSettings=J(!1);applicationOptions=J();showTextArea=P(!1);allOptionsGrouped=this.#e.allOptionsGrouped;allOptions=this.#e.allOptions;selectedSettings=H(()=>{let i=this.hiddenOptions();return this.options().map(n=>{let a=this.allOptions().find(V=>V.name===n.Name?.replace("--","")),m=n.Value??"";if(a&&i.includes(a.name))return null;if(a){if(a.type==="Boolean"&&(m=this.isTrue(m)),a.type==="Integer"&&(m=parseInt(m)||0),a.type==="Enumeration"&&a.options){let I=m?.trim().toLowerCase(),X=a.options.find(Oe=>(Oe??"").trim().toLocaleLowerCase()===I);X&&(m=X)}let V=Te.find(I=>I.name===a?.name);return V&&(a=L(L({},a),V)),v(L({},n),{Value:P(m),FormView:a})}else if(this.hasFreeTextSettings())return v(L({},n),{Value:P(m),FormView:{name:n.Name,type:"FreeText",shortDescription:"Custom settings argument",longDescription:"Custom settings argument"}});return null}).filter(n=>n!==null)});nonSelectedOptionsGrouped=H(()=>{let i=this.options().map(o=>o.Name?.replace("--","")),e=this.hiddenOptions();return this.allOptionsGrouped().map(o=>v(L({},o),{options:o.options.filter(n=>!i.includes(n.name)&&!e.includes(n.name))})).filter(o=>o.options.length>0)});settingsAsText=H(()=>this.selectedSettings().map(i=>{let e=i.Value(),o="";return typeof e=="boolean"?o=this.isTrue(e)?"True":"False":(typeof e=="number"||e!=null)&&(o=e.toString()),`${i.Name??""}=${o}`}).join(`
1
+ import{a as ge,c as fe,d as xe}from"./chunk-UZ4POLDC.js";import{h as Ce}from"./chunk-O56QUSSI.js";import{a as ue}from"./chunk-YYD2JU6T.js";import{B as le,H as _e,K as pe,P as se,V as me,W as ce,Y as de,b as ee,c as te,e as ne,i as ie,k as oe,s as ae,v as re}from"./chunk-VKQQDCUN.js";import{aa as Z}from"./chunk-ZC23RK4J.js";import{$b as r,Ab as A,Ac as W,Bb as D,Bc as T,Cb as s,Db as _,Eb as p,Fb as b,Jb as R,Jc as E,Kb as M,Lb as f,Mb as x,Qc as H,Sa as l,Tb as k,Ub as G,Vb as Q,Wc as J,Zb as C,_ as j,_c as Y,da as d,ea as u,gb as q,ic as g,kc as B,lb as S,nc as c,oc as z,pa as P,pc as U,vc as K,wb as F,wc as N,xb as h,xc as O,yb as $}from"./chunk-TQTOIWBK.js";import{a as L,b as v}from"./chunk-7CGTOI24.js";var Te=[{name:"send-mail-to",type:"Email"},{name:"send-mail-from",type:"Email"},{name:"log-file",type:"FileTree"},{name:"compression-extension-file",type:"FileTree"},{name:"dbpath",type:"FileTree"},{name:"restore-path",type:"FileTree"},{name:"gpg-program-path",type:"FileTree"}];var Fe=()=>({updateOn:"blur"}),y=t=>({formView:t}),w=t=>({$implicit:t});function he(t,i){if(t&1){let e=x();_(0,"button",14),C("click",function(){d(e);let n=r();return u(n.showTextArea.set(!1))}),k(1,6),b(2,"sh-icon"),G(),p()}}function ye(t,i){if(t&1){let e=x();_(0,"button",18,1),C("click",function(){let n=d(e).$implicit,a=r(3);return u(a.addSetting(n))}),_(2,"div",19),c(3),_(4,"p"),c(5),p()()()}if(t&2){let e=i.$implicit;B("deprecated",e.deprecatedDescription),l(3),U(" ",e.shortDescription," "),l(2),z(e.name)}}function we(t,i){if(t&1&&(_(0,"h3",10),c(1),p(),A(2,ye,6,4,"button",17,$)),t&2){let e=i.$implicit;l(),z(e.displayName),l(),D(e.options)}}function Ve(t,i){if(t&1){let e=x();_(0,"sh-menu")(1,"button",20)(2,"sh-icon"),c(3,"dots-three-vertical"),p()(),R(4,16),_(5,"button",14),C("click",function(){d(e);let n=r(2);return u(n.addFreeTextSetting())}),k(6,8),b(7,"sh-icon"),G(),p(),_(8,"button",21),C("click",function(){d(e);let n=r(2);return u(n.showTextArea.set(!0))}),_(9,"sh-icon"),c(10,"link"),p(),c(11," Edit contents as text "),p(),M(),p()}}function Le(t,i){if(t&1&&(_(0,"sh-menu",15)(1,"button",12),k(2,7),b(3,"sh-icon"),G(),p(),R(4,16),A(5,we,4,1,null,null,$),M(),p(),F(7,Ve,12,0,"sh-menu")),t&2){let e=r();s("searchable",!0),l(5),D(e.nonSelectedOptionsGrouped()),l(2),h(e.hasFreeTextSettings()?7:-1)}}function Ie(t,i){if(t&1){let e=x();_(0,"textarea",22),C("ngModelChange",function(n){d(e);let a=r();return u(a.updateSettingsFromText(n))}),p()}if(t&2){let e=r();s("ngModel",e.settingsAsText())("ngModelOptions",W(2,Fe))}}function be(t,i){t&1&&(_(0,"div",23),c(1,"Add a setting above to get started."),p())}function Me(t,i){t&1&&(_(0,"sh-icon",31),c(1," warning-octagon "),p())}function Ne(t,i){if(t&1&&(_(0,"sh-icon",32),c(1,"archive"),p()),t&2){let e=r(2).$implicit;s("shTooltip",e.FormView.deprecatedDescription)}}function Ee(t,i){if(t&1&&(_(0,"sh-icon",33),c(1,"question"),p()),t&2){let e=r(2).$implicit;s("shTooltip",e.FormView.longDescription)}}function ve(t,i){if(t&1&&(F(0,Me,2,0,"sh-icon",31),_(1,"span"),c(2),p(),F(3,Ne,2,1,"sh-icon",32)(4,Ee,2,1,"sh-icon",33)),t&2){let e=r().$implicit,o=O(1);h(o?0:-1),l(),B("deprecated",e.FormView.deprecatedDescription),l(),z(e.FormView.shortDescription),l(),h(e.FormView.deprecatedDescription?3:e.FormView.longDescription?4:-1)}}function Pe(t,i){t&1&&f(0)}function $e(t,i){if(t&1){let e=x();_(0,"div",25)(1,"label"),S(2,Pe,1,0,"ng-container",34),p(),_(3,"div")(4,"sh-form-field")(5,"input",35),C("ngModelChange",function(n){d(e);let a=r().$implicit,m=r(2);return u(m.updateFreeTextSettingName(a,n))}),p(),_(6,"sh-icon",36),c(7,"rectangle-dashed"),p()()(),_(8,"div")(9,"sh-form-field")(10,"input",35),C("ngModelChange",function(n){d(e);let a=r().$implicit,m=r(2);return u(m.updateSettingValue(a,n))}),p(),_(11,"sh-icon",36),c(12,"textbox"),p()()()()}if(t&2){let e=r().$implicit,o=g(3);l(2),s("ngTemplateOutlet",o),l(3),s("ngModel",e.Name),l(5),s("ngModel",e.Value())}}function Ae(t,i){t&1&&f(0)}function De(t,i){if(t&1){let e=x();_(0,"app-file-tree",26)(1,"label",37),S(2,Ae,1,0,"ng-container",34),p(),_(3,"input",38),C("ngModelChange",function(n){d(e);let a=r().$implicit,m=r(2);return u(m.updateSettingValue(a,n))}),p()()}if(t&2){let e=r().$implicit,o=g(3),n=O(0);s("startingPath",e.Value())("accepts",e.FormView.accepts)("showFiles",!0)("showHiddenNodes",!0)("selectFiles",!0),l(),s("for",n),l(),s("ngTemplateOutlet",o),l(),s("id",n)("ngModel",e.Value())}}function Re(t,i){if(t&1){let e=x();_(0,"app-file-tree",27),b(1,"label",37),_(2,"input",38),C("ngModelChange",function(n){d(e);let a=r().$implicit,m=r(2);return u(m.updateSettingValue(a,n))}),p()()}if(t&2){let e=r().$implicit,o=O(0);s("startingPath",e.Value()),l(),s("for",o),l(),s("id",o)("ngModel",e.Value())}}function ke(t,i){t&1&&f(0)}function Ge(t,i){t&1&&f(0)}function Be(t,i){t&1&&(_(0,"sh-icon",36),c(1,"link"),p())}function ze(t,i){t&1&&(_(0,"sh-icon",36),c(1,"hard-drives"),p())}function Ue(t,i){t&1&&(_(0,"sh-icon",36),c(1,"jar"),p())}function Ke(t,i){t&1&&(_(0,"sh-icon",36),c(1,"envelope"),p())}function He(t,i){t&1&&(_(0,"sh-icon",36),c(1,"textbox"),p())}function Je(t,i){if(t&1){let e=x();_(0,"sh-form-field")(1,"label",37),S(2,ke,1,0,"ng-container",34)(3,Ge,1,0,"ng-container",39),p(),_(4,"input",40),C("ngModelChange",function(n){d(e);let a=r().$implicit,m=r(2);return u(m.updateSettingValue(a,n))}),p(),F(5,Be,2,0,"sh-icon",36)(6,ze,2,0,"sh-icon",36)(7,Ue,2,0,"sh-icon",36)(8,Ke,2,0,"sh-icon",36)(9,He,2,0,"sh-icon",36),p()}if(t&2){let e=r().$implicit,o=g(3),n=O(0);r(2);let a=g(10);l(),s("for",n),l(),s("ngTemplateOutlet",o),l(),s("ngTemplateOutlet",a)("ngTemplateOutletContext",T(10,w,T(8,y,e.FormView))),l(),s("type",e.FormView.type==="Email"?"email":"text")("id",n)("ngModel",e.Value()),l(),h(e.FormView.type==="Path"?5:e.FormView.type==="Hostname"?6:e.FormView.type==="Bucketname"?7:e.FormView.type==="Email"?8:9)}}function Xe(t,i){t&1&&f(0)}function je(t,i){t&1&&f(0)}function qe(t,i){if(t&1){let e=x();_(0,"sh-icon",43),C("click",function(){d(e);let n=r(2).$implicit;return u(n.showPassword=!n.showPassword)}),c(1," eye "),p()}}function Qe(t,i){if(t&1){let e=x();_(0,"sh-icon",43),C("click",function(){d(e);let n=r(2).$implicit;return u(n.showPassword=!n.showPassword)}),c(1," eye-slash "),p()}}function We(t,i){if(t&1){let e=x();_(0,"sh-form-field")(1,"label",37),S(2,Xe,1,0,"ng-container",34)(3,je,1,0,"ng-container",39),p(),_(4,"input",41),C("ngModelChange",function(n){d(e);let a=r().$implicit,m=r(2);return u(m.updateSettingValue(a,n))}),p(),_(5,"sh-icon",36),c(6,"password"),p(),F(7,qe,2,0,"sh-icon",42)(8,Qe,2,0,"sh-icon",42),p()}if(t&2){let e=r().$implicit,o=g(3),n=O(0);r(2);let a=g(10);l(),s("for",n),l(),s("ngTemplateOutlet",o),l(),s("ngTemplateOutlet",a)("ngTemplateOutletContext",T(10,w,T(8,y,e.FormView))),l(),s("type",e.showPassword?"text":"password")("id",n)("ngModel",e.Value()),l(3),h(e.showPassword?7:8)}}function Ye(t,i){t&1&&f(0)}function Ze(t,i){t&1&&f(0)}function et(t,i){if(t&1&&c(0),t&2){let e=i.$implicit;U(" ",e," ")}}function tt(t,i){if(t&1){let e=x();_(0,"sh-select",44)(1,"label",37),S(2,Ye,1,0,"ng-container",34)(3,Ze,1,0,"ng-container",39),p(),_(4,"input",38),C("ngModelChange",function(n){d(e);let a=r().$implicit,m=r(2);return u(m.updateSettingValue(a,n))}),p()(),S(5,et,1,1,"ng-template",null,3,E)}if(t&2){let e=g(6),o=r().$implicit,n=g(3),a=O(0);r(2);let m=g(10);s("options",o.FormView.options)("isClearable",!1)("optionTemplate",e),l(),s("for",a),l(),s("ngTemplateOutlet",n),l(),s("ngTemplateOutlet",m)("ngTemplateOutletContext",T(11,w,T(9,y,o.FormView))),l(),s("id",a)("ngModel",o.Value())}}function nt(t,i){t&1&&f(0)}function it(t,i){t&1&&f(0)}function ot(t,i){if(t&1){let e=x();_(0,"app-size",45),C("ngModelChange",function(n){d(e);let a=r().$implicit,m=r(2);return u(m.updateSettingValue(a,n))}),_(1,"label",37),S(2,nt,1,0,"ng-container",34)(3,it,1,0,"ng-container",39),p()()}if(t&2){let e=r().$implicit,o=g(3),n=O(0);r(2);let a=g(10);s("inputType",e.Name)("ngModel",e.Value())("customId",n),l(),s("for",n),l(),s("ngTemplateOutlet",o),l(),s("ngTemplateOutlet",a)("ngTemplateOutletContext",T(9,w,T(7,y,e.FormView)))}}function at(t,i){t&1&&f(0)}function rt(t,i){t&1&&f(0)}function lt(t,i){if(t&1){let e=x();_(0,"sh-form-field")(1,"label",37),S(2,at,1,0,"ng-container",34)(3,rt,1,0,"ng-container",39),p(),_(4,"input",46),C("ngModelChange",function(n){d(e);let a=r().$implicit,m=r(2);return u(m.updateSettingValue(a,n))}),p(),_(5,"sh-icon",36),c(6,"numpad"),p()()}if(t&2){let e=r().$implicit,o=g(3),n=O(0);r(2);let a=g(10);l(),s("for",n),l(),s("ngTemplateOutlet",o),l(),s("ngTemplateOutlet",a)("ngTemplateOutletContext",T(8,w,T(6,y,e.FormView))),l(),s("id",n)("ngModel",e.Value())}}function _t(t,i){t&1&&f(0)}function pt(t,i){t&1&&f(0)}function st(t,i){if(t&1){let e=x();_(0,"sh-toggle",29)(1,"label",37),S(2,_t,1,0,"ng-container",34)(3,pt,1,0,"ng-container",39),p(),_(4,"input",47),C("ngModelChange",function(n){d(e);let a=r().$implicit,m=r(2);return u(m.updateSettingValue(a,n))}),p()()}if(t&2){let e=r().$implicit,o=g(3),n=O(0);r(2);let a=g(10);l(),s("for",n),l(),s("ngTemplateOutlet",o),l(),s("ngTemplateOutlet",a)("ngTemplateOutletContext",T(8,w,T(6,y,e.FormView))),l(),s("id",n)("ngModel",e.Value())}}function mt(t,i){t&1&&f(0)}function ct(t,i){t&1&&f(0)}function dt(t,i){if(t&1&&c(0),t&2){let e=i.$implicit;U(" ",e," ")}}function ut(t,i){if(t&1){let e=x();_(0,"sh-select",48)(1,"label",37),S(2,mt,1,0,"ng-container",34)(3,ct,1,0,"ng-container",39),p(),_(4,"input",49),C("ngModelChange",function(n){d(e);let a=r().$implicit,m=r(2);return u(m.updateSettingValue(a,n))}),p()(),S(5,dt,1,1,"ng-template",null,4,E)}if(t&2){let e=g(6),o=r().$implicit,n=g(3),a=O(0);r(2);let m=g(10);s("options",o.FormView.options)("selectMultiple",!0)("optionTemplate",e),l(),s("for",a),l(),s("ngTemplateOutlet",n),l(),s("ngTemplateOutlet",m)("ngTemplateOutletContext",T(10,w,T(8,y,o.FormView))),l(),s("ngModel",o.Value())}}function Ct(t,i){t&1&&f(0)}function gt(t,i){t&1&&f(0)}function ft(t,i){if(t&1){let e=x();_(0,"app-timespan",45),C("ngModelChange",function(n){d(e);let a=r().$implicit,m=r(2);return u(m.updateSettingValue(a,n))}),_(1,"label",37),S(2,Ct,1,0,"ng-container",34)(3,gt,1,0,"ng-container",39),p()()}if(t&2){let e=r().$implicit,o=g(3),n=O(0);r(2);let a=g(10);s("inputType",e.Name)("ngModel",e.Value())("customId",n),l(),s("for",n),l(),s("ngTemplateOutlet",o),l(),s("ngTemplateOutlet",a)("ngTemplateOutletContext",T(9,w,T(7,y,e.FormView)))}}function xt(t,i){if(t&1){let e=x();K(0)(1),S(2,ve,5,5,"ng-template",null,2,E),_(4,"div",24),F(5,$e,13,3,"div",25)(6,De,4,9,"app-file-tree",26)(7,Re,3,4,"app-file-tree",27)(8,Je,10,12,"sh-form-field")(9,We,9,12,"sh-form-field")(10,tt,7,13)(11,ot,4,11,"app-size",28)(12,lt,7,10,"sh-form-field")(13,st,5,10,"sh-toggle",29)(14,ut,7,12)(15,ft,4,11,"app-timespan",28),_(16,"button",30),C("click",function(){let n=d(e).$implicit,a=r(2);return u(a.removeSetting(n))}),_(17,"sh-icon"),c(18,"x-bold"),p()()()}if(t&2){let e=i.$implicit,o=i.$index,n=r(2);N("destination-"+e.Name+o),l(),N(n.inAppOptions(e.Name)),l(3),B("align-remove-start",e.FormView.type==="FolderTree"||e.FormView.type==="FileTree"||e.FormView.type==="Boolean"),l(),h(e.FormView.type==="FreeText"?5:e.FormView.type==="FileTree"?6:e.FormView.type==="FolderTree"?7:e.FormView.type==="String"||e.FormView.type==="Path"||e.FormView.type==="Decimal"||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==="Size"?11:e.FormView.type==="Integer"?12:e.FormView.type==="Boolean"?13:e.FormView.type==="Flags"?14:e.FormView.type==="Timespan"||e.FormView.type==="DateTime"?15:-1)}}function Tt(t,i){if(t&1&&(F(0,be,2,0,"div",23),A(1,xt,19,5,null,null,$)),t&2){let e=r();h(e.selectedSettings().length===0?0:-1),l(),D(e.selectedSettings())}}function St(t,i){if(t&1&&(_(0,"sh-icon",50),c(1,"x-circle"),p()),t&2){r();let e=O(0);s("shTooltip",(e==null?null:e.message)??"Invalid value")}}function Ot(t,i){if(t&1&&(_(0,"sh-icon",32),c(1,"warning"),p()),t&2){r();let e=O(0);s("shTooltip",(e==null?null:e.message)??"Invalid value")}}function Ft(t,i){if(t&1&&(K(0),F(1,St,2,1,"sh-icon",50)(2,Ot,2,1,"sh-icon",32)),t&2){r();let e=O(0),o=r().$implicit,n=N(o.formView.validate(e));l(),h((n==null?null:n.type)==="error"?1:(n==null?null:n.type)==="warning"?2:-1)}}function ht(t,i){if(t&1&&(K(0),F(1,Ft,3,2)),t&2){let e=r().$implicit,n=(N(e.Value())??"").toString().trim()==="";l(),h(!n&&e.formView.validate?1:-1)}}function yt(t,i){if(t&1&&F(0,ht,2,2),t&2){let e=i.$implicit;h(e.Value?0:-1)}}var Se=class t{#e=j(ue);options=Y.required();hiddenOptions=J([]);hasFreeTextSettings=J(!1);applicationOptions=J();showTextArea=P(!1);allOptionsGrouped=this.#e.allOptionsGrouped;allOptions=this.#e.allOptions;selectedSettings=H(()=>{let i=this.hiddenOptions();return this.options().map(n=>{let a=this.allOptions().find(V=>V.name===n.Name?.replace("--","")),m=n.Value??"";if(a&&i.includes(a.name))return null;if(a){if(a.type==="Boolean"&&(m=this.isTrue(m)),a.type==="Integer"&&(m=parseInt(m)||0),a.type==="Enumeration"&&a.options){let I=m?.trim().toLowerCase(),X=a.options.find(Oe=>(Oe??"").trim().toLocaleLowerCase()===I);X&&(m=X)}let V=Te.find(I=>I.name===a?.name);return V&&(a=L(L({},a),V)),v(L({},n),{Value:P(m),FormView:a})}else if(this.hasFreeTextSettings())return v(L({},n),{Value:P(m),FormView:{name:n.Name,type:"FreeText",shortDescription:"Custom settings argument",longDescription:"Custom settings argument"}});return null}).filter(n=>n!==null)});nonSelectedOptionsGrouped=H(()=>{let i=this.options().map(o=>o.Name?.replace("--","")),e=this.hiddenOptions();return this.allOptionsGrouped().map(o=>v(L({},o),{options:o.options.filter(n=>!i.includes(n.name)&&!e.includes(n.name))})).filter(o=>o.options.length>0)});settingsAsText=H(()=>this.selectedSettings().map(i=>{let e=i.Value(),o="";return typeof e=="boolean"?o=this.isTrue(e)?"True":"False":(typeof e=="number"||e!=null)&&(o=e.toString()),`${i.Name??""}=${o}`}).join(`
2
2
  `));updateSettingsFromText(i){if(typeof i!="string")return;let e=Ce(i);this.options.update(()=>e)}isTrue(i){if(typeof i=="boolean")return i;if(typeof i=="string"){let e=i.toLowerCase();return e==="true"||e==="1"||e==="yes"||e==="on"}return!1}inAppOptions(i){let e=this.applicationOptions()?.findIndex(o=>o.Name?.replace("--","")===i);return e===void 0?!1:e>-1}addFreeTextSetting(){this.hasFreeTextSettings()&&this.options.update(i=>[...i,{Filter:null,Name:"",Value:""}])}addSetting(i){this.options.update(e=>{let o=i.defaultValue??"";return i.type==="Boolean"&&(o=this.isTrue(o)),i.type==="Integer"&&(o=parseInt(o)||0),[...e,{Name:i.name,Value:o}]})}updateSettingValue(i,e){this.options.update(o=>{let n=[...o],a=n.findIndex(m=>m.Name===i.Name);if(i.FormView.type==="Boolean")return n[a].Value=this.isTrue(e)?"True":"False",n;if(i.FormView.type==="Integer")return n[a].Value=e.toString(),n;if(i.FormView.type==="Enumeration"&&i.FormView.options){let m=e?.trim().toLowerCase()??"",V=i.FormView.options.find(I=>(I??"").trim().toLocaleLowerCase()===m);if(V)return n[a].Value=V,n}return n[a].Value=e,n})}updateFreeTextSettingName(i,e){this.options.update(o=>{let n=[...o],a=n.findIndex(m=>m.Name===i.Name);return n[a].Name=e,n})}removeSetting(i){this.options.update(e=>e.filter(o=>o.Name!==i.Name))}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=q({type:t,selectors:[["app-options-list"]],inputs:{options:[1,"options"],hiddenOptions:[1,"hiddenOptions"],hasFreeTextSettings:[1,"hasFreeTextSettings"],applicationOptions:[1,"applicationOptions"]},outputs:{options:"optionsChange"},decls:11,vars:4,consts:()=>{let i;i=$localize`Advanced options`;let e;e=$localize` Show editor ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let o;o=$localize` Add advanced option ${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SH_ICON:`;let n;n=$localize`${"\uFFFD#7\uFFFD"}:START_TAG_SH_ICON:pen${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SH_ICON: New custom option `;let a;return a=$localize`By adding this option it will override the matching global option`,[["validateTemplate",""],["option",""],["defaultLabel",""],["enumOptionTemplate",""],["optionTemplate",""],i,e,o,n,[3,"disableToggle","isActive"],["title",""],[1,"actions"],["shButton","","type","button",1,"outlined","small"],["wrap","off","placeholder","Paste advanced options here, one per line.",1,"raw-text-area",3,"ngModel","ngModelOptions"],["shButton","","type","button",1,"outlined","small",3,"click"],[3,"searchable"],["menu",""],["type","button",3,"deprecated"],["type","button",3,"click"],[1,"option-col"],["shButton","","type","button",1,"small"],["shButton","","type","button",1,"small",3,"click"],["wrap","off","placeholder","Paste advanced options here, one per line.",1,"raw-text-area",3,"ngModelChange","ngModel","ngModelOptions"],[1,"placeholder"],[1,"field-row"],[1,"form-column"],[3,"startingPath","accepts","showFiles","showHiddenNodes","selectFiles"],[3,"startingPath"],[3,"inputType","ngModel","customId"],[1,"primary","raised"],["shButton","","type","button",1,"outlined","small","remove-btn",3,"click"],["shTooltip",a,1,"error"],[1,"warn",3,"shTooltip"],[1,"primary",3,"shTooltip"],[4,"ngTemplateOutlet"],["type","text",3,"ngModelChange","ngModel"],["prefix",""],[3,"for"],["type","text",3,"ngModelChange","id","ngModel"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"ngModelChange","type","id","ngModel"],["autocomplete","new-password",3,"ngModelChange","type","id","ngModel"],["suffix","",1,"clickable"],["suffix","",1,"clickable",3,"click"],[3,"options","isClearable","optionTemplate"],[3,"ngModelChange","inputType","ngModel","customId"],["type","number",3,"ngModelChange","id","ngModel"],["type","checkbox",3,"ngModelChange","id","ngModel"],[1,"primary","raised",3,"options","selectMultiple","optionTemplate"],["type","text","id","text",3,"ngModelChange","ngModel"],[1,"error",3,"shTooltip"]]},template:function(e,o){e&1&&(_(0,"sh-toggle-card",9),R(1,10)(2),Q(3,5),M(),_(4,"div",11),F(5,he,3,0,"button",12)(6,Le,8,2),p(),M(),F(7,Ie,1,3,"textarea",13)(8,Tt,3,1),p(),S(9,yt,1,1,"ng-template",null,0,E)),e&2&&(s("disableToggle",!0)("isActive",!0),l(5),h(o.showTextArea()?5:6),l(2),h(o.showTextArea()?7:8))},dependencies:[ae,te,oe,ee,ne,ie,ge,fe,xe,Z,me,_e,le,pe,de,re,se,ce],styles:["[_nghost-%COMP%]{display:block}sh-select[_ngcontent-%COMP%]{--miw: p2r(120)}sh-toggle[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:1rem}.placeholder[_ngcontent-%COMP%]{color:var(--base-9);text-align:center;padding:2rem 1rem}.field-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;position:relative;z-index:1;max-width:32.5rem;width:100%}.field-row[_ngcontent-%COMP%] .remove-btn[_ngcontent-%COMP%]{align-self:flex-end}.field-row[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]:first-child{max-width:28rem;width:100%}.field-row.align-remove-start[_ngcontent-%COMP%] .remove-btn[_ngcontent-%COMP%]{align-self:flex-start}.option-col[_ngcontent-%COMP%]{display:flex;flex-direction:column}.option-col[_ngcontent-%COMP%] .fill[_ngcontent-%COMP%]{color:var(--base-12)}.form-column[_ngcontent-%COMP%]{display:flex;gap:.25rem;flex-direction:column}label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}sh-icon[_ngcontent-%COMP%]{font-size:1rem}.form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:3fr 1fr;gap:.5rem;align-items:flex-end}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;justify-content:flex-end}.deprecated[_ngcontent-%COMP%]{text-decoration:line-through}.raw-text-area[_ngcontent-%COMP%]{min-height:12rem;white-space:pre}"],changeDetection:0})};export{Se as a};
@@ -1 +1 @@
1
- import{a as Ke}from"./chunk-YCJYEQF7.js";import{a as Ye}from"./chunk-IMQUTGIK.js";import{a as Qe}from"./chunk-C6PICAXB.js";import{A as ze,B as ge,H as Q,J as je,K as He,L as Je,P as Ue,W as Xe,a as pe,c as U,e as X,i as q,k as he,s as K,v as We,y as Ve,z as Ge}from"./chunk-VKQQDCUN.js";import{d as qe}from"./chunk-DSYNIXJF.js";import{aa as Be}from"./chunk-ZC23RK4J.js";import{$b as f,A as be,Ab as re,Ac as we,Bb as se,Bc as ue,Cb as N,Cc as Ie,Db as u,Eb as p,F as _e,Fb as ae,Fc as Le,Gc as Ae,Jb as Se,Jc as ke,Kb as ye,Lb as me,Mb as W,Qc as y,Sa as _,Tb as Oe,Ub as ve,Vb as A,Vc as $e,Wb as Z,Wc as C,Xb as ee,Xc as Ce,Zb as V,_ as ie,ac as J,bc as D,da as v,ea as F,gb as H,gc as Fe,hc as xe,ic as fe,jc as le,kc as z,l as Ee,lb as Y,nc as b,oc as Re,pa as P,pc as De,q as G,qc as ce,ra as L,sc as k,tc as $,uc as B,vb as oe,w as Pe,wb as x,xb as R,yb as Ne,zc as de}from"./chunk-TQTOIWBK.js";import{a as te,b as ne}from"./chunk-7CGTOI24.js";var lt=["treeContainer"],ct=["formRef"],dt=[[["label"]],[["label"]],[["input"]]],ut=["label","label","input"],pt=r=>({children:r,level:0}),nt=r=>({$implicit:r}),ht=(r,t)=>({children:r,level:t}),gt=()=>({maxWidth:"700px",width:"100%"}),_t=(r,t)=>t.id;function mt(r,t){if(r&1){let e=W();u(0,"sh-button-group",21),B("valueChange",function(i){v(e);let o=f();return $(o.pathDiscoveryMethod,i)||(o.pathDiscoveryMethod=i),F(i)}),u(1,"button",22),A(2,4),p(),u(3,"button",23),A(4,5),p()()}if(r&2){let e=f();k("value",e.pathDiscoveryMethod)}}function ft(r,t){r&1&&ae(0,"sh-progress-bar",14)}function Ct(r,t){r&1&&(u(0,"sh-icon",29),b(1,"caret-down"),p())}function Tt(r,t){r&1&&ae(0,"sh-icon",29)}function Mt(r,t){r&1&&(u(0,"sh-icon",29),b(1,"spinner"),p())}function Et(r,t){r&1&&(u(0,"sh-icon",29),b(1,"caret-right"),p())}function Pt(r,t){r&1&&(u(0,"sh-icon",26),b(1,"folder-open"),p())}function bt(r,t){r&1&&(u(0,"sh-icon",26),b(1,"folder-user"),p())}function Nt(r,t){r&1&&(u(0,"sh-icon",26),b(1,"file"),p())}function St(r,t){r&1&&(u(0,"sh-icon",26),b(1,"folder"),p())}function yt(r,t){if(r&1&&(x(0,Ct,2,0,"sh-icon",29)(1,Tt,1,0,"sh-icon",29)(2,Mt,2,0,"sh-icon",29)(3,Et,2,0,"sh-icon",29),x(4,Pt,2,0,"sh-icon",26)(5,bt,2,0,"sh-icon",26)(6,Nt,2,0,"sh-icon",26)(7,St,2,0,"sh-icon",26)),r&2){let e=f(2).$implicit,n=f(2);R(e.children.length?0:e.cls==="file"?1:e.id===n.isLoading()?2:3),_(4),R(e.children.length?4:e.id==="%HOME%"?5:e.cls==="file"?6:7)}}function Ot(r,t){r&1&&(u(0,"sh-icon",26),b(1,"desktop-tower"),p())}function vt(r,t){if(r&1&&(u(0,"span",28),b(1),Le(2,"bytes"),p()),r&2){let e=f(2).$implicit;_(),De("\xA0(",Ae(2,1,e.fileSize),")")}}function Ft(r,t){r&1&&me(0)}function xt(r,t){if(r&1&&Y(0,Ft,1,0,"ng-container",15),r&2){let e=f(2).$implicit,n=f().$implicit;f();let i=fe(7);N("ngTemplateOutlet",i)("ngTemplateOutletContext",ue(5,nt,Ie(2,ht,e.children,n.level+1)))}}function Rt(r,t){if(r&1){let e=W();u(0,"div",24,3),V("click",function(){v(e);let i=f().$implicit,o=f(2);return F(o.toggleNode(i.id,i))}),u(2,"div",25),x(3,yt,8,2)(4,Ot,2,0,"sh-icon",26),p(),u(5,"div",27),V("click",function(i){v(e);let o=f().$implicit,l=f(2);return F(l.toggleSelectedNode(i,o))}),u(6,"span"),b(7),p(),x(8,vt,3,3,"span",28),p()(),x(9,xt,1,7,"ng-container")}if(r&2){let e=f().$implicit,n=f().$implicit,i=f();z("accepted",e.accepted===!0)("active",e.evalState===i.TreeEvalEnum.Included)("indeterminate",e.isIndeterminate)("open",e.children.length)("usually-hidden",e.hidden)("root",n.level===0)("loading",i.isLoading()===e.id)("generated",e.isGenerated)("search-match",e.isSearchMatch),_(2),z("file",e.cls==="file"),_(),R(e.id!=="/"?3:4),_(4),Re(e.text),_(),R(e.cls=="file"&&e.fileSize!=null?8:-1),_(),R(e.children.length>0?9:-1)}}function Dt(r,t){if(r&1&&x(0,Rt,10,24),r&2){let e=t.$implicit,n=f(2);R(e.hidden&&n._showHiddenNodes()||!e.hidden?0:-1)}}function wt(r,t){if(r&1&&(u(0,"sh-list"),re(1,Dt,1,1,null,null,_t),p()),r&2){let e=t.$implicit;le("padding-left",e.level*.25,"rem"),_(),se(e.children)}}function It(r,t){r&1&&me(0)}function Lt(r,t){if(r&1){let e=W();u(0,"sh-toggle",30),B("checkedChange",function(i){v(e);let o=f();return $(o._showHiddenNodes,i)||(o._showHiddenNodes=i),F(i)}),A(1,6),p()}if(r&2){let e=f();k("checked",e._showHiddenNodes),_(),Z(e.showFiles()?"files":"folders"),ee(1)}}function At(r,t){if(r&1){let e=W();u(0,"button",31),V("click",function(){v(e);let i=f();return F(i.openCreateFolderDialog())}),A(1,7),p()}if(r&2){let e=f();N("disabled",!e.isCurrentPathFolder())}}function kt(r,t){if(r&1){let e=W();u(0,"sh-dialog",32),B("isOpenChange",function(i){v(e);let o=f();return $(o.createFolderDialogOpen,i)||(o.createFolderDialogOpen=i),F(i)}),u(1,"header",33)(2,"h2"),A(3,8),p()(),u(4,"div",34)(5,"div",35)(6,"p"),A(7,9),p(),u(8,"div",36)(9,"pre"),b(10),p()()(),u(11,"sh-form-field")(12,"textarea",37),B("ngModelChange",function(i){v(e);let o=f();return $(o.createFolderPath,i)||(o.createFolderPath=i),F(i)}),p()()(),u(13,"footer",38)(14,"button",39),V("click",function(){v(e);let i=f();return F(i.closeCreateFolderDialog(!1))}),b(15,"Cancel"),p(),u(16,"button",40),V("click",function(){v(e);let i=f();return F(i.closeCreateFolderDialog(!0))}),Oe(17,10),ae(18,"sh-icon"),ve(),p()()()}if(r&2){let e,n=f();k("isOpen",n.createFolderDialogOpen),N("options",we(6,gt)),_(10),ce("",n.currentPathResolvedShorthands(),"",n.createFolderPath()?"/"+n.createFolderPath():""),_(2),k("ngModel",n.createFolderPath),_(4),N("disabled",!((e=n.createFolderPath())!=null&&e.length))}}var it=(o=>(o[o.ExcludedByParent=-2]="ExcludedByParent",o[o.Excluded=-1]="Excluded",o[o.None=0]="None",o[o.Included=1]="Included",o[o.IncludedByParent=2]="IncludedByParent",o))(it||{}),E="/",Te=class r{#e=ie(qe);#i=ie(Qe);#p=ie(Ge);multiSelect=C(!1);disabled=C(!1);showFiles=C(!1);selectFiles=C(!1);accepts=C(null);startingPath=C(null);rootPaths=C([]);initialNodes=C([]);backupSettings=C(null);pathRefreshTrigger=C(!1);showHiddenNodes=C(!1);enableCreateFolder=C(!1);hideShortcuts=C(!1);customRemoteMode=C(null);backupId=C("");sourcePrefix=C("");destinationUrl=C("");loadExtendedData=C(!0);hasExtendedData=$e();searchMode=C(!1);searchResults=C([]);_showHiddenNodes=P(!1);createFolderDialogOpen=P(!1);createFolderPath=P(null);treeContainerRef=Ce("treeContainer");formRef=Ce("formRef");pathDiscoveryMethod=P("browse");isLoading=P(null);currentPath=P("");currentPathResolvedShorthands=y(()=>this.#i.resolveShorthandPath(this.currentPath()));#r=P(null);treeSearchQuery=P("");treeNodes=P([]);pathDelimiter=y(()=>this.#i.systemInfo()?.DirectorySeparator??"");filterGroups=this.#i.filterGroups();isByBackupSettings=y(()=>{let t=this.backupSettings();return!(t===void 0||t?.id===void 0||t?.time===void 0)});searchableTreeNodes=y(()=>{let t=this.treeSearchQuery();return t?this.treeNodes().filter(e=>e.text?.toLowerCase().includes(t.toLowerCase())):this.treeNodes()});TreeEvalEnum=it;searchResultTreeStructure=y(()=>{let t=this.searchResults();if(t.length===0)return[];let e=this.currentPath().split("\0").filter(a=>a!==""&&a!==E),n=this.showHiddenNodes(),i=new Map;for(let a of t){let c=a.Path??"",h=this.#n(c),O=c.split(h).filter(S=>S!==""),T="";for(let S=0;S<O.length;S++){let w=O[S],I=S===O.length-1,j=!I||this.#t(c),st=T||E,Me=T?T.endsWith(h)?T.slice(0,-h.length):T:"";if(T=Me?`${Me}${h}${w}`:`${h}${w}`,j&&!T.endsWith(h)&&(T+=h),!i.has(T))i.set(T,{part:w,parentPath:st,isFolder:j,match:I?a:null});else if(I){let at=i.get(T);at.match=a}}}let o=new Map;for(let[a,c]of i)o.has(c.parentPath)||o.set(c.parentPath,[]),o.get(c.parentPath).push(a);let l=new Set,g=new Map;for(let[a,c]of i){if(!c.isFolder){l.add(a);continue}let h=o.get(c.parentPath)||[];if(h.length===1&&h[0]===a&&c.parentPath!==E)continue;l.add(a);let T=c.part,S=a;for(;;){let w=o.get(S)||[];if(w.length!==1)break;let I=w[0],j=i.get(I);if(!j||!j.isFolder)break;T+="/"+j.part,S=I}S!==a&&g.set(a,T)}l.add(E);let s=[],d=new Map,M=Array.from(l).filter(a=>a!==E).sort((a,c)=>a.split("/").length-c.split("/").length||a.localeCompare(c));for(let a of M){let c=i.get(a);if(!c)continue;let h=c.parentPath;for(;h!==E&&!l.has(h);)h=i.get(h)?.parentPath||E;if(d.has(a))continue;let O=this.#a(g.get(a),c.match?.Metadata)??c.part,T=c.match===null,S=c.match!==null&&!c.isFolder&&n?0:this.#s(e,a,c.isFolder?"folder":"file",null),w={id:a,resolvedpath:a,text:O,parentPath:h,children:[],evalState:S,isIndeterminate:this.isIndeterminate(e,a),cls:c.isFolder?"folder":"file",isSearchMatch:c.match!==null,isGenerated:T,hasChildrenInSearch:(o.get(a)?.length||0)>0,iconCls:null,check:!1,leaf:!c.isFolder,hidden:!1,systemFile:!1,temporary:!1,symlink:!1,fileSize:c.match?.Size??0};if(d.set(a,w),h===E)s.push(w);else{let I=d.get(h);I&&I.children.push(w)}}let m=a=>{a.sort((c,h)=>c.cls==="folder"&&h.cls!=="folder"?-1:c.cls!=="folder"&&h.cls==="folder"?1:(c.text??"").localeCompare(h.text??"")),a.forEach(c=>m(c.children))};return m(s),s});treeStructure=y(()=>{if(this.searchMode())return this.searchResultTreeStructure();let t=this.showHiddenNodes(),e=this.currentPath().split("\0").filter(s=>s!==""&&s!==E),n=structuredClone(e);for(let s=0;s<n.length;s++){let M=n[s].slice(1);if(M.startsWith("{")&&M.endsWith("}")){let m=M.slice(1,-1),a=this.filterGroups?.FilterGroups[m];if(a&&a.length){let c=a.map(h=>`-${h}`);n.splice(s,1,...c)}}}let i=this.searchableTreeNodes(),o=this.rootPaths(),l=this.accepts(),g=[];return o.length>0?g=o.map(s=>{let d=this.#s(n,s,"folder",null);return{id:s,resolvedpath:s,text:s,parentPath:"",children:[],evalState:d,isIndeterminate:!1,cls:this.#t(s)?"folder":"file"}}):g=[{id:E,resolvedpath:E,text:$localize`Computer`,parentPath:"",children:[],evalState:0,isIndeterminate:!1,cls:"folder"}],g.map(s=>{let d=new Map;if(!s.id)return;let M=s.id;l&&(s.accepted=!0),d.set(M,s);let m=o.length>0?i.filter(a=>a.parentPath.startsWith(M)):i;for(let a of m){if(!a.id)continue;let c=a.id;if(!a.cls||d.has(c))continue;let h=d.get(a.parentPath),O=a.hidden===!0&&t?0:this.#s(n,c,a.cls,h),T=ne(te({},a),{isIndeterminate:this.isIndeterminate(n,c),evalState:O,children:[]});l&&(T.accepted=this.matchAccepts(l,T)),d.set(c,T),T.id?.startsWith("%")&&T.id?.endsWith("%")&&d.set(this.#l(c),T),h&&h.children.push(T)}return s}),g});#l(t){if(!t)return E;let e=this.#n(t);return t.endsWith("/")||t.endsWith("\\")||t===E?t:t+e}#s(t,e,n,i){if(i&&i.evalState===-1)return-2;let o=0,l=t.filter(d=>!d.startsWith("-")&&!d.startsWith("+")),g=t.filter(d=>d.startsWith("-")||d.startsWith("+")),s=this.multiSelect();if(l.length===0)return o;for(let d=0;d<l.length;d++){let M=l[d];if(e===M){o=1;break}if(!s||!this.#t(M))continue;if(e?.startsWith(M)){o=1;break}}if(g.length===0)return o;for(let d=0;d<g.length;d++){let M=g[d],m=M.slice(1),a=M.startsWith("-")?-1:1;if(this.#t(m)){if(n!=="folder")continue;if(e===m){o=a;break}}if(m.startsWith("*")&&(m.endsWith("*\\")||m.endsWith("*/"))){if(n!=="folder")continue;let h=m.slice(1,-2);if(h==="")break;if(e?.includes(h+"\\")||e?.includes(h+"/")){o=a;break}}if(m.startsWith("[.*")&&(m.endsWith("[^\\/]*]")||m.endsWith("[^\\\\]*]"))){if(n!=="file")continue;let h=m.slice(3,-7);if(new RegExp(h).test(e)){o=a;break}}if(m.startsWith("[")&&m.endsWith("]")){let h=m.slice(1,-1),O=this.translateCSharpRegex(h);if(new RegExp(`${O}`).test(e)){o=a;break}}if(m.startsWith("*.")){if(n!=="file"||m.replace("*.","").length===0)continue;if(this.#c(e,m,!0)){o=a;break}}if(m==="")continue;if(m===e){o=a;break}if(this.#c(e,m,!0)){o=a;break}}return o}translateCSharpRegex(t){let e=t;e=e.replace(/^@/,"");let n=/\(\?<(?<name>\w+)>(?<pattern>[^)]+)\)/g;return e=e.replace(n,(i,o,l)=>`(${l})`),e=e.replace(/\\/g,"\\\\"),e}isIndeterminate(t,e){return t.filter(n=>!n.startsWith("-")&&this.#t(n)).some(n=>n.startsWith(e))}isCurrentPathFolder(){let t=this.currentPath();return t?t.endsWith("/")||t.endsWith("\\")||t.startsWith("%")&&t.endsWith("%")&&!t.includes("/")&&!t.includes("\\"):!1}#c(t,e,n=!1){let i=e.replace(/\*/g,".*").replace(/\?/g,".").replace(/\[!([^\]]+)\]/g,"[^$1]");return new RegExp(`${i}${n?"$":""}`).test(t)}#n(t){return t?t.includes("/")?"/":t.includes("\\")?"\\":this.pathDelimiter():this.pathDelimiter()}showHiddenNodesEffect=L(()=>this._showHiddenNodes.set(this.showHiddenNodes()));pathDiscoveryMethodEffect=L(()=>{let t=this.pathDiscoveryMethod(),e=this.#r();if(t==="browse"&&e){let n=e.value;if(n==null||n==="")return;this.currentPath.set(n)}});matchAccepts(t,e){if(!t||e.cls==="folder"||e.id===E)return!0;let n=t.split(",");if(n.length===0)return!0;let i="."+e.id.slice(e.id.indexOf("."));return i?n.some(o=>i.endsWith(o)):!1}currentPathEffect=L(()=>{let t=this.#r();t&&(t.value=this.currentPath(),t.dispatchEvent(new Event("input")))});inputValueChangeAbortController=null;inputRefEffect=L(()=>{let t=this.formRef()?.nativeElement?.querySelector("input");t&&(this.#h(t),this.inputValueChangeAbortController&&this.inputValueChangeAbortController.abort(),this.inputValueChangeAbortController=new AbortController,t.addEventListener("inputValueChanged",e=>{this.currentPath.set(e.detail.value)},{signal:this.inputValueChangeAbortController.signal}),this.#r.set(t),t.autocomplete="off")});ngOnInit(){let t=this.startingPath();if(t)this.currentPath.set(t),this.#T(t);else{let e=this.rootPaths(),n=this.initialNodes();e&&e.length>0?(n&&n.length>0&&this.treeNodes.set(n.map(i=>({id:i.id,leaf:i.leaf,cls:i.cls,text:this.#a(i.text,i?.Metadata),iconCls:i.iconCls,fileSize:i.fileSize,resolvedpath:i.resolvedpath,parentPath:this.getParentPath(i.id??"")}))),this.#o(null,e[0])):this.#o(null,E)}}getParentPath(t){let e=this.#n(t),n=t.split(e);return n.length<=1?E:(n.pop(),n.length!==0&&n.pop(),n.join(e)+e)}toggleSelectedNode(t,e){if(e.id===E||(t.stopPropagation(),this.searchMode()&&!e.isSearchMatch)||e.evalState===-2)return;if(this.selectFiles()&&e.cls==="folder"){this.toggleNode(e.id,e);return}if(this.accepts()&&!e.accepted)return;let i=this.currentPath().split("\0").filter(s=>s!==""&&s!==E),l=this.isChildOfSelected(e)?`-${e.id}`:e.id,g=this.#t(e.id);if(this.multiSelect())if(i.includes(e.id))this.currentPath.set(i.filter(s=>s!==e.id&&!(g&&s.startsWith(l))).join("\0"));else if(i.some(s=>s==l))this.currentPath.set(i.filter(s=>s!==l).join("\0"));else{let s=g?i.filter(d=>!d.startsWith(e.id)):i;this.currentPath.set([...s,l].join("\0"))}else i.includes(e.id)?this.currentPath.set(i.filter(s=>s!==e.id).join("\0")):this.currentPath.set(e.id)}isChildOfSelected(t){return this.currentPath().split("\0").filter(n=>n!==""&&n!==E&&this.#t(n)).some(n=>t.id?.startsWith(n)||`-${t.id}`.startsWith(n))}toggleNode(t,e=null){e?.cls==="folder"&&(e?.children.length?this.treeNodes.update(n=>n.filter(i=>!i.id?.startsWith(e.id)||i.id===e.id)):this.#o(e,t))}openCreateFolderDialog(){return this.createFolderPath.set(null),this.createFolderDialogOpen.set(!0),!1}closeCreateFolderDialog(t){if(t&&this.createFolderPath()?.length&&this.isCurrentPathFolder()){let e=this.createFolderPath()?.trim();if(e){let n=this.currentPath(),i=this.currentPathResolvedShorthands(),o=this.#l(e),l=`${i}/${o}`;this.#e.postApiV1RemoteoperationCreate({requestBody:{path:"file://"+l}}).subscribe({next:()=>{this.currentPath.set(l),this.#o(null,n),setTimeout(()=>{this.#d()},500),this.createFolderDialogOpen.set(!1)},error:g=>{let s=g?.message?.match(/user-information\s*:\s*(.*?)(?:\s*,|$)/i),d=s?s[1]:g?.message||$localize`An error occurred while trying to create the folder.`;this.#p.open(Ye,{data:{title:$localize`Cannot create folder`,message:d,confirmText:$localize`OK`,cancelText:void 0}})}})}}else this.createFolderDialogOpen.set(!1);return!1}#d(){setTimeout(()=>{let e=this.treeContainerRef()?.nativeElement?.querySelector(".active");e&&e.scrollIntoView({behavior:"smooth",block:"center"})},100)}#h(t){return Object.defineProperty(t,"value",{configurable:!0,get(){return Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value").get.call(this)},set(e){return Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value").set.call(this,e),this.dispatchEvent(new CustomEvent("inputValueChanged",{bubbles:!0,cancelable:!0,detail:{value:e}})),e}}),t}#g(t){return this.#e.postApiV1Filesystem({showHidden:!0,requestBody:{path:t},onlyFolders:!this.showFiles()})}#_(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"office365",requestBody:{"backup-id":this.backupId()??"","source-prefix":this.sourcePrefix()??"",operation:"ListDestinationRestoreTargets",url:this.destinationUrl()??"",path:t??"/"}}).pipe(G(e=>{let n=e.Result;return Object.keys(n).map(i=>({Path:i,Metadata:JSON.parse(n[i])}))}))}#m(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"googleworkspace",requestBody:{"backup-id":this.backupId()??"","source-prefix":this.sourcePrefix()??"",operation:"ListDestinationRestoreTargets",url:this.destinationUrl()??"",path:t??"/"}}).pipe(G(e=>{let n=e.Result;return Object.keys(n).map(i=>({Path:i,Metadata:JSON.parse(n[i])}))}))}#f(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"diskimage",requestBody:{operation:"ListDestinationRestoreTargets",path:t??"/"}}).pipe(G(e=>{let n=e.Result;return Object.keys(n).map(i=>({Path:i,Metadata:JSON.parse(n[i])}))}))}#C(t){let e=this.backupSettings();if(this.#i.hasV2ListOperations())return this.#e.postApiV2BackupListFolder({requestBody:{BackupId:e.id,Time:e.time,Paths:t?[t]:null,PageSize:0,Page:0,ReturnExtended:this.customRemoteMode()!==null||this.loadExtendedData()}}).pipe(G(n=>n.Data??[]));{let n={id:e.id+"",prefixOnly:!1,folderContents:!0,time:e.time,filter:t?"@"+t:void 0};return this.#e.getApiV1BackupByIdFiles(n).pipe(G(i=>i.Files??[]))}}#u(t){return this.customRemoteMode()==="o365"?this.#_(t):this.customRemoteMode()==="gsuite"?this.#m(t):this.customRemoteMode()==="diskimage"?this.#f(t):this.isByBackupSettings()?this.#C(t):this.#g(t)}#T(t){let n=t.split("\0").filter(l=>!l.startsWith("-")&&!l.startsWith("+")&&!l.startsWith("@")).filter(Boolean).map(l=>{let g=this.#n(l),s=l.split(g);return s.at(-1)===""&&s.pop(),{split:s,sep:g}}),i=[E];n.forEach(({split:l,sep:g})=>{l.forEach((s,d)=>{let M=l.slice(0,d+1).join(g)+g;M===""||M===g||i.includes(M)||i.push(M)})});let o=i.map(l=>(this.isLoading.set(l),this.#u(l).pipe(G(g=>({status:"success",value:g,url:l})),be(g=>Ee({status:"error",value:g,url:l})))));Pe(o).pipe(_e(()=>this.isLoading.set(null))).subscribe({next:l=>{let g=l.filter(d=>d.status==="success"),s=l.filter(d=>d.status==="error");this.treeNodes.update(d=>{let M=g.flatMap(a=>Array.isArray(a.value)?a.value.map(c=>ne(te({},c),{parentPath:a.url})):[]),m=[...new Map([...d,...M].map(a=>[a.id,a])).values()];return this.#d(),this.hideShortcuts()?m.filter(a=>!a.id.startsWith("%")):m})}})}#a(t,e){if(e){let n=e["o365:Name"]||e["o365:DisplayName"]||e["gsuite:Name"]||e["gsuite:DisplayName"]||e["diskimage:Name"];if(n)return n}return t}#M(t){t&&t.ExtType&&t.ExtType.length>0&&this.hasExtendedData.emit(t.ExtType)}#t(t){return t.startsWith("%")&&t.endsWith("%")&&!t.includes("/")&&!t.includes("\\")||t.endsWith("/")||t.endsWith("\\")}#o(t=null,e=E){this.isLoading.set(e),this.#u(e).pipe(_e(()=>this.isLoading.set(null))).subscribe({next:n=>{let i=this.isByBackupSettings()||this.customRemoteMode()!==null?n.map(o=>{this.#M(o.Metadata);let l=this.#n(o.Path);return{text:this.#a(o.Path.split(l).filter(s=>s!=="").pop(),o.Metadata),id:o.Path,cls:this.#t(o.Path)?"folder":"file",leaf:t!==null,resolvedpath:o.Path,hidden:!1,fileSize:o.Size}}):n;this.treeNodes.update(o=>{let l=i.map(s=>{let d=this.#t(s.id)?"folder":"file";return ne(te({},s),{cls:d,parentPath:e})}),g=[...new Map([...o,...l].map(s=>[s.id,s])).values()];return this.hideShortcuts()?g.filter(s=>!s.id.startsWith("%")):g})}})}static \u0275fac=function(e){return new(e||r)};static \u0275cmp=H({type:r,selectors:[["app-file-tree"]],viewQuery:function(e,n){e&1&&Fe(n.treeContainerRef,lt,5)(n.formRef,ct,5),e&2&&xe(2)},hostVars:2,hostBindings:function(e,n){e&2&&z("disabled",n.disabled())},inputs:{multiSelect:[1,"multiSelect"],disabled:[1,"disabled"],showFiles:[1,"showFiles"],selectFiles:[1,"selectFiles"],accepts:[1,"accepts"],startingPath:[1,"startingPath"],rootPaths:[1,"rootPaths"],initialNodes:[1,"initialNodes"],backupSettings:[1,"backupSettings"],pathRefreshTrigger:[1,"pathRefreshTrigger"],showHiddenNodes:[1,"showHiddenNodes"],enableCreateFolder:[1,"enableCreateFolder"],hideShortcuts:[1,"hideShortcuts"],customRemoteMode:[1,"customRemoteMode"],backupId:[1,"backupId"],sourcePrefix:[1,"sourcePrefix"],destinationUrl:[1,"destinationUrl"],loadExtendedData:[1,"loadExtendedData"],searchMode:[1,"searchMode"],searchResults:[1,"searchResults"]},outputs:{hasExtendedData:"hasExtendedData"},ngContentSelectors:ut,decls:18,vars:17,consts:()=>{let t;t=$localize`Browse path`;let e;e=$localize`Manually type path`;let n;n=$localize` Show hidden ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let i;i=$localize` Create folder `;let o;o=$localize`Enter new folder path`;let l;l=$localize`Will be created as:`;let g;return g=$localize` Create folder ${"\uFFFD#18\uFFFD"}:START_TAG_SH_ICON:folder-plus${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SH_ICON:`,[["treeContainer",""],["recursiveTree",""],["formRef",""],["treeNode",""],t,e,n,i,o,l,g,[1,"type-b","small",3,"value"],[1,"section"],[1,"browse-files"],[1,"indeterminate","primary"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"footer"],[1,"primary","raised","browse-files-toggle",3,"checked"],["shButton","","type","button",1,"small","create-folder",3,"disabled"],[1,"form-field"],[3,"isOpen","options"],[1,"type-b","small",3,"valueChange","value"],["type","button","value","browse"],["type","button","value","path"],["action","",3,"click"],[1,"icon"],[1,"primary"],[1,"text",3,"click"],[1,"size"],[1,"small"],[1,"primary","raised","browse-files-toggle",3,"checkedChange","checked"],["shButton","","type","button",1,"small","create-folder",3,"click","disabled"],[3,"isOpenChange","isOpen","options"],["header",""],["content",""],[1,"wrap-box"],[1,"box"],["id","targetUrl","autocomplete","off",3,"ngModelChange","ngModel"],["footer",""],["shButton","","type","button",3,"click"],["shButton","",1,"raised","primary",3,"click","disabled"]]},template:function(e,n){if(e&1&&(J(dt),x(0,mt,5,1,"sh-button-group",11),u(1,"div",12),D(2,0,["ngProjectAs","label",5,["label"]]),u(3,"div",13,0),x(5,ft,1,0,"sh-progress-bar",14),Y(6,wt,3,2,"ng-template",null,1,ke)(8,It,1,0,"ng-container",15),p(),u(9,"div",16),x(10,Lt,2,2,"sh-toggle",17),x(11,At,2,1,"button",18),p()(),u(12,"div",19,2)(14,"sh-form-field"),D(15,1,["ngProjectAs","label",5,["label"]]),D(16,2,["ngProjectAs","input",5,["input"]]),p()(),x(17,kt,19,7,"sh-dialog",20)),e&2){let i=fe(7);R(!n.multiSelect()&&n.customRemoteMode()===null&&!n.searchMode()?0:-1),_(),z("hidden",!n.searchMode()&&n.pathDiscoveryMethod()!=="browse"),_(2),z("visualize-accepted",n.accepts()),_(2),R(n.isLoading()!=null?5:-1),_(3),N("ngTemplateOutlet",i)("ngTemplateOutletContext",ue(15,nt,ue(13,pt,n.treeStructure()))),_(2),R(!n.accepts()&&!n.isByBackupSettings()&&n.customRemoteMode()===null&&!n.searchMode()?10:-1),_(),R(n.enableCreateFolder()&&n.customRemoteMode()===null&&!n.searchMode()?11:-1),_(),z("hidden",n.searchMode()||n.pathDiscoveryMethod()!=="path"),_(5),R(n.createFolderDialogOpen()?17:-1)}},dependencies:[ge,ze,Xe,We,Q,je,Je,Ve,Be,K,U,X,q,Ke],styles:['[_nghost-%COMP%]{display:flex;flex-direction:column;gap:1rem}.disabled[_nghost-%COMP%]{opacity:.5;-webkit-user-select:none;user-select:none;pointer-events:none;position:relative}.disabled[_nghost-%COMP%]:before{content:"";position:absolute;inset:0;background:transparent}.fill[_nghost-%COMP%]{height:auto;overflow:hidden;flex:1 0}.fill[_nghost-%COMP%] .section[_ngcontent-%COMP%]{height:auto;overflow:hidden;flex:1 0;display:grid;grid-template-columns:1fr auto;grid-template-rows:auto 1fr;grid-template-areas:"label toggle" "tree tree"}.fill[_nghost-%COMP%] .browse-files[_ngcontent-%COMP%]{resize:none;height:initial;grid-area:tree}.fill[_nghost-%COMP%] label[_ngcontent-%COMP%]{grid-area:label}.fill[_nghost-%COMP%] sh-toggle[_ngcontent-%COMP%]{grid-area:toggle;flex-direction:row-reverse}.section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.form-field.hidden[_ngcontent-%COMP%]{display:none}.browse-files[_ngcontent-%COMP%]{display:flex;gap:.5rem;padding:.5rem 1rem;height:12.5rem;min-height:6.25rem;border:1px solid var(--base-4);border-radius:var(--shape-3);overflow:auto;resize:vertical;background:var(--base-1);position:relative}.browse-files[_ngcontent-%COMP%] sh-progress-bar[_ngcontent-%COMP%]{position:absolute;top:0;left:0;right:0}.browse-files.visualize-accepted[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]:not(.accepted){opacity:.5}.browse-files.visualize-accepted[_ngcontent-%COMP%] [action].accepted[_ngcontent-%COMP%]{opacity:1}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%]{--list-active-bg: var(--base-3);gap:.125rem;padding:0;height:min-content;min-width:min-content}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]{padding:0;gap:0;border:1px solid transparent}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].active[_ngcontent-%COMP%]{border-color:transparent;--list-active-bg: var(--primary-2)}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].indeterminate[_ngcontent-%COMP%]{border-color:var(--primary-4)}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].usually-hidden[_ngcontent-%COMP%]{opacity:.6}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .size[_ngcontent-%COMP%]{opacity:.6}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].generated[_ngcontent-%COMP%]{opacity:.6}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].generated[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{color:var(--base-7)}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].root[_ngcontent-%COMP%]{gap:.25rem}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].root[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]:has(sh-icon:nth-child(2)){width:3rem}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].root[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{width:1.5rem}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].loading[_ngcontent-%COMP%]{opacity:.7}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;height:100%;width:max-content;display:flex;align-items:center}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{width:3rem;gap:.25rem;height:1.5rem;display:flex;align-items:center;justify-content:center;cursor:pointer}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .icon.file[_ngcontent-%COMP%]{width:3rem;padding:0 .25rem}.browse-files-toggle[_ngcontent-%COMP%]{color:var(--base-9)}.hidden[_ngcontent-%COMP%]{display:none}.footer[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-between;align-items:center}.box[_ngcontent-%COMP%]{border:1px solid var(--base-4);border-radius:var(--shape-3);padding:.5rem;background:var(--base-2)}.box[_ngcontent-%COMP%] pre[_ngcontent-%COMP%]{margin:0}.wrap-box[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;margin-bottom:1rem}'],changeDetection:0})};var $t=[[["label"]],[["","prefix",""]],[["","suffix",""]]],Bt=["label","[prefix]","[suffix]"];function Wt(r,t){if(r&1&&b(0),r&2){let e=t.$implicit,n=f();ce("",e.label,"",n.hasPerSecond()?"/s":"")}}var Vt=["throttle-upload","throttle-download"],Gt=[{value:"B",label:"Bytes"},{value:"KB",label:"KB"},{value:"MB",label:"MB"},{value:"GB",label:"GB"},{value:"TB",label:"TB"},{value:"PB",label:"PB"}],zt=r=>{if(!r||typeof r!="string"||r.length===0)return{size:0,unit:"MB"};let t=r.match(/^(\d+)(bytes|kb|mb|gb|tb|pb|b|kib|mib|gib|tib|pib)$/i);return t&&(t[2].toUpperCase()==="B"||t[2].toUpperCase()==="BYTES")?{size:1,unit:"KB"}:{size:t?parseInt(t[1],10):0,unit:t?t[2].toUpperCase():"MB"}},ot=class r{customId=C();inputType=C();timespan=P(0);unit=P("MB");sizeOptions=P(Gt);readonly=P(!1);hasPerSecond=y(()=>{let t=this.inputType();return t&&Vt.includes(t)});onChange=()=>{};onTouched=()=>{};onChangeEffect=L(()=>{this.onChange(this.getValue())});writeValue(t){if(t){let e=zt(t);e?queueMicrotask(()=>{this.timespan.set(e.size),this.unit.set(e.unit)}):(this.timespan.set(0),this.unit.set("MB"))}else this.timespan.set(0),this.unit.set("MB")}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.readonly.set(t)}getValue(){return`${this.timespan()}${this.unit()}`}static \u0275fac=function(e){return new(e||r)};static \u0275cmp=H({type:r,selectors:[["app-size"]],inputs:{customId:[1,"customId"],inputType:[1,"inputType"]},features:[de([{provide:pe,useExisting:r,multi:!0}])],ngContentSelectors:Bt,decls:9,vars:10,consts:[[1,"label"],["type","number",3,"ngModelChange","id","ngModel","disabled"],["value","value","label","label",3,"options","readonly","isClearable"],["type","text",3,"ngModelChange","ngModel"]],template:function(e,n){e&1&&(J($t),u(0,"div",0),D(1,0,["ngProjectAs","label",5,["label"]]),p(),u(2,"sh-form-field")(3,"input",1),B("ngModelChange",function(o){return $(n.timespan,o)||(n.timespan=o),o}),p(),D(4,1),D(5,2),p(),u(6,"sh-select",2)(7,"input",3),B("ngModelChange",function(o){return $(n.unit,o)||(n.unit=o),o}),p(),Y(8,Wt,1,2,"ng-template"),p()),e&2&&(_(2),oe("readonly",n.readonly()||void 0),_(),N("id",n.customId()),k("ngModel",n.timespan),N("disabled",n.readonly()),_(3),le("--miw",0),N("options",n.sizeOptions())("readonly",n.readonly())("isClearable",!1),_(),k("ngModel",n.unit))},dependencies:[Ue,Q,K,U,he,X,q],styles:['[_nghost-%COMP%]{display:grid;grid-template-areas:"label label" "input unit";grid-template-columns:3fr 1fr;gap:.5rem;align-items:flex-end}[_nghost-%COMP%] .label[_ngcontent-%COMP%]{grid-area:label;grid-column:1/-1}[_nghost-%COMP%] sh-form-field[_ngcontent-%COMP%]{grid-area:input}[_nghost-%COMP%] sh-select[_ngcontent-%COMP%]{grid-area:unit}'],changeDetection:0})};var jt=[[["label"]],[["","prefix",""]],[["","suffix",""]]],Ht=["label","[prefix]","[suffix]"];function Jt(r,t){if(r&1){let e=W();u(0,"button",7),V("click",function(){let i=v(e).$implicit,o=f();return F(o.updateUnit(i.value))}),A(1,1),p()}if(r&2){let e=t.$implicit;_(),Z(e.label),ee(1)}}var Ut=[{value:"s",label:$localize`Seconds`},{value:"m",label:$localize`Minutes`},{value:"h",label:$localize`Hours`}],Xt=[{value:"Y",label:$localize`Years`},{value:"M",label:$localize`Months`},{value:"W",label:$localize`Weeks`},{value:"D",label:$localize`Days`}],qt=["retry-delay","web-timeout","read-write-timeout","run-script-timeout","list-timeout","short-timeout"],rt=class r{customId=C();inputType=C();timespan=P(0);#e="D";unit=P(this.#e);unitLabel=y(()=>{let t=this.timeOptions(),e=t.findIndex(n=>n.value===this.unit());return t[e]?.label??this.unit()});isShortTime=y(()=>{let t=this.inputType();return t&&qt.includes(t.replace("--",""))});timeOptions=y(()=>this.isShortTime()?Ut:Xt);readonly=P(!1);onChange=()=>{};onTouched=()=>{};onChangeEffect=L(()=>{this.onChange(this.getValue())});inputTypeEffect=L(()=>{let t=this.timeOptions(),e=this.isShortTime()?"s":"D";this.#e=e,this.unit.set(e)});updateUnit(t){this.unit.set(t)}writeValue(t){let e=this.isShortTime();if(t){let n=e?/(\d+)([smh])/i:/^(\d+)([YMWD])$/i,i=t.match(n);i?(this.timespan.set(parseInt(i[1],10)),this.unit.set(i[2])):(this.timespan.set(0),this.unit.set(this.#e))}else this.timespan.set(0),this.unit.set(this.#e)}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.readonly.set(t)}getValue(){return`${this.timespan()}${this.unit()}`}static \u0275fac=function(e){return new(e||r)};static \u0275cmp=H({type:r,selectors:[["app-timespan"]],inputs:{customId:[1,"customId"],inputType:[1,"inputType"]},features:[de([{provide:pe,useExisting:r,multi:!0}])],ngContentSelectors:Ht,decls:11,vars:6,consts:()=>{let t;t=$localize`${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let e;return e=$localize`${"\uFFFD0\uFFFD"}:INTERPOLATION:`,[t,e,["type","number",3,"ngModelChange","id","ngModel","disabled"],[3,"openIndicator"],["shButton","","type","button",1,"trigger"],["menu",""],["shButton","","type","button",1,"small"],["shButton","","type","button",1,"small",3,"click"]]},template:function(e,n){e&1&&(J(jt),D(0,0,["ngProjectAs","label",5,["label"]]),u(1,"sh-form-field")(2,"input",2),B("ngModelChange",function(o){return $(n.timespan,o)||(n.timespan=o),o}),p(),D(3,1),D(4,2),p(),u(5,"sh-menu",3)(6,"button",4),A(7,0),p(),Se(8,5),re(9,Jt,2,1,"button",6,Ne),ye(),p()),e&2&&(_(),oe("readonly",n.readonly()||void 0),_(),N("id",n.customId()),k("ngModel",n.timespan),N("disabled",n.readonly()),_(3),N("openIndicator",!0),_(2),Z(n.unitLabel()),ee(7),_(2),se(n.timeOptions()))},dependencies:[He,Q,K,U,he,X,q,ge],styles:['[_nghost-%COMP%]{display:grid;grid-template-areas:"label label" "input unit";grid-template-columns:3fr 1fr;gap:.5rem;align-items:flex-end}[_nghost-%COMP%] .label[_ngcontent-%COMP%]{grid-area:label;grid-column:1/-1}[_nghost-%COMP%] sh-form-field[_ngcontent-%COMP%]{grid-area:input}[_nghost-%COMP%] sh-menu[_ngcontent-%COMP%]{grid-area:unit}[_nghost-%COMP%] sh-menu[_ngcontent-%COMP%] button.trigger[_ngcontent-%COMP%]{width:100%}'],changeDetection:0})};export{Te as a,zt as b,ot as c,rt as d};
1
+ import{a as Ke}from"./chunk-YCJYEQF7.js";import{a as Ye}from"./chunk-IMQUTGIK.js";import{a as Qe}from"./chunk-YYD2JU6T.js";import{A as ze,B as ge,H as Q,J as je,K as He,L as Je,P as Ue,W as Xe,a as pe,c as U,e as X,i as q,k as he,s as K,v as We,y as Ve,z as Ge}from"./chunk-VKQQDCUN.js";import{d as qe}from"./chunk-DSYNIXJF.js";import{aa as Be}from"./chunk-ZC23RK4J.js";import{$b as f,A as be,Ab as re,Ac as we,Bb as se,Bc as ue,Cb as N,Cc as Ie,Db as u,Eb as p,F as _e,Fb as ae,Fc as Le,Gc as Ae,Jb as Se,Jc as ke,Kb as ye,Lb as me,Mb as W,Qc as y,Sa as _,Tb as Oe,Ub as ve,Vb as A,Vc as $e,Wb as Z,Wc as C,Xb as ee,Xc as Ce,Zb as V,_ as ie,ac as J,bc as D,da as v,ea as F,gb as H,gc as Fe,hc as xe,ic as fe,jc as le,kc as z,l as Ee,lb as Y,nc as b,oc as Re,pa as P,pc as De,q as G,qc as ce,ra as L,sc as k,tc as $,uc as B,vb as oe,w as Pe,wb as x,xb as R,yb as Ne,zc as de}from"./chunk-TQTOIWBK.js";import{a as te,b as ne}from"./chunk-7CGTOI24.js";var lt=["treeContainer"],ct=["formRef"],dt=[[["label"]],[["label"]],[["input"]]],ut=["label","label","input"],pt=r=>({children:r,level:0}),nt=r=>({$implicit:r}),ht=(r,t)=>({children:r,level:t}),gt=()=>({maxWidth:"700px",width:"100%"}),_t=(r,t)=>t.id;function mt(r,t){if(r&1){let e=W();u(0,"sh-button-group",21),B("valueChange",function(i){v(e);let o=f();return $(o.pathDiscoveryMethod,i)||(o.pathDiscoveryMethod=i),F(i)}),u(1,"button",22),A(2,4),p(),u(3,"button",23),A(4,5),p()()}if(r&2){let e=f();k("value",e.pathDiscoveryMethod)}}function ft(r,t){r&1&&ae(0,"sh-progress-bar",14)}function Ct(r,t){r&1&&(u(0,"sh-icon",29),b(1,"caret-down"),p())}function Tt(r,t){r&1&&ae(0,"sh-icon",29)}function Mt(r,t){r&1&&(u(0,"sh-icon",29),b(1,"spinner"),p())}function Et(r,t){r&1&&(u(0,"sh-icon",29),b(1,"caret-right"),p())}function Pt(r,t){r&1&&(u(0,"sh-icon",26),b(1,"folder-open"),p())}function bt(r,t){r&1&&(u(0,"sh-icon",26),b(1,"folder-user"),p())}function Nt(r,t){r&1&&(u(0,"sh-icon",26),b(1,"file"),p())}function St(r,t){r&1&&(u(0,"sh-icon",26),b(1,"folder"),p())}function yt(r,t){if(r&1&&(x(0,Ct,2,0,"sh-icon",29)(1,Tt,1,0,"sh-icon",29)(2,Mt,2,0,"sh-icon",29)(3,Et,2,0,"sh-icon",29),x(4,Pt,2,0,"sh-icon",26)(5,bt,2,0,"sh-icon",26)(6,Nt,2,0,"sh-icon",26)(7,St,2,0,"sh-icon",26)),r&2){let e=f(2).$implicit,n=f(2);R(e.children.length?0:e.cls==="file"?1:e.id===n.isLoading()?2:3),_(4),R(e.children.length?4:e.id==="%HOME%"?5:e.cls==="file"?6:7)}}function Ot(r,t){r&1&&(u(0,"sh-icon",26),b(1,"desktop-tower"),p())}function vt(r,t){if(r&1&&(u(0,"span",28),b(1),Le(2,"bytes"),p()),r&2){let e=f(2).$implicit;_(),De("\xA0(",Ae(2,1,e.fileSize),")")}}function Ft(r,t){r&1&&me(0)}function xt(r,t){if(r&1&&Y(0,Ft,1,0,"ng-container",15),r&2){let e=f(2).$implicit,n=f().$implicit;f();let i=fe(7);N("ngTemplateOutlet",i)("ngTemplateOutletContext",ue(5,nt,Ie(2,ht,e.children,n.level+1)))}}function Rt(r,t){if(r&1){let e=W();u(0,"div",24,3),V("click",function(){v(e);let i=f().$implicit,o=f(2);return F(o.toggleNode(i.id,i))}),u(2,"div",25),x(3,yt,8,2)(4,Ot,2,0,"sh-icon",26),p(),u(5,"div",27),V("click",function(i){v(e);let o=f().$implicit,l=f(2);return F(l.toggleSelectedNode(i,o))}),u(6,"span"),b(7),p(),x(8,vt,3,3,"span",28),p()(),x(9,xt,1,7,"ng-container")}if(r&2){let e=f().$implicit,n=f().$implicit,i=f();z("accepted",e.accepted===!0)("active",e.evalState===i.TreeEvalEnum.Included)("indeterminate",e.isIndeterminate)("open",e.children.length)("usually-hidden",e.hidden)("root",n.level===0)("loading",i.isLoading()===e.id)("generated",e.isGenerated)("search-match",e.isSearchMatch),_(2),z("file",e.cls==="file"),_(),R(e.id!=="/"?3:4),_(4),Re(e.text),_(),R(e.cls=="file"&&e.fileSize!=null?8:-1),_(),R(e.children.length>0?9:-1)}}function Dt(r,t){if(r&1&&x(0,Rt,10,24),r&2){let e=t.$implicit,n=f(2);R(e.hidden&&n._showHiddenNodes()||!e.hidden?0:-1)}}function wt(r,t){if(r&1&&(u(0,"sh-list"),re(1,Dt,1,1,null,null,_t),p()),r&2){let e=t.$implicit;le("padding-left",e.level*.25,"rem"),_(),se(e.children)}}function It(r,t){r&1&&me(0)}function Lt(r,t){if(r&1){let e=W();u(0,"sh-toggle",30),B("checkedChange",function(i){v(e);let o=f();return $(o._showHiddenNodes,i)||(o._showHiddenNodes=i),F(i)}),A(1,6),p()}if(r&2){let e=f();k("checked",e._showHiddenNodes),_(),Z(e.showFiles()?"files":"folders"),ee(1)}}function At(r,t){if(r&1){let e=W();u(0,"button",31),V("click",function(){v(e);let i=f();return F(i.openCreateFolderDialog())}),A(1,7),p()}if(r&2){let e=f();N("disabled",!e.isCurrentPathFolder())}}function kt(r,t){if(r&1){let e=W();u(0,"sh-dialog",32),B("isOpenChange",function(i){v(e);let o=f();return $(o.createFolderDialogOpen,i)||(o.createFolderDialogOpen=i),F(i)}),u(1,"header",33)(2,"h2"),A(3,8),p()(),u(4,"div",34)(5,"div",35)(6,"p"),A(7,9),p(),u(8,"div",36)(9,"pre"),b(10),p()()(),u(11,"sh-form-field")(12,"textarea",37),B("ngModelChange",function(i){v(e);let o=f();return $(o.createFolderPath,i)||(o.createFolderPath=i),F(i)}),p()()(),u(13,"footer",38)(14,"button",39),V("click",function(){v(e);let i=f();return F(i.closeCreateFolderDialog(!1))}),b(15,"Cancel"),p(),u(16,"button",40),V("click",function(){v(e);let i=f();return F(i.closeCreateFolderDialog(!0))}),Oe(17,10),ae(18,"sh-icon"),ve(),p()()()}if(r&2){let e,n=f();k("isOpen",n.createFolderDialogOpen),N("options",we(6,gt)),_(10),ce("",n.currentPathResolvedShorthands(),"",n.createFolderPath()?"/"+n.createFolderPath():""),_(2),k("ngModel",n.createFolderPath),_(4),N("disabled",!((e=n.createFolderPath())!=null&&e.length))}}var it=(o=>(o[o.ExcludedByParent=-2]="ExcludedByParent",o[o.Excluded=-1]="Excluded",o[o.None=0]="None",o[o.Included=1]="Included",o[o.IncludedByParent=2]="IncludedByParent",o))(it||{}),E="/",Te=class r{#e=ie(qe);#i=ie(Qe);#p=ie(Ge);multiSelect=C(!1);disabled=C(!1);showFiles=C(!1);selectFiles=C(!1);accepts=C(null);startingPath=C(null);rootPaths=C([]);initialNodes=C([]);backupSettings=C(null);pathRefreshTrigger=C(!1);showHiddenNodes=C(!1);enableCreateFolder=C(!1);hideShortcuts=C(!1);customRemoteMode=C(null);backupId=C("");sourcePrefix=C("");destinationUrl=C("");loadExtendedData=C(!0);hasExtendedData=$e();searchMode=C(!1);searchResults=C([]);_showHiddenNodes=P(!1);createFolderDialogOpen=P(!1);createFolderPath=P(null);treeContainerRef=Ce("treeContainer");formRef=Ce("formRef");pathDiscoveryMethod=P("browse");isLoading=P(null);currentPath=P("");currentPathResolvedShorthands=y(()=>this.#i.resolveShorthandPath(this.currentPath()));#r=P(null);treeSearchQuery=P("");treeNodes=P([]);pathDelimiter=y(()=>this.#i.systemInfo()?.DirectorySeparator??"");filterGroups=this.#i.filterGroups();isByBackupSettings=y(()=>{let t=this.backupSettings();return!(t===void 0||t?.id===void 0||t?.time===void 0)});searchableTreeNodes=y(()=>{let t=this.treeSearchQuery();return t?this.treeNodes().filter(e=>e.text?.toLowerCase().includes(t.toLowerCase())):this.treeNodes()});TreeEvalEnum=it;searchResultTreeStructure=y(()=>{let t=this.searchResults();if(t.length===0)return[];let e=this.currentPath().split("\0").filter(a=>a!==""&&a!==E),n=this.showHiddenNodes(),i=new Map;for(let a of t){let c=a.Path??"",h=this.#n(c),O=c.split(h).filter(S=>S!==""),T="";for(let S=0;S<O.length;S++){let w=O[S],I=S===O.length-1,j=!I||this.#t(c),st=T||E,Me=T?T.endsWith(h)?T.slice(0,-h.length):T:"";if(T=Me?`${Me}${h}${w}`:`${h}${w}`,j&&!T.endsWith(h)&&(T+=h),!i.has(T))i.set(T,{part:w,parentPath:st,isFolder:j,match:I?a:null});else if(I){let at=i.get(T);at.match=a}}}let o=new Map;for(let[a,c]of i)o.has(c.parentPath)||o.set(c.parentPath,[]),o.get(c.parentPath).push(a);let l=new Set,g=new Map;for(let[a,c]of i){if(!c.isFolder){l.add(a);continue}let h=o.get(c.parentPath)||[];if(h.length===1&&h[0]===a&&c.parentPath!==E)continue;l.add(a);let T=c.part,S=a;for(;;){let w=o.get(S)||[];if(w.length!==1)break;let I=w[0],j=i.get(I);if(!j||!j.isFolder)break;T+="/"+j.part,S=I}S!==a&&g.set(a,T)}l.add(E);let s=[],d=new Map,M=Array.from(l).filter(a=>a!==E).sort((a,c)=>a.split("/").length-c.split("/").length||a.localeCompare(c));for(let a of M){let c=i.get(a);if(!c)continue;let h=c.parentPath;for(;h!==E&&!l.has(h);)h=i.get(h)?.parentPath||E;if(d.has(a))continue;let O=this.#a(g.get(a),c.match?.Metadata)??c.part,T=c.match===null,S=c.match!==null&&!c.isFolder&&n?0:this.#s(e,a,c.isFolder?"folder":"file",null),w={id:a,resolvedpath:a,text:O,parentPath:h,children:[],evalState:S,isIndeterminate:this.isIndeterminate(e,a),cls:c.isFolder?"folder":"file",isSearchMatch:c.match!==null,isGenerated:T,hasChildrenInSearch:(o.get(a)?.length||0)>0,iconCls:null,check:!1,leaf:!c.isFolder,hidden:!1,systemFile:!1,temporary:!1,symlink:!1,fileSize:c.match?.Size??0};if(d.set(a,w),h===E)s.push(w);else{let I=d.get(h);I&&I.children.push(w)}}let m=a=>{a.sort((c,h)=>c.cls==="folder"&&h.cls!=="folder"?-1:c.cls!=="folder"&&h.cls==="folder"?1:(c.text??"").localeCompare(h.text??"")),a.forEach(c=>m(c.children))};return m(s),s});treeStructure=y(()=>{if(this.searchMode())return this.searchResultTreeStructure();let t=this.showHiddenNodes(),e=this.currentPath().split("\0").filter(s=>s!==""&&s!==E),n=structuredClone(e);for(let s=0;s<n.length;s++){let M=n[s].slice(1);if(M.startsWith("{")&&M.endsWith("}")){let m=M.slice(1,-1),a=this.filterGroups?.FilterGroups[m];if(a&&a.length){let c=a.map(h=>`-${h}`);n.splice(s,1,...c)}}}let i=this.searchableTreeNodes(),o=this.rootPaths(),l=this.accepts(),g=[];return o.length>0?g=o.map(s=>{let d=this.#s(n,s,"folder",null);return{id:s,resolvedpath:s,text:s,parentPath:"",children:[],evalState:d,isIndeterminate:!1,cls:this.#t(s)?"folder":"file"}}):g=[{id:E,resolvedpath:E,text:$localize`Computer`,parentPath:"",children:[],evalState:0,isIndeterminate:!1,cls:"folder"}],g.map(s=>{let d=new Map;if(!s.id)return;let M=s.id;l&&(s.accepted=!0),d.set(M,s);let m=o.length>0?i.filter(a=>a.parentPath.startsWith(M)):i;for(let a of m){if(!a.id)continue;let c=a.id;if(!a.cls||d.has(c))continue;let h=d.get(a.parentPath),O=a.hidden===!0&&t?0:this.#s(n,c,a.cls,h),T=ne(te({},a),{isIndeterminate:this.isIndeterminate(n,c),evalState:O,children:[]});l&&(T.accepted=this.matchAccepts(l,T)),d.set(c,T),T.id?.startsWith("%")&&T.id?.endsWith("%")&&d.set(this.#l(c),T),h&&h.children.push(T)}return s}),g});#l(t){if(!t)return E;let e=this.#n(t);return t.endsWith("/")||t.endsWith("\\")||t===E?t:t+e}#s(t,e,n,i){if(i&&i.evalState===-1)return-2;let o=0,l=t.filter(d=>!d.startsWith("-")&&!d.startsWith("+")),g=t.filter(d=>d.startsWith("-")||d.startsWith("+")),s=this.multiSelect();if(l.length===0)return o;for(let d=0;d<l.length;d++){let M=l[d];if(e===M){o=1;break}if(!s||!this.#t(M))continue;if(e?.startsWith(M)){o=1;break}}if(g.length===0)return o;for(let d=0;d<g.length;d++){let M=g[d],m=M.slice(1),a=M.startsWith("-")?-1:1;if(this.#t(m)){if(n!=="folder")continue;if(e===m){o=a;break}}if(m.startsWith("*")&&(m.endsWith("*\\")||m.endsWith("*/"))){if(n!=="folder")continue;let h=m.slice(1,-2);if(h==="")break;if(e?.includes(h+"\\")||e?.includes(h+"/")){o=a;break}}if(m.startsWith("[.*")&&(m.endsWith("[^\\/]*]")||m.endsWith("[^\\\\]*]"))){if(n!=="file")continue;let h=m.slice(3,-7);if(new RegExp(h).test(e)){o=a;break}}if(m.startsWith("[")&&m.endsWith("]")){let h=m.slice(1,-1),O=this.translateCSharpRegex(h);if(new RegExp(`${O}`).test(e)){o=a;break}}if(m.startsWith("*.")){if(n!=="file"||m.replace("*.","").length===0)continue;if(this.#c(e,m,!0)){o=a;break}}if(m==="")continue;if(m===e){o=a;break}if(this.#c(e,m,!0)){o=a;break}}return o}translateCSharpRegex(t){let e=t;e=e.replace(/^@/,"");let n=/\(\?<(?<name>\w+)>(?<pattern>[^)]+)\)/g;return e=e.replace(n,(i,o,l)=>`(${l})`),e=e.replace(/\\/g,"\\\\"),e}isIndeterminate(t,e){return t.filter(n=>!n.startsWith("-")&&this.#t(n)).some(n=>n.startsWith(e))}isCurrentPathFolder(){let t=this.currentPath();return t?t.endsWith("/")||t.endsWith("\\")||t.startsWith("%")&&t.endsWith("%")&&!t.includes("/")&&!t.includes("\\"):!1}#c(t,e,n=!1){let i=e.replace(/\*/g,".*").replace(/\?/g,".").replace(/\[!([^\]]+)\]/g,"[^$1]");return new RegExp(`${i}${n?"$":""}`).test(t)}#n(t){return t?t.includes("/")?"/":t.includes("\\")?"\\":this.pathDelimiter():this.pathDelimiter()}showHiddenNodesEffect=L(()=>this._showHiddenNodes.set(this.showHiddenNodes()));pathDiscoveryMethodEffect=L(()=>{let t=this.pathDiscoveryMethod(),e=this.#r();if(t==="browse"&&e){let n=e.value;if(n==null||n==="")return;this.currentPath.set(n)}});matchAccepts(t,e){if(!t||e.cls==="folder"||e.id===E)return!0;let n=t.split(",");if(n.length===0)return!0;let i="."+e.id.slice(e.id.indexOf("."));return i?n.some(o=>i.endsWith(o)):!1}currentPathEffect=L(()=>{let t=this.#r();t&&(t.value=this.currentPath(),t.dispatchEvent(new Event("input")))});inputValueChangeAbortController=null;inputRefEffect=L(()=>{let t=this.formRef()?.nativeElement?.querySelector("input");t&&(this.#h(t),this.inputValueChangeAbortController&&this.inputValueChangeAbortController.abort(),this.inputValueChangeAbortController=new AbortController,t.addEventListener("inputValueChanged",e=>{this.currentPath.set(e.detail.value)},{signal:this.inputValueChangeAbortController.signal}),this.#r.set(t),t.autocomplete="off")});ngOnInit(){let t=this.startingPath();if(t)this.currentPath.set(t),this.#T(t);else{let e=this.rootPaths(),n=this.initialNodes();e&&e.length>0?(n&&n.length>0&&this.treeNodes.set(n.map(i=>({id:i.id,leaf:i.leaf,cls:i.cls,text:this.#a(i.text,i?.Metadata),iconCls:i.iconCls,fileSize:i.fileSize,resolvedpath:i.resolvedpath,parentPath:this.getParentPath(i.id??"")}))),this.#o(null,e[0])):this.#o(null,E)}}getParentPath(t){let e=this.#n(t),n=t.split(e);return n.length<=1?E:(n.pop(),n.length!==0&&n.pop(),n.join(e)+e)}toggleSelectedNode(t,e){if(e.id===E||(t.stopPropagation(),this.searchMode()&&!e.isSearchMatch)||e.evalState===-2)return;if(this.selectFiles()&&e.cls==="folder"){this.toggleNode(e.id,e);return}if(this.accepts()&&!e.accepted)return;let i=this.currentPath().split("\0").filter(s=>s!==""&&s!==E),l=this.isChildOfSelected(e)?`-${e.id}`:e.id,g=this.#t(e.id);if(this.multiSelect())if(i.includes(e.id))this.currentPath.set(i.filter(s=>s!==e.id&&!(g&&s.startsWith(l))).join("\0"));else if(i.some(s=>s==l))this.currentPath.set(i.filter(s=>s!==l).join("\0"));else{let s=g?i.filter(d=>!d.startsWith(e.id)):i;this.currentPath.set([...s,l].join("\0"))}else i.includes(e.id)?this.currentPath.set(i.filter(s=>s!==e.id).join("\0")):this.currentPath.set(e.id)}isChildOfSelected(t){return this.currentPath().split("\0").filter(n=>n!==""&&n!==E&&this.#t(n)).some(n=>t.id?.startsWith(n)||`-${t.id}`.startsWith(n))}toggleNode(t,e=null){e?.cls==="folder"&&(e?.children.length?this.treeNodes.update(n=>n.filter(i=>!i.id?.startsWith(e.id)||i.id===e.id)):this.#o(e,t))}openCreateFolderDialog(){return this.createFolderPath.set(null),this.createFolderDialogOpen.set(!0),!1}closeCreateFolderDialog(t){if(t&&this.createFolderPath()?.length&&this.isCurrentPathFolder()){let e=this.createFolderPath()?.trim();if(e){let n=this.currentPath(),i=this.currentPathResolvedShorthands(),o=this.#l(e),l=`${i}/${o}`;this.#e.postApiV1RemoteoperationCreate({requestBody:{path:"file://"+l}}).subscribe({next:()=>{this.currentPath.set(l),this.#o(null,n),setTimeout(()=>{this.#d()},500),this.createFolderDialogOpen.set(!1)},error:g=>{let s=g?.message?.match(/user-information\s*:\s*(.*?)(?:\s*,|$)/i),d=s?s[1]:g?.message||$localize`An error occurred while trying to create the folder.`;this.#p.open(Ye,{data:{title:$localize`Cannot create folder`,message:d,confirmText:$localize`OK`,cancelText:void 0}})}})}}else this.createFolderDialogOpen.set(!1);return!1}#d(){setTimeout(()=>{let e=this.treeContainerRef()?.nativeElement?.querySelector(".active");e&&e.scrollIntoView({behavior:"smooth",block:"center"})},100)}#h(t){return Object.defineProperty(t,"value",{configurable:!0,get(){return Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value").get.call(this)},set(e){return Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value").set.call(this,e),this.dispatchEvent(new CustomEvent("inputValueChanged",{bubbles:!0,cancelable:!0,detail:{value:e}})),e}}),t}#g(t){return this.#e.postApiV1Filesystem({showHidden:!0,requestBody:{path:t},onlyFolders:!this.showFiles()})}#_(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"office365",requestBody:{"backup-id":this.backupId()??"","source-prefix":this.sourcePrefix()??"",operation:"ListDestinationRestoreTargets",url:this.destinationUrl()??"",path:t??"/"}}).pipe(G(e=>{let n=e.Result;return Object.keys(n).map(i=>({Path:i,Metadata:JSON.parse(n[i])}))}))}#m(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"googleworkspace",requestBody:{"backup-id":this.backupId()??"","source-prefix":this.sourcePrefix()??"",operation:"ListDestinationRestoreTargets",url:this.destinationUrl()??"",path:t??"/"}}).pipe(G(e=>{let n=e.Result;return Object.keys(n).map(i=>({Path:i,Metadata:JSON.parse(n[i])}))}))}#f(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"diskimage",requestBody:{operation:"ListDestinationRestoreTargets",path:t??"/"}}).pipe(G(e=>{let n=e.Result;return Object.keys(n).map(i=>({Path:i,Metadata:JSON.parse(n[i])}))}))}#C(t){let e=this.backupSettings();if(this.#i.hasV2ListOperations())return this.#e.postApiV2BackupListFolder({requestBody:{BackupId:e.id,Time:e.time,Paths:t?[t]:null,PageSize:0,Page:0,ReturnExtended:this.customRemoteMode()!==null||this.loadExtendedData()}}).pipe(G(n=>n.Data??[]));{let n={id:e.id+"",prefixOnly:!1,folderContents:!0,time:e.time,filter:t?"@"+t:void 0};return this.#e.getApiV1BackupByIdFiles(n).pipe(G(i=>i.Files??[]))}}#u(t){return this.customRemoteMode()==="o365"?this.#_(t):this.customRemoteMode()==="gsuite"?this.#m(t):this.customRemoteMode()==="diskimage"?this.#f(t):this.isByBackupSettings()?this.#C(t):this.#g(t)}#T(t){let n=t.split("\0").filter(l=>!l.startsWith("-")&&!l.startsWith("+")&&!l.startsWith("@")).filter(Boolean).map(l=>{let g=this.#n(l),s=l.split(g);return s.at(-1)===""&&s.pop(),{split:s,sep:g}}),i=[E];n.forEach(({split:l,sep:g})=>{l.forEach((s,d)=>{let M=l.slice(0,d+1).join(g)+g;M===""||M===g||i.includes(M)||i.push(M)})});let o=i.map(l=>(this.isLoading.set(l),this.#u(l).pipe(G(g=>({status:"success",value:g,url:l})),be(g=>Ee({status:"error",value:g,url:l})))));Pe(o).pipe(_e(()=>this.isLoading.set(null))).subscribe({next:l=>{let g=l.filter(d=>d.status==="success"),s=l.filter(d=>d.status==="error");this.treeNodes.update(d=>{let M=g.flatMap(a=>Array.isArray(a.value)?a.value.map(c=>ne(te({},c),{parentPath:a.url})):[]),m=[...new Map([...d,...M].map(a=>[a.id,a])).values()];return this.#d(),this.hideShortcuts()?m.filter(a=>!a.id.startsWith("%")):m})}})}#a(t,e){if(e){let n=e["o365:Name"]||e["o365:DisplayName"]||e["gsuite:Name"]||e["gsuite:DisplayName"]||e["diskimage:Name"];if(n)return n}return t}#M(t){t&&t.ExtType&&t.ExtType.length>0&&this.hasExtendedData.emit(t.ExtType)}#t(t){return t.startsWith("%")&&t.endsWith("%")&&!t.includes("/")&&!t.includes("\\")||t.endsWith("/")||t.endsWith("\\")}#o(t=null,e=E){this.isLoading.set(e),this.#u(e).pipe(_e(()=>this.isLoading.set(null))).subscribe({next:n=>{let i=this.isByBackupSettings()||this.customRemoteMode()!==null?n.map(o=>{this.#M(o.Metadata);let l=this.#n(o.Path);return{text:this.#a(o.Path.split(l).filter(s=>s!=="").pop(),o.Metadata),id:o.Path,cls:this.#t(o.Path)?"folder":"file",leaf:t!==null,resolvedpath:o.Path,hidden:!1,fileSize:o.Size}}):n;this.treeNodes.update(o=>{let l=i.map(s=>{let d=this.#t(s.id)?"folder":"file";return ne(te({},s),{cls:d,parentPath:e})}),g=[...new Map([...o,...l].map(s=>[s.id,s])).values()];return this.hideShortcuts()?g.filter(s=>!s.id.startsWith("%")):g})}})}static \u0275fac=function(e){return new(e||r)};static \u0275cmp=H({type:r,selectors:[["app-file-tree"]],viewQuery:function(e,n){e&1&&Fe(n.treeContainerRef,lt,5)(n.formRef,ct,5),e&2&&xe(2)},hostVars:2,hostBindings:function(e,n){e&2&&z("disabled",n.disabled())},inputs:{multiSelect:[1,"multiSelect"],disabled:[1,"disabled"],showFiles:[1,"showFiles"],selectFiles:[1,"selectFiles"],accepts:[1,"accepts"],startingPath:[1,"startingPath"],rootPaths:[1,"rootPaths"],initialNodes:[1,"initialNodes"],backupSettings:[1,"backupSettings"],pathRefreshTrigger:[1,"pathRefreshTrigger"],showHiddenNodes:[1,"showHiddenNodes"],enableCreateFolder:[1,"enableCreateFolder"],hideShortcuts:[1,"hideShortcuts"],customRemoteMode:[1,"customRemoteMode"],backupId:[1,"backupId"],sourcePrefix:[1,"sourcePrefix"],destinationUrl:[1,"destinationUrl"],loadExtendedData:[1,"loadExtendedData"],searchMode:[1,"searchMode"],searchResults:[1,"searchResults"]},outputs:{hasExtendedData:"hasExtendedData"},ngContentSelectors:ut,decls:18,vars:17,consts:()=>{let t;t=$localize`Browse path`;let e;e=$localize`Manually type path`;let n;n=$localize` Show hidden ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let i;i=$localize` Create folder `;let o;o=$localize`Enter new folder path`;let l;l=$localize`Will be created as:`;let g;return g=$localize` Create folder ${"\uFFFD#18\uFFFD"}:START_TAG_SH_ICON:folder-plus${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SH_ICON:`,[["treeContainer",""],["recursiveTree",""],["formRef",""],["treeNode",""],t,e,n,i,o,l,g,[1,"type-b","small",3,"value"],[1,"section"],[1,"browse-files"],[1,"indeterminate","primary"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"footer"],[1,"primary","raised","browse-files-toggle",3,"checked"],["shButton","","type","button",1,"small","create-folder",3,"disabled"],[1,"form-field"],[3,"isOpen","options"],[1,"type-b","small",3,"valueChange","value"],["type","button","value","browse"],["type","button","value","path"],["action","",3,"click"],[1,"icon"],[1,"primary"],[1,"text",3,"click"],[1,"size"],[1,"small"],[1,"primary","raised","browse-files-toggle",3,"checkedChange","checked"],["shButton","","type","button",1,"small","create-folder",3,"click","disabled"],[3,"isOpenChange","isOpen","options"],["header",""],["content",""],[1,"wrap-box"],[1,"box"],["id","targetUrl","autocomplete","off",3,"ngModelChange","ngModel"],["footer",""],["shButton","","type","button",3,"click"],["shButton","",1,"raised","primary",3,"click","disabled"]]},template:function(e,n){if(e&1&&(J(dt),x(0,mt,5,1,"sh-button-group",11),u(1,"div",12),D(2,0,["ngProjectAs","label",5,["label"]]),u(3,"div",13,0),x(5,ft,1,0,"sh-progress-bar",14),Y(6,wt,3,2,"ng-template",null,1,ke)(8,It,1,0,"ng-container",15),p(),u(9,"div",16),x(10,Lt,2,2,"sh-toggle",17),x(11,At,2,1,"button",18),p()(),u(12,"div",19,2)(14,"sh-form-field"),D(15,1,["ngProjectAs","label",5,["label"]]),D(16,2,["ngProjectAs","input",5,["input"]]),p()(),x(17,kt,19,7,"sh-dialog",20)),e&2){let i=fe(7);R(!n.multiSelect()&&n.customRemoteMode()===null&&!n.searchMode()?0:-1),_(),z("hidden",!n.searchMode()&&n.pathDiscoveryMethod()!=="browse"),_(2),z("visualize-accepted",n.accepts()),_(2),R(n.isLoading()!=null?5:-1),_(3),N("ngTemplateOutlet",i)("ngTemplateOutletContext",ue(15,nt,ue(13,pt,n.treeStructure()))),_(2),R(!n.accepts()&&!n.isByBackupSettings()&&n.customRemoteMode()===null&&!n.searchMode()?10:-1),_(),R(n.enableCreateFolder()&&n.customRemoteMode()===null&&!n.searchMode()?11:-1),_(),z("hidden",n.searchMode()||n.pathDiscoveryMethod()!=="path"),_(5),R(n.createFolderDialogOpen()?17:-1)}},dependencies:[ge,ze,Xe,We,Q,je,Je,Ve,Be,K,U,X,q,Ke],styles:['[_nghost-%COMP%]{display:flex;flex-direction:column;gap:1rem}.disabled[_nghost-%COMP%]{opacity:.5;-webkit-user-select:none;user-select:none;pointer-events:none;position:relative}.disabled[_nghost-%COMP%]:before{content:"";position:absolute;inset:0;background:transparent}.fill[_nghost-%COMP%]{height:auto;overflow:hidden;flex:1 0}.fill[_nghost-%COMP%] .section[_ngcontent-%COMP%]{height:auto;overflow:hidden;flex:1 0;display:grid;grid-template-columns:1fr auto;grid-template-rows:auto 1fr;grid-template-areas:"label toggle" "tree tree"}.fill[_nghost-%COMP%] .browse-files[_ngcontent-%COMP%]{resize:none;height:initial;grid-area:tree}.fill[_nghost-%COMP%] label[_ngcontent-%COMP%]{grid-area:label}.fill[_nghost-%COMP%] sh-toggle[_ngcontent-%COMP%]{grid-area:toggle;flex-direction:row-reverse}.section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.form-field.hidden[_ngcontent-%COMP%]{display:none}.browse-files[_ngcontent-%COMP%]{display:flex;gap:.5rem;padding:.5rem 1rem;height:12.5rem;min-height:6.25rem;border:1px solid var(--base-4);border-radius:var(--shape-3);overflow:auto;resize:vertical;background:var(--base-1);position:relative}.browse-files[_ngcontent-%COMP%] sh-progress-bar[_ngcontent-%COMP%]{position:absolute;top:0;left:0;right:0}.browse-files.visualize-accepted[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]:not(.accepted){opacity:.5}.browse-files.visualize-accepted[_ngcontent-%COMP%] [action].accepted[_ngcontent-%COMP%]{opacity:1}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%]{--list-active-bg: var(--base-3);gap:.125rem;padding:0;height:min-content;min-width:min-content}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]{padding:0;gap:0;border:1px solid transparent}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].active[_ngcontent-%COMP%]{border-color:transparent;--list-active-bg: var(--primary-2)}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].indeterminate[_ngcontent-%COMP%]{border-color:var(--primary-4)}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].usually-hidden[_ngcontent-%COMP%]{opacity:.6}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .size[_ngcontent-%COMP%]{opacity:.6}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].generated[_ngcontent-%COMP%]{opacity:.6}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].generated[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{color:var(--base-7)}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].root[_ngcontent-%COMP%]{gap:.25rem}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].root[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]:has(sh-icon:nth-child(2)){width:3rem}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].root[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{width:1.5rem}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].loading[_ngcontent-%COMP%]{opacity:.7}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;height:100%;width:max-content;display:flex;align-items:center}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{width:3rem;gap:.25rem;height:1.5rem;display:flex;align-items:center;justify-content:center;cursor:pointer}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .icon.file[_ngcontent-%COMP%]{width:3rem;padding:0 .25rem}.browse-files-toggle[_ngcontent-%COMP%]{color:var(--base-9)}.hidden[_ngcontent-%COMP%]{display:none}.footer[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-between;align-items:center}.box[_ngcontent-%COMP%]{border:1px solid var(--base-4);border-radius:var(--shape-3);padding:.5rem;background:var(--base-2)}.box[_ngcontent-%COMP%] pre[_ngcontent-%COMP%]{margin:0}.wrap-box[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;margin-bottom:1rem}'],changeDetection:0})};var $t=[[["label"]],[["","prefix",""]],[["","suffix",""]]],Bt=["label","[prefix]","[suffix]"];function Wt(r,t){if(r&1&&b(0),r&2){let e=t.$implicit,n=f();ce("",e.label,"",n.hasPerSecond()?"/s":"")}}var Vt=["throttle-upload","throttle-download"],Gt=[{value:"B",label:"Bytes"},{value:"KB",label:"KB"},{value:"MB",label:"MB"},{value:"GB",label:"GB"},{value:"TB",label:"TB"},{value:"PB",label:"PB"}],zt=r=>{if(!r||typeof r!="string"||r.length===0)return{size:0,unit:"MB"};let t=r.match(/^(\d+)(bytes|kb|mb|gb|tb|pb|b|kib|mib|gib|tib|pib)$/i);return t&&(t[2].toUpperCase()==="B"||t[2].toUpperCase()==="BYTES")?{size:1,unit:"KB"}:{size:t?parseInt(t[1],10):0,unit:t?t[2].toUpperCase():"MB"}},ot=class r{customId=C();inputType=C();timespan=P(0);unit=P("MB");sizeOptions=P(Gt);readonly=P(!1);hasPerSecond=y(()=>{let t=this.inputType();return t&&Vt.includes(t)});onChange=()=>{};onTouched=()=>{};onChangeEffect=L(()=>{this.onChange(this.getValue())});writeValue(t){if(t){let e=zt(t);e?queueMicrotask(()=>{this.timespan.set(e.size),this.unit.set(e.unit)}):(this.timespan.set(0),this.unit.set("MB"))}else this.timespan.set(0),this.unit.set("MB")}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.readonly.set(t)}getValue(){return`${this.timespan()}${this.unit()}`}static \u0275fac=function(e){return new(e||r)};static \u0275cmp=H({type:r,selectors:[["app-size"]],inputs:{customId:[1,"customId"],inputType:[1,"inputType"]},features:[de([{provide:pe,useExisting:r,multi:!0}])],ngContentSelectors:Bt,decls:9,vars:10,consts:[[1,"label"],["type","number",3,"ngModelChange","id","ngModel","disabled"],["value","value","label","label",3,"options","readonly","isClearable"],["type","text",3,"ngModelChange","ngModel"]],template:function(e,n){e&1&&(J($t),u(0,"div",0),D(1,0,["ngProjectAs","label",5,["label"]]),p(),u(2,"sh-form-field")(3,"input",1),B("ngModelChange",function(o){return $(n.timespan,o)||(n.timespan=o),o}),p(),D(4,1),D(5,2),p(),u(6,"sh-select",2)(7,"input",3),B("ngModelChange",function(o){return $(n.unit,o)||(n.unit=o),o}),p(),Y(8,Wt,1,2,"ng-template"),p()),e&2&&(_(2),oe("readonly",n.readonly()||void 0),_(),N("id",n.customId()),k("ngModel",n.timespan),N("disabled",n.readonly()),_(3),le("--miw",0),N("options",n.sizeOptions())("readonly",n.readonly())("isClearable",!1),_(),k("ngModel",n.unit))},dependencies:[Ue,Q,K,U,he,X,q],styles:['[_nghost-%COMP%]{display:grid;grid-template-areas:"label label" "input unit";grid-template-columns:3fr 1fr;gap:.5rem;align-items:flex-end}[_nghost-%COMP%] .label[_ngcontent-%COMP%]{grid-area:label;grid-column:1/-1}[_nghost-%COMP%] sh-form-field[_ngcontent-%COMP%]{grid-area:input}[_nghost-%COMP%] sh-select[_ngcontent-%COMP%]{grid-area:unit}'],changeDetection:0})};var jt=[[["label"]],[["","prefix",""]],[["","suffix",""]]],Ht=["label","[prefix]","[suffix]"];function Jt(r,t){if(r&1){let e=W();u(0,"button",7),V("click",function(){let i=v(e).$implicit,o=f();return F(o.updateUnit(i.value))}),A(1,1),p()}if(r&2){let e=t.$implicit;_(),Z(e.label),ee(1)}}var Ut=[{value:"s",label:$localize`Seconds`},{value:"m",label:$localize`Minutes`},{value:"h",label:$localize`Hours`}],Xt=[{value:"Y",label:$localize`Years`},{value:"M",label:$localize`Months`},{value:"W",label:$localize`Weeks`},{value:"D",label:$localize`Days`}],qt=["retry-delay","web-timeout","read-write-timeout","run-script-timeout","list-timeout","short-timeout"],rt=class r{customId=C();inputType=C();timespan=P(0);#e="D";unit=P(this.#e);unitLabel=y(()=>{let t=this.timeOptions(),e=t.findIndex(n=>n.value===this.unit());return t[e]?.label??this.unit()});isShortTime=y(()=>{let t=this.inputType();return t&&qt.includes(t.replace("--",""))});timeOptions=y(()=>this.isShortTime()?Ut:Xt);readonly=P(!1);onChange=()=>{};onTouched=()=>{};onChangeEffect=L(()=>{this.onChange(this.getValue())});inputTypeEffect=L(()=>{let t=this.timeOptions(),e=this.isShortTime()?"s":"D";this.#e=e,this.unit.set(e)});updateUnit(t){this.unit.set(t)}writeValue(t){let e=this.isShortTime();if(t){let n=e?/(\d+)([smh])/i:/^(\d+)([YMWD])$/i,i=t.match(n);i?(this.timespan.set(parseInt(i[1],10)),this.unit.set(i[2])):(this.timespan.set(0),this.unit.set(this.#e))}else this.timespan.set(0),this.unit.set(this.#e)}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.readonly.set(t)}getValue(){return`${this.timespan()}${this.unit()}`}static \u0275fac=function(e){return new(e||r)};static \u0275cmp=H({type:r,selectors:[["app-timespan"]],inputs:{customId:[1,"customId"],inputType:[1,"inputType"]},features:[de([{provide:pe,useExisting:r,multi:!0}])],ngContentSelectors:Ht,decls:11,vars:6,consts:()=>{let t;t=$localize`${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let e;return e=$localize`${"\uFFFD0\uFFFD"}:INTERPOLATION:`,[t,e,["type","number",3,"ngModelChange","id","ngModel","disabled"],[3,"openIndicator"],["shButton","","type","button",1,"trigger"],["menu",""],["shButton","","type","button",1,"small"],["shButton","","type","button",1,"small",3,"click"]]},template:function(e,n){e&1&&(J(jt),D(0,0,["ngProjectAs","label",5,["label"]]),u(1,"sh-form-field")(2,"input",2),B("ngModelChange",function(o){return $(n.timespan,o)||(n.timespan=o),o}),p(),D(3,1),D(4,2),p(),u(5,"sh-menu",3)(6,"button",4),A(7,0),p(),Se(8,5),re(9,Jt,2,1,"button",6,Ne),ye(),p()),e&2&&(_(),oe("readonly",n.readonly()||void 0),_(),N("id",n.customId()),k("ngModel",n.timespan),N("disabled",n.readonly()),_(3),N("openIndicator",!0),_(2),Z(n.unitLabel()),ee(7),_(2),se(n.timeOptions()))},dependencies:[He,Q,K,U,he,X,q,ge],styles:['[_nghost-%COMP%]{display:grid;grid-template-areas:"label label" "input unit";grid-template-columns:3fr 1fr;gap:.5rem;align-items:flex-end}[_nghost-%COMP%] .label[_ngcontent-%COMP%]{grid-area:label;grid-column:1/-1}[_nghost-%COMP%] sh-form-field[_ngcontent-%COMP%]{grid-area:input}[_nghost-%COMP%] sh-menu[_ngcontent-%COMP%]{grid-area:unit}[_nghost-%COMP%] sh-menu[_ngcontent-%COMP%] button.trigger[_ngcontent-%COMP%]{width:100%}'],changeDetection:0})};export{Te as a,zt as b,ot as c,rt as d};