@duplicati/ngclient 0.0.194 → 0.0.196

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 (156) hide show
  1. package/assets/dest-icons/dunkel.png +0 -0
  2. package/assets/dest-icons/office365.png +0 -0
  3. package/assets/sh-bold.woff2 +0 -0
  4. package/assets/sh.woff2 +0 -0
  5. package/chunk-26MRZAFB.js +1 -0
  6. package/chunk-26Z7TPJB.js +4 -0
  7. package/{chunk-SFR3XMV4.js → chunk-3K3BYB36.js} +1 -1
  8. package/chunk-3UVBV6B3.js +3 -0
  9. package/chunk-44X4A7WY.js +1 -0
  10. package/chunk-4AQZL2UM.js +1 -0
  11. package/chunk-56MQ46JU.js +1 -0
  12. package/{chunk-G4VDCGMW.js → chunk-5LBG6MOL.js} +1 -1
  13. package/chunk-5VE6P5U5.js +1 -0
  14. package/{chunk-MHRECQ5Y.js → chunk-6LAXPU22.js} +1 -1
  15. package/{chunk-5RULL5XV.js → chunk-6TZPGZ7P.js} +1 -1
  16. package/{chunk-OTPG7USH.js → chunk-7AVOHYTE.js} +1 -1
  17. package/{chunk-ME77WZZI.js → chunk-7LTHH6OG.js} +1 -1
  18. package/{chunk-DAODMGAD.js → chunk-7TWUW4XJ.js} +1 -1
  19. package/{chunk-FQZFKTPW.js → chunk-A2O2XHOB.js} +1 -1
  20. package/{chunk-ZDILEG7V.js → chunk-AIH3GSIT.js} +1 -1
  21. package/chunk-AODNZLCK.js +2 -0
  22. package/{chunk-LP4W35DJ.js → chunk-B62TPRVG.js} +1 -1
  23. package/{chunk-5JYCHNFV.js → chunk-BABBRM6A.js} +1 -1
  24. package/chunk-BYUBKTO5.js +60 -0
  25. package/chunk-C5RNVTX6.js +1 -0
  26. package/chunk-CFNARBNK.js +1 -0
  27. package/chunk-D6IP567E.js +1 -0
  28. package/{chunk-XGIZ7XYY.js → chunk-EE5SIDTF.js} +1 -1
  29. package/{chunk-3C5RKSMK.js → chunk-EYCSUKCD.js} +1 -1
  30. package/chunk-F4ZMF6H4.js +1 -0
  31. package/chunk-G4IFZKMI.js +1 -0
  32. package/{chunk-NBQQSADE.js → chunk-G6NEOWER.js} +1 -1
  33. package/chunk-GZ5HYA4R.js +1 -0
  34. package/{chunk-BR4LUBSP.js → chunk-H45NIIKQ.js} +1 -1
  35. package/{chunk-HSUSP2MR.js → chunk-HCSB3IIB.js} +1 -1
  36. package/{chunk-ZPDK2GFB.js → chunk-HFZ6MYKF.js} +1 -1
  37. package/{chunk-H6ABNEPW.js → chunk-HOGZ74SB.js} +1 -1
  38. package/{chunk-5DJAX2HH.js → chunk-HSHF5HR7.js} +1 -1
  39. package/chunk-HUZXJWCG.js +1 -0
  40. package/chunk-I27PVH6D.js +1 -0
  41. package/{chunk-C2SNLPZY.js → chunk-I2RQR4CB.js} +1 -1
  42. package/chunk-IMHM7ISI.js +2 -0
  43. package/{chunk-TT3S63BX.js → chunk-KDSMLI73.js} +1 -1
  44. package/chunk-LPAIFT5I.js +11 -0
  45. package/{chunk-WA2IHWIU.js → chunk-LTGF4KMG.js} +1 -1
  46. package/{chunk-KRXQDBGB.js → chunk-MDXSNEQZ.js} +1 -1
  47. package/chunk-MI7UAY44.js +1 -0
  48. package/{chunk-JWO4FPWJ.js → chunk-MMEFBZO4.js} +1 -1
  49. package/chunk-MUFBZIQA.js +1 -0
  50. package/{chunk-HVFZUJ2H.js → chunk-MZ5COKIP.js} +1 -1
  51. package/chunk-NEC5ZCCT.js +1 -0
  52. package/{chunk-ZXVCNNR6.js → chunk-NGNWWP6M.js} +1 -1
  53. package/chunk-NK5WD6WE.js +1 -0
  54. package/{chunk-7EB3FVZI.js → chunk-NNNKIEPR.js} +1 -1
  55. package/chunk-NQAH5AL7.js +1 -0
  56. package/{chunk-WUL6NS6B.js → chunk-O5SO2U6L.js} +1 -1
  57. package/chunk-OKYEX2SC.js +2 -0
  58. package/chunk-P7OUKLCO.js +1 -0
  59. package/{chunk-QPTSKQZ2.js → chunk-PO3L6MKW.js} +2 -2
  60. package/chunk-POPZ47SS.js +2 -0
  61. package/{chunk-FOQJA6X2.js → chunk-QHBOEY2O.js} +1 -1
  62. package/chunk-QIGELWLA.js +1 -0
  63. package/{chunk-HHYYLYET.js → chunk-QJUNU5NP.js} +1 -1
  64. package/{chunk-HTPLC7IW.js → chunk-QLENTLZJ.js} +1 -1
  65. package/{chunk-DCMY3QXM.js → chunk-QTVWYVBT.js} +1 -1
  66. package/{chunk-B2Y54P3R.js → chunk-R5YJUVWW.js} +1 -1
  67. package/{chunk-44TUAFTV.js → chunk-S2RZQVCD.js} +1 -1
  68. package/{chunk-FK7JFD5B.js → chunk-SZUNW4JO.js} +1 -1
  69. package/{chunk-BJ4LD474.js → chunk-T4IKTBRQ.js} +1 -1
  70. package/chunk-TL4WOQKT.js +1 -0
  71. package/{chunk-K3VAYERA.js → chunk-U2E3ZQUP.js} +1 -1
  72. package/{chunk-PDAA26RM.js → chunk-UK7MV4OF.js} +1 -1
  73. package/chunk-UNLX3IVU.js +1 -0
  74. package/chunk-UNMDSCAN.js +1 -0
  75. package/chunk-UTZZ4OCF.js +1 -0
  76. package/chunk-V7OCP4NF.js +1 -0
  77. package/{chunk-DW332N2S.js → chunk-VDSX2M4H.js} +1 -1
  78. package/{chunk-7XS6T6TX.js → chunk-VFBRHP2H.js} +1 -1
  79. package/chunk-VLC2XPEM.js +1 -0
  80. package/chunk-VVQRXJRI.js +1 -0
  81. package/chunk-WIQPWRZV.js +1 -0
  82. package/{chunk-2EIDUF2P.js → chunk-X4GGVQ44.js} +1 -1
  83. package/chunk-XIYAYCFU.js +1 -0
  84. package/chunk-XZH2SXWG.js +1 -0
  85. package/chunk-YHMXLWRX.js +1 -0
  86. package/chunk-Z3PICU3O.js +1 -0
  87. package/{chunk-VYJNNEM5.js → chunk-ZHGDQABC.js} +1 -1
  88. package/{chunk-NNCQNVQC.js → chunk-ZU6T3TW3.js} +1 -1
  89. package/chunk-ZWLAV6HO.js +1 -0
  90. package/index.html +2 -2
  91. package/locale/dayjs/it.js +1 -1
  92. package/locale/messages.de_CH.json +708 -0
  93. package/locale/messages.de_DE.json +708 -0
  94. package/locale/messages.en.json +777 -1
  95. package/locale/messages.en_GB.json +606 -5
  96. package/locale/messages.es_AR.json +193 -0
  97. package/locale/messages.fr_CA.json +708 -0
  98. package/locale/messages.fr_FR.json +708 -0
  99. package/locale/messages.it_IT.json +708 -0
  100. package/locale/messages.ja.json +169 -0
  101. package/locale/messages.ja_JP.json +3 -4
  102. package/locale/messages.json +777 -1
  103. package/locale/messages.nl_BE.json +708 -0
  104. package/locale/messages.zh-Hans.json +9 -15
  105. package/locale/messages.zh-Hant.json +639 -0
  106. package/locale/messages.zh.json +639 -0
  107. package/locale/messages.zh_CN.json +9 -15
  108. package/locale/messages.zh_HK.json +639 -0
  109. package/{main-GWHYPXKT.js → main-7BGVZMHJ.js} +1 -1
  110. package/package.json +1 -1
  111. package/styles-H32RJLOU.css +1 -0
  112. package/chunk-2PAQOFN3.js +0 -1
  113. package/chunk-2XK5TFRS.js +0 -1
  114. package/chunk-2XXH473G.js +0 -1
  115. package/chunk-2YEG7JK3.js +0 -1
  116. package/chunk-3SHOBVX6.js +0 -2
  117. package/chunk-4CELGWVJ.js +0 -1
  118. package/chunk-4YM23PM6.js +0 -1
  119. package/chunk-6GC4UPHS.js +0 -1
  120. package/chunk-7BMCHZU3.js +0 -1
  121. package/chunk-A4LPGPDU.js +0 -1
  122. package/chunk-AS6Z56AD.js +0 -1
  123. package/chunk-ATPBBNLG.js +0 -1
  124. package/chunk-BGTK25UG.js +0 -1
  125. package/chunk-BOZ44QUT.js +0 -1
  126. package/chunk-DGKNUD3G.js +0 -2
  127. package/chunk-ECRDYEF2.js +0 -1
  128. package/chunk-G22PSFMM.js +0 -7
  129. package/chunk-HPNLQHW6.js +0 -1
  130. package/chunk-KDJCL6HE.js +0 -1
  131. package/chunk-KEE3H2WJ.js +0 -1
  132. package/chunk-KETMZS6P.js +0 -1
  133. package/chunk-LSXNHFLE.js +0 -3
  134. package/chunk-MKQQI3MM.js +0 -2
  135. package/chunk-MRAKGZE6.js +0 -1
  136. package/chunk-O4OTZE5N.js +0 -1
  137. package/chunk-OCQNG4JU.js +0 -1
  138. package/chunk-PKPBSTZA.js +0 -1
  139. package/chunk-S3K2SIX7.js +0 -1
  140. package/chunk-T2WO6CVD.js +0 -4
  141. package/chunk-T7WSF7RL.js +0 -60
  142. package/chunk-TELPJYLN.js +0 -1
  143. package/chunk-UE5VHUV6.js +0 -1
  144. package/chunk-VEWX3KXN.js +0 -2
  145. package/chunk-VHOAXFIJ.js +0 -1
  146. package/chunk-VIONVZIF.js +0 -1
  147. package/chunk-VTKKVX26.js +0 -1
  148. package/chunk-W3543UFN.js +0 -1
  149. package/chunk-WHQUOABU.js +0 -1
  150. package/chunk-WIVARGP6.js +0 -1
  151. package/chunk-XFDHZX44.js +0 -1
  152. package/chunk-XR7KQQO4.js +0 -1
  153. package/chunk-XZ37OAYY.js +0 -1
  154. package/chunk-YDDSLDHZ.js +0 -1
  155. package/chunk-ZAFP5TX6.js +0 -1
  156. package/styles-CY5DE4O7.css +0 -1
package/chunk-G22PSFMM.js DELETED
@@ -1,7 +0,0 @@
1
- import{a as Gt}from"./chunk-AS6Z56AD.js";import{a as yt,b as Re,c as Ot,d as Ft,e as At,f as wt,h as Mt,i as Lt,j as Pt}from"./chunk-DGKNUD3G.js";import{j as $t}from"./chunk-ZAFP5TX6.js";import{c as vt,d as Vt}from"./chunk-WIVARGP6.js";import{a as Dt}from"./chunk-KETMZS6P.js";import{a as U}from"./chunk-5DJAX2HH.js";import{a as xt}from"./chunk-UE5VHUV6.js";import{a as Et,b as It}from"./chunk-DW332N2S.js";import{a as ue}from"./chunk-TELPJYLN.js";import{B as Ce,C as pt,E as mt,H as Pe,K as Ct,L as ut,O as gt,P as Tt,V as ft,W as St,Y as Nt,a as st,c as se,e as de,i as ce,k as dt,s as pe,t as ct,u as me,z as Le}from"./chunk-HPNLQHW6.js";import{c as ht}from"./chunk-BGTK25UG.js";import{e as _t}from"./chunk-A4LPGPDU.js";import{_ as rt}from"./chunk-OTPG7USH.js";import{$ as f,Ab as d,Ac as Me,Bb as R,D as He,E as $e,Fb as xe,Gb as fe,Gc as oe,Hb as P,Ib as E,K as je,M as qe,Ma as Qe,Mc as $,Pa as r,Pb as H,Qb as j,Qc as ot,R as Ie,Rb as _e,Rc as ae,Sc as at,Ub as Ye,Uc as lt,Vb as h,W as w,Xb as l,Yb as De,Zb as ye,aa as S,cb as Z,cc as Ze,da as We,dc as et,ec as y,f as Ee,fc as tt,gc as Oe,hb as x,jc as m,kc as nt,l as Je,la as k,lc as A,mc as Se,na as Te,oc as Fe,p as Xe,pc as Ae,qc as we,rc as X,sb as u,sc as M,tb as g,tc as p,ub as te,uc as Ge,wb as ne,wc as it,xb as ie,xc as be,yb as c,yc as v,zb as s,zc as B}from"./chunk-T2WO6CVD.js";import{a as z,b as he}from"./chunk-7CGTOI24.js";var bt=class n{#e=w(ht);#t=w(Le);#n=w(ue);testDestination(t,e,o,i,a){return this.#n.hasV2TestOperations()?this.testDestinationv2(t,e,o,i,a):this.testDestinationv1(t,e,o,i,a)}testDestinationv2(t,e,o,i,a){return new Ee(_=>{this.#e.postApiV2DestinationTest({requestBody:{DestinationUrl:t,BackupId:e=="new"?null:e,AutoCreate:!1,Options:null}}).subscribe({next:C=>{if(C.Success){this.emitSuccessV2(_,t,o,C);return}this.handleGenericError(_,t,o,C.Error??"Unknown error",a)},error:C=>{let N=C?.error?.body??C?.error?.requestBody;if(N?.Data?.FolderExists===!1||N?.StatusCode==="missing-folder"){i?this.handleMissingFolder(_,t,o):this.handleGenericError(_,t,o,$localize`The remote destination folder does not exist.`,a);return}if(N?.Data?.HostCertificate){this.handleMissingCertificate(_,t,o,N.Data?.HostCertificate);return}if(N?.Data?.ReportedHostKey){this.handleIncorrectKey(_,t,o,N.Data.ReportedHostKey,N.Data.AcceptedHostKey??null);return}this.handleGenericError(_,t,o,C?.message??"Unknown error",a)}})})}testDestinationv1(t,e,o,i,a){return new Ee(_=>{this.#e.postApiV1RemoteoperationTest({requestBody:{path:t,backupId:e=="new"?null:e}}).subscribe({next:C=>{_.next({action:"success",targetUrl:t,testAgain:!1,destinationIndex:o}),_.complete()},error:C=>{this.handleDestinationErrorv1(C.message,t,o,i,a).subscribe(N=>{_.next(N)})}})})}handleMissingFolder(t,e,o){this.#t.open(U,{data:{title:$localize`Create folder`,message:$localize`The remote destination folder does not exist, do you want to create it?`,confirmText:$localize`Create folder`,cancelText:$localize`Cancel`},closed:i=>{if(!i){this.reportNoAction(t,e,o,$localize`The remote folder does not exist.`);return}this.#n.hasV2TestOperations()?this.#e.postApiV2DestinationTest({requestBody:{DestinationUrl:e,AutoCreate:!0,Options:null}}).subscribe({next:a=>{if(a.Success){this.emitSuccessV2(t,e,o,a);return}else this.handleFolderCreateFailure(t,e,o,a.Error??$localize`Unknown error`)},error:a=>{this.handleFolderCreateFailure(t,e,o,a.message??$localize`Unknown error`)}}):this.#e.postApiV1RemoteoperationCreate({requestBody:{path:e}}).subscribe({next:()=>{this.handleFolderCreated(t,e,o)},error:a=>{this.handleFolderCreateFailure(t,e,o,a.message??$localize`Unknown error`)}})}})}handleFolderCreateFailure(t,e,o,i){this.#t.open(U,{data:{title:$localize`Error creating folder`,message:$localize`The remote destination folder could not be created. ${i}`,confirmText:$localize`OK`,cancelText:null},closed:()=>{t.next({action:"generic-error",targetUrl:e,testAgain:!1,destinationIndex:o}),t.complete()}})}emitSuccessV2(t,e,o,i){t.next({action:"success",targetUrl:e,testAgain:!1,destinationIndex:o,anyFilesFound:!i.Data?.FolderIsEmpty,containsBackup:i.Data?.FolderContainsBackupFiles??void 0,containsEncryptedBackupFiles:i.Data?.FolderContainsEncryptedBackupFiles??void 0}),t.complete()}handleFolderCreated(t,e,o){this.#t.open(U,{data:{title:$localize`Folder created`,message:$localize`The remote destination folder was created successfully.`,confirmText:$localize`OK`,cancelText:null},closed:()=>{t.next({action:"test-again",targetUrl:e,testAgain:!0,destinationIndex:o}),t.complete()}})}reportNoAction(t,e,o,i){t.next({action:"generic-error",targetUrl:e,errorMessage:i,testAgain:!1,destinationIndex:o}),t.complete()}handleMissingCertificate(t,e,o,i){this.#t.open(U,{maxWidth:"500px",data:{title:$localize`Trust the certificate`,message:$localize`The server is using a certificate that is not trusted.
2
- If this is a self-signed certificate, you can choose to trust this certificate.
3
- The server reported the certificate hash: ${i}`,confirmText:$localize`Trust the certificate`,cancelText:$localize`Cancel`},closed:a=>{if(!a){this.reportNoAction(t,e,o,$localize`The server certificate is not trusted.`);return}t.next({action:"trust-cert",targetUrl:e,testAgain:!0,certData:i,destinationIndex:o}),t.complete()}})}handleIncorrectKey(t,e,o,i,a){a?this.#t.open(U,{maxWidth:"500px",data:{title:$localize`The host key has changed`,message:$localize`The host key has changed, please check with the server administrator if this is correct,
4
- otherwise you could be the victim of a MAN-IN-THE-MIDDLE attack.
5
- Do you want to REPLACE your CURRENT host key ${a}
6
- with the REPORTED host key: ${i}?`,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:_=>{if(!_){this.reportNoAction(t,e,o,$localize`The host key was not approved.`);return}t.next({action:"approve-host-key",targetUrl:e,testAgain:!0,reportedHostKey:i,destinationIndex:o}),t.complete()}}):this.#t.open(U,{maxWidth:"500px",data:{title:$localize`Approve host key?`,message:$localize`No certificate was specified, please verify that the reported host key is correct: ${i}`,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:_=>{if(!_){this.reportNoAction(t,e,o,$localize`The host key was not approved.`);return}t.next({action:"approve-host-key",targetUrl:e,testAgain:!0,reportedHostKey:i,destinationIndex:o}),t.complete()}})}handleGenericError(t,e,o,i,a){function _(){t.next({action:"generic-error",targetUrl:e,testAgain:!1,destinationIndex:o,errorMessage:i}),t.complete()}if(a){_();return}this.#t.open(U,{maxWidth:"500px",data:{title:$localize`Test connection failed`,message:i,cancelText:$localize`OK`},closed:C=>_()})}handleDestinationErrorv1(t,e,o,i,a){return new Ee(_=>{if(t==="missing-folder"){i?this.handleMissingFolder(_,e,o):this.handleGenericError(_,e,o,$localize`The remote destination folder does not exist.`,a);return}if(t.startsWith("incorrect-cert:")){let C=t.split("incorrect-cert:")[1];this.handleMissingCertificate(_,e,o,C);return}if(t.startsWith("incorrect-host-key:")){let C=t.split('incorrect-host-key:"')[1].split('",')[0],N=t.split('accepted-host-key:"')[1].split('",')[0];this.handleIncorrectKey(_,e,o,C,N);return}this.handleGenericError(_,e,o,t,a)})}static \u0275fac=function(e){return new(e||n)};static \u0275prov=Ie({token:n,factory:n.\u0275fac,providedIn:"root"})};var Kt=["*"];function zt(n,t){n&1&&(s(0,"sh-chip",4),m(1,"Special"),d())}function Ut(n,t){n&1&&(s(0,"sh-chip",5),m(1,"Deprecated"),d())}var ve=class n{destination=ae.required();static \u0275fac=function(e){return new(e||n)};static \u0275cmp=Z({type:n,selectors:[["app-destination-list-item"]],inputs:{destination:[1,"destination"]},ngContentSelectors:Kt,decls:11,vars:7,consts:[[1,"type-b"],[1,"icon"],[3,"src","alt"],[1,"name"],[1,"small","simple","primary"],[1,"small","simple","warn"],[1,"description"],[1,"actions"]],template:function(e,o){if(e&1&&(De(),s(0,"sh-card",0)(1,"div",1),R(2,"img",2),d(),s(3,"div",3),m(4),u(5,zt,2,0,"sh-chip",4)(6,Ut,2,0,"sh-chip",5),d(),s(7,"div",6),m(8),d(),s(9,"div",7),ye(10),d()()),e&2){let i=o.destination();r(2),c("src",Ge(i.icon),Qe)("alt",Ge(i.displayName)),r(2),A(" ",i.displayName," "),r(),g((i.sortOrder??0)==-2?5:(i.sortOrder??0)<0?6:-1),r(3),nt(i.description)}},dependencies:[pt,mt],styles:['[_nghost-%COMP%]{display:block}sh-card[_ngcontent-%COMP%]{display:grid;align-items:center;grid-template-columns:3rem 1fr auto;grid-template-areas:"icon name actions" "icon description actions";gap:.25rem 1rem}sh-card[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{grid-area:icon;display:flex;align-items:center;justify-content:center;width:3rem;height:3rem;border-radius:var(--shape-2)}sh-card[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{object-fit:contain;width:100%;border-radius:var(--shape-2);overflow:hidden}sh-card[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{grid-area:name;font:var(--paragraph-10)}sh-card[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{grid-area:description;color:var(--base-8)}sh-card[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{grid-area:actions;display:flex;align-items:center;gap:.5rem}'],changeDetection:0})};var ge=class n{#e=w(ue);supportedDestinationTypes=$(()=>this.#e.backendModules().flatMap(t=>{if(!t?.Key)return null;let e=Ft(t.Key);if(e.length<=1){let o=Ot(t.Key);return o.isDefaultEntry===!0?[he(z({},o),{displayName:t.DisplayName||o.displayName||t.Key,description:t.Description||o.description||""})]:o}else return e}).filter(t=>t!==null));destinationTypeOptions=$(()=>this.supportedDestinationTypes().map(t=>({key:t.customKey??t.key,customKey:t.customKey??null,displayName:t.displayName,description:t.description,icon:t.icon,searchTerms:[t.displayName,t.description,t.key,t.searchTerms??"",t.customKey??""].join(" "),sortOrder:t.sortOrder??0})));backendModules=$(()=>this.#e.backendModules()??[]);static \u0275fac=function(e){return new(e||n)};static \u0275prov=Ie({token:n,factory:n.\u0275fac,providedIn:"root"})};function Jt(n,t){if(n&1){let e=E();s(0,"app-destination-list-item",3)(1,"button",4),h("click",function(){let i=f(e).$implicit,a=l();return S(a.setDestination.emit(i.customKey??i.key))}),H(2,0),R(3,"sh-icon"),j(),d()()}if(n&2){let e=t.$implicit;c("destination",e)}}var Rt=class n{#e=w(ge);setDestination=ot();destinationSearchTerm=k("");destinationTypeOptions=this.#e.destinationTypeOptions;destinationTypeOptionsFocused=$(()=>{let t=this.destinationTypeOptions(),e=this.destinationSearchTerm().toLowerCase(),o=[...t].sort((i,a)=>{let _=i.sortOrder??0,C=a.sortOrder??0;return _!==C?C-_:i.displayName.localeCompare(a.displayName)}).filter(i=>{let a=i.sortOrder??0;return a<0&&e?.length&&(i.key.toLocaleLowerCase()===e.toLocaleLowerCase()||i.customKey?.toLocaleLowerCase()===e.toLocaleLowerCase())?!0:a>=0});return e?o.filter(i=>i.searchTerms.toLowerCase().includes(e)):o});static \u0275fac=function(e){return new(e||n)};static \u0275cmp=Z({type:n,selectors:[["app-destination-list"]],outputs:{setDestination:"setDestination"},decls:5,vars:1,consts:()=>{let t;t=$localize`Search for destination...`;let e;return e=$localize` Choose ${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SH_ICON:`,[e,["type","text","placeholder",t,3,"ngModelChange","ngModel"],[1,"list"],[3,"destination"],["shButton","","type","button",3,"click"]]},template:function(e,o){e&1&&(s(0,"sh-form-field")(1,"input",1),we("ngModelChange",function(a){return Ae(o.destinationSearchTerm,a)||(o.destinationSearchTerm=a),a}),d()(),s(2,"div",2),ne(3,Jt,4,1,"app-destination-list-item",3,te),d()),e&2&&(r(),Fe("ngModel",o.destinationSearchTerm),r(2),ie(o.destinationTypeOptionsFocused()))},dependencies:[ve,pe,se,de,ce,Pe,Ce,me],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:1rem;height:100%;overflow:hidden}.list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;height:100%;overflow:auto;padding-bottom:1rem;border-bottom:.0625rem solid var(--base-4)}"],changeDetection:0})};var Xt=["fileInput"],Ht=[[["label"]]],jt=["label"],Ve=class n{customId=ae();content=k("");readonly=k(!1);placeholder=ae("Drop a file here or use the browse button");fileInputRef=at("fileInput");onFileSelected(t){let e=t.target;e.files&&e.files.length>0&&this.readFile(e.files[0])}onFileDrop(t){t.preventDefault(),t.dataTransfer?.files&&t.dataTransfer.files.length>0&&this.readFile(t.dataTransfer.files[0])}onDragOver(t){t.preventDefault()}readFile(t){let e=new FileReader;e.onload=()=>{this.content.set(e.result)},e.readAsText(t)}triggerBrowse(){return this.fileInputRef()?.nativeElement.click(),!1}onChange=()=>{};onTouched=()=>{};onChangeEffect=Te(()=>{this.onChange(this.content())});writeValue(t){this.content.set(t)}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.readonly.set(t)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=Z({type:n,selectors:[["app-file-drop-textarea"]],viewQuery:function(e,o){e&1&&Ze(o.fileInputRef,Xt,5),e&2&&et()},inputs:{customId:[1,"customId"],placeholder:[1,"placeholder"]},features:[it([{provide:st,useExisting:n,multi:!0}])],ngContentSelectors:jt,decls:9,vars:3,consts:[["fileInput",""],[1,"browse-btn"],["shButton","","type","button",1,"small","outlined",3,"click"],[1,"textarea-container","textarea-wrap",3,"drop","dragover"],["rows","10",3,"ngModelChange","placeholder","ngModel","disabled"],["type","file",1,"hidden",3,"change"]],template:function(e,o){if(e&1){let i=E();De(Ht),ye(0,0,["ngProjectAs","label",5,["label"]]),s(1,"div",1)(2,"button",2),h("click",function(){return f(i),S(o.triggerBrowse())}),s(3,"sh-icon"),m(4,"upload"),d()()(),s(5,"div",3),h("drop",function(_){return f(i),S(o.onFileDrop(_))})("dragover",function(_){return f(i),S(o.onDragOver(_))}),s(6,"textarea",4),we("ngModelChange",function(_){return f(i),Ae(o.content,_)||(o.content=_),S(_)}),d()(),s(7,"input",5,0),h("change",function(_){return f(i),S(o.onFileSelected(_))}),d()}e&2&&(r(6),c("placeholder",o.placeholder()),Fe("ngModel",o.content),c("disabled",o.readonly()))},dependencies:[pe,se,de,ce,me,Ce],styles:['[_nghost-%COMP%]{display:grid;grid-template-areas:"label browsebtn" "input input";grid-template-columns:8fr 1fr;gap:.5rem;align-items:flex-end}[_nghost-%COMP%] .browse-btn[_ngcontent-%COMP%]{grid-area:browsebtn}[_nghost-%COMP%] .label[_ngcontent-%COMP%]{grid-area:label;grid-column:1/-1}[_nghost-%COMP%] .textarea-wrap[_ngcontent-%COMP%]{grid-area:input;width:100%;border:none;font:var(--code-20)}[_nghost-%COMP%] .textarea-wrap[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:100%;color:var(--base-8);background-color:var(--base-1);border:1px solid var(--base-4);border-radius:var(--shape-3);padding:.5rem;resize:vertical;box-shadow:var(--box-shadow-10)}[_nghost-%COMP%] .textarea-wrap[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%] .dark[_ngcontent-%COMP%]{background-color:var(--base-2)}[_nghost-%COMP%] .hidden[_ngcontent-%COMP%]{display:none}'],changeDetection:0})};var qt=(n,t,e,o)=>({index:n,fieldGroup:"custom",formView:t,destinationType:e,oauthField:o}),G=n=>({$implicit:n}),Wt=(n,t,e,o)=>({index:n,fieldGroup:"dynamic",formView:t,destinationType:e,oauthField:o}),Qt=()=>({updateOn:"blur"}),Yt=(n,t,e,o)=>({index:n,formView:t,fieldGroup:"advanced",destinationType:e,oauthField:o}),J=(n,t)=>({fieldGroup:n,formView:t}),Zt=()=>["/connect/logon"];function en(n,t){n&1&&P(0)}function tn(n,t){if(n&1&&x(0,en,1,0,"ng-container",24),n&2){let e=t.$implicit,o=t.$index;l();let i=y(15);l();let a=p(0),_=p(1);c("ngTemplateOutlet",i)("ngTemplateOutletContext",v(7,G,Me(2,qt,o,e,a,_.oauthField)))}}function nn(n,t){n&1&&P(0)}function on(n,t){if(n&1&&x(0,nn,1,0,"ng-container",24),n&2){let e=t.$implicit,o=t.$index;l();let i=y(15);l();let a=p(0),_=p(1);c("ngTemplateOutlet",i)("ngTemplateOutletContext",v(7,G,Me(2,Wt,o,e,a,_.oauthField)))}}function an(n,t){if(n&1){let e=E();s(0,"button",25),h("click",function(){f(e);let i=l(2);return S(i.showTextArea.set(!1))}),H(1,8),R(2,"sh-icon"),j(),d()}}function ln(n,t){if(n&1){let e=E();s(0,"button",32,2),h("click",function(){let i=f(e).$implicit,a=l(3);return S(a.addAdvancedOption(i))}),m(2),d()}if(n&2){let e=t.$implicit;r(2),A(" ",e.name," ")}}function rn(n,t){if(n&1){let e=E();s(0,"div",22)(1,"sh-menu",26)(2,"button",27),H(3,9),R(4,"sh-icon"),j(),d(),xe(5,28),ne(6,ln,3,1,"button",29,te),fe(),d(),s(8,"sh-menu")(9,"button",30)(10,"sh-icon"),m(11,"dots-three-vertical"),d()(),xe(12,28),s(13,"button",31),h("click",function(){f(e);let i=l(2);return S(i.showTextArea.set(!0))}),s(14,"sh-icon"),m(15,"link"),d(),m(16," Edit contents as text "),d(),fe(),d()()}if(n&2){l();let e=p(9);r(),c("searchable",!0),r(),c("disabled",e.length===0),r(4),ie(e)}}function _n(n,t){if(n&1){let e=E();s(0,"textarea",33),h("ngModelChange",function(i){f(e);let a=l(2);return S(a.updateSettingsFromText(i))}),d()}if(n&2){let e=l(2);c("ngModel",e.settingsAsText())("ngModelOptions",be(2,Qt))}}function sn(n,t){n&1&&P(0)}function dn(n,t){if(n&1&&x(0,sn,1,0,"ng-container",24),n&2){let e=t.$implicit,o=t.$index;l(2);let i=y(15),a=l(),_=p(0),C=p(1),N=a.getFormView("advanced",e)??a.getDefaultFormView(e);c("ngTemplateOutlet",i)("ngTemplateOutletContext",v(7,G,Me(2,Yt,o,N,_,C.oauthField)))}}function cn(n,t){if(n&1&&ne(0,dn,1,9,"ng-container",null,te),n&2){let e=l(2);ie(e.advancedFormFieldNames())}}function pn(n,t){n&1&&(s(0,"sup",42),m(1,"*"),d())}function mn(n,t){if(n&1&&(s(0,"sh-icon",43),m(1,"question"),d()),n&2){let e=l(2).$implicit;c("shTooltip",e.formView.longDescription)}}function Cn(n,t){if(n&1){let e=E();s(0,"app-file-tree",35)(1,"label",41),u(2,pn,2,0,"sup",42),m(3),u(4,mn,2,1,"sh-icon",43),d(),s(5,"input",44),h("ngModelChange",function(i){f(e);let a=l().$implicit,_=l(2);return S(_.updateFieldValue(a.fieldGroup,a.formView.name,i))}),d()()}if(n&2){let e=l().$implicit,o=p(1),i=p(2),a=p(3),_=p(4),C=p(5);c("startingPath",a)("accepts",e.formView.accepts)("showFiles",!0)("hideShortcuts",!0)("showHiddenNodes",!0)("selectFiles",!0),r(),c("for",C),r(),g(e.formView.isMandatory&&_?2:-1),r(),A(" ",o," "),r(),g(e.formView.longDescription?4:-1),r(),c("id",C)("ngModel",i)}}function un(n,t){n&1&&(s(0,"sup",45),m(1,"*"),d())}function gn(n,t){if(n&1&&(s(0,"sh-icon",43),m(1,"question"),d()),n&2){let e=l(2).$implicit;c("shTooltip",e.formView.longDescription)}}function Tn(n,t){if(n&1){let e=E();s(0,"app-file-tree",36)(1,"label",41),u(2,un,2,0,"sup",45),m(3),u(4,gn,2,1,"sh-icon",43),d(),s(5,"input",44),h("ngModelChange",function(i){f(e);let a=l().$implicit,_=l(2);return S(_.updateFieldValue(a.fieldGroup,a.formView.name,i))}),d()()}if(n&2){let e=l().$implicit,o=p(1),i=p(2),a=p(3),_=p(4),C=p(5);c("hideShortcuts",!0)("enableCreateFolder",!0)("startingPath",a),r(),c("for",C),r(),g(e.formView.isMandatory&&_?2:-1),r(),A(" ",o," "),r(),g(e.formView.longDescription?4:-1),r(),c("id",C)("ngModel",i)}}function fn(n,t){n&1&&(s(0,"sup",46),m(1,"*"),d())}function Sn(n,t){if(n&1&&(s(0,"sh-icon",43),m(1,"question"),d()),n&2){let e=l(2).$implicit;c("shTooltip",e.formView.longDescription)}}function Nn(n,t){n&1&&(s(0,"sh-icon",47),m(1," warning "),d())}function hn(n,t){n&1&&P(0)}function En(n,t){if(n&1&&(s(0,"sh-icon",51),m(1," link "),d()),n&2){l();let e=p(8),o=p(9);Oe("error",e&&o==="error")("warn",e&&o==="warning"),c("shTooltip",e)}}function In(n,t){n&1&&(s(0,"sh-icon",50),m(1,"envelope"),d())}function xn(n,t){n&1&&(s(0,"sh-icon",50),m(1,"hard-drives"),d())}function Dn(n,t){n&1&&(s(0,"sh-icon",50),m(1,"jar"),d())}function yn(n,t){n&1&&(s(0,"sh-icon",50),m(1,"textbox"),d())}function On(n,t){if(n&1){let e=E();s(0,"sh-form-field")(1,"label",41),u(2,fn,2,0,"sup",46),m(3),u(4,Sn,2,1,"sh-icon",43),u(5,Nn,2,0,"sh-icon",47),x(6,hn,1,0,"ng-container",24),d(),s(7,"input",48),h("keydown",function(i){f(e);let a=l().$implicit,_=l(2);return S(_.onKeyDown(a.fieldGroup,a.formView.name,a.formView.type,i))})("ngModelChange",function(i){f(e);let a=l().$implicit,_=l(2);return S(_.updateFieldValue(a.fieldGroup,a.formView.name,i))}),d(),X(8)(9),u(10,En,2,5,"sh-icon",49)(11,In,2,0,"sh-icon",50)(12,xn,2,0,"sh-icon",50)(13,Dn,2,0,"sh-icon",50)(14,yn,2,0,"sh-icon",50),d()}if(n&2){let e=l().$implicit,o=p(1),i=p(2),a=p(3),_=p(4),C=p(5);l();let N=y(17);r(),c("for",C),r(),g(e.formView.isMandatory&&_?2:-1),r(),A(" ",o," "),r(),g(e.formView.longDescription?4:-1),r(),g(_&&e.formView.type==="Path"?5:-1),r(),c("ngTemplateOutlet",N)("ngTemplateOutletContext",v(16,G,B(13,J,e.fieldGroup,e.formView))),r(),c("type",e.formView.type==="Email"?"email":"text")("id",C)("ngModel",i);let V=a,q=l().hasLeadingSlash(V??"");r(),M(q&&(e.formView.doubleSlash==null?null:e.formView.doubleSlash.message)),r(),M(e.formView.doubleSlash==null?null:e.formView.doubleSlash.type),r(),g(e.formView.type==="Path"?10:e.formView.type==="Email"?11:e.formView.type==="Hostname"?12:e.formView.type==="Bucketname"||e.formView.type==="BucketnameB2"?13:14)}}function Fn(n,t){n&1&&(s(0,"sup",52),m(1,"*"),d())}function An(n,t){if(n&1&&(s(0,"sh-icon",43),m(1,"question"),d()),n&2){let e=l(2).$implicit;c("shTooltip",e.formView.longDescription)}}function wn(n,t){n&1&&P(0)}function Mn(n,t){if(n&1){let e=E();s(0,"span",56),h("click",function(){f(e);let i=l(2).$implicit,a=l(2);return S(a.oauthStartTokenCreation(i.destinationType,i.fieldGroup,i.formView.name,i.formView.oauthVersion))}),m(1," AuthID "),d()}}function Ln(n,t){n&1&&(s(0,"sh-icon",50),m(1,"password"),d())}function Pn(n,t){if(n&1){let e=E();s(0,"sh-icon",57),h("click",function(){f(e);let i=l(2).$implicit;return S(i.formView.showPassword=!i.formView.showPassword)}),m(1," eye "),d()}}function vn(n,t){if(n&1){let e=E();s(0,"sh-icon",57),h("click",function(){f(e);let i=l(2).$implicit;return S(i.formView.showPassword=!i.formView.showPassword)}),m(1," eye-slash "),d()}}function Vn(n,t){if(n&1){let e=E();s(0,"sh-form-field")(1,"label",41),u(2,Fn,2,0,"sup",52),m(3),u(4,An,2,1,"sh-icon",43),x(5,wn,1,0,"ng-container",24),d(),s(6,"input",53),h("ngModelChange",function(i){f(e);let a=l().$implicit,_=l(2);return S(_.updateFieldValue(a.fieldGroup,a.formView.name,i))}),d(),u(7,Mn,2,0,"span",54)(8,Ln,2,0,"sh-icon",50),u(9,Pn,2,0,"sh-icon",55)(10,vn,2,0,"sh-icon",55),d()}if(n&2){let e=l().$implicit,o=p(1),i=p(2),a=p(4),_=p(5);l();let C=y(17);r(),c("for",_),r(),g(e.formView.isMandatory&&a?2:-1),r(),A(" ",o," "),r(),g(e.formView.longDescription?4:-1),r(),c("ngTemplateOutlet",C)("ngTemplateOutletContext",v(14,G,B(11,J,e.fieldGroup,e.formView))),r(),c("type",e.formView.showPassword?"text":"password")("id",_)("ngModel",i),r(),g(e.oauthField===e.formView.name?7:8),r(2),g(e.formView.showPassword?9:10)}}function $n(n,t){n&1&&(s(0,"sup",59),m(1,"*"),d())}function Gn(n,t){if(n&1&&(s(0,"sh-icon",43),m(1,"question"),d()),n&2){let e=l(3).$implicit;c("shTooltip",e.formView.longDescription)}}function bn(n,t){n&1&&P(0)}function Rn(n,t){if(n&1&&m(0),n&2){let e=t.$implicit;Se(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ")}}function kn(n,t){if(n&1){let e=E();s(0,"sh-select",58)(1,"label",41),u(2,$n,2,0,"sup",59),m(3),u(4,Gn,2,1,"sh-icon",43),x(5,bn,1,0,"ng-container",24),d(),s(6,"input",44),h("ngModelChange",function(i){f(e);let a=l(2).$implicit,_=l(2);return S(_.updateFieldValue(a.fieldGroup,a.formView.name,i))}),d()(),x(7,Rn,1,2,"ng-template",null,3,oe)}if(n&2){let e=y(8);l();let o=p(0),i=l().$implicit,a=p(1),_=p(2),C=p(4),N=p(5);l();let V=y(17);c("options",o)("isClearable",!1)("optionTemplate",e),r(),c("for",N),r(),g(i.formView.isMandatory&&C?2:-1),r(),A(" ",a," "),r(),g(i.formView.longDescription?4:-1),r(),c("ngTemplateOutlet",V)("ngTemplateOutletContext",v(14,G,B(11,J,i.fieldGroup,i.formView))),r(),c("id",N)("ngModel",_)}}function Bn(n,t){if(n&1&&(X(0),u(1,kn,9,16)),n&2){let e=l().$implicit,o=M(l(2).mapOptions(e.formView));r(),g(o?1:-1)}}function Kn(n,t){n&1&&(s(0,"sup",62),m(1,"*"),d())}function zn(n,t){if(n&1&&(s(0,"sh-icon",43),m(1,"question"),d()),n&2){let e=l(3).$implicit;c("shTooltip",e.formView.longDescription)}}function Un(n,t){n&1&&P(0)}function Jn(n,t){if(n&1&&m(0),n&2){let e=t.$implicit;Se(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ")}}function Xn(n,t){if(n&1){let e=E();s(0,"sh-select",61)(1,"label",41),u(2,Kn,2,0,"sup",62),m(3),u(4,zn,2,1,"sh-icon",43),x(5,Un,1,0,"ng-container",24),d(),s(6,"input",44),h("ngModelChange",function(i){f(e);let a=l(2).$implicit,_=l(2);return S(_.updateFieldValue(a.fieldGroup,a.formView.name,i))}),d()(),x(7,Jn,1,2,"ng-template",null,4,oe)}if(n&2){let e=y(8);l();let o=p(0),i=l().$implicit,a=p(1),_=p(2),C=p(4),N=p(5);l();let V=y(17);c("options",o)("asFreeText",!0)("inlineSearch",!0)("optionTemplate",e),r(),c("for",N),r(),g(i.formView.isMandatory&&C?2:-1),r(),A(" ",a," "),r(),g(i.formView.longDescription?4:-1),r(),c("ngTemplateOutlet",V)("ngTemplateOutletContext",v(15,G,B(12,J,i.fieldGroup,i.formView))),r(),c("id",N)("ngModel",_)}}function Hn(n,t){n&1&&R(0,"sh-progress-bar",60)}function jn(n,t){if(n&1&&(X(0),u(1,Xn,9,17)(2,Hn,1,0,"sh-progress-bar",60)),n&2){let e=l().$implicit,o=p(2),i=M(l(2).mapOptionsWithFreeText(e.formView,o));r(),g(i?1:2)}}function qn(n,t){n&1&&(s(0,"sup",64),m(1,"*"),d())}function Wn(n,t){if(n&1&&(s(0,"sh-icon",43),m(1,"question"),d()),n&2){let e=l(2).$implicit;c("shTooltip",e.formView.longDescription)}}function Qn(n,t){n&1&&P(0)}function Yn(n,t){if(n&1){let e=E();s(0,"app-size",63),h("ngModelChange",function(i){f(e);let a=l().$implicit,_=l(2);return S(_.updateFieldValue(a.fieldGroup,a.formView.name,i))}),s(1,"label",41),u(2,qn,2,0,"sup",64),m(3),u(4,Wn,2,1,"sh-icon",43),x(5,Qn,1,0,"ng-container",24),d()()}if(n&2){let e=l().$implicit,o=p(1),i=p(2),a=p(4),_=p(5);l();let C=y(17);c("inputType",e.Name)("ngModel",i)("customId",_),r(),c("for",_),r(),g(e.formView.isMandatory&&a?2:-1),r(),A(" ",o," "),r(),g(e.formView.longDescription?4:-1),r(),c("ngTemplateOutlet",C)("ngTemplateOutletContext",v(12,G,B(9,J,e.fieldGroup,e.formView)))}}function Zn(n,t){n&1&&(s(0,"sup",65),m(1,"*"),d())}function ei(n,t){if(n&1&&(s(0,"sh-icon",43),m(1,"question"),d()),n&2){let e=l(2).$implicit;c("shTooltip",e.formView.longDescription)}}function ti(n,t){n&1&&P(0)}function ni(n,t){if(n&1){let e=E();s(0,"sh-form-field")(1,"label",41),u(2,Zn,2,0,"sup",65),m(3),u(4,ei,2,1,"sh-icon",43),x(5,ti,1,0,"ng-container",24),d(),s(6,"input",66),h("ngModelChange",function(i){f(e);let a=l().$implicit,_=l(2);return S(_.updateFieldValue(a.fieldGroup,a.formView.name,i))}),d(),s(7,"sh-icon",50),m(8,"numpad"),d()()}if(n&2){let e=l().$implicit,o=p(1),i=p(2),a=p(4),_=p(5);l();let C=y(17);r(),c("for",_),r(),g(e.formView.isMandatory&&a?2:-1),r(),A(" ",o," "),r(),g(e.formView.longDescription?4:-1),r(),c("ngTemplateOutlet",C)("ngTemplateOutletContext",v(11,G,B(8,J,e.fieldGroup,e.formView))),r(),c("id",_)("ngModel",i)}}function ii(n,t){if(n&1&&(s(0,"sh-icon",43),m(1,"question"),d()),n&2){let e=l(2).$implicit;c("shTooltip",e.formView.longDescription)}}function oi(n,t){n&1&&P(0)}function ai(n,t){if(n&1){let e=E();s(0,"sh-toggle",67),h("click",function(){f(e);let i=l().$implicit,a=p(2),_=l(2);return S(_.updateFieldValue(i.fieldGroup,i.formView.name,_.isTrue(a)?"false":"true"))}),s(1,"label",41),m(2),u(3,ii,2,1,"sh-icon",43),x(4,oi,1,0,"ng-container",24),d()()}if(n&2){let e=l().$implicit,o=p(1),i=p(2),a=p(5);l();let _=y(17),C=l();Oe("active",C.isTrue(i)),r(),c("for",a),r(),A(" ",o," "),r(),g(e.formView.longDescription?3:-1),r(),c("ngTemplateOutlet",_)("ngTemplateOutletContext",v(10,G,B(7,J,e.fieldGroup,e.formView)))}}function li(n,t){n&1&&(s(0,"sup",69),m(1,"*"),d())}function ri(n,t){if(n&1&&(s(0,"sh-icon",43),m(1,"question"),d()),n&2){let e=l(3).$implicit;c("shTooltip",e.formView.longDescription)}}function _i(n,t){n&1&&P(0)}function si(n,t){if(n&1&&m(0),n&2){let e=t.$implicit;Se(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ")}}function di(n,t){if(n&1){let e=E();s(0,"sh-select",68)(1,"label",41),u(2,li,2,0,"sup",69),m(3),u(4,ri,2,1,"sh-icon",43),x(5,_i,1,0,"ng-container",24),d(),s(6,"input",70),h("ngModelChange",function(i){f(e);let a=l(2).$implicit,_=l(2);return S(_.updateFieldValue(a.fieldGroup,a.formView.name,i))}),d()(),x(7,si,1,2,"ng-template",null,5,oe)}if(n&2){let e=y(8);l();let o=p(0),i=l().$implicit,a=p(1),_=p(2),C=p(4),N=p(5);l();let V=y(17);c("options",o)("selectMultiple",!0)("optionTemplate",e),r(),c("for",N),r(),g(i.formView.isMandatory&&C?2:-1),r(),A(" ",a," "),r(),g(i.formView.longDescription?4:-1),r(),c("ngTemplateOutlet",V)("ngTemplateOutletContext",v(13,G,B(10,J,i.fieldGroup,i.formView))),r(),c("ngModel",_)}}function ci(n,t){if(n&1&&(X(0),u(1,di,9,15)),n&2){let e=l().$implicit,o=M(l(2).mapOptions(e.formView));r(),g(o?1:-1)}}function pi(n,t){n&1&&(s(0,"sup",71),m(1,"*"),d())}function mi(n,t){if(n&1&&(s(0,"sh-icon",43),m(1,"question"),d()),n&2){let e=l(2).$implicit;c("shTooltip",e.formView.longDescription)}}function Ci(n,t){n&1&&P(0)}function ui(n,t){if(n&1){let e=E();s(0,"app-timespan",63),h("ngModelChange",function(i){f(e);let a=l().$implicit,_=l(2);return S(_.updateFieldValue(a.fieldGroup,a.formView.name,i))}),s(1,"label",41),u(2,pi,2,0,"sup",71),m(3),u(4,mi,2,1,"sh-icon",43),x(5,Ci,1,0,"ng-container",24),d()()}if(n&2){let e=l().$implicit,o=p(1),i=p(2),a=p(4),_=p(5);l();let C=y(17);c("inputType",e.formView.name)("ngModel",i)("customId",_),r(),c("for",_),r(),g(e.formView.isMandatory&&a?2:-1),r(),A(" ",o," "),r(),g(e.formView.longDescription?4:-1),r(),c("ngTemplateOutlet",C)("ngTemplateOutletContext",v(12,G,B(9,J,e.fieldGroup,e.formView)))}}function gi(n,t){n&1&&(s(0,"sup",73),m(1,"*"),d())}function Ti(n,t){if(n&1&&(s(0,"sh-icon",43),m(1,"question"),d()),n&2){let e=l(2).$implicit;c("shTooltip",e.formView.longDescription)}}function fi(n,t){n&1&&P(0)}function Si(n,t){if(n&1){let e=E();s(0,"app-file-drop-textarea",72),h("ngModelChange",function(i){f(e);let a=l().$implicit,_=l(2);return S(_.updateFieldValue(a.fieldGroup,a.formView.name,i))}),s(1,"label"),u(2,gi,2,0,"sup",73),m(3),u(4,Ti,2,1,"sh-icon",43),x(5,fi,1,0,"ng-container",24),d()()}if(n&2){let e=l().$implicit,o=p(2),i=p(4),a=p(5);l();let _=y(17);c("ngModel",o)("customId",a)("placeholder",e.formView.longDescription),r(2),g(e.formView.isMandatory&&i?2:-1),r(),A(" ",e.formView.shortDescription??e.formView.name," "),r(),g(e.formView.longDescription?4:-1),r(),c("ngTemplateOutlet",_)("ngTemplateOutletContext",v(11,G,B(8,J,e.fieldGroup,e.formView)))}}function Ni(n,t){n&1&&(R(0,"sh-spinner"),s(1,"span"),_e(2,10),d()),n&2&&tt("--spinner-size","16px")("--spinner-thickness","2px")}function hi(n,t){n&1&&(s(0,"div",76),_e(1,11),d())}function Ei(n,t){if(n&1&&m(0),n&2){let e=t.$implicit;Se(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ")}}function Ii(n,t){if(n&1){let e=E();s(0,"sh-select",77)(1,"label",41)(2,"sup",78),m(3,"*"),d(),s(4,"span"),_e(5,12),d()(),s(6,"input",44),h("ngModelChange",function(i){f(e);let a=l(4).$implicit,_=l(2);return S(_.updateFieldValue(a.fieldGroup,a.formView.name,i))}),d()(),x(7,Ei,1,2,"ng-template",null,6,oe)}if(n&2){l(4);let e=p(2),o=p(5),i=l(2);c("options",i.restoreBackupIdOptions())("isClearable",!1),r(),c("for",o),r(5),c("id",o)("ngModel",e)}}function xi(n,t){if(n&1&&u(0,Ni,3,4)(1,hi,2,0,"div",76)(2,Ii,9,5),n&2){let e=l(5);g(e.isLoadingRestoreBackupIdOptions()?0:e.restoreBackupIdOptions().length==0?1:2)}}function Di(n,t){n&1&&(s(0,"sup",79),m(1,"*"),d())}function yi(n,t){if(n&1&&(s(0,"sh-icon",43),m(1,"question"),d()),n&2){let e=l(4).$implicit;c("shTooltip",e.formView.longDescription)}}function Oi(n,t){n&1&&P(0)}function Fi(n,t){if(n&1){let e=E();s(0,"button",81),h("click",function(){f(e),l(4);let i=p(5),a=l(2);return S(a.toggleDisabled(i))}),H(1,13),R(2,"sh-icon"),j(),d()}}function Ai(n,t){if(n&1){let e=E();s(0,"sh-form-field")(1,"label",41),u(2,Di,2,0,"sup",79),m(3),u(4,yi,2,1,"sh-icon",43),x(5,Oi,1,0,"ng-container",24),d(),s(6,"input",80),h("ngModelChange",function(i){f(e);let a=l(3).$implicit,_=l(2);return S(_.updateFieldValue(a.fieldGroup,a.formView.name,i))}),d(),s(7,"sh-icon",50),m(8,"textbox"),d()(),u(9,Fi,3,0,"button",40)}if(n&2){let e=l(3).$implicit,o=p(1),i=p(2),a=p(4),_=p(5);l();let C=y(17),N=l();r(),c("for",_),r(),g(e.formView.isMandatory&&a?2:-1),r(),A(" ",o," "),r(),g(e.formView.longDescription?4:-1),r(),c("ngTemplateOutlet",C)("ngTemplateOutletContext",v(15,G,B(12,J,e.fieldGroup,e.formView))),r(),c("type","text")("id",_)("ngModel",i)("placeholder",e.formView.longDescription)("disabled",!0),r(3),g(N.getIsDisabled(_)?9:-1)}}function wi(n,t){if(n&1&&(s(0,"div",74),u(1,xi,3,1)(2,Ai,10,17),d()),n&2){let e=l(4);r(),g(e.isRestoreFlow()?1:2)}}function Mi(n,t){if(n&1){let e=E();s(0,"div",82),H(1,14),R(2,"div")(3,"div"),j(),d(),s(4,"button",81),h("click",function(){f(e);let i=l(5);return S(i.openConsole())}),H(5,15),R(6,"sh-icon"),j(),d()}}function Li(n,t){n&1&&(s(0,"div",82),_e(1,16),d(),s(2,"button",83),H(3,17),R(4,"sh-icon"),j(),d()),n&2&&(r(2),c("routerLink",be(1,Zt)))}function Pi(n,t){if(n&1&&(s(0,"div",75),u(1,Mi,7,0)(2,Li,5,2),d()),n&2){let e=l(4);r(),g(e.isConnectedToConsole()?1:2)}}function vi(n,t){if(n&1&&u(0,wi,3,1,"div",74)(1,Pi,3,1,"div",75),n&2){let e=l(3);g(e.isConnectedToConsole()&&e.hasStorageApiKey()?0:1)}}function Vi(n,t){n&1&&(s(0,"sup",85),m(1,"*"),d())}function $i(n,t){if(n&1&&(s(0,"sh-icon",43),m(1,"question"),d()),n&2){let e=l(3).$implicit;c("shTooltip",e.formView.longDescription)}}function Gi(n,t){n&1&&P(0)}function bi(n,t){if(n&1){let e=E();s(0,"div",84)(1,"sh-form-field")(2,"label",41),u(3,Vi,2,0,"sup",85),m(4),u(5,$i,2,1,"sh-icon",43),x(6,Gi,1,0,"ng-container",24),d(),s(7,"input",86),h("ngModelChange",function(i){f(e);let a=l(2).$implicit,_=l(2);return S(_.updateFieldValue(a.fieldGroup,a.formView.name,i))}),d(),s(8,"sh-icon",50),m(9,"textbox"),d()(),s(10,"button",87),h("click",function(){f(e);let i=l(4);return S(i.authenticateFilen())}),H(11,18),R(12,"sh-icon"),j(),d()()}if(n&2){let e=l(2).$implicit,o=p(1),i=p(2),a=p(4),_=p(5);l();let C=y(17),N=l();r(2),c("for",_),r(),g(e.formView.isMandatory&&a?3:-1),r(),A(" ",o," "),r(),g(e.formView.longDescription?5:-1),r(),c("ngTemplateOutlet",C)("ngTemplateOutletContext",v(12,G,B(9,J,e.fieldGroup,e.formView))),r(),c("id",_)("ngModel",i),r(3),c("disabled",N.isAuthenticatingFilen())}}function Ri(n,t){if(n&1&&u(0,bi,13,14,"div",84),n&2){let e=l(3);g(e.hasFilenApiKey()?-1:0)}}function ki(n,t){if(n&1){let e=E();s(0,"button",81),h("click",function(){f(e);let i=l().$implicit,a=l(2);return S(a.removeAdvancedOption(i.formView.name))}),s(1,"sh-icon"),m(2,"x-circle"),d()()}}function Bi(n,t){if(n&1&&(s(0,"div",34),X(1)(2)(3)(4)(5),u(6,Cn,6,12,"app-file-tree",35)(7,Tn,6,9,"app-file-tree",36)(8,On,15,18,"sh-form-field")(9,Vn,11,16,"sh-form-field")(10,Bn,2,2)(11,jn,3,2)(12,Yn,6,14,"app-size",37)(13,ni,9,13,"sh-form-field")(14,ai,5,12,"sh-toggle",38)(15,ci,2,2)(16,ui,6,14,"app-timespan",37)(17,Si,6,13,"app-file-drop-textarea",39)(18,vi,2,1)(19,Ri,1,1),u(20,ki,3,0,"button",40),d()),n&2){let e=t.$implicit;l();let o=p(0),i=l();Oe("single-field",e.fieldGroup!=="advanced"),r(),M(e.formView.shortDescription??e.formView.name),r(),M(i.getFieldGroup(o,e.fieldGroup)[e.formView.name]),r();let a=M(i.getFieldValue(e.fieldGroup,e.formView.name));r(),M((a??"").toString().trim()===""),r(),M("destination-"+e.fieldGroup+"-"+e.index+"-"+(e.asHttpOptions?"http":"other")),r(),g(e.formView.type==="FileTree"?6:e.formView.type==="FolderTree"?7:e.formView.type==="String"||e.formView.type==="Path"||e.formView.type==="Email"||e.formView.type==="Hostname"||e.formView.type==="Bucketname"||e.formView.type==="BucketnameB2"?8:e.formView.type==="Password"?9:e.formView.type==="Enumeration"?10:e.formView.type==="NonValidatedSelectableString"?11:e.formView.type==="Size"?12:e.formView.type==="Integer"?13:e.formView.type==="Boolean"?14:e.formView.type==="Flags"?15:e.formView.type==="Timespan"||e.formView.type==="DateTime"?16:e.formView.type==="FreeText"?17:e.formView.type==="DuplicatiBackupId"?18:e.formView.type==="Filen2FACode"?19:-1),r(14),g(e.fieldGroup==="advanced"?20:-1)}}function Ki(n,t){if(n&1&&(s(0,"sh-icon",88),m(1,"x-circle"),d()),n&2){l();let e=p(0);c("shTooltip",(e==null?null:e.message)??"Invalid value")}}function zi(n,t){if(n&1&&(s(0,"sh-icon",89),m(1,"warning"),d()),n&2){l();let e=p(0);c("shTooltip",(e==null?null:e.message)??"Invalid value")}}function Ui(n,t){if(n&1&&(X(0),u(1,Ki,2,1,"sh-icon",88)(2,zi,2,1,"sh-icon",89)),n&2){let e=l().$implicit,o=p(0),i=M(e.formView.validate(o));r(),g((i==null?null:i.type)==="error"?1:(i==null?null:i.type)==="warning"?2:-1)}}function Ji(n,t){if(n&1&&(X(0),u(1,Ui,3,2)),n&2){let e=t.$implicit,i=(M(l(2).getFieldValue(e.fieldGroup,e.formView.name))??"").toString().trim()==="";r(),g(!i&&e.formView.validate?1:-1)}}function Xi(n,t){if(n&1&&(X(0),ne(1,tn,1,9,"ng-container",null,te),ne(3,on,1,9,"ng-container",null,te),s(5,"sh-toggle-card",19),xe(6,20)(7),_e(8,7),fe(),X(9),u(10,an,3,0,"button",21)(11,rn,17,2,"div",22),fe(),u(12,_n,1,3,"textarea",23)(13,cn,2,0),d(),x(14,Bi,21,9,"ng-template",null,0,oe)(16,Ji,2,2,"ng-template",null,1,oe)),n&2){let e=l(),o=p(1);M(e.destinationForm()),r(),ie(o.custom),r(2),ie(o.dynamic),r(2),c("disallowToggle",!0),r(4),M(e.nonSelectedAdvancedFormViews()),r(),g(e.showTextArea()?10:11),r(2),g(e.showTextArea()?12:13)}}var Bt=class n{#e=w($t);#t=w(ue);#n=w(xt);#s=w(ge);#a=w(Dt);#l=w(yt);#i=w(Le);injector=w(We);targetUrl=lt.required();useBackupState=ae(!1);#o=null;destinationType=$(()=>{let t=this.targetUrl();if(!t)return null;let e=Re(t);return this.#o=e?.customKey??e?.key,this.#o});refreshView=k(!1);destinationForm=k({custom:{},dynamic:{},advanced:{}});advancedFormFieldNames=$(()=>Object.keys(this.destinationForm().advanced??{}));destinationFormConfig=k(null);showTextArea=k(!1);isLoadingRestoreBackupIdOptions=k(!1);isRestoreFlow=$(()=>!this.useBackupState());restoreBackupIdOptions=It(Et(this.targetUrl).pipe(Xe(t=>{if(!t)return{authKey:null,url:null,isRestore:this.isRestoreFlow(),hasKey:this.hasStorageApiKey()};let e=t.indexOf("?"),o=e>=0?t.substring(e+1):"",i=new URLSearchParams(o),a=i.get("duplicati-auth-apiid")??"",_=i.get("duplicati-auth-apikey")??"";return{authKey:`${a}|${_}`,url:t}}),He((t,e)=>t.authKey===e.authKey),qe(({url:t})=>{this.lastRestoreAuthQueryUrl=t}),je(({url:t})=>t&&t.startsWith("duplicati://")&&this.hasStorageApiKey()&&this.isRestoreFlow()?(this.isLoadingRestoreBackupIdOptions.set(!0),this.#l.getDuplicatiStorageBackups(t).pipe($e(()=>this.isLoadingRestoreBackupIdOptions.set(!1)))):Je([]))),{initialValue:[]});isConnectedToConsole=$(()=>this.#a.state()==="connected");hasStorageApiKey=$(()=>(this.#n.serverSettings()?.["remote-control-storage-api-id"]??"").length>0);isAuthenticatingFilen=k(!1);hasFilenApiKey=$(()=>{let e=this.destinationForm().advanced["api-key"];return e&&e.length>0});nonSelectedAdvancedFormViews=$(()=>{let t=this.destinationFormConfig();if(!t)return[];let e=this.advancedFormFieldNames();return t.advanced.filter(o=>e.findIndex(i=>i===o.name)===-1)});destinationTypeEffect=Te(()=>{let t=this.targetUrl(),e=Re(t??""),o=e.key,i=e.customKey??o,a=this.#s.backendModules().find(D=>D.Key===o)??{Key:o,DisplayName:e.displayName,Description:e.description,Options:[]};if(!a||!a.Options||!o)return;let _=e&&e.oauthField?e.oauthField:null,C=e&&e.customFields?e.customFields:{},N=e&&e.dynamicFields?e.dynamicFields:[],V=e&&e.advancedFields?e.advancedFields:[],q=e&&e.ignoredAdvancedFields?e.ignoredAdvancedFields:[],K={destinationType:i,oauthField:_,custom:[],dynamic:[],advanced:[]};C&&Object.entries(C).forEach(([D,T],O)=>{let F=T.order??O,b=T.validate;!b&&T.type==="Bucketname"&&(b=L=>Lt(L)?null:{type:"error",message:$localize`Invalid bucket name.`}),b&&T.type==="Hostname"&&(b=L=>Pt(L)?null:{type:"error",message:$localize`Invalid hostname.`}),K.custom.push(z({order:900+F,validate:b},T))});for(let D=0;D<a.Options.length;D++){let T=a.Options[D];if(T.Deprecated)continue;let O=N.find(F=>F===T.Name||T.Aliases?.includes(F.name)||F.name===T.Name);if(O){let F=T.Aliases?.indexOf(O.name)??-1,b=T.Aliases&&F>-1?T.Aliases[F]:T.Name,L=O&&typeof O!="string",le=L?O?.defaultValue??T.DefaultValue:T.DefaultValue,re=L&&O?.order!==void 0?O.order:D,Q={name:b,type:T.Type,shortDescription:T.ShortDescription??void 0,longDescription:T.LongDescription??void 0,options:T.ValidValues,order:900+re},Y=L?z(z({},Q),O):Q;K.dynamic.push(Y)}else{let F=T.Name;if(q.find(ee=>ee===F))continue;let L=V.find(ee=>ee===F||ee.name===F),le=L&&typeof L!="string",re=le&&L?.order!==void 0?L.order:D,Q={name:F,type:T.Type,shortDescription:T.ShortDescription??void 0,longDescription:T.LongDescription??void 0,options:T.ValidValues,defaultValue:T.DefaultValue,order:900+re},Y=le?z(z({},Q),L):Q;K.advanced.push(Y)}}if(K.custom.sort((D,T)=>D.order-T.order),K.dynamic.sort((D,T)=>D.order-T.order),K.advanced.sort((D,T)=>D.order-T.order),this.destinationFormConfig.set(K),!t)return;let W=wt(t);W&&this.destinationForm.set({custom:W.custom,dynamic:W.dynamic,advanced:W.advanced})});destinationFormEffect=Te(()=>{let t=this.#o,e=this.destinationForm(),o=this.refreshView();if(!e||!t)return;let i=At({destinationType:t,custom:e.custom,dynamic:e.dynamic,advanced:e.advanced});i&&this.targetUrl.set(i)});getFieldValue(t,e){let i=this.destinationForm()[t][e];return i||null}getFormView(t,e){let i=this.destinationFormConfig()?.[t].find(a=>a.name===e);return i||null}getDefaultFormView(t){return{name:t,type:"String",shortDescription:t,longDescription:$localize`This is an undocumented option.`}}getFieldGroup(t,e){return t[e]}hasLeadingSlash(t){return t?.startsWith("/")??!1}addAdvancedOption(t){let e=this.destinationForm();e.advanced[t.name]=t.defaultValue,this.destinationForm.set(z({},e))}isTrue(t){if(typeof t=="boolean")return t;if(typeof t=="string"){let e=t.toLowerCase();return e==="true"||e==="1"||e==="yes"||e==="on"}return!1}onKeyDown(t,e,o,i){if(o==="Hostname"||o==="Bucketname"){if(["Backspace","Delete","ArrowLeft","ArrowRight","Tab","Home","End"].includes(i.key))return;if(i.key=="/"||i.key=="\\"||i.key==":"){i.preventDefault();return}}}updateFieldValue(t,e,o){let i=this.destinationForm();i[t][e]=o,this.destinationForm.set(z({},i))}removeAdvancedOption(t){let e=this.destinationForm();delete e.advanced[t],this.destinationForm.set(z({},e))}mapOptions(t){let e=t.loadOptions;if(e)return e(this.injector)();let o=t.options;return o?o.map(i=>({key:i,value:i})):null}mapOptionsWithFreeText(t,e){let o=this.mapOptions(t);return o?(e&&e.length>0&&(o.find(a=>a.value===e)||o.push({key:e,value:e})),o):null}#r=k(!1);oauthStartTokenCreation(t,e,o,i){this.#r.set(!0);let a=(i??1)==2?this.#t.defaultOAuthUrlV2():this.#t.defaultOAuthUrl(),_=this.#n.serverSettings()?.["--oauth-url"];if(_&&_.length>0&&(a=_),this.useBackupState()){let T=this.#e.mapFormsToSettings().find(O=>O.Name==="--oauth-url")?.Value;T&&T.length>0&&(a=T)}let C=this.destinationForm().advanced["oauth-url"];C&&C.length>0&&(a=C);let N=`${a}?type=${t}`,V=450,q=600,K=screen.width/2-V/2,W=screen.height/2-q/2,D=window.open(N,"_blank","height="+q+",width="+V+",menubar=0,status=0,titlebar=0,toolbar=0,left="+K+",top="+W);return window.addEventListener("message",T=>{let O=T.data.startsWith("authid:"),F=O?T.data.replace("authid:",""):null;O&&(this.destinationForm.update(b=>(b[e][o]=F,b)),this.#r.set(!1),this.refreshView.set(!this.refreshView()),D?.close())}),!1}settingsAsText=$(()=>{let t=this.destinationForm().advanced;return Object.entries(t).map(([e,o])=>{let i=e??"",a="";return typeof o=="boolean"?a=this.isTrue(o)?"True":"False":(typeof o=="number"||o!=null)&&(a=o.toString()),`${i}=${a}`}).join(`
7
- `)});updateSettingsFromText(t){if(typeof t!="string")return;let e=Mt(t);this.destinationForm.update(o=>he(z({},o),{advanced:e}))}getIsDisabled(t){return document.getElementById(t)?.disabled??!0}toggleDisabled(t){let e=document.getElementById(t);e&&(e.disabled=!e.disabled)}openConsole(){this.#a.openConsole()}#_(t){var e=this.useBackupState()?this.#e.backupId():null;this.isAuthenticatingFilen.set(!0),this.#l.getFilenApiKey(t,e).pipe($e(()=>this.isAuthenticatingFilen.set(!1))).subscribe({next:o=>{if(o.length===0){this.#i.open(U,{data:{title:$localize`Authentication failed`,message:$localize`No API key was returned from the Filen server.`,confirmText:$localize`OK`}});return}this.destinationForm.update(i=>(i.advanced["api-key"]=o,i.dynamic["two-factor-code"]=null,i)),this.refreshView.set(!this.refreshView())},error:o=>{console.error("Error authenticating Filen",o),this.#i.open(U,{data:{title:$localize`Authentication failed`,message:$localize`An error occurred while requesting the Filen API key: ${o.message}`,confirmText:$localize`OK`}})}})}authenticateFilen(){let t=this.targetUrl();if(!t)return;let o=this.destinationForm().advanced["api-key"];if(o&&o.length>0){this.#i.open(U,{data:{title:$localize`Confirm re-authenticate?`,message:$localize`You already have an API key. Are you sure you want to re-authenticate?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:i=>{if(i){var a=new URL(t);a.searchParams.delete("api-key"),this.#_(a.toString())}}});return}this.#_(t)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=Z({type:n,selectors:[["app-single-destination"]],inputs:{targetUrl:[1,"targetUrl"],useBackupState:[1,"useBackupState"]},outputs:{targetUrl:"targetUrlChange"},decls:3,vars:3,consts:()=>{let t;t=$localize`Advanced options`;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#4\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON:`;let i;i=$localize`This field is mandatory`;let a;a=$localize`This field is mandatory`;let _;_=$localize`This field is mandatory`;let C;C=$localize`An empty path means storing data in the initial or root folder, which is not recommended`;let N;N=$localize`This field is mandatory`;let V;V=$localize`This field is mandatory`;let q;q=$localize`This field is mandatory`;let K;K=$localize`This field is mandatory`;let W;W=$localize`This field is mandatory`;let D;D=$localize`This field is mandatory`;let T;T=$localize`This field is mandatory`;let O;O=$localize`This field is mandatory`;let F;F=$localize`Loading available backups...`;let b;b=$localize`No backups found from this machine, contact support`;let L;L=$localize`This field is mandatory`;let le;le=$localize`Pick the backup to restore from`;let re;re=$localize`This field is mandatory`;let Q;Q=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:pencil${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let Y;Y=$localize`${"[\uFFFD#2\uFFFD|\uFFFD#3\uFFFD]"}:START_TAG_DIV:An API key with storage access is required to use Duplicati storage.${"[\uFFFD/#2\uFFFD|\uFFFD/#3\uFFFD]"}:CLOSE_TAG_DIV:${"[\uFFFD#2\uFFFD|\uFFFD#3\uFFFD]"}:START_TAG_DIV:Visit the console and assign an API key to this machine.${"[\uFFFD/#2\uFFFD|\uFFFD/#3\uFFFD]"}:CLOSE_TAG_DIV:`,Y=Ye(Y);let ee;ee=$localize` Visit console ${"\uFFFD#6\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SH_ICON:`;let Be;Be=$localize`Connect to the console to use Duplicati storage.`;let Ke;Ke=$localize` Connect now ${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON:`;let ze;ze=$localize`This field is mandatory`;let Ue;return Ue=$localize` Authenticate now ${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON:`,[["fieldTemplate",""],["validateTemplate",""],["option",""],["enumOptionTemplate",""],["nonValidatedOptionTemplate",""],["optionTemplate",""],["backupIdOptionTemplate",""],t,e,o,F,b,le,Q,Y,ee,Be,Ke,Ue,[1,"advanced-options",3,"disallowToggle"],["title",""],["shButton","","type","button",1,"outlined","small"],[1,"actions"],["wrap","off","placeholder","Paste advanced options here, one per line.",1,"raw-text-area",3,"ngModel","ngModelOptions"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["shButton","","type","button",1,"outlined","small",3,"click"],[3,"searchable"],["shButton","","type","button",1,"outlined","small",3,"disabled"],["menu",""],["type","button"],["shButton","","type","button",1,"small"],["shButton","","type","button",1,"small",3,"click"],["type","button",3,"click"],["wrap","off","placeholder","Paste advanced options here, one per line.",1,"raw-text-area",3,"ngModelChange","ngModel","ngModelOptions"],[1,"field-row"],[3,"startingPath","accepts","showFiles","hideShortcuts","showHiddenNodes","selectFiles"],[3,"hideShortcuts","enableCreateFolder","startingPath"],[3,"inputType","ngModel","customId"],[1,"primary","raised",3,"active"],[3,"ngModel","customId","placeholder"],["shButton","","type","button",1,"outlined"],[3,"for"],["shTooltip",i],[1,"primary",3,"shTooltip"],["type","text",3,"ngModelChange","id","ngModel"],["shTooltip",a],["shTooltip",_],["shTooltip",C,1,"warn"],["autocomplete","off",3,"keydown","ngModelChange","type","id","ngModel"],["prefix","",3,"error","warn","shTooltip"],["prefix",""],["prefix","",3,"shTooltip"],["shTooltip",N],["autocomplete","off",3,"ngModelChange","type","id","ngModel"],["prefix","",1,"link"],["suffix","",1,"clickable"],["prefix","",1,"link",3,"click"],["suffix","",1,"clickable",3,"click"],["label","key","value","value",3,"options","isClearable","optionTemplate"],["shTooltip",V],[1,"indeterminate","primary"],["label","key","value","value",3,"options","asFreeText","inlineSearch","optionTemplate"],["shTooltip",q],[3,"ngModelChange","inputType","ngModel","customId"],["shTooltip",K],["shTooltip",W],["type","number",3,"ngModelChange","id","ngModel"],[1,"primary","raised",3,"click"],["key","key","value","value",1,"primary","raised",3,"options","selectMultiple","optionTemplate"],["shTooltip",D],["type","text","id","text",3,"ngModelChange","ngModel"],["shTooltip",T],[3,"ngModelChange","ngModel","customId","placeholder"],["shTooltip",O],[1,"duplicati-backup-id"],[1,"duplicati-backup-id-console"],[1,"no-backups-found"],[3,"options","isClearable"],["shTooltip",L],["shTooltip",re],["autocomplete","off",3,"ngModelChange","type","id","ngModel","placeholder","disabled"],["shButton","","type","button",1,"outlined",3,"click"],[1,"info"],["shButton","","type","button",1,"outlined",3,"routerLink"],[1,"filen-2fa-setup"],["shTooltip",ze],["type","text","autocomplete","off",3,"ngModelChange","id","ngModel"],["shButton","","type","button",1,"outlined",3,"click","disabled"],[1,"error",3,"shTooltip"],[1,"warn",3,"shTooltip"]]},template:function(e,o){if(e&1&&(X(0)(1),u(2,Xi,18,5)),e&2){let i=M(o.destinationType());r();let a=M(o.destinationFormConfig());r(),g(i&&a?2:-1)}},dependencies:[ct,se,dt,de,pe,ce,rt,_t,Vt,vt,Gt,Ve,Pe,Ce,me,ft,Ct,Tt,Nt,St,ut,gt],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.advanced-options[_ngcontent-%COMP%]{position:relative;z-index:1}textarea[_ngcontent-%COMP%] ~ grammarly-extension[_ngcontent-%COMP%]{display:none}sh-select[_ngcontent-%COMP%]{--miw: p2r(120)}[prefix].link[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline;color:var(--primary-8)}.clickable[_ngcontent-%COMP%]{cursor:pointer;color:var(--primary-8)}label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}label[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:1rem}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.field-row.single-field[_ngcontent-%COMP%]{display:block}.actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.raw-text-area[_ngcontent-%COMP%]{min-height:12rem;white-space:pre}.filen-2fa-setup[_ngcontent-%COMP%], .duplicati-backup-id[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:8px;align-items:flex-end}.duplicati-backup-id[_ngcontent-%COMP%] sh-select[_ngcontent-%COMP%]{width:100%}.duplicati-backup-id-console[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:8px;align-items:center}.duplicati-backup-id-console[_ngcontent-%COMP%] .info[_ngcontent-%COMP%]{width:100%;display:flex;flex-direction:column;gap:4px}"],changeDetection:0})};export{bt as a,ve as b,ge as c,Rt as d,Bt as e};
package/chunk-HPNLQHW6.js DELETED
@@ -1 +0,0 @@
1
- import{_ as pi,fa as Pt,va as fi}from"./chunk-OTPG7USH.js";import{a as Ft}from"./chunk-TT3S63BX.js";import{$ as w,$c as It,Ab as g,Bb as oe,Cb as A,Db as F,Eb as ye,Gc as ui,Hb as De,Ib as z,Lc as Tt,Mc as S,O as tt,Oa as ai,Pa as p,Q as X,Qc as se,R as we,Rc as m,S as Le,Sc as J,Tc as Nt,U as le,Ua as bt,Uc as H,Va as it,Vb as E,Vc as At,W as y,Wb as Se,Xa as de,Xb as f,Ya as D,Yb as T,Z as oi,Za as li,Zb as u,Zc as hi,_ as si,a as Jt,aa as x,bc as wt,cb as O,cc as ue,da as xe,db as He,dc as ie,ea as Oe,eb as R,ec as xt,fa as he,fc as G,g as ei,gb as U,gc as N,ha as pe,hb as fe,hc as Ot,ic as Z,jc as C,k as ti,kb as Mt,kc as Ne,la as v,lb as ci,lc as K,mc as nt,na as k,oa as ce,ob as Et,oc as Ue,p as ii,pa as Be,pc as ze,qa as Ce,qc as $e,rb as ge,rc as ot,sa as I,sb as b,sc as ne,tb as M,tc as L,ub as je,v as ni,vb as di,wa as ri,wb as Ve,wc as $,xb as Te,xc as st,yb as Q,yc as rt,zb as h,zc as Vt}from"./chunk-T2WO6CVD.js";import{a as P,b as j,c as Kt}from"./chunk-7CGTOI24.js";var bi=(()=>{class i{_renderer;_elementRef;onChange=e=>{};onTouched=()=>{};constructor(e,t){this._renderer=e,this._elementRef=t}setProperty(e,t){this._renderer.setProperty(this._elementRef.nativeElement,e,t)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}static \u0275fac=function(t){return new(t||i)(D(de),D(I))};static \u0275dir=R({type:i})}return i})(),Je=(()=>{class i extends bi{static \u0275fac=(()=>{let e;return function(n){return(e||(e=Ce(i)))(n||i)}})();static \u0275dir=R({type:i,features:[U]})}return i})(),ve=new le(""),Xi={provide:ve,useExisting:X(()=>Qi),multi:!0},Qi=(()=>{class i extends Je{writeValue(e){this.setProperty("checked",e)}static \u0275fac=(()=>{let e;return function(n){return(e||(e=Ce(i)))(n||i)}})();static \u0275dir=R({type:i,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(t,n){t&1&&E("change",function(r){return n.onChange(r.target.checked)})("blur",function(){return n.onTouched()})},standalone:!1,features:[$([Xi]),U]})}return i})(),Zi={provide:ve,useExisting:X(()=>Mi),multi:!0};function Ki(){let i=Ft()?Ft().getUserAgent():"";return/android (\d+)/.test(i.toLowerCase())}var Ji=new le(""),Mi=(()=>{class i extends bi{_compositionMode;_composing=!1;constructor(e,t,n){super(e,t),this._compositionMode=n,this._compositionMode==null&&(this._compositionMode=!Ki())}writeValue(e){let t=e??"";this.setProperty("value",t)}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}static \u0275fac=function(t){return new(t||i)(D(de),D(I),D(Ji,8))};static \u0275dir=R({type:i,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(t,n){t&1&&E("input",function(r){return n._handleInput(r.target.value)})("blur",function(){return n.onTouched()})("compositionstart",function(){return n._compositionStart()})("compositionend",function(r){return n._compositionEnd(r.target.value)})},standalone:!1,features:[$([Zi]),U]})}return i})();function Bt(i){return i==null||Ht(i)===0}function Ht(i){return i==null?null:Array.isArray(i)||typeof i=="string"?i.length:i instanceof Set?i.size:null}var be=new le(""),Me=new le(""),en=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,gi=class{static min(o){return tn(o)}static max(o){return nn(o)}static required(o){return on(o)}static requiredTrue(o){return sn(o)}static email(o){return rn(o)}static minLength(o){return an(o)}static maxLength(o){return ln(o)}static pattern(o){return cn(o)}static nullValidator(o){return Ei()}static compose(o){return Ni(o)}static composeAsync(o){return Ai(o)}};function tn(i){return o=>{if(o.value==null||i==null)return null;let e=parseFloat(o.value);return!isNaN(e)&&e<i?{min:{min:i,actual:o.value}}:null}}function nn(i){return o=>{if(o.value==null||i==null)return null;let e=parseFloat(o.value);return!isNaN(e)&&e>i?{max:{max:i,actual:o.value}}:null}}function on(i){return Bt(i.value)?{required:!0}:null}function sn(i){return i.value===!0?null:{required:!0}}function rn(i){return Bt(i.value)||en.test(i.value)?null:{email:!0}}function an(i){return o=>{let e=o.value?.length??Ht(o.value);return e===null||e===0?null:e<i?{minlength:{requiredLength:i,actualLength:e}}:null}}function ln(i){return o=>{let e=o.value?.length??Ht(o.value);return e!==null&&e>i?{maxlength:{requiredLength:i,actualLength:e}}:null}}function cn(i){if(!i)return Ei;let o,e;return typeof i=="string"?(e="",i.charAt(0)!=="^"&&(e+="^"),e+=i,i.charAt(i.length-1)!=="$"&&(e+="$"),o=new RegExp(e)):(e=i.toString(),o=i),t=>{if(Bt(t.value))return null;let n=t.value;return o.test(n)?null:{pattern:{requiredPattern:e,actualValue:n}}}}function Ei(i){return null}function wi(i){return i!=null}function xi(i){return ci(i)?ti(i):i}function Oi(i){let o={};return i.forEach(e=>{o=e!=null?P(P({},o),e):o}),Object.keys(o).length===0?null:o}function Vi(i,o){return o.map(e=>e(i))}function dn(i){return!i.validate}function Ti(i){return i.map(o=>dn(o)?o:e=>o.validate(e))}function Ni(i){if(!i)return null;let o=i.filter(wi);return o.length==0?null:function(e){return Oi(Vi(e,o))}}function jt(i){return i!=null?Ni(Ti(i)):null}function Ai(i){if(!i)return null;let o=i.filter(wi);return o.length==0?null:function(e){let t=Vi(e,o).map(xi);return ni(t).pipe(ii(Oi))}}function Ut(i){return i!=null?Ai(Ti(i)):null}function mi(i,o){return i===null?[o]:Array.isArray(i)?[...i,o]:[i,o]}function Ii(i){return i._rawValidators}function Fi(i){return i._rawAsyncValidators}function kt(i){return i?Array.isArray(i)?i:[i]:[]}function lt(i,o){return Array.isArray(i)?i.includes(o):i===o}function vi(i,o){let e=kt(o);return kt(i).forEach(n=>{lt(e,n)||e.push(n)}),e}function _i(i,o){return kt(o).filter(e=>!lt(i,e))}var ct=class{get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators=[];_rawAsyncValidators=[];_setValidators(o){this._rawValidators=o||[],this._composedValidatorFn=jt(this._rawValidators)}_setAsyncValidators(o){this._rawAsyncValidators=o||[],this._composedAsyncValidatorFn=Ut(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(o){this._onDestroyCallbacks.push(o)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(o=>o()),this._onDestroyCallbacks=[]}reset(o=void 0){this.control&&this.control.reset(o)}hasError(o,e){return this.control?this.control.hasError(o,e):!1}getError(o,e){return this.control?this.control.getError(o,e):null}},W=class extends ct{name;get formDirective(){return null}get path(){return null}},re=class extends ct{_parent=null;name=null;valueAccessor=null},dt=class{_cd;constructor(o){this._cd=o}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}};var Dr=(()=>{class i extends dt{constructor(e){super(e)}static \u0275fac=function(t){return new(t||i)(D(re,2))};static \u0275dir=R({type:i,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(t,n){t&2&&N("ng-untouched",n.isUntouched)("ng-touched",n.isTouched)("ng-pristine",n.isPristine)("ng-dirty",n.isDirty)("ng-valid",n.isValid)("ng-invalid",n.isInvalid)("ng-pending",n.isPending)},standalone:!1,features:[U]})}return i})(),Sr=(()=>{class i extends dt{constructor(e){super(e)}static \u0275fac=function(t){return new(t||i)(D(W,10))};static \u0275dir=R({type:i,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["","formArray",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(t,n){t&2&&N("ng-untouched",n.isUntouched)("ng-touched",n.isTouched)("ng-pristine",n.isPristine)("ng-dirty",n.isDirty)("ng-valid",n.isValid)("ng-invalid",n.isInvalid)("ng-pending",n.isPending)("ng-submitted",n.isSubmitted)},standalone:!1,features:[U]})}return i})();var We="VALID",at="INVALID",Ae="PENDING",Ge="DISABLED",me=class{},ut=class extends me{value;source;constructor(o,e){super(),this.value=o,this.source=e}},Ye=class extends me{pristine;source;constructor(o,e){super(),this.pristine=o,this.source=e}},Xe=class extends me{touched;source;constructor(o,e){super(),this.touched=o,this.source=e}},Ie=class extends me{status;source;constructor(o,e){super(),this.status=o,this.source=e}},ht=class extends me{source;constructor(o){super(),this.source=o}},Ze=class extends me{source;constructor(o){super(),this.source=o}};function zt(i){return(mt(i)?i.validators:i)||null}function un(i){return Array.isArray(i)?jt(i):i||null}function $t(i,o){return(mt(o)?o.asyncValidators:i)||null}function hn(i){return Array.isArray(i)?Ut(i):i||null}function mt(i){return i!=null&&!Array.isArray(i)&&typeof i=="object"}function Pi(i,o,e){let t=i.controls;if(!(o?Object.keys(t):t).length)throw new tt(1e3,"");if(!t[e])throw new tt(1001,"")}function ki(i,o,e){i._forEachChild((t,n)=>{if(e[n]===void 0)throw new tt(1002,"")})}var Fe=class{_pendingDirty=!1;_hasOwnPendingAsyncValidator=null;_pendingTouched=!1;_onCollectionChange=()=>{};_updateOn;_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(o,e){this._assignValidators(o),this._assignAsyncValidators(e)}get validator(){return this._composedValidatorFn}set validator(o){this._rawValidators=this._composedValidatorFn=o}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(o){this._rawAsyncValidators=this._composedAsyncValidatorFn=o}get parent(){return this._parent}get status(){return ce(this.statusReactive)}set status(o){ce(()=>this.statusReactive.set(o))}_status=S(()=>this.statusReactive());statusReactive=v(void 0);get valid(){return this.status===We}get invalid(){return this.status===at}get pending(){return this.status==Ae}get disabled(){return this.status===Ge}get enabled(){return this.status!==Ge}errors;get pristine(){return ce(this.pristineReactive)}set pristine(o){ce(()=>this.pristineReactive.set(o))}_pristine=S(()=>this.pristineReactive());pristineReactive=v(!0);get dirty(){return!this.pristine}get touched(){return ce(this.touchedReactive)}set touched(o){ce(()=>this.touchedReactive.set(o))}_touched=S(()=>this.touchedReactive());touchedReactive=v(!1);get untouched(){return!this.touched}_events=new ei;events=this._events.asObservable();valueChanges;statusChanges;get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(o){this._assignValidators(o)}setAsyncValidators(o){this._assignAsyncValidators(o)}addValidators(o){this.setValidators(vi(o,this._rawValidators))}addAsyncValidators(o){this.setAsyncValidators(vi(o,this._rawAsyncValidators))}removeValidators(o){this.setValidators(_i(o,this._rawValidators))}removeAsyncValidators(o){this.setAsyncValidators(_i(o,this._rawAsyncValidators))}hasValidator(o){return lt(this._rawValidators,o)}hasAsyncValidator(o){return lt(this._rawAsyncValidators,o)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(o={}){let e=this.touched===!1;this.touched=!0;let t=o.sourceControl??this;this._parent&&!o.onlySelf&&this._parent.markAsTouched(j(P({},o),{sourceControl:t})),e&&o.emitEvent!==!1&&this._events.next(new Xe(!0,t))}markAllAsDirty(o={}){this.markAsDirty({onlySelf:!0,emitEvent:o.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsDirty(o))}markAllAsTouched(o={}){this.markAsTouched({onlySelf:!0,emitEvent:o.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsTouched(o))}markAsUntouched(o={}){let e=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let t=o.sourceControl??this;this._forEachChild(n=>{n.markAsUntouched({onlySelf:!0,emitEvent:o.emitEvent,sourceControl:t})}),this._parent&&!o.onlySelf&&this._parent._updateTouched(o,t),e&&o.emitEvent!==!1&&this._events.next(new Xe(!1,t))}markAsDirty(o={}){let e=this.pristine===!0;this.pristine=!1;let t=o.sourceControl??this;this._parent&&!o.onlySelf&&this._parent.markAsDirty(j(P({},o),{sourceControl:t})),e&&o.emitEvent!==!1&&this._events.next(new Ye(!1,t))}markAsPristine(o={}){let e=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let t=o.sourceControl??this;this._forEachChild(n=>{n.markAsPristine({onlySelf:!0,emitEvent:o.emitEvent})}),this._parent&&!o.onlySelf&&this._parent._updatePristine(o,t),e&&o.emitEvent!==!1&&this._events.next(new Ye(!0,t))}markAsPending(o={}){this.status=Ae;let e=o.sourceControl??this;o.emitEvent!==!1&&(this._events.next(new Ie(this.status,e)),this.statusChanges.emit(this.status)),this._parent&&!o.onlySelf&&this._parent.markAsPending(j(P({},o),{sourceControl:e}))}disable(o={}){let e=this._parentMarkedDirty(o.onlySelf);this.status=Ge,this.errors=null,this._forEachChild(n=>{n.disable(j(P({},o),{onlySelf:!0}))}),this._updateValue();let t=o.sourceControl??this;o.emitEvent!==!1&&(this._events.next(new ut(this.value,t)),this._events.next(new Ie(this.status,t)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(j(P({},o),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(n=>n(!0))}enable(o={}){let e=this._parentMarkedDirty(o.onlySelf);this.status=We,this._forEachChild(t=>{t.enable(j(P({},o),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:o.emitEvent}),this._updateAncestors(j(P({},o),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(t=>t(!1))}_updateAncestors(o,e){this._parent&&!o.onlySelf&&(this._parent.updateValueAndValidity(o),o.skipPristineCheck||this._parent._updatePristine({},e),this._parent._updateTouched({},e))}setParent(o){this._parent=o}getRawValue(){return this.value}updateValueAndValidity(o={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let t=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===We||this.status===Ae)&&this._runAsyncValidator(t,o.emitEvent)}let e=o.sourceControl??this;o.emitEvent!==!1&&(this._events.next(new ut(this.value,e)),this._events.next(new Ie(this.status,e)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!o.onlySelf&&this._parent.updateValueAndValidity(j(P({},o),{sourceControl:e}))}_updateTreeValidity(o={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(o)),this.updateValueAndValidity({onlySelf:!0,emitEvent:o.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?Ge:We}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(o,e){if(this.asyncValidator){this.status=Ae,this._hasOwnPendingAsyncValidator={emitEvent:e!==!1,shouldHaveEmitted:o!==!1};let t=xi(this.asyncValidator(this));this._asyncValidationSubscription=t.subscribe(n=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(n,{emitEvent:e,shouldHaveEmitted:o})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let o=(this._hasOwnPendingAsyncValidator?.emitEvent||this._hasOwnPendingAsyncValidator?.shouldHaveEmitted)??!1;return this._hasOwnPendingAsyncValidator=null,o}return!1}setErrors(o,e={}){this.errors=o,this._updateControlsErrors(e.emitEvent!==!1,this,e.shouldHaveEmitted)}get(o){let e=o;return e==null||(Array.isArray(e)||(e=e.split(".")),e.length===0)?null:e.reduce((t,n)=>t&&t._find(n),this)}getError(o,e){let t=e?this.get(e):this;return t&&t.errors?t.errors[o]:null}hasError(o,e){return!!this.getError(o,e)}get root(){let o=this;for(;o._parent;)o=o._parent;return o}_updateControlsErrors(o,e,t){this.status=this._calculateStatus(),o&&this.statusChanges.emit(this.status),(o||t)&&this._events.next(new Ie(this.status,e)),this._parent&&this._parent._updateControlsErrors(o,e,t)}_initObservables(){this.valueChanges=new pe,this.statusChanges=new pe}_calculateStatus(){return this._allControlsDisabled()?Ge:this.errors?at:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(Ae)?Ae:this._anyControlsHaveStatus(at)?at:We}_anyControlsHaveStatus(o){return this._anyControls(e=>e.status===o)}_anyControlsDirty(){return this._anyControls(o=>o.dirty)}_anyControlsTouched(){return this._anyControls(o=>o.touched)}_updatePristine(o,e){let t=!this._anyControlsDirty(),n=this.pristine!==t;this.pristine=t,this._parent&&!o.onlySelf&&this._parent._updatePristine(o,e),n&&this._events.next(new Ye(this.pristine,e))}_updateTouched(o={},e){this.touched=this._anyControlsTouched(),this._events.next(new Xe(this.touched,e)),this._parent&&!o.onlySelf&&this._parent._updateTouched(o,e)}_onDisabledChange=[];_registerOnCollectionChange(o){this._onCollectionChange=o}_setUpdateStrategy(o){mt(o)&&o.updateOn!=null&&(this._updateOn=o.updateOn)}_parentMarkedDirty(o){let e=this._parent&&this._parent.dirty;return!o&&!!e&&!this._parent._anyControlsDirty()}_find(o){return null}_assignValidators(o){this._rawValidators=Array.isArray(o)?o.slice():o,this._composedValidatorFn=un(this._rawValidators)}_assignAsyncValidators(o){this._rawAsyncValidators=Array.isArray(o)?o.slice():o,this._composedAsyncValidatorFn=hn(this._rawAsyncValidators)}},Pe=class extends Fe{constructor(o,e,t){super(zt(e),$t(t,e)),this.controls=o,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;registerControl(o,e){return this.controls[o]?this.controls[o]:(this.controls[o]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(o,e,t={}){this.registerControl(o,e),this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}removeControl(o,e={}){this.controls[o]&&this.controls[o]._registerOnCollectionChange(()=>{}),delete this.controls[o],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}setControl(o,e,t={}){this.controls[o]&&this.controls[o]._registerOnCollectionChange(()=>{}),delete this.controls[o],e&&this.registerControl(o,e),this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}contains(o){return this.controls.hasOwnProperty(o)&&this.controls[o].enabled}setValue(o,e={}){ki(this,!0,o),Object.keys(o).forEach(t=>{Pi(this,!0,t),this.controls[t].setValue(o[t],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(o,e={}){o!=null&&(Object.keys(o).forEach(t=>{let n=this.controls[t];n&&n.patchValue(o[t],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(o={},e={}){this._forEachChild((t,n)=>{t.reset(o?o[n]:null,j(P({},e),{onlySelf:!0}))}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e),e?.emitEvent!==!1&&this._events.next(new Ze(this))}getRawValue(){return this._reduceChildren({},(o,e,t)=>(o[t]=e.getRawValue(),o))}_syncPendingControls(){let o=this._reduceChildren(!1,(e,t)=>t._syncPendingControls()?!0:e);return o&&this.updateValueAndValidity({onlySelf:!0}),o}_forEachChild(o){Object.keys(this.controls).forEach(e=>{let t=this.controls[e];t&&o(t,e)})}_setUpControls(){this._forEachChild(o=>{o.setParent(this),o._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(o){for(let[e,t]of Object.entries(this.controls))if(this.contains(e)&&o(t))return!0;return!1}_reduceValue(){let o={};return this._reduceChildren(o,(e,t,n)=>((t.enabled||this.disabled)&&(e[n]=t.value),e))}_reduceChildren(o,e){let t=o;return this._forEachChild((n,s)=>{t=e(t,n,s)}),t}_allControlsDisabled(){for(let o of Object.keys(this.controls))if(this.controls[o].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(o){return this.controls.hasOwnProperty(o)?this.controls[o]:null}};var Rt=class extends Pe{};var Ee=new le("",{factory:()=>et}),et="always";function vt(i,o){return[...o.path,i]}function Ke(i,o,e=et){Wt(i,o),o.valueAccessor.writeValue(i.value),(i.disabled||e==="always")&&o.valueAccessor.setDisabledState?.(i.disabled),fn(i,o),mn(i,o),gn(i,o),pn(i,o)}function pt(i,o,e=!0){let t=()=>{};o.valueAccessor&&(o.valueAccessor.registerOnChange(t),o.valueAccessor.registerOnTouched(t)),gt(i,o),i&&(o._invokeOnDestroyCallbacks(),i._registerOnCollectionChange(()=>{}))}function ft(i,o){i.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(o)})}function pn(i,o){if(o.valueAccessor.setDisabledState){let e=t=>{o.valueAccessor.setDisabledState(t)};i.registerOnDisabledChange(e),o._registerOnDestroy(()=>{i._unregisterOnDisabledChange(e)})}}function Wt(i,o){let e=Ii(i);o.validator!==null?i.setValidators(mi(e,o.validator)):typeof e=="function"&&i.setValidators([e]);let t=Fi(i);o.asyncValidator!==null?i.setAsyncValidators(mi(t,o.asyncValidator)):typeof t=="function"&&i.setAsyncValidators([t]);let n=()=>i.updateValueAndValidity();ft(o._rawValidators,n),ft(o._rawAsyncValidators,n)}function gt(i,o){let e=!1;if(i!==null){if(o.validator!==null){let n=Ii(i);if(Array.isArray(n)&&n.length>0){let s=n.filter(r=>r!==o.validator);s.length!==n.length&&(e=!0,i.setValidators(s))}}if(o.asyncValidator!==null){let n=Fi(i);if(Array.isArray(n)&&n.length>0){let s=n.filter(r=>r!==o.asyncValidator);s.length!==n.length&&(e=!0,i.setAsyncValidators(s))}}}let t=()=>{};return ft(o._rawValidators,t),ft(o._rawAsyncValidators,t),e}function fn(i,o){o.valueAccessor.registerOnChange(e=>{i._pendingValue=e,i._pendingChange=!0,i._pendingDirty=!0,i.updateOn==="change"&&Ri(i,o)})}function gn(i,o){o.valueAccessor.registerOnTouched(()=>{i._pendingTouched=!0,i.updateOn==="blur"&&i._pendingChange&&Ri(i,o),i.updateOn!=="submit"&&i.markAsTouched()})}function Ri(i,o){i._pendingDirty&&i.markAsDirty(),i.setValue(i._pendingValue,{emitModelToViewChange:!1}),o.viewToModelUpdate(i._pendingValue),i._pendingChange=!1}function mn(i,o){let e=(t,n)=>{o.valueAccessor.writeValue(t),n&&o.viewToModelUpdate(t)};i.registerOnChange(e),o._registerOnDestroy(()=>{i._unregisterOnChange(e)})}function Li(i,o){i==null,Wt(i,o)}function vn(i,o){return gt(i,o)}function Gt(i,o){if(!i.hasOwnProperty("model"))return!1;let e=i.model;return e.isFirstChange()?!0:!Object.is(o,e.currentValue)}function _n(i){return Object.getPrototypeOf(i.constructor)===Je}function Bi(i,o){i._syncPendingControls(),o.forEach(e=>{let t=e.control;t.updateOn==="submit"&&t._pendingChange&&(e.viewToModelUpdate(t._pendingValue),t._pendingChange=!1)})}function qt(i,o){if(!o)return null;Array.isArray(o);let e,t,n;return o.forEach(s=>{s.constructor===Mi?e=s:_n(s)?t=s:n=s}),n||t||e||null}function Cn(i,o){let e=i.indexOf(o);e>-1&&i.splice(e,1)}var yn={provide:W,useExisting:X(()=>Dn)},qe=Promise.resolve(),Dn=(()=>{class i extends W{callSetDisabledState;get submitted(){return ce(this.submittedReactive)}_submitted=S(()=>this.submittedReactive());submittedReactive=v(!1);_directives=new Set;form;ngSubmit=new pe;options;constructor(e,t,n){super(),this.callSetDisabledState=n,this.form=new Pe({},jt(e),Ut(t))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){qe.then(()=>{let t=this._findContainer(e.path);e.control=t.registerControl(e.name,e.control),Ke(e.control,e,this.callSetDisabledState),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(e)})}getControl(e){return this.form.get(e.path)}removeControl(e){qe.then(()=>{let t=this._findContainer(e.path);t&&t.removeControl(e.name),this._directives.delete(e)})}addFormGroup(e){qe.then(()=>{let t=this._findContainer(e.path),n=new Pe({});Li(n,e),t.registerControl(e.name,n),n.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){qe.then(()=>{let t=this._findContainer(e.path);t&&t.removeControl(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,t){qe.then(()=>{this.form.get(e.path).setValue(t)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submittedReactive.set(!0),Bi(this.form,this._directives),this.ngSubmit.emit(e),this.form._events.next(new ht(this.control)),e?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(e=void 0){this.form.reset(e),this.submittedReactive.set(!1)}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.form._updateOn=this.options.updateOn)}_findContainer(e){return e.pop(),e.length?this.form.get(e):this.form}static \u0275fac=function(t){return new(t||i)(D(be,10),D(Me,10),D(Ee,8))};static \u0275dir=R({type:i,selectors:[["form",3,"ngNoForm","",3,"formGroup","",3,"formArray",""],["ng-form"],["","ngForm",""]],hostBindings:function(t,n){t&1&&E("submit",function(r){return n.onSubmit(r)})("reset",function(){return n.onReset()})},inputs:{options:[0,"ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[$([yn]),U]})}return i})();function Ci(i,o){let e=i.indexOf(o);e>-1&&i.splice(e,1)}function yi(i){return typeof i=="object"&&i!==null&&Object.keys(i).length===2&&"value"in i&&"disabled"in i}var Qe=class extends Fe{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(o=null,e,t){super(zt(e),$t(t,e)),this._applyFormState(o),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),mt(e)&&(e.nonNullable||e.initialValueIsDefault)&&(yi(o)?this.defaultValue=o.value:this.defaultValue=o)}setValue(o,e={}){this.value=this._pendingValue=o,this._onChange.length&&e.emitModelToViewChange!==!1&&this._onChange.forEach(t=>t(this.value,e.emitViewToModelChange!==!1)),this.updateValueAndValidity(e)}patchValue(o,e={}){this.setValue(o,e)}reset(o=this.defaultValue,e={}){this._applyFormState(o),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),e.overwriteDefaultValue&&(this.defaultValue=this.value),this._pendingChange=!1,e?.emitEvent!==!1&&this._events.next(new Ze(this))}_updateValue(){}_anyControls(o){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(o){this._onChange.push(o)}_unregisterOnChange(o){Ci(this._onChange,o)}registerOnDisabledChange(o){this._onDisabledChange.push(o)}_unregisterOnDisabledChange(o){Ci(this._onDisabledChange,o)}_forEachChild(o){}_syncPendingControls(){return this.updateOn==="submit"&&(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),this._pendingChange)?(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0):!1}_applyFormState(o){yi(o)?(this.value=this._pendingValue=o.value,o.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=o}};var Sn=i=>i instanceof Qe,bn=(()=>{class i extends W{_parent;ngOnInit(){this._checkParentType(),this.formDirective.addFormGroup(this)}ngOnDestroy(){this.formDirective&&this.formDirective.removeFormGroup(this)}get control(){return this.formDirective.getFormGroup(this)}get path(){return vt(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}static \u0275fac=(()=>{let e;return function(n){return(e||(e=Ce(i)))(n||i)}})();static \u0275dir=R({type:i,standalone:!1,features:[U]})}return i})();var Mn={provide:re,useExisting:X(()=>_t)},Di=Promise.resolve(),_t=(()=>{class i extends re{_changeDetectorRef;callSetDisabledState;control=new Qe;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new pe;constructor(e,t,n,s,r,a){super(),this._changeDetectorRef=r,this.callSetDisabledState=a,this._parent=e,this._setValidators(t),this._setAsyncValidators(n),this.valueAccessor=qt(this,s)}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){let t=e.name.previousValue;this.formDirective.removeControl({name:t,path:this._getPath(t)})}this._setUpControl()}"isDisabled"in e&&this._updateDisabled(e),Gt(e,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!!(this.options&&this.options.standalone)}_setUpStandalone(){Ke(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._checkName()}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(e){Di.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){let t=e.isDisabled.currentValue,n=t!==0&&hi(t);Di.then(()=>{n&&!this.control.disabled?this.control.disable():!n&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?vt(e,this._parent):[e]}static \u0275fac=function(t){return new(t||i)(D(W,9),D(be,10),D(Me,10),D(ve,10),D(At,8),D(Ee,8))};static \u0275dir=R({type:i,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"],options:[0,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],standalone:!1,features:[$([Mn]),U,Be]})}return i})();var Mr=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275dir=R({type:i,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""],standalone:!1})}return i})(),En={provide:ve,useExisting:X(()=>wn),multi:!0},wn=(()=>{class i extends Je{writeValue(e){let t=e??"";this.setProperty("value",t)}registerOnChange(e){this.onChange=t=>{e(t==""?null:parseFloat(t))}}static \u0275fac=(()=>{let e;return function(n){return(e||(e=Ce(i)))(n||i)}})();static \u0275dir=R({type:i,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(t,n){t&1&&E("input",function(r){return n.onChange(r.target.value)})("blur",function(){return n.onTouched()})},standalone:!1,features:[$([En]),U]})}return i})(),xn={provide:ve,useExisting:X(()=>Vn),multi:!0};var On=(()=>{class i{_accessors=[];add(e,t){this._accessors.push([e,t])}remove(e){for(let t=this._accessors.length-1;t>=0;--t)if(this._accessors[t][1]===e){this._accessors.splice(t,1);return}}select(e){this._accessors.forEach(t=>{this._isSameGroup(t,e)&&t[1]!==e&&t[1].fireUncheck(e.value)})}_isSameGroup(e,t){return e[0].control?e[0]._parent===t._control._parent&&e[1].name===t.name:!1}static \u0275fac=function(t){return new(t||i)};static \u0275prov=we({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),Vn=(()=>{class i extends Je{_registry;_injector;_state;_control;_fn;setDisabledStateFired=!1;onChange=()=>{};name;formControlName;value;callSetDisabledState=y(Ee,{optional:!0})??et;constructor(e,t,n,s){super(e,t),this._registry=n,this._injector=s}ngOnInit(){this._control=this._injector.get(re),this._checkName(),this._registry.add(this._control,this)}ngOnDestroy(){this._registry.remove(this)}writeValue(e){this._state=e===this.value,this.setProperty("checked",this._state)}registerOnChange(e){this._fn=e,this.onChange=()=>{e(this.value),this._registry.select(this)}}setDisabledState(e){(this.setDisabledStateFired||e||this.callSetDisabledState==="whenDisabledForLegacyCode")&&this.setProperty("disabled",e),this.setDisabledStateFired=!0}fireUncheck(e){this.writeValue(e)}_checkName(){this.name&&this.formControlName&&(this.name,this.formControlName),!this.name&&this.formControlName&&(this.name=this.formControlName)}static \u0275fac=function(t){return new(t||i)(D(de),D(I),D(On),D(xe))};static \u0275dir=R({type:i,selectors:[["input","type","radio","formControlName",""],["input","type","radio","formControl",""],["input","type","radio","ngModel",""]],hostBindings:function(t,n){t&1&&E("change",function(){return n.onChange()})("blur",function(){return n.onTouched()})},inputs:{name:"name",formControlName:"formControlName",value:"value"},standalone:!1,features:[$([xn]),U]})}return i})(),Tn={provide:ve,useExisting:X(()=>Nn),multi:!0},Nn=(()=>{class i extends Je{writeValue(e){this.setProperty("value",parseFloat(e))}registerOnChange(e){this.onChange=t=>{e(t==""?null:parseFloat(t))}}static \u0275fac=(()=>{let e;return function(n){return(e||(e=Ce(i)))(n||i)}})();static \u0275dir=R({type:i,selectors:[["input","type","range","formControlName",""],["input","type","range","formControl",""],["input","type","range","ngModel",""]],hostBindings:function(t,n){t&1&&E("change",function(r){return n.onChange(r.target.value)})("input",function(r){return n.onChange(r.target.value)})("blur",function(){return n.onTouched()})},standalone:!1,features:[$([Tn]),U]})}return i})(),Lt=class extends Fe{constructor(o,e,t){super(zt(e),$t(t,e)),this.controls=o,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;at(o){return this.controls[this._adjustIndex(o)]}push(o,e={}){Array.isArray(o)?o.forEach(t=>{this.controls.push(t),this._registerControl(t)}):(this.controls.push(o),this._registerControl(o)),this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}insert(o,e,t={}){this.controls.splice(o,0,e),this._registerControl(e),this.updateValueAndValidity({emitEvent:t.emitEvent})}removeAt(o,e={}){let t=this._adjustIndex(o);t<0&&(t=0),this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),this.controls.splice(t,1),this.updateValueAndValidity({emitEvent:e.emitEvent})}setControl(o,e,t={}){let n=this._adjustIndex(o);n<0&&(n=0),this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),this.controls.splice(n,1),e&&(this.controls.splice(n,0,e),this._registerControl(e)),this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(o,e={}){ki(this,!1,o),o.forEach((t,n)=>{Pi(this,!1,n),this.at(n).setValue(t,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(o,e={}){o!=null&&(o.forEach((t,n)=>{this.at(n)&&this.at(n).patchValue(t,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(o=[],e={}){this._forEachChild((t,n)=>{t.reset(o[n],j(P({},e),{onlySelf:!0}))}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e),e?.emitEvent!==!1&&this._events.next(new Ze(this))}getRawValue(){return this.controls.map(o=>o.getRawValue())}clear(o={}){this.controls.length<1||(this._forEachChild(e=>e._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:o.emitEvent}))}_adjustIndex(o){return o<0?o+this.length:o}_syncPendingControls(){let o=this.controls.reduce((e,t)=>t._syncPendingControls()?!0:e,!1);return o&&this.updateValueAndValidity({onlySelf:!0}),o}_forEachChild(o){this.controls.forEach((e,t)=>{o(e,t)})}_updateValue(){this.value=this.controls.filter(o=>o.enabled||this.disabled).map(o=>o.value)}_anyControls(o){return this.controls.some(e=>e.enabled&&o(e))}_setUpControls(){this._forEachChild(o=>this._registerControl(o))}_allControlsDisabled(){for(let o of this.controls)if(o.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(o){o.setParent(this),o._registerOnCollectionChange(this._onCollectionChange)}_find(o){return this.at(o)??null}};var Hi=(()=>{class i extends W{callSetDisabledState;get submitted(){return ce(this._submittedReactive)}set submitted(e){this._submittedReactive.set(e)}_submitted=S(()=>this._submittedReactive());_submittedReactive=v(!1);_oldForm;_onCollectionChange=()=>this._updateDomValue();directives=[];constructor(e,t,n){super(),this.callSetDisabledState=n,this._setValidators(e),this._setAsyncValidators(t)}ngOnChanges(e){this.onChanges(e)}ngOnDestroy(){this.onDestroy()}onChanges(e){this._checkFormPresent(),e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}onDestroy(){this.form&&(gt(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get path(){return[]}addControl(e){let t=this.form.get(e.path);return Ke(t,e,this.callSetDisabledState),t.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),t}getControl(e){return this.form.get(e.path)}removeControl(e){pt(e.control||null,e,!1),Cn(this.directives,e)}addFormGroup(e){this._setUpFormContainer(e)}removeFormGroup(e){this._cleanUpFormContainer(e)}getFormGroup(e){return this.form.get(e.path)}getFormArray(e){return this.form.get(e.path)}addFormArray(e){this._setUpFormContainer(e)}removeFormArray(e){this._cleanUpFormContainer(e)}updateModel(e,t){this.form.get(e.path).setValue(t)}onReset(){this.resetForm()}resetForm(e=void 0,t={}){this.form.reset(e,t),this._submittedReactive.set(!1)}onSubmit(e){return this.submitted=!0,Bi(this.form,this.directives),this.ngSubmit.emit(e),this.form._events.next(new ht(this.control)),e?.target?.method==="dialog"}_updateDomValue(){this.directives.forEach(e=>{let t=e.control,n=this.form.get(e.path);t!==n&&(pt(t||null,e),Sn(n)&&(Ke(n,e,this.callSetDisabledState),e.control=n))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){let t=this.form.get(e.path);Li(t,e),t.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){let t=this.form.get(e.path);t&&vn(t,e)&&t.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){Wt(this.form,this),this._oldForm&&gt(this._oldForm,this)}_checkFormPresent(){this.form}static \u0275fac=function(t){return new(t||i)(D(be,10),D(Me,10),D(Ee,8))};static \u0275dir=R({type:i,features:[U,Be]})}return i})();var Yt=new le(""),An={provide:re,useExisting:X(()=>In)},In=(()=>{class i extends re{_ngModelWarningConfig;callSetDisabledState;viewModel;form;set isDisabled(e){}model;update=new pe;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(e,t,n,s,r){super(),this._ngModelWarningConfig=s,this.callSetDisabledState=r,this._setValidators(e),this._setAsyncValidators(t),this.valueAccessor=qt(this,n)}ngOnChanges(e){if(this._isControlChanged(e)){let t=e.form.previousValue;t&&pt(t,this,!1),Ke(this.form,this,this.callSetDisabledState),this.form.updateValueAndValidity({emitEvent:!1})}Gt(e,this.viewModel)&&(this.form.setValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.form&&pt(this.form,this,!1)}get path(){return[]}get control(){return this.form}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_isControlChanged(e){return e.hasOwnProperty("form")}static \u0275fac=function(t){return new(t||i)(D(be,10),D(Me,10),D(ve,10),D(Yt,8),D(Ee,8))};static \u0275dir=R({type:i,selectors:[["","formControl",""]],inputs:{form:[0,"formControl","form"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},exportAs:["ngForm"],standalone:!1,features:[$([An]),U,Be]})}return i})(),Fn={provide:W,useExisting:X(()=>ji)},ji=(()=>{class i extends bn{name=null;constructor(e,t,n){super(),this._parent=e,this._setValidators(t),this._setAsyncValidators(n)}_checkParentType(){zi(this._parent)}static \u0275fac=function(t){return new(t||i)(D(W,13),D(be,10),D(Me,10))};static \u0275dir=R({type:i,selectors:[["","formGroupName",""]],inputs:{name:[0,"formGroupName","name"]},standalone:!1,features:[$([Fn]),U]})}return i})(),Pn={provide:W,useExisting:X(()=>Ui)},Ui=(()=>{class i extends W{_parent;name=null;constructor(e,t,n){super(),this._parent=e,this._setValidators(t),this._setAsyncValidators(n)}ngOnInit(){zi(this._parent),this.formDirective.addFormArray(this)}ngOnDestroy(){this.formDirective?.removeFormArray(this)}get control(){return this.formDirective.getFormArray(this)}get formDirective(){return this._parent?this._parent.formDirective:null}get path(){return vt(this.name==null?this.name:this.name.toString(),this._parent)}static \u0275fac=function(t){return new(t||i)(D(W,13),D(be,10),D(Me,10))};static \u0275dir=R({type:i,selectors:[["","formArrayName",""]],inputs:{name:[0,"formArrayName","name"]},standalone:!1,features:[$([Pn]),U]})}return i})();function zi(i){return!(i instanceof ji)&&!(i instanceof Hi)&&!(i instanceof Ui)}var kn={provide:re,useExisting:X(()=>Rn)},Rn=(()=>{class i extends re{_ngModelWarningConfig;_added=!1;viewModel;control;name=null;set isDisabled(e){}model;update=new pe;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(e,t,n,s,r){super(),this._ngModelWarningConfig=r,this._parent=e,this._setValidators(t),this._setAsyncValidators(n),this.valueAccessor=qt(this,s)}ngOnChanges(e){this._added||this._setUpControl(),Gt(e,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}get path(){return vt(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_setUpControl(){this.control=this.formDirective.addControl(this),this._added=!0}static \u0275fac=function(t){return new(t||i)(D(W,13),D(be,10),D(Me,10),D(ve,10),D(Yt,8))};static \u0275dir=R({type:i,selectors:[["","formControlName",""]],inputs:{name:[0,"formControlName","name"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},standalone:!1,features:[$([kn]),U,Be]})}return i})();var Ln={provide:W,useExisting:X(()=>Bn)},Bn=(()=>{class i extends Hi{form=null;ngSubmit=new pe;get control(){return this.form}static \u0275fac=(()=>{let e;return function(n){return(e||(e=Ce(i)))(n||i)}})();static \u0275dir=R({type:i,selectors:[["","formGroup",""]],hostBindings:function(t,n){t&1&&E("submit",function(r){return n.onSubmit(r)})("reset",function(){return n.onReset()})},inputs:{form:[0,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[$([Ln]),U]})}return i})();var $i=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=He({type:i});static \u0275inj=Le({})}return i})();function Si(i){return!!i&&(i.asyncValidators!==void 0||i.validators!==void 0||i.updateOn!==void 0)}var Er=(()=>{class i{useNonNullable=!1;get nonNullable(){let e=new i;return e.useNonNullable=!0,e}group(e,t=null){let n=this._reduceControls(e),s={};return Si(t)?s=t:t!==null&&(s.validators=t.validator,s.asyncValidators=t.asyncValidator),new Pe(n,s)}record(e,t=null){let n=this._reduceControls(e);return new Rt(n,t)}control(e,t,n){let s={};return this.useNonNullable?(Si(t)?s=t:(s.validators=t,s.asyncValidators=n),new Qe(e,j(P({},s),{nonNullable:!0}))):new Qe(e,t,n)}array(e,t,n){let s=e.map(r=>this._createControl(r));return new Lt(s,t,n)}_reduceControls(e){let t={};return Object.keys(e).forEach(n=>{t[n]=this._createControl(e[n])}),t}_createControl(e){if(e instanceof Qe)return e;if(e instanceof Fe)return e;if(Array.isArray(e)){let t=e[0],n=e.length>1?e[1]:null,s=e.length>2?e[2]:null;return this.control(t,n,s)}else return this.control(e)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=we({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var wr=(()=>{class i{static withConfig(e){return{ngModule:i,providers:[{provide:Ee,useValue:e.callSetDisabledState??et}]}}static \u0275fac=function(t){return new(t||i)};static \u0275mod=He({type:i});static \u0275inj=Le({imports:[$i]})}return i})(),xr=(()=>{class i{static withConfig(e){return{ngModule:i,providers:[{provide:Yt,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:Ee,useValue:e.callSetDisabledState??et}]}}static \u0275fac=function(t){return new(t||i)};static \u0275mod=He({type:i});static \u0275inj=Le({imports:[$i]})}return i})();var Y=["*"],Hn=[[["","icon",""]],[["sh-icon"]],[["","title",""]],"*",[["","content",""]],[["p"]]],jn=["[icon]","sh-icon","[title]","*","[content]","p"];function Un(i,o){i&1&&(h(0,"sh-icon",3),C(1,"info"),g())}function zn(i,o){i&1&&(h(0,"sh-icon",3),C(1,"info"),g())}function $n(i,o){i&1&&(h(0,"sh-icon",3),C(1,"warning"),g())}function Wn(i,o){i&1&&(h(0,"sh-icon",3),C(1,"warning-octagon"),g())}function Gn(i,o){i&1&&(h(0,"sh-icon",3),C(1,"check-circle"),g())}function qn(i,o){i&1&&(h(0,"sh-icon",3),C(1,"question"),g())}function Yn(i,o){if(i&1){let e=z();h(0,"sh-icon",7),E("click",function(){w(e);let n=f();return x(n.removeAlert())}),C(1,"plus"),g()}}var Xn=["dialogRef"];function Qn(i,o){if(i&1){let e=z();A(0,"div",5),Se("click",function(){w(e);let n=f(2);return x(n.isOpen.set(!1))}),F()}}function Zn(i,o){if(i&1&&(A(0,"dialog",2,0)(2,"div",3),u(3),F(),b(4,Qn,1,0,"div",4),F()),i&2){let e=f(),t=L(0);Z(t.class),G("width",t.width??"")("max-width",t.maxWidth??"")("max-height",t.maxHeight??"")("height",t.height??""),p(4),M(e.defaultOptionMerge().closeOnOutsideClick?4:-1)}}var Kn=["shButton",""];var Jn=["daysRef"];function eo(i,o){if(i&1&&C(0),i&2){let e=f();K(" - ",e.getMonthName(e.getLastVisibleMonth())," ")}}function to(i,o){if(i&1&&(h(0,"div"),C(1),g()),i&2){let e=o.$implicit;p(),Ne(e)}}function io(i,o){if(i&1){let e=z();h(0,"div",2,1),E("click",function(){let n=w(e).$implicit,s=xt(1),r=f(2);return x(r.setDate(n,s))}),C(2),g()}if(i&2){let e=o.$implicit,t=f().$implicit,n=f();Z(n.isDateSelected(e)),N("out-of-scope",!n.isCurrentMonth(e,t)),p(2),K(" ",e.getDate()," ")}}function no(i,o){if(i&1&&(h(0,"article",7),oe(1,"div",9),g()),i&2){let e=f(2);p(),Ot(e.selectedDateStylePosition())}}function oo(i,o){if(i&1&&(h(0,"div",5)(1,"nav",6),Ve(2,to,2,1,"div",null,je),g(),h(4,"div",7,0),Ve(6,io,3,5,"div",8,je),b(8,no,2,2,"article",7),g()()),i&2){let e=o.$implicit,t=f();p(2),Te(t.weekdays()),p(4),Te(t.getMonthDates(e)),p(2),M(t.asRange()?-1:8)}}var so=["triggerRef"],ro=["popoverRef"],ao=["popoverContentRef"],lo=[[["","trigger",""]],[["button"]],[["","shButton",""]],"*"],co=["[trigger]","button","[shButton]","*"];function uo(i,o){if(i&1){let e=z();A(0,"div",6,1)(2,"div",7),Se("click",function(n){w(e);let s=f();return x(s.eventClose(n))}),F(),A(3,"div",8,2),u(5,3),F()()}if(i&2){let e=f();ge("id",e.id()+"hello"),p(3),Ot(e.menuStyle()),G("position-anchor",e.id())}}var ho=[[["label"]],[["","prefix",""]],[["","textPrefix",""]],[["input"]],[["","popoverContent",""]],[["textarea"]],[["","textSuffix",""]],[["","suffix",""]],[["","error",""]],[["","hint",""]]],po=["label","[prefix]","[textPrefix]","input","[popoverContent]","textarea","[textSuffix]","[suffix]","[error]","[hint]"],Wi=()=>({closeOnButton:!1,closeOnEsc:!0}),fo=[[["label"]],[["","prefix",""]],[["","textPrefix",""]],[["input"]],[["","textSuffix",""]],[["","suffix",""]]],go=["label","[prefix]","[textPrefix]","input","[textSuffix]","[suffix]"];function mo(i,o){if(i&1&&(h(0,"div",3),C(1),g()),i&2){let e=f();p(),K(" ",e._maskedDate()," ")}}function vo(i,o){if(i&1){let e=z();h(0,"sh-datepicker",7),E("dateChange",function(n){w(e);let s=f();return x(s.onDateChange(n))}),g()}if(i&2){let e=f();Z(e.currentClass()),Q("date",e.internalDate())}}function _o(i,o){}var Co=[[["label"]],[["","boxPrefix",""]],[["","prefix",""]],[["","textPrefix",""]],[["input"]],[["textarea"]],[["","textSuffix",""]],[["","suffix",""]],[["","boxSuffix",""]],[["","error",""]],[["","hint",""]]],yo=["label","[boxPrefix]","[prefix]","[textPrefix]","input","textarea","[textSuffix]","[suffix]","[boxSuffix]","[error]","[hint]"],Do=["input"],So=[[["label"]]],bo=["label"];function Mo(i,o){if(i&1&&(h(0,"div",3),C(1),g()),i&2){let e=f();p(),Ne(e.files()[0].name)}}function Eo(i,o){if(i&1&&(h(0,"div",3),C(1),g()),i&2){let e=f();p(),K("",e.files().length," files selected")}}function wo(i,o){if(i&1&&(h(0,"div",4),C(1),g()),i&2){let e=f();p(),Ne(e.filesOver()?e.overlayText():e.placeholder())}}var xo=["inputRef"],Oo=["optionsRef"],Vo=["*",[["","menu",""]]],To=["*","[menu]"];function No(i,o){i&1&&(h(0,"sh-icon",5),C(1,"caret-down"),g())}var Ao=[[["label"]],[["input","type","range"]]],Io=["label","input[type=range]"],Fo=["optionsWrap"],Po=[[["label"]],[["","prefix",""]],[["","boxPrefix",""]],[["input"]],[["textarea"]]],ko=["label","[prefix]","[boxPrefix]","input","textarea"],Ro=()=>({closeOnButton:!1,closeOnEsc:!1}),Gi=(i,o)=>({$implicit:i,last:o}),Xt=i=>({$implicit:i});function Lo(i,o){if(i&1&&C(0),i&2){let e=f();K(" ",e.inputValue()," ")}}function Bo(i,o){i&1&&De(0)}function Ho(i,o){if(i&1&&fe(0,Bo,1,0,"ng-container",13),i&2){let e=f(3),t=e.$implicit,n=e.$index,s=e.$count;f(2);let r=L(3);Q("ngTemplateOutlet",r)("ngTemplateOutletContext",Vt(2,Gi,t,n===s-1))}}function jo(i,o){if(i&1&&C(0),i&2){let e=f(3).$implicit,t=f(2);K(" ",t.getLabel(e)," ")}}function Uo(i,o){if(i&1){let e=z();h(0,"sh-chip",12),E("click",function(n){w(e);let s=f(2).$index,r=f(2);return x(r.removeSelectedOptionByIndex(n,s))}),b(1,Ho,1,5,"ng-container")(2,jo,1,1),h(3,"sh-icon"),C(4,"x-bold"),g()()}if(i&2){let e=f(4),t=L(3);Z(e.selectClasses()),p(),M(t?1:2)}}function zo(i,o){i&1&&De(0)}function $o(i,o){if(i&1&&fe(0,zo,1,0,"ng-container",13),i&2){let e=f(4),t=e.$implicit,n=e.$index,s=e.$count;f(2);let r=L(3);Q("ngTemplateOutlet",r)("ngTemplateOutletContext",Vt(2,Gi,t,n===s-1))}}function Wo(i,o){if(i&1&&C(0),i&2){let e=f(4),t=e.$implicit,n=e.$index,s=e.$count,r=f(2);K(" ",n===s-1?r.getLabel(t):r.getLabel(t)+","," ")}}function Go(i,o){if(i&1&&b(0,$o,1,5,"ng-container")(1,Wo,1,1),i&2){f(5);let e=L(3);M(e?0:1)}}function qo(i,o){if(i&1&&b(0,Go,2,1),i&2){f(4);let e=L(6);M(e?-1:0)}}function Yo(i,o){if(i&1&&b(0,Uo,5,3,"sh-chip",11)(1,qo,1,1),i&2){f(3);let e=L(5);M(e?0:1)}}function Xo(i,o){if(i&1&&b(0,Yo,2,1),i&2){let e=o.$implicit;M(e?0:-1)}}function Qo(i,o){if(i&1&&Ve(0,Xo,1,1,null,null,je),i&2){f();let e=L(2);Te(e)}}function Zo(i,o){i&1&&De(0)}function Ko(i,o){if(i&1&&fe(0,Zo,1,0,"ng-container",14),i&2){f(2);let e=L(0);Q("ngTemplateOutlet",e)}}function Jo(i,o){if(i&1&&C(0),i&2){let e=f(2);K(" ",e.placeholderText()??""," ")}}function es(i,o){if(i&1&&b(0,Ko,1,1,"ng-container")(1,Jo,1,1),i&2){f();let e=L(0);M(e?0:1)}}function ts(i,o){i&1&&(h(0,"sh-icon",6),C(1,"caret-down"),g())}function is(i,o){i&1&&oe(0,"sh-spinner",7)}function ns(i,o){i&1&&(h(0,"sh-icon",6),C(1,"list-magnifying-glass"),g())}function os(i,o){i&1&&(h(0,"sh-icon",6),C(1,"magnifying-glass"),g())}function ss(i,o){if(i&1){let e=z();h(0,"sh-icon",15),E("click",function(n){w(e);let s=f();return x(s.clear(n))}),C(1,"x-bold"),g()}}function rs(i,o){i&1&&(h(0,"sh-icon",6),C(1,"caret-down"),g())}function as(i,o){i&1&&(h(0,"sh-icon",6),C(1,"caret-up"),g())}function ls(i,o){if(i&1&&(h(0,"p",9),C(1),g()),i&2){let e=f(3);p(),Ne(e.freeTextTitle())}}function cs(i,o){i&1&&De(0)}function ds(i,o){if(i&1&&fe(0,cs,1,0,"ng-container",13),i&2){f(2);let e=L(0);f();let t=L(1);Q("ngTemplateOutlet",t)("ngTemplateOutletContext",rt(2,Xt,e))}}function us(i,o){i&1&&De(0)}function hs(i,o){if(i&1&&fe(0,us,1,0,"ng-container",13),i&2){f(2);let e=L(0);f();let t=L(4);Q("ngTemplateOutlet",t)("ngTemplateOutletContext",rt(2,Xt,e))}}function ps(i,o){if(i&1&&C(0),i&2){f(2);let e=L(1);K(" ",e," ")}}function fs(i,o){i&1&&oe(0,"sh-divider")}function gs(i,o){if(i&1){let e=z();b(0,ls,2,1,"p",9),h(1,"li",16),E("click",function(){w(e);let n=f(2);return x(n.toggleOptionByIndex(-1))}),b(2,ds,1,4,"ng-container")(3,hs,1,4,"ng-container")(4,ps,1,1),g(),b(5,fs,1,0,"sh-divider")}if(i&2){f();let e=L(0),t=f(),n=L(1),s=L(4);M(t.freeTextTitle()?0:-1),p(),N("selected",t.isSelected(-1))("focused",t.focusedOptionIndex()===-1),Q("id",t.getLabelAsSlug(e)),ge("aria-selected",t.isSelected(-1)),p(),M(n?2:s?3:4),p(3),M(t.freeTextTitle()&&t.filteredOptions().length>0?5:-1)}}function ms(i,o){if(i&1&&(ot(0)(1),b(2,gs,6,9)),i&2){let e=f(),t=ne(e.computedFreeTextOption());p();let n=ne(e.getValue(t));p(),M(n.length>0?2:-1)}}function vs(i,o){if(i&1&&(h(0,"p",9),C(1),g()),i&2){let e=f();p(),Ne(e.optionTitle())}}function _s(i,o){if(i&1&&oe(0,"sh-checkbox"),i&2){let e=f().$index,t=f();Z(t.selectClasses()),N("active",t.isSelected(e))}}function Cs(i,o){i&1&&De(0)}function ys(i,o){if(i&1&&fe(0,Cs,1,0,"ng-container",13),i&2){let e=f().$implicit;f();let t=L(4);Q("ngTemplateOutlet",t)("ngTemplateOutletContext",rt(2,Xt,e))}}function Ds(i,o){if(i&1&&C(0),i&2){let e=f().$implicit,t=f();K(" ",t.getLabel(e)," ")}}function Ss(i,o){if(i&1){let e=z();h(0,"li",16),E("click",function(){let n=w(e).$index,s=f();return x(s.toggleOptionByIndex(n))}),b(1,_s,1,4,"sh-checkbox",17),b(2,ys,1,4,"ng-container")(3,Ds,1,1),g()}if(i&2){let e=o.$implicit,t=o.$index,n=f(),s=L(4);N("selected",n.isSelected(t))("focused",t===n.focusedOptionIndex()),Q("id",n.getLabelAsSlug(e)),ge("aria-selected",n.isSelected(t)),p(),M(n.selectMultiple()?1:-1),p(),M(s?2:3)}}var bs=["dragImageElement"],Ms=[[["","sidenav",""]],[["","sidenav-closed-topbar",""]],"*"],Es=["[sidenav]","[sidenav-closed-topbar]","*"];function ws(i,o){i&1&&ye(0,"div",1,0)}function xs(i,o){if(i&1){let e=z();A(0,"div",7),Se("drop",function(n){w(e);let s=f();return x(s.drop(n))})("dragenter",function(){w(e);let n=f();return x(n.dragEnter())})("dragleave",function(){w(e);let n=f();return x(n.dragLeave())}),F()}}function Os(i,o){if(i&1){let e=z();A(0,"div",8),Se("dragstart",function(n){w(e);let s=f();return x(s.dragStart(n))})("dragend",function(n){w(e);let s=f();return x(s.dragEnd(n))})("drag",function(n){w(e);let s=f();return x(s.drag(n))})("touchstart",function(n){w(e);let s=f();return x(s.touchStart(n))})("touchmove",function(n){w(e);let s=f();return x(s.touchMove(n))})("touchend",function(n){w(e);let s=f();return x(s.touchEnd(n))})("touchcancel",function(n){w(e);let s=f();return x(s.touchCancel(n))}),F()}}var Vs=["thead"],Ts=["tbody"],Ns=[[["th"]],[["","thead",""]],"*",[["","table-no-rows",""]]],As=["th","[thead]","*","[table-no-rows]"];function Is(i,o){i&1&&oe(0,"sh-progress-bar",2)}function Fs(i,o){i&1&&(h(0,"div",3),u(1,3),g())}var Ps=[[["","title",""]],"*"],ks=["[title]","*"];function Rs(i,o){i&1&&C(0,"Title")}function Ls(i,o){i&1&&(h(0,"sh-icon",1),C(1,"caret-down"),g())}var Bs=["bold","thin","light","fill","duotone"],_e=(()=>{class i{#e=y(I);#i=y(de);ngAfterContentInit(){let e=this.#e.nativeElement.textContent?.trim();if(!e)return;let t=e.split("-").at(-1);t&&Bs.includes(t)&&this.#i.addClass(this.#e.nativeElement,t)}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["sh-icon"]],ngContentSelectors:Y,decls:1,vars:0,template:function(t,n){t&1&&(T(),u(0))},encapsulation:2,changeDetection:0})}}return i})();function Re(i=null){let o=i??y(I).nativeElement;if(!o)return v("");let e=v(o.className);if(typeof MutationObserver>"u")return e.asReadonly();let t=y(he),n=new MutationObserver(s=>{for(let r of s)if(r.type==="attributes"&&r.attributeName==="class"){let a=r.target;e.set(a.className)}});return n.observe(o,{attributes:!0,attributeFilter:["class"]}),t.onDestroy(()=>n.disconnect()),e.asReadonly()}var yt=new le("Ship UI Config"),Hs=["simple","outlined","flat","raised"],Kr=(()=>{class i{constructor(){this.#e=y(yt,{optional:!0}),this.variant=v(this.#e?.alertVariant??""),this._el=y(I),this.alertService=m(null),this.id=m(null),this.currentClasses=Re(),this.activeClass=S(()=>{let e=this.variant(),t=`${this.currentClasses()} sh-sheet`;return e?Hs.find(s=>this.currentClasses().includes(s))?t:`${t} ${e}`:t})}#e;removeAlert(){this.id()&&this.alertService()&&this.alertService()?.removeAlert(this.id())}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["sh-alert"]],hostVars:2,hostBindings:function(t,n){t&2&&Z(n.activeClass())},inputs:{alertService:[1,"alertService"],id:[1,"id"]},ngContentSelectors:jn,decls:19,vars:4,consts:[["ref",""],[1,"alert"],[1,"icon"],[1,"state-icon"],[1,"title"],[1,"close-icon"],[1,"content"],[1,"close-icon",3,"click"]],template:function(t,n){if(t&1&&(T(Hn),h(0,"div",1)(1,"div",2,0),u(3),u(4,1),g(),h(5,"div",2),b(6,Un,2,0,"sh-icon",3)(7,zn,2,0,"sh-icon",3)(8,$n,2,0,"sh-icon",3)(9,Wn,2,0,"sh-icon",3)(10,Gn,2,0,"sh-icon",3)(11,qn,2,0,"sh-icon",3),g(),h(12,"div",4),u(13,2),u(14,3),g(),b(15,Yn,2,0,"sh-icon",5),h(16,"div",6),u(17,4),u(18,5),g()()),t&2){let s=xt(2);p(),G("display",s.children.length?"block":"none");let r=n.currentClasses();p(5),M(r.includes("primary")?6:r.includes("accent")?7:r.includes("warn")?8:r.includes("error")?9:r.includes("success")?10:11),p(9),M(n.id()?15:-1)}},dependencies:[_e],encapsulation:2,changeDetection:0})}}return i})();function Dt(){return Date.now().toString(36)+Math.random().toString(36).substring(2)}var Jr=(()=>{class i{constructor(){this.alertHistory=v([]),this.alertHistoryIsOpen=v(!1),this.alertHistoryIsHidden=v(!0)}error(e){this.addAlert({type:"error",title:e??"An error occured"})}success(e){this.addAlert({type:"success",title:e})}question(e){this.addAlert({type:"question",title:e})}warning(e){this.addAlert({type:"warn",title:e})}info(e){this.addAlert({type:"primary",title:e})}addAlert(e){let t=Dt();this.alertHistory.update(n=>[j(P({},e),{isOpen:!0,animateIn:!0,animateOut:!1,id:t}),...n]),setTimeout(()=>{this.alertHistory.update(n=>n.map(s=>j(P({},s),{animateIn:s.id===t?!1:s.animateIn})))},40),setTimeout(()=>{this.hideAlert(t)},2500)}removeAlert(e){this.alertHistory.update(t=>t.map(n=>j(P({},n),{animateOut:n.id===e?!1:n.animateOut}))),setTimeout(()=>{this.alertHistory.update(t=>t.filter(n=>n.id!==e))},300)}hideAlert(e){this.alertHistory.update(t=>t.map(n=>j(P({},n),{isOpen:n.id===e?!1:n.isOpen})))}setHidden(e){this.alertHistoryIsHidden.set(e)}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275prov=we({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})(),js={class:"default",width:void 0,maxWidth:void 0,height:void 0,maxHeight:void 0,closeOnButton:!0,closeOnEsc:!0,closeOnOutsideClick:!0},Us=(()=>{class i{constructor(){this.#e=y(Oe),this.#i=y(yt,{optional:!0}),this.dialogRef=J("dialogRef"),this.isOpen=H(!1),this.options=m(),this.closed=se(),this.defaultOptionMerge=S(()=>P(j(P({},js),{class:this.#i?.dialogType??"default"}),this.options())),this.abortController=null,this.isOpenEffect=k(()=>{let e=this.dialogRef()?.nativeElement;e&&(this.abortController&&this.abortController.abort(),this.abortController=new AbortController,this.isOpen()?(e.showModal(),e.addEventListener("close",()=>{this.isOpen.set(!1),this.closed.emit()},{signal:this.abortController?.signal}),this.#e.addEventListener("keydown",t=>{t.key==="Escape"&&!this.defaultOptionMerge().closeOnEsc&&t.preventDefault(),t.key==="Escape"&&this.defaultOptionMerge().closeOnEsc&&this.isOpen.set(!1)},{signal:this.abortController?.signal})):(e.close(),queueMicrotask(()=>this.closed.emit())))})}#e;#i;ngOnDestroy(){this.abortController?.abort()}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["sh-dialog"]],viewQuery:function(t,n){t&1&&ue(n.dialogRef,Xn,5),t&2&&ie()},inputs:{isOpen:[1,"isOpen"],options:[1,"options"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:Y,decls:2,vars:2,consts:[["dialogRef",""],["shDialog","",3,"class","width","max-width","max-height","height"],["shDialog",""],[1,"content"],[1,"closeable-overlay"],[1,"closeable-overlay",3,"click"]],template:function(t,n){t&1&&(T(),ot(0),b(1,Zn,5,11,"dialog",1)),t&2&&(ne(n.defaultOptionMerge()),p(),M(n.isOpen()?1:-1))},encapsulation:2,changeDetection:0})}}return i})(),ea=(()=>{class i{constructor(){this.#e=y(Oe),this.#i=this.#e.querySelector("body"),this.#t=y(Et),this.compRef=null,this.insertedCompRef=null,this.closedFieldSub=null,this.compClosedSub=null}#e;#i;#t;open(e,t){let n=this.#t.injector,s=this.#n(),r=!1,ee=t||{},{data:a,closed:l}=ee,c=Kt(ee,["data","closed"]);this.compRef&&this.#o(!0),this.insertedCompRef=It(e,{environmentInjector:n}),this.compRef=It(Us,{hostElement:s,environmentInjector:n,projectableNodes:[[this.insertedCompRef.location.nativeElement]]});let d=this.insertedCompRef.instance,_=d.data,V=d.closed;if(a){if(Mt(_))this.insertedCompRef.setInput("data",a);else if(!Mt(_))throw new Error("data is not an input signal on the passed component")}V instanceof Tt&&(this.closedFieldSub=V.subscribe(ae=>{this.#o(),!r&&(r=!0,l?.(ae),(this.compRef?.instance.closed).emit(ae))})),this.#t.attachView(this.insertedCompRef.hostView),this.#t.attachView(this.compRef.hostView),this.insertedCompRef.changeDetectorRef.detectChanges(),this.compRef.changeDetectorRef.detectChanges(),this.compRef.instance.isOpen.set(!0),this.compRef.setInput("options",c),this.compClosedSub=this.compRef.instance.closed.subscribe(()=>te());let B=this;function te(ae=void 0){B.#o(),!r&&(r=!0,V&&V instanceof Tt&&V.emit(ae),l?.(ae))}return{component:this.insertedCompRef.instance,close:te,closed:this.compRef.instance.closed}}#n(){let e=this.#e.createElement("sh-dialog-ref");return e.id="sh-dialog-ref",this.#e.getElementById("sh-dialog-ref")||this.#i?.append(e),this.#e.getElementById("sh-dialog-ref")}#o(e=!1){let t=this;e||queueMicrotask(()=>n());function n(){t.insertedCompRef&&(t.#t.detachView(t.insertedCompRef.hostView),t.closedFieldSub?.unsubscribe(),t.insertedCompRef.destroy()),t.compRef&&(t.#t.detachView(t.compRef.hostView),t.compClosedSub?.unsubscribe(),t.compRef.destroy())}}ngOnDestroy(){this.#o(!0)}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275prov=we({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var ta=(()=>{class i{constructor(){this.id="--"+Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,12)}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["sh-button-group"]],hostVars:2,hostBindings:function(t,n){t&2&&G("--btng-id",n.id)},ngContentSelectors:Y,decls:1,vars:0,template:function(t,n){t&1&&(T(),u(0))},encapsulation:2,changeDetection:0})}}return i})(),ia=(()=>{class i{static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["","shButton",""]],hostAttrs:[1,"sh-sheet-h"],attrs:Kn,ngContentSelectors:Y,decls:1,vars:0,template:function(t,n){t&1&&(T(),u(0))},encapsulation:2,changeDetection:0})}}return i})(),na=(()=>{class i{constructor(){this.#e=y(yt,{optional:!0}),this.class=v(this.#e?.cardType??"type-a")}#e;static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["sh-card"]],hostVars:2,hostBindings:function(t,n){t&2&&Z(n.class())},ngContentSelectors:Y,decls:1,vars:0,template:function(t,n){t&1&&(T(),u(0))},encapsulation:2,changeDetection:0})}}return i})(),zs=(()=>{class i{constructor(){this.currentClassList=Re()}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["sh-checkbox"]],ngContentSelectors:Y,decls:7,vars:2,consts:[[1,"box","sh-sheet"],[1,"inherit","default-indicator"],[1,"inherit","indeterminate-indicator"],[1,"label"]],template:function(t,n){t&1&&(T(),h(0,"div",0)(1,"sh-icon",1),C(2,"check-bold"),g(),h(3,"sh-icon",2),C(4,"minus-bold"),g()(),h(5,"div",3),u(6),g()),t&2&&Z(n.currentClassList())},dependencies:[_e],encapsulation:2,changeDetection:0})}}return i})(),$s=(()=>{class i{static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["sh-chip"]],hostAttrs:[1,"sh-sheet"],ngContentSelectors:Y,decls:2,vars:0,template:function(t,n){t&1&&(T(),A(0,"div"),u(1),F())},encapsulation:2,changeDetection:0})}}return i})();var Ws=(()=>{class i{constructor(){this.#e=this.#r(new Date),this.date=H(null),this.endDate=H(null),this.asRange=m(!1),this.monthsToShow=m(1),this.disabled=m(!1),this.startOfWeek=m(1),this.weekdayLabels=m(["Su","Mo","Tu","We","Th","Fr","Sa"]),this.daysRef=J("daysRef"),this.currentDate=v(this.date()??this.#e),this.monthOffsets=S(()=>Array.from({length:this.monthsToShow()},(e,t)=>t)),this.selectedDateStylePosition=v(null),this.weekdays=S(()=>{let e=this.startOfWeek(),t=this.weekdayLabels();return t.slice(e).concat(t.slice(0,e))}),this.currentClasses=Re(),this.someEffect=k(()=>{let e=this.currentClasses();this.#n()}),this.#i=k(()=>{this.monthsToShow()>1||this.#t()})}#e;getLastVisibleMonth(){let e=this.monthsToShow()-1;return this.getOffsetDate(e)}getOffsetDate(e){let t=new Date(this.currentDate());return t.setMonth(t.getMonth()+e),t}getMonthDates(e){let t=this.getOffsetDate(e);return this.#o(t,this.startOfWeek())}#i;ngOnInit(){this.monthsToShow()!==1&&this.#t()}#t(){let e=this.date();e&&this.currentDate.set(e),this.#n()}#n(){setTimeout(()=>{let e=this.daysRef()?.nativeElement.querySelector(".sel");if(!e)return this.selectedDateStylePosition.update(t=>t?j(P({},t),{opacity:"0"}):null);this.setSelectedDateStylePosition(e)})}#o(e,t){let n=e.getUTCFullYear(),s=e.getUTCMonth(),r=new Date(Date.UTC(n,s)).getUTCDay(),a=32-new Date(Date.UTC(n,s,32)).getUTCDate(),l=[],c=r-t;c<0&&(c+=7);let d=new Date(Date.UTC(n,s,0)).getUTCDate();for(let V=c-1;V>=0;V--){let B=new Date(Date.UTC(n,s-1,d-V));l.push(B)}for(let V=1;V<=a;V++)l.push(new Date(Date.UTC(n,s,V)));let _=1;for(;l.length%7!==0;)l.push(new Date(Date.UTC(n,s+1,_++)));return l}nextMonth(){this.currentDate.update(e=>{let t=new Date(e);return t.setMonth(e.getMonth()+1),t}),this.#n()}previousMonth(){this.currentDate.update(e=>{let t=new Date(e);return t.setMonth(e.getMonth()-1),t}),this.#n()}setDate(e,t){let n=(s,r)=>{let a=r?.getUTCHours()??0,l=r?.getUTCMinutes()??0,c=r?.getUTCSeconds()??0,d=r?.getUTCMilliseconds()??0;return this.#r(new Date(Date.UTC(s.getUTCFullYear(),s.getUTCMonth(),s.getUTCDate(),a,l,c,d)))};if(!this.asRange())this.date.set(n(e,this.date())),this.endDate.set(null);else{let s=this.date(),r=this.endDate(),a=n(e,null);s?r?(this.date.set(a),this.endDate.set(null)):a<s?(this.date.set(a),this.endDate.set(null)):this.endDate.set(a):this.date.set(a)}this.asRange()||this.setSelectedDateStylePosition(t)}isDateSelected(e){let t=this.date(),n=this.endDate();if(t===null)return null;let s=_=>new Date(Date.UTC(_.getUTCFullYear(),_.getUTCMonth(),_.getUTCDate(),0,0,0,0)),r=_=>new Date(Date.UTC(_.getUTCFullYear(),_.getUTCMonth(),_.getUTCDate(),23,59,59,999)),a=s(e),l=s(t),c=n?r(n):null,d=[];if(this.asRange())if(c===null)a.getTime()===l.getTime()&&d.push("sel first last");else{if(a.getTime()===l.getTime()&&d.push("first"),a.getTime()===s(c).getTime()&&d.push("last"),a>=l&&a<=c){d.push("sel");let ee=a.getUTCDay(),ae=this.startOfWeek();ee===ae&&d.push("week-start");let St=(ae+6)%7;ee===St&&d.push("week-end")}let _=new Date(a);_.setUTCDate(a.getUTCDate()+1),new Date(a).setUTCDate(a.getUTCDate()-1);let B=a.getUTCDate()===1,te=_.getUTCMonth()!==a.getUTCMonth();B&&d.push("month-start"),te&&d.push("month-end")}else a.getTime()===l.getTime()&&d.push("sel");return d.join(" ")||null}setSelectedDateStylePosition(e){this.selectedDateStylePosition.set({transform:`translate(${e.offsetLeft}px, ${e.offsetTop}px)`,opacity:"1"})}getMonthName(e){return e.toLocaleString("default",{month:"long"})}getFullYear(e){return e.getFullYear()}isCurrentMonth(e,t){let n=this.getOffsetDate(t);return e.getMonth()===n.getMonth()}#r(e){let n=e.getTimezoneOffset()*60*1e3;return new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())+n)}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["sh-datepicker"]],viewQuery:function(t,n){t&1&&ue(n.daysRef,Jn,5),t&2&&ie()},hostVars:6,hostBindings:function(t,n){t&2&&(Z("columns-"+n.monthsToShow()),N("as-range",n.asRange())("disabled",n.disabled()))},inputs:{date:[1,"date"],endDate:[1,"endDate"],asRange:[1,"asRange"],monthsToShow:[1,"monthsToShow"],disabled:[1,"disabled"],startOfWeek:[1,"startOfWeek"],weekdayLabels:[1,"weekdayLabels"]},outputs:{date:"dateChange",endDate:"endDateChange"},decls:14,vars:3,consts:[["daysRef",""],["elementRef",""],[3,"click"],[1,"title"],[1,"months-container"],[1,"month"],[1,"weekdays"],[1,"days"],[3,"out-of-scope","class"],[1,"sel-el"]],template:function(t,n){t&1&&(h(0,"header")(1,"button",2),E("click",function(){return n.previousMonth()}),h(2,"sh-icon"),C(3,"caret-left"),g()(),h(4,"div",3),C(5),b(6,eo,1,1),C(7),g(),h(8,"button",2),E("click",function(){return n.nextMonth()}),h(9,"sh-icon"),C(10,"caret-right"),g()()(),h(11,"section",4),Ve(12,oo,9,1,"div",5,di),g()),t&2&&(p(5),K(" ",n.getMonthName(n.currentDate())," "),p(),M(n.monthsToShow()>1?6:-1),p(),K(" ",n.getFullYear(n.currentDate())," "),p(5),Te(n.monthOffsets()))},dependencies:[_e],encapsulation:2,changeDetection:0})}}return i})(),Ct=4,Gs=["scroll","auto"],qs={width:void 0,height:void 0,closeOnButton:!0,closeOnEsc:!0},Qt=(()=>{class i{constructor(){this.#e=y(Oe),this.SUPPORTS_ANCHOR=typeof CSS<"u"&&CSS.supports("position-anchor","--abc")&&CSS.supports("anchor-name","--abc"),this.asMultiLayer=m(!1),this.disableOpenByClick=m(!1),this.isOpen=H(!1),this.options=m(),this.closed=se(),this.defaultOptionMerge=S(()=>P(P({},qs),this.options())),this.triggerRef=J.required("triggerRef"),this.popoverRef=J("popoverRef"),this.popoverContentRef=J("popoverContentRef"),this.id=v("--"+Dt()),this.menuStyle=v(null),this.openAbort=null,this.openEffect=k(()=>{let e=this.isOpen();queueMicrotask(()=>{let t=this.popoverRef()?.nativeElement;if(!t){this.openAbort?.abort(),this.openAbort=null;return}e?(this.openAbort&&this.openAbort.abort(),this.openAbort=new AbortController,this.#e.addEventListener("keydown",n=>{n.key==="Escape"&&!this.defaultOptionMerge().closeOnEsc&&n.preventDefault(),n.key==="Escape"&&this.defaultOptionMerge().closeOnEsc&&this.isOpen.set(!1)},{signal:this.openAbort?.signal}),t.showPopover(),this.SUPPORTS_ANCHOR||setTimeout(()=>{this.#i(t).addEventListener("scroll",()=>this.#a(),{signal:this.openAbort?.signal}),window?.addEventListener("resize",()=>this.#a(),{signal:this.openAbort?.signal}),this.#a()})):(this.closed.emit(),this.openAbort?.abort(),this.openAbort=null)})})}#e;toggleIsOpen(e){this.disableOpenByClick()||(e.preventDefault(),e.stopPropagation(),this.isOpen.set(!this.isOpen()))}eventClose(e){this.isOpen()&&this.isOpen.set(!1)}#i(e){let t=e.parentElement;for(;t;){if(Gs.indexOf(window?.getComputedStyle(t).overflowY)>-1&&t.scrollHeight>t.clientHeight)return t;t=t.parentElement}return this.#e.documentElement}#t(e,t){let n=e.left,s=e.bottom+Ct;return{left:n,top:s}}#n(e,t){let n=e.right+Ct,s=e.top;return{left:n,top:s}}#o(e,t){let n=e.right+Ct,s=e.bottom;return{left:n,top:s}}#r(e,t){let n=e.left,s=e.bottom-e.height-t.height-Ct;return{left:n,top:s}}#a(){let e=this.triggerRef()?.nativeElement.getBoundingClientRect(),t=this.popoverContentRef()?.nativeElement.getBoundingClientRect(),n=[this.#n,this.#o],s=[this.#t,this.#r],r=this.asMultiLayer()?n:s;for(let l=0;l<r.length;l++){let c=r[l](e,t),d=c.left+(t?.width||0)>window.innerWidth,_=c.top+(t?.height||0)>window.innerHeight;if(!d&&!_){this.menuStyle.set({left:c.left+"px",top:c.top+"px"});return}}let a=r[0](e,t);this.menuStyle.set({left:a.left+"px",top:a.top+"px"})}ngOnDestroy(){this.openAbort?.abort(),this.openAbort=null}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["sh-popover"]],viewQuery:function(t,n){t&1&&ue(n.triggerRef,so,5)(n.popoverRef,ro,5)(n.popoverContentRef,ao,5),t&2&&ie(3)},hostVars:2,hostBindings:function(t,n){t&2&&N("multi-layer",n.asMultiLayer())},inputs:{asMultiLayer:[1,"asMultiLayer"],disableOpenByClick:[1,"disableOpenByClick"],isOpen:[1,"isOpen"],options:[1,"options"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:co,decls:8,vars:4,consts:[["triggerRef",""],["popoverRef",""],["popoverContentRef",""],[1,"trigger",3,"click"],[1,"trigger-wrapper"],[1,"trigger-anchor"],["popover","manual",1,"popover"],[1,"overlay",3,"click"],[1,"popover-content"]],template:function(t,n){if(t&1){let s=z();T(lo),A(0,"div",3,0),Se("click",function(a){return w(s),x(n.toggleIsOpen(a))}),A(2,"div",4),u(3),u(4,1),u(5,2),F(),ye(6,"div",5),F(),b(7,uo,6,5,"div",6)}t&2&&(ge("popovertarget",n.id()+"hello"),p(6),G("anchor-name",n.id()),p(),M(n.isOpen()?7:-1))},encapsulation:2,changeDetection:0})}}return i})(),Ys=(()=>{class i{constructor(){this.#e=y(I),this.isOpen=H(!1),this.closed=se()}#e;onClick(){this.#e.nativeElement.querySelector("input")&&this.#e.nativeElement.querySelector("input").focus(),this.#e.nativeElement.querySelector("textarea")&&this.#e.nativeElement.querySelector("textarea").focus()}close(){this.closed.emit()}ngOnInit(){let e=typeof CSS<"u"&&CSS.supports("field-sizing","content"),t=this.#e.nativeElement.querySelector("textarea");if(!e&&t!==null){let a=function(){r.style.height="auto",r.style.height=r.scrollHeight+"px"},l=function(){setTimeout(a,0)};var n=a,s=l;let r=this.#e.nativeElement.querySelector("textarea");r&&(r.addEventListener("change",a),r.addEventListener("cut",l),r.addEventListener("paste",l),r.addEventListener("drop",l),r.addEventListener("keydown",l),r.focus(),r.select(),a())}}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["sh-form-field-popover"]],hostBindings:function(t,n){t&1&&E("click",function(){return n.onClick()})},inputs:{isOpen:[1,"isOpen"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:po,decls:18,vars:3,consts:[[1,"input-wrap"],[1,"prefix"],[1,"prefix-space"],[3,"isOpenChange","closed","isOpen","options"],[1,"suffix-space"],[1,"helpers"],[1,"error-wrap"],[1,"hint"]],template:function(t,n){t&1&&(T(ho),u(0),h(1,"div",0)(2,"div",1),u(3,1),u(4,2),g(),oe(5,"div",2),h(6,"sh-popover",3),$e("isOpenChange",function(r){return ze(n.isOpen,r)||(n.isOpen=r),r}),E("closed",function(){return n.close()}),u(7,3,["trigger",""]),u(8,4),g(),u(9,5),u(10,6),oe(11,"div",4),u(12,7),g(),h(13,"div",5)(14,"div",6),u(15,8),g(),h(16,"div",7),u(17,9),g()()),t&2&&(p(6),Ue("isOpen",n.isOpen),Q("options",st(2,Wi)))},dependencies:[Qt],encapsulation:2,changeDetection:0})}}return i})();function Xs(i){let o=y(I).nativeElement,e=y(he),t=v([]),n=()=>{t.set(Array.from(o.querySelectorAll(i)))};if(n(),typeof MutationObserver>"u")return t.asReadonly();let s=new MutationObserver(r=>{r.some(l=>l.type==="childList")&&n()});return s.observe(o,{childList:!0}),e.onDestroy(()=>s.disconnect()),t.asReadonly()}var oa=(()=>{class i{constructor(){this.ngModels=Nt(_t),this.#e=y(Pt),this.#i=v(null),this.masking=m("mediumDate"),this.closed=se(),this._maskedDate=S(()=>{let e=this.internalDate(),t=this.masking();return t?e?this.#e.transform(e,t):null:e}),this.internalDate=v(null),this.isOpen=H(!1),this.currentClass=Re(),this.#t=Xs("#input-wrap input"),this.#n=k(()=>{let e=this.#t();if(!e.length)return;let t=e[0];t&&(this.#o(t),t.addEventListener("inputValueChanged",n=>{this.internalDate.set(n.detail.value?this.#r(new Date(n.detail.value)):null)}),t.addEventListener("focus",()=>{this.isOpen.set(!0),t.blur()}),this.#i.set(t),t.autocomplete="off",typeof t.value=="string"&&this.internalDate.set(t.value?this.#r(new Date(t.value)):null))})}#e;#i;#t;onDateChange(e){this.internalDate.set(e);let t=this.#i();t&&(t.value=e?e.toString():"",t.dispatchEvent(new Event("input")))}close(){this.closed.emit(this.internalDate())}#n;#o(e){return Object.defineProperty(e,"value",{configurable:!0,get(){return Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value").get.call(this)},set(t){Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value").set.call(this,t);let s=new CustomEvent("inputValueChanged",{bubbles:!0,cancelable:!0,detail:{value:t}});return this.dispatchEvent(s),t}}),e}#r(e){let n=e.getTimezoneOffset()*60*1e3;return new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())+n)}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["sh-datepicker-input"]],contentQueries:function(t,n,s){t&1&&wt(s,n.ngModels,_t,5),t&2&&ie()},inputs:{masking:[1,"masking"],isOpen:[1,"isOpen"]},outputs:{closed:"closed",isOpen:"isOpenChange"},features:[$([Pt])],ngContentSelectors:go,decls:15,vars:3,consts:[["defaultIndicator",""],[3,"closed","isOpenChange","isOpen"],["id","input-wrap","ngProjectAs","input",5,["input"],1,"input"],[1,"masked-value"],["suffix","",1,"default-indicator"],["popoverContent",""],[3,"date","class"],[3,"dateChange","date"]],template:function(t,n){if(t&1){let s=z();T(fo),h(0,"sh-form-field-popover",1),E("closed",function(){return w(s),x(n.close())}),$e("isOpenChange",function(a){return w(s),ze(n.isOpen,a)||(n.isOpen=a),x(a)}),u(1,0,["ngProjectAs","label",5,["label"]]),u(2,1,["ngProjectAs","[prefix]",5,["","prefix",""]]),u(3,2,["ngProjectAs","[textPrefix]",5,["","textPrefix",""]]),h(4,"div",2),b(5,mo,2,1,"div",3),u(6,3),g(),u(7,4,["ngProjectAs","[textSuffix]",5,["","textSuffix",""]]),u(8,5,["ngProjectAs","[suffix]",5,["","suffix",""]]),h(9,"sh-icon",4),C(10,"calendar"),g(),h(11,"div",5),b(12,vo,1,3,"sh-datepicker",6),g()(),fe(13,_o,0,0,"ng-template",null,0,ui)}t&2&&(Ue("isOpen",n.isOpen),p(5),M(n.masking()?5:-1),p(7),M(n.isOpen()?12:-1))},dependencies:[Ws,Ys,_e],encapsulation:2,changeDetection:0})}}return i})();var Qs=(()=>{class i{static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["sh-divider"]],ngContentSelectors:Y,decls:1,vars:0,template:function(t,n){t&1&&(T(),u(0))},encapsulation:2,changeDetection:0})}}return i})();var Zt=(()=>{class i{#e=y(I);onClick(){this.#e.nativeElement.querySelector("input")&&this.#e.nativeElement.querySelector("input").focus(),this.#e.nativeElement.querySelector("textarea")&&this.#e.nativeElement.querySelector("textarea").focus()}constructor(){bt(()=>{let e=typeof CSS<"u"&&CSS.supports("field-sizing","content"),t=this.#e.nativeElement.querySelector("textarea");if(!e&&t!==null){let r=function(){t.style.height="auto",t.style.height=t.scrollHeight+"px"},a=function(){setTimeout(r,0)};var n=r,s=a;t.addEventListener("change",r),t.addEventListener("cut",a),t.addEventListener("paste",a),t.addEventListener("drop",a),t.addEventListener("keydown",a),t.focus(),t.select(),r()}})}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["sh-form-field"]],hostBindings:function(t,n){t&1&&E("click",function(){return n.onClick()})},ngContentSelectors:yo,decls:17,vars:0,consts:[[1,"input-wrap"],[1,"prefix"],[1,"suffix"],[1,"helpers"],[1,"error-wrap"],[1,"hint"]],template:function(t,n){t&1&&(T(Co),u(0),A(1,"div",0)(2,"div",1),u(3,1),u(4,2),u(5,3),F(),u(6,4),u(7,5),A(8,"div",2),u(9,6),u(10,7),u(11,8),F()(),A(12,"div",3)(13,"div",4),u(14,9),F(),A(15,"div",5),u(16,10),F()())},encapsulation:2,changeDetection:0})}}return i})(),sa=(()=>{class i{constructor(){this._el=y(I),this.inputRef=J.required("input"),this.filesOver=v(!1),this.multiple=m(),this.accept=m(null),this.placeholder=H("Click or drag files here"),this.overlayText=m("Drop files here"),this.files=H([]),this.fileUploadClasses=S(()=>this._el.nativeElement.classList.toString()),this.inputEffect=k(()=>{let e=this.inputRef().nativeElement;e&&(e.placeholder&&this.placeholder.set(e.placeholder),e.addEventListener("dragover",t=>{t.preventDefault(),this.filesOver.set(!0)}),e.addEventListener("dragleave",t=>{t.preventDefault(),this.filesOver.set(!1)}),e.addEventListener("drop",t=>{t.preventDefault(),this.filesOver.set(!1);let n=t.dataTransfer?.files;n&&n.length>0&&(this.handleFileUpload(Array.from(n)),e.files=n)}),e.addEventListener("change",t=>{t.preventDefault(),this.handleFileUpload(Array.from(t.target.files))}))})}handleFileUpload(e){this.multiple()?this.files.update(t=>[...t,...e]):this.files.set(e)}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["sh-file-upload"]],viewQuery:function(t,n){t&1&&ue(n.inputRef,Do,5),t&2&&ie()},inputs:{multiple:[1,"multiple"],accept:[1,"accept"],placeholder:[1,"placeholder"],overlayText:[1,"overlayText"],files:[1,"files"]},outputs:{placeholder:"placeholderChange",files:"filesChange"},ngContentSelectors:bo,decls:12,vars:7,consts:[["inputWrap",""],["input",""],["ngProjectAs","input",5,["input"],1,"input"],[1,"files-text"],[1,"placeholder"],["type","file"],[1,"bg-overlay"],["suffix",""]],template:function(t,n){t&1&&(T(So),h(0,"sh-form-field"),u(1,0,["ngProjectAs","label",5,["label"]]),h(2,"div",2,0),b(4,Mo,2,1,"div",3)(5,Eo,2,1,"div",3)(6,wo,2,1,"div",4),oe(7,"input",5,1)(9,"div",6),g(),h(10,"sh-icon",7),C(11,"upload-simple"),g()()),t&2&&(Z(n.fileUploadClasses()),p(4),M(n.files().length===1?4:n.files().length>1?5:6),p(3),ge("multiple",n.multiple())("accept",n.accept()),p(2),N("files-over",n.filesOver()))},dependencies:[Zt,_e],encapsulation:2,changeDetection:0})}}return i})(),ra=(()=>{class i{static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["sh-list"]],ngContentSelectors:Y,decls:1,vars:0,template:function(t,n){t&1&&(T(),u(0))},encapsulation:2,changeDetection:0})}}return i})();function Zs(i,o){let e=v(null),t=o.map(l=>l.toUpperCase()),n=y(xe),s=n.get(he);if(fi(n.get(ri))||typeof MutationObserver>"u")return e.asReadonly();if(t.find(l=>i.nativeElement.querySelector(l)))return e.set(new I(i.nativeElement.querySelector(o[0]))),e.asReadonly();let a=new MutationObserver(l=>{for(let c of l)if(c.addedNodes){for(let d of Array.from(c.addedNodes))if(d.nodeType===Node.ELEMENT_NODE&&t.includes(d.nodeName)){e.set(new I(d)),a.disconnect();return}}});return a.observe(i.nativeElement,{childList:!0,subtree:!0}),s.onDestroy(()=>a.disconnect()),e.asReadonly()}function qi(i,o){let e=y(xe),t=e.get(he),n=v([]),s=null,r=null,a=(c,d)=>{r&&r.disconnect();let _=Array.from(c.nativeElement.querySelectorAll(d.join(",")));n.set(_),typeof MutationObserver<"u"&&(r=new MutationObserver(V=>{queueMicrotask(()=>{let B=Array.from(c.nativeElement.querySelectorAll(d.join(",")));n.set(B)})}),r.observe(c.nativeElement,{childList:!0,subtree:!0})),t.onDestroy(()=>l())};s=k(()=>{let c=typeof i=="function"&&i[Jt]?i():i,d=typeof o=="function"?o():o;c&&d?.length>0?a(c,d):(n.set([]),r&&(r.disconnect(),r=null))},{injector:e});function l(){s&&s.destroy(),r&&r.disconnect()}return{signal:n.asReadonly(),destroy:l}}function Ks(i,o=["input","textarea"]){let e=i||Zs(y(I),o),t=v(void 0),n=y(xe),s=n.get(he),r=v(null);k(l=>{let c=e();if(!c)return;let d=c.nativeElement;d&&(Js(d),r.set(d),t.set(d.value??""),l(()=>{r.set(null)}))},{injector:n});let a=null;return k(()=>{let l=r();if(!l)return;a&&(a(),a=null);let c=_=>{t.set(_.detail.value)},d=_=>{t.set(_.target.value)};l.addEventListener("input",d),l.addEventListener("inputValueChanged",c),t.set(l.value),a=()=>{l.removeEventListener("input",d),l.removeEventListener("inputValueChanged",c)},s.onDestroy(()=>{a&&a()})},{injector:n}),k(()=>{let l=r();if(!l)return;let c=t();c&&(l.value=c,l.dispatchEvent(new Event("input")))},{injector:n}),t}function Js(i){return Object.defineProperty(i,"value",{configurable:!0,get(){return Object.getOwnPropertyDescriptor(Object.getPrototypeOf(i),"value").get.call(this)},set(o){Object.getOwnPropertyDescriptor(Object.getPrototypeOf(i),"value").set.call(this,o);let t=new CustomEvent("inputValueChanged",{bubbles:!0,cancelable:!0,detail:{value:o}});return this.dispatchEvent(t),o}}),i}var aa=(()=>{class i{constructor(){this.#e=y(Oe),this.#i=y(de),this.asMultiLayer=m(!1),this.openIndicator=m(!1),this.disabled=m(!1),this.customOptionElementSelectors=m(["button"]),this.keepClickedOptionActive=m(!1),this.closeOnClick=m(!0),this.isOpen=H(!1),this.closed=se(),this.searchable=m(!1),this.activeOptionIndex=v(-1),this.inputRef=J("inputRef"),this.optionsRef=J("optionsRef"),this.options=qi(this.optionsRef,this.customOptionElementSelectors),this.optionsEl=S(()=>this.options.signal().filter(e=>!e.disabled)),this.inputValue=Ks(this.inputRef),this.abortController=null,this.optionsEffect=k(()=>{if(this.abortController!==null&&(this.abortController.abort(),this.abortController=null),!this.isOpen())return;this.abortController=new AbortController,this.searchable()||this.#e.documentElement.addEventListener("keydown",this.keyDownEventListener,{signal:this.abortController.signal});let t=this.inputRef()?.nativeElement;t&&(queueMicrotask(()=>t.focus()),t.addEventListener("keydown",this.keyDownEventListener,{signal:this.abortController.signal}),this.closeOnClick()||this.optionsRef()?.nativeElement?.addEventListener("click",s=>{let r=s.target,a=this.activeElements();if(!a.length){let c=this.optionsEl();this.activeElements.set(c),a=c}let l=a.findIndex(c=>c===r);l>-1&&(this.activeOptionIndex.set(l),t.focus())}))}),this.keyDownEventListener=e=>{let t=this.activeOptionIndex();e.key==="ArrowDown"?(e.preventDefault(),this.activeOptionIndex.set(this.nextActiveIndex(t))):e.key==="ArrowUp"?(e.preventDefault(),this.activeOptionIndex.set(this.prevActiveIndex(t))):e.key==="Enter"?(e.preventDefault(),t>-1&&(this.activeElements()[t].click(),queueMicrotask(()=>this.close("active")))):e.key==="Tab"&&(e.preventDefault(),this.close("closed"))},this._lastElementList=[],this.activeElements=v([]),this.lastInputValue="",this.inputValueEffect=k(()=>{if(!this.searchable())return;let t=(this.inputValue()??"").toLowerCase();if(this.#n(),!t||t===""){let s=this.optionsEl();this.activeElements.set(s),this._lastElementList=s;for(let r=0;r<s.length;r++)this.#i.removeStyle(s[r],"order");return}if(!t||t==="")return;let n=this._lastElementList.length&&t.length>this.lastInputValue.length?this._lastElementList:this.optionsEl();this.lastInputValue=t;for(let s=0;s<n.length;s++){let r=n[s],a=r.textContent?.toLowerCase()||"",l=this.#t(a,t);r.value=l}n=n.filter(s=>s.value>0).sort((s,r)=>r.value-s.value);for(let s=0;s<n.length;s++)this.#i.setStyle(n[s],"order",s);this.activeElements.set(n),this._lastElementList=n}),this.activeOptionIndexEffect=k(()=>{let e=this.activeElements(),t=this.activeOptionIndex();for(let n=0;n<e.length;n++)e[n].classList.remove("active");t>-1&&(e[t].scrollIntoView({block:"center"}),e[t].classList.add("active"))})}#e;#i;toggleIsOpen(e){e.preventDefault(),e.stopPropagation(),!this.disabled()&&(this.isOpen.set(!this.isOpen()),this.searchable()&&this.isOpen()&&setTimeout(()=>this.inputRef()?.nativeElement.focus()))}#t(e,t){if(!t)return 0;let n=0,s=-1,r=0,a=!0;for(let l=0;l<t.length;l++){let c=t[l];if(e.length>s+1&&e[s+1]===c)n+=l===0?100:150,s++,r++;else{let d=e.indexOf(c,s+1);if(l>0&&(a=!1),d===-1)return 0;n+=100,s=d,r++}}return a&&t.length===r&&(n+=1e3),n+=r*20,n}nextActiveIndex(e){let t=this.activeElements();if(!t.length){let s=this.optionsEl();this.activeElements.set(s),t=s}if(e===-1||e===t.length-1)return 0;let n=e+1;return t[n].disabled?this.nextActiveIndex(n):n}prevActiveIndex(e){let t=this.activeElements();if(!t.length){let s=this.optionsEl();this.activeElements.set(s),t=s}if(e===0||e===-1)return t.length-1;let n=e-1;return t[n].disabled?this.prevActiveIndex(n):n}close(e="closed",t){this.inputValue.set(""),this.closeOnClick()&&((!this.keepClickedOptionActive()||e==="closed")&&this.#n(),this.isOpen.set(!1),this.closed.emit(e==="active"))}#n(){this.activeOptionIndex.set(-1);let e=this.optionsEl();for(let t=0;t<e.length;t++)e[t].classList.remove("active")}ngOnDestroy(){this.abortController&&(this.abortController.abort(),this.abortController=null)}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["sh-menu"]],viewQuery:function(t,n){t&1&&ue(n.inputRef,xo,5)(n.optionsRef,Oo,5),t&2&&ie(2)},hostVars:6,hostBindings:function(t,n){t&2&&N("disabled",n.disabled())("has-search",n.searchable())("multi-layer",n.asMultiLayer())},inputs:{asMultiLayer:[1,"asMultiLayer"],openIndicator:[1,"openIndicator"],disabled:[1,"disabled"],customOptionElementSelectors:[1,"customOptionElementSelectors"],keepClickedOptionActive:[1,"keepClickedOptionActive"],closeOnClick:[1,"closeOnClick"],isOpen:[1,"isOpen"],searchable:[1,"searchable"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:To,decls:12,vars:12,consts:[["formFieldWrapper",""],["inputRef",""],["optionsRef",""],[3,"isOpenChange","closed","isOpen","disableOpenByClick","asMultiLayer","options"],["trigger","",3,"click"],[1,"open-indicator"],[1,"form-field-wrap"],[1,"small","stretch"],["type","text","placeholder","Search"],[1,"options",3,"click"]],template:function(t,n){if(t&1){let s=z();T(Vo),h(0,"sh-popover",3,0),$e("isOpenChange",function(a){return w(s),ze(n.isOpen,a)||(n.isOpen=a),x(a)}),E("closed",function(){return w(s),x(n.close("fromPopover"))}),h(2,"div",4),E("click",function(a){return w(s),x(n.toggleIsOpen(a))}),u(3),b(4,No,2,0,"sh-icon",5),g(),h(5,"div",6)(6,"sh-form-field",7),oe(7,"input",8,1),g()(),h(9,"div",9,2),E("click",function(){return w(s),x(n.close("active"))}),u(11,1),g()()}t&2&&(Ue("isOpen",n.isOpen),Q("disableOpenByClick",!0)("asMultiLayer",n.asMultiLayer())("options",st(11,Wi)),p(2),N("is-open",n.isOpen()),p(2),M(n.openIndicator()?4:-1),p(2),N("hidden",n.searchable()===!1),p(3),N("searching",n.searchable()&&n.inputValue()!==""))},dependencies:[Qt,Zt,_e],encapsulation:2,changeDetection:0})}}return i})(),er=(()=>{class i{constructor(){this.value=m(void 0)}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["sh-progress-bar"]],inputs:{value:[1,"value"]},decls:1,vars:2,consts:[[1,"progress-bar"]],template:function(t,n){t&1&&ye(0,"div",0),t&2&&G("width",n.value(),"%")},encapsulation:2,changeDetection:0})}}return i})(),la=(()=>{class i{constructor(){this.currentClassList=Re()}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["sh-radio"]],ngContentSelectors:Y,decls:2,vars:2,consts:[[1,"radio","sh-sheet"]],template:function(t,n){t&1&&(T(),ye(0,"div",0),u(1)),t&2&&Z(n.currentClassList())},encapsulation:2,changeDetection:0})}}return i})(),ca=(()=>{class i{constructor(){this.#e=y(I),this.#i=null,this.#t=null,this.#n=0,this.unit=m(""),this.value=H(this.#n),this.inputState=v({min:0,max:100,step:1}),this.valuePercentage=S(()=>{let{min:e,max:t}=this.inputState(),n=this.value()??e;if(isNaN(n))return 0;let s=t-e;if(s===0)return 0;let r=(n-e)/s*100;return Math.max(0,Math.min(100,r))}),this.trackFilledPercentage=S(()=>this.valuePercentage()),this.thumbPositionPercentage=S(()=>this.valuePercentage()),this.syncModelToInputEffect=k(()=>{let e=this.value();if(this.#t){let t=parseFloat(this.#t.value);(isNaN(t)||String(t)!==String(e))&&(this.#t.value=String(e))}})}#e;#i;#t;#n;get hasInputElement(){return!!this.#t}ngAfterViewInit(){this.#t=this.#e.nativeElement.querySelector('input[type="range"]'),this.#t?(this.#s(this.#t),this.#t.oninput=()=>{this.setNewInputValue(this.#t.value)},this.#t.addEventListener("inputValueChanged",e=>{this.setNewInputValue(e.detail.value)}),queueMicrotask(()=>this.#o(!0)),this.#r()):console.error('ShipRangeSlider: No <input type="range"> element found projected inside.')}setNewInputValue(e){let t=parseFloat(e??"0");if(!isNaN(t)){let{min:n,max:s}=this.inputState();this.value.set(Math.max(n,Math.min(s,t)))}}trackEvent(e){if(!this.#t||this.#t.readOnly||this.#t.disabled){e.preventDefault(),e.stopPropagation();return}if(e.target===this.#t||e.target?.closest(".thumb, .min-indicator, .max-indicator"))return;let n=e.currentTarget.getBoundingClientRect(),s=e.clientX-n.left,r=n.width,{min:a,max:l,step:c}=this.inputState(),d=l-a;if(r>0&&d!==0&&c>0){let V=(s/r*d+a-a)/c,B=a+Math.round(V)*c,te=this.#a(c);B=parseFloat(B.toFixed(te));let ee=Math.max(a,Math.min(l,B));this.value.set(ee)}}#o(e=!1){if(!this.#t)return;let t=parseFloat(this.#t.min??"0")??0,n=parseFloat(this.#t.max??"100")??100,s=this.#t.step,r=1;if(s&&s.toLowerCase()!=="any"){let l=parseFloat(s);!isNaN(l)&&l>0&&(r=l)}this.inputState.set({min:t,max:n,step:r});let a=parseFloat(this.#t.value??String(t))??t;if(e&&this.value()!==this.#n){let l=this.value(),c=Math.max(t,Math.min(n,l));a!==c&&(this.#t.value=String(c)),l!==c&&this.value.set(c)}else{let l=Math.max(t,Math.min(n,a));this.value()!==l&&this.value.set(l)}}#r(){if(!this.#t||typeof MutationObserver>"u")return;let e=["min","max","step","value","readonly","disabled"];this.#i=new MutationObserver(t=>{let n=!1;for(let s of t)if(s.type==="attributes"&&e.includes(s.attributeName??"")){n=!0;break}n&&this.#o(!1)}),this.#i.observe(this.#t,{attributes:!0,attributeFilter:e})}#a(e){if(isNaN(e)||Math.floor(e)===e)return 0;let n=e.toString().split(".")[1];return n?n.length:0}#s(e){Object.defineProperty(e,"value",{configurable:!0,get(){return Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),"value").get.call(this)},set(t){Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),"value").set.call(this,t);let s=new CustomEvent("inputValueChanged",{bubbles:!0,cancelable:!0,detail:{value:t}});return this.dispatchEvent(s),t}})}ngOnDestroy(){this.#i&&this.#i.disconnect(),this.#t&&(this.#t.oninput=null)}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["sh-range-slider"]],hostVars:2,hostBindings:function(t,n){t&2&&N("has-input",n.hasInputElement)},inputs:{unit:[1,"unit"],value:[1,"value"]},outputs:{value:"valueChange"},ngContentSelectors:Io,decls:15,vars:10,consts:[[1,"label"],[1,"input-wrap"],[1,"min-indicator"],[1,"track-wrap",3,"click"],[1,"track"],[1,"track-filled"],[1,"thumb-wrap"],[1,"thumb"],[1,"value-indicator"],[1,"max-indicator"]],template:function(t,n){t&1&&(T(Ao),A(0,"div",0),u(1),F(),A(2,"div",1)(3,"div",2),C(4),F(),A(5,"div",3),Se("click",function(r){return n.trackEvent(r)}),u(6,1),A(7,"div",4),ye(8,"div",5),F(),A(9,"div",6)(10,"div",7)(11,"div",8),C(12),F()()()(),A(13,"div",9),C(14),F()()),t&2&&(p(4),nt("",n.inputState().min,"",n.unit()),p(4),G("width",n.trackFilledPercentage(),"%"),p(),G("left",n.thumbPositionPercentage(),"%"),p(3),nt("",n.value(),"",n.unit()),p(2),nt("",n.inputState().max,"",n.unit()))},encapsulation:2,changeDetection:0})}}return i})(),tr=(()=>{class i{static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["sh-spinner"]],decls:0,vars:0,template:function(t,n){},encapsulation:2,changeDetection:0})}}return i})(),da=(()=>{class i{constructor(){this.#e=y(I),this.value=m(),this.label=m(),this.asFreeText=m(!1),this.optionTitle=m(null),this.freeTextTitle=m(null),this.freeTextPlaceholder=m("Type to create a new option"),this.validateFreeText=m(),this.placeholder=m(),this.readonly=H(!1),this.disabled=H(!1),this.lazySearch=m(!1),this.inlineSearch=m(!1),this.asText=m(!1),this.isClearable=m(!0),this.selectMultiple=m(!1),this.optionTemplate=m(null),this.selectedOptionTemplate=m(null),this.placeholderTemplate=m(null),this.freeTextOptionTemplate=m(null),this.isOpen=H(!1),this.isLoading=H(!1),this.options=H([]),this.selectedOptions=H([]),this.cleared=se(),this.onAddNewFreeTextOption=se(),this.computedFreeTextOption=S(()=>{let e=this.inputValue(),t=this.value(),n=t?{}:e;return t&&typeof n=="object"&&(n[t]=e),n}),this.#i=v(null),this.inlineTemplate=Nt(it),this.optionsWrapRef=J.required("optionsWrap"),this.inputRefInput=v(null),this.#t=typeof MutationObserver<"u"&&new MutationObserver(e=>{for(var t of e)t&&(t.target.nodeName==="INPUT"||t.target.nodeName==="TEXTAREA")&&(this.inputRefInput.set(new I(t.target)),this.#t.disconnect())}),this.inputValue=v(""),this.prevInputValue=v(null),this.focusedOptionIndex=v(-1),this._isClearable=S(()=>this.selectMultiple()||this.isClearable()),this.selectClasses=S(()=>this.#e.nativeElement.classList.toString()),this.stretch=S(()=>this.selectClasses().includes("stretch")),this.small=S(()=>this.selectClasses().includes("small")),this.placeholderText=S(()=>{let e=this.placeholder(),t=this.inputRefEl();return e||t?.placeholder||null}),this.selectedOptionValues=S(()=>{let e=this.selectedOptions(),t=this.value();return t?e.map(n=>this.#s(n,t)):e}),this.filteredOptions=S(()=>{let e=this.options()||[],t=this.label(),n=this.value(),s=this.inlineSearch(),r=this.inputValue().toLowerCase(),a=this.#c(r);if(e.length<=0)return[];if(!s||r==="")return e;let c=e.filter(d=>{let _=t?(this.#s(d,t)??"").toString().toLowerCase():(d??"").toString().toLowerCase(),V=((n?this.#s(d,n):d)??"").toString().toLowerCase(),B=a.test(_),te=a.test(V);return B||te}).map(d=>{let _=t?(this.#s(d,t)??"").toString().toLowerCase():(d??"").toString().toLowerCase(),V=((n?this.#s(d,n):d)??"").toString().toLowerCase(),B=this.#n(_,r),te=this.#n(V,r);return{item:d,score:Math.max(B,te)}});return c.sort((d,_)=>_.score-d.score),c.map(d=>d.item)}),this.#o=Dt(),this.inputRefEl=S(()=>{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.#o}`),t.setAttribute("aria-haspopup","listbox"),t.setAttribute("aria-owns","optionsWrapId"),this.#l(t),t.addEventListener("focus",()=>{this.readonly()||this.open()}),t.addEventListener("input",n=>{let s=n.target.value,r=this.inputValue();s!==r&&(this.focusedOptionIndex.set(this.asFreeText()?-1:0),this.inputValue.set(s),this.updateInputElValue())}),t.addEventListener("inputValueChanged",n=>{let s=n.detail.value,r=this.inputValue();if(s!==r){if(s===""){this.clear();return}this.setSelectedOptionsFromValue(s),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=k(()=>{let e=this.inputRefEl();if(!e)return;let t=this.getLabelAsSlug(this.filteredOptions()[this.focusedOptionIndex()]);t?e.setAttribute("aria-activedescendant",t):e.removeAttribute("aria-activedescendant")}),this.openAbortController=null,this.isOpenEffect=k(()=>{if(this.isOpen()){this.openAbortController||(this.openAbortController=new AbortController);let t=this.inputRefEl(),s=this.asFreeText()?-1:0;if(!t)return;t.setAttribute("aria-expanded",this.isOpen().toString()),t.addEventListener("keydown",r=>{if((r.key==="Escape"||r.key==="Tab")&&(r.preventDefault(),this.close()),r.key==="Enter"&&(r.preventDefault(),this.toggleOptionByIndex(this.focusedOptionIndex(),void 0,!0)),r.key==="ArrowDown"){r.preventDefault();let a=this.focusedOptionIndex()+1;this.focusedOptionIndex.set(a>this.filteredOptions().length-1?s:a)}if(r.key==="ArrowUp"){r.preventDefault();let a=this.focusedOptionIndex()-1;this.focusedOptionIndex.set(a<s?this.filteredOptions().length-1:a)}},{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._inputValue="",this.inputValueEffect=k(()=>{let e=this.inputValue();this._inputValue=e}),this.inputRefElEffect=k(()=>{let e=this.inputRefEl();e&&e.value!==this._inputValue&&(this.disabled.set(e.disabled),this.setSelectedOptionsFromValue(e.value),this.setInputValueFromOptions(this.selectedOptions()))}),this.selectedLabels=S(()=>{let e=this.selectedOptions();return this.label()?e.map(n=>this.getLabel(n)).join(", "):e.join(", ")}),this.inputState=S(()=>(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=S(()=>this.inlineSearch()||this.lazySearch()),this.#r=k(()=>{if(this.selectMultiple()&&this.hasSearch())return;let e=this.selectedOptions(),t=this.value(),n=e.map(s=>t?this.#s(s,t):s).join(",");this.inputValue.set(n)})}#e;#i;#t;#n(e,t){if(!t)return 0;let n=0,s=-1,r=0,a=!0;for(let l=0;l<t.length;l++){let c=t[l];if(e.length>s+1&&e[s+1]===c)n+=l===0?100:150,s++,r++;else{let d=e.indexOf(c,s+1);if(l>0&&(a=!1),d===-1)return 0;n+=100,s=d,r++}}return a&&t.length===r&&(n+=1e3),n+=r*20,n}#o;#r;ngOnInit(){this.setInitInput()}setInitInput(){let e=this.#e.nativeElement.querySelector("input");if(e){this.inputRefInput.set(new I(e));return}let t=this.#e.nativeElement.querySelector("textarea");if(t){this.inputRefInput.set(new I(t));return}typeof MutationObserver<"u"&&this.#t.observe(this.#e.nativeElement,{attributes:!0,childList:!0,subtree:!0,characterData:!0})}setSelectedOptionsFromValue(e){let t=this.options()||[],n=this.value(),s=this.selectMultiple(),r=e.toString().split(",");if(r.length===0){this.selectedOptions.set([]);return}let a=s?r:[r[0]],l=t.filter(c=>{let d=n?this.#s(c,n)?.toString():c?.toString();return d&&a.includes(d)});this.selectedOptions.set(s?l:[l[0]])}setInputValueFromOptions(e){let t=this.value();if(e.length===0){this.inputValue.set(""),this.updateInputElValue();return}let n=e.map(s=>t?this.#s(s,t):s).join(",");n!==this.inputValue()&&(this.inputValue.set(n),this.updateInputElValue())}getValue(e){let t=this.value();return t?this.#s(e,t):e}getLabel(e){let t=this.label();return t?this.#s(e,t):e}getLabelAsSlug(e){let t=this.getLabel(e);return!t||typeof t!="string"?"":t.replaceAll(" ","-")}toggleOptionByIndex(e,t,n=!1){let s=this.filteredOptions()[e];if(this.asFreeText()&&e===-1){let _=this.computedFreeTextOption(),V=this.getValue(_);if(!(this.validateFreeText()??(ee=>!0))(V))return;this.options.update(ee=>ee.findIndex(St=>this.getValue(St)===V)>-1?ee:(this.onAddNewFreeTextOption.emit(V),[_,...ee])),e=0,s=_}else if(!s){this.close();return}t&&t.stopPropagation();let r=this.selectMultiple(),a=this._isClearable(),l=this.value(),c=this.selectedOptionValues(),d=l?this.#s(s,l):s;this.prevInputValue.set(null),this.#i.set(null),this.selectedOptions.update(_=>{let V=c.indexOf(d);if(V>-1){let B=[..._.slice(0,V),..._.slice(V+1)];return a||B.length>0?B:_}else return this.focusedOptionIndex.set(e),r?[..._,s]:[s]}),r?this.inputRefEl()?.focus():this.isOpen.set(!1),this.setInputValueFromOptions(this.selectedOptions()),r&&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],s=t?this.#s(n,t):n;return this.selectedOptionValues().indexOf(s)>-1}open(){this.isOpen()||(this.isOpen.set(!0),this.hasSearch()?(this.prevInputValue.set(this.inputValue()??""),this.inputValue.set(""),this.updateInputElValue()):this.#i.set(this.selectedOptions()),this.selectMultiple()||this.#a())}#a(){let e=this.selectedOptionValues()[0],t=this.value();if(e){let n=this.filteredOptions().findIndex(s=>t?this.#s(s,t)===e:s===e);this.focusedOptionIndex.set(n)}else this.focusedOptionIndex.set(-1)}close(){this.isOpen.set(!1);let e=this.prevInputValue(),t=this.#i();if(this.asFreeText()){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.inputValue.set(""),this.selectedOptions.set([]),this.isOpen.set(!1),this.prevInputValue.set(null),this.cleared.emit(),this.updateInputElValue()}updateInputElValue(){let e=this.inputRefEl(),t=this.inputValue();e&&(e.value=t,e.dispatchEvent(new Event("input")))}#s(e,t){return t.split(".").reduce((n,s)=>n?.[s],e)}#l(e){Object.defineProperty(e,"value",{configurable:!0,get(){return Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),"value").get.call(this)},set(t){Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),"value").set.call(this,t);let s=new CustomEvent("inputValueChanged",{bubbles:!0,cancelable:!0,detail:{value:t}});return this.dispatchEvent(s),t}})}#c(e){let t=(e??"").toLowerCase(),n="^";for(let s of t)n+=".*"+this.#d(s);return n+=".*$",new RegExp(n,"i")}#d(e){return e.replace(/[-\/\\^$+?.()|[\]{}]/g,"\\$&")}ngOnDestroy(){this.openAbortController&&(this.openAbortController.abort(),this.openAbortController=null),typeof MutationObserver<"u"&&this.#t.disconnect()}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["sh-select"]],contentQueries:function(t,n,s){t&1&&wt(s,n.inlineTemplate,it,5),t&2&&ie()},viewQuery:function(t,n){t&1&&ue(n.optionsWrapRef,Fo,5),t&2&&ie()},hostVars:2,hostBindings:function(t,n){t&2&&N("multiple",n.selectMultiple())},inputs:{value:[1,"value"],label:[1,"label"],asFreeText:[1,"asFreeText"],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:ko,decls:33,vars:25,consts:[["formFieldWrapper",""],["optionsWrap",""],[3,"isOpenChange","closed","isOpen","disableOpenByClick","options"],["trigger","",3,"click"],["ngProjectAs","input",5,["input"],1,"input"],[1,"selected-value"],["suffix",""],["suffix","",1,"primary"],["id","optionsWrapId","role","listbox",1,"ship-options"],["title",""],[1,"option",3,"id","selected","focused"],[1,"small",3,"class"],[1,"small",3,"click"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[4,"ngTemplateOutlet"],["suffix","",3,"click"],[1,"option",3,"click","id"],[3,"class","active"]],template:function(t,n){if(t&1){let s=z();T(Po),ot(0)(1)(2)(3)(4)(5)(6),h(7,"sh-popover",2,0),$e("isOpenChange",function(a){return w(s),ze(n.isOpen,a)||(n.isOpen=a),x(a)}),E("closed",function(){return w(s),x(n.close())}),h(9,"sh-form-field",3),E("click",function(){return w(s),x(n.open())}),u(10,0,["ngProjectAs","label",5,["label"]]),u(11,1,["ngProjectAs","[prefix]",5,["","prefix",""]]),u(12,2,["ngProjectAs","[boxPrefix]",5,["","boxPrefix",""]]),h(13,"div",4)(14,"div",5),b(15,Lo,1,1)(16,Qo,2,0)(17,es,2,1),u(18,3),u(19,4),g()(),b(20,ts,2,0,"sh-icon",6)(21,is,1,0,"sh-spinner",7)(22,ns,2,0,"sh-icon",6)(23,os,2,0,"sh-icon",6)(24,ss,2,0,"sh-icon",6)(25,rs,2,0,"sh-icon",6)(26,as,2,0,"sh-icon",6),g(),h(27,"div",8,1),b(29,ms,3,3),b(30,vs,2,1,"p",9),Ve(31,Ss,4,8,"li",10,je),g()()}if(t&2){ne(n.placeholderTemplate());let s=n.optionTemplate();p(),ne(n.freeTextOptionTemplate());let r=n.selectedOptionTemplate(),a=n.inlineTemplate();p();let l=ne(n.selectedOptions()),c=n.inputState();p(),ne(r||s||a),p(),ne(s||a),p();let d=ne(!n.asText()&&n.selectMultiple());p();let _=ne(n.isOpen()&&n.hasSearch()&&(d||n.inputValue().length>-1));p(),Ue("isOpen",n.isOpen),Q("disableOpenByClick",!0)("options",st(24,Ro)),p(2),N("stretch",n.stretch())("small",n.small())("readonly",n.readonly()||n.disabled()),p(4),N("show-search-text",_),p(),N("is-selected",c==="selected"),p(),M(n.asFreeText()&&n.inputValue().length>0&&!n.isOpen()?15:l.length>0?16:_?-1:17),p(5),M(c==="closed"?20:c==="loading"?21:c==="open-searching"?22:c==="searching"?23:c==="selected"&&n._isClearable()?24:c==="selected"&&!n._isClearable()?25:26),p(9),M(n.asFreeText()?29:-1),p(),M(n.optionTitle()&&n.filteredOptions().length>0?30:-1),p(),Te(n.filteredOptions())}},dependencies:[pi,Qt,Zt,_e,zs,tr,$s,Qs],encapsulation:2,changeDetection:0})}}return i})();function ir(i){let o=y(I),e=y(he),t=v(!1),n=typeof MutationObserver<"u"&&new MutationObserver(s=>{s.forEach(r=>{r.type==="attributes"&&r.attributeName==="class"&&t.set(o.nativeElement.classList.contains(i))})});return si(o.nativeElement,()=>{n&&n.observe(o.nativeElement,{attributes:!0}),t.set(o.nativeElement.classList.contains(i))}),e.onDestroy(()=>{n&&n.disconnect()}),t}var ua=(()=>{class i{constructor(){this.#e=y(Oe),this.#i=y(I),this.openWidth=280,this.openWidthTreshold=this.openWidth*.5,this.disableDrag=m(!1),this.isOpen=H(!1),this.isOverlay=ir("overlay"),this.#t=this.#i.nativeElement.parentElement,this.#n=this.#t.getBoundingClientRect&&this.#t.getBoundingClientRect(),this.dragImageElement=J.required("dragImageElement"),this.dragIsEnding=v(!1),this.dragIsOnScreen=v(!0),this.isDragging=v(!1),this.dragPositionX=v(0),this.dragActualPositionX=S(()=>{let e=this.dragPositionX(),t=280,n=100,s=.008,r=t/2,a=r-n/2,l=r+n/2;if(e>l){let c=e-l,_=(t-l)*(1-Math.exp(-s*c));return l+_}else if(e<a){let c=a-e,_=a*(1-Math.exp(-s*c));return a-_}return e}),this.draggingStyle=S(()=>!this.isOverlay()||this.disableDrag()?null:this.isDragging()?`translateX(${this.dragActualPositionX()}px)`:this.isOpen()?`translateX(${this.openWidth}px)`:"translateX(0px)"),this.draggingEffect=k(()=>{this.disableDrag()||(this.isDragging()?this.#e.body.classList.add("dragging"):this.#e.body.classList.remove("dragging"))})}#e;#i;#t;#n;drop(e){e.stopPropagation(),this.#o(e.clientX-this.#n.left)}#o(e){this.isDragging.set(!1),e>=this.openWidthTreshold?this.isOpen.set(!0):this.isOpen.set(!1)}dragEnd(e){e.clientX-this.#n.left<0&&this.#o(0),e.clientX-this.#n.left>this.openWidthTreshold&&this.#o(this.openWidthTreshold)}dragEnter(){this.dragIsOnScreen.set(!0)}dragLeave(){this.dragIsOnScreen.set(!1)}dragStart(e){e.stopPropagation(),this.#n=this.#t.getBoundingClientRect(),this.isDragging.set(!0)}drag(e){e.stopPropagation(),this.isDragging()&&(e.clientX!==0||e.clientY!==0)&&this.dragPositionX.set(e.clientX-this.#n.left)}touchStart(e){e.stopPropagation(),this.isDragging.set(!0),this.#n=this.#t.getBoundingClientRect(),this.dragPositionX.set(0)}touchMove(e){e.stopPropagation(),this.isDragging()&&this.dragPositionX.set(e.touches[0].clientX-this.#n.left)}touchEnd(e){e.stopPropagation(),this.#o(e.changedTouches[0].clientX-this.#n.left)}touchCancel(e){e.stopPropagation(),this.isDragging.set(!1)}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["sh-sidenav"]],viewQuery:function(t,n){t&1&&ue(n.dragImageElement,bs,5),t&2&&ie()},hostVars:6,hostBindings:function(t,n){t&2&&N("open",n.isOpen())("closed",!n.isOpen())("is-dragging",n.isDragging())},inputs:{disableDrag:[1,"disableDrag"],isOpen:[1,"isOpen"]},outputs:{isOpen:"isOpenChange"},ngContentSelectors:Es,decls:10,vars:5,consts:[["dragImageElement",""],[1,"drag-image"],[1,"dropping-surface"],[1,"sidenav"],[1,"main-wrap"],["draggable","true",1,"dragable"],[1,"closed-topbar"],[1,"dropping-surface",3,"drop","dragenter","dragleave"],["draggable","true",1,"dragable",3,"dragstart","dragend","drag","touchstart","touchmove","touchend","touchcancel"]],template:function(t,n){t&1&&(T(Ms),b(0,ws,2,0,"div",1),b(1,xs,1,0,"div",2),A(2,"div",3),u(3),F(),A(4,"div",4),b(5,Os,1,0,"div",5),A(6,"div",6),u(7,1),F(),A(8,"main"),u(9,2),F()()),t&2&&(M(n.isOverlay()&&!n.disableDrag()?0:-1),p(),M(n.isOverlay()&&n.isDragging()?1:-1),p(3),G("transform",!n.disableDrag()&&n.draggingStyle()),p(),M(n.isOverlay()&&!n.disableDrag()?5:-1))},encapsulation:2,changeDetection:0})}}return i})();var ha=(()=>{class i{static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["sh-stepper"]],ngContentSelectors:Y,decls:1,vars:0,template:function(t,n){t&1&&(T(),u(0))},encapsulation:2,changeDetection:0})}}return i})();var pa=(()=>{class i{constructor(){this.#e=y(nr),this.shSort=m(),this.sortAsc=S(()=>{let e=this.#e.sortByColumn(),t=this.shSort();return!e||!t?!1:e===t}),this.sortDesc=S(()=>{let e=this.#e.sortByColumn(),t=this.shSort();return!e||!t?!1:e===`-${t}`})}#e;toggleSort(){let e=this.shSort();e&&this.#e.toggleSort(e)}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275dir=R({type:i,selectors:[["","shSort",""]],hostAttrs:[1,"sortable"],hostVars:4,hostBindings:function(t,n){t&1&&E("mousedown",function(){return n.toggleSort()}),t&2&&N("sort-asc",n.sortAsc())("sort-desc",n.sortDesc())},inputs:{shSort:[1,"shSort"]}})}}return i})();var ke=1.5,nr=(()=>{class i{constructor(){this.#e=y(I),this.#i=y(yt,{optional:!0}),this.loading=m(!1),this.data=m([]),this.dataChange=se(),this.sortByColumn=H(null),this.currentClass=Re(),this.thead=J("thead"),this.tbody=J("tbody"),this.columns=qi(this.thead,["tr:first-child th"]),this.stickyHeaderHeight=S(()=>{let e=this.currentClass();return this.thead()?.nativeElement?.clientHeight??0}),this.bodyEffect=k(()=>{let e=this.tbody()?.nativeElement,t=this.thead()?.nativeElement;if(!e||!t)return;let n=this.stickyHeaderHeight();queueMicrotask(()=>{let s=t.querySelectorAll("tr.sticky").length>0,r=e.querySelectorAll("tr.sticky");if(r.length>0&&s)for(let l=0;l<r.length;l++)r[l].style.top=`${n}px`})}),this.class=v(this.#i?.tableType??"default"),this.resizing=v(!1),this.sizeTrigger=v(!0),this.#t=null,this.#n=v(!1),this.scrollXState=v(-1),this.scrollYState=v(-1),this.canScrollX=v(!1),this.canScrollY=v(!1),this.columnSizes=S(()=>{this.sizeTrigger();let e=this.columns.signal();return e.reduce((t,n,s)=>{let r=n,a=r.getAttribute("size"),l=s===e.length-1;return a?`${t} ${a}`:r.classList.contains("sticky")||r.classList.contains("sticky-end")?`${t} min-content`:l?`${t} 1fr`:`${t} 1fr`},"")}),this.e=k(()=>{let e=this.sortByColumn();if(e===null)return this.#n()||(this.#t=this.data(),this.#n.set(!0)),this.dataChange.emit(structuredClone(this.#t));let t=e.startsWith("-")?e.slice(1):e,n=e.startsWith("-"),s=this.data().sort((r,a)=>{let l=r[t],c=a[t],d=0;return typeof l=="number"&&typeof c=="number"&&(d=l-c),l instanceof Date&&c instanceof Date&&(d=l.getTime()-c.getTime()),typeof l=="string"&&typeof c=="string"&&(d=l.localeCompare(c,void 0,{sensitivity:"base"})),n?-d:d});this.dataChange.emit(s)})}#e;#i;#t;#n;updateColumnSizes(){this.sizeTrigger.set(!this.sizeTrigger())}onScroll(){this.#o()}onResize(e){this.#o()}ngAfterViewInit(){queueMicrotask(()=>this.#o())}toggleSort(e){let t=this.sortByColumn(),n=t===e?`-${e}`:t===`-${e}`?null:e;this.sortByColumn.set(n)}#o(){let e=this.#e.nativeElement,t=-1,n=-1,s=e.scrollWidth>e.clientWidth+ke;if(s){let a=e.scrollLeft<=ke;e.scrollWidth-(e.scrollLeft+e.clientWidth)<ke?t=1:a||(t=0)}this.scrollXState.set(t),this.canScrollX.set(s);let r=e.scrollHeight>e.clientHeight+ke;if(r){let a=e.scrollTop<=ke;e.scrollHeight-(e.scrollTop+e.clientHeight)<ke?n=1:a||(n=0)}this.scrollYState.set(n),this.canScrollY.set(r)}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["sh-table"]],viewQuery:function(t,n){t&1&&ue(n.thead,Vs,5)(n.tbody,Ts,5),t&2&&ie(2)},hostVars:18,hostBindings:function(t,n){t&1&&E("scroll",function(){return n.onScroll()})("resize",function(r){return n.onResize(r)},ai),t&2&&(Z(n.class()),G("grid-template-columns",n.columnSizes()),N("resizing",n.resizing())("can-scroll-x",n.canScrollX())("can-scroll-y",n.canScrollY())("scrolled-x",n.scrollXState()>=0)("scrolled-x-end",n.scrollXState()===1)("scrolled-y",n.scrollYState()>=0)("scrolled-y-end",n.scrollYState()===1))},inputs:{loading:[1,"loading"],data:[1,"data"],sortByColumn:[1,"sortByColumn"]},outputs:{dataChange:"dataChange",sortByColumn:"sortByColumnChange"},ngContentSelectors:As,decls:9,vars:2,consts:[["thead",""],["tbody",""],[1,"indeterminate","primary"],[1,"no-rows"]],template:function(t,n){t&1&&(T(Ns),b(0,Is,1,0,"sh-progress-bar",2),h(1,"thead",null,0),u(3),u(4,1),g(),h(5,"tbody",null,1),u(7,2),g(),b(8,Fs,2,0,"div",3)),t&2&&(M(n.loading()?0:-1),p(8),M(n.loading()?-1:8))},dependencies:[er],encapsulation:2,changeDetection:0})}}return i})(),fa=(()=>{class i{constructor(){this.id="--"+Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,12)}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["sh-tabs"]],hostVars:2,hostBindings:function(t,n){t&2&&G("--tabs-id",n.id)},ngContentSelectors:Y,decls:1,vars:0,template:function(t,n){t&1&&(T(),u(0))},encapsulation:2,changeDetection:0})}}return i})(),ga=(()=>{class i{constructor(){this.isActive=H(!1),this.disallowToggle=m(!1)}ngOnInit(){this.disallowToggle()&&this.isActive.set(!0)}toggle(){this.isActive.set(!this.isActive())}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["sh-toggle-card"]],hostVars:2,hostBindings:function(t,n){t&2&&N("active",n.isActive())},inputs:{isActive:[1,"isActive"],disallowToggle:[1,"disallowToggle"]},outputs:{isActive:"isActiveChange"},ngContentSelectors:ks,decls:7,vars:1,consts:[[3,"click"],[1,"toggle-icon"],[1,"collapsable"],[1,"content"]],template:function(t,n){t&1&&(T(Ps),h(0,"h3",0),E("click",function(){return n.disallowToggle()||n.toggle()}),u(1,0,null,Rs,1,0),b(3,Ls,2,0,"sh-icon",1),g(),h(4,"div",2)(5,"div",3),u(6,1),g()()),t&2&&(p(3),M(n.disallowToggle()?-1:3))},dependencies:[_e],encapsulation:2,changeDetection:0})}}return i})(),ma=(()=>{class i{static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["sh-toggle"]],ngContentSelectors:Y,decls:3,vars:0,consts:[[1,"box"],[1,"knob"]],template:function(t,n){t&1&&(T(),A(0,"div",0),ye(1,"div",1),F(),u(2))},encapsulation:2,changeDetection:0})}}return i})();var va=(()=>{class i{constructor(){this.filesOver=v(!1),this.filesDropped=se()}onDragOver(e){e.preventDefault(),e.stopPropagation(),this.filesOver.set(!0)}onDragLeave(e){e.preventDefault(),e.stopPropagation(),this.filesOver.set(!1)}ondrop(e){e.preventDefault(),e.stopPropagation(),this.filesOver.set(!1);let t=e.dataTransfer?.files;t&&t.length>0&&this.filesDropped.emit(t)}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275dir=R({type:i,selectors:[["","shDragDrop",""]],hostVars:2,hostBindings:function(t,n){t&1&&E("dragover",function(r){return n.onDragOver(r)})("dragleave",function(r){return n.onDragLeave(r)})("drop",function(r){return n.ondrop(r)}),t&2&&N("filesover",n.filesOver())},outputs:{filesDropped:"filesDropped"}})}}return i})();var or=(()=>{class i{constructor(){this.positionAnchorName=m.required(),this.anchorEl=m.required(),this.isOpen=m(!1),this.#e=y(I),this.#i=y(de),this.#t=null,this.SUPPORTS_ANCHOR=typeof CSS<"u"&&CSS.supports("position-anchor","--abc"),this.isBelow=v(!1),this.openEffect=k(()=>{this.isOpen()?setTimeout(()=>{this.#e.nativeElement.showPopover(),this.calculateTooltipPosition()}):this.#e.nativeElement.hidePopover()}),this.calculateTooltipPosition=()=>{if(!this.anchorEl())return;let e=this.anchorEl().nativeElement.getBoundingClientRect(),t=this.#e.nativeElement,n=t.getBoundingClientRect();if(n.width===0&&n.height===0)return;let s=e.top-n.height<0;if(this.isBelow.set(s),!this.SUPPORTS_ANCHOR){let r=t.getBoundingClientRect(),a=e.top-r.height,l=e.left+e.width/2-r.width/2;s&&(a=e.top+e.height),l+r.width>window?.innerWidth&&(l=e.right-r.width/2),l<0&&(l=-(r.width/2)),this.#i.setStyle(t,"left",`${l}px`),this.#i.setStyle(t,"top",`${a}px`),this.#i.setStyle(t,"position","fixed")}}}#e;#i;#t;ngAfterViewInit(){this.#t=new AbortController;let e={signal:this.#t.signal,capture:!0};window?.addEventListener("scroll",this.calculateTooltipPosition,e),window?.addEventListener("resize",this.calculateTooltipPosition,{signal:this.#t.signal}),setTimeout(()=>this.calculateTooltipPosition())}ngOnDestroy(){this.#t?.abort()}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["ship-tooltip-wrapper"]],hostAttrs:["role","tooltip"],hostVars:5,hostBindings:function(t,n){t&2&&(ge("popover","manual"),G("position-anchor",n.positionAnchorName()),N("below",n.isBelow()))},inputs:{positionAnchorName:[1,"positionAnchorName"],anchorEl:[1,"anchorEl"],isOpen:[1,"isOpen"]},ngContentSelectors:Y,decls:2,vars:0,consts:[[1,"tooltip-content"]],template:function(t,n){t&1&&(T(),A(0,"div",0),u(1),F())},encapsulation:2})}}return i})(),q=null,_a=(()=>{class i{constructor(){this.shTooltip=m.required(),this.#e=y(I),this.#i=y(li),this.#t=y(oi),this.#n=y(de),this.#o=null,this.DEBOUNCE_DELAY=500,this.anchorName=`--${Dt()}`,this.isOpen=v(!1)}#e;#i;#t;#n;#o;onMouseEnter(){q?.component.anchorName!==this.anchorName&&this.cleanupTooltip(),this.cancelCleanupTimer(),queueMicrotask(()=>this.showTooltip())}onMouseLeave(){this.startCleanupTimer()}ngOnDestroy(){this.cancelCleanupTimer(),this.cleanupTooltip()}startCleanupTimer(){this.cancelCleanupTimer(),this.debounceTimer=setTimeout(()=>{this.cleanupTooltip()},this.DEBOUNCE_DELAY)}cancelCleanupTimer(){this.debounceTimer&&(clearTimeout(this.debounceTimer),this.debounceTimer=null)}showTooltip(){if(q?.wrapperComponentRef||!this.shTooltip())return;let e,t=this.shTooltip();if(typeof t=="string")e=[[this.#n.createText(t)]];else if(t instanceof it)this.#o=t.createEmbeddedView({}),this.#o.detectChanges(),e=[this.#o.rootNodes];else return;q={wrapperComponentRef:this.#i.createComponent(or,{environmentInjector:this.#t,projectableNodes:e}),component:this},q.wrapperComponentRef.setInput("positionAnchorName",this.anchorName),q.wrapperComponentRef.setInput("anchorEl",this.#e),q.wrapperComponentRef?.setInput("isOpen",this.isOpen),q.wrapperComponentRef.changeDetectorRef.detectChanges(),q.wrapperComponentRef.location.nativeElement.addEventListener("mouseenter",()=>{this.cancelCleanupTimer()}),q.wrapperComponentRef.location.nativeElement.addEventListener("mouseleave",()=>{this.startCleanupTimer()}),setTimeout(()=>{this.isOpen.set(!0)})}cleanupTooltip(){q?.wrapperComponentRef&&(q.component.cancelCleanupTimer(),q.wrapperComponentRef.destroy(),q.component.isOpen.set(!1),q=null),this.#o&&(this.#o.destroy(),this.#o=null)}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275dir=R({type:i,selectors:[["","shTooltip",""]],hostAttrs:[1,"tooltip"],hostVars:4,hostBindings:function(t,n){t&1&&E("mouseenter",function(){return n.onMouseEnter()})("mouseleave",function(){return n.onMouseLeave()}),t&2&&(G("anchor-name",n.anchorName),N("active",n.isOpen()))},inputs:{shTooltip:[1,"shTooltip"]}})}}return i})();export{ve as a,Qi as b,Mi as c,gi as d,Dr as e,Sr as f,Dn as g,Qe as h,_t as i,Mr as j,wn as k,Vn as l,Nn as m,In as n,ji as o,Rn as p,Bn as q,Er as r,wr as s,xr as t,_e as u,yt as v,Kr as w,Jr as x,Us as y,ea as z,ta as A,ia as B,na as C,zs as D,$s as E,oa as F,Qs as G,Zt as H,sa as I,ra as J,aa as K,er as L,la as M,ca as N,tr as O,da as P,ua as Q,ha as R,pa as S,nr as T,fa as U,ga as V,ma as W,va as X,_a as Y};
package/chunk-KDJCL6HE.js DELETED
@@ -1 +0,0 @@
1
- import{a as ve}from"./chunk-WUL6NS6B.js";import{a as be}from"./chunk-FOQJA6X2.js";import{a as he}from"./chunk-LP4W35DJ.js";import{a as ye}from"./chunk-KETMZS6P.js";import{a as Le}from"./chunk-UE5VHUV6.js";import{b as Me}from"./chunk-NNCQNVQC.js";import{a as Ie}from"./chunk-TELPJYLN.js";import{c as de}from"./chunk-DAODMGAD.js";import{B as I,D as Oe,H as Ne,L as Ae,M as De,O as Pe,P as fe,Y as Re,c as pe,e as Ce,i as ge,k as Ee,s as w,u as V,w as Fe,z as me}from"./chunk-HPNLQHW6.js";import{c as M}from"./chunk-BGTK25UG.js";import{e as Se}from"./chunk-A4LPGPDU.js";import{fa as ue}from"./chunk-OTPG7USH.js";import{$ as F,Ab as _,Bb as S,Cc as H,Dc as Te,E as U,Ec as ce,Ib as A,Mc as G,Pa as r,Pb as d,Qb as p,Qc as x,Rb as g,Sb as se,Tb as ae,Ub as v,Vb as c,W as C,Xb as E,aa as m,cb as D,fc as _e,gc as f,jc as L,la as u,lc as le,mc as re,na as te,oc as y,pc as b,qc as $,sb as O,tb as N,ub as ne,wb as ie,xb as oe,xc as X,yb as P,zb as a}from"./chunk-T2WO6CVD.js";function xe(o,t){if(o&1){let n=A();a(0,"sh-radio",10),c("click",function(){let i=F(n).$implicit,s=E();return m(s.pauseOption.set(i.value))}),L(1),_()}if(o&2){let n=t.$implicit,e=E();f("active",e.pauseOption()===n.value),r(),le(" ",n.label," ")}}var we=[{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 o{#e=C(M);pauseOptions=u(we);closed=x();isSubmitting=u(!1);pauseTransfers=u(!1);pauseOption=u(void 0);submit(){this.isSubmitting.set(!0);let t=this.pauseTransfers()||null,n=this.pauseOption();this.#e.postApiV1ServerstatePause({duration:n,pauseTransfers:t}).pipe(U(()=>this.isSubmitting.set(!1))).subscribe({next:e=>{this.closed.emit()}})}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=D({type:o,selectors:[["app-pause-dialog"]],outputs:{closed:"closed"},decls:17,vars:4,consts:()=>{let t;t=$localize`Pause settings`;let n;n=$localize` Also pause transfers `;let e;e=$localize`If you pause transfers they could time out and cause retries or failures.`;let i;i=$localize`Cancel`;let s;return s=$localize` Update settings `,[t,n,e,i,s,["header",""],["content",""],[1,"radios"],[1,"primary","raised",3,"active"],[1,"check-wrap"],[1,"primary","raised",3,"click"],["type","warning"],["footer",""],["shButton","",3,"click"],["shButton","",1,"raised","primary",3,"click"]]},template:function(n,e){n&1&&(a(0,"header",5)(1,"h3"),g(2,0),_()(),a(3,"div",6)(4,"div",7),ie(5,xe,2,3,"sh-radio",8,ne),_(),a(7,"div",9)(8,"sh-checkbox",10),c("click",function(){return e.pauseTransfers.set(!e.pauseTransfers())}),g(9,1),_(),a(10,"sh-alert",11),g(11,2),_()()(),a(12,"footer",12)(13,"button",13),c("click",function(){return e.closed.emit()}),g(14,3),_(),a(15,"button",14),c("click",function(){return e.submit()}),g(16,4),_()()),n&2&&(r(5),oe(e.pauseOptions()),r(3),f("active",e.pauseTransfers()),r(7),f("loader",e.isSubmitting()))},dependencies:[w,De,Oe,Fe,I],styles:["[_nghost-%COMP%]{--dialog-p: 1.5rem;display:block}h3[_ngcontent-%COMP%]{font:var(--title-30)}.radios[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.check-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:2rem 0 0}"],changeDetection:0})};var $e=()=>["/connect/logon"];function Ve(o,t){o&1&&(d(0,0,1),S(1,"div",9),p())}function ze(o,t){o&1&&(d(0,0,2),S(1,"div",10),p())}function Je(o,t){if(o&1){let n=A();a(0,"div",8),c("click",function(){F(n);let i=E();return m(i.resetAndRetry())}),d(1,0),O(2,Ve,2,0)(3,ze,2,0),p(),_()}if(o&2){let n=E();r(2),N(n.resetting()?2:3)}}function Xe(o,t){o&1&&(a(0,"div",6),d(1,1),S(2,"div",11),p(),_()),o&2&&P("routerLink",X(1,$e))}function He(o,t){o&1&&(a(0,"div",6),d(1,2),S(2,"div",10),p(),_()),o&2&&P("routerLink",X(1,$e))}function Ye(o,t){if(o&1){let n=A();a(0,"div",7),d(1,3),a(2,"sh-icon",12),c("click",function(){F(n);let i=E();return m(i.cancel())}),_(),a(3,"div",13),c("click",function(){F(n);let i=E();return m(i.claim())}),_(),S(4,"div",14),p(),_()}}function Ke(o,t){if(o&1){let n=A();a(0,"div",8),c("click",function(){F(n);let i=E();return m(i.openConsole())}),d(1,4),S(2,"div",15),p(),_()}}var B=class o{#e=C(ye);state=this.#e.state;resetting=u(!1);stateEffect=te(()=>{let t=this.#e.state(),n=this.resetting();t==="registered"&&n&&(this.resetting.set(!1),this.#e.beginRemoteRegistration())});ngOnInit(){this.#e.refreshRemoteControlStatus()}claim(){let t=this.#e.claimUrl();t&&window.open(t,"_blank")}cancel(){this.#e.cancelRemoteRegistration()}resetAndRetry(){this.resetting.set(!0),this.#e.cancelRemoteRegistration()}openConsole(){this.#e.openConsole()}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=D({type:o,selectors:[["app-remote-connectivity-status"]],decls:5,vars:1,consts:()=>{let t;t=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF: Resetting ${"\uFFFD#1:1\uFFFD"}:START_TAG_DIV:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_DIV:${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE: Click to connect ${"\uFFFD#1:2\uFFFD"}:START_TAG_DIV_1:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_DIV:${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,t=v(t);let n;n=$localize` Connecting ${"\uFFFD#2\uFFFD"}:START_TAG_DIV:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_DIV:`;let e;e=$localize` Click to register ${"\uFFFD#2\uFFFD"}:START_TAG_DIV:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_DIV:`;let i;i=$localize`Cancel registration`;let s;s=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:x-circle${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD#3\uFFFD"}:START_TAG_DIV:Click to claim${"[\uFFFD/#3\uFFFD|\uFFFD/#4\uFFFD]"}:CLOSE_TAG_DIV:${"\uFFFD#4\uFFFD"}:START_TAG_DIV_1:${"[\uFFFD/#3\uFFFD|\uFFFD/#4\uFFFD]"}:CLOSE_TAG_DIV:`,s=v(s);let T;return T=$localize` Connected ${"\uFFFD#2\uFFFD"}:START_TAG_DIV:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_DIV:`,[t,n,e,s,T,[1,"connectivity-status"],[1,"connectivity-status",3,"routerLink"],[1,"connectivity-status","claim"],[1,"connectivity-status",3,"click"],[1,"status","blinking"],[1,"status"],[1,"status","warning","blinking"],["shTooltip",i,3,"click"],[1,"claim",3,"click"],[1,"status","success","blinking"],[1,"status","success"]]},template:function(n,e){if(n&1&&O(0,Je,4,1,"div",5)(1,Xe,3,2,"div",6)(2,He,3,2,"div",6)(3,Ye,5,0,"div",7)(4,Ke,3,0,"div",5),n&2){let i=e.state()==="unknown"||e.state()==="inactive"||e.state()==="registeringfaulted",s=e.state()==="registeringfaulted",T=e.state()==="registering",l=e.state()==="registered",R=e.state()==="connected"||e.state()==="disabled"||e.state()==="connecting";N(s?0:T?1:i?2:l?3:R?4:-1)}},dependencies:[Se,V,Re],styles:["[_nghost-%COMP%]{display:flex;align-items:center;padding:0 .75rem}.connectivity-status[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;cursor:pointer}.connectivity-status[_ngcontent-%COMP%]:hover{color:var(--primary-8)}.connectivity-status.claim[_ngcontent-%COMP%]{display:flex;gap:.5rem;cursor:pointer}.connectivity-status.claim[_ngcontent-%COMP%]:hover{color:inherit}.connectivity-status.claim[_ngcontent-%COMP%] .claim[_ngcontent-%COMP%]:hover{color:var(--primary-8)}.connectivity-status.claim[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]:hover{color:var(--error-8)}.status[_ngcontent-%COMP%]{width:.625rem;height:.625rem;border-radius:50%;background-color:var(--base-4)}.status.success[_ngcontent-%COMP%]{background-color:var(--success-8)}.status.warning[_ngcontent-%COMP%]{background-color:var(--warn-8)}.status.blinking[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_blinking 1s infinite}@keyframes _ngcontent-%COMP%_blinking{0%{opacity:.2}50%{opacity:1}to{opacity:.2}}"],changeDetection:0})};var Ge={Byte:"B",KByte:"KB",MByte:"MB",GByte:"GB",TByte:"TB",PByte:"PB"},We=["mbps","gbps"],Be=8,Z=1024,J=Z*1024,q=J*1024,Q=q*1024,ke=Q*1024,je={B:1,KB:Z,MB:J,GB:q,TB:Q,PB:ke},Ze=1e3,j=Ze*1e3,W=j*1e3,qe=[{threshold:ke,unitPrefix:"PByte"},{threshold:Q,unitPrefix:"TByte"},{threshold:q,unitPrefix:"GByte"},{threshold:J,unitPrefix:"MByte"},{threshold:Z,unitPrefix:"KByte"},{threshold:1,unitPrefix:"Byte"}],k=class o{#e=C(M);closed=x();isSubmitting=u(!1);sizeOptions=u([...We]);maxUpload=u(0);maxDownload=u(0);maxUploadUnit=u("mbps");maxDownloadUnit=u("mbps");ngOnInit(){this.init()}convertToBitsPerSecondUnits(t,n){let i=t*(je[n.toUpperCase()]||J)*Be;return i===0?{value:0,unit:"mbps"}:i>=W?{value:parseFloat((i/W).toFixed(2)),unit:"gbps"}:{value:parseFloat((i/j).toFixed(2)),unit:"mbps"}}convertFromBitsPerSecondUnits(t,n){let e=0;switch(n){case"gbps":e=t*W;break;case"mbps":e=t*j;break}let i=e/Be;if(i===0)return{valueForApi:0,unitPrefixForApi:"Byte"};for(let{threshold:s,unitPrefix:T}of qe)if(i>=s)return{valueForApi:Math.round(i/s),unitPrefixForApi:T};return{valueForApi:Math.round(i),unitPrefixForApi:"Byte"}}init(){this.#e.getApiV1Serversettings().subscribe({next:t=>{let n=t?.["max-upload-speed"],e=t?.["max-download-speed"];if(n&&n!==""){let i=n.match(/^(\d+(?:\.\d+)?)([A-Za-z]+)$/);if(i){let s=parseFloat(i[1]),T=i[2],l=this.convertToBitsPerSecondUnits(s,T);this.maxUpload.set(l.value),this.maxUploadUnit.set(l.unit)}else console.warn("Unexpected max-upload-speed format from API:",n),this.resetUpload()}else this.resetUpload();if(e&&e!==""){let i=e.match(/^(\d+(?:\.\d+)?)([A-Za-z]+)$/);if(i){let s=parseFloat(i[1]),T=i[2],l=this.convertToBitsPerSecondUnits(s,T);this.maxDownload.set(l.value),this.maxDownloadUnit.set(l.unit)}else console.warn("Unexpected max-download-speed format from API:",e),this.resetDownload()}else this.resetDownload()},error:t=>{console.error("Failed to get server settings:",t),this.resetDownload(),this.resetUpload()}})}resetDownload(){this.maxDownload.set(0),this.maxDownloadUnit.set("mbps")}resetUpload(){this.maxUpload.set(0),this.maxUploadUnit.set("mbps")}blockDecimalKeys(t){if([".",","].includes(t.key))return t.preventDefault()}cleanupInputAfterPasting(t){t.preventDefault();let n=t.clipboardData?.getData("text/plain");if(!n)return;let e=n.replaceAll(/[\.,]/g,"");t.target.value=e}submit(){this.isSubmitting.set(!0);let t="",n="",e=this.maxUpload()??0,i=this.maxUploadUnit(),s=this.maxDownload()??0,T=this.maxDownloadUnit();if(e>0){let{valueForApi:l,unitPrefixForApi:R}=this.convertFromBitsPerSecondUnits(e,i),h=Ge[R];h?t=`${l}${h}`:console.error(`Invalid unit prefix for API submission (upload): ${R}. Defaulting to empty string.`)}if(s){let{valueForApi:l,unitPrefixForApi:R}=this.convertFromBitsPerSecondUnits(s,T),h=Ge[R];h?n=`${l}${h}`:console.error(`Invalid unit prefix for API submission (download): ${R}. Defaulting to empty string.`)}this.#e.patchApiV1Serversettings({requestBody:{"max-upload-speed":t,"max-download-speed":n}}).pipe(U(()=>this.isSubmitting.set(!1))).subscribe({next:()=>{this.closed.emit(!0)},error:l=>{console.error("Failed to submit throttle settings:",l)}})}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=D({type:o,selectors:[["app-throttle-settings-dialog"]],outputs:{closed:"closed"},decls:26,vars:10,consts:()=>{let t;t=$localize`Throttle network speed`;let n;n=$localize`We will round bits to the nearest byte value.`;let e;e=$localize`Max upload speed`;let i;i=$localize`Max download speed`;let s;s=$localize`Cancel`;let T;return T=$localize` Update settings `,[t,n,e,i,s,T,["content",""],[1,"column"],[1,"field-row"],["type","number",3,"paste","keydown","ngModelChange","ngModel"],[3,"isClearable","options"],["type","text",3,"ngModelChange","ngModel"],["footer",""],["shButton","",3,"click"],["shButton","",1,"raised","primary",3,"click"]]},template:function(n,e){n&1&&(a(0,"header")(1,"h3"),g(2,0),_(),a(3,"p"),g(4,1),_()(),a(5,"div",6)(6,"div",7)(7,"div",8)(8,"label"),g(9,2),_(),a(10,"sh-form-field")(11,"input",9),c("paste",function(s){return e.cleanupInputAfterPasting(s)})("keydown",function(s){return e.blockDecimalKeys(s)}),$("ngModelChange",function(s){return b(e.maxUpload,s)||(e.maxUpload=s),s}),_()(),a(12,"sh-select",10)(13,"input",11),$("ngModelChange",function(s){return b(e.maxUploadUnit,s)||(e.maxUploadUnit=s),s}),_()()(),a(14,"div",8)(15,"label"),g(16,3),_(),a(17,"sh-form-field")(18,"input",9),c("paste",function(s){return e.cleanupInputAfterPasting(s)})("keydown",function(s){return e.blockDecimalKeys(s)}),$("ngModelChange",function(s){return b(e.maxDownload,s)||(e.maxDownload=s),s}),_()(),a(19,"sh-select",10)(20,"input",11),$("ngModelChange",function(s){return b(e.maxDownloadUnit,s)||(e.maxDownloadUnit=s),s}),_()()()()(),a(21,"footer",12)(22,"button",13),c("click",function(){return e.closed.emit(!1)}),g(23,4),_(),a(24,"button",14),c("click",function(){return e.submit()}),g(25,5),_()()),n&2&&(r(11),y("ngModel",e.maxUpload),r(),P("isClearable",!1)("options",e.sizeOptions()),r(),y("ngModel",e.maxUploadUnit),r(5),y("ngModel",e.maxDownload),r(),P("isClearable",!1)("options",e.sizeOptions()),r(),y("ngModel",e.maxDownloadUnit),r(4),f("loader",e.isSubmitting()))},dependencies:[w,pe,Ee,Ce,ge,Ne,fe,I],styles:['[_nghost-%COMP%]{display:block}h3[_ngcontent-%COMP%]{font:var(--title-30)}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;padding:1rem;gap:.5rem;margin-bottom:1rem}.column[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.field-row[_ngcontent-%COMP%]{display:grid;grid-template-areas:"label label" "input select";grid-template-columns:1fr auto;align-items:center;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{grid-area:label}.field-row[_ngcontent-%COMP%] sh-form-field[_ngcontent-%COMP%]{grid-area:input}.field-row[_ngcontent-%COMP%] sh-select[_ngcontent-%COMP%]{grid-area:select}'],changeDetection:0})};function Qe(o,t){if(o&1&&(a(0,"div"),L(1),_(),S(2,"sh-progress-bar",12)),o&2){let n=E();r(),re("",n.statusData().actionText," - ",n.statusData().statusText),r(),P("value",n.statusData().progress*100)}}function et(o,t){if(o&1&&(a(0,"div",8),d(1,1),S(2,"sh-icon"),H(3,"relativeTime"),H(4,"date"),p(),_()),o&2){let n,e=E();r(4),se((n=e.nextBackup().backup)==null||n.Backup==null?null:n.Backup.Name)(Te(3,3,e.nextBackup().time))(ce(4,5,e.nextBackup().time,"shortTime")),ae(1)}}function tt(o,t){o&1&&(a(0,"div",8),g(1,2),_())}function nt(o,t){o&1&&(a(0,"div",9),d(1,3),S(2,"sh-spinner"),p(),_()),o&2&&(r(2),_e("--spinner-size","12px")("--spinner-thickness","2px"))}function it(o,t){o&1&&S(0,"app-remote-connectivity-status")}function ot(o,t){if(o&1){let n=A();a(0,"button",11),c("click",function(){F(n);let i=E(2);return m(i.abort())}),d(1,4),S(2,"sh-icon"),p(),_()}}function st(o,t){if(o&1){let n=A();a(0,"button",11),c("click",function(){F(n);let i=E(2);return m(i.stop())}),d(1,5),S(2,"sh-icon"),p(),_()}}function at(o,t){if(o&1&&O(0,ot,3,0,"button",13)(1,st,3,0,"button",13),o&2){let n=E();N(n.isStopping()?0:1)}}function _t(o,t){o&1&&(d(0,0,1),S(1,"sh-icon"),p())}function lt(o,t){o&1&&(d(0,0,2),S(1,"sh-icon"),p())}var Ue=new Date,ee=class o{#e=C(M);#t=C(ve);#n=C(me);#a=C(he);#i=C(de);#_=C(Ie);#o=C(Me);#l=C(Le);minsAgo=Ue.setMinutes(Ue.getMinutes()-1);statusData=this.#t.statusData;serverState=this.#t.serverState;clientIsRunning=this.#t.clientIsRunning;isResuming=this.#t.isResuming;runningTask=G(()=>this.#o.serverState()?.ActiveTask?.Item1);isStopping=G(()=>this.runningTask()==this.#s());#s=u(-1);pgState=G(()=>this.#o.serverState());isUsingRelay=this.#i.relayIsEnabled;hideConsoleConnectionStatus=this.#l.isConsoleConnectionStatusHidden;nextBackup=G(()=>{let t=this.#a.backups();return{backup:this.serverState()?.ProposedSchedule?.[0]?.backup,time:this.serverState()?.ProposedSchedule?.[0]?.Item2}});openThrottleSettingsDialog(){this.#n.open(k,{maxWidth:"550px",width:"100%"})}openPauseDialog(){this.#n.open(z,{maxWidth:"550px",width:"100%"})}pauseResume(){if(this.clientIsRunning()){this.openPauseDialog();return}this.#t.pauseResume().subscribe()}stop(){let t=this.runningTask();t&&(this.#s.set(t),this.#e.postApiV1TaskByTaskidStop({taskid:t}).subscribe())}abort(){let t=this.runningTask();t&&this.#e.postApiV1TaskByTaskidAbort({taskid:t}).subscribe()}ngAfterViewInit(){let t=this.#i.relayIsEnabled()||!this.#_.hasWebSocket()?"longpoll":"websocket";this.#t.setConnectionMethod(t)}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=D({type:o,selectors:[["app-status-bar"]],decls:16,vars:6,consts:()=>{let t;t=$localize`${"\uFFFD*11:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:pause${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Pause ${"\uFFFD/*11:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*12:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:play${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Resume ${"\uFFFD/*12:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,t=v(t);let n;n=$localize` ${"\uFFFD0\uFFFD"}:INTERPOLATION: - ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:clock${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: ${"\uFFFD1\uFFFD"}:INTERPOLATION_1: at ${"\uFFFD2\uFFFD"}:INTERPOLATION_2: `;let e;e=$localize`No scheduled tasks`;let i;i=$localize` Loading ${"\uFFFD#2\uFFFD"}:START_TAG_SH_SPINNER:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_SPINNER:`;let s;s=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:skull${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Abort `;let T;return T=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:stop${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Stop `,[t,n,e,i,s,T,[1,"current-backup"],[1,"current-backup-progress"],[1,"label"],[1,"label","label-loading"],[1,"current-backup-actions"],["shButton","",3,"click"],[1,"raised","primary",3,"value"],["shButton",""]]},template:function(n,e){if(n&1&&(a(0,"div",6)(1,"div",7),O(2,Qe,3,3)(3,et,5,8,"div",8)(4,tt,2,0,"div",8)(5,nt,3,4,"div",9),_(),a(6,"div",10),O(7,it,1,0,"app-remote-connectivity-status"),O(8,at,2,1),a(9,"button",11),c("click",function(){return e.pauseResume()}),d(10,0),O(11,_t,2,0)(12,lt,2,0),p(),_(),a(13,"button",11),c("click",function(){return e.openThrottleSettingsDialog()}),a(14,"sh-icon"),L(15,"speedometer"),_()()()()),n&2){let i;r(2),N((i=e.serverState())!=null&&i.ActiveTask&&(!((i=e.statusData())==null||i.task==null)&&i.task.Status)&&((i=e.statusData())==null||i.task==null?null:i.task.Status)!=="Completed"?2:e.nextBackup().backup||e.nextBackup().time?3:(i=e.serverState())!=null&&i.ActiveTask?5:4),r(5),N(!e.isUsingRelay()&&!e.hideConsoleConnectionStatus()?7:-1),r(),N(e.runningTask()?8:-1),r(),f("loader",e.isResuming()),r(2),N(e.clientIsRunning()?11:12)}},dependencies:[B,V,I,Pe,Ae,be,ue],styles:["[_nghost-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:1rem;min-height:3.875rem;border-bottom:1px solid var(--base-4);position:sticky;top:0;z-index:2000;background:var(--base-1)}.current-backup[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%;gap:.5rem}.current-backup-progress[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;min-width:18.75rem;flex:1 0}.current-backup-progress[_ngcontent-%COMP%] sh-progress-bar[_ngcontent-%COMP%]{max-width:18.75rem;width:100%}.current-backup-progress[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.current-backup-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}.label-loading[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.25rem}"],changeDetection:0})};export{ee as a};
package/chunk-KEE3H2WJ.js DELETED
@@ -1 +0,0 @@
1
- import{d as a,e as b,f as c,g as d}from"./chunk-ZAFP5TX6.js";import"./chunk-O4OTZE5N.js";import"./chunk-WIVARGP6.js";import"./chunk-MHRECQ5Y.js";import"./chunk-6Q6SSTBK.js";import"./chunk-5DJAX2HH.js";import"./chunk-UE5VHUV6.js";import"./chunk-DW332N2S.js";import"./chunk-NNCQNVQC.js";import"./chunk-TELPJYLN.js";import"./chunk-DAODMGAD.js";import"./chunk-HPNLQHW6.js";import"./chunk-BGTK25UG.js";import"./chunk-A4LPGPDU.js";import"./chunk-PKPBSTZA.js";import"./chunk-QPTSKQZ2.js";import"./chunk-OTPG7USH.js";import"./chunk-TT3S63BX.js";import"./chunk-T2WO6CVD.js";import"./chunk-7CGTOI24.js";export{a as SCHEDULE_DEFAULT_OPTIONS,c as SCHEDULE_FIELD_DEFAULTS,d as default,b as scheduleOptionToSchedule};
package/chunk-KETMZS6P.js DELETED
@@ -1 +0,0 @@
1
- import{a as h}from"./chunk-ME77WZZI.js";import{a as f}from"./chunk-5DJAX2HH.js";import{a as p}from"./chunk-UE5VHUV6.js";import{a as m}from"./chunk-TELPJYLN.js";import{z as g}from"./chunk-HPNLQHW6.js";import{c as u}from"./chunk-BGTK25UG.js";import{Mc as c,R as l,W as s,la as r,na as a}from"./chunk-T2WO6CVD.js";var d=class o{#r=s(h);#o=s(g);#e=s(u);#s=s(m);#n=s(p);repeatRegisterTimer=null;state=r("unknown");claimUrl=r(null);registerUrl=r("");customRegisterUrl=r("");status=c(()=>{let e=this.state();return e==="connecting"?$localize`Console connection is enabled but not connected`:e==="connected"?$localize`Connected to console`:e==="registering"?$localize`Registering machine...`:e==="registeringfaulted"?$localize`Registration failed`:e==="registered"?$localize`Registered, waiting for accept`:e==="disabled"?$localize`Console connection is configured but not enabled`:e==="unknown"?$localize`...loading...`:$localize`Console connection is not set up`});sysInfoEffect=a(()=>{let e=this.#s.systemInfo();e&&this.registerUrl.set(e.RemoteControlRegistrationUrl??"")});#t(e){e.RegistrationUrl&&this.claimUrl.set(e.RegistrationUrl),e.IsConnected?this.state.set("connected"):e.IsEnabled?this.state.set("connecting"):e.CanEnable?this.state.set("disabled"):e.IsRegisteringFaulted?this.state.set("registeringfaulted"):e.IsRegistering?e.RegistrationUrl!=null&&e.RegistrationUrl.trim().length>0?this.state.set("registered"):this.state.set("registering"):this.state.set("inactive");let i=this.state();this.repeatRegisterTimer!==null&&(clearTimeout(this.repeatRegisterTimer),this.repeatRegisterTimer=null),i==="registering"&&(this.repeatRegisterTimer=setTimeout(()=>{this.#e.postApiV1RemotecontrolRegister({requestBody:{RegistrationUrl:""}}).subscribe({next:t=>this.#t(t),error:t=>this.#i(t)})},5e3)),(i==="connecting"||i==="registered")&&(this.repeatRegisterTimer=setTimeout(()=>{this.#e.getApiV1RemotecontrolStatus().subscribe({next:t=>this.#t(t),error:t=>this.#i(t)})},5e3)),e.IsRegistering&&e.CanEnable&&this.#e.deleteApiV1RemotecontrolRegister().subscribe({next:t=>this.#t(t)})}#i(e){this.#e.getApiV1RemotecontrolStatus().subscribe({next:i=>{console.log("next",i),this.#t(i)}})}refreshRemoteControlStatus(){this.#e.getApiV1RemotecontrolStatus().subscribe({next:e=>this.#t(e),error:e=>this.#i(e)})}beginRemoteRegistration(e=!1){this.state.set("registering"),this.#e.postApiV1RemotecontrolRegister({requestBody:{RegistrationUrl:e?this.customRegisterUrl():this.registerUrl()}}).subscribe({next:i=>this.#t(i),error:i=>this.#i(i)})}cancelRemoteRegistration(){this.#e.deleteApiV1RemotecontrolRegister().subscribe({next:e=>this.#t(e),error:e=>this.#i(e)})}enableRemoteControl(){this.#e.postApiV1RemotecontrolEnable().subscribe({next:e=>this.#t(e),error:e=>this.#i(e)})}disableRemoteControl(){this.#e.postApiV1RemotecontrolDisable().subscribe({next:e=>this.#t(e),error:e=>this.#i(e)})}deleteRemoteControl(){let e=this;this.#o.open(f,{data:{title:$localize`Confirm delete`,message:$localize`Are you sure you want to delete the console registration?`,confirmText:$localize`Delete registration`,cancelText:$localize`Cancel`},closed:i=>{i&&e.#e.deleteApiV1RemotecontrolRegistration().subscribe({next:t=>e.#t(t),error:t=>e.#i(t)})}})}openConsole(){let e=this.#n.serverSettings(),i=this.#s.systemInfo(),t="https://app.duplicati.com/app/machines",n=i?.RemoteControlDashboardUrl??"";n.length>0&&(t=n),e&&e["remote-control-dashboard-url"]&&(t=e["remote-control-dashboard-url"]),this.#r.open(t,"_blank")}static \u0275fac=function(i){return new(i||o)};static \u0275prov=l({token:o,factory:o.\u0275fac,providedIn:"root"})};export{d as a};
package/chunk-LSXNHFLE.js DELETED
@@ -1,3 +0,0 @@
1
- import{a as Me}from"./chunk-3SHOBVX6.js";import"./chunk-AS6Z56AD.js";import"./chunk-DGKNUD3G.js";import{a as ge}from"./chunk-KDJCL6HE.js";import{j as F}from"./chunk-ZAFP5TX6.js";import{a as Ee}from"./chunk-O4OTZE5N.js";import"./chunk-WIVARGP6.js";import"./chunk-MHRECQ5Y.js";import{a as Ne}from"./chunk-WUL6NS6B.js";import"./chunk-FOQJA6X2.js";import"./chunk-VHOAXFIJ.js";import"./chunk-LP4W35DJ.js";import"./chunk-6Q6SSTBK.js";import"./chunk-FK7JFD5B.js";import"./chunk-KETMZS6P.js";import"./chunk-ME77WZZI.js";import"./chunk-5DJAX2HH.js";import"./chunk-G4VDCGMW.js";import"./chunk-UE5VHUV6.js";import{b as A}from"./chunk-DW332N2S.js";import"./chunk-NNCQNVQC.js";import"./chunk-TELPJYLN.js";import"./chunk-DAODMGAD.js";import{B as me,G as _e,H as de,L as ce,P as Ce,c as Q,e as Y,f as Z,j as ee,n as te,o as ne,p as oe,q as ie,r as ae,s as re,t as se,u as le}from"./chunk-HPNLQHW6.js";import{b as pe,c as ue}from"./chunk-BGTK25UG.js";import{b as j,d as H,e as q}from"./chunk-A4LPGPDU.js";import"./chunk-PKPBSTZA.js";import"./chunk-QPTSKQZ2.js";import"./chunk-OTPG7USH.js";import"./chunk-TT3S63BX.js";import{$ as E,Ab as n,Bb as r,Fb as S,Gb as T,Ib as y,Pa as m,Pb as f,Qb as O,Rb as c,Sb as v,Tb as U,Vb as x,W as p,Xb as g,aa as M,cb as R,gc as w,la as L,na as D,oc as K,pc as J,qc as X,sb as $,tb as b,ub as B,vc as V,wb as G,wc as z,xb as k,xc as W,yb as u,zb as a}from"./chunk-T2WO6CVD.js";import"./chunk-7CGTOI24.js";var Se=()=>["backup"];function Te(s,t){s&1&&r(0,"sh-progress-bar",11)}function fe(s,t){if(s&1&&(a(0,"sh-form-field"),r(1,"input",30),n()),s&2){let e=t.$implicit,l=t.$index;m(),u("id",V("filter-",l))("formControl",e)}}function Oe(s,t){if(s&1){let e=y();a(0,"form",12)(1,"sh-select",13)(2,"label",14),c(3,1),n(),r(4,"input",15),n(),a(5,"sh-form-field")(6,"label",16),c(7,2),n(),r(8,"textarea",17),n(),a(9,"sh-form-field")(10,"label",18),c(11,3),n(),r(12,"textarea",19),n()(),a(13,"sh-divider"),c(14,4),n(),a(15,"form",12)(16,"sh-form-field")(17,"label",20),c(18,5),n(),r(19,"input",21),n(),a(20,"sh-form-field")(21,"label",22),c(22,6),n(),r(23,"input",23),n(),a(24,"app-toggle-card",24),S(25,25),c(26,7),T(),S(27,26),G(28,fe,2,3,"sh-form-field",null,B),T(),n()(),a(30,"app-options-list",27),X("optionsChange",function(i){E(e);let C=g();return J(C.settings,i)||(C.settings=i),M(i)}),n(),a(31,"div",28)(32,"button",29),x("click",function(){E(e);let i=g();return M(i.submit())}),f(33,8),r(34,"sh-icon"),O(),n()()}if(s&2){let e=g();u("formGroup",e.baseCmdForm),m(),u("options",e.commandOptions()??W(10,Se))("inlineSearch",!0),m(14),u("formGroup",e.standardFields),m(9),u("disallowToggle",!0),m(4),k(e.standardFields.controls.filters.controls),m(2),K("options",e.settings),u("hasFreeTextSettings",!0),m(2),w("loader",e.isSubmitting()),m(2),v(e.baseCmdForm.value.command),U(33)}}var _=new ae,P=class s{#e=p(F);#t=p(ue);#n=p(H);#o=p(j);#i=p(pe);#a=p(Ne);#r=A(this.#o.params);commandOptions=A(this.#i.getApiV1Commandline());isSubmitting=L(!1);optionsFields=this.#e.optionsFields;standardFields=_.group({"backup-id":_.control(""),"backup-name":_.control(""),dbpath:_.control(""),filters:_.array([])});baseCmdForm=_.group({command:_.control("backup"),targetUrl:_.control(""),arguments:_.control("")});finishedLoading=this.#e.finishedLoading;backupId=this.#e.backupId;settings=this.#e.settings;#l=D(()=>{let t=this.#r()?.id;this.#e.backupId.set(t),this.getBackup(t)});getBackup(t){this.#t.getApiV1BackupById({id:t}).subscribe({next:e=>{this.#e.mapScheduleToForm(e.Schedule??null),e.Backup&&(this.#e.mapGeneralToForm(e.Backup),this.mapStandardFieldsToForm(e.Backup),this.mapBaseCmdToForm(e.Backup),this.#e.mapOptionsToForms(e.Backup,!0)),this.#e.finishedLoading.set(!0)}})}mapStandardFieldsToForm(t){this.standardFields.patchValue({dbpath:t.DBPath,"backup-id":t.ID,"backup-name":t.Name}),t.Filters&&t.Filters.length&&t.Filters.map(e=>{this.standardFields.controls.filters.push(_.control(`${e.Include?"":"-"}${e.Expression}`))})}submit(){this.#a.resumeDialogCheck(()=>this.#s())}#s(){this.isSubmitting.set(!0);let t=this.baseCmdForm.value,e=t.targetUrl??"",l=t.arguments?.split(`
2
- `).filter(o=>o.length>0)??[],i=this.standardFields.value,C=i.filters??[],N=[t.command,e,...l,`--backup-name=${i["backup-name"]}`,`--dbpath=${i.dbpath}`,`--backup-id=${i["backup-id"]}`,...C.filter(o=>o).map(o=>o.startsWith("-")?`--exclude=${o?.slice(1)}`:`--include=${o}`),...this.#e.mapFormsToSettings(["backup-id","backup-name","dbpath"]).map(o=>`${o.Name.startsWith("--")?"":"--"}${o.Name}=${o.Value}`),"--disable-module=console-password-input"];this.#t.postApiV1Commandline({requestBody:N}).subscribe(o=>{o.Status==="OK"&&this.#n.navigate(["backup",this.backupId(),"commandline",o.ID])})}mapBaseCmdToForm(t){let e=t.TargetURL??null;e&&this.baseCmdForm.patchValue({targetUrl:e??"",arguments:t.Sources?.join(`
3
- `)??""})}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=R({type:s,selectors:[["app-commandline"]],features:[z([F])],decls:8,vars:1,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let e;e=$localize`Command`;let l;l=$localize`TargetUrl`;let i;i=$localize`Commandline Arguments`;let C;C=$localize`Advanced options`;let N;N=$localize`Backup ID`;let o;o=$localize`Backup Name`;let I;I=$localize`Filters`;let h;return h=$localize`${"\uFFFD#34\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#34\uFFFD"}:CLOSE_TAG_SH_ICON: Run "${"\uFFFD0\uFFFD"}:INTERPOLATION:" command now `,[t,e,l,i,C,N,o,I,h,[1,"back"],["type","button","shButton","","routerLink","/",1,"small"],[1,"indeterminate","primary"],[3,"formGroup"],["placeholder","Select a command...",3,"options","inlineSearch"],["for","command"],["type","text","id","command","formControlName","command"],["for","targetUrl"],["id","targetUrl","autocomplete","off","formControlName","targetUrl"],["for","arguments"],["id","arguments","autocomplete","off","formControlName","arguments"],["for","backup-id"],["id","backup-id","formControlName","backup-id"],["for","backup-name"],["id","backup-name","formControlName","backup-name"],[3,"disallowToggle"],["title",""],["content","","formGroupName","filters"],[3,"optionsChange","options","hasFreeTextSettings"],[1,"form-actions"],["shButton","",1,"raised","primary",3,"click"],[3,"id","formControl"]]},template:function(e,l){e&1&&(r(0,"app-status-bar"),a(1,"section")(2,"div",9)(3,"button",10),f(4,0),r(5,"sh-icon"),O(),n()(),$(6,Te,1,0,"sh-progress-bar",11)(7,Oe,35,11),n()),e&2&&(m(6),b(l.finishedLoading()?7:6))},dependencies:[re,ee,Q,Y,Z,ge,Me,Ee,se,te,ie,oe,ne,q,de,me,_e,Ce,ce,le],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;max-width:40rem;padding:2.5rem;gap:1.25rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}"],changeDetection:0})};export{P as default};