homebridge-config-ui-x 5.0.0-beta.36 → 5.0.0-beta.37

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 (87) hide show
  1. package/package.json +1 -1
  2. package/public/3rdpartylicenses.txt +0 -70
  3. package/public/{chunk-76YMQE3M.js → chunk-2FYN4AQW.js} +1 -1
  4. package/public/{chunk-6VQUZTBR.js → chunk-2G5W635D.js} +1 -1
  5. package/public/{chunk-T3PFHQEF.js → chunk-2VHNXX7S.js} +1 -1
  6. package/public/{chunk-TROWBWOI.js → chunk-3BOXNWOI.js} +1 -1
  7. package/public/{chunk-EJKY7TUH.js → chunk-3X3JN7L2.js} +1 -1
  8. package/public/{chunk-AGJQ475L.js → chunk-43DZUHXS.js} +1 -1
  9. package/public/chunk-55C65QIT.js +1 -0
  10. package/public/{chunk-JNO6VU35.js → chunk-5F65XVN2.js} +1 -1
  11. package/public/{chunk-TI5JTR4M.js → chunk-5GX76JEA.js} +1 -1
  12. package/public/chunk-5RZMUJ6S.js +1 -0
  13. package/public/{chunk-WHBCTF2I.js → chunk-5ZSMI5RW.js} +1 -1
  14. package/public/chunk-6DSQDU6X.js +1 -0
  15. package/public/{chunk-2BNYOQCW.js → chunk-6ZW6DFXM.js} +1 -1
  16. package/public/{chunk-RRUCC4UM.js → chunk-AFHUSYKG.js} +1 -1
  17. package/public/{chunk-T4PURZCK.js → chunk-BFEMJZWI.js} +1 -1
  18. package/public/chunk-BQQ7SI73.js +1 -0
  19. package/public/chunk-BY7XCS73.js +1 -0
  20. package/public/chunk-C2RICIO2.js +1 -0
  21. package/public/{chunk-POAKVVF2.js → chunk-CKRLUDH6.js} +1 -1
  22. package/public/{chunk-JNL225HQ.js → chunk-CNUMFNDI.js} +1 -1
  23. package/public/{chunk-VCLNKK3Y.js → chunk-D67RSISA.js} +1 -1
  24. package/public/{chunk-7P7JUG4X.js → chunk-E66CIXOF.js} +5 -5
  25. package/public/{chunk-SBMAYKUX.js → chunk-ESV4M6MU.js} +1 -1
  26. package/public/chunk-FMKN5WOC.js +1 -0
  27. package/public/chunk-HLCA3Q2D.js +1 -0
  28. package/public/{chunk-OY5LBRVA.js → chunk-I7356EVZ.js} +1 -1
  29. package/public/chunk-I7MMB7MD.js +1 -0
  30. package/public/{chunk-YKNAHNGY.js → chunk-ICBZE4AQ.js} +1 -1
  31. package/public/{chunk-I2F2MP74.js → chunk-IK7NDR5D.js} +1 -1
  32. package/public/{chunk-F6WFMKYJ.js → chunk-ILMG4QEX.js} +1 -1
  33. package/public/{chunk-GLU4GX3I.js → chunk-IS2FWNNK.js} +1 -1
  34. package/public/{chunk-ZQGDYLQU.js → chunk-J535GCZZ.js} +1 -1
  35. package/public/{chunk-37342H56.js → chunk-J6THMA7C.js} +1 -1
  36. package/public/chunk-KFPAD73Q.js +1 -0
  37. package/public/chunk-KLH3Q4Y2.js +1 -0
  38. package/public/{chunk-AHGEAOPV.js → chunk-KP734VBH.js} +1 -1
  39. package/public/{chunk-KGZIU3W2.js → chunk-KPSDMQ2B.js} +1 -1
  40. package/public/{chunk-2IB7U7CP.js → chunk-LCDLXCTN.js} +1 -1
  41. package/public/{chunk-ZW6RVKYH.js → chunk-LPZYBAR5.js} +1 -1
  42. package/public/{chunk-QQK6ZXND.js → chunk-LRWWB655.js} +1 -1
  43. package/public/{chunk-PGFH5ESW.js → chunk-NKOXS7BF.js} +1 -1
  44. package/public/{chunk-7A25PAM7.js → chunk-OHS6VJO6.js} +1 -1
  45. package/public/{chunk-XLPWMFXX.js → chunk-OKRGBGAT.js} +1 -1
  46. package/public/{chunk-FAPE5Q5F.js → chunk-PZFLYD2M.js} +1 -1
  47. package/public/{chunk-KYPCX2ID.js → chunk-QVTW3TV2.js} +1 -1
  48. package/public/{chunk-UWFYNH6W.js → chunk-RNZPYTKX.js} +1 -1
  49. package/public/{chunk-5RNQ5G6T.js → chunk-RWV2PLEE.js} +1 -1
  50. package/public/{chunk-W6PBFS4D.js → chunk-RYTJZDC4.js} +1 -1
  51. package/public/{chunk-Y34W3CUD.js → chunk-SASLISZ4.js} +1 -1
  52. package/public/{chunk-CIIXSFUN.js → chunk-SIUO7YU6.js} +1 -1
  53. package/public/{chunk-UVFTNUVW.js → chunk-SRFN5JIN.js} +1 -1
  54. package/public/chunk-UFQ3GRVA.js +1 -0
  55. package/public/chunk-UGU6PGAK.js +1 -0
  56. package/public/{chunk-Y2Z3IZ4S.js → chunk-UUN6ZLIL.js} +1 -1
  57. package/public/{chunk-AQX2C7OY.js → chunk-V7AAZRAR.js} +1 -1
  58. package/public/chunk-W37K3EET.js +1 -0
  59. package/public/{chunk-XAUZKAOZ.js → chunk-WK4QAH4N.js} +1 -1
  60. package/public/{chunk-NTBDPWDW.js → chunk-WKCJOWBB.js} +1 -1
  61. package/public/chunk-WLL3PI56.js +1 -0
  62. package/public/{chunk-POVXCDK5.js → chunk-WZSACMEZ.js} +1 -1
  63. package/public/chunk-X33TW7UK.js +1 -0
  64. package/public/{chunk-RYZ4IXCN.js → chunk-XBUA2BEY.js} +1 -1
  65. package/public/{chunk-WN6H7IUU.js → chunk-Z6DMRX3O.js} +1 -1
  66. package/public/chunk-ZA7ZUC3I.js +1 -0
  67. package/public/chunk-ZGB2LSNB.js +1 -0
  68. package/public/index.html +1 -1
  69. package/public/{main-MI73XX7G.js → main-323ROD6Y.js} +1 -1
  70. package/public/chunk-B32E2WRF.js +0 -1
  71. package/public/chunk-B44UNYWQ.js +0 -1
  72. package/public/chunk-D7EYNOYB.js +0 -1
  73. package/public/chunk-HXJQ7BOK.js +0 -1
  74. package/public/chunk-HYA4DWUG.js +0 -1
  75. package/public/chunk-INVOJS3B.js +0 -1
  76. package/public/chunk-KJKMLPII.js +0 -1
  77. package/public/chunk-LEPNWGOY.js +0 -1
  78. package/public/chunk-NCHGQZ5H.js +0 -1
  79. package/public/chunk-PKJVQL6N.js +0 -1
  80. package/public/chunk-PZ44YARR.js +0 -1
  81. package/public/chunk-RP7A23KE.js +0 -1
  82. package/public/chunk-SLHI7QNB.js +0 -1
  83. package/public/chunk-UVFODSI2.js +0 -1
  84. package/public/chunk-VDFXVBQ3.js +0 -1
  85. package/public/chunk-Z3RTHBQZ.js +0 -1
  86. package/public/chunk-ZQ4RT7G3.js +0 -1
  87. package/public/chunk-ZUT7DDEG.js +0 -1
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "homebridge-config-ui-x",
3
3
  "displayName": "Homebridge UI",
4
- "version": "5.0.0-beta.36",
4
+ "version": "5.0.0-beta.37",
5
5
  "description": "A web based management, configuration and control platform for Homebridge.",
6
6
  "author": "oznu <dev@oz.nu>",
7
7
  "license": "MIT",
@@ -293,51 +293,11 @@ SOFTWARE.
293
293
  Package: atoa
294
294
  License: "MIT"
295
295
 
296
- The MIT License (MIT)
297
-
298
- Copyright © 2015 Nicolas Bevacqua
299
-
300
- Permission is hereby granted, free of charge, to any person obtaining a copy of
301
- this software and associated documentation files (the "Software"), to deal in
302
- the Software without restriction, including without limitation the rights to
303
- use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
304
- the Software, and to permit persons to whom the Software is furnished to do so,
305
- subject to the following conditions:
306
-
307
- The above copyright notice and this permission notice shall be included in all
308
- copies or substantial portions of the Software.
309
-
310
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
311
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
312
- FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
313
- COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
314
- IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
315
- CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
316
296
 
317
297
  --------------------------------------------------------------------------------
318
298
  Package: ticky
319
299
  License: "MIT"
320
300
 
321
- The MIT License (MIT)
322
-
323
- Copyright © 2015 Nicolas Bevacqua
324
-
325
- Permission is hereby granted, free of charge, to any person obtaining a copy of
326
- this software and associated documentation files (the "Software"), to deal in
327
- the Software without restriction, including without limitation the rights to
328
- use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
329
- the Software, and to permit persons to whom the Software is furnished to do so,
330
- subject to the following conditions:
331
-
332
- The above copyright notice and this permission notice shall be included in all
333
- copies or substantial portions of the Software.
334
-
335
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
336
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
337
- FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
338
- COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
339
- IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
340
- CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
341
301
 
342
302
  --------------------------------------------------------------------------------
343
303
  Package: contra
@@ -417,26 +377,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
417
377
  Package: dragula
418
378
  License: "MIT"
419
379
 
420
- The MIT License (MIT)
421
-
422
- Copyright © 2015-2016 Nicolas Bevacqua
423
-
424
- Permission is hereby granted, free of charge, to any person obtaining a copy of
425
- this software and associated documentation files (the "Software"), to deal in
426
- the Software without restriction, including without limitation the rights to
427
- use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
428
- the Software, and to permit persons to whom the Software is furnished to do so,
429
- subject to the following conditions:
430
-
431
- The above copyright notice and this permission notice shall be included in all
432
- copies or substantial portions of the Software.
433
-
434
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
435
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
436
- FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
437
- COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
438
- IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
439
- CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
440
380
 
441
381
  --------------------------------------------------------------------------------
442
382
  Package: ng2-dragula
@@ -923,16 +863,6 @@ THE SOFTWARE.
923
863
  Package: qrcode
924
864
  License: "MIT"
925
865
 
926
- The MIT License (MIT)
927
-
928
- Copyright (c) 2012 Ryan Day
929
-
930
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
931
-
932
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
933
-
934
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
935
-
936
866
 
937
867
  --------------------------------------------------------------------------------
938
868
  Package: dijkstrajs
@@ -1 +1 @@
1
- import{a as Pi,b as Si}from"./chunk-OY5LBRVA.js";import{a as vi}from"./chunk-HIDFXEU7.js";import{n as wi,v as U}from"./chunk-6VQUZTBR.js";import{a as z}from"./chunk-T4PURZCK.js";import{a as xi}from"./chunk-VOG67KUU.js";import{a as bi}from"./chunk-F6WFMKYJ.js";import{a as hi}from"./chunk-GLU4GX3I.js";import{h as si,i as di,j as pi,k as ci,l as ui,m as gi,n as mi,o as fi}from"./chunk-7P7JUG4X.js";import{c as X,d as Y,e as Z,f as ii,g as ei,j as ni,m as ti,p as oi,q as ai,y as li,z as ri}from"./chunk-A6ASL2RK.js";import{a as R}from"./chunk-AHGEAOPV.js";import{a as _i,d as Ci}from"./chunk-7HPEGK3R.js";import{b as F}from"./chunk-5RNQ5G6T.js";import{h as j,k as A}from"./chunk-AQX2C7OY.js";import{a as N,b as $}from"./chunk-G67F4LRX.js";import{$c as E,Ac as c,Bc as u,Cc as D,Jb as B,Kb as b,Pb as s,Rb as L,Sb as G,Tb as W,Ub as a,Vb as l,Wb as d,_b as C,bc as m,cb as O,cc as p,cd as K,db as T,gb as t,gd as Q,h as y,ma as w,mc as g,nc as P,oc as v,sb as V,ua as f,va as _,w as I,wc as H,xc as k,yc as J,zb as x}from"./chunk-ELVGIIRZ.js";var Ti=(n,r)=>({"orange-text":n,"grey-text":r}),q=n=>({opacity:n}),Vi=(n,r)=>({"green-text":n,"grey-text":r}),Ei=(n,r)=>({"purple-text":n,"grey-text":r}),$i=(n,r)=>({scopedLink:n,verifiedLink:r});function Mi(n,r){n&1&&(a(0,"h6",18),g(1),c(2,"translate"),l(),a(3,"p",19),g(4),c(5,"translate"),l(),a(6,"p",19),g(7),c(8,"translate"),l()),n&2&&(t(),P(u(2,3,"plugins.manage.scoped_subtitle")),t(3),P(u(5,5,"plugins.manage.scoped_message")),t(3),P(u(8,7,"plugins.manage.verified_message")))}function Hi(n,r){n&1&&(a(0,"h6",18),g(1),c(2,"translate"),l(),a(3,"p",19),g(4),c(5,"translate"),l()),n&2&&(t(),P(u(2,2,"plugins.manage.verified_subtitle")),t(3),P(u(5,4,"plugins.manage.verified_message")))}function Di(n,r){n&1&&(a(0,"h6",18),g(1),c(2,"translate"),l(),a(3,"p",19),g(4),c(5,"translate"),l()),n&2&&(t(),P(u(2,2,"plugins.manage.unverified_subtitle")),t(3),P(u(5,4,"plugins.manage.unverified_message")))}function Ni(n,r){if(n&1){let e=C();a(0,"button",20),m("click",function(){f(e);let i=p();return _(i.$activeModal.dismiss("Dismiss"))}),g(1),c(2,"translate"),l()}n&2&&(t(),v(" ",u(2,1,"form.button_close")," "))}function ji(n,r){if(n&1){let e=C();a(0,"button",20),m("click",function(){f(e);let i=p();return _(i.$activeModal.dismiss("Dismiss"))}),g(1),c(2,"translate"),l()}n&2&&(t(),v(" ",u(2,1,"form.button_close")," "))}function Ai(n,r){if(n&1&&(a(0,"a",17),g(1),c(2,"translate"),d(3,"i",21),l()),n&2){let e=p();b("href",e.plugin.links.homepage||e.plugin.links.npm,T),t(),v(" ",u(2,2,"plugins.button_homepage")," ")}}var Bi=(()=>{class n{$activeModal=w(gi);plugin;defaultIcon="assets/hb-icon.png";linkScoped='<a href="https://github.com/homebridge/plugins/wiki/Scoped-Plugins" target="_blank"><i class="fas fa-fw fa-external-link-alt primary-text"></i></a>';linkVerified='<a href="https://github.com/homebridge/plugins/wiki/Verified-Plugins" target="_blank"><i class="fas fa-fw fa-external-link-alt primary-text"></i></a>';constructor(){}ngOnInit(){this.plugin.icon||(this.plugin.icon=this.defaultIcon)}handleIconError(){this.plugin.icon=this.defaultIcon}static \u0275fac=function(o){return new(o||n)};static \u0275cmp=V({type:n,selectors:[["ng-component"]],inputs:{plugin:"plugin"},decls:32,vars:45,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center"],["alt","Plugin Icon",1,"mb-3","plugin-icon-card",3,"error","src"],[1,"mb-1"],[1,"grey-text","mb-0","font-monospace"],[1,"grey-text","mb-1","font-monospace"],[1,"mb-3"],[1,"fas","fa-fw","fa-shield-alt","mb-3",2,"font-size","48px",3,"ngClass","ngStyle"],[1,"mb-0","grey-text",3,"innerHTML"],[1,"modal-footer","justify-content-between"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant"],[1,"text-center"],[1,"text-end"],["target","_blank","rel","noopener noreferrer",1,"btn","btn-primary","text-decoration-none",3,"href"],[1,"mb-2"],[1,"mb-1","grey-text"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"fas","fa-fw","fa-external-link-alt"]],template:function(o,i){o&1&&(a(0,"div",0)(1,"div",1)(2,"h5",2),g(3),c(4,"translate"),l(),a(5,"button",3),c(6,"translate"),m("click",function(){return i.$activeModal.dismiss("Dismiss")}),l()(),a(7,"div",4)(8,"img",5),m("error",function(){return i.handleIconError()}),l(),a(9,"h4",6),g(10),l(),a(11,"p",7),g(12),l(),a(13,"p",8),g(14),l(),a(15,"p",9),g(16),l(),d(17,"i",10)(18,"i",10)(19,"i",10),x(20,Mi,9,9)(21,Hi,6,6)(22,Di,6,6),d(23,"p",11),c(24,"translate"),l(),a(25,"div",12)(26,"div",13),x(27,Ni,3,3,"button",14),l(),a(28,"div",15),x(29,ji,3,3,"button",14),l(),a(30,"div",16),x(31,Ai,4,4,"a",17),l()()()),o&2&&(t(3),P(u(4,20,"plugins.manage.information")),t(2),B("aria-label",u(6,22,"form.button_close")),t(3),b("src",i.plugin.icon,T),t(2),P(i.plugin.displayName),t(2),P(i.plugin.name),t(2),v("@",i.plugin.author,""),t(2),P(i.plugin.description),t(),b("ngClass",k(27,Ti,!i.plugin.verifiedPlugin&&!i.plugin.verifiedPlusPlugin,i.plugin.verifiedPlugin||i.plugin.verifiedPlusPlugin))("ngStyle",H(30,q,!i.plugin.verifiedPlugin&&!i.plugin.verifiedPlusPlugin?1:.25)),t(),b("ngClass",k(32,Vi,!i.plugin.isHbScoped&&(i.plugin.verifiedPlugin||i.plugin.verifiedPlusPlugin),i.plugin.isHbScoped||!i.plugin.verifiedPlugin&&!i.plugin.verifiedPlusPlugin))("ngStyle",H(35,q,!i.plugin.isHbScoped&&(i.plugin.verifiedPlugin||i.plugin.verifiedPlusPlugin)?1:.25)),t(),b("ngClass",k(37,Ei,i.plugin.isHbScoped,!i.plugin.isHbScoped))("ngStyle",H(40,q,i.plugin.isHbScoped?1:.25)),t(),s(i.plugin.isHbScoped?20:-1),t(),s(!i.plugin.isHbScoped&&(i.plugin.verifiedPlugin||i.plugin.verifiedPlusPlugin)?21:-1),t(),s(!i.plugin.verifiedPlugin&&!i.plugin.verifiedPlusPlugin?22:-1),t(),b("innerHTML",D(24,24,"plugins.manage.more_info",k(42,$i,i.linkScoped,i.linkVerified)),O),t(4),s(i.plugin.links.homepage||i.plugin.links.npm?27:-1),t(2),s(!i.plugin.links.homepage&&!i.plugin.links.npm?29:-1),t(2),s(i.plugin.links.homepage||i.plugin.links.npm?31:-1))},dependencies:[$,E,K],styles:[".plugin-icon[_ngcontent-%COMP%]{height:75px;width:75px;border-radius:15px;border:1px solid #222222}"]})}return n})();var Fi=(n,r,e)=>({"purple-text":n,"green-text":r,"orange-text":e}),Ri=(n,r)=>({"fa-bridge-circle-exclamation orange-text":n,"fa-bridge-circle-xmark red-text":r});function Ui(n,r){n&1&&d(0,"i",25)}function zi(n,r){n&1&&d(0,"i",26)}function qi(n,r){if(n&1){let e=C();a(0,"a",24),m("click",function(){f(e);let i=p();return _(i.openHb2InfoModal())}),x(1,Ui,1,0,"i",25)(2,zi,1,0,"i",26),l()}if(n&2){let e=p();b("ngbTooltip","Homebridge v2.0 Readiness")("placement","right"),t(),s(e.hb2Status==="supported"?1:-1),t(),s(e.hb2Status==="unknown"?2:-1)}}function Oi(n,r){if(n&1){let e=C();a(0,"a",27),c(1,"translate"),c(2,"translate"),m("click",function(){f(e);let i=p();return _(i.$plugin.checkAndUpdatePlugin(i.plugin,i.plugin.updateTag||"latest"))}),d(3,"i",28),l()}n&2&&(b("ngbTooltip",u(1,2,"plugins.button_update")),B("aria-label",u(2,4,"plugins.button_update")))}function Li(n,r){if(n&1){let e=C();a(0,"a",27),c(1,"translate"),c(2,"translate"),m("click",function(){f(e);let i=p();return _(i.$plugin.switchToScoped(i.plugin))}),d(3,"i",29),l()}n&2&&(b("ngbTooltip",u(1,2,"plugins.manage.scoped.switch")),B("aria-label",u(2,4,"plugins.manage.scoped.switch")))}function Gi(n,r){if(n&1){let e=C();a(0,"a",27),c(1,"translate"),c(2,"translate"),m("click",function(){f(e);let i=p();return _(i.$plugin.settings(i.plugin))}),d(3,"i",30),l()}n&2&&(b("ngbTooltip",u(1,2,"plugins.button_set_up")),B("aria-label",u(2,4,"plugins.button_set_up")))}function Wi(n,r){if(n&1){let e=C();a(0,"a",27),c(1,"translate"),c(2,"translate"),m("click",function(){f(e);let i=p();return _(i.$plugin.bridgeSettings(i.plugin))}),d(3,"i",31),l()}n&2&&(b("ngbTooltip",u(1,2,"child_bridge.setup")),B("aria-label",u(2,4,"child_bridge.setup")))}function Ji(n,r){if(n&1){let e=C();a(0,"a",27),c(1,"translate"),c(2,"translate"),m("click",function(){f(e);let i=p();return _(i.$plugin.bridgeSettings(i.plugin))}),d(3,"i",32),l()}n&2&&(b("ngbTooltip",u(1,2,"child_bridge.bridge_connect")),B("aria-label",u(2,4,"child_bridge.bridge_connect")))}function Ki(n,r){if(n&1&&d(0,"i",13),n&2){let e=p();b("ngClass",k(1,Ri,e.childBridgeStatus==="pending",e.childBridgeStatus==="down"))}}function Qi(n,r){if(n&1){let e=C();a(0,"a",15),m("click",function(){f(e);let i=p();return _(i.openFundingModal(i.plugin))}),d(1,"i",33),a(2,"span",17),g(3),l()()}if(n&2){let e=p();t(3),v("@",e.plugin.author,"")}}function Xi(n,r){if(n&1&&(a(0,"span",17),d(1,"i",34),g(2),l()),n&2){let e=p();t(2),v("@",e.plugin.author," ")}}function Yi(n,r){if(n&1&&(a(0,"span"),g(1),c(2,"date"),l()),n&2){let e=p(2);t(),v("(",D(2,1,e.plugin.lastUpdated,"yyyy-MM-dd"),")")}}function Zi(n,r){if(n&1&&(a(0,"span"),d(1,"i",35),a(2,"span",17),g(3),x(4,Yi,3,4,"span"),l()()),n&2){let e=p();t(3),v("v",e.plugin.latestVersion," "),t(),s(e.plugin.lastUpdated?4:-1)}}function ie(n,r){if(n&1&&(d(0,"i",36),g(1)),n&2){let e=p();t(),v("v",e.plugin.installedVersion," ")}}function ee(n,r){if(n&1){let e=C();a(0,"a",27),c(1,"translate"),m("click",function(){f(e);let i=p();return _(i.doChildBridgeAction("restart"))}),d(2,"i",37),l()}if(n&2){let e=p();b("ngbTooltip",u(1,1,e.setChildBridges.length>1?"child_bridge.restart_plural":"child_bridge.restart"))}}function ne(n,r){if(n&1){let e=C();a(0,"a",38),m("click",function(){f(e);let i=p();return _(i.enablePlugin(i.plugin))}),d(1,"i",39),c(2,"translate"),l()}n&2&&(t(),b("ngbTooltip",u(2,1,"plugins.status_disabled")))}function te(n,r){if(n&1){let e=C();a(0,"a",40),m("click",function(){f(e);let i=p();return _(i.$plugin.installAlternateVersion(i.plugin))}),d(1,"i",41),l()}}function oe(n,r){if(n&1){let e=C();a(0,"button",45),m("click",function(){f(e);let i=p(2);return _(i.viewPluginLog(i.plugin))}),d(1,"i",50),g(2),c(3,"translate"),l()}n&2&&(t(2),v(" ",u(3,1,"plugins.manage.plugin_logs")," "))}function ae(n,r){if(n&1){let e=C();a(0,"button",45),m("click",function(){f(e);let i=p(2);return _(i.$plugin.installAlternateVersion(i.plugin))}),d(1,"i",51),g(2),c(3,"translate"),l()}n&2&&(t(2),v(" ",u(3,1,"plugins.manage.manage_version")," "))}function le(n,r){if(n&1){let e=C();a(0,"button",45),m("click",function(){f(e);let i=p(2);return _(i.$plugin.jsonEditor(i.plugin))}),d(1,"i",52),g(2),c(3,"translate"),l()}n&2&&(t(2),v(" ",u(3,1,"plugins.manage.json_config")," "))}function re(n,r){if(n&1){let e=C();a(0,"button",45),m("click",function(){f(e);let i=p(2);return _(i.disablePlugin(i.plugin))}),d(1,"i",53),g(2),c(3,"translate"),l()}n&2&&(t(2),v(" ",u(3,1,"plugins.manage.disable")," "))}function se(n,r){if(n&1){let e=C();a(0,"button",45),m("click",function(){f(e);let i=p(2);return _(i.enablePlugin(i.plugin))}),d(1,"i",54),g(2),c(3,"translate"),l()}n&2&&(t(2),v(" ",u(3,1,"plugins.manage.enable")," "))}function de(n,r){if(n&1){let e=C();a(0,"button",45),m("click",function(){f(e);let i=p(2);return _(i.$plugin.uninstallPlugin(i.plugin,i.setChildBridges))}),d(1,"i",55),g(2),c(3,"translate"),l()}n&2&&(t(2),v(" ",u(3,1,"plugins.button_uninstall")," "))}function pe(n,r){n&1&&d(0,"div",48)}function ce(n,r){if(n&1){let e=C();a(0,"button",45),m("click",function(){f(e);let i=p(3);return _(i.doChildBridgeAction("restart"))}),d(1,"i",57),g(2),c(3,"translate"),l()}if(n&2){let e=p(3);t(2),v(" ",u(3,1,e.setChildBridges.length>1?"child_bridge.restart_plural":"child_bridge.restart")," ")}}function ue(n,r){if(n&1){let e=C();a(0,"button",45),m("click",function(){f(e);let i=p(3);return _(i.doChildBridgeAction("stop"))}),d(1,"i",58),g(2),c(3,"translate"),l()}if(n&2){let e=p(3);t(2),v(" ",u(3,1,e.setChildBridges.length>1?"child_bridge.stop_plural":"child_bridge.stop")," ")}}function ge(n,r){if(n&1){let e=C();a(0,"button",45),m("click",function(){f(e);let i=p(3);return _(i.doChildBridgeAction("start"))}),d(1,"i",59),g(2),c(3,"translate"),l()}if(n&2){let e=p(3);t(2),v(" ",u(3,1,e.setChildBridges.length>1?"child_bridge.start_plural":"child_bridge.start")," ")}}function me(n,r){if(n&1){let e=C();a(0,"button",45),m("click",function(){f(e);let i=p(3);return _(i.$plugin.resetChildBridges(i.setChildBridges))}),d(1,"i",60),g(2),c(3,"translate"),l()}n&2&&(t(2),v(" ",u(3,1,"child_bridge.reset_accessories")," "))}function fe(n,r){if(n&1){let e=C();a(0,"button",45),m("click",function(){f(e);let i=p(2);return _(i.$plugin.bridgeSettings(i.plugin))}),d(1,"i",56),g(2),c(3,"translate"),l(),x(4,ce,4,3,"button",47)(5,ue,4,3,"button",47)(6,ge,4,3,"button",47)(7,me,4,3,"button",47)}if(n&2){let e=p(2);t(2),v(" ",u(3,5,"child_bridge.bridge_settings")," "),t(2),s(e.childBridgeRestartInProgress?-1:4),t(),s(e.allChildBridgesStopped?-1:5),t(),s(e.allChildBridgesStopped?6:-1),t(),s(e.$settings.env.serviceMode?7:-1)}}function _e(n,r){n&1&&d(0,"div",48)}function Ce(n,r){if(n&1){let e=C();a(0,"button",45),m("click",function(){f(e);let i=p(2);return _(i.$plugin.bridgeSettings(i.plugin))}),d(1,"i",61),g(2),c(3,"translate"),l()}n&2&&(t(2),v(" ",u(3,1,"child_bridge.setup")," "))}function he(n,r){n&1&&d(0,"div",48)}function be(n,r){if(n&1){let e=C();a(0,"button",45),m("click",function(){f(e);let i=p(2);return _(i.$plugin.bridgeSettings(i.plugin))}),d(1,"i",61),g(2),c(3,"translate"),l()}n&2&&(t(2),v(" ",u(3,1,"child_bridge.setup")," "))}function ve(n,r){n&1&&d(0,"div",48)}function xe(n,r){if(n&1&&(a(0,"a",49),d(1,"i",62),g(2),c(3,"translate"),l()),n&2){let e=p(2);b("href",e.plugin.links.bugs,T),t(2),v(" ",u(3,2,"support.links.issue")," ")}}function we(n,r){if(n&1){let e=C();a(0,"span",23)(1,"a",42),d(2,"i",43),l(),a(3,"div",44)(4,"button",45),m("click",function(){f(e);let i=p();return _(i.$plugin.settings(i.plugin))}),d(5,"i",46),g(6),c(7,"translate"),l(),x(8,oe,4,3,"button",47)(9,ae,4,3,"button",47)(10,le,4,3,"button",47)(11,re,4,3,"button",47)(12,se,4,3,"button",47)(13,de,4,3,"button",47)(14,pe,1,0,"div",48)(15,fe,8,7)(16,_e,1,0,"div",48)(17,Ce,4,3,"button",47)(18,he,1,0,"div",48)(19,be,4,3,"button",47)(20,ve,1,0,"div",48)(21,xe,4,4,"a",49),l()()}if(n&2){let e=p();t(),B("aria-label","Plugin Actions Dropdown"),t(5),v(" ",u(7,16,"plugins.button_settings")," "),t(2),s(e.plugin.isConfigured&&!e.plugin.disabled?8:-1),t(),s(e.plugin.publicPackage?9:-1),t(),s(!e.isMobile&&e.plugin.name!=="homebridge-config-ui-x"?10:-1),t(),s(e.plugin.name!=="homebridge-config-ui-x"&&!e.plugin.disabled?11:-1),t(),s(e.plugin.name!=="homebridge-config-ui-x"&&e.plugin.disabled?12:-1),t(),s(e.plugin.name!=="homebridge-config-ui-x"?13:-1),t(),s(!e.plugin.disabled&&e.plugin.isConfigured&&e.plugin.hasChildBridges&&e.plugin.installedVersion&&e.plugin.name!=="homebridge-config-ui-x"?14:-1),t(),s(e.plugin.hasChildBridges&&!e.plugin.disabled?15:-1),t(),s(e.plugin.isConfigured&&!e.plugin.hasChildBridges&&!e.plugin.disabled&&!e.plugin.recommendChildBridge?16:-1),t(),s(e.plugin.isConfigured&&!e.plugin.hasChildBridges&&!e.plugin.disabled&&!e.plugin.recommendChildBridge?17:-1),t(),s(e.plugin.isConfigured&&!e.plugin.hasChildBridges&&!e.plugin.disabled&&e.plugin.recommendChildBridge&&e.plugin.updateAvailable?18:-1),t(),s(e.plugin.isConfigured&&!e.plugin.hasChildBridges&&!e.plugin.disabled&&e.plugin.recommendChildBridge&&e.plugin.updateAvailable?19:-1),t(),s(e.plugin.links!=null&&e.plugin.links.bugs?20:-1),t(),s(e.plugin.links!=null&&e.plugin.links.bugs?21:-1)}}var ki=(()=>{class n{$api=w(A);$md=w(xi);$modal=w(mi);$plugin=w(U);$settings=w(F);$toastr=w(j);$translate=w(N);$ws=w(R);plugin;hasChildBridges=!1;hasUnpairedChildBridges=!1;allChildBridgesStopped=!1;childBridgeStatus="pending";childBridgeRestartInProgress=!1;defaultIcon="assets/hb-icon.png";isMobile;setChildBridges=[];hb2Status="unknown";io;constructor(){}set childBridges(e){var h,M;this.hasChildBridges=e.length>0,this.hasUnpairedChildBridges=e.filter(S=>S.paired===!1).length>0,this.allChildBridgesStopped=e.filter(S=>S.manuallyStopped===!0).length===e.length,this.hasChildBridges&&(e.some(S=>S.status==="down")?this.childBridgeStatus="down":e.some(S=>S.status==="pending")?this.childBridgeStatus="pending":e.some(S=>S.status==="ok")&&(this.childBridgeStatus="ok")),this.setChildBridges=e;let o=this.$settings.env.homebridgeVersion.split(".")[0],i=((M=(h=this.plugin.engines)==null?void 0:h.homebridge)==null?void 0:M.split("||").map(S=>S.trim()))||[];this.hb2Status=o==="2"?"hide":i.some(S=>S.startsWith("^2")||S.startsWith(">=2"))?"supported":this.hb2Status}ngOnInit(){this.isMobile=this.$md.detect.mobile(),this.io=this.$ws.getExistingNamespace("child-bridges"),this.isMobile&&this.plugin.displayName.toLowerCase().startsWith("homebridge ")&&(this.plugin.displayName=this.plugin.displayName.replace(/^homebridge /i,"")),this.plugin.icon||(this.plugin.icon=this.defaultIcon)}openFundingModal(e){let o=this.$modal.open(Si,{size:"lg",backdrop:"static"});o.componentInstance.plugin=e}pluginInfoModal(e){let o=this.$modal.open(Bi,{size:"lg",backdrop:"static"});o.componentInstance.plugin=e}disablePlugin(e){let o=this.$modal.open(Pi,{size:"lg",backdrop:"static"});o.componentInstance.pluginName=e.displayName,o.componentInstance.isConfigured=e.isConfigured,o.componentInstance.isConfiguredDynamicPlatform=e.isConfiguredDynamicPlatform,o.result.then(()=>y(this,null,function*(){try{yield I(this.$api.put(`/config-editor/plugin/${encodeURIComponent(e.name)}/disable`,{})),e.disabled=!0,this.hasChildBridges&&this.doChildBridgeAction("stop"),this.$modal.open(z,{size:"lg",backdrop:"static"})}catch(i){console.error(i),this.$toastr.error(this.$translate.instant("plugins.disable.error"),this.$translate.instant("toast.title_error"))}}))}enablePlugin(e){let o=this.$modal.open(hi,{size:"lg",backdrop:"static"});o.componentInstance.title=e.name,o.componentInstance.message=this.$translate.instant("plugins.manage.confirm_enable",{pluginName:e.displayName}),o.componentInstance.confirmButtonLabel=this.$translate.instant("plugins.manage.enable"),o.componentInstance.faIconClass="fa-circle-play primary-text",o.result.then(()=>y(this,null,function*(){try{yield I(this.$api.put(`/config-editor/plugin/${encodeURIComponent(e.name)}/enable`,{})),e.disabled=!1,this.hasChildBridges&&(yield this.doChildBridgeAction("start")),this.$modal.open(z,{size:"lg",backdrop:"static"})}catch(i){console.error(i),this.$toastr.error(this.$translate.instant("plugins.enable.error"),this.$translate.instant("toast.title_error"))}}))}viewPluginLog(e){let o=this.$modal.open(wi,{size:"xl",backdrop:"static"});o.componentInstance.plugin=e}doChildBridgeAction(e){return y(this,null,function*(){this.childBridgeRestartInProgress=!0;try{for(let o of this.setChildBridges)yield I(this.io.request(`${e}-child-bridge`,o.username))}catch(o){console.error(o),this.$toastr.error(this.$translate.instant("plugins.bridge.action_error",{action:e}),this.$translate.instant("toast.title_error")),this.childBridgeRestartInProgress=!1}finally{setTimeout(()=>{this.childBridgeRestartInProgress=!1},e==="restart"?12e3:e==="stop"?6e3:1e3)}})}handleIconError(){this.plugin.icon=this.defaultIcon}openHb2InfoModal(){let e=this.$modal.open(bi,{size:"lg",backdrop:"static"});e.componentInstance.title="Plugin Readiness",this.hb2Status==="supported"?(e.componentInstance.subtitle=`${this.plugin.displayName} is ready for Homebridge v2.0`,e.componentInstance.message="The developer has specifically marked your installed version of the plugin as compatible with Homebridge v2.0.",e.componentInstance.faIconClass="fa-check-circle green-text"):(e.componentInstance.subtitle=`${this.plugin.displayName} might not be ready for Homebridge v2.0`,e.componentInstance.message="The developer has not specifically marked your installed version of the plugin as compatible with Homebridge v2.0, but it may still work.",e.componentInstance.faIconClass="fa-question-circle orange-text"),e.componentInstance.ctaButtonLabel=this.$translate.instant("form.button_more_info"),e.componentInstance.ctaButtonLink="https://github.com/homebridge/homebridge/wiki/Updating-To-Homebridge-v2.0"}static \u0275fac=function(o){return new(o||n)};static \u0275cmp=V({type:n,selectors:[["app-plugin-card"]],inputs:{plugin:"plugin",childBridges:"childBridges"},decls:36,vars:24,consts:[[1,"card","card-body","mb-3"],[1,"d-flex","flex-row","justify-content-between"],[1,"d-flex","flex-column","me-3","align-items-center","justify-content-between"],["alt","Plugin Icon",1,"plugin-icon-card","mb-3",3,"error","src"],["href","javascript:void(0)","container","body","openDelay","150","triggers","hover","aria-label","Homebridge v2.0 Readiness",3,"ngbTooltip","placement"],[1,"d-flex","flex-column","justify-content-between",2,"min-width","calc(100% - 80px)"],[1,"d-flex","flex-row","align-items-end"],[1,"d-flex","flex-column","w-100"],[1,"d-flex","flex-row"],[1,"card-title","mb-2","text-truncate"],[1,"ms-auto"],["href","javascript:void(0)","container","body","openDelay","150","triggers","hover",1,"card-link",3,"ngbTooltip"],[1,"fas","fa-fw","fa-spinner","fa-pulse","fa-lg","grey-text","ms-3",3,"hidden"],[1,"fas","fa-fw","fa-lg","ms-3",3,"ngClass"],[1,"card-text","mb-2","text-truncate"],["href","javascript:void(0)",1,"card-link",3,"click"],[1,"fas","fa-fw","fa-shield-alt","fa-lg","me-1",3,"ngClass"],[1,"grey-text"],[1,"card-text","mb-2"],["href","javascript:void(0)",1,"card-link"],[1,"card-text","mb-0","grey-text"],["href","javascript:void(0)",1,"card-link","red-text"],["href","javascript:void(0)"],["ngbDropdown","","placement","left",1,"d-inline-block","ms-3","mt-auto"],["href","javascript:void(0)","container","body","openDelay","150","triggers","hover","aria-label","Homebridge v2.0 Readiness",3,"click","ngbTooltip","placement"],["aria-label","The developer has specifically marked this plugin as compatible with Homebridge v2.0",1,"fas","fa-check-circle","green-text","fa-xl"],["aria-label","The developer has not specifically marked this plugin as compatible with Homebridge v2.0, but it may still work.",1,"fas","fa-question-circle","orange-text","fa-xl"],["href","javascript:void(0)","container","body","openDelay","150","triggers","hover",1,"card-link",3,"click","ngbTooltip"],[1,"far","fa-fw","fa-arrow-alt-circle-up","primary-text","fa-lg","fa-fade","ms-3",2,"--fa-animation-duration","2s"],[1,"fas","fa-fw","fa-arrow-right-arrow-left","primary-text","fa-lg","fa-fade","ms-3",2,"--fa-animation-duration","2s"],[1,"fas","fa-fw","fa-sliders","primary-text","fa-lg","fa-fade","ms-3",2,"--fa-animation-duration","2s"],[1,"icon-button","fas","fa-fw","fa-bridge","primary-text","fa-lg","fa-fade","ms-3",2,"--fa-animation-duration","2s"],[1,"icon-button","fas","fa-fw","fa-qrcode","primary-text","fa-lg","fa-fade","ms-3",2,"--fa-animation-duration","2s"],[1,"fas","fa-fw","fa-heart","fa-lg","me-1","pink-text"],[1,"fas","fa-fw","fa-heart","fa-lg","me-1",2,"opacity","0.5"],[1,"far","fa-fw","fa-circle-dot","fa-lg","me-1"],[1,"far","fa-fw","fa-circle-check","fa-lg","me-1"],[1,"fas","fa-fw","fa-lg","fa-power-off","ms-3"],["href","javascript:void(0)",1,"card-link","red-text",3,"click"],["container","body","openDelay","150","triggers","hover",1,"far","fa-fw","fa-pause-circle","fa-lg",3,"ngbTooltip"],["href","javascript:void(0)",3,"click"],[1,"far","fa-fw","fa-arrow-alt-circle-down","fa-lg"],["href","javascript:void(0)","ngbDropdownToggle","",1,"card-link","text-decoration-none","mt-auto",2,"outline","none"],[1,"fa-solid","fa-fw","fa-ellipsis-v","fa-lg"],["ngbDropdownMenu","","aria-labelledby","Plugin Actions Dropdown"],["ngbDropdownItem","",3,"click"],[1,"fas","fa-fw","fa-sliders"],["ngbDropdownItem",""],[1,"dropdown-divider"],["ngbDropdownItem","","rel","noopener noreferrer","target","_blank",3,"href"],[1,"fas","fa-fw","fa-wave-square"],[1,"fas","fa-fw","fa-code-compare"],[1,"fas","fa-fw","fa-code"],[1,"far","fa-fw","fa-circle-pause"],[1,"far","fa-fw","fa-circle-play"],[1,"fas","fa-fw","fa-trash"],[1,"fas","fa-fw","fa-bridge"],[1,"fa-fw","icon-button","fas","fa-fw","fa-power-off"],[1,"fas","fa-fw","fa-stop"],[1,"fas","fa-fw","fa-play"],[1,"fas","fa-fw","fa-broom"],[1,"icon-button","fas","fa-fw","fa-bridge"],[1,"icon-button","fa","fa-fw","fa-question-circle-o"]],template:function(o,i){o&1&&(a(0,"div",0)(1,"div",1)(2,"div",2)(3,"img",3),m("error",function(){return i.handleIconError()}),l(),x(4,qi,3,4,"a",4),l(),a(5,"div",5)(6,"div",6)(7,"div",7)(8,"div",8)(9,"h5",9),g(10),l(),a(11,"div",10),x(12,Oi,4,6,"a",11)(13,Li,4,6,"a",11)(14,Gi,4,6,"a",11)(15,Wi,4,6,"a",11)(16,Ji,4,6,"a",11),d(17,"i",12),x(18,Ki,1,4,"i",13),l()(),a(19,"p",14)(20,"a",15),m("click",function(){return i.pluginInfoModal(i.plugin)}),d(21,"i",16),a(22,"span",17),g(23),l()()(),a(24,"p",18),x(25,Qi,4,1,"a",19)(26,Xi,3,1,"span",17),l(),a(27,"div",8)(28,"p",20),x(29,Zi,5,2,"span")(30,ie,2,1),l(),a(31,"div",10),x(32,ee,3,3,"a",11)(33,ne,3,3,"a",21)(34,te,2,0,"a",22)(35,we,22,18,"span",23),l()()()()()()()),o&2&&(t(3),b("src",i.plugin.icon,T),t(),s(i.plugin.installedVersion&&i.hb2Status!=="hide"?4:-1),t(6),P(i.plugin.displayName),t(2),s(i.plugin.installedVersion&&i.plugin.updateAvailable&&!i.childBridgeRestartInProgress?12:-1),t(),s(i.plugin.installedVersion&&(i.plugin.newHbScope==null?null:i.plugin.newHbScope.switch)===i.plugin.installedVersion&&!i.childBridgeRestartInProgress?13:-1),t(),s(i.plugin.installedVersion&&(!i.plugin.newHbScope||i.plugin.newHbScope.switch!==i.plugin.installedVersion)&&!i.plugin.updateAvailable&&!i.plugin.isConfigured&&!i.childBridgeRestartInProgress&&!i.plugin.disabled?14:-1),t(),s(i.plugin.installedVersion&&(!i.plugin.newHbScope||i.plugin.newHbScope.switch!==i.plugin.installedVersion)&&!i.plugin.updateAvailable&&i.plugin.isConfigured&&!i.plugin.hasChildBridges&&!i.plugin.disabled&&i.plugin.recommendChildBridge&&!i.childBridgeRestartInProgress?15:-1),t(),s(i.plugin.installedVersion&&(!i.plugin.newHbScope||i.plugin.newHbScope.switch!==i.plugin.installedVersion)&&!i.plugin.updateAvailable&&i.plugin.isConfigured&&i.plugin.hasChildBridges&&!i.childBridgeRestartInProgress&&i.hasUnpairedChildBridges&&i.childBridgeStatus==="ok"&&!i.plugin.disabled?16:-1),t(),b("hidden",!i.childBridgeRestartInProgress),t(),s(i.plugin.installedVersion&&(!i.plugin.newHbScope||i.plugin.newHbScope.switch!==i.plugin.installedVersion)&&!i.plugin.updateAvailable&&i.plugin.isConfigured&&i.plugin.hasChildBridges&&!i.childBridgeRestartInProgress&&!i.hasUnpairedChildBridges&&i.childBridgeStatus!=="ok"&&!i.plugin.disabled?18:-1),t(3),b("ngClass",J(20,Fi,i.plugin.isHbScoped,!i.plugin.isHbScoped&&(i.plugin.verifiedPlugin||i.plugin.verifiedPlusPlugin),!i.plugin.isHbScoped&&!i.plugin.verifiedPlugin&&!i.plugin.verifiedPlusPlugin)),t(2),P(i.plugin.name),t(2),s((i.plugin.verifiedPlugin||i.plugin.verifiedPlusPlugin)&&i.plugin.funding?25:-1),t(),s((i.plugin.verifiedPlugin||i.plugin.verifiedPlusPlugin)&&i.plugin.funding?-1:26),t(3),s(i.plugin.publicPackage&&!i.plugin.installedVersion?29:-1),t(),s(i.plugin.installedVersion?30:-1),t(2),s(!i.plugin.disabled&&i.plugin.hasChildBridges&&i.childBridgeStatus==="ok"?32:-1),t(),s(i.plugin.installedVersion&&i.plugin.disabled?33:-1),t(),s(i.plugin.publicPackage&&!i.plugin.installedVersion?34:-1),t(),s(i.plugin.installedVersion?35:-1))},dependencies:[fi,E,ui,ci,pi,di,si,Q,$],encapsulation:2})}return n})();var Pe=(n,r)=>({"fa-magnifying-glass":n,"fa-exclamation-circle":r});function Se(n,r){n&1&&d(0,"app-spinner")}function ye(n,r){if(n&1){let e=C();a(0,"a",9),m("click",function(){f(e);let i=p();return _(i.onClearSearch())}),d(1,"i",10),l()}}function Be(n,r){if(n&1&&(a(0,"div",11),d(1,"app-plugin-card",13),l()),n&2){let e=r.$implicit,o=p(2);t(),b("plugin",e)("childBridges",o.getPluginChildBridges(e))}}function ke(n,r){if(n&1&&(a(0,"div",12),d(1,"i",14),a(2,"p"),g(3),c(4,"translate"),l()()),n&2){let e=p(2);t(),b("ngClass",k(4,Pe,!e.showExitButton,e.showExitButton)),t(2),P(u(4,2,e.showExitButton?"plugins.placeholder_search_none":"plugins.placeholder_search_first"))}}function Ie(n,r){if(n&1&&(a(0,"div",8),G(1,Be,2,2,"div",11,L),x(3,ke,5,7,"div",12),l()),n&2){let e=p();t(),W(e.installedPlugins),t(2),s(e.installedPlugins.length===0&&!e.loading&&!e.mainError?3:-1)}}var vn=(()=>{class n{$api=w(A);$plugin=w(U);$router=w(Ci);$settings=w(F);$toastr=w(j);$translate=w(N);$ws=w(R);mainError=!1;loading=!0;installedPlugins=[];childBridges=[];showExitButton=!1;form=new ei({query:new ni("",[Y.required])});io;navigationSubscription;constructor(){}ngOnInit(){return y(this,null,function*(){this.io=this.$ws.connectToNamespace("child-bridges"),this.io.connected.subscribe(()=>y(this,null,function*(){this.getChildBridgeMetadata(),this.io.socket.emit("monitor-child-bridge-status"),this.loadInstalledPlugins().then(()=>{let e=this.$router.parseUrl(this.$router.url).queryParams.installed;if(e){let o=this.installedPlugins.find(i=>i.name===e);o&&!o.isConfigured&&this.$plugin.settings(o),this.$router.navigate(["/plugins"])}})})),this.io.socket.on("child-bridge-status-update",e=>{let o=this.childBridges.find(i=>i.username===e.username);o?Object.assign(o,e):this.childBridges.push(e)}),this.navigationSubscription=this.$router.events.subscribe(e=>{e instanceof _i&&this.loadInstalledPlugins()})})}loadInstalledPlugins(){return y(this,null,function*(){this.form.setValue({query:""}),this.showExitButton=!1,this.installedPlugins=[],this.loading=!0,this.mainError=!1;try{let e=yield I(this.$api.get("/plugins"));this.installedPlugins=e.filter(i=>i.name!=="homebridge-config-ui-x"),yield this.appendMetaInfo();let o=this.installedPlugins.sort((i,h)=>i.updateAvailable!==h.updateAvailable?i.updateAvailable?-1:1:i.newHbScope&&!h.newHbScope?-1:i.disabled!==h.disabled?i.disabled?1:-1:i.isConfigured!==h.isConfigured?i.isConfigured?1:-1:i.hasChildBridgesUnpaired!==h.hasChildBridgesUnpaired?i.hasChildBridgesUnpaired?-1:1:i.hasChildBridges!==h.hasChildBridges&&this.$settings.env.recommendChildBridges?i.hasChildBridges?1:-1:i.name.localeCompare(h.name));return this.loading=!1,o}catch(e){console.error(e),this.loading=!1,this.mainError=!0,this.$toastr.error(this.$translate.instant("plugins.toast_failed_to_load_plugins"),this.$translate.instant("toast.title_error"))}})}appendMetaInfo(){return y(this,null,function*(){yield Promise.all(this.installedPlugins.filter(e=>e.installedVersion).map(e=>y(this,null,function*(){try{let o=yield I(this.$api.get(`/config-editor/plugin/${encodeURIComponent(e.name)}`));e.isConfigured=o.length>0,e.isConfiguredDynamicPlatform=e.isConfigured&&Object.prototype.hasOwnProperty.call(o[0],"platform"),e.recommendChildBridge=e.isConfiguredDynamicPlatform&&this.$settings.env.recommendChildBridges&&this.$settings.env.serviceMode&&!["homebridge","homebridge-config-ui-x"].includes(e.name),e.hasChildBridges=e.isConfigured&&o.some(h=>h._bridge&&h._bridge.username);let i=this.getPluginChildBridges(e);e.hasChildBridgesUnpaired=i.some(h=>!h.paired)}catch{e.isConfigured=!0,e.hasChildBridges=!0}})))})}search(){this.installedPlugins=[],this.loading=!0,this.showExitButton=!0,this.$api.get(`/plugins/search/${encodeURIComponent(this.form.value.query)}`).subscribe({next:e=>{let o=new Set;this.installedPlugins=e.reduce((i,h)=>{if(h.name==="homebridge-config-ui-x"||o.has(h.name))return i;if(h.newHbScope){let M=h.newHbScope.to,S=e.some(Ii=>Ii.name===M);(h.installedVersion||!S)&&(o.add(M),i.push(h))}else i.push(h);return i},[]),this.appendMetaInfo(),this.loading=!1},error:e=>{this.loading=!1,console.error(e),this.$toastr.error(e.error.message||e.message,this.$translate.instant("toast.title_error")),this.loadInstalledPlugins()}})}onClearSearch(){this.loadInstalledPlugins()}onSubmit({value:e}){e.query.length?this.search():this.loadInstalledPlugins()}getChildBridgeMetadata(){this.io.request("get-homebridge-child-bridge-status").subscribe(e=>{this.childBridges=e})}getPluginChildBridges(e){return this.childBridges.filter(o=>o.plugin===e.name)}ngOnDestroy(){this.navigationSubscription&&this.navigationSubscription.unsubscribe(),this.io.end()}static \u0275fac=function(o){return new(o||n)};static \u0275cmp=V({type:n,selectors:[["ng-component"]],decls:13,vars:10,consts:[[1,"row","mb-3"],[1,"col-12"],[1,"primary-text","m-0"],[1,"row"],[1,"col-md-12"],["novalidate","",3,"ngSubmit","formGroup"],["type","text","formControlName","query",1,"hb-npm-search",3,"placeholder"],["href","javascript:void(0)",1,"hb-npm-search-clear"],[1,"d-flex","flex-wrap","justify-content-between"],["href","javascript:void(0)",1,"hb-npm-search-clear",3,"click"],[1,"far","fa-fw","fa-times-circle"],[1,"hb-plugin-space-between"],[1,"alert","alert-info","mt-4","text-center","w-100"],[3,"plugin","childBridges"],[1,"fas","fa-fw","primary-text","my-3",2,"font-size","75px",3,"ngClass"]],template:function(o,i){o&1&&(x(0,Se,1,0,"app-spinner"),a(1,"div",0)(2,"div",1)(3,"h3",2),g(4),c(5,"translate"),l()()(),a(6,"div",3)(7,"div",4)(8,"form",5),m("ngSubmit",function(){return i.onSubmit(i.form)}),d(9,"input",6),c(10,"translate"),x(11,ye,2,0,"a",7),l()()(),x(12,Ie,4,1,"div",8)),o&2&&(s(i.loading?0:-1),t(4),P(u(5,6,"menu.label_plugins")),t(4),b("formGroup",i.form),t(),b("placeholder",u(10,8,"plugins.placeholder_search_plugin")),t(2),s(i.showExitButton?11:-1),t(),s(i.loading?-1:12))},dependencies:[vi,li,ti,X,Z,ii,ri,oi,ai,ki,$,E],styles:[".hb-npm-search[_ngcontent-%COMP%]{outline:none;box-sizing:inherit!important;background-color:inherit;height:50px!important;width:100%;border-width:.5px;padding:10px;margin-bottom:15px}@media (hover: hover){.hb-npm-search[_ngcontent-%COMP%]:hover{border:1px solid #000000}}.hb-npm-search[_ngcontent-%COMP%]:focus{border:1px solid #000000;box-shadow:0 1px #000}.hb-npm-search-clear[_ngcontent-%COMP%]{position:absolute;right:25px;font-size:35px;color:#d0d0d0;line-height:50px;cursor:pointer}.hb-plugin-space-between[_ngcontent-%COMP%]{box-sizing:border-box;width:calc(50% - 6.6666666667px)}@media only screen and (max-width: 991px){.hb-plugin-space-between[_ngcontent-%COMP%]{width:100%}}"]})}return n})();export{vn as a};
1
+ import{a as Pi,b as Si}from"./chunk-I7356EVZ.js";import{a as vi}from"./chunk-HIDFXEU7.js";import{n as wi,v as U}from"./chunk-2G5W635D.js";import{a as z}from"./chunk-BFEMJZWI.js";import{a as xi}from"./chunk-VOG67KUU.js";import{a as bi}from"./chunk-ILMG4QEX.js";import{a as hi}from"./chunk-IS2FWNNK.js";import{h as si,i as di,j as pi,k as ci,l as ui,m as gi,n as mi,o as fi}from"./chunk-E66CIXOF.js";import{c as X,d as Y,e as Z,f as ii,g as ei,j as ni,m as ti,p as oi,q as ai,y as li,z as ri}from"./chunk-A6ASL2RK.js";import{a as R}from"./chunk-KP734VBH.js";import{a as _i,d as Ci}from"./chunk-7HPEGK3R.js";import{b as F}from"./chunk-RWV2PLEE.js";import{h as j,k as A}from"./chunk-V7AAZRAR.js";import{a as N,b as $}from"./chunk-G67F4LRX.js";import{$c as E,Ac as c,Bc as u,Cc as D,Jb as B,Kb as b,Pb as s,Rb as L,Sb as G,Tb as W,Ub as a,Vb as l,Wb as d,_b as C,bc as m,cb as O,cc as p,cd as K,db as T,gb as t,gd as Q,h as y,ma as w,mc as g,nc as P,oc as v,sb as V,ua as f,va as _,w as I,wc as H,xc as k,yc as J,zb as x}from"./chunk-ELVGIIRZ.js";var Ti=(n,r)=>({"orange-text":n,"grey-text":r}),q=n=>({opacity:n}),Vi=(n,r)=>({"green-text":n,"grey-text":r}),Ei=(n,r)=>({"purple-text":n,"grey-text":r}),$i=(n,r)=>({scopedLink:n,verifiedLink:r});function Mi(n,r){n&1&&(a(0,"h6",18),g(1),c(2,"translate"),l(),a(3,"p",19),g(4),c(5,"translate"),l(),a(6,"p",19),g(7),c(8,"translate"),l()),n&2&&(t(),P(u(2,3,"plugins.manage.scoped_subtitle")),t(3),P(u(5,5,"plugins.manage.scoped_message")),t(3),P(u(8,7,"plugins.manage.verified_message")))}function Hi(n,r){n&1&&(a(0,"h6",18),g(1),c(2,"translate"),l(),a(3,"p",19),g(4),c(5,"translate"),l()),n&2&&(t(),P(u(2,2,"plugins.manage.verified_subtitle")),t(3),P(u(5,4,"plugins.manage.verified_message")))}function Di(n,r){n&1&&(a(0,"h6",18),g(1),c(2,"translate"),l(),a(3,"p",19),g(4),c(5,"translate"),l()),n&2&&(t(),P(u(2,2,"plugins.manage.unverified_subtitle")),t(3),P(u(5,4,"plugins.manage.unverified_message")))}function Ni(n,r){if(n&1){let e=C();a(0,"button",20),m("click",function(){f(e);let i=p();return _(i.$activeModal.dismiss("Dismiss"))}),g(1),c(2,"translate"),l()}n&2&&(t(),v(" ",u(2,1,"form.button_close")," "))}function ji(n,r){if(n&1){let e=C();a(0,"button",20),m("click",function(){f(e);let i=p();return _(i.$activeModal.dismiss("Dismiss"))}),g(1),c(2,"translate"),l()}n&2&&(t(),v(" ",u(2,1,"form.button_close")," "))}function Ai(n,r){if(n&1&&(a(0,"a",17),g(1),c(2,"translate"),d(3,"i",21),l()),n&2){let e=p();b("href",e.plugin.links.homepage||e.plugin.links.npm,T),t(),v(" ",u(2,2,"plugins.button_homepage")," ")}}var Bi=(()=>{class n{$activeModal=w(gi);plugin;defaultIcon="assets/hb-icon.png";linkScoped='<a href="https://github.com/homebridge/plugins/wiki/Scoped-Plugins" target="_blank"><i class="fas fa-fw fa-external-link-alt primary-text"></i></a>';linkVerified='<a href="https://github.com/homebridge/plugins/wiki/Verified-Plugins" target="_blank"><i class="fas fa-fw fa-external-link-alt primary-text"></i></a>';constructor(){}ngOnInit(){this.plugin.icon||(this.plugin.icon=this.defaultIcon)}handleIconError(){this.plugin.icon=this.defaultIcon}static \u0275fac=function(o){return new(o||n)};static \u0275cmp=V({type:n,selectors:[["ng-component"]],inputs:{plugin:"plugin"},decls:32,vars:45,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center"],["alt","Plugin Icon",1,"mb-3","plugin-icon-card",3,"error","src"],[1,"mb-1"],[1,"grey-text","mb-0","font-monospace"],[1,"grey-text","mb-1","font-monospace"],[1,"mb-3"],[1,"fas","fa-fw","fa-shield-alt","mb-3",2,"font-size","48px",3,"ngClass","ngStyle"],[1,"mb-0","grey-text",3,"innerHTML"],[1,"modal-footer","justify-content-between"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant"],[1,"text-center"],[1,"text-end"],["target","_blank","rel","noopener noreferrer",1,"btn","btn-primary","text-decoration-none",3,"href"],[1,"mb-2"],[1,"mb-1","grey-text"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"fas","fa-fw","fa-external-link-alt"]],template:function(o,i){o&1&&(a(0,"div",0)(1,"div",1)(2,"h5",2),g(3),c(4,"translate"),l(),a(5,"button",3),c(6,"translate"),m("click",function(){return i.$activeModal.dismiss("Dismiss")}),l()(),a(7,"div",4)(8,"img",5),m("error",function(){return i.handleIconError()}),l(),a(9,"h4",6),g(10),l(),a(11,"p",7),g(12),l(),a(13,"p",8),g(14),l(),a(15,"p",9),g(16),l(),d(17,"i",10)(18,"i",10)(19,"i",10),x(20,Mi,9,9)(21,Hi,6,6)(22,Di,6,6),d(23,"p",11),c(24,"translate"),l(),a(25,"div",12)(26,"div",13),x(27,Ni,3,3,"button",14),l(),a(28,"div",15),x(29,ji,3,3,"button",14),l(),a(30,"div",16),x(31,Ai,4,4,"a",17),l()()()),o&2&&(t(3),P(u(4,20,"plugins.manage.information")),t(2),B("aria-label",u(6,22,"form.button_close")),t(3),b("src",i.plugin.icon,T),t(2),P(i.plugin.displayName),t(2),P(i.plugin.name),t(2),v("@",i.plugin.author,""),t(2),P(i.plugin.description),t(),b("ngClass",k(27,Ti,!i.plugin.verifiedPlugin&&!i.plugin.verifiedPlusPlugin,i.plugin.verifiedPlugin||i.plugin.verifiedPlusPlugin))("ngStyle",H(30,q,!i.plugin.verifiedPlugin&&!i.plugin.verifiedPlusPlugin?1:.25)),t(),b("ngClass",k(32,Vi,!i.plugin.isHbScoped&&(i.plugin.verifiedPlugin||i.plugin.verifiedPlusPlugin),i.plugin.isHbScoped||!i.plugin.verifiedPlugin&&!i.plugin.verifiedPlusPlugin))("ngStyle",H(35,q,!i.plugin.isHbScoped&&(i.plugin.verifiedPlugin||i.plugin.verifiedPlusPlugin)?1:.25)),t(),b("ngClass",k(37,Ei,i.plugin.isHbScoped,!i.plugin.isHbScoped))("ngStyle",H(40,q,i.plugin.isHbScoped?1:.25)),t(),s(i.plugin.isHbScoped?20:-1),t(),s(!i.plugin.isHbScoped&&(i.plugin.verifiedPlugin||i.plugin.verifiedPlusPlugin)?21:-1),t(),s(!i.plugin.verifiedPlugin&&!i.plugin.verifiedPlusPlugin?22:-1),t(),b("innerHTML",D(24,24,"plugins.manage.more_info",k(42,$i,i.linkScoped,i.linkVerified)),O),t(4),s(i.plugin.links.homepage||i.plugin.links.npm?27:-1),t(2),s(!i.plugin.links.homepage&&!i.plugin.links.npm?29:-1),t(2),s(i.plugin.links.homepage||i.plugin.links.npm?31:-1))},dependencies:[$,E,K],styles:[".plugin-icon[_ngcontent-%COMP%]{height:75px;width:75px;border-radius:15px;border:1px solid #222222}"]})}return n})();var Fi=(n,r,e)=>({"purple-text":n,"green-text":r,"orange-text":e}),Ri=(n,r)=>({"fa-bridge-circle-exclamation orange-text":n,"fa-bridge-circle-xmark red-text":r});function Ui(n,r){n&1&&d(0,"i",25)}function zi(n,r){n&1&&d(0,"i",26)}function qi(n,r){if(n&1){let e=C();a(0,"a",24),m("click",function(){f(e);let i=p();return _(i.openHb2InfoModal())}),x(1,Ui,1,0,"i",25)(2,zi,1,0,"i",26),l()}if(n&2){let e=p();b("ngbTooltip","Homebridge v2.0 Readiness")("placement","right"),t(),s(e.hb2Status==="supported"?1:-1),t(),s(e.hb2Status==="unknown"?2:-1)}}function Oi(n,r){if(n&1){let e=C();a(0,"a",27),c(1,"translate"),c(2,"translate"),m("click",function(){f(e);let i=p();return _(i.$plugin.checkAndUpdatePlugin(i.plugin,i.plugin.updateTag||"latest"))}),d(3,"i",28),l()}n&2&&(b("ngbTooltip",u(1,2,"plugins.button_update")),B("aria-label",u(2,4,"plugins.button_update")))}function Li(n,r){if(n&1){let e=C();a(0,"a",27),c(1,"translate"),c(2,"translate"),m("click",function(){f(e);let i=p();return _(i.$plugin.switchToScoped(i.plugin))}),d(3,"i",29),l()}n&2&&(b("ngbTooltip",u(1,2,"plugins.manage.scoped.switch")),B("aria-label",u(2,4,"plugins.manage.scoped.switch")))}function Gi(n,r){if(n&1){let e=C();a(0,"a",27),c(1,"translate"),c(2,"translate"),m("click",function(){f(e);let i=p();return _(i.$plugin.settings(i.plugin))}),d(3,"i",30),l()}n&2&&(b("ngbTooltip",u(1,2,"plugins.button_set_up")),B("aria-label",u(2,4,"plugins.button_set_up")))}function Wi(n,r){if(n&1){let e=C();a(0,"a",27),c(1,"translate"),c(2,"translate"),m("click",function(){f(e);let i=p();return _(i.$plugin.bridgeSettings(i.plugin))}),d(3,"i",31),l()}n&2&&(b("ngbTooltip",u(1,2,"child_bridge.setup")),B("aria-label",u(2,4,"child_bridge.setup")))}function Ji(n,r){if(n&1){let e=C();a(0,"a",27),c(1,"translate"),c(2,"translate"),m("click",function(){f(e);let i=p();return _(i.$plugin.bridgeSettings(i.plugin))}),d(3,"i",32),l()}n&2&&(b("ngbTooltip",u(1,2,"child_bridge.bridge_connect")),B("aria-label",u(2,4,"child_bridge.bridge_connect")))}function Ki(n,r){if(n&1&&d(0,"i",13),n&2){let e=p();b("ngClass",k(1,Ri,e.childBridgeStatus==="pending",e.childBridgeStatus==="down"))}}function Qi(n,r){if(n&1){let e=C();a(0,"a",15),m("click",function(){f(e);let i=p();return _(i.openFundingModal(i.plugin))}),d(1,"i",33),a(2,"span",17),g(3),l()()}if(n&2){let e=p();t(3),v("@",e.plugin.author,"")}}function Xi(n,r){if(n&1&&(a(0,"span",17),d(1,"i",34),g(2),l()),n&2){let e=p();t(2),v("@",e.plugin.author," ")}}function Yi(n,r){if(n&1&&(a(0,"span"),g(1),c(2,"date"),l()),n&2){let e=p(2);t(),v("(",D(2,1,e.plugin.lastUpdated,"yyyy-MM-dd"),")")}}function Zi(n,r){if(n&1&&(a(0,"span"),d(1,"i",35),a(2,"span",17),g(3),x(4,Yi,3,4,"span"),l()()),n&2){let e=p();t(3),v("v",e.plugin.latestVersion," "),t(),s(e.plugin.lastUpdated?4:-1)}}function ie(n,r){if(n&1&&(d(0,"i",36),g(1)),n&2){let e=p();t(),v("v",e.plugin.installedVersion," ")}}function ee(n,r){if(n&1){let e=C();a(0,"a",27),c(1,"translate"),m("click",function(){f(e);let i=p();return _(i.doChildBridgeAction("restart"))}),d(2,"i",37),l()}if(n&2){let e=p();b("ngbTooltip",u(1,1,e.setChildBridges.length>1?"child_bridge.restart_plural":"child_bridge.restart"))}}function ne(n,r){if(n&1){let e=C();a(0,"a",38),m("click",function(){f(e);let i=p();return _(i.enablePlugin(i.plugin))}),d(1,"i",39),c(2,"translate"),l()}n&2&&(t(),b("ngbTooltip",u(2,1,"plugins.status_disabled")))}function te(n,r){if(n&1){let e=C();a(0,"a",40),m("click",function(){f(e);let i=p();return _(i.$plugin.installAlternateVersion(i.plugin))}),d(1,"i",41),l()}}function oe(n,r){if(n&1){let e=C();a(0,"button",45),m("click",function(){f(e);let i=p(2);return _(i.viewPluginLog(i.plugin))}),d(1,"i",50),g(2),c(3,"translate"),l()}n&2&&(t(2),v(" ",u(3,1,"plugins.manage.plugin_logs")," "))}function ae(n,r){if(n&1){let e=C();a(0,"button",45),m("click",function(){f(e);let i=p(2);return _(i.$plugin.installAlternateVersion(i.plugin))}),d(1,"i",51),g(2),c(3,"translate"),l()}n&2&&(t(2),v(" ",u(3,1,"plugins.manage.manage_version")," "))}function le(n,r){if(n&1){let e=C();a(0,"button",45),m("click",function(){f(e);let i=p(2);return _(i.$plugin.jsonEditor(i.plugin))}),d(1,"i",52),g(2),c(3,"translate"),l()}n&2&&(t(2),v(" ",u(3,1,"plugins.manage.json_config")," "))}function re(n,r){if(n&1){let e=C();a(0,"button",45),m("click",function(){f(e);let i=p(2);return _(i.disablePlugin(i.plugin))}),d(1,"i",53),g(2),c(3,"translate"),l()}n&2&&(t(2),v(" ",u(3,1,"plugins.manage.disable")," "))}function se(n,r){if(n&1){let e=C();a(0,"button",45),m("click",function(){f(e);let i=p(2);return _(i.enablePlugin(i.plugin))}),d(1,"i",54),g(2),c(3,"translate"),l()}n&2&&(t(2),v(" ",u(3,1,"plugins.manage.enable")," "))}function de(n,r){if(n&1){let e=C();a(0,"button",45),m("click",function(){f(e);let i=p(2);return _(i.$plugin.uninstallPlugin(i.plugin,i.setChildBridges))}),d(1,"i",55),g(2),c(3,"translate"),l()}n&2&&(t(2),v(" ",u(3,1,"plugins.button_uninstall")," "))}function pe(n,r){n&1&&d(0,"div",48)}function ce(n,r){if(n&1){let e=C();a(0,"button",45),m("click",function(){f(e);let i=p(3);return _(i.doChildBridgeAction("restart"))}),d(1,"i",57),g(2),c(3,"translate"),l()}if(n&2){let e=p(3);t(2),v(" ",u(3,1,e.setChildBridges.length>1?"child_bridge.restart_plural":"child_bridge.restart")," ")}}function ue(n,r){if(n&1){let e=C();a(0,"button",45),m("click",function(){f(e);let i=p(3);return _(i.doChildBridgeAction("stop"))}),d(1,"i",58),g(2),c(3,"translate"),l()}if(n&2){let e=p(3);t(2),v(" ",u(3,1,e.setChildBridges.length>1?"child_bridge.stop_plural":"child_bridge.stop")," ")}}function ge(n,r){if(n&1){let e=C();a(0,"button",45),m("click",function(){f(e);let i=p(3);return _(i.doChildBridgeAction("start"))}),d(1,"i",59),g(2),c(3,"translate"),l()}if(n&2){let e=p(3);t(2),v(" ",u(3,1,e.setChildBridges.length>1?"child_bridge.start_plural":"child_bridge.start")," ")}}function me(n,r){if(n&1){let e=C();a(0,"button",45),m("click",function(){f(e);let i=p(3);return _(i.$plugin.resetChildBridges(i.setChildBridges))}),d(1,"i",60),g(2),c(3,"translate"),l()}n&2&&(t(2),v(" ",u(3,1,"child_bridge.reset_accessories")," "))}function fe(n,r){if(n&1){let e=C();a(0,"button",45),m("click",function(){f(e);let i=p(2);return _(i.$plugin.bridgeSettings(i.plugin))}),d(1,"i",56),g(2),c(3,"translate"),l(),x(4,ce,4,3,"button",47)(5,ue,4,3,"button",47)(6,ge,4,3,"button",47)(7,me,4,3,"button",47)}if(n&2){let e=p(2);t(2),v(" ",u(3,5,"child_bridge.bridge_settings")," "),t(2),s(e.childBridgeRestartInProgress?-1:4),t(),s(e.allChildBridgesStopped?-1:5),t(),s(e.allChildBridgesStopped?6:-1),t(),s(e.$settings.env.serviceMode?7:-1)}}function _e(n,r){n&1&&d(0,"div",48)}function Ce(n,r){if(n&1){let e=C();a(0,"button",45),m("click",function(){f(e);let i=p(2);return _(i.$plugin.bridgeSettings(i.plugin))}),d(1,"i",61),g(2),c(3,"translate"),l()}n&2&&(t(2),v(" ",u(3,1,"child_bridge.setup")," "))}function he(n,r){n&1&&d(0,"div",48)}function be(n,r){if(n&1){let e=C();a(0,"button",45),m("click",function(){f(e);let i=p(2);return _(i.$plugin.bridgeSettings(i.plugin))}),d(1,"i",61),g(2),c(3,"translate"),l()}n&2&&(t(2),v(" ",u(3,1,"child_bridge.setup")," "))}function ve(n,r){n&1&&d(0,"div",48)}function xe(n,r){if(n&1&&(a(0,"a",49),d(1,"i",62),g(2),c(3,"translate"),l()),n&2){let e=p(2);b("href",e.plugin.links.bugs,T),t(2),v(" ",u(3,2,"support.links.issue")," ")}}function we(n,r){if(n&1){let e=C();a(0,"span",23)(1,"a",42),d(2,"i",43),l(),a(3,"div",44)(4,"button",45),m("click",function(){f(e);let i=p();return _(i.$plugin.settings(i.plugin))}),d(5,"i",46),g(6),c(7,"translate"),l(),x(8,oe,4,3,"button",47)(9,ae,4,3,"button",47)(10,le,4,3,"button",47)(11,re,4,3,"button",47)(12,se,4,3,"button",47)(13,de,4,3,"button",47)(14,pe,1,0,"div",48)(15,fe,8,7)(16,_e,1,0,"div",48)(17,Ce,4,3,"button",47)(18,he,1,0,"div",48)(19,be,4,3,"button",47)(20,ve,1,0,"div",48)(21,xe,4,4,"a",49),l()()}if(n&2){let e=p();t(),B("aria-label","Plugin Actions Dropdown"),t(5),v(" ",u(7,16,"plugins.button_settings")," "),t(2),s(e.plugin.isConfigured&&!e.plugin.disabled?8:-1),t(),s(e.plugin.publicPackage?9:-1),t(),s(!e.isMobile&&e.plugin.name!=="homebridge-config-ui-x"?10:-1),t(),s(e.plugin.name!=="homebridge-config-ui-x"&&!e.plugin.disabled?11:-1),t(),s(e.plugin.name!=="homebridge-config-ui-x"&&e.plugin.disabled?12:-1),t(),s(e.plugin.name!=="homebridge-config-ui-x"?13:-1),t(),s(!e.plugin.disabled&&e.plugin.isConfigured&&e.plugin.hasChildBridges&&e.plugin.installedVersion&&e.plugin.name!=="homebridge-config-ui-x"?14:-1),t(),s(e.plugin.hasChildBridges&&!e.plugin.disabled?15:-1),t(),s(e.plugin.isConfigured&&!e.plugin.hasChildBridges&&!e.plugin.disabled&&!e.plugin.recommendChildBridge?16:-1),t(),s(e.plugin.isConfigured&&!e.plugin.hasChildBridges&&!e.plugin.disabled&&!e.plugin.recommendChildBridge?17:-1),t(),s(e.plugin.isConfigured&&!e.plugin.hasChildBridges&&!e.plugin.disabled&&e.plugin.recommendChildBridge&&e.plugin.updateAvailable?18:-1),t(),s(e.plugin.isConfigured&&!e.plugin.hasChildBridges&&!e.plugin.disabled&&e.plugin.recommendChildBridge&&e.plugin.updateAvailable?19:-1),t(),s(e.plugin.links!=null&&e.plugin.links.bugs?20:-1),t(),s(e.plugin.links!=null&&e.plugin.links.bugs?21:-1)}}var ki=(()=>{class n{$api=w(A);$md=w(xi);$modal=w(mi);$plugin=w(U);$settings=w(F);$toastr=w(j);$translate=w(N);$ws=w(R);plugin;hasChildBridges=!1;hasUnpairedChildBridges=!1;allChildBridgesStopped=!1;childBridgeStatus="pending";childBridgeRestartInProgress=!1;defaultIcon="assets/hb-icon.png";isMobile;setChildBridges=[];hb2Status="unknown";io;constructor(){}set childBridges(e){var h,M;this.hasChildBridges=e.length>0,this.hasUnpairedChildBridges=e.filter(S=>S.paired===!1).length>0,this.allChildBridgesStopped=e.filter(S=>S.manuallyStopped===!0).length===e.length,this.hasChildBridges&&(e.some(S=>S.status==="down")?this.childBridgeStatus="down":e.some(S=>S.status==="pending")?this.childBridgeStatus="pending":e.some(S=>S.status==="ok")&&(this.childBridgeStatus="ok")),this.setChildBridges=e;let o=this.$settings.env.homebridgeVersion.split(".")[0],i=((M=(h=this.plugin.engines)==null?void 0:h.homebridge)==null?void 0:M.split("||").map(S=>S.trim()))||[];this.hb2Status=o==="2"?"hide":i.some(S=>S.startsWith("^2")||S.startsWith(">=2"))?"supported":this.hb2Status}ngOnInit(){this.isMobile=this.$md.detect.mobile(),this.io=this.$ws.getExistingNamespace("child-bridges"),this.isMobile&&this.plugin.displayName.toLowerCase().startsWith("homebridge ")&&(this.plugin.displayName=this.plugin.displayName.replace(/^homebridge /i,"")),this.plugin.icon||(this.plugin.icon=this.defaultIcon)}openFundingModal(e){let o=this.$modal.open(Si,{size:"lg",backdrop:"static"});o.componentInstance.plugin=e}pluginInfoModal(e){let o=this.$modal.open(Bi,{size:"lg",backdrop:"static"});o.componentInstance.plugin=e}disablePlugin(e){let o=this.$modal.open(Pi,{size:"lg",backdrop:"static"});o.componentInstance.pluginName=e.displayName,o.componentInstance.isConfigured=e.isConfigured,o.componentInstance.isConfiguredDynamicPlatform=e.isConfiguredDynamicPlatform,o.result.then(()=>y(this,null,function*(){try{yield I(this.$api.put(`/config-editor/plugin/${encodeURIComponent(e.name)}/disable`,{})),e.disabled=!0,this.hasChildBridges&&this.doChildBridgeAction("stop"),this.$modal.open(z,{size:"lg",backdrop:"static"})}catch(i){console.error(i),this.$toastr.error(this.$translate.instant("plugins.disable.error"),this.$translate.instant("toast.title_error"))}}))}enablePlugin(e){let o=this.$modal.open(hi,{size:"lg",backdrop:"static"});o.componentInstance.title=e.name,o.componentInstance.message=this.$translate.instant("plugins.manage.confirm_enable",{pluginName:e.displayName}),o.componentInstance.confirmButtonLabel=this.$translate.instant("plugins.manage.enable"),o.componentInstance.faIconClass="fa-circle-play primary-text",o.result.then(()=>y(this,null,function*(){try{yield I(this.$api.put(`/config-editor/plugin/${encodeURIComponent(e.name)}/enable`,{})),e.disabled=!1,this.hasChildBridges&&(yield this.doChildBridgeAction("start")),this.$modal.open(z,{size:"lg",backdrop:"static"})}catch(i){console.error(i),this.$toastr.error(this.$translate.instant("plugins.enable.error"),this.$translate.instant("toast.title_error"))}}))}viewPluginLog(e){let o=this.$modal.open(wi,{size:"xl",backdrop:"static"});o.componentInstance.plugin=e}doChildBridgeAction(e){return y(this,null,function*(){this.childBridgeRestartInProgress=!0;try{for(let o of this.setChildBridges)yield I(this.io.request(`${e}-child-bridge`,o.username))}catch(o){console.error(o),this.$toastr.error(this.$translate.instant("plugins.bridge.action_error",{action:e}),this.$translate.instant("toast.title_error")),this.childBridgeRestartInProgress=!1}finally{setTimeout(()=>{this.childBridgeRestartInProgress=!1},e==="restart"?12e3:e==="stop"?6e3:1e3)}})}handleIconError(){this.plugin.icon=this.defaultIcon}openHb2InfoModal(){let e=this.$modal.open(bi,{size:"lg",backdrop:"static"});e.componentInstance.title="Plugin Readiness",this.hb2Status==="supported"?(e.componentInstance.subtitle=`${this.plugin.displayName} is ready for Homebridge v2.0`,e.componentInstance.message="The developer has specifically marked your installed version of the plugin as compatible with Homebridge v2.0.",e.componentInstance.faIconClass="fa-check-circle green-text"):(e.componentInstance.subtitle=`${this.plugin.displayName} might not be ready for Homebridge v2.0`,e.componentInstance.message="The developer has not specifically marked your installed version of the plugin as compatible with Homebridge v2.0, but it may still work.",e.componentInstance.faIconClass="fa-question-circle orange-text"),e.componentInstance.ctaButtonLabel=this.$translate.instant("form.button_more_info"),e.componentInstance.ctaButtonLink="https://github.com/homebridge/homebridge/wiki/Updating-To-Homebridge-v2.0"}static \u0275fac=function(o){return new(o||n)};static \u0275cmp=V({type:n,selectors:[["app-plugin-card"]],inputs:{plugin:"plugin",childBridges:"childBridges"},decls:36,vars:24,consts:[[1,"card","card-body","mb-3"],[1,"d-flex","flex-row","justify-content-between"],[1,"d-flex","flex-column","me-3","align-items-center","justify-content-between"],["alt","Plugin Icon",1,"plugin-icon-card","mb-3",3,"error","src"],["href","javascript:void(0)","container","body","openDelay","150","triggers","hover","aria-label","Homebridge v2.0 Readiness",3,"ngbTooltip","placement"],[1,"d-flex","flex-column","justify-content-between",2,"min-width","calc(100% - 80px)"],[1,"d-flex","flex-row","align-items-end"],[1,"d-flex","flex-column","w-100"],[1,"d-flex","flex-row"],[1,"card-title","mb-2","text-truncate"],[1,"ms-auto"],["href","javascript:void(0)","container","body","openDelay","150","triggers","hover",1,"card-link",3,"ngbTooltip"],[1,"fas","fa-fw","fa-spinner","fa-pulse","fa-lg","grey-text","ms-3",3,"hidden"],[1,"fas","fa-fw","fa-lg","ms-3",3,"ngClass"],[1,"card-text","mb-2","text-truncate"],["href","javascript:void(0)",1,"card-link",3,"click"],[1,"fas","fa-fw","fa-shield-alt","fa-lg","me-1",3,"ngClass"],[1,"grey-text"],[1,"card-text","mb-2"],["href","javascript:void(0)",1,"card-link"],[1,"card-text","mb-0","grey-text"],["href","javascript:void(0)",1,"card-link","red-text"],["href","javascript:void(0)"],["ngbDropdown","","placement","left",1,"d-inline-block","ms-3","mt-auto"],["href","javascript:void(0)","container","body","openDelay","150","triggers","hover","aria-label","Homebridge v2.0 Readiness",3,"click","ngbTooltip","placement"],["aria-label","The developer has specifically marked this plugin as compatible with Homebridge v2.0",1,"fas","fa-check-circle","green-text","fa-xl"],["aria-label","The developer has not specifically marked this plugin as compatible with Homebridge v2.0, but it may still work.",1,"fas","fa-question-circle","orange-text","fa-xl"],["href","javascript:void(0)","container","body","openDelay","150","triggers","hover",1,"card-link",3,"click","ngbTooltip"],[1,"far","fa-fw","fa-arrow-alt-circle-up","primary-text","fa-lg","fa-fade","ms-3",2,"--fa-animation-duration","2s"],[1,"fas","fa-fw","fa-arrow-right-arrow-left","primary-text","fa-lg","fa-fade","ms-3",2,"--fa-animation-duration","2s"],[1,"fas","fa-fw","fa-sliders","primary-text","fa-lg","fa-fade","ms-3",2,"--fa-animation-duration","2s"],[1,"icon-button","fas","fa-fw","fa-bridge","primary-text","fa-lg","fa-fade","ms-3",2,"--fa-animation-duration","2s"],[1,"icon-button","fas","fa-fw","fa-qrcode","primary-text","fa-lg","fa-fade","ms-3",2,"--fa-animation-duration","2s"],[1,"fas","fa-fw","fa-heart","fa-lg","me-1","pink-text"],[1,"fas","fa-fw","fa-heart","fa-lg","me-1",2,"opacity","0.5"],[1,"far","fa-fw","fa-circle-dot","fa-lg","me-1"],[1,"far","fa-fw","fa-circle-check","fa-lg","me-1"],[1,"fas","fa-fw","fa-lg","fa-power-off","ms-3"],["href","javascript:void(0)",1,"card-link","red-text",3,"click"],["container","body","openDelay","150","triggers","hover",1,"far","fa-fw","fa-pause-circle","fa-lg",3,"ngbTooltip"],["href","javascript:void(0)",3,"click"],[1,"far","fa-fw","fa-arrow-alt-circle-down","fa-lg"],["href","javascript:void(0)","ngbDropdownToggle","",1,"card-link","text-decoration-none","mt-auto",2,"outline","none"],[1,"fa-solid","fa-fw","fa-ellipsis-v","fa-lg"],["ngbDropdownMenu","","aria-labelledby","Plugin Actions Dropdown"],["ngbDropdownItem","",3,"click"],[1,"fas","fa-fw","fa-sliders"],["ngbDropdownItem",""],[1,"dropdown-divider"],["ngbDropdownItem","","rel","noopener noreferrer","target","_blank",3,"href"],[1,"fas","fa-fw","fa-wave-square"],[1,"fas","fa-fw","fa-code-compare"],[1,"fas","fa-fw","fa-code"],[1,"far","fa-fw","fa-circle-pause"],[1,"far","fa-fw","fa-circle-play"],[1,"fas","fa-fw","fa-trash"],[1,"fas","fa-fw","fa-bridge"],[1,"fa-fw","icon-button","fas","fa-fw","fa-power-off"],[1,"fas","fa-fw","fa-stop"],[1,"fas","fa-fw","fa-play"],[1,"fas","fa-fw","fa-broom"],[1,"icon-button","fas","fa-fw","fa-bridge"],[1,"icon-button","fa","fa-fw","fa-question-circle-o"]],template:function(o,i){o&1&&(a(0,"div",0)(1,"div",1)(2,"div",2)(3,"img",3),m("error",function(){return i.handleIconError()}),l(),x(4,qi,3,4,"a",4),l(),a(5,"div",5)(6,"div",6)(7,"div",7)(8,"div",8)(9,"h5",9),g(10),l(),a(11,"div",10),x(12,Oi,4,6,"a",11)(13,Li,4,6,"a",11)(14,Gi,4,6,"a",11)(15,Wi,4,6,"a",11)(16,Ji,4,6,"a",11),d(17,"i",12),x(18,Ki,1,4,"i",13),l()(),a(19,"p",14)(20,"a",15),m("click",function(){return i.pluginInfoModal(i.plugin)}),d(21,"i",16),a(22,"span",17),g(23),l()()(),a(24,"p",18),x(25,Qi,4,1,"a",19)(26,Xi,3,1,"span",17),l(),a(27,"div",8)(28,"p",20),x(29,Zi,5,2,"span")(30,ie,2,1),l(),a(31,"div",10),x(32,ee,3,3,"a",11)(33,ne,3,3,"a",21)(34,te,2,0,"a",22)(35,we,22,18,"span",23),l()()()()()()()),o&2&&(t(3),b("src",i.plugin.icon,T),t(),s(i.plugin.installedVersion&&i.hb2Status!=="hide"?4:-1),t(6),P(i.plugin.displayName),t(2),s(i.plugin.installedVersion&&i.plugin.updateAvailable&&!i.childBridgeRestartInProgress?12:-1),t(),s(i.plugin.installedVersion&&(i.plugin.newHbScope==null?null:i.plugin.newHbScope.switch)===i.plugin.installedVersion&&!i.childBridgeRestartInProgress?13:-1),t(),s(i.plugin.installedVersion&&(!i.plugin.newHbScope||i.plugin.newHbScope.switch!==i.plugin.installedVersion)&&!i.plugin.updateAvailable&&!i.plugin.isConfigured&&!i.childBridgeRestartInProgress&&!i.plugin.disabled?14:-1),t(),s(i.plugin.installedVersion&&(!i.plugin.newHbScope||i.plugin.newHbScope.switch!==i.plugin.installedVersion)&&!i.plugin.updateAvailable&&i.plugin.isConfigured&&!i.plugin.hasChildBridges&&!i.plugin.disabled&&i.plugin.recommendChildBridge&&!i.childBridgeRestartInProgress?15:-1),t(),s(i.plugin.installedVersion&&(!i.plugin.newHbScope||i.plugin.newHbScope.switch!==i.plugin.installedVersion)&&!i.plugin.updateAvailable&&i.plugin.isConfigured&&i.plugin.hasChildBridges&&!i.childBridgeRestartInProgress&&i.hasUnpairedChildBridges&&i.childBridgeStatus==="ok"&&!i.plugin.disabled?16:-1),t(),b("hidden",!i.childBridgeRestartInProgress),t(),s(i.plugin.installedVersion&&(!i.plugin.newHbScope||i.plugin.newHbScope.switch!==i.plugin.installedVersion)&&!i.plugin.updateAvailable&&i.plugin.isConfigured&&i.plugin.hasChildBridges&&!i.childBridgeRestartInProgress&&!i.hasUnpairedChildBridges&&i.childBridgeStatus!=="ok"&&!i.plugin.disabled?18:-1),t(3),b("ngClass",J(20,Fi,i.plugin.isHbScoped,!i.plugin.isHbScoped&&(i.plugin.verifiedPlugin||i.plugin.verifiedPlusPlugin),!i.plugin.isHbScoped&&!i.plugin.verifiedPlugin&&!i.plugin.verifiedPlusPlugin)),t(2),P(i.plugin.name),t(2),s((i.plugin.verifiedPlugin||i.plugin.verifiedPlusPlugin)&&i.plugin.funding?25:-1),t(),s((i.plugin.verifiedPlugin||i.plugin.verifiedPlusPlugin)&&i.plugin.funding?-1:26),t(3),s(i.plugin.publicPackage&&!i.plugin.installedVersion?29:-1),t(),s(i.plugin.installedVersion?30:-1),t(2),s(!i.plugin.disabled&&i.plugin.hasChildBridges&&i.childBridgeStatus==="ok"?32:-1),t(),s(i.plugin.installedVersion&&i.plugin.disabled?33:-1),t(),s(i.plugin.publicPackage&&!i.plugin.installedVersion?34:-1),t(),s(i.plugin.installedVersion?35:-1))},dependencies:[fi,E,ui,ci,pi,di,si,Q,$],encapsulation:2})}return n})();var Pe=(n,r)=>({"fa-magnifying-glass":n,"fa-exclamation-circle":r});function Se(n,r){n&1&&d(0,"app-spinner")}function ye(n,r){if(n&1){let e=C();a(0,"a",9),m("click",function(){f(e);let i=p();return _(i.onClearSearch())}),d(1,"i",10),l()}}function Be(n,r){if(n&1&&(a(0,"div",11),d(1,"app-plugin-card",13),l()),n&2){let e=r.$implicit,o=p(2);t(),b("plugin",e)("childBridges",o.getPluginChildBridges(e))}}function ke(n,r){if(n&1&&(a(0,"div",12),d(1,"i",14),a(2,"p"),g(3),c(4,"translate"),l()()),n&2){let e=p(2);t(),b("ngClass",k(4,Pe,!e.showExitButton,e.showExitButton)),t(2),P(u(4,2,e.showExitButton?"plugins.placeholder_search_none":"plugins.placeholder_search_first"))}}function Ie(n,r){if(n&1&&(a(0,"div",8),G(1,Be,2,2,"div",11,L),x(3,ke,5,7,"div",12),l()),n&2){let e=p();t(),W(e.installedPlugins),t(2),s(e.installedPlugins.length===0&&!e.loading&&!e.mainError?3:-1)}}var vn=(()=>{class n{$api=w(A);$plugin=w(U);$router=w(Ci);$settings=w(F);$toastr=w(j);$translate=w(N);$ws=w(R);mainError=!1;loading=!0;installedPlugins=[];childBridges=[];showExitButton=!1;form=new ei({query:new ni("",[Y.required])});io;navigationSubscription;constructor(){}ngOnInit(){return y(this,null,function*(){this.io=this.$ws.connectToNamespace("child-bridges"),this.io.connected.subscribe(()=>y(this,null,function*(){this.getChildBridgeMetadata(),this.io.socket.emit("monitor-child-bridge-status"),this.loadInstalledPlugins().then(()=>{let e=this.$router.parseUrl(this.$router.url).queryParams.installed;if(e){let o=this.installedPlugins.find(i=>i.name===e);o&&!o.isConfigured&&this.$plugin.settings(o),this.$router.navigate(["/plugins"])}})})),this.io.socket.on("child-bridge-status-update",e=>{let o=this.childBridges.find(i=>i.username===e.username);o?Object.assign(o,e):this.childBridges.push(e)}),this.navigationSubscription=this.$router.events.subscribe(e=>{e instanceof _i&&this.loadInstalledPlugins()})})}loadInstalledPlugins(){return y(this,null,function*(){this.form.setValue({query:""}),this.showExitButton=!1,this.installedPlugins=[],this.loading=!0,this.mainError=!1;try{let e=yield I(this.$api.get("/plugins"));this.installedPlugins=e.filter(i=>i.name!=="homebridge-config-ui-x"),yield this.appendMetaInfo();let o=this.installedPlugins.sort((i,h)=>i.updateAvailable!==h.updateAvailable?i.updateAvailable?-1:1:i.newHbScope&&!h.newHbScope?-1:i.disabled!==h.disabled?i.disabled?1:-1:i.isConfigured!==h.isConfigured?i.isConfigured?1:-1:i.hasChildBridgesUnpaired!==h.hasChildBridgesUnpaired?i.hasChildBridgesUnpaired?-1:1:i.hasChildBridges!==h.hasChildBridges&&this.$settings.env.recommendChildBridges?i.hasChildBridges?1:-1:i.name.localeCompare(h.name));return this.loading=!1,o}catch(e){console.error(e),this.loading=!1,this.mainError=!0,this.$toastr.error(this.$translate.instant("plugins.toast_failed_to_load_plugins"),this.$translate.instant("toast.title_error"))}})}appendMetaInfo(){return y(this,null,function*(){yield Promise.all(this.installedPlugins.filter(e=>e.installedVersion).map(e=>y(this,null,function*(){try{let o=yield I(this.$api.get(`/config-editor/plugin/${encodeURIComponent(e.name)}`));e.isConfigured=o.length>0,e.isConfiguredDynamicPlatform=e.isConfigured&&Object.prototype.hasOwnProperty.call(o[0],"platform"),e.recommendChildBridge=e.isConfiguredDynamicPlatform&&this.$settings.env.recommendChildBridges&&this.$settings.env.serviceMode&&!["homebridge","homebridge-config-ui-x"].includes(e.name),e.hasChildBridges=e.isConfigured&&o.some(h=>h._bridge&&h._bridge.username);let i=this.getPluginChildBridges(e);e.hasChildBridgesUnpaired=i.some(h=>!h.paired)}catch{e.isConfigured=!0,e.hasChildBridges=!0}})))})}search(){this.installedPlugins=[],this.loading=!0,this.showExitButton=!0,this.$api.get(`/plugins/search/${encodeURIComponent(this.form.value.query)}`).subscribe({next:e=>{let o=new Set;this.installedPlugins=e.reduce((i,h)=>{if(h.name==="homebridge-config-ui-x"||o.has(h.name))return i;if(h.newHbScope){let M=h.newHbScope.to,S=e.some(Ii=>Ii.name===M);(h.installedVersion||!S)&&(o.add(M),i.push(h))}else i.push(h);return i},[]),this.appendMetaInfo(),this.loading=!1},error:e=>{this.loading=!1,console.error(e),this.$toastr.error(e.error.message||e.message,this.$translate.instant("toast.title_error")),this.loadInstalledPlugins()}})}onClearSearch(){this.loadInstalledPlugins()}onSubmit({value:e}){e.query.length?this.search():this.loadInstalledPlugins()}getChildBridgeMetadata(){this.io.request("get-homebridge-child-bridge-status").subscribe(e=>{this.childBridges=e})}getPluginChildBridges(e){return this.childBridges.filter(o=>o.plugin===e.name)}ngOnDestroy(){this.navigationSubscription&&this.navigationSubscription.unsubscribe(),this.io.end()}static \u0275fac=function(o){return new(o||n)};static \u0275cmp=V({type:n,selectors:[["ng-component"]],decls:13,vars:10,consts:[[1,"row","mb-3"],[1,"col-12"],[1,"primary-text","m-0"],[1,"row"],[1,"col-md-12"],["novalidate","",3,"ngSubmit","formGroup"],["type","text","formControlName","query",1,"hb-npm-search",3,"placeholder"],["href","javascript:void(0)",1,"hb-npm-search-clear"],[1,"d-flex","flex-wrap","justify-content-between"],["href","javascript:void(0)",1,"hb-npm-search-clear",3,"click"],[1,"far","fa-fw","fa-times-circle"],[1,"hb-plugin-space-between"],[1,"alert","alert-info","mt-4","text-center","w-100"],[3,"plugin","childBridges"],[1,"fas","fa-fw","primary-text","my-3",2,"font-size","75px",3,"ngClass"]],template:function(o,i){o&1&&(x(0,Se,1,0,"app-spinner"),a(1,"div",0)(2,"div",1)(3,"h3",2),g(4),c(5,"translate"),l()()(),a(6,"div",3)(7,"div",4)(8,"form",5),m("ngSubmit",function(){return i.onSubmit(i.form)}),d(9,"input",6),c(10,"translate"),x(11,ye,2,0,"a",7),l()()(),x(12,Ie,4,1,"div",8)),o&2&&(s(i.loading?0:-1),t(4),P(u(5,6,"menu.label_plugins")),t(4),b("formGroup",i.form),t(),b("placeholder",u(10,8,"plugins.placeholder_search_plugin")),t(2),s(i.showExitButton?11:-1),t(),s(i.loading?-1:12))},dependencies:[vi,li,ti,X,Z,ii,ri,oi,ai,ki,$,E],styles:[".hb-npm-search[_ngcontent-%COMP%]{outline:none;box-sizing:inherit!important;background-color:inherit;height:50px!important;width:100%;border-width:.5px;padding:10px;margin-bottom:15px}@media (hover: hover){.hb-npm-search[_ngcontent-%COMP%]:hover{border:1px solid #000000}}.hb-npm-search[_ngcontent-%COMP%]:focus{border:1px solid #000000;box-shadow:0 1px #000}.hb-npm-search-clear[_ngcontent-%COMP%]{position:absolute;right:25px;font-size:35px;color:#d0d0d0;line-height:50px;cursor:pointer}.hb-plugin-space-between[_ngcontent-%COMP%]{box-sizing:border-box;width:calc(50% - 6.6666666667px)}@media only screen and (max-width: 991px){.hb-plugin-space-between[_ngcontent-%COMP%]{width:100%}}"]})}return n})();export{vn as a};
@@ -1,4 +1,4 @@
1
- import{a as St,b as qC}from"./chunk-T4PURZCK.js";import{a as zs}from"./chunk-C2UJXFYZ.js";import{a as ii,b as ni}from"./chunk-BN42B6ZN.js";import{a as Ks}from"./chunk-VOG67KUU.js";import{a as Zs}from"./chunk-FAPE5Q5F.js";import{a as Js}from"./chunk-KBQ7X43U.js";import{a as tn}from"./chunk-TAQCEDBC.js";import{a as Hs,b as Ws}from"./chunk-6LUEJV3C.js";import{a as ao}from"./chunk-VGMRIFZA.js";import{a as Gs}from"./chunk-GLU4GX3I.js";import{a as mf,b as Ff,c as Cf,d as gf,e as hf,f as Ef,g as ei,m as Ce,n as Ue,o as ti}from"./chunk-7P7JUG4X.js";import{a as Ms,b as Zu,c as Qu,e as rt,f as js,h as Ns,i as qs,k as Vs,l as ru,m as Rs,o as Xu,r as Yu,s as Su,t as $u,x as Ls,y as It,z as oo}from"./chunk-A6ASL2RK.js";import{a as ui}from"./chunk-AHGEAOPV.js";import{d as qt}from"./chunk-7HPEGK3R.js";import{a as Us}from"./chunk-XAUZKAOZ.js";import{b as ke}from"./chunk-5RNQ5G6T.js";import{h as ce,j as ou,k as De}from"./chunk-AQX2C7OY.js";import{e as Os}from"./chunk-T3Y7RYJZ.js";import{a as de,b as ge}from"./chunk-G67F4LRX.js";import{$c as Ct,Ac as _,Bc as B,Ca as xt,Cc as qe,D as _s,Da as Bs,Fa as uf,Gc as Ts,Ha as nf,Jb as W,Kb as g,Lb as wt,M as Yn,Mb as Ku,Nb as J,Ob as As,Pb as x,Rb as He,Sb as We,Tb as Ge,Ub as d,Vb as c,Wb as w,Xb as Is,Yb as Ss,Z as ro,_b as z,a as Z,aa as Yi,ad as Iu,b as Ee,bc as P,bd as it,cb as re,cc as C,e as F,ed as Ps,fa as ys,fb as xs,g as Oe,ga as Bt,gb as s,gc as Df,h as H,ha as ef,hb as pe,hc as sf,ic as lf,id as pf,jc as df,k as gs,kc as cf,la as tf,lb as ff,ma as $,mc as h,n as ct,nc as R,ob as rf,oc as q,pb as of,pc as Wt,q as hs,qc as $s,rc as Be,sb as K,sc as xe,ta as en,tb as af,tc as we,ua as j,ub as Gu,uc as ks,v as Es,va as N,vb as ws,vc as Ne,w as ie,wc as At,x as bs,xa as vs,xc as fu,yc as Gt,zb as S,zc as Ju}from"./chunk-ELVGIIRZ.js";var Xs=F((CV,Qs)=>{function RC(){this.__data__=[],this.size=0}Qs.exports=RC});var bf=F((gV,Ys)=>{function LC(e,u){return e===u||e!==e&&u!==u}Ys.exports=LC});var un=F((hV,e0)=>{var zC=bf();function UC(e,u){for(var t=e.length;t--;)if(zC(e[t][0],u))return t;return-1}e0.exports=UC});var u0=F((EV,t0)=>{var HC=un(),WC=Array.prototype,GC=WC.splice;function KC(e){var u=this.__data__,t=HC(u,e);if(t<0)return!1;var i=u.length-1;return t==i?u.pop():GC.call(u,t,1),--this.size,!0}t0.exports=KC});var n0=F((bV,i0)=>{var JC=un();function ZC(e){var u=this.__data__,t=JC(u,e);return t<0?void 0:u[t][1]}i0.exports=ZC});var r0=F((_V,f0)=>{var QC=un();function XC(e){return QC(this.__data__,e)>-1}f0.exports=XC});var a0=F((yV,o0)=>{var YC=un();function e4(e,u){var t=this.__data__,i=YC(t,e);return i<0?(++this.size,t.push([e,u])):t[i][1]=u,this}o0.exports=e4});var nn=F((vV,D0)=>{var t4=Xs(),u4=u0(),i4=n0(),n4=r0(),f4=a0();function ri(e){var u=-1,t=e==null?0:e.length;for(this.clear();++u<t;){var i=e[u];this.set(i[0],i[1])}}ri.prototype.clear=t4;ri.prototype.delete=u4;ri.prototype.get=i4;ri.prototype.has=n4;ri.prototype.set=f4;D0.exports=ri});var l0=F((BV,s0)=>{var r4=nn();function o4(){this.__data__=new r4,this.size=0}s0.exports=o4});var c0=F((xV,d0)=>{function a4(e){var u=this.__data__,t=u.delete(e);return this.size=u.size,t}d0.exports=a4});var m0=F((wV,p0)=>{function D4(e){return this.__data__.get(e)}p0.exports=D4});var C0=F((AV,F0)=>{function s4(e){return this.__data__.has(e)}F0.exports=s4});var Do=F((IV,g0)=>{var l4=typeof global=="object"&&global&&global.Object===Object&&global;g0.exports=l4});var $t=F((SV,h0)=>{var d4=Do(),c4=typeof self=="object"&&self&&self.Object===Object&&self,p4=d4||c4||Function("return this")();h0.exports=p4});var oi=F(($V,E0)=>{var m4=$t(),F4=m4.Symbol;E0.exports=F4});var v0=F((kV,y0)=>{var b0=oi(),_0=Object.prototype,C4=_0.hasOwnProperty,g4=_0.toString,fn=b0?b0.toStringTag:void 0;function h4(e){var u=C4.call(e,fn),t=e[fn];try{e[fn]=void 0;var i=!0}catch{}var n=g4.call(e);return i&&(u?e[fn]=t:delete e[fn]),n}y0.exports=h4});var x0=F((TV,B0)=>{var E4=Object.prototype,b4=E4.toString;function _4(e){return b4.call(e)}B0.exports=_4});var ku=F((PV,I0)=>{var w0=oi(),y4=v0(),v4=x0(),B4="[object Null]",x4="[object Undefined]",A0=w0?w0.toStringTag:void 0;function w4(e){return e==null?e===void 0?x4:B4:A0&&A0 in Object(e)?y4(e):v4(e)}I0.exports=w4});var Tu=F((OV,S0)=>{function A4(e){var u=typeof e;return e!=null&&(u=="object"||u=="function")}S0.exports=A4});var so=F((MV,$0)=>{var I4=ku(),S4=Tu(),$4="[object AsyncFunction]",k4="[object Function]",T4="[object GeneratorFunction]",P4="[object Proxy]";function O4(e){if(!S4(e))return!1;var u=I4(e);return u==k4||u==T4||u==$4||u==P4}$0.exports=O4});var T0=F((jV,k0)=>{var M4=$t(),j4=M4["__core-js_shared__"];k0.exports=j4});var M0=F((NV,O0)=>{var lo=T0(),P0=function(){var e=/[^.]+$/.exec(lo&&lo.keys&&lo.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function N4(e){return!!P0&&P0 in e}O0.exports=N4});var co=F((qV,j0)=>{var q4=Function.prototype,V4=q4.toString;function R4(e){if(e!=null){try{return V4.call(e)}catch{}try{return e+""}catch{}}return""}j0.exports=R4});var q0=F((VV,N0)=>{var L4=so(),z4=M0(),U4=Tu(),H4=co(),W4=/[\\^$.*+?()[\]{}|]/g,G4=/^\[object .+?Constructor\]$/,K4=Function.prototype,J4=Object.prototype,Z4=K4.toString,Q4=J4.hasOwnProperty,X4=RegExp("^"+Z4.call(Q4).replace(W4,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Y4(e){if(!U4(e)||z4(e))return!1;var u=L4(e)?X4:G4;return u.test(H4(e))}N0.exports=Y4});var R0=F((RV,V0)=>{function e5(e,u){return e==null?void 0:e[u]}V0.exports=e5});var au=F((LV,L0)=>{var t5=q0(),u5=R0();function i5(e,u){var t=u5(e,u);return t5(t)?t:void 0}L0.exports=i5});var _f=F((zV,z0)=>{var n5=au(),f5=$t(),r5=n5(f5,"Map");z0.exports=r5});var rn=F((UV,U0)=>{var o5=au(),a5=o5(Object,"create");U0.exports=a5});var G0=F((HV,W0)=>{var H0=rn();function D5(){this.__data__=H0?H0(null):{},this.size=0}W0.exports=D5});var J0=F((WV,K0)=>{function s5(e){var u=this.has(e)&&delete this.__data__[e];return this.size-=u?1:0,u}K0.exports=s5});var Q0=F((GV,Z0)=>{var l5=rn(),d5="__lodash_hash_undefined__",c5=Object.prototype,p5=c5.hasOwnProperty;function m5(e){var u=this.__data__;if(l5){var t=u[e];return t===d5?void 0:t}return p5.call(u,e)?u[e]:void 0}Z0.exports=m5});var Y0=F((KV,X0)=>{var F5=rn(),C5=Object.prototype,g5=C5.hasOwnProperty;function h5(e){var u=this.__data__;return F5?u[e]!==void 0:g5.call(u,e)}X0.exports=h5});var t1=F((JV,e1)=>{var E5=rn(),b5="__lodash_hash_undefined__";function _5(e,u){var t=this.__data__;return this.size+=this.has(e)?0:1,t[e]=E5&&u===void 0?b5:u,this}e1.exports=_5});var i1=F((ZV,u1)=>{var y5=G0(),v5=J0(),B5=Q0(),x5=Y0(),w5=t1();function ai(e){var u=-1,t=e==null?0:e.length;for(this.clear();++u<t;){var i=e[u];this.set(i[0],i[1])}}ai.prototype.clear=y5;ai.prototype.delete=v5;ai.prototype.get=B5;ai.prototype.has=x5;ai.prototype.set=w5;u1.exports=ai});var r1=F((QV,f1)=>{var n1=i1(),A5=nn(),I5=_f();function S5(){this.size=0,this.__data__={hash:new n1,map:new(I5||A5),string:new n1}}f1.exports=S5});var a1=F((XV,o1)=>{function $5(e){var u=typeof e;return u=="string"||u=="number"||u=="symbol"||u=="boolean"?e!=="__proto__":e===null}o1.exports=$5});var on=F((YV,D1)=>{var k5=a1();function T5(e,u){var t=e.__data__;return k5(u)?t[typeof u=="string"?"string":"hash"]:t.map}D1.exports=T5});var l1=F((eR,s1)=>{var P5=on();function O5(e){var u=P5(this,e).delete(e);return this.size-=u?1:0,u}s1.exports=O5});var c1=F((tR,d1)=>{var M5=on();function j5(e){return M5(this,e).get(e)}d1.exports=j5});var m1=F((uR,p1)=>{var N5=on();function q5(e){return N5(this,e).has(e)}p1.exports=q5});var C1=F((iR,F1)=>{var V5=on();function R5(e,u){var t=V5(this,e),i=t.size;return t.set(e,u),this.size+=t.size==i?0:1,this}F1.exports=R5});var yf=F((nR,g1)=>{var L5=r1(),z5=l1(),U5=c1(),H5=m1(),W5=C1();function Di(e){var u=-1,t=e==null?0:e.length;for(this.clear();++u<t;){var i=e[u];this.set(i[0],i[1])}}Di.prototype.clear=L5;Di.prototype.delete=z5;Di.prototype.get=U5;Di.prototype.has=H5;Di.prototype.set=W5;g1.exports=Di});var E1=F((fR,h1)=>{var G5=nn(),K5=_f(),J5=yf(),Z5=200;function Q5(e,u){var t=this.__data__;if(t instanceof G5){var i=t.__data__;if(!K5||i.length<Z5-1)return i.push([e,u]),this.size=++t.size,this;t=this.__data__=new J5(i)}return t.set(e,u),this.size=t.size,this}h1.exports=Q5});var vf=F((rR,b1)=>{var X5=nn(),Y5=l0(),eg=c0(),tg=m0(),ug=C0(),ig=E1();function si(e){var u=this.__data__=new X5(e);this.size=u.size}si.prototype.clear=Y5;si.prototype.delete=eg;si.prototype.get=tg;si.prototype.has=ug;si.prototype.set=ig;b1.exports=si});var y1=F((oR,_1)=>{function ng(e,u){for(var t=-1,i=e==null?0:e.length;++t<i&&u(e[t],t,e)!==!1;);return e}_1.exports=ng});var B1=F((aR,v1)=>{var fg=au(),rg=function(){try{var e=fg(Object,"defineProperty");return e({},"",{}),e}catch{}}();v1.exports=rg});var po=F((DR,w1)=>{var x1=B1();function og(e,u,t){u=="__proto__"&&x1?x1(e,u,{configurable:!0,enumerable:!0,value:t,writable:!0}):e[u]=t}w1.exports=og});var mo=F((sR,A1)=>{var ag=po(),Dg=bf(),sg=Object.prototype,lg=sg.hasOwnProperty;function dg(e,u,t){var i=e[u];(!(lg.call(e,u)&&Dg(i,t))||t===void 0&&!(u in e))&&ag(e,u,t)}A1.exports=dg});var an=F((lR,I1)=>{var cg=mo(),pg=po();function mg(e,u,t,i){var n=!t;t||(t={});for(var f=-1,r=u.length;++f<r;){var o=u[f],a=i?i(t[o],e[o],o,t,e):void 0;a===void 0&&(a=e[o]),n?pg(t,o,a):cg(t,o,a)}return t}I1.exports=mg});var $1=F((dR,S1)=>{function Fg(e,u){for(var t=-1,i=Array(e);++t<e;)i[t]=u(t);return i}S1.exports=Fg});var Kt=F((cR,k1)=>{function Cg(e){return e!=null&&typeof e=="object"}k1.exports=Cg});var P1=F((pR,T1)=>{var gg=ku(),hg=Kt(),Eg="[object Arguments]";function bg(e){return hg(e)&&gg(e)==Eg}T1.exports=bg});var Fo=F((mR,j1)=>{var O1=P1(),_g=Kt(),M1=Object.prototype,yg=M1.hasOwnProperty,vg=M1.propertyIsEnumerable,Bg=O1(function(){return arguments}())?O1:function(e){return _g(e)&&yg.call(e,"callee")&&!vg.call(e,"callee")};j1.exports=Bg});var pt=F((FR,N1)=>{var xg=Array.isArray;N1.exports=xg});var V1=F((CR,q1)=>{function wg(){return!1}q1.exports=wg});var Bf=F((Dn,li)=>{var Ag=$t(),Ig=V1(),z1=typeof Dn=="object"&&Dn&&!Dn.nodeType&&Dn,R1=z1&&typeof li=="object"&&li&&!li.nodeType&&li,Sg=R1&&R1.exports===z1,L1=Sg?Ag.Buffer:void 0,$g=L1?L1.isBuffer:void 0,kg=$g||Ig;li.exports=kg});var Co=F((gR,U1)=>{var Tg=9007199254740991,Pg=/^(?:0|[1-9]\d*)$/;function Og(e,u){var t=typeof e;return u=u==null?Tg:u,!!u&&(t=="number"||t!="symbol"&&Pg.test(e))&&e>-1&&e%1==0&&e<u}U1.exports=Og});var xf=F((hR,H1)=>{var Mg=9007199254740991;function jg(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Mg}H1.exports=jg});var G1=F((ER,W1)=>{var Ng=ku(),qg=xf(),Vg=Kt(),Rg="[object Arguments]",Lg="[object Array]",zg="[object Boolean]",Ug="[object Date]",Hg="[object Error]",Wg="[object Function]",Gg="[object Map]",Kg="[object Number]",Jg="[object Object]",Zg="[object RegExp]",Qg="[object Set]",Xg="[object String]",Yg="[object WeakMap]",eh="[object ArrayBuffer]",th="[object DataView]",uh="[object Float32Array]",ih="[object Float64Array]",nh="[object Int8Array]",fh="[object Int16Array]",rh="[object Int32Array]",oh="[object Uint8Array]",ah="[object Uint8ClampedArray]",Dh="[object Uint16Array]",sh="[object Uint32Array]",Ae={};Ae[uh]=Ae[ih]=Ae[nh]=Ae[fh]=Ae[rh]=Ae[oh]=Ae[ah]=Ae[Dh]=Ae[sh]=!0;Ae[Rg]=Ae[Lg]=Ae[eh]=Ae[zg]=Ae[th]=Ae[Ug]=Ae[Hg]=Ae[Wg]=Ae[Gg]=Ae[Kg]=Ae[Jg]=Ae[Zg]=Ae[Qg]=Ae[Xg]=Ae[Yg]=!1;function lh(e){return Vg(e)&&qg(e.length)&&!!Ae[Ng(e)]}W1.exports=lh});var wf=F((bR,K1)=>{function dh(e){return function(u){return e(u)}}K1.exports=dh});var Af=F((sn,di)=>{var ch=Do(),J1=typeof sn=="object"&&sn&&!sn.nodeType&&sn,ln=J1&&typeof di=="object"&&di&&!di.nodeType&&di,ph=ln&&ln.exports===J1,go=ph&&ch.process,mh=function(){try{var e=ln&&ln.require&&ln.require("util").types;return e||go&&go.binding&&go.binding("util")}catch{}}();di.exports=mh});var ho=F((_R,X1)=>{var Fh=G1(),Ch=wf(),Z1=Af(),Q1=Z1&&Z1.isTypedArray,gh=Q1?Ch(Q1):Fh;X1.exports=gh});var Eo=F((yR,Y1)=>{var hh=$1(),Eh=Fo(),bh=pt(),_h=Bf(),yh=Co(),vh=ho(),Bh=Object.prototype,xh=Bh.hasOwnProperty;function wh(e,u){var t=bh(e),i=!t&&Eh(e),n=!t&&!i&&_h(e),f=!t&&!i&&!n&&vh(e),r=t||i||n||f,o=r?hh(e.length,String):[],a=o.length;for(var D in e)(u||xh.call(e,D))&&!(r&&(D=="length"||n&&(D=="offset"||D=="parent")||f&&(D=="buffer"||D=="byteLength"||D=="byteOffset")||yh(D,a)))&&o.push(D);return o}Y1.exports=wh});var If=F((vR,el)=>{var Ah=Object.prototype;function Ih(e){var u=e&&e.constructor,t=typeof u=="function"&&u.prototype||Ah;return e===t}el.exports=Ih});var bo=F((BR,tl)=>{function Sh(e,u){return function(t){return e(u(t))}}tl.exports=Sh});var il=F((xR,ul)=>{var $h=bo(),kh=$h(Object.keys,Object);ul.exports=kh});var fl=F((wR,nl)=>{var Th=If(),Ph=il(),Oh=Object.prototype,Mh=Oh.hasOwnProperty;function jh(e){if(!Th(e))return Ph(e);var u=[];for(var t in Object(e))Mh.call(e,t)&&t!="constructor"&&u.push(t);return u}nl.exports=jh});var dn=F((AR,rl)=>{var Nh=so(),qh=xf();function Vh(e){return e!=null&&qh(e.length)&&!Nh(e)}rl.exports=Vh});var ci=F((IR,ol)=>{var Rh=Eo(),Lh=fl(),zh=dn();function Uh(e){return zh(e)?Rh(e):Lh(e)}ol.exports=Uh});var Dl=F((SR,al)=>{var Hh=an(),Wh=ci();function Gh(e,u){return e&&Hh(u,Wh(u),e)}al.exports=Gh});var ll=F(($R,sl)=>{function Kh(e){var u=[];if(e!=null)for(var t in Object(e))u.push(t);return u}sl.exports=Kh});var cl=F((kR,dl)=>{var Jh=Tu(),Zh=If(),Qh=ll(),Xh=Object.prototype,Yh=Xh.hasOwnProperty;function e6(e){if(!Jh(e))return Qh(e);var u=Zh(e),t=[];for(var i in e)i=="constructor"&&(u||!Yh.call(e,i))||t.push(i);return t}dl.exports=e6});var Sf=F((TR,pl)=>{var t6=Eo(),u6=cl(),i6=dn();function n6(e){return i6(e)?t6(e,!0):u6(e)}pl.exports=n6});var Fl=F((PR,ml)=>{var f6=an(),r6=Sf();function o6(e,u){return e&&f6(u,r6(u),e)}ml.exports=o6});var bl=F((cn,pi)=>{var a6=$t(),El=typeof cn=="object"&&cn&&!cn.nodeType&&cn,Cl=El&&typeof pi=="object"&&pi&&!pi.nodeType&&pi,D6=Cl&&Cl.exports===El,gl=D6?a6.Buffer:void 0,hl=gl?gl.allocUnsafe:void 0;function s6(e,u){if(u)return e.slice();var t=e.length,i=hl?hl(t):new e.constructor(t);return e.copy(i),i}pi.exports=s6});var yl=F((OR,_l)=>{function l6(e,u){var t=-1,i=e.length;for(u||(u=Array(i));++t<i;)u[t]=e[t];return u}_l.exports=l6});var _o=F((MR,vl)=>{function d6(e,u){for(var t=-1,i=e==null?0:e.length,n=0,f=[];++t<i;){var r=e[t];u(r,t,e)&&(f[n++]=r)}return f}vl.exports=d6});var yo=F((jR,Bl)=>{function c6(){return[]}Bl.exports=c6});var $f=F((NR,wl)=>{var p6=_o(),m6=yo(),F6=Object.prototype,C6=F6.propertyIsEnumerable,xl=Object.getOwnPropertySymbols,g6=xl?function(e){return e==null?[]:(e=Object(e),p6(xl(e),function(u){return C6.call(e,u)}))}:m6;wl.exports=g6});var Il=F((qR,Al)=>{var h6=an(),E6=$f();function b6(e,u){return h6(e,E6(e),u)}Al.exports=b6});var vo=F((VR,Sl)=>{function _6(e,u){for(var t=-1,i=u.length,n=e.length;++t<i;)e[n+t]=u[t];return e}Sl.exports=_6});var kf=F((RR,$l)=>{var y6=bo(),v6=y6(Object.getPrototypeOf,Object);$l.exports=v6});var Bo=F((LR,kl)=>{var B6=vo(),x6=kf(),w6=$f(),A6=yo(),I6=Object.getOwnPropertySymbols,S6=I6?function(e){for(var u=[];e;)B6(u,w6(e)),e=x6(e);return u}:A6;kl.exports=S6});var Pl=F((zR,Tl)=>{var $6=an(),k6=Bo();function T6(e,u){return $6(e,k6(e),u)}Tl.exports=T6});var xo=F((UR,Ol)=>{var P6=vo(),O6=pt();function M6(e,u,t){var i=u(e);return O6(e)?i:P6(i,t(e))}Ol.exports=M6});var wo=F((HR,Ml)=>{var j6=xo(),N6=$f(),q6=ci();function V6(e){return j6(e,q6,N6)}Ml.exports=V6});var Nl=F((WR,jl)=>{var R6=xo(),L6=Bo(),z6=Sf();function U6(e){return R6(e,z6,L6)}jl.exports=U6});var Vl=F((GR,ql)=>{var H6=au(),W6=$t(),G6=H6(W6,"DataView");ql.exports=G6});var Ll=F((KR,Rl)=>{var K6=au(),J6=$t(),Z6=K6(J6,"Promise");Rl.exports=Z6});var Ul=F((JR,zl)=>{var Q6=au(),X6=$t(),Y6=Q6(X6,"Set");zl.exports=Y6});var Wl=F((ZR,Hl)=>{var eE=au(),tE=$t(),uE=eE(tE,"WeakMap");Hl.exports=uE});var pn=F((QR,Yl)=>{var Ao=Vl(),Io=_f(),So=Ll(),$o=Ul(),ko=Wl(),Xl=ku(),mi=co(),Gl="[object Map]",iE="[object Object]",Kl="[object Promise]",Jl="[object Set]",Zl="[object WeakMap]",Ql="[object DataView]",nE=mi(Ao),fE=mi(Io),rE=mi(So),oE=mi($o),aE=mi(ko),Pu=Xl;(Ao&&Pu(new Ao(new ArrayBuffer(1)))!=Ql||Io&&Pu(new Io)!=Gl||So&&Pu(So.resolve())!=Kl||$o&&Pu(new $o)!=Jl||ko&&Pu(new ko)!=Zl)&&(Pu=function(e){var u=Xl(e),t=u==iE?e.constructor:void 0,i=t?mi(t):"";if(i)switch(i){case nE:return Ql;case fE:return Gl;case rE:return Kl;case oE:return Jl;case aE:return Zl}return u});Yl.exports=Pu});var td=F((XR,ed)=>{var DE=Object.prototype,sE=DE.hasOwnProperty;function lE(e){var u=e.length,t=new e.constructor(u);return u&&typeof e[0]=="string"&&sE.call(e,"index")&&(t.index=e.index,t.input=e.input),t}ed.exports=lE});var To=F((YR,ud)=>{var dE=$t(),cE=dE.Uint8Array;ud.exports=cE});var Tf=F((eL,nd)=>{var id=To();function pE(e){var u=new e.constructor(e.byteLength);return new id(u).set(new id(e)),u}nd.exports=pE});var rd=F((tL,fd)=>{var mE=Tf();function FE(e,u){var t=u?mE(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.byteLength)}fd.exports=FE});var ad=F((uL,od)=>{var CE=/\w*$/;function gE(e){var u=new e.constructor(e.source,CE.exec(e));return u.lastIndex=e.lastIndex,u}od.exports=gE});var cd=F((iL,dd)=>{var Dd=oi(),sd=Dd?Dd.prototype:void 0,ld=sd?sd.valueOf:void 0;function hE(e){return ld?Object(ld.call(e)):{}}dd.exports=hE});var md=F((nL,pd)=>{var EE=Tf();function bE(e,u){var t=u?EE(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.length)}pd.exports=bE});var Cd=F((fL,Fd)=>{var _E=Tf(),yE=rd(),vE=ad(),BE=cd(),xE=md(),wE="[object Boolean]",AE="[object Date]",IE="[object Map]",SE="[object Number]",$E="[object RegExp]",kE="[object Set]",TE="[object String]",PE="[object Symbol]",OE="[object ArrayBuffer]",ME="[object DataView]",jE="[object Float32Array]",NE="[object Float64Array]",qE="[object Int8Array]",VE="[object Int16Array]",RE="[object Int32Array]",LE="[object Uint8Array]",zE="[object Uint8ClampedArray]",UE="[object Uint16Array]",HE="[object Uint32Array]";function WE(e,u,t){var i=e.constructor;switch(u){case OE:return _E(e);case wE:case AE:return new i(+e);case ME:return yE(e,t);case jE:case NE:case qE:case VE:case RE:case LE:case zE:case UE:case HE:return xE(e,t);case IE:return new i;case SE:case TE:return new i(e);case $E:return vE(e);case kE:return new i;case PE:return BE(e)}}Fd.exports=WE});var Ed=F((rL,hd)=>{var GE=Tu(),gd=Object.create,KE=function(){function e(){}return function(u){if(!GE(u))return{};if(gd)return gd(u);e.prototype=u;var t=new e;return e.prototype=void 0,t}}();hd.exports=KE});var _d=F((oL,bd)=>{var JE=Ed(),ZE=kf(),QE=If();function XE(e){return typeof e.constructor=="function"&&!QE(e)?JE(ZE(e)):{}}bd.exports=XE});var vd=F((aL,yd)=>{var YE=pn(),eb=Kt(),tb="[object Map]";function ub(e){return eb(e)&&YE(e)==tb}yd.exports=ub});var Ad=F((DL,wd)=>{var ib=vd(),nb=wf(),Bd=Af(),xd=Bd&&Bd.isMap,fb=xd?nb(xd):ib;wd.exports=fb});var Sd=F((sL,Id)=>{var rb=pn(),ob=Kt(),ab="[object Set]";function Db(e){return ob(e)&&rb(e)==ab}Id.exports=Db});var Pd=F((lL,Td)=>{var sb=Sd(),lb=wf(),$d=Af(),kd=$d&&$d.isSet,db=kd?lb(kd):sb;Td.exports=db});var qd=F((dL,Nd)=>{var cb=vf(),pb=y1(),mb=mo(),Fb=Dl(),Cb=Fl(),gb=bl(),hb=yl(),Eb=Il(),bb=Pl(),_b=wo(),yb=Nl(),vb=pn(),Bb=td(),xb=Cd(),wb=_d(),Ab=pt(),Ib=Bf(),Sb=Ad(),$b=Tu(),kb=Pd(),Tb=ci(),Pb=Sf(),Ob=1,Mb=2,jb=4,Od="[object Arguments]",Nb="[object Array]",qb="[object Boolean]",Vb="[object Date]",Rb="[object Error]",Md="[object Function]",Lb="[object GeneratorFunction]",zb="[object Map]",Ub="[object Number]",jd="[object Object]",Hb="[object RegExp]",Wb="[object Set]",Gb="[object String]",Kb="[object Symbol]",Jb="[object WeakMap]",Zb="[object ArrayBuffer]",Qb="[object DataView]",Xb="[object Float32Array]",Yb="[object Float64Array]",e_="[object Int8Array]",t_="[object Int16Array]",u_="[object Int32Array]",i_="[object Uint8Array]",n_="[object Uint8ClampedArray]",f_="[object Uint16Array]",r_="[object Uint32Array]",ye={};ye[Od]=ye[Nb]=ye[Zb]=ye[Qb]=ye[qb]=ye[Vb]=ye[Xb]=ye[Yb]=ye[e_]=ye[t_]=ye[u_]=ye[zb]=ye[Ub]=ye[jd]=ye[Hb]=ye[Wb]=ye[Gb]=ye[Kb]=ye[i_]=ye[n_]=ye[f_]=ye[r_]=!0;ye[Rb]=ye[Md]=ye[Jb]=!1;function Pf(e,u,t,i,n,f){var r,o=u&Ob,a=u&Mb,D=u&jb;if(t&&(r=n?t(e,i,n,f):t(e)),r!==void 0)return r;if(!$b(e))return e;var l=Ab(e);if(l){if(r=Bb(e),!o)return hb(e,r)}else{var p=vb(e),m=p==Md||p==Lb;if(Ib(e))return gb(e,o);if(p==jd||p==Od||m&&!n){if(r=a||m?{}:wb(e),!o)return a?bb(e,Cb(r,e)):Eb(e,Fb(r,e))}else{if(!ye[p])return n?e:{};r=xb(e,p,o)}}f||(f=new cb);var b=f.get(e);if(b)return b;f.set(e,r),kb(e)?e.forEach(function(v){r.add(Pf(v,u,t,v,e,f))}):Sb(e)&&e.forEach(function(v,I){r.set(I,Pf(v,u,t,I,e,f))});var E=D?a?yb:_b:a?Pb:Tb,y=l?void 0:E(e);return pb(y||e,function(v,I){y&&(I=v,v=e[I]),mb(r,I,Pf(v,u,t,I,e,f))}),r}Nd.exports=Pf});var Rd=F((cL,Vd)=>{var o_=qd(),a_=1,D_=4;function s_(e){return o_(e,a_|D_)}Vd.exports=s_});var zd=F((pL,Ld)=>{var l_="__lodash_hash_undefined__";function d_(e){return this.__data__.set(e,l_),this}Ld.exports=d_});var Hd=F((mL,Ud)=>{function c_(e){return this.__data__.has(e)}Ud.exports=c_});var Gd=F((FL,Wd)=>{var p_=yf(),m_=zd(),F_=Hd();function Of(e){var u=-1,t=e==null?0:e.length;for(this.__data__=new p_;++u<t;)this.add(e[u])}Of.prototype.add=Of.prototype.push=m_;Of.prototype.has=F_;Wd.exports=Of});var Jd=F((CL,Kd)=>{function C_(e,u){for(var t=-1,i=e==null?0:e.length;++t<i;)if(u(e[t],t,e))return!0;return!1}Kd.exports=C_});var Qd=F((gL,Zd)=>{function g_(e,u){return e.has(u)}Zd.exports=g_});var Po=F((hL,Xd)=>{var h_=Gd(),E_=Jd(),b_=Qd(),__=1,y_=2;function v_(e,u,t,i,n,f){var r=t&__,o=e.length,a=u.length;if(o!=a&&!(r&&a>o))return!1;var D=f.get(e),l=f.get(u);if(D&&l)return D==u&&l==e;var p=-1,m=!0,b=t&y_?new h_:void 0;for(f.set(e,u),f.set(u,e);++p<o;){var E=e[p],y=u[p];if(i)var v=r?i(y,E,p,u,e,f):i(E,y,p,e,u,f);if(v!==void 0){if(v)continue;m=!1;break}if(b){if(!E_(u,function(I,O){if(!b_(b,O)&&(E===I||n(E,I,t,i,f)))return b.push(O)})){m=!1;break}}else if(!(E===y||n(E,y,t,i,f))){m=!1;break}}return f.delete(e),f.delete(u),m}Xd.exports=v_});var e3=F((EL,Yd)=>{function B_(e){var u=-1,t=Array(e.size);return e.forEach(function(i,n){t[++u]=[n,i]}),t}Yd.exports=B_});var u3=F((bL,t3)=>{function x_(e){var u=-1,t=Array(e.size);return e.forEach(function(i){t[++u]=i}),t}t3.exports=x_});var o3=F((_L,r3)=>{var i3=oi(),n3=To(),w_=bf(),A_=Po(),I_=e3(),S_=u3(),$_=1,k_=2,T_="[object Boolean]",P_="[object Date]",O_="[object Error]",M_="[object Map]",j_="[object Number]",N_="[object RegExp]",q_="[object Set]",V_="[object String]",R_="[object Symbol]",L_="[object ArrayBuffer]",z_="[object DataView]",f3=i3?i3.prototype:void 0,Oo=f3?f3.valueOf:void 0;function U_(e,u,t,i,n,f,r){switch(t){case z_:if(e.byteLength!=u.byteLength||e.byteOffset!=u.byteOffset)return!1;e=e.buffer,u=u.buffer;case L_:return!(e.byteLength!=u.byteLength||!f(new n3(e),new n3(u)));case T_:case P_:case j_:return w_(+e,+u);case O_:return e.name==u.name&&e.message==u.message;case N_:case V_:return e==u+"";case M_:var o=I_;case q_:var a=i&$_;if(o||(o=S_),e.size!=u.size&&!a)return!1;var D=r.get(e);if(D)return D==u;i|=k_,r.set(e,u);var l=A_(o(e),o(u),i,n,f,r);return r.delete(e),l;case R_:if(Oo)return Oo.call(e)==Oo.call(u)}return!1}r3.exports=U_});var s3=F((yL,D3)=>{var a3=wo(),H_=1,W_=Object.prototype,G_=W_.hasOwnProperty;function K_(e,u,t,i,n,f){var r=t&H_,o=a3(e),a=o.length,D=a3(u),l=D.length;if(a!=l&&!r)return!1;for(var p=a;p--;){var m=o[p];if(!(r?m in u:G_.call(u,m)))return!1}var b=f.get(e),E=f.get(u);if(b&&E)return b==u&&E==e;var y=!0;f.set(e,u),f.set(u,e);for(var v=r;++p<a;){m=o[p];var I=e[m],O=u[m];if(i)var L=r?i(O,I,m,u,e,f):i(I,O,m,e,u,f);if(!(L===void 0?I===O||n(I,O,t,i,f):L)){y=!1;break}v||(v=m=="constructor")}if(y&&!v){var U=e.constructor,M=u.constructor;U!=M&&"constructor"in e&&"constructor"in u&&!(typeof U=="function"&&U instanceof U&&typeof M=="function"&&M instanceof M)&&(y=!1)}return f.delete(e),f.delete(u),y}D3.exports=K_});var g3=F((vL,C3)=>{var Mo=vf(),J_=Po(),Z_=o3(),Q_=s3(),l3=pn(),d3=pt(),c3=Bf(),X_=ho(),Y_=1,p3="[object Arguments]",m3="[object Array]",Mf="[object Object]",e9=Object.prototype,F3=e9.hasOwnProperty;function t9(e,u,t,i,n,f){var r=d3(e),o=d3(u),a=r?m3:l3(e),D=o?m3:l3(u);a=a==p3?Mf:a,D=D==p3?Mf:D;var l=a==Mf,p=D==Mf,m=a==D;if(m&&c3(e)){if(!c3(u))return!1;r=!0,l=!1}if(m&&!l)return f||(f=new Mo),r||X_(e)?J_(e,u,t,i,n,f):Z_(e,u,a,t,i,n,f);if(!(t&Y_)){var b=l&&F3.call(e,"__wrapped__"),E=p&&F3.call(u,"__wrapped__");if(b||E){var y=b?e.value():e,v=E?u.value():u;return f||(f=new Mo),n(y,v,t,i,f)}}return m?(f||(f=new Mo),Q_(e,u,t,i,n,f)):!1}C3.exports=t9});var jf=F((BL,b3)=>{var u9=g3(),h3=Kt();function E3(e,u,t,i,n){return e===u?!0:e==null||u==null||!h3(e)&&!h3(u)?e!==e&&u!==u:u9(e,u,t,i,E3,n)}b3.exports=E3});var y3=F((xL,_3)=>{var i9=jf();function n9(e,u){return i9(e,u)}_3.exports=n9});var Cn=F(le=>{"use strict";Object.defineProperty(le,"__esModule",{value:!0});le.regexpCode=le.getEsmExportName=le.getProperty=le.safeStringify=le.stringify=le.strConcat=le.addCodeArg=le.str=le._=le.nil=le._Code=le.Name=le.IDENTIFIER=le._CodeOrName=void 0;var mn=class{};le._CodeOrName=mn;le.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Ou=class extends mn{constructor(u){if(super(),!le.IDENTIFIER.test(u))throw new Error("CodeGen: name must be a valid identifier");this.str=u}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};le.Name=Ou;var gt=class extends mn{constructor(u){super(),this._items=typeof u=="string"?[u]:u}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let u=this._items[0];return u===""||u==='""'}get str(){var u;return(u=this._str)!==null&&u!==void 0?u:this._str=this._items.reduce((t,i)=>`${t}${i}`,"")}get names(){var u;return(u=this._names)!==null&&u!==void 0?u:this._names=this._items.reduce((t,i)=>(i instanceof Ou&&(t[i.str]=(t[i.str]||0)+1),t),{})}};le._Code=gt;le.nil=new gt("");function v3(e,...u){let t=[e[0]],i=0;for(;i<u.length;)No(t,u[i]),t.push(e[++i]);return new gt(t)}le._=v3;var jo=new gt("+");function B3(e,...u){let t=[Fn(e[0])],i=0;for(;i<u.length;)t.push(jo),No(t,u[i]),t.push(jo,Fn(e[++i]));return f9(t),new gt(t)}le.str=B3;function No(e,u){u instanceof gt?e.push(...u._items):u instanceof Ou?e.push(u):e.push(a9(u))}le.addCodeArg=No;function f9(e){let u=1;for(;u<e.length-1;){if(e[u]===jo){let t=r9(e[u-1],e[u+1]);if(t!==void 0){e.splice(u-1,3,t);continue}e[u++]="+"}u++}}function r9(e,u){if(u==='""')return e;if(e==='""')return u;if(typeof e=="string")return u instanceof Ou||e[e.length-1]!=='"'?void 0:typeof u!="string"?`${e.slice(0,-1)}${u}"`:u[0]==='"'?e.slice(0,-1)+u.slice(1):void 0;if(typeof u=="string"&&u[0]==='"'&&!(e instanceof Ou))return`"${e}${u.slice(1)}`}function o9(e,u){return u.emptyStr()?e:e.emptyStr()?u:B3`${e}${u}`}le.strConcat=o9;function a9(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:Fn(Array.isArray(e)?e.join(","):e)}function D9(e){return new gt(Fn(e))}le.stringify=D9;function Fn(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}le.safeStringify=Fn;function s9(e){return typeof e=="string"&&le.IDENTIFIER.test(e)?new gt(`.${e}`):v3`[${e}]`}le.getProperty=s9;function l9(e){if(typeof e=="string"&&le.IDENTIFIER.test(e))return new gt(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}le.getEsmExportName=l9;function d9(e){return new gt(e.toString())}le.regexpCode=d9});var Ro=F(at=>{"use strict";Object.defineProperty(at,"__esModule",{value:!0});at.ValueScope=at.ValueScopeName=at.Scope=at.varKinds=at.UsedValueState=void 0;var ot=Cn(),qo=class extends Error{constructor(u){super(`CodeGen: "code" for ${u} not defined`),this.value=u.value}},Nf=function(e){return e[e.Started=0]="Started",e[e.Completed=1]="Completed",e}(Nf||(at.UsedValueState=Nf={}));at.varKinds={const:new ot.Name("const"),let:new ot.Name("let"),var:new ot.Name("var")};var qf=class{constructor({prefixes:u,parent:t}={}){this._names={},this._prefixes=u,this._parent=t}toName(u){return u instanceof ot.Name?u:this.name(u)}name(u){return new ot.Name(this._newName(u))}_newName(u){let t=this._names[u]||this._nameGroup(u);return`${u}${t.index++}`}_nameGroup(u){var t,i;if(!((i=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||i===void 0)&&i.has(u)||this._prefixes&&!this._prefixes.has(u))throw new Error(`CodeGen: prefix "${u}" is not allowed in this scope`);return this._names[u]={prefix:u,index:0}}};at.Scope=qf;var Vf=class extends ot.Name{constructor(u,t){super(t),this.prefix=u}setValue(u,{property:t,itemIndex:i}){this.value=u,this.scopePath=(0,ot._)`.${new ot.Name(t)}[${i}]`}};at.ValueScopeName=Vf;var c9=(0,ot._)`\n`,Vo=class extends qf{constructor(u){super(u),this._values={},this._scope=u.scope,this.opts=Ee(Z({},u),{_n:u.lines?c9:ot.nil})}get(){return this._scope}name(u){return new Vf(u,this._newName(u))}value(u,t){var i;if(t.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let n=this.toName(u),{prefix:f}=n,r=(i=t.key)!==null&&i!==void 0?i:t.ref,o=this._values[f];if(o){let l=o.get(r);if(l)return l}else o=this._values[f]=new Map;o.set(r,n);let a=this._scope[f]||(this._scope[f]=[]),D=a.length;return a[D]=t.ref,n.setValue(t,{property:f,itemIndex:D}),n}getValue(u,t){let i=this._values[u];if(i)return i.get(t)}scopeRefs(u,t=this._values){return this._reduceValues(t,i=>{if(i.scopePath===void 0)throw new Error(`CodeGen: name "${i}" has no value`);return(0,ot._)`${u}${i.scopePath}`})}scopeCode(u=this._values,t,i){return this._reduceValues(u,n=>{if(n.value===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return n.value.code},t,i)}_reduceValues(u,t,i={},n){let f=ot.nil;for(let r in u){let o=u[r];if(!o)continue;let a=i[r]=i[r]||new Map;o.forEach(D=>{if(a.has(D))return;a.set(D,Nf.Started);let l=t(D);if(l){let p=this.opts.es5?at.varKinds.var:at.varKinds.const;f=(0,ot._)`${f}${p} ${D} = ${l};${this.opts._n}`}else if(l=n==null?void 0:n(D))f=(0,ot._)`${f}${l}${this.opts._n}`;else throw new qo(D);a.set(D,Nf.Completed)})}return f}};at.ValueScope=Vo});var ee=F(ue=>{"use strict";Object.defineProperty(ue,"__esModule",{value:!0});ue.or=ue.and=ue.not=ue.CodeGen=ue.operators=ue.varKinds=ue.ValueScopeName=ue.ValueScope=ue.Scope=ue.Name=ue.regexpCode=ue.stringify=ue.getProperty=ue.nil=ue.strConcat=ue.str=ue._=void 0;var ae=Cn(),kt=Ro(),Du=Cn();Object.defineProperty(ue,"_",{enumerable:!0,get:function(){return Du._}});Object.defineProperty(ue,"str",{enumerable:!0,get:function(){return Du.str}});Object.defineProperty(ue,"strConcat",{enumerable:!0,get:function(){return Du.strConcat}});Object.defineProperty(ue,"nil",{enumerable:!0,get:function(){return Du.nil}});Object.defineProperty(ue,"getProperty",{enumerable:!0,get:function(){return Du.getProperty}});Object.defineProperty(ue,"stringify",{enumerable:!0,get:function(){return Du.stringify}});Object.defineProperty(ue,"regexpCode",{enumerable:!0,get:function(){return Du.regexpCode}});Object.defineProperty(ue,"Name",{enumerable:!0,get:function(){return Du.Name}});var Hf=Ro();Object.defineProperty(ue,"Scope",{enumerable:!0,get:function(){return Hf.Scope}});Object.defineProperty(ue,"ValueScope",{enumerable:!0,get:function(){return Hf.ValueScope}});Object.defineProperty(ue,"ValueScopeName",{enumerable:!0,get:function(){return Hf.ValueScopeName}});Object.defineProperty(ue,"varKinds",{enumerable:!0,get:function(){return Hf.varKinds}});ue.operators={GT:new ae._Code(">"),GTE:new ae._Code(">="),LT:new ae._Code("<"),LTE:new ae._Code("<="),EQ:new ae._Code("==="),NEQ:new ae._Code("!=="),NOT:new ae._Code("!"),OR:new ae._Code("||"),AND:new ae._Code("&&"),ADD:new ae._Code("+")};var Jt=class{optimizeNodes(){return this}optimizeNames(u,t){return this}},Lo=class extends Jt{constructor(u,t,i){super(),this.varKind=u,this.name=t,this.rhs=i}render({es5:u,_n:t}){let i=u?kt.varKinds.var:this.varKind,n=this.rhs===void 0?"":` = ${this.rhs}`;return`${i} ${this.name}${n};`+t}optimizeNames(u,t){if(u[this.name.str])return this.rhs&&(this.rhs=Fi(this.rhs,u,t)),this}get names(){return this.rhs instanceof ae._CodeOrName?this.rhs.names:{}}},Lf=class extends Jt{constructor(u,t,i){super(),this.lhs=u,this.rhs=t,this.sideEffects=i}render({_n:u}){return`${this.lhs} = ${this.rhs};`+u}optimizeNames(u,t){if(!(this.lhs instanceof ae.Name&&!u[this.lhs.str]&&!this.sideEffects))return this.rhs=Fi(this.rhs,u,t),this}get names(){let u=this.lhs instanceof ae.Name?{}:Z({},this.lhs.names);return Uf(u,this.rhs)}},zo=class extends Lf{constructor(u,t,i,n){super(u,i,n),this.op=t}render({_n:u}){return`${this.lhs} ${this.op}= ${this.rhs};`+u}},Uo=class extends Jt{constructor(u){super(),this.label=u,this.names={}}render({_n:u}){return`${this.label}:`+u}},Ho=class extends Jt{constructor(u){super(),this.label=u,this.names={}}render({_n:u}){return`break${this.label?` ${this.label}`:""};`+u}},Wo=class extends Jt{constructor(u){super(),this.error=u}render({_n:u}){return`throw ${this.error};`+u}get names(){return this.error.names}},Go=class extends Jt{constructor(u){super(),this.code=u}render({_n:u}){return`${this.code};`+u}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(u,t){return this.code=Fi(this.code,u,t),this}get names(){return this.code instanceof ae._CodeOrName?this.code.names:{}}},gn=class extends Jt{constructor(u=[]){super(),this.nodes=u}render(u){return this.nodes.reduce((t,i)=>t+i.render(u),"")}optimizeNodes(){let{nodes:u}=this,t=u.length;for(;t--;){let i=u[t].optimizeNodes();Array.isArray(i)?u.splice(t,1,...i):i?u[t]=i:u.splice(t,1)}return u.length>0?this:void 0}optimizeNames(u,t){let{nodes:i}=this,n=i.length;for(;n--;){let f=i[n];f.optimizeNames(u,t)||(p9(u,f.names),i.splice(n,1))}return i.length>0?this:void 0}get names(){return this.nodes.reduce((u,t)=>Mu(u,t.names),{})}},Zt=class extends gn{render(u){return"{"+u._n+super.render(u)+"}"+u._n}},Ko=class extends gn{},Jo=(()=>{class e extends Zt{}return e.kind="else",e})(),Rf=(()=>{class e extends Zt{constructor(t,i){super(i),this.condition=t}render(t){let i=`if(${this.condition})`+super.render(t);return this.else&&(i+="else "+this.else.render(t)),i}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let i=this.else;if(i){let n=i.optimizeNodes();i=this.else=Array.isArray(n)?new Jo(n):n}if(i)return t===!1?i instanceof e?i:i.nodes:this.nodes.length?this:new e(S3(t),i instanceof e?[i]:i.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,i){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(t,i),!!(super.optimizeNames(t,i)||this.else))return this.condition=Fi(this.condition,t,i),this}get names(){let t=super.names;return Uf(t,this.condition),this.else&&Mu(t,this.else.names),t}}return e.kind="if",e})(),Wf=(()=>{class e extends Zt{}return e.kind="for",e})(),Zo=class extends Wf{constructor(u){super(),this.iteration=u}render(u){return`for(${this.iteration})`+super.render(u)}optimizeNames(u,t){if(super.optimizeNames(u,t))return this.iteration=Fi(this.iteration,u,t),this}get names(){return Mu(super.names,this.iteration.names)}},Qo=class extends Wf{constructor(u,t,i,n){super(),this.varKind=u,this.name=t,this.from=i,this.to=n}render(u){let t=u.es5?kt.varKinds.var:this.varKind,{name:i,from:n,to:f}=this;return`for(${t} ${i}=${n}; ${i}<${f}; ${i}++)`+super.render(u)}get names(){let u=Uf(super.names,this.from);return Uf(u,this.to)}},zf=class extends Wf{constructor(u,t,i,n){super(),this.loop=u,this.varKind=t,this.name=i,this.iterable=n}render(u){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(u)}optimizeNames(u,t){if(super.optimizeNames(u,t))return this.iterable=Fi(this.iterable,u,t),this}get names(){return Mu(super.names,this.iterable.names)}},x3=(()=>{class e extends Zt{constructor(t,i,n){super(),this.name=t,this.args=i,this.async=n}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}}return e.kind="func",e})(),w3=(()=>{class e extends gn{render(t){return"return "+super.render(t)}}return e.kind="return",e})(),Xo=class extends Zt{render(u){let t="try"+super.render(u);return this.catch&&(t+=this.catch.render(u)),this.finally&&(t+=this.finally.render(u)),t}optimizeNodes(){var u,t;return super.optimizeNodes(),(u=this.catch)===null||u===void 0||u.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(u,t){var i,n;return super.optimizeNames(u,t),(i=this.catch)===null||i===void 0||i.optimizeNames(u,t),(n=this.finally)===null||n===void 0||n.optimizeNames(u,t),this}get names(){let u=super.names;return this.catch&&Mu(u,this.catch.names),this.finally&&Mu(u,this.finally.names),u}},A3=(()=>{class e extends Zt{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}}return e.kind="catch",e})(),I3=(()=>{class e extends Zt{render(t){return"finally"+super.render(t)}}return e.kind="finally",e})(),Yo=class{constructor(u,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts=Ee(Z({},t),{_n:t.lines?`
1
+ import{a as St,b as qC}from"./chunk-BFEMJZWI.js";import{a as zs}from"./chunk-C2UJXFYZ.js";import{a as ii,b as ni}from"./chunk-BN42B6ZN.js";import{a as Ks}from"./chunk-VOG67KUU.js";import{a as Zs}from"./chunk-PZFLYD2M.js";import{a as Js}from"./chunk-KBQ7X43U.js";import{a as tn}from"./chunk-TAQCEDBC.js";import{a as Hs,b as Ws}from"./chunk-6LUEJV3C.js";import{a as ao}from"./chunk-VGMRIFZA.js";import{a as Gs}from"./chunk-IS2FWNNK.js";import{a as mf,b as Ff,c as Cf,d as gf,e as hf,f as Ef,g as ei,m as Ce,n as Ue,o as ti}from"./chunk-E66CIXOF.js";import{a as Ms,b as Zu,c as Qu,e as rt,f as js,h as Ns,i as qs,k as Vs,l as ru,m as Rs,o as Xu,r as Yu,s as Su,t as $u,x as Ls,y as It,z as oo}from"./chunk-A6ASL2RK.js";import{a as ui}from"./chunk-KP734VBH.js";import{d as qt}from"./chunk-7HPEGK3R.js";import{a as Us}from"./chunk-WK4QAH4N.js";import{b as ke}from"./chunk-RWV2PLEE.js";import{h as ce,j as ou,k as De}from"./chunk-V7AAZRAR.js";import{e as Os}from"./chunk-T3Y7RYJZ.js";import{a as de,b as ge}from"./chunk-G67F4LRX.js";import{$c as Ct,Ac as _,Bc as B,Ca as xt,Cc as qe,D as _s,Da as Bs,Fa as uf,Gc as Ts,Ha as nf,Jb as W,Kb as g,Lb as wt,M as Yn,Mb as Ku,Nb as J,Ob as As,Pb as x,Rb as He,Sb as We,Tb as Ge,Ub as d,Vb as c,Wb as w,Xb as Is,Yb as Ss,Z as ro,_b as z,a as Z,aa as Yi,ad as Iu,b as Ee,bc as P,bd as it,cb as re,cc as C,e as F,ed as Ps,fa as ys,fb as xs,g as Oe,ga as Bt,gb as s,gc as Df,h as H,ha as ef,hb as pe,hc as sf,ic as lf,id as pf,jc as df,k as gs,kc as cf,la as tf,lb as ff,ma as $,mc as h,n as ct,nc as R,ob as rf,oc as q,pb as of,pc as Wt,q as hs,qc as $s,rc as Be,sb as K,sc as xe,ta as en,tb as af,tc as we,ua as j,ub as Gu,uc as ks,v as Es,va as N,vb as ws,vc as Ne,w as ie,wc as At,x as bs,xa as vs,xc as fu,yc as Gt,zb as S,zc as Ju}from"./chunk-ELVGIIRZ.js";var Xs=F((CV,Qs)=>{function RC(){this.__data__=[],this.size=0}Qs.exports=RC});var bf=F((gV,Ys)=>{function LC(e,u){return e===u||e!==e&&u!==u}Ys.exports=LC});var un=F((hV,e0)=>{var zC=bf();function UC(e,u){for(var t=e.length;t--;)if(zC(e[t][0],u))return t;return-1}e0.exports=UC});var u0=F((EV,t0)=>{var HC=un(),WC=Array.prototype,GC=WC.splice;function KC(e){var u=this.__data__,t=HC(u,e);if(t<0)return!1;var i=u.length-1;return t==i?u.pop():GC.call(u,t,1),--this.size,!0}t0.exports=KC});var n0=F((bV,i0)=>{var JC=un();function ZC(e){var u=this.__data__,t=JC(u,e);return t<0?void 0:u[t][1]}i0.exports=ZC});var r0=F((_V,f0)=>{var QC=un();function XC(e){return QC(this.__data__,e)>-1}f0.exports=XC});var a0=F((yV,o0)=>{var YC=un();function e4(e,u){var t=this.__data__,i=YC(t,e);return i<0?(++this.size,t.push([e,u])):t[i][1]=u,this}o0.exports=e4});var nn=F((vV,D0)=>{var t4=Xs(),u4=u0(),i4=n0(),n4=r0(),f4=a0();function ri(e){var u=-1,t=e==null?0:e.length;for(this.clear();++u<t;){var i=e[u];this.set(i[0],i[1])}}ri.prototype.clear=t4;ri.prototype.delete=u4;ri.prototype.get=i4;ri.prototype.has=n4;ri.prototype.set=f4;D0.exports=ri});var l0=F((BV,s0)=>{var r4=nn();function o4(){this.__data__=new r4,this.size=0}s0.exports=o4});var c0=F((xV,d0)=>{function a4(e){var u=this.__data__,t=u.delete(e);return this.size=u.size,t}d0.exports=a4});var m0=F((wV,p0)=>{function D4(e){return this.__data__.get(e)}p0.exports=D4});var C0=F((AV,F0)=>{function s4(e){return this.__data__.has(e)}F0.exports=s4});var Do=F((IV,g0)=>{var l4=typeof global=="object"&&global&&global.Object===Object&&global;g0.exports=l4});var $t=F((SV,h0)=>{var d4=Do(),c4=typeof self=="object"&&self&&self.Object===Object&&self,p4=d4||c4||Function("return this")();h0.exports=p4});var oi=F(($V,E0)=>{var m4=$t(),F4=m4.Symbol;E0.exports=F4});var v0=F((kV,y0)=>{var b0=oi(),_0=Object.prototype,C4=_0.hasOwnProperty,g4=_0.toString,fn=b0?b0.toStringTag:void 0;function h4(e){var u=C4.call(e,fn),t=e[fn];try{e[fn]=void 0;var i=!0}catch{}var n=g4.call(e);return i&&(u?e[fn]=t:delete e[fn]),n}y0.exports=h4});var x0=F((TV,B0)=>{var E4=Object.prototype,b4=E4.toString;function _4(e){return b4.call(e)}B0.exports=_4});var ku=F((PV,I0)=>{var w0=oi(),y4=v0(),v4=x0(),B4="[object Null]",x4="[object Undefined]",A0=w0?w0.toStringTag:void 0;function w4(e){return e==null?e===void 0?x4:B4:A0&&A0 in Object(e)?y4(e):v4(e)}I0.exports=w4});var Tu=F((OV,S0)=>{function A4(e){var u=typeof e;return e!=null&&(u=="object"||u=="function")}S0.exports=A4});var so=F((MV,$0)=>{var I4=ku(),S4=Tu(),$4="[object AsyncFunction]",k4="[object Function]",T4="[object GeneratorFunction]",P4="[object Proxy]";function O4(e){if(!S4(e))return!1;var u=I4(e);return u==k4||u==T4||u==$4||u==P4}$0.exports=O4});var T0=F((jV,k0)=>{var M4=$t(),j4=M4["__core-js_shared__"];k0.exports=j4});var M0=F((NV,O0)=>{var lo=T0(),P0=function(){var e=/[^.]+$/.exec(lo&&lo.keys&&lo.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function N4(e){return!!P0&&P0 in e}O0.exports=N4});var co=F((qV,j0)=>{var q4=Function.prototype,V4=q4.toString;function R4(e){if(e!=null){try{return V4.call(e)}catch{}try{return e+""}catch{}}return""}j0.exports=R4});var q0=F((VV,N0)=>{var L4=so(),z4=M0(),U4=Tu(),H4=co(),W4=/[\\^$.*+?()[\]{}|]/g,G4=/^\[object .+?Constructor\]$/,K4=Function.prototype,J4=Object.prototype,Z4=K4.toString,Q4=J4.hasOwnProperty,X4=RegExp("^"+Z4.call(Q4).replace(W4,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Y4(e){if(!U4(e)||z4(e))return!1;var u=L4(e)?X4:G4;return u.test(H4(e))}N0.exports=Y4});var R0=F((RV,V0)=>{function e5(e,u){return e==null?void 0:e[u]}V0.exports=e5});var au=F((LV,L0)=>{var t5=q0(),u5=R0();function i5(e,u){var t=u5(e,u);return t5(t)?t:void 0}L0.exports=i5});var _f=F((zV,z0)=>{var n5=au(),f5=$t(),r5=n5(f5,"Map");z0.exports=r5});var rn=F((UV,U0)=>{var o5=au(),a5=o5(Object,"create");U0.exports=a5});var G0=F((HV,W0)=>{var H0=rn();function D5(){this.__data__=H0?H0(null):{},this.size=0}W0.exports=D5});var J0=F((WV,K0)=>{function s5(e){var u=this.has(e)&&delete this.__data__[e];return this.size-=u?1:0,u}K0.exports=s5});var Q0=F((GV,Z0)=>{var l5=rn(),d5="__lodash_hash_undefined__",c5=Object.prototype,p5=c5.hasOwnProperty;function m5(e){var u=this.__data__;if(l5){var t=u[e];return t===d5?void 0:t}return p5.call(u,e)?u[e]:void 0}Z0.exports=m5});var Y0=F((KV,X0)=>{var F5=rn(),C5=Object.prototype,g5=C5.hasOwnProperty;function h5(e){var u=this.__data__;return F5?u[e]!==void 0:g5.call(u,e)}X0.exports=h5});var t1=F((JV,e1)=>{var E5=rn(),b5="__lodash_hash_undefined__";function _5(e,u){var t=this.__data__;return this.size+=this.has(e)?0:1,t[e]=E5&&u===void 0?b5:u,this}e1.exports=_5});var i1=F((ZV,u1)=>{var y5=G0(),v5=J0(),B5=Q0(),x5=Y0(),w5=t1();function ai(e){var u=-1,t=e==null?0:e.length;for(this.clear();++u<t;){var i=e[u];this.set(i[0],i[1])}}ai.prototype.clear=y5;ai.prototype.delete=v5;ai.prototype.get=B5;ai.prototype.has=x5;ai.prototype.set=w5;u1.exports=ai});var r1=F((QV,f1)=>{var n1=i1(),A5=nn(),I5=_f();function S5(){this.size=0,this.__data__={hash:new n1,map:new(I5||A5),string:new n1}}f1.exports=S5});var a1=F((XV,o1)=>{function $5(e){var u=typeof e;return u=="string"||u=="number"||u=="symbol"||u=="boolean"?e!=="__proto__":e===null}o1.exports=$5});var on=F((YV,D1)=>{var k5=a1();function T5(e,u){var t=e.__data__;return k5(u)?t[typeof u=="string"?"string":"hash"]:t.map}D1.exports=T5});var l1=F((eR,s1)=>{var P5=on();function O5(e){var u=P5(this,e).delete(e);return this.size-=u?1:0,u}s1.exports=O5});var c1=F((tR,d1)=>{var M5=on();function j5(e){return M5(this,e).get(e)}d1.exports=j5});var m1=F((uR,p1)=>{var N5=on();function q5(e){return N5(this,e).has(e)}p1.exports=q5});var C1=F((iR,F1)=>{var V5=on();function R5(e,u){var t=V5(this,e),i=t.size;return t.set(e,u),this.size+=t.size==i?0:1,this}F1.exports=R5});var yf=F((nR,g1)=>{var L5=r1(),z5=l1(),U5=c1(),H5=m1(),W5=C1();function Di(e){var u=-1,t=e==null?0:e.length;for(this.clear();++u<t;){var i=e[u];this.set(i[0],i[1])}}Di.prototype.clear=L5;Di.prototype.delete=z5;Di.prototype.get=U5;Di.prototype.has=H5;Di.prototype.set=W5;g1.exports=Di});var E1=F((fR,h1)=>{var G5=nn(),K5=_f(),J5=yf(),Z5=200;function Q5(e,u){var t=this.__data__;if(t instanceof G5){var i=t.__data__;if(!K5||i.length<Z5-1)return i.push([e,u]),this.size=++t.size,this;t=this.__data__=new J5(i)}return t.set(e,u),this.size=t.size,this}h1.exports=Q5});var vf=F((rR,b1)=>{var X5=nn(),Y5=l0(),eg=c0(),tg=m0(),ug=C0(),ig=E1();function si(e){var u=this.__data__=new X5(e);this.size=u.size}si.prototype.clear=Y5;si.prototype.delete=eg;si.prototype.get=tg;si.prototype.has=ug;si.prototype.set=ig;b1.exports=si});var y1=F((oR,_1)=>{function ng(e,u){for(var t=-1,i=e==null?0:e.length;++t<i&&u(e[t],t,e)!==!1;);return e}_1.exports=ng});var B1=F((aR,v1)=>{var fg=au(),rg=function(){try{var e=fg(Object,"defineProperty");return e({},"",{}),e}catch{}}();v1.exports=rg});var po=F((DR,w1)=>{var x1=B1();function og(e,u,t){u=="__proto__"&&x1?x1(e,u,{configurable:!0,enumerable:!0,value:t,writable:!0}):e[u]=t}w1.exports=og});var mo=F((sR,A1)=>{var ag=po(),Dg=bf(),sg=Object.prototype,lg=sg.hasOwnProperty;function dg(e,u,t){var i=e[u];(!(lg.call(e,u)&&Dg(i,t))||t===void 0&&!(u in e))&&ag(e,u,t)}A1.exports=dg});var an=F((lR,I1)=>{var cg=mo(),pg=po();function mg(e,u,t,i){var n=!t;t||(t={});for(var f=-1,r=u.length;++f<r;){var o=u[f],a=i?i(t[o],e[o],o,t,e):void 0;a===void 0&&(a=e[o]),n?pg(t,o,a):cg(t,o,a)}return t}I1.exports=mg});var $1=F((dR,S1)=>{function Fg(e,u){for(var t=-1,i=Array(e);++t<e;)i[t]=u(t);return i}S1.exports=Fg});var Kt=F((cR,k1)=>{function Cg(e){return e!=null&&typeof e=="object"}k1.exports=Cg});var P1=F((pR,T1)=>{var gg=ku(),hg=Kt(),Eg="[object Arguments]";function bg(e){return hg(e)&&gg(e)==Eg}T1.exports=bg});var Fo=F((mR,j1)=>{var O1=P1(),_g=Kt(),M1=Object.prototype,yg=M1.hasOwnProperty,vg=M1.propertyIsEnumerable,Bg=O1(function(){return arguments}())?O1:function(e){return _g(e)&&yg.call(e,"callee")&&!vg.call(e,"callee")};j1.exports=Bg});var pt=F((FR,N1)=>{var xg=Array.isArray;N1.exports=xg});var V1=F((CR,q1)=>{function wg(){return!1}q1.exports=wg});var Bf=F((Dn,li)=>{var Ag=$t(),Ig=V1(),z1=typeof Dn=="object"&&Dn&&!Dn.nodeType&&Dn,R1=z1&&typeof li=="object"&&li&&!li.nodeType&&li,Sg=R1&&R1.exports===z1,L1=Sg?Ag.Buffer:void 0,$g=L1?L1.isBuffer:void 0,kg=$g||Ig;li.exports=kg});var Co=F((gR,U1)=>{var Tg=9007199254740991,Pg=/^(?:0|[1-9]\d*)$/;function Og(e,u){var t=typeof e;return u=u==null?Tg:u,!!u&&(t=="number"||t!="symbol"&&Pg.test(e))&&e>-1&&e%1==0&&e<u}U1.exports=Og});var xf=F((hR,H1)=>{var Mg=9007199254740991;function jg(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Mg}H1.exports=jg});var G1=F((ER,W1)=>{var Ng=ku(),qg=xf(),Vg=Kt(),Rg="[object Arguments]",Lg="[object Array]",zg="[object Boolean]",Ug="[object Date]",Hg="[object Error]",Wg="[object Function]",Gg="[object Map]",Kg="[object Number]",Jg="[object Object]",Zg="[object RegExp]",Qg="[object Set]",Xg="[object String]",Yg="[object WeakMap]",eh="[object ArrayBuffer]",th="[object DataView]",uh="[object Float32Array]",ih="[object Float64Array]",nh="[object Int8Array]",fh="[object Int16Array]",rh="[object Int32Array]",oh="[object Uint8Array]",ah="[object Uint8ClampedArray]",Dh="[object Uint16Array]",sh="[object Uint32Array]",Ae={};Ae[uh]=Ae[ih]=Ae[nh]=Ae[fh]=Ae[rh]=Ae[oh]=Ae[ah]=Ae[Dh]=Ae[sh]=!0;Ae[Rg]=Ae[Lg]=Ae[eh]=Ae[zg]=Ae[th]=Ae[Ug]=Ae[Hg]=Ae[Wg]=Ae[Gg]=Ae[Kg]=Ae[Jg]=Ae[Zg]=Ae[Qg]=Ae[Xg]=Ae[Yg]=!1;function lh(e){return Vg(e)&&qg(e.length)&&!!Ae[Ng(e)]}W1.exports=lh});var wf=F((bR,K1)=>{function dh(e){return function(u){return e(u)}}K1.exports=dh});var Af=F((sn,di)=>{var ch=Do(),J1=typeof sn=="object"&&sn&&!sn.nodeType&&sn,ln=J1&&typeof di=="object"&&di&&!di.nodeType&&di,ph=ln&&ln.exports===J1,go=ph&&ch.process,mh=function(){try{var e=ln&&ln.require&&ln.require("util").types;return e||go&&go.binding&&go.binding("util")}catch{}}();di.exports=mh});var ho=F((_R,X1)=>{var Fh=G1(),Ch=wf(),Z1=Af(),Q1=Z1&&Z1.isTypedArray,gh=Q1?Ch(Q1):Fh;X1.exports=gh});var Eo=F((yR,Y1)=>{var hh=$1(),Eh=Fo(),bh=pt(),_h=Bf(),yh=Co(),vh=ho(),Bh=Object.prototype,xh=Bh.hasOwnProperty;function wh(e,u){var t=bh(e),i=!t&&Eh(e),n=!t&&!i&&_h(e),f=!t&&!i&&!n&&vh(e),r=t||i||n||f,o=r?hh(e.length,String):[],a=o.length;for(var D in e)(u||xh.call(e,D))&&!(r&&(D=="length"||n&&(D=="offset"||D=="parent")||f&&(D=="buffer"||D=="byteLength"||D=="byteOffset")||yh(D,a)))&&o.push(D);return o}Y1.exports=wh});var If=F((vR,el)=>{var Ah=Object.prototype;function Ih(e){var u=e&&e.constructor,t=typeof u=="function"&&u.prototype||Ah;return e===t}el.exports=Ih});var bo=F((BR,tl)=>{function Sh(e,u){return function(t){return e(u(t))}}tl.exports=Sh});var il=F((xR,ul)=>{var $h=bo(),kh=$h(Object.keys,Object);ul.exports=kh});var fl=F((wR,nl)=>{var Th=If(),Ph=il(),Oh=Object.prototype,Mh=Oh.hasOwnProperty;function jh(e){if(!Th(e))return Ph(e);var u=[];for(var t in Object(e))Mh.call(e,t)&&t!="constructor"&&u.push(t);return u}nl.exports=jh});var dn=F((AR,rl)=>{var Nh=so(),qh=xf();function Vh(e){return e!=null&&qh(e.length)&&!Nh(e)}rl.exports=Vh});var ci=F((IR,ol)=>{var Rh=Eo(),Lh=fl(),zh=dn();function Uh(e){return zh(e)?Rh(e):Lh(e)}ol.exports=Uh});var Dl=F((SR,al)=>{var Hh=an(),Wh=ci();function Gh(e,u){return e&&Hh(u,Wh(u),e)}al.exports=Gh});var ll=F(($R,sl)=>{function Kh(e){var u=[];if(e!=null)for(var t in Object(e))u.push(t);return u}sl.exports=Kh});var cl=F((kR,dl)=>{var Jh=Tu(),Zh=If(),Qh=ll(),Xh=Object.prototype,Yh=Xh.hasOwnProperty;function e6(e){if(!Jh(e))return Qh(e);var u=Zh(e),t=[];for(var i in e)i=="constructor"&&(u||!Yh.call(e,i))||t.push(i);return t}dl.exports=e6});var Sf=F((TR,pl)=>{var t6=Eo(),u6=cl(),i6=dn();function n6(e){return i6(e)?t6(e,!0):u6(e)}pl.exports=n6});var Fl=F((PR,ml)=>{var f6=an(),r6=Sf();function o6(e,u){return e&&f6(u,r6(u),e)}ml.exports=o6});var bl=F((cn,pi)=>{var a6=$t(),El=typeof cn=="object"&&cn&&!cn.nodeType&&cn,Cl=El&&typeof pi=="object"&&pi&&!pi.nodeType&&pi,D6=Cl&&Cl.exports===El,gl=D6?a6.Buffer:void 0,hl=gl?gl.allocUnsafe:void 0;function s6(e,u){if(u)return e.slice();var t=e.length,i=hl?hl(t):new e.constructor(t);return e.copy(i),i}pi.exports=s6});var yl=F((OR,_l)=>{function l6(e,u){var t=-1,i=e.length;for(u||(u=Array(i));++t<i;)u[t]=e[t];return u}_l.exports=l6});var _o=F((MR,vl)=>{function d6(e,u){for(var t=-1,i=e==null?0:e.length,n=0,f=[];++t<i;){var r=e[t];u(r,t,e)&&(f[n++]=r)}return f}vl.exports=d6});var yo=F((jR,Bl)=>{function c6(){return[]}Bl.exports=c6});var $f=F((NR,wl)=>{var p6=_o(),m6=yo(),F6=Object.prototype,C6=F6.propertyIsEnumerable,xl=Object.getOwnPropertySymbols,g6=xl?function(e){return e==null?[]:(e=Object(e),p6(xl(e),function(u){return C6.call(e,u)}))}:m6;wl.exports=g6});var Il=F((qR,Al)=>{var h6=an(),E6=$f();function b6(e,u){return h6(e,E6(e),u)}Al.exports=b6});var vo=F((VR,Sl)=>{function _6(e,u){for(var t=-1,i=u.length,n=e.length;++t<i;)e[n+t]=u[t];return e}Sl.exports=_6});var kf=F((RR,$l)=>{var y6=bo(),v6=y6(Object.getPrototypeOf,Object);$l.exports=v6});var Bo=F((LR,kl)=>{var B6=vo(),x6=kf(),w6=$f(),A6=yo(),I6=Object.getOwnPropertySymbols,S6=I6?function(e){for(var u=[];e;)B6(u,w6(e)),e=x6(e);return u}:A6;kl.exports=S6});var Pl=F((zR,Tl)=>{var $6=an(),k6=Bo();function T6(e,u){return $6(e,k6(e),u)}Tl.exports=T6});var xo=F((UR,Ol)=>{var P6=vo(),O6=pt();function M6(e,u,t){var i=u(e);return O6(e)?i:P6(i,t(e))}Ol.exports=M6});var wo=F((HR,Ml)=>{var j6=xo(),N6=$f(),q6=ci();function V6(e){return j6(e,q6,N6)}Ml.exports=V6});var Nl=F((WR,jl)=>{var R6=xo(),L6=Bo(),z6=Sf();function U6(e){return R6(e,z6,L6)}jl.exports=U6});var Vl=F((GR,ql)=>{var H6=au(),W6=$t(),G6=H6(W6,"DataView");ql.exports=G6});var Ll=F((KR,Rl)=>{var K6=au(),J6=$t(),Z6=K6(J6,"Promise");Rl.exports=Z6});var Ul=F((JR,zl)=>{var Q6=au(),X6=$t(),Y6=Q6(X6,"Set");zl.exports=Y6});var Wl=F((ZR,Hl)=>{var eE=au(),tE=$t(),uE=eE(tE,"WeakMap");Hl.exports=uE});var pn=F((QR,Yl)=>{var Ao=Vl(),Io=_f(),So=Ll(),$o=Ul(),ko=Wl(),Xl=ku(),mi=co(),Gl="[object Map]",iE="[object Object]",Kl="[object Promise]",Jl="[object Set]",Zl="[object WeakMap]",Ql="[object DataView]",nE=mi(Ao),fE=mi(Io),rE=mi(So),oE=mi($o),aE=mi(ko),Pu=Xl;(Ao&&Pu(new Ao(new ArrayBuffer(1)))!=Ql||Io&&Pu(new Io)!=Gl||So&&Pu(So.resolve())!=Kl||$o&&Pu(new $o)!=Jl||ko&&Pu(new ko)!=Zl)&&(Pu=function(e){var u=Xl(e),t=u==iE?e.constructor:void 0,i=t?mi(t):"";if(i)switch(i){case nE:return Ql;case fE:return Gl;case rE:return Kl;case oE:return Jl;case aE:return Zl}return u});Yl.exports=Pu});var td=F((XR,ed)=>{var DE=Object.prototype,sE=DE.hasOwnProperty;function lE(e){var u=e.length,t=new e.constructor(u);return u&&typeof e[0]=="string"&&sE.call(e,"index")&&(t.index=e.index,t.input=e.input),t}ed.exports=lE});var To=F((YR,ud)=>{var dE=$t(),cE=dE.Uint8Array;ud.exports=cE});var Tf=F((eL,nd)=>{var id=To();function pE(e){var u=new e.constructor(e.byteLength);return new id(u).set(new id(e)),u}nd.exports=pE});var rd=F((tL,fd)=>{var mE=Tf();function FE(e,u){var t=u?mE(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.byteLength)}fd.exports=FE});var ad=F((uL,od)=>{var CE=/\w*$/;function gE(e){var u=new e.constructor(e.source,CE.exec(e));return u.lastIndex=e.lastIndex,u}od.exports=gE});var cd=F((iL,dd)=>{var Dd=oi(),sd=Dd?Dd.prototype:void 0,ld=sd?sd.valueOf:void 0;function hE(e){return ld?Object(ld.call(e)):{}}dd.exports=hE});var md=F((nL,pd)=>{var EE=Tf();function bE(e,u){var t=u?EE(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.length)}pd.exports=bE});var Cd=F((fL,Fd)=>{var _E=Tf(),yE=rd(),vE=ad(),BE=cd(),xE=md(),wE="[object Boolean]",AE="[object Date]",IE="[object Map]",SE="[object Number]",$E="[object RegExp]",kE="[object Set]",TE="[object String]",PE="[object Symbol]",OE="[object ArrayBuffer]",ME="[object DataView]",jE="[object Float32Array]",NE="[object Float64Array]",qE="[object Int8Array]",VE="[object Int16Array]",RE="[object Int32Array]",LE="[object Uint8Array]",zE="[object Uint8ClampedArray]",UE="[object Uint16Array]",HE="[object Uint32Array]";function WE(e,u,t){var i=e.constructor;switch(u){case OE:return _E(e);case wE:case AE:return new i(+e);case ME:return yE(e,t);case jE:case NE:case qE:case VE:case RE:case LE:case zE:case UE:case HE:return xE(e,t);case IE:return new i;case SE:case TE:return new i(e);case $E:return vE(e);case kE:return new i;case PE:return BE(e)}}Fd.exports=WE});var Ed=F((rL,hd)=>{var GE=Tu(),gd=Object.create,KE=function(){function e(){}return function(u){if(!GE(u))return{};if(gd)return gd(u);e.prototype=u;var t=new e;return e.prototype=void 0,t}}();hd.exports=KE});var _d=F((oL,bd)=>{var JE=Ed(),ZE=kf(),QE=If();function XE(e){return typeof e.constructor=="function"&&!QE(e)?JE(ZE(e)):{}}bd.exports=XE});var vd=F((aL,yd)=>{var YE=pn(),eb=Kt(),tb="[object Map]";function ub(e){return eb(e)&&YE(e)==tb}yd.exports=ub});var Ad=F((DL,wd)=>{var ib=vd(),nb=wf(),Bd=Af(),xd=Bd&&Bd.isMap,fb=xd?nb(xd):ib;wd.exports=fb});var Sd=F((sL,Id)=>{var rb=pn(),ob=Kt(),ab="[object Set]";function Db(e){return ob(e)&&rb(e)==ab}Id.exports=Db});var Pd=F((lL,Td)=>{var sb=Sd(),lb=wf(),$d=Af(),kd=$d&&$d.isSet,db=kd?lb(kd):sb;Td.exports=db});var qd=F((dL,Nd)=>{var cb=vf(),pb=y1(),mb=mo(),Fb=Dl(),Cb=Fl(),gb=bl(),hb=yl(),Eb=Il(),bb=Pl(),_b=wo(),yb=Nl(),vb=pn(),Bb=td(),xb=Cd(),wb=_d(),Ab=pt(),Ib=Bf(),Sb=Ad(),$b=Tu(),kb=Pd(),Tb=ci(),Pb=Sf(),Ob=1,Mb=2,jb=4,Od="[object Arguments]",Nb="[object Array]",qb="[object Boolean]",Vb="[object Date]",Rb="[object Error]",Md="[object Function]",Lb="[object GeneratorFunction]",zb="[object Map]",Ub="[object Number]",jd="[object Object]",Hb="[object RegExp]",Wb="[object Set]",Gb="[object String]",Kb="[object Symbol]",Jb="[object WeakMap]",Zb="[object ArrayBuffer]",Qb="[object DataView]",Xb="[object Float32Array]",Yb="[object Float64Array]",e_="[object Int8Array]",t_="[object Int16Array]",u_="[object Int32Array]",i_="[object Uint8Array]",n_="[object Uint8ClampedArray]",f_="[object Uint16Array]",r_="[object Uint32Array]",ye={};ye[Od]=ye[Nb]=ye[Zb]=ye[Qb]=ye[qb]=ye[Vb]=ye[Xb]=ye[Yb]=ye[e_]=ye[t_]=ye[u_]=ye[zb]=ye[Ub]=ye[jd]=ye[Hb]=ye[Wb]=ye[Gb]=ye[Kb]=ye[i_]=ye[n_]=ye[f_]=ye[r_]=!0;ye[Rb]=ye[Md]=ye[Jb]=!1;function Pf(e,u,t,i,n,f){var r,o=u&Ob,a=u&Mb,D=u&jb;if(t&&(r=n?t(e,i,n,f):t(e)),r!==void 0)return r;if(!$b(e))return e;var l=Ab(e);if(l){if(r=Bb(e),!o)return hb(e,r)}else{var p=vb(e),m=p==Md||p==Lb;if(Ib(e))return gb(e,o);if(p==jd||p==Od||m&&!n){if(r=a||m?{}:wb(e),!o)return a?bb(e,Cb(r,e)):Eb(e,Fb(r,e))}else{if(!ye[p])return n?e:{};r=xb(e,p,o)}}f||(f=new cb);var b=f.get(e);if(b)return b;f.set(e,r),kb(e)?e.forEach(function(v){r.add(Pf(v,u,t,v,e,f))}):Sb(e)&&e.forEach(function(v,I){r.set(I,Pf(v,u,t,I,e,f))});var E=D?a?yb:_b:a?Pb:Tb,y=l?void 0:E(e);return pb(y||e,function(v,I){y&&(I=v,v=e[I]),mb(r,I,Pf(v,u,t,I,e,f))}),r}Nd.exports=Pf});var Rd=F((cL,Vd)=>{var o_=qd(),a_=1,D_=4;function s_(e){return o_(e,a_|D_)}Vd.exports=s_});var zd=F((pL,Ld)=>{var l_="__lodash_hash_undefined__";function d_(e){return this.__data__.set(e,l_),this}Ld.exports=d_});var Hd=F((mL,Ud)=>{function c_(e){return this.__data__.has(e)}Ud.exports=c_});var Gd=F((FL,Wd)=>{var p_=yf(),m_=zd(),F_=Hd();function Of(e){var u=-1,t=e==null?0:e.length;for(this.__data__=new p_;++u<t;)this.add(e[u])}Of.prototype.add=Of.prototype.push=m_;Of.prototype.has=F_;Wd.exports=Of});var Jd=F((CL,Kd)=>{function C_(e,u){for(var t=-1,i=e==null?0:e.length;++t<i;)if(u(e[t],t,e))return!0;return!1}Kd.exports=C_});var Qd=F((gL,Zd)=>{function g_(e,u){return e.has(u)}Zd.exports=g_});var Po=F((hL,Xd)=>{var h_=Gd(),E_=Jd(),b_=Qd(),__=1,y_=2;function v_(e,u,t,i,n,f){var r=t&__,o=e.length,a=u.length;if(o!=a&&!(r&&a>o))return!1;var D=f.get(e),l=f.get(u);if(D&&l)return D==u&&l==e;var p=-1,m=!0,b=t&y_?new h_:void 0;for(f.set(e,u),f.set(u,e);++p<o;){var E=e[p],y=u[p];if(i)var v=r?i(y,E,p,u,e,f):i(E,y,p,e,u,f);if(v!==void 0){if(v)continue;m=!1;break}if(b){if(!E_(u,function(I,O){if(!b_(b,O)&&(E===I||n(E,I,t,i,f)))return b.push(O)})){m=!1;break}}else if(!(E===y||n(E,y,t,i,f))){m=!1;break}}return f.delete(e),f.delete(u),m}Xd.exports=v_});var e3=F((EL,Yd)=>{function B_(e){var u=-1,t=Array(e.size);return e.forEach(function(i,n){t[++u]=[n,i]}),t}Yd.exports=B_});var u3=F((bL,t3)=>{function x_(e){var u=-1,t=Array(e.size);return e.forEach(function(i){t[++u]=i}),t}t3.exports=x_});var o3=F((_L,r3)=>{var i3=oi(),n3=To(),w_=bf(),A_=Po(),I_=e3(),S_=u3(),$_=1,k_=2,T_="[object Boolean]",P_="[object Date]",O_="[object Error]",M_="[object Map]",j_="[object Number]",N_="[object RegExp]",q_="[object Set]",V_="[object String]",R_="[object Symbol]",L_="[object ArrayBuffer]",z_="[object DataView]",f3=i3?i3.prototype:void 0,Oo=f3?f3.valueOf:void 0;function U_(e,u,t,i,n,f,r){switch(t){case z_:if(e.byteLength!=u.byteLength||e.byteOffset!=u.byteOffset)return!1;e=e.buffer,u=u.buffer;case L_:return!(e.byteLength!=u.byteLength||!f(new n3(e),new n3(u)));case T_:case P_:case j_:return w_(+e,+u);case O_:return e.name==u.name&&e.message==u.message;case N_:case V_:return e==u+"";case M_:var o=I_;case q_:var a=i&$_;if(o||(o=S_),e.size!=u.size&&!a)return!1;var D=r.get(e);if(D)return D==u;i|=k_,r.set(e,u);var l=A_(o(e),o(u),i,n,f,r);return r.delete(e),l;case R_:if(Oo)return Oo.call(e)==Oo.call(u)}return!1}r3.exports=U_});var s3=F((yL,D3)=>{var a3=wo(),H_=1,W_=Object.prototype,G_=W_.hasOwnProperty;function K_(e,u,t,i,n,f){var r=t&H_,o=a3(e),a=o.length,D=a3(u),l=D.length;if(a!=l&&!r)return!1;for(var p=a;p--;){var m=o[p];if(!(r?m in u:G_.call(u,m)))return!1}var b=f.get(e),E=f.get(u);if(b&&E)return b==u&&E==e;var y=!0;f.set(e,u),f.set(u,e);for(var v=r;++p<a;){m=o[p];var I=e[m],O=u[m];if(i)var L=r?i(O,I,m,u,e,f):i(I,O,m,e,u,f);if(!(L===void 0?I===O||n(I,O,t,i,f):L)){y=!1;break}v||(v=m=="constructor")}if(y&&!v){var U=e.constructor,M=u.constructor;U!=M&&"constructor"in e&&"constructor"in u&&!(typeof U=="function"&&U instanceof U&&typeof M=="function"&&M instanceof M)&&(y=!1)}return f.delete(e),f.delete(u),y}D3.exports=K_});var g3=F((vL,C3)=>{var Mo=vf(),J_=Po(),Z_=o3(),Q_=s3(),l3=pn(),d3=pt(),c3=Bf(),X_=ho(),Y_=1,p3="[object Arguments]",m3="[object Array]",Mf="[object Object]",e9=Object.prototype,F3=e9.hasOwnProperty;function t9(e,u,t,i,n,f){var r=d3(e),o=d3(u),a=r?m3:l3(e),D=o?m3:l3(u);a=a==p3?Mf:a,D=D==p3?Mf:D;var l=a==Mf,p=D==Mf,m=a==D;if(m&&c3(e)){if(!c3(u))return!1;r=!0,l=!1}if(m&&!l)return f||(f=new Mo),r||X_(e)?J_(e,u,t,i,n,f):Z_(e,u,a,t,i,n,f);if(!(t&Y_)){var b=l&&F3.call(e,"__wrapped__"),E=p&&F3.call(u,"__wrapped__");if(b||E){var y=b?e.value():e,v=E?u.value():u;return f||(f=new Mo),n(y,v,t,i,f)}}return m?(f||(f=new Mo),Q_(e,u,t,i,n,f)):!1}C3.exports=t9});var jf=F((BL,b3)=>{var u9=g3(),h3=Kt();function E3(e,u,t,i,n){return e===u?!0:e==null||u==null||!h3(e)&&!h3(u)?e!==e&&u!==u:u9(e,u,t,i,E3,n)}b3.exports=E3});var y3=F((xL,_3)=>{var i9=jf();function n9(e,u){return i9(e,u)}_3.exports=n9});var Cn=F(le=>{"use strict";Object.defineProperty(le,"__esModule",{value:!0});le.regexpCode=le.getEsmExportName=le.getProperty=le.safeStringify=le.stringify=le.strConcat=le.addCodeArg=le.str=le._=le.nil=le._Code=le.Name=le.IDENTIFIER=le._CodeOrName=void 0;var mn=class{};le._CodeOrName=mn;le.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Ou=class extends mn{constructor(u){if(super(),!le.IDENTIFIER.test(u))throw new Error("CodeGen: name must be a valid identifier");this.str=u}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};le.Name=Ou;var gt=class extends mn{constructor(u){super(),this._items=typeof u=="string"?[u]:u}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let u=this._items[0];return u===""||u==='""'}get str(){var u;return(u=this._str)!==null&&u!==void 0?u:this._str=this._items.reduce((t,i)=>`${t}${i}`,"")}get names(){var u;return(u=this._names)!==null&&u!==void 0?u:this._names=this._items.reduce((t,i)=>(i instanceof Ou&&(t[i.str]=(t[i.str]||0)+1),t),{})}};le._Code=gt;le.nil=new gt("");function v3(e,...u){let t=[e[0]],i=0;for(;i<u.length;)No(t,u[i]),t.push(e[++i]);return new gt(t)}le._=v3;var jo=new gt("+");function B3(e,...u){let t=[Fn(e[0])],i=0;for(;i<u.length;)t.push(jo),No(t,u[i]),t.push(jo,Fn(e[++i]));return f9(t),new gt(t)}le.str=B3;function No(e,u){u instanceof gt?e.push(...u._items):u instanceof Ou?e.push(u):e.push(a9(u))}le.addCodeArg=No;function f9(e){let u=1;for(;u<e.length-1;){if(e[u]===jo){let t=r9(e[u-1],e[u+1]);if(t!==void 0){e.splice(u-1,3,t);continue}e[u++]="+"}u++}}function r9(e,u){if(u==='""')return e;if(e==='""')return u;if(typeof e=="string")return u instanceof Ou||e[e.length-1]!=='"'?void 0:typeof u!="string"?`${e.slice(0,-1)}${u}"`:u[0]==='"'?e.slice(0,-1)+u.slice(1):void 0;if(typeof u=="string"&&u[0]==='"'&&!(e instanceof Ou))return`"${e}${u.slice(1)}`}function o9(e,u){return u.emptyStr()?e:e.emptyStr()?u:B3`${e}${u}`}le.strConcat=o9;function a9(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:Fn(Array.isArray(e)?e.join(","):e)}function D9(e){return new gt(Fn(e))}le.stringify=D9;function Fn(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}le.safeStringify=Fn;function s9(e){return typeof e=="string"&&le.IDENTIFIER.test(e)?new gt(`.${e}`):v3`[${e}]`}le.getProperty=s9;function l9(e){if(typeof e=="string"&&le.IDENTIFIER.test(e))return new gt(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}le.getEsmExportName=l9;function d9(e){return new gt(e.toString())}le.regexpCode=d9});var Ro=F(at=>{"use strict";Object.defineProperty(at,"__esModule",{value:!0});at.ValueScope=at.ValueScopeName=at.Scope=at.varKinds=at.UsedValueState=void 0;var ot=Cn(),qo=class extends Error{constructor(u){super(`CodeGen: "code" for ${u} not defined`),this.value=u.value}},Nf=function(e){return e[e.Started=0]="Started",e[e.Completed=1]="Completed",e}(Nf||(at.UsedValueState=Nf={}));at.varKinds={const:new ot.Name("const"),let:new ot.Name("let"),var:new ot.Name("var")};var qf=class{constructor({prefixes:u,parent:t}={}){this._names={},this._prefixes=u,this._parent=t}toName(u){return u instanceof ot.Name?u:this.name(u)}name(u){return new ot.Name(this._newName(u))}_newName(u){let t=this._names[u]||this._nameGroup(u);return`${u}${t.index++}`}_nameGroup(u){var t,i;if(!((i=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||i===void 0)&&i.has(u)||this._prefixes&&!this._prefixes.has(u))throw new Error(`CodeGen: prefix "${u}" is not allowed in this scope`);return this._names[u]={prefix:u,index:0}}};at.Scope=qf;var Vf=class extends ot.Name{constructor(u,t){super(t),this.prefix=u}setValue(u,{property:t,itemIndex:i}){this.value=u,this.scopePath=(0,ot._)`.${new ot.Name(t)}[${i}]`}};at.ValueScopeName=Vf;var c9=(0,ot._)`\n`,Vo=class extends qf{constructor(u){super(u),this._values={},this._scope=u.scope,this.opts=Ee(Z({},u),{_n:u.lines?c9:ot.nil})}get(){return this._scope}name(u){return new Vf(u,this._newName(u))}value(u,t){var i;if(t.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let n=this.toName(u),{prefix:f}=n,r=(i=t.key)!==null&&i!==void 0?i:t.ref,o=this._values[f];if(o){let l=o.get(r);if(l)return l}else o=this._values[f]=new Map;o.set(r,n);let a=this._scope[f]||(this._scope[f]=[]),D=a.length;return a[D]=t.ref,n.setValue(t,{property:f,itemIndex:D}),n}getValue(u,t){let i=this._values[u];if(i)return i.get(t)}scopeRefs(u,t=this._values){return this._reduceValues(t,i=>{if(i.scopePath===void 0)throw new Error(`CodeGen: name "${i}" has no value`);return(0,ot._)`${u}${i.scopePath}`})}scopeCode(u=this._values,t,i){return this._reduceValues(u,n=>{if(n.value===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return n.value.code},t,i)}_reduceValues(u,t,i={},n){let f=ot.nil;for(let r in u){let o=u[r];if(!o)continue;let a=i[r]=i[r]||new Map;o.forEach(D=>{if(a.has(D))return;a.set(D,Nf.Started);let l=t(D);if(l){let p=this.opts.es5?at.varKinds.var:at.varKinds.const;f=(0,ot._)`${f}${p} ${D} = ${l};${this.opts._n}`}else if(l=n==null?void 0:n(D))f=(0,ot._)`${f}${l}${this.opts._n}`;else throw new qo(D);a.set(D,Nf.Completed)})}return f}};at.ValueScope=Vo});var ee=F(ue=>{"use strict";Object.defineProperty(ue,"__esModule",{value:!0});ue.or=ue.and=ue.not=ue.CodeGen=ue.operators=ue.varKinds=ue.ValueScopeName=ue.ValueScope=ue.Scope=ue.Name=ue.regexpCode=ue.stringify=ue.getProperty=ue.nil=ue.strConcat=ue.str=ue._=void 0;var ae=Cn(),kt=Ro(),Du=Cn();Object.defineProperty(ue,"_",{enumerable:!0,get:function(){return Du._}});Object.defineProperty(ue,"str",{enumerable:!0,get:function(){return Du.str}});Object.defineProperty(ue,"strConcat",{enumerable:!0,get:function(){return Du.strConcat}});Object.defineProperty(ue,"nil",{enumerable:!0,get:function(){return Du.nil}});Object.defineProperty(ue,"getProperty",{enumerable:!0,get:function(){return Du.getProperty}});Object.defineProperty(ue,"stringify",{enumerable:!0,get:function(){return Du.stringify}});Object.defineProperty(ue,"regexpCode",{enumerable:!0,get:function(){return Du.regexpCode}});Object.defineProperty(ue,"Name",{enumerable:!0,get:function(){return Du.Name}});var Hf=Ro();Object.defineProperty(ue,"Scope",{enumerable:!0,get:function(){return Hf.Scope}});Object.defineProperty(ue,"ValueScope",{enumerable:!0,get:function(){return Hf.ValueScope}});Object.defineProperty(ue,"ValueScopeName",{enumerable:!0,get:function(){return Hf.ValueScopeName}});Object.defineProperty(ue,"varKinds",{enumerable:!0,get:function(){return Hf.varKinds}});ue.operators={GT:new ae._Code(">"),GTE:new ae._Code(">="),LT:new ae._Code("<"),LTE:new ae._Code("<="),EQ:new ae._Code("==="),NEQ:new ae._Code("!=="),NOT:new ae._Code("!"),OR:new ae._Code("||"),AND:new ae._Code("&&"),ADD:new ae._Code("+")};var Jt=class{optimizeNodes(){return this}optimizeNames(u,t){return this}},Lo=class extends Jt{constructor(u,t,i){super(),this.varKind=u,this.name=t,this.rhs=i}render({es5:u,_n:t}){let i=u?kt.varKinds.var:this.varKind,n=this.rhs===void 0?"":` = ${this.rhs}`;return`${i} ${this.name}${n};`+t}optimizeNames(u,t){if(u[this.name.str])return this.rhs&&(this.rhs=Fi(this.rhs,u,t)),this}get names(){return this.rhs instanceof ae._CodeOrName?this.rhs.names:{}}},Lf=class extends Jt{constructor(u,t,i){super(),this.lhs=u,this.rhs=t,this.sideEffects=i}render({_n:u}){return`${this.lhs} = ${this.rhs};`+u}optimizeNames(u,t){if(!(this.lhs instanceof ae.Name&&!u[this.lhs.str]&&!this.sideEffects))return this.rhs=Fi(this.rhs,u,t),this}get names(){let u=this.lhs instanceof ae.Name?{}:Z({},this.lhs.names);return Uf(u,this.rhs)}},zo=class extends Lf{constructor(u,t,i,n){super(u,i,n),this.op=t}render({_n:u}){return`${this.lhs} ${this.op}= ${this.rhs};`+u}},Uo=class extends Jt{constructor(u){super(),this.label=u,this.names={}}render({_n:u}){return`${this.label}:`+u}},Ho=class extends Jt{constructor(u){super(),this.label=u,this.names={}}render({_n:u}){return`break${this.label?` ${this.label}`:""};`+u}},Wo=class extends Jt{constructor(u){super(),this.error=u}render({_n:u}){return`throw ${this.error};`+u}get names(){return this.error.names}},Go=class extends Jt{constructor(u){super(),this.code=u}render({_n:u}){return`${this.code};`+u}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(u,t){return this.code=Fi(this.code,u,t),this}get names(){return this.code instanceof ae._CodeOrName?this.code.names:{}}},gn=class extends Jt{constructor(u=[]){super(),this.nodes=u}render(u){return this.nodes.reduce((t,i)=>t+i.render(u),"")}optimizeNodes(){let{nodes:u}=this,t=u.length;for(;t--;){let i=u[t].optimizeNodes();Array.isArray(i)?u.splice(t,1,...i):i?u[t]=i:u.splice(t,1)}return u.length>0?this:void 0}optimizeNames(u,t){let{nodes:i}=this,n=i.length;for(;n--;){let f=i[n];f.optimizeNames(u,t)||(p9(u,f.names),i.splice(n,1))}return i.length>0?this:void 0}get names(){return this.nodes.reduce((u,t)=>Mu(u,t.names),{})}},Zt=class extends gn{render(u){return"{"+u._n+super.render(u)+"}"+u._n}},Ko=class extends gn{},Jo=(()=>{class e extends Zt{}return e.kind="else",e})(),Rf=(()=>{class e extends Zt{constructor(t,i){super(i),this.condition=t}render(t){let i=`if(${this.condition})`+super.render(t);return this.else&&(i+="else "+this.else.render(t)),i}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let i=this.else;if(i){let n=i.optimizeNodes();i=this.else=Array.isArray(n)?new Jo(n):n}if(i)return t===!1?i instanceof e?i:i.nodes:this.nodes.length?this:new e(S3(t),i instanceof e?[i]:i.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,i){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(t,i),!!(super.optimizeNames(t,i)||this.else))return this.condition=Fi(this.condition,t,i),this}get names(){let t=super.names;return Uf(t,this.condition),this.else&&Mu(t,this.else.names),t}}return e.kind="if",e})(),Wf=(()=>{class e extends Zt{}return e.kind="for",e})(),Zo=class extends Wf{constructor(u){super(),this.iteration=u}render(u){return`for(${this.iteration})`+super.render(u)}optimizeNames(u,t){if(super.optimizeNames(u,t))return this.iteration=Fi(this.iteration,u,t),this}get names(){return Mu(super.names,this.iteration.names)}},Qo=class extends Wf{constructor(u,t,i,n){super(),this.varKind=u,this.name=t,this.from=i,this.to=n}render(u){let t=u.es5?kt.varKinds.var:this.varKind,{name:i,from:n,to:f}=this;return`for(${t} ${i}=${n}; ${i}<${f}; ${i}++)`+super.render(u)}get names(){let u=Uf(super.names,this.from);return Uf(u,this.to)}},zf=class extends Wf{constructor(u,t,i,n){super(),this.loop=u,this.varKind=t,this.name=i,this.iterable=n}render(u){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(u)}optimizeNames(u,t){if(super.optimizeNames(u,t))return this.iterable=Fi(this.iterable,u,t),this}get names(){return Mu(super.names,this.iterable.names)}},x3=(()=>{class e extends Zt{constructor(t,i,n){super(),this.name=t,this.args=i,this.async=n}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}}return e.kind="func",e})(),w3=(()=>{class e extends gn{render(t){return"return "+super.render(t)}}return e.kind="return",e})(),Xo=class extends Zt{render(u){let t="try"+super.render(u);return this.catch&&(t+=this.catch.render(u)),this.finally&&(t+=this.finally.render(u)),t}optimizeNodes(){var u,t;return super.optimizeNodes(),(u=this.catch)===null||u===void 0||u.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(u,t){var i,n;return super.optimizeNames(u,t),(i=this.catch)===null||i===void 0||i.optimizeNames(u,t),(n=this.finally)===null||n===void 0||n.optimizeNames(u,t),this}get names(){let u=super.names;return this.catch&&Mu(u,this.catch.names),this.finally&&Mu(u,this.finally.names),u}},A3=(()=>{class e extends Zt{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}}return e.kind="catch",e})(),I3=(()=>{class e extends Zt{render(t){return"finally"+super.render(t)}}return e.kind="finally",e})(),Yo=class{constructor(u,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts=Ee(Z({},t),{_n:t.lines?`
2
2
  `:""}),this._extScope=u,this._scope=new kt.Scope({parent:u}),this._nodes=[new Ko]}toString(){return this._root.render(this.opts)}name(u){return this._scope.name(u)}scopeName(u){return this._extScope.name(u)}scopeValue(u,t){let i=this._extScope.value(u,t);return(this._values[i.prefix]||(this._values[i.prefix]=new Set)).add(i),i}getScopeValue(u,t){return this._extScope.getValue(u,t)}scopeRefs(u){return this._extScope.scopeRefs(u,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(u,t,i,n){let f=this._scope.toName(t);return i!==void 0&&n&&(this._constants[f.str]=i),this._leafNode(new Lo(u,f,i)),f}const(u,t,i){return this._def(kt.varKinds.const,u,t,i)}let(u,t,i){return this._def(kt.varKinds.let,u,t,i)}var(u,t,i){return this._def(kt.varKinds.var,u,t,i)}assign(u,t,i){return this._leafNode(new Lf(u,t,i))}add(u,t){return this._leafNode(new zo(u,ue.operators.ADD,t))}code(u){return typeof u=="function"?u():u!==ae.nil&&this._leafNode(new Go(u)),this}object(...u){let t=["{"];for(let[i,n]of u)t.length>1&&t.push(","),t.push(i),(i!==n||this.opts.es5)&&(t.push(":"),(0,ae.addCodeArg)(t,n));return t.push("}"),new ae._Code(t)}if(u,t,i){if(this._blockNode(new Rf(u)),t&&i)this.code(t).else().code(i).endIf();else if(t)this.code(t).endIf();else if(i)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(u){return this._elseNode(new Rf(u))}else(){return this._elseNode(new Jo)}endIf(){return this._endBlockNode(Rf,Jo)}_for(u,t){return this._blockNode(u),t&&this.code(t).endFor(),this}for(u,t){return this._for(new Zo(u),t)}forRange(u,t,i,n,f=this.opts.es5?kt.varKinds.var:kt.varKinds.let){let r=this._scope.toName(u);return this._for(new Qo(f,r,t,i),()=>n(r))}forOf(u,t,i,n=kt.varKinds.const){let f=this._scope.toName(u);if(this.opts.es5){let r=t instanceof ae.Name?t:this.var("_arr",t);return this.forRange("_i",0,(0,ae._)`${r}.length`,o=>{this.var(f,(0,ae._)`${r}[${o}]`),i(f)})}return this._for(new zf("of",n,f,t),()=>i(f))}forIn(u,t,i,n=this.opts.es5?kt.varKinds.var:kt.varKinds.const){if(this.opts.ownProperties)return this.forOf(u,(0,ae._)`Object.keys(${t})`,i);let f=this._scope.toName(u);return this._for(new zf("in",n,f,t),()=>i(f))}endFor(){return this._endBlockNode(Wf)}label(u){return this._leafNode(new Uo(u))}break(u){return this._leafNode(new Ho(u))}return(u){let t=new w3;if(this._blockNode(t),this.code(u),t.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(w3)}try(u,t,i){if(!t&&!i)throw new Error('CodeGen: "try" without "catch" and "finally"');let n=new Xo;if(this._blockNode(n),this.code(u),t){let f=this.name("e");this._currNode=n.catch=new A3(f),t(f)}return i&&(this._currNode=n.finally=new I3,this.code(i)),this._endBlockNode(A3,I3)}throw(u){return this._leafNode(new Wo(u))}block(u,t){return this._blockStarts.push(this._nodes.length),u&&this.code(u).endBlock(t),this}endBlock(u){let t=this._blockStarts.pop();if(t===void 0)throw new Error("CodeGen: not in self-balancing block");let i=this._nodes.length-t;if(i<0||u!==void 0&&i!==u)throw new Error(`CodeGen: wrong number of nodes: ${i} vs ${u} expected`);return this._nodes.length=t,this}func(u,t=ae.nil,i,n){return this._blockNode(new x3(u,t,i)),n&&this.code(n).endFunc(),this}endFunc(){return this._endBlockNode(x3)}optimize(u=1){for(;u-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(u){return this._currNode.nodes.push(u),this}_blockNode(u){this._currNode.nodes.push(u),this._nodes.push(u)}_endBlockNode(u,t){let i=this._currNode;if(i instanceof u||t&&i instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${u.kind}/${t.kind}`:u.kind}"`)}_elseNode(u){let t=this._currNode;if(!(t instanceof Rf))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=u,this}get _root(){return this._nodes[0]}get _currNode(){let u=this._nodes;return u[u.length-1]}set _currNode(u){let t=this._nodes;t[t.length-1]=u}};ue.CodeGen=Yo;function Mu(e,u){for(let t in u)e[t]=(e[t]||0)+(u[t]||0);return e}function Uf(e,u){return u instanceof ae._CodeOrName?Mu(e,u.names):e}function Fi(e,u,t){if(e instanceof ae.Name)return i(e);if(!n(e))return e;return new ae._Code(e._items.reduce((f,r)=>(r instanceof ae.Name&&(r=i(r)),r instanceof ae._Code?f.push(...r._items):f.push(r),f),[]));function i(f){let r=t[f.str];return r===void 0||u[f.str]!==1?f:(delete u[f.str],r)}function n(f){return f instanceof ae._Code&&f._items.some(r=>r instanceof ae.Name&&u[r.str]===1&&t[r.str]!==void 0)}}function p9(e,u){for(let t in u)e[t]=(e[t]||0)-(u[t]||0)}function S3(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,ae._)`!${ea(e)}`}ue.not=S3;var m9=$3(ue.operators.AND);function F9(...e){return e.reduce(m9)}ue.and=F9;var C9=$3(ue.operators.OR);function g9(...e){return e.reduce(C9)}ue.or=g9;function $3(e){return(u,t)=>u===ae.nil?t:t===ae.nil?u:(0,ae._)`${ea(u)} ${e} ${ea(t)}`}function ea(e){return e instanceof ae.Name?e:(0,ae._)`(${e})`}});var fe=F(ne=>{"use strict";Object.defineProperty(ne,"__esModule",{value:!0});ne.checkStrictMode=ne.getErrorPath=ne.Type=ne.useFunc=ne.setEvaluated=ne.evaluatedPropsToName=ne.mergeEvaluated=ne.eachItem=ne.unescapeJsonPointer=ne.escapeJsonPointer=ne.escapeFragment=ne.unescapeFragment=ne.schemaRefOrVal=ne.schemaHasRulesButRef=ne.schemaHasRules=ne.checkUnknownRules=ne.alwaysValidSchema=ne.toHash=void 0;var be=ee(),h9=Cn();function E9(e){let u={};for(let t of e)u[t]=!0;return u}ne.toHash=E9;function b9(e,u){return typeof u=="boolean"?u:Object.keys(u).length===0?!0:(P3(e,u),!O3(u,e.self.RULES.all))}ne.alwaysValidSchema=b9;function P3(e,u=e.schema){let{opts:t,self:i}=e;if(!t.strictSchema||typeof u=="boolean")return;let n=i.RULES.keywords;for(let f in u)n[f]||N3(e,`unknown keyword: "${f}"`)}ne.checkUnknownRules=P3;function O3(e,u){if(typeof e=="boolean")return!e;for(let t in e)if(u[t])return!0;return!1}ne.schemaHasRules=O3;function _9(e,u){if(typeof e=="boolean")return!e;for(let t in e)if(t!=="$ref"&&u.all[t])return!0;return!1}ne.schemaHasRulesButRef=_9;function y9({topSchemaRef:e,schemaPath:u},t,i,n){if(!n){if(typeof t=="number"||typeof t=="boolean")return t;if(typeof t=="string")return(0,be._)`${t}`}return(0,be._)`${e}${u}${(0,be.getProperty)(i)}`}ne.schemaRefOrVal=y9;function v9(e){return M3(decodeURIComponent(e))}ne.unescapeFragment=v9;function B9(e){return encodeURIComponent(ua(e))}ne.escapeFragment=B9;function ua(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}ne.escapeJsonPointer=ua;function M3(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}ne.unescapeJsonPointer=M3;function x9(e,u){if(Array.isArray(e))for(let t of e)u(t);else u(e)}ne.eachItem=x9;function k3({mergeNames:e,mergeToName:u,mergeValues:t,resultToName:i}){return(n,f,r,o)=>{let a=r===void 0?f:r instanceof be.Name?(f instanceof be.Name?e(n,f,r):u(n,f,r),r):f instanceof be.Name?(u(n,r,f),f):t(f,r);return o===be.Name&&!(a instanceof be.Name)?i(n,a):a}}ne.mergeEvaluated={props:k3({mergeNames:(e,u,t)=>e.if((0,be._)`${t} !== true && ${u} !== undefined`,()=>{e.if((0,be._)`${u} === true`,()=>e.assign(t,!0),()=>e.assign(t,(0,be._)`${t} || {}`).code((0,be._)`Object.assign(${t}, ${u})`))}),mergeToName:(e,u,t)=>e.if((0,be._)`${t} !== true`,()=>{u===!0?e.assign(t,!0):(e.assign(t,(0,be._)`${t} || {}`),ia(e,t,u))}),mergeValues:(e,u)=>e===!0?!0:Z(Z({},e),u),resultToName:j3}),items:k3({mergeNames:(e,u,t)=>e.if((0,be._)`${t} !== true && ${u} !== undefined`,()=>e.assign(t,(0,be._)`${u} === true ? true : ${t} > ${u} ? ${t} : ${u}`)),mergeToName:(e,u,t)=>e.if((0,be._)`${t} !== true`,()=>e.assign(t,u===!0?!0:(0,be._)`${t} > ${u} ? ${t} : ${u}`)),mergeValues:(e,u)=>e===!0?!0:Math.max(e,u),resultToName:(e,u)=>e.var("items",u)})};function j3(e,u){if(u===!0)return e.var("props",!0);let t=e.var("props",(0,be._)`{}`);return u!==void 0&&ia(e,t,u),t}ne.evaluatedPropsToName=j3;function ia(e,u,t){Object.keys(t).forEach(i=>e.assign((0,be._)`${u}${(0,be.getProperty)(i)}`,!0))}ne.setEvaluated=ia;var T3={};function w9(e,u){return e.scopeValue("func",{ref:u,code:T3[u.code]||(T3[u.code]=new h9._Code(u.code))})}ne.useFunc=w9;var ta=function(e){return e[e.Num=0]="Num",e[e.Str=1]="Str",e}(ta||(ne.Type=ta={}));function A9(e,u,t){if(e instanceof be.Name){let i=u===ta.Num;return t?i?(0,be._)`"[" + ${e} + "]"`:(0,be._)`"['" + ${e} + "']"`:i?(0,be._)`"/" + ${e}`:(0,be._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return t?(0,be.getProperty)(e).toString():"/"+ua(e)}ne.getErrorPath=A9;function N3(e,u,t=e.opts.strictSchema){if(t){if(u=`strict mode: ${u}`,t===!0)throw new Error(u);e.self.logger.warn(u)}}ne.checkStrictMode=N3});var ht=F(na=>{"use strict";Object.defineProperty(na,"__esModule",{value:!0});var Qe=ee(),I9={data:new Qe.Name("data"),valCxt:new Qe.Name("valCxt"),instancePath:new Qe.Name("instancePath"),parentData:new Qe.Name("parentData"),parentDataProperty:new Qe.Name("parentDataProperty"),rootData:new Qe.Name("rootData"),dynamicAnchors:new Qe.Name("dynamicAnchors"),vErrors:new Qe.Name("vErrors"),errors:new Qe.Name("errors"),this:new Qe.Name("this"),self:new Qe.Name("self"),scope:new Qe.Name("scope"),json:new Qe.Name("json"),jsonPos:new Qe.Name("jsonPos"),jsonLen:new Qe.Name("jsonLen"),jsonPart:new Qe.Name("jsonPart")};na.default=I9});var hn=F(Xe=>{"use strict";Object.defineProperty(Xe,"__esModule",{value:!0});Xe.extendErrors=Xe.resetErrorsCount=Xe.reportExtraError=Xe.reportError=Xe.keyword$DataError=Xe.keywordError=void 0;var se=ee(),Gf=fe(),nt=ht();Xe.keywordError={message:({keyword:e})=>(0,se.str)`must pass "${e}" keyword validation`};Xe.keyword$DataError={message:({keyword:e,schemaType:u})=>u?(0,se.str)`"${e}" keyword must be ${u} ($data)`:(0,se.str)`"${e}" keyword is invalid ($data)`};function S9(e,u=Xe.keywordError,t,i){let{it:n}=e,{gen:f,compositeRule:r,allErrors:o}=n,a=R3(e,u,t);(i!=null?i:r||o)?q3(f,a):V3(n,(0,se._)`[${a}]`)}Xe.reportError=S9;function $9(e,u=Xe.keywordError,t){let{it:i}=e,{gen:n,compositeRule:f,allErrors:r}=i,o=R3(e,u,t);q3(n,o),f||r||V3(i,nt.default.vErrors)}Xe.reportExtraError=$9;function k9(e,u){e.assign(nt.default.errors,u),e.if((0,se._)`${nt.default.vErrors} !== null`,()=>e.if(u,()=>e.assign((0,se._)`${nt.default.vErrors}.length`,u),()=>e.assign(nt.default.vErrors,null)))}Xe.resetErrorsCount=k9;function T9({gen:e,keyword:u,schemaValue:t,data:i,errsCount:n,it:f}){if(n===void 0)throw new Error("ajv implementation error");let r=e.name("err");e.forRange("i",n,nt.default.errors,o=>{e.const(r,(0,se._)`${nt.default.vErrors}[${o}]`),e.if((0,se._)`${r}.instancePath === undefined`,()=>e.assign((0,se._)`${r}.instancePath`,(0,se.strConcat)(nt.default.instancePath,f.errorPath))),e.assign((0,se._)`${r}.schemaPath`,(0,se.str)`${f.errSchemaPath}/${u}`),f.opts.verbose&&(e.assign((0,se._)`${r}.schema`,t),e.assign((0,se._)`${r}.data`,i))})}Xe.extendErrors=T9;function q3(e,u){let t=e.const("err",u);e.if((0,se._)`${nt.default.vErrors} === null`,()=>e.assign(nt.default.vErrors,(0,se._)`[${t}]`),(0,se._)`${nt.default.vErrors}.push(${t})`),e.code((0,se._)`${nt.default.errors}++`)}function V3(e,u){let{gen:t,validateName:i,schemaEnv:n}=e;n.$async?t.throw((0,se._)`new ${e.ValidationError}(${u})`):(t.assign((0,se._)`${i}.errors`,u),t.return(!1))}var ju={keyword:new se.Name("keyword"),schemaPath:new se.Name("schemaPath"),params:new se.Name("params"),propertyName:new se.Name("propertyName"),message:new se.Name("message"),schema:new se.Name("schema"),parentSchema:new se.Name("parentSchema")};function R3(e,u,t){let{createErrors:i}=e.it;return i===!1?(0,se._)`{}`:P9(e,u,t)}function P9(e,u,t={}){let{gen:i,it:n}=e,f=[O9(n,t),M9(e,t)];return j9(e,u,f),i.object(...f)}function O9({errorPath:e},{instancePath:u}){let t=u?(0,se.str)`${e}${(0,Gf.getErrorPath)(u,Gf.Type.Str)}`:e;return[nt.default.instancePath,(0,se.strConcat)(nt.default.instancePath,t)]}function M9({keyword:e,it:{errSchemaPath:u}},{schemaPath:t,parentSchema:i}){let n=i?u:(0,se.str)`${u}/${e}`;return t&&(n=(0,se.str)`${n}${(0,Gf.getErrorPath)(t,Gf.Type.Str)}`),[ju.schemaPath,n]}function j9(e,{params:u,message:t},i){let{keyword:n,data:f,schemaValue:r,it:o}=e,{opts:a,propertyName:D,topSchemaRef:l,schemaPath:p}=o;i.push([ju.keyword,n],[ju.params,typeof u=="function"?u(e):u||(0,se._)`{}`]),a.messages&&i.push([ju.message,typeof t=="function"?t(e):t]),a.verbose&&i.push([ju.schema,r],[ju.parentSchema,(0,se._)`${l}${p}`],[nt.default.data,f]),D&&i.push([ju.propertyName,D])}});var z3=F(Ci=>{"use strict";Object.defineProperty(Ci,"__esModule",{value:!0});Ci.boolOrEmptySchema=Ci.topBoolOrEmptySchema=void 0;var N9=hn(),q9=ee(),V9=ht(),R9={message:"boolean schema is false"};function L9(e){let{gen:u,schema:t,validateName:i}=e;t===!1?L3(e,!1):typeof t=="object"&&t.$async===!0?u.return(V9.default.data):(u.assign((0,q9._)`${i}.errors`,null),u.return(!0))}Ci.topBoolOrEmptySchema=L9;function z9(e,u){let{gen:t,schema:i}=e;i===!1?(t.var(u,!1),L3(e)):t.var(u,!0)}Ci.boolOrEmptySchema=z9;function L3(e,u){let{gen:t,data:i}=e,n={gen:t,keyword:"false schema",data:i,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,N9.reportError)(n,R9,void 0,u)}});var fa=F(gi=>{"use strict";Object.defineProperty(gi,"__esModule",{value:!0});gi.getRules=gi.isJSONType=void 0;var U9=["string","number","integer","boolean","null","object","array"],H9=new Set(U9);function W9(e){return typeof e=="string"&&H9.has(e)}gi.isJSONType=W9;function G9(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:Ee(Z({},e),{integer:!0,boolean:!0,null:!0}),rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}gi.getRules=G9});var ra=F(su=>{"use strict";Object.defineProperty(su,"__esModule",{value:!0});su.shouldUseRule=su.shouldUseGroup=su.schemaHasRulesForType=void 0;function K9({schema:e,self:u},t){let i=u.RULES.types[t];return i&&i!==!0&&U3(e,i)}su.schemaHasRulesForType=K9;function U3(e,u){return u.rules.some(t=>H3(e,t))}su.shouldUseGroup=U3;function H3(e,u){var t;return e[u.keyword]!==void 0||((t=u.definition.implements)===null||t===void 0?void 0:t.some(i=>e[i]!==void 0))}su.shouldUseRule=H3});var En=F(Ye=>{"use strict";Object.defineProperty(Ye,"__esModule",{value:!0});Ye.reportTypeError=Ye.checkDataTypes=Ye.checkDataType=Ye.coerceAndCheckDataType=Ye.getJSONTypes=Ye.getSchemaTypes=Ye.DataType=void 0;var J9=fa(),Z9=ra(),Q9=hn(),te=ee(),W3=fe(),hi=function(e){return e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong",e}(hi||(Ye.DataType=hi={}));function X9(e){let u=G3(e.type);if(u.includes("null")){if(e.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!u.length&&e.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');e.nullable===!0&&u.push("null")}return u}Ye.getSchemaTypes=X9;function G3(e){let u=Array.isArray(e)?e:e?[e]:[];if(u.every(J9.isJSONType))return u;throw new Error("type must be JSONType or JSONType[]: "+u.join(","))}Ye.getJSONTypes=G3;function Y9(e,u){let{gen:t,data:i,opts:n}=e,f=ey(u,n.coerceTypes),r=u.length>0&&!(f.length===0&&u.length===1&&(0,Z9.schemaHasRulesForType)(e,u[0]));if(r){let o=aa(u,i,n.strictNumbers,hi.Wrong);t.if(o,()=>{f.length?ty(e,u,f):Da(e)})}return r}Ye.coerceAndCheckDataType=Y9;var K3=new Set(["string","number","integer","boolean","null"]);function ey(e,u){return u?e.filter(t=>K3.has(t)||u==="array"&&t==="array"):[]}function ty(e,u,t){let{gen:i,data:n,opts:f}=e,r=i.let("dataType",(0,te._)`typeof ${n}`),o=i.let("coerced",(0,te._)`undefined`);f.coerceTypes==="array"&&i.if((0,te._)`${r} == 'object' && Array.isArray(${n}) && ${n}.length == 1`,()=>i.assign(n,(0,te._)`${n}[0]`).assign(r,(0,te._)`typeof ${n}`).if(aa(u,n,f.strictNumbers),()=>i.assign(o,n))),i.if((0,te._)`${o} !== undefined`);for(let D of t)(K3.has(D)||D==="array"&&f.coerceTypes==="array")&&a(D);i.else(),Da(e),i.endIf(),i.if((0,te._)`${o} !== undefined`,()=>{i.assign(n,o),uy(e,o)});function a(D){switch(D){case"string":i.elseIf((0,te._)`${r} == "number" || ${r} == "boolean"`).assign(o,(0,te._)`"" + ${n}`).elseIf((0,te._)`${n} === null`).assign(o,(0,te._)`""`);return;case"number":i.elseIf((0,te._)`${r} == "boolean" || ${n} === null
3
3
  || (${r} == "string" && ${n} && ${n} == +${n})`).assign(o,(0,te._)`+${n}`);return;case"integer":i.elseIf((0,te._)`${r} === "boolean" || ${n} === null
4
4
  || (${r} === "string" && ${n} && ${n} == +${n} && !(${n} % 1))`).assign(o,(0,te._)`+${n}`);return;case"boolean":i.elseIf((0,te._)`${n} === "false" || ${n} === 0 || ${n} === null`).assign(o,!1).elseIf((0,te._)`${n} === "true" || ${n} === 1`).assign(o,!0);return;case"null":i.elseIf((0,te._)`${n} === "" || ${n} === 0 || ${n} === false`),i.assign(o,null);return;case"array":i.elseIf((0,te._)`${r} === "string" || ${r} === "number"