@duplicati/ngclient 0.0.234 → 0.0.235

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 (150) hide show
  1. package/assets/sh.woff2 +0 -0
  2. package/chunk-29_4gGIi.js +2 -0
  3. package/{chunk-D5zSyubd.js → chunk-3YzyUT-a.js} +1 -1
  4. package/chunk-6-sszNfh.js +1 -0
  5. package/chunk-7T5O8Syb.js +1 -0
  6. package/{chunk-5kQsbzck.js → chunk-B61kkU_h.js} +1 -1
  7. package/chunk-B891gwjc.js +1 -0
  8. package/chunk-BDJqKfxm.js +1 -0
  9. package/chunk-BEUeHgR9.js +1 -0
  10. package/chunk-BEzhTDp8.js +2 -0
  11. package/{chunk-BnFO-7ok.js → chunk-BGuvkLC9.js} +1 -1
  12. package/{chunk-Dyq6iPbF.js → chunk-BJOhC2d8.js} +1 -1
  13. package/chunk-BOKNwzSl.js +2 -0
  14. package/chunk-BSCc2xDv.js +1 -0
  15. package/chunk-BWSg9cLt.js +2 -0
  16. package/chunk-BWvawawS.js +2 -0
  17. package/chunk-B_I_9Y7k.js +1 -0
  18. package/chunk-Bgd5lu61.js +1 -0
  19. package/chunk-BjqgOGb9.js +2 -0
  20. package/chunk-Bq_vr6Q3.js +2 -0
  21. package/{chunk-B-c3Zv6R.js → chunk-Brfc2m61.js} +1 -1
  22. package/{chunk-B0ETfgeR.js → chunk-Btvi2S15.js} +11 -11
  23. package/chunk-C0KXp4hd.js +1 -0
  24. package/chunk-C0XQD9NK.js +1 -0
  25. package/chunk-C1-31fA7.js +1 -0
  26. package/chunk-C185qUb-.js +1 -0
  27. package/{chunk-GKdOPH_4.js → chunk-C1py21yb.js} +2 -2
  28. package/chunk-C4Uv1C-T.js +1 -0
  29. package/{chunk-CTH9uShX.js → chunk-CFgDqLU0.js} +1 -1
  30. package/{chunk-FZcbbWYC.js → chunk-CGnjVnmu.js} +1 -1
  31. package/{chunk-Cv4o9u3S.js → chunk-CKUlUN3q.js} +1 -1
  32. package/chunk-CLlZiOaO.js +2 -0
  33. package/chunk-CQVPqpMp.js +2 -0
  34. package/chunk-CSrYlKTK.js +2 -0
  35. package/chunk-CdzKkYEw.js +2 -0
  36. package/chunk-Cj_yOpND.js +1 -0
  37. package/chunk-ClFp7JLZ.js +1 -0
  38. package/{chunk-DCsYP4vf.js → chunk-Cm7JSdTO.js} +1 -1
  39. package/{chunk-BaknLOqq.js → chunk-CnZx831x.js} +1 -1
  40. package/chunk-CsVpmA6t.js +1 -0
  41. package/chunk-Css7wqTG.js +2 -0
  42. package/chunk-CxbeRJcJ.js +1 -0
  43. package/chunk-CzoH_Agx.js +1 -0
  44. package/chunk-CzsiJ0k-.js +1 -0
  45. package/chunk-D04TnMUn.js +2 -0
  46. package/{chunk-pxcB56N0.js → chunk-D2P9ER0I.js} +1 -1
  47. package/{chunk-B-T54LAJ.js → chunk-D38QrkIM.js} +1 -1
  48. package/chunk-D4g_OF7M.js +1 -0
  49. package/chunk-D5V6OY_2.js +2 -0
  50. package/{chunk-DP2sLJDC.js → chunk-D6IQFx6m.js} +1 -1
  51. package/chunk-D6y9RCQD.js +1 -0
  52. package/chunk-D7UddV5F.js +1 -0
  53. package/chunk-D9jPw9Ov.js +1 -0
  54. package/chunk-DA7rrIf8.js +1 -0
  55. package/chunk-DB0aGcRM.js +1 -0
  56. package/{chunk-DqoYKCmi.js → chunk-DBkkb6OR.js} +3 -3
  57. package/chunk-DE8p9-HP.js +1 -0
  58. package/chunk-DFLxy15J.js +1 -0
  59. package/chunk-DHkdQ4u3.js +3 -0
  60. package/chunk-DKRWta24.js +2 -0
  61. package/chunk-DSeMtMg3.js +1 -0
  62. package/chunk-DWCofCiP.js +14 -0
  63. package/chunk-DXLQftDm.js +1 -0
  64. package/{chunk-BaNH2nfC.js → chunk-DYV1Pbu1.js} +1 -1
  65. package/chunk-DaXXLSfy.js +2 -0
  66. package/chunk-Dbq-qyNL.js +3 -0
  67. package/{chunk-xwdrpTfz.js → chunk-DkVHfoYw.js} +2 -2
  68. package/chunk-DmCJ7w-M.js +1 -0
  69. package/{chunk-UUMQmD5I.js → chunk-DneBfCBh.js} +2 -2
  70. package/{chunk-KNmRQWOM.js → chunk-DuRr4rDS.js} +1 -1
  71. package/chunk-Dv_fBX0w.js +1 -0
  72. package/chunk-IqMUABbN.js +1 -0
  73. package/chunk-Kq2ZFJSk.js +1 -0
  74. package/chunk-NAAMYA7J.js +1 -0
  75. package/chunk-NiMN4Rl6.js +1 -0
  76. package/chunk-OQ_HQ9EL.js +1 -0
  77. package/chunk-W1dL7dqQ.js +4 -0
  78. package/chunk-_OzpLe0L.js +1 -0
  79. package/chunk-ayE11Iz-.js +1 -0
  80. package/chunk-fDWfSg6Y.js +3 -0
  81. package/chunk-gId840Er.js +1 -0
  82. package/{chunk-BDhLEYas.js → chunk-iGzJokt-.js} +1 -1
  83. package/{chunk-BFquKzMb.js → chunk-iU19kwHx.js} +1 -1
  84. package/chunk-m8vMm7S6.js +1 -0
  85. package/chunk-xD8qjoz4.js +1 -0
  86. package/chunk-xI8Kkqgy.js +1 -0
  87. package/{chunk-0lYdrxte.js → chunk-zOY5leQB.js} +1 -1
  88. package/index.html +1 -1
  89. package/main-2ZYVV4C4.js +21 -0
  90. package/package.json +1 -1
  91. package/assets/dest-icons/sia_logo_dark.92db63f5.svg +0 -6
  92. package/chunk-1-oPQ4n-.js +0 -1
  93. package/chunk-5EFCeqK3.js +0 -3
  94. package/chunk-AHhgJqe4.js +0 -2
  95. package/chunk-B1dNb-QT.js +0 -1
  96. package/chunk-B8PnvglY.js +0 -2
  97. package/chunk-BAmgFjXY.js +0 -1
  98. package/chunk-BFVhQEGw.js +0 -1
  99. package/chunk-BGcVKmjp.js +0 -1
  100. package/chunk-BHrABvoK.js +0 -1
  101. package/chunk-BNG7N21y.js +0 -1
  102. package/chunk-BQapkAzp.js +0 -1
  103. package/chunk-BRqx-u9-.js +0 -2
  104. package/chunk-BaR3Dslz.js +0 -1
  105. package/chunk-Bg98dUtr.js +0 -2
  106. package/chunk-BiSIt2zb.js +0 -2
  107. package/chunk-BkLND74M.js +0 -1
  108. package/chunk-BqbJuWHd.js +0 -3
  109. package/chunk-C4zj812G.js +0 -1
  110. package/chunk-C5G4RPpS.js +0 -1
  111. package/chunk-CA-0mTsq.js +0 -1
  112. package/chunk-CAEYxmzQ.js +0 -1
  113. package/chunk-CGnsbLNG.js +0 -1
  114. package/chunk-CPjYiawK.js +0 -1
  115. package/chunk-CQHKuUqk.js +0 -2
  116. package/chunk-CSYDDxaa.js +0 -2
  117. package/chunk-CUNe6D-d.js +0 -2
  118. package/chunk-CUaDFQyH.js +0 -1
  119. package/chunk-CnyuuWJ3.js +0 -1
  120. package/chunk-CsgB8OpN.js +0 -1
  121. package/chunk-CspKioFm.js +0 -4
  122. package/chunk-CxOam2tf.js +0 -1
  123. package/chunk-CxUx2RFx.js +0 -1
  124. package/chunk-D0qGkLVr.js +0 -1
  125. package/chunk-D4S_1RMU.js +0 -1
  126. package/chunk-D6WUhpxO.js +0 -14
  127. package/chunk-D7C8xyJI.js +0 -1
  128. package/chunk-D9dEfxn4.js +0 -1
  129. package/chunk-DB1KeglF.js +0 -1
  130. package/chunk-DGO0_pkA.js +0 -2
  131. package/chunk-DKOaWS_j.js +0 -2
  132. package/chunk-DXh9g32e.js +0 -1
  133. package/chunk-DYfv4gJW.js +0 -1
  134. package/chunk-DZMTCfoN.js +0 -1
  135. package/chunk-DcU0yXkQ.js +0 -1
  136. package/chunk-Dg-uYwbp.js +0 -2
  137. package/chunk-DmwtL4h3.js +0 -2
  138. package/chunk-DnTA-m4k.js +0 -2
  139. package/chunk-Du0Hd0t6.js +0 -1
  140. package/chunk-DzYR8wiz.js +0 -2
  141. package/chunk-OIDsf_Aq.js +0 -1
  142. package/chunk-S-sgDIKw.js +0 -1
  143. package/chunk-UCY_7-Of.js +0 -1
  144. package/chunk-X3dwwJIr.js +0 -2
  145. package/chunk-_J1lTnCH.js +0 -1
  146. package/chunk-i6kMmbhY.js +0 -1
  147. package/chunk-oobMnyEm.js +0 -3
  148. package/chunk-sgM_r5NM.js +0 -1
  149. package/chunk-umUQn7LQ.js +0 -1
  150. package/main-XKLDSNLY.js +0 -16
@@ -0,0 +1 @@
1
+ import {f as f$1}from'./chunk-CFgDqLU0.js';import {d}from'./chunk-BGuvkLC9.js';import {F as Fe$1}from'./chunk-DBkkb6OR.js';import {B as Bn,Z as Ze,R as Rn,J as Jt}from'./chunk-iGzJokt-.js';import {T,e as ee,I,f,k,G as Ge,E as E1,N as Nt,q as qe,Q as Qa,m as me$1,g as gw,_ as _t,v as v$1,u as ue$1,a as N,Z as Zi,l as lT,W as Wl,x as xC,r as rb,b as bE,c as uT,s as sC,F as Fg,j as jg,d as Ig,h as aC,i as ET,o as oC,n as lm,P as Pd,p as qC,L as Ld,t as bD,H as HC,w as Hg,y as cm,M as MD,z as vg}from'./main-2ZYVV4C4.js';import {C,v}from'./chunk-Bq_vr6Q3.js';import {R as R$1}from'./chunk-D9jPw9Ov.js';import'./chunk-Cm7JSdTO.js';var re=(n,t,e,i,o)=>({"loading-state":n,"ready-to-add-link":t,"is-connected":e,"failed-to-connect":i,"is-registered":o});function ae(n,t){n&1&&oC(0,0,1);}function le(n,t){n&1&&oC(0,0,2);}function se(n,t){if(n&1){let e=ET();Zi(0,"button",10),Hg("click",function(){Pd(e);let o=aC(2);return Ld(o.cancel())}),HC(1,"Cancel registration"),Wl();}}function ce(n,t){if(n&1&&(Zi(0,"div",7)(1,"p"),Fg(2,0),lT(3,ae,1,0)(4,le,1,0),jg(),Wl(),Ig(5,"sh-progress-bar",8),lT(6,se,2,0,"button",9),Wl()),n&2){let e=aC();bE(3),uT(e.state()==="unknown"?3:4),bE(3),uT((e.registeringCounter()??0)>=5&&e.state()==="registering"?6:-1);}}function de(n,t){if(n&1){let e=ET();Zi(0,"sh-form-field")(1,"label",11),oC(2,1),Wl(),Zi(3,"input",12),lm("ngModelChange",function(o){Pd(e);let C=aC();return qC(C.customRegisterUrl,o)||(C.customRegisterUrl=o),Ld(o)}),Wl(),bD(),Wl(),Zi(4,"div",13)(5,"button",14),HC(6,"Go back"),Wl(),Zi(7,"button",15),Hg("click",function(){Pd(e);let o=aC();return Ld(o.registerViaCustomUrl())}),oC(8,2),Wl()();}if(n&2){let e=aC();bE(3),cm("ngModel",e.customRegisterUrl),MD(),bE(4),vg("disabled",!e.customRegisterUrlValid());}}function _e(n,t){if(n&1){let e=ET();Zi(0,"p"),oC(1,3),Wl(),Ig(2,"sh-progress-bar",8),Zi(3,"button",10),Hg("click",function(){Pd(e);let o=aC(2);return Ld(o.retryWhenFaulted())}),HC(4,"Cancel"),Wl();}}function ue(n,t){if(n&1){let e=ET();Zi(0,"p"),oC(1,4),Wl(),Zi(2,"button",10),Hg("click",function(){Pd(e);let o=aC(2);return Ld(o.retryWhenFaulted())}),HC(3,"Retry"),Wl();}}function Ce(n,t){if(n&1&&lT(0,_e,5,0)(1,ue,4,0),n&2){let e=aC();uT(e.claimUrl()!==null?0:1);}}function ge(n,t){n&1&&(Fg(0,5,1),Ig(1,"p"),jg());}function me(n,t){n&1&&(Fg(0,5,2),Ig(1,"p"),jg());}function Fe(n,t){if(n&1){let e=ET();Zi(0,"sh-alert",16),Fg(1,5),lT(2,ge,2,0,"p")(3,me,2,0,"p"),jg(),Wl(),Zi(4,"button",10),Hg("click",function(){Pd(e);let o=aC();return Ld(o.retryWhenFaulted())}),HC(5," Retry "),Zi(6,"sh-icon"),HC(7,"arrow-arc-left"),Wl()();}if(n&2){let e=aC();bE(2),uT(e.typeParam()==="link"?2:3);}}function fe(n,t){n&1&&(Zi(0,"h3"),HC(1,"Successfully connected"),Wl(),Zi(2,"p"),HC(3,"We're going to redirect you to the home page"),Wl());}var R=class n{#n=T(ee);#a=T(C);#e=T(v);#i=T(R$1);#l=T(I);#s=T(f);#c=T(k);isOldOpen=Ge(false);typeParam=E1.required();state=this.#e.state;claimUrl=this.#e.claimUrl;registerUrl=this.#e.registerUrl;customRegisterUrl=this.#e.customRegisterUrl;additionalReportingUrl=Nt(()=>{let t=this.#i.serverSettings();return this.#e.state()==="inactive"?"":t&&t["additional-report-url"]||""});copiedReportingUrl=Ge(false);customRegisterUrlValid=Nt(()=>{let t=this.customRegisterUrl(),e=/^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\(\)\*\+,;=.]+$/;return !(t.length===0||!e.test(t))});registeringCounter=Ge(null);didTry=false;triedFinishConnection=false;#t=null;#d=T(qe);constructor(){this.#d.onDestroy(()=>{this.#r();});}ngAfterViewInit(){(this.#l.relayIsEnabled()||!this.#s.hasWebSocket()?"longpoll":"websocket")==="websocket"&&this.#c.reconnectIfNeeded();}stateEffect=Qa(()=>{let t=this.#e.registerUrl(),e=this.state(),i=this.typeParam();e==="inactive"&&i==="logon"&&t!==""&&(this.didTry||(this.didTry=true,queueMicrotask(()=>this.#e.beginRemoteRegistration()))),e==="registered"&&(this.triedFinishConnection||me$1(()=>this.claimUrl())!==null&&(this.triedFinishConnection=true,this.#_())),e==="registering"?me$1(()=>{this.registeringCounter()===null&&this.registeringCounter.set(0),this.#o();}):(this.#r(),me$1(()=>this.registeringCounter.set(null))),(e==="connected"||e==="disabled"||e==="connecting")&&queueMicrotask(()=>{this.#i.setShownWelcomePage().subscribe(()=>{this.#n.navigate([""]);});});});#o(){this.#t!==null&&clearTimeout(this.#t),this.#t=setTimeout(()=>{this.#t=null;let t=this.registeringCounter()??0;this.registeringCounter.set(t+1),this.state()==="registering"&&this.#o();},1e3);}#r(){this.#t!==null&&(clearTimeout(this.#t),this.#t=null);}ngOnInit(){this.#e.refreshRemoteControlStatus();}#_(){let t=this.#e.claimUrl();this.#a.open(`${t}?closeAfterConnection=true`,"_blank");}registerViaCustomUrl(){this.#e.beginRemoteRegistration(true);}retryWhenFaulted(){this.#e.cancelRemoteRegistration(),this.customRegisterUrl.set(""),this.didTry=false,this.triedFinishConnection=false,this.typeParam()==="logon"&&this.#n.navigate(["/welcome/select"]);}cancel(){this.#e.cancelRemoteRegistration();}register(){this.#e.beginRemoteRegistration();}disable(){this.#e.disableRemoteControl();}enable(){this.#e.enableRemoteControl();}delete(){this.#e.deleteRemoteControl();}copyReportingUrl(){let t=this.additionalReportingUrl();t&&(this.copiedReportingUrl.set(true),setTimeout(()=>this.copiedReportingUrl.set(false),2e3),navigator.clipboard.writeText(t));}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=gw({type:n,selectors:[["app-connect"]],inputs:{typeParam:[1,"typeParam"]},decls:6,vars:13,consts:()=>{let t;t=$localize`${"\uFFFD*3:1\uFFFD"}:START_BLOCK_IF: Loading... ${"\uFFFD/*3:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*4:2\uFFFD"}:START_BLOCK_ELSE: Connecting to console ${"\uFFFD/*4:2\uFFFD"}:CLOSE_BLOCK_ELSE:`;let e;e=$localize`Paste registration URL here`;let i;i=$localize` Connect machine to console `;let o;o=$localize`We're now connecting you to the console`;let C;C=$localize`Something failed during registration we're missing claimUrl, please try again`;let m;return m=$localize` Failed to register ${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_PARAGRAPH: Check if the connection link are correct, alternatively it could be your internet connection or the service might be down ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_PARAGRAPH:${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_PARAGRAPH: There might be a problem with your internet connection or the service might be down, please try again later ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_PARAGRAPH:${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,m=sC(m),[t,e,i,o,C,m,[1,"main-card","type-b"],[1,"loader-content"],[1,"primary","indeterminate"],["shButton",""],["shButton","",3,"click"],["for","remoteControlRegisterUrl"],["type","text","id","remoteControlRegisterUrl","name","remoteControlRegisterUrl",3,"ngModelChange","ngModel"],[1,"nav-buttons"],["type","button","shButton","","routerLink","/welcome",1,"raised"],["type","button","shButton","",1,"raised","primary",3,"click","disabled"],[1,"error"]]},template:function(e,i){if(e&1&&(Zi(0,"sh-card",6),lT(1,ce,7,2,"div",7),lT(2,de,9,2),lT(3,Ce,2,1),lT(4,Fe,8,1),lT(5,fe,4,0),Wl()),e&2){let o=i.state()==="unknown"||i.typeParam()!=="link"&&i.state()==="inactive"||i.state()==="registering",C=i.typeParam()==="link"&&i.state()==="inactive",m=i.state()==="connected"||i.state()==="disabled"||i.state()==="connecting",g=i.state()==="registeringfaulted";xC(rb(7,re,o,C,m,g,i.state()==="registered")),bE(),uT(o?1:-1),bE(),uT(C?2:-1),bE(),uT(i.state()==="registered"?3:-1),bE(),uT(g?4:-1),bE(),uT(m?5:-1);}},dependencies:[_t,Bn,Ze,Rn,Jt,Fe$1,v$1,d,f$1,ue$1,N],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;min-height:100%;width:100%;flex:1 0;overflow:hidden;padding:2rem}@media only screen and (max-width:768px){[_nghost-%COMP%]{padding:1rem}}.main-card[_ngcontent-%COMP%]{width:100%;height:100%;max-width:31.25rem;max-height:min-content;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:1rem;padding:2rem}.main-card.failed-to-connect[_ngcontent-%COMP%] sh-alert[_ngcontent-%COMP%]{width:100%}.main-card.failed-to-connect[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:100%}.main-card.is-registered[_ngcontent-%COMP%], .main-card.is-connected[_ngcontent-%COMP%]{align-items:center}.loader-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.5rem;width:100%}.loader-content[_ngcontent-%COMP%] sh-progress-bar[_ngcontent-%COMP%]{--pb-b: var(--base-3);border:1px solid var(--pb-b)}.field-row[_ngcontent-%COMP%]{display:flex;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] sh-form-field[_ngcontent-%COMP%], .field-row[_ngcontent-%COMP%] sh-select[_ngcontent-%COMP%]{flex:1 0}.reporting-url[_ngcontent-%COMP%]{cursor:pointer;-webkit-user-select:none;user-select:none;margin-top:.25rem}.state[_ngcontent-%COMP%]{position:fixed;top:1rem;right:1rem;margin:0;color:var(--base-7);font-size:.75rem}.old[_ngcontent-%COMP%]{display:flex;flex-direction:column;position:relative;gap:.5rem;padding:1rem;border:1px solid var(--base-4);background:var(--base-1);position:fixed;top:0;right:0;bottom:0;width:35rem;transform:translate(100%)}.old.open[_ngcontent-%COMP%]{transform:translate(0)}.old[_ngcontent-%COMP%] .toggle[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;gap:.5rem;cursor:pointer;position:absolute;background-color:var(--base-1);border:1px solid var(--base-4);border-width:.0625rem 0 .0625rem .0625rem;width:2rem;height:2.5rem;border-radius:var(--shape-2) 0 0 var(--shape-2);top:3.75rem;left:-2rem;-webkit-user-select:none;user-select:none}.old[_ngcontent-%COMP%] .toggle[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:1rem}.nav-buttons[_ngcontent-%COMP%]{display:flex;gap:.5rem;flex-direction:row}"]})};export{R as default};
@@ -0,0 +1 @@
1
+ import {O}from'./chunk-iU19kwHx.js';import {B as Bn}from'./chunk-iGzJokt-.js';import {T,ab as J,G as Ge,ac as I1,ad as sy,C as Zu,g as gw,u as ue,v,Z as Zi,o as oC,W as Wl,a1 as pT,n as lm,p as qC,w as Hg,b as bE,a2 as hT,y as cm,K as Kg,aq as dT,i as ET,P as Pd,h as aC,L as Ld,H as HC,z as vg,aa as Yl}from'./main-2ZYVV4C4.js';import {U}from'./chunk-CnZx831x.js';function B(l,t){if(l&1){let e=ET();Zi(0,"sh-radio",10),Hg("checkedChange",function(){let a=Pd(e).$implicit,i=aC();return Ld(i.pauseOption.set(a.value))}),HC(1),Wl();}if(l&2){let e=t.$implicit,n=aC();vg("checked",n.pauseOption()===e.value),bE(),Yl(" ",e.label," ");}}var x=[{label:$localize`5 minutes`,value:"5m"},{label:$localize`10 minutes`,value:"10m"},{label:$localize`15 minutes`,value:"15m"},{label:$localize`30 minutes`,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}],z=class l{#e=T(J);pauseOptions=Ge(x);closed=I1();isSubmitting=Ge(false);pauseTransfers=Ge(false);pauseOption=Ge(void 0);submit(){this.isSubmitting.set(true);let t=this.pauseTransfers()||null,e=this.pauseOption();sy(()=>this.#e.postApiV1ServerstatePause({query:{duration:e,pauseTransfers:t}})).pipe(Zu(()=>this.isSubmitting.set(false))).subscribe({next:n=>{this.closed.emit();}});}static \u0275fac=function(e){return new(e||l)};static \u0275cmp=gw({type:l,selectors:[["app-pause-dialog"]],outputs:{closed:"closed"},decls:17,vars:3,consts:()=>{let t;t=$localize`Pause settings`;let e;e=$localize`Also pause transfers`;let n;n=$localize`If you pause transfers they could time out and cause retries or failures.`;let a;a=$localize`Cancel`;let i;return i=$localize` Update settings `,[t,e,n,a,i,["header",""],["content",""],[1,"radios"],[1,"primary","raised",3,"checked"],[1,"check-wrap"],[1,"primary","raised",3,"checkedChange","checked"],["type","warning"],["footer",""],["shButton","",3,"click"],["shButton","",1,"raised","primary",3,"click"]]},template:function(e,n){e&1&&(Zi(0,"header",5)(1,"h3"),oC(2,0),Wl()(),Zi(3,"div",6)(4,"div",7),pT(5,B,2,2,"sh-radio",8,dT),Wl(),Zi(7,"div",9)(8,"sh-checkbox",10),lm("checkedChange",function(i){return qC(n.pauseTransfers,i)||(n.pauseTransfers=i),i}),oC(9,1),Wl(),Zi(10,"sh-alert",11),oC(11,2),Wl()()(),Zi(12,"footer",12)(13,"button",13),Hg("click",function(){return n.closed.emit()}),oC(14,3),Wl(),Zi(15,"button",14),Hg("click",function(){return n.submit()}),oC(16,4),Wl()()),e&2&&(bE(5),hT(n.pauseOptions()),bE(3),cm("checked",n.pauseTransfers),bE(7),Kg("loading",n.isSubmitting()));},dependencies:[Bn,O,U,ue,v],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}"]})};export{z};
@@ -0,0 +1 @@
1
+ import {T,ae as Mr,bU as dv,A,G as Ge,N as Nt,Q as Qa,bV as Rr,a_ as ee}from'./main-2ZYVV4C4.js';import {C}from'./chunk-Bq_vr6Q3.js';var m=class i{#i=T(C);#t=T(Mr);#o=T(dv);#e=A("darkTheme",null,true);#s=Ge(this.#i.innerWidth);isMobile=Nt(()=>this.#s()<1024);sidenavType=Ge(this.isMobile()?"overlay":"");isNavOpen=Ge(false);isDarkMode=this.#e.asReadonly();darkModeEffect=Qa(()=>{this.#e()?(this.#t.documentElement.classList.add("dark"),this.#t.documentElement.classList.remove("light")):(this.#t.documentElement.classList.remove("dark"),this.#t.documentElement.classList.add("light"));});isMobileEffect=Qa(()=>{this.isNavOpen.set(!this.isMobile()),this.sidenavType.set(this.isMobile()?"overlay":"");});constructor(){Rr(this.#o)&&this.#i?.addEventListener("resize",()=>{this.#s.set(this.#i.innerWidth);});}toggleNav(){this.isNavOpen.set(!this.isNavOpen());}toggleBodyClass(){this.#e.set(!this.isDarkMode());}setDarkMode(){this.#e.set(true);}setLightMode(){this.#e.set(false);}static \u0275fac=function(h){return new(h||i)};static \u0275prov=ee({token:i,factory:i.\u0275fac,providedIn:"root"})};export{m};
@@ -1,3 +1,3 @@
1
- import {c}from'./chunk-D5zSyubd.js';import {E as E1,bb as ce,h as hw,f as NC,T,ae as eo,bu as N,af as D1,ac as I1,N as Nt$1,G as Ge$1,c9 as C1,bY as Wr,D as w1,bv as le,b as me,z as za,bZ as ei,c as N$1,l as vT,S as aC,ak as dm,Q as Qi,p as lm,O as Od,U as UC,P as Pd,H as Hg,Y as cC,d as aT,$ as $l,a1 as dT,al as WC,C as CE,w as cm,y as vg,a3 as KC,L as Kg,g as cT,a2 as fT,M as qg,R as fC,ca as Wg,ap as lT,s as jC,k as iC,aa as Ql,ao as qC,i as Ig,K as im,aC as yg,bi as cg,a$ as JC,b_ as wg,aF as XC}from'./main-XKLDSNLY.js';import {D}from'./chunk-Cv4o9u3S.js';import {o as oe,F as Fe$1}from'./chunk-DqoYKCmi.js';import {U}from'./chunk-BaknLOqq.js';var m=(()=>{class n{constructor(){this.color=E1(null),this.hostClasses=ce("spinner",{color:this.color});}static{this.\u0275fac=function(e){return new(e||n)};}static{this.\u0275cmp=hw({type:n,selectors:[["sh-spinner"]],hostAttrs:["role","status","aria-busy","true"],hostVars:2,hostBindings:function(e,s){e&2&&NC(s.hostClasses());},inputs:{color:[1,"color"]},decls:0,vars:0,template:function(e,s){},styles:[`sh-spinner{--spinner-c: var(--base-8);--spinner-size: 2.5rem;--spinner-thickness: .3125rem;width:var(--spinner-size);height:var(--spinner-size);display:grid;place-content:center;color:var(--spinner-c);position:relative}sh-spinner:before{content:"";width:var(--spinner-size);height:var(--spinner-size);border:var(--spinner-thickness) solid currentColor;border-bottom-color:transparent;border-radius:50%;display:flex;box-sizing:border-box;animation:rotation 1s linear infinite;margin:auto;inset:0;position:absolute}sh-spinner.primary{--spinner-c: var(--primary-8)}sh-spinner.accent{--spinner-c: var(--accent-8)}sh-spinner.warn{--spinner-c: var(--warn-8)}sh-spinner.error{--spinner-c: var(--error-8)}sh-spinner.success{--spinner-c: var(--success-8)}
2
- `],encapsulation:2});}}return n})();var Ve=["optionsWrap"],Ie=[[["label"]],[["","prefix",""]],[["","boxPrefix",""]],[["input"]],[["textarea"]]],we=["label","[prefix]","[boxPrefix]","input","textarea"],Me=["ngProjectAs","label",5,["label"]],Fe=["ngProjectAs","[prefix]",5,["","prefix",""]],Ee=["ngProjectAs","[boxPrefix]",5,["","boxPrefix",""]],Le=()=>({closeOnButton:false,closeOnEsc:false}),Te=(i,l)=>({$implicit:i,last:l}),ie=i=>({$implicit:i});function De(i,l){if(i&1&&jC(0),i&2){let e=iC();Ql(" ",e.spacedSelectedOptions()," ");}}function Ne(i,l){i&1&&wg(0);}function Ae(i,l){if(i&1&&cg(0,Ne,1,0,"ng-container",13),i&2){let e=iC(3),t=e.$implicit,n=e.$index,o=e.$count;iC(2);let s=qC(3);vg("ngTemplateOutlet",s)("ngTemplateOutletContext",XC(2,Te,t,n===o-1));}}function ke(i,l){if(i&1&&jC(0),i&2){let e=iC(3).$implicit,t=iC(2);Ql(" ",t.getLabel(e)," ");}}function $e(i,l){if(i&1){let e=vT();Qi(0,"sh-chip",12),Hg("click",function(n){Od(e);let o=iC(2).$index,s=iC(2);return Pd(s.removeSelectedOptionByIndex(n,o))}),aT(1,Ae,1,5,"ng-container")(2,ke,1,1),Qi(3,"sh-icon"),jC(4,"x-bold"),$l()();}if(i&2){let e=iC(4),t=qC(3);NC(e.selectClasses()),CE(),cT(t?1:2);}}function Re(i,l){i&1&&wg(0);}function Pe(i,l){if(i&1&&cg(0,Re,1,0,"ng-container",13),i&2){let e=iC(4),t=e.$implicit,n=e.$index,o=e.$count;iC(2);let s=qC(3);vg("ngTemplateOutlet",s)("ngTemplateOutletContext",XC(2,Te,t,n===o-1));}}function je(i,l){if(i&1&&jC(0),i&2){let e=iC(4),t=e.$implicit,n=e.$index,o=e.$count,s=iC(2);Ql(" ",n===o-1?s.getLabel(t):s.getLabel(t)+","," ");}}function ze(i,l){if(i&1&&aT(0,Pe,1,5,"ng-container")(1,je,1,1),i&2){iC(5);let e=qC(3);cT(e?0:1);}}function Be(i,l){if(i&1&&aT(0,ze,2,1),i&2){iC(4);let e=qC(6);cT(e?-1:0);}}function Ke(i,l){if(i&1&&aT(0,$e,5,3,"sh-chip",11)(1,Be,1,1),i&2){iC(3);let e=qC(5);cT(e?0:1);}}function We(i,l){if(i&1&&aT(0,Ke,2,1),i&2){let e=l.$implicit;cT(e?0:-1);}}function qe(i,l){if(i&1&&dT(0,We,1,1,null,null,lT),i&2){iC();let e=qC(2);fT(e);}}function Qe(i,l){i&1&&wg(0);}function Ue(i,l){if(i&1&&cg(0,Qe,1,0,"ng-container",14),i&2){iC(2);let e=qC(0);vg("ngTemplateOutlet",e);}}function He(i,l){if(i&1&&jC(0),i&2){let e=iC(2);Ql(" ",e.placeholderText()??""," ");}}function Xe(i,l){if(i&1&&aT(0,Ue,1,1,"ng-container")(1,He,1,1),i&2){iC();let e=qC(0);cT(e?0:1);}}function Ge(i,l){i&1&&(Qi(0,"sh-icon",6),jC(1,"caret-down"),$l());}function Je(i,l){i&1&&Ig(0,"sh-spinner",7);}function Ye(i,l){i&1&&(Qi(0,"sh-icon",6),jC(1,"list-magnifying-glass"),$l());}function Ze(i,l){i&1&&(Qi(0,"sh-icon",6),jC(1,"magnifying-glass"),$l());}function et(i,l){if(i&1){let e=vT();Qi(0,"sh-icon",15),Hg("click",function(n){Od(e);let o=iC();return Pd(o.clear(n))}),jC(1,"x-bold"),$l();}}function tt(i,l){i&1&&(Qi(0,"sh-icon",6),jC(1,"caret-down"),$l());}function it(i,l){i&1&&(Qi(0,"sh-icon",6),jC(1,"caret-up"),$l());}function nt(i,l){if(i&1&&(Qi(0,"p",9),jC(1),$l()),i&2){let e=iC(3);CE(),im(e.freeTextTitle());}}function ot(i,l){i&1&&wg(0);}function st(i,l){if(i&1&&cg(0,ot,1,0,"ng-container",13),i&2){iC(2);let e=qC(0);iC();let t=qC(1);vg("ngTemplateOutlet",t)("ngTemplateOutletContext",JC(2,ie,e));}}function lt(i,l){i&1&&wg(0);}function at(i,l){if(i&1&&cg(0,lt,1,0,"ng-container",13),i&2){iC(2);let e=qC(0);iC();let t=qC(4);vg("ngTemplateOutlet",t)("ngTemplateOutletContext",JC(2,ie,e));}}function rt(i,l){if(i&1&&jC(0),i&2){iC(2);let e=qC(1);Ql(" ",e," ");}}function ct(i,l){i&1&&Ig(0,"sh-divider");}function pt(i,l){if(i&1){let e=vT();aT(0,nt,2,1,"p",9),Qi(1,"li",16),Hg("click",function(){Od(e);let n=iC(2);return Pd(n.toggleOptionByIndex(-1))}),aT(2,st,1,4,"ng-container")(3,at,1,4,"ng-container")(4,rt,1,1),$l(),aT(5,ct,1,0,"sh-divider");}if(i&2){let e=iC(2),t=qC(1),n=qC(4);cT(e.freeTextTitle()?0:-1),CE(),Kg("selected",e.isSelected(-1))("focused",e.focusedOptionIndex()===-1),vg("id",e.getOptionId(-1)),yg("aria-selected",e.isSelected(-1)),CE(),cT(t?2:n?3:4),CE(3),cT(e.freeTextTitle()&&e.filteredOptions().length>0?5:-1);}}function dt(i,l){if(i&1&&(dm(0)(1),aT(2,pt,6,9)),i&2){let e=iC(),t=WC(e.computedFreeTextOption());CE();let n=WC(e.getValue(t));CE(),cT(n.length>0?2:-1);}}function ut(i,l){if(i&1&&(Qi(0,"p",9),jC(1),$l()),i&2){let e=iC();CE(),im(e.optionTitle());}}function ht(i,l){if(i&1&&Ig(0,"sh-checkbox",18),i&2){let e=iC().$index,t=iC();NC(t.selectClasses()),vg("checked",t.isSelected(e));}}function _t(i,l){i&1&&wg(0);}function ft(i,l){if(i&1&&cg(0,_t,1,0,"ng-container",13),i&2){let e=iC().$implicit;iC();let t=qC(4);vg("ngTemplateOutlet",t)("ngTemplateOutletContext",JC(2,ie,e));}}function mt(i,l){if(i&1&&jC(0),i&2){let e=iC().$implicit,t=iC();Ql(" ",t.getLabel(e)," ");}}function xt(i,l){if(i&1){let e=vT();Qi(0,"li",16),Hg("click",function(){let n=Od(e).$index,o=iC();return Pd(o.toggleOptionByIndex(n))}),aT(1,ht,1,3,"sh-checkbox",17),aT(2,ft,1,4,"ng-container")(3,mt,1,1),$l();}if(i&2){let e=l.$index,t=iC(),n=qC(4);Kg("selected",t.isSelected(e))("focused",e===t.focusedOptionIndex()),vg("id",t.getOptionId(e)),yg("aria-selected",t.isSelected(e)),CE(),cT(t.selectMultiple()?1:-1),CE(),cT(n?2:3);}}var Nt=(()=>{class i{constructor(){this.#i=T(eo),this.#n=T(N),this.value=E1(),this.label=E1(),this.asFreeText=E1(false),this.color=E1(null),this.variant=E1(null),this.size=E1(null),this.optionTitle=E1(null),this.freeTextTitle=E1(null),this.freeTextPlaceholder=E1("Type to create a new option"),this.validateFreeText=E1(),this.placeholder=E1(),this.readonly=D1(false),this.disabled=D1(false),this.hostClasses=ce("select",{color:this.color,variant:this.variant,size:this.size,readonly:this.readonly}),this.lazySearch=E1(false),this.inlineSearch=E1(false),this.asText=E1(false),this.isClearable=E1(true),this.selectMultiple=E1(false),this.optionTemplate=E1(null),this.selectedOptionTemplate=E1(null),this.placeholderTemplate=E1(null),this.freeTextOptionTemplate=E1(null),this.isOpen=D1(false),this.isLoading=D1(false),this.options=D1([]),this.selectedOptions=D1([]),this.cleared=I1(),this.onAddNewFreeTextOption=I1(),this.spacedSelectedOptions=Nt$1(()=>{let e=this.selectedOptions(),t=this.value();return e.map(n=>t?this.#e(n,t):n).join(", ")}),this.computedFreeTextOption=Nt$1(()=>{let e=this.inputValue(),t=this.value(),n=t?{}:e;return t&&typeof n=="object"&&(n[t]=e),n}),this.#o=Ge$1(null),this.#t=false,this.inlineTemplate=C1(Wr),this.optionsWrapRef=w1.required("optionsWrap"),this.inputRefInput=Ge$1(null),this.#s=typeof MutationObserver<"u"?new MutationObserver(e=>{for(var t of e)t&&(t.target.nodeName==="INPUT"||t.target.nodeName==="TEXTAREA")&&(this.inputRefInput.set(new eo(t.target)),this.#s.disconnect());}):void 0,this.inputValue=Ge$1(""),this.prevInputValue=Ge$1(null),this.focusedOptionIndex=Ge$1(-1),this._isClearable=Nt$1(()=>this.selectMultiple()||this.isClearable()),this.selectClasses=Nt$1(()=>this.#i.nativeElement.classList.toString()),this.stretch=Nt$1(()=>this.selectClasses().includes("stretch")),this.small=Nt$1(()=>this.selectClasses().includes("small")),this.placeholderText=Nt$1(()=>{let e=this.placeholder(),t=this.inputRefEl();return e||t?.placeholder||null}),this.selectedOptionValues=Nt$1(()=>{let e=this.selectedOptions(),t=this.value();return t?e.map(n=>this.#e(n,t)):e}),this.filteredOptions=Nt$1(()=>{let e=this.options()||[],t=this.label(),n=this.value(),o=this.inlineSearch(),s=this.inputValue().toLowerCase(),c=this.#d(s);if(e.length<=0)return [];if(!o||s==="")return e;let _=e.filter(p=>{let h=t?(this.#e(p,t)??"").toString().toLowerCase():(p??"").toString().toLowerCase(),b=((n?this.#e(p,n):p)??"").toString().toLowerCase(),y=c.test(h),j=c.test(b);return y||j}).map(p=>{let h=t?(this.#e(p,t)??"").toString().toLowerCase():(p??"").toString().toLowerCase(),b=((n?this.#e(p,n):p)??"").toString().toLowerCase(),y=this.#l(h,s),j=this.#l(b,s);return {item:p,score:Math.max(y,j)}});return _.sort((p,h)=>h.score-p.score),_.map(p=>p.item)}),this.componentId=le(),this.inputRefEl=Nt$1(()=>{let e=this.inputRefInput();if(e===null)return;let t=e?e.nativeElement:null;return t?(t.autocomplete="off",t.setAttribute("role","combobox"),t.setAttribute("id",`combobox-${this.componentId}`),t.setAttribute("aria-haspopup","listbox"),t.setAttribute("aria-owns",`optionsWrapId-${this.componentId}`),t.setAttribute("aria-controls",`optionsWrapId-${this.componentId}`),this.#p(t),t.addEventListener("focus",()=>{this.readonly()||this.open();}),t.addEventListener("input",n=>{let o=n.target.value,s=this.inputValue();o!==s&&(this.focusedOptionIndex.set(this.asFreeText()?-1:0),this.inputValue.set(o),this.updateInputElValue());}),t.addEventListener("inputValueChanged",n=>{let o=n.detail.value,s=this.inputValue(),c=me(()=>this.selectedOptions().length);o===s&&(o!==""||c>0)||(this.setSelectedOptionsFromValue(o),this.setInputValueFromOptions(this.selectedOptions()),this.#a());}),t):(console.warn("<sh-select> input element not found are you missing to pass an <input> or <textarea> element to select component?"),null)}),this.focusEffect=za(()=>{let e=this.inputRefEl();if(!e)return;let t=this.focusedOptionIndex();t>=0||t===-1&&this.asFreeText()?e.setAttribute("aria-activedescendant",this.getOptionId(t)):e.removeAttribute("aria-activedescendant");}),this.openAbortController=null,this.isOpenEffect=za(()=>{if(this.isOpen()){this.openAbortController||(this.openAbortController=new AbortController);let t=this.inputRefEl(),o=this.asFreeText()?-1:0;if(!t)return;t.setAttribute("aria-expanded",this.isOpen().toString()),t.addEventListener("keydown",s=>{if((this.#n.matches(s,"select.close")||s.key==="Tab")&&(s.preventDefault(),this.close()),this.#n.matches(s,"select.select")&&(!(s.key===" "||s.key==="Spacebar")||!this.hasSearch())&&(s.preventDefault(),this.isLoading()?this.#t=true:this.toggleOptionByIndex(this.focusedOptionIndex(),void 0,true)),this.#n.matches(s,"select.next")){s.preventDefault();let c=this.focusedOptionIndex()+1;this.focusedOptionIndex.set(c>this.filteredOptions().length-1?o:c);}else if(this.#n.matches(s,"select.prev")){s.preventDefault();let c=this.focusedOptionIndex()-1;this.focusedOptionIndex.set(c<o?this.filteredOptions().length-1:c);}},{signal:this.openAbortController?.signal});}else {let t=this.inputRefEl();if(!t)return;t.setAttribute("aria-expanded",this.isOpen().toString()),this.openAbortController&&(this.openAbortController.abort(),this.openAbortController=null);}}),this.#r=za(()=>{let e=this.isLoading(),t=this.filteredOptions();me(()=>{!e&&this.#t&&(this.#t=false,t.length>0&&this.toggleOptionByIndex(0,void 0,true));});}),this._inputValue="",this.inputValueEffect=za(()=>{let e=this.inputValue();this._inputValue=e;}),this.inputRefElEffect=za(()=>{let e=this.inputRefEl();if(!e)return;let t=me(()=>this.selectedOptions().length);e.value===this._inputValue&&(e.value!==""||t>0)||(this.disabled.set(e.disabled),me(()=>{this.setSelectedOptionsFromValue(e.value),this.setInputValueFromOptions(this.selectedOptions());}));}),this.inputReadonlyEffect=za(()=>{let e=this.inputRefEl();if(!e)return;this.readonly()||!this.hasSearch()?e.setAttribute("readonly","true"):e.removeAttribute("readonly");}),this.selectedLabels=Nt$1(()=>{let e=this.selectedOptions();return this.label()?e.map(n=>this.getLabel(n)).join(", "):e.join(", ")}),this.inputState=Nt$1(()=>(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=Nt$1(()=>this.inlineSearch()||this.lazySearch()),this.#c=za(()=>{if(this.selectMultiple()&&this.hasSearch())return;let e=this.selectedOptions(),t=this.value(),n=e.map(o=>t?this.#e(o,t):o).join(",");this.inputValue.set(n);});}#i;#n;#o;#t;#s;#l(e,t){if(!t)return 0;let n=0,o=-1,s=0,c=true;for(let C=0;C<t.length;C++){let _=t[C];if(e.length>o+1&&e[o+1]===_)n+=C===0?100:150,o++,s++;else {let p=e.indexOf(_,o+1);if(C>0&&(c=false),p===-1)return 0;n+=100,o=p,s++;}}return c&&t.length===s&&(n+=1e3),n+=s*20,n}#r;#c;ngOnInit(){this.setInitInput();}setInitInput(){let e=this.#i.nativeElement.querySelector("input");if(e){this.inputRefInput.set(new eo(e));return}let t=this.#i.nativeElement.querySelector("textarea");if(t){this.inputRefInput.set(new eo(t));return}typeof MutationObserver<"u"&&this.#s.observe(this.#i.nativeElement,{attributes:true,childList:true,subtree:true,characterData:true});}setSelectedOptionsFromValue(e){let t=this.options()||[],n=this.value(),o=this.selectMultiple(),s=e.toString().split(",");if(s.length===0){this.selectedOptions.set([]);return}let c=o?s:[s[0]],C=t.filter(p=>{let h=n?this.#e(p,n)?.toString():p?.toString();return h!=null&&c.includes(h)}),_=C.length>0;this.selectedOptions.set(o?C:_?[C[0]]:[]);}setInputValueFromOptions(e){let t=this.value();if(e.length===0){this.inputValue.set(""),this.updateInputElValue();return}let n=e.map(o=>t?this.#e(o,t):o).join(",");n!==this.inputValue()&&(this.inputValue.set(n),this.updateInputElValue());}getValue(e){let t=this.value();return t?this.#e(e,t):e}getLabel(e){let t=this.label();return t?this.#e(e,t):e}getOptionId(e){return `opt-${this.componentId}-${e}`}toggleOptionByIndex(e,t,n=false){let o=this.filteredOptions()[e];if(this.asFreeText()&&e===-1){let h=this.computedFreeTextOption(),b=this.getValue(h);if(!(this.validateFreeText()??(z=>true))(b))return;this.options.update(z=>z.findIndex(ye=>this.getValue(ye)===b)>-1?z:(this.onAddNewFreeTextOption.emit(b),[h,...z])),e=0,o=h;}else if(!o){this.close();return}t&&t.stopPropagation();let s=this.selectMultiple(),c=this._isClearable(),C=this.value(),_=this.selectedOptionValues(),p=C?this.#e(o,C):o;this.prevInputValue.set(null),this.#o.set(null),this.selectedOptions.update(h=>{let b=_.indexOf(p);if(b>-1){let y=[...h.slice(0,b),...h.slice(b+1)];return c||y.length>0?y:h}else return this.focusedOptionIndex.set(e),s?[...h,o]:[o]}),s?this.inputRefEl()?.focus():this.isOpen.set(false),this.setInputValueFromOptions(this.selectedOptions()),s&&this.hasSearch()&&(this.inputValue.set(""),this.updateInputElValue());}removeSelectedOptionByIndex(e,t){e.stopPropagation(),this.selectedOptions.update(n=>[...n.slice(0,t),...n.slice(t+1)]),this.setInputValueFromOptions(this.selectedOptions());}isSelected(e){let t=this.value(),n=this.filteredOptions()[e],o=t?this.#e(n,t):n;return this.selectedOptionValues().indexOf(o)>-1}open(){this.isOpen()||(this.#t=false,this.isOpen.set(true),this.hasSearch()?(this.prevInputValue.set(this.inputValue()??""),this.inputValue.set(""),this.updateInputElValue()):this.#o.set(this.selectedOptions()),this.selectMultiple()||this.#a());}#a(){let e=this.selectedOptionValues()[0],t=this.value();if(e){let n=this.filteredOptions().findIndex(o=>t?this.#e(o,t)===e:o===e);this.focusedOptionIndex.set(n);}else this.focusedOptionIndex.set(-1);}close(){this.#t=false,this.isOpen.set(false);let e=this.prevInputValue(),t=this.#o();if(this.asFreeText()&&!this.selectMultiple()){this.updateInputElValue();return}this.hasSearch()&&e&&(this.inputValue.set(e),this.setInputValueFromOptions(this.selectedOptions())),!this.hasSearch()&&t!==null&&this.setInputValueFromOptions(t),this.selectMultiple()&&this.setInputValueFromOptions(this.selectedOptions());}clear(e){e?.stopPropagation(),this.#t=false,this.inputValue.set(""),this.selectedOptions.set([]),this.isOpen.set(false),this.prevInputValue.set(null),this.cleared.emit(),this.updateInputElValue();}updateInputElValue(){let e=this.inputRefEl(),t=this.inputValue();!e||e.value===t||(e.value=t,e.dispatchEvent(new Event("input")));}#e(e,t){return t.split(".").reduce((n,o)=>n?.[o],e)}#p(e){Object.defineProperty(e,"value",{configurable:true,get(){return Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),"value").get.call(this)},set(t){Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),"value").set.call(this,t);let o=new CustomEvent("inputValueChanged",{bubbles:true,cancelable:true,detail:{value:t}});return this.dispatchEvent(o),t}});}#d(e){let t=(e??"").toLowerCase(),n="^";for(let o of t)n+=".*"+this.#u(o);return n+=".*$",new RegExp(n,"i")}#u(e){return e.replace(/[-\/\\^$+?.()|[\]{}]/g,"\\$&")}ngOnDestroy(){this.openAbortController&&(this.openAbortController.abort(),this.openAbortController=null),typeof MutationObserver<"u"&&this.#s.disconnect();}static{this.\u0275fac=function(t){return new(t||i)};}static{this.\u0275cmp=hw({type:i,selectors:[["sh-select"]],contentQueries:function(t,n,o){t&1&&Wg(o,n.inlineTemplate,Wr,5),t&2&&fC();},viewQuery:function(t,n){t&1&&qg(n.optionsWrapRef,Ve,5),t&2&&fC();},hostVars:4,hostBindings:function(t,n){t&2&&(NC(n.hostClasses()),Kg("multiple",n.selectMultiple()));},inputs:{value:[1,"value"],label:[1,"label"],asFreeText:[1,"asFreeText"],color:[1,"color"],variant:[1,"variant"],size:[1,"size"],optionTitle:[1,"optionTitle"],freeTextTitle:[1,"freeTextTitle"],freeTextPlaceholder:[1,"freeTextPlaceholder"],validateFreeText:[1,"validateFreeText"],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"],freeTextOptionTemplate:[1,"freeTextOptionTemplate"],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",onAddNewFreeTextOption:"onAddNewFreeTextOption"},ngContentSelectors:we,decls:33,vars:29,consts:[["formFieldWrapper",""],["optionsWrap",""],[3,"isOpenChange","closed","isOpen","disableOpenByClick","options"],["trigger","",3,"click","color","variant","size"],["ngProjectAs","input",5,["input"],1,"input"],[1,"selected-value"],["suffix",""],["suffix","",1,"primary"],["role","listbox",1,"ship-options",3,"id"],["title",""],["role","option",1,"option",3,"id","selected","focused"],[1,"small",3,"class"],[1,"small",3,"click"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[4,"ngTemplateOutlet"],["suffix","",3,"click"],["role","option",1,"option",3,"click","id"],[3,"class","checked"],[3,"checked"]],template:function(t,n){if(t&1){let o=vT();aC(Ie),dm(0)(1)(2)(3)(4)(5)(6),Qi(7,"sh-popover",2,0),lm("isOpenChange",function(c){return Od(o),UC(n.isOpen,c)||(n.isOpen=c),Pd(c)}),Hg("closed",function(){return n.close()}),Qi(9,"sh-form-field",3),Hg("click",function(){return n.open()}),cC(10,0,Me),cC(11,1,Fe),cC(12,2,Ee),Qi(13,"div",4)(14,"div",5),aT(15,De,1,1)(16,qe,2,0)(17,Xe,2,1),cC(18,3),cC(19,4),$l()(),aT(20,Ge,2,0,"sh-icon",6)(21,Je,1,0,"sh-spinner",7)(22,Ye,2,0,"sh-icon",6)(23,Ze,2,0,"sh-icon",6)(24,et,2,0,"sh-icon",6)(25,tt,2,0,"sh-icon",6)(26,it,2,0,"sh-icon",6),$l(),Qi(27,"div",8,1),aT(29,dt,3,3),aT(30,ut,2,1,"p",9),dT(31,xt,4,8,"li",10,lT),$l()();}if(t&2){WC(n.placeholderTemplate());let o=n.optionTemplate();CE(),WC(n.freeTextOptionTemplate());let s=n.selectedOptionTemplate(),c=n.inlineTemplate();CE();let C=WC(n.selectedOptions()),_=n.inputState();CE(),WC(s||o||c),CE(),WC(o||c),CE(),WC(!n.asText()&&n.selectMultiple()),CE();let p=WC(n.isOpen()&&n.hasSearch());CE(),cm("isOpen",n.isOpen),vg("disableOpenByClick",true)("options",KC(28,Le)),CE(2),Kg("stretch",n.stretch())("small",n.small())("readonly",n.readonly()||n.disabled()),vg("color",n.color())("variant",n.variant())("size",n.size()),CE(4),Kg("show-search-text",p),CE(),Kg("is-selected",_==="selected"),CE(),cT(n.asFreeText()&&n.inputValue().length>0&&!n.isOpen()?15:C.length>0?16:p?-1:17),CE(5),cT(_==="closed"?20:_==="loading"?21:_==="open-searching"?22:_==="searching"?23:_==="selected"&&n._isClearable()?24:_==="selected"&&!n._isClearable()?25:26),CE(7),vg("id","optionsWrapId-"+n.componentId),CE(2),cT(n.asFreeText()?29:-1),CE(),cT(n.optionTitle()&&n.filteredOptions().length>0?30:-1),CE(),fT(n.filteredOptions());}},dependencies:[ei,oe,Fe$1,N$1,U,m,D,c],styles:[`sh-select{--miw: 13.125rem;--select-option-mih: min-content;--select-options-mh: 11.25rem;display:flex}sh-select sh-form-field{display:flex;--ff-mw: var(--miw)}sh-select sh-popover{flex:1 0}sh-select sh-popover:has(.ship-options:empty) .popover{opacity:0}sh-select .selected-value{width:100%;display:flex;flex-wrap:wrap;align-items:center;gap:.25rem;color:var(--base-8)}sh-select .selected-value input{margin:0}sh-select .selected-value.is-selected{color:var(--base-12)}sh-select sh-form-field .input-wrap .input{position:relative;display:flex;flex-wrap:wrap;--ff-space: .4375rem .625rem}sh-select sh-form-field .input-wrap .input textarea,sh-select sh-form-field .input-wrap .input input{opacity:0;width:0;height:0;position:absolute}sh-select sh-form-field .input-wrap .input.show-search-text input{opacity:1;height:initial;min-width:min-content;field-sizing:content;font:var(--paragraph-30);position:relative}sh-select sh-form-field .input-wrap .input.show-search-text textarea{opacity:1;height:initial;margin:.25rem 0 0}sh-select sh-form-field.small .input-wrap .input{--ff-space: .3125rem .5rem}sh-select sh-form-field.small .input-wrap .input sh-chip{--chip-h: 1.25rem;font-size:80%}.ship-options{padding:.5rem 0;display:flex;flex-direction:column;max-height:var(--select-options-mh);overflow-y:auto;overflow-x:hidden}.ship-options p[title]{padding:.25rem 1rem}.ship-options sh-divider{margin:.5rem 0}.ship-options .option{display:flex;justify-content:flex-start;align-items:center;min-height:var(--select-option-mih);margin:0 .5rem;padding:.5rem;gap:.5rem;width:calc(100% - 1rem);border-radius:var(--shape-2);appearance:none;background-color:transparent;border:0;cursor:pointer;color:var(--base-12);-webkit-user-select:none;user-select:none}.ship-options .option[disabled]{opacity:.3;cursor:initial}.ship-options .option[disabled]:hover{background-color:transparent}.ship-options .option sh-icon{font-size:1rem}.ship-options .option span.placeholder{color:var(--base-7)}.ship-options .option.active,.ship-options .option:checked,.ship-options .option:hover{background-color:var(--base-2);color:var(--base-12)}.ship-options .option.focused{background-color:var(--primary-1);color:var(--base-12)}.ship-options .option.focused:hover{background-color:var(--primary-2)}
1
+ import {c}from'./chunk-3YzyUT-a.js';import {E as E1,bd as ce,g as gw,x as xC,T,af as eo,bn as N,ag as D1,ac as I1,N as Nt$1,G as Ge$1,ca as C1,bR as Wr,B as w1,bo as le,m as me,Q as Qa,bS as ei,a as N$1,i as ET,S as lC,al as dm,Z as Zi,n as lm,P as Pd,p as qC,L as Ld,w as Hg,Y as uC,l as lT,W as Wl,a1 as pT,am as GC,b as bE,y as cm,z as vg,a3 as XC,K as Kg,c as uT,a2 as hT,O as qg,R as hC,cb as Wg,aq as dT,H as HC,h as aC,aa as Yl,ap as zC,d as Ig,J as im,aE as yg,b4 as cg,b0 as eb,bT as wg,aH as tb}from'./main-2ZYVV4C4.js';import {D}from'./chunk-CKUlUN3q.js';import {o as oe,F as Fe$1}from'./chunk-DBkkb6OR.js';import {U}from'./chunk-CnZx831x.js';var m=(()=>{class n{constructor(){this.color=E1(null),this.hostClasses=ce("spinner",{color:this.color});}static{this.\u0275fac=function(e){return new(e||n)};}static{this.\u0275cmp=gw({type:n,selectors:[["sh-spinner"]],hostAttrs:["role","status","aria-busy","true"],hostVars:2,hostBindings:function(e,s){e&2&&xC(s.hostClasses());},inputs:{color:[1,"color"]},decls:0,vars:0,template:function(e,s){},styles:[`sh-spinner{--spinner-c: var(--base-8);--spinner-size: 2.5rem;--spinner-thickness: .3125rem;width:var(--spinner-size);height:var(--spinner-size);display:grid;place-content:center;color:var(--spinner-c);position:relative}sh-spinner:before{content:"";width:var(--spinner-size);height:var(--spinner-size);border:var(--spinner-thickness) solid currentColor;border-bottom-color:transparent;border-radius:50%;display:flex;box-sizing:border-box;animation:rotation 1s linear infinite;margin:auto;inset:0;position:absolute}sh-spinner.primary{--spinner-c: var(--primary-8)}sh-spinner.accent{--spinner-c: var(--accent-8)}sh-spinner.warn{--spinner-c: var(--warn-8)}sh-spinner.error{--spinner-c: var(--error-8)}sh-spinner.success{--spinner-c: var(--success-8)}
2
+ `],encapsulation:2});}}return n})();var Ve=["optionsWrap"],Ie=[[["label"]],[["","prefix",""]],[["","boxPrefix",""]],[["input"]],[["textarea"]]],we=["label","[prefix]","[boxPrefix]","input","textarea"],Me=["ngProjectAs","label",5,["label"]],Fe=["ngProjectAs","[prefix]",5,["","prefix",""]],Ee=["ngProjectAs","[boxPrefix]",5,["","boxPrefix",""]],Le=()=>({closeOnButton:false,closeOnEsc:false}),Te=(i,l)=>({$implicit:i,last:l}),ie=i=>({$implicit:i});function De(i,l){if(i&1&&HC(0),i&2){let e=aC();Yl(" ",e.spacedSelectedOptions()," ");}}function Ne(i,l){i&1&&wg(0);}function Ae(i,l){if(i&1&&cg(0,Ne,1,0,"ng-container",13),i&2){let e=aC(3),t=e.$implicit,n=e.$index,o=e.$count;aC(2);let s=zC(3);vg("ngTemplateOutlet",s)("ngTemplateOutletContext",tb(2,Te,t,n===o-1));}}function ke(i,l){if(i&1&&HC(0),i&2){let e=aC(3).$implicit,t=aC(2);Yl(" ",t.getLabel(e)," ");}}function $e(i,l){if(i&1){let e=ET();Zi(0,"sh-chip",12),Hg("click",function(n){Pd(e);let o=aC(2).$index,s=aC(2);return Ld(s.removeSelectedOptionByIndex(n,o))}),lT(1,Ae,1,5,"ng-container")(2,ke,1,1),Zi(3,"sh-icon"),HC(4,"x-bold"),Wl()();}if(i&2){let e=aC(4),t=zC(3);xC(e.selectClasses()),bE(),uT(t?1:2);}}function Re(i,l){i&1&&wg(0);}function Pe(i,l){if(i&1&&cg(0,Re,1,0,"ng-container",13),i&2){let e=aC(4),t=e.$implicit,n=e.$index,o=e.$count;aC(2);let s=zC(3);vg("ngTemplateOutlet",s)("ngTemplateOutletContext",tb(2,Te,t,n===o-1));}}function je(i,l){if(i&1&&HC(0),i&2){let e=aC(4),t=e.$implicit,n=e.$index,o=e.$count,s=aC(2);Yl(" ",n===o-1?s.getLabel(t):s.getLabel(t)+","," ");}}function ze(i,l){if(i&1&&lT(0,Pe,1,5,"ng-container")(1,je,1,1),i&2){aC(5);let e=zC(3);uT(e?0:1);}}function Be(i,l){if(i&1&&lT(0,ze,2,1),i&2){aC(4);let e=zC(6);uT(e?-1:0);}}function Ke(i,l){if(i&1&&lT(0,$e,5,3,"sh-chip",11)(1,Be,1,1),i&2){aC(3);let e=zC(5);uT(e?0:1);}}function We(i,l){if(i&1&&lT(0,Ke,2,1),i&2){let e=l.$implicit;uT(e?0:-1);}}function qe(i,l){if(i&1&&pT(0,We,1,1,null,null,dT),i&2){aC();let e=zC(2);hT(e);}}function Qe(i,l){i&1&&wg(0);}function Ue(i,l){if(i&1&&cg(0,Qe,1,0,"ng-container",14),i&2){aC(2);let e=zC(0);vg("ngTemplateOutlet",e);}}function He(i,l){if(i&1&&HC(0),i&2){let e=aC(2);Yl(" ",e.placeholderText()??""," ");}}function Xe(i,l){if(i&1&&lT(0,Ue,1,1,"ng-container")(1,He,1,1),i&2){aC();let e=zC(0);uT(e?0:1);}}function Ge(i,l){i&1&&(Zi(0,"sh-icon",6),HC(1,"caret-down"),Wl());}function Je(i,l){i&1&&Ig(0,"sh-spinner",7);}function Ye(i,l){i&1&&(Zi(0,"sh-icon",6),HC(1,"list-magnifying-glass"),Wl());}function Ze(i,l){i&1&&(Zi(0,"sh-icon",6),HC(1,"magnifying-glass"),Wl());}function et(i,l){if(i&1){let e=ET();Zi(0,"sh-icon",15),Hg("click",function(n){Pd(e);let o=aC();return Ld(o.clear(n))}),HC(1,"x-bold"),Wl();}}function tt(i,l){i&1&&(Zi(0,"sh-icon",6),HC(1,"caret-down"),Wl());}function it(i,l){i&1&&(Zi(0,"sh-icon",6),HC(1,"caret-up"),Wl());}function nt(i,l){if(i&1&&(Zi(0,"p",9),HC(1),Wl()),i&2){let e=aC(3);bE(),im(e.freeTextTitle());}}function ot(i,l){i&1&&wg(0);}function st(i,l){if(i&1&&cg(0,ot,1,0,"ng-container",13),i&2){aC(2);let e=zC(0);aC();let t=zC(1);vg("ngTemplateOutlet",t)("ngTemplateOutletContext",eb(2,ie,e));}}function lt(i,l){i&1&&wg(0);}function at(i,l){if(i&1&&cg(0,lt,1,0,"ng-container",13),i&2){aC(2);let e=zC(0);aC();let t=zC(4);vg("ngTemplateOutlet",t)("ngTemplateOutletContext",eb(2,ie,e));}}function rt(i,l){if(i&1&&HC(0),i&2){aC(2);let e=zC(1);Yl(" ",e," ");}}function ct(i,l){i&1&&Ig(0,"sh-divider");}function pt(i,l){if(i&1){let e=ET();lT(0,nt,2,1,"p",9),Zi(1,"li",16),Hg("click",function(){Pd(e);let n=aC(2);return Ld(n.toggleOptionByIndex(-1))}),lT(2,st,1,4,"ng-container")(3,at,1,4,"ng-container")(4,rt,1,1),Wl(),lT(5,ct,1,0,"sh-divider");}if(i&2){let e=aC(2),t=zC(1),n=zC(4);uT(e.freeTextTitle()?0:-1),bE(),Kg("selected",e.isSelected(-1))("focused",e.focusedOptionIndex()===-1),vg("id",e.getOptionId(-1)),yg("aria-selected",e.isSelected(-1)),bE(),uT(t?2:n?3:4),bE(3),uT(e.freeTextTitle()&&e.filteredOptions().length>0?5:-1);}}function dt(i,l){if(i&1&&(dm(0)(1),lT(2,pt,6,9)),i&2){let e=aC(),t=GC(e.computedFreeTextOption());bE();let n=GC(e.getValue(t));bE(),uT(n.length>0?2:-1);}}function ut(i,l){if(i&1&&(Zi(0,"p",9),HC(1),Wl()),i&2){let e=aC();bE(),im(e.optionTitle());}}function ht(i,l){if(i&1&&Ig(0,"sh-checkbox",18),i&2){let e=aC().$index,t=aC();xC(t.selectClasses()),vg("checked",t.isSelected(e));}}function _t(i,l){i&1&&wg(0);}function ft(i,l){if(i&1&&cg(0,_t,1,0,"ng-container",13),i&2){let e=aC().$implicit;aC();let t=zC(4);vg("ngTemplateOutlet",t)("ngTemplateOutletContext",eb(2,ie,e));}}function mt(i,l){if(i&1&&HC(0),i&2){let e=aC().$implicit,t=aC();Yl(" ",t.getLabel(e)," ");}}function xt(i,l){if(i&1){let e=ET();Zi(0,"li",16),Hg("click",function(){let n=Pd(e).$index,o=aC();return Ld(o.toggleOptionByIndex(n))}),lT(1,ht,1,3,"sh-checkbox",17),lT(2,ft,1,4,"ng-container")(3,mt,1,1),Wl();}if(i&2){let e=l.$index,t=aC(),n=zC(4);Kg("selected",t.isSelected(e))("focused",e===t.focusedOptionIndex()),vg("id",t.getOptionId(e)),yg("aria-selected",t.isSelected(e)),bE(),uT(t.selectMultiple()?1:-1),bE(),uT(n?2:3);}}var Nt=(()=>{class i{constructor(){this.#i=T(eo),this.#n=T(N),this.value=E1(),this.label=E1(),this.asFreeText=E1(false),this.color=E1(null),this.variant=E1(null),this.size=E1(null),this.optionTitle=E1(null),this.freeTextTitle=E1(null),this.freeTextPlaceholder=E1("Type to create a new option"),this.validateFreeText=E1(),this.placeholder=E1(),this.readonly=D1(false),this.disabled=D1(false),this.hostClasses=ce("select",{color:this.color,variant:this.variant,size:this.size,readonly:this.readonly}),this.lazySearch=E1(false),this.inlineSearch=E1(false),this.asText=E1(false),this.isClearable=E1(true),this.selectMultiple=E1(false),this.optionTemplate=E1(null),this.selectedOptionTemplate=E1(null),this.placeholderTemplate=E1(null),this.freeTextOptionTemplate=E1(null),this.isOpen=D1(false),this.isLoading=D1(false),this.options=D1([]),this.selectedOptions=D1([]),this.cleared=I1(),this.onAddNewFreeTextOption=I1(),this.spacedSelectedOptions=Nt$1(()=>{let e=this.selectedOptions(),t=this.value();return e.map(n=>t?this.#e(n,t):n).join(", ")}),this.computedFreeTextOption=Nt$1(()=>{let e=this.inputValue(),t=this.value(),n=t?{}:e;return t&&typeof n=="object"&&(n[t]=e),n}),this.#o=Ge$1(null),this.#t=false,this.inlineTemplate=C1(Wr),this.optionsWrapRef=w1.required("optionsWrap"),this.inputRefInput=Ge$1(null),this.#s=typeof MutationObserver<"u"?new MutationObserver(e=>{for(var t of e)t&&(t.target.nodeName==="INPUT"||t.target.nodeName==="TEXTAREA")&&(this.inputRefInput.set(new eo(t.target)),this.#s.disconnect());}):void 0,this.inputValue=Ge$1(""),this.prevInputValue=Ge$1(null),this.focusedOptionIndex=Ge$1(-1),this._isClearable=Nt$1(()=>this.selectMultiple()||this.isClearable()),this.selectClasses=Nt$1(()=>this.#i.nativeElement.classList.toString()),this.stretch=Nt$1(()=>this.selectClasses().includes("stretch")),this.small=Nt$1(()=>this.selectClasses().includes("small")),this.placeholderText=Nt$1(()=>{let e=this.placeholder(),t=this.inputRefEl();return e||t?.placeholder||null}),this.selectedOptionValues=Nt$1(()=>{let e=this.selectedOptions(),t=this.value();return t?e.map(n=>this.#e(n,t)):e}),this.filteredOptions=Nt$1(()=>{let e=this.options()||[],t=this.label(),n=this.value(),o=this.inlineSearch(),s=this.inputValue().toLowerCase(),c=this.#d(s);if(e.length<=0)return [];if(!o||s==="")return e;let _=e.filter(p=>{let h=t?(this.#e(p,t)??"").toString().toLowerCase():(p??"").toString().toLowerCase(),b=((n?this.#e(p,n):p)??"").toString().toLowerCase(),y=c.test(h),j=c.test(b);return y||j}).map(p=>{let h=t?(this.#e(p,t)??"").toString().toLowerCase():(p??"").toString().toLowerCase(),b=((n?this.#e(p,n):p)??"").toString().toLowerCase(),y=this.#l(h,s),j=this.#l(b,s);return {item:p,score:Math.max(y,j)}});return _.sort((p,h)=>h.score-p.score),_.map(p=>p.item)}),this.componentId=le(),this.inputRefEl=Nt$1(()=>{let e=this.inputRefInput();if(e===null)return;let t=e?e.nativeElement:null;return t?(t.autocomplete="off",t.setAttribute("role","combobox"),t.setAttribute("id",`combobox-${this.componentId}`),t.setAttribute("aria-haspopup","listbox"),t.setAttribute("aria-owns",`optionsWrapId-${this.componentId}`),t.setAttribute("aria-controls",`optionsWrapId-${this.componentId}`),this.#p(t),t.addEventListener("focus",()=>{this.readonly()||this.open();}),t.addEventListener("input",n=>{let o=n.target.value,s=this.inputValue();o!==s&&(this.focusedOptionIndex.set(this.asFreeText()?-1:0),this.inputValue.set(o),this.updateInputElValue());}),t.addEventListener("inputValueChanged",n=>{let o=n.detail.value,s=this.inputValue(),c=me(()=>this.selectedOptions().length);o===s&&(o!==""||c>0)||(this.setSelectedOptionsFromValue(o),this.setInputValueFromOptions(this.selectedOptions()),this.#a());}),t):(console.warn("<sh-select> input element not found are you missing to pass an <input> or <textarea> element to select component?"),null)}),this.focusEffect=Qa(()=>{let e=this.inputRefEl();if(!e)return;let t=this.focusedOptionIndex();t>=0||t===-1&&this.asFreeText()?e.setAttribute("aria-activedescendant",this.getOptionId(t)):e.removeAttribute("aria-activedescendant");}),this.openAbortController=null,this.isOpenEffect=Qa(()=>{if(this.isOpen()){this.openAbortController||(this.openAbortController=new AbortController);let t=this.inputRefEl(),o=this.asFreeText()?-1:0;if(!t)return;t.setAttribute("aria-expanded",this.isOpen().toString()),t.addEventListener("keydown",s=>{if((this.#n.matches(s,"select.close")||s.key==="Tab")&&(s.preventDefault(),this.close()),this.#n.matches(s,"select.select")&&(!(s.key===" "||s.key==="Spacebar")||!this.hasSearch())&&(s.preventDefault(),this.isLoading()?this.#t=true:this.toggleOptionByIndex(this.focusedOptionIndex(),void 0,true)),this.#n.matches(s,"select.next")){s.preventDefault();let c=this.focusedOptionIndex()+1;this.focusedOptionIndex.set(c>this.filteredOptions().length-1?o:c);}else if(this.#n.matches(s,"select.prev")){s.preventDefault();let c=this.focusedOptionIndex()-1;this.focusedOptionIndex.set(c<o?this.filteredOptions().length-1:c);}},{signal:this.openAbortController?.signal});}else {let t=this.inputRefEl();if(!t)return;t.setAttribute("aria-expanded",this.isOpen().toString()),this.openAbortController&&(this.openAbortController.abort(),this.openAbortController=null);}}),this.#r=Qa(()=>{let e=this.isLoading(),t=this.filteredOptions();me(()=>{!e&&this.#t&&(this.#t=false,t.length>0&&this.toggleOptionByIndex(0,void 0,true));});}),this._inputValue="",this.inputValueEffect=Qa(()=>{let e=this.inputValue();this._inputValue=e;}),this.inputRefElEffect=Qa(()=>{let e=this.inputRefEl();if(!e)return;let t=me(()=>this.selectedOptions().length);e.value===this._inputValue&&(e.value!==""||t>0)||(this.disabled.set(e.disabled),me(()=>{this.setSelectedOptionsFromValue(e.value),this.setInputValueFromOptions(this.selectedOptions());}));}),this.inputReadonlyEffect=Qa(()=>{let e=this.inputRefEl();if(!e)return;this.readonly()||!this.hasSearch()?e.setAttribute("readonly","true"):e.removeAttribute("readonly");}),this.selectedLabels=Nt$1(()=>{let e=this.selectedOptions();return this.label()?e.map(n=>this.getLabel(n)).join(", "):e.join(", ")}),this.inputState=Nt$1(()=>(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=Nt$1(()=>this.inlineSearch()||this.lazySearch()),this.#c=Qa(()=>{if(this.selectMultiple()&&this.hasSearch())return;let e=this.selectedOptions(),t=this.value(),n=e.map(o=>t?this.#e(o,t):o).join(",");this.inputValue.set(n);});}#i;#n;#o;#t;#s;#l(e,t){if(!t)return 0;let n=0,o=-1,s=0,c=true;for(let C=0;C<t.length;C++){let _=t[C];if(e.length>o+1&&e[o+1]===_)n+=C===0?100:150,o++,s++;else {let p=e.indexOf(_,o+1);if(C>0&&(c=false),p===-1)return 0;n+=100,o=p,s++;}}return c&&t.length===s&&(n+=1e3),n+=s*20,n}#r;#c;ngOnInit(){this.setInitInput();}setInitInput(){let e=this.#i.nativeElement.querySelector("input");if(e){this.inputRefInput.set(new eo(e));return}let t=this.#i.nativeElement.querySelector("textarea");if(t){this.inputRefInput.set(new eo(t));return}typeof MutationObserver<"u"&&this.#s.observe(this.#i.nativeElement,{attributes:true,childList:true,subtree:true,characterData:true});}setSelectedOptionsFromValue(e){let t=this.options()||[],n=this.value(),o=this.selectMultiple(),s=e.toString().split(",");if(s.length===0){this.selectedOptions.set([]);return}let c=o?s:[s[0]],C=t.filter(p=>{let h=n?this.#e(p,n)?.toString():p?.toString();return h!=null&&c.includes(h)}),_=C.length>0;this.selectedOptions.set(o?C:_?[C[0]]:[]);}setInputValueFromOptions(e){let t=this.value();if(e.length===0){this.inputValue.set(""),this.updateInputElValue();return}let n=e.map(o=>t?this.#e(o,t):o).join(",");n!==this.inputValue()&&(this.inputValue.set(n),this.updateInputElValue());}getValue(e){let t=this.value();return t?this.#e(e,t):e}getLabel(e){let t=this.label();return t?this.#e(e,t):e}getOptionId(e){return `opt-${this.componentId}-${e}`}toggleOptionByIndex(e,t,n=false){let o=this.filteredOptions()[e];if(this.asFreeText()&&e===-1){let h=this.computedFreeTextOption(),b=this.getValue(h);if(!(this.validateFreeText()??(z=>true))(b))return;this.options.update(z=>z.findIndex(ye=>this.getValue(ye)===b)>-1?z:(this.onAddNewFreeTextOption.emit(b),[h,...z])),e=0,o=h;}else if(!o){this.close();return}t&&t.stopPropagation();let s=this.selectMultiple(),c=this._isClearable(),C=this.value(),_=this.selectedOptionValues(),p=C?this.#e(o,C):o;this.prevInputValue.set(null),this.#o.set(null),this.selectedOptions.update(h=>{let b=_.indexOf(p);if(b>-1){let y=[...h.slice(0,b),...h.slice(b+1)];return c||y.length>0?y:h}else return this.focusedOptionIndex.set(e),s?[...h,o]:[o]}),s?this.inputRefEl()?.focus():this.isOpen.set(false),this.setInputValueFromOptions(this.selectedOptions()),s&&this.hasSearch()&&(this.inputValue.set(""),this.updateInputElValue());}removeSelectedOptionByIndex(e,t){e.stopPropagation(),this.selectedOptions.update(n=>[...n.slice(0,t),...n.slice(t+1)]),this.setInputValueFromOptions(this.selectedOptions());}isSelected(e){let t=this.value(),n=this.filteredOptions()[e],o=t?this.#e(n,t):n;return this.selectedOptionValues().indexOf(o)>-1}open(){this.isOpen()||(this.#t=false,this.isOpen.set(true),this.hasSearch()?(this.prevInputValue.set(this.inputValue()??""),this.inputValue.set(""),this.updateInputElValue()):this.#o.set(this.selectedOptions()),this.selectMultiple()||this.#a());}#a(){let e=this.selectedOptionValues()[0],t=this.value();if(e){let n=this.filteredOptions().findIndex(o=>t?this.#e(o,t)===e:o===e);this.focusedOptionIndex.set(n);}else this.focusedOptionIndex.set(-1);}close(){this.#t=false,this.isOpen.set(false);let e=this.prevInputValue(),t=this.#o();if(this.asFreeText()&&!this.selectMultiple()){this.updateInputElValue();return}this.hasSearch()&&e&&(this.inputValue.set(e),this.setInputValueFromOptions(this.selectedOptions())),!this.hasSearch()&&t!==null&&this.setInputValueFromOptions(t),this.selectMultiple()&&this.setInputValueFromOptions(this.selectedOptions());}clear(e){e?.stopPropagation(),this.#t=false,this.inputValue.set(""),this.selectedOptions.set([]),this.isOpen.set(false),this.prevInputValue.set(null),this.cleared.emit(),this.updateInputElValue();}updateInputElValue(){let e=this.inputRefEl(),t=this.inputValue();!e||e.value===t||(e.value=t,e.dispatchEvent(new Event("input")));}#e(e,t){return t.split(".").reduce((n,o)=>n?.[o],e)}#p(e){Object.defineProperty(e,"value",{configurable:true,get(){return Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),"value").get.call(this)},set(t){Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),"value").set.call(this,t);let o=new CustomEvent("inputValueChanged",{bubbles:true,cancelable:true,detail:{value:t}});return this.dispatchEvent(o),t}});}#d(e){let t=(e??"").toLowerCase(),n="^";for(let o of t)n+=".*"+this.#u(o);return n+=".*$",new RegExp(n,"i")}#u(e){return e.replace(/[-\/\\^$+?.()|[\]{}]/g,"\\$&")}ngOnDestroy(){this.openAbortController&&(this.openAbortController.abort(),this.openAbortController=null),typeof MutationObserver<"u"&&this.#s.disconnect();}static{this.\u0275fac=function(t){return new(t||i)};}static{this.\u0275cmp=gw({type:i,selectors:[["sh-select"]],contentQueries:function(t,n,o){t&1&&Wg(o,n.inlineTemplate,Wr,5),t&2&&hC();},viewQuery:function(t,n){t&1&&qg(n.optionsWrapRef,Ve,5),t&2&&hC();},hostVars:4,hostBindings:function(t,n){t&2&&(xC(n.hostClasses()),Kg("multiple",n.selectMultiple()));},inputs:{value:[1,"value"],label:[1,"label"],asFreeText:[1,"asFreeText"],color:[1,"color"],variant:[1,"variant"],size:[1,"size"],optionTitle:[1,"optionTitle"],freeTextTitle:[1,"freeTextTitle"],freeTextPlaceholder:[1,"freeTextPlaceholder"],validateFreeText:[1,"validateFreeText"],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"],freeTextOptionTemplate:[1,"freeTextOptionTemplate"],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",onAddNewFreeTextOption:"onAddNewFreeTextOption"},ngContentSelectors:we,decls:33,vars:29,consts:[["formFieldWrapper",""],["optionsWrap",""],[3,"isOpenChange","closed","isOpen","disableOpenByClick","options"],["trigger","",3,"click","color","variant","size"],["ngProjectAs","input",5,["input"],1,"input"],[1,"selected-value"],["suffix",""],["suffix","",1,"primary"],["role","listbox",1,"ship-options",3,"id"],["title",""],["role","option",1,"option",3,"id","selected","focused"],[1,"small",3,"class"],[1,"small",3,"click"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[4,"ngTemplateOutlet"],["suffix","",3,"click"],["role","option",1,"option",3,"click","id"],[3,"class","checked"],[3,"checked"]],template:function(t,n){if(t&1){let o=ET();lC(Ie),dm(0)(1)(2)(3)(4)(5)(6),Zi(7,"sh-popover",2,0),lm("isOpenChange",function(c){return Pd(o),qC(n.isOpen,c)||(n.isOpen=c),Ld(c)}),Hg("closed",function(){return n.close()}),Zi(9,"sh-form-field",3),Hg("click",function(){return n.open()}),uC(10,0,Me),uC(11,1,Fe),uC(12,2,Ee),Zi(13,"div",4)(14,"div",5),lT(15,De,1,1)(16,qe,2,0)(17,Xe,2,1),uC(18,3),uC(19,4),Wl()(),lT(20,Ge,2,0,"sh-icon",6)(21,Je,1,0,"sh-spinner",7)(22,Ye,2,0,"sh-icon",6)(23,Ze,2,0,"sh-icon",6)(24,et,2,0,"sh-icon",6)(25,tt,2,0,"sh-icon",6)(26,it,2,0,"sh-icon",6),Wl(),Zi(27,"div",8,1),lT(29,dt,3,3),lT(30,ut,2,1,"p",9),pT(31,xt,4,8,"li",10,dT),Wl()();}if(t&2){GC(n.placeholderTemplate());let o=n.optionTemplate();bE(),GC(n.freeTextOptionTemplate());let s=n.selectedOptionTemplate(),c=n.inlineTemplate();bE();let C=GC(n.selectedOptions()),_=n.inputState();bE(),GC(s||o||c),bE(),GC(o||c),bE(),GC(!n.asText()&&n.selectMultiple()),bE();let p=GC(n.isOpen()&&n.hasSearch());bE(),cm("isOpen",n.isOpen),vg("disableOpenByClick",true)("options",XC(28,Le)),bE(2),Kg("stretch",n.stretch())("small",n.small())("readonly",n.readonly()||n.disabled()),vg("color",n.color())("variant",n.variant())("size",n.size()),bE(4),Kg("show-search-text",p),bE(),Kg("is-selected",_==="selected"),bE(),uT(n.asFreeText()&&n.inputValue().length>0&&!n.isOpen()?15:C.length>0?16:p?-1:17),bE(5),uT(_==="closed"?20:_==="loading"?21:_==="open-searching"?22:_==="searching"?23:_==="selected"&&n._isClearable()?24:_==="selected"&&!n._isClearable()?25:26),bE(7),vg("id","optionsWrapId-"+n.componentId),bE(2),uT(n.asFreeText()?29:-1),bE(),uT(n.optionTitle()&&n.filteredOptions().length>0?30:-1),bE(),hT(n.filteredOptions());}},dependencies:[ei,oe,Fe$1,N$1,U,m,D,c],styles:[`sh-select{--miw: 13.125rem;--select-option-mih: min-content;--select-options-mh: 11.25rem;display:flex}sh-select sh-form-field{display:flex;--ff-mw: var(--miw)}sh-select sh-popover{flex:1 0}sh-select sh-popover:has(.ship-options:empty) .popover{opacity:0}sh-select .selected-value{width:100%;display:flex;flex-wrap:wrap;align-items:center;gap:.25rem;color:var(--base-8)}sh-select .selected-value input{margin:0}sh-select .selected-value.is-selected{color:var(--base-12)}sh-select sh-form-field .input-wrap .input{position:relative;display:flex;flex-wrap:wrap;--ff-space: .4375rem .625rem}sh-select sh-form-field .input-wrap .input textarea,sh-select sh-form-field .input-wrap .input input{opacity:0;width:0;height:0;position:absolute}sh-select sh-form-field .input-wrap .input.show-search-text input{opacity:1;height:initial;min-width:min-content;field-sizing:content;font:var(--paragraph-30);position:relative}sh-select sh-form-field .input-wrap .input.show-search-text textarea{opacity:1;height:initial;margin:.25rem 0 0}sh-select sh-form-field.small .input-wrap .input{--ff-space: .3125rem .5rem}sh-select sh-form-field.small .input-wrap .input sh-chip{--chip-h: 1.25rem;font-size:80%}.ship-options{padding:.5rem 0;display:flex;flex-direction:column;max-height:var(--select-options-mh);overflow-y:auto;overflow-x:hidden}.ship-options p[title]{padding:.25rem 1rem}.ship-options sh-divider{margin:.5rem 0}.ship-options .option{display:flex;justify-content:flex-start;align-items:center;min-height:var(--select-option-mih);margin:0 .5rem;padding:.5rem;gap:.5rem;width:calc(100% - 1rem);border-radius:var(--shape-2);appearance:none;background-color:transparent;border:0;cursor:pointer;color:var(--base-12);-webkit-user-select:none;user-select:none}.ship-options .option[disabled]{opacity:.3;cursor:initial}.ship-options .option[disabled]:hover{background-color:transparent}.ship-options .option sh-icon{font-size:1rem}.ship-options .option span.placeholder{color:var(--base-7)}.ship-options .option.active,.ship-options .option:checked,.ship-options .option:hover{background-color:var(--base-2);color:var(--base-12)}.ship-options .option.focused{background-color:var(--primary-1);color:var(--base-12)}.ship-options .option.focused:hover{background-color:var(--primary-2)}
3
3
  `],encapsulation:2});}}return i})();export{Nt as N,m};
@@ -0,0 +1 @@
1
+ import {ShipTable as ot}from'./chunk-DkVHfoYw.js';import'./chunk-CKUlUN3q.js';import {T,ab as J,a6 as be,a5 as m,e as ee,E as E1,N as Nt,G as Ge,Q as Qa,aj as m$1,ak as l,au as h,ad as sy,C as Zu,g as gw,v,_ as _t,aJ as m$2,b3 as m$3,Z as Zi,o as oC,W as Wl,l as lT,w as Hg,n as lm,b as bE,av as Vg,aw as iC,c as uT,z as vg,a3 as XC,K as Kg,y as cm,s as sC,p as qC,d as Ig,i as ET,P as Pd,h as aC,L as Ld,a1 as pT,a2 as hT,H as HC,aO as sb,J as im,aP as lb,aT as cb}from'./main-2ZYVV4C4.js';import {d}from'./chunk-BGuvkLC9.js';import {$ as $$1}from'./chunk-Cm7JSdTO.js';import {U}from'./chunk-CnZx831x.js';var ce=()=>["/"],Ce=(l,n)=>n.Version;function me(l,n){l&1&&(Zi(0,"div",12),Ig(1,"sh-progress-bar",20),Zi(2,"p"),oC(3,4),Wl()());}function pe(l,n){l&1&&(Zi(0,"div",13)(1,"p"),oC(2,5),Wl()());}function Te(l,n){if(l&1){let e=ET();Zi(0,"tr",29),Hg("click",function(i){let r=Pd(e).$implicit,C=aC(2);return Ld(C.toggleSelected(r.Version,i))}),Zi(1,"td")(2,"sh-checkbox",24),Hg("click",function(i){let r=Pd(e).$implicit,C=aC(2);return Ld(C.toggleSelected(r.Version,i))}),Wl()(),Zi(3,"td"),HC(4),Wl(),Zi(5,"td"),HC(6),sb(7,"relativeTime"),Wl(),Zi(8,"td"),HC(9),sb(10,"relativeTime"),Wl(),Zi(11,"td"),HC(12),sb(13,"bytes"),Wl(),Zi(14,"td"),HC(15),Wl(),Zi(16,"td"),HC(17),Wl()();}if(l&2){let e=n.$implicit;bE(2),vg("checked",e.Selected),bE(2),im(e.Version),bE(2),im(lb(7,7,e.Time,true)),bE(3),im(lb(10,10,e.Time,false)),bE(3),im(cb(13,13,e.FileSizes)),bE(3),im(e.FileCount),bE(2),im(e.Label);}}function Ne(l,n){if(l&1){let e=ET();Zi(0,"sh-table",21),lm("sortByColumnChange",function(i){Pd(e);let r=aC();return qC(r.sortByColumn,i)||(r.sortByColumn=i),Ld(i)}),Zi(1,"tr",22)(2,"th",23)(3,"sh-checkbox",24),Hg("click",function(){Pd(e);let i=aC();return Ld(i.toggleSelect())}),Wl()(),Zi(4,"th",25),oC(5,6),Wl(),Zi(6,"th",25),oC(7,7),Wl(),Zi(8,"th",25),oC(9,8),Wl(),Zi(10,"th",26),oC(11,9),Wl(),Zi(12,"th",27),oC(13,10),Wl(),Zi(14,"th",28),oC(15,11),Wl()(),pT(16,Te,18,15,"tr",null,Ce),Wl();}if(l&2){let e=aC();vg("data",e.versions())("loading",e.isLoading()),cm("sortByColumn",e.sortByColumn),bE(3),Kg("indeterminate",e.indeterminate()),vg("checked",e.allSelected()),bE(13),hT(e.versions());}}var $=class l$1{#e=T(J);#n=T(be);#t=T(m);#i=T(ee);id=E1.required();backup=Nt(()=>{this.#t.backups();return this.#t.getBackupById(this.id())});versionsResource=$$1({params:()=>({id:this.id()}),stream:({params:n})=>sy(()=>this.#e.postApiV2BackupListFilesets({body:{BackupId:n.id}}))});isLoading=Nt(()=>this.versionsResource.isLoading());isDeleting=Ge(false);performCompact=Ge(true);versions=Ge([]);constructor(){Qa(()=>{let n=this.versionsResource.value();if(n){let e=(n.Data??[]).slice().sort((t,i)=>t.Time<i.Time?1:t.Time>i.Time?-1:0);this.versions.set(e.map(t=>m$1(l({},t),{Selected:false})));}});}selectedItems=Nt(()=>this.versions().filter(n=>n.Selected));allSelected=Nt(()=>this.selectedItems().length===this.versions().length&&this.versions().length>0);noneSelected=Nt(()=>this.selectedItems().length===0);indeterminate=Nt(()=>this.selectedItems().length>0&&!this.allSelected());sortByColumn=Ge("version");toggleSelected(n,e){e?.stopPropagation(),this.versions.update(t=>t.map(i=>i.Version===n?m$1(l({},i),{Selected:!i.Selected}):i));}toggleSelect(){this.allSelected()?this.selectNone():this.selectAll();}selectAll(){this.versions.update(n=>n.map(e=>m$1(l({},e),{Selected:true})));}selectNone(){this.versions.update(n=>n.map(e=>m$1(l({},e),{Selected:false})));}deleteVersions(){let n=this.selectedItems();if(n.length===0)return;let e=n.length,t=n.map(i=>i.Version);this.#n.open(h,{data:{title:$localize`Confirm delete`,message:$localize`Are you sure you want to delete ${e} version(s)?`,confirmText:$localize`Delete versions`,cancelText:$localize`Cancel`},closed:i=>{i&&(this.isDeleting.set(true),sy(()=>this.#e.postApiV2BackupDeleteVersions({body:{BackupId:this.id(),Versions:t,SuppressCompact:!this.performCompact()}})).pipe(Zu(()=>this.isDeleting.set(false))).subscribe({next:()=>{this.#i.navigate(["/"]);}}));}});}static \u0275fac=function(e){return new(e||l$1)};static \u0275cmp=gw({type:l$1,selectors:[["app-delete-versions"]],inputs:{id:[1,"id"]},decls:13,vars:11,consts:()=>{let n;n=$localize`Delete versions from ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let e;e=$localize`Cancel`;let t;t=$localize`{VAR_PLURAL, plural, =1 {1 version} other {{INTERPOLATION} versions}}`,t=sC(t,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let i;i=$localize` Delete ${t}:ICU@@85461926550041466: `;let r;r=$localize`Compact after deletion`;let C;C=$localize`Fetching versions from destination...`;let b;b=$localize`No versions found for this backup.`;let B;B=$localize`Version`;let G;G=$localize`Timestamp`;let k;k=$localize`When`;let x;x=$localize`Size`;let F;F=$localize`Files`;let U;return U=$localize`Label`,[n,e,i,r,C,b,B,G,k,x,F,U,[1,"loading-state"],[1,"empty-state"],[1,"type-b",3,"data","loading","sortByColumn"],[1,"actions"],["shButton","",3,"routerLink","disabled"],["shButton","",1,"raised","error",3,"click","disabled"],[1,"sub-actions"],[1,"primary","raised",3,"checkedChange","checked"],[1,"primary","indeterminate"],[1,"type-b",3,"sortByColumnChange","data","loading","sortByColumn"],["thead",""],["size","min-content"],[1,"primary","raised",3,"click","checked"],["size","min-content","shSort","version"],["size","min-content","shSort","size"],["size","min-content","shSort","files"],["size","1fr","shSort","label"],[3,"click"]]},template:function(e,t){e&1&&(Zi(0,"h3"),oC(1,0),Wl(),lT(2,me,4,0,"div",12)(3,pe,3,0,"div",13)(4,Ne,18,6,"sh-table",14),Zi(5,"div",15)(6,"button",16),oC(7,1),Wl(),Zi(8,"button",17),Hg("click",function(){return t.deleteVersions()}),oC(9,2),Wl()(),Zi(10,"div",18)(11,"sh-checkbox",19),lm("checkedChange",function(r){return qC(t.performCompact,r)||(t.performCompact=r),r}),oC(12,3),Wl()()),e&2&&(bE(),Vg(t.backup()?.Backup?.Name),iC(1),bE(),uT(t.isLoading()?2:t.versions().length===0?3:4),bE(4),vg("routerLink",XC(10,ce))("disabled",t.isDeleting()),bE(2),Kg("loading",t.isDeleting()),vg("disabled",t.isDeleting()||t.selectedItems().length===0||t.isLoading()),bE(),Vg(t.selectedItems().length)(t.selectedItems().length),iC(9),bE(2),cm("checked",t.performCompact));},dependencies:[v,U,d,ot,_t,m$2,m$3],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;padding:2.5rem}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0}sh-table[_ngcontent-%COMP%]{padding:2rem 0}.loading-state[_ngcontent-%COMP%], .empty-state[_ngcontent-%COMP%]{padding:2rem 0;display:flex;flex-direction:column;gap:1rem}.actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:.5rem;padding-top:2rem}.sub-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:.5rem;padding-top:.5rem;padding-bottom:2rem}"]})};export{$ as default};
@@ -1,2 +1,2 @@
1
- import {E as E1,bb as ce,h as hw,S as aC,Y as cC,f as NC}from'./main-XKLDSNLY.js';var p=["*"],f=(()=>{class a{constructor(){this.color=E1(null),this.variant=E1(null),this.hostClasses=ce("card",{color:this.color,variant:this.variant});}static{this.\u0275fac=function(r){return new(r||a)};}static{this.\u0275cmp=hw({type:a,selectors:[["sh-card"]],hostVars:2,hostBindings:function(r,s){r&2&&NC(s.hostClasses());},inputs:{color:[1,"color"],variant:[1,"variant"]},ngContentSelectors:p,decls:1,vars:0,template:function(r,s){r&1&&(aC(),cC(0));},styles:[`sh-card{--card-bg: var(--base-1);--card-ibg: var(--base-2);--card-bc: var(--base-4);--card-sh: var(--box-shadow-10);--card-p: 1.5rem;--card-shp: .5rem;display:block;padding:var(--card-p);position:relative;z-index:0;border:var(--border-10);border-color:var(--card-bc);box-shadow:var(--card-sh);border-radius:var(--shape-3);overflow:hidden}sh-card:before,sh-card:after{content:"";position:absolute}sh-card:before{background-color:var(--card-bg);inset:0;z-index:-2;border-radius:inherit}sh-card:after{background-color:var(--card-ibg);border-radius:var(--shape-2);inset:var(--card-shp);z-index:-1}sh-card.type-b{--card-bg: var(--base-2);--card-ibg: var(--base-1);--card-sh: none;--card-shp: .25rem}sh-card.type-c{--card-bg: transparent;--card-ibg: var(--card-bg);--card-p: 0}
1
+ import {E as E1,bd as ce,g as gw,S as lC,Y as uC,x as xC}from'./main-2ZYVV4C4.js';var p=["*"],f=(()=>{class a{constructor(){this.color=E1(null),this.variant=E1(null),this.hostClasses=ce("card",{color:this.color,variant:this.variant});}static{this.\u0275fac=function(r){return new(r||a)};}static{this.\u0275cmp=gw({type:a,selectors:[["sh-card"]],hostVars:2,hostBindings:function(r,s){r&2&&xC(s.hostClasses());},inputs:{color:[1,"color"],variant:[1,"variant"]},ngContentSelectors:p,decls:1,vars:0,template:function(r,s){r&1&&(lC(),uC(0));},styles:[`sh-card{--card-bg: var(--base-1);--card-ibg: var(--base-2);--card-bc: var(--base-4);--card-sh: var(--box-shadow-10);--card-p: 1.5rem;--card-shp: .5rem;display:block;padding:var(--card-p);position:relative;z-index:0;border:var(--border-10);border-color:var(--card-bc);box-shadow:var(--card-sh);border-radius:var(--shape-3);overflow:hidden}sh-card:before,sh-card:after{content:"";position:absolute}sh-card:before{background-color:var(--card-bg);inset:0;z-index:-2;border-radius:inherit}sh-card:after{background-color:var(--card-ibg);border-radius:var(--shape-2);inset:var(--card-shp);z-index:-1}sh-card.type-b{--card-bg: var(--base-2);--card-ibg: var(--base-1);--card-sh: none;--card-shp: .25rem}sh-card.type-c{--card-bg: transparent;--card-ibg: var(--card-bg);--card-p: 0}
2
2
  `],encapsulation:2});}}return a})();export{f};
@@ -1,2 +1,2 @@
1
- import {T,ae as eo,bu as N,D as w1,bU as B$1,af as D1,E as E1,bb as ce,h as hw,S as aC,V as Ul,W as Eg,X as Wl,Y as cC,d as aT,C as CE,g as cT,H as Hg,aC as yg,f as NC,M as qg,R as fC,l as vT,an as Bg,O as Od,k as iC,P as Pd,aq as Tg}from'./main-XKLDSNLY.js';var H=["internalInput"],z=["*"];function B(g,K){if(g&1){let o=vT();Ul(0,"input",4,0),Bg("change",function(t){Od(o);let c=iC();return Pd(c.onInternalInputChange(t))}),Wl();}if(g&2){let o=iC();Tg("checked",o.checked()),yg("disabled",o.disabled()?"":null);}}var J=(()=>{class g{constructor(){this.#e=T(eo),this.#t=T(N),this.internalInput=w1("internalInput"),this.projectedInputs=B$1("input:not(.internal-input)",{childList:true,attributes:true}),this.checked=D1(false),this.color=E1(null),this.variant=E1(null),this.readonly=E1(false),this.disabled=E1(false),this.noInternalInput=E1(false),this.hostClasses=ce("toggle",{color:this.color,variant:this.variant,readonly:this.readonly});}#e;#t;onInternalInputChange(o){if(this.disabled())return;let e=o.target;this.checked.set(e.checked);}onKeyDown(o){if(this.#t.matches(o,"toggle.toggle")){let e=this.internalInput()?.nativeElement;e&&getComputedStyle(e).display!=="none"?e.click():this.#e.nativeElement.click(),o.preventDefault();}}static{this.\u0275fac=function(e){return new(e||g)};}static{this.\u0275cmp=hw({type:g,selectors:[["sh-toggle"]],viewQuery:function(e,t){e&1&&qg(t.internalInput,H,5),e&2&&fC();},hostVars:6,hostBindings:function(e,t){e&1&&Hg("keydown",function(V){return t.onKeyDown(V)}),e&2&&(yg("disabled",t.disabled()?"":null)("role",t.noInternalInput()?"switch":null)("aria-checked",t.noInternalInput()?t.checked():null)("tabindex",t.noInternalInput()?t.disabled()?"-1":"0":null),NC(t.hostClasses()));},inputs:{checked:[1,"checked"],color:[1,"color"],variant:[1,"variant"],readonly:[1,"readonly"],disabled:[1,"disabled"],noInternalInput:[1,"noInternalInput"]},outputs:{checked:"checkedChange"},ngContentSelectors:z,decls:4,vars:1,consts:[["internalInput",""],[1,"box"],[1,"knob"],["type","checkbox",1,"internal-input",3,"checked"],["type","checkbox",1,"internal-input",3,"change","checked"]],template:function(e,t){e&1&&(aC(),Ul(0,"div",1),Eg(1,"div",2),Wl(),cC(2),aT(3,B,2,2,"input",3)),e&2&&(CE(3),cT(t.projectedInputs().length===0&&!t.noInternalInput()?3:-1));},styles:[`sh-toggle{--toggle-bg: var(--base-4);--toggle-b: 0;--togglek-bg: var(--base-2);--togglek-bs: var(--box-shadow-20);display:flex;align-items:center;gap:.5rem;cursor:pointer;-webkit-user-select:none;user-select:none;position:relative}sh-toggle:focus-visible>.box,sh-toggle:has(input:focus-visible)>.box{outline:2px solid var(--primary-8);outline-offset:2px}sh-toggle label{display:flex;align-items:center;gap:.5rem;position:relative;z-index:1}sh-toggle .box{display:block;width:2.125rem;min-width:2.125rem;height:1.25rem;cursor:pointer;position:relative;border-radius:999px;background:var(--toggle-bg);border:var(--toggle-b);transition:background .15s linear}sh-toggle>input[type=checkbox]{appearance:none;position:absolute;inset:0;cursor:pointer;z-index:0;margin:0}sh-toggle>input[type=checkbox]:focus,sh-toggle>input[type=checkbox]:focus-visible{outline:none}sh-toggle:has(>input:not(.internal-input))>input.internal-input{display:none}sh-toggle:has(input[disabled]),sh-toggle[disabled]:not([disabled=false]){opacity:.5;pointer-events:none;-webkit-user-select:none;user-select:none;cursor:initial}sh-toggle .knob{position:absolute;top:.125rem;left:.125rem;width:1rem;height:1rem;border-radius:50%;background:var(--togglek-bg);box-shadow:var(--togglek-bs);box-sizing:border-box;transition:left 125ms ease-in-out}sh-toggle:has(input[type=checkbox]:checked),sh-toggle.active{--togglek-bg: var(--base-8)}sh-toggle:has(input[type=checkbox]:checked) .knob,sh-toggle.active .knob{left:1rem}sh-toggle:has(input[type=checkbox]:checked).primary,sh-toggle.active.primary{--toggle-bg: var(--primary-3);--togglek-bg: var(--primary-8)}sh-toggle:has(input[type=checkbox]:checked).accent,sh-toggle.active.accent{--toggle-bg: var(--accent-3);--togglek-bg: var(--accent-8)}sh-toggle:has(input[type=checkbox]:checked).warn,sh-toggle.active.warn{--toggle-bg: var(--warn-3);--togglek-bg: var(--warn-8)}sh-toggle:has(input[type=checkbox]:checked).error,sh-toggle.active.error{--toggle-bg: var(--error-3);--togglek-bg: var(--error-8)}sh-toggle:has(input[type=checkbox]:checked).success,sh-toggle.active.success{--toggle-bg: var(--success-3);--togglek-bg: var(--success-8)}sh-toggle.outlined{--toggle-bg: var(--base-1);--togglek-bg: var(--base-5);--togglek-bs: none;--toggle-b: 1px solid var(--base-5)}sh-toggle.outlined .knob{width:.875rem;height:.875rem}sh-toggle.outlined.active{--togglek-bg: var(--base-8);--toggle-b: 1px solid var(--base-8)}sh-toggle.outlined.active.primary{--togglek-bg: var(--primary-8);--toggle-b: 1px solid var(--primary-8)}sh-toggle.outlined.active.accent{--togglek-bg: var(--accent-8);--toggle-b: 1px solid var(--accent-8)}sh-toggle.outlined.active.warn{--togglek-bg: var(--warn-8);--toggle-b: 1px solid var(--warn-8)}sh-toggle.outlined.active.error{--togglek-bg: var(--error-8);--toggle-b: 1px solid var(--error-8)}sh-toggle.outlined.active.success{--togglek-bg: var(--success-8);--toggle-b: 1px solid var(--success-8)}sh-toggle.simple{--togglek-bg: #fff}sh-toggle.simple:has(input[type=checkbox]:checked),sh-toggle.simple.active{--togglek-bg: var(--base-8)}sh-toggle.simple:has(input[type=checkbox]:checked).primary,sh-toggle.simple.active.primary{--togglek-bg: var(--primary-8);--toggle-bg: var(--primary-3)}sh-toggle.simple:has(input[type=checkbox]:checked).accent,sh-toggle.simple.active.accent{--togglek-bg: var(--accent-8);--toggle-bg: var(--accent-3)}sh-toggle.simple:has(input[type=checkbox]:checked).warn,sh-toggle.simple.active.warn{--togglek-bg: var(--warn-8);--toggle-bg: var(--warn-3)}sh-toggle.simple:has(input[type=checkbox]:checked).error,sh-toggle.simple.active.error{--togglek-bg: var(--error-8);--toggle-bg: var(--error-3)}sh-toggle.simple:has(input[type=checkbox]:checked).success,sh-toggle.simple.active.success{--togglek-bg: var(--success-8);--toggle-bg: var(--success-3)}sh-toggle.flat{--togglek-bg: #fff}sh-toggle.flat:has(input[type=checkbox]:checked),sh-toggle.flat.active{--togglek-bg: #fff;--toggle-bg: var(--base-8)}sh-toggle.flat:has(input[type=checkbox]:checked).primary,sh-toggle.flat.active.primary{--toggle-bg: var(--primary-8)}sh-toggle.flat:has(input[type=checkbox]:checked).accent,sh-toggle.flat.active.accent{--toggle-bg: var(--accent-8)}sh-toggle.flat:has(input[type=checkbox]:checked).warn,sh-toggle.flat.active.warn{--toggle-bg: var(--warn-8)}sh-toggle.flat:has(input[type=checkbox]:checked).error,sh-toggle.flat.active.error{--toggle-bg: var(--error-8)}sh-toggle.flat:has(input[type=checkbox]:checked).success,sh-toggle.flat.active.success{--toggle-bg: var(--success-8)}sh-toggle.raised{--togglek-bg: #fff}sh-toggle.raised:has(input[type=checkbox]:checked),sh-toggle.raised.active{--toggle-bg: var(--base-g2);--togglek-bg: #fff}sh-toggle.raised:has(input[type=checkbox]:checked).primary,sh-toggle.raised.active.primary{--toggle-bg: var(--primary-g2)}sh-toggle.raised:has(input[type=checkbox]:checked).accent,sh-toggle.raised.active.accent{--toggle-bg: var(--accent-g2)}sh-toggle.raised:has(input[type=checkbox]:checked).warn,sh-toggle.raised.active.warn{--toggle-bg: var(--warn-g2)}sh-toggle.raised:has(input[type=checkbox]:checked).error,sh-toggle.raised.active.error{--toggle-bg: var(--error-g2)}sh-toggle.raised:has(input[type=checkbox]:checked).success,sh-toggle.raised.active.success{--toggle-bg: var(--success-g2)}
1
+ import {T,af as eo,bn as N,B as w1,bN as B$1,ag as D1,E as E1,bd as ce,g as gw,S as lC,U as ql,V as Eg,X as Gl,Y as uC,l as lT,b as bE,c as uT,w as Hg,aE as yg,x as xC,O as qg,R as hC,i as ET,ao as Bg,P as Pd,h as aC,L as Ld,ar as Tg}from'./main-2ZYVV4C4.js';var H=["internalInput"],z=["*"];function B(g,K){if(g&1){let o=ET();ql(0,"input",4,0),Bg("change",function(t){Pd(o);let c=aC();return Ld(c.onInternalInputChange(t))}),Gl();}if(g&2){let o=aC();Tg("checked",o.checked()),yg("disabled",o.disabled()?"":null);}}var J=(()=>{class g{constructor(){this.#e=T(eo),this.#t=T(N),this.internalInput=w1("internalInput"),this.projectedInputs=B$1("input:not(.internal-input)",{childList:true,attributes:true}),this.checked=D1(false),this.color=E1(null),this.variant=E1(null),this.readonly=E1(false),this.disabled=E1(false),this.noInternalInput=E1(false),this.hostClasses=ce("toggle",{color:this.color,variant:this.variant,readonly:this.readonly});}#e;#t;onInternalInputChange(o){if(this.disabled())return;let e=o.target;this.checked.set(e.checked);}onKeyDown(o){if(this.#t.matches(o,"toggle.toggle")){let e=this.internalInput()?.nativeElement;e&&getComputedStyle(e).display!=="none"?e.click():this.#e.nativeElement.click(),o.preventDefault();}}static{this.\u0275fac=function(e){return new(e||g)};}static{this.\u0275cmp=gw({type:g,selectors:[["sh-toggle"]],viewQuery:function(e,t){e&1&&qg(t.internalInput,H,5),e&2&&hC();},hostVars:6,hostBindings:function(e,t){e&1&&Hg("keydown",function(V){return t.onKeyDown(V)}),e&2&&(yg("disabled",t.disabled()?"":null)("role",t.noInternalInput()?"switch":null)("aria-checked",t.noInternalInput()?t.checked():null)("tabindex",t.noInternalInput()?t.disabled()?"-1":"0":null),xC(t.hostClasses()));},inputs:{checked:[1,"checked"],color:[1,"color"],variant:[1,"variant"],readonly:[1,"readonly"],disabled:[1,"disabled"],noInternalInput:[1,"noInternalInput"]},outputs:{checked:"checkedChange"},ngContentSelectors:z,decls:4,vars:1,consts:[["internalInput",""],[1,"box"],[1,"knob"],["type","checkbox",1,"internal-input",3,"checked"],["type","checkbox",1,"internal-input",3,"change","checked"]],template:function(e,t){e&1&&(lC(),ql(0,"div",1),Eg(1,"div",2),Gl(),uC(2),lT(3,B,2,2,"input",3)),e&2&&(bE(3),uT(t.projectedInputs().length===0&&!t.noInternalInput()?3:-1));},styles:[`sh-toggle{--toggle-bg: var(--base-4);--toggle-b: 0;--togglek-bg: var(--base-2);--togglek-bs: var(--box-shadow-20);display:flex;align-items:center;gap:.5rem;cursor:pointer;-webkit-user-select:none;user-select:none;position:relative}sh-toggle:focus-visible>.box,sh-toggle:has(input:focus-visible)>.box{outline:2px solid var(--primary-8);outline-offset:2px}sh-toggle label{display:flex;align-items:center;gap:.5rem;position:relative;z-index:1}sh-toggle .box{display:block;width:2.125rem;min-width:2.125rem;height:1.25rem;cursor:pointer;position:relative;border-radius:999px;background:var(--toggle-bg);border:var(--toggle-b);transition:background .15s linear}sh-toggle>input[type=checkbox]{appearance:none;position:absolute;inset:0;cursor:pointer;z-index:0;margin:0}sh-toggle>input[type=checkbox]:focus,sh-toggle>input[type=checkbox]:focus-visible{outline:none}sh-toggle:has(>input:not(.internal-input))>input.internal-input{display:none}sh-toggle:has(input[disabled]),sh-toggle[disabled]:not([disabled=false]){opacity:.5;pointer-events:none;-webkit-user-select:none;user-select:none;cursor:initial}sh-toggle .knob{position:absolute;top:.125rem;left:.125rem;width:1rem;height:1rem;border-radius:50%;background:var(--togglek-bg);box-shadow:var(--togglek-bs);box-sizing:border-box;transition:left 125ms ease-in-out}sh-toggle:has(input[type=checkbox]:checked),sh-toggle.active{--togglek-bg: var(--base-8)}sh-toggle:has(input[type=checkbox]:checked) .knob,sh-toggle.active .knob{left:1rem}sh-toggle:has(input[type=checkbox]:checked).primary,sh-toggle.active.primary{--toggle-bg: var(--primary-3);--togglek-bg: var(--primary-8)}sh-toggle:has(input[type=checkbox]:checked).accent,sh-toggle.active.accent{--toggle-bg: var(--accent-3);--togglek-bg: var(--accent-8)}sh-toggle:has(input[type=checkbox]:checked).warn,sh-toggle.active.warn{--toggle-bg: var(--warn-3);--togglek-bg: var(--warn-8)}sh-toggle:has(input[type=checkbox]:checked).error,sh-toggle.active.error{--toggle-bg: var(--error-3);--togglek-bg: var(--error-8)}sh-toggle:has(input[type=checkbox]:checked).success,sh-toggle.active.success{--toggle-bg: var(--success-3);--togglek-bg: var(--success-8)}sh-toggle.outlined{--toggle-bg: var(--base-1);--togglek-bg: var(--base-5);--togglek-bs: none;--toggle-b: 1px solid var(--base-5)}sh-toggle.outlined .knob{width:.875rem;height:.875rem}sh-toggle.outlined.active{--togglek-bg: var(--base-8);--toggle-b: 1px solid var(--base-8)}sh-toggle.outlined.active.primary{--togglek-bg: var(--primary-8);--toggle-b: 1px solid var(--primary-8)}sh-toggle.outlined.active.accent{--togglek-bg: var(--accent-8);--toggle-b: 1px solid var(--accent-8)}sh-toggle.outlined.active.warn{--togglek-bg: var(--warn-8);--toggle-b: 1px solid var(--warn-8)}sh-toggle.outlined.active.error{--togglek-bg: var(--error-8);--toggle-b: 1px solid var(--error-8)}sh-toggle.outlined.active.success{--togglek-bg: var(--success-8);--toggle-b: 1px solid var(--success-8)}sh-toggle.simple{--togglek-bg: #fff}sh-toggle.simple:has(input[type=checkbox]:checked),sh-toggle.simple.active{--togglek-bg: var(--base-8)}sh-toggle.simple:has(input[type=checkbox]:checked).primary,sh-toggle.simple.active.primary{--togglek-bg: var(--primary-8);--toggle-bg: var(--primary-3)}sh-toggle.simple:has(input[type=checkbox]:checked).accent,sh-toggle.simple.active.accent{--togglek-bg: var(--accent-8);--toggle-bg: var(--accent-3)}sh-toggle.simple:has(input[type=checkbox]:checked).warn,sh-toggle.simple.active.warn{--togglek-bg: var(--warn-8);--toggle-bg: var(--warn-3)}sh-toggle.simple:has(input[type=checkbox]:checked).error,sh-toggle.simple.active.error{--togglek-bg: var(--error-8);--toggle-bg: var(--error-3)}sh-toggle.simple:has(input[type=checkbox]:checked).success,sh-toggle.simple.active.success{--togglek-bg: var(--success-8);--toggle-bg: var(--success-3)}sh-toggle.flat{--togglek-bg: #fff}sh-toggle.flat:has(input[type=checkbox]:checked),sh-toggle.flat.active{--togglek-bg: #fff;--toggle-bg: var(--base-8)}sh-toggle.flat:has(input[type=checkbox]:checked).primary,sh-toggle.flat.active.primary{--toggle-bg: var(--primary-8)}sh-toggle.flat:has(input[type=checkbox]:checked).accent,sh-toggle.flat.active.accent{--toggle-bg: var(--accent-8)}sh-toggle.flat:has(input[type=checkbox]:checked).warn,sh-toggle.flat.active.warn{--toggle-bg: var(--warn-8)}sh-toggle.flat:has(input[type=checkbox]:checked).error,sh-toggle.flat.active.error{--toggle-bg: var(--error-8)}sh-toggle.flat:has(input[type=checkbox]:checked).success,sh-toggle.flat.active.success{--toggle-bg: var(--success-8)}sh-toggle.raised{--togglek-bg: #fff}sh-toggle.raised:has(input[type=checkbox]:checked),sh-toggle.raised.active{--toggle-bg: var(--base-g2);--togglek-bg: #fff}sh-toggle.raised:has(input[type=checkbox]:checked).primary,sh-toggle.raised.active.primary{--toggle-bg: var(--primary-g2)}sh-toggle.raised:has(input[type=checkbox]:checked).accent,sh-toggle.raised.active.accent{--toggle-bg: var(--accent-g2)}sh-toggle.raised:has(input[type=checkbox]:checked).warn,sh-toggle.raised.active.warn{--toggle-bg: var(--warn-g2)}sh-toggle.raised:has(input[type=checkbox]:checked).error,sh-toggle.raised.active.error{--toggle-bg: var(--error-g2)}sh-toggle.raised:has(input[type=checkbox]:checked).success,sh-toggle.raised.active.success{--toggle-bg: var(--success-g2)}
2
2
  `],encapsulation:2});}}return g})();export{J};
@@ -1,2 +1,2 @@
1
- import {E as E1,bN as N1,bb as ce,h as hw,S as aC,V as Ul,Y as cC,X as Wl,f as NC,L as Kg}from'./main-XKLDSNLY.js';var g=["*"],D=(()=>{class s{constructor(){this.color=E1(null),this.variant=E1(null),this.size=E1(null),this.sharp=E1(void 0),this.dynamic=E1(void 0),this.readonly=E1(false),this.noBg=E1(false,{transform:N1}),this.hostClasses=ce("chip",{color:this.color,variant:this.variant,size:this.size,sharp:this.sharp,dynamic:this.dynamic,readonly:this.readonly});}static{this.\u0275fac=function(i){return new(i||s)};}static{this.\u0275cmp=hw({type:s,selectors:[["sh-chip"]],hostAttrs:[1,"sh-sheet"],hostVars:4,hostBindings:function(i,h){i&2&&(NC(h.hostClasses()),Kg("no-bg",h.noBg()));},inputs:{color:[1,"color"],variant:[1,"variant"],size:[1,"size"],sharp:[1,"sharp"],dynamic:[1,"dynamic"],readonly:[1,"readonly"],noBg:[1,"noBg"]},ngContentSelectors:g,decls:2,vars:0,template:function(i,h){i&1&&(aC(),Ul(0,"div"),cC(1),Wl());},styles:[`sh-chip{--chip-h: 2rem;--chip-s: calc(var(--chip-h) / 2)}sh-chip.sh-sheet{--sheet-c: var(--chip-c);--sheet-s: var(--chip-s)}sh-chip{--chip-bs: var(--ship-chip-shadow, none);display:inline-flex;align-items:center;justify-content:center;padding:0 .75rem;font:var(--paragraph-30B);height:var(--chip-h);box-shadow:var(--chip-bs);white-space:nowrap}sh-chip div{display:flex;align-items:center;gap:.5rem;color:var(--chip-c)}sh-chip.sharp{--chip-s: calc(var(--chip-h) / 4);padding:0 .5rem}sh-chip.sharp.small{padding:0 .375rem}sh-chip.sharp.xsmall{padding:0 .25rem}sh-chip sh-icon{color:var(--chip-ic);font-size:1rem;font-weight:inherit}sh-chip [avatar]{height:calc(var(--chip-h) - .75rem);width:calc(var(--chip-h) - .75rem);border-radius:50%}sh-chip.small{--chip-h: 1.5rem;font:var(--paragraph-40B);padding:0 .5rem}sh-chip.small div{gap:.25rem}sh-chip.small sh-icon{font-size:.75rem}sh-chip.xsmall{--chip-h: 1.25rem;font:var(--paragraph-40B);padding:0 .375rem}sh-chip.xsmall div{gap:.125rem}sh-chip.xsmall sh-icon{font-size:.625rem}sh-chip.no-bg{--sheet-bg: transparent;background:transparent}sh-chip.no-bg.simple,sh-chip.no-bg.simple.primary,sh-chip.no-bg.simple.accent,sh-chip.no-bg.simple.warn,sh-chip.no-bg.simple.error,sh-chip.no-bg.simple.success{--sheet-bc: transparent;border-color:transparent}sh-chip[disabled]{opacity:.5}sh-chip[readonly],sh-chip.readonly{pointer-events:none;-webkit-user-select:none;user-select:none}
1
+ import {E as E1,bG as N1,bd as ce,g as gw,S as lC,U as ql,Y as uC,X as Gl,x as xC,K as Kg}from'./main-2ZYVV4C4.js';var g=["*"],D=(()=>{class s{constructor(){this.color=E1(null),this.variant=E1(null),this.size=E1(null),this.sharp=E1(void 0),this.dynamic=E1(void 0),this.readonly=E1(false),this.noBg=E1(false,{transform:N1}),this.hostClasses=ce("chip",{color:this.color,variant:this.variant,size:this.size,sharp:this.sharp,dynamic:this.dynamic,readonly:this.readonly});}static{this.\u0275fac=function(i){return new(i||s)};}static{this.\u0275cmp=gw({type:s,selectors:[["sh-chip"]],hostAttrs:[1,"sh-sheet"],hostVars:4,hostBindings:function(i,h){i&2&&(xC(h.hostClasses()),Kg("no-bg",h.noBg()));},inputs:{color:[1,"color"],variant:[1,"variant"],size:[1,"size"],sharp:[1,"sharp"],dynamic:[1,"dynamic"],readonly:[1,"readonly"],noBg:[1,"noBg"]},ngContentSelectors:g,decls:2,vars:0,template:function(i,h){i&1&&(lC(),ql(0,"div"),uC(1),Gl());},styles:[`sh-chip{--chip-h: 2rem;--chip-s: calc(var(--chip-h) / 2)}sh-chip.sh-sheet{--sheet-c: var(--chip-c);--sheet-s: var(--chip-s)}sh-chip{--chip-bs: var(--ship-chip-shadow, none);display:inline-flex;align-items:center;justify-content:center;padding:0 .75rem;font:var(--paragraph-30B);height:var(--chip-h);box-shadow:var(--chip-bs);white-space:nowrap}sh-chip div{display:flex;align-items:center;gap:.5rem;color:var(--chip-c)}sh-chip.sharp{--chip-s: calc(var(--chip-h) / 4);padding:0 .5rem}sh-chip.sharp.small{padding:0 .375rem}sh-chip.sharp.xsmall{padding:0 .25rem}sh-chip sh-icon{color:var(--chip-ic);font-size:1rem;font-weight:inherit}sh-chip [avatar]{height:calc(var(--chip-h) - .75rem);width:calc(var(--chip-h) - .75rem);border-radius:50%}sh-chip.small{--chip-h: 1.5rem;font:var(--paragraph-40B);padding:0 .5rem}sh-chip.small div{gap:.25rem}sh-chip.small sh-icon{font-size:.75rem}sh-chip.xsmall{--chip-h: 1.25rem;font:var(--paragraph-40B);padding:0 .375rem}sh-chip.xsmall div{gap:.125rem}sh-chip.xsmall sh-icon{font-size:.625rem}sh-chip.no-bg{--sheet-bg: transparent;background:transparent}sh-chip.no-bg.simple,sh-chip.no-bg.simple.primary,sh-chip.no-bg.simple.accent,sh-chip.no-bg.simple.warn,sh-chip.no-bg.simple.error,sh-chip.no-bg.simple.success{--sheet-bc: transparent;border-color:transparent}sh-chip[disabled]{opacity:.5}sh-chip[readonly],sh-chip.readonly{pointer-events:none;-webkit-user-select:none;user-select:none}
2
2
  `],encapsulation:2});}}return s})();export{D};
@@ -0,0 +1,2 @@
1
+ import {c}from'./chunk-D6y9RCQD.js';import {ShipTable as ot}from'./chunk-DkVHfoYw.js';import {c as c$1}from'./chunk-BJOhC2d8.js';import {T,E as E1,Q as Qa,G as Ge,g as gw,a as N,v as v$1,aL as ci,l as lT,c as uT,K as Kg,Z as Zi,o as oC,W as Wl,d as Ig,a1 as pT,h as aC,ah as Yg,z as vg,b as bE,a2 as hT,i as ET,w as Hg,P as Pd,L as Ld,H as HC,aO as sb,J as im,aP as lb,aa as Yl,aq as dT}from'./main-2ZYVV4C4.js';import'./chunk-CKUlUN3q.js';import'./chunk-BGuvkLC9.js';var B=(t,n)=>n.ID;function J(t,n){t&1&&(Zi(0,"div",4),oC(1,0),Wl());}function U(t,n){if(t&1&&(Zi(0,"li"),HC(1),Wl()),t&2){let e=n.$implicit;bE(),im(e);}}function X(t,n){if(t&1&&(Zi(0,"strong"),HC(1,"# Exception"),Wl(),Zi(2,"ol",15),pT(3,U,2,1,"li",null,dT),Wl()),t&2){let e=aC(3).$implicit,a=aC(2);bE(3),hT(a.breakIntoLines(e.Exception));}}function j(t,n){if(t&1&&(Zi(0,"li"),HC(1),Wl()),t&2){let e=n.$implicit;bE(),im(e);}}function z(t,n){if(t&1&&(Zi(0,"strong"),HC(1,"# Message"),Wl(),Zi(2,"ol",15),pT(3,j,2,1,"li",null,dT),Wl()),t&2){let e=aC(3).$implicit,a=aC(2);bE(3),hT(a.breakIntoLines(e.Message));}}function W(t,n){if(t&1&&(Zi(0,"code"),lT(1,X,5,0),lT(2,z,5,0),Wl()),t&2){let e=aC(2).$implicit;bE(),uT(e.Exception?1:-1),bE(),uT(e.Message?2:-1);}}function H(t,n){if(t&1&&(Zi(0,"tr")(1,"td",12)(2,"sh-list",13)(3,"div",14),HC(4),Wl(),Zi(5,"div",14),HC(6),Wl(),Zi(7,"div",14),HC(8),Wl(),Zi(9,"div",14),HC(10),Wl(),Zi(11,"div",14),HC(12),Wl()(),lT(13,W,3,2,"code"),Wl()()),t&2){let e=aC().$implicit;bE(4),Yl("ID: ",e.ID),bE(2),Yl("Type: ",e.Type),bE(2),Yl("Tag: ",e.Tag),bE(2),Yl("TaskID: ",e.TaskID),bE(2),Yl("MessageID: ",e.MessageID),bE(),uT(e.Exception||e.Message?13:-1);}}function q(t,n){if(t&1){let e=ET();Zi(0,"tr",10),Hg("click",function(){let u=Pd(e).$implicit,g=aC(2);return Ld(g.toggleRow(u.ID))}),Zi(1,"td"),HC(2),sb(3,"date"),Wl(),Zi(4,"td"),HC(5),Wl(),Zi(6,"td",8)(7,"button",11)(8,"sh-icon"),HC(9,"caret-down"),Wl()()()(),lT(10,H,14,6,"tr");}if(t&2){let e=n.$implicit,a=aC(2);bE(2),im(lb(3,5,e.When,"medium")),bE(3),im(a.subStringMessage(e.Message)),bE(2),Kg("rotated-icon",e.ID===a.openRowId()),bE(3),uT(e.ID===a.openRowId()?10:-1);}}function K(t,n){if(t&1&&(Zi(0,"sh-table",6)(1,"tr",7)(2,"th"),oC(3,1),Wl(),Zi(4,"th"),oC(5,2),Wl(),Ig(6,"th",8),Wl(),pT(7,q,11,8,null,null,B),Zi(9,"div",9),oC(10,3),Wl()()),t&2){let e=aC();Yg("grid-template-columns","auto 1fr auto"),Kg("type-b",true),vg("data",e.logs())("loading",e.logsLoading()),bE(7),hT(e.logs());}}var v=class t{#e=T(c);whenFilter=E1();backupIdFilter=E1();polling=E1();logLevel=this.#e.logLevel;logLevelByLabel=this.#e.logLevelByLabel;logs=this.#e.logs;logsLoading=this.#e.logsLoading;pollingEffect=Qa(()=>{let n=this.polling()??false;this.#e.isPolling.set(n);});openRowId=Ge(null);whenEffect=Qa(()=>{let n=this.whenFilter()??null;this.#e.setWhenFilter(n),this.#e.logLevel.set(n?"Verbose":"Disabled");});backupIdEffect=Qa(()=>{let n=this.backupIdFilter()??null;this.#e.setBackupIdFilter(n),this.#e.logLevel.set(n?"Verbose":"Disabled");});toggleRow(n){n!=null&&this.openRowId.set(n===this.openRowId()?null:n);}breakIntoLines(n){return n?n.split(`
2
+ `):[]}subStringMessage(n){return n?n.substring(0,80)+"...":""}ngOnDestroy(){this.#e.destroy();}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=gw({type:t,selectors:[["app-logs-live"]],hostVars:2,hostBindings:function(e,a){e&2&&Kg("is-disabled",a.logLevel()==="Disabled");},inputs:{whenFilter:[1,"whenFilter"],backupIdFilter:[1,"backupIdFilter"],polling:[1,"polling"]},decls:2,vars:1,consts:()=>{let n;n=$localize`Live logs are disabled`;let e;e=$localize`When`;let a;a=$localize`Message`;let u;return u=$localize`No data available`,[n,e,a,u,[1,"live-view-disabled"],[3,"type-b","data","loading","grid-template-columns"],[3,"data","loading"],["thead",""],[1,"sticky-end"],["table-no-rows",""],[3,"click"],["shButton","","type","button",1,"outlined","small"],[1,"expanded-cell"],[1,"primary"],["item",""],[1,"line-numbers-ol"]]},template:function(e,a){e&1&&lT(0,J,2,0,"div",4)(1,K,11,6,"sh-table",5),e&2&&uT(a.logLevel()==="Disabled"?0:1);},dependencies:[ot,N,c$1,v$1,ci],styles:["[_nghost-%COMP%]{display:block}.is-disabled[_nghost-%COMP%]{padding:0 2rem}.live-view-disabled[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;min-height:18.75rem;width:100%;background-color:var(--base-2);border:1px solid var(--base-3);border-radius:var(--shape-2);font:var(--paragraph-20)}.expanded-cell[_ngcontent-%COMP%]{height:auto;grid-column:1/-1;white-space:pre-wrap;display:flex;flex-direction:column;background:var(--base-2)}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}sh-table[_ngcontent-%COMP%]{--table-columns: auto auto 1fr auto}sh-table[_ngcontent-%COMP%] td.id[_ngcontent-%COMP%]{justify-content:center}sh-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:has(code){padding:1rem .75rem;overflow:hidden}sh-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:has(code) code[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--base-8),#000 70%);color:#fff;padding:1.5rem;border-radius:var(--shape-2);overflow:auto;white-space:pre;max-width:100%;width:100%}sh-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:has(code) code[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{margin:0}code[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{display:inline-block;margin-bottom:.25rem}code[_ngcontent-%COMP%] ol.line-numbers-ol[_ngcontent-%COMP%] + strong[_ngcontent-%COMP%]{margin-top:1.25rem}"]})};export{v as default};
@@ -0,0 +1,2 @@
1
+ import {w}from'./chunk-B61kkU_h.js';import {T,e as ee,D,A,G as Ge,B as w1,Q as Qa,C as Zu,g as gw,a as N,v,u as ue,Z as Zi,w as Hg,l as lT,d as Ig,W as Wl,F as Fg,j as jg,t as bD,H as HC,z as vg,b as bE,c as uT,M as MD,J as im,K as Kg,O as qg,R as hC,o as oC}from'./main-2ZYVV4C4.js';import {F as Fe}from'./chunk-DBkkb6OR.js';import {j as jn,m as me,G as Gn,T as Tn,Z as Ze,y as yt,R as Rn,P as Pn,g as gn,h as hn}from'./chunk-iGzJokt-.js';import {U}from'./chunk-CnZx831x.js';var Y=["passwordInput"];function Z(l,n){l&1&&(Zi(0,"sh-alert",6),oC(1,4),Wl());}var h=new jn,C=class l{#e=T(ee);#n=T(D);rememberMe=A("rememberMe",false,true);failedLogin=Ge(false);successLogin=Ge(false);isLoading=Ge(false);loginForm=h.group({pass:h.control("",me.required),rememberMe:h.control(this.rememberMe())});showPassword=Ge(false);passwordInput=w1("passwordInput");passwordEffect=Qa(()=>{this.failedLogin()&&queueMicrotask(()=>this.passwordInput()?.nativeElement?.focus());});ngOnInit(){this.loginForm.controls.rememberMe.valueChanges.subscribe(n=>this.rememberMe.set(n??false)),queueMicrotask(()=>this.passwordInput()?.nativeElement?.focus());}submit(){let n=this.loginForm.value.pass;this.rememberMe.set(this.loginForm.value.rememberMe??false),n&&(this.isLoading.set(true),this.#n.login(n,this.rememberMe()).pipe(Zu(()=>{this.isLoading.set(false),this.failedLogin.set(true);})).subscribe({next:()=>{this.successLogin.set(true),this.#e.navigate(["/"]);}}));}static \u0275fac=function(o){return new(o||l)};static \u0275cmp=gw({type:l,selectors:[["app-login"]],viewQuery:function(o,e){o&1&&qg(e.passwordInput,Y,5),o&2&&hC();},decls:23,vars:6,consts:()=>{let n;n=$localize`Enter your password`;let o;o=$localize` Password ${"\uFFFD#9\uFFFD"}:START_LINK:${"\uFFFD#10\uFFFD"}:START_TAG_SH_ICON:question${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#9\uFFFD"}:CLOSE_LINK:`;let e;e=$localize` Login ${"\uFFFD#17\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SH_ICON:`;let m;m=$localize` Keep me logged in ${"\uFFFD#20\uFFFD\uFFFD/#20\uFFFD"}:TAG_INPUT:`;let N;return N=$localize` Remember to enter a password, if you can't remember the password open the duplicati client on the machine in question and make sure you open it through the tray icon then go into settings to change the password. `,[["passwordInput",""],o,e,m,N,[3,"submit","formGroup"],["type","warning"],[1,"logo-login"],[1,"inner"],[1,"login-row"],["for","password"],["href","https://docs.duplicati.com/configuration-and-management/duplicati-access-password#access-from-the-trayicon","target","_blank","rel","noopener noreferrer"],["name","password","autocomplete","current-password","placeholder",n,"tabindex","1","formControlName","pass",3,"type"],["suffix","",3,"click"],["shButton","","type","submit",1,"raised","primary","login-button"],[1,"raised","primary"],["type","checkbox","id","rememberMe","tabindex","2","formControlName","rememberMe"],[1,"login-row","checkbox"],["for","rememberMe",1,"remember-me"]]},template:function(o,e){o&1&&(Zi(0,"form",5),Hg("submit",function(){return e.submit()}),lT(1,Z,2,0,"sh-alert",6),Zi(2,"div",7),Ig(3,"app-logo"),Wl(),Zi(4,"div",8)(5,"div",9)(6,"sh-form-field")(7,"label",10),Fg(8,1),Zi(9,"a",11),Ig(10,"sh-icon"),Wl(),jg(),Wl(),Ig(11,"input",12,0),bD(),Zi(13,"sh-icon",13),Hg("click",function(){return e.showPassword.set(!e.showPassword())}),HC(14),Wl()(),Zi(15,"button",14),Fg(16,2),Ig(17,"sh-icon"),jg(),Wl()(),Zi(18,"sh-checkbox",15),Fg(19,3),Ig(20,"input",16),bD(),jg(),Wl(),Zi(21,"div",17),Ig(22,"label",18),Wl()()()),o&2&&(vg("formGroup",e.loginForm),bE(),uT(e.failedLogin()&&!e.successLogin()?1:-1),bE(10),vg("type",e.showPassword()?"text":"password"),MD(),bE(3),im(e.showPassword()?"eye":"eye-slash"),bE(),Kg("loading",e.isLoading()),bE(5),MD());},dependencies:[Gn,Tn,Ze,yt,Rn,Pn,gn,hn,w,Fe,N,v,ue,U],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{width:100vw;min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.75rem}form[_ngcontent-%COMP%] .inner[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:1rem}form[_ngcontent-%COMP%] .inner[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]{align-self:flex-start}sh-alert[_ngcontent-%COMP%]{max-width:20rem;margin:0 auto}h3[_ngcontent-%COMP%]{font:var(--title-30)}.login-row[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.logo-login[_ngcontent-%COMP%]{top:0;left:0;padding:1.25rem;position:fixed}.login-button[_ngcontent-%COMP%]{padding-left:1.5rem;padding-right:1.5rem}"]})};
2
+ export{C as default};
@@ -0,0 +1,2 @@
1
+ import {q,Z}from'./chunk-Kq2ZFJSk.js';import {I as I$1}from'./chunk-zOY5leQB.js';import {l as le}from'./chunk-29_4gGIi.js';import {J}from'./chunk-CGnjVnmu.js';import {T as Te}from'./chunk-fDWfSg6Y.js';import {v as ve$1}from'./chunk-DuRr4rDS.js';import {N as Nt$1}from'./chunk-C1py21yb.js';import {F as Fe}from'./chunk-DBkkb6OR.js';import {B as Bn,Z as Ze$1,e as en,y as yt$1,R as Rn,J as Jt}from'./chunk-iGzJokt-.js';import {a as at$1}from'./chunk-DneBfCBh.js';import {T,f,ag as D1,E as E1,G as Ge$1,N as Nt,ak as l,aj as m,g as gw,bS as ei,v,a as N,Z as Zi,aR as zl,o as oC,aS as Ql,l as lT,W as Wl,b4 as cg,z as vg,b as bE,c as uT,i as ET,w as Hg,P as Pd,h as aC,L as Ld,F as Fg,d as Ig,j as jg,a1 as pT,aq as dT,a2 as hT,t as bD,a3 as XC,M as MD,H as HC,J as im,al as dm,am as GC,K as Kg,aa as Yl,ap as zC,b_ as gC,b0 as eb,bT as wg,c0 as db}from'./main-2ZYVV4C4.js';import'./chunk-BEUeHgR9.js';import'./chunk-BJOhC2d8.js';import'./chunk-D38QrkIM.js';import'./chunk-3YzyUT-a.js';import'./chunk-CKUlUN3q.js';import'./chunk-BGuvkLC9.js';import'./chunk-CnZx831x.js';import'./chunk-Cm7JSdTO.js';var Se=[{name:"send-mail-to",type:"Email"},{name:"send-mail-from",type:"Email"},{name:"log-file",type:"FileTree"},{name:"compression-extension-file",type:"FileTree"},{name:"dbpath",type:"FileTree"},{name:"restore-path",type:"FileTree"},{name:"gpg-program-path",type:"FileTree"}];var he=()=>({updateOn:"blur"}),I=t=>({formView:t}),V=t=>({$implicit:t});function we(t,i){if(t&1){let e=ET();Zi(0,"button",15),Hg("click",function(){Pd(e);let n=aC();return Ld(n.showTextArea.set(false))}),Fg(1,6),Ig(2,"sh-icon"),jg(),Wl();}}function Le(t,i){if(t&1){let e=ET();Zi(0,"button",19,1),Hg("click",function(){let n=Pd(e).$implicit,a=aC(3);return Ld(a.addSetting(n))}),Zi(2,"div",20),HC(3),Zi(4,"p"),HC(5),Wl()()();}if(t&2){let e=i.$implicit;Kg("deprecated",e.deprecatedDescription),bE(3),Yl(" ",e.shortDescription," "),bE(2),im(e.name);}}function Ie(t,i){if(t&1&&(Zi(0,"h3",11),HC(1),Wl(),pT(2,Le,6,4,"button",18,dT)),t&2){let e=i.$implicit;bE(),im(e.displayName),bE(),hT(e.options);}}function Ve(t,i){if(t&1){let e=ET();Zi(0,"sh-menu")(1,"button",21)(2,"sh-icon"),HC(3,"dots-three-vertical"),Wl()(),zl(4,17),Zi(5,"button",15),Hg("click",function(){Pd(e);let n=aC(2);return Ld(n.addFreeTextSetting())}),Fg(6,8),Ig(7,"sh-icon"),jg(),Wl(),Zi(8,"button",22),Hg("click",function(){Pd(e);let n=aC(2);return Ld(n.showTextArea.set(true))}),Zi(9,"sh-icon"),HC(10,"link"),Wl(),HC(11," Edit contents as text "),Wl(),Zi(12,"button",15),Hg("click",function(){Pd(e);let n=aC(2);return Ld(n.showOptionNames.set(!n.showOptionNames()))}),Fg(13,9),Ig(14,"sh-icon"),jg(),Wl(),Ql(),Wl();}}function Ne(t,i){if(t&1&&(Zi(0,"sh-menu",16)(1,"button",13),Fg(2,7),Ig(3,"sh-icon"),jg(),Wl(),zl(4,17),pT(5,Ie,4,1,null,null,dT),Ql(),Wl(),lT(7,Ve,15,0,"sh-menu")),t&2){let e=aC();vg("searchable",true),bE(5),hT(e.nonSelectedOptionsGrouped()),bE(2),uT(e.hasFreeTextSettings()?7:-1);}}function be(t,i){if(t&1){let e=ET();Zi(0,"textarea",23),Hg("ngModelChange",function(n){Pd(e);let a=aC();return Ld(a.updateSettingsFromText(n))}),Wl(),bD();}if(t&2){let e=aC();vg("ngModel",e.settingsAsText())("ngModelOptions",XC(2,he)),MD();}}function Ee(t,i){t&1&&(Zi(0,"div",24),HC(1,"Add a setting above to get started."),Wl());}function Me(t,i){t&1&&(Zi(0,"sh-icon",32),HC(1," warning-octagon "),Wl());}function Pe(t,i){if(t&1&&(Zi(0,"span",33),HC(1),Wl()),t&2){let e=aC(2).$implicit;bE(),Yl("--",e.FormView.name);}}function ve(t,i){if(t&1&&HC(0),t&2){let e=aC(2).$implicit;Yl(" ",e.FormView.shortDescription," ");}}function $e(t,i){if(t&1&&(Zi(0,"sh-icon",34),HC(1,"archive"),Wl()),t&2){let e=aC(2).$implicit;vg("shTooltip",e.FormView.deprecatedDescription);}}function Ae(t,i){if(t&1&&(Zi(0,"sh-icon",35),HC(1,"question"),Wl()),t&2){let e=aC(2).$implicit;vg("shTooltip",e.FormView.longDescription);}}function De(t,i){if(t&1&&(lT(0,Me,2,0,"sh-icon",32),Zi(1,"span"),lT(2,Pe,2,1,"span",33)(3,ve,1,1),Wl(),lT(4,$e,2,1,"sh-icon",34)(5,Ae,2,1,"sh-icon",35)),t&2){let e=aC().$implicit,o=zC(1),n=aC(2);uT(o?0:-1),bE(),Kg("deprecated",e.FormView.deprecatedDescription),bE(),uT(n.showOptionNames()?2:3),bE(2),uT(e.FormView.deprecatedDescription?4:e.FormView.longDescription?5:-1);}}function Re(t,i){t&1&&wg(0);}function Ge(t,i){if(t&1){let e=ET();Zi(0,"div",26)(1,"label"),cg(2,Re,1,0,"ng-container",36),Wl(),Zi(3,"div")(4,"sh-form-field")(5,"input",37),Hg("ngModelChange",function(n){Pd(e);let a=aC().$implicit,c=aC(2);return Ld(c.updateFreeTextSettingName(a,n))}),Wl(),bD(),Zi(6,"sh-icon",38),HC(7,"rectangle-dashed"),Wl()()(),Zi(8,"div")(9,"sh-form-field")(10,"input",37),Hg("ngModelChange",function(n){Pd(e);let a=aC().$implicit,c=aC(2);return Ld(c.updateSettingValue(a,n))}),Wl(),bD(),Zi(11,"sh-icon",38),HC(12,"textbox"),Wl()()()();}if(t&2){let e=aC().$implicit,o=gC(3);bE(2),vg("ngTemplateOutlet",o),bE(3),vg("ngModel",e.Name),MD(),bE(5),vg("ngModel",e.Value()),MD();}}function ke(t,i){t&1&&wg(0);}function Be(t,i){if(t&1){let e=ET();Zi(0,"app-file-tree",27)(1,"label",39),cg(2,ke,1,0,"ng-container",36),Wl(),Zi(3,"input",40),Hg("ngModelChange",function(n){Pd(e);let a=aC().$implicit,c=aC(2);return Ld(c.updateSettingValue(a,n))}),Wl(),bD(),Wl();}if(t&2){let e=aC().$implicit,o=gC(3),n=zC(0);vg("startingPath",e.Value())("accepts",e.FormView.accepts)("showFiles",true)("showHiddenNodes",true)("selectFiles",true)("hideShortcuts",false)("resolvePaths",true),bE(),vg("for",n),bE(),vg("ngTemplateOutlet",o),bE(),vg("id",n)("ngModel",e.Value()),MD();}}function ze(t,i){if(t&1){let e=ET();Zi(0,"app-file-tree",28),Ig(1,"label",39),Zi(2,"input",40),Hg("ngModelChange",function(n){Pd(e);let a=aC().$implicit,c=aC(2);return Ld(c.updateSettingValue(a,n))}),Wl(),bD(),Wl();}if(t&2){let e=aC().$implicit,o=zC(0);vg("startingPath",e.Value())("hideShortcuts",false)("resolvePaths",true),bE(),vg("for",o),bE(),vg("id",o)("ngModel",e.Value()),MD();}}function Ue(t,i){t&1&&wg(0);}function Ke(t,i){t&1&&wg(0);}function He(t,i){t&1&&(Zi(0,"sh-icon",38),HC(1,"link"),Wl());}function Je(t,i){t&1&&(Zi(0,"sh-icon",38),HC(1,"hard-drives"),Wl());}function Xe(t,i){t&1&&(Zi(0,"sh-icon",38),HC(1,"jar"),Wl());}function je(t,i){t&1&&(Zi(0,"sh-icon",38),HC(1,"envelope"),Wl());}function qe(t,i){t&1&&(Zi(0,"sh-icon",38),HC(1,"textbox"),Wl());}function Qe(t,i){if(t&1){let e=ET();Zi(0,"sh-form-field")(1,"label",39),cg(2,Ue,1,0,"ng-container",36)(3,Ke,1,0,"ng-container",41),Wl(),Zi(4,"input",42),Hg("ngModelChange",function(n){Pd(e);let a=aC().$implicit,c=aC(2);return Ld(c.updateSettingValue(a,n))}),Wl(),bD(),lT(5,He,2,0,"sh-icon",38)(6,Je,2,0,"sh-icon",38)(7,Xe,2,0,"sh-icon",38)(8,je,2,0,"sh-icon",38)(9,qe,2,0,"sh-icon",38),Wl();}if(t&2){let e=aC().$implicit,o=gC(3),n=zC(0);aC(2);let a=gC(10);bE(),vg("for",n),bE(),vg("ngTemplateOutlet",o),bE(),vg("ngTemplateOutlet",a)("ngTemplateOutletContext",eb(10,V,eb(8,I,e.FormView))),bE(),vg("type",e.FormView.type==="Email"?"email":"text")("id",n)("ngModel",e.Value()),MD(),bE(),uT(e.FormView.type==="Path"?5:e.FormView.type==="Hostname"?6:e.FormView.type==="Bucketname"?7:e.FormView.type==="Email"?8:9);}}function We(t,i){t&1&&wg(0);}function Ye(t,i){t&1&&wg(0);}function Ze(t,i){if(t&1){let e=ET();Zi(0,"sh-icon",45),Hg("click",function(){Pd(e);let n=aC(2).$implicit;return Ld(n.showPassword=!n.showPassword)}),HC(1," eye "),Wl();}}function et(t,i){if(t&1){let e=ET();Zi(0,"sh-icon",45),Hg("click",function(){Pd(e);let n=aC(2).$implicit;return Ld(n.showPassword=!n.showPassword)}),HC(1," eye-slash "),Wl();}}function tt(t,i){if(t&1){let e=ET();Zi(0,"sh-form-field")(1,"label",39),cg(2,We,1,0,"ng-container",36)(3,Ye,1,0,"ng-container",41),Wl(),Zi(4,"input",43),Hg("ngModelChange",function(n){Pd(e);let a=aC().$implicit,c=aC(2);return Ld(c.updateSettingValue(a,n))}),Wl(),bD(),Zi(5,"sh-icon",38),HC(6,"password"),Wl(),lT(7,Ze,2,0,"sh-icon",44)(8,et,2,0,"sh-icon",44),Wl();}if(t&2){let e=aC().$implicit,o=gC(3),n=zC(0);aC(2);let a=gC(10);bE(),vg("for",n),bE(),vg("ngTemplateOutlet",o),bE(),vg("ngTemplateOutlet",a)("ngTemplateOutletContext",eb(10,V,eb(8,I,e.FormView))),bE(),vg("type",e.showPassword?"text":"password")("id",n)("ngModel",e.Value()),MD(),bE(3),uT(e.showPassword?7:8);}}function nt(t,i){t&1&&wg(0);}function it(t,i){t&1&&wg(0);}function ot(t,i){if(t&1&&HC(0),t&2){let e=i.$implicit;Yl(" ",e," ");}}function at(t,i){if(t&1){let e=ET();Zi(0,"sh-select",46)(1,"label",39),cg(2,nt,1,0,"ng-container",36)(3,it,1,0,"ng-container",41),Wl(),Zi(4,"input",40),Hg("ngModelChange",function(n){Pd(e);let a=aC().$implicit,c=aC(2);return Ld(c.updateSettingValue(a,n))}),Wl(),bD(),Wl(),cg(5,ot,1,1,"ng-template",null,3,db);}if(t&2){let e=gC(6),o=aC().$implicit,n=gC(3),a=zC(0);aC(2);let c=gC(10);vg("options",o.FormView.options)("isClearable",false)("optionTemplate",e),bE(),vg("for",a),bE(),vg("ngTemplateOutlet",n),bE(),vg("ngTemplateOutlet",c)("ngTemplateOutletContext",eb(11,V,eb(9,I,o.FormView))),bE(),vg("id",a)("ngModel",o.Value()),MD();}}function rt(t,i){t&1&&wg(0);}function lt(t,i){t&1&&wg(0);}function _t(t,i){if(t&1){let e=ET();Zi(0,"app-size",47),Hg("ngModelChange",function(n){Pd(e);let a=aC().$implicit,c=aC(2);return Ld(c.updateSettingValue(a,n))}),Zi(1,"label",39),cg(2,rt,1,0,"ng-container",36)(3,lt,1,0,"ng-container",41),Wl()(),bD();}if(t&2){let e=aC().$implicit,o=gC(3),n=zC(0);aC(2);let a=gC(10);vg("inputType",e.Name)("ngModel",e.Value())("customId",n),MD(),bE(),vg("for",n),bE(),vg("ngTemplateOutlet",o),bE(),vg("ngTemplateOutlet",a)("ngTemplateOutletContext",eb(9,V,eb(7,I,e.FormView)));}}function st(t,i){t&1&&wg(0);}function pt(t,i){t&1&&wg(0);}function ct(t,i){if(t&1){let e=ET();Zi(0,"sh-form-field")(1,"label",39),cg(2,st,1,0,"ng-container",36)(3,pt,1,0,"ng-container",41),Wl(),Zi(4,"input",48),Hg("ngModelChange",function(n){Pd(e);let a=aC().$implicit,c=aC(2);return Ld(c.updateSettingValue(a,n))}),Wl(),bD(),Zi(5,"sh-icon",38),HC(6,"numpad"),Wl()();}if(t&2){let e=aC().$implicit,o=gC(3),n=zC(0);aC(2);let a=gC(10);bE(),vg("for",n),bE(),vg("ngTemplateOutlet",o),bE(),vg("ngTemplateOutlet",a)("ngTemplateOutletContext",eb(8,V,eb(6,I,e.FormView))),bE(),vg("id",n)("ngModel",e.Value()),MD();}}function mt(t,i){t&1&&wg(0);}function dt(t,i){t&1&&wg(0);}function ut(t,i){if(t&1){let e=ET();Zi(0,"sh-toggle",30)(1,"label",39),cg(2,mt,1,0,"ng-container",36)(3,dt,1,0,"ng-container",41),Wl(),Zi(4,"input",49),Hg("ngModelChange",function(n){Pd(e);let a=aC().$implicit,c=aC(2);return Ld(c.updateSettingValue(a,n))}),Wl(),bD(),Wl();}if(t&2){let e=aC().$implicit,o=gC(3),n=zC(0);aC(2);let a=gC(10);bE(),vg("for",n),bE(),vg("ngTemplateOutlet",o),bE(),vg("ngTemplateOutlet",a)("ngTemplateOutletContext",eb(8,V,eb(6,I,e.FormView))),bE(),vg("id",n)("ngModel",e.Value()),MD();}}function Ct(t,i){t&1&&wg(0);}function gt(t,i){t&1&&wg(0);}function ft(t,i){if(t&1&&HC(0),t&2){let e=i.$implicit;Yl(" ",e," ");}}function yt(t,i){if(t&1){let e=ET();Zi(0,"sh-select",50)(1,"label",39),cg(2,Ct,1,0,"ng-container",36)(3,gt,1,0,"ng-container",41),Wl(),Zi(4,"input",51),Hg("ngModelChange",function(n){Pd(e);let a=aC().$implicit,c=aC(2);return Ld(c.updateSettingValue(a,n))}),Wl(),bD(),Wl(),cg(5,ft,1,1,"ng-template",null,4,db);}if(t&2){let e=gC(6),o=aC().$implicit,n=gC(3),a=zC(0);aC(2);let c=gC(10);vg("options",o.FormView.options)("selectMultiple",true)("optionTemplate",e),bE(),vg("for",a),bE(),vg("ngTemplateOutlet",n),bE(),vg("ngTemplateOutlet",c)("ngTemplateOutletContext",eb(10,V,eb(8,I,o.FormView))),bE(),vg("ngModel",o.Value()),MD();}}function Tt(t,i){t&1&&wg(0);}function xt(t,i){t&1&&wg(0);}function St(t,i){if(t&1){let e=ET();Zi(0,"app-timespan",47),Hg("ngModelChange",function(n){Pd(e);let a=aC().$implicit,c=aC(2);return Ld(c.updateSettingValue(a,n))}),Zi(1,"label",39),cg(2,Tt,1,0,"ng-container",36)(3,xt,1,0,"ng-container",41),Wl()(),bD();}if(t&2){let e=aC().$implicit,o=gC(3),n=zC(0);aC(2);let a=gC(10);vg("inputType",e.Name)("ngModel",e.Value())("customId",n),MD(),bE(),vg("for",n),bE(),vg("ngTemplateOutlet",o),bE(),vg("ngTemplateOutlet",a)("ngTemplateOutletContext",eb(9,V,eb(7,I,e.FormView)));}}function Ot(t,i){if(t&1){let e=ET();dm(0)(1),cg(2,De,6,5,"ng-template",null,2,db),Zi(4,"div",25),lT(5,Ge,13,3,"div",26)(6,Be,4,11,"app-file-tree",27)(7,ze,3,6,"app-file-tree",28)(8,Qe,10,12,"sh-form-field")(9,tt,9,12,"sh-form-field")(10,at,7,13)(11,_t,4,11,"app-size",29)(12,ct,7,10,"sh-form-field")(13,ut,5,10,"sh-toggle",30)(14,yt,7,12)(15,St,4,11,"app-timespan",29),Zi(16,"button",31),Hg("click",function(){let n=Pd(e).$implicit,a=aC(2);return Ld(a.removeSetting(n))}),Zi(17,"sh-icon"),HC(18,"x-bold"),Wl()()();}if(t&2){let e=i.$implicit,o=i.$index,n=aC(2);GC("destination-"+e.Name+o),bE(),GC(n.inAppOptions(e.Name)),bE(3),Kg("align-remove-start",e.FormView.type==="FolderTree"||e.FormView.type==="FileTree"||e.FormView.type==="Boolean"),bE(),uT(e.FormView.type==="FreeText"?5:e.FormView.type==="FileTree"?6:e.FormView.type==="FolderTree"?7:e.FormView.type==="String"||e.FormView.type==="Path"||e.FormView.type==="Decimal"||e.FormView.type==="Email"||e.FormView.type==="Hostname"||e.FormView.type==="Bucketname"?8:e.FormView.type==="Password"?9:e.FormView.type==="Enumeration"?10:e.FormView.type==="Size"?11:e.FormView.type==="Integer"?12:e.FormView.type==="Boolean"?13:e.FormView.type==="Flags"?14:e.FormView.type==="Timespan"||e.FormView.type==="DateTime"?15:-1);}}function Ft(t,i){if(t&1&&(lT(0,Ee,2,0,"div",24),pT(1,Ot,19,5,null,null,dT)),t&2){let e=aC();uT(e.selectedSettings().length===0?0:-1),bE(),hT(e.selectedSettings());}}function ht(t,i){if(t&1&&(Zi(0,"sh-icon",52),HC(1,"x-circle"),Wl()),t&2){aC();let e=zC(0);vg("shTooltip",e?.message??"Invalid value");}}function wt(t,i){if(t&1&&(Zi(0,"sh-icon",34),HC(1,"warning"),Wl()),t&2){aC();let e=zC(0);vg("shTooltip",e?.message??"Invalid value");}}function Lt(t,i){if(t&1&&(dm(0),lT(1,ht,2,1,"sh-icon",52)(2,wt,2,1,"sh-icon",34)),t&2){aC();let e=zC(0),o=aC().$implicit,n=GC(o.formView.validate(e));bE(),uT(n?.type==="error"?1:n?.type==="warning"?2:-1);}}function It(t,i){if(t&1&&(dm(0),lT(1,Lt,3,2)),t&2){let e=aC().$implicit,n=(GC(e.Value())??"").toString().trim()==="";bE(),uT(!n&&e.formView.validate?1:-1);}}function Vt(t,i){if(t&1&&lT(0,It,2,2),t&2){let e=i.$implicit;uT(e.Value?0:-1);}}var Oe=class t{#e=T(f);options=D1.required();hiddenOptions=E1([]);hasFreeTextSettings=E1(false);applicationOptions=E1();showTextArea=Ge$1(false);showOptionNames=Ge$1(false);allOptionsGrouped=this.#e.allOptionsGrouped;allOptions=this.#e.allOptions;selectedSettings=Nt(()=>{let i=this.hiddenOptions();return this.options().map(n=>{let a=this.allOptions().find(L=>L.name===n.Name?.replace("--","")),c=n.Value??"";if(a&&i.includes(a.name))return null;if(a){if(a.type==="Boolean"&&(c=this.isTrue(c)),a.type==="Integer"&&(c=parseInt(c)||0),a.type==="Enumeration"&&a.options){let M=c?.trim().toLowerCase(),q=a.options.find(Fe=>(Fe??"").trim().toLocaleLowerCase()===M);q&&(c=q);}let L=Se.find(M=>M.name===a?.name);return L&&(a=l(l({},a),L)),m(l({},n),{Value:Ge$1(c),FormView:a})}else if(this.hasFreeTextSettings())return m(l({},n),{Value:Ge$1(c),FormView:{name:n.Name,type:"FreeText",shortDescription:"Custom settings argument",longDescription:"Custom settings argument"}});return null}).filter(n=>n!==null)});nonSelectedOptionsGrouped=Nt(()=>{let i=this.options().map(o=>o.Name?.replace("--","")),e=this.hiddenOptions();return this.allOptionsGrouped().map(o=>m(l({},o),{options:o.options.filter(n=>!i.includes(n.name)&&!e.includes(n.name))})).filter(o=>o.options.length>0)});settingsAsText=Nt(()=>this.selectedSettings().map(i=>{let e=i.Value(),o="";return typeof e=="boolean"?o=this.isTrue(e)?"True":"False":(typeof e=="number"||e!=null)&&(o=e.toString()),`${i.Name??""}=${o}`}).join(`
2
+ `));updateSettingsFromText(i){if(typeof i!="string")return;let e=Te(i);this.options.update(()=>e);}isTrue(i){if(typeof i=="boolean")return i;if(typeof i=="string"){let e=i.toLowerCase();return e==="true"||e==="1"||e==="yes"||e==="on"}return false}inAppOptions(i){let e=this.applicationOptions()?.findIndex(o=>o.Name?.replace("--","")===i);return e===void 0?false:e>-1}addFreeTextSetting(){this.hasFreeTextSettings()&&this.options.update(i=>[...i,{Filter:null,Name:"",Value:""}]);}addSetting(i){this.options.update(e=>{let o=i.defaultValue??"";return i.type==="Boolean"&&(o=this.isTrue(o)),i.type==="Integer"&&(o=parseInt(o)||0),[...e,{Name:i.name,Value:o}]});}updateSettingValue(i,e){this.options.update(o=>{let n=[...o],a=n.findIndex(c=>c.Name===i.Name);if(i.FormView.type==="Boolean")return n[a].Value=this.isTrue(e)?"True":"False",n;if(i.FormView.type==="Integer")return n[a].Value=e.toString(),n;if(i.FormView.type==="Enumeration"&&i.FormView.options){let c=e?.trim().toLowerCase()??"",L=i.FormView.options.find(M=>(M??"").trim().toLocaleLowerCase()===c);if(L)return n[a].Value=L,n}return n[a].Value=e,n});}updateFreeTextSettingName(i,e){this.options.update(o=>{let n=[...o],a=n.findIndex(c=>c.Name===i.Name);return n[a].Name=e,n});}removeSetting(i){this.options.update(e=>e.filter(o=>o.Name!==i.Name));}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=gw({type:t,selectors:[["app-options-list"]],inputs:{options:[1,"options"],hiddenOptions:[1,"hiddenOptions"],hasFreeTextSettings:[1,"hasFreeTextSettings"],applicationOptions:[1,"applicationOptions"]},outputs:{options:"optionsChange"},decls:11,vars:4,consts:()=>{let i;i=$localize`Advanced options`;let e;e=$localize` Show editor ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let o;o=$localize` Add advanced option ${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SH_ICON:`;let n;n=$localize`${"\uFFFD#7\uFFFD"}:START_TAG_SH_ICON:pen${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SH_ICON: New custom option `;let a;a=$localize`${"\uFFFD#14\uFFFD"}:START_TAG_SH_ICON:wrench${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SH_ICON: Toggle option names `;let c;return c=$localize`By adding this option it will override the matching global option`,[["validateTemplate",""],["option",""],["defaultLabel",""],["enumOptionTemplate",""],["optionTemplate",""],i,e,o,n,a,[3,"disableToggle","isActive"],["title",""],[1,"actions"],["shButton","","type","button",1,"outlined","small"],["wrap","off","placeholder","Paste advanced options here, one per line.",1,"raw-text-area",3,"ngModel","ngModelOptions"],["shButton","","type","button",1,"outlined","small",3,"click"],[3,"searchable"],["menu",""],["type","button",3,"deprecated"],["type","button",3,"click"],[1,"option-col"],["shButton","","type","button",1,"small"],["shButton","","type","button",1,"small",3,"click"],["wrap","off","placeholder","Paste advanced options here, one per line.",1,"raw-text-area",3,"ngModelChange","ngModel","ngModelOptions"],[1,"placeholder"],[1,"field-row"],[1,"form-column"],[3,"startingPath","accepts","showFiles","showHiddenNodes","selectFiles","hideShortcuts","resolvePaths"],[3,"startingPath","hideShortcuts","resolvePaths"],[3,"inputType","ngModel","customId"],[1,"primary","raised"],["shButton","","type","button",1,"outlined","small","remove-btn",3,"click"],["shTooltip",c,1,"error"],[1,"optionname"],[1,"warn",3,"shTooltip"],[1,"primary",3,"shTooltip"],[4,"ngTemplateOutlet"],["type","text",3,"ngModelChange","ngModel"],["prefix",""],[3,"for"],["type","text",3,"ngModelChange","id","ngModel"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"ngModelChange","type","id","ngModel"],["autocomplete","new-password",3,"ngModelChange","type","id","ngModel"],["suffix","",1,"clickable"],["suffix","",1,"clickable",3,"click"],[3,"options","isClearable","optionTemplate"],[3,"ngModelChange","inputType","ngModel","customId"],["type","number",3,"ngModelChange","id","ngModel"],["type","checkbox",3,"ngModelChange","id","ngModel"],[1,"primary","raised",3,"options","selectMultiple","optionTemplate"],["type","text","id","text",3,"ngModelChange","ngModel"],[1,"error",3,"shTooltip"]]},template:function(e,o){e&1&&(Zi(0,"sh-toggle-card",10),zl(1,11)(2),oC(3,5),Ql(),Zi(4,"div",12),lT(5,we,3,0,"button",13)(6,Ne,8,2),Wl(),Ql(),lT(7,be,1,3,"textarea",14)(8,Ft,3,1),Wl(),cg(9,Vt,1,1,"ng-template",null,0,db)),e&2&&(vg("disableToggle",true)("isActive",true),bE(5),uT(o.showTextArea()?5:6),bE(2),uT(o.showTextArea()?7:8));},dependencies:[Bn,Ze$1,en,yt$1,Rn,Jt,le,q,Z,ei,I$1,Fe,v,ve$1,at$1,N,Nt$1,J],styles:["[_nghost-%COMP%]{display:block}sh-select[_ngcontent-%COMP%]{--miw: p2r(120)}sh-toggle[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:1rem}.placeholder[_ngcontent-%COMP%]{color:var(--base-9);text-align:center;padding:2rem 1rem}.field-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;position:relative;z-index:1;max-width:32.5rem;width:100%}.field-row[_ngcontent-%COMP%] .remove-btn[_ngcontent-%COMP%]{align-self:flex-end}.field-row[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]:first-child{max-width:28rem;width:100%}.field-row.align-remove-start[_ngcontent-%COMP%] .remove-btn[_ngcontent-%COMP%]{align-self:flex-start}.option-col[_ngcontent-%COMP%]{display:flex;flex-direction:column}.option-col[_ngcontent-%COMP%] .fill[_ngcontent-%COMP%]{color:var(--base-12)}.form-column[_ngcontent-%COMP%]{display:flex;gap:.25rem;flex-direction:column}label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}sh-icon[_ngcontent-%COMP%]{font-size:1rem}.form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:3fr 1fr;gap:.5rem;align-items:flex-end}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;justify-content:flex-end}.deprecated[_ngcontent-%COMP%]{text-decoration:line-through}.optionname[_ngcontent-%COMP%]{font-family:monospace}.raw-text-area[_ngcontent-%COMP%]{min-height:12rem;white-space:pre}"]})};export{Oe as OptionsListComponent};
@@ -0,0 +1,2 @@
1
+ import {ShipTable as ot}from'./chunk-DkVHfoYw.js';import'./chunk-CKUlUN3q.js';import'./chunk-BGuvkLC9.js';import {T,ab as J,G as Ge,Q as Qa,ad as sy,C as Zu,aj as m,ak as l,g as gw,a as N,v,aL as ci,Z as Zi,o as oC,W as Wl,d as Ig,a1 as pT,w as Hg,F as Fg,l as lT,j as jg,ah as Yg,z as vg,b as bE,a2 as hT,c as uT,i as ET,P as Pd,h as aC,L as Ld,H as HC,aO as sb,J as im,aP as lb,K as Kg,aq as dT}from'./main-2ZYVV4C4.js';function j(o,e){if(o&1&&(Zi(0,"li"),HC(1),Wl()),o&2){let t=e.$implicit;bE(),im(t);}}function K(o,e){if(o&1&&(Zi(0,"tr")(1,"td",12)(2,"code")(3,"ol",13),pT(4,j,2,1,"li",null,dT),Wl()()()()),o&2){let t=aC().$implicit,n=aC();bE(),Yg("grid-column","1 / -1")("height","auto"),bE(3),hT(n.breakIntoLines(t.Exception));}}function V(o,e){if(o&1){let t=ET();Zi(0,"tr",9),Hg("click",function(){let _=Pd(t).$index,m=aC();return Ld(m.toggleRow(_))}),Zi(1,"td"),HC(2),sb(3,"date"),Wl(),Zi(4,"td",10),HC(5),Wl(),Zi(6,"td"),HC(7),Wl(),Zi(8,"td")(9,"button",11)(10,"sh-icon"),HC(11,"caret-down"),Wl()()()(),lT(12,K,6,4,"tr");}if(o&2){let t=e.$implicit,n=e.$index,_=aC();bE(2),im(t.Timestamp?lb(3,6,t.Timestamp*1e3,"medium"):"-"),bE(3),im(t.BackupID>=0?t.BackupID:"-"),bE(2),im(t.Message),bE(2),Kg("rotated-icon",n===_.openRowIndex()),bE(3),uT(n===_.openRowIndex()?12:-1);}}function q(o,e){o&1&&oC(0,4,1);}function H(o,e){o&1&&oC(0,4,2);}var Q=["BackupID","Timestamp","Message","actions"],M=class o{#e=T(J);displayedColumns=Ge(Q);openRowIndex=Ge(null);noMoreItems=Ge(false);logsIsLoading=Ge(false);logs=Ge([]);pagination=Ge({offsetTime:void 0,pagesize:10});paginationEffect=Qa(()=>{this.pagination();this.getLogs();});ngOnInit(){this.getLogs();}getLogs(){this.logsIsLoading.set(true);let e=this.pagination();sy(()=>this.#e.getApiV1LogdataLog({query:{pagesize:e.pagesize,offset:e.offsetTime}})).pipe(Zu(()=>this.logsIsLoading.set(false))).subscribe({next:t=>{t.length===0&&this.noMoreItems.set(true),this.logs.update(n=>[...n,...t]);}});}toggleRow(e){this.openRowIndex.set(e===this.openRowIndex()?null:e);}breakIntoLines(e){return e?e.split(`
2
+ `):[]}loadMore(){let e=this.logs().at(-1)?.Timestamp;this.pagination.update(t=>m(l({},t),{offsetTime:e}));}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=gw({type:o,selectors:[["app-logs-stored"]],decls:18,vars:6,consts:()=>{let e;e=$localize`Timestamp`;let t;t=$localize`Backup ID`;let n;n=$localize`Message`;let _;_=$localize`No data available`;let m;return m=$localize`${"\uFFFD*16:1\uFFFD"}:START_BLOCK_IF: No more items ${"\uFFFD/*16:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*17:2\uFFFD"}:START_BLOCK_ELSE: Load more ${"\uFFFD/*17:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,[e,t,n,_,m,[1,"type-b",3,"data","loading"],["thead",""],["table-no-rows",""],["shButton","",1,"primary","raised",3,"click","disabled"],[3,"click"],[1,"id"],["shButton","","type","button",1,"outlined","small"],[2,"white-space","pre-wrap"],[1,"line-numbers-ol"]]},template:function(t,n){if(t&1&&(Zi(0,"sh-table",5)(1,"tr",6)(2,"th"),oC(3,0),Wl(),Zi(4,"th"),oC(5,1),Wl(),Zi(6,"th"),oC(7,2),Wl(),Ig(8,"th"),Wl(),pT(9,V,13,9,null,null,dT),Zi(11,"div",7),oC(12,3),Wl()(),Zi(13,"footer")(14,"button",8),Hg("click",function(){return n.loadMore()}),Fg(15,4),lT(16,q,1,0)(17,H,1,0),jg(),Wl()()),t&2){let _=n.logs();Yg("grid-template-columns","1fr 1fr 1fr auto"),vg("data",_)("loading",n.logsIsLoading()),bE(9),hT(_),bE(5),vg("disabled",n.logsIsLoading()||n.noMoreItems()),bE(2),uT(n.noMoreItems()?16:17);}},dependencies:[ot,N,v,ci],styles:["[_nghost-%COMP%]{display:block}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}sh-table[_ngcontent-%COMP%]{--table-columns: auto auto 1fr auto}sh-table[_ngcontent-%COMP%] td.id[_ngcontent-%COMP%]{justify-content:center}sh-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:has(code){padding:1rem .75rem;overflow:hidden}sh-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:has(code) 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}footer[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding:2rem 0 0}"]})};export{M as default};
@@ -0,0 +1 @@
1
+ import {c}from'./chunk-BJOhC2d8.js';import {T,f,N as Nt,G as Ge,g as gw,a as N,bS as ei,Z as Zi,o as oC,W as Wl,b4 as cg,b_ as gC,b as bE,z as vg,b0 as eb,bT as wg,a1 as pT,ah as Yg,a2 as hT,i as ET,w as Hg,P as Pd,h as aC,L as Ld,l as lT,H as HC,K as Kg,c as uT,J as im,aH as tb,c0 as db}from'./main-2ZYVV4C4.js';var Y=e=>({children:e,level:0}),L=e=>({$implicit:e}),j=(e,n)=>({children:e,level:n}),V=(e,n)=>n.id;function z(e,n){if(e&1&&(Zi(0,"sh-icon"),HC(1,"caret-down"),Wl()),e&2){let t=aC().$implicit;Kg("open",t.isOpen());}}function B(e,n){e&1&&(Zi(0,"sh-icon"),HC(1,"dot"),Wl());}function J(e,n){e&1&&wg(0);}function U(e,n){if(e&1&&cg(0,J,1,0,"ng-container",3),e&2){let t=aC().$implicit,o=aC().$implicit;aC();let i=gC(3);vg("ngTemplateOutlet",i)("ngTemplateOutletContext",eb(5,L,tb(2,j,t.children,o.level+1)));}}function X(e,n){if(e&1){let t=ET();Zi(0,"div",4,1),Hg("click",function(){let i=Pd(t).$implicit,G=aC(2);return Ld(i.children.length>0&&G.toggleNode(i))}),lT(2,z,2,2,"sh-icon",5)(3,B,2,0,"sh-icon"),Zi(4,"div",6),HC(5),Wl()(),lT(6,U,1,7,"ng-container");}if(e&2){let t=n.$implicit;Kg("cannot-toggle",t.children.length===0)("open",t.isOpen()),bE(2),uT(t.children.length>0?2:3),bE(3),im(t.text),bE(),uT(t.isOpen()?6:-1);}}function q(e,n){if(e&1&&(Zi(0,"sh-list"),pT(1,X,7,7,null,null,V),Wl()),e&2){let t=n.$implicit;Yg("padding-left",t.level*.25,"rem"),bE(),hT(t.children);}}function H(e,n){e&1&&wg(0);}var S=class e{#e=T(f);treeStructure=Nt(()=>{let n=this.#e.systemInfo();return this.processObject(n,0)});toggleNode(n){n.isOpen.update(t=>!t);}processObject(n,t){let o=[];for(let i in n)typeof n[i]=="object"?o.push({id:i,text:i,children:this.processObject(n[i],t+1),level:t,isOpen:Ge(false)}):o.push({id:i,text:`${i}: ${n[i]}`,children:[],level:t,isOpen:Ge(false)});return o}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=gw({type:e,selectors:[["app-server-settings"]],decls:5,vars:6,consts:()=>{let n;return n=$localize`System info`,[["recursiveTree",""],["treeNode",""],n,[4,"ngTemplateOutlet","ngTemplateOutletContext"],["action","",3,"click"],[3,"open"],[1,"text"]]},template:function(t,o){if(t&1&&(Zi(0,"h3"),oC(1,2),Wl(),cg(2,q,3,2,"ng-template",null,0,db)(4,H,1,0,"ng-container",3)),t&2){let i=gC(3);bE(4),vg("ngTemplateOutlet",i)("ngTemplateOutletContext",eb(4,L,eb(2,Y,o.treeStructure())));}},dependencies:[c,N,ei],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;padding:0 2.5rem}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}sh-icon[_ngcontent-%COMP%]{font-size:1rem}sh-list[_ngcontent-%COMP%]{padding:0}sh-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]{padding:0}sh-list[_ngcontent-%COMP%] [action].cannot-toggle[_ngcontent-%COMP%]{cursor:initial}"]})};export{S as default};
@@ -0,0 +1 @@
1
+ import v$1 from'./chunk-CLlZiOaO.js';import'./chunk-D6y9RCQD.js';import'./chunk-DkVHfoYw.js';import {z}from'./chunk-C1-31fA7.js';import'./chunk-iU19kwHx.js';import {c}from'./chunk-BJOhC2d8.js';import'./chunk-CKUlUN3q.js';import {T,aY as D,ab as J,a6 as be$1,G as Ge,N as Nt,bf as b,ad as sy,g as gw,bg as Fi,bh as Jt,bi as Kn,v,a as N,bj as pi,aL as ci,aJ as m,b3 as m$1,Z as Zi,l as lT,b4 as cg,H as HC,W as Wl,o as oC,d as Ig,w as Hg,K as Kg,b as bE,c as uT,z as vg,J as im,aa as Yl,bk as B,Q as Qa,a_ as ee,i as ET,aO as sb,a1 as pT,P as Pd,h as aC,L as Ld,aP as lb,aD as sm,aT as cb,a2 as hT,at as Gd,bl as zd,aR as zl,aS as Ql,aq as dT}from'./main-2ZYVV4C4.js';import {f}from'./chunk-CFgDqLU0.js';import {d}from'./chunk-BGuvkLC9.js';import'./chunk-iGzJokt-.js';import'./chunk-CnZx831x.js';var G=class r{#e=T(D);#n=T(B);#i=Ge([]);recentFiles=this.#i.asReadonly();#r=5;#s=Ge(null);etaData=this.#s.asReadonly();#a=null;#t=null;#o=null;recentFileEffect=Qa(()=>{let i=this.#e.statusData();i&&i.CurrentFilename&&i.CurrentFilesize!==void 0&&this.#c(i.CurrentFilename,i.CurrentFilesize);});#c(i,e){let s=new Date;this.#i.update(c=>c.length>0&&c[0].filename===i?c:[{filename:i,filesize:e,timestamp:s},...c].slice(0,this.#r));}activateView(){this.#a=new Date;let i=this.#e.statusData();i&&i.ProcessedFileCount!==void 0&&i.ProcessedFileSize!==void 0&&(this.#t={files:i.ProcessedFileCount,bytes:i.ProcessedFileSize}),this.#o=setInterval(()=>{this.#l();},1e3);}deactivateView(){this.#a=null,this.#t=null,this.#o&&(clearInterval(this.#o),this.#o=null);}#l(){if(!this.#a||!this.#t)return;let i=this.#e.statusData();if(!i)return;let e=new Date,s=(e.getTime()-this.#a.getTime())/1e3;if(s<5)return;let c=i.ProcessedFileCount||0,P=i.ProcessedFileSize||0,I=c-this.#t.files,k=P-this.#t.bytes,x=I/s,M=k/s,A=(i.TotalFileCount||0)-c,u=(i.TotalFileSize||0)-P,O=null,T=null;x>0&&(O=A/x),M>0&&(T=u/M);let R=null,w="bytes";if(O!==null&&T!==null){let Pe=Math.max(O,T);R=new Date(e.getTime()+Pe*1e3),w=O>T?"files":"bytes";}else O!==null?(R=new Date(e.getTime()+O*1e3),w="files"):T!==null&&(R=new Date(e.getTime()+T*1e3),w="bytes");this.#s.set({startTime:this.#a,filesProcessedAtStart:this.#t.files,bytesProcessedAtStart:this.#t.bytes,currentFilesPerSecond:x,currentBytesPerSecond:M,estimatedCompletion:R,metric:w});}static \u0275fac=function(e){return new(e||r)};static \u0275prov=ee({token:r,factory:r.\u0275fac,providedIn:"root"})};function Me(r,i){if(r&1&&(Zi(0,"div",42)(1,"span",20),HC(2,"Processing"),Wl(),Zi(3,"sh-list",43)(4,"div",44)(5,"sh-icon"),HC(6,"file"),Wl(),Zi(7,"div",45)(8,"span",46),HC(9),Wl(),Zi(10,"span",47),HC(11),sb(12,"bytes"),Wl()()()()()),r&2){let e=aC(2);bE(8),vg("title",e.statusData()?.CurrentFilename),bE(),Yl(" ",e.statusData()?.CurrentFilename," "),bE(2),im(cb(12,3,e.statusData()?.CurrentFilesize));}}function Oe(r,i){if(r&1&&(Zi(0,"div",35)(1,"span",46),HC(2),Wl(),Zi(3,"span",47),HC(4),sb(5,"bytes"),Wl()()),r&2){let e=i.$implicit;bE(),vg("title",e.filename),bE(),im(e.filename),bE(2),im(cb(5,3,e.filesize));}}function Te(r,i){r&1&&(Zi(0,"div",36),oC(1,2),Wl());}function ve(r,i){if(r&1&&(Zi(0,"sh-list")(1,"div",48)(2,"span",20),HC(3,"ETA"),Wl(),Zi(4,"span",21),HC(5),sb(6,"date"),Zi(7,"span",49),HC(8),sb(9,"relativeTime"),Wl()()(),Zi(10,"div",50)(11,"span",20),HC(12,"Files/s"),Wl(),Zi(13,"span",21),HC(14),sb(15,"number"),Wl()(),Zi(16,"div",50)(17,"span",20),HC(18,"Upload Speed"),Wl(),Zi(19,"span",21),HC(20),sb(21,"bytes"),Wl()()()),r&2){let e=aC(2);bE(5),Yl(" ",lb(6,4,e.etaData()?.estimatedCompletion,"mediumTime")," "),bE(3),Yl(" (",cb(9,7,e.etaData()?.estimatedCompletion),") "),bE(6),Yl(" ",lb(15,9,e.etaData()?.currentFilesPerSecond,"1.1-1")," "),bE(6),Yl("",cb(21,12,e.etaData()?.currentBytesPerSecond),"/s");}}function he(r,i){if(r&1&&(Zi(0,"div",53)(1,"div",54)(2,"span",55),HC(3),Wl(),Zi(4,"span",56),HC(5),sb(6,"bytes"),Wl()(),Ig(7,"sh-progress-bar",57),Wl()),r&2){let e=i.$implicit;bE(2),vg("title",e.BackendPath),bE(),im(e.BackendPath),bE(2),Yl("",cb(6,4,e.BackendSpeed),"/s"),bE(2),vg("value",(e.BackendFileProgress||0)/(e.BackendFileSize||1)*100);}}function ye(r,i){if(r&1&&(Zi(0,"div",51)(1,"sh-list"),cg(2,he,8,6,"div",52),Wl()()),r&2){let e=aC(2);bE(2),vg("ngForOf",e.statusData()?.ActiveTransfers);}}function Ee(r,i){if(r&1){let e=ET();Zi(0,"sh-card")(1,"div",13)(2,"div",14)(3,"sh-icon",15),HC(4,"clock"),Wl(),Zi(5,"h2"),HC(6),Wl()()(),Zi(7,"div",26)(8,"div",27)(9,"span",28),HC(10),sb(11,"number"),Wl()(),Ig(12,"sh-progress-bar",29),Zi(13,"sh-list")(14,"div",30)(15,"span",20),HC(16,"Files"),Wl(),Zi(17,"span",21),HC(18),Wl()(),Zi(19,"div",30)(20,"span",20),HC(21,"Size"),Wl(),Zi(22,"span",21),HC(23),sb(24,"bytes"),sb(25,"bytes"),Wl()()()()(),Zi(26,"sh-card")(27,"div",13)(28,"div",14)(29,"sh-icon",15),HC(30,"file"),Wl(),Zi(31,"h3"),HC(32,"Activity"),Wl()()(),Zi(33,"div",31),cg(34,Me,13,5,"div",32),Zi(35,"div",33)(36,"span",20),oC(37,1),Wl(),Zi(38,"sh-list",34),pT(39,Oe,6,5,"div",35,dT),lT(41,Te,2,0,"div",36),Wl()()()(),Zi(42,"sh-card")(43,"div",13)(44,"div",14)(45,"sh-icon",15),HC(46,"gauge"),Wl(),Zi(47,"h3"),HC(48,"Performance"),Wl()(),Zi(49,"div",37),HC(50),sb(51,"bytes"),Wl()(),Zi(52,"div",38),cg(53,ve,22,14,"sh-list",25),Zi(54,"div",39)(55,"button",40),Hg("click",function(){Pd(e);let c=aC();return Ld(c.toggleTransfers())}),HC(56),Wl(),cg(57,ye,3,1,"div",41),Wl()()();}if(r&2){let e=aC();bE(6),im(e.statusText()),bE(4),Yl("",lb(11,13,e.progress(),"1.0-0"),"%"),bE(2),vg("value",e.progress()),bE(6),sm("",e.statusData()?.ProcessedFileCount," / ",e.statusData()?.TotalFileCount),bE(5),sm(" ",cb(24,16,e.statusData()?.ProcessedFileSize)," / ",cb(25,18,e.statusData()?.TotalFileSize)," "),bE(11),vg("ngIf",e.statusData()?.CurrentFilename),bE(5),hT(e.recentFiles()),bE(2),uT(e.recentFiles().length===0?41:-1),bE(9),Yl("",cb(51,20,e.statusData()?.BackendSpeed),"/s"),bE(3),vg("ngIf",e.etaData()),bE(3),Yl(" ",e.transfersExpanded()?"Hide Details":"Show Details"," "),bE(),vg("ngIf",e.transfersExpanded());}}function be(r,i){if(r&1&&(Zi(0,"sh-card",75)(1,"div",13)(2,"div",14)(3,"sh-icon",15),HC(4,"calendar"),Wl(),Zi(5,"h3"),oC(6,7),Wl()()(),Zi(7,"div",76)(8,"div",77)(9,"span",78),HC(10),Wl(),Zi(11,"div",79)(12,"span",80),HC(13),sb(14,"date"),Wl(),Zi(15,"span",81),HC(16),sb(17,"relativeTime"),Wl()()(),Zi(18,"sh-icon",82),HC(19,"caret-right"),Wl()()()),r&2){let e=aC(2);bE(10),im(e.nextBackup().backup?.Name),bE(3),im(lb(14,3,e.nextBackup().time,"medium")),bE(3),Yl("(",cb(17,6,e.nextBackup().time),")");}}function Ne(r,i){r&1&&(Zi(0,"span",74),oC(1,8),Wl());}function Ie(r,i){if(r&1){let e=ET();Zi(0,"sh-card",58)(1,"div",59)(2,"div",60)(3,"div",61),Gd(),Zi(4,"svg",62),Ig(5,"circle",63),Wl(),zd(),Zi(6,"sh-icon",64),oC(7,3),Wl()()(),Zi(8,"div",65)(9,"h2"),oC(10,4),Wl(),Zi(11,"p",66),oC(12,5),Wl()(),Zi(13,"div",67)(14,"button",68),Hg("click",function(){Pd(e);let c=aC();return Ld(c.pauseResume())}),Zi(15,"sh-icon"),HC(16),Wl(),HC(17),Wl()()()(),cg(18,be,20,8,"sh-card",69),Zi(19,"sh-card",70)(20,"div",71)(21,"span",20),oC(22,6),Wl(),Zi(23,"div",72)(24,"span",73),HC(25),Wl(),lT(26,Ne,2,0,"span",74),Wl()()();}if(r&2){let e=aC();bE(14),vg("color",e.clientIsRunning()?"primary":"accent"),bE(2),im(e.clientIsRunning()?"pause":"play"),bE(),Yl(" ",e.clientIsRunning()?"Pause Execution":"Resume Execution"," "),bE(),vg("ngIf",e.nextBackup()),bE(6),Kg("running",e.clientIsRunning()),bE(),im(e.serverState()?.ProgramState),bE(),uT(e.clientIsRunning()?-1:26);}}function ke(r,i){if(r&1&&(Zi(0,"div",35)(1,"span",46),HC(2),Wl(),Zi(3,"span",47),HC(4),sb(5,"bytes"),Wl()()),r&2){let e=i.$implicit;bE(),vg("title",e.filename),bE(),im(e.filename),bE(2),im(cb(5,3,e.filesize));}}function Ae(r,i){if(r&1&&(Zi(0,"sh-card",83)(1,"div",13)(2,"div",14)(3,"sh-icon",15),HC(4,"clock-counter-clockwise"),Wl(),Zi(5,"h3"),oC(6,9),Wl()()(),Zi(7,"sh-list"),cg(8,ke,6,5,"div",84),Wl()()),r&2){let e=aC();bE(8),vg("ngForOf",e.recentFiles());}}function Re(r,i){if(r&1&&(Zi(0,"div",19)(1,"span",20),HC(2,"Next Task:"),Wl(),Zi(3,"div",21)(4,"div"),HC(5),Wl(),Zi(6,"div",49),HC(7),sb(8,"date"),sb(9,"relativeTime"),Wl()()()),r&2){let e=aC();bE(5),im(e.nextBackup().backup?.Name),bE(2),sm(" ",lb(8,3,e.nextBackup().time,"medium")," (",cb(9,6,e.nextBackup().time),") ");}}function we(r,i){if(r&1){let e=ET();zl(0),Zi(1,"button",85),Hg("click",function(){Pd(e);let c=aC();return Ld(c.stop())}),Zi(2,"sh-icon"),HC(3,"stop"),Wl(),HC(4," Stop "),Wl(),Zi(5,"button",85),Hg("click",function(){Pd(e);let c=aC();return Ld(c.abort())}),Zi(6,"sh-icon"),HC(7,"x-circle"),Wl(),HC(8," Abort "),Wl(),Ql();}}var X=class r{#e=T(D);#n=T(G);#i=T(J);#r=T(be$1);statusData=this.#e.statusData;serverState=this.#e.serverState;recentFiles=this.#n.recentFiles;etaData=this.#n.etaData;transfersExpanded=Ge(false);clientIsRunning=this.#e.clientIsRunning;statusText=Nt(()=>{let i=this.statusData()?.Phase;return b(i)});progress=Nt(()=>{let i=this.statusData();return i?(i.OverallProgress||0)*100:0});nextBackup=Nt(()=>({backup:this.serverState()?.ProposedSchedule?.[0]?.backup,time:this.serverState()?.ProposedSchedule?.[0]?.Item2}));ngOnInit(){this.#n.activateView();}ngOnDestroy(){this.#n.deactivateView();}toggleTransfers(){this.transfersExpanded.update(i=>!i);}isTaskRunning(){return !!this.statusData()?.TaskID}taskStartTime(){return this.etaData()?.startTime}currentBackupId(){return this.statusData()?.BackupID}pauseResume(){if(this.clientIsRunning()){this.#r.open(z,{maxWidth:"550px",width:"100%"});return}this.#e.pauseResume().subscribe();}stop(){let i=this.statusData()?.TaskID;i&&sy(()=>this.#i.postApiV1TaskByTaskidStop({path:{taskid:i}})).subscribe();}abort(){let i=this.statusData()?.TaskID;i&&sy(()=>this.#i.postApiV1TaskByTaskidAbort({path:{taskid:i}})).subscribe();}static \u0275fac=function(e){return new(e||r)};static \u0275cmp=gw({type:r,selectors:[["app-status"]],decls:29,vars:12,consts:()=>{let i;i=$localize`Live Logs`;let e;e=$localize`Recently Processed`;let s;s=$localize`No recent files`;let c;c=$localize`check-bold`;let P;P=$localize`System Ready`;let I;I=$localize`Waiting for the next scheduled backup task.`;let k;k=$localize`Server State`;let x;x=$localize`Next Scheduled Task`;let M;M=$localize`Backups are currently paused`;let A;return A=$localize`Recent Activity`,[i,e,s,c,P,I,k,x,M,A,[1,"status-page"],["class","activity-card",4,"ngIf"],[1,"logs-card"],[1,"card-header"],[1,"header-titl-group"],[1,"header-icon"],[1,"logs-content"],[3,"polling","whenFilter","backupIdFilter"],[1,"server-status-section"],[1,"status-row"],[1,"label"],[1,"value"],["class","status-row",4,"ngIf"],[1,"actions"],["shButton","",3,"click"],[4,"ngIf"],[1,"progress-content"],[1,"percentage-display"],[1,"percentage-value"],[3,"value"],["item","",1,"stat-item"],[1,"files-content"],["class","current-file-section",4,"ngIf"],[1,"recent-files-section"],[1,"recent-files-list"],["item","",1,"file-item"],["item","",1,"empty-state"],[1,"aggregate-speed"],[1,"performance-content"],[1,"transfers-section"],["shButton","","size","small",1,"toggle-btn","ghost",3,"click"],["class","transfer-details",4,"ngIf"],[1,"current-file-section"],[1,"current-file-list"],["item","",1,"file-item","current"],[1,"file-details"],[1,"filename",3,"title"],[1,"filesize"],["item","",1,"eta-item"],[1,"sub-text"],["item","",1,"metric-item"],[1,"transfer-details"],["class","transfer-item","item","",4,"ngFor","ngForOf"],["item","",1,"transfer-item"],[1,"transfer-header"],[1,"path",3,"title"],[1,"speed"],[1,"mini-progress",3,"value"],[1,"idle-hero-card"],[1,"idle-content"],[1,"status-visual"],[1,"complete-status"],[1,"border-svg"],["cx","50","cy","50","r","45",1,"border-circle"],[1,"status-icon"],[1,"status-info"],[1,"status-description"],[1,"idle-actions"],["shButton","",3,"click","color"],["class","next-task-hero",4,"ngIf"],[1,"server-state-card"],[1,"state-content"],[1,"state-line"],[1,"status-badge"],[1,"warning-text"],[1,"next-task-hero"],[1,"next-task-content"],[1,"task-main"],[1,"task-name"],[1,"task-time-group"],[1,"task-time"],[1,"task-relative"],[1,"chevron"],[1,"activity-card"],["class","file-item","item","",4,"ngFor","ngForOf"],["shButton","","color","warn",3,"click"]]},template:function(e,s){e&1&&(Zi(0,"div",10),lT(1,Ee,58,22)(2,Ie,27,8),cg(3,Ae,9,1,"sh-card",11),Zi(4,"sh-card",12)(5,"div",13)(6,"div",14)(7,"sh-icon",15),HC(8,"list"),Wl(),Zi(9,"h3"),oC(10,0),Wl()()(),Zi(11,"div",16),Ig(12,"app-logs-live",17),Wl()(),Zi(13,"sh-card")(14,"div",18)(15,"h3"),HC(16,"Server Status"),Wl(),Zi(17,"div",19)(18,"span",20),HC(19,"State:"),Wl(),Zi(20,"span",21),HC(21),Wl()(),cg(22,Re,10,8,"div",22),Zi(23,"div",23)(24,"button",24),Hg("click",function(){return s.pauseResume()}),Zi(25,"sh-icon"),HC(26),Wl(),HC(27),Wl(),cg(28,we,9,0,"ng-container",25),Wl()()()()),e&2&&(Kg("idle",!s.isTaskRunning()),bE(),uT(s.isTaskRunning()?1:2),bE(2),vg("ngIf",!s.isTaskRunning()&&s.recentFiles().length>0),bE(9),vg("polling",s.isTaskRunning())("whenFilter",s.taskStartTime()?.getTime())("backupIdFilter",s.currentBackupId()),bE(9),im(s.serverState()?.ProgramState),bE(),vg("ngIf",s.nextBackup()),bE(4),im(s.clientIsRunning()?"pause":"play_arrow"),bE(),Yl(" ",s.clientIsRunning()?"Pause":"Resume"," "),bE(),vg("ngIf",s.isTaskRunning()));},dependencies:[Fi,Jt,Kn,f,d,v,N,v$1,c,pi,ci,m,m$1],styles:["[_nghost-%COMP%]{display:block;padding:24px;max-width:1400px;margin:0 auto}.status-page[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr;gap:24px}@media(min-width:768px){.status-page[_ngcontent-%COMP%]{grid-template-columns:repeat(2,1fr)}}@media(min-width:1200px){.status-page[_ngcontent-%COMP%]{grid-template-columns:repeat(3,1fr)}}@media(min-width:1200px){.status-page[_ngcontent-%COMP%] .logs-card[_ngcontent-%COMP%], .status-page.idle[_ngcontent-%COMP%] .idle-hero-card[_ngcontent-%COMP%]{grid-column:span 2}.status-page.idle[_ngcontent-%COMP%] .next-task-hero[_ngcontent-%COMP%], .status-page.idle[_ngcontent-%COMP%] .server-state-card[_ngcontent-%COMP%]{grid-column:3}.status-page.idle[_ngcontent-%COMP%] .activity-card[_ngcontent-%COMP%], .status-page.idle[_ngcontent-%COMP%] .logs-card[_ngcontent-%COMP%]{grid-column:1/-1}}sh-card[_ngcontent-%COMP%]{height:100%;display:flex;flex-direction:column;--sh-card-padding: 24px}.card-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}.card-header[_ngcontent-%COMP%] .header-titl-group[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px}.card-header[_ngcontent-%COMP%] .header-titl-group[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{color:var(--primary-color);font-size:24px}.card-header[_ngcontent-%COMP%] .header-titl-group[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], .card-header[_ngcontent-%COMP%] .header-titl-group[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0;font-size:1.1rem;font-weight:600;color:var(--text-primary)}.progress-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:20px}.progress-content[_ngcontent-%COMP%] .percentage-display[_ngcontent-%COMP%]{text-align:center}.progress-content[_ngcontent-%COMP%] .percentage-display[_ngcontent-%COMP%] .percentage-value[_ngcontent-%COMP%]{font-size:3rem;font-weight:800;color:var(--primary-color);line-height:1}.progress-content[_ngcontent-%COMP%] sh-progress-bar[_ngcontent-%COMP%]{height:8px;border-radius:4px;--sh-progress-bar-track-color: var(--bg-secondary)}.progress-content[_ngcontent-%COMP%] .stat-item[_ngcontent-%COMP%]{display:flex;justify-content:space-between;width:100%}.progress-content[_ngcontent-%COMP%] .stat-item[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{color:var(--text-secondary);font-size:.9rem}.progress-content[_ngcontent-%COMP%] .stat-item[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-weight:600}.files-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px}.files-content[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{font-size:.75rem;text-transform:uppercase;color:var(--text-secondary);font-weight:600;margin-bottom:4px;display:block;padding-left:12px}.files-content[_ngcontent-%COMP%] .file-item[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%}.files-content[_ngcontent-%COMP%] .file-item.current[_ngcontent-%COMP%]{gap:12px;justify-content:flex-start}.files-content[_ngcontent-%COMP%] .file-item.current[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{color:var(--primary-color)}.files-content[_ngcontent-%COMP%] .file-item.current[_ngcontent-%COMP%] .file-details[_ngcontent-%COMP%]{display:flex;flex-direction:column;overflow:hidden}.files-content[_ngcontent-%COMP%] .file-item[_ngcontent-%COMP%] .filename[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-right:12px;font-size:.9rem;font-weight:500;flex:1}.files-content[_ngcontent-%COMP%] .file-item[_ngcontent-%COMP%] .filesize[_ngcontent-%COMP%]{color:var(--text-secondary);font-size:.85rem;font-variant-numeric:tabular-nums;white-space:nowrap}.files-content[_ngcontent-%COMP%] .empty-state[_ngcontent-%COMP%]{color:var(--text-secondary);font-style:italic;text-align:center;width:100%}.performance-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px}.performance-content[_ngcontent-%COMP%] .aggregate-speed[_ngcontent-%COMP%]{font-size:1.2rem;font-weight:700;color:var(--text-primary);font-variant-numeric:tabular-nums}.performance-content[_ngcontent-%COMP%] .eta-item[_ngcontent-%COMP%], .performance-content[_ngcontent-%COMP%] .metric-item[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%}.performance-content[_ngcontent-%COMP%] .eta-item[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .performance-content[_ngcontent-%COMP%] .metric-item[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{color:var(--text-secondary);font-size:.9rem}.performance-content[_ngcontent-%COMP%] .eta-item[_ngcontent-%COMP%] .value[_ngcontent-%COMP%], .performance-content[_ngcontent-%COMP%] .metric-item[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-weight:600;font-variant-numeric:tabular-nums}.performance-content[_ngcontent-%COMP%] .eta-item[_ngcontent-%COMP%] .value[_ngcontent-%COMP%] .sub-text[_ngcontent-%COMP%], .performance-content[_ngcontent-%COMP%] .metric-item[_ngcontent-%COMP%] .value[_ngcontent-%COMP%] .sub-text[_ngcontent-%COMP%]{color:var(--text-secondary);font-weight:400;font-size:.85rem;margin-left:4px}.performance-content[_ngcontent-%COMP%] .transfers-section[_ngcontent-%COMP%] .toggle-btn[_ngcontent-%COMP%]{width:100%;margin-bottom:12px}.performance-content[_ngcontent-%COMP%] .transfers-section[_ngcontent-%COMP%] .transfer-item[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;gap:4px}.performance-content[_ngcontent-%COMP%] .transfers-section[_ngcontent-%COMP%] .transfer-item[_ngcontent-%COMP%] .transfer-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;font-size:.85rem}.performance-content[_ngcontent-%COMP%] .transfers-section[_ngcontent-%COMP%] .transfer-item[_ngcontent-%COMP%] .transfer-header[_ngcontent-%COMP%] .path[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-right:12px}.performance-content[_ngcontent-%COMP%] .transfers-section[_ngcontent-%COMP%] .transfer-item[_ngcontent-%COMP%] .transfer-header[_ngcontent-%COMP%] .speed[_ngcontent-%COMP%]{color:var(--text-secondary);font-variant-numeric:tabular-nums}.performance-content[_ngcontent-%COMP%] .transfers-section[_ngcontent-%COMP%] .transfer-item[_ngcontent-%COMP%] .mini-progress[_ngcontent-%COMP%]{height:4px}.logs-content[_ngcontent-%COMP%] app-logs-live[_ngcontent-%COMP%]{height:350px;display:block}.status-badge[_ngcontent-%COMP%]{padding:4px 12px;border-radius:12px;background:var(--bg-secondary);color:var(--text-secondary);font-size:.8rem;font-weight:500;text-transform:uppercase}.status-badge.running[_ngcontent-%COMP%]{background:rgba(var(--primary-rgb),.1);color:var(--primary-color)}.actions-grid[_ngcontent-%COMP%]{margin-top:auto;display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:12px}.actions-grid[_ngcontent-%COMP%] .action-btn[_ngcontent-%COMP%]{width:100%;justify-content:center}.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:32px 0;gap:32px}@media(min-width:768px){.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%]{flex-direction:row;text-align:left;justify-content:space-around;padding:48px 0}}.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%] .status-visual[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%] .status-info[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:2rem;font-weight:700;margin-bottom:8px;color:var(--text-primary)}.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%] .status-info[_ngcontent-%COMP%] .status-description[_ngcontent-%COMP%]{color:var(--text-secondary);font-size:1.1rem;max-width:300px}.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%] .idle-actions[_ngcontent-%COMP%]{display:flex;align-items:center}.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%] .idle-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding-left:32px;padding-right:32px}.complete-status[_ngcontent-%COMP%]{position:relative;width:120px;height:120px;display:flex;justify-content:center;align-items:center;color:var(--primary-color)}.complete-status[_ngcontent-%COMP%] .status-icon[_ngcontent-%COMP%]{font-size:48px;opacity:0;animation:_ngcontent-%COMP%_reveal-icon .2s linear forwards;animation-delay:1s}.border-svg[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%}.border-circle[_ngcontent-%COMP%]{fill:none;stroke:var(--primary-color);stroke-width:5px;stroke-dasharray:282.74;stroke-dashoffset:282.74;animation:_ngcontent-%COMP%_draw-border 1.2s linear forwards}@keyframes _ngcontent-%COMP%_draw-border{to{stroke-dashoffset:0}}@keyframes _ngcontent-%COMP%_reveal-icon{to{opacity:1}}.next-task-hero[_ngcontent-%COMP%] .next-task-content[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;padding:12px 0}.next-task-hero[_ngcontent-%COMP%] .next-task-content[_ngcontent-%COMP%] .task-main[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px}.next-task-hero[_ngcontent-%COMP%] .next-task-content[_ngcontent-%COMP%] .task-main[_ngcontent-%COMP%] .task-name[_ngcontent-%COMP%]{font-size:1.2rem;font-weight:700;color:var(--primary-color)}.next-task-hero[_ngcontent-%COMP%] .next-task-content[_ngcontent-%COMP%] .task-main[_ngcontent-%COMP%] .task-time-group[_ngcontent-%COMP%]{display:flex;flex-direction:column;color:var(--text-secondary);font-size:.95rem}.next-task-hero[_ngcontent-%COMP%] .next-task-content[_ngcontent-%COMP%] .chevron[_ngcontent-%COMP%]{color:var(--text-secondary);opacity:.5}.server-state-card[_ngcontent-%COMP%] .state-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px}.server-state-card[_ngcontent-%COMP%] .state-content[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{font-size:.75rem;text-transform:uppercase;color:var(--text-secondary);font-weight:600}.server-state-card[_ngcontent-%COMP%] .state-content[_ngcontent-%COMP%] .state-line[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px}.server-state-card[_ngcontent-%COMP%] .state-content[_ngcontent-%COMP%] .state-line[_ngcontent-%COMP%] .warning-text[_ngcontent-%COMP%]{font-size:.85rem;color:var(--error-color);font-weight:500}"]})};export{X as default};
@@ -1 +1 @@
1
- import {q as qe,T,G as Ge,bP as D,N as Nt,aK as mb,ai as m,bR as Qd,bS as ys,aj as l,bF as ve,bT as ir,z as za,b as me}from'./main-XKLDSNLY.js';function F(s,e){let n=T(ve),o=new ir(1),i=za(()=>{let t;try{t=s();}catch(u){me(()=>o.error(u));return}me(()=>o.next(t));},{injector:n,manualCleanup:true});return n.get(qe).onDestroy(()=>{i.destroy(),o.complete();}),o.asObservable()}function L(s,e){let o=!e?.manualCleanup?e?.injector?.get(qe)??T(qe):null,i=O(e?.equal),t;e?.requireSync?t=Ge({kind:0},{equal:i}):t=Ge({kind:1,value:e?.initialValue},{equal:i});let u,c=s.subscribe({next:r=>t.set({kind:1,value:r}),error:r=>{t.set({kind:2,error:r}),u?.();},complete:()=>{u?.();}});if(e?.requireSync&&t().kind===0)throw new D(601,false);return u=o?.onDestroy(c.unsubscribe.bind(c)),Nt(()=>{let r=t();switch(r.kind){case 1:return r.value;case 2:throw r.error;case 0:throw new D(601,false)}},{equal:e?.equal})}function O(s=Object.is){return (e,n)=>e.kind===1&&n.kind===1&&s(e.value,n.value)}function $(s){return mb(m(l({},s),{loader:void 0,stream:e=>{let n,o=false,i=Ge({value:void 0}),{resolve:t,promise:u}=Qd(),c=false;function r(){c||(c=true,t(i));}let l=()=>{o=true,n?.unsubscribe(),e.abortSignal.removeEventListener("abort",l),r();};e.abortSignal.addEventListener("abort",l);function f(a){i.set(a),r();}let m=s.stream;if(m===void 0)throw new D(990,false);return n=m(e).subscribe({next:a=>f({value:a}),error:a=>{f({error:ys(a)}),e.abortSignal.removeEventListener("abort",l);},complete:()=>{c||f({error:new D(991,false)}),e.abortSignal.removeEventListener("abort",l);}}),o&&n.unsubscribe(),c?i:u}}))}export{$,F,L};
1
+ import {q as qe,T,G as Ge,bI as D,N as Nt,aM as vb,aj as m,bK as Zd,bL as vs,ak as l,by as ve,bM as ir,Q as Qa,m as me}from'./main-2ZYVV4C4.js';function F(s,e){let n=T(ve),o=new ir(1),i=Qa(()=>{let t;try{t=s();}catch(u){me(()=>o.error(u));return}me(()=>o.next(t));},{injector:n,manualCleanup:true});return n.get(qe).onDestroy(()=>{i.destroy(),o.complete();}),o.asObservable()}function L(s,e){let o=!e?.manualCleanup?e?.injector?.get(qe)??T(qe):null,i=O(e?.equal),t;e?.requireSync?t=Ge({kind:0},{equal:i}):t=Ge({kind:1,value:e?.initialValue},{equal:i});let u,c=s.subscribe({next:r=>t.set({kind:1,value:r}),error:r=>{t.set({kind:2,error:r}),u?.();},complete:()=>{u?.();}});if(e?.requireSync&&t().kind===0)throw new D(601,false);return u=o?.onDestroy(c.unsubscribe.bind(c)),Nt(()=>{let r=t();switch(r.kind){case 1:return r.value;case 2:throw r.error;case 0:throw new D(601,false)}},{equal:e?.equal})}function O(s=Object.is){return (e,n)=>e.kind===1&&n.kind===1&&s(e.value,n.value)}function $(s){return vb(m(l({},s),{loader:void 0,stream:e=>{let n,o=false,i=Ge({value:void 0}),{resolve:t,promise:u}=Zd(),c=false;function r(){c||(c=true,t(i));}let l=()=>{o=true,n?.unsubscribe(),e.abortSignal.removeEventListener("abort",l),r();};e.abortSignal.addEventListener("abort",l);function f(a){i.set(a),r();}let m=s.stream;if(m===void 0)throw new D(990,false);return n=m(e).subscribe({next:a=>f({value:a}),error:a=>{f({error:vs(a)}),e.abortSignal.removeEventListener("abort",l);},complete:()=>{c||f({error:new D(991,false)}),e.abortSignal.removeEventListener("abort",l);}}),o&&n.unsubscribe(),c?i:u}}))}export{$,F,L};
@@ -1,2 +1,2 @@
1
- import {T,ae as eo,bu as N,D as w1,bU as B$1,af as D1,bV as re,E as E1,bb as ce,h as hw,c as N$1,S as aC,Q as Qi,s as jC,$ as $l,Y as cC,d as aT,f as NC,C as CE,g as cT,H as Hg,aC as yg,M as qg,R as fC,l as vT,O as Od,k as iC,P as Pd,y as vg}from'./main-XKLDSNLY.js';var B=["internalInput"],K=["*"];function Q(i,T){if(i&1){let t=vT();Qi(0,"input",6,0),Hg("change",function(n){Od(t);let u=iC();return Pd(u.onInternalInputChange(n))}),$l();}if(i&2){let t=iC();vg("checked",t.checked()),yg("disabled",t.disabled()?"":null);}}var U=(()=>{class i{constructor(){this.#e=T(eo),this.#n=T(N),this.internalInput=w1("internalInput"),this.projectedInputs=B$1("input:not(.internal-input)",{childList:true,attributes:true}),this.checked=D1(false),this.currentClassList=re(),this.color=E1(null),this.variant=E1(null),this.readonly=E1(false),this.disabled=E1(false),this.noInternalInput=E1(false),this.hostClasses=ce("checkbox",{color:this.color,variant:this.variant,readonly:this.readonly});}#e;#n;onInternalInputChange(t){if(this.disabled())return;let e=t.target;this.checked.set(e.checked);}onKeyDown(t){if(this.#n.matches(t,"checkbox.toggle")){let e=this.internalInput()?.nativeElement;e&&getComputedStyle(e).display!=="none"?e.click():this.#e.nativeElement.click(),t.preventDefault();}}static{this.\u0275fac=function(e){return new(e||i)};}static{this.\u0275cmp=hw({type:i,selectors:[["sh-checkbox"]],viewQuery:function(e,n){e&1&&qg(n.internalInput,B,5),e&2&&fC();},hostVars:6,hostBindings:function(e,n){e&1&&Hg("keydown",function(L){return n.onKeyDown(L)}),e&2&&(yg("disabled",n.disabled()?"":null)("role",n.noInternalInput()?"checkbox":null)("aria-checked",n.noInternalInput()?n.checked():null)("tabindex",n.noInternalInput()?n.disabled()?"-1":"0":null),NC(n.hostClasses()));},inputs:{checked:[1,"checked"],color:[1,"color"],variant:[1,"variant"],readonly:[1,"readonly"],disabled:[1,"disabled"],noInternalInput:[1,"noInternalInput"]},outputs:{checked:"checkedChange"},ngContentSelectors:K,decls:8,vars:3,consts:[["internalInput",""],[1,"box","sh-sheet"],[1,"inherit","default-indicator"],[1,"inherit","indeterminate-indicator"],[1,"label"],["type","checkbox",1,"internal-input",3,"checked"],["type","checkbox",1,"internal-input",3,"change","checked"]],template:function(e,n){e&1&&(aC(),Qi(0,"div",1)(1,"sh-icon",2),jC(2,"check-bold"),$l(),Qi(3,"sh-icon",3),jC(4,"minus-bold"),$l()(),Qi(5,"div",4),cC(6),$l(),aT(7,Q,2,2,"input",5)),e&2&&(NC(n.currentClassList()),CE(7),cT(n.projectedInputs().length===0&&!n.noInternalInput()?7:-1));},dependencies:[N$1],styles:[`sh-checkbox .sh-sheet{--box-bw: .0625rem;--box-bc: var(--sheet-bc);--sheet-s: var(--shape-1)}sh-checkbox{display:flex;align-items:center;gap:.5rem;cursor:pointer;-webkit-user-select:none;user-select:none;position:relative;border:0}sh-checkbox:focus-visible>.box,sh-checkbox:has(input:focus-visible)>.box{outline:2px solid var(--primary-8);outline-offset:2px}sh-checkbox>input.internal-input,sh-checkbox .label>input{appearance:none;position:absolute;inset:0;cursor:pointer;z-index:0;margin:0}sh-checkbox>input.internal-input:focus,sh-checkbox>input.internal-input:focus-visible,sh-checkbox .label>input:focus,sh-checkbox .label>input:focus-visible{outline:none}sh-checkbox:has(.label>input)>input.internal-input{display:none}sh-checkbox .label:empty{display:none}sh-checkbox:has(input[disabled]),sh-checkbox[disabled]:not([disabled=false]){opacity:.5;pointer-events:none;-webkit-user-select:none;user-select:none;cursor:initial}sh-checkbox .box{display:flex;align-items:center;justify-content:center;width:1.25rem;height:1.25rem;cursor:pointer;position:relative;border:var(--box-bw) solid var(--box-bc)}sh-checkbox .box sh-icon{opacity:0;font-weight:700;transition:opacity 75ms linear}sh-checkbox .box sh-icon.indeterminate-indicator{display:none}sh-checkbox.raised:not(:has(input:checked)):not(.active) .box,sh-checkbox.flat:not(:has(input:checked)):not(.active) .box{background:transparent;border:var(--border-10);border-color:var(--box-bc)}sh-checkbox.indeterminate .box sh-icon.indeterminate-indicator{display:block}sh-checkbox.indeterminate .box sh-icon.default-indicator{display:none}sh-checkbox:has(input:checked) .box sh-icon,sh-checkbox.indeterminate .box sh-icon,sh-checkbox.active .box sh-icon{opacity:1}sh-checkbox:hover .box sh-icon{opacity:.5}
1
+ import {T,af as eo,bn as N,B as w1,bN as B$1,ag as D1,bO as re,E as E1,bd as ce,g as gw,a as N$1,S as lC,Z as Zi,H as HC,W as Wl,Y as uC,l as lT,x as xC,b as bE,c as uT,w as Hg,aE as yg,O as qg,R as hC,i as ET,P as Pd,h as aC,L as Ld,z as vg}from'./main-2ZYVV4C4.js';var B=["internalInput"],K=["*"];function Q(i,T){if(i&1){let t=ET();Zi(0,"input",6,0),Hg("change",function(n){Pd(t);let u=aC();return Ld(u.onInternalInputChange(n))}),Wl();}if(i&2){let t=aC();vg("checked",t.checked()),yg("disabled",t.disabled()?"":null);}}var U=(()=>{class i{constructor(){this.#e=T(eo),this.#n=T(N),this.internalInput=w1("internalInput"),this.projectedInputs=B$1("input:not(.internal-input)",{childList:true,attributes:true}),this.checked=D1(false),this.currentClassList=re(),this.color=E1(null),this.variant=E1(null),this.readonly=E1(false),this.disabled=E1(false),this.noInternalInput=E1(false),this.hostClasses=ce("checkbox",{color:this.color,variant:this.variant,readonly:this.readonly});}#e;#n;onInternalInputChange(t){if(this.disabled())return;let e=t.target;this.checked.set(e.checked);}onKeyDown(t){if(this.#n.matches(t,"checkbox.toggle")){let e=this.internalInput()?.nativeElement;e&&getComputedStyle(e).display!=="none"?e.click():this.#e.nativeElement.click(),t.preventDefault();}}static{this.\u0275fac=function(e){return new(e||i)};}static{this.\u0275cmp=gw({type:i,selectors:[["sh-checkbox"]],viewQuery:function(e,n){e&1&&qg(n.internalInput,B,5),e&2&&hC();},hostVars:6,hostBindings:function(e,n){e&1&&Hg("keydown",function(L){return n.onKeyDown(L)}),e&2&&(yg("disabled",n.disabled()?"":null)("role",n.noInternalInput()?"checkbox":null)("aria-checked",n.noInternalInput()?n.checked():null)("tabindex",n.noInternalInput()?n.disabled()?"-1":"0":null),xC(n.hostClasses()));},inputs:{checked:[1,"checked"],color:[1,"color"],variant:[1,"variant"],readonly:[1,"readonly"],disabled:[1,"disabled"],noInternalInput:[1,"noInternalInput"]},outputs:{checked:"checkedChange"},ngContentSelectors:K,decls:8,vars:3,consts:[["internalInput",""],[1,"box","sh-sheet"],[1,"inherit","default-indicator"],[1,"inherit","indeterminate-indicator"],[1,"label"],["type","checkbox",1,"internal-input",3,"checked"],["type","checkbox",1,"internal-input",3,"change","checked"]],template:function(e,n){e&1&&(lC(),Zi(0,"div",1)(1,"sh-icon",2),HC(2,"check-bold"),Wl(),Zi(3,"sh-icon",3),HC(4,"minus-bold"),Wl()(),Zi(5,"div",4),uC(6),Wl(),lT(7,Q,2,2,"input",5)),e&2&&(xC(n.currentClassList()),bE(7),uT(n.projectedInputs().length===0&&!n.noInternalInput()?7:-1));},dependencies:[N$1],styles:[`sh-checkbox .sh-sheet{--box-bw: .0625rem;--box-bc: var(--sheet-bc);--sheet-s: var(--shape-1)}sh-checkbox{display:flex;align-items:center;gap:.5rem;cursor:pointer;-webkit-user-select:none;user-select:none;position:relative;border:0}sh-checkbox:focus-visible>.box,sh-checkbox:has(input:focus-visible)>.box{outline:2px solid var(--primary-8);outline-offset:2px}sh-checkbox>input.internal-input,sh-checkbox .label>input{appearance:none;position:absolute;inset:0;cursor:pointer;z-index:0;margin:0}sh-checkbox>input.internal-input:focus,sh-checkbox>input.internal-input:focus-visible,sh-checkbox .label>input:focus,sh-checkbox .label>input:focus-visible{outline:none}sh-checkbox:has(.label>input)>input.internal-input{display:none}sh-checkbox .label:empty{display:none}sh-checkbox:has(input[disabled]),sh-checkbox[disabled]:not([disabled=false]){opacity:.5;pointer-events:none;-webkit-user-select:none;user-select:none;cursor:initial}sh-checkbox .box{display:flex;align-items:center;justify-content:center;width:1.25rem;height:1.25rem;cursor:pointer;position:relative;border:var(--box-bw) solid var(--box-bc)}sh-checkbox .box sh-icon{opacity:0;font-weight:700;transition:opacity 75ms linear}sh-checkbox .box sh-icon.indeterminate-indicator{display:none}sh-checkbox.raised:not(:has(input:checked)):not(.active) .box,sh-checkbox.flat:not(:has(input:checked)):not(.active) .box{background:transparent;border:var(--border-10);border-color:var(--box-bc)}sh-checkbox.indeterminate .box sh-icon.indeterminate-indicator{display:block}sh-checkbox.indeterminate .box sh-icon.default-indicator{display:none}sh-checkbox:has(input:checked) .box sh-icon,sh-checkbox.indeterminate .box sh-icon,sh-checkbox.active .box sh-icon{opacity:1}sh-checkbox:hover .box sh-icon{opacity:.5}
2
2
  `],encapsulation:2});}}return i})();export{U};