@mxtommy/kip 3.11.0 → 3.12.0

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 (55) hide show
  1. package/CHANGELOG.md +16 -2
  2. package/README.md +6 -6
  3. package/package.json +1 -1
  4. package/public/3rdpartylicenses.txt +61 -61
  5. package/public/assets/help-docs/community.md +78 -0
  6. package/public/assets/help-docs/configuration.md +1 -1
  7. package/public/assets/help-docs/contact-us.md +58 -8
  8. package/public/assets/help-docs/dashboards.md +117 -42
  9. package/public/assets/help-docs/datainspector.md +1 -1
  10. package/public/assets/help-docs/datasets.md +1 -1
  11. package/public/assets/help-docs/embedwidget.md +1 -1
  12. package/public/assets/help-docs/grafana.md +1 -1
  13. package/public/assets/help-docs/influxdb.md +1 -1
  14. package/public/assets/help-docs/kiosk.md +17 -1
  15. package/public/assets/help-docs/menu.json +4 -3
  16. package/public/assets/help-docs/putcontrols.md +5 -5
  17. package/public/assets/help-docs/welcome.md +46 -23
  18. package/public/assets/help-docs/zones.md +1 -1
  19. package/public/assets/svg/icons.svg +18 -18
  20. package/public/{chunk-K4BST2XF.js → chunk-3LKIOGV7.js} +1 -1
  21. package/public/{chunk-FPMCI7XZ.js → chunk-65TR3CWM.js} +1 -1
  22. package/public/{chunk-G4B4D3XR.js → chunk-6MRJ4C55.js} +1 -1
  23. package/public/{chunk-KPOCVRYH.js → chunk-7S37JBY2.js} +1 -1
  24. package/public/chunk-A5CYPNMD.js +2 -0
  25. package/public/chunk-BSAAN2EI.js +2 -0
  26. package/public/{chunk-2MAVQD65.js → chunk-CDPHRRZR.js} +1 -1
  27. package/public/{chunk-P4K222SI.js → chunk-D4DROTBC.js} +7 -7
  28. package/public/{chunk-PYBIMDD3.js → chunk-D4MWDRNW.js} +1 -1
  29. package/public/chunk-EPTIEPMQ.js +4 -0
  30. package/public/chunk-F5X5MWHG.js +0 -0
  31. package/public/{chunk-XE352AKG.js → chunk-I454VRMK.js} +1 -1
  32. package/public/chunk-IQG4DDQX.js +1 -0
  33. package/public/{chunk-VZ77T3BF.js → chunk-K5OOC3CF.js} +3 -3
  34. package/public/{chunk-IZAPOSYM.js → chunk-NOLKBYOV.js} +1 -1
  35. package/public/chunk-QOXZFV6P.js +47 -0
  36. package/public/{chunk-GMZROOAF.js → chunk-RMLGKVWE.js} +1 -1
  37. package/public/chunk-T6TC7KWG.js +1 -0
  38. package/public/{chunk-6NRGS3BZ.js → chunk-UHKP2PC3.js} +1 -1
  39. package/public/{chunk-I6UWIF55.js → chunk-UTCRLFYC.js} +1 -1
  40. package/public/{chunk-XFU5YJJP.js → chunk-VEJNBHWJ.js} +1 -1
  41. package/public/{chunk-F4VOQO2M.js → chunk-XLJT6YPP.js} +1 -1
  42. package/public/chunk-YCW2UBVQ.js +1 -0
  43. package/public/{chunk-ANRGX57I.js → chunk-YPUCOH35.js} +12 -12
  44. package/public/chunk-YVLZ2UAQ.js +2 -0
  45. package/public/{chunk-5MLB3PYZ.js → chunk-Z5MCM3TT.js} +10 -10
  46. package/public/{chunk-EJ4JM3HG.js → chunk-ZEV6YXHP.js} +1 -1
  47. package/public/{chunk-TIXQ3FAF.js → chunk-ZPCYFQPB.js} +1 -1
  48. package/public/index.html +1 -1
  49. package/public/main-7TSLA2U5.js +5 -0
  50. package/public/chunk-66OJ5PZF.js +0 -2
  51. package/public/chunk-GIZH6HIB.js +0 -2
  52. package/public/chunk-N3HCHSSE.js +0 -2
  53. package/public/chunk-S4OKR5KN.js +0 -1
  54. package/public/chunk-TARCFDF4.js +0 -4
  55. package/public/main-KP322K7A.js +0 -51
@@ -1,8 +1,8 @@
1
- import{a as be,b as We,c as Zo,d as jo,e as zo,f as Xt,g as Kt,h as Xo,i as Ko,j as Jo,k as $o}from"./chunk-FPMCI7XZ.js";import{b as Ho}from"./chunk-TARCFDF4.js";import{a as re,b as Re,c as ft}from"./chunk-I6UWIF55.js";import{a as No,b as Ro,c as Wo,d as gt,e as Uo,f as X,g as qo,h as Qo,k as Yo,m as Tt}from"./chunk-TIXQ3FAF.js";import{b as dt}from"./chunk-S4OKR5KN.js";import{a as Vo,b as Lo}from"./chunk-G4B4D3XR.js";import{B as V,C as le,D as z,E as he,b as to,g as co,h as xo,i as wo,j as Eo,k as me,l as Ae,n as Go,o as ue,p as pe,q as ge,r as Ve,s as ne,u as B,v as ut,w as Oo,x as pt,z as Bo}from"./chunk-XFU5YJJP.js";import{A as fe,B as Z,C as Po,D as Fo,E as Ne,F as zt,G as mt,H as O,J as At,K as j,L as W,a as zi,f as Ki,g as Ji,i as $i,j as eo,k as Ht,l as Q,n as Y,q as F,r as H,s as ko,t as Io,u as Zt,v as Do,w as ae,x as jt,y as ct,z as Le}from"./chunk-GIZH6HIB.js";import{b as go,f as fo,g as ho,h as _o,i as ci,j as vo,m as Mo,n as yo,o as So,s as To}from"./chunk-IZAPOSYM.js";import{$b as Pe,$d as ee,Ab as Ie,Bb as De,Bd as di,C as si,Cc as Wt,Cd as Qt,Dc as ji,E as ze,Ed as Yt,F as we,Fa as s,Fb as oe,Ga as ki,Gb as ot,Gd as ye,Hb as te,Hc as Ut,Hd as R,I as Ti,Ia as Ii,Ib as nt,Id as J,J as kt,Jb as at,Jc as Xi,K as Xe,Kb as l,La as Di,Lb as E,Mb as U,Md as Se,N as xi,Nb as lt,Oa as v,Oc as Oe,Od as Be,P as wi,Pa as tt,Pb as Vt,Qa as it,Qb as Lt,Ra as Pi,Rb as Nt,Sa as Fi,Ua as ke,Ud as mo,V as Ke,Va as Oi,Vb as Me,Vd as Ao,W as It,Wa as se,Wd as $,Xa as Pt,Xb as Mt,Xd as uo,Ya as Bi,Yb as yt,Yd as ce,Z as Ei,_d as po,a as xe,ab as K,ac as Fe,b as Ze,ba as Dt,bb as u,ca as Ee,cb as p,da as Je,db as k,dc as qi,ea as ve,eb as Ft,ec as Qi,ed as io,f as L,fb as S,fc as Rt,fd as oo,g as Gt,ga as A,gb as T,gd as no,ge as bo,hb as m,he as Co,i as ai,ia as Gi,ib as a,ic as Yi,j as Ct,ja as M,jb as n,jc as q,ka as y,kb as b,kc as h,l as yi,lb as Vi,ld as ao,mb as Li,na as $e,nd as lo,ob as Ni,oc as rt,pa as Ge,pb as Ri,pd as ro,q as li,qb as Wi,qc as N,qd as qt,ra as P,rb as I,sb as Ui,tb as _,u as ri,ua as et,vb as f,w as je,wa as He,wb as Ot,xb as Bt,xd as St,yb as _t,yc as Hi,yd as st,z as Si,zb as vt,zc as Zi,zd as so}from"./chunk-ANRGX57I.js";var hr=(()=>{class o{isChromeOnMac;static DEBUG=!1;static _instanceCounter=0;_instanceId;swipeMinDistance=h(30);swipeMaxDuration=h(600);longPressMs=h(500);doubleTapInterval=h(300);tapSlop=h(20);pressMoveSlop=h(10);_swipeMinDistance=30;_swipeMaxDuration=600;_longPressMs=500;_doubleTapInterval=300;_tapSlop=20;_pressMoveSlop=10;swipeleft=q();swiperight=q();swipeup=q();swipedown=q();press=q();doubletap=q();zone=A(Pt);destroyRef=A(Ge);host=A(He);pointerId=null;startX=0;startY=0;startTime=0;tracking=!1;longPressTimer=null;pressFired=!1;cancelLongpressHandlers=[];lastTapTime=0;lastTapX=0;lastTapY=0;currentPointerType=null;lastTapUpTime=0;lastTapUpX=0;lastTapUpY=0;potentialDoubleTap=!1;constructor(){this.isChromeOnMac=(()=>{let e=navigator.userAgent,i=navigator.platform;return/Chrome\//.test(e)&&/Mac/.test(i)&&!/Edg\//.test(e)&&!/OPR\//.test(e)})(),this._instanceId=++o._instanceCounter,this.debug("GestureDirective instance created",{instanceId:this._instanceId}),this.zone.runOutsideAngular(()=>{let e=this.host.nativeElement;e.style.touchAction||(e.style.touchAction="none","webkitTouchCallout"in e.style&&(e.style.webkitTouchCallout="none")),e.addEventListener("pointerdown",this.onPointerDown,{passive:!1}),e.addEventListener("pointermove",this.onPointerMove,{passive:!0}),e.addEventListener("pointerup",this.onPointerUp,{passive:!0}),e.addEventListener("pointercancel",this.onPointerCancel,{passive:!0}),e.addEventListener("lostpointercapture",this.onPointerCancel,{passive:!0}),e.addEventListener("dblclick",this.onNativeDblClick,{passive:!0}),this.destroyRef.onDestroy(()=>{e.removeEventListener("pointerdown",this.onPointerDown),e.removeEventListener("pointermove",this.onPointerMove),e.removeEventListener("pointerup",this.onPointerUp),e.removeEventListener("pointercancel",this.onPointerCancel),e.removeEventListener("lostpointercapture",this.onPointerCancel),e.removeEventListener("dblclick",this.onNativeDblClick),this.longPressTimer&&(window.clearTimeout(this.longPressTimer),this.longPressTimer=null),this.removeLongpressCancelListeners();try{this.pointerId!==null&&typeof e.releasePointerCapture=="function"&&e.releasePointerCapture(this.pointerId)}catch{}this.pointerId=null,this.tracking=!1})})}onNativeDblClick=e=>{let i=new CustomEvent("doubletap",{detail:{x:e.clientX,y:e.clientY,dt:0}});this.zone.run(()=>this.doubletap.emit(i)),this.lastTapTime=0};onPointerDown=e=>{if(this.debug("pointerdown",{x:e.clientX,y:e.clientY,pointerId:e.pointerId,pointerType:e.pointerType,sourceElement:e.target instanceof Element?e.target.outerHTML:String(e.target)}),this.pointerId!==null)return;switch(this.pointerId=e.pointerId,this.tracking=!0,this.pressFired=!1,this.currentPointerType=e.pointerType||null,e.pointerType){case"touch":this._swipeMinDistance=this.swipeMinDistance(),this._swipeMaxDuration=this.swipeMaxDuration(),this._longPressMs=this.longPressMs(),this._doubleTapInterval=this.doubleTapInterval(),this._tapSlop=this.tapSlop(),this._pressMoveSlop=this.pressMoveSlop();break;case"pen":this._swipeMinDistance=20,this._swipeMaxDuration=500,this._longPressMs=400,this._doubleTapInterval=250,this._tapSlop=10,this._pressMoveSlop=8;break;case"mouse":default:this._swipeMinDistance=15,this._swipeMaxDuration=400,this._longPressMs=350,this._doubleTapInterval=250,this._tapSlop=8,this._pressMoveSlop=6;break}let t=performance.now()-this.lastTapUpTime,r=Math.hypot(e.clientX-this.lastTapUpX,e.clientY-this.lastTapUpY);this.potentialDoubleTap=t<=this._doubleTapInterval&&r<=this._tapSlop,this.startX=e.clientX,this.startY=e.clientY,this.startTime=performance.now();try{e.target.setPointerCapture(e.pointerId)}catch{}this.longPressTimer&&(this.debug("longpress timer cleared on pointerdown"),window.clearTimeout(this.longPressTimer)),this.potentialDoubleTap||(this.addLongpressCancelListeners(),this.debug("longpress timer scheduled"),this.longPressTimer=window.setTimeout(()=>{if(this.debug("longpress timer fired",{tracking:this.tracking}),!this.tracking){this.debug("longpress cancelled: not tracking");return}let c=e.clientX-this.startX,g=e.clientY-this.startY;if(Math.abs(c)<=this._pressMoveSlop&&Math.abs(g)<=this._pressMoveSlop){this.debug("longpress recognized",{x:this.startX,y:this.startY}),this.pressFired=!0;let C=new CustomEvent("press",{detail:{x:this.startX,y:this.startY,center:{x:this.startX,y:this.startY}}});this.zone.run(()=>this.press.emit(C))}this.removeLongpressCancelListeners()},this._longPressMs))};onPointerMove=e=>{!this.tracking||e.pointerId!==this.pointerId||this.pressFired||this.longPressTimer&&(this.debug("longpress cancelled by pointermove"),window.clearTimeout(this.longPressTimer),this.longPressTimer=null,this.removeLongpressCancelListeners())};onPointerUp=e=>{if(this.debug("pointerup",{x:e.clientX,y:e.clientY,pointerId:e.pointerId}),!this.tracking||e.pointerId!==this.pointerId)return;let i=performance.now(),t=i-this.startTime,r=e.clientX-this.startX,c=e.clientY-this.startY,g=Math.abs(r),C=Math.abs(c);if(this.longPressTimer&&(this.debug("longpress cancelled by pointerup"),window.clearTimeout(this.longPressTimer),this.longPressTimer=null),this.pressFired){this.debug("pointerup after longpress: not resetting gesture state");return}if(t<=this._swipeMaxDuration&&(g>=this._swipeMinDistance&&g>=C?(this.debug("swipe detected",{direction:r>0?"right":"left",dx:r,dy:c,duration:t}),this.zone.run(()=>{r>0?this.swiperight.emit(new CustomEvent("swiperight",{detail:{dx:r,dy:c,duration:t}})):this.swipeleft.emit(new CustomEvent("swipeleft",{detail:{dx:r,dy:c,duration:t}}))})):C>=this._swipeMinDistance&&C>g&&(this.debug("swipe detected",{direction:c>0?"down":"up",dx:r,dy:c,duration:t}),this.zone.run(()=>{c>0?this.swipedown.emit(new CustomEvent("swipedown",{detail:{dx:r,dy:c,duration:t}})):this.swipeup.emit(new CustomEvent("swipeup",{detail:{dx:r,dy:c,duration:t}}))}))),this.currentPointerType!=="mouse"&&g<=this._tapSlop&&C<=this._tapSlop&&t<this._longPressMs){let w=i,x=w-this.lastTapTime,G=Math.hypot(e.clientX-this.lastTapX,e.clientY-this.lastTapY);x<=this._doubleTapInterval&&G<=this._tapSlop?(this.zone.run(()=>this.doubletap.emit(new CustomEvent("doubletap",{detail:{x:e.clientX,y:e.clientY,dt:x}}))),this.lastTapTime=0,this.potentialDoubleTap=!1):(this.lastTapTime=w,this.lastTapX=e.clientX,this.lastTapY=e.clientY)}!this.pressFired&&g<=this._tapSlop&&C<=this._tapSlop&&t<this._longPressMs?(this.lastTapUpTime=i,this.lastTapUpX=e.clientX,this.lastTapUpY=e.clientY):this.potentialDoubleTap=!1,this.reset()};onPointerCancel=e=>{let i=this.host.nativeElement;this.debug("pointercancel",{pointerId:e.pointerId,pointerType:e.pointerType,event:e,documentActiveElement:document.activeElement,elementIsConnected:i.isConnected,elementVisibility:i.offsetParent!==null,hasPointerCapture:typeof i.hasPointerCapture=="function"?i.hasPointerCapture(e.pointerId):void 0,documentHidden:document.hidden});let t=e;if(this.isChromeOnMac&&e.pointerType==="mouse"&&e.pointerId===this.pointerId&&typeof t.buttons=="number"&&t.buttons!==0){this.debug("pointercancel ignored on Chrome/macOS: mouse button still pressed");return}e.pointerId===this.pointerId&&(this.longPressTimer&&(this.debug("longpress cancelled by pointercancel"),window.clearTimeout(this.longPressTimer),this.longPressTimer=null,this.removeLongpressCancelListeners()),this.reset())};addLongpressCancelListeners(){this.debug("addLongpressCancelListeners");let e=c=>{this.debug("longpress cancelled by event",c?.type),this.longPressTimer&&(window.clearTimeout(this.longPressTimer),this.longPressTimer=null),this.removeLongpressCancelListeners()},i=this.host.nativeElement,t=document,r={capture:!0};this.cancelLongpressHandlers=[{type:"pointermove",handler:e,opts:r,targets:["el","doc"]},{type:"pointerleave",handler:e,opts:r,targets:["el","doc"]},{type:"pointerout",handler:e,opts:r,targets:["el","doc"]},{type:"lostpointercapture",handler:e,opts:r,targets:["el","doc"]},{type:"blur",handler:e,opts:r,targets:["window"]}];for(let c of this.cancelLongpressHandlers){let{type:g,handler:C,opts:w,targets:x}=c;x&&x.includes("el")&&i.addEventListener(g,C,w),x&&x.includes("doc")&&t.addEventListener(g,C,w),x&&x.includes("window")&&window.addEventListener(g,C,w)}}removeLongpressCancelListeners(){this.debug("removeLongpressCancelListeners");let e=this.host.nativeElement,i=document;for(let t of this.cancelLongpressHandlers){let{type:r,handler:c,opts:g,targets:C}=t;C&&C.includes("el")&&e.removeEventListener(r,c,g),C&&C.includes("doc")&&i.removeEventListener(r,c,g),C&&C.includes("window")&&window.removeEventListener(r,c,g)}this.cancelLongpressHandlers=[]}reset(){this.debug("reset gesture state");try{let e=this.host.nativeElement;this.pointerId!==null&&typeof e.releasePointerCapture=="function"&&e.releasePointerCapture(this.pointerId)}catch{}this.pointerId=null,this.tracking=!1,this.pressFired=!1,this.currentPointerType=null,this.removeLongpressCancelListeners()}debug(...e){this.constructor.DEBUG&&console.debug(`[GestureDirective][#${this._instanceId}]`,...e)}static \u0275fac=function(i){return new(i||o)};static \u0275dir=it({type:o,selectors:[["","kipGestures",""]],inputs:{swipeMinDistance:[1,"swipeMinDistance"],swipeMaxDuration:[1,"swipeMaxDuration"],longPressMs:[1,"longPressMs"],doubleTapInterval:[1,"doubleTapInterval"],tapSlop:[1,"tapSlop"],pressMoveSlop:[1,"pressMoveSlop"]},outputs:{swipeleft:"swipeleft",swiperight:"swiperight",swipeup:"swipeup",swipedown:"swipedown",press:"press",doubletap:"doubletap"}})}return o})();function Bn(o,d){o&1&&Wi(0)}var en=(()=>{class o{data=A(Ae);static \u0275fac=function(i){return new(i||o)};static \u0275cmp=v({type:o,selectors:[["dialog-frame"]],decls:8,vars:3,consts:[[1,"dialogue-header"],["mat-dialog-title",""],["mat-icon-button","",1,"dialog-close-icon",3,"mat-dialog-close"],[1,"dialog-content-padding"],[4,"ngComponentOutlet"]],template:function(i,t){i&1&&(a(0,"div",0)(1,"h6",1),l(2),n(),a(3,"button",2)(4,"mat-icon"),l(5,"close"),n()()(),a(6,"mat-dialog-content",3),ke(7,Bn,1,0,"ng-container",4),n()),i&2&&(s(2),E(t.data.title),s(),m("mat-dialog-close",!1),s(4),m("ngComponentOutlet",t.data.componentType))},dependencies:[R,ne,ue,pe,ge,ee,$,Zi],styles:[".dialogue-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:baseline}.dialog-close-icon[_ngcontent-%COMP%]{margin-right:15px}.mat-mdc-dialog-content[_ngcontent-%COMP%]{max-height:max-content}"]})}return o})();function Vn(o,d){if(o&1&&(a(0,"button",4),l(1),n()),o&2){let e=f();m("mat-dialog-close",!0),s(),E(e.data.confirmBtnText)}}var tn=(()=>{class o{data=A(Ae);static \u0275fac=function(i){return new(i||o)};static \u0275cmp=v({type:o,selectors:[["dialog-confirmation"]],decls:12,vars:6,consts:[[1,"dialogue-header"],["mat-dialog-title",""],["mat-icon-button","",1,"dialog-close-icon",3,"mat-dialog-close"],["align","end"],["mat-flat-button","",3,"mat-dialog-close"]],template:function(i,t){i&1&&(a(0,"div",0)(1,"h5",1),l(2),n(),a(3,"button",2)(4,"mat-icon"),l(5,"close"),n()()(),a(6,"mat-dialog-content"),l(7),n(),a(8,"mat-dialog-actions",3)(9,"button",4),l(10),n(),u(11,Vn,2,2,"button",4),n()),i&2&&(s(2),E(t.data.title),s(),m("mat-dialog-close",!1),s(4),U(" ",t.data.message,`
2
- `),s(2),m("mat-dialog-close",!1),s(),E(t.data.cancelBtnText),s(),p(t.data.confirmBtnText?11:-1))},dependencies:[R,ne,ue,pe,Ve,ge,ee,ce,$],styles:[".dialogue-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:baseline}.dialog-close-icon[_ngcontent-%COMP%]{margin-right:15px}.mat-mdc-dialog-content[_ngcontent-%COMP%]{max-height:max-content}"]})}return o})();function Ln(o,d){if(o&1&&(a(0,"button",9),l(1),n()),o&2){let e=f(),i=oe(1);m("disabled",!i.valid),s(),E(e.data.confirmBtnText)}}var on=(()=>{class o{dialogRef=A(me);data=A(Ae);saveName(){this.dialogRef.close(this.data)}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=v({type:o,selectors:[["dialog-name"]],decls:19,vars:6,consts:[["name","ngForm"],["name","name",3,"ngSubmit"],[1,"dialogue-header"],["mat-dialog-title",""],["mat-icon-button","",1,"dialog-close-icon",3,"mat-dialog-close"],[1,"field-margin"],["matInput","","type","text","id","name","placeholder","Name","name","name","required","","cdkFocusInitial","",3,"ngModelChange","ngModel"],["align","end"],["mat-flat-button","",3,"mat-dialog-close"],["mat-flat-button","","type","submit",3,"disabled"]],template:function(i,t){if(i&1){let r=I();a(0,"form",1,0),_("ngSubmit",function(){return M(r),y(t.saveName())}),a(2,"div",2)(3,"h5",3),l(4),n(),a(5,"button",4)(6,"mat-icon"),l(7,"close"),n()()(),a(8,"mat-dialog-content")(9,"mat-form-field",5)(10,"mat-label"),l(11,"Name"),n(),a(12,"input",6),Nt("ngModelChange",function(g){return M(r),Lt(t.data.name,g)||(t.data.name=g),y(g)}),n(),a(13,"mat-error"),l(14," A name is required "),n()()(),a(15,"mat-dialog-actions",7)(16,"button",8),l(17),n(),u(18,Ln,2,2,"button",9),n()()}i&2&&(s(4),E(t.data.title),s(),m("mat-dialog-close",!1),s(7),Vt("ngModel",t.data.name),s(4),m("mat-dialog-close",!1),s(),E(t.data.cancelBtnText),s(),p(t.data.confirmBtnText?18:-1))},dependencies:[ne,ue,pe,Ve,ge,J,R,le,V,B,ut,he,z,ee,ce,$,j,ct,Q,F,H,O,jt,Zt],styles:[".dialogue-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:baseline}.dialog-close-icon[_ngcontent-%COMP%]{margin-right:15px}.mat-mdc-dialog-content[_ngcontent-%COMP%]{max-height:max-content}.field-margin[_ngcontent-%COMP%]{margin-left:15px;margin-bottom:15px}"]})}return o})();function Nn(o,d){if(o&1&&(a(0,"mat-option",12),l(1),n()),o&2){let e=d.$implicit;m("value",Me(e.value)),s(),E(e.label)}}function Rn(o,d){if(o&1){let e=I();a(0,"button",21),_("click",function(){M(e);let t=f();return y(t.moveCtrlUp())}),a(1,"mat-icon"),l(2,"arrow_drop_up"),n()()}}function Wn(o,d){if(o&1){let e=I();a(0,"button",22),_("click",function(){M(e);let t=f();return y(t.moveCtrlDown())}),a(1,"mat-icon"),l(2,"arrow_drop_down"),n()()}}var nn=(()=>{class o{app=A(dt);ctrlFormGroup=h.required();controlIndex=h(void 0);arrayLength=h(void 0);deleteCtrl=q();moveUp=q();moveDown=q();colors=[];ngOnInit(){this.colors=this.app.configurableThemeColors}deleteControl(){let e={ctrlIndex:this.controlIndex(),pathID:this.ctrlFormGroup().get("pathID").value};this.deleteCtrl.emit(e)}moveCtrlUp(){this.moveUp.emit(this.controlIndex())}moveCtrlDown(){this.moveDown.emit(this.controlIndex())}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=v({type:o,selectors:[["boolean-control-config"]],inputs:{ctrlFormGroup:[1,"ctrlFormGroup"],controlIndex:[1,"controlIndex"],arrayLength:[1,"arrayLength"]},outputs:{deleteCtrl:"deleteCtrl",moveUp:"moveUp",moveDown:"moveDown"},decls:36,vars:3,consts:[[1,"ctrl-grid","rounded-card","rounded-card-color",3,"formGroup"],[1,"controls","flex-container"],[1,"flex-label"],[1,"full-width"],["matInput","","type","string","placeholder","Enter a display label...","formControlName","ctrlLabel"],[1,"flex-settings"],[1,"settings"],["placeholder","Select Type...","formControlName","type","name","type","required",""],["value","1"],["value","2"],["value","3"],["placeholder","Select Color...","formControlName","color","name","color","required",""],[3,"value"],[1,"flex-full-width"],["formControlName","isNumeric"],[1,"actions"],[1,"flex-actions"],[1,"btn-grid"],["mat-icon-button","","type","button","aria-label","Move control up in the list",1,"up"],["mat-icon-button","","type","button","aria-label","Move control down in the list",1,"down"],["mat-icon-button","","type","button","aria-label","Delete control",1,"delete",3,"click"],["mat-icon-button","","type","button","aria-label","Move control up in the list",1,"up",3,"click"],["mat-icon-button","","type","button","aria-label","Move control down in the list",1,"down",3,"click"]],template:function(i,t){i&1&&(a(0,"div",0)(1,"div",1)(2,"div",2)(3,"mat-form-field",3)(4,"mat-label"),l(5,"Label"),n(),b(6,"input",4),n()(),a(7,"div",5)(8,"mat-form-field",6)(9,"mat-label"),l(10,"Type"),n(),a(11,"mat-select",7)(12,"mat-option",8),l(13,"Toggle"),n(),a(14,"mat-option",9),l(15,"Push"),n(),a(16,"mat-option",10),l(17,"Indicator"),n()()()(),a(18,"div",5)(19,"mat-form-field",6)(20,"mat-label"),l(21,"Color"),n(),a(22,"mat-select",11),S(23,Nn,2,3,"mat-option",12,k),n()()(),a(25,"div",13)(26,"mat-checkbox",14),l(27," Use numeric path "),n()()(),a(28,"div",15)(29,"div",16)(30,"div",17),u(31,Rn,3,0,"button",18),u(32,Wn,3,0,"button",19),a(33,"button",20),_("click",function(){return t.deleteControl()}),a(34,"mat-icon"),l(35,"delete"),n()()()()()()),i&2&&(m("formGroup",t.ctrlFormGroup()),s(23),T(t.colors),s(8),p(t.controlIndex()!==0?31:-1),s(),p(t.controlIndex()!==t.arrayLength()-1?32:-1))},dependencies:[j,Q,F,H,O,W,Z,Ne,V,B,z,re,X,$,We,be,J,R],styles:['.ctrl-grid[_ngcontent-%COMP%]{display:grid;width:auto;height:auto;margin:0 0 10px;grid-template-columns:[col-start] calc(100% - 90px) [col1-end] 80px [col2-end];grid-template-areas:"controls actions";row-gap:0px;column-gap:10px;justify-items:center;align-items:center;justify-content:center;align-content:center;padding-top:20px}.controls[_ngcontent-%COMP%]{grid-area:controls;width:100%}.actions[_ngcontent-%COMP%]{grid-area:actions}.btn-grid[_ngcontent-%COMP%]{display:grid;width:80px;height:80px;margin:0;grid-template-columns:[col-start] 50% [col1-end] 50% [col2-end];grid-template-rows:[row-start] 50% [row1-end] 50% [row2-end];grid-template-areas:"up delete" "down delete";row-gap:0px;column-gap:0px;justify-items:center;align-items:center;justify-content:center;align-content:center}.up[_ngcontent-%COMP%]{grid-area:up}.down[_ngcontent-%COMP%]{grid-area:down}.delete[_ngcontent-%COMP%]{grid-area:delete}.flex-label[_ngcontent-%COMP%]{flex-grow:2;flex-shrink:2}.flex-settings[_ngcontent-%COMP%]{flex-grow:1;flex-shrink:1}.settings[_ngcontent-%COMP%]{min-width:100px}.flex-actions[_ngcontent-%COMP%]{flex-grow:0;flex-shrink:0}.flex-full-width[_ngcontent-%COMP%]{width:100%}']})}return o})();function Un(o,d){if(o&1){let e=I();a(0,"boolean-control-config",4),_("moveUp",function(t){M(e);let r=f();return y(r.moveUp(t))})("moveDown",function(t){M(e);let r=f();return y(r.moveDown(t))})("deleteCtrl",function(t){M(e);let r=f();return y(r.deletePath(t))}),n()}if(o&2){let e=d.$implicit,i=d.$index,t=f();m("ctrlFormGroup",t.getFormGroup(e))("controlIndex",i)("arrayLength",t.arrayLength)}}var an=(()=>{class o{fb=A(At);multiCtrlArray=h.required();addPath=q();updatePath=q();delPath=q();multiFormGroup=null;arrayLength=0;multiCtrlArraySubscription=null;ngOnInit(){this.arrayLength=this.multiCtrlArray().length,this.multiFormGroup=new ko({multiCtrlArray:this.multiCtrlArray()}),this.multiCtrlArraySubscription=this.multiCtrlArray().valueChanges.pipe(kt(350)).subscribe(e=>{this.updatePath.emit(e)})}addCtrlGroup(){let e=zi.create();this.multiCtrlArray().push(this.fb.group({ctrlLabel:[null,Y.required],type:["1",Y.required],pathID:[e],color:["contrast"],isNumeric:[!1],value:[null]})),this.arrayLength=this.multiCtrlArray().length;let i={path:{description:null,path:null,pathID:e,source:"default",pathType:"boolean",supportsPut:!0,isPathConfigurable:!0,showPathSkUnitsFilter:!1,pathSkUnitsFilter:null,convertUnitTo:null,sampleTime:500},ctrlType:1};this.addPath.emit(i)}moveUp(e){let i=this.multiCtrlArray().at(e);this.multiCtrlArray().removeAt(e,{emitEvent:!1}),this.multiCtrlArray().insert(e-1,i,{emitEvent:!1})}moveDown(e){let i=this.multiCtrlArray().at(e);this.multiCtrlArray().removeAt(e,{emitEvent:!1}),this.multiCtrlArray().insert(e+1,i,{emitEvent:!1})}deletePath(e){this.delPath.emit(e),this.arrayLength=this.multiCtrlArray().length}getFormGroup(e){return e}ngOnDestroy(){this.multiCtrlArraySubscription?.unsubscribe()}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=v({type:o,selectors:[["boolean-multicontrol-options"]],inputs:{multiCtrlArray:[1,"multiCtrlArray"]},outputs:{addPath:"addPath",updatePath:"updatePath",delPath:"delPath"},decls:7,vars:1,consts:[[3,"formGroup"],["formArrayName","multiCtrlArray"],[1,"full-width",3,"ctrlFormGroup","controlIndex","arrayLength"],["type","button","mat-mini-fab","","color","primary","aria-label","Add control down in the list",1,"add-btn",3,"click"],[1,"full-width",3,"moveUp","moveDown","deleteCtrl","ctrlFormGroup","controlIndex","arrayLength"]],template:function(i,t){i&1&&(a(0,"div",0)(1,"div",1),S(2,Un,1,3,"boolean-control-config",2,Ft),a(4,"button",3),_("click",function(){return t.addCtrlGroup()}),a(5,"mat-icon"),l(6,"add"),n()()()()),i&2&&(m("formGroup",t.multiFormGroup),s(2),T(t.multiCtrlArray().controls))},dependencies:[j,H,W,Z,Fo,nn,ee,po,J,R],styles:["[_nghost-%COMP%]{display:block;width:100%;height:100%;padding-top:15px;padding-bottom:15px}.add-btn[_ngcontent-%COMP%]{margin-left:calc(50% - 20px)}"]})}return o})();function qn(o,d){if(o&1&&(a(0,"mat-option",8),l(1),n()),o&2){let e=d.$implicit;m("value",Me(e.value)),s(),E(e.label)}}var ln=(()=>{class o{app=A(dt);displayName=h.required();showLabel=h.required();convertUnitTo=h.required();datasetUUID=h.required();datasetAverageArray=h.required();showAverageData=h.required();trackAgainstAverage=h.required();showDatasetMinimumValueLine=h.required();showDatasetMaximumValueLine=h.required();showDatasetAverageValueLine=h.required();showDatasetAngleAverageValueLine=h.required();verticalChart=h.required();inverseYAxis=h.required();showTimeScale=h.required();showYScale=h.required();startScaleAtZero=h.required();yScaleSuggestedMin=h.required();yScaleSuggestedMax=h.required();enableMinMaxScaleLimit=h.required();yScaleMin=h.required();yScaleMax=h.required();numDecimal=h.required();color=h.required();colors=[];ngOnInit(){this.colors=this.app.configurableThemeColors,this.showAverageData()&&!this.showAverageData()?.value&&this.trackAgainstAverage().disable(),this.enableMinMaxScaleLimit()&&this.setValueScaleOptionsControls(this.enableMinMaxScaleLimit().value)}setValueScaleOptionsControls(e){e?(this.yScaleMin()?.enable(),this.yScaleMax()?.enable(),this.yScaleSuggestedMin()?.disable(),this.yScaleSuggestedMax()?.disable()):(this.yScaleMin()?.disable(),this.yScaleMax()?.disable(),this.yScaleSuggestedMin()?.enable(),this.yScaleSuggestedMax()?.enable())}setScaleControls(e){this.setValueScaleOptionsControls(e.value)}enableTrackAgainstMovingAverage(e){e.checked?this.trackAgainstAverage().enable():(this.trackAgainstAverage().setValue(e.checked),this.trackAgainstAverage().disable())}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=v({type:o,selectors:[["config-display-chart-options"]],inputs:{displayName:[1,"displayName"],showLabel:[1,"showLabel"],convertUnitTo:[1,"convertUnitTo"],datasetUUID:[1,"datasetUUID"],datasetAverageArray:[1,"datasetAverageArray"],showAverageData:[1,"showAverageData"],trackAgainstAverage:[1,"trackAgainstAverage"],showDatasetMinimumValueLine:[1,"showDatasetMinimumValueLine"],showDatasetMaximumValueLine:[1,"showDatasetMaximumValueLine"],showDatasetAverageValueLine:[1,"showDatasetAverageValueLine"],showDatasetAngleAverageValueLine:[1,"showDatasetAngleAverageValueLine"],verticalChart:[1,"verticalChart"],inverseYAxis:[1,"inverseYAxis"],showTimeScale:[1,"showTimeScale"],showYScale:[1,"showYScale"],startScaleAtZero:[1,"startScaleAtZero"],yScaleSuggestedMin:[1,"yScaleSuggestedMin"],yScaleSuggestedMax:[1,"yScaleSuggestedMax"],enableMinMaxScaleLimit:[1,"enableMinMaxScaleLimit"],yScaleMin:[1,"yScaleMin"],yScaleMax:[1,"yScaleMax"],numDecimal:[1,"numDecimal"],color:[1,"color"]},decls:84,vars:20,consts:[["minLine",""],[1,"tab-content"],[1,"chart-flex-container"],[1,"chart-panel-group"],[1,"full-width"],["matInput","","placeholder","Enter a label to display","name","displayName",3,"formControl"],["name","showLabel",1,"full-width",3,"formControl"],["placeholder","Select Color...","name","color","required","",3,"formControl"],[3,"value"],[1,"flex-item-rounded-card","rounded-card-color"],[2,"margin-left","10px"],["matInput","","type","number","min","0","max","5","placeholder","Enter or select number...","name","numDecimal","required","",3,"formControl"],["name","showAverageData",1,"full-width",2,"margin-top","10px",3,"change","formControl"],["name","trackAgainstAverage",1,"full-width",2,"margin-left","25px",3,"formControl"],["name","verticalChart",3,"formControl"],[1,"no-margin"],[1,"mat-caption"],["aria-label","Select an option","name","enableMinMaxScaleLimit",1,"chart-option-radio-group",3,"formControl"],[1,"chart-option-radio-button",3,"change","value"],[1,"chart-option-radio-button-config"],[1,"chart-option-radio-button-config-form-field"],["matInput","","type","number","name","yScaleSuggestedMin",3,"formControl"],["matInput","","type","number","name","yScaleSuggestedMax",3,"formControl"],[1,"chart-option-radio-button-config-item"],["matInput","","type","number","name","yScaleMin","required","",3,"formControl"],["matInput","","type","number","name","yScaleMax","required","",3,"formControl"],["name","showYScale",1,"full-width",3,"formControl"],["name","inverseYAxis",3,"formControl"],["name","showTimeScale",1,"full-width",3,"formControl"],["name","showDatasetMaximumValueLine",1,"full-width",3,"formControl"],["name","showDatasetAverageValueLine",1,"full-width",3,"formControl"],["name","showDatasetMinimumValueLine",1,"full-width",3,"formControl"]],template:function(i,t){if(i&1){let r=I();a(0,"div",1)(1,"div",2)(2,"div",3)(3,"mat-form-field",4)(4,"mat-label"),l(5,"Widget Label"),n(),b(6,"input",5),n()(),a(7,"div",3)(8,"mat-checkbox",6),l(9," Show Label "),n()()(),a(10,"div",2)(11,"mat-form-field",4)(12,"mat-label"),l(13,"Color"),n(),a(14,"mat-select",7),S(15,qn,2,3,"mat-option",8,k),n()()(),a(17,"div",2)(18,"div",9)(19,"div")(20,"p"),l(21,"Series"),n(),a(22,"mat-form-field",10)(23,"mat-label"),l(24,"Value Decimal Places"),n(),b(25,"input",11),n(),a(26,"mat-checkbox",12),_("change",function(g){return M(r),y(t.enableTrackAgainstMovingAverage(g))}),l(27," Display Moving Average "),n(),a(28,"mat-checkbox",13),l(29," Track Against Moving Average "),n()(),a(30,"mat-checkbox",14),l(31," Vertical Data Graph "),n()(),a(32,"div",9)(33,"div")(34,"p",15),l(35,"Data Scale"),n(),a(36,"span",16),l(37,"(Default node is automatic scale)"),n(),a(38,"mat-radio-group",17)(39,"mat-radio-button",18),_("change",function(g){return M(r),y(t.setScaleControls(g))}),l(40,"Auto Scale"),n(),a(41,"div",19)(42,"mat-form-field",20)(43,"mat-label"),l(44,"Suggested Min"),n(),b(45,"input",21),n(),a(46,"mat-form-field",20)(47,"mat-label"),l(48,"Suggested Max"),n(),b(49,"input",22),n()(),a(50,"mat-radio-button",18),_("change",function(g){return M(r),y(t.setScaleControls(g))}),l(51," Fixed Scale "),n(),a(52,"div",19)(53,"div",23)(54,"mat-form-field",20)(55,"mat-label"),l(56,"Min"),n(),b(57,"input",24),n()(),a(58,"div",23)(59,"mat-form-field",20)(60,"mat-label"),l(61,"Max"),n(),b(62,"input",25),n()()()(),a(63,"mat-checkbox",26),l(64," Show Scale Ticks "),n(),a(65,"mat-checkbox",27),l(66," Inverse Scale "),n()()(),a(67,"div",9)(68,"div")(69,"p",15),l(70,"Time Scale"),n(),a(71,"mat-checkbox",28),l(72," Show Scale Ticks "),n()()(),a(73,"div",9)(74,"div")(75,"p",15),l(76,"Dataset"),n(),a(77,"mat-checkbox",29),l(78," Show Maximum Line "),n(),a(79,"mat-checkbox",30),l(80," Show Average Line "),n(),a(81,"mat-checkbox",31,0),l(83," Show Minimum Line "),n()()()()()}i&2&&(s(6),m("formControl",t.displayName()),s(2),m("formControl",t.showLabel()),s(6),m("formControl",t.color()),s(),T(t.colors),s(10),m("formControl",t.numDecimal()),s(),m("formControl",t.showAverageData()),s(2),m("formControl",t.trackAgainstAverage()),s(2),m("formControl",t.verticalChart()),s(8),m("formControl",t.enableMinMaxScaleLimit()),s(),m("value",!1),s(6),m("formControl",t.yScaleSuggestedMin()),s(4),m("formControl",t.yScaleSuggestedMax()),s(),m("value",!0),s(7),m("formControl",t.yScaleMin()),s(5),m("formControl",t.yScaleMax()),s(),m("formControl",t.showYScale()),s(2),m("formControl",t.inverseYAxis()),s(6),m("formControl",t.showTimeScale()),s(6),m("formControl",t.showDatasetMaximumValueLine()),s(2),m("formControl",t.showDatasetAverageValueLine()),s(2),m("formControl",t.showDatasetMinimumValueLine()))},dependencies:[Ho,le,V,B,We,be,Re,re,X,Tt,he,z,zo,Zo,jo,W,Q,Le,F,O,mt,zt,fe],styles:[".chart-flex-container[_ngcontent-%COMP%]{display:flex;flex-direction:row;flex-wrap:wrap;margin:15px 0;gap:15px;align-items:stretch}.chart-panel-group[_ngcontent-%COMP%]{min-width:250px;flex-grow:1}.no-margin[_ngcontent-%COMP%]{margin:0}.chart-option-radio-group[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:0;align-items:flex-start}.chart-option-radio-button[_ngcontent-%COMP%]{margin:0}.chart-option-radio-button-config[_ngcontent-%COMP%]{margin-left:35px;display:flex;flex-direction:row;flex-wrap:wrap;gap:10px;align-items:flex-start}.chart-option-radio-button-config-item[_ngcontent-%COMP%]{flex-grow:0;flex-shrink:1;min-width:50px}.chart-option-radio-button-config-form-field[_ngcontent-%COMP%]{display:block;max-width:118px}"]})}return o})();var Qn=(o,d)=>d.uuid;function Yn(o,d){if(o&1&&(a(0,"mat-option",4),l(1),n()),o&2){let e=d.$implicit;m("value",e.uuid),s(),U(" ",e.label," ")}}function Hn(o,d){if(o&1&&(a(0,"mat-option",4),l(1),n()),o&2){let e=d.$implicit;m("value",e.measure),s(),U(" ",e.description," ")}}function Zn(o,d){if(o&1&&(a(0,"mat-optgroup",6),S(1,Hn,2,2,"mat-option",4,k),n()),o&2){let e=d.$implicit;m("label",e.group),s(),T(e.units)}}var rn=(()=>{class o{datasetService=A(Xt);units=A(ft);datasetUUID=h.required();convertUnitTo=h.required();availableDataSets=[];unitList={};ngOnInit(){this.availableDataSets=this.datasetService.list().filter(i=>i.editable!==!1).sort();let e=this.datasetUUID();e.value&&this.setPathUnits(e.value)}setPathUnits(e){let i=this.datasetService.getDatasetConfig(e);return e&&i?(this.unitList=this.units.getConversionsForPath(i.path),this.convertUnitTo()?.enable(),!0):(this.unitList=this.units.getConversionsForPath(""),this.convertUnitTo()?.disable(),!1)}datasetChanged(e){this.setPathUnits(e.value)}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=v({type:o,selectors:[["config-dataset-chart-options"]],inputs:{datasetUUID:[1,"datasetUUID"],convertUnitTo:[1,"convertUnitTo"]},decls:14,vars:2,consts:[[1,"display-content","tab-content"],[1,"widget-options-grid"],[1,"options-grid-span2"],["placeholder","Select dataset...","name","datasetUUID","required","",3,"selectionChange","formControl"],[3,"value"],["placeholder","Select unit...","name","convertUnitTo","required","",3,"formControl"],[3,"label"]],template:function(i,t){i&1&&(a(0,"div",0)(1,"div",1)(2,"mat-form-field",2)(3,"mat-label"),l(4,"Dataset"),n(),a(5,"mat-select",3),_("selectionChange",function(c){return t.datasetChanged(c)}),S(6,Yn,2,2,"mat-option",4,Qn),n()(),a(8,"mat-form-field",2)(9,"mat-label"),l(10,"Display Format"),n(),a(11,"mat-select",5),S(12,Zn,3,1,"mat-optgroup",6,k),n()()()()),i&2&&(s(5),m("formControl",t.datasetUUID()),s(),T(t.availableDataSets),s(5),m("formControl",t.convertUnitTo()),s(),T(t.unitList.conversions))},dependencies:[le,V,B,Re,re,X,gt,W,F,O,fe],styles:[".display-content[_ngcontent-%COMP%]{display:block;height:100%;width:100%;padding-top:15px;padding-bottom:10px}"]})}return o})();var sn=(()=>{class o{transform(e){return Object.keys(e)}static \u0275fac=function(i){return new(i||o)};static \u0275pipe=Pi({name:"objectKeys",type:o,pure:!0})}return o})();var zn=["panel"],Xn=["*"];function Kn(o,d){if(o&1&&(Vi(0,"div",1,0),Bt(2),Li()),o&2){let e=d.id,i=f();at(i._classList),te("mat-mdc-autocomplete-visible",i.showPanel)("mat-mdc-autocomplete-hidden",!i.showPanel)("mat-autocomplete-panel-animations-enabled",!i._animationsDisabled)("mat-primary",i._color==="primary")("mat-accent",i._color==="accent")("mat-warn",i._color==="warn"),Ui("id",i.id),K("aria-label",i.ariaLabel||null)("aria-labelledby",i._getPanelAriaLabelledby(e))}}var pi=class{source;option;constructor(d,e){this.source=d,this.option=e}},mn=new ve("mat-autocomplete-default-options",{providedIn:"root",factory:Jn});function Jn(){return{autoActiveFirstOption:!1,autoSelectActiveOption:!1,hideSingleSelectionIndicator:!1,requireSelection:!1,hasBackdrop:!1}}var ti=(()=>{class o{_changeDetectorRef=A(rt);_elementRef=A(He);_defaults=A(mn);_animationsDisabled=Be();_activeOptionChanges=Gt.EMPTY;_keyManager;showPanel=!1;get isOpen(){return this._isOpen&&this.showPanel}_isOpen=!1;_latestOpeningTrigger;_setColor(e){this._color=e,this._changeDetectorRef.markForCheck()}_color;template;panel;options;optionGroups;ariaLabel;ariaLabelledby;displayWith=null;autoActiveFirstOption;autoSelectActiveOption;requireSelection;panelWidth;disableRipple;optionSelected=new se;opened=new se;closed=new se;optionActivated=new se;set classList(e){this._classList=e,this._elementRef.nativeElement.className=""}_classList;get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=e,this._syncParentProperties()}_hideSingleSelectionIndicator;_syncParentProperties(){if(this.options)for(let e of this.options)e._changeDetectorRef.markForCheck()}id=A(St).getId("mat-autocomplete-");inertGroups;constructor(){let e=A(no);this.inertGroups=e?.SAFARI||!1,this.autoActiveFirstOption=!!this._defaults.autoActiveFirstOption,this.autoSelectActiveOption=!!this._defaults.autoSelectActiveOption,this.requireSelection=!!this._defaults.requireSelection,this._hideSingleSelectionIndicator=this._defaults.hideSingleSelectionIndicator??!1}ngAfterContentInit(){this._keyManager=new so(this.options).withWrap().skipPredicate(this._skipPredicate),this._activeOptionChanges=this._keyManager.change.subscribe(e=>{this.isOpen&&this.optionActivated.emit({source:this,option:this.options.toArray()[e]||null})}),this._setVisibility()}ngOnDestroy(){this._keyManager?.destroy(),this._activeOptionChanges.unsubscribe()}_setScrollTop(e){this.panel&&(this.panel.nativeElement.scrollTop=e)}_getScrollTop(){return this.panel?this.panel.nativeElement.scrollTop:0}_setVisibility(){this.showPanel=!!this.options?.length,this._changeDetectorRef.markForCheck()}_emitSelectEvent(e){let i=new pi(this,e);this.optionSelected.emit(i)}_getPanelAriaLabelledby(e){if(this.ariaLabel)return null;let i=e?e+" ":"";return this.ariaLabelledby?i+this.ariaLabelledby:e}_skipPredicate(){return!1}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=v({type:o,selectors:[["mat-autocomplete"]],contentQueries:function(i,t,r){if(i&1&&(_t(r,X,5),_t(r,Wo,5)),i&2){let c;Ie(c=De())&&(t.options=c),Ie(c=De())&&(t.optionGroups=c)}},viewQuery:function(i,t){if(i&1&&(vt(ki,7),vt(zn,5)),i&2){let r;Ie(r=De())&&(t.template=r.first),Ie(r=De())&&(t.panel=r.first)}},hostAttrs:[1,"mat-mdc-autocomplete"],inputs:{ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],displayWith:"displayWith",autoActiveFirstOption:[2,"autoActiveFirstOption","autoActiveFirstOption",N],autoSelectActiveOption:[2,"autoSelectActiveOption","autoSelectActiveOption",N],requireSelection:[2,"requireSelection","requireSelection",N],panelWidth:"panelWidth",disableRipple:[2,"disableRipple","disableRipple",N],classList:[0,"class","classList"],hideSingleSelectionIndicator:[2,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",N]},outputs:{optionSelected:"optionSelected",opened:"opened",closed:"closed",optionActivated:"optionActivated"},exportAs:["matAutocomplete"],features:[Mt([{provide:Ro,useExisting:o}])],ngContentSelectors:Xn,decls:1,vars:0,consts:[["panel",""],["role","listbox",1,"mat-mdc-autocomplete-panel","mdc-menu-surface","mdc-menu-surface--open",3,"id"]],template:function(i,t){i&1&&(Ot(),Oi(0,Kn,3,17,"ng-template"))},styles:[`div.mat-mdc-autocomplete-panel{width:100%;max-height:256px;visibility:hidden;transform-origin:center top;overflow:auto;padding:8px 0;box-sizing:border-box;position:relative;border-radius:var(--mat-autocomplete-container-shape, var(--mat-sys-corner-extra-small));box-shadow:var(--mat-autocomplete-container-elevation-shadow, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12));background-color:var(--mat-autocomplete-background-color, var(--mat-sys-surface-container))}@media(forced-colors: active){div.mat-mdc-autocomplete-panel{outline:solid 1px}}.cdk-overlay-pane:not(.mat-mdc-autocomplete-panel-above) div.mat-mdc-autocomplete-panel{border-top-left-radius:0;border-top-right-radius:0}.mat-mdc-autocomplete-panel-above div.mat-mdc-autocomplete-panel{border-bottom-left-radius:0;border-bottom-right-radius:0;transform-origin:center bottom}div.mat-mdc-autocomplete-panel.mat-mdc-autocomplete-visible{visibility:visible}div.mat-mdc-autocomplete-panel.mat-mdc-autocomplete-hidden{visibility:hidden;pointer-events:none}@keyframes _mat-autocomplete-enter{from{opacity:0;transform:scaleY(0.8)}to{opacity:1;transform:none}}.mat-autocomplete-panel-animations-enabled{animation:_mat-autocomplete-enter 120ms cubic-bezier(0, 0, 0.2, 1)}mat-autocomplete{display:none}
3
- `],encapsulation:2,changeDetection:0})}return o})();var $n={provide:Ht,useExisting:Dt(()=>wt),multi:!0};var An=new ve("mat-autocomplete-scroll-strategy",{providedIn:"root",factory:()=>{let o=A($e);return()=>ci(o)}});function ea(o){let d=A($e);return()=>ci(d)}var ta={provide:An,deps:[],useFactory:ea},wt=(()=>{class o{_environmentInjector=A(Gi);_element=A(He);_injector=A($e);_viewContainerRef=A(Di);_zone=A(Pt);_changeDetectorRef=A(rt);_dir=A(Yt,{optional:!0});_formField=A(Bo,{optional:!0,host:!0});_viewportRuler=A(bo);_scrollStrategy=A(An);_renderer=A(Ii);_animationsDisabled=Be();_defaults=A(mn,{optional:!0});_overlayRef;_portal;_componentDestroyed=!1;_initialized=new Ct;_keydownSubscription;_outsideClickSubscription;_cleanupWindowBlur;_previousValue;_valueOnAttach;_valueOnLastKeydown;_positionStrategy;_manuallyFloatingLabel=!1;_closingActionsSubscription;_viewportSubscription=Gt.EMPTY;_breakpointObserver=A(qt);_handsetLandscapeSubscription=Gt.EMPTY;_canOpenOnNextFocus=!0;_valueBeforeAutoSelection;_pendingAutoselectedOption;_closeKeyEventStream=new Ct;_overlayPanelClass=ro(this._defaults?.overlayPanelClass||[]);_windowBlurHandler=()=>{this._canOpenOnNextFocus=this.panelOpen||!this._hasFocus()};_onChange=()=>{};_onTouched=()=>{};autocomplete;position="auto";connectedTo;autocompleteAttribute="off";autocompleteDisabled;constructor(){}_aboveClass="mat-mdc-autocomplete-panel-above";ngAfterViewInit(){this._initialized.next(),this._initialized.complete(),this._cleanupWindowBlur=this._renderer.listen("window","blur",this._windowBlurHandler)}ngOnChanges(e){e.position&&this._positionStrategy&&(this._setStrategyPositions(this._positionStrategy),this.panelOpen&&this._overlayRef.updatePosition())}ngOnDestroy(){this._cleanupWindowBlur?.(),this._handsetLandscapeSubscription.unsubscribe(),this._viewportSubscription.unsubscribe(),this._componentDestroyed=!0,this._destroyPanel(),this._closeKeyEventStream.complete(),this._clearFromModal()}get panelOpen(){return this._overlayAttached&&this.autocomplete.showPanel}_overlayAttached=!1;openPanel(){this._openPanelInternal()}closePanel(){this._resetLabel(),this._overlayAttached&&(this.panelOpen&&this._zone.run(()=>{this.autocomplete.closed.emit()}),this.autocomplete._latestOpeningTrigger===this&&(this.autocomplete._isOpen=!1,this.autocomplete._latestOpeningTrigger=null),this._overlayAttached=!1,this._pendingAutoselectedOption=null,this._overlayRef&&this._overlayRef.hasAttached()&&(this._overlayRef.detach(),this._closingActionsSubscription.unsubscribe()),this._updatePanelState(),this._componentDestroyed||this._changeDetectorRef.detectChanges(),this._trackedModal&&Qt(this._trackedModal,"aria-owns",this.autocomplete.id))}updatePosition(){this._overlayAttached&&this._overlayRef.updatePosition()}get panelClosingActions(){return ze(this.optionSelections,this.autocomplete._keyManager.tabOut.pipe(we(()=>this._overlayAttached)),this._closeKeyEventStream,this._getOutsideClickStream(),this._overlayRef?this._overlayRef.detachments().pipe(we(()=>this._overlayAttached)):li()).pipe(je(e=>e instanceof Uo?e:null))}optionSelections=Si(()=>{let e=this.autocomplete?this.autocomplete.options:null;return e?e.changes.pipe(Ke(e),It(()=>ze(...e.map(i=>i.onSelectionChange)))):this._initialized.pipe(It(()=>this.optionSelections))});get activeOption(){return this.autocomplete&&this.autocomplete._keyManager?this.autocomplete._keyManager.activeItem:null}_getOutsideClickStream(){return new ai(e=>{let i=r=>{let c=oo(r),g=this._formField?this._formField.getConnectedOverlayOrigin().nativeElement:null,C=this.connectedTo?this.connectedTo.elementRef.nativeElement:null;this._overlayAttached&&c!==this._element.nativeElement&&!this._hasFocus()&&(!g||!g.contains(c))&&(!C||!C.contains(c))&&this._overlayRef&&!this._overlayRef.overlayElement.contains(c)&&e.next(r)},t=[this._renderer.listen("document","click",i),this._renderer.listen("document","auxclick",i),this._renderer.listen("document","touchend",i)];return()=>{t.forEach(r=>r())}})}writeValue(e){Promise.resolve(null).then(()=>this._assignOptionValue(e))}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this._element.nativeElement.disabled=e}_handleKeydown(e){let i=e,t=i.keyCode,r=st(i);if(t===27&&!r&&i.preventDefault(),this._valueOnLastKeydown=this._element.nativeElement.value,this.activeOption&&t===13&&this.panelOpen&&!r)this.activeOption._selectViaInteraction(),this._resetActiveItem(),i.preventDefault();else if(this.autocomplete){let c=this.autocomplete._keyManager.activeItem,g=t===38||t===40;t===9||g&&!r&&this.panelOpen?this.autocomplete._keyManager.onKeydown(i):g&&this._canOpen()&&this._openPanelInternal(this._valueOnLastKeydown),(g||this.autocomplete._keyManager.activeItem!==c)&&(this._scrollToOption(this.autocomplete._keyManager.activeItemIndex||0),this.autocomplete.autoSelectActiveOption&&this.activeOption&&(this._pendingAutoselectedOption||(this._valueBeforeAutoSelection=this._valueOnLastKeydown),this._pendingAutoselectedOption=this.activeOption,this._assignOptionValue(this.activeOption.value)))}}_handleInput(e){let i=e.target,t=i.value;if(i.type==="number"&&(t=t==""?null:parseFloat(t)),this._previousValue!==t){if(this._previousValue=t,this._pendingAutoselectedOption=null,(!this.autocomplete||!this.autocomplete.requireSelection)&&this._onChange(t),!t)this._clearPreviousSelectedOption(null,!1);else if(this.panelOpen&&!this.autocomplete.requireSelection){let r=this.autocomplete.options?.find(c=>c.selected);if(r){let c=this._getDisplayValue(r.value);t!==c&&r.deselect(!1)}}if(this._canOpen()&&this._hasFocus()){let r=this._valueOnLastKeydown??this._element.nativeElement.value;this._valueOnLastKeydown=null,this._openPanelInternal(r)}}}_handleFocus(){this._canOpenOnNextFocus?this._canOpen()&&(this._previousValue=this._element.nativeElement.value,this._attachOverlay(this._previousValue),this._floatLabel(!0)):this._canOpenOnNextFocus=!0}_handleClick(){this._canOpen()&&!this.panelOpen&&this._openPanelInternal()}_hasFocus(){return io()===this._element.nativeElement}_floatLabel(e=!1){this._formField&&this._formField.floatLabel==="auto"&&(e?this._formField._animateAndLockLabel():this._formField.floatLabel="always",this._manuallyFloatingLabel=!0)}_resetLabel(){this._manuallyFloatingLabel&&(this._formField&&(this._formField.floatLabel="auto"),this._manuallyFloatingLabel=!1)}_subscribeToClosingActions(){let e=new ai(t=>{Bi(()=>{t.next()},{injector:this._environmentInjector})}),i=this.autocomplete.options?.changes.pipe(Ei(()=>this._positionStrategy.reapplyLastPosition()),xi(0))??li();return ze(e,i).pipe(It(()=>this._zone.run(()=>{let t=this.panelOpen;return this._resetActiveItem(),this._updatePanelState(),this._changeDetectorRef.detectChanges(),this.panelOpen&&this._overlayRef.updatePosition(),t!==this.panelOpen&&(this.panelOpen?this._emitOpened():this.autocomplete.closed.emit()),this.panelClosingActions})),Xe(1)).subscribe(t=>this._setValueAndClose(t))}_emitOpened(){this.autocomplete.opened.emit()}_destroyPanel(){this._overlayRef&&(this.closePanel(),this._overlayRef.dispose(),this._overlayRef=null)}_getDisplayValue(e){let i=this.autocomplete;return i&&i.displayWith?i.displayWith(e):e}_assignOptionValue(e){let i=this._getDisplayValue(e);e==null&&this._clearPreviousSelectedOption(null,!1),this._updateNativeInputValue(i??"")}_updateNativeInputValue(e){this._formField?this._formField._control.value=e:this._element.nativeElement.value=e,this._previousValue=e}_setValueAndClose(e){let i=this.autocomplete,t=e?e.source:this._pendingAutoselectedOption;t?(this._clearPreviousSelectedOption(t),this._assignOptionValue(t.value),this._onChange(t.value),i._emitSelectEvent(t),this._element.nativeElement.focus()):i.requireSelection&&this._element.nativeElement.value!==this._valueOnAttach&&(this._clearPreviousSelectedOption(null),this._assignOptionValue(null),this._onChange(null)),this.closePanel()}_clearPreviousSelectedOption(e,i){this.autocomplete?.options?.forEach(t=>{t!==e&&t.selected&&t.deselect(i)})}_openPanelInternal(e=this._element.nativeElement.value){if(this._attachOverlay(e),this._floatLabel(),this._trackedModal){let i=this.autocomplete.id;di(this._trackedModal,"aria-owns",i)}}_attachOverlay(e){this.autocomplete;let i=this._overlayRef;i?(this._positionStrategy.setOrigin(this._getConnectedElement()),i.updateSize({width:this._getPanelWidth()})):(this._portal=new go(this.autocomplete.template,this._viewContainerRef,{id:this._formField?.getLabelId()}),i=So(this._injector,this._getOverlayConfig()),this._overlayRef=i,this._viewportSubscription=this._viewportRuler.change().subscribe(()=>{this.panelOpen&&i&&i.updateSize({width:this._getPanelWidth()})}),this._handsetLandscapeSubscription=this._breakpointObserver.observe(Se.HandsetLandscape).subscribe(r=>{r.matches?this._positionStrategy.withFlexibleDimensions(!0).withGrowAfterOpen(!0).withViewportMargin(8):this._positionStrategy.withFlexibleDimensions(!1).withGrowAfterOpen(!1).withViewportMargin(0)})),i&&!i.hasAttached()&&(i.attach(this._portal),this._valueOnAttach=e,this._valueOnLastKeydown=null,this._closingActionsSubscription=this._subscribeToClosingActions());let t=this.panelOpen;this.autocomplete._isOpen=this._overlayAttached=!0,this.autocomplete._latestOpeningTrigger=this,this.autocomplete._setColor(this._formField?.color),this._updatePanelState(),this._applyModalPanelOwnership(),this.panelOpen&&t!==this.panelOpen&&this._emitOpened()}_handlePanelKeydown=e=>{(e.keyCode===27&&!st(e)||e.keyCode===38&&st(e,"altKey"))&&(this._pendingAutoselectedOption&&(this._updateNativeInputValue(this._valueBeforeAutoSelection??""),this._pendingAutoselectedOption=null),this._closeKeyEventStream.next(),this._resetActiveItem(),e.stopPropagation(),e.preventDefault())};_updatePanelState(){if(this.autocomplete._setVisibility(),this.panelOpen){let e=this._overlayRef;this._keydownSubscription||(this._keydownSubscription=e.keydownEvents().subscribe(this._handlePanelKeydown)),this._outsideClickSubscription||(this._outsideClickSubscription=e.outsidePointerEvents().subscribe())}else this._keydownSubscription?.unsubscribe(),this._outsideClickSubscription?.unsubscribe(),this._keydownSubscription=this._outsideClickSubscription=null}_getOverlayConfig(){return new vo({positionStrategy:this._getOverlayPosition(),scrollStrategy:this._scrollStrategy(),width:this._getPanelWidth(),direction:this._dir??void 0,hasBackdrop:this._defaults?.hasBackdrop,backdropClass:this._defaults?.backdropClass||"cdk-overlay-transparent-backdrop",panelClass:this._overlayPanelClass,disableAnimations:this._animationsDisabled})}_getOverlayPosition(){let e=Mo(this._injector,this._getConnectedElement()).withFlexibleDimensions(!1).withPush(!1);return this._setStrategyPositions(e),this._positionStrategy=e,e}_setStrategyPositions(e){let i=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],t=this._aboveClass,r=[{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:t},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",panelClass:t}],c;this.position==="above"?c=r:this.position==="below"?c=i:c=[...i,...r],e.withPositions(c)}_getConnectedElement(){return this.connectedTo?this.connectedTo.elementRef:this._formField?this._formField.getConnectedOverlayOrigin():this._element}_getPanelWidth(){return this.autocomplete.panelWidth||this._getHostWidth()}_getHostWidth(){return this._getConnectedElement().nativeElement.getBoundingClientRect().width}_resetActiveItem(){let e=this.autocomplete;if(e.autoActiveFirstOption){let i=-1;for(let t=0;t<e.options.length;t++)if(!e.options.get(t).disabled){i=t;break}e._keyManager.setActiveItem(i)}else e._keyManager.setActiveItem(-1)}_canOpen(){let e=this._element.nativeElement;return!e.readOnly&&!e.disabled&&!this.autocompleteDisabled}_scrollToOption(e){let i=this.autocomplete,t=qo(e,i.options,i.optionGroups);if(e===0&&t===1)i._setScrollTop(0);else if(i.panel){let r=i.options.toArray()[e];if(r){let c=r._getHostElement(),g=Qo(c.offsetTop,c.offsetHeight,i._getScrollTop(),i.panel.nativeElement.offsetHeight);i._setScrollTop(g)}}}_trackedModal=null;_applyModalPanelOwnership(){let e=this._element.nativeElement.closest('body > .cdk-overlay-container [aria-modal="true"]');if(!e)return;let i=this.autocomplete.id;this._trackedModal&&Qt(this._trackedModal,"aria-owns",i),di(e,"aria-owns",i),this._trackedModal=e}_clearFromModal(){if(this._trackedModal){let e=this.autocomplete.id;Qt(this._trackedModal,"aria-owns",e),this._trackedModal=null}}static \u0275fac=function(i){return new(i||o)};static \u0275dir=it({type:o,selectors:[["input","matAutocomplete",""],["textarea","matAutocomplete",""]],hostAttrs:[1,"mat-mdc-autocomplete-trigger"],hostVars:7,hostBindings:function(i,t){i&1&&_("focusin",function(){return t._handleFocus()})("blur",function(){return t._onTouched()})("input",function(c){return t._handleInput(c)})("keydown",function(c){return t._handleKeydown(c)})("click",function(){return t._handleClick()}),i&2&&K("autocomplete",t.autocompleteAttribute)("role",t.autocompleteDisabled?null:"combobox")("aria-autocomplete",t.autocompleteDisabled?null:"list")("aria-activedescendant",t.panelOpen&&t.activeOption?t.activeOption.id:null)("aria-expanded",t.autocompleteDisabled?null:t.panelOpen.toString())("aria-controls",t.autocompleteDisabled||!t.panelOpen||t.autocomplete==null?null:t.autocomplete.id)("aria-haspopup",t.autocompleteDisabled?null:"listbox")},inputs:{autocomplete:[0,"matAutocomplete","autocomplete"],position:[0,"matAutocompletePosition","position"],connectedTo:[0,"matAutocompleteConnectedTo","connectedTo"],autocompleteAttribute:[0,"autocomplete","autocompleteAttribute"],autocompleteDisabled:[2,"matAutocompleteDisabled","autocompleteDisabled",N]},exportAs:["matAutocompleteTrigger"],features:[Mt([$n]),et]})}return o})(),un=(()=>{class o{static \u0275fac=function(i){return new(i||o)};static \u0275mod=tt({type:o});static \u0275inj=Je({providers:[ta],imports:[To,Tt,ye,Co,Tt,ye]})}return o})();var oa=(o,d)=>d.path;function na(o,d){o&1&&b(0,"i",22)}function aa(o,d){o&1&&b(0,"i",23)}function la(o,d){if(o&1&&(a(0,"mat-option",16),l(1),n()),o&2){let e=d.$implicit;m("value",e),s(),lt("",e.properties.quantity,": ",e.properties.display)}}function ra(o,d){if(o&1){let e=I();a(0,"div",5)(1,"mat-form-field",21)(2,"mat-label"),u(3,na,1,0,"i",22)(4,aa,1,0,"i",23),l(5," Filter"),n(),a(6,"mat-select",24,2),_("selectionChange",function(){M(e),f();let t=oe(11),r=f();return y(r.pathFormGroup().controls.path.setValue(t.value))}),a(8,"mat-option"),l(9,"All"),n(),S(10,la,2,3,"mat-option",16,k),n()()()}if(o&2){let e=oe(7),i=f(2);s(3),p(e.value?4:3),s(3),m("formControl",i.pathSkUnitsFilterControl),s(4),T(i.pathSkUnitsFiltersList)}}function sa(o,d){o&1&&(a(0,"span",8),l(1,"(optional)"),n())}function da(o,d){o&1&&(a(0,"mat-hint"),l(1,"Leave blank to disable this path."),n())}function ca(o,d){if(o&1){let e=I();a(0,"button",25),_("click",function(){M(e);let t=f(2);return y(t.pathFormGroup().controls.path.setValue(""))}),a(1,"mat-icon"),l(2,"close"),n()()}}function ma(o,d){o&1&&(a(0,"mat-error"),l(1," Path is required. Please enter a valid Signal K path. "),n())}function Aa(o,d){o&1&&(a(0,"mat-error"),l(1," Path not recognized. Please enter a path from the server's published list. "),n())}function ua(o,d){if(o&1&&(a(0,"span"),l(1),n(),b(2,"br"),a(3,"small",26),l(4),n()),o&2){let e=f().$implicit;s(),E(e.path),s(3),E(e.meta.description)}}function pa(o,d){if(o&1&&l(0),o&2){let e=f().$implicit;U(" ",e.path," ")}}function ga(o,d){if(o&1&&(a(0,"mat-option",11),u(1,ua,5,2)(2,pa,1,1),n()),o&2){let e=d.$implicit;m("value",e.path),s(),p(e.meta!==void 0?1:2)}}function fa(o,d){if(o&1&&(a(0,"mat-option",16),l(1),n()),o&2){let e=d.$implicit;m("value",e),s(),U(" ",e," ")}}function ha(o,d){if(o&1&&(a(0,"mat-option",16),l(1),n()),o&2){let e=d.$implicit;m("value",e.measure),s(),U(" ",e.description," ")}}function ba(o,d){if(o&1&&(a(0,"mat-optgroup",28),S(1,ha,2,2,"mat-option",16,k),n()),o&2){let e=d.$implicit;m("label",e.group),s(),T(e.units)}}function Ca(o,d){if(o&1&&(a(0,"mat-form-field",20)(1,"mat-label"),l(2,"Display Format"),n(),a(3,"mat-select",27),S(4,ba,3,1,"mat-optgroup",28,k),n()()),o&2){let e=f(2);s(4),T(e.unitList.conversions)}}function _a(o,d){if(o&1&&(a(0,"div",3)(1,"div",4)(2,"span"),l(3),n()(),u(4,ra,12,2,"div",5),a(5,"div",6)(6,"mat-form-field",7)(7,"mat-label"),l(8," Signal K Path "),u(9,sa,2,0,"span",8),n(),b(10,"input",9,0),u(12,da,2,0,"mat-hint"),u(13,ca,3,0,"button",10),u(14,ma,2,0,"mat-error")(15,Aa,2,0,"mat-error"),a(16,"mat-autocomplete",null,1),S(18,ga,3,2,"mat-option",11,oa),Pe(20,"async"),n()()(),a(21,"div",12)(22,"div",13)(23,"mat-form-field",14)(24,"mat-label"),l(25,"Data Source"),n(),a(26,"mat-select",15),S(27,fa,2,2,"mat-option",16,k),n()()(),a(29,"div",17)(30,"mat-form-field",14)(31,"mat-label"),l(32,"Sample Time"),n(),b(33,"input",18),n()(),a(34,"div",19),u(35,Ca,6,0,"mat-form-field",20),n()()()),o&2){let e,i=oe(17),t=f();m("formGroup",t.pathFormGroup()),s(2),ot("color",t.pathFormGroup().enabled?"":"rgba(255,255,255,0.5)"),s(),E(t.pathFormGroup().value.description),s(),p(t.pathFormGroup().value.pathType==="number"&&t.showPathSkUnitsFilter?4:-1),s(5),p(t.pathFormGroup().value.pathRequired===!1?9:-1),s(),m("matAutocomplete",i),s(2),p(t.pathFormGroup().value.pathRequired===!1?12:-1),s(),p(t.pathFormGroup().value.path?13:-1),s(),p((e=t.pathFormGroup().controls.path.errors)!=null&&e.required?14:(e=t.pathFormGroup().controls.path.errors)!=null&&e.requireMatch?15:-1),s(4),T(Fe(20,11,t.filteredPaths)),s(9),T(t.availableSources),s(8),p(t.pathFormGroup().value.pathType==="number"&&t.pathFormGroup().value.showConvertUnitTo===void 0||t.pathFormGroup().value.pathType==="number"&&t.pathFormGroup().value.showConvertUnitTo===!0?35:-1)}}function va(o){return d=>{let e=d.parent?.value?.pathRequired!==!1,i=d.value;return e?i===null||i===""?{requireMatch:!0}:o().some(c=>c.path===i)?null:{requireMatch:!0}:i===null||i===""||o().some(c=>c.path===i)?null:{requireMatch:!0}}}var pn=(()=>{class o{_data=A(co);_units=A(ft);_connection=A(Ki);_destroyRef=A(Ge);pathFormGroup=h.required();multiCTRLArray=h.required();filterSelfPaths=h.required();availablePaths;filteredPaths=new yi(null);availableSources;unitList={base:"",conversions:[]};showPathSkUnitsFilter=!1;pathSkUnitsFilterControl=new Do(null);pathSkUnitsFiltersList;unitlessUnit={unit:"unitless",properties:{display:"(null)",quantity:"Unitless",quantityDisplay:"(null)",description:""}};ngOnInit(){let e=this.pathFormGroup();e.controls.path.disabled||(this.pathSkUnitsFiltersList=this._units.skBaseUnits.sort((i,t)=>i.properties.quantity>t.properties.quantity?1:-1),this.pathSkUnitsFiltersList.unshift(this.unitlessUnit),e.value.pathSkUnitsFilter&&this.pathSkUnitsFilterControl.setValue(this.pathSkUnitsFiltersList.find(i=>i.unit===this.pathFormGroup().value.pathSkUnitsFilter),{onlySelf:!0}),e.value.showPathSkUnitsFilter&&(this.showPathSkUnitsFilter=e.value.showPathSkUnitsFilter),e.controls.path.setValidators([va(()=>this.getPaths())]),e.controls.path.updateValueAndValidity({onlySelf:!0,emitEvent:!1}),e.controls.pathRequired&&e.controls.pathRequired.valueChanges.pipe(Oe(this._destroyRef)).subscribe(()=>{this.pathFormGroup().controls.path.updateValueAndValidity()}),e.controls.path.valid?this.enableFormFields(!1):this.disablePathFields(),e.controls.sampleTime||(e.addControl("sampleTime",new ae("500",Y.required)),e.controls.sampleTime.updateValueAndValidity({onlySelf:!0,emitEvent:!1})),e.controls.path.valueChanges.pipe(Ti(i=>i===""?si(0):si(350)),Ke(""),je(i=>this.filterPaths(i||""))).pipe(Oe(this._destroyRef)).subscribe(()=>{let i=this.pathFormGroup();i.controls.path.pristine||(i.controls.path.valid?(this.enableFormFields(!0),this.updatePathMetaBoundDisplayName(i.controls.path.value),this.updatePathMetaBoundDisplayScale(i.controls.path.value)):this.disablePathFields())}),e.controls.pathType.valueChanges.pipe(Oe(this._destroyRef)).subscribe(()=>{let i=this.pathFormGroup();i.value.showPathSkUnitsFilter?this.pathSkUnitsFilterControl.setValue(this.unitlessUnit):this.pathSkUnitsFilterControl.setValue(null),i.controls.path.updateValueAndValidity()}))}ngOnChanges(e){e.filterSelfPaths&&!e.filterSelfPaths.firstChange&&this.pathFormGroup().controls.path.updateValueAndValidity()}getPaths(){let e=this.pathFormGroup().controls.pathType.value,i=this.filterSelfPaths(),t=!1,r=this.pathFormGroup();if(r.value.supportsPut){let c=!1;this.multiCTRLArray().length>0&&(c=this.multiCTRLArray().some(g=>g.pathID===this.pathFormGroup().value.pathID&&g.type==="3")),c?t=!1:t=Ji(this._connection.skServerVersion,"2.12.0",">=")?r.value.supportsPut:!1}return this._data.getPathsAndMetaByType(e,t,i).sort()}filterPaths(e){let i=e.toLowerCase(),t=this.getPaths();if(this.pathSkUnitsFilterControl.value){let r=this.pathSkUnitsFilterControl.value.unit;t=t.filter(c=>{let g=!!c.meta&&!!c.meta.units,C=r==="unitless";return g&&c.meta.units===r||!g&&C})}t=t.filter(r=>r.path.toLowerCase().includes(i)),this.filteredPaths.next(t)}enableFormFields(e){let i=this._data.getPathObject(this.pathFormGroup().controls.path.value);if(i!=null){this.pathFormGroup().controls.sampleTime.enable({onlySelf:!1});let t=this.pathFormGroup();t.controls.pathType.value=="number"&&(this.unitList=this._units.getConversionsForPath(t.controls.path.value),e&&t.controls.convertUnitTo.setValue(this.unitList.base,{onlySelf:!0}),t.controls.convertUnitTo.enable({onlySelf:!1})),Object.keys(i.sources).length==1?(this.availableSources=["default"],e?t.controls.source.value!="default"&&t.controls.source.setValue("default",{onlySelf:!0}):t.controls.source.value!="default"&&t.controls.source.setValue("",{onlySelf:!0})):Object.keys(i.sources).length>1&&(this.availableSources=Object.keys(i.sources),t.controls.source.value=="default"&&t.controls.source.reset()),t.controls.source.enable({onlySelf:!1})}else this.disablePathFields()}disablePathFields(){this.pathFormGroup().controls.source.reset("",{onlySelf:!0}),this.pathFormGroup().controls.source.disable({onlySelf:!1}),this.pathFormGroup().controls.sampleTime.disable({onlySelf:!1});let e=this.pathFormGroup();e.controls.pathType.value=="number"&&(e.controls.convertUnitTo.reset("",{onlySelf:!0}),e.controls.convertUnitTo.disable({onlySelf:!1}))}updatePathMetaBoundDisplayName(e){let i=this.pathFormGroup();if(!Object.prototype.hasOwnProperty.call(i.parent.parent.value,"displayName"))return;let t=this._data.getPathMeta(e);t?.displayName&&i.parent.parent.controls.displayName.setValue(t.displayName)}updatePathMetaBoundDisplayScale(e){let i=this.pathFormGroup();if(!Object.prototype.hasOwnProperty.call(i.parent.parent.value,"displayScale"))return;let t=this._data.getPathMeta(e);if(t?.displayScale){let r=i.parent.parent.get("displayScale"),c=i.controls.convertUnitTo.value;t.displayScale.lower!==null&&t.displayScale.lower!==void 0&&r.controls.lower.setValue(this._units.convertToUnit(c,t.displayScale.lower)),t.displayScale.upper!==null&&t.displayScale.upper!==void 0&&r.controls.upper.setValue(this._units.convertToUnit(c,t.displayScale.upper)),t.displayScale.type!==null&&t.displayScale.type!==void 0&&r.controls.type.setValue(t.displayScale.type),t.displayScale.power!==null&&t.displayScale.power!==void 0&&r.controls.power.setValue(t.displayScale.power)}}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=v({type:o,selectors:[["path-control-config"]],inputs:{pathFormGroup:[1,"pathFormGroup"],multiCTRLArray:[1,"multiCTRLArray"],filterSelfPaths:[1,"filterSelfPaths"]},features:[et],decls:1,vars:1,consts:[["pathInput",""],["pathAutoComplete","matAutocomplete"],["pathUnitsFilter",""],[1,"flex-container","rounded-card","rounded-card-color",3,"formGroup"],[1,"flex-field-100"],[1,"flex-field-fixed"],[1,"flex-field-to-100"],["floatLabel","auto","appearance","fill",1,"pathField"],[1,"optional-label"],["type","text","matInput","","placeholder","Type to use autocomplete or select from list","formControlName","path",3,"matAutocomplete"],["mat-icon-button","","matIconSuffix","","aria-label","Clear"],[2,"min-height","48px","line-height","1.15","height","auto","padding","8px 16px","white-space","normal",3,"value"],[1,"pathProperties"],[1,"sourceField"],["appearance","outline","floatLabel","always",1,"fields"],["placeholder","Select source","formControlName","source","required",""],[3,"value"],[1,"sampleTimeField"],["matInput","","type","number","placeholder","Sample time in milliseconds","formControlName","sampleTime","required",""],[1,"unitField"],[1,"fields"],["floatLabel","auto","appearance","fill",1,"filter-path"],[1,"fa-solid","fa-filter"],[1,"fa-solid","fa-filter-circle-xmark"],["panelWidth","",3,"selectionChange","formControl"],["mat-icon-button","","matIconSuffix","","aria-label","Clear",3,"click"],[1,"pathMetaDescription"],["placeholder","Select unit","formControlName","convertUnitTo","required",""],[3,"label"]],template:function(i,t){i&1&&u(0,_a,36,13,"div",3),i&2&&p(t.pathFormGroup().value.isPathConfigurable?0:-1)},dependencies:[j,Q,Le,F,H,O,W,fe,Z,Ne,V,B,z,un,ti,X,gt,wt,$,pt,ut,re,J,R,Oo,Wt],styles:[".pathGroup[_ngcontent-%COMP%]{width:100%}.pathGroupFields[_ngcontent-%COMP%]{display:block;width:calc(100% - 5px)}.pathField[_ngcontent-%COMP%]{width:100%}.pathProperties[_ngcontent-%COMP%]{display:flex;flex-flow:row wrap;justify-content:space-between;align-items:center;align-content:flex-start;gap:10px}.fields[_ngcontent-%COMP%]{width:100%}.sourceField[_ngcontent-%COMP%]{flex:3 1}.sampleTimeField[_ngcontent-%COMP%]{flex:1 3}.unitField[_ngcontent-%COMP%]{flex:3 1}"]})}return o})();function Ma(o,d){if(o&1&&b(0,"path-control-config",6),o&2){let e=d.$implicit,i=f(2);m("pathFormGroup",e)("filterSelfPaths",i.filterSelfPaths().value)("multiCTRLArray",i.multiCTRLArray)}}function ya(o,d){if(o&1&&S(0,Ma,1,3,"path-control-config",6,k),o&2){let e=f();T(e.pathsFormGroup.controls)}}function Sa(o,d){if(o&1&&b(0,"path-control-config",6),o&2){let e=d.$implicit,i=f(2);m("pathFormGroup",i.pathsFormGroup.get(e))("filterSelfPaths",i.filterSelfPaths().value)("multiCTRLArray",i.multiCTRLArray)}}function Ta(o,d){if(o&1&&(S(0,Sa,1,3,"path-control-config",6,k),Pe(2,"objectKeys")),o&2){let e=f();T(Fe(2,0,e.pathsFormGroup.controls))}}var gn=(()=>{class o{rootFormGroup=A(Z);fb=A(At);formGroupName=h.required();isArray=h.required();enableTimeout=h.required();dataTimeout=h.required();filterSelfPaths=h.required();addPathEvent=h(void 0);delPathEvent=h(void 0);updatePathEvent=h(void 0);pathsFormGroup;multiCTRLArray=[];ngOnInit(){this.isArray()?(this.pathsFormGroup=this.rootFormGroup.control.get(this.formGroupName()),this.multiCTRLArray=this.rootFormGroup.control.get("multiChildCtrls").value):this.pathsFormGroup=this.rootFormGroup.control.get(this.formGroupName())}addPath(e){this.pathsFormGroup.push(this.fb.group({description:[e.path.description],path:[e.path.path,Y.required],pathID:[e.path.pathID],source:[e.path.source,Y.required],pathType:[e.path.pathType],isPathConfigurable:[e.path.isPathConfigurable],showPathSkUnitsFilter:[e.path.showPathSkUnitsFilter],pathSkUnitsFilter:[e.path.pathSkUnitsFilter],convertUnitTo:[e.path.convertUnitTo],sampleTime:[e.path.sampleTime],supportsPut:[e.path.supportsPut]})),this.pathsFormGroup.updateValueAndValidity(),this.multiCTRLArray=this.rootFormGroup.control.get("multiChildCtrls").value}delPath(){this.multiCTRLArray=this.rootFormGroup.control.get("multiChildCtrls").value}updatePath(e){this.multiCTRLArray=e}ngOnChanges(e){e.addPathEvent&&!e.addPathEvent.firstChange&&this.addPath(e.addPathEvent.currentValue),e.delPathEvent&&!e.delPathEvent.firstChange&&this.delPath(),e.updatePathEvent&&!e.updatePathEvent.firstChange&&this.updatePath(e.updatePathEvent.currentValue)}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=v({type:o,selectors:[["paths-options"]],inputs:{formGroupName:[1,"formGroupName"],isArray:[1,"isArray"],enableTimeout:[1,"enableTimeout"],dataTimeout:[1,"dataTimeout"],filterSelfPaths:[1,"filterSelfPaths"],addPathEvent:[1,"addPathEvent"],delPathEvent:[1,"delPathEvent"],updatePathEvent:[1,"updatePathEvent"]},features:[et],decls:14,vars:5,consts:[[1,"widget-options-grid"],["name","enableTimeout",3,"formControl"],["type","number","matNativeControl","","placeholder","Time in seconds...","name","dataTimeout","min","2","required","",3,"formControl"],["matTextSuffix",""],[3,"formGroup"],["name","filterSelfPaths",3,"formControl"],[2,"display","block",3,"pathFormGroup","filterSelfPaths","multiCTRLArray"]],template:function(i,t){i&1&&(a(0,"div",0)(1,"mat-checkbox",1),l(2," Enable Widget Data TTL "),n(),a(3,"mat-form-field")(4,"mat-label"),l(5,"TTL Timeout For Paths"),n(),b(6,"input",2),a(7,"span",3),l(8,"Seconds"),n()()(),Ni(9,4),u(10,ya,2,0)(11,Ta,3,2),Ri(),a(12,"mat-checkbox",5),l(13,` Restrict to own vessel
4
- `),n()),i&2&&(s(),m("formControl",t.enableTimeout()),s(5),m("formControl",t.dataTimeout()),s(3),m("formGroup",t.pathsFormGroup),s(),p(t.isArray()?10:11),s(2),m("formControl",t.filterSelfPaths()))},dependencies:[be,j,Q,Le,F,H,O,mt,W,fe,Z,V,B,z,pt,pn,sn],styles:["[_nghost-%COMP%]{display:block;height:100%;width:100%;padding-top:15px;padding-bottom:5px}"]})}return o})();function xa(o,d){if(o&1){let e=I();a(0,"button",7),_("click",function(){M(e);let t=f();return y(t.dateTimezone().setValue(""))}),b(1,"span",8),n()}}function wa(o,d){if(o&1&&(a(0,"mat-option",6),l(1),n()),o&2){let e=d.$implicit;m("value",e.label),s(),lt(" ",e.offset," - ",e.label," ")}}function Ea(o){return d=>o.some(i=>i.label===d.value)?null:{requireMatch:!0}}var Ga=()=>{let o=Intl.supportedValuesOf("timeZone"),d=new Date;return o.map(e=>({offset:new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"shortOffset"}).formatToParts(d).find(c=>c.type==="timeZoneName")?.value||"",label:e}))},fn=(()=>{class o{_destroyRef=A(Ge);dateFormat=h(void 0);dateTimezone=h(void 0);tz=[];filteredTZ;filteredTZSubscription=null;constructor(){}ngOnInit(){typeof Intl.supportedValuesOf<"u"?this.tz=Ga().sort((e,i)=>this.compareOffsets(e.offset,i.offset)):(console.log("[Widget Options] Feature not supported. Using static Time Zone list"),this.tz=[{offset:"GMT",label:"Africa/Abidjan"},{offset:"GMT",label:"Africa/Accra"},{offset:"GMT+3",label:"Africa/Addis_Ababa"},{offset:"GMT+1",label:"Africa/Algiers"},{offset:"GMT+3",label:"Africa/Asmera"},{offset:"GMT",label:"Africa/Bamako"},{offset:"GMT+1",label:"Africa/Bangui"},{offset:"GMT",label:"Africa/Banjul"},{offset:"GMT",label:"Africa/Bissau"},{offset:"GMT+2",label:"Africa/Blantyre"},{offset:"GMT+1",label:"Africa/Brazzaville"},{offset:"GMT+2",label:"Africa/Bujumbura"},{offset:"GMT+2",label:"Africa/Cairo"},{offset:"GMT",label:"Africa/Casablanca"},{offset:"GMT+2",label:"Africa/Ceuta"},{offset:"GMT",label:"Africa/Conakry"},{offset:"GMT",label:"Africa/Dakar"},{offset:"GMT+3",label:"Africa/Dar_es_Salaam"},{offset:"GMT+3",label:"Africa/Djibouti"},{offset:"GMT+1",label:"Africa/Douala"},{offset:"GMT",label:"Africa/El_Aaiun"},{offset:"GMT",label:"Africa/Freetown"},{offset:"GMT+2",label:"Africa/Gaborone"},{offset:"GMT+2",label:"Africa/Harare"},{offset:"GMT+2",label:"Africa/Johannesburg"},{offset:"GMT+2",label:"Africa/Juba"},{offset:"GMT+3",label:"Africa/Kampala"},{offset:"GMT+2",label:"Africa/Khartoum"},{offset:"GMT+2",label:"Africa/Kigali"},{offset:"GMT+1",label:"Africa/Kinshasa"},{offset:"GMT+1",label:"Africa/Lagos"},{offset:"GMT+1",label:"Africa/Libreville"},{offset:"GMT",label:"Africa/Lome"},{offset:"GMT+1",label:"Africa/Luanda"},{offset:"GMT+2",label:"Africa/Lubumbashi"},{offset:"GMT+2",label:"Africa/Lusaka"},{offset:"GMT+1",label:"Africa/Malabo"},{offset:"GMT+2",label:"Africa/Maputo"},{offset:"GMT+2",label:"Africa/Maseru"},{offset:"GMT+2",label:"Africa/Mbabane"},{offset:"GMT+3",label:"Africa/Mogadishu"},{offset:"GMT",label:"Africa/Monrovia"},{offset:"GMT+3",label:"Africa/Nairobi"},{offset:"GMT+1",label:"Africa/Ndjamena"},{offset:"GMT+1",label:"Africa/Niamey"},{offset:"GMT",label:"Africa/Nouakchott"},{offset:"GMT",label:"Africa/Ouagadougou"},{offset:"GMT+1",label:"Africa/Porto-Novo"},{offset:"GMT",label:"Africa/Sao_Tome"},{offset:"GMT+2",label:"Africa/Tripoli"},{offset:"GMT+1",label:"Africa/Tunis"},{offset:"GMT+2",label:"Africa/Windhoek"},{offset:"GMT-9",label:"America/Adak"},{offset:"GMT-8",label:"America/Anchorage"},{offset:"GMT-4",label:"America/Anguilla"},{offset:"GMT-4",label:"America/Antigua"},{offset:"GMT-3",label:"America/Araguaina"},{offset:"GMT-3",label:"America/Argentina/La_Rioja"},{offset:"GMT-3",label:"America/Argentina/Rio_Gallegos"},{offset:"GMT-3",label:"America/Argentina/Salta"},{offset:"GMT-3",label:"America/Argentina/San_Juan"},{offset:"GMT-3",label:"America/Argentina/San_Luis"},{offset:"GMT-3",label:"America/Argentina/Tucuman"},{offset:"GMT-3",label:"America/Argentina/Ushuaia"},{offset:"GMT-4",label:"America/Aruba"},{offset:"GMT-3",label:"America/Asuncion"},{offset:"GMT-3",label:"America/Bahia"},{offset:"GMT-6",label:"America/Bahia_Banderas"},{offset:"GMT-4",label:"America/Barbados"},{offset:"GMT-3",label:"America/Belem"},{offset:"GMT-6",label:"America/Belize"},{offset:"GMT-4",label:"America/Blanc-Sablon"},{offset:"GMT-4",label:"America/Boa_Vista"},{offset:"GMT-5",label:"America/Bogota"},{offset:"GMT-6",label:"America/Boise"},{offset:"GMT-3",label:"America/Buenos_Aires"},{offset:"GMT-6",label:"America/Cambridge_Bay"},{offset:"GMT-4",label:"America/Campo_Grande"},{offset:"GMT-5",label:"America/Cancun"},{offset:"GMT-4",label:"America/Caracas"},{offset:"GMT-3",label:"America/Catamarca"},{offset:"GMT-3",label:"America/Cayenne"},{offset:"GMT-5",label:"America/Cayman"},{offset:"GMT-5",label:"America/Chicago"},{offset:"GMT-6",label:"America/Chihuahua"},{offset:"GMT-6",label:"America/Ciudad_Juarez"},{offset:"GMT-5",label:"America/Coral_Harbour"},{offset:"GMT-3",label:"America/Cordoba"},{offset:"GMT-6",label:"America/Costa_Rica"},{offset:"GMT-7",label:"America/Creston"},{offset:"GMT-4",label:"America/Cuiaba"},{offset:"GMT-4",label:"America/Curacao"},{offset:"GMT",label:"America/Danmarkshavn"},{offset:"GMT-7",label:"America/Dawson"},{offset:"GMT-7",label:"America/Dawson_Creek"},{offset:"GMT-6",label:"America/Denver"},{offset:"GMT-4",label:"America/Detroit"},{offset:"GMT-4",label:"America/Dominica"},{offset:"GMT-6",label:"America/Edmonton"},{offset:"GMT-5",label:"America/Eirunepe"},{offset:"GMT-6",label:"America/El_Salvador"},{offset:"GMT-7",label:"America/Fort_Nelson"},{offset:"GMT-3",label:"America/Fortaleza"},{offset:"GMT-3",label:"America/Glace_Bay"},{offset:"GMT-1",label:"America/Godthab"},{offset:"GMT-3",label:"America/Goose_Bay"},{offset:"GMT-4",label:"America/Grand_Turk"},{offset:"GMT-4",label:"America/Grenada"},{offset:"GMT-4",label:"America/Guadeloupe"},{offset:"GMT-6",label:"America/Guatemala"},{offset:"GMT-5",label:"America/Guayaquil"},{offset:"GMT-4",label:"America/Guyana"},{offset:"GMT-3",label:"America/Halifax"},{offset:"GMT-4",label:"America/Havana"},{offset:"GMT-7",label:"America/Hermosillo"},{offset:"GMT-5",label:"America/Indiana/Knox"},{offset:"GMT-4",label:"America/Indiana/Marengo"},{offset:"GMT-4",label:"America/Indiana/Petersburg"},{offset:"GMT-5",label:"America/Indiana/Tell_City"},{offset:"GMT-4",label:"America/Indiana/Vevay"},{offset:"GMT-4",label:"America/Indiana/Vincennes"},{offset:"GMT-4",label:"America/Indiana/Winamac"},{offset:"GMT-4",label:"America/Indianapolis"},{offset:"GMT-6",label:"America/Inuvik"},{offset:"GMT-4",label:"America/Iqaluit"},{offset:"GMT-5",label:"America/Jamaica"},{offset:"GMT-3",label:"America/Jujuy"},{offset:"GMT-8",label:"America/Juneau"},{offset:"GMT-4",label:"America/Kentucky/Monticello"},{offset:"GMT-4",label:"America/Kralendijk"},{offset:"GMT-4",label:"America/La_Paz"},{offset:"GMT-5",label:"America/Lima"},{offset:"GMT-7",label:"America/Los_Angeles"},{offset:"GMT-4",label:"America/Louisville"},{offset:"GMT-4",label:"America/Lower_Princes"},{offset:"GMT-3",label:"America/Maceio"},{offset:"GMT-6",label:"America/Managua"},{offset:"GMT-4",label:"America/Manaus"},{offset:"GMT-4",label:"America/Marigot"},{offset:"GMT-4",label:"America/Martinique"},{offset:"GMT-5",label:"America/Matamoros"},{offset:"GMT-7",label:"America/Mazatlan"},{offset:"GMT-3",label:"America/Mendoza"},{offset:"GMT-5",label:"America/Menominee"},{offset:"GMT-6",label:"America/Merida"},{offset:"GMT-8",label:"America/Metlakatla"},{offset:"GMT-6",label:"America/Mexico_City"},{offset:"GMT-2",label:"America/Miquelon"},{offset:"GMT-3",label:"America/Moncton"},{offset:"GMT-6",label:"America/Monterrey"},{offset:"GMT-3",label:"America/Montevideo"},{offset:"GMT-4",label:"America/Montserrat"},{offset:"GMT-4",label:"America/Nassau"},{offset:"GMT-4",label:"America/New_York"},{offset:"GMT-8",label:"America/Nome"},{offset:"GMT-2",label:"America/Noronha"},{offset:"GMT-5",label:"America/North_Dakota/Beulah"},{offset:"GMT-5",label:"America/North_Dakota/Center"},{offset:"GMT-5",label:"America/North_Dakota/New_Salem"},{offset:"GMT-5",label:"America/Ojinaga"},{offset:"GMT-5",label:"America/Panama"},{offset:"GMT-3",label:"America/Paramaribo"},{offset:"GMT-7",label:"America/Phoenix"},{offset:"GMT-4",label:"America/Port-au-Prince"},{offset:"GMT-4",label:"America/Port_of_Spain"},{offset:"GMT-4",label:"America/Porto_Velho"},{offset:"GMT-4",label:"America/Puerto_Rico"},{offset:"GMT-3",label:"America/Punta_Arenas"},{offset:"GMT-5",label:"America/Rankin_Inlet"},{offset:"GMT-3",label:"America/Recife"},{offset:"GMT-6",label:"America/Regina"},{offset:"GMT-5",label:"America/Resolute"},{offset:"GMT-5",label:"America/Rio_Branco"},{offset:"GMT-3",label:"America/Santarem"},{offset:"GMT-3",label:"America/Santiago"},{offset:"GMT-4",label:"America/Santo_Domingo"},{offset:"GMT-3",label:"America/Sao_Paulo"},{offset:"GMT-1",label:"America/Scoresbysund"},{offset:"GMT-8",label:"America/Sitka"},{offset:"GMT-4",label:"America/St_Barthelemy"},{offset:"GMT-2:30",label:"America/St_Johns"},{offset:"GMT-4",label:"America/St_Kitts"},{offset:"GMT-4",label:"America/St_Lucia"},{offset:"GMT-4",label:"America/St_Thomas"},{offset:"GMT-4",label:"America/St_Vincent"},{offset:"GMT-6",label:"America/Swift_Current"},{offset:"GMT-6",label:"America/Tegucigalpa"},{offset:"GMT-3",label:"America/Thule"},{offset:"GMT-7",label:"America/Tijuana"},{offset:"GMT-4",label:"America/Toronto"},{offset:"GMT-4",label:"America/Tortola"},{offset:"GMT-7",label:"America/Vancouver"},{offset:"GMT-7",label:"America/Whitehorse"},{offset:"GMT-5",label:"America/Winnipeg"},{offset:"GMT-8",label:"America/Yakutat"},{offset:"GMT+8",label:"Antarctica/Casey"},{offset:"GMT+7",label:"Antarctica/Davis"},{offset:"GMT+10",label:"Antarctica/DumontDUrville"},{offset:"GMT+11",label:"Antarctica/Macquarie"},{offset:"GMT+5",label:"Antarctica/Mawson"},{offset:"GMT+13",label:"Antarctica/McMurdo"},{offset:"GMT-3",label:"Antarctica/Palmer"},{offset:"GMT-3",label:"Antarctica/Rothera"},{offset:"GMT+3",label:"Antarctica/Syowa"},{offset:"GMT+2",label:"Antarctica/Troll"},{offset:"GMT+5",label:"Antarctica/Vostok"},{offset:"GMT+2",label:"Arctic/Longyearbyen"},{offset:"GMT+3",label:"Asia/Aden"},{offset:"GMT+5",label:"Asia/Almaty"},{offset:"GMT+3",label:"Asia/Amman"},{offset:"GMT+12",label:"Asia/Anadyr"},{offset:"GMT+5",label:"Asia/Aqtau"},{offset:"GMT+5",label:"Asia/Aqtobe"},{offset:"GMT+5",label:"Asia/Ashgabat"},{offset:"GMT+5",label:"Asia/Atyrau"},{offset:"GMT+3",label:"Asia/Baghdad"},{offset:"GMT+3",label:"Asia/Bahrain"},{offset:"GMT+4",label:"Asia/Baku"},{offset:"GMT+7",label:"Asia/Bangkok"},{offset:"GMT+7",label:"Asia/Barnaul"},{offset:"GMT+3",label:"Asia/Beirut"},{offset:"GMT+6",label:"Asia/Bishkek"},{offset:"GMT+8",label:"Asia/Brunei"},{offset:"GMT+5:30",label:"Asia/Calcutta"},{offset:"GMT+9",label:"Asia/Chita"},{offset:"GMT+5:30",label:"Asia/Colombo"},{offset:"GMT+3",label:"Asia/Damascus"},{offset:"GMT+6",label:"Asia/Dhaka"},{offset:"GMT+9",label:"Asia/Dili"},{offset:"GMT+4",label:"Asia/Dubai"},{offset:"GMT+5",label:"Asia/Dushanbe"},{offset:"GMT+3",label:"Asia/Famagusta"},{offset:"GMT+2",label:"Asia/Gaza"},{offset:"GMT+2",label:"Asia/Hebron"},{offset:"GMT+8",label:"Asia/Hong_Kong"},{offset:"GMT+7",label:"Asia/Hovd"},{offset:"GMT+8",label:"Asia/Irkutsk"},{offset:"GMT+7",label:"Asia/Jakarta"},{offset:"GMT+9",label:"Asia/Jayapura"},{offset:"GMT+3",label:"Asia/Jerusalem"},{offset:"GMT+4:30",label:"Asia/Kabul"},{offset:"GMT+12",label:"Asia/Kamchatka"},{offset:"GMT+5",label:"Asia/Karachi"},{offset:"GMT+5:45",label:"Asia/Katmandu"},{offset:"GMT+9",label:"Asia/Khandyga"},{offset:"GMT+7",label:"Asia/Krasnoyarsk"},{offset:"GMT+8",label:"Asia/Kuala_Lumpur"},{offset:"GMT+8",label:"Asia/Kuching"},{offset:"GMT+3",label:"Asia/Kuwait"},{offset:"GMT+8",label:"Asia/Macau"},{offset:"GMT+11",label:"Asia/Magadan"},{offset:"GMT+8",label:"Asia/Makassar"},{offset:"GMT+8",label:"Asia/Manila"},{offset:"GMT+4",label:"Asia/Muscat"},{offset:"GMT+3",label:"Asia/Nicosia"},{offset:"GMT+7",label:"Asia/Novokuznetsk"},{offset:"GMT+7",label:"Asia/Novosibirsk"},{offset:"GMT+6",label:"Asia/Omsk"},{offset:"GMT+5",label:"Asia/Oral"},{offset:"GMT+7",label:"Asia/Phnom_Penh"},{offset:"GMT+7",label:"Asia/Pontianak"},{offset:"GMT+9",label:"Asia/Pyongyang"},{offset:"GMT+3",label:"Asia/Qatar"},{offset:"GMT+5",label:"Asia/Qostanay"},{offset:"GMT+5",label:"Asia/Qyzylorda"},{offset:"GMT+6:30",label:"Asia/Rangoon"},{offset:"GMT+3",label:"Asia/Riyadh"},{offset:"GMT+7",label:"Asia/Saigon"},{offset:"GMT+11",label:"Asia/Sakhalin"},{offset:"GMT+5",label:"Asia/Samarkand"},{offset:"GMT+9",label:"Asia/Seoul"},{offset:"GMT+8",label:"Asia/Shanghai"},{offset:"GMT+8",label:"Asia/Singapore"},{offset:"GMT+11",label:"Asia/Srednekolymsk"},{offset:"GMT+8",label:"Asia/Taipei"},{offset:"GMT+5",label:"Asia/Tashkent"},{offset:"GMT+4",label:"Asia/Tbilisi"},{offset:"GMT+3:30",label:"Asia/Tehran"},{offset:"GMT+6",label:"Asia/Thimphu"},{offset:"GMT+9",label:"Asia/Tokyo"},{offset:"GMT+7",label:"Asia/Tomsk"},{offset:"GMT+8",label:"Asia/Ulaanbaatar"},{offset:"GMT+6",label:"Asia/Urumqi"},{offset:"GMT+10",label:"Asia/Ust-Nera"},{offset:"GMT+7",label:"Asia/Vientiane"},{offset:"GMT+10",label:"Asia/Vladivostok"},{offset:"GMT+9",label:"Asia/Yakutsk"},{offset:"GMT+5",label:"Asia/Yekaterinburg"},{offset:"GMT+4",label:"Asia/Yerevan"},{offset:"GMT",label:"Atlantic/Azores"},{offset:"GMT-3",label:"Atlantic/Bermuda"},{offset:"GMT+1",label:"Atlantic/Canary"},{offset:"GMT-1",label:"Atlantic/Cape_Verde"},{offset:"GMT+1",label:"Atlantic/Faeroe"},{offset:"GMT+1",label:"Atlantic/Madeira"},{offset:"GMT",label:"Atlantic/Reykjavik"},{offset:"GMT-2",label:"Atlantic/South_Georgia"},{offset:"GMT",label:"Atlantic/St_Helena"},{offset:"GMT-3",label:"Atlantic/Stanley"},{offset:"GMT+10:30",label:"Australia/Adelaide"},{offset:"GMT+10",label:"Australia/Brisbane"},{offset:"GMT+10:30",label:"Australia/Broken_Hill"},{offset:"GMT+9:30",label:"Australia/Darwin"},{offset:"GMT+8:45",label:"Australia/Eucla"},{offset:"GMT+11",label:"Australia/Hobart"},{offset:"GMT+10",label:"Australia/Lindeman"},{offset:"GMT+11",label:"Australia/Lord_Howe"},{offset:"GMT+11",label:"Australia/Melbourne"},{offset:"GMT+8",label:"Australia/Perth"},{offset:"GMT+11",label:"Australia/Sydney"},{offset:"GMT+2",label:"Europe/Amsterdam"},{offset:"GMT+2",label:"Europe/Andorra"},{offset:"GMT+4",label:"Europe/Astrakhan"},{offset:"GMT+3",label:"Europe/Athens"},{offset:"GMT+2",label:"Europe/Belgrade"},{offset:"GMT+2",label:"Europe/Berlin"},{offset:"GMT+2",label:"Europe/Bratislava"},{offset:"GMT+2",label:"Europe/Brussels"},{offset:"GMT+3",label:"Europe/Bucharest"},{offset:"GMT+2",label:"Europe/Budapest"},{offset:"GMT+2",label:"Europe/Busingen"},{offset:"GMT+3",label:"Europe/Chisinau"},{offset:"GMT+2",label:"Europe/Copenhagen"},{offset:"GMT+1",label:"Europe/Dublin"},{offset:"GMT+2",label:"Europe/Gibraltar"},{offset:"GMT+1",label:"Europe/Guernsey"},{offset:"GMT+3",label:"Europe/Helsinki"},{offset:"GMT+1",label:"Europe/Isle_of_Man"},{offset:"GMT+3",label:"Europe/Istanbul"},{offset:"GMT+1",label:"Europe/Jersey"},{offset:"GMT+2",label:"Europe/Kaliningrad"},{offset:"GMT+3",label:"Europe/Kiev"},{offset:"GMT+3",label:"Europe/Kirov"},{offset:"GMT+1",label:"Europe/Lisbon"},{offset:"GMT+2",label:"Europe/Ljubljana"},{offset:"GMT+1",label:"Europe/London"},{offset:"GMT+2",label:"Europe/Luxembourg"},{offset:"GMT+2",label:"Europe/Madrid"},{offset:"GMT+2",label:"Europe/Malta"},{offset:"GMT+3",label:"Europe/Mariehamn"},{offset:"GMT+3",label:"Europe/Minsk"},{offset:"GMT+2",label:"Europe/Monaco"},{offset:"GMT+3",label:"Europe/Moscow"},{offset:"GMT+2",label:"Europe/Oslo"},{offset:"GMT+2",label:"Europe/Paris"},{offset:"GMT+2",label:"Europe/Podgorica"},{offset:"GMT+2",label:"Europe/Prague"},{offset:"GMT+3",label:"Europe/Riga"},{offset:"GMT+2",label:"Europe/Rome"},{offset:"GMT+4",label:"Europe/Samara"},{offset:"GMT+2",label:"Europe/San_Marino"},{offset:"GMT+2",label:"Europe/Sarajevo"},{offset:"GMT+4",label:"Europe/Saratov"},{offset:"GMT+3",label:"Europe/Simferopol"},{offset:"GMT+2",label:"Europe/Skopje"},{offset:"GMT+3",label:"Europe/Sofia"},{offset:"GMT+2",label:"Europe/Stockholm"},{offset:"GMT+3",label:"Europe/Tallinn"},{offset:"GMT+2",label:"Europe/Tirane"},{offset:"GMT+4",label:"Europe/Ulyanovsk"},{offset:"GMT+2",label:"Europe/Vaduz"},{offset:"GMT+2",label:"Europe/Vatican"},{offset:"GMT+2",label:"Europe/Vienna"},{offset:"GMT+3",label:"Europe/Vilnius"},{offset:"GMT+3",label:"Europe/Volgograd"},{offset:"GMT+2",label:"Europe/Warsaw"},{offset:"GMT+2",label:"Europe/Zagreb"},{offset:"GMT+2",label:"Europe/Zurich"},{offset:"GMT+3",label:"Indian/Antananarivo"},{offset:"GMT+6",label:"Indian/Chagos"},{offset:"GMT+7",label:"Indian/Christmas"},{offset:"GMT+6:30",label:"Indian/Cocos"},{offset:"GMT+3",label:"Indian/Comoro"},{offset:"GMT+5",label:"Indian/Kerguelen"},{offset:"GMT+4",label:"Indian/Mahe"},{offset:"GMT+5",label:"Indian/Maldives"},{offset:"GMT+4",label:"Indian/Mauritius"},{offset:"GMT+3",label:"Indian/Mayotte"},{offset:"GMT+4",label:"Indian/Reunion"},{offset:"GMT+13",label:"Pacific/Apia"},{offset:"GMT+13",label:"Pacific/Auckland"},{offset:"GMT+11",label:"Pacific/Bougainville"},{offset:"GMT+13:45",label:"Pacific/Chatham"},{offset:"GMT-5",label:"Pacific/Easter"},{offset:"GMT+11",label:"Pacific/Efate"},{offset:"GMT+13",label:"Pacific/Enderbury"},{offset:"GMT+13",label:"Pacific/Fakaofo"},{offset:"GMT+12",label:"Pacific/Fiji"},{offset:"GMT+12",label:"Pacific/Funafuti"},{offset:"GMT-6",label:"Pacific/Galapagos"},{offset:"GMT-9",label:"Pacific/Gambier"},{offset:"GMT+11",label:"Pacific/Guadalcanal"},{offset:"GMT+10",label:"Pacific/Guam"},{offset:"GMT-10",label:"Pacific/Honolulu"},{offset:"GMT+14",label:"Pacific/Kiritimati"},{offset:"GMT+11",label:"Pacific/Kosrae"},{offset:"GMT+12",label:"Pacific/Kwajalein"},{offset:"GMT+12",label:"Pacific/Majuro"},{offset:"GMT-9:30",label:"Pacific/Marquesas"},{offset:"GMT-11",label:"Pacific/Midway"},{offset:"GMT+12",label:"Pacific/Nauru"},{offset:"GMT-11",label:"Pacific/Niue"},{offset:"GMT+12",label:"Pacific/Norfolk"},{offset:"GMT+11",label:"Pacific/Noumea"},{offset:"GMT-11",label:"Pacific/Pago_Pago"},{offset:"GMT+9",label:"Pacific/Palau"},{offset:"GMT-8",label:"Pacific/Pitcairn"},{offset:"GMT+11",label:"Pacific/Ponape"},{offset:"GMT+10",label:"Pacific/Port_Moresby"},{offset:"GMT-10",label:"Pacific/Rarotonga"},{offset:"GMT+10",label:"Pacific/Saipan"},{offset:"GMT-10",label:"Pacific/Tahiti"},{offset:"GMT+12",label:"Pacific/Tarawa"},{offset:"GMT+13",label:"Pacific/Tongatapu"},{offset:"GMT+10",label:"Pacific/Truk"},{offset:"GMT+12",label:"Pacific/Wake"},{offset:"GMT+12",label:"Pacific/Wallis"}].sort((e,i)=>this.compareOffsets(e.offset,i.offset))),this.tz.unshift({offset:"",label:"System Timezone -"}),this.dateTimezone().setValidators([Y.required,Ea(this.tz)]),this.filteredTZ=this.dateTimezone().valueChanges.pipe(kt(500),Ke(""),je(e=>this.filterTZ(e||""))),this.filteredTZSubscription=this.filteredTZ.pipe(Oe(this._destroyRef)).subscribe()}filterTZ(e){let i=e.toLowerCase();return this.tz.filter(t=>t.label.toLowerCase().includes(i))}compareOffsets(e,i){let t=r=>{let c=r.match(/([+-]?)(\d+)(?::(\d+))?/);if(!c)return 0;let g=c[1]==="-"?-1:1,C=parseInt(c[2],10),w=c[3]?parseInt(c[3],10):0;return g*(C*60+w)};return t(e)-t(i)}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=v({type:o,selectors:[["display-datetime-options"]],inputs:{dateFormat:[1,"dateFormat"],dateTimezone:[1,"dateTimezone"]},decls:15,vars:6,consts:[["timeZoneAutoComplete","matAutocomplete"],[1,"widget-options-grid"],[1,"options-grid-span2"],["matInput","","placeholder","dd/MM/yyyy HH:mm:ss","name","dateFormat","required","",3,"formControl"],["type","text","matInput","","placeholder","Type to use autocomplete","name","dateTimezone","required","",3,"formControl","matAutocomplete"],["mat-icon-button","","matSuffix","","aria-label","Clear"],[3,"value"],["mat-icon-button","","matSuffix","","aria-label","Clear",3,"click"],[1,"fa-solid","fa-close"]],template:function(i,t){if(i&1&&(a(0,"div",1)(1,"mat-form-field",2)(2,"mat-label"),l(3,"Date & Time Format"),n(),b(4,"input",3),n(),a(5,"mat-form-field",2)(6,"mat-label"),l(7,"Adjust Value to Time Zone"),n(),b(8,"input",4),u(9,xa,2,0,"button",5),a(10,"mat-autocomplete",null,0),S(12,wa,2,3,"mat-option",6,Ft),Pe(14,"async"),n()()()),i&2){let r=oe(11);s(4),m("formControl",t.dateFormat()),s(4),m("formControl",t.dateTimezone())("matAutocomplete",r),s(),p(t.dateTimezone().value?9:-1),s(3),T(Fe(14,4,t.filteredTZ))}},dependencies:[V,B,z,j,Q,F,O,W,fe,wt,$,pt,ti,X,Wt],encapsulation:2})}return o})();function ka(o,d){if(o&1&&(a(0,"mat-option",6),l(1),Pe(2,"titlecase"),n()),o&2){let e=d.$implicit;m("value",Me(e)),s(),E(Fe(2,3,e))}}var gi={V1_PLUGIN:"autopilot",V2_BASE:"/signalk/v2/api",V2_AUTOPILOTS:"/signalk/v2/api/vessels/self/autopilots",V2_DEFAULT_AUTOPILOT_ID:"/signalk/v2/api/vessels/self/autopilots/_providers/_default"},hn={options:{modes:[],states:[]},state:null,mode:"off-line",target:null,engaged:!1},bn=(()=>{class o{formGroupName=h.required();_plugins=A(Kt);_destroyRef=A(Ge);http=A(Xi);rootFormGroup=A(Z);autopilotFormGroup;apiVersion=P(null);availableAutopilots=P({});autopilotPlugin=P(null);discoveryInProgress=P(!1);apiDetectionError=P(null);apInstances=Qi(()=>{let e=this.availableAutopilots();return e?Object.keys(e):[]});modes=P(null);pluginId=P(null);currentRequests=new Set;constructor(){Rt(()=>{this.autopilotFormGroup.get("apiVersion")?.setValue(this.apiVersion(),{emitEvent:!1})})}ngOnInit(){this.autopilotFormGroup=this.rootFormGroup.control.get(this.formGroupName()),this.modes.set(this.autopilotFormGroup.value.modes||null),this.detectAutopilotApi()}detectAutopilotApi(){return L(this,null,function*(){this.discoveryInProgress.set(!0),console.log("[Autopilot Options] Starting API detection...");try{if(yield this.checkV2Api())if(this.apiVersion.set("v2"),this.autopilotFormGroup.get("apiVersion")?.setValue("v2",{emitEvent:!1}),this.availableAutopilots()&&Object.keys(this.availableAutopilots()).length>0){this.pluginId.set(Object.values(this.availableAutopilots())[0]?.provider??null),this.autopilotFormGroup.get("pluginId")?.setValue(this.pluginId(),{emitEvent:!1}),this.discoveryInProgress.set(!1);return}else console.warn("[Autopilot Options] No V2 autopilot provider found")}catch(e){console.error("[Autopilot Options] Error checking V2 API, checking V1...",e)}try{if(yield this._plugins.isEnabled(gi.V1_PLUGIN)){this.apiVersion.set("v1"),this.autopilotFormGroup.get("apiVersion")?.setValue("v1",{emitEvent:!1}),this.availableAutopilots.set({"Default Autopilot":{provider:"Signal K Autopilot",isDefault:!0}}),this.pluginId.set("Signal K Autopilot"),this.autopilotFormGroup.get("pluginId")?.setValue("Signal K Autopilot",{emitEvent:!1}),console.log("[Autopilot Options] V1 API Signal K Autopilot plugin detected"),this.discoveryInProgress.set(!1);return}console.log("[Autopilot Options] V1 API plugin (signalk-autopilot) not found")}catch(e){console.error("[Autopilot Options] V1 plugin detection failed:",e)}console.warn("[Autopilot Options] No Autopilot detected"),this.discoveryInProgress.set(!1)})}checkV2Api(){return L(this,null,function*(){try{let e=yield ri(this.makeHttpRequest(this.http.get(gi.V2_AUTOPILOTS,{observe:"response",responseType:"json"})));return e&&e.body&&Object.keys(e.body).length>0?(this.availableAutopilots.set(e.body),console.log("[Autopilot Options] Discovered V2 API autopilot providers:",JSON.stringify(e.body))):(this.availableAutopilots.set({}),console.warn("[Autopilot Options] No V2 autopilot provider plugin found.")),e?.status===200}catch(e){if(e&&typeof e=="object"&&"status"in e){let i=e;i.status===404?console.log("[Autopilot Options] V2 API endpoint not found (404)"):i.status>=500?console.warn("[Autopilot Options] V2 API server error:",i.status,i.statusText):console.log("[Autopilot Options] V2 API call to discover Autopilot Providers failed:",i.status,i.statusText)}else console.log("[Autopilot Options] V2 API network error:",e);return!1}})}discoverV2AutopilotOptions(e){return L(this,null,function*(){let i;try{try{this.discoveryInProgress.set(!0),i=yield ri(this.makeHttpRequest(this.http.get(`${gi.V2_AUTOPILOTS}/${e}`))),console.log("[Autopilot Options] V2 Autopilot Options response:",JSON.stringify(i))}catch{i=hn,console.log(`[Autopilot Options] Default AP discovery endpoint error for instance '${e}'`)}return this.discoveryInProgress.set(!1),i}catch(t){return console.error("[Autopilot Options] Failed to discover V2 endpoints:",t),console.log(`[Autopilot Options] Using fallback V2 endpoints for instance '${e}'`),hn}})}onAutopilotInstanceIdChange(e){let i=e.value;if(e.value===""){this.modes.set(""),this.autopilotFormGroup.get("modes")?.setValue("",{emitEvent:!1});return}console.log("[Autopilot Options] Selected Autopilot Instance ID:",i),this.apiVersion()==="v2"?this.discoverV2AutopilotOptions(i).then(t=>{let r=t.options.modes||[];this.modes.set(r.join(", ")),this.autopilotFormGroup.get("modes")?.setValue(r,{emitEvent:!1}),console.log("[Autopilot Options] Autopilot plugin supported modes :",r.join(", "))}).catch(t=>{console.error("[Autopilot Options] Error requesting autopilot modes:",t),this.autopilotFormGroup.get("modes")?.setValue([],{emitEvent:!1})}):this.apiVersion()==="v1"&&(this.modes.set("standby, auto, wind, route"),this.autopilotFormGroup.get("modes")?.setValue("standby, auto, wind, route",{emitEvent:!1}),console.log("[Autopilot Options] Autopilot mode set to Raymarine v1 API modes: standby, auto, wind, route"))}makeHttpRequest(e){let i=e.pipe(Oe(this._destroyRef));return this.currentRequests.add(i),i.pipe(wi(()=>this.currentRequests.delete(i)))}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=v({type:o,selectors:[["select-autopilot"]],inputs:{formGroupName:[1,"formGroupName"]},decls:30,vars:4,consts:[[1,"display-content","tab-content"],[1,"autopilot-options",3,"formGroup"],[1,"flex-item-rounded-card","rounded-card-color",2,"margin-block","10px"],[2,"margin-block-start","0px"],["placeholder","Select autopilot...","formControlName","instanceId","name","instanceId","required","",3,"selectionChange"],["value",""],[3,"value"],[1,"flex-item-rounded-card","rounded-card-color",2,"margin-block","10px","margin-left","10px","margin-right","10px"],["name","headingDirectionTrue","formControlName","headingDirectionTrue"],["name","invertRudder","formControlName","invertRudder"]],template:function(i,t){i&1&&(a(0,"div",0)(1,"div",1)(2,"div",2)(3,"h3",3),l(4,"Signal K Service Discovery"),n(),a(5,"ul")(6,"li")(7,"b"),l(8,"API Version:"),n(),l(9),n(),a(10,"li")(11,"b"),l(12,"Plugin:"),n(),l(13),n()()(),a(14,"mat-form-field")(15,"mat-label"),l(16,"Target Autopilot"),n(),a(17,"mat-select",4),_("selectionChange",function(c){return t.onAutopilotInstanceIdChange(c)}),a(18,"mat-option",5),l(19,"No autopilot"),n(),S(20,ka,3,5,"mat-option",6,k),n()(),a(22,"div",7)(23,"b"),l(24,"Supported modes:"),n(),l(25),n(),a(26,"mat-checkbox",8),l(27," Display True Heading "),n(),a(28,"mat-checkbox",9),l(29," Invert Rudder Angle Indicator "),n()()()),i&2&&(s(),m("formGroup",t.autopilotFormGroup),s(8),U(" ",t.apiVersion()),s(4),U(" ",t.pluginId()),s(7),T(t.apInstances()),s(5),U(" ",t.modes()," "))},dependencies:[W,F,H,O,Z,Ne,le,V,B,We,be,Re,re,X,he,ji],styles:[".autopilot-options[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:10px}"]})}return o})();var Cn=()=>["measuring","capacity"],Ia=()=>["marineCompass","baseplateCompass"],Da=()=>["measuring"];function Pa(o,d){if(o&1&&b(0,"config-display-chart-options",5),o&2){let e=f();m("displayName",e.displayNameToControl)("datasetUUID",e.datasetUUIDToControl)("convertUnitTo",e.convertUnitToControl)("showAverageData",e.showAverageDataToControl)("trackAgainstAverage",e.trackAgainstAverageToControl)("datasetAverageArray",e.datasetAverageArrayToControl)("showDatasetMinimumValueLine",e.showDatasetMinimumValueLineToControl)("showDatasetMaximumValueLine",e.showDatasetMaximumValueLineToControl)("showDatasetAverageValueLine",e.showDatasetAverageValueLineToControl)("showDatasetAngleAverageValueLine",e.showDatasetAngleAverageValueLineToControl)("startScaleAtZero",e.startScaleAtZeroToControl)("showLabel",e.showLabelToControl)("showTimeScale",e.showTimeScaleToControl)("showYScale",e.showYScaleToControl)("yScaleSuggestedMin",e.yScaleSuggestedMinToControl)("yScaleSuggestedMax",e.yScaleSuggestedMaxToControl)("enableMinMaxScaleLimit",e.enableMinMaxScaleLimitToControl)("yScaleMin",e.yScaleMinToControl)("yScaleMax",e.yScaleMaxToControl)("numDecimal",e.numDecimalToControl)("verticalChart",e.verticalChartToControl)("inverseYAxis",e.inverseYAxisToControl)("color",e.colorToControl)}}function Fa(o,d){o&1&&b(0,"select-autopilot",6)}function Oa(o,d){o&1&&(a(0,"mat-form-field",16)(1,"mat-label"),l(2,"URL"),n(),b(3,"input",40),n())}function Ba(o,d){o&1&&(a(0,"mat-checkbox",17),l(1," Allow pointer events on embedded content. WARNING: this may prevent swipe gestures over the Embed widget or keyboard events, while the focus is in the embed, from triggering normal KIP interactions. "),n())}function Va(o,d){o&1&&(a(0,"mat-form-field",16)(1,"mat-label"),l(2,"Widget Label"),n(),b(3,"input",41),n())}function La(o,d){o&1&&(a(0,"mat-form-field",42)(1,"mat-label"),l(2,"Scale Start"),n(),b(3,"input",43),n(),a(4,"mat-form-field",42)(5,"mat-label"),l(6,"Scale End"),n(),b(7,"input",44),n())}function Na(o,d){o&1&&(a(0,"mat-form-field")(1,"mat-label"),l(2,"Integer Places"),n(),b(3,"input",45),n())}function Ra(o,d){if(o&1&&(a(0,"mat-form-field")(1,"mat-label"),l(2,"Decimal Places"),n(),b(3,"input",46),n()),o&2){let e=f(2);at(e.widgetConfig.showMiniChart!==void 0?"options-grid-span2":"")}}function Wa(o,d){o&1&&(a(0,"mat-checkbox",19),l(1," Show Min recorded value "),n())}function Ua(o,d){o&1&&(a(0,"mat-checkbox",20),l(1," Show Max recorded value "),n())}function qa(o,d){if(o&1&&(a(0,"mat-form-field")(1,"mat-label"),l(2,"Next Dashboard after start"),n(),b(3,"input",47),n()),o&2){let e=f(2);te("options-grid-span2",!e.widgetConfig.numInt)}}function Qa(o,d){if(o&1&&(a(0,"mat-option",50),l(1),n()),o&2){let e=d.$implicit;m("value",e.measure),s(),U(" ",e.description," ")}}function Ya(o,d){if(o&1&&(a(0,"mat-optgroup",49),S(1,Qa,2,2,"mat-option",50,k),n()),o&2){let e=f().$implicit;m("label",e.group),s(),T(e.units)}}function Ha(o,d){if(o&1&&u(0,Ya,3,1,"mat-optgroup",49),o&2){let e=d.$implicit,i=f(3);p(!i.widgetConfig.convertUnitToGroup||i.widgetConfig.convertUnitToGroup===""||i.widgetConfig.convertUnitToGroup===e.group?0:-1)}}function Za(o,d){if(o&1&&(a(0,"mat-form-field",22)(1,"mat-label"),l(2,"Display Units"),n(),a(3,"mat-select",48),S(4,Ha,1,1,null,null,k),n()()),o&2){let e=f(2);s(4),T(e.unitList.conversions)}}function ja(o,d){o&1&&(a(0,"mat-checkbox",23),l(1," Enable beeps on count down "),n())}function za(o,d){if(o&1&&b(0,"display-datetime-options",24),o&2){let e=f(2);m("dateFormat",e.dateFormatToControl)("dateTimezone",e.dateTimezoneToControl)}}function Xa(o,d){o&1&&(a(0,"mat-checkbox",25),l(1," Close-hauled Lines "),n())}function Ka(o,d){o&1&&(a(0,"mat-form-field")(1,"mat-label"),l(2,"Vessel Close-hauled Angle"),n(),b(3,"input",51),n())}function Ja(o,d){o&1&&(a(0,"mat-checkbox",26),l(1," Wind Sectors "),n())}function $a(o,d){o&1&&(a(0,"mat-form-field")(1,"mat-label"),l(2,"Sector Duration"),n(),b(3,"input",52),n())}function el(o,d){o&1&&(a(0,"mat-checkbox",27),l(1," Apparent Wind Speed Value "),n())}function tl(o,d){o&1&&(a(0,"mat-checkbox",28),l(1," True Wind Speed Value "),n())}function il(o,d){o&1&&(a(0,"mat-checkbox",29),l(1," Course Over Ground "),n())}function ol(o,d){o&1&&(a(0,"mat-checkbox",30),l(1," True Wind Angle Indicator "),n())}function nl(o,d){o&1&&(a(0,"mat-checkbox",31),l(1," Next Waypoint "),n())}function al(o,d){o&1&&(a(0,"mat-checkbox",32),l(1," Drift "),n())}function ll(o,d){o&1&&(a(0,"mat-form-field")(1,"mat-label"),l(2,"Minimum Value"),n(),b(3,"input",53),n())}function rl(o,d){o&1&&(a(0,"mat-form-field")(1,"mat-label"),l(2,"Maximum Value"),n(),b(3,"input",54),n())}function sl(o,d){o&1&&(a(0,"mat-checkbox",33),l(1," Ignore Zones configuration "),n())}function dl(o,d){o&1&&(a(0,"div",34)(1,"mat-checkbox",55),l(2," Show Heeling Side Label "),n()())}function cl(o,d){o&1&&(a(0,"div",34)(1,"mat-checkbox",56),l(2," Reverse Angle "),n()())}function ml(o,d){o&1&&(a(0,"mat-form-field",34)(1,"mat-label"),l(2,"Highlights Width"),n(),b(3,"input",57),n())}function Al(o,d){o&1&&(a(0,"mat-form-field",35)(1,"mat-label"),l(2,"Rotation Element"),n(),a(3,"mat-select",58)(4,"mat-option",59),l(5,"Dial (Marine Compass)"),n(),a(6,"mat-option",60),l(7,"Needle (Base plate compass)"),n()()(),a(8,"div",34)(9,"mat-checkbox",61),l(10," Show value box "),n()(),a(11,"div",34)(12,"mat-checkbox",62),l(13," Show cardinal degrees "),n()())}function ul(o,d){o&1&&(a(0,"mat-form-field",34)(1,"mat-label"),l(2,"Progress Bar Start Position"),n(),a(3,"mat-select",65)(4,"mat-option",66),l(5,"Left"),n(),a(6,"mat-option",67),l(7,"Middle"),n(),a(8,"mat-option",68),l(9,"Right"),n()()())}function pl(o,d){o&1&&(a(0,"mat-form-field",34)(1,"mat-label"),l(2,"Progress Bar Start Angle"),n(),b(3,"input",69),n())}function gl(o,d){if(o&1&&(a(0,"mat-form-field",34)(1,"mat-label"),l(2,"Gauge Type"),n(),a(3,"mat-select",58)(4,"mat-option",63),l(5,"Measuring"),n(),a(6,"mat-option",64),l(7,"Capacity"),n()()(),u(8,ul,10,0,"mat-form-field",34),u(9,pl,4,0,"mat-form-field",34)),o&2){let e=f(3);s(8),p((e.widgetConfig==null||e.widgetConfig.gauge==null?null:e.widgetConfig.gauge.type)==="ngRadial"&&yt(2,Da).includes(e.formMaster.value.gauge.subType)?8:-1),s(),p(e.formMaster.value.gauge.subType==="capacity"?9:-1)}}function fl(o,d){if(o&1&&u(0,Al,14,0)(1,gl,10,3),o&2){let e=f(2);p(yt(1,Ia).indexOf(e.formMaster.value.gauge.subType)>-1?0:yt(2,Cn).indexOf(e.formMaster.value.gauge.subType)>-1?1:-1)}}function hl(o,d){o&1&&(a(0,"div",34)(1,"mat-checkbox",70),l(2," Use needle indicator "),n()(),a(3,"div",34)(4,"mat-checkbox",71),l(5," Enable Ticks "),n()(),a(6,"mat-form-field",35)(7,"mat-label"),l(8,"Orientation"),n(),a(9,"mat-select",72)(10,"mat-option",73),l(11,"Vertical"),n(),a(12,"mat-option",74),l(13,"Horizontal"),n()()())}function bl(o,d){o&1&&(a(0,"mat-form-field",35)(1,"mat-label"),l(2,"Unit Label"),n(),a(3,"mat-select",75)(4,"mat-option",76),l(5,"Full Label"),n(),a(6,"mat-option",77),l(7,"First Letter Only"),n()()())}function Cl(o,d){if(o&1&&(a(0,"mat-option",50),l(1),n()),o&2){let e=d.$implicit;m("value",Me(e.value)),s(),E(e.label)}}function _l(o,d){if(o&1&&(a(0,"mat-form-field",16)(1,"mat-label"),l(2,"Color"),n(),a(3,"mat-select",78),S(4,Cl,2,3,"mat-option",50,k),n()()),o&2){let e=f(2);s(4),T(e.colors)}}function vl(o,d){o&1&&(a(0,"mat-form-field",16)(1,"mat-label"),l(2,"Scale Span"),n(),a(3,"mat-select",79)(4,"mat-option",80),l(5,"1 Minute"),n(),a(6,"mat-option",81),l(7,"5 Minutes"),n(),a(8,"mat-option",82),l(9,"30 Minutes"),n()()())}function Ml(o,d){o&1&&(a(0,"mat-checkbox",36),l(1," Show Background Graph "),a(2,"i"),l(3,"(Too many graphs may affect performance)"),n()())}function yl(o,d){o&1&&(a(0,"mat-form-field")(1,"mat-label"),l(2,"Suggested Scale Start"),n(),b(3,"input",83),n())}function Sl(o,d){o&1&&(a(0,"mat-form-field")(1,"mat-label"),l(2,"Suggested Scale End"),n(),b(3,"input",84),n())}function Tl(o,d){o&1&&(a(0,"mat-checkbox",37),l(1," Inverse Scale Axis "),n())}function xl(o,d){o&1&&(a(0,"mat-checkbox",38),l(1," Vertical Data Graph "),n())}function wl(o,d){o&1&&(a(0,"mat-checkbox",39),l(1," Disable background color "),n())}function El(o,d){if(o&1&&(a(0,"mat-option",50),l(1),n()),o&2){let e=d.$implicit;m("value",Me(e.value)),s(),E(e.label)}}function Gl(o,d){if(o&1&&(a(0,"mat-form-field")(1,"mat-label"),l(2,"Background Color"),n(),a(3,"mat-select",85),S(4,El,2,3,"mat-option",50,k),n()()),o&2){let e=f(2);s(4),T(e.colors)}}function kl(o,d){o&1&&(a(0,"mat-form-field",34)(1,"mat-label"),l(2,"Background Style"),n(),a(3,"mat-select",98)(4,"mat-option",99),l(5,"Dark Gray"),n(),a(6,"mat-option",100),l(7,"Satin Gray"),n(),a(8,"mat-option",101),l(9,"Light Gray"),n(),a(10,"mat-option",102),l(11,"White"),n(),a(12,"mat-option",103),l(13,"Black"),n(),a(14,"mat-option",104),l(15,"Beige"),n(),a(16,"mat-option",105),l(17,"Brown"),n(),a(18,"mat-option",106),l(19,"Red"),n(),a(20,"mat-option",107),l(21,"Green"),n(),a(22,"mat-option",108),l(23,"Blue"),n(),a(24,"mat-option",94),l(25,"Anthracite"),n(),a(26,"mat-option",109),l(27,"Mud"),n(),a(28,"mat-option",110),l(29,"Punched Sheet"),n(),a(30,"mat-option",111),l(31,"Carbon"),n(),a(32,"mat-option",112),l(33,"Stainless"),n(),a(34,"mat-option",113),l(35,"Brushed Metal"),n(),a(36,"mat-option",114),l(37,"Brushed Stainless"),n(),a(38,"mat-option",115),l(39,"Turned"),n()()())}function Il(o,d){o&1&&(a(0,"div",34)(1,"mat-checkbox",116),l(2," Reverse Pitch Axis "),n()(),a(3,"div",34)(4,"mat-checkbox",117),l(5," Reverse Roll Axis "),n()(),a(6,"div",34)(7,"mat-checkbox",118),l(8," Show Frame "),n()())}function Dl(o,d){if(o&1&&(u(0,kl,40,0,"mat-form-field",34),u(1,Il,9,0),a(2,"mat-form-field",34)(3,"mat-label"),l(4,"Frame Style"),n(),a(5,"mat-select",86)(6,"mat-option",87),l(7,"Black Metal"),n(),a(8,"mat-option",88),l(9,"Metal"),n(),a(10,"mat-option",89),l(11,"Shiny Metal"),n(),a(12,"mat-option",90),l(13,"Brass"),n(),a(14,"mat-option",91),l(15,"Steel"),n(),a(16,"mat-option",92),l(17,"Chrome"),n(),a(18,"mat-option",93),l(19,"Gold"),n(),a(20,"mat-option",94),l(21,"Anthracite"),n(),a(22,"mat-option",95),l(23,"Tilted Gray"),n(),a(24,"mat-option",96),l(25,"Tilted Black"),n(),a(26,"mat-option",97),l(27,"Glossy Metal"),n()()()),o&2){let e=f(2);p((e.widgetConfig==null||e.widgetConfig.gauge==null?null:e.widgetConfig.gauge.type)!=="horizon"?0:-1),s(),p((e.widgetConfig==null||e.widgetConfig.gauge==null?null:e.widgetConfig.gauge.type)==="horizon"?1:-1)}}function Pl(o,d){if(o&1&&(a(0,"div",7)(1,"div",15),u(2,Oa,4,0,"mat-form-field",16),u(3,Ba,2,0,"mat-checkbox",17),u(4,Va,4,0,"mat-form-field",16),u(5,La,8,0),u(6,Na,4,0,"mat-form-field"),u(7,Ra,4,2,"mat-form-field",18),u(8,Wa,2,0,"mat-checkbox",19),u(9,Ua,2,0,"mat-checkbox",20),u(10,qa,4,2,"mat-form-field",21),u(11,Za,6,0,"mat-form-field",22),u(12,ja,2,0,"mat-checkbox",23),u(13,za,1,2,"display-datetime-options",24),u(14,Xa,2,0,"mat-checkbox",25),u(15,Ka,4,0,"mat-form-field"),u(16,Ja,2,0,"mat-checkbox",26),u(17,$a,4,0,"mat-form-field"),u(18,el,2,0,"mat-checkbox",27),u(19,tl,2,0,"mat-checkbox",28),u(20,il,2,0,"mat-checkbox",29),u(21,ol,2,0,"mat-checkbox",30),u(22,nl,2,0,"mat-checkbox",31),u(23,al,2,0,"mat-checkbox",32),u(24,ll,4,0,"mat-form-field"),u(25,rl,4,0,"mat-form-field"),u(26,sl,2,0,"mat-checkbox",33),u(27,dl,3,0,"div",34),u(28,cl,3,0,"div",34),u(29,ml,4,0,"mat-form-field",34),u(30,fl,2,3),u(31,hl,14,0),u(32,bl,8,0,"mat-form-field",35),u(33,_l,6,0,"mat-form-field",16),u(34,vl,10,0,"mat-form-field",16),u(35,Ml,4,0,"mat-checkbox",36),u(36,yl,4,0,"mat-form-field"),u(37,Sl,4,0,"mat-form-field"),u(38,Tl,2,0,"mat-checkbox",37),u(39,xl,2,0,"mat-checkbox",38),u(40,wl,2,0,"mat-checkbox",39),u(41,Gl,6,0,"mat-form-field"),u(42,Dl,28,2),n()()),o&2){let e=f();s(2),p((e.widgetConfig==null?null:e.widgetConfig.widgetUrl)!==void 0?2:-1),s(),p((e.widgetConfig==null?null:e.widgetConfig.allowInput)!==void 0?3:-1),s(),p((e.widgetConfig==null?null:e.widgetConfig.displayName)!==void 0?4:-1),s(),p(e.formMaster.get("displayScale")?5:-1),s(),p((e.widgetConfig==null?null:e.widgetConfig.numInt)!==void 0?6:-1),s(),p((e.widgetConfig==null?null:e.widgetConfig.numDecimal)!==void 0?7:-1),s(),p((e.widgetConfig==null?null:e.widgetConfig.showMin)!==void 0?8:-1),s(),p((e.widgetConfig==null?null:e.widgetConfig.showMax)!==void 0?9:-1),s(),p((e.widgetConfig==null?null:e.widgetConfig.nextDashboard)!==void 0?10:-1),s(),p((e.widgetConfig==null?null:e.widgetConfig.convertUnitTo)!==void 0?11:-1),s(),p((e.widgetConfig==null?null:e.widgetConfig.playBeeps)!==void 0?12:-1),s(),p((e.widgetConfig==null?null:e.widgetConfig.dateFormat)!==void 0?13:-1),s(),p((e.widgetConfig==null?null:e.widgetConfig.laylineEnable)!==void 0?14:-1),s(),p((e.widgetConfig==null?null:e.widgetConfig.laylineEnable)!==void 0?15:-1),s(),p((e.widgetConfig==null?null:e.widgetConfig.windSectorEnable)!==void 0?16:-1),s(),p((e.widgetConfig==null?null:e.widgetConfig.windSectorEnable)!==void 0?17:-1),s(),p((e.widgetConfig==null?null:e.widgetConfig.awsEnable)!==void 0?18:-1),s(),p((e.widgetConfig==null?null:e.widgetConfig.twsEnable)!==void 0?19:-1),s(),p((e.widgetConfig==null?null:e.widgetConfig.courseOverGroundEnable)!==void 0?20:-1),s(),p((e.widgetConfig==null?null:e.widgetConfig.twaEnable)!==void 0?21:-1),s(),p((e.widgetConfig==null?null:e.widgetConfig.waypointEnable)!==void 0?22:-1),s(),p((e.widgetConfig==null?null:e.widgetConfig.driftEnable)!==void 0?23:-1),s(),p((e.widgetConfig==null?null:e.widgetConfig.minValue)!==void 0&&!e.formMaster.get("displayScale")?24:-1),s(),p((e.widgetConfig==null?null:e.widgetConfig.maxValue)!==void 0&&!e.formMaster.get("displayScale")?25:-1),s(),p((e.widgetConfig==null?null:e.widgetConfig.ignoreZones)!==void 0?26:-1),s(),p((e.widgetConfig==null||e.widgetConfig.gauge==null?null:e.widgetConfig.gauge.type)==="angle"?27:-1),s(),p((e.widgetConfig==null||e.widgetConfig.gauge==null?null:e.widgetConfig.gauge.type)==="angle"?28:-1),s(),p((e.widgetConfig==null||e.widgetConfig.gauge==null?null:e.widgetConfig.gauge.type)==="ngRadial"&&yt(41,Cn).includes(e.formMaster.value.gauge.subType)||(e.widgetConfig==null||e.widgetConfig.gauge==null?null:e.widgetConfig.gauge.type)==="ngLinear"?29:-1),s(),p((e.widgetConfig==null||e.widgetConfig.gauge==null?null:e.widgetConfig.gauge.type)==="ngRadial"?30:-1),s(),p((e.widgetConfig==null||e.widgetConfig.gauge==null?null:e.widgetConfig.gauge.type)==="ngLinear"?31:-1),s(),p((e.widgetConfig==null||e.widgetConfig.gauge==null?null:e.widgetConfig.gauge.type)==="simpleLinear"?32:-1),s(),p((e.widgetConfig==null?null:e.widgetConfig.color)!==void 0?33:-1),s(),p((e.widgetConfig==null?null:e.widgetConfig.timeScale)!==void 0?34:-1),s(),p((e.widgetConfig==null?null:e.widgetConfig.showMiniChart)!==void 0?35:-1),s(),p((e.widgetConfig==null?null:e.widgetConfig.yScaleMin)!==void 0?36:-1),s(),p((e.widgetConfig==null?null:e.widgetConfig.yScaleMax)!==void 0?37:-1),s(),p((e.widgetConfig==null?null:e.widgetConfig.inverseYAxis)!==void 0?38:-1),s(),p((e.widgetConfig==null?null:e.widgetConfig.verticalChart)!==void 0?39:-1),s(),p((e.widgetConfig==null?null:e.widgetConfig.noBgColor)!==void 0?40:-1),s(),p((e.widgetConfig==null?null:e.widgetConfig.bgColor)!==void 0?41:-1),s(),p((e.widgetConfig==null||e.widgetConfig.gauge==null?null:e.widgetConfig.gauge.type)==="steel"||(e.widgetConfig==null||e.widgetConfig.gauge==null?null:e.widgetConfig.gauge.type)==="horizon"?42:-1)}}function Fl(o,d){if(o&1&&(b(0,"span",122),l(1,"\xA0Controls ")),o&2){let e=f(2);nt(e.formMaster.controls.multiChildCtrls.valid?"display: none":"display: block")}}function Ol(o,d){if(o&1){let e=I();a(0,"mat-tab",8)(1,"div",119)(2,"div"),ke(3,Fl,2,2,"ng-template",120),n(),a(4,"boolean-multicontrol-options",121),_("addPath",function(t){M(e);let r=f();return y(r.addPathGroup(t))})("updatePath",function(t){M(e);let r=f();return y(r.updatePath(t))})("delPath",function(t){M(e);let r=f();return y(r.deletePath(t))}),n()()()}if(o&2){let e=f();s(4),m("multiCtrlArray",e.multiChildCtrlsToControl)}}function Bl(o,d){if(o&1&&(a(0,"span",124),l(1," error "),n(),l(2," \xA0Paths ")),o&2){let e=f(2);nt(e.formMaster.controls.paths.valid||e.formMaster.controls.paths.disabled?"display: none":"display: block")}}function Vl(o,d){if(o&1&&(a(0,"mat-tab",9)(1,"div",119)(2,"div"),ke(3,Bl,3,2,"ng-template",120),n(),b(4,"paths-options",123),n()()),o&2){let e=f();s(4),m("isArray",e.isPathArray)("enableTimeout",e.enableTimeoutToControl)("dataTimeout",e.dataTimeoutToControl)("filterSelfPaths",e.filterSelfPathsToControl)("addPathEvent",e.addPathEvent)("delPathEvent",e.delPathEvent)("updatePathEvent",e.updatePathEvent)}}function Ll(o,d){o&1&&(a(0,"p")(1,"mat-checkbox",127),l(2," Digital display "),n()())}function Nl(o,d){o&1&&(a(0,"mat-form-field",16)(1,"mat-label"),l(2,"Dial Size"),n(),a(3,"mat-select",128)(4,"mat-option",129),l(5,"1/4"),n(),a(6,"mat-option",130),l(7,"1/2"),n(),a(8,"mat-option",131),l(9,"3/4"),n(),a(10,"mat-option",76),l(11,"Full"),n()()())}function Rl(o,d){if(o&1&&(a(0,"mat-tab",10)(1,"div",7)(2,"mat-form-field",16)(3,"mat-label"),l(4,"Gauge Type"),n(),a(5,"mat-select",72)(6,"mat-option",125),l(7,"Linear"),n(),a(8,"mat-option",126),l(9,"Radial"),n()()(),u(10,Ll,3,0,"p"),u(11,Nl,12,0,"mat-form-field",16),n()()),o&2){let e=f();s(10),p(e.formMaster.value.gauge.subType==="linear"?10:-1),s(),p(e.formMaster.value.gauge.subType==="radial"?11:-1)}}function Wl(o,d){o&1&&(a(0,"p")(1,"mat-checkbox",134),l(2," Value to send on button push (checked = on, unchecked = off) "),n()())}function Ul(o,d){if(o&1&&(a(0,"mat-tab",11)(1,"div",119)(2,"p")(3,"mat-checkbox",132),l(4," Enable Put Requests "),n()(),a(5,"p")(6,"mat-checkbox",133),l(7," Momentary mode (instead of switching between on/off) "),n()(),u(8,Wl,3,0,"p"),n()()),o&2){let e=f();s(8),p(e.formMaster.controls.putMomentary.value?8:-1)}}function ql(o,d){o&1&&b(0,"span",122)}function Ql(o,d){if(o&1&&(u(0,ql,1,0,"span",122),l(1," Dataset ")),o&2){let e=f(2);p(e.formMaster.controls.datasetUUID.valid?-1:0)}}function Yl(o,d){if(o&1&&(a(0,"mat-tab",12),ke(1,Ql,2,1,"ng-template",120),b(2,"config-dataset-chart-options",135),n()),o&2){let e=f();s(2),m("datasetUUID",e.datasetUUIDToControl)("convertUnitTo",e.convertUnitToControl)}}var _n=(()=>{class o{static KEY_MULTI_CHILD_CTRLS="multiChildCtrls";static KEY_DISPLAY_SCALE="displayScale";static KEY_GAUGE="gauge";static KEY_AUTOPILOT="autopilot";static KEY_PATHS="paths";static KEY_CONVERT_UNIT_TO="convertUnitTo";dialogRef=A(me);fb=A(At);DatasetService=A(Xt);units=A(ft);app=A(dt);widgetConfig=A(Ae);titleDialog="Widget Options";formMaster;availableDataSets;unitList={};isPathArray=!1;addPathEvent;delPathEvent;updatePathEvent;colors=[];ngOnInit(){if(!this.widgetConfig){console.error("Widget configuration data is missing. Closing dialog."),this.dialogRef.close();return}this.availableDataSets=this.DatasetService.list().sort((e,i)=>{let t=e.label||"",r=i.label||"";return t.localeCompare(r,void 0,{sensitivity:"base"})}),this.unitList=this.units.getConversionsForPath(""),this.formMaster=this.generateFormGroups(this.widgetConfig),this.colors=this.app.configurableThemeColors}isPlainObject(e){return Object.prototype.toString.call(e)==="[object Object]"}generateFormGroups(e,i){let t=this.fb.group({});return Object.keys(e).forEach(r=>{let c=e[r];if(c!==null&&(Array.isArray(c)||this.isPlainObject(c))){if(r===o.KEY_MULTI_CHILD_CTRLS){t.addControl(r,this.fb.array([]));let g=t.get(r);c.forEach(C=>{g.push(this.generateCtrlArray(C))})}else if(r===o.KEY_DISPLAY_SCALE)t.addControl(r,this.generateFormGroups(c,r));else if(r===o.KEY_GAUGE)t.addControl(r,this.generateFormGroups(c,r));else if(r===o.KEY_AUTOPILOT)t.addControl(r,this.generateFormGroups(c,r));else if(r===o.KEY_PATHS){let g=c;if(this.widgetConfig.multiChildCtrls!==void 0){this.isPathArray=!0,t.addControl(r,this.fb.array([]));let C=t.get(r);Object.keys(g).forEach(w=>{let x=g[w];if(x){let G=this.generatePathArray(w,x);x.isPathConfigurable===!1&&G.disable(),C.push(G)}})}else{let C=this.fb.group({});Object.keys(g).forEach(w=>{let x=g[w];if(x){let G=this.generateFormGroups(x,w);x.isPathConfigurable===!1&&G.disable(),C.addControl(w,G)}}),t.addControl(r,C)}}i===o.KEY_PATHS&&t.addControl(r,this.generateFormGroups(c,r))}else if(i===o.KEY_CONVERT_UNIT_TO){let g=e[r];(g&&g.pathType=="number"||"datasetUUID"in this.widgetConfig)&&t.addControl(r,new ae(c))}else switch(r){case"path":t.addControl(r,new ae(c));break;case"datasetUUID":t.addControl(r,new ae(c,Y.required));break;case"dataTimeout":t.addControl(r,new ae(c,Y.required));break;default:t.addControl(r,new ae(c));break}}),t}generatePathArray(e,i){let t=new Io({});return Object.keys(i).forEach(r=>{t.addControl(r,this.generatePathFields(r,i[r]))}),t}generatePathFields(e,i){let t=null;switch(e){case"path":t=new ae(i);break;case"source":t=new ae(i,Y.required);break;case"sampleTime":t=new ae(i,Y.required);break;default:t=new ae(i);break}return t}generateCtrlArray(e){let i=this.fb.group(e);return i.get("ctrlLabel").addValidators(Y.required),i}addPathGroup(e){this.addPathEvent=e}updatePath(e){e.forEach(i=>{this.formMaster.get("paths").controls.forEach(r=>{r.get("pathID").value==i.pathID&&(r.controls.description.setValue(i.ctrlLabel),r.controls.pathType.setValue(i.isNumeric?"number":"boolean"),this.updatePathEvent=e)})})}deletePath(e){let i=this.formMaster.get("paths"),t=0;i.controls.forEach(c=>{c.get("pathID").value==e.pathID?i.removeAt(t):t++}),this.formMaster.get("multiChildCtrls").removeAt(e.ctrlIndex),this.delPathEvent=e.pathID,this.formMaster.updateValueAndValidity()}get convertUnitToControl(){return this.formMaster.get("convertUnitTo")}get datasetUUIDToControl(){return this.formMaster.get("datasetUUID")}get filterSelfPathsToControl(){return this.formMaster.get("filterSelfPaths")}get dataTimeoutToControl(){return this.formMaster.get("dataTimeout")}get enableTimeoutToControl(){return this.formMaster.get("enableTimeout")}get dateTimezoneToControl(){return this.formMaster.get("dateTimezone")}get yScaleSuggestedMaxToControl(){return this.formMaster.get("yScaleSuggestedMax")}get enableMinMaxScaleLimitToControl(){return this.formMaster.get("enableMinMaxScaleLimit")}get showDatasetMinimumValueLineToControl(){return this.formMaster.get("showDatasetMinimumValueLine")}get showDatasetMaximumValueLineToControl(){return this.formMaster.get("showDatasetMaximumValueLine")}get showDatasetAverageValueLineToControl(){return this.formMaster.get("showDatasetAverageValueLine")}get showDatasetAngleAverageValueLineToControl(){return this.formMaster.get("showDatasetAngleAverageValueLine")}get startScaleAtZeroToControl(){return this.formMaster.get("startScaleAtZero")}get showLabelToControl(){return this.formMaster.get("showLabel")}get showTimeScaleToControl(){return this.formMaster.get("showTimeScale")}get showYScaleToControl(){return this.formMaster.get("showYScale")}get yScaleSuggestedMinToControl(){return this.formMaster.get("yScaleSuggestedMin")}get yScaleMinToControl(){return this.formMaster.get("yScaleMin")}get yScaleMaxToControl(){return this.formMaster.get("yScaleMax")}get datasetAverageArrayToControl(){return this.formMaster.get("datasetAverageArray")}get trackAgainstAverageToControl(){return this.formMaster.get("trackAgainstAverage")}get showAverageDataToControl(){return this.formMaster.get("showAverageData")}get displayNameToControl(){return this.formMaster.get("displayName")}get numDecimalToControl(){return this.formMaster.get("numDecimal")}get verticalChartToControl(){return this.formMaster.get("verticalChart")}get inverseYAxisToControl(){return this.formMaster.get("inverseYAxis")}get colorToControl(){return this.formMaster.get("color")}get dateFormatToControl(){return this.formMaster.get("dateFormat")}get multiChildCtrlsToControl(){return this.formMaster.get("multiChildCtrls")}submitConfig(){this.dialogRef.close(this.formMaster.getRawValue())}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=v({type:o,selectors:[["modal-widget-config"]],decls:20,vars:9,consts:[[3,"ngSubmit","formGroup"],["mat-dialog-title",""],[1,"widget-config-dialog-content"],[1,"tab-group-content"],["label","Display"],[1,"tab-content",3,"displayName","datasetUUID","convertUnitTo","showAverageData","trackAgainstAverage","datasetAverageArray","showDatasetMinimumValueLine","showDatasetMaximumValueLine","showDatasetAverageValueLine","showDatasetAngleAverageValueLine","startScaleAtZero","showLabel","showTimeScale","showYScale","yScaleSuggestedMin","yScaleSuggestedMax","enableMinMaxScaleLimit","yScaleMin","yScaleMax","numDecimal","verticalChart","inverseYAxis","color"],["formGroupName","autopilot",1,"tab-content"],[1,"display-content","tab-content"],["label","Controls"],["label","Paths"],["label","Settings","formGroupName","gauge"],["label","Put Request"],["label","Dataset"],["type","button","mat-dialog-close","","mat-flat-button",""],["mat-flat-button","","type","submit",3,"disabled"],[1,"widget-options-grid"],[1,"options-grid-span2"],["name","allowInput","formControlName","allowInput",1,"options-grid-span2"],[3,"class"],["name","showMin","formControlName","showMin"],["name","showMax","formControlName","showMax"],[3,"options-grid-span2"],[1,"fields"],["name","playBeeps","formControlName","playBeeps"],[1,"options-grid-span2",3,"dateFormat","dateTimezone"],["name","laylineEnable","formControlName","laylineEnable",1,"fields"],["name","windSectorEnable","formControlName","windSectorEnable"],["name","awsEnable","formControlName","awsEnable"],["name","twsEnable","formControlName","twsEnable"],["name","courseOverGroundEnable","formControlName","courseOverGroundEnable"],["name","twaEnable","formControlName","twaEnable"],["name","waypointEnable","formControlName","waypointEnable"],["name","driftEnable","formControlName","driftEnable"],["name","ignoreZones","formControlName","ignoreZones"],["formGroupName","gauge"],["formGroupName","gauge",1,"options-grid-span2"],["name","showMiniChart","formControlName","showMiniChart",1,"options-grid-span2"],["name","inverseYAxis","formControlName","inverseYAxis"],["name","verticalChart","formControlName","verticalChart"],["name","noBgColor","formControlName","noBgColor"],["type","url","matInput","","placeholder","Enter URL to page/resource","name","widgetUrl","formControlName","widgetUrl"],["matInput","","placeholder","Enter a label to display","name","displayName","formControlName","displayName"],["formGroupName","displayScale","appearance","outline"],["matNativeControl","","type","number","name","lower","formControlName","lower","placeholder","Enter number..."],["matInput","","type","number","name","upper","formControlName","upper","placeholder","Enter number..."],["type","number","min","1","max","5","matInput","","placeholder","Enter or select number...","name","numInt","formControlName","numInt","required",""],["type","number","min","0","max","5","matInput","","placeholder","Enter or select number...","name","numDecimal","formControlName","numDecimal","required",""],["type","number","min","0","max","99","matInput","","placeholder","Enter or select number...","name","nextDashboard","formControlName","nextDashboard"],["placeholder","Select unit","formControlName","convertUnitTo","required",""],[3,"label"],[3,"value"],["type","number","min","10","max","90","matInput","","placeholder","Select angle...","name","laylineAngle","formControlName","laylineAngle"],["type","number","min","1","max","90","matInput","","placeholder","Select or enter duration...","name","windSectorWindowSeconds","formControlName","windSectorWindowSeconds"],["matInput","","type","number","name","minValue","formControlName","minValue","placeholder","Enter or select number..."],["matInput","","type","number","name","maxValue","formControlName","maxValue","placeholder","Enter or select number..."],["name","sideLabel","formControlName","sideLabel"],["name","invertAngle","formControlName","invertAngle"],["type","number","min","0","max","25","matInput","","placeholder","Enter or select number...","name","highlightsWidth","formControlName","highlightsWidth","required",""],["placeholder","Select Gauge Type...","formControlName","subType","name","subType"],["value","marineCompass"],["value","baseplateCompass"],["name","showValueBox","formControlName","showValueBox"],["name","compassUseNumbers","formControlName","compassUseNumbers"],["value","measuring"],["value","capacity"],["placeholder","Select start position...","formControlName","barStartPosition","name","barStartPosition"],["value","left"],["value","middle"],["value","right"],["type","number","min","1","max","360","matInput","","placeholder","Enter or select number...","name","scaleStart","formControlName","scaleStart","required",""],["name","useNeedle","formControlName","useNeedle"],["name","enableTicks","formControlName","enableTicks"],["placeholder","Select type...","formControlName","subType","name","subType"],["value","vertical"],["value","horizontal"],["placeholder","Select label format","formControlName","unitLabelFormat","name","unitLabelFormat"],["value","full"],["value","abr"],["placeholder","Select Color...","formControlName","color","name","color","required",""],["placeholder","Select span duration...","formControlName","timeScale","name","timeScale","required",""],["value","Last Minute"],["value","Last 5 Minutes"],["value","Last 30 Minutes"],["type","number","matInput","","placeholder","Enter or select number...","name","yScaleMin","formControlName","yScaleMin","required",""],["type","number","matInput","","placeholder","Enter or select number...","name","yScaleMax","formControlName","yScaleMax","required",""],["placeholder","Select Color...","formControlName","bgColor","name","bgColor","required",""],["placeholder","Select style...","formControlName","faceColor","name","faceColor"],["value","blackMetal"],["value","metal"],["value","shinyMetal"],["value","brass"],["value","steel"],["value","chrome"],["value","gold"],["value","anthracite"],["value","tiltedGray"],["value","tiltedBlack"],["value","glossyMetal"],["placeholder","Select style...","formControlName","backgroundColor","name","backgroundColor"],["value","darkGray"],["value","satinGray"],["value","lightGray"],["value","white"],["value","black"],["value","beige"],["value","brown"],["value","red"],["value","green"],["value","blue"],["value","mud"],["value","punchedSheet"],["value","carbon"],["value","stainless"],["value","brushedMetal"],["value","brushedStainless"],["value","turned"],["name","invertPitch","formControlName","invertPitch"],["name","invertRoll","formControlName","invertRoll"],["name","noFrameVisible","formControlName","noFrameVisible"],[1,"tab-content"],["mat-tab-label",""],[3,"addPath","updatePath","delPath","multiCtrlArray"],[1,"warning","fa","fa-exclamation-circle"],["formGroupName","paths",3,"isArray","enableTimeout","dataTimeout","filterSelfPaths","addPathEvent","delPathEvent","updatePathEvent"],[1,"warning","material-icons"],["value","linear"],["value","radial"],["formControlName","digitalMeter","name","digitalMeter"],["placeholder","Select size...","formControlName","radialSize","name","radialSize"],["value","quarter"],["value","half"],["value","three-quarter"],["formControlName","putEnable","name","putEnable"],["formControlName","putMomentary","name","putMomentary"],["formControlName","putMomentaryValue","name","putMomentaryValue"],[3,"datasetUUID","convertUnitTo"]],template:function(i,t){i&1&&(a(0,"form",0),_("ngSubmit",function(){return t.submitConfig()}),a(1,"h6",1),l(2),n(),a(3,"mat-dialog-content",2)(4,"mat-tab-group",3)(5,"mat-tab",4),u(6,Pa,1,23,"config-display-chart-options",5)(7,Fa,1,0,"select-autopilot",6)(8,Pl,43,42,"div",7),n(),u(9,Ol,5,1,"mat-tab",8),u(10,Vl,5,7,"mat-tab",9),u(11,Rl,12,2,"mat-tab",10),u(12,Ul,9,1,"mat-tab",11),u(13,Yl,3,2,"mat-tab",12),n()(),b(14,"mat-divider"),a(15,"mat-dialog-actions")(16,"button",13),l(17,"Cancel"),n(),a(18,"button",14),l(19," Save "),n()()()),i&2&&(m("formGroup",t.formMaster),s(2),E(t.titleDialog),s(4),p((t.widgetConfig==null?null:t.widgetConfig.datasetUUID)!==void 0?6:t.widgetConfig!=null&&t.widgetConfig.autopilot?7:8),s(3),p((t.widgetConfig==null?null:t.widgetConfig.multiChildCtrls)!==void 0?9:-1),s(),p((t.widgetConfig==null?null:t.widgetConfig.paths)!==void 0?10:-1),s(),p((t.widgetConfig==null||t.widgetConfig.gauge==null?null:t.widgetConfig.gauge.type)==="steel"?11:-1),s(),p((t.widgetConfig==null?null:t.widgetConfig.putEnable)!==void 0&&(t.widgetConfig==null?null:t.widgetConfig.multiChildCtrls)===void 0?12:-1),s(),p((t.widgetConfig==null?null:t.widgetConfig.datasetUUID)!==void 0?13:-1),s(5),m("disabled",!t.formMaster.valid))},dependencies:[j,ct,Q,Le,F,H,O,mt,zt,W,Z,Ne,Po,ne,ue,pe,Ve,ge,le,V,B,he,z,$o,Xo,Ko,Jo,We,be,Re,re,X,gt,Lo,Vo,ee,ce,fn,ln,rn,an,gn,bn],styles:["[_nghost-%COMP%]{display:block;height:100%;width:100%}.widget-config-dialog-content[_ngcontent-%COMP%]{height:100%}.display-content[_ngcontent-%COMP%]{display:block;height:100%;width:100%;padding-top:15px;padding-bottom:10px}.warning[_ngcontent-%COMP%]{color:var(--mat-sys-error-container)}.tab-group-content[_ngcontent-%COMP%]{overflow:hidden;width:100%}"]})}return o})();var Hl=["button"],Zl=["*"];function jl(o,d){if(o&1&&(a(0,"div",2),b(1,"mat-pseudo-checkbox",6),n()),o&2){let e=f();s(),m("disabled",e.disabled)}}var vn=new ve("MAT_BUTTON_TOGGLE_DEFAULT_OPTIONS",{providedIn:"root",factory:zl});function zl(){return{hideSingleSelectionIndicator:!1,hideMultipleSelectionIndicator:!1,disabledInteractive:!1}}var Mn=new ve("MatButtonToggleGroup"),Xl={provide:Ht,useExisting:Dt(()=>fi),multi:!0},ii=class{source;value;constructor(d,e){this.source=d,this.value=e}},fi=(()=>{class o{_changeDetector=A(rt);_dir=A(Yt,{optional:!0});_multiple=!1;_disabled=!1;_disabledInteractive=!1;_selectionModel;_rawValue;_controlValueAccessorChangeFn=()=>{};_onTouched=()=>{};_buttonToggles;appearance;get name(){return this._name}set name(e){this._name=e,this._markButtonsForCheck()}_name=A(St).getId("mat-button-toggle-group-");vertical;get value(){let e=this._selectionModel?this._selectionModel.selected:[];return this.multiple?e.map(i=>i.value):e[0]?e[0].value:void 0}set value(e){this._setSelectionByValue(e),this.valueChange.emit(this.value)}valueChange=new se;get selected(){let e=this._selectionModel?this._selectionModel.selected:[];return this.multiple?e:e[0]||null}get multiple(){return this._multiple}set multiple(e){this._multiple=e,this._markButtonsForCheck()}get disabled(){return this._disabled}set disabled(e){this._disabled=e,this._markButtonsForCheck()}get disabledInteractive(){return this._disabledInteractive}set disabledInteractive(e){this._disabledInteractive=e,this._markButtonsForCheck()}get dir(){return this._dir&&this._dir.value==="rtl"?"rtl":"ltr"}change=new se;get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=e,this._markButtonsForCheck()}_hideSingleSelectionIndicator;get hideMultipleSelectionIndicator(){return this._hideMultipleSelectionIndicator}set hideMultipleSelectionIndicator(e){this._hideMultipleSelectionIndicator=e,this._markButtonsForCheck()}_hideMultipleSelectionIndicator;constructor(){let e=A(vn,{optional:!0});this.appearance=e&&e.appearance?e.appearance:"standard",this.hideSingleSelectionIndicator=e?.hideSingleSelectionIndicator??!1,this.hideMultipleSelectionIndicator=e?.hideMultipleSelectionIndicator??!1}ngOnInit(){this._selectionModel=new Yo(this.multiple,void 0,!1)}ngAfterContentInit(){this._selectionModel.select(...this._buttonToggles.filter(e=>e.checked)),this.multiple||this._initializeTabIndex()}writeValue(e){this.value=e,this._changeDetector.markForCheck()}registerOnChange(e){this._controlValueAccessorChangeFn=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e}_keydown(e){if(this.multiple||this.disabled)return;let t=e.target.id,r=this._buttonToggles.toArray().findIndex(g=>g.buttonId===t),c=null;switch(e.keyCode){case 32:case 13:c=this._buttonToggles.get(r)||null;break;case 38:c=this._getNextButton(r,-1);break;case 37:c=this._getNextButton(r,this.dir==="ltr"?-1:1);break;case 40:c=this._getNextButton(r,1);break;case 39:c=this._getNextButton(r,this.dir==="ltr"?1:-1);break;default:return}c&&(e.preventDefault(),c._onButtonClick(),c.focus())}_emitChangeEvent(e){let i=new ii(e,this.value);this._rawValue=i.value,this._controlValueAccessorChangeFn(i.value),this.change.emit(i)}_syncButtonToggle(e,i,t=!1,r=!1){!this.multiple&&this.selected&&!e.checked&&(this.selected.checked=!1),this._selectionModel?i?this._selectionModel.select(e):this._selectionModel.deselect(e):r=!0,r?Promise.resolve().then(()=>this._updateModelValue(e,t)):this._updateModelValue(e,t)}_isSelected(e){return this._selectionModel&&this._selectionModel.isSelected(e)}_isPrechecked(e){return typeof this._rawValue>"u"?!1:this.multiple&&Array.isArray(this._rawValue)?this._rawValue.some(i=>e.value!=null&&i===e.value):e.value===this._rawValue}_initializeTabIndex(){if(this._buttonToggles.forEach(e=>{e.tabIndex=-1}),this.selected)this.selected.tabIndex=0;else for(let e=0;e<this._buttonToggles.length;e++){let i=this._buttonToggles.get(e);if(!i.disabled){i.tabIndex=0;break}}}_getNextButton(e,i){let t=this._buttonToggles;for(let r=1;r<=t.length;r++){let c=(e+i*r+t.length)%t.length,g=t.get(c);if(g&&!g.disabled)return g}return null}_setSelectionByValue(e){if(this._rawValue=e,!this._buttonToggles)return;let i=this._buttonToggles.toArray();if(this.multiple&&e?(Array.isArray(e),this._clearSelection(),e.forEach(t=>this._selectValue(t,i))):(this._clearSelection(),this._selectValue(e,i)),!this.multiple&&i.every(t=>t.tabIndex===-1)){for(let t of i)if(!t.disabled){t.tabIndex=0;break}}}_clearSelection(){this._selectionModel.clear(),this._buttonToggles.forEach(e=>{e.checked=!1,this.multiple||(e.tabIndex=-1)})}_selectValue(e,i){for(let t of i)if(t.value===e){t.checked=!0,this._selectionModel.select(t),this.multiple||(t.tabIndex=0);break}}_updateModelValue(e,i){i&&this._emitChangeEvent(e),this.valueChange.emit(this.value)}_markButtonsForCheck(){this._buttonToggles?.forEach(e=>e._markForCheck())}static \u0275fac=function(i){return new(i||o)};static \u0275dir=it({type:o,selectors:[["mat-button-toggle-group"]],contentQueries:function(i,t,r){if(i&1&&_t(r,oi,5),i&2){let c;Ie(c=De())&&(t._buttonToggles=c)}},hostAttrs:[1,"mat-button-toggle-group"],hostVars:6,hostBindings:function(i,t){i&1&&_("keydown",function(c){return t._keydown(c)}),i&2&&(K("role",t.multiple?"group":"radiogroup")("aria-disabled",t.disabled),te("mat-button-toggle-vertical",t.vertical)("mat-button-toggle-group-appearance-standard",t.appearance==="standard"))},inputs:{appearance:"appearance",name:"name",vertical:[2,"vertical","vertical",N],value:"value",multiple:[2,"multiple","multiple",N],disabled:[2,"disabled","disabled",N],disabledInteractive:[2,"disabledInteractive","disabledInteractive",N],hideSingleSelectionIndicator:[2,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",N],hideMultipleSelectionIndicator:[2,"hideMultipleSelectionIndicator","hideMultipleSelectionIndicator",N]},outputs:{valueChange:"valueChange",change:"change"},exportAs:["matButtonToggleGroup"],features:[Mt([Xl,{provide:Mn,useExisting:o}])]})}return o})(),oi=(()=>{class o{_changeDetectorRef=A(rt);_elementRef=A(He);_focusMonitor=A(ao);_idGenerator=A(St);_animationDisabled=Be();_checked=!1;ariaLabel;ariaLabelledby=null;_buttonElement;buttonToggleGroup;get buttonId(){return`${this.id}-button`}id;name;value;get tabIndex(){return this._tabIndex()}set tabIndex(e){this._tabIndex.set(e)}_tabIndex;disableRipple;get appearance(){return this.buttonToggleGroup?this.buttonToggleGroup.appearance:this._appearance}set appearance(e){this._appearance=e}_appearance;get checked(){return this.buttonToggleGroup?this.buttonToggleGroup._isSelected(this):this._checked}set checked(e){e!==this._checked&&(this._checked=e,this.buttonToggleGroup&&this.buttonToggleGroup._syncButtonToggle(this,this._checked),this._changeDetectorRef.markForCheck())}get disabled(){return this._disabled||this.buttonToggleGroup&&this.buttonToggleGroup.disabled}set disabled(e){this._disabled=e}_disabled=!1;get disabledInteractive(){return this._disabledInteractive||this.buttonToggleGroup!==null&&this.buttonToggleGroup.disabledInteractive}set disabledInteractive(e){this._disabledInteractive=e}_disabledInteractive;change=new se;constructor(){A(lo).load(Ao);let e=A(Mn,{optional:!0}),i=A(new Yi("tabindex"),{optional:!0})||"",t=A(vn,{optional:!0});this._tabIndex=P(parseInt(i)||0),this.buttonToggleGroup=e,this.appearance=t&&t.appearance?t.appearance:"standard",this.disabledInteractive=t?.disabledInteractive??!1}ngOnInit(){let e=this.buttonToggleGroup;this.id=this.id||this._idGenerator.getId("mat-button-toggle-"),e&&(e._isPrechecked(this)?this.checked=!0:e._isSelected(this)!==this._checked&&e._syncButtonToggle(this,this._checked))}ngAfterViewInit(){this._animationDisabled||this._elementRef.nativeElement.classList.add("mat-button-toggle-animations-enabled"),this._focusMonitor.monitor(this._elementRef,!0)}ngOnDestroy(){let e=this.buttonToggleGroup;this._focusMonitor.stopMonitoring(this._elementRef),e&&e._isSelected(this)&&e._syncButtonToggle(this,!1,!1,!0)}focus(e){this._buttonElement.nativeElement.focus(e)}_onButtonClick(){if(this.disabled)return;let e=this.isSingleSelector()?!0:!this._checked;if(e!==this._checked&&(this._checked=e,this.buttonToggleGroup&&(this.buttonToggleGroup._syncButtonToggle(this,this._checked,!0),this.buttonToggleGroup._onTouched())),this.isSingleSelector()){let i=this.buttonToggleGroup._buttonToggles.find(t=>t.tabIndex===0);i&&(i.tabIndex=-1),this.tabIndex=0}this.change.emit(new ii(this,this.value))}_markForCheck(){this._changeDetectorRef.markForCheck()}_getButtonName(){return this.isSingleSelector()?this.buttonToggleGroup.name:this.name||null}isSingleSelector(){return this.buttonToggleGroup&&!this.buttonToggleGroup.multiple}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=v({type:o,selectors:[["mat-button-toggle"]],viewQuery:function(i,t){if(i&1&&vt(Hl,5),i&2){let r;Ie(r=De())&&(t._buttonElement=r.first)}},hostAttrs:["role","presentation",1,"mat-button-toggle"],hostVars:14,hostBindings:function(i,t){i&1&&_("focus",function(){return t.focus()}),i&2&&(K("aria-label",null)("aria-labelledby",null)("id",t.id)("name",null),te("mat-button-toggle-standalone",!t.buttonToggleGroup)("mat-button-toggle-checked",t.checked)("mat-button-toggle-disabled",t.disabled)("mat-button-toggle-disabled-interactive",t.disabledInteractive)("mat-button-toggle-appearance-standard",t.appearance==="standard"))},inputs:{ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],id:"id",name:"name",value:"value",tabIndex:"tabIndex",disableRipple:[2,"disableRipple","disableRipple",N],appearance:"appearance",checked:[2,"checked","checked",N],disabled:[2,"disabled","disabled",N],disabledInteractive:[2,"disabledInteractive","disabledInteractive",N]},outputs:{change:"change"},exportAs:["matButtonToggle"],ngContentSelectors:Zl,decls:7,vars:13,consts:[["button",""],["type","button",1,"mat-button-toggle-button","mat-focus-indicator",3,"click","id","disabled"],[1,"mat-button-toggle-checkbox-wrapper"],[1,"mat-button-toggle-label-content"],[1,"mat-button-toggle-focus-overlay"],["matRipple","",1,"mat-button-toggle-ripple",3,"matRippleTrigger","matRippleDisabled"],["state","checked","aria-hidden","true","appearance","minimal",3,"disabled"]],template:function(i,t){if(i&1){let r=I();Ot(),a(0,"button",1,0),_("click",function(){return M(r),y(t._onButtonClick())}),u(2,jl,2,1,"div",2),a(3,"span",3),Bt(4),n()(),b(5,"span",4)(6,"span",5)}if(i&2){let r=oe(1);m("id",t.buttonId)("disabled",t.disabled&&!t.disabledInteractive||null),K("role",t.isSingleSelector()?"radio":"button")("tabindex",t.disabled&&!t.disabledInteractive?-1:t.tabIndex)("aria-pressed",t.isSingleSelector()?null:t.checked)("aria-checked",t.isSingleSelector()?t.checked:null)("name",t._getButtonName())("aria-label",t.ariaLabel)("aria-labelledby",t.ariaLabelledby)("aria-disabled",t.disabled&&t.disabledInteractive?"true":null),s(2),p(t.buttonToggleGroup&&(!t.buttonToggleGroup.multiple&&!t.buttonToggleGroup.hideSingleSelectionIndicator||t.buttonToggleGroup.multiple&&!t.buttonToggleGroup.hideMultipleSelectionIndicator)?2:-1),s(4),m("matRippleTrigger",r)("matRippleDisabled",t.disableRipple||t.disabled)}},dependencies:[mo,No],styles:[`.mat-button-toggle-standalone,.mat-button-toggle-group{position:relative;display:inline-flex;flex-direction:row;white-space:nowrap;overflow:hidden;-webkit-tap-highlight-color:rgba(0,0,0,0);border-radius:var(--mat-button-toggle-legacy-shape);transform:translateZ(0)}.mat-button-toggle-standalone:not([class*=mat-elevation-z]),.mat-button-toggle-group:not([class*=mat-elevation-z]){box-shadow:0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12)}@media(forced-colors: active){.mat-button-toggle-standalone,.mat-button-toggle-group{outline:solid 1px}}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard,.mat-button-toggle-group-appearance-standard{border-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large));border:solid 1px var(--mat-button-toggle-divider-color, var(--mat-sys-outline))}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard .mat-pseudo-checkbox,.mat-button-toggle-group-appearance-standard .mat-pseudo-checkbox{--mat-pseudo-checkbox-minimal-selected-checkmark-color: var(--mat-button-toggle-selected-state-text-color, var(--mat-sys-on-secondary-container))}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard:not([class*=mat-elevation-z]),.mat-button-toggle-group-appearance-standard:not([class*=mat-elevation-z]){box-shadow:none}@media(forced-colors: active){.mat-button-toggle-standalone.mat-button-toggle-appearance-standard,.mat-button-toggle-group-appearance-standard{outline:0}}.mat-button-toggle-vertical{flex-direction:column}.mat-button-toggle-vertical .mat-button-toggle-label-content{display:block}.mat-button-toggle{white-space:nowrap;position:relative;color:var(--mat-button-toggle-legacy-text-color);font-family:var(--mat-button-toggle-legacy-label-text-font);font-size:var(--mat-button-toggle-legacy-label-text-size);line-height:var(--mat-button-toggle-legacy-label-text-line-height);font-weight:var(--mat-button-toggle-legacy-label-text-weight);letter-spacing:var(--mat-button-toggle-legacy-label-text-tracking);--mat-pseudo-checkbox-minimal-selected-checkmark-color: var(--mat-button-toggle-legacy-selected-state-text-color)}.mat-button-toggle.cdk-keyboard-focused .mat-button-toggle-focus-overlay{opacity:var(--mat-button-toggle-legacy-focus-state-layer-opacity)}.mat-button-toggle .mat-icon svg{vertical-align:top}.mat-button-toggle-checkbox-wrapper{display:inline-block;justify-content:flex-start;align-items:center;width:0;height:18px;line-height:18px;overflow:hidden;box-sizing:border-box;position:absolute;top:50%;left:16px;transform:translate3d(0, -50%, 0)}[dir=rtl] .mat-button-toggle-checkbox-wrapper{left:auto;right:16px}.mat-button-toggle-appearance-standard .mat-button-toggle-checkbox-wrapper{left:12px}[dir=rtl] .mat-button-toggle-appearance-standard .mat-button-toggle-checkbox-wrapper{left:auto;right:12px}.mat-button-toggle-checked .mat-button-toggle-checkbox-wrapper{width:18px}.mat-button-toggle-animations-enabled .mat-button-toggle-checkbox-wrapper{transition:width 150ms 45ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-button-toggle-vertical .mat-button-toggle-checkbox-wrapper{transition:none}.mat-button-toggle-checked{color:var(--mat-button-toggle-legacy-selected-state-text-color);background-color:var(--mat-button-toggle-legacy-selected-state-background-color)}.mat-button-toggle-disabled{pointer-events:none;color:var(--mat-button-toggle-legacy-disabled-state-text-color);background-color:var(--mat-button-toggle-legacy-disabled-state-background-color);--mat-pseudo-checkbox-minimal-disabled-selected-checkmark-color: var(--mat-button-toggle-legacy-disabled-state-text-color)}.mat-button-toggle-disabled.mat-button-toggle-checked{background-color:var(--mat-button-toggle-legacy-disabled-selected-state-background-color)}.mat-button-toggle-disabled-interactive{pointer-events:auto}.mat-button-toggle-appearance-standard{color:var(--mat-button-toggle-text-color, var(--mat-sys-on-surface));background-color:var(--mat-button-toggle-background-color, transparent);font-family:var(--mat-button-toggle-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mat-button-toggle-label-text-size, var(--mat-sys-label-large-size));line-height:var(--mat-button-toggle-label-text-line-height, var(--mat-sys-label-large-line-height));font-weight:var(--mat-button-toggle-label-text-weight, var(--mat-sys-label-large-weight));letter-spacing:var(--mat-button-toggle-label-text-tracking, var(--mat-sys-label-large-tracking))}.mat-button-toggle-group-appearance-standard .mat-button-toggle-appearance-standard+.mat-button-toggle-appearance-standard{border-left:solid 1px var(--mat-button-toggle-divider-color, var(--mat-sys-outline))}[dir=rtl] .mat-button-toggle-group-appearance-standard .mat-button-toggle-appearance-standard+.mat-button-toggle-appearance-standard{border-left:none;border-right:solid 1px var(--mat-button-toggle-divider-color, var(--mat-sys-outline))}.mat-button-toggle-group-appearance-standard.mat-button-toggle-vertical .mat-button-toggle-appearance-standard+.mat-button-toggle-appearance-standard{border-left:none;border-right:none;border-top:solid 1px var(--mat-button-toggle-divider-color, var(--mat-sys-outline))}.mat-button-toggle-appearance-standard.mat-button-toggle-checked{color:var(--mat-button-toggle-selected-state-text-color, var(--mat-sys-on-secondary-container));background-color:var(--mat-button-toggle-selected-state-background-color, var(--mat-sys-secondary-container))}.mat-button-toggle-appearance-standard.mat-button-toggle-disabled{color:var(--mat-button-toggle-disabled-state-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mat-button-toggle-disabled-state-background-color, transparent)}.mat-button-toggle-appearance-standard.mat-button-toggle-disabled .mat-pseudo-checkbox{--mat-pseudo-checkbox-minimal-disabled-selected-checkmark-color: var(--mat-button-toggle-disabled-selected-state-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-button-toggle-appearance-standard.mat-button-toggle-disabled.mat-button-toggle-checked{color:var(--mat-button-toggle-disabled-selected-state-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mat-button-toggle-disabled-selected-state-background-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-button-toggle-appearance-standard .mat-button-toggle-focus-overlay{background-color:var(--mat-button-toggle-state-layer-color, var(--mat-sys-on-surface))}.mat-button-toggle-appearance-standard:hover .mat-button-toggle-focus-overlay{opacity:var(--mat-button-toggle-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-button-toggle-appearance-standard.cdk-keyboard-focused .mat-button-toggle-focus-overlay{opacity:var(--mat-button-toggle-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}@media(hover: none){.mat-button-toggle-appearance-standard:hover .mat-button-toggle-focus-overlay{display:none}}.mat-button-toggle-label-content{-webkit-user-select:none;user-select:none;display:inline-block;padding:0 16px;line-height:var(--mat-button-toggle-legacy-height);position:relative}.mat-button-toggle-appearance-standard .mat-button-toggle-label-content{padding:0 12px;line-height:var(--mat-button-toggle-height, 40px)}.mat-button-toggle-label-content>*{vertical-align:middle}.mat-button-toggle-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:inherit;pointer-events:none;opacity:0;background-color:var(--mat-button-toggle-legacy-state-layer-color)}@media(forced-colors: active){.mat-button-toggle-checked .mat-button-toggle-focus-overlay{border-bottom:solid 500px;opacity:.5;height:0}.mat-button-toggle-checked:hover .mat-button-toggle-focus-overlay{opacity:.6}.mat-button-toggle-checked.mat-button-toggle-appearance-standard .mat-button-toggle-focus-overlay{border-bottom:solid 500px}}.mat-button-toggle .mat-button-toggle-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-button-toggle-button{border:0;background:none;color:inherit;padding:0;margin:0;font:inherit;outline:none;width:100%;cursor:pointer}.mat-button-toggle-animations-enabled .mat-button-toggle-button{transition:padding 150ms 45ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-button-toggle-vertical .mat-button-toggle-button{transition:none}.mat-button-toggle-disabled .mat-button-toggle-button{cursor:default}.mat-button-toggle-button::-moz-focus-inner{border:0}.mat-button-toggle-checked .mat-button-toggle-button:has(.mat-button-toggle-checkbox-wrapper){padding-left:30px}[dir=rtl] .mat-button-toggle-checked .mat-button-toggle-button:has(.mat-button-toggle-checkbox-wrapper){padding-left:0;padding-right:30px}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard{--mat-focus-indicator-border-radius: var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large))}.mat-button-toggle-group-appearance-standard:not(.mat-button-toggle-vertical) .mat-button-toggle:last-of-type .mat-button-toggle-button::before{border-top-right-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large));border-bottom-right-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large))}.mat-button-toggle-group-appearance-standard:not(.mat-button-toggle-vertical) .mat-button-toggle:first-of-type .mat-button-toggle-button::before{border-top-left-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large));border-bottom-left-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large))}.mat-button-toggle-group-appearance-standard.mat-button-toggle-vertical .mat-button-toggle:last-of-type .mat-button-toggle-button::before{border-bottom-right-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large));border-bottom-left-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large))}.mat-button-toggle-group-appearance-standard.mat-button-toggle-vertical .mat-button-toggle:first-of-type .mat-button-toggle-button::before{border-top-right-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large));border-top-left-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large))}
5
- `],encapsulation:2,changeDetection:0})}return o})(),yn=(()=>{class o{static \u0275fac=function(i){return new(i||o)};static \u0275mod=tt({type:o});static \u0275inj=Je({imports:[ye,uo,oi,ye]})}return o})();var Jl=["Core","Gauge","Component","Racing"];var Sn=(()=>{class o{_plugins=A(Kt);_widgetCategories=[...Jl];_widgetDefinition=[{name:"Numeric",description:"Displays numeric data in a clear and concise format, with options to show minimum and/or maximum recorded values. Includes an optional background minichart for quick visual trend insights.",icon:"numericWidget",minWidth:1,minHeight:1,defaultWidth:2,defaultHeight:3,category:"Core",requiredPlugins:[],selector:"widget-numeric",componentClassName:"WidgetNumericComponent"},{name:"Text",description:"Displays text data with a customizable color formatting option.",icon:"textWidget",minWidth:1,minHeight:1,defaultWidth:2,defaultHeight:3,category:"Core",requiredPlugins:[],selector:"widget-text",componentClassName:"WidgetTextComponent"},{name:"Date & Time",description:"Displays date and time data with fully custom formatting options and timezone correction.",icon:"datetimeWidget",minWidth:1,minHeight:1,defaultWidth:2,defaultHeight:3,category:"Core",requiredPlugins:[],selector:"widget-datetime",componentClassName:"WidgetDatetimeComponent"},{name:"Position",description:"Displays latitude and longitude for location tracking and navigation.",icon:"positionWidget",minWidth:1,minHeight:1,defaultWidth:2,defaultHeight:3,category:"Core",requiredPlugins:[],selector:"widget-position",componentClassName:"WidgetPositionComponent"},{name:"Static Label",description:"A static text widget that allows you to add customizable labels to your dashboard, helping to organize and clarify your layout effectively.",icon:"labelWidget",minWidth:1,minHeight:1,defaultWidth:2,defaultHeight:3,category:"Core",requiredPlugins:[],selector:"widget-label",componentClassName:"WidgetLabelComponent"},{name:"Switch Panel",description:"A switch panel group with multiple controls including toggle switches, indicator lights, and press buttons for digital switching and other operations.",icon:"switchpanelWidget",minWidth:1,minHeight:1,defaultWidth:2,defaultHeight:3,category:"Core",requiredPlugins:[],selector:"widget-boolean-switch",componentClassName:"WidgetBooleanSwitchComponent"},{name:"Slider",description:"A range slider that allows users to adjust values, such as controlling lighting intensity from 0% to 100%.",icon:"sliderWidget",minWidth:1,minHeight:1,defaultWidth:2,defaultHeight:3,category:"Core",requiredPlugins:[],selector:"widget-slider",componentClassName:"WidgetSliderComponent"},{name:"Compact Linear",description:"A simple horizontal linear gauge with a large value label offering a clean, compact modern look.",icon:"simpleLinearGauge",minWidth:1,minHeight:1,defaultWidth:2,defaultHeight:3,category:"Gauge",requiredPlugins:[],selector:"widget-simple-linear",componentClassName:"WidgetSimpleLinearComponent"},{name:"Linear",description:"A horizontal or vertical linear gauge that supports zone highlighting.",icon:"linearGauge",minWidth:1,minHeight:1,defaultWidth:2,defaultHeight:3,category:"Gauge",requiredPlugins:[],selector:"widget-gauge-ng-linear",componentClassName:"WidgetGaugeNgLinearComponent"},{name:"Radial",description:"A radial gauge with configurable capacity and measurement dials plus zone highlighting.",icon:"radialGauge",minWidth:1,minHeight:1,defaultWidth:2,defaultHeight:3,category:"Gauge",requiredPlugins:[],selector:"widget-gauge-ng-radial",componentClassName:"WidgetGaugeNgRadialComponent"},{name:"Compass",description:"A faceplate or card-style rotating compass gauge with multiple cardinal point indicator options.",icon:"compassGauge",minWidth:1,minHeight:1,defaultWidth:2,defaultHeight:3,category:"Gauge",requiredPlugins:[],selector:"widget-gauge-ng-compass",componentClassName:"WidgetGaugeNgCompassComponent"},{name:"Level Gauge",description:"Dual-scale heel angle indicator combining a high\u2011precision \xB15\xB0 fine level with a wide \xB140\xB0 coarse arc for fast trim tuning and broader heel / sea\u2011state monitoring.",icon:"level",minWidth:1,minHeight:1,defaultWidth:2,defaultHeight:3,category:"Gauge",requiredPlugins:[],selector:"widget-heel-gauge",componentClassName:"WidgetHeelGaugeComponent"},{name:"Pitch & Roll",description:"Horizon-style attitude indicator showing live pitch and roll degrees with smooth animation\u2014ideal for monitoring trim, heel, and sea-state response.",icon:"pitchRollGauge",minWidth:1,minHeight:1,defaultWidth:2,defaultHeight:3,category:"Gauge",requiredPlugins:[],selector:"widget-horizon",componentClassName:"WidgetHorizonComponent"},{name:"Classic Steel",description:"A traditional steel looking linear & radial gauges replica that supports range sizes and zones highlights.",icon:"steelGauge",minWidth:1,minHeight:1,defaultWidth:2,defaultHeight:3,category:"Gauge",requiredPlugins:[],selector:"widget-gauge-steel",componentClassName:"WidgetSteelGaugeComponent"},{name:"Windsteer",description:"A wind steering display that combines wind, wind sectors, heading, course over ground and next waypoint information.",icon:"windsteeringWidget",minWidth:1,minHeight:1,defaultWidth:2,defaultHeight:3,category:"Component",requiredPlugins:[],selector:"widget-wind-steer",componentClassName:"WidgetWindComponent"},{name:"Freeboard-SK",description:"Adds the Freeboard-SK chart plotter as a widget with automatic sign-in to your dashboard.",icon:"freeboardWidget",minWidth:3,minHeight:4,defaultWidth:3,defaultHeight:7,category:"Component",requiredPlugins:["freeboard-sk","tracks","resources-provider","course-provider"],selector:"widget-freeboardsk",componentClassName:"WidgetFreeboardskComponent"},{name:"Autopilot Head",description:"Provides typical autopilot controls for Signal K v1 & v2 Autopilot API devices. Requires a compatible hardware-specific Autopilot plugin for full functionality.",icon:"autopilotWidget",minWidth:2,minHeight:7,defaultWidth:2,defaultHeight:7,category:"Component",requiredPlugins:[],optionalPlugins:["autopilot","pypilot-autopilot-provider"],selector:"widget-autopilot",componentClassName:"WidgetAutopilotComponent"},{name:"Realtime Data Chart",description:"Visualizes data on a real-time chart with multiple preconfigured series including actuals, SMA and period overall averages and Min/Max. Requires the KIP Dataset to be configured.",icon:"datachartWidget",minWidth:1,minHeight:2,defaultWidth:2,defaultHeight:3,category:"Component",requiredPlugins:[],selector:"widget-data-chart",componentClassName:"WidgetDataChartComponent"},{name:"Embed Webpage Viewer",description:"Embeds external web-based applications\u2014such as Grafana graphs or other Signal K apps\u2014into your dashboard for seamless integration. Interaction is disabled by default but can be enabled.",icon:"embedWidget",minWidth:1,minHeight:1,defaultWidth:2,defaultHeight:3,category:"Component",requiredPlugins:[],selector:"widget-iframe",componentClassName:"WidgetIframeComponent"},{name:"Racesteer",description:"A dynamic race steering display that fuses polar performance data with live conditions to guide optimal steering, tacking, and gybing angles for maximum speed. Instantly compare performance against competition polars for smarter tactical decisions.",icon:"racesteeringWidget",minWidth:1,minHeight:1,defaultWidth:2,defaultHeight:3,category:"Racing",requiredPlugins:["signalk-polar-performance-plugin"],selector:"widget-racesteer",componentClassName:"WidgetRacesteerComponent"},{name:"Racer - Start Line Insight",description:"Gain a tactical advantage for racing starts: set and adjust the port and starboard ends of the start line, see your distance to the line, the favored end, and how much the line is favored or unfavored. Includes visual integration with Freeboard SK for interactive line adjustment and display.",icon:"racerlineWidget",minWidth:2,minHeight:2,defaultWidth:2,defaultHeight:2,requiredPlugins:["signalk-racer"],category:"Racing",selector:"widget-racer-line",componentClassName:"WidgetRacerLineComponent"},{name:"Racer - Start Timer",description:"An advanced racing countdown timer that indicates OCS (On Course Side) status. Set the start line, choose or adjust the duration, or specify the exact start time. Automatically switches to the target dashboard at the start unless over early.",icon:"racertimerWidget",minWidth:2,minHeight:2,defaultWidth:2,defaultHeight:2,requiredPlugins:["signalk-racer"],category:"Racing",selector:"widget-racer-timer",componentClassName:"WidgetRacerTimerComponent"},{name:"Wind Trends",description:"Real-time True Wind trends with dual top axes for direction (\xB0) and speed (knots). Displays live values and SMA over the current period\u2019s average.",icon:"windtrendsWidget",minWidth:5,minHeight:4,defaultWidth:5,defaultHeight:4,category:"Racing",requiredPlugins:[],selector:"widget-windtrends-chart",componentClassName:"WidgetWindTrendsChartComponent"},{name:"Countdown Timer",description:"A simple race start countdown timer that can be started, paused, synced, reset, and configured for duration.",icon:"racetimerWidget",minWidth:3,minHeight:3,defaultWidth:3,defaultHeight:4,category:"Racing",requiredPlugins:[],selector:"widget-racetimer",componentClassName:"WidgetRaceTimerComponent"}];get kipWidgets(){return this._widgetDefinition}get categories(){return this._widgetCategories}getKipWidgetsWithStatus(){return L(this,null,function*(){let e={},i=Array.from(new Set(this._widgetDefinition.flatMap(t=>[...t.requiredPlugins||[],...t.optionalPlugins||[]])));return yield Promise.all(i.map(t=>L(this,null,function*(){e[t]=yield this._plugins.isEnabled(t)}))),this._widgetDefinition.map(t=>{let r=t.requiredPlugins||[],c=t.optionalPlugins||[],g=r.map(G=>({name:G,enabled:e[G],required:!0})),C=c.map(G=>({name:G,enabled:e[G],required:!1})),w=[...g,...C],x=g.every(G=>G.enabled);return x&&c.length>0&&(x=C.some(G=>G.enabled)),Ze(xe({},t),{isDependencyValid:x,pluginsStatus:w})})})}static \u0275fac=function(i){return new(i||o)};static \u0275prov=Ee({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})();function $l(o,d){o&1&&(a(0,"span"),l(1,", "),n())}function er(o,d){if(o&1&&(a(0,"span",8),l(1),a(2,"span",9),l(3),n()(),u(4,$l,2,0,"span")),o&2){let e=d.$implicit,i=d.$index,t=d.$count,r=f(2);m("ngClass",r.pluginDependencyValid()?e.required?"":e.enabled?"dependency-optional-present-met":"dependency-optional-missing-met":e.enabled?e.required?"dependency-required-ok":"dependency-optional-ok":e.required?"dependency-required-error":"dependency-optional-error"),K("title",e.required?"Required":"Optional"),s(),lt(" ",e.enabled?"\u2714":"\u2716"," ",e.name," "),s(2),E(e.required?"":"(optional)"),s(),p(i!==t-1?4:-1)}}function tr(o,d){if(o&1&&(a(0,"div",7)(1,"span"),l(2,"Plugins:"),n(),S(3,er,5,6,null,null,k),n()),o&2){let e=f();nt(e.pluginsStatus().length>0?"margin-bottom: 8px;margin-top: 4px;":""),s(),at(e.pluginDependencyValid()?"":"dependency-error"),s(2),T(e.pluginsStatus())}}var Tn=(()=>{class o{svgIcon=h.required();iconSize=h.required();name=h.required();description=h.required();pluginsStatus=h.required();pluginDependencyValid=h.required();onKeydown(e){(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),e.target.click())}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=v({type:o,selectors:[["widget-list-card"]],hostBindings:function(i,t){i&1&&_("keydown",function(c){return t.onKeydown(c)})},inputs:{svgIcon:[1,"svgIcon"],iconSize:[1,"iconSize"],name:[1,"name"],description:[1,"description"],pluginsStatus:[1,"pluginsStatus"],pluginDependencyValid:[1,"pluginDependencyValid"]},decls:9,vars:11,consts:[["role","button","tabindex","0",1,"item-container"],[1,"item-icon"],["aria-hidden","false",3,"svgIcon"],[1,"item-label"],[1,"title","no-text-select"],[1,"dependency","no-text-select",3,"style"],[1,"description","no-text-select"],[1,"dependency","no-text-select"],[3,"ngClass"],[1,"plugin-type-label"]],template:function(i,t){i&1&&(a(0,"div",0)(1,"div",1),b(2,"mat-icon",2),n(),a(3,"div",3)(4,"p",4),l(5),n(),u(6,tr,5,4,"div",5),a(7,"span",6),l(8),n()()()),i&2&&(K("aria-disabled",t.pluginDependencyValid()?null:"true"),s(2),ot("width",t.iconSize(),"px")("height",t.iconSize(),"px"),m("svgIcon",t.svgIcon()),s(2),nt(t.pluginsStatus().length>0?"margin-bottom:0px; margin-top: 4px":""),s(),E(t.name()),s(),p(t.pluginsStatus().length>0?6:-1),s(2),E(t.description()))},dependencies:[Ut,Hi,J,R],styles:["[_nghost-%COMP%]{display:block;text-align:center;-webkit-tap-highlight-color:rgba(0,0,0,0);cursor:pointer;padding:0}.item-container[_ngcontent-%COMP%]{display:flex;flex-direction:row;flex-wrap:nowrap;align-items:stretch;width:100%;height:100%;margin:0;padding:15px;border:solid 1px var(--mat-sys-outline);cursor:pointer}.item-container[_ngcontent-%COMP%]:hover{background-color:var(--mat-sys-inverse-on-surface)}.item-container[_ngcontent-%COMP%]:focus-visible{background-color:var(--mat-sys-surface-bright);outline:-webkit-focus-ring-color auto 0px}.item-icon[_ngcontent-%COMP%]{width:48px}.item-label[_ngcontent-%COMP%]{width:calc(100% - 48px);text-align:left;padding-left:15px}.title[_ngcontent-%COMP%]{font-size:var(--mat-sys-label-medium-line-height)}.description[_ngcontent-%COMP%]{color:var(--mat-sys-outline)}.dependency[_ngcontent-%COMP%]{color:var(--mat-sys-outline);text-align:start;font-style:italic;font-size:var(--mat-sys-label-large-size)}.dependency-error[_ngcontent-%COMP%]{color:var(--kip-port-color);font-weight:700}.dependency-required-ok[_ngcontent-%COMP%]{color:var(--kip-starboard-color);font-weight:700}.dependency-required-error[_ngcontent-%COMP%]{color:var(--kip-port-color);font-weight:700;text-decoration:underline}.dependency-optional-ok[_ngcontent-%COMP%]{color:var(--kip-starboard-color)}.dependency-optional-error[_ngcontent-%COMP%]{color:var(--kip-port-color)}.dependency-optional-missing-met[_ngcontent-%COMP%]{color:var(--mat-sys-outline);text-decoration:line-through}.dependency-optional-present-met[_ngcontent-%COMP%]{color:var(--mat-sys-outline)}.plugin-type-label[_ngcontent-%COMP%]{font-size:.8em;margin-left:2px;opacity:.7}.dependency-ok[_ngcontent-%COMP%]{color:var(--kip-starboard-color)}.no-text-select[_ngcontent-%COMP%]{-webkit-user-select:none;user-select:none}"]})}return o})();var ir=(o,d)=>d.selector;function or(o,d){if(o&1&&(a(0,"mat-button-toggle",1),l(1),n()),o&2){let e=d.$implicit;m("value",e),s(),U(" ",e," ")}}function nr(o,d){if(o&1){let e=I();a(0,"widget-list-card",3),_("click",function(){let t=M(e).$implicit,r=f();return y(r.onSelectWidget(t))}),n()}if(o&2){let e=d.$implicit;te("dependency-missing",!e.isDependencyValid),m("svgIcon",e.icon)("iconSize",48)("name",e.name)("description",e.description)("pluginDependencyValid",e.isDependencyValid)("pluginsStatus",e.pluginsStatus)}}var xn=(()=>{class o{_dialogRef=A(me);_widgets=A(Sn);_widgetsList=[];filteredWidgetsList=P([]);_widgetCategory=P("Core");isDependencyValid=P(!0);ngOnInit(){this.loadWidgets()}loadWidgets(){return L(this,null,function*(){this._widgetsList=yield this._widgets.getKipWidgetsWithStatus(),this.filteredWidgetsList.set(this._widgetsList.filter(e=>e.category===this._widgetCategory()))})}onCategoryChange(e){this.filteredWidgetsList.set(this._widgetsList.filter(i=>i.category===e.value)),this._widgetCategory.set(e.value)}onSelectWidget(e){if(!e.isDependencyValid)return;let{name:i,description:t,icon:r,minWidth:c,minHeight:g,defaultWidth:C,defaultHeight:w,category:x,requiredPlugins:G,optionalPlugins:Ue,selector:qe,componentClassName:Et}=e,Qe=Ze(xe({name:i,description:t,icon:r,minWidth:c,minHeight:g,defaultWidth:C,defaultHeight:w,category:x,requiredPlugins:G},Ue?{optionalPlugins:Ue}:{}),{selector:qe,componentClassName:Et});this._dialogRef.close(Qe)}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=v({type:o,selectors:[["widgets-list"]],decls:7,vars:1,consts:[["name","widgetCategories","aria-label","Widget categories",1,"list-filter",3,"change","value"],[3,"value"],[3,"dependency-missing","svgIcon","iconSize","name","description","pluginDependencyValid","pluginsStatus"],[3,"click","svgIcon","iconSize","name","description","pluginDependencyValid","pluginsStatus"]],template:function(i,t){i&1&&(a(0,"div")(1,"mat-button-toggle-group",0),_("change",function(c){return t.onCategoryChange(c)}),S(2,or,2,2,"mat-button-toggle",1,k),n(),a(4,"div"),S(5,nr,1,8,"widget-list-card",2,ir),n()()),i&2&&(s(),m("value",t._widgetCategory()),s(),T(t._widgets.categories),s(3),T(t.filteredWidgetsList()))},dependencies:[yn,fi,oi,Tn],styles:[".list-filter[_ngcontent-%COMP%]{margin-bottom:20px}.dependency-missing[_ngcontent-%COMP%]{pointer-events:none;opacity:.8;background-color:var(--mat-sys-neutral10)}"]})}return o})();var wn=(()=>{class o{dialogRef=A(me);fileVersionToUpgrade=9;configVersionToUpgrade=10;currentConfigVersion=11;_storage=A($i);_settings=A(eo);static widgetTypeToSelectorMap={WidgetNumeric:"widget-numeric",WidgetTextGeneric:"widget-text",WidgetDateGeneric:"widget-datetime",WidgetBooleanSwitch:"widget-boolean-switch",WidgetBlank:"widget-blank",WidgetStateComponent:"widget-button",WidgetSimpleLinearComponent:"widget-simple-linear",WidgetGaugeNgLinearComponent:"widget-gauge-ng-linear",WidgetGaugeNgRadialComponent:"widget-gauge-ng-radial",WidgetGaugeNgCompassComponent:"widget-gauge-ng-compass",WidgetGaugeComponent:"widget-gauge-steel",WidgetWindComponent:"widget-wind-steer",WidgetFreeboardskComponent:"widget-freeboardsk",WidgetAutopilotComponent:"widget-autopilot",WidgetDataChart:"widget-data-chart",WidgetRaceTimerComponent:"widget-racetimer",WidgetIframeComponent:"widget-iframe",WidgetTutorial:"widget-tutorial"};upgrade(){if(this._storage.initConfig)this._storage.listConfigs(this.fileVersionToUpgrade).then(e=>L(this,null,function*(){for(let i of e){let t=yield this.transformConfig(i);if(t)if(t.scope==="global")try{this._storage.patchGlobal(t.name,t.scope,t.newConfiguration,"add"),this._storage.patchGlobal(t.name,t.scope,t.oldConfiguration,"replace",9),console.log(`[Upgrade] Configuration ${t.scope}/${t.name} has been upgraded to version ${this.currentConfigVersion} and saved. Old configuration has been patched to version 0.`)}catch{console.error(`[Upgrade] Error saving configuration for ${i.name}`)}else this._storage.setConfig(t.scope,t.name,t.newConfiguration).then(()=>{this._storage.setConfig(t.scope,t.name,t.oldConfiguration,9),console.log(`[Upgrade] Configuration ${t.scope}/${t.name} has been upgraded to version ${this.currentConfigVersion} and saved. Old configuration has been patched to version 0.`)}).catch(r=>{console.error(`[Upgrade] Error saving configuration for ${i.name}:`,r)})}})).catch(e=>{console.error("Error fetching configuration data:",e)});else{let e={app:null,widget:null,layout:null,theme:null};e.app=this._settings.loadConfigFromLocalStorage("appConfig"),e.widget=this._settings.loadConfigFromLocalStorage("widgetConfig"),e.layout=this._settings.loadConfigFromLocalStorage("layoutConfig"),e.theme=this._settings.loadConfigFromLocalStorage("themeConfig");let i=this.transformApp(e.app),t=this.transformTheme(e.theme),r=e.layout?.rootSplits||[],c=e.layout?.splitSets||[],g=e.widget?.widgets||[],C=r.map((w,x)=>{let G=this.extractWidgetsFromSplitSets(c,g,w);return{id:w,name:`Dashboard ${x+1}`,configuration:G}});localStorage.setItem("appConfig",JSON.stringify(i)),localStorage.setItem("dashboardsConfig",JSON.stringify(C)),localStorage.setItem("themeConfig",JSON.stringify(t))}setTimeout(()=>{this._settings.reloadApp()},1500)}transformConfig(e){return L(this,null,function*(){let i=yield this._storage.getConfig(e.scope,e.name,this.fileVersionToUpgrade);if(i.app.configVersion!==this.configVersionToUpgrade)return console.error(`[Upgrade Component] Configuration ${e.scope}/${e.name} is not an upgradable version ${this.configVersionToUpgrade} config. Skipping upgrade. Please delete old configuration files.`),null;let t=this.transformApp(i.app),r=this.transformTheme(i.theme),c=i.layout?.rootSplits||[],g=i.layout?.splitSets||[],C=i.widget?.widgets||[],w=c.map((G,Ue)=>{let qe=this.extractWidgetsFromSplitSets(g,C,G);return{id:G,name:`Dashboard ${Ue+1}`,configuration:qe}}),x=to(i);return x.app.configVersion=0,{scope:e.scope,name:e.name,newConfiguration:{app:t,theme:r,dashboards:w},oldConfiguration:x}})}transformWidget(e,i){if(e.color==="white"&&(e.color="contrast"),e.textColor){switch(e.textColor){case"text":e.color="contrast";break;case"primary":e.color="blue";break;case"accent":e.color="yellow";break;case"warn":e.color="purple";break;case"nobar":i==="WidgetGaugeNgLinearComponent"&&(e.color="blue",e.gauge=e.gauge||{},e.gauge.useNeedle=!1);break;default:e.color=e.textColor}delete e.textColor}return e}transformApp(e){return e?(e.configVersion=11,e.nightModeBrightness=.27,e):null}transformTheme(e){return e?{themeName:""}:null}extractWidgetsFromSplitSets(e,i,t){let r=new Map(i.map(Qe=>[Qe.uuid,Qe])),c=[],g=[],C=0,w=0,x=12,G=12,Ue=2,qe=2,Et=Qe=>{let vi=e.find(Ye=>Ye.uuid===Qe);if(!vi){g.push(`Missing splitSet with UUID: ${Qe}`);return}vi.splitAreas.forEach(Ye=>{if(Ye.type==="widget"){let _e=r.get(Ye.uuid);if(_e){if(_e.type==="WidgetBlank"){console.warn(`Skipping widget of type WidgetBlank with UUID: ${_e.uuid}`);return}if(w+qe>G){g.push(`No space left in the grid for widget with UUID: ${_e.uuid}`);return}let Mi=o.widgetTypeToSelectorMap[_e.type]||"widget-unknown",On=this.transformWidget(_e.config,_e.type);c.push({id:_e.uuid,selector:Mi,input:{widgetProperties:{type:Mi,uuid:_e.uuid,config:On}},x:C,y:w,w:Ue,h:qe}),C+=Ue,C>=x&&(C=0,w+=qe)}else g.push(`Missing widget with UUID: ${Ye.uuid}`)}else Ye.type==="splitSet"&&Et(Ye.uuid)})};return Et(t),g.length>0&&console.warn("Transformation Issues:",g),c}startFresh(){if(this._storage.initConfig)this._storage.listConfigs(this.fileVersionToUpgrade).then(e=>L(this,null,function*(){for(let i of e){let t=yield this._storage.getConfig(i.scope,i.name,this.fileVersionToUpgrade);if(t.app.configVersion=0,i.scope==="global")try{setTimeout(()=>{this._storage.patchGlobal(i.name,i.scope,t,"replace",9),console.log(`[Retired] Configuration ${i.scope}/${i.name} has been patched to version 0.`)},750)}catch{console.error(`[Upgrade] Error saving configuration for ${i.name}:`)}else try{yield this._storage.setConfig(i.scope,i.name,t,9),console.log(`[Retired] Configuration ${i.scope}/${i.name} has been patched to version 0.`)}catch{console.error(`[Upgrade] Error saving configuration for ${i.name}.`)}}})).catch(e=>{console.error("Error fetching configuration data:",e)});else{let e={app:null,dashboards:null,theme:null};e.app=this._settings.loadConfigFromLocalStorage("appConfig"),e.theme=this._settings.loadConfigFromLocalStorage("themeConfig"),e.app.configVersion=11,e.app.nightModeBrightness=.27,e.theme.themeName="",localStorage.setItem("appConfig",JSON.stringify(e.app)),localStorage.setItem("themeConfig",JSON.stringify(e.theme)),localStorage.removeItem("widgetConfig"),localStorage.removeItem("layoutConfig")}this.dialogRef.close()}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=v({type:o,selectors:[["upgrade-config"]],decls:193,vars:0,consts:[[1,"warning"],[1,"nav-table"],[2,"font-size","x-large"],["href","https://discord.gg/AMDYT2DQga","target","_blank"],[1,"button-group"],["mat-flat-button","",3,"click"],["mat-flat-button","",2,"margin-left","20px",3,"click"]],template:function(i,t){i&1&&(a(0,"h2"),l(1,"All New Touch, Mouse, and Keyboard Navigation"),n(),a(2,"p",0)(3,"strong"),l(4,"Heads up:"),n(),l(5," The new version introduces a completely redesigned fullscreen interface with no navigation bar. Please review the input modes table below to get an understanding of the new ways to operate KIP before upgrading. After the upgrade, give yourself time to get comfortable with the changes."),n(),a(6,"table",1)(7,"thead")(8,"tr")(9,"th"),l(10,"Actions"),n(),a(11,"th"),l(12,"Touch"),n(),a(13,"th"),l(14,"Mouse"),n(),a(15,"th"),l(16,"Keyboard Shortcuts"),n()()(),a(17,"tbody")(18,"tr")(19,"td"),l(20,"Open Actions menu"),n(),a(21,"td"),l(22,"Swipe left"),n(),a(23,"td"),l(24,"Click, drag left, and release"),n(),a(25,"td")(26,"kbd"),l(27,"Shift"),n(),l(28," + "),a(29,"kbd"),l(30,"Ctrl"),n(),l(31," + "),a(32,"kbd",2),l(33,"\u2190"),n(),l(34," (Left Arrow)"),n()(),a(35,"tr")(36,"td"),l(37,"Open Notification menu"),n(),a(38,"td"),l(39,"Swipe right"),n(),a(40,"td"),l(41,"Click, drag right, and release"),n(),a(42,"td")(43,"kbd"),l(44,"Shift"),n(),l(45," + "),a(46,"kbd"),l(47,"Ctrl"),n(),l(48," + "),a(49,"kbd",2),l(50,"\u2192"),n(),l(51," (Right Arrow)"),n()(),a(52,"tr")(53,"td"),l(54,"Cycle through dashboards"),n(),a(55,"td"),l(56,"Swipe up/down"),n(),a(57,"td"),l(58,"Click, drag up/down, and release"),n(),a(59,"td")(60,"kbd"),l(61,"Shift"),n(),l(62," + "),a(63,"kbd"),l(64,"Ctrl"),n(),l(65," + "),a(66,"kbd",2),l(67,"\u2191"),n(),l(68,"/"),a(69,"kbd",2),l(70,"\u2193"),n(),l(71," (Up/Down Arrow)"),n()(),a(72,"tr")(73,"td"),l(74,"Toggle Fullscreen"),n(),a(75,"td"),l(76,"N/A"),n(),a(77,"td"),l(78,"N/A"),n(),a(79,"td")(80,"kbd"),l(81,"Shift"),n(),l(82," + "),a(83,"kbd"),l(84,"Ctrl"),n(),l(85," + "),a(86,"kbd"),l(87,"F"),n()()(),a(88,"tr")(89,"td"),l(90,"Toggle Night mode"),n(),a(91,"td"),l(92,"N/A"),n(),a(93,"td"),l(94,"N/A"),n(),a(95,"td")(96,"kbd"),l(97,"Shift"),n(),l(98," + "),a(99,"kbd"),l(100,"Ctrl"),n(),l(101," + "),a(102,"kbd"),l(103,"N"),n()()(),a(104,"tr")(105,"td"),l(106,"Toggle dashboard edit mode"),n(),a(107,"td"),l(108,"N/A"),n(),a(109,"td"),l(110,"N/A"),n(),a(111,"td")(112,"kbd"),l(113,"Shift"),n(),l(114," + "),a(115,"kbd"),l(116,"Ctrl"),n(),l(117," + "),a(118,"kbd"),l(119,"E"),n()()()()(),a(120,"i"),l(121,"Note that the words Touch and Tap are synonymous with mouse click."),n(),b(122,"br")(123,"br"),a(124,"h2"),l(125,"Migration Limitations"),n(),a(126,"p")(127,"span",0),l(128,"Important:"),n(),l(129," The new widget layout engine is "),a(130,"strong"),l(131,"completely different"),n(),l(132," from the previous version. When you upgrade, your configuration will be migrated, but "),a(133,"strong"),l(134,"the way dashboards and widgets are arranged will change significantly"),n(),l(135,`.
1
+ import{a as se,b as Ce,c as Zo,d as jo,e as zo,f as Kt,g as Jt,h as Xo,i as Ko,j as Jo,k as $o}from"./chunk-65TR3CWM.js";import{b as Ho}from"./chunk-EPTIEPMQ.js";import{a as re,b as We,c as ft}from"./chunk-UTCRLFYC.js";import{a as No,b as Ro,c as Wo,d as gt,e as Uo,f as X,g as qo,h as Qo,k as Yo,m as Et}from"./chunk-ZPCYFQPB.js";import{b as dt}from"./chunk-YCW2UBVQ.js";import{a as Vo,b as Lo}from"./chunk-6MRJ4C55.js";import{B as V,C as le,D as z,E as be,b as to,g as co,h as xo,i as wo,j as Eo,k as Ae,l as pe,n as Go,o as ue,p as ge,q as fe,r as Le,s as ne,u as B,v as pt,w as Oo,x as ut,z as Bo}from"./chunk-VEJNBHWJ.js";import{A as he,B as Z,C as Po,D as Fo,E as Re,F as Xt,G as mt,H as O,J as At,K as j,L as W,a as Xi,f as Ji,g as $i,i as eo,j as qt,k as Zt,l as Q,n as Y,q as F,r as H,s as ko,t as Io,u as jt,v as Do,w as ae,x as zt,y as ct,z as Ne}from"./chunk-A5CYPNMD.js";import{b as go,f as fo,g as ho,h as _o,i as Ai,j as vo,m as Mo,n as yo,o as So,s as To}from"./chunk-NOLKBYOV.js";import{$d as uo,Ab as De,Ac as ji,Ad as so,Bb as Pe,C as ci,Cd as mi,Dc as Wt,Dd as Yt,E as ze,Ec as zi,F as Ee,Fa as s,Fb as oe,Fd as Ht,Ga as Ii,Gb as ot,Hb as te,Hd as Se,I as xi,Ia as Di,Ib as nt,Ic as Ut,Id as R,J as Pt,Jb as at,Jd as J,K as Xe,Kb as l,Kc as Ki,La as Pi,Lb as E,Mb as U,N as wi,Nb as lt,Nd as Te,Oa as v,P as Ei,Pa as tt,Pb as Mt,Pc as Be,Pd as Ve,Qa as it,Qb as yt,Ra as Fi,Rb as St,Sa as Oi,Ua as Ie,V as Ke,Va as Bi,Vb as ye,Vd as mo,W as Ft,Wa as de,Wd as Ao,Xa as Bt,Xb as Tt,Xd as $,Ya as Vi,Yb as xt,Yd as po,Z as Gi,Zd as me,a as we,ab as K,ac as Fe,ae as ee,b as Ze,ba as Ot,bb as u,bc as Oe,ca as Ge,cb as g,da as Je,db as k,ea as Me,eb as Vt,ec as Qi,f as L,fb as S,fc as Yi,fd as io,g as Dt,ga as A,gb as T,gc as Rt,gd as oo,hb as m,hd as no,he as bo,i as ri,ia as ki,ib as a,ie as Co,j as Ct,ja as M,jb as n,jc as Hi,ka as y,kb as b,kc as q,l as Si,lb as Li,lc as h,mb as Ni,md as ao,na as $e,ob as Ri,od as lo,pa as ke,pb as Wi,pc as rt,q as si,qb as Ui,qd as ro,ra as I,rb as D,rc as N,rd as Qt,sb as qi,tb as _,u as di,ua as et,vb as f,w as je,wa as He,wb as Lt,xb as Nt,yb as _t,yd as wt,z as Ti,zb as vt,zc as Zi,zd as st}from"./chunk-YPUCOH35.js";var hr=(()=>{class o{isChromeOnMac;static DEBUG=!1;static _instanceCounter=0;_instanceId;swipeMinDistance=h(30);swipeMaxDuration=h(600);longPressMs=h(500);doubleTapInterval=h(300);tapSlop=h(20);pressMoveSlop=h(10);_swipeMinDistance=30;_swipeMaxDuration=600;_longPressMs=500;_doubleTapInterval=300;_tapSlop=20;_pressMoveSlop=10;swipeleft=q();swiperight=q();swipeup=q();swipedown=q();press=q();doubletap=q();zone=A(Bt);destroyRef=A(ke);host=A(He);pointerId=null;startX=0;startY=0;startTime=0;tracking=!1;longPressTimer=null;pressFired=!1;cancelLongpressHandlers=[];lastTapTime=0;lastTapX=0;lastTapY=0;currentPointerType=null;lastTapUpTime=0;lastTapUpX=0;lastTapUpY=0;potentialDoubleTap=!1;constructor(){this.isChromeOnMac=(()=>{let e=navigator.userAgent,i=navigator.platform;return/Chrome\//.test(e)&&/Mac/.test(i)&&!/Edg\//.test(e)&&!/OPR\//.test(e)})(),this._instanceId=++o._instanceCounter,this.debug("GestureDirective instance created",{instanceId:this._instanceId}),this.zone.runOutsideAngular(()=>{let e=this.host.nativeElement;e.style.touchAction||(e.style.touchAction="none","webkitTouchCallout"in e.style&&(e.style.webkitTouchCallout="none")),e.addEventListener("pointerdown",this.onPointerDown,{passive:!1}),e.addEventListener("pointermove",this.onPointerMove,{passive:!0}),e.addEventListener("pointerup",this.onPointerUp,{passive:!0}),e.addEventListener("pointercancel",this.onPointerCancel,{passive:!0}),e.addEventListener("lostpointercapture",this.onPointerCancel,{passive:!0}),e.addEventListener("dblclick",this.onNativeDblClick,{passive:!0}),this.destroyRef.onDestroy(()=>{e.removeEventListener("pointerdown",this.onPointerDown),e.removeEventListener("pointermove",this.onPointerMove),e.removeEventListener("pointerup",this.onPointerUp),e.removeEventListener("pointercancel",this.onPointerCancel),e.removeEventListener("lostpointercapture",this.onPointerCancel),e.removeEventListener("dblclick",this.onNativeDblClick),this.longPressTimer&&(window.clearTimeout(this.longPressTimer),this.longPressTimer=null),this.removeLongpressCancelListeners();try{this.pointerId!==null&&typeof e.releasePointerCapture=="function"&&e.releasePointerCapture(this.pointerId)}catch{}this.pointerId=null,this.tracking=!1})})}onNativeDblClick=e=>{let i=new CustomEvent("doubletap",{detail:{x:e.clientX,y:e.clientY,dt:0}});this.zone.run(()=>this.doubletap.emit(i)),this.lastTapTime=0};onPointerDown=e=>{if(this.debug("pointerdown",{x:e.clientX,y:e.clientY,pointerId:e.pointerId,pointerType:e.pointerType,sourceElement:e.target instanceof Element?e.target.outerHTML:String(e.target)}),this.pointerId!==null)return;switch(this.pointerId=e.pointerId,this.tracking=!0,this.pressFired=!1,this.currentPointerType=e.pointerType||null,e.pointerType){case"touch":this._swipeMinDistance=this.swipeMinDistance(),this._swipeMaxDuration=this.swipeMaxDuration(),this._longPressMs=this.longPressMs(),this._doubleTapInterval=this.doubleTapInterval(),this._tapSlop=this.tapSlop(),this._pressMoveSlop=this.pressMoveSlop();break;case"pen":this._swipeMinDistance=20,this._swipeMaxDuration=500,this._longPressMs=400,this._doubleTapInterval=250,this._tapSlop=10,this._pressMoveSlop=8;break;case"mouse":default:this._swipeMinDistance=15,this._swipeMaxDuration=400,this._longPressMs=350,this._doubleTapInterval=250,this._tapSlop=8,this._pressMoveSlop=6;break}let t=performance.now()-this.lastTapUpTime,r=Math.hypot(e.clientX-this.lastTapUpX,e.clientY-this.lastTapUpY);this.potentialDoubleTap=t<=this._doubleTapInterval&&r<=this._tapSlop,this.startX=e.clientX,this.startY=e.clientY,this.startTime=performance.now();try{e.target.setPointerCapture(e.pointerId)}catch{}this.longPressTimer&&(this.debug("longpress timer cleared on pointerdown"),window.clearTimeout(this.longPressTimer)),this.potentialDoubleTap||(this.addLongpressCancelListeners(),this.debug("longpress timer scheduled"),this.longPressTimer=window.setTimeout(()=>{if(this.debug("longpress timer fired",{tracking:this.tracking}),!this.tracking){this.debug("longpress cancelled: not tracking");return}let c=e.clientX-this.startX,p=e.clientY-this.startY;if(Math.abs(c)<=this._pressMoveSlop&&Math.abs(p)<=this._pressMoveSlop){this.debug("longpress recognized",{x:this.startX,y:this.startY}),this.pressFired=!0;let C=new CustomEvent("press",{detail:{x:this.startX,y:this.startY,center:{x:this.startX,y:this.startY}}});this.zone.run(()=>this.press.emit(C))}this.removeLongpressCancelListeners()},this._longPressMs))};onPointerMove=e=>{!this.tracking||e.pointerId!==this.pointerId||this.pressFired||this.longPressTimer&&(this.debug("longpress cancelled by pointermove"),window.clearTimeout(this.longPressTimer),this.longPressTimer=null,this.removeLongpressCancelListeners())};onPointerUp=e=>{if(this.debug("pointerup",{x:e.clientX,y:e.clientY,pointerId:e.pointerId}),!this.tracking||e.pointerId!==this.pointerId)return;let i=performance.now(),t=i-this.startTime,r=e.clientX-this.startX,c=e.clientY-this.startY,p=Math.abs(r),C=Math.abs(c);if(this.longPressTimer&&(this.debug("longpress cancelled by pointerup"),window.clearTimeout(this.longPressTimer),this.longPressTimer=null),this.pressFired){this.debug("pointerup after longpress: not resetting gesture state");return}if(t<=this._swipeMaxDuration&&(p>=this._swipeMinDistance&&p>=C?(this.debug("swipe detected",{direction:r>0?"right":"left",dx:r,dy:c,duration:t}),this.zone.run(()=>{r>0?this.swiperight.emit(new CustomEvent("swiperight",{detail:{dx:r,dy:c,duration:t}})):this.swipeleft.emit(new CustomEvent("swipeleft",{detail:{dx:r,dy:c,duration:t}}))})):C>=this._swipeMinDistance&&C>p&&(this.debug("swipe detected",{direction:c>0?"down":"up",dx:r,dy:c,duration:t}),this.zone.run(()=>{c>0?this.swipedown.emit(new CustomEvent("swipedown",{detail:{dx:r,dy:c,duration:t}})):this.swipeup.emit(new CustomEvent("swipeup",{detail:{dx:r,dy:c,duration:t}}))}))),this.currentPointerType!=="mouse"&&p<=this._tapSlop&&C<=this._tapSlop&&t<this._longPressMs){let w=i,x=w-this.lastTapTime,G=Math.hypot(e.clientX-this.lastTapX,e.clientY-this.lastTapY);x<=this._doubleTapInterval&&G<=this._tapSlop?(this.zone.run(()=>this.doubletap.emit(new CustomEvent("doubletap",{detail:{x:e.clientX,y:e.clientY,dt:x}}))),this.lastTapTime=0,this.potentialDoubleTap=!1):(this.lastTapTime=w,this.lastTapX=e.clientX,this.lastTapY=e.clientY)}!this.pressFired&&p<=this._tapSlop&&C<=this._tapSlop&&t<this._longPressMs?(this.lastTapUpTime=i,this.lastTapUpX=e.clientX,this.lastTapUpY=e.clientY):this.potentialDoubleTap=!1,this.reset()};onPointerCancel=e=>{let i=this.host.nativeElement;this.debug("pointercancel",{pointerId:e.pointerId,pointerType:e.pointerType,event:e,documentActiveElement:document.activeElement,elementIsConnected:i.isConnected,elementVisibility:i.offsetParent!==null,hasPointerCapture:typeof i.hasPointerCapture=="function"?i.hasPointerCapture(e.pointerId):void 0,documentHidden:document.hidden});let t=e;if(this.isChromeOnMac&&e.pointerType==="mouse"&&e.pointerId===this.pointerId&&typeof t.buttons=="number"&&t.buttons!==0){this.debug("pointercancel ignored on Chrome/macOS: mouse button still pressed");return}e.pointerId===this.pointerId&&(this.longPressTimer&&(this.debug("longpress cancelled by pointercancel"),window.clearTimeout(this.longPressTimer),this.longPressTimer=null,this.removeLongpressCancelListeners()),this.reset())};addLongpressCancelListeners(){this.debug("addLongpressCancelListeners");let e=c=>{this.debug("longpress cancelled by event",c?.type),this.longPressTimer&&(window.clearTimeout(this.longPressTimer),this.longPressTimer=null),this.removeLongpressCancelListeners()},i=this.host.nativeElement,t=document,r={capture:!0};this.cancelLongpressHandlers=[{type:"pointermove",handler:e,opts:r,targets:["el","doc"]},{type:"pointerleave",handler:e,opts:r,targets:["el","doc"]},{type:"pointerout",handler:e,opts:r,targets:["el","doc"]},{type:"lostpointercapture",handler:e,opts:r,targets:["el","doc"]},{type:"blur",handler:e,opts:r,targets:["window"]}];for(let c of this.cancelLongpressHandlers){let{type:p,handler:C,opts:w,targets:x}=c;x&&x.includes("el")&&i.addEventListener(p,C,w),x&&x.includes("doc")&&t.addEventListener(p,C,w),x&&x.includes("window")&&window.addEventListener(p,C,w)}}removeLongpressCancelListeners(){this.debug("removeLongpressCancelListeners");let e=this.host.nativeElement,i=document;for(let t of this.cancelLongpressHandlers){let{type:r,handler:c,opts:p,targets:C}=t;C&&C.includes("el")&&e.removeEventListener(r,c,p),C&&C.includes("doc")&&i.removeEventListener(r,c,p),C&&C.includes("window")&&window.removeEventListener(r,c,p)}this.cancelLongpressHandlers=[]}reset(){this.debug("reset gesture state");try{let e=this.host.nativeElement;this.pointerId!==null&&typeof e.releasePointerCapture=="function"&&e.releasePointerCapture(this.pointerId)}catch{}this.pointerId=null,this.tracking=!1,this.pressFired=!1,this.currentPointerType=null,this.removeLongpressCancelListeners()}debug(...e){this.constructor.DEBUG&&console.debug(`[GestureDirective][#${this._instanceId}]`,...e)}static \u0275fac=function(i){return new(i||o)};static \u0275dir=it({type:o,selectors:[["","kipGestures",""]],inputs:{swipeMinDistance:[1,"swipeMinDistance"],swipeMaxDuration:[1,"swipeMaxDuration"],longPressMs:[1,"longPressMs"],doubleTapInterval:[1,"doubleTapInterval"],tapSlop:[1,"tapSlop"],pressMoveSlop:[1,"pressMoveSlop"]},outputs:{swipeleft:"swipeleft",swiperight:"swiperight",swipeup:"swipeup",swipedown:"swipedown",press:"press",doubletap:"doubletap"}})}return o})();function Bn(o,d){o&1&&Ui(0)}var en=(()=>{class o{data=A(pe);static \u0275fac=function(i){return new(i||o)};static \u0275cmp=v({type:o,selectors:[["dialog-frame"]],decls:8,vars:3,consts:[[1,"dialogue-header"],["mat-dialog-title",""],["mat-icon-button","",1,"dialog-close-icon",3,"mat-dialog-close"],[1,"dialog-content-padding"],[4,"ngComponentOutlet"]],template:function(i,t){i&1&&(a(0,"div",0)(1,"h6",1),l(2),n(),a(3,"button",2)(4,"mat-icon"),l(5,"close"),n()()(),a(6,"mat-dialog-content",3),Ie(7,Bn,1,0,"ng-container",4),n()),i&2&&(s(2),E(t.data.title),s(),m("mat-dialog-close",!1),s(4),m("ngComponentOutlet",t.data.componentType))},dependencies:[R,ne,ue,ge,fe,ee,$,ji],styles:[".dialogue-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:baseline}.dialog-close-icon[_ngcontent-%COMP%]{margin-right:15px}.mat-mdc-dialog-content[_ngcontent-%COMP%]{max-height:max-content}"]})}return o})();function Vn(o,d){if(o&1&&(a(0,"button",4),l(1),n()),o&2){let e=f();m("mat-dialog-close",!0),s(),E(e.data.confirmBtnText)}}var tn=(()=>{class o{data=A(pe);static \u0275fac=function(i){return new(i||o)};static \u0275cmp=v({type:o,selectors:[["dialog-confirmation"]],decls:12,vars:6,consts:[[1,"dialogue-header"],["mat-dialog-title",""],["mat-icon-button","",1,"dialog-close-icon",3,"mat-dialog-close"],["align","end"],["mat-flat-button","",3,"mat-dialog-close"]],template:function(i,t){i&1&&(a(0,"div",0)(1,"h5",1),l(2),n(),a(3,"button",2)(4,"mat-icon"),l(5,"close"),n()()(),a(6,"mat-dialog-content"),l(7),n(),a(8,"mat-dialog-actions",3)(9,"button",4),l(10),n(),u(11,Vn,2,2,"button",4),n()),i&2&&(s(2),E(t.data.title),s(),m("mat-dialog-close",!1),s(4),U(" ",t.data.message,`
2
+ `),s(2),m("mat-dialog-close",!1),s(),E(t.data.cancelBtnText),s(),g(t.data.confirmBtnText?11:-1))},dependencies:[R,ne,ue,ge,Le,fe,ee,me,$],styles:[".dialogue-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:baseline}.dialog-close-icon[_ngcontent-%COMP%]{margin-right:15px}.mat-mdc-dialog-content[_ngcontent-%COMP%]{max-height:max-content}"]})}return o})();function Ln(o,d){if(o&1&&(a(0,"button",9),l(1),n()),o&2){let e=f(),i=oe(1);m("disabled",!i.valid),s(),E(e.data.confirmBtnText)}}var on=(()=>{class o{dialogRef=A(Ae);data=A(pe);saveName(){this.dialogRef.close(this.data)}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=v({type:o,selectors:[["dialog-name"]],decls:19,vars:6,consts:[["name","ngForm"],["name","name",3,"ngSubmit"],[1,"dialogue-header"],["mat-dialog-title",""],["mat-icon-button","",1,"dialog-close-icon",3,"mat-dialog-close"],[1,"field-margin"],["matInput","","type","text","id","name","placeholder","Name","name","name","required","","cdkFocusInitial","",3,"ngModelChange","ngModel"],["align","end"],["mat-flat-button","",3,"mat-dialog-close"],["mat-flat-button","","type","submit",3,"disabled"]],template:function(i,t){if(i&1){let r=D();a(0,"form",1,0),_("ngSubmit",function(){return M(r),y(t.saveName())}),a(2,"div",2)(3,"h5",3),l(4),n(),a(5,"button",4)(6,"mat-icon"),l(7,"close"),n()()(),a(8,"mat-dialog-content")(9,"mat-form-field",5)(10,"mat-label"),l(11,"Name"),n(),a(12,"input",6),St("ngModelChange",function(p){return M(r),yt(t.data.name,p)||(t.data.name=p),y(p)}),n(),a(13,"mat-error"),l(14," A name is required "),n()()(),a(15,"mat-dialog-actions",7)(16,"button",8),l(17),n(),u(18,Ln,2,2,"button",9),n()()}i&2&&(s(4),E(t.data.title),s(),m("mat-dialog-close",!1),s(7),Mt("ngModel",t.data.name),s(4),m("mat-dialog-close",!1),s(),E(t.data.cancelBtnText),s(),g(t.data.confirmBtnText?18:-1))},dependencies:[ne,ue,ge,Le,fe,J,R,le,V,B,pt,be,z,ee,me,$,j,ct,Q,F,H,O,zt,jt],styles:[".dialogue-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:baseline}.dialog-close-icon[_ngcontent-%COMP%]{margin-right:15px}.mat-mdc-dialog-content[_ngcontent-%COMP%]{max-height:max-content}.field-margin[_ngcontent-%COMP%]{margin-left:15px;margin-bottom:15px}"]})}return o})();function Nn(o,d){if(o&1&&(a(0,"mat-option",12),l(1),n()),o&2){let e=d.$implicit;m("value",ye(e.value)),s(),E(e.label)}}function Rn(o,d){if(o&1){let e=D();a(0,"button",21),_("click",function(){M(e);let t=f();return y(t.moveCtrlUp())}),a(1,"mat-icon"),l(2,"arrow_drop_up"),n()()}}function Wn(o,d){if(o&1){let e=D();a(0,"button",22),_("click",function(){M(e);let t=f();return y(t.moveCtrlDown())}),a(1,"mat-icon"),l(2,"arrow_drop_down"),n()()}}var nn=(()=>{class o{app=A(dt);ctrlFormGroup=h.required();controlIndex=h(void 0);arrayLength=h(void 0);deleteCtrl=q();moveUp=q();moveDown=q();colors=[];ngOnInit(){this.colors=this.app.configurableThemeColors}deleteControl(){let e={ctrlIndex:this.controlIndex(),pathID:this.ctrlFormGroup().get("pathID").value};this.deleteCtrl.emit(e)}moveCtrlUp(){this.moveUp.emit(this.controlIndex())}moveCtrlDown(){this.moveDown.emit(this.controlIndex())}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=v({type:o,selectors:[["boolean-control-config"]],inputs:{ctrlFormGroup:[1,"ctrlFormGroup"],controlIndex:[1,"controlIndex"],arrayLength:[1,"arrayLength"]},outputs:{deleteCtrl:"deleteCtrl",moveUp:"moveUp",moveDown:"moveDown"},decls:36,vars:3,consts:[[1,"ctrl-grid","rounded-card","rounded-card-color",3,"formGroup"],[1,"controls","flex-container"],[1,"flex-label"],[1,"full-width"],["matInput","","type","string","placeholder","Enter a display label...","formControlName","ctrlLabel"],[1,"flex-settings"],[1,"settings"],["placeholder","Select Type...","formControlName","type","name","type","required",""],["value","1"],["value","2"],["value","3"],["placeholder","Select Color...","formControlName","color","name","color","required",""],[3,"value"],[1,"flex-full-width"],["formControlName","isNumeric"],[1,"actions"],[1,"flex-actions"],[1,"btn-grid"],["mat-icon-button","","type","button","aria-label","Move control up in the list",1,"up"],["mat-icon-button","","type","button","aria-label","Move control down in the list",1,"down"],["mat-icon-button","","type","button","aria-label","Delete control",1,"delete",3,"click"],["mat-icon-button","","type","button","aria-label","Move control up in the list",1,"up",3,"click"],["mat-icon-button","","type","button","aria-label","Move control down in the list",1,"down",3,"click"]],template:function(i,t){i&1&&(a(0,"div",0)(1,"div",1)(2,"div",2)(3,"mat-form-field",3)(4,"mat-label"),l(5,"Label"),n(),b(6,"input",4),n()(),a(7,"div",5)(8,"mat-form-field",6)(9,"mat-label"),l(10,"Type"),n(),a(11,"mat-select",7)(12,"mat-option",8),l(13,"Toggle"),n(),a(14,"mat-option",9),l(15,"Push"),n(),a(16,"mat-option",10),l(17,"Indicator"),n()()()(),a(18,"div",5)(19,"mat-form-field",6)(20,"mat-label"),l(21,"Color"),n(),a(22,"mat-select",11),S(23,Nn,2,3,"mat-option",12,k),n()()(),a(25,"div",13)(26,"mat-checkbox",14),l(27," Use numeric path "),n()()(),a(28,"div",15)(29,"div",16)(30,"div",17),u(31,Rn,3,0,"button",18),u(32,Wn,3,0,"button",19),a(33,"button",20),_("click",function(){return t.deleteControl()}),a(34,"mat-icon"),l(35,"delete"),n()()()()()()),i&2&&(m("formGroup",t.ctrlFormGroup()),s(23),T(t.colors),s(8),g(t.controlIndex()!==0?31:-1),s(),g(t.controlIndex()!==t.arrayLength()-1?32:-1))},dependencies:[j,Q,F,H,O,W,Z,Re,V,B,z,re,X,$,Ce,se,J,R],styles:['.ctrl-grid[_ngcontent-%COMP%]{display:grid;width:auto;height:auto;margin:0 0 10px;grid-template-columns:[col-start] calc(100% - 90px) [col1-end] 80px [col2-end];grid-template-areas:"controls actions";row-gap:0px;column-gap:10px;justify-items:center;align-items:center;justify-content:center;align-content:center;padding-top:20px}.controls[_ngcontent-%COMP%]{grid-area:controls;width:100%}.actions[_ngcontent-%COMP%]{grid-area:actions}.btn-grid[_ngcontent-%COMP%]{display:grid;width:80px;height:80px;margin:0;grid-template-columns:[col-start] 50% [col1-end] 50% [col2-end];grid-template-rows:[row-start] 50% [row1-end] 50% [row2-end];grid-template-areas:"up delete" "down delete";row-gap:0px;column-gap:0px;justify-items:center;align-items:center;justify-content:center;align-content:center}.up[_ngcontent-%COMP%]{grid-area:up}.down[_ngcontent-%COMP%]{grid-area:down}.delete[_ngcontent-%COMP%]{grid-area:delete}.flex-label[_ngcontent-%COMP%]{flex-grow:2;flex-shrink:2}.flex-settings[_ngcontent-%COMP%]{flex-grow:1;flex-shrink:1}.settings[_ngcontent-%COMP%]{min-width:100px}.flex-actions[_ngcontent-%COMP%]{flex-grow:0;flex-shrink:0}.flex-full-width[_ngcontent-%COMP%]{width:100%}']})}return o})();function Un(o,d){if(o&1){let e=D();a(0,"boolean-control-config",4),_("moveUp",function(t){M(e);let r=f();return y(r.moveUp(t))})("moveDown",function(t){M(e);let r=f();return y(r.moveDown(t))})("deleteCtrl",function(t){M(e);let r=f();return y(r.deletePath(t))}),n()}if(o&2){let e=d.$implicit,i=d.$index,t=f();m("ctrlFormGroup",t.getFormGroup(e))("controlIndex",i)("arrayLength",t.arrayLength)}}var an=(()=>{class o{fb=A(At);multiCtrlArray=h.required();addPath=q();updatePath=q();delPath=q();multiFormGroup=null;arrayLength=0;multiCtrlArraySubscription=null;ngOnInit(){this.arrayLength=this.multiCtrlArray().length,this.multiFormGroup=new ko({multiCtrlArray:this.multiCtrlArray()}),this.multiCtrlArraySubscription=this.multiCtrlArray().valueChanges.pipe(Pt(350)).subscribe(e=>{this.updatePath.emit(e)})}addCtrlGroup(){let e=Xi.create();this.multiCtrlArray().push(this.fb.group({ctrlLabel:[null,Y.required],type:["1",Y.required],pathID:[e],color:["contrast"],isNumeric:[!1],value:[null]})),this.arrayLength=this.multiCtrlArray().length;let i={path:{description:null,path:null,pathID:e,source:"default",pathType:"boolean",supportsPut:!0,isPathConfigurable:!0,showPathSkUnitsFilter:!1,pathSkUnitsFilter:null,convertUnitTo:null,sampleTime:500},ctrlType:1};this.addPath.emit(i)}moveUp(e){let i=this.multiCtrlArray().at(e);this.multiCtrlArray().removeAt(e,{emitEvent:!1}),this.multiCtrlArray().insert(e-1,i,{emitEvent:!1})}moveDown(e){let i=this.multiCtrlArray().at(e);this.multiCtrlArray().removeAt(e,{emitEvent:!1}),this.multiCtrlArray().insert(e+1,i,{emitEvent:!1})}deletePath(e){this.delPath.emit(e),this.arrayLength=this.multiCtrlArray().length}getFormGroup(e){return e}ngOnDestroy(){this.multiCtrlArraySubscription?.unsubscribe()}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=v({type:o,selectors:[["boolean-multicontrol-options"]],inputs:{multiCtrlArray:[1,"multiCtrlArray"]},outputs:{addPath:"addPath",updatePath:"updatePath",delPath:"delPath"},decls:7,vars:1,consts:[[3,"formGroup"],["formArrayName","multiCtrlArray"],[1,"full-width",3,"ctrlFormGroup","controlIndex","arrayLength"],["type","button","mat-mini-fab","","color","primary","aria-label","Add control down in the list",1,"add-btn",3,"click"],[1,"full-width",3,"moveUp","moveDown","deleteCtrl","ctrlFormGroup","controlIndex","arrayLength"]],template:function(i,t){i&1&&(a(0,"div",0)(1,"div",1),S(2,Un,1,3,"boolean-control-config",2,Vt),a(4,"button",3),_("click",function(){return t.addCtrlGroup()}),a(5,"mat-icon"),l(6,"add"),n()()()()),i&2&&(m("formGroup",t.multiFormGroup),s(2),T(t.multiCtrlArray().controls))},dependencies:[j,H,W,Z,Fo,nn,ee,uo,J,R],styles:["[_nghost-%COMP%]{display:block;width:100%;height:100%;padding-top:15px;padding-bottom:15px}.add-btn[_ngcontent-%COMP%]{margin-left:calc(50% - 20px)}"]})}return o})();function qn(o,d){if(o&1&&(a(0,"mat-option",8),l(1),n()),o&2){let e=d.$implicit;m("value",ye(e.value)),s(),E(e.label)}}var ln=(()=>{class o{app=A(dt);displayName=h.required();showLabel=h.required();convertUnitTo=h.required();datasetUUID=h.required();datasetAverageArray=h.required();showAverageData=h.required();trackAgainstAverage=h.required();showDatasetMinimumValueLine=h.required();showDatasetMaximumValueLine=h.required();showDatasetAverageValueLine=h.required();showDatasetAngleAverageValueLine=h.required();verticalChart=h.required();inverseYAxis=h.required();showTimeScale=h.required();showYScale=h.required();startScaleAtZero=h.required();yScaleSuggestedMin=h.required();yScaleSuggestedMax=h.required();enableMinMaxScaleLimit=h.required();yScaleMin=h.required();yScaleMax=h.required();numDecimal=h.required();color=h.required();colors=[];ngOnInit(){this.colors=this.app.configurableThemeColors,this.showAverageData()&&!this.showAverageData()?.value&&this.trackAgainstAverage().disable(),this.enableMinMaxScaleLimit()&&this.setValueScaleOptionsControls(this.enableMinMaxScaleLimit().value)}setValueScaleOptionsControls(e){e?(this.yScaleMin()?.enable(),this.yScaleMax()?.enable(),this.yScaleSuggestedMin()?.disable(),this.yScaleSuggestedMax()?.disable()):(this.yScaleMin()?.disable(),this.yScaleMax()?.disable(),this.yScaleSuggestedMin()?.enable(),this.yScaleSuggestedMax()?.enable())}setScaleControls(e){this.setValueScaleOptionsControls(e.value)}enableTrackAgainstMovingAverage(e){e.checked?this.trackAgainstAverage().enable():(this.trackAgainstAverage().setValue(e.checked),this.trackAgainstAverage().disable())}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=v({type:o,selectors:[["config-display-chart-options"]],inputs:{displayName:[1,"displayName"],showLabel:[1,"showLabel"],convertUnitTo:[1,"convertUnitTo"],datasetUUID:[1,"datasetUUID"],datasetAverageArray:[1,"datasetAverageArray"],showAverageData:[1,"showAverageData"],trackAgainstAverage:[1,"trackAgainstAverage"],showDatasetMinimumValueLine:[1,"showDatasetMinimumValueLine"],showDatasetMaximumValueLine:[1,"showDatasetMaximumValueLine"],showDatasetAverageValueLine:[1,"showDatasetAverageValueLine"],showDatasetAngleAverageValueLine:[1,"showDatasetAngleAverageValueLine"],verticalChart:[1,"verticalChart"],inverseYAxis:[1,"inverseYAxis"],showTimeScale:[1,"showTimeScale"],showYScale:[1,"showYScale"],startScaleAtZero:[1,"startScaleAtZero"],yScaleSuggestedMin:[1,"yScaleSuggestedMin"],yScaleSuggestedMax:[1,"yScaleSuggestedMax"],enableMinMaxScaleLimit:[1,"enableMinMaxScaleLimit"],yScaleMin:[1,"yScaleMin"],yScaleMax:[1,"yScaleMax"],numDecimal:[1,"numDecimal"],color:[1,"color"]},decls:84,vars:20,consts:[["minLine",""],[1,"tab-content"],[1,"chart-flex-container"],[1,"chart-panel-group"],[1,"full-width"],["matInput","","placeholder","Enter a label to display","name","displayName",3,"formControl"],["name","showLabel",1,"full-width",3,"formControl"],["placeholder","Select Color...","name","color","required","",3,"formControl"],[3,"value"],[1,"flex-item-rounded-card","rounded-card-color"],[2,"margin-left","10px"],["matInput","","type","number","min","0","max","5","placeholder","Enter or select number...","name","numDecimal","required","",3,"formControl"],["name","showAverageData",1,"full-width",2,"margin-top","10px",3,"change","formControl"],["name","trackAgainstAverage",1,"full-width",2,"margin-left","25px",3,"formControl"],["name","verticalChart",3,"formControl"],[1,"no-margin"],[1,"mat-caption"],["aria-label","Select an option","name","enableMinMaxScaleLimit",1,"chart-option-radio-group",3,"formControl"],[1,"chart-option-radio-button",3,"change","value"],[1,"chart-option-radio-button-config"],[1,"chart-option-radio-button-config-form-field"],["matInput","","type","number","name","yScaleSuggestedMin",3,"formControl"],["matInput","","type","number","name","yScaleSuggestedMax",3,"formControl"],[1,"chart-option-radio-button-config-item"],["matInput","","type","number","name","yScaleMin","required","",3,"formControl"],["matInput","","type","number","name","yScaleMax","required","",3,"formControl"],["name","showYScale",1,"full-width",3,"formControl"],["name","inverseYAxis",3,"formControl"],["name","showTimeScale",1,"full-width",3,"formControl"],["name","showDatasetMaximumValueLine",1,"full-width",3,"formControl"],["name","showDatasetAverageValueLine",1,"full-width",3,"formControl"],["name","showDatasetMinimumValueLine",1,"full-width",3,"formControl"]],template:function(i,t){if(i&1){let r=D();a(0,"div",1)(1,"div",2)(2,"div",3)(3,"mat-form-field",4)(4,"mat-label"),l(5,"Widget Label"),n(),b(6,"input",5),n()(),a(7,"div",3)(8,"mat-checkbox",6),l(9," Show Label "),n()()(),a(10,"div",2)(11,"mat-form-field",4)(12,"mat-label"),l(13,"Color"),n(),a(14,"mat-select",7),S(15,qn,2,3,"mat-option",8,k),n()()(),a(17,"div",2)(18,"div",9)(19,"div")(20,"p"),l(21,"Series"),n(),a(22,"mat-form-field",10)(23,"mat-label"),l(24,"Value Decimal Places"),n(),b(25,"input",11),n(),a(26,"mat-checkbox",12),_("change",function(p){return M(r),y(t.enableTrackAgainstMovingAverage(p))}),l(27," Display Moving Average "),n(),a(28,"mat-checkbox",13),l(29," Track Against Moving Average "),n()(),a(30,"mat-checkbox",14),l(31," Vertical Data Graph "),n()(),a(32,"div",9)(33,"div")(34,"p",15),l(35,"Data Scale"),n(),a(36,"span",16),l(37,"(Default node is automatic scale)"),n(),a(38,"mat-radio-group",17)(39,"mat-radio-button",18),_("change",function(p){return M(r),y(t.setScaleControls(p))}),l(40,"Auto Scale"),n(),a(41,"div",19)(42,"mat-form-field",20)(43,"mat-label"),l(44,"Suggested Min"),n(),b(45,"input",21),n(),a(46,"mat-form-field",20)(47,"mat-label"),l(48,"Suggested Max"),n(),b(49,"input",22),n()(),a(50,"mat-radio-button",18),_("change",function(p){return M(r),y(t.setScaleControls(p))}),l(51," Fixed Scale "),n(),a(52,"div",19)(53,"div",23)(54,"mat-form-field",20)(55,"mat-label"),l(56,"Min"),n(),b(57,"input",24),n()(),a(58,"div",23)(59,"mat-form-field",20)(60,"mat-label"),l(61,"Max"),n(),b(62,"input",25),n()()()(),a(63,"mat-checkbox",26),l(64," Show Scale Ticks "),n(),a(65,"mat-checkbox",27),l(66," Inverse Scale "),n()()(),a(67,"div",9)(68,"div")(69,"p",15),l(70,"Time Scale"),n(),a(71,"mat-checkbox",28),l(72," Show Scale Ticks "),n()()(),a(73,"div",9)(74,"div")(75,"p",15),l(76,"Dataset"),n(),a(77,"mat-checkbox",29),l(78," Show Maximum Line "),n(),a(79,"mat-checkbox",30),l(80," Show Average Line "),n(),a(81,"mat-checkbox",31,0),l(83," Show Minimum Line "),n()()()()()}i&2&&(s(6),m("formControl",t.displayName()),s(2),m("formControl",t.showLabel()),s(6),m("formControl",t.color()),s(),T(t.colors),s(10),m("formControl",t.numDecimal()),s(),m("formControl",t.showAverageData()),s(2),m("formControl",t.trackAgainstAverage()),s(2),m("formControl",t.verticalChart()),s(8),m("formControl",t.enableMinMaxScaleLimit()),s(),m("value",!1),s(6),m("formControl",t.yScaleSuggestedMin()),s(4),m("formControl",t.yScaleSuggestedMax()),s(),m("value",!0),s(7),m("formControl",t.yScaleMin()),s(5),m("formControl",t.yScaleMax()),s(),m("formControl",t.showYScale()),s(2),m("formControl",t.inverseYAxis()),s(6),m("formControl",t.showTimeScale()),s(6),m("formControl",t.showDatasetMaximumValueLine()),s(2),m("formControl",t.showDatasetAverageValueLine()),s(2),m("formControl",t.showDatasetMinimumValueLine()))},dependencies:[Ho,le,V,B,Ce,se,We,re,X,Et,be,z,zo,Zo,jo,W,Q,Ne,F,O,mt,Xt,he],styles:[".chart-flex-container[_ngcontent-%COMP%]{display:flex;flex-direction:row;flex-wrap:wrap;margin:15px 0;gap:15px;align-items:stretch}.chart-panel-group[_ngcontent-%COMP%]{min-width:250px;flex-grow:1}.no-margin[_ngcontent-%COMP%]{margin:0}.chart-option-radio-group[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:0;align-items:flex-start}.chart-option-radio-button[_ngcontent-%COMP%]{margin:0}.chart-option-radio-button-config[_ngcontent-%COMP%]{margin-left:35px;display:flex;flex-direction:row;flex-wrap:wrap;gap:10px;align-items:flex-start}.chart-option-radio-button-config-item[_ngcontent-%COMP%]{flex-grow:0;flex-shrink:1;min-width:50px}.chart-option-radio-button-config-form-field[_ngcontent-%COMP%]{display:block;max-width:118px}"]})}return o})();var Qn=(o,d)=>d.uuid;function Yn(o,d){if(o&1&&(a(0,"mat-option",4),l(1),n()),o&2){let e=d.$implicit;m("value",e.uuid),s(),U(" ",e.label," ")}}function Hn(o,d){if(o&1&&(a(0,"mat-option",4),l(1),n()),o&2){let e=d.$implicit;m("value",e.measure),s(),U(" ",e.description," ")}}function Zn(o,d){if(o&1&&(a(0,"mat-optgroup",6),S(1,Hn,2,2,"mat-option",4,k),n()),o&2){let e=d.$implicit;m("label",e.group),s(),T(e.units)}}var rn=(()=>{class o{datasetService=A(Kt);units=A(ft);datasetUUID=h.required();convertUnitTo=h.required();availableDataSets=[];unitList={};ngOnInit(){this.availableDataSets=this.datasetService.list().filter(i=>i.editable!==!1).sort();let e=this.datasetUUID();e.value&&this.setPathUnits(e.value)}setPathUnits(e){let i=this.datasetService.getDatasetConfig(e);return e&&i?(this.unitList=this.units.getConversionsForPath(i.path),this.convertUnitTo()?.enable(),!0):(this.unitList=this.units.getConversionsForPath(""),this.convertUnitTo()?.disable(),!1)}datasetChanged(e){this.setPathUnits(e.value)}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=v({type:o,selectors:[["config-dataset-chart-options"]],inputs:{datasetUUID:[1,"datasetUUID"],convertUnitTo:[1,"convertUnitTo"]},decls:14,vars:2,consts:[[1,"display-content","tab-content"],[1,"widget-options-grid"],[1,"options-grid-span2"],["placeholder","Select dataset...","name","datasetUUID","required","",3,"selectionChange","formControl"],[3,"value"],["placeholder","Select unit...","name","convertUnitTo","required","",3,"formControl"],[3,"label"]],template:function(i,t){i&1&&(a(0,"div",0)(1,"div",1)(2,"mat-form-field",2)(3,"mat-label"),l(4,"Dataset"),n(),a(5,"mat-select",3),_("selectionChange",function(c){return t.datasetChanged(c)}),S(6,Yn,2,2,"mat-option",4,Qn),n()(),a(8,"mat-form-field",2)(9,"mat-label"),l(10,"Display Format"),n(),a(11,"mat-select",5),S(12,Zn,3,1,"mat-optgroup",6,k),n()()()()),i&2&&(s(5),m("formControl",t.datasetUUID()),s(),T(t.availableDataSets),s(5),m("formControl",t.convertUnitTo()),s(),T(t.unitList.conversions))},dependencies:[le,V,B,We,re,X,gt,W,F,O,he],styles:[".display-content[_ngcontent-%COMP%]{display:block;height:100%;width:100%;padding-top:15px;padding-bottom:10px}"]})}return o})();var sn=(()=>{class o{transform(e){return Object.keys(e)}static \u0275fac=function(i){return new(i||o)};static \u0275pipe=Fi({name:"objectKeys",type:o,pure:!0})}return o})();var zn=["panel"],Xn=["*"];function Kn(o,d){if(o&1&&(Li(0,"div",1,0),Nt(2),Ni()),o&2){let e=d.id,i=f();at(i._classList),te("mat-mdc-autocomplete-visible",i.showPanel)("mat-mdc-autocomplete-hidden",!i.showPanel)("mat-autocomplete-panel-animations-enabled",!i._animationsDisabled)("mat-primary",i._color==="primary")("mat-accent",i._color==="accent")("mat-warn",i._color==="warn"),qi("id",i.id),K("aria-label",i.ariaLabel||null)("aria-labelledby",i._getPanelAriaLabelledby(e))}}var gi=class{source;option;constructor(d,e){this.source=d,this.option=e}},mn=new Me("mat-autocomplete-default-options",{providedIn:"root",factory:Jn});function Jn(){return{autoActiveFirstOption:!1,autoSelectActiveOption:!1,hideSingleSelectionIndicator:!1,requireSelection:!1,hasBackdrop:!1}}var oi=(()=>{class o{_changeDetectorRef=A(rt);_elementRef=A(He);_defaults=A(mn);_animationsDisabled=Ve();_activeOptionChanges=Dt.EMPTY;_keyManager;showPanel=!1;get isOpen(){return this._isOpen&&this.showPanel}_isOpen=!1;_latestOpeningTrigger;_setColor(e){this._color=e,this._changeDetectorRef.markForCheck()}_color;template;panel;options;optionGroups;ariaLabel;ariaLabelledby;displayWith=null;autoActiveFirstOption;autoSelectActiveOption;requireSelection;panelWidth;disableRipple;optionSelected=new de;opened=new de;closed=new de;optionActivated=new de;set classList(e){this._classList=e,this._elementRef.nativeElement.className=""}_classList;get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=e,this._syncParentProperties()}_hideSingleSelectionIndicator;_syncParentProperties(){if(this.options)for(let e of this.options)e._changeDetectorRef.markForCheck()}id=A(wt).getId("mat-autocomplete-");inertGroups;constructor(){let e=A(no);this.inertGroups=e?.SAFARI||!1,this.autoActiveFirstOption=!!this._defaults.autoActiveFirstOption,this.autoSelectActiveOption=!!this._defaults.autoSelectActiveOption,this.requireSelection=!!this._defaults.requireSelection,this._hideSingleSelectionIndicator=this._defaults.hideSingleSelectionIndicator??!1}ngAfterContentInit(){this._keyManager=new so(this.options).withWrap().skipPredicate(this._skipPredicate),this._activeOptionChanges=this._keyManager.change.subscribe(e=>{this.isOpen&&this.optionActivated.emit({source:this,option:this.options.toArray()[e]||null})}),this._setVisibility()}ngOnDestroy(){this._keyManager?.destroy(),this._activeOptionChanges.unsubscribe()}_setScrollTop(e){this.panel&&(this.panel.nativeElement.scrollTop=e)}_getScrollTop(){return this.panel?this.panel.nativeElement.scrollTop:0}_setVisibility(){this.showPanel=!!this.options?.length,this._changeDetectorRef.markForCheck()}_emitSelectEvent(e){let i=new gi(this,e);this.optionSelected.emit(i)}_getPanelAriaLabelledby(e){if(this.ariaLabel)return null;let i=e?e+" ":"";return this.ariaLabelledby?i+this.ariaLabelledby:e}_skipPredicate(){return!1}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=v({type:o,selectors:[["mat-autocomplete"]],contentQueries:function(i,t,r){if(i&1&&(_t(r,X,5),_t(r,Wo,5)),i&2){let c;De(c=Pe())&&(t.options=c),De(c=Pe())&&(t.optionGroups=c)}},viewQuery:function(i,t){if(i&1&&(vt(Ii,7),vt(zn,5)),i&2){let r;De(r=Pe())&&(t.template=r.first),De(r=Pe())&&(t.panel=r.first)}},hostAttrs:[1,"mat-mdc-autocomplete"],inputs:{ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],displayWith:"displayWith",autoActiveFirstOption:[2,"autoActiveFirstOption","autoActiveFirstOption",N],autoSelectActiveOption:[2,"autoSelectActiveOption","autoSelectActiveOption",N],requireSelection:[2,"requireSelection","requireSelection",N],panelWidth:"panelWidth",disableRipple:[2,"disableRipple","disableRipple",N],classList:[0,"class","classList"],hideSingleSelectionIndicator:[2,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",N]},outputs:{optionSelected:"optionSelected",opened:"opened",closed:"closed",optionActivated:"optionActivated"},exportAs:["matAutocomplete"],features:[Tt([{provide:Ro,useExisting:o}])],ngContentSelectors:Xn,decls:1,vars:0,consts:[["panel",""],["role","listbox",1,"mat-mdc-autocomplete-panel","mdc-menu-surface","mdc-menu-surface--open",3,"id"]],template:function(i,t){i&1&&(Lt(),Bi(0,Kn,3,17,"ng-template"))},styles:[`div.mat-mdc-autocomplete-panel{width:100%;max-height:256px;visibility:hidden;transform-origin:center top;overflow:auto;padding:8px 0;box-sizing:border-box;position:relative;border-radius:var(--mat-autocomplete-container-shape, var(--mat-sys-corner-extra-small));box-shadow:var(--mat-autocomplete-container-elevation-shadow, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12));background-color:var(--mat-autocomplete-background-color, var(--mat-sys-surface-container))}@media(forced-colors: active){div.mat-mdc-autocomplete-panel{outline:solid 1px}}.cdk-overlay-pane:not(.mat-mdc-autocomplete-panel-above) div.mat-mdc-autocomplete-panel{border-top-left-radius:0;border-top-right-radius:0}.mat-mdc-autocomplete-panel-above div.mat-mdc-autocomplete-panel{border-bottom-left-radius:0;border-bottom-right-radius:0;transform-origin:center bottom}div.mat-mdc-autocomplete-panel.mat-mdc-autocomplete-visible{visibility:visible}div.mat-mdc-autocomplete-panel.mat-mdc-autocomplete-hidden{visibility:hidden;pointer-events:none}@keyframes _mat-autocomplete-enter{from{opacity:0;transform:scaleY(0.8)}to{opacity:1;transform:none}}.mat-autocomplete-panel-animations-enabled{animation:_mat-autocomplete-enter 120ms cubic-bezier(0, 0, 0.2, 1)}mat-autocomplete{display:none}
3
+ `],encapsulation:2,changeDetection:0})}return o})();var $n={provide:Zt,useExisting:Ot(()=>kt),multi:!0};var An=new Me("mat-autocomplete-scroll-strategy",{providedIn:"root",factory:()=>{let o=A($e);return()=>Ai(o)}});function ea(o){let d=A($e);return()=>Ai(d)}var ta={provide:An,deps:[],useFactory:ea},kt=(()=>{class o{_environmentInjector=A(ki);_element=A(He);_injector=A($e);_viewContainerRef=A(Pi);_zone=A(Bt);_changeDetectorRef=A(rt);_dir=A(Ht,{optional:!0});_formField=A(Bo,{optional:!0,host:!0});_viewportRuler=A(bo);_scrollStrategy=A(An);_renderer=A(Di);_animationsDisabled=Ve();_defaults=A(mn,{optional:!0});_overlayRef;_portal;_componentDestroyed=!1;_initialized=new Ct;_keydownSubscription;_outsideClickSubscription;_cleanupWindowBlur;_previousValue;_valueOnAttach;_valueOnLastKeydown;_positionStrategy;_manuallyFloatingLabel=!1;_closingActionsSubscription;_viewportSubscription=Dt.EMPTY;_breakpointObserver=A(Qt);_handsetLandscapeSubscription=Dt.EMPTY;_canOpenOnNextFocus=!0;_valueBeforeAutoSelection;_pendingAutoselectedOption;_closeKeyEventStream=new Ct;_overlayPanelClass=ro(this._defaults?.overlayPanelClass||[]);_windowBlurHandler=()=>{this._canOpenOnNextFocus=this.panelOpen||!this._hasFocus()};_onChange=()=>{};_onTouched=()=>{};autocomplete;position="auto";connectedTo;autocompleteAttribute="off";autocompleteDisabled;constructor(){}_aboveClass="mat-mdc-autocomplete-panel-above";ngAfterViewInit(){this._initialized.next(),this._initialized.complete(),this._cleanupWindowBlur=this._renderer.listen("window","blur",this._windowBlurHandler)}ngOnChanges(e){e.position&&this._positionStrategy&&(this._setStrategyPositions(this._positionStrategy),this.panelOpen&&this._overlayRef.updatePosition())}ngOnDestroy(){this._cleanupWindowBlur?.(),this._handsetLandscapeSubscription.unsubscribe(),this._viewportSubscription.unsubscribe(),this._componentDestroyed=!0,this._destroyPanel(),this._closeKeyEventStream.complete(),this._clearFromModal()}get panelOpen(){return this._overlayAttached&&this.autocomplete.showPanel}_overlayAttached=!1;openPanel(){this._openPanelInternal()}closePanel(){this._resetLabel(),this._overlayAttached&&(this.panelOpen&&this._zone.run(()=>{this.autocomplete.closed.emit()}),this.autocomplete._latestOpeningTrigger===this&&(this.autocomplete._isOpen=!1,this.autocomplete._latestOpeningTrigger=null),this._overlayAttached=!1,this._pendingAutoselectedOption=null,this._overlayRef&&this._overlayRef.hasAttached()&&(this._overlayRef.detach(),this._closingActionsSubscription.unsubscribe()),this._updatePanelState(),this._componentDestroyed||this._changeDetectorRef.detectChanges(),this._trackedModal&&Yt(this._trackedModal,"aria-owns",this.autocomplete.id))}updatePosition(){this._overlayAttached&&this._overlayRef.updatePosition()}get panelClosingActions(){return ze(this.optionSelections,this.autocomplete._keyManager.tabOut.pipe(Ee(()=>this._overlayAttached)),this._closeKeyEventStream,this._getOutsideClickStream(),this._overlayRef?this._overlayRef.detachments().pipe(Ee(()=>this._overlayAttached)):si()).pipe(je(e=>e instanceof Uo?e:null))}optionSelections=Ti(()=>{let e=this.autocomplete?this.autocomplete.options:null;return e?e.changes.pipe(Ke(e),Ft(()=>ze(...e.map(i=>i.onSelectionChange)))):this._initialized.pipe(Ft(()=>this.optionSelections))});get activeOption(){return this.autocomplete&&this.autocomplete._keyManager?this.autocomplete._keyManager.activeItem:null}_getOutsideClickStream(){return new ri(e=>{let i=r=>{let c=oo(r),p=this._formField?this._formField.getConnectedOverlayOrigin().nativeElement:null,C=this.connectedTo?this.connectedTo.elementRef.nativeElement:null;this._overlayAttached&&c!==this._element.nativeElement&&!this._hasFocus()&&(!p||!p.contains(c))&&(!C||!C.contains(c))&&this._overlayRef&&!this._overlayRef.overlayElement.contains(c)&&e.next(r)},t=[this._renderer.listen("document","click",i),this._renderer.listen("document","auxclick",i),this._renderer.listen("document","touchend",i)];return()=>{t.forEach(r=>r())}})}writeValue(e){Promise.resolve(null).then(()=>this._assignOptionValue(e))}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this._element.nativeElement.disabled=e}_handleKeydown(e){let i=e,t=i.keyCode,r=st(i);if(t===27&&!r&&i.preventDefault(),this._valueOnLastKeydown=this._element.nativeElement.value,this.activeOption&&t===13&&this.panelOpen&&!r)this.activeOption._selectViaInteraction(),this._resetActiveItem(),i.preventDefault();else if(this.autocomplete){let c=this.autocomplete._keyManager.activeItem,p=t===38||t===40;t===9||p&&!r&&this.panelOpen?this.autocomplete._keyManager.onKeydown(i):p&&this._canOpen()&&this._openPanelInternal(this._valueOnLastKeydown),(p||this.autocomplete._keyManager.activeItem!==c)&&(this._scrollToOption(this.autocomplete._keyManager.activeItemIndex||0),this.autocomplete.autoSelectActiveOption&&this.activeOption&&(this._pendingAutoselectedOption||(this._valueBeforeAutoSelection=this._valueOnLastKeydown),this._pendingAutoselectedOption=this.activeOption,this._assignOptionValue(this.activeOption.value)))}}_handleInput(e){let i=e.target,t=i.value;if(i.type==="number"&&(t=t==""?null:parseFloat(t)),this._previousValue!==t){if(this._previousValue=t,this._pendingAutoselectedOption=null,(!this.autocomplete||!this.autocomplete.requireSelection)&&this._onChange(t),!t)this._clearPreviousSelectedOption(null,!1);else if(this.panelOpen&&!this.autocomplete.requireSelection){let r=this.autocomplete.options?.find(c=>c.selected);if(r){let c=this._getDisplayValue(r.value);t!==c&&r.deselect(!1)}}if(this._canOpen()&&this._hasFocus()){let r=this._valueOnLastKeydown??this._element.nativeElement.value;this._valueOnLastKeydown=null,this._openPanelInternal(r)}}}_handleFocus(){this._canOpenOnNextFocus?this._canOpen()&&(this._previousValue=this._element.nativeElement.value,this._attachOverlay(this._previousValue),this._floatLabel(!0)):this._canOpenOnNextFocus=!0}_handleClick(){this._canOpen()&&!this.panelOpen&&this._openPanelInternal()}_hasFocus(){return io()===this._element.nativeElement}_floatLabel(e=!1){this._formField&&this._formField.floatLabel==="auto"&&(e?this._formField._animateAndLockLabel():this._formField.floatLabel="always",this._manuallyFloatingLabel=!0)}_resetLabel(){this._manuallyFloatingLabel&&(this._formField&&(this._formField.floatLabel="auto"),this._manuallyFloatingLabel=!1)}_subscribeToClosingActions(){let e=new ri(t=>{Vi(()=>{t.next()},{injector:this._environmentInjector})}),i=this.autocomplete.options?.changes.pipe(Gi(()=>this._positionStrategy.reapplyLastPosition()),wi(0))??si();return ze(e,i).pipe(Ft(()=>this._zone.run(()=>{let t=this.panelOpen;return this._resetActiveItem(),this._updatePanelState(),this._changeDetectorRef.detectChanges(),this.panelOpen&&this._overlayRef.updatePosition(),t!==this.panelOpen&&(this.panelOpen?this._emitOpened():this.autocomplete.closed.emit()),this.panelClosingActions})),Xe(1)).subscribe(t=>this._setValueAndClose(t))}_emitOpened(){this.autocomplete.opened.emit()}_destroyPanel(){this._overlayRef&&(this.closePanel(),this._overlayRef.dispose(),this._overlayRef=null)}_getDisplayValue(e){let i=this.autocomplete;return i&&i.displayWith?i.displayWith(e):e}_assignOptionValue(e){let i=this._getDisplayValue(e);e==null&&this._clearPreviousSelectedOption(null,!1),this._updateNativeInputValue(i??"")}_updateNativeInputValue(e){this._formField?this._formField._control.value=e:this._element.nativeElement.value=e,this._previousValue=e}_setValueAndClose(e){let i=this.autocomplete,t=e?e.source:this._pendingAutoselectedOption;t?(this._clearPreviousSelectedOption(t),this._assignOptionValue(t.value),this._onChange(t.value),i._emitSelectEvent(t),this._element.nativeElement.focus()):i.requireSelection&&this._element.nativeElement.value!==this._valueOnAttach&&(this._clearPreviousSelectedOption(null),this._assignOptionValue(null),this._onChange(null)),this.closePanel()}_clearPreviousSelectedOption(e,i){this.autocomplete?.options?.forEach(t=>{t!==e&&t.selected&&t.deselect(i)})}_openPanelInternal(e=this._element.nativeElement.value){if(this._attachOverlay(e),this._floatLabel(),this._trackedModal){let i=this.autocomplete.id;mi(this._trackedModal,"aria-owns",i)}}_attachOverlay(e){this.autocomplete;let i=this._overlayRef;i?(this._positionStrategy.setOrigin(this._getConnectedElement()),i.updateSize({width:this._getPanelWidth()})):(this._portal=new go(this.autocomplete.template,this._viewContainerRef,{id:this._formField?.getLabelId()}),i=So(this._injector,this._getOverlayConfig()),this._overlayRef=i,this._viewportSubscription=this._viewportRuler.change().subscribe(()=>{this.panelOpen&&i&&i.updateSize({width:this._getPanelWidth()})}),this._handsetLandscapeSubscription=this._breakpointObserver.observe(Te.HandsetLandscape).subscribe(r=>{r.matches?this._positionStrategy.withFlexibleDimensions(!0).withGrowAfterOpen(!0).withViewportMargin(8):this._positionStrategy.withFlexibleDimensions(!1).withGrowAfterOpen(!1).withViewportMargin(0)})),i&&!i.hasAttached()&&(i.attach(this._portal),this._valueOnAttach=e,this._valueOnLastKeydown=null,this._closingActionsSubscription=this._subscribeToClosingActions());let t=this.panelOpen;this.autocomplete._isOpen=this._overlayAttached=!0,this.autocomplete._latestOpeningTrigger=this,this.autocomplete._setColor(this._formField?.color),this._updatePanelState(),this._applyModalPanelOwnership(),this.panelOpen&&t!==this.panelOpen&&this._emitOpened()}_handlePanelKeydown=e=>{(e.keyCode===27&&!st(e)||e.keyCode===38&&st(e,"altKey"))&&(this._pendingAutoselectedOption&&(this._updateNativeInputValue(this._valueBeforeAutoSelection??""),this._pendingAutoselectedOption=null),this._closeKeyEventStream.next(),this._resetActiveItem(),e.stopPropagation(),e.preventDefault())};_updatePanelState(){if(this.autocomplete._setVisibility(),this.panelOpen){let e=this._overlayRef;this._keydownSubscription||(this._keydownSubscription=e.keydownEvents().subscribe(this._handlePanelKeydown)),this._outsideClickSubscription||(this._outsideClickSubscription=e.outsidePointerEvents().subscribe())}else this._keydownSubscription?.unsubscribe(),this._outsideClickSubscription?.unsubscribe(),this._keydownSubscription=this._outsideClickSubscription=null}_getOverlayConfig(){return new vo({positionStrategy:this._getOverlayPosition(),scrollStrategy:this._scrollStrategy(),width:this._getPanelWidth(),direction:this._dir??void 0,hasBackdrop:this._defaults?.hasBackdrop,backdropClass:this._defaults?.backdropClass||"cdk-overlay-transparent-backdrop",panelClass:this._overlayPanelClass,disableAnimations:this._animationsDisabled})}_getOverlayPosition(){let e=Mo(this._injector,this._getConnectedElement()).withFlexibleDimensions(!1).withPush(!1);return this._setStrategyPositions(e),this._positionStrategy=e,e}_setStrategyPositions(e){let i=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],t=this._aboveClass,r=[{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:t},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",panelClass:t}],c;this.position==="above"?c=r:this.position==="below"?c=i:c=[...i,...r],e.withPositions(c)}_getConnectedElement(){return this.connectedTo?this.connectedTo.elementRef:this._formField?this._formField.getConnectedOverlayOrigin():this._element}_getPanelWidth(){return this.autocomplete.panelWidth||this._getHostWidth()}_getHostWidth(){return this._getConnectedElement().nativeElement.getBoundingClientRect().width}_resetActiveItem(){let e=this.autocomplete;if(e.autoActiveFirstOption){let i=-1;for(let t=0;t<e.options.length;t++)if(!e.options.get(t).disabled){i=t;break}e._keyManager.setActiveItem(i)}else e._keyManager.setActiveItem(-1)}_canOpen(){let e=this._element.nativeElement;return!e.readOnly&&!e.disabled&&!this.autocompleteDisabled}_scrollToOption(e){let i=this.autocomplete,t=qo(e,i.options,i.optionGroups);if(e===0&&t===1)i._setScrollTop(0);else if(i.panel){let r=i.options.toArray()[e];if(r){let c=r._getHostElement(),p=Qo(c.offsetTop,c.offsetHeight,i._getScrollTop(),i.panel.nativeElement.offsetHeight);i._setScrollTop(p)}}}_trackedModal=null;_applyModalPanelOwnership(){let e=this._element.nativeElement.closest('body > .cdk-overlay-container [aria-modal="true"]');if(!e)return;let i=this.autocomplete.id;this._trackedModal&&Yt(this._trackedModal,"aria-owns",i),mi(e,"aria-owns",i),this._trackedModal=e}_clearFromModal(){if(this._trackedModal){let e=this.autocomplete.id;Yt(this._trackedModal,"aria-owns",e),this._trackedModal=null}}static \u0275fac=function(i){return new(i||o)};static \u0275dir=it({type:o,selectors:[["input","matAutocomplete",""],["textarea","matAutocomplete",""]],hostAttrs:[1,"mat-mdc-autocomplete-trigger"],hostVars:7,hostBindings:function(i,t){i&1&&_("focusin",function(){return t._handleFocus()})("blur",function(){return t._onTouched()})("input",function(c){return t._handleInput(c)})("keydown",function(c){return t._handleKeydown(c)})("click",function(){return t._handleClick()}),i&2&&K("autocomplete",t.autocompleteAttribute)("role",t.autocompleteDisabled?null:"combobox")("aria-autocomplete",t.autocompleteDisabled?null:"list")("aria-activedescendant",t.panelOpen&&t.activeOption?t.activeOption.id:null)("aria-expanded",t.autocompleteDisabled?null:t.panelOpen.toString())("aria-controls",t.autocompleteDisabled||!t.panelOpen||t.autocomplete==null?null:t.autocomplete.id)("aria-haspopup",t.autocompleteDisabled?null:"listbox")},inputs:{autocomplete:[0,"matAutocomplete","autocomplete"],position:[0,"matAutocompletePosition","position"],connectedTo:[0,"matAutocompleteConnectedTo","connectedTo"],autocompleteAttribute:[0,"autocomplete","autocompleteAttribute"],autocompleteDisabled:[2,"matAutocompleteDisabled","autocompleteDisabled",N]},exportAs:["matAutocompleteTrigger"],features:[Tt([$n]),et]})}return o})(),pn=(()=>{class o{static \u0275fac=function(i){return new(i||o)};static \u0275mod=tt({type:o});static \u0275inj=Je({providers:[ta],imports:[To,Et,Se,Co,Et,Se]})}return o})();var oa=(o,d)=>d.path;function na(o,d){o&1&&b(0,"i",22)}function aa(o,d){o&1&&b(0,"i",23)}function la(o,d){if(o&1&&(a(0,"mat-option",16),l(1),n()),o&2){let e=d.$implicit;m("value",e),s(),lt("",e.properties.quantity,": ",e.properties.display)}}function ra(o,d){if(o&1){let e=D();a(0,"div",5)(1,"mat-form-field",21)(2,"mat-label"),u(3,na,1,0,"i",22)(4,aa,1,0,"i",23),l(5," Filter"),n(),a(6,"mat-select",24,2),_("selectionChange",function(){M(e),f();let t=oe(11),r=f();return y(r.pathFormGroup().controls.path.setValue(t.value))}),a(8,"mat-option"),l(9,"All"),n(),S(10,la,2,3,"mat-option",16,k),n()()()}if(o&2){let e=oe(7),i=f(2);s(3),g(e.value?4:3),s(3),m("formControl",i.pathSkUnitsFilterControl),s(4),T(i.pathSkUnitsFiltersList)}}function sa(o,d){o&1&&(a(0,"span",8),l(1,"(optional)"),n())}function da(o,d){o&1&&(a(0,"mat-hint"),l(1,"Leave blank to disable this path."),n())}function ca(o,d){if(o&1){let e=D();a(0,"button",25),_("click",function(){M(e);let t=f(2);return y(t.pathFormGroup().controls.path.setValue(""))}),a(1,"mat-icon"),l(2,"close"),n()()}}function ma(o,d){o&1&&(a(0,"mat-error"),l(1," Path is required. Please enter a valid Signal K path. "),n())}function Aa(o,d){o&1&&(a(0,"mat-error"),l(1," Path not recognized. Please enter a path from the server's published list. "),n())}function pa(o,d){if(o&1&&(a(0,"span"),l(1),n(),b(2,"br"),a(3,"small",26),l(4),n()),o&2){let e=f().$implicit;s(),E(e.path),s(3),E(e.meta.description)}}function ua(o,d){if(o&1&&l(0),o&2){let e=f().$implicit;U(" ",e.path," ")}}function ga(o,d){if(o&1&&(a(0,"mat-option",11),u(1,pa,5,2)(2,ua,1,1),n()),o&2){let e=d.$implicit;m("value",e.path),s(),g(e.meta!==void 0?1:2)}}function fa(o,d){if(o&1&&(a(0,"mat-option",16),l(1),n()),o&2){let e=d.$implicit;m("value",e),s(),U(" ",e," ")}}function ha(o,d){if(o&1&&(a(0,"mat-option",16),l(1),n()),o&2){let e=d.$implicit;m("value",e.measure),s(),U(" ",e.description," ")}}function ba(o,d){if(o&1&&(a(0,"mat-optgroup",28),S(1,ha,2,2,"mat-option",16,k),n()),o&2){let e=d.$implicit;m("label",e.group),s(),T(e.units)}}function Ca(o,d){if(o&1&&(a(0,"mat-form-field",20)(1,"mat-label"),l(2,"Display Format"),n(),a(3,"mat-select",27),S(4,ba,3,1,"mat-optgroup",28,k),n()()),o&2){let e=f(2);s(4),T(e.unitList.conversions)}}function _a(o,d){if(o&1&&(a(0,"div",3)(1,"div",4)(2,"span"),l(3),n()(),u(4,ra,12,2,"div",5),a(5,"div",6)(6,"mat-form-field",7)(7,"mat-label"),l(8," Signal K Path "),u(9,sa,2,0,"span",8),n(),b(10,"input",9,0),u(12,da,2,0,"mat-hint"),u(13,ca,3,0,"button",10),u(14,ma,2,0,"mat-error")(15,Aa,2,0,"mat-error"),a(16,"mat-autocomplete",null,1),S(18,ga,3,2,"mat-option",11,oa),Fe(20,"async"),n()()(),a(21,"div",12)(22,"div",13)(23,"mat-form-field",14)(24,"mat-label"),l(25,"Data Source"),n(),a(26,"mat-select",15),S(27,fa,2,2,"mat-option",16,k),n()()(),a(29,"div",17)(30,"mat-form-field",14)(31,"mat-label"),l(32,"Sample Time"),n(),b(33,"input",18),n()(),a(34,"div",19),u(35,Ca,6,0,"mat-form-field",20),n()()()),o&2){let e,i=oe(17),t=f();m("formGroup",t.pathFormGroup()),s(2),ot("color",t.pathFormGroup().enabled?"":"rgba(255,255,255,0.5)"),s(),E(t.pathFormGroup().value.description),s(),g(t.pathFormGroup().value.pathType==="number"&&t.showPathSkUnitsFilter?4:-1),s(5),g(t.pathFormGroup().value.pathRequired===!1?9:-1),s(),m("matAutocomplete",i),s(2),g(t.pathFormGroup().value.pathRequired===!1?12:-1),s(),g(t.pathFormGroup().value.path?13:-1),s(),g((e=t.pathFormGroup().controls.path.errors)!=null&&e.required?14:(e=t.pathFormGroup().controls.path.errors)!=null&&e.requireMatch?15:-1),s(4),T(Oe(20,11,t.filteredPaths)),s(9),T(t.availableSources),s(8),g(t.pathFormGroup().value.pathType==="number"&&t.pathFormGroup().value.showConvertUnitTo===void 0||t.pathFormGroup().value.pathType==="number"&&t.pathFormGroup().value.showConvertUnitTo===!0?35:-1)}}function va(o){return d=>{let e=d.parent?.value?.pathRequired!==!1,i=d.value;return e?i===null||i===""?{requireMatch:!0}:o().some(c=>c.path===i)?null:{requireMatch:!0}:i===null||i===""||o().some(c=>c.path===i)?null:{requireMatch:!0}}}var un=(()=>{class o{_data=A(co);_units=A(ft);_connection=A(Ji);_destroyRef=A(ke);pathFormGroup=h.required();multiCTRLArray=h.required();filterSelfPaths=h.required();availablePaths;filteredPaths=new Si(null);availableSources;unitList={base:"",conversions:[]};showPathSkUnitsFilter=!1;pathSkUnitsFilterControl=new Do(null);pathSkUnitsFiltersList;unitlessUnit={unit:"unitless",properties:{display:"(null)",quantity:"Unitless",quantityDisplay:"(null)",description:""}};ngOnInit(){let e=this.pathFormGroup();e.controls.path.disabled||(this.pathSkUnitsFiltersList=this._units.skBaseUnits.sort((i,t)=>i.properties.quantity>t.properties.quantity?1:-1),this.pathSkUnitsFiltersList.unshift(this.unitlessUnit),e.value.pathSkUnitsFilter&&this.pathSkUnitsFilterControl.setValue(this.pathSkUnitsFiltersList.find(i=>i.unit===this.pathFormGroup().value.pathSkUnitsFilter),{onlySelf:!0}),e.value.showPathSkUnitsFilter&&(this.showPathSkUnitsFilter=e.value.showPathSkUnitsFilter),e.controls.path.setValidators([va(()=>this.getPaths())]),e.controls.path.updateValueAndValidity({onlySelf:!0,emitEvent:!1}),e.controls.pathRequired&&e.controls.pathRequired.valueChanges.pipe(Be(this._destroyRef)).subscribe(()=>{this.pathFormGroup().controls.path.updateValueAndValidity()}),e.controls.path.valid?this.enableFormFields(!1):this.disablePathFields(),e.controls.sampleTime||(e.addControl("sampleTime",new ae("500",Y.required)),e.controls.sampleTime.updateValueAndValidity({onlySelf:!0,emitEvent:!1})),e.controls.path.valueChanges.pipe(xi(i=>i===""?ci(0):ci(350)),Ke(""),je(i=>this.filterPaths(i||""))).pipe(Be(this._destroyRef)).subscribe(()=>{let i=this.pathFormGroup();i.controls.path.pristine||(i.controls.path.valid?(this.enableFormFields(!0),this.updatePathMetaBoundDisplayName(i.controls.path.value),this.updatePathMetaBoundDisplayScale(i.controls.path.value)):this.disablePathFields())}),e.controls.pathType.valueChanges.pipe(Be(this._destroyRef)).subscribe(()=>{let i=this.pathFormGroup();i.value.showPathSkUnitsFilter?this.pathSkUnitsFilterControl.setValue(this.unitlessUnit):this.pathSkUnitsFilterControl.setValue(null),i.controls.path.updateValueAndValidity()}))}ngOnChanges(e){e.filterSelfPaths&&!e.filterSelfPaths.firstChange&&this.pathFormGroup().controls.path.updateValueAndValidity()}getPaths(){let e=this.pathFormGroup().controls.pathType.value,i=this.filterSelfPaths(),t=!1,r=this.pathFormGroup();if(r.value.supportsPut){let c=!1;this.multiCTRLArray().length>0&&(c=this.multiCTRLArray().some(p=>p.pathID===this.pathFormGroup().value.pathID&&p.type==="3")),c?t=!1:t=$i(this._connection.skServerVersion,"2.12.0",">=")?r.value.supportsPut:!1}return this._data.getPathsAndMetaByType(e,t,i).sort()}filterPaths(e){let i=e.toLowerCase(),t=this.getPaths();if(this.pathSkUnitsFilterControl.value){let r=this.pathSkUnitsFilterControl.value.unit;t=t.filter(c=>{let p=!!c.meta&&!!c.meta.units,C=r==="unitless";return p&&c.meta.units===r||!p&&C})}t=t.filter(r=>r.path.toLowerCase().includes(i)),this.filteredPaths.next(t)}enableFormFields(e){let i=this._data.getPathObject(this.pathFormGroup().controls.path.value);if(i!=null){this.pathFormGroup().controls.sampleTime.enable({onlySelf:!1});let t=this.pathFormGroup();t.controls.pathType.value=="number"&&(this.unitList=this._units.getConversionsForPath(t.controls.path.value),e&&t.controls.convertUnitTo.setValue(this.unitList.base,{onlySelf:!0}),t.controls.convertUnitTo.enable({onlySelf:!1})),Object.keys(i.sources).length==1?(this.availableSources=["default"],e?t.controls.source.value!="default"&&t.controls.source.setValue("default",{onlySelf:!0}):t.controls.source.value!="default"&&t.controls.source.setValue("",{onlySelf:!0})):Object.keys(i.sources).length>1&&(this.availableSources=Object.keys(i.sources),t.controls.source.value=="default"&&t.controls.source.reset()),t.controls.source.enable({onlySelf:!1})}else this.disablePathFields()}disablePathFields(){this.pathFormGroup().controls.source.reset("",{onlySelf:!0}),this.pathFormGroup().controls.source.disable({onlySelf:!1}),this.pathFormGroup().controls.sampleTime.disable({onlySelf:!1});let e=this.pathFormGroup();e.controls.pathType.value=="number"&&(e.controls.convertUnitTo.reset("",{onlySelf:!0}),e.controls.convertUnitTo.disable({onlySelf:!1}))}updatePathMetaBoundDisplayName(e){let i=this.pathFormGroup();if(!Object.prototype.hasOwnProperty.call(i.parent.parent.value,"displayName"))return;let t=this._data.getPathMeta(e);t?.displayName&&i.parent.parent.controls.displayName.setValue(t.displayName)}updatePathMetaBoundDisplayScale(e){let i=this.pathFormGroup();if(!Object.prototype.hasOwnProperty.call(i.parent.parent.value,"displayScale"))return;let t=this._data.getPathMeta(e);if(t?.displayScale){let r=i.parent.parent.get("displayScale"),c=i.controls.convertUnitTo.value;t.displayScale.lower!==null&&t.displayScale.lower!==void 0&&r.controls.lower.setValue(this._units.convertToUnit(c,t.displayScale.lower)),t.displayScale.upper!==null&&t.displayScale.upper!==void 0&&r.controls.upper.setValue(this._units.convertToUnit(c,t.displayScale.upper)),t.displayScale.type!==null&&t.displayScale.type!==void 0&&r.controls.type.setValue(t.displayScale.type),t.displayScale.power!==null&&t.displayScale.power!==void 0&&r.controls.power.setValue(t.displayScale.power)}}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=v({type:o,selectors:[["path-control-config"]],inputs:{pathFormGroup:[1,"pathFormGroup"],multiCTRLArray:[1,"multiCTRLArray"],filterSelfPaths:[1,"filterSelfPaths"]},features:[et],decls:1,vars:1,consts:[["pathInput",""],["pathAutoComplete","matAutocomplete"],["pathUnitsFilter",""],[1,"flex-container","rounded-card","rounded-card-color",3,"formGroup"],[1,"flex-field-100"],[1,"flex-field-fixed"],[1,"flex-field-to-100"],["floatLabel","auto","appearance","fill",1,"pathField"],[1,"optional-label"],["type","text","matInput","","placeholder","Type to use autocomplete or select from list","formControlName","path",3,"matAutocomplete"],["mat-icon-button","","matIconSuffix","","aria-label","Clear"],[2,"min-height","48px","line-height","1.15","height","auto","padding","8px 16px","white-space","normal",3,"value"],[1,"pathProperties"],[1,"sourceField"],["appearance","outline","floatLabel","always",1,"fields"],["placeholder","Select source","formControlName","source","required",""],[3,"value"],[1,"sampleTimeField"],["matInput","","type","number","placeholder","Sample time in milliseconds","formControlName","sampleTime","required",""],[1,"unitField"],[1,"fields"],["floatLabel","auto","appearance","fill",1,"filter-path"],[1,"fa-solid","fa-filter"],[1,"fa-solid","fa-filter-circle-xmark"],["panelWidth","",3,"selectionChange","formControl"],["mat-icon-button","","matIconSuffix","","aria-label","Clear",3,"click"],[1,"pathMetaDescription"],["placeholder","Select unit","formControlName","convertUnitTo","required",""],[3,"label"]],template:function(i,t){i&1&&u(0,_a,36,13,"div",3),i&2&&g(t.pathFormGroup().value.isPathConfigurable?0:-1)},dependencies:[j,Q,Ne,F,H,O,W,he,Z,Re,V,B,z,pn,oi,X,gt,kt,$,ut,pt,re,J,R,Oo,Wt],styles:[".pathGroup[_ngcontent-%COMP%]{width:100%}.pathGroupFields[_ngcontent-%COMP%]{display:block;width:calc(100% - 5px)}.pathField[_ngcontent-%COMP%]{width:100%}.pathProperties[_ngcontent-%COMP%]{display:flex;flex-flow:row wrap;justify-content:space-between;align-items:center;align-content:flex-start;gap:10px}.fields[_ngcontent-%COMP%]{width:100%}.sourceField[_ngcontent-%COMP%]{flex:3 1}.sampleTimeField[_ngcontent-%COMP%]{flex:1 3}.unitField[_ngcontent-%COMP%]{flex:3 1}"]})}return o})();function Ma(o,d){if(o&1&&b(0,"path-control-config",6),o&2){let e=d.$implicit,i=f(2);m("pathFormGroup",e)("filterSelfPaths",i.filterSelfPaths().value)("multiCTRLArray",i.multiCTRLArray)}}function ya(o,d){if(o&1&&S(0,Ma,1,3,"path-control-config",6,k),o&2){let e=f();T(e.pathsFormGroup.controls)}}function Sa(o,d){if(o&1&&b(0,"path-control-config",6),o&2){let e=d.$implicit,i=f(2);m("pathFormGroup",i.pathsFormGroup.get(e))("filterSelfPaths",i.filterSelfPaths().value)("multiCTRLArray",i.multiCTRLArray)}}function Ta(o,d){if(o&1&&(S(0,Sa,1,3,"path-control-config",6,k),Fe(2,"objectKeys")),o&2){let e=f();T(Oe(2,0,e.pathsFormGroup.controls))}}var gn=(()=>{class o{rootFormGroup=A(Z);fb=A(At);formGroupName=h.required();isArray=h.required();enableTimeout=h.required();dataTimeout=h.required();filterSelfPaths=h.required();addPathEvent=h(void 0);delPathEvent=h(void 0);updatePathEvent=h(void 0);pathsFormGroup;multiCTRLArray=[];ngOnInit(){this.isArray()?(this.pathsFormGroup=this.rootFormGroup.control.get(this.formGroupName()),this.multiCTRLArray=this.rootFormGroup.control.get("multiChildCtrls").value):this.pathsFormGroup=this.rootFormGroup.control.get(this.formGroupName())}addPath(e){this.pathsFormGroup.push(this.fb.group({description:[e.path.description],path:[e.path.path,Y.required],pathID:[e.path.pathID],source:[e.path.source,Y.required],pathType:[e.path.pathType],isPathConfigurable:[e.path.isPathConfigurable],showPathSkUnitsFilter:[e.path.showPathSkUnitsFilter],pathSkUnitsFilter:[e.path.pathSkUnitsFilter],convertUnitTo:[e.path.convertUnitTo],sampleTime:[e.path.sampleTime],supportsPut:[e.path.supportsPut]})),this.pathsFormGroup.updateValueAndValidity(),this.multiCTRLArray=this.rootFormGroup.control.get("multiChildCtrls").value}delPath(){this.multiCTRLArray=this.rootFormGroup.control.get("multiChildCtrls").value}updatePath(e){this.multiCTRLArray=e}ngOnChanges(e){e.addPathEvent&&!e.addPathEvent.firstChange&&this.addPath(e.addPathEvent.currentValue),e.delPathEvent&&!e.delPathEvent.firstChange&&this.delPath(),e.updatePathEvent&&!e.updatePathEvent.firstChange&&this.updatePath(e.updatePathEvent.currentValue)}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=v({type:o,selectors:[["paths-options"]],inputs:{formGroupName:[1,"formGroupName"],isArray:[1,"isArray"],enableTimeout:[1,"enableTimeout"],dataTimeout:[1,"dataTimeout"],filterSelfPaths:[1,"filterSelfPaths"],addPathEvent:[1,"addPathEvent"],delPathEvent:[1,"delPathEvent"],updatePathEvent:[1,"updatePathEvent"]},features:[et],decls:14,vars:5,consts:[[1,"widget-options-grid"],["name","enableTimeout",3,"formControl"],["type","number","matNativeControl","","placeholder","Time in seconds...","name","dataTimeout","min","2","required","",3,"formControl"],["matTextSuffix",""],[3,"formGroup"],["name","filterSelfPaths",3,"formControl"],[2,"display","block",3,"pathFormGroup","filterSelfPaths","multiCTRLArray"]],template:function(i,t){i&1&&(a(0,"div",0)(1,"mat-checkbox",1),l(2," Enable Widget Data TTL "),n(),a(3,"mat-form-field")(4,"mat-label"),l(5,"TTL Timeout For Paths"),n(),b(6,"input",2),a(7,"span",3),l(8,"Seconds"),n()()(),Ri(9,4),u(10,ya,2,0)(11,Ta,3,2),Wi(),a(12,"mat-checkbox",5),l(13,` Restrict to own vessel
4
+ `),n()),i&2&&(s(),m("formControl",t.enableTimeout()),s(5),m("formControl",t.dataTimeout()),s(3),m("formGroup",t.pathsFormGroup),s(),g(t.isArray()?10:11),s(2),m("formControl",t.filterSelfPaths()))},dependencies:[se,j,Q,Ne,F,H,O,mt,W,he,Z,V,B,z,ut,un,sn],styles:["[_nghost-%COMP%]{display:block;height:100%;width:100%;padding-top:15px;padding-bottom:5px}"]})}return o})();function xa(o,d){if(o&1){let e=D();a(0,"button",7),_("click",function(){M(e);let t=f();return y(t.dateTimezone().setValue(""))}),b(1,"span",8),n()}}function wa(o,d){if(o&1&&(a(0,"mat-option",6),l(1),n()),o&2){let e=d.$implicit;m("value",e.label),s(),lt(" ",e.offset," - ",e.label," ")}}function Ea(o){return d=>o.some(i=>i.label===d.value)?null:{requireMatch:!0}}var Ga=()=>{let o=Intl.supportedValuesOf("timeZone"),d=new Date;return o.map(e=>({offset:new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"shortOffset"}).formatToParts(d).find(c=>c.type==="timeZoneName")?.value||"",label:e}))},fn=(()=>{class o{_destroyRef=A(ke);dateFormat=h(void 0);dateTimezone=h(void 0);tz=[];filteredTZ;filteredTZSubscription=null;constructor(){}ngOnInit(){typeof Intl.supportedValuesOf<"u"?this.tz=Ga().sort((e,i)=>this.compareOffsets(e.offset,i.offset)):(console.log("[Widget Options] Feature not supported. Using static Time Zone list"),this.tz=[{offset:"GMT",label:"Africa/Abidjan"},{offset:"GMT",label:"Africa/Accra"},{offset:"GMT+3",label:"Africa/Addis_Ababa"},{offset:"GMT+1",label:"Africa/Algiers"},{offset:"GMT+3",label:"Africa/Asmera"},{offset:"GMT",label:"Africa/Bamako"},{offset:"GMT+1",label:"Africa/Bangui"},{offset:"GMT",label:"Africa/Banjul"},{offset:"GMT",label:"Africa/Bissau"},{offset:"GMT+2",label:"Africa/Blantyre"},{offset:"GMT+1",label:"Africa/Brazzaville"},{offset:"GMT+2",label:"Africa/Bujumbura"},{offset:"GMT+2",label:"Africa/Cairo"},{offset:"GMT",label:"Africa/Casablanca"},{offset:"GMT+2",label:"Africa/Ceuta"},{offset:"GMT",label:"Africa/Conakry"},{offset:"GMT",label:"Africa/Dakar"},{offset:"GMT+3",label:"Africa/Dar_es_Salaam"},{offset:"GMT+3",label:"Africa/Djibouti"},{offset:"GMT+1",label:"Africa/Douala"},{offset:"GMT",label:"Africa/El_Aaiun"},{offset:"GMT",label:"Africa/Freetown"},{offset:"GMT+2",label:"Africa/Gaborone"},{offset:"GMT+2",label:"Africa/Harare"},{offset:"GMT+2",label:"Africa/Johannesburg"},{offset:"GMT+2",label:"Africa/Juba"},{offset:"GMT+3",label:"Africa/Kampala"},{offset:"GMT+2",label:"Africa/Khartoum"},{offset:"GMT+2",label:"Africa/Kigali"},{offset:"GMT+1",label:"Africa/Kinshasa"},{offset:"GMT+1",label:"Africa/Lagos"},{offset:"GMT+1",label:"Africa/Libreville"},{offset:"GMT",label:"Africa/Lome"},{offset:"GMT+1",label:"Africa/Luanda"},{offset:"GMT+2",label:"Africa/Lubumbashi"},{offset:"GMT+2",label:"Africa/Lusaka"},{offset:"GMT+1",label:"Africa/Malabo"},{offset:"GMT+2",label:"Africa/Maputo"},{offset:"GMT+2",label:"Africa/Maseru"},{offset:"GMT+2",label:"Africa/Mbabane"},{offset:"GMT+3",label:"Africa/Mogadishu"},{offset:"GMT",label:"Africa/Monrovia"},{offset:"GMT+3",label:"Africa/Nairobi"},{offset:"GMT+1",label:"Africa/Ndjamena"},{offset:"GMT+1",label:"Africa/Niamey"},{offset:"GMT",label:"Africa/Nouakchott"},{offset:"GMT",label:"Africa/Ouagadougou"},{offset:"GMT+1",label:"Africa/Porto-Novo"},{offset:"GMT",label:"Africa/Sao_Tome"},{offset:"GMT+2",label:"Africa/Tripoli"},{offset:"GMT+1",label:"Africa/Tunis"},{offset:"GMT+2",label:"Africa/Windhoek"},{offset:"GMT-9",label:"America/Adak"},{offset:"GMT-8",label:"America/Anchorage"},{offset:"GMT-4",label:"America/Anguilla"},{offset:"GMT-4",label:"America/Antigua"},{offset:"GMT-3",label:"America/Araguaina"},{offset:"GMT-3",label:"America/Argentina/La_Rioja"},{offset:"GMT-3",label:"America/Argentina/Rio_Gallegos"},{offset:"GMT-3",label:"America/Argentina/Salta"},{offset:"GMT-3",label:"America/Argentina/San_Juan"},{offset:"GMT-3",label:"America/Argentina/San_Luis"},{offset:"GMT-3",label:"America/Argentina/Tucuman"},{offset:"GMT-3",label:"America/Argentina/Ushuaia"},{offset:"GMT-4",label:"America/Aruba"},{offset:"GMT-3",label:"America/Asuncion"},{offset:"GMT-3",label:"America/Bahia"},{offset:"GMT-6",label:"America/Bahia_Banderas"},{offset:"GMT-4",label:"America/Barbados"},{offset:"GMT-3",label:"America/Belem"},{offset:"GMT-6",label:"America/Belize"},{offset:"GMT-4",label:"America/Blanc-Sablon"},{offset:"GMT-4",label:"America/Boa_Vista"},{offset:"GMT-5",label:"America/Bogota"},{offset:"GMT-6",label:"America/Boise"},{offset:"GMT-3",label:"America/Buenos_Aires"},{offset:"GMT-6",label:"America/Cambridge_Bay"},{offset:"GMT-4",label:"America/Campo_Grande"},{offset:"GMT-5",label:"America/Cancun"},{offset:"GMT-4",label:"America/Caracas"},{offset:"GMT-3",label:"America/Catamarca"},{offset:"GMT-3",label:"America/Cayenne"},{offset:"GMT-5",label:"America/Cayman"},{offset:"GMT-5",label:"America/Chicago"},{offset:"GMT-6",label:"America/Chihuahua"},{offset:"GMT-6",label:"America/Ciudad_Juarez"},{offset:"GMT-5",label:"America/Coral_Harbour"},{offset:"GMT-3",label:"America/Cordoba"},{offset:"GMT-6",label:"America/Costa_Rica"},{offset:"GMT-7",label:"America/Creston"},{offset:"GMT-4",label:"America/Cuiaba"},{offset:"GMT-4",label:"America/Curacao"},{offset:"GMT",label:"America/Danmarkshavn"},{offset:"GMT-7",label:"America/Dawson"},{offset:"GMT-7",label:"America/Dawson_Creek"},{offset:"GMT-6",label:"America/Denver"},{offset:"GMT-4",label:"America/Detroit"},{offset:"GMT-4",label:"America/Dominica"},{offset:"GMT-6",label:"America/Edmonton"},{offset:"GMT-5",label:"America/Eirunepe"},{offset:"GMT-6",label:"America/El_Salvador"},{offset:"GMT-7",label:"America/Fort_Nelson"},{offset:"GMT-3",label:"America/Fortaleza"},{offset:"GMT-3",label:"America/Glace_Bay"},{offset:"GMT-1",label:"America/Godthab"},{offset:"GMT-3",label:"America/Goose_Bay"},{offset:"GMT-4",label:"America/Grand_Turk"},{offset:"GMT-4",label:"America/Grenada"},{offset:"GMT-4",label:"America/Guadeloupe"},{offset:"GMT-6",label:"America/Guatemala"},{offset:"GMT-5",label:"America/Guayaquil"},{offset:"GMT-4",label:"America/Guyana"},{offset:"GMT-3",label:"America/Halifax"},{offset:"GMT-4",label:"America/Havana"},{offset:"GMT-7",label:"America/Hermosillo"},{offset:"GMT-5",label:"America/Indiana/Knox"},{offset:"GMT-4",label:"America/Indiana/Marengo"},{offset:"GMT-4",label:"America/Indiana/Petersburg"},{offset:"GMT-5",label:"America/Indiana/Tell_City"},{offset:"GMT-4",label:"America/Indiana/Vevay"},{offset:"GMT-4",label:"America/Indiana/Vincennes"},{offset:"GMT-4",label:"America/Indiana/Winamac"},{offset:"GMT-4",label:"America/Indianapolis"},{offset:"GMT-6",label:"America/Inuvik"},{offset:"GMT-4",label:"America/Iqaluit"},{offset:"GMT-5",label:"America/Jamaica"},{offset:"GMT-3",label:"America/Jujuy"},{offset:"GMT-8",label:"America/Juneau"},{offset:"GMT-4",label:"America/Kentucky/Monticello"},{offset:"GMT-4",label:"America/Kralendijk"},{offset:"GMT-4",label:"America/La_Paz"},{offset:"GMT-5",label:"America/Lima"},{offset:"GMT-7",label:"America/Los_Angeles"},{offset:"GMT-4",label:"America/Louisville"},{offset:"GMT-4",label:"America/Lower_Princes"},{offset:"GMT-3",label:"America/Maceio"},{offset:"GMT-6",label:"America/Managua"},{offset:"GMT-4",label:"America/Manaus"},{offset:"GMT-4",label:"America/Marigot"},{offset:"GMT-4",label:"America/Martinique"},{offset:"GMT-5",label:"America/Matamoros"},{offset:"GMT-7",label:"America/Mazatlan"},{offset:"GMT-3",label:"America/Mendoza"},{offset:"GMT-5",label:"America/Menominee"},{offset:"GMT-6",label:"America/Merida"},{offset:"GMT-8",label:"America/Metlakatla"},{offset:"GMT-6",label:"America/Mexico_City"},{offset:"GMT-2",label:"America/Miquelon"},{offset:"GMT-3",label:"America/Moncton"},{offset:"GMT-6",label:"America/Monterrey"},{offset:"GMT-3",label:"America/Montevideo"},{offset:"GMT-4",label:"America/Montserrat"},{offset:"GMT-4",label:"America/Nassau"},{offset:"GMT-4",label:"America/New_York"},{offset:"GMT-8",label:"America/Nome"},{offset:"GMT-2",label:"America/Noronha"},{offset:"GMT-5",label:"America/North_Dakota/Beulah"},{offset:"GMT-5",label:"America/North_Dakota/Center"},{offset:"GMT-5",label:"America/North_Dakota/New_Salem"},{offset:"GMT-5",label:"America/Ojinaga"},{offset:"GMT-5",label:"America/Panama"},{offset:"GMT-3",label:"America/Paramaribo"},{offset:"GMT-7",label:"America/Phoenix"},{offset:"GMT-4",label:"America/Port-au-Prince"},{offset:"GMT-4",label:"America/Port_of_Spain"},{offset:"GMT-4",label:"America/Porto_Velho"},{offset:"GMT-4",label:"America/Puerto_Rico"},{offset:"GMT-3",label:"America/Punta_Arenas"},{offset:"GMT-5",label:"America/Rankin_Inlet"},{offset:"GMT-3",label:"America/Recife"},{offset:"GMT-6",label:"America/Regina"},{offset:"GMT-5",label:"America/Resolute"},{offset:"GMT-5",label:"America/Rio_Branco"},{offset:"GMT-3",label:"America/Santarem"},{offset:"GMT-3",label:"America/Santiago"},{offset:"GMT-4",label:"America/Santo_Domingo"},{offset:"GMT-3",label:"America/Sao_Paulo"},{offset:"GMT-1",label:"America/Scoresbysund"},{offset:"GMT-8",label:"America/Sitka"},{offset:"GMT-4",label:"America/St_Barthelemy"},{offset:"GMT-2:30",label:"America/St_Johns"},{offset:"GMT-4",label:"America/St_Kitts"},{offset:"GMT-4",label:"America/St_Lucia"},{offset:"GMT-4",label:"America/St_Thomas"},{offset:"GMT-4",label:"America/St_Vincent"},{offset:"GMT-6",label:"America/Swift_Current"},{offset:"GMT-6",label:"America/Tegucigalpa"},{offset:"GMT-3",label:"America/Thule"},{offset:"GMT-7",label:"America/Tijuana"},{offset:"GMT-4",label:"America/Toronto"},{offset:"GMT-4",label:"America/Tortola"},{offset:"GMT-7",label:"America/Vancouver"},{offset:"GMT-7",label:"America/Whitehorse"},{offset:"GMT-5",label:"America/Winnipeg"},{offset:"GMT-8",label:"America/Yakutat"},{offset:"GMT+8",label:"Antarctica/Casey"},{offset:"GMT+7",label:"Antarctica/Davis"},{offset:"GMT+10",label:"Antarctica/DumontDUrville"},{offset:"GMT+11",label:"Antarctica/Macquarie"},{offset:"GMT+5",label:"Antarctica/Mawson"},{offset:"GMT+13",label:"Antarctica/McMurdo"},{offset:"GMT-3",label:"Antarctica/Palmer"},{offset:"GMT-3",label:"Antarctica/Rothera"},{offset:"GMT+3",label:"Antarctica/Syowa"},{offset:"GMT+2",label:"Antarctica/Troll"},{offset:"GMT+5",label:"Antarctica/Vostok"},{offset:"GMT+2",label:"Arctic/Longyearbyen"},{offset:"GMT+3",label:"Asia/Aden"},{offset:"GMT+5",label:"Asia/Almaty"},{offset:"GMT+3",label:"Asia/Amman"},{offset:"GMT+12",label:"Asia/Anadyr"},{offset:"GMT+5",label:"Asia/Aqtau"},{offset:"GMT+5",label:"Asia/Aqtobe"},{offset:"GMT+5",label:"Asia/Ashgabat"},{offset:"GMT+5",label:"Asia/Atyrau"},{offset:"GMT+3",label:"Asia/Baghdad"},{offset:"GMT+3",label:"Asia/Bahrain"},{offset:"GMT+4",label:"Asia/Baku"},{offset:"GMT+7",label:"Asia/Bangkok"},{offset:"GMT+7",label:"Asia/Barnaul"},{offset:"GMT+3",label:"Asia/Beirut"},{offset:"GMT+6",label:"Asia/Bishkek"},{offset:"GMT+8",label:"Asia/Brunei"},{offset:"GMT+5:30",label:"Asia/Calcutta"},{offset:"GMT+9",label:"Asia/Chita"},{offset:"GMT+5:30",label:"Asia/Colombo"},{offset:"GMT+3",label:"Asia/Damascus"},{offset:"GMT+6",label:"Asia/Dhaka"},{offset:"GMT+9",label:"Asia/Dili"},{offset:"GMT+4",label:"Asia/Dubai"},{offset:"GMT+5",label:"Asia/Dushanbe"},{offset:"GMT+3",label:"Asia/Famagusta"},{offset:"GMT+2",label:"Asia/Gaza"},{offset:"GMT+2",label:"Asia/Hebron"},{offset:"GMT+8",label:"Asia/Hong_Kong"},{offset:"GMT+7",label:"Asia/Hovd"},{offset:"GMT+8",label:"Asia/Irkutsk"},{offset:"GMT+7",label:"Asia/Jakarta"},{offset:"GMT+9",label:"Asia/Jayapura"},{offset:"GMT+3",label:"Asia/Jerusalem"},{offset:"GMT+4:30",label:"Asia/Kabul"},{offset:"GMT+12",label:"Asia/Kamchatka"},{offset:"GMT+5",label:"Asia/Karachi"},{offset:"GMT+5:45",label:"Asia/Katmandu"},{offset:"GMT+9",label:"Asia/Khandyga"},{offset:"GMT+7",label:"Asia/Krasnoyarsk"},{offset:"GMT+8",label:"Asia/Kuala_Lumpur"},{offset:"GMT+8",label:"Asia/Kuching"},{offset:"GMT+3",label:"Asia/Kuwait"},{offset:"GMT+8",label:"Asia/Macau"},{offset:"GMT+11",label:"Asia/Magadan"},{offset:"GMT+8",label:"Asia/Makassar"},{offset:"GMT+8",label:"Asia/Manila"},{offset:"GMT+4",label:"Asia/Muscat"},{offset:"GMT+3",label:"Asia/Nicosia"},{offset:"GMT+7",label:"Asia/Novokuznetsk"},{offset:"GMT+7",label:"Asia/Novosibirsk"},{offset:"GMT+6",label:"Asia/Omsk"},{offset:"GMT+5",label:"Asia/Oral"},{offset:"GMT+7",label:"Asia/Phnom_Penh"},{offset:"GMT+7",label:"Asia/Pontianak"},{offset:"GMT+9",label:"Asia/Pyongyang"},{offset:"GMT+3",label:"Asia/Qatar"},{offset:"GMT+5",label:"Asia/Qostanay"},{offset:"GMT+5",label:"Asia/Qyzylorda"},{offset:"GMT+6:30",label:"Asia/Rangoon"},{offset:"GMT+3",label:"Asia/Riyadh"},{offset:"GMT+7",label:"Asia/Saigon"},{offset:"GMT+11",label:"Asia/Sakhalin"},{offset:"GMT+5",label:"Asia/Samarkand"},{offset:"GMT+9",label:"Asia/Seoul"},{offset:"GMT+8",label:"Asia/Shanghai"},{offset:"GMT+8",label:"Asia/Singapore"},{offset:"GMT+11",label:"Asia/Srednekolymsk"},{offset:"GMT+8",label:"Asia/Taipei"},{offset:"GMT+5",label:"Asia/Tashkent"},{offset:"GMT+4",label:"Asia/Tbilisi"},{offset:"GMT+3:30",label:"Asia/Tehran"},{offset:"GMT+6",label:"Asia/Thimphu"},{offset:"GMT+9",label:"Asia/Tokyo"},{offset:"GMT+7",label:"Asia/Tomsk"},{offset:"GMT+8",label:"Asia/Ulaanbaatar"},{offset:"GMT+6",label:"Asia/Urumqi"},{offset:"GMT+10",label:"Asia/Ust-Nera"},{offset:"GMT+7",label:"Asia/Vientiane"},{offset:"GMT+10",label:"Asia/Vladivostok"},{offset:"GMT+9",label:"Asia/Yakutsk"},{offset:"GMT+5",label:"Asia/Yekaterinburg"},{offset:"GMT+4",label:"Asia/Yerevan"},{offset:"GMT",label:"Atlantic/Azores"},{offset:"GMT-3",label:"Atlantic/Bermuda"},{offset:"GMT+1",label:"Atlantic/Canary"},{offset:"GMT-1",label:"Atlantic/Cape_Verde"},{offset:"GMT+1",label:"Atlantic/Faeroe"},{offset:"GMT+1",label:"Atlantic/Madeira"},{offset:"GMT",label:"Atlantic/Reykjavik"},{offset:"GMT-2",label:"Atlantic/South_Georgia"},{offset:"GMT",label:"Atlantic/St_Helena"},{offset:"GMT-3",label:"Atlantic/Stanley"},{offset:"GMT+10:30",label:"Australia/Adelaide"},{offset:"GMT+10",label:"Australia/Brisbane"},{offset:"GMT+10:30",label:"Australia/Broken_Hill"},{offset:"GMT+9:30",label:"Australia/Darwin"},{offset:"GMT+8:45",label:"Australia/Eucla"},{offset:"GMT+11",label:"Australia/Hobart"},{offset:"GMT+10",label:"Australia/Lindeman"},{offset:"GMT+11",label:"Australia/Lord_Howe"},{offset:"GMT+11",label:"Australia/Melbourne"},{offset:"GMT+8",label:"Australia/Perth"},{offset:"GMT+11",label:"Australia/Sydney"},{offset:"GMT+2",label:"Europe/Amsterdam"},{offset:"GMT+2",label:"Europe/Andorra"},{offset:"GMT+4",label:"Europe/Astrakhan"},{offset:"GMT+3",label:"Europe/Athens"},{offset:"GMT+2",label:"Europe/Belgrade"},{offset:"GMT+2",label:"Europe/Berlin"},{offset:"GMT+2",label:"Europe/Bratislava"},{offset:"GMT+2",label:"Europe/Brussels"},{offset:"GMT+3",label:"Europe/Bucharest"},{offset:"GMT+2",label:"Europe/Budapest"},{offset:"GMT+2",label:"Europe/Busingen"},{offset:"GMT+3",label:"Europe/Chisinau"},{offset:"GMT+2",label:"Europe/Copenhagen"},{offset:"GMT+1",label:"Europe/Dublin"},{offset:"GMT+2",label:"Europe/Gibraltar"},{offset:"GMT+1",label:"Europe/Guernsey"},{offset:"GMT+3",label:"Europe/Helsinki"},{offset:"GMT+1",label:"Europe/Isle_of_Man"},{offset:"GMT+3",label:"Europe/Istanbul"},{offset:"GMT+1",label:"Europe/Jersey"},{offset:"GMT+2",label:"Europe/Kaliningrad"},{offset:"GMT+3",label:"Europe/Kiev"},{offset:"GMT+3",label:"Europe/Kirov"},{offset:"GMT+1",label:"Europe/Lisbon"},{offset:"GMT+2",label:"Europe/Ljubljana"},{offset:"GMT+1",label:"Europe/London"},{offset:"GMT+2",label:"Europe/Luxembourg"},{offset:"GMT+2",label:"Europe/Madrid"},{offset:"GMT+2",label:"Europe/Malta"},{offset:"GMT+3",label:"Europe/Mariehamn"},{offset:"GMT+3",label:"Europe/Minsk"},{offset:"GMT+2",label:"Europe/Monaco"},{offset:"GMT+3",label:"Europe/Moscow"},{offset:"GMT+2",label:"Europe/Oslo"},{offset:"GMT+2",label:"Europe/Paris"},{offset:"GMT+2",label:"Europe/Podgorica"},{offset:"GMT+2",label:"Europe/Prague"},{offset:"GMT+3",label:"Europe/Riga"},{offset:"GMT+2",label:"Europe/Rome"},{offset:"GMT+4",label:"Europe/Samara"},{offset:"GMT+2",label:"Europe/San_Marino"},{offset:"GMT+2",label:"Europe/Sarajevo"},{offset:"GMT+4",label:"Europe/Saratov"},{offset:"GMT+3",label:"Europe/Simferopol"},{offset:"GMT+2",label:"Europe/Skopje"},{offset:"GMT+3",label:"Europe/Sofia"},{offset:"GMT+2",label:"Europe/Stockholm"},{offset:"GMT+3",label:"Europe/Tallinn"},{offset:"GMT+2",label:"Europe/Tirane"},{offset:"GMT+4",label:"Europe/Ulyanovsk"},{offset:"GMT+2",label:"Europe/Vaduz"},{offset:"GMT+2",label:"Europe/Vatican"},{offset:"GMT+2",label:"Europe/Vienna"},{offset:"GMT+3",label:"Europe/Vilnius"},{offset:"GMT+3",label:"Europe/Volgograd"},{offset:"GMT+2",label:"Europe/Warsaw"},{offset:"GMT+2",label:"Europe/Zagreb"},{offset:"GMT+2",label:"Europe/Zurich"},{offset:"GMT+3",label:"Indian/Antananarivo"},{offset:"GMT+6",label:"Indian/Chagos"},{offset:"GMT+7",label:"Indian/Christmas"},{offset:"GMT+6:30",label:"Indian/Cocos"},{offset:"GMT+3",label:"Indian/Comoro"},{offset:"GMT+5",label:"Indian/Kerguelen"},{offset:"GMT+4",label:"Indian/Mahe"},{offset:"GMT+5",label:"Indian/Maldives"},{offset:"GMT+4",label:"Indian/Mauritius"},{offset:"GMT+3",label:"Indian/Mayotte"},{offset:"GMT+4",label:"Indian/Reunion"},{offset:"GMT+13",label:"Pacific/Apia"},{offset:"GMT+13",label:"Pacific/Auckland"},{offset:"GMT+11",label:"Pacific/Bougainville"},{offset:"GMT+13:45",label:"Pacific/Chatham"},{offset:"GMT-5",label:"Pacific/Easter"},{offset:"GMT+11",label:"Pacific/Efate"},{offset:"GMT+13",label:"Pacific/Enderbury"},{offset:"GMT+13",label:"Pacific/Fakaofo"},{offset:"GMT+12",label:"Pacific/Fiji"},{offset:"GMT+12",label:"Pacific/Funafuti"},{offset:"GMT-6",label:"Pacific/Galapagos"},{offset:"GMT-9",label:"Pacific/Gambier"},{offset:"GMT+11",label:"Pacific/Guadalcanal"},{offset:"GMT+10",label:"Pacific/Guam"},{offset:"GMT-10",label:"Pacific/Honolulu"},{offset:"GMT+14",label:"Pacific/Kiritimati"},{offset:"GMT+11",label:"Pacific/Kosrae"},{offset:"GMT+12",label:"Pacific/Kwajalein"},{offset:"GMT+12",label:"Pacific/Majuro"},{offset:"GMT-9:30",label:"Pacific/Marquesas"},{offset:"GMT-11",label:"Pacific/Midway"},{offset:"GMT+12",label:"Pacific/Nauru"},{offset:"GMT-11",label:"Pacific/Niue"},{offset:"GMT+12",label:"Pacific/Norfolk"},{offset:"GMT+11",label:"Pacific/Noumea"},{offset:"GMT-11",label:"Pacific/Pago_Pago"},{offset:"GMT+9",label:"Pacific/Palau"},{offset:"GMT-8",label:"Pacific/Pitcairn"},{offset:"GMT+11",label:"Pacific/Ponape"},{offset:"GMT+10",label:"Pacific/Port_Moresby"},{offset:"GMT-10",label:"Pacific/Rarotonga"},{offset:"GMT+10",label:"Pacific/Saipan"},{offset:"GMT-10",label:"Pacific/Tahiti"},{offset:"GMT+12",label:"Pacific/Tarawa"},{offset:"GMT+13",label:"Pacific/Tongatapu"},{offset:"GMT+10",label:"Pacific/Truk"},{offset:"GMT+12",label:"Pacific/Wake"},{offset:"GMT+12",label:"Pacific/Wallis"}].sort((e,i)=>this.compareOffsets(e.offset,i.offset))),this.tz.unshift({offset:"",label:"System Timezone -"}),this.dateTimezone().setValidators([Y.required,Ea(this.tz)]),this.filteredTZ=this.dateTimezone().valueChanges.pipe(Pt(500),Ke(""),je(e=>this.filterTZ(e||""))),this.filteredTZSubscription=this.filteredTZ.pipe(Be(this._destroyRef)).subscribe()}filterTZ(e){let i=e.toLowerCase();return this.tz.filter(t=>t.label.toLowerCase().includes(i))}compareOffsets(e,i){let t=r=>{let c=r.match(/([+-]?)(\d+)(?::(\d+))?/);if(!c)return 0;let p=c[1]==="-"?-1:1,C=parseInt(c[2],10),w=c[3]?parseInt(c[3],10):0;return p*(C*60+w)};return t(e)-t(i)}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=v({type:o,selectors:[["display-datetime-options"]],inputs:{dateFormat:[1,"dateFormat"],dateTimezone:[1,"dateTimezone"]},decls:15,vars:6,consts:[["timeZoneAutoComplete","matAutocomplete"],[1,"widget-options-grid"],[1,"options-grid-span2"],["matInput","","placeholder","dd/MM/yyyy HH:mm:ss","name","dateFormat","required","",3,"formControl"],["type","text","matInput","","placeholder","Type to use autocomplete","name","dateTimezone","required","",3,"formControl","matAutocomplete"],["mat-icon-button","","matSuffix","","aria-label","Clear"],[3,"value"],["mat-icon-button","","matSuffix","","aria-label","Clear",3,"click"],[1,"fa-solid","fa-close"]],template:function(i,t){if(i&1&&(a(0,"div",1)(1,"mat-form-field",2)(2,"mat-label"),l(3,"Date & Time Format"),n(),b(4,"input",3),n(),a(5,"mat-form-field",2)(6,"mat-label"),l(7,"Adjust Value to Time Zone"),n(),b(8,"input",4),u(9,xa,2,0,"button",5),a(10,"mat-autocomplete",null,0),S(12,wa,2,3,"mat-option",6,Vt),Fe(14,"async"),n()()()),i&2){let r=oe(11);s(4),m("formControl",t.dateFormat()),s(4),m("formControl",t.dateTimezone())("matAutocomplete",r),s(),g(t.dateTimezone().value?9:-1),s(3),T(Oe(14,4,t.filteredTZ))}},dependencies:[V,B,z,j,Q,F,O,W,he,kt,$,ut,oi,X,Wt],encapsulation:2})}return o})();function ka(o,d){if(o&1&&(a(0,"mat-option",6),l(1),Fe(2,"titlecase"),n()),o&2){let e=d.$implicit;m("value",ye(e)),s(),E(Oe(2,3,e))}}var fi={V1_PLUGIN:"autopilot",V2_BASE:"/signalk/v2/api",V2_AUTOPILOTS:"/signalk/v2/api/vessels/self/autopilots",V2_DEFAULT_AUTOPILOT_ID:"/signalk/v2/api/vessels/self/autopilots/_providers/_default"},hn={options:{modes:[],states:[]},state:null,mode:"off-line",target:null,engaged:!1},bn=(()=>{class o{formGroupName=h.required();_plugins=A(Jt);_destroyRef=A(ke);http=A(Ki);rootFormGroup=A(Z);autopilotFormGroup;apiVersion=I(null);availableAutopilots=I({});autopilotPlugin=I(null);discoveryInProgress=I(!1);apiDetectionError=I(null);apInstances=Yi(()=>{let e=this.availableAutopilots();return e?Object.keys(e):[]});modes=I(null);pluginId=I(null);currentRequests=new Set;constructor(){Rt(()=>{this.autopilotFormGroup.get("apiVersion")?.setValue(this.apiVersion(),{emitEvent:!1})})}ngOnInit(){this.autopilotFormGroup=this.rootFormGroup.control.get(this.formGroupName()),this.modes.set(this.autopilotFormGroup.value.modes||null),this.detectAutopilotApi()}detectAutopilotApi(){return L(this,null,function*(){this.discoveryInProgress.set(!0),console.log("[Autopilot Options] Starting API detection...");try{if(yield this.checkV2Api())if(this.apiVersion.set("v2"),this.autopilotFormGroup.get("apiVersion")?.setValue("v2",{emitEvent:!1}),this.availableAutopilots()&&Object.keys(this.availableAutopilots()).length>0){this.pluginId.set(Object.values(this.availableAutopilots())[0]?.provider??null),this.autopilotFormGroup.get("pluginId")?.setValue(this.pluginId(),{emitEvent:!1}),this.discoveryInProgress.set(!1);return}else console.warn("[Autopilot Options] No V2 autopilot provider found")}catch(e){console.error("[Autopilot Options] Error checking V2 API, checking V1...",e)}try{if(yield this._plugins.isEnabled(fi.V1_PLUGIN)){this.apiVersion.set("v1"),this.autopilotFormGroup.get("apiVersion")?.setValue("v1",{emitEvent:!1}),this.availableAutopilots.set({"Default Autopilot":{provider:"Signal K Autopilot",isDefault:!0}}),this.pluginId.set("Signal K Autopilot"),this.autopilotFormGroup.get("pluginId")?.setValue("Signal K Autopilot",{emitEvent:!1}),console.log("[Autopilot Options] V1 API Signal K Autopilot plugin detected"),this.discoveryInProgress.set(!1);return}console.log("[Autopilot Options] V1 API plugin (signalk-autopilot) not found")}catch(e){console.error("[Autopilot Options] V1 plugin detection failed:",e)}console.warn("[Autopilot Options] No Autopilot detected"),this.discoveryInProgress.set(!1)})}checkV2Api(){return L(this,null,function*(){try{let e=yield di(this.makeHttpRequest(this.http.get(fi.V2_AUTOPILOTS,{observe:"response",responseType:"json"})));return e&&e.body&&Object.keys(e.body).length>0?(this.availableAutopilots.set(e.body),console.log("[Autopilot Options] Discovered V2 API autopilot providers:",JSON.stringify(e.body))):(this.availableAutopilots.set({}),console.warn("[Autopilot Options] No V2 autopilot provider plugin found.")),e?.status===200}catch(e){if(e&&typeof e=="object"&&"status"in e){let i=e;i.status===404?console.log("[Autopilot Options] V2 API endpoint not found (404)"):i.status>=500?console.warn("[Autopilot Options] V2 API server error:",i.status,i.statusText):console.log("[Autopilot Options] V2 API call to discover Autopilot Providers failed:",i.status,i.statusText)}else console.log("[Autopilot Options] V2 API network error:",e);return!1}})}discoverV2AutopilotOptions(e){return L(this,null,function*(){let i;try{try{this.discoveryInProgress.set(!0),i=yield di(this.makeHttpRequest(this.http.get(`${fi.V2_AUTOPILOTS}/${e}`))),console.log("[Autopilot Options] V2 Autopilot Options response:",JSON.stringify(i))}catch{i=hn,console.log(`[Autopilot Options] Default AP discovery endpoint error for instance '${e}'`)}return this.discoveryInProgress.set(!1),i}catch(t){return console.error("[Autopilot Options] Failed to discover V2 endpoints:",t),console.log(`[Autopilot Options] Using fallback V2 endpoints for instance '${e}'`),hn}})}onAutopilotInstanceIdChange(e){let i=e.value;if(e.value===""){this.modes.set(""),this.autopilotFormGroup.get("modes")?.setValue("",{emitEvent:!1});return}console.log("[Autopilot Options] Selected Autopilot Instance ID:",i),this.apiVersion()==="v2"?this.discoverV2AutopilotOptions(i).then(t=>{let r=t.options.modes||[];this.modes.set(r.join(", ")),this.autopilotFormGroup.get("modes")?.setValue(r,{emitEvent:!1}),console.log("[Autopilot Options] Autopilot plugin supported modes :",r.join(", "))}).catch(t=>{console.error("[Autopilot Options] Error requesting autopilot modes:",t),this.autopilotFormGroup.get("modes")?.setValue([],{emitEvent:!1})}):this.apiVersion()==="v1"&&(this.modes.set("standby, auto, wind, route"),this.autopilotFormGroup.get("modes")?.setValue("standby, auto, wind, route",{emitEvent:!1}),console.log("[Autopilot Options] Autopilot mode set to Raymarine v1 API modes: standby, auto, wind, route"))}makeHttpRequest(e){let i=e.pipe(Be(this._destroyRef));return this.currentRequests.add(i),i.pipe(Ei(()=>this.currentRequests.delete(i)))}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=v({type:o,selectors:[["select-autopilot"]],inputs:{formGroupName:[1,"formGroupName"]},decls:30,vars:4,consts:[[1,"display-content","tab-content"],[1,"autopilot-options",3,"formGroup"],[1,"flex-item-rounded-card","rounded-card-color",2,"margin-block","10px"],[2,"margin-block-start","0px"],["placeholder","Select autopilot...","formControlName","instanceId","name","instanceId","required","",3,"selectionChange"],["value",""],[3,"value"],[1,"flex-item-rounded-card","rounded-card-color",2,"margin-block","10px","margin-left","10px","margin-right","10px"],["name","headingDirectionTrue","formControlName","headingDirectionTrue"],["name","invertRudder","formControlName","invertRudder"]],template:function(i,t){i&1&&(a(0,"div",0)(1,"div",1)(2,"div",2)(3,"h3",3),l(4,"Signal K Service Discovery"),n(),a(5,"ul")(6,"li")(7,"b"),l(8,"API Version:"),n(),l(9),n(),a(10,"li")(11,"b"),l(12,"Plugin:"),n(),l(13),n()()(),a(14,"mat-form-field")(15,"mat-label"),l(16,"Target Autopilot"),n(),a(17,"mat-select",4),_("selectionChange",function(c){return t.onAutopilotInstanceIdChange(c)}),a(18,"mat-option",5),l(19,"No autopilot"),n(),S(20,ka,3,5,"mat-option",6,k),n()(),a(22,"div",7)(23,"b"),l(24,"Supported modes:"),n(),l(25),n(),a(26,"mat-checkbox",8),l(27," Display True Heading "),n(),a(28,"mat-checkbox",9),l(29," Invert Rudder Angle Indicator "),n()()()),i&2&&(s(),m("formGroup",t.autopilotFormGroup),s(8),U(" ",t.apiVersion()),s(4),U(" ",t.pluginId()),s(7),T(t.apInstances()),s(5),U(" ",t.modes()," "))},dependencies:[W,F,H,O,Z,Re,le,V,B,Ce,se,We,re,X,be,zi],styles:[".autopilot-options[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:10px}"]})}return o})();var Cn=()=>["measuring","capacity"],Ia=()=>["marineCompass","baseplateCompass"],Da=()=>["measuring"];function Pa(o,d){if(o&1&&b(0,"config-display-chart-options",5),o&2){let e=f();m("displayName",e.displayNameToControl)("datasetUUID",e.datasetUUIDToControl)("convertUnitTo",e.convertUnitToControl)("showAverageData",e.showAverageDataToControl)("trackAgainstAverage",e.trackAgainstAverageToControl)("datasetAverageArray",e.datasetAverageArrayToControl)("showDatasetMinimumValueLine",e.showDatasetMinimumValueLineToControl)("showDatasetMaximumValueLine",e.showDatasetMaximumValueLineToControl)("showDatasetAverageValueLine",e.showDatasetAverageValueLineToControl)("showDatasetAngleAverageValueLine",e.showDatasetAngleAverageValueLineToControl)("startScaleAtZero",e.startScaleAtZeroToControl)("showLabel",e.showLabelToControl)("showTimeScale",e.showTimeScaleToControl)("showYScale",e.showYScaleToControl)("yScaleSuggestedMin",e.yScaleSuggestedMinToControl)("yScaleSuggestedMax",e.yScaleSuggestedMaxToControl)("enableMinMaxScaleLimit",e.enableMinMaxScaleLimitToControl)("yScaleMin",e.yScaleMinToControl)("yScaleMax",e.yScaleMaxToControl)("numDecimal",e.numDecimalToControl)("verticalChart",e.verticalChartToControl)("inverseYAxis",e.inverseYAxisToControl)("color",e.colorToControl)}}function Fa(o,d){o&1&&b(0,"select-autopilot",6)}function Oa(o,d){o&1&&(a(0,"mat-form-field",16)(1,"mat-label"),l(2,"URL"),n(),b(3,"input",40),n())}function Ba(o,d){o&1&&(a(0,"mat-checkbox",17),l(1," Allow pointer events on embedded content. WARNING: this may prevent swipe gestures over the Embed widget or keyboard events, while the focus is in the embed, from triggering normal KIP interactions. "),n())}function Va(o,d){o&1&&(a(0,"mat-form-field",16)(1,"mat-label"),l(2,"Widget Label"),n(),b(3,"input",41),n())}function La(o,d){o&1&&(a(0,"mat-form-field",42)(1,"mat-label"),l(2,"Scale Start"),n(),b(3,"input",43),n(),a(4,"mat-form-field",42)(5,"mat-label"),l(6,"Scale End"),n(),b(7,"input",44),n())}function Na(o,d){o&1&&(a(0,"mat-form-field")(1,"mat-label"),l(2,"Integer Places"),n(),b(3,"input",45),n())}function Ra(o,d){if(o&1&&(a(0,"mat-form-field")(1,"mat-label"),l(2,"Decimal Places"),n(),b(3,"input",46),n()),o&2){let e=f(2);at(e.widgetConfig.showMiniChart!==void 0?"options-grid-span2":"")}}function Wa(o,d){o&1&&(a(0,"mat-checkbox",19),l(1," Show Min recorded value "),n())}function Ua(o,d){o&1&&(a(0,"mat-checkbox",20),l(1," Show Max recorded value "),n())}function qa(o,d){if(o&1&&(a(0,"mat-form-field")(1,"mat-label"),l(2,"Next Dashboard after start"),n(),b(3,"input",47),n()),o&2){let e=f(2);te("options-grid-span2",!e.widgetConfig.numInt)}}function Qa(o,d){if(o&1&&(a(0,"mat-option",50),l(1),n()),o&2){let e=d.$implicit;m("value",e.measure),s(),U(" ",e.description," ")}}function Ya(o,d){if(o&1&&(a(0,"mat-optgroup",49),S(1,Qa,2,2,"mat-option",50,k),n()),o&2){let e=f().$implicit;m("label",e.group),s(),T(e.units)}}function Ha(o,d){if(o&1&&u(0,Ya,3,1,"mat-optgroup",49),o&2){let e=d.$implicit,i=f(3);g(!i.widgetConfig.convertUnitToGroup||i.widgetConfig.convertUnitToGroup===""||i.widgetConfig.convertUnitToGroup===e.group?0:-1)}}function Za(o,d){if(o&1&&(a(0,"mat-form-field",22)(1,"mat-label"),l(2,"Display Units"),n(),a(3,"mat-select",48),S(4,Ha,1,1,null,null,k),n()()),o&2){let e=f(2);s(4),T(e.unitList.conversions)}}function ja(o,d){o&1&&(a(0,"mat-checkbox",23),l(1," Enable beeps on count down "),n())}function za(o,d){if(o&1&&b(0,"display-datetime-options",24),o&2){let e=f(2);m("dateFormat",e.dateFormatToControl)("dateTimezone",e.dateTimezoneToControl)}}function Xa(o,d){o&1&&(a(0,"mat-checkbox",25),l(1," Close-hauled Lines "),n())}function Ka(o,d){o&1&&(a(0,"mat-form-field")(1,"mat-label"),l(2,"Vessel Close-hauled Angle"),n(),b(3,"input",51),n())}function Ja(o,d){o&1&&(a(0,"mat-checkbox",26),l(1," Wind Sectors "),n())}function $a(o,d){o&1&&(a(0,"mat-form-field")(1,"mat-label"),l(2,"Sector Duration"),n(),b(3,"input",52),n())}function el(o,d){o&1&&(a(0,"mat-checkbox",27),l(1," Apparent Wind Speed Value "),n())}function tl(o,d){o&1&&(a(0,"mat-checkbox",28),l(1," True Wind Speed Value "),n())}function il(o,d){o&1&&(a(0,"mat-checkbox",29),l(1," Course Over Ground "),n())}function ol(o,d){o&1&&(a(0,"mat-checkbox",30),l(1," True Wind Angle Indicator "),n())}function nl(o,d){o&1&&(a(0,"mat-checkbox",31),l(1," Next Waypoint "),n())}function al(o,d){o&1&&(a(0,"mat-checkbox",32),l(1," Drift "),n())}function ll(o,d){o&1&&(a(0,"mat-form-field")(1,"mat-label"),l(2,"Minimum Value"),n(),b(3,"input",53),n())}function rl(o,d){o&1&&(a(0,"mat-form-field")(1,"mat-label"),l(2,"Maximum Value"),n(),b(3,"input",54),n())}function sl(o,d){o&1&&(a(0,"mat-checkbox",33),l(1," Ignore Zones configuration "),n())}function dl(o,d){o&1&&(a(0,"div",34)(1,"mat-checkbox",55),l(2," Show Heeling Side Label "),n()())}function cl(o,d){o&1&&(a(0,"div",34)(1,"mat-checkbox",56),l(2," Reverse Angle "),n()())}function ml(o,d){o&1&&(a(0,"mat-form-field",34)(1,"mat-label"),l(2,"Highlights Width"),n(),b(3,"input",57),n())}function Al(o,d){o&1&&(a(0,"mat-form-field",35)(1,"mat-label"),l(2,"Rotation Element"),n(),a(3,"mat-select",58)(4,"mat-option",59),l(5,"Dial (Marine Compass)"),n(),a(6,"mat-option",60),l(7,"Needle (Base plate compass)"),n()()(),a(8,"div",34)(9,"mat-checkbox",61),l(10," Show value box "),n()(),a(11,"div",34)(12,"mat-checkbox",62),l(13," Show cardinal degrees "),n()())}function pl(o,d){o&1&&(a(0,"mat-form-field",34)(1,"mat-label"),l(2,"Progress Bar Start Position"),n(),a(3,"mat-select",65)(4,"mat-option",66),l(5,"Left"),n(),a(6,"mat-option",67),l(7,"Middle"),n(),a(8,"mat-option",68),l(9,"Right"),n()()())}function ul(o,d){o&1&&(a(0,"mat-form-field",34)(1,"mat-label"),l(2,"Progress Bar Start Angle"),n(),b(3,"input",69),n())}function gl(o,d){if(o&1&&(a(0,"mat-form-field",34)(1,"mat-label"),l(2,"Gauge Type"),n(),a(3,"mat-select",58)(4,"mat-option",63),l(5,"Measuring"),n(),a(6,"mat-option",64),l(7,"Capacity"),n()()(),u(8,pl,10,0,"mat-form-field",34),u(9,ul,4,0,"mat-form-field",34)),o&2){let e=f(3);s(8),g((e.widgetConfig==null||e.widgetConfig.gauge==null?null:e.widgetConfig.gauge.type)==="ngRadial"&&xt(2,Da).includes(e.formMaster.value.gauge.subType)?8:-1),s(),g(e.formMaster.value.gauge.subType==="capacity"?9:-1)}}function fl(o,d){if(o&1&&u(0,Al,14,0)(1,gl,10,3),o&2){let e=f(2);g(xt(1,Ia).indexOf(e.formMaster.value.gauge.subType)>-1?0:xt(2,Cn).indexOf(e.formMaster.value.gauge.subType)>-1?1:-1)}}function hl(o,d){o&1&&(a(0,"div",34)(1,"mat-checkbox",70),l(2," Use needle indicator "),n()(),a(3,"div",34)(4,"mat-checkbox",71),l(5," Enable Ticks "),n()(),a(6,"mat-form-field",35)(7,"mat-label"),l(8,"Orientation"),n(),a(9,"mat-select",72)(10,"mat-option",73),l(11,"Vertical"),n(),a(12,"mat-option",74),l(13,"Horizontal"),n()()())}function bl(o,d){o&1&&(a(0,"mat-form-field",35)(1,"mat-label"),l(2,"Unit Label"),n(),a(3,"mat-select",75)(4,"mat-option",76),l(5,"Full Label"),n(),a(6,"mat-option",77),l(7,"First Letter Only"),n()()())}function Cl(o,d){if(o&1&&(a(0,"mat-option",50),l(1),n()),o&2){let e=d.$implicit;m("value",ye(e.value)),s(),E(e.label)}}function _l(o,d){if(o&1&&(a(0,"mat-form-field",16)(1,"mat-label"),l(2,"Color"),n(),a(3,"mat-select",78),S(4,Cl,2,3,"mat-option",50,k),n()()),o&2){let e=f(2);s(4),T(e.colors)}}function vl(o,d){o&1&&(a(0,"mat-form-field",16)(1,"mat-label"),l(2,"Scale Span"),n(),a(3,"mat-select",79)(4,"mat-option",80),l(5,"1 Minute"),n(),a(6,"mat-option",81),l(7,"5 Minutes"),n(),a(8,"mat-option",82),l(9,"30 Minutes"),n()()())}function Ml(o,d){o&1&&(a(0,"mat-checkbox",36),l(1," Show Background Graph "),a(2,"i"),l(3,"(Too many graphs may affect performance)"),n()())}function yl(o,d){o&1&&(a(0,"mat-form-field")(1,"mat-label"),l(2,"Suggested Scale Start"),n(),b(3,"input",83),n())}function Sl(o,d){o&1&&(a(0,"mat-form-field")(1,"mat-label"),l(2,"Suggested Scale End"),n(),b(3,"input",84),n())}function Tl(o,d){o&1&&(a(0,"mat-checkbox",37),l(1," Inverse Scale Axis "),n())}function xl(o,d){o&1&&(a(0,"mat-checkbox",38),l(1," Vertical Data Graph "),n())}function wl(o,d){o&1&&(a(0,"mat-checkbox",39),l(1," Disable background color "),n())}function El(o,d){if(o&1&&(a(0,"mat-option",50),l(1),n()),o&2){let e=d.$implicit;m("value",ye(e.value)),s(),E(e.label)}}function Gl(o,d){if(o&1&&(a(0,"mat-form-field")(1,"mat-label"),l(2,"Background Color"),n(),a(3,"mat-select",85),S(4,El,2,3,"mat-option",50,k),n()()),o&2){let e=f(2);s(4),T(e.colors)}}function kl(o,d){o&1&&(a(0,"mat-form-field",34)(1,"mat-label"),l(2,"Background Style"),n(),a(3,"mat-select",98)(4,"mat-option",99),l(5,"Dark Gray"),n(),a(6,"mat-option",100),l(7,"Satin Gray"),n(),a(8,"mat-option",101),l(9,"Light Gray"),n(),a(10,"mat-option",102),l(11,"White"),n(),a(12,"mat-option",103),l(13,"Black"),n(),a(14,"mat-option",104),l(15,"Beige"),n(),a(16,"mat-option",105),l(17,"Brown"),n(),a(18,"mat-option",106),l(19,"Red"),n(),a(20,"mat-option",107),l(21,"Green"),n(),a(22,"mat-option",108),l(23,"Blue"),n(),a(24,"mat-option",94),l(25,"Anthracite"),n(),a(26,"mat-option",109),l(27,"Mud"),n(),a(28,"mat-option",110),l(29,"Punched Sheet"),n(),a(30,"mat-option",111),l(31,"Carbon"),n(),a(32,"mat-option",112),l(33,"Stainless"),n(),a(34,"mat-option",113),l(35,"Brushed Metal"),n(),a(36,"mat-option",114),l(37,"Brushed Stainless"),n(),a(38,"mat-option",115),l(39,"Turned"),n()()())}function Il(o,d){o&1&&(a(0,"div",34)(1,"mat-checkbox",116),l(2," Reverse Pitch Axis "),n()(),a(3,"div",34)(4,"mat-checkbox",117),l(5," Reverse Roll Axis "),n()(),a(6,"div",34)(7,"mat-checkbox",118),l(8," Show Frame "),n()())}function Dl(o,d){if(o&1&&(u(0,kl,40,0,"mat-form-field",34),u(1,Il,9,0),a(2,"mat-form-field",34)(3,"mat-label"),l(4,"Frame Style"),n(),a(5,"mat-select",86)(6,"mat-option",87),l(7,"Black Metal"),n(),a(8,"mat-option",88),l(9,"Metal"),n(),a(10,"mat-option",89),l(11,"Shiny Metal"),n(),a(12,"mat-option",90),l(13,"Brass"),n(),a(14,"mat-option",91),l(15,"Steel"),n(),a(16,"mat-option",92),l(17,"Chrome"),n(),a(18,"mat-option",93),l(19,"Gold"),n(),a(20,"mat-option",94),l(21,"Anthracite"),n(),a(22,"mat-option",95),l(23,"Tilted Gray"),n(),a(24,"mat-option",96),l(25,"Tilted Black"),n(),a(26,"mat-option",97),l(27,"Glossy Metal"),n()()()),o&2){let e=f(2);g((e.widgetConfig==null||e.widgetConfig.gauge==null?null:e.widgetConfig.gauge.type)!=="horizon"?0:-1),s(),g((e.widgetConfig==null||e.widgetConfig.gauge==null?null:e.widgetConfig.gauge.type)==="horizon"?1:-1)}}function Pl(o,d){if(o&1&&(a(0,"div",7)(1,"div",15),u(2,Oa,4,0,"mat-form-field",16),u(3,Ba,2,0,"mat-checkbox",17),u(4,Va,4,0,"mat-form-field",16),u(5,La,8,0),u(6,Na,4,0,"mat-form-field"),u(7,Ra,4,2,"mat-form-field",18),u(8,Wa,2,0,"mat-checkbox",19),u(9,Ua,2,0,"mat-checkbox",20),u(10,qa,4,2,"mat-form-field",21),u(11,Za,6,0,"mat-form-field",22),u(12,ja,2,0,"mat-checkbox",23),u(13,za,1,2,"display-datetime-options",24),u(14,Xa,2,0,"mat-checkbox",25),u(15,Ka,4,0,"mat-form-field"),u(16,Ja,2,0,"mat-checkbox",26),u(17,$a,4,0,"mat-form-field"),u(18,el,2,0,"mat-checkbox",27),u(19,tl,2,0,"mat-checkbox",28),u(20,il,2,0,"mat-checkbox",29),u(21,ol,2,0,"mat-checkbox",30),u(22,nl,2,0,"mat-checkbox",31),u(23,al,2,0,"mat-checkbox",32),u(24,ll,4,0,"mat-form-field"),u(25,rl,4,0,"mat-form-field"),u(26,sl,2,0,"mat-checkbox",33),u(27,dl,3,0,"div",34),u(28,cl,3,0,"div",34),u(29,ml,4,0,"mat-form-field",34),u(30,fl,2,3),u(31,hl,14,0),u(32,bl,8,0,"mat-form-field",35),u(33,_l,6,0,"mat-form-field",16),u(34,vl,10,0,"mat-form-field",16),u(35,Ml,4,0,"mat-checkbox",36),u(36,yl,4,0,"mat-form-field"),u(37,Sl,4,0,"mat-form-field"),u(38,Tl,2,0,"mat-checkbox",37),u(39,xl,2,0,"mat-checkbox",38),u(40,wl,2,0,"mat-checkbox",39),u(41,Gl,6,0,"mat-form-field"),u(42,Dl,28,2),n()()),o&2){let e=f();s(2),g((e.widgetConfig==null?null:e.widgetConfig.widgetUrl)!==void 0?2:-1),s(),g((e.widgetConfig==null?null:e.widgetConfig.allowInput)!==void 0?3:-1),s(),g((e.widgetConfig==null?null:e.widgetConfig.displayName)!==void 0?4:-1),s(),g(e.formMaster.get("displayScale")?5:-1),s(),g((e.widgetConfig==null?null:e.widgetConfig.numInt)!==void 0?6:-1),s(),g((e.widgetConfig==null?null:e.widgetConfig.numDecimal)!==void 0?7:-1),s(),g((e.widgetConfig==null?null:e.widgetConfig.showMin)!==void 0?8:-1),s(),g((e.widgetConfig==null?null:e.widgetConfig.showMax)!==void 0?9:-1),s(),g((e.widgetConfig==null?null:e.widgetConfig.nextDashboard)!==void 0?10:-1),s(),g((e.widgetConfig==null?null:e.widgetConfig.convertUnitTo)!==void 0?11:-1),s(),g((e.widgetConfig==null?null:e.widgetConfig.playBeeps)!==void 0?12:-1),s(),g((e.widgetConfig==null?null:e.widgetConfig.dateFormat)!==void 0?13:-1),s(),g((e.widgetConfig==null?null:e.widgetConfig.laylineEnable)!==void 0?14:-1),s(),g((e.widgetConfig==null?null:e.widgetConfig.laylineEnable)!==void 0?15:-1),s(),g((e.widgetConfig==null?null:e.widgetConfig.windSectorEnable)!==void 0?16:-1),s(),g((e.widgetConfig==null?null:e.widgetConfig.windSectorEnable)!==void 0?17:-1),s(),g((e.widgetConfig==null?null:e.widgetConfig.awsEnable)!==void 0?18:-1),s(),g((e.widgetConfig==null?null:e.widgetConfig.twsEnable)!==void 0?19:-1),s(),g((e.widgetConfig==null?null:e.widgetConfig.courseOverGroundEnable)!==void 0?20:-1),s(),g((e.widgetConfig==null?null:e.widgetConfig.twaEnable)!==void 0?21:-1),s(),g((e.widgetConfig==null?null:e.widgetConfig.waypointEnable)!==void 0?22:-1),s(),g((e.widgetConfig==null?null:e.widgetConfig.driftEnable)!==void 0?23:-1),s(),g((e.widgetConfig==null?null:e.widgetConfig.minValue)!==void 0&&!e.formMaster.get("displayScale")?24:-1),s(),g((e.widgetConfig==null?null:e.widgetConfig.maxValue)!==void 0&&!e.formMaster.get("displayScale")?25:-1),s(),g((e.widgetConfig==null?null:e.widgetConfig.ignoreZones)!==void 0?26:-1),s(),g((e.widgetConfig==null||e.widgetConfig.gauge==null?null:e.widgetConfig.gauge.type)==="angle"?27:-1),s(),g((e.widgetConfig==null||e.widgetConfig.gauge==null?null:e.widgetConfig.gauge.type)==="angle"?28:-1),s(),g((e.widgetConfig==null||e.widgetConfig.gauge==null?null:e.widgetConfig.gauge.type)==="ngRadial"&&xt(41,Cn).includes(e.formMaster.value.gauge.subType)||(e.widgetConfig==null||e.widgetConfig.gauge==null?null:e.widgetConfig.gauge.type)==="ngLinear"?29:-1),s(),g((e.widgetConfig==null||e.widgetConfig.gauge==null?null:e.widgetConfig.gauge.type)==="ngRadial"?30:-1),s(),g((e.widgetConfig==null||e.widgetConfig.gauge==null?null:e.widgetConfig.gauge.type)==="ngLinear"?31:-1),s(),g((e.widgetConfig==null||e.widgetConfig.gauge==null?null:e.widgetConfig.gauge.type)==="simpleLinear"?32:-1),s(),g((e.widgetConfig==null?null:e.widgetConfig.color)!==void 0?33:-1),s(),g((e.widgetConfig==null?null:e.widgetConfig.timeScale)!==void 0?34:-1),s(),g((e.widgetConfig==null?null:e.widgetConfig.showMiniChart)!==void 0?35:-1),s(),g((e.widgetConfig==null?null:e.widgetConfig.yScaleMin)!==void 0?36:-1),s(),g((e.widgetConfig==null?null:e.widgetConfig.yScaleMax)!==void 0?37:-1),s(),g((e.widgetConfig==null?null:e.widgetConfig.inverseYAxis)!==void 0?38:-1),s(),g((e.widgetConfig==null?null:e.widgetConfig.verticalChart)!==void 0?39:-1),s(),g((e.widgetConfig==null?null:e.widgetConfig.noBgColor)!==void 0?40:-1),s(),g((e.widgetConfig==null?null:e.widgetConfig.bgColor)!==void 0?41:-1),s(),g((e.widgetConfig==null||e.widgetConfig.gauge==null?null:e.widgetConfig.gauge.type)==="steel"||(e.widgetConfig==null||e.widgetConfig.gauge==null?null:e.widgetConfig.gauge.type)==="horizon"?42:-1)}}function Fl(o,d){if(o&1&&(b(0,"span",122),l(1,"\xA0Controls ")),o&2){let e=f(2);nt(e.formMaster.controls.multiChildCtrls.valid?"display: none":"display: block")}}function Ol(o,d){if(o&1){let e=D();a(0,"mat-tab",8)(1,"div",119)(2,"div"),Ie(3,Fl,2,2,"ng-template",120),n(),a(4,"boolean-multicontrol-options",121),_("addPath",function(t){M(e);let r=f();return y(r.addPathGroup(t))})("updatePath",function(t){M(e);let r=f();return y(r.updatePath(t))})("delPath",function(t){M(e);let r=f();return y(r.deletePath(t))}),n()()()}if(o&2){let e=f();s(4),m("multiCtrlArray",e.multiChildCtrlsToControl)}}function Bl(o,d){if(o&1&&(a(0,"span",124),l(1," error "),n(),l(2," \xA0Paths ")),o&2){let e=f(2);nt(e.formMaster.controls.paths.valid||e.formMaster.controls.paths.disabled?"display: none":"display: block")}}function Vl(o,d){if(o&1&&(a(0,"mat-tab",9)(1,"div",119)(2,"div"),Ie(3,Bl,3,2,"ng-template",120),n(),b(4,"paths-options",123),n()()),o&2){let e=f();s(4),m("isArray",e.isPathArray)("enableTimeout",e.enableTimeoutToControl)("dataTimeout",e.dataTimeoutToControl)("filterSelfPaths",e.filterSelfPathsToControl)("addPathEvent",e.addPathEvent)("delPathEvent",e.delPathEvent)("updatePathEvent",e.updatePathEvent)}}function Ll(o,d){o&1&&(a(0,"p")(1,"mat-checkbox",127),l(2," Digital display "),n()())}function Nl(o,d){o&1&&(a(0,"mat-form-field",16)(1,"mat-label"),l(2,"Dial Size"),n(),a(3,"mat-select",128)(4,"mat-option",129),l(5,"1/4"),n(),a(6,"mat-option",130),l(7,"1/2"),n(),a(8,"mat-option",131),l(9,"3/4"),n(),a(10,"mat-option",76),l(11,"Full"),n()()())}function Rl(o,d){if(o&1&&(a(0,"mat-tab",10)(1,"div",7)(2,"mat-form-field",16)(3,"mat-label"),l(4,"Gauge Type"),n(),a(5,"mat-select",72)(6,"mat-option",125),l(7,"Linear"),n(),a(8,"mat-option",126),l(9,"Radial"),n()()(),u(10,Ll,3,0,"p"),u(11,Nl,12,0,"mat-form-field",16),n()()),o&2){let e=f();s(10),g(e.formMaster.value.gauge.subType==="linear"?10:-1),s(),g(e.formMaster.value.gauge.subType==="radial"?11:-1)}}function Wl(o,d){o&1&&(a(0,"p")(1,"mat-checkbox",134),l(2," Value to send on button push (checked = on, unchecked = off) "),n()())}function Ul(o,d){if(o&1&&(a(0,"mat-tab",11)(1,"div",119)(2,"p")(3,"mat-checkbox",132),l(4," Enable Put Requests "),n()(),a(5,"p")(6,"mat-checkbox",133),l(7," Momentary mode (instead of switching between on/off) "),n()(),u(8,Wl,3,0,"p"),n()()),o&2){let e=f();s(8),g(e.formMaster.controls.putMomentary.value?8:-1)}}function ql(o,d){o&1&&b(0,"span",122)}function Ql(o,d){if(o&1&&(u(0,ql,1,0,"span",122),l(1," Dataset ")),o&2){let e=f(2);g(e.formMaster.controls.datasetUUID.valid?-1:0)}}function Yl(o,d){if(o&1&&(a(0,"mat-tab",12),Ie(1,Ql,2,1,"ng-template",120),b(2,"config-dataset-chart-options",135),n()),o&2){let e=f();s(2),m("datasetUUID",e.datasetUUIDToControl)("convertUnitTo",e.convertUnitToControl)}}var _n=(()=>{class o{static KEY_MULTI_CHILD_CTRLS="multiChildCtrls";static KEY_DISPLAY_SCALE="displayScale";static KEY_GAUGE="gauge";static KEY_AUTOPILOT="autopilot";static KEY_PATHS="paths";static KEY_CONVERT_UNIT_TO="convertUnitTo";dialogRef=A(Ae);fb=A(At);DatasetService=A(Kt);units=A(ft);app=A(dt);widgetConfig=A(pe);titleDialog="Widget Options";formMaster;availableDataSets;unitList={};isPathArray=!1;addPathEvent;delPathEvent;updatePathEvent;colors=[];ngOnInit(){if(!this.widgetConfig){console.error("Widget configuration data is missing. Closing dialog."),this.dialogRef.close();return}this.availableDataSets=this.DatasetService.list().sort((e,i)=>{let t=e.label||"",r=i.label||"";return t.localeCompare(r,void 0,{sensitivity:"base"})}),this.unitList=this.units.getConversionsForPath(""),this.formMaster=this.generateFormGroups(this.widgetConfig),this.colors=this.app.configurableThemeColors}isPlainObject(e){return Object.prototype.toString.call(e)==="[object Object]"}generateFormGroups(e,i){let t=this.fb.group({});return Object.keys(e).forEach(r=>{let c=e[r];if(c!==null&&(Array.isArray(c)||this.isPlainObject(c))){if(r===o.KEY_MULTI_CHILD_CTRLS){t.addControl(r,this.fb.array([]));let p=t.get(r);c.forEach(C=>{p.push(this.generateCtrlArray(C))})}else if(r===o.KEY_DISPLAY_SCALE)t.addControl(r,this.generateFormGroups(c,r));else if(r===o.KEY_GAUGE)t.addControl(r,this.generateFormGroups(c,r));else if(r===o.KEY_AUTOPILOT)t.addControl(r,this.generateFormGroups(c,r));else if(r===o.KEY_PATHS){let p=c;if(this.widgetConfig.multiChildCtrls!==void 0){this.isPathArray=!0,t.addControl(r,this.fb.array([]));let C=t.get(r);Object.keys(p).forEach(w=>{let x=p[w];if(x){let G=this.generatePathArray(w,x);x.isPathConfigurable===!1&&G.disable(),C.push(G)}})}else{let C=this.fb.group({});Object.keys(p).forEach(w=>{let x=p[w];if(x){let G=this.generateFormGroups(x,w);x.isPathConfigurable===!1&&G.disable(),C.addControl(w,G)}}),t.addControl(r,C)}}i===o.KEY_PATHS&&t.addControl(r,this.generateFormGroups(c,r))}else if(i===o.KEY_CONVERT_UNIT_TO){let p=e[r];(p&&p.pathType=="number"||"datasetUUID"in this.widgetConfig)&&t.addControl(r,new ae(c))}else switch(r){case"path":t.addControl(r,new ae(c));break;case"datasetUUID":t.addControl(r,new ae(c,Y.required));break;case"dataTimeout":t.addControl(r,new ae(c,Y.required));break;default:t.addControl(r,new ae(c));break}}),t}generatePathArray(e,i){let t=new Io({});return Object.keys(i).forEach(r=>{t.addControl(r,this.generatePathFields(r,i[r]))}),t}generatePathFields(e,i){let t=null;switch(e){case"path":t=new ae(i);break;case"source":t=new ae(i,Y.required);break;case"sampleTime":t=new ae(i,Y.required);break;default:t=new ae(i);break}return t}generateCtrlArray(e){let i=this.fb.group(e);return i.get("ctrlLabel").addValidators(Y.required),i}addPathGroup(e){this.addPathEvent=e}updatePath(e){e.forEach(i=>{this.formMaster.get("paths").controls.forEach(r=>{r.get("pathID").value==i.pathID&&(r.controls.description.setValue(i.ctrlLabel),r.controls.pathType.setValue(i.isNumeric?"number":"boolean"),this.updatePathEvent=e)})})}deletePath(e){let i=this.formMaster.get("paths"),t=0;i.controls.forEach(c=>{c.get("pathID").value==e.pathID?i.removeAt(t):t++}),this.formMaster.get("multiChildCtrls").removeAt(e.ctrlIndex),this.delPathEvent=e.pathID,this.formMaster.updateValueAndValidity()}get convertUnitToControl(){return this.formMaster.get("convertUnitTo")}get datasetUUIDToControl(){return this.formMaster.get("datasetUUID")}get filterSelfPathsToControl(){return this.formMaster.get("filterSelfPaths")}get dataTimeoutToControl(){return this.formMaster.get("dataTimeout")}get enableTimeoutToControl(){return this.formMaster.get("enableTimeout")}get dateTimezoneToControl(){return this.formMaster.get("dateTimezone")}get yScaleSuggestedMaxToControl(){return this.formMaster.get("yScaleSuggestedMax")}get enableMinMaxScaleLimitToControl(){return this.formMaster.get("enableMinMaxScaleLimit")}get showDatasetMinimumValueLineToControl(){return this.formMaster.get("showDatasetMinimumValueLine")}get showDatasetMaximumValueLineToControl(){return this.formMaster.get("showDatasetMaximumValueLine")}get showDatasetAverageValueLineToControl(){return this.formMaster.get("showDatasetAverageValueLine")}get showDatasetAngleAverageValueLineToControl(){return this.formMaster.get("showDatasetAngleAverageValueLine")}get startScaleAtZeroToControl(){return this.formMaster.get("startScaleAtZero")}get showLabelToControl(){return this.formMaster.get("showLabel")}get showTimeScaleToControl(){return this.formMaster.get("showTimeScale")}get showYScaleToControl(){return this.formMaster.get("showYScale")}get yScaleSuggestedMinToControl(){return this.formMaster.get("yScaleSuggestedMin")}get yScaleMinToControl(){return this.formMaster.get("yScaleMin")}get yScaleMaxToControl(){return this.formMaster.get("yScaleMax")}get datasetAverageArrayToControl(){return this.formMaster.get("datasetAverageArray")}get trackAgainstAverageToControl(){return this.formMaster.get("trackAgainstAverage")}get showAverageDataToControl(){return this.formMaster.get("showAverageData")}get displayNameToControl(){return this.formMaster.get("displayName")}get numDecimalToControl(){return this.formMaster.get("numDecimal")}get verticalChartToControl(){return this.formMaster.get("verticalChart")}get inverseYAxisToControl(){return this.formMaster.get("inverseYAxis")}get colorToControl(){return this.formMaster.get("color")}get dateFormatToControl(){return this.formMaster.get("dateFormat")}get multiChildCtrlsToControl(){return this.formMaster.get("multiChildCtrls")}submitConfig(){this.dialogRef.close(this.formMaster.getRawValue())}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=v({type:o,selectors:[["modal-widget-config"]],decls:20,vars:9,consts:[[3,"ngSubmit","formGroup"],["mat-dialog-title",""],[1,"widget-config-dialog-content"],[1,"tab-group-content"],["label","Display"],[1,"tab-content",3,"displayName","datasetUUID","convertUnitTo","showAverageData","trackAgainstAverage","datasetAverageArray","showDatasetMinimumValueLine","showDatasetMaximumValueLine","showDatasetAverageValueLine","showDatasetAngleAverageValueLine","startScaleAtZero","showLabel","showTimeScale","showYScale","yScaleSuggestedMin","yScaleSuggestedMax","enableMinMaxScaleLimit","yScaleMin","yScaleMax","numDecimal","verticalChart","inverseYAxis","color"],["formGroupName","autopilot",1,"tab-content"],[1,"display-content","tab-content"],["label","Controls"],["label","Paths"],["label","Settings","formGroupName","gauge"],["label","Put Request"],["label","Dataset"],["type","button","mat-dialog-close","","mat-flat-button",""],["mat-flat-button","","type","submit",3,"disabled"],[1,"widget-options-grid"],[1,"options-grid-span2"],["name","allowInput","formControlName","allowInput",1,"options-grid-span2"],[3,"class"],["name","showMin","formControlName","showMin"],["name","showMax","formControlName","showMax"],[3,"options-grid-span2"],[1,"fields"],["name","playBeeps","formControlName","playBeeps"],[1,"options-grid-span2",3,"dateFormat","dateTimezone"],["name","laylineEnable","formControlName","laylineEnable",1,"fields"],["name","windSectorEnable","formControlName","windSectorEnable"],["name","awsEnable","formControlName","awsEnable"],["name","twsEnable","formControlName","twsEnable"],["name","courseOverGroundEnable","formControlName","courseOverGroundEnable"],["name","twaEnable","formControlName","twaEnable"],["name","waypointEnable","formControlName","waypointEnable"],["name","driftEnable","formControlName","driftEnable"],["name","ignoreZones","formControlName","ignoreZones"],["formGroupName","gauge"],["formGroupName","gauge",1,"options-grid-span2"],["name","showMiniChart","formControlName","showMiniChart",1,"options-grid-span2"],["name","inverseYAxis","formControlName","inverseYAxis"],["name","verticalChart","formControlName","verticalChart"],["name","noBgColor","formControlName","noBgColor"],["type","url","matInput","","placeholder","Enter URL to page/resource","name","widgetUrl","formControlName","widgetUrl"],["matInput","","placeholder","Enter a label to display","name","displayName","formControlName","displayName"],["formGroupName","displayScale","appearance","outline"],["matNativeControl","","type","number","name","lower","formControlName","lower","placeholder","Enter number..."],["matInput","","type","number","name","upper","formControlName","upper","placeholder","Enter number..."],["type","number","min","1","max","5","matInput","","placeholder","Enter or select number...","name","numInt","formControlName","numInt","required",""],["type","number","min","0","max","5","matInput","","placeholder","Enter or select number...","name","numDecimal","formControlName","numDecimal","required",""],["type","number","min","0","max","99","matInput","","placeholder","Enter or select number...","name","nextDashboard","formControlName","nextDashboard"],["placeholder","Select unit","formControlName","convertUnitTo","required",""],[3,"label"],[3,"value"],["type","number","min","10","max","90","matInput","","placeholder","Select angle...","name","laylineAngle","formControlName","laylineAngle"],["type","number","min","1","max","90","matInput","","placeholder","Select or enter duration...","name","windSectorWindowSeconds","formControlName","windSectorWindowSeconds"],["matInput","","type","number","name","minValue","formControlName","minValue","placeholder","Enter or select number..."],["matInput","","type","number","name","maxValue","formControlName","maxValue","placeholder","Enter or select number..."],["name","sideLabel","formControlName","sideLabel"],["name","invertAngle","formControlName","invertAngle"],["type","number","min","0","max","25","matInput","","placeholder","Enter or select number...","name","highlightsWidth","formControlName","highlightsWidth","required",""],["placeholder","Select Gauge Type...","formControlName","subType","name","subType"],["value","marineCompass"],["value","baseplateCompass"],["name","showValueBox","formControlName","showValueBox"],["name","compassUseNumbers","formControlName","compassUseNumbers"],["value","measuring"],["value","capacity"],["placeholder","Select start position...","formControlName","barStartPosition","name","barStartPosition"],["value","left"],["value","middle"],["value","right"],["type","number","min","1","max","360","matInput","","placeholder","Enter or select number...","name","scaleStart","formControlName","scaleStart","required",""],["name","useNeedle","formControlName","useNeedle"],["name","enableTicks","formControlName","enableTicks"],["placeholder","Select type...","formControlName","subType","name","subType"],["value","vertical"],["value","horizontal"],["placeholder","Select label format","formControlName","unitLabelFormat","name","unitLabelFormat"],["value","full"],["value","abr"],["placeholder","Select Color...","formControlName","color","name","color","required",""],["placeholder","Select span duration...","formControlName","timeScale","name","timeScale","required",""],["value","Last Minute"],["value","Last 5 Minutes"],["value","Last 30 Minutes"],["type","number","matInput","","placeholder","Enter or select number...","name","yScaleMin","formControlName","yScaleMin","required",""],["type","number","matInput","","placeholder","Enter or select number...","name","yScaleMax","formControlName","yScaleMax","required",""],["placeholder","Select Color...","formControlName","bgColor","name","bgColor","required",""],["placeholder","Select style...","formControlName","faceColor","name","faceColor"],["value","blackMetal"],["value","metal"],["value","shinyMetal"],["value","brass"],["value","steel"],["value","chrome"],["value","gold"],["value","anthracite"],["value","tiltedGray"],["value","tiltedBlack"],["value","glossyMetal"],["placeholder","Select style...","formControlName","backgroundColor","name","backgroundColor"],["value","darkGray"],["value","satinGray"],["value","lightGray"],["value","white"],["value","black"],["value","beige"],["value","brown"],["value","red"],["value","green"],["value","blue"],["value","mud"],["value","punchedSheet"],["value","carbon"],["value","stainless"],["value","brushedMetal"],["value","brushedStainless"],["value","turned"],["name","invertPitch","formControlName","invertPitch"],["name","invertRoll","formControlName","invertRoll"],["name","noFrameVisible","formControlName","noFrameVisible"],[1,"tab-content"],["mat-tab-label",""],[3,"addPath","updatePath","delPath","multiCtrlArray"],[1,"warning","fa","fa-exclamation-circle"],["formGroupName","paths",3,"isArray","enableTimeout","dataTimeout","filterSelfPaths","addPathEvent","delPathEvent","updatePathEvent"],[1,"warning","material-icons"],["value","linear"],["value","radial"],["formControlName","digitalMeter","name","digitalMeter"],["placeholder","Select size...","formControlName","radialSize","name","radialSize"],["value","quarter"],["value","half"],["value","three-quarter"],["formControlName","putEnable","name","putEnable"],["formControlName","putMomentary","name","putMomentary"],["formControlName","putMomentaryValue","name","putMomentaryValue"],[3,"datasetUUID","convertUnitTo"]],template:function(i,t){i&1&&(a(0,"form",0),_("ngSubmit",function(){return t.submitConfig()}),a(1,"h6",1),l(2),n(),a(3,"mat-dialog-content",2)(4,"mat-tab-group",3)(5,"mat-tab",4),u(6,Pa,1,23,"config-display-chart-options",5)(7,Fa,1,0,"select-autopilot",6)(8,Pl,43,42,"div",7),n(),u(9,Ol,5,1,"mat-tab",8),u(10,Vl,5,7,"mat-tab",9),u(11,Rl,12,2,"mat-tab",10),u(12,Ul,9,1,"mat-tab",11),u(13,Yl,3,2,"mat-tab",12),n()(),b(14,"mat-divider"),a(15,"mat-dialog-actions")(16,"button",13),l(17,"Cancel"),n(),a(18,"button",14),l(19," Save "),n()()()),i&2&&(m("formGroup",t.formMaster),s(2),E(t.titleDialog),s(4),g((t.widgetConfig==null?null:t.widgetConfig.datasetUUID)!==void 0?6:t.widgetConfig!=null&&t.widgetConfig.autopilot?7:8),s(3),g((t.widgetConfig==null?null:t.widgetConfig.multiChildCtrls)!==void 0?9:-1),s(),g((t.widgetConfig==null?null:t.widgetConfig.paths)!==void 0?10:-1),s(),g((t.widgetConfig==null||t.widgetConfig.gauge==null?null:t.widgetConfig.gauge.type)==="steel"?11:-1),s(),g((t.widgetConfig==null?null:t.widgetConfig.putEnable)!==void 0&&(t.widgetConfig==null?null:t.widgetConfig.multiChildCtrls)===void 0?12:-1),s(),g((t.widgetConfig==null?null:t.widgetConfig.datasetUUID)!==void 0?13:-1),s(5),m("disabled",!t.formMaster.valid))},dependencies:[j,ct,Q,Ne,F,H,O,mt,Xt,W,Z,Re,Po,ne,ue,ge,Le,fe,le,V,B,be,z,$o,Xo,Ko,Jo,Ce,se,We,re,X,gt,Lo,Vo,ee,me,fn,ln,rn,an,gn,bn],styles:["[_nghost-%COMP%]{display:block;height:100%;width:100%}.widget-config-dialog-content[_ngcontent-%COMP%]{height:100%}.display-content[_ngcontent-%COMP%]{display:block;height:100%;width:100%;padding-top:15px;padding-bottom:10px}.warning[_ngcontent-%COMP%]{color:var(--mat-sys-error-container)}.tab-group-content[_ngcontent-%COMP%]{overflow:hidden;width:100%}"]})}return o})();var Hl=["button"],Zl=["*"];function jl(o,d){if(o&1&&(a(0,"div",2),b(1,"mat-pseudo-checkbox",6),n()),o&2){let e=f();s(),m("disabled",e.disabled)}}var vn=new Me("MAT_BUTTON_TOGGLE_DEFAULT_OPTIONS",{providedIn:"root",factory:zl});function zl(){return{hideSingleSelectionIndicator:!1,hideMultipleSelectionIndicator:!1,disabledInteractive:!1}}var Mn=new Me("MatButtonToggleGroup"),Xl={provide:Zt,useExisting:Ot(()=>hi),multi:!0},ni=class{source;value;constructor(d,e){this.source=d,this.value=e}},hi=(()=>{class o{_changeDetector=A(rt);_dir=A(Ht,{optional:!0});_multiple=!1;_disabled=!1;_disabledInteractive=!1;_selectionModel;_rawValue;_controlValueAccessorChangeFn=()=>{};_onTouched=()=>{};_buttonToggles;appearance;get name(){return this._name}set name(e){this._name=e,this._markButtonsForCheck()}_name=A(wt).getId("mat-button-toggle-group-");vertical;get value(){let e=this._selectionModel?this._selectionModel.selected:[];return this.multiple?e.map(i=>i.value):e[0]?e[0].value:void 0}set value(e){this._setSelectionByValue(e),this.valueChange.emit(this.value)}valueChange=new de;get selected(){let e=this._selectionModel?this._selectionModel.selected:[];return this.multiple?e:e[0]||null}get multiple(){return this._multiple}set multiple(e){this._multiple=e,this._markButtonsForCheck()}get disabled(){return this._disabled}set disabled(e){this._disabled=e,this._markButtonsForCheck()}get disabledInteractive(){return this._disabledInteractive}set disabledInteractive(e){this._disabledInteractive=e,this._markButtonsForCheck()}get dir(){return this._dir&&this._dir.value==="rtl"?"rtl":"ltr"}change=new de;get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=e,this._markButtonsForCheck()}_hideSingleSelectionIndicator;get hideMultipleSelectionIndicator(){return this._hideMultipleSelectionIndicator}set hideMultipleSelectionIndicator(e){this._hideMultipleSelectionIndicator=e,this._markButtonsForCheck()}_hideMultipleSelectionIndicator;constructor(){let e=A(vn,{optional:!0});this.appearance=e&&e.appearance?e.appearance:"standard",this.hideSingleSelectionIndicator=e?.hideSingleSelectionIndicator??!1,this.hideMultipleSelectionIndicator=e?.hideMultipleSelectionIndicator??!1}ngOnInit(){this._selectionModel=new Yo(this.multiple,void 0,!1)}ngAfterContentInit(){this._selectionModel.select(...this._buttonToggles.filter(e=>e.checked)),this.multiple||this._initializeTabIndex()}writeValue(e){this.value=e,this._changeDetector.markForCheck()}registerOnChange(e){this._controlValueAccessorChangeFn=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e}_keydown(e){if(this.multiple||this.disabled)return;let t=e.target.id,r=this._buttonToggles.toArray().findIndex(p=>p.buttonId===t),c=null;switch(e.keyCode){case 32:case 13:c=this._buttonToggles.get(r)||null;break;case 38:c=this._getNextButton(r,-1);break;case 37:c=this._getNextButton(r,this.dir==="ltr"?-1:1);break;case 40:c=this._getNextButton(r,1);break;case 39:c=this._getNextButton(r,this.dir==="ltr"?1:-1);break;default:return}c&&(e.preventDefault(),c._onButtonClick(),c.focus())}_emitChangeEvent(e){let i=new ni(e,this.value);this._rawValue=i.value,this._controlValueAccessorChangeFn(i.value),this.change.emit(i)}_syncButtonToggle(e,i,t=!1,r=!1){!this.multiple&&this.selected&&!e.checked&&(this.selected.checked=!1),this._selectionModel?i?this._selectionModel.select(e):this._selectionModel.deselect(e):r=!0,r?Promise.resolve().then(()=>this._updateModelValue(e,t)):this._updateModelValue(e,t)}_isSelected(e){return this._selectionModel&&this._selectionModel.isSelected(e)}_isPrechecked(e){return typeof this._rawValue>"u"?!1:this.multiple&&Array.isArray(this._rawValue)?this._rawValue.some(i=>e.value!=null&&i===e.value):e.value===this._rawValue}_initializeTabIndex(){if(this._buttonToggles.forEach(e=>{e.tabIndex=-1}),this.selected)this.selected.tabIndex=0;else for(let e=0;e<this._buttonToggles.length;e++){let i=this._buttonToggles.get(e);if(!i.disabled){i.tabIndex=0;break}}}_getNextButton(e,i){let t=this._buttonToggles;for(let r=1;r<=t.length;r++){let c=(e+i*r+t.length)%t.length,p=t.get(c);if(p&&!p.disabled)return p}return null}_setSelectionByValue(e){if(this._rawValue=e,!this._buttonToggles)return;let i=this._buttonToggles.toArray();if(this.multiple&&e?(Array.isArray(e),this._clearSelection(),e.forEach(t=>this._selectValue(t,i))):(this._clearSelection(),this._selectValue(e,i)),!this.multiple&&i.every(t=>t.tabIndex===-1)){for(let t of i)if(!t.disabled){t.tabIndex=0;break}}}_clearSelection(){this._selectionModel.clear(),this._buttonToggles.forEach(e=>{e.checked=!1,this.multiple||(e.tabIndex=-1)})}_selectValue(e,i){for(let t of i)if(t.value===e){t.checked=!0,this._selectionModel.select(t),this.multiple||(t.tabIndex=0);break}}_updateModelValue(e,i){i&&this._emitChangeEvent(e),this.valueChange.emit(this.value)}_markButtonsForCheck(){this._buttonToggles?.forEach(e=>e._markForCheck())}static \u0275fac=function(i){return new(i||o)};static \u0275dir=it({type:o,selectors:[["mat-button-toggle-group"]],contentQueries:function(i,t,r){if(i&1&&_t(r,ai,5),i&2){let c;De(c=Pe())&&(t._buttonToggles=c)}},hostAttrs:[1,"mat-button-toggle-group"],hostVars:6,hostBindings:function(i,t){i&1&&_("keydown",function(c){return t._keydown(c)}),i&2&&(K("role",t.multiple?"group":"radiogroup")("aria-disabled",t.disabled),te("mat-button-toggle-vertical",t.vertical)("mat-button-toggle-group-appearance-standard",t.appearance==="standard"))},inputs:{appearance:"appearance",name:"name",vertical:[2,"vertical","vertical",N],value:"value",multiple:[2,"multiple","multiple",N],disabled:[2,"disabled","disabled",N],disabledInteractive:[2,"disabledInteractive","disabledInteractive",N],hideSingleSelectionIndicator:[2,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",N],hideMultipleSelectionIndicator:[2,"hideMultipleSelectionIndicator","hideMultipleSelectionIndicator",N]},outputs:{valueChange:"valueChange",change:"change"},exportAs:["matButtonToggleGroup"],features:[Tt([Xl,{provide:Mn,useExisting:o}])]})}return o})(),ai=(()=>{class o{_changeDetectorRef=A(rt);_elementRef=A(He);_focusMonitor=A(ao);_idGenerator=A(wt);_animationDisabled=Ve();_checked=!1;ariaLabel;ariaLabelledby=null;_buttonElement;buttonToggleGroup;get buttonId(){return`${this.id}-button`}id;name;value;get tabIndex(){return this._tabIndex()}set tabIndex(e){this._tabIndex.set(e)}_tabIndex;disableRipple;get appearance(){return this.buttonToggleGroup?this.buttonToggleGroup.appearance:this._appearance}set appearance(e){this._appearance=e}_appearance;get checked(){return this.buttonToggleGroup?this.buttonToggleGroup._isSelected(this):this._checked}set checked(e){e!==this._checked&&(this._checked=e,this.buttonToggleGroup&&this.buttonToggleGroup._syncButtonToggle(this,this._checked),this._changeDetectorRef.markForCheck())}get disabled(){return this._disabled||this.buttonToggleGroup&&this.buttonToggleGroup.disabled}set disabled(e){this._disabled=e}_disabled=!1;get disabledInteractive(){return this._disabledInteractive||this.buttonToggleGroup!==null&&this.buttonToggleGroup.disabledInteractive}set disabledInteractive(e){this._disabledInteractive=e}_disabledInteractive;change=new de;constructor(){A(lo).load(Ao);let e=A(Mn,{optional:!0}),i=A(new Hi("tabindex"),{optional:!0})||"",t=A(vn,{optional:!0});this._tabIndex=I(parseInt(i)||0),this.buttonToggleGroup=e,this.appearance=t&&t.appearance?t.appearance:"standard",this.disabledInteractive=t?.disabledInteractive??!1}ngOnInit(){let e=this.buttonToggleGroup;this.id=this.id||this._idGenerator.getId("mat-button-toggle-"),e&&(e._isPrechecked(this)?this.checked=!0:e._isSelected(this)!==this._checked&&e._syncButtonToggle(this,this._checked))}ngAfterViewInit(){this._animationDisabled||this._elementRef.nativeElement.classList.add("mat-button-toggle-animations-enabled"),this._focusMonitor.monitor(this._elementRef,!0)}ngOnDestroy(){let e=this.buttonToggleGroup;this._focusMonitor.stopMonitoring(this._elementRef),e&&e._isSelected(this)&&e._syncButtonToggle(this,!1,!1,!0)}focus(e){this._buttonElement.nativeElement.focus(e)}_onButtonClick(){if(this.disabled)return;let e=this.isSingleSelector()?!0:!this._checked;if(e!==this._checked&&(this._checked=e,this.buttonToggleGroup&&(this.buttonToggleGroup._syncButtonToggle(this,this._checked,!0),this.buttonToggleGroup._onTouched())),this.isSingleSelector()){let i=this.buttonToggleGroup._buttonToggles.find(t=>t.tabIndex===0);i&&(i.tabIndex=-1),this.tabIndex=0}this.change.emit(new ni(this,this.value))}_markForCheck(){this._changeDetectorRef.markForCheck()}_getButtonName(){return this.isSingleSelector()?this.buttonToggleGroup.name:this.name||null}isSingleSelector(){return this.buttonToggleGroup&&!this.buttonToggleGroup.multiple}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=v({type:o,selectors:[["mat-button-toggle"]],viewQuery:function(i,t){if(i&1&&vt(Hl,5),i&2){let r;De(r=Pe())&&(t._buttonElement=r.first)}},hostAttrs:["role","presentation",1,"mat-button-toggle"],hostVars:14,hostBindings:function(i,t){i&1&&_("focus",function(){return t.focus()}),i&2&&(K("aria-label",null)("aria-labelledby",null)("id",t.id)("name",null),te("mat-button-toggle-standalone",!t.buttonToggleGroup)("mat-button-toggle-checked",t.checked)("mat-button-toggle-disabled",t.disabled)("mat-button-toggle-disabled-interactive",t.disabledInteractive)("mat-button-toggle-appearance-standard",t.appearance==="standard"))},inputs:{ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],id:"id",name:"name",value:"value",tabIndex:"tabIndex",disableRipple:[2,"disableRipple","disableRipple",N],appearance:"appearance",checked:[2,"checked","checked",N],disabled:[2,"disabled","disabled",N],disabledInteractive:[2,"disabledInteractive","disabledInteractive",N]},outputs:{change:"change"},exportAs:["matButtonToggle"],ngContentSelectors:Zl,decls:7,vars:13,consts:[["button",""],["type","button",1,"mat-button-toggle-button","mat-focus-indicator",3,"click","id","disabled"],[1,"mat-button-toggle-checkbox-wrapper"],[1,"mat-button-toggle-label-content"],[1,"mat-button-toggle-focus-overlay"],["matRipple","",1,"mat-button-toggle-ripple",3,"matRippleTrigger","matRippleDisabled"],["state","checked","aria-hidden","true","appearance","minimal",3,"disabled"]],template:function(i,t){if(i&1){let r=D();Lt(),a(0,"button",1,0),_("click",function(){return M(r),y(t._onButtonClick())}),u(2,jl,2,1,"div",2),a(3,"span",3),Nt(4),n()(),b(5,"span",4)(6,"span",5)}if(i&2){let r=oe(1);m("id",t.buttonId)("disabled",t.disabled&&!t.disabledInteractive||null),K("role",t.isSingleSelector()?"radio":"button")("tabindex",t.disabled&&!t.disabledInteractive?-1:t.tabIndex)("aria-pressed",t.isSingleSelector()?null:t.checked)("aria-checked",t.isSingleSelector()?t.checked:null)("name",t._getButtonName())("aria-label",t.ariaLabel)("aria-labelledby",t.ariaLabelledby)("aria-disabled",t.disabled&&t.disabledInteractive?"true":null),s(2),g(t.buttonToggleGroup&&(!t.buttonToggleGroup.multiple&&!t.buttonToggleGroup.hideSingleSelectionIndicator||t.buttonToggleGroup.multiple&&!t.buttonToggleGroup.hideMultipleSelectionIndicator)?2:-1),s(4),m("matRippleTrigger",r)("matRippleDisabled",t.disableRipple||t.disabled)}},dependencies:[mo,No],styles:[`.mat-button-toggle-standalone,.mat-button-toggle-group{position:relative;display:inline-flex;flex-direction:row;white-space:nowrap;overflow:hidden;-webkit-tap-highlight-color:rgba(0,0,0,0);border-radius:var(--mat-button-toggle-legacy-shape);transform:translateZ(0)}.mat-button-toggle-standalone:not([class*=mat-elevation-z]),.mat-button-toggle-group:not([class*=mat-elevation-z]){box-shadow:0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12)}@media(forced-colors: active){.mat-button-toggle-standalone,.mat-button-toggle-group{outline:solid 1px}}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard,.mat-button-toggle-group-appearance-standard{border-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large));border:solid 1px var(--mat-button-toggle-divider-color, var(--mat-sys-outline))}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard .mat-pseudo-checkbox,.mat-button-toggle-group-appearance-standard .mat-pseudo-checkbox{--mat-pseudo-checkbox-minimal-selected-checkmark-color: var(--mat-button-toggle-selected-state-text-color, var(--mat-sys-on-secondary-container))}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard:not([class*=mat-elevation-z]),.mat-button-toggle-group-appearance-standard:not([class*=mat-elevation-z]){box-shadow:none}@media(forced-colors: active){.mat-button-toggle-standalone.mat-button-toggle-appearance-standard,.mat-button-toggle-group-appearance-standard{outline:0}}.mat-button-toggle-vertical{flex-direction:column}.mat-button-toggle-vertical .mat-button-toggle-label-content{display:block}.mat-button-toggle{white-space:nowrap;position:relative;color:var(--mat-button-toggle-legacy-text-color);font-family:var(--mat-button-toggle-legacy-label-text-font);font-size:var(--mat-button-toggle-legacy-label-text-size);line-height:var(--mat-button-toggle-legacy-label-text-line-height);font-weight:var(--mat-button-toggle-legacy-label-text-weight);letter-spacing:var(--mat-button-toggle-legacy-label-text-tracking);--mat-pseudo-checkbox-minimal-selected-checkmark-color: var(--mat-button-toggle-legacy-selected-state-text-color)}.mat-button-toggle.cdk-keyboard-focused .mat-button-toggle-focus-overlay{opacity:var(--mat-button-toggle-legacy-focus-state-layer-opacity)}.mat-button-toggle .mat-icon svg{vertical-align:top}.mat-button-toggle-checkbox-wrapper{display:inline-block;justify-content:flex-start;align-items:center;width:0;height:18px;line-height:18px;overflow:hidden;box-sizing:border-box;position:absolute;top:50%;left:16px;transform:translate3d(0, -50%, 0)}[dir=rtl] .mat-button-toggle-checkbox-wrapper{left:auto;right:16px}.mat-button-toggle-appearance-standard .mat-button-toggle-checkbox-wrapper{left:12px}[dir=rtl] .mat-button-toggle-appearance-standard .mat-button-toggle-checkbox-wrapper{left:auto;right:12px}.mat-button-toggle-checked .mat-button-toggle-checkbox-wrapper{width:18px}.mat-button-toggle-animations-enabled .mat-button-toggle-checkbox-wrapper{transition:width 150ms 45ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-button-toggle-vertical .mat-button-toggle-checkbox-wrapper{transition:none}.mat-button-toggle-checked{color:var(--mat-button-toggle-legacy-selected-state-text-color);background-color:var(--mat-button-toggle-legacy-selected-state-background-color)}.mat-button-toggle-disabled{pointer-events:none;color:var(--mat-button-toggle-legacy-disabled-state-text-color);background-color:var(--mat-button-toggle-legacy-disabled-state-background-color);--mat-pseudo-checkbox-minimal-disabled-selected-checkmark-color: var(--mat-button-toggle-legacy-disabled-state-text-color)}.mat-button-toggle-disabled.mat-button-toggle-checked{background-color:var(--mat-button-toggle-legacy-disabled-selected-state-background-color)}.mat-button-toggle-disabled-interactive{pointer-events:auto}.mat-button-toggle-appearance-standard{color:var(--mat-button-toggle-text-color, var(--mat-sys-on-surface));background-color:var(--mat-button-toggle-background-color, transparent);font-family:var(--mat-button-toggle-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mat-button-toggle-label-text-size, var(--mat-sys-label-large-size));line-height:var(--mat-button-toggle-label-text-line-height, var(--mat-sys-label-large-line-height));font-weight:var(--mat-button-toggle-label-text-weight, var(--mat-sys-label-large-weight));letter-spacing:var(--mat-button-toggle-label-text-tracking, var(--mat-sys-label-large-tracking))}.mat-button-toggle-group-appearance-standard .mat-button-toggle-appearance-standard+.mat-button-toggle-appearance-standard{border-left:solid 1px var(--mat-button-toggle-divider-color, var(--mat-sys-outline))}[dir=rtl] .mat-button-toggle-group-appearance-standard .mat-button-toggle-appearance-standard+.mat-button-toggle-appearance-standard{border-left:none;border-right:solid 1px var(--mat-button-toggle-divider-color, var(--mat-sys-outline))}.mat-button-toggle-group-appearance-standard.mat-button-toggle-vertical .mat-button-toggle-appearance-standard+.mat-button-toggle-appearance-standard{border-left:none;border-right:none;border-top:solid 1px var(--mat-button-toggle-divider-color, var(--mat-sys-outline))}.mat-button-toggle-appearance-standard.mat-button-toggle-checked{color:var(--mat-button-toggle-selected-state-text-color, var(--mat-sys-on-secondary-container));background-color:var(--mat-button-toggle-selected-state-background-color, var(--mat-sys-secondary-container))}.mat-button-toggle-appearance-standard.mat-button-toggle-disabled{color:var(--mat-button-toggle-disabled-state-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mat-button-toggle-disabled-state-background-color, transparent)}.mat-button-toggle-appearance-standard.mat-button-toggle-disabled .mat-pseudo-checkbox{--mat-pseudo-checkbox-minimal-disabled-selected-checkmark-color: var(--mat-button-toggle-disabled-selected-state-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-button-toggle-appearance-standard.mat-button-toggle-disabled.mat-button-toggle-checked{color:var(--mat-button-toggle-disabled-selected-state-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mat-button-toggle-disabled-selected-state-background-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-button-toggle-appearance-standard .mat-button-toggle-focus-overlay{background-color:var(--mat-button-toggle-state-layer-color, var(--mat-sys-on-surface))}.mat-button-toggle-appearance-standard:hover .mat-button-toggle-focus-overlay{opacity:var(--mat-button-toggle-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-button-toggle-appearance-standard.cdk-keyboard-focused .mat-button-toggle-focus-overlay{opacity:var(--mat-button-toggle-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}@media(hover: none){.mat-button-toggle-appearance-standard:hover .mat-button-toggle-focus-overlay{display:none}}.mat-button-toggle-label-content{-webkit-user-select:none;user-select:none;display:inline-block;padding:0 16px;line-height:var(--mat-button-toggle-legacy-height);position:relative}.mat-button-toggle-appearance-standard .mat-button-toggle-label-content{padding:0 12px;line-height:var(--mat-button-toggle-height, 40px)}.mat-button-toggle-label-content>*{vertical-align:middle}.mat-button-toggle-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:inherit;pointer-events:none;opacity:0;background-color:var(--mat-button-toggle-legacy-state-layer-color)}@media(forced-colors: active){.mat-button-toggle-checked .mat-button-toggle-focus-overlay{border-bottom:solid 500px;opacity:.5;height:0}.mat-button-toggle-checked:hover .mat-button-toggle-focus-overlay{opacity:.6}.mat-button-toggle-checked.mat-button-toggle-appearance-standard .mat-button-toggle-focus-overlay{border-bottom:solid 500px}}.mat-button-toggle .mat-button-toggle-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-button-toggle-button{border:0;background:none;color:inherit;padding:0;margin:0;font:inherit;outline:none;width:100%;cursor:pointer}.mat-button-toggle-animations-enabled .mat-button-toggle-button{transition:padding 150ms 45ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-button-toggle-vertical .mat-button-toggle-button{transition:none}.mat-button-toggle-disabled .mat-button-toggle-button{cursor:default}.mat-button-toggle-button::-moz-focus-inner{border:0}.mat-button-toggle-checked .mat-button-toggle-button:has(.mat-button-toggle-checkbox-wrapper){padding-left:30px}[dir=rtl] .mat-button-toggle-checked .mat-button-toggle-button:has(.mat-button-toggle-checkbox-wrapper){padding-left:0;padding-right:30px}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard{--mat-focus-indicator-border-radius: var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large))}.mat-button-toggle-group-appearance-standard:not(.mat-button-toggle-vertical) .mat-button-toggle:last-of-type .mat-button-toggle-button::before{border-top-right-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large));border-bottom-right-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large))}.mat-button-toggle-group-appearance-standard:not(.mat-button-toggle-vertical) .mat-button-toggle:first-of-type .mat-button-toggle-button::before{border-top-left-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large));border-bottom-left-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large))}.mat-button-toggle-group-appearance-standard.mat-button-toggle-vertical .mat-button-toggle:last-of-type .mat-button-toggle-button::before{border-bottom-right-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large));border-bottom-left-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large))}.mat-button-toggle-group-appearance-standard.mat-button-toggle-vertical .mat-button-toggle:first-of-type .mat-button-toggle-button::before{border-top-right-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large));border-top-left-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large))}
5
+ `],encapsulation:2,changeDetection:0})}return o})(),yn=(()=>{class o{static \u0275fac=function(i){return new(i||o)};static \u0275mod=tt({type:o});static \u0275inj=Je({imports:[Se,po,ai,Se]})}return o})();var Jl=["Core","Gauge","Component","Racing"];var Sn=(()=>{class o{_plugins=A(Jt);_widgetCategories=[...Jl];_widgetDefinition=[{name:"Numeric",description:"Displays numeric data in a clear and concise format, with options to show minimum and/or maximum recorded values. Includes an optional background minichart for quick visual trend insights.",icon:"numericWidget",minWidth:1,minHeight:1,defaultWidth:2,defaultHeight:3,category:"Core",requiredPlugins:[],selector:"widget-numeric",componentClassName:"WidgetNumericComponent"},{name:"Text",description:"Displays text data with a customizable color formatting option.",icon:"textWidget",minWidth:1,minHeight:1,defaultWidth:2,defaultHeight:3,category:"Core",requiredPlugins:[],selector:"widget-text",componentClassName:"WidgetTextComponent"},{name:"Date & Time",description:"Displays date and time data with fully custom formatting options and timezone correction.",icon:"datetimeWidget",minWidth:1,minHeight:1,defaultWidth:2,defaultHeight:3,category:"Core",requiredPlugins:[],selector:"widget-datetime",componentClassName:"WidgetDatetimeComponent"},{name:"Position",description:"Displays latitude and longitude for location tracking and navigation.",icon:"positionWidget",minWidth:1,minHeight:1,defaultWidth:2,defaultHeight:3,category:"Core",requiredPlugins:[],selector:"widget-position",componentClassName:"WidgetPositionComponent"},{name:"Static Label",description:"A static text widget that allows you to add customizable labels to your dashboard, helping to organize and clarify your layout effectively.",icon:"labelWidget",minWidth:1,minHeight:1,defaultWidth:2,defaultHeight:3,category:"Core",requiredPlugins:[],selector:"widget-label",componentClassName:"WidgetLabelComponent"},{name:"Switch Panel",description:"A switch panel group with multiple controls including toggle switches, indicator lights, and press buttons for digital switching and other operations.",icon:"switchpanelWidget",minWidth:1,minHeight:1,defaultWidth:2,defaultHeight:3,category:"Core",requiredPlugins:[],selector:"widget-boolean-switch",componentClassName:"WidgetBooleanSwitchComponent"},{name:"Slider",description:"A range slider that allows users to adjust values, such as controlling lighting intensity from 0% to 100%.",icon:"sliderWidget",minWidth:1,minHeight:1,defaultWidth:2,defaultHeight:3,category:"Core",requiredPlugins:[],selector:"widget-slider",componentClassName:"WidgetSliderComponent"},{name:"Compact Linear",description:"A simple horizontal linear gauge with a large value label offering a clean, compact modern look.",icon:"simpleLinearGauge",minWidth:1,minHeight:1,defaultWidth:2,defaultHeight:3,category:"Gauge",requiredPlugins:[],selector:"widget-simple-linear",componentClassName:"WidgetSimpleLinearComponent"},{name:"Linear",description:"A horizontal or vertical linear gauge that supports zone highlighting.",icon:"linearGauge",minWidth:1,minHeight:1,defaultWidth:2,defaultHeight:3,category:"Gauge",requiredPlugins:[],selector:"widget-gauge-ng-linear",componentClassName:"WidgetGaugeNgLinearComponent"},{name:"Radial",description:"A radial gauge with configurable capacity and measurement dials plus zone highlighting.",icon:"radialGauge",minWidth:1,minHeight:1,defaultWidth:2,defaultHeight:3,category:"Gauge",requiredPlugins:[],selector:"widget-gauge-ng-radial",componentClassName:"WidgetGaugeNgRadialComponent"},{name:"Compass",description:"A faceplate or card-style rotating compass gauge with multiple cardinal point indicator options.",icon:"compassGauge",minWidth:1,minHeight:1,defaultWidth:2,defaultHeight:3,category:"Gauge",requiredPlugins:[],selector:"widget-gauge-ng-compass",componentClassName:"WidgetGaugeNgCompassComponent"},{name:"Level Gauge",description:"Dual-scale heel angle indicator combining a high\u2011precision \xB15\xB0 fine level with a wide \xB140\xB0 coarse arc for fast trim tuning and broader heel / sea\u2011state monitoring.",icon:"level",minWidth:1,minHeight:1,defaultWidth:2,defaultHeight:3,category:"Gauge",requiredPlugins:[],selector:"widget-heel-gauge",componentClassName:"WidgetHeelGaugeComponent"},{name:"Pitch & Roll",description:"Horizon-style attitude indicator showing live pitch and roll degrees with smooth animation\u2014ideal for monitoring trim, heel, and sea-state response.",icon:"pitchRollGauge",minWidth:1,minHeight:1,defaultWidth:2,defaultHeight:3,category:"Gauge",requiredPlugins:[],selector:"widget-horizon",componentClassName:"WidgetHorizonComponent"},{name:"Classic Steel",description:"A traditional steel looking linear & radial gauges replica that supports range sizes and zones highlights.",icon:"steelGauge",minWidth:1,minHeight:1,defaultWidth:2,defaultHeight:3,category:"Gauge",requiredPlugins:[],selector:"widget-gauge-steel",componentClassName:"WidgetSteelGaugeComponent"},{name:"Windsteer",description:"A wind steering display that combines wind, wind sectors, heading, course over ground and next waypoint information.",icon:"windsteeringWidget",minWidth:1,minHeight:1,defaultWidth:2,defaultHeight:3,category:"Component",requiredPlugins:[],selector:"widget-wind-steer",componentClassName:"WidgetWindComponent"},{name:"Freeboard-SK",description:"Adds the Freeboard-SK chart plotter as a widget with automatic sign-in to your dashboard.",icon:"freeboardWidget",minWidth:3,minHeight:4,defaultWidth:3,defaultHeight:7,category:"Component",requiredPlugins:["freeboard-sk","tracks","resources-provider","course-provider"],selector:"widget-freeboardsk",componentClassName:"WidgetFreeboardskComponent"},{name:"Autopilot Head",description:"Provides typical autopilot controls for Signal K v1 & v2 Autopilot API devices. Requires a compatible hardware-specific Autopilot plugin for full functionality.",icon:"autopilotWidget",minWidth:2,minHeight:7,defaultWidth:2,defaultHeight:7,category:"Component",requiredPlugins:[],optionalPlugins:["autopilot","pypilot-autopilot-provider"],selector:"widget-autopilot",componentClassName:"WidgetAutopilotComponent"},{name:"Realtime Data Chart",description:"Visualizes data on a real-time chart with multiple preconfigured series including actuals, SMA and period overall averages and Min/Max. Requires the KIP Dataset to be configured.",icon:"datachartWidget",minWidth:1,minHeight:2,defaultWidth:2,defaultHeight:3,category:"Component",requiredPlugins:[],selector:"widget-data-chart",componentClassName:"WidgetDataChartComponent"},{name:"Embed Webpage Viewer",description:"Embeds external web-based applications\u2014such as Grafana graphs or other Signal K apps\u2014into your dashboard for seamless integration. Interaction is disabled by default but can be enabled.",icon:"embedWidget",minWidth:1,minHeight:1,defaultWidth:2,defaultHeight:3,category:"Component",requiredPlugins:[],selector:"widget-iframe",componentClassName:"WidgetIframeComponent"},{name:"Racesteer",description:"A dynamic race steering display that fuses polar performance data with live conditions to guide optimal steering, tacking, and gybing angles for maximum speed. Instantly compare performance against competition polars for smarter tactical decisions.",icon:"racesteeringWidget",minWidth:1,minHeight:1,defaultWidth:2,defaultHeight:3,category:"Racing",requiredPlugins:["signalk-polar-performance-plugin"],selector:"widget-racesteer",componentClassName:"WidgetRacesteerComponent"},{name:"Racer - Start Line Insight",description:"Gain a tactical advantage for racing starts: set and adjust the port and starboard ends of the start line, see your distance to the line, the favored end, and how much the line is favored or unfavored. Includes visual integration with Freeboard SK for interactive line adjustment and display.",icon:"racerlineWidget",minWidth:2,minHeight:2,defaultWidth:2,defaultHeight:2,requiredPlugins:["signalk-racer"],category:"Racing",selector:"widget-racer-line",componentClassName:"WidgetRacerLineComponent"},{name:"Racer - Start Timer",description:"An advanced racing countdown timer that indicates OCS (On Course Side) status. Set the start line, choose or adjust the duration, or specify the exact start time. Automatically switches to the target dashboard at the start unless over early.",icon:"racertimerWidget",minWidth:2,minHeight:2,defaultWidth:2,defaultHeight:2,requiredPlugins:["signalk-racer"],category:"Racing",selector:"widget-racer-timer",componentClassName:"WidgetRacerTimerComponent"},{name:"Wind Trends",description:"Real-time True Wind trends with dual top axes for direction (\xB0) and speed (knots). Displays live values and SMA over the current period\u2019s average.",icon:"windtrendsWidget",minWidth:5,minHeight:4,defaultWidth:5,defaultHeight:4,category:"Racing",requiredPlugins:[],selector:"widget-windtrends-chart",componentClassName:"WidgetWindTrendsChartComponent"},{name:"Countdown Timer",description:"A simple race start countdown timer that can be started, paused, synced, reset, and configured for duration.",icon:"racetimerWidget",minWidth:3,minHeight:3,defaultWidth:3,defaultHeight:4,category:"Racing",requiredPlugins:[],selector:"widget-racetimer",componentClassName:"WidgetRaceTimerComponent"}];get kipWidgets(){return this._widgetDefinition}get categories(){return this._widgetCategories}getKipWidgetsWithStatus(){return L(this,null,function*(){let e={},i=Array.from(new Set(this._widgetDefinition.flatMap(t=>[...t.requiredPlugins||[],...t.optionalPlugins||[]])));return yield Promise.all(i.map(t=>L(this,null,function*(){e[t]=yield this._plugins.isEnabled(t)}))),this._widgetDefinition.map(t=>{let r=t.requiredPlugins||[],c=t.optionalPlugins||[],p=r.map(G=>({name:G,enabled:e[G],required:!0})),C=c.map(G=>({name:G,enabled:e[G],required:!1})),w=[...p,...C],x=p.every(G=>G.enabled);return x&&c.length>0&&(x=C.some(G=>G.enabled)),Ze(we({},t),{isDependencyValid:x,pluginsStatus:w})})})}static \u0275fac=function(i){return new(i||o)};static \u0275prov=Ge({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})();function $l(o,d){o&1&&(a(0,"span"),l(1,", "),n())}function er(o,d){if(o&1&&(a(0,"span",8),l(1),a(2,"span",9),l(3),n()(),u(4,$l,2,0,"span")),o&2){let e=d.$implicit,i=d.$index,t=d.$count,r=f(2);m("ngClass",r.pluginDependencyValid()?e.required?"":e.enabled?"dependency-optional-present-met":"dependency-optional-missing-met":e.enabled?e.required?"dependency-required-ok":"dependency-optional-ok":e.required?"dependency-required-error":"dependency-optional-error"),K("title",e.required?"Required":"Optional"),s(),lt(" ",e.enabled?"\u2714":"\u2716"," ",e.name," "),s(2),E(e.required?"":"(optional)"),s(),g(i!==t-1?4:-1)}}function tr(o,d){if(o&1&&(a(0,"div",7)(1,"span"),l(2,"Plugins:"),n(),S(3,er,5,6,null,null,k),n()),o&2){let e=f();nt(e.pluginsStatus().length>0?"margin-bottom: 8px;margin-top: 4px;":""),s(),at(e.pluginDependencyValid()?"":"dependency-error"),s(2),T(e.pluginsStatus())}}var Tn=(()=>{class o{svgIcon=h.required();iconSize=h.required();name=h.required();description=h.required();pluginsStatus=h.required();pluginDependencyValid=h.required();onKeydown(e){(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),e.target.click())}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=v({type:o,selectors:[["widget-list-card"]],hostBindings:function(i,t){i&1&&_("keydown",function(c){return t.onKeydown(c)})},inputs:{svgIcon:[1,"svgIcon"],iconSize:[1,"iconSize"],name:[1,"name"],description:[1,"description"],pluginsStatus:[1,"pluginsStatus"],pluginDependencyValid:[1,"pluginDependencyValid"]},decls:9,vars:11,consts:[["role","button","tabindex","0",1,"item-container"],[1,"item-icon"],["aria-hidden","false",3,"svgIcon"],[1,"item-label"],[1,"title","no-text-select"],[1,"dependency","no-text-select",3,"style"],[1,"description","no-text-select"],[1,"dependency","no-text-select"],[3,"ngClass"],[1,"plugin-type-label"]],template:function(i,t){i&1&&(a(0,"div",0)(1,"div",1),b(2,"mat-icon",2),n(),a(3,"div",3)(4,"p",4),l(5),n(),u(6,tr,5,4,"div",5),a(7,"span",6),l(8),n()()()),i&2&&(K("aria-disabled",t.pluginDependencyValid()?null:"true"),s(2),ot("width",t.iconSize(),"px")("height",t.iconSize(),"px"),m("svgIcon",t.svgIcon()),s(2),nt(t.pluginsStatus().length>0?"margin-bottom:0px; margin-top: 4px":""),s(),E(t.name()),s(),g(t.pluginsStatus().length>0?6:-1),s(2),E(t.description()))},dependencies:[Ut,Zi,J,R],styles:["[_nghost-%COMP%]{display:block;text-align:center;-webkit-tap-highlight-color:rgba(0,0,0,0);cursor:pointer;padding:0}.item-container[_ngcontent-%COMP%]{display:flex;flex-direction:row;flex-wrap:nowrap;align-items:stretch;width:100%;height:100%;margin:0;padding:15px;border:solid 1px var(--mat-sys-outline);cursor:pointer}.item-container[_ngcontent-%COMP%]:hover{background-color:var(--mat-sys-inverse-on-surface)}.item-container[_ngcontent-%COMP%]:focus-visible{background-color:var(--mat-sys-surface-bright);outline:-webkit-focus-ring-color auto 0px}.item-icon[_ngcontent-%COMP%]{width:48px}.item-label[_ngcontent-%COMP%]{width:calc(100% - 48px);text-align:left;padding-left:15px}.title[_ngcontent-%COMP%]{font-size:var(--mat-sys-label-medium-line-height)}.description[_ngcontent-%COMP%]{color:var(--mat-sys-outline)}.dependency[_ngcontent-%COMP%]{color:var(--mat-sys-outline);text-align:start;font-style:italic;font-size:var(--mat-sys-label-large-size)}.dependency-error[_ngcontent-%COMP%]{color:var(--kip-port-color);font-weight:700}.dependency-required-ok[_ngcontent-%COMP%]{color:var(--kip-starboard-color);font-weight:700}.dependency-required-error[_ngcontent-%COMP%]{color:var(--kip-port-color);font-weight:700;text-decoration:underline}.dependency-optional-ok[_ngcontent-%COMP%]{color:var(--kip-starboard-color)}.dependency-optional-error[_ngcontent-%COMP%]{color:var(--kip-port-color)}.dependency-optional-missing-met[_ngcontent-%COMP%]{color:var(--mat-sys-outline);text-decoration:line-through}.dependency-optional-present-met[_ngcontent-%COMP%]{color:var(--mat-sys-outline)}.plugin-type-label[_ngcontent-%COMP%]{font-size:.8em;margin-left:2px;opacity:.7}.dependency-ok[_ngcontent-%COMP%]{color:var(--kip-starboard-color)}.no-text-select[_ngcontent-%COMP%]{-webkit-user-select:none;user-select:none}"]})}return o})();var ir=(o,d)=>d.selector;function or(o,d){if(o&1&&(a(0,"mat-button-toggle",1),l(1),n()),o&2){let e=d.$implicit;m("value",e),s(),U(" ",e," ")}}function nr(o,d){if(o&1){let e=D();a(0,"widget-list-card",3),_("click",function(){let t=M(e).$implicit,r=f();return y(r.onSelectWidget(t))}),n()}if(o&2){let e=d.$implicit;te("dependency-missing",!e.isDependencyValid),m("svgIcon",e.icon)("iconSize",48)("name",e.name)("description",e.description)("pluginDependencyValid",e.isDependencyValid)("pluginsStatus",e.pluginsStatus)}}var xn=(()=>{class o{_dialogRef=A(Ae);_widgets=A(Sn);_widgetsList=[];filteredWidgetsList=I([]);_widgetCategory=I("Core");isDependencyValid=I(!0);ngOnInit(){this.loadWidgets()}loadWidgets(){return L(this,null,function*(){this._widgetsList=yield this._widgets.getKipWidgetsWithStatus(),this.filteredWidgetsList.set(this._widgetsList.filter(e=>e.category===this._widgetCategory()))})}onCategoryChange(e){this.filteredWidgetsList.set(this._widgetsList.filter(i=>i.category===e.value)),this._widgetCategory.set(e.value)}onSelectWidget(e){if(!e.isDependencyValid)return;let{name:i,description:t,icon:r,minWidth:c,minHeight:p,defaultWidth:C,defaultHeight:w,category:x,requiredPlugins:G,optionalPlugins:Ue,selector:qe,componentClassName:It}=e,Qe=Ze(we({name:i,description:t,icon:r,minWidth:c,minHeight:p,defaultWidth:C,defaultHeight:w,category:x,requiredPlugins:G},Ue?{optionalPlugins:Ue}:{}),{selector:qe,componentClassName:It});this._dialogRef.close(Qe)}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=v({type:o,selectors:[["widgets-list"]],decls:7,vars:1,consts:[["name","widgetCategories","aria-label","Widget categories",1,"list-filter",3,"change","value"],[3,"value"],[3,"dependency-missing","svgIcon","iconSize","name","description","pluginDependencyValid","pluginsStatus"],[3,"click","svgIcon","iconSize","name","description","pluginDependencyValid","pluginsStatus"]],template:function(i,t){i&1&&(a(0,"div")(1,"mat-button-toggle-group",0),_("change",function(c){return t.onCategoryChange(c)}),S(2,or,2,2,"mat-button-toggle",1,k),n(),a(4,"div"),S(5,nr,1,8,"widget-list-card",2,ir),n()()),i&2&&(s(),m("value",t._widgetCategory()),s(),T(t._widgets.categories),s(3),T(t.filteredWidgetsList()))},dependencies:[yn,hi,ai,Tn],styles:[".list-filter[_ngcontent-%COMP%]{margin-bottom:20px}.dependency-missing[_ngcontent-%COMP%]{pointer-events:none;opacity:.8;background-color:var(--mat-sys-neutral10)}"]})}return o})();var wn=(()=>{class o{dialogRef=A(Ae);fileVersionToUpgrade=9;configVersionToUpgrade=10;currentConfigVersion=11;_storage=A(eo);_settings=A(qt);static widgetTypeToSelectorMap={WidgetNumeric:"widget-numeric",WidgetTextGeneric:"widget-text",WidgetDateGeneric:"widget-datetime",WidgetBooleanSwitch:"widget-boolean-switch",WidgetBlank:"widget-blank",WidgetStateComponent:"widget-button",WidgetSimpleLinearComponent:"widget-simple-linear",WidgetGaugeNgLinearComponent:"widget-gauge-ng-linear",WidgetGaugeNgRadialComponent:"widget-gauge-ng-radial",WidgetGaugeNgCompassComponent:"widget-gauge-ng-compass",WidgetGaugeComponent:"widget-gauge-steel",WidgetWindComponent:"widget-wind-steer",WidgetFreeboardskComponent:"widget-freeboardsk",WidgetAutopilotComponent:"widget-autopilot",WidgetDataChart:"widget-data-chart",WidgetRaceTimerComponent:"widget-racetimer",WidgetIframeComponent:"widget-iframe",WidgetTutorial:"widget-tutorial"};upgrade(){if(this._storage.initConfig)this._storage.listConfigs(this.fileVersionToUpgrade).then(e=>L(this,null,function*(){for(let i of e){let t=yield this.transformConfig(i);if(t)if(t.scope==="global")try{this._storage.patchGlobal(t.name,t.scope,t.newConfiguration,"add"),this._storage.patchGlobal(t.name,t.scope,t.oldConfiguration,"replace",9),console.log(`[Upgrade] Configuration ${t.scope}/${t.name} has been upgraded to version ${this.currentConfigVersion} and saved. Old configuration has been patched to version 0.`)}catch{console.error(`[Upgrade] Error saving configuration for ${i.name}`)}else this._storage.setConfig(t.scope,t.name,t.newConfiguration).then(()=>{this._storage.setConfig(t.scope,t.name,t.oldConfiguration,9),console.log(`[Upgrade] Configuration ${t.scope}/${t.name} has been upgraded to version ${this.currentConfigVersion} and saved. Old configuration has been patched to version 0.`)}).catch(r=>{console.error(`[Upgrade] Error saving configuration for ${i.name}:`,r)})}})).catch(e=>{console.error("Error fetching configuration data:",e)});else{let e={app:null,widget:null,layout:null,theme:null};e.app=this._settings.loadConfigFromLocalStorage("appConfig"),e.widget=this._settings.loadConfigFromLocalStorage("widgetConfig"),e.layout=this._settings.loadConfigFromLocalStorage("layoutConfig"),e.theme=this._settings.loadConfigFromLocalStorage("themeConfig");let i=this.transformApp(e.app),t=this.transformTheme(e.theme),r=e.layout?.rootSplits||[],c=e.layout?.splitSets||[],p=e.widget?.widgets||[],C=r.map((w,x)=>{let G=this.extractWidgetsFromSplitSets(c,p,w);return{id:w,name:`Dashboard ${x+1}`,configuration:G}});localStorage.setItem("appConfig",JSON.stringify(i)),localStorage.setItem("dashboardsConfig",JSON.stringify(C)),localStorage.setItem("themeConfig",JSON.stringify(t))}setTimeout(()=>{this._settings.reloadApp()},1500)}transformConfig(e){return L(this,null,function*(){let i=yield this._storage.getConfig(e.scope,e.name,this.fileVersionToUpgrade);if(i.app.configVersion!==this.configVersionToUpgrade)return console.error(`[Upgrade Component] Configuration ${e.scope}/${e.name} is not an upgradable version ${this.configVersionToUpgrade} config. Skipping upgrade. Please delete old configuration files.`),null;let t=this.transformApp(i.app),r=this.transformTheme(i.theme),c=i.layout?.rootSplits||[],p=i.layout?.splitSets||[],C=i.widget?.widgets||[],w=c.map((G,Ue)=>{let qe=this.extractWidgetsFromSplitSets(p,C,G);return{id:G,name:`Dashboard ${Ue+1}`,configuration:qe}}),x=to(i);return x.app.configVersion=0,{scope:e.scope,name:e.name,newConfiguration:{app:t,theme:r,dashboards:w},oldConfiguration:x}})}transformWidget(e,i){if(e.color==="white"&&(e.color="contrast"),e.textColor){switch(e.textColor){case"text":e.color="contrast";break;case"primary":e.color="blue";break;case"accent":e.color="yellow";break;case"warn":e.color="purple";break;case"nobar":i==="WidgetGaugeNgLinearComponent"&&(e.color="blue",e.gauge=e.gauge||{},e.gauge.useNeedle=!1);break;default:e.color=e.textColor}delete e.textColor}return e}transformApp(e){return e?(e.configVersion=11,e.nightModeBrightness=.27,e):null}transformTheme(e){return e?{themeName:""}:null}extractWidgetsFromSplitSets(e,i,t){let r=new Map(i.map(Qe=>[Qe.uuid,Qe])),c=[],p=[],C=0,w=0,x=12,G=12,Ue=2,qe=2,It=Qe=>{let Mi=e.find(Ye=>Ye.uuid===Qe);if(!Mi){p.push(`Missing splitSet with UUID: ${Qe}`);return}Mi.splitAreas.forEach(Ye=>{if(Ye.type==="widget"){let ve=r.get(Ye.uuid);if(ve){if(ve.type==="WidgetBlank"){console.warn(`Skipping widget of type WidgetBlank with UUID: ${ve.uuid}`);return}if(w+qe>G){p.push(`No space left in the grid for widget with UUID: ${ve.uuid}`);return}let yi=o.widgetTypeToSelectorMap[ve.type]||"widget-unknown",On=this.transformWidget(ve.config,ve.type);c.push({id:ve.uuid,selector:yi,input:{widgetProperties:{type:yi,uuid:ve.uuid,config:On}},x:C,y:w,w:Ue,h:qe}),C+=Ue,C>=x&&(C=0,w+=qe)}else p.push(`Missing widget with UUID: ${Ye.uuid}`)}else Ye.type==="splitSet"&&It(Ye.uuid)})};return It(t),p.length>0&&console.warn("Transformation Issues:",p),c}startFresh(){if(this._storage.initConfig)this._storage.listConfigs(this.fileVersionToUpgrade).then(e=>L(this,null,function*(){for(let i of e){let t=yield this._storage.getConfig(i.scope,i.name,this.fileVersionToUpgrade);if(t.app.configVersion=0,i.scope==="global")try{setTimeout(()=>{this._storage.patchGlobal(i.name,i.scope,t,"replace",9),console.log(`[Retired] Configuration ${i.scope}/${i.name} has been patched to version 0.`)},750)}catch{console.error(`[Upgrade] Error saving configuration for ${i.name}:`)}else try{yield this._storage.setConfig(i.scope,i.name,t,9),console.log(`[Retired] Configuration ${i.scope}/${i.name} has been patched to version 0.`)}catch{console.error(`[Upgrade] Error saving configuration for ${i.name}.`)}}})).catch(e=>{console.error("Error fetching configuration data:",e)});else{let e={app:null,dashboards:null,theme:null};e.app=this._settings.loadConfigFromLocalStorage("appConfig"),e.theme=this._settings.loadConfigFromLocalStorage("themeConfig"),e.app.configVersion=11,e.app.nightModeBrightness=.27,e.theme.themeName="",localStorage.setItem("appConfig",JSON.stringify(e.app)),localStorage.setItem("themeConfig",JSON.stringify(e.theme)),localStorage.removeItem("widgetConfig"),localStorage.removeItem("layoutConfig")}this.dialogRef.close()}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=v({type:o,selectors:[["upgrade-config"]],decls:193,vars:0,consts:[[1,"warning"],[1,"nav-table"],[2,"font-size","x-large"],["href","https://discord.gg/AMDYT2DQga","target","_blank"],[1,"button-group"],["mat-flat-button","",3,"click"],["mat-flat-button","",2,"margin-left","20px",3,"click"]],template:function(i,t){i&1&&(a(0,"h2"),l(1,"All New Touch, Mouse, and Keyboard Navigation"),n(),a(2,"p",0)(3,"strong"),l(4,"Heads up:"),n(),l(5," The new version introduces a completely redesigned fullscreen interface with no navigation bar. Please review the input modes table below to get an understanding of the new ways to operate KIP before upgrading. After the upgrade, give yourself time to get comfortable with the changes."),n(),a(6,"table",1)(7,"thead")(8,"tr")(9,"th"),l(10,"Actions"),n(),a(11,"th"),l(12,"Touch"),n(),a(13,"th"),l(14,"Mouse"),n(),a(15,"th"),l(16,"Keyboard Shortcuts"),n()()(),a(17,"tbody")(18,"tr")(19,"td"),l(20,"Open Actions menu"),n(),a(21,"td"),l(22,"Swipe left"),n(),a(23,"td"),l(24,"Click, drag left, and release"),n(),a(25,"td")(26,"kbd"),l(27,"Shift"),n(),l(28," + "),a(29,"kbd"),l(30,"Ctrl"),n(),l(31," + "),a(32,"kbd",2),l(33,"\u2190"),n(),l(34," (Left Arrow)"),n()(),a(35,"tr")(36,"td"),l(37,"Open Notification menu"),n(),a(38,"td"),l(39,"Swipe right"),n(),a(40,"td"),l(41,"Click, drag right, and release"),n(),a(42,"td")(43,"kbd"),l(44,"Shift"),n(),l(45," + "),a(46,"kbd"),l(47,"Ctrl"),n(),l(48," + "),a(49,"kbd",2),l(50,"\u2192"),n(),l(51," (Right Arrow)"),n()(),a(52,"tr")(53,"td"),l(54,"Cycle through dashboards"),n(),a(55,"td"),l(56,"Swipe up/down"),n(),a(57,"td"),l(58,"Click, drag up/down, and release"),n(),a(59,"td")(60,"kbd"),l(61,"Shift"),n(),l(62," + "),a(63,"kbd"),l(64,"Ctrl"),n(),l(65," + "),a(66,"kbd",2),l(67,"\u2191"),n(),l(68,"/"),a(69,"kbd",2),l(70,"\u2193"),n(),l(71," (Up/Down Arrow)"),n()(),a(72,"tr")(73,"td"),l(74,"Toggle Fullscreen"),n(),a(75,"td"),l(76,"N/A"),n(),a(77,"td"),l(78,"N/A"),n(),a(79,"td")(80,"kbd"),l(81,"Shift"),n(),l(82," + "),a(83,"kbd"),l(84,"Ctrl"),n(),l(85," + "),a(86,"kbd"),l(87,"F"),n()()(),a(88,"tr")(89,"td"),l(90,"Toggle Night mode"),n(),a(91,"td"),l(92,"N/A"),n(),a(93,"td"),l(94,"N/A"),n(),a(95,"td")(96,"kbd"),l(97,"Shift"),n(),l(98," + "),a(99,"kbd"),l(100,"Ctrl"),n(),l(101," + "),a(102,"kbd"),l(103,"N"),n()()(),a(104,"tr")(105,"td"),l(106,"Toggle dashboard edit mode"),n(),a(107,"td"),l(108,"N/A"),n(),a(109,"td"),l(110,"N/A"),n(),a(111,"td")(112,"kbd"),l(113,"Shift"),n(),l(114," + "),a(115,"kbd"),l(116,"Ctrl"),n(),l(117," + "),a(118,"kbd"),l(119,"E"),n()()()()(),a(120,"i"),l(121,"Note that the words Touch and Tap are synonymous with mouse click."),n(),b(122,"br")(123,"br"),a(124,"h2"),l(125,"Migration Limitations"),n(),a(126,"p")(127,"span",0),l(128,"Important:"),n(),l(129," The new widget layout engine is "),a(130,"strong"),l(131,"completely different"),n(),l(132," from the previous version. When you upgrade, your configuration will be migrated, but "),a(133,"strong"),l(134,"the way dashboards and widgets are arranged will change significantly"),n(),l(135,`.
6
6
  `),n(),a(136,"ul")(137,"li"),l(138,"All KIP configuration settings will be migrated."),n(),a(139,"li"),l(140,"Each v2 Page layout will become a v3 Dashboard."),n(),a(141,"li"),l(142,"All widgets and their settings will appear in their new dashboards."),n(),a(143,"li")(144,"span",0)(145,"strong"),l(146,"Note:"),n(),l(147," Widget positions, order, and sizes "),a(148,"strong"),l(149,"WILL BE LOST"),n(),l(150,". After upgrading, dashboards will contain small widgets that you must reposition and resize manually."),n()()(),a(151,"p"),l(152,"To upgrade your configuration, follow these steps:"),n(),a(153,"ol")(154,"li"),l(155," As a safety measure, if you are using Signal K authentication, manually back up your configuration. Make a copy of the "),a(156,"code"),l(157,"9.0.0.json"),n(),l(158," files found on the Signal K server in the following folders: "),a(159,"ul")(160,"li")(161,"code"),l(162,"~/.signalk/applicationData/users/(username)/kip/"),n()(),a(163,"li")(164,"code"),l(165,"~/.signalk/applicationData/global/kip/"),n()()()(),a(166,"li"),l(167,"Click the "),a(168,"strong"),l(169,"Upgrade"),n(),l(170," button below."),n(),a(171,"li"),l(172,"Once the upgrade is complete, KIP will restart and display the migrated dashboards."),n(),a(173,"li"),l(174,"Reposition and resize your widgets as needed."),n(),a(175,"li"),l(176,"Once satisfied, delete the "),a(177,"code"),l(178,"9.0.0.json"),n(),l(179," configuration files located in the previously mentioned folders. They are not needed any more."),n()(),a(180,"p"),l(181," For tips and guidance, consult KIP\u2019s in-app "),a(182,"strong"),l(183,"Help"),n(),l(184," section. Most common questions are answered there. If you need support, join the "),a(185,"a",3),l(186,"Signal K #kip Discord channel"),n(),l(187,`.
7
- `),n(),a(188,"div",4)(189,"button",5),_("click",function(){return t.upgrade()}),l(190,"Upgrade"),n(),a(191,"button",6),_("click",function(){return t.startFresh()}),l(192,"Start Fresh"),n()())},dependencies:[ne,ee,ce],styles:[".button-group[_ngcontent-%COMP%]{display:flex;justify-content:center}.nav-table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse;margin-bottom:2em}.nav-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .nav-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{border:1px solid #bbb;padding:.5em 1em;text-align:center}.nav-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{background:#ddd;color:#222;font-weight:700}.nav-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:nth-child(2n){background:#242424}.warning[_ngcontent-%COMP%]{color:#b71c1c}.button-group[_ngcontent-%COMP%]{margin-top:2em;display:flex;gap:20px}"]})}return o})();var ar=(o,d)=>d.id;function lr(o,d){if(o&1){let e=I();a(0,"div",2),_("click",function(){let t=M(e).$implicit,r=f();return y(r.selectIcon(t.id))})("keydown.enter",function(){let t=M(e).$implicit,r=f();return y(r.selectIcon(t.id))})("keydown.space",function(t){let r=M(e).$implicit;return f().selectIcon(r.id),y(t.preventDefault())}),a(1,"div",3),b(2,"mat-icon",4),n()()}if(o&2){let e=d.$implicit,i=f();te("selected",i.selected()===e.id),K("aria-label","Select "+e.id+" icon"),s(2),ot("width",64,"px")("height",64,"px"),m("svgIcon",e.id)}}var En=(()=>{class o{iconFile=h("assets/svg/icons.svg");currentIcon=h("");selectedIcon=q();icons=P([]);selected=P("");constructor(){this.loadIcons(),Rt(()=>{let e=this.currentIcon();qi(()=>{e&&this.selected()!==e&&this.selected.set(e)})})}loadIcons(){return L(this,null,function*(){try{let i=yield(yield fetch(this.iconFile())).text(),c=new DOMParser().parseFromString(i,"image/svg+xml").querySelector("defs");if(!c)return;let g=c.querySelectorAll("svg"),C=[];g.forEach(x=>{let G=x.getAttribute("id");G&&G.startsWith("dashboard-")&&C.push({id:G})}),this.icons.set(C);let w=this.currentIcon();w&&this.selected.set(w)}catch(e){console.error("Error loading icons:",e)}})}selectIcon(e){this.selected.set(e),this.selectedIcon.emit(e)}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=v({type:o,selectors:[["select-icon"]],inputs:{iconFile:[1,"iconFile"],currentIcon:[1,"currentIcon"]},outputs:{selectedIcon:"selectedIcon"},decls:3,vars:0,consts:[[1,"icon-grid"],["tabindex","0",1,"icon-item",3,"selected"],["tabindex","0",1,"icon-item",3,"click","keydown.enter","keydown.space"],[1,"icon-container"],["aria-hidden","false",3,"svgIcon"]],template:function(i,t){i&1&&(a(0,"div",0),S(1,lr,3,8,"div",1,ar),n()),i&2&&(s(),T(t.icons()))},dependencies:[Ut,J,R],styles:[".icon-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fill,minmax(80px,1fr));gap:16px;padding:16px;max-height:400px;overflow-y:auto}.icon-item[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;padding:8px;border:2px solid transparent;border-radius:8px;cursor:pointer;transition:border-color .2s ease;background-color:var(--mat-sys-surface-container-low)}.icon-item[_ngcontent-%COMP%]:hover{border-color:var(--mat-sys-outline-variant)}.icon-item.selected[_ngcontent-%COMP%]{background-color:var(--mat-sys-on-tertiary)}.icon-item[_ngcontent-%COMP%]:focus{outline:2px solid var(--mat-sys-tertiary);outline-offset:2px}.icon-container[_ngcontent-%COMP%]{width:64px;height:64px;display:flex;align-items:center;justify-content:center;overflow:hidden}.icon-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{width:100%;height:100%;fill:currentColor}"]})}return o})();function rr(o,d){if(o&1&&(a(0,"button",12),l(1),n()),o&2){let e=f(),i=oe(1);m("disabled",!i.valid),s(),E(e.data.confirmBtnText)}}var Gn=(()=>{class o{dialogRef=A(me);data=A(Ae);constructor(){this.data.icon||(this.data.icon="dashboard-dashboard")}save(){this.dialogRef.close(this.data)}onIconSelected(e){this.data.icon=e}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=v({type:o,selectors:[["dialog-dashboard-page-editor"]],decls:23,vars:8,consts:[["name","ngForm"],["name","name",3,"ngSubmit"],[1,"dialogue-header"],["mat-dialog-title",""],["mat-icon-button","",1,"dialog-close-icon",3,"mat-dialog-close"],[1,"field-margin"],["matInput","","type","text","id","name","placeholder","Name","name","name","required","","cdkFocusInitial","",3,"ngModelChange","ngModel"],[1,"field-margin","icon-section"],[2,"font-size","1.2em"],[3,"selectedIcon","iconFile","currentIcon"],["align","end"],["mat-flat-button","",3,"mat-dialog-close"],["mat-flat-button","","type","submit",3,"disabled"]],template:function(i,t){if(i&1){let r=I();a(0,"form",1,0),_("ngSubmit",function(){return M(r),y(t.save())}),a(2,"div",2)(3,"h5",3),l(4),n(),a(5,"button",4)(6,"mat-icon"),l(7,"close"),n()()(),a(8,"mat-dialog-content")(9,"mat-form-field",5)(10,"mat-label"),l(11,"Name"),n(),a(12,"input",6),Nt("ngModelChange",function(g){return M(r),Lt(t.data.name,g)||(t.data.name=g),y(g)}),n(),a(13,"mat-error"),l(14," A name is required "),n()(),a(15,"div",7)(16,"span",8),l(17,"Icon"),n(),a(18,"select-icon",9),_("selectedIcon",function(g){return M(r),y(t.onIconSelected(g))}),n()()(),a(19,"mat-dialog-actions",10)(20,"button",11),l(21),n(),u(22,rr,2,2,"button",12),n()()}i&2&&(s(4),E(t.data.title),s(),m("mat-dialog-close",!1),s(7),Vt("ngModel",t.data.name),s(6),m("iconFile","assets/svg/icons.svg")("currentIcon",t.data.icon),s(2),m("mat-dialog-close",!1),s(),E(t.data.cancelBtnText),s(),p(t.data.confirmBtnText?22:-1))},dependencies:[ne,ue,pe,Ve,ge,J,R,le,V,B,ut,he,z,ee,ce,$,j,ct,Q,F,H,O,jt,Zt,En],styles:[".dialogue-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:baseline}.dialog-close-icon[_ngcontent-%COMP%]{margin-right:15px}.mat-mdc-dialog-content[_ngcontent-%COMP%]{max-height:max-content}.field-margin[_ngcontent-%COMP%]{margin-left:15px;margin-bottom:15px}.icon-section[_ngcontent-%COMP%] .mat-label[_ngcontent-%COMP%]{display:block;margin-bottom:8px;color:var(--mat-sys-on-surface);font-size:14px;font-weight:400}"]})}return o})();var Xm=(()=>{class o{dialog=A(Go);openFrameDialog(e,i){switch(e.component){case"select-widget":e.componentType=xn;break;case"upgrade-config":e.componentType=wn;break}return this.dialog.open(en,{data:e,height:i?"calc(100% - 30px)":"",width:i?"calc(100% - 30px)":"",maxWidth:i?"100%":"",maxHeight:i?"100%":""}).afterClosed()}openConfirmationDialog(e){return this.dialog.open(tn,{data:e,minWidth:"35vw",minHeight:"25vh"}).afterClosed()}openNameDialog(e){return this.dialog.open(on,{data:e,minWidth:"20vw",minHeight:"20vh",disableClose:!1})}openDashboardPageEditorDialog(e){return this.dialog.open(Gn,{data:e,minWidth:"60vw",maxWidth:"90vw",maxHeight:"95vh",disableClose:!1})}openWidgetOptions(e){return this.dialog.open(_n,{data:e.config,minWidth:"50vw",maxWidth:"90vw"})}static \u0275fac=function(i){return new(i||o)};static \u0275prov=Ee({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})();var kn=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],Te=(()=>{if(typeof document>"u")return!1;let o=kn[0],d={};for(let e of kn)if(e?.[1]in document){for(let[t,r]of e.entries())d[o[t]]=r;return d}return!1})(),In={change:Te.fullscreenchange,error:Te.fullscreenerror},ie={request(o=document.documentElement,d){return new Promise((e,i)=>{let t=()=>{ie.off("change",t),e()};ie.on("change",t);let r=o[Te.requestFullscreen](d);r instanceof Promise&&r.then(t).catch(i)})},exit(){return new Promise((o,d)=>{if(!ie.isFullscreen){o();return}let e=()=>{ie.off("change",e),o()};ie.on("change",e);let i=document[Te.exitFullscreen]();i instanceof Promise&&i.then(e).catch(d)})},toggle(o,d){return ie.isFullscreen?ie.exit():ie.request(o,d)},onchange(o){ie.on("change",o)},onerror(o){ie.on("error",o)},on(o,d){let e=In[o];e&&document.addEventListener(e,d,!1)},off(o,d){let e=In[o];e&&document.removeEventListener(e,d,!1)},raw:Te};Object.defineProperties(ie,{isFullscreen:{get:()=>!!document[Te.fullscreenElement]},element:{enumerable:!0,get:()=>document[Te.fullscreenElement]??void 0},isEnabled:{enumerable:!0,get:()=>!!document[Te.fullscreenEnabled]}});Te||(ie={isEnabled:!1});var de=ie;var sr="data:video/webm;base64,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",dr="data:video/mp4;base64,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",hi=class{constructor(){this.enabled=!1}enable(){throw new Error("NoSleep using SSR/no-op mode; do not call enable.")}disable(){throw new Error("NoSleep using SSR/no-op mode; do not call disable.")}},bi=class{constructor(){this.enabled=!1;let d=()=>this.wakeLock&&document.visibilityState==="visible"&&this.enable();document.addEventListener("visibilitychange",d),document.addEventListener("fullscreenchange",d)}enable(){return L(this,null,function*(){try{this.wakeLock=yield navigator.wakeLock.request("screen"),this.enabled=!0,console.debug("Wake Lock active."),this.wakeLock.addEventListener("release",()=>{console.debug("Wake Lock released.")})}catch(d){this.enabled=!1,d instanceof Error&&console.error(`${d.name}, ${d.message}`)}})}disable(){var d;(d=this.wakeLock)==null||d.release(),this.wakeLock=void 0,this.enabled=!1}},Ci=class{constructor(){var d;this.enabled=!1,this.noSleepVideo=document.createElement("video"),this.noSleepVideo.setAttribute("title","No Sleep"),this.noSleepVideo.setAttribute("playsinline",""),this._addSourceToVideo(this.noSleepVideo,"webm",sr),this._addSourceToVideo(this.noSleepVideo,"mp4",dr),Object.assign(this.noSleepVideo.style,{position:"absolute",left:"-100%",top:"-100%"}),(d=document.querySelector("body"))==null||d.append(this.noSleepVideo),this.noSleepVideo.addEventListener("loadedmetadata",()=>{this.noSleepVideo.duration<=1?this.noSleepVideo.setAttribute("loop",""):this.noSleepVideo.addEventListener("timeupdate",()=>{this.noSleepVideo.currentTime>.5&&(this.noSleepVideo.currentTime=Math.random())})})}_addSourceToVideo(d,e,i){let t=document.createElement("source");t.src=i,t.type=`video/${e}`,d.appendChild(t)}enable(){return L(this,null,function*(){let d=this.noSleepVideo.play();try{let e=yield d;return this.enabled=!0,e}catch(e){this.enabled=!1,e instanceof Error&&console.error(`${e.name}, ${e.message}`)}})}disable(){this.noSleepVideo.pause(),this.enabled=!1}},Dn=typeof navigator>"u"?hi:"wakeLock"in navigator&&!navigator.standalone?bi:Ci;var aA=(()=>{class o{isDragging=P(!1);fullscreenStatus=P(!1);fullscreenSupported=P(!0);noSleepStatus=P(!1);noSleepSupported=P(!0);noSleep=null;initialTouchX=null;initialTouchY=null;hotkeyListeners=new Map;boundPreventGestures=null;fullscreenChangeHandler=()=>{if(this.fullscreenStatus.set(de.isFullscreen),!de.isFullscreen&&this.noSleep&&this.noSleepStatus()){try{this.noSleep.disable()}catch{}this.noSleepStatus.set(!1)}};constructor(){window.__KIP_TEST__?(this.fullscreenSupported.set(!1),this.noSleepSupported.set(!1)):(de.isEnabled?de.on("change",this.fullscreenChangeHandler):(this.fullscreenSupported.set(!1),console.log("[UI Event Service] Fullscreen mode is not supported by device/browser.")),this.checkNoSleepSupport(),this.checkPwaMode()&&this.noSleepSupported()&&!this.noSleepStatus()&&this.toggleNoSleep())}checkNoSleepSupport(){try{if(this.noSleep||(this.noSleep=new Dn),!this.noSleep||typeof this.noSleep.enable!="function"||typeof this.noSleep.disable!="function")throw new Error("[UI Event Service] NoSleep methods not available")}catch(e){this.noSleepSupported.set(!1),console.warn(`[UI Event Service] NoSleep is not supported by this device/browser. Error: ${e}`),this.noSleep=null}}checkPwaMode(){let e=window.matchMedia("(display-mode: standalone)").matches||window.navigator.standalone!==void 0;return console.log("[UI Event Service] PWA mode:",e),e}toggleNoSleep(){if(this.noSleepSupported()){if(this.noSleepStatus())try{this.noSleep?.disable()}catch{}else{this.noSleep||this.checkNoSleepSupport();try{this.noSleep?.enable()}catch(e){console.warn("[UI Event Service] Failed to enable NoSleep:",e)}}this.noSleepStatus.set(!this.noSleepStatus()),console.log("[UI Event Service] NoSleep active:",this.noSleepStatus())}}toggleFullScreen(){if(de.isEnabled){if(this.fullscreenStatus()){if(de.isFullscreen&&de.exit(),this.noSleepStatus()){try{this.noSleep?.disable()}catch{}this.noSleepStatus.set(!1)}}else if(de.request(),!this.noSleepStatus()){this.noSleep||this.checkNoSleepSupport();try{this.noSleep?.enable(),this.noSleepStatus.set(!0)}catch{}}this.fullscreenStatus.set(!this.fullscreenStatus())}else this.fullscreenSupported.set(!1),console.log("[UI Event Service] Fullscreen mode is not supported by this browser.")}addGestureListeners(e,i){this.boundPreventGestures||(this.boundPreventGestures=this.preventBrowserHistorySwipeGestures.bind(this)),document.addEventListener("openLeftSidenav",e),document.addEventListener("openRightSidenav",i),document.addEventListener("touchstart",this.boundPreventGestures,{passive:!1}),document.addEventListener("touchmove",this.boundPreventGestures,{passive:!1}),document.addEventListener("touchend",this.boundPreventGestures),document.addEventListener("touchcancel",this.boundPreventGestures)}removeGestureListeners(e,i){document.removeEventListener("openLeftSidenav",e),document.removeEventListener("openRightSidenav",i),this.boundPreventGestures&&(document.removeEventListener("touchstart",this.boundPreventGestures),document.removeEventListener("touchmove",this.boundPreventGestures),document.removeEventListener("touchend",this.boundPreventGestures),document.removeEventListener("touchcancel",this.boundPreventGestures))}preventBrowserHistorySwipeGestures(e){if(e instanceof TouchEvent&&e.touches.length===1){let i=e.touches[0],t=30;if(e.type==="touchstart")this.initialTouchX=i.clientX,this.initialTouchY=i.clientY;else if(e.type==="touchmove"&&this.initialTouchX!==null&&this.initialTouchY!==null){let r=Math.abs(i.clientX-this.initialTouchX),c=Math.abs(i.clientY-this.initialTouchY);r>10&&r>c&&(this.initialTouchX<t||this.initialTouchX>window.innerWidth-t)&&e.preventDefault(),c>10&&this.initialTouchY<50&&e.preventDefault()}else(e.type==="touchend"||e.type==="touchcancel")&&(this.initialTouchX=null,this.initialTouchY=null)}}addHotkeyListener(e,i){let t=r=>{if(r instanceof KeyboardEvent){let c=r.key.toLowerCase();if(i&&(i.keys&&!i.keys.includes(c)||i.ctrlKey!==void 0&&r.ctrlKey!==i.ctrlKey||i.shiftKey!==void 0&&r.shiftKey!==i.shiftKey))return;e(c,r)}else console.warn("[uiEvent Service] Non-keyboard event detected in addHotkeyListener:",r)};this.hotkeyListeners.set(e,t),document.addEventListener("keydown",t)}removeHotkeyListener(e){let i=this.hotkeyListeners.get(e);i&&(document.removeEventListener("keydown",i),this.hotkeyListeners.delete(e))}ngOnDestroy(){if(de.isEnabled)try{de.off("change",this.fullscreenChangeHandler)}catch{}if(this.noSleep&&this.noSleepStatus())try{this.noSleep.disable()}catch{}this.noSleep=null,this.boundPreventGestures&&(document.removeEventListener("touchstart",this.boundPreventGestures),document.removeEventListener("touchmove",this.boundPreventGestures),document.removeEventListener("touchend",this.boundPreventGestures),document.removeEventListener("touchcancel",this.boundPreventGestures),this.boundPreventGestures=null);for(let[,e]of this.hotkeyListeners.entries())document.removeEventListener("keydown",e);this.hotkeyListeners.clear()}static \u0275fac=function(i){return new(i||o)};static \u0275prov=Ee({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})();function cr(o,d){}var Pn="_mat-bottom-sheet-enter",Fn="_mat-bottom-sheet-exit",mr=(()=>{class o extends xo{_breakpointSubscription;_animationsDisabled=Be();_animationState="void";_animationStateChanged=new se;_destroyed;constructor(){super();let e=A(qt);this._breakpointSubscription=e.observe([Se.Medium,Se.Large,Se.XLarge]).subscribe(()=>{let i=this._elementRef.nativeElement.classList;i.toggle("mat-bottom-sheet-container-medium",e.isMatched(Se.Medium)),i.toggle("mat-bottom-sheet-container-large",e.isMatched(Se.Large)),i.toggle("mat-bottom-sheet-container-xlarge",e.isMatched(Se.XLarge))})}enter(){this._destroyed||(this._animationState="visible",this._changeDetectorRef.markForCheck(),this._changeDetectorRef.detectChanges(),this._animationsDisabled&&this._simulateAnimation(Pn))}exit(){this._destroyed||(this._elementRef.nativeElement.setAttribute("mat-exit",""),this._animationState="hidden",this._changeDetectorRef.markForCheck(),this._animationsDisabled&&this._simulateAnimation(Fn))}ngOnDestroy(){super.ngOnDestroy(),this._breakpointSubscription.unsubscribe(),this._destroyed=!0}_simulateAnimation(e){this._ngZone.run(()=>{this._handleAnimationEvent(!0,e),setTimeout(()=>this._handleAnimationEvent(!1,e))})}_trapFocus(){super._trapFocus({preventScroll:!0})}_handleAnimationEvent(e,i){let t=i===Pn;(t||i===Fn)&&this._animationStateChanged.emit({toState:t?"visible":"hidden",phase:e?"start":"done"})}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=v({type:o,selectors:[["mat-bottom-sheet-container"]],hostAttrs:["tabindex","-1",1,"mat-bottom-sheet-container"],hostVars:9,hostBindings:function(i,t){i&1&&_("animationstart",function(c){return t._handleAnimationEvent(!0,c.animationName)})("animationend",function(c){return t._handleAnimationEvent(!1,c.animationName)})("animationcancel",function(c){return t._handleAnimationEvent(!1,c.animationName)}),i&2&&(K("role",t._config.role)("aria-modal",t._config.ariaModal)("aria-label",t._config.ariaLabel),te("mat-bottom-sheet-container-animations-enabled",!t._animationsDisabled)("mat-bottom-sheet-container-enter",t._animationState==="visible")("mat-bottom-sheet-container-exit",t._animationState==="hidden"))},features:[Fi],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(i,t){i&1&&ke(0,cr,0,0,"ng-template",0)},dependencies:[fo],styles:[`@keyframes _mat-bottom-sheet-enter{from{transform:translateY(100%)}to{transform:none}}@keyframes _mat-bottom-sheet-exit{from{transform:none}to{transform:translateY(100%)}}.mat-bottom-sheet-container{box-shadow:0px 8px 10px -5px rgba(0, 0, 0, 0.2), 0px 16px 24px 2px rgba(0, 0, 0, 0.14), 0px 6px 30px 5px rgba(0, 0, 0, 0.12);padding:8px 16px;min-width:100vw;box-sizing:border-box;display:block;outline:0;max-height:80vh;overflow:auto;position:relative;background:var(--mat-bottom-sheet-container-background-color, var(--mat-sys-surface-container-low));color:var(--mat-bottom-sheet-container-text-color, var(--mat-sys-on-surface));font-family:var(--mat-bottom-sheet-container-text-font, var(--mat-sys-body-large-font));font-size:var(--mat-bottom-sheet-container-text-size, var(--mat-sys-body-large-size));line-height:var(--mat-bottom-sheet-container-text-line-height, var(--mat-sys-body-large-line-height));font-weight:var(--mat-bottom-sheet-container-text-weight, var(--mat-sys-body-large-weight));letter-spacing:var(--mat-bottom-sheet-container-text-tracking, var(--mat-sys-body-large-tracking))}@media(forced-colors: active){.mat-bottom-sheet-container{outline:1px solid}}.mat-bottom-sheet-container-animations-enabled{transform:translateY(100%)}.mat-bottom-sheet-container-animations-enabled.mat-bottom-sheet-container-enter{animation:_mat-bottom-sheet-enter 195ms cubic-bezier(0, 0, 0.2, 1) forwards}.mat-bottom-sheet-container-animations-enabled.mat-bottom-sheet-container-exit{animation:_mat-bottom-sheet-exit 375ms cubic-bezier(0.4, 0, 1, 1) backwards}.mat-bottom-sheet-container-xlarge,.mat-bottom-sheet-container-large,.mat-bottom-sheet-container-medium{border-top-left-radius:var(--mat-bottom-sheet-container-shape, 28px);border-top-right-radius:var(--mat-bottom-sheet-container-shape, 28px)}.mat-bottom-sheet-container-medium{min-width:384px;max-width:calc(100vw - 128px)}.mat-bottom-sheet-container-large{min-width:512px;max-width:calc(100vw - 256px)}.mat-bottom-sheet-container-xlarge{min-width:576px;max-width:calc(100vw - 384px)}
8
- `],encapsulation:2})}return o})(),Ar=new ve("MatBottomSheetData"),_i=class{viewContainerRef;panelClass;direction;data=null;hasBackdrop=!0;backdropClass;disableClose=!1;ariaLabel=null;ariaModal=!1;closeOnNavigation=!0;autoFocus="first-tabbable";restoreFocus=!0;scrollStrategy;height="";minHeight;maxHeight},ni=class{_ref;get instance(){return this._ref.componentInstance}get componentRef(){return this._ref.componentRef}containerInstance;disableClose;_afterOpened=new Ct;_result;_closeFallbackTimeout;constructor(d,e,i){this._ref=d,this.containerInstance=i,this.disableClose=e.disableClose,i._animationStateChanged.pipe(we(t=>t.phase==="done"&&t.toState==="visible"),Xe(1)).subscribe(()=>{this._afterOpened.next(),this._afterOpened.complete()}),i._animationStateChanged.pipe(we(t=>t.phase==="done"&&t.toState==="hidden"),Xe(1)).subscribe(()=>{clearTimeout(this._closeFallbackTimeout),this._ref.close(this._result)}),d.overlayRef.detachments().subscribe(()=>{this._ref.close(this._result)}),ze(this.backdropClick(),this.keydownEvents().pipe(we(t=>t.keyCode===27))).subscribe(t=>{!this.disableClose&&(t.type!=="keydown"||!st(t))&&(t.preventDefault(),this.dismiss())})}dismiss(d){this.containerInstance&&(this.containerInstance._animationStateChanged.pipe(we(e=>e.phase==="start"),Xe(1)).subscribe(()=>{this._closeFallbackTimeout=setTimeout(()=>this._ref.close(this._result),500),this._ref.overlayRef.detachBackdrop()}),this._result=d,this.containerInstance.exit(),this.containerInstance=null)}afterDismissed(){return this._ref.closed}afterOpened(){return this._afterOpened}backdropClick(){return this._ref.backdropClick}keydownEvents(){return this._ref.keydownEvents}},ur=new ve("mat-bottom-sheet-default-options"),pr=(()=>{class o{_injector=A($e);_parentBottomSheet=A(o,{optional:!0,skipSelf:!0});_animationsDisabled=Be();_defaultOptions=A(ur,{optional:!0});_bottomSheetRefAtThisLevel=null;_dialog=A(wo);get _openedBottomSheetRef(){let e=this._parentBottomSheet;return e?e._openedBottomSheetRef:this._bottomSheetRefAtThisLevel}set _openedBottomSheetRef(e){this._parentBottomSheet?this._parentBottomSheet._openedBottomSheetRef=e:this._bottomSheetRefAtThisLevel=e}constructor(){}open(e,i){let t=xe(xe({},this._defaultOptions||new _i),i),r;return this._dialog.open(e,Ze(xe({},t),{disableClose:!0,closeOnOverlayDetachments:!1,maxWidth:"100%",container:mr,scrollStrategy:t.scrollStrategy||_o(this._injector),positionStrategy:yo(this._injector).centerHorizontally().bottom("0"),disableAnimations:this._animationsDisabled,templateContext:()=>({bottomSheetRef:r}),providers:(c,g,C)=>(r=new ni(c,t,C),[{provide:ni,useValue:r},{provide:Ar,useValue:t.data}])})),r.afterDismissed().subscribe(()=>{this._openedBottomSheetRef===r&&(this._openedBottomSheetRef=null)}),this._openedBottomSheetRef?(this._openedBottomSheetRef.afterDismissed().subscribe(()=>r.containerInstance?.enter()),this._openedBottomSheetRef.dismiss()):r.containerInstance.enter(),this._openedBottomSheetRef=r,r}dismiss(e){this._openedBottomSheetRef&&this._openedBottomSheetRef.dismiss(e)}ngOnDestroy(){this._bottomSheetRefAtThisLevel&&this._bottomSheetRefAtThisLevel.dismiss()}static \u0275fac=function(i){return new(i||o)};static \u0275prov=Ee({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})(),MA=(()=>{class o{static \u0275fac=function(i){return new(i||o)};static \u0275mod=tt({type:o});static \u0275inj=Je({providers:[pr],imports:[Eo,ye,ho,ye]})}return o})();export{hr as a,Xm as b,aA as c,Ar as d,ni as e,pr as f,MA as g};
7
+ `),n(),a(188,"div",4)(189,"button",5),_("click",function(){return t.upgrade()}),l(190,"Upgrade"),n(),a(191,"button",6),_("click",function(){return t.startFresh()}),l(192,"Start Fresh"),n()())},dependencies:[ne,ee,me],styles:[".button-group[_ngcontent-%COMP%]{display:flex;justify-content:center}.nav-table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse;margin-bottom:2em}.nav-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .nav-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{border:1px solid #bbb;padding:.5em 1em;text-align:center}.nav-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{background:#ddd;color:#222;font-weight:700}.nav-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:nth-child(2n){background:#242424}.warning[_ngcontent-%COMP%]{color:#b71c1c}.button-group[_ngcontent-%COMP%]{margin-top:2em;display:flex;gap:20px}"]})}return o})();var ar=(o,d)=>d.id;function lr(o,d){if(o&1){let e=D();a(0,"div",2),_("click",function(){let t=M(e).$implicit,r=f();return y(r.selectIcon(t.id))})("keydown.enter",function(){let t=M(e).$implicit,r=f();return y(r.selectIcon(t.id))})("keydown.space",function(t){let r=M(e).$implicit;return f().selectIcon(r.id),y(t.preventDefault())}),a(1,"div",3),b(2,"mat-icon",4),n()()}if(o&2){let e=d.$implicit,i=f();te("selected",i.selected()===e.id),K("aria-label","Select "+e.id+" icon"),s(2),ot("width",64,"px")("height",64,"px"),m("svgIcon",e.id)}}var En=(()=>{class o{iconFile=h("assets/svg/icons.svg");currentIcon=h("");selectedIcon=q();icons=I([]);selected=I("");constructor(){this.loadIcons(),Rt(()=>{let e=this.currentIcon();Qi(()=>{e&&this.selected()!==e&&this.selected.set(e)})})}loadIcons(){return L(this,null,function*(){try{let i=yield(yield fetch(this.iconFile())).text(),c=new DOMParser().parseFromString(i,"image/svg+xml").querySelector("defs");if(!c)return;let p=c.querySelectorAll("svg"),C=[];p.forEach(x=>{let G=x.getAttribute("id");G&&G.startsWith("dashboard-")&&C.push({id:G})}),this.icons.set(C);let w=this.currentIcon();w&&this.selected.set(w)}catch(e){console.error("Error loading icons:",e)}})}selectIcon(e){this.selected.set(e),this.selectedIcon.emit(e)}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=v({type:o,selectors:[["select-icon"]],inputs:{iconFile:[1,"iconFile"],currentIcon:[1,"currentIcon"]},outputs:{selectedIcon:"selectedIcon"},decls:3,vars:0,consts:[[1,"icon-grid"],["tabindex","0",1,"icon-item",3,"selected"],["tabindex","0",1,"icon-item",3,"click","keydown.enter","keydown.space"],[1,"icon-container"],["aria-hidden","false",3,"svgIcon"]],template:function(i,t){i&1&&(a(0,"div",0),S(1,lr,3,8,"div",1,ar),n()),i&2&&(s(),T(t.icons()))},dependencies:[Ut,J,R],styles:[".icon-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fill,minmax(80px,1fr));gap:16px;padding:16px;max-height:400px;overflow-y:auto}.icon-item[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;padding:8px;border:2px solid transparent;border-radius:8px;cursor:pointer;transition:border-color .2s ease;background-color:var(--mat-sys-surface-container-low)}.icon-item[_ngcontent-%COMP%]:hover{border-color:var(--mat-sys-outline-variant)}.icon-item.selected[_ngcontent-%COMP%]{background-color:var(--mat-sys-on-tertiary)}.icon-item[_ngcontent-%COMP%]:focus{outline:2px solid var(--mat-sys-tertiary);outline-offset:2px}.icon-container[_ngcontent-%COMP%]{width:64px;height:64px;display:flex;align-items:center;justify-content:center;overflow:hidden}.icon-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{width:100%;height:100%;fill:currentColor}"]})}return o})();function rr(o,d){if(o&1&&(a(0,"button",15),l(1),n()),o&2){let e=f(),i=oe(1);m("disabled",!i.valid),s(),E(e.data.confirmBtnText)}}var Gn=(()=>{class o{dialogRef=A(Ae);data=A(pe);_settings=A(qt);isSplitShellEnabled=I(!0);constructor(){this.data.icon||(this.data.icon="dashboard-dashboard"),this.isSplitShellEnabled.set(this._settings.getSplitShellEnabled())}save(){this.dialogRef.close(this.data)}onIconSelected(e){this.data.icon=e}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=v({type:o,selectors:[["dialog-dashboard-page-editor"]],decls:27,vars:10,consts:[["name","ngForm"],["name","name",3,"ngSubmit"],[1,"dialogue-header"],["mat-dialog-title",""],["mat-icon-button","",1,"dialog-close-icon",3,"mat-dialog-close"],[1,"field-wrapper","field-margin"],[1,"field-flex"],["matInput","","type","text","id","name","placeholder","Name","name","name","required","","cdkFocusInitial","",3,"ngModelChange","ngModel"],["placeholder","collapseSplitShell","name","collapseSplitShell",1,"field-flex",3,"ngModelChange","ngModel","disabled"],[1,"field-margin","icon-section"],[2,"font-size","1.2em"],[1,"icon-selector"],[3,"selectedIcon","iconFile","currentIcon"],["align","end"],["mat-flat-button","",3,"mat-dialog-close"],["mat-flat-button","","type","submit",3,"disabled"]],template:function(i,t){if(i&1){let r=D();a(0,"form",1,0),_("ngSubmit",function(){return M(r),y(t.save())}),a(2,"div",2)(3,"h5",3),l(4),n(),a(5,"button",4)(6,"mat-icon"),l(7,"close"),n()()(),a(8,"mat-dialog-content")(9,"div",5)(10,"mat-form-field",6)(11,"mat-label"),l(12,"Display Name"),n(),a(13,"input",7),St("ngModelChange",function(p){return M(r),yt(t.data.name,p)||(t.data.name=p),y(p)}),n(),a(14,"mat-error"),l(15," A name is required "),n()(),a(16,"mat-checkbox",8),St("ngModelChange",function(p){return M(r),yt(t.data.collapseSplitShell,p)||(t.data.collapseSplitShell=p),y(p)}),l(17," Auto-collapse Freeboard-SK shell when displaying this dashboard "),n()(),a(18,"div",9)(19,"span",10),l(20,"Icon Gallery"),n(),a(21,"div",11)(22,"select-icon",12),_("selectedIcon",function(p){return M(r),y(t.onIconSelected(p))}),n()()()(),a(23,"mat-dialog-actions",13)(24,"button",14),l(25),n(),u(26,rr,2,2,"button",15),n()()}i&2&&(s(4),E(t.data.title),s(),m("mat-dialog-close",!1),s(8),Mt("ngModel",t.data.name),s(3),Mt("ngModel",t.data.collapseSplitShell),m("disabled",!t.isSplitShellEnabled()),s(6),m("iconFile","assets/svg/icons.svg")("currentIcon",t.data.icon),s(2),m("mat-dialog-close",!1),s(),E(t.data.cancelBtnText),s(),g(t.data.confirmBtnText?26:-1))},dependencies:[ne,ue,ge,Le,fe,J,R,le,V,B,pt,be,z,ee,me,$,j,ct,Q,F,H,O,zt,jt,En,Ce,se],styles:[".dialogue-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:baseline}.dialog-close-icon[_ngcontent-%COMP%]{margin-right:15px}.mat-mdc-dialog-content[_ngcontent-%COMP%]{max-height:max-content}.field-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;align-content:center}.field-margin[_ngcontent-%COMP%]{margin-left:15px;margin-bottom:15px}.field-flex[_ngcontent-%COMP%]{flex:auto}.icon-selector[_ngcontent-%COMP%]{border:1px solid var(--mat-sys-outline);border-radius:4px}.icon-section[_ngcontent-%COMP%] .mat-label[_ngcontent-%COMP%]{display:block;margin-bottom:8px;color:var(--mat-sys-on-surface);font-size:14px;font-weight:400}"]})}return o})();var Jm=(()=>{class o{dialog=A(Go);openFrameDialog(e,i){switch(e.component){case"select-widget":e.componentType=xn;break;case"upgrade-config":e.componentType=wn;break}return this.dialog.open(en,{data:e,height:i?"calc(100% - 30px)":"",width:i?"calc(100% - 30px)":"",maxWidth:i?"100%":"",maxHeight:i?"100%":""}).afterClosed()}openConfirmationDialog(e){return this.dialog.open(tn,{data:e,minWidth:"35vw",minHeight:"25vh"}).afterClosed()}openNameDialog(e){return this.dialog.open(on,{data:e,minWidth:"20vw",minHeight:"20vh",disableClose:!1})}openDashboardPageEditorDialog(e){return this.dialog.open(Gn,{data:e,minWidth:"60vw",maxWidth:"90vw",maxHeight:"95vh",disableClose:!1})}openWidgetOptions(e){return this.dialog.open(_n,{data:e.config,minWidth:"50vw",maxWidth:"90vw"})}static \u0275fac=function(i){return new(i||o)};static \u0275prov=Ge({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})();var kn=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],xe=(()=>{if(typeof document>"u")return!1;let o=kn[0],d={};for(let e of kn)if(e?.[1]in document){for(let[t,r]of e.entries())d[o[t]]=r;return d}return!1})(),In={change:xe.fullscreenchange,error:xe.fullscreenerror},ie={request(o=document.documentElement,d){return new Promise((e,i)=>{let t=()=>{ie.off("change",t),e()};ie.on("change",t);let r=o[xe.requestFullscreen](d);r instanceof Promise&&r.then(t).catch(i)})},exit(){return new Promise((o,d)=>{if(!ie.isFullscreen){o();return}let e=()=>{ie.off("change",e),o()};ie.on("change",e);let i=document[xe.exitFullscreen]();i instanceof Promise&&i.then(e).catch(d)})},toggle(o,d){return ie.isFullscreen?ie.exit():ie.request(o,d)},onchange(o){ie.on("change",o)},onerror(o){ie.on("error",o)},on(o,d){let e=In[o];e&&document.addEventListener(e,d,!1)},off(o,d){let e=In[o];e&&document.removeEventListener(e,d,!1)},raw:xe};Object.defineProperties(ie,{isFullscreen:{get:()=>!!document[xe.fullscreenElement]},element:{enumerable:!0,get:()=>document[xe.fullscreenElement]??void 0},isEnabled:{enumerable:!0,get:()=>!!document[xe.fullscreenEnabled]}});xe||(ie={isEnabled:!1});var ce=ie;var sr="data:video/webm;base64,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",dr="data:video/mp4;base64,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",bi=class{constructor(){this.enabled=!1}enable(){throw new Error("NoSleep using SSR/no-op mode; do not call enable.")}disable(){throw new Error("NoSleep using SSR/no-op mode; do not call disable.")}},Ci=class{constructor(){this.enabled=!1;let d=()=>this.wakeLock&&document.visibilityState==="visible"&&this.enable();document.addEventListener("visibilitychange",d),document.addEventListener("fullscreenchange",d)}enable(){return L(this,null,function*(){try{this.wakeLock=yield navigator.wakeLock.request("screen"),this.enabled=!0,console.debug("Wake Lock active."),this.wakeLock.addEventListener("release",()=>{console.debug("Wake Lock released.")})}catch(d){this.enabled=!1,d instanceof Error&&console.error(`${d.name}, ${d.message}`)}})}disable(){var d;(d=this.wakeLock)==null||d.release(),this.wakeLock=void 0,this.enabled=!1}},_i=class{constructor(){var d;this.enabled=!1,this.noSleepVideo=document.createElement("video"),this.noSleepVideo.setAttribute("title","No Sleep"),this.noSleepVideo.setAttribute("playsinline",""),this._addSourceToVideo(this.noSleepVideo,"webm",sr),this._addSourceToVideo(this.noSleepVideo,"mp4",dr),Object.assign(this.noSleepVideo.style,{position:"absolute",left:"-100%",top:"-100%"}),(d=document.querySelector("body"))==null||d.append(this.noSleepVideo),this.noSleepVideo.addEventListener("loadedmetadata",()=>{this.noSleepVideo.duration<=1?this.noSleepVideo.setAttribute("loop",""):this.noSleepVideo.addEventListener("timeupdate",()=>{this.noSleepVideo.currentTime>.5&&(this.noSleepVideo.currentTime=Math.random())})})}_addSourceToVideo(d,e,i){let t=document.createElement("source");t.src=i,t.type=`video/${e}`,d.appendChild(t)}enable(){return L(this,null,function*(){let d=this.noSleepVideo.play();try{let e=yield d;return this.enabled=!0,e}catch(e){this.enabled=!1,e instanceof Error&&console.error(`${e.name}, ${e.message}`)}})}disable(){this.noSleepVideo.pause(),this.enabled=!1}},Dn=typeof navigator>"u"?bi:"wakeLock"in navigator&&!navigator.standalone?Ci:_i;var rA=(()=>{class o{isDragging=I(!1);fullscreenStatus=I(!1);fullscreenSupported=I(!0);noSleepStatus=I(!1);noSleepSupported=I(!0);noSleep=null;initialTouchX=null;initialTouchY=null;hotkeyListeners=new Map;boundPreventGestures=null;fullscreenChangeHandler=()=>{if(this.fullscreenStatus.set(ce.isFullscreen),!ce.isFullscreen&&this.noSleep&&this.noSleepStatus()){try{this.noSleep.disable()}catch{}this.noSleepStatus.set(!1)}};constructor(){window.__KIP_TEST__?(this.fullscreenSupported.set(!1),this.noSleepSupported.set(!1)):(ce.isEnabled?ce.on("change",this.fullscreenChangeHandler):(this.fullscreenSupported.set(!1),console.log("[UI Event Service] Fullscreen mode is not supported by device/browser.")),this.checkNoSleepSupport(),this.checkPwaMode()&&this.noSleepSupported()&&!this.noSleepStatus()&&this.toggleNoSleep())}checkNoSleepSupport(){try{if(this.noSleep||(this.noSleep=new Dn),!this.noSleep||typeof this.noSleep.enable!="function"||typeof this.noSleep.disable!="function")throw new Error("[UI Event Service] NoSleep methods not available")}catch(e){this.noSleepSupported.set(!1),console.warn(`[UI Event Service] NoSleep is not supported by this device/browser. Error: ${e}`),this.noSleep=null}}checkPwaMode(){let e=window.matchMedia("(display-mode: standalone)").matches||window.navigator.standalone!==void 0;return console.log("[UI Event Service] PWA mode:",e),e}toggleNoSleep(){if(this.noSleepSupported()){if(this.noSleepStatus())try{this.noSleep?.disable()}catch{}else{this.noSleep||this.checkNoSleepSupport();try{this.noSleep?.enable()}catch(e){console.warn("[UI Event Service] Failed to enable NoSleep:",e)}}this.noSleepStatus.set(!this.noSleepStatus()),console.log("[UI Event Service] NoSleep active:",this.noSleepStatus())}}toggleFullScreen(){if(ce.isEnabled){if(this.fullscreenStatus()){if(ce.isFullscreen&&ce.exit(),this.noSleepStatus()){try{this.noSleep?.disable()}catch{}this.noSleepStatus.set(!1)}}else if(ce.request(),!this.noSleepStatus()){this.noSleep||this.checkNoSleepSupport();try{this.noSleep?.enable(),this.noSleepStatus.set(!0)}catch{}}this.fullscreenStatus.set(!this.fullscreenStatus())}else this.fullscreenSupported.set(!1),console.log("[UI Event Service] Fullscreen mode is not supported by this browser.")}addGestureListeners(e,i){this.boundPreventGestures||(this.boundPreventGestures=this.preventBrowserHistorySwipeGestures.bind(this)),document.addEventListener("openLeftSidenav",e),document.addEventListener("openRightSidenav",i),document.addEventListener("touchstart",this.boundPreventGestures,{passive:!1}),document.addEventListener("touchmove",this.boundPreventGestures,{passive:!1}),document.addEventListener("touchend",this.boundPreventGestures),document.addEventListener("touchcancel",this.boundPreventGestures)}removeGestureListeners(e,i){document.removeEventListener("openLeftSidenav",e),document.removeEventListener("openRightSidenav",i),this.boundPreventGestures&&(document.removeEventListener("touchstart",this.boundPreventGestures),document.removeEventListener("touchmove",this.boundPreventGestures),document.removeEventListener("touchend",this.boundPreventGestures),document.removeEventListener("touchcancel",this.boundPreventGestures))}preventBrowserHistorySwipeGestures(e){if(e instanceof TouchEvent&&e.touches.length===1){let i=e.touches[0],t=30;if(e.type==="touchstart")this.initialTouchX=i.clientX,this.initialTouchY=i.clientY;else if(e.type==="touchmove"&&this.initialTouchX!==null&&this.initialTouchY!==null){let r=Math.abs(i.clientX-this.initialTouchX),c=Math.abs(i.clientY-this.initialTouchY);r>10&&r>c&&(this.initialTouchX<t||this.initialTouchX>window.innerWidth-t)&&e.preventDefault(),c>10&&this.initialTouchY<50&&e.preventDefault()}else(e.type==="touchend"||e.type==="touchcancel")&&(this.initialTouchX=null,this.initialTouchY=null)}}addHotkeyListener(e,i){let t=r=>{if(r instanceof KeyboardEvent){let c=r.key.toLowerCase();if(i&&(i.keys&&!i.keys.includes(c)||i.ctrlKey!==void 0&&r.ctrlKey!==i.ctrlKey||i.shiftKey!==void 0&&r.shiftKey!==i.shiftKey))return;e(c,r)}else console.warn("[uiEvent Service] Non-keyboard event detected in addHotkeyListener:",r)};this.hotkeyListeners.set(e,t),document.addEventListener("keydown",t)}removeHotkeyListener(e){let i=this.hotkeyListeners.get(e);i&&(document.removeEventListener("keydown",i),this.hotkeyListeners.delete(e))}ngOnDestroy(){if(ce.isEnabled)try{ce.off("change",this.fullscreenChangeHandler)}catch{}if(this.noSleep&&this.noSleepStatus())try{this.noSleep.disable()}catch{}this.noSleep=null,this.boundPreventGestures&&(document.removeEventListener("touchstart",this.boundPreventGestures),document.removeEventListener("touchmove",this.boundPreventGestures),document.removeEventListener("touchend",this.boundPreventGestures),document.removeEventListener("touchcancel",this.boundPreventGestures),this.boundPreventGestures=null);for(let[,e]of this.hotkeyListeners.entries())document.removeEventListener("keydown",e);this.hotkeyListeners.clear()}static \u0275fac=function(i){return new(i||o)};static \u0275prov=Ge({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})();function cr(o,d){}var Pn="_mat-bottom-sheet-enter",Fn="_mat-bottom-sheet-exit",mr=(()=>{class o extends xo{_breakpointSubscription;_animationsDisabled=Ve();_animationState="void";_animationStateChanged=new de;_destroyed;constructor(){super();let e=A(Qt);this._breakpointSubscription=e.observe([Te.Medium,Te.Large,Te.XLarge]).subscribe(()=>{let i=this._elementRef.nativeElement.classList;i.toggle("mat-bottom-sheet-container-medium",e.isMatched(Te.Medium)),i.toggle("mat-bottom-sheet-container-large",e.isMatched(Te.Large)),i.toggle("mat-bottom-sheet-container-xlarge",e.isMatched(Te.XLarge))})}enter(){this._destroyed||(this._animationState="visible",this._changeDetectorRef.markForCheck(),this._changeDetectorRef.detectChanges(),this._animationsDisabled&&this._simulateAnimation(Pn))}exit(){this._destroyed||(this._elementRef.nativeElement.setAttribute("mat-exit",""),this._animationState="hidden",this._changeDetectorRef.markForCheck(),this._animationsDisabled&&this._simulateAnimation(Fn))}ngOnDestroy(){super.ngOnDestroy(),this._breakpointSubscription.unsubscribe(),this._destroyed=!0}_simulateAnimation(e){this._ngZone.run(()=>{this._handleAnimationEvent(!0,e),setTimeout(()=>this._handleAnimationEvent(!1,e))})}_trapFocus(){super._trapFocus({preventScroll:!0})}_handleAnimationEvent(e,i){let t=i===Pn;(t||i===Fn)&&this._animationStateChanged.emit({toState:t?"visible":"hidden",phase:e?"start":"done"})}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=v({type:o,selectors:[["mat-bottom-sheet-container"]],hostAttrs:["tabindex","-1",1,"mat-bottom-sheet-container"],hostVars:9,hostBindings:function(i,t){i&1&&_("animationstart",function(c){return t._handleAnimationEvent(!0,c.animationName)})("animationend",function(c){return t._handleAnimationEvent(!1,c.animationName)})("animationcancel",function(c){return t._handleAnimationEvent(!1,c.animationName)}),i&2&&(K("role",t._config.role)("aria-modal",t._config.ariaModal)("aria-label",t._config.ariaLabel),te("mat-bottom-sheet-container-animations-enabled",!t._animationsDisabled)("mat-bottom-sheet-container-enter",t._animationState==="visible")("mat-bottom-sheet-container-exit",t._animationState==="hidden"))},features:[Oi],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(i,t){i&1&&Ie(0,cr,0,0,"ng-template",0)},dependencies:[fo],styles:[`@keyframes _mat-bottom-sheet-enter{from{transform:translateY(100%)}to{transform:none}}@keyframes _mat-bottom-sheet-exit{from{transform:none}to{transform:translateY(100%)}}.mat-bottom-sheet-container{box-shadow:0px 8px 10px -5px rgba(0, 0, 0, 0.2), 0px 16px 24px 2px rgba(0, 0, 0, 0.14), 0px 6px 30px 5px rgba(0, 0, 0, 0.12);padding:8px 16px;min-width:100vw;box-sizing:border-box;display:block;outline:0;max-height:80vh;overflow:auto;position:relative;background:var(--mat-bottom-sheet-container-background-color, var(--mat-sys-surface-container-low));color:var(--mat-bottom-sheet-container-text-color, var(--mat-sys-on-surface));font-family:var(--mat-bottom-sheet-container-text-font, var(--mat-sys-body-large-font));font-size:var(--mat-bottom-sheet-container-text-size, var(--mat-sys-body-large-size));line-height:var(--mat-bottom-sheet-container-text-line-height, var(--mat-sys-body-large-line-height));font-weight:var(--mat-bottom-sheet-container-text-weight, var(--mat-sys-body-large-weight));letter-spacing:var(--mat-bottom-sheet-container-text-tracking, var(--mat-sys-body-large-tracking))}@media(forced-colors: active){.mat-bottom-sheet-container{outline:1px solid}}.mat-bottom-sheet-container-animations-enabled{transform:translateY(100%)}.mat-bottom-sheet-container-animations-enabled.mat-bottom-sheet-container-enter{animation:_mat-bottom-sheet-enter 195ms cubic-bezier(0, 0, 0.2, 1) forwards}.mat-bottom-sheet-container-animations-enabled.mat-bottom-sheet-container-exit{animation:_mat-bottom-sheet-exit 375ms cubic-bezier(0.4, 0, 1, 1) backwards}.mat-bottom-sheet-container-xlarge,.mat-bottom-sheet-container-large,.mat-bottom-sheet-container-medium{border-top-left-radius:var(--mat-bottom-sheet-container-shape, 28px);border-top-right-radius:var(--mat-bottom-sheet-container-shape, 28px)}.mat-bottom-sheet-container-medium{min-width:384px;max-width:calc(100vw - 128px)}.mat-bottom-sheet-container-large{min-width:512px;max-width:calc(100vw - 256px)}.mat-bottom-sheet-container-xlarge{min-width:576px;max-width:calc(100vw - 384px)}
8
+ `],encapsulation:2})}return o})(),Ar=new Me("MatBottomSheetData"),vi=class{viewContainerRef;panelClass;direction;data=null;hasBackdrop=!0;backdropClass;disableClose=!1;ariaLabel=null;ariaModal=!1;closeOnNavigation=!0;autoFocus="first-tabbable";restoreFocus=!0;scrollStrategy;height="";minHeight;maxHeight},li=class{_ref;get instance(){return this._ref.componentInstance}get componentRef(){return this._ref.componentRef}containerInstance;disableClose;_afterOpened=new Ct;_result;_closeFallbackTimeout;constructor(d,e,i){this._ref=d,this.containerInstance=i,this.disableClose=e.disableClose,i._animationStateChanged.pipe(Ee(t=>t.phase==="done"&&t.toState==="visible"),Xe(1)).subscribe(()=>{this._afterOpened.next(),this._afterOpened.complete()}),i._animationStateChanged.pipe(Ee(t=>t.phase==="done"&&t.toState==="hidden"),Xe(1)).subscribe(()=>{clearTimeout(this._closeFallbackTimeout),this._ref.close(this._result)}),d.overlayRef.detachments().subscribe(()=>{this._ref.close(this._result)}),ze(this.backdropClick(),this.keydownEvents().pipe(Ee(t=>t.keyCode===27))).subscribe(t=>{!this.disableClose&&(t.type!=="keydown"||!st(t))&&(t.preventDefault(),this.dismiss())})}dismiss(d){this.containerInstance&&(this.containerInstance._animationStateChanged.pipe(Ee(e=>e.phase==="start"),Xe(1)).subscribe(()=>{this._closeFallbackTimeout=setTimeout(()=>this._ref.close(this._result),500),this._ref.overlayRef.detachBackdrop()}),this._result=d,this.containerInstance.exit(),this.containerInstance=null)}afterDismissed(){return this._ref.closed}afterOpened(){return this._afterOpened}backdropClick(){return this._ref.backdropClick}keydownEvents(){return this._ref.keydownEvents}},pr=new Me("mat-bottom-sheet-default-options"),ur=(()=>{class o{_injector=A($e);_parentBottomSheet=A(o,{optional:!0,skipSelf:!0});_animationsDisabled=Ve();_defaultOptions=A(pr,{optional:!0});_bottomSheetRefAtThisLevel=null;_dialog=A(wo);get _openedBottomSheetRef(){let e=this._parentBottomSheet;return e?e._openedBottomSheetRef:this._bottomSheetRefAtThisLevel}set _openedBottomSheetRef(e){this._parentBottomSheet?this._parentBottomSheet._openedBottomSheetRef=e:this._bottomSheetRefAtThisLevel=e}constructor(){}open(e,i){let t=we(we({},this._defaultOptions||new vi),i),r;return this._dialog.open(e,Ze(we({},t),{disableClose:!0,closeOnOverlayDetachments:!1,maxWidth:"100%",container:mr,scrollStrategy:t.scrollStrategy||_o(this._injector),positionStrategy:yo(this._injector).centerHorizontally().bottom("0"),disableAnimations:this._animationsDisabled,templateContext:()=>({bottomSheetRef:r}),providers:(c,p,C)=>(r=new li(c,t,C),[{provide:li,useValue:r},{provide:Ar,useValue:t.data}])})),r.afterDismissed().subscribe(()=>{this._openedBottomSheetRef===r&&(this._openedBottomSheetRef=null)}),this._openedBottomSheetRef?(this._openedBottomSheetRef.afterDismissed().subscribe(()=>r.containerInstance?.enter()),this._openedBottomSheetRef.dismiss()):r.containerInstance.enter(),this._openedBottomSheetRef=r,r}dismiss(e){this._openedBottomSheetRef&&this._openedBottomSheetRef.dismiss(e)}ngOnDestroy(){this._bottomSheetRefAtThisLevel&&this._bottomSheetRefAtThisLevel.dismiss()}static \u0275fac=function(i){return new(i||o)};static \u0275prov=Ge({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})(),SA=(()=>{class o{static \u0275fac=function(i){return new(i||o)};static \u0275mod=tt({type:o});static \u0275inj=Je({providers:[ur],imports:[Eo,Se,ho,Se]})}return o})();export{hr as a,Jm as b,rA as c,Ar as d,li as e,ur as f,SA as g};