@mxtommy/kip 3.0.2-beta.9 → 3.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,8 @@
1
- import{a as _o,b as vo,c as Co}from"./chunk-YQQFIIO5.js";import{a as tt,b as se}from"./chunk-MCACXEYY.js";import{a as et,b as Mo,c as yo,d as To}from"./chunk-FMVUDX5R.js";import{a as we,b as Nt}from"./chunk-FFCTE2U5.js";import{b as po,c as uo,d as Ot,e as fo,f as U,g as go,h as ho,i as pt,j as ne,k as Lt}from"./chunk-7OTNT2GF.js";import{g as Ea,i as ka,n as Fa,o as N,p as ae,q as mo,u as bo}from"./chunk-VIHODUV4.js";import{a as Xa,b as Qa,c as Ja,d as ve,e as Ce,g as eo,h as Me,i as ye,j as Te,k as $e,l as Se}from"./chunk-FCC7GNHD.js";import{a as je}from"./chunk-DLFK64UP.js";import{a as co}from"./chunk-RCSPPHLA.js";import{A as Je,D as R,E as Pt,a as ke,f as Ga,g as xt,h as Yt,i as wt,k as Da,r as Ia,t as O,u as Ft,v as Qe,x as so,z as L}from"./chunk-AHFD2AA5.js";import{$a as Be,$b as X,$c as k,Aa as sa,Ae as za,Bb as fa,Cc as te,Da as Ve,Dc as r,E as ia,Ea as M,Ec as x,Ee as ja,Fa as y,Fc as Q,Fe as Ha,Gc as yt,H as Kt,Hb as v,Ib as ge,Ic as Ma,J as Oe,Jb as lt,Jc as ya,K as pe,Kb as ga,Kc as Ta,La as ca,Lb as ha,Ld as Pa,Md as Oa,Me as Ka,N as na,Nb as _,Ne as $a,O as bt,Oa as Y,Oc as dt,Od as La,Pa as da,Pc as Tt,Pe as Ya,Q as Le,Ra as fe,Rc as We,Sa as f,Sc as qe,Se as Ke,T as ra,Ta as rt,Td as Na,Va as Z,Vd as Va,Ve as Za,We as kt,Xc as ze,Xe as V,Yb as le,Yd as At,Zb as d,Ze as E,_b as Ct,a as me,ac as $t,af as I,b as Fe,bc as ba,bf as j,cd as Sa,cf as to,dc as C,de as mt,df as ao,eb as ma,ec as G,ee as He,ef as oo,f as gt,fa as Ne,fc as Mt,fe as Ba,ff as io,g as ht,ga as _t,gc as T,gf as H,hc as S,he as Zt,hf as no,ia as la,ic as n,ie as Gt,if as Dt,j as jt,jc as i,jf as xe,kc as g,ke as Et,kf as ie,lc as _a,le as q,lf as K,m as it,mc as va,mf as ro,na as vt,nc as Ca,nf as lo,o as nt,oa as ee,oc as A,of as Ye,pa as ue,pf as It,qc as b,qd as xa,qf as Ze,ra as $,rc as u,rd as wa,re as Ra,rf as F,sc as Re,sd as Aa,se as Ua,t as Ht,tc as Ue,te as z,tf as Xe,ua as p,ub as s,uc as Ee,ud as St,ue as Wa,uf as B,vc as st,ve as _e,vf as P,wb as pa,wc as ct,xc as he,xe as qa,yb as ua,yc as be,ye as oe,z as Pe}from"./chunk-JIJMSRKJ.js";var gr=(()=>{class o{_settings=p(xt);_router=p(ka);dashboards=Z([],{equal:Yt});activeDashboard=Z(0);_widgetAction=new nt(null);widgetAction$=this._widgetAction.asObservable();_isDashboardStatic=new nt(!0);isDashboardStatic$=this._isDashboardStatic.asObservable();isDashboardStatic=Da(this.isDashboardStatic$);blankDashboard=[{id:null,name:"Dashboard 1",configuration:[{w:12,h:12,id:"d1d58e6f-f8b4-4a72-9597-7f92aa6776fc",selector:"widget-tutorial",input:{widgetProperties:{type:"widget-tutorial",uuid:"d1d58e6f-f8b4-4a72-9597-7f92aa6776fc"}},x:0,y:0}]}];constructor(){let e=this._settings.getDashboardConfig();if(!e||e.length===0){console.warn("[Dashboard Service] No dashboards found in settings, creating blank dashboard");let t=this.blankDashboard.map(a=>Fe(me({},a),{id:ke.create()}));this.dashboards.set([...t])}else this.dashboards.set(this._settings.getDashboardConfig());Sa(()=>{this._settings.saveDashboards(this.dashboards())})}toggleStaticDashboard(){this._isDashboardStatic.next(!this._isDashboardStatic.value)}add(e,t){this.dashboards.update(a=>[...a,{id:ke.create(),name:e,configuration:t}])}update(e,t){this.dashboards.update(a=>a.map((l,m)=>m===e?Fe(me({},l),{name:t}):l))}delete(e){this.dashboards.update(t=>t.filter((a,l)=>l!==e)),this.dashboards().length===0?(this.add("Dashboard "+(this.dashboards().length+1),[]),this.activeDashboard.set(0)):this.activeDashboard()>this.dashboards().length-1&&this.activeDashboard.set(this.dashboards().length-1)}duplicate(e,t){if(e<0||e>=this.dashboards().length){console.error(`[Dashboard Service] Invalid itemIndex: ${e}`);return}let a=this.dashboards()[e],l=wt(a);l.id=ke.create(),l.name=t,Array.isArray(l.configuration)?l.configuration.forEach(m=>{m&&m.input?.widgetProperties?(m.id=ke.create(),m.input.widgetProperties.uuid=m.id):console.error("Dashboard Service] Widget configuration is missing required properties:",m)}):(console.error("Dashboard Service] Dashboard configuration is not an array:",l.configuration),l.configuration=[]),this.dashboards.update(m=>[...m,l])}updateConfiguration(e,t){this.dashboards.update(a=>a.map((l,m)=>m===e?Yt(l.configuration,t)?l:Fe(me({},l),{configuration:t}):l))}previousDashboard(){this.activeDashboard()+1>this.dashboards().length-1?this.activeDashboard.set(0):this.activeDashboard.set(this.activeDashboard()+1)}nextDashboard(){this.activeDashboard()-1<0?this.activeDashboard.set(this.dashboards().length-1):this.activeDashboard.set(this.activeDashboard()-1)}navigateToActive(){this._router.navigate(["/dashboard",this.activeDashboard()])}navigateTo(e){e<0||e>this.dashboards().length-1||this._router.navigate(["/dashboard",e])}deleteWidget(e){this._widgetAction.next({id:e,operation:"delete"})}duplicateWidget(e){this._widgetAction.next({id:e,operation:"duplicate"})}setStaticDashboard(e){this._isDashboardStatic.next(e)}static \u0275fac=function(t){return new(t||o)};static \u0275prov=ee({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})();function ii(o,c){o&1&&Ca(0)}var xo=(()=>{class o{data=p(Ce);static \u0275fac=function(t){return new(t||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(t,a){t&1&&(n(0,"div",0)(1,"h6",1),r(2),i(),n(3,"button",2)(4,"mat-icon"),r(5,"close"),i()()(),n(6,"mat-dialog-content",3),_(7,ii,1,0,"ng-container",4),i()),t&2&&(s(2),x(a.data.title),s(),d("mat-dialog-close",!1),s(4),d("ngComponentOutlet",a.data.componentType))},dependencies:[N,Se,Me,ye,Te,oe,z,xa],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}.dialog-content-padding[_ngcontent-%COMP%]{--mat-dialog-content-padding: 0px 24px 20px 24px}"]})}return o})();function ni(o,c){if(o&1&&(n(0,"button",4),r(1),i()),o&2){let e=u();d("mat-dialog-close",!0),s(),x(e.data.confirmBtnText)}}var wo=(()=>{class o{data=p(Ce);static \u0275fac=function(t){return new(t||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(t,a){t&1&&(n(0,"div",0)(1,"h5",1),r(2),i(),n(3,"button",2)(4,"mat-icon"),r(5,"close"),i()()(),n(6,"mat-dialog-content"),r(7),i(),n(8,"mat-dialog-actions",3)(9,"button",4),r(10),i(),_(11,ni,2,2,"button",4),i()),t&2&&(s(2),x(a.data.title),s(),d("mat-dialog-close",!1),s(4),Q(" ",a.data.message,`
2
- `),s(2),d("mat-dialog-close",!1),s(),x(a.data.cancelBtnText),s(),C(a.data.confirmBtnText?11:-1))},dependencies:[N,Se,Me,ye,$e,Te,oe,_e,z],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 li(o,c){if(o&1&&(n(0,"button",9),r(1),i()),o&2){let e=u(),t=te(1);d("disabled",!t.valid),s(),x(e.data.confirmBtnText)}}var Go=(()=>{class o{dialogRef=p(ve);data=p(Ce);saveName(){this.dialogRef.close(this.data)}static \u0275fac=function(t){return new(t||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(t,a){if(t&1){let l=A();n(0,"form",1,0),b("ngSubmit",function(){return M(l),y(a.saveName())}),n(2,"div",2)(3,"h5",3),r(4),i(),n(5,"button",4)(6,"mat-icon"),r(7,"close"),i()()(),n(8,"mat-dialog-content")(9,"mat-form-field",5)(10,"mat-label"),r(11,"Name"),i(),n(12,"input",6),Ta("ngModelChange",function(h){return M(l),ya(a.data.name,h)||(a.data.name=h),y(h)}),i(),n(13,"mat-error"),r(14," A name is required "),i()()(),n(15,"mat-dialog-actions",7)(16,"button",8),r(17),i(),_(18,li,2,2,"button",9),i()()}t&2&&(s(4),x(a.data.title),s(),d("mat-dialog-close",!1),s(7),Ma("ngModel",a.data.name),s(4),d("mat-dialog-close",!1),s(),x(a.data.cancelBtnText),s(),C(a.data.confirmBtnText?18:-1))},dependencies:[Se,Me,ye,$e,Te,ae,N,Je,L,O,Ft,Pt,R,oe,_e,z,B,Dt,V,I,j,F,no,oo],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 ci(o,c){if(o&1&&(n(0,"mat-option",12),r(1),i()),o&2){let e=c.$implicit;Ee("value",e.value),s(),x(e.label)}}function di(o,c){if(o&1){let e=A();n(0,"button",21),b("click",function(){M(e);let a=u();return y(a.moveCtrlUp())}),n(1,"mat-icon"),r(2,"arrow_drop_up"),i()()}}function mi(o,c){if(o&1){let e=A();n(0,"button",22),b("click",function(){M(e);let a=u();return y(a.moveCtrlDown())}),n(1,"mat-icon"),r(2,"arrow_drop_down"),i()()}}var Eo=(()=>{class o{app=p(je);ctrlFormGroup=f.required();controlIndex=f(void 0);arrayLength=f(void 0);deleteCtrl=fe();moveUp=fe();moveDown=fe();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(t){return new(t||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(t,a){t&1&&(n(0,"div",0)(1,"div",1)(2,"div",2)(3,"mat-form-field",3)(4,"mat-label"),r(5,"Label"),i(),g(6,"input",4),i()(),n(7,"div",5)(8,"mat-form-field",6)(9,"mat-label"),r(10,"Type"),i(),n(11,"mat-select",7)(12,"mat-option",8),r(13,"Toggle"),i(),n(14,"mat-option",9),r(15,"Push"),i(),n(16,"mat-option",10),r(17,"Indicator"),i()()()(),n(18,"div",5)(19,"mat-form-field",6)(20,"mat-label"),r(21,"Color"),i(),n(22,"mat-select",11),T(23,ci,2,2,"mat-option",12,G),i()()(),n(25,"div",13)(26,"mat-checkbox",14),r(27," Use numeric path "),i()()(),n(28,"div",15)(29,"div",16)(30,"div",17),_(31,di,3,0,"button",18)(32,mi,3,0,"button",19),n(33,"button",20),b("click",function(){return a.deleteControl()}),n(34,"mat-icon"),r(35,"delete"),i()()()()()()),t&2&&(d("formGroup",a.ctrlFormGroup()),s(23),S(a.colors),s(8),C(a.controlIndex()!==0?31:-1),s(),C(a.controlIndex()!==a.arrayLength()-1?32:-1))},dependencies:[B,V,I,j,F,P,K,Ye,L,O,R,ne,U,z,Nt,we,ae,N],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 pi(o,c){if(o&1){let e=A();n(0,"boolean-control-config",4),b("moveUp",function(a){M(e);let l=u();return y(l.moveUp(a))})("moveDown",function(a){M(e);let l=u();return y(l.moveDown(a))})("deleteCtrl",function(a){M(e);let l=u();return y(l.deletePath(a))}),i()}if(o&2){let e=c.$implicit,t=c.$index,a=u();d("ctrlFormGroup",a.getFormGroup(e))("controlIndex",t)("arrayLength",a.arrayLength)}}var ko=(()=>{class o{fb=p(Xe);multiCtrlArray=f.required();addPath=fe();updatePath=fe();delPath=fe();multiFormGroup=null;arrayLength=0;multiCtrlArraySubscription=null;ngOnInit(){this.arrayLength=this.multiCtrlArray().length,this.multiFormGroup=new to({multiCtrlArray:this.multiCtrlArray()}),this.multiCtrlArraySubscription=this.multiCtrlArray().valueChanges.pipe(bt(350)).subscribe(e=>{this.updatePath.emit(e)})}addCtrlGroup(){let e=ke.create();this.multiCtrlArray().push(this.fb.group({ctrlLabel:[null,E.required],type:["1",E.required],pathID:[e],color:["contrast"],isNumeric:[!1],value:[null]})),this.arrayLength=this.multiCtrlArray().length;let t={description:null,path:null,pathID:e,source:"default",pathType:"boolean",supportsPut:!0,isPathConfigurable:!0,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"unitless",convertUnitTo:"unitless",sampleTime:500};this.addPath.emit(t)}moveUp(e){let t=this.multiCtrlArray().at(e);this.multiCtrlArray().removeAt(e,{emitEvent:!1}),this.multiCtrlArray().insert(e-1,t,{emitEvent:!1})}moveDown(e){let t=this.multiCtrlArray().at(e);this.multiCtrlArray().removeAt(e,{emitEvent:!1}),this.multiCtrlArray().insert(e+1,t,{emitEvent:!1})}deletePath(e){this.delPath.emit(e),this.arrayLength=this.multiCtrlArray().length}getFormGroup(e){return e}ngOnDestroy(){this.multiCtrlArraySubscription?.unsubscribe()}static \u0275fac=function(t){return new(t||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(t,a){t&1&&(n(0,"div",0)(1,"div",1),T(2,pi,1,3,"boolean-control-config",2,Mt),n(4,"button",3),b("click",function(){return a.addCtrlGroup()}),n(5,"mat-icon"),r(6,"add"),i()()()()),t&2&&(d("formGroup",a.multiFormGroup),s(2),S(a.multiCtrlArray().controls))},dependencies:[B,j,P,K,lo,Eo,oe,qa,ae,N],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})();var ui=["*"];var fi=new $("MAT_CARD_CONFIG"),gl=(()=>{class o{appearance;constructor(){let e=p(fi,{optional:!0});this.appearance=e?.appearance||"raised"}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=v({type:o,selectors:[["mat-card"]],hostAttrs:[1,"mat-mdc-card","mdc-card"],hostVars:4,hostBindings:function(t,a){t&2&&X("mat-mdc-card-outlined",a.appearance==="outlined")("mdc-card--outlined",a.appearance==="outlined")},inputs:{appearance:"appearance"},exportAs:["matCard"],ngContentSelectors:ui,decls:1,vars:0,template:function(t,a){t&1&&(Re(),Ue(0))},styles:[`.mat-mdc-card{display:flex;flex-direction:column;box-sizing:border-box;position:relative;border-style:solid;border-width:0;background-color:var(--mdc-elevated-card-container-color, var(--mat-sys-surface-container-low));border-color:var(--mdc-elevated-card-container-color, var(--mat-sys-surface-container-low));border-radius:var(--mdc-elevated-card-container-shape, var(--mat-sys-corner-medium));box-shadow:var(--mdc-elevated-card-container-elevation, var(--mat-sys-level1))}.mat-mdc-card::after{position:absolute;top:0;left:0;width:100%;height:100%;border:solid 1px rgba(0,0,0,0);content:"";display:block;pointer-events:none;box-sizing:border-box;border-radius:var(--mdc-elevated-card-container-shape, var(--mat-sys-corner-medium))}.mat-mdc-card-outlined{background-color:var(--mdc-outlined-card-container-color, var(--mat-sys-surface));border-radius:var(--mdc-outlined-card-container-shape, var(--mat-sys-corner-medium));border-width:var(--mdc-outlined-card-outline-width, 1px);border-color:var(--mdc-outlined-card-outline-color, var(--mat-sys-outline-variant));box-shadow:var(--mdc-outlined-card-container-elevation, var(--mat-sys-level0))}.mat-mdc-card-outlined::after{border:none}.mdc-card__media{position:relative;box-sizing:border-box;background-repeat:no-repeat;background-position:center;background-size:cover}.mdc-card__media::before{display:block;content:""}.mdc-card__media:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}.mdc-card__media:last-child{border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}.mat-mdc-card-actions{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;min-height:52px;padding:8px}.mat-mdc-card-title{font-family:var(--mat-card-title-text-font, var(--mat-sys-title-large-font));line-height:var(--mat-card-title-text-line-height, var(--mat-sys-title-large-line-height));font-size:var(--mat-card-title-text-size, var(--mat-sys-title-large-size));letter-spacing:var(--mat-card-title-text-tracking, var(--mat-sys-title-large-tracking));font-weight:var(--mat-card-title-text-weight, var(--mat-sys-title-large-weight))}.mat-mdc-card-subtitle{color:var(--mat-card-subtitle-text-color, var(--mat-sys-on-surface));font-family:var(--mat-card-subtitle-text-font, var(--mat-sys-title-medium-font));line-height:var(--mat-card-subtitle-text-line-height, var(--mat-sys-title-medium-line-height));font-size:var(--mat-card-subtitle-text-size, var(--mat-sys-title-medium-size));letter-spacing:var(--mat-card-subtitle-text-tracking, var(--mat-sys-title-medium-tracking));font-weight:var(--mat-card-subtitle-text-weight, var(--mat-sys-title-medium-weight))}.mat-mdc-card-title,.mat-mdc-card-subtitle{display:block;margin:0}.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-title,.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-subtitle{padding:16px 16px 0}.mat-mdc-card-header{display:flex;padding:16px 16px 0}.mat-mdc-card-content{display:block;padding:0 16px}.mat-mdc-card-content:first-child{padding-top:16px}.mat-mdc-card-content:last-child{padding-bottom:16px}.mat-mdc-card-title-group{display:flex;justify-content:space-between;width:100%}.mat-mdc-card-avatar{height:40px;width:40px;border-radius:50%;flex-shrink:0;margin-bottom:16px;object-fit:cover}.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-subtitle,.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-title{line-height:normal}.mat-mdc-card-sm-image{width:80px;height:80px}.mat-mdc-card-md-image{width:112px;height:112px}.mat-mdc-card-lg-image{width:152px;height:152px}.mat-mdc-card-xl-image{width:240px;height:240px}.mat-mdc-card-subtitle~.mat-mdc-card-title,.mat-mdc-card-title~.mat-mdc-card-subtitle,.mat-mdc-card-header .mat-mdc-card-header-text .mat-mdc-card-title,.mat-mdc-card-header .mat-mdc-card-header-text .mat-mdc-card-subtitle,.mat-mdc-card-title-group .mat-mdc-card-title,.mat-mdc-card-title-group .mat-mdc-card-subtitle{padding-top:0}.mat-mdc-card-content>:last-child:not(.mat-mdc-card-footer){margin-bottom:0}.mat-mdc-card-actions-align-end{justify-content:flex-end}
3
- `],encapsulation:2,changeDetection:0})}return o})();var Do=(()=>{class o{static \u0275fac=function(t){return new(t||o)};static \u0275mod=ge({type:o});static \u0275inj=ue({imports:[q,q]})}return o})();function gi(o,c){if(o&1&&(n(0,"mat-option",8),r(1),i()),o&2){let e=c.$implicit;Ee("value",e.value),s(),x(e.label)}}var Fo=(()=>{class o{dsService=p(et);app=p(je);displayName=f.required();showLabel=f.required();convertUnitTo=f.required();datasetUUID=f.required();datasetAverageArray=f.required();showAverageData=f.required();trackAgainstAverage=f.required();showDatasetMinimumValueLine=f.required();showDatasetMaximumValueLine=f.required();showDatasetAverageValueLine=f.required();showDatasetAngleAverageValueLine=f.required();verticalGraph=f.required();showTimeScale=f.required();showYScale=f.required();startScaleAtZero=f.required();yScaleSuggestedMin=f.required();yScaleSuggestedMax=f.required();enableMinMaxScaleLimit=f.required();yScaleMin=f.required();yScaleMax=f.required();numDecimal=f.required();color=f.required();colors=[];ngOnInit(){this.colors=this.app.configurableThemeColors,this.showAverageData().value||this.trackAgainstAverage().disable(),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(t){return new(t||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"],verticalGraph:[1,"verticalGraph"],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:80,vars:18,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"],[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","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(t,a){if(t&1){let l=A();n(0,"div",1)(1,"div",2)(2,"div",3)(3,"mat-form-field",4)(4,"mat-label"),r(5,"Widget Label"),i(),g(6,"input",5),i()(),n(7,"div",3)(8,"mat-checkbox",6),r(9," Show Label "),i()()(),n(10,"div",2)(11,"mat-form-field",4)(12,"mat-label"),r(13,"Color"),i(),n(14,"mat-select",7),T(15,gi,2,2,"mat-option",8,G),i()()(),n(17,"div",2)(18,"div",9)(19,"div")(20,"p"),r(21,"Series"),i(),n(22,"mat-form-field",10)(23,"mat-label"),r(24,"Value Decimal Places"),i(),g(25,"input",11),i(),n(26,"mat-checkbox",12),b("change",function(h){return M(l),y(a.enableTrackAgainstMovingAverage(h))}),r(27," Display Moving Average "),i(),n(28,"mat-checkbox",13),r(29," Track Against Moving Average "),i()()(),n(30,"div",9)(31,"div")(32,"p",14),r(33,"Data Scale"),i(),n(34,"span",15),r(35,"(Default node is automatic scale)"),i(),n(36,"mat-radio-group",16)(37,"mat-radio-button",17),b("change",function(h){return M(l),y(a.setScaleControls(h))}),r(38,"Auto Scale"),i(),n(39,"div",18)(40,"mat-form-field",19)(41,"mat-label"),r(42,"Suggested Min"),i(),g(43,"input",20),i(),n(44,"mat-form-field",19)(45,"mat-label"),r(46,"Suggested Max"),i(),g(47,"input",21),i()(),n(48,"mat-radio-button",17),b("change",function(h){return M(l),y(a.setScaleControls(h))}),r(49,"Fixed Scale"),i(),n(50,"div",18)(51,"div",22)(52,"mat-form-field",19)(53,"mat-label"),r(54,"Min"),i(),g(55,"input",23),i()(),n(56,"div",22)(57,"mat-form-field",19)(58,"mat-label"),r(59,"Max"),i(),g(60,"input",24),i()()()(),n(61,"mat-checkbox",25),r(62," Show Scale Ticks "),i()()(),n(63,"div",9)(64,"div")(65,"p",14),r(66,"Time Scale"),i(),n(67,"mat-checkbox",26),r(68," Show Scale Ticks "),i()()(),n(69,"div",9)(70,"div")(71,"p",14),r(72,"Dataset"),i(),n(73,"mat-checkbox",27),r(74," Show Maximum Line "),i(),n(75,"mat-checkbox",28),r(76," Show Average Line "),i(),n(77,"mat-checkbox",29,0),r(79," Show Minimum Line "),i()()()()()}t&2&&(s(6),d("formControl",a.displayName()),s(2),d("formControl",a.showLabel()),s(6),d("formControl",a.color()),s(),S(a.colors),s(10),d("formControl",a.numDecimal()),s(),d("formControl",a.showAverageData()),s(2),d("formControl",a.trackAgainstAverage()),s(8),d("formControl",a.enableMinMaxScaleLimit()),s(),d("value",!1),s(6),d("formControl",a.yScaleSuggestedMin()),s(4),d("formControl",a.yScaleSuggestedMax()),s(),d("value",!0),s(7),d("formControl",a.yScaleMin()),s(5),d("formControl",a.yScaleMax()),s(),d("formControl",a.showYScale()),s(6),d("formControl",a.showTimeScale()),s(6),d("formControl",a.showDatasetMaximumValueLine()),s(2),d("formControl",a.showDatasetAverageValueLine()),s(2),d("formControl",a.showDatasetMinimumValueLine()))},dependencies:[Do,Je,L,O,Nt,we,Lt,ne,U,pt,Pt,R,To,Mo,yo,P,V,xe,I,F,Ze,It,ie],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})();function hi(o,c){if(o&1&&(n(0,"mat-option",4),r(1),i()),o&2){let e=c.$implicit;d("value",e.uuid),s(),Q(" ",e.label," ")}}function bi(o,c){if(o&1&&(n(0,"mat-option",4),r(1),i()),o&2){let e=c.$implicit;d("value",e.measure),s(),Q(" ",e.description," ")}}function _i(o,c){if(o&1&&(n(0,"mat-optgroup",6),T(1,bi,2,2,"mat-option",4,Mt),i()),o&2){let e=c.$implicit;d("label",e.group),s(),S(e.units)}}var Po=(()=>{class o{datasetService=p(et);units=p(tt);datasetUUID=f.required();convertUnitTo=f.required();availableDataSets=[];unitList={};ngOnInit(){this.availableDataSets=this.datasetService.list().sort();let e=this.datasetUUID();e.value?(this.setPathUnits(e.value),this.convertUnitTo().enable()):this.convertUnitTo().disable()}setPathUnits(e){this.convertUnitTo().enable(),e?this.unitList=this.units.getConversionsForPath(this.datasetService.getDatasetConfig(e).path):this.unitList=this.units.getConversionsForPath("")}datasetChanged(e){this.setPathUnits(e.value)}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=v({type:o,selectors:[["config-dataset-chart-options"]],inputs:{datasetUUID:[1,"datasetUUID"],convertUnitTo:[1,"convertUnitTo"]},decls:14,vars:2,consts:[[1,"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(t,a){t&1&&(n(0,"div",0)(1,"div",1)(2,"mat-form-field",2)(3,"mat-label"),r(4,"Dataset"),i(),n(5,"mat-select",3),b("selectionChange",function(m){return a.datasetChanged(m)}),T(6,hi,2,2,"mat-option",4,G),i()(),n(8,"mat-form-field",2)(9,"mat-label"),r(10,"Display Format"),i(),n(11,"mat-select",5),T(12,_i,3,1,"mat-optgroup",6,G),i()()()()),t&2&&(s(5),d("formControl",a.datasetUUID()),s(),S(a.availableDataSets),s(5),d("formControl",a.convertUnitTo()),s(),S(a.unitList.conversions))},dependencies:[Je,L,O,Lt,ne,U,Ot,P,I,F,ie],encapsulation:2})}return o})();var Oo=(()=>{class o{transform(e,t){return Object.keys(e)}static \u0275fac=function(t){return new(t||o)};static \u0275pipe=ga({name:"objectKeys",type:o,pure:!0})}return o})();var Ci=["panel"],Mi=["*"];function yi(o,c){if(o&1&&(n(0,"div",1,0),Ue(2),i()),o&2){let e=c.id,t=u();ba(t._classList),X("mat-mdc-autocomplete-visible",t.showPanel)("mat-mdc-autocomplete-hidden",!t.showPanel)("mat-autocomplete-panel-animations-enabled",!t._animationsDisabled)("mat-primary",t._color==="primary")("mat-accent",t._color==="accent")("mat-warn",t._color==="warn"),d("id",t.id),le("aria-label",t.ariaLabel||null)("aria-labelledby",t._getPanelAriaLabelledby(e))}}var Qt=class{source;option;constructor(c,e){this.source=c,this.option=e}},Vo=new $("mat-autocomplete-default-options",{providedIn:"root",factory:Ti});function Ti(){return{autoActiveFirstOption:!1,autoSelectActiveOption:!1,hideSingleSelectionIndicator:!1,requireSelection:!1,hasBackdrop:!1}}var Ut=(()=>{class o{_changeDetectorRef=p(ze);_elementRef=p(rt);_defaults=p(Vo);_animationsDisabled=p(Be,{optional:!0})==="NoopAnimations";_activeOptionChanges=ht.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 Y;opened=new Y;closed=new Y;optionActivated=new Y;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=p(mt).getId("mat-autocomplete-");inertGroups;constructor(){let e=p(La);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 Ba(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 t=new Qt(this,e);this.optionSelected.emit(t)}_getPanelAriaLabelledby(e){if(this.ariaLabel)return null;let t=e?e+" ":"";return this.ariaLabelledby?t+this.ariaLabelledby:e}_skipPredicate(){return!1}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=v({type:o,selectors:[["mat-autocomplete"]],contentQueries:function(t,a,l){if(t&1&&(st(l,U,5),st(l,uo,5)),t&2){let m;he(m=be())&&(a.options=m),he(m=be())&&(a.optionGroups=m)}},viewQuery:function(t,a){if(t&1&&(ct(pa,7),ct(Ci,5)),t&2){let l;he(l=be())&&(a.template=l.first),he(l=be())&&(a.panel=l.first)}},hostAttrs:[1,"mat-mdc-autocomplete"],inputs:{ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],displayWith:"displayWith",autoActiveFirstOption:[2,"autoActiveFirstOption","autoActiveFirstOption",k],autoSelectActiveOption:[2,"autoSelectActiveOption","autoSelectActiveOption",k],requireSelection:[2,"requireSelection","requireSelection",k],panelWidth:"panelWidth",disableRipple:[2,"disableRipple","disableRipple",k],classList:[0,"class","classList"],hideSingleSelectionIndicator:[2,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",k]},outputs:{optionSelected:"optionSelected",opened:"opened",closed:"closed",optionActivated:"optionActivated"},exportAs:["matAutocomplete"],features:[dt([{provide:po,useExisting:o}])],ngContentSelectors:Mi,decls:1,vars:0,consts:[["panel",""],["role","listbox",1,"mat-mdc-autocomplete-panel","mdc-menu-surface","mdc-menu-surface--open",3,"id"]],template:function(t,a){t&1&&(Re(),_(0,yi,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:static;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}
4
- `],encapsulation:2,changeDetection:0})}return o})();var Si={provide:kt,useExisting:vt(()=>ut),multi:!0};var Bo=new $("mat-autocomplete-scroll-strategy",{providedIn:"root",factory:()=>{let o=p(Ke);return()=>o.scrollStrategies.reposition()}});function xi(o){return()=>o.scrollStrategies.reposition()}var wi={provide:Bo,deps:[Ke],useFactory:xi},ut=(()=>{class o{_environmentInjector=p(sa);_element=p(rt);_overlay=p(Ke);_viewContainerRef=p(fa);_zone=p(da);_changeDetectorRef=p(ze);_dir=p(Et,{optional:!0});_formField=p(so,{optional:!0,host:!0});_viewportRuler=p(Ka);_scrollStrategy=p(Bo);_renderer=p(ua);_defaults=p(Vo,{optional:!0});_overlayRef;_portal;_componentDestroyed=!1;_initialized=new it;_keydownSubscription;_outsideClickSubscription;_cleanupWindowBlur;_previousValue;_valueOnAttach;_valueOnLastKeydown;_positionStrategy;_manuallyFloatingLabel=!1;_closingActionsSubscription;_viewportSubscription=ht.EMPTY;_breakpointObserver=p(At);_handsetLandscapeSubscription=ht.EMPTY;_canOpenOnNextFocus=!0;_valueBeforeAutoSelection;_pendingAutoselectedOption;_closeKeyEventStream=new it;_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&&Gt(this._trackedModal,"aria-owns",this.autocomplete.id))}updatePosition(){this._overlayAttached&&this._overlayRef.updatePosition()}get panelClosingActions(){return Oe(this.optionSelections,this.autocomplete._keyManager.tabOut.pipe(pe(()=>this._overlayAttached)),this._closeKeyEventStream,this._getOutsideClickStream(),this._overlayRef?this._overlayRef.detachments().pipe(pe(()=>this._overlayAttached)):Ht()).pipe(Pe(e=>e instanceof fo?e:null))}optionSelections=ia(()=>{let e=this.autocomplete?this.autocomplete.options:null;return e?e.changes.pipe(Ne(e),_t(()=>Oe(...e.map(t=>t.onSelectionChange)))):this._initialized.pipe(_t(()=>this.optionSelections))});get activeOption(){return this.autocomplete&&this.autocomplete._keyManager?this.autocomplete._keyManager.activeItem:null}_getOutsideClickStream(){return new jt(e=>{let t=l=>{let m=Oa(l),h=this._formField?this._formField.getConnectedOverlayOrigin().nativeElement:null,D=this.connectedTo?this.connectedTo.elementRef.nativeElement:null;this._overlayAttached&&m!==this._element.nativeElement&&!this._hasFocus()&&(!h||!h.contains(m))&&(!D||!D.contains(m))&&this._overlayRef&&!this._overlayRef.overlayElement.contains(m)&&e.next(l)},a=[this._renderer.listen("document","click",t),this._renderer.listen("document","auxclick",t),this._renderer.listen("document","touchend",t)];return()=>{a.forEach(l=>l())}})}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 t=e.keyCode,a=He(e);if(t===27&&!a&&e.preventDefault(),this._valueOnLastKeydown=this._element.nativeElement.value,this.activeOption&&t===13&&this.panelOpen&&!a)this.activeOption._selectViaInteraction(),this._resetActiveItem(),e.preventDefault();else if(this.autocomplete){let l=this.autocomplete._keyManager.activeItem,m=t===38||t===40;t===9||m&&!a&&this.panelOpen?this.autocomplete._keyManager.onKeydown(e):m&&this._canOpen()&&this._openPanelInternal(this._valueOnLastKeydown),(m||this.autocomplete._keyManager.activeItem!==l)&&(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 t=e.target,a=t.value;if(t.type==="number"&&(a=a==""?null:parseFloat(a)),this._previousValue!==a){if(this._previousValue=a,this._pendingAutoselectedOption=null,(!this.autocomplete||!this.autocomplete.requireSelection)&&this._onChange(a),!a)this._clearPreviousSelectedOption(null,!1);else if(this.panelOpen&&!this.autocomplete.requireSelection){let l=this.autocomplete.options?.find(m=>m.selected);if(l){let m=this._getDisplayValue(l.value);a!==m&&l.deselect(!1)}}if(this._canOpen()&&this._hasFocus()){let l=this._valueOnLastKeydown??this._element.nativeElement.value;this._valueOnLastKeydown=null,this._openPanelInternal(l)}}}_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 Pa()===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 jt(a=>{ma(()=>{a.next()},{injector:this._environmentInjector})}),t=this.autocomplete.options?.changes.pipe(la(()=>this._positionStrategy.reapplyLastPosition()),ra(0))??Ht();return Oe(e,t).pipe(_t(()=>this._zone.run(()=>{let a=this.panelOpen;return this._resetActiveItem(),this._updatePanelState(),this._changeDetectorRef.detectChanges(),this.panelOpen&&this._overlayRef.updatePosition(),a!==this.panelOpen&&(this.panelOpen?this._emitOpened():this.autocomplete.closed.emit()),this.panelClosingActions})),Le(1)).subscribe(a=>this._setValueAndClose(a))}_emitOpened(){this.autocomplete.opened.emit()}_destroyPanel(){this._overlayRef&&(this.closePanel(),this._overlayRef.dispose(),this._overlayRef=null)}_getDisplayValue(e){let t=this.autocomplete;return t&&t.displayWith?t.displayWith(e):e}_assignOptionValue(e){let t=this._getDisplayValue(e);e==null&&this._clearPreviousSelectedOption(null,!1),this._updateNativeInputValue(t??"")}_updateNativeInputValue(e){this._formField?this._formField._control.value=e:this._element.nativeElement.value=e,this._previousValue=e}_setValueAndClose(e){let t=this.autocomplete,a=e?e.source:this._pendingAutoselectedOption;a?(this._clearPreviousSelectedOption(a),this._assignOptionValue(a.value),this._onChange(a.value),t._emitSelectEvent(a),this._element.nativeElement.focus()):t.requireSelection&&this._element.nativeElement.value!==this._valueOnAttach&&(this._clearPreviousSelectedOption(null),this._assignOptionValue(null),this._onChange(null)),this.closePanel()}_clearPreviousSelectedOption(e,t){this.autocomplete?.options?.forEach(a=>{a!==e&&a.selected&&a.deselect(t)})}_openPanelInternal(e=this._element.nativeElement.value){if(this._attachOverlay(e),this._floatLabel(),this._trackedModal){let t=this.autocomplete.id;Zt(this._trackedModal,"aria-owns",t)}}_attachOverlay(e){this.autocomplete;let t=this._overlayRef;t?(this._positionStrategy.setOrigin(this._getConnectedElement()),t.updateSize({width:this._getPanelWidth()})):(this._portal=new za(this.autocomplete.template,this._viewContainerRef,{id:this._formField?.getLabelId()}),t=this._overlay.create(this._getOverlayConfig()),this._overlayRef=t,this._viewportSubscription=this._viewportRuler.change().subscribe(()=>{this.panelOpen&&t&&t.updateSize({width:this._getPanelWidth()})}),this._handsetLandscapeSubscription=this._breakpointObserver.observe(se.HandsetLandscape).subscribe(l=>{l.matches?this._positionStrategy.withFlexibleDimensions(!0).withGrowAfterOpen(!0).withViewportMargin(8):this._positionStrategy.withFlexibleDimensions(!1).withGrowAfterOpen(!1).withViewportMargin(0)})),t&&!t.hasAttached()&&(t.attach(this._portal),this._valueOnAttach=e,this._valueOnLastKeydown=null,this._closingActionsSubscription=this._subscribeToClosingActions());let a=this.panelOpen;this.autocomplete._isOpen=this._overlayAttached=!0,this.autocomplete._latestOpeningTrigger=this,this.autocomplete._setColor(this._formField?.color),this._updatePanelState(),this._applyModalPanelOwnership(),this.panelOpen&&a!==this.panelOpen&&this._emitOpened()}_handlePanelKeydown=e=>{(e.keyCode===27&&!He(e)||e.keyCode===38&&He(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 Ya({positionStrategy:this._getOverlayPosition(),scrollStrategy:this._scrollStrategy(),width:this._getPanelWidth(),direction:this._dir??void 0,hasBackdrop:this._defaults?.hasBackdrop,backdropClass:this._defaults?.backdropClass,panelClass:this._defaults?.overlayPanelClass})}_getOverlayPosition(){let e=this._overlay.position().flexibleConnectedTo(this._getConnectedElement()).withFlexibleDimensions(!1).withPush(!1);return this._setStrategyPositions(e),this._positionStrategy=e,e}_setStrategyPositions(e){let t=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],a=this._aboveClass,l=[{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:a},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",panelClass:a}],m;this.position==="above"?m=l:this.position==="below"?m=t:m=[...t,...l],e.withPositions(m)}_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 t=-1;for(let a=0;a<e.options.length;a++)if(!e.options.get(a).disabled){t=a;break}e._keyManager.setActiveItem(t)}else e._keyManager.setActiveItem(-1)}_canOpen(){let e=this._element.nativeElement;return!e.readOnly&&!e.disabled&&!this.autocompleteDisabled}_scrollToOption(e){let t=this.autocomplete,a=go(e,t.options,t.optionGroups);if(e===0&&a===1)t._setScrollTop(0);else if(t.panel){let l=t.options.toArray()[e];if(l){let m=l._getHostElement(),h=ho(m.offsetTop,m.offsetHeight,t._getScrollTop(),t.panel.nativeElement.offsetHeight);t._setScrollTop(h)}}}_trackedModal=null;_applyModalPanelOwnership(){let e=this._element.nativeElement.closest('body > .cdk-overlay-container [aria-modal="true"]');if(!e)return;let t=this.autocomplete.id;this._trackedModal&&Gt(this._trackedModal,"aria-owns",t),Zt(e,"aria-owns",t),this._trackedModal=e}_clearFromModal(){if(this._trackedModal){let e=this.autocomplete.id;Gt(this._trackedModal,"aria-owns",e),this._trackedModal=null}}static \u0275fac=function(t){return new(t||o)};static \u0275dir=lt({type:o,selectors:[["input","matAutocomplete",""],["textarea","matAutocomplete",""]],hostAttrs:[1,"mat-mdc-autocomplete-trigger"],hostVars:7,hostBindings:function(t,a){t&1&&b("focusin",function(){return a._handleFocus()})("blur",function(){return a._onTouched()})("input",function(m){return a._handleInput(m)})("keydown",function(m){return a._handleKeydown(m)})("click",function(){return a._handleClick()}),t&2&&le("autocomplete",a.autocompleteAttribute)("role",a.autocompleteDisabled?null:"combobox")("aria-autocomplete",a.autocompleteDisabled?null:"list")("aria-activedescendant",a.panelOpen&&a.activeOption?a.activeOption.id:null)("aria-expanded",a.autocompleteDisabled?null:a.panelOpen.toString())("aria-controls",a.autocompleteDisabled||!a.panelOpen||a.autocomplete==null?null:a.autocomplete.id)("aria-haspopup",a.autocompleteDisabled?null:"listbox")},inputs:{autocomplete:[0,"matAutocomplete","autocomplete"],position:[0,"matAutocompletePosition","position"],connectedTo:[0,"matAutocompleteConnectedTo","connectedTo"],autocompleteAttribute:[0,"autocomplete","autocompleteAttribute"],autocompleteDisabled:[2,"matAutocompleteDisabled","autocompleteDisabled",k]},exportAs:["matAutocompleteTrigger"],features:[dt([Si]),Ve]})}return o})(),Ro=(()=>{class o{static \u0275fac=function(t){return new(t||o)};static \u0275mod=ge({type:o});static \u0275inj=ue({providers:[wi],imports:[Za,pt,q,$a,pt,q]})}return o})();var Gi=(o,c)=>c.path;function Ei(o,c){o&1&&g(0,"i",21)}function ki(o,c){o&1&&g(0,"i",22)}function Di(o,c){if(o&1&&(n(0,"mat-option",15),r(1),i()),o&2){let e=c.$implicit;d("value",e),s(),yt("",e.properties.quantity,": ",e.properties.display,"")}}function Ii(o,c){if(o&1){let e=A();n(0,"div",5)(1,"mat-form-field",20)(2,"mat-label"),_(3,Ei,1,0,"i",21)(4,ki,1,0,"i",22),r(5," Filter"),i(),n(6,"mat-select",23,2),b("selectionChange",function(){M(e),u();let a=te(10),l=u();return y(l.pathFormGroup.controls.path.setValue(a.value))}),n(8,"mat-option"),r(9,"All"),i(),T(10,Di,2,3,"mat-option",15,G),i()()()}if(o&2){let e=te(7),t=u(2);s(3),C(e.value?4:3),s(3),d("formControl",t.pathSkUnitsFilterControl),s(4),S(t.pathSkUnitsFiltersList)}}function Fi(o,c){if(o&1){let e=A();n(0,"button",24),b("click",function(){M(e);let a=u(2);return y(a.pathFormGroup.controls.path.setValue(""))}),n(1,"mat-icon"),r(2,"close"),i()()}}function Pi(o,c){o&1&&(n(0,"mat-error"),r(1," Path is required. Please enter a valid Signal K path. "),i())}function Oi(o,c){o&1&&(n(0,"mat-error"),r(1," Path not recognized. Please enter a path from the server's published list. "),i())}function Li(o,c){if(o&1&&(n(0,"span"),r(1),i(),g(2,"br"),n(3,"small",25),r(4),i()),o&2){let e=u().$implicit;s(),x(e.path),s(3),x(e.meta.description)}}function Ni(o,c){if(o&1&&r(0),o&2){let e=u().$implicit;Q(" ",e.path," ")}}function Vi(o,c){if(o&1&&(n(0,"mat-option",10),_(1,Li,5,2)(2,Ni,1,1),i()),o&2){let e=c.$implicit;d("value",e.path),s(),C(e.meta!=null?1:2)}}function Bi(o,c){if(o&1&&(n(0,"mat-option",15),r(1),i()),o&2){let e=c.$implicit;d("value",e),s(),Q(" ",e," ")}}function Ri(o,c){if(o&1&&(n(0,"mat-option",15),r(1),i()),o&2){let e=c.$implicit;d("value",e.measure),s(),Q(" ",e.description," ")}}function Ui(o,c){if(o&1&&(n(0,"mat-optgroup",27),T(1,Ri,2,2,"mat-option",15,G),i()),o&2){let e=c.$implicit;d("label",e.group),s(),S(e.units)}}function Wi(o,c){if(o&1&&(n(0,"mat-form-field",19)(1,"mat-label"),r(2,"Display Format"),i(),n(3,"mat-select",26),T(4,Ui,3,1,"mat-optgroup",27,G),i()()),o&2){let e=u(2);s(4),S(e.unitList.conversions)}}function qi(o,c){if(o&1&&(n(0,"div",3)(1,"div",4)(2,"span"),r(3),i()(),_(4,Ii,12,2,"div",5),n(5,"div",6)(6,"mat-form-field",7)(7,"mat-label"),r(8,"Signal K Path"),i(),g(9,"input",8,0),_(11,Fi,3,0,"button",9)(12,Pi,2,0,"mat-error")(13,Oi,2,0,"mat-error"),n(14,"mat-autocomplete",null,1),T(16,Vi,3,2,"mat-option",10,Gi),We(18,"async"),i()()(),n(19,"div",11)(20,"div",12)(21,"mat-form-field",13)(22,"mat-label"),r(23,"Data Source"),i(),n(24,"mat-select",14),T(25,Bi,2,2,"mat-option",15,G),i()()(),n(27,"div",16)(28,"mat-form-field",13)(29,"mat-label"),r(30,"Sample Time"),i(),g(31,"input",17),i()(),n(32,"div",18),_(33,Wi,6,0,"mat-form-field",19),i()()()),o&2){let e=te(15),t=u();d("formGroup",t.pathFormGroup),s(2),Ct("color",t.pathFormGroup.enabled?"":"rgba(255,255,255,0.5)"),s(),x(t.pathFormGroup.value.description),s(),C(t.pathFormGroup.value.pathType=="number"&&t.showPathSkUnitsFilter?4:-1),s(5),d("matAutocomplete",e),s(2),C(t.pathFormGroup.value.path?11:-1),s(),C(t.pathFormGroup.controls.path.errors!=null&&t.pathFormGroup.controls.path.errors.required?12:t.pathFormGroup.controls.path.errors!=null&&t.pathFormGroup.controls.path.errors.requireMatch?13:-1),s(4),S(qe(18,9,t.filteredPaths)),s(9),S(t.availableSources),s(8),C(t.pathFormGroup.value.pathType=="number"&&t.pathFormGroup.value.isConvertUnitToConfigurable===void 0||t.pathFormGroup.value.pathType=="number"&&t.pathFormGroup.value.isConvertUnitToConfigurable===!0?33:-1)}}function zi(o){return c=>o().some(a=>a.path===c.value)?null:{requireMatch:!0}}var Uo=(()=>{class o{data=p(Ia);units=p(tt);pathFormGroup;filterSelfPaths=f.required();availablePaths;filteredPaths=new nt(null);pathValueChange$=null;pathFormGroup$=null;availableSources;unitList={base:"",conversions:[]};showPathSkUnitsFilter=!1;pathSkUnitsFilterControl=new io(null);pathSkUnitsFiltersList;unitlessUnit={unit:"unitless",properties:{display:"(null)",quantity:"Unitless",quantityDisplay:"(null)",description:""}};ngOnInit(){this.pathSkUnitsFiltersList=this.units.skBaseUnits.sort((e,t)=>e.properties.quantity>t.properties.quantity?1:-1),this.pathSkUnitsFiltersList.unshift(this.unitlessUnit),this.pathFormGroup.value.pathSkUnitsFilter&&this.pathSkUnitsFilterControl.setValue(this.pathSkUnitsFiltersList.find(e=>e.unit===this.pathFormGroup.value.pathSkUnitsFilter),{onlySelf:!0}),this.pathFormGroup.value.showPathSkUnitsFilter&&(this.showPathSkUnitsFilter=this.pathFormGroup.value.showPathSkUnitsFilter),this.pathFormGroup.controls.path.setValidators([E.required,zi(()=>this.getPaths())]),this.pathFormGroup.controls.path.updateValueAndValidity({onlySelf:!0,emitEvent:!1}),this.pathFormGroup.controls.path.valid?this.enableFormFields(!1):this.disablePathFields(),this.pathFormGroup.controls.sampleTime||(this.pathFormGroup.addControl("sampleTime",new H("500",E.required)),this.pathFormGroup.controls.sampleTime.updateValueAndValidity({onlySelf:!0,emitEvent:!1})),this.pathValueChange$=this.pathFormGroup.controls.path.valueChanges.pipe(na(e=>e===""?Kt(0):Kt(350)),Ne(""),Pe(e=>this.filterPaths(e||""))).subscribe(e=>{this.pathFormGroup.controls.path.pristine||(this.pathFormGroup.controls.path.valid?(this.enableFormFields(!0),this.updatePathMetaBoundDisplayName(this.pathFormGroup.controls.path.value),this.updatePathMetaBoundDisplayScale(this.pathFormGroup.controls.path.value)):this.disablePathFields())}),this.pathFormGroup$=this.pathFormGroup.controls.pathType.valueChanges.subscribe(e=>{this.pathSkUnitsFilterControl.setValue(this.unitlessUnit),this.pathFormGroup.controls.path.updateValueAndValidity()})}ngOnChanges(e){e.filterSelfPaths&&!e.filterSelfPaths.firstChange&&this.pathFormGroup.controls.path.updateValueAndValidity()}getPaths(){let e=this.pathFormGroup.controls.pathType.value,t=this.filterSelfPaths();return this.data.getPathsAndMetaByType(e,this.pathFormGroup.value.supportsPut,t).sort()}filterPaths(e){let t=e.toLowerCase(),a=this.getPaths();this.pathSkUnitsFilterControl.value!=null&&(a=a.filter(l=>l.meta&&l.meta.units&&l.meta.units===this.pathSkUnitsFilterControl.value.unit||(!l.meta||!l.meta.units)&&this.pathSkUnitsFilterControl.value.unit==="unitless")),a=a.filter(l=>l.path.toLowerCase().includes(t)),this.filteredPaths.next(a)}enableFormFields(e){let t=this.data.getPathObject(this.pathFormGroup.controls.path.value);t!=null?(this.pathFormGroup.controls.sampleTime.enable({onlySelf:!1}),this.pathFormGroup.controls.pathType.value=="number"&&(this.unitList=this.units.getConversionsForPath(this.pathFormGroup.controls.path.value),e&&this.pathFormGroup.controls.convertUnitTo.setValue(this.unitList.base,{onlySelf:!0}),this.pathFormGroup.controls.convertUnitTo.enable({onlySelf:!1})),Object.keys(t.sources).length==1?(this.availableSources=["default"],e?this.pathFormGroup.controls.source.value!="default"&&this.pathFormGroup.controls.source.setValue("default",{onlySelf:!0}):this.pathFormGroup.controls.source.value!="default"&&this.pathFormGroup.controls.source.setValue("",{onlySelf:!0})):Object.keys(t.sources).length>1&&(this.availableSources=Object.keys(t.sources),this.pathFormGroup.controls.source.value=="default"&&this.pathFormGroup.controls.source.reset()),this.pathFormGroup.controls.source.enable({onlySelf:!1})):this.disablePathFields()}disablePathFields(){this.pathFormGroup.controls.source.reset("",{onlySelf:!0}),this.pathFormGroup.controls.source.disable({onlySelf:!1}),this.pathFormGroup.controls.sampleTime.disable({onlySelf:!1}),this.pathFormGroup.controls.pathType.value=="number"&&(this.pathFormGroup.controls.convertUnitTo.reset("",{onlySelf:!0}),this.pathFormGroup.controls.convertUnitTo.disable({onlySelf:!1}))}updatePathMetaBoundDisplayName(e){if(!this.pathFormGroup.parent.parent.value.hasOwnProperty("displayName"))return;let t=this.data.getPathMeta(e);t?.displayName&&this.pathFormGroup.parent.parent.controls.displayName.setValue(t.displayName)}updatePathMetaBoundDisplayScale(e){if(!this.pathFormGroup.parent.parent.value.hasOwnProperty("displayScale"))return;let t=this.data.getPathMeta(e);if(t?.displayScale){let a=this.pathFormGroup.parent.parent.get("displayScale"),l=this.pathFormGroup.controls.convertUnitTo.value;t.displayScale.lower!==null&&t.displayScale.lower!==void 0&&a.controls.lower.setValue(this.units.convertToUnit(l,t.displayScale.lower)),t.displayScale.upper!==null&&t.displayScale.upper!==void 0&&a.controls.upper.setValue(this.units.convertToUnit(l,t.displayScale.upper)),t.displayScale.type!==null&&t.displayScale.type!==void 0&&a.controls.type.setValue(t.displayScale.type),t.displayScale.power!==null&&t.displayScale.power!==void 0&&a.controls.power.setValue(t.displayScale.power)}}ngOnDestroy(){this.pathValueChange$?.unsubscribe(),this.pathFormGroup$?.unsubscribe()}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=v({type:o,selectors:[["path-control-config"]],inputs:{pathFormGroup:"pathFormGroup",filterSelfPaths:[1,"filterSelfPaths"]},features:[Ve],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"],["type","text","matInput","","placeholder","Type to use autocomplete or select from list","formControlName","path","required","",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(t,a){t&1&&_(0,qi,34,11,"div",3),t&2&&C(a.pathFormGroup.value.isPathConfigurable?0:-1)},dependencies:[B,V,xe,I,j,F,P,ie,K,Ye,L,O,R,Ro,Ut,U,Ot,ut,z,Qe,Ft,ne,St,ae,N],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 ji(o,c){if(o&1&&g(0,"path-control-config",6),o&2){let e=c.$implicit,t=u(2);d("pathFormGroup",e)("filterSelfPaths",t.filterSelfPaths().value)}}function Hi(o,c){if(o&1&&T(0,ji,1,2,"path-control-config",6,G),o&2){let e=u();S(e.pathsFormGroup.controls)}}function Ki(o,c){if(o&1&&g(0,"path-control-config",6),o&2){let e=c.$implicit,t=u(2);d("pathFormGroup",t.pathsFormGroup.get(e))("filterSelfPaths",t.filterSelfPaths().value)}}function $i(o,c){if(o&1&&(T(0,Ki,1,2,"path-control-config",6,G),We(2,"objectKeys")),o&2){let e=u();S(qe(2,0,e.pathsFormGroup.controls))}}var Wo=(()=>{class o{rootFormGroup=p(K);fb=p(Xe);formGroupName=f.required();isArray=f.required();enableTimeout=f.required();dataTimeout=f.required();filterSelfPaths=f.required();addPathEvent=f(void 0);pathsFormGroup;ngOnInit(){this.isArray()?this.pathsFormGroup=this.rootFormGroup.control.get(this.formGroupName()):this.pathsFormGroup=this.rootFormGroup.control.get(this.formGroupName())}addPath(e){this.pathsFormGroup.push(this.fb.group({description:[e.description],path:[e.path,E.required],pathID:[e.pathID],source:[e.source,E.required],pathType:[e.pathType],isPathConfigurable:[e.isPathConfigurable],showPathSkUnitsFilter:[e.showPathSkUnitsFilter],pathSkUnitsFilter:[e.pathSkUnitsFilter],convertUnitTo:[e.convertUnitTo],sampleTime:[e.sampleTime],supportsPut:[e.supportsPut]})),this.pathsFormGroup.updateValueAndValidity()}ngOnChanges(e){e.addPathEvent&&!e.addPathEvent.firstChange&&this.addPath(e.addPathEvent.currentValue)}static \u0275fac=function(t){return new(t||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"]},features:[Ve],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"]],template:function(t,a){t&1&&(n(0,"div",0)(1,"mat-checkbox",1),r(2," Enable Widget Data TTL "),i(),n(3,"mat-form-field")(4,"mat-label"),r(5,"TTL Timeout For Paths"),i(),g(6,"input",2),n(7,"span",3),r(8,"Seconds"),i()()(),_a(9,4),_(10,Hi,2,0)(11,$i,3,2),va(),n(12,"mat-checkbox",5),r(13,` Restrict to own vessel
5
- `),i()),t&2&&(s(),d("formControl",a.enableTimeout()),s(5),d("formControl",a.dataTimeout()),s(3),d("formGroup",a.pathsFormGroup),s(),C(a.isArray()?10:11),s(2),d("formControl",a.filterSelfPaths()))},dependencies:[we,B,V,xe,I,j,F,Ze,P,ie,K,L,O,R,Qe,Uo,Oo],styles:["[_nghost-%COMP%]{display:block;height:100%;width:100%;padding-top:15px;padding-bottom:5px}"]})}return o})();function Yi(o,c){if(o&1){let e=A();n(0,"button",7),b("click",function(){M(e);let a=u();return y(a.dateTimezone.setValue(""))}),g(1,"span",8),i()}}function Zi(o,c){if(o&1&&(n(0,"mat-option",9),r(1),i()),o&2){let e=c.$implicit;d("value",e.label),s(),yt(" ",e.offset," - ",e.label," ")}}function Xi(o){return c=>o.some(t=>t.label===c.value)?null:{requireMatch:!0}}var Qi=()=>{let o=Intl.supportedValuesOf("timeZone"),c=new Date;return o.map(e=>({offset:new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"shortOffset"}).formatToParts(c).find(m=>m.type==="timeZoneName")?.value||"",label:e}))},qo=(()=>{class o{dateFormat=f(void 0);dateTimezone;tz=[];filteredTZ;filteredTZSubscription=null;constructor(){}ngOnInit(){typeof Intl.supportedValuesOf<"u"?this.tz=Qi().sort((e,t)=>this.compareOffsets(e.offset,t.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,t)=>this.compareOffsets(e.offset,t.offset))),this.dateTimezone.setValidators([E.required,Xi(this.tz)]),this.filteredTZ=this.dateTimezone.valueChanges.pipe(bt(500),Ne(""),Pe(e=>this.filterTZ(e||""))),this.filteredTZSubscription=this.filteredTZ.subscribe()}filterTZ(e){let t=e.toLowerCase();return this.tz.filter(a=>a.label.toLowerCase().includes(t))}compareOffsets(e,t){let a=l=>{let m=l.match(/([+-]?)(\d+)(?::(\d+))?/);if(!m)return 0;let h=m[1]==="-"?-1:1,D=parseInt(m[2],10),J=m[3]?parseInt(m[3],10):0;return h*(D*60+J)};return a(e)-a(t)}ngOnDestroy(){this.filteredTZSubscription?.unsubscribe()}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=v({type:o,selectors:[["display-datetime-options"]],inputs:{dateFormat:[1,"dateFormat"],dateTimezone:"dateTimezone"},decls:14,vars:7,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",4,"ngFor","ngForOf"],["mat-icon-button","","matSuffix","","aria-label","Clear",3,"click"],[1,"fa-solid","fa-close"],[3,"value"]],template:function(t,a){if(t&1&&(n(0,"div",1)(1,"mat-form-field",2)(2,"mat-label"),r(3,"Date & Time Format"),i(),g(4,"input",3),i(),n(5,"mat-form-field",2)(6,"mat-label"),r(7,"Adjust Value to Time Zone"),i(),g(8,"input",4),_(9,Yi,2,0,"button",5),n(10,"mat-autocomplete",null,0),_(12,Zi,2,3,"mat-option",6),We(13,"async"),i()()()),t&2){let l=te(11);s(4),d("formControl",a.dateFormat()),s(4),d("formControl",a.dateTimezone)("matAutocomplete",l),s(),C(a.dateTimezone.value?9:-1),s(3),d("ngForOf",qe(13,5,a.filteredTZ))}},dependencies:[L,O,R,B,V,I,F,P,ie,ut,z,Qe,Ut,wa,U,St],encapsulation:2})}return o})();var zo=()=>["measuring","capacity"],Ji=()=>["marineCompass","baseplateCompass"];function en(o,c){if(o&1&&g(0,"config-display-chart-options",14),o&2){let e=u();d("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)("verticalGraph",e.verticalGraphToControl)("color",e.colorToControl)}}function tn(o,c){o&1&&(n(0,"mat-form-field",33)(1,"mat-label"),r(2,"URL"),i(),g(3,"input",34),i())}function an(o,c){o&1&&(n(0,"mat-checkbox",35),r(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. "),i())}function on(o,c){o&1&&(n(0,"mat-form-field",33)(1,"mat-label"),r(2,"Widget Label"),i(),g(3,"input",36),i())}function nn(o,c){o&1&&(n(0,"mat-form-field",37)(1,"mat-label"),r(2,"Scale Start"),i(),g(3,"input",38),i(),n(4,"mat-form-field",37)(5,"mat-label"),r(6,"Scale End"),i(),g(7,"input",39),i())}function rn(o,c){o&1&&(n(0,"mat-form-field")(1,"mat-label"),r(2,"Integer Places"),i(),g(3,"input",40),i())}function ln(o,c){if(o&1&&(n(0,"mat-form-field")(1,"mat-label"),r(2,"Decimal Places"),i(),g(3,"input",41),i()),o&2){let e=u(2);X("options-grid-span2",!e.widgetConfig.numInt)}}function sn(o,c){o&1&&(n(0,"mat-checkbox",42),r(1," Show Min recorded value "),i())}function cn(o,c){o&1&&(n(0,"mat-checkbox",43),r(1," Show Max recorded value "),i())}function dn(o,c){if(o&1&&g(0,"display-datetime-options",44),o&2){let e=u(2);d("dateFormat",e.dateFormatToControl)("dateTimezone",e.dateTimezoneToControl)}}function mn(o,c){o&1&&(n(0,"mat-checkbox",45),r(1," Invert Rudder angle "),i())}function pn(o,c){o&1&&(n(0,"mat-checkbox",46),r(1," Show Close-hauled Lines "),i())}function un(o,c){o&1&&(n(0,"mat-form-field")(1,"mat-label"),r(2,"Vessel Close-hauled Angle"),i(),g(3,"input",47),i())}function fn(o,c){o&1&&(n(0,"mat-checkbox",48),r(1," Show Wind Sectors "),i())}function gn(o,c){o&1&&(n(0,"mat-form-field")(1,"mat-label"),r(2,"Wind Sector Duration"),i(),g(3,"input",49),i())}function hn(o,c){if(o&1){let e=A();n(0,"mat-checkbox",50),b("change",function(){M(e);let a=u(2);return y(a.setPaths())}),r(1," Show Course Over Ground "),i()}}function bn(o,c){o&1&&(n(0,"mat-checkbox",51),r(1," Show Next Waypoint "),i())}function _n(o,c){o&1&&(n(0,"mat-form-field")(1,"mat-label"),r(2,"Minimum Value"),i(),g(3,"input",52),i())}function vn(o,c){o&1&&(n(0,"mat-form-field")(1,"mat-label"),r(2,"Maximum Value"),i(),g(3,"input",53),i())}function Cn(o,c){o&1&&(n(0,"mat-checkbox",54),r(1," Ignore Zones configuration "),i())}function Mn(o,c){o&1&&(n(0,"mat-form-field",30)(1,"mat-label"),r(2,"Highlights Width"),i(),g(3,"input",55),i())}function yn(o,c){o&1&&(n(0,"mat-form-field",31)(1,"mat-label"),r(2,"Rotation Element"),i(),n(3,"mat-select",56)(4,"mat-option",57),r(5,"Dial (Marine Compass)"),i(),n(6,"mat-option",58),r(7,"Needle (Base plate compass)"),i()()(),n(8,"div",30)(9,"mat-checkbox",59),r(10," Show value box "),i()(),n(11,"div",30)(12,"mat-checkbox",60),r(13," Show cardinal degrees "),i()())}function Tn(o,c){o&1&&(n(0,"mat-form-field",30)(1,"mat-label"),r(2,"Gauge Type"),i(),n(3,"mat-select",56)(4,"mat-option",61),r(5,"Measuring"),i(),n(6,"mat-option",62),r(7,"Capacity"),i()()())}function Sn(o,c){if(o&1&&_(0,yn,14,0)(1,Tn,8,0,"mat-form-field",30),o&2){let e=u(2);C(Tt(1,Ji).indexOf(e.formMaster.value.gauge.subType)>-1?0:Tt(2,zo).indexOf(e.formMaster.value.gauge.subType)>-1?1:-1)}}function xn(o,c){o&1&&(n(0,"div",30)(1,"mat-checkbox",63),r(2," Use needle indicator "),i()(),n(3,"div",30)(4,"mat-checkbox",64),r(5," Enable Ticks "),i()(),n(6,"mat-form-field",31)(7,"mat-label"),r(8,"Orientation"),i(),n(9,"mat-select",65)(10,"mat-option",66),r(11,"Vertical"),i(),n(12,"mat-option",67),r(13,"Horizontal"),i()()())}function wn(o,c){o&1&&(n(0,"mat-form-field",31)(1,"mat-label"),r(2,"Unit Label"),i(),n(3,"mat-select",68)(4,"mat-option",69),r(5,"Full Label"),i(),n(6,"mat-option",70),r(7,"First Letter Only"),i()()())}function An(o,c){if(o&1&&(n(0,"mat-option",72),r(1),i()),o&2){let e=c.$implicit;Ee("value",e.value),s(),x(e.label)}}function Gn(o,c){if(o&1&&(n(0,"mat-form-field",33)(1,"mat-label"),r(2,"Color"),i(),n(3,"mat-select",71),T(4,An,2,2,"mat-option",72,G),i()()),o&2){let e=u(2);s(4),S(e.colors)}}function En(o,c){o&1&&(n(0,"mat-checkbox",73),r(1," Disable background color "),i())}function kn(o,c){if(o&1&&(n(0,"mat-option",72),r(1),i()),o&2){let e=c.$implicit;Ee("value",e.value),s(),x(e.label)}}function Dn(o,c){if(o&1&&(n(0,"mat-form-field")(1,"mat-label"),r(2,"Background Color"),i(),n(3,"mat-select",74),T(4,kn,2,2,"mat-option",72,G),i()()),o&2){let e=u(2);s(4),S(e.colors)}}function In(o,c){o&1&&(n(0,"mat-form-field",30)(1,"mat-label"),r(2,"Background Style"),i(),n(3,"mat-select",75)(4,"mat-option",76),r(5,"Dark Gray"),i(),n(6,"mat-option",77),r(7,"Satin Gray"),i(),n(8,"mat-option",78),r(9,"Light Gray"),i(),n(10,"mat-option",79),r(11,"White"),i(),n(12,"mat-option",80),r(13,"Black"),i(),n(14,"mat-option",81),r(15,"Beige"),i(),n(16,"mat-option",82),r(17,"Brown"),i(),n(18,"mat-option",83),r(19,"Red"),i(),n(20,"mat-option",84),r(21,"Green"),i(),n(22,"mat-option",85),r(23,"Blue"),i(),n(24,"mat-option",86),r(25,"Anthracite"),i(),n(26,"mat-option",87),r(27,"Mud"),i(),n(28,"mat-option",88),r(29,"Punched Sheet"),i(),n(30,"mat-option",89),r(31,"Carbon"),i(),n(32,"mat-option",90),r(33,"Stainless"),i(),n(34,"mat-option",91),r(35,"Brushed Metal"),i(),n(36,"mat-option",92),r(37,"Brushed Stainless"),i(),n(38,"mat-option",93),r(39,"Turned"),i()()(),n(40,"mat-form-field",30)(41,"mat-label"),r(42,"Frame Style"),i(),n(43,"mat-select",94)(44,"mat-option",95),r(45,"Black Metal"),i(),n(46,"mat-option",96),r(47,"Metal"),i(),n(48,"mat-option",97),r(49,"Shiny Metal"),i(),n(50,"mat-option",98),r(51,"Brass"),i(),n(52,"mat-option",99),r(53,"Steel"),i(),n(54,"mat-option",100),r(55,"Chrome"),i(),n(56,"mat-option",101),r(57,"Gold"),i(),n(58,"mat-option",86),r(59,"Anthracite"),i(),n(60,"mat-option",102),r(61,"Tilted Gray"),i(),n(62,"mat-option",103),r(63,"Tilted Black"),i(),n(64,"mat-option",104),r(65,"Glossy Metal"),i()()())}function Fn(o,c){if(o&1&&(n(0,"div",15)(1,"div",16),_(2,tn,4,0,"mat-form-field",17)(3,an,2,0,"mat-checkbox",18)(4,on,4,0,"mat-form-field",17)(5,nn,8,0)(6,rn,4,0,"mat-form-field",19)(7,ln,4,2,"mat-form-field",20)(8,sn,2,0,"mat-checkbox",21)(9,cn,2,0,"mat-checkbox",22)(10,dn,1,2,"display-datetime-options",23)(11,mn,2,0,"mat-checkbox",24)(12,pn,2,0,"mat-checkbox",25)(13,un,4,0,"mat-form-field",19)(14,fn,2,0,"mat-checkbox",26)(15,gn,4,0,"mat-form-field",19)(16,hn,2,0,"mat-checkbox",27)(17,bn,2,0,"mat-checkbox",28)(18,_n,4,0,"mat-form-field",19)(19,vn,4,0,"mat-form-field",19)(20,Cn,2,0,"mat-checkbox",29)(21,Mn,4,0,"mat-form-field",30)(22,Sn,2,3)(23,xn,14,0)(24,wn,8,0,"mat-form-field",31)(25,Gn,6,0,"mat-form-field",17)(26,En,2,0,"mat-checkbox",32)(27,Dn,6,0,"mat-form-field",19)(28,In,66,0),i()()),o&2){let e=u();s(2),d("ngIf",e.widgetConfig.widgetUrl!==void 0),s(),d("ngIf",e.widgetConfig.allowInput!==void 0),s(),d("ngIf",e.widgetConfig.displayName!==void 0),s(),C(e.formMaster.get("displayScale")?5:-1),s(),d("ngIf",e.widgetConfig.numInt!==void 0),s(),d("ngIf",e.widgetConfig.numDecimal!==void 0),s(),d("ngIf",e.widgetConfig.showMin!==void 0),s(),d("ngIf",e.widgetConfig.showMax!==void 0),s(),d("ngIf",e.widgetConfig.dateFormat!==void 0),s(),d("ngIf",e.widgetConfig.invertRudder!==void 0),s(),d("ngIf",e.widgetConfig.laylineEnable!==void 0),s(),d("ngIf",e.widgetConfig.laylineEnable!==void 0),s(),d("ngIf",e.widgetConfig.windSectorEnable!==void 0),s(),d("ngIf",e.widgetConfig.windSectorEnable!==void 0),s(),d("ngIf",e.widgetConfig.courseOverGroundEnable!==void 0),s(),d("ngIf",e.widgetConfig.waypointEnable!==void 0),s(),d("ngIf",e.widgetConfig.minValue!==void 0&&!e.formMaster.get("displayScale")),s(),d("ngIf",e.widgetConfig.maxValue!==void 0&&!e.formMaster.get("displayScale")),s(),d("ngIf",e.widgetConfig.ignoreZones!==void 0),s(),C((e.widgetConfig.gauge==null?null:e.widgetConfig.gauge.type)=="ngRadial"&&Tt(27,zo).includes(e.formMaster.value.gauge.subType)||(e.widgetConfig.gauge==null?null:e.widgetConfig.gauge.type)=="ngLinear"?21:-1),s(),C((e.widgetConfig.gauge==null?null:e.widgetConfig.gauge.type)=="ngRadial"?22:-1),s(),C((e.widgetConfig.gauge==null?null:e.widgetConfig.gauge.type)=="ngLinear"?23:-1),s(),C((e.widgetConfig.gauge==null?null:e.widgetConfig.gauge.type)=="simpleLinear"?24:-1),s(),d("ngIf",e.widgetConfig.color!==void 0),s(),d("ngIf",e.widgetConfig.noBgColor!==void 0),s(),d("ngIf",e.widgetConfig.bgColor!==void 0),s(),C((e.widgetConfig.gauge==null?null:e.widgetConfig.gauge.type)=="steel"?28:-1)}}function Pn(o,c){if(o&1&&(g(0,"span",109),r(1,"\xA0Controls ")),o&2){let e=u(2);$t(e.formMaster.controls.multiChildCtrls.valid?"display: none":"display: block")}}function On(o,c){if(o&1){let e=A();n(0,"mat-tab",105)(1,"div",106)(2,"div"),_(3,Pn,2,2,"ng-template",107),i(),n(4,"boolean-multicontrol-options",108),b("addPath",function(a){M(e);let l=u();return y(l.addPathGroup(a))})("updatePath",function(a){M(e);let l=u();return y(l.updatePath(a))})("delPath",function(a){M(e);let l=u();return y(l.deletePath(a))}),i()()()}if(o&2){let e=u();s(4),d("multiCtrlArray",e.multiChildCtrlsToControl)}}function Ln(o,c){if(o&1&&(n(0,"span",112),r(1," error "),i(),r(2," \xA0Paths ")),o&2){let e=u(2);$t(e.formMaster.controls.paths.valid?"display: none":"display: block")}}function Nn(o,c){if(o&1&&(n(0,"mat-tab",110)(1,"div",106)(2,"div"),_(3,Ln,3,2,"ng-template",107),i(),g(4,"paths-options",111),i()()),o&2){let e=u();s(4),d("isArray",e.isPathArray)("enableTimeout",e.enableTimeoutToControl)("dataTimeout",e.dataTimeoutToControl)("filterSelfPaths",e.filterSelfPathsToControl)("addPathEvent",e.addPathEvent)}}function Vn(o,c){o&1&&(n(0,"p")(1,"mat-checkbox",116),r(2," Digital display "),i()())}function Bn(o,c){o&1&&(n(0,"mat-form-field",33)(1,"mat-label"),r(2,"Dial Size"),i(),n(3,"mat-select",117)(4,"mat-option",118),r(5,"1/4"),i(),n(6,"mat-option",119),r(7,"1/2"),i(),n(8,"mat-option",120),r(9,"3/4"),i(),n(10,"mat-option",69),r(11,"Full"),i()()())}function Rn(o,c){if(o&1&&(n(0,"mat-tab",9)(1,"div",113)(2,"mat-form-field",33)(3,"mat-label"),r(4,"Gauge Type"),i(),n(5,"mat-select",65)(6,"mat-option",114),r(7,"Linear"),i(),n(8,"mat-option",115),r(9,"Radial"),i()()(),_(10,Vn,3,0,"p")(11,Bn,12,0,"mat-form-field",33),i()()),o&2){let e=u();s(10),C(e.formMaster.value.gauge.subType=="linear"?10:-1),s(),C(e.formMaster.value.gauge.subType=="radial"?11:-1)}}function Un(o,c){o&1&&(n(0,"p")(1,"mat-checkbox",124),r(2," Value to send on button push (checked = on, unchecked = off) "),i()())}function Wn(o,c){if(o&1&&(n(0,"mat-tab",121)(1,"div",106)(2,"p")(3,"mat-checkbox",122),r(4," Enable Put Requests "),i()(),n(5,"p")(6,"mat-checkbox",123),r(7," Momentary mode (instead of switching between on/off) "),i()(),_(8,Un,3,0,"p",19),i()()),o&2){let e=u();s(8),d("ngIf",e.formMaster.controls.putMomentary.value)}}function qn(o,c){o&1&&g(0,"span",109)}function zn(o,c){if(o&1&&(_(0,qn,1,0,"span",127),r(1," Dataset ")),o&2){let e=u(2);d("ngIf",!e.formMaster.controls.datasetUUID.valid)}}function jn(o,c){if(o&1&&(n(0,"mat-tab",125),_(1,zn,2,1,"ng-template",107),g(2,"config-dataset-chart-options",126),i()),o&2){let e=u();s(2),d("datasetUUID",e.datasetUUIDToControl)("convertUnitTo",e.convertUnitToControl)}}var jo=(()=>{class o{dialogRef=p(ve);fb=p(Xe);DatasetService=p(et);units=p(tt);app=p(je);widgetConfig=p(Ce);titleDialog="Widget Options";formMaster;availableDataSets;unitList={};isPathArray=!1;addPathEvent;colors=[];ngOnInit(){this.availableDataSets=this.DatasetService.list().sort(),this.unitList=this.units.getConversionsForPath(""),this.formMaster=this.generateFormGroups(this.widgetConfig),this.setFormOptions(),this.colors=this.app.configurableThemeColors}generateFormGroups(e,t){let a=this.fb.group({});return Object.keys(e).forEach(l=>{if(typeof e[l]=="object"&&e[l]!==null){if(l=="multiChildCtrls"){a.addControl(l,this.fb.array([]));let m=a.get(l);e[l].forEach(h=>{m.push(this.generateCtrlArray(h))})}else if(l=="displayScale")a.addControl(l,this.generateFormGroups(e[l],l));else if(l=="gauge")a.addControl(l,this.generateFormGroups(e[l],l));else if(l=="paths")if(this.widgetConfig.multiChildCtrls!==void 0){this.isPathArray=!0,a.addControl(l,this.fb.array([]));let m=a.get(l);Object.keys(e[l]).forEach(h=>{m.push(this.generatePathArray(h,this.widgetConfig.paths[h]))})}else a.addControl(l,this.generateFormGroups(e[l],l));t=="paths"&&a.addControl(l,this.generateFormGroups(e[l],l))}else if(t=="convertUnitTo")(this.widgetConfig.paths[l].pathType=="number"||"datasetUUID"in this.widgetConfig)&&a.addControl(l,new H(e[l]));else switch(l){case"path":a.addControl(l,new H(e[l],E.required));break;case"datasetUUID":a.addControl(l,new H(e[l],E.required));break;case"dataTimeout":a.addControl(l,new H(e[l],E.required));break;default:a.addControl(l,new H(e[l]));break}}),a}generatePathArray(e,t){let a=new ao({});return Object.keys(t).forEach(l=>{a.addControl(l,this.generatePathFields(l,t[l]))}),a}generatePathFields(e,t){let a=null;switch(e){case"path":a=new H(t,E.required);break;case"source":a=new H(t,E.required);break;case"sampleTime":a=new H(t,E.required);break;default:a=new H(t);break}return a}generateCtrlArray(e){let t=this.fb.group(e);return t.get("ctrlLabel").addValidators(E.required),t}addPathGroup(e){this.addPathEvent=e}updatePath(e){e.forEach(t=>{this.formMaster.get("paths").controls.forEach(l=>{l.get("pathID").value==t.pathID&&(l.controls.description.setValue(t.ctrlLabel),l.controls.pathType.setValue(t.isNumeric?"number":"boolean"))})})}deletePath(e){let t=this.formMaster.get("paths"),a=0;t.controls.forEach(m=>{if(m.get("pathID").value==e.pathID){let D=t.controls[""];t.removeAt(a)}else a++}),this.formMaster.get("multiChildCtrls").removeAt(e.ctrlIndex),this.formMaster.updateValueAndValidity()}setPaths(){this.setFormOptions()}setFormOptions(){if(this.formMaster.contains("courseOverGroundEnable")){let e=this.formMaster.get("paths.courseOverGround");this.formMaster.controls.courseOverGroundEnable.value?e.enable():e.disable()}}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 convertUnitToToControl(){return this.formMaster.get("convertUnitTo")}get datasetUUIDControl(){return this.formMaster.get("datasetUUID")}get displayNameToControl(){return this.formMaster.get("displayName")}get numDecimalToControl(){return this.formMaster.get("numDecimal")}get verticalGraphToControl(){return this.formMaster.get("verticalGraph")}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.value)}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=v({type:o,selectors:[["modal-widget-config"]],decls:19,vars:10,consts:[[3,"ngSubmit","formGroup"],["mat-dialog-title",""],[1,"widget-config-dialog-content"],[1,"tab-group-content"],["label","Display"],["class","tab-content",3,"displayName","datasetUUID","convertUnitTo","showAverageData","trackAgainstAverage","datasetAverageArray","showDatasetMinimumValueLine","showDatasetMaximumValueLine","showDatasetAverageValueLine","showDatasetAngleAverageValueLine","startScaleAtZero","showLabel","showTimeScale","showYScale","yScaleSuggestedMin","yScaleSuggestedMax","enableMinMaxScaleLimit","yScaleMin","yScaleMax","numDecimal","verticalGraph","color",4,"ngIf"],["class","display-content tab-content",4,"ngIf"],["label","Controls",4,"ngIf"],["label","Paths",4,"ngIf"],["label","Settings","formGroupName","gauge"],["label","Put Request",4,"ngIf"],["label","Dataset",4,"ngIf"],["type","button","mat-dialog-close","","mat-flat-button",""],["mat-flat-button","","type","submit",3,"disabled"],[1,"tab-content",3,"displayName","datasetUUID","convertUnitTo","showAverageData","trackAgainstAverage","datasetAverageArray","showDatasetMinimumValueLine","showDatasetMaximumValueLine","showDatasetAverageValueLine","showDatasetAngleAverageValueLine","startScaleAtZero","showLabel","showTimeScale","showYScale","yScaleSuggestedMin","yScaleSuggestedMax","enableMinMaxScaleLimit","yScaleMin","yScaleMax","numDecimal","verticalGraph","color"],[1,"display-content","tab-content"],[1,"widget-options-grid"],["class","options-grid-span2",4,"ngIf"],["class","options-grid-span2","name","allowInput","formControlName","allowInput",4,"ngIf"],[4,"ngIf"],[3,"options-grid-span2",4,"ngIf"],["name","showMin","formControlName","showMin",4,"ngIf"],["name","showMax","formControlName","showMax",4,"ngIf"],["class","options-grid-span2",3,"dateFormat","dateTimezone",4,"ngIf"],["class","fields","name","invertRudder","formControlName","invertRudder",4,"ngIf"],["class","fields","name","laylineEnable","formControlName","laylineEnable",4,"ngIf"],["name","windSectorEnable","formControlName","windSectorEnable",4,"ngIf"],["class","options-grid-span2","name","courseOverGroundEnable","formControlName","courseOverGroundEnable",3,"change",4,"ngIf"],["class","options-grid-span2","name","waypointEnable","formControlName","waypointEnable",4,"ngIf"],["name","ignoreZones","formControlName","ignoreZones",4,"ngIf"],["formGroupName","gauge"],["formGroupName","gauge",1,"options-grid-span2"],["name","noBgColor","formControlName","noBgColor",4,"ngIf"],[1,"options-grid-span2"],["type","url","matInput","","placeholder","Enter URL to page/resource","name","widgetUrl","formControlName","widgetUrl"],["name","allowInput","formControlName","allowInput",1,"options-grid-span2"],["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",""],["name","showMin","formControlName","showMin"],["name","showMax","formControlName","showMax"],[1,"options-grid-span2",3,"dateFormat","dateTimezone"],["name","invertRudder","formControlName","invertRudder",1,"fields"],["name","laylineEnable","formControlName","laylineEnable",1,"fields"],["type","number","min","10","max","90","matInput","","placeholder","Select angle...","name","laylineAngle","formControlName","laylineAngle"],["name","windSectorEnable","formControlName","windSectorEnable"],["type","number","min","1","max","90","matInput","","placeholder","Select or enter duration...","name","windSectorWindowSeconds","formControlName","windSectorWindowSeconds"],["name","courseOverGroundEnable","formControlName","courseOverGroundEnable",1,"options-grid-span2",3,"change"],["name","waypointEnable","formControlName","waypointEnable",1,"options-grid-span2"],["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","ignoreZones","formControlName","ignoreZones"],["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"],["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",""],[3,"value"],["name","noBgColor","formControlName","noBgColor"],["placeholder","Select Color...","formControlName","bgColor","name","bgColor","required",""],["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","anthracite"],["value","mud"],["value","punchedSheet"],["value","carbon"],["value","stainless"],["value","brushedMetal"],["value","brushedStainless"],["value","turned"],["placeholder","Select style...","formControlName","faceColor","name","faceColor"],["value","blackMetal"],["value","metal"],["value","shinyMetal"],["value","brass"],["value","steel"],["value","chrome"],["value","gold"],["value","tiltedGray"],["value","tiltedBlack"],["value","glossyMetal"],["label","Controls"],[1,"tab-content"],["mat-tab-label",""],[3,"addPath","updatePath","delPath","multiCtrlArray"],[1,"warning","fa","fa-exclamation-circle"],["label","Paths"],["formGroupName","paths",3,"isArray","enableTimeout","dataTimeout","filterSelfPaths","addPathEvent"],[1,"warning","material-icons"],[1,"widget-options-grid","tab-content"],["value","linear"],["value","radial"],["formControlName","digitalMeter","name","digitalMeter"],["placeholder","Select size...","formControlName","radialSize","name","radialSize"],["value","quarter"],["value","half"],["value","three-quarter"],["label","Put Request"],["formControlName","putEnable","name","putEnable"],["formControlName","putMomentary","name","putMomentary"],["formControlName","putMomentaryValue","name","putMomentaryValue"],["label","Dataset"],[3,"datasetUUID","convertUnitTo"],["class","warning fa fa-exclamation-circle",4,"ngIf"]],template:function(t,a){t&1&&(n(0,"form",0),b("ngSubmit",function(){return a.submitConfig()}),n(1,"h6",1),r(2),i(),n(3,"mat-dialog-content",2)(4,"mat-tab-group",3)(5,"mat-tab",4),_(6,en,1,22,"config-display-chart-options",5)(7,Fn,29,28,"div",6),i(),_(8,On,5,1,"mat-tab",7)(9,Nn,5,5,"mat-tab",8)(10,Rn,12,2,"mat-tab",9)(11,Wn,9,1,"mat-tab",10)(12,jn,3,2,"mat-tab",11),i()(),g(13,"mat-divider"),n(14,"mat-dialog-actions")(15,"button",12),r(16,"Cancel"),i(),n(17,"button",13),r(18,"Save"),i()()()),t&2&&(d("formGroup",a.formMaster),s(2),x(a.titleDialog),s(4),d("ngIf",a.widgetConfig.datasetUUID!==void 0),s(),d("ngIf",a.widgetConfig.datasetUUID===void 0),s(),d("ngIf",a.widgetConfig.multiChildCtrls!==void 0),s(),d("ngIf",a.widgetConfig.paths!==void 0),s(),C((a.widgetConfig.gauge==null?null:a.widgetConfig.gauge.type)=="steel"?10:-1),s(),d("ngIf",a.widgetConfig.putEnable!==void 0&&a.widgetConfig.multiChildCtrls===void 0),s(),d("ngIf",a.widgetConfig.datasetUUID!==void 0),s(5),d("disabled",!a.formMaster.valid))},dependencies:[B,Dt,V,xe,I,j,F,Ze,It,P,K,Ye,ro,ye,Te,Co,vo,Aa,L,O,R,we,ne,U,_o,co,$e,_e,Me,qo,Fo,Po,ko,Wo],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 Hn=["button"],Kn=["*"];function $n(o,c){if(o&1&&(n(0,"div",2),g(1,"mat-pseudo-checkbox",6),i()),o&2){let e=u();s(),d("disabled",e.disabled)}}var Ho=new $("MAT_BUTTON_TOGGLE_DEFAULT_OPTIONS",{providedIn:"root",factory:Yn});function Yn(){return{hideSingleSelectionIndicator:!1,hideMultipleSelectionIndicator:!1,disabledInteractive:!1}}var Ko=new $("MatButtonToggleGroup"),Zn={provide:kt,useExisting:vt(()=>Jt),multi:!0},Wt=class{source;value;constructor(c,e){this.source=c,this.value=e}},Jt=(()=>{class o{_changeDetector=p(ze);_dir=p(Et,{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=p(mt).getId("mat-button-toggle-group-");vertical;get value(){let e=this._selectionModel?this._selectionModel.selected:[];return this.multiple?e.map(t=>t.value):e[0]?e[0].value:void 0}set value(e){this._setSelectionByValue(e),this.valueChange.emit(this.value)}valueChange=new Y;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 Y;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=p(Ho,{optional:!0});this.appearance=e&&e.appearance?e.appearance:"standard",this.hideSingleSelectionIndicator=e?.hideSingleSelectionIndicator??!1,this.hideMultipleSelectionIndicator=e?.hideMultipleSelectionIndicator??!1}ngOnInit(){this._selectionModel=new bo(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 a=e.target.id,l=this._buttonToggles.toArray().findIndex(h=>h.buttonId===a),m=null;switch(e.keyCode){case 32:case 13:m=this._buttonToggles.get(l)||null;break;case 38:m=this._getNextButton(l,-1);break;case 37:m=this._getNextButton(l,this.dir==="ltr"?-1:1);break;case 40:m=this._getNextButton(l,1);break;case 39:m=this._getNextButton(l,this.dir==="ltr"?1:-1);break;default:return}m&&(e.preventDefault(),m._onButtonClick(),m.focus())}_emitChangeEvent(e){let t=new Wt(e,this.value);this._rawValue=t.value,this._controlValueAccessorChangeFn(t.value),this.change.emit(t)}_syncButtonToggle(e,t,a=!1,l=!1){!this.multiple&&this.selected&&!e.checked&&(this.selected.checked=!1),this._selectionModel?t?this._selectionModel.select(e):this._selectionModel.deselect(e):l=!0,l?Promise.resolve().then(()=>this._updateModelValue(e,a)):this._updateModelValue(e,a)}_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(t=>e.value!=null&&t===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 t=this._buttonToggles.get(e);if(!t.disabled){t.tabIndex=0;break}}this._markButtonsForCheck()}_getNextButton(e,t){let a=this._buttonToggles;for(let l=1;l<=a.length;l++){let m=(e+t*l+a.length)%a.length,h=a.get(m);if(h&&!h.disabled)return h}return null}_setSelectionByValue(e){if(this._rawValue=e,!this._buttonToggles)return;let t=this._buttonToggles.toArray();if(this.multiple&&e?(Array.isArray(e),this._clearSelection(),e.forEach(a=>this._selectValue(a,t))):(this._clearSelection(),this._selectValue(e,t)),!this.multiple&&t.every(a=>a.tabIndex===-1)){for(let a of t)if(!a.disabled){a.tabIndex=0;break}}}_clearSelection(){this._selectionModel.clear(),this._buttonToggles.forEach(e=>{e.checked=!1,this.multiple||(e.tabIndex=-1)})}_selectValue(e,t){for(let a of t)if(a.value===e){a.checked=!0,this._selectionModel.select(a),this.multiple||(a.tabIndex=0);break}}_updateModelValue(e,t){t&&this._emitChangeEvent(e),this.valueChange.emit(this.value)}_markButtonsForCheck(){this._buttonToggles?.forEach(e=>e._markForCheck())}static \u0275fac=function(t){return new(t||o)};static \u0275dir=lt({type:o,selectors:[["mat-button-toggle-group"]],contentQueries:function(t,a,l){if(t&1&&st(l,qt,5),t&2){let m;he(m=be())&&(a._buttonToggles=m)}},hostAttrs:[1,"mat-button-toggle-group"],hostVars:6,hostBindings:function(t,a){t&1&&b("keydown",function(m){return a._keydown(m)}),t&2&&(le("role",a.multiple?"group":"radiogroup")("aria-disabled",a.disabled),X("mat-button-toggle-vertical",a.vertical)("mat-button-toggle-group-appearance-standard",a.appearance==="standard"))},inputs:{appearance:"appearance",name:"name",vertical:[2,"vertical","vertical",k],value:"value",multiple:[2,"multiple","multiple",k],disabled:[2,"disabled","disabled",k],disabledInteractive:[2,"disabledInteractive","disabledInteractive",k],hideSingleSelectionIndicator:[2,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",k],hideMultipleSelectionIndicator:[2,"hideMultipleSelectionIndicator","hideMultipleSelectionIndicator",k]},outputs:{valueChange:"valueChange",change:"change"},exportAs:["matButtonToggleGroup"],features:[dt([Zn,{provide:Ko,useExisting:o}])]})}return o})(),qt=(()=>{class o{_changeDetectorRef=p(ze);_elementRef=p(rt);_focusMonitor=p(Na);_idGenerator=p(mt);_animationMode=p(Be,{optional:!0});_checked=!1;ariaLabel;ariaLabelledby=null;_buttonElement;buttonToggleGroup;get buttonId(){return`${this.id}-button`}id;name;value;get tabIndex(){return this._tabIndex}set tabIndex(e){e!==this._tabIndex&&(this._tabIndex=e,this._markForCheck())}_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 Y;constructor(){p(Va).load(Ua);let e=p(Ko,{optional:!0}),t=p(new ca("tabindex"),{optional:!0})||"",a=p(Ho,{optional:!0});this._tabIndex=parseInt(t)||0,this.buttonToggleGroup=e,this.appearance=a&&a.appearance?a.appearance:"standard",this.disabledInteractive=a?.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._animationMode!=="NoopAnimations"&&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 t=this.buttonToggleGroup._buttonToggles.find(a=>a.tabIndex===0);t&&(t.tabIndex=-1),this.tabIndex=0}this.change.emit(new Wt(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(t){return new(t||o)};static \u0275cmp=v({type:o,selectors:[["mat-button-toggle"]],viewQuery:function(t,a){if(t&1&&ct(Hn,5),t&2){let l;he(l=be())&&(a._buttonElement=l.first)}},hostAttrs:["role","presentation",1,"mat-button-toggle"],hostVars:14,hostBindings:function(t,a){t&1&&b("focus",function(){return a.focus()}),t&2&&(le("aria-label",null)("aria-labelledby",null)("id",a.id)("name",null),X("mat-button-toggle-standalone",!a.buttonToggleGroup)("mat-button-toggle-checked",a.checked)("mat-button-toggle-disabled",a.disabled)("mat-button-toggle-disabled-interactive",a.disabledInteractive)("mat-button-toggle-appearance-standard",a.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",k],appearance:"appearance",checked:[2,"checked","checked",k],disabled:[2,"disabled","disabled",k],disabledInteractive:[2,"disabledInteractive","disabledInteractive",k]},outputs:{change:"change"},exportAs:["matButtonToggle"],ngContentSelectors:Kn,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(t,a){if(t&1){let l=A();Re(),n(0,"button",1,0),b("click",function(){return M(l),y(a._onButtonClick())}),_(2,$n,2,1,"div",2),n(3,"span",3),Ue(4),i()(),g(5,"span",4)(6,"span",5)}if(t&2){let l=te(1);d("id",a.buttonId)("disabled",a.disabled&&!a.disabledInteractive||null),le("role",a.isSingleSelector()?"radio":"button")("tabindex",a.disabled&&!a.disabledInteractive?-1:a.tabIndex)("aria-pressed",a.isSingleSelector()?null:a.checked)("aria-checked",a.isSingleSelector()?a.checked:null)("name",a._getButtonName())("aria-label",a.ariaLabel)("aria-labelledby",a.ariaLabelledby)("aria-disabled",a.disabled&&a.disabledInteractive?"true":null),s(2),C(a.buttonToggleGroup&&(!a.buttonToggleGroup.multiple&&!a.buttonToggleGroup.hideSingleSelectionIndicator||a.buttonToggleGroup.multiple&&!a.buttonToggleGroup.hideMultipleSelectionIndicator)?2:-1),s(4),d("matRippleTrigger",l)("matRippleDisabled",a.disableRipple||a.disabled)}},dependencies:[Ra,mo],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);transform:translateZ(0);border-radius:var(--mat-legacy-button-toggle-shape)}.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-standard-button-toggle-shape, var(--mat-sys-corner-full));border:solid 1px var(--mat-standard-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-minimal-pseudo-checkbox-selected-checkmark-color: var(--mat-standard-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-legacy-button-toggle-text-color);font-family:var(--mat-legacy-button-toggle-label-text-font);font-size:var(--mat-legacy-button-toggle-label-text-size);line-height:var(--mat-legacy-button-toggle-label-text-line-height);font-weight:var(--mat-legacy-button-toggle-label-text-weight);letter-spacing:var(--mat-legacy-button-toggle-label-text-tracking);--mat-minimal-pseudo-checkbox-selected-checkmark-color: var(--mat-legacy-button-toggle-selected-state-text-color)}.mat-button-toggle.cdk-keyboard-focused .mat-button-toggle-focus-overlay{opacity:var(--mat-legacy-button-toggle-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-legacy-button-toggle-selected-state-text-color);background-color:var(--mat-legacy-button-toggle-selected-state-background-color)}.mat-button-toggle-disabled{pointer-events:none;color:var(--mat-legacy-button-toggle-disabled-state-text-color);background-color:var(--mat-legacy-button-toggle-disabled-state-background-color);--mat-minimal-pseudo-checkbox-disabled-selected-checkmark-color: var(--mat-legacy-button-toggle-disabled-state-text-color)}.mat-button-toggle-disabled.mat-button-toggle-checked{background-color:var(--mat-legacy-button-toggle-disabled-selected-state-background-color)}.mat-button-toggle-disabled-interactive{pointer-events:auto}.mat-button-toggle-appearance-standard{color:var(--mat-standard-button-toggle-text-color, var(--mat-sys-on-surface));background-color:var(--mat-standard-button-toggle-background-color, transparent);font-family:var(--mat-standard-button-toggle-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mat-standard-button-toggle-label-text-size, var(--mat-sys-label-large-size));line-height:var(--mat-standard-button-toggle-label-text-line-height, var(--mat-sys-label-large-line-height));font-weight:var(--mat-standard-button-toggle-label-text-weight, var(--mat-sys-label-large-weight));letter-spacing:var(--mat-standard-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-standard-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-standard-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-standard-button-toggle-divider-color, var(--mat-sys-outline))}.mat-button-toggle-appearance-standard.mat-button-toggle-checked{color:var(--mat-standard-button-toggle-selected-state-text-color, var(--mat-sys-on-secondary-container));background-color:var(--mat-standard-button-toggle-selected-state-background-color, var(--mat-sys-secondary-container))}.mat-button-toggle-appearance-standard.mat-button-toggle-disabled{color:var(--mat-standard-button-toggle-disabled-state-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mat-standard-button-toggle-disabled-state-background-color, transparent)}.mat-button-toggle-appearance-standard.mat-button-toggle-disabled .mat-pseudo-checkbox{--mat-minimal-pseudo-checkbox-disabled-selected-checkmark-color: var(--mat-standard-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-standard-button-toggle-disabled-selected-state-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mat-standard-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-standard-button-toggle-state-layer-color, var(--mat-sys-on-surface))}.mat-button-toggle-appearance-standard:hover .mat-button-toggle-focus-overlay{opacity:var(--mat-standard-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-standard-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-legacy-button-toggle-height);position:relative}.mat-button-toggle-appearance-standard .mat-button-toggle-label-content{padding:0 12px;line-height:var(--mat-standard-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-legacy-button-toggle-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-standard-button-toggle-shape, var(--mat-sys-corner-full))}.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-standard-button-toggle-shape, var(--mat-sys-corner-full));border-bottom-right-radius:var(--mat-standard-button-toggle-shape, var(--mat-sys-corner-full))}.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-standard-button-toggle-shape, var(--mat-sys-corner-full));border-bottom-left-radius:var(--mat-standard-button-toggle-shape, var(--mat-sys-corner-full))}.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-standard-button-toggle-shape, var(--mat-sys-corner-full));border-bottom-left-radius:var(--mat-standard-button-toggle-shape, var(--mat-sys-corner-full))}.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-standard-button-toggle-shape, var(--mat-sys-corner-full));border-top-left-radius:var(--mat-standard-button-toggle-shape, var(--mat-sys-corner-full))}
6
- `],encapsulation:2,changeDetection:0})}return o})(),$o=(()=>{class o{static \u0275fac=function(t){return new(t||o)};static \u0275mod=ge({type:o});static \u0275inj=ue({imports:[q,Wa,qt,q]})}return o})();var Yo=(()=>{class o{_widgetCategories=["Basic","Gauges","Components"];_widgetDefinition=[{name:"Numeric",description:"Displays numeric data in a clear and concise format with option to display minimum and maximum recorded values.",icon:"numericWidget",category:"Basic",selector:"widget-numeric",componentClassName:"WidgetNumericComponent"},{name:"Text",description:"Displays text data with customizable color formatting option.",icon:"textWidget",category:"Basic",selector:"widget-text",componentClassName:"WidgetTextComponent"},{name:"Date & Time",description:"Displays date and time data with fully custom formatting options and timezone correction.",icon:"datetimeWidget",category:"Basic",selector:"widget-datetime",componentClassName:"WidgetDatetimeComponent"},{name:"Position",description:"Displays latitude and longitude for location tracking and navigation.",icon:"positionWidget",category:"Basic",selector:"widget-position",componentClassName:"WidgetPositionComponent"},{name:"Switch Panel",description:"A switch panel group with multiple controls including toggle switches, indicator lights, and press buttons for digital switching ond other operations.",icon:"switchpanelWidget",category:"Basic",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",category:"Basic",selector:"widget-slider",componentClassName:"WidgetSliderComponent"},{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",category:"Basic",selector:"widget-label",componentClassName:"WidgetLabelComponent"},{name:"Simple Linear",description:"A simple horizontal linear gauge with a large value label offering a clean, compact modern look.",icon:"simpleLinearGauge",category:"Gauges",selector:"widget-simple-linear",componentClassName:"WidgetSimpleLinearComponent"},{name:"Linear",description:"A horizontal or vertical linear gauge that supports zones highlights. ",icon:"linearGauge",category:"Gauges",selector:"widget-gauge-ng-linear",componentClassName:"WidgetGaugeNgLinearComponent"},{name:"Radial",description:"A radial gauge that supports various configurations, including capacity and measurement dials and zones highlight.",icon:"radialGauge",category:"Gauges",selector:"widget-gauge-ng-radial",componentClassName:"WidgetGaugeNgRadialComponent"},{name:"Compass",description:"A faceplate or card rotating compass gauge with various cardinal point indicator options.",icon:"compassGauge",category:"Gauges",selector:"widget-gauge-ng-compass",componentClassName:"WidgetGaugeNgCompassComponent"},{name:"Steel Style",description:"A traditional steel looking linear & radial gauges replica that supports range sizes and zones highlights.",icon:"steelGauge",category:"Gauges",selector:"widget-gauge-steel",componentClassName:"WidgetSteelGaugeComponent"},{name:"Wind Steering",description:"A wind steering display that combines wind, wind sectors, heading, course over ground and next waypoint information",icon:"windsteeringWidget",category:"Components",selector:"widget-wind-steer",componentClassName:"WidgetWindComponent"},{name:"Freeboard-SK",description:"Add Freeboard-SK Chart Plotter as a widget with auto sign-in to your dashboard.",icon:"freeboardWidget",category:"Components",selector:"widget-freeboardsk",componentClassName:"WidgetFreeboardskComponent"},{name:"Data Chart",description:"Visualize data on a realtime chart with multiple series pre configured such as averages, SMA, EMA and DEMA. The use the Data Chart widget KIP Dataset must be configured.",icon:"datachartWidget",category:"Components",selector:"widget-data-chart",componentClassName:"WidgetDataChartComponent"},{name:"Autopilot Head",description:"An Autopilot Head for supported Signal K autopilot devices.",icon:"autopilotWidget",category:"Components",selector:"widget-autopilot",componentClassName:"WidgetAutopilotComponent"},{name:"Race Timer",description:"A simple race start countdown timer. The timer can be started, paused, reset and the countdown duration specified.",icon:"racetimerWidget",category:"Components",selector:"widget-racetimer",componentClassName:"WidgetRaceTimerComponent"},{name:"Embed Webpage Viewer",description:"Use this widget to embed a view of an external web based applications, such as Grafana graphs, other Signal K Apps and related tools, in your dashboard for a seamless integration. Interactions with the embedded page are not supported.",icon:"embedWidget",category:"Components",selector:"widget-iframe",componentClassName:"WidgetIframeComponent"},{name:"Tutorial",description:"KIP's getting started tutorial widget.",icon:"tutorialWidget",category:"Components",selector:"widget-tutorial",componentClassName:"WidgetTutorialComponent"}];get kipWidgets(){return this._widgetDefinition}get categories(){return this._widgetCategories}static \u0275fac=function(t){return new(t||o)};static \u0275prov=ee({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})();var Zo=(()=>{class o{svgIcon=f.required();iconSize=f.required();name=f.required();description=f.required();constructor(){let e=p(Fa),t=p(Ea);e.addSvgIconSet(t.bypassSecurityTrustResourceUrl("assets/svg/icons.svg"))}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=v({type:o,selectors:[["widget-list-card"]],inputs:{svgIcon:[1,"svgIcon"],iconSize:[1,"iconSize"],name:[1,"name"],description:[1,"description"]},decls:8,vars:7,consts:[[1,"item-container"],[1,"item-icon"],["aria-hidden","false",3,"svgIcon"],[1,"item-label"],[1,"title","no-text-select"],[1,"description","no-text-select"]],template:function(t,a){t&1&&(n(0,"div",0)(1,"div",1),g(2,"mat-icon",2),i(),n(3,"div",3)(4,"p",4),r(5),i(),n(6,"span",5),r(7),i()()()),t&2&&(s(2),Ct("width",a.iconSize(),"px")("height",a.iconSize(),"px"),d("svgIcon",a.svgIcon()),s(3),x(a.name()),s(2),x(a.description()))},dependencies:[ae,N],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)}.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%]{cursor:pointer;font-size:var(--mat-sys-label-medium-line-height)}.description[_ngcontent-%COMP%]{cursor:pointer;color:var(--mat-sys-outline)}.no-text-select[_ngcontent-%COMP%]{-webkit-user-select:none;user-select:none}"]})}return o})();var Qn=(o,c)=>c.selector;function Jn(o,c){if(o&1&&(n(0,"mat-button-toggle",1),r(1),i()),o&2){let e=c.$implicit;d("value",e),s(),Q(" ",e," ")}}function er(o,c){if(o&1){let e=A();n(0,"widget-list-card",3),b("click",function(){let a=M(e).$implicit,l=u();return y(l.onSelectWidget(a.selector))}),i()}if(o&2){let e=c.$implicit;d("svgIcon",e.icon)("iconSize",48)("name",e.name)("description",e.description)}}var Xo=(()=>{class o{dialogRef=p(ve);_widgets=p(Yo);widgetsList=[];_widgetCategory=Z("Basic");constructor(){this.widgetsList=this._widgets.kipWidgets.filter(e=>e.category===this._widgetCategory())}onCategoryChange(e){this.widgetsList=this._widgets.kipWidgets.filter(t=>t.category===e.value),this._widgetCategory.set(e.value)}onSelectWidget(e){this.dialogRef.close(e)}static \u0275fac=function(t){return new(t||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,"svgIcon","iconSize","name","description"],[3,"click","svgIcon","iconSize","name","description"]],template:function(t,a){t&1&&(n(0,"div")(1,"mat-button-toggle-group",0),b("change",function(m){return a.onCategoryChange(m)}),T(2,Jn,2,2,"mat-button-toggle",1,G),i(),n(4,"div"),T(5,er,1,4,"widget-list-card",2,Qn),i()()),t&2&&(s(),d("value",a._widgetCategory()),s(),S(a._widgets.categories),s(3),S(a.widgetsList))},dependencies:[$o,Jt,qt,Zo],styles:[".list-filter[_ngcontent-%COMP%]{margin-bottom:20px}"]})}return o})();var Qo=(()=>{class o{dialogRef=p(ve);fileVersionToUpgrade=9;configVersionToUpgrade=10;currentConfigVersion=11;_storage=p(Ga);_settings=p(xt);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=>gt(this,null,function*(){for(let t of e){let a=yield this.transformConfig(t);if(a)if(a.scope==="global")try{this._storage.patchGlobal(a.name,a.scope,a.newConfiguration,"add"),this._storage.patchGlobal(a.name,a.scope,a.oldConfiguration,"replace",9),console.log(`[Upgrade] Configuration ${a.scope}/${a.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 ${t.name}`)}else this._storage.setConfig(a.scope,a.name,a.newConfiguration).then(()=>{this._storage.setConfig(a.scope,a.name,a.oldConfiguration,9),console.log(`[Upgrade] Configuration ${a.scope}/${a.name} has been upgraded to version ${this.currentConfigVersion} and saved. Old configuration has been patched to version 0.`)}).catch(l=>{console.error(`[Upgrade] Error saving configuration for ${t.name}:`,l)})}})).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 t=this.transformApp(e.app),a=this.transformTheme(e.theme),l=e.layout?.rootSplits||[],m=e.layout?.splitSets||[],h=e.widget?.widgets||[],D=l.map((J,De)=>{let Ie=this.extractWidgetsFromSplitSets(m,h,J);return{id:J,name:`Dashboard ${De+1}`,configuration:Ie}});localStorage.setItem("appConfig",JSON.stringify(t)),localStorage.setItem("dashboardsConfig",JSON.stringify(D)),localStorage.setItem("themeConfig",JSON.stringify(a))}setTimeout(()=>{this._settings.reloadApp()},1500)}transformConfig(e){return gt(this,null,function*(){let t=yield this._storage.getConfig(e.scope,e.name,this.fileVersionToUpgrade);if(t.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 a=this.transformApp(t.app),l=this.transformTheme(t.theme),m=t.layout?.rootSplits||[],h=t.layout?.splitSets||[],D=t.widget?.widgets||[],J=m.map((Ie,ft)=>{let at=this.extractWidgetsFromSplitSets(h,D,Ie);return{id:Ie,name:`Dashboard ${ft+1}`,configuration:at}}),De=wt(t);return De.app.configVersion=0,{scope:e.scope,name:e.name,newConfiguration:{app:a,theme:l,dashboards:J},oldConfiguration:De}})}transformWidget(e,t){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":t==="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,t,a){let l=new Map(t.map(ot=>[ot.uuid,ot])),m=[],h=[],D=0,J=0,De=12,Ie=12,ft=2,at=2,ta=ot=>{let aa=e.find(Ge=>Ge.uuid===ot);if(!aa){h.push(`Missing splitSet with UUID: ${ot}`);return}aa.splitAreas.forEach(Ge=>{if(Ge.type==="widget"){let re=l.get(Ge.uuid);if(re){if(re.type==="WidgetBlank"){console.warn(`Skipping widget of type WidgetBlank with UUID: ${re.uuid}`);return}if(J+at>Ie){h.push(`No space left in the grid for widget with UUID: ${re.uuid}`);return}let oa=o.widgetTypeToSelectorMap[re.type]||"widget-unknown",oi=this.transformWidget(re.config,re.type);m.push({id:re.uuid,selector:oa,input:{widgetProperties:{type:oa,uuid:re.uuid,config:oi}},x:D,y:J,w:ft,h:at}),D+=ft,D>=De&&(D=0,J+=at)}else h.push(`Missing widget with UUID: ${Ge.uuid}`)}else Ge.type==="splitSet"&&ta(Ge.uuid)})};return ta(a),h.length>0&&console.warn("Transformation Issues:",h),m}startFresh(){if(this._storage.initConfig)this._storage.listConfigs(this.fileVersionToUpgrade).then(e=>gt(this,null,function*(){for(let t of e){let a=yield this._storage.getConfig(t.scope,t.name,this.fileVersionToUpgrade);if(a.app.configVersion=0,t.scope==="global")try{setTimeout(()=>{this._storage.patchGlobal(t.name,t.scope,a,"replace",9),console.log(`[Retired] Configuration ${t.scope}/${t.name} has been patched to version 0.`)},750)}catch{console.error(`[Upgrade] Error saving configuration for ${t.name}:`)}else try{yield this._storage.setConfig(t.scope,t.name,a,9),console.log(`[Retired] Configuration ${t.scope}/${t.name} has been patched to version 0.`)}catch{console.error(`[Upgrade] Error saving configuration for ${t.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(t){return new(t||o)};static \u0275cmp=v({type:o,selectors:[["upgrade-config"]],decls:75,vars:0,consts:[["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(t,a){t&1&&(n(0,"h2"),r(1,"Instructions and Upgrade Limitations"),i(),n(2,"p"),r(3,"The new and old widget layout engines are fundamentally different. As a result, migrating the configuration will produce the following:"),i(),n(4,"ul")(5,"li"),r(6,"All KIP configuration settings will be migrated."),i(),n(7,"li"),r(8,"Each v2 Page layout will be migrated to a v3 Dashboard."),i(),n(9,"li"),r(10,"All widgets and their configurations will be migrated and visible in their corresponding v3 Dashboard."),i(),n(11,"li")(12,"strong"),r(13,"Note:"),i(),r(14," Widget positions, order, and sizes "),n(15,"strong"),r(16,"WILL BE LOST"),i(),r(17,". Dashboards will contain small widgets that can be repositioned and resized manually. "),i()(),n(18,"p"),r(19,"To upgrade your configuration, please follow these steps:"),i(),n(20,"ol")(21,"li"),r(22," As a safety measure, if you are using Signal K authentication, manually back up your configuration. Make a copy of the "),n(23,"code"),r(24,"9.0.0.json"),i(),r(25," files found on the Signal K server in the following folders: "),n(26,"ul")(27,"li")(28,"code"),r(29,"~/.signalk/applicationData/users/(username)/kip/"),i()(),n(30,"li")(31,"code"),r(32,"~/.signalk/applicationData/global/kip/"),i()()()(),n(33,"li"),r(34,"Click the "),n(35,"strong"),r(36,"Upgrade"),i(),r(37," button below."),i(),n(38,"li"),r(39,"Once the upgrade is complete, KIP will restart and display the migrated dashboards."),i(),n(40,"li"),r(41," Swipe left, or press "),n(42,"code"),r(43,"Shift + Ctrl + Left Arrow"),i(),r(44," to open the Actions menu. Tap/Click on "),n(45,"strong"),r(46,"Help"),i(),r(47,` and read "The Basics" and "Dashboards and Layout." We promise, it's a quick read. `),i(),n(48,"li"),r(49,"Reposition and resize your widgets as needed."),i(),n(50,"li"),r(51,"Once satisfied, proceed to deleting the "),n(52,"code"),r(53,"9.0.0.json"),i(),r(54," configuration files located in the previously mentioned folders. They are not needed any more."),i(),n(55,"li"),r(56," If you need support, join the "),n(57,"a",0),r(58,"Signal K #kip Discord channel"),i(),r(59,". "),i(),n(60,"li"),r(61,"Enjoy the new features and improvements!"),i()(),n(62,"p"),r(63," If you prefer not to upgrade your configuration, you "),n(64,"strong"),r(65,"MUST MANUALLY DELETE"),i(),r(66," the "),n(67,"code"),r(68,"9.0.0.json"),i(),r(69,` files from the previously mentioned server folders.
7
- `),i(),n(70,"div",1)(71,"button",2),b("click",function(){return a.upgrade()}),r(72,"Upgrade"),i(),n(73,"button",3),b("click",function(){return a.startFresh()}),r(74,"Start Fresh"),i()())},dependencies:[Se,oe,_e],styles:[".button-group[_ngcontent-%COMP%]{display:flex;justify-content:center}"]})}return o})();var vd=(()=>{class o{dialog=p(eo);openFrameDialog(e,t){switch(e.component){case"select-widget":e.componentType=Xo;break;case"upgrade-config":e.componentType=Qo;break}return this.dialog.open(xo,{data:e,height:t?"calc(100% - 30px)":"",width:t?"calc(100% - 30px)":"",maxWidth:t?"100%":"",maxHeight:t?"100%":""}).afterClosed()}openConfirmationDialog(e){return this.dialog.open(wo,{data:e,minWidth:"35vw",minHeight:"25vh"}).afterClosed()}openNameDialog(e){return this.dialog.open(Go,{data:e,minWidth:"20vw",minHeight:"20vh",disableClose:!0})}openWidgetOptions(e){return this.dialog.open(jo,{data:e.config,minWidth:"50vw",maxWidth:"90vw"})}static \u0275fac=function(t){return new(t||o)};static \u0275prov=ee({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})();var Jo=[["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"]],ce=(()=>{if(typeof document>"u")return!1;let o=Jo[0],c={};for(let e of Jo)if(e?.[1]in document){for(let[a,l]of e.entries())c[o[a]]=l;return c}return!1})(),ei={change:ce.fullscreenchange,error:ce.fullscreenerror},W={request(o=document.documentElement,c){return new Promise((e,t)=>{let a=()=>{W.off("change",a),e()};W.on("change",a);let l=o[ce.requestFullscreen](c);l instanceof Promise&&l.then(a).catch(t)})},exit(){return new Promise((o,c)=>{if(!W.isFullscreen){o();return}let e=()=>{W.off("change",e),o()};W.on("change",e);let t=document[ce.exitFullscreen]();t instanceof Promise&&t.then(e).catch(c)})},toggle(o,c){return W.isFullscreen?W.exit():W.request(o,c)},onchange(o){W.on("change",o)},onerror(o){W.on("error",o)},on(o,c){let e=ei[o];e&&document.addEventListener(e,c,!1)},off(o,c){let e=ei[o];e&&document.removeEventListener(e,c,!1)},raw:ce};Object.defineProperties(W,{isFullscreen:{get:()=>!!document[ce.fullscreenElement]},element:{enumerable:!0,get:()=>document[ce.fullscreenElement]??void 0},isEnabled:{enumerable:!0,get:()=>!!document[ce.fullscreenEnabled]}});ce||(W={isEnabled:!1});var de=W;var xd=(()=>{class o{isDragging=Z(!1);fullscreenStatus=Z(!1);fullscreenSupported=Z(!0);noSleepStatus=Z(!1);noSleepSupported=Z(!0);noSleep=new NoSleep;initialTouchX=null;initialTouchY=null;hotkeyListeners=new Map;constructor(){de.isEnabled?de.on("change",()=>{this.fullscreenStatus.set(de.isFullscreen),de.isFullscreen||this.noSleep.disable()}):(this.fullscreenSupported.set(!1),console.log("[Actions Menu] Fullscreen mode is not supported by device/browser.")),this.checkNoSleepSupport(),this.checkPwaMode()&&this.noSleepSupported()&&!this.noSleepStatus()&&this.toggleNoSleep()}checkNoSleepSupport(){try{if(this.noSleep=new NoSleep,typeof this.noSleep.enable!="function"||typeof this.noSleep.disable!="function")throw new Error("[Actions Menu] NoSleep methods not available")}catch{this.noSleepSupported.set(!1),console.warn("[Actions Menu] NoSleep is not supported by this device/browser.")}}checkPwaMode(){let e=window.matchMedia("(display-mode: standalone)").matches||window.navigator.standalone!==void 0;return console.log("[Actions Menu] PWA mode:",e),e}toggleNoSleep(){this.noSleepSupported()&&(this.noSleepStatus()?this.noSleep.disable():this.noSleep.enable(),this.noSleepStatus.set(!this.noSleepStatus()),console.log("[Actions Menu] NoSleep active:",this.noSleepStatus()))}toggleFullScreen(){de.isEnabled?(this.fullscreenStatus()?(de.isFullscreen&&de.exit(),this.noSleep.disable()):(de.request(),this.noSleep.enable()),this.fullscreenStatus.set(!this.fullscreenStatus())):(this.fullscreenSupported.set(!1),console.log("[Actions Menu] Fullscreen mode is not supported by this browser."))}addGestureListeners(e,t){let a=this.preventBrowserHistorySwipeGestures.bind(this);document.addEventListener("openLeftSidenav",e),document.addEventListener("openRightSidenav",t),document.addEventListener("touchstart",a,{passive:!1}),document.addEventListener("touchmove",a,{passive:!1}),document.addEventListener("touchend",a),document.addEventListener("touchcancel",a)}removeGestureListeners(e,t){let a=this.preventBrowserHistorySwipeGestures.bind(this);document.removeEventListener("openLeftSidenav",e),document.removeEventListener("openRightSidenav",t),document.removeEventListener("touchstart",a),document.removeEventListener("touchmove",a),document.removeEventListener("touchend",a),document.removeEventListener("touchcancel",a)}preventBrowserHistorySwipeGestures(e){if(e.touches.length===1){let t=e.touches[0],a=30;if(e.type==="touchstart")this.initialTouchX=t.clientX,this.initialTouchY=t.clientY;else if(e.type==="touchmove"&&this.initialTouchX!==null&&this.initialTouchY!==null){let l=Math.abs(t.clientX-this.initialTouchX),m=Math.abs(t.clientY-this.initialTouchY);l>10&&l>m&&(this.initialTouchX<a||this.initialTouchX>window.innerWidth-a)&&e.preventDefault(),m>10&&this.initialTouchY<50&&e.preventDefault()}else(e.type==="touchend"||e.type==="touchcancel")&&(this.initialTouchX=null,this.initialTouchY=null)}}addHotkeyListener(e,t){let a=l=>{if(l instanceof KeyboardEvent){let m=l.key.toLowerCase();if(t&&(t.keys&&!t.keys.includes(m)||t.ctrlKey!==void 0&&l.ctrlKey!==t.ctrlKey||t.shiftKey!==void 0&&l.shiftKey!==t.shiftKey))return;e(m,l)}else console.warn("[uiEvent Service] Non-keyboard event detected in addHotkeyListener:",l)};this.hotkeyListeners.set(e,a),document.addEventListener("keydown",a)}removeHotkeyListener(e){let t=this.hotkeyListeners.get(e);t&&(document.removeEventListener("keydown",t),this.hotkeyListeners.delete(e))}static \u0275fac=function(t){return new(t||o)};static \u0275prov=ee({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})();function tr(o,c){}var ti="_mat-bottom-sheet-enter",ai="_mat-bottom-sheet-exit",ar=(()=>{class o extends Xa{_breakpointSubscription;_animationsDisabled=p(Be,{optional:!0})==="NoopAnimations";_animationState="void";_animationStateChanged=new Y;_destroyed;constructor(){super();let e=p(At);this._breakpointSubscription=e.observe([se.Medium,se.Large,se.XLarge]).subscribe(()=>{let t=this._elementRef.nativeElement.classList;t.toggle("mat-bottom-sheet-container-medium",e.isMatched(se.Medium)),t.toggle("mat-bottom-sheet-container-large",e.isMatched(se.Large)),t.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(ti))}exit(){this._destroyed||(this._elementRef.nativeElement.setAttribute("mat-exit",""),this._animationState="hidden",this._changeDetectorRef.markForCheck(),this._animationsDisabled&&this._simulateAnimation(ai))}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,t){let a=t===ti;(a||t===ai)&&this._animationStateChanged.emit({toState:a?"visible":"hidden",phase:e?"start":"done"})}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=v({type:o,selectors:[["mat-bottom-sheet-container"]],hostAttrs:["tabindex","-1",1,"mat-bottom-sheet-container"],hostVars:9,hostBindings:function(t,a){t&1&&b("animationstart",function(m){return a._handleAnimationEvent(!0,m.animationName)})("animationend",function(m){return a._handleAnimationEvent(!1,m.animationName)})("animationcancel",function(m){return a._handleAnimationEvent(!1,m.animationName)}),t&2&&(le("role",a._config.role)("aria-modal",a._config.ariaModal)("aria-label",a._config.ariaLabel),X("mat-bottom-sheet-container-animations-enabled",!a._animationsDisabled)("mat-bottom-sheet-container-enter",a._animationState==="visible")("mat-bottom-sheet-container-exit",a._animationState==="hidden"))},features:[ha],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(t,a){t&1&&_(0,tr,0,0,"ng-template",0)},dependencies:[ja],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})(),or=new $("MatBottomSheetData"),ea=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},zt=class{_ref;get instance(){return this._ref.componentInstance}get componentRef(){return this._ref.componentRef}containerInstance;disableClose;_afterOpened=new it;_result;_closeFallbackTimeout;constructor(c,e,t){this._ref=c,this.containerInstance=t,this.disableClose=e.disableClose,t._animationStateChanged.pipe(pe(a=>a.phase==="done"&&a.toState==="visible"),Le(1)).subscribe(()=>{this._afterOpened.next(),this._afterOpened.complete()}),t._animationStateChanged.pipe(pe(a=>a.phase==="done"&&a.toState==="hidden"),Le(1)).subscribe(()=>{clearTimeout(this._closeFallbackTimeout),this._ref.close(this._result)}),c.overlayRef.detachments().subscribe(()=>{this._ref.close(this._result)}),Oe(this.backdropClick(),this.keydownEvents().pipe(pe(a=>a.keyCode===27))).subscribe(a=>{!this.disableClose&&(a.type!=="keydown"||!He(a))&&(a.preventDefault(),this.dismiss())})}dismiss(c){this.containerInstance&&(this.containerInstance._animationStateChanged.pipe(pe(e=>e.phase==="start"),Le(1)).subscribe(()=>{this._closeFallbackTimeout=setTimeout(()=>this._ref.close(this._result),500),this._ref.overlayRef.detachBackdrop()}),this._result=c,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}},ir=new $("mat-bottom-sheet-default-options"),nr=(()=>{class o{_overlay=p(Ke);_parentBottomSheet=p(o,{optional:!0,skipSelf:!0});_defaultOptions=p(ir,{optional:!0});_bottomSheetRefAtThisLevel=null;_dialog=p(Qa);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,t){let a=me(me({},this._defaultOptions||new ea),t),l;return this._dialog.open(e,Fe(me({},a),{disableClose:!0,closeOnOverlayDetachments:!1,maxWidth:"100%",container:ar,scrollStrategy:a.scrollStrategy||this._overlay.scrollStrategies.block(),positionStrategy:this._overlay.position().global().centerHorizontally().bottom("0"),templateContext:()=>({bottomSheetRef:l}),providers:(m,h,D)=>(l=new zt(m,a,D),[{provide:zt,useValue:l},{provide:or,useValue:a.data}])})),l.afterDismissed().subscribe(()=>{this._openedBottomSheetRef===l&&(this._openedBottomSheetRef=null)}),this._openedBottomSheetRef?(this._openedBottomSheetRef.afterDismissed().subscribe(()=>l.containerInstance?.enter()),this._openedBottomSheetRef.dismiss()):l.containerInstance.enter(),this._openedBottomSheetRef=l,l}dismiss(e){this._openedBottomSheetRef&&this._openedBottomSheetRef.dismiss(e)}ngOnDestroy(){this._bottomSheetRefAtThisLevel&&this._bottomSheetRefAtThisLevel.dismiss()}static \u0275fac=function(t){return new(t||o)};static \u0275prov=ee({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})(),Ud=(()=>{class o{static \u0275fac=function(t){return new(t||o)};static \u0275mod=ge({type:o});static \u0275inj=ue({providers:[nr],imports:[Ja,q,Ha,q]})}return o})();export{gr as a,gl as b,Do as c,vd as d,xd as e,zt as f,nr as g,Ud as h};
1
+ import{a as Co,b as Mo,c as yo}from"./chunk-YQQFIIO5.js";import{a as tt,b as se}from"./chunk-MCACXEYY.js";import{a as et,b as To,c as So,d as xo}from"./chunk-FMVUDX5R.js";import{a as we,b as Nt}from"./chunk-FFCTE2U5.js";import{b as fo,c as go,d as Ot,e as ho,f as U,g as bo,h as _o,i as pt,j as ne,k as Lt}from"./chunk-7OTNT2GF.js";import{g as Da,i as Ia,n as Oa,o as N,p as ae,q as uo,u as vo}from"./chunk-VIHODUV4.js";import{a as Ja,b as eo,c as to,d as ve,e as Ce,g as ao,h as Me,i as ye,j as Te,k as $e,l as Se}from"./chunk-FCC7GNHD.js";import{a as je}from"./chunk-P2NQVKWN.js";import{a as po}from"./chunk-RCSPPHLA.js";import{A as Je,D as R,E as Pt,a as ke,d as Ga,e as Ea,f as ka,g as xt,h as Yt,i as wt,k as Fa,r as Pa,t as O,u as Ft,v as Qe,x as mo,z as L}from"./chunk-AHFD2AA5.js";import{$a as Be,$b as X,$c as k,Aa as sa,Ae as Ha,Bb as fa,Cc as te,Da as Ve,Dc as r,E as ia,Ea as M,Ec as x,Ee as Ka,Fa as y,Fc as Q,Fe as $a,Gc as yt,H as Kt,Hb as v,Ib as ge,Ic as Ma,J as Oe,Jb as lt,Jc as ya,K as pe,Kb as ga,Kc as Ta,La as ca,Lb as ha,Ld as La,Md as Na,Me as Ya,N as na,Nb as _,Ne as Za,O as bt,Oa as Y,Oc as dt,Od as Va,Pa as da,Pc as Tt,Pe as Xa,Q as Le,Ra as fe,Rc as We,Sa as f,Sc as qe,Se as Ke,T as ra,Ta as rt,Td as Ba,Va as Z,Vd as Ra,Ve as Qa,We as kt,Xc as ze,Xe as V,Yb as le,Yd as At,Zb as d,Ze as E,_b as Ct,a as me,ac as $t,af as I,b as Fe,bc as ba,bf as j,cd as Sa,cf as oo,dc as C,de as mt,df as io,eb as ma,ec as G,ee as He,ef as no,f as gt,fa as Ne,fc as Mt,fe as Ua,ff as ro,g as ht,ga as _t,gc as T,gf as H,hc as S,he as Zt,hf as lo,ia as la,ic as n,ie as Gt,if as Dt,j as jt,jc as i,jf as xe,kc as g,ke as Et,kf as ie,lc as _a,le as q,lf as K,m as it,mc as va,mf as so,na as vt,nc as Ca,nf as co,o as nt,oa as ee,oc as A,of as Ye,pa as ue,pf as It,qc as b,qd as xa,qf as Ze,ra as $,rc as u,rd as wa,re as Wa,rf as F,sc as Re,sd as Aa,se as qa,t as Ht,tc as Ue,te as z,tf as Xe,ua as p,ub as s,uc as Ee,ud as St,ue as za,uf as B,vc as st,ve as _e,vf as P,wb as pa,wc as ct,xc as he,xe as ja,yb as ua,yc as be,ye as oe,z as Pe}from"./chunk-JIJMSRKJ.js";var br=(()=>{class o{_settings=p(xt);_router=p(Ia);dashboards=Z([],{equal:Yt});activeDashboard=Z(0);_widgetAction=new nt(null);widgetAction$=this._widgetAction.asObservable();_isDashboardStatic=new nt(!0);isDashboardStatic$=this._isDashboardStatic.asObservable();isDashboardStatic=Fa(this.isDashboardStatic$);blankDashboard=[{id:null,name:"Dashboard 1",configuration:[{w:12,h:12,id:"d1d58e6f-f8b4-4a72-9597-7f92aa6776fc",selector:"widget-tutorial",input:{widgetProperties:{type:"widget-tutorial",uuid:"d1d58e6f-f8b4-4a72-9597-7f92aa6776fc"}},x:0,y:0}]}];constructor(){let e=this._settings.getDashboardConfig();if(!e||e.length===0){console.warn("[Dashboard Service] No dashboards found in settings, creating blank dashboard");let t=this.blankDashboard.map(a=>Fe(me({},a),{id:ke.create()}));this.dashboards.set([...t])}else this.dashboards.set(this._settings.getDashboardConfig());Sa(()=>{this._settings.saveDashboards(this.dashboards())})}toggleStaticDashboard(){this._isDashboardStatic.next(!this._isDashboardStatic.value)}add(e,t){this.dashboards.update(a=>[...a,{id:ke.create(),name:e,configuration:t}])}update(e,t){this.dashboards.update(a=>a.map((l,m)=>m===e?Fe(me({},l),{name:t}):l))}delete(e){this.dashboards.update(t=>t.filter((a,l)=>l!==e)),this.dashboards().length===0?(this.add("Dashboard "+(this.dashboards().length+1),[]),this.activeDashboard.set(0)):this.activeDashboard()>this.dashboards().length-1&&this.activeDashboard.set(this.dashboards().length-1)}duplicate(e,t){if(e<0||e>=this.dashboards().length){console.error(`[Dashboard Service] Invalid itemIndex: ${e}`);return}let a=this.dashboards()[e],l=wt(a);l.id=ke.create(),l.name=t,Array.isArray(l.configuration)?l.configuration.forEach(m=>{m&&m.input?.widgetProperties?(m.id=ke.create(),m.input.widgetProperties.uuid=m.id):console.error("Dashboard Service] Widget configuration is missing required properties:",m)}):(console.error("Dashboard Service] Dashboard configuration is not an array:",l.configuration),l.configuration=[]),this.dashboards.update(m=>[...m,l])}updateConfiguration(e,t){this.dashboards.update(a=>a.map((l,m)=>m===e?Yt(l.configuration,t)?l:Fe(me({},l),{configuration:t}):l))}previousDashboard(){this.activeDashboard()+1>this.dashboards().length-1?this.activeDashboard.set(0):this.activeDashboard.set(this.activeDashboard()+1)}nextDashboard(){this.activeDashboard()-1<0?this.activeDashboard.set(this.dashboards().length-1):this.activeDashboard.set(this.activeDashboard()-1)}navigateToActive(){this._router.navigate(["/dashboard",this.activeDashboard()])}navigateTo(e){e<0||e>this.dashboards().length-1||this._router.navigate(["/dashboard",e])}deleteWidget(e){this._widgetAction.next({id:e,operation:"delete"})}duplicateWidget(e){this._widgetAction.next({id:e,operation:"duplicate"})}setStaticDashboard(e){this._isDashboardStatic.next(e)}static \u0275fac=function(t){return new(t||o)};static \u0275prov=ee({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})();function ri(o,c){o&1&&Ca(0)}var Ao=(()=>{class o{data=p(Ce);static \u0275fac=function(t){return new(t||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(t,a){t&1&&(n(0,"div",0)(1,"h6",1),r(2),i(),n(3,"button",2)(4,"mat-icon"),r(5,"close"),i()()(),n(6,"mat-dialog-content",3),_(7,ri,1,0,"ng-container",4),i()),t&2&&(s(2),x(a.data.title),s(),d("mat-dialog-close",!1),s(4),d("ngComponentOutlet",a.data.componentType))},dependencies:[N,Se,Me,ye,Te,oe,z,xa],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}.dialog-content-padding[_ngcontent-%COMP%]{--mat-dialog-content-padding: 0px 24px 20px 24px}"]})}return o})();function li(o,c){if(o&1&&(n(0,"button",4),r(1),i()),o&2){let e=u();d("mat-dialog-close",!0),s(),x(e.data.confirmBtnText)}}var Go=(()=>{class o{data=p(Ce);static \u0275fac=function(t){return new(t||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(t,a){t&1&&(n(0,"div",0)(1,"h5",1),r(2),i(),n(3,"button",2)(4,"mat-icon"),r(5,"close"),i()()(),n(6,"mat-dialog-content"),r(7),i(),n(8,"mat-dialog-actions",3)(9,"button",4),r(10),i(),_(11,li,2,2,"button",4),i()),t&2&&(s(2),x(a.data.title),s(),d("mat-dialog-close",!1),s(4),Q(" ",a.data.message,`
2
+ `),s(2),d("mat-dialog-close",!1),s(),x(a.data.cancelBtnText),s(),C(a.data.confirmBtnText?11:-1))},dependencies:[N,Se,Me,ye,$e,Te,oe,_e,z],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 ci(o,c){if(o&1&&(n(0,"button",9),r(1),i()),o&2){let e=u(),t=te(1);d("disabled",!t.valid),s(),x(e.data.confirmBtnText)}}var ko=(()=>{class o{dialogRef=p(ve);data=p(Ce);saveName(){this.dialogRef.close(this.data)}static \u0275fac=function(t){return new(t||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(t,a){if(t&1){let l=A();n(0,"form",1,0),b("ngSubmit",function(){return M(l),y(a.saveName())}),n(2,"div",2)(3,"h5",3),r(4),i(),n(5,"button",4)(6,"mat-icon"),r(7,"close"),i()()(),n(8,"mat-dialog-content")(9,"mat-form-field",5)(10,"mat-label"),r(11,"Name"),i(),n(12,"input",6),Ta("ngModelChange",function(h){return M(l),ya(a.data.name,h)||(a.data.name=h),y(h)}),i(),n(13,"mat-error"),r(14," A name is required "),i()()(),n(15,"mat-dialog-actions",7)(16,"button",8),r(17),i(),_(18,ci,2,2,"button",9),i()()}t&2&&(s(4),x(a.data.title),s(),d("mat-dialog-close",!1),s(7),Ma("ngModel",a.data.name),s(4),d("mat-dialog-close",!1),s(),x(a.data.cancelBtnText),s(),C(a.data.confirmBtnText?18:-1))},dependencies:[Se,Me,ye,$e,Te,ae,N,Je,L,O,Ft,Pt,R,oe,_e,z,B,Dt,V,I,j,F,lo,no],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 mi(o,c){if(o&1&&(n(0,"mat-option",12),r(1),i()),o&2){let e=c.$implicit;Ee("value",e.value),s(),x(e.label)}}function pi(o,c){if(o&1){let e=A();n(0,"button",21),b("click",function(){M(e);let a=u();return y(a.moveCtrlUp())}),n(1,"mat-icon"),r(2,"arrow_drop_up"),i()()}}function ui(o,c){if(o&1){let e=A();n(0,"button",22),b("click",function(){M(e);let a=u();return y(a.moveCtrlDown())}),n(1,"mat-icon"),r(2,"arrow_drop_down"),i()()}}var Do=(()=>{class o{app=p(je);ctrlFormGroup=f.required();controlIndex=f(void 0);arrayLength=f(void 0);deleteCtrl=fe();moveUp=fe();moveDown=fe();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(t){return new(t||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(t,a){t&1&&(n(0,"div",0)(1,"div",1)(2,"div",2)(3,"mat-form-field",3)(4,"mat-label"),r(5,"Label"),i(),g(6,"input",4),i()(),n(7,"div",5)(8,"mat-form-field",6)(9,"mat-label"),r(10,"Type"),i(),n(11,"mat-select",7)(12,"mat-option",8),r(13,"Toggle"),i(),n(14,"mat-option",9),r(15,"Push"),i(),n(16,"mat-option",10),r(17,"Indicator"),i()()()(),n(18,"div",5)(19,"mat-form-field",6)(20,"mat-label"),r(21,"Color"),i(),n(22,"mat-select",11),T(23,mi,2,2,"mat-option",12,G),i()()(),n(25,"div",13)(26,"mat-checkbox",14),r(27," Use numeric path "),i()()(),n(28,"div",15)(29,"div",16)(30,"div",17),_(31,pi,3,0,"button",18)(32,ui,3,0,"button",19),n(33,"button",20),b("click",function(){return a.deleteControl()}),n(34,"mat-icon"),r(35,"delete"),i()()()()()()),t&2&&(d("formGroup",a.ctrlFormGroup()),s(23),S(a.colors),s(8),C(a.controlIndex()!==0?31:-1),s(),C(a.controlIndex()!==a.arrayLength()-1?32:-1))},dependencies:[B,V,I,j,F,P,K,Ye,L,O,R,ne,U,z,Nt,we,ae,N],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 fi(o,c){if(o&1){let e=A();n(0,"boolean-control-config",4),b("moveUp",function(a){M(e);let l=u();return y(l.moveUp(a))})("moveDown",function(a){M(e);let l=u();return y(l.moveDown(a))})("deleteCtrl",function(a){M(e);let l=u();return y(l.deletePath(a))}),i()}if(o&2){let e=c.$implicit,t=c.$index,a=u();d("ctrlFormGroup",a.getFormGroup(e))("controlIndex",t)("arrayLength",a.arrayLength)}}var Io=(()=>{class o{fb=p(Xe);multiCtrlArray=f.required();addPath=fe();updatePath=fe();delPath=fe();multiFormGroup=null;arrayLength=0;multiCtrlArraySubscription=null;ngOnInit(){this.arrayLength=this.multiCtrlArray().length,this.multiFormGroup=new oo({multiCtrlArray:this.multiCtrlArray()}),this.multiCtrlArraySubscription=this.multiCtrlArray().valueChanges.pipe(bt(350)).subscribe(e=>{this.updatePath.emit(e)})}addCtrlGroup(){let e=ke.create();this.multiCtrlArray().push(this.fb.group({ctrlLabel:[null,E.required],type:["1",E.required],pathID:[e],color:["contrast"],isNumeric:[!1],value:[null]})),this.arrayLength=this.multiCtrlArray().length;let t={description:null,path:null,pathID:e,source:"default",pathType:"boolean",supportsPut:!0,isPathConfigurable:!0,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"unitless",convertUnitTo:"unitless",sampleTime:500};this.addPath.emit(t)}moveUp(e){let t=this.multiCtrlArray().at(e);this.multiCtrlArray().removeAt(e,{emitEvent:!1}),this.multiCtrlArray().insert(e-1,t,{emitEvent:!1})}moveDown(e){let t=this.multiCtrlArray().at(e);this.multiCtrlArray().removeAt(e,{emitEvent:!1}),this.multiCtrlArray().insert(e+1,t,{emitEvent:!1})}deletePath(e){this.delPath.emit(e),this.arrayLength=this.multiCtrlArray().length}getFormGroup(e){return e}ngOnDestroy(){this.multiCtrlArraySubscription?.unsubscribe()}static \u0275fac=function(t){return new(t||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(t,a){t&1&&(n(0,"div",0)(1,"div",1),T(2,fi,1,3,"boolean-control-config",2,Mt),n(4,"button",3),b("click",function(){return a.addCtrlGroup()}),n(5,"mat-icon"),r(6,"add"),i()()()()),t&2&&(d("formGroup",a.multiFormGroup),s(2),S(a.multiCtrlArray().controls))},dependencies:[B,j,P,K,co,Do,oe,ja,ae,N],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})();var gi=["*"];var hi=new $("MAT_CARD_CONFIG"),bl=(()=>{class o{appearance;constructor(){let e=p(hi,{optional:!0});this.appearance=e?.appearance||"raised"}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=v({type:o,selectors:[["mat-card"]],hostAttrs:[1,"mat-mdc-card","mdc-card"],hostVars:4,hostBindings:function(t,a){t&2&&X("mat-mdc-card-outlined",a.appearance==="outlined")("mdc-card--outlined",a.appearance==="outlined")},inputs:{appearance:"appearance"},exportAs:["matCard"],ngContentSelectors:gi,decls:1,vars:0,template:function(t,a){t&1&&(Re(),Ue(0))},styles:[`.mat-mdc-card{display:flex;flex-direction:column;box-sizing:border-box;position:relative;border-style:solid;border-width:0;background-color:var(--mdc-elevated-card-container-color, var(--mat-sys-surface-container-low));border-color:var(--mdc-elevated-card-container-color, var(--mat-sys-surface-container-low));border-radius:var(--mdc-elevated-card-container-shape, var(--mat-sys-corner-medium));box-shadow:var(--mdc-elevated-card-container-elevation, var(--mat-sys-level1))}.mat-mdc-card::after{position:absolute;top:0;left:0;width:100%;height:100%;border:solid 1px rgba(0,0,0,0);content:"";display:block;pointer-events:none;box-sizing:border-box;border-radius:var(--mdc-elevated-card-container-shape, var(--mat-sys-corner-medium))}.mat-mdc-card-outlined{background-color:var(--mdc-outlined-card-container-color, var(--mat-sys-surface));border-radius:var(--mdc-outlined-card-container-shape, var(--mat-sys-corner-medium));border-width:var(--mdc-outlined-card-outline-width, 1px);border-color:var(--mdc-outlined-card-outline-color, var(--mat-sys-outline-variant));box-shadow:var(--mdc-outlined-card-container-elevation, var(--mat-sys-level0))}.mat-mdc-card-outlined::after{border:none}.mdc-card__media{position:relative;box-sizing:border-box;background-repeat:no-repeat;background-position:center;background-size:cover}.mdc-card__media::before{display:block;content:""}.mdc-card__media:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}.mdc-card__media:last-child{border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}.mat-mdc-card-actions{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;min-height:52px;padding:8px}.mat-mdc-card-title{font-family:var(--mat-card-title-text-font, var(--mat-sys-title-large-font));line-height:var(--mat-card-title-text-line-height, var(--mat-sys-title-large-line-height));font-size:var(--mat-card-title-text-size, var(--mat-sys-title-large-size));letter-spacing:var(--mat-card-title-text-tracking, var(--mat-sys-title-large-tracking));font-weight:var(--mat-card-title-text-weight, var(--mat-sys-title-large-weight))}.mat-mdc-card-subtitle{color:var(--mat-card-subtitle-text-color, var(--mat-sys-on-surface));font-family:var(--mat-card-subtitle-text-font, var(--mat-sys-title-medium-font));line-height:var(--mat-card-subtitle-text-line-height, var(--mat-sys-title-medium-line-height));font-size:var(--mat-card-subtitle-text-size, var(--mat-sys-title-medium-size));letter-spacing:var(--mat-card-subtitle-text-tracking, var(--mat-sys-title-medium-tracking));font-weight:var(--mat-card-subtitle-text-weight, var(--mat-sys-title-medium-weight))}.mat-mdc-card-title,.mat-mdc-card-subtitle{display:block;margin:0}.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-title,.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-subtitle{padding:16px 16px 0}.mat-mdc-card-header{display:flex;padding:16px 16px 0}.mat-mdc-card-content{display:block;padding:0 16px}.mat-mdc-card-content:first-child{padding-top:16px}.mat-mdc-card-content:last-child{padding-bottom:16px}.mat-mdc-card-title-group{display:flex;justify-content:space-between;width:100%}.mat-mdc-card-avatar{height:40px;width:40px;border-radius:50%;flex-shrink:0;margin-bottom:16px;object-fit:cover}.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-subtitle,.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-title{line-height:normal}.mat-mdc-card-sm-image{width:80px;height:80px}.mat-mdc-card-md-image{width:112px;height:112px}.mat-mdc-card-lg-image{width:152px;height:152px}.mat-mdc-card-xl-image{width:240px;height:240px}.mat-mdc-card-subtitle~.mat-mdc-card-title,.mat-mdc-card-title~.mat-mdc-card-subtitle,.mat-mdc-card-header .mat-mdc-card-header-text .mat-mdc-card-title,.mat-mdc-card-header .mat-mdc-card-header-text .mat-mdc-card-subtitle,.mat-mdc-card-title-group .mat-mdc-card-title,.mat-mdc-card-title-group .mat-mdc-card-subtitle{padding-top:0}.mat-mdc-card-content>:last-child:not(.mat-mdc-card-footer){margin-bottom:0}.mat-mdc-card-actions-align-end{justify-content:flex-end}
3
+ `],encapsulation:2,changeDetection:0})}return o})();var Fo=(()=>{class o{static \u0275fac=function(t){return new(t||o)};static \u0275mod=ge({type:o});static \u0275inj=ue({imports:[q,q]})}return o})();function bi(o,c){if(o&1&&(n(0,"mat-option",8),r(1),i()),o&2){let e=c.$implicit;Ee("value",e.value),s(),x(e.label)}}var Oo=(()=>{class o{dsService=p(et);app=p(je);displayName=f.required();showLabel=f.required();convertUnitTo=f.required();datasetUUID=f.required();datasetAverageArray=f.required();showAverageData=f.required();trackAgainstAverage=f.required();showDatasetMinimumValueLine=f.required();showDatasetMaximumValueLine=f.required();showDatasetAverageValueLine=f.required();showDatasetAngleAverageValueLine=f.required();verticalGraph=f.required();showTimeScale=f.required();showYScale=f.required();startScaleAtZero=f.required();yScaleSuggestedMin=f.required();yScaleSuggestedMax=f.required();enableMinMaxScaleLimit=f.required();yScaleMin=f.required();yScaleMax=f.required();numDecimal=f.required();color=f.required();colors=[];ngOnInit(){this.colors=this.app.configurableThemeColors,this.showAverageData().value||this.trackAgainstAverage().disable(),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(t){return new(t||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"],verticalGraph:[1,"verticalGraph"],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:80,vars:18,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"],[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","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(t,a){if(t&1){let l=A();n(0,"div",1)(1,"div",2)(2,"div",3)(3,"mat-form-field",4)(4,"mat-label"),r(5,"Widget Label"),i(),g(6,"input",5),i()(),n(7,"div",3)(8,"mat-checkbox",6),r(9," Show Label "),i()()(),n(10,"div",2)(11,"mat-form-field",4)(12,"mat-label"),r(13,"Color"),i(),n(14,"mat-select",7),T(15,bi,2,2,"mat-option",8,G),i()()(),n(17,"div",2)(18,"div",9)(19,"div")(20,"p"),r(21,"Series"),i(),n(22,"mat-form-field",10)(23,"mat-label"),r(24,"Value Decimal Places"),i(),g(25,"input",11),i(),n(26,"mat-checkbox",12),b("change",function(h){return M(l),y(a.enableTrackAgainstMovingAverage(h))}),r(27," Display Moving Average "),i(),n(28,"mat-checkbox",13),r(29," Track Against Moving Average "),i()()(),n(30,"div",9)(31,"div")(32,"p",14),r(33,"Data Scale"),i(),n(34,"span",15),r(35,"(Default node is automatic scale)"),i(),n(36,"mat-radio-group",16)(37,"mat-radio-button",17),b("change",function(h){return M(l),y(a.setScaleControls(h))}),r(38,"Auto Scale"),i(),n(39,"div",18)(40,"mat-form-field",19)(41,"mat-label"),r(42,"Suggested Min"),i(),g(43,"input",20),i(),n(44,"mat-form-field",19)(45,"mat-label"),r(46,"Suggested Max"),i(),g(47,"input",21),i()(),n(48,"mat-radio-button",17),b("change",function(h){return M(l),y(a.setScaleControls(h))}),r(49,"Fixed Scale"),i(),n(50,"div",18)(51,"div",22)(52,"mat-form-field",19)(53,"mat-label"),r(54,"Min"),i(),g(55,"input",23),i()(),n(56,"div",22)(57,"mat-form-field",19)(58,"mat-label"),r(59,"Max"),i(),g(60,"input",24),i()()()(),n(61,"mat-checkbox",25),r(62," Show Scale Ticks "),i()()(),n(63,"div",9)(64,"div")(65,"p",14),r(66,"Time Scale"),i(),n(67,"mat-checkbox",26),r(68," Show Scale Ticks "),i()()(),n(69,"div",9)(70,"div")(71,"p",14),r(72,"Dataset"),i(),n(73,"mat-checkbox",27),r(74," Show Maximum Line "),i(),n(75,"mat-checkbox",28),r(76," Show Average Line "),i(),n(77,"mat-checkbox",29,0),r(79," Show Minimum Line "),i()()()()()}t&2&&(s(6),d("formControl",a.displayName()),s(2),d("formControl",a.showLabel()),s(6),d("formControl",a.color()),s(),S(a.colors),s(10),d("formControl",a.numDecimal()),s(),d("formControl",a.showAverageData()),s(2),d("formControl",a.trackAgainstAverage()),s(8),d("formControl",a.enableMinMaxScaleLimit()),s(),d("value",!1),s(6),d("formControl",a.yScaleSuggestedMin()),s(4),d("formControl",a.yScaleSuggestedMax()),s(),d("value",!0),s(7),d("formControl",a.yScaleMin()),s(5),d("formControl",a.yScaleMax()),s(),d("formControl",a.showYScale()),s(6),d("formControl",a.showTimeScale()),s(6),d("formControl",a.showDatasetMaximumValueLine()),s(2),d("formControl",a.showDatasetAverageValueLine()),s(2),d("formControl",a.showDatasetMinimumValueLine()))},dependencies:[Fo,Je,L,O,Nt,we,Lt,ne,U,pt,Pt,R,xo,To,So,P,V,xe,I,F,Ze,It,ie],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})();function _i(o,c){if(o&1&&(n(0,"mat-option",4),r(1),i()),o&2){let e=c.$implicit;d("value",e.uuid),s(),Q(" ",e.label," ")}}function vi(o,c){if(o&1&&(n(0,"mat-option",4),r(1),i()),o&2){let e=c.$implicit;d("value",e.measure),s(),Q(" ",e.description," ")}}function Ci(o,c){if(o&1&&(n(0,"mat-optgroup",6),T(1,vi,2,2,"mat-option",4,Mt),i()),o&2){let e=c.$implicit;d("label",e.group),s(),S(e.units)}}var Lo=(()=>{class o{datasetService=p(et);units=p(tt);datasetUUID=f.required();convertUnitTo=f.required();availableDataSets=[];unitList={};ngOnInit(){this.availableDataSets=this.datasetService.list().sort();let e=this.datasetUUID();e.value?(this.setPathUnits(e.value),this.convertUnitTo().enable()):this.convertUnitTo().disable()}setPathUnits(e){this.convertUnitTo().enable(),e?this.unitList=this.units.getConversionsForPath(this.datasetService.getDatasetConfig(e).path):this.unitList=this.units.getConversionsForPath("")}datasetChanged(e){this.setPathUnits(e.value)}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=v({type:o,selectors:[["config-dataset-chart-options"]],inputs:{datasetUUID:[1,"datasetUUID"],convertUnitTo:[1,"convertUnitTo"]},decls:14,vars:2,consts:[[1,"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(t,a){t&1&&(n(0,"div",0)(1,"div",1)(2,"mat-form-field",2)(3,"mat-label"),r(4,"Dataset"),i(),n(5,"mat-select",3),b("selectionChange",function(m){return a.datasetChanged(m)}),T(6,_i,2,2,"mat-option",4,G),i()(),n(8,"mat-form-field",2)(9,"mat-label"),r(10,"Display Format"),i(),n(11,"mat-select",5),T(12,Ci,3,1,"mat-optgroup",6,G),i()()()()),t&2&&(s(5),d("formControl",a.datasetUUID()),s(),S(a.availableDataSets),s(5),d("formControl",a.convertUnitTo()),s(),S(a.unitList.conversions))},dependencies:[Je,L,O,Lt,ne,U,Ot,P,I,F,ie],encapsulation:2})}return o})();var No=(()=>{class o{transform(e,t){return Object.keys(e)}static \u0275fac=function(t){return new(t||o)};static \u0275pipe=ga({name:"objectKeys",type:o,pure:!0})}return o})();var yi=["panel"],Ti=["*"];function Si(o,c){if(o&1&&(n(0,"div",1,0),Ue(2),i()),o&2){let e=c.id,t=u();ba(t._classList),X("mat-mdc-autocomplete-visible",t.showPanel)("mat-mdc-autocomplete-hidden",!t.showPanel)("mat-autocomplete-panel-animations-enabled",!t._animationsDisabled)("mat-primary",t._color==="primary")("mat-accent",t._color==="accent")("mat-warn",t._color==="warn"),d("id",t.id),le("aria-label",t.ariaLabel||null)("aria-labelledby",t._getPanelAriaLabelledby(e))}}var Qt=class{source;option;constructor(c,e){this.source=c,this.option=e}},Ro=new $("mat-autocomplete-default-options",{providedIn:"root",factory:xi});function xi(){return{autoActiveFirstOption:!1,autoSelectActiveOption:!1,hideSingleSelectionIndicator:!1,requireSelection:!1,hasBackdrop:!1}}var Ut=(()=>{class o{_changeDetectorRef=p(ze);_elementRef=p(rt);_defaults=p(Ro);_animationsDisabled=p(Be,{optional:!0})==="NoopAnimations";_activeOptionChanges=ht.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 Y;opened=new Y;closed=new Y;optionActivated=new Y;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=p(mt).getId("mat-autocomplete-");inertGroups;constructor(){let e=p(Va);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 Ua(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 t=new Qt(this,e);this.optionSelected.emit(t)}_getPanelAriaLabelledby(e){if(this.ariaLabel)return null;let t=e?e+" ":"";return this.ariaLabelledby?t+this.ariaLabelledby:e}_skipPredicate(){return!1}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=v({type:o,selectors:[["mat-autocomplete"]],contentQueries:function(t,a,l){if(t&1&&(st(l,U,5),st(l,go,5)),t&2){let m;he(m=be())&&(a.options=m),he(m=be())&&(a.optionGroups=m)}},viewQuery:function(t,a){if(t&1&&(ct(pa,7),ct(yi,5)),t&2){let l;he(l=be())&&(a.template=l.first),he(l=be())&&(a.panel=l.first)}},hostAttrs:[1,"mat-mdc-autocomplete"],inputs:{ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],displayWith:"displayWith",autoActiveFirstOption:[2,"autoActiveFirstOption","autoActiveFirstOption",k],autoSelectActiveOption:[2,"autoSelectActiveOption","autoSelectActiveOption",k],requireSelection:[2,"requireSelection","requireSelection",k],panelWidth:"panelWidth",disableRipple:[2,"disableRipple","disableRipple",k],classList:[0,"class","classList"],hideSingleSelectionIndicator:[2,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",k]},outputs:{optionSelected:"optionSelected",opened:"opened",closed:"closed",optionActivated:"optionActivated"},exportAs:["matAutocomplete"],features:[dt([{provide:fo,useExisting:o}])],ngContentSelectors:Ti,decls:1,vars:0,consts:[["panel",""],["role","listbox",1,"mat-mdc-autocomplete-panel","mdc-menu-surface","mdc-menu-surface--open",3,"id"]],template:function(t,a){t&1&&(Re(),_(0,Si,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:static;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}
4
+ `],encapsulation:2,changeDetection:0})}return o})();var wi={provide:kt,useExisting:vt(()=>ut),multi:!0};var Uo=new $("mat-autocomplete-scroll-strategy",{providedIn:"root",factory:()=>{let o=p(Ke);return()=>o.scrollStrategies.reposition()}});function Ai(o){return()=>o.scrollStrategies.reposition()}var Gi={provide:Uo,deps:[Ke],useFactory:Ai},ut=(()=>{class o{_environmentInjector=p(sa);_element=p(rt);_overlay=p(Ke);_viewContainerRef=p(fa);_zone=p(da);_changeDetectorRef=p(ze);_dir=p(Et,{optional:!0});_formField=p(mo,{optional:!0,host:!0});_viewportRuler=p(Ya);_scrollStrategy=p(Uo);_renderer=p(ua);_defaults=p(Ro,{optional:!0});_overlayRef;_portal;_componentDestroyed=!1;_initialized=new it;_keydownSubscription;_outsideClickSubscription;_cleanupWindowBlur;_previousValue;_valueOnAttach;_valueOnLastKeydown;_positionStrategy;_manuallyFloatingLabel=!1;_closingActionsSubscription;_viewportSubscription=ht.EMPTY;_breakpointObserver=p(At);_handsetLandscapeSubscription=ht.EMPTY;_canOpenOnNextFocus=!0;_valueBeforeAutoSelection;_pendingAutoselectedOption;_closeKeyEventStream=new it;_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&&Gt(this._trackedModal,"aria-owns",this.autocomplete.id))}updatePosition(){this._overlayAttached&&this._overlayRef.updatePosition()}get panelClosingActions(){return Oe(this.optionSelections,this.autocomplete._keyManager.tabOut.pipe(pe(()=>this._overlayAttached)),this._closeKeyEventStream,this._getOutsideClickStream(),this._overlayRef?this._overlayRef.detachments().pipe(pe(()=>this._overlayAttached)):Ht()).pipe(Pe(e=>e instanceof ho?e:null))}optionSelections=ia(()=>{let e=this.autocomplete?this.autocomplete.options:null;return e?e.changes.pipe(Ne(e),_t(()=>Oe(...e.map(t=>t.onSelectionChange)))):this._initialized.pipe(_t(()=>this.optionSelections))});get activeOption(){return this.autocomplete&&this.autocomplete._keyManager?this.autocomplete._keyManager.activeItem:null}_getOutsideClickStream(){return new jt(e=>{let t=l=>{let m=Na(l),h=this._formField?this._formField.getConnectedOverlayOrigin().nativeElement:null,D=this.connectedTo?this.connectedTo.elementRef.nativeElement:null;this._overlayAttached&&m!==this._element.nativeElement&&!this._hasFocus()&&(!h||!h.contains(m))&&(!D||!D.contains(m))&&this._overlayRef&&!this._overlayRef.overlayElement.contains(m)&&e.next(l)},a=[this._renderer.listen("document","click",t),this._renderer.listen("document","auxclick",t),this._renderer.listen("document","touchend",t)];return()=>{a.forEach(l=>l())}})}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 t=e.keyCode,a=He(e);if(t===27&&!a&&e.preventDefault(),this._valueOnLastKeydown=this._element.nativeElement.value,this.activeOption&&t===13&&this.panelOpen&&!a)this.activeOption._selectViaInteraction(),this._resetActiveItem(),e.preventDefault();else if(this.autocomplete){let l=this.autocomplete._keyManager.activeItem,m=t===38||t===40;t===9||m&&!a&&this.panelOpen?this.autocomplete._keyManager.onKeydown(e):m&&this._canOpen()&&this._openPanelInternal(this._valueOnLastKeydown),(m||this.autocomplete._keyManager.activeItem!==l)&&(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 t=e.target,a=t.value;if(t.type==="number"&&(a=a==""?null:parseFloat(a)),this._previousValue!==a){if(this._previousValue=a,this._pendingAutoselectedOption=null,(!this.autocomplete||!this.autocomplete.requireSelection)&&this._onChange(a),!a)this._clearPreviousSelectedOption(null,!1);else if(this.panelOpen&&!this.autocomplete.requireSelection){let l=this.autocomplete.options?.find(m=>m.selected);if(l){let m=this._getDisplayValue(l.value);a!==m&&l.deselect(!1)}}if(this._canOpen()&&this._hasFocus()){let l=this._valueOnLastKeydown??this._element.nativeElement.value;this._valueOnLastKeydown=null,this._openPanelInternal(l)}}}_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 La()===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 jt(a=>{ma(()=>{a.next()},{injector:this._environmentInjector})}),t=this.autocomplete.options?.changes.pipe(la(()=>this._positionStrategy.reapplyLastPosition()),ra(0))??Ht();return Oe(e,t).pipe(_t(()=>this._zone.run(()=>{let a=this.panelOpen;return this._resetActiveItem(),this._updatePanelState(),this._changeDetectorRef.detectChanges(),this.panelOpen&&this._overlayRef.updatePosition(),a!==this.panelOpen&&(this.panelOpen?this._emitOpened():this.autocomplete.closed.emit()),this.panelClosingActions})),Le(1)).subscribe(a=>this._setValueAndClose(a))}_emitOpened(){this.autocomplete.opened.emit()}_destroyPanel(){this._overlayRef&&(this.closePanel(),this._overlayRef.dispose(),this._overlayRef=null)}_getDisplayValue(e){let t=this.autocomplete;return t&&t.displayWith?t.displayWith(e):e}_assignOptionValue(e){let t=this._getDisplayValue(e);e==null&&this._clearPreviousSelectedOption(null,!1),this._updateNativeInputValue(t??"")}_updateNativeInputValue(e){this._formField?this._formField._control.value=e:this._element.nativeElement.value=e,this._previousValue=e}_setValueAndClose(e){let t=this.autocomplete,a=e?e.source:this._pendingAutoselectedOption;a?(this._clearPreviousSelectedOption(a),this._assignOptionValue(a.value),this._onChange(a.value),t._emitSelectEvent(a),this._element.nativeElement.focus()):t.requireSelection&&this._element.nativeElement.value!==this._valueOnAttach&&(this._clearPreviousSelectedOption(null),this._assignOptionValue(null),this._onChange(null)),this.closePanel()}_clearPreviousSelectedOption(e,t){this.autocomplete?.options?.forEach(a=>{a!==e&&a.selected&&a.deselect(t)})}_openPanelInternal(e=this._element.nativeElement.value){if(this._attachOverlay(e),this._floatLabel(),this._trackedModal){let t=this.autocomplete.id;Zt(this._trackedModal,"aria-owns",t)}}_attachOverlay(e){this.autocomplete;let t=this._overlayRef;t?(this._positionStrategy.setOrigin(this._getConnectedElement()),t.updateSize({width:this._getPanelWidth()})):(this._portal=new Ha(this.autocomplete.template,this._viewContainerRef,{id:this._formField?.getLabelId()}),t=this._overlay.create(this._getOverlayConfig()),this._overlayRef=t,this._viewportSubscription=this._viewportRuler.change().subscribe(()=>{this.panelOpen&&t&&t.updateSize({width:this._getPanelWidth()})}),this._handsetLandscapeSubscription=this._breakpointObserver.observe(se.HandsetLandscape).subscribe(l=>{l.matches?this._positionStrategy.withFlexibleDimensions(!0).withGrowAfterOpen(!0).withViewportMargin(8):this._positionStrategy.withFlexibleDimensions(!1).withGrowAfterOpen(!1).withViewportMargin(0)})),t&&!t.hasAttached()&&(t.attach(this._portal),this._valueOnAttach=e,this._valueOnLastKeydown=null,this._closingActionsSubscription=this._subscribeToClosingActions());let a=this.panelOpen;this.autocomplete._isOpen=this._overlayAttached=!0,this.autocomplete._latestOpeningTrigger=this,this.autocomplete._setColor(this._formField?.color),this._updatePanelState(),this._applyModalPanelOwnership(),this.panelOpen&&a!==this.panelOpen&&this._emitOpened()}_handlePanelKeydown=e=>{(e.keyCode===27&&!He(e)||e.keyCode===38&&He(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 Xa({positionStrategy:this._getOverlayPosition(),scrollStrategy:this._scrollStrategy(),width:this._getPanelWidth(),direction:this._dir??void 0,hasBackdrop:this._defaults?.hasBackdrop,backdropClass:this._defaults?.backdropClass,panelClass:this._defaults?.overlayPanelClass})}_getOverlayPosition(){let e=this._overlay.position().flexibleConnectedTo(this._getConnectedElement()).withFlexibleDimensions(!1).withPush(!1);return this._setStrategyPositions(e),this._positionStrategy=e,e}_setStrategyPositions(e){let t=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],a=this._aboveClass,l=[{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:a},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",panelClass:a}],m;this.position==="above"?m=l:this.position==="below"?m=t:m=[...t,...l],e.withPositions(m)}_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 t=-1;for(let a=0;a<e.options.length;a++)if(!e.options.get(a).disabled){t=a;break}e._keyManager.setActiveItem(t)}else e._keyManager.setActiveItem(-1)}_canOpen(){let e=this._element.nativeElement;return!e.readOnly&&!e.disabled&&!this.autocompleteDisabled}_scrollToOption(e){let t=this.autocomplete,a=bo(e,t.options,t.optionGroups);if(e===0&&a===1)t._setScrollTop(0);else if(t.panel){let l=t.options.toArray()[e];if(l){let m=l._getHostElement(),h=_o(m.offsetTop,m.offsetHeight,t._getScrollTop(),t.panel.nativeElement.offsetHeight);t._setScrollTop(h)}}}_trackedModal=null;_applyModalPanelOwnership(){let e=this._element.nativeElement.closest('body > .cdk-overlay-container [aria-modal="true"]');if(!e)return;let t=this.autocomplete.id;this._trackedModal&&Gt(this._trackedModal,"aria-owns",t),Zt(e,"aria-owns",t),this._trackedModal=e}_clearFromModal(){if(this._trackedModal){let e=this.autocomplete.id;Gt(this._trackedModal,"aria-owns",e),this._trackedModal=null}}static \u0275fac=function(t){return new(t||o)};static \u0275dir=lt({type:o,selectors:[["input","matAutocomplete",""],["textarea","matAutocomplete",""]],hostAttrs:[1,"mat-mdc-autocomplete-trigger"],hostVars:7,hostBindings:function(t,a){t&1&&b("focusin",function(){return a._handleFocus()})("blur",function(){return a._onTouched()})("input",function(m){return a._handleInput(m)})("keydown",function(m){return a._handleKeydown(m)})("click",function(){return a._handleClick()}),t&2&&le("autocomplete",a.autocompleteAttribute)("role",a.autocompleteDisabled?null:"combobox")("aria-autocomplete",a.autocompleteDisabled?null:"list")("aria-activedescendant",a.panelOpen&&a.activeOption?a.activeOption.id:null)("aria-expanded",a.autocompleteDisabled?null:a.panelOpen.toString())("aria-controls",a.autocompleteDisabled||!a.panelOpen||a.autocomplete==null?null:a.autocomplete.id)("aria-haspopup",a.autocompleteDisabled?null:"listbox")},inputs:{autocomplete:[0,"matAutocomplete","autocomplete"],position:[0,"matAutocompletePosition","position"],connectedTo:[0,"matAutocompleteConnectedTo","connectedTo"],autocompleteAttribute:[0,"autocomplete","autocompleteAttribute"],autocompleteDisabled:[2,"matAutocompleteDisabled","autocompleteDisabled",k]},exportAs:["matAutocompleteTrigger"],features:[dt([wi]),Ve]})}return o})(),Wo=(()=>{class o{static \u0275fac=function(t){return new(t||o)};static \u0275mod=ge({type:o});static \u0275inj=ue({providers:[Gi],imports:[Qa,pt,q,Za,pt,q]})}return o})();var ki=(o,c)=>c.path;function Di(o,c){o&1&&g(0,"i",21)}function Ii(o,c){o&1&&g(0,"i",22)}function Fi(o,c){if(o&1&&(n(0,"mat-option",15),r(1),i()),o&2){let e=c.$implicit;d("value",e),s(),yt("",e.properties.quantity,": ",e.properties.display,"")}}function Pi(o,c){if(o&1){let e=A();n(0,"div",5)(1,"mat-form-field",20)(2,"mat-label"),_(3,Di,1,0,"i",21)(4,Ii,1,0,"i",22),r(5," Filter"),i(),n(6,"mat-select",23,2),b("selectionChange",function(){M(e),u();let a=te(10),l=u();return y(l.pathFormGroup.controls.path.setValue(a.value))}),n(8,"mat-option"),r(9,"All"),i(),T(10,Fi,2,3,"mat-option",15,G),i()()()}if(o&2){let e=te(7),t=u(2);s(3),C(e.value?4:3),s(3),d("formControl",t.pathSkUnitsFilterControl),s(4),S(t.pathSkUnitsFiltersList)}}function Oi(o,c){if(o&1){let e=A();n(0,"button",24),b("click",function(){M(e);let a=u(2);return y(a.pathFormGroup.controls.path.setValue(""))}),n(1,"mat-icon"),r(2,"close"),i()()}}function Li(o,c){o&1&&(n(0,"mat-error"),r(1," Path is required. Please enter a valid Signal K path. "),i())}function Ni(o,c){o&1&&(n(0,"mat-error"),r(1," Path not recognized. Please enter a path from the server's published list. "),i())}function Vi(o,c){if(o&1&&(n(0,"span"),r(1),i(),g(2,"br"),n(3,"small",25),r(4),i()),o&2){let e=u().$implicit;s(),x(e.path),s(3),x(e.meta.description)}}function Bi(o,c){if(o&1&&r(0),o&2){let e=u().$implicit;Q(" ",e.path," ")}}function Ri(o,c){if(o&1&&(n(0,"mat-option",10),_(1,Vi,5,2)(2,Bi,1,1),i()),o&2){let e=c.$implicit;d("value",e.path),s(),C(e.meta!=null?1:2)}}function Ui(o,c){if(o&1&&(n(0,"mat-option",15),r(1),i()),o&2){let e=c.$implicit;d("value",e),s(),Q(" ",e," ")}}function Wi(o,c){if(o&1&&(n(0,"mat-option",15),r(1),i()),o&2){let e=c.$implicit;d("value",e.measure),s(),Q(" ",e.description," ")}}function qi(o,c){if(o&1&&(n(0,"mat-optgroup",27),T(1,Wi,2,2,"mat-option",15,G),i()),o&2){let e=c.$implicit;d("label",e.group),s(),S(e.units)}}function zi(o,c){if(o&1&&(n(0,"mat-form-field",19)(1,"mat-label"),r(2,"Display Format"),i(),n(3,"mat-select",26),T(4,qi,3,1,"mat-optgroup",27,G),i()()),o&2){let e=u(2);s(4),S(e.unitList.conversions)}}function ji(o,c){if(o&1&&(n(0,"div",3)(1,"div",4)(2,"span"),r(3),i()(),_(4,Pi,12,2,"div",5),n(5,"div",6)(6,"mat-form-field",7)(7,"mat-label"),r(8,"Signal K Path"),i(),g(9,"input",8,0),_(11,Oi,3,0,"button",9)(12,Li,2,0,"mat-error")(13,Ni,2,0,"mat-error"),n(14,"mat-autocomplete",null,1),T(16,Ri,3,2,"mat-option",10,ki),We(18,"async"),i()()(),n(19,"div",11)(20,"div",12)(21,"mat-form-field",13)(22,"mat-label"),r(23,"Data Source"),i(),n(24,"mat-select",14),T(25,Ui,2,2,"mat-option",15,G),i()()(),n(27,"div",16)(28,"mat-form-field",13)(29,"mat-label"),r(30,"Sample Time"),i(),g(31,"input",17),i()(),n(32,"div",18),_(33,zi,6,0,"mat-form-field",19),i()()()),o&2){let e=te(15),t=u();d("formGroup",t.pathFormGroup),s(2),Ct("color",t.pathFormGroup.enabled?"":"rgba(255,255,255,0.5)"),s(),x(t.pathFormGroup.value.description),s(),C(t.pathFormGroup.value.pathType=="number"&&t.showPathSkUnitsFilter?4:-1),s(5),d("matAutocomplete",e),s(2),C(t.pathFormGroup.value.path?11:-1),s(),C(t.pathFormGroup.controls.path.errors!=null&&t.pathFormGroup.controls.path.errors.required?12:t.pathFormGroup.controls.path.errors!=null&&t.pathFormGroup.controls.path.errors.requireMatch?13:-1),s(4),S(qe(18,9,t.filteredPaths)),s(9),S(t.availableSources),s(8),C(t.pathFormGroup.value.pathType=="number"&&t.pathFormGroup.value.isConvertUnitToConfigurable===void 0||t.pathFormGroup.value.pathType=="number"&&t.pathFormGroup.value.isConvertUnitToConfigurable===!0?33:-1)}}function Hi(o){return c=>o().some(a=>a.path===c.value)?null:{requireMatch:!0}}var qo=(()=>{class o{_data=p(Pa);_units=p(tt);_connection=p(Ga);pathFormGroup;filterSelfPaths=f.required();availablePaths;filteredPaths=new nt(null);_pathValueChange$=null;_pathFormGroup$=null;availableSources;unitList={base:"",conversions:[]};showPathSkUnitsFilter=!1;pathSkUnitsFilterControl=new ro(null);pathSkUnitsFiltersList;unitlessUnit={unit:"unitless",properties:{display:"(null)",quantity:"Unitless",quantityDisplay:"(null)",description:""}};ngOnInit(){this.pathSkUnitsFiltersList=this._units.skBaseUnits.sort((e,t)=>e.properties.quantity>t.properties.quantity?1:-1),this.pathSkUnitsFiltersList.unshift(this.unitlessUnit),this.pathFormGroup.value.pathSkUnitsFilter&&this.pathSkUnitsFilterControl.setValue(this.pathSkUnitsFiltersList.find(e=>e.unit===this.pathFormGroup.value.pathSkUnitsFilter),{onlySelf:!0}),this.pathFormGroup.value.showPathSkUnitsFilter&&(this.showPathSkUnitsFilter=this.pathFormGroup.value.showPathSkUnitsFilter),this.pathFormGroup.controls.path.setValidators([E.required,Hi(()=>this.getPaths())]),this.pathFormGroup.controls.path.updateValueAndValidity({onlySelf:!0,emitEvent:!1}),this.pathFormGroup.controls.path.valid?this.enableFormFields(!1):this.disablePathFields(),this.pathFormGroup.controls.sampleTime||(this.pathFormGroup.addControl("sampleTime",new H("500",E.required)),this.pathFormGroup.controls.sampleTime.updateValueAndValidity({onlySelf:!0,emitEvent:!1})),this._pathValueChange$=this.pathFormGroup.controls.path.valueChanges.pipe(na(e=>e===""?Kt(0):Kt(350)),Ne(""),Pe(e=>this.filterPaths(e||""))).subscribe(e=>{this.pathFormGroup.controls.path.pristine||(this.pathFormGroup.controls.path.valid?(this.enableFormFields(!0),this.updatePathMetaBoundDisplayName(this.pathFormGroup.controls.path.value),this.updatePathMetaBoundDisplayScale(this.pathFormGroup.controls.path.value)):this.disablePathFields())}),this._pathFormGroup$=this.pathFormGroup.controls.pathType.valueChanges.subscribe(e=>{this.pathSkUnitsFilterControl.setValue(this.unitlessUnit),this.pathFormGroup.controls.path.updateValueAndValidity()})}ngOnChanges(e){e.filterSelfPaths&&!e.filterSelfPaths.firstChange&&this.pathFormGroup.controls.path.updateValueAndValidity()}getPaths(){let e=this.pathFormGroup.controls.pathType.value,t=this.filterSelfPaths(),a=Ea(this._connection.skServerVersion,"2.12.0",">=")?this.pathFormGroup.value.supportsPut:!1;return this._data.getPathsAndMetaByType(e,a,t).sort()}filterPaths(e){let t=e.toLowerCase(),a=this.getPaths();this.pathSkUnitsFilterControl.value!=null&&(a=a.filter(l=>l.meta&&l.meta.units&&l.meta.units===this.pathSkUnitsFilterControl.value.unit||(!l.meta||!l.meta.units)&&this.pathSkUnitsFilterControl.value.unit==="unitless")),a=a.filter(l=>l.path.toLowerCase().includes(t)),this.filteredPaths.next(a)}enableFormFields(e){let t=this._data.getPathObject(this.pathFormGroup.controls.path.value);t!=null?(this.pathFormGroup.controls.sampleTime.enable({onlySelf:!1}),this.pathFormGroup.controls.pathType.value=="number"&&(this.unitList=this._units.getConversionsForPath(this.pathFormGroup.controls.path.value),e&&this.pathFormGroup.controls.convertUnitTo.setValue(this.unitList.base,{onlySelf:!0}),this.pathFormGroup.controls.convertUnitTo.enable({onlySelf:!1})),Object.keys(t.sources).length==1?(this.availableSources=["default"],e?this.pathFormGroup.controls.source.value!="default"&&this.pathFormGroup.controls.source.setValue("default",{onlySelf:!0}):this.pathFormGroup.controls.source.value!="default"&&this.pathFormGroup.controls.source.setValue("",{onlySelf:!0})):Object.keys(t.sources).length>1&&(this.availableSources=Object.keys(t.sources),this.pathFormGroup.controls.source.value=="default"&&this.pathFormGroup.controls.source.reset()),this.pathFormGroup.controls.source.enable({onlySelf:!1})):this.disablePathFields()}disablePathFields(){this.pathFormGroup.controls.source.reset("",{onlySelf:!0}),this.pathFormGroup.controls.source.disable({onlySelf:!1}),this.pathFormGroup.controls.sampleTime.disable({onlySelf:!1}),this.pathFormGroup.controls.pathType.value=="number"&&(this.pathFormGroup.controls.convertUnitTo.reset("",{onlySelf:!0}),this.pathFormGroup.controls.convertUnitTo.disable({onlySelf:!1}))}updatePathMetaBoundDisplayName(e){if(!this.pathFormGroup.parent.parent.value.hasOwnProperty("displayName"))return;let t=this._data.getPathMeta(e);t?.displayName&&this.pathFormGroup.parent.parent.controls.displayName.setValue(t.displayName)}updatePathMetaBoundDisplayScale(e){if(!this.pathFormGroup.parent.parent.value.hasOwnProperty("displayScale"))return;let t=this._data.getPathMeta(e);if(t?.displayScale){let a=this.pathFormGroup.parent.parent.get("displayScale"),l=this.pathFormGroup.controls.convertUnitTo.value;t.displayScale.lower!==null&&t.displayScale.lower!==void 0&&a.controls.lower.setValue(this._units.convertToUnit(l,t.displayScale.lower)),t.displayScale.upper!==null&&t.displayScale.upper!==void 0&&a.controls.upper.setValue(this._units.convertToUnit(l,t.displayScale.upper)),t.displayScale.type!==null&&t.displayScale.type!==void 0&&a.controls.type.setValue(t.displayScale.type),t.displayScale.power!==null&&t.displayScale.power!==void 0&&a.controls.power.setValue(t.displayScale.power)}}ngOnDestroy(){this._pathValueChange$?.unsubscribe(),this._pathFormGroup$?.unsubscribe()}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=v({type:o,selectors:[["path-control-config"]],inputs:{pathFormGroup:"pathFormGroup",filterSelfPaths:[1,"filterSelfPaths"]},features:[Ve],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"],["type","text","matInput","","placeholder","Type to use autocomplete or select from list","formControlName","path","required","",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(t,a){t&1&&_(0,ji,34,11,"div",3),t&2&&C(a.pathFormGroup.value.isPathConfigurable?0:-1)},dependencies:[B,V,xe,I,j,F,P,ie,K,Ye,L,O,R,Wo,Ut,U,Ot,ut,z,Qe,Ft,ne,St,ae,N],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 Ki(o,c){if(o&1&&g(0,"path-control-config",6),o&2){let e=c.$implicit,t=u(2);d("pathFormGroup",e)("filterSelfPaths",t.filterSelfPaths().value)}}function $i(o,c){if(o&1&&T(0,Ki,1,2,"path-control-config",6,G),o&2){let e=u();S(e.pathsFormGroup.controls)}}function Yi(o,c){if(o&1&&g(0,"path-control-config",6),o&2){let e=c.$implicit,t=u(2);d("pathFormGroup",t.pathsFormGroup.get(e))("filterSelfPaths",t.filterSelfPaths().value)}}function Zi(o,c){if(o&1&&(T(0,Yi,1,2,"path-control-config",6,G),We(2,"objectKeys")),o&2){let e=u();S(qe(2,0,e.pathsFormGroup.controls))}}var zo=(()=>{class o{rootFormGroup=p(K);fb=p(Xe);formGroupName=f.required();isArray=f.required();enableTimeout=f.required();dataTimeout=f.required();filterSelfPaths=f.required();addPathEvent=f(void 0);pathsFormGroup;ngOnInit(){this.isArray()?this.pathsFormGroup=this.rootFormGroup.control.get(this.formGroupName()):this.pathsFormGroup=this.rootFormGroup.control.get(this.formGroupName())}addPath(e){this.pathsFormGroup.push(this.fb.group({description:[e.description],path:[e.path,E.required],pathID:[e.pathID],source:[e.source,E.required],pathType:[e.pathType],isPathConfigurable:[e.isPathConfigurable],showPathSkUnitsFilter:[e.showPathSkUnitsFilter],pathSkUnitsFilter:[e.pathSkUnitsFilter],convertUnitTo:[e.convertUnitTo],sampleTime:[e.sampleTime],supportsPut:[e.supportsPut]})),this.pathsFormGroup.updateValueAndValidity()}ngOnChanges(e){e.addPathEvent&&!e.addPathEvent.firstChange&&this.addPath(e.addPathEvent.currentValue)}static \u0275fac=function(t){return new(t||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"]},features:[Ve],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"]],template:function(t,a){t&1&&(n(0,"div",0)(1,"mat-checkbox",1),r(2," Enable Widget Data TTL "),i(),n(3,"mat-form-field")(4,"mat-label"),r(5,"TTL Timeout For Paths"),i(),g(6,"input",2),n(7,"span",3),r(8,"Seconds"),i()()(),_a(9,4),_(10,$i,2,0)(11,Zi,3,2),va(),n(12,"mat-checkbox",5),r(13,` Restrict to own vessel
5
+ `),i()),t&2&&(s(),d("formControl",a.enableTimeout()),s(5),d("formControl",a.dataTimeout()),s(3),d("formGroup",a.pathsFormGroup),s(),C(a.isArray()?10:11),s(2),d("formControl",a.filterSelfPaths()))},dependencies:[we,B,V,xe,I,j,F,Ze,P,ie,K,L,O,R,Qe,qo,No],styles:["[_nghost-%COMP%]{display:block;height:100%;width:100%;padding-top:15px;padding-bottom:5px}"]})}return o})();function Xi(o,c){if(o&1){let e=A();n(0,"button",7),b("click",function(){M(e);let a=u();return y(a.dateTimezone.setValue(""))}),g(1,"span",8),i()}}function Qi(o,c){if(o&1&&(n(0,"mat-option",9),r(1),i()),o&2){let e=c.$implicit;d("value",e.label),s(),yt(" ",e.offset," - ",e.label," ")}}function Ji(o){return c=>o.some(t=>t.label===c.value)?null:{requireMatch:!0}}var en=()=>{let o=Intl.supportedValuesOf("timeZone"),c=new Date;return o.map(e=>({offset:new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"shortOffset"}).formatToParts(c).find(m=>m.type==="timeZoneName")?.value||"",label:e}))},jo=(()=>{class o{dateFormat=f(void 0);dateTimezone;tz=[];filteredTZ;filteredTZSubscription=null;constructor(){}ngOnInit(){typeof Intl.supportedValuesOf<"u"?this.tz=en().sort((e,t)=>this.compareOffsets(e.offset,t.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,t)=>this.compareOffsets(e.offset,t.offset))),this.dateTimezone.setValidators([E.required,Ji(this.tz)]),this.filteredTZ=this.dateTimezone.valueChanges.pipe(bt(500),Ne(""),Pe(e=>this.filterTZ(e||""))),this.filteredTZSubscription=this.filteredTZ.subscribe()}filterTZ(e){let t=e.toLowerCase();return this.tz.filter(a=>a.label.toLowerCase().includes(t))}compareOffsets(e,t){let a=l=>{let m=l.match(/([+-]?)(\d+)(?::(\d+))?/);if(!m)return 0;let h=m[1]==="-"?-1:1,D=parseInt(m[2],10),J=m[3]?parseInt(m[3],10):0;return h*(D*60+J)};return a(e)-a(t)}ngOnDestroy(){this.filteredTZSubscription?.unsubscribe()}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=v({type:o,selectors:[["display-datetime-options"]],inputs:{dateFormat:[1,"dateFormat"],dateTimezone:"dateTimezone"},decls:14,vars:7,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",4,"ngFor","ngForOf"],["mat-icon-button","","matSuffix","","aria-label","Clear",3,"click"],[1,"fa-solid","fa-close"],[3,"value"]],template:function(t,a){if(t&1&&(n(0,"div",1)(1,"mat-form-field",2)(2,"mat-label"),r(3,"Date & Time Format"),i(),g(4,"input",3),i(),n(5,"mat-form-field",2)(6,"mat-label"),r(7,"Adjust Value to Time Zone"),i(),g(8,"input",4),_(9,Xi,2,0,"button",5),n(10,"mat-autocomplete",null,0),_(12,Qi,2,3,"mat-option",6),We(13,"async"),i()()()),t&2){let l=te(11);s(4),d("formControl",a.dateFormat()),s(4),d("formControl",a.dateTimezone)("matAutocomplete",l),s(),C(a.dateTimezone.value?9:-1),s(3),d("ngForOf",qe(13,5,a.filteredTZ))}},dependencies:[L,O,R,B,V,I,F,P,ie,ut,z,Qe,Ut,wa,U,St],encapsulation:2})}return o})();var Ho=()=>["measuring","capacity"],tn=()=>["marineCompass","baseplateCompass"];function an(o,c){if(o&1&&g(0,"config-display-chart-options",14),o&2){let e=u();d("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)("verticalGraph",e.verticalGraphToControl)("color",e.colorToControl)}}function on(o,c){o&1&&(n(0,"mat-form-field",33)(1,"mat-label"),r(2,"URL"),i(),g(3,"input",34),i())}function nn(o,c){o&1&&(n(0,"mat-checkbox",35),r(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. "),i())}function rn(o,c){o&1&&(n(0,"mat-form-field",33)(1,"mat-label"),r(2,"Widget Label"),i(),g(3,"input",36),i())}function ln(o,c){o&1&&(n(0,"mat-form-field",37)(1,"mat-label"),r(2,"Scale Start"),i(),g(3,"input",38),i(),n(4,"mat-form-field",37)(5,"mat-label"),r(6,"Scale End"),i(),g(7,"input",39),i())}function sn(o,c){o&1&&(n(0,"mat-form-field")(1,"mat-label"),r(2,"Integer Places"),i(),g(3,"input",40),i())}function cn(o,c){if(o&1&&(n(0,"mat-form-field")(1,"mat-label"),r(2,"Decimal Places"),i(),g(3,"input",41),i()),o&2){let e=u(2);X("options-grid-span2",!e.widgetConfig.numInt)}}function dn(o,c){o&1&&(n(0,"mat-checkbox",42),r(1," Show Min recorded value "),i())}function mn(o,c){o&1&&(n(0,"mat-checkbox",43),r(1," Show Max recorded value "),i())}function pn(o,c){if(o&1&&g(0,"display-datetime-options",44),o&2){let e=u(2);d("dateFormat",e.dateFormatToControl)("dateTimezone",e.dateTimezoneToControl)}}function un(o,c){o&1&&(n(0,"mat-checkbox",45),r(1," Invert Rudder angle "),i())}function fn(o,c){o&1&&(n(0,"mat-checkbox",46),r(1," Show Close-hauled Lines "),i())}function gn(o,c){o&1&&(n(0,"mat-form-field")(1,"mat-label"),r(2,"Vessel Close-hauled Angle"),i(),g(3,"input",47),i())}function hn(o,c){o&1&&(n(0,"mat-checkbox",48),r(1," Show Wind Sectors "),i())}function bn(o,c){o&1&&(n(0,"mat-form-field")(1,"mat-label"),r(2,"Wind Sector Duration"),i(),g(3,"input",49),i())}function _n(o,c){if(o&1){let e=A();n(0,"mat-checkbox",50),b("change",function(){M(e);let a=u(2);return y(a.setPaths())}),r(1," Show Course Over Ground "),i()}}function vn(o,c){o&1&&(n(0,"mat-checkbox",51),r(1," Show Next Waypoint "),i())}function Cn(o,c){o&1&&(n(0,"mat-form-field")(1,"mat-label"),r(2,"Minimum Value"),i(),g(3,"input",52),i())}function Mn(o,c){o&1&&(n(0,"mat-form-field")(1,"mat-label"),r(2,"Maximum Value"),i(),g(3,"input",53),i())}function yn(o,c){o&1&&(n(0,"mat-checkbox",54),r(1," Ignore Zones configuration "),i())}function Tn(o,c){o&1&&(n(0,"mat-form-field",30)(1,"mat-label"),r(2,"Highlights Width"),i(),g(3,"input",55),i())}function Sn(o,c){o&1&&(n(0,"mat-form-field",31)(1,"mat-label"),r(2,"Rotation Element"),i(),n(3,"mat-select",56)(4,"mat-option",57),r(5,"Dial (Marine Compass)"),i(),n(6,"mat-option",58),r(7,"Needle (Base plate compass)"),i()()(),n(8,"div",30)(9,"mat-checkbox",59),r(10," Show value box "),i()(),n(11,"div",30)(12,"mat-checkbox",60),r(13," Show cardinal degrees "),i()())}function xn(o,c){o&1&&(n(0,"mat-form-field",30)(1,"mat-label"),r(2,"Gauge Type"),i(),n(3,"mat-select",56)(4,"mat-option",61),r(5,"Measuring"),i(),n(6,"mat-option",62),r(7,"Capacity"),i()()())}function wn(o,c){if(o&1&&_(0,Sn,14,0)(1,xn,8,0,"mat-form-field",30),o&2){let e=u(2);C(Tt(1,tn).indexOf(e.formMaster.value.gauge.subType)>-1?0:Tt(2,Ho).indexOf(e.formMaster.value.gauge.subType)>-1?1:-1)}}function An(o,c){o&1&&(n(0,"div",30)(1,"mat-checkbox",63),r(2," Use needle indicator "),i()(),n(3,"div",30)(4,"mat-checkbox",64),r(5," Enable Ticks "),i()(),n(6,"mat-form-field",31)(7,"mat-label"),r(8,"Orientation"),i(),n(9,"mat-select",65)(10,"mat-option",66),r(11,"Vertical"),i(),n(12,"mat-option",67),r(13,"Horizontal"),i()()())}function Gn(o,c){o&1&&(n(0,"mat-form-field",31)(1,"mat-label"),r(2,"Unit Label"),i(),n(3,"mat-select",68)(4,"mat-option",69),r(5,"Full Label"),i(),n(6,"mat-option",70),r(7,"First Letter Only"),i()()())}function En(o,c){if(o&1&&(n(0,"mat-option",72),r(1),i()),o&2){let e=c.$implicit;Ee("value",e.value),s(),x(e.label)}}function kn(o,c){if(o&1&&(n(0,"mat-form-field",33)(1,"mat-label"),r(2,"Color"),i(),n(3,"mat-select",71),T(4,En,2,2,"mat-option",72,G),i()()),o&2){let e=u(2);s(4),S(e.colors)}}function Dn(o,c){o&1&&(n(0,"mat-checkbox",73),r(1," Disable background color "),i())}function In(o,c){if(o&1&&(n(0,"mat-option",72),r(1),i()),o&2){let e=c.$implicit;Ee("value",e.value),s(),x(e.label)}}function Fn(o,c){if(o&1&&(n(0,"mat-form-field")(1,"mat-label"),r(2,"Background Color"),i(),n(3,"mat-select",74),T(4,In,2,2,"mat-option",72,G),i()()),o&2){let e=u(2);s(4),S(e.colors)}}function Pn(o,c){o&1&&(n(0,"mat-form-field",30)(1,"mat-label"),r(2,"Background Style"),i(),n(3,"mat-select",75)(4,"mat-option",76),r(5,"Dark Gray"),i(),n(6,"mat-option",77),r(7,"Satin Gray"),i(),n(8,"mat-option",78),r(9,"Light Gray"),i(),n(10,"mat-option",79),r(11,"White"),i(),n(12,"mat-option",80),r(13,"Black"),i(),n(14,"mat-option",81),r(15,"Beige"),i(),n(16,"mat-option",82),r(17,"Brown"),i(),n(18,"mat-option",83),r(19,"Red"),i(),n(20,"mat-option",84),r(21,"Green"),i(),n(22,"mat-option",85),r(23,"Blue"),i(),n(24,"mat-option",86),r(25,"Anthracite"),i(),n(26,"mat-option",87),r(27,"Mud"),i(),n(28,"mat-option",88),r(29,"Punched Sheet"),i(),n(30,"mat-option",89),r(31,"Carbon"),i(),n(32,"mat-option",90),r(33,"Stainless"),i(),n(34,"mat-option",91),r(35,"Brushed Metal"),i(),n(36,"mat-option",92),r(37,"Brushed Stainless"),i(),n(38,"mat-option",93),r(39,"Turned"),i()()(),n(40,"mat-form-field",30)(41,"mat-label"),r(42,"Frame Style"),i(),n(43,"mat-select",94)(44,"mat-option",95),r(45,"Black Metal"),i(),n(46,"mat-option",96),r(47,"Metal"),i(),n(48,"mat-option",97),r(49,"Shiny Metal"),i(),n(50,"mat-option",98),r(51,"Brass"),i(),n(52,"mat-option",99),r(53,"Steel"),i(),n(54,"mat-option",100),r(55,"Chrome"),i(),n(56,"mat-option",101),r(57,"Gold"),i(),n(58,"mat-option",86),r(59,"Anthracite"),i(),n(60,"mat-option",102),r(61,"Tilted Gray"),i(),n(62,"mat-option",103),r(63,"Tilted Black"),i(),n(64,"mat-option",104),r(65,"Glossy Metal"),i()()())}function On(o,c){if(o&1&&(n(0,"div",15)(1,"div",16),_(2,on,4,0,"mat-form-field",17)(3,nn,2,0,"mat-checkbox",18)(4,rn,4,0,"mat-form-field",17)(5,ln,8,0)(6,sn,4,0,"mat-form-field",19)(7,cn,4,2,"mat-form-field",20)(8,dn,2,0,"mat-checkbox",21)(9,mn,2,0,"mat-checkbox",22)(10,pn,1,2,"display-datetime-options",23)(11,un,2,0,"mat-checkbox",24)(12,fn,2,0,"mat-checkbox",25)(13,gn,4,0,"mat-form-field",19)(14,hn,2,0,"mat-checkbox",26)(15,bn,4,0,"mat-form-field",19)(16,_n,2,0,"mat-checkbox",27)(17,vn,2,0,"mat-checkbox",28)(18,Cn,4,0,"mat-form-field",19)(19,Mn,4,0,"mat-form-field",19)(20,yn,2,0,"mat-checkbox",29)(21,Tn,4,0,"mat-form-field",30)(22,wn,2,3)(23,An,14,0)(24,Gn,8,0,"mat-form-field",31)(25,kn,6,0,"mat-form-field",17)(26,Dn,2,0,"mat-checkbox",32)(27,Fn,6,0,"mat-form-field",19)(28,Pn,66,0),i()()),o&2){let e=u();s(2),d("ngIf",e.widgetConfig.widgetUrl!==void 0),s(),d("ngIf",e.widgetConfig.allowInput!==void 0),s(),d("ngIf",e.widgetConfig.displayName!==void 0),s(),C(e.formMaster.get("displayScale")?5:-1),s(),d("ngIf",e.widgetConfig.numInt!==void 0),s(),d("ngIf",e.widgetConfig.numDecimal!==void 0),s(),d("ngIf",e.widgetConfig.showMin!==void 0),s(),d("ngIf",e.widgetConfig.showMax!==void 0),s(),d("ngIf",e.widgetConfig.dateFormat!==void 0),s(),d("ngIf",e.widgetConfig.invertRudder!==void 0),s(),d("ngIf",e.widgetConfig.laylineEnable!==void 0),s(),d("ngIf",e.widgetConfig.laylineEnable!==void 0),s(),d("ngIf",e.widgetConfig.windSectorEnable!==void 0),s(),d("ngIf",e.widgetConfig.windSectorEnable!==void 0),s(),d("ngIf",e.widgetConfig.courseOverGroundEnable!==void 0),s(),d("ngIf",e.widgetConfig.waypointEnable!==void 0),s(),d("ngIf",e.widgetConfig.minValue!==void 0&&!e.formMaster.get("displayScale")),s(),d("ngIf",e.widgetConfig.maxValue!==void 0&&!e.formMaster.get("displayScale")),s(),d("ngIf",e.widgetConfig.ignoreZones!==void 0),s(),C((e.widgetConfig.gauge==null?null:e.widgetConfig.gauge.type)=="ngRadial"&&Tt(27,Ho).includes(e.formMaster.value.gauge.subType)||(e.widgetConfig.gauge==null?null:e.widgetConfig.gauge.type)=="ngLinear"?21:-1),s(),C((e.widgetConfig.gauge==null?null:e.widgetConfig.gauge.type)=="ngRadial"?22:-1),s(),C((e.widgetConfig.gauge==null?null:e.widgetConfig.gauge.type)=="ngLinear"?23:-1),s(),C((e.widgetConfig.gauge==null?null:e.widgetConfig.gauge.type)=="simpleLinear"?24:-1),s(),d("ngIf",e.widgetConfig.color!==void 0),s(),d("ngIf",e.widgetConfig.noBgColor!==void 0),s(),d("ngIf",e.widgetConfig.bgColor!==void 0),s(),C((e.widgetConfig.gauge==null?null:e.widgetConfig.gauge.type)=="steel"?28:-1)}}function Ln(o,c){if(o&1&&(g(0,"span",109),r(1,"\xA0Controls ")),o&2){let e=u(2);$t(e.formMaster.controls.multiChildCtrls.valid?"display: none":"display: block")}}function Nn(o,c){if(o&1){let e=A();n(0,"mat-tab",105)(1,"div",106)(2,"div"),_(3,Ln,2,2,"ng-template",107),i(),n(4,"boolean-multicontrol-options",108),b("addPath",function(a){M(e);let l=u();return y(l.addPathGroup(a))})("updatePath",function(a){M(e);let l=u();return y(l.updatePath(a))})("delPath",function(a){M(e);let l=u();return y(l.deletePath(a))}),i()()()}if(o&2){let e=u();s(4),d("multiCtrlArray",e.multiChildCtrlsToControl)}}function Vn(o,c){if(o&1&&(n(0,"span",112),r(1," error "),i(),r(2," \xA0Paths ")),o&2){let e=u(2);$t(e.formMaster.controls.paths.valid?"display: none":"display: block")}}function Bn(o,c){if(o&1&&(n(0,"mat-tab",110)(1,"div",106)(2,"div"),_(3,Vn,3,2,"ng-template",107),i(),g(4,"paths-options",111),i()()),o&2){let e=u();s(4),d("isArray",e.isPathArray)("enableTimeout",e.enableTimeoutToControl)("dataTimeout",e.dataTimeoutToControl)("filterSelfPaths",e.filterSelfPathsToControl)("addPathEvent",e.addPathEvent)}}function Rn(o,c){o&1&&(n(0,"p")(1,"mat-checkbox",116),r(2," Digital display "),i()())}function Un(o,c){o&1&&(n(0,"mat-form-field",33)(1,"mat-label"),r(2,"Dial Size"),i(),n(3,"mat-select",117)(4,"mat-option",118),r(5,"1/4"),i(),n(6,"mat-option",119),r(7,"1/2"),i(),n(8,"mat-option",120),r(9,"3/4"),i(),n(10,"mat-option",69),r(11,"Full"),i()()())}function Wn(o,c){if(o&1&&(n(0,"mat-tab",9)(1,"div",113)(2,"mat-form-field",33)(3,"mat-label"),r(4,"Gauge Type"),i(),n(5,"mat-select",65)(6,"mat-option",114),r(7,"Linear"),i(),n(8,"mat-option",115),r(9,"Radial"),i()()(),_(10,Rn,3,0,"p")(11,Un,12,0,"mat-form-field",33),i()()),o&2){let e=u();s(10),C(e.formMaster.value.gauge.subType=="linear"?10:-1),s(),C(e.formMaster.value.gauge.subType=="radial"?11:-1)}}function qn(o,c){o&1&&(n(0,"p")(1,"mat-checkbox",124),r(2," Value to send on button push (checked = on, unchecked = off) "),i()())}function zn(o,c){if(o&1&&(n(0,"mat-tab",121)(1,"div",106)(2,"p")(3,"mat-checkbox",122),r(4," Enable Put Requests "),i()(),n(5,"p")(6,"mat-checkbox",123),r(7," Momentary mode (instead of switching between on/off) "),i()(),_(8,qn,3,0,"p",19),i()()),o&2){let e=u();s(8),d("ngIf",e.formMaster.controls.putMomentary.value)}}function jn(o,c){o&1&&g(0,"span",109)}function Hn(o,c){if(o&1&&(_(0,jn,1,0,"span",127),r(1," Dataset ")),o&2){let e=u(2);d("ngIf",!e.formMaster.controls.datasetUUID.valid)}}function Kn(o,c){if(o&1&&(n(0,"mat-tab",125),_(1,Hn,2,1,"ng-template",107),g(2,"config-dataset-chart-options",126),i()),o&2){let e=u();s(2),d("datasetUUID",e.datasetUUIDToControl)("convertUnitTo",e.convertUnitToControl)}}var Ko=(()=>{class o{dialogRef=p(ve);fb=p(Xe);DatasetService=p(et);units=p(tt);app=p(je);widgetConfig=p(Ce);titleDialog="Widget Options";formMaster;availableDataSets;unitList={};isPathArray=!1;addPathEvent;colors=[];ngOnInit(){this.availableDataSets=this.DatasetService.list().sort(),this.unitList=this.units.getConversionsForPath(""),this.formMaster=this.generateFormGroups(this.widgetConfig),this.setFormOptions(),this.colors=this.app.configurableThemeColors}generateFormGroups(e,t){let a=this.fb.group({});return Object.keys(e).forEach(l=>{if(typeof e[l]=="object"&&e[l]!==null){if(l=="multiChildCtrls"){a.addControl(l,this.fb.array([]));let m=a.get(l);e[l].forEach(h=>{m.push(this.generateCtrlArray(h))})}else if(l=="displayScale")a.addControl(l,this.generateFormGroups(e[l],l));else if(l=="gauge")a.addControl(l,this.generateFormGroups(e[l],l));else if(l=="paths")if(this.widgetConfig.multiChildCtrls!==void 0){this.isPathArray=!0,a.addControl(l,this.fb.array([]));let m=a.get(l);Object.keys(e[l]).forEach(h=>{m.push(this.generatePathArray(h,this.widgetConfig.paths[h]))})}else a.addControl(l,this.generateFormGroups(e[l],l));t=="paths"&&a.addControl(l,this.generateFormGroups(e[l],l))}else if(t=="convertUnitTo")(this.widgetConfig.paths[l].pathType=="number"||"datasetUUID"in this.widgetConfig)&&a.addControl(l,new H(e[l]));else switch(l){case"path":a.addControl(l,new H(e[l],E.required));break;case"datasetUUID":a.addControl(l,new H(e[l],E.required));break;case"dataTimeout":a.addControl(l,new H(e[l],E.required));break;default:a.addControl(l,new H(e[l]));break}}),a}generatePathArray(e,t){let a=new io({});return Object.keys(t).forEach(l=>{a.addControl(l,this.generatePathFields(l,t[l]))}),a}generatePathFields(e,t){let a=null;switch(e){case"path":a=new H(t,E.required);break;case"source":a=new H(t,E.required);break;case"sampleTime":a=new H(t,E.required);break;default:a=new H(t);break}return a}generateCtrlArray(e){let t=this.fb.group(e);return t.get("ctrlLabel").addValidators(E.required),t}addPathGroup(e){this.addPathEvent=e}updatePath(e){e.forEach(t=>{this.formMaster.get("paths").controls.forEach(l=>{l.get("pathID").value==t.pathID&&(l.controls.description.setValue(t.ctrlLabel),l.controls.pathType.setValue(t.isNumeric?"number":"boolean"))})})}deletePath(e){let t=this.formMaster.get("paths"),a=0;t.controls.forEach(m=>{if(m.get("pathID").value==e.pathID){let D=t.controls[""];t.removeAt(a)}else a++}),this.formMaster.get("multiChildCtrls").removeAt(e.ctrlIndex),this.formMaster.updateValueAndValidity()}setPaths(){this.setFormOptions()}setFormOptions(){if(this.formMaster.contains("courseOverGroundEnable")){let e=this.formMaster.get("paths.courseOverGround");this.formMaster.controls.courseOverGroundEnable.value?e.enable():e.disable()}}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 convertUnitToToControl(){return this.formMaster.get("convertUnitTo")}get datasetUUIDControl(){return this.formMaster.get("datasetUUID")}get displayNameToControl(){return this.formMaster.get("displayName")}get numDecimalToControl(){return this.formMaster.get("numDecimal")}get verticalGraphToControl(){return this.formMaster.get("verticalGraph")}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.value)}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=v({type:o,selectors:[["modal-widget-config"]],decls:19,vars:10,consts:[[3,"ngSubmit","formGroup"],["mat-dialog-title",""],[1,"widget-config-dialog-content"],[1,"tab-group-content"],["label","Display"],["class","tab-content",3,"displayName","datasetUUID","convertUnitTo","showAverageData","trackAgainstAverage","datasetAverageArray","showDatasetMinimumValueLine","showDatasetMaximumValueLine","showDatasetAverageValueLine","showDatasetAngleAverageValueLine","startScaleAtZero","showLabel","showTimeScale","showYScale","yScaleSuggestedMin","yScaleSuggestedMax","enableMinMaxScaleLimit","yScaleMin","yScaleMax","numDecimal","verticalGraph","color",4,"ngIf"],["class","display-content tab-content",4,"ngIf"],["label","Controls",4,"ngIf"],["label","Paths",4,"ngIf"],["label","Settings","formGroupName","gauge"],["label","Put Request",4,"ngIf"],["label","Dataset",4,"ngIf"],["type","button","mat-dialog-close","","mat-flat-button",""],["mat-flat-button","","type","submit",3,"disabled"],[1,"tab-content",3,"displayName","datasetUUID","convertUnitTo","showAverageData","trackAgainstAverage","datasetAverageArray","showDatasetMinimumValueLine","showDatasetMaximumValueLine","showDatasetAverageValueLine","showDatasetAngleAverageValueLine","startScaleAtZero","showLabel","showTimeScale","showYScale","yScaleSuggestedMin","yScaleSuggestedMax","enableMinMaxScaleLimit","yScaleMin","yScaleMax","numDecimal","verticalGraph","color"],[1,"display-content","tab-content"],[1,"widget-options-grid"],["class","options-grid-span2",4,"ngIf"],["class","options-grid-span2","name","allowInput","formControlName","allowInput",4,"ngIf"],[4,"ngIf"],[3,"options-grid-span2",4,"ngIf"],["name","showMin","formControlName","showMin",4,"ngIf"],["name","showMax","formControlName","showMax",4,"ngIf"],["class","options-grid-span2",3,"dateFormat","dateTimezone",4,"ngIf"],["class","fields","name","invertRudder","formControlName","invertRudder",4,"ngIf"],["class","fields","name","laylineEnable","formControlName","laylineEnable",4,"ngIf"],["name","windSectorEnable","formControlName","windSectorEnable",4,"ngIf"],["class","options-grid-span2","name","courseOverGroundEnable","formControlName","courseOverGroundEnable",3,"change",4,"ngIf"],["class","options-grid-span2","name","waypointEnable","formControlName","waypointEnable",4,"ngIf"],["name","ignoreZones","formControlName","ignoreZones",4,"ngIf"],["formGroupName","gauge"],["formGroupName","gauge",1,"options-grid-span2"],["name","noBgColor","formControlName","noBgColor",4,"ngIf"],[1,"options-grid-span2"],["type","url","matInput","","placeholder","Enter URL to page/resource","name","widgetUrl","formControlName","widgetUrl"],["name","allowInput","formControlName","allowInput",1,"options-grid-span2"],["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",""],["name","showMin","formControlName","showMin"],["name","showMax","formControlName","showMax"],[1,"options-grid-span2",3,"dateFormat","dateTimezone"],["name","invertRudder","formControlName","invertRudder",1,"fields"],["name","laylineEnable","formControlName","laylineEnable",1,"fields"],["type","number","min","10","max","90","matInput","","placeholder","Select angle...","name","laylineAngle","formControlName","laylineAngle"],["name","windSectorEnable","formControlName","windSectorEnable"],["type","number","min","1","max","90","matInput","","placeholder","Select or enter duration...","name","windSectorWindowSeconds","formControlName","windSectorWindowSeconds"],["name","courseOverGroundEnable","formControlName","courseOverGroundEnable",1,"options-grid-span2",3,"change"],["name","waypointEnable","formControlName","waypointEnable",1,"options-grid-span2"],["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","ignoreZones","formControlName","ignoreZones"],["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"],["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",""],[3,"value"],["name","noBgColor","formControlName","noBgColor"],["placeholder","Select Color...","formControlName","bgColor","name","bgColor","required",""],["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","anthracite"],["value","mud"],["value","punchedSheet"],["value","carbon"],["value","stainless"],["value","brushedMetal"],["value","brushedStainless"],["value","turned"],["placeholder","Select style...","formControlName","faceColor","name","faceColor"],["value","blackMetal"],["value","metal"],["value","shinyMetal"],["value","brass"],["value","steel"],["value","chrome"],["value","gold"],["value","tiltedGray"],["value","tiltedBlack"],["value","glossyMetal"],["label","Controls"],[1,"tab-content"],["mat-tab-label",""],[3,"addPath","updatePath","delPath","multiCtrlArray"],[1,"warning","fa","fa-exclamation-circle"],["label","Paths"],["formGroupName","paths",3,"isArray","enableTimeout","dataTimeout","filterSelfPaths","addPathEvent"],[1,"warning","material-icons"],[1,"widget-options-grid","tab-content"],["value","linear"],["value","radial"],["formControlName","digitalMeter","name","digitalMeter"],["placeholder","Select size...","formControlName","radialSize","name","radialSize"],["value","quarter"],["value","half"],["value","three-quarter"],["label","Put Request"],["formControlName","putEnable","name","putEnable"],["formControlName","putMomentary","name","putMomentary"],["formControlName","putMomentaryValue","name","putMomentaryValue"],["label","Dataset"],[3,"datasetUUID","convertUnitTo"],["class","warning fa fa-exclamation-circle",4,"ngIf"]],template:function(t,a){t&1&&(n(0,"form",0),b("ngSubmit",function(){return a.submitConfig()}),n(1,"h6",1),r(2),i(),n(3,"mat-dialog-content",2)(4,"mat-tab-group",3)(5,"mat-tab",4),_(6,an,1,22,"config-display-chart-options",5)(7,On,29,28,"div",6),i(),_(8,Nn,5,1,"mat-tab",7)(9,Bn,5,5,"mat-tab",8)(10,Wn,12,2,"mat-tab",9)(11,zn,9,1,"mat-tab",10)(12,Kn,3,2,"mat-tab",11),i()(),g(13,"mat-divider"),n(14,"mat-dialog-actions")(15,"button",12),r(16,"Cancel"),i(),n(17,"button",13),r(18,"Save"),i()()()),t&2&&(d("formGroup",a.formMaster),s(2),x(a.titleDialog),s(4),d("ngIf",a.widgetConfig.datasetUUID!==void 0),s(),d("ngIf",a.widgetConfig.datasetUUID===void 0),s(),d("ngIf",a.widgetConfig.multiChildCtrls!==void 0),s(),d("ngIf",a.widgetConfig.paths!==void 0),s(),C((a.widgetConfig.gauge==null?null:a.widgetConfig.gauge.type)=="steel"?10:-1),s(),d("ngIf",a.widgetConfig.putEnable!==void 0&&a.widgetConfig.multiChildCtrls===void 0),s(),d("ngIf",a.widgetConfig.datasetUUID!==void 0),s(5),d("disabled",!a.formMaster.valid))},dependencies:[B,Dt,V,xe,I,j,F,Ze,It,P,K,Ye,so,ye,Te,yo,Mo,Aa,L,O,R,we,ne,U,Co,po,$e,_e,Me,jo,Oo,Lo,Io,zo],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 $n=["button"],Yn=["*"];function Zn(o,c){if(o&1&&(n(0,"div",2),g(1,"mat-pseudo-checkbox",6),i()),o&2){let e=u();s(),d("disabled",e.disabled)}}var $o=new $("MAT_BUTTON_TOGGLE_DEFAULT_OPTIONS",{providedIn:"root",factory:Xn});function Xn(){return{hideSingleSelectionIndicator:!1,hideMultipleSelectionIndicator:!1,disabledInteractive:!1}}var Yo=new $("MatButtonToggleGroup"),Qn={provide:kt,useExisting:vt(()=>Jt),multi:!0},Wt=class{source;value;constructor(c,e){this.source=c,this.value=e}},Jt=(()=>{class o{_changeDetector=p(ze);_dir=p(Et,{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=p(mt).getId("mat-button-toggle-group-");vertical;get value(){let e=this._selectionModel?this._selectionModel.selected:[];return this.multiple?e.map(t=>t.value):e[0]?e[0].value:void 0}set value(e){this._setSelectionByValue(e),this.valueChange.emit(this.value)}valueChange=new Y;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 Y;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=p($o,{optional:!0});this.appearance=e&&e.appearance?e.appearance:"standard",this.hideSingleSelectionIndicator=e?.hideSingleSelectionIndicator??!1,this.hideMultipleSelectionIndicator=e?.hideMultipleSelectionIndicator??!1}ngOnInit(){this._selectionModel=new vo(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 a=e.target.id,l=this._buttonToggles.toArray().findIndex(h=>h.buttonId===a),m=null;switch(e.keyCode){case 32:case 13:m=this._buttonToggles.get(l)||null;break;case 38:m=this._getNextButton(l,-1);break;case 37:m=this._getNextButton(l,this.dir==="ltr"?-1:1);break;case 40:m=this._getNextButton(l,1);break;case 39:m=this._getNextButton(l,this.dir==="ltr"?1:-1);break;default:return}m&&(e.preventDefault(),m._onButtonClick(),m.focus())}_emitChangeEvent(e){let t=new Wt(e,this.value);this._rawValue=t.value,this._controlValueAccessorChangeFn(t.value),this.change.emit(t)}_syncButtonToggle(e,t,a=!1,l=!1){!this.multiple&&this.selected&&!e.checked&&(this.selected.checked=!1),this._selectionModel?t?this._selectionModel.select(e):this._selectionModel.deselect(e):l=!0,l?Promise.resolve().then(()=>this._updateModelValue(e,a)):this._updateModelValue(e,a)}_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(t=>e.value!=null&&t===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 t=this._buttonToggles.get(e);if(!t.disabled){t.tabIndex=0;break}}this._markButtonsForCheck()}_getNextButton(e,t){let a=this._buttonToggles;for(let l=1;l<=a.length;l++){let m=(e+t*l+a.length)%a.length,h=a.get(m);if(h&&!h.disabled)return h}return null}_setSelectionByValue(e){if(this._rawValue=e,!this._buttonToggles)return;let t=this._buttonToggles.toArray();if(this.multiple&&e?(Array.isArray(e),this._clearSelection(),e.forEach(a=>this._selectValue(a,t))):(this._clearSelection(),this._selectValue(e,t)),!this.multiple&&t.every(a=>a.tabIndex===-1)){for(let a of t)if(!a.disabled){a.tabIndex=0;break}}}_clearSelection(){this._selectionModel.clear(),this._buttonToggles.forEach(e=>{e.checked=!1,this.multiple||(e.tabIndex=-1)})}_selectValue(e,t){for(let a of t)if(a.value===e){a.checked=!0,this._selectionModel.select(a),this.multiple||(a.tabIndex=0);break}}_updateModelValue(e,t){t&&this._emitChangeEvent(e),this.valueChange.emit(this.value)}_markButtonsForCheck(){this._buttonToggles?.forEach(e=>e._markForCheck())}static \u0275fac=function(t){return new(t||o)};static \u0275dir=lt({type:o,selectors:[["mat-button-toggle-group"]],contentQueries:function(t,a,l){if(t&1&&st(l,qt,5),t&2){let m;he(m=be())&&(a._buttonToggles=m)}},hostAttrs:[1,"mat-button-toggle-group"],hostVars:6,hostBindings:function(t,a){t&1&&b("keydown",function(m){return a._keydown(m)}),t&2&&(le("role",a.multiple?"group":"radiogroup")("aria-disabled",a.disabled),X("mat-button-toggle-vertical",a.vertical)("mat-button-toggle-group-appearance-standard",a.appearance==="standard"))},inputs:{appearance:"appearance",name:"name",vertical:[2,"vertical","vertical",k],value:"value",multiple:[2,"multiple","multiple",k],disabled:[2,"disabled","disabled",k],disabledInteractive:[2,"disabledInteractive","disabledInteractive",k],hideSingleSelectionIndicator:[2,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",k],hideMultipleSelectionIndicator:[2,"hideMultipleSelectionIndicator","hideMultipleSelectionIndicator",k]},outputs:{valueChange:"valueChange",change:"change"},exportAs:["matButtonToggleGroup"],features:[dt([Qn,{provide:Yo,useExisting:o}])]})}return o})(),qt=(()=>{class o{_changeDetectorRef=p(ze);_elementRef=p(rt);_focusMonitor=p(Ba);_idGenerator=p(mt);_animationMode=p(Be,{optional:!0});_checked=!1;ariaLabel;ariaLabelledby=null;_buttonElement;buttonToggleGroup;get buttonId(){return`${this.id}-button`}id;name;value;get tabIndex(){return this._tabIndex}set tabIndex(e){e!==this._tabIndex&&(this._tabIndex=e,this._markForCheck())}_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 Y;constructor(){p(Ra).load(qa);let e=p(Yo,{optional:!0}),t=p(new ca("tabindex"),{optional:!0})||"",a=p($o,{optional:!0});this._tabIndex=parseInt(t)||0,this.buttonToggleGroup=e,this.appearance=a&&a.appearance?a.appearance:"standard",this.disabledInteractive=a?.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._animationMode!=="NoopAnimations"&&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 t=this.buttonToggleGroup._buttonToggles.find(a=>a.tabIndex===0);t&&(t.tabIndex=-1),this.tabIndex=0}this.change.emit(new Wt(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(t){return new(t||o)};static \u0275cmp=v({type:o,selectors:[["mat-button-toggle"]],viewQuery:function(t,a){if(t&1&&ct($n,5),t&2){let l;he(l=be())&&(a._buttonElement=l.first)}},hostAttrs:["role","presentation",1,"mat-button-toggle"],hostVars:14,hostBindings:function(t,a){t&1&&b("focus",function(){return a.focus()}),t&2&&(le("aria-label",null)("aria-labelledby",null)("id",a.id)("name",null),X("mat-button-toggle-standalone",!a.buttonToggleGroup)("mat-button-toggle-checked",a.checked)("mat-button-toggle-disabled",a.disabled)("mat-button-toggle-disabled-interactive",a.disabledInteractive)("mat-button-toggle-appearance-standard",a.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",k],appearance:"appearance",checked:[2,"checked","checked",k],disabled:[2,"disabled","disabled",k],disabledInteractive:[2,"disabledInteractive","disabledInteractive",k]},outputs:{change:"change"},exportAs:["matButtonToggle"],ngContentSelectors:Yn,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(t,a){if(t&1){let l=A();Re(),n(0,"button",1,0),b("click",function(){return M(l),y(a._onButtonClick())}),_(2,Zn,2,1,"div",2),n(3,"span",3),Ue(4),i()(),g(5,"span",4)(6,"span",5)}if(t&2){let l=te(1);d("id",a.buttonId)("disabled",a.disabled&&!a.disabledInteractive||null),le("role",a.isSingleSelector()?"radio":"button")("tabindex",a.disabled&&!a.disabledInteractive?-1:a.tabIndex)("aria-pressed",a.isSingleSelector()?null:a.checked)("aria-checked",a.isSingleSelector()?a.checked:null)("name",a._getButtonName())("aria-label",a.ariaLabel)("aria-labelledby",a.ariaLabelledby)("aria-disabled",a.disabled&&a.disabledInteractive?"true":null),s(2),C(a.buttonToggleGroup&&(!a.buttonToggleGroup.multiple&&!a.buttonToggleGroup.hideSingleSelectionIndicator||a.buttonToggleGroup.multiple&&!a.buttonToggleGroup.hideMultipleSelectionIndicator)?2:-1),s(4),d("matRippleTrigger",l)("matRippleDisabled",a.disableRipple||a.disabled)}},dependencies:[Wa,uo],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);transform:translateZ(0);border-radius:var(--mat-legacy-button-toggle-shape)}.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-standard-button-toggle-shape, var(--mat-sys-corner-full));border:solid 1px var(--mat-standard-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-minimal-pseudo-checkbox-selected-checkmark-color: var(--mat-standard-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-legacy-button-toggle-text-color);font-family:var(--mat-legacy-button-toggle-label-text-font);font-size:var(--mat-legacy-button-toggle-label-text-size);line-height:var(--mat-legacy-button-toggle-label-text-line-height);font-weight:var(--mat-legacy-button-toggle-label-text-weight);letter-spacing:var(--mat-legacy-button-toggle-label-text-tracking);--mat-minimal-pseudo-checkbox-selected-checkmark-color: var(--mat-legacy-button-toggle-selected-state-text-color)}.mat-button-toggle.cdk-keyboard-focused .mat-button-toggle-focus-overlay{opacity:var(--mat-legacy-button-toggle-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-legacy-button-toggle-selected-state-text-color);background-color:var(--mat-legacy-button-toggle-selected-state-background-color)}.mat-button-toggle-disabled{pointer-events:none;color:var(--mat-legacy-button-toggle-disabled-state-text-color);background-color:var(--mat-legacy-button-toggle-disabled-state-background-color);--mat-minimal-pseudo-checkbox-disabled-selected-checkmark-color: var(--mat-legacy-button-toggle-disabled-state-text-color)}.mat-button-toggle-disabled.mat-button-toggle-checked{background-color:var(--mat-legacy-button-toggle-disabled-selected-state-background-color)}.mat-button-toggle-disabled-interactive{pointer-events:auto}.mat-button-toggle-appearance-standard{color:var(--mat-standard-button-toggle-text-color, var(--mat-sys-on-surface));background-color:var(--mat-standard-button-toggle-background-color, transparent);font-family:var(--mat-standard-button-toggle-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mat-standard-button-toggle-label-text-size, var(--mat-sys-label-large-size));line-height:var(--mat-standard-button-toggle-label-text-line-height, var(--mat-sys-label-large-line-height));font-weight:var(--mat-standard-button-toggle-label-text-weight, var(--mat-sys-label-large-weight));letter-spacing:var(--mat-standard-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-standard-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-standard-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-standard-button-toggle-divider-color, var(--mat-sys-outline))}.mat-button-toggle-appearance-standard.mat-button-toggle-checked{color:var(--mat-standard-button-toggle-selected-state-text-color, var(--mat-sys-on-secondary-container));background-color:var(--mat-standard-button-toggle-selected-state-background-color, var(--mat-sys-secondary-container))}.mat-button-toggle-appearance-standard.mat-button-toggle-disabled{color:var(--mat-standard-button-toggle-disabled-state-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mat-standard-button-toggle-disabled-state-background-color, transparent)}.mat-button-toggle-appearance-standard.mat-button-toggle-disabled .mat-pseudo-checkbox{--mat-minimal-pseudo-checkbox-disabled-selected-checkmark-color: var(--mat-standard-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-standard-button-toggle-disabled-selected-state-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mat-standard-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-standard-button-toggle-state-layer-color, var(--mat-sys-on-surface))}.mat-button-toggle-appearance-standard:hover .mat-button-toggle-focus-overlay{opacity:var(--mat-standard-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-standard-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-legacy-button-toggle-height);position:relative}.mat-button-toggle-appearance-standard .mat-button-toggle-label-content{padding:0 12px;line-height:var(--mat-standard-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-legacy-button-toggle-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-standard-button-toggle-shape, var(--mat-sys-corner-full))}.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-standard-button-toggle-shape, var(--mat-sys-corner-full));border-bottom-right-radius:var(--mat-standard-button-toggle-shape, var(--mat-sys-corner-full))}.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-standard-button-toggle-shape, var(--mat-sys-corner-full));border-bottom-left-radius:var(--mat-standard-button-toggle-shape, var(--mat-sys-corner-full))}.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-standard-button-toggle-shape, var(--mat-sys-corner-full));border-bottom-left-radius:var(--mat-standard-button-toggle-shape, var(--mat-sys-corner-full))}.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-standard-button-toggle-shape, var(--mat-sys-corner-full));border-top-left-radius:var(--mat-standard-button-toggle-shape, var(--mat-sys-corner-full))}
6
+ `],encapsulation:2,changeDetection:0})}return o})(),Zo=(()=>{class o{static \u0275fac=function(t){return new(t||o)};static \u0275mod=ge({type:o});static \u0275inj=ue({imports:[q,za,qt,q]})}return o})();var Xo=(()=>{class o{_widgetCategories=["Basic","Gauges","Components"];_widgetDefinition=[{name:"Numeric",description:"Displays numeric data in a clear and concise format with option to display minimum and maximum recorded values.",icon:"numericWidget",category:"Basic",selector:"widget-numeric",componentClassName:"WidgetNumericComponent"},{name:"Text",description:"Displays text data with customizable color formatting option.",icon:"textWidget",category:"Basic",selector:"widget-text",componentClassName:"WidgetTextComponent"},{name:"Date & Time",description:"Displays date and time data with fully custom formatting options and timezone correction.",icon:"datetimeWidget",category:"Basic",selector:"widget-datetime",componentClassName:"WidgetDatetimeComponent"},{name:"Position",description:"Displays latitude and longitude for location tracking and navigation.",icon:"positionWidget",category:"Basic",selector:"widget-position",componentClassName:"WidgetPositionComponent"},{name:"Switch Panel",description:"A switch panel group with multiple controls including toggle switches, indicator lights, and press buttons for digital switching ond other operations.",icon:"switchpanelWidget",category:"Basic",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",category:"Basic",selector:"widget-slider",componentClassName:"WidgetSliderComponent"},{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",category:"Basic",selector:"widget-label",componentClassName:"WidgetLabelComponent"},{name:"Simple Linear",description:"A simple horizontal linear gauge with a large value label offering a clean, compact modern look.",icon:"simpleLinearGauge",category:"Gauges",selector:"widget-simple-linear",componentClassName:"WidgetSimpleLinearComponent"},{name:"Linear",description:"A horizontal or vertical linear gauge that supports zones highlights. ",icon:"linearGauge",category:"Gauges",selector:"widget-gauge-ng-linear",componentClassName:"WidgetGaugeNgLinearComponent"},{name:"Radial",description:"A radial gauge that supports various configurations, including capacity and measurement dials and zones highlight.",icon:"radialGauge",category:"Gauges",selector:"widget-gauge-ng-radial",componentClassName:"WidgetGaugeNgRadialComponent"},{name:"Compass",description:"A faceplate or card rotating compass gauge with various cardinal point indicator options.",icon:"compassGauge",category:"Gauges",selector:"widget-gauge-ng-compass",componentClassName:"WidgetGaugeNgCompassComponent"},{name:"Steel Style",description:"A traditional steel looking linear & radial gauges replica that supports range sizes and zones highlights.",icon:"steelGauge",category:"Gauges",selector:"widget-gauge-steel",componentClassName:"WidgetSteelGaugeComponent"},{name:"Wind Steering",description:"A wind steering display that combines wind, wind sectors, heading, course over ground and next waypoint information",icon:"windsteeringWidget",category:"Components",selector:"widget-wind-steer",componentClassName:"WidgetWindComponent"},{name:"Freeboard-SK",description:"Add Freeboard-SK Chart Plotter as a widget with auto sign-in to your dashboard.",icon:"freeboardWidget",category:"Components",selector:"widget-freeboardsk",componentClassName:"WidgetFreeboardskComponent"},{name:"Data Chart",description:"Visualize data on a realtime chart with multiple series pre configured such as averages, SMA, EMA and DEMA. The use the Data Chart widget KIP Dataset must be configured.",icon:"datachartWidget",category:"Components",selector:"widget-data-chart",componentClassName:"WidgetDataChartComponent"},{name:"Autopilot Head",description:"An Autopilot Head for supported Signal K autopilot devices.",icon:"autopilotWidget",category:"Components",selector:"widget-autopilot",componentClassName:"WidgetAutopilotComponent"},{name:"Race Timer",description:"A simple race start countdown timer. The timer can be started, paused, reset and the countdown duration specified.",icon:"racetimerWidget",category:"Components",selector:"widget-racetimer",componentClassName:"WidgetRaceTimerComponent"},{name:"Embed Webpage Viewer",description:"Use this widget to embed a view of an external web based applications, such as Grafana graphs, other Signal K Apps and related tools, in your dashboard for a seamless integration. Interactions with the embedded page are not supported.",icon:"embedWidget",category:"Components",selector:"widget-iframe",componentClassName:"WidgetIframeComponent"},{name:"Tutorial",description:"KIP's getting started tutorial widget.",icon:"tutorialWidget",category:"Components",selector:"widget-tutorial",componentClassName:"WidgetTutorialComponent"}];get kipWidgets(){return this._widgetDefinition}get categories(){return this._widgetCategories}static \u0275fac=function(t){return new(t||o)};static \u0275prov=ee({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})();var Qo=(()=>{class o{svgIcon=f.required();iconSize=f.required();name=f.required();description=f.required();constructor(){let e=p(Oa),t=p(Da);e.addSvgIconSet(t.bypassSecurityTrustResourceUrl("assets/svg/icons.svg"))}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=v({type:o,selectors:[["widget-list-card"]],inputs:{svgIcon:[1,"svgIcon"],iconSize:[1,"iconSize"],name:[1,"name"],description:[1,"description"]},decls:8,vars:7,consts:[[1,"item-container"],[1,"item-icon"],["aria-hidden","false",3,"svgIcon"],[1,"item-label"],[1,"title","no-text-select"],[1,"description","no-text-select"]],template:function(t,a){t&1&&(n(0,"div",0)(1,"div",1),g(2,"mat-icon",2),i(),n(3,"div",3)(4,"p",4),r(5),i(),n(6,"span",5),r(7),i()()()),t&2&&(s(2),Ct("width",a.iconSize(),"px")("height",a.iconSize(),"px"),d("svgIcon",a.svgIcon()),s(3),x(a.name()),s(2),x(a.description()))},dependencies:[ae,N],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)}.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%]{cursor:pointer;font-size:var(--mat-sys-label-medium-line-height)}.description[_ngcontent-%COMP%]{cursor:pointer;color:var(--mat-sys-outline)}.no-text-select[_ngcontent-%COMP%]{-webkit-user-select:none;user-select:none}"]})}return o})();var er=(o,c)=>c.selector;function tr(o,c){if(o&1&&(n(0,"mat-button-toggle",1),r(1),i()),o&2){let e=c.$implicit;d("value",e),s(),Q(" ",e," ")}}function ar(o,c){if(o&1){let e=A();n(0,"widget-list-card",3),b("click",function(){let a=M(e).$implicit,l=u();return y(l.onSelectWidget(a.selector))}),i()}if(o&2){let e=c.$implicit;d("svgIcon",e.icon)("iconSize",48)("name",e.name)("description",e.description)}}var Jo=(()=>{class o{dialogRef=p(ve);_widgets=p(Xo);widgetsList=[];_widgetCategory=Z("Basic");constructor(){this.widgetsList=this._widgets.kipWidgets.filter(e=>e.category===this._widgetCategory())}onCategoryChange(e){this.widgetsList=this._widgets.kipWidgets.filter(t=>t.category===e.value),this._widgetCategory.set(e.value)}onSelectWidget(e){this.dialogRef.close(e)}static \u0275fac=function(t){return new(t||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,"svgIcon","iconSize","name","description"],[3,"click","svgIcon","iconSize","name","description"]],template:function(t,a){t&1&&(n(0,"div")(1,"mat-button-toggle-group",0),b("change",function(m){return a.onCategoryChange(m)}),T(2,tr,2,2,"mat-button-toggle",1,G),i(),n(4,"div"),T(5,ar,1,4,"widget-list-card",2,er),i()()),t&2&&(s(),d("value",a._widgetCategory()),s(),S(a._widgets.categories),s(3),S(a.widgetsList))},dependencies:[Zo,Jt,qt,Qo],styles:[".list-filter[_ngcontent-%COMP%]{margin-bottom:20px}"]})}return o})();var ei=(()=>{class o{dialogRef=p(ve);fileVersionToUpgrade=9;configVersionToUpgrade=10;currentConfigVersion=11;_storage=p(ka);_settings=p(xt);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=>gt(this,null,function*(){for(let t of e){let a=yield this.transformConfig(t);if(a)if(a.scope==="global")try{this._storage.patchGlobal(a.name,a.scope,a.newConfiguration,"add"),this._storage.patchGlobal(a.name,a.scope,a.oldConfiguration,"replace",9),console.log(`[Upgrade] Configuration ${a.scope}/${a.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 ${t.name}`)}else this._storage.setConfig(a.scope,a.name,a.newConfiguration).then(()=>{this._storage.setConfig(a.scope,a.name,a.oldConfiguration,9),console.log(`[Upgrade] Configuration ${a.scope}/${a.name} has been upgraded to version ${this.currentConfigVersion} and saved. Old configuration has been patched to version 0.`)}).catch(l=>{console.error(`[Upgrade] Error saving configuration for ${t.name}:`,l)})}})).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 t=this.transformApp(e.app),a=this.transformTheme(e.theme),l=e.layout?.rootSplits||[],m=e.layout?.splitSets||[],h=e.widget?.widgets||[],D=l.map((J,De)=>{let Ie=this.extractWidgetsFromSplitSets(m,h,J);return{id:J,name:`Dashboard ${De+1}`,configuration:Ie}});localStorage.setItem("appConfig",JSON.stringify(t)),localStorage.setItem("dashboardsConfig",JSON.stringify(D)),localStorage.setItem("themeConfig",JSON.stringify(a))}setTimeout(()=>{this._settings.reloadApp()},1500)}transformConfig(e){return gt(this,null,function*(){let t=yield this._storage.getConfig(e.scope,e.name,this.fileVersionToUpgrade);if(t.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 a=this.transformApp(t.app),l=this.transformTheme(t.theme),m=t.layout?.rootSplits||[],h=t.layout?.splitSets||[],D=t.widget?.widgets||[],J=m.map((Ie,ft)=>{let at=this.extractWidgetsFromSplitSets(h,D,Ie);return{id:Ie,name:`Dashboard ${ft+1}`,configuration:at}}),De=wt(t);return De.app.configVersion=0,{scope:e.scope,name:e.name,newConfiguration:{app:a,theme:l,dashboards:J},oldConfiguration:De}})}transformWidget(e,t){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":t==="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,t,a){let l=new Map(t.map(ot=>[ot.uuid,ot])),m=[],h=[],D=0,J=0,De=12,Ie=12,ft=2,at=2,ta=ot=>{let aa=e.find(Ge=>Ge.uuid===ot);if(!aa){h.push(`Missing splitSet with UUID: ${ot}`);return}aa.splitAreas.forEach(Ge=>{if(Ge.type==="widget"){let re=l.get(Ge.uuid);if(re){if(re.type==="WidgetBlank"){console.warn(`Skipping widget of type WidgetBlank with UUID: ${re.uuid}`);return}if(J+at>Ie){h.push(`No space left in the grid for widget with UUID: ${re.uuid}`);return}let oa=o.widgetTypeToSelectorMap[re.type]||"widget-unknown",ni=this.transformWidget(re.config,re.type);m.push({id:re.uuid,selector:oa,input:{widgetProperties:{type:oa,uuid:re.uuid,config:ni}},x:D,y:J,w:ft,h:at}),D+=ft,D>=De&&(D=0,J+=at)}else h.push(`Missing widget with UUID: ${Ge.uuid}`)}else Ge.type==="splitSet"&&ta(Ge.uuid)})};return ta(a),h.length>0&&console.warn("Transformation Issues:",h),m}startFresh(){if(this._storage.initConfig)this._storage.listConfigs(this.fileVersionToUpgrade).then(e=>gt(this,null,function*(){for(let t of e){let a=yield this._storage.getConfig(t.scope,t.name,this.fileVersionToUpgrade);if(a.app.configVersion=0,t.scope==="global")try{setTimeout(()=>{this._storage.patchGlobal(t.name,t.scope,a,"replace",9),console.log(`[Retired] Configuration ${t.scope}/${t.name} has been patched to version 0.`)},750)}catch{console.error(`[Upgrade] Error saving configuration for ${t.name}:`)}else try{yield this._storage.setConfig(t.scope,t.name,a,9),console.log(`[Retired] Configuration ${t.scope}/${t.name} has been patched to version 0.`)}catch{console.error(`[Upgrade] Error saving configuration for ${t.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(t){return new(t||o)};static \u0275cmp=v({type:o,selectors:[["upgrade-config"]],decls:75,vars:0,consts:[["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(t,a){t&1&&(n(0,"h2"),r(1,"Instructions and Upgrade Limitations"),i(),n(2,"p"),r(3,"The new and old widget layout engines are fundamentally different. As a result, migrating the configuration will produce the following:"),i(),n(4,"ul")(5,"li"),r(6,"All KIP configuration settings will be migrated."),i(),n(7,"li"),r(8,"Each v2 Page layout will be migrated to a v3 Dashboard."),i(),n(9,"li"),r(10,"All widgets and their configurations will be migrated and visible in their corresponding v3 Dashboard."),i(),n(11,"li")(12,"strong"),r(13,"Note:"),i(),r(14," Widget positions, order, and sizes "),n(15,"strong"),r(16,"WILL BE LOST"),i(),r(17,". Dashboards will contain small widgets that can be repositioned and resized manually. "),i()(),n(18,"p"),r(19,"To upgrade your configuration, please follow these steps:"),i(),n(20,"ol")(21,"li"),r(22," As a safety measure, if you are using Signal K authentication, manually back up your configuration. Make a copy of the "),n(23,"code"),r(24,"9.0.0.json"),i(),r(25," files found on the Signal K server in the following folders: "),n(26,"ul")(27,"li")(28,"code"),r(29,"~/.signalk/applicationData/users/(username)/kip/"),i()(),n(30,"li")(31,"code"),r(32,"~/.signalk/applicationData/global/kip/"),i()()()(),n(33,"li"),r(34,"Click the "),n(35,"strong"),r(36,"Upgrade"),i(),r(37," button below."),i(),n(38,"li"),r(39,"Once the upgrade is complete, KIP will restart and display the migrated dashboards."),i(),n(40,"li"),r(41," Swipe left, or press "),n(42,"code"),r(43,"Shift + Ctrl + Left Arrow"),i(),r(44," to open the Actions menu. Tap/Click on "),n(45,"strong"),r(46,"Help"),i(),r(47,` and read "The Basics" and "Dashboards and Layout." We promise, it's a quick read. `),i(),n(48,"li"),r(49,"Reposition and resize your widgets as needed."),i(),n(50,"li"),r(51,"Once satisfied, proceed to deleting the "),n(52,"code"),r(53,"9.0.0.json"),i(),r(54," configuration files located in the previously mentioned folders. They are not needed any more."),i(),n(55,"li"),r(56," If you need support, join the "),n(57,"a",0),r(58,"Signal K #kip Discord channel"),i(),r(59,". "),i(),n(60,"li"),r(61,"Enjoy the new features and improvements!"),i()(),n(62,"p"),r(63," If you prefer not to upgrade your configuration, you "),n(64,"strong"),r(65,"MUST MANUALLY DELETE"),i(),r(66," the "),n(67,"code"),r(68,"9.0.0.json"),i(),r(69,` files from the previously mentioned server folders.
7
+ `),i(),n(70,"div",1)(71,"button",2),b("click",function(){return a.upgrade()}),r(72,"Upgrade"),i(),n(73,"button",3),b("click",function(){return a.startFresh()}),r(74,"Start Fresh"),i()())},dependencies:[Se,oe,_e],styles:[".button-group[_ngcontent-%COMP%]{display:flex;justify-content:center}"]})}return o})();var Td=(()=>{class o{dialog=p(ao);openFrameDialog(e,t){switch(e.component){case"select-widget":e.componentType=Jo;break;case"upgrade-config":e.componentType=ei;break}return this.dialog.open(Ao,{data:e,height:t?"calc(100% - 30px)":"",width:t?"calc(100% - 30px)":"",maxWidth:t?"100%":"",maxHeight:t?"100%":""}).afterClosed()}openConfirmationDialog(e){return this.dialog.open(Go,{data:e,minWidth:"35vw",minHeight:"25vh"}).afterClosed()}openNameDialog(e){return this.dialog.open(ko,{data:e,minWidth:"20vw",minHeight:"20vh",disableClose:!0})}openWidgetOptions(e){return this.dialog.open(Ko,{data:e.config,minWidth:"50vw",maxWidth:"90vw"})}static \u0275fac=function(t){return new(t||o)};static \u0275prov=ee({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})();var ti=[["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"]],ce=(()=>{if(typeof document>"u")return!1;let o=ti[0],c={};for(let e of ti)if(e?.[1]in document){for(let[a,l]of e.entries())c[o[a]]=l;return c}return!1})(),ai={change:ce.fullscreenchange,error:ce.fullscreenerror},W={request(o=document.documentElement,c){return new Promise((e,t)=>{let a=()=>{W.off("change",a),e()};W.on("change",a);let l=o[ce.requestFullscreen](c);l instanceof Promise&&l.then(a).catch(t)})},exit(){return new Promise((o,c)=>{if(!W.isFullscreen){o();return}let e=()=>{W.off("change",e),o()};W.on("change",e);let t=document[ce.exitFullscreen]();t instanceof Promise&&t.then(e).catch(c)})},toggle(o,c){return W.isFullscreen?W.exit():W.request(o,c)},onchange(o){W.on("change",o)},onerror(o){W.on("error",o)},on(o,c){let e=ai[o];e&&document.addEventListener(e,c,!1)},off(o,c){let e=ai[o];e&&document.removeEventListener(e,c,!1)},raw:ce};Object.defineProperties(W,{isFullscreen:{get:()=>!!document[ce.fullscreenElement]},element:{enumerable:!0,get:()=>document[ce.fullscreenElement]??void 0},isEnabled:{enumerable:!0,get:()=>!!document[ce.fullscreenEnabled]}});ce||(W={isEnabled:!1});var de=W;var Ed=(()=>{class o{isDragging=Z(!1);fullscreenStatus=Z(!1);fullscreenSupported=Z(!0);noSleepStatus=Z(!1);noSleepSupported=Z(!0);noSleep=new NoSleep;initialTouchX=null;initialTouchY=null;hotkeyListeners=new Map;constructor(){de.isEnabled?de.on("change",()=>{this.fullscreenStatus.set(de.isFullscreen),de.isFullscreen||this.noSleep.disable()}):(this.fullscreenSupported.set(!1),console.log("[Actions Menu] Fullscreen mode is not supported by device/browser.")),this.checkNoSleepSupport(),this.checkPwaMode()&&this.noSleepSupported()&&!this.noSleepStatus()&&this.toggleNoSleep()}checkNoSleepSupport(){try{if(this.noSleep=new NoSleep,typeof this.noSleep.enable!="function"||typeof this.noSleep.disable!="function")throw new Error("[Actions Menu] NoSleep methods not available")}catch{this.noSleepSupported.set(!1),console.warn("[Actions Menu] NoSleep is not supported by this device/browser.")}}checkPwaMode(){let e=window.matchMedia("(display-mode: standalone)").matches||window.navigator.standalone!==void 0;return console.log("[Actions Menu] PWA mode:",e),e}toggleNoSleep(){this.noSleepSupported()&&(this.noSleepStatus()?this.noSleep.disable():this.noSleep.enable(),this.noSleepStatus.set(!this.noSleepStatus()),console.log("[Actions Menu] NoSleep active:",this.noSleepStatus()))}toggleFullScreen(){de.isEnabled?(this.fullscreenStatus()?(de.isFullscreen&&de.exit(),this.noSleep.disable()):(de.request(),this.noSleep.enable()),this.fullscreenStatus.set(!this.fullscreenStatus())):(this.fullscreenSupported.set(!1),console.log("[Actions Menu] Fullscreen mode is not supported by this browser."))}addGestureListeners(e,t){let a=this.preventBrowserHistorySwipeGestures.bind(this);document.addEventListener("openLeftSidenav",e),document.addEventListener("openRightSidenav",t),document.addEventListener("touchstart",a,{passive:!1}),document.addEventListener("touchmove",a,{passive:!1}),document.addEventListener("touchend",a),document.addEventListener("touchcancel",a)}removeGestureListeners(e,t){let a=this.preventBrowserHistorySwipeGestures.bind(this);document.removeEventListener("openLeftSidenav",e),document.removeEventListener("openRightSidenav",t),document.removeEventListener("touchstart",a),document.removeEventListener("touchmove",a),document.removeEventListener("touchend",a),document.removeEventListener("touchcancel",a)}preventBrowserHistorySwipeGestures(e){if(e.touches.length===1){let t=e.touches[0],a=30;if(e.type==="touchstart")this.initialTouchX=t.clientX,this.initialTouchY=t.clientY;else if(e.type==="touchmove"&&this.initialTouchX!==null&&this.initialTouchY!==null){let l=Math.abs(t.clientX-this.initialTouchX),m=Math.abs(t.clientY-this.initialTouchY);l>10&&l>m&&(this.initialTouchX<a||this.initialTouchX>window.innerWidth-a)&&e.preventDefault(),m>10&&this.initialTouchY<50&&e.preventDefault()}else(e.type==="touchend"||e.type==="touchcancel")&&(this.initialTouchX=null,this.initialTouchY=null)}}addHotkeyListener(e,t){let a=l=>{if(l instanceof KeyboardEvent){let m=l.key.toLowerCase();if(t&&(t.keys&&!t.keys.includes(m)||t.ctrlKey!==void 0&&l.ctrlKey!==t.ctrlKey||t.shiftKey!==void 0&&l.shiftKey!==t.shiftKey))return;e(m,l)}else console.warn("[uiEvent Service] Non-keyboard event detected in addHotkeyListener:",l)};this.hotkeyListeners.set(e,a),document.addEventListener("keydown",a)}removeHotkeyListener(e){let t=this.hotkeyListeners.get(e);t&&(document.removeEventListener("keydown",t),this.hotkeyListeners.delete(e))}static \u0275fac=function(t){return new(t||o)};static \u0275prov=ee({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})();function or(o,c){}var oi="_mat-bottom-sheet-enter",ii="_mat-bottom-sheet-exit",ir=(()=>{class o extends Ja{_breakpointSubscription;_animationsDisabled=p(Be,{optional:!0})==="NoopAnimations";_animationState="void";_animationStateChanged=new Y;_destroyed;constructor(){super();let e=p(At);this._breakpointSubscription=e.observe([se.Medium,se.Large,se.XLarge]).subscribe(()=>{let t=this._elementRef.nativeElement.classList;t.toggle("mat-bottom-sheet-container-medium",e.isMatched(se.Medium)),t.toggle("mat-bottom-sheet-container-large",e.isMatched(se.Large)),t.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(oi))}exit(){this._destroyed||(this._elementRef.nativeElement.setAttribute("mat-exit",""),this._animationState="hidden",this._changeDetectorRef.markForCheck(),this._animationsDisabled&&this._simulateAnimation(ii))}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,t){let a=t===oi;(a||t===ii)&&this._animationStateChanged.emit({toState:a?"visible":"hidden",phase:e?"start":"done"})}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=v({type:o,selectors:[["mat-bottom-sheet-container"]],hostAttrs:["tabindex","-1",1,"mat-bottom-sheet-container"],hostVars:9,hostBindings:function(t,a){t&1&&b("animationstart",function(m){return a._handleAnimationEvent(!0,m.animationName)})("animationend",function(m){return a._handleAnimationEvent(!1,m.animationName)})("animationcancel",function(m){return a._handleAnimationEvent(!1,m.animationName)}),t&2&&(le("role",a._config.role)("aria-modal",a._config.ariaModal)("aria-label",a._config.ariaLabel),X("mat-bottom-sheet-container-animations-enabled",!a._animationsDisabled)("mat-bottom-sheet-container-enter",a._animationState==="visible")("mat-bottom-sheet-container-exit",a._animationState==="hidden"))},features:[ha],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(t,a){t&1&&_(0,or,0,0,"ng-template",0)},dependencies:[Ka],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})(),nr=new $("MatBottomSheetData"),ea=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},zt=class{_ref;get instance(){return this._ref.componentInstance}get componentRef(){return this._ref.componentRef}containerInstance;disableClose;_afterOpened=new it;_result;_closeFallbackTimeout;constructor(c,e,t){this._ref=c,this.containerInstance=t,this.disableClose=e.disableClose,t._animationStateChanged.pipe(pe(a=>a.phase==="done"&&a.toState==="visible"),Le(1)).subscribe(()=>{this._afterOpened.next(),this._afterOpened.complete()}),t._animationStateChanged.pipe(pe(a=>a.phase==="done"&&a.toState==="hidden"),Le(1)).subscribe(()=>{clearTimeout(this._closeFallbackTimeout),this._ref.close(this._result)}),c.overlayRef.detachments().subscribe(()=>{this._ref.close(this._result)}),Oe(this.backdropClick(),this.keydownEvents().pipe(pe(a=>a.keyCode===27))).subscribe(a=>{!this.disableClose&&(a.type!=="keydown"||!He(a))&&(a.preventDefault(),this.dismiss())})}dismiss(c){this.containerInstance&&(this.containerInstance._animationStateChanged.pipe(pe(e=>e.phase==="start"),Le(1)).subscribe(()=>{this._closeFallbackTimeout=setTimeout(()=>this._ref.close(this._result),500),this._ref.overlayRef.detachBackdrop()}),this._result=c,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}},rr=new $("mat-bottom-sheet-default-options"),lr=(()=>{class o{_overlay=p(Ke);_parentBottomSheet=p(o,{optional:!0,skipSelf:!0});_defaultOptions=p(rr,{optional:!0});_bottomSheetRefAtThisLevel=null;_dialog=p(eo);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,t){let a=me(me({},this._defaultOptions||new ea),t),l;return this._dialog.open(e,Fe(me({},a),{disableClose:!0,closeOnOverlayDetachments:!1,maxWidth:"100%",container:ir,scrollStrategy:a.scrollStrategy||this._overlay.scrollStrategies.block(),positionStrategy:this._overlay.position().global().centerHorizontally().bottom("0"),templateContext:()=>({bottomSheetRef:l}),providers:(m,h,D)=>(l=new zt(m,a,D),[{provide:zt,useValue:l},{provide:nr,useValue:a.data}])})),l.afterDismissed().subscribe(()=>{this._openedBottomSheetRef===l&&(this._openedBottomSheetRef=null)}),this._openedBottomSheetRef?(this._openedBottomSheetRef.afterDismissed().subscribe(()=>l.containerInstance?.enter()),this._openedBottomSheetRef.dismiss()):l.containerInstance.enter(),this._openedBottomSheetRef=l,l}dismiss(e){this._openedBottomSheetRef&&this._openedBottomSheetRef.dismiss(e)}ngOnDestroy(){this._bottomSheetRefAtThisLevel&&this._bottomSheetRefAtThisLevel.dismiss()}static \u0275fac=function(t){return new(t||o)};static \u0275prov=ee({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})(),jd=(()=>{class o{static \u0275fac=function(t){return new(t||o)};static \u0275mod=ge({type:o});static \u0275inj=ue({providers:[lr],imports:[to,q,$a,q]})}return o})();export{br as a,bl as b,Fo as c,Td as d,Ed as e,zt as f,lr as g,jd as h};