dealpos 12.37.0 → 12.37.1

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 (158) hide show
  1. package/POS/{chunk-IPHNLQTI.js → chunk-254TLB32.js} +1 -1
  2. package/POS/{chunk-FYWV3E6R.js → chunk-2HAHWZUK.js} +1 -1
  3. package/POS/{chunk-AEX3LRUK.js → chunk-2SKFQGDJ.js} +1 -1
  4. package/POS/{chunk-ESFATXPG.js → chunk-3RC6HWSR.js} +1 -1
  5. package/POS/{chunk-H6ZLSW2P.js → chunk-42P7XUOZ.js} +1 -1
  6. package/POS/{chunk-TOAUMIEF.js → chunk-4AUH2CAA.js} +2 -2
  7. package/POS/{chunk-W6IWPP6U.js → chunk-4DSN3OHD.js} +1 -1
  8. package/POS/{chunk-O6XXAKG6.js → chunk-4E4L4BYE.js} +1 -1
  9. package/POS/{chunk-C5L6MBEO.js → chunk-4K4PKVF2.js} +1 -1
  10. package/POS/{chunk-O542BLMN.js → chunk-4PKI44A7.js} +1 -1
  11. package/POS/{chunk-VKJAVONV.js → chunk-5CTIEBSO.js} +1 -1
  12. package/POS/{chunk-X7LHTHQE.js → chunk-5RNWICK6.js} +1 -1
  13. package/POS/{chunk-YCW4CASE.js → chunk-6ERQK3YW.js} +1 -1
  14. package/POS/{chunk-3HB37CSF.js → chunk-6FUF7NVJ.js} +1 -1
  15. package/POS/{chunk-HSYNAGTS.js → chunk-6REX7LGV.js} +1 -1
  16. package/POS/{chunk-7ABDJMQF.js → chunk-6UGXHX65.js} +1 -1
  17. package/POS/{chunk-NTXWELE7.js → chunk-6ZRFZB57.js} +1 -1
  18. package/POS/{chunk-DO52UPWS.js → chunk-723NVWF7.js} +1 -1
  19. package/POS/{chunk-LWU5XJWF.js → chunk-74QMRDRB.js} +7 -7
  20. package/POS/{chunk-DM65JGAI.js → chunk-7F6OSVND.js} +1 -1
  21. package/POS/{chunk-T7IC72HN.js → chunk-7JGNCIGN.js} +1 -1
  22. package/POS/{chunk-G3YNQGX2.js → chunk-7ODUNOII.js} +1 -1
  23. package/POS/{chunk-AI2TTQCJ.js → chunk-7OFYIYIJ.js} +1 -1
  24. package/POS/{chunk-HVPRTCHX.js → chunk-ABOTKSUZ.js} +1 -1
  25. package/POS/{chunk-I4FBCCCH.js → chunk-AFQTFAJ5.js} +1 -1
  26. package/POS/{chunk-Q4QRLKLZ.js → chunk-AHRE3E7K.js} +1 -1
  27. package/POS/{chunk-E2M4KINA.js → chunk-AQJRACUA.js} +1 -1
  28. package/POS/{chunk-6QTIECU7.js → chunk-AY3F3KFJ.js} +1 -1
  29. package/POS/{chunk-3SIZOIOL.js → chunk-B2HEMBWZ.js} +1 -1
  30. package/POS/{chunk-SC6JSH7B.js → chunk-B6XQS33G.js} +1 -1
  31. package/POS/{chunk-PMZOKRRC.js → chunk-BVP7WCGB.js} +1 -1
  32. package/POS/{chunk-KDAJOTVE.js → chunk-CCFSMPZO.js} +1 -1
  33. package/POS/{chunk-RN76LV73.js → chunk-CG7U3THT.js} +1 -1
  34. package/POS/{chunk-TST6WMQR.js → chunk-CJ7XXGTF.js} +1 -1
  35. package/POS/{chunk-7F3YAWV2.js → chunk-CNYBL4AY.js} +1 -1
  36. package/POS/{chunk-JRPRJ3GE.js → chunk-D3JCQLSD.js} +1 -1
  37. package/POS/{chunk-V2LLKAPI.js → chunk-D6LPQT5Y.js} +1 -1
  38. package/POS/{chunk-EFC3O7UZ.js → chunk-D6SYMVH5.js} +1 -1
  39. package/POS/{chunk-46ETAKI4.js → chunk-DBYHFAP2.js} +1 -1
  40. package/POS/{chunk-5HANZPHE.js → chunk-DNJ3T2FT.js} +1 -1
  41. package/POS/{chunk-NDXWMLZI.js → chunk-E7OBBBE2.js} +1 -1
  42. package/POS/{chunk-7GMX4FYK.js → chunk-F3VOPQGO.js} +1 -1
  43. package/POS/{chunk-TYPFB26Y.js → chunk-FGPD4DA2.js} +1 -1
  44. package/POS/{chunk-XY3IVNOF.js → chunk-FSVFZHL2.js} +1 -1
  45. package/POS/{chunk-CO6PY4HR.js → chunk-FZDCUJPE.js} +1 -1
  46. package/POS/{chunk-PCVHY6VX.js → chunk-G3PPGYW2.js} +1 -1
  47. package/POS/{chunk-FM4XB74R.js → chunk-GEDNVL77.js} +1 -1
  48. package/POS/{chunk-B6WJ4IY6.js → chunk-GGEGOORE.js} +1 -1
  49. package/POS/{chunk-REC76O4N.js → chunk-GHZWBJJO.js} +1 -1
  50. package/POS/{chunk-UIXWZ3VD.js → chunk-GXWDPDLH.js} +1 -1
  51. package/POS/{chunk-EVS35OPX.js → chunk-H6QEJTAA.js} +1 -1
  52. package/POS/{chunk-5CF2AHIK.js → chunk-HDRAB5EU.js} +1 -1
  53. package/POS/{chunk-OYEUMTMK.js → chunk-HEQFPV3L.js} +1 -1
  54. package/POS/{chunk-A2IDDPOE.js → chunk-HHGS6NGA.js} +1 -1
  55. package/POS/{chunk-3WS6HTDG.js → chunk-HLLRMVDJ.js} +1 -1
  56. package/POS/{chunk-ASI4TZ7H.js → chunk-HZZBYBQQ.js} +1 -1
  57. package/POS/{chunk-EY54NEBE.js → chunk-I57JYDVC.js} +1 -1
  58. package/POS/{chunk-O75IHYMH.js → chunk-IDL3RJQ5.js} +1 -1
  59. package/POS/{chunk-L4N4HXQE.js → chunk-IVC5E63U.js} +1 -1
  60. package/POS/{chunk-EPFOZNUO.js → chunk-IWKCHIZO.js} +1 -1
  61. package/POS/{chunk-FUFHSH3V.js → chunk-IZVYN26R.js} +1 -1
  62. package/POS/{chunk-ACH6SMFA.js → chunk-J63LVJOX.js} +1 -1
  63. package/POS/{chunk-7DOOXUK4.js → chunk-JNPEGXND.js} +1 -1
  64. package/POS/{chunk-RDCDNIF4.js → chunk-JOL3XP3R.js} +1 -1
  65. package/POS/{chunk-RCUVGODA.js → chunk-K2J3MXWV.js} +1 -1
  66. package/POS/{chunk-3DH2QALN.js → chunk-KAWUWAZN.js} +1 -1
  67. package/POS/{chunk-5UPZN3X3.js → chunk-KFWSK6MU.js} +1 -1
  68. package/POS/{chunk-WU4VDBAC.js → chunk-KKWNTLKT.js} +1 -1
  69. package/POS/{chunk-HKQ5PVI5.js → chunk-KS2JI6S4.js} +1 -1
  70. package/POS/{chunk-T255I4KV.js → chunk-KV4CERHH.js} +1 -1
  71. package/POS/{chunk-3GTEMSAF.js → chunk-L5W4WVTO.js} +1 -1
  72. package/POS/{chunk-JXBSZRYA.js → chunk-LEYX5ZR3.js} +1 -1
  73. package/POS/{chunk-5QX2TZOA.js → chunk-LMXO4HWS.js} +1 -1
  74. package/POS/{chunk-NNDS7TWM.js → chunk-LRPILBWO.js} +1 -1
  75. package/POS/{chunk-2QX72K5S.js → chunk-LXEVT7DN.js} +1 -1
  76. package/POS/{chunk-7YGPZFAI.js → chunk-M243ZCB6.js} +1 -1
  77. package/POS/{chunk-MNBW4OTC.js → chunk-M446YU65.js} +2 -2
  78. package/POS/{chunk-MEVITOYT.js → chunk-ME4E23DW.js} +1 -1
  79. package/POS/{chunk-YCVKS6ME.js → chunk-MEGILWJQ.js} +1 -1
  80. package/POS/{chunk-OW56E2OD.js → chunk-MK43YA4I.js} +1 -1
  81. package/POS/{chunk-5PF5W7XL.js → chunk-MO7CUQCT.js} +1 -1
  82. package/POS/{chunk-TYIQW4BU.js → chunk-MYWVX25Z.js} +1 -1
  83. package/POS/{chunk-R6C4CCC2.js → chunk-N5L5SLBA.js} +1 -1
  84. package/POS/{chunk-5ATL3NII.js → chunk-NB7JPHN5.js} +1 -1
  85. package/POS/{chunk-MBB3Q2RR.js → chunk-NF75HGOK.js} +1 -1
  86. package/POS/{chunk-3F2QNRLN.js → chunk-NNMLF6KH.js} +1 -1
  87. package/POS/{chunk-5AC6EQWC.js → chunk-NRRKPZBZ.js} +1 -1
  88. package/POS/{chunk-KQNSEHSI.js → chunk-OAMSESC3.js} +1 -1
  89. package/POS/{chunk-L27A4ROD.js → chunk-OD3UQZ4H.js} +1 -1
  90. package/POS/{chunk-AWLFBCTZ.js → chunk-OE36X5FL.js} +1 -1
  91. package/POS/{chunk-PRKMZKKL.js → chunk-OMGBVJPS.js} +1 -1
  92. package/POS/{chunk-KL7GYFRM.js → chunk-OSAEQ77R.js} +1 -1
  93. package/POS/{chunk-2OGDMBJS.js → chunk-OZ6NAII5.js} +2 -2
  94. package/POS/{chunk-PQWHRVHX.js → chunk-P7HWTUUJ.js} +1 -1
  95. package/POS/{chunk-ZXNOJDJP.js → chunk-PGN22ING.js} +1 -1
  96. package/POS/{chunk-MTFUZ2Y2.js → chunk-PMBSXRBT.js} +1 -1
  97. package/POS/{chunk-JG3VDJZ6.js → chunk-POFVU2DG.js} +1 -1
  98. package/POS/{chunk-7OYQGJ4V.js → chunk-PV24ZCA6.js} +1 -1
  99. package/POS/{chunk-BFX5WPOW.js → chunk-QCTZXCTQ.js} +1 -1
  100. package/POS/{chunk-U4UWGFVM.js → chunk-QF6AHF3G.js} +1 -1
  101. package/POS/{chunk-YZTVOCWB.js → chunk-QFI4FNJB.js} +1 -1
  102. package/POS/{chunk-2TO5XGQ5.js → chunk-QJ2RNC6O.js} +1 -1
  103. package/POS/{chunk-3B3O2OLH.js → chunk-QUYI2EUF.js} +1 -1
  104. package/POS/{chunk-SFOGCZMU.js → chunk-RCRZPXQK.js} +1 -1
  105. package/POS/{chunk-ANZVH7HM.js → chunk-RJAH2APU.js} +1 -1
  106. package/POS/{chunk-DIBWVTFH.js → chunk-RXJQ6UM4.js} +1 -1
  107. package/POS/{chunk-JUQ4PDE4.js → chunk-SDGW5UZU.js} +1 -1
  108. package/POS/{chunk-7VSWV6ST.js → chunk-SEP4VKPA.js} +1 -1
  109. package/POS/{chunk-5LWRDAT6.js → chunk-SUXJIR2P.js} +1 -1
  110. package/POS/{chunk-GERV4W4Y.js → chunk-T6OA5PFU.js} +1 -1
  111. package/POS/{chunk-DC2BDPGS.js → chunk-T7DC4TXB.js} +1 -1
  112. package/POS/{chunk-GOKRYDTY.js → chunk-TF4R5OWW.js} +1 -1
  113. package/POS/{chunk-PNN3YLEU.js → chunk-TOJKY4RS.js} +1 -1
  114. package/POS/{chunk-G6AV3USL.js → chunk-TWUCBCUW.js} +1 -1
  115. package/POS/chunk-U2T54SAP.js +1 -0
  116. package/POS/{chunk-MSONPV7X.js → chunk-U3GCRJXQ.js} +1 -1
  117. package/POS/{chunk-SKFGJGGW.js → chunk-UE6CIXFL.js} +1 -1
  118. package/POS/{chunk-TEIDQ6BG.js → chunk-UHAG2N7Q.js} +1 -1
  119. package/POS/{chunk-WNULF2FR.js → chunk-UHVUYJ55.js} +1 -1
  120. package/POS/{chunk-WE5H2M6N.js → chunk-ULTU5TT6.js} +1 -1
  121. package/POS/{chunk-YOXHYDLU.js → chunk-US6NNYTD.js} +1 -1
  122. package/POS/{chunk-BQKA7OR2.js → chunk-V5SOD7I3.js} +1 -1
  123. package/POS/{chunk-FCKZTBMC.js → chunk-VDEX7TBF.js} +1 -1
  124. package/POS/{chunk-HWUG6W6Y.js → chunk-VJY7TSUX.js} +1 -1
  125. package/POS/{chunk-VILHYV7H.js → chunk-VRSNWZZX.js} +1 -1
  126. package/POS/{chunk-B6OQCYWY.js → chunk-VWPSJO4Q.js} +1 -1
  127. package/POS/{chunk-P6ZYAKEN.js → chunk-W6R7TAOR.js} +1 -1
  128. package/POS/{chunk-E427ROV6.js → chunk-W7PKHUOR.js} +1 -1
  129. package/POS/{chunk-EECR6UMH.js → chunk-WCQNKPUM.js} +1 -1
  130. package/POS/{chunk-UWQDPRYY.js → chunk-WGKJ56K4.js} +1 -1
  131. package/POS/chunk-WPWPDQZQ.js +1 -0
  132. package/POS/{chunk-FPAH5MUG.js → chunk-WQDKYQRK.js} +1 -1
  133. package/POS/{chunk-7GF6KVAD.js → chunk-X2EKGW6B.js} +1 -1
  134. package/POS/{chunk-BQJVJ3HL.js → chunk-X3BVOOLS.js} +1 -1
  135. package/POS/{chunk-H7B62KZB.js → chunk-X7L7VNC7.js} +1 -1
  136. package/POS/{chunk-N26ORLZQ.js → chunk-XGCIX4CM.js} +1 -1
  137. package/POS/{chunk-OWU23WA4.js → chunk-XHGU4DVY.js} +1 -1
  138. package/POS/{chunk-TQFKVWGY.js → chunk-XLULAMI5.js} +1 -1
  139. package/POS/{chunk-LIBTMAJH.js → chunk-XQ4IVQRF.js} +1 -1
  140. package/POS/{chunk-CA3CUEGK.js → chunk-XXSNI5BL.js} +1 -1
  141. package/POS/{chunk-L2NHSF44.js → chunk-XZRZIH2H.js} +1 -1
  142. package/POS/{chunk-DZMKHI7I.js → chunk-Y76H5UYH.js} +1 -1
  143. package/POS/{chunk-XAGSCNNF.js → chunk-YNM6G4HX.js} +1 -1
  144. package/POS/{chunk-RQHEEYID.js → chunk-YOQ6KBHK.js} +1 -1
  145. package/POS/{chunk-N4JORXPR.js → chunk-YRD2GG7I.js} +1 -1
  146. package/POS/{chunk-5ZFWHOAV.js → chunk-YRKS2ENA.js} +1 -1
  147. package/POS/{chunk-4K3EJCB4.js → chunk-Z55KM6KT.js} +1 -1
  148. package/POS/chunk-ZH24HBI7.js +1 -0
  149. package/POS/{chunk-IRWU2NUW.js → chunk-ZIHTBTN2.js} +1 -1
  150. package/POS/{chunk-Z45NJ6K7.js → chunk-ZNJODYNM.js} +1 -1
  151. package/POS/chunk-ZZB5C4D5.js +3 -0
  152. package/POS/index.html +2 -2
  153. package/POS/{main-DOKGWKNF.js → main-EFKRMQEL.js} +2 -2
  154. package/package.json +1 -1
  155. package/POS/chunk-BMWHBQ2Z.js +0 -1
  156. package/POS/chunk-CGX3EGHQ.js +0 -3
  157. package/POS/chunk-N2XAJKK5.js +0 -1
  158. package/POS/chunk-VOFZHPXG.js +0 -1
@@ -1 +1 @@
1
- import{a as X}from"./chunk-SC6JSH7B.js";import{r as U}from"./chunk-TEIDQ6BG.js";import{b as H}from"./chunk-KQNSEHSI.js";import{a as q,b as A}from"./chunk-MTFUZ2Y2.js";import{b as G}from"./chunk-L27A4ROD.js";import{a as K}from"./chunk-MSONPV7X.js";import{b as J}from"./chunk-3DH2QALN.js";import{b as z}from"./chunk-RN76LV73.js";import{f as Q}from"./chunk-JRPRJ3GE.js";import{h as O,n as N}from"./chunk-3GTEMSAF.js";import{b as j}from"./chunk-VILHYV7H.js";import{$b as S,Cb as C,Dd as M,Eb as m,Gd as k,Kc as R,Lc as W,Ld as P,Od as B,Pa as l,Qa as x,Sc as V,Tb as p,Ub as v,Vb as F,Zb as _,_b as u,cb as T,eb as y,fc as E,gb as c,ic as I,kc as f,ma as w,mc as D,qc as b,ta as s,tb as a,ua as d,ub as r,vb as L,zb as h}from"./chunk-UIXWZ3VD.js";var $=(o,g,e,n,t,i)=>({LogisticServiceID:o,EntityID:g,From:e,To:n,StartTime:t,EndTime:i}),ee=(o,g,e)=>({From:o,To:g,LogisticsServiceID:e});function te(o,g){if(o&1){let e=h();a(0,"button",14),C("click",function(){s(e);let t=m(2);return d(t.openExportModal())}),L(1,"i",15),p(2," Export "),r()}}function ie(o,g){if(o&1){let e=h();a(0,"div",16)(1,"h6"),p(2,"Outlet"),r(),a(3,"outlet-selector",17),S("ngModelChange",function(t){s(e);let i=m(2);return u(i.pageData.Filter.EntityID,t)||(i.pageData.Filter.EntityID=t),d(t)}),r(),a(4,"h6"),p(5,"From"),r(),a(6,"datepicker",18),S("dateChange",function(t){s(e);let i=m(2);return u(i.pageData.Filter.From,t)||(i.pageData.Filter.From=t),d(t)}),r(),a(7,"h6"),p(8,"To"),r(),a(9,"datepicker",19),S("dateChange",function(t){s(e);let i=m(2);return u(i.pageData.Filter.To,t)||(i.pageData.Filter.To=t),d(t)}),r(),a(10,"h6"),p(11,"Time"),r(),a(12,"div",20)(13,"div",21)(14,"app-timepicker",22),S("timeChange",function(t){s(e);let i=m(2);return u(i.pageData.Filter.StartTime,t)||(i.pageData.Filter.StartTime=t),d(t)}),r()(),a(15,"div",21)(16,"app-timepicker",22),S("timeChange",function(t){s(e);let i=m(2);return u(i.pageData.Filter.EndTime,t)||(i.pageData.Filter.EndTime=t),d(t)}),r()()()()}if(o&2){let e=m(2);l(3),c("accessType",2),_("ngModel",e.pageData.Filter.EntityID),c("outlets",e.pageData.Options==null?null:e.pageData.Options.Entities),l(3),_("date",e.pageData.Filter.From),l(3),_("date",e.pageData.Filter.To),l(5),c("fullWidth",!0),_("time",e.pageData.Filter.StartTime),l(2),c("fullWidth",!0),_("time",e.pageData.Filter.EndTime)}}function ae(o,g){if(o&1&&(a(0,"tr")(1,"td"),p(2),r(),a(3,"td"),p(4),r(),a(5,"td",23)(6,"a",24),f(7,"date"),f(8,"date"),p(9),r()(),a(10,"td",23)(11,"a",25),f(12,"date"),f(13,"date"),p(14),r()(),a(15,"td",23),p(16),r()()),o&2){let e=g.$implicit,n=g.index,t=m(2);l(2),v(n+1),l(2),v(e.Name),l(2),c("queryParams",I(19,$,e.ID,t.pageData.Filter.EntityID,D(7,7,t.pageData.Filter.From,"yyyy-MM-dd"),D(8,10,t.pageData.Filter.To,"yyyy-MM-dd"),t.pageData.Filter.StartTime,t.pageData.Filter.EndTime)),l(3),F(" ",e.Trans," "),l(2),c("queryParams",E(26,ee,D(12,13,t.pageData.Filter.From,"yyyy-MM-dd"),D(13,16,t.pageData.Filter.To,"yyyy-MM-dd"),e.ID)),l(3),F(" ",e.Qty," "),l(2),v(e.Weight)}}function ne(o,g){if(o&1){let e=h();a(0,"mainpanel-cmp",2),S("textChange",function(t){s(e);let i=m();return u(i.pageData.Filter.Name,t)||(i.pageData.Filter.Name=t),d(t)}),C("onSubmit",function(){s(e);let t=m();return d(t.searchFromPageOne())}),S("filterChange",function(t){s(e);let i=m();return u(i.pageData.Filter,t)||(i.pageData.Filter=t),d(t)}),a(1,"actions"),y(2,te,3,0,"button",3),a(3,"a",4),p(4," View Detail "),r()(),a(5,"filters"),y(6,ie,17,9,"ng-template",null,0,b),r(),a(8,"content")(9,"div",5)(10,"table",6),C("matSortChange",function(t){s(e);let i=m();return d(i.sortData(t))}),a(11,"thead",7)(12,"tr")(13,"th",8),p(14,"No"),r(),a(15,"th"),p(16,"Logistics Service Name"),r(),a(17,"th",9),p(18,"Trans"),r(),a(19,"th",10),p(20,"Qty"),r(),a(21,"th",11),p(22,"Weight "),a(23,"small",12),p(24,"(gram)"),r()()()(),a(25,"tbody"),y(26,ae,17,30,"tr",13),r()()()()()}if(o&2){let e=m();c("pageData",e.menuData),_("text",e.pageData.Filter.Name),c("isFilterOnDropdown",!1),_("filter",e.pageData.Filter),l(2),c("ngIf",e.roleService.global.Export),l(24),c("ngForOf",e.data.Data)}}var he=(()=>{class o extends G{matDialog;roleService;originalData=[];constructor(e,n,t,i,Y,Z){super(e,n,"Report/GetLogisticsService","ReportLoader/GetLogisticsService",t,i),this.matDialog=Y,this.roleService=Z}postInit(e){this.originalData=e.Data}sortData(e){let n=this.data.Data.slice();if(!e.active||e.direction===""){this.data.Data=this.originalData;return}this.data.Data=n.sort((t,i)=>this.compare(t[e.active],i[e.active],e.direction==="asc"))}openExportModal(){this.matDialog.open(H,{data:{title:"Logistic Service",exportTypes:[{ID:"ReportExport/LogisticService",Value:"Default",FileName:"Logistics Service"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"",pagination:!1}})}onChangeTime(e,n){let t=e.toTimeString().split(" ")[0].slice(0,5);this.pageData.Filter[n]=t}static \u0275fac=function(n){return new(n||o)(x(z),x(B),x(P),x(M),x(Q),x(j))};static \u0275cmp=w({type:o,selectors:[["POS-logistics-service-report"]],features:[T],decls:1,vars:1,consts:[["pageFilterTemplate",""],[3,"pageData","text","isFilterOnDropdown","filter","textChange","onSubmit","filterChange",4,"ngIf"],[3,"textChange","onSubmit","filterChange","pageData","text","isFilterOnDropdown","filter"],["class","btn btn-outline-secondary me-3",3,"click",4,"ngIf"],["routerLink","/menu/Logistics/Report/Outbound/Logistics_Service/Detail",1,"btn","btn-outline-secondary"],[1,"container-fluid","mt-5"],["id","tableGrid","matSort","",1,"table",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],[2,"width","50px"],["mat-sort-header","Trans",1,"align-right"],["mat-sort-header","Qty",1,"align-right"],["mat-sort-header","Weight",1,"align-right",2,"width","180px"],[1,"fst-italic","text-dark"],[4,"ngFor","ngForOf"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"dialog-filter"],["appendTo","body","bindLabel","Name","bindValue","ID","placeholder","Choose an outlet",3,"ngModelChange","accessType","ngModel","outlets"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"row"],[1,"col-6"],[3,"timeChange","fullWidth","time"],[1,"text-end"],["routerLink","/menu/Logistics/Report/Outbound/Logistics_Service/Detail",3,"queryParams"],["routerLink","/menu/Reports/Sales_Report/Standard/Products_Sold",3,"queryParams"]],template:function(n,t){n&1&&y(0,ne,27,6,"mainpanel-cmp",1),n&2&&c("ngIf",t.data)},dependencies:[R,W,k,O,N,J,U,q,A,X,K,V]})}return o})();export{he as a};
1
+ import{a as X}from"./chunk-B6XQS33G.js";import{r as U}from"./chunk-UHAG2N7Q.js";import{b as H}from"./chunk-OAMSESC3.js";import{a as q,b as A}from"./chunk-PMBSXRBT.js";import{b as G}from"./chunk-OD3UQZ4H.js";import{a as K}from"./chunk-U3GCRJXQ.js";import{b as J}from"./chunk-KAWUWAZN.js";import{b as z}from"./chunk-CG7U3THT.js";import{f as Q}from"./chunk-D3JCQLSD.js";import{h as O,n as N}from"./chunk-L5W4WVTO.js";import{b as j}from"./chunk-VRSNWZZX.js";import{$b as S,Cb as C,Dd as M,Eb as m,Gd as k,Kc as R,Lc as W,Ld as P,Od as B,Pa as l,Qa as x,Sc as V,Tb as p,Ub as v,Vb as F,Zb as _,_b as u,cb as T,eb as y,fc as E,gb as c,ic as I,kc as f,ma as w,mc as D,qc as b,ta as s,tb as a,ua as d,ub as r,vb as L,zb as h}from"./chunk-GXWDPDLH.js";var $=(o,g,e,n,t,i)=>({LogisticServiceID:o,EntityID:g,From:e,To:n,StartTime:t,EndTime:i}),ee=(o,g,e)=>({From:o,To:g,LogisticsServiceID:e});function te(o,g){if(o&1){let e=h();a(0,"button",14),C("click",function(){s(e);let t=m(2);return d(t.openExportModal())}),L(1,"i",15),p(2," Export "),r()}}function ie(o,g){if(o&1){let e=h();a(0,"div",16)(1,"h6"),p(2,"Outlet"),r(),a(3,"outlet-selector",17),S("ngModelChange",function(t){s(e);let i=m(2);return u(i.pageData.Filter.EntityID,t)||(i.pageData.Filter.EntityID=t),d(t)}),r(),a(4,"h6"),p(5,"From"),r(),a(6,"datepicker",18),S("dateChange",function(t){s(e);let i=m(2);return u(i.pageData.Filter.From,t)||(i.pageData.Filter.From=t),d(t)}),r(),a(7,"h6"),p(8,"To"),r(),a(9,"datepicker",19),S("dateChange",function(t){s(e);let i=m(2);return u(i.pageData.Filter.To,t)||(i.pageData.Filter.To=t),d(t)}),r(),a(10,"h6"),p(11,"Time"),r(),a(12,"div",20)(13,"div",21)(14,"app-timepicker",22),S("timeChange",function(t){s(e);let i=m(2);return u(i.pageData.Filter.StartTime,t)||(i.pageData.Filter.StartTime=t),d(t)}),r()(),a(15,"div",21)(16,"app-timepicker",22),S("timeChange",function(t){s(e);let i=m(2);return u(i.pageData.Filter.EndTime,t)||(i.pageData.Filter.EndTime=t),d(t)}),r()()()()}if(o&2){let e=m(2);l(3),c("accessType",2),_("ngModel",e.pageData.Filter.EntityID),c("outlets",e.pageData.Options==null?null:e.pageData.Options.Entities),l(3),_("date",e.pageData.Filter.From),l(3),_("date",e.pageData.Filter.To),l(5),c("fullWidth",!0),_("time",e.pageData.Filter.StartTime),l(2),c("fullWidth",!0),_("time",e.pageData.Filter.EndTime)}}function ae(o,g){if(o&1&&(a(0,"tr")(1,"td"),p(2),r(),a(3,"td"),p(4),r(),a(5,"td",23)(6,"a",24),f(7,"date"),f(8,"date"),p(9),r()(),a(10,"td",23)(11,"a",25),f(12,"date"),f(13,"date"),p(14),r()(),a(15,"td",23),p(16),r()()),o&2){let e=g.$implicit,n=g.index,t=m(2);l(2),v(n+1),l(2),v(e.Name),l(2),c("queryParams",I(19,$,e.ID,t.pageData.Filter.EntityID,D(7,7,t.pageData.Filter.From,"yyyy-MM-dd"),D(8,10,t.pageData.Filter.To,"yyyy-MM-dd"),t.pageData.Filter.StartTime,t.pageData.Filter.EndTime)),l(3),F(" ",e.Trans," "),l(2),c("queryParams",E(26,ee,D(12,13,t.pageData.Filter.From,"yyyy-MM-dd"),D(13,16,t.pageData.Filter.To,"yyyy-MM-dd"),e.ID)),l(3),F(" ",e.Qty," "),l(2),v(e.Weight)}}function ne(o,g){if(o&1){let e=h();a(0,"mainpanel-cmp",2),S("textChange",function(t){s(e);let i=m();return u(i.pageData.Filter.Name,t)||(i.pageData.Filter.Name=t),d(t)}),C("onSubmit",function(){s(e);let t=m();return d(t.searchFromPageOne())}),S("filterChange",function(t){s(e);let i=m();return u(i.pageData.Filter,t)||(i.pageData.Filter=t),d(t)}),a(1,"actions"),y(2,te,3,0,"button",3),a(3,"a",4),p(4," View Detail "),r()(),a(5,"filters"),y(6,ie,17,9,"ng-template",null,0,b),r(),a(8,"content")(9,"div",5)(10,"table",6),C("matSortChange",function(t){s(e);let i=m();return d(i.sortData(t))}),a(11,"thead",7)(12,"tr")(13,"th",8),p(14,"No"),r(),a(15,"th"),p(16,"Logistics Service Name"),r(),a(17,"th",9),p(18,"Trans"),r(),a(19,"th",10),p(20,"Qty"),r(),a(21,"th",11),p(22,"Weight "),a(23,"small",12),p(24,"(gram)"),r()()()(),a(25,"tbody"),y(26,ae,17,30,"tr",13),r()()()()()}if(o&2){let e=m();c("pageData",e.menuData),_("text",e.pageData.Filter.Name),c("isFilterOnDropdown",!1),_("filter",e.pageData.Filter),l(2),c("ngIf",e.roleService.global.Export),l(24),c("ngForOf",e.data.Data)}}var he=(()=>{class o extends G{matDialog;roleService;originalData=[];constructor(e,n,t,i,Y,Z){super(e,n,"Report/GetLogisticsService","ReportLoader/GetLogisticsService",t,i),this.matDialog=Y,this.roleService=Z}postInit(e){this.originalData=e.Data}sortData(e){let n=this.data.Data.slice();if(!e.active||e.direction===""){this.data.Data=this.originalData;return}this.data.Data=n.sort((t,i)=>this.compare(t[e.active],i[e.active],e.direction==="asc"))}openExportModal(){this.matDialog.open(H,{data:{title:"Logistic Service",exportTypes:[{ID:"ReportExport/LogisticService",Value:"Default",FileName:"Logistics Service"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"",pagination:!1}})}onChangeTime(e,n){let t=e.toTimeString().split(" ")[0].slice(0,5);this.pageData.Filter[n]=t}static \u0275fac=function(n){return new(n||o)(x(z),x(B),x(P),x(M),x(Q),x(j))};static \u0275cmp=w({type:o,selectors:[["POS-logistics-service-report"]],features:[T],decls:1,vars:1,consts:[["pageFilterTemplate",""],[3,"pageData","text","isFilterOnDropdown","filter","textChange","onSubmit","filterChange",4,"ngIf"],[3,"textChange","onSubmit","filterChange","pageData","text","isFilterOnDropdown","filter"],["class","btn btn-outline-secondary me-3",3,"click",4,"ngIf"],["routerLink","/menu/Logistics/Report/Outbound/Logistics_Service/Detail",1,"btn","btn-outline-secondary"],[1,"container-fluid","mt-5"],["id","tableGrid","matSort","",1,"table",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],[2,"width","50px"],["mat-sort-header","Trans",1,"align-right"],["mat-sort-header","Qty",1,"align-right"],["mat-sort-header","Weight",1,"align-right",2,"width","180px"],[1,"fst-italic","text-dark"],[4,"ngFor","ngForOf"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"dialog-filter"],["appendTo","body","bindLabel","Name","bindValue","ID","placeholder","Choose an outlet",3,"ngModelChange","accessType","ngModel","outlets"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"row"],[1,"col-6"],[3,"timeChange","fullWidth","time"],[1,"text-end"],["routerLink","/menu/Logistics/Report/Outbound/Logistics_Service/Detail",3,"queryParams"],["routerLink","/menu/Reports/Sales_Report/Standard/Products_Sold",3,"queryParams"]],template:function(n,t){n&1&&y(0,ne,27,6,"mainpanel-cmp",1),n&2&&c("ngIf",t.data)},dependencies:[R,W,k,O,N,J,U,q,A,X,K,V]})}return o})();export{he as a};
@@ -1,4 +1,4 @@
1
- import{$a as Z,Ca as B,Fb as V,Fc as Y,Ga as k,Gb as K,Pa as z,Qa as T,Sa as J,Va as X,Wa as j,Yc as $,bc as S,c as H,cb as b,db as G,ea as W,fa as M,fb as A,gb as tt,ia as U,kb as N,ma as E,na as F,oa as P,tb as y,ub as L,va as O,vb as I,xa as w,yc as q}from"./chunk-UIXWZ3VD.js";import{a as D}from"./chunk-QFE4KTJQ.js";var f=class r{static isArray(n,t=!0){return Array.isArray(n)&&(t||n.length!==0)}static isObject(n,t=!0){return typeof n=="object"&&!Array.isArray(n)&&n!=null&&(t||Object.keys(n).length!==0)}static equals(n,t,e){return e?this.resolveFieldData(n,e)===this.resolveFieldData(t,e):this.equalsByValue(n,t)}static equalsByValue(n,t){if(n===t)return!0;if(n&&t&&typeof n=="object"&&typeof t=="object"){var e=Array.isArray(n),i=Array.isArray(t),s,a,o;if(e&&i){if(a=n.length,a!=t.length)return!1;for(s=a;s--!==0;)if(!this.equalsByValue(n[s],t[s]))return!1;return!0}if(e!=i)return!1;var l=this.isDate(n),d=this.isDate(t);if(l!=d)return!1;if(l&&d)return n.getTime()==t.getTime();var c=n instanceof RegExp,p=t instanceof RegExp;if(c!=p)return!1;if(c&&p)return n.toString()==t.toString();var u=Object.keys(n);if(a=u.length,a!==Object.keys(t).length)return!1;for(s=a;s--!==0;)if(!Object.prototype.hasOwnProperty.call(t,u[s]))return!1;for(s=a;s--!==0;)if(o=u[s],!this.equalsByValue(n[o],t[o]))return!1;return!0}return n!==n&&t!==t}static resolveFieldData(n,t){if(n&&t){if(this.isFunction(t))return t(n);if(t.indexOf(".")==-1)return n[t];{let e=t.split("."),i=n;for(let s=0,a=e.length;s<a;++s){if(i==null)return null;i=i[e[s]]}return i}}else return null}static isFunction(n){return!!(n&&n.constructor&&n.call&&n.apply)}static reorderArray(n,t,e){let i;n&&t!==e&&(e>=n.length&&(e%=n.length,t%=n.length),n.splice(e,0,n.splice(t,1)[0]))}static insertIntoOrderedArray(n,t,e,i){if(e.length>0){let s=!1;for(let a=0;a<e.length;a++)if(this.findIndexInList(e[a],i)>t){e.splice(a,0,n),s=!0;break}s||e.push(n)}else e.push(n)}static findIndexInList(n,t){let e=-1;if(t){for(let i=0;i<t.length;i++)if(t[i]==n){e=i;break}}return e}static contains(n,t){if(n!=null&&t&&t.length){for(let e of t)if(this.equals(n,e))return!0}return!1}static removeAccents(n){return n&&(n=n.normalize("NFKD").replace(new RegExp("\\p{Diacritic}","gu"),"")),n}static isDate(n){return Object.prototype.toString.call(n)==="[object Date]"}static isEmpty(n){return n==null||n===""||Array.isArray(n)&&n.length===0||!this.isDate(n)&&typeof n=="object"&&Object.keys(n).length===0}static isNotEmpty(n){return!this.isEmpty(n)}static compare(n,t,e,i=1){let s=-1,a=this.isEmpty(n),o=this.isEmpty(t);return a&&o?s=0:a?s=i:o?s=-i:typeof n=="string"&&typeof t=="string"?s=n.localeCompare(t,e,{numeric:!0}):s=n<t?-1:n>t?1:0,s}static sort(n,t,e=1,i,s=1){let a=r.compare(n,t,i,e),o=e;return(r.isEmpty(n)||r.isEmpty(t))&&(o=s===1?e:s),o*a}static merge(n,t){if(!(n==null&&t==null)){{if((n==null||typeof n=="object")&&(t==null||typeof t=="object"))return D(D({},n||{}),t||{});if((n==null||typeof n=="string")&&(t==null||typeof t=="string"))return[n||"",t||""].join(" ")}return t||n}}static isPrintableCharacter(n=""){return this.isNotEmpty(n)&&n.length===1&&n.match(/\S| /)}static getItemValue(n,...t){return this.isFunction(n)?n(...t):n}static findLastIndex(n,t){let e=-1;if(this.isNotEmpty(n))try{e=n.findLastIndex(t)}catch{e=n.lastIndexOf([...n].reverse().find(t))}return e}static findLast(n,t){let e;if(this.isNotEmpty(n))try{e=n.findLast(t)}catch{e=[...n].reverse().find(t)}return e}static deepEquals(n,t){if(n===t)return!0;if(n&&t&&typeof n=="object"&&typeof t=="object"){var e=Array.isArray(n),i=Array.isArray(t),s,a,o;if(e&&i){if(a=n.length,a!=t.length)return!1;for(s=a;s--!==0;)if(!this.deepEquals(n[s],t[s]))return!1;return!0}if(e!=i)return!1;var l=n instanceof Date,d=t instanceof Date;if(l!=d)return!1;if(l&&d)return n.getTime()==t.getTime();var c=n instanceof RegExp,p=t instanceof RegExp;if(c!=p)return!1;if(c&&p)return n.toString()==t.toString();var u=Object.keys(n);if(a=u.length,a!==Object.keys(t).length)return!1;for(s=a;s--!==0;)if(!Object.prototype.hasOwnProperty.call(t,u[s]))return!1;for(s=a;s--!==0;)if(o=u[s],!this.deepEquals(n[o],t[o]))return!1;return!0}return n!==n&&t!==t}},et=0;function it(r="pn_id_"){return et++,`${r}${et}`}function at(){let r=[],n=(s,a)=>{let o=r.length>0?r[r.length-1]:{key:s,value:a},l=o.value+(o.key===s?0:a)+2;return r.push({key:s,value:l}),l},t=s=>{r=r.filter(a=>a.value!==s)},e=()=>r.length>0?r[r.length-1].value:0,i=s=>s&&parseInt(s.style.zIndex,10)||0;return{get:i,set:(s,a,o)=>{a&&(a.style.zIndex=String(n(s,o)))},clear:s=>{s&&(t(i(s)),s.style.zIndex="")},getCurrent:()=>e()}}var pt=at();var ot=["*"];var g=(()=>{class r{static STARTS_WITH="startsWith";static CONTAINS="contains";static NOT_CONTAINS="notContains";static ENDS_WITH="endsWith";static EQUALS="equals";static NOT_EQUALS="notEquals";static IN="in";static LESS_THAN="lt";static LESS_THAN_OR_EQUAL_TO="lte";static GREATER_THAN="gt";static GREATER_THAN_OR_EQUAL_TO="gte";static BETWEEN="between";static IS="is";static IS_NOT="isNot";static BEFORE="before";static AFTER="after";static DATE_IS="dateIs";static DATE_IS_NOT="dateIsNot";static DATE_BEFORE="dateBefore";static DATE_AFTER="dateAfter"}return r})();var At=(()=>{class r{filter(t,e,i,s,a){let o=[];if(t)for(let l of t)for(let d of e){let c=f.resolveFieldData(l,d);if(this.filters[s](c,i,a)){o.push(l);break}}return o}filters={startsWith:(t,e,i)=>{if(e==null||e.trim()==="")return!0;if(t==null)return!1;let s=f.removeAccents(e.toString()).toLocaleLowerCase(i);return f.removeAccents(t.toString()).toLocaleLowerCase(i).slice(0,s.length)===s},contains:(t,e,i)=>{if(e==null||typeof e=="string"&&e.trim()==="")return!0;if(t==null)return!1;let s=f.removeAccents(e.toString()).toLocaleLowerCase(i);return f.removeAccents(t.toString()).toLocaleLowerCase(i).indexOf(s)!==-1},notContains:(t,e,i)=>{if(e==null||typeof e=="string"&&e.trim()==="")return!0;if(t==null)return!1;let s=f.removeAccents(e.toString()).toLocaleLowerCase(i);return f.removeAccents(t.toString()).toLocaleLowerCase(i).indexOf(s)===-1},endsWith:(t,e,i)=>{if(e==null||e.trim()==="")return!0;if(t==null)return!1;let s=f.removeAccents(e.toString()).toLocaleLowerCase(i),a=f.removeAccents(t.toString()).toLocaleLowerCase(i);return a.indexOf(s,a.length-s.length)!==-1},equals:(t,e,i)=>e==null||typeof e=="string"&&e.trim()===""?!0:t==null?!1:t.getTime&&e.getTime?t.getTime()===e.getTime():t==e?!0:f.removeAccents(t.toString()).toLocaleLowerCase(i)==f.removeAccents(e.toString()).toLocaleLowerCase(i),notEquals:(t,e,i)=>e==null||typeof e=="string"&&e.trim()===""?!1:t==null?!0:t.getTime&&e.getTime?t.getTime()!==e.getTime():t==e?!1:f.removeAccents(t.toString()).toLocaleLowerCase(i)!=f.removeAccents(e.toString()).toLocaleLowerCase(i),in:(t,e)=>{if(e==null||e.length===0)return!0;for(let i=0;i<e.length;i++)if(f.equals(t,e[i]))return!0;return!1},between:(t,e)=>e==null||e[0]==null||e[1]==null?!0:t==null?!1:t.getTime?e[0].getTime()<=t.getTime()&&t.getTime()<=e[1].getTime():e[0]<=t&&t<=e[1],lt:(t,e,i)=>e==null?!0:t==null?!1:t.getTime&&e.getTime?t.getTime()<e.getTime():t<e,lte:(t,e,i)=>e==null?!0:t==null?!1:t.getTime&&e.getTime?t.getTime()<=e.getTime():t<=e,gt:(t,e,i)=>e==null?!0:t==null?!1:t.getTime&&e.getTime?t.getTime()>e.getTime():t>e,gte:(t,e,i)=>e==null?!0:t==null?!1:t.getTime&&e.getTime?t.getTime()>=e.getTime():t>=e,is:(t,e,i)=>this.filters.equals(t,e,i),isNot:(t,e,i)=>this.filters.notEquals(t,e,i),before:(t,e,i)=>this.filters.lt(t,e,i),after:(t,e,i)=>this.filters.gt(t,e,i),dateIs:(t,e)=>e==null?!0:t==null?!1:t.toDateString()===e.toDateString(),dateIsNot:(t,e)=>e==null?!0:t==null?!1:t.toDateString()!==e.toDateString(),dateBefore:(t,e)=>e==null?!0:t==null?!1:t.getTime()<e.getTime(),dateAfter:(t,e)=>{if(e==null)return!0;if(t==null)return!1;let i=new Date(t);return i.setHours(0,0,0,0),i.getTime()>e.getTime()}};register(t,e){this.filters[t]=e}static \u0275fac=function(e){return new(e||r)};static \u0275prov=W({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var yt=(()=>{class r{clickSource=new H;clickObservable=this.clickSource.asObservable();add(t){t&&this.clickSource.next(t)}static \u0275fac=function(e){return new(e||r)};static \u0275prov=W({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var st=(()=>{class r{ripple=!1;inputStyle=Z("outlined");overlayOptions={};csp=Z({nonce:void 0});filterMatchModeOptions={text:[g.STARTS_WITH,g.CONTAINS,g.NOT_CONTAINS,g.ENDS_WITH,g.EQUALS,g.NOT_EQUALS],numeric:[g.EQUALS,g.NOT_EQUALS,g.LESS_THAN,g.LESS_THAN_OR_EQUAL_TO,g.GREATER_THAN,g.GREATER_THAN_OR_EQUAL_TO],date:[g.DATE_IS,g.DATE_IS_NOT,g.DATE_BEFORE,g.DATE_AFTER]};translation={startsWith:"Starts with",contains:"Contains",notContains:"Not contains",endsWith:"Ends with",equals:"Equals",notEquals:"Not equals",noFilter:"No Filter",lt:"Less than",lte:"Less than or equal to",gt:"Greater than",gte:"Greater than or equal to",is:"Is",isNot:"Is not",before:"Before",after:"After",dateIs:"Date is",dateIsNot:"Date is not",dateBefore:"Date is before",dateAfter:"Date is after",clear:"Clear",apply:"Apply",matchAll:"Match All",matchAny:"Match Any",addRule:"Add Rule",removeRule:"Remove Rule",accept:"Yes",reject:"No",choose:"Choose",upload:"Upload",cancel:"Cancel",pending:"Pending",fileSizeTypes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],chooseYear:"Choose Year",chooseMonth:"Choose Month",chooseDate:"Choose Date",prevDecade:"Previous Decade",nextDecade:"Next Decade",prevYear:"Previous Year",nextYear:"Next Year",prevMonth:"Previous Month",nextMonth:"Next Month",prevHour:"Previous Hour",nextHour:"Next Hour",prevMinute:"Previous Minute",nextMinute:"Next Minute",prevSecond:"Previous Second",nextSecond:"Next Second",am:"am",pm:"pm",dateFormat:"mm/dd/yy",firstDayOfWeek:0,today:"Today",weekHeader:"Wk",weak:"Weak",medium:"Medium",strong:"Strong",passwordPrompt:"Enter a password",emptyMessage:"No results found",searchMessage:"{0} results are available",selectionMessage:"{0} items selected",emptySelectionMessage:"No selected item",emptySearchMessage:"No results found",emptyFilterMessage:"No results found",aria:{trueLabel:"True",falseLabel:"False",nullLabel:"Not Selected",star:"1 star",stars:"{star} stars",selectAll:"All items selected",unselectAll:"All items unselected",close:"Close",previous:"Previous",next:"Next",navigation:"Navigation",scrollTop:"Scroll Top",moveTop:"Move Top",moveUp:"Move Up",moveDown:"Move Down",moveBottom:"Move Bottom",moveToTarget:"Move to Target",moveToSource:"Move to Source",moveAllToTarget:"Move All to Target",moveAllToSource:"Move All to Source",pageLabel:"{page}",firstPageLabel:"First Page",lastPageLabel:"Last Page",nextPageLabel:"Next Page",prevPageLabel:"Previous Page",rowsPerPageLabel:"Rows per page",previousPageLabel:"Previous Page",jumpToPageDropdownLabel:"Jump to Page Dropdown",jumpToPageInputLabel:"Jump to Page Input",selectRow:"Row Selected",unselectRow:"Row Unselected",expandRow:"Row Expanded",collapseRow:"Row Collapsed",showFilterMenu:"Show Filter Menu",hideFilterMenu:"Hide Filter Menu",filterOperator:"Filter Operator",filterConstraint:"Filter Constraint",editRow:"Row Edit",saveEdit:"Save Edit",cancelEdit:"Cancel Edit",listView:"List View",gridView:"Grid View",slide:"Slide",slideNumber:"{slideNumber}",zoomImage:"Zoom Image",zoomIn:"Zoom In",zoomOut:"Zoom Out",rotateRight:"Rotate Right",rotateLeft:"Rotate Left",listLabel:"Option List",selectColor:"Select a color",removeLabel:"Remove",browseFiles:"Browse Files",maximizeLabel:"Maximize"}};zIndex={modal:1100,overlay:1e3,menu:1e3,tooltip:1100};translationSource=new H;translationObserver=this.translationSource.asObservable();getTranslation(t){return this.translation[t]}setTranslation(t){this.translation=D(D({},this.translation),t),this.translationSource.next(this.translation)}static \u0275fac=function(e){return new(e||r)};static \u0275prov=W({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var Lt=(()=>{class r{static \u0275fac=function(e){return new(e||r)};static \u0275cmp=E({type:r,selectors:[["p-footer"]],standalone:!0,features:[S],ngContentSelectors:ot,decls:1,vars:0,template:function(e,i){e&1&&(V(),K(0))},encapsulation:2})}return r})(),It=(()=>{class r{template;type;name;constructor(t){this.template=t}getType(){return this.name}static \u0275fac=function(e){return new(e||r)(T(J))};static \u0275dir=P({type:r,selectors:[["","pTemplate",""]],inputs:{type:"type",name:[0,"pTemplate","name"]},standalone:!0})}return r})(),Rt=(()=>{class r{static \u0275fac=function(e){return new(e||r)};static \u0275mod=F({type:r});static \u0275inj=M({})}return r})(),Ot=(()=>{class r{static STARTS_WITH="startsWith";static CONTAINS="contains";static NOT_CONTAINS="notContains";static ENDS_WITH="endsWith";static EQUALS="equals";static NOT_EQUALS="notEquals";static NO_FILTER="noFilter";static LT="lt";static LTE="lte";static GT="gt";static GTE="gte";static IS="is";static IS_NOT="isNot";static BEFORE="before";static AFTER="after";static CLEAR="clear";static APPLY="apply";static MATCH_ALL="matchAll";static MATCH_ANY="matchAny";static ADD_RULE="addRule";static REMOVE_RULE="removeRule";static ACCEPT="accept";static REJECT="reject";static CHOOSE="choose";static UPLOAD="upload";static CANCEL="cancel";static PENDING="pending";static FILE_SIZE_TYPES="fileSizeTypes";static DAY_NAMES="dayNames";static DAY_NAMES_SHORT="dayNamesShort";static DAY_NAMES_MIN="dayNamesMin";static MONTH_NAMES="monthNames";static MONTH_NAMES_SHORT="monthNamesShort";static FIRST_DAY_OF_WEEK="firstDayOfWeek";static TODAY="today";static WEEK_HEADER="weekHeader";static WEAK="weak";static MEDIUM="medium";static STRONG="strong";static PASSWORD_PROMPT="passwordPrompt";static EMPTY_MESSAGE="emptyMessage";static EMPTY_FILTER_MESSAGE="emptyFilterMessage";static SHOW_FILTER_MENU="showFilterMenu";static HIDE_FILTER_MENU="hideFilterMenu";static SELECTION_MESSAGE="selectionMessage";static ARIA="aria";static SELECT_COLOR="selectColor";static BROWSE_FILES="browseFiles"}return r})(),wt=(()=>{class r{dragStartSource=new H;dragStopSource=new H;dragStart$=this.dragStartSource.asObservable();dragStop$=this.dragStopSource.asObservable();startDrag(t){this.dragStartSource.next(t)}stopDrag(t){this.dragStopSource.next(t)}static \u0275fac=function(e){return new(e||r)};static \u0275prov=W({token:r,factory:r.\u0275fac})}return r})();var h=(()=>{class r{static zindex=1e3;static calculatedScrollbarWidth=null;static calculatedScrollbarHeight=null;static browser;static addClass(t,e){t&&e&&(t.classList?t.classList.add(e):t.className+=" "+e)}static addMultipleClasses(t,e){if(t&&e)if(t.classList){let i=e.trim().split(" ");for(let s=0;s<i.length;s++)t.classList.add(i[s])}else{let i=e.split(" ");for(let s=0;s<i.length;s++)t.className+=" "+i[s]}}static removeClass(t,e){t&&e&&(t.classList?t.classList.remove(e):t.className=t.className.replace(new RegExp("(^|\\b)"+e.split(" ").join("|")+"(\\b|$)","gi")," "))}static removeMultipleClasses(t,e){t&&e&&[e].flat().filter(Boolean).forEach(i=>i.split(" ").forEach(s=>this.removeClass(t,s)))}static hasClass(t,e){return t&&e?t.classList?t.classList.contains(e):new RegExp("(^| )"+e+"( |$)","gi").test(t.className):!1}static siblings(t){return Array.prototype.filter.call(t.parentNode.children,function(e){return e!==t})}static find(t,e){return Array.from(t.querySelectorAll(e))}static findSingle(t,e){return this.isElement(t)?t.querySelector(e):null}static index(t){let e=t.parentNode.childNodes,i=0;for(var s=0;s<e.length;s++){if(e[s]==t)return i;e[s].nodeType==1&&i++}return-1}static indexWithinGroup(t,e){let i=t.parentNode?t.parentNode.childNodes:[],s=0;for(var a=0;a<i.length;a++){if(i[a]==t)return s;i[a].attributes&&i[a].attributes[e]&&i[a].nodeType==1&&s++}return-1}static appendOverlay(t,e,i="self"){i!=="self"&&t&&e&&this.appendChild(t,e)}static alignOverlay(t,e,i="self",s=!0){t&&e&&(s&&(t.style.minWidth=`${r.getOuterWidth(e)}px`),i==="self"?this.relativePosition(t,e):this.absolutePosition(t,e))}static relativePosition(t,e,i=!0){let s=x=>{if(x)return getComputedStyle(x).getPropertyValue("position")==="relative"?x:s(x.parentElement)},a=t.offsetParent?{width:t.offsetWidth,height:t.offsetHeight}:this.getHiddenElementDimensions(t),o=e.offsetHeight??e.getBoundingClientRect().height,l=e.getBoundingClientRect(),d=this.getWindowScrollTop(),c=this.getWindowScrollLeft(),p=this.getViewport(),m=s(t)?.getBoundingClientRect()||{top:-1*d,left:-1*c},C,R;l.top+o+a.height>p.height?(C=l.top-m.top-a.height,t.style.transformOrigin="bottom",l.top+C<0&&(C=-1*l.top)):(C=o+l.top-m.top,t.style.transformOrigin="top");let Q=l.left+a.width-p.width,rt=l.left-m.left;a.width>p.width?R=(l.left-m.left)*-1:Q>0?R=rt-Q:R=l.left-m.left,t.style.top=C+"px",t.style.left=R+"px",i&&(t.style.marginTop=origin==="bottom"?"calc(var(--p-anchor-gutter) * -1)":"calc(var(--p-anchor-gutter))")}static absolutePosition(t,e,i=!0){let s=t.offsetParent?{width:t.offsetWidth,height:t.offsetHeight}:this.getHiddenElementDimensions(t),a=s.height,o=s.width,l=e.offsetHeight??e.getBoundingClientRect().height,d=e.offsetWidth??e.getBoundingClientRect().width,c=e.getBoundingClientRect(),p=this.getWindowScrollTop(),u=this.getWindowScrollLeft(),m=this.getViewport(),C,R;c.top+l+a>m.height?(C=c.top+p-a,t.style.transformOrigin="bottom",C<0&&(C=p)):(C=l+c.top+p,t.style.transformOrigin="top"),c.left+o>m.width?R=Math.max(0,c.left+u+d-o):R=c.left+u,t.style.top=C+"px",t.style.left=R+"px",i&&(t.style.marginTop=origin==="bottom"?"calc(var(--p-anchor-gutter) * -1)":"calc(var(--p-anchor-gutter))")}static getParents(t,e=[]){return t.parentNode===null?e:this.getParents(t.parentNode,e.concat([t.parentNode]))}static getScrollableParents(t){let e=[];if(t){let i=this.getParents(t),s=/(auto|scroll)/,a=o=>{let l=window.getComputedStyle(o,null);return s.test(l.getPropertyValue("overflow"))||s.test(l.getPropertyValue("overflowX"))||s.test(l.getPropertyValue("overflowY"))};for(let o of i){let l=o.nodeType===1&&o.dataset.scrollselectors;if(l){let d=l.split(",");for(let c of d){let p=this.findSingle(o,c);p&&a(p)&&e.push(p)}}o.nodeType!==9&&a(o)&&e.push(o)}}return e}static getHiddenElementOuterHeight(t){t.style.visibility="hidden",t.style.display="block";let e=t.offsetHeight;return t.style.display="none",t.style.visibility="visible",e}static getHiddenElementOuterWidth(t){t.style.visibility="hidden",t.style.display="block";let e=t.offsetWidth;return t.style.display="none",t.style.visibility="visible",e}static getHiddenElementDimensions(t){let e={};return t.style.visibility="hidden",t.style.display="block",e.width=t.offsetWidth,e.height=t.offsetHeight,t.style.display="none",t.style.visibility="visible",e}static scrollInView(t,e){let i=getComputedStyle(t).getPropertyValue("borderTopWidth"),s=i?parseFloat(i):0,a=getComputedStyle(t).getPropertyValue("paddingTop"),o=a?parseFloat(a):0,l=t.getBoundingClientRect(),c=e.getBoundingClientRect().top+document.body.scrollTop-(l.top+document.body.scrollTop)-s-o,p=t.scrollTop,u=t.clientHeight,m=this.getOuterHeight(e);c<0?t.scrollTop=p+c:c+m>u&&(t.scrollTop=p+c-u+m)}static fadeIn(t,e){t.style.opacity=0;let i=+new Date,s=0,a=function(){s=+t.style.opacity.replace(",",".")+(new Date().getTime()-i)/e,t.style.opacity=s,i=+new Date,+s<1&&(window.requestAnimationFrame&&requestAnimationFrame(a)||setTimeout(a,16))};a()}static fadeOut(t,e){var i=1,s=50,a=e,o=s/a;let l=setInterval(()=>{i=i-o,i<=0&&(i=0,clearInterval(l)),t.style.opacity=i},s)}static getWindowScrollTop(){let t=document.documentElement;return(window.pageYOffset||t.scrollTop)-(t.clientTop||0)}static getWindowScrollLeft(){let t=document.documentElement;return(window.pageXOffset||t.scrollLeft)-(t.clientLeft||0)}static matches(t,e){var i=Element.prototype,s=i.matches||i.webkitMatchesSelector||i.mozMatchesSelector||i.msMatchesSelector||function(a){return[].indexOf.call(document.querySelectorAll(a),this)!==-1};return s.call(t,e)}static getOuterWidth(t,e){let i=t.offsetWidth;if(e){let s=getComputedStyle(t);i+=parseFloat(s.marginLeft)+parseFloat(s.marginRight)}return i}static getHorizontalPadding(t){let e=getComputedStyle(t);return parseFloat(e.paddingLeft)+parseFloat(e.paddingRight)}static getHorizontalMargin(t){let e=getComputedStyle(t);return parseFloat(e.marginLeft)+parseFloat(e.marginRight)}static innerWidth(t){let e=t.offsetWidth,i=getComputedStyle(t);return e+=parseFloat(i.paddingLeft)+parseFloat(i.paddingRight),e}static width(t){let e=t.offsetWidth,i=getComputedStyle(t);return e-=parseFloat(i.paddingLeft)+parseFloat(i.paddingRight),e}static getInnerHeight(t){let e=t.offsetHeight,i=getComputedStyle(t);return e+=parseFloat(i.paddingTop)+parseFloat(i.paddingBottom),e}static getOuterHeight(t,e){let i=t.offsetHeight;if(e){let s=getComputedStyle(t);i+=parseFloat(s.marginTop)+parseFloat(s.marginBottom)}return i}static getHeight(t){let e=t.offsetHeight,i=getComputedStyle(t);return e-=parseFloat(i.paddingTop)+parseFloat(i.paddingBottom)+parseFloat(i.borderTopWidth)+parseFloat(i.borderBottomWidth),e}static getWidth(t){let e=t.offsetWidth,i=getComputedStyle(t);return e-=parseFloat(i.paddingLeft)+parseFloat(i.paddingRight)+parseFloat(i.borderLeftWidth)+parseFloat(i.borderRightWidth),e}static getViewport(){let t=window,e=document,i=e.documentElement,s=e.getElementsByTagName("body")[0],a=t.innerWidth||i.clientWidth||s.clientWidth,o=t.innerHeight||i.clientHeight||s.clientHeight;return{width:a,height:o}}static getOffset(t){var e=t.getBoundingClientRect();return{top:e.top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0),left:e.left+(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0)}}static replaceElementWith(t,e){let i=t.parentNode;if(!i)throw"Can't replace element";return i.replaceChild(e,t)}static getUserAgent(){if(navigator&&this.isClient())return navigator.userAgent}static isIE(){var t=window.navigator.userAgent,e=t.indexOf("MSIE ");if(e>0)return!0;var i=t.indexOf("Trident/");if(i>0){var s=t.indexOf("rv:");return!0}var a=t.indexOf("Edge/");return a>0}static isIOS(){return/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream}static isAndroid(){return/(android)/i.test(navigator.userAgent)}static isTouchDevice(){return"ontouchstart"in window||navigator.maxTouchPoints>0}static appendChild(t,e){if(this.isElement(e))e.appendChild(t);else if(e&&e.el&&e.el.nativeElement)e.el.nativeElement.appendChild(t);else throw"Cannot append "+e+" to "+t}static removeChild(t,e){if(this.isElement(e))e.removeChild(t);else if(e.el&&e.el.nativeElement)e.el.nativeElement.removeChild(t);else throw"Cannot remove "+t+" from "+e}static removeElement(t){"remove"in Element.prototype?t.remove():t.parentNode.removeChild(t)}static isElement(t){return typeof HTMLElement=="object"?t instanceof HTMLElement:t&&typeof t=="object"&&t!==null&&t.nodeType===1&&typeof t.nodeName=="string"}static calculateScrollbarWidth(t){if(t){let e=getComputedStyle(t);return t.offsetWidth-t.clientWidth-parseFloat(e.borderLeftWidth)-parseFloat(e.borderRightWidth)}else{if(this.calculatedScrollbarWidth!==null)return this.calculatedScrollbarWidth;let e=document.createElement("div");e.className="p-scrollbar-measure",document.body.appendChild(e);let i=e.offsetWidth-e.clientWidth;return document.body.removeChild(e),this.calculatedScrollbarWidth=i,i}}static calculateScrollbarHeight(){if(this.calculatedScrollbarHeight!==null)return this.calculatedScrollbarHeight;let t=document.createElement("div");t.className="p-scrollbar-measure",document.body.appendChild(t);let e=t.offsetHeight-t.clientHeight;return document.body.removeChild(t),this.calculatedScrollbarWidth=e,e}static invokeElementMethod(t,e,i){t[e].apply(t,i)}static clearSelection(){if(window.getSelection)window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().rangeCount>0&&window.getSelection().getRangeAt(0).getClientRects().length>0&&window.getSelection().removeAllRanges();else if(document.selection&&document.selection.empty)try{document.selection.empty()}catch{}}static getBrowser(){if(!this.browser){let t=this.resolveUserAgent();this.browser={},t.browser&&(this.browser[t.browser]=!0,this.browser.version=t.version),this.browser.chrome?this.browser.webkit=!0:this.browser.webkit&&(this.browser.safari=!0)}return this.browser}static resolveUserAgent(){let t=navigator.userAgent.toLowerCase(),e=/(chrome)[ \/]([\w.]+)/.exec(t)||/(webkit)[ \/]([\w.]+)/.exec(t)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(t)||/(msie) ([\w.]+)/.exec(t)||t.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(t)||[];return{browser:e[1]||"",version:e[2]||"0"}}static isInteger(t){return Number.isInteger?Number.isInteger(t):typeof t=="number"&&isFinite(t)&&Math.floor(t)===t}static isHidden(t){return!t||t.offsetParent===null}static isVisible(t){return t&&t.offsetParent!=null}static isExist(t){return t!==null&&typeof t<"u"&&t.nodeName&&t.parentNode}static focus(t,e){t&&document.activeElement!==t&&t.focus(e)}static getFocusableSelectorString(t=""){return`button:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},
1
+ import{$a as Z,Ca as B,Fb as V,Fc as Y,Ga as k,Gb as K,Pa as z,Qa as T,Sa as J,Va as X,Wa as j,Yc as $,bc as S,c as H,cb as b,db as G,ea as W,fa as M,fb as A,gb as tt,ia as U,kb as N,ma as E,na as F,oa as P,tb as y,ub as L,va as O,vb as I,xa as w,yc as q}from"./chunk-GXWDPDLH.js";import{a as D}from"./chunk-QFE4KTJQ.js";var f=class r{static isArray(n,t=!0){return Array.isArray(n)&&(t||n.length!==0)}static isObject(n,t=!0){return typeof n=="object"&&!Array.isArray(n)&&n!=null&&(t||Object.keys(n).length!==0)}static equals(n,t,e){return e?this.resolveFieldData(n,e)===this.resolveFieldData(t,e):this.equalsByValue(n,t)}static equalsByValue(n,t){if(n===t)return!0;if(n&&t&&typeof n=="object"&&typeof t=="object"){var e=Array.isArray(n),i=Array.isArray(t),s,a,o;if(e&&i){if(a=n.length,a!=t.length)return!1;for(s=a;s--!==0;)if(!this.equalsByValue(n[s],t[s]))return!1;return!0}if(e!=i)return!1;var l=this.isDate(n),d=this.isDate(t);if(l!=d)return!1;if(l&&d)return n.getTime()==t.getTime();var c=n instanceof RegExp,p=t instanceof RegExp;if(c!=p)return!1;if(c&&p)return n.toString()==t.toString();var u=Object.keys(n);if(a=u.length,a!==Object.keys(t).length)return!1;for(s=a;s--!==0;)if(!Object.prototype.hasOwnProperty.call(t,u[s]))return!1;for(s=a;s--!==0;)if(o=u[s],!this.equalsByValue(n[o],t[o]))return!1;return!0}return n!==n&&t!==t}static resolveFieldData(n,t){if(n&&t){if(this.isFunction(t))return t(n);if(t.indexOf(".")==-1)return n[t];{let e=t.split("."),i=n;for(let s=0,a=e.length;s<a;++s){if(i==null)return null;i=i[e[s]]}return i}}else return null}static isFunction(n){return!!(n&&n.constructor&&n.call&&n.apply)}static reorderArray(n,t,e){let i;n&&t!==e&&(e>=n.length&&(e%=n.length,t%=n.length),n.splice(e,0,n.splice(t,1)[0]))}static insertIntoOrderedArray(n,t,e,i){if(e.length>0){let s=!1;for(let a=0;a<e.length;a++)if(this.findIndexInList(e[a],i)>t){e.splice(a,0,n),s=!0;break}s||e.push(n)}else e.push(n)}static findIndexInList(n,t){let e=-1;if(t){for(let i=0;i<t.length;i++)if(t[i]==n){e=i;break}}return e}static contains(n,t){if(n!=null&&t&&t.length){for(let e of t)if(this.equals(n,e))return!0}return!1}static removeAccents(n){return n&&(n=n.normalize("NFKD").replace(new RegExp("\\p{Diacritic}","gu"),"")),n}static isDate(n){return Object.prototype.toString.call(n)==="[object Date]"}static isEmpty(n){return n==null||n===""||Array.isArray(n)&&n.length===0||!this.isDate(n)&&typeof n=="object"&&Object.keys(n).length===0}static isNotEmpty(n){return!this.isEmpty(n)}static compare(n,t,e,i=1){let s=-1,a=this.isEmpty(n),o=this.isEmpty(t);return a&&o?s=0:a?s=i:o?s=-i:typeof n=="string"&&typeof t=="string"?s=n.localeCompare(t,e,{numeric:!0}):s=n<t?-1:n>t?1:0,s}static sort(n,t,e=1,i,s=1){let a=r.compare(n,t,i,e),o=e;return(r.isEmpty(n)||r.isEmpty(t))&&(o=s===1?e:s),o*a}static merge(n,t){if(!(n==null&&t==null)){{if((n==null||typeof n=="object")&&(t==null||typeof t=="object"))return D(D({},n||{}),t||{});if((n==null||typeof n=="string")&&(t==null||typeof t=="string"))return[n||"",t||""].join(" ")}return t||n}}static isPrintableCharacter(n=""){return this.isNotEmpty(n)&&n.length===1&&n.match(/\S| /)}static getItemValue(n,...t){return this.isFunction(n)?n(...t):n}static findLastIndex(n,t){let e=-1;if(this.isNotEmpty(n))try{e=n.findLastIndex(t)}catch{e=n.lastIndexOf([...n].reverse().find(t))}return e}static findLast(n,t){let e;if(this.isNotEmpty(n))try{e=n.findLast(t)}catch{e=[...n].reverse().find(t)}return e}static deepEquals(n,t){if(n===t)return!0;if(n&&t&&typeof n=="object"&&typeof t=="object"){var e=Array.isArray(n),i=Array.isArray(t),s,a,o;if(e&&i){if(a=n.length,a!=t.length)return!1;for(s=a;s--!==0;)if(!this.deepEquals(n[s],t[s]))return!1;return!0}if(e!=i)return!1;var l=n instanceof Date,d=t instanceof Date;if(l!=d)return!1;if(l&&d)return n.getTime()==t.getTime();var c=n instanceof RegExp,p=t instanceof RegExp;if(c!=p)return!1;if(c&&p)return n.toString()==t.toString();var u=Object.keys(n);if(a=u.length,a!==Object.keys(t).length)return!1;for(s=a;s--!==0;)if(!Object.prototype.hasOwnProperty.call(t,u[s]))return!1;for(s=a;s--!==0;)if(o=u[s],!this.deepEquals(n[o],t[o]))return!1;return!0}return n!==n&&t!==t}},et=0;function it(r="pn_id_"){return et++,`${r}${et}`}function at(){let r=[],n=(s,a)=>{let o=r.length>0?r[r.length-1]:{key:s,value:a},l=o.value+(o.key===s?0:a)+2;return r.push({key:s,value:l}),l},t=s=>{r=r.filter(a=>a.value!==s)},e=()=>r.length>0?r[r.length-1].value:0,i=s=>s&&parseInt(s.style.zIndex,10)||0;return{get:i,set:(s,a,o)=>{a&&(a.style.zIndex=String(n(s,o)))},clear:s=>{s&&(t(i(s)),s.style.zIndex="")},getCurrent:()=>e()}}var pt=at();var ot=["*"];var g=(()=>{class r{static STARTS_WITH="startsWith";static CONTAINS="contains";static NOT_CONTAINS="notContains";static ENDS_WITH="endsWith";static EQUALS="equals";static NOT_EQUALS="notEquals";static IN="in";static LESS_THAN="lt";static LESS_THAN_OR_EQUAL_TO="lte";static GREATER_THAN="gt";static GREATER_THAN_OR_EQUAL_TO="gte";static BETWEEN="between";static IS="is";static IS_NOT="isNot";static BEFORE="before";static AFTER="after";static DATE_IS="dateIs";static DATE_IS_NOT="dateIsNot";static DATE_BEFORE="dateBefore";static DATE_AFTER="dateAfter"}return r})();var At=(()=>{class r{filter(t,e,i,s,a){let o=[];if(t)for(let l of t)for(let d of e){let c=f.resolveFieldData(l,d);if(this.filters[s](c,i,a)){o.push(l);break}}return o}filters={startsWith:(t,e,i)=>{if(e==null||e.trim()==="")return!0;if(t==null)return!1;let s=f.removeAccents(e.toString()).toLocaleLowerCase(i);return f.removeAccents(t.toString()).toLocaleLowerCase(i).slice(0,s.length)===s},contains:(t,e,i)=>{if(e==null||typeof e=="string"&&e.trim()==="")return!0;if(t==null)return!1;let s=f.removeAccents(e.toString()).toLocaleLowerCase(i);return f.removeAccents(t.toString()).toLocaleLowerCase(i).indexOf(s)!==-1},notContains:(t,e,i)=>{if(e==null||typeof e=="string"&&e.trim()==="")return!0;if(t==null)return!1;let s=f.removeAccents(e.toString()).toLocaleLowerCase(i);return f.removeAccents(t.toString()).toLocaleLowerCase(i).indexOf(s)===-1},endsWith:(t,e,i)=>{if(e==null||e.trim()==="")return!0;if(t==null)return!1;let s=f.removeAccents(e.toString()).toLocaleLowerCase(i),a=f.removeAccents(t.toString()).toLocaleLowerCase(i);return a.indexOf(s,a.length-s.length)!==-1},equals:(t,e,i)=>e==null||typeof e=="string"&&e.trim()===""?!0:t==null?!1:t.getTime&&e.getTime?t.getTime()===e.getTime():t==e?!0:f.removeAccents(t.toString()).toLocaleLowerCase(i)==f.removeAccents(e.toString()).toLocaleLowerCase(i),notEquals:(t,e,i)=>e==null||typeof e=="string"&&e.trim()===""?!1:t==null?!0:t.getTime&&e.getTime?t.getTime()!==e.getTime():t==e?!1:f.removeAccents(t.toString()).toLocaleLowerCase(i)!=f.removeAccents(e.toString()).toLocaleLowerCase(i),in:(t,e)=>{if(e==null||e.length===0)return!0;for(let i=0;i<e.length;i++)if(f.equals(t,e[i]))return!0;return!1},between:(t,e)=>e==null||e[0]==null||e[1]==null?!0:t==null?!1:t.getTime?e[0].getTime()<=t.getTime()&&t.getTime()<=e[1].getTime():e[0]<=t&&t<=e[1],lt:(t,e,i)=>e==null?!0:t==null?!1:t.getTime&&e.getTime?t.getTime()<e.getTime():t<e,lte:(t,e,i)=>e==null?!0:t==null?!1:t.getTime&&e.getTime?t.getTime()<=e.getTime():t<=e,gt:(t,e,i)=>e==null?!0:t==null?!1:t.getTime&&e.getTime?t.getTime()>e.getTime():t>e,gte:(t,e,i)=>e==null?!0:t==null?!1:t.getTime&&e.getTime?t.getTime()>=e.getTime():t>=e,is:(t,e,i)=>this.filters.equals(t,e,i),isNot:(t,e,i)=>this.filters.notEquals(t,e,i),before:(t,e,i)=>this.filters.lt(t,e,i),after:(t,e,i)=>this.filters.gt(t,e,i),dateIs:(t,e)=>e==null?!0:t==null?!1:t.toDateString()===e.toDateString(),dateIsNot:(t,e)=>e==null?!0:t==null?!1:t.toDateString()!==e.toDateString(),dateBefore:(t,e)=>e==null?!0:t==null?!1:t.getTime()<e.getTime(),dateAfter:(t,e)=>{if(e==null)return!0;if(t==null)return!1;let i=new Date(t);return i.setHours(0,0,0,0),i.getTime()>e.getTime()}};register(t,e){this.filters[t]=e}static \u0275fac=function(e){return new(e||r)};static \u0275prov=W({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var yt=(()=>{class r{clickSource=new H;clickObservable=this.clickSource.asObservable();add(t){t&&this.clickSource.next(t)}static \u0275fac=function(e){return new(e||r)};static \u0275prov=W({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var st=(()=>{class r{ripple=!1;inputStyle=Z("outlined");overlayOptions={};csp=Z({nonce:void 0});filterMatchModeOptions={text:[g.STARTS_WITH,g.CONTAINS,g.NOT_CONTAINS,g.ENDS_WITH,g.EQUALS,g.NOT_EQUALS],numeric:[g.EQUALS,g.NOT_EQUALS,g.LESS_THAN,g.LESS_THAN_OR_EQUAL_TO,g.GREATER_THAN,g.GREATER_THAN_OR_EQUAL_TO],date:[g.DATE_IS,g.DATE_IS_NOT,g.DATE_BEFORE,g.DATE_AFTER]};translation={startsWith:"Starts with",contains:"Contains",notContains:"Not contains",endsWith:"Ends with",equals:"Equals",notEquals:"Not equals",noFilter:"No Filter",lt:"Less than",lte:"Less than or equal to",gt:"Greater than",gte:"Greater than or equal to",is:"Is",isNot:"Is not",before:"Before",after:"After",dateIs:"Date is",dateIsNot:"Date is not",dateBefore:"Date is before",dateAfter:"Date is after",clear:"Clear",apply:"Apply",matchAll:"Match All",matchAny:"Match Any",addRule:"Add Rule",removeRule:"Remove Rule",accept:"Yes",reject:"No",choose:"Choose",upload:"Upload",cancel:"Cancel",pending:"Pending",fileSizeTypes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],chooseYear:"Choose Year",chooseMonth:"Choose Month",chooseDate:"Choose Date",prevDecade:"Previous Decade",nextDecade:"Next Decade",prevYear:"Previous Year",nextYear:"Next Year",prevMonth:"Previous Month",nextMonth:"Next Month",prevHour:"Previous Hour",nextHour:"Next Hour",prevMinute:"Previous Minute",nextMinute:"Next Minute",prevSecond:"Previous Second",nextSecond:"Next Second",am:"am",pm:"pm",dateFormat:"mm/dd/yy",firstDayOfWeek:0,today:"Today",weekHeader:"Wk",weak:"Weak",medium:"Medium",strong:"Strong",passwordPrompt:"Enter a password",emptyMessage:"No results found",searchMessage:"{0} results are available",selectionMessage:"{0} items selected",emptySelectionMessage:"No selected item",emptySearchMessage:"No results found",emptyFilterMessage:"No results found",aria:{trueLabel:"True",falseLabel:"False",nullLabel:"Not Selected",star:"1 star",stars:"{star} stars",selectAll:"All items selected",unselectAll:"All items unselected",close:"Close",previous:"Previous",next:"Next",navigation:"Navigation",scrollTop:"Scroll Top",moveTop:"Move Top",moveUp:"Move Up",moveDown:"Move Down",moveBottom:"Move Bottom",moveToTarget:"Move to Target",moveToSource:"Move to Source",moveAllToTarget:"Move All to Target",moveAllToSource:"Move All to Source",pageLabel:"{page}",firstPageLabel:"First Page",lastPageLabel:"Last Page",nextPageLabel:"Next Page",prevPageLabel:"Previous Page",rowsPerPageLabel:"Rows per page",previousPageLabel:"Previous Page",jumpToPageDropdownLabel:"Jump to Page Dropdown",jumpToPageInputLabel:"Jump to Page Input",selectRow:"Row Selected",unselectRow:"Row Unselected",expandRow:"Row Expanded",collapseRow:"Row Collapsed",showFilterMenu:"Show Filter Menu",hideFilterMenu:"Hide Filter Menu",filterOperator:"Filter Operator",filterConstraint:"Filter Constraint",editRow:"Row Edit",saveEdit:"Save Edit",cancelEdit:"Cancel Edit",listView:"List View",gridView:"Grid View",slide:"Slide",slideNumber:"{slideNumber}",zoomImage:"Zoom Image",zoomIn:"Zoom In",zoomOut:"Zoom Out",rotateRight:"Rotate Right",rotateLeft:"Rotate Left",listLabel:"Option List",selectColor:"Select a color",removeLabel:"Remove",browseFiles:"Browse Files",maximizeLabel:"Maximize"}};zIndex={modal:1100,overlay:1e3,menu:1e3,tooltip:1100};translationSource=new H;translationObserver=this.translationSource.asObservable();getTranslation(t){return this.translation[t]}setTranslation(t){this.translation=D(D({},this.translation),t),this.translationSource.next(this.translation)}static \u0275fac=function(e){return new(e||r)};static \u0275prov=W({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var Lt=(()=>{class r{static \u0275fac=function(e){return new(e||r)};static \u0275cmp=E({type:r,selectors:[["p-footer"]],standalone:!0,features:[S],ngContentSelectors:ot,decls:1,vars:0,template:function(e,i){e&1&&(V(),K(0))},encapsulation:2})}return r})(),It=(()=>{class r{template;type;name;constructor(t){this.template=t}getType(){return this.name}static \u0275fac=function(e){return new(e||r)(T(J))};static \u0275dir=P({type:r,selectors:[["","pTemplate",""]],inputs:{type:"type",name:[0,"pTemplate","name"]},standalone:!0})}return r})(),Rt=(()=>{class r{static \u0275fac=function(e){return new(e||r)};static \u0275mod=F({type:r});static \u0275inj=M({})}return r})(),Ot=(()=>{class r{static STARTS_WITH="startsWith";static CONTAINS="contains";static NOT_CONTAINS="notContains";static ENDS_WITH="endsWith";static EQUALS="equals";static NOT_EQUALS="notEquals";static NO_FILTER="noFilter";static LT="lt";static LTE="lte";static GT="gt";static GTE="gte";static IS="is";static IS_NOT="isNot";static BEFORE="before";static AFTER="after";static CLEAR="clear";static APPLY="apply";static MATCH_ALL="matchAll";static MATCH_ANY="matchAny";static ADD_RULE="addRule";static REMOVE_RULE="removeRule";static ACCEPT="accept";static REJECT="reject";static CHOOSE="choose";static UPLOAD="upload";static CANCEL="cancel";static PENDING="pending";static FILE_SIZE_TYPES="fileSizeTypes";static DAY_NAMES="dayNames";static DAY_NAMES_SHORT="dayNamesShort";static DAY_NAMES_MIN="dayNamesMin";static MONTH_NAMES="monthNames";static MONTH_NAMES_SHORT="monthNamesShort";static FIRST_DAY_OF_WEEK="firstDayOfWeek";static TODAY="today";static WEEK_HEADER="weekHeader";static WEAK="weak";static MEDIUM="medium";static STRONG="strong";static PASSWORD_PROMPT="passwordPrompt";static EMPTY_MESSAGE="emptyMessage";static EMPTY_FILTER_MESSAGE="emptyFilterMessage";static SHOW_FILTER_MENU="showFilterMenu";static HIDE_FILTER_MENU="hideFilterMenu";static SELECTION_MESSAGE="selectionMessage";static ARIA="aria";static SELECT_COLOR="selectColor";static BROWSE_FILES="browseFiles"}return r})(),wt=(()=>{class r{dragStartSource=new H;dragStopSource=new H;dragStart$=this.dragStartSource.asObservable();dragStop$=this.dragStopSource.asObservable();startDrag(t){this.dragStartSource.next(t)}stopDrag(t){this.dragStopSource.next(t)}static \u0275fac=function(e){return new(e||r)};static \u0275prov=W({token:r,factory:r.\u0275fac})}return r})();var h=(()=>{class r{static zindex=1e3;static calculatedScrollbarWidth=null;static calculatedScrollbarHeight=null;static browser;static addClass(t,e){t&&e&&(t.classList?t.classList.add(e):t.className+=" "+e)}static addMultipleClasses(t,e){if(t&&e)if(t.classList){let i=e.trim().split(" ");for(let s=0;s<i.length;s++)t.classList.add(i[s])}else{let i=e.split(" ");for(let s=0;s<i.length;s++)t.className+=" "+i[s]}}static removeClass(t,e){t&&e&&(t.classList?t.classList.remove(e):t.className=t.className.replace(new RegExp("(^|\\b)"+e.split(" ").join("|")+"(\\b|$)","gi")," "))}static removeMultipleClasses(t,e){t&&e&&[e].flat().filter(Boolean).forEach(i=>i.split(" ").forEach(s=>this.removeClass(t,s)))}static hasClass(t,e){return t&&e?t.classList?t.classList.contains(e):new RegExp("(^| )"+e+"( |$)","gi").test(t.className):!1}static siblings(t){return Array.prototype.filter.call(t.parentNode.children,function(e){return e!==t})}static find(t,e){return Array.from(t.querySelectorAll(e))}static findSingle(t,e){return this.isElement(t)?t.querySelector(e):null}static index(t){let e=t.parentNode.childNodes,i=0;for(var s=0;s<e.length;s++){if(e[s]==t)return i;e[s].nodeType==1&&i++}return-1}static indexWithinGroup(t,e){let i=t.parentNode?t.parentNode.childNodes:[],s=0;for(var a=0;a<i.length;a++){if(i[a]==t)return s;i[a].attributes&&i[a].attributes[e]&&i[a].nodeType==1&&s++}return-1}static appendOverlay(t,e,i="self"){i!=="self"&&t&&e&&this.appendChild(t,e)}static alignOverlay(t,e,i="self",s=!0){t&&e&&(s&&(t.style.minWidth=`${r.getOuterWidth(e)}px`),i==="self"?this.relativePosition(t,e):this.absolutePosition(t,e))}static relativePosition(t,e,i=!0){let s=x=>{if(x)return getComputedStyle(x).getPropertyValue("position")==="relative"?x:s(x.parentElement)},a=t.offsetParent?{width:t.offsetWidth,height:t.offsetHeight}:this.getHiddenElementDimensions(t),o=e.offsetHeight??e.getBoundingClientRect().height,l=e.getBoundingClientRect(),d=this.getWindowScrollTop(),c=this.getWindowScrollLeft(),p=this.getViewport(),m=s(t)?.getBoundingClientRect()||{top:-1*d,left:-1*c},C,R;l.top+o+a.height>p.height?(C=l.top-m.top-a.height,t.style.transformOrigin="bottom",l.top+C<0&&(C=-1*l.top)):(C=o+l.top-m.top,t.style.transformOrigin="top");let Q=l.left+a.width-p.width,rt=l.left-m.left;a.width>p.width?R=(l.left-m.left)*-1:Q>0?R=rt-Q:R=l.left-m.left,t.style.top=C+"px",t.style.left=R+"px",i&&(t.style.marginTop=origin==="bottom"?"calc(var(--p-anchor-gutter) * -1)":"calc(var(--p-anchor-gutter))")}static absolutePosition(t,e,i=!0){let s=t.offsetParent?{width:t.offsetWidth,height:t.offsetHeight}:this.getHiddenElementDimensions(t),a=s.height,o=s.width,l=e.offsetHeight??e.getBoundingClientRect().height,d=e.offsetWidth??e.getBoundingClientRect().width,c=e.getBoundingClientRect(),p=this.getWindowScrollTop(),u=this.getWindowScrollLeft(),m=this.getViewport(),C,R;c.top+l+a>m.height?(C=c.top+p-a,t.style.transformOrigin="bottom",C<0&&(C=p)):(C=l+c.top+p,t.style.transformOrigin="top"),c.left+o>m.width?R=Math.max(0,c.left+u+d-o):R=c.left+u,t.style.top=C+"px",t.style.left=R+"px",i&&(t.style.marginTop=origin==="bottom"?"calc(var(--p-anchor-gutter) * -1)":"calc(var(--p-anchor-gutter))")}static getParents(t,e=[]){return t.parentNode===null?e:this.getParents(t.parentNode,e.concat([t.parentNode]))}static getScrollableParents(t){let e=[];if(t){let i=this.getParents(t),s=/(auto|scroll)/,a=o=>{let l=window.getComputedStyle(o,null);return s.test(l.getPropertyValue("overflow"))||s.test(l.getPropertyValue("overflowX"))||s.test(l.getPropertyValue("overflowY"))};for(let o of i){let l=o.nodeType===1&&o.dataset.scrollselectors;if(l){let d=l.split(",");for(let c of d){let p=this.findSingle(o,c);p&&a(p)&&e.push(p)}}o.nodeType!==9&&a(o)&&e.push(o)}}return e}static getHiddenElementOuterHeight(t){t.style.visibility="hidden",t.style.display="block";let e=t.offsetHeight;return t.style.display="none",t.style.visibility="visible",e}static getHiddenElementOuterWidth(t){t.style.visibility="hidden",t.style.display="block";let e=t.offsetWidth;return t.style.display="none",t.style.visibility="visible",e}static getHiddenElementDimensions(t){let e={};return t.style.visibility="hidden",t.style.display="block",e.width=t.offsetWidth,e.height=t.offsetHeight,t.style.display="none",t.style.visibility="visible",e}static scrollInView(t,e){let i=getComputedStyle(t).getPropertyValue("borderTopWidth"),s=i?parseFloat(i):0,a=getComputedStyle(t).getPropertyValue("paddingTop"),o=a?parseFloat(a):0,l=t.getBoundingClientRect(),c=e.getBoundingClientRect().top+document.body.scrollTop-(l.top+document.body.scrollTop)-s-o,p=t.scrollTop,u=t.clientHeight,m=this.getOuterHeight(e);c<0?t.scrollTop=p+c:c+m>u&&(t.scrollTop=p+c-u+m)}static fadeIn(t,e){t.style.opacity=0;let i=+new Date,s=0,a=function(){s=+t.style.opacity.replace(",",".")+(new Date().getTime()-i)/e,t.style.opacity=s,i=+new Date,+s<1&&(window.requestAnimationFrame&&requestAnimationFrame(a)||setTimeout(a,16))};a()}static fadeOut(t,e){var i=1,s=50,a=e,o=s/a;let l=setInterval(()=>{i=i-o,i<=0&&(i=0,clearInterval(l)),t.style.opacity=i},s)}static getWindowScrollTop(){let t=document.documentElement;return(window.pageYOffset||t.scrollTop)-(t.clientTop||0)}static getWindowScrollLeft(){let t=document.documentElement;return(window.pageXOffset||t.scrollLeft)-(t.clientLeft||0)}static matches(t,e){var i=Element.prototype,s=i.matches||i.webkitMatchesSelector||i.mozMatchesSelector||i.msMatchesSelector||function(a){return[].indexOf.call(document.querySelectorAll(a),this)!==-1};return s.call(t,e)}static getOuterWidth(t,e){let i=t.offsetWidth;if(e){let s=getComputedStyle(t);i+=parseFloat(s.marginLeft)+parseFloat(s.marginRight)}return i}static getHorizontalPadding(t){let e=getComputedStyle(t);return parseFloat(e.paddingLeft)+parseFloat(e.paddingRight)}static getHorizontalMargin(t){let e=getComputedStyle(t);return parseFloat(e.marginLeft)+parseFloat(e.marginRight)}static innerWidth(t){let e=t.offsetWidth,i=getComputedStyle(t);return e+=parseFloat(i.paddingLeft)+parseFloat(i.paddingRight),e}static width(t){let e=t.offsetWidth,i=getComputedStyle(t);return e-=parseFloat(i.paddingLeft)+parseFloat(i.paddingRight),e}static getInnerHeight(t){let e=t.offsetHeight,i=getComputedStyle(t);return e+=parseFloat(i.paddingTop)+parseFloat(i.paddingBottom),e}static getOuterHeight(t,e){let i=t.offsetHeight;if(e){let s=getComputedStyle(t);i+=parseFloat(s.marginTop)+parseFloat(s.marginBottom)}return i}static getHeight(t){let e=t.offsetHeight,i=getComputedStyle(t);return e-=parseFloat(i.paddingTop)+parseFloat(i.paddingBottom)+parseFloat(i.borderTopWidth)+parseFloat(i.borderBottomWidth),e}static getWidth(t){let e=t.offsetWidth,i=getComputedStyle(t);return e-=parseFloat(i.paddingLeft)+parseFloat(i.paddingRight)+parseFloat(i.borderLeftWidth)+parseFloat(i.borderRightWidth),e}static getViewport(){let t=window,e=document,i=e.documentElement,s=e.getElementsByTagName("body")[0],a=t.innerWidth||i.clientWidth||s.clientWidth,o=t.innerHeight||i.clientHeight||s.clientHeight;return{width:a,height:o}}static getOffset(t){var e=t.getBoundingClientRect();return{top:e.top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0),left:e.left+(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0)}}static replaceElementWith(t,e){let i=t.parentNode;if(!i)throw"Can't replace element";return i.replaceChild(e,t)}static getUserAgent(){if(navigator&&this.isClient())return navigator.userAgent}static isIE(){var t=window.navigator.userAgent,e=t.indexOf("MSIE ");if(e>0)return!0;var i=t.indexOf("Trident/");if(i>0){var s=t.indexOf("rv:");return!0}var a=t.indexOf("Edge/");return a>0}static isIOS(){return/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream}static isAndroid(){return/(android)/i.test(navigator.userAgent)}static isTouchDevice(){return"ontouchstart"in window||navigator.maxTouchPoints>0}static appendChild(t,e){if(this.isElement(e))e.appendChild(t);else if(e&&e.el&&e.el.nativeElement)e.el.nativeElement.appendChild(t);else throw"Cannot append "+e+" to "+t}static removeChild(t,e){if(this.isElement(e))e.removeChild(t);else if(e.el&&e.el.nativeElement)e.el.nativeElement.removeChild(t);else throw"Cannot remove "+t+" from "+e}static removeElement(t){"remove"in Element.prototype?t.remove():t.parentNode.removeChild(t)}static isElement(t){return typeof HTMLElement=="object"?t instanceof HTMLElement:t&&typeof t=="object"&&t!==null&&t.nodeType===1&&typeof t.nodeName=="string"}static calculateScrollbarWidth(t){if(t){let e=getComputedStyle(t);return t.offsetWidth-t.clientWidth-parseFloat(e.borderLeftWidth)-parseFloat(e.borderRightWidth)}else{if(this.calculatedScrollbarWidth!==null)return this.calculatedScrollbarWidth;let e=document.createElement("div");e.className="p-scrollbar-measure",document.body.appendChild(e);let i=e.offsetWidth-e.clientWidth;return document.body.removeChild(e),this.calculatedScrollbarWidth=i,i}}static calculateScrollbarHeight(){if(this.calculatedScrollbarHeight!==null)return this.calculatedScrollbarHeight;let t=document.createElement("div");t.className="p-scrollbar-measure",document.body.appendChild(t);let e=t.offsetHeight-t.clientHeight;return document.body.removeChild(t),this.calculatedScrollbarWidth=e,e}static invokeElementMethod(t,e,i){t[e].apply(t,i)}static clearSelection(){if(window.getSelection)window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().rangeCount>0&&window.getSelection().getRangeAt(0).getClientRects().length>0&&window.getSelection().removeAllRanges();else if(document.selection&&document.selection.empty)try{document.selection.empty()}catch{}}static getBrowser(){if(!this.browser){let t=this.resolveUserAgent();this.browser={},t.browser&&(this.browser[t.browser]=!0,this.browser.version=t.version),this.browser.chrome?this.browser.webkit=!0:this.browser.webkit&&(this.browser.safari=!0)}return this.browser}static resolveUserAgent(){let t=navigator.userAgent.toLowerCase(),e=/(chrome)[ \/]([\w.]+)/.exec(t)||/(webkit)[ \/]([\w.]+)/.exec(t)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(t)||/(msie) ([\w.]+)/.exec(t)||t.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(t)||[];return{browser:e[1]||"",version:e[2]||"0"}}static isInteger(t){return Number.isInteger?Number.isInteger(t):typeof t=="number"&&isFinite(t)&&Math.floor(t)===t}static isHidden(t){return!t||t.offsetParent===null}static isVisible(t){return t&&t.offsetParent!=null}static isExist(t){return t!==null&&typeof t<"u"&&t.nodeName&&t.parentNode}static focus(t,e){t&&document.activeElement!==t&&t.focus(e)}static getFocusableSelectorString(t=""){return`button:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},
2
2
  [href][clientHeight][clientWidth]:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},
3
3
  input:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},
4
4
  select:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},
@@ -1,2 +1,2 @@
1
- import{Aa as _e,Ba as be,C as se,I as le,ga as q,oa as me,pa as ue,za as he}from"./chunk-H6ZLSW2P.js";import{B as ce,a as ae,h as de,n as ne}from"./chunk-3GTEMSAF.js";import{Ca as k,Cb as _,Da as p,Eb as Y,Fb as J,Gb as W,Ha as U,Kc as re,Lb as X,Mb as G,Nb as y,Ob as C,Pa as m,Qa as n,Tb as Z,Vb as ee,Xc as R,Ya as Q,ac as ie,bc as te,da as V,db as w,eb as K,ec as oe,fa as f,fb as F,ga as M,gb as c,ia as j,ib as O,jb as H,ma as v,na as g,oa as B,ta as D,tb as s,ua as T,ub as l,vb as A,xc as x,ya as N,yc as u,za as L,zb as $,zc as z}from"./chunk-UIXWZ3VD.js";var ye=["input"],Ce=["formField"],Re=["*"],pe=0,I=class{constructor(o,d){this.source=o,this.value=d}},Ie={provide:ae,useExisting:V(()=>S),multi:!0},fe=new M("MatRadioGroup"),Ee=new M("mat-radio-default-options",{providedIn:"root",factory:Me});function Me(){return{color:"accent"}}var S=(()=>{let o=class o{get name(){return this._name}set name(e){this._name=e,this._updateRadioButtonNames()}get labelPosition(){return this._labelPosition}set labelPosition(e){this._labelPosition=e==="before"?"before":"after",this._markRadiosForCheck()}get value(){return this._value}set value(e){this._value!==e&&(this._value=e,this._updateSelectedRadioFromValue(),this._checkSelectedRadioButton())}_checkSelectedRadioButton(){this._selected&&!this._selected.checked&&(this._selected.checked=!0)}get selected(){return this._selected}set selected(e){this._selected=e,this.value=e?e.value:null,this._checkSelectedRadioButton()}get disabled(){return this._disabled}set disabled(e){this._disabled=e,this._markRadiosForCheck()}get required(){return this._required}set required(e){this._required=e,this._markRadiosForCheck()}constructor(e){this._changeDetector=e,this._value=null,this._name=`mat-radio-group-${pe++}`,this._selected=null,this._isInitialized=!1,this._labelPosition="after",this._disabled=!1,this._required=!1,this._controlValueAccessorChangeFn=()=>{},this.onTouched=()=>{},this.change=new p}ngAfterContentInit(){this._isInitialized=!0,this._buttonChanges=this._radios.changes.subscribe(()=>{this.selected&&!this._radios.find(e=>e===this.selected)&&(this._selected=null)})}ngOnDestroy(){this._buttonChanges?.unsubscribe()}_touch(){this.onTouched&&this.onTouched()}_updateRadioButtonNames(){this._radios&&this._radios.forEach(e=>{e.name=this.name,e._markForCheck()})}_updateSelectedRadioFromValue(){let e=this._selected!==null&&this._selected.value===this._value;this._radios&&!e&&(this._selected=null,this._radios.forEach(i=>{i.checked=this.value===i.value,i.checked&&(this._selected=i)}))}_emitChangeEvent(){this._isInitialized&&this.change.emit(new I(this._selected,this._value))}_markRadiosForCheck(){this._radios&&this._radios.forEach(e=>e._markForCheck())}writeValue(e){this.value=e,this._changeDetector.markForCheck()}registerOnChange(e){this._controlValueAccessorChangeFn=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.disabled=e,this._changeDetector.markForCheck()}};o.\u0275fac=function(i){return new(i||o)(n(x))},o.\u0275dir=B({type:o,selectors:[["mat-radio-group"]],contentQueries:function(i,t,a){if(i&1&&X(a,E,5),i&2){let h;y(h=C())&&(t._radios=h)}},hostAttrs:["role","radiogroup",1,"mat-mdc-radio-group"],inputs:{color:"color",name:"name",labelPosition:"labelPosition",value:"value",selected:"selected",disabled:[2,"disabled","disabled",u],required:[2,"required","required",u]},outputs:{change:"change"},exportAs:["matRadioGroup"],standalone:!0,features:[ie([Ie,{provide:fe,useExisting:o}]),w]});let r=o;return r})(),E=(()=>{let o=class o{get checked(){return this._checked}set checked(e){this._checked!==e&&(this._checked=e,e&&this.radioGroup&&this.radioGroup.value!==this.value?this.radioGroup.selected=this:!e&&this.radioGroup&&this.radioGroup.value===this.value&&(this.radioGroup.selected=null),e&&this._radioDispatcher.notify(this.id,this.name),this._changeDetector.markForCheck())}get value(){return this._value}set value(e){this._value!==e&&(this._value=e,this.radioGroup!==null&&(this.checked||(this.checked=this.radioGroup.value===e),this.checked&&(this.radioGroup.selected=this)))}get labelPosition(){return this._labelPosition||this.radioGroup&&this.radioGroup.labelPosition||"after"}set labelPosition(e){this._labelPosition=e}get disabled(){return this._disabled||this.radioGroup!==null&&this.radioGroup.disabled}set disabled(e){this._setDisabled(e)}get required(){return this._required||this.radioGroup&&this.radioGroup.required}set required(e){this._required=e}get color(){return this._color||this.radioGroup&&this.radioGroup.color||this._providerOverride&&this._providerOverride.color||"accent"}set color(e){this._color=e}get inputId(){return`${this.id||this._uniqueId}-input`}constructor(e,i,t,a,h,b,ge,P){this._elementRef=i,this._changeDetector=t,this._focusMonitor=a,this._radioDispatcher=h,this._providerOverride=ge,this._uniqueId=`mat-radio-${++pe}`,this.id=this._uniqueId,this.disableRipple=!1,this.tabIndex=0,this.change=new p,this._checked=!1,this._value=null,this._removeUniqueSelectionListener=()=>{},this._injector=j(L),this.radioGroup=e,this._noopAnimations=b==="NoopAnimations",P&&(this.tabIndex=z(P,0))}focus(e,i){i?this._focusMonitor.focusVia(this._inputElement,i,e):this._inputElement.nativeElement.focus(e)}_markForCheck(){this._changeDetector.markForCheck()}ngOnInit(){this.radioGroup&&(this.checked=this.radioGroup.value===this._value,this.checked&&(this.radioGroup.selected=this),this.name=this.radioGroup.name),this._removeUniqueSelectionListener=this._radioDispatcher.listen((e,i)=>{e!==this.id&&i===this.name&&(this.checked=!1)})}ngDoCheck(){this._updateTabIndex()}ngAfterViewInit(){this._updateTabIndex(),this._focusMonitor.monitor(this._elementRef,!0).subscribe(e=>{!e&&this.radioGroup&&this.radioGroup._touch()})}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._removeUniqueSelectionListener()}_emitChangeEvent(){this.change.emit(new I(this,this._value))}_isRippleDisabled(){return this.disableRipple||this.disabled}_onInputClick(e){e.stopPropagation()}_onInputInteraction(e){if(e.stopPropagation(),!this.checked&&!this.disabled){let i=this.radioGroup&&this.value!==this.radioGroup.value;this.checked=!0,this._emitChangeEvent(),this.radioGroup&&(this.radioGroup._controlValueAccessorChangeFn(this.value),i&&this.radioGroup._emitChangeEvent())}}_onTouchTargetClick(e){this._onInputInteraction(e),this.disabled||this._inputElement.nativeElement.focus()}_setDisabled(e){this._disabled!==e&&(this._disabled=e,this._changeDetector.markForCheck())}_updateTabIndex(){let e=this.radioGroup,i;if(!e||!e.selected||this.disabled?i=this.tabIndex:i=e.selected===this?this.tabIndex:-1,i!==this._previousTabIndex){let t=this._inputElement?.nativeElement;t&&(t.setAttribute("tabindex",i+""),this._previousTabIndex=i,Q(()=>{queueMicrotask(()=>{e&&e.selected&&e.selected!==this&&document.activeElement===t&&(e.selected?._inputElement.nativeElement.focus(),document.activeElement===t&&this._inputElement.nativeElement.blur())})},{injector:this._injector}))}}};o.\u0275fac=function(i){return new(i||o)(n(fe,8),n(k),n(x),n(se),n(le),n(U,8),n(Ee,8),N("tabindex"))},o.\u0275cmp=v({type:o,selectors:[["mat-radio-button"]],viewQuery:function(i,t){if(i&1&&(G(ye,5),G(Ce,7,k)),i&2){let a;y(a=C())&&(t._inputElement=a.first),y(a=C())&&(t._rippleTrigger=a.first)}},hostAttrs:[1,"mat-mdc-radio-button"],hostVars:15,hostBindings:function(i,t){i&1&&_("focus",function(){return t._inputElement.nativeElement.focus()}),i&2&&(F("id",t.id)("tabindex",null)("aria-label",null)("aria-labelledby",null)("aria-describedby",null),O("mat-primary",t.color==="primary")("mat-accent",t.color==="accent")("mat-warn",t.color==="warn")("mat-mdc-radio-checked",t.checked)("_mat-animation-noopable",t._noopAnimations))},inputs:{id:"id",name:"name",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[0,"aria-describedby","ariaDescribedby"],disableRipple:[2,"disableRipple","disableRipple",u],tabIndex:[2,"tabIndex","tabIndex",e=>e==null?0:z(e)],checked:[2,"checked","checked",u],value:"value",labelPosition:"labelPosition",disabled:[2,"disabled","disabled",u],required:[2,"required","required",u],color:"color"},outputs:{change:"change"},exportAs:["matRadioButton"],standalone:!0,features:[w,te],ngContentSelectors:Re,decls:13,vars:16,consts:[["formField",""],["input",""],["mat-internal-form-field","",3,"labelPosition"],[1,"mdc-radio"],[1,"mat-mdc-radio-touch-target",3,"click"],["type","radio",1,"mdc-radio__native-control",3,"change","id","checked","disabled","required"],[1,"mdc-radio__background"],[1,"mdc-radio__outer-circle"],[1,"mdc-radio__inner-circle"],["mat-ripple","",1,"mat-radio-ripple","mat-mdc-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered"],[1,"mat-ripple-element","mat-radio-persistent-ripple"],[1,"mdc-label",3,"for"]],template:function(i,t){if(i&1){let a=$();J(),s(0,"div",2,0)(2,"div",3)(3,"div",4),_("click",function(b){return D(a),T(t._onTouchTargetClick(b))}),l(),s(4,"input",5,1),_("change",function(b){return D(a),T(t._onInputInteraction(b))}),l(),s(6,"div",6),A(7,"div",7)(8,"div",8),l(),s(9,"div",9),A(10,"div",10),l()(),s(11,"label",11),W(12),l()()}i&2&&(c("labelPosition",t.labelPosition),m(2),O("mdc-radio--disabled",t.disabled),m(2),c("id",t.inputId)("checked",t.checked)("disabled",t.disabled)("required",t.required),F("name",t.name)("value",t.value)("aria-label",t.ariaLabel)("aria-labelledby",t.ariaLabelledby)("aria-describedby",t.ariaDescribedby),m(5),c("matRippleTrigger",t._rippleTrigger.nativeElement)("matRippleDisabled",t._isRippleDisabled())("matRippleCentered",!0),m(2),c("for",t.inputId))},dependencies:[me,he],styles:['.mat-mdc-radio-button{-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-radio-button .mdc-radio{display:inline-block;position:relative;flex:0 0 auto;box-sizing:content-box;width:20px;height:20px;cursor:pointer;will-change:opacity,transform,border-color,color;padding:calc((var(--mdc-radio-state-layer-size) - 20px)/2)}.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:not([disabled]):not(:focus)~.mdc-radio__background::before{opacity:.04;transform:scale(1)}.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:not([disabled])~.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-hover-icon-color)}.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-selected-hover-icon-color)}.mat-mdc-radio-button .mdc-radio:active .mdc-radio__native-control:enabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-pressed-icon-color)}.mat-mdc-radio-button .mdc-radio:active .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio:active .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-selected-pressed-icon-color)}.mat-mdc-radio-button .mdc-radio__background{display:inline-block;position:relative;box-sizing:border-box;width:20px;height:20px}.mat-mdc-radio-button .mdc-radio__background::before{position:absolute;transform:scale(0, 0);border-radius:50%;opacity:0;pointer-events:none;content:"";transition:opacity 90ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms cubic-bezier(0.4, 0, 0.6, 1);width:var(--mdc-radio-state-layer-size);height:var(--mdc-radio-state-layer-size);top:calc(-1*(var(--mdc-radio-state-layer-size) - 20px)/2);left:calc(-1*(var(--mdc-radio-state-layer-size) - 20px)/2)}.mat-mdc-radio-button .mdc-radio__outer-circle{position:absolute;top:0;left:0;box-sizing:border-box;width:100%;height:100%;border-width:2px;border-style:solid;border-radius:50%;transition:border-color 90ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-radio-button .mdc-radio__inner-circle{position:absolute;top:0;left:0;box-sizing:border-box;width:100%;height:100%;transform:scale(0, 0);border-width:10px;border-style:solid;border-radius:50%;transition:transform 90ms cubic-bezier(0.4, 0, 0.6, 1),border-color 90ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-radio-button .mdc-radio__native-control{position:absolute;margin:0;padding:0;opacity:0;top:0;right:0;left:0;cursor:inherit;z-index:1;width:var(--mdc-radio-state-layer-size);height:var(--mdc-radio-state-layer-size)}.mat-mdc-radio-button .mdc-radio__native-control:checked+.mdc-radio__background,.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background{transition:opacity 90ms cubic-bezier(0, 0, 0.2, 1),transform 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__outer-circle{transition:border-color 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle{transition:transform 90ms cubic-bezier(0, 0, 0.2, 1),border-color 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio__native-control:focus+.mdc-radio__background::before{transform:scale(1);opacity:.12;transition:opacity 90ms cubic-bezier(0, 0, 0.2, 1),transform 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio__native-control:disabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-disabled-unselected-icon-color);opacity:var(--mdc-radio-disabled-unselected-icon-opacity)}.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background{cursor:default}.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-disabled-selected-icon-color);opacity:var(--mdc-radio-disabled-selected-icon-opacity)}.mat-mdc-radio-button .mdc-radio__native-control:enabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-icon-color)}.mat-mdc-radio-button .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-selected-icon-color)}.mat-mdc-radio-button .mdc-radio__native-control:enabled:focus:checked+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button .mdc-radio__native-control:enabled:focus:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-selected-focus-icon-color)}.mat-mdc-radio-button .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__inner-circle{transform:scale(0.5);transition:transform 90ms cubic-bezier(0, 0, 0.2, 1),border-color 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio--disabled{cursor:default;pointer-events:none}.mat-mdc-radio-button._mat-animation-noopable .mdc-radio__background::before,.mat-mdc-radio-button._mat-animation-noopable .mdc-radio__outer-circle,.mat-mdc-radio-button._mat-animation-noopable .mdc-radio__inner-circle{transition:none !important}.mat-mdc-radio-button .mdc-radio__background::before{background-color:var(--mat-radio-ripple-color)}.mat-mdc-radio-button.mat-mdc-radio-checked .mdc-radio__background::before{background-color:var(--mat-radio-checked-ripple-color)}.mat-mdc-radio-button.mat-mdc-radio-checked .mat-ripple-element{background-color:var(--mat-radio-checked-ripple-color)}.mat-mdc-radio-button .mat-internal-form-field{color:var(--mat-radio-label-text-color);font-family:var(--mat-radio-label-text-font);line-height:var(--mat-radio-label-text-line-height);font-size:var(--mat-radio-label-text-size);letter-spacing:var(--mat-radio-label-text-tracking);font-weight:var(--mat-radio-label-text-weight)}.mat-mdc-radio-button .mdc-radio--disabled+label{color:var(--mat-radio-disabled-label-color)}.mat-mdc-radio-button .mat-radio-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:50%}.mat-mdc-radio-button .mat-radio-ripple .mat-ripple-element{opacity:.14}.mat-mdc-radio-button .mat-radio-ripple::before{border-radius:50%}.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:focus:enabled:not(:checked)~.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-focus-icon-color, black)}.mat-mdc-radio-button.cdk-focused .mat-mdc-focus-indicator::before{content:""}.mat-mdc-radio-touch-target{position:absolute;top:50%;left:50%;height:48px;width:48px;transform:translate(-50%, -50%);display:var(--mat-radio-touch-target-display)}[dir=rtl] .mat-mdc-radio-touch-target{left:auto;right:50%;transform:translate(50%, -50%)}'],encapsulation:2,changeDetection:0});let r=o;return r})(),ve=(()=>{let o=class o{};o.\u0275fac=function(i){return new(i||o)},o.\u0275mod=g({type:o}),o.\u0275inj=f({imports:[q,R,ue,E,q]});let r=o;return r})();var Te=(r,o)=>({color:r,"font-weight":o});function we(r,o){if(r&1&&(s(0,"mat-radio-button",2),Z(1),l()),r&2){let d=o.$implicit,e=o.index,i=Y();H(oe(7,Te,i.model==d.Key&&i.activeBold?"#0976b4":"",i.model==d.Key&&i.activeBold?"700":"")),c("disabled",i.exception==d.Value)("matTooltip",i.title.length>0?i.title[e]:"")("value",d.Key)("name",i.name),m(),ee("",d.Value," ")}}var ci=(()=>{class r{model;disabled;modelChange=new p;options=[{Key:!1,Value:"No"},{Key:!0,Value:"Yes"}];border=!1;name;title=[];exception;activeBold;change(d){this.modelChange.emit(d)}static \u0275fac=function(e){return new(e||r)};static \u0275cmp=v({type:r,selectors:[["radio-options"]],inputs:{model:"model",disabled:"disabled",options:"options",border:"border",name:"name",title:"title",exception:"exception",activeBold:"activeBold"},outputs:{modelChange:"modelChange"},decls:2,vars:3,consts:[["color","primary",3,"ngModelChange","disabled","ngModel"],["matTooltipPosition","above","class","me-4 mt-1",3,"style","disabled","matTooltip","value","name",4,"ngFor","ngForOf"],["matTooltipPosition","above",1,"me-4","mt-1",3,"disabled","matTooltip","value","name"]],template:function(e,i){e&1&&(s(0,"mat-radio-group",0),_("ngModelChange",function(a){return i.change(a)}),K(1,we,2,10,"mat-radio-button",1),l()),e&2&&(c("disabled",i.disabled)("ngModel",i.model),m(),c("ngForOf",i.options))},dependencies:[S,E,re,de,ne,_e],styles:[`html{--mdc-radio-state-layer-size: 36px;--mat-radio-touch-target-display: block}.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:#0976b4!important}.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:enabled+.mdc-radio__background .mdc-radio__inner-circle{background-color:#0976b4!important;border-color:#0976b4!important}
1
+ import{Aa as _e,Ba as be,C as se,I as le,ga as q,oa as me,pa as ue,za as he}from"./chunk-42P7XUOZ.js";import{B as ce,a as ae,h as de,n as ne}from"./chunk-L5W4WVTO.js";import{Ca as k,Cb as _,Da as p,Eb as Y,Fb as J,Gb as W,Ha as U,Kc as re,Lb as X,Mb as G,Nb as y,Ob as C,Pa as m,Qa as n,Tb as Z,Vb as ee,Xc as R,Ya as Q,ac as ie,bc as te,da as V,db as w,eb as K,ec as oe,fa as f,fb as F,ga as M,gb as c,ia as j,ib as O,jb as H,ma as v,na as g,oa as B,ta as D,tb as s,ua as T,ub as l,vb as A,xc as x,ya as N,yc as u,za as L,zb as $,zc as z}from"./chunk-GXWDPDLH.js";var ye=["input"],Ce=["formField"],Re=["*"],pe=0,I=class{constructor(o,d){this.source=o,this.value=d}},Ie={provide:ae,useExisting:V(()=>S),multi:!0},fe=new M("MatRadioGroup"),Ee=new M("mat-radio-default-options",{providedIn:"root",factory:Me});function Me(){return{color:"accent"}}var S=(()=>{let o=class o{get name(){return this._name}set name(e){this._name=e,this._updateRadioButtonNames()}get labelPosition(){return this._labelPosition}set labelPosition(e){this._labelPosition=e==="before"?"before":"after",this._markRadiosForCheck()}get value(){return this._value}set value(e){this._value!==e&&(this._value=e,this._updateSelectedRadioFromValue(),this._checkSelectedRadioButton())}_checkSelectedRadioButton(){this._selected&&!this._selected.checked&&(this._selected.checked=!0)}get selected(){return this._selected}set selected(e){this._selected=e,this.value=e?e.value:null,this._checkSelectedRadioButton()}get disabled(){return this._disabled}set disabled(e){this._disabled=e,this._markRadiosForCheck()}get required(){return this._required}set required(e){this._required=e,this._markRadiosForCheck()}constructor(e){this._changeDetector=e,this._value=null,this._name=`mat-radio-group-${pe++}`,this._selected=null,this._isInitialized=!1,this._labelPosition="after",this._disabled=!1,this._required=!1,this._controlValueAccessorChangeFn=()=>{},this.onTouched=()=>{},this.change=new p}ngAfterContentInit(){this._isInitialized=!0,this._buttonChanges=this._radios.changes.subscribe(()=>{this.selected&&!this._radios.find(e=>e===this.selected)&&(this._selected=null)})}ngOnDestroy(){this._buttonChanges?.unsubscribe()}_touch(){this.onTouched&&this.onTouched()}_updateRadioButtonNames(){this._radios&&this._radios.forEach(e=>{e.name=this.name,e._markForCheck()})}_updateSelectedRadioFromValue(){let e=this._selected!==null&&this._selected.value===this._value;this._radios&&!e&&(this._selected=null,this._radios.forEach(i=>{i.checked=this.value===i.value,i.checked&&(this._selected=i)}))}_emitChangeEvent(){this._isInitialized&&this.change.emit(new I(this._selected,this._value))}_markRadiosForCheck(){this._radios&&this._radios.forEach(e=>e._markForCheck())}writeValue(e){this.value=e,this._changeDetector.markForCheck()}registerOnChange(e){this._controlValueAccessorChangeFn=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.disabled=e,this._changeDetector.markForCheck()}};o.\u0275fac=function(i){return new(i||o)(n(x))},o.\u0275dir=B({type:o,selectors:[["mat-radio-group"]],contentQueries:function(i,t,a){if(i&1&&X(a,E,5),i&2){let h;y(h=C())&&(t._radios=h)}},hostAttrs:["role","radiogroup",1,"mat-mdc-radio-group"],inputs:{color:"color",name:"name",labelPosition:"labelPosition",value:"value",selected:"selected",disabled:[2,"disabled","disabled",u],required:[2,"required","required",u]},outputs:{change:"change"},exportAs:["matRadioGroup"],standalone:!0,features:[ie([Ie,{provide:fe,useExisting:o}]),w]});let r=o;return r})(),E=(()=>{let o=class o{get checked(){return this._checked}set checked(e){this._checked!==e&&(this._checked=e,e&&this.radioGroup&&this.radioGroup.value!==this.value?this.radioGroup.selected=this:!e&&this.radioGroup&&this.radioGroup.value===this.value&&(this.radioGroup.selected=null),e&&this._radioDispatcher.notify(this.id,this.name),this._changeDetector.markForCheck())}get value(){return this._value}set value(e){this._value!==e&&(this._value=e,this.radioGroup!==null&&(this.checked||(this.checked=this.radioGroup.value===e),this.checked&&(this.radioGroup.selected=this)))}get labelPosition(){return this._labelPosition||this.radioGroup&&this.radioGroup.labelPosition||"after"}set labelPosition(e){this._labelPosition=e}get disabled(){return this._disabled||this.radioGroup!==null&&this.radioGroup.disabled}set disabled(e){this._setDisabled(e)}get required(){return this._required||this.radioGroup&&this.radioGroup.required}set required(e){this._required=e}get color(){return this._color||this.radioGroup&&this.radioGroup.color||this._providerOverride&&this._providerOverride.color||"accent"}set color(e){this._color=e}get inputId(){return`${this.id||this._uniqueId}-input`}constructor(e,i,t,a,h,b,ge,P){this._elementRef=i,this._changeDetector=t,this._focusMonitor=a,this._radioDispatcher=h,this._providerOverride=ge,this._uniqueId=`mat-radio-${++pe}`,this.id=this._uniqueId,this.disableRipple=!1,this.tabIndex=0,this.change=new p,this._checked=!1,this._value=null,this._removeUniqueSelectionListener=()=>{},this._injector=j(L),this.radioGroup=e,this._noopAnimations=b==="NoopAnimations",P&&(this.tabIndex=z(P,0))}focus(e,i){i?this._focusMonitor.focusVia(this._inputElement,i,e):this._inputElement.nativeElement.focus(e)}_markForCheck(){this._changeDetector.markForCheck()}ngOnInit(){this.radioGroup&&(this.checked=this.radioGroup.value===this._value,this.checked&&(this.radioGroup.selected=this),this.name=this.radioGroup.name),this._removeUniqueSelectionListener=this._radioDispatcher.listen((e,i)=>{e!==this.id&&i===this.name&&(this.checked=!1)})}ngDoCheck(){this._updateTabIndex()}ngAfterViewInit(){this._updateTabIndex(),this._focusMonitor.monitor(this._elementRef,!0).subscribe(e=>{!e&&this.radioGroup&&this.radioGroup._touch()})}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._removeUniqueSelectionListener()}_emitChangeEvent(){this.change.emit(new I(this,this._value))}_isRippleDisabled(){return this.disableRipple||this.disabled}_onInputClick(e){e.stopPropagation()}_onInputInteraction(e){if(e.stopPropagation(),!this.checked&&!this.disabled){let i=this.radioGroup&&this.value!==this.radioGroup.value;this.checked=!0,this._emitChangeEvent(),this.radioGroup&&(this.radioGroup._controlValueAccessorChangeFn(this.value),i&&this.radioGroup._emitChangeEvent())}}_onTouchTargetClick(e){this._onInputInteraction(e),this.disabled||this._inputElement.nativeElement.focus()}_setDisabled(e){this._disabled!==e&&(this._disabled=e,this._changeDetector.markForCheck())}_updateTabIndex(){let e=this.radioGroup,i;if(!e||!e.selected||this.disabled?i=this.tabIndex:i=e.selected===this?this.tabIndex:-1,i!==this._previousTabIndex){let t=this._inputElement?.nativeElement;t&&(t.setAttribute("tabindex",i+""),this._previousTabIndex=i,Q(()=>{queueMicrotask(()=>{e&&e.selected&&e.selected!==this&&document.activeElement===t&&(e.selected?._inputElement.nativeElement.focus(),document.activeElement===t&&this._inputElement.nativeElement.blur())})},{injector:this._injector}))}}};o.\u0275fac=function(i){return new(i||o)(n(fe,8),n(k),n(x),n(se),n(le),n(U,8),n(Ee,8),N("tabindex"))},o.\u0275cmp=v({type:o,selectors:[["mat-radio-button"]],viewQuery:function(i,t){if(i&1&&(G(ye,5),G(Ce,7,k)),i&2){let a;y(a=C())&&(t._inputElement=a.first),y(a=C())&&(t._rippleTrigger=a.first)}},hostAttrs:[1,"mat-mdc-radio-button"],hostVars:15,hostBindings:function(i,t){i&1&&_("focus",function(){return t._inputElement.nativeElement.focus()}),i&2&&(F("id",t.id)("tabindex",null)("aria-label",null)("aria-labelledby",null)("aria-describedby",null),O("mat-primary",t.color==="primary")("mat-accent",t.color==="accent")("mat-warn",t.color==="warn")("mat-mdc-radio-checked",t.checked)("_mat-animation-noopable",t._noopAnimations))},inputs:{id:"id",name:"name",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[0,"aria-describedby","ariaDescribedby"],disableRipple:[2,"disableRipple","disableRipple",u],tabIndex:[2,"tabIndex","tabIndex",e=>e==null?0:z(e)],checked:[2,"checked","checked",u],value:"value",labelPosition:"labelPosition",disabled:[2,"disabled","disabled",u],required:[2,"required","required",u],color:"color"},outputs:{change:"change"},exportAs:["matRadioButton"],standalone:!0,features:[w,te],ngContentSelectors:Re,decls:13,vars:16,consts:[["formField",""],["input",""],["mat-internal-form-field","",3,"labelPosition"],[1,"mdc-radio"],[1,"mat-mdc-radio-touch-target",3,"click"],["type","radio",1,"mdc-radio__native-control",3,"change","id","checked","disabled","required"],[1,"mdc-radio__background"],[1,"mdc-radio__outer-circle"],[1,"mdc-radio__inner-circle"],["mat-ripple","",1,"mat-radio-ripple","mat-mdc-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered"],[1,"mat-ripple-element","mat-radio-persistent-ripple"],[1,"mdc-label",3,"for"]],template:function(i,t){if(i&1){let a=$();J(),s(0,"div",2,0)(2,"div",3)(3,"div",4),_("click",function(b){return D(a),T(t._onTouchTargetClick(b))}),l(),s(4,"input",5,1),_("change",function(b){return D(a),T(t._onInputInteraction(b))}),l(),s(6,"div",6),A(7,"div",7)(8,"div",8),l(),s(9,"div",9),A(10,"div",10),l()(),s(11,"label",11),W(12),l()()}i&2&&(c("labelPosition",t.labelPosition),m(2),O("mdc-radio--disabled",t.disabled),m(2),c("id",t.inputId)("checked",t.checked)("disabled",t.disabled)("required",t.required),F("name",t.name)("value",t.value)("aria-label",t.ariaLabel)("aria-labelledby",t.ariaLabelledby)("aria-describedby",t.ariaDescribedby),m(5),c("matRippleTrigger",t._rippleTrigger.nativeElement)("matRippleDisabled",t._isRippleDisabled())("matRippleCentered",!0),m(2),c("for",t.inputId))},dependencies:[me,he],styles:['.mat-mdc-radio-button{-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-radio-button .mdc-radio{display:inline-block;position:relative;flex:0 0 auto;box-sizing:content-box;width:20px;height:20px;cursor:pointer;will-change:opacity,transform,border-color,color;padding:calc((var(--mdc-radio-state-layer-size) - 20px)/2)}.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:not([disabled]):not(:focus)~.mdc-radio__background::before{opacity:.04;transform:scale(1)}.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:not([disabled])~.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-hover-icon-color)}.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-selected-hover-icon-color)}.mat-mdc-radio-button .mdc-radio:active .mdc-radio__native-control:enabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-pressed-icon-color)}.mat-mdc-radio-button .mdc-radio:active .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio:active .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-selected-pressed-icon-color)}.mat-mdc-radio-button .mdc-radio__background{display:inline-block;position:relative;box-sizing:border-box;width:20px;height:20px}.mat-mdc-radio-button .mdc-radio__background::before{position:absolute;transform:scale(0, 0);border-radius:50%;opacity:0;pointer-events:none;content:"";transition:opacity 90ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms cubic-bezier(0.4, 0, 0.6, 1);width:var(--mdc-radio-state-layer-size);height:var(--mdc-radio-state-layer-size);top:calc(-1*(var(--mdc-radio-state-layer-size) - 20px)/2);left:calc(-1*(var(--mdc-radio-state-layer-size) - 20px)/2)}.mat-mdc-radio-button .mdc-radio__outer-circle{position:absolute;top:0;left:0;box-sizing:border-box;width:100%;height:100%;border-width:2px;border-style:solid;border-radius:50%;transition:border-color 90ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-radio-button .mdc-radio__inner-circle{position:absolute;top:0;left:0;box-sizing:border-box;width:100%;height:100%;transform:scale(0, 0);border-width:10px;border-style:solid;border-radius:50%;transition:transform 90ms cubic-bezier(0.4, 0, 0.6, 1),border-color 90ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-radio-button .mdc-radio__native-control{position:absolute;margin:0;padding:0;opacity:0;top:0;right:0;left:0;cursor:inherit;z-index:1;width:var(--mdc-radio-state-layer-size);height:var(--mdc-radio-state-layer-size)}.mat-mdc-radio-button .mdc-radio__native-control:checked+.mdc-radio__background,.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background{transition:opacity 90ms cubic-bezier(0, 0, 0.2, 1),transform 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__outer-circle{transition:border-color 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle{transition:transform 90ms cubic-bezier(0, 0, 0.2, 1),border-color 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio__native-control:focus+.mdc-radio__background::before{transform:scale(1);opacity:.12;transition:opacity 90ms cubic-bezier(0, 0, 0.2, 1),transform 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio__native-control:disabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-disabled-unselected-icon-color);opacity:var(--mdc-radio-disabled-unselected-icon-opacity)}.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background{cursor:default}.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-disabled-selected-icon-color);opacity:var(--mdc-radio-disabled-selected-icon-opacity)}.mat-mdc-radio-button .mdc-radio__native-control:enabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-icon-color)}.mat-mdc-radio-button .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-selected-icon-color)}.mat-mdc-radio-button .mdc-radio__native-control:enabled:focus:checked+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button .mdc-radio__native-control:enabled:focus:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-selected-focus-icon-color)}.mat-mdc-radio-button .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__inner-circle{transform:scale(0.5);transition:transform 90ms cubic-bezier(0, 0, 0.2, 1),border-color 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio--disabled{cursor:default;pointer-events:none}.mat-mdc-radio-button._mat-animation-noopable .mdc-radio__background::before,.mat-mdc-radio-button._mat-animation-noopable .mdc-radio__outer-circle,.mat-mdc-radio-button._mat-animation-noopable .mdc-radio__inner-circle{transition:none !important}.mat-mdc-radio-button .mdc-radio__background::before{background-color:var(--mat-radio-ripple-color)}.mat-mdc-radio-button.mat-mdc-radio-checked .mdc-radio__background::before{background-color:var(--mat-radio-checked-ripple-color)}.mat-mdc-radio-button.mat-mdc-radio-checked .mat-ripple-element{background-color:var(--mat-radio-checked-ripple-color)}.mat-mdc-radio-button .mat-internal-form-field{color:var(--mat-radio-label-text-color);font-family:var(--mat-radio-label-text-font);line-height:var(--mat-radio-label-text-line-height);font-size:var(--mat-radio-label-text-size);letter-spacing:var(--mat-radio-label-text-tracking);font-weight:var(--mat-radio-label-text-weight)}.mat-mdc-radio-button .mdc-radio--disabled+label{color:var(--mat-radio-disabled-label-color)}.mat-mdc-radio-button .mat-radio-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:50%}.mat-mdc-radio-button .mat-radio-ripple .mat-ripple-element{opacity:.14}.mat-mdc-radio-button .mat-radio-ripple::before{border-radius:50%}.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:focus:enabled:not(:checked)~.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-focus-icon-color, black)}.mat-mdc-radio-button.cdk-focused .mat-mdc-focus-indicator::before{content:""}.mat-mdc-radio-touch-target{position:absolute;top:50%;left:50%;height:48px;width:48px;transform:translate(-50%, -50%);display:var(--mat-radio-touch-target-display)}[dir=rtl] .mat-mdc-radio-touch-target{left:auto;right:50%;transform:translate(50%, -50%)}'],encapsulation:2,changeDetection:0});let r=o;return r})(),ve=(()=>{let o=class o{};o.\u0275fac=function(i){return new(i||o)},o.\u0275mod=g({type:o}),o.\u0275inj=f({imports:[q,R,ue,E,q]});let r=o;return r})();var Te=(r,o)=>({color:r,"font-weight":o});function we(r,o){if(r&1&&(s(0,"mat-radio-button",2),Z(1),l()),r&2){let d=o.$implicit,e=o.index,i=Y();H(oe(7,Te,i.model==d.Key&&i.activeBold?"#0976b4":"",i.model==d.Key&&i.activeBold?"700":"")),c("disabled",i.exception==d.Value)("matTooltip",i.title.length>0?i.title[e]:"")("value",d.Key)("name",i.name),m(),ee("",d.Value," ")}}var ci=(()=>{class r{model;disabled;modelChange=new p;options=[{Key:!1,Value:"No"},{Key:!0,Value:"Yes"}];border=!1;name;title=[];exception;activeBold;change(d){this.modelChange.emit(d)}static \u0275fac=function(e){return new(e||r)};static \u0275cmp=v({type:r,selectors:[["radio-options"]],inputs:{model:"model",disabled:"disabled",options:"options",border:"border",name:"name",title:"title",exception:"exception",activeBold:"activeBold"},outputs:{modelChange:"modelChange"},decls:2,vars:3,consts:[["color","primary",3,"ngModelChange","disabled","ngModel"],["matTooltipPosition","above","class","me-4 mt-1",3,"style","disabled","matTooltip","value","name",4,"ngFor","ngForOf"],["matTooltipPosition","above",1,"me-4","mt-1",3,"disabled","matTooltip","value","name"]],template:function(e,i){e&1&&(s(0,"mat-radio-group",0),_("ngModelChange",function(a){return i.change(a)}),K(1,we,2,10,"mat-radio-button",1),l()),e&2&&(c("disabled",i.disabled)("ngModel",i.model),m(),c("ngForOf",i.options))},dependencies:[S,E,re,de,ne,_e],styles:[`html{--mdc-radio-state-layer-size: 36px;--mat-radio-touch-target-display: block}.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:#0976b4!important}.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:enabled+.mdc-radio__background .mdc-radio__inner-circle{background-color:#0976b4!important;border-color:#0976b4!important}
2
2
  `],encapsulation:2})}return r})(),si=(()=>{class r{static \u0275fac=function(e){return new(e||r)};static \u0275mod=g({type:r});static \u0275inj=f({imports:[ve,R,ce,be]})}return r})();export{S as a,E as b,ve as c,ci as d,si as e};
@@ -1 +1 @@
1
- import{a as le}from"./chunk-SAIURYQC.js";import{E as de,Jd as me,Ld as we,c as L,d as j,ea as pe,ha as _e,m as fe,o as ae}from"./chunk-UIXWZ3VD.js";import{a as m,b as D,c as A,i as g}from"./chunk-QFE4KTJQ.js";var C=class extends Error{constructor(e,t){let n=new.target.prototype;super(`${e}: Status code '${t}'`),this.statusCode=t,this.__proto__=n}},T=class extends Error{constructor(e="A timeout occurred."){let t=new.target.prototype;super(e),this.__proto__=t}},S=class extends Error{constructor(e="An abort occurred."){let t=new.target.prototype;super(e),this.__proto__=t}},F=class extends Error{constructor(e,t){let n=new.target.prototype;super(e),this.transport=t,this.errorType="UnsupportedTransportError",this.__proto__=n}},q=class extends Error{constructor(e,t){let n=new.target.prototype;super(e),this.transport=t,this.errorType="DisabledTransportError",this.__proto__=n}},z=class extends Error{constructor(e,t){let n=new.target.prototype;super(e),this.transport=t,this.errorType="FailedToStartTransportError",this.__proto__=n}},N=class extends Error{constructor(e){let t=new.target.prototype;super(e),this.errorType="FailedToNegotiateWithServerError",this.__proto__=t}},K=class extends Error{constructor(e,t){let n=new.target.prototype;super(e),this.innerErrors=t,this.__proto__=n}};var H=class{constructor(e,t,n){this.statusCode=e,this.statusText=t,this.content=n}},k=class{get(e,t){return this.send(D(m({},t),{method:"GET",url:e}))}post(e,t){return this.send(D(m({},t),{method:"POST",url:e}))}delete(e,t){return this.send(D(m({},t),{method:"DELETE",url:e}))}getCookieString(e){return""}};var i=function(r){return r[r.Trace=0]="Trace",r[r.Debug=1]="Debug",r[r.Information=2]="Information",r[r.Warning=3]="Warning",r[r.Error=4]="Error",r[r.Critical=5]="Critical",r[r.None=6]="None",r}(i||{});var E=class{constructor(){}log(e,t){}};E.instance=new E;var ve="8.0.7",d=class{static isRequired(e,t){if(e==null)throw new Error(`The '${t}' argument is required.`)}static isNotEmpty(e,t){if(!e||e.match(/^\s*$/))throw new Error(`The '${t}' argument should not be empty.`)}static isIn(e,t,n){if(!(e in t))throw new Error(`Unknown ${n} value: ${e}.`)}},_=class r{static get isBrowser(){return!r.isNode&&typeof window=="object"&&typeof window.document=="object"}static get isWebWorker(){return!r.isNode&&typeof self=="object"&&"importScripts"in self}static get isReactNative(){return!r.isNode&&typeof window=="object"&&typeof window.document>"u"}static get isNode(){return typeof process<"u"&&process.release&&process.release.name==="node"}};function R(r,e){let t="";return v(r)?(t=`Binary data of length ${r.byteLength}`,e&&(t+=`. Content: '${ke(r)}'`)):typeof r=="string"&&(t=`String data of length ${r.length}`,e&&(t+=`. Content: '${r}'`)),t}function ke(r){let e=new Uint8Array(r),t="";return e.forEach(n=>{let o=n<16?"0":"";t+=`0x${o}${n.toString(16)} `}),t.substr(0,t.length-1)}function v(r){return r&&typeof ArrayBuffer<"u"&&(r instanceof ArrayBuffer||r.constructor&&r.constructor.name==="ArrayBuffer")}function X(r,e,t,n,o,s){return g(this,null,function*(){let c={},[a,l]=I();c[a]=l,r.log(i.Trace,`(${e} transport) sending data. ${R(o,s.logMessageContent)}.`);let u=v(o)?"arraybuffer":"text",f=yield t.post(n,{content:o,headers:m(m({},c),s.headers),responseType:u,timeout:s.timeout,withCredentials:s.withCredentials});r.log(i.Trace,`(${e} transport) request complete. Response status: ${f.statusCode}.`)})}function be(r){return r===void 0?new x(i.Information):r===null?E.instance:r.log!==void 0?r:new x(r)}var V=class{constructor(e,t){this._subject=e,this._observer=t}dispose(){let e=this._subject.observers.indexOf(this._observer);e>-1&&this._subject.observers.splice(e,1),this._subject.observers.length===0&&this._subject.cancelCallback&&this._subject.cancelCallback().catch(t=>{})}},x=class{constructor(e){this._minLevel=e,this.out=console}log(e,t){if(e>=this._minLevel){let n=`[${new Date().toISOString()}] ${i[e]}: ${t}`;switch(e){case i.Critical:case i.Error:this.out.error(n);break;case i.Warning:this.out.warn(n);break;case i.Information:this.out.info(n);break;default:this.out.log(n);break}}}};function I(){let r="X-SignalR-User-Agent";return _.isNode&&(r="User-Agent"),[r,Ee(ve,Ie(),Te(),Pe())]}function Ee(r,e,t,n){let o="Microsoft SignalR/",s=r.split(".");return o+=`${s[0]}.${s[1]}`,o+=` (${r}; `,e&&e!==""?o+=`${e}; `:o+="Unknown OS; ",o+=`${t}`,n?o+=`; ${n}`:o+="; Unknown Runtime Version",o+=")",o}function Ie(){if(_.isNode)switch(process.platform){case"win32":return"Windows NT";case"darwin":return"macOS";case"linux":return"Linux";default:return process.platform}else return""}function Pe(){if(_.isNode)return process.versions.node}function Te(){return _.isNode?"NodeJS":"Browser"}function J(r){return r.stack?r.stack:r.message?r.message:`${r}`}function Se(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("could not find global")}var G=class extends k{constructor(e){if(super(),this._logger=e,typeof fetch>"u"||_.isNode){let t=typeof __webpack_require__=="function"?__non_webpack_require__:A;this._jar=new(t("tough-cookie")).CookieJar,typeof fetch>"u"?this._fetchType=t("node-fetch"):this._fetchType=fetch,this._fetchType=t("fetch-cookie")(this._fetchType,this._jar)}else this._fetchType=fetch.bind(Se());if(typeof AbortController>"u"){let t=typeof __webpack_require__=="function"?__non_webpack_require__:A;this._abortControllerType=t("abort-controller")}else this._abortControllerType=AbortController}send(e){return g(this,null,function*(){if(e.abortSignal&&e.abortSignal.aborted)throw new S;if(!e.method)throw new Error("No method defined.");if(!e.url)throw new Error("No url defined.");let t=new this._abortControllerType,n;e.abortSignal&&(e.abortSignal.onabort=()=>{t.abort(),n=new S});let o=null;if(e.timeout){let l=e.timeout;o=setTimeout(()=>{t.abort(),this._logger.log(i.Warning,"Timeout from HTTP request."),n=new T},l)}e.content===""&&(e.content=void 0),e.content&&(e.headers=e.headers||{},v(e.content)?e.headers["Content-Type"]="application/octet-stream":e.headers["Content-Type"]="text/plain;charset=UTF-8");let s;try{s=yield this._fetchType(e.url,{body:e.content,cache:"no-cache",credentials:e.withCredentials===!0?"include":"same-origin",headers:m({"X-Requested-With":"XMLHttpRequest"},e.headers),method:e.method,mode:"cors",redirect:"follow",signal:t.signal})}catch(l){throw n||(this._logger.log(i.Warning,`Error from HTTP request. ${l}.`),l)}finally{o&&clearTimeout(o),e.abortSignal&&(e.abortSignal.onabort=null)}if(!s.ok){let l=yield Ce(s,"text");throw new C(l||s.statusText,s.status)}let a=yield Ce(s,e.responseType);return new H(s.status,s.statusText,a)})}getCookieString(e){let t="";return _.isNode&&this._jar&&this._jar.getCookies(e,(n,o)=>t=o.join("; ")),t}};function Ce(r,e){let t;switch(e){case"arraybuffer":t=r.arrayBuffer();break;case"text":t=r.text();break;case"blob":case"document":case"json":throw new Error(`${e} is not supported.`);default:t=r.text();break}return t}var Y=class extends k{constructor(e){super(),this._logger=e}send(e){return e.abortSignal&&e.abortSignal.aborted?Promise.reject(new S):e.method?e.url?new Promise((t,n)=>{let o=new XMLHttpRequest;o.open(e.method,e.url,!0),o.withCredentials=e.withCredentials===void 0?!0:e.withCredentials,o.setRequestHeader("X-Requested-With","XMLHttpRequest"),e.content===""&&(e.content=void 0),e.content&&(v(e.content)?o.setRequestHeader("Content-Type","application/octet-stream"):o.setRequestHeader("Content-Type","text/plain;charset=UTF-8"));let s=e.headers;s&&Object.keys(s).forEach(c=>{o.setRequestHeader(c,s[c])}),e.responseType&&(o.responseType=e.responseType),e.abortSignal&&(e.abortSignal.onabort=()=>{o.abort(),n(new S)}),e.timeout&&(o.timeout=e.timeout),o.onload=()=>{e.abortSignal&&(e.abortSignal.onabort=null),o.status>=200&&o.status<300?t(new H(o.status,o.statusText,o.response||o.responseText)):n(new C(o.response||o.responseText||o.statusText,o.status))},o.onerror=()=>{this._logger.log(i.Warning,`Error from HTTP request. ${o.status}: ${o.statusText}.`),n(new C(o.statusText,o.status))},o.ontimeout=()=>{this._logger.log(i.Warning,"Timeout from HTTP request."),n(new T)},o.send(e.content)}):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}};var Q=class extends k{constructor(e){if(super(),typeof fetch<"u"||_.isNode)this._httpClient=new G(e);else if(typeof XMLHttpRequest<"u")this._httpClient=new Y(e);else throw new Error("No usable HttpClient found.")}send(e){return e.abortSignal&&e.abortSignal.aborted?Promise.reject(new S):e.method?e.url?this._httpClient.send(e):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}getCookieString(e){return this._httpClient.getCookieString(e)}};var y=class r{static write(e){return`${e}${r.RecordSeparator}`}static parse(e){if(e[e.length-1]!==r.RecordSeparator)throw new Error("Message is incomplete.");let t=e.split(r.RecordSeparator);return t.pop(),t}};y.RecordSeparatorCode=30;y.RecordSeparator=String.fromCharCode(y.RecordSeparatorCode);var Z=class{writeHandshakeRequest(e){return y.write(JSON.stringify(e))}parseHandshakeResponse(e){let t,n;if(v(e)){let a=new Uint8Array(e),l=a.indexOf(y.RecordSeparatorCode);if(l===-1)throw new Error("Message is incomplete.");let u=l+1;t=String.fromCharCode.apply(null,Array.prototype.slice.call(a.slice(0,u))),n=a.byteLength>u?a.slice(u).buffer:null}else{let a=e,l=a.indexOf(y.RecordSeparator);if(l===-1)throw new Error("Message is incomplete.");let u=l+1;t=a.substring(0,u),n=a.length>u?a.substring(u):null}let o=y.parse(t),s=JSON.parse(o[0]);if(s.type)throw new Error("Expected a handshake response from the server.");return[n,s]}};var h=function(r){return r[r.Invocation=1]="Invocation",r[r.StreamItem=2]="StreamItem",r[r.Completion=3]="Completion",r[r.StreamInvocation=4]="StreamInvocation",r[r.CancelInvocation=5]="CancelInvocation",r[r.Ping=6]="Ping",r[r.Close=7]="Close",r[r.Ack=8]="Ack",r[r.Sequence=9]="Sequence",r}(h||{});var ee=class{constructor(){this.observers=[]}next(e){for(let t of this.observers)t.next(e)}error(e){for(let t of this.observers)t.error&&t.error(e)}complete(){for(let e of this.observers)e.complete&&e.complete()}subscribe(e){return this.observers.push(e),new V(this,e)}};var te=class{constructor(e,t,n){this._bufferSize=1e5,this._messages=[],this._totalMessageCount=0,this._waitForSequenceMessage=!1,this._nextReceivingSequenceId=1,this._latestReceivedSequenceId=0,this._bufferedByteCount=0,this._reconnectInProgress=!1,this._protocol=e,this._connection=t,this._bufferSize=n}_send(e){return g(this,null,function*(){let t=this._protocol.writeMessage(e),n=Promise.resolve();if(this._isInvocationMessage(e)){this._totalMessageCount++;let o=()=>{},s=()=>{};v(t)?this._bufferedByteCount+=t.byteLength:this._bufferedByteCount+=t.length,this._bufferedByteCount>=this._bufferSize&&(n=new Promise((c,a)=>{o=c,s=a})),this._messages.push(new he(t,this._totalMessageCount,o,s))}try{this._reconnectInProgress||(yield this._connection.send(t))}catch{this._disconnected()}yield n})}_ack(e){let t=-1;for(let n=0;n<this._messages.length;n++){let o=this._messages[n];if(o._id<=e.sequenceId)t=n,v(o._message)?this._bufferedByteCount-=o._message.byteLength:this._bufferedByteCount-=o._message.length,o._resolver();else if(this._bufferedByteCount<this._bufferSize)o._resolver();else break}t!==-1&&(this._messages=this._messages.slice(t+1))}_shouldProcessMessage(e){if(this._waitForSequenceMessage)return e.type!==h.Sequence?!1:(this._waitForSequenceMessage=!1,!0);if(!this._isInvocationMessage(e))return!0;let t=this._nextReceivingSequenceId;return this._nextReceivingSequenceId++,t<=this._latestReceivedSequenceId?(t===this._latestReceivedSequenceId&&this._ackTimer(),!1):(this._latestReceivedSequenceId=t,this._ackTimer(),!0)}_resetSequence(e){if(e.sequenceId>this._nextReceivingSequenceId){this._connection.stop(new Error("Sequence ID greater than amount of messages we've received."));return}this._nextReceivingSequenceId=e.sequenceId}_disconnected(){this._reconnectInProgress=!0,this._waitForSequenceMessage=!0}_resend(){return g(this,null,function*(){let e=this._messages.length!==0?this._messages[0]._id:this._totalMessageCount+1;yield this._connection.send(this._protocol.writeMessage({type:h.Sequence,sequenceId:e}));let t=this._messages;for(let n of t)yield this._connection.send(n._message);this._reconnectInProgress=!1})}_dispose(e){e??(e=new Error("Unable to reconnect to server."));for(let t of this._messages)t._rejector(e)}_isInvocationMessage(e){switch(e.type){case h.Invocation:case h.StreamItem:case h.Completion:case h.StreamInvocation:case h.CancelInvocation:return!0;case h.Close:case h.Sequence:case h.Ping:case h.Ack:return!1}}_ackTimer(){this._ackTimerHandle===void 0&&(this._ackTimerHandle=setTimeout(()=>g(this,null,function*(){try{this._reconnectInProgress||(yield this._connection.send(this._protocol.writeMessage({type:h.Ack,sequenceId:this._latestReceivedSequenceId})))}catch{}clearTimeout(this._ackTimerHandle),this._ackTimerHandle=void 0}),1e3))}},he=class{constructor(e,t,n,o){this._message=e,this._id=t,this._resolver=n,this._rejector=o}};var Re=30*1e3,xe=15*1e3,$e=1e5,p=function(r){return r.Disconnected="Disconnected",r.Connecting="Connecting",r.Connected="Connected",r.Disconnecting="Disconnecting",r.Reconnecting="Reconnecting",r}(p||{}),O=class r{static create(e,t,n,o,s,c,a){return new r(e,t,n,o,s,c,a)}constructor(e,t,n,o,s,c,a){this._nextKeepAlive=0,this._freezeEventListener=()=>{this._logger.log(i.Warning,"The page is being frozen, this will likely lead to the connection being closed and messages being lost. For more information see the docs at https://learn.microsoft.com/aspnet/core/signalr/javascript-client#bsleep")},d.isRequired(e,"connection"),d.isRequired(t,"logger"),d.isRequired(n,"protocol"),this.serverTimeoutInMilliseconds=s??Re,this.keepAliveIntervalInMilliseconds=c??xe,this._statefulReconnectBufferSize=a??$e,this._logger=t,this._protocol=n,this.connection=e,this._reconnectPolicy=o,this._handshakeProtocol=new Z,this.connection.onreceive=l=>this._processIncomingData(l),this.connection.onclose=l=>this._connectionClosed(l),this._callbacks={},this._methods={},this._closedCallbacks=[],this._reconnectingCallbacks=[],this._reconnectedCallbacks=[],this._invocationId=0,this._receivedHandshakeResponse=!1,this._connectionState=p.Disconnected,this._connectionStarted=!1,this._cachedPingMessage=this._protocol.writeMessage({type:h.Ping})}get state(){return this._connectionState}get connectionId(){return this.connection&&this.connection.connectionId||null}get baseUrl(){return this.connection.baseUrl||""}set baseUrl(e){if(this._connectionState!==p.Disconnected&&this._connectionState!==p.Reconnecting)throw new Error("The HubConnection must be in the Disconnected or Reconnecting state to change the url.");if(!e)throw new Error("The HubConnection url must be a valid url.");this.connection.baseUrl=e}start(){return this._startPromise=this._startWithStateTransitions(),this._startPromise}_startWithStateTransitions(){return g(this,null,function*(){if(this._connectionState!==p.Disconnected)return Promise.reject(new Error("Cannot start a HubConnection that is not in the 'Disconnected' state."));this._connectionState=p.Connecting,this._logger.log(i.Debug,"Starting HubConnection.");try{yield this._startInternal(),_.isBrowser&&window.document.addEventListener("freeze",this._freezeEventListener),this._connectionState=p.Connected,this._connectionStarted=!0,this._logger.log(i.Debug,"HubConnection connected successfully.")}catch(e){return this._connectionState=p.Disconnected,this._logger.log(i.Debug,`HubConnection failed to start successfully because of error '${e}'.`),Promise.reject(e)}})}_startInternal(){return g(this,null,function*(){this._stopDuringStartError=void 0,this._receivedHandshakeResponse=!1;let e=new Promise((t,n)=>{this._handshakeResolver=t,this._handshakeRejecter=n});yield this.connection.start(this._protocol.transferFormat);try{let t=this._protocol.version;this.connection.features.reconnect||(t=1);let n={protocol:this._protocol.name,version:t};if(this._logger.log(i.Debug,"Sending handshake request."),yield this._sendMessage(this._handshakeProtocol.writeHandshakeRequest(n)),this._logger.log(i.Information,`Using HubProtocol '${this._protocol.name}'.`),this._cleanupTimeout(),this._resetTimeoutPeriod(),this._resetKeepAliveInterval(),yield e,this._stopDuringStartError)throw this._stopDuringStartError;(this.connection.features.reconnect||!1)&&(this._messageBuffer=new te(this._protocol,this.connection,this._statefulReconnectBufferSize),this.connection.features.disconnected=this._messageBuffer._disconnected.bind(this._messageBuffer),this.connection.features.resend=()=>{if(this._messageBuffer)return this._messageBuffer._resend()}),this.connection.features.inherentKeepAlive||(yield this._sendMessage(this._cachedPingMessage))}catch(t){throw this._logger.log(i.Debug,`Hub handshake failed with error '${t}' during start(). Stopping HubConnection.`),this._cleanupTimeout(),this._cleanupPingTimer(),yield this.connection.stop(t),t}})}stop(){return g(this,null,function*(){let e=this._startPromise;this.connection.features.reconnect=!1,this._stopPromise=this._stopInternal(),yield this._stopPromise;try{yield e}catch{}})}_stopInternal(e){if(this._connectionState===p.Disconnected)return this._logger.log(i.Debug,`Call to HubConnection.stop(${e}) ignored because it is already in the disconnected state.`),Promise.resolve();if(this._connectionState===p.Disconnecting)return this._logger.log(i.Debug,`Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnecting state.`),this._stopPromise;let t=this._connectionState;return this._connectionState=p.Disconnecting,this._logger.log(i.Debug,"Stopping HubConnection."),this._reconnectDelayHandle?(this._logger.log(i.Debug,"Connection stopped during reconnect delay. Done reconnecting."),clearTimeout(this._reconnectDelayHandle),this._reconnectDelayHandle=void 0,this._completeClose(),Promise.resolve()):(t===p.Connected&&this._sendCloseMessage(),this._cleanupTimeout(),this._cleanupPingTimer(),this._stopDuringStartError=e||new S("The connection was stopped before the hub handshake could complete."),this.connection.stop(e))}_sendCloseMessage(){return g(this,null,function*(){try{yield this._sendWithProtocol(this._createCloseMessage())}catch{}})}stream(e,...t){let[n,o]=this._replaceStreamingParams(t),s=this._createStreamInvocation(e,t,o),c,a=new ee;return a.cancelCallback=()=>{let l=this._createCancelInvocation(s.invocationId);return delete this._callbacks[s.invocationId],c.then(()=>this._sendWithProtocol(l))},this._callbacks[s.invocationId]=(l,u)=>{if(u){a.error(u);return}else l&&(l.type===h.Completion?l.error?a.error(new Error(l.error)):a.complete():a.next(l.item))},c=this._sendWithProtocol(s).catch(l=>{a.error(l),delete this._callbacks[s.invocationId]}),this._launchStreams(n,c),a}_sendMessage(e){return this._resetKeepAliveInterval(),this.connection.send(e)}_sendWithProtocol(e){return this._messageBuffer?this._messageBuffer._send(e):this._sendMessage(this._protocol.writeMessage(e))}send(e,...t){let[n,o]=this._replaceStreamingParams(t),s=this._sendWithProtocol(this._createInvocation(e,t,!0,o));return this._launchStreams(n,s),s}invoke(e,...t){let[n,o]=this._replaceStreamingParams(t),s=this._createInvocation(e,t,!1,o);return new Promise((a,l)=>{this._callbacks[s.invocationId]=(f,P)=>{if(P){l(P);return}else f&&(f.type===h.Completion?f.error?l(new Error(f.error)):a(f.result):l(new Error(`Unexpected message type: ${f.type}`)))};let u=this._sendWithProtocol(s).catch(f=>{l(f),delete this._callbacks[s.invocationId]});this._launchStreams(n,u)})}on(e,t){!e||!t||(e=e.toLowerCase(),this._methods[e]||(this._methods[e]=[]),this._methods[e].indexOf(t)===-1&&this._methods[e].push(t))}off(e,t){if(!e)return;e=e.toLowerCase();let n=this._methods[e];if(n)if(t){let o=n.indexOf(t);o!==-1&&(n.splice(o,1),n.length===0&&delete this._methods[e])}else delete this._methods[e]}onclose(e){e&&this._closedCallbacks.push(e)}onreconnecting(e){e&&this._reconnectingCallbacks.push(e)}onreconnected(e){e&&this._reconnectedCallbacks.push(e)}_processIncomingData(e){if(this._cleanupTimeout(),this._receivedHandshakeResponse||(e=this._processHandshakeResponse(e),this._receivedHandshakeResponse=!0),e){let t=this._protocol.parseMessages(e,this._logger);for(let n of t)if(!(this._messageBuffer&&!this._messageBuffer._shouldProcessMessage(n)))switch(n.type){case h.Invocation:this._invokeClientMethod(n).catch(o=>{this._logger.log(i.Error,`Invoke client method threw error: ${J(o)}`)});break;case h.StreamItem:case h.Completion:{let o=this._callbacks[n.invocationId];if(o){n.type===h.Completion&&delete this._callbacks[n.invocationId];try{o(n)}catch(s){this._logger.log(i.Error,`Stream callback threw error: ${J(s)}`)}}break}case h.Ping:break;case h.Close:{this._logger.log(i.Information,"Close message received from server.");let o=n.error?new Error("Server returned an error on close: "+n.error):void 0;n.allowReconnect===!0?this.connection.stop(o):this._stopPromise=this._stopInternal(o);break}case h.Ack:this._messageBuffer&&this._messageBuffer._ack(n);break;case h.Sequence:this._messageBuffer&&this._messageBuffer._resetSequence(n);break;default:this._logger.log(i.Warning,`Invalid message type: ${n.type}.`);break}}this._resetTimeoutPeriod()}_processHandshakeResponse(e){let t,n;try{[n,t]=this._handshakeProtocol.parseHandshakeResponse(e)}catch(o){let s="Error parsing handshake response: "+o;this._logger.log(i.Error,s);let c=new Error(s);throw this._handshakeRejecter(c),c}if(t.error){let o="Server returned handshake error: "+t.error;this._logger.log(i.Error,o);let s=new Error(o);throw this._handshakeRejecter(s),s}else this._logger.log(i.Debug,"Server handshake complete.");return this._handshakeResolver(),n}_resetKeepAliveInterval(){this.connection.features.inherentKeepAlive||(this._nextKeepAlive=new Date().getTime()+this.keepAliveIntervalInMilliseconds,this._cleanupPingTimer())}_resetTimeoutPeriod(){if((!this.connection.features||!this.connection.features.inherentKeepAlive)&&(this._timeoutHandle=setTimeout(()=>this.serverTimeout(),this.serverTimeoutInMilliseconds),this._pingServerHandle===void 0)){let e=this._nextKeepAlive-new Date().getTime();e<0&&(e=0),this._pingServerHandle=setTimeout(()=>g(this,null,function*(){if(this._connectionState===p.Connected)try{yield this._sendMessage(this._cachedPingMessage)}catch{this._cleanupPingTimer()}}),e)}}serverTimeout(){this.connection.stop(new Error("Server timeout elapsed without receiving a message from the server."))}_invokeClientMethod(e){return g(this,null,function*(){let t=e.target.toLowerCase(),n=this._methods[t];if(!n){this._logger.log(i.Warning,`No client method with the name '${t}' found.`),e.invocationId&&(this._logger.log(i.Warning,`No result given for '${t}' method and invocation ID '${e.invocationId}'.`),yield this._sendWithProtocol(this._createCompletionMessage(e.invocationId,"Client didn't provide a result.",null)));return}let o=n.slice(),s=!!e.invocationId,c,a,l;for(let u of o)try{let f=c;c=yield u.apply(this,e.arguments),s&&c&&f&&(this._logger.log(i.Error,`Multiple results provided for '${t}'. Sending error to server.`),l=this._createCompletionMessage(e.invocationId,"Client provided multiple results.",null)),a=void 0}catch(f){a=f,this._logger.log(i.Error,`A callback for the method '${t}' threw error '${f}'.`)}l?yield this._sendWithProtocol(l):s?(a?l=this._createCompletionMessage(e.invocationId,`${a}`,null):c!==void 0?l=this._createCompletionMessage(e.invocationId,null,c):(this._logger.log(i.Warning,`No result given for '${t}' method and invocation ID '${e.invocationId}'.`),l=this._createCompletionMessage(e.invocationId,"Client didn't provide a result.",null)),yield this._sendWithProtocol(l)):c&&this._logger.log(i.Error,`Result given for '${t}' method but server is not expecting a result.`)})}_connectionClosed(e){this._logger.log(i.Debug,`HubConnection.connectionClosed(${e}) called while in state ${this._connectionState}.`),this._stopDuringStartError=this._stopDuringStartError||e||new S("The underlying connection was closed before the hub handshake could complete."),this._handshakeResolver&&this._handshakeResolver(),this._cancelCallbacksWithError(e||new Error("Invocation canceled due to the underlying connection being closed.")),this._cleanupTimeout(),this._cleanupPingTimer(),this._connectionState===p.Disconnecting?this._completeClose(e):this._connectionState===p.Connected&&this._reconnectPolicy?this._reconnect(e):this._connectionState===p.Connected&&this._completeClose(e)}_completeClose(e){if(this._connectionStarted){this._connectionState=p.Disconnected,this._connectionStarted=!1,this._messageBuffer&&(this._messageBuffer._dispose(e??new Error("Connection closed.")),this._messageBuffer=void 0),_.isBrowser&&window.document.removeEventListener("freeze",this._freezeEventListener);try{this._closedCallbacks.forEach(t=>t.apply(this,[e]))}catch(t){this._logger.log(i.Error,`An onclose callback called with error '${e}' threw error '${t}'.`)}}}_reconnect(e){return g(this,null,function*(){let t=Date.now(),n=0,o=e!==void 0?e:new Error("Attempting to reconnect due to a unknown error."),s=this._getNextRetryDelay(n++,0,o);if(s===null){this._logger.log(i.Debug,"Connection not reconnecting because the IRetryPolicy returned null on the first reconnect attempt."),this._completeClose(e);return}if(this._connectionState=p.Reconnecting,e?this._logger.log(i.Information,`Connection reconnecting because of error '${e}'.`):this._logger.log(i.Information,"Connection reconnecting."),this._reconnectingCallbacks.length!==0){try{this._reconnectingCallbacks.forEach(c=>c.apply(this,[e]))}catch(c){this._logger.log(i.Error,`An onreconnecting callback called with error '${e}' threw error '${c}'.`)}if(this._connectionState!==p.Reconnecting){this._logger.log(i.Debug,"Connection left the reconnecting state in onreconnecting callback. Done reconnecting.");return}}for(;s!==null;){if(this._logger.log(i.Information,`Reconnect attempt number ${n} will start in ${s} ms.`),yield new Promise(c=>{this._reconnectDelayHandle=setTimeout(c,s)}),this._reconnectDelayHandle=void 0,this._connectionState!==p.Reconnecting){this._logger.log(i.Debug,"Connection left the reconnecting state during reconnect delay. Done reconnecting.");return}try{if(yield this._startInternal(),this._connectionState=p.Connected,this._logger.log(i.Information,"HubConnection reconnected successfully."),this._reconnectedCallbacks.length!==0)try{this._reconnectedCallbacks.forEach(c=>c.apply(this,[this.connection.connectionId]))}catch(c){this._logger.log(i.Error,`An onreconnected callback called with connectionId '${this.connection.connectionId}; threw error '${c}'.`)}return}catch(c){if(this._logger.log(i.Information,`Reconnect attempt failed because of error '${c}'.`),this._connectionState!==p.Reconnecting){this._logger.log(i.Debug,`Connection moved to the '${this._connectionState}' from the reconnecting state during reconnect attempt. Done reconnecting.`),this._connectionState===p.Disconnecting&&this._completeClose();return}o=c instanceof Error?c:new Error(c.toString()),s=this._getNextRetryDelay(n++,Date.now()-t,o)}}this._logger.log(i.Information,`Reconnect retries have been exhausted after ${Date.now()-t} ms and ${n} failed attempts. Connection disconnecting.`),this._completeClose()})}_getNextRetryDelay(e,t,n){try{return this._reconnectPolicy.nextRetryDelayInMilliseconds({elapsedMilliseconds:t,previousRetryCount:e,retryReason:n})}catch(o){return this._logger.log(i.Error,`IRetryPolicy.nextRetryDelayInMilliseconds(${e}, ${t}) threw error '${o}'.`),null}}_cancelCallbacksWithError(e){let t=this._callbacks;this._callbacks={},Object.keys(t).forEach(n=>{let o=t[n];try{o(null,e)}catch(s){this._logger.log(i.Error,`Stream 'error' callback called with '${e}' threw error: ${J(s)}`)}})}_cleanupPingTimer(){this._pingServerHandle&&(clearTimeout(this._pingServerHandle),this._pingServerHandle=void 0)}_cleanupTimeout(){this._timeoutHandle&&clearTimeout(this._timeoutHandle)}_createInvocation(e,t,n,o){if(n)return o.length!==0?{arguments:t,streamIds:o,target:e,type:h.Invocation}:{arguments:t,target:e,type:h.Invocation};{let s=this._invocationId;return this._invocationId++,o.length!==0?{arguments:t,invocationId:s.toString(),streamIds:o,target:e,type:h.Invocation}:{arguments:t,invocationId:s.toString(),target:e,type:h.Invocation}}}_launchStreams(e,t){if(e.length!==0){t||(t=Promise.resolve());for(let n in e)e[n].subscribe({complete:()=>{t=t.then(()=>this._sendWithProtocol(this._createCompletionMessage(n)))},error:o=>{let s;o instanceof Error?s=o.message:o&&o.toString?s=o.toString():s="Unknown error",t=t.then(()=>this._sendWithProtocol(this._createCompletionMessage(n,s)))},next:o=>{t=t.then(()=>this._sendWithProtocol(this._createStreamItemMessage(n,o)))}})}}_replaceStreamingParams(e){let t=[],n=[];for(let o=0;o<e.length;o++){let s=e[o];if(this._isObservable(s)){let c=this._invocationId;this._invocationId++,t[c]=s,n.push(c.toString()),e.splice(o,1)}}return[t,n]}_isObservable(e){return e&&e.subscribe&&typeof e.subscribe=="function"}_createStreamInvocation(e,t,n){let o=this._invocationId;return this._invocationId++,n.length!==0?{arguments:t,invocationId:o.toString(),streamIds:n,target:e,type:h.StreamInvocation}:{arguments:t,invocationId:o.toString(),target:e,type:h.StreamInvocation}}_createCancelInvocation(e){return{invocationId:e,type:h.CancelInvocation}}_createStreamItemMessage(e,t){return{invocationId:e,item:t,type:h.StreamItem}}_createCompletionMessage(e,t,n){return t?{error:t,invocationId:e,type:h.Completion}:{invocationId:e,result:n,type:h.Completion}}_createCloseMessage(){return{type:h.Close}}};var De=[0,2e3,1e4,3e4,null],W=class{constructor(e){this._retryDelays=e!==void 0?[...e,null]:De}nextRetryDelayInMilliseconds(e){return this._retryDelays[e.previousRetryCount]}};var $=(()=>{class r{}return r.Authorization="Authorization",r.Cookie="Cookie",r})();var ne=class extends k{constructor(e,t){super(),this._innerClient=e,this._accessTokenFactory=t}send(e){return g(this,null,function*(){let t=!0;this._accessTokenFactory&&(!this._accessToken||e.url&&e.url.indexOf("/negotiate?")>0)&&(t=!1,this._accessToken=yield this._accessTokenFactory()),this._setAuthorizationHeader(e);let n=yield this._innerClient.send(e);return t&&n.statusCode===401&&this._accessTokenFactory?(this._accessToken=yield this._accessTokenFactory(),this._setAuthorizationHeader(e),yield this._innerClient.send(e)):n})}_setAuthorizationHeader(e){e.headers||(e.headers={}),this._accessToken?e.headers[$.Authorization]=`Bearer ${this._accessToken}`:this._accessTokenFactory&&e.headers[$.Authorization]&&delete e.headers[$.Authorization]}getCookieString(e){return this._innerClient.getCookieString(e)}};var b=function(r){return r[r.None=0]="None",r[r.WebSockets=1]="WebSockets",r[r.ServerSentEvents=2]="ServerSentEvents",r[r.LongPolling=4]="LongPolling",r}(b||{}),w=function(r){return r[r.Text=1]="Text",r[r.Binary=2]="Binary",r}(w||{});var oe=class{constructor(){this._isAborted=!1,this.onabort=null}abort(){this._isAborted||(this._isAborted=!0,this.onabort&&this.onabort())}get signal(){return this}get aborted(){return this._isAborted}};var U=class{get pollAborted(){return this._pollAbort.aborted}constructor(e,t,n){this._httpClient=e,this._logger=t,this._pollAbort=new oe,this._options=n,this._running=!1,this.onreceive=null,this.onclose=null}connect(e,t){return g(this,null,function*(){if(d.isRequired(e,"url"),d.isRequired(t,"transferFormat"),d.isIn(t,w,"transferFormat"),this._url=e,this._logger.log(i.Trace,"(LongPolling transport) Connecting."),t===w.Binary&&typeof XMLHttpRequest<"u"&&typeof new XMLHttpRequest().responseType!="string")throw new Error("Binary protocols over XmlHttpRequest not implementing advanced features are not supported.");let[n,o]=I(),s=m({[n]:o},this._options.headers),c={abortSignal:this._pollAbort.signal,headers:s,timeout:1e5,withCredentials:this._options.withCredentials};t===w.Binary&&(c.responseType="arraybuffer");let a=`${e}&_=${Date.now()}`;this._logger.log(i.Trace,`(LongPolling transport) polling: ${a}.`);let l=yield this._httpClient.get(a,c);l.statusCode!==200?(this._logger.log(i.Error,`(LongPolling transport) Unexpected response code: ${l.statusCode}.`),this._closeError=new C(l.statusText||"",l.statusCode),this._running=!1):this._running=!0,this._receiving=this._poll(this._url,c)})}_poll(e,t){return g(this,null,function*(){try{for(;this._running;)try{let n=`${e}&_=${Date.now()}`;this._logger.log(i.Trace,`(LongPolling transport) polling: ${n}.`);let o=yield this._httpClient.get(n,t);o.statusCode===204?(this._logger.log(i.Information,"(LongPolling transport) Poll terminated by server."),this._running=!1):o.statusCode!==200?(this._logger.log(i.Error,`(LongPolling transport) Unexpected response code: ${o.statusCode}.`),this._closeError=new C(o.statusText||"",o.statusCode),this._running=!1):o.content?(this._logger.log(i.Trace,`(LongPolling transport) data received. ${R(o.content,this._options.logMessageContent)}.`),this.onreceive&&this.onreceive(o.content)):this._logger.log(i.Trace,"(LongPolling transport) Poll timed out, reissuing.")}catch(n){this._running?n instanceof T?this._logger.log(i.Trace,"(LongPolling transport) Poll timed out, reissuing."):(this._closeError=n,this._running=!1):this._logger.log(i.Trace,`(LongPolling transport) Poll errored after shutdown: ${n.message}`)}}finally{this._logger.log(i.Trace,"(LongPolling transport) Polling complete."),this.pollAborted||this._raiseOnClose()}})}send(e){return g(this,null,function*(){return this._running?X(this._logger,"LongPolling",this._httpClient,this._url,e,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))})}stop(){return g(this,null,function*(){this._logger.log(i.Trace,"(LongPolling transport) Stopping polling."),this._running=!1,this._pollAbort.abort();try{yield this._receiving,this._logger.log(i.Trace,`(LongPolling transport) sending DELETE request to ${this._url}.`);let e={},[t,n]=I();e[t]=n;let o={headers:m(m({},e),this._options.headers),timeout:this._options.timeout,withCredentials:this._options.withCredentials},s;try{yield this._httpClient.delete(this._url,o)}catch(c){s=c}s?s instanceof C&&(s.statusCode===404?this._logger.log(i.Trace,"(LongPolling transport) A 404 response was returned from sending a DELETE request."):this._logger.log(i.Trace,`(LongPolling transport) Error sending a DELETE request: ${s}`)):this._logger.log(i.Trace,"(LongPolling transport) DELETE request accepted.")}finally{this._logger.log(i.Trace,"(LongPolling transport) Stop finished."),this._raiseOnClose()}})}_raiseOnClose(){if(this.onclose){let e="(LongPolling transport) Firing onclose event.";this._closeError&&(e+=" Error: "+this._closeError),this._logger.log(i.Trace,e),this.onclose(this._closeError)}}};var re=class{constructor(e,t,n,o){this._httpClient=e,this._accessToken=t,this._logger=n,this._options=o,this.onreceive=null,this.onclose=null}connect(e,t){return g(this,null,function*(){return d.isRequired(e,"url"),d.isRequired(t,"transferFormat"),d.isIn(t,w,"transferFormat"),this._logger.log(i.Trace,"(SSE transport) Connecting."),this._url=e,this._accessToken&&(e+=(e.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(this._accessToken)}`),new Promise((n,o)=>{let s=!1;if(t!==w.Text){o(new Error("The Server-Sent Events transport only supports the 'Text' transfer format"));return}let c;if(_.isBrowser||_.isWebWorker)c=new this._options.EventSource(e,{withCredentials:this._options.withCredentials});else{let a=this._httpClient.getCookieString(e),l={};l.Cookie=a;let[u,f]=I();l[u]=f,c=new this._options.EventSource(e,{withCredentials:this._options.withCredentials,headers:m(m({},l),this._options.headers)})}try{c.onmessage=a=>{if(this.onreceive)try{this._logger.log(i.Trace,`(SSE transport) data received. ${R(a.data,this._options.logMessageContent)}.`),this.onreceive(a.data)}catch(l){this._close(l);return}},c.onerror=a=>{s?this._close():o(new Error("EventSource failed to connect. The connection could not be found on the server, either the connection ID is not present on the server, or a proxy is refusing/buffering the connection. If you have multiple servers check that sticky sessions are enabled."))},c.onopen=()=>{this._logger.log(i.Information,`SSE connected to ${this._url}`),this._eventSource=c,s=!0,n()}}catch(a){o(a);return}})})}send(e){return g(this,null,function*(){return this._eventSource?X(this._logger,"SSE",this._httpClient,this._url,e,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))})}stop(){return this._close(),Promise.resolve()}_close(e){this._eventSource&&(this._eventSource.close(),this._eventSource=void 0,this.onclose&&this.onclose(e))}};var se=class{constructor(e,t,n,o,s,c){this._logger=n,this._accessTokenFactory=t,this._logMessageContent=o,this._webSocketConstructor=s,this._httpClient=e,this.onreceive=null,this.onclose=null,this._headers=c}connect(e,t){return g(this,null,function*(){d.isRequired(e,"url"),d.isRequired(t,"transferFormat"),d.isIn(t,w,"transferFormat"),this._logger.log(i.Trace,"(WebSockets transport) Connecting.");let n;return this._accessTokenFactory&&(n=yield this._accessTokenFactory()),new Promise((o,s)=>{e=e.replace(/^http/,"ws");let c,a=this._httpClient.getCookieString(e),l=!1;if(_.isNode||_.isReactNative){let u={},[f,P]=I();u[f]=P,n&&(u[$.Authorization]=`Bearer ${n}`),a&&(u[$.Cookie]=a),c=new this._webSocketConstructor(e,void 0,{headers:m(m({},u),this._headers)})}else n&&(e+=(e.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(n)}`);c||(c=new this._webSocketConstructor(e)),t===w.Binary&&(c.binaryType="arraybuffer"),c.onopen=u=>{this._logger.log(i.Information,`WebSocket connected to ${e}.`),this._webSocket=c,l=!0,o()},c.onerror=u=>{let f=null;typeof ErrorEvent<"u"&&u instanceof ErrorEvent?f=u.error:f="There was an error with the transport",this._logger.log(i.Information,`(WebSockets transport) ${f}.`)},c.onmessage=u=>{if(this._logger.log(i.Trace,`(WebSockets transport) data received. ${R(u.data,this._logMessageContent)}.`),this.onreceive)try{this.onreceive(u.data)}catch(f){this._close(f);return}},c.onclose=u=>{if(l)this._close(u);else{let f=null;typeof ErrorEvent<"u"&&u instanceof ErrorEvent?f=u.error:f="WebSocket failed to connect. The connection could not be found on the server, either the endpoint may not be a SignalR endpoint, the connection ID is not present on the server, or there is a proxy blocking WebSockets. If you have multiple servers check that sticky sessions are enabled.",s(new Error(f))}}})})}send(e){return this._webSocket&&this._webSocket.readyState===this._webSocketConstructor.OPEN?(this._logger.log(i.Trace,`(WebSockets transport) sending data. ${R(e,this._logMessageContent)}.`),this._webSocket.send(e),Promise.resolve()):Promise.reject("WebSocket is not in the OPEN state")}stop(){return this._webSocket&&this._close(void 0),Promise.resolve()}_close(e){this._webSocket&&(this._webSocket.onclose=()=>{},this._webSocket.onmessage=()=>{},this._webSocket.onerror=()=>{},this._webSocket.close(),this._webSocket=void 0),this._logger.log(i.Trace,"(WebSockets transport) socket closed."),this.onclose&&(this._isCloseEvent(e)&&(e.wasClean===!1||e.code!==1e3)?this.onclose(new Error(`WebSocket closed with status code: ${e.code} (${e.reason||"no reason given"}).`)):e instanceof Error?this.onclose(e):this.onclose())}_isCloseEvent(e){return e&&typeof e.wasClean=="boolean"&&typeof e.code=="number"}};var ye=100,ie=class{constructor(e,t={}){if(this._stopPromiseResolver=()=>{},this.features={},this._negotiateVersion=1,d.isRequired(e,"url"),this._logger=be(t.logger),this.baseUrl=this._resolveUrl(e),t=t||{},t.logMessageContent=t.logMessageContent===void 0?!1:t.logMessageContent,typeof t.withCredentials=="boolean"||t.withCredentials===void 0)t.withCredentials=t.withCredentials===void 0?!0:t.withCredentials;else throw new Error("withCredentials option was not a 'boolean' or 'undefined' value");t.timeout=t.timeout===void 0?100*1e3:t.timeout;let n=null,o=null;if(_.isNode&&typeof A<"u"){let s=typeof __webpack_require__=="function"?__non_webpack_require__:A;n=s("ws"),o=s("eventsource")}!_.isNode&&typeof WebSocket<"u"&&!t.WebSocket?t.WebSocket=WebSocket:_.isNode&&!t.WebSocket&&n&&(t.WebSocket=n),!_.isNode&&typeof EventSource<"u"&&!t.EventSource?t.EventSource=EventSource:_.isNode&&!t.EventSource&&typeof o<"u"&&(t.EventSource=o),this._httpClient=new ne(t.httpClient||new Q(this._logger),t.accessTokenFactory),this._connectionState="Disconnected",this._connectionStarted=!1,this._options=t,this.onreceive=null,this.onclose=null}start(e){return g(this,null,function*(){if(e=e||w.Binary,d.isIn(e,w,"transferFormat"),this._logger.log(i.Debug,`Starting connection with transfer format '${w[e]}'.`),this._connectionState!=="Disconnected")return Promise.reject(new Error("Cannot start an HttpConnection that is not in the 'Disconnected' state."));if(this._connectionState="Connecting",this._startInternalPromise=this._startInternal(e),yield this._startInternalPromise,this._connectionState==="Disconnecting"){let t="Failed to start the HttpConnection before stop() was called.";return this._logger.log(i.Error,t),yield this._stopPromise,Promise.reject(new S(t))}else if(this._connectionState!=="Connected"){let t="HttpConnection.startInternal completed gracefully but didn't enter the connection into the connected state!";return this._logger.log(i.Error,t),Promise.reject(new S(t))}this._connectionStarted=!0})}send(e){return this._connectionState!=="Connected"?Promise.reject(new Error("Cannot send data if the connection is not in the 'Connected' State.")):(this._sendQueue||(this._sendQueue=new ue(this.transport)),this._sendQueue.send(e))}stop(e){return g(this,null,function*(){if(this._connectionState==="Disconnected")return this._logger.log(i.Debug,`Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnected state.`),Promise.resolve();if(this._connectionState==="Disconnecting")return this._logger.log(i.Debug,`Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnecting state.`),this._stopPromise;this._connectionState="Disconnecting",this._stopPromise=new Promise(t=>{this._stopPromiseResolver=t}),yield this._stopInternal(e),yield this._stopPromise})}_stopInternal(e){return g(this,null,function*(){this._stopError=e;try{yield this._startInternalPromise}catch{}if(this.transport){try{yield this.transport.stop()}catch(t){this._logger.log(i.Error,`HttpConnection.transport.stop() threw error '${t}'.`),this._stopConnection()}this.transport=void 0}else this._logger.log(i.Debug,"HttpConnection.transport is undefined in HttpConnection.stop() because start() failed.")})}_startInternal(e){return g(this,null,function*(){let t=this.baseUrl;this._accessTokenFactory=this._options.accessTokenFactory,this._httpClient._accessTokenFactory=this._accessTokenFactory;try{if(this._options.skipNegotiation)if(this._options.transport===b.WebSockets)this.transport=this._constructTransport(b.WebSockets),yield this._startTransport(t,e);else throw new Error("Negotiation can only be skipped when using the WebSocket transport directly.");else{let n=null,o=0;do{if(n=yield this._getNegotiationResponse(t),this._connectionState==="Disconnecting"||this._connectionState==="Disconnected")throw new S("The connection was stopped during negotiation.");if(n.error)throw new Error(n.error);if(n.ProtocolVersion)throw new Error("Detected a connection attempt to an ASP.NET SignalR Server. This client only supports connecting to an ASP.NET Core SignalR Server. See https://aka.ms/signalr-core-differences for details.");if(n.url&&(t=n.url),n.accessToken){let s=n.accessToken;this._accessTokenFactory=()=>s,this._httpClient._accessToken=s,this._httpClient._accessTokenFactory=void 0}o++}while(n.url&&o<ye);if(o===ye&&n.url)throw new Error("Negotiate redirection limit exceeded.");yield this._createTransport(t,this._options.transport,n,e)}this.transport instanceof U&&(this.features.inherentKeepAlive=!0),this._connectionState==="Connecting"&&(this._logger.log(i.Debug,"The HttpConnection connected successfully."),this._connectionState="Connected")}catch(n){return this._logger.log(i.Error,"Failed to start the connection: "+n),this._connectionState="Disconnected",this.transport=void 0,this._stopPromiseResolver(),Promise.reject(n)}})}_getNegotiationResponse(e){return g(this,null,function*(){let t={},[n,o]=I();t[n]=o;let s=this._resolveNegotiateUrl(e);this._logger.log(i.Debug,`Sending negotiation request: ${s}.`);try{let c=yield this._httpClient.post(s,{content:"",headers:m(m({},t),this._options.headers),timeout:this._options.timeout,withCredentials:this._options.withCredentials});if(c.statusCode!==200)return Promise.reject(new Error(`Unexpected status code returned from negotiate '${c.statusCode}'`));let a=JSON.parse(c.content);return(!a.negotiateVersion||a.negotiateVersion<1)&&(a.connectionToken=a.connectionId),a.useStatefulReconnect&&this._options._useStatefulReconnect!==!0?Promise.reject(new N("Client didn't negotiate Stateful Reconnect but the server did.")):a}catch(c){let a="Failed to complete negotiation with the server: "+c;return c instanceof C&&c.statusCode===404&&(a=a+" Either this is not a SignalR endpoint or there is a proxy blocking the connection."),this._logger.log(i.Error,a),Promise.reject(new N(a))}})}_createConnectUrl(e,t){return t?e+(e.indexOf("?")===-1?"?":"&")+`id=${t}`:e}_createTransport(e,t,n,o){return g(this,null,function*(){let s=this._createConnectUrl(e,n.connectionToken);if(this._isITransport(t)){this._logger.log(i.Debug,"Connection was provided an instance of ITransport, using that directly."),this.transport=t,yield this._startTransport(s,o),this.connectionId=n.connectionId;return}let c=[],a=n.availableTransports||[],l=n;for(let u of a){let f=this._resolveTransportOrError(u,t,o,l?.useStatefulReconnect===!0);if(f instanceof Error)c.push(`${u.transport} failed:`),c.push(f);else if(this._isITransport(f)){if(this.transport=f,!l){try{l=yield this._getNegotiationResponse(e)}catch(P){return Promise.reject(P)}s=this._createConnectUrl(e,l.connectionToken)}try{yield this._startTransport(s,o),this.connectionId=l.connectionId;return}catch(P){if(this._logger.log(i.Error,`Failed to start the transport '${u.transport}': ${P}`),l=void 0,c.push(new z(`${u.transport} failed: ${P}`,b[u.transport])),this._connectionState!=="Connecting"){let ge="Failed to select transport before stop() was called.";return this._logger.log(i.Debug,ge),Promise.reject(new S(ge))}}}}return c.length>0?Promise.reject(new K(`Unable to connect to the server with any of the available transports. ${c.join(" ")}`,c)):Promise.reject(new Error("None of the transports supported by the client are supported by the server."))})}_constructTransport(e){switch(e){case b.WebSockets:if(!this._options.WebSocket)throw new Error("'WebSocket' is not supported in your environment.");return new se(this._httpClient,this._accessTokenFactory,this._logger,this._options.logMessageContent,this._options.WebSocket,this._options.headers||{});case b.ServerSentEvents:if(!this._options.EventSource)throw new Error("'EventSource' is not supported in your environment.");return new re(this._httpClient,this._httpClient._accessToken,this._logger,this._options);case b.LongPolling:return new U(this._httpClient,this._logger,this._options);default:throw new Error(`Unknown transport: ${e}.`)}}_startTransport(e,t){return this.transport.onreceive=this.onreceive,this.features.reconnect?this.transport.onclose=n=>g(this,null,function*(){let o=!1;if(this.features.reconnect)try{this.features.disconnected(),yield this.transport.connect(e,t),yield this.features.resend()}catch{o=!0}else{this._stopConnection(n);return}o&&this._stopConnection(n)}):this.transport.onclose=n=>this._stopConnection(n),this.transport.connect(e,t)}_resolveTransportOrError(e,t,n,o){let s=b[e.transport];if(s==null)return this._logger.log(i.Debug,`Skipping transport '${e.transport}' because it is not supported by this client.`),new Error(`Skipping transport '${e.transport}' because it is not supported by this client.`);if(Ae(t,s))if(e.transferFormats.map(a=>w[a]).indexOf(n)>=0){if(s===b.WebSockets&&!this._options.WebSocket||s===b.ServerSentEvents&&!this._options.EventSource)return this._logger.log(i.Debug,`Skipping transport '${b[s]}' because it is not supported in your environment.'`),new F(`'${b[s]}' is not supported in your environment.`,s);this._logger.log(i.Debug,`Selecting transport '${b[s]}'.`);try{return this.features.reconnect=s===b.WebSockets?o:void 0,this._constructTransport(s)}catch(a){return a}}else return this._logger.log(i.Debug,`Skipping transport '${b[s]}' because it does not support the requested transfer format '${w[n]}'.`),new Error(`'${b[s]}' does not support ${w[n]}.`);else return this._logger.log(i.Debug,`Skipping transport '${b[s]}' because it was disabled by the client.`),new q(`'${b[s]}' is disabled by the client.`,s)}_isITransport(e){return e&&typeof e=="object"&&"connect"in e}_stopConnection(e){if(this._logger.log(i.Debug,`HttpConnection.stopConnection(${e}) called while in state ${this._connectionState}.`),this.transport=void 0,e=this._stopError||e,this._stopError=void 0,this._connectionState==="Disconnected"){this._logger.log(i.Debug,`Call to HttpConnection.stopConnection(${e}) was ignored because the connection is already in the disconnected state.`);return}if(this._connectionState==="Connecting")throw this._logger.log(i.Warning,`Call to HttpConnection.stopConnection(${e}) was ignored because the connection is still in the connecting state.`),new Error(`HttpConnection.stopConnection(${e}) was called while the connection is still in the connecting state.`);if(this._connectionState==="Disconnecting"&&this._stopPromiseResolver(),e?this._logger.log(i.Error,`Connection disconnected with error '${e}'.`):this._logger.log(i.Information,"Connection disconnected."),this._sendQueue&&(this._sendQueue.stop().catch(t=>{this._logger.log(i.Error,`TransportSendQueue.stop() threw error '${t}'.`)}),this._sendQueue=void 0),this.connectionId=void 0,this._connectionState="Disconnected",this._connectionStarted){this._connectionStarted=!1;try{this.onclose&&this.onclose(e)}catch(t){this._logger.log(i.Error,`HttpConnection.onclose(${e}) threw error '${t}'.`)}}}_resolveUrl(e){if(e.lastIndexOf("https://",0)===0||e.lastIndexOf("http://",0)===0)return e;if(!_.isBrowser)throw new Error(`Cannot resolve '${e}'.`);let t=window.document.createElement("a");return t.href=e,this._logger.log(i.Information,`Normalizing '${e}' to '${t.href}'.`),t.href}_resolveNegotiateUrl(e){let t=new URL(e);t.pathname.endsWith("/")?t.pathname+="negotiate":t.pathname+="/negotiate";let n=new URLSearchParams(t.searchParams);return n.has("negotiateVersion")||n.append("negotiateVersion",this._negotiateVersion.toString()),n.has("useStatefulReconnect")?n.get("useStatefulReconnect")==="true"&&(this._options._useStatefulReconnect=!0):this._options._useStatefulReconnect===!0&&n.append("useStatefulReconnect","true"),t.search=n.toString(),t.toString()}};function Ae(r,e){return!r||(e&r)!==0}var ue=class r{constructor(e){this._transport=e,this._buffer=[],this._executing=!0,this._sendBufferedData=new M,this._transportResult=new M,this._sendLoopPromise=this._sendLoop()}send(e){return this._bufferData(e),this._transportResult||(this._transportResult=new M),this._transportResult.promise}stop(){return this._executing=!1,this._sendBufferedData.resolve(),this._sendLoopPromise}_bufferData(e){if(this._buffer.length&&typeof this._buffer[0]!=typeof e)throw new Error(`Expected data to be of type ${typeof this._buffer} but was of type ${typeof e}`);this._buffer.push(e),this._sendBufferedData.resolve()}_sendLoop(){return g(this,null,function*(){for(;;){if(yield this._sendBufferedData.promise,!this._executing){this._transportResult&&this._transportResult.reject("Connection stopped.");break}this._sendBufferedData=new M;let e=this._transportResult;this._transportResult=void 0;let t=typeof this._buffer[0]=="string"?this._buffer.join(""):r._concatBuffers(this._buffer);this._buffer.length=0;try{yield this._transport.send(t),e.resolve()}catch(n){e.reject(n)}}})}static _concatBuffers(e){let t=e.map(s=>s.byteLength).reduce((s,c)=>s+c),n=new Uint8Array(t),o=0;for(let s of e)n.set(new Uint8Array(s),o),o+=s.byteLength;return n.buffer}},M=class{constructor(){this.promise=new Promise((e,t)=>[this._resolver,this._rejecter]=[e,t])}resolve(){this._resolver()}reject(e){this._rejecter(e)}};var He="json",ce=class{constructor(){this.name=He,this.version=2,this.transferFormat=w.Text}parseMessages(e,t){if(typeof e!="string")throw new Error("Invalid input for JSON hub protocol. Expected a string.");if(!e)return[];t===null&&(t=E.instance);let n=y.parse(e),o=[];for(let s of n){let c=JSON.parse(s);if(typeof c.type!="number")throw new Error("Invalid payload.");switch(c.type){case h.Invocation:this._isInvocationMessage(c);break;case h.StreamItem:this._isStreamItemMessage(c);break;case h.Completion:this._isCompletionMessage(c);break;case h.Ping:break;case h.Close:break;case h.Ack:this._isAckMessage(c);break;case h.Sequence:this._isSequenceMessage(c);break;default:t.log(i.Information,"Unknown message type '"+c.type+"' ignored.");continue}o.push(c)}return o}writeMessage(e){return y.write(JSON.stringify(e))}_isInvocationMessage(e){this._assertNotEmptyString(e.target,"Invalid payload for Invocation message."),e.invocationId!==void 0&&this._assertNotEmptyString(e.invocationId,"Invalid payload for Invocation message.")}_isStreamItemMessage(e){if(this._assertNotEmptyString(e.invocationId,"Invalid payload for StreamItem message."),e.item===void 0)throw new Error("Invalid payload for StreamItem message.")}_isCompletionMessage(e){if(e.result&&e.error)throw new Error("Invalid payload for Completion message.");!e.result&&e.error&&this._assertNotEmptyString(e.error,"Invalid payload for Completion message."),this._assertNotEmptyString(e.invocationId,"Invalid payload for Completion message.")}_isAckMessage(e){if(typeof e.sequenceId!="number")throw new Error("Invalid SequenceId for Ack message.")}_isSequenceMessage(e){if(typeof e.sequenceId!="number")throw new Error("Invalid SequenceId for Sequence message.")}_assertNotEmptyString(e,t){if(typeof e!="string"||e==="")throw new Error(t)}};var Me={trace:i.Trace,debug:i.Debug,info:i.Information,information:i.Information,warn:i.Warning,warning:i.Warning,error:i.Error,critical:i.Critical,none:i.None};function Le(r){let e=Me[r.toLowerCase()];if(typeof e<"u")return e;throw new Error(`Unknown log level: ${r}`)}var B=class{configureLogging(e){if(d.isRequired(e,"logging"),Ne(e))this.logger=e;else if(typeof e=="string"){let t=Le(e);this.logger=new x(t)}else this.logger=new x(e);return this}withUrl(e,t){return d.isRequired(e,"url"),d.isNotEmpty(e,"url"),this.url=e,typeof t=="object"?this.httpConnectionOptions=m(m({},this.httpConnectionOptions),t):this.httpConnectionOptions=D(m({},this.httpConnectionOptions),{transport:t}),this}withHubProtocol(e){return d.isRequired(e,"protocol"),this.protocol=e,this}withAutomaticReconnect(e){if(this.reconnectPolicy)throw new Error("A reconnectPolicy has already been set.");return e?Array.isArray(e)?this.reconnectPolicy=new W(e):this.reconnectPolicy=e:this.reconnectPolicy=new W,this}withServerTimeout(e){return d.isRequired(e,"milliseconds"),this._serverTimeoutInMilliseconds=e,this}withKeepAliveInterval(e){return d.isRequired(e,"milliseconds"),this._keepAliveIntervalInMilliseconds=e,this}withStatefulReconnect(e){return this.httpConnectionOptions===void 0&&(this.httpConnectionOptions={}),this.httpConnectionOptions._useStatefulReconnect=!0,this._statefulReconnectBufferSize=e?.bufferSize,this}build(){let e=this.httpConnectionOptions||{};if(e.logger===void 0&&(e.logger=this.logger),!this.url)throw new Error("The 'HubConnectionBuilder.withUrl' method must be called before building the connection.");let t=new ie(this.url,e);return O.create(t,this.logger||E.instance,this.protocol||new ce,this.reconnectPolicy,this._serverTimeoutInMilliseconds,this._keepAliveIntervalInMilliseconds,this._statefulReconnectBufferSize)}};function Ne(r){return r.log!==void 0}var On=(()=>{class r{toastr;port=window.location.href.split("localhost:")[1]?.split("/")[0];hostURL=t=>me.production?t:`https://localhost:${this.port}${t}`;lastGroupID;OnPaymentReceived=new L;OnReceivePushNotification=new L;OnContactReceive=new L;OnPromotionEventChange=new L;_recacheOutlet=new j(!1);recacheOutlet$=this._recacheOutlet.asObservable();_recacheCategory=new j(!1);recacheCategory$=this._recacheCategory.asObservable();_recacheSalesPerson=new j(!1);recacheSalesPerson$=this._recacheSalesPerson.asObservable();socketConnection;constructor(t){this.toastr=t,this.socketConnection=new B().withUrl(this.hostURL("/POSHub")).withAutomaticReconnect().configureLogging(i.Information).build(),this.registerEventHandler()}startConnection(){this.socketConnection.start().then(()=>{console.info("SignalR Connected")}).catch(t=>{console.log(t)})}SubscribeGroup(t,n=null){t!=this.lastGroupID&&(this.socketConnection.state==p.Disconnected?this.socketConnection.start().then(()=>{this.invokeSubscribe(t,n)}).catch(o=>{this.toastr.error(o,"Error")}):this.socketConnection.state==p.Connected&&this.invokeSubscribe(t,n))}invokeSubscribe(t,n){let o={CurrentID:t,PreviousID:n};this.socketConnection.invoke("SubscribeGroup",o).then(()=>{console.info(`SignalR Subscribed to Group: [${t}]`),this.lastGroupID=t}).catch(s=>{console.error(s)})}registerEventHandler(){this.socketConnection.on("ReceiveMobilePaymentSignal",t=>{this.OnPaymentReceived.next(t)}),this.socketConnection.on("OnContactReceive",t=>{this.OnContactReceive.next(t)}),this.socketConnection.on("ReceiveNewPromotionSignal",t=>{this.OnPromotionEventChange.next(t)}),this.socketConnection.on("ReceivePushNotificationSignal",t=>{this.OnReceivePushNotification.next(t)}),this.socketConnection.on("ReceiveOutletChanges",()=>{this._recacheOutlet.next(!0)}),this.socketConnection.on("ReceiveProductCategoryChanges",()=>{this._recacheCategory.next(!0)}),this.socketConnection.on("ReceiveSalesPersonChanges",()=>{this._recacheSalesPerson.next(!0)})}isSocketConnected(){return le.IsEmpty(this.socketConnection)?!1:this.socketConnection.state==p.Connected&&le.IsNotEmpty(this.socketConnection.connectionId)}broadcast(t){return this.isSocketConnected()?fe(this.socketConnection.invoke("BroadCast",t)).pipe(de(n=>(this.toastr.error(n,"Error"),ae(()=>n)))):ae(()=>"SignalR is not connected")}resetOutletCache(){this._recacheOutlet.next(!1)}resetCategoryCache(){this._recacheCategory.next(!1)}resetSalesPersonCache(){this._recacheSalesPerson.next(!1)}static \u0275fac=function(n){return new(n||r)(_e(we))};static \u0275prov=pe({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();export{i as a,p as b,B as c,On as d};
1
+ import{a as le}from"./chunk-SAIURYQC.js";import{E as de,Jd as me,Ld as we,c as L,d as j,ea as pe,ha as _e,m as fe,o as ae}from"./chunk-GXWDPDLH.js";import{a as m,b as D,c as A,i as g}from"./chunk-QFE4KTJQ.js";var C=class extends Error{constructor(e,t){let n=new.target.prototype;super(`${e}: Status code '${t}'`),this.statusCode=t,this.__proto__=n}},T=class extends Error{constructor(e="A timeout occurred."){let t=new.target.prototype;super(e),this.__proto__=t}},S=class extends Error{constructor(e="An abort occurred."){let t=new.target.prototype;super(e),this.__proto__=t}},F=class extends Error{constructor(e,t){let n=new.target.prototype;super(e),this.transport=t,this.errorType="UnsupportedTransportError",this.__proto__=n}},q=class extends Error{constructor(e,t){let n=new.target.prototype;super(e),this.transport=t,this.errorType="DisabledTransportError",this.__proto__=n}},z=class extends Error{constructor(e,t){let n=new.target.prototype;super(e),this.transport=t,this.errorType="FailedToStartTransportError",this.__proto__=n}},N=class extends Error{constructor(e){let t=new.target.prototype;super(e),this.errorType="FailedToNegotiateWithServerError",this.__proto__=t}},K=class extends Error{constructor(e,t){let n=new.target.prototype;super(e),this.innerErrors=t,this.__proto__=n}};var H=class{constructor(e,t,n){this.statusCode=e,this.statusText=t,this.content=n}},k=class{get(e,t){return this.send(D(m({},t),{method:"GET",url:e}))}post(e,t){return this.send(D(m({},t),{method:"POST",url:e}))}delete(e,t){return this.send(D(m({},t),{method:"DELETE",url:e}))}getCookieString(e){return""}};var i=function(r){return r[r.Trace=0]="Trace",r[r.Debug=1]="Debug",r[r.Information=2]="Information",r[r.Warning=3]="Warning",r[r.Error=4]="Error",r[r.Critical=5]="Critical",r[r.None=6]="None",r}(i||{});var E=class{constructor(){}log(e,t){}};E.instance=new E;var ve="8.0.7",d=class{static isRequired(e,t){if(e==null)throw new Error(`The '${t}' argument is required.`)}static isNotEmpty(e,t){if(!e||e.match(/^\s*$/))throw new Error(`The '${t}' argument should not be empty.`)}static isIn(e,t,n){if(!(e in t))throw new Error(`Unknown ${n} value: ${e}.`)}},_=class r{static get isBrowser(){return!r.isNode&&typeof window=="object"&&typeof window.document=="object"}static get isWebWorker(){return!r.isNode&&typeof self=="object"&&"importScripts"in self}static get isReactNative(){return!r.isNode&&typeof window=="object"&&typeof window.document>"u"}static get isNode(){return typeof process<"u"&&process.release&&process.release.name==="node"}};function R(r,e){let t="";return v(r)?(t=`Binary data of length ${r.byteLength}`,e&&(t+=`. Content: '${ke(r)}'`)):typeof r=="string"&&(t=`String data of length ${r.length}`,e&&(t+=`. Content: '${r}'`)),t}function ke(r){let e=new Uint8Array(r),t="";return e.forEach(n=>{let o=n<16?"0":"";t+=`0x${o}${n.toString(16)} `}),t.substr(0,t.length-1)}function v(r){return r&&typeof ArrayBuffer<"u"&&(r instanceof ArrayBuffer||r.constructor&&r.constructor.name==="ArrayBuffer")}function X(r,e,t,n,o,s){return g(this,null,function*(){let c={},[a,l]=I();c[a]=l,r.log(i.Trace,`(${e} transport) sending data. ${R(o,s.logMessageContent)}.`);let u=v(o)?"arraybuffer":"text",f=yield t.post(n,{content:o,headers:m(m({},c),s.headers),responseType:u,timeout:s.timeout,withCredentials:s.withCredentials});r.log(i.Trace,`(${e} transport) request complete. Response status: ${f.statusCode}.`)})}function be(r){return r===void 0?new x(i.Information):r===null?E.instance:r.log!==void 0?r:new x(r)}var V=class{constructor(e,t){this._subject=e,this._observer=t}dispose(){let e=this._subject.observers.indexOf(this._observer);e>-1&&this._subject.observers.splice(e,1),this._subject.observers.length===0&&this._subject.cancelCallback&&this._subject.cancelCallback().catch(t=>{})}},x=class{constructor(e){this._minLevel=e,this.out=console}log(e,t){if(e>=this._minLevel){let n=`[${new Date().toISOString()}] ${i[e]}: ${t}`;switch(e){case i.Critical:case i.Error:this.out.error(n);break;case i.Warning:this.out.warn(n);break;case i.Information:this.out.info(n);break;default:this.out.log(n);break}}}};function I(){let r="X-SignalR-User-Agent";return _.isNode&&(r="User-Agent"),[r,Ee(ve,Ie(),Te(),Pe())]}function Ee(r,e,t,n){let o="Microsoft SignalR/",s=r.split(".");return o+=`${s[0]}.${s[1]}`,o+=` (${r}; `,e&&e!==""?o+=`${e}; `:o+="Unknown OS; ",o+=`${t}`,n?o+=`; ${n}`:o+="; Unknown Runtime Version",o+=")",o}function Ie(){if(_.isNode)switch(process.platform){case"win32":return"Windows NT";case"darwin":return"macOS";case"linux":return"Linux";default:return process.platform}else return""}function Pe(){if(_.isNode)return process.versions.node}function Te(){return _.isNode?"NodeJS":"Browser"}function J(r){return r.stack?r.stack:r.message?r.message:`${r}`}function Se(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("could not find global")}var G=class extends k{constructor(e){if(super(),this._logger=e,typeof fetch>"u"||_.isNode){let t=typeof __webpack_require__=="function"?__non_webpack_require__:A;this._jar=new(t("tough-cookie")).CookieJar,typeof fetch>"u"?this._fetchType=t("node-fetch"):this._fetchType=fetch,this._fetchType=t("fetch-cookie")(this._fetchType,this._jar)}else this._fetchType=fetch.bind(Se());if(typeof AbortController>"u"){let t=typeof __webpack_require__=="function"?__non_webpack_require__:A;this._abortControllerType=t("abort-controller")}else this._abortControllerType=AbortController}send(e){return g(this,null,function*(){if(e.abortSignal&&e.abortSignal.aborted)throw new S;if(!e.method)throw new Error("No method defined.");if(!e.url)throw new Error("No url defined.");let t=new this._abortControllerType,n;e.abortSignal&&(e.abortSignal.onabort=()=>{t.abort(),n=new S});let o=null;if(e.timeout){let l=e.timeout;o=setTimeout(()=>{t.abort(),this._logger.log(i.Warning,"Timeout from HTTP request."),n=new T},l)}e.content===""&&(e.content=void 0),e.content&&(e.headers=e.headers||{},v(e.content)?e.headers["Content-Type"]="application/octet-stream":e.headers["Content-Type"]="text/plain;charset=UTF-8");let s;try{s=yield this._fetchType(e.url,{body:e.content,cache:"no-cache",credentials:e.withCredentials===!0?"include":"same-origin",headers:m({"X-Requested-With":"XMLHttpRequest"},e.headers),method:e.method,mode:"cors",redirect:"follow",signal:t.signal})}catch(l){throw n||(this._logger.log(i.Warning,`Error from HTTP request. ${l}.`),l)}finally{o&&clearTimeout(o),e.abortSignal&&(e.abortSignal.onabort=null)}if(!s.ok){let l=yield Ce(s,"text");throw new C(l||s.statusText,s.status)}let a=yield Ce(s,e.responseType);return new H(s.status,s.statusText,a)})}getCookieString(e){let t="";return _.isNode&&this._jar&&this._jar.getCookies(e,(n,o)=>t=o.join("; ")),t}};function Ce(r,e){let t;switch(e){case"arraybuffer":t=r.arrayBuffer();break;case"text":t=r.text();break;case"blob":case"document":case"json":throw new Error(`${e} is not supported.`);default:t=r.text();break}return t}var Y=class extends k{constructor(e){super(),this._logger=e}send(e){return e.abortSignal&&e.abortSignal.aborted?Promise.reject(new S):e.method?e.url?new Promise((t,n)=>{let o=new XMLHttpRequest;o.open(e.method,e.url,!0),o.withCredentials=e.withCredentials===void 0?!0:e.withCredentials,o.setRequestHeader("X-Requested-With","XMLHttpRequest"),e.content===""&&(e.content=void 0),e.content&&(v(e.content)?o.setRequestHeader("Content-Type","application/octet-stream"):o.setRequestHeader("Content-Type","text/plain;charset=UTF-8"));let s=e.headers;s&&Object.keys(s).forEach(c=>{o.setRequestHeader(c,s[c])}),e.responseType&&(o.responseType=e.responseType),e.abortSignal&&(e.abortSignal.onabort=()=>{o.abort(),n(new S)}),e.timeout&&(o.timeout=e.timeout),o.onload=()=>{e.abortSignal&&(e.abortSignal.onabort=null),o.status>=200&&o.status<300?t(new H(o.status,o.statusText,o.response||o.responseText)):n(new C(o.response||o.responseText||o.statusText,o.status))},o.onerror=()=>{this._logger.log(i.Warning,`Error from HTTP request. ${o.status}: ${o.statusText}.`),n(new C(o.statusText,o.status))},o.ontimeout=()=>{this._logger.log(i.Warning,"Timeout from HTTP request."),n(new T)},o.send(e.content)}):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}};var Q=class extends k{constructor(e){if(super(),typeof fetch<"u"||_.isNode)this._httpClient=new G(e);else if(typeof XMLHttpRequest<"u")this._httpClient=new Y(e);else throw new Error("No usable HttpClient found.")}send(e){return e.abortSignal&&e.abortSignal.aborted?Promise.reject(new S):e.method?e.url?this._httpClient.send(e):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}getCookieString(e){return this._httpClient.getCookieString(e)}};var y=class r{static write(e){return`${e}${r.RecordSeparator}`}static parse(e){if(e[e.length-1]!==r.RecordSeparator)throw new Error("Message is incomplete.");let t=e.split(r.RecordSeparator);return t.pop(),t}};y.RecordSeparatorCode=30;y.RecordSeparator=String.fromCharCode(y.RecordSeparatorCode);var Z=class{writeHandshakeRequest(e){return y.write(JSON.stringify(e))}parseHandshakeResponse(e){let t,n;if(v(e)){let a=new Uint8Array(e),l=a.indexOf(y.RecordSeparatorCode);if(l===-1)throw new Error("Message is incomplete.");let u=l+1;t=String.fromCharCode.apply(null,Array.prototype.slice.call(a.slice(0,u))),n=a.byteLength>u?a.slice(u).buffer:null}else{let a=e,l=a.indexOf(y.RecordSeparator);if(l===-1)throw new Error("Message is incomplete.");let u=l+1;t=a.substring(0,u),n=a.length>u?a.substring(u):null}let o=y.parse(t),s=JSON.parse(o[0]);if(s.type)throw new Error("Expected a handshake response from the server.");return[n,s]}};var h=function(r){return r[r.Invocation=1]="Invocation",r[r.StreamItem=2]="StreamItem",r[r.Completion=3]="Completion",r[r.StreamInvocation=4]="StreamInvocation",r[r.CancelInvocation=5]="CancelInvocation",r[r.Ping=6]="Ping",r[r.Close=7]="Close",r[r.Ack=8]="Ack",r[r.Sequence=9]="Sequence",r}(h||{});var ee=class{constructor(){this.observers=[]}next(e){for(let t of this.observers)t.next(e)}error(e){for(let t of this.observers)t.error&&t.error(e)}complete(){for(let e of this.observers)e.complete&&e.complete()}subscribe(e){return this.observers.push(e),new V(this,e)}};var te=class{constructor(e,t,n){this._bufferSize=1e5,this._messages=[],this._totalMessageCount=0,this._waitForSequenceMessage=!1,this._nextReceivingSequenceId=1,this._latestReceivedSequenceId=0,this._bufferedByteCount=0,this._reconnectInProgress=!1,this._protocol=e,this._connection=t,this._bufferSize=n}_send(e){return g(this,null,function*(){let t=this._protocol.writeMessage(e),n=Promise.resolve();if(this._isInvocationMessage(e)){this._totalMessageCount++;let o=()=>{},s=()=>{};v(t)?this._bufferedByteCount+=t.byteLength:this._bufferedByteCount+=t.length,this._bufferedByteCount>=this._bufferSize&&(n=new Promise((c,a)=>{o=c,s=a})),this._messages.push(new he(t,this._totalMessageCount,o,s))}try{this._reconnectInProgress||(yield this._connection.send(t))}catch{this._disconnected()}yield n})}_ack(e){let t=-1;for(let n=0;n<this._messages.length;n++){let o=this._messages[n];if(o._id<=e.sequenceId)t=n,v(o._message)?this._bufferedByteCount-=o._message.byteLength:this._bufferedByteCount-=o._message.length,o._resolver();else if(this._bufferedByteCount<this._bufferSize)o._resolver();else break}t!==-1&&(this._messages=this._messages.slice(t+1))}_shouldProcessMessage(e){if(this._waitForSequenceMessage)return e.type!==h.Sequence?!1:(this._waitForSequenceMessage=!1,!0);if(!this._isInvocationMessage(e))return!0;let t=this._nextReceivingSequenceId;return this._nextReceivingSequenceId++,t<=this._latestReceivedSequenceId?(t===this._latestReceivedSequenceId&&this._ackTimer(),!1):(this._latestReceivedSequenceId=t,this._ackTimer(),!0)}_resetSequence(e){if(e.sequenceId>this._nextReceivingSequenceId){this._connection.stop(new Error("Sequence ID greater than amount of messages we've received."));return}this._nextReceivingSequenceId=e.sequenceId}_disconnected(){this._reconnectInProgress=!0,this._waitForSequenceMessage=!0}_resend(){return g(this,null,function*(){let e=this._messages.length!==0?this._messages[0]._id:this._totalMessageCount+1;yield this._connection.send(this._protocol.writeMessage({type:h.Sequence,sequenceId:e}));let t=this._messages;for(let n of t)yield this._connection.send(n._message);this._reconnectInProgress=!1})}_dispose(e){e??(e=new Error("Unable to reconnect to server."));for(let t of this._messages)t._rejector(e)}_isInvocationMessage(e){switch(e.type){case h.Invocation:case h.StreamItem:case h.Completion:case h.StreamInvocation:case h.CancelInvocation:return!0;case h.Close:case h.Sequence:case h.Ping:case h.Ack:return!1}}_ackTimer(){this._ackTimerHandle===void 0&&(this._ackTimerHandle=setTimeout(()=>g(this,null,function*(){try{this._reconnectInProgress||(yield this._connection.send(this._protocol.writeMessage({type:h.Ack,sequenceId:this._latestReceivedSequenceId})))}catch{}clearTimeout(this._ackTimerHandle),this._ackTimerHandle=void 0}),1e3))}},he=class{constructor(e,t,n,o){this._message=e,this._id=t,this._resolver=n,this._rejector=o}};var Re=30*1e3,xe=15*1e3,$e=1e5,p=function(r){return r.Disconnected="Disconnected",r.Connecting="Connecting",r.Connected="Connected",r.Disconnecting="Disconnecting",r.Reconnecting="Reconnecting",r}(p||{}),O=class r{static create(e,t,n,o,s,c,a){return new r(e,t,n,o,s,c,a)}constructor(e,t,n,o,s,c,a){this._nextKeepAlive=0,this._freezeEventListener=()=>{this._logger.log(i.Warning,"The page is being frozen, this will likely lead to the connection being closed and messages being lost. For more information see the docs at https://learn.microsoft.com/aspnet/core/signalr/javascript-client#bsleep")},d.isRequired(e,"connection"),d.isRequired(t,"logger"),d.isRequired(n,"protocol"),this.serverTimeoutInMilliseconds=s??Re,this.keepAliveIntervalInMilliseconds=c??xe,this._statefulReconnectBufferSize=a??$e,this._logger=t,this._protocol=n,this.connection=e,this._reconnectPolicy=o,this._handshakeProtocol=new Z,this.connection.onreceive=l=>this._processIncomingData(l),this.connection.onclose=l=>this._connectionClosed(l),this._callbacks={},this._methods={},this._closedCallbacks=[],this._reconnectingCallbacks=[],this._reconnectedCallbacks=[],this._invocationId=0,this._receivedHandshakeResponse=!1,this._connectionState=p.Disconnected,this._connectionStarted=!1,this._cachedPingMessage=this._protocol.writeMessage({type:h.Ping})}get state(){return this._connectionState}get connectionId(){return this.connection&&this.connection.connectionId||null}get baseUrl(){return this.connection.baseUrl||""}set baseUrl(e){if(this._connectionState!==p.Disconnected&&this._connectionState!==p.Reconnecting)throw new Error("The HubConnection must be in the Disconnected or Reconnecting state to change the url.");if(!e)throw new Error("The HubConnection url must be a valid url.");this.connection.baseUrl=e}start(){return this._startPromise=this._startWithStateTransitions(),this._startPromise}_startWithStateTransitions(){return g(this,null,function*(){if(this._connectionState!==p.Disconnected)return Promise.reject(new Error("Cannot start a HubConnection that is not in the 'Disconnected' state."));this._connectionState=p.Connecting,this._logger.log(i.Debug,"Starting HubConnection.");try{yield this._startInternal(),_.isBrowser&&window.document.addEventListener("freeze",this._freezeEventListener),this._connectionState=p.Connected,this._connectionStarted=!0,this._logger.log(i.Debug,"HubConnection connected successfully.")}catch(e){return this._connectionState=p.Disconnected,this._logger.log(i.Debug,`HubConnection failed to start successfully because of error '${e}'.`),Promise.reject(e)}})}_startInternal(){return g(this,null,function*(){this._stopDuringStartError=void 0,this._receivedHandshakeResponse=!1;let e=new Promise((t,n)=>{this._handshakeResolver=t,this._handshakeRejecter=n});yield this.connection.start(this._protocol.transferFormat);try{let t=this._protocol.version;this.connection.features.reconnect||(t=1);let n={protocol:this._protocol.name,version:t};if(this._logger.log(i.Debug,"Sending handshake request."),yield this._sendMessage(this._handshakeProtocol.writeHandshakeRequest(n)),this._logger.log(i.Information,`Using HubProtocol '${this._protocol.name}'.`),this._cleanupTimeout(),this._resetTimeoutPeriod(),this._resetKeepAliveInterval(),yield e,this._stopDuringStartError)throw this._stopDuringStartError;(this.connection.features.reconnect||!1)&&(this._messageBuffer=new te(this._protocol,this.connection,this._statefulReconnectBufferSize),this.connection.features.disconnected=this._messageBuffer._disconnected.bind(this._messageBuffer),this.connection.features.resend=()=>{if(this._messageBuffer)return this._messageBuffer._resend()}),this.connection.features.inherentKeepAlive||(yield this._sendMessage(this._cachedPingMessage))}catch(t){throw this._logger.log(i.Debug,`Hub handshake failed with error '${t}' during start(). Stopping HubConnection.`),this._cleanupTimeout(),this._cleanupPingTimer(),yield this.connection.stop(t),t}})}stop(){return g(this,null,function*(){let e=this._startPromise;this.connection.features.reconnect=!1,this._stopPromise=this._stopInternal(),yield this._stopPromise;try{yield e}catch{}})}_stopInternal(e){if(this._connectionState===p.Disconnected)return this._logger.log(i.Debug,`Call to HubConnection.stop(${e}) ignored because it is already in the disconnected state.`),Promise.resolve();if(this._connectionState===p.Disconnecting)return this._logger.log(i.Debug,`Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnecting state.`),this._stopPromise;let t=this._connectionState;return this._connectionState=p.Disconnecting,this._logger.log(i.Debug,"Stopping HubConnection."),this._reconnectDelayHandle?(this._logger.log(i.Debug,"Connection stopped during reconnect delay. Done reconnecting."),clearTimeout(this._reconnectDelayHandle),this._reconnectDelayHandle=void 0,this._completeClose(),Promise.resolve()):(t===p.Connected&&this._sendCloseMessage(),this._cleanupTimeout(),this._cleanupPingTimer(),this._stopDuringStartError=e||new S("The connection was stopped before the hub handshake could complete."),this.connection.stop(e))}_sendCloseMessage(){return g(this,null,function*(){try{yield this._sendWithProtocol(this._createCloseMessage())}catch{}})}stream(e,...t){let[n,o]=this._replaceStreamingParams(t),s=this._createStreamInvocation(e,t,o),c,a=new ee;return a.cancelCallback=()=>{let l=this._createCancelInvocation(s.invocationId);return delete this._callbacks[s.invocationId],c.then(()=>this._sendWithProtocol(l))},this._callbacks[s.invocationId]=(l,u)=>{if(u){a.error(u);return}else l&&(l.type===h.Completion?l.error?a.error(new Error(l.error)):a.complete():a.next(l.item))},c=this._sendWithProtocol(s).catch(l=>{a.error(l),delete this._callbacks[s.invocationId]}),this._launchStreams(n,c),a}_sendMessage(e){return this._resetKeepAliveInterval(),this.connection.send(e)}_sendWithProtocol(e){return this._messageBuffer?this._messageBuffer._send(e):this._sendMessage(this._protocol.writeMessage(e))}send(e,...t){let[n,o]=this._replaceStreamingParams(t),s=this._sendWithProtocol(this._createInvocation(e,t,!0,o));return this._launchStreams(n,s),s}invoke(e,...t){let[n,o]=this._replaceStreamingParams(t),s=this._createInvocation(e,t,!1,o);return new Promise((a,l)=>{this._callbacks[s.invocationId]=(f,P)=>{if(P){l(P);return}else f&&(f.type===h.Completion?f.error?l(new Error(f.error)):a(f.result):l(new Error(`Unexpected message type: ${f.type}`)))};let u=this._sendWithProtocol(s).catch(f=>{l(f),delete this._callbacks[s.invocationId]});this._launchStreams(n,u)})}on(e,t){!e||!t||(e=e.toLowerCase(),this._methods[e]||(this._methods[e]=[]),this._methods[e].indexOf(t)===-1&&this._methods[e].push(t))}off(e,t){if(!e)return;e=e.toLowerCase();let n=this._methods[e];if(n)if(t){let o=n.indexOf(t);o!==-1&&(n.splice(o,1),n.length===0&&delete this._methods[e])}else delete this._methods[e]}onclose(e){e&&this._closedCallbacks.push(e)}onreconnecting(e){e&&this._reconnectingCallbacks.push(e)}onreconnected(e){e&&this._reconnectedCallbacks.push(e)}_processIncomingData(e){if(this._cleanupTimeout(),this._receivedHandshakeResponse||(e=this._processHandshakeResponse(e),this._receivedHandshakeResponse=!0),e){let t=this._protocol.parseMessages(e,this._logger);for(let n of t)if(!(this._messageBuffer&&!this._messageBuffer._shouldProcessMessage(n)))switch(n.type){case h.Invocation:this._invokeClientMethod(n).catch(o=>{this._logger.log(i.Error,`Invoke client method threw error: ${J(o)}`)});break;case h.StreamItem:case h.Completion:{let o=this._callbacks[n.invocationId];if(o){n.type===h.Completion&&delete this._callbacks[n.invocationId];try{o(n)}catch(s){this._logger.log(i.Error,`Stream callback threw error: ${J(s)}`)}}break}case h.Ping:break;case h.Close:{this._logger.log(i.Information,"Close message received from server.");let o=n.error?new Error("Server returned an error on close: "+n.error):void 0;n.allowReconnect===!0?this.connection.stop(o):this._stopPromise=this._stopInternal(o);break}case h.Ack:this._messageBuffer&&this._messageBuffer._ack(n);break;case h.Sequence:this._messageBuffer&&this._messageBuffer._resetSequence(n);break;default:this._logger.log(i.Warning,`Invalid message type: ${n.type}.`);break}}this._resetTimeoutPeriod()}_processHandshakeResponse(e){let t,n;try{[n,t]=this._handshakeProtocol.parseHandshakeResponse(e)}catch(o){let s="Error parsing handshake response: "+o;this._logger.log(i.Error,s);let c=new Error(s);throw this._handshakeRejecter(c),c}if(t.error){let o="Server returned handshake error: "+t.error;this._logger.log(i.Error,o);let s=new Error(o);throw this._handshakeRejecter(s),s}else this._logger.log(i.Debug,"Server handshake complete.");return this._handshakeResolver(),n}_resetKeepAliveInterval(){this.connection.features.inherentKeepAlive||(this._nextKeepAlive=new Date().getTime()+this.keepAliveIntervalInMilliseconds,this._cleanupPingTimer())}_resetTimeoutPeriod(){if((!this.connection.features||!this.connection.features.inherentKeepAlive)&&(this._timeoutHandle=setTimeout(()=>this.serverTimeout(),this.serverTimeoutInMilliseconds),this._pingServerHandle===void 0)){let e=this._nextKeepAlive-new Date().getTime();e<0&&(e=0),this._pingServerHandle=setTimeout(()=>g(this,null,function*(){if(this._connectionState===p.Connected)try{yield this._sendMessage(this._cachedPingMessage)}catch{this._cleanupPingTimer()}}),e)}}serverTimeout(){this.connection.stop(new Error("Server timeout elapsed without receiving a message from the server."))}_invokeClientMethod(e){return g(this,null,function*(){let t=e.target.toLowerCase(),n=this._methods[t];if(!n){this._logger.log(i.Warning,`No client method with the name '${t}' found.`),e.invocationId&&(this._logger.log(i.Warning,`No result given for '${t}' method and invocation ID '${e.invocationId}'.`),yield this._sendWithProtocol(this._createCompletionMessage(e.invocationId,"Client didn't provide a result.",null)));return}let o=n.slice(),s=!!e.invocationId,c,a,l;for(let u of o)try{let f=c;c=yield u.apply(this,e.arguments),s&&c&&f&&(this._logger.log(i.Error,`Multiple results provided for '${t}'. Sending error to server.`),l=this._createCompletionMessage(e.invocationId,"Client provided multiple results.",null)),a=void 0}catch(f){a=f,this._logger.log(i.Error,`A callback for the method '${t}' threw error '${f}'.`)}l?yield this._sendWithProtocol(l):s?(a?l=this._createCompletionMessage(e.invocationId,`${a}`,null):c!==void 0?l=this._createCompletionMessage(e.invocationId,null,c):(this._logger.log(i.Warning,`No result given for '${t}' method and invocation ID '${e.invocationId}'.`),l=this._createCompletionMessage(e.invocationId,"Client didn't provide a result.",null)),yield this._sendWithProtocol(l)):c&&this._logger.log(i.Error,`Result given for '${t}' method but server is not expecting a result.`)})}_connectionClosed(e){this._logger.log(i.Debug,`HubConnection.connectionClosed(${e}) called while in state ${this._connectionState}.`),this._stopDuringStartError=this._stopDuringStartError||e||new S("The underlying connection was closed before the hub handshake could complete."),this._handshakeResolver&&this._handshakeResolver(),this._cancelCallbacksWithError(e||new Error("Invocation canceled due to the underlying connection being closed.")),this._cleanupTimeout(),this._cleanupPingTimer(),this._connectionState===p.Disconnecting?this._completeClose(e):this._connectionState===p.Connected&&this._reconnectPolicy?this._reconnect(e):this._connectionState===p.Connected&&this._completeClose(e)}_completeClose(e){if(this._connectionStarted){this._connectionState=p.Disconnected,this._connectionStarted=!1,this._messageBuffer&&(this._messageBuffer._dispose(e??new Error("Connection closed.")),this._messageBuffer=void 0),_.isBrowser&&window.document.removeEventListener("freeze",this._freezeEventListener);try{this._closedCallbacks.forEach(t=>t.apply(this,[e]))}catch(t){this._logger.log(i.Error,`An onclose callback called with error '${e}' threw error '${t}'.`)}}}_reconnect(e){return g(this,null,function*(){let t=Date.now(),n=0,o=e!==void 0?e:new Error("Attempting to reconnect due to a unknown error."),s=this._getNextRetryDelay(n++,0,o);if(s===null){this._logger.log(i.Debug,"Connection not reconnecting because the IRetryPolicy returned null on the first reconnect attempt."),this._completeClose(e);return}if(this._connectionState=p.Reconnecting,e?this._logger.log(i.Information,`Connection reconnecting because of error '${e}'.`):this._logger.log(i.Information,"Connection reconnecting."),this._reconnectingCallbacks.length!==0){try{this._reconnectingCallbacks.forEach(c=>c.apply(this,[e]))}catch(c){this._logger.log(i.Error,`An onreconnecting callback called with error '${e}' threw error '${c}'.`)}if(this._connectionState!==p.Reconnecting){this._logger.log(i.Debug,"Connection left the reconnecting state in onreconnecting callback. Done reconnecting.");return}}for(;s!==null;){if(this._logger.log(i.Information,`Reconnect attempt number ${n} will start in ${s} ms.`),yield new Promise(c=>{this._reconnectDelayHandle=setTimeout(c,s)}),this._reconnectDelayHandle=void 0,this._connectionState!==p.Reconnecting){this._logger.log(i.Debug,"Connection left the reconnecting state during reconnect delay. Done reconnecting.");return}try{if(yield this._startInternal(),this._connectionState=p.Connected,this._logger.log(i.Information,"HubConnection reconnected successfully."),this._reconnectedCallbacks.length!==0)try{this._reconnectedCallbacks.forEach(c=>c.apply(this,[this.connection.connectionId]))}catch(c){this._logger.log(i.Error,`An onreconnected callback called with connectionId '${this.connection.connectionId}; threw error '${c}'.`)}return}catch(c){if(this._logger.log(i.Information,`Reconnect attempt failed because of error '${c}'.`),this._connectionState!==p.Reconnecting){this._logger.log(i.Debug,`Connection moved to the '${this._connectionState}' from the reconnecting state during reconnect attempt. Done reconnecting.`),this._connectionState===p.Disconnecting&&this._completeClose();return}o=c instanceof Error?c:new Error(c.toString()),s=this._getNextRetryDelay(n++,Date.now()-t,o)}}this._logger.log(i.Information,`Reconnect retries have been exhausted after ${Date.now()-t} ms and ${n} failed attempts. Connection disconnecting.`),this._completeClose()})}_getNextRetryDelay(e,t,n){try{return this._reconnectPolicy.nextRetryDelayInMilliseconds({elapsedMilliseconds:t,previousRetryCount:e,retryReason:n})}catch(o){return this._logger.log(i.Error,`IRetryPolicy.nextRetryDelayInMilliseconds(${e}, ${t}) threw error '${o}'.`),null}}_cancelCallbacksWithError(e){let t=this._callbacks;this._callbacks={},Object.keys(t).forEach(n=>{let o=t[n];try{o(null,e)}catch(s){this._logger.log(i.Error,`Stream 'error' callback called with '${e}' threw error: ${J(s)}`)}})}_cleanupPingTimer(){this._pingServerHandle&&(clearTimeout(this._pingServerHandle),this._pingServerHandle=void 0)}_cleanupTimeout(){this._timeoutHandle&&clearTimeout(this._timeoutHandle)}_createInvocation(e,t,n,o){if(n)return o.length!==0?{arguments:t,streamIds:o,target:e,type:h.Invocation}:{arguments:t,target:e,type:h.Invocation};{let s=this._invocationId;return this._invocationId++,o.length!==0?{arguments:t,invocationId:s.toString(),streamIds:o,target:e,type:h.Invocation}:{arguments:t,invocationId:s.toString(),target:e,type:h.Invocation}}}_launchStreams(e,t){if(e.length!==0){t||(t=Promise.resolve());for(let n in e)e[n].subscribe({complete:()=>{t=t.then(()=>this._sendWithProtocol(this._createCompletionMessage(n)))},error:o=>{let s;o instanceof Error?s=o.message:o&&o.toString?s=o.toString():s="Unknown error",t=t.then(()=>this._sendWithProtocol(this._createCompletionMessage(n,s)))},next:o=>{t=t.then(()=>this._sendWithProtocol(this._createStreamItemMessage(n,o)))}})}}_replaceStreamingParams(e){let t=[],n=[];for(let o=0;o<e.length;o++){let s=e[o];if(this._isObservable(s)){let c=this._invocationId;this._invocationId++,t[c]=s,n.push(c.toString()),e.splice(o,1)}}return[t,n]}_isObservable(e){return e&&e.subscribe&&typeof e.subscribe=="function"}_createStreamInvocation(e,t,n){let o=this._invocationId;return this._invocationId++,n.length!==0?{arguments:t,invocationId:o.toString(),streamIds:n,target:e,type:h.StreamInvocation}:{arguments:t,invocationId:o.toString(),target:e,type:h.StreamInvocation}}_createCancelInvocation(e){return{invocationId:e,type:h.CancelInvocation}}_createStreamItemMessage(e,t){return{invocationId:e,item:t,type:h.StreamItem}}_createCompletionMessage(e,t,n){return t?{error:t,invocationId:e,type:h.Completion}:{invocationId:e,result:n,type:h.Completion}}_createCloseMessage(){return{type:h.Close}}};var De=[0,2e3,1e4,3e4,null],W=class{constructor(e){this._retryDelays=e!==void 0?[...e,null]:De}nextRetryDelayInMilliseconds(e){return this._retryDelays[e.previousRetryCount]}};var $=(()=>{class r{}return r.Authorization="Authorization",r.Cookie="Cookie",r})();var ne=class extends k{constructor(e,t){super(),this._innerClient=e,this._accessTokenFactory=t}send(e){return g(this,null,function*(){let t=!0;this._accessTokenFactory&&(!this._accessToken||e.url&&e.url.indexOf("/negotiate?")>0)&&(t=!1,this._accessToken=yield this._accessTokenFactory()),this._setAuthorizationHeader(e);let n=yield this._innerClient.send(e);return t&&n.statusCode===401&&this._accessTokenFactory?(this._accessToken=yield this._accessTokenFactory(),this._setAuthorizationHeader(e),yield this._innerClient.send(e)):n})}_setAuthorizationHeader(e){e.headers||(e.headers={}),this._accessToken?e.headers[$.Authorization]=`Bearer ${this._accessToken}`:this._accessTokenFactory&&e.headers[$.Authorization]&&delete e.headers[$.Authorization]}getCookieString(e){return this._innerClient.getCookieString(e)}};var b=function(r){return r[r.None=0]="None",r[r.WebSockets=1]="WebSockets",r[r.ServerSentEvents=2]="ServerSentEvents",r[r.LongPolling=4]="LongPolling",r}(b||{}),w=function(r){return r[r.Text=1]="Text",r[r.Binary=2]="Binary",r}(w||{});var oe=class{constructor(){this._isAborted=!1,this.onabort=null}abort(){this._isAborted||(this._isAborted=!0,this.onabort&&this.onabort())}get signal(){return this}get aborted(){return this._isAborted}};var U=class{get pollAborted(){return this._pollAbort.aborted}constructor(e,t,n){this._httpClient=e,this._logger=t,this._pollAbort=new oe,this._options=n,this._running=!1,this.onreceive=null,this.onclose=null}connect(e,t){return g(this,null,function*(){if(d.isRequired(e,"url"),d.isRequired(t,"transferFormat"),d.isIn(t,w,"transferFormat"),this._url=e,this._logger.log(i.Trace,"(LongPolling transport) Connecting."),t===w.Binary&&typeof XMLHttpRequest<"u"&&typeof new XMLHttpRequest().responseType!="string")throw new Error("Binary protocols over XmlHttpRequest not implementing advanced features are not supported.");let[n,o]=I(),s=m({[n]:o},this._options.headers),c={abortSignal:this._pollAbort.signal,headers:s,timeout:1e5,withCredentials:this._options.withCredentials};t===w.Binary&&(c.responseType="arraybuffer");let a=`${e}&_=${Date.now()}`;this._logger.log(i.Trace,`(LongPolling transport) polling: ${a}.`);let l=yield this._httpClient.get(a,c);l.statusCode!==200?(this._logger.log(i.Error,`(LongPolling transport) Unexpected response code: ${l.statusCode}.`),this._closeError=new C(l.statusText||"",l.statusCode),this._running=!1):this._running=!0,this._receiving=this._poll(this._url,c)})}_poll(e,t){return g(this,null,function*(){try{for(;this._running;)try{let n=`${e}&_=${Date.now()}`;this._logger.log(i.Trace,`(LongPolling transport) polling: ${n}.`);let o=yield this._httpClient.get(n,t);o.statusCode===204?(this._logger.log(i.Information,"(LongPolling transport) Poll terminated by server."),this._running=!1):o.statusCode!==200?(this._logger.log(i.Error,`(LongPolling transport) Unexpected response code: ${o.statusCode}.`),this._closeError=new C(o.statusText||"",o.statusCode),this._running=!1):o.content?(this._logger.log(i.Trace,`(LongPolling transport) data received. ${R(o.content,this._options.logMessageContent)}.`),this.onreceive&&this.onreceive(o.content)):this._logger.log(i.Trace,"(LongPolling transport) Poll timed out, reissuing.")}catch(n){this._running?n instanceof T?this._logger.log(i.Trace,"(LongPolling transport) Poll timed out, reissuing."):(this._closeError=n,this._running=!1):this._logger.log(i.Trace,`(LongPolling transport) Poll errored after shutdown: ${n.message}`)}}finally{this._logger.log(i.Trace,"(LongPolling transport) Polling complete."),this.pollAborted||this._raiseOnClose()}})}send(e){return g(this,null,function*(){return this._running?X(this._logger,"LongPolling",this._httpClient,this._url,e,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))})}stop(){return g(this,null,function*(){this._logger.log(i.Trace,"(LongPolling transport) Stopping polling."),this._running=!1,this._pollAbort.abort();try{yield this._receiving,this._logger.log(i.Trace,`(LongPolling transport) sending DELETE request to ${this._url}.`);let e={},[t,n]=I();e[t]=n;let o={headers:m(m({},e),this._options.headers),timeout:this._options.timeout,withCredentials:this._options.withCredentials},s;try{yield this._httpClient.delete(this._url,o)}catch(c){s=c}s?s instanceof C&&(s.statusCode===404?this._logger.log(i.Trace,"(LongPolling transport) A 404 response was returned from sending a DELETE request."):this._logger.log(i.Trace,`(LongPolling transport) Error sending a DELETE request: ${s}`)):this._logger.log(i.Trace,"(LongPolling transport) DELETE request accepted.")}finally{this._logger.log(i.Trace,"(LongPolling transport) Stop finished."),this._raiseOnClose()}})}_raiseOnClose(){if(this.onclose){let e="(LongPolling transport) Firing onclose event.";this._closeError&&(e+=" Error: "+this._closeError),this._logger.log(i.Trace,e),this.onclose(this._closeError)}}};var re=class{constructor(e,t,n,o){this._httpClient=e,this._accessToken=t,this._logger=n,this._options=o,this.onreceive=null,this.onclose=null}connect(e,t){return g(this,null,function*(){return d.isRequired(e,"url"),d.isRequired(t,"transferFormat"),d.isIn(t,w,"transferFormat"),this._logger.log(i.Trace,"(SSE transport) Connecting."),this._url=e,this._accessToken&&(e+=(e.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(this._accessToken)}`),new Promise((n,o)=>{let s=!1;if(t!==w.Text){o(new Error("The Server-Sent Events transport only supports the 'Text' transfer format"));return}let c;if(_.isBrowser||_.isWebWorker)c=new this._options.EventSource(e,{withCredentials:this._options.withCredentials});else{let a=this._httpClient.getCookieString(e),l={};l.Cookie=a;let[u,f]=I();l[u]=f,c=new this._options.EventSource(e,{withCredentials:this._options.withCredentials,headers:m(m({},l),this._options.headers)})}try{c.onmessage=a=>{if(this.onreceive)try{this._logger.log(i.Trace,`(SSE transport) data received. ${R(a.data,this._options.logMessageContent)}.`),this.onreceive(a.data)}catch(l){this._close(l);return}},c.onerror=a=>{s?this._close():o(new Error("EventSource failed to connect. The connection could not be found on the server, either the connection ID is not present on the server, or a proxy is refusing/buffering the connection. If you have multiple servers check that sticky sessions are enabled."))},c.onopen=()=>{this._logger.log(i.Information,`SSE connected to ${this._url}`),this._eventSource=c,s=!0,n()}}catch(a){o(a);return}})})}send(e){return g(this,null,function*(){return this._eventSource?X(this._logger,"SSE",this._httpClient,this._url,e,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))})}stop(){return this._close(),Promise.resolve()}_close(e){this._eventSource&&(this._eventSource.close(),this._eventSource=void 0,this.onclose&&this.onclose(e))}};var se=class{constructor(e,t,n,o,s,c){this._logger=n,this._accessTokenFactory=t,this._logMessageContent=o,this._webSocketConstructor=s,this._httpClient=e,this.onreceive=null,this.onclose=null,this._headers=c}connect(e,t){return g(this,null,function*(){d.isRequired(e,"url"),d.isRequired(t,"transferFormat"),d.isIn(t,w,"transferFormat"),this._logger.log(i.Trace,"(WebSockets transport) Connecting.");let n;return this._accessTokenFactory&&(n=yield this._accessTokenFactory()),new Promise((o,s)=>{e=e.replace(/^http/,"ws");let c,a=this._httpClient.getCookieString(e),l=!1;if(_.isNode||_.isReactNative){let u={},[f,P]=I();u[f]=P,n&&(u[$.Authorization]=`Bearer ${n}`),a&&(u[$.Cookie]=a),c=new this._webSocketConstructor(e,void 0,{headers:m(m({},u),this._headers)})}else n&&(e+=(e.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(n)}`);c||(c=new this._webSocketConstructor(e)),t===w.Binary&&(c.binaryType="arraybuffer"),c.onopen=u=>{this._logger.log(i.Information,`WebSocket connected to ${e}.`),this._webSocket=c,l=!0,o()},c.onerror=u=>{let f=null;typeof ErrorEvent<"u"&&u instanceof ErrorEvent?f=u.error:f="There was an error with the transport",this._logger.log(i.Information,`(WebSockets transport) ${f}.`)},c.onmessage=u=>{if(this._logger.log(i.Trace,`(WebSockets transport) data received. ${R(u.data,this._logMessageContent)}.`),this.onreceive)try{this.onreceive(u.data)}catch(f){this._close(f);return}},c.onclose=u=>{if(l)this._close(u);else{let f=null;typeof ErrorEvent<"u"&&u instanceof ErrorEvent?f=u.error:f="WebSocket failed to connect. The connection could not be found on the server, either the endpoint may not be a SignalR endpoint, the connection ID is not present on the server, or there is a proxy blocking WebSockets. If you have multiple servers check that sticky sessions are enabled.",s(new Error(f))}}})})}send(e){return this._webSocket&&this._webSocket.readyState===this._webSocketConstructor.OPEN?(this._logger.log(i.Trace,`(WebSockets transport) sending data. ${R(e,this._logMessageContent)}.`),this._webSocket.send(e),Promise.resolve()):Promise.reject("WebSocket is not in the OPEN state")}stop(){return this._webSocket&&this._close(void 0),Promise.resolve()}_close(e){this._webSocket&&(this._webSocket.onclose=()=>{},this._webSocket.onmessage=()=>{},this._webSocket.onerror=()=>{},this._webSocket.close(),this._webSocket=void 0),this._logger.log(i.Trace,"(WebSockets transport) socket closed."),this.onclose&&(this._isCloseEvent(e)&&(e.wasClean===!1||e.code!==1e3)?this.onclose(new Error(`WebSocket closed with status code: ${e.code} (${e.reason||"no reason given"}).`)):e instanceof Error?this.onclose(e):this.onclose())}_isCloseEvent(e){return e&&typeof e.wasClean=="boolean"&&typeof e.code=="number"}};var ye=100,ie=class{constructor(e,t={}){if(this._stopPromiseResolver=()=>{},this.features={},this._negotiateVersion=1,d.isRequired(e,"url"),this._logger=be(t.logger),this.baseUrl=this._resolveUrl(e),t=t||{},t.logMessageContent=t.logMessageContent===void 0?!1:t.logMessageContent,typeof t.withCredentials=="boolean"||t.withCredentials===void 0)t.withCredentials=t.withCredentials===void 0?!0:t.withCredentials;else throw new Error("withCredentials option was not a 'boolean' or 'undefined' value");t.timeout=t.timeout===void 0?100*1e3:t.timeout;let n=null,o=null;if(_.isNode&&typeof A<"u"){let s=typeof __webpack_require__=="function"?__non_webpack_require__:A;n=s("ws"),o=s("eventsource")}!_.isNode&&typeof WebSocket<"u"&&!t.WebSocket?t.WebSocket=WebSocket:_.isNode&&!t.WebSocket&&n&&(t.WebSocket=n),!_.isNode&&typeof EventSource<"u"&&!t.EventSource?t.EventSource=EventSource:_.isNode&&!t.EventSource&&typeof o<"u"&&(t.EventSource=o),this._httpClient=new ne(t.httpClient||new Q(this._logger),t.accessTokenFactory),this._connectionState="Disconnected",this._connectionStarted=!1,this._options=t,this.onreceive=null,this.onclose=null}start(e){return g(this,null,function*(){if(e=e||w.Binary,d.isIn(e,w,"transferFormat"),this._logger.log(i.Debug,`Starting connection with transfer format '${w[e]}'.`),this._connectionState!=="Disconnected")return Promise.reject(new Error("Cannot start an HttpConnection that is not in the 'Disconnected' state."));if(this._connectionState="Connecting",this._startInternalPromise=this._startInternal(e),yield this._startInternalPromise,this._connectionState==="Disconnecting"){let t="Failed to start the HttpConnection before stop() was called.";return this._logger.log(i.Error,t),yield this._stopPromise,Promise.reject(new S(t))}else if(this._connectionState!=="Connected"){let t="HttpConnection.startInternal completed gracefully but didn't enter the connection into the connected state!";return this._logger.log(i.Error,t),Promise.reject(new S(t))}this._connectionStarted=!0})}send(e){return this._connectionState!=="Connected"?Promise.reject(new Error("Cannot send data if the connection is not in the 'Connected' State.")):(this._sendQueue||(this._sendQueue=new ue(this.transport)),this._sendQueue.send(e))}stop(e){return g(this,null,function*(){if(this._connectionState==="Disconnected")return this._logger.log(i.Debug,`Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnected state.`),Promise.resolve();if(this._connectionState==="Disconnecting")return this._logger.log(i.Debug,`Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnecting state.`),this._stopPromise;this._connectionState="Disconnecting",this._stopPromise=new Promise(t=>{this._stopPromiseResolver=t}),yield this._stopInternal(e),yield this._stopPromise})}_stopInternal(e){return g(this,null,function*(){this._stopError=e;try{yield this._startInternalPromise}catch{}if(this.transport){try{yield this.transport.stop()}catch(t){this._logger.log(i.Error,`HttpConnection.transport.stop() threw error '${t}'.`),this._stopConnection()}this.transport=void 0}else this._logger.log(i.Debug,"HttpConnection.transport is undefined in HttpConnection.stop() because start() failed.")})}_startInternal(e){return g(this,null,function*(){let t=this.baseUrl;this._accessTokenFactory=this._options.accessTokenFactory,this._httpClient._accessTokenFactory=this._accessTokenFactory;try{if(this._options.skipNegotiation)if(this._options.transport===b.WebSockets)this.transport=this._constructTransport(b.WebSockets),yield this._startTransport(t,e);else throw new Error("Negotiation can only be skipped when using the WebSocket transport directly.");else{let n=null,o=0;do{if(n=yield this._getNegotiationResponse(t),this._connectionState==="Disconnecting"||this._connectionState==="Disconnected")throw new S("The connection was stopped during negotiation.");if(n.error)throw new Error(n.error);if(n.ProtocolVersion)throw new Error("Detected a connection attempt to an ASP.NET SignalR Server. This client only supports connecting to an ASP.NET Core SignalR Server. See https://aka.ms/signalr-core-differences for details.");if(n.url&&(t=n.url),n.accessToken){let s=n.accessToken;this._accessTokenFactory=()=>s,this._httpClient._accessToken=s,this._httpClient._accessTokenFactory=void 0}o++}while(n.url&&o<ye);if(o===ye&&n.url)throw new Error("Negotiate redirection limit exceeded.");yield this._createTransport(t,this._options.transport,n,e)}this.transport instanceof U&&(this.features.inherentKeepAlive=!0),this._connectionState==="Connecting"&&(this._logger.log(i.Debug,"The HttpConnection connected successfully."),this._connectionState="Connected")}catch(n){return this._logger.log(i.Error,"Failed to start the connection: "+n),this._connectionState="Disconnected",this.transport=void 0,this._stopPromiseResolver(),Promise.reject(n)}})}_getNegotiationResponse(e){return g(this,null,function*(){let t={},[n,o]=I();t[n]=o;let s=this._resolveNegotiateUrl(e);this._logger.log(i.Debug,`Sending negotiation request: ${s}.`);try{let c=yield this._httpClient.post(s,{content:"",headers:m(m({},t),this._options.headers),timeout:this._options.timeout,withCredentials:this._options.withCredentials});if(c.statusCode!==200)return Promise.reject(new Error(`Unexpected status code returned from negotiate '${c.statusCode}'`));let a=JSON.parse(c.content);return(!a.negotiateVersion||a.negotiateVersion<1)&&(a.connectionToken=a.connectionId),a.useStatefulReconnect&&this._options._useStatefulReconnect!==!0?Promise.reject(new N("Client didn't negotiate Stateful Reconnect but the server did.")):a}catch(c){let a="Failed to complete negotiation with the server: "+c;return c instanceof C&&c.statusCode===404&&(a=a+" Either this is not a SignalR endpoint or there is a proxy blocking the connection."),this._logger.log(i.Error,a),Promise.reject(new N(a))}})}_createConnectUrl(e,t){return t?e+(e.indexOf("?")===-1?"?":"&")+`id=${t}`:e}_createTransport(e,t,n,o){return g(this,null,function*(){let s=this._createConnectUrl(e,n.connectionToken);if(this._isITransport(t)){this._logger.log(i.Debug,"Connection was provided an instance of ITransport, using that directly."),this.transport=t,yield this._startTransport(s,o),this.connectionId=n.connectionId;return}let c=[],a=n.availableTransports||[],l=n;for(let u of a){let f=this._resolveTransportOrError(u,t,o,l?.useStatefulReconnect===!0);if(f instanceof Error)c.push(`${u.transport} failed:`),c.push(f);else if(this._isITransport(f)){if(this.transport=f,!l){try{l=yield this._getNegotiationResponse(e)}catch(P){return Promise.reject(P)}s=this._createConnectUrl(e,l.connectionToken)}try{yield this._startTransport(s,o),this.connectionId=l.connectionId;return}catch(P){if(this._logger.log(i.Error,`Failed to start the transport '${u.transport}': ${P}`),l=void 0,c.push(new z(`${u.transport} failed: ${P}`,b[u.transport])),this._connectionState!=="Connecting"){let ge="Failed to select transport before stop() was called.";return this._logger.log(i.Debug,ge),Promise.reject(new S(ge))}}}}return c.length>0?Promise.reject(new K(`Unable to connect to the server with any of the available transports. ${c.join(" ")}`,c)):Promise.reject(new Error("None of the transports supported by the client are supported by the server."))})}_constructTransport(e){switch(e){case b.WebSockets:if(!this._options.WebSocket)throw new Error("'WebSocket' is not supported in your environment.");return new se(this._httpClient,this._accessTokenFactory,this._logger,this._options.logMessageContent,this._options.WebSocket,this._options.headers||{});case b.ServerSentEvents:if(!this._options.EventSource)throw new Error("'EventSource' is not supported in your environment.");return new re(this._httpClient,this._httpClient._accessToken,this._logger,this._options);case b.LongPolling:return new U(this._httpClient,this._logger,this._options);default:throw new Error(`Unknown transport: ${e}.`)}}_startTransport(e,t){return this.transport.onreceive=this.onreceive,this.features.reconnect?this.transport.onclose=n=>g(this,null,function*(){let o=!1;if(this.features.reconnect)try{this.features.disconnected(),yield this.transport.connect(e,t),yield this.features.resend()}catch{o=!0}else{this._stopConnection(n);return}o&&this._stopConnection(n)}):this.transport.onclose=n=>this._stopConnection(n),this.transport.connect(e,t)}_resolveTransportOrError(e,t,n,o){let s=b[e.transport];if(s==null)return this._logger.log(i.Debug,`Skipping transport '${e.transport}' because it is not supported by this client.`),new Error(`Skipping transport '${e.transport}' because it is not supported by this client.`);if(Ae(t,s))if(e.transferFormats.map(a=>w[a]).indexOf(n)>=0){if(s===b.WebSockets&&!this._options.WebSocket||s===b.ServerSentEvents&&!this._options.EventSource)return this._logger.log(i.Debug,`Skipping transport '${b[s]}' because it is not supported in your environment.'`),new F(`'${b[s]}' is not supported in your environment.`,s);this._logger.log(i.Debug,`Selecting transport '${b[s]}'.`);try{return this.features.reconnect=s===b.WebSockets?o:void 0,this._constructTransport(s)}catch(a){return a}}else return this._logger.log(i.Debug,`Skipping transport '${b[s]}' because it does not support the requested transfer format '${w[n]}'.`),new Error(`'${b[s]}' does not support ${w[n]}.`);else return this._logger.log(i.Debug,`Skipping transport '${b[s]}' because it was disabled by the client.`),new q(`'${b[s]}' is disabled by the client.`,s)}_isITransport(e){return e&&typeof e=="object"&&"connect"in e}_stopConnection(e){if(this._logger.log(i.Debug,`HttpConnection.stopConnection(${e}) called while in state ${this._connectionState}.`),this.transport=void 0,e=this._stopError||e,this._stopError=void 0,this._connectionState==="Disconnected"){this._logger.log(i.Debug,`Call to HttpConnection.stopConnection(${e}) was ignored because the connection is already in the disconnected state.`);return}if(this._connectionState==="Connecting")throw this._logger.log(i.Warning,`Call to HttpConnection.stopConnection(${e}) was ignored because the connection is still in the connecting state.`),new Error(`HttpConnection.stopConnection(${e}) was called while the connection is still in the connecting state.`);if(this._connectionState==="Disconnecting"&&this._stopPromiseResolver(),e?this._logger.log(i.Error,`Connection disconnected with error '${e}'.`):this._logger.log(i.Information,"Connection disconnected."),this._sendQueue&&(this._sendQueue.stop().catch(t=>{this._logger.log(i.Error,`TransportSendQueue.stop() threw error '${t}'.`)}),this._sendQueue=void 0),this.connectionId=void 0,this._connectionState="Disconnected",this._connectionStarted){this._connectionStarted=!1;try{this.onclose&&this.onclose(e)}catch(t){this._logger.log(i.Error,`HttpConnection.onclose(${e}) threw error '${t}'.`)}}}_resolveUrl(e){if(e.lastIndexOf("https://",0)===0||e.lastIndexOf("http://",0)===0)return e;if(!_.isBrowser)throw new Error(`Cannot resolve '${e}'.`);let t=window.document.createElement("a");return t.href=e,this._logger.log(i.Information,`Normalizing '${e}' to '${t.href}'.`),t.href}_resolveNegotiateUrl(e){let t=new URL(e);t.pathname.endsWith("/")?t.pathname+="negotiate":t.pathname+="/negotiate";let n=new URLSearchParams(t.searchParams);return n.has("negotiateVersion")||n.append("negotiateVersion",this._negotiateVersion.toString()),n.has("useStatefulReconnect")?n.get("useStatefulReconnect")==="true"&&(this._options._useStatefulReconnect=!0):this._options._useStatefulReconnect===!0&&n.append("useStatefulReconnect","true"),t.search=n.toString(),t.toString()}};function Ae(r,e){return!r||(e&r)!==0}var ue=class r{constructor(e){this._transport=e,this._buffer=[],this._executing=!0,this._sendBufferedData=new M,this._transportResult=new M,this._sendLoopPromise=this._sendLoop()}send(e){return this._bufferData(e),this._transportResult||(this._transportResult=new M),this._transportResult.promise}stop(){return this._executing=!1,this._sendBufferedData.resolve(),this._sendLoopPromise}_bufferData(e){if(this._buffer.length&&typeof this._buffer[0]!=typeof e)throw new Error(`Expected data to be of type ${typeof this._buffer} but was of type ${typeof e}`);this._buffer.push(e),this._sendBufferedData.resolve()}_sendLoop(){return g(this,null,function*(){for(;;){if(yield this._sendBufferedData.promise,!this._executing){this._transportResult&&this._transportResult.reject("Connection stopped.");break}this._sendBufferedData=new M;let e=this._transportResult;this._transportResult=void 0;let t=typeof this._buffer[0]=="string"?this._buffer.join(""):r._concatBuffers(this._buffer);this._buffer.length=0;try{yield this._transport.send(t),e.resolve()}catch(n){e.reject(n)}}})}static _concatBuffers(e){let t=e.map(s=>s.byteLength).reduce((s,c)=>s+c),n=new Uint8Array(t),o=0;for(let s of e)n.set(new Uint8Array(s),o),o+=s.byteLength;return n.buffer}},M=class{constructor(){this.promise=new Promise((e,t)=>[this._resolver,this._rejecter]=[e,t])}resolve(){this._resolver()}reject(e){this._rejecter(e)}};var He="json",ce=class{constructor(){this.name=He,this.version=2,this.transferFormat=w.Text}parseMessages(e,t){if(typeof e!="string")throw new Error("Invalid input for JSON hub protocol. Expected a string.");if(!e)return[];t===null&&(t=E.instance);let n=y.parse(e),o=[];for(let s of n){let c=JSON.parse(s);if(typeof c.type!="number")throw new Error("Invalid payload.");switch(c.type){case h.Invocation:this._isInvocationMessage(c);break;case h.StreamItem:this._isStreamItemMessage(c);break;case h.Completion:this._isCompletionMessage(c);break;case h.Ping:break;case h.Close:break;case h.Ack:this._isAckMessage(c);break;case h.Sequence:this._isSequenceMessage(c);break;default:t.log(i.Information,"Unknown message type '"+c.type+"' ignored.");continue}o.push(c)}return o}writeMessage(e){return y.write(JSON.stringify(e))}_isInvocationMessage(e){this._assertNotEmptyString(e.target,"Invalid payload for Invocation message."),e.invocationId!==void 0&&this._assertNotEmptyString(e.invocationId,"Invalid payload for Invocation message.")}_isStreamItemMessage(e){if(this._assertNotEmptyString(e.invocationId,"Invalid payload for StreamItem message."),e.item===void 0)throw new Error("Invalid payload for StreamItem message.")}_isCompletionMessage(e){if(e.result&&e.error)throw new Error("Invalid payload for Completion message.");!e.result&&e.error&&this._assertNotEmptyString(e.error,"Invalid payload for Completion message."),this._assertNotEmptyString(e.invocationId,"Invalid payload for Completion message.")}_isAckMessage(e){if(typeof e.sequenceId!="number")throw new Error("Invalid SequenceId for Ack message.")}_isSequenceMessage(e){if(typeof e.sequenceId!="number")throw new Error("Invalid SequenceId for Sequence message.")}_assertNotEmptyString(e,t){if(typeof e!="string"||e==="")throw new Error(t)}};var Me={trace:i.Trace,debug:i.Debug,info:i.Information,information:i.Information,warn:i.Warning,warning:i.Warning,error:i.Error,critical:i.Critical,none:i.None};function Le(r){let e=Me[r.toLowerCase()];if(typeof e<"u")return e;throw new Error(`Unknown log level: ${r}`)}var B=class{configureLogging(e){if(d.isRequired(e,"logging"),Ne(e))this.logger=e;else if(typeof e=="string"){let t=Le(e);this.logger=new x(t)}else this.logger=new x(e);return this}withUrl(e,t){return d.isRequired(e,"url"),d.isNotEmpty(e,"url"),this.url=e,typeof t=="object"?this.httpConnectionOptions=m(m({},this.httpConnectionOptions),t):this.httpConnectionOptions=D(m({},this.httpConnectionOptions),{transport:t}),this}withHubProtocol(e){return d.isRequired(e,"protocol"),this.protocol=e,this}withAutomaticReconnect(e){if(this.reconnectPolicy)throw new Error("A reconnectPolicy has already been set.");return e?Array.isArray(e)?this.reconnectPolicy=new W(e):this.reconnectPolicy=e:this.reconnectPolicy=new W,this}withServerTimeout(e){return d.isRequired(e,"milliseconds"),this._serverTimeoutInMilliseconds=e,this}withKeepAliveInterval(e){return d.isRequired(e,"milliseconds"),this._keepAliveIntervalInMilliseconds=e,this}withStatefulReconnect(e){return this.httpConnectionOptions===void 0&&(this.httpConnectionOptions={}),this.httpConnectionOptions._useStatefulReconnect=!0,this._statefulReconnectBufferSize=e?.bufferSize,this}build(){let e=this.httpConnectionOptions||{};if(e.logger===void 0&&(e.logger=this.logger),!this.url)throw new Error("The 'HubConnectionBuilder.withUrl' method must be called before building the connection.");let t=new ie(this.url,e);return O.create(t,this.logger||E.instance,this.protocol||new ce,this.reconnectPolicy,this._serverTimeoutInMilliseconds,this._keepAliveIntervalInMilliseconds,this._statefulReconnectBufferSize)}};function Ne(r){return r.log!==void 0}var On=(()=>{class r{toastr;port=window.location.href.split("localhost:")[1]?.split("/")[0];hostURL=t=>me.production?t:`https://localhost:${this.port}${t}`;lastGroupID;OnPaymentReceived=new L;OnReceivePushNotification=new L;OnContactReceive=new L;OnPromotionEventChange=new L;_recacheOutlet=new j(!1);recacheOutlet$=this._recacheOutlet.asObservable();_recacheCategory=new j(!1);recacheCategory$=this._recacheCategory.asObservable();_recacheSalesPerson=new j(!1);recacheSalesPerson$=this._recacheSalesPerson.asObservable();socketConnection;constructor(t){this.toastr=t,this.socketConnection=new B().withUrl(this.hostURL("/POSHub")).withAutomaticReconnect().configureLogging(i.Information).build(),this.registerEventHandler()}startConnection(){this.socketConnection.start().then(()=>{console.info("SignalR Connected")}).catch(t=>{console.log(t)})}SubscribeGroup(t,n=null){t!=this.lastGroupID&&(this.socketConnection.state==p.Disconnected?this.socketConnection.start().then(()=>{this.invokeSubscribe(t,n)}).catch(o=>{this.toastr.error(o,"Error")}):this.socketConnection.state==p.Connected&&this.invokeSubscribe(t,n))}invokeSubscribe(t,n){let o={CurrentID:t,PreviousID:n};this.socketConnection.invoke("SubscribeGroup",o).then(()=>{console.info(`SignalR Subscribed to Group: [${t}]`),this.lastGroupID=t}).catch(s=>{console.error(s)})}registerEventHandler(){this.socketConnection.on("ReceiveMobilePaymentSignal",t=>{this.OnPaymentReceived.next(t)}),this.socketConnection.on("OnContactReceive",t=>{this.OnContactReceive.next(t)}),this.socketConnection.on("ReceiveNewPromotionSignal",t=>{this.OnPromotionEventChange.next(t)}),this.socketConnection.on("ReceivePushNotificationSignal",t=>{this.OnReceivePushNotification.next(t)}),this.socketConnection.on("ReceiveOutletChanges",()=>{this._recacheOutlet.next(!0)}),this.socketConnection.on("ReceiveProductCategoryChanges",()=>{this._recacheCategory.next(!0)}),this.socketConnection.on("ReceiveSalesPersonChanges",()=>{this._recacheSalesPerson.next(!0)})}isSocketConnected(){return le.IsEmpty(this.socketConnection)?!1:this.socketConnection.state==p.Connected&&le.IsNotEmpty(this.socketConnection.connectionId)}broadcast(t){return this.isSocketConnected()?fe(this.socketConnection.invoke("BroadCast",t)).pipe(de(n=>(this.toastr.error(n,"Error"),ae(()=>n)))):ae(()=>"SignalR is not connected")}resetOutletCache(){this._recacheOutlet.next(!1)}resetCategoryCache(){this._recacheCategory.next(!1)}resetSalesPersonCache(){this._recacheSalesPerson.next(!1)}static \u0275fac=function(n){return new(n||r)(_e(we))};static \u0275prov=pe({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();export{i as a,p as b,B as c,On as d};