@duplicati/ngclient 0.0.115 → 0.0.117

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 (93) hide show
  1. package/chunk-2GCIICW5.js +1 -0
  2. package/chunk-2WGKWTVM.js +4 -0
  3. package/chunk-3GYZOEPN.js +1 -0
  4. package/chunk-3MP7NUXY.js +1 -0
  5. package/chunk-3PDXD5UG.js +1 -0
  6. package/{chunk-XER6OR26.js → chunk-3RIVWHQR.js} +2 -2
  7. package/chunk-3SJW7OJO.js +1 -0
  8. package/{chunk-PUEJXHBQ.js → chunk-44DHERTN.js} +1 -1
  9. package/{chunk-B2RFNJKM.js → chunk-476PQHLI.js} +1 -1
  10. package/chunk-4RAO2JRJ.js +1 -0
  11. package/{chunk-NDO7MKXC.js → chunk-54VPI5KJ.js} +1 -1
  12. package/{chunk-Q52UOSQY.js → chunk-5BHYO5SK.js} +1 -1
  13. package/{chunk-WFR2V6TK.js → chunk-B5MQU4UL.js} +1 -1
  14. package/{chunk-4E7QE6GD.js → chunk-BJIL3R5K.js} +1 -1
  15. package/{chunk-ZGKHK6QQ.js → chunk-C3M5C7JC.js} +2 -2
  16. package/chunk-CDWP7I44.js +1 -0
  17. package/chunk-COT4PUVO.js +1 -0
  18. package/chunk-F7E55RI6.js +1 -0
  19. package/chunk-GWVX5STR.js +1 -0
  20. package/{chunk-S5FFZRTF.js → chunk-HCBCZ5NX.js} +1 -1
  21. package/chunk-HWBBTXU3.js +1 -0
  22. package/chunk-I5SC52QU.js +1 -0
  23. package/{chunk-PVY4CFCN.js → chunk-IZFSAAIF.js} +1 -1
  24. package/chunk-JE3JBXTZ.js +1 -0
  25. package/chunk-M7ENBMEW.js +1 -0
  26. package/chunk-MU24KCIK.js +1 -0
  27. package/{chunk-GXRQHMLN.js → chunk-N2MDNESH.js} +1 -1
  28. package/chunk-NIBE7CI2.js +1 -0
  29. package/chunk-O445WX5K.js +1 -0
  30. package/chunk-OHLMIBDI.js +1 -0
  31. package/chunk-P7O2NK5N.js +1 -0
  32. package/chunk-PVLYH62N.js +1 -0
  33. package/chunk-SKABVF5Q.js +1 -0
  34. package/chunk-SL6SRYFT.js +1 -0
  35. package/chunk-SQQKW2DQ.js +1 -0
  36. package/chunk-TEYVVULJ.js +1 -0
  37. package/{chunk-IINSQSHJ.js → chunk-TRR5XEEM.js} +1 -1
  38. package/{chunk-T5U3AMRL.js → chunk-UNXP3IN4.js} +1 -1
  39. package/chunk-V756QT7J.js +1 -0
  40. package/{chunk-O4S6BJVY.js → chunk-VJQVHIW5.js} +1 -1
  41. package/chunk-VRWNW26T.js +1 -0
  42. package/chunk-WFAZP46A.js +1 -0
  43. package/chunk-WRPHCCP7.js +6 -0
  44. package/chunk-X3TVMZLM.js +1 -0
  45. package/{chunk-QPMF3OND.js → chunk-XDHEMLPD.js} +1 -1
  46. package/chunk-XKDTKT43.js +1 -0
  47. package/chunk-XL7YUTMF.js +1 -0
  48. package/chunk-XZ7HNUSV.js +1 -0
  49. package/{chunk-FTPARAAG.js → chunk-YDLHVAEO.js} +1 -1
  50. package/{chunk-Z75HLGYD.js → chunk-YTDBBO6I.js} +1 -1
  51. package/chunk-Z5UKRQLK.js +3 -0
  52. package/chunk-ZRFL62SL.js +2 -0
  53. package/index.html +3 -3
  54. package/locale/messages.de.json +35 -3
  55. package/main-5VIDAE2R.js +1 -0
  56. package/package.json +1 -1
  57. package/styles-EXA64NMM.css +1 -0
  58. package/chunk-36NW32TN.js +0 -1
  59. package/chunk-3MWN54TU.js +0 -1
  60. package/chunk-4WQHUN4Y.js +0 -1
  61. package/chunk-7T6RGHZV.js +0 -1
  62. package/chunk-BEA3HPFS.js +0 -1
  63. package/chunk-BMGMPYWQ.js +0 -1
  64. package/chunk-CK7BEV2X.js +0 -1
  65. package/chunk-CKS3VATQ.js +0 -1
  66. package/chunk-CW3Y4RRU.js +0 -8
  67. package/chunk-E6YEUK4V.js +0 -1
  68. package/chunk-EBDDRAQ5.js +0 -1
  69. package/chunk-FAB4IY5W.js +0 -1
  70. package/chunk-GKYC6XK5.js +0 -1
  71. package/chunk-JC5OEIB3.js +0 -2
  72. package/chunk-JXQXCHPY.js +0 -3
  73. package/chunk-K7WOLKTB.js +0 -1
  74. package/chunk-KQCGQDTS.js +0 -4
  75. package/chunk-KRXMGGJO.js +0 -1
  76. package/chunk-LRF5G4S6.js +0 -1
  77. package/chunk-NF45E5CN.js +0 -1
  78. package/chunk-NMMRBG2U.js +0 -1
  79. package/chunk-P4ZFQZCA.js +0 -1
  80. package/chunk-PHPGQ5OC.js +0 -1
  81. package/chunk-R43XF3RF.js +0 -1
  82. package/chunk-RU2M6EPT.js +0 -1
  83. package/chunk-RUGSDKDK.js +0 -1
  84. package/chunk-RZ6B5C2M.js +0 -1
  85. package/chunk-TCJ2X76T.js +0 -1
  86. package/chunk-U467ZTQ4.js +0 -1
  87. package/chunk-UBBFB6RT.js +0 -1
  88. package/chunk-URYEQA3U.js +0 -1
  89. package/chunk-XMYCIQBS.js +0 -1
  90. package/chunk-XYLMZK7X.js +0 -1
  91. package/chunk-Y7YR7HTF.js +0 -1
  92. package/main-U4R24N47.js +0 -1
  93. package/styles-NHBDA2ZX.css +0 -1
@@ -0,0 +1 @@
1
+ import{ia as ze}from"./chunk-7L2WUS2V.js";import{$a as U,Ab as ge,Bb as ve,Cb as Ce,Db as a,Eb as c,Fb as q,Hc as qe,Ib as ie,Jb as z,Oc as D,Pc as R,Rc as xe,T as pe,Ta as Pe,Ua as m,Vb as E,W as Ie,Wa as oe,Wb as f,Xb as x,Ya as me,Yb as h,Z as b,_a as Ae,a as Me,aa as Re,ab as Fe,bb as A,ca as Ve,ea as k,ec as Be,fa as y,fc as N,gb as S,gc as Y,hc as We,ib as se,ic as _,jc as _e,ka as de,kc as K,la as ue,lb as O,lc as re,nc as Se,oc as ke,pc as ye,qa as he,qb as He,qc as ae,ra as X,rc as J,sa as g,sc as B,ta as H,tb as Le,ua as fe,ub as G,uc as De,va as C,vb as j,vc as le,wb as I,xb as je,yb as Q,zb as T}from"./chunk-L72ALLHJ.js";import{a as $,b as Z,c as Te}from"./chunk-7CGTOI24.js";var L=["*"],Ke=[[["","icon",""]],[["","title",""]],"*",[["","content",""]]],Je=["[icon]","[title]","*","[content]"];function Ze(n,d){n&1&&(a(0,"spk-icon",3),_(1,"info"),c())}function et(n,d){n&1&&(a(0,"spk-icon",3),_(1,"info"),c())}function tt(n,d){n&1&&(a(0,"spk-icon",3),_(1,"warning"),c())}function it(n,d){n&1&&(a(0,"spk-icon",3),_(1,"warning-octagon"),c())}function nt(n,d){n&1&&(a(0,"spk-icon",3),_(1,"check-circle"),c())}function ot(n,d){n&1&&(a(0,"spk-icon",3),_(1,"question"),c())}function st(n,d){if(n&1){let t=z();a(0,"spk-icon",7),E("click",function(){k(t);let i=f();return y(i.removeAlert())}),_(1,"plus"),c()}}var rt=["dialogRef"];function at(n,d){if(n&1){let t=z();a(0,"div",4),E("click",function(){k(t);let i=f();return y(i.isOpen.set(!1))}),c()}}var lt=["spk-button",""];var ct=["triggerRef"],pt=["popoverRef"],dt=[[["","trigger",""]],"*"],ut=["[trigger]","*"];var ht=()=>({closeOnButton:!1,closeOnEsc:!0});var ft=[[["label"]],[["","prefix",""]],[["","textPrefix",""]],[["input"]],[["textarea"]],[["","textSuffix",""]],[["","suffix",""]],[["","error",""]],[["","hint",""]]],mt=["label","[prefix]","[textPrefix]","input","textarea","[textSuffix]","[suffix]","[error]","[hint]"],Ue=["input"],gt=[[["label"]]],vt=["label"];function Ct(n,d){if(n&1&&(a(0,"div",3),_(1),c()),n&2){let t=f();m(),_e(t.files()[0].name)}}function _t(n,d){if(n&1&&(a(0,"div",3),_(1),c()),n&2){let t=f();m(),K("",t.files().length," files selected")}}function St(n,d){if(n&1&&(a(0,"div",4),_(1),c()),n&2){let t=f();m(),_e(t.filesOver()?t.overlayText():t.placeholder())}}var kt=["optionsRef"],yt=["*",[["","menu",""]]],Dt=["*","[menu]"];function xt(n,d){n&1&&(a(0,"spk-icon",5),_(1,"caret-down"),c())}var wt=[[["label"]],[["input","type","range"]]],bt=["label","input[type=range]"],Ot=["optionsWrap"],Et=[[["label"]],[["input"]],[["textarea"]]],Tt=["label","input","textarea"],Mt=()=>({closeOnButton:!1,closeOnEsc:!1}),be=n=>({$implicit:n});function It(n,d){if(n&1&&_(0),n&2){let t=f();K(" ",t.inputValue()," ")}}function Rt(n,d){n&1&&ie(0)}function Vt(n,d){if(n&1&&O(0,Rt,1,0,"ng-container",13),n&2){let t=f(3).$implicit;f(2);let e=B(6);G("ngTemplateOutlet",e)("ngTemplateOutletContext",le(2,be,t))}}function Pt(n,d){if(n&1&&_(0),n&2){let t=f(3).$implicit,e=f(2);K(" ",e.getLabel(t)," ")}}function At(n,d){if(n&1){let t=z();a(0,"spk-chip",11),O(1,Vt,1,4,"ng-container")(2,Pt,1,1),a(3,"spk-icon",12),E("click",function(i){k(t);let o=f(2).$index,s=f(2);return y(s.removeSelectedOptionByIndex(i,o))}),_(4,"x-bold"),c()()}if(n&2){let t=f(4),e=B(6);Q(t.selectClasses()),m(),T(e?1:2)}}function Ft(n,d){n&1&&ie(0)}function Ht(n,d){if(n&1&&O(0,Ft,1,0,"ng-container",13),n&2){let t=f(4).$implicit;f(2);let e=B(6);G("ngTemplateOutlet",e)("ngTemplateOutletContext",le(2,be,t))}}function Lt(n,d){if(n&1&&_(0),n&2){let t=f(4).$implicit,e=f(2);K(" ",e.getLabel(t)," ")}}function jt(n,d){if(n&1&&O(0,Ht,1,4,"ng-container")(1,Lt,1,1),n&2){f(5);let t=B(6);T(t?0:1)}}function Bt(n,d){if(n&1&&O(0,jt,2,1),n&2){f(4);let t=B(9);T(t?-1:0)}}function Wt(n,d){if(n&1&&O(0,At,5,3,"spk-chip",10)(1,Bt,1,1),n&2){f(3);let t=B(8);T(t?0:1)}}function qt(n,d){if(n&1&&O(0,Wt,2,1),n&2){let t=d.$implicit;T(t?0:-1)}}function zt(n,d){if(n&1&&ve(0,qt,1,1,null,null,ge),n&2){f();let t=B(4);Ce(t)}}function Ut(n,d){n&1&&ie(0)}function Nt(n,d){if(n&1&&O(0,Ut,1,0,"ng-container",14),n&2){f(2);let t=B(0);G("ngTemplateOutlet",t)}}function $t(n,d){if(n&1&&_(0),n&2){let t,e=f(2);K(" ",(t=e.placeholderText())!==null&&t!==void 0?t:""," ")}}function Qt(n,d){if(n&1&&O(0,Nt,1,1,"ng-container")(1,$t,1,1),n&2){f();let t=B(0);T(t?0:1)}}function Yt(n,d){n&1&&(a(0,"spk-icon",6),_(1,"caret-down"),c())}function Xt(n,d){n&1&&q(0,"spk-spinner",7)}function Gt(n,d){n&1&&(a(0,"spk-icon",6),_(1,"list-magnifying-glass"),c())}function Kt(n,d){n&1&&(a(0,"spk-icon",6),_(1,"magnifying-glass"),c())}function Jt(n,d){if(n&1){let t=z();a(0,"spk-icon",15),E("click",function(i){k(t);let o=f();return y(o.clear(i))}),_(1,"x-bold"),c()}}function Zt(n,d){n&1&&(a(0,"spk-icon",6),_(1,"caret-down"),c())}function ei(n,d){n&1&&(a(0,"spk-icon",6),_(1,"caret-up"),c())}function ti(n,d){if(n&1&&q(0,"spk-checkbox"),n&2){let t=f().$index,e=f();Q(e.selectClasses()),I("active",e.isSelected(t))}}function ii(n,d){n&1&&ie(0)}function ni(n,d){if(n&1&&O(0,ii,1,0,"ng-container",13),n&2){let t=f().$implicit;f();let e=B(7);G("ngTemplateOutlet",e)("ngTemplateOutletContext",le(2,be,t))}}function oi(n,d){if(n&1&&_(0),n&2){let t=f().$implicit,e=f();K(" ",e.getLabel(t)," ")}}function si(n,d){if(n&1){let t=z();a(0,"li",16),E("click",function(){let i=k(t).$index,o=f();return y(o.toggleOptionByIndex(i))}),O(1,ti,1,4,"spk-checkbox",17)(2,ni,1,4,"ng-container")(3,oi,1,1),c()}if(n&2){let t=d.$index,e=f(),i=B(7);I("selected",e.isSelected(t))("focused",t===e.focusedOptionIndex()),m(),T(e.selectMultiple()?1:-1),m(),T(i?2:3)}}var ri=["dragImageElement"],ai=[[["","sidenav",""]],[["","sidenav-closed-topbar",""]],"*"],li=["[sidenav]","[sidenav-closed-topbar]","*"];function ci(n,d){n&1&&q(0,"div",1,0)}function pi(n,d){if(n&1){let t=z();a(0,"div",7),E("drop",function(i){k(t);let o=f();return y(o.drop(i))})("dragover",function(i){k(t);let o=f();return y(o.dragOver(i))})("dragenter",function(){k(t);let i=f();return y(i.dragEnter())})("dragleave",function(){k(t);let i=f();return y(i.dragLeave())}),c()}}function di(n,d){if(n&1){let t=z();a(0,"div",8),E("dragstart",function(i){k(t);let o=f();return y(o.dragStart(i))})("dragend",function(i){k(t);let o=f();return y(o.dragEnd(i))})("drag",function(i){k(t);let o=f();return y(o.drag(i))})("touchstart",function(i){k(t);let o=f();return y(o.touchStart(i))})("touchmove",function(i){k(t);let o=f();return y(o.touchMove(i))})("touchend",function(i){k(t);let o=f();return y(o.touchEnd(i))})("touchcancel",function(i){k(t);let o=f();return y(o.touchCancel(i))}),c()}}var ui=["thead"],hi=[[["","table-header",""]],"*",[["","table-no-rows",""]]],fi=["[table-header]","*","[table-no-rows]"];function mi(n,d){n&1&&q(0,"spk-progress-bar",1)}function gi(n,d){n&1&&(a(0,"div",2),h(1,2),c())}var vi=[[["","title",""]],"*"],Ci=["[title]","*"];function _i(n,d){n&1&&_(0,"Title")}function Si(n,d){n&1&&(a(0,"spk-icon",1),_(1,"caret-down"),c())}var we=["bold","thin","light","fill"],te=(()=>{class n{#e=b(H);get currentClass(){let t=this.#e.nativeElement.innerText;for(let e=0;e<we.length;e++)if(t.endsWith(we[e]))return we[e];return""}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=S({type:n,selectors:[["spk-icon"]],hostVars:2,hostBindings:function(e,i){e&2&&Q(i.currentClass)},ngContentSelectors:L,decls:1,vars:0,template:function(e,i){e&1&&(x(),h(0))},encapsulation:2,changeDetection:0})}}return n})(),Ji=(()=>{class n{constructor(){this._el=b(H),this.alertService=g(null),this.id=g(null),this.alertClasses=D(()=>this._el.nativeElement.classList.toString())}removeAlert(){this.id()&&this.alertService()&&this.alertService()?.removeAlert(this.id())}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=S({type:n,selectors:[["spk-alert"]],inputs:{alertService:[1,"alertService"],id:[1,"id"]},ngContentSelectors:Je,decls:18,vars:4,consts:[["ref",""],[1,"alert"],[1,"icon"],[1,"state-icon"],[1,"title"],[1,"close-icon"],[1,"content"],[1,"close-icon",3,"click"]],template:function(e,i){if(e&1&&(x(Ke),a(0,"div",1)(1,"div",2,0),h(3),c(),a(4,"div",2),ae(5),O(6,Ze,2,0,"spk-icon",3)(7,et,2,0,"spk-icon",3)(8,tt,2,0,"spk-icon",3)(9,it,2,0,"spk-icon",3)(10,nt,2,0,"spk-icon",3)(11,ot,2,0,"spk-icon",3),c(),a(12,"div",4),h(13,1),h(14,2),c(),O(15,st,2,0,"spk-icon",5),a(16,"div",6),h(17,3),c()()),e&2){let o=We(2);m(),j("display",o.children.length?"block":"none");let s=i.alertClasses();m(5),T(s.includes("primary")?6:s.includes("accent")?7:s.includes("warn")?8:s.includes("error")?9:s.includes("success")?10:11),m(9),T(i.id()?15:-1)}},dependencies:[te],encapsulation:2,changeDetection:0})}}return n})();function Oe(){return Date.now().toString(36)+Math.random().toString(36).substring(2)}var Zi=(()=>{class n{constructor(){this.alertHistory=C([]),this.alertHistoryIsOpen=C(!1),this.alertHistoryIsHidden=C(!0)}error(t){this.addAlert({type:"error",title:t??"An error occured"})}success(t){this.addAlert({type:"success",title:t})}question(t){this.addAlert({type:"question",title:t})}warning(t){this.addAlert({type:"warn",title:t})}info(t){this.addAlert({type:"primary",title:t})}addAlert(t){let e=Oe();this.alertHistory.update(i=>[Z($({},t),{isOpen:!0,animateIn:!0,animateOut:!1,id:e}),...i]),setTimeout(()=>{this.alertHistory.update(i=>i.map(o=>Z($({},o),{animateIn:o.id===e?!1:o.animateIn})))},40),setTimeout(()=>{this.hideAlert(e)},2500)}removeAlert(t){this.alertHistory.update(e=>e.map(i=>Z($({},i),{animateOut:i.id===t?!1:i.animateOut}))),setTimeout(()=>{this.alertHistory.update(e=>e.filter(i=>i.id!==t))},300)}hideAlert(t){this.alertHistory.update(e=>e.map(i=>Z($({},i),{isOpen:i.id===t?!1:i.isOpen})))}setHidden(t){this.alertHistoryIsHidden.set(t)}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275prov=pe({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})(),ce=new Ie("Sparkle UI Config"),ki={class:"default",width:void 0,maxWidth:void 0,height:void 0,maxHeight:void 0,closeOnButton:!0,closeOnEsc:!0,closeOnOutsideClick:!0},yi=(()=>{class n{constructor(){this.#e=b(ce,{optional:!0}),this.dialogRef=U("dialogRef"),this.isOpen=A(!1),this.options=g(),this.closed=X(),this.defaultOptionMerge=D(()=>$(Z($({},ki),{class:this.#e?.dialogType??"default"}),this.options())),this.abortController=null,this.isOpenEffect=R(()=>{let t=this.dialogRef()?.nativeElement;this.abortController&&this.abortController.abort(),this.abortController=new AbortController,this.isOpen()?(t?.showModal(),t?.addEventListener("close",()=>{this.isOpen.set(!1),this.closed.emit()},{signal:this.abortController?.signal}),document.addEventListener("keydown",e=>{e.key==="Escape"&&!this.defaultOptionMerge().closeOnEsc&&e.preventDefault(),e.key==="Escape"&&this.defaultOptionMerge().closeOnEsc&&this.isOpen.set(!1)},{signal:this.abortController?.signal})):(this.closed.emit(),t?.close())})}#e;ngOnDestroy(){this.abortController?.abort()}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=S({type:n,selectors:[["spk-dialog"]],viewQuery:function(e,i){e&1&&N(i.dialogRef,rt,5),e&2&&Y()},inputs:{isOpen:[1,"isOpen"],options:[1,"options"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:L,decls:6,vars:11,consts:[["dialogRef",""],["spkDialog",""],[1,"content"],[1,"closeable-overlay"],[1,"closeable-overlay",3,"click"]],template:function(e,i){if(e&1&&(x(),ae(0),a(1,"dialog",1,0)(3,"div",2),h(4),c(),O(5,at,1,0,"div",3),c()),e&2){let o,s,r,p,l=i.defaultOptionMerge();m(),Q(l.class),j("width",(o=l.width)!==null&&o!==void 0?o:"")("max-width",(s=l.maxWidth)!==null&&s!==void 0?s:"")("max-height",(r=l.maxHeight)!==null&&r!==void 0?r:"")("height",(p=l.height)!==null&&p!==void 0?p:""),m(4),T(i.defaultOptionMerge().closeOnOutsideClick?5:-1)}},encapsulation:2,changeDetection:0})}}return n})(),en=(()=>{class n{constructor(){this.#e=document.querySelector("body"),this.#i=b(He),this.compRef=null,this.insertedCompRef=null,this.closedFieldSub=null,this.compClosedSub=null}#e;#i;open(t,e){let i=this.#i.injector,o=this.#t(),P=e||{},{data:s,closed:r}=P,p=Te(P,["data","closed"]);this.compRef&&this.#n(),this.insertedCompRef=xe(t,{environmentInjector:i}),this.compRef=xe(yi,{hostElement:o,environmentInjector:i,projectableNodes:[[this.insertedCompRef.location.nativeElement]]});let l=this.insertedCompRef.instance?.data,u=this.insertedCompRef.instance?.closed;if(s){if(fe(l))this.insertedCompRef.setInput("data",s);else if(!fe(l))throw new Error("data is not an input signal on the passed component")}u instanceof he&&(this.closedFieldSub=u.subscribe((...F)=>{r?.(...F),this.#n()})),this.#i.attachView(this.insertedCompRef.hostView),this.#i.attachView(this.compRef.hostView),this.insertedCompRef.changeDetectorRef.detectChanges(),this.compRef.changeDetectorRef.detectChanges(),this.compRef.instance.isOpen.set(!0),this.compRef.setInput("options",p),this.compRef.instance.closed.subscribe(()=>V());let w=this;function V(){u&&u instanceof he?u.emit(!1):r?.(void 0),w.#n()}return{component:this.insertedCompRef.instance,close:V}}#t(){let t=document.createElement("spk-dialog-ref");return t.id="spk-dialog-ref",document.getElementById("spk-dialog-ref")||this.#e.append(t),document.getElementById("spk-dialog-ref")}#n(){this.insertedCompRef&&(this.#i.detachView(this.insertedCompRef.hostView),this.closedFieldSub?.unsubscribe(),this.insertedCompRef.destroy()),this.compRef&&(this.#i.detachView(this.compRef.hostView),this.compClosedSub?.unsubscribe(),this.compRef.destroy())}ngOnDestroy(){this.#n()}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275prov=pe({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})(),tn=(()=>{class n{static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=S({type:n,selectors:[["spk-button-group"]],ngContentSelectors:L,decls:1,vars:0,template:function(e,i){e&1&&(x(),h(0))},encapsulation:2,changeDetection:0})}}return n})(),Di=(()=>{class n{static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=S({type:n,selectors:[["","spk-button",""]],attrs:lt,ngContentSelectors:L,decls:1,vars:0,template:function(e,i){e&1&&(x(),h(0))},encapsulation:2,changeDetection:0})}}return n})(),nn=(()=>{class n{constructor(){this.#e=b(ce,{optional:!0}),this.class=C(this.#e?.cardType??"default")}#e;static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=S({type:n,selectors:[["spk-card"]],hostVars:2,hostBindings:function(e,i){e&2&&Q(i.class())},ngContentSelectors:L,decls:1,vars:0,template:function(e,i){e&1&&(x(),h(0))},encapsulation:2,changeDetection:0})}}return n})(),xi=(()=>{class n{#e=b(H);onClick(){this.#e.nativeElement.querySelector("input")&&this.#e.nativeElement.querySelector("input").focus()}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=S({type:n,selectors:[["spk-checkbox"]],hostBindings:function(e,i){e&1&&E("click",function(){return i.onClick()})},ngContentSelectors:L,decls:6,vars:0,consts:[[1,"box"],[1,"inherit","default-indicator"],[1,"inherit","indeterminate-indicator"]],template:function(e,i){e&1&&(x(),a(0,"div",0)(1,"spk-icon",1),_(2,"check"),c(),a(3,"spk-icon",2),_(4,"minus"),c()(),h(5))},dependencies:[te],encapsulation:2,changeDetection:0})}}return n})(),wi=(()=>{class n{static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=S({type:n,selectors:[["spk-chip"]],ngContentSelectors:L,decls:1,vars:0,template:function(e,i){e&1&&(x(),h(0))},encapsulation:2,changeDetection:0})}}return n})();var bi=["scroll","auto"],Oi={width:void 0,height:void 0,closeOnButton:!0,closeOnEsc:!0},Ne=(()=>{class n{constructor(){this.#e=b(qe),this.#i=4,this.SUPPORTS_ANCHOR=typeof CSS<"u"&&CSS.supports("position-anchor","--abc")&&CSS.supports("anchor-name","--abc"),this.above=g(!1),this.right=g(!1),this.markForCheck=g(null),this._above=C(this.above()),this._right=C(this.right()),this.disableOpenByClick=g(!1),this.isOpen=A(!1),this.options=g(),this.closed=X(),this.defaultOptionMerge=D(()=>$($({},Oi),this.options())),this.triggerRef=U.required("triggerRef"),this.popoverRef=U.required("popoverRef"),this.id=C("--"+Oe()),this.menuStyle=C(null),this.openAbort=null,this.openEffect=R(()=>{let t=this.popoverRef()?.nativeElement;if(this.isOpen()){this.openAbort&&this.openAbort.abort(),this.openAbort=new AbortController;let i={signal:this.openAbort?.signal};t?.showPopover(),document.addEventListener("keydown",o=>{o.key==="Escape"&&!this.defaultOptionMerge().closeOnEsc&&o.preventDefault(),o.key==="Escape"&&this.defaultOptionMerge().closeOnEsc&&this.isOpen.set(!1)},i),setTimeout(()=>{this.#t(this.popoverRef()?.nativeElement).addEventListener("scroll",()=>this.#n(),i),window.addEventListener("resize",()=>this.#n(),i),this.#n()})}else t.hidePopover(),this.openAbort?.abort(),this.closed.emit()}),this.markForCheckEffect=R(()=>{this.markForCheck()&&this.#e.markForCheck()})}#e;#i;toggleIsOpen(t){t.preventDefault(),t.stopPropagation(),this.disableOpenByClick()||this.isOpen.set(!this.isOpen())}eventClose(t){t.stopPropagation(),t.preventDefault(),this.isOpen.set(!1)}#t(t){let e=t.parentElement;for(;e;){if(bi.indexOf(window.getComputedStyle(e).overflowY)>-1&&e.scrollHeight>e.clientHeight)return e;e=e.parentElement}return document.documentElement}#n(){let t=this.triggerRef()?.nativeElement.getBoundingClientRect(),e=this.popoverRef()?.nativeElement.getBoundingClientRect(),i=t.left,o=t.bottom,s=i,r=o+this.#i,p=s+e.width>window.innerWidth,l=r+e.height>window.innerHeight;if(this.SUPPORTS_ANCHOR)this._above.set(l),this._right.set(p);else{if(s=i,r=o+this.#i,l){let w=t.top-e.height-this.#i;w<0||(r=w)}p&&(s=t.right-e.width,s<0&&(s=0));let u={left:s+"px",top:r+"px"};this.menuStyle.set(u)}}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=S({type:n,selectors:[["spk-popover"]],viewQuery:function(e,i){e&1&&(N(i.triggerRef,ct,5),N(i.popoverRef,pt,5)),e&2&&Y(2)},hostVars:4,hostBindings:function(e,i){e&2&&I("above",i._above())("right",i._right())},inputs:{above:[1,"above"],right:[1,"right"],markForCheck:[1,"markForCheck"],disableOpenByClick:[1,"disableOpenByClick"],isOpen:[1,"isOpen"],options:[1,"options"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:ut,decls:10,vars:6,consts:[["triggerRef",""],["popoverRef",""],[1,"trigger",3,"click"],[1,"trigger-wrapper"],["spk-button","",1,"outlined"],["popover","",1,"popover"],[1,"overlay",3,"click"]],template:function(e,i){if(e&1){let o=z();x(dt),a(0,"div",2,0),E("click",function(r){return k(o),y(i.toggleIsOpen(r))}),a(2,"div",3),h(3),c(),a(4,"button",4),_(5,"Open popover"),c()(),a(6,"div",5,1)(8,"div",6),E("click",function(r){return k(o),y(i.isOpen()&&i.eventClose(r))}),c(),h(9,1),c()}e&2&&(j("anchor-name",i.id()),m(6),je(i.menuStyle()),j("position-anchor",i.id()))},dependencies:[Di],encapsulation:2,changeDetection:0})}}return n})();var on=(()=>{class n{static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=S({type:n,selectors:[["spk-divider"]],ngContentSelectors:L,decls:1,vars:0,template:function(e,i){e&1&&(x(),h(0))},encapsulation:2,changeDetection:0})}}return n})(),Ee=(()=>{class n{#e=b(H);onClick(){this.#e.nativeElement.querySelector("input")&&this.#e.nativeElement.querySelector("input").focus(),this.#e.nativeElement.querySelector("textarea")&&this.#e.nativeElement.querySelector("textarea").focus()}ngOnInit(){let t=typeof CSS<"u"&&CSS.supports("field-sizing","content"),e=this.#e.nativeElement.querySelector("textarea");if(!t&&e!==null){let s=function(){e.style.height="auto",e.style.height=e.scrollHeight+"px"},r=function(){window.setTimeout(s,0)};var i=s,o=r;e.addEventListener("change",s),e.addEventListener("cut",r),e.addEventListener("paste",r),e.addEventListener("drop",r),e.addEventListener("keydown",r),e.focus(),e.select(),s()}}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=S({type:n,selectors:[["spk-form-field"]],hostBindings:function(e,i){e&1&&E("click",function(){return i.onClick()})},ngContentSelectors:mt,decls:15,vars:0,consts:[[1,"input-wrap"],[1,"prefix"],[1,"suffix"],[1,"helpers"],[1,"error"],[1,"hint"]],template:function(e,i){e&1&&(x(ft),h(0),a(1,"div",0)(2,"div",1),h(3,1),h(4,2),c(),h(5,3),h(6,4),a(7,"div",2),h(8,5),h(9,6),c()(),a(10,"div",3)(11,"div",4),h(12,7),c(),a(13,"div",5),h(14,8),c()())},encapsulation:2,changeDetection:0})}}return n})(),sn=(()=>{class n{constructor(){this._el=b(H),this.inputRef=U.required("input"),this.filesOver=C(!1),this.multiple=g(),this.accept=g(null),this.placeholder=A("Click or drag files here"),this.overlayText=g("Drop files here"),this.files=A([]),this.fileUploadClasses=D(()=>this._el.nativeElement.classList.toString()),this.inputEffect=R(()=>{let t=this.inputRef().nativeElement;t&&(t.placeholder&&this.placeholder.set(t.placeholder),t.addEventListener("dragover",e=>{e.preventDefault(),this.filesOver.set(!0)}),t.addEventListener("dragleave",e=>{e.preventDefault(),this.filesOver.set(!1)}),t.addEventListener("drop",e=>{e.preventDefault(),this.filesOver.set(!1);let i=e.dataTransfer?.files;i&&i.length>0&&(this.handleFileUpload(Array.from(i)),t.files=i)}),t.addEventListener("change",e=>{e.preventDefault(),this.handleFileUpload(Array.from(e.target.files))}))})}handleFileUpload(t){this.multiple()?this.files.update(e=>[...e,...t]):this.files.set(t)}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=S({type:n,selectors:[["spk-file-upload"]],viewQuery:function(e,i){e&1&&N(i.inputRef,Ue,5),e&2&&Y()},inputs:{multiple:[1,"multiple"],accept:[1,"accept"],placeholder:[1,"placeholder"],overlayText:[1,"overlayText"],files:[1,"files"]},outputs:{placeholder:"placeholderChange",files:"filesChange"},ngContentSelectors:vt,decls:12,vars:7,consts:[["inputWrap",""],["input",""],["ngProjectAs","input",5,["input"],1,"input"],[1,"files-text"],[1,"placeholder"],["type","file"],[1,"bg-overlay"],["suffix",""]],template:function(e,i){e&1&&(x(gt),a(0,"spk-form-field"),h(1,0,["ngProjectAs","label",5,["label"]]),a(2,"div",2,0),O(4,Ct,2,1,"div",3)(5,_t,2,1,"div",3)(6,St,2,1,"div",4),q(7,"input",5,1)(9,"div",6),c(),a(10,"spk-icon",7),_(11,"upload-simple"),c()()),e&2&&(Q(i.fileUploadClasses()),m(4),T(i.files().length===1?4:i.files().length>1?5:6),m(3),Le("multiple",i.multiple())("accept",i.accept()),m(2),I("files-over",i.filesOver()))},dependencies:[Ee,te],encapsulation:2,changeDetection:0})}}return n})(),rn=(()=>{class n{static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=S({type:n,selectors:[["spk-list"]],ngContentSelectors:L,decls:1,vars:0,template:function(e,i){e&1&&(x(),h(0))},encapsulation:2,changeDetection:0})}}return n})();function $e(n,d){let t=d?.injector||(Ve($e),b(de)),{debounce:e=0,initialValue:i=void 0,transform:o=v=>v,compare:s=(v,M)=>v===M,forceType:r=void 0,returnPreviousValue:p=!0}=d||{},l=C(i),u=t.get(ue),w=D(()=>{let v=n()?.nativeElement;if(v instanceof HTMLInputElement||v instanceof HTMLTextAreaElement)return Ye(v)}),V=!1,P,F=null;return R(()=>{let v=w();if(!v)return l.set(p&&P?o(P):void 0);i!==void 0&&v.value===""?l.set(i):v.value!==""&&ne();let M=W=>{F!==null&&clearTimeout(F),F=setTimeout(()=>{F=null,ne()},e)};v.addEventListener("input",M),v.addEventListener("inputValueChanged",M),u.onDestroy(()=>{v.removeEventListener("input",M),v.removeEventListener("inputValueChanged",M),F!==null&&clearTimeout(F)})},{injector:t}),R(()=>{let v=w();if(!v)return;let M=l()??"",W=M==null?"":String(M);v.value!==W&&(P=W,v.value=W,v.dispatchEvent(new Event("input")))},{injector:t}),l;function ne(){if(!V){V=!0;try{let v=w();if(!v)return;let M=v.value,W=r?Xe(M,r):o(M);P=M,s(l(),W)||l.set(W)}finally{V=!1}}}function Ye(v){return Object.defineProperty(v,"value",{configurable:!0,get(){return Object.getOwnPropertyDescriptor(Object.getPrototypeOf(v),"value").get.call(this)},set(M){Object.getOwnPropertyDescriptor(Object.getPrototypeOf(v),"value").set.call(this,M);let Ge=new CustomEvent("inputValueChanged",{bubbles:!0,cancelable:!0,detail:{value:M}});return this.dispatchEvent(Ge),M}}),v}function Xe(v,M){switch(M){case"string":return v.toString();case"number":let W=Number(v);return isNaN(W)?void 0:W;case"boolean":return v.toLowerCase()==="true"?!0:v.toLowerCase()==="false"?!1:void 0;default:return v}}}function Qe(n,d){let t=b(de),e=t.get(ue),i=C([]),o=null,s=null,r=(l,u)=>{s&&s.disconnect();let w=Array.from(l.nativeElement.querySelectorAll(u.join(",")));i.set(w),s=new MutationObserver(V=>{requestAnimationFrame(()=>{let P=Array.from(l.nativeElement.querySelectorAll(u.join(",")));i.set(P)})}),s.observe(l.nativeElement,{childList:!0,subtree:!0}),e.onDestroy(()=>p())};o=R(()=>{let l=typeof n=="function"&&n[Me]?n():n,u=typeof d=="function"?d():d;l&&u?.length>0?r(l,u):(i.set([]),s&&(s.disconnect(),s=null))},{injector:t});function p(){o&&o.destroy(),s&&s.disconnect()}return{signal:i.asReadonly(),destroy:p}}var an=(()=>{class n{constructor(){this.#e=b(me),this.above=g(!1),this.right=g(!1),this.openIndicator=g(!1),this.disabled=g(!1),this.customOptionElementSelectors=g(["button"]),this.keepClickedOptionActive=g(!1),this.closeOnClick=g(!0),this.isOpen=A(!1),this.closed=X(),this.searchable=g(!1),this.activeOptionIndex=C(-1),this.inputRef=U("input"),this.optionsRef=U("optionsRef"),this.options=Qe(this.optionsRef,this.customOptionElementSelectors),this.optionsEl=D(()=>this.options.signal().filter(t=>!t.disabled)),this.inputValue=$e(this.inputRef),this.abortController=null,this.optionsEffect=R(()=>{if(!this.isOpen())return;this.abortController&&(this.abortController.abort(),this.abortController=null),this.abortController=new AbortController;let t=this.inputRef()?.nativeElement;t&&(queueMicrotask(()=>t.focus()),this.closeOnClick()||this.optionsRef()?.nativeElement?.addEventListener("click",i=>{let o=i.target,s=this.activeElements();if(!s.length){let p=this.optionsEl();this.activeElements.set(p),s=p}let r=s.findIndex(p=>p===o);r>-1&&(this.activeOptionIndex.set(r),t.focus())}),t.addEventListener("keydown",e=>{let i=this.activeOptionIndex();e.key==="ArrowDown"?(e.preventDefault(),this.activeOptionIndex.set(this.nextActiveIndex(i))):e.key==="ArrowUp"?(e.preventDefault(),this.activeOptionIndex.set(this.prevActiveIndex(i))):e.key==="Enter"?(e.preventDefault(),i>-1&&(this.activeElements()[i].click(),queueMicrotask(()=>this.close("active")))):e.key==="Tab"&&(e.preventDefault(),this.close("closed"))},{signal:this.abortController.signal}))}),this._lastElementList=[],this.activeElements=C([]),this.lastInputValue="",this.inputValueEffect=R(()=>{if(!this.searchable())return;let e=(this.inputValue()??"").toLowerCase();if(this.#t(),!e||e==="")return;let i=this._lastElementList.length&&e.length>this.lastInputValue.length?this._lastElementList:this.optionsEl();this.lastInputValue=e;for(let o=0;o<i.length;o++){let s=i[o],r=s.textContent?.toLowerCase()||"",p=this.#i(r,e);s.value=p}i=i.filter(o=>o.value>0).sort((o,s)=>s.value-o.value);for(let o=0;o<i.length;o++)this.#e.setStyle(i[o],"order",o);this.activeElements.set(i),this._lastElementList=i}),this.activeOptionIndexEffect=R(()=>{let t=this.activeElements(),e=this.activeOptionIndex();for(let i=0;i<t.length;i++)t[i].classList.remove("active");e>-1&&(t[e].scrollIntoView({block:"center"}),t[e].classList.add("active"))})}#e;#i(t,e){if(!e)return 0;let i=0,o=-1,s=0,r=!0;for(let p=0;p<e.length;p++){let l=e[p];if(t.length>o+1&&t[o+1]===l)i+=p===0?100:150,o++,s++;else{let u=t.indexOf(l,o+1);if(p>0&&(r=!1),u===-1)return 0;i+=100,o=u,s++}}return r&&e.length===s&&(i+=1e3),i+=s*20,i}nextActiveIndex(t){let e=this.activeElements();if(!e.length){let o=this.optionsEl();this.activeElements.set(o),e=o}if(t===-1||t===e.length-1)return 0;let i=t+1;return e[i].disabled?this.nextActiveIndex(i):i}prevActiveIndex(t){let e=this.activeElements();if(!e.length){let o=this.optionsEl();this.activeElements.set(o),e=o}if(t===0||t===-1)return e.length-1;let i=t-1;return e[i].disabled?this.prevActiveIndex(i):i}close(t="closed",e){this.inputValue.set(""),this.closeOnClick()&&((!this.keepClickedOptionActive()||t==="closed")&&this.#t(),this.isOpen.set(!1),this.closed.emit(t==="active"))}#t(){this.activeOptionIndex.set(-1);let t=this.optionsEl();for(let e=0;e<t.length;e++)t[e].classList.remove("active")}ngOnDestroy(){this.abortController&&(this.abortController.abort(),this.abortController=null)}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=S({type:n,selectors:[["spk-menu"]],viewQuery:function(e,i){e&1&&(N(i.inputRef,Ue,5),N(i.optionsRef,kt,5)),e&2&&Y(2)},hostVars:4,hostBindings:function(e,i){e&2&&I("disabled",i.disabled())("has-search",i.searchable())},inputs:{above:[1,"above"],right:[1,"right"],openIndicator:[1,"openIndicator"],disabled:[1,"disabled"],customOptionElementSelectors:[1,"customOptionElementSelectors"],keepClickedOptionActive:[1,"keepClickedOptionActive"],closeOnClick:[1,"closeOnClick"],isOpen:[1,"isOpen"],searchable:[1,"searchable"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:Dt,decls:12,vars:13,consts:[["formFieldWrapper",""],["input",""],["optionsRef",""],[3,"isOpenChange","closed","isOpen","disableOpenByClick","above","right","options"],["trigger","",3,"click"],[1,"open-indicator"],[1,"form-field-wrap"],[1,"small","stretch"],["type","text","placeholder","Search"],[1,"options",3,"click"]],template:function(e,i){if(e&1){let o=z();x(yt),a(0,"spk-popover",3,0),ye("isOpenChange",function(r){return k(o),ke(i.isOpen,r)||(i.isOpen=r),y(r)}),E("closed",function(){return k(o),y(i.close("fromPopover"))}),a(2,"div",4),E("click",function(){return k(o),y(!i.disabled()&&i.isOpen.set(!0))}),h(3),O(4,xt,2,0,"spk-icon",5),c(),a(5,"div",6)(6,"spk-form-field",7),q(7,"input",8,1),c()(),a(9,"div",9,2),E("click",function(){return k(o),y(i.close("active"))}),h(11,1),c()()}e&2&&(Se("isOpen",i.isOpen),G("disableOpenByClick",!0)("above",i.above())("right",i.right())("options",De(12,ht)),m(2),I("is-open",i.isOpen()),m(2),T(i.openIndicator()?4:-1),m(2),I("hidden",i.searchable()===!1),m(3),I("searching",i.searchable()&&i.inputValue()!==""))},dependencies:[Ne,Ee,te],encapsulation:2,changeDetection:0})}}return n})(),Ei=(()=>{class n{constructor(){this.value=g(void 0)}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=S({type:n,selectors:[["spk-progress-bar"]],inputs:{value:[1,"value"]},decls:1,vars:2,consts:[[1,"progress-bar"]],template:function(e,i){e&1&&q(0,"div",0),e&2&&j("width",i.value(),"%")},encapsulation:2,changeDetection:0})}}return n})(),ln=(()=>{class n{#e=b(H);onClick(){this.#e.nativeElement.querySelector("input")&&this.#e.nativeElement.querySelector("input").focus()}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=S({type:n,selectors:[["spk-radio"]],hostBindings:function(e,i){e&1&&E("click",function(){return i.onClick()})},ngContentSelectors:L,decls:2,vars:0,consts:[[1,"radio"]],template:function(e,i){e&1&&(x(),q(0,"div",0),h(1))},encapsulation:2,changeDetection:0})}}return n})(),cn=(()=>{class n{constructor(){this.#e=b(H),this.#i=null,this.#t=null,this.#n=0,this.alwaysShowThumb=g(!1),this.unit=g(""),this.value=A(this.#n),this.inputState=C({min:0,max:100,step:1}),this.valuePercentage=D(()=>{let{min:t,max:e}=this.inputState(),i=this.value()??t;if(isNaN(i))return 0;let o=e-t;if(o===0)return 0;let s=(i-t)/o*100;return Math.max(0,Math.min(100,s))}),this.trackFilledPercentage=D(()=>this.valuePercentage()),this.thumbPositionPercentage=D(()=>this.valuePercentage()),this.syncModelToInputEffect=R(()=>{let t=this.value();if(this.#t){let e=parseFloat(this.#t.value);(isNaN(e)||String(e)!==String(t))&&(this.#t.value=String(t))}})}#e;#i;#t;#n;get hasInputElement(){return!!this.#t}ngAfterViewInit(){this.#t=this.#e.nativeElement.querySelector('input[type="range"]'),this.#t?(this.#a(this.#t),this.#t.oninput=()=>{this.setNewInputValue(this.#t.value)},this.#t.addEventListener("inputValueChanged",t=>{this.setNewInputValue(t.detail.value)}),queueMicrotask(()=>this.#s(!0)),this.#o()):console.error('SparkleRangeSliderComponent: No <input type="range"> element found projected inside.')}setNewInputValue(t){let e=parseFloat(t??"0");if(!isNaN(e)){let{min:i,max:o}=this.inputState();this.value.set(Math.max(i,Math.min(o,e)))}}trackEvent(t){if(!this.#t||this.#t.readOnly||this.#t.disabled){t.preventDefault(),t.stopPropagation();return}if(t.target===this.#t||t.target?.closest(".thumb, .min-indicator, .max-indicator"))return;let i=t.currentTarget.getBoundingClientRect(),o=t.clientX-i.left,s=i.width,{min:r,max:p,step:l}=this.inputState(),u=p-r;if(s>0&&u!==0&&l>0){let V=(o/s*u+r-r)/l,P=r+Math.round(V)*l,F=this.#r(l);P=parseFloat(P.toFixed(F));let ne=Math.max(r,Math.min(p,P));this.value.set(ne)}}#s(t=!1){if(!this.#t)return;let e=parseFloat(this.#t.min??"0")??0,i=parseFloat(this.#t.max??"100")??100,o=this.#t.step,s=1;if(o&&o.toLowerCase()!=="any"){let p=parseFloat(o);!isNaN(p)&&p>0&&(s=p)}this.inputState.set({min:e,max:i,step:s});let r=parseFloat(this.#t.value??String(e))??e;if(t&&this.value()!==this.#n){let p=this.value(),l=Math.max(e,Math.min(i,p));r!==l&&(this.#t.value=String(l)),p!==l&&this.value.set(l)}else{let p=Math.max(e,Math.min(i,r));this.value()!==p&&this.value.set(p)}}#o(){if(!this.#t||typeof MutationObserver>"u")return;let t=["min","max","step","value","readonly","disabled"];this.#i=new MutationObserver(e=>{let i=!1;for(let o of e)if(o.type==="attributes"&&t.includes(o.attributeName??"")){i=!0;break}i&&this.#s(!1)}),this.#i.observe(this.#t,{attributes:!0})}#r(t){if(isNaN(t)||Math.floor(t)===t)return 0;let i=t.toString().split(".")[1];return i?i.length:0}#a(t){Object.defineProperty(t,"value",{configurable:!0,get(){return Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t),"value").get.call(this)},set(e){Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t),"value").set.call(this,e);let o=new CustomEvent("inputValueChanged",{bubbles:!0,cancelable:!0,detail:{value:e}});return this.dispatchEvent(o),e}})}ngOnDestroy(){this.#i&&this.#i.disconnect(),this.#t&&(this.#t.oninput=null)}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=S({type:n,selectors:[["spk-range-slider"]],hostVars:2,hostBindings:function(e,i){e&2&&I("has-input",i.hasInputElement)},inputs:{alwaysShowThumb:[1,"alwaysShowThumb"],unit:[1,"unit"],value:[1,"value"]},outputs:{value:"valueChange"},ngContentSelectors:bt,decls:15,vars:12,consts:[[1,"label"],[1,"input-wrap"],[1,"min-indicator"],[1,"track-wrap",3,"click"],[1,"track"],[1,"track-filled"],[1,"thumb-wrap"],[1,"thumb"],[1,"value-indicator"],[1,"max-indicator"]],template:function(e,i){e&1&&(x(wt),a(0,"div",0),h(1),c(),a(2,"div",1)(3,"div",2),_(4),c(),a(5,"div",3),E("click",function(s){return i.trackEvent(s)}),h(6,1),a(7,"div",4),q(8,"div",5),c(),a(9,"div",6)(10,"div",7)(11,"div",8),_(12),c()()()(),a(13,"div",9),_(14),c()()),e&2&&(m(4),re("",i.inputState().min,"",i.unit(),""),m(4),j("width",i.trackFilledPercentage(),"%"),m(),j("left",i.thumbPositionPercentage(),"%"),m(),I("always-show",i.alwaysShowThumb()),m(2),re("",i.value(),"",i.unit(),""),m(2),re("",i.inputState().max,"",i.unit(),""))},encapsulation:2,changeDetection:0})}}return n})(),Ti=(()=>{class n{static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=S({type:n,selectors:[["spk-spinner"]],decls:0,vars:0,template:function(e,i){},encapsulation:2,changeDetection:0})}}return n})(),pn=(()=>{class n{constructor(){this.#e=b(H),this.value=g(),this.label=g(),this.asFreeText=g(!1),this.placeholder=g(),this.readonly=A(!1),this.disabled=A(!1),this.lazySearch=g(!1),this.inlineSearch=g(!1),this.asText=g(!1),this.isClearable=g(!0),this.selectMultiple=g(!1),this.optionTemplate=g(null),this.selectedOptionTemplate=g(null),this.placeholderTemplate=g(null),this.isOpen=A(!1),this.isLoading=A(!1),this.options=A([]),this.selectedOptions=A([]),this.cleared=X(),this.inlineTemplate=Fe(oe),this.optionsWrapRef=U.required("optionsWrap"),this.inputRefInput=C(null),this.#i=typeof MutationObserver<"u"&&new MutationObserver(t=>{for(var e of t)e&&(e.target.nodeName==="INPUT"||e.target.nodeName==="TEXTAREA")&&(this.inputRefInput.set(new H(e.target)),this.#i.disconnect())}),this.inputValue=C(""),this.prevInputValue=C(null),this.focusedOptionIndex=C(-1),this._isClearable=D(()=>this.selectMultiple()||this.isClearable()),this.selectClasses=D(()=>this.#e.nativeElement.classList.toString()),this.stretch=D(()=>this.selectClasses().includes("stretch")),this.placeholderText=D(()=>{let t=this.placeholder(),e=this.inputRefEl();return t||e?.placeholder||null}),this.selectedOptionValues=D(()=>{let t=this.selectedOptions(),e=this.value();return e?t.map(i=>this.#o(i,e)):t}),this.filteredOptions=D(()=>{let t=this.options()||[],e=this.label(),i=this.value(),o=this.inlineSearch(),s=this.inputValue().toLowerCase(),r=this.#a(s);if(t.length<=0)return[];if(!o||s==="")return t;let l=t.filter(u=>{let w=e?(this.#o(u,e)??"").toString().toLowerCase():(u??"").toString().toLowerCase(),V=((i?this.#o(u,i):u)??"").toString().toLowerCase(),P=r.test(w),F=r.test(V);return P||F}).map(u=>{let w=e?(this.#o(u,e)??"").toString().toLowerCase():(u??"").toString().toLowerCase(),V=((i?this.#o(u,i):u)??"").toString().toLowerCase(),P=this.#t(w,s),F=this.#t(V,s);return{item:u,score:Math.max(P,F)}});return l.sort((u,w)=>w.score-u.score),l.map(u=>u.item)}),this.inputRefEl=D(()=>{let t=this.inputRefInput();if(t===null)return;let e=t?t.nativeElement:null;return e?(e.autocomplete="off",this.#r(e),e.addEventListener("focus",()=>{this.readonly()||this.open()}),this.hasSearch()&&e.addEventListener("input",i=>{let o=i.target.value,s=this.inputValue();o!==s&&(this.focusedOptionIndex.set(this.asFreeText()?-1:0),this.inputValue.set(o),this.updateInputElValue())}),e.addEventListener("inputValueChanged",i=>{let o=i.detail.value,s=this.inputValue();if(o!==s){if(o===""){this.clear();return}this.setSelectedOptionsFromValue(o),this.setInputValueFromSelectedOptions(),this.#s()}}),e):(console.warn("<spk-select> input element not found are you missing to pass an <input> or <textarea> element to select component?"),null)}),this.openAbortController=null,this.isOpenEffect=R(()=>{if(this.isOpen()){this.openAbortController||(this.openAbortController=new AbortController);let e=this.inputRefEl();if(!e)return;e.addEventListener("keydown",i=>{if((i.key==="Escape"||i.key==="Tab")&&(i.preventDefault(),this.close()),(i.key==="Enter"||i.key===" ")&&(i.preventDefault(),this.toggleOptionByIndex(this.focusedOptionIndex())),i.key==="ArrowDown"){i.preventDefault();let o=this.focusedOptionIndex()+1;this.focusedOptionIndex.set(o>this.filteredOptions().length-1?0:o)}if(i.key==="ArrowUp"){i.preventDefault();let o=this.focusedOptionIndex()-1;this.focusedOptionIndex.set(o<0?this.filteredOptions().length-1:o)}},{signal:this.openAbortController?.signal})}else{if(!this.inputRefEl())return;this.openAbortController&&(this.openAbortController.abort(),this.openAbortController=null)}}),this._inputValue="",this.inputValueEffect=R(()=>{let t=this.inputValue();this._inputValue=t}),this.inputRefElEffect=R(()=>{let t=this.inputRefEl();t&&t.value!==this._inputValue&&(this.disabled.set(t.disabled),this.setSelectedOptionsFromValue(t.value),this.setInputValueFromSelectedOptions())}),this.selectedLabels=D(()=>{let t=this.selectedOptions();return this.label()?t.map(i=>this.getLabel(i)).join(", "):t.join(", ")}),this.inputState=D(()=>(this.selectedOptions().length>0||this.asFreeText()&&this.inputValue().length>0)&&!this.isOpen()?"selected":this.isLoading()?"loading":this.isOpen()&&(this.lazySearch()||this.inlineSearch())?"open-searching":this.isOpen()?"open":this.inlineSearch()||this.lazySearch()?"searching":"closed"),this.hasSearch=D(()=>this.inlineSearch()||this.lazySearch()),this.#n=R(()=>{if(this.selectMultiple()&&this.hasSearch())return;let t=this.selectedOptions(),e=this.value(),i=t.map(o=>e?this.#o(o,e):o).join(",");this.inputValue.set(i)})}#e;#i;#t(t,e){if(!e)return 0;let i=0,o=-1,s=0,r=!0;for(let p=0;p<e.length;p++){let l=e[p];if(t.length>o+1&&t[o+1]===l)i+=p===0?100:150,o++,s++;else{let u=t.indexOf(l,o+1);if(p>0&&(r=!1),u===-1)return 0;i+=100,o=u,s++}}return r&&e.length===s&&(i+=1e3),i+=s*20,i}#n;ngOnInit(){this.setInitInput()}setInitInput(){let t=this.#e.nativeElement.querySelector("input");if(t){this.inputRefInput.set(new H(t));return}let e=this.#e.nativeElement.querySelector("textarea");if(e){this.inputRefInput.set(new H(e));return}typeof MutationObserver<"u"&&this.#i.observe(this.#e.nativeElement,{attributes:!0,childList:!0,subtree:!0,characterData:!0})}setSelectedOptionsFromValue(t){let e=this.options()||[],i=this.value(),o=this.selectMultiple(),s=t.toString().split(",");if(s.length===0){this.selectedOptions.set([]);return}let r=o?s:[s[0]],p=e.filter(l=>{let u=i?this.#o(l,i)?.toString():l?.toString();return u&&r.includes(u)});this.selectedOptions.set(o?p:[p[0]])}setInputValueFromSelectedOptions(){let t=this.selectedOptions(),e=this.value();if(t.length===0){this.inputValue.set(""),this.updateInputElValue();return}let i=t.map(o=>e?this.#o(o,e):o).join(",");this.inputValue.set(i),this.updateInputElValue()}getLabel(t){let e=this.label();return e?this.#o(t,e):t}toggleOptionByIndex(t,e){let i=this.filteredOptions()[t];if(this.asFreeText()&&t===-1||!i){this.close();return}e&&e.stopPropagation();let o=this.selectMultiple(),s=this._isClearable(),r=this.value(),p=this.selectedOptionValues(),l=r?this.#o(i,r):i;this.prevInputValue.set(null),this.selectedOptions.update(u=>{let w=p.indexOf(l);if(w>-1){let V=[...u.slice(0,w),...u.slice(w+1)];return s||V.length>0?V:u}else return this.focusedOptionIndex.set(t),o?[...u,i]:[i]}),o?this.inputRefEl()?.focus():this.isOpen.set(!1),this.setInputValueFromSelectedOptions(),o&&this.hasSearch()&&(this.inputValue.set(""),this.updateInputElValue())}removeSelectedOptionByIndex(t,e){t.stopPropagation(),this.selectedOptions.update(i=>[...i.slice(0,e),...i.slice(e+1)]),this.setInputValueFromSelectedOptions()}isSelected(t){let e=this.value(),i=this.filteredOptions()[t],o=e?this.#o(i,e):i;return this.selectedOptionValues().indexOf(o)>-1}open(){this.isOpen()||(this.isOpen.set(!0),this.hasSearch()&&(this.prevInputValue.set(this.inputValue()??""),this.inputValue.set(""),this.updateInputElValue()),this.selectMultiple()||this.#s())}#s(){let t=this.selectedOptionValues()[0],e=this.value();if(t){let i=this.filteredOptions().findIndex(o=>e?this.#o(o,e)===t:o===t);this.focusedOptionIndex.set(i)}else this.focusedOptionIndex.set(-1)}close(){this.isOpen.set(!1);let t=this.prevInputValue();if(this.asFreeText()){this.updateInputElValue();return}this.hasSearch()&&t&&(this.inputValue.set(t),this.setInputValueFromSelectedOptions()),this.selectMultiple()&&this.setInputValueFromSelectedOptions()}clear(t){t?.stopPropagation(),this.inputValue.set(""),this.selectedOptions.set([]),this.isOpen.set(!1),this.prevInputValue.set(null),this.cleared.emit(),this.updateInputElValue()}updateInputElValue(){let t=this.inputRefEl(),e=this.inputValue();t&&(t.value=e,t.dispatchEvent(new Event("input")))}#o(t,e){return e.split(".").reduce((i,o)=>i?.[o],t)}#r(t){Object.defineProperty(t,"value",{configurable:!0,get(){return Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t),"value").get.call(this)},set(e){Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t),"value").set.call(this,e);let o=new CustomEvent("inputValueChanged",{bubbles:!0,cancelable:!0,detail:{value:e}});return this.dispatchEvent(o),e}})}#a(t){let e=(t??"").toLowerCase(),i="^";for(let o of e)i+=".*"+this.#l(o);return i+=".*$",new RegExp(i,"i")}#l(t){return t.replace(/[-\/\\^$+?.()|[\]{}]/g,"\\$&")}ngOnDestroy(){this.openAbortController&&(this.openAbortController.abort(),this.openAbortController=null),typeof MutationObserver<"u"&&this.#i.disconnect()}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=S({type:n,selectors:[["spk-select"]],contentQueries:function(e,i,o){e&1&&Be(o,i.inlineTemplate,oe,5),e&2&&Y()},viewQuery:function(e,i){e&1&&N(i.optionsWrapRef,Ot,5),e&2&&Y()},hostVars:2,hostBindings:function(e,i){e&2&&I("multiple",i.selectMultiple())},inputs:{value:[1,"value"],label:[1,"label"],asFreeText:[1,"asFreeText"],placeholder:[1,"placeholder"],readonly:[1,"readonly"],disabled:[1,"disabled"],lazySearch:[1,"lazySearch"],inlineSearch:[1,"inlineSearch"],asText:[1,"asText"],isClearable:[1,"isClearable"],selectMultiple:[1,"selectMultiple"],optionTemplate:[1,"optionTemplate"],selectedOptionTemplate:[1,"selectedOptionTemplate"],placeholderTemplate:[1,"placeholderTemplate"],isOpen:[1,"isOpen"],isLoading:[1,"isLoading"],options:[1,"options"],selectedOptions:[1,"selectedOptions"]},outputs:{readonly:"readonlyChange",disabled:"disabledChange",isOpen:"isOpenChange",isLoading:"isLoadingChange",options:"optionsChange",selectedOptions:"selectedOptionsChange",cleared:"cleared"},ngContentSelectors:Tt,decls:32,vars:22,consts:[["formFieldWrapper",""],["optionsWrap",""],[3,"isOpenChange","closed","isOpen","disableOpenByClick","options"],["trigger","",3,"click"],["ngProjectAs","input",5,["input"],1,"input"],[1,"selected-value"],["suffix",""],["suffix","",1,"primary"],[1,"sparkle-options"],[1,"option",3,"selected","focused"],[1,"small",3,"class"],[1,"small"],[3,"click"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[4,"ngTemplateOutlet"],["suffix","",3,"click"],[1,"option",3,"click"],[3,"class","active"]],template:function(e,i){if(e&1){let o=z();x(Et),ae(0)(1)(2)(3)(4)(5)(6)(7)(8)(9),a(10,"spk-popover",2,0),ye("isOpenChange",function(r){return k(o),ke(i.isOpen,r)||(i.isOpen=r),y(r)}),E("closed",function(){return k(o),y(i.close())}),a(12,"spk-form-field",3),E("click",function(){return k(o),y(i.open())}),h(13,0,["ngProjectAs","label",5,["label"]]),a(14,"div",4)(15,"div",5),O(16,It,1,1)(17,zt,2,0)(18,Qt,2,1),h(19,1),h(20,2),c()(),O(21,Yt,2,0,"spk-icon",6)(22,Xt,1,0,"spk-spinner",7)(23,Gt,2,0,"spk-icon",6)(24,Kt,2,0,"spk-icon",6)(25,Jt,2,0,"spk-icon",6)(26,Zt,2,0,"spk-icon",6)(27,ei,2,0,"spk-icon",6),c(),a(28,"div",8,1),ve(30,si,4,6,"li",9,ge),c()()}if(e&2){J(i.placeholderTemplate());let o=i.optionTemplate(),s=i.selectedOptionTemplate(),r=i.inlineTemplate();m(4);let p=J(i.selectedOptions()),l=i.inputState();m(2),J(s||o||r),m(),J(o||r),m();let u=J(!i.asText()&&i.selectMultiple());m();let w=J(i.isOpen()&&i.hasSearch()&&(u||i.inputValue().length>0));m(),Se("isOpen",i.isOpen),G("disableOpenByClick",!0)("options",De(21,Mt)),m(2),I("stretch",i.stretch())("autosize",i.selectMultiple())("readonly",i.readonly()||i.disabled()),m(2),I("show-search-text",w),m(),I("is-selected",l==="selected"),m(),T(i.asFreeText()&&i.inputValue().length>0&&!i.isOpen()?16:p.length>0?17:w?-1:18),m(5),T(l==="closed"?21:l==="loading"?22:l==="open-searching"?23:l==="searching"?24:l==="selected"&&i._isClearable()?25:l==="selected"&&!i._isClearable()?26:27),m(9),Ce(i.filteredOptions())}},dependencies:[ze,Ne,Ee,te,xi,Ti,wi],encapsulation:2,changeDetection:0})}}return n})(),dn=(()=>{class n{constructor(){this.#e=b(ce,{optional:!0}),this.#i=C(this.#e?.sidenavType),this.openWidth=280,this.openWidthTreshold=this.openWidth*.9,this.disableDrag=g(!1),this.isOpen=A(!1),this.type=g(void 0),this._type=D(()=>this.type()?this.type():this.#e?.sidenavType),this.dragImageElement=U.required("dragImageElement"),this.dragIsEnding=C(!1),this.dragIsOnScreen=C(!0),this.isDragging=C(!1),this.dragPositionX=C(0),this.dragActualPositionX=D(()=>{let t=this.dragPositionX(),e=.32;return t>this.openWidthTreshold?this.openWidthTreshold+(t-this.openWidthTreshold)*e:t}),this.draggingStyle=D(()=>this._type()!=="overlay"?null:this.isDragging()?`translateX(${this.dragActualPositionX()}px)`:this.isOpen()?`translateX(${this.openWidth}px)`:"translateX(0px)"),this.draggingEffect=R(()=>{this.isDragging()&&document.body.classList.add("dragging")})}#e;#i;drop(t){t.stopPropagation(),this.#t(t.clientX)}#t(t){this.isDragging.set(!1),t<=0?this.isOpen.set(!1):t>this.openWidthTreshold?this.isOpen.set(!0):t<this.openWidthTreshold&&(!this.isOpen()&&t<this.openWidthTreshold*.6?this.isOpen.set(!0):this.isOpen.set(!1))}dragEnd(t){(t.clientX<0||!this.dragIsOnScreen())&&this.#t(0)}dragEnter(){this.dragIsOnScreen.set(!0)}dragLeave(){this.dragIsOnScreen.set(!1)}dragOver(t){t.preventDefault(),this.#n(t)}dragStart(t){t.stopPropagation(),this.isDragging.set(!0),this.#n(t)}#n(t){t.dataTransfer?.setDragImage(this.dragImageElement().nativeElement,0,0)}drag(t){t.stopPropagation(),setTimeout(()=>{this.isDragging()&&this.dragIsOnScreen()&&this.dragPositionX.set(t.clientX)}),this.#n(t)}touchStart(t){t.stopPropagation(),this.isDragging.set(!0)}touchMove(t){t.stopPropagation(),setTimeout(()=>{this.isDragging()&&this.dragIsOnScreen()&&this.dragPositionX.set(t.touches[0].clientX)})}touchEnd(t){t.stopPropagation(),this.#t(t.changedTouches[0].clientX)}touchCancel(t){t.stopPropagation(),this.isDragging.set(!1)}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=S({type:n,selectors:[["spk-sidenav"]],viewQuery:function(e,i){e&1&&N(i.dragImageElement,ri,5),e&2&&Y()},hostVars:8,hostBindings:function(e,i){e&2&&(Q(i._type()),I("open",i.isOpen())("closed",!i.isOpen())("is-dragging",i.isDragging()))},inputs:{disableDrag:[1,"disableDrag"],isOpen:[1,"isOpen"],type:[1,"type"]},outputs:{isOpen:"isOpenChange"},ngContentSelectors:li,decls:10,vars:5,consts:[["dragImageElement",""],[1,"drag-image"],[1,"dropping-surface"],[1,"sidenav"],[1,"main-wrap"],["draggable","true",1,"dragable"],[1,"closed-topbar"],[1,"dropping-surface",3,"drop","dragover","dragenter","dragleave"],["draggable","true",1,"dragable",3,"dragstart","dragend","drag","touchstart","touchmove","touchend","touchcancel"]],template:function(e,i){e&1&&(x(ai),O(0,ci,2,0,"div",1)(1,pi,1,0,"div",2),a(2,"div",3),h(3),c(),a(4,"div",4),O(5,di,1,0,"div",5),a(6,"div",6),h(7,1),c(),a(8,"main"),h(9,2),c()()),e&2&&(T(i.type()==="overlay"?0:-1),m(),T(i.type()==="overlay"&&i.isDragging()?1:-1),m(3),j("transform",i.draggingStyle()),m(),T(i.type()==="overlay"&&!i.disableDrag()?5:-1))},encapsulation:2,changeDetection:0})}}return n})();var un=(()=>{class n{static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=S({type:n,selectors:[["spk-stepper"]],ngContentSelectors:L,decls:1,vars:0,template:function(e,i){e&1&&(x(),h(0))},encapsulation:2,changeDetection:0})}}return n})();var hn=(()=>{class n{constructor(){this.#e=b(Mi),this.spkSort=g(),this.sortAsc=D(()=>{let t=this.#e.sortByColumn(),e=this.spkSort();return!t||!e?!1:t===e}),this.sortDesc=D(()=>{let t=this.#e.sortByColumn(),e=this.spkSort();return!t||!e?!1:t===`-${e}`})}#e;toggleSort(){let t=this.spkSort();t&&this.#e.toggleSort(t)}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275dir=se({type:n,selectors:[["","spkSort",""]],hostAttrs:[1,"sortable"],hostVars:4,hostBindings:function(e,i){e&1&&E("mousedown",function(){return i.toggleSort()}),e&2&&I("sort-asc",i.sortAsc())("sort-desc",i.sortDesc())},inputs:{spkSort:[1,"spkSort"]}})}}return n})();var ee=1.5,Mi=(()=>{class n{constructor(){this.#e=b(H),this.#i=b(ce,{optional:!0}),this.loading=g(!1),this.data=g([]),this.dataChange=X(),this.sortByColumn=A(null),this.thead=U("thead"),this.columns=Qe(this.thead,["TH"]),this.class=C(this.#i?.tableType??"default"),this.resizing=C(!1),this.sizeTrigger=C(!0),this.#t=null,this.#n=C(!1),this.scrollXState=C(-1),this.scrollYState=C(-1),this.canScrollX=C(!1),this.canScrollY=C(!1),this.columnSizes=D(()=>{this.sizeTrigger();let t=this.columns.signal();return t.reduce((e,i,o)=>{let s=i,r=o===t.length-1;return s.dataset.size?`${e} ${s.dataset.size}`:s.classList.contains("sticky")||s.classList.contains("sticky-end")?`${e} min-content`:r?`${e} 1fr`:`${e} 1fr`},"")}),this.e=R(()=>{let t=this.sortByColumn();if(t===null)return this.#n()||(this.#t=this.data(),this.#n.set(!0)),this.dataChange.emit(structuredClone(this.#t));let e=t.startsWith("-")?t.slice(1):t,i=t.startsWith("-"),o=this.data().sort((s,r)=>{let p=s[e],l=r[e],u=0;return typeof p=="number"&&typeof l=="number"&&(u=p-l),p instanceof Date&&l instanceof Date&&(u=p.getTime()-l.getTime()),typeof p=="string"&&typeof l=="string"&&(u=p.localeCompare(l,void 0,{sensitivity:"base"})),i?-u:u});this.dataChange.emit(o)})}#e;#i;#t;#n;updateColumnSizes(){this.sizeTrigger.set(!this.sizeTrigger())}onScroll(){this.#s()}onResize(t){this.#s()}ngAfterViewInit(){queueMicrotask(()=>this.#s())}toggleSort(t){let e=this.sortByColumn(),i=e===t?`-${t}`:e===`-${t}`?null:t;this.sortByColumn.set(i)}#s(){let t=this.#e.nativeElement,e=-1,i=-1,o=t.scrollWidth>t.clientWidth+ee;if(o){let r=t.scrollLeft<=ee;t.scrollWidth-(t.scrollLeft+t.clientWidth)<ee?e=1:r||(e=0)}this.scrollXState.set(e),this.canScrollX.set(o);let s=t.scrollHeight>t.clientHeight+ee;if(s){let r=t.scrollTop<=ee;t.scrollHeight-(t.scrollTop+t.clientHeight)<ee?i=1:r||(i=0)}this.scrollYState.set(i),this.canScrollY.set(s)}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=S({type:n,selectors:[["spk-table"]],viewQuery:function(e,i){e&1&&N(i.thead,ui,5),e&2&&Y()},hostVars:18,hostBindings:function(e,i){e&1&&E("scroll",function(){return i.onScroll()})("resize",function(s){return i.onResize(s)},!1,Pe),e&2&&(Q(i.class()),j("grid-template-columns",i.columnSizes()),I("resizing",i.resizing())("can-scroll-x",i.canScrollX())("can-scroll-y",i.canScrollY())("scrolled-x",i.scrollXState()>=0)("scrolled-x-end",i.scrollXState()===1)("scrolled-y",i.scrollYState()>=0)("scrolled-y-end",i.scrollYState()===1))},inputs:{loading:[1,"loading"],data:[1,"data"],sortByColumn:[1,"sortByColumn"]},outputs:{dataChange:"dataChange",sortByColumn:"sortByColumnChange"},ngContentSelectors:fi,decls:7,vars:2,consts:[["thead",""],[1,"indeterminate","primary"],[1,"no-rows"]],template:function(e,i){e&1&&(x(hi),a(0,"thead",null,0),h(2),O(3,mi,1,0,"spk-progress-bar",1),c(),a(4,"tbody"),h(5,1),c(),O(6,gi,2,0,"div",2)),e&2&&(m(3),T(i.loading()?3:-1),m(3),T(i.loading()?-1:6))},dependencies:[Ei],encapsulation:2,changeDetection:0})}}return n})(),fn=(()=>{class n{static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=S({type:n,selectors:[["spk-tabs"]],ngContentSelectors:L,decls:1,vars:0,template:function(e,i){e&1&&(x(),h(0))},encapsulation:2,changeDetection:0})}}return n})(),mn=(()=>{class n{constructor(){this.isActive=A(!1),this.disallowToggle=g(!1)}ngOnInit(){this.disallowToggle()&&this.isActive.set(!0)}toggle(){this.isActive.set(!this.isActive())}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=S({type:n,selectors:[["spk-toggle-card"]],hostVars:2,hostBindings:function(e,i){e&2&&I("active",i.isActive())},inputs:{isActive:[1,"isActive"],disallowToggle:[1,"disallowToggle"]},outputs:{isActive:"isActiveChange"},ngContentSelectors:Ci,decls:6,vars:1,consts:[[3,"click"],[1,"toggle-icon"],[1,"content"]],template:function(e,i){e&1&&(x(vi),a(0,"h3",0),E("click",function(){return i.disallowToggle()||i.toggle()}),h(1,0,null,_i,1,0),O(3,Si,2,0,"spk-icon",1),c(),a(4,"div",2),h(5,1),c()),e&2&&(m(3),T(i.disallowToggle()?-1:3))},dependencies:[te],encapsulation:2,changeDetection:0})}}return n})(),gn=(()=>{class n{static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=S({type:n,selectors:[["spk-toggle"]],ngContentSelectors:L,decls:3,vars:0,consts:[[1,"box"],[1,"knob"]],template:function(e,i){e&1&&(x(),a(0,"div",0),q(1,"div",1),c(),h(2))},encapsulation:2,changeDetection:0})}}return n})();var vn=(()=>{class n{constructor(){this.filesOver=C(!1),this.filesDropped=X()}onDragOver(t){t.preventDefault(),t.stopPropagation(),this.filesOver.set(!0)}onDragLeave(t){t.preventDefault(),t.stopPropagation(),this.filesOver.set(!1)}ondrop(t){t.preventDefault(),t.stopPropagation(),this.filesOver.set(!1);let e=t.dataTransfer?.files;e&&e.length>0&&this.filesDropped.emit(e)}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275dir=se({type:n,selectors:[["","spkDragDrop",""]],hostVars:2,hostBindings:function(e,i){e&1&&E("dragover",function(s){return i.onDragOver(s)})("dragleave",function(s){return i.onDragLeave(s)})("drop",function(s){return i.ondrop(s)}),e&2&&I("filesover",i.filesOver())},outputs:{filesDropped:"filesDropped"}})}}return n})();var Ii=(()=>{class n{constructor(){this.positionAnchorName=g.required()}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=S({type:n,selectors:[["sparkle-tooltip-wrapper"]],hostVars:2,hostBindings:function(e,i){e&2&&j("position-anchor",i.positionAnchorName())},inputs:{positionAnchorName:[1,"positionAnchorName"]},ngContentSelectors:L,decls:2,vars:0,consts:[[1,"tooltip-content"]],template:function(e,i){e&1&&(x(),a(0,"div",0),h(1),c())},encapsulation:2})}}return n})(),Cn=(()=>{class n{constructor(){this.spkTooltip=g.required(),this.#e=b(H),this.#i=b(Ae),this.#t=b(Re),this.#n=b(me),this.#s=null,this.#o=null,this.anchorName=C(`--${Oe()}`),this.manageWrapperEffect=R(()=>{let t=this.spkTooltip();if(this.cleanupTooltip(),t){let e;typeof t=="string"?e=[this.#n.createText(t)]:t instanceof oe?(this.#o=t.createEmbeddedView(null),this.#o.detectChanges(),e=this.#o.rootNodes):e=[],e.length>0&&(this.#s=this.#i.createComponent(Ii,{environmentInjector:this.#t,projectableNodes:[e]}),this.#s.setInput("positionAnchorName",this.anchorName()),this.#s.changeDetectorRef.detectChanges())}})}#e;#i;#t;#n;#s;#o;onClick(t){let e=this.#e.nativeElement;(e.hasAttribute("disabled")||e.hasAttribute("readonly"))&&(t.preventDefault(),t.stopPropagation())}cleanupTooltip(){this.#s&&(this.#s.destroy(),this.#s=null),this.#o&&(this.#o.destroy(),this.#o=null)}ngOnDestroy(){this.cleanupTooltip()}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275dir=se({type:n,selectors:[["","spkTooltip",""]],hostAttrs:[1,"tooltip"],hostVars:2,hostBindings:function(e,i){e&1&&E("click",function(s){return i.onClick(s)}),e&2&&j("anchor-name",i.anchorName())},inputs:{spkTooltip:[1,"spkTooltip"]}})}}return n})();export{te as a,Ji as b,Zi as c,yi as d,en as e,tn as f,Di as g,nn as h,xi as i,wi as j,on as k,Ee as l,sn as m,rn as n,an as o,Ei as p,ln as q,cn as r,Ti as s,pn as t,dn as u,un as v,hn as w,Mi as x,fn as y,mn as z,gn as A,vn as B,Cn as C};
@@ -0,0 +1 @@
1
+ import{j as a,k as b}from"./chunk-WRPHCCP7.js";import"./chunk-44DHERTN.js";import"./chunk-54VPI5KJ.js";import"./chunk-WFAZP46A.js";import"./chunk-V756QT7J.js";import"./chunk-EQWH3TBL.js";import"./chunk-TQHNKGRL.js";import"./chunk-F2GEUOGZ.js";import"./chunk-BIZAKOYU.js";import"./chunk-RHW5QVAY.js";import"./chunk-ELMONRIG.js";import"./chunk-C6XTRC7P.js";import"./chunk-MAVZY7BL.js";import"./chunk-SL6SRYFT.js";import"./chunk-S5EF63OY.js";import"./chunk-7L2WUS2V.js";import"./chunk-L72ALLHJ.js";import"./chunk-7CGTOI24.js";export{a as createSourceDataForm,b as default};
@@ -0,0 +1 @@
1
+ import{h as a,i as b}from"./chunk-WRPHCCP7.js";import"./chunk-44DHERTN.js";import"./chunk-54VPI5KJ.js";import"./chunk-WFAZP46A.js";import"./chunk-V756QT7J.js";import"./chunk-EQWH3TBL.js";import"./chunk-TQHNKGRL.js";import"./chunk-F2GEUOGZ.js";import"./chunk-BIZAKOYU.js";import"./chunk-RHW5QVAY.js";import"./chunk-ELMONRIG.js";import"./chunk-C6XTRC7P.js";import"./chunk-MAVZY7BL.js";import"./chunk-SL6SRYFT.js";import"./chunk-S5EF63OY.js";import"./chunk-7L2WUS2V.js";import"./chunk-L72ALLHJ.js";import"./chunk-7CGTOI24.js";export{a as SCHEDULE_FIELD_DEFAULTS,b as default};
@@ -1 +1 @@
1
- import{a as P,c as A}from"./chunk-BJGA55H2.js";import{e as d}from"./chunk-P4ZFQZCA.js";import{h as k}from"./chunk-S5EF63OY.js";import{ua as M}from"./chunk-7L2WUS2V.js";import{Ac as y,Db as m,Eb as f,Fb as _,O as C,Oc as g,Pb as v,Pc as b,Qb as E,Rb as N,Sb as I,T as c,Tb as F,Ua as T,Z as s,gb as O,i as S,va as n,yc as w}from"./chunk-L72ALLHJ.js";var r=class o{reconnectTimer=n(15e3);countdown=n(0);connectTimerEffect=b(()=>{let t=this.reconnectTimer();this.countdown.set(t/1e3)});interval=setInterval(()=>{if(this.countdown()<=1){this.countdown.set(this.reconnectTimer()/1e3);return}this.countdown.set(this.countdown()-1)},1e3);ngOnDestroy(){clearInterval(this.interval)}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=O({type:o,selectors:[["app-disconnected-dialog"]],decls:8,vars:4,consts:()=>{let t;t=$localize`Reconnecting...`;let e;return e=$localize` The connection to the server is lost, attempting again in ${"\uFFFD#6\uFFFD"}:START_TAG_STRONG:0:${"\uFFFD0\uFFFD"}:INTERPOLATION:${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_STRONG:`,[t,e,["header",""],["content",""]]},template:function(e,i){e&1&&(m(0,"header",2)(1,"h3"),N(2,0),f()(),m(3,"div",3)(4,"p"),v(5,1),_(6,"strong"),w(7,"number"),E(),f()()),e&2&&(T(7),I(y(7,1,i.countdown(),"2.0-0")),F(5))},dependencies:[M],styles:["[_nghost-%COMP%]{display:block;padding:1rem}"],changeDetection:0})};var h=class o{dialog=s(d);#o=s(k);#t=n("disconnected");#e=n(null);#s=n(-1);#n=n(0);#i=n(!1);#c=new S;connectionStatus=this.#t.asReadonly();serverState=this.#e.asReadonly();#r=void 0;duration=s(P).relayIsEnabled()?"94s":"299s";start(){this.#i.set(!0),this.#c=new S,this.#a()}stop(){this.#c.next(),this.#c.complete(),this.#i.set(!1)}reconnect(){this.stop(),this.start()}reconnectIfNeeded(){console.log("reconnectIfNeeded"),!this.#i()&&this.reconnect()}#a(){this.#t.set("connecting"),this.#o.getApiV1Serverstate({lastEventId:this.#s(),longpoll:this.#s()>0,duration:this.duration}).pipe(C(this.#c)).subscribe({next:t=>{t&&this.#l(t),this.#d()},error:t=>{let i=this.#n()+1,l=Math.min(5e3*i,3e4);this.#n.set(i),i>3&&this.#t.set("disconnected"),this.#r||(this.#r=this.dialog.open(r,{closeOnButton:!1,closeOnEsc:!1,closeOnOutsideClick:!1})),this.#r.component.reconnectTimer.set(l),setTimeout(()=>{this.#a()},l)}})}#l(t){this.#t.set("connected"),this.#e.set(t),this.#s.set(t.LastEventID||-1),this.#n.set(0)}#d(){this.#i()&&this.#a()}static \u0275fac=function(e){return new(e||o)};static \u0275prov=c({token:o,factory:o.\u0275fac,providedIn:"root"})};var p=class o{#o=s(A);dialog=s(d);#t=null;#e=n("disconnected");#s=n(null);#n=void 0;shouldConnect=n(!0);connectionStatus=this.#e.asReadonly();serverState=this.#s.asReadonly();start(){this.#i(),this.shouldConnect.set(!0)}#i(){let t=this.#o.token();if(!t){console.error("No access token available");return}let e=window.location.protocol==="https:"?"wss:":"ws:",i=window.location.port?`:${window.location.port}`:"";window.location.port==="4200"&&(i=":8200");let l=window.location.hostname,$=`${e}//${l}${i}/notifications?token=${t}`;this.#e.set("connecting"),this.#t=new WebSocket($),this.#t.onopen=()=>{console.log("WebSocket connection established"),this.#e.set("connected"),this.#n&&this.#n.close()},this.#t.onmessage=a=>{try{let u=JSON.parse(a.data);this.#s.set(u)}catch(u){console.error("Error parsing WebSocket message",u)}},this.#t.onclose=a=>{console.log("WebSocket connection closed",a),this.#e.set("disconnected"),this.shouldConnect()&&(this.#n||(this.#n=this.dialog.open(r,{closeOnButton:!1,closeOnEsc:!1,closeOnOutsideClick:!1}),this.#n.component.reconnectTimer.set(15e3)),setTimeout(()=>this.#i(),5e3))},this.#t.onerror=a=>{console.error("WebSocket error",a),this.#e.set("disconnected")}}stop(){this.shouldConnect.set(!1),this.#t?.close()}reconnect(){this.#t?.close(),this.start()}reconnectIfNeeded(){this.#t?.readyState!==WebSocket.OPEN&&this.reconnect()}static \u0275fac=function(e){return new(e||o)};static \u0275prov=c({token:o,factory:o.\u0275fac,providedIn:"root"})};var R=class o{#o=s(p);#t=s(h);#e=n("longpoll");connectionStatus=g(()=>this.#e()==="websocket"?this.#o.connectionStatus():this.#t.connectionStatus());serverState=g(()=>this.#e()==="websocket"?this.#o.serverState():this.#t.serverState());setConnectionMethod(t){t==="websocket"?(this.#o.reconnectIfNeeded(),this.#t.stop()):(this.#t.reconnectIfNeeded(),this.#o.stop()),this.#e.set(t)}getConnectionMethod(){return this.#e()}static \u0275fac=function(e){return new(e||o)};static \u0275prov=c({token:o,factory:o.\u0275fac,providedIn:"root"})};export{R as a};
1
+ import{a as P,c as A}from"./chunk-BJGA55H2.js";import{e as d}from"./chunk-SL6SRYFT.js";import{h as k}from"./chunk-S5EF63OY.js";import{ua as M}from"./chunk-7L2WUS2V.js";import{Ac as y,Db as m,Eb as f,Fb as _,O as C,Oc as g,Pb as v,Pc as b,Qb as E,Rb as N,Sb as I,T as c,Tb as F,Ua as T,Z as s,gb as O,i as S,va as n,yc as w}from"./chunk-L72ALLHJ.js";var r=class o{reconnectTimer=n(15e3);countdown=n(0);connectTimerEffect=b(()=>{let t=this.reconnectTimer();this.countdown.set(t/1e3)});interval=setInterval(()=>{if(this.countdown()<=1){this.countdown.set(this.reconnectTimer()/1e3);return}this.countdown.set(this.countdown()-1)},1e3);ngOnDestroy(){clearInterval(this.interval)}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=O({type:o,selectors:[["app-disconnected-dialog"]],decls:8,vars:4,consts:()=>{let t;t=$localize`Reconnecting...`;let e;return e=$localize` The connection to the server is lost, attempting again in ${"\uFFFD#6\uFFFD"}:START_TAG_STRONG:0:${"\uFFFD0\uFFFD"}:INTERPOLATION:${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_STRONG:`,[t,e,["header",""],["content",""]]},template:function(e,i){e&1&&(m(0,"header",2)(1,"h3"),N(2,0),f()(),m(3,"div",3)(4,"p"),v(5,1),_(6,"strong"),w(7,"number"),E(),f()()),e&2&&(T(7),I(y(7,1,i.countdown(),"2.0-0")),F(5))},dependencies:[M],styles:["[_nghost-%COMP%]{display:block;padding:1rem}"],changeDetection:0})};var h=class o{dialog=s(d);#o=s(k);#t=n("disconnected");#e=n(null);#s=n(-1);#n=n(0);#i=n(!1);#c=new S;connectionStatus=this.#t.asReadonly();serverState=this.#e.asReadonly();#r=void 0;duration=s(P).relayIsEnabled()?"94s":"299s";start(){this.#i.set(!0),this.#c=new S,this.#a()}stop(){this.#c.next(),this.#c.complete(),this.#i.set(!1)}reconnect(){this.stop(),this.start()}reconnectIfNeeded(){console.log("reconnectIfNeeded"),!this.#i()&&this.reconnect()}#a(){this.#t.set("connecting"),this.#o.getApiV1Serverstate({lastEventId:this.#s(),longpoll:this.#s()>0,duration:this.duration}).pipe(C(this.#c)).subscribe({next:t=>{t&&this.#l(t),this.#d()},error:t=>{let i=this.#n()+1,l=Math.min(5e3*i,3e4);this.#n.set(i),i>3&&this.#t.set("disconnected"),this.#r||(this.#r=this.dialog.open(r,{closeOnButton:!1,closeOnEsc:!1,closeOnOutsideClick:!1})),this.#r.component.reconnectTimer.set(l),setTimeout(()=>{this.#a()},l)}})}#l(t){this.#t.set("connected"),this.#e.set(t),this.#s.set(t.LastEventID||-1),this.#n.set(0)}#d(){this.#i()&&this.#a()}static \u0275fac=function(e){return new(e||o)};static \u0275prov=c({token:o,factory:o.\u0275fac,providedIn:"root"})};var p=class o{#o=s(A);dialog=s(d);#t=null;#e=n("disconnected");#s=n(null);#n=void 0;shouldConnect=n(!0);connectionStatus=this.#e.asReadonly();serverState=this.#s.asReadonly();start(){this.#i(),this.shouldConnect.set(!0)}#i(){let t=this.#o.token();if(!t){console.error("No access token available");return}let e=window.location.protocol==="https:"?"wss:":"ws:",i=window.location.port?`:${window.location.port}`:"";window.location.port==="4200"&&(i=":8200");let l=window.location.hostname,$=`${e}//${l}${i}/notifications?token=${t}`;this.#e.set("connecting"),this.#t=new WebSocket($),this.#t.onopen=()=>{console.log("WebSocket connection established"),this.#e.set("connected"),this.#n&&this.#n.close()},this.#t.onmessage=a=>{try{let u=JSON.parse(a.data);this.#s.set(u)}catch(u){console.error("Error parsing WebSocket message",u)}},this.#t.onclose=a=>{console.log("WebSocket connection closed",a),this.#e.set("disconnected"),this.shouldConnect()&&(this.#n||(this.#n=this.dialog.open(r,{closeOnButton:!1,closeOnEsc:!1,closeOnOutsideClick:!1}),this.#n.component.reconnectTimer.set(15e3)),setTimeout(()=>this.#i(),5e3))},this.#t.onerror=a=>{console.error("WebSocket error",a),this.#e.set("disconnected")}}stop(){this.shouldConnect.set(!1),this.#t?.close()}reconnect(){this.#t?.close(),this.start()}reconnectIfNeeded(){this.#t?.readyState!==WebSocket.OPEN&&this.reconnect()}static \u0275fac=function(e){return new(e||o)};static \u0275prov=c({token:o,factory:o.\u0275fac,providedIn:"root"})};var R=class o{#o=s(p);#t=s(h);#e=n("longpoll");connectionStatus=g(()=>this.#e()==="websocket"?this.#o.connectionStatus():this.#t.connectionStatus());serverState=g(()=>this.#e()==="websocket"?this.#o.serverState():this.#t.serverState());setConnectionMethod(t){t==="websocket"?(this.#o.reconnectIfNeeded(),this.#t.stop()):(this.#t.reconnectIfNeeded(),this.#o.stop()),this.#e.set(t)}getConnectionMethod(){return this.#e()}static \u0275fac=function(e){return new(e||o)};static \u0275prov=c({token:o,factory:o.\u0275fac,providedIn:"root"})};export{R as a};
@@ -1 +1 @@
1
- import{c as a,d as b}from"./chunk-WFR2V6TK.js";import"./chunk-NDO7MKXC.js";import"./chunk-U467ZTQ4.js";import"./chunk-TQHNKGRL.js";import"./chunk-F2GEUOGZ.js";import"./chunk-BIZAKOYU.js";import"./chunk-ELMONRIG.js";import"./chunk-C6XTRC7P.js";import"./chunk-MAVZY7BL.js";import"./chunk-P4ZFQZCA.js";import"./chunk-S5EF63OY.js";import"./chunk-7L2WUS2V.js";import"./chunk-L72ALLHJ.js";import"./chunk-7CGTOI24.js";export{a as createEncryptionForm,b as default};
1
+ import{c as a,d as b}from"./chunk-B5MQU4UL.js";import"./chunk-54VPI5KJ.js";import"./chunk-WFAZP46A.js";import"./chunk-TQHNKGRL.js";import"./chunk-F2GEUOGZ.js";import"./chunk-BIZAKOYU.js";import"./chunk-ELMONRIG.js";import"./chunk-C6XTRC7P.js";import"./chunk-MAVZY7BL.js";import"./chunk-SL6SRYFT.js";import"./chunk-S5EF63OY.js";import"./chunk-7L2WUS2V.js";import"./chunk-L72ALLHJ.js";import"./chunk-7CGTOI24.js";export{a as createEncryptionForm,b as default};
@@ -0,0 +1 @@
1
+ import{a as h}from"./chunk-TQHNKGRL.js";import{d as f,r as C}from"./chunk-ELMONRIG.js";import{h as b}from"./chunk-S5EF63OY.js";import{T as P,Z as v,r as D,va as F}from"./chunk-L72ALLHJ.js";import{a}from"./chunk-7CGTOI24.js";var d=class t{#t=v(b);s3Providers=h(this.getS3Config("Providers"));s3Regions=h(this.getS3Config("Regions"));s3RegionHosts=h(this.getS3Config("RegionHosts"));s3StorageClasses=h(this.getS3Config("StorageClasses"));storjSatellites=h(this.getStorjConfig("Satellites"));storjAuthenticationMethods=h(this.getStorjConfig("AuthenticationMethods"));openstackProviders=h(this.getOpenstackConfig("Providers"));openstackVersions=h(this.getOpenstackConfig("Versions"));gcsLocations=h(this.getGcsConfig("Locations"));gcsStorageClasses=h(this.getGcsConfig("StorageClasses"));getS3Config(e){return this.#t.postApiV1WebmoduleByModulekey({modulekey:"s3-getconfig",requestBody:{"s3-config":e}}).pipe(D(r=>this.#e(r)))}createS3IamUser(e,r){return this.#t.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"CanCreateUser","s3-username":e,"s3-password":r}})}createS3PolicyIAM(e){return this.#t.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"GetPolicyDoc",path:e}})}getStorjConfig(e){return this.#t.postApiV1WebmoduleByModulekey({modulekey:"storj-getconfig",requestBody:{"storj-config":e}}).pipe(D(r=>this.#e(r)))}getOpenstackConfig(e){return this.#t.postApiV1WebmoduleByModulekey({modulekey:"openstack-getconfig",requestBody:{"openstack-config":e}}).pipe(D(r=>this.#e(r)))}getGcsConfig(e){return this.#t.postApiV1WebmoduleByModulekey({modulekey:"gcs-getconfig",requestBody:{"gcs-config":e}}).pipe(D(r=>this.#e(r)))}#e(e){return(e.Result&&typeof e.Result=="object"&&Object.entries(e.Result).map(([r,n])=>({key:r,value:n})))??[]}static \u0275fac=function(r){return new(r||t)};static \u0275prov=P({token:t,factory:t.\u0275fac,providedIn:"root"})};var o=new C,m={type:"error",message:$localize`Using double leading slashes is most likely wrong, and will result in objects being created with a leading slash in the name.`},k=[{key:"file",displayName:"File system",description:"Store backups on your local file system.",customFields:{path:{type:"FolderTree",name:"path",doubleSlash:m,shortDescription:"File path",longDescription:"The path to store the backup",formElement:t=>o.control(t??"")}},mapper:{to:t=>{let e=c([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${t.custom.path}${e}`},from:(t,e,r)=>{let s=r.startsWith("file:///")?r.split("file:///")[1]:r.split("file://")[1],p=s.startsWith("%"),g=s.slice(1).startsWith(":\\")||p?s:"/"+s;return a({destinationType:t,custom:{path:g}},i(t,e))}}},{key:"ssh",displayName:"SSH",description:"Store backups in SSH.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"The server to connect to",formElement:t=>o.control(t??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"The port to connect to",formElement:t=>o.control(t??"",[f.required,f.max(65535)])},path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",doubleSlash:{type:"warning",message:$localize`Using double leading slashes makes the path absolute, pointing to the root of the filesystem.`},formElement:t=>o.control(t??"")}},dynamicFields:["auth-username"],advancedFields:[{type:"FileTree",name:"ssh-keyfile",accepts:".key,",shortDescription:"This is a path to a private key file locally on the machine",longDescription:"This is a path to a private key file locally on the machine"}],mapper:{to:t=>{let e=c([...Object.entries(t.advanced),...Object.entries(t.dynamic)]),{port:r,server:n,path:s}=t.custom;return`${t.destinationType}://${n+y(r)+l(s)+e}`},from:(t,e,r)=>a({destinationType:t,custom:{server:e.hostname,port:e.port,path:e.pathname}},i(t,e))}},{key:"s3",displayName:"S3 Compatible",description:"Store backups in any S3 compatible bucket.",customFields:{bucket:{type:"String",name:"bucket",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:t=>o.control(t??"")},path:{type:"Path",name:"path",doubleSlash:m,shortDescription:"Folder path",longDescription:"Folder path",formElement:t=>o.control(t??"")}},dynamicFields:[{name:"s3-server-name",shortDescription:"Server",type:"NonValidatedSelectableString",loadOptions:t=>t.get(d).s3Providers},"use-ssl","auth-username","auth-password"],advancedFields:[{name:"s3-client",type:"Enumeration",options:["aws","minio"]},{name:"s3-storage-class",type:"NonValidatedSelectableString",loadOptions:t=>t.get(d).s3StorageClasses}],mapper:{to:t=>{let{bucket:e,path:r}=t.custom,n=c([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${e+l(r)+n}`},from:(t,e,r)=>a({destinationType:t,custom:{path:e.pathname,bucket:e.hostname}},i(t,e))}},{key:"gcs",displayName:"Google Cloud Storage",description:"Store backups in Google Cloud Storage.",oauthField:"authid",customFields:{path:{type:"Path",name:"path",doubleSlash:m,shortDescription:"Bucket name",longDescription:"Bucket name",formElement:t=>o.control(t??"")}},dynamicFields:[{name:"gcs-location",type:"NonValidatedSelectableString",loadOptions:t=>t.get(d).gcsLocations},{name:"gcs-storage-class",type:"NonValidatedSelectableString",loadOptions:t=>t.get(d).gcsStorageClasses},"authid"],mapper:{to:t=>{let e=c([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${t.custom.path}${e}`},from:(t,e,r)=>a({destinationType:t,custom:{path:e.hostname+e.pathname}},i(t,e))}},{key:"googledrive",displayName:"Google Drive",description:"Store backups in Google Drive.",oauthField:"authid",customFields:{path:{type:"Path",name:"path",doubleSlash:m,shortDescription:"Folder path",longDescription:"Folder path",formElement:t=>o.control(t??"")}},dynamicFields:[{name:"authid",type:"Password"}],mapper:{to:t=>{let e=t.custom.path,r=c([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${e}${r}`},from:(t,e,r)=>a({destinationType:t,custom:{path:e.hostname+e.pathname}},i(t,e))}},{key:"pcloud",displayName:"pCloud",description:"Store backups in pCloud.",oauthField:"authid",customFields:{server:{type:"Enumeration",name:"server",loadOptions:()=>F([{key:"pCloud Global",value:"api.pcloud.com"},{key:"pCloud Europe",value:"eapi.pcloud.com"}]),shortDescription:"Server",longDescription:"Server",formElement:t=>o.control(t??"")},path:{type:"Path",name:"path",doubleSlash:m,shortDescription:"Folder path",longDescription:"Folder path",formElement:t=>o.control(t??"")}},dynamicFields:["authid"],mapper:{to:t=>{let e=c([...Object.entries(t.advanced),...Object.entries(t.dynamic)]),{server:r,path:n}=t.custom;return`${t.destinationType}://${r+l(n)+e}`},from:(t,e,r)=>{let n=e.pathname.replace(/^\//,"");return a({destinationType:t,custom:{server:e.hostname,path:n}},i(t,e))}}},{key:"azure",displayName:"Azure Blob Storage",description:"Store backups in Azure Blob Storage.",customFields:{path:{type:"String",name:"path",doubleSlash:m,shortDescription:"Container name",longDescription:"Container name",formElement:t=>o.control(t??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Account name"},{name:"auth-password",shortDescription:"Access key"}],mapper:{to:t=>{let e=t.custom.path,r=c([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${e}${r}`},from:(t,e,r)=>a({destinationType:t,custom:{path:e.hostname+e.pathname}},i(t,e))}},{key:"onedrivev2",displayName:"OneDrive",description:"Store backups in OneDrive.",oauthField:"authid",customFields:{path:{type:"String",name:"path",doubleSlash:m,shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>o.control(t??"")}},dynamicFields:["authid"],mapper:{to:t=>{let e=t.custom.path,r=c([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${e}${r}`},from:(t,e,r)=>a({destinationType:t,custom:{path:e.hostname+e.pathname}},i(t,e))}},{key:"od4b",displayName:"OneDrive Business",description:"Store backups in OneDrive Business.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:t=>o.control(t??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:t=>o.control(t??"")},path:{type:"String",name:"path",doubleSlash:m,shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>o.control(t??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Account name"},{name:"auth-password",shortDescription:"Access key"}],mapper:{to:t=>{let e=c([...Object.entries(t.advanced),...Object.entries(t.dynamic)]),{port:r,server:n,path:s}=t.custom;return`${t.destinationType}://${n+y(r)+l(s)+e}`},from:(t,e,r)=>a({destinationType:t,custom:{server:e.hostname,port:e.port,path:e.pathname}},i(t,e))}},{key:"mssp",displayName:"Microsoft SharePoint",description:"Store backups in Microsoft SharePoint.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:t=>o.control(t??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:t=>o.control(t??"")},path:{type:"String",name:"path",doubleSlash:m,shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>o.control(t??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Account name"},{name:"auth-password",shortDescription:"Access key"}],mapper:{to:t=>{let e=c([...Object.entries(t.advanced),...Object.entries(t.dynamic)]),{port:r,server:n,path:s}=t.custom;return`${t.destinationType}://${n+y(r)+l(s)+e}`},from:(t,e,r)=>a({destinationType:t,custom:{server:e.hostname,port:e.port,path:e.pathname}},i(t,e))}},{key:"sharepoint",displayName:"Microsoft SharePoint v2",description:"Store backups in Microsoft SharePoint.",oauthField:"authid",customFields:{path:{type:"String",name:"path",doubleSlash:m,shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>o.control(t??"")}},dynamicFields:["authid"],mapper:{to:t=>{let e=t.custom.path,r=c([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${e}${r}`},from:(t,e,r)=>a({destinationType:t,custom:{path:e.hostname+e.pathname}},i(t,e))}},{key:"dropbox",displayName:"Dropbox",description:"Store backups in Dropbox.",oauthField:"authid",customFields:{path:{type:"String",name:"path",doubleSlash:m,shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>o.control(t??"")}},dynamicFields:["authid"],mapper:{to:t=>{let e=t.custom.path,r=c([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${e}${r}`},from:(t,e,r)=>a({destinationType:t,custom:{path:e.hostname+e.pathname}},i(t,e))}},{key:"box",displayName:"Box.com",description:"Store backups in Box.com.",oauthField:"authid",customFields:{path:{type:"String",name:"path",doubleSlash:m,shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>o.control(t??"")}},dynamicFields:["authid"],mapper:{to:t=>{let e=t.custom.path,r=c([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${e}${r}`},from:(t,e,r)=>a({destinationType:t,custom:{path:e.hostname+e.pathname}},i(t,e))}},{key:"jottacloud",displayName:"Jottacloud",description:"Store backups in Jottacloud.",oauthField:"authid",customFields:{path:{type:"String",name:"path",doubleSlash:m,shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>o.control(t??"")}},dynamicFields:["authid"],mapper:{to:t=>{let e=t.custom.path,r=c([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${e}${r}`},from:(t,e,r)=>a({destinationType:t,custom:{path:e.hostname+e.pathname}},i(t,e))}},{key:"b2",displayName:"B2 Cloud Storage",description:"Store backups in B2 Cloud Storage.",customFields:{bucket:{type:"String",name:"bucket",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:t=>o.control(t??"")},path:{type:"String",name:"path",doubleSlash:m,shortDescription:"Path in the bucket",longDescription:"Path in the bucket",formElement:t=>o.control(t??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Application ID"},{name:"auth-password",shortDescription:"Application Key"}],mapper:{to:t=>{let{bucket:e,path:r}=t.custom,n=c([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${e+l(r)+n}`},from:(t,e,r)=>a({destinationType:t,custom:{bucket:e.hostname,path:decodeURIComponent(e.pathname)}},i(t,e))}},{key:"e2",displayName:"IDrive e2",description:"Store backups in IDrive e2.",customFields:{bucket:{type:"String",name:"bucket",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:t=>o.control(t??"")},path:{type:"String",name:"path",doubleSlash:m,shortDescription:"Path in the bucket",longDescription:"Path in the bucket",formElement:t=>o.control(t??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Access ID"},{name:"auth-password",shortDescription:"Access Secret"}],mapper:{to:t=>{let{bucket:e,path:r}=t.custom,n=c([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${e+l(r)+n}`},from:(t,e,r)=>a({destinationType:t,custom:{bucket:e.hostname,path:e.pathname}},i(t,e))}},{key:"mega",displayName:"Mega.nz",description:"Store backups in Mega.nz.",customFields:{path:{type:"String",name:"path",doubleSlash:m,shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>o.control(t??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:t=>{let e=t.custom.path,r=c([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${e}${r}`},from:(t,e,r)=>a({destinationType:t,custom:{path:e.hostname+e.pathname}},i(t,e))}},{key:"msgroup",displayName:"Microsoft Office 365 Group",description:"Store backups in Microsoft Office 365 Group.",oauthField:"authid",customFields:{groupEmail:{type:"Email",name:"groupEmail",shortDescription:"Group email",longDescription:"Group email",formElement:t=>o.control(t??"",[f.email])},path:{type:"String",name:"path",doubleSlash:m,shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>o.control(t??"")}},dynamicFields:["authid"],mapper:{to:t=>{let e=t.custom.path,r=c([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${e}${r}`},from:(t,e,r)=>a({destinationType:t,custom:{path:e.hostname+e.pathname}},i(t,e))}},{key:"cloudfiles",displayName:"Rackspace CloudFiles",description:"Store backups in Rackspace CloudFiles.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:t=>o.control(t??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:t=>o.control(t??"")},path:{type:"String",name:"path",doubleSlash:m,shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>o.control(t??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:t=>{let e=c([...Object.entries(t.advanced),...Object.entries(t.dynamic)]),{port:r,server:n,path:s}=t.custom;return`${t.destinationType}://${n+y(r)+l(s)+e}`},from:(t,e,r)=>a({destinationType:t,custom:{server:e.hostname,port:e.port,path:e.pathname}},i(t,e))}},{key:"rclone",displayName:"Rclone",description:"Store backups in Rclone.",dynamicFields:[{name:"rclone-local-repository",shortDescription:"Local repository",defaultValue:""},{name:"rclone-remote-repository",shortDescription:"Remote repository",defaultValue:""},{name:"rclone-remote-path",shortDescription:"Path on remote repository",defaultValue:""}],mapper:{to:t=>{let e=t.dynamic["rclone-remote-repository"],r=t.dynamic["rclone-remote-path"],n=Object.entries(t.dynamic).filter(([p])=>!["rclone-remote-repository","rclone-remote-path"].includes(p)),s=c([...Object.entries(t.advanced),...n]);return`${t.destinationType}://${e}/${r+s}`},from:(t,e,r)=>{let{advanced:n,dynamic:s}=i(t,e);return a({destinationType:t,dynamic:a({"rclone-remote-repository":e.hostname,"rclone-remote-path":e.pathname},s)},n)}}},{key:"openstack",displayName:"OpenStack Object Storage",description:"Store backups in OpenStack Object Storage.",customFields:{bucket:{type:"String",name:"bucket",shortDescription:"Bucket",longDescription:"Bucket",formElement:t=>o.control(t??"")}},dynamicFields:[{name:"openstack-authuri",shortDescription:"Auth URI",type:"Enumeration",loadOptions:t=>t.get(d).openstackProviders},{name:"openstack-version",shortDescription:"Version",type:"Enumeration",loadOptions:t=>t.get(d).openstackVersions},{name:"openstack-domain-name",shortDescription:"Domain name"},{name:"openstack-tenant-name",shortDescription:"Tenant name"},{name:"openstack-region",shortDescription:"Region"}],mapper:{to:t=>{let e=c([...Object.entries(t.advanced),...Object.entries(t.dynamic)]),{bucket:r}=t.custom;return`${t.destinationType}://${r+e}`},from:(t,e,r)=>a({destinationType:t,custom:{path:e.pathname,bucket:e.hostname}},i(t,e))}},{key:"webdav",displayName:"WebDAV",description:"Store backups in WebDAV.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:t=>o.control(t??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:t=>o.control(t??"")},path:{type:"String",name:"path",doubleSlash:m,shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>o.control(t??"")}},dynamicFields:[{name:"use-ssl",shortDescription:"Use SSL"},{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:t=>{let{port:e,server:r,path:n}=t.custom,s=t.dynamic["use-ssl"],p=c([...Object.entries(t.advanced),...Object.entries(t.dynamic).filter(([u])=>u!=="use-ssl")]);return`${t.destinationType}${s?"s":""}://${r+y(e)+l(n)+p}`},from:(t,e,r)=>a({destinationType:t,custom:{server:e.hostname,port:e.port,path:e.pathname}},i(t,e))}},{key:"aftp",displayName:"FTP",description:"Store backups in FTP.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:t=>o.control(t??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:t=>o.control(t??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",doubleSlash:{type:"warning",message:$localize`Using double leading slashes makes the path absolute, pointing to the root of the filesystem.`},formElement:t=>o.control(t??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:t=>{let{port:e,server:r,path:n}=t.custom,s=c([...Object.entries(t.advanced),...Object.entries(t.dynamic).filter(([p])=>p!=="use-ssl")]);return`${t.destinationType}://${r+y(e)+l(n)+s}`},from:(t,e,r)=>a({destinationType:t,custom:{server:e.hostname,port:e.port,path:e.pathname}},i(t,e))}},{key:"sia",displayName:"Sia Decentrilized Cloud",description:"Store backups in Sia Decentrilized Cloud.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:t=>o.control(t??"")}},dynamicFields:["sia-targetpath","sia-password","sia-redundancy"],mapper:{to:t=>{let e=t.custom.server,r=t.dynamic["sia-targetpath"],n=c([...Object.entries(t.advanced),...Object.entries(t.dynamic).filter(([s])=>s!=="sia-targetpath")]);return`${t.destinationType}://${e+l(r)+n}`},from:(t,e,r)=>a({destinationType:t,custom:{path:e.pathname}},i(t,e))}},{key:"cos",displayName:"Tencent COS",description:"Store backups in Tencent COS.",customFields:{path:{type:"String",name:"path",doubleSlash:m,shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>o.control(t??"")}},dynamicFields:[{name:"cos-bucket",shortDescription:"Bucket",order:1},{name:"cos-region",shortDescription:"Region",order:2},{name:"cos-app-id",shortDescription:"COS App Id",order:3},{name:"cos-secret-id",shortDescription:"COS Secret Id",order:4},{name:"cos-secret-key",shortDescription:"COS Secret Key",order:5}],mapper:{to:t=>{let e=t.custom.path,r=c([...Object.entries(t.advanced),...Object.entries(t.dynamic).filter(([n])=>n!=="cos-targetpath")]);return`${t.destinationType}://${e+r}`},from:(t,e,r)=>a({destinationType:t,custom:{path:e.pathname}},i(t,e))}},{key:"tahoe",displayName:"Tahoe LAFS",description:"Store backups in Tahoe LAFS.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:t=>o.control(t??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:t=>o.control(t??"")},path:{type:"String",name:"path",doubleSlash:m,shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>o.control(t??"")}},dynamicFields:[{name:"use-ssl",shortDescription:"Use SSL"}],mapper:{to:t=>{let{port:e,server:r,path:n,username:s,password:p}=t.custom,u={"auth-username":s,"auth-password":p},g=t.dynamic["use-ssl"],S=c([...Object.entries(t.advanced),...Object.entries(t.dynamic).filter(([O])=>O!=="use-ssl"),...Object.entries(u)]);return`${t.destinationType}${g?"s":""}://${r+y(e)+l(n)+S}`},from:(t,e,r)=>a({destinationType:t,custom:{server:e.hostname,port:e.port,path:e.pathname}},i(t,e))}},{key:"cifs",displayName:"CIFS",description:"Store backups in CIFS.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:t=>o.control(t??"")},share:{type:"String",name:"share",shortDescription:"Share Name",longDescription:"Share Name",formElement:t=>o.control(t??"")},path:{type:"String",name:"path",doubleSlash:m,shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>o.control(t??"")}},dynamicFields:["transport","auth-username","auth-password","auth-domain"],mapper:{to:t=>{let{share:e,server:r,path:n,username:s,password:p}=t.custom,u={"auth-username":s,"auth-password":p},g=new Map([...Object.entries(u),...Object.entries(t.advanced),...Object.entries(t.dynamic)]),S=c(Array.from(g));return`${t.destinationType}://${r+l(e)+l(n)+S}`},from:(t,e,r)=>{let n=e.pathname.split("/")[1],s=e.pathname.split("/").slice(2).join("/");return a({destinationType:t,custom:{server:e.hostname,share:n,path:s}},i(t,e))}}},{key:"filen",displayName:"Filen.io",description:"Store backups in Filen.io.",customFields:{path:{type:"String",name:"path",doubleSlash:m,shortDescription:"Path on Filen",longDescription:"Path on Filen",formElement:t=>o.control(t??"")}},dynamicFields:["auth-username","auth-password"],mapper:{to:t=>{let{path:e,username:r,password:n}=t.custom,s={"auth-username":r,"auth-password":n},p=new Map([...Object.entries(s),...Object.entries(t.advanced),...Object.entries(t.dynamic)]),u=c(Array.from(p));return`${t.destinationType}://${e+u}`},from:(t,e,r)=>{let n=e.hostname??"";return e.pathname&&n!==""&&e.pathname[0]!="/"&&(n+="/"),n+=e.pathname,a({destinationType:t,custom:{path:n}},i(t,e))}}},{key:"filejump",displayName:"Filejump",description:"Store backups in Filejump.",customFields:{path:{type:"String",name:"path",doubleSlash:m,shortDescription:"Path on Filejump",longDescription:"Path on Filejump",formElement:t=>o.control(t??"")}},dynamicFields:[{type:"Password",name:"api-token",shortDescription:"API Token",longDescription:"Filejump API Token",formElement:t=>o.control(t??"")}],mapper:{to:t=>{let{path:e,username:r,password:n,apitoken:s}=t.custom,p=(s||"").trim()===""?{"auth-username":r,"auth-password":n}:{"api-token":s},u=new Map([...Object.entries(p),...Object.entries(t.advanced),...Object.entries(t.dynamic)]),g=c(Array.from(u));return`${t.destinationType}://${e+g}`},from:(t,e,r)=>{let n=e.hostname??"";return e.pathname&&n!==""&&e.pathname[0]!="/"&&(n+="/"),n+=e.pathname,a({destinationType:t,custom:{path:n}},i(t,e))}}},{key:"storj",customKey:"storjAccessGrant",displayName:"Storj Access Grant",description:"Store backups in Storj Access Grant.",dynamicFields:[{name:"storj-shared-access",shortDescription:"Access Grant"},{name:"storj-bucket",shortDescription:"Bucket"},{name:"storj-folder",shortDescription:"Path on server",doubleSlash:m}],mapper:{to:t=>`storj://storj.io/config?storj-auth-method=Access%20grant&storj-satellite=us1.storj.io%3A7777&storj-api-key&storj-secret&${c([...Object.entries(t.advanced),...Object.entries(t.dynamic)],!0)}`,from:(t,e,r)=>a({destinationType:t},i(t,e))}},{key:"storj",customKey:"storjApiKey",displayName:"Storj API Key",description:"Store backups in Storj API Key.",dynamicFields:[{name:"storj-satellite",shortDescription:"Satellite",type:"Enumeration",loadOptions:t=>t.get(d).storjSatellites},{name:"storj-api-key",shortDescription:"API Key"},{name:"storj-secret",shortDescription:"Secret"},{name:"storj-bucket",shortDescription:"Bucket"},{name:"storj-folder",shortDescription:"Path on server",doubleSlash:m}],mapper:{to:t=>`storj://storj.io/config?storj-auth-method=API%20key&${c([...Object.entries(t.advanced),...Object.entries(t.dynamic)],!0)}`,from:(t,e,r)=>a({destinationType:t},i(t,e))}}],W={".amazonaws.com":"Amazon S3",".mycloudyplace.com":"MyCloudyPlace S3",".impossibleapi.net":"Impossible Cloud S3",".scw.cloud":"Scaleway S3",".hosteurope.de":"Hosteurope S3",".dunkel.de":"Dunkel S3",".dreamhost.com":"DreamHost S3",".dincloud.com":"dinCloud S3",".polisystems.ch":"Poli Systems S3",".softlayer.net":"IBM COS (S3)",".storadera.com":"Storadera S3",".wasabisys.com":"Wasabi S3",".infomaniak.com":"Infomaniak S3",".infomaniak.cloud":"Infomaniak S3",".sakurastorage.jp":"\u3055\u304F\u3089\u306E\u30AF\u30E9\u30A6\u30C9 S3",".lyvecloud.seagate.com":"Seagate Lyve S3",".digitaloceanspaces.com":"DigitalOcean S3",".backblazeb2.com":"Backblaze B2 S3",".cloudian.com":"Cloudian S3",".min.io":"MinIO S3",".linodeobjects.com":"Linode S3",".bunnycdn.com":"BunnyCDN S3",".azure.com":"Microsoft Azure S3",".googleapis.com":"Google Cloud Storage S3",".ibm.com":"IBM Cloud S3",".oracle.com":"Oracle Cloud S3",".cloudflare.com":"Cloudflare S3",".alibaba.com":"Alibaba Cloud S3",".huawei.com":"Huawei Cloud S3",".tencent.com":"Tencent Cloud S3",".baidu.com":"Baidu Cloud S3",".jd.com":"JD Cloud S3",".ucloud.cn":"UCloud S3",".qiniu.com":"Qiniu Cloud S3",".aliyuncs.com":"Aliyun S3",".tcloud.com":"TCloud S3",".tencentcloudapi.com":"Tencent Cloud S3"};function y(t){return t==null||t===""?"":":"+t.toString()}function l(t){return t==null?"":t.startsWith("/")?t:"/"+t}function i(t,e){let r={},n={},s=k.find(p=>p.key===t);return e.searchParams.forEach((p,u)=>{s?.dynamicFields?.some(S=>S===u||S?.name===u)?n[u]=decodeURIComponent(p):r[u]=decodeURIComponent(p)}),{advanced:r,dynamic:n}}function c(t,e=!1){let r=t.map(([s,p])=>`${s}=${p?encodeURIComponent(p.toString()):""}`).join("&");return r?(e?"":"?")+r:""}function q(t){let e=t.destinationType,r=k.find(n=>n.customKey===e||n.key===e);if(!r)throw new Error("Invalid destination type");return r?.mapper.to(t)??""}function H(t){let e=URL.canParse(t),r=t.split("://")[0],n=t.split("://")[1],s="http://"+n;if(n.startsWith("%")&&r==="file")return k.find(p=>p.customKey===r||p.key===r)?.mapper.from(r,new URL("http://localhost"),t);try{let p=new URL(s);return k.find(u=>u.customKey===r||u.key===r)?.mapper.from(r,p,t)}catch(p){console.error("Error while parsing target path",p)}if(!e)throw new Error("Invalid target path");return null}export{q as a,H as b,k as c,W as d};
@@ -1 +1 @@
1
- import{a as D}from"./chunk-F2GEUOGZ.js";import{a as b,n as w}from"./chunk-P4ZFQZCA.js";import"./chunk-S5EF63OY.js";import{ia as A}from"./chunk-7L2WUS2V.js";import{Bb as I,Bc as F,Cb as v,Db as c,Eb as r,Ib as u,Jb as M,Oc as $,Rb as P,Ua as l,Vb as k,Wb as s,Z as y,ea as O,fa as x,gb as T,hc as C,ic as p,jc as E,lb as a,ub as d,va as m,vb as h,vc as _,wb as f,wc as N,zb as g}from"./chunk-L72ALLHJ.js";import"./chunk-7CGTOI24.js";var L=e=>({children:e,level:0}),R=e=>({$implicit:e}),V=(e,t)=>({children:e,level:t}),j=(e,t)=>t.id;function z(e,t){if(e&1&&(c(0,"spk-icon"),p(1,"caret-down"),r()),e&2){let n=s().$implicit;f("open",n.isOpen())}}function B(e,t){e&1&&(c(0,"spk-icon"),p(1,"dot"),r())}function G(e,t){e&1&&u(0)}function U(e,t){if(e&1&&a(0,G,1,0,"ng-container",3),e&2){let n=s().$implicit,o=s().$implicit;s();let i=C(3);d("ngTemplateOutlet",i)("ngTemplateOutletContext",_(5,R,N(2,V,n.children,o.level+1)))}}function X(e,t){if(e&1){let n=M();c(0,"div",4,1),k("click",function(){let i=O(n).$implicit,Y=s(2);return x(i.children.length>0&&Y.toggleNode(i))}),a(2,z,2,2,"spk-icon",5)(3,B,2,0,"spk-icon"),c(4,"div",6),p(5),r()(),a(6,U,1,7,"ng-container")}if(e&2){let n=t.$implicit;f("cannot-toggle",n.children.length===0)("open",n.isOpen()),l(2),g(n.children.length>0?2:3),l(3),E(n.text),l(),g(n.isOpen()?6:-1)}}function q(e,t){if(e&1&&(c(0,"spk-list"),I(1,X,7,7,null,null,j),r()),e&2){let n=t.$implicit;h("padding-left",n.level*.25,"rem"),l(),v(n.children)}}function H(e,t){e&1&&u(0)}var S=class e{#e=y(D);treeStructure=$(()=>{let t=this.#e.systemInfo();return this.processObject(t,0)});toggleNode(t){t.isOpen.update(n=>!n)}processObject(t,n){let o=[];for(let i in t)typeof t[i]=="object"?o.push({id:i,text:i,children:this.processObject(t[i],n+1),level:n,isOpen:m(!1)}):o.push({id:i,text:`${i}: ${t[i]}`,children:[],level:n,isOpen:m(!1)});return o}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=T({type:e,selectors:[["app-server-settings"]],decls:5,vars:6,consts:()=>{let t;return t=$localize`System info`,[["recursiveTree",""],["treeNode",""],t,[4,"ngTemplateOutlet","ngTemplateOutletContext"],["action","",3,"click"],[3,"open"],[1,"text"]]},template:function(n,o){if(n&1&&(c(0,"h3"),P(1,2),r(),a(2,q,3,2,"ng-template",null,0,F)(4,H,1,0,"ng-container",3)),n&2){let i=C(3);l(4),d("ngTemplateOutlet",i)("ngTemplateOutletContext",_(4,R,_(2,L,o.treeStructure())))}},dependencies:[w,b,A],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}spk-icon[_ngcontent-%COMP%]{font-size:1rem}spk-list[_ngcontent-%COMP%]{padding:0}spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]{padding:0}spk-list[_ngcontent-%COMP%] [action].cannot-toggle[_ngcontent-%COMP%]{cursor:initial}"],changeDetection:0})};export{S as default};
1
+ import{a as D}from"./chunk-F2GEUOGZ.js";import{a as b,n as w}from"./chunk-SL6SRYFT.js";import"./chunk-S5EF63OY.js";import{ia as A}from"./chunk-7L2WUS2V.js";import{Bb as I,Bc as F,Cb as v,Db as c,Eb as r,Ib as u,Jb as M,Oc as $,Rb as P,Ua as l,Vb as k,Wb as s,Z as y,ea as O,fa as x,gb as T,hc as C,ic as p,jc as E,lb as a,ub as d,va as m,vb as h,vc as _,wb as f,wc as N,zb as g}from"./chunk-L72ALLHJ.js";import"./chunk-7CGTOI24.js";var L=e=>({children:e,level:0}),R=e=>({$implicit:e}),V=(e,t)=>({children:e,level:t}),j=(e,t)=>t.id;function z(e,t){if(e&1&&(c(0,"spk-icon"),p(1,"caret-down"),r()),e&2){let n=s().$implicit;f("open",n.isOpen())}}function B(e,t){e&1&&(c(0,"spk-icon"),p(1,"dot"),r())}function G(e,t){e&1&&u(0)}function U(e,t){if(e&1&&a(0,G,1,0,"ng-container",3),e&2){let n=s().$implicit,o=s().$implicit;s();let i=C(3);d("ngTemplateOutlet",i)("ngTemplateOutletContext",_(5,R,N(2,V,n.children,o.level+1)))}}function X(e,t){if(e&1){let n=M();c(0,"div",4,1),k("click",function(){let i=O(n).$implicit,Y=s(2);return x(i.children.length>0&&Y.toggleNode(i))}),a(2,z,2,2,"spk-icon",5)(3,B,2,0,"spk-icon"),c(4,"div",6),p(5),r()(),a(6,U,1,7,"ng-container")}if(e&2){let n=t.$implicit;f("cannot-toggle",n.children.length===0)("open",n.isOpen()),l(2),g(n.children.length>0?2:3),l(3),E(n.text),l(),g(n.isOpen()?6:-1)}}function q(e,t){if(e&1&&(c(0,"spk-list"),I(1,X,7,7,null,null,j),r()),e&2){let n=t.$implicit;h("padding-left",n.level*.25,"rem"),l(),v(n.children)}}function H(e,t){e&1&&u(0)}var S=class e{#e=y(D);treeStructure=$(()=>{let t=this.#e.systemInfo();return this.processObject(t,0)});toggleNode(t){t.isOpen.update(n=>!n)}processObject(t,n){let o=[];for(let i in t)typeof t[i]=="object"?o.push({id:i,text:i,children:this.processObject(t[i],n+1),level:n,isOpen:m(!1)}):o.push({id:i,text:`${i}: ${t[i]}`,children:[],level:n,isOpen:m(!1)});return o}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=T({type:e,selectors:[["app-server-settings"]],decls:5,vars:6,consts:()=>{let t;return t=$localize`System info`,[["recursiveTree",""],["treeNode",""],t,[4,"ngTemplateOutlet","ngTemplateOutletContext"],["action","",3,"click"],[3,"open"],[1,"text"]]},template:function(n,o){if(n&1&&(c(0,"h3"),P(1,2),r(),a(2,q,3,2,"ng-template",null,0,F)(4,H,1,0,"ng-container",3)),n&2){let i=C(3);l(4),d("ngTemplateOutlet",i)("ngTemplateOutletContext",_(4,R,_(2,L,o.treeStructure())))}},dependencies:[w,b,A],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}spk-icon[_ngcontent-%COMP%]{font-size:1rem}spk-list[_ngcontent-%COMP%]{padding:0}spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]{padding:0}spk-list[_ngcontent-%COMP%] [action].cannot-toggle[_ngcontent-%COMP%]{cursor:initial}"],changeDetection:0})};export{S as default};
@@ -0,0 +1 @@
1
+ import{a as ae}from"./chunk-OHLMIBDI.js";import{l as le}from"./chunk-WRPHCCP7.js";import{a as ie,b as se}from"./chunk-44DHERTN.js";import"./chunk-54VPI5KJ.js";import"./chunk-WFAZP46A.js";import"./chunk-V756QT7J.js";import"./chunk-EQWH3TBL.js";import"./chunk-TQHNKGRL.js";import"./chunk-F2GEUOGZ.js";import"./chunk-BIZAKOYU.js";import"./chunk-RHW5QVAY.js";import{c as Z,e as J,h as ee,j as ne,s as te,t as oe}from"./chunk-ELMONRIG.js";import{b as V,d as q}from"./chunk-C6XTRC7P.js";import"./chunk-MAVZY7BL.js";import{a as Y,g as H,l as Q,t as j}from"./chunk-SL6SRYFT.js";import"./chunk-S5EF63OY.js";import"./chunk-7L2WUS2V.js";import{$a as v,Db as t,Eb as i,Fb as T,Jb as M,Oc as k,Pb as S,Qb as O,Rb as r,Ua as p,Vb as I,Wb as c,Z as C,ea as P,fa as f,fc as U,gb as K,gc as X,lb as N,nc as u,oc as d,pc as m,ub as g,uc as W,va as x,wb as G,zb as F}from"./chunk-L72ALLHJ.js";import"./chunk-7CGTOI24.js";var _e=["formRef"],re=()=>["--skip-files-larger-than","dblock-size","encryption-module","no-encryption","--no-encryption","--exclude-files-attributes","keep-time","keep-versions","retention-policy"];function pe(s,a){s&1&&(S(0,1,1),T(1,"spk-icon",20),O())}function ce(s,a){s&1&&(t(0,"p",20),r(1,6),i())}function ue(s,a){s&1&&(t(0,"p"),r(1,7),i())}function de(s,a){if(s&1){let n=M();t(0,"p"),r(1,8),i(),t(2,"app-timespan",18),m("ngModelChange",function(l){P(n);let o=c();return d(o.optionsFields.backupRetentionTime,l)||(o.optionsFields.backupRetentionTime=l),f(l)}),t(3,"label",29),r(4,9),i()()}if(s&2){let n=c();p(2),g("customId","backupRetentionTime"),u("ngModel",n.optionsFields.backupRetentionTime)}}function me(s,a){if(s&1){let n=M();t(0,"p"),r(1,10),i(),t(2,"spk-form-field")(3,"label",30),r(4,11),i(),t(5,"input",31),m("ngModelChange",function(l){P(n);let o=c();return d(o.optionsFields.backupRetentionVersions,l)||(o.optionsFields.backupRetentionVersions=l),f(l)}),i()()}if(s&2){let n=c();p(5),u("ngModel",n.optionsFields.backupRetentionVersions)}}function Se(s,a){s&1&&(t(0,"p"),r(1,12),i())}function Oe(s,a){if(s&1){let n=M();t(0,"p"),r(1,13),i(),t(2,"spk-form-field")(3,"p"),r(4,14),i(),t(5,"label",32),r(6,15),i(),t(7,"input",33),m("ngModelChange",function(l){P(n);let o=c();return d(o.optionsFields.backupRetentionCustom,l)||(o.optionsFields.backupRetentionCustom=l),f(l)}),i()()}if(s&2){let n=c();p(7),u("ngModel",n.optionsFields.backupRetentionCustom)}}var ge=["Bytes","KB","MB","GB","TB","PB"],Te=[{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`}],Ce=1024*1024*1024*2,Pe=1024*1024*5,h=class s{#e=C(le);#n=C(q);#t=C(V);formRef=v.required("formRef");selectedOptions=this.#e.selectedOptions;nonSelectedOptions=this.#e.nonSelectedOptions;isSubmitting=this.#e.isSubmitting;settings=this.#e.settings;optionsFields=this.#e.optionsFields;applicationOptions=this.#e.applicationOptions;retentionOptions=x(Te);sizeSplit=k(()=>{let n=this.optionsFields.remoteVolumeSize().match(/^(\d+)(bytes|kb|mb|gb|tb|pb|b)$/i);return{value:n?parseInt(n[1],10):0,unit:n?n[2].toUpperCase():"MB"}});exceededVolumeSize=k(()=>{let a=this.sizeSplit().value,n=this.sizeSplit().unit;if(a==null||n===null||n===void 0)return!1;let e=a*Math.pow(1024,ge.indexOf(n));return e>Ce||e<Pe});goBack(){this.#n.navigate(["schedule"],{relativeTo:this.#t.parent})}submit(){this.#e.submit()}static \u0275fac=function(n){return new(n||s)};static \u0275cmp=K({type:s,selectors:[["app-advanced-options-settings"]],viewQuery:function(n,e){n&1&&U(e.formRef,_e,5),n&2&&X()},decls:30,vars:15,consts:()=>{let a;a=$localize`Options`;let n;n=$localize` Remote volume size ${"\uFFFD*7:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SPK_ICON:warning${"\uFFFD/#1:1\uFFFD"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/*7:1\uFFFD"}:CLOSE_BLOCK_IF:`;let e;e=$localize` The backups will be split up into multiple files called volumes. Here you can set the maximum size of the individual volume files. ${"\uFFFD#11\uFFFD"}:START_LINK: Read more ${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-square-out${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#11\uFFFD"}:CLOSE_LINK:`;let l;l=$localize`Backup retention`;let o;o=$localize`${"\uFFFD#26\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#26\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let E;E=$localize`${"\uFFFD#29\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#29\uFFFD"}:CLOSE_TAG_SPK_ICON: Submit `;let b;b=$localize` The chosen size is outside the recommended range. This may cause performance issues, excessively large temporary files or other problems. `;let A;A=$localize`Nothing will be deleted. The backup size will grow with each change.`;let R;R=$localize`If at least one newer backup is found, all backups older than this date are deleted.`;let y;y=$localize`Time to keep versions`;let $;$=$localize`Once there are more backups than the specified number, the oldest backups are deleted.`;let w;w=$localize`Number of versions`;let D;D=$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 B;B=$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 L;L=$localize`Once there are more backups than the specified number, the oldest backups are deleted.`;let z;return z=$localize`Retention expression`,[a,n,e,l,o,E,b,A,R,y,$,w,D,B,L,z,[1,"title-30"],[1,"remote-volume-wrap"],[3,"ngModelChange","customId","ngModel"],["for","size"],[1,"warning"],["href","https://forum.duplicati.com/t/choosing-sizes-in-duplicati/17683","target","_blank",1,"spk-primary"],["suffix",""],["value","value","label","name",3,"options","inlineSearch","isClearable"],["type","text",3,"ngModelChange","ngModel"],[3,"optionsChange","options","applicationOptions","hiddenOptions"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","",1,"raised","primary",3,"click"],["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&&(t(0,"section")(1,"h3",16),r(2,0),i(),t(3,"div",17)(4,"app-size",18),m("ngModelChange",function(o){return d(e.optionsFields.remoteVolumeSize,o)||(e.optionsFields.remoteVolumeSize=o),o}),t(5,"label",19),S(6,1),N(7,pe,2,0,"spk-icon",20),O(),i()(),N(8,ce,2,0,"p",20),t(9,"p"),S(10,2),t(11,"a",21),T(12,"spk-icon",22),i(),O(),i()(),t(13,"spk-select",23)(14,"label",19),r(15,3),i(),t(16,"input",24),m("ngModelChange",function(o){return d(e.optionsFields.backupRetention,o)||(e.optionsFields.backupRetention=o),o}),i()(),N(17,ue,2,0,"p")(18,de,5,2)(19,me,6,1)(20,Se,2,0,"p")(21,Oe,8,1),t(22,"app-options-list",25),m("optionsChange",function(o){return d(e.settings,o)||(e.settings=o),o}),i(),t(23,"div",26)(24,"button",27),I("click",function(){return e.goBack()}),S(25,4),T(26,"spk-icon"),O(),i(),t(27,"button",28),I("click",function(){return e.submit()}),S(28,5),T(29,"spk-icon"),O(),i()()()),n&2&&(p(4),g("customId","size"),u("ngModel",e.optionsFields.remoteVolumeSize),p(3),F(e.exceededVolumeSize()?7:-1),p(),F(e.exceededVolumeSize()?8:-1),p(5),g("options",e.retentionOptions())("inlineSearch",!0)("isClearable",!1),p(3),u("ngModel",e.optionsFields.backupRetention),p(),F(e.optionsFields.backupRetention()==="all"?17:e.optionsFields.backupRetention()==="time"?18:e.optionsFields.backupRetention()==="versions"?19:e.optionsFields.backupRetention()==="smart"?20:e.optionsFields.backupRetention()==="custom"?21:-1),p(5),u("options",e.settings),g("applicationOptions",e.applicationOptions())("hiddenOptions",W(14,re)),p(5),G("loader",e.isSubmitting()))},dependencies:[te,Z,ne,J,ee,oe,ae,H,Y,j,ie,se,Q],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding-bottom:1.5rem}.form-column[_ngcontent-%COMP%]{display:flex;flex-direction:column}.form-column[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.form-column[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:1rem}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:3fr 1fr;gap:.5rem;align-items:flex-end}.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 40px;align-items:flex-end}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}spk-select[_ngcontent-%COMP%]{--miw: p2r(120)}"],changeDetection:0})};export{h as default};
@@ -0,0 +1 @@
1
+ import{a as u}from"./chunk-SL6SRYFT.js";import{Db as o,Eb as n,Ua as g,Vb as h,Xb as _,Yb as a,bb as d,gb as p,ic as c,lb as m,sa as r,wb as f,zb as C}from"./chunk-L72ALLHJ.js";var v=[[["","title",""]],[["","description",""]],[["","action",""]],"*"],P=["[title]","[description]","[action]","*"];function M(e,s){e&1&&c(0,"Title")}function T(e,s){e&1&&(o(0,"spk-icon"),c(1,"caret-down"),n())}var l=class e{isActive=d(!1);disallowToggle=r(!1);ngOnInit(){this.disallowToggle()&&this.isActive.set(!0)}toggle(){this.isActive.set(!this.isActive())}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=p({type:e,selectors:[["app-toggle-card"]],hostVars:2,hostBindings:function(t,i){t&2&&f("active",i.isActive())},inputs:{isActive:[1,"isActive"],disallowToggle:[1,"disallowToggle"]},outputs:{isActive:"isActiveChange"},ngContentSelectors:P,decls:11,vars:1,consts:[[1,"title"],[3,"click"],[1,"actions"],[1,"content"]],template:function(t,i){t&1&&(_(v),o(0,"header")(1,"div",0)(2,"h3",1),h("click",function(){return i.disallowToggle()||i.toggle()}),a(3,0,null,M,1,0),m(5,T,2,0,"spk-icon"),n(),a(6,1),n(),o(7,"div",2),a(8,2),n()(),o(9,"div",3),a(10,3),n()),t&2&&(g(5),C(i.disallowToggle()?-1:5))},dependencies:[u],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;border-radius:var(--shape-3);background-color:var(--base-2)}.active[_nghost-%COMP%] .content[_ngcontent-%COMP%]{max-height:1000px;transition:max-height 1s linear;padding:0 1rem 1rem}.active[_nghost-%COMP%] spk-icon[_ngcontent-%COMP%]{transform:rotate(180deg)}[_nghost-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;font:var(--paragraph-10);cursor:pointer;-webkit-user-select:none;user-select:none}[_nghost-%COMP%] spk-icon[_ngcontent-%COMP%]{transform:rotate(0);transform-origin:center;transition:transform .2s ease}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1rem}header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;flex:1 0}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]:empty{display:none}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;padding:0 1rem;overflow:hidden;max-height:0;transition:max-height .25s linear,padding .25s linear}.content[_ngcontent-%COMP%]:empty{display:none}"],changeDetection:0})};export{l as a};
@@ -0,0 +1,6 @@
1
+ import{a as Ut,b as Bt}from"./chunk-44DHERTN.js";import{a as pt}from"./chunk-54VPI5KJ.js";import{a as Be}from"./chunk-WFAZP46A.js";import{a as ct,b as Dt,c as _t}from"./chunk-V756QT7J.js";import{a as bt,b as ht,c as Gt}from"./chunk-EQWH3TBL.js";import{a as Se}from"./chunk-TQHNKGRL.js";import{a as Me}from"./chunk-F2GEUOGZ.js";import{a as q}from"./chunk-BIZAKOYU.js";import{b as $e,c as le,d as xe,e as ce,f as Re,g as rt,h as we,i as Ie,j as Le,m as st,n as ve,o as lt,p as vt,q as be,r as ge,s as Ge,t as Ue}from"./chunk-ELMONRIG.js";import{b as Fe,d as oe}from"./chunk-C6XTRC7P.js";import{A as ke,C as ot,a as ae,b as nt,d as It,e as ye,g as Oe,l as re,o as Lt,p as it,t as se}from"./chunk-SL6SRYFT.js";import{h as at}from"./chunk-S5EF63OY.js";import{ia as wt}from"./chunk-7L2WUS2V.js";import{$a as he,$b as Rt,Ab as Z,Bb as J,Bc as Ye,Cb as ee,Db as s,Eb as r,F as ze,Fb as u,Gb as V,Hb as K,Ib as Xe,Jb as I,Oc as $,Pb as E,Pc as tt,Qb as D,Rb as O,Sb as Je,T as De,Tb as et,Ua as l,Ub as Ce,Vb as h,Wb as c,Z as P,ea as F,f as Ze,fa as g,fc as Ae,gb as ie,gc as Pe,hc as te,ic as d,jc as Ne,ka as $t,kc as W,lb as m,lc as Et,nc as b,oc as G,pc as U,qc as We,ra as St,rc as Te,sa as ft,sc as R,tb as xt,ub as p,uc as He,va as f,vc as je,wb as me,xc as qe,zb as T}from"./chunk-L72ALLHJ.js";import{a as H,b as de,c as Mt}from"./chunk-7CGTOI24.js";var ut=class o{#n=P(at);#t=P(ye);#e=P(Me);testDestination(t,e,n){return this.#e.hasV2TestOperations()?this.testDestinationv2(t,e,n):this.testDestinationv1(t,e,n)}testDestinationv2(t,e,n){return new Ze(i=>{this.#n.postApiV2DestinationTest({requestBody:{DestinationUrl:t,AutoCreate:!1,Options:null}}).subscribe({next:a=>{if(a.Success){i.next({action:"success",targetUrl:t,testAgain:!1,destinationIndex:e,anyFilesFound:!a.Data?.FolderIsEmpty,containsBackup:a.Data?.FolderContainsBackupFiles??void 0,containsEncryptedBackupFiles:a.Data?.FolderContainsEncryptedBackupFiles??void 0}),i.complete();return}this.handleGenericError(i,t,e,a.Error??"Unknown error")},error:a=>{let _=a?.error?.body;if(_?.Data?.FolderExists===!1||_?.StatusCode==="missing-folder"){n?this.handleMissingFolder(i,t,e):this.handleGenericError(i,t,e,$localize`The remote destination folder does not exist.`);return}if(_?.Data?.HostCertificate){this.handleMissingCertificate(i,t,e,_.Data?.HostCertificate);return}if(_?.Data?.ReportedHostKey){this.handleIncorrectKey(i,t,e,_.Data.ReportedHostKey,_.Data.AcceptedHostKey??null);return}this.handleGenericError(i,t,e,a?.message??"Unknown error")}})})}testDestinationv1(t,e,n){return new Ze(i=>{this.#n.postApiV1RemoteoperationTest({requestBody:{path:t}}).subscribe({next:a=>{i.next({action:"success",targetUrl:t,testAgain:!1,destinationIndex:e}),i.complete()},error:a=>{this.handleDestinationErrorv1(a.message,t,e,n).subscribe(_=>{i.next(_)})}})})}handleMissingFolder(t,e,n){this.#t.open(q,{data:{title:$localize`Create folder`,message:$localize`The remote destination folder does not exist, do you want to create it?`,confirmText:$localize`Create folder`,cancelText:$localize`Cancel`},closed:i=>{i&&(this.#e.hasV2TestOperations()?this.#n.postApiV2DestinationTest({requestBody:{DestinationUrl:e,AutoCreate:!0,Options:null}}).subscribe({next:a=>{a.Success?this.handleFolderCreated(t,e,n):this.handleFolderCreateFailure(t,e,n,a.Error??$localize`Unknown error`)},error:a=>{this.handleFolderCreateFailure(t,e,n,a.message??$localize`Unknown error`)}}):this.#n.postApiV1RemoteoperationCreate({requestBody:{path:e}}).subscribe({next:()=>{this.handleFolderCreated(t,e,n)},error:a=>{this.handleFolderCreateFailure(t,e,n,a.message??$localize`Unknown error`)}}))}})}handleFolderCreateFailure(t,e,n,i){this.#t.open(q,{data:{title:$localize`Error creating folder`,message:$localize`The remote destination folder could not be created. ${i}`,confirmText:$localize`OK`,cancelText:null},closed:()=>{t.next({action:"generic-error",targetUrl:e,testAgain:!1,destinationIndex:n}),t.complete()}})}handleFolderCreated(t,e,n){this.#t.open(q,{data:{title:$localize`Folder created`,message:$localize`The remote destination folder was created successfully.`,confirmText:$localize`OK`,cancelText:null},closed:()=>{t.next({action:"test-again",targetUrl:e,testAgain:!0,destinationIndex:n}),t.complete()}})}reportNoAction(t,e,n){t.next({action:"generic-error",targetUrl:e,testAgain:!1,destinationIndex:n}),t.complete()}handleMissingCertificate(t,e,n,i){this.#t.open(q,{maxWidth:"500px",data:{title:$localize`Trust the certificate`,message:$localize`The server is using a certificate that is not trusted.
2
+ If this is a self-signed certificate, you can choose to trust this certificate.
3
+ The server reported the certificate hash: ${i}`,confirmText:$localize`Trust the certificate`,cancelText:$localize`Cancel`},closed:a=>{if(!a){this.reportNoAction(t,e,n);return}t.next({action:"trust-cert",targetUrl:e,testAgain:!0,certData:i,destinationIndex:n}),t.complete()}})}handleIncorrectKey(t,e,n,i,a){a?this.#t.open(q,{maxWidth:"500px",data:{title:$localize`The host key has changed`,message:$localize`The host key has changed, please check with the server administrator if this is correct,
4
+ otherwise you could be the victim of a MAN-IN-THE-MIDDLE attack.
5
+ Do you want to REPLACE your CURRENT host key ${a}
6
+ with the REPORTED host key: ${i}?`,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:_=>{if(!_){this.reportNoAction(t,e,n);return}t.next({action:"approve-host-key",targetUrl:e,testAgain:!0,reportedHostKey:i,destinationIndex:n}),t.complete()}}):this.#t.open(q,{maxWidth:"500px",data:{title:$localize`Approve host key?`,message:$localize`No certificate was specified, please verify that the reported host key is correct: ${i}`,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:_=>{if(!_){this.reportNoAction(t,e,n);return}t.next({action:"approve-host-key",targetUrl:e,testAgain:!0,reportedHostKey:i,destinationIndex:n}),t.complete()}})}handleGenericError(t,e,n,i){this.#t.open(q,{maxWidth:"500px",data:{title:$localize`Test connection failed`,message:i,cancelText:$localize`OK`},closed:a=>{t.next({action:"generic-error",targetUrl:e,testAgain:!1,destinationIndex:n}),t.complete()}})}handleDestinationErrorv1(t,e,n,i){return new Ze(a=>{if(t==="missing-folder"){i?this.handleMissingFolder(a,e,n):this.handleGenericError(a,e,n,$localize`The remote destination folder does not exist.`);return}if(t.startsWith("incorrect-cert:")){let _=t.split("incorrect-cert:")[1];this.handleMissingCertificate(a,e,n,_);return}if(t.startsWith("incorrect-host-key:")){let _=t.split('incorrect-host-key:"')[1].split('",')[0],A=t.split('accepted-host-key:"')[1].split('",')[0];this.handleIncorrectKey(a,e,n,_,A);return}this.handleGenericError(a,e,n,t)})}static \u0275fac=function(e){return new(e||o)};static \u0275prov=De({token:o,factory:o.\u0275fac,providedIn:"root"})};var dt=class o{fromString(t){if(!t)return null;let e=t.match(/(\d+)([smhDWMY])/);return e&&{value:parseInt(e[1]),unit:e[2]}}toString(t,e){return`${t}${e}`}static \u0275fac=function(e){return new(e||o)};static \u0275prov=De({token:o,factory:o.\u0275fac,providedIn:"root"})};var jt=["formRef"];function qt(o,t){o&1&&(s(0,"spk-alert",17),E(1,5),u(2,"spk-icon",26),D(),r())}function Yt(o,t){if(o&1&&d(0),o&2){let e=t.$implicit;W(" ",e.DisplayName," ")}}function Qt(o,t){if(o&1&&u(0,"spk-progress-bar",40),o&2){let e=c(3);me("error",e.calculatePasswordStrength()===1)("warn",e.calculatePasswordStrength()===2)("primary",e.calculatePasswordStrength()===4)("success",e.calculatePasswordStrength()===5),p("value",e.calculatePasswordStrength()*(100/5))}}function Zt(o,t){o&1&&(s(0,"span",35),O(1,10),r())}function Jt(o,t){o&1&&(E(0,8,1),u(1,"spk-icon"),D())}function en(o,t){o&1&&(E(0,8,2),u(1,"spk-icon"),D())}function tn(o,t){o&1&&(E(0,11,1),u(1,"spk-icon",42),D())}function nn(o,t){o&1&&(E(0,11,2),u(1,"spk-icon"),D())}function on(o,t){if(o&1){let e=I();s(0,"button",41),h("click",function(){F(e);let i=c(3);return g(i.copyPassword())}),E(1,11),m(2,tn,2,0)(3,nn,2,0),D(),r()}if(o&2){let e=c(3);l(2),T(e.copiedPassword()?2:3)}}function an(o,t){o&1&&(s(0,"spk-alert",39),O(1,12),r())}function rn(o,t){if(o&1){let e=I();s(0,"div",30)(1,"spk-form-field")(2,"label",31),E(3,7),u(4,"sup"),D(),r(),u(5,"input",32),r(),m(6,Qt,1,9,"spk-progress-bar",33),s(7,"spk-form-field"),u(8,"input",34),m(9,Zt,2,0,"span",35),r(),s(10,"div",36)(11,"button",37),h("click",function(){F(e);let i=c(2);return g(i.showPassword.set(!i.showPassword()))}),E(12,8),m(13,Jt,2,0)(14,en,2,0),D(),r(),s(15,"button",37),h("click",function(){F(e);let i=c(2);return g(i.generatePassword())}),E(16,9),u(17,"spk-icon"),D(),r(),m(18,on,4,1,"button",38),r(),m(19,an,2,0,"spk-alert",39),r()}if(o&2){let e=c(2);l(5),p("type",e.showPassword()?"text":"password"),l(),T(e.generalForm.value.password?6:-1),l(2),p("type",e.showPassword()?"text":"password"),l(),T(e.generalForm.value.repeatPassword&&e.generalForm.value.repeatPassword!==e.generalForm.value.password?9:-1),l(4),T(e.showPassword()?13:14),l(5),T(e.showCopyPassword()?18:-1),l(),T(e.generalForm.value.password&&e.generalForm.value.password===e.generalForm.value.repeatPassword?19:-1)}}function sn(o,t){if(o&1&&(s(0,"spk-select",27)(1,"label",28),O(2,6),r(),u(3,"input",29),m(4,Yt,1,1,"ng-template"),r(),m(5,rn,20,7,"div",30)),o&2){let e=c();p("options",e.encryptionOptions())("isClearable",!1),l(5),T(e.encryptionFieldSignal()!==""?5:-1)}}function ln(o,t){if(o&1&&(s(0,"button",24),E(1,13),u(2,"spk-icon"),D(),r()),o&2){let e=c();p("disabled",e.nameAndDescriptionValid()===!1)}}function cn(o,t){if(o&1&&(s(0,"button",25),E(1,14),u(2,"spk-icon"),D(),r()),o&2){let e=c();p("disabled",e.generalForm.invalid||e.showCopyPassword()&&!e.copiedPassword())}}var Ve=new ge,Vt=(o={name:"",description:"",encryption:"",password:"",repeatPassword:""})=>Ve.group({name:Ve.control(o.name,[xe.required]),description:Ve.control(o.description),encryption:Ve.control(o.encryption,[Gt()]),password:Ve.control(o.password,[ht(t=>t?.value.encryption!=="",[xe.required])]),repeatPassword:Ve.control(o.repeatPassword,[ht(t=>t?.value.encryption!=="",[xe.required])])}),Pt={Key:"",DisplayName:"None"},At=class o{#n=P(oe);#t=P(Fe);#e=P(bt);#i=P(_e);#o=P(Me);formRef=he.required("formRef");generalForm=this.#i.generalForm;generalFormSignal=this.#i.generalFormSignal;encryptionFieldSignal=this.#i.encryptionFieldSignal;encryptionOptions=this.#i.encryptionOptions;isNew=this.#i.isNew;showPassword=f(!1);copiedPassword=f(!1);showCopyPassword=f(!1);encryptionEffect=tt(()=>{this.encryptionFieldSignal()===""&&(this.copiedPassword.set(!1),this.showCopyPassword.set(!1))});nameAndDescriptionValid=$(()=>{let t=this.generalFormSignal(),e=this.generalForm.controls;return e?.name&&e.name.valid&&e?.description&&e.description.valid});calculatePasswordStrength=$(()=>{let e=this.generalFormSignal()?.password??"";return this.#e.calculatePasswordStrength(e)});ngOnInit(){this.formRef().nativeElement.focus()}exit(){this.#i.exit(!0)}async copyPassword(){let t=this.generalForm.controls.password.value;await this.#a(t??""),this.copiedPassword.set(!0)}async#a(t){try{await navigator.clipboard.writeText(t)}catch{try{let n=document.createElement("textarea");n.value=t,document.body.appendChild(n),n.select(),document.execCommand("copy"),document.body.removeChild(n)}catch(n){console.error("Failed to copy text: ",n)}}}displayFn(){let t=this.#o.systemInfo()?.EncryptionModules??[];return e=>{let n=[Pt,...t].find(i=>i.Key===e);return n?`${n.DisplayName}`:""}}generatePassword(){this.copiedPassword.set(!1);let t=this.#e.generate(16);this.generalForm.controls.password.setValue(t),this.generalForm.controls.repeatPassword.setValue(t),this.showCopyPassword.set(!0)}next(){this.#n.navigate(["destination"],{relativeTo:this.#t.parent})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=ie({type:o,selectors:[["app-general"]],viewQuery:function(e,n){e&1&&Ae(n.formRef,jt,5),e&2&&Pe()},decls:21,vars:4,consts:()=>{let t;t=$localize`Your backup name`;let e;e=$localize`Your backup description`;let n;n=$localize`Remember to copy the password`;let i;i=$localize`General backup settings`;let a;a=$localize` Backup name ${"\uFFFD#8\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#8\uFFFD"}:CLOSE_SUPERSCRIPT:`;let _;_=$localize`Backup description`;let A;A=$localize`${"\uFFFD#18\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SPK_ICON: Exit `;let k;k=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:lock${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON: Encrypted backup `;let w;w=$localize`Encryption`;let B;B=$localize`Encryption`;let N;N=$localize`Password`;let x;x=$localize`Repeat password`;let v;v=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let j;j=$localize`${"\uFFFD*13:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:eye-slash${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: hide ${"\uFFFD/*13:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*14:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:eye${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: show ${"\uFFFD/*14:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,j=Ce(j);let Y;Y=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:password${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: Generate password `;let S;S=$localize`Passwords do not match`;let C;C=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SPK_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Copied password ${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SPK_ICON_1:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Copy password ${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,C=Ce(C);let L;L=$localize` Tip: Be sure to save your password. If you loose it you will lose access to your backups. `;let z;z=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let X;return X=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["formRef",""],i,a,_,A,k,B,v,j,Y,S,C,L,z,X,["autocomplete","off",3,"submit","formGroup"],[1,"title-30"],[1,"primary"],["for","backupName"],["type","text","tabindex","1","placeholder",t,"formControlName","name"],["for","backupDescription"],["id","backupDescription","tabindex","2","placeholder",e,"formControlName","description"],[1,"form-actions"],["type","button","spk-button","",3,"click"],["spk-button","","type","submit",1,"raised","primary",3,"disabled"],["spk-button","","type","submit","spkTooltip",n,1,"raised","primary",3,"disabled"],["icon",""],["value","Key","label","DisplayName",3,"options","isClearable"],["for","encryption"],["type","text","id","encryption","tabindex","3","placeholder",w,"formControlName","encryption"],[1,"passwords"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",N,"formControlName","password",3,"type"],[1,"raised",3,"error","warn","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",x,"formControlName","repeatPassword",3,"type"],["error",""],[1,"password-actions"],["spk-button","","type","button",1,"small",3,"click"],["spk-button","","type","button",1,"small","copy"],["type","primary"],[1,"raised",3,"value"],["spk-button","","type","button",1,"small","copy",3,"click"],[1,"spk-success"]]},template:function(e,n){if(e&1){let i=I();s(0,"form",15,0),h("submit",function(){return F(i),g(n.next())}),s(2,"h3",16),O(3,1),r(),m(4,qt,3,0,"spk-alert",17),s(5,"spk-form-field")(6,"label",18),E(7,2),u(8,"sup"),D(),r(),u(9,"input",19),r(),s(10,"spk-form-field")(11,"label",20),O(12,3),r(),u(13,"textarea",21),r(),m(14,sn,6,3),s(15,"div",22)(16,"button",23),h("click",function(){return F(i),g(n.exit())}),E(17,4),u(18,"spk-icon"),D(),r(),m(19,ln,3,1,"button",24)(20,cn,3,1,"button",25),r()()}if(e&2){let i;p("formGroup",n.generalForm),l(4),T(!n.isNew()&&((i=n.generalFormSignal())==null?null:i.encryption)!==""?4:-1),l(10),T(n.isNew()?14:-1),l(5),T(n.encryptionFieldSignal()===""||!n.isNew()?19:20)}},dependencies:[Ue,Ie,le,ce,Re,ve,be,re,se,Oe,ae,it,nt,ot],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding-bottom:1.5rem}sup[_ngcontent-%COMP%]{padding:0 .125rem;color:var(--error-500)}.passwords[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.password-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.copy[_ngcontent-%COMP%] spk-icon.spk-success[_ngcontent-%COMP%]{color:var(--success-500)}"],changeDetection:0})};function _n(o,t){if(o&1){let e=I();s(0,"div",24)(1,"spk-form-field")(2,"label",25),O(3,7),r(),s(4,"input",26,0),U("ngModelChange",function(i){F(e);let a=c();return G(a.scheduleFields.nextTime().time,i)||(a.scheduleFields.nextTime().time=i),g(i)}),h("focus",function(){F(e);let i=te(5);return g(i.showPicker())}),r(),s(6,"spk-icon",27),d(7,"clock"),r()(),s(8,"spk-form-field"),u(9,"label",28),s(10,"input",29,1),U("ngModelChange",function(i){F(e);let a=c();return G(a.scheduleFields.nextTime().date,i)||(a.scheduleFields.nextTime().date=i),g(i)}),h("focus",function(){F(e);let i=te(11);return g(i.showPicker())}),r(),s(12,"spk-icon",27),d(13,"calendar"),r()()(),s(14,"div",24)(15,"spk-form-field")(16,"label",30),O(17,8),r(),s(18,"input",31),U("ngModelChange",function(i){F(e);let a=c();return G(a.scheduleFields.runAgain().repeatValue,i)||(a.scheduleFields.runAgain().repeatValue=i),g(i)}),r()(),s(19,"spk-select",32)(20,"input",33),U("ngModelChange",function(i){F(e);let a=c();return G(a.scheduleFields.runAgain().repeatUnit,i)||(a.scheduleFields.runAgain().repeatUnit=i),g(i)}),r()()(),s(21,"app-toggle-card",34),V(22,35),O(23,9),K(),s(24,"div",36)(25,"spk-toggle",19),E(26,10),s(27,"input",20),U("ngModelChange",function(i){F(e);let a=c();return G(a.scheduleFields.runAgain().allowedDays.mon,i)||(a.scheduleFields.runAgain().allowedDays.mon=i),g(i)}),r(),D(),r(),s(28,"spk-toggle",19),E(29,11),s(30,"input",20),U("ngModelChange",function(i){F(e);let a=c();return G(a.scheduleFields.runAgain().allowedDays.tue,i)||(a.scheduleFields.runAgain().allowedDays.tue=i),g(i)}),r(),D(),r(),s(31,"spk-toggle",19),E(32,12),s(33,"input",20),U("ngModelChange",function(i){F(e);let a=c();return G(a.scheduleFields.runAgain().allowedDays.wed,i)||(a.scheduleFields.runAgain().allowedDays.wed=i),g(i)}),r(),D(),r(),s(34,"spk-toggle",19),E(35,13),s(36,"input",20),U("ngModelChange",function(i){F(e);let a=c();return G(a.scheduleFields.runAgain().allowedDays.thu,i)||(a.scheduleFields.runAgain().allowedDays.thu=i),g(i)}),r(),D(),r(),s(37,"spk-toggle",19),E(38,14),s(39,"input",20),U("ngModelChange",function(i){F(e);let a=c();return G(a.scheduleFields.runAgain().allowedDays.fri,i)||(a.scheduleFields.runAgain().allowedDays.fri=i),g(i)}),r(),D(),r(),s(40,"spk-toggle",19),E(41,15),s(42,"input",20),U("ngModelChange",function(i){F(e);let a=c();return G(a.scheduleFields.runAgain().allowedDays.sat,i)||(a.scheduleFields.runAgain().allowedDays.sat=i),g(i)}),r(),D(),r(),s(43,"spk-toggle",19),E(44,16),s(45,"input",20),U("ngModelChange",function(i){F(e);let a=c();return G(a.scheduleFields.runAgain().allowedDays.sun,i)||(a.scheduleFields.runAgain().allowedDays.sun=i),g(i)}),r(),D(),r()()()}if(o&2){let e=c();l(4),b("ngModel",e.scheduleFields.nextTime().time),l(6),b("ngModel",e.scheduleFields.nextTime().date),l(8),b("ngModel",e.scheduleFields.runAgain().repeatValue),l(),p("options",e.unitOptions)("isClearable",!1),l(),b("ngModel",e.scheduleFields.runAgain().repeatUnit),l(),p("disallowToggle",!0),l(6),b("ngModel",e.scheduleFields.runAgain().allowedDays.mon),l(3),b("ngModel",e.scheduleFields.runAgain().allowedDays.tue),l(3),b("ngModel",e.scheduleFields.runAgain().allowedDays.wed),l(3),b("ngModel",e.scheduleFields.runAgain().allowedDays.thu),l(3),b("ngModel",e.scheduleFields.runAgain().allowedDays.fri),l(3),b("ngModel",e.scheduleFields.runAgain().allowedDays.sat),l(3),b("ngModel",e.scheduleFields.runAgain().allowedDays.sun)}}var pn=[{key:"s",label:$localize`Seconds`},{key:"m",label:$localize`Minutes`},{key:"h",label:$localize`Hours`},{key:"D",label:$localize`Days`},{key:"W",label:$localize`Weeks`},{key:"M",label:$localize`Months`},{key:"Y",label:$localize`Years`}],Ee={autoRun:!0,nextTime:{time:"13:00",date:new Date().toISOString().split("T")[0]},runAgain:{repeatValue:1,repeatUnit:"D",allowedDays:{mon:!1,tue:!1,wed:!1,thu:!1,fri:!1,sat:!1,sun:!1}}},Nt=class o{#n=P(_e);#t=P(oe);#e=P(Fe);unitOptions=pn;scheduleFields=this.#n.scheduleFields;goBack(){this.#t.navigate(["source-data"],{relativeTo:this.#e.parent})}next(){this.#t.navigate(["options"],{relativeTo:this.#e.parent})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=ie({type:o,selectors:[["app-schedule"]],decls:16,vars:2,consts:()=>{let t;t=$localize`Schedule`;let e;e=$localize` Automatically run backups ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let n;n=$localize`If a date was missed, the job will run as soon as possible.`;let i;i=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let a;a=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let _;_=$localize`Next time`;let A;A=$localize`Run again every`;let k;k=$localize`Allowed days`;let w;w=$localize` Monday ${"\uFFFD#27\uFFFD\uFFFD/#27\uFFFD"}:TAG_INPUT:`;let B;B=$localize` Tuesday ${"\uFFFD#30\uFFFD\uFFFD/#30\uFFFD"}:TAG_INPUT:`;let N;N=$localize` Wednesday ${"\uFFFD#33\uFFFD\uFFFD/#33\uFFFD"}:TAG_INPUT:`;let x;x=$localize` Thursday ${"\uFFFD#36\uFFFD\uFFFD/#36\uFFFD"}:TAG_INPUT:`;let v;v=$localize` Friday ${"\uFFFD#39\uFFFD\uFFFD/#39\uFFFD"}:TAG_INPUT:`;let j;j=$localize` Saturday ${"\uFFFD#42\uFFFD\uFFFD/#42\uFFFD"}:TAG_INPUT:`;let Y;return Y=$localize` Sunday ${"\uFFFD#45\uFFFD\uFFFD/#45\uFFFD"}:TAG_INPUT:`,[["timeRef",""],["dateRef",""],t,e,n,i,a,_,A,k,w,B,N,x,v,j,Y,[1,"title-30"],[1,"toggle-wrap"],[1,"raised","primary"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","",1,"raised","primary",3,"click"],[1,"row-inputs"],["for","time"],["type","time","id","time",3,"ngModelChange","focus","ngModel"],["suffix",""],["for","date"],["type","date","id","date",3,"ngModelChange","focus","ngModel"],["for","repeatValue"],["type","number","id","repeatValue",3,"ngModelChange","ngModel"],["value","key","label","label",3,"options","isClearable"],["type","text","id","repeatUnit",3,"ngModelChange","ngModel"],[3,"disallowToggle"],["title",""],[1,"days-wrap"]]},template:function(e,n){e&1&&(s(0,"h3",17),O(1,2),r(),s(2,"div",18)(3,"spk-toggle",19),E(4,3),s(5,"input",20),U("ngModelChange",function(a){return G(n.scheduleFields.autoRun,a)||(n.scheduleFields.autoRun=a),a}),r(),D(),r(),s(6,"p"),O(7,4),r()(),m(8,_n,46,14),s(9,"div",21)(10,"button",22),h("click",function(){return n.goBack()}),E(11,5),u(12,"spk-icon"),D(),r(),s(13,"button",23),h("click",function(){return n.next()}),E(14,6),u(15,"spk-icon"),D(),r()()),e&2&&(l(5),b("ngModel",n.scheduleFields.autoRun),l(3),T(n.scheduleFields.autoRun()?8:-1))},dependencies:[Ge,le,Le,$e,ce,we,re,ke,ae,Oe,se,Be],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem 2.5rem 1.5rem;display:flex;flex-direction:column;gap:1.5rem}.toggle-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.days-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};function un(o,t){if(o&1&&(V(0,4),d(1),K()),o&2){let e,n=c();l(),Ne((e=n.currentExpressionOption())==null?null:e.startsWith)}}function dn(o,t){if(o&1&&(V(0,5),d(1),K()),o&2){let e,n=c();l(),Ne((e=n.currentExpressionOption())==null?null:e.endsWith)}}var mn=[{key:"Excludes folders where name contains",value:"-FolderName"},{key:"Excludes folder",value:"-Folder"},{key:"Excludes files where name contains",value:"-FileName"},{key:"Excludes file extension",value:"-Extension"},{key:"Excludes files where name matches regex",value:"-Regex"},{key:"Includes files where name matches regex",value:"+Regex"},{key:"Excludes file group",value:"-FileGroup"},{key:"Includes expression",value:"+Expression"},{key:"Excludes expression",value:"-Expression"},{key:"None",value:"-Unknown"}],gt=class o{path=ft.required();osType=ft();pathChange=St();remove=St();internalPath=f("");pathType=f("-Expression");currentExpressionOption=$(()=>{let t=this.pathType();return this.expressionOptions().find(e=>e.value===t)});expressionOptions=$(()=>{let e=this.osType()==="Windows"?"\\":"/";return mn.map(n=>n.value==="-Folder"||n.value==="+Folder"?de(H({},n),{startsWith:"",endsWith:""}):n.value==="-FolderName"||n.value==="+FolderName"?de(H({},n),{startsWith:"*",endsWith:`*${e}`}):n.value==="-FileName"||n.value==="+FileName"?de(H({},n),{startsWith:"[.*",endsWith:`[^\\${e}]*]`}):n.value==="-FileGroup"||n.value==="+FileGroup"?de(H({},n),{startsWith:"{",endsWith:"}"}):n.value==="-Regex"||n.value==="+Regex"?de(H({},n),{startsWith:"[",endsWith:"]"}):n.value==="-Extension"||n.value==="+Extension"?de(H({},n),{startsWith:"*.",endsWith:""}):de(H({},n),{startsWith:"",endsWith:""}))});pathEffect=tt(()=>{let t=this.path(),e=t.slice(1),n=t.startsWith("-")?"-":"+",i=this.osType()==="Windows",a=i?"\\":"/";e.startsWith("%")&&e.endsWith(a)||i&&e.slice(2).startsWith(a)&&e.endsWith(a)||e.startsWith(a)&&e.endsWith(a)?(this.pathType.set(`${n}Folder`),this.internalPath.set(e)):e.startsWith("*")&&e.endsWith(`*${a}`)?(this.pathType.set(`${n}FolderName`),this.internalPath.set(e.slice(1,-2))):e.startsWith("[.*")&&e.endsWith(`[^\\${a}]*]`)?(this.pathType.set(`${n}FileName`),this.internalPath.set(e.slice(3,-7))):e.startsWith("{")&&e.endsWith("}")?(this.pathType.set(`${n}FileGroup`),this.internalPath.set(e.slice(1,-1))):e.startsWith("[")&&e.endsWith("]")?(this.pathType.set(`${n}Regex`),this.internalPath.set(e.slice(1,-1))):e.startsWith("*.")?(this.pathType.set(`${n}Extension`),this.internalPath.set(e.slice(2))):(this.pathType.set(`${n}Expression`),this.internalPath.set(e))});updateFilter(){let t=this.internalPath(),e=this.currentExpressionOption();t!==""&&this.pathChange.emit(`${e?.value.slice(0,1)}${e?.startsWith??""}${t}${e?.endsWith??""}`)}removeFilter(){this.remove.emit()}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=ie({type:o,selectors:[["app-new-filter"]],inputs:{path:[1,"path"],osType:[1,"osType"]},outputs:{pathChange:"pathChange",remove:"remove"},decls:9,vars:6,consts:()=>{let t;return t=$localize`Select an option...`,[["value","value","label","key",3,"options","isClearable"],["type","text","placeholder",t,3,"ngModelChange","ngModel"],[1,"expression-input"],["type","text",3,"ngModelChange","ngModel"],["prefix",""],["suffix",""],[1,"filter-removal",3,"click"],[1,"spk-primary"]]},template:function(e,n){if(e&1&&(s(0,"spk-select",0)(1,"input",1),U("ngModelChange",function(a){return G(n.pathType,a)||(n.pathType=a),a}),h("ngModelChange",function(){return n.updateFilter()}),r()(),s(2,"spk-form-field",2)(3,"input",3),U("ngModelChange",function(a){return G(n.internalPath,a)||(n.internalPath=a),a}),h("ngModelChange",function(){return n.updateFilter()}),r(),m(4,un,2,1,"ng-container",4)(5,dn,2,1,"ng-container",5),r(),s(6,"div",6),h("click",function(){return n.removeFilter()}),s(7,"spk-icon",7),d(8,"x-circle"),r()()),e&2){let i,a;p("options",n.expressionOptions())("isClearable",!1),l(),b("ngModel",n.pathType),l(2),b("ngModel",n.internalPath),l(),T(!((i=n.currentExpressionOption())==null||i.startsWith==null)&&i.startsWith.length?4:-1),l(),T(!((a=n.currentExpressionOption())==null||a.endsWith==null)&&a.endsWith.length?5:-1)}},dependencies:[Ge,le,ce,we,se,re,ae],styles:["[_nghost-%COMP%]{display:grid;grid-template-columns:13.125rem 1fr 1.875rem;gap:.5rem;align-items:flex-end}.expression-input[_ngcontent-%COMP%]{--ff-suffix-bg: var(--base-2)}.filter-removal[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;justify-content:center;height:2.5rem;flex:0 0}"],changeDetection:0})};var Fn=["formRef"],Kt=()=>({standalone:!0});function gn(o,t){if(o&1){let e=I();s(0,"spk-form-field",42)(1,"input",43),U("ngModelChange",function(i){F(e);let a=c(2);return G(a.editingPath,i)||(a.editingPath=i),g(i)}),r()(),s(2,"button",44),h("click",function(){F(e);let i=c(2);return g(i.updatePath())}),s(3,"spk-icon"),d(4,"floppy-disk"),r()(),s(5,"button",44),h("click",function(){F(e);let i=c(2);return g(i.cancelEditPath())}),s(6,"spk-icon"),d(7,"x-bold"),r()()}if(o&2){let e=c(2);l(),b("ngModel",e.editingPath),p("ngModelOptions",He(2,Kt))}}function Cn(o,t){if(o&1){let e=I();s(0,"spk-form-field",42),u(1,"input",45),r(),s(2,"button",44),h("click",function(){F(e);let i=c().$implicit,a=c();return g(a.editPath(i))}),s(3,"spk-icon"),d(4,"pen"),r()(),s(5,"button",44),h("click",function(){F(e);let i=c().$implicit,a=c();return g(a.removePath(i))}),s(6,"spk-icon"),d(7,"trash-simple"),r()()}if(o&2){let e=c().$implicit;xt("readonly",!0),l(),p("ngModel",e)("ngModelOptions",He(3,Kt))}}function Tn(o,t){if(o&1&&(s(0,"div",30),m(1,gn,8,3)(2,Cn,8,4),r()),o&2){let e=t.$implicit,n=c();l(),T(n.oldPath()===e?1:2)}}function Sn(o,t){if(o&1){let e=I();s(0,"app-new-filter",47),h("pathChange",function(i){let a=F(e).$index,_=c(2);return g(_.patchPathAt(i,a))})("remove",function(){let i=F(e).$index,a=c(2);return g(a.removePathAt(i))}),r()}if(o&2){let e,n=t.$implicit,i=c(2);p("path",n)("osType",(e=i.osType())!==null&&e!==void 0?e:"")}}function fn(o,t){if(o&1&&J(0,Sn,1,2,"app-new-filter",46,Z),o&2){let e=c();ee(e.pathArray())}}function En(o,t){if(o&1&&(s(0,"div",41)(1,"spk-form-field"),u(2,"input",48),r(),s(3,"spk-select",49),u(4,"input",50),r()()),o&2){let e=c();l(3),p("options",e.sizeOptions())("isClearable",!1)}}var pe=new ge,Dn=["Bytes","KB","MB","GB","TB","PB"],zt=(o={path:"",filters:[],excludes:{hidden:!1,system:!1,temporary:!1,filesLargerThan:null}})=>pe.group({path:pe.control(o.path),excludes:pe.group({hidden:pe.control(o.excludes.hidden),system:pe.control(o.excludes.system),temporary:pe.control(o.excludes.temporary),filesLargerThan:pe.group({size:pe.control(null),unit:pe.control(null)})})}),yt=class o{#n=P(_e);#t=P(oe);#e=P(Fe);formRef=he.required("formRef");sourceDataForm=this.#n.sourceDataForm;sourceDataFormSignal=this.#n.sourceDataFormSignal;newPathCtrl=new rt("");filesLargerThan=$(()=>this.sourceDataFormSignal()?.excludes?.filesLargerThan?.size!==null);sizeOptions=f(Dn);osType=this.#n.osType;pathSignal=Se(this.sourceDataForm.controls.path.valueChanges);pathArray=$(()=>this.pathSignal()?.split("\0").filter(t=>t.startsWith("-")||t.startsWith("+")||t==="___none___")??[]);nonFilterPaths=$(()=>this.pathSignal()?.split("\0").filter(t=>!t.startsWith("-")&&!t.startsWith("+")&&t!==""));oldPath=f(null);editingPath=f(null);addingNewPath=f(!1);editPath(t){this.oldPath.set(t),this.editingPath.set(t)}updatePath(){let t=this.oldPath(),e=this.editingPath();if(!t||!e||e===t){this.oldPath.set(null),this.editingPath.set(null);return}let n=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(n?.replace(t,e)??""),this.oldPath.set(null),this.editingPath.set(null)}cancelEditPath(){this.oldPath.set(null),this.editingPath.set(null)}removePath(t){let e=this.sourceDataForm.controls.path.value??"",n=e.indexOf(t);if(n===-1)return;let i=n===0?t:"\0"+t,a=e.replace(i,"");this.sourceDataForm.controls.path.setValue(a)}addFilter(t="-*"){let e=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(`${e}\0${t}`)}patchPathAt(t,e){let i=this.sourceDataForm.controls.path.value.split("\0").filter(_=>!_.startsWith("-")&&!_.startsWith("+")).join("\0"),a=this.pathArray().map((_,A)=>A===e?`${t}`:`${_}`).join("\0");this.sourceDataForm.controls.path.setValue(`${i}\0${a}`)}removePathAt(t){let n=this.sourceDataForm.controls.path.value.split("\0").filter(a=>!a.startsWith("-")&&!a.startsWith("+")).join("\0"),i=this.pathArray().filter((a,_)=>_!==t).join("\0");this.sourceDataForm.controls.path.setValue(`${n}\0${i}`)}getPath(){return this.sourceDataForm.value.path??null}toggleFilesLargerThan(){this.sourceDataForm.controls.excludes.value.filesLargerThan?.size===null?this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:50,unit:"MB"}):this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:null,unit:null})}addNewPath(){let t=this.sourceDataForm.controls.path.value,e=this.newPathCtrl.value;this.sourceDataForm.controls.path.setValue(`${t}\0${e}`),this.newPathCtrl.setValue("")}goBack(){this.#t.navigate(["destination"],{relativeTo:this.#e.parent})}next(){this.#t.navigate(["schedule"],{relativeTo:this.#e.parent})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=ie({type:o,selectors:[["app-source-data"]],viewQuery:function(e,n){e&1&&Ae(n.formRef,Fn,5),e&2&&Pe()},decls:56,vars:12,consts:()=>{let t;t=$localize`Path`;let e;e=$localize`Add a direct path`;let n;n=$localize`Hidden files`;let i;i=$localize`System files`;let a;a=$localize`Temporary files`;let _;_=$localize`Source Data`;let A;A=$localize`Folder path`;let k;k=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let w;w=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let B;B=$localize`Paths`;let N;N=$localize`Add a path directly from your machine.`;let x;x=$localize`Filters`;let v;v=$localize`Customize your filters.`;let j;j=$localize`Add filter`;let Y;Y=$localize`Exclude`;let S;S=$localize`Choose if there’s any files you want to exclude.`;let C;C=$localize` Hidden files ${"\uFFFD#46\uFFFD\uFFFD/#46\uFFFD"}:TAG_INPUT:`;let L;L=$localize` System files ${"\uFFFD#49\uFFFD\uFFFD/#49\uFFFD"}:TAG_INPUT:`;let z;z=$localize` Temporary files ${"\uFFFD#52\uFFFD\uFFFD/#52\uFFFD"}:TAG_INPUT:`;let X;X=$localize` Files larger than `;let y;y=$localize`Edit path`;let ne;return ne=$localize`Select an option...`,[["formRef",""],_,A,k,w,B,N,x,v,j,Y,S,C,L,z,X,[3,"submit","formGroup"],[1,"left"],[1,"title-30"],[1,"fill",3,"multiSelect","startingPath","showFiles"],["for","path"],["type","text","id","path","tabindex","4","placeholder",t,"formControlName","path"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],[1,"right"],[3,"disallowToggle"],["title",""],["description",""],[1,"paths"],[1,"path"],[1,"row-inputs"],["type","text","placeholder",e,3,"formControl"],["spk-button","","type","button",1,"raised","primary",3,"click"],["type","button","spk-button","","action","",3,"click"],["formGroupName","excludes",3,"disallowToggle"],[1,"raised","primary"],["type","checkbox","placeholder",n,"formControlName","hidden"],["type","checkbox","placeholder",i,"formControlName","system"],["type","checkbox","placeholder",a,"formControlName","temporary"],[1,"raised","primary",3,"click"],["formGroupName","filesLargerThan",1,"row-inputs"],[1,"small"],["type","text","placeholder",y,3,"ngModelChange","ngModel","ngModelOptions"],["spk-button","","type","button",1,"small",3,"click"],["type","text",3,"ngModel","ngModelOptions"],[3,"path","osType"],[3,"pathChange","remove","path","osType"],["type","number","formControlName","size"],[3,"options","isClearable"],["type","text","formControlName","unit","placeholder",ne]]},template:function(e,n){if(e&1){let i=I();s(0,"form",16,0),h("submit",function(){return F(i),g(n.next())}),s(2,"div",17)(3,"h3",18),O(4,1),r(),s(5,"app-file-tree",19)(6,"label",20),O(7,2),r(),u(8,"input",21),r(),s(9,"div",22)(10,"button",23),h("click",function(){return F(i),g(n.goBack())}),E(11,3),u(12,"spk-icon"),D(),r(),s(13,"button",24),E(14,4),u(15,"spk-icon"),D(),r()()(),s(16,"div",25)(17,"app-toggle-card",26),V(18,27),O(19,5),K(),s(20,"p",28),O(21,6),r(),s(22,"div",29),J(23,Tn,3,1,"div",30,Z),s(25,"div",31)(26,"spk-form-field"),u(27,"input",32),r(),s(28,"button",33),h("click",function(){return F(i),g(n.addNewPath())}),s(29,"spk-icon"),d(30,"plus"),r()()()()(),s(31,"app-toggle-card",26),V(32,27),O(33,7),K(),s(34,"p",28),O(35,8),r(),s(36,"button",34),h("click",function(){return F(i),g(n.addFilter())}),O(37,9),r(),m(38,fn,2,0),r(),s(39,"app-toggle-card",35),V(40,27),O(41,10),K(),s(42,"p",28),O(43,11),r(),s(44,"spk-toggle",36),E(45,12),u(46,"input",37),D(),r(),s(47,"spk-toggle",36),E(48,13),u(49,"input",38),D(),r(),s(50,"spk-toggle",36),E(51,14),u(52,"input",39),D(),r(),s(53,"spk-toggle",40),h("click",function(){return F(i),g(n.toggleFilesLargerThan())}),O(54,15),r(),m(55,En,5,2,"div",41),r()()()}if(e&2){let i;p("formGroup",n.sourceDataForm),l(5),p("multiSelect",!0)("startingPath",n.getPath())("showFiles",!0),l(12),p("disallowToggle",!0),l(6),ee(n.nonFilterPaths()),l(4),p("formControl",n.newPathCtrl),l(4),p("disallowToggle",!0),l(7),T((i=n.pathSignal())!=null&&i.length?38:-1),l(),p("disallowToggle",!0),l(14),me("active",n.filesLargerThan()),l(2),T(n.filesLargerThan()?55:-1)}},dependencies:[Ge,Ie,le,Le,$e,ce,Re,we,Ue,st,ve,be,lt,re,ae,Oe,ke,se,gt,pt,Be],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;width:100%;flex:1 0;overflow:hidden}form[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;flex:1 0;overflow:hidden}.right[_ngcontent-%COMP%], .left[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:1.5rem}.left[_ngcontent-%COMP%]{padding:2.5rem;overflow:hidden;border-right:1px solid var(--base-4)}.right[_ngcontent-%COMP%]{padding:2.5rem 1.5rem;overflow:auto}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}spk-divider[_ngcontent-%COMP%]{margin:.75rem 0}.row-inputs[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr min-content;gap:.25rem}.paths[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.path[_ngcontent-%COMP%]{display:grid;align-items:center;grid-template-columns:1fr min-content min-content;gap:.25rem}"],changeDetection:0})};var Xt="1W:1D,4W:1W,12M:1M",ue=new ge,_e=class o{#n=P(oe);#t=P(Me);#e=P(ye);#i=P(at);#o=P(dt);generalForm=Vt();sourceDataForm=zt();scheduleFields={autoRun:f(Ee.autoRun),nextTime:f(Ee.nextTime),runAgain:f(Ee.runAgain)};destinationForm=Wt();settings=f([]);optionsFields={remoteVolumeSize:f("50MB"),backupRetention:f("all"),backupRetentionTime:f(""),backupRetentionVersions:f(0),backupRetentionCustom:f("")};isDraft=f(!1);backupId=f(null);backupName=$(()=>this.generalFormSignal()?.name??"");isSubmitting=f(!1);finishedLoading=f(!1);backupDefaults=f(null);applicationOptions=f(null);isNew=$(()=>this.backupId()==="new");osType=$(()=>this.#t.systemInfo()?.OSType);selectedOptions=f([]);selectedAdvancedFormPair=f([]);destinationFormPair=f({oauthField:null,custom:[],dynamic:[],advanced:[]});notSelectedAdvancedFormPair=$(()=>{let t=this.destinationFormPair()?.advanced??[],e=this.selectedAdvancedFormPair()??[];return t.filter(n=>e.findIndex(i=>i.name===n.name)===-1)});selectedHttpOptions=f([]);notSelectedHttpOptions=$(()=>{let t=this.httpOptions(),e=this.selectedHttpOptions()??[];return t.filter(n=>e.findIndex(i=>i.name===n.name)===-1)});sourceDataFormSignal=Se(this.sourceDataForm.valueChanges);destinationFormSignal=Se(this.destinationForm.valueChanges);generalFormSignal=Se(this.generalForm.valueChanges);encryptionFieldSignal=Se(this.generalForm.controls.encryption.valueChanges);destinationOptions=$(()=>this.#t.backendModules()??[]);httpOptions=$(()=>this.#t.systemInfo()?.GenericModules?.find(t=>t.Key==="http-options")?.Options?.map(this.#a)??[]);advancedOptions=$(()=>this.#t.systemInfo()?.Options?.map(this.#a)??[]);#a(t){return{name:t.Name,type:t.Type,shortDescription:t.ShortDescription??void 0,longDescription:t.LongDescription??void 0,options:t.ValidValues}}encryptionOptions=$(()=>{let t=this.#t.systemInfo()?.EncryptionModules??[];return[Pt,...t]});nonSelectedOptions=$(()=>this.advancedOptions().sort((t,e)=>t?.name&&e?.name?t?.name.localeCompare(e?.name):0).filter(t=>this.selectedOptions()?.findIndex(e=>e.name===t.name)===-1));addOrUpdateAdvancedFormPairByName(t,e,n){let i=this.selectedAdvancedFormPair().find(a=>a.name===t);if(i)this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced.controls[i.name].setValue(n);else{let a=this.notSelectedAdvancedFormPair().find(_=>_.name===t);if(!a)return;this.addAdvancedFormPair(a,e,n)}}addAdvancedFormPairByName(t,e,n){let i=this.notSelectedAdvancedFormPair().find(a=>a.name===t);i&&this.addAdvancedFormPair(i,e,n)}addHttpOptionByName(t,e,n){let i=this.notSelectedHttpOptions().find(a=>a.name===t);i&&this.addHttpOption(i,e,n)}addAdvancedFormPair(t,e,n){let i=this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced,a=n??t.defaultValue;this.createFormField(i,t,a),this.selectedAdvancedFormPair.set([...this.selectedAdvancedFormPair(),t])}addHttpOption(t,e,n){let i=this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced,a=n??t.defaultValue;this.createFormField(i,t,a),this.selectedHttpOptions.set([...this.selectedHttpOptions(),t])}removeAdvancedFormPair(t,e){this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced.removeControl(t.name),this.selectedAdvancedFormPair().findIndex(i=>i.name===t.name)!==-1?this.selectedAdvancedFormPair.update(i=>(i=i.filter(a=>a.name!==t.name),i)):this.selectedHttpOptions.update(i=>(i=i.filter(a=>a.name!==t.name),i))}removeHttpOption(t,e){this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced.removeControl(t.name),this.selectedHttpOptions.update(n=>(n=n.filter(i=>i.name!==t.name),n))}submit(){this.isSubmitting.set(!0);let t=this.#l(),e=this.backupId();e==="new"||!e||this.isDraft()?this.#i.postApiV1Backups({requestBody:t}).pipe(ze(()=>this.isSubmitting.set(!1))).subscribe({next:n=>{this.exit(!1)},error:n=>{}}):this.#i.putApiV1BackupById({id:e,requestBody:t}).pipe(ze(()=>this.isSubmitting.set(!1))).subscribe({next:n=>{this.exit(!1)},error:n=>{}})}exit(t){if(!t){this.#_(),this.#n.navigate(["/"]);return}this.#e.open(q,{data:{title:$localize`Confirm exit?`,message:$localize`Are you sure you want to exit?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:e=>{e&&(this.#_(),this.#n.navigate(["/"]))}})}updateFieldsFromTargetUrl(t){this.#s(),setTimeout(()=>{this.#r(t)})}#s(){this.destinationFormPair.set({oauthField:null,custom:[],dynamic:[],advanced:[]}),this.selectedAdvancedFormPair.set([]),this.selectedHttpOptions.set([]),this.destinationForm.controls.destinations.clear(),this.destinationForm.reset()}mapSourceDataToForm(t){let e=t.Sources??"",n=t.Filters?.map(A=>`${A.Include?"":"-"}${A.Expression}`)??[],i=t.Settings?.find(A=>A.Name==="--exclude-files-attributes")?.Value??"",a=t.Settings?.find(A=>A.Name==="--skip-files-larger-than")??null,_={path:[...e,...n].join("\0"),excludes:{hiddenFiles:i.includes("hidden"),systemFiles:i.includes("system"),tempFiles:i.includes("temporary"),filesLargerThan:a?.Value?.toUpperCase()??null}};this.sourceDataForm.patchValue(_)}mapDestinationToForm(t){let e=t.TargetURL?Dt(t.TargetURL):null;e&&this.addDestinationFormGroup(e.destinationType,{custom:e.custom,dynamic:e.dynamic,advanced:e.advanced},!0)}#r(t){let e=Dt(t);e&&this.addDestinationFormGroup(e.destinationType,{custom:e.custom,dynamic:e.dynamic,advanced:e.advanced},!0)}mapGeneralToForm(t){let e=t.Settings?.find(_=>_.Name==="encryption-module"),n=t.Settings?.find(_=>_.Name==="passphrase")?.Value??"",i=e?.Value&&e.Value.length?e.Value:"",a={name:t.Name??"",description:t.Description??""};i&&i!==""&&(a.encryption=i),n&&n!==""&&(a.password=n,a.repeatPassword=n),this.generalForm.patchValue(a)}mapScheduleToForm(t){if(!t){this.scheduleFields.autoRun.set(!1);return}let e=this.#o.fromString(t.Repeat)??null,n=this.#p(t.Time);this.scheduleFields.autoRun.set(!0),this.scheduleFields.nextTime.update(i=>H(H({},i),n)),this.scheduleFields.runAgain.set({repeatValue:e?.value??1,repeatUnit:e?.unit??"D",allowedDays:{mon:t.AllowedDays?.includes("mon")??!1,tue:t.AllowedDays?.includes("tue")??!1,wed:t.AllowedDays?.includes("wed")??!1,thu:t.AllowedDays?.includes("thu")??!1,fri:t.AllowedDays?.includes("fri")??!1,sat:t.AllowedDays?.includes("sat")??!1,sun:t.AllowedDays?.includes("sun")??!1}})}mapOptionsToForms(t){let e=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than","dblock-size","passphrase","keep-time","keep-versions","retention-policy"],n=t.Settings?.filter(_=>!e.includes(_.Name)),i=t.Settings?.filter(_=>e.includes(_.Name));this.settings.set(n??[]),n?.forEach(_=>{if(_.Name==="encryption-module"&&this.isNew())return this.generalForm.controls.encryption.setValue(_.Value??"")});var a="all";i?.forEach(_=>{if(_.Name==="dblock-size"&&this.optionsFields.remoteVolumeSize.set(_.Value??"50MB"),_.Name==="keep-time"&&(_.Value??"")!=="")return a="time",this.optionsFields.backupRetentionTime.set(_.Value??"");if(_.Name==="keep-versions"&&(_.Value??"")!=="")return a="versions",this.optionsFields.backupRetentionVersions.set(_.Value?parseInt(_.Value):null);if(_.Name==="retention-policy"&&(_.Value??"")!=="")if(_.Value===Xt)a="smart";else return a="custom",this.optionsFields.backupRetentionCustom.set(_.Value??"")}),this.optionsFields.backupRetention.set(a)}getCurrentTargetUrl(){return this.#c(this.destinationForm.controls.destinations)}getScheduleFormValue(){return{autoRun:this.scheduleFields.autoRun(),nextTime:this.scheduleFields.nextTime(),runAgain:this.scheduleFields.runAgain()}}#l(){let t=this.generalForm.value,e=this.getScheduleFormValue(),n=this.sourceDataForm.value,a=this.destinationForm.value.destinations?.length?this.#c(this.destinationForm.controls.destinations):[],_=null;e.runAgain?.repeatUnit&&e.runAgain?.repeatValue&&(_=this.#o.toString(e.runAgain.repeatValue,e.runAgain.repeatUnit));let A=e.runAgain?.allowedDays?Object.entries(e.runAgain?.allowedDays).filter(([x,v])=>v).map(([x,v])=>x):[],k=n.path?.split("\0")??[],w=this.mapFormsToSettings(),B=Object.entries(n.excludes??{}).filter(([x,v])=>v&&x!=="filesLargerThan").map(([x])=>x),N=n.excludes?.filesLargerThan;return B.length&&w.push({Name:"--exclude-files-attributes",Value:B.join(",")}),N&&N.size!==null&&N.unit!==null&&w.push({Name:"--skip-files-larger-than",Value:`${N.size}${N.unit}`}),{Backup:{Name:t.name,Description:t.description,TargetURL:a[0]??null,Sources:k.filter(x=>!x.startsWith("-")),Settings:w,Filters:k.filter(x=>x.startsWith("-")).map((x,v)=>({Order:v,Include:!1,Expression:x.slice(1)}))},Schedule:e.autoRun?{Repeat:_,Time:e.nextTime?.date?new Date(`${e.nextTime.date}T${e.nextTime?.time||"00:00:00"}`).toISOString():null,AllowedDays:A}:null}}mapFormsToSettings(t=[]){let e=this.generalForm.value,n=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than","encryption-module","passphrase","keep-time","keep-versions","retention-policy","dblock-size"],i=[{Name:"--no-encryption",Value:"True"}];e.encryption!==""&&(i=[{Name:"encryption-module",Value:e.encryption??null},{Name:"passphrase",Value:e.password??null}]);let a=[{Name:"dblock-size",Value:this.optionsFields.remoteVolumeSize()}];switch(this.optionsFields.backupRetention()){case"time":a.push({Name:"keep-time",Value:this.optionsFields.backupRetentionTime()});break;case"versions":a.push({Name:"keep-versions",Value:this.optionsFields.backupRetentionVersions()?.toString()??""});break;case"custom":a.push({Name:"retention-policy",Value:this.optionsFields.backupRetentionCustom()});break;case"smart":a.push({Name:"retention-policy",Value:Xt});break}let _=[...t,...n],A=this.settings().filter(k=>!_.includes(k.Name)).map(k=>{let w=k.Value;return typeof k.Value=="number"&&(w=k.Value.toString()),typeof k.Value=="boolean"&&(w=k.Value?"True":"False"),{Name:k.Name,Value:w}});return[...i,...a,...A]}#c(t){return t.controls.map(e=>ct(e.value))}#p(t){if(!t||t?.indexOf("T")===-1)return{time:t??"13:00"};let e=new Date(t);return{time:`${(""+e.getHours()).padStart(2,"0")}:${(""+e.getMinutes()).padStart(2,"0")}`,date:e.toISOString().split("T")[0]}}createFormField(t,e,n){if(e.type==="String"||e.type==="FileTree"||e.type==="FolderTree"||e.type==="Password"||e.type==="Enumeration"||e.type==="NonValidatedSelectableString"||e.type==="Path"){t.addControl(e.name,ue.control(n));return}if(e.type==="Size"){t.addControl(e.name,ue.control(n));return}if(e.type==="Integer"){t.addControl(e.name,ue.control(n?parseInt(n):0));return}if(e.type==="Boolean"){t.addControl(e.name,ue.control(n==="true"||n==="True"));return}if(e.type==="Flags"){t.addControl(e.name,ue.control(n??""));return}if(e.type==="Timespan"||e.type==="DateTime"){t.addControl(e.name,ue.control(n,[xe.pattern(/([-+]?\d{1,3}[smhDWMY])+/)]));return}}addDestinationFormGroup(t,e,n=!1){let i=_t.find(S=>S.customKey===t||S.key===t),a=i?.key,_=this.destinationOptions().find(S=>S.Key===a),A=this.httpOptions();if(!_||!_.Options)return;let k=i&&i.oauthField?i.oauthField:null,w=i&&i.customFields?i.customFields:{},B=i&&i.dynamicFields?i.dynamicFields:[],N=i&&i.advancedFields?i.advancedFields:[],x=i&&i.ignoredAdvancedFields?i.ignoredAdvancedFields:[];this.destinationFormPair.set({oauthField:k,custom:[],dynamic:[],advanced:[]});let v=ue.group({}),j=ue.group({}),Y=ue.group({});w&&Object.entries(w).forEach(([S,C],L)=>{let y=C,{formElement:z}=y,X=Mt(y,["formElement"]);v.addControl(S,z(e?.custom[S])),this.destinationFormPair.update(ne=>(ne.custom.push(H({order:900+L},X)),ne))});for(let S=0;S<_.Options.length;S++){let C=_.Options[S];if(C.Deprecated)continue;let L=B.find(z=>z===C.Name||C.Aliases?.includes(z.name)||z.name===C.Name);if(L){let z=C.Aliases?.indexOf(L.name)??-1,X=C.Aliases&&z>-1?C.Aliases[z]:C.Name,y=L&&typeof L!="string",ne=y?L?.defaultValue??C.DefaultValue:C.DefaultValue,M={name:X,type:C.Type,shortDescription:C.ShortDescription??void 0,longDescription:C.LongDescription??void 0,options:C.ValidValues,order:900+S},Ke=y?H(H({},M),L):M,Q=e?.dynamic[X]??ne??C.DefaultValue;this.createFormField(j,Ke,Q),this.destinationFormPair.update(kt=>(kt.dynamic.push(Ke),kt))}else{if(x.find(Q=>Q===C.Name))continue;let X=N.find(Q=>Q===C.Name||Q.name===C.Name),y=X&&typeof X!="string",ne=e?.advanced[C.Name],M=ne??C.DefaultValue,Ke={name:C.Name,type:C.Type,shortDescription:C.ShortDescription??void 0,longDescription:C.LongDescription??void 0,options:C.ValidValues,defaultValue:M,order:900+S},Qe=y?H(H({},Ke),X):Ke;n&&ne&&(this.createFormField(Y,Qe,M),this.selectedAdvancedFormPair.update(Q=>(Q.push(Qe),Q))),this.destinationFormPair.update(Q=>(Q.advanced.push(Qe),Q))}}for(let S=0;S<A.length;S++){let C=A[S],L=e?.advanced[C.name],z=L??C.defaultValue;n&&L&&(this.createFormField(Y,C,z),this.selectedHttpOptions.update(X=>(X.push(C),X)))}this.destinationFormPair.update(S=>({oauthField:S.oauthField,custom:S.custom.sort((C,L)=>C.order-L.order),dynamic:S.dynamic.sort((C,L)=>C.order-L.order),advanced:S.advanced.sort((C,L)=>C.order-L.order)})),this.destinationForm.controls.destinations.push(Ht({key:i?.customKey??t,customGroup:v,dynamicGroup:j,advancedGroup:Y}))}#_(){this.generalForm.reset(),this.destinationForm.controls.destinations.clear(),this.destinationForm.reset(),this.sourceDataForm.reset(),this.scheduleFields.autoRun.set(Ee.autoRun),this.scheduleFields.nextTime.set(Ee.nextTime),this.scheduleFields.runAgain.set(Ee.runAgain),this.optionsFields.remoteVolumeSize.set("50MB"),this.optionsFields.backupRetention.set("all"),this.settings.set([])}static \u0275fac=function(e){return new(e||o)};static \u0275prov=De({token:o,factory:o.\u0275fac,providedIn:"root"})};var hn=["formRef"],An=(o,t,e,n)=>({index:o,formView:t,formGroupName:"custom",destinationType:e,oauthField:n}),Tt=o=>({$implicit:o}),Pn=(o,t,e,n)=>({index:o,formView:t,formGroupName:"dynamic",destinationType:e,oauthField:n}),Nn=(o,t,e,n)=>({index:o,formView:t,formGroupName:"advanced",destinationType:e,oauthField:n}),yn=(o,t,e,n)=>({index:o,formView:t,formGroupName:"advanced",asHttpOptions:!0,destinationType:e,oauthField:n}),On=()=>({maxWidth:"700px",width:"100%"});function kn(o,t){o&1&&(E(0,5,2),u(1,"spk-icon"),D())}function Mn(o,t){o&1&&O(0,5,3)}function $n(o,t){if(o&1){let e=I();E(0,5,1),s(1,"button",21),h("click",function(){F(e);let i=c();return g(i.testDestination())}),m(2,kn,2,0)(3,Mn,1,0),r(),D()}if(o&2){let e=c();l(),me("loader",e.testLoading())("success",e.successfulTest()),l(),T(e.successfulTest()?2:3)}}function xn(o,t){if(o&1){let e=I();s(0,"p",27),h("click",function(){F(e);let i=c();return g(i.removeDestinationFormGroup(i.destinationCount()-1))}),E(1,8),u(2,"strong")(3,"br")(4,"span",28),D(),r()}if(o&2){let e,n=c();l(4),Je((e=n.selectedDestinationType())==null?null:e.displayName),et(1)}}function Rn(o,t){if(o&1){let e=I();s(0,"div",34),h("click",function(){let i=F(e).$implicit,a=c(2);return g(a.addDestinationFormGroup(i.key))}),s(1,"h3"),d(2),r(),s(3,"p"),d(4),r()()}if(o&2){let e=t.$implicit;l(2),Ne(e.displayName),l(2),Ne(e.description)}}function wn(o,t){if(o&1){let e=I();s(0,"button",35,1),h("click",function(){let i=F(e).$implicit,a=c(2);return g(a.addDestinationFormGroup(i.key))}),d(2),r()}if(o&2){let e=t.$implicit;l(2),W(" ",e.displayName," ")}}function In(o,t){if(o&1&&(s(0,"div",29),J(1,Rn,5,2,"div",30,Z),r(),s(3,"spk-menu",31)(4,"button",32),O(5,9),r(),V(6,20),J(7,wn,3,1,"button",33,Z),K(),r()),o&2){let e=c();l(),ee(e.destinationTypeOptionsFocused()),l(2),p("searchable",!0),l(4),ee(e.destinationTypeOptionsNotFocused())}}function Ln(o,t){o&1&&Xe(0)}function vn(o,t){if(o&1&&m(0,Ln,1,0,"ng-container",40),o&2){let e,n=t.$implicit,i=t.$index;c();let a=te(29),_=c();p("ngTemplateOutlet",a)("ngTemplateOutletContext",je(7,Tt,qe(2,An,i,n,(e=_.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,_.destinationFormPair().oauthField)))}}function bn(o,t){o&1&&Xe(0)}function Gn(o,t){if(o&1&&m(0,bn,1,0,"ng-container",40),o&2){let e,n=t.$implicit,i=t.$index;c();let a=te(29),_=c();p("ngTemplateOutlet",a)("ngTemplateOutletContext",je(7,Tt,qe(2,Pn,i,n,(e=_.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,_.destinationFormPair().oauthField)))}}function Un(o,t){if(o&1){let e=I();E(0,10,1),s(1,"button",35,1),h("click",function(){let i=F(e).$implicit,a=c(2);return g(a.addAdvancedFormPair(i,0))}),r(),D()}if(o&2){let e=t.$implicit;l(),Je(e.name),et(0)}}function Bn(o,t){o&1&&Xe(0)}function Vn(o,t){if(o&1&&m(0,Bn,1,0,"ng-container",40),o&2){let e,n=t.$implicit,i=t.$index;c();let a=te(29),_=c();p("ngTemplateOutlet",a)("ngTemplateOutletContext",je(7,Tt,qe(2,Nn,i,n,(e=_.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,_.destinationFormPair().oauthField)))}}function Kn(o,t){if(o&1){let e=I();E(0,11,1),s(1,"button",35,1),h("click",function(){let i=F(e).$implicit,a=c(2);return g(a.addHttpOption(i,0))}),r(),D()}if(o&2){let e=t.$implicit;l(),Je(e.name),et(0)}}function zn(o,t){o&1&&Xe(0)}function Xn(o,t){if(o&1&&m(0,zn,1,0,"ng-container",40),o&2){let e,n=t.$implicit,i=t.$index;c();let a=te(29),_=c();p("ngTemplateOutlet",a)("ngTemplateOutletContext",je(7,Tt,qe(2,yn,i,n,(e=_.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,_.destinationFormPair().oauthField)))}}function Wn(o,t){if(o&1&&(s(0,"spk-icon",48),d(1,"question"),r()),o&2){let e=c(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function Hn(o,t){if(o&1&&(s(0,"app-file-tree",43)(1,"label",47),d(2),m(3,Wn,2,1,"spk-icon",48),r(),u(4,"input",49),r()),o&2){let e=c().$implicit,n=R(2),i=R(3),a=c(2);p("startingPath",a.getFormFieldValue(0,e.formGroupName,e.formView.name))("accepts",e.formView.accepts)("showFiles",!0)("hideShortcuts",!0)("showHiddenNodes",!0)("selectFiles",!0),l(),p("for",i),l(),W(" ",n," "),l(),T(e.formView.longDescription?3:-1),l(),p("id",i)("formControlName",e.formView.name)}}function jn(o,t){if(o&1&&(s(0,"spk-icon",48),d(1,"question"),r()),o&2){let e=c(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function qn(o,t){if(o&1&&(s(0,"app-file-tree",44)(1,"label",47),d(2),m(3,jn,2,1,"spk-icon",48),r(),u(4,"input",49),r()),o&2){let e=c().$implicit,n=R(2),i=R(3),a=c(2);p("hideShortcuts",!0)("startingPath",a.getFormFieldValue(0,e.formGroupName,e.formView.name)),l(),p("for",i),l(),W(" ",n," "),l(),T(e.formView.longDescription?3:-1),l(),p("id",i)("formControlName",e.formView.name)}}function Yn(o,t){if(o&1&&(s(0,"spk-icon",48),d(1,"question"),r()),o&2){let e=c(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function Qn(o,t){if(o&1&&(s(0,"spk-icon",53),d(1," link "),r()),o&2){c();let e=R(7),n=R(8);me("error",e&&n==="error")("warn",e&&n==="warning"),p("spkTooltip",e)}}function Zn(o,t){o&1&&(s(0,"spk-icon",52),d(1,"envelope"),r())}function Jn(o,t){o&1&&(s(0,"spk-icon",52),d(1,"textbox"),r())}function ei(o,t){if(o&1&&(s(0,"spk-form-field")(1,"label",47),d(2),m(3,Yn,2,1,"spk-icon",48),r(),u(4,"input",50),We(5)(6)(7)(8),m(9,Qn,2,5,"spk-icon",51)(10,Zn,2,0,"spk-icon",52)(11,Jn,2,0,"spk-icon",52),r()),o&2){let e=c().$implicit,n=R(2),i=R(3),a=c(2);l(),p("for",i),l(),W(" ",n," "),l(),T(e.formView.longDescription?3:-1),l(),p("type",e.formView.type==="Email"?"email":"text")("id",i)("formControlName",e.formView.name);let _=a.getFormFieldValue(0,e.formGroupName,e.formView.name),A=a.hasDoubleLeadingSlashes(_);l(3),Te(A&&(e.formView.doubleSlash==null?null:e.formView.doubleSlash.message)),l(),Te(e.formView.doubleSlash==null?null:e.formView.doubleSlash.type),l(),T(e.formView.type==="Path"?9:e.formView.type==="Email"?10:11)}}function ti(o,t){if(o&1){let e=I();s(0,"span",57),h("click",function(){F(e);let i=c(2).$implicit,a=c(2);return g(a.oauthStartTokenCreation(i.destinationType,i))}),d(1," AuthID "),r()}}function ni(o,t){o&1&&(s(0,"spk-icon",52),d(1,"password"),r())}function ii(o,t){if(o&1){let e=I();s(0,"spk-icon",58),h("click",function(){F(e);let i=c(2).$implicit;return g(i.formView.showPassword=!i.formView.showPassword)}),d(1," eye "),r()}}function oi(o,t){if(o&1){let e=I();s(0,"spk-icon",58),h("click",function(){F(e);let i=c(2).$implicit;return g(i.formView.showPassword=!i.formView.showPassword)}),d(1," eye-slash "),r()}}function ai(o,t){if(o&1&&(s(0,"spk-form-field")(1,"label",47),d(2),r(),u(3,"input",54),m(4,ti,2,0,"span",55)(5,ni,2,0,"spk-icon",52)(6,ii,2,0,"spk-icon",56)(7,oi,2,0,"spk-icon",56),r()),o&2){let e=c().$implicit,n=R(2),i=R(3);l(),p("for",i),l(),W(" ",n," "),l(),p("type",e.formView.showPassword?"text":"password")("id",i)("formControlName",e.formView.name),l(),T(e.oauthField===e.formView.name?4:5),l(2),T(e.formView.showPassword?6:7)}}function ri(o,t){if(o&1&&(s(0,"spk-icon",48),d(1,"question"),r()),o&2){let e=c(3).$implicit;p("spkTooltip",e.formView.longDescription)}}function si(o,t){if(o&1&&d(0),o&2){let e=c().$implicit;Et(" ",e==null?null:e.key," (",e==null?null:e.value,") ")}}function li(o,t){if(o&1&&d(0),o&2){let e=c().$implicit;W(" ",e," ")}}function ci(o,t){if(o&1&&m(0,si,1,2)(1,li,1,1),o&2){let e=c(3).$implicit;T(e.formView.loadOptions?0:1)}}function _i(o,t){if(o&1&&(s(0,"spk-select",59)(1,"label",47),d(2),m(3,ri,2,1,"spk-icon",48),r(),u(4,"input",49),r(),m(5,ci,2,1,"ng-template",null,3,Ye)),o&2){let e=te(6);c();let n=R(0),i=c().$implicit,a=R(2),_=R(3);p("options",n)("isClearable",!1)("optionTemplate",e),l(),p("for",_),l(),W(" ",a," "),l(),T(i.formView.longDescription?3:-1),l(),p("id",_)("formControlName",i.formView.name)}}function pi(o,t){if(o&1&&(We(0),m(1,_i,7,8)),o&2){let e=c().$implicit,n=Te(e.formView.loadOptions?e.formView.loadOptions(c(2).injector)():e.formView.options);l(),T(n?1:-1)}}function ui(o,t){if(o&1&&(s(0,"spk-icon",48),d(1,"question"),r()),o&2){let e=c(3).$implicit;p("spkTooltip",e.formView.longDescription)}}function di(o,t){if(o&1&&d(0),o&2){let e=t.$implicit;Et(" ",e.key," ",e.value?"("+e.value+")":""," ")}}function mi(o,t){if(o&1&&(s(0,"spk-select",61)(1,"label",47),d(2),m(3,ui,2,1,"spk-icon",48),r(),u(4,"input",49),r(),m(5,di,1,2,"ng-template",null,4,Ye)),o&2){let e=te(6);c();let n=R(0),i=c().$implicit,a=R(2),_=R(3);p("options",n)("asFreeText",!0)("inlineSearch",!0)("optionTemplate",e),l(),p("for",_),l(),W(" ",a," "),l(),T(i.formView.longDescription?3:-1),l(),p("id",_)("formControlName",i.formView.name)}}function Fi(o,t){o&1&&u(0,"spk-progress-bar",60)}function gi(o,t){if(o&1&&(We(0),m(1,mi,7,9)(2,Fi,1,0,"spk-progress-bar",60)),o&2){let e=c().$implicit,n=Te(e.formView.loadOptions?e.formView.loadOptions(c(2).injector)():e.formView.options);l(),T(n?1:2)}}function Ci(o,t){if(o&1&&(s(0,"spk-icon",48),d(1,"question"),r()),o&2){let e=c(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function Ti(o,t){if(o&1&&(s(0,"app-size",45)(1,"label",47),d(2),m(3,Ci,2,1,"spk-icon",48),r()()),o&2){let e=c().$implicit,n=R(2),i=R(3);p("inputType",e.Name)("formControlName",e.formView.name)("customId",i),l(),p("for",i),l(),W(" ",n," "),l(),T(e.formView.longDescription?3:-1)}}function Si(o,t){if(o&1&&(s(0,"spk-icon",48),d(1,"question"),r()),o&2){let e=c(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function fi(o,t){if(o&1&&(s(0,"spk-form-field")(1,"label",47),d(2),m(3,Si,2,1,"spk-icon",48),r(),u(4,"input",62),s(5,"spk-icon",52),d(6,"numpad"),r()()),o&2){let e=c().$implicit,n=R(2),i=R(3);l(),p("for",i),l(),W(" ",n," "),l(),T(e.formView.longDescription?3:-1),l(),p("id",i)("formControlName",e.formView.name)}}function Ei(o,t){if(o&1&&(s(0,"spk-icon",48),d(1,"question"),r()),o&2){let e=c(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function Di(o,t){if(o&1&&(s(0,"spk-toggle",46)(1,"label",47),d(2),m(3,Ei,2,1,"spk-icon",48),r(),u(4,"input",63),r()),o&2){let e=c().$implicit,n=R(2),i=R(3);l(),p("for",i),l(),W(" ",n," "),l(),T(e.formView.longDescription?3:-1),l(),p("id",i)("formControlName",e.formView.name)}}function hi(o,t){if(o&1&&(s(0,"spk-icon",48),d(1,"question"),r()),o&2){let e=c(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function Ai(o,t){if(o&1&&d(0),o&2){let e=t.$implicit;W(" ",e," ")}}function Pi(o,t){if(o&1&&(s(0,"spk-select",64)(1,"label",47),d(2),m(3,hi,2,1,"spk-icon",48),r(),u(4,"input",65),r(),m(5,Ai,1,1,"ng-template",null,4,Ye)),o&2){let e=te(6),n=c().$implicit,i=R(2);p("options",n.formView.options)("selectMultiple",!0)("optionTemplate",e),l(),Rt("for","destination-",n.formGroupName,"-",n.index,""),l(),W(" ",i," "),l(),T(n.formView.longDescription?3:-1),l(),p("formControlName",n.formView.name)}}function Ni(o,t){if(o&1&&(s(0,"spk-icon",48),d(1,"question"),r()),o&2){let e=c(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function yi(o,t){if(o&1&&(s(0,"app-timespan",45)(1,"label",47),d(2),m(3,Ni,2,1,"spk-icon",48),r()()),o&2){let e=c().$implicit,n=R(2),i=R(3);p("inputType",e.formView.name)("formControlName",e.formView.name)("customId",i),l(),p("for",i),l(),W(" ",n," "),l(),T(e.formView.longDescription?3:-1)}}function Oi(o,t){if(o&1){let e=I();s(0,"button",66),h("click",function(){F(e);let i=c().$implicit,a=c(2);return g(a.removeFormView(i.formView,0))}),s(1,"spk-icon"),d(2,"x-circle"),r()()}}function ki(o,t){if(o&1&&(s(0,"div",41),V(1,42),We(2)(3),m(4,Hn,5,11,"app-file-tree",43)(5,qn,5,7,"app-file-tree",44)(6,ei,12,9,"spk-form-field")(7,ai,8,7,"spk-form-field")(8,pi,2,2)(9,gi,3,2)(10,Ti,4,6,"app-size",45)(11,fi,7,5,"spk-form-field")(12,Di,5,5,"spk-toggle",46)(13,Pi,7,9)(14,yi,4,6,"app-timespan",45),K(),m(15,Oi,3,0,"button",32),r()),o&2){let e,n=t.$implicit;me("single-field",n.formGroupName!=="advanced"),l(),p("formGroupName",n.formGroupName),l(),Te((e=n.formView.shortDescription)!==null&&e!==void 0?e:n.formView.name),l(),Te("destination-"+n.formGroupName+"-"+n.index+"-"+(n.asHttpOptions?"http":"other")),l(),T(n.formView.type==="FileTree"?4:n.formView.type==="FolderTree"?5:n.formView.type==="String"||n.formView.type==="Path"||n.formView.type==="Email"?6:n.formView.type==="Password"?7:n.formView.type==="Enumeration"?8:n.formView.type==="NonValidatedSelectableString"?9:n.formView.type==="Size"?10:n.formView.type==="Integer"?11:n.formView.type==="Boolean"?12:n.formView.type==="Flags"?13:n.formView.type==="Timespan"||n.formView.type==="DateTime"?14:-1),l(11),T(n.formGroupName==="advanced"?15:-1)}}function Mi(o,t){if(o&1&&(V(0,22)(1,36),J(2,vn,1,9,"ng-container",null,Z),J(4,Gn,1,9,"ng-container",null,Z),s(6,"app-toggle-card",37),V(7,38),E(8,10),s(9,"spk-menu",31)(10,"button",39),u(11,"spk-icon"),r(),V(12,20),J(13,Un,3,1,"button",33,Z),K(),r(),D(),K(),J(15,Vn,1,9,"ng-container",null,Z),r(),s(17,"app-toggle-card",37),V(18,38),E(19,11),s(20,"spk-menu",31)(21,"button",39),u(22,"spk-icon"),r(),V(23,20),J(24,Kn,3,1,"button",33,Z),K(),r(),D(),K(),J(26,Xn,1,9,"ng-container",null,Z),r(),m(28,ki,16,7,"ng-template",null,2,Ye),K()()),o&2){let e=c();l(2),ee(e.destinationFormPair().custom),l(2),ee(e.destinationFormPair().dynamic),l(2),p("disallowToggle",!0),l(3),p("searchable",!0),l(),p("disabled",e.notSelectedAdvancedFormPair().length===0),l(3),ee(e.notSelectedAdvancedFormPair()),l(2),ee(e.selectedAdvancedFormPair()),l(2),p("disallowToggle",!0),l(3),p("searchable",!0),l(),p("disabled",e.notSelectedHttpOptions().length===0),l(3),ee(e.notSelectedHttpOptions()),l(2),ee(e.selectedHttpOptions())}}function $i(o,t){if(o&1){let e=I();s(0,"spk-dialog",67),U("isOpenChange",function(i){F(e);let a=c();return G(a.targetUrlDialogOpen,i)||(a.targetUrlDialogOpen=i),g(i)}),s(1,"header",68)(2,"h2"),O(3,12),r(),s(4,"spk-alert",69),O(5,13),r()(),s(6,"div",70)(7,"spk-form-field"),u(8,"textarea",71),r()(),s(9,"footer",72)(10,"button",24),h("click",function(){F(e);let i=c();return g(i.closeTargetUrlDialog(!1))}),d(11,"Cancel"),r(),s(12,"button",73),h("click",function(){F(e);let i=c();return g(i.closeTargetUrlDialog(!0))}),E(13,14),u(14,"spk-icon"),D(),r()()()}if(o&2){let e=c();b("isOpen",e.targetUrlDialogOpen),p("options",He(3,On)),l(8),p("formControl",e.targetUrlCtrl)}}var Ct=new ge,Wt=(o={destinations:[]})=>Ct.group({destinations:Ct.array(o.destinations)}),Ht=({key:o,customGroup:t,dynamicGroup:e,advancedGroup:n})=>Ct.group({destinationType:Ct.control(o),custom:t,dynamic:e,advanced:n}),Ot=class o{#n=P(oe);#t=P(Fe);#e=P(_e);#i=P(ye);#o=P(ut);injector=P($t);formRef=he.required("formRef");destinationForm=this.#e.destinationForm;destinationFormPair=this.#e.destinationFormPair;selectedAdvancedFormPair=this.#e.selectedAdvancedFormPair;notSelectedAdvancedFormPair=this.#e.notSelectedAdvancedFormPair;selectedHttpOptions=this.#e.selectedHttpOptions;notSelectedHttpOptions=this.#e.notSelectedHttpOptions;destinationOptions=this.#e.destinationOptions;destinationFormSignal=this.#e.destinationFormSignal;destinationCount=$(()=>this.destinationFormSignal()?.destinations?.length??0);successfulTest=f(!1);testLoading=f(!1);destinationTypeOptionsInFocus=f(["file","ssh","s3","gcs","googledrive","azure"]);destinationTypeOptions=f(_t.map(t=>({key:t.customKey??t.key,customKey:t.customKey??null,displayName:t.displayName,description:t.description})));destinationTypeOptionsFocused=$(()=>{let t=this.destinationTypeOptionsInFocus(),e=this.destinationTypeOptions();return t.map(n=>e.find(i=>i.key===n))});selectedDestinationType=$(()=>{let t=this.destinationFormSignal();return this.destinationTypeOptions().find(n=>t?.destinations?.[0]?.destinationType===n.key)});destinationTypeOptionsNotFocused=$(()=>{let t=this.destinationTypeOptionsInFocus();return this.destinationTypeOptions().filter(n=>!t.includes(n.key))});getFormFieldValue(t,e,n){return((this.destinationForm.controls.destinations.controls?.[t]).controls?.[e]).controls[n].value}hasDoubleLeadingSlashes(t){return t.startsWith("//")}getFormControl(t,e,n){return((this.destinationForm.controls.destinations.controls?.[t]).controls?.[e]).controls[n]}addDestinationFormGroup(t){this.#e.addDestinationFormGroup(t)}addAdvancedFormPair(t,e){this.#e.addAdvancedFormPair(t,e)}removeFormView(t,e){this.#e.removeAdvancedFormPair(t,e)}addHttpOption(t,e){this.#e.addHttpOption(t,e)}targetUrl=$(()=>this.#e.getCurrentTargetUrl()[0]);targetUrlCtrl=new rt;targetUrlInitial=f(null);targetUrlDialogOpen=f(!1);openTargetUrlDialog(){let e=this.#e.getCurrentTargetUrl()[0];this.targetUrlCtrl.setValue(e),this.targetUrlInitial.set(e),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(t=!1){this.targetUrlDialogOpen.set(!1);let e=this.targetUrlCtrl.value,n=this.targetUrlInitial();!t||e===n||this.#e.updateFieldsFromTargetUrl(this.targetUrlCtrl.value)}testDestination(t=0){let n=this.#e.getCurrentTargetUrl()[t];n&&(this.testLoading.set(!0),this.#o.testDestination(n,t,!0).pipe(ze(()=>this.testLoading.set(!1))).subscribe({next:i=>{if(i.action==="success"){this.#e.isNew()&&(i.containsBackup===!0?this.#i.open(q,{data:{title:$localize`Folder contains backup`,message:$localize`The remote destination already contains a backup. You must use a different folder for each backup.`,confirmText:$localize`OK`,cancelText:void 0}}):i.anyFilesFound===!0&&this.#i.open(q,{data:{title:$localize`Folder is not empty`,message:$localize`The remote destination is not empty. It is recommended to use an empty folder for the backup.`,confirmText:$localize`OK`,cancelText:void 0}})),this.successfulTest.set(!0),setTimeout(()=>{this.successfulTest.set(!1)},3e3);return}if(i.action==="generic-error"){this.successfulTest.set(!1);return}i.action==="trust-cert"&&this.#e.addHttpOptionByName("accept-specified-ssl-hash",i.destinationIndex,i.certData),i.action==="approve-host-key"&&this.#e.addOrUpdateAdvancedFormPairByName("ssh-fingerprint",i.destinationIndex,i.reportedHostKey),i.testAgain&&this.testDestination(i.destinationIndex)}}))}mapToTargetUrl(t){return ct(t.value)}removeDestinationFormGroup(t){this.destinationForm.controls.destinations.removeAt(t)}displayFn(t){let e=this.destinationOptions().find(n=>n.Key===t);return e?`${e.DisplayName}`:""}goBack(){this.#n.navigate(["general"],{relativeTo:this.#t.parent})}next(){this.#n.navigate(["source-data"],{relativeTo:this.#t.parent})}#a=f("https://duplicati-oauth-handler.appspot.com/").asReadonly();#s=f(Math.random().toString(36).substring(2)+Math.random().toString(36).substring(2)).asReadonly();#r=f(!1);#l=f(null);keyCreation(){}oauthStartTokenCreation(t,e){let n=this.getFormControl(e.index,e.formGroupName,e.formView.name);this.#r.set(!0);let i=this.#s(),a=450,_=600,A=this.#a()+"?type="+t+"&token="+i,k=screen.width/2-a/2,w=screen.height/2-_/2,B=window.open(A,"_blank","height="+_+",width="+a+",menubar=0,status=0,titlebar=0,toolbar=0,left="+k+",top="+w);return window.addEventListener("message",N=>{let x=N.data.startsWith("authid:"),v=x?N.data.replace("authid:",""):null;console.log("event",N),x&&(n.setValue(v),this.#r.set(!1),B?.close())}),!1}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=ie({type:o,selectors:[["app-destination"]],viewQuery:function(e,n){e&1&&Ae(n.formRef,hn,5),e&2&&Pe()},decls:24,vars:6,consts:()=>{let t;t=$localize` Backup destination ${"\uFFFD#5\uFFFD"}:START_TAG_DIV:${"\uFFFD*6:1\uFFFD"}:START_BLOCK_IF_1:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON:${"\uFFFD*2:2\uFFFD"}:START_BLOCK_IF: Connected ${"[\uFFFD#1:2\uFFFD|\uFFFD#9\uFFFD|\uFFFD#12\uFFFD]"}:START_TAG_SPK_ICON:check${"[\uFFFD/#1:2\uFFFD|\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/*2:2\uFFFD|\uFFFD/*6:1\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*3:3\uFFFD"}:START_BLOCK_ELSE: Test destination ${"\uFFFD/*3:3\uFFFD"}:CLOSE_BLOCK_ELSE:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD]"}:CLOSE_TAG_BUTTON:${"[\uFFFD/*2:2\uFFFD|\uFFFD/*6:1\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD#7\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#8\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#1:2\uFFFD|\uFFFD#9\uFFFD|\uFFFD#12\uFFFD]"}:START_TAG_SPK_ICON:dots-three-vertical${"[\uFFFD/#1:2\uFFFD|\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#10\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD#11\uFFFD"}:START_TAG_BUTTON_2:${"[\uFFFD#1:2\uFFFD|\uFFFD#9\uFFFD|\uFFFD#12\uFFFD]"}:START_TAG_SPK_ICON:link${"[\uFFFD/#1:2\uFFFD|\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD]"}:CLOSE_TAG_SPK_ICON: Edit target URL ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SPK_MENU:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_DIV:`,t=Ce(t);let e;e=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let n;n=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let i;i=$localize` Current destination type ${"\uFFFD#2\uFFFD"}:START_TAG_STRONG:${"\uFFFD0\uFFFD"}:INTERPOLATION:.${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#3\uFFFD\uFFFD/#3\uFFFD"}:LINE_BREAK: Want to select another? ${"\uFFFD#4\uFFFD"}:START_TAG_SPAN:Click here${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SPAN:`;let a;a=$localize`Other destinations`;let _;_=$localize` Advanced options ${"\uFFFD#9\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#10\uFFFD"}:START_TAG_BUTTON: Add advanced option ${"\uFFFD#11\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#10\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#12\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD*14:1\uFFFD"}:START_BLOCK_FOR:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON_1: ${"\uFFFD0:1\uFFFD"}:INTERPOLATION: ${"[\uFFFD/#10\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/*14:1\uFFFD"}:CLOSE_BLOCK_FOR:${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_MENU:`,_=Ce(_);let A;A=$localize` Http options ${"\uFFFD#20\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#21\uFFFD"}:START_TAG_BUTTON: Add http option ${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#21\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#23\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD*25:1\uFFFD"}:START_BLOCK_FOR:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON_1: ${"\uFFFD0:1\uFFFD"}:INTERPOLATION: ${"[\uFFFD/#21\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/*25:1\uFFFD"}:CLOSE_BLOCK_FOR:${"\uFFFD/#23\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#20\uFFFD"}:CLOSE_TAG_SPK_MENU:`,A=Ce(A);let k;k=$localize`Edit target URL`;let w;w=$localize` Be careful, this will overwrite everything you have in your destination. `;let B;return B=$localize` Override target URL ${"\uFFFD#14\uFFFD"}:START_TAG_SPK_ICON:swap${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["formRef",""],["option",""],["fieldTemplate",""],["enumOptionTemplate",""],["optionTemplate",""],t,e,n,i,a,_,A,k,w,B,[3,"submit","formGroup"],[1,"title-30"],[1,"actions"],["spk-button","","type","button",1,"small",3,"loader","success"],["spk-button","","type","button",1,"small"],["menu",""],["spk-button","","type","button",1,"small",3,"click"],["formArrayName","destinations"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],[3,"isOpen","options"],[3,"click"],[1,"spk-primary"],[1,"most-common-destinations"],[1,"tile"],[3,"searchable"],["spk-button","","type","button",1,"outlined"],["type","button"],[1,"tile",3,"click"],["type","button",3,"click"],["formGroupName","0"],[3,"disallowToggle"],["title",""],["spk-button","","type","button",1,"outlined","small",3,"disabled"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"field-row"],[3,"formGroupName"],[3,"startingPath","accepts","showFiles","hideShortcuts","showHiddenNodes","selectFiles"],[3,"hideShortcuts","startingPath"],[3,"inputType","formControlName","customId"],[1,"primary","raised"],[3,"for"],[1,"primary",3,"spkTooltip"],["type","text",3,"id","formControlName"],[3,"type","id","formControlName"],["prefix","",3,"error","warn","spkTooltip"],["prefix",""],["prefix","",3,"spkTooltip"],["autocomplete","off",3,"type","id","formControlName"],["prefix","",1,"link"],["suffix","",1,"clickable"],["prefix","",1,"link",3,"click"],["suffix","",1,"clickable",3,"click"],[3,"options","isClearable","optionTemplate"],[1,"indeterminate","primary"],["label","key","value","value",3,"options","asFreeText","inlineSearch","optionTemplate"],["type","number",3,"id","formControlName"],["type","checkbox",3,"id","formControlName"],[1,"primary","raised",3,"options","selectMultiple","optionTemplate"],["type","text","id","text",3,"formControlName"],["spk-button","","type","button",1,"outlined",3,"click"],[3,"isOpenChange","isOpen","options"],["header",""],[1,"warning"],["content",""],["id","targetUrl","autocomplete","off",3,"formControl"],["footer",""],["spk-button","","type","submit",1,"raised","primary",3,"click"]]},template:function(e,n){if(e&1){let i=I();s(0,"form",15,0),h("submit",function(){return F(i),g(n.next())}),s(2,"header")(3,"h3",16),E(4,5),s(5,"div",17),m(6,$n,4,5,"button",18),s(7,"spk-menu")(8,"button",19),u(9,"spk-icon"),r(),V(10,20),s(11,"button",21),h("click",function(){return F(i),g(n.openTargetUrlDialog())}),u(12,"spk-icon"),r(),K(),r()(),D(),r(),m(13,xn,5,1,"p"),r(),m(14,In,9,1)(15,Mi,30,6,"ng-container",22),s(16,"div",23)(17,"button",24),h("click",function(){return F(i),g(n.goBack())}),E(18,6),u(19,"spk-icon"),D(),r(),s(20,"button",25),E(21,7),u(22,"spk-icon"),D(),r()()(),m(23,$i,15,4,"spk-dialog",26)}if(e&2){let i;p("formGroup",n.destinationForm),l(6),T(n.destinationCount()>0?6:-1),l(7),T(n.destinationCount()>0?13:-1),l(),T(n.destinationCount()===0?14:-1),l(),T(!((i=n.destinationFormSignal())==null||i.destinations==null)&&i.destinations.length?15:-1),l(8),T(n.targetUrlDialogOpen()?23:-1)}},dependencies:[Ue,Ie,le,Le,$e,ce,Re,st,ve,be,lt,vt,wt,re,Lt,ae,ke,It,nt,se,ot,it,Bt,Be,pt,Ut],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], header[_ngcontent-%COMP%] spk-alert[_ngcontent-%COMP%]{width:100%}header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:.5rem}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}pre[_ngcontent-%COMP%]{white-space:pre-wrap}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.field-row.single-field[_ngcontent-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding-bottom:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.form-column[_ngcontent-%COMP%]{display:flex;flex-direction:column}.form-column[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.form-column[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:1rem}label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}label[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:1rem}.form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 1fr;gap:.5rem;align-items:flex-end}.clickable[_ngcontent-%COMP%]{cursor:pointer;color:var(--primary-500)}.most-common-destinations[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--shadow-1);background-color:var(--base-2);cursor:pointer}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-10);margin:0}[prefix].link[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline;color:var(--primary-500)}textarea[_ngcontent-%COMP%] ~ grammarly-extension[_ngcontent-%COMP%]{display:none}spk-select[_ngcontent-%COMP%]{--miw: p2r(120)}"],changeDetection:0})};export{ut as a,Wt as b,Ht as c,Ot as d,Vt as e,Pt as f,At as g,Ee as h,Nt as i,zt as j,yt as k,_e as l};
@@ -0,0 +1 @@
1
+ import{e as a,f as b,g as c}from"./chunk-WRPHCCP7.js";import"./chunk-44DHERTN.js";import"./chunk-54VPI5KJ.js";import"./chunk-WFAZP46A.js";import"./chunk-V756QT7J.js";import"./chunk-EQWH3TBL.js";import"./chunk-TQHNKGRL.js";import"./chunk-F2GEUOGZ.js";import"./chunk-BIZAKOYU.js";import"./chunk-RHW5QVAY.js";import"./chunk-ELMONRIG.js";import"./chunk-C6XTRC7P.js";import"./chunk-MAVZY7BL.js";import"./chunk-SL6SRYFT.js";import"./chunk-S5EF63OY.js";import"./chunk-7L2WUS2V.js";import"./chunk-L72ALLHJ.js";import"./chunk-7CGTOI24.js";export{b as NONE_OPTION,a as createGeneralForm,c as default};