homebridge-config-ui-x 5.11.2-beta.8 → 5.11.2

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 (249) hide show
  1. package/CHANGELOG.md +3 -21
  2. package/dist/core/auth/auth.controller.d.ts +0 -4
  3. package/dist/core/config/config.interfaces.d.ts +0 -14
  4. package/dist/core/config/config.service.d.ts +0 -6
  5. package/dist/core/config/config.service.js +0 -8
  6. package/dist/core/config/config.service.js.map +1 -1
  7. package/dist/core/config/config.startup.js +17 -48
  8. package/dist/core/config/config.startup.js.map +1 -1
  9. package/dist/core/feature-flags/feature-flags.registry.js +0 -5
  10. package/dist/core/feature-flags/feature-flags.registry.js.map +1 -1
  11. package/dist/core/homebridge-ipc/homebridge-ipc.service.js +0 -1
  12. package/dist/core/homebridge-ipc/homebridge-ipc.service.js.map +1 -1
  13. package/dist/core/spa/spa.filter.d.ts +0 -3
  14. package/dist/core/spa/spa.filter.js +2 -22
  15. package/dist/core/spa/spa.filter.js.map +1 -1
  16. package/dist/globalDefaults.js +0 -3
  17. package/dist/globalDefaults.js.map +1 -1
  18. package/dist/main.js +4 -18
  19. package/dist/main.js.map +1 -1
  20. package/dist/modules/accessories/accessories.controller.d.ts +1 -1
  21. package/dist/modules/accessories/accessories.module.js +0 -2
  22. package/dist/modules/accessories/accessories.module.js.map +1 -1
  23. package/dist/modules/accessories/accessories.service.d.ts +3 -21
  24. package/dist/modules/accessories/accessories.service.js +17 -280
  25. package/dist/modules/accessories/accessories.service.js.map +1 -1
  26. package/dist/modules/child-bridges/child-bridges.interfaces.d.ts +0 -9
  27. package/dist/modules/config-editor/config-editor.controller.d.ts +0 -4
  28. package/dist/modules/config-editor/config-editor.controller.js +0 -64
  29. package/dist/modules/config-editor/config-editor.controller.js.map +1 -1
  30. package/dist/modules/config-editor/config-editor.service.d.ts +1 -6
  31. package/dist/modules/config-editor/config-editor.service.js +1 -45
  32. package/dist/modules/config-editor/config-editor.service.js.map +1 -1
  33. package/dist/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui.service.js +1 -1
  34. package/dist/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui.service.js.map +1 -1
  35. package/dist/modules/plugins/plugins.module.js +1 -1
  36. package/dist/modules/plugins/plugins.service.js +2 -17
  37. package/dist/modules/plugins/plugins.service.js.map +1 -1
  38. package/dist/modules/server/server.controller.d.ts +0 -50
  39. package/dist/modules/server/server.controller.js +2 -201
  40. package/dist/modules/server/server.controller.js.map +1 -1
  41. package/dist/modules/server/server.service.d.ts +0 -48
  42. package/dist/modules/server/server.service.js +14 -502
  43. package/dist/modules/server/server.service.js.map +1 -1
  44. package/dist/modules/status/status.gateway.d.ts +0 -2
  45. package/dist/modules/status/status.interfaces.d.ts +0 -11
  46. package/dist/modules/status/status.service.d.ts +1 -4
  47. package/dist/modules/status/status.service.js +2 -21
  48. package/dist/modules/status/status.service.js.map +1 -1
  49. package/package.json +7 -9
  50. package/public/3rdpartylicenses.txt +620 -594
  51. package/public/assets/plugin-ui-utils/ui.js +0 -3
  52. package/public/assets/plugin-ui-utils/ui.js.map +1 -1
  53. package/public/chunk-2BB4D4TW.js +1 -0
  54. package/public/chunk-2GCZ3AMH.js +1 -0
  55. package/public/chunk-2K5FWBCK.js +8 -0
  56. package/public/chunk-2LQBMVWH.js +1 -0
  57. package/public/chunk-34ZN4GVA.js +3 -0
  58. package/public/chunk-3JW6FD5V.js +1 -0
  59. package/public/chunk-57XTQ6PK.js +1 -0
  60. package/public/chunk-5DBV5PYR.js +19 -0
  61. package/public/chunk-5GKTPXPE.js +1 -0
  62. package/public/chunk-5X7ARCKG.js +5 -0
  63. package/public/chunk-67HOYJJ2.js +1 -0
  64. package/public/chunk-6MZHUZRT.js +4 -0
  65. package/public/chunk-77CMUO6J.js +1 -0
  66. package/public/chunk-7LJYL7EH.js +1 -0
  67. package/public/chunk-7TFBELRD.js +1 -0
  68. package/public/chunk-AXOHPUQR.js +1 -0
  69. package/public/chunk-BMAZBLAT.js +1 -0
  70. package/public/chunk-C554TVZA.js +2 -0
  71. package/public/chunk-DGDNSN6I.js +1 -0
  72. package/public/chunk-E6RSPO2D.js +1 -0
  73. package/public/chunk-ESQ665GW.js +5 -0
  74. package/public/chunk-G4QH622U.js +5 -0
  75. package/public/chunk-GKPR5M7S.js +1 -0
  76. package/public/chunk-GT7UMMFF.js +2 -0
  77. package/public/chunk-HBIQJCSE.js +1 -0
  78. package/public/{chunk-BMOLDRJ3.js → chunk-JLZ5WU6N.js} +1 -1
  79. package/public/chunk-JSZIAFBJ.js +1 -0
  80. package/public/chunk-JWQRV434.js +1 -0
  81. package/public/chunk-JX72JCMA.js +1 -0
  82. package/public/chunk-KT26K4DO.js +1 -0
  83. package/public/chunk-L63FND3A.js +1 -0
  84. package/public/chunk-LSXTHVKB.js +1 -0
  85. package/public/chunk-N5VXONVW.js +1 -0
  86. package/public/{chunk-H7F7H5MW.js → chunk-N6JGA2PG.js} +1 -1
  87. package/public/chunk-NVCJ3EJS.js +1 -0
  88. package/public/chunk-OPJZWDSO.js +1 -0
  89. package/public/chunk-OXBXHVWY.js +8 -0
  90. package/public/chunk-QHROK73U.js +50 -0
  91. package/public/chunk-QNEXPAIT.js +1 -0
  92. package/public/chunk-R2G2YWV4.js +51 -0
  93. package/public/chunk-RCNF365Q.js +1 -0
  94. package/public/chunk-RT6EDRIH.js +1 -0
  95. package/public/chunk-RWM6K46M.js +1 -0
  96. package/public/chunk-SVVR6UMH.js +1 -0
  97. package/public/chunk-UI4U37MO.js +1 -0
  98. package/public/chunk-ULKYNDD3.js +16 -0
  99. package/public/chunk-UPZ5UT6G.js +1 -0
  100. package/public/chunk-UQFIBBEZ.js +1 -0
  101. package/public/chunk-UWUTC3BD.js +1 -0
  102. package/public/chunk-UZ6QYM64.js +1 -0
  103. package/public/{chunk-CP6FP6S2.js → chunk-VKHX6FUQ.js} +2 -52
  104. package/public/chunk-VM2MV3DC.js +1 -0
  105. package/public/chunk-VM6FMRHY.js +1 -0
  106. package/public/chunk-VYK3U745.js +1 -0
  107. package/public/chunk-VZJJWHRX.js +1 -0
  108. package/public/chunk-WHC4E7WY.js +1 -0
  109. package/public/chunk-WJKVPIP2.js +1 -0
  110. package/public/chunk-WOBQOQPU.js +1 -0
  111. package/public/chunk-WTGHGHPV.js +1 -0
  112. package/public/chunk-WY6UQ47H.js +1 -0
  113. package/public/chunk-X4ZEQSRY.js +4 -0
  114. package/public/{chunk-WVG4A2SW.js → chunk-XVO5247V.js} +1 -1
  115. package/public/chunk-XWNU2MFJ.js +1 -0
  116. package/public/chunk-YD3GJ2C6.js +1 -0
  117. package/public/chunk-YUEGV7HK.js +4 -0
  118. package/public/chunk-ZLRFR32W.js +1 -0
  119. package/public/chunk-ZZ5IX26U.js +40 -0
  120. package/public/chunk-ZZQEWRDE.js +1 -0
  121. package/public/index.html +2 -2
  122. package/public/main-VKVUZHHA.js +1 -0
  123. package/public/polyfills-5KWHJ7II.js +2 -0
  124. package/public/styles-7EFV5QBG.css +1 -0
  125. package/scripts/extract-plugin-alias.js +2 -53
  126. package/dist/core/spa/spa-html.service.d.ts +0 -5
  127. package/dist/core/spa/spa-html.service.js +0 -32
  128. package/dist/core/spa/spa-html.service.js.map +0 -1
  129. package/dist/core/ssl/ssl-cert-generator.service.d.ts +0 -15
  130. package/dist/core/ssl/ssl-cert-generator.service.js +0 -125
  131. package/dist/core/ssl/ssl-cert-generator.service.js.map +0 -1
  132. package/dist/modules/accessories/accessories.interfaces.d.ts +0 -94
  133. package/dist/modules/accessories/accessories.interfaces.js +0 -2
  134. package/dist/modules/accessories/accessories.interfaces.js.map +0 -1
  135. package/docs/matter-todo.md +0 -15
  136. package/docs/ssl-upload-pr.md +0 -103
  137. package/public/assets/matter.svg +0 -8
  138. package/public/chunk-2V4LIZUH.js +0 -1
  139. package/public/chunk-4UVYLGCZ.js +0 -1
  140. package/public/chunk-4WEBTV3N.js +0 -1
  141. package/public/chunk-4YNYBAGL.js +0 -1
  142. package/public/chunk-52X3LPJH.js +0 -1
  143. package/public/chunk-5R6AJZGA.js +0 -1
  144. package/public/chunk-5WSUQV2C.js +0 -1
  145. package/public/chunk-6DLZEENG.js +0 -1
  146. package/public/chunk-6INJQUJQ.js +0 -16
  147. package/public/chunk-6QWPGE2L.js +0 -1
  148. package/public/chunk-77S5CL3V.js +0 -1
  149. package/public/chunk-7BMHIIBT.js +0 -1
  150. package/public/chunk-7DFQDPRM.js +0 -1
  151. package/public/chunk-7WKZ7EMI.js +0 -1
  152. package/public/chunk-7WUBDTA6.js +0 -1
  153. package/public/chunk-AXMO2G45.js +0 -1
  154. package/public/chunk-B46EWHBD.js +0 -1
  155. package/public/chunk-B4AJQJMI.js +0 -1
  156. package/public/chunk-B75B723G.js +0 -1
  157. package/public/chunk-BB35SJH2.js +0 -2
  158. package/public/chunk-BFGRDXJK.js +0 -35
  159. package/public/chunk-BQRKHSGH.js +0 -1
  160. package/public/chunk-BXRCPOIK.js +0 -1
  161. package/public/chunk-BZ3XB6O4.js +0 -1
  162. package/public/chunk-CEMVTOZG.js +0 -4
  163. package/public/chunk-CMERG3AC.js +0 -1
  164. package/public/chunk-CMO4UANJ.js +0 -1
  165. package/public/chunk-CPT52C2F.js +0 -1
  166. package/public/chunk-D3Q5QTFY.js +0 -1
  167. package/public/chunk-ETWBSGPI.js +0 -1
  168. package/public/chunk-EWS4VSZB.js +0 -1
  169. package/public/chunk-F5AJLGGI.js +0 -1
  170. package/public/chunk-G2GGYHA2.js +0 -3
  171. package/public/chunk-G2KWTNHR.js +0 -1
  172. package/public/chunk-GDWF2NMA.js +0 -2
  173. package/public/chunk-GGTS2YBW.js +0 -4
  174. package/public/chunk-GJG6QZ7P.js +0 -1
  175. package/public/chunk-GU5F3H4I.js +0 -1
  176. package/public/chunk-H3BKW5W3.js +0 -1
  177. package/public/chunk-H4WASUXW.js +0 -1
  178. package/public/chunk-HUTYOGRH.js +0 -4
  179. package/public/chunk-IBUR2RIO.js +0 -1
  180. package/public/chunk-IDJSTIFL.js +0 -1
  181. package/public/chunk-IP6FLYVL.js +0 -1
  182. package/public/chunk-IPI77WYV.js +0 -1
  183. package/public/chunk-J2DDS6ED.js +0 -1
  184. package/public/chunk-J6ND4K5Q.js +0 -1
  185. package/public/chunk-J7UDRE66.js +0 -2
  186. package/public/chunk-JUQRWAIR.js +0 -1
  187. package/public/chunk-JWGWPSC6.js +0 -1
  188. package/public/chunk-JWRZMMRO.js +0 -68
  189. package/public/chunk-JWUEJV6S.js +0 -1
  190. package/public/chunk-JY5ZEEL2.js +0 -1
  191. package/public/chunk-KFPYUDGJ.js +0 -1
  192. package/public/chunk-KIRW7NMH.js +0 -1
  193. package/public/chunk-KTQBVBY4.js +0 -1
  194. package/public/chunk-LKJRMUOE.js +0 -1
  195. package/public/chunk-LVQWSVHA.js +0 -1
  196. package/public/chunk-LZ7S7WKH.js +0 -1
  197. package/public/chunk-MDHWQ5V2.js +0 -8
  198. package/public/chunk-MJP4XVUI.js +0 -1
  199. package/public/chunk-N5ONV6TU.js +0 -1
  200. package/public/chunk-N7UWTPTT.js +0 -1
  201. package/public/chunk-NAICVRJH.js +0 -1
  202. package/public/chunk-NCFDA3W4.js +0 -1
  203. package/public/chunk-NIS65GVY.js +0 -1
  204. package/public/chunk-OBV66CW4.js +0 -1
  205. package/public/chunk-OF2SRCQW.js +0 -5
  206. package/public/chunk-OOILCTQ3.js +0 -19
  207. package/public/chunk-PAZUAFSZ.js +0 -1
  208. package/public/chunk-PEUDPLH6.js +0 -1
  209. package/public/chunk-PRGOUVRO.js +0 -1
  210. package/public/chunk-PWCLNQBI.js +0 -1
  211. package/public/chunk-Q7EXN4JA.js +0 -1
  212. package/public/chunk-QE7VI3JB.js +0 -1
  213. package/public/chunk-QES44GQE.js +0 -1
  214. package/public/chunk-QMWN5KPC.js +0 -1
  215. package/public/chunk-R6MQZ2DW.js +0 -1
  216. package/public/chunk-RESZLSD7.js +0 -1
  217. package/public/chunk-RGWFM4OK.js +0 -1
  218. package/public/chunk-RI4GLH22.js +0 -1
  219. package/public/chunk-RP5JPYDI.js +0 -1
  220. package/public/chunk-RT25QBCQ.js +0 -1
  221. package/public/chunk-RVWZNTDJ.js +0 -1
  222. package/public/chunk-RXDY2NMJ.js +0 -1
  223. package/public/chunk-SDRRZFEQ.js +0 -1
  224. package/public/chunk-SPC2DLZR.js +0 -3
  225. package/public/chunk-TCUQZ3QO.js +0 -1
  226. package/public/chunk-TPUA4UIN.js +0 -1
  227. package/public/chunk-TQBVDY26.js +0 -1
  228. package/public/chunk-U24HWDVU.js +0 -1
  229. package/public/chunk-U2NM4L2D.js +0 -1
  230. package/public/chunk-UWYTPKKV.js +0 -1
  231. package/public/chunk-VKR3GG6K.js +0 -1
  232. package/public/chunk-VY7HWBNV.js +0 -5
  233. package/public/chunk-W55SP3LJ.js +0 -1
  234. package/public/chunk-WP3AD6W5.js +0 -1
  235. package/public/chunk-XNZA4UBO.js +0 -12
  236. package/public/chunk-XOPZ7U6G.js +0 -1
  237. package/public/chunk-XORPUWNC.js +0 -1
  238. package/public/chunk-XPFMPBEG.js +0 -1
  239. package/public/chunk-XTYMIZVV.js +0 -1
  240. package/public/chunk-Y3PXWRYQ.js +0 -1
  241. package/public/chunk-Y5WP66WK.js +0 -1
  242. package/public/chunk-YCQCWGBG.js +0 -1
  243. package/public/chunk-Z5PUNNUZ.js +0 -1
  244. package/public/chunk-ZCGZM7LU.js +0 -1
  245. package/public/chunk-ZNN6GWYK.js +0 -19
  246. package/public/main-O5PA2XOA.js +0 -1
  247. package/public/media/matter-P563JGDL.svg +0 -8
  248. package/public/polyfills-34U4WL3Z.js +0 -1
  249. package/public/styles-CT2LPGES.css +0 -1
@@ -0,0 +1 @@
1
+ import{A,C as G,D as Q,c as $,d as C,e as B,f as O,g as T,j as w,m as q,q as z,r as D,y as H}from"./chunk-JWQRV434.js";import{b as K}from"./chunk-NVCJ3EJS.js";import{e as U}from"./chunk-2BB4D4TW.js";import{b as J}from"./chunk-HBIQJCSE.js";import{l as j,p as W}from"./chunk-JX72JCMA.js";import{$b as h,Cc as b,Ec as L,La as x,Lb as E,Nb as M,P as I,Pc as N,Qa as i,Sc as V,Ub as v,Vb as F,_b as g,ac as R,ad as P,db as k,h as y,lc as f,na as p,qb as u,rb as c,rc as l,sc as d,wb as m,x as S,xb as r,yb as a,zb as s}from"./chunk-G4QH622U.js";var Y=["password"],Z=["username"],ee=["otp"],te=e=>({background:e}),ie=e=>({anim:e}),X=e=>({"is-invalid":e});function ne(e,_){if(e&1&&(r(0,"div",8)(1,"span",12),s(2,"i",13),a(),s(3,"input",14,0),l(5,"translate"),a(),r(6,"div",8)(7,"span",12),s(8,"i",15),a(),s(9,"input",16,1),l(11,"translate"),a()),e&2){let n=M();i(3),m("placeholder",d(5,4,"users.label_username"))("ngClass",f(8,X,n.form.controls.username.dirty&&n.form.controls.username.errors)),i(6),m("placeholder",d(11,6,"users.label_password"))("ngClass",f(10,X,n.form.controls.password.dirty&&n.form.controls.password.errors))}}function oe(e,_){e&1&&(r(0,"div",8)(1,"span",12),s(2,"i",17),a(),s(3,"input",18,2),l(5,"translate"),a()),e&2&&(i(3),m("placeholder",d(5,1,"login.label_2fa_code")))}function ae(e,_){e&1&&(r(0,"div",9)(1,"div",12),s(2,"i",19),a(),r(3,"div",20)(4,"div",21),g(5),l(6,"translate"),a(),s(7,"div",22),l(8,"translate"),a()()),e&2&&(i(5),h(d(6,2,"login.invalid_credentials")),i(2),m("innerHTML",d(8,4,"login.invalid_credentials_2"),x))}function re(e,_){e&1&&(r(0,"div",9)(1,"div",12),s(2,"i",19),a(),r(3,"div",20)(4,"div",21),g(5),l(6,"translate"),a(),s(7,"div",22),l(8,"translate"),a()()),e&2&&(i(5),h(d(6,2,"login.invalid_code")),i(2),m("innerHTML",d(8,4,"login.invalid_credentials_2"),x))}var _e=(()=>{class e{$auth=p(K);$cdr=p(L);$router=p(U);$settings=p(J);targetRoute;validNonAdminRoutes=["/accessories","/plugins","/logs","/support"];passwordInput=b("password");usernameInput=b("username");otpInput=b("otp");backgroundStyle;invalidCredentials=!1;invalid2faCode=!1;twoFactorCodeRequired=!1;inProgress=!1;form;ngOnInit(){this.form=new T({username:new w(""),password:new w("")}),this.form.valueChanges.pipe(I(500)).subscribe(n=>{let o=this.passwordInput()?.nativeElement.value;o&&o!==n.password&&this.form.controls.password.setValue(o)}),this.targetRoute=window.sessionStorage.getItem("target_route")||"",this.setBackground()}ngAfterViewChecked(){this.$cdr.detectChanges()}onSubmit(){return y(this,null,function*(){this.invalidCredentials=!1,this.invalid2faCode=!1,this.inProgress=!0,document.getElementById("submit-button")?.blur();let n=this.passwordInput()?.nativeElement.value;n&&n!==this.form.get("password").value&&this.form.controls.password.setValue(n);let o=this.usernameInput()?.nativeElement.value;if(o&&o!==this.form.get("username").value&&this.form.controls.username.setValue(o),this.twoFactorCodeRequired){let t=this.otpInput()?.nativeElement.value;t&&t!==this.form.get("otp").value&&this.form.controls.username.setValue(t)}try{yield this.$auth.login(this.form.getRawValue()),!this.$auth.user.admin&&!this.validNonAdminRoutes.includes(this.targetRoute)&&(this.targetRoute="/"),this.$router.navigateByUrl(this.targetRoute),window.sessionStorage.removeItem("target_route")}catch(t){t.status===412?(this.form.controls.otp?(this.form.controls.otp.setErrors(["Invalid Code"]),this.invalid2faCode=!0):this.form.addControl("otp",new w("",[C.required,C.minLength(6),C.maxLength(6)])),this.twoFactorCodeRequired=!0,setTimeout(()=>{document.getElementById("form-ota").focus()},100)):this.invalidCredentials=!0}this.inProgress=!1})}setBackground(){return y(this,null,function*(){if(this.$settings.settingsLoaded||(yield S(this.$settings.onSettingsLoaded)),this.$settings.env.customWallpaperHash){let n=`${W.api.base}/auth/wallpaper/${this.$settings.env.customWallpaperHash}`;this.backgroundStyle=`url('${n}') center/cover`}})}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=k({type:e,selectors:[["ng-component"]],viewQuery:function(o,t){o&1&&(v(t.passwordInput,Y,5),v(t.usernameInput,Z,5),v(t.otpInput,ee,5)),o&2&&F(3)},decls:15,vars:18,consts:[["username",""],["password",""],["otp",""],[1,"login-container","gradient","d-flex","align-items-start","justify-content-center",3,"ngStyle","ngClass"],[1,"w-100","login-card","d-flex","py-4","flex-column"],["ngSrc","assets/homebridge-color-round.svg","alt","Homebridge Logo","height","100","width","100","priority","true",1,"homebridge-logo","mx-auto","my-3"],["novalidate","",3,"ngSubmit","formGroup"],[1,"mb-4","text-center"],[1,"input-group","mb-4"],[1,"input-group","no-border","mb-4"],[1,"text-center"],["tabindex","3","id","submit-button","type","submit",1,"btn","btn-primary","mb-2",3,"disabled"],[1,"input-group-text","custom-input"],[1,"fas","fa-user","primary-text","fa-lg"],["formControlName","username","type","text","id","form-username","autofocus","","autocomplete","username","autocapitalize","none","tabindex","1","required","",1,"form-control","custom-input",3,"placeholder","ngClass"],[1,"fas","fa-lock","primary-text","fa-lg"],["formControlName","password","type","password","id","form-pass","autocomplete","current-password","tabindex","2","required","",1,"form-control","custom-input",3,"placeholder","ngClass"],[1,"fas","fa-key","primary-text","fa-lg"],["formControlName","otp","type","text","id","form-ota","autofocus","","autocomplete","one-time-code","autocapitalize","none","inputmode","numeric","pattern","[0-9]*","tabindex","1",1,"form-control","custom-input",3,"placeholder"],[1,"fas","fa-exclamation-triangle","pink-text","fa-lg"],[1,"form-control","custom-input"],[1,"small","grey-text","fw-semibold"],[1,"small","grey-text",3,"innerHTML"]],template:function(o,t){o&1&&(r(0,"div",3)(1,"div",4),s(2,"img",5),r(3,"form",6),E("ngSubmit",function(){return t.onSubmit()}),r(4,"h4",7),g(5),l(6,"translate"),a(),u(7,ne,12,12),u(8,oe,6,3,"div",8),u(9,ae,9,6,"div",9),u(10,re,9,6,"div",9),r(11,"div",10)(12,"button",11),g(13),l(14,"translate"),a()()()()()),o&2&&(m("ngStyle",f(14,te,t.backgroundStyle))("ngClass",f(16,ie,!t.backgroundStyle)),i(3),m("formGroup",t.form),i(2),h(d(6,10,"setup.welcome_to_homebridge")),i(2),c(t.twoFactorCodeRequired?-1:7),i(),c(t.twoFactorCodeRequired?8:-1),i(),c(t.invalidCredentials?9:-1),i(),c(t.invalid2faCode?10:-1),i(2),m("disabled",t.form.invalid),i(),R(" ",d(14,12,"form.button_continue")," "))},dependencies:[V,G,q,$,B,O,H,A,Q,z,D,N,P,j],styles:["body{overflow:scroll!important} body.dark-mode .login-card{background-color:#2b2b2b;color:#fff}.login-container[_ngcontent-%COMP%]{z-index:-1;padding-top:2em;padding-bottom:2em;min-height:100%;background-size:300% 300%}.anim[_ngcontent-%COMP%]{-webkit-animation:_ngcontent-%COMP%_gradient 20s ease infinite;-moz-animation:gradient 20s ease infinite;-o-animation:gradient 20s ease infinite;animation:_ngcontent-%COMP%_gradient 20s ease infinite}@keyframes _ngcontent-%COMP%_gradient{0%{background-position:0 50%}50%{background-position:100% 50%}to{background-position:0 50%}}.login-card[_ngcontent-%COMP%]{max-width:550px;border-radius:1rem;padding-right:25px;padding-left:25px;background-color:#ffffffe6}.login-card[_ngcontent-%COMP%] .form-control[_ngcontent-%COMP%]:focus{background-color:inherit!important}@media screen and (max-width: 575px){.login-card[_ngcontent-%COMP%]{margin-left:1em;margin-right:1em}}.homebridge-logo[_ngcontent-%COMP%]{margin-bottom:10px}"]})}return e})();export{_e as LoginComponent};
@@ -0,0 +1,2 @@
1
+ import{C as Y,D as Z,c as G,d as k,e as j,f as D,g as K,j as $,m as A,q as J,r as Q,y as X}from"./chunk-JWQRV434.js";import{a as ae}from"./chunk-2GCZ3AMH.js";import{b as oe}from"./chunk-NVCJ3EJS.js";import{b as re}from"./chunk-HBIQJCSE.js";import{k as ee,l as te,n as ie,p as U,q as ne}from"./chunk-JX72JCMA.js";import{$b as _,Ib as I,La as W,Lb as x,Nb as g,Pc as H,Qa as n,Sc as N,Xb as O,_b as l,ac as f,ad as R,db as V,h as S,kc as L,lc as B,mc as E,md as q,na as w,pb as M,qb as z,rb as T,rc as a,sa as C,sc as s,ta as b,wb as m,x as h,xb as o,yb as r,zb as u}from"./chunk-G4QH622U.js";var pe=t=>({background:t}),de=t=>({anim:t}),ce=t=>({"progress-bar-animated":t}),me=()=>["restoring","restarting","restore-complete"],P=(t,d)=>({"is-valid":t,"is-invalid":d});function ue(t,d){if(t&1){let e=I();o(0,"div",5)(1,"h4",6),l(2),a(3,"translate"),r(),u(4,"div",7),a(5,"translate"),o(6,"button",8),x("click",function(){C(e);let i=g();return b(i.onClickGettingStarted())}),l(7),a(8,"translate"),r(),o(9,"a",9),x("click",function(){C(e);let i=g();return b(i.onClickRestoreBackup())}),l(10),a(11,"translate"),r()()}t&2&&(n(2),_(s(3,4,"setup.welcome_to_homebridge")),n(2),m("innerHTML",s(5,6,"setup.intro"),W),n(3),f(" ",s(8,8,"setup.button_get_started")," "),n(3),_(s(11,10,"setup_wizard_restore")))}function ge(t,d){if(t&1){let e=I();o(0,"div",5)(1,"h4",6),l(2),a(3,"translate"),r(),o(4,"div",10),l(5),a(6,"translate"),r(),o(7,"div",11)(8,"form",12),x("ngSubmit",function(){C(e);let i=g();return b(i.createFirstUser())}),o(9,"div",13)(10,"span",14),u(11,"i",15),r(),u(12,"input",16),a(13,"translate"),r(),o(14,"div",13)(15,"span",14),u(16,"i",17),r(),u(17,"input",18),a(18,"translate"),r(),o(19,"div",13)(20,"span",14),u(21,"i",17),r(),u(22,"input",19),a(23,"translate"),r(),o(24,"div",20)(25,"button",21),x("click",function(){C(e);let i=g();return b(i.onClickCancelRestore())}),l(26),a(27,"translate"),r(),o(28,"button",22),l(29),a(30,"translate"),r()()()()()}if(t&2){let e=g();n(2),_(s(3,16,"setup.create_account")),n(3),_(s(6,18,"setup_wizard_create_info")),n(3),m("formGroup",e.createUserForm),n(4),m("readonly",e.loading)("ngClass",E(30,P,e.createUserForm.controls.username.dirty&&e.createUserForm.controls.username.valid,e.createUserForm.controls.username.dirty&&e.createUserForm.controls.username.invalid))("placeholder",s(13,20,"users.label_username")),n(5),m("readonly",e.loading)("ngClass",E(33,P,e.createUserForm.controls.password.dirty&&e.createUserForm.controls.password.valid,e.createUserForm.controls.password.dirty&&e.createUserForm.controls.password.errors))("placeholder",s(18,22,"users.label_password")),n(5),m("readonly",e.loading)("ngClass",E(36,P,e.createUserForm.controls.passwordConfirm.dirty&&e.createUserForm.controls.passwordConfirm.valid,e.createUserForm.controls.passwordConfirm.dirty&&e.createUserForm.controls.passwordConfirm.errors))("placeholder",s(23,24,"users.label_confirm_password")),n(3),m("disabled",e.restoreUploading),n(),f(" ",s(27,26,"form.button_back")," "),n(2),m("disabled",e.createUserForm.invalid||e.loading),n(),f(" ",s(30,28,"form.button_continue")," ")}}function _e(t,d){t&1&&(u(0,"i",25),l(1),a(2,"translate")),t&2&&(n(),f(" ",s(2,1,"backup.label_uploading")," "))}function fe(t,d){t&1&&(l(0),a(1,"translate")),t&2&&f(" ",s(1,1,"form.button_continue")," ")}function he(t,d){if(t&1){let e=I();o(0,"div",5)(1,"h4",6),l(2),a(3,"translate"),r(),o(4,"div",10),l(5),a(6,"translate"),r(),o(7,"input",23),x("change",function(i){C(e);let F=g();return b(F.handleRestoreFileInput(i.target.files))}),r(),o(8,"div",20)(9,"button",21),x("click",function(){C(e);let i=g();return b(i.onClickCancelRestore())}),l(10),a(11,"translate"),r(),o(12,"button",24),x("click",function(){C(e);let i=g();return b(i.onRestoreBackupClick())}),z(13,_e,3,3)(14,fe,2,3),r()()()}if(t&2){let e=g();n(2),_(s(3,6,"setup_wizard_restore")),n(3),_(s(6,8,"backup.restore_help_one")),n(4),m("disabled",e.restoreUploading),n(),f(" ",s(11,10,"form.button_back")," "),n(2),m("disabled",e.restoreUploading||!e.selectedFile),n(),T(e.restoreUploading?13:14)}}function we(t,d){t&1&&(l(0),a(1,"translate")),t&2&&f(" ",s(1,1,"setup_wizard_restoring")," ")}function Ce(t,d){t&1&&(l(0),a(1,"translate")),t&2&&f(" ",s(1,1,"setup_wizard_starting")," ")}function be(t,d){t&1&&(l(0),a(1,"translate")),t&2&&f(" ",s(1,1,"setup_wizard_complete")," ")}function xe(t,d){t&1&&(o(0,"a",27),l(1),a(2,"translate"),r()),t&2&&(n(),_(s(2,1,"form.button_continue")))}function ve(t,d){if(t&1&&(o(0,"div",5)(1,"h4",6),z(2,we,2,3)(3,Ce,2,3)(4,be,2,3),r(),u(5,"div",26),z(6,xe,3,3,"a",27),r()),t&2){let e=g();n(2),T(e.step==="restoring"?2:e.step==="restarting"?3:e.step==="restore-complete"?4:-1),n(4),T(e.step==="restore-complete"?6:-1)}}function ye(t,d){t&1&&(o(0,"div",5)(1,"h4",28),l(2),a(3,"translate"),r(),o(4,"div",10),l(5),a(6,"translate"),r(),o(7,"a",29),l(8),a(9,"translate"),r()()),t&2&&(n(2),_(s(3,3,"setup_wizard_complete_title")),n(3),_(s(6,5,"setup_wizard_completed")),n(3),_(s(9,7,"form.button_continue")))}var He=(()=>{class t{$api=w(ne);$auth=w(oe);$settings=w(re);$title=w(q);$toastr=w(ie);$translate=w(ee);$ws=w(ae);io;step="welcome";backgroundStyle;progress=1;restoreInProgress=!1;restoreStarted=!1;restoreFailed=!1;loading=!1;selectedFile;restoreUploading=!1;createUserForm=new K({username:new $("",[k.required]),password:new $("",[k.compose([k.required,k.minLength(4)])]),passwordConfirm:new $("",[k.required])},this.matchPassword);ngOnInit(){return S(this,null,function*(){this.$title.setTitle(this.$translate.instant("setup_wizard_page_title")),yield this.setBackground()})}onClickGettingStarted(){this.step="create-account",this.progress=50}onClickRestoreBackup(){this.step="restore-backup",this.progress=20}onClickCancelRestore(){this.selectedFile=null,this.step="welcome",this.progress=1}createFirstUser(){return S(this,null,function*(){this.loading=!0,this.progress=75;let e=this.createUserForm.getRawValue();e.name=e.username;try{yield h(this.$api.post("/setup-wizard/create-first-user",e)),this.$settings.env.setupWizardComplete=!0,this.progress=100,this.loading=!1,yield this.$auth.login({username:e.username,password:e.password}),this.step="setup-complete"}catch(p){this.loading=!1,this.progress=50,console.error(p),this.$toastr.error(p.message,this.$translate.instant("toast.title_error"))}})}handleRestoreFileInput(e){e.length?(this.selectedFile=e[0],this.progress=40):(delete this.selectedFile,this.progress=20)}onRestoreBackupClick(){return S(this,null,function*(){this.restoreUploading=!0,this.step="restoring",this.progress=60;try{let e=yield h(this.$api.get("/setup-wizard/get-setup-wizard-token"));window.localStorage.setItem(U.jwt.tokenKey,e.access_token),this.$auth.token=e.access_token,this.progress=65;let p=new FormData;p.append("restoreArchive",this.selectedFile,this.selectedFile.name),yield h(this.$api.post("/backup/restore",p)),this.progress=70,this.io=this.$ws.connectToNamespace("backup");let i=document.getElementById("output");this.io.socket.on("stdout",c=>{c.split(`
2
+ \r`).forEach(v=>{if(v&&!/^[⠇⠏⠋⠙⠹⠸]+$/.test(v)){let y=document.createElement("div"),le=/\x1B\[(\d{1,2}(;\d{1,2})?)?[mGK]/g;y.innerHTML=v.replace(le,""),v.includes("[0;31m")?y.classList.add("red-text"):v.includes("[0;32m")?y.classList.add("green-text"):v.includes("[0;33m")?y.classList.add("orange-text"):v.includes("[0;36m")&&y.classList.add("cyan-text"),i.appendChild(y),i.scrollTop=i.scrollHeight}})}),this.restoreStarted=!0,this.restoreInProgress=!0,this.progress=75,yield h(this.io.request("do-restore")),this.progress=80,this.restoreInProgress=!1,yield h(this.$api.put("/backup/restart",{})),this.step="restarting",this.progress=85,window.localStorage.removeItem(U.jwt.tokenKey),this.$auth.token=null;let F=document.createElement("div");F.classList.add("orange-text"),F.innerHTML="Starting Homebridge, please wait...",i.appendChild(F),i.scrollTop=i.scrollHeight,yield new Promise(c=>setTimeout(c,3e3)),this.progress=88,yield new Promise(c=>setTimeout(c,3e3)),this.progress=91,yield new Promise(c=>setTimeout(c,3e3)),this.progress=94,yield new Promise(c=>setTimeout(c,3e3)),this.progress=97,yield new Promise(c=>setTimeout(c,3e3)),this.progress=99;let se=setInterval(()=>S(this,null,function*(){try{yield h(this.$api.get("/auth/settings")),clearInterval(se),this.progress=100,this.restoreUploading=!1,this.step="restore-complete"}catch{}}),1e3)}catch(e){console.error(e),this.restoreUploading=!1,this.restoreFailed=!0,this.progress=20,this.step="restore-backup",this.$toastr.error(e.message,this.$translate.instant("toast.title_error"))}finally{this.io&&this.io.end()}})}setBackground(){return S(this,null,function*(){if(this.$settings.settingsLoaded||(yield h(this.$settings.onSettingsLoaded)),this.$settings.env.customWallpaperHash){let e=`${U.api.base}/auth/wallpaper/${this.$settings.env.customWallpaperHash}`;this.backgroundStyle=`url('${e}') center/cover`}})}matchPassword(e){let p=e.get("password").value,i=e.get("passwordConfirm").value;if(p!==i)e.get("passwordConfirm").setErrors({matchPassword:!0});else return null}static \u0275fac=function(p){return new(p||t)};static \u0275cmp=V({type:t,selectors:[["ng-component"]],decls:10,vars:14,consts:[[1,"setup-container","gradient","d-flex","align-items-start","justify-content-center",3,"ngStyle","ngClass"],[1,"w-100","setup-card","d-flex","py-4","flex-column"],["ngSrc","assets/homebridge-color-round.svg","alt","Homebridge Logo","height","100","width","100","priority","true",1,"homebridge-logo","mx-auto","my-3"],[1,"progress","w-100","my-4"],["role","progressbar","aria-valuemin","0","aria-valuemax","100",1,"progress-bar","progress-bar-striped","bg-success",3,"ngClass"],[1,"w-100","d-flex","flex-column","align-items-center","mb-2"],[1,"mb-3","text-center"],[1,"mb-4","small","grey-text","text-center",3,"innerHTML"],["type","button",1,"btn","btn-lg","btn-primary","mb-4",3,"click"],["href","javascript:void(0)",1,"grey-text",3,"click"],[1,"mb-4","small","grey-text","text-center"],[1,"w-100"],["novalidate","",3,"ngSubmit","formGroup"],[1,"input-group","mb-4"],[1,"input-group-text","custom-input"],[1,"fas","fa-user","primary-text","fa-lg"],["formControlName","username","type","text","id","form-username","autocomplete","username","autocapitalize","none","tabindex","1","required","",1,"form-control","custom-input",3,"readonly","ngClass","placeholder"],[1,"fas","fa-lock","primary-text","fa-lg"],["formControlName","password","type","password","id","form-pass","autocomplete","new-password","tabindex","2","required","",1,"form-control","custom-input",3,"readonly","ngClass","placeholder"],["formControlName","passwordConfirm","type","password","id","form-pass-confirm","autocomplete","new-password","tabindex","2","required","",1,"form-control","custom-input",3,"readonly","ngClass","placeholder"],[1,"mt-3","w-100","d-flex","justify-content-between"],["type","button",1,"btn","btn-elegant","ms-0",3,"click","disabled"],["type","submit",1,"btn","btn-primary",3,"disabled"],["type","file","id","restoreFileUpload","accept","application/gzip, .gz",1,"form-control","custom-input","mb-3",3,"change"],["type","button",1,"btn","btn-primary","me-0",3,"click","disabled"],[1,"fas","fa-spinner","fa-pulse"],["id","output",1,"font-monospace","small","alert","alert-info","w-100","text-start","mt-1","mb-0"],["href","/login",1,"btn","btn-lg","btn-primary","mt-4"],[1,"mb-3"],["href","/",1,"btn","btn-lg","btn-primary"]],template:function(p,i){p&1&&(o(0,"div",0)(1,"div",1),u(2,"img",2),o(3,"div",3),u(4,"div",4),r(),z(5,ue,12,12,"div",5)(6,ge,31,39,"div",5)(7,he,15,12,"div",5)(8,ve,7,2,"div",5)(9,ye,10,9,"div",5),r()()),p&2&&(m("ngStyle",B(7,pe,i.backgroundStyle))("ngClass",B(9,de,!i.backgroundStyle)),n(4),O("width",i.progress+"%"),m("ngClass",B(11,ce,i.loading||i.restoreUploading)),M("aria-valuenow",i.progress),n(),T(i.step==="welcome"?5:i.step==="create-account"?6:i.step==="restore-backup"?7:L(13,me).includes(i.step)?8:i.step==="setup-complete"?9:-1))},dependencies:[H,R,Y,A,G,j,D,X,Z,J,Q,N,te],styles:["body{overflow:scroll!important} body.dark-mode .setup-card{background-color:#2b2b2b;color:#fff}.setup-container[_ngcontent-%COMP%]{z-index:-1;padding-top:2em;padding-bottom:2em;min-height:100%;background-size:300% 300%}.anim[_ngcontent-%COMP%]{-webkit-animation:_ngcontent-%COMP%_gradient 20s ease infinite;-moz-animation:gradient 20s ease infinite;-o-animation:gradient 20s ease infinite;animation:_ngcontent-%COMP%_gradient 20s ease infinite}@keyframes _ngcontent-%COMP%_gradient{0%{background-position:0 50%}50%{background-position:100% 50%}to{background-position:0 50%}}.setup-card[_ngcontent-%COMP%]{max-width:550px;border-radius:1rem;padding-right:25px;padding-left:25px;background-color:#ffffffe6}.setup-card[_ngcontent-%COMP%] .form-control[_ngcontent-%COMP%]:focus{background-color:inherit!important}@media screen and (max-width: 575px){.setup-card[_ngcontent-%COMP%]{margin-left:1em;margin-right:1em}}.homebridge-logo[_ngcontent-%COMP%]{margin-bottom:10px}.progress[_ngcontent-%COMP%]{background-color:#ddd}#output[_ngcontent-%COMP%]{height:200px;overflow-y:scroll;white-space:pre-wrap}"]})}return t})();export{He as SetupWizardComponent};
@@ -0,0 +1 @@
1
+ import{k as tt,n as et,q as it}from"./chunk-JX72JCMA.js";import{W as R,e as ut,g as ct,h as P,ia as G,md as X,n as Q,na as Y,x as B}from"./chunk-G4QH622U.js";var st=ut((U,E)=>{(function(w,k){typeof U=="object"&&typeof E<"u"?E.exports=k():typeof define=="function"&&define.amd?define(k):(w=typeof globalThis<"u"?globalThis:w||self).dayjs=k()})(U,function(){"use strict";var w=1e3,k=6e4,s=36e5,h="millisecond",d="second",m="minute",M="hour",y="day",f="week",b="month",K="quarter",S="year",_="date",q="Invalid Date",nt=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,rt=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,ot={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(r){var i=["th","st","nd","rd"],t=r%100;return"["+r+(i[(t-20)%10]||i[t]||i[0])+"]"}},F=function(r,i,t){var n=String(r);return!n||n.length>=i?r:""+Array(i+1-n.length).join(t)+r},at={s:F,z:function(r){var i=-r.utcOffset(),t=Math.abs(i),n=Math.floor(t/60),e=t%60;return(i<=0?"+":"-")+F(n,2,"0")+":"+F(e,2,"0")},m:function r(i,t){if(i.date()<t.date())return-r(t,i);var n=12*(t.year()-i.year())+(t.month()-i.month()),e=i.clone().add(n,b),o=t-e<0,a=i.clone().add(n+(o?-1:1),b);return+(-(n+(t-e)/(o?e-a:a-e))||0)},a:function(r){return r<0?Math.ceil(r)||0:Math.floor(r)},p:function(r){return{M:b,y:S,w:f,d:y,D:_,h:M,m,s:d,ms:h,Q:K}[r]||String(r||"").toLowerCase().replace(/s$/,"")},u:function(r){return r===void 0}},I="en",D={};D[I]=ot;var Z="$isDayjsObject",N=function(r){return r instanceof V||!(!r||!r[Z])},C=function r(i,t,n){var e;if(!i)return I;if(typeof i=="string"){var o=i.toLowerCase();D[o]&&(e=o),t&&(D[o]=t,e=o);var a=i.split("-");if(!e&&a.length>1)return r(a[0])}else{var c=i.name;D[c]=i,e=c}return!n&&e&&(I=e),e||!n&&I},g=function(r,i){if(N(r))return r.clone();var t=typeof i=="object"?i:{};return t.date=r,t.args=arguments,new V(t)},u=at;u.l=C,u.i=N,u.w=function(r,i){return g(r,{locale:i.$L,utc:i.$u,x:i.$x,$offset:i.$offset})};var V=(function(){function r(t){this.$L=C(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[Z]=!0}var i=r.prototype;return i.parse=function(t){this.$d=(function(n){var e=n.date,o=n.utc;if(e===null)return new Date(NaN);if(u.u(e))return new Date;if(e instanceof Date)return new Date(e);if(typeof e=="string"&&!/Z$/i.test(e)){var a=e.match(nt);if(a){var c=a[2]-1||0,l=(a[7]||"0").substring(0,3);return o?new Date(Date.UTC(a[1],c,a[3]||1,a[4]||0,a[5]||0,a[6]||0,l)):new Date(a[1],c,a[3]||1,a[4]||0,a[5]||0,a[6]||0,l)}}return new Date(e)})(t),this.init()},i.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},i.$utils=function(){return u},i.isValid=function(){return this.$d.toString()!==q},i.isSame=function(t,n){var e=g(t);return this.startOf(n)<=e&&e<=this.endOf(n)},i.isAfter=function(t,n){return g(t)<this.startOf(n)},i.isBefore=function(t,n){return this.endOf(n)<g(t)},i.$g=function(t,n,e){return u.u(t)?this[n]:this.set(e,t)},i.unix=function(){return Math.floor(this.valueOf()/1e3)},i.valueOf=function(){return this.$d.getTime()},i.startOf=function(t,n){var e=this,o=!!u.u(n)||n,a=u.p(t),c=function(x,v){var T=u.w(e.$u?Date.UTC(e.$y,v,x):new Date(e.$y,v,x),e);return o?T:T.endOf(y)},l=function(x,v){return u.w(e.toDate()[x].apply(e.toDate("s"),(o?[0,0,0,0]:[23,59,59,999]).slice(v)),e)},$=this.$W,p=this.$M,L=this.$D,H="set"+(this.$u?"UTC":"");switch(a){case S:return o?c(1,0):c(31,11);case b:return o?c(1,p):c(0,p+1);case f:var O=this.$locale().weekStart||0,j=($<O?$+7:$)-O;return c(o?L-j:L+(6-j),p);case y:case _:return l(H+"Hours",0);case M:return l(H+"Minutes",1);case m:return l(H+"Seconds",2);case d:return l(H+"Milliseconds",3);default:return this.clone()}},i.endOf=function(t){return this.startOf(t,!1)},i.$set=function(t,n){var e,o=u.p(t),a="set"+(this.$u?"UTC":""),c=(e={},e[y]=a+"Date",e[_]=a+"Date",e[b]=a+"Month",e[S]=a+"FullYear",e[M]=a+"Hours",e[m]=a+"Minutes",e[d]=a+"Seconds",e[h]=a+"Milliseconds",e)[o],l=o===y?this.$D+(n-this.$W):n;if(o===b||o===S){var $=this.clone().set(_,1);$.$d[c](l),$.init(),this.$d=$.set(_,Math.min(this.$D,$.daysInMonth())).$d}else c&&this.$d[c](l);return this.init(),this},i.set=function(t,n){return this.clone().$set(t,n)},i.get=function(t){return this[u.p(t)]()},i.add=function(t,n){var e,o=this;t=Number(t);var a=u.p(n),c=function(p){var L=g(o);return u.w(L.date(L.date()+Math.round(p*t)),o)};if(a===b)return this.set(b,this.$M+t);if(a===S)return this.set(S,this.$y+t);if(a===y)return c(1);if(a===f)return c(7);var l=(e={},e[m]=k,e[M]=s,e[d]=w,e)[a]||1,$=this.$d.getTime()+t*l;return u.w($,this)},i.subtract=function(t,n){return this.add(-1*t,n)},i.format=function(t){var n=this,e=this.$locale();if(!this.isValid())return e.invalidDate||q;var o=t||"YYYY-MM-DDTHH:mm:ssZ",a=u.z(this),c=this.$H,l=this.$m,$=this.$M,p=e.weekdays,L=e.months,H=e.meridiem,O=function(v,T,A,W){return v&&(v[T]||v(n,o))||A[T].slice(0,W)},j=function(v){return u.s(c%12||12,v,"0")},x=H||function(v,T,A){var W=v<12?"AM":"PM";return A?W.toLowerCase():W};return o.replace(rt,function(v,T){return T||(function(A){switch(A){case"YY":return String(n.$y).slice(-2);case"YYYY":return u.s(n.$y,4,"0");case"M":return $+1;case"MM":return u.s($+1,2,"0");case"MMM":return O(e.monthsShort,$,L,3);case"MMMM":return O(L,$);case"D":return n.$D;case"DD":return u.s(n.$D,2,"0");case"d":return String(n.$W);case"dd":return O(e.weekdaysMin,n.$W,p,2);case"ddd":return O(e.weekdaysShort,n.$W,p,3);case"dddd":return p[n.$W];case"H":return String(c);case"HH":return u.s(c,2,"0");case"h":return j(1);case"hh":return j(2);case"a":return x(c,l,!0);case"A":return x(c,l,!1);case"m":return String(l);case"mm":return u.s(l,2,"0");case"s":return String(n.$s);case"ss":return u.s(n.$s,2,"0");case"SSS":return u.s(n.$ms,3,"0");case"Z":return a}return null})(v)||a.replace(":","")})},i.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},i.diff=function(t,n,e){var o,a=this,c=u.p(n),l=g(t),$=(l.utcOffset()-this.utcOffset())*k,p=this-l,L=function(){return u.m(a,l)};switch(c){case S:o=L()/12;break;case b:o=L();break;case K:o=L()/3;break;case f:o=(p-$)/6048e5;break;case y:o=(p-$)/864e5;break;case M:o=p/s;break;case m:o=p/k;break;case d:o=p/w;break;default:o=p}return e?o:u.a(o)},i.daysInMonth=function(){return this.endOf(b).$D},i.$locale=function(){return D[this.$L]},i.locale=function(t,n){if(!t)return this.$L;var e=this.clone(),o=C(t,n,!0);return o&&(e.$L=o),e},i.clone=function(){return u.w(this.$d,this)},i.toDate=function(){return new Date(this.valueOf())},i.toJSON=function(){return this.isValid()?this.toISOString():null},i.toISOString=function(){return this.$d.toISOString()},i.toString=function(){return this.$d.toUTCString()},r})(),z=V.prototype;return g.prototype=z,[["$ms",h],["$s",d],["$m",m],["$H",M],["$W",y],["$M",b],["$y",S],["$D",_]].forEach(function(r){z[r[1]]=function(i){return this.$g(i,r[0],r[1])}}),g.extend=function(r,i){return r.$i||(r(i,V,g),r.$i=!0),g},g.locale=C,g.isDayjs=N,g.unix=function(r){return g(1e3*r)},g.en=D[I],g.Ls=D,g.p={},g})});var J=ct(st(),1);var vt=(()=>{class w{$api=Y(it);$title=Y(X);$toastr=Y(et);$translate=Y(tt);settingsLoadedSubject=new Q;defaultTheme="deep-purple";forbiddenKeys=["__proto__","constructor","prototype"];restartToastRef=null;env={};host;proxyHost;formAuth=!0;sessionTimeout=28800;sessionTimeoutInactivityBased=!1;uiVersion;theme;lightingMode;currentLightingMode;actualLightingMode;browserLightingMode;menuMode;keepOrphans;wallpaper;serverTimeOffset=0;rtl=!1;browserLang;onSettingsLoaded=this.settingsLoadedSubject.pipe(R());settingsLoaded=!1;themeList=["orange","red","pink","purple","deep-purple","indigo","blue","blue-grey","cyan","green","teal","grey","brown"];constructor(){this.getAppSettings()}getAppSettings(){return P(this,null,function*(){let s=yield B(this.$api.get("/auth/settings"));this.formAuth=s.formAuth,this.sessionTimeout=s.sessionTimeout,this.sessionTimeoutInactivityBased=s.sessionTimeoutInactivityBased,this.env=s.env,this.host=s.host,this.proxyHost=s.proxyHost,this.lightingMode=s.lightingMode,this.wallpaper=s.wallpaper,this.setLightingMode(this.lightingMode,"user"),this.setTheme(s.theme),this.setMenuMode(s.menuMode),this.setKeepOrphans(s.keepOrphans),this.setTitle(this.env.homebridgeInstanceName),this.checkServerTime(s.serverTimestamp),this.setUiVersion(s.env.packageVersion),this.setLang(this.env.lang),this.settingsLoaded=!0,this.settingsLoadedSubject.next(void 0),this.browserLang=this.$translate.getBrowserCultureLang()})}setBrowserLightingMode(s){this.browserLightingMode=s,this.lightingMode==="auto"&&this.setLightingMode(s,"browser")}setLightingMode(s,h){h==="user"&&(this.lightingMode=s),this.currentLightingMode=s,this.actualLightingMode=this.currentLightingMode==="auto"?this.browserLightingMode:this.currentLightingMode,this.theme&&this.setTheme(this.theme)}setTheme(s){(!s||!this.themeList.includes(s))&&(s=this.defaultTheme,B(this.$api.put("/config-editor/ui",{key:"theme",value:s})).catch(m=>console.error("Error saving setTheme:",m)));let h=window.document.querySelector("body");h.classList.remove(`config-ui-x-${this.theme}`),h.classList.remove(`config-ui-x-dark-mode-${this.theme}`),this.theme=s,this.actualLightingMode==="dark"?(h.classList.add(`config-ui-x-dark-mode-${this.theme}`),h.classList.contains("dark-mode")||h.classList.add("dark-mode")):(h.classList.add(`config-ui-x-${this.theme}`),h.classList.contains("dark-mode")&&h.classList.remove("dark-mode")),window.document.querySelectorAll("iframe").forEach((m,M)=>{try{let y=m.contentDocument;if(y){let f=y.body;this.actualLightingMode==="dark"?(f.classList.contains(`config-ui-x-${this.theme}`)&&f.classList.remove(`config-ui-x-${this.theme}`),f.classList.contains(`config-ui-x-dark-mode-${this.theme}`)||f.classList.add(`config-ui-x-dark-mode-${this.theme}`),f.classList.contains("dark-mode")||f.classList.add("dark-mode"),f.style.backgroundColor="#242424 !important",f.style.color="#ffffff !important"):(f.classList.contains(`config-ui-x-${this.theme}`)||f.classList.add(`config-ui-x-${this.theme}`),f.classList.contains(`config-ui-x-dark-mode-${this.theme}`)&&f.classList.remove(`config-ui-x-dark-mode-${this.theme}`),f.classList.contains("dark-mode")&&f.classList.remove("dark-mode"),f.style.backgroundColor="#ffffff !important",f.style.color="#000000 !important"),m.contentWindow.postMessage({type:"theme-update",isDark:this.actualLightingMode==="dark",theme:s},window.location.origin)}}catch(y){console.warn(`Iframe ${M}: Access denied (cross-origin?)`,{error:y,src:m.src})}})}setMenuMode(s){this.menuMode=s}setKeepOrphans(s){this.keepOrphans=s}setLang(s){s?this.$translate.use(s):s="auto",this.env.lang=s}setItem(s,h){this[s]=h}setEnvItem(s,h){if(s.includes(".")){let d=s.split("."),m=this.env;for(let M=0;M<d.length-1;M+=1){if(this.forbiddenKeys.includes(d[M]))return;m[d[M]]||(m[d[M]]={}),m=m[d[M]]}this.forbiddenKeys.includes(d[d.length-1])||(m[d[d.length-1]]=h)}else this.env[s]=h}checkServerTime(s){let d=(0,J.default)(s).diff((0,J.default)(),"hour");this.serverTimeOffset=d*60*60,(d>=8||d<=-8)&&this.$toastr.warning(this.$translate.instant("settings.datetime.incorrect"),this.$translate.instant("toast.title_warning"),{timeOut:2e4,tapToDismiss:!1}).onTap.subscribe(()=>{window.open("https://homebridge.io/w/JqTFs","_blank")})}setUiVersion(s){this.uiVersion||(this.uiVersion=s)}setTitle(s){this.$title.setTitle(s||"Homebridge")}setPageTitle(s){let h=this.env.homebridgeInstanceName||"Homebridge";s?this.$title.setTitle(`${h} \u2014 ${s}`):this.$title.setTitle(h)}isFeatureEnabled(s){return this.env.featureFlags?.[s]??!1}static \u0275fac=function(h){return new(h||w)};static \u0275prov=G({token:w,factory:w.\u0275fac,providedIn:"root"})}return w})();export{st as a,vt as b};
@@ -1,4 +1,4 @@
1
- import{a as ce,e as ge}from"./chunk-B4AJQJMI.js";var ye=ge((le,me)=>{(function(Z,q){typeof le=="object"&&typeof me=="object"?me.exports=q():typeof define=="function"&&define.amd?define([],q):typeof le=="object"?le.FitAddon=q():Z.FitAddon=q()})(self,()=>(()=>{"use strict";var Z={};return(()=>{var q=Z;Object.defineProperty(q,"__esModule",{value:!0}),q.FitAddon=void 0,q.FitAddon=class{activate(K){this._terminal=K}dispose(){}fit(){let K=this.proposeDimensions();if(!K||!this._terminal||isNaN(K.cols)||isNaN(K.rows))return;let J=this._terminal._core;this._terminal.rows===K.rows&&this._terminal.cols===K.cols||(J._renderService.clear(),this._terminal.resize(K.cols,K.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let K=this._terminal._core,J=K._renderService.dimensions;if(J.css.cell.width===0||J.css.cell.height===0)return;let B=this._terminal.options.scrollback===0?0:K.viewport.scrollBarWidth,r=window.getComputedStyle(this._terminal.element.parentElement),o=parseInt(r.getPropertyValue("height")),l=Math.max(0,parseInt(r.getPropertyValue("width"))),u=window.getComputedStyle(this._terminal.element),n=o-(parseInt(u.getPropertyValue("padding-top"))+parseInt(u.getPropertyValue("padding-bottom"))),d=l-(parseInt(u.getPropertyValue("padding-right"))+parseInt(u.getPropertyValue("padding-left")))-B;return{cols:Math.max(2,Math.floor(d/J.css.cell.width)),rows:Math.max(1,Math.floor(n/J.css.cell.height))}}}})(),Z})())});var Ee=ge((de,Se)=>{(function(Z,q){typeof de=="object"&&typeof Se=="object"?Se.exports=q():typeof define=="function"&&define.amd?define([],q):typeof de=="object"?de.WebLinksAddon=q():Z.WebLinksAddon=q()})(self,()=>(()=>{"use strict";var Z={6:(B,r)=>{function o(u){try{let n=new URL(u),d=n.password&&n.username?`${n.protocol}//${n.username}:${n.password}@${n.host}`:n.username?`${n.protocol}//${n.username}@${n.host}`:`${n.protocol}//${n.host}`;return u.toLocaleLowerCase().startsWith(d.toLocaleLowerCase())}catch{return!1}}Object.defineProperty(r,"__esModule",{value:!0}),r.LinkComputer=r.WebLinkProvider=void 0,r.WebLinkProvider=class{constructor(u,n,d,_={}){this._terminal=u,this._regex=n,this._handler=d,this._options=_}provideLinks(u,n){let d=l.computeLink(u,this._regex,this._terminal,this._handler);n(this._addCallbacks(d))}_addCallbacks(u){return u.map(n=>(n.leave=this._options.leave,n.hover=(d,_)=>{if(this._options.hover){let{range:p}=n;this._options.hover(d,_,p)}},n))}};class l{static computeLink(n,d,_,p){let h=new RegExp(d.source,(d.flags||"")+"g"),[t,s]=l._getWindowedLineStrings(n-1,_),e=t.join(""),i,a=[];for(;i=h.exec(e);){let f=i[0];if(!o(f))continue;let[v,g]=l._mapStrIdx(_,s,0,i.index),[c,m]=l._mapStrIdx(_,v,g,f.length);if(v===-1||g===-1||c===-1||m===-1)continue;let E={start:{x:g+1,y:v+1},end:{x:m,y:c+1}};a.push({range:E,text:f,activate:p})}return a}static _getWindowedLineStrings(n,d){let _,p=n,h=n,t=0,s="",e=[];if(_=d.buffer.active.getLine(n)){let i=_.translateToString(!0);if(_.isWrapped&&i[0]!==" "){for(t=0;(_=d.buffer.active.getLine(--p))&&t<2048&&(s=_.translateToString(!0),t+=s.length,e.push(s),_.isWrapped&&s.indexOf(" ")===-1););e.reverse()}for(e.push(i),t=0;(_=d.buffer.active.getLine(++h))&&_.isWrapped&&t<2048&&(s=_.translateToString(!0),t+=s.length,e.push(s),s.indexOf(" ")===-1););}return[e,p]}static _mapStrIdx(n,d,_,p){let h=n.buffer.active,t=h.getNullCell(),s=_;for(;p;){let e=h.getLine(d);if(!e)return[-1,-1];for(let i=s;i<e.length;++i){e.getCell(i,t);let a=t.getChars();if(t.getWidth()&&(p-=a.length||1,i===e.length-1&&a==="")){let f=h.getLine(d+1);f&&f.isWrapped&&(f.getCell(0,t),t.getWidth()===2&&(p+=1))}if(p<0)return[d,i]}d++,s=0}return[d,s]}}r.LinkComputer=l}},q={};function K(B){var r=q[B];if(r!==void 0)return r.exports;var o=q[B]={exports:{}};return Z[B](o,o.exports,K),o.exports}var J={};return(()=>{var B=J;Object.defineProperty(B,"__esModule",{value:!0}),B.WebLinksAddon=void 0;let r=K(6),o=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function l(u,n){let d=window.open();if(d){try{d.opener=null}catch{}d.location.href=n}else console.warn("Opening link blocked as opener could not be cleared")}B.WebLinksAddon=class{constructor(u=l,n={}){this._handler=u,this._options=n}activate(u){this._terminal=u;let n=this._options,d=n.urlRegex||o;this._linkProvider=this._terminal.registerLinkProvider(new r.WebLinkProvider(this._terminal,d,this._handler,n))}dispose(){this._linkProvider?.dispose()}}})(),J})())});var ke=ge((_e,Ce)=>{(function(Z,q){if(typeof _e=="object"&&typeof Ce=="object")Ce.exports=q();else if(typeof define=="function"&&define.amd)define([],q);else{var K=q();for(var J in K)(typeof _e=="object"?_e:Z)[J]=K[J]}})(globalThis,()=>(()=>{"use strict";var Z={4567:function(B,r,o){var l=this&&this.__decorate||function(e,i,a,f){var v,g=arguments.length,c=g<3?i:f===null?f=Object.getOwnPropertyDescriptor(i,a):f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(e,i,a,f);else for(var m=e.length-1;m>=0;m--)(v=e[m])&&(c=(g<3?v(c):g>3?v(i,a,c):v(i,a))||c);return g>3&&c&&Object.defineProperty(i,a,c),c},u=this&&this.__param||function(e,i){return function(a,f){i(a,f,e)}};Object.defineProperty(r,"__esModule",{value:!0}),r.AccessibilityManager=void 0;let n=o(9042),d=o(9924),_=o(844),p=o(4725),h=o(2585),t=o(3656),s=r.AccessibilityManager=class extends _.Disposable{constructor(e,i,a,f){super(),this._terminal=e,this._coreBrowserService=a,this._renderService=f,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=this._coreBrowserService.mainDocument.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=this._coreBrowserService.mainDocument.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let v=0;v<this._terminal.rows;v++)this._rowElements[v]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[v]);if(this._topBoundaryFocusListener=v=>this._handleBoundaryFocus(v,0),this._bottomBoundaryFocusListener=v=>this._handleBoundaryFocus(v,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=this._coreBrowserService.mainDocument.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new d.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize(v=>this._handleResize(v.rows))),this.register(this._terminal.onRender(v=>this._refreshRows(v.start,v.end))),this.register(this._terminal.onScroll(()=>this._refreshRows())),this.register(this._terminal.onA11yChar(v=>this._handleChar(v))),this.register(this._terminal.onLineFeed(()=>this._handleChar(`
1
+ import{a as ce,e as ge}from"./chunk-G4QH622U.js";var ye=ge((le,me)=>{(function(Z,q){typeof le=="object"&&typeof me=="object"?me.exports=q():typeof define=="function"&&define.amd?define([],q):typeof le=="object"?le.FitAddon=q():Z.FitAddon=q()})(self,()=>(()=>{"use strict";var Z={};return(()=>{var q=Z;Object.defineProperty(q,"__esModule",{value:!0}),q.FitAddon=void 0,q.FitAddon=class{activate(K){this._terminal=K}dispose(){}fit(){let K=this.proposeDimensions();if(!K||!this._terminal||isNaN(K.cols)||isNaN(K.rows))return;let J=this._terminal._core;this._terminal.rows===K.rows&&this._terminal.cols===K.cols||(J._renderService.clear(),this._terminal.resize(K.cols,K.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let K=this._terminal._core,J=K._renderService.dimensions;if(J.css.cell.width===0||J.css.cell.height===0)return;let B=this._terminal.options.scrollback===0?0:K.viewport.scrollBarWidth,r=window.getComputedStyle(this._terminal.element.parentElement),o=parseInt(r.getPropertyValue("height")),l=Math.max(0,parseInt(r.getPropertyValue("width"))),u=window.getComputedStyle(this._terminal.element),n=o-(parseInt(u.getPropertyValue("padding-top"))+parseInt(u.getPropertyValue("padding-bottom"))),d=l-(parseInt(u.getPropertyValue("padding-right"))+parseInt(u.getPropertyValue("padding-left")))-B;return{cols:Math.max(2,Math.floor(d/J.css.cell.width)),rows:Math.max(1,Math.floor(n/J.css.cell.height))}}}})(),Z})())});var Ee=ge((de,Se)=>{(function(Z,q){typeof de=="object"&&typeof Se=="object"?Se.exports=q():typeof define=="function"&&define.amd?define([],q):typeof de=="object"?de.WebLinksAddon=q():Z.WebLinksAddon=q()})(self,()=>(()=>{"use strict";var Z={6:(B,r)=>{function o(u){try{let n=new URL(u),d=n.password&&n.username?`${n.protocol}//${n.username}:${n.password}@${n.host}`:n.username?`${n.protocol}//${n.username}@${n.host}`:`${n.protocol}//${n.host}`;return u.toLocaleLowerCase().startsWith(d.toLocaleLowerCase())}catch{return!1}}Object.defineProperty(r,"__esModule",{value:!0}),r.LinkComputer=r.WebLinkProvider=void 0,r.WebLinkProvider=class{constructor(u,n,d,_={}){this._terminal=u,this._regex=n,this._handler=d,this._options=_}provideLinks(u,n){let d=l.computeLink(u,this._regex,this._terminal,this._handler);n(this._addCallbacks(d))}_addCallbacks(u){return u.map(n=>(n.leave=this._options.leave,n.hover=(d,_)=>{if(this._options.hover){let{range:p}=n;this._options.hover(d,_,p)}},n))}};class l{static computeLink(n,d,_,p){let h=new RegExp(d.source,(d.flags||"")+"g"),[t,s]=l._getWindowedLineStrings(n-1,_),e=t.join(""),i,a=[];for(;i=h.exec(e);){let f=i[0];if(!o(f))continue;let[v,g]=l._mapStrIdx(_,s,0,i.index),[c,m]=l._mapStrIdx(_,v,g,f.length);if(v===-1||g===-1||c===-1||m===-1)continue;let E={start:{x:g+1,y:v+1},end:{x:m,y:c+1}};a.push({range:E,text:f,activate:p})}return a}static _getWindowedLineStrings(n,d){let _,p=n,h=n,t=0,s="",e=[];if(_=d.buffer.active.getLine(n)){let i=_.translateToString(!0);if(_.isWrapped&&i[0]!==" "){for(t=0;(_=d.buffer.active.getLine(--p))&&t<2048&&(s=_.translateToString(!0),t+=s.length,e.push(s),_.isWrapped&&s.indexOf(" ")===-1););e.reverse()}for(e.push(i),t=0;(_=d.buffer.active.getLine(++h))&&_.isWrapped&&t<2048&&(s=_.translateToString(!0),t+=s.length,e.push(s),s.indexOf(" ")===-1););}return[e,p]}static _mapStrIdx(n,d,_,p){let h=n.buffer.active,t=h.getNullCell(),s=_;for(;p;){let e=h.getLine(d);if(!e)return[-1,-1];for(let i=s;i<e.length;++i){e.getCell(i,t);let a=t.getChars();if(t.getWidth()&&(p-=a.length||1,i===e.length-1&&a==="")){let f=h.getLine(d+1);f&&f.isWrapped&&(f.getCell(0,t),t.getWidth()===2&&(p+=1))}if(p<0)return[d,i]}d++,s=0}return[d,s]}}r.LinkComputer=l}},q={};function K(B){var r=q[B];if(r!==void 0)return r.exports;var o=q[B]={exports:{}};return Z[B](o,o.exports,K),o.exports}var J={};return(()=>{var B=J;Object.defineProperty(B,"__esModule",{value:!0}),B.WebLinksAddon=void 0;let r=K(6),o=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function l(u,n){let d=window.open();if(d){try{d.opener=null}catch{}d.location.href=n}else console.warn("Opening link blocked as opener could not be cleared")}B.WebLinksAddon=class{constructor(u=l,n={}){this._handler=u,this._options=n}activate(u){this._terminal=u;let n=this._options,d=n.urlRegex||o;this._linkProvider=this._terminal.registerLinkProvider(new r.WebLinkProvider(this._terminal,d,this._handler,n))}dispose(){this._linkProvider?.dispose()}}})(),J})())});var ke=ge((_e,Ce)=>{(function(Z,q){if(typeof _e=="object"&&typeof Ce=="object")Ce.exports=q();else if(typeof define=="function"&&define.amd)define([],q);else{var K=q();for(var J in K)(typeof _e=="object"?_e:Z)[J]=K[J]}})(globalThis,()=>(()=>{"use strict";var Z={4567:function(B,r,o){var l=this&&this.__decorate||function(e,i,a,f){var v,g=arguments.length,c=g<3?i:f===null?f=Object.getOwnPropertyDescriptor(i,a):f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(e,i,a,f);else for(var m=e.length-1;m>=0;m--)(v=e[m])&&(c=(g<3?v(c):g>3?v(i,a,c):v(i,a))||c);return g>3&&c&&Object.defineProperty(i,a,c),c},u=this&&this.__param||function(e,i){return function(a,f){i(a,f,e)}};Object.defineProperty(r,"__esModule",{value:!0}),r.AccessibilityManager=void 0;let n=o(9042),d=o(9924),_=o(844),p=o(4725),h=o(2585),t=o(3656),s=r.AccessibilityManager=class extends _.Disposable{constructor(e,i,a,f){super(),this._terminal=e,this._coreBrowserService=a,this._renderService=f,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=this._coreBrowserService.mainDocument.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=this._coreBrowserService.mainDocument.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let v=0;v<this._terminal.rows;v++)this._rowElements[v]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[v]);if(this._topBoundaryFocusListener=v=>this._handleBoundaryFocus(v,0),this._bottomBoundaryFocusListener=v=>this._handleBoundaryFocus(v,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=this._coreBrowserService.mainDocument.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new d.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize(v=>this._handleResize(v.rows))),this.register(this._terminal.onRender(v=>this._refreshRows(v.start,v.end))),this.register(this._terminal.onScroll(()=>this._refreshRows())),this.register(this._terminal.onA11yChar(v=>this._handleChar(v))),this.register(this._terminal.onLineFeed(()=>this._handleChar(`
2
2
  `))),this.register(this._terminal.onA11yTab(v=>this._handleTab(v))),this.register(this._terminal.onKey(v=>this._handleKey(v.key))),this.register(this._terminal.onBlur(()=>this._clearLiveRegion())),this.register(this._renderService.onDimensionsChange(()=>this._refreshRowsDimensions())),this.register((0,t.addDisposableDomListener)(document,"selectionchange",()=>this._handleSelectionChange())),this.register(this._coreBrowserService.onDprChange(()=>this._refreshRowsDimensions())),this._refreshRows(),this.register((0,_.toDisposable)(()=>{this._accessibilityContainer.remove(),this._rowElements.length=0}))}_handleTab(e){for(let i=0;i<e;i++)this._handleChar(" ")}_handleChar(e){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==e&&(this._charsToAnnounce+=e):this._charsToAnnounce+=e,e===`
3
3
  `&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=n.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(e){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(e)||this._charsToConsume.push(e)}_refreshRows(e,i){this._liveRegionDebouncer.refresh(e,i,this._terminal.rows)}_renderRows(e,i){let a=this._terminal.buffer,f=a.lines.length.toString();for(let v=e;v<=i;v++){let g=a.lines.get(a.ydisp+v),c=[],m=g?.translateToString(!0,void 0,void 0,c)||"",E=(a.ydisp+v+1).toString(),k=this._rowElements[v];k&&(m.length===0?(k.innerText="\xA0",this._rowColumns.set(k,[0,1])):(k.textContent=m,this._rowColumns.set(k,c)),k.setAttribute("aria-posinset",E),k.setAttribute("aria-setsize",f))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(e,i){let a=e.target,f=this._rowElements[i===0?1:this._rowElements.length-2];if(a.getAttribute("aria-posinset")===(i===0?"1":`${this._terminal.buffer.lines.length}`)||e.relatedTarget!==f)return;let v,g;if(i===0?(v=a,g=this._rowElements.pop(),this._rowContainer.removeChild(g)):(v=this._rowElements.shift(),g=a,this._rowContainer.removeChild(v)),v.removeEventListener("focus",this._topBoundaryFocusListener),g.removeEventListener("focus",this._bottomBoundaryFocusListener),i===0){let c=this._createAccessibilityTreeNode();this._rowElements.unshift(c),this._rowContainer.insertAdjacentElement("afterbegin",c)}else{let c=this._createAccessibilityTreeNode();this._rowElements.push(c),this._rowContainer.appendChild(c)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(i===0?-1:1),this._rowElements[i===0?1:this._rowElements.length-2].focus(),e.preventDefault(),e.stopImmediatePropagation()}_handleSelectionChange(){if(this._rowElements.length===0)return;let e=document.getSelection();if(!e)return;if(e.isCollapsed)return void(this._rowContainer.contains(e.anchorNode)&&this._terminal.clearSelection());if(!e.anchorNode||!e.focusNode)return void console.error("anchorNode and/or focusNode are null");let i={node:e.anchorNode,offset:e.anchorOffset},a={node:e.focusNode,offset:e.focusOffset};if((i.node.compareDocumentPosition(a.node)&Node.DOCUMENT_POSITION_PRECEDING||i.node===a.node&&i.offset>a.offset)&&([i,a]=[a,i]),i.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(i={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(i.node))return;let f=this._rowElements.slice(-1)[0];if(a.node.compareDocumentPosition(f)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(a={node:f,offset:f.textContent?.length??0}),!this._rowContainer.contains(a.node))return;let v=({node:m,offset:E})=>{let k=m instanceof Text?m.parentNode:m,D=parseInt(k?.getAttribute("aria-posinset"),10)-1;if(isNaN(D))return console.warn("row is invalid. Race condition?"),null;let b=this._rowColumns.get(k);if(!b)return console.warn("columns is null. Race condition?"),null;let x=E<b.length?b[E]:b.slice(-1)[0]+1;return x>=this._terminal.cols&&(++D,x=0),{row:D,column:x}},g=v(i),c=v(a);if(g&&c){if(g.row>c.row||g.row===c.row&&g.column>=c.column)throw new Error("invalid range");this._terminal.select(g.column,g.row,(c.row-g.row)*this._terminal.cols-g.column+c.column)}}_handleResize(e){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let i=this._rowContainer.children.length;i<this._terminal.rows;i++)this._rowElements[i]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[i]);for(;this._rowElements.length>e;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){let e=this._coreBrowserService.mainDocument.createElement("div");return e.setAttribute("role","listitem"),e.tabIndex=-1,this._refreshRowDimensions(e),e}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityContainer.style.width=`${this._renderService.dimensions.css.canvas.width}px`,this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let e=0;e<this._terminal.rows;e++)this._refreshRowDimensions(this._rowElements[e])}}_refreshRowDimensions(e){e.style.height=`${this._renderService.dimensions.css.cell.height}px`}};r.AccessibilityManager=s=l([u(1,h.IInstantiationService),u(2,p.ICoreBrowserService),u(3,p.IRenderService)],s)},3614:(B,r)=>{function o(d){return d.replace(/\r?\n/g,"\r")}function l(d,_){return _?"\x1B[200~"+d+"\x1B[201~":d}function u(d,_,p,h){d=l(d=o(d),p.decPrivateModes.bracketedPasteMode&&h.rawOptions.ignoreBracketedPasteMode!==!0),p.triggerDataEvent(d,!0),_.value=""}function n(d,_,p){let h=p.getBoundingClientRect(),t=d.clientX-h.left-10,s=d.clientY-h.top-10;_.style.width="20px",_.style.height="20px",_.style.left=`${t}px`,_.style.top=`${s}px`,_.style.zIndex="1000",_.focus()}Object.defineProperty(r,"__esModule",{value:!0}),r.rightClickHandler=r.moveTextAreaUnderMouseCursor=r.paste=r.handlePasteEvent=r.copyHandler=r.bracketTextForPaste=r.prepareTextForTerminal=void 0,r.prepareTextForTerminal=o,r.bracketTextForPaste=l,r.copyHandler=function(d,_){d.clipboardData&&d.clipboardData.setData("text/plain",_.selectionText),d.preventDefault()},r.handlePasteEvent=function(d,_,p,h){d.stopPropagation(),d.clipboardData&&u(d.clipboardData.getData("text/plain"),_,p,h)},r.paste=u,r.moveTextAreaUnderMouseCursor=n,r.rightClickHandler=function(d,_,p,h,t){n(d,_,p),t&&h.rightClickSelect(d),_.value=h.selectionText,_.select()}},7239:(B,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.ColorContrastCache=void 0;let l=o(1505);r.ColorContrastCache=class{constructor(){this._color=new l.TwoKeyMap,this._css=new l.TwoKeyMap}setCss(u,n,d){this._css.set(u,n,d)}getCss(u,n){return this._css.get(u,n)}setColor(u,n,d){this._color.set(u,n,d)}getColor(u,n){return this._color.get(u,n)}clear(){this._color.clear(),this._css.clear()}}},3656:(B,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.addDisposableDomListener=void 0,r.addDisposableDomListener=function(o,l,u,n){o.addEventListener(l,u,n);let d=!1;return{dispose:()=>{d||(d=!0,o.removeEventListener(l,u,n))}}}},3551:function(B,r,o){var l=this&&this.__decorate||function(s,e,i,a){var f,v=arguments.length,g=v<3?e:a===null?a=Object.getOwnPropertyDescriptor(e,i):a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(s,e,i,a);else for(var c=s.length-1;c>=0;c--)(f=s[c])&&(g=(v<3?f(g):v>3?f(e,i,g):f(e,i))||g);return v>3&&g&&Object.defineProperty(e,i,g),g},u=this&&this.__param||function(s,e){return function(i,a){e(i,a,s)}};Object.defineProperty(r,"__esModule",{value:!0}),r.Linkifier=void 0;let n=o(3656),d=o(8460),_=o(844),p=o(2585),h=o(4725),t=r.Linkifier=class extends _.Disposable{get currentLink(){return this._currentLink}constructor(s,e,i,a,f){super(),this._element=s,this._mouseService=e,this._renderService=i,this._bufferService=a,this._linkProviderService=f,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new d.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new d.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,_.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,_.toDisposable)(()=>{this._lastMouseEvent=void 0,this._activeProviderReplies?.clear()})),this.register(this._bufferService.onResize(()=>{this._clearCurrentLink(),this._wasResized=!0})),this.register((0,n.addDisposableDomListener)(this._element,"mouseleave",()=>{this._isMouseOut=!0,this._clearCurrentLink()})),this.register((0,n.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,n.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,n.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(s){this._lastMouseEvent=s;let e=this._positionFromMouseEvent(s,this._element,this._mouseService);if(!e)return;this._isMouseOut=!1;let i=s.composedPath();for(let a=0;a<i.length;a++){let f=i[a];if(f.classList.contains("xterm"))break;if(f.classList.contains("xterm-hover"))return}this._lastBufferCell&&e.x===this._lastBufferCell.x&&e.y===this._lastBufferCell.y||(this._handleHover(e),this._lastBufferCell=e)}_handleHover(s){if(this._activeLine!==s.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(s,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,s)||(this._clearCurrentLink(),this._askForLink(s,!0))}_askForLink(s,e){this._activeProviderReplies&&e||(this._activeProviderReplies?.forEach(a=>{a?.forEach(f=>{f.link.dispose&&f.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=s.y);let i=!1;for(let[a,f]of this._linkProviderService.linkProviders.entries())e?this._activeProviderReplies?.get(a)&&(i=this._checkLinkProviderResult(a,s,i)):f.provideLinks(s.y,v=>{if(this._isMouseOut)return;let g=v?.map(c=>({link:c}));this._activeProviderReplies?.set(a,g),i=this._checkLinkProviderResult(a,s,i),this._activeProviderReplies?.size===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(s.y,this._activeProviderReplies)})}_removeIntersectingLinks(s,e){let i=new Set;for(let a=0;a<e.size;a++){let f=e.get(a);if(f)for(let v=0;v<f.length;v++){let g=f[v],c=g.link.range.start.y<s?0:g.link.range.start.x,m=g.link.range.end.y>s?this._bufferService.cols:g.link.range.end.x;for(let E=c;E<=m;E++){if(i.has(E)){f.splice(v--,1);break}i.add(E)}}}}_checkLinkProviderResult(s,e,i){if(!this._activeProviderReplies)return i;let a=this._activeProviderReplies.get(s),f=!1;for(let v=0;v<s;v++)this._activeProviderReplies.has(v)&&!this._activeProviderReplies.get(v)||(f=!0);if(!f&&a){let v=a.find(g=>this._linkAtPosition(g.link,e));v&&(i=!0,this._handleNewLink(v))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!i)for(let v=0;v<this._activeProviderReplies.size;v++){let g=this._activeProviderReplies.get(v)?.find(c=>this._linkAtPosition(c.link,e));if(g){i=!0,this._handleNewLink(g);break}}return i}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(s){if(!this._currentLink)return;let e=this._positionFromMouseEvent(s,this._element,this._mouseService);e&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,e)&&this._currentLink.link.activate(s,this._currentLink.link.text)}_clearCurrentLink(s,e){this._currentLink&&this._lastMouseEvent&&(!s||!e||this._currentLink.link.range.start.y>=s&&this._currentLink.link.range.end.y<=e)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,_.disposeArray)(this._linkCacheDisposables))}_handleNewLink(s){if(!this._lastMouseEvent)return;let e=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);e&&this._linkAtPosition(s.link,e)&&(this._currentLink=s,this._currentLink.state={decorations:{underline:s.link.decorations===void 0||s.link.decorations.underline,pointerCursor:s.link.decorations===void 0||s.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,s.link,this._lastMouseEvent),s.link.decorations={},Object.defineProperties(s.link.decorations,{pointerCursor:{get:()=>this._currentLink?.state?.decorations.pointerCursor,set:i=>{this._currentLink?.state&&this._currentLink.state.decorations.pointerCursor!==i&&(this._currentLink.state.decorations.pointerCursor=i,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",i))}},underline:{get:()=>this._currentLink?.state?.decorations.underline,set:i=>{this._currentLink?.state&&this._currentLink?.state?.decorations.underline!==i&&(this._currentLink.state.decorations.underline=i,this._currentLink.state.isHovered&&this._fireUnderlineEvent(s.link,i))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(i=>{if(!this._currentLink)return;let a=i.start===0?0:i.start+1+this._bufferService.buffer.ydisp,f=this._bufferService.buffer.ydisp+1+i.end;if(this._currentLink.link.range.start.y>=a&&this._currentLink.link.range.end.y<=f&&(this._clearCurrentLink(a,f),this._lastMouseEvent)){let v=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);v&&this._askForLink(v,!1)}})))}_linkHover(s,e,i){this._currentLink?.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(e,!0),this._currentLink.state.decorations.pointerCursor&&s.classList.add("xterm-cursor-pointer")),e.hover&&e.hover(i,e.text)}_fireUnderlineEvent(s,e){let i=s.range,a=this._bufferService.buffer.ydisp,f=this._createLinkUnderlineEvent(i.start.x-1,i.start.y-a-1,i.end.x,i.end.y-a-1,void 0);(e?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(f)}_linkLeave(s,e,i){this._currentLink?.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(e,!1),this._currentLink.state.decorations.pointerCursor&&s.classList.remove("xterm-cursor-pointer")),e.leave&&e.leave(i,e.text)}_linkAtPosition(s,e){let i=s.range.start.y*this._bufferService.cols+s.range.start.x,a=s.range.end.y*this._bufferService.cols+s.range.end.x,f=e.y*this._bufferService.cols+e.x;return i<=f&&f<=a}_positionFromMouseEvent(s,e,i){let a=i.getCoords(s,e,this._bufferService.cols,this._bufferService.rows);if(a)return{x:a[0],y:a[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(s,e,i,a,f){return{x1:s,y1:e,x2:i,y2:a,cols:this._bufferService.cols,fg:f}}};r.Linkifier=t=l([u(1,h.IMouseService),u(2,h.IRenderService),u(3,p.IBufferService),u(4,h.ILinkProviderService)],t)},9042:(B,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.tooMuchOutput=r.promptLabel=void 0,r.promptLabel="Terminal input",r.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(B,r,o){var l=this&&this.__decorate||function(h,t,s,e){var i,a=arguments.length,f=a<3?t:e===null?e=Object.getOwnPropertyDescriptor(t,s):e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")f=Reflect.decorate(h,t,s,e);else for(var v=h.length-1;v>=0;v--)(i=h[v])&&(f=(a<3?i(f):a>3?i(t,s,f):i(t,s))||f);return a>3&&f&&Object.defineProperty(t,s,f),f},u=this&&this.__param||function(h,t){return function(s,e){t(s,e,h)}};Object.defineProperty(r,"__esModule",{value:!0}),r.OscLinkProvider=void 0;let n=o(511),d=o(2585),_=r.OscLinkProvider=class{constructor(h,t,s){this._bufferService=h,this._optionsService=t,this._oscLinkService=s}provideLinks(h,t){let s=this._bufferService.buffer.lines.get(h-1);if(!s)return void t(void 0);let e=[],i=this._optionsService.rawOptions.linkHandler,a=new n.CellData,f=s.getTrimmedLength(),v=-1,g=-1,c=!1;for(let m=0;m<f;m++)if(g!==-1||s.hasContent(m)){if(s.loadCell(m,a),a.hasExtendedAttrs()&&a.extended.urlId){if(g===-1){g=m,v=a.extended.urlId;continue}c=a.extended.urlId!==v}else g!==-1&&(c=!0);if(c||g!==-1&&m===f-1){let E=this._oscLinkService.getLinkData(v)?.uri;if(E){let k={start:{x:g+1,y:h},end:{x:m+(c||m!==f-1?0:1),y:h}},D=!1;if(!i?.allowNonHttpProtocols)try{let b=new URL(E);["http:","https:"].includes(b.protocol)||(D=!0)}catch{D=!0}D||e.push({text:E,range:k,activate:(b,x)=>i?i.activate(b,x,k):p(0,x),hover:(b,x)=>i?.hover?.(b,x,k),leave:(b,x)=>i?.leave?.(b,x,k)})}c=!1,a.hasExtendedAttrs()&&a.extended.urlId?(g=m,v=a.extended.urlId):(g=-1,v=-1)}}t(e)}};function p(h,t){if(confirm(`Do you want to navigate to ${t}?
4
4
 
@@ -0,0 +1 @@
1
+ import{e as f,h as s}from"./chunk-2BB4D4TW.js";import{k as l,n as u,q as d}from"./chunk-JX72JCMA.js";import{eb as a,h as p,ia as m,ja as i,na as e,x as c}from"./chunk-G4QH622U.js";var n=(()=>{class t{$api=e(d);$router=e(f);$toastr=e(u);$translate=e(l);resolve(){return p(this,null,function*(){try{return yield c(this.$api.get("/platform-tools/docker/startup-script"))}catch(r){console.error(r),this.$toastr.error(r.message,this.$translate.instant("toast.title_error")),this.$router.navigate(["/"])}})}static \u0275fac=function(o){return new(o||t)};static \u0275prov=m({token:t,factory:t.\u0275fac})}return t})();var S=[{path:"",redirectTo:"/",pathMatch:"full"},{path:"startup-script",loadComponent:()=>import("./chunk-X4ZEQSRY.js").then(t=>t.StartupScriptComponent),resolve:{startupScript:n}},{path:"restart-container",loadComponent:()=>import("./chunk-ZZQEWRDE.js").then(t=>t.ContainerRestartComponent)}],v=(()=>{class t{static \u0275fac=function(o){return new(o||t)};static \u0275mod=a({type:t});static \u0275inj=i({imports:[s.forChild(S),s]})}return t})();var T=(()=>{class t{static \u0275fac=function(o){return new(o||t)};static \u0275mod=a({type:t});static \u0275inj=i({providers:[n],imports:[v]})}return t})();export{T as DockerModule};
@@ -0,0 +1 @@
1
+ import{Aa as E,Ca as w,Da as f,E as Se,Ec as ce,Fa as F,Fc as he,Jc as fe,Lb as v,Sa as D,Va as Pe,Yb as de,Za as I,_a as o,a as h,b as g,eb as K,fa as X,fb as l,ha as d,hb as u,ia as Ne,ja as Y,jc as c,la as A,lb as Re,n as we,na as R,ob as ke,pb as S,r as Fe,wa as Oe,xc as y,y as Ie,ya as xe,yc as N}from"./chunk-G4QH622U.js";var $e=(()=>{class n{_renderer;_elementRef;onChange=e=>{};onTouched=()=>{};constructor(e,i){this._renderer=e,this._elementRef=i}setProperty(e,i){this._renderer.setProperty(this._elementRef.nativeElement,e,i)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}static \u0275fac=function(i){return new(i||n)(o(I),o(F))};static \u0275dir=l({type:n})}return n})(),P=(()=>{class n extends $e{static \u0275fac=(()=>{let e;return function(r){return(e||(e=f(n)))(r||n)}})();static \u0275dir=l({type:n,features:[u]})}return n})(),V=new A(""),vt={provide:V,useExisting:d(()=>yt),multi:!0},yt=(()=>{class n extends P{writeValue(e){this.setProperty("checked",e)}static \u0275fac=(()=>{let e;return function(r){return(e||(e=f(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(i,r){i&1&&v("change",function(a){return r.onChange(a.target.checked)})("blur",function(){return r.onTouched()})},standalone:!1,features:[c([vt]),u]})}return n})(),Ct={provide:V,useExisting:d(()=>qe),multi:!0};function Vt(){let n=fe()?fe().getUserAgent():"";return/android (\d+)/.test(n.toLowerCase())}var Dt=new A(""),qe=(()=>{class n extends $e{_compositionMode;_composing=!1;constructor(e,i,r){super(e,i),this._compositionMode=r,this._compositionMode==null&&(this._compositionMode=!Vt())}writeValue(e){let i=e??"";this.setProperty("value",i)}_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(i){return new(i||n)(o(I),o(F),o(Dt,8))};static \u0275dir=l({type:n,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(i,r){i&1&&v("input",function(a){return r._handleInput(a.target.value)})("blur",function(){return r.onTouched()})("compositionstart",function(){return r._compositionStart()})("compositionend",function(a){return r._compositionEnd(a.target.value)})},standalone:!1,features:[c([Ct]),u]})}return n})();function me(n){return n==null||_e(n)===0}function _e(n){return n==null?null:Array.isArray(n)||typeof n=="string"?n.length:n instanceof Set?n.size:null}var m=new A(""),$=new A(""),bt=/^(?=.{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])?)*$/,je=class{static min(t){return ze(t)}static max(t){return Ze(t)}static required(t){return Xe(t)}static requiredTrue(t){return At(t)}static email(t){return Mt(t)}static minLength(t){return Et(t)}static maxLength(t){return Ye(t)}static pattern(t){return Ke(t)}static nullValidator(t){return Q()}static compose(t){return it(t)}static composeAsync(t){return rt(t)}};function ze(n){return t=>{if(t.value==null||n==null)return null;let e=parseFloat(t.value);return!isNaN(e)&&e<n?{min:{min:n,actual:t.value}}:null}}function Ze(n){return t=>{if(t.value==null||n==null)return null;let e=parseFloat(t.value);return!isNaN(e)&&e>n?{max:{max:n,actual:t.value}}:null}}function Xe(n){return me(n.value)?{required:!0}:null}function At(n){return n.value===!0?null:{required:!0}}function Mt(n){return me(n.value)||bt.test(n.value)?null:{email:!0}}function Et(n){return t=>{let e=t.value?.length??_e(t.value);return e===null||e===0?null:e<n?{minlength:{requiredLength:n,actualLength:e}}:null}}function Ye(n){return t=>{let e=t.value?.length??_e(t.value);return e!==null&&e>n?{maxlength:{requiredLength:n,actualLength:e}}:null}}function Ke(n){if(!n)return Q;let t,e;return typeof n=="string"?(e="",n.charAt(0)!=="^"&&(e+="^"),e+=n,n.charAt(n.length-1)!=="$"&&(e+="$"),t=new RegExp(e)):(e=n.toString(),t=n),i=>{if(me(i.value))return null;let r=i.value;return t.test(r)?null:{pattern:{requiredPattern:e,actualValue:r}}}}function Q(n){return null}function Je(n){return n!=null}function Qe(n){return Re(n)?Fe(n):n}function et(n){let t={};return n.forEach(e=>{t=e!=null?h(h({},t),e):t}),Object.keys(t).length===0?null:t}function tt(n,t){return t.map(e=>e(n))}function wt(n){return!n.validate}function nt(n){return n.map(t=>wt(t)?t:e=>t.validate(e))}function it(n){if(!n)return null;let t=n.filter(Je);return t.length==0?null:function(e){return et(tt(e,t))}}function ve(n){return n!=null?it(nt(n)):null}function rt(n){if(!n)return null;let t=n.filter(Je);return t.length==0?null:function(e){let i=tt(e,t).map(Qe);return Se(i).pipe(Ie(et))}}function ye(n){return n!=null?rt(nt(n)):null}function Ge(n,t){return n===null?[t]:Array.isArray(n)?[...n,t]:[n,t]}function st(n){return n._rawValidators}function ot(n){return n._rawAsyncValidators}function ge(n){return n?Array.isArray(n)?n:[n]:[]}function ee(n,t){return Array.isArray(n)?n.includes(t):n===t}function Te(n,t){let e=ge(t);return ge(n).forEach(r=>{ee(e,r)||e.push(r)}),e}function Be(n,t){return ge(t).filter(e=>!ee(n,e))}var te=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(t){this._rawValidators=t||[],this._composedValidatorFn=ve(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=ye(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(t){this._onDestroyCallbacks.push(t)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(t=>t()),this._onDestroyCallbacks=[]}reset(t=void 0){this.control&&this.control.reset(t)}hasError(t,e){return this.control?this.control.hasError(t,e):!1}getError(t,e){return this.control?this.control.getError(t,e):null}},C=class extends te{name;get formDirective(){return null}get path(){return null}},p=class extends te{_parent=null;name=null;valueAccessor=null},ne=class{_cd;constructor(t){this._cd=t}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}},Ft={"[class.ng-untouched]":"isUntouched","[class.ng-touched]":"isTouched","[class.ng-pristine]":"isPristine","[class.ng-dirty]":"isDirty","[class.ng-valid]":"isValid","[class.ng-invalid]":"isInvalid","[class.ng-pending]":"isPending"},xn=g(h({},Ft),{"[class.ng-submitted]":"isSubmitted"}),Pn=(()=>{class n extends ne{constructor(e){super(e)}static \u0275fac=function(i){return new(i||n)(o(p,2))};static \u0275dir=l({type:n,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(i,r){i&2&&de("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)},standalone:!1,features:[u]})}return n})(),Rn=(()=>{class n extends ne{constructor(e){super(e)}static \u0275fac=function(i){return new(i||n)(o(C,10))};static \u0275dir=l({type:n,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(i,r){i&2&&de("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)("ng-submitted",r.isSubmitted)},standalone:!1,features:[u]})}return n})();var k="VALID",J="INVALID",O="PENDING",j="DISABLED",b=class{},ie=class extends b{value;source;constructor(t,e){super(),this.value=t,this.source=e}},T=class extends b{pristine;source;constructor(t,e){super(),this.pristine=t,this.source=e}},B=class extends b{touched;source;constructor(t,e){super(),this.touched=t,this.source=e}},x=class extends b{status;source;constructor(t,e){super(),this.status=t,this.source=e}},re=class extends b{source;constructor(t){super(),this.source=t}},U=class extends b{source;constructor(t){super(),this.source=t}};function Ce(n){return(le(n)?n.validators:n)||null}function It(n){return Array.isArray(n)?ve(n):n||null}function Ve(n,t){return(le(t)?t.asyncValidators:n)||null}function St(n){return Array.isArray(n)?ye(n):n||null}function le(n){return n!=null&&!Array.isArray(n)&&typeof n=="object"}function at(n,t,e){let i=n.controls;if(!(t?Object.keys(i):i).length)throw new X(1e3,"");if(!i[e])throw new X(1001,"")}function lt(n,t,e){n._forEachChild((i,r)=>{if(e[r]===void 0)throw new X(1002,"")})}var H=class{_pendingDirty=!1;_hasOwnPendingAsyncValidator=null;_pendingTouched=!1;_onCollectionChange=()=>{};_updateOn;_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(t,e){this._assignValidators(t),this._assignAsyncValidators(e)}get validator(){return this._composedValidatorFn}set validator(t){this._rawValidators=this._composedValidatorFn=t}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(t){this._rawAsyncValidators=this._composedAsyncValidatorFn=t}get parent(){return this._parent}get status(){return y(this.statusReactive)}set status(t){y(()=>this.statusReactive.set(t))}_status=N(()=>this.statusReactive());statusReactive=E(void 0);get valid(){return this.status===k}get invalid(){return this.status===J}get pending(){return this.status==O}get disabled(){return this.status===j}get enabled(){return this.status!==j}errors;get pristine(){return y(this.pristineReactive)}set pristine(t){y(()=>this.pristineReactive.set(t))}_pristine=N(()=>this.pristineReactive());pristineReactive=E(!0);get dirty(){return!this.pristine}get touched(){return y(this.touchedReactive)}set touched(t){y(()=>this.touchedReactive.set(t))}_touched=N(()=>this.touchedReactive());touchedReactive=E(!1);get untouched(){return!this.touched}_events=new we;events=this._events.asObservable();valueChanges;statusChanges;get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(t){this._assignValidators(t)}setAsyncValidators(t){this._assignAsyncValidators(t)}addValidators(t){this.setValidators(Te(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(Te(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(Be(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(Be(t,this._rawAsyncValidators))}hasValidator(t){return ee(this._rawValidators,t)}hasAsyncValidator(t){return ee(this._rawAsyncValidators,t)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(t={}){let e=this.touched===!1;this.touched=!0;let i=t.sourceControl??this;this._parent&&!t.onlySelf&&this._parent.markAsTouched(g(h({},t),{sourceControl:i})),e&&t.emitEvent!==!1&&this._events.next(new B(!0,i))}markAllAsDirty(t={}){this.markAsDirty({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsDirty(t))}markAllAsTouched(t={}){this.markAsTouched({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsTouched(t))}markAsUntouched(t={}){let e=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let i=t.sourceControl??this;this._forEachChild(r=>{r.markAsUntouched({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:i})}),this._parent&&!t.onlySelf&&this._parent._updateTouched(t,i),e&&t.emitEvent!==!1&&this._events.next(new B(!1,i))}markAsDirty(t={}){let e=this.pristine===!0;this.pristine=!1;let i=t.sourceControl??this;this._parent&&!t.onlySelf&&this._parent.markAsDirty(g(h({},t),{sourceControl:i})),e&&t.emitEvent!==!1&&this._events.next(new T(!1,i))}markAsPristine(t={}){let e=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let i=t.sourceControl??this;this._forEachChild(r=>{r.markAsPristine({onlySelf:!0,emitEvent:t.emitEvent})}),this._parent&&!t.onlySelf&&this._parent._updatePristine(t,i),e&&t.emitEvent!==!1&&this._events.next(new T(!0,i))}markAsPending(t={}){this.status=O;let e=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new x(this.status,e)),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.markAsPending(g(h({},t),{sourceControl:e}))}disable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=j,this.errors=null,this._forEachChild(r=>{r.disable(g(h({},t),{onlySelf:!0}))}),this._updateValue();let i=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new ie(this.value,i)),this._events.next(new x(this.status,i)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(g(h({},t),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(r=>r(!0))}enable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=k,this._forEachChild(i=>{i.enable(g(h({},t),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors(g(h({},t),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(i=>i(!1))}_updateAncestors(t,e){this._parent&&!t.onlySelf&&(this._parent.updateValueAndValidity(t),t.skipPristineCheck||this._parent._updatePristine({},e),this._parent._updateTouched({},e))}setParent(t){this._parent=t}getRawValue(){return this.value}updateValueAndValidity(t={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let i=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===k||this.status===O)&&this._runAsyncValidator(i,t.emitEvent)}let e=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new ie(this.value,e)),this._events.next(new x(this.status,e)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.updateValueAndValidity(g(h({},t),{sourceControl:e}))}_updateTreeValidity(t={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(t)),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?j:k}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t,e){if(this.asyncValidator){this.status=O,this._hasOwnPendingAsyncValidator={emitEvent:e!==!1,shouldHaveEmitted:t!==!1};let i=Qe(this.asyncValidator(this));this._asyncValidationSubscription=i.subscribe(r=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(r,{emitEvent:e,shouldHaveEmitted:t})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let t=(this._hasOwnPendingAsyncValidator?.emitEvent||this._hasOwnPendingAsyncValidator?.shouldHaveEmitted)??!1;return this._hasOwnPendingAsyncValidator=null,t}return!1}setErrors(t,e={}){this.errors=t,this._updateControlsErrors(e.emitEvent!==!1,this,e.shouldHaveEmitted)}get(t){let e=t;return e==null||(Array.isArray(e)||(e=e.split(".")),e.length===0)?null:e.reduce((i,r)=>i&&i._find(r),this)}getError(t,e){let i=e?this.get(e):this;return i&&i.errors?i.errors[t]:null}hasError(t,e){return!!this.getError(t,e)}get root(){let t=this;for(;t._parent;)t=t._parent;return t}_updateControlsErrors(t,e,i){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),(t||i)&&this._events.next(new x(this.status,e)),this._parent&&this._parent._updateControlsErrors(t,e,i)}_initObservables(){this.valueChanges=new D,this.statusChanges=new D}_calculateStatus(){return this._allControlsDisabled()?j:this.errors?J:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(O)?O:this._anyControlsHaveStatus(J)?J:k}_anyControlsHaveStatus(t){return this._anyControls(e=>e.status===t)}_anyControlsDirty(){return this._anyControls(t=>t.dirty)}_anyControlsTouched(){return this._anyControls(t=>t.touched)}_updatePristine(t,e){let i=!this._anyControlsDirty(),r=this.pristine!==i;this.pristine=i,this._parent&&!t.onlySelf&&this._parent._updatePristine(t,e),r&&this._events.next(new T(this.pristine,e))}_updateTouched(t={},e){this.touched=this._anyControlsTouched(),this._events.next(new B(this.touched,e)),this._parent&&!t.onlySelf&&this._parent._updateTouched(t,e)}_onDisabledChange=[];_registerOnCollectionChange(t){this._onCollectionChange=t}_setUpdateStrategy(t){le(t)&&t.updateOn!=null&&(this._updateOn=t.updateOn)}_parentMarkedDirty(t){let e=this._parent&&this._parent.dirty;return!t&&!!e&&!this._parent._anyControlsDirty()}_find(t){return null}_assignValidators(t){this._rawValidators=Array.isArray(t)?t.slice():t,this._composedValidatorFn=It(this._rawValidators)}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=St(this._rawAsyncValidators)}},L=class extends H{constructor(t,e,i){super(Ce(e),Ve(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;registerControl(t,e){return this.controls[t]?this.controls[t]:(this.controls[t]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(t,e,i={}){this.registerControl(t,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}removeControl(t,e={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}setControl(t,e,i={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],e&&this.registerControl(t,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}contains(t){return this.controls.hasOwnProperty(t)&&this.controls[t].enabled}setValue(t,e={}){lt(this,!0,t),Object.keys(t).forEach(i=>{at(this,!0,i),this.controls[i].setValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){t!=null&&(Object.keys(t).forEach(i=>{let r=this.controls[i];r&&r.patchValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t={},e={}){this._forEachChild((i,r)=>{i.reset(t?t[r]:null,{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e),e?.emitEvent!==!1&&this._events.next(new U(this))}getRawValue(){return this._reduceChildren({},(t,e,i)=>(t[i]=e.getRawValue(),t))}_syncPendingControls(){let t=this._reduceChildren(!1,(e,i)=>i._syncPendingControls()?!0:e);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){Object.keys(this.controls).forEach(e=>{let i=this.controls[e];i&&t(i,e)})}_setUpControls(){this._forEachChild(t=>{t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(t){for(let[e,i]of Object.entries(this.controls))if(this.contains(e)&&t(i))return!0;return!1}_reduceValue(){let t={};return this._reduceChildren(t,(e,i,r)=>((i.enabled||this.disabled)&&(e[r]=i.value),e))}_reduceChildren(t,e){let i=t;return this._forEachChild((r,s)=>{i=e(i,r,s)}),i}_allControlsDisabled(){for(let t of Object.keys(this.controls))if(this.controls[t].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(t){return this.controls.hasOwnProperty(t)?this.controls[t]:null}};var kn=L;var M=new A("",{providedIn:"root",factory:()=>q}),q="always";function ut(n,t){return[...t.path,n]}function W(n,t,e=q){De(n,t),t.valueAccessor.writeValue(n.value),(n.disabled||e==="always")&&t.valueAccessor.setDisabledState?.(n.disabled),Ot(n,t),Pt(n,t),xt(n,t),Nt(n,t)}function se(n,t,e=!0){let i=()=>{};t.valueAccessor&&(t.valueAccessor.registerOnChange(i),t.valueAccessor.registerOnTouched(i)),ae(n,t),n&&(t._invokeOnDestroyCallbacks(),n._registerOnCollectionChange(()=>{}))}function oe(n,t){n.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(t)})}function Nt(n,t){if(t.valueAccessor.setDisabledState){let e=i=>{t.valueAccessor.setDisabledState(i)};n.registerOnDisabledChange(e),t._registerOnDestroy(()=>{n._unregisterOnDisabledChange(e)})}}function De(n,t){let e=st(n);t.validator!==null?n.setValidators(Ge(e,t.validator)):typeof e=="function"&&n.setValidators([e]);let i=ot(n);t.asyncValidator!==null?n.setAsyncValidators(Ge(i,t.asyncValidator)):typeof i=="function"&&n.setAsyncValidators([i]);let r=()=>n.updateValueAndValidity();oe(t._rawValidators,r),oe(t._rawAsyncValidators,r)}function ae(n,t){let e=!1;if(n!==null){if(t.validator!==null){let r=st(n);if(Array.isArray(r)&&r.length>0){let s=r.filter(a=>a!==t.validator);s.length!==r.length&&(e=!0,n.setValidators(s))}}if(t.asyncValidator!==null){let r=ot(n);if(Array.isArray(r)&&r.length>0){let s=r.filter(a=>a!==t.asyncValidator);s.length!==r.length&&(e=!0,n.setAsyncValidators(s))}}}let i=()=>{};return oe(t._rawValidators,i),oe(t._rawAsyncValidators,i),e}function Ot(n,t){t.valueAccessor.registerOnChange(e=>{n._pendingValue=e,n._pendingChange=!0,n._pendingDirty=!0,n.updateOn==="change"&&dt(n,t)})}function xt(n,t){t.valueAccessor.registerOnTouched(()=>{n._pendingTouched=!0,n.updateOn==="blur"&&n._pendingChange&&dt(n,t),n.updateOn!=="submit"&&n.markAsTouched()})}function dt(n,t){n._pendingDirty&&n.markAsDirty(),n.setValue(n._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(n._pendingValue),n._pendingChange=!1}function Pt(n,t){let e=(i,r)=>{t.valueAccessor.writeValue(i),r&&t.viewToModelUpdate(i)};n.registerOnChange(e),t._registerOnDestroy(()=>{n._unregisterOnChange(e)})}function ct(n,t){n==null,De(n,t)}function Rt(n,t){return ae(n,t)}function be(n,t){if(!n.hasOwnProperty("model"))return!1;let e=n.model;return e.isFirstChange()?!0:!Object.is(t,e.currentValue)}function kt(n){return Object.getPrototypeOf(n.constructor)===P}function ht(n,t){n._syncPendingControls(),t.forEach(e=>{let i=e.control;i.updateOn==="submit"&&i._pendingChange&&(e.viewToModelUpdate(i._pendingValue),i._pendingChange=!1)})}function Ae(n,t){if(!t)return null;Array.isArray(t);let e,i,r;return t.forEach(s=>{s.constructor===qe?e=s:kt(s)?i=s:r=s}),r||i||e||null}function jt(n,t){let e=n.indexOf(t);e>-1&&n.splice(e,1)}var Gt={provide:C,useExisting:d(()=>Tt)},G=Promise.resolve(),Tt=(()=>{class n extends C{callSetDisabledState;get submitted(){return y(this.submittedReactive)}_submitted=N(()=>this.submittedReactive());submittedReactive=E(!1);_directives=new Set;form;ngSubmit=new D;options;constructor(e,i,r){super(),this.callSetDisabledState=r,this.form=new L({},ve(e),ye(i))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){G.then(()=>{let i=this._findContainer(e.path);e.control=i.registerControl(e.name,e.control),W(e.control,e,this.callSetDisabledState),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(e)})}getControl(e){return this.form.get(e.path)}removeControl(e){G.then(()=>{let i=this._findContainer(e.path);i&&i.removeControl(e.name),this._directives.delete(e)})}addFormGroup(e){G.then(()=>{let i=this._findContainer(e.path),r=new L({});ct(r,e),i.registerControl(e.name,r),r.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){G.then(()=>{let i=this._findContainer(e.path);i&&i.removeControl(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,i){G.then(()=>{this.form.get(e.path).setValue(i)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submittedReactive.set(!0),ht(this.form,this._directives),this.ngSubmit.emit(e),this.form._events.next(new re(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(i){return new(i||n)(o(m,10),o($,10),o(M,8))};static \u0275dir=l({type:n,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(i,r){i&1&&v("submit",function(a){return r.onSubmit(a)})("reset",function(){return r.onReset()})},inputs:{options:[0,"ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[c([Gt]),u]})}return n})();function Ue(n,t){let e=n.indexOf(t);e>-1&&n.splice(e,1)}function He(n){return typeof n=="object"&&n!==null&&Object.keys(n).length===2&&"value"in n&&"disabled"in n}var Me=class extends H{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(t=null,e,i){super(Ce(e),Ve(i,e)),this._applyFormState(t),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),le(e)&&(e.nonNullable||e.initialValueIsDefault)&&(He(t)?this.defaultValue=t.value:this.defaultValue=t)}setValue(t,e={}){this.value=this._pendingValue=t,this._onChange.length&&e.emitModelToViewChange!==!1&&this._onChange.forEach(i=>i(this.value,e.emitViewToModelChange!==!1)),this.updateValueAndValidity(e)}patchValue(t,e={}){this.setValue(t,e)}reset(t=this.defaultValue,e={}){this._applyFormState(t),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1,e?.emitEvent!==!1&&this._events.next(new U(this))}_updateValue(){}_anyControls(t){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(t){this._onChange.push(t)}_unregisterOnChange(t){Ue(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){Ue(this._onDisabledChange,t)}_forEachChild(t){}_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(t){He(t)?(this.value=this._pendingValue=t.value,t.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=t}},Gn=Me,Bt=n=>n instanceof Me;var Ut={provide:p,useExisting:d(()=>Ht)},Le=Promise.resolve(),Ht=(()=>{class n extends p{_changeDetectorRef;callSetDisabledState;control=new Me;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new D;constructor(e,i,r,s,a,_){super(),this._changeDetectorRef=a,this.callSetDisabledState=_,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=Ae(this,s)}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){let i=e.name.previousValue;this.formDirective.removeControl({name:i,path:this._getPath(i)})}this._setUpControl()}"isDisabled"in e&&this._updateDisabled(e),be(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(){W(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){Le.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){let i=e.isDisabled.currentValue,r=i!==0&&he(i);Le.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?ut(e,this._parent):[e]}static \u0275fac=function(i){return new(i||n)(o(C,9),o(m,10),o($,10),o(V,10),o(ce,8),o(M,8))};static \u0275dir=l({type:n,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:[c([Ut]),u,w]})}return n})();var Tn=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275dir=l({type:n,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""],standalone:!1})}return n})(),Lt={provide:V,useExisting:d(()=>Wt),multi:!0},Wt=(()=>{class n extends P{writeValue(e){let i=e??"";this.setProperty("value",i)}registerOnChange(e){this.onChange=i=>{e(i==""?null:parseFloat(i))}}static \u0275fac=(()=>{let e;return function(r){return(e||(e=f(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(i,r){i&1&&v("input",function(a){return r.onChange(a.target.value)})("blur",function(){return r.onTouched()})},standalone:!1,features:[c([Lt]),u]})}return n})(),$t={provide:V,useExisting:d(()=>zt),multi:!0};var qt=(()=>{class n{_accessors=[];add(e,i){this._accessors.push([e,i])}remove(e){for(let i=this._accessors.length-1;i>=0;--i)if(this._accessors[i][1]===e){this._accessors.splice(i,1);return}}select(e){this._accessors.forEach(i=>{this._isSameGroup(i,e)&&i[1]!==e&&i[1].fireUncheck(e.value)})}_isSameGroup(e,i){return e[0].control?e[0]._parent===i._control._parent&&e[1].name===i.name:!1}static \u0275fac=function(i){return new(i||n)};static \u0275prov=Ne({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),zt=(()=>{class n extends P{_registry;_injector;_state;_control;_fn;setDisabledStateFired=!1;onChange=()=>{};name;formControlName;value;callSetDisabledState=R(M,{optional:!0})??q;constructor(e,i,r,s){super(e,i),this._registry=r,this._injector=s}ngOnInit(){this._control=this._injector.get(p),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(i){return new(i||n)(o(I),o(F),o(qt),o(Oe))};static \u0275dir=l({type:n,selectors:[["input","type","radio","formControlName",""],["input","type","radio","formControl",""],["input","type","radio","ngModel",""]],hostBindings:function(i,r){i&1&&v("change",function(){return r.onChange()})("blur",function(){return r.onTouched()})},inputs:{name:"name",formControlName:"formControlName",value:"value"},standalone:!1,features:[c([$t]),u]})}return n})();var Ee=new A(""),Zt={provide:p,useExisting:d(()=>Xt)},Xt=(()=>{class n extends p{_ngModelWarningConfig;callSetDisabledState;viewModel;form;set isDisabled(e){}model;update=new D;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(e,i,r,s,a){super(),this._ngModelWarningConfig=s,this.callSetDisabledState=a,this._setValidators(e),this._setAsyncValidators(i),this.valueAccessor=Ae(this,r)}ngOnChanges(e){if(this._isControlChanged(e)){let i=e.form.previousValue;i&&se(i,this,!1),W(this.form,this,this.callSetDisabledState),this.form.updateValueAndValidity({emitEvent:!1})}be(e,this.viewModel)&&(this.form.setValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.form&&se(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(i){return new(i||n)(o(m,10),o($,10),o(V,10),o(Ee,8),o(M,8))};static \u0275dir=l({type:n,selectors:[["","formControl",""]],inputs:{form:[0,"formControl","form"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},exportAs:["ngForm"],standalone:!1,features:[c([Zt]),u,w]})}return n})(),Yt={provide:C,useExisting:d(()=>Kt)},Kt=(()=>{class n extends C{callSetDisabledState;get submitted(){return y(this._submittedReactive)}set submitted(e){this._submittedReactive.set(e)}_submitted=N(()=>this._submittedReactive());_submittedReactive=E(!1);_oldForm;_onCollectionChange=()=>this._updateDomValue();directives=[];form=null;ngSubmit=new D;constructor(e,i,r){super(),this.callSetDisabledState=r,this._setValidators(e),this._setAsyncValidators(i)}ngOnChanges(e){e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(ae(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(e){let i=this.form.get(e.path);return W(i,e,this.callSetDisabledState),i.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),i}getControl(e){return this.form.get(e.path)}removeControl(e){se(e.control||null,e,!1),jt(this.directives,e)}addFormGroup(e){this._setUpFormContainer(e)}removeFormGroup(e){this._cleanUpFormContainer(e)}getFormGroup(e){return this.form.get(e.path)}addFormArray(e){this._setUpFormContainer(e)}removeFormArray(e){this._cleanUpFormContainer(e)}getFormArray(e){return this.form.get(e.path)}updateModel(e,i){this.form.get(e.path).setValue(i)}onSubmit(e){return this._submittedReactive.set(!0),ht(this.form,this.directives),this.ngSubmit.emit(e),this.form._events.next(new re(this.control)),e?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(e=void 0,i={}){this.form.reset(e,i),this._submittedReactive.set(!1)}_updateDomValue(){this.directives.forEach(e=>{let i=e.control,r=this.form.get(e.path);i!==r&&(se(i||null,e),Bt(r)&&(W(r,e,this.callSetDisabledState),e.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){let i=this.form.get(e.path);ct(i,e),i.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){let i=this.form.get(e.path);i&&Rt(i,e)&&i.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){De(this.form,this),this._oldForm&&ae(this._oldForm,this)}static \u0275fac=function(i){return new(i||n)(o(m,10),o($,10),o(M,8))};static \u0275dir=l({type:n,selectors:[["","formGroup",""]],hostBindings:function(i,r){i&1&&v("submit",function(a){return r.onSubmit(a)})("reset",function(){return r.onReset()})},inputs:{form:[0,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[c([Yt]),u,w]})}return n})();var Jt={provide:p,useExisting:d(()=>Qt)},Qt=(()=>{class n extends p{_ngModelWarningConfig;_added=!1;viewModel;control;name=null;set isDisabled(e){}model;update=new D;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(e,i,r,s,a){super(),this._ngModelWarningConfig=a,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=Ae(this,s)}ngOnChanges(e){this._added||this._setUpControl(),be(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 ut(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(i){return new(i||n)(o(C,13),o(m,10),o($,10),o(V,10),o(Ee,8))};static \u0275dir=l({type:n,selectors:[["","formControlName",""]],inputs:{name:[0,"formControlName","name"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},standalone:!1,features:[c([Jt]),u,w]})}return n})();var en={provide:V,useExisting:d(()=>gt),multi:!0};function ft(n,t){return n==null?`${t}`:(t&&typeof t=="object"&&(t="Object"),`${n}: ${t}`.slice(0,50))}function tn(n){return n.split(":")[0]}var gt=(()=>{class n extends P{value;_optionMap=new Map;_idCounter=0;set compareWith(e){this._compareWith=e}_compareWith=Object.is;appRefInjector=R(ke).injector;destroyRef=R(xe);cdr=R(ce);_queuedWrite=!1;_writeValueAfterRender(){this._queuedWrite||this.appRefInjector.destroyed||(this._queuedWrite=!0,Pe({write:()=>{this.destroyRef.destroyed||(this._queuedWrite=!1,this.writeValue(this.value))}},{injector:this.appRefInjector}))}writeValue(e){this.cdr.markForCheck(),this.value=e;let i=this._getOptionId(e),r=ft(i,e);this.setProperty("value",r)}registerOnChange(e){this.onChange=i=>{this.value=this._getOptionValue(i),e(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(e){for(let i of this._optionMap.keys())if(this._compareWith(this._optionMap.get(i),e))return i;return null}_getOptionValue(e){let i=tn(e);return this._optionMap.has(i)?this._optionMap.get(i):e}static \u0275fac=(()=>{let e;return function(r){return(e||(e=f(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(i,r){i&1&&v("change",function(a){return r.onChange(a.target.value)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[c([en]),u]})}return n})(),Bn=(()=>{class n{_element;_renderer;_select;id;constructor(e,i,r){this._element=e,this._renderer=i,this._select=r,this._select&&(this.id=this._select._registerOption())}set ngValue(e){this._select!=null&&(this._select._optionMap.set(this.id,e),this._setElementValue(ft(this.id,e)),this._select._writeValueAfterRender())}set value(e){this._setElementValue(e),this._select&&this._select._writeValueAfterRender()}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select._writeValueAfterRender())}static \u0275fac=function(i){return new(i||n)(o(F),o(I),o(gt,9))};static \u0275dir=l({type:n,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return n})(),nn={provide:V,useExisting:d(()=>pt),multi:!0};function We(n,t){return n==null?`${t}`:(typeof t=="string"&&(t=`'${t}'`),t&&typeof t=="object"&&(t="Object"),`${n}: ${t}`.slice(0,50))}function rn(n){return n.split(":")[0]}var pt=(()=>{class n extends P{value;_optionMap=new Map;_idCounter=0;set compareWith(e){this._compareWith=e}_compareWith=Object.is;writeValue(e){this.value=e;let i;if(Array.isArray(e)){let r=e.map(s=>this._getOptionId(s));i=(s,a)=>{s._setSelected(r.indexOf(a.toString())>-1)}}else i=(r,s)=>{r._setSelected(!1)};this._optionMap.forEach(i)}registerOnChange(e){this.onChange=i=>{let r=[],s=i.selectedOptions;if(s!==void 0){let a=s;for(let _=0;_<a.length;_++){let Z=a[_],ue=this._getOptionValue(Z.value);r.push(ue)}}else{let a=i.options;for(let _=0;_<a.length;_++){let Z=a[_];if(Z.selected){let ue=this._getOptionValue(Z.value);r.push(ue)}}}this.value=r,e(r)}}_registerOption(e){let i=(this._idCounter++).toString();return this._optionMap.set(i,e),i}_getOptionId(e){for(let i of this._optionMap.keys())if(this._compareWith(this._optionMap.get(i)._value,e))return i;return null}_getOptionValue(e){let i=rn(e);return this._optionMap.has(i)?this._optionMap.get(i)._value:e}static \u0275fac=(()=>{let e;return function(r){return(e||(e=f(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(i,r){i&1&&v("change",function(a){return r.onChange(a.target)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[c([nn]),u]})}return n})(),Un=(()=>{class n{_element;_renderer;_select;id;_value;constructor(e,i,r){this._element=e,this._renderer=i,this._select=r,this._select&&(this.id=this._select._registerOption(this))}set ngValue(e){this._select!=null&&(this._value=e,this._setElementValue(We(this.id,e)),this._select.writeValue(this._select.value))}set value(e){this._select?(this._value=e,this._setElementValue(We(this.id,e)),this._select.writeValue(this._select.value)):this._setElementValue(e)}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e)}_setSelected(e){this._renderer.setProperty(this._element.nativeElement,"selected",e)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}static \u0275fac=function(i){return new(i||n)(o(F),o(I),o(pt,9))};static \u0275dir=l({type:n,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return n})();function sn(n){return typeof n=="number"?n:parseInt(n,10)}function mt(n){return typeof n=="number"?n:parseFloat(n)}var z=(()=>{class n{_validator=Q;_onChange;_enabled;ngOnChanges(e){if(this.inputName in e){let i=this.normalizeInput(e[this.inputName].currentValue);this._enabled=this.enabled(i),this._validator=this._enabled?this.createValidator(i):Q,this._onChange&&this._onChange()}}validate(e){return this._validator(e)}registerOnValidatorChange(e){this._onChange=e}enabled(e){return e!=null}static \u0275fac=function(i){return new(i||n)};static \u0275dir=l({type:n,features:[w]})}return n})(),on={provide:m,useExisting:d(()=>an),multi:!0},an=(()=>{class n extends z{max;inputName="max";normalizeInput=e=>mt(e);createValidator=e=>Ze(e);static \u0275fac=(()=>{let e;return function(r){return(e||(e=f(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["input","type","number","max","","formControlName",""],["input","type","number","max","","formControl",""],["input","type","number","max","","ngModel",""]],hostVars:1,hostBindings:function(i,r){i&2&&S("max",r._enabled?r.max:null)},inputs:{max:"max"},standalone:!1,features:[c([on]),u]})}return n})(),ln={provide:m,useExisting:d(()=>un),multi:!0},un=(()=>{class n extends z{min;inputName="min";normalizeInput=e=>mt(e);createValidator=e=>ze(e);static \u0275fac=(()=>{let e;return function(r){return(e||(e=f(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["input","type","number","min","","formControlName",""],["input","type","number","min","","formControl",""],["input","type","number","min","","ngModel",""]],hostVars:1,hostBindings:function(i,r){i&2&&S("min",r._enabled?r.min:null)},inputs:{min:"min"},standalone:!1,features:[c([ln]),u]})}return n})(),dn={provide:m,useExisting:d(()=>cn),multi:!0};var cn=(()=>{class n extends z{required;inputName="required";normalizeInput=he;createValidator=e=>Xe;enabled(e){return e}static \u0275fac=(()=>{let e;return function(r){return(e||(e=f(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(i,r){i&2&&S("required",r._enabled?"":null)},inputs:{required:"required"},standalone:!1,features:[c([dn]),u]})}return n})();var hn={provide:m,useExisting:d(()=>fn),multi:!0},fn=(()=>{class n extends z{maxlength;inputName="maxlength";normalizeInput=e=>sn(e);createValidator=e=>Ye(e);static \u0275fac=(()=>{let e;return function(r){return(e||(e=f(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["","maxlength","","formControlName",""],["","maxlength","","formControl",""],["","maxlength","","ngModel",""]],hostVars:1,hostBindings:function(i,r){i&2&&S("maxlength",r._enabled?r.maxlength:null)},inputs:{maxlength:"maxlength"},standalone:!1,features:[c([hn]),u]})}return n})(),gn={provide:m,useExisting:d(()=>pn),multi:!0},pn=(()=>{class n extends z{pattern;inputName="pattern";normalizeInput=e=>e;createValidator=e=>Ke(e);static \u0275fac=(()=>{let e;return function(r){return(e||(e=f(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["","pattern","","formControlName",""],["","pattern","","formControl",""],["","pattern","","ngModel",""]],hostVars:1,hostBindings:function(i,r){i&2&&S("pattern",r._enabled?r.pattern:null)},inputs:{pattern:"pattern"},standalone:!1,features:[c([gn]),u]})}return n})();var _t=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=K({type:n});static \u0275inj=Y({})}return n})(),pe=class extends H{constructor(t,e,i){super(Ce(e),Ve(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;at(t){return this.controls[this._adjustIndex(t)]}push(t,e={}){Array.isArray(t)?t.forEach(i=>{this.controls.push(i),this._registerControl(i)}):(this.controls.push(t),this._registerControl(t)),this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}insert(t,e,i={}){this.controls.splice(t,0,e),this._registerControl(e),this.updateValueAndValidity({emitEvent:i.emitEvent})}removeAt(t,e={}){let i=this._adjustIndex(t);i<0&&(i=0),this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),this.controls.splice(i,1),this.updateValueAndValidity({emitEvent:e.emitEvent})}setControl(t,e,i={}){let r=this._adjustIndex(t);r<0&&(r=0),this.controls[r]&&this.controls[r]._registerOnCollectionChange(()=>{}),this.controls.splice(r,1),e&&(this.controls.splice(r,0,e),this._registerControl(e)),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(t,e={}){lt(this,!1,t),t.forEach((i,r)=>{at(this,!1,r),this.at(r).setValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){t!=null&&(t.forEach((i,r)=>{this.at(r)&&this.at(r).patchValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t=[],e={}){this._forEachChild((i,r)=>{i.reset(t[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e),e?.emitEvent!==!1&&this._events.next(new U(this))}getRawValue(){return this.controls.map(t=>t.getRawValue())}clear(t={}){this.controls.length<1||(this._forEachChild(e=>e._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:t.emitEvent}))}_adjustIndex(t){return t<0?t+this.length:t}_syncPendingControls(){let t=this.controls.reduce((e,i)=>i._syncPendingControls()?!0:e,!1);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){this.controls.forEach((e,i)=>{t(e,i)})}_updateValue(){this.value=this.controls.filter(t=>t.enabled||this.disabled).map(t=>t.value)}_anyControls(t){return this.controls.some(e=>e.enabled&&t(e))}_setUpControls(){this._forEachChild(t=>this._registerControl(t))}_allControlsDisabled(){for(let t of this.controls)if(t.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(t){t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)}_find(t){return this.at(t)??null}},Hn=pe;var Ln=(()=>{class n{static withConfig(e){return{ngModule:n,providers:[{provide:M,useValue:e.callSetDisabledState??q}]}}static \u0275fac=function(i){return new(i||n)};static \u0275mod=K({type:n});static \u0275inj=Y({imports:[_t]})}return n})(),Wn=(()=>{class n{static withConfig(e){return{ngModule:n,providers:[{provide:Ee,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:M,useValue:e.callSetDisabledState??q}]}}static \u0275fac=function(i){return new(i||n)};static \u0275mod=K({type:n});static \u0275inj=Y({imports:[_t]})}return n})();export{V as a,yt as b,qe as c,je as d,Pn as e,Rn as f,L as g,kn as h,Tt as i,Me as j,Gn as k,Ht as l,Tn as m,Wt as n,zt as o,Xt as p,Kt as q,Qt as r,gt as s,Bn as t,pt as u,Un as v,an as w,un as x,cn as y,fn as z,pn as A,Hn as B,Ln as C,Wn as D};
@@ -0,0 +1 @@
1
+ import{Aa as M,C as at,D as lt,Da as Q,Db as _t,E as Pt,Eb as yt,Ec as Kt,Ib as Tt,Ka as Ht,Kb as $t,La as gt,Lb as V,Nb as f,O as Mt,Qa as a,R as P,Rc as Ct,Ta as mt,Xa as Bt,Xb as $,Zb as v,_ as ut,_a as x,_b as b,a as c,ac as L,b as F,ba as ct,db as vt,e as ne,eb as bt,ed as zt,gb as Vt,ia as d,ja as ht,jb as N,la as Y,ma as S,n as p,na as u,nd as qt,oa as Nt,ob as W,pb as H,s as k,sa as dt,ta as ft,u as D,wa as J,wb as h,xa as pt,xb as g,y as ot,yb as m,zb as B}from"./chunk-G4QH622U.js";var Xt=ne((xi,Ne)=>{Ne.exports={name:"homebridge-config-ui-x",displayName:"Homebridge UI",type:"module",version:"5.11.2",description:"A web based management, configuration and control platform for Homebridge.",author:"oznu <dev@oz.nu>",license:"MIT",funding:[{type:"github",url:"https://github.com/sponsors/oznu"},{type:"paypal",url:"https://paypal.me/oznu"}],repository:{type:"git",url:"git+https://github.com/homebridge/homebridge-config-ui-x.git"},bugs:{url:"https://github.com/homebridge/homebridge-config-ui-x/issues"},keywords:["homebridge-plugin","ui","gui","web","homebridge","homebridge-config-ui-x","ui-x","config-ui-x","homebridge-x","homebridge server","homebridge ui","homebridge-ui","homebridge gui","homebridge-gui","web interface","config ui","management","config editor","linux","macOS","osx","windows","raspberry pi","accessory control","smart home","hb-service"],main:"./dist/index.js",bin:{"hb-service":"dist/bin/hb-service.js"},engines:{node:"^20.19.0 || ^22.12.0 || ^24.0.0",homebridge:"^1.8.0 || ^2.0.0-alpha.0"},scripts:{build:"npm run build:server && npm run build:ui","build:server":"rimraf dist && tsc -p tsconfig.build.json","build:ui":"npm run build --prefix ui",check:"npm run check:server && npm run check:ui","check:server":"npm install && npm outdated","check:ui":"npm install --prefix ui && npm outdated --prefix ui","lang-sync":"tsx scripts/lang-sync.ts",lint:"eslint . --max-warnings=0","lint:fix":"npm run lint -- --fix",prepublishOnly:"npm i --package-lock-only && npm run lint && npm run build",start:"tsx src/main.ts",test:"vitest run","test-coverage":"npm run test -- --coverage","upgrade-install":"./scripts/upgrade-install.sh",watch:'concurrently "npm run watch:ui" "npm run watch:server"',"watch:server":"nodemon","watch:ui":"npm run start --prefix ui"},dependencies:{"@fastify/helmet":"13.0.2","@fastify/multipart":"9.3.0","@fastify/static":"8.3.0","@homebridge/hap-client":"3.1.2","@homebridge/node-pty-prebuilt-multiarch":"0.13.1","@nestjs/axios":"4.0.1","@nestjs/common":"11.1.9","@nestjs/core":"11.1.9","@nestjs/jwt":"11.0.2","@nestjs/passport":"11.0.5","@nestjs/platform-fastify":"11.1.9","@nestjs/platform-socket.io":"11.1.9","@nestjs/swagger":"11.2.3","@nestjs/websockets":"11.1.9",axios:"1.13.2","bash-color":"0.0.4","bonjour-service":"1.3.0","class-transformer":"0.5.1","class-validator":"0.14.3",commander:"14.0.2",dayjs:"1.11.19",fastify:"5.6.2","fs-extra":"11.3.2",jsonwebtoken:"9.0.3",lodash:"4.17.21","node-cache":"5.1.2","node-schedule":"2.1.1",ora:"9.0.0",otplib:"12.0.1","p-limit":"7.2.0",passport:"0.7.0","passport-jwt":"4.0.1","reflect-metadata":"0.2.2",rxjs:"7.8.2",semver:"7.7.3",systeminformation:"5.27.11",tail:"2.2.6",tar:"7.5.2","tcp-port-used":"1.0.2",unzipper:"0.12.3"},devDependencies:{"@antfu/eslint-config":"^6.4.2","@nestjs/testing":"^11.1.9","@prettier/plugin-xml":"^3.4.2","@types/fs-extra":"^11.0.4","@types/lodash":"^4.17.21","@types/node":"^24.10.1","@types/node-schedule":"^2.1.8","@types/passport-jwt":"^4.0.1","@types/semver":"^7.7.1","@types/tail":"^2.2.3","@types/tcp-port-used":"^1.0.4","@types/unzipper":"^0.10.11","@vitest/coverage-v8":"^4.0.15",concurrently:"^9.2.1","eslint-plugin-format":"^1.1.0","form-data":"^4.0.5",nodemon:"^3.1.11",rimraf:"^6.1.2",tsx:"^4.21.0",typescript:"^5.9.3","unplugin-swc":"^1.5.9",vitest:"^4.0.15"},overrides:{"@homebridge/hap-client":{axios:"1.13.2"}},maintainers:[{email:"bwp91@icloud.com",name:"bwp91"},{email:"dev@oz.nu",name:"oznu"},{email:"northern.man1@gmail.com",name:"northernman"},{email:"mail@anderl-bauer.de",name:"supereg"},{email:"khaos.tian@gmail.com",name:"khaost"},{email:"erik.baauw@xs4all.nl",name:"ebaauw"},{email:"donavan.becker@icloud.com",name:"donavanbecker"},{email:"dustin.greif@gmail.com",name:"dustin.greif"},{email:"nfarina@gmail.com",name:"nfarina"}],scarfSettings:{enabled:!1}}});var y=(function(e){return e[e.State=0]="State",e[e.Transition=1]="Transition",e[e.Sequence=2]="Sequence",e[e.Group=3]="Group",e[e.Animate=4]="Animate",e[e.Keyframes=5]="Keyframes",e[e.Style=6]="Style",e[e.Trigger=7]="Trigger",e[e.Reference=8]="Reference",e[e.AnimateChild=9]="AnimateChild",e[e.AnimateRef=10]="AnimateRef",e[e.Query=11]="Query",e[e.Stagger=12]="Stagger",e})(y||{}),se="*";function xt(e,n){return{type:y.Trigger,name:e,definitions:n,options:{}}}function X(e,n=null){return{type:y.Animate,styles:n,timings:e}}function He(e,n=null){return{type:y.Sequence,steps:e,options:n}}function K(e){return{type:y.Style,styles:e,offset:null}}function z(e,n,t){return{type:y.State,name:e,styles:n,options:t}}function tt(e,n,t=null){return{type:y.Transition,expr:e,animation:n,options:t}}var wt=class{_onDoneFns=[];_onStartFns=[];_onDestroyFns=[];_originalOnDoneFns=[];_originalOnStartFns=[];_started=!1;_destroyed=!1;_finished=!1;_position=0;parentPlayer=null;totalTime;constructor(n=0,t=0){this.totalTime=n+t}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(n=>n()),this._onDoneFns=[])}onStart(n){this._originalOnStartFns.push(n),this._onStartFns.push(n)}onDone(n){this._originalOnDoneFns.push(n),this._onDoneFns.push(n)}onDestroy(n){this._onDestroyFns.push(n)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){queueMicrotask(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(n=>n()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(n=>n()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(n){this._position=this.totalTime?n*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(n){let t=n=="start"?this._onStartFns:this._onDoneFns;t.forEach(i=>i()),t.length=0}},Dt=class{_onDoneFns=[];_onStartFns=[];_finished=!1;_started=!1;_destroyed=!1;_onDestroyFns=[];parentPlayer=null;totalTime=0;players;constructor(n){this.players=n;let t=0,i=0,s=0,r=this.players.length;r==0?queueMicrotask(()=>this._onFinish()):this.players.forEach(o=>{o.onDone(()=>{++t==r&&this._onFinish()}),o.onDestroy(()=>{++i==r&&this._onDestroy()}),o.onStart(()=>{++s==r&&this._onStart()})}),this.totalTime=this.players.reduce((o,l)=>Math.max(o,l.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(n=>n()),this._onDoneFns=[])}init(){this.players.forEach(n=>n.init())}onStart(n){this._onStartFns.push(n)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(n=>n()),this._onStartFns=[])}onDone(n){this._onDoneFns.push(n)}onDestroy(n){this._onDestroyFns.push(n)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(n=>n.play())}pause(){this.players.forEach(n=>n.pause())}restart(){this.players.forEach(n=>n.restart())}finish(){this._onFinish(),this.players.forEach(n=>n.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(n=>n.destroy()),this._onDestroyFns.forEach(n=>n()),this._onDestroyFns=[])}reset(){this.players.forEach(n=>n.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(n){let t=n*this.totalTime;this.players.forEach(i=>{let s=i.totalTime?Math.min(1,t/i.totalTime):1;i.setPosition(s)})}getPosition(){let n=this.players.reduce((t,i)=>t===null||i.totalTime>t.totalTime?i:t,null);return n!=null?n.getPosition():0}beforeDestroy(){this.players.forEach(n=>{n.beforeDestroy&&n.beforeDestroy()})}triggerCallback(n){let t=n=="start"?this._onStartFns:this._onDoneFns;t.forEach(i=>i()),t.length=0}},re="!";var G=class{},le=(()=>{class e{handle(t){return t.key}static \u0275fac=function(i){return new(i||e)};static \u0275prov=d({token:e,factory:e.\u0275fac})}return e})(),O=class{},ue=(()=>{class e extends O{compile(t,i){return t}compileTranslations(t,i){return t}static \u0275fac=(()=>{let t;return function(s){return(t||(t=Q(e)))(s||e)}})();static \u0275prov=d({token:e,factory:e.\u0275fac})}return e})(),E=class{},ce=(()=>{class e extends E{getTranslation(t){return k({})}static \u0275fac=(()=>{let t;return function(s){return(t||(t=Q(e)))(s||e)}})();static \u0275prov=d({token:e,factory:e.\u0275fac})}return e})();function et(e,n){if(e===n)return!0;if(e===null||n===null)return!1;if(e!==e&&n!==n)return!0;let t=typeof e,i=typeof n,s;if(t==i&&t=="object")if(Array.isArray(e)){if(!Array.isArray(n))return!1;if((s=e.length)==n.length){for(let r=0;r<s;r++)if(!et(e[r],n[r]))return!1;return!0}}else{if(Array.isArray(n))return!1;if(_(e)&&_(n)){let r=Object.create(null);for(let o in e){if(!et(e[o],n[o]))return!1;r[o]=!0}for(let o in n)if(!(o in r)&&typeof n[o]<"u")return!1;return!0}}return!1}function T(e){return typeof e<"u"&&e!==null}function Zt(e){return e!==void 0}function _(e){return Z(e)&&!I(e)&&e!==null}function Z(e){return typeof e=="object"&&e!==null}function I(e){return Array.isArray(e)}function it(e){return typeof e=="string"}function he(e){return typeof e=="function"}function nt(e){if(I(e))return e.map(n=>nt(n));if(_(e)){let n={};return Object.keys(e).forEach(t=>{n[t]=nt(e[t])}),n}else return e}function St(e,n){if(!Z(e))return nt(n);let t=nt(e);return Z(t)&&Z(n)&&Object.keys(n).forEach(i=>{_(n[i])?i in e?t[i]=St(e[i],n[i]):Object.assign(t,{[i]:n[i]}):Object.assign(t,{[i]:n[i]})}),t}function Ut(e,n){let t=n.split(".");n="";do{n+=t.shift();let i=!t.length;if(T(e)){if(_(e)&&Zt(e[n])&&(_(e[n])||I(e[n])||i)){e=e[n],n="";continue}if(I(e)){let s=parseInt(n,10);if(Zt(e[s])&&(_(e[s])||I(e[s])||i)){e=e[s],n="";continue}}}if(i){e=void 0;continue}n+="."}while(t.length);return e}function de(e,n,t){return St(e,fe(n,t))}function fe(e,n){return e.split(".").reduceRight((t,i)=>({[i]:t}),n)}var A=class{},pe=(()=>{class e extends A{templateMatcher=/{{\s?([^{}\s]*)\s?}}/g;interpolate(t,i){if(it(t))return this.interpolateString(t,i);if(he(t))return this.interpolateFunction(t,i)}interpolateFunction(t,i){return t(i)}interpolateString(t,i){return i?t.replace(this.templateMatcher,(s,r)=>{let o=this.getInterpolationReplacement(i,r);return o!==void 0?o:s}):t}getInterpolationReplacement(t,i){return this.formatValue(Ut(t,i))}formatValue(t){if(it(t))return t;if(typeof t=="number"||typeof t=="boolean")return t.toString();if(t===null)return"null";if(I(t))return t.join(", ");if(Z(t))return typeof t.toString=="function"&&t.toString!==Object.prototype.toString?t.toString():JSON.stringify(t)}static \u0275fac=(()=>{let t;return function(s){return(t||(t=Q(e)))(s||e)}})();static \u0275prov=d({token:e,factory:e.\u0275fac})}return e})(),Lt=(()=>{class e{_onTranslationChange=new p;_onLangChange=new p;_onFallbackLangChange=new p;fallbackLang=null;currentLang;translations={};languages=[];getTranslations(t){return this.translations[t]}setTranslations(t,i,s){this.translations[t]=s&&this.hasTranslationFor(t)?St(this.translations[t],i):i,this.addLanguages([t]),this._onTranslationChange.next({lang:t,translations:this.getTranslations(t)})}getLanguages(){return this.languages}getCurrentLang(){return this.currentLang}getFallbackLang(){return this.fallbackLang}setFallbackLang(t,i=!0){this.fallbackLang=t,i&&this._onFallbackLangChange.next({lang:t,translations:this.translations[t]})}setCurrentLang(t,i=!0){this.currentLang=t,i&&this._onLangChange.next({lang:t,translations:this.translations[t]})}get onTranslationChange(){return this._onTranslationChange.asObservable()}get onLangChange(){return this._onLangChange.asObservable()}get onFallbackLangChange(){return this._onFallbackLangChange.asObservable()}addLanguages(t){this.languages=Array.from(new Set([...this.languages,...t]))}hasTranslationFor(t){return typeof this.translations[t]<"u"}deleteTranslations(t){delete this.translations[t]}getTranslation(t){let i=this.getValue(this.currentLang,t);return i===void 0&&this.fallbackLang!=null&&this.fallbackLang!==this.currentLang&&(i=this.getValue(this.fallbackLang,t)),i}getValue(t,i){return Ut(this.getTranslations(t),i)}static \u0275fac=function(i){return new(i||e)};static \u0275prov=d({token:e,factory:e.\u0275fac})}return e})(),It=new Y("TRANSLATE_CONFIG"),q=e=>D(e)?e:k(e);var Ft=(()=>{class e{loadingTranslations;pending=!1;_translationRequests={};lastUseLanguage=null;currentLoader=u(E);compiler=u(O);parser=u(A);missingTranslationHandler=u(G);store=u(Lt);extend=!1;get onTranslationChange(){return this.store.onTranslationChange}get onLangChange(){return this.store.onLangChange}get onFallbackLangChange(){return this.store.onFallbackLangChange}get onDefaultLangChange(){return this.store.onFallbackLangChange}constructor(){let t=c({extend:!1,fallbackLang:null},u(It,{optional:!0}));t.lang&&this.use(t.lang),t.fallbackLang&&this.setFallbackLang(t.fallbackLang),t.extend&&(this.extend=!0)}setFallbackLang(t){this.getFallbackLang()||this.store.setFallbackLang(t,!1);let i=this.loadOrExtendLanguage(t);return D(i)?(i.pipe(P(1)).subscribe({next:()=>{this.store.setFallbackLang(t)},error:()=>{}}),i):(this.store.setFallbackLang(t),k(this.store.getTranslations(t)))}use(t){this.lastUseLanguage=t,this.getCurrentLang()||this.store.setCurrentLang(t,!1);let i=this.loadOrExtendLanguage(t);return D(i)?(i.pipe(P(1)).subscribe({next:()=>{this.changeLang(t)},error:()=>{}}),i):(this.changeLang(t),k(this.store.getTranslations(t)))}loadOrExtendLanguage(t){if(!this.store.hasTranslationFor(t)||this.extend)return this._translationRequests[t]=this._translationRequests[t]||this.loadAndCompileTranslations(t),this._translationRequests[t]}changeLang(t){t===this.lastUseLanguage&&this.store.setCurrentLang(t)}getCurrentLang(){return this.store.getCurrentLang()}loadAndCompileTranslations(t){this.pending=!0;let i=this.currentLoader.getTranslation(t).pipe(ut(1),P(1));return this.loadingTranslations=i.pipe(ot(s=>this.compiler.compileTranslations(s,t)),ut(1),P(1)),this.loadingTranslations.subscribe({next:s=>{this.store.setTranslations(t,s,this.extend),this.pending=!1},error:s=>{this.pending=!1}}),i}setTranslation(t,i,s=!1){let r=this.compiler.compileTranslations(i,t);this.store.setTranslations(t,r,s||this.extend)}getLangs(){return this.store.getLanguages()}addLangs(t){this.store.addLanguages(t)}getParsedResultForKey(t,i){let s=this.getTextToInterpolate(t);if(T(s))return this.runInterpolation(s,i);let r=this.missingTranslationHandler.handle(c({key:t,translateService:this},i!==void 0&&{interpolateParams:i}));return r!==void 0?r:t}getFallbackLang(){return this.store.getFallbackLang()}getTextToInterpolate(t){return this.store.getTranslation(t)}runInterpolation(t,i){if(T(t))return I(t)?this.runInterpolationOnArray(t,i):_(t)?this.runInterpolationOnDict(t,i):this.parser.interpolate(t,i)}runInterpolationOnArray(t,i){return t.map(s=>this.runInterpolation(s,i))}runInterpolationOnDict(t,i){let s={};for(let r in t){let o=this.runInterpolation(t[r],i);o!==void 0&&(s[r]=o)}return s}getParsedResult(t,i){return t instanceof Array?this.getParsedResultForArray(t,i):this.getParsedResultForKey(t,i)}getParsedResultForArray(t,i){let s={},r=!1;for(let l of t)s[l]=this.getParsedResultForKey(l,i),r=r||D(s[l]);if(!r)return s;let o=t.map(l=>q(s[l]));return Pt(o).pipe(ot(l=>{let C={};return l.forEach((U,w)=>{C[t[w]]=U}),C}))}get(t,i){if(!T(t)||!t.length)throw new Error('Parameter "key" is required and cannot be empty');return this.pending?this.loadingTranslations.pipe(Mt(()=>q(this.getParsedResult(t,i)))):q(this.getParsedResult(t,i))}getStreamOnTranslationChange(t,i){if(!T(t)||!t.length)throw new Error('Parameter "key" is required and cannot be empty');return at(lt(()=>this.get(t,i)),this.onTranslationChange.pipe(ct(()=>{let s=this.getParsedResult(t,i);return q(s)})))}stream(t,i){if(!T(t)||!t.length)throw new Error('Parameter "key" required');return at(lt(()=>this.get(t,i)),this.onLangChange.pipe(ct(()=>{let s=this.getParsedResult(t,i);return q(s)})))}instant(t,i){if(!T(t)||t.length===0)throw new Error('Parameter "key" is required and cannot be empty');let s=this.getParsedResult(t,i);return D(s)?Array.isArray(t)?t.reduce((r,o)=>(r[o]=o,r),{}):t:s}set(t,i,s=this.getCurrentLang()){this.store.setTranslations(s,de(this.store.getTranslations(s),t,it(i)?this.compiler.compile(i,s):this.compiler.compileTranslations(i,s)),!1)}reloadLang(t){return this.resetLang(t),this.loadAndCompileTranslations(t)}resetLang(t){delete this._translationRequests[t],this.store.deleteTranslations(t)}static getBrowserLang(){if(typeof window>"u"||!window.navigator)return;let t=this.getBrowserCultureLang();return t?t.split(/[-_]/)[0]:void 0}static getBrowserCultureLang(){if(!(typeof window>"u"||typeof window.navigator>"u"))return window.navigator.languages?window.navigator.languages[0]:window.navigator.language||window.navigator.browserLanguage||window.navigator.userLanguage}getBrowserLang(){return e.getBrowserLang()}getBrowserCultureLang(){return e.getBrowserCultureLang()}get defaultLang(){return this.getFallbackLang()}get currentLang(){return this.store.getCurrentLang()}get langs(){return this.store.getLanguages()}setDefaultLang(t){return this.setFallbackLang(t)}getDefaultLang(){return this.getFallbackLang()}static \u0275fac=function(i){return new(i||e)};static \u0275prov=d({token:e,factory:e.\u0275fac})}return e})();var Ye=(()=>{class e{translate=u(Ft);_ref=u(Kt);value="";lastKey=null;lastParams=[];onTranslationChange;onLangChange;onFallbackLangChange;updateValue(t,i,s){let r=o=>{this.value=o!==void 0?o:t,this.lastKey=t,this._ref.markForCheck()};if(s){let o=this.translate.getParsedResult(t,i);D(o)?o.subscribe(r):r(o)}this.translate.get(t,i).subscribe(r)}transform(t,...i){if(!t||!t.length)return t;if(et(t,this.lastKey)&&et(i,this.lastParams))return this.value;let s;if(T(i[0])&&i.length)if(it(i[0])&&i[0].length){let r=i[0].replace(/(')?([a-zA-Z0-9_]+)(')?(\s)?:/g,'"$2":').replace(/:(\s)?(')(.*?)(')/g,':"$3"');try{s=JSON.parse(r)}catch(o){throw new SyntaxError(`Wrong parameter in TranslatePipe. Expected a valid Object, received: ${i[0]}`)}}else _(i[0])&&(s=i[0]);return this.lastKey=t,this.lastParams=i,this.updateValue(t,s),this._dispose(),this.onTranslationChange||(this.onTranslationChange=this.translate.onTranslationChange.subscribe(r=>{(this.lastKey&&r.lang===this.translate.getCurrentLang()||r.lang===this.translate.getFallbackLang())&&(this.lastKey=null,this.updateValue(t,s,r.translations))})),this.onLangChange||(this.onLangChange=this.translate.onLangChange.subscribe(r=>{this.lastKey&&(this.lastKey=null,this.updateValue(t,s,r.translations))})),this.onFallbackLangChange||(this.onFallbackLangChange=this.translate.onFallbackLangChange.subscribe(()=>{this.lastKey&&(this.lastKey=null,this.updateValue(t,s))})),this.value}_dispose(){typeof this.onTranslationChange<"u"&&(this.onTranslationChange.unsubscribe(),this.onTranslationChange=void 0),typeof this.onLangChange<"u"&&(this.onLangChange.unsubscribe(),this.onLangChange=void 0),typeof this.onFallbackLangChange<"u"&&(this.onFallbackLangChange.unsubscribe(),this.onFallbackLangChange=void 0)}ngOnDestroy(){this._dispose()}static \u0275fac=function(i){return new(i||e)};static \u0275pipe=Vt({name:"translate",type:e,pure:!1});static \u0275prov=d({token:e,factory:e.\u0275fac})}return e})();function ge(e){return{provide:E,useClass:e}}function me(e){return{provide:O,useClass:e}}function ve(e){return{provide:A,useClass:e}}function be(e){return{provide:G,useClass:e}}function Je(e={}){return _e(c({compiler:me(ue),parser:ve(pe),loader:ge(ce),missingTranslationHandler:be(le)},e),!0)}function _e(e={},n){let t=[];e.loader&&t.push(e.loader),e.compiler&&t.push(e.compiler),e.parser&&t.push(e.parser),e.missingTranslationHandler&&t.push(e.missingTranslationHandler),n&&t.push(Lt),(e.useDefaultLang||e.defaultLanguage)&&(console.warn("The `useDefaultLang` and `defaultLanguage` options are deprecated. Please use `fallbackLang` instead."),e.useDefaultLang===!0&&e.defaultLanguage&&(e.fallbackLang=e.defaultLanguage));let i={fallbackLang:e.fallbackLang??null,lang:e.lang,extend:e.extend??!1};return t.push({provide:It,useValue:i}),t.push({provide:Ft,useClass:Ft,deps:[Lt,E,O,A,G,It]}),t}var Yt=["toast-component",""];function ye(e,n){if(e&1){let t=Tt();g(0,"button",5),V("click",function(){dt(t);let s=f();return ft(s.remove())}),g(1,"span",6),b(2,"\xD7"),m()()}}function Te(e,n){if(e&1&&(_t(0),b(1),yt()),e&2){let t=f(2);a(),L("[",t.duplicatesCount+1,"]")}}function Ce(e,n){if(e&1&&(g(0,"div"),b(1),N(2,Te,2,1,"ng-container",4),m()),e&2){let t=f();v(t.options.titleClass),H("aria-label",t.title),a(),L(" ",t.title," "),a(),h("ngIf",t.duplicatesCount)}}function we(e,n){if(e&1&&B(0,"div",7),e&2){let t=f();v(t.options.messageClass),h("innerHTML",t.message,gt)}}function De(e,n){if(e&1&&(g(0,"div",8),b(1),m()),e&2){let t=f();v(t.options.messageClass),H("aria-label",t.message),a(),L(" ",t.message," ")}}function xe(e,n){if(e&1&&(g(0,"div"),B(1,"div",9),m()),e&2){let t=f();a(),$("width",t.width()+"%")}}function Le(e,n){if(e&1){let t=Tt();g(0,"button",5),V("click",function(){dt(t);let s=f();return ft(s.remove())}),g(1,"span",6),b(2,"\xD7"),m()()}}function Ie(e,n){if(e&1&&(_t(0),b(1),yt()),e&2){let t=f(2);a(),L("[",t.duplicatesCount+1,"]")}}function Fe(e,n){if(e&1&&(g(0,"div"),b(1),N(2,Ie,2,1,"ng-container",4),m()),e&2){let t=f();v(t.options.titleClass),H("aria-label",t.title),a(),L(" ",t.title," "),a(),h("ngIf",t.duplicatesCount)}}function Se(e,n){if(e&1&&B(0,"div",7),e&2){let t=f();v(t.options.messageClass),h("innerHTML",t.message,gt)}}function Oe(e,n){if(e&1&&(g(0,"div",8),b(1),m()),e&2){let t=f();v(t.options.messageClass),H("aria-label",t.message),a(),L(" ",t.message," ")}}function Ee(e,n){if(e&1&&(g(0,"div"),B(1,"div",9),m()),e&2){let t=f();a(),$("width",t.width()+"%")}}var Ot=class{_attachedHost;component;viewContainerRef;injector;constructor(n,t){this.component=n,this.injector=t}attach(n,t){return this._attachedHost=n,n.attach(this,t)}detach(){let n=this._attachedHost;if(n)return this._attachedHost=void 0,n.detach()}get isAttached(){return this._attachedHost!=null}setAttachedHost(n){this._attachedHost=n}},Et=class{_attachedPortal;_disposeFn;attach(n,t){return this._attachedPortal=n,this.attachComponentPortal(n,t)}detach(){this._attachedPortal&&this._attachedPortal.setAttachedHost(),this._attachedPortal=void 0,this._disposeFn&&(this._disposeFn(),this._disposeFn=void 0)}setDisposeFn(n){this._disposeFn=n}},At=class{_overlayRef;componentInstance;duplicatesCount=0;_afterClosed=new p;_activate=new p;_manualClose=new p;_resetTimeout=new p;_countDuplicate=new p;constructor(n){this._overlayRef=n}manualClose(){this._manualClose.next(),this._manualClose.complete()}manualClosed(){return this._manualClose.asObservable()}timeoutReset(){return this._resetTimeout.asObservable()}countDuplicate(){return this._countDuplicate.asObservable()}close(){this._overlayRef.detach(),this._afterClosed.next(),this._manualClose.next(),this._afterClosed.complete(),this._manualClose.complete(),this._activate.complete(),this._resetTimeout.complete(),this._countDuplicate.complete()}afterClosed(){return this._afterClosed.asObservable()}isInactive(){return this._activate.isStopped}activate(){this._activate.next(),this._activate.complete()}afterActivate(){return this._activate.asObservable()}onDuplicate(n,t){n&&this._resetTimeout.next(),t&&this._countDuplicate.next(++this.duplicatesCount)}},R=class{toastId;config;message;title;toastType;toastRef;_onTap=new p;_onAction=new p;constructor(n,t,i,s,r,o){this.toastId=n,this.config=t,this.message=i,this.title=s,this.toastType=r,this.toastRef=o,this.toastRef.afterClosed().subscribe(()=>{this._onAction.complete(),this._onTap.complete()})}triggerTap(){this._onTap.next(),this.config.tapToDismiss&&this._onTap.complete()}onTap(){return this._onTap.asObservable()}triggerAction(n){this._onAction.next(n)}onAction(){return this._onAction.asObservable()}},Jt={maxOpened:0,autoDismiss:!1,newestOnTop:!0,preventDuplicates:!1,countDuplicates:!1,resetTimeoutOnDuplicate:!1,includeTitleDuplicates:!1,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},closeButton:!1,disableTimeOut:!1,timeOut:5e3,extendedTimeOut:1e3,enableHtml:!1,progressBar:!1,toastClass:"ngx-toastr",positionClass:"toast-top-right",titleClass:"toast-title",messageClass:"toast-message",easing:"ease-in",easeTime:300,tapToDismiss:!0,onActivateTick:!1,progressAnimation:"decreasing"},Qt=new Y("ToastConfig"),Rt=class extends Et{_hostDomElement;_componentFactoryResolver;_appRef;constructor(n,t,i){super(),this._hostDomElement=n,this._componentFactoryResolver=t,this._appRef=i}attachComponentPortal(n,t){let i=this._componentFactoryResolver.resolveComponentFactory(n.component),s;return s=i.create(n.injector),this._appRef.attachView(s.hostView),this.setDisposeFn(()=>{this._appRef.detachView(s.hostView),s.destroy()}),t?this._hostDomElement.insertBefore(this._getComponentRootNode(s),this._hostDomElement.firstChild):this._hostDomElement.appendChild(this._getComponentRootNode(s)),s}_getComponentRootNode(n){return n.hostView.rootNodes[0]}},Ae=(()=>{class e{_document=u(pt);_containerElement;ngOnDestroy(){this._containerElement&&this._containerElement.parentNode&&this._containerElement.parentNode.removeChild(this._containerElement)}getContainerElement(){return this._containerElement||this._createContainer(),this._containerElement}_createContainer(){let t=this._document.createElement("div");t.classList.add("overlay-container"),t.setAttribute("aria-live","polite"),this._document.body.appendChild(t),this._containerElement=t}static \u0275fac=function(i){return new(i||e)};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),jt=class{_portalHost;constructor(n){this._portalHost=n}attach(n,t=!0){return this._portalHost.attach(n,t)}detach(){return this._portalHost.detach()}},Re=(()=>{class e{_overlayContainer=u(Ae);_componentFactoryResolver=u(Bt);_appRef=u(W);_document=u(pt);_paneElements=new Map;create(t,i){return this._createOverlayRef(this.getPaneElement(t,i))}getPaneElement(t="",i){return this._paneElements.get(i)||this._paneElements.set(i,{}),this._paneElements.get(i)[t]||(this._paneElements.get(i)[t]=this._createPaneElement(t,i)),this._paneElements.get(i)[t]}_createPaneElement(t,i){let s=this._document.createElement("div");return s.id="toast-container",s.classList.add(t),s.classList.add("toast-container"),i?i.getContainerElement().appendChild(s):this._overlayContainer.getContainerElement().appendChild(s),s}_createPortalHost(t){return new Rt(t,this._componentFactoryResolver,this._appRef)}_createOverlayRef(t){return new jt(this._createPortalHost(t))}static \u0275fac=function(i){return new(i||e)};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Wt=(()=>{class e{overlay;_injector;sanitizer;ngZone;toastrConfig;currentlyActive=0;toasts=[];overlayContainer;previousToastMessage;index=0;constructor(t,i,s,r,o){this.overlay=i,this._injector=s,this.sanitizer=r,this.ngZone=o,this.toastrConfig=c(c({},t.default),t.config),t.config.iconClasses&&(this.toastrConfig.iconClasses=c(c({},t.default.iconClasses),t.config.iconClasses))}show(t,i,s={},r=""){return this._preBuildNotification(r,t,i,this.applyConfig(s))}success(t,i,s={}){let r=this.toastrConfig.iconClasses.success||"";return this._preBuildNotification(r,t,i,this.applyConfig(s))}error(t,i,s={}){let r=this.toastrConfig.iconClasses.error||"";return this._preBuildNotification(r,t,i,this.applyConfig(s))}info(t,i,s={}){let r=this.toastrConfig.iconClasses.info||"";return this._preBuildNotification(r,t,i,this.applyConfig(s))}warning(t,i,s={}){let r=this.toastrConfig.iconClasses.warning||"";return this._preBuildNotification(r,t,i,this.applyConfig(s))}clear(t){for(let i of this.toasts)if(t!==void 0){if(i.toastId===t){i.toastRef.manualClose();return}}else i.toastRef.manualClose()}remove(t){let i=this._findToast(t);if(!i||(i.activeToast.toastRef.close(),this.toasts.splice(i.index,1),this.currentlyActive=this.currentlyActive-1,!this.toastrConfig.maxOpened||!this.toasts.length))return!1;if(this.currentlyActive<this.toastrConfig.maxOpened&&this.toasts[this.currentlyActive]){let s=this.toasts[this.currentlyActive].toastRef;s.isInactive()||(this.currentlyActive=this.currentlyActive+1,s.activate())}return!0}findDuplicate(t="",i="",s,r){let{includeTitleDuplicates:o}=this.toastrConfig;for(let l of this.toasts){let C=o&&l.title===t;if((!o||C)&&l.message===i)return l.toastRef.onDuplicate(s,r),l}return null}applyConfig(t={}){return c(c({},this.toastrConfig),t)}_findToast(t){for(let i=0;i<this.toasts.length;i++)if(this.toasts[i].toastId===t)return{index:i,activeToast:this.toasts[i]};return null}_preBuildNotification(t,i,s,r){return r.onActivateTick?this.ngZone.run(()=>this._buildNotification(t,i,s,r)):this._buildNotification(t,i,s,r)}_buildNotification(t,i,s,r){if(!r.toastComponent)throw new Error("toastComponent required");let o=this.findDuplicate(s,i,this.toastrConfig.resetTimeoutOnDuplicate&&r.timeOut>0,this.toastrConfig.countDuplicates);if((this.toastrConfig.includeTitleDuplicates&&s||i)&&this.toastrConfig.preventDuplicates&&o!==null)return o;this.previousToastMessage=i;let l=!1;this.toastrConfig.maxOpened&&this.currentlyActive>=this.toastrConfig.maxOpened&&(l=!0,this.toastrConfig.autoDismiss&&this.clear(this.toasts[0].toastId));let C=this.overlay.create(r.positionClass,this.overlayContainer);this.index=this.index+1;let U=i;i&&r.enableHtml&&(U=this.sanitizer.sanitize(Ht.HTML,i));let w=new At(C),st=new R(this.index,r,U,s,t,w),te=[{provide:R,useValue:st}],ee=J.create({providers:te,parent:this._injector}),ie=new Ot(r.toastComponent,ee),kt=C.attach(ie,r.newestOnTop);w.componentInstance=kt.instance;let rt={toastId:this.index,title:s||"",message:i||"",toastRef:w,onShown:w.afterActivate(),onHidden:w.afterClosed(),onTap:st.onTap(),onAction:st.onAction(),portal:kt};return l||(this.currentlyActive=this.currentlyActive+1,setTimeout(()=>{rt.toastRef.activate()})),this.toasts.push(rt),rt}static \u0275fac=function(i){return new(i||e)(S(Qt),S(Re),S(J),S(qt),S(mt))};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),je=(()=>{class e{toastrService;toastPackage;ngZone;message;title;options;duplicatesCount;originalTimeout;width=M(-1);toastClasses="";state;get _state(){return this.state()}get displayStyle(){if(this.state().value==="inactive")return"none"}timeout;intervalId;hideTime;sub;sub1;sub2;sub3;constructor(t,i,s){this.toastrService=t,this.toastPackage=i,this.ngZone=s,this.message=i.message,this.title=i.title,this.options=i.config,this.originalTimeout=i.config.timeOut,this.toastClasses=`${i.toastType} ${i.config.toastClass}`,this.sub=i.toastRef.afterActivate().subscribe(()=>{this.activateToast()}),this.sub1=i.toastRef.manualClosed().subscribe(()=>{this.remove()}),this.sub2=i.toastRef.timeoutReset().subscribe(()=>{this.resetTimeout()}),this.sub3=i.toastRef.countDuplicate().subscribe(r=>{this.duplicatesCount=r}),this.state=M({value:"inactive",params:{easeTime:this.toastPackage.config.easeTime,easing:"ease-in"}})}ngOnDestroy(){this.sub.unsubscribe(),this.sub1.unsubscribe(),this.sub2.unsubscribe(),this.sub3.unsubscribe(),clearInterval(this.intervalId),clearTimeout(this.timeout)}activateToast(){this.state.update(t=>F(c({},t),{value:"active"})),!(this.options.disableTimeOut===!0||this.options.disableTimeOut==="timeOut")&&this.options.timeOut&&(this.outsideTimeout(()=>this.remove(),this.options.timeOut),this.hideTime=new Date().getTime()+this.options.timeOut,this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10))}updateProgress(){if(this.width()===0||this.width()===100||!this.options.timeOut)return;let t=new Date().getTime(),i=this.hideTime-t;this.width.set(i/this.options.timeOut*100),this.options.progressAnimation==="increasing"&&this.width.update(s=>100-s),this.width()<=0&&this.width.set(0),this.width()>=100&&this.width.set(100)}resetTimeout(){clearTimeout(this.timeout),clearInterval(this.intervalId),this.state.update(t=>F(c({},t),{value:"active"})),this.outsideTimeout(()=>this.remove(),this.originalTimeout),this.options.timeOut=this.originalTimeout,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width.set(-1),this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10)}remove(){this.state().value!=="removed"&&(clearTimeout(this.timeout),this.state.update(t=>F(c({},t),{value:"removed"})),this.outsideTimeout(()=>this.toastrService.remove(this.toastPackage.toastId),+this.toastPackage.config.easeTime))}tapToast(){this.state().value!=="removed"&&(this.toastPackage.triggerTap(),this.options.tapToDismiss&&this.remove())}stickAround(){this.state().value!=="removed"&&this.options.disableTimeOut!=="extendedTimeOut"&&(clearTimeout(this.timeout),this.options.timeOut=0,this.hideTime=0,clearInterval(this.intervalId),this.width.set(0))}delayedHideToast(){this.options.disableTimeOut===!0||this.options.disableTimeOut==="extendedTimeOut"||this.options.extendedTimeOut===0||this.state().value==="removed"||(this.outsideTimeout(()=>this.remove(),this.options.extendedTimeOut),this.options.timeOut=this.options.extendedTimeOut,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width.set(-1),this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10))}outsideTimeout(t,i){this.ngZone?this.ngZone.runOutsideAngular(()=>this.timeout=setTimeout(()=>this.runInsideAngular(t),i)):this.timeout=setTimeout(()=>t(),i)}outsideInterval(t,i){this.ngZone?this.ngZone.runOutsideAngular(()=>this.intervalId=setInterval(()=>this.runInsideAngular(t),i)):this.intervalId=setInterval(()=>t(),i)}runInsideAngular(t){this.ngZone?this.ngZone.run(()=>t()):t()}static \u0275fac=function(i){return new(i||e)(x(Wt),x(R),x(mt))};static \u0275cmp=vt({type:e,selectors:[["","toast-component",""]],hostVars:5,hostBindings:function(i,s){i&1&&V("click",function(){return s.tapToast()})("mouseenter",function(){return s.stickAround()})("mouseleave",function(){return s.delayedHideToast()}),i&2&&($t("@flyInOut",s._state),v(s.toastClasses),$("display",s.displayStyle))},attrs:Yt,decls:5,vars:5,consts:[["type","button","class","toast-close-button","aria-label","Close",3,"click",4,"ngIf"],[3,"class",4,"ngIf"],["role","alert",3,"class","innerHTML",4,"ngIf"],["role","alert",3,"class",4,"ngIf"],[4,"ngIf"],["type","button","aria-label","Close",1,"toast-close-button",3,"click"],["aria-hidden","true"],["role","alert",3,"innerHTML"],["role","alert"],[1,"toast-progress"]],template:function(i,s){i&1&&N(0,ye,3,0,"button",0)(1,Ce,3,5,"div",1)(2,we,1,3,"div",2)(3,De,2,4,"div",3)(4,xe,2,2,"div",4),i&2&&(h("ngIf",s.options.closeButton),a(),h("ngIf",s.title),a(),h("ngIf",s.message&&s.options.enableHtml),a(),h("ngIf",s.message&&!s.options.enableHtml),a(),h("ngIf",s.options.progressBar))},dependencies:[Ct],encapsulation:2,data:{animation:[xt("flyInOut",[z("inactive",K({opacity:0})),z("active",K({opacity:1})),z("removed",K({opacity:0})),tt("inactive => active",X("{{ easeTime }}ms {{ easing }}")),tt("active => removed",X("{{ easeTime }}ms {{ easing }}"))])]},changeDetection:0})}return e})(),ke=F(c({},Jt),{toastComponent:je}),Pe=(e={})=>Nt([{provide:Qt,useValue:{default:ke,config:e}}]),Ti=(()=>{class e{static forRoot(t={}){return{ngModule:e,providers:[Pe(t)]}}static \u0275fac=function(i){return new(i||e)};static \u0275mod=bt({type:e});static \u0275inj=ht({})}return e})();var Me=(()=>{class e{toastrService;toastPackage;appRef;message;title;options;duplicatesCount;originalTimeout;width=M(-1);toastClasses="";get displayStyle(){return this.state()==="inactive"?"none":null}state=M("inactive");timeout;intervalId;hideTime;sub;sub1;sub2;sub3;constructor(t,i,s){this.toastrService=t,this.toastPackage=i,this.appRef=s,this.message=i.message,this.title=i.title,this.options=i.config,this.originalTimeout=i.config.timeOut,this.toastClasses=`${i.toastType} ${i.config.toastClass}`,this.sub=i.toastRef.afterActivate().subscribe(()=>{this.activateToast()}),this.sub1=i.toastRef.manualClosed().subscribe(()=>{this.remove()}),this.sub2=i.toastRef.timeoutReset().subscribe(()=>{this.resetTimeout()}),this.sub3=i.toastRef.countDuplicate().subscribe(r=>{this.duplicatesCount=r})}ngOnDestroy(){this.sub.unsubscribe(),this.sub1.unsubscribe(),this.sub2.unsubscribe(),this.sub3.unsubscribe(),clearInterval(this.intervalId),clearTimeout(this.timeout)}activateToast(){this.state.set("active"),!(this.options.disableTimeOut===!0||this.options.disableTimeOut==="timeOut")&&this.options.timeOut&&(this.timeout=setTimeout(()=>{this.remove()},this.options.timeOut),this.hideTime=new Date().getTime()+this.options.timeOut,this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10))),this.options.onActivateTick&&this.appRef.tick()}updateProgress(){if(this.width()===0||this.width()===100||!this.options.timeOut)return;let t=new Date().getTime(),i=this.hideTime-t;this.width.set(i/this.options.timeOut*100),this.options.progressAnimation==="increasing"&&this.width.update(s=>100-s),this.width()<=0&&this.width.set(0),this.width()>=100&&this.width.set(100)}resetTimeout(){clearTimeout(this.timeout),clearInterval(this.intervalId),this.state.set("active"),this.options.timeOut=this.originalTimeout,this.timeout=setTimeout(()=>this.remove(),this.originalTimeout),this.hideTime=new Date().getTime()+(this.originalTimeout||0),this.width.set(-1),this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10))}remove(){this.state()!=="removed"&&(clearTimeout(this.timeout),this.state.set("removed"),this.timeout=setTimeout(()=>this.toastrService.remove(this.toastPackage.toastId)))}tapToast(){this.state()!=="removed"&&(this.toastPackage.triggerTap(),this.options.tapToDismiss&&this.remove())}stickAround(){this.state()!=="removed"&&(clearTimeout(this.timeout),this.options.timeOut=0,this.hideTime=0,clearInterval(this.intervalId),this.width.set(0))}delayedHideToast(){this.options.disableTimeOut===!0||this.options.disableTimeOut==="extendedTimeOut"||this.options.extendedTimeOut===0||this.state()==="removed"||(this.timeout=setTimeout(()=>this.remove(),this.options.extendedTimeOut),this.options.timeOut=this.options.extendedTimeOut,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width.set(-1),this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10)))}static \u0275fac=function(i){return new(i||e)(x(Wt),x(R),x(W))};static \u0275cmp=vt({type:e,selectors:[["","toast-component",""]],hostVars:4,hostBindings:function(i,s){i&1&&V("click",function(){return s.tapToast()})("mouseenter",function(){return s.stickAround()})("mouseleave",function(){return s.delayedHideToast()}),i&2&&(v(s.toastClasses),$("display",s.displayStyle))},attrs:Yt,decls:5,vars:5,consts:[["type","button","class","toast-close-button","aria-label","Close",3,"click",4,"ngIf"],[3,"class",4,"ngIf"],["role","alert",3,"class","innerHTML",4,"ngIf"],["role","alert",3,"class",4,"ngIf"],[4,"ngIf"],["type","button","aria-label","Close",1,"toast-close-button",3,"click"],["aria-hidden","true"],["role","alert",3,"innerHTML"],["role","alert"],[1,"toast-progress"]],template:function(i,s){i&1&&N(0,Le,3,0,"button",0)(1,Fe,3,5,"div",1)(2,Se,1,3,"div",2)(3,Oe,2,4,"div",3)(4,Ee,2,2,"div",4),i&2&&(h("ngIf",s.options.closeButton),a(),h("ngIf",s.title),a(),h("ngIf",s.message&&s.options.enableHtml),a(),h("ngIf",s.message&&!s.options.enableHtml),a(),h("ngIf",s.options.progressBar))},dependencies:[Ct],encapsulation:2,changeDetection:0})}return e})(),Ci=F(c({},Jt),{toastComponent:Me});var j={serverTarget:Xt().version,production:!0,socket:"",api:{base:(()=>{let n=document.querySelector("base")?.getAttribute("href")||"/";return n.endsWith("/")?`${n}api`:`${n}/api`})(),socket:`${window.location.protocol==="http:"?"ws://":"wss://"}${window.location.host}`,origin:window.location.origin},jwt:{tokenKey:"access_token",allowedDomains:[document.location.host],disallowedRoutes:[(()=>{let n=document.querySelector("base")?.getAttribute("href")||"/",t=n.endsWith("/")?`${n}api`:`${n}/api`;return`${window.location.protocol}//${document.location.host}${t}/auth/login`})()]},apiHttpOptions:{},owm:{appid:"fec67b55f7f74deaa28df89ba6a60821"}};var Ei=(()=>{class e{$http=u(zt);get(t,i){return this.$http.get(`${j.api.base}${t}`,i)}post(t,i,s){return this.$http.post(`${j.api.base}${t}`,i,s)}put(t,i,s){return this.$http.put(`${j.api.base}${t}`,i,s)}patch(t,i,s){return this.$http.patch(`${j.api.base}${t}`,i,s)}delete(t,i){return this.$http.delete(`${j.api.base}${t}`,i)}static \u0275fac=function(i){return new(i||e)};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();export{y as a,se as b,xt as c,X as d,He as e,K as f,tt as g,wt as h,Dt as i,re as j,Ft as k,Ye as l,Je as m,Wt as n,Ti as o,j as p,Ei as q};
@@ -0,0 +1 @@
1
+ import{h as i}from"./chunk-2BB4D4TW.js";import{eb as r,ja as o}from"./chunk-G4QH622U.js";var m=[{path:"",loadComponent:()=>import("./chunk-67HOYJJ2.js").then(t=>t.SupportComponent)}],n=(()=>{class t{static \u0275fac=function(e){return new(e||t)};static \u0275mod=r({type:t});static \u0275inj=o({imports:[i.forChild(m),i]})}return t})();var s=(()=>{class t{static \u0275fac=function(e){return new(e||t)};static \u0275mod=r({type:t});static \u0275inj=o({imports:[n]})}return t})();export{s as SupportModule};
@@ -0,0 +1 @@
1
+ import{h as r}from"./chunk-2BB4D4TW.js";import{eb as e,ja as t}from"./chunk-G4QH622U.js";var m=[{path:"",loadComponent:()=>import("./chunk-VM6FMRHY.js").then(o=>o.PowerOptionsComponent)}],n=(()=>{class o{static \u0275fac=function(i){return new(i||o)};static \u0275mod=e({type:o});static \u0275inj=t({imports:[r.forChild(m),r]})}return o})();var d=(()=>{class o{static \u0275fac=function(i){return new(i||o)};static \u0275mod=e({type:o});static \u0275inj=t({imports:[n]})}return o})();export{d as PowerOptionsModule};
@@ -0,0 +1 @@
1
+ import{a as n}from"./chunk-UI4U37MO.js";import"./chunk-WJKVPIP2.js";import"./chunk-NVCJ3EJS.js";import{h as r}from"./chunk-2BB4D4TW.js";import"./chunk-HBIQJCSE.js";import"./chunk-JX72JCMA.js";import{eb as e,ja as o}from"./chunk-G4QH622U.js";var c=[{path:"",loadComponent:()=>import("./chunk-WTGHGHPV.js").then(t=>t.SettingsComponent),canActivate:[n]}],m=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=e({type:t});static \u0275inj=o({imports:[r.forChild(c),r]})}return t})();var l=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=e({type:t});static \u0275inj=o({imports:[m]})}return t})();export{l as SettingsModule};
@@ -0,0 +1 @@
1
+ import{a as l}from"./chunk-ESQ665GW.js";import{a as m}from"./chunk-UZ6QYM64.js";import{n as s}from"./chunk-5X7ARCKG.js";import{b as o}from"./chunk-HBIQJCSE.js";import{k as i}from"./chunk-JX72JCMA.js";import{ia as r,na as n}from"./chunk-G4QH622U.js";var I=(()=>{class e{$terminal=n(l);$settings=n(o);$modal=n(s);$translate=n(i);handleBeforeUnload(t){if(!this.$settings.env.terminal?.persistence&&!this.$settings.env.terminal?.hideWarning&&this.$terminal.hasActiveSession()&&this.$terminal.hasUserTypedInSession()){let a=this.$translate.instant("platform.terminal.terminate_unload");return t.preventDefault(),t.returnValue=a,a}}canDeactivate(){if(this.$settings.env.terminal?.persistence||this.$settings.env.terminal?.hideWarning||!this.$terminal.hasActiveSession()||!this.$terminal.hasUserTypedInSession())return!0;let t=this.$modal.open(m,{size:"lg",backdrop:"static"});return t.componentInstance.title=this.$translate.instant("platform.terminal.terminate_title"),t.componentInstance.message=this.$translate.instant("platform.terminal.terminate_message_1"),t.componentInstance.message2=this.$translate.instant("platform.terminal.terminate_message_2"),t.componentInstance.message3=this.$translate.instant("common.phrases.are_you_sure"),t.componentInstance.confirmButtonLabel=this.$translate.instant("form.button_continue"),t.componentInstance.confirmButtonClass="btn-primary",t.componentInstance.faIconClass="fas fa-exclamation-triangle text-warning",t.result.then(()=>!0).catch(()=>!1)}static \u0275fac=function(a){return new(a||e)};static \u0275prov=r({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();export{I as a};
@@ -1 +1 @@
1
- import{e as b}from"./chunk-B4AJQJMI.js";var L=b((p,v)=>{(function(d,r){typeof define=="function"&&define.amd?define([],r):typeof p<"u"?r():(r(),d.FileSaver={})})(p,function(){"use strict";function d(e,t){return typeof t>"u"?t={autoBom:!1}:typeof t!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\uFEFF",e],{type:e.type}):e}function r(e,t,i){var n=new XMLHttpRequest;n.open("GET",e),n.responseType="blob",n.onload=function(){l(n.response,t,i)},n.onerror=function(){console.error("could not download file")},n.send()}function w(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch{}return 200<=t.status&&299>=t.status}function s(e){try{e.dispatchEvent(new MouseEvent("click"))}catch{var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var a=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof global=="object"&&global.global===global?global:void 0,m=a.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),l=a.saveAs||(typeof window!="object"||window!==a?function(){}:"download"in HTMLAnchorElement.prototype&&!m?function(e,t,i){var n=a.URL||a.webkitURL,o=document.createElement("a");t=t||e.name||"download",o.download=t,o.rel="noopener",typeof e=="string"?(o.href=e,o.origin===location.origin?s(o):w(o.href)?r(e,t,i):s(o,o.target="_blank")):(o.href=n.createObjectURL(e),setTimeout(function(){n.revokeObjectURL(o.href)},4e4),setTimeout(function(){s(o)},0))}:"msSaveOrOpenBlob"in navigator?function(e,t,i){if(t=t||e.name||"download",typeof e!="string")navigator.msSaveOrOpenBlob(d(e,i),t);else if(w(e))r(e,t,i);else{var n=document.createElement("a");n.href=e,n.target="_blank",setTimeout(function(){s(n)})}}:function(e,t,i,n){if(n=n||open("","_blank"),n&&(n.document.title=n.document.body.innerText="downloading..."),typeof e=="string")return r(e,t,i);var o=e.type==="application/octet-stream",E=/constructor/i.test(a.HTMLElement)||a.safari,y=/CriOS\/[\d]+/.test(navigator.userAgent);if((y||o&&E||m)&&typeof FileReader<"u"){var u=new FileReader;u.onloadend=function(){var c=u.result;c=y?c:c.replace(/^data:[^;]*;/,"data:attachment/file;"),n?n.location.href=c:location=c,n=null},u.readAsDataURL(e)}else{var h=a.URL||a.webkitURL,f=h.createObjectURL(e);n?n.location=f:location.href=f,n=null,setTimeout(function(){h.revokeObjectURL(f)},4e4)}});a.saveAs=l.saveAs=l,typeof v<"u"&&(v.exports=l)})});export{L as a};
1
+ import{e as b}from"./chunk-G4QH622U.js";var L=b((p,v)=>{(function(d,r){typeof define=="function"&&define.amd?define([],r):typeof p<"u"?r():(r(),d.FileSaver={})})(p,function(){"use strict";function d(e,t){return typeof t>"u"?t={autoBom:!1}:typeof t!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\uFEFF",e],{type:e.type}):e}function r(e,t,i){var n=new XMLHttpRequest;n.open("GET",e),n.responseType="blob",n.onload=function(){l(n.response,t,i)},n.onerror=function(){console.error("could not download file")},n.send()}function w(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch{}return 200<=t.status&&299>=t.status}function s(e){try{e.dispatchEvent(new MouseEvent("click"))}catch{var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var a=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof global=="object"&&global.global===global?global:void 0,m=a.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),l=a.saveAs||(typeof window!="object"||window!==a?function(){}:"download"in HTMLAnchorElement.prototype&&!m?function(e,t,i){var n=a.URL||a.webkitURL,o=document.createElement("a");t=t||e.name||"download",o.download=t,o.rel="noopener",typeof e=="string"?(o.href=e,o.origin===location.origin?s(o):w(o.href)?r(e,t,i):s(o,o.target="_blank")):(o.href=n.createObjectURL(e),setTimeout(function(){n.revokeObjectURL(o.href)},4e4),setTimeout(function(){s(o)},0))}:"msSaveOrOpenBlob"in navigator?function(e,t,i){if(t=t||e.name||"download",typeof e!="string")navigator.msSaveOrOpenBlob(d(e,i),t);else if(w(e))r(e,t,i);else{var n=document.createElement("a");n.href=e,n.target="_blank",setTimeout(function(){s(n)})}}:function(e,t,i,n){if(n=n||open("","_blank"),n&&(n.document.title=n.document.body.innerText="downloading..."),typeof e=="string")return r(e,t,i);var o=e.type==="application/octet-stream",E=/constructor/i.test(a.HTMLElement)||a.safari,y=/CriOS\/[\d]+/.test(navigator.userAgent);if((y||o&&E||m)&&typeof FileReader<"u"){var u=new FileReader;u.onloadend=function(){var c=u.result;c=y?c:c.replace(/^data:[^;]*;/,"data:attachment/file;"),n?n.location.href=c:location=c,n=null},u.readAsDataURL(e)}else{var h=a.URL||a.webkitURL,f=h.createObjectURL(e);n?n.location=f:location.href=f,n=null,setTimeout(function(){h.revokeObjectURL(f)},4e4)}});a.saveAs=l.saveAs=l,typeof v<"u"&&(v.exports=l)})});export{L as a};
@@ -0,0 +1 @@
1
+ import{b as $}from"./chunk-HBIQJCSE.js";import{p as h,q as S}from"./chunk-JX72JCMA.js";import{A as w,D as T,eb as E,fd as j,h as a,ia as d,ja as v,la as y,ma as l,na as p,s as f,x as c,xa as I,y as k}from"./chunk-G4QH622U.js";var g=new y("JWT_OPTIONS"),m=(()=>{class i{constructor(e=null){this.tokenGetter=e&&e.tokenGetter||function(){}}urlBase64Decode(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:{t+="==";break}case 3:{t+="=";break}default:throw new Error("Illegal base64url string!")}return this.b64DecodeUnicode(t)}b64decode(e){let t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",o="";if(e=String(e).replace(/=+$/,""),e.length%4===1)throw new Error("'atob' failed: The string to be decoded is not correctly encoded.");for(let r=0,s,n,D=0;n=e.charAt(D++);~n&&(s=r%4?s*64+n:n,r++%4)?o+=String.fromCharCode(255&s>>(-2*r&6)):0)n=t.indexOf(n);return o}b64DecodeUnicode(e){return decodeURIComponent(Array.prototype.map.call(this.b64decode(e),t=>"%"+("00"+t.charCodeAt(0).toString(16)).slice(-2)).join(""))}decodeToken(e=this.tokenGetter()){return e instanceof Promise?e.then(t=>this._decodeToken(t)):this._decodeToken(e)}_decodeToken(e){if(!e||e==="")return null;let t=e.split(".");if(t.length!==3)throw new Error("The inspected token doesn't appear to be a JWT. Check to make sure it has three parts and see https://jwt.io for more.");let o=this.urlBase64Decode(t[1]);if(!o)throw new Error("Cannot decode the token.");return JSON.parse(o)}getTokenExpirationDate(e=this.tokenGetter()){return e instanceof Promise?e.then(t=>this._getTokenExpirationDate(t)):this._getTokenExpirationDate(e)}_getTokenExpirationDate(e){let t;if(t=this.decodeToken(e),!t||!t.hasOwnProperty("exp"))return null;let o=new Date(0);return o.setUTCSeconds(t.exp),o}isTokenExpired(e=this.tokenGetter(),t){return e instanceof Promise?e.then(o=>this._isTokenExpired(o,t)):this._isTokenExpired(e,t)}_isTokenExpired(e,t){if(!e||e==="")return!0;let o=this.getTokenExpirationDate(e);return t=t||0,o===null?!1:!(o.valueOf()>new Date().valueOf()+t*1e3)}getAuthScheme(e,t){return typeof e=="function"?e(t):e}}return i.\u0275fac=function(e){return new(e||i)(l(g))},i.\u0275prov=d({token:i,factory:i.\u0275fac}),i})(),x=i=>i instanceof Promise?T(()=>i):f(i),b=(()=>{class i{constructor(e,t,o){this.jwtHelper=t,this.document=o,this.standardPorts=["80","443"],this.tokenGetter=e.tokenGetter,this.headerName=e.headerName||"Authorization",this.authScheme=e.authScheme||e.authScheme===""?e.authScheme:"Bearer ",this.allowedDomains=e.allowedDomains||[],this.disallowedRoutes=e.disallowedRoutes||[],this.throwNoTokenError=e.throwNoTokenError||!1,this.skipWhenExpired=e.skipWhenExpired}isAllowedDomain(e){let t=new URL(e.url,this.document.location.origin);if(t.host===this.document.location.host)return!0;let o=`${t.hostname}${t.port&&!this.standardPorts.includes(t.port)?":"+t.port:""}`;return this.allowedDomains.findIndex(r=>typeof r=="string"?r===o:r instanceof RegExp?r.test(o):!1)>-1}isDisallowedRoute(e){let t=new URL(e.url,this.document.location.origin);return this.disallowedRoutes.findIndex(o=>{if(typeof o=="string"){let r=new URL(o,this.document.location.origin);return r.hostname===t.hostname&&r.pathname===t.pathname}return o instanceof RegExp?o.test(e.url):!1})>-1}handleInterception(e,t,o){let r=this.jwtHelper.getAuthScheme(this.authScheme,t);if(!e&&this.throwNoTokenError)throw new Error("Could not get token from tokenGetter function.");let s=f(!1);return this.skipWhenExpired&&(s=e?x(this.jwtHelper.isTokenExpired(e)):f(!0)),e?s.pipe(k(n=>n&&this.skipWhenExpired?t.clone():t.clone({setHeaders:{[this.headerName]:`${r}${e}`}})),w(n=>o.handle(n))):o.handle(t)}intercept(e,t){if(!this.isAllowedDomain(e)||this.isDisallowedRoute(e))return t.handle(e);let o=this.tokenGetter(e);return x(o).pipe(w(r=>this.handleInterception(r,e,t)))}}return i.\u0275fac=function(e){return new(e||i)(l(g),l(m),l(I))},i.\u0275prov=d({token:i,factory:i.\u0275fac}),i})(),U=(()=>{class i{constructor(e){if(e)throw new Error("JwtModule is already loaded. It should only be imported in your application's main module.")}static forRoot(e){return{ngModule:i,providers:[{provide:j,useClass:b,multi:!0},e.jwtOptionsProvider||{provide:g,useValue:e.config},m]}}}return i.\u0275fac=function(e){return new(e||i)(l(i,12))},i.\u0275mod=E({type:i}),i.\u0275inj=v({}),i})();var X=(()=>{class i{$api=p(S);$jwtHelper=p(m);$settings=p($);token;user={};logoutTimer;lastRefreshTime=Date.now();isRefreshing=!1;constructor(){this.loadToken()}login(e){return a(this,null,function*(){let t=yield c(this.$api.post("/auth/login",e));if(!this.validateToken(t.access_token))throw new Error("Invalid username or password.");window.localStorage.setItem(h.jwt.tokenKey,t.access_token),yield this.$settings.getAppSettings()})}noauth(){return a(this,null,function*(){let e=yield c(this.$api.post("/auth/noauth",{}));if(this.validateToken(e.access_token))window.localStorage.setItem(h.jwt.tokenKey,e.access_token),yield this.$settings.getAppSettings();else throw new Error("Invalid username or password.")})}logout(){this.user=null,this.token=null,clearTimeout(this.logoutTimer),window.localStorage.removeItem(h.jwt.tokenKey),window.location.reload()}loadToken(){return a(this,null,function*(){this.$settings.settingsLoaded||(yield c(this.$settings.onSettingsLoaded));let e=window.localStorage.getItem(h.jwt.tokenKey);e&&this.validateToken(e)})}checkToken(){return a(this,null,function*(){if(!this.token||this.$jwtHelper.isTokenExpired(this.token,this.$settings.serverTimeOffset)){console.warn("Token expired on client side, logging out immediately"),this.logout();return}try{return yield c(this.$api.get("/auth/check"))}catch(e){throw e.status===401&&(console.warn("Current token is not valid on server"),this.logout()),e}})}isLoggedIn(){return this.$settings.env.instanceId!==this.user.instanceId?(console.error("Token does not match instance"),!1):this.user&&this.token&&!this.$jwtHelper.isTokenExpired(this.token,this.$settings.serverTimeOffset)}validateToken(e){try{return this.$jwtHelper.isTokenExpired(e,this.$settings.serverTimeOffset)&&this.logout(),this.user=this.$jwtHelper.decodeToken(e),this.token=e,this.setLogoutTimer(),!0}catch{return window.localStorage.removeItem(h.jwt.tokenKey),this.token=null,!1}}setLogoutTimer(){if(clearTimeout(this.logoutTimer),!this.$jwtHelper.isTokenExpired(this.token,this.$settings.serverTimeOffset)){let e=this.$settings.sessionTimeout*1e3;e<=2147483647&&(this.logoutTimer=setTimeout(()=>a(this,null,function*(){this.$settings.formAuth===!1?(yield this.noauth(),window.location.reload()):this.logout()}),e))}}checkAndRefreshIfNeeded(){return a(this,null,function*(){if(!this.$settings.formAuth||!this.$settings.sessionTimeoutInactivityBased||!this.token||!this.isLoggedIn()||this.isRefreshing)return;let t=Date.now()-this.lastRefreshTime,r=this.$settings.sessionTimeout*1e3*.7;if(t>r)try{yield this.refreshSession()}catch(s){console.error("Failed to refresh session:",s)}})}refreshSession(){return a(this,null,function*(){if(!this.isRefreshing){this.isRefreshing=!0;try{let e=yield c(this.$api.post("/auth/refresh",{}));e.access_token&&(this.token=e.access_token,window.localStorage.setItem(h.jwt.tokenKey,e.access_token),this.lastRefreshTime=Date.now(),this.setLogoutTimer())}finally{this.isRefreshing=!1}}})}static \u0275fac=function(t){return new(t||i)};static \u0275prov=d({token:i,factory:i.\u0275fac})}return i})();export{U as a,X as b};
@@ -0,0 +1 @@
1
+ import{Ab as t,Bb as i,Cb as o,db as a,ua as r}from"./chunk-G4QH622U.js";var d=(()=>{class e{static \u0275fac=function(n){return new(n||e)};static \u0275cmp=a({type:e,selectors:[["app-spinner"]],decls:7,vars:0,consts:[[1,"app-spinner-container"],[1,"animate_loader"],["xmlns","http://www.w3.org/2000/svg",0,"xmlns","xlink","http://www.w3.org/1999/xlink","width","200px","height","200px","viewBox","0 0 100 100","preserveAspectRatio","xMidYMid",2,"margin","auto","display","block"],["cx","50","cy","50","r","32","stroke-width","8","stroke-dasharray","50.26548245743669 50.26548245743669","fill","none","stroke-linecap","round","transform","rotate(327.259 50 50)",1,"spinner_outer"],["attributeName","transform","type","rotate","dur","2s","repeatCount","indefinite","keyTimes","0;1","values","0 50 50;360 50 50"],["cx","50","cy","50","r","23","stroke-width","8","stroke","#f8b26a","stroke-dasharray","36.12831551628262 36.12831551628262","stroke-dashoffset","36.12831551628262","fill","none","stroke-linecap","round","transform","rotate(-327.259 50 50)",1,"spinner_inner"],["attributeName","transform","type","rotate","dur","2s","repeatCount","indefinite","keyTimes","0;1","values","0 50 50;-360 50 50"]],template:function(n,p){n&1&&(t(0,"div",0)(1,"div",1),r(),t(2,"svg",2)(3,"circle",3),o(4,"animateTransform",4),i(),t(5,"circle",5),o(6,"animateTransform",6),i()()()())},styles:[".app-spinner-container[_ngcontent-%COMP%]{position:absolute;inset:0 0 0 60px;display:flex;align-items:center;justify-content:center;z-index:1000}@media (max-width: 767px){.app-spinner-container[_ngcontent-%COMP%]{left:0;top:65px}}.animate_loader[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{position:absolute;inset:0;margin:auto;width:200px;overflow:visible}"]})}return e})();export{d as a};
@@ -0,0 +1,8 @@
1
+ import{Ca as qt,Cb as xt,Cc as Ft,Ub as Ut,Vb as Dt,db as _t,e as d,g as He,h as Lt}from"./chunk-G4QH622U.js";var zt=d((Dn,kt)=>{kt.exports=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}});var N=d(P=>{var st,Ve=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];P.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return t*4+17};P.getSymbolTotalCodewords=function(t){return Ve[t]};P.getBCHDigit=function(n){let t=0;for(;n!==0;)t++,n>>>=1;return t};P.setToSJISFunction=function(t){if(typeof t!="function")throw new Error('"toSJISFunc" is not a valid function.');st=t};P.isKanjiModeEnabled=function(){return typeof st<"u"};P.toSJIS=function(t){return st(t)}});var Q=d(w=>{w.L={bit:1};w.M={bit:0};w.Q={bit:3};w.H={bit:2};function Ke(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"l":case"low":return w.L;case"m":case"medium":return w.M;case"q":case"quartile":return w.Q;case"h":case"high":return w.H;default:throw new Error("Unknown EC Level: "+n)}}w.isValid=function(t){return t&&typeof t.bit<"u"&&t.bit>=0&&t.bit<4};w.from=function(t,e){if(w.isValid(t))return t;try{return Ke(t)}catch{return e}}});var Kt=d((zn,Vt)=>{function Ht(){this.buffer=[],this.length=0}Ht.prototype={get:function(n){let t=Math.floor(n/8);return(this.buffer[t]>>>7-n%8&1)===1},put:function(n,t){for(let e=0;e<t;e++)this.putBit((n>>>t-e-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(n){let t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),n&&(this.buffer[t]|=128>>>this.length%8),this.length++}};Vt.exports=Ht});var Ot=d((Hn,Jt)=>{function k(n){if(!n||n<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=n,this.data=new Uint8Array(n*n),this.reservedBit=new Uint8Array(n*n)}k.prototype.set=function(n,t,e,r){let o=n*this.size+t;this.data[o]=e,r&&(this.reservedBit[o]=!0)};k.prototype.get=function(n,t){return this.data[n*this.size+t]};k.prototype.xor=function(n,t,e){this.data[n*this.size+t]^=e};k.prototype.isReserved=function(n,t){return this.reservedBit[n*this.size+t]};Jt.exports=k});var Yt=d(v=>{var Je=N().getSymbolSize;v.getRowColCoords=function(t){if(t===1)return[];let e=Math.floor(t/7)+2,r=Je(t),o=r===145?26:Math.ceil((r-13)/(2*e-2))*2,i=[r-7];for(let s=1;s<e-1;s++)i[s]=i[s-1]-o;return i.push(6),i.reverse()};v.getPositions=function(t){let e=[],r=v.getRowColCoords(t),o=r.length;for(let i=0;i<o;i++)for(let s=0;s<o;s++)i===0&&s===0||i===0&&s===o-1||i===o-1&&s===0||e.push([r[i],r[s]]);return e}});var jt=d(vt=>{var Oe=N().getSymbolSize,Qt=7;vt.getPositions=function(t){let e=Oe(t);return[[0,0],[e-Qt,0],[0,e-Qt]]}});var Gt=d(g=>{g.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var b={N1:3,N2:3,N3:40,N4:10};g.isValid=function(t){return t!=null&&t!==""&&!isNaN(t)&&t>=0&&t<=7};g.from=function(t){return g.isValid(t)?parseInt(t,10):void 0};g.getPenaltyN1=function(t){let e=t.size,r=0,o=0,i=0,s=null,u=null;for(let c=0;c<e;c++){o=i=0,s=u=null;for(let l=0;l<e;l++){let a=t.get(c,l);a===s?o++:(o>=5&&(r+=b.N1+(o-5)),s=a,o=1),a=t.get(l,c),a===u?i++:(i>=5&&(r+=b.N1+(i-5)),u=a,i=1)}o>=5&&(r+=b.N1+(o-5)),i>=5&&(r+=b.N1+(i-5))}return r};g.getPenaltyN2=function(t){let e=t.size,r=0;for(let o=0;o<e-1;o++)for(let i=0;i<e-1;i++){let s=t.get(o,i)+t.get(o,i+1)+t.get(o+1,i)+t.get(o+1,i+1);(s===4||s===0)&&r++}return r*b.N2};g.getPenaltyN3=function(t){let e=t.size,r=0,o=0,i=0;for(let s=0;s<e;s++){o=i=0;for(let u=0;u<e;u++)o=o<<1&2047|t.get(s,u),u>=10&&(o===1488||o===93)&&r++,i=i<<1&2047|t.get(u,s),u>=10&&(i===1488||i===93)&&r++}return r*b.N3};g.getPenaltyN4=function(t){let e=0,r=t.data.length;for(let i=0;i<r;i++)e+=t.data[i];return Math.abs(Math.ceil(e*100/r/5)-10)*b.N4};function Ye(n,t,e){switch(n){case g.Patterns.PATTERN000:return(t+e)%2===0;case g.Patterns.PATTERN001:return t%2===0;case g.Patterns.PATTERN010:return e%3===0;case g.Patterns.PATTERN011:return(t+e)%3===0;case g.Patterns.PATTERN100:return(Math.floor(t/2)+Math.floor(e/3))%2===0;case g.Patterns.PATTERN101:return t*e%2+t*e%3===0;case g.Patterns.PATTERN110:return(t*e%2+t*e%3)%2===0;case g.Patterns.PATTERN111:return(t*e%3+(t+e)%2)%2===0;default:throw new Error("bad maskPattern:"+n)}}g.applyMask=function(t,e){let r=e.size;for(let o=0;o<r;o++)for(let i=0;i<r;i++)e.isReserved(i,o)||e.xor(i,o,Ye(t,i,o))};g.getBestMask=function(t,e){let r=Object.keys(g.Patterns).length,o=0,i=1/0;for(let s=0;s<r;s++){e(s),g.applyMask(s,t);let u=g.getPenaltyN1(t)+g.getPenaltyN2(t)+g.getPenaltyN3(t)+g.getPenaltyN4(t);g.applyMask(s,t),u<i&&(i=u,o=s)}return o}});var ct=d(ut=>{var I=Q(),j=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],G=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];ut.getBlocksCount=function(t,e){switch(e){case I.L:return j[(t-1)*4+0];case I.M:return j[(t-1)*4+1];case I.Q:return j[(t-1)*4+2];case I.H:return j[(t-1)*4+3];default:return}};ut.getTotalCodewordsCount=function(t,e){switch(e){case I.L:return G[(t-1)*4+0];case I.M:return G[(t-1)*4+1];case I.Q:return G[(t-1)*4+2];case I.H:return G[(t-1)*4+3];default:return}}});var $t=d(W=>{var z=new Uint8Array(512),$=new Uint8Array(256);(function(){let t=1;for(let e=0;e<255;e++)z[e]=t,$[t]=e,t<<=1,t&256&&(t^=285);for(let e=255;e<512;e++)z[e]=z[e-255]})();W.log=function(t){if(t<1)throw new Error("log("+t+")");return $[t]};W.exp=function(t){return z[t]};W.mul=function(t,e){return t===0||e===0?0:z[$[t]+$[e]]}});var Wt=d(H=>{var lt=$t();H.mul=function(t,e){let r=new Uint8Array(t.length+e.length-1);for(let o=0;o<t.length;o++)for(let i=0;i<e.length;i++)r[o+i]^=lt.mul(t[o],e[i]);return r};H.mod=function(t,e){let r=new Uint8Array(t);for(;r.length-e.length>=0;){let o=r[0];for(let s=0;s<e.length;s++)r[s]^=lt.mul(e[s],o);let i=0;for(;i<r.length&&r[i]===0;)i++;r=r.slice(i)}return r};H.generateECPolynomial=function(t){let e=new Uint8Array([1]);for(let r=0;r<t;r++)e=H.mul(e,new Uint8Array([1,lt.exp(r)]));return e}});var te=d((vn,Xt)=>{var Zt=Wt();function at(n){this.genPoly=void 0,this.degree=n,this.degree&&this.initialize(this.degree)}at.prototype.initialize=function(t){this.degree=t,this.genPoly=Zt.generateECPolynomial(this.degree)};at.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");let e=new Uint8Array(t.length+this.degree);e.set(t);let r=Zt.mod(e,this.genPoly),o=this.degree-r.length;if(o>0){let i=new Uint8Array(this.degree);return i.set(r,o),i}return r};Xt.exports=at});var ft=d(ee=>{ee.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}});var dt=d(B=>{var ne="[0-9]+",Qe="[A-Z $%*+\\-./:]+",V="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";V=V.replace(/u/g,"\\u");var ve="(?:(?![A-Z0-9 $%*+\\-./:]|"+V+`)(?:.|[\r
2
+ ]))+`;B.KANJI=new RegExp(V,"g");B.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");B.BYTE=new RegExp(ve,"g");B.NUMERIC=new RegExp(ne,"g");B.ALPHANUMERIC=new RegExp(Qe,"g");var je=new RegExp("^"+V+"$"),Ge=new RegExp("^"+ne+"$"),$e=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");B.testKanji=function(t){return je.test(t)};B.testNumeric=function(t){return Ge.test(t)};B.testAlphanumeric=function(t){return $e.test(t)}});var M=d(p=>{var We=ft(),gt=dt();p.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]};p.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]};p.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]};p.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]};p.MIXED={bit:-1};p.getCharCountIndicator=function(t,e){if(!t.ccBits)throw new Error("Invalid mode: "+t);if(!We.isValid(e))throw new Error("Invalid version: "+e);return e>=1&&e<10?t.ccBits[0]:e<27?t.ccBits[1]:t.ccBits[2]};p.getBestModeForData=function(t){return gt.testNumeric(t)?p.NUMERIC:gt.testAlphanumeric(t)?p.ALPHANUMERIC:gt.testKanji(t)?p.KANJI:p.BYTE};p.toString=function(t){if(t&&t.id)return t.id;throw new Error("Invalid mode")};p.isValid=function(t){return t&&t.bit&&t.ccBits};function Ze(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"numeric":return p.NUMERIC;case"alphanumeric":return p.ALPHANUMERIC;case"kanji":return p.KANJI;case"byte":return p.BYTE;default:throw new Error("Unknown mode: "+n)}}p.from=function(t,e){if(p.isValid(t))return t;try{return Ze(t)}catch{return e}}});var ue=d(R=>{var Z=N(),Xe=ct(),re=Q(),S=M(),ht=ft(),ie=7973,oe=Z.getBCHDigit(ie);function tn(n,t,e){for(let r=1;r<=40;r++)if(t<=R.getCapacity(r,e,n))return r}function se(n,t){return S.getCharCountIndicator(n,t)+4}function en(n,t){let e=0;return n.forEach(function(r){let o=se(r.mode,t);e+=o+r.getBitsLength()}),e}function nn(n,t){for(let e=1;e<=40;e++)if(en(n,e)<=R.getCapacity(e,t,S.MIXED))return e}R.from=function(t,e){return ht.isValid(t)?parseInt(t,10):e};R.getCapacity=function(t,e,r){if(!ht.isValid(t))throw new Error("Invalid QR Code version");typeof r>"u"&&(r=S.BYTE);let o=Z.getSymbolTotalCodewords(t),i=Xe.getTotalCodewordsCount(t,e),s=(o-i)*8;if(r===S.MIXED)return s;let u=s-se(r,t);switch(r){case S.NUMERIC:return Math.floor(u/10*3);case S.ALPHANUMERIC:return Math.floor(u/11*2);case S.KANJI:return Math.floor(u/13);case S.BYTE:default:return Math.floor(u/8)}};R.getBestVersionForData=function(t,e){let r,o=re.from(e,re.M);if(Array.isArray(t)){if(t.length>1)return nn(t,o);if(t.length===0)return 1;r=t[0]}else r=t;return tn(r.mode,r.getLength(),o)};R.getEncodedBits=function(t){if(!ht.isValid(t)||t<7)throw new Error("Invalid QR Code version");let e=t<<12;for(;Z.getBCHDigit(e)-oe>=0;)e^=ie<<Z.getBCHDigit(e)-oe;return t<<12|e}});var fe=d(ae=>{var pt=N(),le=1335,rn=21522,ce=pt.getBCHDigit(le);ae.getEncodedBits=function(t,e){let r=t.bit<<3|e,o=r<<10;for(;pt.getBCHDigit(o)-ce>=0;)o^=le<<pt.getBCHDigit(o)-ce;return(r<<10|o)^rn}});var ge=d((Xn,de)=>{var on=M();function _(n){this.mode=on.NUMERIC,this.data=n.toString()}_.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)};_.prototype.getLength=function(){return this.data.length};_.prototype.getBitsLength=function(){return _.getBitsLength(this.data.length)};_.prototype.write=function(t){let e,r,o;for(e=0;e+3<=this.data.length;e+=3)r=this.data.substr(e,3),o=parseInt(r,10),t.put(o,10);let i=this.data.length-e;i>0&&(r=this.data.substr(e),o=parseInt(r,10),t.put(o,i*3+1))};de.exports=_});var pe=d((tr,he)=>{var sn=M(),mt=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function x(n){this.mode=sn.ALPHANUMERIC,this.data=n}x.getBitsLength=function(t){return 11*Math.floor(t/2)+6*(t%2)};x.prototype.getLength=function(){return this.data.length};x.prototype.getBitsLength=function(){return x.getBitsLength(this.data.length)};x.prototype.write=function(t){let e;for(e=0;e+2<=this.data.length;e+=2){let r=mt.indexOf(this.data[e])*45;r+=mt.indexOf(this.data[e+1]),t.put(r,11)}this.data.length%2&&t.put(mt.indexOf(this.data[e]),6)};he.exports=x});var we=d((er,me)=>{var un=M();function U(n){this.mode=un.BYTE,typeof n=="string"?this.data=new TextEncoder().encode(n):this.data=new Uint8Array(n)}U.getBitsLength=function(t){return t*8};U.prototype.getLength=function(){return this.data.length};U.prototype.getBitsLength=function(){return U.getBitsLength(this.data.length)};U.prototype.write=function(n){for(let t=0,e=this.data.length;t<e;t++)n.put(this.data[t],8)};me.exports=U});var Ee=d((nr,ye)=>{var cn=M(),ln=N();function D(n){this.mode=cn.KANJI,this.data=n}D.getBitsLength=function(t){return t*13};D.prototype.getLength=function(){return this.data.length};D.prototype.getBitsLength=function(){return D.getBitsLength(this.data.length)};D.prototype.write=function(n){let t;for(t=0;t<this.data.length;t++){let e=ln.toSJIS(this.data[t]);if(e>=33088&&e<=40956)e-=33088;else if(e>=57408&&e<=60351)e-=49472;else throw new Error("Invalid SJIS character: "+this.data[t]+`
3
+ Make sure your charset is UTF-8`);e=(e>>>8&255)*192+(e&255),n.put(e,13)}};ye.exports=D});var Ce=d((rr,wt)=>{"use strict";var K={single_source_shortest_paths:function(n,t,e){var r={},o={};o[t]=0;var i=K.PriorityQueue.make();i.push(t,0);for(var s,u,c,l,a,m,h,y,A;!i.empty();){s=i.pop(),u=s.value,l=s.cost,a=n[u]||{};for(c in a)a.hasOwnProperty(c)&&(m=a[c],h=l+m,y=o[c],A=typeof o[c]>"u",(A||y>h)&&(o[c]=h,i.push(c,h),r[c]=u))}if(typeof e<"u"&&typeof o[e]>"u"){var T=["Could not find a path from ",t," to ",e,"."].join("");throw new Error(T)}return r},extract_shortest_path_from_predecessor_list:function(n,t){for(var e=[],r=t,o;r;)e.push(r),o=n[r],r=n[r];return e.reverse(),e},find_path:function(n,t,e){var r=K.single_source_shortest_paths(n,t,e);return K.extract_shortest_path_from_predecessor_list(r,e)},PriorityQueue:{make:function(n){var t=K.PriorityQueue,e={},r;n=n||{};for(r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);return e.queue=[],e.sorter=n.sorter||t.default_sorter,e},default_sorter:function(n,t){return n.cost-t.cost},push:function(n,t){var e={value:n,cost:t};this.queue.push(e),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};typeof wt<"u"&&(wt.exports=K)});var Pe=d(F=>{var f=M(),Te=ge(),Ne=pe(),Ie=we(),Me=Ee(),J=dt(),X=N(),an=Ce();function Be(n){return unescape(encodeURIComponent(n)).length}function O(n,t,e){let r=[],o;for(;(o=n.exec(e))!==null;)r.push({data:o[0],index:o.index,mode:t,length:o[0].length});return r}function Se(n){let t=O(J.NUMERIC,f.NUMERIC,n),e=O(J.ALPHANUMERIC,f.ALPHANUMERIC,n),r,o;return X.isKanjiModeEnabled()?(r=O(J.BYTE,f.BYTE,n),o=O(J.KANJI,f.KANJI,n)):(r=O(J.BYTE_KANJI,f.BYTE,n),o=[]),t.concat(e,r,o).sort(function(s,u){return s.index-u.index}).map(function(s){return{data:s.data,mode:s.mode,length:s.length}})}function yt(n,t){switch(t){case f.NUMERIC:return Te.getBitsLength(n);case f.ALPHANUMERIC:return Ne.getBitsLength(n);case f.KANJI:return Me.getBitsLength(n);case f.BYTE:return Ie.getBitsLength(n)}}function fn(n){return n.reduce(function(t,e){let r=t.length-1>=0?t[t.length-1]:null;return r&&r.mode===e.mode?(t[t.length-1].data+=e.data,t):(t.push(e),t)},[])}function dn(n){let t=[];for(let e=0;e<n.length;e++){let r=n[e];switch(r.mode){case f.NUMERIC:t.push([r,{data:r.data,mode:f.ALPHANUMERIC,length:r.length},{data:r.data,mode:f.BYTE,length:r.length}]);break;case f.ALPHANUMERIC:t.push([r,{data:r.data,mode:f.BYTE,length:r.length}]);break;case f.KANJI:t.push([r,{data:r.data,mode:f.BYTE,length:Be(r.data)}]);break;case f.BYTE:t.push([{data:r.data,mode:f.BYTE,length:Be(r.data)}])}}return t}function gn(n,t){let e={},r={start:{}},o=["start"];for(let i=0;i<n.length;i++){let s=n[i],u=[];for(let c=0;c<s.length;c++){let l=s[c],a=""+i+c;u.push(a),e[a]={node:l,lastCount:0},r[a]={};for(let m=0;m<o.length;m++){let h=o[m];e[h]&&e[h].node.mode===l.mode?(r[h][a]=yt(e[h].lastCount+l.length,l.mode)-yt(e[h].lastCount,l.mode),e[h].lastCount+=l.length):(e[h]&&(e[h].lastCount=l.length),r[h][a]=yt(l.length,l.mode)+4+f.getCharCountIndicator(l.mode,t))}}o=u}for(let i=0;i<o.length;i++)r[o[i]].end=0;return{map:r,table:e}}function Ae(n,t){let e,r=f.getBestModeForData(n);if(e=f.from(t,r),e!==f.BYTE&&e.bit<r.bit)throw new Error('"'+n+'" cannot be encoded with mode '+f.toString(e)+`.
4
+ Suggested mode is: `+f.toString(r));switch(e===f.KANJI&&!X.isKanjiModeEnabled()&&(e=f.BYTE),e){case f.NUMERIC:return new Te(n);case f.ALPHANUMERIC:return new Ne(n);case f.KANJI:return new Me(n);case f.BYTE:return new Ie(n)}}F.fromArray=function(t){return t.reduce(function(e,r){return typeof r=="string"?e.push(Ae(r,null)):r.data&&e.push(Ae(r.data,r.mode)),e},[])};F.fromString=function(t,e){let r=Se(t,X.isKanjiModeEnabled()),o=dn(r),i=gn(o,e),s=an.find_path(i.map,"start","end"),u=[];for(let c=1;c<s.length-1;c++)u.push(i.table[s[c]].node);return F.fromArray(fn(u))};F.rawSplit=function(t){return F.fromArray(Se(t,X.isKanjiModeEnabled()))}});var Re=d(be=>{var et=N(),Et=Q(),hn=Kt(),pn=Ot(),mn=Yt(),wn=jt(),At=Gt(),Tt=ct(),yn=te(),tt=ue(),En=fe(),Cn=M(),Ct=Pe();function Bn(n,t){let e=n.size,r=wn.getPositions(t);for(let o=0;o<r.length;o++){let i=r[o][0],s=r[o][1];for(let u=-1;u<=7;u++)if(!(i+u<=-1||e<=i+u))for(let c=-1;c<=7;c++)s+c<=-1||e<=s+c||(u>=0&&u<=6&&(c===0||c===6)||c>=0&&c<=6&&(u===0||u===6)||u>=2&&u<=4&&c>=2&&c<=4?n.set(i+u,s+c,!0,!0):n.set(i+u,s+c,!1,!0))}}function An(n){let t=n.size;for(let e=8;e<t-8;e++){let r=e%2===0;n.set(e,6,r,!0),n.set(6,e,r,!0)}}function Tn(n,t){let e=mn.getPositions(t);for(let r=0;r<e.length;r++){let o=e[r][0],i=e[r][1];for(let s=-2;s<=2;s++)for(let u=-2;u<=2;u++)s===-2||s===2||u===-2||u===2||s===0&&u===0?n.set(o+s,i+u,!0,!0):n.set(o+s,i+u,!1,!0)}}function Nn(n,t){let e=n.size,r=tt.getEncodedBits(t),o,i,s;for(let u=0;u<18;u++)o=Math.floor(u/3),i=u%3+e-8-3,s=(r>>u&1)===1,n.set(o,i,s,!0),n.set(i,o,s,!0)}function Bt(n,t,e){let r=n.size,o=En.getEncodedBits(t,e),i,s;for(i=0;i<15;i++)s=(o>>i&1)===1,i<6?n.set(i,8,s,!0):i<8?n.set(i+1,8,s,!0):n.set(r-15+i,8,s,!0),i<8?n.set(8,r-i-1,s,!0):i<9?n.set(8,15-i-1+1,s,!0):n.set(8,15-i-1,s,!0);n.set(r-8,8,1,!0)}function In(n,t){let e=n.size,r=-1,o=e-1,i=7,s=0;for(let u=e-1;u>0;u-=2)for(u===6&&u--;;){for(let c=0;c<2;c++)if(!n.isReserved(o,u-c)){let l=!1;s<t.length&&(l=(t[s]>>>i&1)===1),n.set(o,u-c,l),i--,i===-1&&(s++,i=7)}if(o+=r,o<0||e<=o){o-=r,r=-r;break}}}function Mn(n,t,e){let r=new hn;e.forEach(function(c){r.put(c.mode.bit,4),r.put(c.getLength(),Cn.getCharCountIndicator(c.mode,n)),c.write(r)});let o=et.getSymbolTotalCodewords(n),i=Tt.getTotalCodewordsCount(n,t),s=(o-i)*8;for(r.getLengthInBits()+4<=s&&r.put(0,4);r.getLengthInBits()%8!==0;)r.putBit(0);let u=(s-r.getLengthInBits())/8;for(let c=0;c<u;c++)r.put(c%2?17:236,8);return Sn(r,n,t)}function Sn(n,t,e){let r=et.getSymbolTotalCodewords(t),o=Tt.getTotalCodewordsCount(t,e),i=r-o,s=Tt.getBlocksCount(t,e),u=r%s,c=s-u,l=Math.floor(r/s),a=Math.floor(i/s),m=a+1,h=l-a,y=new yn(h),A=0,T=new Array(s),bt=new Array(s),rt=0,ze=new Uint8Array(n.buffer);for(let q=0;q<s;q++){let it=q<c?a:m;T[q]=ze.slice(A,A+it),bt[q]=y.encode(T[q]),A+=it,rt=Math.max(rt,it)}let ot=new Uint8Array(r),Rt=0,E,C;for(E=0;E<rt;E++)for(C=0;C<s;C++)E<T[C].length&&(ot[Rt++]=T[C][E]);for(E=0;E<h;E++)for(C=0;C<s;C++)ot[Rt++]=bt[C][E];return ot}function Pn(n,t,e,r){let o;if(Array.isArray(n))o=Ct.fromArray(n);else if(typeof n=="string"){let l=t;if(!l){let a=Ct.rawSplit(n);l=tt.getBestVersionForData(a,e)}o=Ct.fromString(n,l||40)}else throw new Error("Invalid data");let i=tt.getBestVersionForData(o,e);if(!i)throw new Error("The amount of data is too big to be stored in a QR Code");if(!t)t=i;else if(t<i)throw new Error(`
5
+ The chosen QR Code version cannot contain this amount of data.
6
+ Minimum version required to store current data is: `+i+`.
7
+ `);let s=Mn(t,e,o),u=et.getSymbolSize(t),c=new pn(u);return Bn(c,t),An(c),Tn(c,t),Bt(c,e,0),t>=7&&Nn(c,t),In(c,s),isNaN(r)&&(r=At.getBestMask(c,Bt.bind(null,c,e))),At.applyMask(r,c),Bt(c,e,r),{modules:c,version:t,errorCorrectionLevel:e,maskPattern:r,segments:o}}be.create=function(t,e){if(typeof t>"u"||t==="")throw new Error("No input text");let r=Et.M,o,i;return typeof e<"u"&&(r=Et.from(e.errorCorrectionLevel,Et.M),o=tt.from(e.version),i=At.from(e.maskPattern),e.toSJISFunc&&et.setToSJISFunction(e.toSJISFunc)),Pn(t,o,r,i)}});var Nt=d(L=>{function Le(n){if(typeof n=="number"&&(n=n.toString()),typeof n!="string")throw new Error("Color should be defined as hex string");let t=n.slice().replace("#","").split("");if(t.length<3||t.length===5||t.length>8)throw new Error("Invalid hex color: "+n);(t.length===3||t.length===4)&&(t=Array.prototype.concat.apply([],t.map(function(r){return[r,r]}))),t.length===6&&t.push("F","F");let e=parseInt(t.join(""),16);return{r:e>>24&255,g:e>>16&255,b:e>>8&255,a:e&255,hex:"#"+t.slice(0,6).join("")}}L.getOptions=function(t){t||(t={}),t.color||(t.color={});let e=typeof t.margin>"u"||t.margin===null||t.margin<0?4:t.margin,r=t.width&&t.width>=21?t.width:void 0,o=t.scale||4;return{width:r,scale:r?4:o,margin:e,color:{dark:Le(t.color.dark||"#000000ff"),light:Le(t.color.light||"#ffffffff")},type:t.type,rendererOpts:t.rendererOpts||{}}};L.getScale=function(t,e){return e.width&&e.width>=t+e.margin*2?e.width/(t+e.margin*2):e.scale};L.getImageWidth=function(t,e){let r=L.getScale(t,e);return Math.floor((t+e.margin*2)*r)};L.qrToImageData=function(t,e,r){let o=e.modules.size,i=e.modules.data,s=L.getScale(o,r),u=Math.floor((o+r.margin*2)*s),c=r.margin*s,l=[r.color.light,r.color.dark];for(let a=0;a<u;a++)for(let m=0;m<u;m++){let h=(a*u+m)*4,y=r.color.light;if(a>=c&&m>=c&&a<u-c&&m<u-c){let A=Math.floor((a-c)/s),T=Math.floor((m-c)/s);y=l[i[A*o+T]?1:0]}t[h++]=y.r,t[h++]=y.g,t[h++]=y.b,t[h]=y.a}}});var qe=d(nt=>{var It=Nt();function bn(n,t,e){n.clearRect(0,0,t.width,t.height),t.style||(t.style={}),t.height=e,t.width=e,t.style.height=e+"px",t.style.width=e+"px"}function Rn(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}nt.render=function(t,e,r){let o=r,i=e;typeof o>"u"&&(!e||!e.getContext)&&(o=e,e=void 0),e||(i=Rn()),o=It.getOptions(o);let s=It.getImageWidth(t.modules.size,o),u=i.getContext("2d"),c=u.createImageData(s,s);return It.qrToImageData(c.data,t,o),bn(u,i,s),u.putImageData(c,0,0),i};nt.renderToDataURL=function(t,e,r){let o=r;typeof o>"u"&&(!e||!e.getContext)&&(o=e,e=void 0),o||(o={});let i=nt.render(t,e,o),s=o.type||"image/png",u=o.rendererOpts||{};return i.toDataURL(s,u.quality)}});var Ue=d(xe=>{var Ln=Nt();function _e(n,t){let e=n.a/255,r=t+'="'+n.hex+'"';return e<1?r+" "+t+'-opacity="'+e.toFixed(2).slice(1)+'"':r}function Mt(n,t,e){let r=n+t;return typeof e<"u"&&(r+=" "+e),r}function qn(n,t,e){let r="",o=0,i=!1,s=0;for(let u=0;u<n.length;u++){let c=Math.floor(u%t),l=Math.floor(u/t);!c&&!i&&(i=!0),n[u]?(s++,u>0&&c>0&&n[u-1]||(r+=i?Mt("M",c+e,.5+l+e):Mt("m",o,0),o=0,i=!1),c+1<t&&n[u+1]||(r+=Mt("h",s),s=0)):o++}return r}xe.render=function(t,e,r){let o=Ln.getOptions(e),i=t.modules.size,s=t.modules.data,u=i+o.margin*2,c=o.color.light.a?"<path "+_e(o.color.light,"fill")+' d="M0 0h'+u+"v"+u+'H0z"/>':"",l="<path "+_e(o.color.dark,"stroke")+' d="'+qn(s,i,o.margin)+'"/>',a='viewBox="0 0 '+u+" "+u+'"',h='<svg xmlns="http://www.w3.org/2000/svg" '+(o.width?'width="'+o.width+'" height="'+o.width+'" ':"")+a+' shape-rendering="crispEdges">'+c+l+`</svg>
8
+ `;return typeof r=="function"&&r(null,h),h}});var Fe=d(Y=>{var _n=zt(),St=Re(),De=qe(),xn=Ue();function Pt(n,t,e,r,o){let i=[].slice.call(arguments,1),s=i.length,u=typeof i[s-1]=="function";if(!u&&!_n())throw new Error("Callback required as last argument");if(u){if(s<2)throw new Error("Too few arguments provided");s===2?(o=e,e=t,t=r=void 0):s===3&&(t.getContext&&typeof o>"u"?(o=r,r=void 0):(o=r,r=e,e=t,t=void 0))}else{if(s<1)throw new Error("Too few arguments provided");return s===1?(e=t,t=r=void 0):s===2&&!t.getContext&&(r=e,e=t,t=void 0),new Promise(function(c,l){try{let a=St.create(e,r);c(n(a,t,r))}catch(a){l(a)}})}try{let c=St.create(e,r);o(null,n(c,t,r))}catch(c){o(c)}}Y.create=St.create;Y.toCanvas=Pt.bind(null,De.render);Y.toDataURL=Pt.bind(null,De.renderToDataURL);Y.toString=Pt.bind(null,function(n,t,e){return xn.render(n,e)})});var ke=He(Fe(),1);var Un=["qrcode"],hr=(()=>{class n{data;qrcodeElement=Ft("qrcode");ngOnChanges(){this.renderQrCode()}renderQrCode(){return Lt(this,null,function*(){if(this.data){let e=this.qrcodeElement();e.nativeElement.innerHTML=yield(0,ke.toString)(this.data,{type:"svg",margin:0,color:{light:"#ffffff00",dark:document.body.classList.contains("dark-mode")?"#FFF":"#000"}}),e.nativeElement.querySelector("svg").querySelector("path").classList.add("qr-code-theme-color")}})}static \u0275fac=function(r){return new(r||n)};static \u0275cmp=_t({type:n,selectors:[["app-qrcode"]],viewQuery:function(r,o){r&1&&Ut(o.qrcodeElement,Un,5),r&2&&Dt()},inputs:{data:"data"},features:[qt],decls:2,vars:0,consts:[["qrcode",""],[2,"width","100%","height","100%"]],template:function(r,o){r&1&&xt(0,"div",1,0)},encapsulation:2})}return n})();export{hr as a};