homebridge-config-ui-x 5.4.2-beta.37 → 5.4.2-beta.39

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 (77) hide show
  1. package/dist/core/spa/spa.filter.js +3 -2
  2. package/dist/core/spa/spa.filter.js.map +1 -1
  3. package/package.json +2 -2
  4. package/public/{chunk-WDLO2LKE.js → chunk-3D6N65J4.js} +1 -1
  5. package/public/{chunk-DBFJEIJS.js → chunk-3UBUXOXE.js} +1 -1
  6. package/public/{chunk-ZZ3PNQCV.js → chunk-4HJOARLT.js} +1 -1
  7. package/public/{chunk-VID4VJYB.js → chunk-4LSEOPOZ.js} +1 -1
  8. package/public/chunk-52C7AQHF.js +1 -0
  9. package/public/{chunk-GZTSZV57.js → chunk-5X4DSSFX.js} +1 -1
  10. package/public/{chunk-I5TETZ3I.js → chunk-5YEYAEII.js} +1 -1
  11. package/public/{chunk-LXFVNKLD.js → chunk-6DTD6NF3.js} +1 -1
  12. package/public/{chunk-4AMA2I7S.js → chunk-7A5X27PD.js} +1 -1
  13. package/public/{chunk-SKNY42PA.js → chunk-7GLWRKU3.js} +1 -1
  14. package/public/{chunk-4C4YI6E7.js → chunk-A5RJD2NI.js} +1 -1
  15. package/public/{chunk-SGN6BUCA.js → chunk-A7SU4MHQ.js} +1 -1
  16. package/public/{chunk-YOAZTJFX.js → chunk-AACIDDLQ.js} +1 -1
  17. package/public/{chunk-TJBMXIMS.js → chunk-ALCBZAYU.js} +1 -1
  18. package/public/{chunk-2QWVRCJT.js → chunk-APLWY5NX.js} +1 -1
  19. package/public/{chunk-7DPEZVCW.js → chunk-ATQX7UAD.js} +1 -1
  20. package/public/{chunk-UGKYL4GC.js → chunk-ATSXA6JC.js} +1 -1
  21. package/public/{chunk-VONVM67K.js → chunk-AWGNNB2D.js} +1 -1
  22. package/public/{chunk-J3XG7P63.js → chunk-CENZI3S3.js} +1 -1
  23. package/public/{chunk-LLGX7H2E.js → chunk-CTIB22NA.js} +1 -1
  24. package/public/{chunk-YP7VO76N.js → chunk-CWRKEWVF.js} +1 -1
  25. package/public/{chunk-74ETBIBO.js → chunk-D2HNCCB6.js} +1 -1
  26. package/public/{chunk-D53WL7UT.js → chunk-ELWS32DY.js} +1 -1
  27. package/public/{chunk-7XG67XSY.js → chunk-EOXVJQVC.js} +1 -1
  28. package/public/{chunk-XOF4NGP2.js → chunk-ER7B4SJX.js} +1 -1
  29. package/public/{chunk-ENIRIFAZ.js → chunk-F7JJKIRH.js} +1 -1
  30. package/public/{chunk-WWWGF75T.js → chunk-FXWHB456.js} +1 -1
  31. package/public/{chunk-PDYEJROE.js → chunk-G4LZU4IV.js} +1 -1
  32. package/public/{chunk-M5IQIUAS.js → chunk-HPKM7IIM.js} +1 -1
  33. package/public/{chunk-KT4VIVBF.js → chunk-HQBRFFPL.js} +1 -1
  34. package/public/{chunk-VYQ356YN.js → chunk-IL6JW6PB.js} +1 -1
  35. package/public/{chunk-M4JP7A5D.js → chunk-JFVIVTPN.js} +1 -1
  36. package/public/{chunk-F7ZV2JBO.js → chunk-KCLLEPG3.js} +1 -1
  37. package/public/{chunk-XVR5PO5K.js → chunk-L67VNHG3.js} +1 -1
  38. package/public/{chunk-ICMMGBDN.js → chunk-L6A3JX4G.js} +1 -1
  39. package/public/chunk-LUEG67ZC.js +1 -0
  40. package/public/{chunk-ECQJTOVP.js → chunk-NHATITBP.js} +1 -1
  41. package/public/{chunk-4O73JKMD.js → chunk-O2LPJIGL.js} +1 -1
  42. package/public/{chunk-3QYCAQXA.js → chunk-O5JN3MGQ.js} +1 -1
  43. package/public/{chunk-VMKJBULC.js → chunk-P26NLHMF.js} +1 -1
  44. package/public/{chunk-FH4R4DUJ.js → chunk-P3OBPI52.js} +1 -1
  45. package/public/{chunk-V2XN5VIX.js → chunk-PRNMO4E2.js} +4 -4
  46. package/public/{chunk-2M4EMVZU.js → chunk-QB3FSNZ6.js} +1 -1
  47. package/public/{chunk-4UU3RZEP.js → chunk-QTUF3RXY.js} +1 -1
  48. package/public/{chunk-2AA6JX5R.js → chunk-R5MI5QFX.js} +1 -1
  49. package/public/{chunk-GKQKFOED.js → chunk-R7VTFW66.js} +1 -1
  50. package/public/{chunk-P325ISRZ.js → chunk-RVTLTH36.js} +1 -1
  51. package/public/{chunk-N3PLAD2S.js → chunk-S7DYBWZB.js} +1 -1
  52. package/public/{chunk-FB6JMBLA.js → chunk-SWEKN3LU.js} +1 -1
  53. package/public/{chunk-FSYVLNWZ.js → chunk-SY5A3FXC.js} +1 -1
  54. package/public/{chunk-DSZHROF5.js → chunk-T5BB33VY.js} +1 -1
  55. package/public/{chunk-X7YPEFXQ.js → chunk-T746DKPC.js} +1 -1
  56. package/public/{chunk-RID3MVAU.js → chunk-TC6W6G4K.js} +1 -1
  57. package/public/{chunk-P5YAXACP.js → chunk-TUAZNIXQ.js} +1 -1
  58. package/public/{chunk-GI7GTPWF.js → chunk-TWX3KTUB.js} +1 -1
  59. package/public/{chunk-5IYSHGW6.js → chunk-UHBBWEYF.js} +1 -1
  60. package/public/{chunk-TQON4PEW.js → chunk-UZNQPAX6.js} +1 -1
  61. package/public/{chunk-APVR3TMK.js → chunk-WWTLM3TS.js} +1 -1
  62. package/public/chunk-X7MOL36P.js +1 -0
  63. package/public/{chunk-LHCF3MMU.js → chunk-XXWZHGPF.js} +1 -1
  64. package/public/{chunk-WKP5AQIC.js → chunk-YOZL5FMO.js} +1 -1
  65. package/public/{chunk-7JR3FPKB.js → chunk-YXBZAUAD.js} +1 -1
  66. package/public/{chunk-NZ7MYPJZ.js → chunk-Z5NTLQ63.js} +1 -1
  67. package/public/{chunk-XCE4GMMC.js → chunk-Z5ZROBPW.js} +1 -1
  68. package/public/{chunk-MBGUT2JJ.js → chunk-ZFMH535N.js} +1 -1
  69. package/public/{chunk-2T23YUFT.js → chunk-ZLMFFYBI.js} +1 -1
  70. package/public/{chunk-YMAWYUA6.js → chunk-ZX7APSEP.js} +1 -1
  71. package/public/index.html +2 -2
  72. package/public/{main-73FN4QK2.js → main-RGXEDQLJ.js} +1 -1
  73. package/public/styles-643WFJRY.css +1 -0
  74. package/public/chunk-A7RLQSPX.js +0 -1
  75. package/public/chunk-RW6BV4KL.js +0 -1
  76. package/public/chunk-VVSMN6BE.js +0 -1
  77. package/public/styles-AUT3PDLG.css +0 -1
@@ -1,4 +1,4 @@
1
- import{a as On}from"./chunk-F7ZV2JBO.js";import{$ as B,$a as dn,Aa as li,Ab as fn,Ac as _e,Ba as W,Bb as _n,Cb as mn,Cc as Ht,Db as _i,E as X,Eb as ee,F as nn,Gb as pe,H as Fe,Hb as gn,I as ni,Ib as ce,J as It,Jb as lt,Kb as ct,La as ke,Lb as fe,Ma as ot,Mb as Gt,Nb as q,O as tt,Ob as Y,Oc as yi,P as on,Q as sn,R as rn,Rb as vn,Sa as ci,Tb as P,Ub as Oe,Vb as mi,Wa as me,Wb as gi,Xa as R,Y as an,Ya as T,Z as ln,_ as oi,_a as di,a as Mt,aa as it,ab as xt,b as ii,ba as Rt,bb as O,cb as le,da as si,db as Ft,ea as K,eb as st,ec as vi,fa as I,gc as yn,ha as cn,ic as bn,ja as d,jb as ui,k as Ct,kb as he,lb as kt,ma as ri,mb as Bt,n as j,nb as hi,o as en,oa as St,ob as un,p as Tt,pa as Nt,pb as Pt,pc as wn,qb as At,r as et,rb as We,sa as re,sb as pi,ta as ae,tb as fi,ua as nt,ub as hn,vb as rt,wb as at,x as xe,xb as pn,ya as je,z as tn,za as ai}from"./chunk-V2XN5VIX.js";function dt(t){t||(t=d(nt));let e=new Ct(s=>{if(t.destroyed){s.next();return}return t.onDestroy(s.next.bind(s))});return s=>s.pipe(B(e))}var S="top",L="bottom",A="right",x="left",Ut="auto",De=[S,L,A,x],ge="start",Be="end",Dn="clippingParents",Lt="viewport",ze="popper",En="reference",bi=De.reduce(function(t,e){return t.concat([e+"-"+ge,e+"-"+Be])},[]),Vt=[].concat(De,[Ut]).reduce(function(t,e){return t.concat([e,e+"-"+ge,e+"-"+Be])},[]),To="beforeRead",Io="read",Ro="afterRead",So="beforeMain",No="main",xo="afterMain",Fo="beforeWrite",ko="write",Bo="afterWrite",Mn=[To,Io,Ro,So,No,xo,Fo,ko,Bo];function G(t){return t?(t.nodeName||"").toLowerCase():null}function D(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function te(t){var e=D(t).Element;return t instanceof e||t instanceof Element}function F(t){var e=D(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function Xe(t){if(typeof ShadowRoot>"u")return!1;var e=D(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function Po(t){var e=t.state;Object.keys(e.elements).forEach(function(s){var i=e.styles[s]||{},n=e.attributes[s]||{},o=e.elements[s];!F(o)||!G(o)||(Object.assign(o.style,i),Object.keys(n).forEach(function(r){var a=n[r];a===!1?o.removeAttribute(r):o.setAttribute(r,a===!0?"":a)}))})}function Ao(t){var e=t.state,s={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,s.popper),e.styles=s,e.elements.arrow&&Object.assign(e.elements.arrow.style,s.arrow),function(){Object.keys(e.elements).forEach(function(i){var n=e.elements[i],o=e.attributes[i]||{},r=Object.keys(e.styles.hasOwnProperty(i)?e.styles[i]:s[i]),a=r.reduce(function(l,u){return l[u]="",l},{});!F(n)||!G(n)||(Object.assign(n.style,a),Object.keys(o).forEach(function(l){n.removeAttribute(l)}))})}}var Cn={name:"applyStyles",enabled:!0,phase:"write",fn:Po,effect:Ao,requires:["computeStyles"]};function H(t){return t.split("-")[0]}var de=Math.max,Pe=Math.min,ve=Math.round;function Ke(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function ut(){return!/^((?!chrome|android).)*safari/i.test(Ke())}function ie(t,e,s){e===void 0&&(e=!1),s===void 0&&(s=!1);var i=t.getBoundingClientRect(),n=1,o=1;e&&F(t)&&(n=t.offsetWidth>0&&ve(i.width)/t.offsetWidth||1,o=t.offsetHeight>0&&ve(i.height)/t.offsetHeight||1);var r=te(t)?D(t):window,a=r.visualViewport,l=!ut()&&s,u=(i.left+(l&&a?a.offsetLeft:0))/n,c=(i.top+(l&&a?a.offsetTop:0))/o,_=i.width/n,p=i.height/o;return{width:_,height:p,top:c,right:u+_,bottom:c+p,left:u,x:u,y:c}}function Ae(t){var e=ie(t),s=t.offsetWidth,i=t.offsetHeight;return Math.abs(e.width-s)<=1&&(s=e.width),Math.abs(e.height-i)<=1&&(i=e.height),{x:t.offsetLeft,y:t.offsetTop,width:s,height:i}}function ht(t,e){var s=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(s&&Xe(s)){var i=e;do{if(i&&t.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function Q(t){return D(t).getComputedStyle(t)}function wi(t){return["table","td","th"].indexOf(G(t))>=0}function V(t){return((te(t)?t.ownerDocument:t.document)||window.document).documentElement}function ye(t){return G(t)==="html"?t:t.assignedSlot||t.parentNode||(Xe(t)?t.host:null)||V(t)}function Tn(t){return!F(t)||Q(t).position==="fixed"?null:t.offsetParent}function Go(t){var e=/firefox/i.test(Ke()),s=/Trident/i.test(Ke());if(s&&F(t)){var i=Q(t);if(i.position==="fixed")return null}var n=ye(t);for(Xe(n)&&(n=n.host);F(n)&&["html","body"].indexOf(G(n))<0;){var o=Q(n);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||e&&o.willChange==="filter"||e&&o.filter&&o.filter!=="none")return n;n=n.parentNode}return null}function ue(t){for(var e=D(t),s=Tn(t);s&&wi(s)&&Q(s).position==="static";)s=Tn(s);return s&&(G(s)==="html"||G(s)==="body"&&Q(s).position==="static")?e:s||Go(t)||e}function Ge(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function He(t,e,s){return de(t,Pe(e,s))}function In(t,e,s){var i=He(t,e,s);return i>s?s:i}function pt(){return{top:0,right:0,bottom:0,left:0}}function ft(t){return Object.assign({},pt(),t)}function _t(t,e){return e.reduce(function(s,i){return s[i]=t,s},{})}var Ho=function(e,s){return e=typeof e=="function"?e(Object.assign({},s.rects,{placement:s.placement})):e,ft(typeof e!="number"?e:_t(e,De))};function Uo(t){var e,s=t.state,i=t.name,n=t.options,o=s.elements.arrow,r=s.modifiersData.popperOffsets,a=H(s.placement),l=Ge(a),u=[x,A].indexOf(a)>=0,c=u?"height":"width";if(!(!o||!r)){var _=Ho(n.padding,s),p=Ae(o),h=l==="y"?S:x,v=l==="y"?L:A,f=s.rects.reference[c]+s.rects.reference[l]-r[l]-s.rects.popper[c],m=r[l]-s.rects.reference[l],w=ue(o),E=w?l==="y"?w.clientHeight||0:w.clientWidth||0:0,C=f/2-m/2,g=_[h],y=E-p[c]-_[v],b=E/2-p[c]/2+C,M=He(g,b,y),U=l;s.modifiersData[i]=(e={},e[U]=M,e.centerOffset=M-b,e)}}function Lo(t){var e=t.state,s=t.options,i=s.element,n=i===void 0?"[data-popper-arrow]":i;n!=null&&(typeof n=="string"&&(n=e.elements.popper.querySelector(n),!n)||ht(e.elements.popper,n)&&(e.elements.arrow=n))}var Oi={name:"arrow",enabled:!0,phase:"main",fn:Uo,effect:Lo,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ne(t){return t.split("-")[1]}var Vo={top:"auto",right:"auto",bottom:"auto",left:"auto"};function $o(t,e){var s=t.x,i=t.y,n=e.devicePixelRatio||1;return{x:ve(s*n)/n||0,y:ve(i*n)/n||0}}function Rn(t){var e,s=t.popper,i=t.popperRect,n=t.placement,o=t.variation,r=t.offsets,a=t.position,l=t.gpuAcceleration,u=t.adaptive,c=t.roundOffsets,_=t.isFixed,p=r.x,h=p===void 0?0:p,v=r.y,f=v===void 0?0:v,m=typeof c=="function"?c({x:h,y:f}):{x:h,y:f};h=m.x,f=m.y;var w=r.hasOwnProperty("x"),E=r.hasOwnProperty("y"),C=x,g=S,y=window;if(u){var b=ue(s),M="clientHeight",U="clientWidth";if(b===D(s)&&(b=V(s),Q(b).position!=="static"&&a==="absolute"&&(M="scrollHeight",U="scrollWidth")),b=b,n===S||(n===x||n===A)&&o===Be){g=L;var k=_&&b===y&&y.visualViewport?y.visualViewport.height:b[M];f-=k-i.height,f*=l?1:-1}if(n===x||(n===S||n===L)&&o===Be){C=A;var N=_&&b===y&&y.visualViewport?y.visualViewport.width:b[U];h-=N-i.width,h*=l?1:-1}}var $=Object.assign({position:a},u&&Vo),oe=c===!0?$o({x:h,y:f},D(s)):{x:h,y:f};if(h=oe.x,f=oe.y,l){var z;return Object.assign({},$,(z={},z[g]=E?"0":"",z[C]=w?"0":"",z.transform=(y.devicePixelRatio||1)<=1?"translate("+h+"px, "+f+"px)":"translate3d("+h+"px, "+f+"px, 0)",z))}return Object.assign({},$,(e={},e[g]=E?f+"px":"",e[C]=w?h+"px":"",e.transform="",e))}function jo(t){var e=t.state,s=t.options,i=s.gpuAcceleration,n=i===void 0?!0:i,o=s.adaptive,r=o===void 0?!0:o,a=s.roundOffsets,l=a===void 0?!0:a,u={placement:H(e.placement),variation:ne(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:n,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,Rn(Object.assign({},u,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:r,roundOffsets:l})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,Rn(Object.assign({},u,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}var Sn={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:jo,data:{}};var $t={passive:!0};function Wo(t){var e=t.state,s=t.instance,i=t.options,n=i.scroll,o=n===void 0?!0:n,r=i.resize,a=r===void 0?!0:r,l=D(e.elements.popper),u=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&u.forEach(function(c){c.addEventListener("scroll",s.update,$t)}),a&&l.addEventListener("resize",s.update,$t),function(){o&&u.forEach(function(c){c.removeEventListener("scroll",s.update,$t)}),a&&l.removeEventListener("resize",s.update,$t)}}var Nn={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Wo,data:{}};var zo={left:"right",right:"left",bottom:"top",top:"bottom"};function Qe(t){return t.replace(/left|right|bottom|top/g,function(e){return zo[e]})}var Xo={start:"end",end:"start"};function jt(t){return t.replace(/start|end/g,function(e){return Xo[e]})}function Ue(t){var e=D(t),s=e.pageXOffset,i=e.pageYOffset;return{scrollLeft:s,scrollTop:i}}function Le(t){return ie(V(t)).left+Ue(t).scrollLeft}function Di(t,e){var s=D(t),i=V(t),n=s.visualViewport,o=i.clientWidth,r=i.clientHeight,a=0,l=0;if(n){o=n.width,r=n.height;var u=ut();(u||!u&&e==="fixed")&&(a=n.offsetLeft,l=n.offsetTop)}return{width:o,height:r,x:a+Le(t),y:l}}function Ei(t){var e,s=V(t),i=Ue(t),n=(e=t.ownerDocument)==null?void 0:e.body,o=de(s.scrollWidth,s.clientWidth,n?n.scrollWidth:0,n?n.clientWidth:0),r=de(s.scrollHeight,s.clientHeight,n?n.scrollHeight:0,n?n.clientHeight:0),a=-i.scrollLeft+Le(t),l=-i.scrollTop;return Q(n||s).direction==="rtl"&&(a+=de(s.clientWidth,n?n.clientWidth:0)-o),{width:o,height:r,x:a,y:l}}function Ve(t){var e=Q(t),s=e.overflow,i=e.overflowX,n=e.overflowY;return/auto|scroll|overlay|hidden/.test(s+n+i)}function Wt(t){return["html","body","#document"].indexOf(G(t))>=0?t.ownerDocument.body:F(t)&&Ve(t)?t:Wt(ye(t))}function Ee(t,e){var s;e===void 0&&(e=[]);var i=Wt(t),n=i===((s=t.ownerDocument)==null?void 0:s.body),o=D(i),r=n?[o].concat(o.visualViewport||[],Ve(i)?i:[]):i,a=e.concat(r);return n?a:a.concat(Ee(ye(r)))}function Je(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Ko(t,e){var s=ie(t,!1,e==="fixed");return s.top=s.top+t.clientTop,s.left=s.left+t.clientLeft,s.bottom=s.top+t.clientHeight,s.right=s.left+t.clientWidth,s.width=t.clientWidth,s.height=t.clientHeight,s.x=s.left,s.y=s.top,s}function xn(t,e,s){return e===Lt?Je(Di(t,s)):te(e)?Ko(e,s):Je(Ei(V(t)))}function Qo(t){var e=Ee(ye(t)),s=["absolute","fixed"].indexOf(Q(t).position)>=0,i=s&&F(t)?ue(t):t;return te(i)?e.filter(function(n){return te(n)&&ht(n,i)&&G(n)!=="body"}):[]}function Mi(t,e,s,i){var n=e==="clippingParents"?Qo(t):[].concat(e),o=[].concat(n,[s]),r=o[0],a=o.reduce(function(l,u){var c=xn(t,u,i);return l.top=de(c.top,l.top),l.right=Pe(c.right,l.right),l.bottom=Pe(c.bottom,l.bottom),l.left=de(c.left,l.left),l},xn(t,r,i));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function mt(t){var e=t.reference,s=t.element,i=t.placement,n=i?H(i):null,o=i?ne(i):null,r=e.x+e.width/2-s.width/2,a=e.y+e.height/2-s.height/2,l;switch(n){case S:l={x:r,y:e.y-s.height};break;case L:l={x:r,y:e.y+e.height};break;case A:l={x:e.x+e.width,y:a};break;case x:l={x:e.x-s.width,y:a};break;default:l={x:e.x,y:e.y}}var u=n?Ge(n):null;if(u!=null){var c=u==="y"?"height":"width";switch(o){case ge:l[u]=l[u]-(e[c]/2-s[c]/2);break;case Be:l[u]=l[u]+(e[c]/2-s[c]/2);break;default:}}return l}function Me(t,e){e===void 0&&(e={});var s=e,i=s.placement,n=i===void 0?t.placement:i,o=s.strategy,r=o===void 0?t.strategy:o,a=s.boundary,l=a===void 0?Dn:a,u=s.rootBoundary,c=u===void 0?Lt:u,_=s.elementContext,p=_===void 0?ze:_,h=s.altBoundary,v=h===void 0?!1:h,f=s.padding,m=f===void 0?0:f,w=ft(typeof m!="number"?m:_t(m,De)),E=p===ze?En:ze,C=t.rects.popper,g=t.elements[v?E:p],y=Mi(te(g)?g:g.contextElement||V(t.elements.popper),l,c,r),b=ie(t.elements.reference),M=mt({reference:b,element:C,strategy:"absolute",placement:n}),U=Je(Object.assign({},C,M)),k=p===ze?U:b,N={top:y.top-k.top+w.top,bottom:k.bottom-y.bottom+w.bottom,left:y.left-k.left+w.left,right:k.right-y.right+w.right},$=t.modifiersData.offset;if(p===ze&&$){var oe=$[n];Object.keys(N).forEach(function(z){var Te=[A,L].indexOf(z)>=0?1:-1,Ie=[S,L].indexOf(z)>=0?"y":"x";N[z]+=oe[Ie]*Te})}return N}function Ci(t,e){e===void 0&&(e={});var s=e,i=s.placement,n=s.boundary,o=s.rootBoundary,r=s.padding,a=s.flipVariations,l=s.allowedAutoPlacements,u=l===void 0?Vt:l,c=ne(i),_=c?a?bi:bi.filter(function(v){return ne(v)===c}):De,p=_.filter(function(v){return u.indexOf(v)>=0});p.length===0&&(p=_);var h=p.reduce(function(v,f){return v[f]=Me(t,{placement:f,boundary:n,rootBoundary:o,padding:r})[H(f)],v},{});return Object.keys(h).sort(function(v,f){return h[v]-h[f]})}function Jo(t){if(H(t)===Ut)return[];var e=Qe(t);return[jt(t),e,jt(e)]}function qo(t){var e=t.state,s=t.options,i=t.name;if(!e.modifiersData[i]._skip){for(var n=s.mainAxis,o=n===void 0?!0:n,r=s.altAxis,a=r===void 0?!0:r,l=s.fallbackPlacements,u=s.padding,c=s.boundary,_=s.rootBoundary,p=s.altBoundary,h=s.flipVariations,v=h===void 0?!0:h,f=s.allowedAutoPlacements,m=e.options.placement,w=H(m),E=w===m,C=l||(E||!v?[Qe(m)]:Jo(m)),g=[m].concat(C).reduce(function($e,we){return $e.concat(H(we)===Ut?Ci(e,{placement:we,boundary:c,rootBoundary:_,padding:u,flipVariations:v,allowedAutoPlacements:f}):we)},[]),y=e.rects.reference,b=e.rects.popper,M=new Map,U=!0,k=g[0],N=0;N<g.length;N++){var $=g[N],oe=H($),z=ne($)===ge,Te=[S,L].indexOf(oe)>=0,Ie=Te?"width":"height",J=Me(e,{placement:$,boundary:c,rootBoundary:_,altBoundary:p,padding:u}),se=Te?z?A:x:z?L:S;y[Ie]>b[Ie]&&(se=Qe(se));var bt=Qe(se),Re=[];if(o&&Re.push(J[oe]<=0),a&&Re.push(J[se]<=0,J[bt]<=0),Re.every(function($e){return $e})){k=$,U=!1;break}M.set($,Re)}if(U)for(var wt=v?3:1,Yt=function(we){var Ze=g.find(function(Dt){var Se=M.get(Dt);if(Se)return Se.slice(0,we).every(function(Zt){return Zt})});if(Ze)return k=Ze,"break"},Ye=wt;Ye>0;Ye--){var Ot=Yt(Ye);if(Ot==="break")break}e.placement!==k&&(e.modifiersData[i]._skip=!0,e.placement=k,e.reset=!0)}}var Ti={name:"flip",enabled:!0,phase:"main",fn:qo,requiresIfExists:["offset"],data:{_skip:!1}};function Yo(t,e,s){var i=H(t),n=[x,S].indexOf(i)>=0?-1:1,o=typeof s=="function"?s(Object.assign({},e,{placement:t})):s,r=o[0],a=o[1];return r=r||0,a=(a||0)*n,[x,A].indexOf(i)>=0?{x:a,y:r}:{x:r,y:a}}function Zo(t){var e=t.state,s=t.options,i=t.name,n=s.offset,o=n===void 0?[0,0]:n,r=Vt.reduce(function(c,_){return c[_]=Yo(_,e.rects,o),c},{}),a=r[e.placement],l=a.x,u=a.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=u),e.modifiersData[i]=r}var Ii={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Zo};function es(t){var e=t.state,s=t.name;e.modifiersData[s]=mt({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}var Fn={name:"popperOffsets",enabled:!0,phase:"read",fn:es,data:{}};function Ri(t){return t==="x"?"y":"x"}function ts(t){var e=t.state,s=t.options,i=t.name,n=s.mainAxis,o=n===void 0?!0:n,r=s.altAxis,a=r===void 0?!1:r,l=s.boundary,u=s.rootBoundary,c=s.altBoundary,_=s.padding,p=s.tether,h=p===void 0?!0:p,v=s.tetherOffset,f=v===void 0?0:v,m=Me(e,{boundary:l,rootBoundary:u,padding:_,altBoundary:c}),w=H(e.placement),E=ne(e.placement),C=!E,g=Ge(w),y=Ri(g),b=e.modifiersData.popperOffsets,M=e.rects.reference,U=e.rects.popper,k=typeof f=="function"?f(Object.assign({},e.rects,{placement:e.placement})):f,N=typeof k=="number"?{mainAxis:k,altAxis:k}:Object.assign({mainAxis:0,altAxis:0},k),$=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,oe={x:0,y:0};if(b){if(o){var z,Te=g==="y"?S:x,Ie=g==="y"?L:A,J=g==="y"?"height":"width",se=b[g],bt=se+m[Te],Re=se-m[Ie],wt=h?-U[J]/2:0,Yt=E===ge?M[J]:U[J],Ye=E===ge?-U[J]:-M[J],Ot=e.elements.arrow,$e=h&&Ot?Ae(Ot):{width:0,height:0},we=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:pt(),Ze=we[Te],Dt=we[Ie],Se=He(0,M[J],$e[J]),Zt=C?M[J]/2-wt-Se-Ze-N.mainAxis:Yt-Se-Ze-N.mainAxis,wo=C?-M[J]/2+wt+Se+Dt+N.mainAxis:Ye+Se+Dt+N.mainAxis,ei=e.elements.arrow&&ue(e.elements.arrow),Oo=ei?g==="y"?ei.clientTop||0:ei.clientLeft||0:0,Wi=(z=$?.[g])!=null?z:0,Do=se+Zt-Wi-Oo,Eo=se+wo-Wi,zi=He(h?Pe(bt,Do):bt,se,h?de(Re,Eo):Re);b[g]=zi,oe[g]=zi-se}if(a){var Xi,Mo=g==="x"?S:x,Co=g==="x"?L:A,Ne=b[y],Et=y==="y"?"height":"width",Ki=Ne+m[Mo],Qi=Ne-m[Co],ti=[S,x].indexOf(w)!==-1,Ji=(Xi=$?.[y])!=null?Xi:0,qi=ti?Ki:Ne-M[Et]-U[Et]-Ji+N.altAxis,Yi=ti?Ne+M[Et]+U[Et]-Ji-N.altAxis:Qi,Zi=h&&ti?In(qi,Ne,Yi):He(h?qi:Ki,Ne,h?Yi:Qi);b[y]=Zi,oe[y]=Zi-Ne}e.modifiersData[i]=oe}}var Si={name:"preventOverflow",enabled:!0,phase:"main",fn:ts,requiresIfExists:["offset"]};function Ni(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function xi(t){return t===D(t)||!F(t)?Ue(t):Ni(t)}function is(t){var e=t.getBoundingClientRect(),s=ve(e.width)/t.offsetWidth||1,i=ve(e.height)/t.offsetHeight||1;return s!==1||i!==1}function Fi(t,e,s){s===void 0&&(s=!1);var i=F(e),n=F(e)&&is(e),o=V(e),r=ie(t,n,s),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!s)&&((G(e)!=="body"||Ve(o))&&(a=xi(e)),F(e)?(l=ie(e,!0),l.x+=e.clientLeft,l.y+=e.clientTop):o&&(l.x=Le(o))),{x:r.left+a.scrollLeft-l.x,y:r.top+a.scrollTop-l.y,width:r.width,height:r.height}}function ns(t){var e=new Map,s=new Set,i=[];t.forEach(function(o){e.set(o.name,o)});function n(o){s.add(o.name);var r=[].concat(o.requires||[],o.requiresIfExists||[]);r.forEach(function(a){if(!s.has(a)){var l=e.get(a);l&&n(l)}}),i.push(o)}return t.forEach(function(o){s.has(o.name)||n(o)}),i}function ki(t){var e=ns(t);return Mn.reduce(function(s,i){return s.concat(e.filter(function(n){return n.phase===i}))},[])}function Bi(t){var e;return function(){return e||(e=new Promise(function(s){Promise.resolve().then(function(){e=void 0,s(t())})})),e}}function Pi(t){var e=t.reduce(function(s,i){var n=s[i.name];return s[i.name]=n?Object.assign({},n,i,{options:Object.assign({},n.options,i.options),data:Object.assign({},n.data,i.data)}):i,s},{});return Object.keys(e).map(function(s){return e[s]})}var kn={placement:"bottom",modifiers:[],strategy:"absolute"};function Bn(){for(var t=arguments.length,e=new Array(t),s=0;s<t;s++)e[s]=arguments[s];return!e.some(function(i){return!(i&&typeof i.getBoundingClientRect=="function")})}function Pn(t){t===void 0&&(t={});var e=t,s=e.defaultModifiers,i=s===void 0?[]:s,n=e.defaultOptions,o=n===void 0?kn:n;return function(a,l,u){u===void 0&&(u=o);var c={placement:"bottom",orderedModifiers:[],options:Object.assign({},kn,o),modifiersData:{},elements:{reference:a,popper:l},attributes:{},styles:{}},_=[],p=!1,h={state:c,setOptions:function(w){var E=typeof w=="function"?w(c.options):w;f(),c.options=Object.assign({},o,c.options,E),c.scrollParents={reference:te(a)?Ee(a):a.contextElement?Ee(a.contextElement):[],popper:Ee(l)};var C=ki(Pi([].concat(i,c.options.modifiers)));return c.orderedModifiers=C.filter(function(g){return g.enabled}),v(),h.update()},forceUpdate:function(){if(!p){var w=c.elements,E=w.reference,C=w.popper;if(Bn(E,C)){c.rects={reference:Fi(E,ue(C),c.options.strategy==="fixed"),popper:Ae(C)},c.reset=!1,c.placement=c.options.placement,c.orderedModifiers.forEach(function(N){return c.modifiersData[N.name]=Object.assign({},N.data)});for(var g=0;g<c.orderedModifiers.length;g++){if(c.reset===!0){c.reset=!1,g=-1;continue}var y=c.orderedModifiers[g],b=y.fn,M=y.options,U=M===void 0?{}:M,k=y.name;typeof b=="function"&&(c=b({state:c,options:U,name:k,instance:h})||c)}}}},update:Bi(function(){return new Promise(function(m){h.forceUpdate(),m(c)})}),destroy:function(){f(),p=!0}};if(!Bn(a,l))return h;h.setOptions(u).then(function(m){!p&&u.onFirstUpdate&&u.onFirstUpdate(m)});function v(){c.orderedModifiers.forEach(function(m){var w=m.name,E=m.options,C=E===void 0?{}:E,g=m.effect;if(typeof g=="function"){var y=g({state:c,name:w,instance:h,options:C}),b=function(){};_.push(y||b)}})}function f(){_.forEach(function(m){return m()}),_=[]}return h}}var os=[Nn,Fn,Sn,Cn],Ai=Pn({defaultModifiers:os});var ss=["container"],rs=["ngbAccordionBody",""],Qt=["*"];function as(t,e){if(t&1){let s=_i();rt(0,"button",1),gn("click",function(){St(s);let n=ce();return Nt(n.close())}),at()}}var ls=t=>({$implicit:t});var cs=["dialog"],ds=["ngbNavOutlet",""];function us(t,e){}function hs(t,e){if(t&1&&(pi(0,"div",0),xt(1,us,0,0,"ng-template",1),fi()),t&2){let s=ce().$implicit,i=ce();We("item",s)("nav",i.nav)("role",i.paneRole),ke(),We("ngTemplateOutlet",(s.contentTpl==null?null:s.contentTpl.templateRef)||null)("ngTemplateOutletContext",yn(5,ls,s.active||i.isPanelTransitioning(s)))}}function ps(t,e){if(t&1&&kt(0,hs,2,7,"div",0),t&2){let s=e.$implicit,i=ce();Bt(s.isPanelInDom()||i.isPanelTransitioning(s)?0:-1)}}function fs(t,e){if(t&1&&(rt(0,"span"),mi(1),at()),t&2){let s=ce().$implicit,i=ce();Oe(i.highlightClass),ke(),gi(s)}}function _s(t,e){if(t&1&&(fn(0),mi(1),_n()),t&2){let s=ce().$implicit;ke(),gi(s)}}function ms(t,e){if(t&1&&kt(0,fs,2,3,"span",0)(1,_s,2,1,"ng-container"),t&2){let s=e.$index;Bt(s%2!==0?0:1)}}var gs=(t,e,s)=>({result:t,term:e,formatter:s});function vs(t,e){if(t&1&&hn(0,"ngb-highlight",2),t&2){let s=e.result,i=e.term,n=e.formatter;We("result",n(s))("term",i)}}function ys(t,e){}function bs(t,e){if(t&1){let s=_i();pi(0,"button",3),pe("mouseenter",function(){let n=St(s).$index,o=ce();return Nt(o.markActive(n))})("click",function(){let n=St(s).$implicit,o=ce();return Nt(o.select(n))}),xt(1,ys,0,0,"ng-template",4),fi()}if(t&2){let s=e.$implicit,i=e.$index,n=ce(),o=vn(1);P("active",i===n.activeIdx),We("id",n.id+"-"+i),ke(),We("ngTemplateOutlet",n.resultTemplate||o)("ngTemplateOutletContext",bn(5,gs,s,n.term,n.formatter))}}var Wn={animation:!0,transitionTimerDelayMs:5},qe=(()=>{let e=class e{constructor(){this.animation=Wn.animation}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),ws=(()=>{let e=class e{constructor(){this._ngbConfig=d(qe),this.closeOthers=!1,this.destroyOnHide=!0}get animation(){return this._animation??this._ngbConfig.animation}set animation(i){this._animation=i}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();function Os(t){let{transitionDelay:e,transitionDuration:s}=window.getComputedStyle(t),i=parseFloat(e),n=parseFloat(s);return(i+n)*1e3}function vt(t){return t!=null?`${t}`:""}function Jt(t){return typeof t=="string"}function Ce(t){return t!=null}function Ds(t){return t&&t.then}function Es(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}function Ms(t,e){return!e||typeof t.closest>"u"?null:t.closest(e)}function qt(t){return(t||document.body).getBoundingClientRect()}function Cs(t){return e=>new Ct(s=>{let i=r=>t.run(()=>s.next(r)),n=r=>t.run(()=>s.error(r)),o=()=>t.run(()=>s.complete());return e.subscribe({next:i,error:n,complete:o})})}function An(t){return t.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function zn(t=document){let e=t?.activeElement;return e?e.shadowRoot?zn(e.shadowRoot):e:null}var Ts=()=>{},{transitionTimerDelayMs:Is}=Wn,gt=new Map,Z=(t,e,s,i)=>{let n=i.context||{},o=gt.get(e);if(o)switch(i.runningTransition){case"continue":return Tt;case"stop":t.run(()=>o.transition$.complete()),n=Object.assign(o.context,n),gt.delete(e)}let r=s(e,i.animation,n)||Ts;if(!i.animation||window.getComputedStyle(e).transitionProperty==="none")return t.run(()=>r()),et(void 0).pipe(Cs(t));let a=new j,l=new j,u=a.pipe(rn(!0));gt.set(e,{transition$:a,complete:()=>{l.next(),l.complete()},context:n});let c=Os(e);return t.runOutsideAngular(()=>{let _=X(e,"transitionend").pipe(B(u),Fe(({target:h})=>h===e)),p=nn(c+Is).pipe(B(u));ni(p,_,l).pipe(B(u)).subscribe(()=>{gt.delete(e),t.run(()=>{r(),a.next(),a.complete()})})}),a.asObservable()},Gn=t=>{gt.get(t)?.complete()};function Rs(t,e){if(typeof navigator>"u")return"0px";let{classList:s}=t,i=s.contains("show");i||s.add("show"),t.style[e]="";let n=t.getBoundingClientRect()[e]+"px";return i||s.remove("show"),n}var Ss=(t,e,s)=>{let{direction:i,maxSize:n,dimension:o}=s,{classList:r}=t;function a(){r.add("collapse"),i==="show"?r.add("show"):r.remove("show")}if(!e){a();return}return n||(n=Rs(t,o),s.maxSize=n,t.style[o]=i!=="show"?n:"0px",r.remove("collapse","collapsing","show"),qt(t),r.add("collapsing")),t.style[o]=i==="show"?n:"0px",()=>{a(),r.remove("collapsing"),t.style[o]=""}},Ns=(()=>{let e=class e{constructor(){this._ngbConfig=d(qe),this.horizontal=!1}get animation(){return this._animation??this._ngbConfig.animation}set animation(i){this._animation=i}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),Hn=(()=>{let e=class e{constructor(){this._config=d(Ns),this._element=d(W),this._zone=d(le),this.animation=this._config.animation,this._afterInit=!1,this._isCollapsed=!1,this.ngbCollapseChange=new O,this.horizontal=this._config.horizontal,this.shown=new O,this.hidden=new O}set collapsed(i){this._isCollapsed!==i&&(this._isCollapsed=i,this._afterInit&&this._runTransitionWithEvents(i,this.animation))}ngOnInit(){this._runTransition(this._isCollapsed,!1),this._afterInit=!0}toggle(i=this._isCollapsed){this.collapsed=!i,this.ngbCollapseChange.next(this._isCollapsed)}_runTransition(i,n){return Z(this._zone,this._element.nativeElement,Ss,{animation:n,runningTransition:"stop",context:{direction:i?"hide":"show",dimension:this.horizontal?"width":"height"}})}_runTransitionWithEvents(i,n){this._runTransition(i,n).subscribe(()=>{i?this.hidden.emit():this.shown.emit()})}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=T({type:e,selectors:[["","ngbCollapse",""]],hostVars:2,hostBindings:function(n,o){n&2&&P("collapse-horizontal",o.horizontal)},inputs:{animation:"animation",collapsed:[0,"ngbCollapse","collapsed"],horizontal:"horizontal"},outputs:{ngbCollapseChange:"ngbCollapseChange",shown:"shown",hidden:"hidden"},exportAs:["ngbCollapse"]});let t=e;return t})(),xs=0,hu=(()=>{let e=class e{constructor(){this._item=d(yt),this._viewRef=null,this.elementRef=d(W)}ngAfterContentChecked(){this._bodyTpl&&(this._item._shouldBeInDOM?this._createViewIfNotExists():this._destroyViewIfExists())}ngOnDestroy(){this._destroyViewIfExists()}_destroyViewIfExists(){this._viewRef?.destroy(),this._viewRef=null}_createViewIfNotExists(){this._viewRef||(this._viewRef=this._vcr.createEmbeddedView(this._bodyTpl),this._viewRef.detectChanges())}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=me({type:e,selectors:[["","ngbAccordionBody",""]],contentQueries:function(n,o,r){if(n&1&&fe(r,ot,7),n&2){let a;q(a=Y())&&(o._bodyTpl=a.first)}},viewQuery:function(n,o){if(n&1&&Gt(ss,7,ci),n&2){let r;q(r=Y())&&(o._vcr=r.first)}},hostAttrs:[1,"accordion-body"],attrs:rs,ngContentSelectors:Qt,decls:3,vars:0,consts:[["container",""]],template:function(n,o){n&1&&(lt(),mn(0,null,0),ct(2))},encapsulation:2});let t=e;return t})(),Fs=(()=>{let e=class e{constructor(){this.item=d(yt),this.ngbCollapse=d(Hn)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=T({type:e,selectors:[["","ngbAccordionCollapse",""]],hostAttrs:["role","region",1,"accordion-collapse"],hostVars:2,hostBindings:function(n,o){n&2&&(ee("id",o.item.collapseId),he("aria-labelledby",o.item.toggleId))},exportAs:["ngbAccordionCollapse"],features:[dn([Hn])]});let t=e;return t})(),pu=(()=>{let e=class e{constructor(){this.item=d(yt),this.accordion=d(Xn)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=T({type:e,selectors:[["","ngbAccordionToggle",""]],hostVars:5,hostBindings:function(n,o){n&1&&pe("click",function(){return!o.item.disabled&&o.accordion.toggle(o.item.id)}),n&2&&(ee("id",o.item.toggleId),he("aria-controls",o.item.collapseId)("aria-expanded",!o.item.collapsed),P("collapsed",o.item.collapsed))}});let t=e;return t})();var fu=(()=>{let e=class e{constructor(){this.item=d(yt)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=T({type:e,selectors:[["","ngbAccordionHeader",""]],hostAttrs:["role","heading",1,"accordion-header"],hostVars:2,hostBindings:function(n,o){n&2&&P("collapsed",o.item.collapsed)}});let t=e;return t})(),yt=(()=>{let e=class e{constructor(){this._accordion=d(Xn),this._cd=d(_e),this._destroyRef=d(nt),this._collapsed=!0,this._id=`ngb-accordion-item-${xs++}`,this._collapseAnimationRunning=!1,this.disabled=!1,this.show=new O,this.shown=new O,this.hide=new O,this.hidden=new O}set id(i){Jt(i)&&i!==""&&(this._id=i)}set destroyOnHide(i){this._destroyOnHide=i}get destroyOnHide(){return this._destroyOnHide===void 0?this._accordion.destroyOnHide:this._destroyOnHide}set collapsed(i){i?this.collapse():this.expand()}get collapsed(){return this._collapsed}get id(){return`${this._id}`}get toggleId(){return`${this.id}-toggle`}get collapseId(){return`${this.id}-collapse`}get _shouldBeInDOM(){return!this.collapsed||this._collapseAnimationRunning||!this.destroyOnHide}ngAfterContentInit(){let{ngbCollapse:i}=this._collapse;i.animation=!1,i.collapsed=this.collapsed,i.animation=this._accordion.animation,i.hidden.pipe(dt(this._destroyRef)).subscribe(()=>{this._collapseAnimationRunning=!1,this.hidden.emit(),this._accordion.hidden.emit(this.id),this._cd.markForCheck()}),i.shown.pipe(dt(this._destroyRef)).subscribe(()=>{this.shown.emit(),this._accordion.shown.emit(this.id),this._cd.markForCheck()})}toggle(){this.collapsed=!this.collapsed}expand(){if(this.collapsed){if(!this._accordion._ensureCanExpand(this))return;this._collapsed=!1,this._cd.markForCheck(),this._cd.detectChanges(),this.show.emit(),this._accordion.show.emit(this.id),this._collapse.ngbCollapse.animation=this._accordion.animation,this._collapse.ngbCollapse.collapsed=!1}}collapse(){this.collapsed||(this._collapsed=!0,this._collapseAnimationRunning=!0,this._cd.markForCheck(),this.hide.emit(),this._accordion.hide.emit(this.id),this._collapse.ngbCollapse.animation=this._accordion.animation,this._collapse.ngbCollapse.collapsed=!0)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=T({type:e,selectors:[["","ngbAccordionItem",""]],contentQueries:function(n,o,r){if(n&1&&fe(r,Fs,7),n&2){let a;q(a=Y())&&(o._collapse=a.first)}},hostAttrs:[1,"accordion-item"],hostVars:1,hostBindings:function(n,o){n&2&&ee("id",o.id)},inputs:{id:[0,"ngbAccordionItem","id"],destroyOnHide:"destroyOnHide",disabled:"disabled",collapsed:"collapsed"},outputs:{show:"show",shown:"shown",hide:"hide",hidden:"hidden"},exportAs:["ngbAccordionItem"]});let t=e;return t})(),Xn=(()=>{let e=class e{constructor(){this._config=d(ws),this._anItemWasAlreadyExpandedDuringInitialisation=!1,this.animation=this._config.animation,this.closeOthers=this._config.closeOthers,this.destroyOnHide=this._config.destroyOnHide,this.show=new O,this.shown=new O,this.hide=new O,this.hidden=new O}toggle(i){this._getItem(i)?.toggle()}expand(i){this._getItem(i)?.expand()}expandAll(){this._items&&(this.closeOthers?this._items.find(i=>!i.collapsed)||this._items.first.expand():this._items.forEach(i=>i.expand()))}collapse(i){this._getItem(i)?.collapse()}collapseAll(){this._items?.forEach(i=>i.collapse())}isExpanded(i){let n=this._getItem(i);return n?!n.collapsed:!1}_ensureCanExpand(i){return this.closeOthers?this._items?(this._items.find(n=>!n.collapsed&&i!==n)?.collapse(),!0):this._anItemWasAlreadyExpandedDuringInitialisation?!1:(this._anItemWasAlreadyExpandedDuringInitialisation=!0,!0):!0}_getItem(i){return this._items?.find(n=>n.id===i)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=T({type:e,selectors:[["","ngbAccordion",""]],contentQueries:function(n,o,r){if(n&1&&fe(r,yt,4),n&2){let a;q(a=Y())&&(o._items=a)}},hostAttrs:[1,"accordion"],inputs:{animation:"animation",closeOthers:"closeOthers",destroyOnHide:"destroyOnHide"},outputs:{show:"show",shown:"shown",hide:"hide",hidden:"hidden"},exportAs:["ngbAccordion"]});let t=e;return t})();var Kn=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=R({type:e}),e.\u0275inj=I({});let t=e;return t})(),ks=(()=>{let e=class e{constructor(){this._ngbConfig=d(qe),this.dismissible=!0,this.type="warning"}get animation(){return this._animation??this._ngbConfig.animation}set animation(i){this._animation=i}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),Bs=({classList:t})=>{t.remove("show")},_u=(()=>{let e=class e{constructor(){this._config=d(ks),this._elementRef=d(W),this._zone=d(le),this.animation=this._config.animation,this.dismissible=this._config.dismissible,this.type=this._config.type,this.closed=new O}close(){let i=Z(this._zone,this._elementRef.nativeElement,Bs,{animation:this.animation,runningTransition:"continue"});return i.subscribe(()=>this.closed.emit()),i}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=me({type:e,selectors:[["ngb-alert"]],hostAttrs:["role","alert"],hostVars:6,hostBindings:function(n,o){n&2&&(Oe("alert show"+(o.type?" alert-"+o.type:"")),P("fade",o.animation)("alert-dismissible",o.dismissible))},inputs:{animation:"animation",dismissible:"dismissible",type:"type"},outputs:{closed:"closed"},exportAs:["ngbAlert"],ngContentSelectors:Qt,decls:2,vars:1,consts:()=>{let i;return i=$localize`:@@ngb.alert.close:Close`,[["type","button","aria-label",i,1,"btn-close"],["type","button","aria-label",i,1,"btn-close",3,"click"]]},template:function(n,o){n&1&&(lt(),ct(0),kt(1,as,1,0,"button",0)),n&2&&(ke(),Bt(o.dismissible?1:-1))},styles:[`ngb-alert{display:block}
1
+ import{a as On}from"./chunk-KCLLEPG3.js";import{$ as B,$a as dn,Aa as li,Ab as fn,Ac as _e,Ba as W,Bb as _n,Cb as mn,Cc as Ht,Db as _i,E as X,Eb as ee,F as nn,Gb as pe,H as Fe,Hb as gn,I as ni,Ib as ce,J as It,Jb as lt,Kb as ct,La as ke,Lb as fe,Ma as ot,Mb as Gt,Nb as q,O as tt,Ob as Y,Oc as yi,P as on,Q as sn,R as rn,Rb as vn,Sa as ci,Tb as P,Ub as Oe,Vb as mi,Wa as me,Wb as gi,Xa as R,Y as an,Ya as T,Z as ln,_ as oi,_a as di,a as Mt,aa as it,ab as xt,b as ii,ba as Rt,bb as O,cb as le,da as si,db as Ft,ea as K,eb as st,ec as vi,fa as I,gc as yn,ha as cn,ic as bn,ja as d,jb as ui,k as Ct,kb as he,lb as kt,ma as ri,mb as Bt,n as j,nb as hi,o as en,oa as St,ob as un,p as Tt,pa as Nt,pb as Pt,pc as wn,qb as At,r as et,rb as We,sa as re,sb as pi,ta as ae,tb as fi,ua as nt,ub as hn,vb as rt,wb as at,x as xe,xb as pn,ya as je,z as tn,za as ai}from"./chunk-PRNMO4E2.js";function dt(t){t||(t=d(nt));let e=new Ct(s=>{if(t.destroyed){s.next();return}return t.onDestroy(s.next.bind(s))});return s=>s.pipe(B(e))}var S="top",L="bottom",A="right",x="left",Ut="auto",De=[S,L,A,x],ge="start",Be="end",Dn="clippingParents",Lt="viewport",ze="popper",En="reference",bi=De.reduce(function(t,e){return t.concat([e+"-"+ge,e+"-"+Be])},[]),Vt=[].concat(De,[Ut]).reduce(function(t,e){return t.concat([e,e+"-"+ge,e+"-"+Be])},[]),To="beforeRead",Io="read",Ro="afterRead",So="beforeMain",No="main",xo="afterMain",Fo="beforeWrite",ko="write",Bo="afterWrite",Mn=[To,Io,Ro,So,No,xo,Fo,ko,Bo];function G(t){return t?(t.nodeName||"").toLowerCase():null}function D(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function te(t){var e=D(t).Element;return t instanceof e||t instanceof Element}function F(t){var e=D(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function Xe(t){if(typeof ShadowRoot>"u")return!1;var e=D(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function Po(t){var e=t.state;Object.keys(e.elements).forEach(function(s){var i=e.styles[s]||{},n=e.attributes[s]||{},o=e.elements[s];!F(o)||!G(o)||(Object.assign(o.style,i),Object.keys(n).forEach(function(r){var a=n[r];a===!1?o.removeAttribute(r):o.setAttribute(r,a===!0?"":a)}))})}function Ao(t){var e=t.state,s={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,s.popper),e.styles=s,e.elements.arrow&&Object.assign(e.elements.arrow.style,s.arrow),function(){Object.keys(e.elements).forEach(function(i){var n=e.elements[i],o=e.attributes[i]||{},r=Object.keys(e.styles.hasOwnProperty(i)?e.styles[i]:s[i]),a=r.reduce(function(l,u){return l[u]="",l},{});!F(n)||!G(n)||(Object.assign(n.style,a),Object.keys(o).forEach(function(l){n.removeAttribute(l)}))})}}var Cn={name:"applyStyles",enabled:!0,phase:"write",fn:Po,effect:Ao,requires:["computeStyles"]};function H(t){return t.split("-")[0]}var de=Math.max,Pe=Math.min,ve=Math.round;function Ke(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function ut(){return!/^((?!chrome|android).)*safari/i.test(Ke())}function ie(t,e,s){e===void 0&&(e=!1),s===void 0&&(s=!1);var i=t.getBoundingClientRect(),n=1,o=1;e&&F(t)&&(n=t.offsetWidth>0&&ve(i.width)/t.offsetWidth||1,o=t.offsetHeight>0&&ve(i.height)/t.offsetHeight||1);var r=te(t)?D(t):window,a=r.visualViewport,l=!ut()&&s,u=(i.left+(l&&a?a.offsetLeft:0))/n,c=(i.top+(l&&a?a.offsetTop:0))/o,_=i.width/n,p=i.height/o;return{width:_,height:p,top:c,right:u+_,bottom:c+p,left:u,x:u,y:c}}function Ae(t){var e=ie(t),s=t.offsetWidth,i=t.offsetHeight;return Math.abs(e.width-s)<=1&&(s=e.width),Math.abs(e.height-i)<=1&&(i=e.height),{x:t.offsetLeft,y:t.offsetTop,width:s,height:i}}function ht(t,e){var s=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(s&&Xe(s)){var i=e;do{if(i&&t.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function Q(t){return D(t).getComputedStyle(t)}function wi(t){return["table","td","th"].indexOf(G(t))>=0}function V(t){return((te(t)?t.ownerDocument:t.document)||window.document).documentElement}function ye(t){return G(t)==="html"?t:t.assignedSlot||t.parentNode||(Xe(t)?t.host:null)||V(t)}function Tn(t){return!F(t)||Q(t).position==="fixed"?null:t.offsetParent}function Go(t){var e=/firefox/i.test(Ke()),s=/Trident/i.test(Ke());if(s&&F(t)){var i=Q(t);if(i.position==="fixed")return null}var n=ye(t);for(Xe(n)&&(n=n.host);F(n)&&["html","body"].indexOf(G(n))<0;){var o=Q(n);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||e&&o.willChange==="filter"||e&&o.filter&&o.filter!=="none")return n;n=n.parentNode}return null}function ue(t){for(var e=D(t),s=Tn(t);s&&wi(s)&&Q(s).position==="static";)s=Tn(s);return s&&(G(s)==="html"||G(s)==="body"&&Q(s).position==="static")?e:s||Go(t)||e}function Ge(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function He(t,e,s){return de(t,Pe(e,s))}function In(t,e,s){var i=He(t,e,s);return i>s?s:i}function pt(){return{top:0,right:0,bottom:0,left:0}}function ft(t){return Object.assign({},pt(),t)}function _t(t,e){return e.reduce(function(s,i){return s[i]=t,s},{})}var Ho=function(e,s){return e=typeof e=="function"?e(Object.assign({},s.rects,{placement:s.placement})):e,ft(typeof e!="number"?e:_t(e,De))};function Uo(t){var e,s=t.state,i=t.name,n=t.options,o=s.elements.arrow,r=s.modifiersData.popperOffsets,a=H(s.placement),l=Ge(a),u=[x,A].indexOf(a)>=0,c=u?"height":"width";if(!(!o||!r)){var _=Ho(n.padding,s),p=Ae(o),h=l==="y"?S:x,v=l==="y"?L:A,f=s.rects.reference[c]+s.rects.reference[l]-r[l]-s.rects.popper[c],m=r[l]-s.rects.reference[l],w=ue(o),E=w?l==="y"?w.clientHeight||0:w.clientWidth||0:0,C=f/2-m/2,g=_[h],y=E-p[c]-_[v],b=E/2-p[c]/2+C,M=He(g,b,y),U=l;s.modifiersData[i]=(e={},e[U]=M,e.centerOffset=M-b,e)}}function Lo(t){var e=t.state,s=t.options,i=s.element,n=i===void 0?"[data-popper-arrow]":i;n!=null&&(typeof n=="string"&&(n=e.elements.popper.querySelector(n),!n)||ht(e.elements.popper,n)&&(e.elements.arrow=n))}var Oi={name:"arrow",enabled:!0,phase:"main",fn:Uo,effect:Lo,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ne(t){return t.split("-")[1]}var Vo={top:"auto",right:"auto",bottom:"auto",left:"auto"};function $o(t,e){var s=t.x,i=t.y,n=e.devicePixelRatio||1;return{x:ve(s*n)/n||0,y:ve(i*n)/n||0}}function Rn(t){var e,s=t.popper,i=t.popperRect,n=t.placement,o=t.variation,r=t.offsets,a=t.position,l=t.gpuAcceleration,u=t.adaptive,c=t.roundOffsets,_=t.isFixed,p=r.x,h=p===void 0?0:p,v=r.y,f=v===void 0?0:v,m=typeof c=="function"?c({x:h,y:f}):{x:h,y:f};h=m.x,f=m.y;var w=r.hasOwnProperty("x"),E=r.hasOwnProperty("y"),C=x,g=S,y=window;if(u){var b=ue(s),M="clientHeight",U="clientWidth";if(b===D(s)&&(b=V(s),Q(b).position!=="static"&&a==="absolute"&&(M="scrollHeight",U="scrollWidth")),b=b,n===S||(n===x||n===A)&&o===Be){g=L;var k=_&&b===y&&y.visualViewport?y.visualViewport.height:b[M];f-=k-i.height,f*=l?1:-1}if(n===x||(n===S||n===L)&&o===Be){C=A;var N=_&&b===y&&y.visualViewport?y.visualViewport.width:b[U];h-=N-i.width,h*=l?1:-1}}var $=Object.assign({position:a},u&&Vo),oe=c===!0?$o({x:h,y:f},D(s)):{x:h,y:f};if(h=oe.x,f=oe.y,l){var z;return Object.assign({},$,(z={},z[g]=E?"0":"",z[C]=w?"0":"",z.transform=(y.devicePixelRatio||1)<=1?"translate("+h+"px, "+f+"px)":"translate3d("+h+"px, "+f+"px, 0)",z))}return Object.assign({},$,(e={},e[g]=E?f+"px":"",e[C]=w?h+"px":"",e.transform="",e))}function jo(t){var e=t.state,s=t.options,i=s.gpuAcceleration,n=i===void 0?!0:i,o=s.adaptive,r=o===void 0?!0:o,a=s.roundOffsets,l=a===void 0?!0:a,u={placement:H(e.placement),variation:ne(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:n,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,Rn(Object.assign({},u,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:r,roundOffsets:l})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,Rn(Object.assign({},u,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}var Sn={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:jo,data:{}};var $t={passive:!0};function Wo(t){var e=t.state,s=t.instance,i=t.options,n=i.scroll,o=n===void 0?!0:n,r=i.resize,a=r===void 0?!0:r,l=D(e.elements.popper),u=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&u.forEach(function(c){c.addEventListener("scroll",s.update,$t)}),a&&l.addEventListener("resize",s.update,$t),function(){o&&u.forEach(function(c){c.removeEventListener("scroll",s.update,$t)}),a&&l.removeEventListener("resize",s.update,$t)}}var Nn={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Wo,data:{}};var zo={left:"right",right:"left",bottom:"top",top:"bottom"};function Qe(t){return t.replace(/left|right|bottom|top/g,function(e){return zo[e]})}var Xo={start:"end",end:"start"};function jt(t){return t.replace(/start|end/g,function(e){return Xo[e]})}function Ue(t){var e=D(t),s=e.pageXOffset,i=e.pageYOffset;return{scrollLeft:s,scrollTop:i}}function Le(t){return ie(V(t)).left+Ue(t).scrollLeft}function Di(t,e){var s=D(t),i=V(t),n=s.visualViewport,o=i.clientWidth,r=i.clientHeight,a=0,l=0;if(n){o=n.width,r=n.height;var u=ut();(u||!u&&e==="fixed")&&(a=n.offsetLeft,l=n.offsetTop)}return{width:o,height:r,x:a+Le(t),y:l}}function Ei(t){var e,s=V(t),i=Ue(t),n=(e=t.ownerDocument)==null?void 0:e.body,o=de(s.scrollWidth,s.clientWidth,n?n.scrollWidth:0,n?n.clientWidth:0),r=de(s.scrollHeight,s.clientHeight,n?n.scrollHeight:0,n?n.clientHeight:0),a=-i.scrollLeft+Le(t),l=-i.scrollTop;return Q(n||s).direction==="rtl"&&(a+=de(s.clientWidth,n?n.clientWidth:0)-o),{width:o,height:r,x:a,y:l}}function Ve(t){var e=Q(t),s=e.overflow,i=e.overflowX,n=e.overflowY;return/auto|scroll|overlay|hidden/.test(s+n+i)}function Wt(t){return["html","body","#document"].indexOf(G(t))>=0?t.ownerDocument.body:F(t)&&Ve(t)?t:Wt(ye(t))}function Ee(t,e){var s;e===void 0&&(e=[]);var i=Wt(t),n=i===((s=t.ownerDocument)==null?void 0:s.body),o=D(i),r=n?[o].concat(o.visualViewport||[],Ve(i)?i:[]):i,a=e.concat(r);return n?a:a.concat(Ee(ye(r)))}function Je(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Ko(t,e){var s=ie(t,!1,e==="fixed");return s.top=s.top+t.clientTop,s.left=s.left+t.clientLeft,s.bottom=s.top+t.clientHeight,s.right=s.left+t.clientWidth,s.width=t.clientWidth,s.height=t.clientHeight,s.x=s.left,s.y=s.top,s}function xn(t,e,s){return e===Lt?Je(Di(t,s)):te(e)?Ko(e,s):Je(Ei(V(t)))}function Qo(t){var e=Ee(ye(t)),s=["absolute","fixed"].indexOf(Q(t).position)>=0,i=s&&F(t)?ue(t):t;return te(i)?e.filter(function(n){return te(n)&&ht(n,i)&&G(n)!=="body"}):[]}function Mi(t,e,s,i){var n=e==="clippingParents"?Qo(t):[].concat(e),o=[].concat(n,[s]),r=o[0],a=o.reduce(function(l,u){var c=xn(t,u,i);return l.top=de(c.top,l.top),l.right=Pe(c.right,l.right),l.bottom=Pe(c.bottom,l.bottom),l.left=de(c.left,l.left),l},xn(t,r,i));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function mt(t){var e=t.reference,s=t.element,i=t.placement,n=i?H(i):null,o=i?ne(i):null,r=e.x+e.width/2-s.width/2,a=e.y+e.height/2-s.height/2,l;switch(n){case S:l={x:r,y:e.y-s.height};break;case L:l={x:r,y:e.y+e.height};break;case A:l={x:e.x+e.width,y:a};break;case x:l={x:e.x-s.width,y:a};break;default:l={x:e.x,y:e.y}}var u=n?Ge(n):null;if(u!=null){var c=u==="y"?"height":"width";switch(o){case ge:l[u]=l[u]-(e[c]/2-s[c]/2);break;case Be:l[u]=l[u]+(e[c]/2-s[c]/2);break;default:}}return l}function Me(t,e){e===void 0&&(e={});var s=e,i=s.placement,n=i===void 0?t.placement:i,o=s.strategy,r=o===void 0?t.strategy:o,a=s.boundary,l=a===void 0?Dn:a,u=s.rootBoundary,c=u===void 0?Lt:u,_=s.elementContext,p=_===void 0?ze:_,h=s.altBoundary,v=h===void 0?!1:h,f=s.padding,m=f===void 0?0:f,w=ft(typeof m!="number"?m:_t(m,De)),E=p===ze?En:ze,C=t.rects.popper,g=t.elements[v?E:p],y=Mi(te(g)?g:g.contextElement||V(t.elements.popper),l,c,r),b=ie(t.elements.reference),M=mt({reference:b,element:C,strategy:"absolute",placement:n}),U=Je(Object.assign({},C,M)),k=p===ze?U:b,N={top:y.top-k.top+w.top,bottom:k.bottom-y.bottom+w.bottom,left:y.left-k.left+w.left,right:k.right-y.right+w.right},$=t.modifiersData.offset;if(p===ze&&$){var oe=$[n];Object.keys(N).forEach(function(z){var Te=[A,L].indexOf(z)>=0?1:-1,Ie=[S,L].indexOf(z)>=0?"y":"x";N[z]+=oe[Ie]*Te})}return N}function Ci(t,e){e===void 0&&(e={});var s=e,i=s.placement,n=s.boundary,o=s.rootBoundary,r=s.padding,a=s.flipVariations,l=s.allowedAutoPlacements,u=l===void 0?Vt:l,c=ne(i),_=c?a?bi:bi.filter(function(v){return ne(v)===c}):De,p=_.filter(function(v){return u.indexOf(v)>=0});p.length===0&&(p=_);var h=p.reduce(function(v,f){return v[f]=Me(t,{placement:f,boundary:n,rootBoundary:o,padding:r})[H(f)],v},{});return Object.keys(h).sort(function(v,f){return h[v]-h[f]})}function Jo(t){if(H(t)===Ut)return[];var e=Qe(t);return[jt(t),e,jt(e)]}function qo(t){var e=t.state,s=t.options,i=t.name;if(!e.modifiersData[i]._skip){for(var n=s.mainAxis,o=n===void 0?!0:n,r=s.altAxis,a=r===void 0?!0:r,l=s.fallbackPlacements,u=s.padding,c=s.boundary,_=s.rootBoundary,p=s.altBoundary,h=s.flipVariations,v=h===void 0?!0:h,f=s.allowedAutoPlacements,m=e.options.placement,w=H(m),E=w===m,C=l||(E||!v?[Qe(m)]:Jo(m)),g=[m].concat(C).reduce(function($e,we){return $e.concat(H(we)===Ut?Ci(e,{placement:we,boundary:c,rootBoundary:_,padding:u,flipVariations:v,allowedAutoPlacements:f}):we)},[]),y=e.rects.reference,b=e.rects.popper,M=new Map,U=!0,k=g[0],N=0;N<g.length;N++){var $=g[N],oe=H($),z=ne($)===ge,Te=[S,L].indexOf(oe)>=0,Ie=Te?"width":"height",J=Me(e,{placement:$,boundary:c,rootBoundary:_,altBoundary:p,padding:u}),se=Te?z?A:x:z?L:S;y[Ie]>b[Ie]&&(se=Qe(se));var bt=Qe(se),Re=[];if(o&&Re.push(J[oe]<=0),a&&Re.push(J[se]<=0,J[bt]<=0),Re.every(function($e){return $e})){k=$,U=!1;break}M.set($,Re)}if(U)for(var wt=v?3:1,Yt=function(we){var Ze=g.find(function(Dt){var Se=M.get(Dt);if(Se)return Se.slice(0,we).every(function(Zt){return Zt})});if(Ze)return k=Ze,"break"},Ye=wt;Ye>0;Ye--){var Ot=Yt(Ye);if(Ot==="break")break}e.placement!==k&&(e.modifiersData[i]._skip=!0,e.placement=k,e.reset=!0)}}var Ti={name:"flip",enabled:!0,phase:"main",fn:qo,requiresIfExists:["offset"],data:{_skip:!1}};function Yo(t,e,s){var i=H(t),n=[x,S].indexOf(i)>=0?-1:1,o=typeof s=="function"?s(Object.assign({},e,{placement:t})):s,r=o[0],a=o[1];return r=r||0,a=(a||0)*n,[x,A].indexOf(i)>=0?{x:a,y:r}:{x:r,y:a}}function Zo(t){var e=t.state,s=t.options,i=t.name,n=s.offset,o=n===void 0?[0,0]:n,r=Vt.reduce(function(c,_){return c[_]=Yo(_,e.rects,o),c},{}),a=r[e.placement],l=a.x,u=a.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=u),e.modifiersData[i]=r}var Ii={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Zo};function es(t){var e=t.state,s=t.name;e.modifiersData[s]=mt({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}var Fn={name:"popperOffsets",enabled:!0,phase:"read",fn:es,data:{}};function Ri(t){return t==="x"?"y":"x"}function ts(t){var e=t.state,s=t.options,i=t.name,n=s.mainAxis,o=n===void 0?!0:n,r=s.altAxis,a=r===void 0?!1:r,l=s.boundary,u=s.rootBoundary,c=s.altBoundary,_=s.padding,p=s.tether,h=p===void 0?!0:p,v=s.tetherOffset,f=v===void 0?0:v,m=Me(e,{boundary:l,rootBoundary:u,padding:_,altBoundary:c}),w=H(e.placement),E=ne(e.placement),C=!E,g=Ge(w),y=Ri(g),b=e.modifiersData.popperOffsets,M=e.rects.reference,U=e.rects.popper,k=typeof f=="function"?f(Object.assign({},e.rects,{placement:e.placement})):f,N=typeof k=="number"?{mainAxis:k,altAxis:k}:Object.assign({mainAxis:0,altAxis:0},k),$=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,oe={x:0,y:0};if(b){if(o){var z,Te=g==="y"?S:x,Ie=g==="y"?L:A,J=g==="y"?"height":"width",se=b[g],bt=se+m[Te],Re=se-m[Ie],wt=h?-U[J]/2:0,Yt=E===ge?M[J]:U[J],Ye=E===ge?-U[J]:-M[J],Ot=e.elements.arrow,$e=h&&Ot?Ae(Ot):{width:0,height:0},we=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:pt(),Ze=we[Te],Dt=we[Ie],Se=He(0,M[J],$e[J]),Zt=C?M[J]/2-wt-Se-Ze-N.mainAxis:Yt-Se-Ze-N.mainAxis,wo=C?-M[J]/2+wt+Se+Dt+N.mainAxis:Ye+Se+Dt+N.mainAxis,ei=e.elements.arrow&&ue(e.elements.arrow),Oo=ei?g==="y"?ei.clientTop||0:ei.clientLeft||0:0,Wi=(z=$?.[g])!=null?z:0,Do=se+Zt-Wi-Oo,Eo=se+wo-Wi,zi=He(h?Pe(bt,Do):bt,se,h?de(Re,Eo):Re);b[g]=zi,oe[g]=zi-se}if(a){var Xi,Mo=g==="x"?S:x,Co=g==="x"?L:A,Ne=b[y],Et=y==="y"?"height":"width",Ki=Ne+m[Mo],Qi=Ne-m[Co],ti=[S,x].indexOf(w)!==-1,Ji=(Xi=$?.[y])!=null?Xi:0,qi=ti?Ki:Ne-M[Et]-U[Et]-Ji+N.altAxis,Yi=ti?Ne+M[Et]+U[Et]-Ji-N.altAxis:Qi,Zi=h&&ti?In(qi,Ne,Yi):He(h?qi:Ki,Ne,h?Yi:Qi);b[y]=Zi,oe[y]=Zi-Ne}e.modifiersData[i]=oe}}var Si={name:"preventOverflow",enabled:!0,phase:"main",fn:ts,requiresIfExists:["offset"]};function Ni(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function xi(t){return t===D(t)||!F(t)?Ue(t):Ni(t)}function is(t){var e=t.getBoundingClientRect(),s=ve(e.width)/t.offsetWidth||1,i=ve(e.height)/t.offsetHeight||1;return s!==1||i!==1}function Fi(t,e,s){s===void 0&&(s=!1);var i=F(e),n=F(e)&&is(e),o=V(e),r=ie(t,n,s),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!s)&&((G(e)!=="body"||Ve(o))&&(a=xi(e)),F(e)?(l=ie(e,!0),l.x+=e.clientLeft,l.y+=e.clientTop):o&&(l.x=Le(o))),{x:r.left+a.scrollLeft-l.x,y:r.top+a.scrollTop-l.y,width:r.width,height:r.height}}function ns(t){var e=new Map,s=new Set,i=[];t.forEach(function(o){e.set(o.name,o)});function n(o){s.add(o.name);var r=[].concat(o.requires||[],o.requiresIfExists||[]);r.forEach(function(a){if(!s.has(a)){var l=e.get(a);l&&n(l)}}),i.push(o)}return t.forEach(function(o){s.has(o.name)||n(o)}),i}function ki(t){var e=ns(t);return Mn.reduce(function(s,i){return s.concat(e.filter(function(n){return n.phase===i}))},[])}function Bi(t){var e;return function(){return e||(e=new Promise(function(s){Promise.resolve().then(function(){e=void 0,s(t())})})),e}}function Pi(t){var e=t.reduce(function(s,i){var n=s[i.name];return s[i.name]=n?Object.assign({},n,i,{options:Object.assign({},n.options,i.options),data:Object.assign({},n.data,i.data)}):i,s},{});return Object.keys(e).map(function(s){return e[s]})}var kn={placement:"bottom",modifiers:[],strategy:"absolute"};function Bn(){for(var t=arguments.length,e=new Array(t),s=0;s<t;s++)e[s]=arguments[s];return!e.some(function(i){return!(i&&typeof i.getBoundingClientRect=="function")})}function Pn(t){t===void 0&&(t={});var e=t,s=e.defaultModifiers,i=s===void 0?[]:s,n=e.defaultOptions,o=n===void 0?kn:n;return function(a,l,u){u===void 0&&(u=o);var c={placement:"bottom",orderedModifiers:[],options:Object.assign({},kn,o),modifiersData:{},elements:{reference:a,popper:l},attributes:{},styles:{}},_=[],p=!1,h={state:c,setOptions:function(w){var E=typeof w=="function"?w(c.options):w;f(),c.options=Object.assign({},o,c.options,E),c.scrollParents={reference:te(a)?Ee(a):a.contextElement?Ee(a.contextElement):[],popper:Ee(l)};var C=ki(Pi([].concat(i,c.options.modifiers)));return c.orderedModifiers=C.filter(function(g){return g.enabled}),v(),h.update()},forceUpdate:function(){if(!p){var w=c.elements,E=w.reference,C=w.popper;if(Bn(E,C)){c.rects={reference:Fi(E,ue(C),c.options.strategy==="fixed"),popper:Ae(C)},c.reset=!1,c.placement=c.options.placement,c.orderedModifiers.forEach(function(N){return c.modifiersData[N.name]=Object.assign({},N.data)});for(var g=0;g<c.orderedModifiers.length;g++){if(c.reset===!0){c.reset=!1,g=-1;continue}var y=c.orderedModifiers[g],b=y.fn,M=y.options,U=M===void 0?{}:M,k=y.name;typeof b=="function"&&(c=b({state:c,options:U,name:k,instance:h})||c)}}}},update:Bi(function(){return new Promise(function(m){h.forceUpdate(),m(c)})}),destroy:function(){f(),p=!0}};if(!Bn(a,l))return h;h.setOptions(u).then(function(m){!p&&u.onFirstUpdate&&u.onFirstUpdate(m)});function v(){c.orderedModifiers.forEach(function(m){var w=m.name,E=m.options,C=E===void 0?{}:E,g=m.effect;if(typeof g=="function"){var y=g({state:c,name:w,instance:h,options:C}),b=function(){};_.push(y||b)}})}function f(){_.forEach(function(m){return m()}),_=[]}return h}}var os=[Nn,Fn,Sn,Cn],Ai=Pn({defaultModifiers:os});var ss=["container"],rs=["ngbAccordionBody",""],Qt=["*"];function as(t,e){if(t&1){let s=_i();rt(0,"button",1),gn("click",function(){St(s);let n=ce();return Nt(n.close())}),at()}}var ls=t=>({$implicit:t});var cs=["dialog"],ds=["ngbNavOutlet",""];function us(t,e){}function hs(t,e){if(t&1&&(pi(0,"div",0),xt(1,us,0,0,"ng-template",1),fi()),t&2){let s=ce().$implicit,i=ce();We("item",s)("nav",i.nav)("role",i.paneRole),ke(),We("ngTemplateOutlet",(s.contentTpl==null?null:s.contentTpl.templateRef)||null)("ngTemplateOutletContext",yn(5,ls,s.active||i.isPanelTransitioning(s)))}}function ps(t,e){if(t&1&&kt(0,hs,2,7,"div",0),t&2){let s=e.$implicit,i=ce();Bt(s.isPanelInDom()||i.isPanelTransitioning(s)?0:-1)}}function fs(t,e){if(t&1&&(rt(0,"span"),mi(1),at()),t&2){let s=ce().$implicit,i=ce();Oe(i.highlightClass),ke(),gi(s)}}function _s(t,e){if(t&1&&(fn(0),mi(1),_n()),t&2){let s=ce().$implicit;ke(),gi(s)}}function ms(t,e){if(t&1&&kt(0,fs,2,3,"span",0)(1,_s,2,1,"ng-container"),t&2){let s=e.$index;Bt(s%2!==0?0:1)}}var gs=(t,e,s)=>({result:t,term:e,formatter:s});function vs(t,e){if(t&1&&hn(0,"ngb-highlight",2),t&2){let s=e.result,i=e.term,n=e.formatter;We("result",n(s))("term",i)}}function ys(t,e){}function bs(t,e){if(t&1){let s=_i();pi(0,"button",3),pe("mouseenter",function(){let n=St(s).$index,o=ce();return Nt(o.markActive(n))})("click",function(){let n=St(s).$implicit,o=ce();return Nt(o.select(n))}),xt(1,ys,0,0,"ng-template",4),fi()}if(t&2){let s=e.$implicit,i=e.$index,n=ce(),o=vn(1);P("active",i===n.activeIdx),We("id",n.id+"-"+i),ke(),We("ngTemplateOutlet",n.resultTemplate||o)("ngTemplateOutletContext",bn(5,gs,s,n.term,n.formatter))}}var Wn={animation:!0,transitionTimerDelayMs:5},qe=(()=>{let e=class e{constructor(){this.animation=Wn.animation}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),ws=(()=>{let e=class e{constructor(){this._ngbConfig=d(qe),this.closeOthers=!1,this.destroyOnHide=!0}get animation(){return this._animation??this._ngbConfig.animation}set animation(i){this._animation=i}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();function Os(t){let{transitionDelay:e,transitionDuration:s}=window.getComputedStyle(t),i=parseFloat(e),n=parseFloat(s);return(i+n)*1e3}function vt(t){return t!=null?`${t}`:""}function Jt(t){return typeof t=="string"}function Ce(t){return t!=null}function Ds(t){return t&&t.then}function Es(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}function Ms(t,e){return!e||typeof t.closest>"u"?null:t.closest(e)}function qt(t){return(t||document.body).getBoundingClientRect()}function Cs(t){return e=>new Ct(s=>{let i=r=>t.run(()=>s.next(r)),n=r=>t.run(()=>s.error(r)),o=()=>t.run(()=>s.complete());return e.subscribe({next:i,error:n,complete:o})})}function An(t){return t.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function zn(t=document){let e=t?.activeElement;return e?e.shadowRoot?zn(e.shadowRoot):e:null}var Ts=()=>{},{transitionTimerDelayMs:Is}=Wn,gt=new Map,Z=(t,e,s,i)=>{let n=i.context||{},o=gt.get(e);if(o)switch(i.runningTransition){case"continue":return Tt;case"stop":t.run(()=>o.transition$.complete()),n=Object.assign(o.context,n),gt.delete(e)}let r=s(e,i.animation,n)||Ts;if(!i.animation||window.getComputedStyle(e).transitionProperty==="none")return t.run(()=>r()),et(void 0).pipe(Cs(t));let a=new j,l=new j,u=a.pipe(rn(!0));gt.set(e,{transition$:a,complete:()=>{l.next(),l.complete()},context:n});let c=Os(e);return t.runOutsideAngular(()=>{let _=X(e,"transitionend").pipe(B(u),Fe(({target:h})=>h===e)),p=nn(c+Is).pipe(B(u));ni(p,_,l).pipe(B(u)).subscribe(()=>{gt.delete(e),t.run(()=>{r(),a.next(),a.complete()})})}),a.asObservable()},Gn=t=>{gt.get(t)?.complete()};function Rs(t,e){if(typeof navigator>"u")return"0px";let{classList:s}=t,i=s.contains("show");i||s.add("show"),t.style[e]="";let n=t.getBoundingClientRect()[e]+"px";return i||s.remove("show"),n}var Ss=(t,e,s)=>{let{direction:i,maxSize:n,dimension:o}=s,{classList:r}=t;function a(){r.add("collapse"),i==="show"?r.add("show"):r.remove("show")}if(!e){a();return}return n||(n=Rs(t,o),s.maxSize=n,t.style[o]=i!=="show"?n:"0px",r.remove("collapse","collapsing","show"),qt(t),r.add("collapsing")),t.style[o]=i==="show"?n:"0px",()=>{a(),r.remove("collapsing"),t.style[o]=""}},Ns=(()=>{let e=class e{constructor(){this._ngbConfig=d(qe),this.horizontal=!1}get animation(){return this._animation??this._ngbConfig.animation}set animation(i){this._animation=i}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),Hn=(()=>{let e=class e{constructor(){this._config=d(Ns),this._element=d(W),this._zone=d(le),this.animation=this._config.animation,this._afterInit=!1,this._isCollapsed=!1,this.ngbCollapseChange=new O,this.horizontal=this._config.horizontal,this.shown=new O,this.hidden=new O}set collapsed(i){this._isCollapsed!==i&&(this._isCollapsed=i,this._afterInit&&this._runTransitionWithEvents(i,this.animation))}ngOnInit(){this._runTransition(this._isCollapsed,!1),this._afterInit=!0}toggle(i=this._isCollapsed){this.collapsed=!i,this.ngbCollapseChange.next(this._isCollapsed)}_runTransition(i,n){return Z(this._zone,this._element.nativeElement,Ss,{animation:n,runningTransition:"stop",context:{direction:i?"hide":"show",dimension:this.horizontal?"width":"height"}})}_runTransitionWithEvents(i,n){this._runTransition(i,n).subscribe(()=>{i?this.hidden.emit():this.shown.emit()})}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=T({type:e,selectors:[["","ngbCollapse",""]],hostVars:2,hostBindings:function(n,o){n&2&&P("collapse-horizontal",o.horizontal)},inputs:{animation:"animation",collapsed:[0,"ngbCollapse","collapsed"],horizontal:"horizontal"},outputs:{ngbCollapseChange:"ngbCollapseChange",shown:"shown",hidden:"hidden"},exportAs:["ngbCollapse"]});let t=e;return t})(),xs=0,hu=(()=>{let e=class e{constructor(){this._item=d(yt),this._viewRef=null,this.elementRef=d(W)}ngAfterContentChecked(){this._bodyTpl&&(this._item._shouldBeInDOM?this._createViewIfNotExists():this._destroyViewIfExists())}ngOnDestroy(){this._destroyViewIfExists()}_destroyViewIfExists(){this._viewRef?.destroy(),this._viewRef=null}_createViewIfNotExists(){this._viewRef||(this._viewRef=this._vcr.createEmbeddedView(this._bodyTpl),this._viewRef.detectChanges())}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=me({type:e,selectors:[["","ngbAccordionBody",""]],contentQueries:function(n,o,r){if(n&1&&fe(r,ot,7),n&2){let a;q(a=Y())&&(o._bodyTpl=a.first)}},viewQuery:function(n,o){if(n&1&&Gt(ss,7,ci),n&2){let r;q(r=Y())&&(o._vcr=r.first)}},hostAttrs:[1,"accordion-body"],attrs:rs,ngContentSelectors:Qt,decls:3,vars:0,consts:[["container",""]],template:function(n,o){n&1&&(lt(),mn(0,null,0),ct(2))},encapsulation:2});let t=e;return t})(),Fs=(()=>{let e=class e{constructor(){this.item=d(yt),this.ngbCollapse=d(Hn)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=T({type:e,selectors:[["","ngbAccordionCollapse",""]],hostAttrs:["role","region",1,"accordion-collapse"],hostVars:2,hostBindings:function(n,o){n&2&&(ee("id",o.item.collapseId),he("aria-labelledby",o.item.toggleId))},exportAs:["ngbAccordionCollapse"],features:[dn([Hn])]});let t=e;return t})(),pu=(()=>{let e=class e{constructor(){this.item=d(yt),this.accordion=d(Xn)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=T({type:e,selectors:[["","ngbAccordionToggle",""]],hostVars:5,hostBindings:function(n,o){n&1&&pe("click",function(){return!o.item.disabled&&o.accordion.toggle(o.item.id)}),n&2&&(ee("id",o.item.toggleId),he("aria-controls",o.item.collapseId)("aria-expanded",!o.item.collapsed),P("collapsed",o.item.collapsed))}});let t=e;return t})();var fu=(()=>{let e=class e{constructor(){this.item=d(yt)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=T({type:e,selectors:[["","ngbAccordionHeader",""]],hostAttrs:["role","heading",1,"accordion-header"],hostVars:2,hostBindings:function(n,o){n&2&&P("collapsed",o.item.collapsed)}});let t=e;return t})(),yt=(()=>{let e=class e{constructor(){this._accordion=d(Xn),this._cd=d(_e),this._destroyRef=d(nt),this._collapsed=!0,this._id=`ngb-accordion-item-${xs++}`,this._collapseAnimationRunning=!1,this.disabled=!1,this.show=new O,this.shown=new O,this.hide=new O,this.hidden=new O}set id(i){Jt(i)&&i!==""&&(this._id=i)}set destroyOnHide(i){this._destroyOnHide=i}get destroyOnHide(){return this._destroyOnHide===void 0?this._accordion.destroyOnHide:this._destroyOnHide}set collapsed(i){i?this.collapse():this.expand()}get collapsed(){return this._collapsed}get id(){return`${this._id}`}get toggleId(){return`${this.id}-toggle`}get collapseId(){return`${this.id}-collapse`}get _shouldBeInDOM(){return!this.collapsed||this._collapseAnimationRunning||!this.destroyOnHide}ngAfterContentInit(){let{ngbCollapse:i}=this._collapse;i.animation=!1,i.collapsed=this.collapsed,i.animation=this._accordion.animation,i.hidden.pipe(dt(this._destroyRef)).subscribe(()=>{this._collapseAnimationRunning=!1,this.hidden.emit(),this._accordion.hidden.emit(this.id),this._cd.markForCheck()}),i.shown.pipe(dt(this._destroyRef)).subscribe(()=>{this.shown.emit(),this._accordion.shown.emit(this.id),this._cd.markForCheck()})}toggle(){this.collapsed=!this.collapsed}expand(){if(this.collapsed){if(!this._accordion._ensureCanExpand(this))return;this._collapsed=!1,this._cd.markForCheck(),this._cd.detectChanges(),this.show.emit(),this._accordion.show.emit(this.id),this._collapse.ngbCollapse.animation=this._accordion.animation,this._collapse.ngbCollapse.collapsed=!1}}collapse(){this.collapsed||(this._collapsed=!0,this._collapseAnimationRunning=!0,this._cd.markForCheck(),this.hide.emit(),this._accordion.hide.emit(this.id),this._collapse.ngbCollapse.animation=this._accordion.animation,this._collapse.ngbCollapse.collapsed=!0)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=T({type:e,selectors:[["","ngbAccordionItem",""]],contentQueries:function(n,o,r){if(n&1&&fe(r,Fs,7),n&2){let a;q(a=Y())&&(o._collapse=a.first)}},hostAttrs:[1,"accordion-item"],hostVars:1,hostBindings:function(n,o){n&2&&ee("id",o.id)},inputs:{id:[0,"ngbAccordionItem","id"],destroyOnHide:"destroyOnHide",disabled:"disabled",collapsed:"collapsed"},outputs:{show:"show",shown:"shown",hide:"hide",hidden:"hidden"},exportAs:["ngbAccordionItem"]});let t=e;return t})(),Xn=(()=>{let e=class e{constructor(){this._config=d(ws),this._anItemWasAlreadyExpandedDuringInitialisation=!1,this.animation=this._config.animation,this.closeOthers=this._config.closeOthers,this.destroyOnHide=this._config.destroyOnHide,this.show=new O,this.shown=new O,this.hide=new O,this.hidden=new O}toggle(i){this._getItem(i)?.toggle()}expand(i){this._getItem(i)?.expand()}expandAll(){this._items&&(this.closeOthers?this._items.find(i=>!i.collapsed)||this._items.first.expand():this._items.forEach(i=>i.expand()))}collapse(i){this._getItem(i)?.collapse()}collapseAll(){this._items?.forEach(i=>i.collapse())}isExpanded(i){let n=this._getItem(i);return n?!n.collapsed:!1}_ensureCanExpand(i){return this.closeOthers?this._items?(this._items.find(n=>!n.collapsed&&i!==n)?.collapse(),!0):this._anItemWasAlreadyExpandedDuringInitialisation?!1:(this._anItemWasAlreadyExpandedDuringInitialisation=!0,!0):!0}_getItem(i){return this._items?.find(n=>n.id===i)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=T({type:e,selectors:[["","ngbAccordion",""]],contentQueries:function(n,o,r){if(n&1&&fe(r,yt,4),n&2){let a;q(a=Y())&&(o._items=a)}},hostAttrs:[1,"accordion"],inputs:{animation:"animation",closeOthers:"closeOthers",destroyOnHide:"destroyOnHide"},outputs:{show:"show",shown:"shown",hide:"hide",hidden:"hidden"},exportAs:["ngbAccordion"]});let t=e;return t})();var Kn=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=R({type:e}),e.\u0275inj=I({});let t=e;return t})(),ks=(()=>{let e=class e{constructor(){this._ngbConfig=d(qe),this.dismissible=!0,this.type="warning"}get animation(){return this._animation??this._ngbConfig.animation}set animation(i){this._animation=i}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),Bs=({classList:t})=>{t.remove("show")},_u=(()=>{let e=class e{constructor(){this._config=d(ks),this._elementRef=d(W),this._zone=d(le),this.animation=this._config.animation,this.dismissible=this._config.dismissible,this.type=this._config.type,this.closed=new O}close(){let i=Z(this._zone,this._elementRef.nativeElement,Bs,{animation:this.animation,runningTransition:"continue"});return i.subscribe(()=>this.closed.emit()),i}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=me({type:e,selectors:[["ngb-alert"]],hostAttrs:["role","alert"],hostVars:6,hostBindings:function(n,o){n&2&&(Oe("alert show"+(o.type?" alert-"+o.type:"")),P("fade",o.animation)("alert-dismissible",o.dismissible))},inputs:{animation:"animation",dismissible:"dismissible",type:"type"},outputs:{closed:"closed"},exportAs:["ngbAlert"],ngContentSelectors:Qt,decls:2,vars:1,consts:()=>{let i;return i=$localize`:@@ngb.alert.close:Close`,[["type","button","aria-label",i,1,"btn-close"],["type","button","aria-label",i,1,"btn-close",3,"click"]]},template:function(n,o){n&1&&(lt(),ct(0),kt(1,as,1,0,"button",0)),n&2&&(ke(),Bt(o.dismissible?1:-1))},styles:[`ngb-alert{display:block}
2
2
  `],encapsulation:2,changeDetection:0});let t=e;return t})(),Qn=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=R({type:e}),e.\u0275inj=I({});let t=e;return t})();var Jn=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=R({type:e}),e.\u0275inj=I({});let t=e;return t})(),qn=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=R({type:e}),e.\u0275inj=I({});let t=e;return t})();var zt=(t,e)=>e?e.some(s=>s.contains(t)):!1,Un=(t,e)=>!e||Ms(t,e)!=null,Ps=(()=>{let t=()=>/iPad|iPhone|iPod/.test(navigator.userAgent)||/Macintosh/.test(navigator.userAgent)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>2,e=()=>/Android/.test(navigator.userAgent);return typeof navigator<"u"?!!navigator.userAgent&&(t()||e()):!1})(),As=t=>Ps?()=>setTimeout(()=>t(),100):t;function Li(t,e,s,i,n,o,r,a){s&&t.runOutsideAngular(As(()=>{let l=p=>{let h=p.target;return p.button===2||zt(h,r)?!1:s==="inside"?zt(h,o)&&Un(h,a):s==="outside"?!zt(h,o):Un(h,a)||!zt(h,o)},u=X(e,"keydown").pipe(B(n),Fe(p=>p.key==="Escape"),it(p=>p.preventDefault())),c=X(e,"mousedown").pipe(xe(l),B(n)),_=X(e,"mouseup").pipe(Rt(c),Fe(([p,h])=>h),on(0),B(n));ni([u.pipe(xe(p=>0)),_.pipe(xe(p=>1))]).subscribe(p=>t.run(()=>i(p)))}))}var Yn=["a[href]","button:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","[contenteditable]",'[tabindex]:not([tabindex="-1"])'].join(", ");function Zn(t){let e=Array.from(t.querySelectorAll(Yn)).filter(s=>s.tabIndex!==-1);return[e[0],e[e.length-1]]}var Gs=(t,e,s,i=!1)=>{t.runOutsideAngular(()=>{let n=X(e,"focusin").pipe(B(s),xe(o=>o.target));X(e,"keydown").pipe(B(s),Fe(o=>o.key==="Tab"),Rt(n)).subscribe(([o,r])=>{let[a,l]=Zn(e);(r===a||r===e)&&o.shiftKey&&(l.focus(),o.preventDefault()),r===l&&!o.shiftKey&&(a.focus(),o.preventDefault())}),i&&X(e,"click").pipe(B(s),Rt(n),xe(o=>o[1])).subscribe(o=>o.focus())})},Hs=(()=>{let e=class e{constructor(){this._element=d(ae).documentElement}isRTL(){return(this._element.getAttribute("dir")||"").toLowerCase()==="rtl"}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),Us=/\s+/,Ls=/ +/gi,Vs={top:["top"],bottom:["bottom"],start:["left","right"],left:["left"],end:["right","left"],right:["right"],"top-start":["top-start","top-end"],"top-left":["top-start"],"top-end":["top-end","top-start"],"top-right":["top-end"],"bottom-start":["bottom-start","bottom-end"],"bottom-left":["bottom-start"],"bottom-end":["bottom-end","bottom-start"],"bottom-right":["bottom-end"],"start-top":["left-start","right-start"],"left-top":["left-start"],"start-bottom":["left-end","right-end"],"left-bottom":["left-end"],"end-top":["right-start","left-start"],"right-top":["right-start"],"end-bottom":["right-end","left-end"],"right-bottom":["right-end"]};function $s(t,e){let[s,i]=Vs[t];return e&&i||s}var js=/^left/,Ws=/^right/,zs=/^start/,Xs=/^end/;function Ks(t,e){let[s,i]=e.split("-"),n=s.replace(js,"start").replace(Ws,"end"),o=[n];if(i){let r=i;(s==="left"||s==="right")&&(r=r.replace(zs,"top").replace(Xs,"bottom")),o.push(`${n}-${r}`)}return t&&(o=o.map(r=>`${t}-${r}`)),o.join(" ")}function Ln({placement:t,baseClass:e},s){let i=Array.isArray(t)?t:t.split(Us),n=["top","bottom","start","end","top-start","top-end","bottom-start","bottom-end","start-top","start-bottom","end-top","end-bottom"],o=i.findIndex(u=>u==="auto");o>=0&&n.forEach(function(u){i.find(c=>c.search("^"+u)!==-1)==null&&i.splice(o++,1,u)});let r=i.map(u=>$s(u,s.isRTL()));return{placement:r.shift(),modifiers:[{name:"bootstrapClasses",enabled:!!e,phase:"write",fn({state:u}){let c=new RegExp(e+"(-[a-z]+)*","gi"),_=u.elements.popper,p=u.placement,h=_.className;h=h.replace(c,""),h+=` ${Ks(e,p)}`,h=h.trim().replace(Ls," "),_.className=h}},Ti,Si,Oi,{enabled:!0,name:"flip",options:{fallbackPlacements:r}}]}}function Vn(t){return t}function Vi(){let t=d(Hs),e=null;return{createPopper(s){if(!e){let n=(s.updatePopperOptions||Vn)(Ln(s,t));e=Ai(s.hostElement,s.targetElement,n)}},update(){e&&e.update()},setOptions(s){if(e){let n=(s.updatePopperOptions||Vn)(Ln(s,t));e.setOptions(n)}},destroy(){e&&(e.destroy(),e=null)}}}function $i(t){return e=>(e.modifiers.push(Ii,{name:"offset",options:{offset:()=>t}}),e)}var mu=new Date(1882,10,12),gu=new Date(2174,10,25);var vu=1e3*60*60*24;var ji=1080,Qs=24*ji,Js=12*ji+793,yu=29*Qs+Js,bu=11*ji+204;var eo=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=R({type:e}),e.\u0275inj=I({});let t=e;return t})(),qs=(()=>{let e=class e{constructor(){this.autoClose=!0,this.placement=["bottom-start","bottom-end","top-start","top-end"],this.popperOptions=i=>i,this.container=null}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),to=(()=>{let e=class e{constructor(){this._disabled=!1,this.nativeElement=d(W).nativeElement,this.tabindex=0}set disabled(i){this._disabled=i===""||i===!0}get disabled(){return this._disabled}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=T({type:e,selectors:[["","ngbDropdownItem",""]],hostAttrs:[1,"dropdown-item"],hostVars:3,hostBindings:function(n,o){n&2&&(ee("tabIndex",o.disabled?-1:o.tabindex),P("disabled",o.disabled))},inputs:{tabindex:"tabindex",disabled:"disabled"}});let t=e;return t})(),wu=(()=>{let e=class e{constructor(){this.item=d(to)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=T({type:e,selectors:[["button","ngbDropdownItem",""]],hostVars:1,hostBindings:function(n,o){n&2&&ee("disabled",o.item.disabled)}});let t=e;return t})(),Ys=(()=>{let e=class e{constructor(){this.dropdown=d(io),this.nativeElement=d(W).nativeElement}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=T({type:e,selectors:[["","ngbDropdownMenu",""]],contentQueries:function(n,o,r){if(n&1&&fe(r,to,4),n&2){let a;q(a=Y())&&(o.menuItems=a)}},hostAttrs:[1,"dropdown-menu"],hostVars:2,hostBindings:function(n,o){n&1&&pe("keydown.ArrowUp",function(a){return o.dropdown.onKeyDown(a)})("keydown.ArrowDown",function(a){return o.dropdown.onKeyDown(a)})("keydown.Home",function(a){return o.dropdown.onKeyDown(a)})("keydown.End",function(a){return o.dropdown.onKeyDown(a)})("keydown.Enter",function(a){return o.dropdown.onKeyDown(a)})("keydown.Space",function(a){return o.dropdown.onKeyDown(a)})("keydown.Tab",function(a){return o.dropdown.onKeyDown(a)})("keydown.Shift.Tab",function(a){return o.dropdown.onKeyDown(a)}),n&2&&P("show",o.dropdown.isOpen())}});let t=e;return t})(),Gi=(()=>{let e=class e{constructor(){this.dropdown=d(io),this.nativeElement=d(W).nativeElement}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=T({type:e,selectors:[["","ngbDropdownAnchor",""]],hostAttrs:[1,"dropdown-toggle"],hostVars:3,hostBindings:function(n,o){n&2&&(he("aria-expanded",o.dropdown.isOpen()),P("show",o.dropdown.isOpen()))}});let t=e;return t})(),Ou=(()=>{let e=class e extends Gi{};e.\u0275fac=(()=>{let i;return function(o){return(i||(i=ai(e)))(o||e)}})(),e.\u0275dir=T({type:e,selectors:[["","ngbDropdownToggle",""]],hostAttrs:[1,"dropdown-toggle"],hostVars:3,hostBindings:function(n,o){n&1&&pe("click",function(){return o.dropdown.toggle()})("keydown.ArrowUp",function(a){return o.dropdown.onKeyDown(a)})("keydown.ArrowDown",function(a){return o.dropdown.onKeyDown(a)})("keydown.Home",function(a){return o.dropdown.onKeyDown(a)})("keydown.End",function(a){return o.dropdown.onKeyDown(a)})("keydown.Tab",function(a){return o.dropdown.onKeyDown(a)})("keydown.Shift.Tab",function(a){return o.dropdown.onKeyDown(a)}),n&2&&(he("aria-expanded",o.dropdown.isOpen()),P("show",o.dropdown.isOpen()))},features:[vi([{provide:Gi,useExisting:si(()=>e)}]),di]});let t=e;return t})(),io=(()=>{let e=class e{constructor(){this._changeDetector=d(_e),this._config=d(qs),this._document=d(ae),this._injector=d(re),this._ngZone=d(le),this._nativeElement=d(W).nativeElement,this._destroyCloseHandlers$=new j,this._bodyContainer=null,this._positioning=Vi(),this.autoClose=this._config.autoClose,this._open=!1,this.placement=this._config.placement,this.popperOptions=this._config.popperOptions,this.container=this._config.container,this.openChange=new O}ngOnInit(){this.display||(this.display=this._nativeElement.closest(".navbar")?"static":"dynamic")}ngAfterContentInit(){st({write:()=>{this._applyPlacementClasses(),this._open&&this._setCloseHandlers()}},{injector:this._injector})}ngOnChanges(i){if(i.container&&this._open&&this._applyContainer(this.container),i.placement&&!i.placement.firstChange&&(this._positioning.setOptions({hostElement:this._anchor.nativeElement,targetElement:this._bodyContainer||this._menu.nativeElement,placement:this.placement}),this._applyPlacementClasses()),i.dropdownClass){let{currentValue:n,previousValue:o}=i.dropdownClass;this._applyCustomDropdownClass(n,o)}i.autoClose&&this._open&&(this.autoClose=i.autoClose.currentValue,this._setCloseHandlers())}isOpen(){return this._open}open(){this._open||(this._open=!0,this._applyContainer(this.container),this.openChange.emit(!0),this._setCloseHandlers(),this._anchor&&(this._anchor.nativeElement.focus(),this.display==="dynamic"&&this._ngZone.runOutsideAngular(()=>{this._positioning.createPopper({hostElement:this._anchor.nativeElement,targetElement:this._bodyContainer||this._menu.nativeElement,placement:this.placement,updatePopperOptions:i=>this.popperOptions($i([0,2])(i))}),this._applyPlacementClasses(),this._afterRenderRef=Ft({write:()=>{this._positionMenu()}},{injector:this._injector})})))}_setCloseHandlers(){this._destroyCloseHandlers$.next(),Li(this._ngZone,this._document,this.autoClose,i=>{this.close(),i===0&&this._anchor.nativeElement.focus()},this._destroyCloseHandlers$,this._menu?[this._menu.nativeElement]:[],this._anchor?[this._anchor.nativeElement]:[],".dropdown-item,.dropdown-divider")}close(){this._open&&(this._open=!1,this._resetContainer(),this._positioning.destroy(),this._afterRenderRef?.destroy(),this._destroyCloseHandlers$.next(),this.openChange.emit(!1),this._changeDetector.markForCheck())}toggle(){this.isOpen()?this.close():this.open()}ngOnDestroy(){this.close()}onKeyDown(i){let{key:n}=i,o=this._getMenuElements(),r=-1,a=null,l=this._isEventFromToggle(i);if(!l&&o.length&&o.forEach((u,c)=>{u.contains(i.target)&&(a=u),u===zn(this._document)&&(r=c)}),n===" "||n==="Enter"){a&&(this.autoClose===!0||this.autoClose==="inside")&&X(a,"click").pipe(tt(1)).subscribe(()=>this.close());return}if(n==="Tab"){if(i.target&&this.isOpen()&&this.autoClose)if(this._anchor.nativeElement===i.target){this.container==="body"&&!i.shiftKey?(this._menu.nativeElement.setAttribute("tabindex","0"),this._menu.nativeElement.focus(),this._menu.nativeElement.removeAttribute("tabindex")):i.shiftKey&&this.close();return}else if(this.container==="body"){let u=this._menu.nativeElement.querySelectorAll(Yn);i.shiftKey&&i.target===u[0]?(this._anchor.nativeElement.focus(),i.preventDefault()):!i.shiftKey&&i.target===u[u.length-1]&&(this._anchor.nativeElement.focus(),this.close())}else X(i.target,"focusout").pipe(tt(1)).subscribe(({relatedTarget:u})=>{this._nativeElement.contains(u)||this.close()});return}if(l||a){if(this.open(),o.length){switch(n){case"ArrowDown":r=Math.min(r+1,o.length-1);break;case"ArrowUp":if(this._isDropup()&&r===-1){r=o.length-1;break}r=Math.max(r-1,0);break;case"Home":r=0;break;case"End":r=o.length-1;break}o[r].focus()}i.preventDefault()}}_isDropup(){return this._nativeElement.classList.contains("dropup")}_isEventFromToggle(i){return this._anchor.nativeElement.contains(i.target)}_getMenuElements(){return this._menu?this._menu.menuItems.filter(({disabled:i})=>!i).map(({nativeElement:i})=>i):[]}_positionMenu(){let i=this._menu;this.isOpen()&&i&&(this.display==="dynamic"?(this._positioning.update(),this._applyPlacementClasses()):this._applyPlacementClasses(this._getFirstPlacement(this.placement)))}_getFirstPlacement(i){return Array.isArray(i)?i[0]:i.split(" ")[0]}_resetContainer(){this._menu&&this._nativeElement.appendChild(this._menu.nativeElement),this._bodyContainer&&(this._document.body.removeChild(this._bodyContainer),this._bodyContainer=null)}_applyContainer(i=null){if(this._resetContainer(),i==="body"){let n=this._menu.nativeElement,o=this._bodyContainer=this._bodyContainer||this._document.createElement("div");o.style.position="absolute",n.style.position="static",o.style.zIndex="1055",o.appendChild(n),this._document.body.appendChild(o)}this._applyCustomDropdownClass(this.dropdownClass)}_applyCustomDropdownClass(i,n){let o=this.container==="body"?this._bodyContainer:this._nativeElement;o&&(n&&o.classList.remove(n),i&&o.classList.add(i))}_applyPlacementClasses(i){if(this._menu){i||(i=this._getFirstPlacement(this.placement)),this._nativeElement.classList.remove("dropup","dropdown"),this.display==="static"?this._menu.nativeElement.setAttribute("data-bs-popper","static"):this._menu.nativeElement.removeAttribute("data-bs-popper");let n=i.search("^top")!==-1?"dropup":"dropdown";this._nativeElement.classList.add(n),this._bodyContainer&&(this._bodyContainer.classList.remove("dropup","dropdown"),this._bodyContainer.classList.add(n))}}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=T({type:e,selectors:[["","ngbDropdown",""]],contentQueries:function(n,o,r){if(n&1&&(fe(r,Ys,5),fe(r,Gi,5)),n&2){let a;q(a=Y())&&(o._menu=a.first),q(a=Y())&&(o._anchor=a.first)}},hostVars:2,hostBindings:function(n,o){n&2&&P("show",o.isOpen())},inputs:{autoClose:"autoClose",dropdownClass:"dropdownClass",_open:[0,"open","_open"],placement:"placement",popperOptions:"popperOptions",container:"container",display:"display"},outputs:{openChange:"openChange"},exportAs:["ngbDropdown"],features:[je]});let t=e;return t})();var no=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=R({type:e}),e.\u0275inj=I({});let t=e;return t})(),Zs=(()=>{let e=class e{constructor(){this._ngbConfig=d(qe),this.backdrop=!0,this.fullscreen=!1,this.keyboard=!0,this.role="dialog"}get animation(){return this._animation??this._ngbConfig.animation}set animation(i){this._animation=i}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),be=class{constructor(e,s,i){this.nodes=e,this.viewRef=s,this.componentRef=i}},Xt=class{constructor(e){this._componentType=e,this._windowRef=null,this._contentRef=null,this._document=d(ae),this._applicationRef=d(ui),this._injector=d(re),this._viewContainerRef=d(ci),this._ngZone=d(le)}open(e,s,i=!1){this._windowRef||(this._contentRef=this._getContentRef(e,s),this._windowRef=this._viewContainerRef.createComponent(this._componentType,{injector:this._injector,projectableNodes:this._contentRef.nodes}));let{nativeElement:n}=this._windowRef.location,o=new j;st({mixedReadWrite:()=>{o.next(),o.complete()}},{injector:this._injector});let r=o.pipe(tn(()=>Z(this._ngZone,n,({classList:a})=>a.add("show"),{animation:i,runningTransition:"continue"})));return{windowRef:this._windowRef,transition$:r}}close(e=!1){return this._windowRef?Z(this._ngZone,this._windowRef.location.nativeElement,({classList:s})=>s.remove("show"),{animation:e,runningTransition:"stop"}).pipe(it(()=>{this._windowRef?.destroy(),this._contentRef?.viewRef?.destroy(),this._windowRef=null,this._contentRef=null})):et(void 0)}_getContentRef(e,s){if(e)if(e instanceof ot){let i=e.createEmbeddedView(s);return this._applicationRef.attachView(i),new be([i.rootNodes],i)}else return new be([[this._document.createTextNode(`${e}`)]]);else return new be([])}},er=(()=>{let e=class e{constructor(){this._document=d(ae)}hide(){let i=Math.abs(window.innerWidth-this._document.documentElement.clientWidth),n=this._document.body,o=n.style,{overflow:r,paddingRight:a}=o;if(i>0){let l=parseFloat(window.getComputedStyle(n).paddingRight);o.paddingRight=`${l+i}px`}return o.overflow="hidden",()=>{i>0&&(o.paddingRight=a),o.overflow=r}}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),tr=["animation","backdropClass"],ir=(()=>{let e=class e{constructor(){this._nativeElement=d(W).nativeElement,this._zone=d(le),this._injector=d(re),this._cdRef=d(_e)}ngOnInit(){st({mixedReadWrite:()=>Z(this._zone,this._nativeElement,(i,n)=>{n&&qt(i),i.classList.add("show")},{animation:this.animation,runningTransition:"continue"})},{injector:this._injector})}hide(){return Z(this._zone,this._nativeElement,({classList:i})=>i.remove("show"),{animation:this.animation,runningTransition:"stop"})}updateOptions(i){tr.forEach(n=>{Ce(i[n])&&(this[n]=i[n])}),this._cdRef.markForCheck()}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=me({type:e,selectors:[["ngb-modal-backdrop"]],hostAttrs:[2,"z-index","1055"],hostVars:6,hostBindings:function(n,o){n&2&&(Oe("modal-backdrop"+(o.backdropClass?" "+o.backdropClass:"")),P("show",!o.animation)("fade",o.animation))},inputs:{animation:"animation",backdropClass:"backdropClass"},decls:0,vars:0,template:function(n,o){},encapsulation:2});let t=e;return t})(),Kt=class{update(e){}close(e){}dismiss(e){}},Hi=class{update(e){this._windowCmptRef.instance.updateOptions(e),this._backdropCmptRef&&this._backdropCmptRef.instance&&this._backdropCmptRef.instance.updateOptions(e)}get componentInstance(){if(this._contentRef&&this._contentRef.componentRef)return this._contentRef.componentRef.instance}get closed(){return this._closed.asObservable().pipe(B(this._hidden))}get dismissed(){return this._dismissed.asObservable().pipe(B(this._hidden))}get hidden(){return this._hidden.asObservable()}get shown(){return this._windowCmptRef.instance.shown.asObservable()}constructor(e,s,i,n){this._windowCmptRef=e,this._contentRef=s,this._backdropCmptRef=i,this._beforeDismiss=n,this._closed=new j,this._dismissed=new j,this._hidden=new j,e.instance.dismissEvent.subscribe(o=>{this.dismiss(o)}),this.result=new Promise((o,r)=>{this._resolve=o,this._reject=r}),this.result.then(null,()=>{})}close(e){this._windowCmptRef&&(this._closed.next(e),this._resolve(e),this._removeModalElements())}_dismiss(e){this._dismissed.next(e),this._reject(e),this._removeModalElements()}dismiss(e){if(this._windowCmptRef)if(!this._beforeDismiss)this._dismiss(e);else{let s=this._beforeDismiss();Ds(s)?s.then(i=>{i!==!1&&this._dismiss(e)},()=>{}):s!==!1&&this._dismiss(e)}}_removeModalElements(){let e=this._windowCmptRef.instance.hide(),s=this._backdropCmptRef?this._backdropCmptRef.instance.hide():et(void 0);e.subscribe(()=>{let{nativeElement:i}=this._windowCmptRef.location;i.parentNode.removeChild(i),this._windowCmptRef.destroy(),this._contentRef?.viewRef?.destroy(),this._windowCmptRef=null,this._contentRef=null}),s.subscribe(()=>{if(this._backdropCmptRef){let{nativeElement:i}=this._backdropCmptRef.location;i.parentNode.removeChild(i),this._backdropCmptRef.destroy(),this._backdropCmptRef=null}}),It(e,s).subscribe(()=>{this._hidden.next(),this._hidden.complete()})}},Ui=(function(t){return t[t.BACKDROP_CLICK=0]="BACKDROP_CLICK",t[t.ESC=1]="ESC",t})(Ui||{}),nr=["animation","ariaLabelledBy","ariaDescribedBy","backdrop","centered","fullscreen","keyboard","role","scrollable","size","windowClass","modalDialogClass"],or=(()=>{let e=class e{constructor(){this._document=d(ae),this._elRef=d(W),this._zone=d(le),this._injector=d(re),this._cdRef=d(_e),this._closed$=new j,this._elWithFocus=null,this.backdrop=!0,this.keyboard=!0,this.role="dialog",this.dismissEvent=new O,this.shown=new j,this.hidden=new j}get fullscreenClass(){return this.fullscreen===!0?" modal-fullscreen":Jt(this.fullscreen)?` modal-fullscreen-${this.fullscreen}-down`:""}dismiss(i){this.dismissEvent.emit(i)}ngOnInit(){this._elWithFocus=this._document.activeElement,st({mixedReadWrite:()=>this._show()},{injector:this._injector})}ngOnDestroy(){this._disableEventHandling()}hide(){let{nativeElement:i}=this._elRef,n={animation:this.animation,runningTransition:"stop"},o=Z(this._zone,i,()=>i.classList.remove("show"),n),r=Z(this._zone,this._dialogEl.nativeElement,()=>{},n),a=It(o,r);return a.subscribe(()=>{this.hidden.next(),this.hidden.complete()}),this._disableEventHandling(),this._restoreFocus(),a}updateOptions(i){nr.forEach(n=>{Ce(i[n])&&(this[n]=i[n])}),this._cdRef.markForCheck()}_show(){let i={animation:this.animation,runningTransition:"continue"},n=Z(this._zone,this._elRef.nativeElement,(r,a)=>{a&&qt(r),r.classList.add("show")},i),o=Z(this._zone,this._dialogEl.nativeElement,()=>{},i);It(n,o).subscribe(()=>{this.shown.next(),this.shown.complete()}),this._enableEventHandling(),this._setFocus()}_enableEventHandling(){let{nativeElement:i}=this._elRef;this._zone.runOutsideAngular(()=>{X(i,"keydown").pipe(B(this._closed$),Fe(o=>o.key==="Escape")).subscribe(o=>{this.keyboard?requestAnimationFrame(()=>{o.defaultPrevented||this._zone.run(()=>this.dismiss(Ui.ESC))}):this.backdrop==="static"&&this._bumpBackdrop()});let n=!1;X(this._dialogEl.nativeElement,"mousedown").pipe(B(this._closed$),it(()=>n=!1),oi(()=>X(i,"mouseup").pipe(B(this._closed$),tt(1))),Fe(({target:o})=>i===o)).subscribe(()=>{n=!0}),X(i,"click").pipe(B(this._closed$)).subscribe(({target:o})=>{i===o&&(this.backdrop==="static"?this._bumpBackdrop():this.backdrop===!0&&!n&&this._zone.run(()=>this.dismiss(Ui.BACKDROP_CLICK))),n=!1})})}_disableEventHandling(){this._closed$.next()}_setFocus(){let{nativeElement:i}=this._elRef;if(!i.contains(document.activeElement)){let n=i.querySelector("[ngbAutofocus]"),o=Zn(i)[0];(n||o||i).focus()}}_restoreFocus(){let i=this._document.body,n=this._elWithFocus,o;n&&n.focus&&i.contains(n)?o=n:o=i,this._zone.runOutsideAngular(()=>{setTimeout(()=>o.focus()),this._elWithFocus=null})}_bumpBackdrop(){this.backdrop==="static"&&Z(this._zone,this._elRef.nativeElement,({classList:i})=>(i.add("modal-static"),()=>i.remove("modal-static")),{animation:this.animation,runningTransition:"continue"})}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=me({type:e,selectors:[["ngb-modal-window"]],viewQuery:function(n,o){if(n&1&&Gt(cs,7),n&2){let r;q(r=Y())&&(o._dialogEl=r.first)}},hostAttrs:["tabindex","-1"],hostVars:8,hostBindings:function(n,o){n&2&&(he("aria-modal",!0)("aria-labelledby",o.ariaLabelledBy)("aria-describedby",o.ariaDescribedBy)("role",o.role),Oe("modal d-block"+(o.windowClass?" "+o.windowClass:"")),P("fade",o.animation))},inputs:{animation:"animation",ariaLabelledBy:"ariaLabelledBy",ariaDescribedBy:"ariaDescribedBy",backdrop:"backdrop",centered:"centered",fullscreen:"fullscreen",keyboard:"keyboard",role:"role",scrollable:"scrollable",size:"size",windowClass:"windowClass",modalDialogClass:"modalDialogClass"},outputs:{dismissEvent:"dismiss"},ngContentSelectors:Qt,decls:4,vars:2,consts:[["dialog",""],["role","document"],[1,"modal-content"]],template:function(n,o){n&1&&(lt(),rt(0,"div",1,0)(2,"div",2),ct(3),at()()),n&2&&Oe("modal-dialog"+(o.size?" modal-"+o.size:"")+(o.centered?" modal-dialog-centered":"")+o.fullscreenClass+(o.scrollable?" modal-dialog-scrollable":"")+(o.modalDialogClass?" "+o.modalDialogClass:""))},styles:[`ngb-modal-window .component-host-scrollable{display:flex;flex-direction:column;overflow:hidden}
3
3
  `],encapsulation:2});let t=e;return t})(),sr=(()=>{let e=class e{constructor(){this._applicationRef=d(ui),this._injector=d(re),this._environmentInjector=d(ri),this._document=d(ae),this._scrollBar=d(er),this._activeWindowCmptHasChanged=new j,this._ariaHiddenValues=new Map,this._scrollBarRestoreFn=null,this._modalRefs=[],this._windowCmpts=[],this._activeInstances=new O;let i=d(le);this._activeWindowCmptHasChanged.subscribe(()=>{if(this._windowCmpts.length){let n=this._windowCmpts[this._windowCmpts.length-1];Gs(i,n.location.nativeElement,this._activeWindowCmptHasChanged),this._revertAriaHidden(),this._setAriaHidden(n.location.nativeElement)}})}_restoreScrollBar(){let i=this._scrollBarRestoreFn;i&&(this._scrollBarRestoreFn=null,i())}_hideScrollBar(){this._scrollBarRestoreFn||(this._scrollBarRestoreFn=this._scrollBar.hide())}open(i,n,o){let r=o.container instanceof HTMLElement?o.container:Ce(o.container)?this._document.querySelector(o.container):this._document.body;if(!r)throw new Error(`The specified modal container "${o.container||"body"}" was not found in the DOM.`);this._hideScrollBar();let a=new Kt;i=o.injector||i;let l=i.get(ri,null)||this._environmentInjector,u=this._getContentRef(i,l,n,a,o),c=o.backdrop!==!1?this._attachBackdrop(r):void 0,_=this._attachWindowComponent(r,u.nodes),p=new Hi(_,u,c,o.beforeDismiss);return this._registerModalRef(p),this._registerWindowCmpt(_),p.hidden.pipe(tt(1)).subscribe(()=>Promise.resolve(!0).then(()=>{this._modalRefs.length||(this._document.body.classList.remove("modal-open"),this._restoreScrollBar(),this._revertAriaHidden())})),a.close=h=>{p.close(h)},a.dismiss=h=>{p.dismiss(h)},a.update=h=>{p.update(h)},p.update(o),this._modalRefs.length===1&&this._document.body.classList.add("modal-open"),c&&c.instance&&c.changeDetectorRef.detectChanges(),_.changeDetectorRef.detectChanges(),p}get activeInstances(){return this._activeInstances}dismissAll(i){this._modalRefs.forEach(n=>n.dismiss(i))}hasOpenModals(){return this._modalRefs.length>0}_attachBackdrop(i){let n=Ht(ir,{environmentInjector:this._applicationRef.injector,elementInjector:this._injector});return this._applicationRef.attachView(n.hostView),i.appendChild(n.location.nativeElement),n}_attachWindowComponent(i,n){let o=Ht(or,{environmentInjector:this._applicationRef.injector,elementInjector:this._injector,projectableNodes:n});return this._applicationRef.attachView(o.hostView),i.appendChild(o.location.nativeElement),o}_getContentRef(i,n,o,r,a){return o?o instanceof ot?this._createFromTemplateRef(o,r):Jt(o)?this._createFromString(o):this._createFromComponent(i,n,o,r,a):new be([])}_createFromTemplateRef(i,n){let o={$implicit:n,close(a){n.close(a)},dismiss(a){n.dismiss(a)}},r=i.createEmbeddedView(o);return this._applicationRef.attachView(r),new be([r.rootNodes],r)}_createFromString(i){let n=this._document.createTextNode(`${i}`);return new be([[n]])}_createFromComponent(i,n,o,r,a){let l=re.create({providers:[{provide:Kt,useValue:r}],parent:i}),u=Ht(o,{environmentInjector:n,elementInjector:l}),c=u.location.nativeElement;return a.scrollable&&c.classList.add("component-host-scrollable"),this._applicationRef.attachView(u.hostView),new be([[c]],u.hostView,u)}_setAriaHidden(i){let n=i.parentElement;n&&i!==this._document.body&&(Array.from(n.children).forEach(o=>{o!==i&&o.nodeName!=="SCRIPT"&&(this._ariaHiddenValues.set(o,o.getAttribute("aria-hidden")),o.setAttribute("aria-hidden","true"))}),this._setAriaHidden(n))}_revertAriaHidden(){this._ariaHiddenValues.forEach((i,n)=>{i?n.setAttribute("aria-hidden",i):n.removeAttribute("aria-hidden")}),this._ariaHiddenValues.clear()}_registerModalRef(i){let n=()=>{let o=this._modalRefs.indexOf(i);o>-1&&(this._modalRefs.splice(o,1),this._activeInstances.emit(this._modalRefs))};this._modalRefs.push(i),this._activeInstances.emit(this._modalRefs),i.result.then(n,n)}_registerWindowCmpt(i){this._windowCmpts.push(i),this._activeWindowCmptHasChanged.next(),i.onDestroy(()=>{let n=this._windowCmpts.indexOf(i);n>-1&&(this._windowCmpts.splice(n,1),this._activeWindowCmptHasChanged.next())})}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),rr=(()=>{let e=class e{constructor(){this._injector=d(re),this._modalStack=d(sr),this._config=d(Zs)}open(i,n={}){let o=Mt(ii(Mt({},this._config),{animation:this._config.animation}),n);return this._modalStack.open(this._injector,i,o)}get activeInstances(){return this._modalStack.activeInstances}dismissAll(i){this._modalStack.dismissAll(i)}hasOpenModals(){return this._modalStack.hasOpenModals()}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),oo=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=R({type:e}),e.\u0275inj=I({providers:[rr]});let t=e;return t})(),ar=(()=>{let e=class e{constructor(){this._ngbConfig=d(qe),this.destroyOnHide=!0,this.orientation="horizontal",this.roles="tablist",this.keyboard=!0}get animation(){return this._animation??this._ngbConfig.animation}set animation(i){this._animation=i}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),so=t=>Ce(t)&&t!=="",lr=0,cr=(()=>{let e=class e{constructor(){this.templateRef=d(ot)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=T({type:e,selectors:[["ng-template","ngbNavContent",""]]});let t=e;return t})();var ro=(()=>{let e=class e{constructor(){this._nav=d(ao),this._nativeElement=d(W).nativeElement,this.disabled=!1,this.shown=new O,this.hidden=new O}ngOnInit(){Ce(this.domId)||(this.domId=`ngb-nav-${lr++}`)}get active(){return this._nav.activeId===this.id}get id(){return so(this._id)?this._id:this.domId}get panelDomId(){return`${this.domId}-panel`}isPanelInDom(){return(Ce(this.destroyOnHide)?!this.destroyOnHide:!this._nav.destroyOnHide)||this.active}isNgContainer(){return this._nativeElement.nodeType===Node.COMMENT_NODE}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=T({type:e,selectors:[["","ngbNavItem",""]],contentQueries:function(n,o,r){if(n&1&&fe(r,cr,4),n&2){let a;q(a=Y())&&(o.contentTpl=a.first)}},hostAttrs:[1,"nav-item"],inputs:{destroyOnHide:"destroyOnHide",disabled:"disabled",domId:"domId",_id:[0,"ngbNavItem","_id"]},outputs:{shown:"shown",hidden:"hidden"},exportAs:["ngbNavItem"]});let t=e;return t})(),ao=(()=>{let e=class e{constructor(i){this.role=i,this._config=d(ar),this._cd=d(_e),this._document=d(ae),this._nativeElement=d(W).nativeElement,this.destroyRef=d(nt),this._navigatingWithKeyboard=!1,this.activeIdChange=new O,this.animation=this._config.animation,this.destroyOnHide=this._config.destroyOnHide,this.orientation=this._config.orientation,this.roles=this._config.roles,this.keyboard=this._config.keyboard,this.shown=new O,this.hidden=new O,this.navItemChange$=new j,this.navChange=new O}click(i){i.disabled||this._updateActiveId(i.id)}onFocusout({relatedTarget:i}){this._nativeElement.contains(i)||(this._navigatingWithKeyboard=!1)}onKeyDown(i){if(this.roles!=="tablist"||!this.keyboard)return;let n=this.links.filter(a=>!a.navItem.disabled),{length:o}=n,r=-1;if(n.forEach((a,l)=>{a.nativeElement===this._document.activeElement&&(r=l)}),o){switch(i.key){case"ArrowUp":case"ArrowLeft":r=(r-1+o)%o;break;case"ArrowRight":case"ArrowDown":r=(r+1)%o;break;case"Home":r=0;break;case"End":r=o-1;break}this.keyboard==="changeWithArrows"&&this.select(n[r].navItem.id),n[r].nativeElement.focus(),this._navigatingWithKeyboard=!0,i.preventDefault()}}select(i){this._updateActiveId(i,!1)}ngAfterContentInit(){if(!Ce(this.activeId)){let i=this.items.first?this.items.first.id:null;so(i)&&(this._updateActiveId(i,!1),this._cd.detectChanges())}this.items.changes.pipe(dt(this.destroyRef)).subscribe(()=>this._notifyItemChanged(this.activeId))}ngOnChanges({activeId:i}){i&&!i.firstChange&&this._notifyItemChanged(i.currentValue)}_updateActiveId(i,n=!0){if(this.activeId!==i){let o=!1;n&&this.navChange.emit({activeId:this.activeId,nextId:i,preventDefault:()=>{o=!0}}),o||(this.activeId=i,this.activeIdChange.emit(i),this._notifyItemChanged(i))}}_notifyItemChanged(i){this.navItemChange$.next(this._getItemById(i))}_getItemById(i){return this.items&&this.items.find(n=>n.id===i)||null}};e.\u0275fac=function(n){return new(n||e)(li("role"))},e.\u0275dir=T({type:e,selectors:[["","ngbNav",""]],contentQueries:function(n,o,r){if(n&1&&(fe(r,ro,4),fe(r,lo,5)),n&2){let a;q(a=Y())&&(o.items=a),q(a=Y())&&(o.links=a)}},hostAttrs:[1,"nav"],hostVars:4,hostBindings:function(n,o){n&1&&pe("keydown.arrowLeft",function(a){return o.onKeyDown(a)})("keydown.arrowRight",function(a){return o.onKeyDown(a)})("keydown.arrowDown",function(a){return o.onKeyDown(a)})("keydown.arrowUp",function(a){return o.onKeyDown(a)})("keydown.Home",function(a){return o.onKeyDown(a)})("keydown.End",function(a){return o.onKeyDown(a)})("focusout",function(a){return o.onFocusout(a)}),n&2&&(he("aria-orientation",o.orientation==="vertical"&&o.roles==="tablist"?"vertical":void 0)("role",o.role?o.role:o.roles?"tablist":void 0),P("flex-column",o.orientation==="vertical"))},inputs:{activeId:"activeId",animation:"animation",destroyOnHide:"destroyOnHide",orientation:"orientation",roles:"roles",keyboard:"keyboard"},outputs:{activeIdChange:"activeIdChange",shown:"shown",hidden:"hidden",navChange:"navChange"},exportAs:["ngbNav"],features:[je]});let t=e;return t})(),lo=(()=>{let e=class e{constructor(i){this.role=i,this.navItem=d(ro),this.nav=d(ao),this.nativeElement=d(W).nativeElement}get tabindex(){return this.nav.keyboard===!1?this.navItem.disabled?-1:void 0:this.nav._navigatingWithKeyboard||this.navItem.disabled||!this.navItem.active?-1:void 0}};e.\u0275fac=function(n){return new(n||e)(li("role"))},e.\u0275dir=T({type:e,selectors:[["","ngbNavLink",""]],hostAttrs:[1,"nav-link"],hostVars:12,hostBindings:function(n,o){n&2&&(ee("id",o.navItem.domId),he("role",o.role?o.role:o.nav.roles?"tab":void 0)("tabindex",o.tabindex)("aria-controls",o.navItem.isPanelInDom()?o.navItem.panelDomId:null)("aria-selected",o.navItem.active)("aria-disabled",o.navItem.disabled),P("nav-item",o.navItem.isNgContainer())("active",o.navItem.active)("disabled",o.navItem.disabled))}});let t=e;return t})(),Du=(()=>{let e=class e extends lo{};e.\u0275fac=(()=>{let i;return function(o){return(i||(i=ai(e)))(o||e)}})(),e.\u0275dir=T({type:e,selectors:[["button","ngbNavLink",""]],hostAttrs:["type","button"],hostVars:1,hostBindings:function(n,o){n&1&&pe("click",function(){return o.nav.click(o.navItem)}),n&2&&ee("disabled",o.navItem.disabled)},features:[di]});let t=e;return t})();var dr=({classList:t})=>(t.remove("show"),()=>t.remove("active")),ur=(t,e)=>{e&&qt(t),t.classList.add("show")},$n=(()=>{let e=class e{constructor(){this.nativeElement=d(W).nativeElement}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=T({type:e,selectors:[["","ngbNavPane",""]],hostAttrs:[1,"tab-pane"],hostVars:5,hostBindings:function(n,o){n&2&&(ee("id",o.item.panelDomId),he("role",o.role?o.role:o.nav.roles?"tabpanel":void 0)("aria-labelledby",o.item.domId),P("fade",o.nav.animation))},inputs:{item:"item",nav:"nav",role:"role"}});let t=e;return t})(),Eu=(()=>{let e=class e{constructor(){this._cd=d(_e),this._ngZone=d(le),this._activePane=null}isPanelTransitioning(i){return this._activePane?.item===i}ngAfterViewInit(){this._updateActivePane(),this.nav.navItemChange$.pipe(dt(this.nav.destroyRef),ln(this._activePane?.item||null),sn(),an(1)).subscribe(i=>{let n={animation:this.nav.animation,runningTransition:"stop"};this._cd.detectChanges(),this._activePane?Z(this._ngZone,this._activePane.nativeElement,dr,n).subscribe(()=>{let o=this._activePane?.item;this._activePane=this._getPaneForItem(i),this._cd.markForCheck(),this._activePane&&(this._activePane.nativeElement.classList.add("active"),Z(this._ngZone,this._activePane.nativeElement,ur,n).subscribe(()=>{i&&(i.shown.emit(),this.nav.shown.emit(i.id))})),o&&(o.hidden.emit(),this.nav.hidden.emit(o.id))}):this._updateActivePane()})}_updateActivePane(){this._activePane=this._getActivePane(),this._activePane?.nativeElement.classList.add("show","active")}_getPaneForItem(i){return this._panes&&this._panes.find(n=>n.item===i)||null}_getActivePane(){return this._panes&&this._panes.find(i=>i.item.active)||null}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=me({type:e,selectors:[["","ngbNavOutlet",""]],viewQuery:function(n,o){if(n&1&&Gt($n,5),n&2){let r;q(r=Y())&&(o._panes=r)}},hostAttrs:[1,"tab-content"],inputs:{paneRole:"paneRole",nav:[0,"ngbNavOutlet","nav"]},attrs:ds,decls:2,vars:0,consts:[["ngbNavPane","",3,"item","nav","role"],[3,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(n,o){n&1&&Pt(0,ps,1,1,null,null,un),n&2&&At(o.nav.items)},dependencies:[$n,yi],encapsulation:2,changeDetection:0});let t=e;return t})();var co=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=R({type:e}),e.\u0275inj=I({});let t=e;return t})();var uo=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=R({type:e}),e.\u0275inj=I({});let t=e;return t})(),hr={hover:["mouseenter","mouseleave"],focus:["focusin","focusout"]};function pr(t){let e=(t||"").trim();if(e.length===0)return[];let s=e.split(/\s+/).map(n=>n.split(":")).map(n=>hr[n[0]]||n),i=s.filter(n=>n.includes("manual"));if(i.length>1)throw"Triggers parse error: only one manual trigger is allowed";if(i.length===1&&s.length>1)throw"Triggers parse error: manual trigger can't be mixed with other triggers";return i.length?[]:s}function fr(t,e,s,i,n,o=0,r=0,a=Tt,l=Tt){let u=pr(e);if(u.length===0)return()=>{};let c=new Set,_=[],p;function h(f,m){t.addEventListener(f,m),_.push(()=>t.removeEventListener(f,m))}function v(f,m){clearTimeout(p),m>0?p=setTimeout(f,m):f()}for(let[f,m]of u)if(m?(h(f,()=>{c.add(f),v(()=>c.size>0&&i(),o)}),h(m,()=>{c.delete(f),v(()=>c.size===0&&n(),r)})):h(f,()=>s()?v(n,r):v(i,o)),f==="mouseenter"&&m==="mouseleave"&&r>0){let w=a.subscribe(()=>{c.delete(f),clearTimeout(p)}),E=l.subscribe(()=>{c.delete(f),v(()=>c.size===0&&n(),r)});_.push(()=>w.unsubscribe(),()=>E.unsubscribe())}return _.push(()=>clearTimeout(p)),()=>_.forEach(f=>f())}var ho=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=R({type:e}),e.\u0275inj=I({});let t=e;return t})();var po=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=R({type:e}),e.\u0275inj=I({});let t=e;return t})();var fo=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=R({type:e}),e.\u0275inj=I({});let t=e;return t})();var _o=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=R({type:e}),e.\u0275inj=I({});let t=e;return t})();var mo=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=R({type:e}),e.\u0275inj=I({});let t=e;return t})();var go=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=R({type:e}),e.\u0275inj=I({});let t=e;return t})(),_r=(()=>{let e=class e{constructor(){this._ngbConfig=d(qe),this.autoClose=!0,this.placement="auto",this.popperOptions=i=>i,this.triggers="hover focus",this.disableTooltip=!1,this.openDelay=0,this.closeDelay=0}get animation(){return this._animation??this._ngbConfig.animation}set animation(i){this._animation=i}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),mr=0,gr=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=me({type:e,selectors:[["ngb-tooltip-window"]],hostAttrs:["role","tooltip"],hostVars:5,hostBindings:function(n,o){n&1&&pe("mouseenter",function(){return o.onMouseEnter()})("mouseleave",function(){return o.onMouseLeave()}),n&2&&(ee("id",o.id),Oe("tooltip"+(o.tooltipClass?" "+o.tooltipClass:"")),P("fade",o.animation))},inputs:{animation:"animation",id:"id",tooltipClass:"tooltipClass",onMouseEnter:"onMouseEnter",onMouseLeave:"onMouseLeave"},ngContentSelectors:Qt,decls:3,vars:0,consts:[["data-popper-arrow","",1,"tooltip-arrow"],[1,"tooltip-inner"]],template:function(n,o){n&1&&(lt(),pn(0,"div",0),rt(1,"div",1),ct(2),at())},styles:[`ngb-tooltip-window{pointer-events:none;position:absolute}ngb-tooltip-window .tooltip-inner{pointer-events:auto}ngb-tooltip-window.bs-tooltip-top,ngb-tooltip-window.bs-tooltip-bottom{padding-left:0;padding-right:0}ngb-tooltip-window.bs-tooltip-start,ngb-tooltip-window.bs-tooltip-end{padding-top:0;padding-bottom:0}
4
4
  `],encapsulation:2,changeDetection:0});let t=e;return t})(),Mu=(()=>{let e=class e{constructor(){this._config=d(_r),this.animation=this._config.animation,this.autoClose=this._config.autoClose,this.placement=this._config.placement,this.popperOptions=this._config.popperOptions,this.triggers=this._config.triggers,this.container=this._config.container,this.disableTooltip=this._config.disableTooltip,this.tooltipClass=this._config.tooltipClass,this.openDelay=this._config.openDelay,this.closeDelay=this._config.closeDelay,this.shown=new O,this.hidden=new O,this._nativeElement=d(W).nativeElement,this._ngZone=d(le),this._document=d(ae),this._changeDetector=d(_e),this._injector=d(re),this._ngbTooltipWindowId=`ngb-tooltip-${mr++}`,this._popupService=new Xt(gr),this._windowRef=null,this._positioning=Vi(),this._mouseEnterTooltip=new j,this._mouseLeaveTooltip=new j,this._opening=!0,this._transitioning=!1}set ngbTooltip(i){this._ngbTooltip=i,!i&&this._windowRef&&this.close()}get ngbTooltip(){return this._ngbTooltip}open(i){if(!this._opening&&this._transitioning&&(this._transitioning=!1,Gn(this._windowRef.location.nativeElement)),!this._windowRef&&this._ngbTooltip&&!this.disableTooltip){let{windowRef:n,transition$:o}=this._popupService.open(this._ngbTooltip,i??this.tooltipContext,this.animation);this._opening=!0,this._transitioning=!0,this._windowRef=n,this._windowRef.setInput("animation",this.animation),this._windowRef.setInput("tooltipClass",this.tooltipClass),this._windowRef.setInput("id",this._ngbTooltipWindowId),this._windowRef.setInput("onMouseEnter",()=>this._mouseEnterTooltip.next()),this._windowRef.setInput("onMouseLeave",()=>this._mouseLeaveTooltip.next()),this._getPositionTargetElement().setAttribute("aria-describedby",this._ngbTooltipWindowId),this.container==="body"&&this._document.body.appendChild(this._windowRef.location.nativeElement),this._windowRef.changeDetectorRef.detectChanges(),this._windowRef.changeDetectorRef.markForCheck(),this._ngZone.runOutsideAngular(()=>{this._positioning.createPopper({hostElement:this._getPositionTargetElement(),targetElement:this._windowRef.location.nativeElement,placement:this.placement,baseClass:"bs-tooltip",updatePopperOptions:r=>this.popperOptions($i([0,6])(r))}),Promise.resolve().then(()=>{this._positioning.update()}),this._afterRenderRef=Ft({mixedReadWrite:()=>{this._positioning.update()}},{injector:this._injector})}),Li(this._ngZone,this._document,this.autoClose,()=>this.close(),this.hidden,[this._windowRef.location.nativeElement],[this._nativeElement]),o.subscribe(()=>{this._transitioning&&(this._transitioning=!1,this.shown.emit())})}}close(i=this.animation){this._opening&&this._transitioning&&(this._transitioning=!1,Gn(this._windowRef.location.nativeElement)),this._windowRef!=null&&(this._getPositionTargetElement().removeAttribute("aria-describedby"),this._opening=!1,this._transitioning=!0,this._popupService.close(i).subscribe(()=>{this._windowRef=null,this._positioning.destroy(),this._afterRenderRef?.destroy(),this._transitioning&&(this._transitioning=!1,this.hidden.emit()),this._changeDetector.markForCheck()}))}toggle(){this._windowRef?this.close():this.open()}isOpen(){return this._windowRef!=null}ngOnInit(){this._unregisterListenersFn=fr(this._nativeElement,this.triggers,this.isOpen.bind(this),this.open.bind(this),this.close.bind(this),+this.openDelay,+this.closeDelay,this._mouseEnterTooltip,this._mouseLeaveTooltip)}ngOnChanges({tooltipClass:i}){i&&this.isOpen()&&this._windowRef.setInput("tooltipClass",i.currentValue)}ngOnDestroy(){this.close(!1),this._unregisterListenersFn?.()}_getPositionTargetElement(){return(Jt(this.positionTarget)?this._document.querySelector(this.positionTarget):this.positionTarget)||this._nativeElement}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=T({type:e,selectors:[["","ngbTooltip",""]],inputs:{animation:"animation",autoClose:"autoClose",placement:"placement",popperOptions:"popperOptions",triggers:"triggers",positionTarget:"positionTarget",container:"container",disableTooltip:"disableTooltip",tooltipClass:"tooltipClass",tooltipContext:"tooltipContext",openDelay:"openDelay",closeDelay:"closeDelay",ngbTooltip:"ngbTooltip"},outputs:{shown:"shown",hidden:"hidden"},exportAs:["ngbTooltip"],features:[je]});let t=e;return t})(),vo=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=R({type:e}),e.\u0275inj=I({});let t=e;return t})(),vr=(()=>{let e=class e{constructor(){this.highlightClass="ngb-highlight",this.accentSensitive=!0}ngOnChanges(i){!this.accentSensitive&&!String.prototype.normalize&&(console.warn("The `accentSensitive` input in `ngb-highlight` cannot be set to `false` in a browser that does not implement the `String.normalize` function. You will have to include a polyfill in your application to use this feature in the current browser."),this.accentSensitive=!0);let n=vt(this.result),o=Array.isArray(this.term)?this.term:[this.term],r=c=>this.accentSensitive?c:An(c),a=o.map(c=>Es(r(vt(c)))).filter(c=>c),l=this.accentSensitive?n:An(n),u=a.length?l.split(new RegExp(`(${a.join("|")})`,"gmi")):[n];if(this.accentSensitive)this.parts=u;else{let c=0;this.parts=u.map(_=>n.substring(c,c+=_.length))}}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=me({type:e,selectors:[["ngb-highlight"]],inputs:{highlightClass:"highlightClass",result:"result",term:"term",accentSensitive:"accentSensitive"},features:[je],decls:2,vars:0,consts:[[3,"class"]],template:function(n,o){n&1&&Pt(0,ms,2,1,null,null,hi),n&2&&At(o.parts)},styles:[`.ngb-highlight{font-weight:700}
@@ -1 +1 @@
1
- import{g as r}from"./chunk-YMAWYUA6.js";import{Xa as e,fa as t}from"./chunk-V2XN5VIX.js";var m=[{path:"",loadComponent:()=>import("./chunk-APVR3TMK.js").then(o=>o.PowerOptionsComponent)}],n=(()=>{class o{static \u0275fac=function(i){return new(i||o)};static \u0275mod=e({type:o});static \u0275inj=t({imports:[r.forChild(m),r]})}return o})();var d=(()=>{class o{static \u0275fac=function(i){return new(i||o)};static \u0275mod=e({type:o});static \u0275inj=t({imports:[n]})}return o})();export{d as PowerOptionsModule};
1
+ import{g as r}from"./chunk-ZX7APSEP.js";import{Xa as e,fa as t}from"./chunk-PRNMO4E2.js";var m=[{path:"",loadComponent:()=>import("./chunk-WWTLM3TS.js").then(o=>o.PowerOptionsComponent)}],n=(()=>{class o{static \u0275fac=function(i){return new(i||o)};static \u0275mod=e({type:o});static \u0275inj=t({imports:[r.forChild(m),r]})}return o})();var d=(()=>{class o{static \u0275fac=function(i){return new(i||o)};static \u0275mod=e({type:o});static \u0275inj=t({imports:[n]})}return o})();export{d as PowerOptionsModule};
@@ -1 +1 @@
1
- import{k as tt,n as et,q as it}from"./chunk-YP7VO76N.js";import{T as G,e as ut,ea as R,g as ct,h as P,hd as X,ja as W,n as Q,w as N}from"./chunk-V2XN5VIX.js";var st=ut((J,K)=>{(function(b,D){typeof J=="object"&&typeof K<"u"?K.exports=D():typeof define=="function"&&define.amd?define(D):(b=typeof globalThis<"u"?globalThis:b||self).dayjs=D()})(J,function(){"use strict";var b=1e3,D=6e4,n=36e5,h="millisecond",d="second",m="minute",M="hour",v="day",f="week",L="month",B="quarter",S="year",_="date",E="Invalid Date",nt=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,rt=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,ot={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(r){var i=["th","st","nd","rd"],t=r%100;return"["+r+(i[(t-20)%10]||i[t]||i[0])+"]"}},F=function(r,i,t){var s=String(r);return!s||s.length>=i?r:""+Array(i+1-s.length).join(t)+r},at={s:F,z:function(r){var i=-r.utcOffset(),t=Math.abs(i),s=Math.floor(t/60),e=t%60;return(i<=0?"+":"-")+F(s,2,"0")+":"+F(e,2,"0")},m:function r(i,t){if(i.date()<t.date())return-r(t,i);var s=12*(t.year()-i.year())+(t.month()-i.month()),e=i.clone().add(s,L),o=t-e<0,a=i.clone().add(s+(o?-1:1),L);return+(-(s+(t-e)/(o?e-a:a-e))||0)},a:function(r){return r<0?Math.ceil(r)||0:Math.floor(r)},p:function(r){return{M:L,y:S,w:f,d:v,D:_,h:M,m,s:d,ms:h,Q:B}[r]||String(r||"").toLowerCase().replace(/s$/,"")},u:function(r){return r===void 0}},j="en",T={};T[j]=ot;var Z="$isDayjsObject",U=function(r){return r instanceof C||!(!r||!r[Z])},Y=function r(i,t,s){var e;if(!i)return j;if(typeof i=="string"){var o=i.toLowerCase();T[o]&&(e=o),t&&(T[o]=t,e=o);var a=i.split("-");if(!e&&a.length>1)return r(a[0])}else{var c=i.name;T[c]=i,e=c}return!s&&e&&(j=e),e||!s&&j},g=function(r,i){if(U(r))return r.clone();var t=typeof i=="object"?i:{};return t.date=r,t.args=arguments,new C(t)},u=at;u.l=Y,u.i=U,u.w=function(r,i){return g(r,{locale:i.$L,utc:i.$u,x:i.$x,$offset:i.$offset})};var C=(function(){function r(t){this.$L=Y(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[Z]=!0}var i=r.prototype;return i.parse=function(t){this.$d=(function(s){var e=s.date,o=s.utc;if(e===null)return new Date(NaN);if(u.u(e))return new Date;if(e instanceof Date)return new Date(e);if(typeof e=="string"&&!/Z$/i.test(e)){var a=e.match(nt);if(a){var c=a[2]-1||0,l=(a[7]||"0").substring(0,3);return o?new Date(Date.UTC(a[1],c,a[3]||1,a[4]||0,a[5]||0,a[6]||0,l)):new Date(a[1],c,a[3]||1,a[4]||0,a[5]||0,a[6]||0,l)}}return new Date(e)})(t),this.init()},i.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},i.$utils=function(){return u},i.isValid=function(){return this.$d.toString()!==E},i.isSame=function(t,s){var e=g(t);return this.startOf(s)<=e&&e<=this.endOf(s)},i.isAfter=function(t,s){return g(t)<this.startOf(s)},i.isBefore=function(t,s){return this.endOf(s)<g(t)},i.$g=function(t,s,e){return u.u(t)?this[s]:this.set(e,t)},i.unix=function(){return Math.floor(this.valueOf()/1e3)},i.valueOf=function(){return this.$d.getTime()},i.startOf=function(t,s){var e=this,o=!!u.u(s)||s,a=u.p(t),c=function(x,y){var k=u.w(e.$u?Date.UTC(e.$y,y,x):new Date(e.$y,y,x),e);return o?k:k.endOf(v)},l=function(x,y){return u.w(e.toDate()[x].apply(e.toDate("s"),(o?[0,0,0,0]:[23,59,59,999]).slice(y)),e)},$=this.$W,p=this.$M,w=this.$D,H="set"+(this.$u?"UTC":"");switch(a){case S:return o?c(1,0):c(31,11);case L:return o?c(1,p):c(0,p+1);case f:var O=this.$locale().weekStart||0,A=($<O?$+7:$)-O;return c(o?w-A:w+(6-A),p);case v:case _:return l(H+"Hours",0);case M:return l(H+"Minutes",1);case m:return l(H+"Seconds",2);case d:return l(H+"Milliseconds",3);default:return this.clone()}},i.endOf=function(t){return this.startOf(t,!1)},i.$set=function(t,s){var e,o=u.p(t),a="set"+(this.$u?"UTC":""),c=(e={},e[v]=a+"Date",e[_]=a+"Date",e[L]=a+"Month",e[S]=a+"FullYear",e[M]=a+"Hours",e[m]=a+"Minutes",e[d]=a+"Seconds",e[h]=a+"Milliseconds",e)[o],l=o===v?this.$D+(s-this.$W):s;if(o===L||o===S){var $=this.clone().set(_,1);$.$d[c](l),$.init(),this.$d=$.set(_,Math.min(this.$D,$.daysInMonth())).$d}else c&&this.$d[c](l);return this.init(),this},i.set=function(t,s){return this.clone().$set(t,s)},i.get=function(t){return this[u.p(t)]()},i.add=function(t,s){var e,o=this;t=Number(t);var a=u.p(s),c=function(p){var w=g(o);return u.w(w.date(w.date()+Math.round(p*t)),o)};if(a===L)return this.set(L,this.$M+t);if(a===S)return this.set(S,this.$y+t);if(a===v)return c(1);if(a===f)return c(7);var l=(e={},e[m]=D,e[M]=n,e[d]=b,e)[a]||1,$=this.$d.getTime()+t*l;return u.w($,this)},i.subtract=function(t,s){return this.add(-1*t,s)},i.format=function(t){var s=this,e=this.$locale();if(!this.isValid())return e.invalidDate||E;var o=t||"YYYY-MM-DDTHH:mm:ssZ",a=u.z(this),c=this.$H,l=this.$m,$=this.$M,p=e.weekdays,w=e.months,H=e.meridiem,O=function(y,k,I,V){return y&&(y[k]||y(s,o))||I[k].slice(0,V)},A=function(y){return u.s(c%12||12,y,"0")},x=H||function(y,k,I){var V=y<12?"AM":"PM";return I?V.toLowerCase():V};return o.replace(rt,function(y,k){return k||(function(I){switch(I){case"YY":return String(s.$y).slice(-2);case"YYYY":return u.s(s.$y,4,"0");case"M":return $+1;case"MM":return u.s($+1,2,"0");case"MMM":return O(e.monthsShort,$,w,3);case"MMMM":return O(w,$);case"D":return s.$D;case"DD":return u.s(s.$D,2,"0");case"d":return String(s.$W);case"dd":return O(e.weekdaysMin,s.$W,p,2);case"ddd":return O(e.weekdaysShort,s.$W,p,3);case"dddd":return p[s.$W];case"H":return String(c);case"HH":return u.s(c,2,"0");case"h":return A(1);case"hh":return A(2);case"a":return x(c,l,!0);case"A":return x(c,l,!1);case"m":return String(l);case"mm":return u.s(l,2,"0");case"s":return String(s.$s);case"ss":return u.s(s.$s,2,"0");case"SSS":return u.s(s.$ms,3,"0");case"Z":return a}return null})(y)||a.replace(":","")})},i.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},i.diff=function(t,s,e){var o,a=this,c=u.p(s),l=g(t),$=(l.utcOffset()-this.utcOffset())*D,p=this-l,w=function(){return u.m(a,l)};switch(c){case S:o=w()/12;break;case L:o=w();break;case B:o=w()/3;break;case f:o=(p-$)/6048e5;break;case v:o=(p-$)/864e5;break;case M:o=p/n;break;case m:o=p/D;break;case d:o=p/b;break;default:o=p}return e?o:u.a(o)},i.daysInMonth=function(){return this.endOf(L).$D},i.$locale=function(){return T[this.$L]},i.locale=function(t,s){if(!t)return this.$L;var e=this.clone(),o=Y(t,s,!0);return o&&(e.$L=o),e},i.clone=function(){return u.w(this.$d,this)},i.toDate=function(){return new Date(this.valueOf())},i.toJSON=function(){return this.isValid()?this.toISOString():null},i.toISOString=function(){return this.$d.toISOString()},i.toString=function(){return this.$d.toUTCString()},r})(),z=C.prototype;return g.prototype=z,[["$ms",h],["$s",d],["$m",m],["$H",M],["$W",v],["$M",L],["$y",S],["$D",_]].forEach(function(r){z[r[1]]=function(i){return this.$g(i,r[0],r[1])}}),g.extend=function(r,i){return r.$i||(r(i,C,g),r.$i=!0),g},g.locale=Y,g.isDayjs=U,g.unix=function(r){return g(1e3*r)},g.en=T[j],g.Ls=T,g.p={},g})});var q=ct(st(),1);var yt=(()=>{class b{$api=W(it);$title=W(X);$toastr=W(et);$translate=W(tt);settingsLoadedSubject=new Q;defaultTheme="deep-purple";forbiddenKeys=["__proto__","constructor","prototype"];env={};host;proxyHost;webroot;originalWebroot;formAuth=!0;sessionTimeout=28800;uiVersion;theme;lightingMode;currentLightingMode;actualLightingMode;browserLightingMode;menuMode;keepOrphans;wallpaper;serverTimeOffset=0;rtl=!1;browserLang;onSettingsLoaded=this.settingsLoadedSubject.pipe(G());settingsLoaded=!1;themeList=["orange","red","pink","purple","deep-purple","indigo","blue","blue-grey","cyan","green","teal","grey","brown"];constructor(){this.getAppSettings()}getAppSettings(){return P(this,null,function*(){let n=yield N(this.$api.get("/auth/settings"));this.formAuth=n.formAuth,this.sessionTimeout=n.sessionTimeout,this.env=n.env,this.host=n.host,this.webroot=n.webroot,this.originalWebroot=n.originalWebroot,this.proxyHost=n.proxyHost,this.lightingMode=n.lightingMode,this.wallpaper=n.wallpaper,this.setLightingMode(this.lightingMode,"user"),this.setTheme(n.theme),this.setMenuMode(n.menuMode),this.setKeepOrphans(n.keepOrphans),this.setTitle(this.env.homebridgeInstanceName),this.checkServerTime(n.serverTimestamp),this.setUiVersion(n.env.packageVersion),this.setLang(this.env.lang),this.settingsLoaded=!0,this.settingsLoadedSubject.next(void 0),this.browserLang=this.$translate.getBrowserCultureLang()})}setBrowserLightingMode(n){this.browserLightingMode=n,this.lightingMode==="auto"&&this.setLightingMode(n,"browser")}setLightingMode(n,h){h==="user"&&(this.lightingMode=n),this.currentLightingMode=n,this.actualLightingMode=this.currentLightingMode==="auto"?this.browserLightingMode:this.currentLightingMode,this.theme&&this.setTheme(this.theme)}setTheme(n){(!n||!this.themeList.includes(n))&&(n=this.defaultTheme,N(this.$api.put("/config-editor/ui",{key:"theme",value:n})).catch(m=>console.error("Error saving setTheme:",m)));let h=window.document.querySelector("body");h.classList.remove(`config-ui-x-${this.theme}`),h.classList.remove(`config-ui-x-dark-mode-${this.theme}`),this.theme=n,this.actualLightingMode==="dark"?(h.classList.add(`config-ui-x-dark-mode-${this.theme}`),h.classList.contains("dark-mode")||h.classList.add("dark-mode")):(h.classList.add(`config-ui-x-${this.theme}`),h.classList.contains("dark-mode")&&h.classList.remove("dark-mode")),window.document.querySelectorAll("iframe").forEach((m,M)=>{try{let v=m.contentDocument;if(v){let f=v.body;this.actualLightingMode==="dark"?(f.classList.contains(`config-ui-x-${this.theme}`)&&f.classList.remove(`config-ui-x-${this.theme}`),f.classList.contains(`config-ui-x-dark-mode-${this.theme}`)||f.classList.add(`config-ui-x-dark-mode-${this.theme}`),f.classList.contains("dark-mode")||f.classList.add("dark-mode"),f.style.backgroundColor="#242424 !important",f.style.color="#ffffff !important"):(f.classList.contains(`config-ui-x-${this.theme}`)||f.classList.add(`config-ui-x-${this.theme}`),f.classList.contains(`config-ui-x-dark-mode-${this.theme}`)&&f.classList.remove(`config-ui-x-dark-mode-${this.theme}`),f.classList.contains("dark-mode")&&f.classList.remove("dark-mode"),f.style.backgroundColor="#ffffff !important",f.style.color="#000000 !important"),m.contentWindow.postMessage({type:"theme-update",isDark:this.actualLightingMode==="dark",theme:n},window.location.origin)}}catch(v){console.warn(`Iframe ${M}: Access denied (cross-origin?)`,{error:v,src:m.src})}})}setMenuMode(n){this.menuMode=n}setKeepOrphans(n){this.keepOrphans=n}setLang(n){n?this.$translate.use(n):n="auto",this.env.lang=n}setItem(n,h){this[n]=h}setEnvItem(n,h){if(n.includes(".")){let d=n.split("."),m=this.env;for(let M=0;M<d.length-1;M+=1){if(this.forbiddenKeys.includes(d[M]))return;m[d[M]]||(m[d[M]]={}),m=m[d[M]]}this.forbiddenKeys.includes(d[d.length-1])||(m[d[d.length-1]]=h)}else this.env[n]=h}checkServerTime(n){let d=(0,q.default)(n).diff((0,q.default)(),"hour");this.serverTimeOffset=d*60*60,(d>=8||d<=-8)&&this.$toastr.warning(this.$translate.instant("settings.datetime.incorrect"),this.$translate.instant("toast.title_warning"),{timeOut:2e4,tapToDismiss:!1}).onTap.subscribe(()=>{window.open("https://homebridge.io/w/JqTFs","_blank")})}setUiVersion(n){this.uiVersion||(this.uiVersion=n)}setTitle(n){this.$title.setTitle(n||"Homebridge")}static \u0275fac=function(h){return new(h||b)};static \u0275prov=R({token:b,factory:b.\u0275fac,providedIn:"root"})}return b})();export{st as a,yt as b};
1
+ import{k as tt,n as et,q as it}from"./chunk-CWRKEWVF.js";import{T as G,e as ut,ea as R,g as ct,h as P,hd as X,ja as W,n as Q,w as N}from"./chunk-PRNMO4E2.js";var st=ut((J,K)=>{(function(b,D){typeof J=="object"&&typeof K<"u"?K.exports=D():typeof define=="function"&&define.amd?define(D):(b=typeof globalThis<"u"?globalThis:b||self).dayjs=D()})(J,function(){"use strict";var b=1e3,D=6e4,n=36e5,h="millisecond",d="second",m="minute",M="hour",v="day",f="week",L="month",B="quarter",S="year",_="date",E="Invalid Date",nt=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,rt=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,ot={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(r){var i=["th","st","nd","rd"],t=r%100;return"["+r+(i[(t-20)%10]||i[t]||i[0])+"]"}},F=function(r,i,t){var s=String(r);return!s||s.length>=i?r:""+Array(i+1-s.length).join(t)+r},at={s:F,z:function(r){var i=-r.utcOffset(),t=Math.abs(i),s=Math.floor(t/60),e=t%60;return(i<=0?"+":"-")+F(s,2,"0")+":"+F(e,2,"0")},m:function r(i,t){if(i.date()<t.date())return-r(t,i);var s=12*(t.year()-i.year())+(t.month()-i.month()),e=i.clone().add(s,L),o=t-e<0,a=i.clone().add(s+(o?-1:1),L);return+(-(s+(t-e)/(o?e-a:a-e))||0)},a:function(r){return r<0?Math.ceil(r)||0:Math.floor(r)},p:function(r){return{M:L,y:S,w:f,d:v,D:_,h:M,m,s:d,ms:h,Q:B}[r]||String(r||"").toLowerCase().replace(/s$/,"")},u:function(r){return r===void 0}},j="en",T={};T[j]=ot;var Z="$isDayjsObject",U=function(r){return r instanceof C||!(!r||!r[Z])},Y=function r(i,t,s){var e;if(!i)return j;if(typeof i=="string"){var o=i.toLowerCase();T[o]&&(e=o),t&&(T[o]=t,e=o);var a=i.split("-");if(!e&&a.length>1)return r(a[0])}else{var c=i.name;T[c]=i,e=c}return!s&&e&&(j=e),e||!s&&j},g=function(r,i){if(U(r))return r.clone();var t=typeof i=="object"?i:{};return t.date=r,t.args=arguments,new C(t)},u=at;u.l=Y,u.i=U,u.w=function(r,i){return g(r,{locale:i.$L,utc:i.$u,x:i.$x,$offset:i.$offset})};var C=(function(){function r(t){this.$L=Y(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[Z]=!0}var i=r.prototype;return i.parse=function(t){this.$d=(function(s){var e=s.date,o=s.utc;if(e===null)return new Date(NaN);if(u.u(e))return new Date;if(e instanceof Date)return new Date(e);if(typeof e=="string"&&!/Z$/i.test(e)){var a=e.match(nt);if(a){var c=a[2]-1||0,l=(a[7]||"0").substring(0,3);return o?new Date(Date.UTC(a[1],c,a[3]||1,a[4]||0,a[5]||0,a[6]||0,l)):new Date(a[1],c,a[3]||1,a[4]||0,a[5]||0,a[6]||0,l)}}return new Date(e)})(t),this.init()},i.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},i.$utils=function(){return u},i.isValid=function(){return this.$d.toString()!==E},i.isSame=function(t,s){var e=g(t);return this.startOf(s)<=e&&e<=this.endOf(s)},i.isAfter=function(t,s){return g(t)<this.startOf(s)},i.isBefore=function(t,s){return this.endOf(s)<g(t)},i.$g=function(t,s,e){return u.u(t)?this[s]:this.set(e,t)},i.unix=function(){return Math.floor(this.valueOf()/1e3)},i.valueOf=function(){return this.$d.getTime()},i.startOf=function(t,s){var e=this,o=!!u.u(s)||s,a=u.p(t),c=function(x,y){var k=u.w(e.$u?Date.UTC(e.$y,y,x):new Date(e.$y,y,x),e);return o?k:k.endOf(v)},l=function(x,y){return u.w(e.toDate()[x].apply(e.toDate("s"),(o?[0,0,0,0]:[23,59,59,999]).slice(y)),e)},$=this.$W,p=this.$M,w=this.$D,H="set"+(this.$u?"UTC":"");switch(a){case S:return o?c(1,0):c(31,11);case L:return o?c(1,p):c(0,p+1);case f:var O=this.$locale().weekStart||0,A=($<O?$+7:$)-O;return c(o?w-A:w+(6-A),p);case v:case _:return l(H+"Hours",0);case M:return l(H+"Minutes",1);case m:return l(H+"Seconds",2);case d:return l(H+"Milliseconds",3);default:return this.clone()}},i.endOf=function(t){return this.startOf(t,!1)},i.$set=function(t,s){var e,o=u.p(t),a="set"+(this.$u?"UTC":""),c=(e={},e[v]=a+"Date",e[_]=a+"Date",e[L]=a+"Month",e[S]=a+"FullYear",e[M]=a+"Hours",e[m]=a+"Minutes",e[d]=a+"Seconds",e[h]=a+"Milliseconds",e)[o],l=o===v?this.$D+(s-this.$W):s;if(o===L||o===S){var $=this.clone().set(_,1);$.$d[c](l),$.init(),this.$d=$.set(_,Math.min(this.$D,$.daysInMonth())).$d}else c&&this.$d[c](l);return this.init(),this},i.set=function(t,s){return this.clone().$set(t,s)},i.get=function(t){return this[u.p(t)]()},i.add=function(t,s){var e,o=this;t=Number(t);var a=u.p(s),c=function(p){var w=g(o);return u.w(w.date(w.date()+Math.round(p*t)),o)};if(a===L)return this.set(L,this.$M+t);if(a===S)return this.set(S,this.$y+t);if(a===v)return c(1);if(a===f)return c(7);var l=(e={},e[m]=D,e[M]=n,e[d]=b,e)[a]||1,$=this.$d.getTime()+t*l;return u.w($,this)},i.subtract=function(t,s){return this.add(-1*t,s)},i.format=function(t){var s=this,e=this.$locale();if(!this.isValid())return e.invalidDate||E;var o=t||"YYYY-MM-DDTHH:mm:ssZ",a=u.z(this),c=this.$H,l=this.$m,$=this.$M,p=e.weekdays,w=e.months,H=e.meridiem,O=function(y,k,I,V){return y&&(y[k]||y(s,o))||I[k].slice(0,V)},A=function(y){return u.s(c%12||12,y,"0")},x=H||function(y,k,I){var V=y<12?"AM":"PM";return I?V.toLowerCase():V};return o.replace(rt,function(y,k){return k||(function(I){switch(I){case"YY":return String(s.$y).slice(-2);case"YYYY":return u.s(s.$y,4,"0");case"M":return $+1;case"MM":return u.s($+1,2,"0");case"MMM":return O(e.monthsShort,$,w,3);case"MMMM":return O(w,$);case"D":return s.$D;case"DD":return u.s(s.$D,2,"0");case"d":return String(s.$W);case"dd":return O(e.weekdaysMin,s.$W,p,2);case"ddd":return O(e.weekdaysShort,s.$W,p,3);case"dddd":return p[s.$W];case"H":return String(c);case"HH":return u.s(c,2,"0");case"h":return A(1);case"hh":return A(2);case"a":return x(c,l,!0);case"A":return x(c,l,!1);case"m":return String(l);case"mm":return u.s(l,2,"0");case"s":return String(s.$s);case"ss":return u.s(s.$s,2,"0");case"SSS":return u.s(s.$ms,3,"0");case"Z":return a}return null})(y)||a.replace(":","")})},i.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},i.diff=function(t,s,e){var o,a=this,c=u.p(s),l=g(t),$=(l.utcOffset()-this.utcOffset())*D,p=this-l,w=function(){return u.m(a,l)};switch(c){case S:o=w()/12;break;case L:o=w();break;case B:o=w()/3;break;case f:o=(p-$)/6048e5;break;case v:o=(p-$)/864e5;break;case M:o=p/n;break;case m:o=p/D;break;case d:o=p/b;break;default:o=p}return e?o:u.a(o)},i.daysInMonth=function(){return this.endOf(L).$D},i.$locale=function(){return T[this.$L]},i.locale=function(t,s){if(!t)return this.$L;var e=this.clone(),o=Y(t,s,!0);return o&&(e.$L=o),e},i.clone=function(){return u.w(this.$d,this)},i.toDate=function(){return new Date(this.valueOf())},i.toJSON=function(){return this.isValid()?this.toISOString():null},i.toISOString=function(){return this.$d.toISOString()},i.toString=function(){return this.$d.toUTCString()},r})(),z=C.prototype;return g.prototype=z,[["$ms",h],["$s",d],["$m",m],["$H",M],["$W",v],["$M",L],["$y",S],["$D",_]].forEach(function(r){z[r[1]]=function(i){return this.$g(i,r[0],r[1])}}),g.extend=function(r,i){return r.$i||(r(i,C,g),r.$i=!0),g},g.locale=Y,g.isDayjs=U,g.unix=function(r){return g(1e3*r)},g.en=T[j],g.Ls=T,g.p={},g})});var q=ct(st(),1);var yt=(()=>{class b{$api=W(it);$title=W(X);$toastr=W(et);$translate=W(tt);settingsLoadedSubject=new Q;defaultTheme="deep-purple";forbiddenKeys=["__proto__","constructor","prototype"];env={};host;proxyHost;webroot;originalWebroot;formAuth=!0;sessionTimeout=28800;uiVersion;theme;lightingMode;currentLightingMode;actualLightingMode;browserLightingMode;menuMode;keepOrphans;wallpaper;serverTimeOffset=0;rtl=!1;browserLang;onSettingsLoaded=this.settingsLoadedSubject.pipe(G());settingsLoaded=!1;themeList=["orange","red","pink","purple","deep-purple","indigo","blue","blue-grey","cyan","green","teal","grey","brown"];constructor(){this.getAppSettings()}getAppSettings(){return P(this,null,function*(){let n=yield N(this.$api.get("/auth/settings"));this.formAuth=n.formAuth,this.sessionTimeout=n.sessionTimeout,this.env=n.env,this.host=n.host,this.webroot=n.webroot,this.originalWebroot=n.originalWebroot,this.proxyHost=n.proxyHost,this.lightingMode=n.lightingMode,this.wallpaper=n.wallpaper,this.setLightingMode(this.lightingMode,"user"),this.setTheme(n.theme),this.setMenuMode(n.menuMode),this.setKeepOrphans(n.keepOrphans),this.setTitle(this.env.homebridgeInstanceName),this.checkServerTime(n.serverTimestamp),this.setUiVersion(n.env.packageVersion),this.setLang(this.env.lang),this.settingsLoaded=!0,this.settingsLoadedSubject.next(void 0),this.browserLang=this.$translate.getBrowserCultureLang()})}setBrowserLightingMode(n){this.browserLightingMode=n,this.lightingMode==="auto"&&this.setLightingMode(n,"browser")}setLightingMode(n,h){h==="user"&&(this.lightingMode=n),this.currentLightingMode=n,this.actualLightingMode=this.currentLightingMode==="auto"?this.browserLightingMode:this.currentLightingMode,this.theme&&this.setTheme(this.theme)}setTheme(n){(!n||!this.themeList.includes(n))&&(n=this.defaultTheme,N(this.$api.put("/config-editor/ui",{key:"theme",value:n})).catch(m=>console.error("Error saving setTheme:",m)));let h=window.document.querySelector("body");h.classList.remove(`config-ui-x-${this.theme}`),h.classList.remove(`config-ui-x-dark-mode-${this.theme}`),this.theme=n,this.actualLightingMode==="dark"?(h.classList.add(`config-ui-x-dark-mode-${this.theme}`),h.classList.contains("dark-mode")||h.classList.add("dark-mode")):(h.classList.add(`config-ui-x-${this.theme}`),h.classList.contains("dark-mode")&&h.classList.remove("dark-mode")),window.document.querySelectorAll("iframe").forEach((m,M)=>{try{let v=m.contentDocument;if(v){let f=v.body;this.actualLightingMode==="dark"?(f.classList.contains(`config-ui-x-${this.theme}`)&&f.classList.remove(`config-ui-x-${this.theme}`),f.classList.contains(`config-ui-x-dark-mode-${this.theme}`)||f.classList.add(`config-ui-x-dark-mode-${this.theme}`),f.classList.contains("dark-mode")||f.classList.add("dark-mode"),f.style.backgroundColor="#242424 !important",f.style.color="#ffffff !important"):(f.classList.contains(`config-ui-x-${this.theme}`)||f.classList.add(`config-ui-x-${this.theme}`),f.classList.contains(`config-ui-x-dark-mode-${this.theme}`)&&f.classList.remove(`config-ui-x-dark-mode-${this.theme}`),f.classList.contains("dark-mode")&&f.classList.remove("dark-mode"),f.style.backgroundColor="#ffffff !important",f.style.color="#000000 !important"),m.contentWindow.postMessage({type:"theme-update",isDark:this.actualLightingMode==="dark",theme:n},window.location.origin)}}catch(v){console.warn(`Iframe ${M}: Access denied (cross-origin?)`,{error:v,src:m.src})}})}setMenuMode(n){this.menuMode=n}setKeepOrphans(n){this.keepOrphans=n}setLang(n){n?this.$translate.use(n):n="auto",this.env.lang=n}setItem(n,h){this[n]=h}setEnvItem(n,h){if(n.includes(".")){let d=n.split("."),m=this.env;for(let M=0;M<d.length-1;M+=1){if(this.forbiddenKeys.includes(d[M]))return;m[d[M]]||(m[d[M]]={}),m=m[d[M]]}this.forbiddenKeys.includes(d[d.length-1])||(m[d[d.length-1]]=h)}else this.env[n]=h}checkServerTime(n){let d=(0,q.default)(n).diff((0,q.default)(),"hour");this.serverTimeOffset=d*60*60,(d>=8||d<=-8)&&this.$toastr.warning(this.$translate.instant("settings.datetime.incorrect"),this.$translate.instant("toast.title_warning"),{timeOut:2e4,tapToDismiss:!1}).onTap.subscribe(()=>{window.open("https://homebridge.io/w/JqTFs","_blank")})}setUiVersion(n){this.uiVersion||(this.uiVersion=n)}setTitle(n){this.$title.setTitle(n||"Homebridge")}static \u0275fac=function(h){return new(h||b)};static \u0275prov=R({token:b,factory:b.\u0275fac,providedIn:"root"})}return b})();export{st as a,yt as b};
@@ -1 +1 @@
1
- import{a as le}from"./chunk-TJBMXIMS.js";import{a as se}from"./chunk-SGN6BUCA.js";import{g as Q,m as k,n as ae}from"./chunk-LXFVNKLD.js";import{B as A,C as G,b as q,c as F,d as g,e as V,f as z,g as N,j as S,m as R,p as O,q as L,r as J,z as re}from"./chunk-F7ZV2JBO.js";import{b as H}from"./chunk-FB6JMBLA.js";import{b as oe}from"./chunk-YMAWYUA6.js";import{a as xe}from"./chunk-SKNY42PA.js";import{k as T,l as E,n as B,q as M}from"./chunk-YP7VO76N.js";import{Ac as ne,Db as I,Gb as f,Ib as _,Kc as j,La as e,Vb as m,Wa as y,Wb as d,Xb as x,Yb as ee,g as ve,gc as D,h as W,hc as te,ja as c,kb as u,lb as w,mb as h,mc as a,nc as o,oa as $,ob as X,oc as ie,pa as U,pb as Y,qb as Z,rb as b,sb as i,tb as t,ub as p}from"./chunk-V2XN5VIX.js";function Ce(r,C){r&1&&(i(0,"ngb-alert",13)(1,"p",20),m(2),a(3,"translate"),t()()),r&2&&(b("dismissible",!1),e(2),d(o(3,2,"login.invalid_password")))}var me=(()=>{class r{$activeModal=c(k);$api=c(M);$toastr=c(B);$translate=c(T);invalidCredentials=!1;formGroup=new N({password:new S("",[g.required])});disable2fa(){this.invalidCredentials=!1,this.$api.post("/users/otp/deactivate",this.formGroup.value).subscribe({next:()=>{this.$activeModal.close(),this.$toastr.success(this.$translate.instant("users.setup_2fa_disable_success"),this.$translate.instant("toast.title_success"))},error:()=>{this.formGroup.setValue({password:""}),this.invalidCredentials=!0}})}dismissModal(){this.$activeModal.dismiss("Dismiss")}static \u0275fac=function(s){return new(s||r)};static \u0275cmp=y({type:r,selectors:[["ng-component"]],decls:34,vars:27,consts:[[1,"modal-content",2,"min-height","300px"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fas","fa-fw","fa-key","primary-text",2,"font-size","75px"],[1,"mb-3"],[1,"list-group","list-group-box","mb-0"],[1,"list-group-item","d-flex","flex-column","flex-md-row","align-items-center"],[1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50"],["type","password","autocomplete","current-password",1,"form-control","custom-input",3,"formControl","placeholder"],["type","error",1,"mt-3","mb-0",3,"dismissible"],[1,"modal-footer","justify-content-between"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-center"],[1,"text-end"],["type","button","data-bs-dismiss","modal",1,"btn","btn-danger",3,"click","disabled"],[1,"mb-0"]],template:function(s,l){s&1&&(i(0,"div",0)(1,"div",1)(2,"h5",2),m(3),a(4,"translate"),t(),i(5,"button",3),a(6,"translate"),f("click",function(){return l.dismissModal()}),t()(),i(7,"div",4)(8,"div",5),p(9,"i",6),t(),i(10,"ul",7)(11,"li"),m(12),a(13,"translate"),t()(),i(14,"ul",8)(15,"li",9)(16,"label",10),m(17),a(18,"translate"),t(),i(19,"div",11),p(20,"input",12),a(21,"translate"),t()()(),w(22,Ce,4,4,"ngb-alert",13),t(),i(23,"div",14)(24,"div",15)(25,"button",16),a(26,"translate"),f("click",function(){return l.dismissModal()}),m(27),a(28,"translate"),t()(),p(29,"div",17),i(30,"div",18)(31,"button",19),f("click",function(){return l.disable2fa()}),m(32),a(33,"translate"),t()()()()),s&2&&(e(3),d(o(4,11,"users.setup_2fa_disable")),e(2),u("aria-label",o(6,13,"form.button_close")),e(7),d(o(13,15,"users.setup_2fa_disable_current_password")),e(5),d(o(18,17,"users.label_password")),e(3),b("formControl",l.formGroup.controls.password)("placeholder",o(21,19,"users.label_password")),e(2),h(l.invalidCredentials&&!l.formGroup.controls.password.value?22:-1),e(3),u("aria-label",o(26,21,"form.button_close")),e(2),x(" ",o(28,23,"form.button_close")," "),e(4),b("disabled",l.formGroup.invalid),e(),x(" ",o(33,25,"form.button_disable")," "))},dependencies:[A,F,V,G,O,Q,E],encapsulation:2})}return r})();var pe=ve(xe(),1);var we=r=>({timeDiffError:r});function he(r,C){r&1&&(i(0,"li"),m(1),a(2,"translate"),t()),r&2&&(e(),d(o(2,1,"users.setup_2fa_scan_qr_code")))}function ge(r,C){if(r&1&&(i(0,"ngb-alert",8)(1,"p",16),m(2),a(3,"translate"),t(),i(4,"p",17),m(5),a(6,"translate"),t()()),r&2){let n=_();b("dismissible",!1),e(2),d(o(3,3,"users.setup_2fa_cannot_setup_2fa")),e(3),d(ie(6,5,"users.setup_2fa_server_time_out",D(8,we,n.timeDiffError)))}}function Se(r,C){r&1&&p(0,"i",27)}function ye(r,C){r&1&&p(0,"i",28)}function Ee(r,C){if(r&1){let n=I();i(0,"div",21),m(1),a(2,"translate"),p(3,"br"),m(4),i(5,"a",26),f("click",function(){$(n);let l=_(2);return U(l.copySecretToClipboard())}),w(6,Se,1,0,"i",27)(7,ye,1,0,"i",28),t()()}if(r&2){let n=_(2);e(),x(" ",o(2,3,"users.setup_2fa_scan_qr_manual")),e(3),x(" ",n.otpSecret," "),e(2),h(n.secretCopied?6:7)}}function $e(r,C){if(r&1&&(i(0,"ul",9)(1,"li",18)(2,"div",19),p(3,"app-qrcode",20),t(),w(4,Ee,8,5,"div",21),t(),i(5,"li",22)(6,"label",23),m(7),a(8,"translate"),t(),i(9,"div",24),p(10,"input",25),t()()()),r&2){let n=_();e(3),b("data",n.otpString),e(),h(n.otpSecret?4:-1),e(3),d(o(8,4,"users.setup_2fa_enter_code")),e(3),b("formControl",n.formGroup.controls.code)}}function Ue(r,C){if(r&1){let n=I();i(0,"button",29),a(1,"translate"),f("click",function(){$(n);let l=_();return U(l.dismissModal())}),m(2),a(3,"translate"),t()}r&2&&(u("aria-label",o(1,2,"form.button_close")),e(2),x(" ",o(3,4,"form.button_close")," "))}function ke(r,C){if(r&1){let n=I();i(0,"button",29),a(1,"translate"),f("click",function(){$(n);let l=_();return U(l.dismissModal())}),m(2),a(3,"translate"),t()}r&2&&(u("aria-label",o(1,2,"form.button_close")),e(2),x(" ",o(3,4,"form.button_close")," "))}function Te(r,C){if(r&1){let n=I();i(0,"button",30),f("click",function(){$(n);let l=_();return U(l.enable2fa())}),m(1),a(2,"translate"),t()}if(r&2){let n=_();b("disabled",n.formGroup.invalid),e(),x(" ",o(2,2,"form.button_enable")," ")}}var de=(()=>{class r{$activeModal=c(k);$api=c(M);$toastr=c(B);$translate=c(T);copyTimeout=null;user;timeDiffError=null;otpString;otpSecret;secretCopied=!1;formGroup=new N({code:new S("",[g.required,g.minLength(6),g.maxLength(6)])});ngOnInit(){this.$api.post("/users/otp/setup",{}).subscribe({next:n=>{this.checkTimeDiff(n.timestamp),this.timeDiffError||(this.otpString=n.otpauth,this.otpSecret=new URL(this.otpString).searchParams.get("secret")||"")},error:n=>{this.$activeModal.dismiss(),console.error(n),this.$toastr.error(this.$translate.instant("users.setup_2fa_enable_error"),this.$translate.instant("toast.title_error"))}})}enable2fa(){this.$api.post("/users/otp/activate",this.formGroup.value).subscribe({next:()=>{this.$toastr.success(this.$translate.instant("users.setup_2fa_enabled_success"),this.$translate.instant("toast.title_success")),this.$activeModal.close()},error:n=>{console.error(n),this.$toastr.error(this.$translate.instant("users.setup_2fa_activate_error"),this.$translate.instant("toast.title_error"))}})}copySecretToClipboard(){return W(this,null,function*(){yield navigator.clipboard.writeText(this.otpSecret),this.secretCopied=!0,this.copyTimeout&&clearTimeout(this.copyTimeout),this.copyTimeout=setTimeout(()=>{this.secretCopied=!1},3e3)})}dismissModal(){this.$activeModal.dismiss("Dismiss")}checkTimeDiff(n){let s=(0,pe.default)(n).diff(new Date,"millisecond");s<-5e3||s>5e3?this.timeDiffError=s:this.timeDiffError=null}static \u0275fac=function(s){return new(s||r)};static \u0275cmp=y({type:r,selectors:[["ng-component"]],inputs:{user:"user"},decls:24,vars:15,consts:[[1,"modal-content","setup2fa"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fas","fa-fw","fa-key","primary-text",2,"font-size","75px"],[1,"mb-3"],["type","error",1,"mb-0",3,"dismissible"],[1,"list-group","list-group-box","mb-0"],[1,"modal-footer","justify-content-between"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant"],[1,"text-center"],[1,"text-end"],["type","button","data-bs-dismiss","modal",1,"btn","btn-primary",3,"disabled"],[1,"fw-bold","mb-1"],[1,"mb-0"],[1,"list-group-item","text-center"],[1,"text-center","w-100","d-flex","justify-content-center","my-2"],[1,"mx-auto",2,"width","175px","height","175px",3,"data"],[1,"grey-text","small","mt-0","mb-1"],[1,"list-group-item","d-flex","flex-column","flex-md-row","align-items-center"],[1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50"],["type","text","placeholder","eg. 123456","autocomplete","one-time-code","autocapitalize","none","inputmode","numeric","pattern","[0-9]*",1,"form-control","custom-input",3,"formControl"],["href","javascript:void(0)",1,"ms-1","text-primary",3,"click"],[1,"fas","fa-fw","fa-check","green-text"],[1,"fas","fa-fw","fa-copy"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],["type","button","data-bs-dismiss","modal",1,"btn","btn-primary",3,"click","disabled"]],template:function(s,l){s&1&&(i(0,"div",0)(1,"div",1)(2,"h5",2),m(3),a(4,"translate"),t(),i(5,"button",3),a(6,"translate"),f("click",function(){return l.dismissModal()}),t()(),i(7,"div",4)(8,"div",5),p(9,"i",6),t(),i(10,"ul",7)(11,"li"),m(12),a(13,"translate"),t(),w(14,he,3,3,"li"),t(),w(15,ge,7,10,"ngb-alert",8),w(16,$e,11,6,"ul",9),t(),i(17,"div",10)(18,"div",11),w(19,Ue,4,6,"button",12),t(),i(20,"div",13),w(21,ke,4,6,"button",12),t(),i(22,"div",14),w(23,Te,3,4,"button",15),t()()()),s&2&&(e(3),d(o(4,9,"users.setup_2fa")),e(2),u("aria-label",o(6,11,"form.button_close")),e(7),d(o(13,13,"users.setup_2fa_warning")),e(2),h(l.timeDiffError?-1:14),e(),h(l.timeDiffError?15:-1),e(),h(l.timeDiffError?-1:16),e(3),h(l.timeDiffError?-1:19),e(2),h(l.timeDiffError?21:-1),e(2),h(l.timeDiffError?-1:23))},dependencies:[Q,se,A,F,V,re,G,O,E],encapsulation:2})}return r})();var ce=r=>({"is-invalid":r}),ue=(()=>{class r{$activeModal=c(k);$api=c(M);$toastr=c(B);$translate=c(T);form=new N({username:new S("",[g.required]),name:new S("",[g.required]),password:new S("",[g.compose([g.required,g.minLength(4)])]),passwordConfirm:new S("",[g.required]),admin:new S(!0)},this.matchPassword);onSubmit({value:n}){this.$api.post("/users",n).subscribe({next:()=>{this.$activeModal.close(),this.$toastr.success(this.$translate.instant("users.toast_added_new_user"),this.$translate.instant("toast.title_success"))},error:s=>{this.$toastr.error(s.error.message||this.$translate.instant("users.toast_failed_to_add_user"),this.$translate.instant("toast.title_error"))}})}dismissModal(){this.$activeModal.dismiss("Dismiss")}matchPassword(n){let s=n.get("password").value,l=n.get("passwordConfirm").value;if(s!==l)n.get("passwordConfirm").setErrors({matchPassword:!0});else return null}static \u0275fac=function(s){return new(s||r)};static \u0275cmp=y({type:r,selectors:[["ng-component"]],decls:58,vars:50,consts:[[1,"modal-content"],["novalidate","",3,"ngSubmit","formGroup"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fas","fa-fw","fa-user-plus","primary-text",2,"font-size","75px"],[1,"list-group","list-group-box","mb-0"],[1,"list-group-item","d-flex","flex-column","flex-md-row","align-items-center"],["for","form-username",1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50"],["formControlName","username","type","text","id","form-username","autocomplete","username","autocapitalize","none",1,"form-control","custom-input"],["for","form-name",1,"mb-2","mb-md-0","w-100","w-md-50"],["formControlName","name","type","text","id","form-name","autocomplete","name",1,"form-control","custom-input"],["for","form-pass",1,"mb-2","mb-md-0","w-100","w-md-50"],["formControlName","password","type","password","autocomplete","new-password","id","form-pass",1,"form-control","custom-input",3,"ngClass"],["for","form-pass-confirm",1,"mb-2","mb-md-0","w-100","w-md-50"],["formControlName","passwordConfirm","type","password","autocomplete","new-password","id","form-pass-confirm",1,"form-control","custom-input",3,"ngClass"],[1,"list-group-item","d-flex","justify-content-between","align-items-center","flex-row","pb-2"],[1,"text-start"],[1,"text-end","grey-text","d-flex","align-items-center"],["formControlName","admin","type","checkbox","id","isAdmin",1,"rendux-input"],["for","isAdmin",1,"rendux-label","ms-3"],[1,"modal-footer","justify-content-between"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-center"],[1,"text-end"],["type","submit",1,"btn","btn-primary",3,"disabled"]],template:function(s,l){s&1&&(i(0,"div",0)(1,"form",1),f("ngSubmit",function(){return l.onSubmit(l.form)}),i(2,"div",2)(3,"h5",3),m(4),a(5,"translate"),t(),i(6,"button",4),a(7,"translate"),f("click",function(){return l.dismissModal()}),t()(),i(8,"div",5)(9,"div",6),p(10,"i",7),t(),i(11,"ul",8)(12,"li",9)(13,"label",10),m(14),a(15,"translate"),t(),i(16,"div",11),p(17,"input",12),a(18,"translate"),t()(),i(19,"li",9)(20,"label",13),m(21),a(22,"translate"),t(),i(23,"div",11),p(24,"input",14),a(25,"translate"),t()(),i(26,"li",9)(27,"label",15),m(28),a(29,"translate"),t(),i(30,"div",11),p(31,"input",16),a(32,"translate"),t()(),i(33,"li",9)(34,"label",17),m(35),a(36,"translate"),t(),i(37,"div",11),p(38,"input",18),a(39,"translate"),t()(),i(40,"li",19)(41,"span",20),m(42),a(43,"translate"),t(),i(44,"div",21),p(45,"input",22),a(46,"translate"),p(47,"label",23),t()()()(),i(48,"div",24)(49,"div",20)(50,"button",25),f("click",function(){return l.dismissModal()}),m(51),a(52,"translate"),t()(),p(53,"div",26),i(54,"div",27)(55,"button",28),m(56),a(57,"translate"),t()()()()()),s&2&&(e(),b("formGroup",l.form),e(3),d(o(5,18,"users.title_add_user")),e(2),u("aria-label",o(7,20,"form.button_close")),e(8),d(o(15,22,"users.label_username")),e(3),u("aria-label",o(18,24,"users.label_username")),e(4),d(o(22,26,"users.label_full_name")),e(3),u("aria-label",o(25,28,"users.label_full_name")),e(4),d(o(29,30,"users.label_password")),e(3),b("ngClass",D(46,ce,l.form.controls.password.dirty&&l.form.controls.password.errors)),u("aria-label",o(32,32,"users.label_password")),e(4),d(o(36,34,"users.label_confirm_password")),e(3),b("ngClass",D(48,ce,l.form.controls.passwordConfirm.dirty&&l.form.controls.passwordConfirm.errors)),u("aria-label",o(39,36,"users.label_confirm_password")),e(4),d(o(43,38,"users.label_admin_user")),e(3),u("aria-label",o(46,40,"users.label_admin_user")),e(6),x(" ",o(52,42,"form.button_close")," "),e(4),b("disabled",!l.form.valid),e(),x(" ",o(57,44,"form.button_save")," "))},dependencies:[A,R,F,q,V,z,G,L,J,j,E],encapsulation:2})}return r})();var fe=r=>({"is-invalid":r});function Be(r,C){if(r&1&&(i(0,"li",9)(1,"label",27),m(2),a(3,"translate"),t(),i(4,"div",11),p(5,"input",28),a(6,"translate"),t()()),r&2){let n=_();e(2),d(o(3,3,"users.label_confirm_password")),e(3),b("ngClass",D(7,fe,n.form.controls.passwordConfirm.dirty&&n.form.controls.passwordConfirm.errors)),u("aria-label",o(6,5,"users.label_confirm_password"))}}var be=(()=>{class r{$activeModal=c(k);$api=c(M);$auth=c(H);$cdr=c(ne);$toastr=c(B);$translate=c(T);initialFormValue={};user;isCurrentUser=!1;form=new N({username:new S("",[g.required]),name:new S("",[g.required]),password:new S(""),passwordConfirm:new S(""),admin:new S(!0)},this.matchPassword);ngOnInit(){this.isCurrentUser=this.$auth.user.username===this.user.username,this.form.patchValue(this.user),this.initialFormValue=this.form.getRawValue(),this.form.valueChanges.subscribe(()=>this.$cdr.detectChanges())}onSubmit({value:n}){this.$api.patch(`/users/${this.user.id}`,n).subscribe({next:()=>{this.$activeModal.close(),this.$toastr.success(this.$translate.instant("users.toast_updated_user"),this.$translate.instant("toast.title_success")),this.isCurrentUser&&n.username!==this.$auth.user.username&&this.$auth.logout()},error:s=>{console.error(s),this.$toastr.error(s.error?.message||this.$translate.instant("users.toast_failed_to_add_user"),this.$translate.instant("toast.title_error"))}})}isFormUnchanged(){return this.form.controls.password.value?!1:JSON.stringify(this.form.getRawValue())===JSON.stringify(this.initialFormValue)}dismissModal(){this.$activeModal.dismiss("Dismiss")}matchPassword(n){let s=n.get("password").value,l=n.get("passwordConfirm").value;if(s!==l)n.get("passwordConfirm").setErrors({matchPassword:!0});else return null}static \u0275fac=function(s){return new(s||r)};static \u0275cmp=y({type:r,selectors:[["ng-component"]],inputs:{user:"user"},decls:52,vars:42,consts:[[1,"modal-content"],["novalidate","",3,"ngSubmit","formGroup"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fas","fa-fw","fa-user-pen","primary-text",2,"font-size","75px"],[1,"list-group","list-group-box","mb-0"],[1,"list-group-item","d-flex","flex-column","flex-md-row","align-items-center"],["for","form-username",1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50"],["formControlName","username","type","text","id","form-username","autocomplete","off","autocapitalize","none",1,"form-control","custom-input"],["for","form-name",1,"mb-2","mb-md-0","w-100","w-md-50"],["formControlName","name","type","text","id","form-name","autocomplete","name",1,"form-control","custom-input"],["for","form-pass",1,"mb-2","mb-md-0","w-100","w-md-50"],["formControlName","password","type","password","autocomplete","new-password","id","form-pass",1,"form-control","custom-input",3,"ngClass"],[1,"list-group-item","d-flex","justify-content-between","align-items-center","flex-row","pb-2"],[1,"text-start"],[1,"text-end","grey-text","d-flex","align-items-center"],["type","checkbox","formControlName","admin","id","isAdmin",1,"rendux-input"],["for","isAdmin",1,"rendux-label","ms-3"],[1,"modal-footer","justify-content-between"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-center"],[1,"text-end"],["type","submit",1,"btn","btn-primary",3,"disabled"],["for","form-pass-confirm",1,"mb-2","mb-md-0","w-100","w-md-50"],["formControlName","passwordConfirm","type","password","autocomplete","new-password","id","form-pass-confirm",1,"form-control","custom-input",3,"ngClass"]],template:function(s,l){s&1&&(i(0,"div",0)(1,"form",1),f("ngSubmit",function(){return l.onSubmit(l.form)}),i(2,"div",2)(3,"h5",3),m(4),a(5,"translate"),t(),i(6,"button",4),a(7,"translate"),f("click",function(){return l.dismissModal()}),t()(),i(8,"div",5)(9,"div",6),p(10,"i",7),t(),i(11,"ul",8)(12,"li",9)(13,"label",10),m(14),a(15,"translate"),t(),i(16,"div",11),p(17,"input",12),a(18,"translate"),t()(),i(19,"li",9)(20,"label",13),m(21),a(22,"translate"),t(),i(23,"div",11),p(24,"input",14),a(25,"translate"),t()(),i(26,"li",9)(27,"label",15),m(28),a(29,"translate"),t(),i(30,"div",11),p(31,"input",16),a(32,"translate"),t()(),w(33,Be,7,9,"li",9),i(34,"li",17)(35,"span",18),m(36),a(37,"translate"),t(),i(38,"div",19),p(39,"input",20),a(40,"translate"),p(41,"label",21),t()()()(),i(42,"div",22)(43,"div",18)(44,"button",23),f("click",function(){return l.dismissModal()}),m(45),a(46,"translate"),t()(),p(47,"div",24),i(48,"div",25)(49,"button",26),m(50),a(51,"translate"),t()()()()()),s&2&&(e(),b("formGroup",l.form),e(3),d(o(5,16,"users.title_edit_user")),e(2),u("aria-label",o(7,18,"form.button_close")),e(8),d(o(15,20,"users.label_username")),e(3),u("aria-label",o(18,22,"users.label_username")),e(4),d(o(22,24,"users.label_full_name")),e(3),u("aria-label",o(25,26,"users.label_full_name")),e(4),d(o(29,28,"users.label_new_password")),e(3),b("ngClass",D(40,fe,l.form.controls.password.dirty&&l.form.controls.password.errors)),u("aria-label",o(32,30,"users.label_new_password")),e(2),h(l.form.controls.password.value?33:-1),e(3),d(o(37,32,"users.label_admin_user")),e(3),u("aria-label",o(40,34,"users.label_admin_user")),e(6),x(" ",o(46,36,"form.button_close")," "),e(4),b("disabled",!l.form.valid||l.isFormUnchanged()),e(),x(" ",o(51,38,"form.button_save")," "))},dependencies:[A,R,F,q,V,z,G,L,J,j,E],encapsulation:2})}return r})();var _e=(()=>{class r{$activeModal=c(k);dismissModal(){this.$activeModal.dismiss("Dismiss")}static \u0275fac=function(s){return new(s||r)};static \u0275cmp=y({type:r,selectors:[["ng-component"]],decls:46,vars:36,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fa","fa-fw","fa-question-circle-o","primary-text",2,"font-size","75px"],[1,"ms-2"],[1,"mb-0"],[1,"mb-2","grey-text"],[1,"modal-footer","justify-content-between"],[1,"text-start"],[1,"text-center"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-end"]],template:function(s,l){s&1&&(i(0,"div",0)(1,"form")(2,"div",1)(3,"h5",2),m(4),a(5,"translate"),t(),i(6,"button",3),a(7,"translate"),f("click",function(){return l.dismissModal()}),t()(),i(8,"div",4)(9,"div",5),p(10,"i",6),t(),i(11,"h5",7),m(12),a(13,"translate"),t(),i(14,"ul",8)(15,"li"),m(16),a(17,"translate"),t(),i(18,"ul",9)(19,"li"),m(20),a(21,"translate"),t(),i(22,"li"),m(23),a(24,"translate"),t(),i(25,"li"),m(26),a(27,"translate"),a(28,"translate"),t(),i(29,"li"),m(30),a(31,"translate"),t(),i(32,"li"),m(33),a(34,"translate"),t()(),i(35,"li"),m(36),a(37,"translate"),t()(),p(38,"app-support-banner"),t(),i(39,"div",10),p(40,"div",11),i(41,"div",12)(42,"button",13),f("click",function(){return l.dismissModal()}),m(43),a(44,"translate"),t()(),p(45,"div",14),t()()()),s&2&&(e(4),d(o(5,12,"support.title")),e(2),u("aria-label",o(7,14,"form.button_close")),e(6),d(o(13,16,"users.title_users")),e(4),d(o(17,18,"users.support.acc_1")),e(4),d(o(21,20,"menu.label_status")),e(3),d(o(24,22,"menu.label_plugins")),e(3),ee("",o(27,24,"menu.label_accessories")," (",o(28,26,"users.support.control"),")"),e(4),d(o(31,28,"menu.linux.label_logs")),e(3),d(o(34,30,"support.title")),e(3),d(o(37,32,"users.support.acc_2")),e(7),x(" ",o(44,34,"form.button_close")," "))},dependencies:[le,E],encapsulation:2})}return r})();var Me=(r,C)=>({"fa-user-secret":r,"fa-user":C});function Ie(r,C){if(r&1){let n=I();i(0,"button",23),f("click",function(){$(n);let l=_(2).$implicit,v=_();return U(v.disable2fa(l))}),m(1),a(2,"translate"),t()}if(r&2){let n=_(2).$implicit,s=_();b("disabled",n.username!==s.username),e(),x(" ",o(2,2,"users.setup_2fa_disable")," ")}}function De(r,C){if(r&1){let n=I();i(0,"button",24),f("click",function(){$(n);let l=_(2).$implicit,v=_();return U(v.setup2fa(l))}),m(1),a(2,"translate"),t()}if(r&2){let n=_(2).$implicit,s=_();b("disabled",n.username!==s.username),e(),x(" ",o(2,2,"users.setup_2fa")," ")}}function Fe(r,C){if(r&1&&w(0,Ie,3,4,"button",21)(1,De,3,4,"button",22),r&2){let n=_().$implicit;h(n.otpActive?0:1)}}function Ve(r,C){r&1&&p(0,"div")}function Ne(r,C){if(r&1){let n=I();i(0,"div",9)(1,"div",10)(2,"div",11)(3,"div",12)(4,"span",13)(5,"h4"),m(6),t(),i(7,"h5",14),p(8,"i",15),m(9),t()()(),i(10,"div",16),w(11,Fe,2,1)(12,Ve,1,0,"div"),i(13,"div")(14,"button",17),a(15,"translate"),f("click",function(){let l=$(n).$implicit,v=_();return U(v.openEditUser(l))}),p(16,"i",18),t(),i(17,"button",19),a(18,"translate"),f("click",function(){let l=$(n).$implicit,v=_();return U(v.deleteUser(l.id))}),p(19,"i",20),t()()()()()()}if(r&2){let n=C.$implicit,s=_();e(6),d(n.name),e(2),b("ngClass",te(11,Me,n.admin,!n.admin)),e(),x(" ",n.username," "),e(2),h(n.admin?11:12),e(3),u("aria-label",o(15,7,"form.button_edit")),e(3),b("disabled",s.username===n.username),u("aria-label",o(18,9,"form.button_delete"))}}var zt=(()=>{class r{$api=c(M);$auth=c(H);$modal=c(ae);$route=c(oe);$toastr=c(B);$translate=c(T);homebridgeUsers=[];username=this.$auth.user.username;isAdmin=this.$auth.user.admin;ngOnInit(){this.$route.data.subscribe(n=>{this.homebridgeUsers=n.homebridgeUsers})}reloadUsers(){return this.$api.get("/users").subscribe(n=>{this.homebridgeUsers=n})}openAddNewUser(){this.$modal.open(ue,{size:"lg",backdrop:"static"}).result.finally(()=>{this.reloadUsers()})}openEditUser(n){let s=this.$modal.open(be,{size:"lg",backdrop:"static"});s.componentInstance.user=n,s.result.finally(()=>{this.reloadUsers()})}deleteUser(n){this.$api.delete(`/users/${n}`).subscribe({next:()=>{this.$toastr.success(this.$translate.instant("users.toast_user_deleted"),this.$translate.instant("toast.title_success")),this.reloadUsers()},error:s=>{console.error(s),this.$toastr.error(s.error?.message||this.$translate.instant("users.toast_failed_to_delete_user"),this.$translate.instant("toast.title_error"))}})}setup2fa(n){let s=this.$modal.open(de,{size:"lg",backdrop:"static"});s.componentInstance.user=n,s.result.finally(()=>{this.reloadUsers()})}disable2fa(n){let s=this.$modal.open(me,{size:"lg",backdrop:"static"});s.componentInstance.user=n,s.result.finally(()=>{this.reloadUsers()})}openSupport(){this.$modal.open(_e,{size:"lg",backdrop:"static"})}static \u0275fac=function(s){return new(s||r)};static \u0275cmp=y({type:r,selectors:[["app-users"]],decls:15,vars:9,consts:[[1,"row","mb-3"],[1,"col-6"],[1,"primary-text","m-0"],[1,"col-6","text-end"],[1,"btn","btn-elegant","waves-effect","m-0","me-2",3,"click"],[1,"fas","fa-fw","fa-user-plus"],["type","button",1,"btn","btn-elegant","my-0","me-0",3,"click"],[1,"fa","fa-fw","fa-question-circle-o"],[1,"row"],[1,"col-md-6","mb-4"],[1,"card","card-body"],[1,"d-flex","flex-column"],[1,"d-flex","flex-row","mb-3"],[1,"me-auto","my-0"],[1,"small","text-truncate","grey-text"],[1,"fas","fa-fw",3,"ngClass"],[1,"d-flex","flex-row","justify-content-between"],[1,"btn","btn-elegant","m-0",3,"click"],[1,"fas","fa-fw","fa-user-pen"],[1,"btn","btn-danger","m-0","ms-2",3,"click","disabled"],[1,"fas","fa-fw","fa-trash"],[1,"btn","btn-elegant","m-0",3,"disabled"],[1,"btn","btn-primary","m-0",3,"disabled"],[1,"btn","btn-elegant","m-0",3,"click","disabled"],[1,"btn","btn-primary","m-0",3,"click","disabled"]],template:function(s,l){s&1&&(i(0,"div",0)(1,"div",1)(2,"h3",2),m(3),a(4,"translate"),t()(),i(5,"div",3)(6,"button",4),a(7,"translate"),f("click",function(){return l.openAddNewUser()}),p(8,"i",5),t(),i(9,"button",6),a(10,"translate"),f("click",function(){return l.openSupport()}),p(11,"i",7),t()()(),i(12,"div",8),Y(13,Ne,20,14,"div",9,X),t()),s&2&&(e(3),d(o(4,3,"users.title_users")),e(3),u("aria-label",o(7,5,"users.button_add_user")),e(3),u("aria-label",o(10,7,"support.title")),e(4),Z(l.homebridgeUsers))},dependencies:[j,E],encapsulation:2})}return r})();export{zt as UsersComponent};
1
+ import{a as le}from"./chunk-ALCBZAYU.js";import{a as se}from"./chunk-A7SU4MHQ.js";import{g as Q,m as k,n as ae}from"./chunk-6DTD6NF3.js";import{B as A,C as G,b as q,c as F,d as g,e as V,f as z,g as N,j as S,m as R,p as O,q as L,r as J,z as re}from"./chunk-KCLLEPG3.js";import{b as H}from"./chunk-SWEKN3LU.js";import{b as oe}from"./chunk-ZX7APSEP.js";import{a as xe}from"./chunk-7GLWRKU3.js";import{k as T,l as E,n as B,q as M}from"./chunk-CWRKEWVF.js";import{Ac as ne,Db as I,Gb as f,Ib as _,Kc as j,La as e,Vb as m,Wa as y,Wb as d,Xb as x,Yb as ee,g as ve,gc as D,h as W,hc as te,ja as c,kb as u,lb as w,mb as h,mc as a,nc as o,oa as $,ob as X,oc as ie,pa as U,pb as Y,qb as Z,rb as b,sb as i,tb as t,ub as p}from"./chunk-PRNMO4E2.js";function Ce(r,C){r&1&&(i(0,"ngb-alert",13)(1,"p",20),m(2),a(3,"translate"),t()()),r&2&&(b("dismissible",!1),e(2),d(o(3,2,"login.invalid_password")))}var me=(()=>{class r{$activeModal=c(k);$api=c(M);$toastr=c(B);$translate=c(T);invalidCredentials=!1;formGroup=new N({password:new S("",[g.required])});disable2fa(){this.invalidCredentials=!1,this.$api.post("/users/otp/deactivate",this.formGroup.value).subscribe({next:()=>{this.$activeModal.close(),this.$toastr.success(this.$translate.instant("users.setup_2fa_disable_success"),this.$translate.instant("toast.title_success"))},error:()=>{this.formGroup.setValue({password:""}),this.invalidCredentials=!0}})}dismissModal(){this.$activeModal.dismiss("Dismiss")}static \u0275fac=function(s){return new(s||r)};static \u0275cmp=y({type:r,selectors:[["ng-component"]],decls:34,vars:27,consts:[[1,"modal-content",2,"min-height","300px"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fas","fa-fw","fa-key","primary-text",2,"font-size","75px"],[1,"mb-3"],[1,"list-group","list-group-box","mb-0"],[1,"list-group-item","d-flex","flex-column","flex-md-row","align-items-center"],[1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50"],["type","password","autocomplete","current-password",1,"form-control","custom-input",3,"formControl","placeholder"],["type","error",1,"mt-3","mb-0",3,"dismissible"],[1,"modal-footer","justify-content-between"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-center"],[1,"text-end"],["type","button","data-bs-dismiss","modal",1,"btn","btn-danger",3,"click","disabled"],[1,"mb-0"]],template:function(s,l){s&1&&(i(0,"div",0)(1,"div",1)(2,"h5",2),m(3),a(4,"translate"),t(),i(5,"button",3),a(6,"translate"),f("click",function(){return l.dismissModal()}),t()(),i(7,"div",4)(8,"div",5),p(9,"i",6),t(),i(10,"ul",7)(11,"li"),m(12),a(13,"translate"),t()(),i(14,"ul",8)(15,"li",9)(16,"label",10),m(17),a(18,"translate"),t(),i(19,"div",11),p(20,"input",12),a(21,"translate"),t()()(),w(22,Ce,4,4,"ngb-alert",13),t(),i(23,"div",14)(24,"div",15)(25,"button",16),a(26,"translate"),f("click",function(){return l.dismissModal()}),m(27),a(28,"translate"),t()(),p(29,"div",17),i(30,"div",18)(31,"button",19),f("click",function(){return l.disable2fa()}),m(32),a(33,"translate"),t()()()()),s&2&&(e(3),d(o(4,11,"users.setup_2fa_disable")),e(2),u("aria-label",o(6,13,"form.button_close")),e(7),d(o(13,15,"users.setup_2fa_disable_current_password")),e(5),d(o(18,17,"users.label_password")),e(3),b("formControl",l.formGroup.controls.password)("placeholder",o(21,19,"users.label_password")),e(2),h(l.invalidCredentials&&!l.formGroup.controls.password.value?22:-1),e(3),u("aria-label",o(26,21,"form.button_close")),e(2),x(" ",o(28,23,"form.button_close")," "),e(4),b("disabled",l.formGroup.invalid),e(),x(" ",o(33,25,"form.button_disable")," "))},dependencies:[A,F,V,G,O,Q,E],encapsulation:2})}return r})();var pe=ve(xe(),1);var we=r=>({timeDiffError:r});function he(r,C){r&1&&(i(0,"li"),m(1),a(2,"translate"),t()),r&2&&(e(),d(o(2,1,"users.setup_2fa_scan_qr_code")))}function ge(r,C){if(r&1&&(i(0,"ngb-alert",8)(1,"p",16),m(2),a(3,"translate"),t(),i(4,"p",17),m(5),a(6,"translate"),t()()),r&2){let n=_();b("dismissible",!1),e(2),d(o(3,3,"users.setup_2fa_cannot_setup_2fa")),e(3),d(ie(6,5,"users.setup_2fa_server_time_out",D(8,we,n.timeDiffError)))}}function Se(r,C){r&1&&p(0,"i",27)}function ye(r,C){r&1&&p(0,"i",28)}function Ee(r,C){if(r&1){let n=I();i(0,"div",21),m(1),a(2,"translate"),p(3,"br"),m(4),i(5,"a",26),f("click",function(){$(n);let l=_(2);return U(l.copySecretToClipboard())}),w(6,Se,1,0,"i",27)(7,ye,1,0,"i",28),t()()}if(r&2){let n=_(2);e(),x(" ",o(2,3,"users.setup_2fa_scan_qr_manual")),e(3),x(" ",n.otpSecret," "),e(2),h(n.secretCopied?6:7)}}function $e(r,C){if(r&1&&(i(0,"ul",9)(1,"li",18)(2,"div",19),p(3,"app-qrcode",20),t(),w(4,Ee,8,5,"div",21),t(),i(5,"li",22)(6,"label",23),m(7),a(8,"translate"),t(),i(9,"div",24),p(10,"input",25),t()()()),r&2){let n=_();e(3),b("data",n.otpString),e(),h(n.otpSecret?4:-1),e(3),d(o(8,4,"users.setup_2fa_enter_code")),e(3),b("formControl",n.formGroup.controls.code)}}function Ue(r,C){if(r&1){let n=I();i(0,"button",29),a(1,"translate"),f("click",function(){$(n);let l=_();return U(l.dismissModal())}),m(2),a(3,"translate"),t()}r&2&&(u("aria-label",o(1,2,"form.button_close")),e(2),x(" ",o(3,4,"form.button_close")," "))}function ke(r,C){if(r&1){let n=I();i(0,"button",29),a(1,"translate"),f("click",function(){$(n);let l=_();return U(l.dismissModal())}),m(2),a(3,"translate"),t()}r&2&&(u("aria-label",o(1,2,"form.button_close")),e(2),x(" ",o(3,4,"form.button_close")," "))}function Te(r,C){if(r&1){let n=I();i(0,"button",30),f("click",function(){$(n);let l=_();return U(l.enable2fa())}),m(1),a(2,"translate"),t()}if(r&2){let n=_();b("disabled",n.formGroup.invalid),e(),x(" ",o(2,2,"form.button_enable")," ")}}var de=(()=>{class r{$activeModal=c(k);$api=c(M);$toastr=c(B);$translate=c(T);copyTimeout=null;user;timeDiffError=null;otpString;otpSecret;secretCopied=!1;formGroup=new N({code:new S("",[g.required,g.minLength(6),g.maxLength(6)])});ngOnInit(){this.$api.post("/users/otp/setup",{}).subscribe({next:n=>{this.checkTimeDiff(n.timestamp),this.timeDiffError||(this.otpString=n.otpauth,this.otpSecret=new URL(this.otpString).searchParams.get("secret")||"")},error:n=>{this.$activeModal.dismiss(),console.error(n),this.$toastr.error(this.$translate.instant("users.setup_2fa_enable_error"),this.$translate.instant("toast.title_error"))}})}enable2fa(){this.$api.post("/users/otp/activate",this.formGroup.value).subscribe({next:()=>{this.$toastr.success(this.$translate.instant("users.setup_2fa_enabled_success"),this.$translate.instant("toast.title_success")),this.$activeModal.close()},error:n=>{console.error(n),this.$toastr.error(this.$translate.instant("users.setup_2fa_activate_error"),this.$translate.instant("toast.title_error"))}})}copySecretToClipboard(){return W(this,null,function*(){yield navigator.clipboard.writeText(this.otpSecret),this.secretCopied=!0,this.copyTimeout&&clearTimeout(this.copyTimeout),this.copyTimeout=setTimeout(()=>{this.secretCopied=!1},3e3)})}dismissModal(){this.$activeModal.dismiss("Dismiss")}checkTimeDiff(n){let s=(0,pe.default)(n).diff(new Date,"millisecond");s<-5e3||s>5e3?this.timeDiffError=s:this.timeDiffError=null}static \u0275fac=function(s){return new(s||r)};static \u0275cmp=y({type:r,selectors:[["ng-component"]],inputs:{user:"user"},decls:24,vars:15,consts:[[1,"modal-content","setup2fa"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fas","fa-fw","fa-key","primary-text",2,"font-size","75px"],[1,"mb-3"],["type","error",1,"mb-0",3,"dismissible"],[1,"list-group","list-group-box","mb-0"],[1,"modal-footer","justify-content-between"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant"],[1,"text-center"],[1,"text-end"],["type","button","data-bs-dismiss","modal",1,"btn","btn-primary",3,"disabled"],[1,"fw-bold","mb-1"],[1,"mb-0"],[1,"list-group-item","text-center"],[1,"text-center","w-100","d-flex","justify-content-center","my-2"],[1,"mx-auto",2,"width","175px","height","175px",3,"data"],[1,"grey-text","small","mt-0","mb-1"],[1,"list-group-item","d-flex","flex-column","flex-md-row","align-items-center"],[1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50"],["type","text","placeholder","eg. 123456","autocomplete","one-time-code","autocapitalize","none","inputmode","numeric","pattern","[0-9]*",1,"form-control","custom-input",3,"formControl"],["href","javascript:void(0)",1,"ms-1","text-primary",3,"click"],[1,"fas","fa-fw","fa-check","green-text"],[1,"fas","fa-fw","fa-copy"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],["type","button","data-bs-dismiss","modal",1,"btn","btn-primary",3,"click","disabled"]],template:function(s,l){s&1&&(i(0,"div",0)(1,"div",1)(2,"h5",2),m(3),a(4,"translate"),t(),i(5,"button",3),a(6,"translate"),f("click",function(){return l.dismissModal()}),t()(),i(7,"div",4)(8,"div",5),p(9,"i",6),t(),i(10,"ul",7)(11,"li"),m(12),a(13,"translate"),t(),w(14,he,3,3,"li"),t(),w(15,ge,7,10,"ngb-alert",8),w(16,$e,11,6,"ul",9),t(),i(17,"div",10)(18,"div",11),w(19,Ue,4,6,"button",12),t(),i(20,"div",13),w(21,ke,4,6,"button",12),t(),i(22,"div",14),w(23,Te,3,4,"button",15),t()()()),s&2&&(e(3),d(o(4,9,"users.setup_2fa")),e(2),u("aria-label",o(6,11,"form.button_close")),e(7),d(o(13,13,"users.setup_2fa_warning")),e(2),h(l.timeDiffError?-1:14),e(),h(l.timeDiffError?15:-1),e(),h(l.timeDiffError?-1:16),e(3),h(l.timeDiffError?-1:19),e(2),h(l.timeDiffError?21:-1),e(2),h(l.timeDiffError?-1:23))},dependencies:[Q,se,A,F,V,re,G,O,E],encapsulation:2})}return r})();var ce=r=>({"is-invalid":r}),ue=(()=>{class r{$activeModal=c(k);$api=c(M);$toastr=c(B);$translate=c(T);form=new N({username:new S("",[g.required]),name:new S("",[g.required]),password:new S("",[g.compose([g.required,g.minLength(4)])]),passwordConfirm:new S("",[g.required]),admin:new S(!0)},this.matchPassword);onSubmit({value:n}){this.$api.post("/users",n).subscribe({next:()=>{this.$activeModal.close(),this.$toastr.success(this.$translate.instant("users.toast_added_new_user"),this.$translate.instant("toast.title_success"))},error:s=>{this.$toastr.error(s.error.message||this.$translate.instant("users.toast_failed_to_add_user"),this.$translate.instant("toast.title_error"))}})}dismissModal(){this.$activeModal.dismiss("Dismiss")}matchPassword(n){let s=n.get("password").value,l=n.get("passwordConfirm").value;if(s!==l)n.get("passwordConfirm").setErrors({matchPassword:!0});else return null}static \u0275fac=function(s){return new(s||r)};static \u0275cmp=y({type:r,selectors:[["ng-component"]],decls:58,vars:50,consts:[[1,"modal-content"],["novalidate","",3,"ngSubmit","formGroup"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fas","fa-fw","fa-user-plus","primary-text",2,"font-size","75px"],[1,"list-group","list-group-box","mb-0"],[1,"list-group-item","d-flex","flex-column","flex-md-row","align-items-center"],["for","form-username",1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50"],["formControlName","username","type","text","id","form-username","autocomplete","username","autocapitalize","none",1,"form-control","custom-input"],["for","form-name",1,"mb-2","mb-md-0","w-100","w-md-50"],["formControlName","name","type","text","id","form-name","autocomplete","name",1,"form-control","custom-input"],["for","form-pass",1,"mb-2","mb-md-0","w-100","w-md-50"],["formControlName","password","type","password","autocomplete","new-password","id","form-pass",1,"form-control","custom-input",3,"ngClass"],["for","form-pass-confirm",1,"mb-2","mb-md-0","w-100","w-md-50"],["formControlName","passwordConfirm","type","password","autocomplete","new-password","id","form-pass-confirm",1,"form-control","custom-input",3,"ngClass"],[1,"list-group-item","d-flex","justify-content-between","align-items-center","flex-row","pb-2"],[1,"text-start"],[1,"text-end","grey-text","d-flex","align-items-center"],["formControlName","admin","type","checkbox","id","isAdmin",1,"rendux-input"],["for","isAdmin",1,"rendux-label","ms-3"],[1,"modal-footer","justify-content-between"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-center"],[1,"text-end"],["type","submit",1,"btn","btn-primary",3,"disabled"]],template:function(s,l){s&1&&(i(0,"div",0)(1,"form",1),f("ngSubmit",function(){return l.onSubmit(l.form)}),i(2,"div",2)(3,"h5",3),m(4),a(5,"translate"),t(),i(6,"button",4),a(7,"translate"),f("click",function(){return l.dismissModal()}),t()(),i(8,"div",5)(9,"div",6),p(10,"i",7),t(),i(11,"ul",8)(12,"li",9)(13,"label",10),m(14),a(15,"translate"),t(),i(16,"div",11),p(17,"input",12),a(18,"translate"),t()(),i(19,"li",9)(20,"label",13),m(21),a(22,"translate"),t(),i(23,"div",11),p(24,"input",14),a(25,"translate"),t()(),i(26,"li",9)(27,"label",15),m(28),a(29,"translate"),t(),i(30,"div",11),p(31,"input",16),a(32,"translate"),t()(),i(33,"li",9)(34,"label",17),m(35),a(36,"translate"),t(),i(37,"div",11),p(38,"input",18),a(39,"translate"),t()(),i(40,"li",19)(41,"span",20),m(42),a(43,"translate"),t(),i(44,"div",21),p(45,"input",22),a(46,"translate"),p(47,"label",23),t()()()(),i(48,"div",24)(49,"div",20)(50,"button",25),f("click",function(){return l.dismissModal()}),m(51),a(52,"translate"),t()(),p(53,"div",26),i(54,"div",27)(55,"button",28),m(56),a(57,"translate"),t()()()()()),s&2&&(e(),b("formGroup",l.form),e(3),d(o(5,18,"users.title_add_user")),e(2),u("aria-label",o(7,20,"form.button_close")),e(8),d(o(15,22,"users.label_username")),e(3),u("aria-label",o(18,24,"users.label_username")),e(4),d(o(22,26,"users.label_full_name")),e(3),u("aria-label",o(25,28,"users.label_full_name")),e(4),d(o(29,30,"users.label_password")),e(3),b("ngClass",D(46,ce,l.form.controls.password.dirty&&l.form.controls.password.errors)),u("aria-label",o(32,32,"users.label_password")),e(4),d(o(36,34,"users.label_confirm_password")),e(3),b("ngClass",D(48,ce,l.form.controls.passwordConfirm.dirty&&l.form.controls.passwordConfirm.errors)),u("aria-label",o(39,36,"users.label_confirm_password")),e(4),d(o(43,38,"users.label_admin_user")),e(3),u("aria-label",o(46,40,"users.label_admin_user")),e(6),x(" ",o(52,42,"form.button_close")," "),e(4),b("disabled",!l.form.valid),e(),x(" ",o(57,44,"form.button_save")," "))},dependencies:[A,R,F,q,V,z,G,L,J,j,E],encapsulation:2})}return r})();var fe=r=>({"is-invalid":r});function Be(r,C){if(r&1&&(i(0,"li",9)(1,"label",27),m(2),a(3,"translate"),t(),i(4,"div",11),p(5,"input",28),a(6,"translate"),t()()),r&2){let n=_();e(2),d(o(3,3,"users.label_confirm_password")),e(3),b("ngClass",D(7,fe,n.form.controls.passwordConfirm.dirty&&n.form.controls.passwordConfirm.errors)),u("aria-label",o(6,5,"users.label_confirm_password"))}}var be=(()=>{class r{$activeModal=c(k);$api=c(M);$auth=c(H);$cdr=c(ne);$toastr=c(B);$translate=c(T);initialFormValue={};user;isCurrentUser=!1;form=new N({username:new S("",[g.required]),name:new S("",[g.required]),password:new S(""),passwordConfirm:new S(""),admin:new S(!0)},this.matchPassword);ngOnInit(){this.isCurrentUser=this.$auth.user.username===this.user.username,this.form.patchValue(this.user),this.initialFormValue=this.form.getRawValue(),this.form.valueChanges.subscribe(()=>this.$cdr.detectChanges())}onSubmit({value:n}){this.$api.patch(`/users/${this.user.id}`,n).subscribe({next:()=>{this.$activeModal.close(),this.$toastr.success(this.$translate.instant("users.toast_updated_user"),this.$translate.instant("toast.title_success")),this.isCurrentUser&&n.username!==this.$auth.user.username&&this.$auth.logout()},error:s=>{console.error(s),this.$toastr.error(s.error?.message||this.$translate.instant("users.toast_failed_to_add_user"),this.$translate.instant("toast.title_error"))}})}isFormUnchanged(){return this.form.controls.password.value?!1:JSON.stringify(this.form.getRawValue())===JSON.stringify(this.initialFormValue)}dismissModal(){this.$activeModal.dismiss("Dismiss")}matchPassword(n){let s=n.get("password").value,l=n.get("passwordConfirm").value;if(s!==l)n.get("passwordConfirm").setErrors({matchPassword:!0});else return null}static \u0275fac=function(s){return new(s||r)};static \u0275cmp=y({type:r,selectors:[["ng-component"]],inputs:{user:"user"},decls:52,vars:42,consts:[[1,"modal-content"],["novalidate","",3,"ngSubmit","formGroup"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fas","fa-fw","fa-user-pen","primary-text",2,"font-size","75px"],[1,"list-group","list-group-box","mb-0"],[1,"list-group-item","d-flex","flex-column","flex-md-row","align-items-center"],["for","form-username",1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50"],["formControlName","username","type","text","id","form-username","autocomplete","off","autocapitalize","none",1,"form-control","custom-input"],["for","form-name",1,"mb-2","mb-md-0","w-100","w-md-50"],["formControlName","name","type","text","id","form-name","autocomplete","name",1,"form-control","custom-input"],["for","form-pass",1,"mb-2","mb-md-0","w-100","w-md-50"],["formControlName","password","type","password","autocomplete","new-password","id","form-pass",1,"form-control","custom-input",3,"ngClass"],[1,"list-group-item","d-flex","justify-content-between","align-items-center","flex-row","pb-2"],[1,"text-start"],[1,"text-end","grey-text","d-flex","align-items-center"],["type","checkbox","formControlName","admin","id","isAdmin",1,"rendux-input"],["for","isAdmin",1,"rendux-label","ms-3"],[1,"modal-footer","justify-content-between"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-center"],[1,"text-end"],["type","submit",1,"btn","btn-primary",3,"disabled"],["for","form-pass-confirm",1,"mb-2","mb-md-0","w-100","w-md-50"],["formControlName","passwordConfirm","type","password","autocomplete","new-password","id","form-pass-confirm",1,"form-control","custom-input",3,"ngClass"]],template:function(s,l){s&1&&(i(0,"div",0)(1,"form",1),f("ngSubmit",function(){return l.onSubmit(l.form)}),i(2,"div",2)(3,"h5",3),m(4),a(5,"translate"),t(),i(6,"button",4),a(7,"translate"),f("click",function(){return l.dismissModal()}),t()(),i(8,"div",5)(9,"div",6),p(10,"i",7),t(),i(11,"ul",8)(12,"li",9)(13,"label",10),m(14),a(15,"translate"),t(),i(16,"div",11),p(17,"input",12),a(18,"translate"),t()(),i(19,"li",9)(20,"label",13),m(21),a(22,"translate"),t(),i(23,"div",11),p(24,"input",14),a(25,"translate"),t()(),i(26,"li",9)(27,"label",15),m(28),a(29,"translate"),t(),i(30,"div",11),p(31,"input",16),a(32,"translate"),t()(),w(33,Be,7,9,"li",9),i(34,"li",17)(35,"span",18),m(36),a(37,"translate"),t(),i(38,"div",19),p(39,"input",20),a(40,"translate"),p(41,"label",21),t()()()(),i(42,"div",22)(43,"div",18)(44,"button",23),f("click",function(){return l.dismissModal()}),m(45),a(46,"translate"),t()(),p(47,"div",24),i(48,"div",25)(49,"button",26),m(50),a(51,"translate"),t()()()()()),s&2&&(e(),b("formGroup",l.form),e(3),d(o(5,16,"users.title_edit_user")),e(2),u("aria-label",o(7,18,"form.button_close")),e(8),d(o(15,20,"users.label_username")),e(3),u("aria-label",o(18,22,"users.label_username")),e(4),d(o(22,24,"users.label_full_name")),e(3),u("aria-label",o(25,26,"users.label_full_name")),e(4),d(o(29,28,"users.label_new_password")),e(3),b("ngClass",D(40,fe,l.form.controls.password.dirty&&l.form.controls.password.errors)),u("aria-label",o(32,30,"users.label_new_password")),e(2),h(l.form.controls.password.value?33:-1),e(3),d(o(37,32,"users.label_admin_user")),e(3),u("aria-label",o(40,34,"users.label_admin_user")),e(6),x(" ",o(46,36,"form.button_close")," "),e(4),b("disabled",!l.form.valid||l.isFormUnchanged()),e(),x(" ",o(51,38,"form.button_save")," "))},dependencies:[A,R,F,q,V,z,G,L,J,j,E],encapsulation:2})}return r})();var _e=(()=>{class r{$activeModal=c(k);dismissModal(){this.$activeModal.dismiss("Dismiss")}static \u0275fac=function(s){return new(s||r)};static \u0275cmp=y({type:r,selectors:[["ng-component"]],decls:46,vars:36,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fa","fa-fw","fa-question-circle-o","primary-text",2,"font-size","75px"],[1,"ms-2"],[1,"mb-0"],[1,"mb-2","grey-text"],[1,"modal-footer","justify-content-between"],[1,"text-start"],[1,"text-center"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-end"]],template:function(s,l){s&1&&(i(0,"div",0)(1,"form")(2,"div",1)(3,"h5",2),m(4),a(5,"translate"),t(),i(6,"button",3),a(7,"translate"),f("click",function(){return l.dismissModal()}),t()(),i(8,"div",4)(9,"div",5),p(10,"i",6),t(),i(11,"h5",7),m(12),a(13,"translate"),t(),i(14,"ul",8)(15,"li"),m(16),a(17,"translate"),t(),i(18,"ul",9)(19,"li"),m(20),a(21,"translate"),t(),i(22,"li"),m(23),a(24,"translate"),t(),i(25,"li"),m(26),a(27,"translate"),a(28,"translate"),t(),i(29,"li"),m(30),a(31,"translate"),t(),i(32,"li"),m(33),a(34,"translate"),t()(),i(35,"li"),m(36),a(37,"translate"),t()(),p(38,"app-support-banner"),t(),i(39,"div",10),p(40,"div",11),i(41,"div",12)(42,"button",13),f("click",function(){return l.dismissModal()}),m(43),a(44,"translate"),t()(),p(45,"div",14),t()()()),s&2&&(e(4),d(o(5,12,"support.title")),e(2),u("aria-label",o(7,14,"form.button_close")),e(6),d(o(13,16,"users.title_users")),e(4),d(o(17,18,"users.support.acc_1")),e(4),d(o(21,20,"menu.label_status")),e(3),d(o(24,22,"menu.label_plugins")),e(3),ee("",o(27,24,"menu.label_accessories")," (",o(28,26,"users.support.control"),")"),e(4),d(o(31,28,"menu.linux.label_logs")),e(3),d(o(34,30,"support.title")),e(3),d(o(37,32,"users.support.acc_2")),e(7),x(" ",o(44,34,"form.button_close")," "))},dependencies:[le,E],encapsulation:2})}return r})();var Me=(r,C)=>({"fa-user-secret":r,"fa-user":C});function Ie(r,C){if(r&1){let n=I();i(0,"button",23),f("click",function(){$(n);let l=_(2).$implicit,v=_();return U(v.disable2fa(l))}),m(1),a(2,"translate"),t()}if(r&2){let n=_(2).$implicit,s=_();b("disabled",n.username!==s.username),e(),x(" ",o(2,2,"users.setup_2fa_disable")," ")}}function De(r,C){if(r&1){let n=I();i(0,"button",24),f("click",function(){$(n);let l=_(2).$implicit,v=_();return U(v.setup2fa(l))}),m(1),a(2,"translate"),t()}if(r&2){let n=_(2).$implicit,s=_();b("disabled",n.username!==s.username),e(),x(" ",o(2,2,"users.setup_2fa")," ")}}function Fe(r,C){if(r&1&&w(0,Ie,3,4,"button",21)(1,De,3,4,"button",22),r&2){let n=_().$implicit;h(n.otpActive?0:1)}}function Ve(r,C){r&1&&p(0,"div")}function Ne(r,C){if(r&1){let n=I();i(0,"div",9)(1,"div",10)(2,"div",11)(3,"div",12)(4,"span",13)(5,"h4"),m(6),t(),i(7,"h5",14),p(8,"i",15),m(9),t()()(),i(10,"div",16),w(11,Fe,2,1)(12,Ve,1,0,"div"),i(13,"div")(14,"button",17),a(15,"translate"),f("click",function(){let l=$(n).$implicit,v=_();return U(v.openEditUser(l))}),p(16,"i",18),t(),i(17,"button",19),a(18,"translate"),f("click",function(){let l=$(n).$implicit,v=_();return U(v.deleteUser(l.id))}),p(19,"i",20),t()()()()()()}if(r&2){let n=C.$implicit,s=_();e(6),d(n.name),e(2),b("ngClass",te(11,Me,n.admin,!n.admin)),e(),x(" ",n.username," "),e(2),h(n.admin?11:12),e(3),u("aria-label",o(15,7,"form.button_edit")),e(3),b("disabled",s.username===n.username),u("aria-label",o(18,9,"form.button_delete"))}}var zt=(()=>{class r{$api=c(M);$auth=c(H);$modal=c(ae);$route=c(oe);$toastr=c(B);$translate=c(T);homebridgeUsers=[];username=this.$auth.user.username;isAdmin=this.$auth.user.admin;ngOnInit(){this.$route.data.subscribe(n=>{this.homebridgeUsers=n.homebridgeUsers})}reloadUsers(){return this.$api.get("/users").subscribe(n=>{this.homebridgeUsers=n})}openAddNewUser(){this.$modal.open(ue,{size:"lg",backdrop:"static"}).result.finally(()=>{this.reloadUsers()})}openEditUser(n){let s=this.$modal.open(be,{size:"lg",backdrop:"static"});s.componentInstance.user=n,s.result.finally(()=>{this.reloadUsers()})}deleteUser(n){this.$api.delete(`/users/${n}`).subscribe({next:()=>{this.$toastr.success(this.$translate.instant("users.toast_user_deleted"),this.$translate.instant("toast.title_success")),this.reloadUsers()},error:s=>{console.error(s),this.$toastr.error(s.error?.message||this.$translate.instant("users.toast_failed_to_delete_user"),this.$translate.instant("toast.title_error"))}})}setup2fa(n){let s=this.$modal.open(de,{size:"lg",backdrop:"static"});s.componentInstance.user=n,s.result.finally(()=>{this.reloadUsers()})}disable2fa(n){let s=this.$modal.open(me,{size:"lg",backdrop:"static"});s.componentInstance.user=n,s.result.finally(()=>{this.reloadUsers()})}openSupport(){this.$modal.open(_e,{size:"lg",backdrop:"static"})}static \u0275fac=function(s){return new(s||r)};static \u0275cmp=y({type:r,selectors:[["app-users"]],decls:15,vars:9,consts:[[1,"row","mb-3"],[1,"col-6"],[1,"primary-text","m-0"],[1,"col-6","text-end"],[1,"btn","btn-elegant","waves-effect","m-0","me-2",3,"click"],[1,"fas","fa-fw","fa-user-plus"],["type","button",1,"btn","btn-elegant","my-0","me-0",3,"click"],[1,"fa","fa-fw","fa-question-circle-o"],[1,"row"],[1,"col-md-6","mb-4"],[1,"card","card-body"],[1,"d-flex","flex-column"],[1,"d-flex","flex-row","mb-3"],[1,"me-auto","my-0"],[1,"small","text-truncate","grey-text"],[1,"fas","fa-fw",3,"ngClass"],[1,"d-flex","flex-row","justify-content-between"],[1,"btn","btn-elegant","m-0",3,"click"],[1,"fas","fa-fw","fa-user-pen"],[1,"btn","btn-danger","m-0","ms-2",3,"click","disabled"],[1,"fas","fa-fw","fa-trash"],[1,"btn","btn-elegant","m-0",3,"disabled"],[1,"btn","btn-primary","m-0",3,"disabled"],[1,"btn","btn-elegant","m-0",3,"click","disabled"],[1,"btn","btn-primary","m-0",3,"click","disabled"]],template:function(s,l){s&1&&(i(0,"div",0)(1,"div",1)(2,"h3",2),m(3),a(4,"translate"),t()(),i(5,"div",3)(6,"button",4),a(7,"translate"),f("click",function(){return l.openAddNewUser()}),p(8,"i",5),t(),i(9,"button",6),a(10,"translate"),f("click",function(){return l.openSupport()}),p(11,"i",7),t()()(),i(12,"div",8),Y(13,Ne,20,14,"div",9,X),t()),s&2&&(e(3),d(o(4,3,"users.title_users")),e(3),u("aria-label",o(7,5,"users.button_add_user")),e(3),u("aria-label",o(10,7,"support.title")),e(4),Z(l.homebridgeUsers))},dependencies:[j,E],encapsulation:2})}return r})();export{zt as UsersComponent};