@duplicati/ngclient 0.0.118 → 0.0.119

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 (102) hide show
  1. package/{chunk-ZRFL62SL.js → chunk-2GE6FFGI.js} +1 -1
  2. package/{chunk-45NW2WR4.js → chunk-2P3DXYGR.js} +1 -1
  3. package/{chunk-IK7CPFZB.js → chunk-2SQBD7LN.js} +1 -1
  4. package/{chunk-BIZAKOYU.js → chunk-3AIKVVWP.js} +1 -1
  5. package/chunk-3GGSYR5J.js +1 -0
  6. package/{chunk-GWVX5STR.js → chunk-3KUVV3SB.js} +1 -1
  7. package/{chunk-XP7PWMT2.js → chunk-3XVU2YA6.js} +1 -1
  8. package/{chunk-2GCIICW5.js → chunk-4FUHLIJW.js} +1 -1
  9. package/{chunk-ETX7VKB3.js → chunk-4LLC3Q7O.js} +1 -1
  10. package/{chunk-42DBG4A6.js → chunk-4RIDBZOK.js} +1 -1
  11. package/{chunk-YTDBBO6I.js → chunk-4YUBZYBH.js} +1 -1
  12. package/{chunk-ELMONRIG.js → chunk-5ENRUF35.js} +1 -1
  13. package/{chunk-C6XTRC7P.js → chunk-5LKXKKAK.js} +1 -1
  14. package/{chunk-TRR5XEEM.js → chunk-65UN5LE6.js} +1 -1
  15. package/{chunk-476PQHLI.js → chunk-6KSS7VQS.js} +1 -1
  16. package/{chunk-BJIL3R5K.js → chunk-6WZGDK7U.js} +1 -1
  17. package/{chunk-3GYZOEPN.js → chunk-7NBGN46A.js} +1 -1
  18. package/{chunk-XDHEMLPD.js → chunk-A6XWHATE.js} +1 -1
  19. package/{chunk-XZ7HNUSV.js → chunk-AACJQG7X.js} +1 -1
  20. package/chunk-ADO3ABTT.js +1 -0
  21. package/{chunk-L72ALLHJ.js → chunk-AHUC7M75.js} +6 -6
  22. package/{chunk-SL6SRYFT.js → chunk-AL5KGNEF.js} +1 -1
  23. package/{chunk-P7O2NK5N.js → chunk-B3WLZK7W.js} +1 -1
  24. package/chunk-B64M2BXZ.js +1 -0
  25. package/{chunk-M7ENBMEW.js → chunk-BAX2AJJJ.js} +1 -1
  26. package/{chunk-HCBCZ5NX.js → chunk-CH7FSO4Y.js} +1 -1
  27. package/{chunk-JE3JBXTZ.js → chunk-CPTR6AJI.js} +1 -1
  28. package/chunk-CRJHIWSF.js +1 -0
  29. package/{chunk-C3M5C7JC.js → chunk-CZUGA62N.js} +2 -2
  30. package/chunk-DCYB2NQH.js +1 -0
  31. package/{chunk-I5SC52QU.js → chunk-DX6BDDDV.js} +1 -1
  32. package/{chunk-VJQVHIW5.js → chunk-ELZWH543.js} +1 -1
  33. package/{chunk-S5EF63OY.js → chunk-FRSQ5NDX.js} +1 -1
  34. package/chunk-G5CT45UH.js +1 -0
  35. package/{chunk-AGPUJOBO.js → chunk-GYUN7KFJ.js} +1 -1
  36. package/{chunk-MAVZY7BL.js → chunk-HFNFJ7G2.js} +1 -1
  37. package/chunk-HHSMSBNM.js +1 -0
  38. package/{chunk-N2MDNESH.js → chunk-HTX2RSBS.js} +1 -1
  39. package/{chunk-O445WX5K.js → chunk-HXN7IX3Q.js} +1 -1
  40. package/chunk-JRZGF4BZ.js +1 -0
  41. package/{chunk-HWBBTXU3.js → chunk-K5C3JCVH.js} +1 -1
  42. package/chunk-KBJGYXKV.js +1 -0
  43. package/{chunk-44DHERTN.js → chunk-KHGD372Q.js} +1 -1
  44. package/chunk-KYQWUXYN.js +1 -0
  45. package/{chunk-54VPI5KJ.js → chunk-LDJVMU7P.js} +1 -1
  46. package/{chunk-WFAZP46A.js → chunk-LJDOQTEF.js} +1 -1
  47. package/{chunk-7L2WUS2V.js → chunk-M3WT5B3C.js} +1 -1
  48. package/{chunk-COT4PUVO.js → chunk-MUBWT5H2.js} +1 -1
  49. package/{chunk-EQWH3TBL.js → chunk-NF3MS2YP.js} +1 -1
  50. package/{chunk-NIBE7CI2.js → chunk-NPZU4SBS.js} +1 -1
  51. package/{chunk-XYMSYNUD.js → chunk-OEIF7NQ5.js} +1 -1
  52. package/{chunk-MU24KCIK.js → chunk-OHZGASM5.js} +1 -1
  53. package/{chunk-FBX4Q2XW.js → chunk-PHIZVVHX.js} +1 -1
  54. package/chunk-PKRMVTCU.js +1 -0
  55. package/{chunk-B5MQU4UL.js → chunk-Q6M5VRZV.js} +1 -1
  56. package/chunk-QVNFX6ZC.js +1 -0
  57. package/{chunk-JFNFY6VY.js → chunk-RHII5WE3.js} +1 -1
  58. package/chunk-RKAIZDDW.js +1 -0
  59. package/{chunk-L2M4ZKII.js → chunk-RLUT4FSI.js} +1 -1
  60. package/{chunk-HFIC4JNY.js → chunk-RSZISHXB.js} +1 -1
  61. package/chunk-RXHYUPYG.js +6 -0
  62. package/{chunk-YCAQITZE.js → chunk-SSJ4VQB4.js} +2 -2
  63. package/{chunk-MQJUTAQD.js → chunk-T6KX6ACI.js} +1 -1
  64. package/{chunk-DOP6RFEG.js → chunk-TCDECRYI.js} +1 -1
  65. package/{chunk-R3PVYKQS.js → chunk-TJJORMQV.js} +1 -1
  66. package/{chunk-F7E55RI6.js → chunk-UABJ67OY.js} +1 -1
  67. package/{chunk-5BHYO5SK.js → chunk-UXUVYBYP.js} +1 -1
  68. package/{chunk-P7IBR2UW.js → chunk-VGAQB3OD.js} +1 -1
  69. package/chunk-W4RKRM2O.js +1 -0
  70. package/{chunk-FJVMA6GA.js → chunk-WFM6YWRN.js} +1 -1
  71. package/chunk-WU3ALGNP.js +1 -0
  72. package/{chunk-F2GEUOGZ.js → chunk-WZRSQ7XL.js} +1 -1
  73. package/{chunk-CDWP7I44.js → chunk-X6PSFVBL.js} +1 -1
  74. package/{chunk-TQHNKGRL.js → chunk-XR4SRVOQ.js} +1 -1
  75. package/{chunk-3RIVWHQR.js → chunk-XWF632WO.js} +2 -2
  76. package/{chunk-2WGKWTVM.js → chunk-YW5R7NEG.js} +2 -2
  77. package/{chunk-PVLYH62N.js → chunk-YY3JAYQZ.js} +1 -1
  78. package/chunk-Z45ZPMZS.js +1 -0
  79. package/chunk-ZHMYBX5F.js +1 -0
  80. package/{chunk-BJGA55H2.js → chunk-ZQSBINUM.js} +1 -1
  81. package/index.html +2 -2
  82. package/{main-I7BOOCNM.js → main-PDJMO4FF.js} +1 -1
  83. package/package.json +1 -1
  84. package/{styles-EXA64NMM.css → styles-P2AEFLUS.css} +1 -1
  85. package/chunk-3PDXD5UG.js +0 -1
  86. package/chunk-4RAO2JRJ.js +0 -1
  87. package/chunk-7RELJ5CQ.js +0 -1
  88. package/chunk-CCJ5LW7S.js +0 -1
  89. package/chunk-I7KXABQT.js +0 -1
  90. package/chunk-IZFSAAIF.js +0 -1
  91. package/chunk-JSZOZDJQ.js +0 -1
  92. package/chunk-SKABVF5Q.js +0 -1
  93. package/chunk-SQQKW2DQ.js +0 -1
  94. package/chunk-TEYVVULJ.js +0 -1
  95. package/chunk-TRCPJYNH.js +0 -1
  96. package/chunk-UNXP3IN4.js +0 -1
  97. package/chunk-V756QT7J.js +0 -1
  98. package/chunk-WLU27TDA.js +0 -1
  99. package/chunk-WRPHCCP7.js +0 -6
  100. package/chunk-X3TVMZLM.js +0 -1
  101. package/chunk-XL7YUTMF.js +0 -1
  102. package/chunk-YDLHVAEO.js +0 -1
@@ -1 +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};
1
+ import{ia as ze}from"./chunk-M3WT5B3C.js";import{$a as U,Ab as ge,Bb as ve,Cb as Ce,Db as a,Eb as c,Fb as q,Ib as ie,Ic as qe,Jb as z,Pc as D,Qc as R,Sc 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,fa as y,fc as Be,gb as S,gc as N,hc as Y,ib as se,ic as We,jc as _,ka as de,kc as _e,la as ue,lb as O,lc as K,mc as re,oc as Se,pc as ke,qa as he,qb as He,qc as ye,ra as X,rc as ae,sa as g,sc as J,ta as H,tb as Le,tc as B,ua as fe,ub as G,va as C,vb as j,vc as De,wb as I,wc as le,xb as je,yb as Q,zb as T}from"./chunk-AHUC7M75.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};
@@ -1 +1 @@
1
- import{a as se}from"./chunk-MU24KCIK.js";import{c as re,e as _e,h as pe,j as ce,s as I}from"./chunk-ELMONRIG.js";import{a as J}from"./chunk-BJGA55H2.js";import{a as Q,b as Y,e as ee,g as te,i as R,l as ne,p as ie,q as oe,s as ae,t as le}from"./chunk-SL6SRYFT.js";import{h}from"./chunk-S5EF63OY.js";import{a as ue}from"./chunk-JFNFY6VY.js";import{pa as Z}from"./chunk-7L2WUS2V.js";import{Ab as z,Ac as j,Bb as X,Cb as H,Db as a,Eb as l,F as N,Fb as E,Jb as K,Oc as q,Pb as O,Qb as f,Rb as c,Ua as r,Ub as W,Vb as _,Wb as C,Z as S,ea as $,fa as x,gb as g,ic as u,kc as k,lb as y,lc as B,nc as A,oc as P,pc as M,ra as F,ub as m,va as p,vb as w,wb as d,yc as U,zb as v,zc as V}from"./chunk-L72ALLHJ.js";function Oe(s,n){if(s&1){let t=K();a(0,"spk-radio",10),_("click",function(){let i=$(t).$implicit,o=C();return x(o.pauseOption.set(i.value))}),u(1),l()}if(s&2){let t=n.$implicit,e=C();d("active",e.pauseOption()===t.value),r(),k(" ",t.label," ")}}var fe=[{label:$localize`5 minuts`,value:"5m"},{label:$localize`10 minuts`,value:"10m"},{label:$localize`15 minuts`,value:"15m"},{label:$localize`30 minuts`,value:"30m"},{label:$localize`1 hour`,value:"1h"},{label:$localize`4 hours`,value:"4h"},{label:$localize`8 hours`,value:"8h"},{label:$localize`24 hours`,value:"24h"},{label:$localize`Until resumed`,value:void 0}],b=class s{#e=S(h);pauseOptions=p(fe);closed=F();isSubmitting=p(!1);pauseTransfers=p(!1);pauseOption=p(void 0);submit(){this.isSubmitting.set(!0);let n=this.pauseTransfers()||null,t=this.pauseOption();this.#e.postApiV1ServerstatePause({duration:t,pauseTransfers:n}).pipe(N(()=>this.isSubmitting.set(!1))).subscribe({next:e=>{this.closed.emit()}})}static \u0275fac=function(t){return new(t||s)};static \u0275cmp=g({type:s,selectors:[["app-pause-dialog"]],outputs:{closed:"closed"},decls:17,vars:4,consts:()=>{let n;n=$localize`Pause settings`;let t;t=$localize` Also pause transfers `;let e;e=$localize`If you pause transfers they could time out and cause retries or failures.`;let i;i=$localize`Cancel`;let o;return o=$localize` Update settings `,[n,t,e,i,o,["header",""],["content",""],[1,"radios"],[1,"primary","raised",3,"active"],[1,"check-wrap"],[1,"primary","raised",3,"click"],["type","warning"],["footer",""],["spk-button","",3,"click"],["spk-button","",1,"raised","primary",3,"click"]]},template:function(t,e){t&1&&(a(0,"header",5)(1,"h3"),c(2,0),l()(),a(3,"div",6)(4,"div",7),X(5,Oe,2,3,"spk-radio",8,z),l(),a(7,"div",9)(8,"spk-checkbox",10),_("click",function(){return e.pauseTransfers.set(!e.pauseTransfers())}),c(9,1),l(),a(10,"spk-alert",11),c(11,2),l()()(),a(12,"footer",12)(13,"button",13),_("click",function(){return e.closed.emit()}),c(14,3),l(),a(15,"button",14),_("click",function(){return e.submit()}),c(16,4),l()()),t&2&&(r(5),H(e.pauseOptions()),r(3),d("active",e.pauseTransfers()),r(7),d("loader",e.isSubmitting()))},dependencies:[I,oe,R,Y],styles:["[_nghost-%COMP%]{--dialog-p: 1.5rem;display:block}h3[_ngcontent-%COMP%]{font:var(--title-30)}.radios[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.check-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:2rem 0 0}"],changeDetection:0})};var Ae=["Byte/s","KByte/s","MByte/s","GByte/s","TByte/s","PByte/s"],L={Byte:"B",KByte:"KB",MByte:"MB",GByte:"GB",TByte:"TB",PByte:"PB"},me=Object.entries(L).reduce((s,[n,t])=>(s[t]=n,s),{}),D=class s{#e=S(h);closed=F();isSubmitting=p(!1);sizeOptions=p(Ae);maxUploadActive=p(!1);maxDownloadActive=p(!1);maxUpload=p(0);maxDownload=p(0);maxUploadUnit=p("MByte/s");maxDownloadUnit=p("MByte/s");ngOnInit(){this.init()}init(){this.#e.getApiV1Serversettings().subscribe({next:n=>{let t=n?.["max-upload-speed"]?.split(/(\d+)/),e=n?.["max-download-speed"]?.split(/(\d+)/),i=t[1]??"",o=e[1]??"",T=t[2]??"MB",ge=e[2]??"MB",Ce=i===""?10:parseInt(i),Ee=o===""?10:parseInt(o);this.maxUploadUnit.set(me[T]+"/s"),this.maxDownloadUnit.set(me[ge]+"/s"),this.maxUploadActive.set(i!==""),this.maxDownloadActive.set(o!==""),this.maxUpload.set(Ce),this.maxDownload.set(Ee)}})}blockDecimalKeys(n){if([".",","].includes(n.key))return n.preventDefault()}cleanupInputAfterPasting(n){n.preventDefault();let t=n.clipboardData?.getData("text/plain");if(!t)return;let e=t.replaceAll(/[\.,]/g,"");n.target.value=e}submit(){this.isSubmitting.set(!0);let n=this.maxUploadActive()?`${this.maxUpload()}${L[this.maxUploadUnit().replace("/s","")]}`:"",t=this.maxDownloadActive()?`${this.maxDownload()}${L[this.maxDownloadUnit().replace("/s","")]}`:"";this.#e.patchApiV1Serversettings({requestBody:{"max-upload-speed":n,"max-download-speed":t}}).pipe(N(()=>this.isSubmitting.set(!1))).subscribe({next:e=>{this.closed.emit(!0)}})}static \u0275fac=function(t){return new(t||s)};static \u0275cmp=g({type:s,selectors:[["app-throttle-settings-dialog"]],outputs:{closed:"closed"},decls:28,vars:16,consts:()=>{let n;n=$localize`Throttle network speed`;let t;t=$localize` Note that speeds are entered in bytes, and line speeds are typically reported in bits. Use a factor of 8 to convert, such that an 8 mbit/s line is equivalent to 1 MByte/s. `;let e;e=$localize`Cancel`;let i;return i=$localize` Update settings `,[n,t,e,i,["header",""],["content",""],[1,"column"],[1,"field-row"],[1,"primary","raised",3,"click"],["type","number",3,"paste","keydown","ngModelChange","ngModel","disabled"],[3,"isClearable","options"],["type","text",3,"ngModelChange","ngModel"],["footer",""],["spk-button","",3,"click"],["spk-button","",1,"raised","primary",3,"click"]]},template:function(t,e){t&1&&(a(0,"header",4)(1,"h3"),c(2,0),l()(),a(3,"div",5)(4,"div",6)(5,"div",7)(6,"label"),u(7,"Max upload speed"),l(),a(8,"spk-checkbox",8),_("click",function(){return e.maxUploadActive.set(!e.maxUploadActive())}),l(),a(9,"spk-form-field")(10,"input",9),_("paste",function(o){return e.cleanupInputAfterPasting(o)})("keydown",function(o){return e.blockDecimalKeys(o)}),M("ngModelChange",function(o){return P(e.maxUpload,o)||(e.maxUpload=o),o}),l()(),a(11,"spk-select",10)(12,"input",11),M("ngModelChange",function(o){return P(e.maxUploadUnit,o)||(e.maxUploadUnit=o),o}),l()()(),a(13,"div",7)(14,"label"),u(15,"Max download speed"),l(),a(16,"spk-checkbox",8),_("click",function(){return e.maxDownloadActive.set(!e.maxDownloadActive())}),l(),a(17,"spk-form-field")(18,"input",9),_("paste",function(o){return e.cleanupInputAfterPasting(o)})("keydown",function(o){return e.blockDecimalKeys(o)}),M("ngModelChange",function(o){return P(e.maxDownload,o)||(e.maxDownload=o),o}),l()(),a(19,"spk-select",10)(20,"input",11),M("ngModelChange",function(o){return P(e.maxDownloadUnit,o)||(e.maxDownloadUnit=o),o}),l()()(),a(21,"p"),c(22,1),l()()(),a(23,"footer",12)(24,"button",13),_("click",function(){return e.closed.emit(!1)}),c(25,2),l(),a(26,"button",14),_("click",function(){return e.submit()}),c(27,3),l()()),t&2&&(r(8),d("active",e.maxUploadActive()),r(2),A("ngModel",e.maxUpload),m("disabled",!e.maxUploadActive()),r(),m("isClearable",!1)("options",e.sizeOptions()),r(),A("ngModel",e.maxUploadUnit),r(4),d("active",e.maxDownloadActive()),r(2),A("ngModel",e.maxDownload),m("disabled",!e.maxDownloadActive()),r(),m("isClearable",!1)("options",e.sizeOptions()),r(),A("ngModel",e.maxDownloadUnit),r(6),d("loader",e.isSubmitting()))},dependencies:[I,re,ce,_e,pe,ne,R,le],styles:['[_nghost-%COMP%]{display:block}h3[_ngcontent-%COMP%]{font:var(--title-30)}.column[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.field-row[_ngcontent-%COMP%]{display:grid;grid-template-areas:"label label label" "checkbox input select";grid-template-columns:auto 1fr auto;align-items:center;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{grid-area:label}.field-row[_ngcontent-%COMP%] spk-form-field[_ngcontent-%COMP%]{grid-area:input}.field-row[_ngcontent-%COMP%] spk-select[_ngcontent-%COMP%]{grid-area:select}'],changeDetection:0})};function Pe(s,n){if(s&1&&(a(0,"div"),u(1),l(),E(2,"spk-progress-bar",9)),s&2){let t=C();r(),B("",t.statusData().actionText," - ",t.statusData().statusText,""),r(),m("value",t.statusData().progress*100)}}function Me(s,n){if(s&1&&(a(0,"div",5),u(1),a(2,"spk-icon"),u(3,"clock"),l(),u(4),U(5,"relativeTime"),U(6,"date"),l()),s&2){let t,e=C();r(),k(" ",(t=e.nextBackup().backup)==null||t.Backup==null?null:t.Backup.Name," - "),r(3),B(" ",V(5,3,e.nextBackup().time)," at ",j(6,5,e.nextBackup().time,"shortTime")," ")}}function De(s,n){s&1&&(a(0,"div",5),c(1,1),l())}function Ne(s,n){s&1&&(a(0,"div",6),O(1,2),E(2,"spk-spinner"),f(),l()),s&2&&(r(2),w("--spinner-size","12px")("--spinner-thickness","2px"))}function Fe(s,n){s&1&&(O(0,0,1),E(1,"spk-icon"),f())}function ke(s,n){s&1&&(O(0,0,2),E(1,"spk-icon"),f())}var Te=new Date,G=class s{#e=S(se);#t=S(ee);#n=S(J);minsAgo=Te.setMinutes(Te.getMinutes()-1);statusData=this.#e.statusData;serverState=this.#e.serverState;clientIsRunning=this.#e.clientIsRunning;isResuming=this.#e.isResuming;nextBackup=q(()=>({backup:this.serverState()?.ProposedSchedule?.[0]?.backup,time:this.serverState()?.ProposedSchedule?.[0]?.Item2}));openThrottleSettingsDialog(){this.#t.open(D,{maxWidth:"550px",width:"100%"})}openPauseDialog(){this.#t.open(b,{maxWidth:"550px",width:"100%"})}pauseResume(){if(this.clientIsRunning()){this.openPauseDialog();return}this.#e.pauseResume().subscribe()}ngAfterViewInit(){let n=this.#n.relayIsEnabled()?"longpoll":"websocket";this.#e.setConnectionMethod(n)}static \u0275fac=function(t){return new(t||s)};static \u0275cmp=g({type:s,selectors:[["app-status-bar"]],decls:14,vars:4,consts:()=>{let n;n=$localize`${"\uFFFD*9:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:pause${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Pause ${"\uFFFD/*9:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*10:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:play${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Start ${"\uFFFD/*10:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,n=W(n);let t;t=$localize`No scheduled tasks`;let e;return e=$localize` Loading ${"\uFFFD#2\uFFFD"}:START_TAG_SPK_SPINNER:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_SPINNER:`,[n,t,e,[1,"current-backup"],[1,"current-backup-progress"],[1,"label"],[1,"label","label-loading"],[1,"current-backup-actions"],["spk-button","",3,"click"],[1,"raised","primary",3,"value"]]},template:function(t,e){if(t&1&&(a(0,"div",3)(1,"div",4),y(2,Pe,3,3)(3,Me,7,8,"div",5)(4,De,2,0,"div",5)(5,Ne,3,4,"div",6),l(),a(6,"div",7)(7,"button",8),_("click",function(){return e.pauseResume()}),O(8,0),y(9,Fe,2,0)(10,ke,2,0),f(),l(),a(11,"button",8),_("click",function(){return e.openThrottleSettingsDialog()}),a(12,"spk-icon"),u(13,"speedometer"),l()()()()),t&2){let i;r(2),v((i=e.serverState())!=null&&i.ActiveTask&&(!((i=e.statusData())==null||i.task==null)&&i.task.Status)&&((i=e.statusData())==null||i.task==null?null:i.task.Status)!=="Completed"?2:e.nextBackup().backup||e.nextBackup().time?3:(i=e.serverState())!=null&&i.ActiveTask?5:4),r(5),d("loader",e.isResuming()),r(2),v(e.clientIsRunning()?9:10)}},dependencies:[ie,ue,Z,Q,te,ae],styles:["[_nghost-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:1rem;min-height:3.875rem;border-bottom:1px solid var(--base-4)}.current-backup[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%;gap:.5rem}.current-backup-progress[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;min-width:18.75rem}.current-backup-progress[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.current-backup-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}.label-loading[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.25rem}"],changeDetection:0})};export{G as a};
1
+ import{a as se}from"./chunk-OHZGASM5.js";import{c as re,e as _e,h as pe,j as ce,s as I}from"./chunk-5ENRUF35.js";import{a as J}from"./chunk-ZQSBINUM.js";import{a as Q,b as Y,e as ee,g as te,i as R,l as ne,p as ie,q as oe,s as ae,t as le}from"./chunk-AL5KGNEF.js";import{h}from"./chunk-FRSQ5NDX.js";import{a as ue}from"./chunk-RHII5WE3.js";import{pa as Z}from"./chunk-M3WT5B3C.js";import{Ab as z,Ac as V,Bb as X,Bc as j,Cb as H,Db as a,Eb as l,F as N,Fb as E,Jb as K,Pb as O,Pc as q,Qb as f,Rb as c,Ua as r,Ub as W,Vb as _,Wb as C,Z as S,ea as $,fa as x,gb as g,jc as u,lb as y,lc as k,mc as B,oc as A,pc as P,qc as M,ra as F,ub as m,va as p,vb as w,wb as d,zb as v,zc as U}from"./chunk-AHUC7M75.js";function Oe(s,n){if(s&1){let t=K();a(0,"spk-radio",10),_("click",function(){let i=$(t).$implicit,o=C();return x(o.pauseOption.set(i.value))}),u(1),l()}if(s&2){let t=n.$implicit,e=C();d("active",e.pauseOption()===t.value),r(),k(" ",t.label," ")}}var fe=[{label:$localize`5 minuts`,value:"5m"},{label:$localize`10 minuts`,value:"10m"},{label:$localize`15 minuts`,value:"15m"},{label:$localize`30 minuts`,value:"30m"},{label:$localize`1 hour`,value:"1h"},{label:$localize`4 hours`,value:"4h"},{label:$localize`8 hours`,value:"8h"},{label:$localize`24 hours`,value:"24h"},{label:$localize`Until resumed`,value:void 0}],b=class s{#e=S(h);pauseOptions=p(fe);closed=F();isSubmitting=p(!1);pauseTransfers=p(!1);pauseOption=p(void 0);submit(){this.isSubmitting.set(!0);let n=this.pauseTransfers()||null,t=this.pauseOption();this.#e.postApiV1ServerstatePause({duration:t,pauseTransfers:n}).pipe(N(()=>this.isSubmitting.set(!1))).subscribe({next:e=>{this.closed.emit()}})}static \u0275fac=function(t){return new(t||s)};static \u0275cmp=g({type:s,selectors:[["app-pause-dialog"]],outputs:{closed:"closed"},decls:17,vars:4,consts:()=>{let n;n=$localize`Pause settings`;let t;t=$localize` Also pause transfers `;let e;e=$localize`If you pause transfers they could time out and cause retries or failures.`;let i;i=$localize`Cancel`;let o;return o=$localize` Update settings `,[n,t,e,i,o,["header",""],["content",""],[1,"radios"],[1,"primary","raised",3,"active"],[1,"check-wrap"],[1,"primary","raised",3,"click"],["type","warning"],["footer",""],["spk-button","",3,"click"],["spk-button","",1,"raised","primary",3,"click"]]},template:function(t,e){t&1&&(a(0,"header",5)(1,"h3"),c(2,0),l()(),a(3,"div",6)(4,"div",7),X(5,Oe,2,3,"spk-radio",8,z),l(),a(7,"div",9)(8,"spk-checkbox",10),_("click",function(){return e.pauseTransfers.set(!e.pauseTransfers())}),c(9,1),l(),a(10,"spk-alert",11),c(11,2),l()()(),a(12,"footer",12)(13,"button",13),_("click",function(){return e.closed.emit()}),c(14,3),l(),a(15,"button",14),_("click",function(){return e.submit()}),c(16,4),l()()),t&2&&(r(5),H(e.pauseOptions()),r(3),d("active",e.pauseTransfers()),r(7),d("loader",e.isSubmitting()))},dependencies:[I,oe,R,Y],styles:["[_nghost-%COMP%]{--dialog-p: 1.5rem;display:block}h3[_ngcontent-%COMP%]{font:var(--title-30)}.radios[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.check-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:2rem 0 0}"],changeDetection:0})};var Ae=["Byte/s","KByte/s","MByte/s","GByte/s","TByte/s","PByte/s"],L={Byte:"B",KByte:"KB",MByte:"MB",GByte:"GB",TByte:"TB",PByte:"PB"},me=Object.entries(L).reduce((s,[n,t])=>(s[t]=n,s),{}),D=class s{#e=S(h);closed=F();isSubmitting=p(!1);sizeOptions=p(Ae);maxUploadActive=p(!1);maxDownloadActive=p(!1);maxUpload=p(0);maxDownload=p(0);maxUploadUnit=p("MByte/s");maxDownloadUnit=p("MByte/s");ngOnInit(){this.init()}init(){this.#e.getApiV1Serversettings().subscribe({next:n=>{let t=n?.["max-upload-speed"]?.split(/(\d+)/),e=n?.["max-download-speed"]?.split(/(\d+)/),i=t[1]??"",o=e[1]??"",T=t[2]??"MB",ge=e[2]??"MB",Ce=i===""?10:parseInt(i),Ee=o===""?10:parseInt(o);this.maxUploadUnit.set(me[T]+"/s"),this.maxDownloadUnit.set(me[ge]+"/s"),this.maxUploadActive.set(i!==""),this.maxDownloadActive.set(o!==""),this.maxUpload.set(Ce),this.maxDownload.set(Ee)}})}blockDecimalKeys(n){if([".",","].includes(n.key))return n.preventDefault()}cleanupInputAfterPasting(n){n.preventDefault();let t=n.clipboardData?.getData("text/plain");if(!t)return;let e=t.replaceAll(/[\.,]/g,"");n.target.value=e}submit(){this.isSubmitting.set(!0);let n=this.maxUploadActive()?`${this.maxUpload()}${L[this.maxUploadUnit().replace("/s","")]}`:"",t=this.maxDownloadActive()?`${this.maxDownload()}${L[this.maxDownloadUnit().replace("/s","")]}`:"";this.#e.patchApiV1Serversettings({requestBody:{"max-upload-speed":n,"max-download-speed":t}}).pipe(N(()=>this.isSubmitting.set(!1))).subscribe({next:e=>{this.closed.emit(!0)}})}static \u0275fac=function(t){return new(t||s)};static \u0275cmp=g({type:s,selectors:[["app-throttle-settings-dialog"]],outputs:{closed:"closed"},decls:28,vars:16,consts:()=>{let n;n=$localize`Throttle network speed`;let t;t=$localize` Note that speeds are entered in bytes, and line speeds are typically reported in bits. Use a factor of 8 to convert, such that an 8 mbit/s line is equivalent to 1 MByte/s. `;let e;e=$localize`Cancel`;let i;return i=$localize` Update settings `,[n,t,e,i,["header",""],["content",""],[1,"column"],[1,"field-row"],[1,"primary","raised",3,"click"],["type","number",3,"paste","keydown","ngModelChange","ngModel","disabled"],[3,"isClearable","options"],["type","text",3,"ngModelChange","ngModel"],["footer",""],["spk-button","",3,"click"],["spk-button","",1,"raised","primary",3,"click"]]},template:function(t,e){t&1&&(a(0,"header",4)(1,"h3"),c(2,0),l()(),a(3,"div",5)(4,"div",6)(5,"div",7)(6,"label"),u(7,"Max upload speed"),l(),a(8,"spk-checkbox",8),_("click",function(){return e.maxUploadActive.set(!e.maxUploadActive())}),l(),a(9,"spk-form-field")(10,"input",9),_("paste",function(o){return e.cleanupInputAfterPasting(o)})("keydown",function(o){return e.blockDecimalKeys(o)}),M("ngModelChange",function(o){return P(e.maxUpload,o)||(e.maxUpload=o),o}),l()(),a(11,"spk-select",10)(12,"input",11),M("ngModelChange",function(o){return P(e.maxUploadUnit,o)||(e.maxUploadUnit=o),o}),l()()(),a(13,"div",7)(14,"label"),u(15,"Max download speed"),l(),a(16,"spk-checkbox",8),_("click",function(){return e.maxDownloadActive.set(!e.maxDownloadActive())}),l(),a(17,"spk-form-field")(18,"input",9),_("paste",function(o){return e.cleanupInputAfterPasting(o)})("keydown",function(o){return e.blockDecimalKeys(o)}),M("ngModelChange",function(o){return P(e.maxDownload,o)||(e.maxDownload=o),o}),l()(),a(19,"spk-select",10)(20,"input",11),M("ngModelChange",function(o){return P(e.maxDownloadUnit,o)||(e.maxDownloadUnit=o),o}),l()()(),a(21,"p"),c(22,1),l()()(),a(23,"footer",12)(24,"button",13),_("click",function(){return e.closed.emit(!1)}),c(25,2),l(),a(26,"button",14),_("click",function(){return e.submit()}),c(27,3),l()()),t&2&&(r(8),d("active",e.maxUploadActive()),r(2),A("ngModel",e.maxUpload),m("disabled",!e.maxUploadActive()),r(),m("isClearable",!1)("options",e.sizeOptions()),r(),A("ngModel",e.maxUploadUnit),r(4),d("active",e.maxDownloadActive()),r(2),A("ngModel",e.maxDownload),m("disabled",!e.maxDownloadActive()),r(),m("isClearable",!1)("options",e.sizeOptions()),r(),A("ngModel",e.maxDownloadUnit),r(6),d("loader",e.isSubmitting()))},dependencies:[I,re,ce,_e,pe,ne,R,le],styles:['[_nghost-%COMP%]{display:block}h3[_ngcontent-%COMP%]{font:var(--title-30)}.column[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.field-row[_ngcontent-%COMP%]{display:grid;grid-template-areas:"label label label" "checkbox input select";grid-template-columns:auto 1fr auto;align-items:center;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{grid-area:label}.field-row[_ngcontent-%COMP%] spk-form-field[_ngcontent-%COMP%]{grid-area:input}.field-row[_ngcontent-%COMP%] spk-select[_ngcontent-%COMP%]{grid-area:select}'],changeDetection:0})};function Pe(s,n){if(s&1&&(a(0,"div"),u(1),l(),E(2,"spk-progress-bar",9)),s&2){let t=C();r(),B("",t.statusData().actionText," - ",t.statusData().statusText,""),r(),m("value",t.statusData().progress*100)}}function Me(s,n){if(s&1&&(a(0,"div",5),u(1),a(2,"spk-icon"),u(3,"clock"),l(),u(4),U(5,"relativeTime"),U(6,"date"),l()),s&2){let t,e=C();r(),k(" ",(t=e.nextBackup().backup)==null||t.Backup==null?null:t.Backup.Name," - "),r(3),B(" ",V(5,3,e.nextBackup().time)," at ",j(6,5,e.nextBackup().time,"shortTime")," ")}}function De(s,n){s&1&&(a(0,"div",5),c(1,1),l())}function Ne(s,n){s&1&&(a(0,"div",6),O(1,2),E(2,"spk-spinner"),f(),l()),s&2&&(r(2),w("--spinner-size","12px")("--spinner-thickness","2px"))}function Fe(s,n){s&1&&(O(0,0,1),E(1,"spk-icon"),f())}function ke(s,n){s&1&&(O(0,0,2),E(1,"spk-icon"),f())}var Te=new Date,G=class s{#e=S(se);#t=S(ee);#n=S(J);minsAgo=Te.setMinutes(Te.getMinutes()-1);statusData=this.#e.statusData;serverState=this.#e.serverState;clientIsRunning=this.#e.clientIsRunning;isResuming=this.#e.isResuming;nextBackup=q(()=>({backup:this.serverState()?.ProposedSchedule?.[0]?.backup,time:this.serverState()?.ProposedSchedule?.[0]?.Item2}));openThrottleSettingsDialog(){this.#t.open(D,{maxWidth:"550px",width:"100%"})}openPauseDialog(){this.#t.open(b,{maxWidth:"550px",width:"100%"})}pauseResume(){if(this.clientIsRunning()){this.openPauseDialog();return}this.#e.pauseResume().subscribe()}ngAfterViewInit(){let n=this.#n.relayIsEnabled()?"longpoll":"websocket";this.#e.setConnectionMethod(n)}static \u0275fac=function(t){return new(t||s)};static \u0275cmp=g({type:s,selectors:[["app-status-bar"]],decls:14,vars:4,consts:()=>{let n;n=$localize`${"\uFFFD*9:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:pause${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Pause ${"\uFFFD/*9:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*10:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:play${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Start ${"\uFFFD/*10:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,n=W(n);let t;t=$localize`No scheduled tasks`;let e;return e=$localize` Loading ${"\uFFFD#2\uFFFD"}:START_TAG_SPK_SPINNER:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_SPINNER:`,[n,t,e,[1,"current-backup"],[1,"current-backup-progress"],[1,"label"],[1,"label","label-loading"],[1,"current-backup-actions"],["spk-button","",3,"click"],[1,"raised","primary",3,"value"]]},template:function(t,e){if(t&1&&(a(0,"div",3)(1,"div",4),y(2,Pe,3,3)(3,Me,7,8,"div",5)(4,De,2,0,"div",5)(5,Ne,3,4,"div",6),l(),a(6,"div",7)(7,"button",8),_("click",function(){return e.pauseResume()}),O(8,0),y(9,Fe,2,0)(10,ke,2,0),f(),l(),a(11,"button",8),_("click",function(){return e.openThrottleSettingsDialog()}),a(12,"spk-icon"),u(13,"speedometer"),l()()()()),t&2){let i;r(2),v((i=e.serverState())!=null&&i.ActiveTask&&(!((i=e.statusData())==null||i.task==null)&&i.task.Status)&&((i=e.statusData())==null||i.task==null?null:i.task.Status)!=="Completed"?2:e.nextBackup().backup||e.nextBackup().time?3:(i=e.serverState())!=null&&i.ActiveTask?5:4),r(5),d("loader",e.isResuming()),r(2),v(e.clientIsRunning()?9:10)}},dependencies:[ie,ue,Z,Q,te,ae],styles:["[_nghost-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:1rem;min-height:3.875rem;border-bottom:1px solid var(--base-4)}.current-backup[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%;gap:.5rem}.current-backup-progress[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;min-width:18.75rem}.current-backup-progress[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.current-backup-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}.label-loading[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.25rem}"],changeDetection:0})};export{G as a};
@@ -0,0 +1 @@
1
+ import{a as h}from"./chunk-XR4SRVOQ.js";import{d as f,r as C}from"./chunk-5ENRUF35.js";import{h as b}from"./chunk-FRSQ5NDX.js";import{T as P,Z as v,r as D,va as F}from"./chunk-AHUC7M75.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:"Private key path",longDescription:"This is a path to a private key file locally on the machine"},{type:"FreeText",name:"ssh-key",shortDescription:"SSH private key (PEM format)",longDescription:"Enter a PEM formatted SSH private key. OpenSSL, OpenSSH, and ssh.com formats are supported."}],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 k}from"./chunk-P7O2NK5N.js";import"./chunk-MU24KCIK.js";import"./chunk-TRR5XEEM.js";import"./chunk-FJVMA6GA.js";import"./chunk-BIZAKOYU.js";import"./chunk-RHW5QVAY.js";import"./chunk-HFIC4JNY.js";import"./chunk-ELMONRIG.js";import"./chunk-BJGA55H2.js";import"./chunk-XP7PWMT2.js";import{e as S}from"./chunk-C6XTRC7P.js";import"./chunk-MAVZY7BL.js";import{a as T,g as M,h as f}from"./chunk-SL6SRYFT.js";import"./chunk-S5EF63OY.js";import"./chunk-JFNFY6VY.js";import"./chunk-7L2WUS2V.js";import"./chunk-DOP6RFEG.js";import{Db as e,Eb as n,Fb as _,Pb as s,Qb as l,Rb as i,Ua as c,gb as D,ub as r,uc as d}from"./chunk-L72ALLHJ.js";import"./chunk-7CGTOI24.js";var E=()=>["/backup/new"],F=()=>["/backup/import"],u=class C{static \u0275fac=function(t){return new(t||C)};static \u0275cmp=D({type:C,selectors:[["app-add-backup"]],decls:23,vars:4,consts:()=>{let a;a=$localize`Add a new backup`;let t;t=$localize`New backup`;let p;p=$localize`Configure a new backup. Choose your destination, source data and schedule.`;let A;A=$localize` Add a new backup ${"\uFFFD#13\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let g;g=$localize`Import from file`;let P;P=$localize`Import backup configuration from a file. During import you can adjust the setings.`;let m;return m=$localize` Import from file ${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:upload-simple${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[a,t,p,A,g,P,m,[1,"backup-types"],[1,"type-a"],["src","assets/images/new-backup.png"],["spk-button","",1,"raised","primary",3,"routerLink"]]},template:function(t,p){t&1&&(_(0,"app-status-bar"),e(1,"section")(2,"h2"),i(3,0),n(),e(4,"div",7)(5,"spk-card",8),_(6,"img",9),e(7,"h3"),i(8,1),n(),e(9,"p"),i(10,2),n(),e(11,"button",10),s(12,3),_(13,"spk-icon"),l(),n()(),e(14,"spk-card",8),_(15,"img",9),e(16,"h3"),i(17,4),n(),e(18,"p"),i(19,5),n(),e(20,"button",10),s(21,6),_(22,"spk-icon"),l(),n()()()()),t&2&&(c(11),r("routerLink",d(2,E)),c(9),r("routerLink",d(3,F)))},dependencies:[k,M,f,T,S],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;align-items:center;flex-direction:column;gap:2rem;padding:2rem 0}div.backup-types[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem;max-width:700px}spk-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:1rem;padding-bottom:3rem}spk-card[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:300px}spk-card[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;text-align:center;width:75%}"],changeDetection:0})};export{u as default};
1
+ import{a as k}from"./chunk-B3WLZK7W.js";import"./chunk-OHZGASM5.js";import"./chunk-65UN5LE6.js";import"./chunk-WFM6YWRN.js";import"./chunk-3AIKVVWP.js";import"./chunk-RHW5QVAY.js";import"./chunk-RSZISHXB.js";import"./chunk-5ENRUF35.js";import"./chunk-ZQSBINUM.js";import"./chunk-3XVU2YA6.js";import{e as S}from"./chunk-5LKXKKAK.js";import"./chunk-HFNFJ7G2.js";import{a as T,g as M,h as f}from"./chunk-AL5KGNEF.js";import"./chunk-FRSQ5NDX.js";import"./chunk-RHII5WE3.js";import"./chunk-M3WT5B3C.js";import"./chunk-TCDECRYI.js";import{Db as e,Eb as n,Fb as _,Pb as s,Qb as l,Rb as i,Ua as c,gb as D,ub as r,vc as d}from"./chunk-AHUC7M75.js";import"./chunk-7CGTOI24.js";var E=()=>["/backup/new"],F=()=>["/backup/import"],u=class C{static \u0275fac=function(t){return new(t||C)};static \u0275cmp=D({type:C,selectors:[["app-add-backup"]],decls:23,vars:4,consts:()=>{let a;a=$localize`Add a new backup`;let t;t=$localize`New backup`;let p;p=$localize`Configure a new backup. Choose your destination, source data and schedule.`;let A;A=$localize` Add a new backup ${"\uFFFD#13\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let g;g=$localize`Import from file`;let P;P=$localize`Import backup configuration from a file. During import you can adjust the setings.`;let m;return m=$localize` Import from file ${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:upload-simple${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[a,t,p,A,g,P,m,[1,"backup-types"],[1,"type-a"],["src","assets/images/new-backup.png"],["spk-button","",1,"raised","primary",3,"routerLink"]]},template:function(t,p){t&1&&(_(0,"app-status-bar"),e(1,"section")(2,"h2"),i(3,0),n(),e(4,"div",7)(5,"spk-card",8),_(6,"img",9),e(7,"h3"),i(8,1),n(),e(9,"p"),i(10,2),n(),e(11,"button",10),s(12,3),_(13,"spk-icon"),l(),n()(),e(14,"spk-card",8),_(15,"img",9),e(16,"h3"),i(17,4),n(),e(18,"p"),i(19,5),n(),e(20,"button",10),s(21,6),_(22,"spk-icon"),l(),n()()()()),t&2&&(c(11),r("routerLink",d(2,E)),c(9),r("routerLink",d(3,F)))},dependencies:[k,M,f,T,S],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;align-items:center;flex-direction:column;gap:2rem;padding:2rem 0}div.backup-types[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem;max-width:700px}spk-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:1rem;padding-bottom:3rem}spk-card[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:300px}spk-card[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;text-align:center;width:75%}"],changeDetection:0})};export{u as default};
@@ -1 +1 @@
1
- import{a as z}from"./chunk-P7IBR2UW.js";import{a as x,c as w,d as B,e as U,f as X}from"./chunk-C6XTRC7P.js";import"./chunk-MAVZY7BL.js";import{a as K,f as V,o as h}from"./chunk-SL6SRYFT.js";import"./chunk-S5EF63OY.js";import"./chunk-7L2WUS2V.js";import{Db as i,Eb as t,Fb as _,Gb as M,Hb as f,Jb as R,Pb as l,Qb as s,Rb as b,Sb as y,Tb as v,Ua as p,Vb as u,Wb as c,Z as T,ea as a,fa as S,gb as D,lb as P,ub as N,va as $,zb as G}from"./chunk-L72ALLHJ.js";import"./chunk-7CGTOI24.js";function W(g,F){if(g&1){let n=R();i(0,"spk-menu",15)(1,"button",16),b(2,2),t(),M(3,17),i(4,"button",18),u("click",function(){a(n);let e=c();return S(e.updateLogLevel("Disabled"))}),l(5,3),_(6,"spk-icon"),s(),t(),i(7,"button",18),u("click",function(){a(n);let e=c();return S(e.updateLogLevel("Verbose"))}),l(8,4),_(9,"spk-icon"),s(),t(),i(10,"button",18),u("click",function(){a(n);let e=c();return S(e.updateLogLevel("ExplicitOnly"))}),l(11,5),_(12,"spk-icon"),s(),t(),i(13,"button",18),u("click",function(){a(n);let e=c();return S(e.updateLogLevel("Profiling"))}),l(14,6),_(15,"spk-icon"),s(),t(),i(16,"button",18),u("click",function(){a(n);let e=c();return S(e.updateLogLevel("Retry"))}),l(17,7),_(18,"spk-icon"),s(),t(),i(19,"button",18),u("click",function(){a(n);let e=c();return S(e.updateLogLevel("Information"))}),l(20,8),_(21,"spk-icon"),s(),t(),i(22,"button",18),u("click",function(){a(n);let e=c();return S(e.updateLogLevel("DryRun"))}),l(23,9),_(24,"spk-icon"),s(),t(),i(25,"button",18),u("click",function(){a(n);let e=c();return S(e.updateLogLevel("Warning"))}),l(26,10),_(27,"spk-icon"),s(),t(),i(28,"button",18),u("click",function(){a(n);let e=c();return S(e.updateLogLevel("Error"))}),l(29,11),_(30,"spk-icon"),s(),t(),f(),t()}if(g&2){let n=c();N("openIndicator",!0),p(2),y(n.logLevelByLabel()),v(2)}}var O=class g{#n=T(B);#e=T(z);logLevel=this.#e.logLevel;logLevelByLabel=this.#e.logLevelByLabel;currentUrl=$(this.#n.url);constructor(){this.#n.events.subscribe(F=>{F instanceof x&&this.currentUrl.set(F.urlAfterRedirects)})}updateLogLevel(F){this.#e.isPolling.set(!0),this.#e.updateLogLevel(F)}static \u0275fac=function(n){return new(n||g)};static \u0275cmp=D({type:g,selectors:[["app-logs"]],decls:10,vars:1,consts:()=>{let F;F=$localize`${"\uFFFD#4\uFFFD"}:START_TAG_SPK_ICON:archive${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SPK_ICON: Stored `;let n;n=$localize`${"\uFFFD#7\uFFFD"}:START_TAG_SPK_ICON:play${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SPK_ICON: Live `;let o;o=$localize`Log level: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let e;e=$localize`${"\uFFFD#6\uFFFD"}:START_TAG_SPK_ICON:bell-simple-slash${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SPK_ICON: Disabled `;let C;C=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SPK_ICON:megaphone-simple${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_ICON: Verbose `;let L;L=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:flow-arrow${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Explicit only `;let d;d=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SPK_ICON:speedometer${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SPK_ICON: Profiling `;let k;k=$localize`${"\uFFFD#18\uFFFD"}:START_TAG_SPK_ICON:arrow-arc-left${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SPK_ICON: Retry `;let I;I=$localize`${"\uFFFD#21\uFFFD"}:START_TAG_SPK_ICON:info${"\uFFFD/#21\uFFFD"}:CLOSE_TAG_SPK_ICON: Information `;let E;E=$localize`${"\uFFFD#24\uFFFD"}:START_TAG_SPK_ICON:person-simple-run${"\uFFFD/#24\uFFFD"}:CLOSE_TAG_SPK_ICON: Dry run `;let A;A=$localize`${"\uFFFD#27\uFFFD"}:START_TAG_SPK_ICON:warning${"\uFFFD/#27\uFFFD"}:CLOSE_TAG_SPK_ICON: Warning `;let m;return m=$localize`${"\uFFFD#30\uFFFD"}:START_TAG_SPK_ICON:warning-octagon${"\uFFFD/#30\uFFFD"}:CLOSE_TAG_SPK_ICON: Error `,[F,n,o,e,C,L,d,k,I,E,A,m,[1,"filters"],["type","button","routerLink","/about/logs/stored","routerLinkActive","active"],["type","button","routerLink","/about/logs/live","routerLinkActive","active"],[3,"openIndicator"],["spk-button","","type","button"],["menu",""],["spk-button","","type","button",1,"small",3,"click"]]},template:function(n,o){n&1&&(i(0,"div",12)(1,"spk-button-group")(2,"button",13),l(3,0),_(4,"spk-icon"),s(),t(),i(5,"button",14),l(6,1),_(7,"spk-icon"),s(),t()(),P(8,W,31,2,"spk-menu",15),t(),_(9,"router-outlet")),n&2&&(p(8),G(o.currentUrl().startsWith("/about/logs/live")?8:-1))},dependencies:[V,K,h,w,X,U],styles:["[_nghost-%COMP%]{display:block}.filters[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;margin-bottom:1.25rem}"],changeDetection:0})};export{O as default};
1
+ import{a as z}from"./chunk-VGAQB3OD.js";import{a as x,c as w,d as B,e as U,f as X}from"./chunk-5LKXKKAK.js";import"./chunk-HFNFJ7G2.js";import{a as K,f as V,o as h}from"./chunk-AL5KGNEF.js";import"./chunk-FRSQ5NDX.js";import"./chunk-M3WT5B3C.js";import{Db as i,Eb as t,Fb as _,Gb as M,Hb as f,Jb as R,Pb as l,Qb as s,Rb as b,Sb as y,Tb as v,Ua as p,Vb as u,Wb as c,Z as T,ea as a,fa as S,gb as D,lb as P,ub as N,va as $,zb as G}from"./chunk-AHUC7M75.js";import"./chunk-7CGTOI24.js";function W(g,F){if(g&1){let n=R();i(0,"spk-menu",15)(1,"button",16),b(2,2),t(),M(3,17),i(4,"button",18),u("click",function(){a(n);let e=c();return S(e.updateLogLevel("Disabled"))}),l(5,3),_(6,"spk-icon"),s(),t(),i(7,"button",18),u("click",function(){a(n);let e=c();return S(e.updateLogLevel("Verbose"))}),l(8,4),_(9,"spk-icon"),s(),t(),i(10,"button",18),u("click",function(){a(n);let e=c();return S(e.updateLogLevel("ExplicitOnly"))}),l(11,5),_(12,"spk-icon"),s(),t(),i(13,"button",18),u("click",function(){a(n);let e=c();return S(e.updateLogLevel("Profiling"))}),l(14,6),_(15,"spk-icon"),s(),t(),i(16,"button",18),u("click",function(){a(n);let e=c();return S(e.updateLogLevel("Retry"))}),l(17,7),_(18,"spk-icon"),s(),t(),i(19,"button",18),u("click",function(){a(n);let e=c();return S(e.updateLogLevel("Information"))}),l(20,8),_(21,"spk-icon"),s(),t(),i(22,"button",18),u("click",function(){a(n);let e=c();return S(e.updateLogLevel("DryRun"))}),l(23,9),_(24,"spk-icon"),s(),t(),i(25,"button",18),u("click",function(){a(n);let e=c();return S(e.updateLogLevel("Warning"))}),l(26,10),_(27,"spk-icon"),s(),t(),i(28,"button",18),u("click",function(){a(n);let e=c();return S(e.updateLogLevel("Error"))}),l(29,11),_(30,"spk-icon"),s(),t(),f(),t()}if(g&2){let n=c();N("openIndicator",!0),p(2),y(n.logLevelByLabel()),v(2)}}var O=class g{#n=T(B);#e=T(z);logLevel=this.#e.logLevel;logLevelByLabel=this.#e.logLevelByLabel;currentUrl=$(this.#n.url);constructor(){this.#n.events.subscribe(F=>{F instanceof x&&this.currentUrl.set(F.urlAfterRedirects)})}updateLogLevel(F){this.#e.isPolling.set(!0),this.#e.updateLogLevel(F)}static \u0275fac=function(n){return new(n||g)};static \u0275cmp=D({type:g,selectors:[["app-logs"]],decls:10,vars:1,consts:()=>{let F;F=$localize`${"\uFFFD#4\uFFFD"}:START_TAG_SPK_ICON:archive${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SPK_ICON: Stored `;let n;n=$localize`${"\uFFFD#7\uFFFD"}:START_TAG_SPK_ICON:play${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SPK_ICON: Live `;let o;o=$localize`Log level: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let e;e=$localize`${"\uFFFD#6\uFFFD"}:START_TAG_SPK_ICON:bell-simple-slash${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SPK_ICON: Disabled `;let C;C=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SPK_ICON:megaphone-simple${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_ICON: Verbose `;let L;L=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:flow-arrow${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Explicit only `;let d;d=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SPK_ICON:speedometer${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SPK_ICON: Profiling `;let k;k=$localize`${"\uFFFD#18\uFFFD"}:START_TAG_SPK_ICON:arrow-arc-left${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SPK_ICON: Retry `;let I;I=$localize`${"\uFFFD#21\uFFFD"}:START_TAG_SPK_ICON:info${"\uFFFD/#21\uFFFD"}:CLOSE_TAG_SPK_ICON: Information `;let E;E=$localize`${"\uFFFD#24\uFFFD"}:START_TAG_SPK_ICON:person-simple-run${"\uFFFD/#24\uFFFD"}:CLOSE_TAG_SPK_ICON: Dry run `;let A;A=$localize`${"\uFFFD#27\uFFFD"}:START_TAG_SPK_ICON:warning${"\uFFFD/#27\uFFFD"}:CLOSE_TAG_SPK_ICON: Warning `;let m;return m=$localize`${"\uFFFD#30\uFFFD"}:START_TAG_SPK_ICON:warning-octagon${"\uFFFD/#30\uFFFD"}:CLOSE_TAG_SPK_ICON: Error `,[F,n,o,e,C,L,d,k,I,E,A,m,[1,"filters"],["type","button","routerLink","/about/logs/stored","routerLinkActive","active"],["type","button","routerLink","/about/logs/live","routerLinkActive","active"],[3,"openIndicator"],["spk-button","","type","button"],["menu",""],["spk-button","","type","button",1,"small",3,"click"]]},template:function(n,o){n&1&&(i(0,"div",12)(1,"spk-button-group")(2,"button",13),l(3,0),_(4,"spk-icon"),s(),t(),i(5,"button",14),l(6,1),_(7,"spk-icon"),s(),t()(),P(8,W,31,2,"spk-menu",15),t(),_(9,"router-outlet")),n&2&&(p(8),G(o.currentUrl().startsWith("/about/logs/live")?8:-1))},dependencies:[V,K,h,w,X,U],styles:["[_nghost-%COMP%]{display:block}.filters[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;margin-bottom:1.25rem}"],changeDetection:0})};export{O as default};
@@ -1 +1 @@
1
- import{a as $}from"./chunk-P7O2NK5N.js";import{a as R}from"./chunk-TQHNKGRL.js";import"./chunk-MU24KCIK.js";import"./chunk-TRR5XEEM.js";import"./chunk-FJVMA6GA.js";import"./chunk-BIZAKOYU.js";import"./chunk-RHW5QVAY.js";import"./chunk-HFIC4JNY.js";import"./chunk-ELMONRIG.js";import"./chunk-BJGA55H2.js";import"./chunk-XP7PWMT2.js";import{b as A,e as N}from"./chunk-C6XTRC7P.js";import"./chunk-MAVZY7BL.js";import{a as k,g as B}from"./chunk-SL6SRYFT.js";import{h as O}from"./chunk-S5EF63OY.js";import"./chunk-JFNFY6VY.js";import"./chunk-7L2WUS2V.js";import"./chunk-DOP6RFEG.js";import{Ab as f,Bb as S,Cb as g,Db as F,Eb as a,Fb as r,Oc as M,Pb as _,Qb as c,Rb as u,Ua as i,Ub as T,Vb as I,Z as m,gb as C,ic as E,kc as L,lb as p,va as l,zb as s}from"./chunk-L72ALLHJ.js";import"./chunk-7CGTOI24.js";function b(e,t){e&1&&u(0,2,1)}function P(e,t){e&1&&u(0,2,2)}function h(e,t){e&1&&u(0,2,3)}function v(e,t){e&1&&u(0,2,4)}function U(e,t){if(e&1&&(E(0),r(1,"br")),e&2){let n=t.$implicit;L(" ",n," ")}}var D=class e{#t=m(O);#e=m(A);#n=R(this.#e.params);runId=M(()=>this.#n()?.runId);offset=l(0);status=l("starting");messageLog=l([]);interval=setInterval(()=>{this.#t.getApiV1CommandlineByRunid({runid:this.runId(),offset:this.offset(),pagesize:100}).subscribe(t=>{this.offset.set(t.Count),this.evalStatus(t),this.messageLog.update(n=>[...n,...t.Items])})},1e3);evalStatus(t){t.Started===!0&&t.Finished===!0&&(this.status.set("finished"),clearInterval(this.interval)),t.Started===!0&&t.Finished===!1&&this.status.set("started")}abort(){this.#t.postApiV1CommandlineByRunidAbort({runid:this.runId()}).subscribe({next:t=>{this.status.set("aborted"),clearInterval(this.interval)}})}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=C({type:e,selectors:[["app-commandline-result"]],decls:18,vars:4,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let n;n=$localize` Running commandline task... ${"\uFFFD#8\uFFFD"}:START_TAG_BUTTON:Abort${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_BUTTON:`;let o;return o=$localize`${"\uFFFD*11:1\uFFFD"}:START_BLOCK_IF: Starting... ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*12:2\uFFFD"}:START_BLOCK_IF_1: Started! ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*13:3\uFFFD"}:START_BLOCK_IF_2: Finished! ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*14:4\uFFFD"}:START_BLOCK_IF_3: Aborted! ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:`,o=T(o),[t,n,o,[1,"back"],["type","button","spk-button","","routerLink","../",1,"small"],["type","button","spk-button","",1,"small",3,"click"],[1,"status"]]},template:function(n,o){n&1&&(r(0,"app-status-bar"),F(1,"section")(2,"div",3)(3,"button",4),_(4,0),r(5,"spk-icon"),c(),a()(),F(6,"h3"),_(7,1),F(8,"button",5),I("click",function(){return o.abort()}),a(),c(),a(),F(9,"div",6),_(10,2),p(11,b,1,0)(12,P,1,0)(13,h,1,0)(14,v,1,0),c(),a(),F(15,"code"),S(16,U,2,1,null,null,f),a()()),n&2&&(i(11),s(o.status()==="starting"?11:-1),i(),s(o.status()==="started"?12:-1),i(),s(o.status()==="finished"?13:-1),i(),s(o.status()==="aborted"?14:-1),i(2),g(o.messageLog()))},dependencies:[$,k,B,N],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;padding:2.5rem;gap:1.25rem}code[_ngcontent-%COMP%]{background-color:var(--grey-800);color:var(--grey-100);padding:2.5rem 2.5rem 2.5rem 1.5rem;border-radius:var(--shape-3);overflow:auto;white-space:pre}"],changeDetection:0})};export{D as default};
1
+ import{a as $}from"./chunk-B3WLZK7W.js";import{a as R}from"./chunk-XR4SRVOQ.js";import"./chunk-OHZGASM5.js";import"./chunk-65UN5LE6.js";import"./chunk-WFM6YWRN.js";import"./chunk-3AIKVVWP.js";import"./chunk-RHW5QVAY.js";import"./chunk-RSZISHXB.js";import"./chunk-5ENRUF35.js";import"./chunk-ZQSBINUM.js";import"./chunk-3XVU2YA6.js";import{b as A,e as N}from"./chunk-5LKXKKAK.js";import"./chunk-HFNFJ7G2.js";import{a as k,g as B}from"./chunk-AL5KGNEF.js";import{h as O}from"./chunk-FRSQ5NDX.js";import"./chunk-RHII5WE3.js";import"./chunk-M3WT5B3C.js";import"./chunk-TCDECRYI.js";import{Ab as f,Bb as S,Cb as T,Db as F,Eb as a,Fb as r,Pb as _,Pc as M,Qb as c,Rb as u,Ua as i,Ub as g,Vb as I,Z as m,gb as C,jc as E,lb as p,lc as L,va as l,zb as s}from"./chunk-AHUC7M75.js";import"./chunk-7CGTOI24.js";function b(e,t){e&1&&u(0,2,1)}function P(e,t){e&1&&u(0,2,2)}function h(e,t){e&1&&u(0,2,3)}function v(e,t){e&1&&u(0,2,4)}function U(e,t){if(e&1&&(E(0),r(1,"br")),e&2){let n=t.$implicit;L(" ",n," ")}}var D=class e{#t=m(O);#e=m(A);#n=R(this.#e.params);runId=M(()=>this.#n()?.runId);offset=l(0);status=l("starting");messageLog=l([]);interval=setInterval(()=>{this.#t.getApiV1CommandlineByRunid({runid:this.runId(),offset:this.offset(),pagesize:100}).subscribe(t=>{this.offset.set(t.Count),this.evalStatus(t),this.messageLog.update(n=>[...n,...t.Items])})},1e3);evalStatus(t){t.Started===!0&&t.Finished===!0&&(this.status.set("finished"),clearInterval(this.interval)),t.Started===!0&&t.Finished===!1&&this.status.set("started")}abort(){this.#t.postApiV1CommandlineByRunidAbort({runid:this.runId()}).subscribe({next:t=>{this.status.set("aborted"),clearInterval(this.interval)}})}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=C({type:e,selectors:[["app-commandline-result"]],decls:18,vars:4,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let n;n=$localize` Running commandline task... ${"\uFFFD#8\uFFFD"}:START_TAG_BUTTON:Abort${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_BUTTON:`;let o;return o=$localize`${"\uFFFD*11:1\uFFFD"}:START_BLOCK_IF: Starting... ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*12:2\uFFFD"}:START_BLOCK_IF_1: Started! ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*13:3\uFFFD"}:START_BLOCK_IF_2: Finished! ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*14:4\uFFFD"}:START_BLOCK_IF_3: Aborted! ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:`,o=g(o),[t,n,o,[1,"back"],["type","button","spk-button","","routerLink","../",1,"small"],["type","button","spk-button","",1,"small",3,"click"],[1,"status"]]},template:function(n,o){n&1&&(r(0,"app-status-bar"),F(1,"section")(2,"div",3)(3,"button",4),_(4,0),r(5,"spk-icon"),c(),a()(),F(6,"h3"),_(7,1),F(8,"button",5),I("click",function(){return o.abort()}),a(),c(),a(),F(9,"div",6),_(10,2),p(11,b,1,0)(12,P,1,0)(13,h,1,0)(14,v,1,0),c(),a(),F(15,"code"),S(16,U,2,1,null,null,f),a()()),n&2&&(i(11),s(o.status()==="starting"?11:-1),i(),s(o.status()==="started"?12:-1),i(),s(o.status()==="finished"?13:-1),i(),s(o.status()==="aborted"?14:-1),i(2),T(o.messageLog()))},dependencies:[$,k,B,N],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;padding:2.5rem;gap:1.25rem}code[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--base-8),#000 70%);color:#fff;padding:2.5rem 2.5rem 2.5rem 1.5rem;border-radius:var(--shape-3);overflow:auto;white-space:pre}"],changeDetection:0})};export{D as default};
@@ -0,0 +1 @@
1
+ import{a}from"./chunk-RSZISHXB.js";import"./chunk-M3WT5B3C.js";import"./chunk-AHUC7M75.js";import"./chunk-7CGTOI24.js";export{a as BytesPipe};